From 1b37ac5baa22bfde9d5bd53421b94f5abef619ea Mon Sep 17 00:00:00 2001 From: andy Date: Thu, 19 Dec 2024 01:03:42 +0200 Subject: [PATCH 01/36] TRK track spline and basic mesh (proving grounds only) --- frontend/dist/gui/index.html | 2 +- frontend/dist/gui/main.a174ec14eb5987ad.js | 1 - frontend/dist/gui/main.c72f5b1f0169f720.js | 1 + frontend/src/app/app.module.ts | 4 +- .../minimap/minimap.component.html | 9 +- .../common/minimap/minimap.component.scss | 21 + .../minimap/minimap.component.ts | 19 +- .../minimap/minimap.component.scss | 8 - .../trk-map.block-ui.component.html | 19 + .../trk-map.block-ui.component.scss | 52 ++ .../trk-map.block-ui.component.ts | 602 ++++++++++++++++++ .../app/components/editor/editor.component.ts | 5 +- generate_resource_doc.py | 10 +- library/context.py | 5 +- library/loader.py | 3 + resources/eac/maps/__init__.py | 15 + resources/eac/maps/nfs2.py | 100 +++ resources/eac/{maps.py => maps/tnfs.py} | 6 +- serializers/__init__.py | 2 +- serializers/maps.py | 71 ++- 20 files changed, 928 insertions(+), 27 deletions(-) delete mode 100644 frontend/dist/gui/main.a174ec14eb5987ad.js create mode 100644 frontend/dist/gui/main.c72f5b1f0169f720.js rename frontend/src/app/components/editor/{eac/tri-map.block-ui => common}/minimap/minimap.component.html (60%) create mode 100644 frontend/src/app/components/editor/common/minimap/minimap.component.scss rename frontend/src/app/components/editor/{eac/tri-map.block-ui => common}/minimap/minimap.component.ts (89%) delete mode 100644 frontend/src/app/components/editor/eac/tri-map.block-ui/minimap/minimap.component.scss create mode 100644 frontend/src/app/components/editor/eac/trk-map.block-ui/trk-map.block-ui.component.html create mode 100644 frontend/src/app/components/editor/eac/trk-map.block-ui/trk-map.block-ui.component.scss create mode 100644 frontend/src/app/components/editor/eac/trk-map.block-ui/trk-map.block-ui.component.ts create mode 100644 resources/eac/maps/__init__.py create mode 100644 resources/eac/maps/nfs2.py rename resources/eac/{maps.py => maps/tnfs.py} (99%) diff --git a/frontend/dist/gui/index.html b/frontend/dist/gui/index.html index fcaa95a..23d0129 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.a174ec14eb5987ad.js b/frontend/dist/gui/main.a174ec14eb5987ad.js deleted file mode 100644 index 29b29ca..0000000 --- a/frontend/dist/gui/main.a174ec14eb5987ad.js +++ /dev/null @@ -1 +0,0 @@ -(self.webpackChunkgui=self.webpackChunkgui||[]).push([[179],{684:(Po,zs,ps)=>{"use strict";function ln(i){return"function"==typeof i}function V(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 Nr=V(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 Kr(i,t){if(i){const e=i.indexOf(t);0<=e&&i.splice(e,1)}}class Kt{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(ln(n))try{n()}catch(s){t=s instanceof Nr?s.errors:[s]}const{_finalizers:r}=this;if(r){this._finalizers=null;for(const s of r)try{La(s)}catch(o){t=t??[],o instanceof Nr?t=[...t,...o.errors]:t.push(o)}}if(t)throw new Nr(t)}}add(t){var e;if(t&&t!==this)if(this.closed)La(t);else{if(t instanceof Kt){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)&&Kr(e,t)}remove(t){const{_finalizers:e}=this;e&&Kr(e,t),t instanceof Kt&&t._removeParent(this)}}Kt.EMPTY=(()=>{const i=new Kt;return i.closed=!0,i})();const Un=Kt.EMPTY;function yl(i){return i instanceof Kt||i&&"closed"in i&&ln(i.remove)&&ln(i.add)&&ln(i.unsubscribe)}function La(i){ln(i)?i():i.unsubscribe()}const Hs={onUnhandledError:null,onStoppedNotification:null,Promise:void 0,useDeprecatedSynchronousErrorHandling:!1,useDeprecatedNextContext:!1},Mi={setTimeout(i,t,...e){const{delegate:n}=Mi;return n?.setTimeout?n.setTimeout(i,t,...e):setTimeout(i,t,...e)},clearTimeout(i){const{delegate:t}=Mi;return(t?.clearTimeout||clearTimeout)(i)},delegate:void 0};function Ci(i){Mi.setTimeout(()=>{const{onUnhandledError:t}=Hs;if(!t)throw i;t(i)})}function ms(){}const Gs=Pn("C",void 0,void 0);function Pn(i,t,e){return{kind:i,value:t,error:e}}let lr=null;function sc(i){if(Hs.useDeprecatedSynchronousErrorHandling){const t=!lr;if(t&&(lr={errorThrown:!1,error:null}),i(),t){const{errorThrown:e,error:n}=lr;if(lr=null,e)throw n}}else i()}class bl extends Kt{constructor(t){super(),this.isStopped=!1,t?(this.destination=t,yl(t)&&t.add(this)):this.destination=yE}static create(t,e,n){return new aa(t,e,n)}next(t){this.isStopped?jg(function Oo(i){return Pn("N",i,void 0)}(t),this):this._next(t)}error(t){this.isStopped?jg(function $s(i){return Pn("E",void 0,i)}(t),this):(this.isStopped=!0,this._error(t))}complete(){this.isStopped?jg(Gs,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 oa=Function.prototype.bind;function xl(i,t){return oa.call(i,t)}class Na{constructor(t){this.partialObserver=t}next(t){const{partialObserver:e}=this;if(e.next)try{e.next(t)}catch(n){hd(n)}}error(t){const{partialObserver:e}=this;if(e.error)try{e.error(t)}catch(n){hd(n)}else hd(t)}complete(){const{partialObserver:t}=this;if(t.complete)try{t.complete()}catch(e){hd(e)}}}class aa extends bl{constructor(t,e,n){let r;if(super(),ln(t)||!t)r={next:t??void 0,error:e??void 0,complete:n??void 0};else{let s;this&&Hs.useDeprecatedNextContext?(s=Object.create(t),s.unsubscribe=()=>this.unsubscribe(),r={next:t.next&&xl(t.next,s),error:t.error&&xl(t.error,s),complete:t.complete&&xl(t.complete,s)}):r=t}this.destination=new Na(r)}}function hd(i){Hs.useDeprecatedSynchronousErrorHandling?function sa(i){Hs.useDeprecatedSynchronousErrorHandling&&lr&&(lr.errorThrown=!0,lr.error=i)}(i):Ci(i)}function jg(i,t){const{onStoppedNotification:e}=Hs;e&&Mi.setTimeout(()=>e(i,t))}const yE={closed:!0,next:ms,error:function vE(i){throw i},complete:ms},Yg="function"==typeof Symbol&&Symbol.observable||"@@observable";function Ba(i){return i}function t0(i){return 0===i.length?Ba:1===i.length?i[0]:function(e){return i.reduce((n,r)=>r(n),e)}}let Tn=(()=>{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 Rf(i){return i&&i instanceof bl||function xE(i){return i&&ln(i.next)&&ln(i.error)&&ln(i.complete)}(i)&&yl(i)}(e)?e:new aa(e,n,r);return sc(()=>{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=Ua(n))((r,s)=>{const o=new aa({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)}[Yg](){return this}pipe(...e){return t0(e)(this)}toPromise(e){return new(e=Ua(e))((n,r)=>{let s;this.subscribe(o=>s=o,o=>r(o),()=>n(s))})}}return i.create=t=>new i(t),i})();function Ua(i){var t;return null!==(t=i??Hs.Promise)&&void 0!==t?t:Promise}const la=V(i=>function(){i(this),this.name="ObjectUnsubscribedError",this.message="object unsubscribed"});let Re=(()=>{class i extends Tn{constructor(){super(),this.closed=!1,this.currentObservers=null,this.observers=[],this.isStopped=!1,this.hasError=!1,this.thrownError=null}lift(e){const n=new n0(this,this);return n.operator=e,n}_throwIfClosed(){if(this.closed)throw new la}next(e){sc(()=>{if(this._throwIfClosed(),!this.isStopped){this.currentObservers||(this.currentObservers=Array.from(this.observers));for(const n of this.currentObservers)n.next(e)}})}error(e){sc(()=>{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(){sc(()=>{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?Un:(this.currentObservers=null,s.push(e),new Kt(()=>{this.currentObservers=null,Kr(s,e)}))}_checkFinalizedStatuses(e){const{hasError:n,thrownError:r,isStopped:s}=this;n?e.error(r):s&&e.complete()}asObservable(){const e=new Tn;return e.source=this,e}}return i.create=(t,e)=>new n0(t,e),i})();class n0 extends Re{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:Un}}function r0(i){return ln(i?.lift)}function Jn(i){return t=>{if(r0(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 jn(i,t,e,n,r){return new wE(i,t,e,n,r)}class wE extends bl{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 et(i,t){return Jn((e,n)=>{let r=0;e.subscribe(jn(n,s=>{n.next(i.call(t,s,r++))}))})}function ca(i){return this instanceof ca?(this.v=i,this):new ca(i)}function Ff(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 qg(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 e_=i=>i&&"number"==typeof i.length&&"function"!=typeof i;function t_(i){return ln(i?.then)}function c0(i){return ln(i[Yg])}function d0(i){return Symbol.asyncIterator&&ln(i?.[Symbol.asyncIterator])}function u0(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 h0=function n_(){return"function"==typeof Symbol&&Symbol.iterator?Symbol.iterator:"@@iterator"}();function Lf(i){return ln(i?.[h0])}function f0(i){return function Of(i,t,e){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var r,n=e.apply(i,t||[]),s=[];return r=Object.create(("function"==typeof AsyncIterator?AsyncIterator:Object).prototype),a("next"),a("throw"),a("return",function o(m){return function(g){return Promise.resolve(g).then(m,h)}}),r[Symbol.asyncIterator]=function(){return this},r;function a(m,g){n[m]&&(r[m]=function(b){return new Promise(function(v,y){s.push([m,b,v,y])>1||l(m,b)})},g&&(r[m]=g(r[m])))}function l(m,g){try{!function c(m){m.value instanceof ca?Promise.resolve(m.value.v).then(d,h):p(s[0][2],m)}(n[m](g))}catch(b){p(s[0][3],b)}}function d(m){l("next",m)}function h(m){l("throw",m)}function p(m,g){m(g),s.shift(),s.length&&l(s[0][0],s[0][1])}}(this,arguments,function*(){const e=i.getReader();try{for(;;){const{value:n,done:r}=yield ca(e.read());if(r)return yield ca(void 0);yield yield ca(n)}}finally{e.releaseLock()}})}function p0(i){return ln(i?.getReader)}function wr(i){if(i instanceof Tn)return i;if(null!=i){if(c0(i))return function kE(i){return new Tn(t=>{const e=i[Yg]();if(ln(e.subscribe))return e.subscribe(t);throw new TypeError("Provided object does not correctly implement Symbol.observable")})}(i);if(e_(i))return function PE(i){return new Tn(t=>{for(let e=0;e{i.then(e=>{t.closed||(t.next(e),t.complete())},e=>t.error(e)).then(null,Ci)})}(i);if(d0(i))return m0(i);if(Lf(i))return function FE(i){return new Tn(t=>{for(const e of i)if(t.next(e),t.closed)return;t.complete()})}(i);if(p0(i))return function g0(i){return m0(f0(i))}(i)}throw u0(i)}function m0(i){return new Tn(t=>{(function LE(i,t){var e,n,r,s;return function pd(i,t,e,n){return new(e||(e=Promise))(function(s,o){function a(d){try{c(n.next(d))}catch(h){o(h)}}function l(d){try{c(n.throw(d))}catch(h){o(h)}}function c(d){d.done?s(d.value):function r(s){return s instanceof e?s:new e(function(o){o(s)})}(d.value).then(a,l)}c((n=n.apply(i,t||[])).next())})}(this,void 0,void 0,function*(){try{for(e=Ff(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 za(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 Ji(i,t,e=1/0){return ln(t)?Ji((n,r)=>et((s,o)=>t(n,s,r,o))(wr(i(n,r))),e):("number"==typeof t&&(e=t),Jn((n,r)=>function NE(i,t,e,n,r,s,o,a){const l=[];let c=0,d=0,h=!1;const p=()=>{h&&!l.length&&!c&&t.complete()},m=b=>c{s&&t.next(b),c++;let v=!1;wr(e(b,d++)).subscribe(jn(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(jn(t,m,()=>{h=!0,p()})),()=>{a?.()}}(n,r,i,e)))}function _d(i=1/0){return Ji(Ba,i)}const fo=new Tn(i=>i.complete());function Bu(i){return i&&ln(i.schedule)}function r_(i){return i[i.length-1]}function _0(i){return ln(r_(i))?i.pop():void 0}function Uu(i){return Bu(r_(i))?i.pop():void 0}function s_(i,t=0){return Jn((e,n)=>{e.subscribe(jn(n,r=>za(n,i,()=>n.next(r),t),()=>za(n,i,()=>n.complete(),t),r=>za(n,i,()=>n.error(r),t)))})}function o_(i,t=0){return Jn((e,n)=>{n.add(i.schedule(()=>e.subscribe(n),t))})}function a_(i,t){if(!i)throw new Error("Iterable cannot be null");return new Tn(e=>{za(e,t,()=>{const n=i[Symbol.asyncIterator]();za(e,t,()=>{n.next().then(r=>{r.done?e.complete():e.next(r.value)})},0,!0)})})}function Li(i,t){return t?function b0(i,t){if(null!=i){if(c0(i))return function UE(i,t){return wr(i).pipe(o_(t),s_(t))}(i,t);if(e_(i))return function zE(i,t){return new Tn(e=>{let n=0;return t.schedule(function(){n===i.length?e.complete():(e.next(i[n++]),e.closed||this.schedule())})})}(i,t);if(t_(i))return function VE(i,t){return wr(i).pipe(o_(t),s_(t))}(i,t);if(d0(i))return a_(i,t);if(Lf(i))return function HE(i,t){return new Tn(e=>{let n;return za(e,t,()=>{n=i[h0](),za(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)}),()=>ln(n?.return)&&n.return()})}(i,t);if(p0(i))return function y0(i,t){return a_(f0(i),t)}(i,t)}throw u0(i)}(i,t):wr(i)}function Mr(...i){const t=Uu(i),e=function v0(i,t){return"number"==typeof r_(i)?i.pop():t}(i,1/0),n=i;return n.length?1===n.length?wr(n[0]):_d(e)(Li(n,t)):fo}function Nf(i={}){const{connector:t=(()=>new Re),resetOnError:e=!0,resetOnComplete:n=!0,resetOnRefCountZero:r=!0}=i;return s=>{let o,a,l,c=0,d=!1,h=!1;const p=()=>{a?.unsubscribe(),a=void 0},m=()=>{p(),o=l=void 0,d=h=!1},g=()=>{const b=o;m(),b?.unsubscribe()};return Jn((b,v)=>{c++,!h&&!d&&p();const y=l=l??t();v.add(()=>{c--,0===c&&!h&&!d&&(a=vd(g,r))}),y.subscribe(v),!o&&c>0&&(o=new aa({next:M=>y.next(M),error:M=>{h=!0,p(),a=vd(m,e,M),y.error(M)},complete:()=>{d=!0,p(),a=vd(m,n),y.complete()}}),wr(b).subscribe(o))})(s)}}function vd(i,t,...e){if(!0===t)return void i();if(!1===t)return;const n=new aa({next:()=>{n.unsubscribe(),i()}});return wr(t(...e)).subscribe(n)}function li(i){for(let t in i)if(i[t]===li)return t;throw Error("Could not find renamed property on target object.")}function l_(i,t){for(const e in t)t.hasOwnProperty(e)&&!i.hasOwnProperty(e)&&(i[e]=t[e])}function fi(i){if("string"==typeof i)return i;if(Array.isArray(i))return"["+i.map(fi).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 Bf(i,t){return null==i||""===i?null===t?"":t:null==t||""===t?i:i+" "+t}const c_=li({__forward_ref__:li});function Gn(i){return i.__forward_ref__=Gn,i.toString=function(){return fi(this())},i}function Rt(i){return Vu(i)?i():i}function Vu(i){return"function"==typeof i&&i.hasOwnProperty(c_)&&i.__forward_ref__===Gn}function zu(i){return i&&!!i.\u0275providers}const Gu="https://g.co/ng/security#xss";class pe extends Error{constructor(t,e){super(Uf(t,e)),this.code=t}}function Uf(i,t){return`NG0${Math.abs(i)}${t?": "+t.trim():""}`}function Zt(i){return"string"==typeof i?i:null==i?"":String(i)}function Vf(i,t){throw new pe(-201,!1)}function Sn(i,t){null==i&&function ei(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 Xt(i){return{providers:i.providers||[],imports:i.imports||[]}}function zf(i){return d_(i,yd)||d_(i,h_)}function d_(i,t){return i.hasOwnProperty(t)?i[t]:null}function u_(i){return i&&(i.hasOwnProperty(gs)||i.hasOwnProperty(M0))?i[gs]:null}const yd=li({\u0275prov:li}),gs=li({\u0275inj:li}),h_=li({ngInjectableDef:li}),M0=li({ngInjectorDef:li});var kt=(()=>((kt=kt||{})[kt.Default=0]="Default",kt[kt.Host=1]="Host",kt[kt.Self=2]="Self",kt[kt.SkipSelf=4]="SkipSelf",kt[kt.Optional=8]="Optional",kt))();let Hf;function js(i){const t=Hf;return Hf=i,t}function _s(i,t,e){const n=zf(i);return n&&"root"==n.providedIn?void 0===n.value?n.value=n.factory():n.value:e&kt.Optional?null:void 0!==t?t:void Vf(fi(i))}const In=(()=>typeof globalThis<"u"&&globalThis||typeof global<"u"&&global||typeof window<"u"&&window||typeof self<"u"&&typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&self)(),Ml={},Wu="__NG_DI_FLAG__",pi="ngTempTokenPath",Cl="ngTokenPath",f_=/\n/gm,KE="\u0275",Gf="__source";let ju;function bd(i){const t=ju;return ju=i,t}function ZE(i,t=kt.Default){if(void 0===ju)throw new pe(-203,!1);return null===ju?_s(i,void 0,t):ju.get(i,t&kt.Optional?null:void 0,t)}function ee(i,t=kt.Default){return(function C0(){return Hf}()||ZE)(Rt(i),t)}function Pt(i,t=kt.Default){return ee(i,$f(t))}function $f(i){return typeof i>"u"||"number"==typeof i?i:0|(i.optional&&8)|(i.host&&1)|(i.self&&2)|(i.skipSelf&&4)}function Wf(i){const t=[];for(let e=0;e((po=po||{})[po.OnPush=0]="OnPush",po[po.Default=1]="Default",po))(),Ys=(()=>{return(i=Ys||(Ys={}))[i.Emulated=0]="Emulated",i[i.None=2]="None",i[i.ShadowDom=3]="ShadowDom",Ys;var i})();const Ga={},$n=[],Br=li({\u0275cmp:li}),qu=li({\u0275dir:li}),cc=li({\u0275pipe:li}),g_=li({\u0275mod:li}),da=li({\u0275fac:li}),Xu=li({__NG_ELEMENT_ID__:li});let QE=0;function ot(i){return Ha(()=>{const t=mo(i),e={...t,decls:i.decls,vars:i.vars,template:i.template,consts:i.consts||null,ngContentSelectors:i.ngContentSelectors,onPush:i.changeDetection===po.OnPush,directiveDefs:null,pipeDefs:null,dependencies:t.standalone&&i.dependencies||null,getStandaloneInjector:null,data:i.data||{},encapsulation:i.encapsulation||Ys.Emulated,id:"c"+QE++,styles:i.styles||$n,_:null,schemas:i.schemas||null,tView:null};__(e);const n=i.dependencies;return e.directiveDefs=Yf(n,!1),e.pipeDefs=Yf(n,!0),e})}function Ku(i,t,e){const n=i.\u0275cmp;n.directiveDefs=Yf(t,!1),n.pipeDefs=Yf(e,!0)}function JE(i){return Hn(i)||Ur(i)}function wd(i){return null!==i}function nn(i){return Ha(()=>({type:i.type,bootstrap:i.bootstrap||$n,declarations:i.declarations||$n,imports:i.imports||$n,exports:i.exports||$n,transitiveCompileScopes:null,schemas:i.schemas||null,id:i.id||null}))}function jf(i,t){if(null==i)return Ga;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 ve(i){return Ha(()=>{const t=mo(i);return __(t),t})}function Hi(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 Hn(i){return i[Br]||null}function Ur(i){return i[qu]||null}function vs(i){return i[cc]||null}function cr(i,t){const e=i[g_]||null;if(!e&&!0===t)throw new Error(`Type ${fi(i)} does not have '\u0275mod' property.`);return e}function mo(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||$n,viewQuery:i.viewQuery||null,features:i.features||null,setInput:null,findHostDirectiveDefs:null,hostDirectives:null,inputs:jf(i.inputs,t),outputs:jf(i.outputs)}}function __(i){i.features?.forEach(t=>t(i))}function Yf(i,t){if(!i)return null;const e=t?vs:JE;return()=>("function"==typeof i?i():i).map(n=>e(n)).filter(wd)}const $a=0,st=1,fn=2,Ni=3,ys=4,X=5,ue=6,oe=7,Ne=8,Ht=9,Vn=10,_t=11,oi=12,dc=13,E0=14,Sr=15,er=16,Zu=17,No=18,qs=19,Sl=20,ti=21,vi=22,Cd=1,A0=2,qf=7,Xf=8,Wa=9,Bi=10;function bs(i){return Array.isArray(i)&&"object"==typeof i[Cd]}function xs(i){return Array.isArray(i)&&!0===i[Cd]}function Kf(i){return 0!=(4&i.flags)}function Sd(i){return i.componentOffset>-1}function uc(i){return 1==(1&i.flags)}function go(i){return!!i.template}function Qu(i){return 0!=(256&i[fn])}function ja(i,t){return i.hasOwnProperty(da)?i[da]:null}class Ad{constructor(t,e,n){this.previousValue=t,this.currentValue=e,this.firstChange=n}isFirstChange(){return this.firstChange}}function yi(){return Dd}function Dd(i){return i.type.prototype.ngOnChanges&&(i.setInput=Td),Jf}function Jf(){const i=k0(this),t=i?.current;if(t){const e=i.previous;if(e===Ga)i.previous=t;else for(let n in t)e[n]=t[n];i.current=null,this.ngOnChanges(t)}}function Td(i,t,e,n){const r=this.declaredInputs[e],s=k0(i)||function rA(i,t){return i[R0]=t}(i,{previous:Ga,current:null}),o=s.current||(s.current={}),a=s.previous,l=a[r];o[r]=new Ad(l&&l.currentValue,t,a===Ga),i[n]=t}yi.ngInherit=!0;const R0="__ngSimpleChanges__";function k0(i){return i[R0]||null}const Qr=function(i,t,e){},Id="svg";function I(i){for(;Array.isArray(i);)i=i[$a];return i}function hc(i,t){return I(t[i])}function Ei(i,t){return I(t[i.index])}function P0(i,t){return i.data[t]}function kd(i,t){return i[t]}function ws(i,t){const e=t[i];return bs(e)?e:e[$a]}function ep(i){return 64==(64&i[fn])}function El(i,t){return null==t?null:i[t]}function O0(i){i[No]=0}function C_(i,t){i[X]+=t;let e=i,n=i[Ni];for(;null!==n&&(1===t&&1===e[X]||-1===t&&0===e[X]);)n[X]+=t,e=n,n=n[Ni]}const Dt={lFrame:qa(null),bindingsEnabled:!0};function ua(){return Dt.bindingsEnabled}function Se(){return Dt.lFrame.lView}function zn(){return Dt.lFrame.tView}function cn(i){return Dt.lFrame.contextLView=i,i[Ne]}function zt(i){return Dt.lFrame.contextLView=null,i}function Er(){let i=L0();for(;null!==i&&64===i.type;)i=i.parent;return i}function L0(){return Dt.lFrame.currentTNode}function ha(i,t){const e=Dt.lFrame;e.currentTNode=i,e.isParent=t}function S_(){return Dt.lFrame.isParent}function E_(){Dt.lFrame.isParent=!1}function Vr(){const i=Dt.lFrame;let t=i.bindingRootIndex;return-1===t&&(t=i.bindingRootIndex=i.tView.bindingStartIndex),t}function Al(){return Dt.lFrame.bindingIndex++}function Xs(i){const t=Dt.lFrame,e=t.bindingIndex;return t.bindingIndex=t.bindingIndex+i,e}function U0(i,t){const e=Dt.lFrame;e.bindingIndex=e.bindingRootIndex=i,Bo(t)}function Bo(i){Dt.lFrame.currentDirectiveIndex=i}function Ju(i){const t=Dt.lFrame.currentDirectiveIndex;return-1===t?null:i[t]}function Dl(){return Dt.lFrame.currentQueryIndex}function Ms(i){Dt.lFrame.currentQueryIndex=i}function pA(i){const t=i[st];return 2===t.type?t.declTNode:1===t.type?i[ue]:null}function D_(i,t,e){if(e&kt.SkipSelf){let r=t,s=i;for(;!(r=r.parent,null!==r||e&kt.Host||(r=pA(s),null===r||(s=s[Sr],10&r.type))););if(null===r)return!1;t=r,i=s}const n=Dt.lFrame=Pd();return n.currentTNode=t,n.lView=i,!0}function np(i){const t=Pd(),e=i[st];Dt.lFrame=t,t.currentTNode=e.firstChild,t.lView=i,t.tView=e,t.contextLView=i,t.bindingIndex=e.bindingStartIndex,t.inI18n=!1}function Pd(){const i=Dt.lFrame,t=null===i?null:i.child;return null===t?qa(i):t}function qa(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 T_(){const i=Dt.lFrame;return Dt.lFrame=i.parent,i.currentTNode=null,i.lView=null,i}const V0=T_;function Od(){const i=T_();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 qn(){return Dt.lFrame.selectedIndex}function Xa(i){Dt.lFrame.selectedIndex=i}function Ai(){const i=Dt.lFrame;return P0(i.tView,i.selectedIndex)}function Ri(){Dt.lFrame.currentNamespace=Id}function Ka(){!function pc(){Dt.lFrame.currentNamespace=null}()}function Fd(i,t){for(let e=t.directiveStart,n=t.directiveEnd;e=n)break}else t[l]<0&&(i[No]+=65536),(a>11>16&&(3&i[fn])===t){i[fn]+=2048,Qr(4,a,s);try{s.call(a)}finally{Qr(5,a,s)}}}else{Qr(4,a,s);try{s.call(a)}finally{Qr(5,a,s)}}}const fa=-1;class Ld{constructor(t,e,n){this.factory=t,this.resolving=!1,this.canSeeViewProviders=e,this.injectImpl=n}}function P_(i,t,e){let n=0;for(;nt){o=s-1;break}}}for(;s>16}(i),n=t;for(;e>0;)n=n[Sr],e--;return n}let Nd=!0;function ap(i){const t=Nd;return Nd=i,t}const F_=255,j0=5;let Y0=0;const pa={};function nh(i,t){const e=q0(i,t);if(-1!==e)return e;const n=t[st];n.firstCreatePass&&(i.injectorIndex=t.length,ih(n.data,i),ih(t,null),ih(n.blueprint,null));const r=rh(i,t),s=i.injectorIndex;if(op(r)){const o=eh(r),a=th(r,t),l=a[st].data;for(let c=0;c<8;c++)t[s+c]=a[o+c]|l[o+c]}return t[s+8]=r,s}function ih(i,t){i.push(0,0,0,0,0,0,0,0,t)}function q0(i,t){return-1===i.injectorIndex||i.parent&&i.parent.injectorIndex===i.injectorIndex||null===t[i.injectorIndex+8]?-1:i.injectorIndex}function rh(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=oh(r),null===n)return fa;if(e++,r=r[Sr],-1!==n.injectorIndex)return n.injectorIndex|e<<16}return fa}function pn(i,t,e){!function L_(i,t,e){let n;"string"==typeof e?n=e.charCodeAt(0)||0:e.hasOwnProperty(Xu)&&(n=e[Xu]),null==n&&(n=e[Xu]=Y0++);const r=n&F_;t.data[i+(r>>j0)]|=1<=0?t&F_:Ks:t}(e);if("function"==typeof s){if(!D_(t,i,n))return n&kt.Host?X0(r,0,n):Bd(t,e,n,r);try{const o=s(n);if(null!=o||n&kt.Optional)return o;Vf()}finally{V0()}}else if("number"==typeof s){let o=null,a=q0(i,t),l=fa,c=n&kt.Host?t[er][ue]:null;for((-1===a||n&kt.SkipSelf)&&(l=-1===a?rh(i,t):t[a+8],l!==fa&&B_(n,!1)?(o=t[st],a=eh(l),t=th(l,t)):a=-1);-1!==a;){const d=t[st];if(cp(s,a,d.data)){const h=wA(a,t,e,o,n,c);if(h!==pa)return h}l=t[a+8],l!==fa&&B_(n,t[st].data[a+8]===c)&&cp(s,a,t)?(o=d,a=eh(l),t=th(l,t)):a=-1}}return r}function wA(i,t,e,n,r,s){const o=t[st],a=o.data[i+8],d=ts(a,o,e,null==n?Sd(a)&&Nd:n!=o&&0!=(3&a.type),r&kt.Host&&s===a);return null!==d?_c(t,o,d,a):pa}function ts(i,t,e,n,r){const s=i.providerIndexes,o=t.data,a=1048575&s,l=i.directiveStart,d=s>>20,p=r?a+d:i.directiveEnd;for(let m=n?a:a+d;m=l&&g.type===e)return m}if(r){const m=o[l];if(m&&go(m)&&m.type===e)return l}return null}function _c(i,t,e,n){let r=i[e];const s=t.data;if(function _A(i){return i instanceof Ld}(r)){const o=r;o.resolving&&function x0(i,t){const e=t?`. Dependency path: ${t.join(" > ")} > ${i}`:"";throw new pe(-200,`Circular dependency in DI detected for ${i}${e}`)}(function Yn(i){return"function"==typeof i?i.name||i.toString():"object"==typeof i&&null!=i&&"function"==typeof i.type?i.type.name||i.type.toString():Zt(i)}(s[e]));const a=ap(o.canSeeViewProviders);o.resolving=!0;const l=o.injectImpl?js(o.injectImpl):null;D_(i,n,kt.Default);try{r=i[e]=o.factory(void 0,s,i,n),t.firstCreatePass&&e>=n.directiveStart&&function es(i,t,e){const{ngOnChanges:n,ngOnInit:r,ngDoCheck:s}=t.type.prototype;if(n){const o=Dd(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&&js(l),ap(a),o.resolving=!1,V0()}}return r}function cp(i,t,e){return!!(e[t+(i>>j0)]&1<{const t=i.prototype.constructor,e=t[da]||sh(t),n=Object.prototype;let r=Object.getPrototypeOf(i.prototype).constructor;for(;r&&r!==n;){const s=r[da]||sh(r);if(s&&s!==e)return s;r=Object.getPrototypeOf(r)}return s=>new s})}function sh(i){return Vu(i)?()=>{const t=sh(Rt(i));return t&&t()}:ja(i)}function oh(i){const t=i[st],e=t.type;return 2===e?t.declTNode:1===e?i[ue]:null}function ma(i){return function xA(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 ga(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,d){const h=l.hasOwnProperty(yc)?l[yc]:Object.defineProperty(l,yc,{value:[]})[yc];for(;h.length<=d;)h.push(null);return(h[d]=h[d]||[]).push(o),l}}return e&&(r.prototype=Object.create(e.prototype)),r.prototype.ngMetadataName=i,r.annotationCls=r,r})}class me{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 Rl(i,t){i.forEach(e=>Array.isArray(e)?Rl(e,t):t(e))}function V_(i,t,e){t>=i.length?i.push(e):i.splice(t,0,e)}function hp(i,t){return t>=i.length-1?i.pop():i.splice(t,1)[0]}function zd(i,t){const e=[];for(let n=0;n=0?i[1|n]=e:(n=~n,function EA(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 Gd(i,t){const e=xc(i,t);if(e>=0)return i[1|e]}function xc(i,t){return function pp(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),Ss=xd(Ud("Optional"),8),_a=xd(Ud("SkipSelf"),4);var Es=(()=>((Es=Es||{})[Es.Important=1]="Important",Es[Es.DashCase=2]="DashCase",Es))();const wp=new Map;let fx=0;const ev="__ngContext__";function Hr(i,t){bs(t)?(i[ev]=t[Sl],function px(i){wp.set(i[Sl],i)}(t)):i[ev]=t}let nv;function iv(i,t){return nv(i,t)}function fh(i){const t=i[Ni];return xs(t)?t[Ni]:t}function rv(i){return Mx(i[dc])}function sv(i){return Mx(i[ys])}function Mx(i){for(;null!==i&&!xs(i);)i=i[ys];return i}function Tr(i,t,e,n,r){if(null!=n){let s,o=!1;xs(n)?s=n:bs(n)&&(o=!0,n=n[$a]);const a=I(n);0===i&&null!==e?null==r?Tx(t,e,a):Cc(t,e,a,r||null,!0):1===i&&null!==e?Cc(t,e,a,r||null,!0):2===i?function hv(i,t,e){const n=Sp(i,t);n&&function qA(i,t,e,n){i.removeChild(t,e,n)}(i,n,t,e)}(t,a,o):3===i&&t.destroyNode(a),null!=s&&function Lx(i,t,e,n,r){const s=e[qf];s!==I(e)&&Tr(t,i,n,s,r);for(let a=Bi;a0&&(i[e-1][ys]=n[ys]);const s=hp(i,Bi+t);!function zA(i,t){mh(i,t,t[_t],2,null,null),t[$a]=null,t[ue]=null}(n[st],n);const o=s[qs];null!==o&&o.detachView(s[st]),n[Ni]=null,n[ys]=null,n[fn]&=-65}return n}function Ex(i,t){if(!(128&t[fn])){const e=t[_t];e.destroyNode&&mh(i,t,e,3,null,null),function $A(i){let t=i[dc];if(!t)return cv(i[st],i);for(;t;){let e=null;if(bs(t))e=t[dc];else{const n=t[Bi];n&&(e=n)}if(!e){for(;t&&!t[ys]&&t!==i;)bs(t)&&cv(t[st],t),t=t[Ni];null===t&&(t=i),bs(t)&&cv(t[st],t),e=t&&t[ys]}t=e}}(t)}}function cv(i,t){if(!(128&t[fn])){t[fn]&=-65,t[fn]|=128,function YA(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===Ys.None||s===Ys.Emulated)return null}return Ei(n,e)}}(i,t.parent,e)}function Cc(i,t,e,n,r){i.insertBefore(t,e,n,r)}function Tx(i,t,e){i.appendChild(t,e)}function Ix(i,t,e,n,r){null!==n?Cc(i,t,e,n,r):Tx(i,t,e)}function Sp(i,t){return i.parentNode(t)}function Rx(i,t,e){return Px(i,t,e)}let dv,Tp,mv,Px=function kx(i,t,e){return 40&i.type?Ei(i,e):null};function ph(i,t,e,n){const r=Ax(i,n,t),s=t[_t],a=Rx(n.parent||t[ue],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 kl{constructor(t){this.changingThisBreaksApplicationSecurity=t}toString(){return`SafeValue must use [property]=binding: ${this.changingThisBreaksApplicationSecurity} (see ${Gu})`}}class nD extends kl{getTypeName(){return"HTML"}}class iD extends kl{getTypeName(){return"Style"}}class rD extends kl{getTypeName(){return"Script"}}class sD extends kl{getTypeName(){return"URL"}}class Rp extends kl{getTypeName(){return"ResourceURL"}}function Qs(i){return i instanceof kl?i.changingThisBreaksApplicationSecurity:i}function ya(i,t){const e=function oD(i){return i instanceof kl&&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 ${Gu})`)}return e===t}class hD{constructor(t){this.inertDocumentHelper=t}getInertBodyElement(t){t=""+t;try{const e=(new window.DOMParser).parseFromString($d(t),"text/html").body;return null===e?this.inertDocumentHelper.getInertBodyElement(t):(e.removeChild(e.firstChild),e)}catch{return null}}}class fD{constructor(t){this.defaultDoc=t,this.inertDocument=this.defaultDoc.implementation.createHTMLDocument("sanitization-inert")}getInertBodyElement(t){const e=this.inertDocument.createElement("template");return e.innerHTML=$d(t),e}}const pD=/^(?!javascript:)(?:[a-z0-9+.-]+:|[^&:\/?#]*(?:[\/?#]|$))/i;function gh(i){return(i=String(i)).match(pD)?i:"unsafe:"+i}function ba(i){const t={};for(const e of i.split(","))t[e]=!0;return t}function Sc(...i){const t={};for(const e of i)for(const n in e)e.hasOwnProperty(n)&&(t[n]=!0);return t}const vv=ba("area,br,col,hr,img,wbr"),yv=ba("colgroup,dd,dt,li,p,tbody,td,tfoot,th,thead,tr"),bv=ba("rp,rt"),xv=Sc(vv,Sc(yv,ba("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")),Sc(bv,ba("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")),Sc(bv,yv)),Wd=ba("background,cite,href,itemtype,longdesc,poster,src,xlink:href"),Gx=Sc(Wd,ba("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"),ba("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")),Mv=ba("script,style,template");class $x{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(!xv.hasOwnProperty(e))return this.sanitizedSomething=!0,!Mv.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();xv.hasOwnProperty(e)&&!vv.hasOwnProperty(e)&&(this.buf.push(""))}chars(t){this.buf.push(Wx(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 gD=/[\uD800-\uDBFF][\uDC00-\uDFFF]/g,_D=/([^\#-~ |!])/g;function Wx(i){return i.replace(/&/g,"&").replace(gD,function(t){return"&#"+(1024*(t.charCodeAt(0)-55296)+(t.charCodeAt(1)-56320)+65536)+";"}).replace(_D,function(t){return"&#"+t.charCodeAt(0)+";"}).replace(//g,">")}let Pp;function jx(i,t){let e=null;try{Pp=Pp||function Hx(i){const t=new fD(i);return function kp(){try{return!!(new window.DOMParser).parseFromString($d(""),"text/html")}catch{return!1}}()?new hD(t):t}(i);let n=t?String(t):"";e=Pp.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=Pp.getInertBodyElement(n)}while(n!==s);return $d((new $x).sanitizeChildren(Cv(e)||e))}finally{if(e){const n=Cv(e)||e;for(;n.firstChild;)n.removeChild(n.firstChild)}}}function Cv(i){return"content"in i&&function vD(i){return i.nodeType===Node.ELEMENT_NODE&&"TEMPLATE"===i.nodeName}(i)?i.content:null}var Xn=(()=>((Xn=Xn||{})[Xn.NONE=0]="NONE",Xn[Xn.HTML=1]="HTML",Xn[Xn.STYLE=2]="STYLE",Xn[Xn.SCRIPT=3]="SCRIPT",Xn[Xn.URL=4]="URL",Xn[Xn.RESOURCE_URL=5]="RESOURCE_URL",Xn))();function Op(i){const t=function bi(){const i=Se();return i&&i[oi]}();return t?t.sanitize(Xn.URL,i)||"":ya(i,"URL")?Qs(i):gh(Zt(i))}const Fp=new me("ENVIRONMENT_INITIALIZER"),Ja=new me("INJECTOR",-1),qx=new me("INJECTOR_DEF_TYPES");class Xx{get(t,e=Ml){if(e===Ml){const n=new Error(`NullInjectorError: No provider for ${fi(t)}!`);throw n.name="NullInjectorError",n}return e}}function MD(...i){return{\u0275providers:Kx(0,i),\u0275fromNgModule:!0}}function Kx(i,...t){const e=[],n=new Set;let r;return Rl(t,s=>{const o=s;Sv(o,e,[],n)&&(r||(r=[]),r.push(o))}),void 0!==r&&Lp(r,e),e}function Lp(i,t){for(let e=0;e{t.push(s)})}}function Sv(i,t,e,n){if(!(i=Rt(i)))return!1;let r=null,s=u_(i);const o=!s&&Hn(i);if(s||o){if(o&&!o.standalone)return!1;r=i}else{const l=i.ngModule;if(s=u_(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)Sv(c,t,e,n)}}else{if(!s)return!1;{if(null!=s.imports&&!a){let c;n.add(r);try{Rl(s.imports,d=>{Sv(d,t,e,n)&&(c||(c=[]),c.push(d))})}finally{}void 0!==c&&Lp(c,t)}if(!a){const c=ja(r)||(()=>new r);t.push({provide:r,useFactory:c,deps:$n},{provide:qx,useValue:r,multi:!0},{provide:Fp,useValue:()=>ee(r),multi:!0})}const l=s.providers;null==l||a||Np(l,d=>{t.push(d)})}}return r!==i&&void 0!==i.providers}function Np(i,t){for(let e of i)zu(e)&&(e=e.\u0275providers),Array.isArray(e)?Np(e,t):t(e)}const Bp=li({provide:String,useValue:li});function xi(i){return null!==i&&"object"==typeof i&&Bp in i}function Ac(i){return"function"==typeof i}const Av=new me("Set Injector scope."),Up={},SD={};let Dv;function _h(){return void 0===Dv&&(Dv=new Xx),Dv}class eo{}class Vp extends eo{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,Iv(t,o=>this.processProvider(o)),this.records.set(Ja,zo(void 0,this)),r.has("environment")&&this.records.set(eo,zo(void 0,this));const s=this.records.get(Av);null!=s&&"string"==typeof s.value&&this.scopes.add(s.value),this.injectorDefTypes=new Set(this.get(qx.multi,$n,kt.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=bd(this),n=js(void 0);try{return t()}finally{bd(e),js(n)}}get(t,e=Ml,n=kt.Default){this.assertNotDestroyed(),n=$f(n);const r=bd(this),s=js(void 0);try{if(!(n&kt.SkipSelf)){let a=this.records.get(t);if(void 0===a){const l=function DD(i){return"function"==typeof i||"object"==typeof i&&i instanceof me}(t)&&zf(t);a=l&&this.injectableDefInScope(l)?zo(Tv(t),Up):null,this.records.set(t,a)}if(null!=a)return this.hydrate(t,a)}return(n&kt.Self?_h():this.parent).get(t,e=n&kt.Optional&&e===Ml?null:e)}catch(o){if("NullInjectorError"===o.name){if((o[pi]=o[pi]||[]).unshift(fi(t)),r)throw o;return function m_(i,t,e,n){const r=i[pi];throw t[Gf]&&r.unshift(t[Gf]),i.message=function S0(i,t,e,n=null){i=i&&"\n"===i.charAt(0)&&i.charAt(1)==KE?i.slice(2):i;let r=fi(t);if(Array.isArray(t))r=t.map(fi).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):fi(a)))}r=`{${s.join(", ")}}`}return`${e}${n?"("+n+")":""}[${r}]: ${i.replace(f_,"\n ")}`}("\n"+i.message,r,e,n),i[Cl]=r,i[pi]=null,i}(o,t,"R3InjectorError",this.source)}throw o}finally{js(s),bd(r)}}resolveInjectorInitializers(){const t=bd(this),e=js(void 0);try{const n=this.get(Fp.multi,$n,kt.Self);for(const r of n)r()}finally{bd(t),js(e)}}toString(){const t=[],e=this.records;for(const n of e.keys())t.push(fi(n));return`R3Injector[${t.join(", ")}]`}assertNotDestroyed(){if(this._destroyed)throw new pe(205,!1)}processProvider(t){let e=Ac(t=Rt(t))?t:Rt(t&&t.provide);const n=function zp(i){return xi(i)?zo(void 0,i.useValue):zo(As(i),Up)}(t);if(Ac(t)||!0!==t.multi)this.records.get(e);else{let r=this.records.get(e);r||(r=zo(void 0,Up,!0),r.factory=()=>Wf(r.multi),this.records.set(e,r)),e=t,r.multi.push(t)}this.records.set(e,n)}hydrate(t,e){return e.value===Up&&(e.value=SD,e.value=e.factory()),"object"==typeof e.value&&e.value&&function AD(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=Rt(t.providedIn);return"string"==typeof e?"any"===e||this.scopes.has(e):this.injectorDefTypes.has(e)}}function Tv(i){const t=zf(i),e=null!==t?t.factory:ja(i);if(null!==e)return e;if(i instanceof me)throw new pe(204,!1);if(i instanceof Function)return function Zx(i){const t=i.length;if(t>0)throw zd(t,"?"),new pe(204,!1);const e=function $u(i){return i&&(i[yd]||i[h_])||null}(i);return null!==e?()=>e.factory(i):()=>new i}(i);throw new pe(204,!1)}function As(i,t,e){let n;if(Ac(i)){const r=Rt(i);return ja(r)||Tv(r)}if(xi(i))n=()=>Rt(i.useValue);else if(function Ev(i){return!(!i||!i.useFactory)}(i))n=()=>i.useFactory(...Wf(i.deps||[]));else if(function ki(i){return!(!i||!i.useExisting)}(i))n=()=>ee(Rt(i.useExisting));else{const r=Rt(i&&(i.useClass||i.provide));if(!function ED(i){return!!i.deps}(i))return ja(r)||Tv(r);n=()=>new r(...Wf(i.deps))}return n}function zo(i,t,e=!1){return{factory:i,value:t,multi:e?[]:void 0}}function Iv(i,t){for(const e of i)Array.isArray(e)?Iv(e,t):e&&zu(e)?Iv(e.\u0275providers,t):t(e)}class TD{}class Rv{}class yo{resolveComponentFactory(t){throw function el(i){const t=Error(`No component factory found for ${fi(i)}. Did you add it to @NgModule.entryComponents?`);return t.ngComponent=i,t}(t)}}let Ol=(()=>{class i{}return i.NULL=new yo,i})();function RD(){return On(Er(),Se())}function On(i,t){return new pt(Ei(i,t))}let pt=(()=>{class i{constructor(e){this.nativeElement=e}}return i.__NG_ELEMENT_ID__=RD,i})();function Qx(i){return i instanceof pt?i.nativeElement:i}class Fl{}let tl=(()=>{class i{}return i.__NG_ELEMENT_ID__=()=>function kD(){const i=Se(),e=ws(Er().index,i);return(bs(e)?e:i)[_t]}(),i})(),PD=(()=>{class i{}return i.\u0275prov=Ie({token:i,providedIn:"root",factory:()=>null}),i})();class Dc{constructor(t){this.full=t,this.major=t.split(".")[0],this.minor=t.split(".")[1],this.patch=t.split(".").slice(2).join(".")}}const OD=new Dc("15.2.10"),kv={},Pv="ngOriginalError";function Ov(i){return i[Pv]}class nl{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&&Ov(t);for(;e&&Ov(e);)e=Ov(e);return e||null}}function il(i){return i instanceof Function?i():i}function ew(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 tw="ng-template";function HD(i,t,e){let n=0,r=!0;for(;ns?"":r[h+1].toLowerCase();const m=8&n?p:null;if(m&&-1!==ew(m,c,0)||2&n&&c!==p){if(Ho(n))return!1;o=!0}}}}else{if(!o&&!Ho(n)&&!Ho(l))return!1;if(o&&Ho(l))continue;o=!1,n=l|1&n}}return Ho(n)||o}function Ho(i){return 0==(1&i)}function nw(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&&!Ho(o)&&(t+=Tc(s,r),r=""),n=o,s=s||!Ho(n);e++}return""!==r&&(t+=Tc(s,r)),t}const sn={};function G(i){Uv(zn(),Se(),qn()+i,!1)}function Uv(i,t,e,n){if(!n)if(3==(3&t[fn])){const s=i.preOrderCheckHooks;null!==s&&ip(t,s,e)}else{const s=i.preOrderHooks;null!==s&&rp(t,s,0,e)}Xa(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||$n,MD(i)];return n=n||("object"==typeof i?void 0:fi(i)),new Vp(s,t||_h(),n||null,r)}let Gi=(()=>{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=Ml,i.NULL=new Xx,i.\u0275prov=Ie({token:i,providedIn:"any",factory:()=>ee(Ja)}),i.__NG_ELEMENT_ID__=-1,i})();function E(i,t=kt.Default){const e=Se();return null===e?ee(i,t):N_(Er(),e,Rt(i),t)}function bo(){throw new Error("invalid")}function hw(i,t){const e=i.contentQueries;if(null!==e)for(let n=0;nvi&&Uv(i,t,vi,!1),Qr(o?2:0,r),e(n,r)}finally{Xa(s),Qr(o?3:1,r)}}function qv(i,t,e){if(Kf(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,sn),r)}function be(i,t,e,n,r,s){const o=Ei(i,t);!function qe(i,t,e,n,r,s,o){if(null==s)i.removeAttribute(t,r,e);else{const a=null==o?Zt(s):o(s,n||"",r);i.setAttribute(t,r,a,e)}}(t[_t],o,s,i.value,e,n,r)}function gt(i,t,e,n,r,s){const o=s[t];if(null!==o){const a=n.setInput;for(let l=0;l0&&rs(e)}}function rs(i){for(let n=rv(i);null!==n;n=sv(n))for(let r=Bi;r0&&rs(s)}const e=i[st].components;if(null!==e)for(let n=0;n0&&rs(r)}}function ss(i,t){const e=ws(t,i),n=e[st];(function no(i,t){for(let e=t.length;e-1&&(lv(t,n),hp(e,n))}this._attachedToViewContainer=!1}Ex(this._lView[st],this._lView)}onDestroy(t){mw(this._lView[st],this._lView,null,t)}markForCheck(){Ts(this._cdRefInjectingView||this._lView)}detach(){this._lView[fn]&=-65}reattach(){this._lView[fn]|=64}detectChanges(){xo(this._lView[st],this._lView,this.context)}checkNoChanges(){}attachToViewContainerRef(){if(this._appRef)throw new pe(902,!1);this._attachedToViewContainer=!0}detachFromAppRef(){this._appRef=null,function GA(i,t){mh(i,t,t[_t],2,null,null)}(this._lView[st],this._lView)}attachToAppRef(t){if(this._attachedToViewContainer)throw new pe(902,!1);this._appRef=t}}class p$ extends Jv{constructor(t){super(t),this._view=t}detectChanges(){const t=this._view;xo(t[st],t,t[Ne],!1)}checkNoChanges(){}get context(){return null}}class jF extends Ol{constructor(t){super(),this.ngModule=t}resolveComponentFactory(t){const e=Hn(t);return new ey(e,this.ngModule)}}function YF(i){const t=[];for(let e in i)i.hasOwnProperty(e)&&t.push({propName:i[e],templateName:e});return t}class g${constructor(t,e){this.injector=t,this.parentInjector=e}get(t,e,n){n=$f(n);const r=this.injector.get(t,kv,n);return r!==kv||e===kv?r:this.parentInjector.get(t,e,n)}}class ey extends Rv{get inputs(){return YF(this.componentDef.inputs)}get outputs(){return YF(this.componentDef.outputs)}constructor(t,e){super(),this.componentDef=t,this.ngModule=e,this.componentType=t.type,this.selector=function KD(i){return i.map(XD).join(",")}(t.selectors),this.ngContentSelectors=t.ngContentSelectors?t.ngContentSelectors:[],this.isBoundToModule=!!e}create(t,e,n,r){let s=(r=r||this.ngModule)instanceof eo?r:r?.injector;s&&null!==this.componentDef.getStandaloneInjector&&(s=this.componentDef.getStandaloneInjector(s)||s);const o=s?new g$(t,s):t,a=o.get(Fl,null);if(null===a)throw new pe(407,!1);const l=o.get(PD,null),c=a.createRenderer(null,this.componentDef),d=this.componentDef.selectors[0][0]||"div",h=n?function y1(i,t,e){return i.selectRootElement(t,e===Ys.ShadowDom)}(c,n,this.componentDef.encapsulation):Cp(c,d,function m$(i){const t=i.toLowerCase();return"svg"===t?Id:"math"===t?"math":null}(d)),p=this.componentDef.onPush?288:272,m=Zv(0,null,null,1,0,null,null,null,null,null),g=vh(null,m,null,p,null,null,a,c,l,o,null);let b,v;np(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 v$(i,t){const e=i[st],n=vi;return i[n]=t,Xd(e,n,2,"#host",null)}(g,h),F=function y$(i,t,e,n,r,s,o,a){const l=r[st];!function b$(i,t,e,n){for(const r of i)t.mergedAttrs=gc(t.mergedAttrs,r.hostAttrs);null!==t.mergedAttrs&&(yw(t,t.mergedAttrs,!0),null!==e&&Bx(n,e,t))}(n,i,t,o);const c=s.createRenderer(t,e),d=vh(r,pw(e),null,e.onPush?32:16,r[i.index],i,s,c,a||null,null,null);return l.firstCreatePass&&P(l,i,n.length-1),Di(r,d),r[i.index]=d}(C,h,y,M,g,a,c);v=P0(m,vi),h&&function w$(i,t,e,n){if(n)P_(i,e,["ng-version",OD.full]);else{const{attrs:r,classes:s}=function ZD(i){const t=[],e=[];let n=1,r=2;for(;n0&&Nx(i,e,s.join(" "))}}(c,y,h,n),void 0!==e&&function M$(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=gc(r.hostAttrs,e=gc(e,r.hostAttrs))}}(n)}function T1(i){return i===Ga?{}:i===$n?[]:i}function E$(i,t){const e=i.viewQuery;i.viewQuery=e?(n,r)=>{t(n,r),e(n,r)}:t}function A$(i,t){const e=i.contentQueries;i.contentQueries=e?(n,r,s)=>{t(n,r,s),e(n,r,s)}:t}function D$(i,t){const e=i.hostBindings;i.hostBindings=e?(n,r)=>{t(n,r),e(n,r)}:t}function xw(i){return!!I1(i)&&(Array.isArray(i)||!(i instanceof Map)&&Symbol.iterator in i)}function I1(i){return null!==i&&("function"==typeof i||"object"==typeof i)}function Ll(i,t,e){return i[t]=e}function Is(i,t,e){return!Object.is(i[t],e)&&(i[t]=e,!0)}function xh(i,t,e,n){const r=Is(i,t,e);return Is(i,t+1,n)||r}function St(i,t,e,n){const r=Se();return Is(r,Al(),t)&&(zn(),be(Ai(),r,i,t,e,n)),St}function $p(i,t,e,n){return Is(i,Al(),e)?t+Zt(e)+n:sn}function Wp(i,t,e,n,r,s){const a=xh(i,function Ya(){return Dt.lFrame.bindingIndex}(),e,r);return Xs(2),a?t+Zt(e)+n+Zt(r)+s:sn}function fe(i,t,e,n,r,s,o,a){const l=Se(),c=zn(),d=i+vi,h=c.firstCreatePass?function B$(i,t,e,n,r,s,o,a,l){const c=t.consts,d=Xd(t,i,4,o||null,El(c,a));Qv(t,e,d,El(c,l)),Fd(t,d);const h=d.tView=Zv(2,d,n,r,s,t.directiveRegistry,t.pipeRegistry,null,t.schemas,c);return null!==t.queries&&(t.queries.template(t,d),h.queries=t.queries.embeddedTView(d)),d}(d,c,l,t,e,n,r,s,o):c.data[d];ha(h,!1);const p=l[_t].createComment("");ph(c,l,p,h),Hr(p,l),Di(l,l[d]=mn(p,l,p,h)),uc(h)&&Xv(c,l,h),null!=o&&Kv(l,h,a)}function tr(i){return kd(function hA(){return Dt.lFrame.contextLView}(),vi+i)}function U(i,t,e){const n=Se();return Is(n,Al(),t)&&to(zn(),Ai(),n,i,t,n[_t],e,!1),U}function R1(i,t,e,n,r){const o=r?"class":"style";D1(i,e,t.inputs[o],o,n)}function W(i,t,e,n){const r=Se(),s=zn(),o=vi+i,a=r[_t],l=s.firstCreatePass?function V$(i,t,e,n,r,s){const o=t.consts,l=Xd(t,i,2,n,El(o,r));return Qv(t,e,l,El(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]=Cp(a,t,function H0(){return Dt.lFrame.currentNamespace}()),d=uc(l);return ha(l,!0),Bx(a,c,l),32!=(32&l.flags)&&ph(s,r,c,l),0===function aA(){return Dt.lFrame.elementDepthCount}()&&Hr(c,r),function lA(){Dt.lFrame.elementDepthCount++}(),d&&(Xv(s,r,l),qv(s,l,r)),null!==n&&Kv(r,l),W}function q(){let i=Er();S_()?E_():(i=i.parent,ha(i,!1));const t=i;!function cA(){Dt.lFrame.elementDepthCount--}();const e=zn();return e.firstCreatePass&&(Fd(e,i),Kf(i)&&e.queries.elementEnd(i)),null!=t.classesWithoutHost&&function vA(i){return 0!=(8&i.flags)}(t)&&R1(e,t,Se(),t.classesWithoutHost,!0),null!=t.stylesWithoutHost&&function k_(i){return 0!=(16&i.flags)}(t)&&R1(e,t,Se(),t.stylesWithoutHost,!1),q}function ke(i,t,e,n){return W(i,t,e,n),q(),ke}function Gr(i,t,e){const n=Se(),r=zn(),s=i+vi,o=r.firstCreatePass?function z$(i,t,e,n,r){const s=t.consts,o=El(s,n),a=Xd(t,i,8,"ng-container",o);return null!==o&&yw(a,o,!0),Qv(t,e,a,El(s,r)),null!==t.queries&&t.queries.elementStart(t,a),a}(s,r,n,t,e):r.data[s];ha(o,!0);const a=n[s]=n[_t].createComment("");return ph(r,n,a,o),Hr(a,n),uc(o)&&(Xv(r,n,o),qv(r,o,n)),null!=e&&Kv(n,o),Gr}function $r(){let i=Er();const t=zn();return S_()?E_():(i=i.parent,ha(i,!1)),t.firstCreatePass&&(Fd(t,i),Kf(i)&&t.queries.elementEnd(i)),$r}function ny(i,t,e){return Gr(i,t,e),$r(),ny}function mi(){return Se()}function iy(i){return!!i&&"function"==typeof i.then}function aL(i){return!!i&&"function"==typeof i.subscribe}const k1=aL;function Ue(i,t,e,n){const r=Se(),s=zn(),o=Er();return lL(s,r,r[_t],o,i,t,n),Ue}function P1(i,t){const e=Er(),n=Se(),r=zn();return lL(r,n,$F(Ju(r.data),e,n),e,i,t),P1}function lL(i,t,e,n,r,s,o){const a=uc(n),c=i.firstCreatePass&&GF(i),d=t[Ne],h=HF(t);let p=!0;if(3&n.type||o){const b=Ei(n,t),v=o?o(b):b,y=h.length,M=o?C=>o(I(C[n.index])):n.index;let x=null;if(!o&&a&&(x=function H$(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=dL(n,t,d,s,!1);const C=e.listen(v,r,s);h.push(s,C),c&&c.push(r,M,y,y+1)}}else s=dL(n,t,d,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?ws(i.index,t):t);let l=cL(t,e,n,o),c=s.__ngNextListenerFn__;for(;c;)l=cL(t,e,c,o)&&l,c=c.__ngNextListenerFn__;return r&&!1===l&&(o.preventDefault(),o.returnValue=!1),l}}function he(i=1){return function mA(i){return(Dt.lFrame.contextLView=function z0(i,t){for(;i>0;)t=t[Sr],i--;return t}(i,Dt.lFrame.contextLView))[Ne]}(i)}function G$(i,t){let e=null;const n=function WD(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 L1(i){return 2|i}function wh(i){return(131068&i)>>2}function N1(i,t){return-131069&i|t<<2}function B1(i){return 1|i}function yL(i,t,e,n,r){const s=i[e+1],o=null===t;let a=n?Zd(s):wh(s),l=!1;for(;0!==a&&(!1===l||o);){const d=i[a+1];X$(i[a],t)&&(l=!0,i[a+1]=n?B1(d):L1(d)),a=n?Zd(d):wh(d)}l&&(i[e+1]=n?L1(s):B1(s))}function X$(i,t){return null===i||null==t||(Array.isArray(i)?i[1]:i)===t||!(!Array.isArray(i)||"string"!=typeof t)&&xc(i,t)>=0}const Ir={textEnd:0,key:0,keyEnd:0,value:0,valueEnd:0};function bL(i){return i.substring(Ir.key,Ir.keyEnd)}function xL(i,t){const e=Ir.textEnd;return e===t?-1:(t=Ir.keyEnd=function J$(i,t,e){for(;t32;)t++;return t}(i,Ir.key=t,e),Qp(i,t,e))}function Qp(i,t,e){for(;t=0;e=xL(t,e))Cs(i,bL(t),!0)}function rl(i,t,e,n){const r=Se(),s=zn(),o=Xs(2);s.firstUpdatePass&&AL(s,i,o,n),t!==sn&&Is(r,o,t)&&TL(s,s.data[qn()],r,r[_t],i,r[o+1]=function uW(i,t){return null==i||""===i||("string"==typeof t?i+=t:"object"==typeof i&&(i=fi(Qs(i)))),i}(t,e),n,o)}function EL(i,t){return t>=i.expandoStartIndex}function AL(i,t,e,n){const r=i.data;if(null===r[e+1]){const s=r[qn()],o=EL(i,e);RL(s,n)&&null===t&&!o&&(t=!1),t=function rW(i,t,e,n){const r=Ju(i);let s=n?t.residualClasses:t.residualStyles;if(null===r)0===(n?t.classBindings:t.styleBindings)&&(e=ry(e=U1(null,i,t,e,n),t.attrs,n),s=null);else{const o=t.directiveStylingLast;if(-1===o||i[o]!==r)if(e=U1(r,i,t,e,n),null===s){let l=function sW(i,t,e){const n=e?t.classBindings:t.styleBindings;if(0!==wh(n))return i[Zd(n)]}(i,t,n);void 0!==l&&Array.isArray(l)&&(l=U1(null,i,t,l[1],n),l=ry(l,t.attrs,n),function oW(i,t,e,n){i[Zd(e?t.classBindings:t.styleBindings)]=n}(i,t,n,l))}else s=function aW(i,t,e){let n;const r=t.directiveEnd;for(let s=1+t.directiveStylingLast;s0)&&(c=!0)):d=e,r)if(0!==l){const p=Zd(i[a+1]);i[n+1]=Mw(p,a),0!==p&&(i[p+1]=N1(i[p+1],n)),i[a+1]=function W$(i,t){return 131071&i|t<<17}(i[a+1],n)}else i[n+1]=Mw(a,0),0!==a&&(i[a+1]=N1(i[a+1],n)),a=n;else i[n+1]=Mw(l,0),0===a?a=n:i[l+1]=N1(i[l+1],n),l=n;c&&(i[n+1]=L1(i[n+1])),yL(i,d,n,!0),yL(i,d,n,!1),function q$(i,t,e,n,r){const s=r?i.residualClasses:i.residualStyles;null!=s&&"string"==typeof t&&xc(s,t)>=0&&(e[n+1]=B1(e[n+1]))}(t,d,i,n,s),o=Mw(a,l),s?t.classBindings=o:t.styleBindings=o}(r,s,t,e,o,n)}}function U1(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),d=c?l[1]:l,h=null===d;let p=e[r+1];p===sn&&(p=h?$n:void 0);let m=h?Gd(p,n):d===n?p:void 0;if(c&&!Cw(m)&&(m=Gd(l,n)),Cw(m)&&(a=m,o))return a;const g=i[r+1];r=o?Zd(g):wh(g)}if(null!==t){let l=s?t.residualClasses:t.residualStyles;null!=l&&(a=Gd(l,n))}return a}function Cw(i){return void 0!==i}function RL(i,t){return 0!=(i.flags&(t?8:16))}function Ge(i,t=""){const e=Se(),n=zn(),r=i+vi,s=n.firstCreatePass?Xd(n,r,1,t,null):n.data[r],o=e[r]=function ov(i,t){return i.createText(t)}(e[_t],t);ph(n,e,o,s),ha(s,!1)}function _i(i){return ir("",i,""),_i}function ir(i,t,e){const n=Se(),r=$p(n,i,t,e);return r!==sn&&Ic(n,qn(),r),ir}function Jp(i,t,e,n,r){const s=Se(),o=Wp(s,i,t,e,n,r);return o!==sn&&Ic(s,qn(),o),Jp}function UL(i,t,e){!function sl(i,t,e,n){const r=zn(),s=Xs(2);r.firstUpdatePass&&AL(r,null,s,n);const o=Se();if(e!==sn&&Is(o,s,e)){const a=r.data[qn()];if(RL(a,n)&&!EL(r,s)){let l=n?a.classesWithoutHost:a.stylesWithoutHost;null!==l&&(e=Bf(l,e||"")),R1(r,a,o,e,n)}else!function dW(i,t,e,n,r,s,o,a){r===sn&&(r=$n);let l=0,c=0,d=0((it=it||{})[it.LocaleId=0]="LocaleId",it[it.DayPeriodsFormat=1]="DayPeriodsFormat",it[it.DayPeriodsStandalone=2]="DayPeriodsStandalone",it[it.DaysFormat=3]="DaysFormat",it[it.DaysStandalone=4]="DaysStandalone",it[it.MonthsFormat=5]="MonthsFormat",it[it.MonthsStandalone=6]="MonthsStandalone",it[it.Eras=7]="Eras",it[it.FirstDayOfWeek=8]="FirstDayOfWeek",it[it.WeekendRange=9]="WeekendRange",it[it.DateFormat=10]="DateFormat",it[it.TimeFormat=11]="TimeFormat",it[it.DateTimeFormat=12]="DateTimeFormat",it[it.NumberSymbols=13]="NumberSymbols",it[it.NumberFormats=14]="NumberFormats",it[it.CurrencyCode=15]="CurrencyCode",it[it.CurrencySymbol=16]="CurrencySymbol",it[it.CurrencyName=17]="CurrencyName",it[it.Currencies=18]="Currencies",it[it.Directionality=19]="Directionality",it[it.PluralCase=20]="PluralCase",it[it.ExtraData=21]="ExtraData",it))();const tm="en-US";let ZL=tm;function H1(i,t,e,n,r){if(i=Rt(i),Array.isArray(i))for(let s=0;s>20;if(Ac(i)||!i.multi){const m=new Ld(l,r,E),g=$1(a,t,r?d:d+p,h);-1===g?(pn(nh(c,o),s,a),G1(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=$1(a,t,d+p,h),g=$1(a,t,d,d+p),v=g>=0&&e[g];if(r&&!v||!r&&!(m>=0&&e[m])){pn(nh(c,o),s,a);const y=function Dj(i,t,e,n,r){const s=new Ld(i,e,E);return s.multi=[],s.index=t,s.componentProviders=0,M2(s,r,n&&!e),s}(r?Aj:Ej,e.length,r,n,l);!r&&v&&(e[g].providerFactory=y),G1(s,i,t.length,0),t.push(a),c.directiveStart++,c.directiveEnd++,r&&(c.providerIndexes+=1048576),e.push(y),o.push(y)}else G1(s,i,m>-1?m:g,M2(e[r?g:m],l,!r&&n));!r&&n&&v&&e[g].componentProviders++}}}function G1(i,t,e,n){const r=Ac(t),s=function CD(i){return!!i.useClass}(t);if(r||s){const l=(s?Rt(t.useClass):t).prototype.ngOnDestroy;if(l){const c=i.destroyHooks||(i.destroyHooks=[]);if(!r&&t.multi){const d=c.indexOf(e);-1===d?c.push(e,[n,l]):c[d+1].push(n,l)}else c.push(e,l)}}}function M2(i,t,e){return e&&i.componentProviders++,i.multi.push(t)-1}function $1(i,t,e,n){for(let r=e;r{e.providersResolver=(n,r)=>function Sj(i,t,e){const n=zn();if(n.firstCreatePass){const r=go(i);H1(e,n.data,n.blueprint,r,!0),H1(t,n.data,n.blueprint,r,!1)}}(n,r?r(i):i,t)}}class nm{}class C2{}class S2 extends nm{constructor(t,e){super(),this._parent=e,this._bootstrapComponents=[],this.destroyCbs=[],this.componentFactoryResolver=new jF(this);const n=cr(t);this._bootstrapComponents=il(n.bootstrap),this._r3Injector=ow(t,e,[{provide:nm,useValue:this},{provide:Ol,useValue:this.componentFactoryResolver}],fi(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 j1 extends C2{constructor(t){super(),this.moduleType=t}create(t){return new S2(this.moduleType,t)}}class Ij extends nm{constructor(t,e,n){super(),this.componentFactoryResolver=new jF(this),this.instance=null;const r=new Vp([...t,{provide:nm,useValue:this},{provide:Ol,useValue:this.componentFactoryResolver}],e||_h(),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 Ij(i,t,e).injector}let Rj=(()=>{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=Kx(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(ee(eo))}),i})();function Y1(i){i.getStandaloneInjector=t=>t.get(Rj).getOrCreateStandaloneInjector(i)}function ro(i,t,e){const n=Vr()+i,r=Se();return r[n]===sn?Ll(r,n,e?t.call(e):t()):function ty(i,t){return i[t]}(r,n)}function im(i,t,e,n){return P2(Se(),Vr(),i,t,e,n)}function k2(i,t,e,n,r,s,o){return function L2(i,t,e,n,r,s,o,a,l){const c=t+e;return function xa(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)?Ll(i,c+4,l?n.call(l,r,s,o,a):n(r,s,o,a)):dy(i,c+4)}(Se(),Vr(),i,t,e,n,r,s,o)}function dy(i,t){const e=i[t];return e===sn?void 0:e}function P2(i,t,e,n,r,s){const o=t+e;return Is(i,o,r)?Ll(i,o+1,s?n.call(s,r):n(r)):dy(i,o+1)}function $t(i,t){const e=zn();let n;const r=i+vi;e.firstCreatePass?(n=function Yj(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=ja(n.type)),o=js(E);try{const a=ap(!1),l=s();return ap(a),function U$(i,t,e,n){e>=i.data.length&&(i.data[e]=null,i.blueprint[e]=null),t[e]=n}(e,Se(),r,l),l}finally{js(o)}}function Qt(i,t,e){const n=i+vi,r=Se(),s=kd(r,n);return uy(r,n)?P2(r,Vr(),t,s.transform,e,s):s.transform(e)}function X1(i,t,e,n){const r=i+vi,s=Se(),o=kd(s,r);return uy(s,r)?function O2(i,t,e,n,r,s,o){const a=t+e;return xh(i,a,r,s)?Ll(i,a+2,o?n.call(o,r,s):n(r,s)):dy(i,a+2)}(s,Vr(),t,o.transform,e,n,o):o.transform(e,n)}function uy(i,t){return i[st].data[t].pure}function K1(i){return t=>{setTimeout(i,void 0,t)}}const We=class Zj extends Re{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=K1(s),r&&(r=K1(r)),o&&(o=K1(o)));const a=super.subscribe({next:r,error:s,complete:o});return t instanceof Kt&&t.add(a),a}};function Qj(){return this._results[Symbol.iterator]()}class rm{get changes(){return this._changes||(this._changes=new We)}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=rm.prototype;e[Symbol.iterator]||(e[Symbol.iterator]=Qj)}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 Ar(i){return i.flat(Number.POSITIVE_INFINITY)}(t);(this._changesDetected=!function up(i,t,e){if(i.length!==t.length)return!1;for(let n=0;n{class i{}return i.__NG_ELEMENT_ID__=t6,i})();const Jj=wo,e6=class extends Jj{constructor(t,e,n){super(),this._declarationLView=t,this._declarationTContainer=e,this.elementRef=n}createEmbeddedView(t,e){const n=this._declarationTContainer.tView,r=vh(this._declarationLView,n,t,16,null,n.declTNode,null,null,null,null,e||null);r[Zu]=this._declarationLView[this._declarationTContainer.index];const o=this._declarationLView[qs];return null!==o&&(r[qs]=o.createEmbeddedView(n)),bh(n,r,t),new Jv(r)}};function t6(){return Rw(Er(),Se())}function Rw(i,t){return 4&i.type?new e6(t,i,On(i,t)):null}let Wr=(()=>{class i{}return i.__NG_ELEMENT_ID__=n6,i})();function n6(){return V2(Er(),Se())}const r6=Wr,B2=class extends r6{constructor(t,e,n){super(),this._lContainer=t,this._hostTNode=e,this._hostLView=n}get element(){return On(this._hostTNode,this._hostLView)}get injector(){return new vc(this._hostTNode,this._hostLView)}get parentInjector(){const t=rh(this._hostTNode,this._hostLView);if(op(t)){const e=th(t,this._hostLView),n=eh(t);return new vc(e[st].data[n+8],e)}return new vc(null,this._hostLView)}clear(){for(;this.length>0;)this.remove(this.length-1)}get(t){const e=U2(this._lContainer);return null!==e&&e[t]||null}get length(){return this._lContainer.length-Bi}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 ah(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 ey(Hn(t)),c=n||this.parentInjector;if(!s&&null==l.ngModule){const p=(o?c:this.parentInjector).get(eo,null);p&&(s=p)}const d=l.create(c,r,void 0,s);return this.insert(d.hostView,a),d}insert(t,e){const n=t._lView,r=n[st];if(function oA(i){return xs(i[Ni])}(n)){const d=this.indexOf(t);if(-1!==d)this.detach(d);else{const h=n[Ni],p=new B2(h,h[ue],h[Ni]);p.detach(p.indexOf(t))}}const s=this._adjustIndex(e),o=this._lContainer;!function av(i,t,e,n){const r=Bi+n,s=e.length;n>0&&(e[r-1][ys]=t),n0)n.push(o[a/2]);else{const c=s[a+1],d=t[-l];for(let h=Bi;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)(ee(Ow,8))},i.\u0275prov=Ie({token:i,factory:i.\u0275fac,providedIn:"root"}),i})();const am=new me("AppId",{providedIn:"root",factory:function cN(){return`${lT()}${lT()}${lT()}`}});function lT(){return String.fromCharCode(97+Math.floor(25*Math.random()))}const dN=new me("Platform Initializer"),cT=new me("Platform ID",{providedIn:"platform",factory:()=>"unknown"}),Rr=new me("AnimationModuleType");let I6=(()=>{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 Vl=new me("LocaleId",{providedIn:"root",factory:()=>Pt(Vl,kt.Optional|kt.SkipSelf)||function R6(){return typeof $localize<"u"&&$localize.locale||tm}()});class P6{constructor(t,e){this.ngModuleFactory=t,this.componentFactories=e}}let uN=(()=>{class i{compileModuleSync(e){return new j1(e)}compileModuleAsync(e){return Promise.resolve(this.compileModuleSync(e))}compileModuleAndAllComponentsSync(e){const n=this.compileModuleSync(e),s=il(cr(e).declarations).reduce((o,a)=>{const l=Hn(a);return l&&o.push(new ey(l)),o},[]);return new P6(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 L6=(()=>Promise.resolve(0))();function dT(i){typeof Zone>"u"?L6.then(()=>{i&&i.apply(null,null)}):Zone.current.scheduleMicroTask("scheduleMicrotask",i)}class ht{constructor({enableLongStackTrace:t=!1,shouldCoalesceEventChangeDetection:e=!1,shouldCoalesceRunChangeDetection:n=!1}){if(this.hasPendingMacrotasks=!1,this.hasPendingMicrotasks=!1,this.isStable=!0,this.onUnstable=new We(!1),this.onMicrotaskEmpty=new We(!1),this.onStable=new We(!1),this.onError=new We(!1),typeof Zone>"u")throw new pe(908,!1);Zone.assertZonePatched();const r=this;r._nesting=0,r._outer=r._inner=Zone.current,Zone.TaskTrackingZoneSpec&&(r._inner=r._inner.fork(new Zone.TaskTrackingZoneSpec)),t&&Zone.longStackTraceZoneSpec&&(r._inner=r._inner.fork(Zone.longStackTraceZoneSpec)),r.shouldCoalesceEventChangeDetection=!n&&e,r.shouldCoalesceRunChangeDetection=n,r.lastRequestAnimationFrameId=-1,r.nativeRequestAnimationFrame=function N6(){let i=In.requestAnimationFrame,t=In.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 V6(i){const t=()=>{!function U6(i){i.isCheckStableRunning||-1!==i.lastRequestAnimationFrameId||(i.lastRequestAnimationFrameId=i.nativeRequestAnimationFrame.call(In,()=>{i.fakeTopEventTask||(i.fakeTopEventTask=Zone.root.scheduleEventTask("fakeTopEventTask",()=>{i.lastRequestAnimationFrameId=-1,hT(i),i.isCheckStableRunning=!0,uT(i),i.isCheckStableRunning=!1},void 0,()=>{},()=>{})),i.fakeTopEventTask.invoke()}),hT(i))}(i)};i._inner=i._inner.fork({name:"angular",properties:{isAngularZone:!0},onInvokeTask:(e,n,r,s,o,a)=>{try{return pN(i),e.invokeTask(r,s,o,a)}finally{(i.shouldCoalesceEventChangeDetection&&"eventTask"===s.type||i.shouldCoalesceRunChangeDetection)&&t(),mN(i)}},onInvoke:(e,n,r,s,o,a,l)=>{try{return pN(i),e.invoke(r,s,o,a,l)}finally{i.shouldCoalesceRunChangeDetection&&t(),mN(i)}},onHasTask:(e,n,r,s)=>{e.hasTask(r,s),n===r&&("microTask"==s.change?(i._hasPendingMicrotasks=s.microTask,hT(i),uT(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(!ht.isInAngularZone())throw new pe(909,!1)}static assertNotInAngularZone(){if(ht.isInAngularZone())throw new pe(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,B6,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 B6={};function uT(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 hT(i){i.hasPendingMicrotasks=!!(i._hasPendingMicrotasks||(i.shouldCoalesceEventChangeDetection||i.shouldCoalesceRunChangeDetection)&&-1!==i.lastRequestAnimationFrameId)}function pN(i){i._nesting++,i.isStable&&(i.isStable=!1,i.onUnstable.emit(null))}function mN(i){i._nesting--,uT(i)}class z6{constructor(){this.hasPendingMicrotasks=!1,this.hasPendingMacrotasks=!1,this.isStable=!0,this.onUnstable=new We,this.onMicrotaskEmpty=new We,this.onStable=new We,this.onError=new We}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 gN=new me(""),Lw=new me("");let mT,fT=(()=>{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,mT||(function H6(i){mT=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:()=>{ht.assertNotInAngularZone(),dT(()=>{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())dT(()=>{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)(ee(ht),ee(pT),ee(Lw))},i.\u0275prov=Ie({token:i,factory:i.\u0275fac}),i})(),pT=(()=>{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 mT?.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 kc=!1;let Qd=null;const _N=new me("AllowMultipleToken"),gT=new me("PlatformDestroyListeners"),vN=new me("appBootstrapListener");class yN{constructor(t,e){this.name=t,this.token=e}}function xN(i,t,e=[]){const n=`Platform: ${t}`,r=new me(n);return(s=[])=>{let o=_T();if(!o||o.injector.get(_N,!1)){const a=[...e,...s,{provide:r,useValue:!0}];i?i(a):function W6(i){if(Qd&&!Qd.get(_N,!1))throw new pe(400,!1);Qd=i;const t=i.get(MN);(function bN(i){const t=i.get(dN,null);t&&t.forEach(e=>e())})(i)}(function wN(i=[],t){return Gi.create({name:t,providers:[{provide:Av,useValue:"platform"},{provide:gT,useValue:new Set([()=>Qd=null])},...i]})}(a,n))}return function Y6(i){const t=_T();if(!t)throw new pe(401,!1);return t}()}}function _T(){return Qd?.get(MN)??null}let MN=(()=>{class i{constructor(e){this._injector=e,this._modules=[],this._destroyListeners=[],this._destroyed=!1}bootstrapModuleFactory(e,n){const r=function SN(i,t){let e;return e="noop"===i?new z6:("zone.js"===i?void 0:i)||new ht(t),e}(n?.ngZone,function CN(i){return{enableLongStackTrace:!1,shouldCoalesceEventChangeDetection:!(!i||!i.ngZoneEventCoalescing)||!1,shouldCoalesceRunChangeDetection:!(!i||!i.ngZoneRunCoalescing)||!1}}(n)),s=[{provide:ht,useValue:r}];return r.run(()=>{const o=Gi.create({providers:s,parent:this.injector,name:e.moduleType.name}),a=e.create(o),l=a.injector.get(nl,null);if(!l)throw new pe(402,!1);return r.runOutsideAngular(()=>{const c=r.onError.subscribe({next:d=>{l.handleError(d)}});a.onDestroy(()=>{Nw(this._modules,a),c.unsubscribe()})}),function EN(i,t,e){try{const n=e();return iy(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 QL(i){Sn(i,"Expected localeId to be defined"),"string"==typeof i&&(ZL=i.toLowerCase().replace(/_/g,"-"))}(a.injector.get(Vl,tm)||tm),this._moduleDoBootstrap(a),a))})})}bootstrapModule(e,n=[]){const r=AN({},n);return function G6(i,t,e){const n=new j1(e);return Promise.resolve(n)}(0,0,e).then(s=>this.bootstrapModuleFactory(s,r))}_moduleDoBootstrap(e){const n=e.injector.get(lm);if(e._bootstrapComponents.length>0)e._bootstrapComponents.forEach(r=>n.bootstrap(r));else{if(!e.instance.ngDoBootstrap)throw new pe(-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 pe(404,!1);this._modules.slice().forEach(n=>n.destroy()),this._destroyListeners.forEach(n=>n());const e=this._injector.get(gT,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)(ee(Gi))},i.\u0275prov=Ie({token:i,factory:i.\u0275fac,providedIn:"platform"}),i})();function AN(i,t){return Array.isArray(t)?t.reduce(AN,i):{...i,...t}}let lm=(()=>{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 Tn(a=>{this._stable=this._zone.isStable&&!this._zone.hasPendingMacrotasks&&!this._zone.hasPendingMicrotasks,this._zone.runOutsideAngular(()=>{a.next(this._stable),a.complete()})}),o=new Tn(a=>{let l;this._zone.runOutsideAngular(()=>{l=this._zone.onStable.subscribe(()=>{ht.assertNotInAngularZone(),dT(()=>{!this._stable&&!this._zone.hasPendingMacrotasks&&!this._zone.hasPendingMicrotasks&&(this._stable=!0,a.next(!0))})})});const c=this._zone.onUnstable.subscribe(()=>{ht.assertInAngularZone(),this._stable&&(this._stable=!1,this._zone.runOutsideAngular(()=>{a.next(!1)}))});return()=>{l.unsubscribe(),c.unsubscribe()}});this.isStable=Mr(s,o.pipe(Nf()))}bootstrap(e,n){const r=e instanceof Rv;if(!this._injector.get(Fw).done){!r&&function Md(i){const t=Hn(i)||Ur(i)||vs(i);return null!==t&&t.standalone}(e);throw new pe(405,kc)}let o;o=r?e:this._injector.get(Ol).resolveComponentFactory(e),this.componentTypes.push(o.componentType);const a=function $6(i){return i.isBoundToModule}(o)?void 0:this._injector.get(nm),c=o.create(Gi.NULL,[],n||o.selector,a),d=c.location.nativeElement,h=c.injector.get(gN,null);return h?.registerApplication(d),c.onDestroy(()=>{this.detachView(c.hostView),Nw(this.components,c),h?.unregisterApplication(d)}),this._loadComponent(c),c}tick(){if(this._runningTick)throw new pe(101,!1);try{this._runningTick=!0;for(let e of this._views)e.detectChanges()}catch(e){this._zone.runOutsideAngular(()=>this._exceptionHandler.handleError(e))}finally{this._runningTick=!1}}attachView(e){const 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(vN,[]);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 pe(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)(ee(ht),ee(eo),ee(nl))},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__=X6,i})();function X6(i){return function K6(i,t,e){if(Sd(i)&&!e){const n=ws(i.index,t);return new Jv(n,n)}return 47&i.type?new Jv(t[er],t):null}(Er(),Se(),16==(16&i))}class kN{constructor(){}supports(t){return xw(t)}create(t){return new n9(t)}}const t9=(i,t)=>t;class n9{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||t9}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 r9(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 PN),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 PN),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 r9{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 s9{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 PN{constructor(){this.map=new Map}put(t){const e=t.trackById;let n=this.map.get(e);n||(n=new s9,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 ON(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 a9(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 a9{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 LN(){return new Vw([new kN])}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||LN()),deps:[[i,new _a,new Ss]]}}find(e){const n=this.factories.find(r=>r.supports(e));if(null!=n)return n;throw new pe(901,!1)}}return i.\u0275prov=Ie({token:i,providedIn:"root",factory:LN}),i})();function NN(){return new fy([new FN])}let fy=(()=>{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||NN()),deps:[[i,new _a,new Ss]]}}find(e){const n=this.factories.find(r=>r.supports(e));if(n)return n;throw new pe(901,!1)}}return i.\u0275prov=Ie({token:i,providedIn:"root",factory:NN}),i})();const d9=xN(null,"core",[]);let u9=(()=>{class i{constructor(e){}}return i.\u0275fac=function(e){return new(e||i)(ee(lm))},i.\u0275mod=nn({type:i}),i.\u0275inj=Xt({}),i})();let wT=null;function Pc(){return wT}class p9{}const Wt=new me("DocumentToken");let MT=(()=>{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 m9(){return ee(BN)}()},providedIn:"platform"}),i})();const g9=new me("Location Initialized");let BN=(()=>{class i extends MT{constructor(e){super(),this._doc=e,this._location=window.location,this._history=window.history}getBaseHrefFromDOM(){return Pc().getBaseHref(this._doc)}onPopState(e){const n=Pc().getGlobalEventTarget(this._doc,"window");return n.addEventListener("popstate",e,!1),()=>n.removeEventListener("popstate",e)}onHashChange(e){const n=Pc().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){UN()?this._history.pushState(e,n,r):this._location.hash=r}replaceState(e,n,r){UN()?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)(ee(Wt))},i.\u0275prov=Ie({token:i,factory:function(){return function _9(){return new BN(ee(Wt))}()},providedIn:"platform"}),i})();function UN(){return!!window.history.pushState}function CT(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 VN(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 Oc(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 Pt(HN)},providedIn:"root"}),i})();const zN=new me("appBaseHref");let HN=(()=>{class i extends Sh{constructor(e,n){super(),this._platformLocation=e,this._removeListenerFns=[],this._baseHref=n??this._platformLocation.getBaseHrefFromDOM()??Pt(Wt).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 CT(this._baseHref,e)}path(e=!1){const n=this._platformLocation.pathname+Oc(this._platformLocation.search),r=this._platformLocation.hash;return r&&e?`${n}${r}`:n}pushState(e,n,r,s){const o=this.prepareExternalUrl(r+Oc(s));this._platformLocation.pushState(e,n,o)}replaceState(e,n,r,s){const o=this.prepareExternalUrl(r+Oc(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)(ee(MT),ee(zN,8))},i.\u0275prov=Ie({token:i,factory:i.\u0275fac,providedIn:"root"}),i})(),v9=(()=>{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=CT(this._baseHref,e);return n.length>0?"#"+n:n}pushState(e,n,r,s){let o=this.prepareExternalUrl(r+Oc(s));0==o.length&&(o=this._platformLocation.pathname),this._platformLocation.pushState(e,n,o)}replaceState(e,n,r,s){let o=this.prepareExternalUrl(r+Oc(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)(ee(MT),ee(zN,8))},i.\u0275prov=Ie({token:i,factory:i.\u0275fac}),i})(),py=(()=>{class i{constructor(e){this._subject=new We,this._urlChangeListeners=[],this._urlChangeSubscription=null,this._locationStrategy=e;const n=this._locationStrategy.getBaseHref();this._basePath=function x9(i){if(new RegExp("^(https?:)?//").test(i)){const[,e]=i.split(/\/\/[^\/]+/);return e}return i}(VN(GN(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+Oc(n))}normalize(e){return i.stripTrailingSlash(function b9(i,t){if(!i||!t.startsWith(i))return t;const e=t.substring(i.length);return""===e||["/",";","?","#"].includes(e[0])?e:t}(this._basePath,GN(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+Oc(n)),r)}replaceState(e,n="",r=null){this._locationStrategy.replaceState(r,"",e,n),this._notifyUrlChangeListeners(this.prepareExternalUrl(e+Oc(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=Oc,i.joinWithSlash=CT,i.stripTrailingSlash=VN,i.\u0275fac=function(e){return new(e||i)(ee(Sh))},i.\u0275prov=Ie({token:i,factory:function(){return function y9(){return new py(ee(Sh))}()},providedIn:"root"}),i})();function GN(i){return i.replace(/\/index.html$/,"")}var Mo=(()=>((Mo=Mo||{})[Mo.Decimal=0]="Decimal",Mo[Mo.Percent=1]="Percent",Mo[Mo.Currency=2]="Currency",Mo[Mo.Scientific=3]="Scientific",Mo))(),Ut=(()=>((Ut=Ut||{})[Ut.Decimal=0]="Decimal",Ut[Ut.Group=1]="Group",Ut[Ut.List=2]="List",Ut[Ut.PercentSign=3]="PercentSign",Ut[Ut.PlusSign=4]="PlusSign",Ut[Ut.MinusSign=5]="MinusSign",Ut[Ut.Exponential=6]="Exponential",Ut[Ut.SuperscriptingExponent=7]="SuperscriptingExponent",Ut[Ut.PerMille=8]="PerMille",Ut[Ut.Infinity=9]="Infinity",Ut[Ut.NaN=10]="NaN",Ut[Ut.TimeSeparator=11]="TimeSeparator",Ut[Ut.CurrencyDecimal=12]="CurrencyDecimal",Ut[Ut.CurrencyGroup=13]="CurrencyGroup",Ut))();function wa(i,t){const e=io(i),n=e[it.NumberSymbols][t];if(typeof n>"u"){if(t===Ut.CurrencyDecimal)return e[it.NumberSymbols][Ut.Decimal];if(t===Ut.CurrencyGroup)return e[it.NumberSymbols][Ut.Group]}return n}const Y9=/^(\d+)?\.((\d+)(-(\d+))?)?$/,XN=22,Xw=".",gy="0",q9=";",X9=",",TT="#";function kT(i){const t=parseInt(i);if(isNaN(t))throw new Error("Invalid integer literal when parsing "+i);return t}const OT=/\s+/,QN=[];let dm=(()=>{class i{constructor(e,n,r,s){this._iterableDiffers=e,this._keyValueDiffers=n,this._ngEl=r,this._renderer=s,this.initialClasses=QN,this.stateMap=new Map}set klass(e){this.initialClasses=null!=e?e.trim().split(OT):QN}set ngClass(e){this.rawClass="string"==typeof e?e.trim().split(OT):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(OT).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)(E(Vw),E(fy),E(pt),E(tl))},i.\u0275dir=ve({type:i,selectors:[["","ngClass",""]],inputs:{klass:["class","klass"],ngClass:"ngClass"},standalone:!0}),i})();class oY{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 Co=(()=>{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 oY(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),tB(a,r)}});for(let r=0,s=n.length;r{tB(n.get(r.currentIndex),r)})}static ngTemplateContextGuard(e,n){return!0}}return i.\u0275fac=function(e){return new(e||i)(E(Wr),E(wo),E(Vw))},i.\u0275dir=ve({type:i,selectors:[["","ngFor","","ngForOf",""]],inputs:{ngForOf:"ngForOf",ngForTrackBy:"ngForTrackBy",ngForTemplate:"ngForTemplate"},standalone:!0}),i})();function tB(i,t){i.context.$implicit=t.item}let wi=(()=>{class i{constructor(e,n){this._viewContainer=e,this._context=new lY,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){nB("ngIfThen",e),this._thenTemplateRef=e,this._thenViewRef=null,this._updateView()}set ngIfElse(e){nB("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)(E(Wr),E(wo))},i.\u0275dir=ve({type:i,selectors:[["","ngIf",""]],inputs:{ngIf:"ngIf",ngIfThen:"ngIfThen",ngIfElse:"ngIfElse"},standalone:!0}),i})();class lY{constructor(){this.$implicit=null,this.ngIf=null}}function nB(i,t){if(t&&!t.createEmbeddedView)throw new Error(`${i} must be a TemplateRef, but received '${fi(t)}'.`)}class FT{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 _y=(()=>{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=ve({type:i,selectors:[["","ngSwitch",""]],inputs:{ngSwitch:"ngSwitch"},standalone:!0}),i})(),LT=(()=>{class i{constructor(e,n,r){this.ngSwitch=r,r._addCase(),this._view=new FT(e,n)}ngDoCheck(){this._view.enforceState(this.ngSwitch._matchCase(this.ngSwitchCase))}}return i.\u0275fac=function(e){return new(e||i)(E(Wr),E(wo),E(_y,9))},i.\u0275dir=ve({type:i,selectors:[["","ngSwitchCase",""]],inputs:{ngSwitchCase:"ngSwitchCase"},standalone:!0}),i})(),iB=(()=>{class i{constructor(e,n,r){r._addDefault(new FT(e,n))}}return i.\u0275fac=function(e){return new(e||i)(E(Wr),E(wo),E(_y,9))},i.\u0275dir=ve({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:Es.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)(E(pt),E(fy),E(tl))},i.\u0275dir=ve({type:i,selectors:[["","ngStyle",""]],inputs:{ngStyle:"ngStyle"},standalone:!0}),i})(),vy=(()=>{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)(E(Wr))},i.\u0275dir=ve({type:i,selectors:[["","ngTemplateOutlet",""]],inputs:{ngTemplateOutletContext:"ngTemplateOutletContext",ngTemplateOutlet:"ngTemplateOutlet",ngTemplateOutletInjector:"ngTemplateOutletInjector"},standalone:!0,features:[yi]}),i})();function ll(i,t){return new pe(2100,!1)}class dY{createSubscription(t,e){return t.subscribe({next:e,error:n=>{throw n}})}dispose(t){t.unsubscribe()}}class uY{createSubscription(t,e){return t.then(e,n=>{throw n})}dispose(t){}}const hY=new uY,fY=new dY;let zl=(()=>{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(iy(e))return hY;if(aL(e))return fY;throw ll()}_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)(E(ri,16))},i.\u0275pipe=Hi({name:"async",type:i,pure:!1,standalone:!0}),i})(),sB=(()=>{class i{constructor(e){this.differs=e,this.keyValues=[],this.compareFn=oB}transform(e,n=oB){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 EY(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)(E(fy,16))},i.\u0275pipe=Hi({name:"keyvalue",type:i,pure:!1,standalone:!0}),i})();function oB(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 NT(i){return!(null==i||""===i||i!=i)}(e))return null;r=r||this._locale;try{return function J9(i,t,e){return function IT(i,t,e,n,r,s,o=!1){let a="",l=!1;if(isFinite(i)){let c=function tY(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)===gy;s++);if(s===(a=t.length))n=[0],r=1;else{for(a--;t.charAt(a)===gy;)a--;for(r-=s,n=[],o=0;s<=a;s++,o++)n[o]=Number(t.charAt(s))}return r>XN&&(n=n.splice(0,XN-1),e=r-1,r=1),{digits:n,exponent:e,integerLen:r}}(i);o&&(c=function eY(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 d=t.minInt,h=t.minFrac,p=t.maxFrac;if(s){const M=s.match(Y9);if(null===M)throw new Error(`${s} is not a valid digit info`);const x=M[1],C=M[3],F=M[5];null!=x&&(d=kT(x)),null!=C&&(h=kT(C)),null!=F?p=kT(F):null!=C&&h>p&&(p=h)}!function nY(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);d&&(n.unshift(d),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(wa(e,n)),v.length&&(a+=wa(e,r)+v.join("")),b&&(a+=wa(e,Ut.Exponential)+"+"+b)}else a=wa(e,Ut.Infinity);return a=i<0&&!l?t.negPre+a+t.negSuf:t.posPre+a+t.posSuf,a}(i,function RT(i,t="-"){const e={minInt:1,minFrac:0,maxFrac:0,posPre:"",posSuf:"",negPre:"",negSuf:"",gSize:0,lgSize:0},n=i.split(q9),r=n[0],s=n[1],o=-1!==r.indexOf(Xw)?r.split(Xw):[r.substring(0,r.lastIndexOf(gy)+1),r.substring(r.lastIndexOf(gy)+1)],a=o[0],l=o[1]||"";e.posPre=a.substring(0,a.indexOf(TT));for(let d=0;d{class i{}return i.\u0275fac=function(e){return new(e||i)},i.\u0275mod=nn({type:i}),i.\u0275inj=Xt({}),i})();const lB="browser";let PY=(()=>{class i{}return i.\u0275prov=Ie({token:i,providedIn:"root",factory:()=>new OY(ee(Wt),window)}),i})();class OY{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 FY(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=cB(this.window.history)||cB(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 cB(i){return Object.getOwnPropertyDescriptor(i,"scrollRestoration")}class c7 extends p9{constructor(){super(...arguments),this.supportsDOMEvents=!0}}class zT extends c7{static makeCurrent(){!function f9(i){wT||(wT=i)}(new zT)}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 d7(){return by=by||document.querySelector("base"),by?by.getAttribute("href"):null}();return null==e?null:function u7(i){Jw=Jw||document.createElement("a"),Jw.setAttribute("href",i);const t=Jw.pathname;return"/"===t.charAt(0)?t:`/${t}`}(e)}resetBaseElement(){by=null}getUserAgent(){return window.navigator.userAgent}getCookie(t){return function rY(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,by=null;const pB=new me("TRANSITION_ID"),f7=[{provide:Ow,useFactory:function h7(i,t,e){return()=>{e.get(Fw).donePromise.then(()=>{const n=Pc(),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 me("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})(),xy=(()=>{class i extends gB{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)(ee(Wt))},i.\u0275prov=Ie({token:i,factory:i.\u0275fac}),i})();const HT={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/"},GT=/%COMP%/g,yB=new me("RemoveStylesOnCompDestory",{providedIn:"root",factory:()=>!1});function bB(i,t){return t.flat(100).map(e=>e.replace(GT,i))}function xB(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 $T(e)}createRenderer(e,n){if(!e||!n)return this.defaultRenderer;const r=this.getOrCreateRenderer(e,n);return r instanceof CB?r.applyToHost(e):r instanceof WT&&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 Ys.Emulated:s=new CB(o,a,n,this.appId,l);break;case Ys.ShadowDom:return new w7(o,a,e,n);default:s=new WT(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)(ee(tM),ee(xy),ee(am),ee(yB))},i.\u0275prov=Ie({token:i,factory:i.\u0275fac}),i})();class $T{constructor(t){this.eventManager=t,this.data=Object.create(null),this.destroyNode=null}destroy(){}createElement(t,e){return e?document.createElementNS(HT[e]||e,t):document.createElement(t)}createComment(t){return document.createComment(t)}createText(t){return document.createTextNode(t)}appendChild(t,e){(MB(t)?t.content:t).appendChild(e)}insertBefore(t,e,n){t&&(MB(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=HT[r];s?t.setAttributeNS(s,e,n):t.setAttribute(e,n)}else t.setAttribute(e,n)}removeAttribute(t,e,n){if(n){const r=HT[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&(Es.DashCase|Es.Important)?t.style.setProperty(e,n,r&Es.Important?"important":""):t.style[e]=n}removeStyle(t,e,n){n&Es.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,xB(n)):this.eventManager.addEventListener(t,e,xB(n))}}function MB(i){return"TEMPLATE"===i.tagName&&void 0!==i.content}class w7 extends $T{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=bB(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 WT extends $T{constructor(t,e,n,r,s=n.id){super(t),this.sharedStylesHost=e,this.removeStylesOnCompDestory=r,this.rendererUsageCount=0,this.styles=bB(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 CB extends WT{constructor(t,e,n,r,s){const o=r+"-"+n.id;super(t,e,n,s,o),this.contentAttr=function y7(i){return"_ngcontent-%COMP%".replace(GT,i)}(o),this.hostAttr=function b7(i){return"_nghost-%COMP%".replace(GT,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 M7=(()=>{class i extends mB{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)(ee(Wt))},i.\u0275prov=Ie({token:i,factory:i.\u0275fac}),i})();const SB=["alt","control","meta","shift"],C7={"\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"},S7={alt:i=>i.altKey,control:i=>i.ctrlKey,meta:i=>i.metaKey,shift:i=>i.shiftKey};let E7=(()=>{class i extends mB{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(()=>Pc().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."),SB.forEach(c=>{const d=n.indexOf(c);d>-1&&(n.splice(d,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=C7[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"),SB.forEach(o=>{o!==r&&(0,S7[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)(ee(Wt))},i.\u0275prov=Ie({token:i,factory:i.\u0275fac}),i})();const I7=xN(d9,"browser",[{provide:cT,useValue:lB},{provide:dN,useValue:function A7(){zT.makeCurrent()},multi:!0},{provide:Wt,useFactory:function T7(){return function tD(i){mv=i}(document),document},deps:[]}]),DB=new me(""),TB=[{provide:Lw,useClass:class p7{addToWindow(t){In.getAngularTestability=(n,r=!0)=>{const s=t.findTestabilityInTree(n,r);if(null==s)throw new Error("Could not find testability for element.");return s},In.getAllAngularTestabilities=()=>t.getAllTestabilities(),In.getAllAngularRootElements=()=>t.getAllRootElements(),In.frameworkStabilizers||(In.frameworkStabilizers=[]),In.frameworkStabilizers.push(n=>{const r=In.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?Pc().isShadowRoot(e)?this.findTestabilityInTree(t,e.host,!0):this.findTestabilityInTree(t,e.parentElement,!0):null)}},deps:[]},{provide:gN,useClass:fT,deps:[ht,pT,Lw]},{provide:fT,useClass:fT,deps:[ht,pT,Lw]}],IB=[{provide:Av,useValue:"root"},{provide:nl,useFactory:function D7(){return new nl},deps:[]},{provide:eM,useClass:M7,multi:!0,deps:[Wt,ht,cT]},{provide:eM,useClass:E7,multi:!0,deps:[Wt]},{provide:nM,useClass:nM,deps:[tM,xy,am,yB]},{provide:Fl,useExisting:nM},{provide:gB,useExisting:xy},{provide:xy,useClass:xy,deps:[Wt]},{provide:tM,useClass:tM,deps:[eM,ht]},{provide:class LY{},useClass:m7,deps:[]},[]];let RB=(()=>{class i{constructor(e){}static withServerTransition(e){return{ngModule:i,providers:[{provide:am,useValue:e.appId},{provide:pB,useExisting:am},f7]}}}return i.\u0275fac=function(e){return new(e||i)(ee(DB,12))},i.\u0275mod=nn({type:i}),i.\u0275inj=Xt({providers:[...IB,...TB],imports:[So,u9]}),i})(),kB=(()=>{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)(ee(Wt))},i.\u0275prov=Ie({token:i,factory:function(e){let n=null;return n=e?new e:function k7(){return new kB(ee(Wt))}(),n},providedIn:"root"}),i})();typeof window<"u"&&window;let qT=(()=>{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):ee(FB),n},providedIn:"root"}),i})(),FB=(()=>{class i extends qT{constructor(e){super(),this._doc=e}sanitize(e,n){if(null==n)return null;switch(e){case Xn.NONE:return n;case Xn.HTML:return ya(n,"HTML")?Qs(n):jx(this._doc,String(n)).toString();case Xn.STYLE:return ya(n,"Style")?Qs(n):n;case Xn.SCRIPT:if(ya(n,"Script"))return Qs(n);throw new Error("unsafe value used in a script context");case Xn.URL:return ya(n,"URL")?Qs(n):gh(String(n));case Xn.RESOURCE_URL:if(ya(n,"ResourceURL"))return Qs(n);throw new Error(`unsafe value used in a resource URL context (see ${Gu})`);default:throw new Error(`Unexpected SecurityContext ${e} (see ${Gu})`)}}bypassSecurityTrustHtml(e){return function aD(i){return new nD(i)}(e)}bypassSecurityTrustStyle(e){return function lD(i){return new iD(i)}(e)}bypassSecurityTrustScript(e){return function cD(i){return new rD(i)}(e)}bypassSecurityTrustUrl(e){return function dD(i){return new sD(i)}(e)}bypassSecurityTrustResourceUrl(e){return function uD(i){return new Rp(i)}(e)}}return i.\u0275fac=function(e){return new(e||i)(ee(Wt))},i.\u0275prov=Ie({token:i,factory:function(e){let n=null;return n=e?new e:function N7(i){return new FB(i.get(Wt))}(ee(Gi)),n},providedIn:"root"}),i})();function ut(...i){return Li(i,Uu(i))}class Ct extends Re{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 um=V(i=>function(){i(this),this.name="EmptyError",this.message="no elements in sequence"}),{isArray:B7}=Array,{getPrototypeOf:U7,prototype:V7,keys:z7}=Object;function LB(i){if(1===i.length){const t=i[0];if(B7(t))return{args:t,keys:null};if(function H7(i){return i&&"object"==typeof i&&U7(i)===V7}(t)){const e=z7(t);return{args:e.map(n=>t[n]),keys:e}}}return{args:i,keys:null}}const{isArray:G7}=Array;function XT(i){return et(t=>function $7(i,t){return G7(t)?i(...t):i(t)}(i,t))}function NB(i,t){return i.reduce((e,n,r)=>(e[n]=t[r],e),{})}function eu(...i){const t=Uu(i),e=_0(i),{args:n,keys:r}=LB(i);if(0===n.length)return Li([],t);const s=new Tn(function W7(i,t,e=Ba){return n=>{BB(t,()=>{const{length:r}=i,s=new Array(r);let o=r,a=r;for(let l=0;l{const c=Li(i[l],t);let d=!1;c.subscribe(jn(n,h=>{s[l]=h,d||(d=!0,a--),a||n.next(e(s.slice()))},()=>{--o||n.complete()}))},n)},n)}}(n,t,r?o=>NB(r,o):Ba));return e?s.pipe(XT(e)):s}function BB(i,t,e){i?za(e,i,t):t()}function wy(...i){return function j7(){return _d(1)}()(Li(i,Uu(i)))}function My(i){return new Tn(t=>{wr(i()).subscribe(t)})}function hm(i,t){const e=ln(i)?i:()=>i,n=r=>r.error(e());return new Tn(t?r=>t.schedule(n,0,r):n)}function KT(){return Jn((i,t)=>{let e=null;i._refCount++;const n=jn(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 UB extends Tn{constructor(t,e){super(),this.source=t,this.subjectFactory=e,this._subject=null,this._refCount=0,this._connection=null,r0(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 Kt;const e=this.getSubject();t.add(this.source.subscribe(jn(e,void 0,()=>{this._teardown(),e.complete()},n=>{this._teardown(),e.error(n)},()=>this._teardown()))),t.closed&&(this._connection=null,t=Kt.EMPTY)}return t}refCount(){return KT()(this)}}function Rs(i,t){return Jn((e,n)=>{let r=null,s=0,o=!1;const a=()=>o&&!r&&n.complete();e.subscribe(jn(n,l=>{r?.unsubscribe();let c=0;const d=s++;wr(i(l,d)).subscribe(r=jn(n,h=>n.next(t?t(l,h,d,c++):h),()=>{r=null,a()}))},()=>{o=!0,a()}))})}function Pi(i){return i<=0?()=>fo:Jn((t,e)=>{let n=0;t.subscribe(jn(e,r=>{++n<=i&&(e.next(r),i<=n&&e.complete())}))})}function Eo(...i){const t=Uu(i);return Jn((e,n)=>{(t?wy(i,e,t):wy(i,e)).subscribe(n)})}function vn(i,t){return Jn((e,n)=>{let r=0;e.subscribe(jn(n,s=>i.call(t,s,r++)&&n.next(s)))})}function iM(i){return Jn((t,e)=>{let n=!1;t.subscribe(jn(e,r=>{n=!0,e.next(r)},()=>{n||e.next(i),e.complete()}))})}function VB(i=Y7){return Jn((t,e)=>{let n=!1;t.subscribe(jn(e,r=>{n=!0,e.next(r)},()=>n?e.complete():e.error(i())))})}function Y7(){return new um}function tu(i,t){const e=arguments.length>=2;return n=>n.pipe(i?vn((r,s)=>i(r,s,n)):Ba,Pi(1),e?iM(t):VB(()=>new um))}function nu(i,t){return ln(t)?Ji(i,t,1):Ji(i,1)}function Ui(i,t,e){const n=ln(i)||t||e?{next:i,error:t,complete:e}:i;return n?Jn((r,s)=>{var o;null===(o=n.subscribe)||void 0===o||o.call(n);let a=!0;r.subscribe(jn(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)}))}):Ba}function Lc(i){return Jn((t,e)=>{let s,n=null,r=!1;n=t.subscribe(jn(e,void 0,void 0,o=>{s=wr(i(o,Lc(i)(t))),n?(n.unsubscribe(),n=null,s.subscribe(e)):r=!0})),r&&(n.unsubscribe(),n=null,s.subscribe(e))})}function ZT(i,t){return Jn(function q7(i,t,e,n,r){return(s,o)=>{let a=e,l=t,c=0;s.subscribe(jn(o,d=>{const h=c++;l=a?i(l,d,h):(a=!0,d),n&&o.next(l)},r&&(()=>{a&&o.next(l),o.complete()})))}}(i,t,arguments.length>=2,!0))}function QT(i){return i<=0?()=>fo:Jn((t,e)=>{let n=[];t.subscribe(jn(e,r=>{n.push(r),i{for(const r of n)e.next(r);e.complete()},void 0,()=>{n=null}))})}function zB(i,t){const e=arguments.length>=2;return n=>n.pipe(i?vn((r,s)=>i(r,s,n)):Ba,QT(1),e?iM(t):VB(()=>new um))}function HB(i,t=!1){return Jn((e,n)=>{let r=0;e.subscribe(jn(n,s=>{const o=i(s,r++);(o||t)&&n.next(s),!o&&n.complete()}))})}function GB(i){return et(()=>i)}function iu(i){return Jn((t,e)=>{try{t.subscribe(e)}finally{e.add(i)}})}const gn="primary",Cy=Symbol("RouteTitle");class X7{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 fm(i){return new X7(i)}function K7(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 WB(i){return Array.prototype.concat.apply([],i)}function jB(i){return i.length>0?i[i.length-1]:null}function os(i,t){for(const e in i)i.hasOwnProperty(e)&&t(i[e],e)}function ru(i){return k1(i)?i:iy(i)?Li(Promise.resolve(i)):ut(i)}const rM=!1,Q7={exact:function XB(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]||!XB(i.children[n],t.children[n],e))return!1;return!0},subset:KB},YB={exact:function J7(i,t){return Hl(i,t)},subset:function eq(i,t){return Object.keys(t).length<=Object.keys(i).length&&Object.keys(t).every(e=>$B(i[e],t[e]))},ignored:()=>!0};function qB(i,t,e){return Q7[e.paths](i.root,t.root,e.matrixParams)&&YB[e.queryParams](i.queryParams,t.queryParams)&&!("exact"===e.fragment&&i.fragment!==t.fragment)}function KB(i,t,e){return ZB(i,t,t.segments,e)}function ZB(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]||!KB(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[gn])&&ZB(i.children[gn],t,s,n)}}function sM(i,t,e){return t.every((n,r)=>YB[e](i[r].parameters,n.parameters))}class su{constructor(t=new Dn([],{}),e={},n=null){this.root=t,this.queryParams=e,this.fragment=n}get queryParamMap(){return this._queryParamMap||(this._queryParamMap=fm(this.queryParams)),this._queryParamMap}toString(){return iq.serialize(this)}}class Dn{constructor(t,e){this.segments=t,this.children=e,this.parent=null,os(e,(n,r)=>n.parent=this)}hasChildren(){return this.numberOfChildren>0}get numberOfChildren(){return Object.keys(this.children).length}toString(){return oM(this)}}class Sy{constructor(t,e){this.path=t,this.parameters=e}get parameterMap(){return this._parameterMap||(this._parameterMap=fm(this.parameters)),this._parameterMap}toString(){return e3(this)}}function Eh(i,t){return i.length===t.length&&i.every((e,n)=>e.path===t[n].path)}let Ey=(()=>{class i{}return i.\u0275fac=function(e){return new(e||i)},i.\u0275prov=Ie({token:i,factory:function(){return new JT},providedIn:"root"}),i})();class JT{parse(t){const e=new hq(t);return new su(e.parseRootSegment(),e.parseQueryParams(),e.parseFragment())}serialize(t){const e=`/${Ay(t.root,!0)}`,n=function oq(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 rq(i){return encodeURI(i)}(t.fragment)}`:""}`}}const iq=new JT;function oM(i){return i.segments.map(t=>e3(t)).join("/")}function Ay(i,t){if(!i.hasChildren())return oM(i);if(t){const e=i.children[gn]?Ay(i.children[gn],!1):"",n=[];return os(i.children,(r,s)=>{s!==gn&&n.push(`${s}:${Ay(r,!1)}`)}),n.length>0?`${e}(${n.join("//")})`:e}{const e=function nq(i,t){let e=[];return os(i.children,(n,r)=>{r===gn&&(e=e.concat(t(n,r)))}),os(i.children,(n,r)=>{r!==gn&&(e=e.concat(t(n,r)))}),e}(i,(n,r)=>r===gn?[Ay(i.children[gn],!1)]:[`${r}:${Ay(n,!1)}`]);return 1===Object.keys(i.children).length&&null!=i.children[gn]?`${oM(i)}/${e[0]}`:`${oM(i)}/(${e.join("//")})`}}function QB(i){return encodeURIComponent(i).replace(/%40/g,"@").replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",")}function aM(i){return QB(i).replace(/%3B/gi,";")}function eI(i){return QB(i).replace(/\(/g,"%28").replace(/\)/g,"%29").replace(/%26/gi,"&")}function lM(i){return decodeURIComponent(i)}function JB(i){return lM(i.replace(/\+/g,"%20"))}function e3(i){return`${eI(i.path)}${function sq(i){return Object.keys(i).map(t=>`;${eI(t)}=${eI(i[t])}`).join("")}(i.parameters)}`}const aq=/^[^\/()?;=#]+/;function cM(i){const t=i.match(aq);return t?t[0]:""}const lq=/^[^=?&#]+/,dq=/^[^&#]+/;class hq{constructor(t){this.url=t,this.remaining=t}parseRootSegment(){return this.consumeOptional("/"),""===this.remaining||this.peekStartsWith("?")||this.peekStartsWith("#")?new Dn([],{}):new Dn([],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[gn]=new Dn(t,e)),n}parseSegment(){const t=cM(this.remaining);if(""===t&&this.peekStartsWith(";"))throw new pe(4009,rM);return this.capture(t),new Sy(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 cq(i){const t=i.match(lq);return t?t[0]:""}(this.remaining);if(!e)return;this.capture(e);let n="";if(this.consumeOptional("=")){const o=function uq(i){const t=i.match(dq);return t?t[0]:""}(this.remaining);o&&(n=o,this.capture(n))}const r=JB(e),s=JB(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 pe(4010,rM);let s;n.indexOf(":")>-1?(s=n.slice(0,n.indexOf(":")),this.capture(s),this.capture(":")):t&&(s=gn);const o=this.parseChildren();e[s]=1===Object.keys(o).length?o[gn]:new Dn([],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 pe(4011,rM)}}function tI(i){return i.segments.length>0?new Dn([],{[gn]: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 fq(i){if(1===i.numberOfChildren&&i.children[gn]){const t=i.children[gn];return new Dn(i.segments.concat(t.segments),t.children)}return i}(new Dn(i.segments,t))}function Ah(i){return i instanceof su}const nI=!1;function pq(i,t,e,n,r){if(0===e.length)return pm(t.root,t.root,t.root,n,r);const s=function o3(i){if("string"==typeof i[0]&&1===i.length&&"/"===i[0])return new s3(!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 os(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 s3(e,t,n)}(e);return s.toRoot()?pm(t.root,t.root,new Dn([],{}),n,r):function o(l){const c=function gq(i,t,e,n){if(i.isAbsolute)return new mm(t.root,!0,0);if(-1===n)return new mm(e,e===t.root,0);return function a3(i,t,e){let n=i,r=t,s=e;for(;s>r;){if(s-=r,n=n.parent,!n)throw new pe(4005,nI&&"Invalid number of '../'");r=n.segments.length}return new mm(n,!1,r-s)}(e,n+(Dy(i.commands[0])?0:1),i.numberOfDoubleDots)}(s,t,i.snapshot?._urlSegment,l),d=c.processChildren?gm(c.segmentGroup,c.index,s.commands):iI(c.segmentGroup,c.index,s.commands);return pm(t.root,c.segmentGroup,d,n,r)}(i.snapshot?._lastPathIndex)}function Dy(i){return"object"==typeof i&&null!=i&&!i.outlets&&!i.segmentPath}function Ty(i){return"object"==typeof i&&null!=i&&i.outlets}function pm(i,t,e,n,r){let o,s={};n&&os(n,(l,c)=>{s[c]=Array.isArray(l)?l.map(d=>`${d}`):`${l}`}),o=i===t?e:r3(i,t,e);const a=tI(dM(o));return new su(a,s,r)}function r3(i,t,e){const n={};return os(i.children,(r,s)=>{n[s]=r===t?e:r3(r,t,e)}),new Dn(i.segments,n)}class s3{constructor(t,e,n){if(this.isAbsolute=t,this.numberOfDoubleDots=e,this.commands=n,t&&n.length>0&&Dy(n[0]))throw new pe(4003,nI&&"Root segment cannot have matrix parameters");const r=n.find(Ty);if(r&&r!==jB(n))throw new pe(4004,nI&&"{outlets:{}} has to be the last command")}toRoot(){return this.isAbsolute&&1===this.commands.length&&"/"==this.commands[0]}}class mm{constructor(t,e,n){this.segmentGroup=t,this.processChildren=e,this.index=n}}function iI(i,t,e){if(i||(i=new Dn([],{})),0===i.segments.length&&i.hasChildren())return gm(i,t,e);const n=function vq(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(Ty(a))break;const l=`${a}`,c=n0&&void 0===l)break;if(l&&c&&"object"==typeof c&&void 0===c.outlets){if(!c3(l,c,o))return s;n+=2}else{if(!c3(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]=iI(i.children[o],t,s))}),os(i.children,(s,o)=>{void 0===n[o]&&(r[o]=s)}),new Dn(i.segments,r)}}function rI(i,t,e){const n=i.segments.slice(0,t);let r=0;for(;r{"string"==typeof e&&(e=[e]),null!==e&&(t[n]=rI(new Dn([],{}),0,e))}),t}function l3(i){const t={};return os(i,(e,n)=>t[n]=`${e}`),t}function c3(i,t,e){return i==e.path&&Hl(t,e.parameters)}const Iy="imperative";class Gl{constructor(t,e){this.id=t,this.url=e}}class sI extends Gl{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 Gl{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 Gl{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 Gl{constructor(t,e,n,r){super(t,e),this.reason=n,this.code=r,this.type=16}}class oI extends Gl{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 bq extends Gl{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 xq extends Gl{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 wq extends Gl{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 Mq extends Gl{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 Cq extends Gl{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 Sq{constructor(t){this.route=t,this.type=9}toString(){return`RouteConfigLoadStart(path: ${this.route.path})`}}class Eq{constructor(t){this.route=t,this.type=10}toString(){return`RouteConfigLoadEnd(path: ${this.route.path})`}}class Aq{constructor(t){this.snapshot=t,this.type=11}toString(){return`ChildActivationStart(path: '${this.snapshot.routeConfig&&this.snapshot.routeConfig.path||""}')`}}class Dq{constructor(t){this.snapshot=t,this.type=12}toString(){return`ChildActivationEnd(path: '${this.snapshot.routeConfig&&this.snapshot.routeConfig.path||""}')`}}class Tq{constructor(t){this.snapshot=t,this.type=13}toString(){return`ActivationStart(path: '${this.snapshot.routeConfig&&this.snapshot.routeConfig.path||""}')`}}class Iq{constructor(t){this.snapshot=t,this.type=14}toString(){return`ActivationEnd(path: '${this.snapshot.routeConfig&&this.snapshot.routeConfig.path||""}')`}}class d3{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 Pq=(()=>{class i{createUrlTree(e,n,r,s,o,a){return pq(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})(),Fq=(()=>{class i{}return i.\u0275fac=function(e){return new(e||i)},i.\u0275prov=Ie({token:i,factory:function(t){return Pq.\u0275fac(t)},providedIn:"root"}),i})();class u3{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=aI(t,this._root);return e?e.children.map(n=>n.value):[]}firstChild(t){const e=aI(t,this._root);return e&&e.children.length>0?e.children[0].value:null}siblings(t){const e=lI(t,this._root);return e.length<2?[]:e[e.length-2].children.map(r=>r.value).filter(r=>r!==t)}pathFromRoot(t){return lI(t,this._root).map(e=>e.value)}}function aI(i,t){if(i===t.value)return t;for(const e of t.children){const n=aI(i,e);if(n)return n}return null}function lI(i,t){if(i===t.value)return[t];for(const e of t.children){const n=lI(i,e);if(n.length)return n.unshift(t),n}return[]}class Nc{constructor(t,e){this.value=t,this.children=e}toString(){return`TreeNode(${this.value})`}}function _m(i){const t={};return i&&i.children.forEach(e=>t[e.value.outlet]=e),t}class h3 extends u3{constructor(t,e){super(t),this.snapshot=e,cI(this,t)}toString(){return this.snapshot.toString()}}function f3(i,t){const e=function Lq(i,t){const o=new fM([],{},{},"",{},gn,t,null,i.root,-1,{});return new m3("",new Nc(o,[]))}(i,t),n=new Ct([new Sy("",{})]),r=new Ct({}),s=new Ct({}),o=new Ct({}),a=new Ct(""),l=new vm(n,r,o,a,s,gn,t,e.root);return l.snapshot=e.root,new h3(new Nc(l,[]),e)}class vm{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(et(c=>c[Cy]))??ut(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(et(t=>fm(t)))),this._paramMap}get queryParamMap(){return this._queryParamMap||(this._queryParamMap=this.queryParams.pipe(et(t=>fm(t)))),this._queryParamMap}toString(){return this.snapshot?this.snapshot.toString():`Future(${this._futureSnapshot})`}}function p3(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 Nq(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?.[Cy]}constructor(t,e,n,r,s,o,a,l,c,d,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=d,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=fm(this.params)),this._paramMap}get queryParamMap(){return this._queryParamMap||(this._queryParamMap=fm(this.queryParams)),this._queryParamMap}toString(){return`Route(url:'${this.url.map(n=>n.toString()).join("/")}', path:'${this.routeConfig?this.routeConfig.path:""}')`}}class m3 extends u3{constructor(t,e){super(e),this.url=t,cI(this,e)}toString(){return g3(this._root)}}function cI(i,t){t.value._routerState=i,t.children.forEach(e=>cI(i,e))}function g3(i){const t=i.children.length>0?` { ${i.children.map(g3).join(", ")} } `:"";return`${i.value}${t}`}function dI(i){if(i.snapshot){const t=i.snapshot,e=i._futureSnapshot;i.snapshot=e,Hl(t.queryParams,e.queryParams)||i.queryParams.next(e.queryParams),t.fragment!==e.fragment&&i.fragment.next(e.fragment),Hl(t.params,e.params)||i.params.next(e.params),function Z7(i,t){if(i.length!==t.length)return!1;for(let e=0;eHl(e.parameters,t[n].parameters))}(i.url,t.url);return e&&!(!i.parent!=!t.parent)&&(!i.parent||uI(i.parent,t.parent))}function Ry(i,t,e){if(e&&i.shouldReuseRoute(t.value,e.value.snapshot)){const n=e.value;n._futureSnapshot=t.value;const r=function Uq(i,t,e){return t.children.map(n=>{for(const r of e.children)if(i.shouldReuseRoute(n.value,r.value.snapshot))return Ry(i,n,r);return Ry(i,n)})}(i,t,e);return new Nc(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=>Ry(i,a)),o}}const n=function Vq(i){return new vm(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=>Ry(i,s));return new Nc(n,r)}}const hI="ngNavigationCancelingError";function _3(i,t){const{redirectTo:e,navigationBehaviorOptions:n}=Ah(t)?{redirectTo:t,navigationBehaviorOptions:void 0}:t,r=v3(!1,0,t);return r.url=e,r.navigationBehaviorOptions=n,r}function v3(i,t,e){const n=new Error("NavigationCancelingError: "+(i||""));return n[hI]=!0,n.cancellationCode=t,e&&(n.url=e),n}function y3(i){return b3(i)&&Ah(i.url)}function b3(i){return i&&i[hI]}class zq{constructor(){this.outlet=null,this.route=null,this.resolver=null,this.injector=null,this.children=new ky,this.attachRef=null}}let ky=(()=>{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 zq,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 x3=(()=>{class i{constructor(){this.activated=null,this._activatedRoute=null,this.name=gn,this.activateEvents=new We,this.deactivateEvents=new We,this.attachEvents=new We,this.detachEvents=new We,this.parentContexts=Pt(ky),this.location=Pt(Wr),this.changeDetector=Pt(ri),this.environmentInjector=Pt(eo)}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 pe(4012,pM);return this.activated.instance}get activatedRoute(){if(!this.activated)throw new pe(4012,pM);return this._activatedRoute}get activatedRouteData(){return this._activatedRoute?this._activatedRoute.snapshot.data:{}}detach(){if(!this.activated)throw new pe(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 pe(4013,pM);this._activatedRoute=e;const r=this.location,o=e.snapshot.component,a=this.parentContexts.getOrCreateContext(this.name).children,l=new Hq(e,a,r.injector);if(n&&function Gq(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=ve({type:i,selectors:[["router-outlet"]],inputs:{name:"name"},outputs:{activateEvents:"activate",deactivateEvents:"deactivate",attachEvents:"attach",detachEvents:"detach"},exportAs:["outlet"],standalone:!0,features:[yi]}),i})();class Hq{constructor(t,e,n){this.route=t,this.childContexts=e,this.parent=n}get(t,e){return t===vm?this.route:t===ky?this.childContexts:this.parent.get(t,e)}}let fI=(()=>{class i{}return i.\u0275fac=function(e){return new(e||i)},i.\u0275cmp=ot({type:i,selectors:[["ng-component"]],standalone:!0,features:[Y1],decls:1,vars:0,template:function(e,n){1&e&&ke(0,"router-outlet")},dependencies:[x3],encapsulation:2}),i})();function w3(i,t){return i.providers&&!i._injector&&(i._injector=Iw(i.providers,t,`Route: ${i.path}`)),i._injector??t}function mI(i){const t=i.children&&i.children.map(mI),e=t?{...i,children:t}:{...i};return!e.component&&!e.loadComponent&&(t||e.loadChildren)&&e.outlet&&e.outlet!==gn&&(e.component=fI),e}function Ca(i){return i.outlet||gn}function M3(i,t){const e=i.filter(n=>Ca(n)===t);return e.push(...i.filter(n=>Ca(n)!==t)),e}function Py(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 qq{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),dI(this.futureState.root),this.activateChildRoutes(e,n,t)}deactivateChildRoutes(t,e,n){const r=_m(e);t.children.forEach(s=>{const o=s.value.outlet;this.deactivateRoutes(s,r[o],n),delete r[o]}),os(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=_m(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=_m(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=_m(e);t.children.forEach(s=>{this.activateRoutes(s,r[s.value.outlet],n),this.forwardEvent(new Iq(s.value.snapshot))}),t.children.length&&this.forwardEvent(new Dq(t.value.snapshot))}activateRoutes(t,e,n){const r=t.value,s=e?e.value:null;if(dI(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),dI(a.route.value),this.activateChildRoutes(t,null,o.children)}else{const a=Py(r.snapshot),l=a?.get(Ol)??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 C3{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 Xq(i,t,e){const n=i._root;return Oy(n,t?t._root:null,e,[n.value])}function ym(i,t){const e=Symbol(),n=t.get(i,e);return n===e?"function"!=typeof i||function Cr(i){return null!==zf(i)}(i)?t.get(i):i:n}function Oy(i,t,e,n,r={canDeactivateChecks:[],canActivateChecks:[]}){const s=_m(t);return i.children.forEach(o=>{(function Zq(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 Qq(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)||!Hl(i.queryParams,t.queryParams);case"always":return!0;case"paramsOrQueryParamsChange":return!uI(i,t)||!Hl(i.queryParams,t.queryParams);default:return!uI(i,t)}}(o,s,s.routeConfig.runGuardsAndResolvers);l?r.canActivateChecks.push(new C3(n)):(s.data=o.data,s._resolvedData=o._resolvedData),Oy(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&&Fy(t,a,r),r.canActivateChecks.push(new C3(n)),Oy(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]}),os(s,(o,a)=>Fy(o,e.getContext(a),r)),r}function Fy(i,t,e){const n=_m(i),r=i.value;os(n,(s,o)=>{Fy(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 Ly(i){return"function"==typeof i}function gI(i){return i instanceof um||"EmptyError"===i?.name}const gM=Symbol("INITIAL_VALUE");function bm(){return Rs(i=>eu(i.map(t=>t.pipe(Pi(1),Eo(gM)))).pipe(et(t=>{for(const e of t)if(!0!==e){if(e===gM)return gM;if(!1===e||e instanceof su)return e}return!0}),vn(t=>t!==gM),Pi(1)))}function S3(i){return function bE(...i){return t0(i)}(Ui(t=>{if(Ah(t))throw _3(0,t)}),et(t=>!0===t))}const _I={matched:!1,consumedSegments:[],remainingSegments:[],parameters:{},positionalParamSegments:{}};function E3(i,t,e,n,r){const s=vI(i,t,e);return s.matched?function mX(i,t,e,n){const r=t.canMatch;return r&&0!==r.length?ut(r.map(o=>{const a=ym(o,i);return ru(function rX(i){return i&&Ly(i.canMatch)}(a)?a.canMatch(t,e):i.runInContext(()=>a(t,e)))})).pipe(bm(),S3()):ut(!0)}(n=w3(t,n),t,e).pipe(et(o=>!0===o?s:{..._I})):ut(s)}function vI(i,t,e){if(""===t.path)return"full"===t.pathMatch&&(i.hasChildren()||e.length>0)?{..._I}:{matched:!0,consumedSegments:[],remainingSegments:e,parameters:{},positionalParamSegments:{}};const r=(t.matcher||K7)(e,i,t);if(!r)return{..._I};const s={};os(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 vX(i,t,e){return e.some(n=>vM(i,t,n)&&Ca(n)!==gn)}(i,e,n)){const s=new Dn(t,function _X(i,t,e,n){const r={};r[gn]=n,n._sourceSegment=i,n._segmentIndexShift=t.length;for(const s of e)if(""===s.path&&Ca(s)!==gn){const o=new Dn([],{});o._sourceSegment=i,o._segmentIndexShift=t.length,r[Ca(s)]=o}return r}(i,t,n,new Dn(e,i.children)));return s._sourceSegment=i,s._segmentIndexShift=t.length,{segmentGroup:s,slicedSegments:[]}}if(0===e.length&&function yX(i,t,e){return e.some(n=>vM(i,t,n))}(i,e,n)){const s=new Dn(i.segments,function gX(i,t,e,n,r){const s={};for(const o of n)if(vM(i,e,o)&&!r[Ca(o)]){const a=new Dn([],{});a._sourceSegment=i,a._segmentIndexShift=t.length,s[Ca(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 Dn(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 A3(i,t,e,n){return!!(Ca(i)===n||n!==gn&&vM(t,e,i))&&("**"===i.path||vI(t,i,e).matched)}function D3(i,t,e){return 0===t.length&&!i.children[e]}const yM=!1;class bM{constructor(t){this.segmentGroup=t||null}}class T3{constructor(t){this.urlTree=t}}function Ny(i){return hm(new bM(i))}function I3(i){return hm(new T3(i))}class MX{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 Dn(t.segments,t.children);return this.expandSegmentGroup(this.injector,this.config,e,gn).pipe(et(s=>this.createUrlTree(dM(s),this.urlTree.queryParams,this.urlTree.fragment))).pipe(Lc(s=>{if(s instanceof T3)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,gn).pipe(et(r=>this.createUrlTree(dM(r),t.queryParams,t.fragment))).pipe(Lc(r=>{throw r instanceof bM?this.noMatchError(r):r}))}noMatchError(t){return new pe(4002,yM)}createUrlTree(t,e,n){const r=tI(t);return new su(r,e,n)}expandSegmentGroup(t,e,n,r){return 0===n.segments.length&&n.hasChildren()?this.expandChildren(t,e,n).pipe(et(s=>new Dn([],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 Li(r).pipe(nu(s=>{const o=n.children[s],a=M3(e,s);return this.expandSegmentGroup(t,a,o,s).pipe(et(l=>({segment:l,outlet:s})))}),ZT((s,o)=>(s[o.outlet]=o.segment,s),{}),zB())}expandSegment(t,e,n,r,s,o){return Li(n).pipe(nu(a=>this.expandSegmentAgainstRoute(t,e,n,a,r,s,o).pipe(Lc(c=>{if(c instanceof bM)return ut(null);throw c}))),tu(a=>!!a),Lc((a,l)=>{if(gI(a))return D3(e,r,s)?ut(new Dn([],{})):Ny(e);throw a}))}expandSegmentAgainstRoute(t,e,n,r,s,o,a){return A3(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):Ny(e):Ny(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("/")?I3(s):this.lineralizeSegments(n,s).pipe(Ji(o=>{const a=new Dn(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:d}=vI(e,r,s);if(!a)return Ny(e);const h=this.applyRedirectCommands(l,r.redirectTo,d);return r.redirectTo.startsWith("/")?I3(h):this.lineralizeSegments(r,h).pipe(Ji(p=>this.expandSegment(t,e,n,p.concat(c),o,!1)))}matchSegmentAgainstRoute(t,e,n,r,s){return"**"===n.path?(t=w3(n,t),n.loadChildren?(n._loadedRoutes?ut({routes:n._loadedRoutes,injector:n._loadedInjector}):this.configLoader.loadChildren(t,n)).pipe(et(a=>(n._loadedRoutes=a.routes,n._loadedInjector=a.injector,new Dn(r,{})))):ut(new Dn(r,{}))):E3(e,n,r,t).pipe(Rs(({matched:o,consumedSegments:a,remainingSegments:l})=>o?this.getChildConfig(t=n._injector??t,n,r).pipe(Ji(d=>{const h=d.injector??t,p=d.routes,{segmentGroup:m,slicedSegments:g}=_M(e,a,l,p),b=new Dn(m.segments,m.children);if(0===g.length&&b.hasChildren())return this.expandChildren(h,p,b).pipe(et(x=>new Dn(a,x)));if(0===p.length&&0===g.length)return ut(new Dn(a,{}));const v=Ca(n)===s;return this.expandSegment(h,b,p,g,v?gn:s,!0).pipe(et(M=>new Dn(a.concat(M.segments),M.children)))})):Ny(e)))}getChildConfig(t,e,n){return e.children?ut({routes:e.children,injector:t}):e.loadChildren?void 0!==e._loadedRoutes?ut({routes:e._loadedRoutes,injector:e._loadedInjector}):function pX(i,t,e,n){const r=t.canLoad;return void 0===r||0===r.length?ut(!0):ut(r.map(o=>{const a=ym(o,i);return ru(function eX(i){return i&&Ly(i.canLoad)}(a)?a.canLoad(t,e):i.runInContext(()=>a(t,e)))})).pipe(bm(),S3())}(t,e,n).pipe(Ji(r=>r?this.configLoader.loadChildren(t,e).pipe(Ui(s=>{e._loadedRoutes=s.routes,e._loadedInjector=s.injector})):function xX(i){return hm(v3(yM,3))}())):ut({routes:[],injector:t})}lineralizeSegments(t,e){let n=[],r=e.root;for(;;){if(n=n.concat(r.segments),0===r.numberOfChildren)return ut(n);if(r.numberOfChildren>1||!r.children[gn])return t.redirectTo,hm(new pe(4e3,yM));r=r.children[gn]}}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 su(s,this.createQueryParams(e.queryParams,this.urlTree.queryParams),e.fragment)}createQueryParams(t,e){const n={};return os(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 os(e.children,(a,l)=>{o[l]=this.createSegmentGroup(t,a,n,r)}),new Dn(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 pe(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 SX{}class DX{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,gn).pipe(et(e=>{if(null===e)return null;const n=new fM([],Object.freeze({}),Object.freeze({...this.urlTree.queryParams}),this.urlTree.fragment,{},gn,this.rootComponentType,null,this.urlTree.root,-1,{}),r=new Nc(n,e),s=new m3(this.url,r);return this.inheritParamsAndData(s._root),s}))}inheritParamsAndData(t){const e=t.value,n=p3(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 Li(Object.keys(n.children)).pipe(nu(r=>{const s=n.children[r],o=M3(e,r);return this.processSegmentGroup(t,o,s,r)}),ZT((r,s)=>r&&s?(r.push(...s),r):null),HB(r=>null!==r),iM(null),zB(),et(r=>{if(null===r)return null;const s=k3(r);return function TX(i){i.sort((t,e)=>t.value.outlet===gn?-1:e.value.outlet===gn?1:t.value.outlet.localeCompare(e.value.outlet))}(s),s}))}processSegment(t,e,n,r,s){return Li(e).pipe(nu(o=>this.processSegmentAgainstRoute(o._injector??t,o,n,r,s)),tu(o=>!!o),Lc(o=>{if(gI(o))return D3(n,r,s)?ut([]):ut(null);throw o}))}processSegmentAgainstRoute(t,e,n,r,s){if(e.redirectTo||!A3(e,n,r,s))return ut(null);let o;if("**"===e.path){const a=r.length>0?jB(r).parameters:{},l=O3(n)+r.length;o=ut({snapshot:new fM(r,a,Object.freeze({...this.urlTree.queryParams}),this.urlTree.fragment,F3(e),Ca(e),e.component??e._loadedComponent??null,e,P3(n),l,L3(e)),consumedSegments:[],remainingSegments:[]})}else o=E3(n,e,r,t).pipe(et(({matched:a,consumedSegments:l,remainingSegments:c,parameters:d})=>{if(!a)return null;const h=O3(n)+l.length;return{snapshot:new fM(l,d,Object.freeze({...this.urlTree.queryParams}),this.urlTree.fragment,F3(e),Ca(e),e.component??e._loadedComponent??null,e,P3(n),h,L3(e)),consumedSegments:l,remainingSegments:c}}));return o.pipe(Rs(a=>{if(null===a)return ut(null);const{snapshot:l,consumedSegments:c,remainingSegments:d}=a;t=e._injector??t;const h=e._loadedInjector??t,p=function IX(i){return i.children?i.children:i.loadChildren?i._loadedRoutes:[]}(e),{segmentGroup:m,slicedSegments:g}=_M(n,c,d,p.filter(v=>void 0===v.redirectTo));if(0===g.length&&m.hasChildren())return this.processChildren(h,p,m).pipe(et(v=>null===v?null:[new Nc(l,v)]));if(0===p.length&&0===g.length)return ut([new Nc(l,[])]);const b=Ca(e)===s;return this.processSegment(h,p,m,g,b?gn:s).pipe(et(v=>null===v?null:[new Nc(l,v)]))}))}}function RX(i){const t=i.value.routeConfig;return t&&""===t.path&&void 0===t.redirectTo}function k3(i){const t=[],e=new Set;for(const n of i){if(!RX(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=k3(n.children);t.push(new Nc(n.value,r))}return t.filter(n=>!e.has(n))}function P3(i){let t=i;for(;t._sourceSegment;)t=t._sourceSegment;return t}function O3(i){let t=i,e=t._segmentIndexShift??0;for(;t._sourceSegment;)t=t._sourceSegment,e+=t._segmentIndexShift??0;return e-1}function F3(i){return i.data||{}}function L3(i){return i.resolve||{}}function N3(i){return"string"==typeof i.title||null===i.title}function yI(i){return Rs(t=>{const e=i(t);return e?Li(e).pipe(et(()=>t)):ut(t)})}const xm=new me("ROUTES");let bI=(()=>{class i{constructor(){this.componentLoaders=new WeakMap,this.childrenLoaders=new WeakMap,this.compiler=Pt(uN)}loadComponent(e){if(this.componentLoaders.get(e))return this.componentLoaders.get(e);if(e._loadedComponent)return ut(e._loadedComponent);this.onLoadStartListener&&this.onLoadStartListener(e);const n=ru(e.loadComponent()).pipe(et(U3),Ui(s=>{this.onLoadEndListener&&this.onLoadEndListener(e),e._loadedComponent=s}),iu(()=>{this.componentLoaders.delete(e)})),r=new UB(n,()=>new Re).pipe(KT());return this.componentLoaders.set(e,r),r}loadChildren(e,n){if(this.childrenLoaders.get(n))return this.childrenLoaders.get(n);if(n._loadedRoutes)return ut({routes:n._loadedRoutes,injector:n._loadedInjector});this.onLoadStartListener&&this.onLoadStartListener(n);const s=this.loadModuleFactoryOrRoutes(n.loadChildren).pipe(et(a=>{this.onLoadEndListener&&this.onLoadEndListener(n);let l,c,d=!1;Array.isArray(a)?c=a:(l=a.create(e).injector,c=WB(l.get(xm,[],kt.Self|kt.Optional)));return{routes:c.map(mI),injector:l}}),iu(()=>{this.childrenLoaders.delete(n)})),o=new UB(s,()=>new Re).pipe(KT());return this.childrenLoaders.set(n,o),o}loadModuleFactoryOrRoutes(e){return ru(e()).pipe(et(U3),Ji(n=>n instanceof C2||Array.isArray(n)?ut(n):Li(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 U3(i){return function UX(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 Re,this.configLoader=Pt(bI),this.environmentInjector=Pt(eo),this.urlSerializer=Pt(Ey),this.rootContexts=Pt(ky),this.navigationId=0,this.afterPreactivation=()=>ut(void 0),this.rootComponentType=null,this.configLoader.onLoadEndListener=r=>this.events.next(new Eq(r)),this.configLoader.onLoadStartListener=r=>this.events.next(new Sq(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:Iy,restoredState:null,currentSnapshot:e.routerState.snapshot,targetSnapshot:null,currentRouterState:e.routerState,targetRouterState:null,guards:{canActivateChecks:[],canDeactivateChecks:[]},guardsResult:null}),this.transitions.pipe(vn(n=>0!==n.id),et(n=>({...n,extractedUrl:e.urlHandlingStrategy.extract(n.rawUrl)})),Rs(n=>{let r=!1,s=!1;return ut(n).pipe(Ui(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}}),Rs(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 d="";return this.events.next(new hM(o.id,e.serializeUrl(n.rawUrl),d,0)),e.rawUrlTree=o.rawUrl,o.resolve(null),fo}if(e.urlHandlingStrategy.shouldProcessUrl(o.rawUrl))return V3(o.source)&&(e.browserUrlTree=o.extractedUrl),ut(o).pipe(Rs(d=>{const h=this.transitions?.getValue();return this.events.next(new sI(d.id,this.urlSerializer.serialize(d.extractedUrl),d.source,d.restoredState)),h!==this.transitions?.getValue()?fo:Promise.resolve(d)}),function CX(i,t,e,n){return Rs(r=>function wX(i,t,e,n,r){return new MX(i,t,e,n,r).apply()}(i,t,e,r.extractedUrl,n).pipe(et(s=>({...r,urlAfterRedirects:s}))))}(this.environmentInjector,this.configLoader,this.urlSerializer,e.config),Ui(d=>{this.currentNavigation={...this.currentNavigation,finalUrl:d.urlAfterRedirects},n.urlAfterRedirects=d.urlAfterRedirects}),function PX(i,t,e,n,r){return Ji(s=>function AX(i,t,e,n,r,s,o="emptyOnly"){return new DX(i,t,e,n,r,o,s).recognize().pipe(Rs(a=>null===a?function EX(i){return new Tn(t=>t.error(i))}(new SX):ut(a)))}(i,t,e,s.urlAfterRedirects,n.serialize(s.urlAfterRedirects),n,r).pipe(et(o=>({...s,targetSnapshot:o}))))}(this.environmentInjector,this.rootComponentType,e.config,this.urlSerializer,e.paramsInheritanceStrategy),Ui(d=>{if(n.targetSnapshot=d.targetSnapshot,"eager"===e.urlUpdateStrategy){if(!d.extras.skipLocationChange){const p=e.urlHandlingStrategy.merge(d.urlAfterRedirects,d.rawUrl);e.setBrowserUrl(p,d)}e.browserUrlTree=d.urlAfterRedirects}const h=new bq(d.id,this.urlSerializer.serialize(d.extractedUrl),this.urlSerializer.serialize(d.urlAfterRedirects),d.targetSnapshot);this.events.next(h)}));if(l&&e.urlHandlingStrategy.shouldProcessUrl(e.rawUrlTree)){const{id:d,extractedUrl:h,source:p,restoredState:m,extras:g}=o,b=new sI(d,this.urlSerializer.serialize(h),p,m);this.events.next(b);const v=f3(h,this.rootComponentType).snapshot;return ut(n={...o,targetSnapshot:v,urlAfterRedirects:h,extras:{...g,skipLocationChange:!1,replaceUrl:!1}})}{const d="";return this.events.next(new hM(o.id,e.serializeUrl(n.extractedUrl),d,1)),e.rawUrlTree=o.rawUrl,o.resolve(null),fo}}),Ui(o=>{const a=new xq(o.id,this.urlSerializer.serialize(o.extractedUrl),this.urlSerializer.serialize(o.urlAfterRedirects),o.targetSnapshot);this.events.next(a)}),et(o=>n={...o,guards:Xq(o.targetSnapshot,o.currentSnapshot,this.rootContexts)}),function oX(i,t){return Ji(e=>{const{targetSnapshot:n,currentSnapshot:r,guards:{canActivateChecks:s,canDeactivateChecks:o}}=e;return 0===o.length&&0===s.length?ut({...e,guardsResult:!0}):function aX(i,t,e,n){return Li(i).pipe(Ji(r=>function fX(i,t,e,n,r){const s=t&&t.routeConfig?t.routeConfig.canDeactivate:null;return s&&0!==s.length?ut(s.map(a=>{const l=Py(t)??r,c=ym(a,l);return ru(function iX(i){return i&&Ly(i.canDeactivate)}(c)?c.canDeactivate(i,t,e,n):l.runInContext(()=>c(i,t,e,n))).pipe(tu())})).pipe(bm()):ut(!0)}(r.component,r.route,e,t,n)),tu(r=>!0!==r,!0))}(o,n,r,i).pipe(Ji(a=>a&&function Jq(i){return"boolean"==typeof i}(a)?function lX(i,t,e,n){return Li(t).pipe(nu(r=>wy(function dX(i,t){return null!==i&&t&&t(new Aq(i)),ut(!0)}(r.route.parent,n),function cX(i,t){return null!==i&&t&&t(new Tq(i)),ut(!0)}(r.route,n),function hX(i,t,e){const n=t[t.length-1],s=t.slice(0,t.length-1).reverse().map(o=>function Kq(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=>My(()=>ut(o.guards.map(l=>{const c=Py(o.node)??e,d=ym(l,c);return ru(function nX(i){return i&&Ly(i.canActivateChild)}(d)?d.canActivateChild(n,i):c.runInContext(()=>d(n,i))).pipe(tu())})).pipe(bm())));return ut(s).pipe(bm())}(i,r.path,e),function uX(i,t,e){const n=t.routeConfig?t.routeConfig.canActivate:null;if(!n||0===n.length)return ut(!0);const r=n.map(s=>My(()=>{const o=Py(t)??e,a=ym(s,o);return ru(function tX(i){return i&&Ly(i.canActivate)}(a)?a.canActivate(t,i):o.runInContext(()=>a(t,i))).pipe(tu())}));return ut(r).pipe(bm())}(i,r.route,e))),tu(r=>!0!==r,!0))}(n,s,i,t):ut(a)),et(a=>({...e,guardsResult:a})))})}(this.environmentInjector,o=>this.events.next(o)),Ui(o=>{if(n.guardsResult=o.guardsResult,Ah(o.guardsResult))throw _3(0,o.guardsResult);const a=new wq(o.id,this.urlSerializer.serialize(o.extractedUrl),this.urlSerializer.serialize(o.urlAfterRedirects),o.targetSnapshot,!!o.guardsResult);this.events.next(a)}),vn(o=>!!o.guardsResult||(e.restoreHistory(o),this.cancelNavigationTransition(o,"",3),!1)),yI(o=>{if(o.guards.canActivateChecks.length)return ut(o).pipe(Ui(a=>{const l=new Mq(a.id,this.urlSerializer.serialize(a.extractedUrl),this.urlSerializer.serialize(a.urlAfterRedirects),a.targetSnapshot);this.events.next(l)}),Rs(a=>{let l=!1;return ut(a).pipe(function OX(i,t){return Ji(e=>{const{targetSnapshot:n,guards:{canActivateChecks:r}}=e;if(!r.length)return ut(e);let s=0;return Li(r).pipe(nu(o=>function FX(i,t,e,n){const r=i.routeConfig,s=i._resolve;return void 0!==r?.title&&!N3(r)&&(s[Cy]=r.title),function LX(i,t,e,n){const r=function NX(i){return[...Object.keys(i),...Object.getOwnPropertySymbols(i)]}(i);if(0===r.length)return ut({});const s={};return Li(r).pipe(Ji(o=>function BX(i,t,e,n){const r=Py(t)??n,s=ym(i,r);return ru(s.resolve?s.resolve(t,e):r.runInContext(()=>s(t,e)))}(i[o],t,e,n).pipe(tu(),Ui(a=>{s[o]=a}))),QT(1),GB(s),Lc(o=>gI(o)?fo:hm(o)))}(s,i,t,n).pipe(et(o=>(i._resolvedData=o,i.data=p3(i,e).resolve,r&&N3(r)&&(i.data[Cy]=r.title),null)))}(o.route,n,i,t)),Ui(()=>s++),QT(1),Ji(o=>s===r.length?ut(e):fo))})}(e.paramsInheritanceStrategy,this.environmentInjector),Ui({next:()=>l=!0,complete:()=>{l||(e.restoreHistory(a),this.cancelNavigationTransition(a,"",2))}}))}),Ui(a=>{const l=new Cq(a.id,this.urlSerializer.serialize(a.extractedUrl),this.urlSerializer.serialize(a.urlAfterRedirects),a.targetSnapshot);this.events.next(l)}))}),yI(o=>{const a=l=>{const c=[];l.routeConfig?.loadComponent&&!l.routeConfig._loadedComponent&&c.push(this.configLoader.loadComponent(l.routeConfig).pipe(Ui(d=>{l.component=d}),et(()=>{})));for(const d of l.children)c.push(...a(d));return c};return eu(a(o.targetSnapshot.root)).pipe(iM(),Pi(1))}),yI(()=>this.afterPreactivation()),et(o=>{const a=function Bq(i,t,e){const n=Ry(i,t._root,e?e._root:void 0);return new h3(n,t)}(e.routeReuseStrategy,o.targetSnapshot,o.currentRouterState);return n={...o,targetRouterState:a}}),Ui(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)=>et(n=>(new qq(t,n.targetRouterState,n.currentRouterState,e).activate(i),n)))(this.rootContexts,e.routeReuseStrategy,o=>this.events.next(o)),Pi(1),Ui({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}}),iu(()=>{r||s||this.cancelNavigationTransition(n,"",1),this.currentNavigation?.id===n.id&&(this.currentNavigation=null)}),Lc(o=>{if(s=!0,b3(o)){y3(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),y3(o)){const l=e.urlHandlingStrategy.merge(o.url,e.rawUrlTree),c={skipLocationChange:n.extras.skipLocationChange,replaceUrl:"eager"===e.urlUpdateStrategy||V3(n.source)};e.scheduleNavigation(l,Iy,null,c,{resolve:n.resolve,reject:n.reject,promise:n.promise})}else n.resolve(!1)}else{e.restoreHistory(n,!0);const a=new oI(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 fo}))}))}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 V3(i){return i!==Iy}let z3=(()=>{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===gn);return n}getResolvedTitleForRoute(e){return e.data[Cy]}}return i.\u0275fac=function(e){return new(e||i)},i.\u0275prov=Ie({token:i,factory:function(){return Pt(VX)},providedIn:"root"}),i})(),VX=(()=>{class i extends z3{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)(ee(kB))},i.\u0275prov=Ie({token:i,factory:i.\u0275fac,providedIn:"root"}),i})(),zX=(()=>{class i{}return i.\u0275fac=function(e){return new(e||i)},i.\u0275prov=Ie({token:i,factory:function(){return Pt(GX)},providedIn:"root"}),i})();class HX{shouldDetach(t){return!1}store(t,e){}shouldAttach(t){return!1}retrieve(t){return null}shouldReuseRoute(t,e){return t.routeConfig===e.routeConfig}}let GX=(()=>{class i extends HX{}return i.\u0275fac=function(){let t;return function(n){return(t||(t=ni(i)))(n||i)}}(),i.\u0275prov=Ie({token:i,factory:i.\u0275fac,providedIn:"root"}),i})();const MM=new me("",{providedIn:"root",factory:()=>({})});let WX=(()=>{class i{}return i.\u0275fac=function(e){return new(e||i)},i.\u0275prov=Ie({token:i,factory:function(){return Pt(jX)},providedIn:"root"}),i})(),jX=(()=>{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 YX(i){throw i}function qX(i,t,e){return t.parse("/")}const XX={paths:"exact",fragment:"ignored",matrixParams:"ignored",queryParams:"exact"},KX={paths:"subset",fragment:"ignored",matrixParams:"ignored",queryParams:"subset"};let $o=(()=>{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=Pt(I6),this.isNgZoneEnabled=!1,this.options=Pt(MM,{optional:!0})||{},this.errorHandler=this.options.errorHandler||YX,this.malformedUriErrorHandler=this.options.malformedUriErrorHandler||qX,this.navigated=!1,this.lastSuccessfulId=-1,this.urlHandlingStrategy=Pt(WX),this.routeReuseStrategy=Pt(zX),this.urlCreationStrategy=Pt(Fq),this.titleStrategy=Pt(z3),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=WB(Pt(xm,{optional:!0})??[]),this.navigationTransitions=Pt(wM),this.urlSerializer=Pt(Ey),this.location=Pt(py),this.isNgZoneEnabled=Pt(ht)instanceof ht&&ht.isInAngularZone(),this.resetConfig(this.config),this.currentUrlTree=new su,this.rawUrlTree=this.currentUrlTree,this.browserUrlTree=this.currentUrlTree,this.routerState=f3(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),Iy,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(mI),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 d=null;switch(a){case"merge":d={...this.currentUrlTree.queryParams,...s};break;case"preserve":d=this.currentUrlTree.queryParams;break;default:d=s||null}return null!==d&&(d=this.removeEmptyProps(d)),this.urlCreationStrategy.createUrlTree(r,this.routerState,this.currentUrlTree,e,d,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,Iy,null,n)}navigate(e,n={skipLocationChange:!1}){return function ZX(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,d;return o?(a=o.resolve,l=o.reject,c=o.promise):c=new Promise((h,p)=>{a=h,l=p}),d="computed"===this.canceledNavigationResolution?r&&r.\u0275routerPageId?r.\u0275routerPageId:(this.browserPageId??0)+1:0,this.navigationTransitions.handleNavigationRequest({targetPageId:d,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 H3{}let eK=(()=>{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(vn(e=>e instanceof Dh),nu(()=>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 Li(r).pipe(_d())}preloadConfig(e,n){return this.preloadingStrategy.preload(n,()=>{let r;r=n.loadChildren&&void 0===n.canLoad?this.loader.loadChildren(e,n):ut(null);const s=r.pipe(Ji(o=>null===o?ut(void 0):(n._loadedRoutes=o.routes,n._loadedInjector=o.injector,this.processRoutes(o.injector??e,o.routes))));return n.loadComponent&&!n._loadedComponent?Li([s,this.loader.loadComponent(n)]).pipe(_d()):s})}}return i.\u0275fac=function(e){return new(e||i)(ee($o),ee(uN),ee(eo),ee(H3),ee(bI))},i.\u0275prov=Ie({token:i,factory:i.\u0275fac,providedIn:"root"}),i})();const MI=new me("");let G3=(()=>{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 sI?(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 d3&&(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 d3(e,"popstate"===this.lastSource?this.store[this.restoredId]:null,n))})},0)})}ngOnDestroy(){this.routerEventsSubscription?.unsubscribe(),this.scrollEventsSubscription?.unsubscribe()}}return i.\u0275fac=function(e){bo()},i.\u0275prov=Ie({token:i,factory:i.\u0275fac}),i})();var Wo=(()=>((Wo=Wo||{})[Wo.COMPLETE=0]="COMPLETE",Wo[Wo.FAILED=1]="FAILED",Wo[Wo.REDIRECTING=2]="REDIRECTING",Wo))();const wm=!1;function ou(i,t){return{\u0275kind:i,\u0275providers:t}}const CI=new me("",{providedIn:"root",factory:()=>!1});function W3(){const i=Pt(Gi);return t=>{const e=i.get(lm);if(t!==e.components[0])return;const n=i.get($o),r=i.get(j3);1===i.get(SI)&&n.initialNavigation(),i.get(Y3,null,kt.Optional)?.setUpPreloading(),i.get(MI,null,kt.Optional)?.init(),n.resetRootComponentType(e.componentTypes[0]),r.closed||(r.next(),r.complete(),r.unsubscribe())}}const j3=new me(wm?"bootstrap done indicator":"",{factory:()=>new Re}),SI=new me(wm?"initial navigation":"",{providedIn:"root",factory:()=>1});function sK(){let i=[];return i=wm?[{provide:Fp,multi:!0,useFactory:()=>{const t=Pt($o);return()=>t.events.subscribe(e=>{console.group?.(`Router Event: ${e.constructor.name}`),console.log(function Rq(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?.()})}}]:[],ou(1,i)}const Y3=new me(wm?"router preloader":"");function oK(i){return ou(0,[{provide:Y3,useExisting:eK},{provide:H3,useExisting:i}])}const By=!1,q3=new me(By?"router duplicate forRoot guard":"ROUTER_FORROOT_GUARD"),aK=[py,{provide:Ey,useClass:JT},$o,ky,{provide:vm,useFactory:function $3(i){return i.routerState.root},deps:[$o]},bI,By?{provide:CI,useValue:!0}:[]];function lK(){return new yN("Router",$o)}let X3=(()=>{class i{constructor(e){}static forRoot(e,n){return{ngModule:i,providers:[aK,By&&n?.enableTracing?sK().\u0275providers:[],{provide:xm,multi:!0,useValue:e},{provide:q3,useFactory:hK,deps:[[$o,new Ss,new _a]]},{provide:MM,useValue:n||{}},n?.useHash?{provide:Sh,useClass:v9}:{provide:Sh,useClass:HN},{provide:MI,useFactory:()=>{const i=Pt(PY),t=Pt(ht),e=Pt(MM),n=Pt(wM),r=Pt(Ey);return e.scrollOffset&&i.setOffset(e.scrollOffset),new G3(r,n,i,t,e)}},n?.preloadingStrategy?oK(n.preloadingStrategy).\u0275providers:[],{provide:yN,multi:!0,useFactory:lK},n?.initialNavigation?fK(n):[],[{provide:K3,useFactory:W3},{provide:vN,multi:!0,useExisting:K3}]]}}static forChild(e){return{ngModule:i,providers:[{provide:xm,multi:!0,useValue:e}]}}}return i.\u0275fac=function(e){return new(e||i)(ee(q3,8))},i.\u0275mod=nn({type:i}),i.\u0275inj=Xt({imports:[fI]}),i})();function hK(i){if(By&&i)throw new pe(4007,"The Router was provided more than once. This can happen if 'forRoot' is used outside of the root injector. Lazy loaded modules should use RouterModule.forChild() instead.");return"guarded"}function fK(i){return["disabled"===i.initialNavigation?ou(3,[{provide:Ow,multi:!0,useFactory:()=>{const t=Pt($o);return()=>{t.setUpLocationChangeListener()}}},{provide:SI,useValue:2}]).\u0275providers:[],"enabledBlocking"===i.initialNavigation?ou(2,[{provide:SI,useValue:0},{provide:Ow,multi:!0,deps:[Gi],useFactory:t=>{const e=t.get(g9,Promise.resolve());return()=>e.then(()=>new Promise(n=>{const r=t.get($o),s=t.get(j3);(function tK(i,t){i.events.pipe(vn(e=>e instanceof Dh||e instanceof uM||e instanceof oI||e instanceof hM),et(e=>e instanceof Dh||e instanceof hM?Wo.COMPLETE:e instanceof uM&&(0===e.code||1===e.code)?Wo.REDIRECTING:Wo.FAILED),vn(e=>e!==Wo.REDIRECTING),Pi(1)).subscribe(()=>{t()})})(r,()=>{n(!0)}),t.get(wM).afterPreactivation=()=>(n(!0),s.closed?ut(void 0):s),r.initialNavigation()}))}}]).\u0275providers:[]]}const K3=new me(By?"Router Initializer":""),mK=[];let gK=(()=>{class i{}return i.\u0275fac=function(e){return new(e||i)},i.\u0275mod=nn({type:i}),i.\u0275inj=Xt({imports:[X3.forRoot(mK),X3]}),i})();function Z3(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){Z3(s,n,r,o,a,"next",l)}function a(l){Z3(s,n,r,o,a,"throw",l)}o(void 0)})}}function Jt(i){return null!=i&&"false"!=`${i}`}function ks(i,t=0){return function _K(i){return!isNaN(parseFloat(i))&&!isNaN(Number(i))}(i)?Number(i):t}function CM(i){return Array.isArray(i)?i:[i]}function pr(i){return null==i?"":"string"==typeof i?i:`${i}px`}function Bc(i){return i instanceof pt?i.nativeElement:i}const vK=["addListener","removeListener"],yK=["addEventListener","removeEventListener"],bK=["on","off"];function Sa(i,t,e,n){if(ln(e)&&(n=e,e=void 0),n)return Sa(i,t,e).pipe(XT(n));const[r,s]=function MK(i){return ln(i.addEventListener)&&ln(i.removeEventListener)}(i)?yK.map(o=>a=>i[o](t,a,e)):function xK(i){return ln(i.addListener)&&ln(i.removeListener)}(i)?vK.map(Q3(i,t)):function wK(i){return ln(i.on)&&ln(i.off)}(i)?bK.map(Q3(i,t)):[];if(!r&&e_(i))return Ji(o=>Sa(o,t,e))(wr(i));if(!r)throw new TypeError("Invalid event target");return new Tn(o=>{const a=(...l)=>o.next(1s(a)})}function Q3(i,t){return e=>n=>i[e](t,n)}class CK extends Kt{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 EI extends CK{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,Kr(n,this),null!=t&&(this.id=this.recycleAsyncId(e,t,null)),this.delay=null,super.unsubscribe()}}}const Uy={schedule(i){let t=requestAnimationFrame,e=cancelAnimationFrame;const{delegate:n}=Uy;n&&(t=n.requestAnimationFrame,e=n.cancelAnimationFrame);const r=t(s=>{e=void 0,i(s)});return new Kt(()=>e?.(r))},requestAnimationFrame(...i){const{delegate:t}=Uy;return(t?.requestAnimationFrame||requestAnimationFrame)(...i)},cancelAnimationFrame(...i){const{delegate:t}=Uy;return(t?.cancelAnimationFrame||cancelAnimationFrame)(...i)},delegate:void 0},J3={now:()=>(J3.delegate||Date).now(),delegate:void 0};class Vy{constructor(t,e=Vy.now){this.schedulerActionCtor=t,this.now=e}schedule(t,e=0,n){return new this.schedulerActionCtor(this,t).schedule(n,e)}}Vy.now=J3.now;class AI extends Vy{constructor(t,e=Vy.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 AK=new class EK extends AI{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 SK extends EI{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=Uy.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&&(Uy.cancelAnimationFrame(e),t._scheduled=void 0)}});let DI,DK=1;const EM={};function eU(i){return i in EM&&(delete EM[i],!0)}const TK={setImmediate(i){const t=DK++;return EM[t]=!0,DI||(DI=Promise.resolve()),DI.then(()=>eU(t)&&i()),t},clearImmediate(i){eU(i)}},{setImmediate:IK,clearImmediate:RK}=TK,AM={setImmediate(...i){const{delegate:t}=AM;return(t?.setImmediate||IK)(...i)},clearImmediate(i){const{delegate:t}=AM;return(t?.clearImmediate||RK)(i)},delegate:void 0},TI=new class PK extends AI{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 kK extends EI{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))}}),zy=new AI(EI),OK=zy;function II(i=0,t,e=OK){let n=-1;return null!=t&&(Bu(t)?e=t:n=t),new Tn(r=>{let s=function LK(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 DM(i,t=zy){return function FK(i){return Jn((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(jn(e,c=>{n=!0,r=c,s||wr(i(c)).subscribe(s=jn(e,a,l))},()=>{o=!0,(!n||!s||s.closed)&&e.complete()}))})}(()=>II(i,t))}function Xe(i){return Jn((t,e)=>{wr(i).subscribe(jn(e,()=>e.complete(),ms)),!e.closed&&t.subscribe(e)})}let RI;try{RI=typeof Intl<"u"&&Intl.v8BreakIterator}catch{RI=!1}let Mm,Vi=(()=>{class i{constructor(e){this._platformId=e,this.isBrowser=this._platformId?function kY(i){return i===lB}(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&&!RI)&&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)(ee(cT))},i.\u0275prov=Ie({token:i,factory:i.\u0275fac,providedIn:"root"}),i})();const tU=["color","button","checkbox","date","datetime-local","email","file","hidden","image","month","number","password","radio","range","reset","search","submit","tel","text","time","url","week"];function nU(){if(Mm)return Mm;if("object"!=typeof document||!document)return Mm=new Set(tU),Mm;let i=document.createElement("input");return Mm=new Set(tU.filter(t=>(i.setAttribute("type",t),i.type===t))),Mm}let Hy,TM,Ih,kI;function Th(i){return function NK(){if(null==Hy&&typeof window<"u")try{window.addEventListener("test",null,Object.defineProperty({},"passive",{get:()=>Hy=!0}))}finally{Hy=Hy||!1}return Hy}()?i:!!i.capture}function iU(){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 Gy(){if("object"!=typeof document||!document)return 0;if(null==TM){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),TM=0,0===i.scrollLeft&&(i.scrollLeft=1,TM=0===i.scrollLeft?1:2),i.remove()}return TM}function IM(){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 au(i){return i.composedPath?i.composedPath()[0]:i.target}function PI(){return typeof __karma__<"u"&&!!__karma__||typeof jasmine<"u"&&!!jasmine||typeof jest<"u"&&!!jest||typeof Mocha<"u"&&!!Mocha}const VK=new me("cdk-dir-doc",{providedIn:"root",factory:function zK(){return Pt(Wt)}}),HK=/^(ar|ckb|dv|he|iw|fa|nqo|ps|sd|ug|ur|yi|.*[-_](Adlm|Arab|Hebr|Nkoo|Rohg|Thaa))(?!.*[-_](Latn|Cyrl)($|-|_))($|-|_)/i;let Ea=(()=>{class i{constructor(e){this.value="ltr",this.change=new We,e&&(this.value=function GK(i){const t=i?.toLowerCase()||"";return"auto"===t&&typeof navigator<"u"&&navigator?.language?HK.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)(ee(VK,8))},i.\u0275prov=Ie({token:i,factory:i.\u0275fac,providedIn:"root"}),i})(),$y=(()=>{class i{}return i.\u0275fac=function(e){return new(e||i)},i.\u0275mod=nn({type:i}),i.\u0275inj=Xt({}),i})();const $K=["contentWrapper"],WK=["*"],jK=new me("VIRTUAL_SCROLL_STRATEGY");let Wy=(()=>{class i{constructor(e,n,r){this._ngZone=e,this._platform=n,this._scrolled=new Re,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 Tn(n=>{this._globalSubscription||this._addGlobalListener();const r=e>0?this._scrolled.pipe(DM(e)).subscribe(n):this._scrolled.subscribe(n);return this._scrolledCount++,()=>{r.unsubscribe(),this._scrolledCount--,this._scrolledCount||this._removeGlobalListener()}}):ut()}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(vn(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=Bc(n),s=e.getElementRef().nativeElement;do{if(r==s)return!0}while(r=r.parentElement);return!1}_addGlobalListener(){this._globalSubscription=this._ngZone.runOutsideAngular(()=>Sa(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)(ee(ht),ee(Vi),ee(Wt,8))},i.\u0275prov=Ie({token:i,factory:i.\u0275fac,providedIn:"root"}),i})(),rU=(()=>{class i{constructor(e,n,r,s){this.elementRef=e,this.scrollDispatcher=n,this.ngZone=r,this.dir=s,this._destroyed=new Re,this._elementScrolled=new Tn(o=>this.ngZone.runOutsideAngular(()=>Sa(this.elementRef.nativeElement,"scroll").pipe(Xe(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!=Gy()?(null!=e.left&&(e.right=n.scrollWidth-n.clientWidth-e.left),2==Gy()?e.left=e.right:1==Gy()&&(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;iU()?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==Gy()?e==n?s.scrollWidth-s.clientWidth-s.scrollLeft:s.scrollLeft:o&&1==Gy()?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)(E(pt),E(Wy),E(ht),E(Ea,8))},i.\u0275dir=ve({type:i,selectors:[["","cdk-scrollable",""],["","cdkScrollable",""]],standalone:!0}),i})(),RM=(()=>{class i{constructor(e,n,r){this._platform=e,this._change=new Re,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(DM(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)(ee(Vi),ee(ht),ee(Wt,8))},i.\u0275prov=Ie({token:i,factory:i.\u0275fac,providedIn:"root"}),i})();const sU=new me("VIRTUAL_SCROLLABLE");let XK=(()=>{class i extends rU{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)(E(pt),E(Wy),E(ht),E(Ea,8))},i.\u0275dir=ve({type:i,features:[at]}),i})();const ZK=typeof requestAnimationFrame<"u"?AK:TI;let QK=(()=>{class i extends XK{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=Pt(Vi),this._detachedSubject=new Re,this._renderedRangeSubject=new Re,this._orientation="vertical",this._appendOnly=!1,this.scrolledIndexChange=new Tn(d=>this._scrollStrategy.scrolledIndexChange.subscribe(h=>Promise.resolve().then(()=>this.ngZone.run(()=>d.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=Kt.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(Eo(null),DM(0,ZK)).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(Xe(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 KK(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)(E(pt),E(ri),E(ht),E(jK,8),E(Ea,8),E(Wy),E(RM),E(sU,8))},i.\u0275cmp=ot({type:i,selectors:[["cdk-virtual-scroll-viewport"]],viewQuery:function(e,n){if(1&e&&ii($K,7),2&e){let r;Tt(r=It())&&(n._contentWrapper=r.first)}},hostAttrs:[1,"cdk-virtual-scroll-viewport"],hostVars:4,hostBindings:function(e,n){2&e&&un("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:rU,useFactory:(t,e)=>t||e,deps:[[new Ss,new _o(sU)],i]}]),at,Y1],ngContentSelectors:WK,decls:4,vars:4,consts:[[1,"cdk-virtual-scroll-content-wrapper"],["contentWrapper",""],[1,"cdk-virtual-scroll-spacer"]],template:function(e,n){1&e&&(nr(),W(0,"div",0,1),Gt(2),q(),ke(3,"div",2)),2&e&&(G(3),Go("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})(),jy=(()=>{class i{}return i.\u0275fac=function(e){return new(e||i)},i.\u0275mod=nn({type:i}),i.\u0275inj=Xt({}),i})(),oU=(()=>{class i{}return i.\u0275fac=function(e){return new(e||i)},i.\u0275mod=nn({type:i}),i.\u0275inj=Xt({imports:[$y,jy,QK,$y,jy]}),i})();class OI{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 OI{constructor(t,e,n,r,s){super(),this.component=t,this.viewContainerRef=e,this.injector=n,this.componentFactoryResolver=r,this.projectableNodes=s}}class Cm extends OI{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 JK extends OI{constructor(t){super(),this.element=t instanceof pt?t.nativeElement:t}}class kM{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 Cm?(this._attachedPortal=t,this.attachTemplatePortal(t)):this.attachDomPortal&&t instanceof JK?(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 eZ extends kM{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||Gi.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 Sm=(()=>{class i extends kM{constructor(e,n,r){super(),this._componentFactoryResolver=e,this._viewContainerRef=n,this._isInitialized=!1,this.attached=new We,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)(E(Ol),E(Wr),E(Wt))},i.\u0275dir=ve({type:i,selectors:[["","cdkPortalOutlet",""]],inputs:{portal:["cdkPortalOutlet","portal"]},outputs:{attached:"attached"},exportAs:["cdkPortalOutlet"],features:[at]}),i})(),kh=(()=>{class i{}return i.\u0275fac=function(e){return new(e||i)},i.\u0275mod=nn({type:i}),i.\u0275inj=Xt({}),i})();function jo(i,...t){return t.length?t.some(e=>i[e]):i.altKey||i.shiftKey||i.ctrlKey||i.metaKey}const aU=iU();class pZ{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=pr(-this._previousScrollPosition.left),t.style.top=pr(-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"),aU&&(n.scrollBehavior=r.scrollBehavior="auto"),window.scroll(this._previousScrollPosition.left,this._previousScrollPosition.top),aU&&(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 mZ{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(vn(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 lU{enable(){}disable(){}attach(){}}function LI(i,t){return t.some(e=>i.bottome.bottom||i.righte.right)}function cU(i,t){return t.some(e=>i.tope.bottom||i.lefte.right)}class gZ{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();LI(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 _Z=(()=>{class i{constructor(e,n,r,s){this._scrollDispatcher=e,this._viewportRuler=n,this._ngZone=r,this.noop=()=>new lU,this.close=o=>new mZ(this._scrollDispatcher,this._ngZone,this._viewportRuler,o),this.block=()=>new pZ(this._viewportRuler,this._document),this.reposition=o=>new gZ(this._scrollDispatcher,this._viewportRuler,this._ngZone,o),this._document=s}}return i.\u0275fac=function(e){return new(e||i)(ee(Wy),ee(RM),ee(ht),ee(Wt))},i.\u0275prov=Ie({token:i,factory:i.\u0275fac,providedIn:"root"}),i})();class Im{constructor(t){if(this.scrollStrategy=new lU,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 vZ{constructor(t,e){this.connectionPair=t,this.scrollableViewProperties=e}}let dU=(()=>{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)(ee(Wt))},i.\u0275prov=Ie({token:i,factory:i.\u0275fac,providedIn:"root"}),i})(),yZ=(()=>{class i extends dU{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)(ee(Wt),ee(ht,8))},i.\u0275prov=Ie({token:i,factory:i.\u0275fac,providedIn:"root"}),i})(),bZ=(()=>{class i extends dU{constructor(e,n,r){super(e),this._platform=n,this._ngZone=r,this._cursorStyleIsSet=!1,this._pointerDownListener=s=>{this._pointerDownEventTarget=au(s)},this._clickListener=s=>{const o=au(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 d=l[c];if(d._outsidePointerEvents.observers.length<1||!d.hasAttached())continue;if(d.overlayElement.contains(o)||d.overlayElement.contains(a))break;const h=d._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)(ee(Wt),ee(Vi),ee(ht,8))},i.\u0275prov=Ie({token:i,factory:i.\u0275fac,providedIn:"root"}),i})(),FM=(()=>{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||PI()){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 Re,this._outsidePointerEvents=new Re,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(Pi(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=pr(this._config.width),t.height=pr(this._config.height),t.minWidth=pr(this._config.minWidth),t.minHeight=pr(this._config.minHeight),t.maxWidth=pr(this._config.maxWidth),t.maxHeight=pr(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(Xe(Mr(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 uU="cdk-overlay-connected-position-bounding-box",xZ=/([A-Za-z%]+)$/;class wZ{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 Re,this._resizeSubscription=Kt.EMPTY,this._offsetX=0,this._offsetY=0,this._appliedPanelClasses=[],this.positionChanges=this._positionChanges,this.setOrigin(t)}attach(t){this._validatePositions(),t.hostElement.classList.add(uU),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),d=this._getOverlayFit(c,e,n,a);if(d.isCompletelyWithinViewport)return this._isPushed=!1,void this._applyPosition(a,l);this._canFitWithFlexibleDimensions(d,c,n)?s.push({position:a,origin:l,overlayRect:e,boundingBoxRect:this._calculateBoundingBoxRect(l,a)}):(!o||o.overlayFit.visibleAreal&&(l=d,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(uU),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=fU(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=hU(this._overlayRef.getConfig().minHeight),a=hU(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=fU(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 d=0,h=0;return d=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,d=t.x-this._viewportMargin;else if("start"===e.overlayX&&!r||"end"===e.overlayX&&r)h=t.x,d=n.right-t.x;else{const m=Math.min(n.right-t.x+n.left,t.x),g=this._lastBoundingBoxSize.width;d=2*m,h=t.x-m,d>g&&!this._isInitialRender&&!this._growAfterOpen&&(h=t.x-g/2)}return{top:o,left:h,bottom:a,right:p,width:d,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=pr(n.height),r.top=pr(n.top),r.bottom=pr(n.bottom),r.width=pr(n.width),r.left=pr(n.left),r.right=pr(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=pr(s)),o&&(r.maxWidth=pr(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 d=this._viewportRuler.getViewportScrollPosition();Ph(n,this._getExactOverlayY(e,t,d)),Ph(n,this._getExactOverlayX(e,t,d))}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=pr(o.maxHeight):s&&(n.maxHeight="")),o.maxWidth&&(r?n.maxWidth=pr(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=pr(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=pr(s.x),r}_getScrollVisibility(){const t=this._getOriginRect(),e=this._pane.getBoundingClientRect(),n=this._scrollables.map(r=>r.getElementRef().nativeElement.getBoundingClientRect());return{isOriginClipped:cU(t,n),isOriginOutsideView:LI(t,n),isOverlayClipped:cU(e,n),isOverlayOutsideView:LI(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 pt)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 hU(i){if("number"!=typeof i&&null!=i){const[t,e]=i.split(xZ);return e&&"px"!==e?null:parseFloat(t)}return i||null}function fU(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 pU="cdk-global-overlay-wrapper";class mU{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(pU),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),d=this._xPosition,h=this._xOffset,p="rtl"===this._overlayRef.getConfig().direction;let m="",g="",b="";l?b="flex-start":"center"===d?(b="center",p?g=h:m=h):p?"left"===d||"end"===d?(b="flex-end",m=h):("right"===d||"start"===d)&&(b="flex-start",g=h):"left"===d||"start"===d?(b="flex-start",m=h):("right"===d||"end"===d)&&(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(pU),n.justifyContent=n.alignItems=t.marginTop=t.marginBottom=t.marginLeft=t.marginRight=t.position="",this._overlayRef=null,this._isDisposed=!0}}let MZ=(()=>{class i{constructor(e,n,r,s){this._viewportRuler=e,this._document=n,this._platform=r,this._overlayContainer=s}global(){return new mU}flexibleConnectedTo(e){return new wZ(e,this._viewportRuler,this._document,this._platform,this._overlayContainer)}}return i.\u0275fac=function(e){return new(e||i)(ee(RM),ee(Wt),ee(Vi),ee(FM))},i.\u0275prov=Ie({token:i,factory:i.\u0275fac,providedIn:"root"}),i})(),CZ=0,as=(()=>{class i{constructor(e,n,r,s,o,a,l,c,d,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=d,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 Im(e);return o.direction=o.direction||this._directionality.value,new qy(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-"+CZ++,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(lm)),new eZ(e,this._componentFactoryResolver,this._appRef,this._injector,this._document)}}return i.\u0275fac=function(e){return new(e||i)(ee(_Z),ee(FM),ee(Ol),ee(MZ),ee(yZ),ee(Gi),ee(ht),ee(Wt),ee(Ea),ee(py),ee(bZ),ee(Rr,8))},i.\u0275prov=Ie({token:i,factory:i.\u0275fac,providedIn:"root"}),i})();const SZ=[{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"}],gU=new me("cdk-connected-overlay-scroll-strategy");let NI=(()=>{class i{constructor(e){this.elementRef=e}}return i.\u0275fac=function(e){return new(e||i)(E(pt))},i.\u0275dir=ve({type:i,selectors:[["","cdk-overlay-origin",""],["","overlay-origin",""],["","cdkOverlayOrigin",""]],exportAs:["cdkOverlayOrigin"],standalone:!0}),i})(),_U=(()=>{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=Kt.EMPTY,this._attachSubscription=Kt.EMPTY,this._detachSubscription=Kt.EMPTY,this._positionSubscription=Kt.EMPTY,this.viewportMargin=0,this.open=!1,this.disableClose=!1,this.backdropClick=new We,this.positionChange=new We,this.attach=new We,this.detach=new We,this.overlayKeydown=new We,this.overlayOutsideClick=new We,this._templatePortal=new Cm(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=SZ);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&&!jo(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 Im({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 NI?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(HB(()=>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)(E(as),E(wo),E(Wr),E(gU),E(Ea,8))},i.\u0275dir=ve({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:[yi]}),i})();const AZ={provide:gU,deps:[as],useFactory:function EZ(i){return()=>i.scrollStrategies.reposition()}};let Rm=(()=>{class i{}return i.\u0275fac=function(e){return new(e||i)},i.\u0275mod=nn({type:i}),i.\u0275inj=Xt({providers:[as,AZ],imports:[$y,kh,oU,oU]}),i})();function Uc(i,t=zy){return Jn((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,d=t.now();if(d{s=c,o=t.now(),r||(r=t.schedule(l,i),n.add(r))},()=>{a(),n.complete()},void 0,()=>{s=r=null}))})}function vU(i){return vn((t,e)=>i<=e)}function Vc(i,t=Ba){return i=i??DZ,Jn((e,n)=>{let r,s=!0;e.subscribe(jn(n,o=>{const a=t(o);(s||!i(r,a))&&(s=!1,r=a,n.next(o))}))})}function DZ(i,t){return i===t}let yU=(()=>{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})(),TZ=(()=>{class i{constructor(e){this._mutationObserverFactory=e,this._observedElements=new Map}ngOnDestroy(){this._observedElements.forEach((e,n)=>this._cleanupObserver(n))}observe(e){const n=Bc(e);return new Tn(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 Re,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)(ee(yU))},i.\u0275prov=Ie({token:i,factory:i.\u0275fac,providedIn:"root"}),i})(),bU=(()=>{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=ks(e),this._subscribe()}constructor(e,n,r){this._contentObserver=e,this._elementRef=n,this._ngZone=r,this.event=new We,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(Uc(this.debounce)):e).subscribe(this.event)})}_unsubscribe(){this._currentSubscription?.unsubscribe()}}return i.\u0275fac=function(e){return new(e||i)(E(TZ),E(pt),E(ht))},i.\u0275dir=ve({type:i,selectors:[["","cdkObserveContent",""]],inputs:{disabled:["cdkObserveContentDisabled","disabled"],debounce:"debounce"},outputs:{event:"cdkObserveContent"},exportAs:["cdkObserveContent"]}),i})(),BI=(()=>{class i{}return i.\u0275fac=function(e){return new(e||i)},i.\u0275mod=nn({type:i}),i.\u0275inj=Xt({providers:[yU]}),i})();const xU=new Set;let km,IZ=(()=>{class i{constructor(e){this._platform=e,this._matchMedia=this._platform.isBrowser&&window.matchMedia?window.matchMedia.bind(window):kZ}matchMedia(e){return(this._platform.WEBKIT||this._platform.BLINK)&&function RZ(i){if(!xU.has(i))try{km||(km=document.createElement("style"),km.setAttribute("type","text/css"),document.head.appendChild(km)),km.sheet&&(km.sheet.insertRule(`@media ${i} {body{ }}`,0),xU.add(i))}catch(t){console.error(t)}}(e),this._matchMedia(e)}}return i.\u0275fac=function(e){return new(e||i)(ee(Vi))},i.\u0275prov=Ie({token:i,factory:i.\u0275fac,providedIn:"root"}),i})();function kZ(i){return{matches:"all"===i||""===i,media:i,addListener:()=>{},removeListener:()=>{}}}let UI=(()=>{class i{constructor(e,n){this._mediaMatcher=e,this._zone=n,this._queries=new Map,this._destroySubject=new Re}ngOnDestroy(){this._destroySubject.next(),this._destroySubject.complete()}isMatched(e){return wU(CM(e)).some(r=>this._registerQuery(r).mql.matches)}observe(e){let s=eu(wU(CM(e)).map(o=>this._registerQuery(o).observable));return s=wy(s.pipe(Pi(1)),s.pipe(vU(1),Uc(0))),s.pipe(et(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 Tn(o=>{const a=l=>this._zone.run(()=>o.next(l));return n.addListener(a),()=>{n.removeListener(a)}}).pipe(Eo(n),et(({matches:o})=>({query:e,matches:o})),Xe(this._destroySubject)),mql:n};return this._queries.set(e,s),s}}return i.\u0275fac=function(e){return new(e||i)(ee(IZ),ee(ht))},i.\u0275prov=Ie({token:i,factory:i.\u0275fac,providedIn:"root"}),i})();function wU(i){return i.map(t=>t.split(",")).reduce((t,e)=>t.concat(e)).map(t=>t.trim())}function LM(i,t){return(i.getAttribute(t)||"").match(/\S+/g)||[]}const CU="cdk-describedby-message",NM="cdk-describedby-host";let VI=0,LZ=(()=>{class i{constructor(e,n){this._platform=n,this._messageRegistry=new Map,this._messagesContainer=null,this._id=""+VI++,this._document=e,this._id=Pt(am)+"-"+VI++}describe(e,n,r){if(!this._canBeDescribed(e,n))return;const s=zI(n,r);"string"!=typeof n?(SU(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=zI(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(`[${NM}="${this._id}"]`);for(let n=0;n0!=r.indexOf(CU));e.setAttribute("aria-describedby",n.join(" "))}_addMessageReference(e,n){const r=this._messageRegistry.get(n);(function OZ(i,t,e){const n=LM(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(NM,this._id),r.referenceCount++}_removeMessageReference(e,n){const r=this._messageRegistry.get(n);r.referenceCount--,function FZ(i,t,e){const r=LM(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(NM)}_isElementDescribedByMessage(e,n){const r=LM(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)(ee(Wt),ee(Vi))},i.\u0275prov=Ie({token:i,factory:i.\u0275fac,providedIn:"root"}),i})();function zI(i,t){return"string"==typeof i?`${t||""}/${i}`:i}function SU(i,t){i.id||(i.id=`${CU}-${t}-${VI++}`)}class EU{constructor(t){this._items=t,this._activeItemIndex=-1,this._activeItem=null,this._wrap=!1,this._letterKeyStream=new Re,this._typeaheadSubscription=Kt.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 Re,this.change=new Re,t instanceof rm&&(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(Ui(e=>this._pressedLetters.push(e)),Uc(t),vn(()=>this._pressedLetters.length>0),et(()=>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 rm?this._items.toArray():this._items}}class NZ extends EU{setActiveItem(t){this.activeItem&&this.activeItem.setInactiveStyles(),super.setActiveItem(t),this.activeItem&&this.activeItem.setActiveStyles()}}class AU extends EU{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 BM=(()=>{class i{constructor(e){this._platform=e}isDisabled(e){return e.hasAttribute("disabled")}isVisible(e){return function UZ(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 BZ(i){try{return i.frameElement}catch{return null}}(function YZ(i){return i.ownerDocument&&i.ownerDocument.defaultView||window}(e));if(n&&(-1===TU(n)||!this.isVisible(n)))return!1;let r=e.nodeName.toLowerCase(),s=TU(e);return e.hasAttribute("contenteditable")?-1!==s:!("iframe"===r||"object"===r||this._platform.WEBKIT&&this._platform.IOS&&!function WZ(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 jZ(i){return!function zZ(i){return function GZ(i){return"input"==i.nodeName.toLowerCase()}(i)&&"hidden"==i.type}(i)&&(function VZ(i){let t=i.nodeName.toLowerCase();return"input"===t||"select"===t||"button"===t||"textarea"===t}(i)||function HZ(i){return function $Z(i){return"a"==i.nodeName.toLowerCase()}(i)&&i.hasAttribute("href")}(i)||i.hasAttribute("contenteditable")||DU(i))}(e)&&!this.isDisabled(e)&&(n?.ignoreVisibility||this.isVisible(e))}}return i.\u0275fac=function(e){return new(e||i)(ee(Vi))},i.\u0275prov=Ie({token:i,factory:i.\u0275fac,providedIn:"root"}),i})();function DU(i){if(!i.hasAttribute("tabindex")||void 0===i.tabIndex)return!1;let t=i.getAttribute("tabindex");return!(!t||isNaN(parseInt(t,10)))}function TU(i){if(!DU(i))return null;const t=parseInt(i.getAttribute("tabindex")||"",10);return isNaN(t)?-1:t}class qZ{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(Pi(1)).subscribe(t)}}let HI=(()=>{class i{constructor(e,n,r){this._checker=e,this._ngZone=n,this._document=r}create(e,n=!1){return new qZ(e,this._checker,this._ngZone,this._document,n)}}return i.\u0275fac=function(e){return new(e||i)(ee(BM),ee(ht),ee(Wt))},i.\u0275prov=Ie({token:i,factory:i.\u0275fac,providedIn:"root"}),i})();function GI(i){return 0===i.buttons||0===i.offsetX&&0===i.offsetY}function $I(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 XZ=new me("cdk-input-modality-detector-options"),KZ={ignoreKeys:[18,17,224,91,16]},Pm=Th({passive:!0,capture:!0});let ZZ=(()=>{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=au(o))},this._onMousedown=o=>{Date.now()-this._lastTouchMs<650||(this._modality.next(GI(o)?"keyboard":"mouse"),this._mostRecentTarget=au(o))},this._onTouchstart=o=>{$I(o)?this._modality.next("keyboard"):(this._lastTouchMs=Date.now(),this._modality.next("touch"),this._mostRecentTarget=au(o))},this._options={...KZ,...s},this.modalityDetected=this._modality.pipe(vU(1)),this.modalityChanged=this.modalityDetected.pipe(Vc()),e.isBrowser&&n.runOutsideAngular(()=>{r.addEventListener("keydown",this._onKeydown,Pm),r.addEventListener("mousedown",this._onMousedown,Pm),r.addEventListener("touchstart",this._onTouchstart,Pm)})}ngOnDestroy(){this._modality.complete(),this._platform.isBrowser&&(document.removeEventListener("keydown",this._onKeydown,Pm),document.removeEventListener("mousedown",this._onMousedown,Pm),document.removeEventListener("touchstart",this._onTouchstart,Pm))}}return i.\u0275fac=function(e){return new(e||i)(ee(Vi),ee(ht),ee(Wt),ee(XZ,8))},i.\u0275prov=Ie({token:i,factory:i.\u0275fac,providedIn:"root"}),i})();const QZ=new me("liveAnnouncerElement",{providedIn:"root",factory:function JZ(){return null}}),eQ=new me("LIVE_ANNOUNCER_DEFAULT_OPTIONS");let tQ=0,WI=(()=>{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 Re,this._rootNodeFocusAndBlurListener=a=>{for(let c=au(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=Bc(e);if(!this._platform.isBrowser||1!==r.nodeType)return ut(null);const s=function UK(i){if(function BK(){if(null==kI){const i=typeof document<"u"?document.head:null;kI=!(!i||!i.createShadowRoot&&!i.attachShadow)}return kI}()){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 Re,rootNode:s};return this._elementInfo.set(r,a),this._registerGlobalListeners(a),a.subject}stopMonitoring(e){const n=Bc(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=Bc(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=au(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,UM),n.addEventListener("blur",this._rootNodeFocusAndBlurListener,UM)}),this._rootNodeFocusListenerCount.set(n,r+1),1==++this._monitoredElementCount&&(this._ngZone.runOutsideAngular(()=>{this._getWindow().addEventListener("focus",this._windowFocusListener)}),this._inputModalityDetector.modalityDetected.pipe(Xe(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,UM),n.removeEventListener("blur",this._rootNodeFocusAndBlurListener,UM),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=Pt(UI).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(jI,RU,kU),this._hasCheckedHighContrastMode=!0;const n=this.getHighContrastMode();1===n?e.add(jI,RU):2===n&&e.add(jI,kU)}}}return i.\u0275fac=function(e){return new(e||i)(ee(Vi),ee(Wt))},i.\u0275prov=Ie({token:i,factory:i.\u0275fac,providedIn:"root"}),i})(),OU=(()=>{class i{constructor(e){e._applyBodyHighContrastModeCssClasses()}}return i.\u0275fac=function(e){return new(e||i)(ee(PU))},i.\u0275mod=nn({type:i}),i.\u0275inj=Xt({imports:[BI]}),i})();function iQ(i,t){}class VM{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 FU=(()=>{class i extends kM{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=d=>{this._portalOutlet.hasAttached();const h=this._portalOutlet.attachDomPortal(d);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=IM(),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=IM();return e===n||e.contains(n)}_initializeFocusTrap(){this._focusTrap=this._focusTrapFactory.create(this._elementRef.nativeElement),this._document&&(this._elementFocusedBeforeDialogWasOpened=IM())}_handleBackdropClicks(){this._overlayRef.backdropClick().subscribe(()=>{this._config.disableClose&&this._recaptureFocus()})}}return i.\u0275fac=function(e){return new(e||i)(E(pt),E(HI),E(Wt,8),E(VM),E(BM),E(ht),E(qy),E(zc))},i.\u0275cmp=ot({type:i,selectors:[["cdk-dialog-container"]],viewQuery:function(e,n){if(1&e&&ii(Sm,7),2&e){let r;Tt(r=It())&&(n._portalOutlet=r.first)}},hostAttrs:["tabindex","-1",1,"cdk-dialog-container"],hostVars:6,hostBindings:function(e,n){2&e&&St("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:[at],decls:1,vars:0,consts:[["cdkPortalOutlet",""]],template:function(e,n){1&e&&fe(0,iQ,0,0,"ng-template",0)},dependencies:[Sm],styles:[".cdk-dialog-container{display:block;width:100%;height:100%;min-height:inherit;max-height:inherit}"],encapsulation:2}),i})();class YI{constructor(t,e){this.overlayRef=t,this.config=e,this.closed=new Re,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&&!jo(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 LU=new me("DialogScrollStrategy"),rQ=new me("DialogData"),sQ=new me("DefaultDialogConfig"),aQ={provide:LU,deps:[as],useFactory:function oQ(i){return()=>i.scrollStrategies.block()}};let lQ=0,NU=(()=>{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 Re,this._afterOpenedAtThisLevel=new Re,this._ariaHiddenElements=new Map,this.afterAllClosed=My(()=>this.openDialogs.length?this._getAfterAllClosed():this._getAfterAllClosed().pipe(Eo(void 0))),this._scrollStrategy=a}open(e,n){(n={...this._defaultOptions||new VM,...n}).id=n.id||"cdk-dialog-"+lQ++,n.id&&this.getDialogById(n.id);const s=this._getOverlayConfig(n),o=this._overlay.create(s),a=new YI(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(){qI(this.openDialogs,e=>e.close())}getDialogById(e){return this.openDialogs.find(n=>n.id===e)}ngOnDestroy(){qI(this._openDialogsAtThisLevel,e=>{!1===e.config.closeOnDestroy&&this._removeOpenDialog(e,!1)}),qI(this._openDialogsAtThisLevel,e=>e.close()),this._afterAllClosedAtThisLevel.complete(),this._afterOpenedAtThisLevel.complete(),this._openDialogsAtThisLevel=[]}_getOverlayConfig(e){const n=new Im({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:VM,useValue:r},{provide:YI,useValue:n},{provide:qy,useValue:e}];let a;r.container?"function"==typeof r.container?a=r.container:(a=r.container.type,o.push(...r.container.providers(r))):a=FU;const l=new Rh(a,r.viewContainerRef,Gi.create({parent:s||this._injector,providers:o}),r.componentFactoryResolver);return e.attach(l).instance}_attachDialogContent(e,n,r,s){if(e instanceof wo){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 Cm(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:rQ,useValue:e.data},{provide:YI,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(Ea,null,{optional:!0}))&&a.push({provide:Ea,useValue:{value:e.direction,change:ut()}}),Gi.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)(ee(as),ee(Gi),ee(sQ,8),ee(i,12),ee(FM),ee(LU))},i.\u0275prov=Ie({token:i,factory:i.\u0275fac}),i})();function qI(i,t){let e=i.length;for(;e--;)t(i[e])}let cQ=(()=>{class i{}return i.\u0275fac=function(e){return new(e||i)},i.\u0275mod=nn({type:i}),i.\u0275inj=Xt({providers:[NU,aQ],imports:[Rm,kh,OU,kh]}),i})();const dQ=["text"];function uQ(i,t){if(1&i&&ke(0,"mat-pseudo-checkbox",6),2&i){const e=he();U("state",e.selected?"checked":"unchecked")("disabled",e.disabled)}}function hQ(i,t){1&i&&ke(0,"mat-pseudo-checkbox",7),2&i&&U("disabled",he().disabled)}function fQ(i,t){if(1&i&&(W(0,"span",8),Ge(1),q()),2&i){const e=he();G(1),ir("(",e.group.label,")")}}const pQ=[[["mat-icon"]],"*"],mQ=["mat-icon","*"],_Q=new me("mat-sanity-checks",{providedIn:"root",factory:function gQ(){return!0}});let Kn=(()=>{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!PI()&&("boolean"==typeof this._sanityChecks?this._sanityChecks:!!this._sanityChecks[e])}}return i.\u0275fac=function(e){return new(e||i)(ee(PU),ee(_Q,8),ee(Wt))},i.\u0275mod=nn({type:i}),i.\u0275inj=Xt({imports:[$y,$y]}),i})();function zM(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 Xy(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 HM(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 XI(i,t=0){return class extends i{get tabIndex(){return this.disabled?-1:this._tabIndex}set tabIndex(e){this._tabIndex=null!=e?ks(e):this.defaultTabIndex}constructor(...e){super(...e),this._tabIndex=t,this.defaultTabIndex=t}}}function VU(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 vQ(i){return class extends i{constructor(...t){super(...t),this._isInitialized=!1,this._pendingSubscribers=[],this.initialized=new Tn(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 HU=(()=>{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 bQ{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 GU=Th({passive:!0,capture:!0});class xQ{constructor(){this._events=new Map,this._delegateEventHandler=t=>{const e=au(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,GU)})}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,GU)))}}const $U={enterDuration:225,exitDuration:150},WU=Th({passive:!0,capture:!0}),jU=["mousedown","touchstart"],YU=["mouseup","mouseleave","touchend","touchcancel"];class Om{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=Bc(n))}fadeInRipple(t,e,n={}){const r=this._containerRect=this._containerRect||this._containerElement.getBoundingClientRect(),s={...$U,...n.animation};n.centered&&(t=r.left+r.width/2,e=r.top+r.height/2);const o=n.radius||function MQ(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,d=document.createElement("div");d.classList.add("mat-ripple-element"),d.style.left=a-o+"px",d.style.top=l-o+"px",d.style.height=2*o+"px",d.style.width=2*o+"px",null!=n.color&&(d.style.backgroundColor=n.color),d.style.transitionDuration=`${c}ms`,this._containerElement.appendChild(d);const h=window.getComputedStyle(d),m=h.transitionDuration,g="none"===h.transitionProperty||"0s"===m||"0s, 0s"===m||0===r.width&&0===r.height,b=new bQ(this,d,n,g);d.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);d.addEventListener("transitionend",y),d.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={...$U,...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=Bc(t);!this._platform.isBrowser||!e||e===this._triggerElement||(this._removeTriggerEvents(),this._triggerElement=e,jU.forEach(n=>{Om._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(()=>{YU.forEach(e=>{this._triggerElement.addEventListener(e,this,WU)})}),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=GI(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&&(jU.forEach(e=>Om._eventManager.removeHandler(e,t,this)),this._pointerUpEventsRegistered&&YU.forEach(e=>t.removeEventListener(e,this,WU)))}}Om._eventManager=new xQ;const KI=new me("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 Om(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)(E(pt),E(ht),E(Vi),E(KI,8),E(Rr,8))},i.\u0275dir=ve({type:i,selectors:[["","mat-ripple",""],["","matRipple",""]],hostAttrs:[1,"mat-ripple"],hostVars:2,hostBindings:function(e,n){2&e&&un("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})(),Zy=(()=>{class i{}return i.\u0275fac=function(e){return new(e||i)},i.\u0275mod=nn({type:i}),i.\u0275inj=Xt({imports:[Kn,Kn]}),i})(),CQ=(()=>{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)(E(Rr,8))},i.\u0275cmp=ot({type:i,selectors:[["mat-pseudo-checkbox"]],hostAttrs:[1,"mat-pseudo-checkbox"],hostVars:12,hostBindings:function(e,n){2&e&&un("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})(),qU=(()=>{class i{}return i.\u0275fac=function(e){return new(e||i)},i.\u0275mod=nn({type:i}),i.\u0275inj=Xt({imports:[Kn]}),i})();const XU=new me("MAT_OPTION_PARENT_COMPONENT"),KU=new me("MatOptgroup");let SQ=0;class EQ{constructor(t,e=!1){this.source=t,this.isUserInput=e}}let AQ=(()=>{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-"+SQ++,this.onSelectionChange=new We,this._stateChanges=new Re}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)&&!jo(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 EQ(this,e))}}return i.\u0275fac=function(e){bo()},i.\u0275dir=ve({type:i,viewQuery:function(e,n){if(1&e&&ii(dQ,7),2&e){let r;Tt(r=It())&&(n._text=r.first)}},inputs:{value:"value",id:"id",disabled:"disabled"},outputs:{onSelectionChange:"onSelectionChange"}}),i})(),Fm=(()=>{class i extends AQ{constructor(e,n,r,s){super(e,n,r,s)}}return i.\u0275fac=function(e){return new(e||i)(E(pt),E(ri),E(XU,8),E(KU,8))},i.\u0275cmp=ot({type:i,selectors:[["mat-option"]],hostAttrs:["role","option",1,"mat-mdc-option","mdc-list-item"],hostVars:11,hostBindings:function(e,n){1&e&&Ue("click",function(){return n._selectViaInteraction()})("keydown",function(s){return n._handleKeydown(s)}),2&e&&(Ul("id",n.id),St("aria-selected",n.selected)("aria-disabled",n.disabled.toString()),un("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:[at],ngContentSelectors:mQ,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&&(nr(pQ),fe(0,uQ,1,2,"mat-pseudo-checkbox",0),Gt(1),W(2,"span",1,2),Gt(4,1),q(),fe(5,hQ,1,1,"mat-pseudo-checkbox",3),fe(6,fQ,2,1,"span",4),ke(7,"div",5)),2&e&&(U("ngIf",n.multiple),G(5),U("ngIf",!n.multiple&&n.selected&&!n.hideSingleSelectionIndicator),G(1),U("ngIf",n.group&&n.group._inert),G(1),U("matRippleTrigger",n._getHostElement())("matRippleDisabled",n.disabled||n.disableRipple))},dependencies:[Oh,wi,CQ],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})(),ZI=(()=>{class i{}return i.\u0275fac=function(e){return new(e||i)},i.\u0275mod=nn({type:i}),i.\u0275inj=Xt({imports:[Zy,So,Kn,qU]}),i})();class ZU{}class IQ{}const Hc="*";function Aa(i,t){return{type:7,name:i,definitions:t,options:{}}}function jr(i,t=null){return{type:4,styles:t,timings:i}}function JU(i,t=null){return{type:2,steps:i,options:t}}function si(i){return{type:6,styles:i,offset:null}}function Ps(i,t,e){return{type:0,name:i,styles:t,options:e}}function eV(i){return{type:5,steps:i}}function Pr(i,t,e=null){return{type:1,expr:i,animation:t,options:e}}function QI(i=null){return{type:9,options:i}}function JI(i,t,e=null){return{type:11,selector:i,animation:t,options:e}}function tV(i){Promise.resolve().then(i)}class Qy{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(){tV(()=>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 nV{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?tV(()=>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 eR="!";function RQ(i,t){}class GM{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 tR="mdc-dialog--open",iV="mdc-dialog--opening",rV="mdc-dialog--closing";let OQ=(()=>{class i extends FU{constructor(e,n,r,s,o,a,l,c){super(e,n,r,s,o,a,l,c),this._animationStateChanged=new We}_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)(E(pt),E(HI),E(Wt,8),E(GM),E(BM),E(ht),E(qy),E(zc))},i.\u0275cmp=ot({type:i,selectors:[["ng-component"]],features:[at],decls:0,vars:0,template:function(e,n){},encapsulation:2}),i})();const sV="--mat-dialog-transition-duration";function oV(i){return null==i?null:"number"==typeof i?i:i.endsWith("ms")?ks(i.substring(0,i.length-2)):i.endsWith("s")?1e3*ks(i.substring(0,i.length-1)):"0"===i?0:null}let FQ=(()=>{class i extends OQ{constructor(e,n,r,s,o,a,l,c,d){super(e,n,r,s,o,a,l,d),this._animationMode=c,this._animationsEnabled="NoopAnimations"!==this._animationMode,this._hostElement=this._elementRef.nativeElement,this._openAnimationDuration=this._animationsEnabled?oV(this._config.enterAnimationDuration)??150:0,this._closeAnimationDuration=this._animationsEnabled?oV(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(sV,`${this._openAnimationDuration}ms`),this._requestAnimationFrame(()=>this._hostElement.classList.add(iV,tR)),this._waitForAnimationToComplete(this._openAnimationDuration,this._finishDialogOpen)):(this._hostElement.classList.add(tR),Promise.resolve().then(()=>this._finishDialogOpen()))}_startExitAnimation(){this._animationStateChanged.emit({state:"closing",totalTime:this._closeAnimationDuration}),this._hostElement.classList.remove(tR),this._animationsEnabled?(this._hostElement.style.setProperty(sV,`${this._openAnimationDuration}ms`),this._requestAnimationFrame(()=>this._hostElement.classList.add(rV)),this._waitForAnimationToComplete(this._closeAnimationDuration,this._finishDialogClose)):Promise.resolve().then(()=>this._finishDialogClose())}_clearAnimationClasses(){this._hostElement.classList.remove(iV,rV)}_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)(E(pt),E(HI),E(Wt,8),E(GM),E(BM),E(ht),E(qy),E(Rr,8),E(zc))},i.\u0275cmp=ot({type:i,selectors:[["mat-dialog-container"]],hostAttrs:["tabindex","-1",1,"mat-mdc-dialog-container","mdc-dialog"],hostVars:8,hostBindings:function(e,n){2&e&&(Ul("id",n._config.id),St("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),un("_mat-animation-noopable",!n._animationsEnabled))},features:[at],decls:3,vars:0,consts:[[1,"mdc-dialog__container"],[1,"mat-mdc-dialog-surface","mdc-dialog__surface"],["cdkPortalOutlet",""]],template:function(e,n){1&e&&(W(0,"div",0)(1,"div",1),fe(2,RQ,0,0,"ng-template",2),q()())},dependencies:[Sm],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 Jy{constructor(t,e,n){this._ref=t,this._containerInstance=n,this._afterOpened=new Re,this._beforeClosed=new Re,this._state=0,this.disableClose=e.disableClose,this.id=t.id,n._animationStateChanged.pipe(vn(r=>"opened"===r.state),Pi(1)).subscribe(()=>{this._afterOpened.next(),this._afterOpened.complete()}),n._animationStateChanged.pipe(vn(r=>"closed"===r.state),Pi(1)).subscribe(()=>{clearTimeout(this._closeFallbackTimeout),this._finishDialogClose()}),t.overlayRef.detachments().subscribe(()=>{this._beforeClosed.next(this._result),this._beforeClosed.complete(),this._finishDialogClose()}),Mr(this.backdropClick(),this.keydownEvents().pipe(vn(r=>27===r.keyCode&&!this.disableClose&&!jo(r)))).subscribe(r=>{this.disableClose||(r.preventDefault(),aV(this,"keydown"===r.type?"keyboard":"mouse"))})}close(t){this._result=t,this._containerInstance._animationStateChanged.pipe(vn(e=>"closing"===e.state),Pi(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 aV(i,t,e){return i._closeInteractionType=t,i.close(e)}const nR=new me("MatMdcDialogData"),LQ=new me("mat-mdc-dialog-default-options"),lV=new me("mat-mdc-dialog-scroll-strategy"),BQ={provide:lV,deps:[as],useFactory:function NQ(i){return()=>i.scrollStrategies.block()}};let UQ=0,VQ=(()=>{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,d,h){this._overlay=e,this._defaultOptions=r,this._parentDialog=s,this._dialogRefConstructor=l,this._dialogContainerType=c,this._dialogDataToken=d,this._openDialogsAtThisLevel=[],this._afterAllClosedAtThisLevel=new Re,this._afterOpenedAtThisLevel=new Re,this._idPrefix="mat-dialog-",this.dialogConfigClass=GM,this.afterAllClosed=My(()=>this.openDialogs.length?this._getAfterAllClosed():this._getAfterAllClosed().pipe(Eo(void 0))),this._scrollStrategy=a,this._dialog=n.get(NU)}open(e,n){let r;(n={...this._defaultOptions||new GM,...n}).id=n.id||`${this._idPrefix}${UQ++}`,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:VM,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){bo()},i.\u0275prov=Ie({token:i,factory:i.\u0275fac}),i})(),Lm=(()=>{class i extends VQ{constructor(e,n,r,s,o,a,l,c){super(e,n,s,a,l,o,Jy,FQ,nR,c),this._idPrefix="mat-mdc-dialog-"}}return i.\u0275fac=function(e){return new(e||i)(ee(as),ee(Gi),ee(py,8),ee(LQ,8),ee(lV),ee(i,12),ee(FM),ee(Rr,8))},i.\u0275prov=Ie({token:i,factory:i.\u0275fac}),i})(),zQ=0,HQ=(()=>{class i{constructor(e,n,r){this.dialogRef=e,this._elementRef=n,this._dialog=r,this.type="button"}ngOnInit(){this.dialogRef||(this.dialogRef=hV(this._elementRef,this._dialog.openDialogs))}ngOnChanges(e){const n=e._matDialogClose||e._matDialogCloseResult;n&&(this.dialogResult=n.currentValue)}_onButtonClick(e){aV(this.dialogRef,0===e.screenX&&0===e.screenY?"keyboard":"mouse",this.dialogResult)}}return i.\u0275fac=function(e){return new(e||i)(E(Jy,8),E(pt),E(Lm))},i.\u0275dir=ve({type:i,selectors:[["","mat-dialog-close",""],["","matDialogClose",""]],hostVars:2,hostBindings:function(e,n){1&e&&Ue("click",function(s){return n._onButtonClick(s)}),2&e&&St("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:[yi]}),i})(),cV=(()=>{class i{constructor(e,n,r){this._dialogRef=e,this._elementRef=n,this._dialog=r,this.id="mat-mdc-dialog-title-"+zQ++}ngOnInit(){this._dialogRef||(this._dialogRef=hV(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)(E(Jy,8),E(pt),E(Lm))},i.\u0275dir=ve({type:i,selectors:[["","mat-dialog-title",""],["","matDialogTitle",""]],hostAttrs:[1,"mat-mdc-dialog-title","mdc-dialog__title"],hostVars:1,hostBindings:function(e,n){2&e&&Ul("id",n.id)},inputs:{id:"id"},exportAs:["matDialogTitle"]}),i})(),dV=(()=>{class i{}return i.\u0275fac=function(e){return new(e||i)},i.\u0275dir=ve({type:i,selectors:[["","mat-dialog-content",""],["mat-dialog-content"],["","matDialogContent",""]],hostAttrs:[1,"mat-mdc-dialog-content","mdc-dialog__content"]}),i})(),uV=(()=>{class i{constructor(){this.align="start"}}return i.\u0275fac=function(e){return new(e||i)},i.\u0275dir=ve({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&&un("mat-mdc-dialog-actions-align-center","center"===n.align)("mat-mdc-dialog-actions-align-end","end"===n.align)},inputs:{align:"align"}}),i})();function hV(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 fV=(()=>{class i{}return i.\u0275fac=function(e){return new(e||i)},i.\u0275mod=nn({type:i}),i.\u0275inj=Xt({providers:[Lm,BQ],imports:[cQ,Rm,kh,Kn,Kn]}),i})();const GQ=["mat-button",""],mV=[[["",8,"material-icons",3,"iconPositionEnd",""],["mat-icon",3,"iconPositionEnd",""],["","matButtonIcon","",3,"iconPositionEnd",""]],"*",[["","iconPositionEnd","",8,"material-icons"],["mat-icon","iconPositionEnd",""],["","matButtonIcon","","iconPositionEnd",""]]],gV=[".material-icons:not([iconPositionEnd]), mat-icon:not([iconPositionEnd]), [matButtonIcon]:not([iconPositionEnd])","*",".material-icons[iconPositionEnd], mat-icon[iconPositionEnd], [matButtonIcon][iconPositionEnd]"],WQ=["mat-mini-fab",""],YQ=["mat-icon-button",""],qQ=["*"],XQ=[{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"]}],KQ=Xy(zM(HM(class{constructor(i){this._elementRef=i}})));let iR=(()=>{class i extends KQ{constructor(e,n,r,s){super(e),this._platform=n,this._ngZone=r,this._animationMode=s,this._focusMonitor=Pt(zc),this._isFab=!1;const o=e.nativeElement.classList;for(const a of XQ)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){bo()},i.\u0275dir=ve({type:i,viewQuery:function(e,n){if(1&e&&ii(Oh,5),2&e){let r;Tt(r=It())&&(n.ripple=r.first)}},features:[at]}),i})(),$M=(()=>{class i extends iR{constructor(e,n,r,s){super(e,n,r,s)}}return i.\u0275fac=function(e){return new(e||i)(E(pt),E(Vi),E(ht),E(Rr,8))},i.\u0275cmp=ot({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&&(St("disabled",n.disabled||null),un("_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:[at],attrs:GQ,ngContentSelectors:gV,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&&(nr(mV),ke(0,"span",0),Gt(1),W(2,"span",1),Gt(3,1),q(),Gt(4,2),ke(5,"span",2)(6,"span",3)(7,"span",4)),2&e&&(un("mdc-button__ripple",!n._isFab)("mdc-fab__ripple",n._isFab),G(6),U("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 QQ=new me("mat-mdc-fab-default-options",{providedIn:"root",factory:_V});function _V(){return{color:"accent"}}const vV=_V();let yV=(()=>{class i extends iR{constructor(e,n,r,s,o){super(e,n,r,s),this._options=o,this._isFab=!0,this._options=this._options||vV,this.color=this.defaultColor=this._options.color||vV.color}}return i.\u0275fac=function(e){return new(e||i)(E(pt),E(Vi),E(ht),E(Rr,8),E(QQ,8))},i.\u0275cmp=ot({type:i,selectors:[["button","mat-mini-fab",""]],hostVars:7,hostBindings:function(e,n){2&e&&(St("disabled",n.disabled||null),un("_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:[at],attrs:WQ,ngContentSelectors:gV,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&&(nr(mV),ke(0,"span",0),Gt(1),W(2,"span",1),Gt(3,1),q(),Gt(4,2),ke(5,"span",2)(6,"span",3)(7,"span",4)),2&e&&(un("mdc-button__ripple",!n._isFab)("mdc-fab__ripple",n._isFab),G(6),U("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})(),WM=(()=>{class i extends iR{constructor(e,n,r,s){super(e,n,r,s)}}return i.\u0275fac=function(e){return new(e||i)(E(pt),E(Vi),E(ht),E(Rr,8))},i.\u0275cmp=ot({type:i,selectors:[["button","mat-icon-button",""]],hostVars:7,hostBindings:function(e,n){2&e&&(St("disabled",n.disabled||null),un("_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:[at],attrs:YQ,ngContentSelectors:qQ,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&&(nr(),ke(0,"span",0),Gt(1),ke(2,"span",1)(3,"span",2)(4,"span",3)),2&e&&(G(3),U("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=nn({type:i}),i.\u0275inj=Xt({imports:[Kn,Zy,Kn]}),i})();const JQ=["class","dialog"];let bV=(()=>{class i{constructor(e,n){this.dialogRef=e,this.data=n}}return i.\u0275fac=function(e){return new(e||i)(E(Jy),E(nR))},i.\u0275cmp=ot({type:i,selectors:[["app-confirm",8,"dialog"]],attrs:JQ,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&&(W(0,"h1",0),Ge(1,"Confirmation"),q(),W(2,"div",1)(3,"p"),Ge(4),q()(),W(5,"div",2)(6,"button",3),Ue("click",function(){return n.dialogRef.close()}),Ge(7,"Cancel"),q(),W(8,"button",4),Ge(9,"Yes"),q()()),2&e&&(G(4),_i(n.data.text),G(4),U("mat-dialog-close",!0))},dependencies:[$M,HQ,cV,dV,uV]}),i})();function rR(i,t){const e="object"==typeof t;return new Promise((n,r)=>{const s=new aa({next:o=>{n(o),s.unsubscribe()},error:r,complete:()=>{e?n(t.defaultValue):r(new um)}});i.subscribe(s)})}let Gc=(()=>{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{ht.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)(ee(ht))},i.\u0275prov=Ie({token:i,factory:i.\u0275fac,providedIn:"root"}),i})();var sR=ps(489);const xV=i=>!(!i||"object"!=typeof i),wV=(i={},t,e,n=[])=>{const r=[];if(xV(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 Re,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=wV(r.schema,"is_recursive_ref",!0);for(const[o,a]of s){const l=o.block_class_mro;let c=r.schema,d=c.block_class_mro===l?c:void 0;for(const h of a.slice(0,a.length-1))!d&&c[h]?.block_class_mro===l&&(d=c[h]),c=c[h];c[a[a.length-1]]=d}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,sR.isNumber)(o)?Math.abs(o-a)<1e-10:(0,sR.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)(ee(Gc))},i.\u0275prov=Ie({token:i,factory:i.\u0275fac,providedIn:"root"}),i})();function eJ(i,t){if(1&i){const e=mi();W(0,"div",2)(1,"button",3),Ue("click",function(){return cn(e),zt(he().action())}),Ge(2),q()()}if(2&i){const e=he();G(2),ir(" ",e.data.action," ")}}const tJ=["label"];function nJ(i,t){}const iJ=Math.pow(2,31)-1;class oR{constructor(t,e){this._overlayRef=e,this._afterDismissed=new Re,this._afterOpened=new Re,this._onAction=new Re,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,iJ))}_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 MV=new me("MatSnackBarData");class YM{constructor(){this.politeness="assertive",this.announcementMessage="",this.duration=0,this.data=null,this.horizontalPosition="center",this.verticalPosition="bottom"}}let rJ=(()=>{class i{}return i.\u0275fac=function(e){return new(e||i)},i.\u0275dir=ve({type:i,selectors:[["","matSnackBarLabel",""]],hostAttrs:[1,"mat-mdc-snack-bar-label","mdc-snackbar__label"]}),i})(),sJ=(()=>{class i{}return i.\u0275fac=function(e){return new(e||i)},i.\u0275dir=ve({type:i,selectors:[["","matSnackBarActions",""]],hostAttrs:[1,"mat-mdc-snack-bar-actions","mdc-snackbar__actions"]}),i})(),oJ=(()=>{class i{}return i.\u0275fac=function(e){return new(e||i)},i.\u0275dir=ve({type:i,selectors:[["","matSnackBarAction",""]],hostAttrs:[1,"mat-mdc-snack-bar-action","mdc-snackbar__action"]}),i})(),aJ=(()=>{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)(E(oR),E(MV))},i.\u0275cmp=ot({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&&(W(0,"div",0),Ge(1),q(),fe(2,eJ,3,1,"div",1)),2&e&&(G(1),ir(" ",n.data.message,"\n"),G(1),U("ngIf",n.hasAction))},dependencies:[wi,$M,rJ,sJ,oJ],styles:[".mat-mdc-simple-snack-bar{display:flex}"],encapsulation:2,changeDetection:0}),i})();const lJ={snackBarState:Aa("state",[Ps("void, hidden",si({transform:"scale(0.8)",opacity:0})),Ps("visible",si({transform:"scale(1)",opacity:1})),Pr("* => visible",jr("150ms cubic-bezier(0, 0, 0.2, 1)")),Pr("* => void, * => hidden",jr("75ms cubic-bezier(0.4, 0.0, 1, 1)",si({opacity:0})))])};let cJ=0,dJ=(()=>{class i extends kM{constructor(e,n,r,s,o){super(),this._ngZone=e,this._elementRef=n,this._changeDetectorRef=r,this._platform=s,this.snackBarConfig=o,this._document=Pt(Wt),this._trackedModals=new Set,this._announceDelay=150,this._destroyed=!1,this._onAnnounce=new Re,this._onExit=new Re,this._onEnter=new Re,this._animationState="void",this._liveElementId="mat-snack-bar-container-live-"+cJ++,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(Pi(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)(E(ht),E(pt),E(ri),E(Vi),E(YM))},i.\u0275dir=ve({type:i,viewQuery:function(e,n){if(1&e&&ii(Sm,7),2&e){let r;Tt(r=It())&&(n._portalOutlet=r.first)}},features:[at]}),i})(),uJ=(()=>{class i extends dJ{_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=ni(i)))(n||i)}}(),i.\u0275cmp=ot({type:i,selectors:[["mat-snack-bar-container"]],viewQuery:function(e,n){if(1&e&&ii(tJ,7),2&e){let r;Tt(r=It())&&(n._label=r.first)}},hostAttrs:[1,"mdc-snackbar","mat-mdc-snack-bar-container","mdc-snackbar--open"],hostVars:1,hostBindings:function(e,n){1&e&&P1("@state.done",function(s){return n.onAnimationEnd(s)}),2&e&&Sw("@state",n._animationState)},features:[at],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&&(W(0,"div",0)(1,"div",1,2)(3,"div",3),fe(4,nJ,0,0,"ng-template",4),q(),ke(5,"div"),q()()),2&e&&(G(5),St("aria-live",n._live)("role",n._role)("id",n._liveElementId))},dependencies:[Sm],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:[lJ.snackBarState]}}),i})(),CV=(()=>{class i{}return i.\u0275fac=function(e){return new(e||i)},i.\u0275mod=nn({type:i}),i.\u0275inj=Xt({imports:[Rm,kh,So,jM,Kn,Kn]}),i})();const SV=new me("mat-snack-bar-default-options",{providedIn:"root",factory:function hJ(){return new YM}});let fJ=(()=>{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=Gi.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 oR(o,s);if(e instanceof wo){const l=new Cm(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),d=o.attachComponentPortal(c);a.instance=d.instance}return this._breakpointObserver.observe("(max-width: 599.98px) and (orientation: portrait)").pipe(Xe(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 Im;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 Gi.create({parent:e&&e.viewContainerRef&&e.viewContainerRef.injector||this._injector,providers:[{provide:oR,useValue:n},{provide:MV,useValue:e.data}]})}}return i.\u0275fac=function(e){return new(e||i)(ee(as),ee(WI),ee(Gi),ee(UI),ee(i,12),ee(SV))},i.\u0275prov=Ie({token:i,factory:i.\u0275fac}),i})(),EV=(()=>{class i extends fJ{constructor(e,n,r,s,o,a){super(e,n,r,s,o,a),this.simpleSnackBarComponent=aJ,this.snackBarContainerComponent=uJ,this.handsetCssClass="mat-mdc-snack-bar-handset"}}return i.\u0275fac=function(e){return new(e||i)(ee(as),ee(WI),ee(Gi),ee(UI),ee(i,12),ee(SV))},i.\u0275prov=Ie({token:i,factory:i.\u0275fac,providedIn:CV}),i})();const pJ=["*",[["mat-toolbar-row"]]],mJ=["*","mat-toolbar-row"],gJ=Xy(class{constructor(i){this._elementRef=i}});let _J=(()=>{class i{}return i.\u0275fac=function(e){return new(e||i)},i.\u0275dir=ve({type:i,selectors:[["mat-toolbar-row"]],hostAttrs:[1,"mat-toolbar-row"],exportAs:["matToolbarRow"]}),i})(),vJ=(()=>{class i extends gJ{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)(E(pt),E(Vi),E(Wt))},i.\u0275cmp=ot({type:i,selectors:[["mat-toolbar"]],contentQueries:function(e,n,r){if(1&e&&$i(r,_J,5),2&e){let s;Tt(s=It())&&(n._toolbarRows=s)}},hostAttrs:[1,"mat-toolbar"],hostVars:4,hostBindings:function(e,n){2&e&&un("mat-toolbar-multiple-rows",n._toolbarRows.length>0)("mat-toolbar-single-row",0===n._toolbarRows.length)},inputs:{color:"color"},exportAs:["matToolbar"],features:[at],ngContentSelectors:mJ,decls:2,vars:0,template:function(e,n){1&e&&(nr(pJ),Gt(0),Gt(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})(),yJ=(()=>{class i{}return i.\u0275fac=function(e){return new(e||i)},i.\u0275mod=nn({type:i}),i.\u0275inj=Xt({imports:[Kn,Kn]}),i})(),bJ=(()=>{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=ot({type:i,selectors:[["mat-divider"]],hostAttrs:["role","separator",1,"mat-divider"],hostVars:7,hostBindings:function(e,n){2&e&&(St("aria-orientation",n.vertical?"vertical":"horizontal"),un("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})(),AV=(()=>{class i{}return i.\u0275fac=function(e){return new(e||i)},i.\u0275mod=nn({type:i}),i.\u0275inj=Xt({imports:[Kn,Kn]}),i})();const xJ=["tooltip"],DV=new me("mat-tooltip-scroll-strategy"),CJ={provide:DV,deps:[as],useFactory:function MJ(i){return()=>i.scrollStrategies.reposition({scrollThrottle:20})}},EJ=new me("mat-tooltip-default-options",{providedIn:"root",factory:function SJ(){return{showDelay:0,hideDelay:0,touchendHideDelay:1500}}}),TV="tooltip-panel",IV=Th({passive:!0});let kJ=(()=>{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=ks(e)}get hideDelay(){return this._hideDelay}set hideDelay(e){this._hideDelay=ks(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,d,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 Re,this._scrollStrategy=d,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(Xe(this._destroyed)).subscribe(()=>{this._overlayRef&&this._updatePosition(this._overlayRef)})}ngAfterViewInit(){this._viewInitialized=!0,this._setupPointerEnterEventsIfNeeded(),this._focusMonitor.monitor(this._elementRef).pipe(Xe(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,IV)}),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(Xe(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 pt)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(Xe(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}-${TV}`,scrollStrategy:this._scrollStrategy()}),this._updatePosition(this._overlayRef),this._overlayRef.detachments().pipe(Xe(this._destroyed)).subscribe(()=>this._detach()),this._overlayRef.outsidePointerEvents().pipe(Xe(this._destroyed)).subscribe(()=>this._tooltipInstance?._handleBodyInteraction()),this._overlayRef.keydownEvents().pipe(Xe(this._destroyed)).subscribe(s=>{this._isTooltipVisible()&&27===s.keyCode&&!jo(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(Pi(1),Xe(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}-${TV}-`;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,IV)})}_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){bo()},i.\u0275dir=ve({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})(),Os=(()=>{class i extends kJ{constructor(e,n,r,s,o,a,l,c,d,h,p,m){super(e,n,r,s,o,a,l,c,d,h,p,m),this._tooltipComponent=OJ,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)(E(as),E(pt),E(Wy),E(Wr),E(ht),E(Vi),E(LZ),E(zc),E(DV),E(Ea,8),E(EJ,8),E(Wt))},i.\u0275dir=ve({type:i,selectors:[["","matTooltip",""]],hostAttrs:[1,"mat-mdc-tooltip-trigger"],exportAs:["matTooltip"],features:[at]}),i})(),PJ=(()=>{class i{constructor(e,n){this._changeDetectorRef=e,this._closeOnInteraction=!1,this._isVisible=!1,this._onHide=new Re,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)(E(ri),E(Rr,8))},i.\u0275dir=ve({type:i}),i})(),OJ=(()=>{class i extends PJ{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)(E(ri),E(pt),E(Rr,8))},i.\u0275cmp=ot({type:i,selectors:[["mat-tooltip-component"]],viewQuery:function(e,n){if(1&e&&ii(xJ,7),2&e){let r;Tt(r=It())&&(n._tooltip=r.first)}},hostAttrs:["aria-hidden","true"],hostVars:2,hostBindings:function(e,n){1&e&&Ue("mouseleave",function(s){return n._handleMouseLeave(s)}),2&e&&Go("zoom",n.isVisible()?1:null)},features:[at],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&&(W(0,"div",0,1),Ue("animationend",function(s){return n._handleAnimationEnd(s)}),W(2,"div",2),Ge(3),q()()),2&e&&(un("mdc-tooltip--multiline",n._isMultiline),U("ngClass",n.tooltipClass),G(3),_i(n.message))},dependencies:[dm],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})(),RV=(()=>{class i{}return i.\u0275fac=function(e){return new(e||i)},i.\u0275mod=nn({type:i}),i.\u0275inj=Xt({providers:[CJ],imports:[OU,So,Rm,Kn,Kn,jy]}),i})();function kV(...i){const t=_0(i),{args:e,keys:n}=LB(i),r=new Tn(s=>{const{length:o}=e;if(!o)return void s.complete();const a=new Array(o);let l=o,c=o;for(let d=0;d{h||(h=!0,c--),a[d]=p},()=>l--,void 0,()=>{(!l||!h)&&(c||s.next(n?NB(n,a):a),s.complete())}))}});return t?r.pipe(XT(t)):r}class aR{}class cu{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 cu?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 cu;return e.lazyInit=this.lazyInit&&this.lazyInit instanceof cu?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 FJ{encodeKey(t){return OV(t)}encodeValue(t){return OV(t)}decodeKey(t){return decodeURIComponent(t)}decodeValue(t){return decodeURIComponent(t)}}const NJ=/%(\d[a-f0-9])/gi,BJ={40:"@","3A":":",24:"$","2C":",","3B":";","3D":"=","3F":"?","2F":"/"};function OV(i){return encodeURIComponent(i).replace(NJ,(t,e)=>BJ[e]??t)}function qM(i){return`${i}`}class du{constructor(t={}){if(this.updates=null,this.cloneFrom=null,this.encoder=t.encoder||new FJ,t.fromString){if(t.fromObject)throw new Error("Cannot specify both fromString and fromObject.");this.map=function LJ(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 du({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 UJ{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 FV(i){return typeof ArrayBuffer<"u"&&i instanceof ArrayBuffer}function LV(i){return typeof Blob<"u"&&i instanceof Blob}function NV(i){return typeof FormData<"u"&&i instanceof FormData}class eb{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 VJ(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 cu),this.context||(this.context=new UJ),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 eb(e,n,s,{params:c,headers:l,context:d,reportProgress:a,responseType:r,withCredentials:o})}}var ls=(()=>((ls=ls||{})[ls.Sent=0]="Sent",ls[ls.UploadProgress=1]="UploadProgress",ls[ls.ResponseHeader=2]="ResponseHeader",ls[ls.DownloadProgress=3]="DownloadProgress",ls[ls.Response=4]="Response",ls[ls.User=5]="User",ls))();class HJ{constructor(t,e=200,n="OK"){this.headers=t.headers||new cu,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 lR extends HJ{constructor(t={}){super(t),this.type=ls.Response,this.body=void 0!==t.body?t.body:null}clone(t={}){return new lR({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 cR(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 dR=(()=>{class i{constructor(e){this.handler=e}request(e,n,r={}){let s;if(e instanceof eb)s=e;else{let l,c;l=r.headers instanceof cu?r.headers:new cu(r.headers),r.params&&(c=r.params instanceof du?r.params:new du({fromObject:r.params})),s=new eb(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=ut(s).pipe(nu(l=>this.handler.handle(l)));if(e instanceof eb||"events"===r.observe)return o;const a=o.pipe(vn(l=>l instanceof lR));switch(r.observe||"body"){case"body":switch(s.responseType){case"arraybuffer":return a.pipe(et(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(et(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(et(l=>{if(null!==l.body&&"string"!=typeof l.body)throw new Error("Response is not a string.");return l.body}));default:return a.pipe(et(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 du).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,cR(r,n))}post(e,n,r={}){return this.request("POST",e,cR(r,n))}put(e,n,r={}){return this.request("PUT",e,cR(r,n))}}return i.\u0275fac=function(e){return new(e||i)(ee(aR))},i.\u0275prov=Ie({token:i,factory:i.\u0275fac}),i})();const tee=["*"];let KM;function tb(i){return function nee(){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 WV(i){return Error(`Unable to find icon with the name "${i}"`)}function jV(i){return Error(`The URL provided to MatIconRegistry was not trusted as a resource URL via Angular's DomSanitizer. Attempted URL was "${i}".`)}function YV(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(Xn.HTML,r);if(!o)throw YV(r);const a=tb(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(Xn.HTML,n);if(!s)throw YV(n);const o=tb(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(Xn.RESOURCE_URL,e);if(!n)throw jV(e);const r=this._cachedIconsByUrl.get(n);return r?ut(QM(r)):this._loadSvgIconFromConfig(new Fh(e,null)).pipe(Ui(s=>this._cachedIconsByUrl.set(n,s)),et(s=>QM(s)))}getNamedSvgIcon(e,n=""){const r=qV(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):hm(WV(r))}ngOnDestroy(){this._resolvers=[],this._svgIconConfigs.clear(),this._iconSetConfigs.clear(),this._cachedIconsByUrl.clear()}_getSvgFromConfig(e){return e.svgText?ut(QM(this._svgElementFromConfig(e))):this._loadSvgIconFromConfig(e).pipe(et(n=>QM(n)))}_getSvgFromIconSetConfigs(e,n){const r=this._extractIconWithNameFromAnySet(e,n);return r?ut(r):kV(n.filter(o=>!o.svgText).map(o=>this._loadSvgIconSetFromConfig(o).pipe(Lc(a=>{const c=`Loading icon set URL: ${this._sanitizer.sanitize(Xn.RESOURCE_URL,o.url)} failed: ${a.message}`;return this._errorHandler.handleError(new Error(c)),ut(null)})))).pipe(et(()=>{const o=this._extractIconWithNameFromAnySet(e,n);if(!o)throw WV(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(Ui(n=>e.svgText=n),et(()=>this._svgElementFromConfig(e)))}_loadSvgIconSetFromConfig(e){return e.svgText?ut(null):this._fetchIcon(e).pipe(Ui(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(tb(""));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(tb("")),r=e.attributes;for(let s=0;stb(c)),iu(()=>this._inProgressUrlFetches.delete(o)),Nf());return this._inProgressUrlFetches.set(o,l),l}_addSvgIconConfig(e,n,r){return this._svgIconConfigs.set(qV(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:""}}}),XV=["clip-path","color-profile","src","cursor","fill","filter","marker","marker-start","marker-mid","marker-end","mask","stroke"],dee=XV.map(i=>`[${i}]`).join(", "),uee=/^url\(['"]?#(.*?)['"]?\)$/;let hR=(()=>{class i extends oee{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=Kt.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(dee),r=this._elementsWithExternalReferences=this._elementsWithExternalReferences||new Map;for(let s=0;s{const a=n[s],l=a.getAttribute(o),c=l?l.match(uee):null;if(c){let d=r.get(a);d||(d=[],r.set(a,d)),d.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(Pi(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)(E(pt),E(ZM),ma("aria-hidden"),E(lee),E(nl),E(aee,8))},i.\u0275cmp=ot({type:i,selectors:[["mat-icon"]],hostAttrs:["role","img",1,"mat-icon","notranslate"],hostVars:8,hostBindings:function(e,n){2&e&&(St("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),un("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:[at],ngContentSelectors:tee,decls:1,vars:0,template:function(e,n){1&e&&(nr(),Gt(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})(),KV=(()=>{class i{}return i.\u0275fac=function(e){return new(e||i)},i.\u0275mod=nn({type:i}),i.\u0275inj=Xt({imports:[Kn,Kn]}),i})(),ZV=(()=>{class i{constructor(e){this.viewContainerRef=e}}return i.\u0275fac=function(e){return new(e||i)(E(Wr))},i.\u0275dir=ve({type:i,selectors:[["","dataBlockUI",""]]}),i})(),hee=(()=>{class i{constructor(){this.resource=null,this.name="",this.resourceDescription="",this.changed=new We}}return i.\u0275fac=function(e){return new(e||i)},i.\u0275cmp=ot({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&&(W(0,"p",0),Ge(1),q()),2&e&&(U("matTooltip",n.resourceDescription),G(1),Jp("",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:[Os],changeDetection:0}),i})();function fee(i,t){if(1&i&&(W(0,"h2",4),Ge(1),q()),2&i){const e=he();U("matTooltip",e.resourceDescription),G(1),_i(e.name)}}function pee(i,t){1&i&&ke(0,"app-block-actions",5),2&i&&U("resource",he().resource)}const mee=function(i,t,e,n){return{id:i,name:t,data:e,schema:n}};function gee(i,t){if(1&i&&ke(0,"app-editor",7),2&i){const e=he().$implicit,n=he();U("resource",k2(3,mee,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 _ee(i,t){if(1&i&&(Gr(0),fe(1,gee,1,8,"app-editor",6),$t(2,"async"),$r()),2&i){const e=t.$implicit,n=he();G(1),U("ngIf",!(Qt(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 $c=(()=>{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 We,this.destroyed$=new Re}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(Xe(this.destroyed$),vn(([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)(E(cl))},i.\u0275cmp=ot({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&&(fe(0,fee,2,2,"h2",0),$t(1,"async"),fe(2,pee,1,1,"app-block-actions",1),W(3,"div",2),fe(4,_ee,3,3,"ng-container",3),q()),2&e){let r;U("ngIf",n.name&&n.name!=(null==(r=Qt(1,4,n.main.resource$))?null:r.name)),G(2),U("ngIf",!n.hideBlockActions),G(2),U("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})(),QV=(()=>{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)(E(tl),E(pt))},i.\u0275dir=ve({type:i}),i})(),Lh=(()=>{class i extends QV{}return i.\u0275fac=function(){let t;return function(n){return(t||(t=ni(i)))(n||i)}}(),i.\u0275dir=ve({type:i,features:[at]}),i})();const Ao=new me("NgValueAccessor"),yee={provide:Ao,useExisting:Gn(()=>$l),multi:!0},xee=new me("CompositionEventMode");let $l=(()=>{class i extends QV{constructor(e,n,r){super(e,n),this._compositionMode=r,this._composing=!1,null==this._compositionMode&&(this._compositionMode=!function bee(){const i=Pc()?Pc().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)(E(tl),E(pt),E(xee,8))},i.\u0275dir=ve({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&&Ue("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([yee]),at]}),i})();const wee=!1;function uu(i){return null==i||("string"==typeof i||Array.isArray(i))&&0===i.length}function ez(i){return null!=i&&"number"==typeof i.length}const Yr=new me("NgValidators"),hu=new me("NgAsyncValidators"),Mee=/^(?=.{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 dl{static min(t){return tz(t)}static max(t){return nz(t)}static required(t){return function iz(i){return uu(i.value)?{required:!0}:null}(t)}static requiredTrue(t){return function rz(i){return!0===i.value?null:{required:!0}}(t)}static email(t){return function sz(i){return uu(i.value)||Mee.test(i.value)?null:{email:!0}}(t)}static minLength(t){return oz(t)}static maxLength(t){return az(t)}static pattern(t){return function lz(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(uu(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 pz(t)}static composeAsync(t){return mz(t)}}function tz(i){return t=>{if(uu(t.value)||uu(i))return null;const e=parseFloat(t.value);return!isNaN(e)&&e{if(uu(t.value)||uu(i))return null;const e=parseFloat(t.value);return!isNaN(e)&&e>i?{max:{max:i,actual:t.value}}:null}}function oz(i){return t=>uu(t.value)||!ez(t.value)?null:t.value.lengthez(t.value)&&t.value.length>i?{maxlength:{requiredLength:i,actualLength:t.value.length}}:null}function JM(i){return null}function cz(i){return null!=i}function dz(i){const t=iy(i)?Li(i):i;if(wee&&!k1(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 pe(-1101,e)}return t}function uz(i){let t={};return i.forEach(e=>{t=null!=e?{...t,...e}:t}),0===Object.keys(t).length?null:t}function hz(i,t){return t.map(e=>e(i))}function fz(i){return i.map(t=>function Cee(i){return!i.validate}(t)?t:e=>t.validate(e))}function pz(i){if(!i)return null;const t=i.filter(cz);return 0==t.length?null:function(e){return uz(hz(e,t))}}function fR(i){return null!=i?pz(fz(i)):null}function mz(i){if(!i)return null;const t=i.filter(cz);return 0==t.length?null:function(e){return kV(hz(e,t).map(dz)).pipe(et(uz))}}function pR(i){return null!=i?mz(fz(i)):null}function gz(i,t){return null===i?[t]:Array.isArray(i)?[...i,t]:[i,t]}function _z(i){return i._rawValidators}function vz(i){return i._rawAsyncValidators}function mR(i){return i?Array.isArray(i)?i:[i]:[]}function eC(i,t){return Array.isArray(i)?i.includes(t):i===t}function yz(i,t){const e=mR(t);return mR(i).forEach(r=>{eC(e,r)||e.push(r)}),e}function bz(i,t){return mR(t).filter(e=>!eC(i,e))}class xz{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=fR(this._rawValidators)}_setAsyncValidators(t){this._rawAsyncValidators=t||[],this._composedAsyncValidatorFn=pR(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 oo extends xz{get formDirective(){return null}get path(){return null}}class Wl extends xz{constructor(){super(...arguments),this._parent=null,this.name=null,this.valueAccessor=null}}class wz{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 Wc=(()=>{class i extends wz{constructor(e){super(e)}}return i.\u0275fac=function(e){return new(e||i)(E(Wl,2))},i.\u0275dir=ve({type:i,selectors:[["","formControlName",""],["","ngModel",""],["","formControl",""]],hostVars:14,hostBindings:function(e,n){2&e&&un("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:[at]}),i})(),gR=(()=>{class i extends wz{constructor(e){super(e)}}return i.\u0275fac=function(e){return new(e||i)(E(oo,10))},i.\u0275dir=ve({type:i,selectors:[["","formGroupName",""],["","formArrayName",""],["","ngModelGroup",""],["","formGroup",""],["form",3,"ngNoForm",""],["","ngForm",""]],hostVars:16,hostBindings:function(e,n){2&e&&un("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:[at]}),i})();function Mz(i,t){return i?`with name: '${t}'`:`at index: ${t}`}const yR=!1,nb="VALID",nC="INVALID",Um="PENDING",ib="DISABLED";function bR(i){return(iC(i)?i.validators:i)||null}function xR(i,t){return(iC(t)?t.asyncValidators:i)||null}function iC(i){return null!=i&&!Array.isArray(i)&&"object"==typeof i}function Cz(i,t,e){const n=i.controls;if(!(t?Object.keys(n):n).length)throw new pe(1e3,yR?function Dee(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 pe(1001,yR?function Tee(i,t){return`Cannot find form control ${Mz(i,t)}`}(t,e):"")}function Sz(i,t,e){i._forEachChild((n,r)=>{if(void 0===e[r])throw new pe(1002,yR?function Iee(i,t){return`Must supply a value for form control ${Mz(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===nb}get invalid(){return this.status===nC}get pending(){return this.status==Um}get disabled(){return this.status===ib}get enabled(){return this.status!==ib}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(yz(t,this._rawValidators))}addAsyncValidators(t){this.setAsyncValidators(yz(t,this._rawAsyncValidators))}removeValidators(t){this.setValidators(bz(t,this._rawValidators))}removeAsyncValidators(t){this.setAsyncValidators(bz(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=Um,!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=ib,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=nb,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===nb||this.status===Um)&&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()?ib:nb}_runValidator(){return this.validator?this.validator(this):null}_runAsyncValidator(t){if(this.asyncValidator){this.status=Um,this._hasOwnPendingAsyncValidator=!0;const e=dz(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 We,this.statusChanges=new We}_calculateStatus(){return this._allControlsDisabled()?ib:this.errors?nC:this._hasOwnPendingAsyncValidator||this._anyControlsHaveStatus(Um)?Um:this._anyControlsHaveStatus(nC)?nC:nb}_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 Ree(i){return Array.isArray(i)?fR(i):i||null}(this._rawValidators)}_assignAsyncValidators(t){this._rawAsyncValidators=Array.isArray(t)?t.slice():t,this._composedAsyncValidatorFn=function kee(i){return Array.isArray(i)?pR(i):i||null}(this._rawAsyncValidators)}}class Vm extends rC{constructor(t,e,n){super(bR(e),xR(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={}){Sz(this,!0,t),Object.keys(t).forEach(n=>{Cz(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 Ez extends Vm{}const Nh=new me("CallSetDisabledState",{providedIn:"root",factory:()=>rb}),rb="always";function sC(i,t){return[...t.path,i]}function sb(i,t,e=rb){wR(i,t),t.valueAccessor.writeValue(i.value),(i.disabled||"always"===e)&&t.valueAccessor.setDisabledState?.(i.disabled),function Oee(i,t){t.valueAccessor.registerOnChange(e=>{i._pendingValue=e,i._pendingChange=!0,i._pendingDirty=!0,"change"===i.updateOn&&Az(i,t)})}(i,t),function Lee(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 Fee(i,t){t.valueAccessor.registerOnTouched(()=>{i._pendingTouched=!0,"blur"===i.updateOn&&i._pendingChange&&Az(i,t),"submit"!==i.updateOn&&i.markAsTouched()})}(i,t),function Pee(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 wR(i,t){const e=_z(i);null!==t.validator?i.setValidators(gz(e,t.validator)):"function"==typeof e&&i.setValidators([e]);const n=vz(i);null!==t.asyncValidator?i.setAsyncValidators(gz(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=_z(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=vz(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 Az(i,t){i._pendingDirty&&i.markAsDirty(),i.setValue(i._pendingValue,{emitModelToViewChange:!1}),t.viewToModelUpdate(i._pendingValue),i._pendingChange=!1}function Dz(i,t){wR(i,t)}function CR(i,t){if(!i.hasOwnProperty("model"))return!1;const e=i.model;return!!e.isFirstChange()||!Object.is(t,e.currentValue)}function Tz(i,t){i._syncPendingControls(),t.forEach(e=>{const n=e.control;"submit"===n.updateOn&&n._pendingChange&&(e.viewToModelUpdate(n._pendingValue),n._pendingChange=!1)})}function SR(i,t){if(!t)return null;let e,n,r;return Array.isArray(t),t.forEach(s=>{s.constructor===$l?e=s:function Uee(i){return Object.getPrototypeOf(i.constructor)===Lh}(s)?n=s:r=s}),r||n||e||null}const zee={provide:oo,useExisting:Gn(()=>ab)},ob=(()=>Promise.resolve())();let ab=(()=>{class i extends oo{constructor(e,n,r){super(),this.callSetDisabledState=r,this.submitted=!1,this._directives=new Set,this.ngSubmit=new We,this.form=new Vm({},fR(e),pR(n))}ngAfterViewInit(){this._setUpdateStrategy()}get formDirective(){return this}get control(){return this.form}get path(){return[]}get controls(){return this.form.controls}addControl(e){ob.then(()=>{const n=this._findContainer(e.path);e.control=n.registerControl(e.name,e.control),sb(e.control,e,this.callSetDisabledState),e.control.updateValueAndValidity({emitEvent:!1}),this._directives.add(e)})}getControl(e){return this.form.get(e.path)}removeControl(e){ob.then(()=>{const n=this._findContainer(e.path);n&&n.removeControl(e.name),this._directives.delete(e)})}addFormGroup(e){ob.then(()=>{const n=this._findContainer(e.path),r=new Vm({});Dz(r,e),n.registerControl(e.name,r),r.updateValueAndValidity({emitEvent:!1})})}removeFormGroup(e){ob.then(()=>{const n=this._findContainer(e.path);n&&n.removeControl(e.name)})}getFormGroup(e){return this.form.get(e.path)}updateModel(e,n){ob.then(()=>{this.form.get(e.path).setValue(n)})}setValue(e){this.control.setValue(e)}onSubmit(e){return this.submitted=!0,Tz(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)(E(Yr,10),E(hu,10),E(Nh,8))},i.\u0275dir=ve({type:i,selectors:[["form",3,"ngNoForm","",3,"formGroup",""],["ng-form"],["","ngForm",""]],hostBindings:function(e,n){1&e&&Ue("submit",function(s){return n.onSubmit(s)})("reset",function(){return n.onReset()})},inputs:{options:["ngFormOptions","options"]},outputs:{ngSubmit:"ngSubmit"},exportAs:["ngForm"],features:[An([zee]),at]}),i})();function Iz(i,t){const e=i.indexOf(t);e>-1&&i.splice(e,1)}function Rz(i){return"object"==typeof i&&null!==i&&2===Object.keys(i).length&&"value"in i&&"disabled"in i}const jl=class extends rC{constructor(t=null,e,n){super(bR(e),xR(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=Rz(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){Iz(this._onChange,t)}registerOnDisabledChange(t){this._onDisabledChange.push(t)}_unregisterOnDisabledChange(t){Iz(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){Rz(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}},$ee={provide:Wl,useExisting:Gn(()=>fu)},Oz=(()=>Promise.resolve())();let fu=(()=>{class i extends Wl{constructor(e,n,r,s,o,a){super(),this._changeDetectorRef=o,this.callSetDisabledState=a,this.control=new jl,this._registered=!1,this.update=new We,this._parent=e,this._setValidators(n),this._setAsyncValidators(r),this.valueAccessor=SR(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),CR(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(){sb(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){Oz.then(()=>{this.control.setValue(e,{emitViewToModelChange:!1}),this._changeDetectorRef?.markForCheck()})}_updateDisabled(e){const n=e.isDisabled.currentValue,r=0!==n&&function cm(i){return"boolean"==typeof i?i:null!=i&&"false"!==i}(n);Oz.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)(E(oo,9),E(Yr,10),E(hu,10),E(Ao,10),E(ri,8),E(Nh,8))},i.\u0275dir=ve({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([$ee]),at,yi]}),i})(),ER=(()=>{class i{}return i.\u0275fac=function(e){return new(e||i)},i.\u0275dir=ve({type:i,selectors:[["form",3,"ngNoForm","",3,"ngNativeValidate",""]],hostAttrs:["novalidate",""]}),i})();const Wee={provide:Ao,useExisting:Gn(()=>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=ni(i)))(n||i)}}(),i.\u0275dir=ve({type:i,selectors:[["input","type","number","formControlName",""],["input","type","number","formControl",""],["input","type","number","ngModel",""]],hostBindings:function(e,n){1&e&&Ue("input",function(s){return n.onChange(s.target.value)})("blur",function(){return n.onTouched()})},features:[An([Wee]),at]}),i})(),Fz=(()=>{class i{}return i.\u0275fac=function(e){return new(e||i)},i.\u0275mod=nn({type:i}),i.\u0275inj=Xt({}),i})();const AR=new me("NgModelWithFormControlWarning"),Kee={provide:oo,useExisting:Gn(()=>Uh)};let Uh=(()=>{class i extends oo{constructor(e,n,r){super(),this.callSetDisabledState=r,this.submitted=!1,this._onCollectionChange=()=>this._updateDomValue(),this.directives=[],this.form=null,this.ngSubmit=new We,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 sb(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 Vee(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,Tz(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 jl)(r)&&(sb(r,e,this.callSetDisabledState),e.control=r))}),this.form._updateTreeValidity({emitEvent:!1})}_setUpFormContainer(e){const n=this.form.get(e.path);Dz(n,e),n.updateValueAndValidity({emitEvent:!1})}_cleanUpFormContainer(e){if(this.form){const n=this.form.get(e.path);n&&function Nee(i,t){return lC(i,t)}(n,e)&&n.updateValueAndValidity({emitEvent:!1})}}_updateRegistrations(){this.form._registerOnCollectionChange(this._onCollectionChange),this._oldForm&&this._oldForm._registerOnCollectionChange(()=>{})}_updateValidators(){wR(this.form,this),this._oldForm&&lC(this._oldForm,this)}_checkFormPresent(){}}return i.\u0275fac=function(e){return new(e||i)(E(Yr,10),E(hu,10),E(Nh,8))},i.\u0275dir=ve({type:i,selectors:[["","formGroup",""]],hostBindings:function(e,n){1&e&&Ue("submit",function(s){return n.onSubmit(s)})("reset",function(){return n.onReset()})},inputs:{form:["formGroup","form"]},outputs:{ngSubmit:"ngSubmit"},exportAs:["ngForm"],features:[An([Kee]),at,yi]}),i})();const Jee={provide:Wl,useExisting:Gn(()=>cC)};let cC=(()=>{class i extends Wl{set isDisabled(e){}constructor(e,n,r,s,o){super(),this._ngModelWarningConfig=o,this._added=!1,this.update=new We,this._ngModelWarningSent=!1,this._parent=e,this._setValidators(n),this._setAsyncValidators(r),this.valueAccessor=SR(0,s)}ngOnChanges(e){this._added||this._setUpControl(),CR(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)(E(oo,13),E(Yr,10),E(hu,10),E(Ao,10),E(AR,8))},i.\u0275dir=ve({type:i,selectors:[["","formControlName",""]],inputs:{name:["formControlName","name"],isDisabled:["disabled","isDisabled"],model:["ngModel","model"]},outputs:{update:"ngModelChange"},features:[An([Jee]),at,yi]}),i})();function Hz(i){return"number"==typeof i?i:parseInt(i,10)}function Gz(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=ve({type:i,features:[yi]}),i})();const ote={provide:Yr,useExisting:Gn(()=>zh),multi:!0};let zh=(()=>{class i extends Vh{constructor(){super(...arguments),this.inputName="max",this.normalizeInput=e=>Gz(e),this.createValidator=e=>nz(e)}}return i.\u0275fac=function(){let t;return function(n){return(t||(t=ni(i)))(n||i)}}(),i.\u0275dir=ve({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&&St("max",n._enabled?n.max:null)},inputs:{max:"max"},features:[An([ote]),at]}),i})();const ate={provide:Yr,useExisting:Gn(()=>Hh),multi:!0};let Hh=(()=>{class i extends Vh{constructor(){super(...arguments),this.inputName="min",this.normalizeInput=e=>Gz(e),this.createValidator=e=>tz(e)}}return i.\u0275fac=function(){let t;return function(n){return(t||(t=ni(i)))(n||i)}}(),i.\u0275dir=ve({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&&St("min",n._enabled?n.min:null)},inputs:{min:"min"},features:[An([ate]),at]}),i})();const ute={provide:Yr,useExisting:Gn(()=>PR),multi:!0};let PR=(()=>{class i extends Vh{constructor(){super(...arguments),this.inputName="minlength",this.normalizeInput=e=>Hz(e),this.createValidator=e=>oz(e)}}return i.\u0275fac=function(){let t;return function(n){return(t||(t=ni(i)))(n||i)}}(),i.\u0275dir=ve({type:i,selectors:[["","minlength","","formControlName",""],["","minlength","","formControl",""],["","minlength","","ngModel",""]],hostVars:1,hostBindings:function(e,n){2&e&&St("minlength",n._enabled?n.minlength:null)},inputs:{minlength:"minlength"},features:[An([ute]),at]}),i})();const hte={provide:Yr,useExisting:Gn(()=>OR),multi:!0};let OR=(()=>{class i extends Vh{constructor(){super(...arguments),this.inputName="maxlength",this.normalizeInput=e=>Hz(e),this.createValidator=e=>az(e)}}return i.\u0275fac=function(){let t;return function(n){return(t||(t=ni(i)))(n||i)}}(),i.\u0275dir=ve({type:i,selectors:[["","maxlength","","formControlName",""],["","maxlength","","formControl",""],["","maxlength","","ngModel",""]],hostVars:1,hostBindings:function(e,n){2&e&&St("maxlength",n._enabled?n.maxlength:null)},inputs:{maxlength:"maxlength"},features:[An([hte]),at]}),i})(),Yz=(()=>{class i{}return i.\u0275fac=function(e){return new(e||i)},i.\u0275mod=nn({type:i}),i.\u0275inj=Xt({imports:[Fz]}),i})();class qz extends rC{constructor(t,e,n){super(bR(e),xR(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={}){Sz(this,!1,t),t.forEach((n,r)=>{Cz(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 Xz(i){return!!i&&(void 0!==i.asyncValidators||void 0!==i.validators||void 0!==i.updateOn)}let pte=(()=>{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 Xz(n)?s=n:null!==n&&(s.validators=n.validator,s.asyncValidators=n.asyncValidator),new Vm(r,s)}record(e,n=null){const r=this._reduceControls(e);return new Ez(r,n)}control(e,n,r){let s={};return this.useNonNullable?(Xz(n)?s=n:(s.validators=n,s.asyncValidators=r),new jl(e,{...s,nonNullable:!0})):new jl(e,n,r)}array(e,n,r){const s=e.map(o=>this._createControl(o));return new qz(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 jl||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})(),Kz=(()=>{class i{static withConfig(e){return{ngModule:i,providers:[{provide:Nh,useValue:e.callSetDisabledState??rb}]}}}return i.\u0275fac=function(e){return new(e||i)},i.\u0275mod=nn({type:i}),i.\u0275inj=Xt({imports:[Yz]}),i})(),Zz=(()=>{class i{static withConfig(e){return{ngModule:i,providers:[{provide:AR,useValue:e.warnOnNgModelWithFormControl??"always"},{provide:Nh,useValue:e.callSetDisabledState??rb}]}}}return i.\u0275fac=function(e){return new(e||i)},i.\u0275mod=nn({type:i}),i.\u0275inj=Xt({imports:[Yz]}),i})();const mte=["matFormFieldNotchedOutline",""],gte=["*"],_te=["textField"],vte=["iconPrefixContainer"],yte=["textPrefixContainer"];function bte(i,t){1&i&&ke(0,"span",19)}function xte(i,t){if(1&i){const e=mi();W(0,"label",17),Ue("cdkObserveContent",function(){return cn(e),zt(he(2)._refreshOutlineNotchWidth())}),Gt(1,1),fe(2,bte,1,0,"span",18),q()}if(2&i){const e=he(2);U("floating",e._shouldLabelFloat())("cdkObserveContentDisabled",!e._hasOutline())("id",e._labelId),St("for",e._control.id)("aria-owns",e._control.id),G(2),U("ngIf",!e.hideRequiredMarker&&e._control.required)}}function wte(i,t){1&i&&fe(0,xte,3,6,"label",16),2&i&&U("ngIf",he()._hasFloatingLabel())}function Mte(i,t){1&i&&ke(0,"div",20)}function Cte(i,t){}function Ste(i,t){1&i&&fe(0,Cte,0,0,"ng-template",22),2&i&&(he(2),U("ngTemplateOutlet",tr(1)))}function Ete(i,t){if(1&i&&(W(0,"div",21),fe(1,Ste,1,1,"ng-template",9),q()),2&i){const e=he();U("matFormFieldNotchedOutlineOpen",e._shouldLabelFloat())("matFormFieldNotchedOutlineLabelWidth",e._labelWidth),G(1),U("ngIf",!e._forceDisplayInfixLabel())}}function Ate(i,t){1&i&&(W(0,"div",23,24),Gt(2,2),q())}function Dte(i,t){1&i&&(W(0,"div",25,26),Gt(2,3),q())}function Tte(i,t){}function Ite(i,t){1&i&&fe(0,Tte,0,0,"ng-template",22),2&i&&(he(),U("ngTemplateOutlet",tr(1)))}function Rte(i,t){1&i&&(W(0,"div",27),Gt(1,4),q())}function kte(i,t){1&i&&(W(0,"div",28),Gt(1,5),q())}function Pte(i,t){1&i&&ke(0,"div",29)}function Ote(i,t){1&i&&(W(0,"div",30),Gt(1,6),q()),2&i&&U("@transitionMessages",he()._subscriptAnimationState)}function Fte(i,t){if(1&i&&(W(0,"mat-hint",34),Ge(1),q()),2&i){const e=he(2);U("id",e._hintLabelId),G(1),_i(e.hintLabel)}}function Lte(i,t){if(1&i&&(W(0,"div",31),fe(1,Fte,2,2,"mat-hint",32),Gt(2,7),ke(3,"div",33),Gt(4,8),q()),2&i){const e=he();U("@transitionMessages",e._subscriptAnimationState),G(1),U("ngIf",e.hintLabel)}}const Nte=["*",[["mat-label"]],[["","matPrefix",""],["","matIconPrefix",""]],[["","matTextPrefix",""]],[["","matTextSuffix",""]],[["","matSuffix",""],["","matIconSuffix",""]],[["mat-error"],["","matError",""]],[["mat-hint",3,"align","end"]],[["mat-hint","align","end"]]],Bte=["*","mat-label","[matPrefix], [matIconPrefix]","[matTextPrefix]","[matTextSuffix]","[matSuffix], [matIconSuffix]","mat-error, [matError]","mat-hint:not([align='end'])","mat-hint[align='end']"];let Yo=(()=>{class i{}return i.\u0275fac=function(e){return new(e||i)},i.\u0275dir=ve({type:i,selectors:[["mat-label"]]}),i})(),Ute=0;const Qz=new me("MatError");let Vte=(()=>{class i{constructor(e,n){this.id="mat-mdc-error-"+Ute++,e||n.nativeElement.setAttribute("aria-live","polite")}}return i.\u0275fac=function(e){return new(e||i)(ma("aria-live"),E(pt))},i.\u0275dir=ve({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&&Ul("id",n.id)},inputs:{id:"id"},features:[An([{provide:Qz,useExisting:i}])]}),i})(),zte=0,Jz=(()=>{class i{constructor(){this.align="start",this.id="mat-mdc-hint-"+zte++}}return i.\u0275fac=function(e){return new(e||i)},i.\u0275dir=ve({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&&(Ul("id",n.id),St("align",null),un("mat-mdc-form-field-hint-end","end"===n.align))},inputs:{align:"align",id:"id"}}),i})();const eH=new me("MatPrefix");let Hte=(()=>{class i{constructor(){this._isText=!1}set _isTextSelector(e){this._isText=!0}}return i.\u0275fac=function(e){return new(e||i)},i.\u0275dir=ve({type:i,selectors:[["","matPrefix",""],["","matIconPrefix",""],["","matTextPrefix",""]],inputs:{_isTextSelector:["matTextPrefix","_isTextSelector"]},features:[An([{provide:eH,useExisting:i}])]}),i})();const tH=new me("MatSuffix");let Gte=(()=>{class i{constructor(){this._isText=!1}set _isTextSelector(e){this._isText=!0}}return i.\u0275fac=function(e){return new(e||i)},i.\u0275dir=ve({type:i,selectors:[["","matSuffix",""],["","matIconSuffix",""],["","matTextSuffix",""]],inputs:{_isTextSelector:["matTextSuffix","_isTextSelector"]},features:[An([{provide:tH,useExisting:i}])]}),i})(),nH=(()=>{class i{constructor(e){this._elementRef=e,this.floating=!1}getWidth(){return function $te(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)(E(pt))},i.\u0275dir=ve({type:i,selectors:[["label","matFormFieldFloatingLabel",""]],hostAttrs:[1,"mdc-floating-label","mat-mdc-floating-label"],hostVars:2,hostBindings:function(e,n){2&e&&un("mdc-floating-label--float-above",n.floating)},inputs:{floating:"floating"}}),i})();const iH="mdc-line-ripple--active",dC="mdc-line-ripple--deactivating";let rH=(()=>{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(iH,dC)},n.runOutsideAngular(()=>{e.nativeElement.addEventListener("transitionend",this._handleTransitionEnd)})}activate(){const e=this._elementRef.nativeElement.classList;e.remove(dC),e.add(iH)}deactivate(){this._elementRef.nativeElement.classList.add(dC)}ngOnDestroy(){this._elementRef.nativeElement.removeEventListener("transitionend",this._handleTransitionEnd)}}return i.\u0275fac=function(e){return new(e||i)(E(pt),E(ht))},i.\u0275dir=ve({type:i,selectors:[["div","matFormFieldLineRipple",""]],hostAttrs:[1,"mdc-line-ripple"]}),i})(),sH=(()=>{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)(E(pt),E(ht))},i.\u0275cmp=ot({type:i,selectors:[["div","matFormFieldNotchedOutline",""]],hostAttrs:[1,"mdc-notched-outline"],hostVars:2,hostBindings:function(e,n){2&e&&un("mdc-notched-outline--notched",n.open)},inputs:{labelWidth:["matFormFieldNotchedOutlineLabelWidth","labelWidth"],open:["matFormFieldNotchedOutlineOpen","open"]},attrs:mte,ngContentSelectors:gte,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&&(nr(),ke(0,"div",0),W(1,"div",1),Gt(2),q(),ke(3,"div",2)),2&e&&(G(1),Go("width",n._getNotchWidth()))},encapsulation:2,changeDetection:0}),i})();const Wte={transitionMessages:Aa("transitionMessages",[Ps("enter",si({opacity:1,transform:"translateY(0%)"})),Pr("void => enter",[si({opacity:0,transform:"translateY(-5px)"}),jr("300ms cubic-bezier(0.55, 0, 0.55, 0.2)")])])};let FR=(()=>{class i{}return i.\u0275fac=function(e){return new(e||i)},i.\u0275dir=ve({type:i}),i})();const uC=new me("MatFormField"),jte=new me("MAT_FORM_FIELD_DEFAULT_OPTIONS");let oH=0,Yl=(()=>{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-"+oH++,this._hintLabelId="mat-mdc-hint-"+oH++,this._subscriptAnimationState="",this._labelWidth=0,this._destroyed=new Re,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(Xe(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(),Mr(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(Xe(this._destroyed)).subscribe(()=>{this._needsOutlineLabelOffsetUpdateOnStable&&(this._needsOutlineLabelOffsetUpdateOnStable=!1,this._updateOutlineLabelOffset())})}),this._dir.change.pipe(Xe(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)(E(pt),E(ri),E(ht),E(Ea),E(Vi),E(jte,8),E(Rr,8),E(Wt))},i.\u0275cmp=ot({type:i,selectors:[["mat-form-field"]],contentQueries:function(e,n,r){if(1&e&&($i(r,Yo,5),$i(r,Yo,7),$i(r,FR,5),$i(r,eH,5),$i(r,tH,5),$i(r,Qz,5),$i(r,Jz,5)),2&e){let s;Tt(s=It())&&(n._labelChildNonStatic=s.first),Tt(s=It())&&(n._labelChildStatic=s.first),Tt(s=It())&&(n._formFieldControl=s.first),Tt(s=It())&&(n._prefixChildren=s),Tt(s=It())&&(n._suffixChildren=s),Tt(s=It())&&(n._errorChildren=s),Tt(s=It())&&(n._hintChildren=s)}},viewQuery:function(e,n){if(1&e&&(ii(_te,5),ii(vte,5),ii(yte,5),ii(nH,5),ii(sH,5),ii(rH,5)),2&e){let r;Tt(r=It())&&(n._textField=r.first),Tt(r=It())&&(n._iconPrefixContainer=r.first),Tt(r=It())&&(n._textPrefixContainer=r.first),Tt(r=It())&&(n._floatingLabel=r.first),Tt(r=It())&&(n._notchedOutline=r.first),Tt(r=It())&&(n._lineRipple=r.first)}},hostAttrs:[1,"mat-mdc-form-field"],hostVars:42,hostBindings:function(e,n){2&e&&un("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:Bte,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&&(nr(Nte),fe(0,wte,1,1,"ng-template",null,0,Rc),W(2,"div",1,2),Ue("click",function(s){return n._control.onContainerClick&&n._control.onContainerClick(s)}),fe(4,Mte,1,0,"div",3),W(5,"div",4),fe(6,Ete,2,3,"div",5),fe(7,Ate,3,0,"div",6),fe(8,Dte,3,0,"div",7),W(9,"div",8),fe(10,Ite,1,1,"ng-template",9),Gt(11),q(),fe(12,Rte,2,0,"div",10),fe(13,kte,2,0,"div",11),q(),fe(14,Pte,1,0,"div",12),q(),W(15,"div",13),fe(16,Ote,2,1,"div",14),fe(17,Lte,5,2,"div",15),q()),2&e&&(G(2),un("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),G(2),U("ngIf",!n._hasOutline()&&!n._control.disabled),G(2),U("ngIf",n._hasOutline()),G(1),U("ngIf",n._hasIconPrefix),G(1),U("ngIf",n._hasTextPrefix),G(2),U("ngIf",!n._hasOutline()||n._forceDisplayInfixLabel()),G(2),U("ngIf",n._hasTextSuffix),G(1),U("ngIf",n._hasIconSuffix),G(1),U("ngIf",!n._hasOutline()),G(1),un("mat-mdc-form-field-subscript-dynamic-size","dynamic"===n.subscriptSizing),U("ngSwitch",n._getDisplayedMessages()),G(1),U("ngSwitchCase","error"),G(1),U("ngSwitchCase","hint"))},dependencies:[wi,vy,_y,LT,bU,Jz,nH,sH,rH],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:[Wte.transitionMessages]},changeDetection:0}),i})(),hC=(()=>{class i{}return i.\u0275fac=function(e){return new(e||i)},i.\u0275mod=nn({type:i}),i.\u0275inj=Xt({imports:[Kn,So,BI,Kn]}),i})();const cH=Th({passive:!0});let Xte=(()=>{class i{constructor(e,n){this._platform=e,this._ngZone=n,this._monitoredElements=new Map}monitor(e){if(!this._platform.isBrowser)return fo;const n=Bc(e),r=this._monitoredElements.get(n);if(r)return r.subject;const s=new Re,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,cH),n.classList.add("cdk-text-field-autofill-monitored")}),this._monitoredElements.set(n,{subject:s,unlisten:()=>{n.removeEventListener("animationstart",a,cH)}}),s}stopMonitoring(e){const n=Bc(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)(ee(Vi),ee(ht))},i.\u0275prov=Ie({token:i,factory:i.\u0275fac,providedIn:"root"}),i})(),Kte=(()=>{class i{}return i.\u0275fac=function(e){return new(e||i)},i.\u0275mod=nn({type:i}),i.\u0275inj=Xt({}),i})();const LR=new me("MAT_INPUT_VALUE_ACCESSOR"),Zte=["button","checkbox","file","hidden","image","radio","range","reset","submit"];let Qte=0;const Jte=VU(class{constructor(i,t,e,n){this._defaultErrorStateMatcher=i,this._parentForm=t,this._parentFormGroup=e,this.ngControl=n,this.stateChanges=new Re}});let jc=(()=>{class i extends Jte{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(dl.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&&nU().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,d,h){super(a,s,o,r),this._elementRef=e,this._platform=n,this._autofillMonitor=c,this._formField=h,this._uid="mat-input-"+Qte++,this.focused=!1,this.stateChanges=new Re,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=>nU().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&&d.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(){Zte.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)(E(pt),E(Vi),E(Wl,10),E(ab,8),E(Uh,8),E(HU),E(LR,10),E(Xte),E(ht),E(uC,8))},i.\u0275dir=ve({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&&Ue("focus",function(){return n._focusChanged(!0)})("blur",function(){return n._focusChanged(!1)})("input",function(){return n._onInput()}),2&e&&(Ul("id",n.id)("disabled",n.disabled)("required",n.required),St("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),un("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:FR,useExisting:i}]),at,yi]}),i})(),dH=(()=>{class i{}return i.\u0275fac=function(e){return new(e||i)},i.\u0275mod=nn({type:i}),i.\u0275inj=Xt({imports:[Kn,hC,hC,Kte,Kn]}),i})();function ene(i,t){if(1&i&&(W(0,"mat-label"),Ge(1),q()),2&i){const e=he(2);G(1),_i(e.resource.name)}}function tne(i,t){if(1&i){const e=mi();W(0,"mat-form-field",1),fe(1,ene,2,1,"mat-label",2),W(2,"input",3),Ue("ngModelChange",function(r){return cn(e),zt(he().resource.data=r)})("change",function(){return cn(e),zt(he().changed.emit())}),q()()}if(2&i){const e=he();U("matTooltip",e.resourceDescription),G(1),U("ngIf",e.resource.name),G(1),U("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 nne=(()=>{class i{constructor(){this.resource=null,this.resourceDescription="",this.disabled=!1,this.changed=new We}}return i.\u0275fac=function(e){return new(e||i)},i.\u0275cmp=ot({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&&fe(0,tne,3,7,"mat-form-field",0),2&e&&U("ngIf",n.resource)},dependencies:[wi,$l,Bh,Wc,Hh,zh,fu,Yl,Yo,jc,Os],changeDetection:0}),i})();function ine(i,t){if(1&i&&(W(0,"mat-label"),Ge(1),q()),2&i){const e=he(2);G(1),_i(e.resource.name)}}function rne(i,t){if(1&i){const e=mi();W(0,"mat-form-field",1),fe(1,ine,2,1,"mat-label",2),W(2,"input",3),Ue("ngModelChange",function(r){return cn(e),zt(he().resource.data=r)})("change",function(){return cn(e),zt(he().changed.emit())}),q()()}if(2&i){const e=he();U("matTooltip",e.resourceDescription),G(1),U("ngIf",e.resource.name),G(1),U("disabled",e.disabled||void 0!==e.resource.schema.required_value)("maxlength",e.maxLength)("minlength",e.minLength)("ngModel",e.resource.data)}}let uH=(()=>{class i{constructor(){this._resource=null,this.resourceDescription="",this.disabled=!1,this.changed=new We,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=ot({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&&fe(0,rne,3,6,"mat-form-field",0),2&e&&U("ngIf",n.resource)},dependencies:[wi,$l,Wc,PR,OR,fu,Yl,Yo,jc,Os],changeDetection:0}),i})();const ql=(i,t)=>i+(i.includes("__")?"/":"__")+t,Gh=function(){return[]};function sne(i,t){if(1&i&&(W(0,"mat-panel-description"),Ge(1," Click to view items ("),W(2,"b"),Ge(3),q(),Ge(4,") "),q()),2&i){const e=he(2);G(3),_i((e.resourceData||ro(1,Gh)).length)}}function one(i,t){1&i&&(W(0,"mat-panel-description"),Ge(1," Empty array "),q())}function ane(i,t){}function lne(i,t){if(1&i){const e=mi();W(0,"mat-expansion-panel",4),Ue("opened",function(){return cn(e),zt(he().onContentsTrigger(!0))})("closed",function(){return cn(e),zt(he().onContentsTrigger(!1))}),W(1,"mat-expansion-panel-header",5)(2,"mat-panel-title"),Ge(3),q(),fe(4,sne,5,2,"mat-panel-description",1),fe(5,one,2,0,"mat-panel-description",1),q(),fe(6,ane,0,0,"ng-template",6),q()}if(2&i){const e=he(),n=tr(3);G(1),U("matTooltip",e.resourceDescription),G(2),ir(" ",e.name," "),G(1),U("ngIf",(e.resourceData||ro(5,Gh)).length>0),G(1),U("ngIf",0==(e.resourceData||ro(6,Gh)).length),G(1),U("ngTemplateOutlet",n)}}function cne(i,t){}function dne(i,t){if(1&i&&(Gr(0),W(1,"h2",5),Ge(2),q(),W(3,"div",7),fe(4,cne,0,0,"ng-template",6),q(),$r()),2&i){const e=he(),n=tr(3);G(1),U("matTooltip",e.resourceDescription),G(1),_i(e.name),G(2),U("ngTemplateOutlet",n)}}function une(i,t){}function hne(i,t){if(1&i&&ke(0,"app-editor",10),2&i){const e=he().$implicit,n=he(3);U("resource",n.children[n.pageIndex*n.pageSize+e])("disabled",n.disabled)}}function fne(i,t){if(1&i&&(Gr(0),fe(1,hne,1,2,"app-editor",9),$r()),2&i){const e=t.$implicit,n=he(3);G(1),U("ngIf",n.pageIndex*n.pageSize+e0)}let NR=(()=>{class i{constructor(e,n){this.main=e,this.cdr=n,this._resource=null,this.resourceDescription="",this.disabled=!1,this.changed=new We,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 Re}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:ql(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(Xe(this.destroyed$),vn(([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 Re,this.changed=new We}set resource(e){this._resource$.next(e)}get resource(){return this._resource$.getValue()}ngAfterViewInit(){var e=this;return vt(function*(){e._resource$.pipe(Xe(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)(E(Gc),E(cl))},i.\u0275cmp=ot({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),$t(1,"async"),fe(2,wne,2,3,"img",1),$t(3,"async")),2&e&&(U("resource",Qt(1,3,n._resource$))("fieldBlacklist",ro(7,Mne)),G(2),U("ngIf",Qt(3,5,n.imageUrl$)))},dependencies:[wi,$c,zl],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 Sne=["*"],Ine=new me("MAT_CARD_CONFIG");let hH=(()=>{class i{constructor(e){this.appearance=e?.appearance||"raised"}}return i.\u0275fac=function(e){return new(e||i)(E(Ine,8))},i.\u0275cmp=ot({type:i,selectors:[["mat-card"]],hostAttrs:[1,"mat-mdc-card","mdc-card"],hostVars:4,hostBindings:function(e,n){2&e&&un("mat-mdc-card-outlined","outlined"===n.appearance)("mdc-card--outlined","outlined"===n.appearance)},inputs:{appearance:"appearance"},exportAs:["matCard"],ngContentSelectors:Sne,decls:1,vars:0,template:function(e,n){1&e&&(nr(),Gt(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})(),fH=(()=>{class i{}return i.\u0275fac=function(e){return new(e||i)},i.\u0275mod=nn({type:i}),i.\u0275inj=Xt({imports:[Kn,So,Kn]}),i})();class BR{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 Re,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 UR=(()=>{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})(),tie=(()=>{class i{}return i.\u0275fac=function(e){return new(e||i)},i.\u0275mod=nn({type:i}),i.\u0275inj=Xt({imports:[Kn,So,Zy,Kn]}),i})();const yH={transformPanel:Aa("transformPanel",[Pr("void => enter-dropdown",jr("120ms cubic-bezier(0, 0, 0.2, 1)",eV([si({opacity:0,transform:"scale(1, 0.8)"}),si({opacity:1,transform:"scale(1, 1)"})]))),Pr("void => enter-dialog",jr("150ms cubic-bezier(0, 0, 0.2, 1)",eV([si({opacity:0,transform:"scale(0.7)"}),si({transform:"none",opacity:1})]))),Pr("* => void",jr("100ms linear",si({opacity:0})))]),fadeInCalendar:Aa("fadeInCalendar",[Ps("void",si({opacity:0})),Ps("enter",si({opacity:1})),Pr("void => *",jr("120ms 100ms cubic-bezier(0.55, 0, 0.55, 0.2)"))])},wH=function(i){return{active:i}};function yie(i,t){if(1&i){const e=mi();W(0,"button",2),Ue("click",function(){const s=cn(e).$implicit;return zt(he().select(s))}),q()}if(2&i){const e=t.$implicit,n=he();Go("background-color",e),U("ngClass",im(3,wH,n.selectedColor===e))}}function bie(i,t){if(1&i){const e=mi();W(0,"button",2),Ue("click",function(){const s=cn(e).$implicit;return zt(he().select(s))}),q()}if(2&i){const e=t.$implicit,n=he();Go("background-color",e),U("ngClass",im(3,wH,n.selectedColor===e))}}const xie=["button"],wie=/^\s+/,Mie=/\s+$/,Hm=Math.round,Cie=(Math,Math,Math,/[^0-9]/g),MH=["#ffffff","#ffff00","#ff00ff","#ff0000","#c0c0c0","#808080","#808000","#800080","#800000","#00ffff","#00ff00","#008080","#008000","#0000ff","#000080","#000000"];function CH(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 Eie(i){return Math.round(255*parseFloat(i)).toString(16)}function SH(i){return qo(i)/255}function qo(i){return parseInt(i,16)}function EH(i,t,e,n){var r=[$h(Hm(i).toString(16)),$h(Hm(t).toString(16)),$h(Hm(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 pu="(?:[-\\+]?\\d*\\.\\d+%?)|(?:[-\\+]?\\d+%?)",HR="[\\s|\\(]+("+pu+")[,|\\s]+("+pu+")[,|\\s]+("+pu+")\\s*\\)?",GR="[\\s|\\(]+("+pu+")[,|\\s]+("+pu+")[,|\\s]+("+pu+")[,|\\s]+("+pu+")\\s*\\)?",Wh={CSS_UNIT:new RegExp(pu),rgb:new RegExp("rgb"+HR),rgba:new RegExp("rgba"+GR),hsl:new RegExp("hsl"+HR),hsla:new RegExp("hsla"+GR),hsv:new RegExp("hsv"+HR),hsva:new RegExp("hsva"+GR),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 $R(i){let t;return i=i.replace(wie,"").replace(Mie,"").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:qo(t[1]),g:qo(t[2]),b:qo(t[3]),a:SH(t[4])}:(t=Wh.hex6.exec(i))?{r:qo(t[1]),g:qo(t[2]),b:qo(t[3]),a:1}:(t=Wh.hex4.exec(i))?{r:qo(t[1]+""+t[1]),g:qo(t[2]+""+t[2]),b:qo(t[3]+""+t[3]),a:SH(t[4]+""+t[4])}:(t=Wh.hex3.exec(i))?{r:qo(t[1]+""+t[1]),g:qo(t[2]+""+t[2]),b:qo(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=EH(this.r,this.g,this.b),this.rgba=this.toRgba()}toHex(t){return EH(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 Sie(i,t,e,n,r){var s=[$h(Hm(i).toString(16)),$h(Hm(t).toString(16)),$h(Hm(e).toString(16)),$h(Eie(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 AH=(()=>{class i{constructor(e,n){this.zone=e,this.colorChanged=new We,this.x=0,this.y=0,this.drag=!1,this._destroyed=new Re,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){bo()},i.\u0275dir=ve({type:i,inputs:{color:"color"},outputs:{colorChanged:"colorChanged"}}),i})(),Tie=(()=>{class i extends AH{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}=CH(this.ctx,e.offsetX,e.offsetY);this.emitChange(new jh(n,r,s))}}return i.\u0275fac=function(e){return new(e||i)(E(ht))},i.\u0275cmp=ot({type:i,selectors:[["ngx-mat-color-slider"]],features:[at],decls:1,vars:0,consts:[["id","color-strip","width","15","height","234",1,"zone-strip",3,"mousedown","mouseup"]],template:function(e,n){1&e&&(W(0,"canvas",0),Ue("mousedown",function(s){return n.onMousedown(s)})("mouseup",function(s){return n.onMouseup(s)}),q())}}),i})(),Iie=(()=>{class i{constructor(){}onInput(e){this._formatInput(e.target)}_formatInput(e){let n=Number(e.value.replace(Cie,""));n=isNaN(n)?0:n,e.value=n}}return i.\u0275fac=function(e){return new(e||i)},i.\u0275dir=ve({type:i,selectors:[["","ngxMatNumericColorInput",""]],hostBindings:function(e,n){1&e&&Ue("input",function(s){return n.onInput(s)})}}),i})(),kie=(()=>{class i extends AH{constructor(e){super(e,"color-block"),this.zone=e,this._resetBaseColor=!0,this.formGroup=new Vm({r:new jl(null,[dl.required]),g:new jl(null,[dl.required]),b:new jl(null,[dl.required]),a:new jl(null,[dl.required]),hex:new jl(null,[dl.required,dl.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(){Mr(this.rCtrl.valueChanges,this.gCtrl.valueChanges,this.bCtrl.valueChanges,this.aCtrl.valueChanges).pipe(Xe(this._destroyed),Uc(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(Xe(this._destroyed),Uc(400),Vc()).subscribe(r=>{const s=$R(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}=CH(this.ctx,e.offsetX,e.offsetY);this.emitChange(new jh(n,r,s))}}return i.\u0275fac=function(e){return new(e||i)(E(ht))},i.\u0275cmp=ot({type:i,selectors:[["ngx-mat-color-canvas"]],hostAttrs:[1,"ngx-mat-color-canvas"],features:[at,yi],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&&(W(0,"form",0)(1,"div",1)(2,"div",2)(3,"canvas",3),Ue("mousedown",function(s){return n.onMousedown(s)})("mouseup",function(s){return n.onMouseup(s)}),q(),W(4,"ngx-mat-color-slider",4),Ue("colorChanged",function(s){return n.onSliderColorChanged(s)}),q()(),W(5,"div",5)(6,"mat-form-field")(7,"mat-label"),Ge(8,"R"),q(),ke(9,"input",6),q(),W(10,"mat-form-field")(11,"mat-label"),Ge(12,"G"),q(),ke(13,"input",7),q(),W(14,"mat-form-field")(15,"mat-label"),Ge(16,"B"),q(),ke(17,"input",8),q()()(),W(18,"div",1),ke(19,"button",9),W(20,"mat-form-field")(21,"mat-label"),Ge(22,"HEX6"),q(),W(23,"mat-label",10),Ge(24,"#\xa0"),q(),ke(25,"input",11),q(),W(26,"mat-form-field",12)(27,"mat-label"),Ge(28,"A"),q(),ke(29,"input",13),q()()()),2&e&&(U("formGroup",n.formGroup),G(19),Go("background-color",(null==n.color?null:n.color.rgba)||"transparent"))},dependencies:[jc,Yl,Yo,Hte,yV,ER,$l,Bh,Wc,gR,Hh,zh,Uh,cC,Tie,Iie],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})(),Pie=(()=>{class i{constructor(){this.colorChanged=new We,this.colors1=MH.slice(0,8),this.colors2=MH.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}=$R(e);this.colorChanged.emit(new jh(n,r,s,o))}}return i.\u0275fac=function(e){return new(e||i)},i.\u0275cmp=ot({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&&(W(0,"div",0),fe(1,yie,1,5,"button",1),q(),W(2,"div",0),fe(3,bie,1,5,"button",1),q()),2&e&&(G(1),U("ngForOf",n.colors1),G(2),U("ngForOf",n.colors2))},dependencies:[dm,Co,yV],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})(),DH=(()=>{class i{constructor(){this.colorChanged=new We}ngOnInit(){}handleColorChanged(e){this.colorChanged.emit(e)}}return i.\u0275fac=function(e){return new(e||i)},i.\u0275cmp=ot({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&&(W(0,"ngx-mat-color-canvas",0),Ue("colorChanged",function(s){return n.handleColorChanged(s)}),q(),W(1,"ngx-mat-color-collection",0),Ue("colorChanged",function(s){return n.handleColorChanged(s)}),q()),2&e&&(U("color",n.color),G(1),U("color",n.color))},dependencies:[kie,Pie],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})(),WR=(()=>{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=$R(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 Oie={display:{colorInput:"hex"}},TH=new me("mat-color-formats"),IH=new me("ngx-mat-colorpicker-scroll-strategy"),Lie={provide:IH,deps:[as],useFactory:function Fie(i){return()=>i.scrollStrategies.reposition()}},Nie=Xy(class{constructor(i){this._elementRef=i}});let RH=(()=>{class i extends Nie{constructor(e){super(e)}}return i.\u0275fac=function(e){return new(e||i)(E(pt))},i.\u0275cmp=ot({type:i,selectors:[["ngx-mat-color-picker-content"]],viewQuery:function(e,n){if(1&e&&ii(DH,5),2&e){let r;Tt(r=It())&&(n._palette=r.first)}},hostAttrs:[1,"ngx-mat-colorpicker-content"],hostVars:3,hostBindings:function(e,n){2&e&&(Sw("@transformPanel","enter"),un("ngx-mat-colorpicker-content-touch",n.picker.touchUi))},inputs:{color:"color"},exportAs:["ngxMatColorPickerContent"],features:[at],decls:1,vars:1,consts:[[3,"color","colorChanged"]],template:function(e,n){1&e&&(W(0,"ngx-mat-color-palette",0),Ue("colorChanged",function(s){return n.picker.select(s)}),q()),2&e&&U("color",n.picker._selected)},dependencies:[DH],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:[yH.transformPanel,yH.fadeInCalendar]},changeDetection:0}),i})(),kH=(()=>{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 We,this.closedStream=new We,this._touchUi=!1,this._opened=!1,this._defaultColor="primary",this._validSelected=null,this._disabledChange=new Re,this._focusedElementBeforeOpen=null,this._inputSubscription=Kt.EMPTY,this._selectedChanged=new Re,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(RH,{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(RH,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(Pi(1)).subscribe(()=>{this._popupRef.updatePosition()}))}_createPopup(){const e=new Im({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"),Mr(this._popupRef.backdropClick(),this._popupRef.detachments(),this._popupRef.keydownEvents().pipe(vn(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)(E(Lm),E(as),E(ht),E(WR),E(Ea,8),E(IH),E(Wt,8),E(Wr))},i.\u0275cmp=ot({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 Bie={provide:Ao,useExisting:Gn(()=>gC),multi:!0},Uie={provide:Yr,useExisting:Gn(()=>gC),multi:!0};let gC=(()=>{class i{constructor(e,n,r,s){if(this._elementRef=e,this._formField=n,this._colorFormats=r,this._adapter=s,this.colorChange=new We,this.colorInput=new We,this._disabledChange=new We,this._valueChange=new We,this._onTouched=()=>{},this._cvaOnChange=()=>{},this._validatorOnChange=()=>{},this._pickerSubscription=Kt.EMPTY,this._validator=dl.compose([]),this._lastValueValid=!1,!this._colorFormats)throw function Die(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)(E(pt),E(Yl,8),E(TH,8),E(WR))},i.\u0275dir=ve({type:i,selectors:[["input","ngxMatColorPicker",""]],hostVars:3,hostBindings:function(e,n){1&e&&Ue("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&&(Ul("disabled",n.disabled),St("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([Bie,Uie,{provide:LR,useExisting:i}])]}),i})(),Vie=(()=>{class i{constructor(e){this._cd=e,this._stateChanges=Kt.EMPTY}get disabled(){if(null==this._disabled&&this.picker)return this.picker.disabled}set disabled(e){this._disabled=e}ngOnInit(){}ngOnChanges(e){e.picker&&this._watchStateChanges()}ngOnDestroy(){this._stateChanges.unsubscribe()}ngAfterContentInit(){this._watchStateChanges()}open(e){this.picker&&!this.disabled&&(this.picker.open(),e.stopPropagation())}_watchStateChanges(){const e=this.picker?this.picker._disabledChange:ut(),n=this.picker&&this.picker._pickerInput?this.picker._pickerInput._disabledChange:ut(),r=this.picker?Mr(this.picker.openedStream,this.picker.closedStream):ut();this._stateChanges.unsubscribe(),this._stateChanges=Mr(e,n,r).subscribe(()=>this._cd.markForCheck())}}return i.\u0275fac=function(e){return new(e||i)(E(ri))},i.\u0275cmp=ot({type:i,selectors:[["ngx-mat-color-toggle"]],viewQuery:function(e,n){if(1&e&&ii(xie,5),2&e){let r;Tt(r=It())&&(n._button=r.first)}},hostAttrs:[1,"ngx-mat-color-toggle"],hostVars:7,hostBindings:function(e,n){1&e&&Ue("focus",function(){return n._button.focus()}),2&e&&(St("tabindex",-1),un("ngx-mat-color-toggle-active",n.picker&&n.picker.opened)("mat-accent",n.picker&&"accent"===n.picker.color)("mat-warn",n.picker&&"warn"===n.picker.color))},inputs:{picker:["for","picker"],tabIndex:"tabIndex",disabled:"disabled"},exportAs:["ngxMatColorPickerToggle"],features:[yi],decls:4,vars:5,consts:[["mat-icon-button","","type","button",3,"disabled","click"],["button",""]],template:function(e,n){1&e&&(W(0,"button",0,1),Ue("click",function(s){return n.open(s)}),W(2,"mat-icon"),Ge(3,"palette"),q()()),2&e&&(U("disabled",n.disabled),St("aria-haspopup",n.picker?"dialog":null)("tabindex",n.disabled?-1:n.tabIndex),G(2),Go("color",null==n.picker||null==n.picker._selected?null:n.picker._selected.rgba))},dependencies:[WM,hR],styles:[".mat-form-field-appearance .mat-form-field-prefix .ngx-mat-color-toggle-default-icon,.mat-form-field-appearance .mat-form-field-suffix .ngx-mat-color-toggle-default-icon{width:1em}.mat-form-field:not(.mat-form-field-appearance) .mat-form-field-prefix .ngx-mat-color-toggle-default-icon,.mat-form-field:not(.mat-form-field-appearance) .mat-form-field-suffix .ngx-mat-color-toggle-default-icon{display:block;width:1.5em;height:1.5em}.mat-form-field:not(.mat-form-field-appearance) .mat-form-field-prefix .mat-icon-button .ngx-mat-color-toggle-default-icon,.mat-form-field:not(.mat-form-field-appearance) .mat-form-field-suffix .mat-icon-button .ngx-mat-color-toggle-default-icon{margin:auto}\n"],encapsulation:2}),i})(),zie=(()=>{class i{}return i.\u0275fac=function(e){return new(e||i)},i.\u0275mod=nn({type:i}),i.\u0275inj=Xt({providers:[WR,Lie],imports:[So,dH,jM,fH,tie,Kz,Zz,fV,kh,KV]}),i})();const Hie=["picker"],Gie=function(i){return{"background-color":i}};function $ie(i,t){if(1&i){const e=mi();W(0,"div",5),Ue("click",function(r){const o=cn(e).index;return zt(he().onColorClicked(r.currentTarget,o))}),q()}if(2&i){const e=t.$implicit,n=t.index,r=he();U("ngStyle",im(2,Gie,"#"+r.lpad(e.toString(16),"0",8)))("matTooltip",n+": #"+e.toString(16))}}const Wie=function(){return["colors"]};let jie=(()=>{class i{constructor(){this.resource=null,this.changed=new We,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 mU;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=ot({type:i,selectors:[["app-palette-block-ui"]],viewQuery:function(e,n){if(1&e&&ii(Hie,5),2&e){let r;Tt(r=It())&&(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),W(1,"div",1),fe(2,$ie,1,4,"div",2),q(),W(3,"input",3),Ue("colorChange",function(s){return n.onColorChange(s.value)}),q(),ke(4,"ngx-mat-color-picker",null,4)),2&e){const r=tr(5);U("resource",n.resource)("fieldBlacklist",ro(4,Wie)),G(2),U("ngForOf",null==n.resourceData?null:n.resourceData.colors),G(1),U("ngxMatColorPicker",r)}},dependencies:[Co,Kw,jc,Os,gC,kH,$c],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 Yie=["editor"];let qie=(()=>{class i{constructor(e){this.cdr=e,this._resource=null,this.resourceDescription="",this.disabled=!1,this.changed=new We,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)(E(ri))},i.\u0275cmp=ot({type:i,selectors:[["app-binary-block-ui"]],viewQuery:function(e,n){if(1&e&&ii(Yie,5),2&e){let r;Tt(r=It())&&(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&&(W(0,"h2",0),Ge(1),q(),ke(2,"div",null,1)),2&e&&(U("matTooltip",n.resourceDescription),G(1),_i(null==n.resource?null:n.resource.name))},dependencies:[Os],changeDetection:0}),i})();const Xie=["picker"];function Kie(i,t){if(1&i&&(W(0,"mat-label",8),Ge(1),q()),2&i){const e=he();G(1),_i(null==e.resource?null:e.resource.name)}}const Zie=function(i){return{transform:i}};let Qie=(()=>{class i{constructor(e){this.cdr=e,this.resource=null,this.resourceDescription="",this.changed=new We,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)(E(ri))},i.\u0275cmp=ot({type:i,selectors:[["app-angle-block-ui"]],viewQuery:function(e,n){if(1&e&&ii(Xie,5),2&e){let r;Tt(r=It())&&(n.picker=r.first)}},hostBindings:function(e,n){1&e&&Ue("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&&(W(0,"div",0)(1,"div",1,2)(3,"div",3),ke(4,"div",4)(5,"div",5),q()(),W(6,"div",6),fe(7,Kie,2,1,"mat-label",7),W(8,"mat-label"),Ge(9),$t(10,"number"),q(),W(11,"mat-label"),Ge(12),$t(13,"number"),q()()()),2&e&&(U("matTooltip",n.resourceDescription),G(3),U("ngStyle",im(11,Zie,"rotate("+((null==n.resource?null:n.resource.data)||0)+"rad)")),G(4),U("ngIf",null==n.resource?null:n.resource.name),G(2),ir("",X1(10,5,180*(null==n.resource?null:n.resource.data)/n.pi||0,"1.2-2")," deg"),G(3),ir("",X1(13,8,(null==n.resource?null:n.resource.data)||0,"1.2-2")," rad"))},dependencies:[wi,Kw,Yo,Os,aB],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 PH{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,d=new Set;for(const h of e)!0===Array.isArray(h)?a.add(h):"object"==typeof h?l.add(h):"function"==typeof h?d.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===d.size){h=!0;for(const p of o)if(!1===d.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 Jie(i,t){if(1&i&&(W(0,"mat-list-option",3),Ge(1),q()),2&i){const e=t.$implicit,n=he();U("value",e)("selected",n.selectedValue==e),G(1),ir(" ",e," ")}}function ere(i,t){if(1&i&&(W(0,"mat-card"),ke(1,"app-editor",4),q()),2&i){const e=he();G(1),U("resource",e.resources[e.selectedValue])}}let _C=(()=>{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)(E(PH))},i.\u0275cmp=ot({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&&(W(0,"mat-selection-list",0),Ue("selectionChange",function(s){return n.selectedValue=s.source.selectedOptions.selected[0].value}),fe(1,Jie,2,3,"mat-list-option",1),q(),fe(2,ere,2,1,"mat-card",2)),2&e&&(U("multiple",!1),G(1),U("ngForOf",n.keys),G(1),U("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})(),tre=(()=>{class i{constructor(){this._resource=null,this.resourceMap={},this.changed=new We}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",JI("@transformPanel",[QI()],{optional:!0}))]),transformPanel:Aa("transformPanel",[Ps("void",si({opacity:0,transform:"scale(1, 0.8)"})),Pr("void => showing",jr("120ms cubic-bezier(0, 0, 0.2, 1)",si({opacity:1,transform:"scale(1, 1)"}))),Pr("* => void",jr("100ms linear",si({opacity:0})))])};let OH=0;const FH=new me("mat-select-scroll-strategy"),fre=new me("MAT_SELECT_CONFIG"),pre={provide:FH,deps:[as],useFactory:function hre(i){return()=>i.scrollStrategies.reposition()}},mre=new me("MatSelectTrigger");class gre{constructor(t,e){this.source=t,this.value=e}}const _re=HM(XI(zM(VU(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 Re}}))));let vre=(()=>{class i extends _re{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(dl.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=ks(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,d,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=d,this._liveAnnouncer=g,this._defaultOptions=b,this._panelOpen=!1,this._compareWith=(v,y)=>v===y,this._uid="mat-select-"+OH++,this._triggerAriaLabelledBy=null,this._destroy=new Re,this._onChange=()=>{},this._onTouched=()=>{},this._valueId="mat-select-value-"+OH++,this._panelDoneAnimatingStream=new Re,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=My(()=>{const v=this.options;return v?v.changes.pipe(Eo(v),Rs(()=>Mr(...v.map(y=>y.onSelectionChange)))):this._ngZone.onStable.pipe(Pi(1),Rs(()=>this.optionSelectionChanges))}),this.openedChange=new We,this._openedStream=this.openedChange.pipe(vn(v=>v),et(()=>{})),this._closedStream=this.openedChange.pipe(vn(v=>!v),et(()=>{})),this.selectionChange=new We,this.valueChange=new We,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 BR(this.multiple),this.stateChanges.next(),this._panelDoneAnimatingStream.pipe(Vc(),Xe(this._destroy)).subscribe(()=>this._panelDoneAnimating(this.panelOpen))}ngAfterContentInit(){this._initKeyManager(),this._selectionModel.changed.pipe(Xe(this._destroy)).subscribe(e=>{e.added.forEach(n=>n.select()),e.removed.forEach(n=>n.deselect())}),this.options.changes.pipe(Eo(null),Xe(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&&!jo(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||jo(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(Pi(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 NZ(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=Mr(this.options.changes,this._destroy);this.optionSelectionChanges.pipe(Xe(e)).subscribe(n=>{this._onSelect(n.source,n.isUserInput),n.isUserInput&&!this.multiple&&this._panelOpen&&(this.close(),this.focus())}),Mr(...this.options.map(n=>n._stateChanges)).pipe(Xe(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)(E(RM),E(ri),E(ht),E(HU),E(pt),E(Ea,8),E(ab,8),E(Uh,8),E(uC,8),E(Wl,10),ma("tabindex"),E(FH),E(WI),E(fre,8))},i.\u0275dir=ve({type:i,viewQuery:function(e,n){if(1&e&&(ii(nre,5),ii(ire,5),ii(_U,5)),2&e){let r;Tt(r=It())&&(n.trigger=r.first),Tt(r=It())&&(n.panel=r.first),Tt(r=It())&&(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:[at,yi]}),i})(),cb=(()=>{class i extends vre{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(Xe(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 DQ(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 gre(this,e)}_getOverlayWidth(){return(this._preferredOverlayOrigin instanceof NI?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=ni(i)))(n||i)}}(),i.\u0275cmp=ot({type:i,selectors:[["mat-select"]],contentQueries:function(e,n,r){if(1&e&&($i(r,mre,5),$i(r,Fm,5),$i(r,KU,5)),2&e){let s;Tt(s=It())&&(n.customTrigger=s.first),Tt(s=It())&&(n.options=s),Tt(s=It())&&(n.optionGroups=s)}},hostAttrs:["role","combobox","aria-autocomplete","none","aria-haspopup","listbox",1,"mat-mdc-select"],hostVars:19,hostBindings:function(e,n){1&e&&Ue("keydown",function(s){return n._handleKeydown(s)})("focus",function(){return n._onFocus()})("blur",function(){return n._onBlur()}),2&e&&(St("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()),un("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:FR,useExisting:i},{provide:XU,useExisting:i}]),at],ngContentSelectors:dre,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&&(nr(cre),W(0,"div",0,1),Ue("click",function(){return n.toggle()}),W(3,"div",2),fe(4,rre,2,1,"span",3),fe(5,are,3,2,"span",4),q(),W(6,"div",5)(7,"div",6),Ri(),W(8,"svg",7),ke(9,"path",8),q()()()(),fe(10,lre,3,9,"ng-template",9),Ue("backdropClick",function(){return n.close()})("attach",function(){return n._onAttached()})("detach",function(){return n.close()})),2&e){const r=tr(1);St("aria-owns",n.panelOpen?n.id+"-panel":null),G(3),U("ngSwitch",n.empty),St("id",n._valueId),G(1),U("ngSwitchCase",!0),G(1),U("ngSwitchCase",!1),G(5),U("cdkConnectedOverlayPanelClass",n._overlayPanelClass)("cdkConnectedOverlayScrollStrategy",n._scrollStrategy)("cdkConnectedOverlayOrigin",n._preferredOverlayOrigin||r)("cdkConnectedOverlayOpen",n.panelOpen)("cdkConnectedOverlayPositions",n._positions)("cdkConnectedOverlayWidth",n._overlayWidth)}},dependencies:[dm,_y,LT,iB,_U,NI],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:[ure.transformPanel]},changeDetection:0}),i})(),LH=(()=>{class i{}return i.\u0275fac=function(e){return new(e||i)},i.\u0275mod=nn({type:i}),i.\u0275inj=Xt({providers:[pre],imports:[So,Rm,ZI,Kn,jy,hC,ZI,Kn]}),i})();function yre(i,t){if(1&i&&(W(0,"mat-label"),Ge(1),q()),2&i){const e=he(3);G(1),_i(e.resource.name)}}function bre(i,t){if(1&i&&(W(0,"mat-option",6),Ge(1),q()),2&i){const e=t.$implicit,n=he(3);U("value",e[1])("disabled",n.disabled),G(1),ir(" ",e[1]," ")}}function xre(i,t){if(1&i){const e=mi();W(0,"mat-form-field",3),fe(1,yre,2,1,"mat-label",0),W(2,"mat-select",4),Ue("valueChange",function(r){return cn(e),zt(he(2).resource.data=r)})("selectionChange",function(){return cn(e),zt(he(2).changed.emit())}),fe(3,bre,2,3,"mat-option",5),q()()}if(2&i){const e=he(2);U("matTooltip",e.resourceDescription),G(1),U("ngIf",e.resource.name),G(1),U("value",e.resource.data)("disabled",e.disabled),G(1),U("ngForOf",e.resource.schema.enum_names)}}function wre(i,t){if(1&i&&(W(0,"mat-label"),Ge(1),q()),2&i){const e=he(3);G(1),_i(e.resource.name)}}function Mre(i,t){if(1&i){const e=mi();W(0,"mat-form-field",3),fe(1,wre,2,1,"mat-label",0),W(2,"input",7),Ue("ngModelChange",function(r){return cn(e),zt(he(2).resource.data=r)})("change",function(){return cn(e),zt(he(2).changed.emit())}),q()()}if(2&i){const e=he(2);U("matTooltip",e.resourceDescription),G(1),U("ngIf",e.resource.name),G(1),U("min",0)("max",256*(e.resource.schema.length||1)-1)("ngModel",e.resource.data)}}function Cre(i,t){if(1&i&&(Gr(0),fe(1,xre,4,5,"mat-form-field",1),fe(2,Mre,3,5,"ng-template",null,2,Rc),$r()),2&i){const e=tr(3),n=he();G(1),U("ngIf",n.isKnownEnumValue(n.resource.data))("ngIfElse",e)}}let Sre=(()=>{class i{constructor(){this.resource=null,this.resourceDescription="",this.disabled=!1,this.changed=new We}isKnownEnumValue(e){return!!this.resource?.schema.enum_names.find(([n,r])=>r==e)}}return i.\u0275fac=function(e){return new(e||i)},i.\u0275cmp=ot({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&&fe(0,Cre,4,2,"ng-container",0),2&e&&U("ngIf",n.resource)},dependencies:[Co,wi,$l,Bh,Wc,Hh,zh,fu,Yl,Yo,jc,Os,cb,Fm],changeDetection:0}),i})();const Ere=["*"],Dre=["unscopedContent"];function Tre(i,t){1&i&&Gt(0,4)}function Ire(i,t){if(1&i&&(W(0,"div",11),ke(1,"input",12),W(2,"div",13),Ri(),W(3,"svg",14),ke(4,"path",15),q(),Ka(),ke(5,"div",16),q()()),2&i){const e=he();un("mdc-checkbox--disabled",e.disabled),G(1),U("checked",e.selected)("disabled",e.disabled)}}function Rre(i,t){if(1&i&&(W(0,"div",17),ke(1,"input",18),W(2,"div",19),ke(3,"div",20)(4,"div",21),q()()),2&i){const e=he();un("mdc-radio--disabled",e.disabled),G(1),U("checked",e.selected)("disabled",e.disabled)}}function kre(i,t){}function Pre(i,t){if(1&i&&(W(0,"span",22),fe(1,kre,0,0,"ng-template",23),q()),2&i){he();const e=tr(3);G(1),U("ngTemplateOutlet",e)}}function Ore(i,t){}function Fre(i,t){if(1&i&&(W(0,"span",24),fe(1,Ore,0,0,"ng-template",23),q()),2&i){he();const e=tr(5);G(1),U("ngTemplateOutlet",e)}}function Lre(i,t){}function Nre(i,t){1&i&&fe(0,Lre,0,0,"ng-template",23),2&i&&(he(),U("ngTemplateOutlet",tr(1)))}function Bre(i,t){}function Ure(i,t){if(1&i&&(W(0,"span",25),fe(1,Bre,0,0,"ng-template",23),q()),2&i){he();const e=tr(3);G(1),U("ngTemplateOutlet",e)}}function Vre(i,t){}function zre(i,t){if(1&i&&(W(0,"span",25),fe(1,Vre,0,0,"ng-template",23),q()),2&i){he();const e=tr(5);G(1),U("ngTemplateOutlet",e)}}function Hre(i,t){}function Gre(i,t){1&i&&fe(0,Hre,0,0,"ng-template",23),2&i&&(he(),U("ngTemplateOutlet",tr(1)))}const $re=[[["","matListItemTitle",""]],[["","matListItemLine",""]],"*",[["mat-divider"]],[["","matListItemAvatar",""],["","matListItemIcon",""]]],Wre=["[matListItemTitle]","[matListItemLine]","*","mat-divider","[matListItemAvatar],[matListItemIcon]"],NH=new me("ListOption");let jre=(()=>{class i{constructor(e){this._elementRef=e}}return i.\u0275fac=function(e){return new(e||i)(E(pt))},i.\u0275dir=ve({type:i,selectors:[["","matListItemTitle",""]],hostAttrs:[1,"mat-mdc-list-item-title","mdc-list-item__primary-text"]}),i})(),Yre=(()=>{class i{constructor(e){this._elementRef=e}}return i.\u0275fac=function(e){return new(e||i)(E(pt))},i.\u0275dir=ve({type:i,selectors:[["","matListItemLine",""]],hostAttrs:[1,"mat-mdc-list-item-line","mdc-list-item__secondary-text"]}),i})(),BH=(()=>{class i{constructor(e){this._listOption=e}_isAlignedAtStart(){return!this._listOption||"after"===this._listOption?._getTogglePosition()}}return i.\u0275fac=function(e){return new(e||i)(E(NH,8))},i.\u0275dir=ve({type:i,hostVars:4,hostBindings:function(e,n){2&e&&un("mdc-list-item__start",n._isAlignedAtStart())("mdc-list-item__end",!n._isAlignedAtStart())}}),i})(),qre=(()=>{class i extends BH{}return i.\u0275fac=function(){let t;return function(n){return(t||(t=ni(i)))(n||i)}}(),i.\u0275dir=ve({type:i,selectors:[["","matListItemAvatar",""]],hostAttrs:[1,"mat-mdc-list-item-avatar"],features:[at]}),i})(),Xre=(()=>{class i extends BH{}return i.\u0275fac=function(){let t;return function(n){return(t||(t=ni(i)))(n||i)}}(),i.\u0275dir=ve({type:i,selectors:[["","matListItemIcon",""]],hostAttrs:[1,"mat-mdc-list-item-icon"],features:[at]}),i})();const Kre=new me("MAT_LIST_CONFIG");let jR=(()=>{class i{constructor(){this._isNonInteractive=!0,this._disableRipple=!1,this._disabled=!1,this._defaultOptions=Pt(Kre,{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=ve({type:i,hostVars:1,hostBindings:function(e,n){2&e&&St("aria-disabled",n.disabled)},inputs:{disableRipple:"disableRipple",disabled:"disabled"}}),i})(),UH=(()=>{class i{set lines(e){this._explicitLines=ks(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 Kt,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 Om(this,this._ngZone,this._hostElement,this._platform),this._rippleRenderer.setupTriggerEvents(this._hostElement)}_monitorProjectedLinesAndTitle(){this._ngZone.runOutsideAngular(()=>{this._subscriptions.add(Mr(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)(E(pt),E(ht),E(jR,8),E(Vi),E(KI,8),E(Rr,8))},i.\u0275dir=ve({type:i,contentQueries:function(e,n,r){if(1&e&&($i(r,qre,4),$i(r,Xre,4)),2&e){let s;Tt(s=It())&&(n._avatars=s),Tt(s=It())&&(n._icons=s)}},hostVars:4,hostBindings:function(e,n){2&e&&(St("aria-disabled",n.disabled)("disabled",n._isButtonElement&&n.disabled||null),un("mdc-list-item--disabled",n.disabled))},inputs:{lines:"lines",disableRipple:"disableRipple",disabled:"disabled"}}),i})();const VH=new me("SelectionList");let vC=(()=>{class i extends UH{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 We,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)(E(pt),E(ht),E(VH),E(Vi),E(ri),E(KI,8),E(Rr,8))},i.\u0275cmp=ot({type:i,selectors:[["mat-list-option"]],contentQueries:function(e,n,r){if(1&e&&($i(r,Yre,5),$i(r,jre,5)),2&e){let s;Tt(s=It())&&(n._lines=s),Tt(s=It())&&(n._titles=s)}},viewQuery:function(e,n){if(1&e&&ii(Dre,5),2&e){let r;Tt(r=It())&&(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&&Ue("blur",function(){return n._handleBlur()})("click",function(){return n._toggleOnInteraction()}),2&e&&(St("aria-selected",n.selected),un("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:UH,useExisting:i},{provide:NH,useExisting:i}]),at],ngContentSelectors:Wre,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&&(nr($re),fe(0,Tre,1,0,"ng-template",null,0,Rc),fe(2,Ire,6,4,"ng-template",null,1,Rc),fe(4,Rre,5,4,"ng-template",null,2,Rc),fe(6,Pre,2,1,"span",3),fe(7,Fre,2,1,"span",4),fe(8,Nre,1,1,"ng-template",5),W(9,"span",6),Gt(10),Gt(11,1),W(12,"span",7,8),Ue("cdkObserveContent",function(){return n._updateItemLines(!0)}),Gt(14,2),q()(),fe(15,Ure,2,1,"span",9),fe(16,zre,2,1,"span",9),fe(17,Gre,1,1,"ng-template",5),Gt(18,3),ke(19,"div",10)),2&e&&(G(6),U("ngIf",n._hasCheckboxAt("before")),G(1),U("ngIf",n._hasRadioAt("before")),G(1),U("ngIf",n._hasIconsOrAvatarsAt("before")),G(7),U("ngIf",n._hasCheckboxAt("after")),G(1),U("ngIf",n._hasRadioAt("after")),G(1),U("ngIf",n._hasIconsOrAvatarsAt("after")))},dependencies:[bU,wi,vy],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 Zre={provide:Ao,useExisting:Gn(()=>yC),multi:!0};class Qre{constructor(t,e){this.source=t,this.options=e}}let yC=(()=>{class i extends jR{get multiple(){return this._multiple}set multiple(e){const n=Jt(e);n!==this._multiple&&(this._multiple=n,this.selectedOptions=new BR(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 Re,this._onChange=r=>{},this.selectionChange=new We,this.color="accent",this.compareWith=(r,s)=>r===s,this._multiple=!0,this._hideSingleSelectionIndicator=this._defaultOptions?.hideSingleSelectionIndicator??!1,this.selectedOptions=new BR(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 Qre(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(Xe(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()&&jo(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 AU(this._items).withHomeAndEnd().withTypeAhead().withWrap().skipPredicate(()=>this.disabled),this._resetActiveOption(),this._keyManager.change.subscribe(e=>this._setActiveOption(e)),this._items.changes.pipe(Xe(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=IM();return e&&this._element.nativeElement.contains(e)}}return i.\u0275fac=function(e){return new(e||i)(E(pt),E(ht))},i.\u0275cmp=ot({type:i,selectors:[["mat-selection-list"]],contentQueries:function(e,n,r){if(1&e&&$i(r,vC,5),2&e){let s;Tt(s=It())&&(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&&Ue("keydown",function(s){return n._handleKeydown(s)}),2&e&&St("aria-multiselectable",n.multiple)},inputs:{color:"color",compareWith:"compareWith",multiple:"multiple",hideSingleSelectionIndicator:"hideSingleSelectionIndicator",disabled:"disabled"},outputs:{selectionChange:"selectionChange"},exportAs:["matSelectionList"],features:[An([Zre,{provide:jR,useExisting:i},{provide:VH,useExisting:i}]),at,yi],ngContentSelectors:Ere,decls:1,vars:0,template:function(e,n){1&e&&(nr(),Gt(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})(),Jre=(()=>{class i{}return i.\u0275fac=function(e){return new(e||i)},i.\u0275mod=nn({type:i}),i.\u0275inj=Xt({imports:[BI,So,Kn,Zy,qU,AV]}),i})();function ese(i,t){if(1&i&&(W(0,"mat-label"),Ge(1),q()),2&i){const e=he(2);G(1),_i(e.resource.name)}}function tse(i,t){if(1&i&&(W(0,"mat-list-option",5),Ge(1),q()),2&i){const e=t.$implicit,n=he(2);U("value",e.key)("selected",n.resource.data[e.key])("disabled",n.disabled),G(1),ir(" ",e.key," ")}}function nse(i,t){if(1&i){const e=mi();Gr(0,1),fe(1,ese,2,1,"mat-label",2),W(2,"mat-selection-list",3),Ue("selectionChange",function(r){return cn(e),zt(he().onSelection(r))}),fe(3,tse,2,4,"mat-list-option",4),$t(4,"keyvalue"),q(),$r()}if(2&i){const e=he();U("matTooltip",e.resourceDescription),G(1),U("ngIf",e.resource.name),G(1),U("disabled",e.disabled),G(1),U("ngForOf",Qt(4,4,e.resource.data))}}let ise=(()=>{class i{constructor(){this.resource=null,this.resourceDescription="",this.disabled=!1,this.changed=new We}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=ot({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&&fe(0,nse,5,6,"ng-container",0),2&e&&U("ngIf",n.resource)},dependencies:[Co,wi,Yo,Os,yC,vC,sB],styles:["[_nghost-%COMP%]{padding-bottom:1.34375em}"],changeDetection:0}),i})();class zH{get tick$(){return this._tick$.asObservable()}get children(){return[...this._children]}constructor(t){this.parent=t,this._tick$=new Re,this._children=[],t&&t.addChild(this)}addChild(t){if(t.parent!==this)throw new Error("Incorrect child clock");this._children.includes(t)||this._children.push(t)}removeChild(t){if(t.parent!==this)throw new Error("Incorrect child clock");this._children=this._children.filter(e=>e!==t)}dispose(){this.parent&&this.parent.removeChild(this);for(const t of this._children)t.dispose();this._tick$.complete()}}const sse=typeof performance>"u"?()=>Date.now():()=>performance.now();class $m extends zH{static get instance(){return $m._instance||($m._instance=new $m),$m._instance}get elapsedTime(){return sse()}constructor(){super(null);let t=this.elapsedTime;const e=()=>{requestAnimationFrame(e);const n=t,r=this.elapsedTime;t=r,this._tick$.next([n,r-n])};requestAnimationFrame(e)}dispose(){throw new Error("Cannot dispose global clock")}}class HH extends zH{get isRunning(){return!!this.tickSub}get isPaused(){return-1!==this.pausedAt}get isStopped(){return-1===this.startedAt}get timeScale(){return this._timeScale}set timeScale(t){if(t!==this._timeScale||this.pausedByTimescale&&0!==t){if(0===t)return void(this.isPaused||(this.pause(),this.pausedByTimescale=!0));if(this.isPaused&&this.pausedByTimescale&&(this.resume(),this.pausedByTimescale=!1),!this.isStopped){const e=this.isPaused?this.pausedAt:this.parentClock.elapsedTime;this.startedAt=e-(e-this.startedAt)*this.timeScale/t}this._timeScale=t}}get elapsedTime(){return this.isStopped?this.lastStopElapsed:this.isPaused?this._timeScale*(this.pausedAt-this.startedAt):this._timeScale*(this.parentClock.elapsedTime-this.startedAt)}constructor(t=!1,e=$m.instance){super(e),this.parentClock=e,this.tickSub=null,this._internalTick$=new Re,this.tickRateLimit=0,this.paused$=new Re,this.startedAt=-1,this.oldRelativeTime=0,this.pausedAt=-1,this.lastStopElapsed=0,this._timeScale=1,this.pausedByTimescale=!1,this.lastFiredTickElapsed=0,t&&this.start(),this._internalTick$.pipe(et(([n,r])=>[r,r-this.lastFiredTickElapsed]),vn(([n])=>!this.tickRateLimit||Math.floor(this.lastFiredTickElapsed*this.tickRateLimit/1e3)this.lastFiredTickElapsed=n)).subscribe(this._tick$)}start(){this.isRunning||(this.oldRelativeTime=0,this.startedAt=this.parentClock.elapsedTime,this.startListeningTicks())}stop(){this.stopListeningTicks(),this.lastStopElapsed=this.elapsedTime,this.startedAt=this.pausedAt=-1}pause(){this.stopListeningTicks(),this.pausedAt=this.parentClock.elapsedTime,this.pausedByTimescale=!1,this.paused$.next(!0)}resume(){this.isRunning||-1==this.pausedAt||(this.startedAt+=this.parentClock.elapsedTime-this.pausedAt,this.pausedAt=-1,this.startListeningTicks(),this.paused$.next(!1))}startListeningTicks(){if(this.tickSub)throw new Error("Clock is already ticking!");this.tickSub=this.parentClock.tick$.pipe(et(([t,e])=>[this.oldRelativeTime,this.oldRelativeTime+e*this.timeScale]),Ui(([t,e])=>this.oldRelativeTime=e)).subscribe(this._internalTick$)}stopListeningTicks(){var t;null===(t=this.tickSub)||void 0===t||t.unsubscribe(),this.tickSub=null}dispose(){this.stopListeningTicks(),this._internalTick$.complete(),super.dispose()}}const ose={transparent:!1,background:0,size:"fullscreen",antialias:!0};class ase{constructor(t,e,n={}){this.scene=t,this.canvas=e,this.entity=null,this.rendererOptions=Object.assign(Object.assign({},ose),n||{})}}class db{static fromArray(t,e=!1){const n=new db(t[0]);let r=n;for(let s=1;sn.map(r=>new db(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]}constructor(t){this.data=t,this.adjacent=new Set}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(d=>!e.has(d));for(const d of c)e.add(d),r.push([d,a-1])}}return n}nodes(){return Array.from(this.walkRead(-1))}}var Xl=(()=>{return(i=Xl||(Xl={}))[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",Xl;var i})();let Yh=(()=>{class i{constructor(){this.tick$=new Re,this._world=null,this._name="e0x"+(i.default_name_counter++).toString(16),this._selfActive=!0,this.parent=null,this._children=[],this._components=[],this._onSpawned$=new Re,this._onRemoved$=new Re}get world(){return this._world}get name(){return this._name}set name(e){this._name=e}get active(){return this._selfActive&&(!this.parent||this.parent.active)}set active(e){this._selfActive=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 lse extends Yh{constructor(t){super(),this.tickOrder=t}}function YR(i,t=Xl.CONTROLLERS,e){const n=new lse(t);return e&&(n.name=e),i.addEntity(n),n.tick$.pipe(iu(()=>{i.removeEntity(n,!0)}))}class qR extends Yh{get rendererSize$(){return this._rendererSize$.asObservable()}get rendererSize(){return this._rendererSize$.getValue()}get rendererOptions(){return this.renderer.rendererOptions}get physicsDebugViewActive(){return this.renderer.physicsDebugViewActive}set physicsDebugViewActive(t){this.renderer.physicsDebugViewActive=t}constructor(t){super(),this.renderer=t,this.tickOrder=Xl.RENDERING,this._rendererSize$=new Ct(null),this.addComponents(t),this.tick$.subscribe(()=>{this.renderer.render()})}onSpawned(t){this._rendererSize$.next(null),"fullscreen"==this.rendererOptions.size||"function"==typeof this.rendererOptions.size?(this.renderer.canvas&&(this.renderer.canvas.style.position="absolute"),Mr(Sa(window,"resize").pipe(DM(100)),Sa(window,"orientationchange")).pipe(Xe(this._onRemoved$),et(()=>({x:window.innerWidth,y:window.innerHeight})),Eo({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 Tn||void 0!==this.rendererOptions.size.subscribe&&void 0!==this.rendererOptions.size.pipe?this.rendererOptions.size.pipe(Xe(this._onRemoved$)).subscribe(e=>{this._rendererSize$.next(e)}):this._rendererSize$.next(this.rendererOptions.size),this._rendererSize$.pipe(Xe(this._onRemoved$),Vc((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 XR=i=>{i.updateVisibility?i.updateVisibility():GH(i)},GH=i=>{for(const t of i.children)XR(t)};class cse extends Yh{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(){GH(this)}addChildren(...t){super.addChildren(...t);for(const e of t)XR(e)}removeChildren(t,e=!1){if(super.removeChildren(t,e),!e)for(const n of t)XR(n)}}class KR{constructor(){this._running=!1,this.stop$=new Re}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 dse extends KR{get output$(){return this._output$.asObservable()}constructor(t,e){super(),this.keyboard=t,this.keymap=e,this._output$=new Re}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")),eu(t.map(e=>this.keyboard.bindMany(...e))).pipe(Xe(this.stop$),et(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 ZR=new Tn(ms);class bC extends KR{constructor(){super(),this.bindings={},this.skipKeyDownsOnExternalFocus=!0,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(Vc(),iu(()=>{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"),ZR;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 eu(e).pipe(iu(()=>{for(let n=0;nn.includes(!0)),Vc())}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 bC.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)}}bC.externalFocusBlacklist=[HTMLInputElement,HTMLTextAreaElement,HTMLSelectElement,HTMLButtonElement];class qr{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 qr.len(qr.sub(t,e))}static norm(t){const e=qr.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 hse={pointerLock:!1};var Fs=(()=>{return(i=Fs||(Fs={}))[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",Fs;var i})();class Wm extends KR{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$=Sa(this._element,"wheel",{passive:!1}).pipe(Xe(this.stopped$),iu(()=>this._wheel$=null),Ui(t=>t.preventDefault()),et(t=>t.deltaY),Nf())),this._wheel$}get isPointerLocked(){return!!document.pointerLockElement}get isPointerLocked$(){return Sa(document,"pointerlockchange").pipe(et(()=>this.isPointerLocked))}get state(){return this._state$.getValue()}get state$(){return this._state$.asObservable()}get multiTouchPositions$(){return this._multiTouchPositions$.asObservable()}get twoTouchGestureDelta$(){return this.state$.pipe(Rs(t=>t==Fs.DRAG_TOUCH_TWO_FINGERS?this.multiTouchPositions$:ZR),et(t=>t.map(e=>({x:e.x,y:e.y}))),function use(){return Jn((i,t)=>{let e,n=!1;i.subscribe(jn(t,r=>{const s=e;e=r,n&&t.next([s,r]),n=!0}))})}(),vn(([t,e])=>t.length>1&&e.length>1),et(([t,e])=>({centerPointDelta:qr.sub(qr.scalarMult(e.reduce((n,r)=>qr.add(n,r),qr.O),1/e.length),qr.scalarMult(t.reduce((n,r)=>qr.add(n,r),qr.O),1/e.length)),angleDelta:qr.angle(e[1],e[0])-qr.angle(t[1],t[0]),distanceDelta:qr.dist(e[1],e[0])-qr.dist(t[1],t[0])})))}get _element(){return this.options.canvas||window}constructor(t={}){super(),this._wheel$=null,this._delta$=new Re,this._position$=new Ct(qr.O),this._multiTouchPositions$=new Ct([]),this.stopped$=new Re,this._state$=new Ct(Fs.NONE),this.options=Object.assign(Object.assign({},hse),t),this.canvasClickListener=this.canvasClickListener.bind(this)}startInternal(){this.options.canvas&&(this.options.canvas.style.touchAction="none"),this._state$.next(Fs.NONE);const t=[Fs.DRAG,Fs.DRAG_MIDDLE_BUTTON,Fs.DRAG_RIGHT_BUTTON],e=[Fs.NONE,Fs.DRAG,Fs.DRAG_TOUCH_TWO_FINGERS],n=[],r={};Sa(this._element,"mousemove").pipe(Xe(this.stopped$)).subscribe(o=>{this._delta$.next({x:o.movementX,y:o.movementY})}),Sa(this._element,"pointermove").pipe(Xe(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})}),!Wm.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{if(0===n.length)try{this.options.canvas&&this.options.canvas.setPointerCapture(o.pointerId),window.addEventListener("pointerup",s),this._element.addEventListener("pointercancel",s)}catch(a){console.error(a)}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]||Fs.NONE)}),Sa(this._element,"contextmenu").pipe(Xe(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 fse{static lookAt(t,e,n){let r=Be.sub(t,e);r=0===Be.lenSq(r)?Object.assign(Object.assign({},r),{z:1}):Be.norm(r);let s=Be.cross(n,r);0===Be.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=Be.norm(r),s=Be.cross(n,r)),s=Be.norm(s);let o=Be.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 mr{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,d=t.w*Math.sin((1-n)*s)/o+e.w*Math.sin(n*s)/o;return isNaN(a)||isNaN(l)||isNaN(c)||isNaN(d)?mr.clone(t):{x:a,y:l,z:c,w:d}}static fromAngle(t,e){const n=e/2,r=Math.sin(n);return Object.assign(Object.assign({},Be.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],d=t[10],h=e+o+d;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>d){const p=2*Math.sqrt(1+e-o-d);return{x:.25*p,y:(n+s)/p,z:(r+l)/p,w:(c-a)/p}}if(o>d){const p=2*Math.sqrt(1+o-e-d);return{x:(n+s)/p,y:.25*p,z:(a+c)/p,w:(r-l)/p}}{const p=2*Math.sqrt(1+d-e-o);return{x:(r+l)/p,y:(a+c)/p,z:.25*p,w:(s-n)/p}}}static fromMatrix3(t){const e=t[0][0]+t[1][1]+t[2][2];let n,r,s,o;if(e>0){const a=.5/Math.sqrt(e+1);n=.25/a,r=(t[2][1]-t[1][2])*a,s=(t[0][2]-t[2][0])*a,o=(t[1][0]-t[0][1])*a}else if(t[0][0]>t[1][1]&&t[0][0]>t[2][2]){const a=2*Math.sqrt(1+t[0][0]-t[1][1]-t[2][2]);n=(t[2][1]-t[1][2])/a,r=.25*a,s=(t[0][1]+t[1][0])/a,o=(t[0][2]+t[2][0])/a}else if(t[1][1]>t[2][2]){const a=2*Math.sqrt(1+t[1][1]-t[0][0]-t[2][2]);n=(t[0][2]-t[2][0])/a,r=(t[0][1]+t[1][0])/a,s=.25*a,o=(t[1][2]+t[2][1])/a}else{const a=2*Math.sqrt(1+t[2][2]-t[0][0]-t[1][1]);n=(t[1][0]-t[0][1])/a,r=(t[0][2]+t[2][0])/a,s=(t[1][2]+t[2][1])/a,o=.25*a}return{w:n,x:r,y:s,z:o}}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),d=Math.sin(.5*e);return{w:c*a*s+d*l*o,x:d*a*s-c*l*o,y:c*l*s+d*a*o,z:c*a*o-d*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=Be.Z){return this.fromMatrix4(fse.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 Be{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 Be.len(Be.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=Be.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,mr.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)}}}function QR(i,t,e,n){return r=>r.pipe(ZT((s,o)=>{var a;return{targetValue:o,currentValue:null!==(a=s.currentValue)&&void 0!==a?a:o,hasReachedTarget:!1}},{targetValue:null,currentValue:null,hasReachedTarget:!1}),Rs(s=>i.pipe(et(([o,a])=>{if(null===s.targetValue||null===s.currentValue)return s.currentValue;if(s.hasReachedTarget)return;const l=1-Math.exp(-a/t),c=e(s.currentValue,s.targetValue,l);return s.currentValue=c,n(c,s.targetValue)?(s.hasReachedTarget=!0,s.targetValue):c}))),et(s=>void 0!==s?s:null),vn(s=>null!==s))}ps(738);class gse extends Yh{get avgReport(){return this._avgReport}get peakReport(){return this._peakReport}constructor(t=60,e=15){super(),this.maxSamples=t,this.maxRows=e,this.tickOrder=Number.MAX_SAFE_INTEGER,this.sampleIndex=0,this.collectedData=new Map,this._avgReport={totalTime:0,entries:[]},this._peakReport={totalTime:0,entries:[]}}onSpawned(t){super.onSpawned(t),this.sampleIndex=0;const e=()=>(typeof performance>"u"?Date:performance).now();this.world.tickForwardTo$.pipe(Xe(this.onRemoved$)).subscribe(n=>{n!==this&&(this.collectedData.has(n)?this.collectedData.get(n).push([this.sampleIndex,e(),0]):this.collectedData.set(n,[[this.sampleIndex,e(),0]]))}),this.world.tickForwardedTo$.pipe(Xe(this.onRemoved$)).subscribe(n=>{if(n===this)return;const r=this.collectedData.get(n);r[r.length-1][2]=e()}),this.tick$.pipe(Xe(this.onRemoved$)).subscribe(()=>{this.sampleIndex++;const n=Array.from(this.collectedData.entries());for(const[h,p]of n){for(;p.length>0&&p[0][0]h instanceof Yh?""===h.name?h.constructor.name:h.name:"PHYSICS_WORLD"===h?"Physics simulation":h,s=h=>{let p=0,m=0;for(;mh.length-m+1){m--;break}p+=h[h.length-m-1][1]}return m>1&&(h=h.slice(0,h.length-m)).push([`Rest (${m})`,p]),h};let o=0,a=Array.from(this.collectedData.entries()).map(([h,p])=>{const m=p.reduce((g,[b,v,y])=>g+y-v,0)/this.maxSamples;return o+=m,[r(h),m]}).sort((h,p)=>p[1]-h[1]);a=s(a),this._avgReport={totalTime:o,entries:a};let l=new Map,c=Array.from(this.collectedData.entries()).map(([h,p])=>{let m=0;for(const[g,b,v]of p){const y=v-b;m=Math.max(m,y),l.set(g,y+(l.get(g)||0))}return[r(h),m]}).sort((h,p)=>p[1]-h[1]);c=s(c);let d=Array.from(l.values()).reduce((h,p)=>Math.max(h,p),0);this._peakReport={totalTime:d,entries:c}})}onRemoved(){super.onRemoved(),this.collectedData=new Map,this._avgReport={totalTime:0,entries:[]},this._peakReport={totalTime:0,entries:[]}}}var jm=function(i,t,e,n){return new(e||(e=Promise))(function(s,o){function a(d){try{c(n.next(d))}catch(h){o(h)}}function l(d){try{c(n.throw(d))}catch(h){o(h)}}function c(d){d.done?s(d.value):function r(s){return s instanceof e?s:new e(function(o){o(s)})}(d.value).then(a,l)}c((n=n.apply(i,t||[])).next())})};class ul{static get documentWorlds(){return[...ul._documentWorlds]}constructor(t,e){this.visualScene=t,this.physicsWorld=e,this.worldClock=new HH(!1),this.keyboardInput=new bC,this.name="w0x"+(ul.default_name_counter++).toString(16),this.children=[],this.tickListeners=[],this.tickStarted$=new Re,this.tickForwardTo$=new Re,this.tickForwardedTo$=new Re,this.paused$=new Re,this.disposed$=new Re,this.keyboardInput.start(),window.ggstatic?this.registerConsoleCommands(window.ggstatic):(this.onGgStaticInitialized=this.onGgStaticInitialized.bind(this),window.addEventListener("ggstatic_added",this.onGgStaticInitialized)),this.worldClock.paused$.subscribe(this.paused$),ul._documentWorlds.push(this),ul.worldCreated$.next(this)}init(){return jm(this,void 0,void 0,function*(){yield Promise.all([this.physicsWorld.init(),this.visualScene.init()]);const t=(e,n,r)=>{e.active&&(this.tickForwardTo$.next(e),e.tick$.next([n,r]),this.tickForwardedTo$.next(e))};this.worldClock.tick$.subscribe(([e,n])=>{this.tickStarted$.next();let r=0;for(;r=Xl.PHYSICS_SIMULATION);r++)t(this.tickListeners[r],e,n);for(this.tickForwardTo$.next("PHYSICS_WORLD"),this.physicsWorld.simulate(n),this.tickForwardedTo$.next("PHYSICS_WORLD");re.tickOrder-n.tickOrder),t.onSpawned(this))}removeEntity(t,e=!1){if(t.world){if(t.world!==this)throw new Error("Entity is not a part of this world");this.children.splice(this.children.findIndex(n=>n===t),1),this.tickListeners.splice(this.tickListeners.findIndex(n=>n===t),1),t.onRemoved()}e&&t.dispose()}onGgStaticInitialized(){window.removeEventListener("ggstatic_added",this.onGgStaticInitialized),this.registerConsoleCommands(window.ggstatic)}registerConsoleCommands(t){t.registerConsoleCommand(this,"timescale",(...e)=>jm(this,void 0,void 0,function*(){return isNaN(+e[0])||(this.worldClock.timeScale=+e[0]),this.worldClock.timeScale.toString()}),"args: [ float? ]; Get current time scale of selected world clock or set it. Default value is 1.0 (no time scale applied)"),t.registerConsoleCommand(this,"fps_limit",(...e)=>jm(this,void 0,void 0,function*(){return isNaN(+e[0])||(this.worldClock.tickRateLimit=+e[0]),this.worldClock.tickRateLimit.toString()}),"args: [ int? ]; Get current tick rate limit of selected world clock or set it. 0 means no limit applied"),t.registerConsoleCommand(this,"renderers",()=>jm(this,void 0,void 0,function*(){return this.children.filter(e=>e instanceof qR).map(e=>e.name).join("\n")}),"no args; Print all renderers in selected world"),t.registerConsoleCommand(this,"debug_view",(...e)=>jm(this,void 0,void 0,function*(){let r,n="toggle";for(let o of e)["1","0"].includes(o)?n="1"===o:r=o;let s=this.children.find(o=>o instanceof qR&&(!r||o.name===r));if(s)return s.physicsDebugViewActive="toggle"===n?!s.physicsDebugViewActive:n,s.physicsDebugViewActive?"1":"0";throw r?new Error(`Renderer with name "${r}" not found`):new Error("No renderer found")}),'args: [ 0|1?, string? ]; Turn on/off physics debug view, skip first argument to toggle value. Second argument expects renderer name, if not provided first renderer will be picked. Use "renderers" to get list of renderers in the world'),t.registerConsoleCommand(this,"performance",(...e)=>jm(this,void 0,void 0,function*(){let n="avg",r=20;for(let d of e)["avg","peak"].includes(d)?n=d:isNaN(+d)||(r=+d);const s=new gse(r,250);this.addEntity(s),yield function pse(i,t){const e="object"==typeof t;return new Promise((n,r)=>{let o,s=!1;i.subscribe({next:a=>{o=a,s=!0},error:r,complete:()=>{s?n(o):e?n(t.defaultValue):r(new um)}})})}(this.worldClock.tick$.pipe(Pi(r)));const o="avg"===n?s.avgReport:s.peakReport;this.removeEntity(s);const a=o.entries.map(([d,h])=>`${d}:`+new Array(Math.max(0,26-d.length)).join(" ")+`${h.toFixed(2)} ms`+("avg"===n?` (${(100*h/o.totalTime).toFixed(2)}%)`:""));let l="lightgreen";o.totalTime>12&&(l=o.totalTime<16?"yellow":"red");const c=("avg"===n?"Average":"Peak")+" Frame time";return a.unshift(c+":"+new Array(Math.max(0,26-c.length)).join(" ")+`${o.totalTime.toFixed(2)} ms`),a.unshift(`Performance report (${r} samples)`),a.join("\n")}),'args: [ int?, avg|peak? ]; Measure how much time was spent per entity in world. Arguments are samples amount (20 by default) and "peak" or "avg" choice, both arguments are optional. "avg" report sorts entities by average time consumed, "peak" records highest value for each entity')}}ul.default_name_counter=0,ul._documentWorlds=[],ul.worldCreated$=new Re;class bse extends ase{}class WH extends cse{constructor(){super(...arguments),this._world=null}get world(){return this._world}}class mu extends WH{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}constructor(t){super(),this.tickOrder=Xl.OBJECTS_BINDING,this._position=Be.O,this._rotation=mr.O,this.object3D=null,this.objectBody=null,t.objectBody&&(this.objectBody=t.objectBody,this.name=this.objectBody.name,this.addComponents(this.objectBody)),t.object3D&&(this.object3D=t.object3D,t.objectBody||(this._position=this.object3D.position,this._rotation=this.object3D.rotation,this.name=this.object3D.name),this.addComponents(this.object3D)),this.objectBody&&(this.tick$.subscribe(()=>{this.runTransformBinding(this.objectBody,this.object3D)}),this.runTransformBinding(this.objectBody,this.object3D))}}class ub extends db{static fromMapArray(t,e=!1){const n=new ub(t[0]);let r=n;for(let s=1;sn.map(r=>new ub(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));othis.mapGraph.getNearestDummy(this.mapGraphNodes,this.loaderCursor$.getValue())),Vc(),Ui(r=>this._nearestDummy$.next(r))).subscribe(r=>{let o,s=new Set;if(this.options.inertia>0){o=new Set;const a=r.walkReadPreserveDepth(this.options.loadDepth+this.options.inertia);for(let l=0;lo.add(c.data)),l<=this.options.loadDepth&&a[l].forEach(c=>s.add(c.data))}else r.walkRead(this.options.loadDepth).forEach(a=>s.add(a.data)),o=s;for(const a of this.loaded.keys())o.has(a)?s.delete(a):n.includes(a)||n.push(a);for(let a of Array.from(s.keys()))e.includes(a)||e.push(a)}),this.tick$.pipe(Eo(null),Xe(this._onRemoved$)).subscribe(()=>{if(n.length){for(const r of n)this.disposeChunk(r);n=[]}if(e.length)if(this._initialLoadComplete$.value&&e.length>this.options.maxNodesLoadingPerTick){let r=e.slice(0,this.options.maxNodesLoadingPerTick);e=e.slice(this.options.maxNodesLoadingPerTick),Promise.all(r.map(s=>this.loadChunk(s))).then()}else Promise.all(e.map(r=>this.loadChunk(r))).then(()=>{this._initialLoadComplete$.value||this._initialLoadComplete$.next(!0)}),e=[]})}onRemoved(){super.onRemoved(),this.loadClock&&(this.loadClock.stop(),this.loadClock=null),this.loaderCursor$.next(Be.O)}loadChunk(t){return function(i,t,e,n){return new(e||(e=Promise))(function(s,o){function a(d){try{c(n.next(d))}catch(h){o(h)}}function l(d){try{c(n.throw(d))}catch(h){o(h)}}function c(d){d.done?s(d.value):function r(s){return s instanceof e?s:new e(function(o){o(s)})}(d.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||mr.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||mr.O}]),[n,e]})}disposeChunk(t){this.loaded.has(t)&&(this.removeChildren(this.loaded.get(t),!0),this.loaded.delete(t))}}class Cse extends qR{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 XH=function(i,t,e,n){return new(e||(e=Promise))(function(s,o){function a(d){try{c(n.next(d))}catch(h){o(h)}}function l(d){try{c(n.throw(d))}catch(h){o(h)}}function c(d){d.done?s(d.value):function r(s){return s instanceof e?s:new e(function(o){o(s)})}(d.value).then(a,l)}c((n=n.apply(i,t||[])).next())})};const KH={keymap:"wasd",cameraLinearSpeed:20,cameraMovementElasticity:0,cameraBoostMultiplier:2.5,cameraRotationSensitivity:1,cameraRotationElasticity:0,mouseOptions:{},ignoreMouseUnlessPointerLocked:!1,ignoreKeyboardUnlessPointerLocked:!1};class Ese extends Yh{get active(){return super.active}set active(t){!super.active&&t&&this.reset(),super.active=t}get spherical(){return this._spherical}set spherical(t){this._spherical.phi=Math.max(1e-6,Math.min(Math.PI-1e-6,t.phi)),this._spherical.theta=t.theta,this.resetMotion$.next()}constructor(t,e,n={}){super(),this.keyboard=t,this.camera=e,this.tickOrder=Xl.INPUT_CONTROLLERS,this._spherical={phi:0,radius:1,theta:0},this.resetMotion$=new Re,this.options=Object.assign(Object.assign({},KH),n),n.mouseOptions&&(this.options.mouseOptions=Object.assign(Object.assign({},KH.mouseOptions),n.mouseOptions)),this.mouseInput=new Wm(this.options.mouseOptions),this.directionsInput=new dse(t,this.options.keymap)}reset(){this._spherical=Be.toSpherical(Be.rot({x:0,y:0,z:-1},this.camera.rotation)),this.resetMotion$.next()}onSpawned(t){const e=Object.create(null,{onSpawned:{get:()=>super.onSpawned}});return XH(this,void 0,void 0,function*(){yield e.onSpawned.call(this,t),this._spherical=Be.toSpherical(Be.rot({x:0,y:0,z:-1},this.camera.rotation));const n=["KeyE","KeyQ"];this.camera.camera.supportsFov&&n.push("KeyZ","KeyC"),n.push("ShiftLeft");let r=eu([this.directionsInput.output$,...n.map(c=>this.keyboard.bind(c))]).pipe(Xe(this._onRemoved$),et(([c,...d])=>{let h={direction:{},rest:[]};(!this.options.ignoreKeyboardUnlessPointerLocked||this.mouseInput.isPointerLocked)&&(h={direction:c,rest:d});let p=Object.assign({},Be.O);const[m,g,b,v,y]=h.rest;void 0!==h.direction.upDown&&(p.z=h.direction.upDown?-1:1),void 0!==h.direction.leftRight&&(p.x=h.direction.leftRight?-1:1),m!=g&&(p.y=g?-1:1);let M=0;return b!=v&&(M=b?1:-1),p=Be.norm(p),y&&(p=Be.scalarMult(p,this.options.cameraBoostMultiplier)),[p,M]}));this.options.cameraMovementElasticity>0&&(r=r.pipe(QR(this.camera.tick$,this.options.cameraMovementElasticity,([c,d],[h,p],m)=>[Be.lerp(c,h,m),p],([c,d],[h,p])=>d==p&&Be.dist(c,h)<.001)));let s=Be.O,o=0;r.subscribe(([c,d])=>{s=c,o=d});let a=Wm.isTouchDevice(),l=this.mouseInput.delta$.pipe(Xe(this._onRemoved$),vn(()=>this.active&&(a||!this.options.ignoreMouseUnlessPointerLocked||this.mouseInput.isPointerLocked)));if(this.options.cameraRotationElasticity>0){const c=new Ct(this._spherical);l.subscribe(h=>{const p=c.getValue();c.next({phi:Math.max(1e-6,Math.min(Math.PI-1e-6,p.phi+h.y*this.options.cameraRotationSensitivity/1e3)),theta:p.theta-h.x*this.options.cameraRotationSensitivity/1e3,radius:1})});const d=()=>{c.pipe(Xe(this._onRemoved$),QR(this.tick$,this.options.cameraRotationElasticity,(h,p,m)=>({phi:h.phi+m*(p.phi-h.phi),theta:h.theta+m*(p.theta-h.theta),radius:1}),(h,p)=>qr.dist({x:h.phi,y:h.theta},{x:p.phi,y:p.theta})<1e-4),Xe(this.resetMotion$)).subscribe(h=>{this._spherical.theta=h.theta,this._spherical.phi=h.phi})};this.resetMotion$.pipe(Xe(this._onRemoved$)).subscribe(()=>{c.next(this._spherical),d()}),d()}else l.subscribe(c=>{this._spherical.theta-=c.x*this.options.cameraRotationSensitivity/1e3,this._spherical.phi+=c.y*this.options.cameraRotationSensitivity/1e3,this._spherical.phi=Math.max(1e-6,Math.min(Math.PI-1e-6,this._spherical.phi))});this.camera.tick$.pipe(Xe(this._onRemoved$),vn(()=>this.active)).subscribe(([c,d])=>{this.camera.camera.fov+=o,this.camera.position=Be.add(this.camera.position,Be.rot(Be.scalarMult(s,this.options.cameraLinearSpeed*d/1e3),this.camera.rotation)),this.camera.rotation=mr.lookAt(this.camera.position,Be.add(this.camera.position,Be.fromSpherical(this._spherical)))}),this.mouseInput.start(),this.directionsInput.start()})}onRemoved(){const t=Object.create(null,{onRemoved:{get:()=>super.onRemoved}});return XH(this,void 0,void 0,function*(){yield t.onRemoved.call(this),yield this.mouseInput.stop(!0),yield this.directionsInput.stop()})}}var ZH=function(i,t,e,n){return new(e||(e=Promise))(function(s,o){function a(d){try{c(n.next(d))}catch(h){o(h)}}function l(d){try{c(n.throw(d))}catch(h){o(h)}}function c(d){d.done?s(d.value):function r(s){return s instanceof e?s:new e(function(o){o(s)})}(d.value).then(a,l)}c((n=n.apply(i,t||[])).next())})};const Ase={mouseOptions:{},orbiting:{sensitivityX:1,sensitivityY:1},orbitingElasticity:0,zooming:{sensitivity:1},panning:{sensitivityX:1,sensitivityY:1},dollying:{sensitivity:1}};class Dse extends Yh{get active(){return super.active}set active(t){!super.active&&t&&this.reset(),super.active=t}get spherical(){return this._spherical}set spherical(t){this._spherical.phi=Math.max(1e-6,Math.min(Math.PI-1e-6,t.phi)),this._spherical.theta=t.theta,this._spherical.radius=t.radius,this.resetMotion$.next()}constructor(t,e={}){super(),this.camera=t,this.tickOrder=Xl.INPUT_CONTROLLERS,this._spherical={phi:0,radius:10,theta:0},this.target=Be.O,this.resetMotion$=new Re,this.options=Object.assign(Object.assign({},Ase),e),this.mouseInput=new Wm(this.options.mouseOptions)}reset(){let t=Be.dist(this.target,this.camera.position);this.target=Be.add(this.camera.position,Be.rot({x:0,y:0,z:-t},this.camera.rotation)),this._spherical=Be.toSpherical(Be.sub(this.camera.position,this.target)),this.resetMotion$.next()}onSpawned(t){const e=Object.create(null,{onSpawned:{get:()=>super.onSpawned}});return ZH(this,void 0,void 0,function*(){if(yield e.onSpawned.call(this,t),this._spherical=Be.toSpherical(Be.sub(this.camera.position,this.target)),this.options.orbiting){let r=this.mouseInput.delta$.pipe(Xe(this._onRemoved$),vn(()=>this.active&&this.mouseInput.state==Fs.DRAG));if(this.options.orbitingElasticity>0){const s=new Ct(this._spherical);r.subscribe(a=>{const l=s.getValue();s.next({phi:Math.max(1e-6,Math.min(Math.PI-1e-6,l.phi-a.y*this.options.orbiting.sensitivityY/1e3)),theta:l.theta-a.x*this.options.orbiting.sensitivityX/1e3,radius:1})});const o=()=>{s.pipe(Xe(this._onRemoved$),QR(this.tick$,this.options.orbitingElasticity,(a,l,c)=>({phi:a.phi+c*(l.phi-a.phi),theta:a.theta+c*(l.theta-a.theta),radius:1}),(a,l)=>qr.dist({x:a.phi,y:a.theta},{x:l.phi,y:l.theta})<1e-4),Xe(this.resetMotion$)).subscribe(a=>{this._spherical.theta=a.theta,this._spherical.phi=a.phi})};this.resetMotion$.pipe(Xe(this._onRemoved$)).subscribe(()=>{s.next(this._spherical),o()}),o()}else r.subscribe(s=>{this._spherical.theta-=s.x*this.options.orbiting.sensitivityX/1e3,this._spherical.phi-=s.y*this.options.orbiting.sensitivityY/1e3,this._spherical.phi=Math.max(1e-6,Math.min(Math.PI-1e-6,this._spherical.phi))})}this.options.zooming&&this.mouseInput.wheel$.pipe(Xe(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=Be.fromSpherical(this._spherical),o=Be.rotAround(s,{x:-Math.sin(this._spherical.theta),y:Math.cos(this._spherical.theta),z:0},Math.PI/2),a=Be.rotAround(s,Be.norm(o),Math.PI/2);this.target=Be.add(this.target,Be.add(Be.scalarMult(o,-this.options.panning.sensitivityY*r.y/1e3),Be.scalarMult(a,this.options.panning.sensitivityX*r.x/1e3)))};this.options.panning&&this.mouseInput.delta$.pipe(Xe(this._onRemoved$),vn(()=>this.mouseInput.state==Fs.DRAG_RIGHT_BUTTON)).subscribe(r=>{n(r)}),this.options.dollying&&this.mouseInput.delta$.pipe(Xe(this._onRemoved$),vn(()=>this.mouseInput.state==Fs.DRAG_MIDDLE_BUTTON)).subscribe(r=>{this._spherical.radius*=Math.pow(.95,-this.options.dollying.sensitivity*r.y/10)}),Wm.isTouchDevice()&&(this.options.dollying||this.options.panning)&&this.mouseInput.twoTouchGestureDelta$.pipe(Xe(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(Xe(this._onRemoved$),vn(()=>this.active),et(()=>this._spherical)).subscribe(r=>{this.camera.position=Be.add(this.target,Be.fromSpherical(r)),this.camera.rotation=mr.lookAt(this.camera.position,this.target)}),yield this.mouseInput.start()})}onRemoved(){const t=Object.create(null,{onRemoved:{get:()=>super.onRemoved}});return ZH(this,void 0,void 0,function*(){yield t.onRemoved.call(this),yield this.mouseInput.stop(!0)})}}class Ise{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 tk=function(i,t,e,n){return new(e||(e=Promise))(function(s,o){function a(d){try{c(n.next(d))}catch(h){o(h)}}function l(d){try{c(n.throw(d))}catch(h){o(h)}}function c(d){d.done?s(d.value):function r(s){return s instanceof e?s:new e(function(o){o(s)})}(d.value).then(a,l)}c((n=n.apply(i,t||[])).next())})},gu=(()=>{return(i=gu||(gu={}))[i.Nothing=0]="Nothing",i[i.Files=1]="Files",i[i.Entities=2]="Entities",gu;var i})();const QH={cachingStrategy:gu.Nothing,position:Be.O,rotation:mr.O,loadProps:!0},JH=i=>({meta:i.meta,resources:i.resources.map(({object3D:t,body:e})=>({object3D:t&&t.clone(),body:e&&e.clone()}))});class Rse{constructor(t){this.world=t,this.filesCache=new Map,this.loadResultCache=new Map}loadGgGlbFiles(t){return tk(this,arguments,void 0,function*(e,n=!1){if(n&&this.filesCache.has(e))return this.filesCache.get(e);const r=Promise.all([fetch(`${e}.glb`).then(o=>o.arrayBuffer()),fetch(`${e}.meta`).then(o=>o.text()).then(o=>JSON.parse(o))]);n&&this.filesCache.set(e,r);const s=yield r;return n&&this.filesCache.set(e,s),s})}loadGgGlbResources(t){return tk(this,arguments,void 0,function*(e,n=gu.Nothing){if(n==gu.Entities&&this.loadResultCache.has(e)){const c=this.loadResultCache.get(e),d=c instanceof Promise?yield c:c;return JH(d)}const[r,s]=yield this.loadGgGlbFiles(e,n==gu.Files);if(!r)throw new Error("GLB not found");const[o,a]=yield Promise.all([this.world.visualScene.loader.loadFromGgGlb(r,s),this.world.physicsWorld.loader.loadFromGgGlb(r,s)]),l={resources:[],meta:s};if(!o)return l;if(0==a.length)l.resources.push({object3D:o,body:null});else if(1==a.length)l.resources.push({object3D:o,body:a[0]});else{for(const c of a)l.resources.push({object3D:o.popChild(c.name),body:c});o.isEmpty()||l.resources.push({object3D:o,body:null})}return n==gu.Entities&&this.loadResultCache.set(e,JH(l)),l})}loadGgGlb(t){return tk(this,arguments,void 0,function*(e,n=QH){const r=Object.assign(Object.assign({},QH),n),{resources:s,meta:o}=yield this.loadGgGlbResources(e,r.cachingStrategy),a={entities:s.map(l=>new mu({object3D:l.object3D,objectBody:l.body})),meta:o};return r.loadProps&&(a.props=yield Promise.all(o.dummies.filter(l=>l.is_prop||l.is_scene).map(l=>this.loadGgGlb(l.is_prop?(r.propsPath||e.substring(0,e.lastIndexOf("/")+1))+l.prop_id:l.scene_id,{loadProps:!!l.is_scene,position:Be.add(Be.rot(l.position,r.rotation),r.position),rotation:mr.combineRotations(l.rotation,r.rotation)})))),a.entities.forEach(l=>{l.position=Be.add(Be.rot(Be.clone(l.position),r.rotation),r.position),l.rotation=mr.mult(mr.clone(l.rotation),r.rotation)}),a})}}class e4 extends ul{constructor(t,e){super(t,e),this.visualScene=t,this.physicsWorld=e,this.loader=new Rse(this)}addPrimitiveRigidBody(t,e=Be.O,n=mr.O,r={}){const s=new mu({object3D:this.visualScene.factory.createPrimitive(t.shape,r),objectBody:this.physicsWorld.factory.createRigidBody(t)});return s.position=e,s.rotation=n,this.addEntity(s),s}addRenderer(t,e,n){const r=new Cse(this.visualScene.createRenderer(t,e,n));return this.addEntity(r),r}registerConsoleCommands(t){super.registerConsoleCommands(t),t.registerConsoleCommand(this,"gravity",(...e)=>function(i,t,e,n){return new(e||(e=Promise))(function(s,o){function a(d){try{c(n.next(d))}catch(h){o(h)}}function l(d){try{c(n.throw(d))}catch(h){o(h)}}function c(d){d.done?s(d.value):function r(s){return s instanceof e?s:new e(function(o){o(s)})}(d.value).then(a,l)}c((n=n.apply(i,t||[])).next())})}(this,void 0,void 0,function*(){if(1==e.length&&(e=["0","0",""+-+e[0]]),e.length>0){if(isNaN(+e[0])||isNaN(+e[1])||isNaN(+e[2]))throw new Error("Wrong arguments");this.physicsWorld.gravity={x:+e[0],y:+e[1],z:+e[2]}}return JSON.stringify(this.physicsWorld.gravity)}),'args: [ ?float, ?float, ?float ]; Get or set 3D world gravity vector. 1 argument sets vector {x: 0, y: 0, z: -value}, 3 arguments set the whole vector. Default value is "9.82" or "0 0 -9.82"')}}window.gg_version="0.0.56";const Fse=0,t4=1,Lse=2,n4=1,i4=2,Yc=3,Zl=0,Do=1,Xo=2,qc=0,Ym=1,r4=2,s4=3,o4=4,Nse=5,qh=100,Bse=101,Use=102,Vse=103,zse=104,Hse=200,Gse=201,$se=202,Wse=203,ik=204,rk=205,jse=206,Yse=207,qse=208,Xse=209,Kse=210,Zse=211,Qse=212,Jse=213,eoe=214,toe=0,noe=1,ioe=2,xC=3,roe=4,soe=5,ooe=6,aoe=7,wC=0,loe=1,coe=2,_u=0,doe=1,uoe=2,hoe=3,foe=4,poe=5,moe=6,goe=7,a4="attached",Xc=301,Xh=302,MC=303,CC=304,hb=306,Ql=1e3,Xi=1001,fb=1002,gr=1003,ok=1004,qm=1005,or=1006,pb=1007,hl=1008,Kc=1009,l4=1010,c4=1011,mb=1012,ak=1013,vu=1014,Ko=1015,Xm=1016,lk=1017,ck=1018,Km=1020,d4=35902,u4=1021,h4=1022,To=1023,f4=1024,p4=1025,Zm=1026,Qm=1027,dk=1028,SC=1029,m4=1030,uk=1031,hk=1033,EC=33776,AC=33777,DC=33778,TC=33779,fk=35840,pk=35841,mk=35842,gk=35843,_k=36196,vk=37492,yk=37496,bk=37808,xk=37809,wk=37810,Mk=37811,Ck=37812,Sk=37813,Ek=37814,Ak=37815,Dk=37816,Tk=37817,Ik=37818,Rk=37819,kk=37820,Pk=37821,IC=36492,Ok=36494,Fk=36495,g4=36283,Lk=36284,Nk=36285,Bk=36286,gb=2300,_b=2301,xoe=0,v4=1,zk=2,Moe=3201,Kh=0,Coe=1,yu="",cs="srgb",ds="srgb-linear",Hk="display-p3",kC="display-p3-linear",PC="linear",Oi="srgb",OC="rec709",FC="p3",tg=7680,Soe=512,Eoe=513,Aoe=514,b4=515,Doe=516,Toe=517,Ioe=518,Roe=519,x4="300 es",Zc=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]+Ls[i>>16&255]+Ls[i>>24&255]+"-"+Ls[255&t]+Ls[t>>8&255]+"-"+Ls[t>>16&15|64]+Ls[t>>24&255]+"-"+Ls[63&e|128]+Ls[e>>8&255]+"-"+Ls[e>>16&255]+Ls[e>>24&255]+Ls[255&n]+Ls[n>>8&255]+Ls[n>>16&255]+Ls[n>>24&255]).toLowerCase()}function Ki(i,t,e){return Math.max(t,Math.min(e,i))}function Gk(i,t){return(i%t+t)%t}function vb(i,t,e){return(1-e)*i+e*t}function ao(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 yn(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 qoe_radToDeg=function Goe(i){return i*ig};class xe{constructor(t=0,e=0){xe.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(Ki(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 wn{constructor(t,e,n,r,s,o,a,l,c){wn.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 d=this.elements;return d[0]=t,d[1]=r,d[2]=a,d[3]=e,d[4]=s,d[5]=l,d[6]=n,d[7]=o,d[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],d=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],F=r[2],D=r[5],k=r[8];return s[0]=o*b+a*M+l*F,s[3]=o*v+a*x+l*D,s[6]=o*y+a*C+l*k,s[1]=c*b+d*M+h*F,s[4]=c*v+d*x+h*D,s[7]=c*y+d*C+h*k,s[2]=p*b+m*M+g*F,s[5]=p*v+m*x+g*D,s[8]=p*y+m*C+g*k,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],d=t[8];return e*o*d-e*a*c-n*s*d+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],d=t[8],h=d*o-a*c,p=a*l-d*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-d*n)*b,t[2]=(a*n-r*o)*b,t[3]=p*b,t[4]=(d*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($k.makeScale(t,e)),this}rotate(t){return this.premultiply($k.makeRotation(-t)),this}translate(t,e){return this.premultiply($k.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 $k=new wn;function M4(i){for(let t=i.length-1;t>=0;--t)if(i[t]>=65535)return!0;return!1}function yb(i){return document.createElementNS("http://www.w3.org/1999/xhtml",i)}function Koe(){const i=yb("canvas");return i.style.display="block",i}Int8Array,Uint8Array,Uint8ClampedArray,Int16Array,Uint16Array,Int32Array,Uint32Array,Float32Array,Float64Array;const C4={};function sg(i){i in C4||(C4[i]=!0,console.warn(i))}const S4=(new wn).set(.8224621,.177538,0,.0331941,.9668058,0,.0170827,.0723974,.9105199),E4=(new wn).set(1.2249401,-.2249404,0,-.0420569,1.0420571,0,-.0196376,-.0786361,1.0982735),bb={[ds]:{transfer:PC,primaries:OC,luminanceCoefficients:[.2126,.7152,.0722],toReference:i=>i,fromReference:i=>i},[cs]:{transfer:Oi,primaries:OC,luminanceCoefficients:[.2126,.7152,.0722],toReference:i=>i.convertSRGBToLinear(),fromReference:i=>i.convertLinearToSRGB()},[kC]:{transfer:PC,primaries:FC,luminanceCoefficients:[.2289,.6917,.0793],toReference:i=>i.applyMatrix3(E4),fromReference:i=>i.applyMatrix3(S4)},[Hk]:{transfer:Oi,primaries:FC,luminanceCoefficients:[.2289,.6917,.0793],toReference:i=>i.convertSRGBToLinear().applyMatrix3(E4),fromReference:i=>i.applyMatrix3(S4).convertLinearToSRGB()}},Qoe=new Set([ds,kC]),Zn={enabled:!0,_workingColorSpace:ds,get workingColorSpace(){return this._workingColorSpace},set workingColorSpace(i){if(!Qoe.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,bb[e].fromReference)((0,bb[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 bb[i].primaries},getTransfer:function(i){return i===yu?PC:bb[i].transfer},getLuminanceCoefficients:function(i,t=this._workingColorSpace){return i.fromArray(bb[t].luminanceCoefficients)}};function og(i){return i<.04045?.0773993808*i:Math.pow(.9478672986*i+.0521327014,2.4)}function Wk(i){return i<.0031308?12.92*i:1.055*Math.pow(i,.41666)-.055}let ag;class Joe{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===ag&&(ag=yb("canvas")),ag.width=t.width,ag.height=t.height;const n=ag.getContext("2d");t instanceof ImageData?n.putImageData(t,0,0):n.drawImage(t,0,0,t.width,t.height),e=ag}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=yb("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=Xi,s=Xi,o=or,a=hl,l=To,c=Kc,d=i.DEFAULT_ANISOTROPY,h=yu){super(),this.isTexture=!0,Object.defineProperty(this,"id",{value:tae++}),this.uuid=Zo(),this.name="",this.source=new lg(e),this.mipmaps=[],this.mapping=n,this.channel=0,this.wrapS=r,this.wrapT=s,this.magFilter=o,this.minFilter=a,this.anisotropy=d,this.format=l,this.internalFormat=null,this.type=c,this.offset=new xe(0,0),this.repeat=new xe(1,1),this.center=new xe(0,0),this.rotation=0,this.matrixAutoUpdate=!0,this.matrix=new wn,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 Xi:e.x=e.x<0?0:1;break;case fb: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 Xi:e.y=e.y<0?0:1;break;case fb: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 gi{constructor(t=0,e=0,n=0,r=1){gi.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],d=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(d-p)<.01&&Math.abs(h-b)<.01&&Math.abs(g-v)<.01){if(Math.abs(d+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,F=(y+1)/2,D=(d+p)/4,k=(h+b)/4,B=(g+v)/4;return x>C&&x>F?x<.01?(n=0,r=.707106781,s=.707106781):(n=Math.sqrt(x),r=D/n,s=k/n):C>F?C<.01?(n=.707106781,r=0,s=.707106781):(r=Math.sqrt(C),n=D/r,s=B/r):F<.01?(n=.707106781,r=.707106781,s=0):(s=Math.sqrt(F),n=k/s,r=B/s),this.set(n,r,s,e),this}let M=Math.sqrt((v-g)*(v-g)+(h-b)*(h-b)+(p-d)*(p-d));return Math.abs(M)<.001&&(M=1),this.x=(v-g)/M,this.y=(h-b)/M,this.z=(p-d)/M,this.w=Math.acos((c+m+y-1)/2),this}setFromMatrixPosition(t){const e=t.elements;return this.x=e[12],this.y=e[13],this.z=e[14],this.w=e[15],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 nae extends ng{constructor(t=1,e=1,n={}){super(),this.isRenderTarget=!0,this.width=t,this.height=e,this.depth=1,this.scissor=new gi(0,0,t,e),this.scissorTest=!1,this.viewport=new gi(0,0,t,e);const r={width:t,height:e,depth:1};n=Object.assign({generateMipmaps:!1,internalFormat:null,minFilter:or,depthBuffer:!0,stencilBuffer:!1,resolveDepthBuffer:!0,resolveStencilBuffer:!0,depthTexture:null,samples:0,count:1},n);const s=new Io(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 F=Math.sqrt(x),D=Math.atan2(F,y*M);v=Math.sin(v*D)/F,a=Math.sin(a*D)/F}const C=a*M;if(l=l*v+p*C,c=c*v+m*C,d=d*v+g*C,h=h*v+b*C,v===1-a){const F=1/Math.sqrt(l*l+c*c+d*d+h*h);l*=F,c*=F,d*=F,h*=F}}t[e]=l,t[e+1]=c,t[e+2]=d,t[e+3]=h}static multiplyQuaternionsFlat(t,e,n,r,s,o){const a=n[r],l=n[r+1],c=n[r+2],d=n[r+3],h=s[o],p=s[o+1],m=s[o+2],g=s[o+3];return t[e]=a*g+d*h+l*m-c*p,t[e+1]=l*g+d*p+c*h-a*m,t[e+2]=c*g+d*m+a*p-l*h,t[e+3]=d*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),d=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*d*h+c*m*g,this._y=c*m*h-p*d*g,this._z=c*d*g+p*m*h,this._w=c*d*h-p*m*g;break;case"YXZ":this._x=p*d*h+c*m*g,this._y=c*m*h-p*d*g,this._z=c*d*g-p*m*h,this._w=c*d*h+p*m*g;break;case"ZXY":this._x=p*d*h-c*m*g,this._y=c*m*h+p*d*g,this._z=c*d*g+p*m*h,this._w=c*d*h-p*m*g;break;case"ZYX":this._x=p*d*h-c*m*g,this._y=c*m*h+p*d*g,this._z=c*d*g-p*m*h,this._w=c*d*h+p*m*g;break;case"YZX":this._x=p*d*h+c*m*g,this._y=c*m*h+p*d*g,this._z=c*d*g-p*m*h,this._w=c*d*h-p*m*g;break;case"XZY":this._x=p*d*h-c*m*g,this._y=c*m*h-p*d*g,this._z=c*d*g+p*m*h,this._w=c*d*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],d=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=(d-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=(d-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+d)/m}else{const m=2*Math.sqrt(1+h-n-a);this._w=(o-r)/m,this._x=(s+c)/m,this._y=(l+d)/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(Ki(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,d=e._w;return this._x=n*d+o*a+r*c-s*l,this._y=r*d+o*l+s*a-n*c,this._z=s*d+o*c+n*l-r*a,this._w=o*d-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),d=Math.atan2(c,a),h=Math.sin((1-e)*d)/c,p=Math.sin(e*d)/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 O{constructor(t=0,e=0,n=0){O.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(D4.setFromEuler(t))}applyAxisAngle(t,e){return this.applyQuaternion(D4.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),d=2*(a*e-s*r),h=2*(s*n-o*e);return this.x=e+l*c+o*h-a*d,this.y=n+l*d+a*c-s*h,this.z=r+l*h+s*d-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 qk.copy(this).projectOnVector(t),this.sub(qk)}reflect(t){return this.sub(qk.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(Ki(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 qk=new O,D4=new lo;class Ns{constructor(t=new O(1/0,1/0,1/0),e=new O(-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;e=this.min.x&&t.x<=this.max.x&&t.y>=this.min.y&&t.y<=this.max.y&&t.z>=this.min.z&&t.z<=this.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.x>=this.min.x&&t.min.x<=this.max.x&&t.max.y>=this.min.y&&t.min.y<=this.max.y&&t.max.z>=this.min.z&&t.min.z<=this.max.z}intersectsSphere(t){return this.clampPoint(t.center,fl),fl.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(xb),UC.subVectors(this.max,xb),cg.subVectors(t.a,xb),dg.subVectors(t.b,xb),ug.subVectors(t.c,xb),xu.subVectors(dg,cg),wu.subVectors(ug,dg),Qh.subVectors(cg,ug);let e=[0,-xu.z,xu.y,0,-wu.z,wu.y,0,-Qh.z,Qh.y,xu.z,0,-xu.x,wu.z,0,-wu.x,Qh.z,0,-Qh.x,-xu.y,xu.x,0,-wu.y,wu.x,0,-Qh.y,Qh.x,0];return!(!Xk(e,cg,dg,ug,UC)||(e=[1,0,0,0,1,0,0,0,1],!Xk(e,cg,dg,ug,UC)))&&(VC.crossVectors(xu,wu),e=[VC.x,VC.y,VC.z],Xk(e,cg,dg,ug,UC))}clampPoint(t,e){return e.copy(t).clamp(this.min,this.max)}distanceToPoint(t){return this.clampPoint(t,fl).distanceTo(t)}getBoundingSphere(t){return this.isEmpty()?t.makeEmpty():(this.getCenter(t.center),t.radius=.5*this.getSize(fl).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()||(Qc[0].set(this.min.x,this.min.y,this.min.z).applyMatrix4(t),Qc[1].set(this.min.x,this.min.y,this.max.z).applyMatrix4(t),Qc[2].set(this.min.x,this.max.y,this.min.z).applyMatrix4(t),Qc[3].set(this.min.x,this.max.y,this.max.z).applyMatrix4(t),Qc[4].set(this.max.x,this.min.y,this.min.z).applyMatrix4(t),Qc[5].set(this.max.x,this.min.y,this.max.z).applyMatrix4(t),Qc[6].set(this.max.x,this.max.y,this.min.z).applyMatrix4(t),Qc[7].set(this.max.x,this.max.y,this.max.z).applyMatrix4(t),this.setFromPoints(Qc)),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 Qc=[new O,new O,new O,new O,new O,new O,new O,new O],fl=new O,BC=new Ns,cg=new O,dg=new O,ug=new O,xu=new O,wu=new O,Qh=new O,xb=new O,UC=new O,VC=new O,Jh=new O;function Xk(i,t,e,n,r){for(let s=0,o=i.length-3;s<=o;s+=3){Jh.fromArray(i,s);const a=r.x*Math.abs(Jh.x)+r.y*Math.abs(Jh.y)+r.z*Math.abs(Jh.z),l=t.dot(Jh),c=e.dot(Jh),d=n.dot(Jh);if(Math.max(-Math.max(l,c,d),Math.min(l,c,d))>a)return!1}return!0}const iae=new Ns,wb=new O,Kk=new O;class Bs{constructor(t=new O,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):iae.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;wb.subVectors(t,this.center);const e=wb.lengthSq();if(e>this.radius*this.radius){const n=Math.sqrt(e),r=.5*(n-this.radius);this.center.addScaledVector(wb,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):(Kk.subVectors(t.center,this.center).setLength(t.radius),this.expandByPoint(wb.copy(t.center).add(Kk)),this.expandByPoint(wb.copy(t.center).sub(Kk))),this)}equals(t){return t.center.equals(this.center)&&t.radius===this.radius}clone(){return(new this.constructor).copy(this)}}const Jc=new O,Zk=new O,zC=new O,Mu=new O,Qk=new O,HC=new O,Jk=new O;class Mb{constructor(t=new O,e=new O(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,Jc)),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=Jc.subVectors(t,this.origin).dot(this.direction);return e<0?this.origin.distanceToSquared(t):(Jc.copy(this.origin).addScaledVector(this.direction,e),Jc.distanceToSquared(t))}distanceSqToSegment(t,e,n,r){Zk.copy(t).add(e).multiplyScalar(.5),zC.copy(e).sub(t).normalize(),Mu.copy(this.origin).sub(Zk);const s=.5*t.distanceTo(e),o=-this.direction.dot(zC),a=Mu.dot(this.direction),l=-Mu.dot(zC),c=Mu.lengthSq(),d=Math.abs(1-o*o);let h,p,m,g;if(d>0)if(h=o*l-a,p=o*a-l,g=s*d,h>=0)if(p>=-g)if(p<=g){const b=1/d;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(Zk).addScaledVector(zC,p),m}intersectSphere(t,e){Jc.subVectors(t.center,this.origin);const n=Jc.dot(this.direction),r=Jc.dot(Jc)-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,d=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),d>=0?(s=(t.min.y-p.y)*d,o=(t.max.y-p.y)*d):(s=(t.max.y-p.y)*d,o=(t.min.y-p.y)*d),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,Jc)}intersectTriangle(t,e,n,r,s){Qk.subVectors(e,t),HC.subVectors(n,t),Jk.crossVectors(Qk,HC);let a,o=this.direction.dot(Jk);if(o>0){if(r)return null;a=1}else{if(!(o<0))return null;a=-1,o=-o}Mu.subVectors(this.origin,t);const l=a*this.direction.dot(HC.crossVectors(Mu,HC));if(l<0)return null;const c=a*this.direction.dot(Qk.cross(Mu));if(c<0||l+c>o)return null;const d=-a*Mu.dot(Jk);return d<0?null:this.at(d/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 Ft{constructor(t,e,n,r,s,o,a,l,c,d,h,p,m,g,b,v){Ft.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,d,h,p,m,g,b,v)}set(t,e,n,r,s,o,a,l,c,d,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]=d,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 Ft).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/hg.setFromMatrixColumn(t,0).length(),s=1/hg.setFromMatrixColumn(t,1).length(),o=1/hg.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),d=Math.cos(s),h=Math.sin(s);if("XYZ"===t.order){const p=o*d,m=o*h,g=a*d,b=a*h;e[0]=l*d,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*d,m=l*h,g=c*d,b=c*h;e[0]=p+b*a,e[4]=g*a-m,e[8]=o*c,e[1]=o*h,e[5]=o*d,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*d,m=l*h,g=c*d,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*d,e[9]=b-p*a,e[2]=-o*c,e[6]=a,e[10]=o*l}else if("ZYX"===t.order){const p=o*d,m=o*h,g=a*d,b=a*h;e[0]=l*d,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*d,e[4]=b-p*h,e[8]=g*h+m,e[1]=h,e[5]=o*d,e[9]=-a*d,e[2]=-c*d,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*d,e[4]=-h,e[8]=c*d,e[1]=p*h+b,e[5]=o*d,e[9]=m*h-g,e[2]=g*h-m,e[6]=a*d,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(rae,t,sae)}lookAt(t,e,n){const r=this.elements;return Qo.subVectors(t,e),0===Qo.lengthSq()&&(Qo.z=1),Qo.normalize(),Cu.crossVectors(n,Qo),0===Cu.lengthSq()&&(1===Math.abs(n.z)?Qo.x+=1e-4:Qo.z+=1e-4,Qo.normalize(),Cu.crossVectors(n,Qo)),Cu.normalize(),GC.crossVectors(Qo,Cu),r[0]=Cu.x,r[4]=GC.x,r[8]=Qo.x,r[1]=Cu.y,r[5]=GC.y,r[9]=Qo.y,r[2]=Cu.z,r[6]=GC.z,r[10]=Qo.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],d=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],F=n[15],D=r[0],k=r[4],B=r[8],T=r[12],A=r[1],$=r[5],ie=r[9],ne=r[13],se=r[2],ge=r[6],Y=r[10],re=r[14],J=r[3],we=r[7],Le=r[11],je=r[15];return s[0]=o*D+a*A+l*se+c*J,s[4]=o*k+a*$+l*ge+c*we,s[8]=o*B+a*ie+l*Y+c*Le,s[12]=o*T+a*ne+l*re+c*je,s[1]=d*D+h*A+p*se+m*J,s[5]=d*k+h*$+p*ge+m*we,s[9]=d*B+h*ie+p*Y+m*Le,s[13]=d*T+h*ne+p*re+m*je,s[2]=g*D+b*A+v*se+y*J,s[6]=g*k+b*$+v*ge+y*we,s[10]=g*B+b*ie+v*Y+y*Le,s[14]=g*T+b*ne+v*re+y*je,s[3]=M*D+x*A+C*se+F*J,s[7]=M*k+x*$+C*ge+F*we,s[11]=M*B+x*ie+C*Y+F*Le,s[15]=M*T+x*ne+C*re+F*je,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],d=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*d-s*l*d)+t[11]*(+e*c*h-e*a*m-s*o*h+n*o*m+s*a*d-n*c*d)+t[15]*(-r*a*d-e*l*h+e*a*p+r*o*h-n*o*p+n*l*d)}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],d=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-d*v*c-g*l*m+o*v*m+d*l*y-o*p*y,C=d*b*c-g*h*c+g*a*m-o*b*m-d*a*y+o*h*y,F=g*h*l-d*b*l-g*a*p+o*b*p+d*a*v-o*h*v,D=e*M+n*x+r*C+s*F;if(0===D)return this.set(0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0);const k=1/D;return t[0]=M*k,t[1]=(b*p*s-h*v*s-b*r*m+n*v*m+h*r*y-n*p*y)*k,t[2]=(a*v*s-b*l*s+b*r*c-n*v*c-a*r*y+n*l*y)*k,t[3]=(h*l*s-a*p*s-h*r*c+n*p*c+a*r*m-n*l*m)*k,t[4]=x*k,t[5]=(d*v*s-g*p*s+g*r*m-e*v*m-d*r*y+e*p*y)*k,t[6]=(g*l*s-o*v*s-g*r*c+e*v*c+o*r*y-e*l*y)*k,t[7]=(o*p*s-d*l*s+d*r*c-e*p*c-o*r*m+e*l*m)*k,t[8]=C*k,t[9]=(g*h*s-d*b*s-g*n*m+e*b*m+d*n*y-e*h*y)*k,t[10]=(o*b*s-g*a*s+g*n*c-e*b*c-o*n*y+e*a*y)*k,t[11]=(d*a*s-o*h*s-d*n*c+e*h*c+o*n*m-e*a*m)*k,t[12]=F*k,t[13]=(d*b*r-g*h*r+g*n*p-e*b*p-d*n*v+e*h*v)*k,t[14]=(g*a*r-o*b*r-g*n*l+e*b*l+o*n*v-e*a*v)*k,t[15]=(o*h*r-d*a*r+d*n*l-e*h*l-o*n*p+e*a*p)*k,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,d=s*a;return this.set(c*o+n,c*a-r*l,c*l+r*a,0,c*a+r*l,d*a+n,d*l-r*o,0,c*l-r*a,d*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,d=o+o,h=a+a,p=s*c,m=s*d,g=s*h,b=o*d,v=o*h,y=a*h,M=l*c,x=l*d,C=l*h,F=n.x,D=n.y,k=n.z;return r[0]=(1-(b+y))*F,r[1]=(m+C)*F,r[2]=(g-x)*F,r[3]=0,r[4]=(m-C)*D,r[5]=(1-(p+y))*D,r[6]=(v+M)*D,r[7]=0,r[8]=(g+x)*k,r[9]=(v-M)*k,r[10]=(1-(p+b))*k,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=hg.set(r[0],r[1],r[2]).length();const o=hg.set(r[4],r[5],r[6]).length(),a=hg.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],pl.copy(this);const c=1/s,d=1/o,h=1/a;return pl.elements[0]*=c,pl.elements[1]*=c,pl.elements[2]*=c,pl.elements[4]*=d,pl.elements[5]*=d,pl.elements[6]*=d,pl.elements[8]*=h,pl.elements[9]*=h,pl.elements[10]*=h,e.setFromRotationMatrix(pl),n.x=s,n.y=o,n.z=a,this}makePerspective(t,e,n,r,s,o,a=Zc){const l=this.elements,c=2*s/(e-t),d=2*s/(n-r),h=(e+t)/(e-t),p=(n+r)/(n-r);let m,g;if(a===Zc)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]=d,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=Zc){const l=this.elements,c=1/(e-t),d=1/(n-r),h=1/(o-s),p=(e+t)*c,m=(n+r)*d;let g,b;if(a===Zc)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*d,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 hg=new O,pl=new Ft,rae=new O(0,0,0),sae=new O(1,1,1),Cu=new O,GC=new O,Qo=new O,T4=new Ft,I4=new lo;let ed=(()=>{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],d=s[5],h=s[9],p=s[2],m=s[6],g=s[10];switch(n){case"XYZ":this._y=Math.asin(Ki(l,-1,1)),Math.abs(l)<.9999999?(this._x=Math.atan2(-h,g),this._z=Math.atan2(-a,o)):(this._x=Math.atan2(m,d),this._z=0);break;case"YXZ":this._x=Math.asin(-Ki(h,-1,1)),Math.abs(h)<.9999999?(this._y=Math.atan2(l,g),this._z=Math.atan2(c,d)):(this._y=Math.atan2(-p,o),this._z=0);break;case"ZXY":this._x=Math.asin(Ki(m,-1,1)),Math.abs(m)<.9999999?(this._y=Math.atan2(-p,g),this._z=Math.atan2(-a,d)):(this._y=0,this._z=Math.atan2(c,o));break;case"ZYX":this._y=Math.asin(-Ki(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,d));break;case"YZX":this._z=Math.asin(Ki(c,-1,1)),Math.abs(c)<.9999999?(this._x=Math.atan2(-h,d),this._y=Math.atan2(-p,o)):(this._x=0,this._y=Math.atan2(l,g));break;case"XZY":this._z=Math.asin(-Ki(a,-1,1)),Math.abs(a)<.9999999?(this._x=Math.atan2(m,d),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 T4.makeRotationFromQuaternion(e),this.setFromRotationMatrix(T4,n,r)}setFromVector3(e,n=this._order){return this.set(e.x,e.y,e.z,n)}reorder(e){return I4.setFromEuler(this),this.setFromQuaternion(I4,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 eP{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:oae++}),this.uuid=Zo(),this.name="",this.type="Object3D",this.parent=null,this.children=[],this.up=i.DEFAULT_UP.clone();const e=new O,n=new ed,r=new lo,s=new O(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 Ft},normalMatrix:{value:new wn}}),this.matrix=new Ft,this.matrixWorld=new Ft,this.matrixAutoUpdate=i.DEFAULT_MATRIX_AUTO_UPDATE,this.matrixWorldAutoUpdate=i.DEFAULT_MATRIX_WORLD_AUTO_UPDATE,this.matrixWorldNeedsUpdate=!1,this.layers=new eP,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 fg.setFromAxisAngle(e,n),this.quaternion.multiply(fg),this}rotateOnWorldAxis(e,n){return fg.setFromAxisAngle(e,n),this.quaternion.premultiply(fg),this}rotateX(e){return this.rotateOnAxis(k4,e)}rotateY(e){return this.rotateOnAxis(P4,e)}rotateZ(e){return this.rotateOnAxis(O4,e)}translateOnAxis(e,n){return R4.copy(e).applyQuaternion(this.quaternion),this.position.add(R4.multiplyScalar(n)),this}translateX(e){return this.translateOnAxis(k4,e)}translateY(e){return this.translateOnAxis(P4,e)}translateZ(e){return this.translateOnAxis(O4,e)}localToWorld(e){return this.updateWorldMatrix(!0,!1),e.applyMatrix4(this.matrixWorld)}worldToLocal(e){return this.updateWorldMatrix(!0,!1),e.applyMatrix4(td.copy(this.matrixWorld).invert())}lookAt(e,n,r){e.isVector3?$C.copy(e):$C.set(e,n,r);const s=this.parent;this.updateWorldMatrix(!0,!1),Cb.setFromMatrixPosition(this.matrixWorld),this.isCamera||this.isLight?td.lookAt(Cb,$C,this.up):td.lookAt($C,Cb,this.up),this.quaternion.setFromRotationMatrix(td),s&&(td.extractRotation(s.matrixWorld),fg.setFromRotationMatrix(td),this.quaternion.premultiply(fg.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.maxInstanceCount=this._maxInstanceCount,s.maxVertexCount=this._maxVertexCount,s.maxIndexCount=this._maxIndexCount,s.geometryInitialized=this._geometryInitialized,s.geometryCount=this._geometryCount,s.matricesTexture=this._matricesTexture.toJSON(e),null!==this._colorsTexture&&(s.colorsTexture=this._colorsTexture.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 d=0,h=c.length;d0){s.children=[];for(let l=0;l0){s.animations=[];for(let l=0;l0&&(r.geometries=l),c.length>0&&(r.materials=c),d.length>0&&(r.textures=d),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 d in l){const h=l[d];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){ml.subVectors(r,e),nd.subVectors(n,e),nP.subVectors(t,e);const o=ml.dot(ml),a=ml.dot(nd),l=ml.dot(nP),c=nd.dot(nd),d=nd.dot(nP),h=o*c-a*a;if(0===h)return s.set(0,0,0),null;const p=1/h,m=(c*l-a*d)*p,g=(o*d-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,id)&&id.x>=0&&id.y>=0&&id.x+id.y<=1}static getInterpolation(t,e,n,r,s,o,a,l){return null===this.getBarycoord(t,e,n,r,id)?(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,id.x),l.addScaledVector(o,id.y),l.addScaledVector(a,id.z),l)}static isFrontFacing(t,e,n,r){return ml.subVectors(n,e),nd.subVectors(t,e),ml.cross(nd).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 ml.subVectors(this.c,this.b),nd.subVectors(this.a,this.b),.5*ml.cross(nd).length()}getMidpoint(t){return t.addVectors(this.a,this.b).add(this.c).multiplyScalar(1/3)}getNormal(t){return Da.getNormal(this.a,this.b,this.c,t)}getPlane(t){return t.setFromCoplanarPoints(this.a,this.b,this.c)}getBarycoord(t,e){return Da.getBarycoord(t,this.a,this.b,this.c,e)}getInterpolation(t,e,n,r,s){return Da.getInterpolation(t,this.a,this.b,this.c,e,n,r,s)}containsPoint(t){return Da.containsPoint(t,this.a,this.b,this.c)}isFrontFacing(t){return Da.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;mg.subVectors(r,n),gg.subVectors(s,n),iP.subVectors(t,n);const l=mg.dot(iP),c=gg.dot(iP);if(l<=0&&c<=0)return e.copy(n);rP.subVectors(t,r);const d=mg.dot(rP),h=gg.dot(rP);if(d>=0&&h<=d)return e.copy(r);const p=l*h-d*c;if(p<=0&&l>=0&&d<=0)return o=l/(l-d),e.copy(n).addScaledVector(mg,o);sP.subVectors(t,s);const m=mg.dot(sP),g=gg.dot(sP);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(gg,a);const v=d*g-m*h;if(v<=0&&h-d>=0&&m-g>=0)return L4.subVectors(s,r),a=(h-d)/(h-d+(m-g)),e.copy(r).addScaledVector(L4,a);const y=1/(v+b+p);return o=b*y,a=p*y,e.copy(n).addScaledVector(mg,o).addScaledVector(gg,a)}equals(t){return t.a.equals(this.a)&&t.b.equals(this.b)&&t.c.equals(this.c)}}const N4={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},Su={h:0,s:0,l:0},WC={h:0,s:0,l:0};function oP(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 Ye{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=cs){return t=Math.floor(t),this.r=(t>>16&255)/255,this.g=(t>>8&255)/255,this.b=(255&t)/255,Zn.toWorkingColorSpace(this,e),this}setRGB(t,e,n,r=Zn.workingColorSpace){return this.r=t,this.g=e,this.b=n,Zn.toWorkingColorSpace(this,r),this}setHSL(t,e,n,r=Zn.workingColorSpace){if(t=Gk(t,1),e=Ki(e,0,1),n=Ki(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=oP(o,s,t+1/3),this.g=oP(o,s,t),this.b=oP(o,s,t-1/3)}return Zn.toWorkingColorSpace(this,r),this}setStyle(t,e=cs){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=cs){const n=N4[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=og(t.r),this.g=og(t.g),this.b=og(t.b),this}copyLinearToSRGB(t){return this.r=Wk(t.r),this.g=Wk(t.g),this.b=Wk(t.b),this}convertSRGBToLinear(){return this.copySRGBToLinear(this),this}convertLinearToSRGB(){return this.copyLinearToSRGB(this),this}getHex(t=cs){return Zn.fromWorkingColorSpace(Us.copy(this),t),65536*Math.round(Ki(255*Us.r,0,255))+256*Math.round(Ki(255*Us.g,0,255))+Math.round(Ki(255*Us.b,0,255))}getHexString(t=cs){return("000000"+this.getHex(t).toString(16)).slice(-6)}getHSL(t,e=Zn.workingColorSpace){Zn.fromWorkingColorSpace(Us.copy(this),e);const n=Us.r,r=Us.g,s=Us.b,o=Math.max(n,r,s),a=Math.min(n,r,s);let l,c;const d=(a+o)/2;if(a===o)l=0,c=0;else{const h=o-a;switch(c=d<=.5?h/(o+a):h/(2-o-a),o){case n:l=(r-s)/h+(r0!=t>0&&this.version++,this._alphaTest=t}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.dispersion&&(n.dispersion=this.dispersion),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!==Ym&&(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!==ik&&(n.blendSrc=this.blendSrc),this.blendDst!==rk&&(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!==xC&&(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++}onBuild(){console.warn("Material: onBuild() has been removed.")}onBeforeRender(){console.warn("Material: onBeforeRender() has been removed.")}}class _r extends Ro{constructor(t){super(),this.isMeshBasicMaterial=!0,this.type="MeshBasicMaterial",this.color=new Ye(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 ed,this.combine=wC,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 vr=new O,jC=new xe;class zi{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=Ko,this.version=0}onUploadCallback(){}set needsUpdate(t){!0===t&&this.version++}get updateRange(){return sg("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],d=[];for(let h=0,p=c.length;h0&&(r[l]=d,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 d=[],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))&&(V4.copy(s).invert(),ef.copy(t.ray).applyMatrix4(V4),(null===n.boundingBox||!1!==ef.intersectsBox(n.boundingBox))&&this._computeIntersections(t,e,ef)))}_computeIntersections(t,e,n){let r;const s=this.geometry,o=this.material,a=s.index,l=s.attributes.position,c=s.attributes.uv,d=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:JC.clone(),object:i}}(i,t,e,n,vg,yg,bg,QC);if(d){r&&(XC.fromBufferAttribute(r,a),KC.fromBufferAttribute(r,l),ZC.fromBufferAttribute(r,c),d.uv=Da.getInterpolation(QC,vg,yg,bg,XC,KC,ZC,new xe)),s&&(XC.fromBufferAttribute(s,a),KC.fromBufferAttribute(s,l),ZC.fromBufferAttribute(s,c),d.uv1=Da.getInterpolation(QC,vg,yg,bg,XC,KC,ZC,new xe)),o&&(H4.fromBufferAttribute(o,a),G4.fromBufferAttribute(o,l),$4.fromBufferAttribute(o,c),d.normal=Da.getInterpolation(QC,vg,yg,bg,H4,G4,$4,new O),d.normal.dot(n.direction)>0&&d.normal.multiplyScalar(-1));const h={a,b:l,c,normal:new O,materialIndex:0};Da.getNormal(vg,yg,bg,h.normal),d.face=h}return d}class tf 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=[],d=[],h=[];let p=0,m=0;function g(b,v,y,M,x,C,F,D,k,B,T){const A=C/k,$=F/B,ie=C/2,ne=F/2,se=D/2,ge=k+1,Y=B+1;let re=0,J=0;const we=new O;for(let Le=0;Le0?1:-1,d.push(we.x,we.y,we.z),h.push(Et/k),h.push(1-Le/B),re+=1}for(let Le=0;Le0&&(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 cP extends Or{constructor(){super(),this.isCamera=!0,this.type="Camera",this.matrixWorldInverse=new Ft,this.projectionMatrix=new Ft,this.projectionMatrixInverse=new Ft,this.coordinateSystem=Zc}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 Eu=new O,Y4=new xe,q4=new xe;class yr extends cP{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){Eu.set(-1,-1,.5).applyMatrix4(this.projectionMatrixInverse),e.set(Eu.x,Eu.y).multiplyScalar(-t/Eu.z),Eu.set(1,1,.5).applyMatrix4(this.projectionMatrixInverse),n.set(Eu.x,Eu.y).multiplyScalar(-t/Eu.z)}getViewSize(t,e){return this.getViewBounds(t,Y4,q4),e.subVectors(q4,Y4)}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 _ae extends Or{constructor(t,e,n){super(),this.type="CubeCamera",this.renderTarget=n,this.coordinateSystem=null,this.activeMipmapLevel=0;const r=new yr(-90,1,t,e);r.layers=this.layers,this.add(r);const s=new yr(-90,1,t,e);s.layers=this.layers,this.add(s);const o=new yr(-90,1,t,e);o.layers=this.layers,this.add(o);const a=new yr(-90,1,t,e);a.layers=this.layers,this.add(a);const l=new yr(-90,1,t,e);l.layers=this.layers,this.add(l);const c=new yr(-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===Zc)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,d]=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,d),t.setRenderTarget(h,p,m),t.xr.enabled=g,n.texture.needsPMREMUpdate=!0}}class tS extends Io{constructor(t,e,n,r,s,o,a,l,c,d){super(t=void 0!==t?t:[],e=void 0!==e?e:Xc,n,r,s,o,a,l,c,d),this.isCubeTexture=!0,this.flipY=!1}get images(){return this.image}set images(t){this.image=t}}class vae extends bu{constructor(t=1,e={}){super(t,t,e),this.isWebGLCubeRenderTarget=!0;const n={width:t,height:t,depth:1};this.texture=new tS([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:or}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 tf(5,5,5),s=new gl({name:"CubemapFromEquirect",uniforms:xg(n_uniforms),vertexShader:n_vertexShader,fragmentShader:n_fragmentShader,side:Do,blending:qc});s.uniforms.tEquirect.value=e;const o=new Nn(r,s),a=e.minFilter;return e.minFilter===hl&&(e.minFilter=or),new _ae(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 dP=new O,yae=new O,bae=new wn;class nf{constructor(t=new O(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=dP.subVectors(n,e).cross(yae.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(dP),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||bae.getNormalMatrix(t),r=this.coplanarPoint(dP).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 rf=new Bs,nS=new O;class iS{constructor(t=new nf,e=new nf,n=new nf,r=new nf,s=new nf,o=new nf){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=Zc){const n=this.planes,r=t.elements,s=r[0],o=r[1],a=r[2],l=r[3],c=r[4],d=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+d,v+g,C+M).normalize(),n[3].setComponents(l-o,p-d,v-g,C-M).normalize(),n[4].setComponents(l-a,p-h,v-b,C-x).normalize(),e===Zc)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(),rf.copy(t.boundingSphere).applyMatrix4(t.matrixWorld);else{const e=t.geometry;null===e.boundingSphere&&e.computeBoundingSphere(),rf.copy(e.boundingSphere).applyMatrix4(t.matrixWorld)}return this.intersectsSphere(rf)}intersectsSprite(t){return rf.center.set(0,0,0),rf.radius=.7071067811865476,rf.applyMatrix4(t.matrixWorld),this.intersectsSphere(rf)}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,nS.y=r.normal.y>0?t.max.y:t.min.y,nS.z=r.normal.z>0?t.max.z:t.min.z,r.distanceToPoint(nS)<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 X4(){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 xae(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.isInterleavedBufferAttribute&&(a=a.data),a.isGLBufferAttribute){const d=t.get(a);return void((!d||d.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 ) || defined( USE_BATCHING_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 ) || defined( USE_BATCHING_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\n#ifdef USE_BATCHING_COLOR\n\tvec3 batchingColor = getBatchingColor( getIndirectIndex( gl_DrawID ) );\n\tvColor.xyz *= batchingColor.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}\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}",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_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\tfloat distanceFalloff = 1.0 / max( pow( lightDistance, decayExponent ), 0.01 );\n\tif ( cutoffDistance > 0.0 ) {\n\t\tdistanceFalloff *= pow2( saturate( 1.0 - pow4( lightDistance / cutoffDistance ) ) );\n\t}\n\treturn distanceFalloff;\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_DISPERSION\n\tmaterial.dispersion = dispersion;\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\tfloat dispersion;\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.shadowIntensity, 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.shadowIntensity, 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.shadowIntensity, 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 )\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\tfor ( int i = 0; i < MORPHTARGETS_COUNT; i ++ ) {\n\t\tif ( morphTargetInfluences[ i ] != 0.0 ) objectNormal += getMorph( gl_VertexID, i, 1 ).xyz * morphTargetInfluences[ i ];\n\t}\n#endif",morphtarget_pars_vertex:"#ifdef USE_MORPHTARGETS\n\t#ifndef USE_INSTANCING_MORPH\n\t\tuniform float morphTargetBaseInfluence;\n\t\tuniform float morphTargetInfluences[ MORPHTARGETS_COUNT ];\n\t#endif\n\tuniform sampler2DArray morphTargetsTexture;\n\tuniform ivec2 morphTargetsTextureSize;\n\tvec4 getMorph( const in int vertexIndex, const in int morphTargetIndex, const in int offset ) {\n\t\tint texelIndex = vertexIndex * MORPHTARGETS_TEXTURE_STRIDE + offset;\n\t\tint y = texelIndex / morphTargetsTextureSize.x;\n\t\tint x = texelIndex - y * morphTargetsTextureSize.x;\n\t\tivec3 morphUV = ivec3( x, y, morphTargetIndex );\n\t\treturn texelFetch( morphTargetsTexture, morphUV, 0 );\n\t}\n#endif",morphtarget_vertex:"#ifdef USE_MORPHTARGETS\n\ttransformed *= morphTargetBaseInfluence;\n\tfor ( int i = 0; i < MORPHTARGETS_COUNT; i ++ ) {\n\t\tif ( morphTargetInfluences[ i ] != 0.0 ) transformed += getMorph( gl_VertexID, i, 0 ).xyz * morphTargetInfluences[ i ];\n\t}\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.;const float ShiftRight8 = 1. / 256.;\nconst float Inv255 = 1. / 255.;\nconst vec4 PackFactors = vec4( 1.0, 256.0, 256.0 * 256.0, 256.0 * 256.0 * 256.0 );\nconst vec2 UnpackFactors2 = vec2( UnpackDownscale, 1.0 / PackFactors.g );\nconst vec3 UnpackFactors3 = vec3( UnpackDownscale / PackFactors.rg, 1.0 / PackFactors.b );\nconst vec4 UnpackFactors4 = vec4( UnpackDownscale / PackFactors.rgb, 1.0 / PackFactors.a );\nvec4 packDepthToRGBA( const in float v ) {\n\tif( v <= 0.0 )\n\t\treturn vec4( 0., 0., 0., 0. );\n\tif( v >= 1.0 )\n\t\treturn vec4( 1., 1., 1., 1. );\n\tfloat vuf;\n\tfloat af = modf( v * PackFactors.a, vuf );\n\tfloat bf = modf( vuf * ShiftRight8, vuf );\n\tfloat gf = modf( vuf * ShiftRight8, vuf );\n\treturn vec4( vuf * Inv255, gf * PackUpscale, bf * PackUpscale, af );\n}\nvec3 packDepthToRGB( const in float v ) {\n\tif( v <= 0.0 )\n\t\treturn vec3( 0., 0., 0. );\n\tif( v >= 1.0 )\n\t\treturn vec3( 1., 1., 1. );\n\tfloat vuf;\n\tfloat bf = modf( v * PackFactors.b, vuf );\n\tfloat gf = modf( vuf * ShiftRight8, vuf );\n\treturn vec3( vuf * Inv255, gf * PackUpscale, bf );\n}\nvec2 packDepthToRG( const in float v ) {\n\tif( v <= 0.0 )\n\t\treturn vec2( 0., 0. );\n\tif( v >= 1.0 )\n\t\treturn vec2( 1., 1. );\n\tfloat vuf;\n\tfloat gf = modf( v * 256., vuf );\n\treturn vec2( vuf * Inv255, gf );\n}\nfloat unpackRGBAToDepth( const in vec4 v ) {\n\treturn dot( v, UnpackFactors4 );\n}\nfloat unpackRGBToDepth( const in vec3 v ) {\n\treturn dot( v, UnpackFactors3 );\n}\nfloat unpackRGToDepth( const in vec2 v ) {\n\treturn v.r * UnpackFactors2.r + v.g * UnpackFactors2.g;\n}\nvec4 pack2HalfToRGBA( const in 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( const in 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 shadowIntensity;\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 shadowIntensity;\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 shadowIntensity;\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 shadowIntensity, 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 mix( 1.0, shadow, shadowIntensity );\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 shadowIntensity, 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 mix( 1.0, shadow, shadowIntensity );\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 shadowIntensity;\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 shadowIntensity;\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 shadowIntensity;\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.shadowIntensity, 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.shadowIntensity, 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.shadowIntensity, 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\tconst float StartCompression = 0.8 - 0.04;\n\tconst float 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, vec3( newPeak ), 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.dispersion, 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 dispersion, const in float ior, const in float thickness,\n\t\tconst in vec3 attenuationColor, const in float attenuationDistance ) {\n\t\tvec4 transmittedLight;\n\t\tvec3 transmittance;\n\t\t#ifdef USE_DISPERSION\n\t\t\tfloat halfSpread = ( ior - 1.0 ) * 0.025 * dispersion;\n\t\t\tvec3 iors = vec3( ior - halfSpread, ior, ior + halfSpread );\n\t\t\tfor ( int i = 0; i < 3; i ++ ) {\n\t\t\t\tvec3 transmissionRay = getVolumeTransmissionRay( n, v, thickness, iors[ i ], modelMatrix );\n\t\t\t\tvec3 refractedRayExit = position + transmissionRay;\n\t\t\n\t\t\t\tvec4 ndcPos = projMatrix * viewMatrix * vec4( refractedRayExit, 1.0 );\n\t\t\t\tvec2 refractionCoords = ndcPos.xy / ndcPos.w;\n\t\t\t\trefractionCoords += 1.0;\n\t\t\t\trefractionCoords /= 2.0;\n\t\t\n\t\t\t\tvec4 transmissionSample = getTransmissionSample( refractionCoords, roughness, iors[ i ] );\n\t\t\t\ttransmittedLight[ i ] = transmissionSample[ i ];\n\t\t\t\ttransmittedLight.a += transmissionSample.a;\n\t\t\t\ttransmittance[ i ] = diffuseColor[ i ] * volumeAttenuation( length( transmissionRay ), attenuationColor, attenuationDistance )[ i ];\n\t\t\t}\n\t\t\ttransmittedLight.a /= 3.0;\n\t\t\n\t\t#else\n\t\t\n\t\t\tvec3 transmissionRay = getVolumeTransmissionRay( n, v, thickness, ior, modelMatrix );\n\t\t\tvec3 refractedRayExit = position + transmissionRay;\n\t\t\tvec4 ndcPos = projMatrix * viewMatrix * vec4( refractedRayExit, 1.0 );\n\t\t\tvec2 refractionCoords = ndcPos.xy / ndcPos.w;\n\t\t\trefractionCoords += 1.0;\n\t\t\trefractionCoords /= 2.0;\n\t\t\ttransmittedLight = getTransmissionSample( refractionCoords, roughness, ior );\n\t\t\ttransmittance = diffuseColor * volumeAttenuation( length( transmissionRay ), attenuationColor, attenuationDistance );\n\t\t\n\t\t#endif\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#elif DEPTH_PACKING == 3202\n\t\tgl_FragColor = vec4( packDepthToRGB( fragCoordZ ), 1.0 );\n\t#elif DEPTH_PACKING == 3203\n\t\tgl_FragColor = vec4( packDepthToRG( fragCoordZ ), 0.0, 1.0 );\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_DISPERSION\n\tuniform float dispersion;\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}"},Qe={common:{diffuse:{value:new Ye(16777215)},opacity:{value:1},map:{value:null},mapTransform:{value:new wn},alphaMap:{value:null},alphaMapTransform:{value:new wn},alphaTest:{value:0}},specularmap:{specularMap:{value:null},specularMapTransform:{value:new wn}},envmap:{envMap:{value:null},envMapRotation:{value:new wn},flipEnvMap:{value:-1},reflectivity:{value:1},ior:{value:1.5},refractionRatio:{value:.98}},aomap:{aoMap:{value:null},aoMapIntensity:{value:1},aoMapTransform:{value:new wn}},lightmap:{lightMap:{value:null},lightMapIntensity:{value:1},lightMapTransform:{value:new wn}},bumpmap:{bumpMap:{value:null},bumpMapTransform:{value:new wn},bumpScale:{value:1}},normalmap:{normalMap:{value:null},normalMapTransform:{value:new wn},normalScale:{value:new xe(1,1)}},displacementmap:{displacementMap:{value:null},displacementMapTransform:{value:new wn},displacementScale:{value:1},displacementBias:{value:0}},emissivemap:{emissiveMap:{value:null},emissiveMapTransform:{value:new wn}},metalnessmap:{metalnessMap:{value:null},metalnessMapTransform:{value:new wn}},roughnessmap:{roughnessMap:{value:null},roughnessMapTransform:{value:new wn}},gradientmap:{gradientMap:{value:null}},fog:{fogDensity:{value:25e-5},fogNear:{value:1},fogFar:{value:2e3},fogColor:{value:new Ye(16777215)}},lights:{ambientLightColor:{value:[]},lightProbe:{value:[]},directionalLights:{value:[],properties:{direction:{},color:{}}},directionalLightShadows:{value:[],properties:{shadowIntensity:1,shadowBias:{},shadowNormalBias:{},shadowRadius:{},shadowMapSize:{}}},directionalShadowMap:{value:[]},directionalShadowMatrix:{value:[]},spotLights:{value:[],properties:{color:{},position:{},direction:{},distance:{},coneCos:{},penumbraCos:{},decay:{}}},spotLightShadows:{value:[],properties:{shadowIntensity:1,shadowBias:{},shadowNormalBias:{},shadowRadius:{},shadowMapSize:{}}},spotLightMap:{value:[]},spotShadowMap:{value:[]},spotLightMatrix:{value:[]},pointLights:{value:[],properties:{color:{},position:{},decay:{},distance:{}}},pointLightShadows:{value:[],properties:{shadowIntensity:1,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 Ye(16777215)},opacity:{value:1},size:{value:1},scale:{value:1},map:{value:null},alphaMap:{value:null},alphaMapTransform:{value:new wn},alphaTest:{value:0},uvTransform:{value:new wn}},sprite:{diffuse:{value:new Ye(16777215)},opacity:{value:1},center:{value:new xe(.5,.5)},rotation:{value:0},map:{value:null},mapTransform:{value:new wn},alphaMap:{value:null},alphaMapTransform:{value:new wn},alphaTest:{value:0}}},Jl={basic:{uniforms:co([Qe.common,Qe.specularmap,Qe.envmap,Qe.aomap,Qe.lightmap,Qe.fog]),vertexShader:Mn.meshbasic_vert,fragmentShader:Mn.meshbasic_frag},lambert:{uniforms:co([Qe.common,Qe.specularmap,Qe.envmap,Qe.aomap,Qe.lightmap,Qe.emissivemap,Qe.bumpmap,Qe.normalmap,Qe.displacementmap,Qe.fog,Qe.lights,{emissive:{value:new Ye(0)}}]),vertexShader:Mn.meshlambert_vert,fragmentShader:Mn.meshlambert_frag},phong:{uniforms:co([Qe.common,Qe.specularmap,Qe.envmap,Qe.aomap,Qe.lightmap,Qe.emissivemap,Qe.bumpmap,Qe.normalmap,Qe.displacementmap,Qe.fog,Qe.lights,{emissive:{value:new Ye(0)},specular:{value:new Ye(1118481)},shininess:{value:30}}]),vertexShader:Mn.meshphong_vert,fragmentShader:Mn.meshphong_frag},standard:{uniforms:co([Qe.common,Qe.envmap,Qe.aomap,Qe.lightmap,Qe.emissivemap,Qe.bumpmap,Qe.normalmap,Qe.displacementmap,Qe.roughnessmap,Qe.metalnessmap,Qe.fog,Qe.lights,{emissive:{value:new Ye(0)},roughness:{value:1},metalness:{value:0},envMapIntensity:{value:1}}]),vertexShader:Mn.meshphysical_vert,fragmentShader:Mn.meshphysical_frag},toon:{uniforms:co([Qe.common,Qe.aomap,Qe.lightmap,Qe.emissivemap,Qe.bumpmap,Qe.normalmap,Qe.displacementmap,Qe.gradientmap,Qe.fog,Qe.lights,{emissive:{value:new Ye(0)}}]),vertexShader:Mn.meshtoon_vert,fragmentShader:Mn.meshtoon_frag},matcap:{uniforms:co([Qe.common,Qe.bumpmap,Qe.normalmap,Qe.displacementmap,Qe.fog,{matcap:{value:null}}]),vertexShader:Mn.meshmatcap_vert,fragmentShader:Mn.meshmatcap_frag},points:{uniforms:co([Qe.points,Qe.fog]),vertexShader:Mn.points_vert,fragmentShader:Mn.points_frag},dashed:{uniforms:co([Qe.common,Qe.fog,{scale:{value:1},dashSize:{value:1},totalSize:{value:2}}]),vertexShader:Mn.linedashed_vert,fragmentShader:Mn.linedashed_frag},depth:{uniforms:co([Qe.common,Qe.displacementmap]),vertexShader:Mn.depth_vert,fragmentShader:Mn.depth_frag},normal:{uniforms:co([Qe.common,Qe.bumpmap,Qe.normalmap,Qe.displacementmap,{opacity:{value:1}}]),vertexShader:Mn.meshnormal_vert,fragmentShader:Mn.meshnormal_frag},sprite:{uniforms:co([Qe.sprite,Qe.fog]),vertexShader:Mn.sprite_vert,fragmentShader:Mn.sprite_frag},background:{uniforms:{uvTransform:{value:new wn},t2D:{value:null},backgroundIntensity:{value:1}},vertexShader:Mn.background_vert,fragmentShader:Mn.background_frag},backgroundCube:{uniforms:{envMap:{value:null},flipEnvMap:{value:-1},backgroundBlurriness:{value:0},backgroundIntensity:{value:1},backgroundRotation:{value:new wn}},vertexShader:Mn.backgroundCube_vert,fragmentShader:Mn.backgroundCube_frag},cube:{uniforms:{tCube:{value:null},tFlip:{value:-1},opacity:{value:1}},vertexShader:Mn.cube_vert,fragmentShader:Mn.cube_frag},equirect:{uniforms:{tEquirect:{value:null}},vertexShader:Mn.equirect_vert,fragmentShader:Mn.equirect_frag},distanceRGBA:{uniforms:co([Qe.common,Qe.displacementmap,{referencePosition:{value:new O},nearDistance:{value:1},farDistance:{value:1e3}}]),vertexShader:Mn.distanceRGBA_vert,fragmentShader:Mn.distanceRGBA_frag},shadow:{uniforms:co([Qe.lights,Qe.fog,{color:{value:new Ye(0)},opacity:{value:1}}]),vertexShader:Mn.shadow_vert,fragmentShader:Mn.shadow_frag}};Jl.physical={uniforms:co([Jl.standard.uniforms,{clearcoat:{value:0},clearcoatMap:{value:null},clearcoatMapTransform:{value:new wn},clearcoatNormalMap:{value:null},clearcoatNormalMapTransform:{value:new wn},clearcoatNormalScale:{value:new xe(1,1)},clearcoatRoughness:{value:0},clearcoatRoughnessMap:{value:null},clearcoatRoughnessMapTransform:{value:new wn},dispersion:{value:0},iridescence:{value:0},iridescenceMap:{value:null},iridescenceMapTransform:{value:new wn},iridescenceIOR:{value:1.3},iridescenceThicknessMinimum:{value:100},iridescenceThicknessMaximum:{value:400},iridescenceThicknessMap:{value:null},iridescenceThicknessMapTransform:{value:new wn},sheen:{value:0},sheenColor:{value:new Ye(0)},sheenColorMap:{value:null},sheenColorMapTransform:{value:new wn},sheenRoughness:{value:1},sheenRoughnessMap:{value:null},sheenRoughnessMapTransform:{value:new wn},transmission:{value:0},transmissionMap:{value:null},transmissionMapTransform:{value:new wn},transmissionSamplerSize:{value:new xe},transmissionSamplerMap:{value:null},thickness:{value:0},thicknessMap:{value:null},thicknessMapTransform:{value:new wn},attenuationDistance:{value:0},attenuationColor:{value:new Ye(0)},specularColor:{value:new Ye(1,1,1)},specularColorMap:{value:null},specularColorMapTransform:{value:new wn},specularIntensity:{value:1},specularIntensityMap:{value:null},specularIntensityMapTransform:{value:new wn},anisotropyVector:{value:new xe},anisotropyMap:{value:null},anisotropyMapTransform:{value:new wn}}]),vertexShader:Mn.meshphysical_vert,fragmentShader:Mn.meshphysical_frag};const rS={r:0,b:0,g:0},af=new ed,xce=new Ft;function wce(i,t,e,n,r,s,o){const a=new Ye(0);let c,d,l=!0===s?0:1,h=null,p=0,m=null;function g(M){let x=!0===M.isScene?M.background:null;return x&&x.isTexture&&(x=(M.backgroundBlurriness>0?e:t).get(x)),x}function y(M,x){M.getRGB(rS,W4(i)),n.buffers.color.setClear(rS.r,rS.g,rS.b,x,o)}return{getClearColor:function(){return a},setClearColor:function(M,x=1){a.set(M),l=x,y(a,l)},getClearAlpha:function(){return l},setClearAlpha:function(M){l=M,y(a,l)},render:function b(M){let x=!1;const C=g(M);null===C?y(a,l):C&&C.isColor&&(y(C,1),x=!0);const F=i.xr.getEnvironmentBlendMode();"additive"===F?n.buffers.color.setClear(0,0,0,1,o):"alpha-blend"===F&&n.buffers.color.setClear(0,0,0,0,o),(i.autoClear||x)&&(n.buffers.depth.setTest(!0),n.buffers.depth.setMask(!0),n.buffers.color.setMask(!0),i.clear(i.autoClearColor,i.autoClearDepth,i.autoClearStencil))},addToRenderList:function v(M,x){const C=g(x);C&&(C.isCubeTexture||C.mapping===hb)?(void 0===d&&(d=new Nn(new tf(1,1,1),new gl({name:"BackgroundCubeMaterial",uniforms:xg(Jl.backgroundCube.uniforms),vertexShader:Jl.backgroundCube.vertexShader,fragmentShader:Jl.backgroundCube.fragmentShader,side:Do,depthTest:!1,depthWrite:!1,fog:!1})),d.geometry.deleteAttribute("normal"),d.geometry.deleteAttribute("uv"),d.onBeforeRender=function(F,D,k){this.matrixWorld.copyPosition(k.matrixWorld)},Object.defineProperty(d.material,"envMap",{get:function(){return this.uniforms.envMap.value}}),r.update(d)),af.copy(x.backgroundRotation),af.x*=-1,af.y*=-1,af.z*=-1,C.isCubeTexture&&!1===C.isRenderTargetTexture&&(af.y*=-1,af.z*=-1),d.material.uniforms.envMap.value=C,d.material.uniforms.flipEnvMap.value=C.isCubeTexture&&!1===C.isRenderTargetTexture?-1:1,d.material.uniforms.backgroundBlurriness.value=x.backgroundBlurriness,d.material.uniforms.backgroundIntensity.value=x.backgroundIntensity,d.material.uniforms.backgroundRotation.value.setFromMatrix4(xce.makeRotationFromEuler(af)),d.material.toneMapped=Zn.getTransfer(C.colorSpace)!==Oi,(h!==C||p!==C.version||m!==i.toneMapping)&&(d.material.needsUpdate=!0,h=C,p=C.version,m=i.toneMapping),d.layers.enableAll(),M.unshift(d,d.geometry,d.material,0,0,null)):C&&C.isTexture&&(void 0===c&&(c=new Nn(new sf(2,2),new gl({name:"BackgroundMaterial",uniforms:xg(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=C,c.material.uniforms.backgroundIntensity.value=x.backgroundIntensity,c.material.toneMapped=Zn.getTransfer(C.colorSpace)!==Oi,!0===C.matrixAutoUpdate&&C.updateMatrix(),c.material.uniforms.uvTransform.value.copy(C.matrix),(h!==C||p!==C.version||m!==i.toneMapping)&&(c.material.needsUpdate=!0,h=C,p=C.version,m=i.toneMapping),c.layers.enableAll(),M.unshift(c,c.geometry,c.material,0,0,null))}}}function Mce(i,t){const e=i.getParameter(i.MAX_VERTEX_ATTRIBS),n={},r=p(null);let s=r,o=!1;function c(A){return i.bindVertexArray(A)}function d(A){return i.deleteVertexArray(A)}function p(A){const $=[],ie=[],ne=[];for(let se=0;se=0){const Le=se[J];let je=ge[J];if(void 0===je&&("instanceMatrix"===J&&A.instanceMatrix&&(je=A.instanceMatrix),"instanceColor"===J&&A.instanceColor&&(je=A.instanceColor)),void 0===Le||Le.attribute!==je||je&&Le.data!==je.data)return!0;Y++}return s.attributesNum!==Y||s.index!==ne}(A,ne,ie,se),ge&&function g(A,$,ie,ne){const se={},ge=$.attributes;let Y=0;const re=ie.getAttributes();for(const J in re)if(re[J].location>=0){let Le=ge[J];void 0===Le&&("instanceMatrix"===J&&A.instanceMatrix&&(Le=A.instanceMatrix),"instanceColor"===J&&A.instanceColor&&(Le=A.instanceColor));const je={};je.attribute=Le,Le&&Le.data&&(je.data=Le.data),se[J]=je,Y++}s.attributes=se,s.attributesNum=Y,s.index=ne}(A,ne,ie,se),null!==se&&t.update(se,i.ELEMENT_ARRAY_BUFFER),(ge||o)&&(o=!1,function C(A,$,ie,ne){b();const se=ne.attributes,ge=ie.getAttributes(),Y=$.defaultAttributeValues;for(const re in ge){const J=ge[re];if(J.location>=0){let we=se[re];if(void 0===we&&("instanceMatrix"===re&&A.instanceMatrix&&(we=A.instanceMatrix),"instanceColor"===re&&A.instanceColor&&(we=A.instanceColor)),void 0!==we){const Le=we.normalized,je=we.itemSize,Et=t.get(we);if(void 0===Et)continue;const en=Et.buffer,ae=Et.type,Pe=Et.bytesPerElement,Ze=ae===i.INT||ae===i.UNSIGNED_INT||we.gpuType===ak;if(we.isInterleavedBufferAttribute){const Oe=we.data,yt=Oe.stride,Mt=we.offset;if(Oe.isInstancedInterleavedBuffer){for(let wt=0;wt0&&i.getShaderPrecisionFormat(i.FRAGMENT_SHADER,i.HIGH_FLOAT).precision>0)return"highp";D="mediump"}return"mediump"===D&&i.getShaderPrecisionFormat(i.VERTEX_SHADER,i.MEDIUM_FLOAT).precision>0&&i.getShaderPrecisionFormat(i.FRAGMENT_SHADER,i.MEDIUM_FLOAT).precision>0?"mediump":"lowp"}let c=void 0!==e.precision?e.precision:"highp";const d=l(c);d!==c&&(console.warn("THREE.WebGLRenderer:",c,"not supported, using",d,"instead."),c=d);const h=!0===e.logarithmicDepthBuffer,p=i.getParameter(i.MAX_TEXTURE_IMAGE_UNITS),m=i.getParameter(i.MAX_VERTEX_TEXTURE_IMAGE_UNITS);return{isWebGL2:!0,getMaxAnisotropy:function s(){if(void 0!==r)return r;if(!0===t.has("EXT_texture_filter_anisotropic")){const D=t.get("EXT_texture_filter_anisotropic");r=i.getParameter(D.MAX_TEXTURE_MAX_ANISOTROPY_EXT)}else r=0;return r},getMaxPrecision:l,textureFormatReadable:function o(D){return!(D!==To&&n.convert(D)!==i.getParameter(i.IMPLEMENTATION_COLOR_READ_FORMAT))},textureTypeReadable:function a(D){const k=D===Xm&&(t.has("EXT_color_buffer_half_float")||t.has("EXT_color_buffer_float"));return!(D!==Kc&&n.convert(D)!==i.getParameter(i.IMPLEMENTATION_COLOR_READ_TYPE)&&D!==Ko&&!k)},precision:c,logarithmicDepthBuffer:h,maxTextures:p,maxVertexTextures:m,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:m>0,maxSamples:i.getParameter(i.MAX_SAMPLES)}}function Ece(i){const t=this;let e=null,n=0,r=!1,s=!1;const o=new nf,a=new wn,l={value:null,needsUpdate:!1};function d(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=d(g,p,x,m);for(let F=0;F!==x;++F)C[F]=e[F];y.clippingState=C,this.numIntersection=b?this.numPlanes:0,this.numPlanes+=M}}}function Ace(i){let t=new WeakMap;function e(o,a){return a===MC?o.mapping=Xc:a===CC&&(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===MC||a===CC){if(t.has(o))return e(t.get(o).texture,o.mapping);{const l=o.image;if(l&&l.height>0){const c=new vae(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 Ab extends cP{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,d=(this.top-this.bottom)/this.view.fullHeight/this.zoom;s+=c*this.view.offsetX,o=s+c*this.view.width,a-=d*this.view.offsetY,l=a-d*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 K4=[.125,.215,.35,.446,.526,.582],uP=new Ab,Z4=new Ye;let hP=null,fP=0,pP=0,mP=!1;const cf=(1+Math.sqrt(5))/2,Sg=1/cf,Q4=[new O(-cf,Sg,0),new O(cf,Sg,0),new O(-Sg,0,cf),new O(Sg,0,cf),new O(0,cf,-Sg),new O(0,cf,Sg),new O(-1,1,-1),new O(1,1,-1),new O(-1,1,1),new O(1,1,1)];class J4{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){hP=this._renderer.getRenderTarget(),fP=this._renderer.getActiveCubeFace(),pP=this._renderer.getActiveMipmapLevel(),mP=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=n5(),this._compileMaterial(this._cubemapMaterial))}compileEquirectangularShader(){null===this._equirectMaterial&&(this._equirectMaterial=t5(),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=K4[o-i+4-1]:0===o&&(l=0),n.push(l);const c=1/(a-2),d=-c,h=1+c,p=[d,d,h,d,h,h,d,d,h,h,d,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 D=0;D2?0:-1;M.set([k,B,0,k+2/3,B,0,k+2/3,B+1,0,k,B,0,k+2/3,B+1,0,k,B+1,0],b*g*D),x.set(p,v*g*D),C.set([D,D,D,D,D,D],y*g*D)}const F=new hn;F.setAttribute("position",new zi(M,b)),F.setAttribute("uv",new zi(x,v)),F.setAttribute("faceIndex",new zi(C,y)),t.push(F),r>4&&r--}return{lodPlanes:t,sizeLods:e,sigmas:n}}(s)),this._blurMaterial=function Tce(i,t,e){const n=new Float32Array(20),r=new O(0,1,0);return new gl({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:qc,depthTest:!1,depthWrite:!1})}(s,t,e)}return r}_compileMaterial(t){const e=new Nn(this._lodPlanes[0],t);this._renderer.compile(e,uP)}_sceneToCubeUV(t,e,n,r){const a=new yr(90,1,e,n),l=[1,-1,1,1,1,1],c=[1,1,1,-1,-1,-1],d=this._renderer,h=d.autoClear,p=d.toneMapping;d.getClearColor(Z4),d.toneMapping=_u,d.autoClear=!1;const m=new _r({name:"PMREM.Background",side:Do,depthWrite:!1,depthTest:!1}),g=new Nn(new tf,m);let b=!1;const v=t.background;v?v.isColor&&(m.color.copy(v),t.background=null,b=!0):(m.color.copy(Z4),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;sS(r,M*x,y>2?x:0,x,x),d.setRenderTarget(r),b&&d.render(g,a),d.render(t,a)}g.geometry.dispose(),g.material.dispose(),d.toneMapping=p,d.autoClear=h,t.background=v}_textureToCubeUV(t,e){const n=this._renderer,r=t.mapping===Xc||t.mapping===Xh;r?(null===this._cubemapMaterial&&(this._cubemapMaterial=n5()),this._cubemapMaterial.uniforms.flipEnvMap.value=!1===t.isRenderTargetTexture?-1:1):null===this._equirectMaterial&&(this._equirectMaterial=t5());const s=r?this._cubemapMaterial:this._equirectMaterial,o=new Nn(this._lodPlanes[0],s);s.uniforms.envMap.value=t;const l=this._cubeSize;sS(e,0,0,3*l,2*l),n.setRenderTarget(e),n.render(o,uP)}_applyPMREM(t){const e=this._renderer,n=e.autoClear;e.autoClear=!1;const r=this._lodPlanes.length;for(let s=1;s20&&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 k=0;k<20;++k){const B=k/b,T=Math.exp(-B*B/2);y.push(T),0===k?M+=T:kx-4?r-x+4:0),4*(this._cubeSize-C),3*C,2*C),l.setRenderTarget(e),l.render(h,uP)}}function e5(i,t,e){const n=new bu(i,t,e);return n.texture.mapping=hb,n.texture.name="PMREM.cubeUv",n.scissorTest=!0,n}function sS(i,t,e,n,r){i.viewport.set(t,e,n,r),i.scissor.set(t,e,n,r)}function t5(){return new gl({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:qc,depthTest:!1,depthWrite:!1})}function n5(){return new gl({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:qc,depthTest:!1,depthWrite:!1})}function Ice(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===MC||l===CC,d=l===Xc||l===Xh;if(c||d){let h=t.get(a);if(a.isRenderTargetTexture&&a.pmremVersion!==(void 0!==h?h.texture.pmremVersion:0))return null===e&&(e=new J4(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||d&&m&&function r(a){let l=0;for(let d=0;d<6;d++)void 0!==a[d]&&l++;return 6===l}(m)?(null===e&&(e=new J4(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 Rce(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&&sg("THREE.WebGLRenderer: "+n+" extension not supported."),r}}}function kce(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&&(F=Math.ceil(C/t.maxTextureSize),C=t.maxTextureSize);const D=new Float32Array(C*F*4*h),k=new Yk(D,C,F,h);k.type=Ko,k.needsUpdate=!0;const B=4*x;for(let A=0;A0)return i;const r=t*e;let s=d5[r];if(void 0===s&&(s=new Float32Array(r),d5[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 Fr(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 Rde(i,t){const e=function Ide(i){const t=Zn.getPrimaries(Zn.workingColorSpace),e=Zn.getPrimaries(i);let n;switch(t===e?n="":t===FC&&e===OC?n="LinearDisplayP3ToLinearSRGB":t===OC&&e===FC&&(n="LinearSRGBToLinearDisplayP3"),i){case ds:case kC:return[n,"LinearTransferOETF"];case cs:case Hk: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 kde(i,t){let e;switch(t){case doe:e="Linear";break;case uoe:e="Reinhard";break;case hoe:e="OptimizedCineon";break;case foe:e="ACESFilmic";break;case moe:e="AgX";break;case goe:e="Neutral";break;case poe:e="Custom";break;default:console.warn("THREE.WebGLProgram: Unsupported toneMapping:",t),e="Linear"}return"vec3 "+i+"( vec3 color ) { return "+e+"ToneMapping( color ); }"}const lS=new O;function Db(i){return""!==i}function v5(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 y5(i,t){return i.replace(/NUM_CLIPPING_PLANES/g,t.numClippingPlanes).replace(/UNION_CLIPPING_PLANES/g,t.numClippingPlanes-t.numClipIntersection)}const Nde=/^[ \t]*#include +<([\w\d./]+)>/gm;function vP(i){return i.replace(Nde,Ude)}const Bde=new Map;function Ude(i,t){let e=Mn[t];if(void 0===e){const n=Bde.get(t);if(void 0===n)throw new Error("Can not resolve #include <"+t+">");e=Mn[n],console.warn('THREE.WebGLRenderer: Shader chunk "%s" has been deprecated. Use "%s" instead.',t,n)}return vP(e)}const Vde=/#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 b5(i){return i.replace(Vde,zde)}function zde(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(Db).join("\n"),y.length>0&&(y+="\n")):(v=[x5(e),"#define SHADER_TYPE "+e.shaderType,"#define SHADER_NAME "+e.shaderName,g,e.extensionClipCullDistance?"#define USE_CLIP_DISTANCE":"",e.batching?"#define USE_BATCHING":"",e.batchingColor?"#define USE_BATCHING_COLOR":"",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 "+d:"",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_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.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","#ifdef USE_SKINNING","\tattribute vec4 skinIndex;","\tattribute vec4 skinWeight;","#endif","\n"].filter(Db).join("\n"),y=[x5(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 "+d:"",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.dispersion?"#define USE_DISPERSION":"",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||e.batchingColor?"#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.decodeVideoTexture?"#define DECODE_VIDEO_TEXTURE":"",e.logarithmicDepthBuffer?"#define USE_LOGDEPTHBUF":"","uniform mat4 viewMatrix;","uniform vec3 cameraPosition;","uniform bool isOrthographic;",e.toneMapping!==_u?"#define TONE_MAPPING":"",e.toneMapping!==_u?Mn.tonemapping_pars_fragment:"",e.toneMapping!==_u?kde("toneMapping",e.toneMapping):"",e.dithering?"#define DITHERING":"",e.opaque?"#define OPAQUE":"",Mn.colorspace_pars_fragment,Rde("linearToOutputTexel",e.outputColorSpace),(Zn.getLuminanceCoefficients(lS),["float luminance( const in vec3 rgb ) {",`\tconst vec3 weights = vec3( ${lS.x.toFixed(4)}, ${lS.y.toFixed(4)}, ${lS.z.toFixed(4)} );`,"\treturn dot( weights, rgb );","}"].join("\n")),e.useDepthPacking?"#define DEPTH_PACKING "+e.depthPacking:"","\n"].filter(Db).join("\n")),o=vP(o),o=v5(o,e),o=y5(o,e),a=vP(a),a=v5(a,e),a=y5(a,e),o=b5(o),a=b5(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===x4?"":"layout(location = 0) out highp vec4 pc_fragColor;",e.glslVersion===x4?"":"#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,F=g5(r,r.VERTEX_SHADER,M+v+o),D=g5(r,r.FRAGMENT_SHADER,C);function k($){if(i.debug.checkShaderErrors){const ie=r.getProgramInfoLog(b).trim(),ne=r.getShaderInfoLog(F).trim(),se=r.getShaderInfoLog(D).trim();let ge=!0,Y=!0;if(!1===r.getProgramParameter(b,r.LINK_STATUS))if(ge=!1,"function"==typeof i.debug.onShaderError)i.debug.onShaderError(r,b,F,D);else{const re=_5(r,F,"vertex"),J=_5(r,D,"fragment");console.error("THREE.WebGLProgram: Shader Error "+r.getError()+" - VALIDATE_STATUS "+r.getProgramParameter(b,r.VALIDATE_STATUS)+"\n\nMaterial Name: "+$.name+"\nMaterial Type: "+$.type+"\n\nProgram Info Log: "+ie+"\n"+re+"\n"+J)}else""!==ie?console.warn("THREE.WebGLProgram: Program Info Log:",ie):(""===ne||""===se)&&(Y=!1);Y&&($.diagnostics={runnable:ge,programLog:ie,vertexShader:{log:ne,prefix:v},fragmentShader:{log:se,prefix:y}})}r.deleteShader(F),r.deleteShader(D),B=new aS(r,b),T=function Lde(i,t){const e={},n=i.getProgramParameter(t,i.ACTIVE_ATTRIBUTES);for(let r=0;r0,ce=T.clearcoat>0,De=T.iridescence>0,Ae=T.sheen>0,Lt=T.transmission>0,Je=R&&!!T.anisotropyMap,dt=ce&&!!T.clearcoatMap,bn=ce&&!!T.clearcoatNormalMap,Ve=ce&&!!T.clearcoatRoughnessMap,ct=De&&!!T.iridescenceMap,Wn=De&&!!T.iridescenceThicknessMap,an=Ae&&!!T.sheenColorMap,mt=Ae&&!!T.sheenRoughnessMap,_n=!!T.specularMap,kn=!!T.specularColorMap,Yi=!!T.specularIntensityMap,Z=Lt&&!!T.transmissionMap,He=Lt&&!!T.thicknessMap,Ee=!!T.alphaMap,Qn=!!T.extensions;let br=_u;T.toneMapped&&(null===Oe||!0===Oe.isXRRenderTarget)&&(br=i.toneMapping);const hs={shaderID:we,shaderType:T.type,shaderName:T.name,vertexShader:en,fragmentShader:ae,defines:T.defines,customVertexShaderID:Pe,customFragmentShaderID:Ze,isRawShaderMaterial:!0===T.isRawShaderMaterial,glslVersion:T.glslVersion,precision:m,batching:Mt,batchingColor:Mt&&null!==ne._colorsTexture,instancing:yt,instancingColor:yt&&null!==ne.instanceColor,instancingMorph:yt&&null!==ne.morphTexture,supportsVertexTextures:p,outputColorSpace:null===Oe?i.outputColorSpace:!0===Oe.isXRRenderTarget?Oe.texture.colorSpace:ds,alphaToCoverage:!!T.alphaToCoverage,map:wt,matcap:!!T.matcap,envMap:N,envMapMode:N&&re.mapping,envMapCubeUVHeight:J,aoMap:ze,lightMap:Fe,bumpMap:tt,normalMap:Me,displacementMap:p&&Vt,emissiveMap:nt,normalMapObjectSpace:Me&&T.normalMapType===Coe,normalMapTangentSpace:Me&&T.normalMapType===Kh,metalnessMap:ft,roughnessMap:z,anisotropy:R,anisotropyMap:Je,clearcoat:ce,clearcoatMap:dt,clearcoatNormalMap:bn,clearcoatRoughnessMap:Ve,dispersion:T.dispersion>0,iridescence:De,iridescenceMap:ct,iridescenceThicknessMap:Wn,sheen:Ae,sheenColorMap:an,sheenRoughnessMap:mt,specularMap:_n,specularColorMap:kn,specularIntensityMap:Yi,transmission:Lt,transmissionMap:Z,thicknessMap:He,gradientMap:!!T.gradientMap,opaque:!1===T.transparent&&T.blending===Ym&&!1===T.alphaToCoverage,alphaMap:Ee,alphaTest:T.alphaTest>0,alphaHash:!!T.alphaHash,combine:T.combine,mapUv:wt&&b(T.map.channel),aoMapUv:ze&&b(T.aoMap.channel),lightMapUv:Fe&&b(T.lightMap.channel),bumpMapUv:tt&&b(T.bumpMap.channel),normalMapUv:Me&&b(T.normalMap.channel),displacementMapUv:Vt&&b(T.displacementMap.channel),emissiveMapUv:nt&&b(T.emissiveMap.channel),metalnessMapUv:ft&&b(T.metalnessMap.channel),roughnessMapUv:z&&b(T.roughnessMap.channel),anisotropyMapUv:Je&&b(T.anisotropyMap.channel),clearcoatMapUv:dt&&b(T.clearcoatMap.channel),clearcoatNormalMapUv:bn&&b(T.clearcoatNormalMap.channel),clearcoatRoughnessMapUv:Ve&&b(T.clearcoatRoughnessMap.channel),iridescenceMapUv:ct&&b(T.iridescenceMap.channel),iridescenceThicknessMapUv:Wn&&b(T.iridescenceThicknessMap.channel),sheenColorMapUv:an&&b(T.sheenColorMap.channel),sheenRoughnessMapUv:mt&&b(T.sheenRoughnessMap.channel),specularMapUv:_n&&b(T.specularMap.channel),specularColorMapUv:kn&&b(T.specularColorMap.channel),specularIntensityMapUv:Yi&&b(T.specularIntensityMap.channel),transmissionMapUv:Z&&b(T.transmissionMap.channel),thicknessMapUv:He&&b(T.thicknessMap.channel),alphaMapUv:Ee&&b(T.alphaMap.channel),vertexTangents:!!ge.attributes.tangent&&(Me||R),vertexColors:T.vertexColors,vertexAlphas:!0===T.vertexColors&&!!ge.attributes.color&&4===ge.attributes.color.itemSize,pointsUvs:!0===ne.isPoints&&!!ge.attributes.uv&&(wt||Ee),fog:!!se,useFog:!0===T.fog,fogExp2:!!se&&se.isFogExp2,flatShading:!0===T.flatShading,sizeAttenuation:!0===T.sizeAttenuation,logarithmicDepthBuffer:h,skinning:!0===ne.isSkinnedMesh,morphTargets:void 0!==ge.morphAttributes.position,morphNormals:void 0!==ge.morphAttributes.normal,morphColors:void 0!==ge.morphAttributes.color,morphTargetsCount:je,morphTextureStride:Et,numDirLights:A.directional.length,numPointLights:A.point.length,numSpotLights:A.spot.length,numSpotLightMaps:A.spotLightMap.length,numRectAreaLights:A.rectArea.length,numHemiLights:A.hemi.length,numDirLightShadows:A.directionalShadowMap.length,numPointLightShadows:A.pointShadowMap.length,numSpotLightShadows:A.spotShadowMap.length,numSpotLightShadowsWithMaps:A.numSpotLightShadowsWithMaps,numLightProbes:A.numLightProbes,numClippingPlanes:o.numPlanes,numClipIntersection:o.numIntersection,dithering:T.dithering,shadowMapEnabled:i.shadowMap.enabled&&$.length>0,shadowMapType:i.shadowMap.type,toneMapping:br,decodeVideoTexture:wt&&!0===T.map.isVideoTexture&&Zn.getTransfer(T.map.colorSpace)===Oi,premultipliedAlpha:T.premultipliedAlpha,doubleSided:T.side===Xo,flipSided:T.side===Do,useDepthPacking:T.depthPacking>=0,depthPacking:T.depthPacking||0,index0AttributeName:T.index0AttributeName,extensionClipCullDistance:Qn&&!0===T.extensions.clipCullDistance&&n.has("WEBGL_clip_cull_distance"),extensionMultiDraw:(Qn&&!0===T.extensions.multiDraw||Mt)&&n.has("WEBGL_multi_draw"),rendererExtensionParallelShaderCompile:n.has("KHR_parallel_shader_compile"),customProgramCacheKey:T.customProgramCacheKey()};return hs.vertexUv1s=c.has(1),hs.vertexUv2s=c.has(2),hs.vertexUv3s=c.has(3),c.clear(),hs},getProgramCacheKey:function y(T){const A=[];if(T.shaderID?A.push(T.shaderID):(A.push(T.customVertexShaderID),A.push(T.customFragmentShaderID)),void 0!==T.defines)for(const $ in T.defines)A.push($),A.push(T.defines[$]);return!1===T.isRawShaderMaterial&&(function M(T,A){T.push(A.precision),T.push(A.outputColorSpace),T.push(A.envMapMode),T.push(A.envMapCubeUVHeight),T.push(A.mapUv),T.push(A.alphaMapUv),T.push(A.lightMapUv),T.push(A.aoMapUv),T.push(A.bumpMapUv),T.push(A.normalMapUv),T.push(A.displacementMapUv),T.push(A.emissiveMapUv),T.push(A.metalnessMapUv),T.push(A.roughnessMapUv),T.push(A.anisotropyMapUv),T.push(A.clearcoatMapUv),T.push(A.clearcoatNormalMapUv),T.push(A.clearcoatRoughnessMapUv),T.push(A.iridescenceMapUv),T.push(A.iridescenceThicknessMapUv),T.push(A.sheenColorMapUv),T.push(A.sheenRoughnessMapUv),T.push(A.specularMapUv),T.push(A.specularColorMapUv),T.push(A.specularIntensityMapUv),T.push(A.transmissionMapUv),T.push(A.thicknessMapUv),T.push(A.combine),T.push(A.fogExp2),T.push(A.sizeAttenuation),T.push(A.morphTargetsCount),T.push(A.morphAttributeCount),T.push(A.numDirLights),T.push(A.numPointLights),T.push(A.numSpotLights),T.push(A.numSpotLightMaps),T.push(A.numHemiLights),T.push(A.numRectAreaLights),T.push(A.numDirLightShadows),T.push(A.numPointLightShadows),T.push(A.numSpotLightShadows),T.push(A.numSpotLightShadowsWithMaps),T.push(A.numLightProbes),T.push(A.shadowMapType),T.push(A.toneMapping),T.push(A.numClippingPlanes),T.push(A.numClipIntersection),T.push(A.depthPacking)}(A,T),function x(T,A){a.disableAll(),A.supportsVertexTextures&&a.enable(0),A.instancing&&a.enable(1),A.instancingColor&&a.enable(2),A.instancingMorph&&a.enable(3),A.matcap&&a.enable(4),A.envMap&&a.enable(5),A.normalMapObjectSpace&&a.enable(6),A.normalMapTangentSpace&&a.enable(7),A.clearcoat&&a.enable(8),A.iridescence&&a.enable(9),A.alphaTest&&a.enable(10),A.vertexColors&&a.enable(11),A.vertexAlphas&&a.enable(12),A.vertexUv1s&&a.enable(13),A.vertexUv2s&&a.enable(14),A.vertexUv3s&&a.enable(15),A.vertexTangents&&a.enable(16),A.anisotropy&&a.enable(17),A.alphaHash&&a.enable(18),A.batching&&a.enable(19),A.dispersion&&a.enable(20),A.batchingColor&&a.enable(21),T.push(a.mask),a.disableAll(),A.fog&&a.enable(0),A.useFog&&a.enable(1),A.flatShading&&a.enable(2),A.logarithmicDepthBuffer&&a.enable(3),A.skinning&&a.enable(4),A.morphTargets&&a.enable(5),A.morphNormals&&a.enable(6),A.morphColors&&a.enable(7),A.premultipliedAlpha&&a.enable(8),A.shadowMapEnabled&&a.enable(9),A.doubleSided&&a.enable(10),A.flipSided&&a.enable(11),A.useDepthPacking&&a.enable(12),A.dithering&&a.enable(13),A.transmission&&a.enable(14),A.sheen&&a.enable(15),A.opaque&&a.enable(16),A.pointsUvs&&a.enable(17),A.decodeVideoTexture&&a.enable(18),A.alphaToCoverage&&a.enable(19),T.push(a.mask)}(A,T),A.push(i.outputColorSpace)),A.push(T.customProgramCacheKey),A.join()},getUniforms:function C(T){const A=g[T.type];let $;return $=A?j4.clone(Jl[A].uniforms):T.uniforms,$},acquireProgram:function F(T,A){let $;for(let ie=0,ne=d.length;ie0?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 d(){for(let h=t,p=i.length;h1&&e.sort(h||Jde),n.length>1&&n.sort(p||w5),r.length>1&&r.sort(p||w5)}}}function eue(){let i=new WeakMap;return{get:function t(n,r){const s=i.get(n);let o;return void 0===s?(o=new M5,i.set(n,[o])):r>=s.length?(o=new M5,s.push(o)):o=s[r],o},dispose:function e(){i=new WeakMap}}}function tue(){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 O,color:new Ye};break;case"SpotLight":e={position:new O,direction:new O,color:new Ye,distance:0,coneCos:0,penumbraCos:0,decay:0};break;case"PointLight":e={position:new O,color:new Ye,distance:0,decay:0};break;case"HemisphereLight":e={direction:new O,skyColor:new Ye,groundColor:new Ye};break;case"RectAreaLight":e={color:new Ye,position:new O,halfWidth:new O,halfHeight:new O}}return i[t.id]=e,e}}}let iue=0;function rue(i,t){return(t.castShadow?2:0)-(i.castShadow?2:0)+(t.map?1:0)-(i.map?1:0)}function sue(i){const t=new tue,e=function nue(){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={shadowIntensity:1,shadowBias:0,shadowNormalBias:0,shadowRadius:1,shadowMapSize:new xe};break;case"PointLight":e={shadowIntensity:1,shadowBias:0,shadowNormalBias:0,shadowRadius:1,shadowMapSize:new xe,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 O);const r=new O,s=new Ft,o=new Ft;return{setup:function a(c){let d=0,h=0,p=0;for(let T=0;T<9;T++)n.probe[T].set(0,0,0);let m=0,g=0,b=0,v=0,y=0,M=0,x=0,C=0,F=0,D=0,k=0;c.sort(rue);for(let T=0,A=c.length;T0&&(!0===i.has("OES_texture_float_linear")?(n.rectAreaLTC1=Qe.LTC_FLOAT_1,n.rectAreaLTC2=Qe.LTC_FLOAT_2):(n.rectAreaLTC1=Qe.LTC_HALF_1,n.rectAreaLTC2=Qe.LTC_HALF_2)),n.ambient[0]=d,n.ambient[1]=h,n.ambient[2]=p;const B=n.hash;(B.directionalLength!==m||B.pointLength!==g||B.spotLength!==b||B.rectAreaLength!==v||B.hemiLength!==y||B.numDirectionalShadows!==M||B.numPointShadows!==x||B.numSpotShadows!==C||B.numSpotMaps!==F||B.numLightProbes!==k)&&(n.directional.length=m,n.spot.length=b,n.rectArea.length=v,n.point.length=g,n.hemi.length=y,n.directionalShadow.length=M,n.directionalShadowMap.length=M,n.pointShadow.length=x,n.pointShadowMap.length=x,n.spotShadow.length=C,n.spotShadowMap.length=C,n.directionalShadowMatrix.length=M,n.pointShadowMatrix.length=x,n.spotLightMatrix.length=C+F-D,n.spotLightMap.length=F,n.numSpotLightShadowsWithMaps=D,n.numLightProbes=k,B.directionalLength=m,B.pointLength=g,B.spotLength=b,B.rectAreaLength=v,B.hemiLength=y,B.numDirectionalShadows=M,B.numPointShadows=x,B.numSpotShadows=C,B.numSpotMaps=F,B.numLightProbes=k,n.version=iue++)},setupView:function l(c,d){let h=0,p=0,m=0,g=0,b=0;const v=d.matrixWorldInverse;for(let y=0,M=c.length;y=o.length?(a=new C5(i),o.push(a)):a=o[s],a},dispose:function n(){t=new WeakMap}}}class S5 extends Ro{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 E5 extends Ro{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 aue="void main() {\n\tgl_Position = vec4( position, 1.0 );\n}",lue="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 cue(i,t,e){let n=new iS;const r=new xe,s=new xe,o=new gi,a=new S5({depthPacking:Moe}),l=new E5,c={},d=e.maxTextureSize,h={[Zl]:Do,[Do]:Zl,[Xo]:Xo},p=new gl({defines:{VSM_SAMPLES:8},uniforms:{shadow_pass:{value:null},resolution:{value:new xe},radius:{value:4}},vertexShader:aue,fragmentShader:lue}),m=p.clone();m.defines.HORIZONTAL_PASS=1;const g=new hn;g.setAttribute("position",new zi(new Float32Array([-1,-1,.5,3,-1,.5,-1,3,.5]),3));const b=new Nn(g,p),v=this;this.enabled=!1,this.autoUpdate=!0,this.needsUpdate=!1,this.type=n4;let y=this.type;function M(D,k){const B=t.update(b);p.defines.VSM_SAMPLES!==D.blurSamples&&(p.defines.VSM_SAMPLES=D.blurSamples,m.defines.VSM_SAMPLES=D.blurSamples,p.needsUpdate=!0,m.needsUpdate=!0),null===D.mapPass&&(D.mapPass=new bu(r.x,r.y)),p.uniforms.shadow_pass.value=D.map.texture,p.uniforms.resolution.value=D.mapSize,p.uniforms.radius.value=D.radius,i.setRenderTarget(D.mapPass),i.clear(),i.renderBufferDirect(k,null,B,p,b,null),m.uniforms.shadow_pass.value=D.mapPass.texture,m.uniforms.resolution.value=D.mapSize,m.uniforms.radius.value=D.radius,i.setRenderTarget(D.map),i.clear(),i.renderBufferDirect(k,null,B,m,b,null)}function x(D,k,B,T){let A=null;const $=!0===B.isPointLight?D.customDistanceMaterial:D.customDepthMaterial;if(void 0!==$)A=$;else if(A=!0===B.isPointLight?l:a,i.localClippingEnabled&&!0===k.clipShadows&&Array.isArray(k.clippingPlanes)&&0!==k.clippingPlanes.length||k.displacementMap&&0!==k.displacementScale||k.alphaMap&&k.alphaTest>0||k.map&&k.alphaTest>0){const ie=A.uuid,ne=k.uuid;let se=c[ie];void 0===se&&(se={},c[ie]=se);let ge=se[ne];void 0===ge&&(ge=A.clone(),se[ne]=ge,k.addEventListener("dispose",F)),A=ge}return A.visible=k.visible,A.wireframe=k.wireframe,A.side=T===Yc?null!==k.shadowSide?k.shadowSide:k.side:null!==k.shadowSide?k.shadowSide:h[k.side],A.alphaMap=k.alphaMap,A.alphaTest=k.alphaTest,A.map=k.map,A.clipShadows=k.clipShadows,A.clippingPlanes=k.clippingPlanes,A.clipIntersection=k.clipIntersection,A.displacementMap=k.displacementMap,A.displacementScale=k.displacementScale,A.displacementBias=k.displacementBias,A.wireframeLinewidth=k.wireframeLinewidth,A.linewidth=k.linewidth,!0===B.isPointLight&&!0===A.isMeshDistanceMaterial&&(i.properties.get(A).light=B),A}function C(D,k,B,T,A){if(!1===D.visible)return;if(D.layers.test(k.layers)&&(D.isMesh||D.isLine||D.isPoints)&&(D.castShadow||D.receiveShadow&&A===Yc)&&(!D.frustumCulled||n.intersectsObject(D))){D.modelViewMatrix.multiplyMatrices(B.matrixWorldInverse,D.matrixWorld);const ne=t.update(D),se=D.material;if(Array.isArray(se)){const ge=ne.groups;for(let Y=0,re=ge.length;Yd||r.y>d)&&(r.x>d&&(s.x=Math.floor(d/we.x),r.x=s.x*we.x,J.mapSize.x=s.x),r.y>d&&(s.y=Math.floor(d/we.y),r.y=s.y*we.y,J.mapSize.y=s.y)),null===J.map||!0===ne||!0===se){const je=this.type!==Yc?{minFilter:gr,magFilter:gr}:{};null!==J.map&&J.map.dispose(),J.map=new bu(r.x,r.y,je),J.map.texture.name=re.name+".shadowMap",J.camera.updateProjectionMatrix()}i.setRenderTarget(J.map),i.clear();const Le=J.getViewportCount();for(let je=0;je=1):-1!==re.indexOf("OpenGL ES")&&(Y=parseFloat(/^OpenGL ES (\d)/.exec(re)[1]),ge=Y>=2);let J=null,we={};const Le=i.getParameter(i.SCISSOR_BOX),je=i.getParameter(i.VIEWPORT),Et=(new gi).fromArray(Le),en=(new gi).fromArray(je);function ae(Z,He,Ce,Ee){const Ke=new Uint8Array(4),tn=i.createTexture();i.bindTexture(Z,tn),i.texParameteri(Z,i.TEXTURE_MIN_FILTER,i.NEAREST),i.texParameteri(Z,i.TEXTURE_MAG_FILTER,i.NEAREST);for(let Qn=0;Qn"u")&&/OculusBrowser/g.test(navigator.userAgent),c=new xe,d=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(z,R){return m?new OffscreenCanvas(z,R):yb("canvas")}function b(z,R,ce){let Te=1;const De=ft(z);if((De.width>ce||De.height>ce)&&(Te=ce/Math.max(De.width,De.height)),Te<1){if(typeof HTMLImageElement<"u"&&z instanceof HTMLImageElement||typeof HTMLCanvasElement<"u"&&z instanceof HTMLCanvasElement||typeof ImageBitmap<"u"&&z instanceof ImageBitmap||typeof VideoFrame<"u"&&z instanceof VideoFrame){const Ae=Math.floor(Te*De.width),Lt=Math.floor(Te*De.height);void 0===h&&(h=g(Ae,Lt));const Je=R?g(Ae,Lt):h;return Je.width=Ae,Je.height=Lt,Je.getContext("2d").drawImage(z,0,0,Ae,Lt),console.warn("THREE.WebGLRenderer: Texture has been resized from ("+De.width+"x"+De.height+") to ("+Ae+"x"+Lt+")."),Je}return"data"in z&&console.warn("THREE.WebGLRenderer: Image in DataTexture is too big ("+De.width+"x"+De.height+")."),z}return z}function v(z){return z.generateMipmaps&&z.minFilter!==gr&&z.minFilter!==or}function y(z){i.generateMipmap(z)}function M(z,R,ce,Te,De=!1){if(null!==z){if(void 0!==i[z])return i[z];console.warn("THREE.WebGLRenderer: Attempt to use non-existing WebGL internal format '"+z+"'")}let Ae=R;if(R===i.RED&&(ce===i.FLOAT&&(Ae=i.R32F),ce===i.HALF_FLOAT&&(Ae=i.R16F),ce===i.UNSIGNED_BYTE&&(Ae=i.R8)),R===i.RED_INTEGER&&(ce===i.UNSIGNED_BYTE&&(Ae=i.R8UI),ce===i.UNSIGNED_SHORT&&(Ae=i.R16UI),ce===i.UNSIGNED_INT&&(Ae=i.R32UI),ce===i.BYTE&&(Ae=i.R8I),ce===i.SHORT&&(Ae=i.R16I),ce===i.INT&&(Ae=i.R32I)),R===i.RG&&(ce===i.FLOAT&&(Ae=i.RG32F),ce===i.HALF_FLOAT&&(Ae=i.RG16F),ce===i.UNSIGNED_BYTE&&(Ae=i.RG8)),R===i.RG_INTEGER&&(ce===i.UNSIGNED_BYTE&&(Ae=i.RG8UI),ce===i.UNSIGNED_SHORT&&(Ae=i.RG16UI),ce===i.UNSIGNED_INT&&(Ae=i.RG32UI),ce===i.BYTE&&(Ae=i.RG8I),ce===i.SHORT&&(Ae=i.RG16I),ce===i.INT&&(Ae=i.RG32I)),R===i.RGB&&ce===i.UNSIGNED_INT_5_9_9_9_REV&&(Ae=i.RGB9_E5),R===i.RGBA){const Lt=De?PC:Zn.getTransfer(Te);ce===i.FLOAT&&(Ae=i.RGBA32F),ce===i.HALF_FLOAT&&(Ae=i.RGBA16F),ce===i.UNSIGNED_BYTE&&(Ae=Lt===Oi?i.SRGB8_ALPHA8:i.RGBA8),ce===i.UNSIGNED_SHORT_4_4_4_4&&(Ae=i.RGBA4),ce===i.UNSIGNED_SHORT_5_5_5_1&&(Ae=i.RGB5_A1)}return(Ae===i.R16F||Ae===i.R32F||Ae===i.RG16F||Ae===i.RG32F||Ae===i.RGBA16F||Ae===i.RGBA32F)&&t.get("EXT_color_buffer_float"),Ae}function x(z,R){let ce;return z?null===R||R===vu||R===Km?ce=i.DEPTH24_STENCIL8:R===Ko?ce=i.DEPTH32F_STENCIL8:R===mb&&(ce=i.DEPTH24_STENCIL8,console.warn("DepthTexture: 16 bit depth attachment is not supported with stencil. Using 24-bit attachment.")):null===R||R===vu||R===Km?ce=i.DEPTH_COMPONENT24:R===Ko?ce=i.DEPTH_COMPONENT32F:R===mb&&(ce=i.DEPTH_COMPONENT16),ce}function C(z,R){return!0===v(z)||z.isFramebufferTexture&&z.minFilter!==gr&&z.minFilter!==or?Math.log2(Math.max(R.width,R.height))+1:void 0!==z.mipmaps&&z.mipmaps.length>0?z.mipmaps.length:z.isCompressedTexture&&Array.isArray(z.image)?R.mipmaps.length:1}function F(z){const R=z.target;R.removeEventListener("dispose",F),function k(z){const R=n.get(z);if(void 0===R.__webglInit)return;const ce=z.source,Te=p.get(ce);if(Te){const De=Te[R.__cacheKey];De.usedTimes--,0===De.usedTimes&&B(z),0===Object.keys(Te).length&&p.delete(ce)}n.remove(z)}(R),R.isVideoTexture&&d.delete(R)}function D(z){const R=z.target;R.removeEventListener("dispose",D),function T(z){const R=n.get(z);if(z.depthTexture&&z.depthTexture.dispose(),z.isWebGLCubeRenderTarget)for(let Te=0;Te<6;Te++){if(Array.isArray(R.__webglFramebuffer[Te]))for(let De=0;De0&&ce.__version!==z.version){const Te=z.image;if(null===Te)console.warn("THREE.WebGLRenderer: Texture marked for update but no image data found.");else{if(!1!==Te.complete)return void en(ce,z,R);console.warn("THREE.WebGLRenderer: Texture marked for update but image is incomplete")}}e.bindTexture(i.TEXTURE_2D,ce.__webglTexture,i.TEXTURE0+R)}const J={[Ql]:i.REPEAT,[Xi]:i.CLAMP_TO_EDGE,[fb]:i.MIRRORED_REPEAT},we={[gr]:i.NEAREST,[ok]:i.NEAREST_MIPMAP_NEAREST,[qm]:i.NEAREST_MIPMAP_LINEAR,[or]:i.LINEAR,[pb]:i.LINEAR_MIPMAP_NEAREST,[hl]:i.LINEAR_MIPMAP_LINEAR},Le={[Soe]:i.NEVER,[Roe]:i.ALWAYS,[Eoe]:i.LESS,[b4]:i.LEQUAL,[Aoe]:i.EQUAL,[Ioe]:i.GEQUAL,[Doe]:i.GREATER,[Toe]:i.NOTEQUAL};function je(z,R){if(R.type===Ko&&!1===t.has("OES_texture_float_linear")&&(R.magFilter===or||R.magFilter===pb||R.magFilter===qm||R.magFilter===hl||R.minFilter===or||R.minFilter===pb||R.minFilter===qm||R.minFilter===hl)&&console.warn("THREE.WebGLRenderer: Unable to use linear filtering with floating point textures. OES_texture_float_linear not supported on this device."),i.texParameteri(z,i.TEXTURE_WRAP_S,J[R.wrapS]),i.texParameteri(z,i.TEXTURE_WRAP_T,J[R.wrapT]),(z===i.TEXTURE_3D||z===i.TEXTURE_2D_ARRAY)&&i.texParameteri(z,i.TEXTURE_WRAP_R,J[R.wrapR]),i.texParameteri(z,i.TEXTURE_MAG_FILTER,we[R.magFilter]),i.texParameteri(z,i.TEXTURE_MIN_FILTER,we[R.minFilter]),R.compareFunction&&(i.texParameteri(z,i.TEXTURE_COMPARE_MODE,i.COMPARE_REF_TO_TEXTURE),i.texParameteri(z,i.TEXTURE_COMPARE_FUNC,Le[R.compareFunction])),!0===t.has("EXT_texture_filter_anisotropic")){if(R.magFilter===gr||R.minFilter!==qm&&R.minFilter!==hl||R.type===Ko&&!1===t.has("OES_texture_float_linear"))return;if(R.anisotropy>1||n.get(R).__currentAnisotropy){const ce=t.get("EXT_texture_filter_anisotropic");i.texParameterf(z,ce.TEXTURE_MAX_ANISOTROPY_EXT,Math.min(R.anisotropy,r.getMaxAnisotropy())),n.get(R).__currentAnisotropy=R.anisotropy}}}function Et(z,R){let ce=!1;void 0===z.__webglInit&&(z.__webglInit=!0,R.addEventListener("dispose",F));const Te=R.source;let De=p.get(Te);void 0===De&&(De={},p.set(Te,De));const Ae=function ne(z){const R=[];return R.push(z.wrapS),R.push(z.wrapT),R.push(z.wrapR||0),R.push(z.magFilter),R.push(z.minFilter),R.push(z.anisotropy),R.push(z.internalFormat),R.push(z.format),R.push(z.type),R.push(z.generateMipmaps),R.push(z.premultiplyAlpha),R.push(z.flipY),R.push(z.unpackAlignment),R.push(z.colorSpace),R.join()}(R);if(Ae!==z.__cacheKey){void 0===De[Ae]&&(De[Ae]={texture:i.createTexture(),usedTimes:0},o.memory.textures++,ce=!0),De[Ae].usedTimes++;const Lt=De[z.__cacheKey];void 0!==Lt&&(De[z.__cacheKey].usedTimes--,0===Lt.usedTimes&&B(R)),z.__cacheKey=Ae,z.__webglTexture=De[Ae].texture}return ce}function en(z,R,ce){let Te=i.TEXTURE_2D;(R.isDataArrayTexture||R.isCompressedArrayTexture)&&(Te=i.TEXTURE_2D_ARRAY),R.isData3DTexture&&(Te=i.TEXTURE_3D);const De=Et(z,R),Ae=R.source;e.bindTexture(Te,z.__webglTexture,i.TEXTURE0+ce);const Lt=n.get(Ae);if(Ae.version!==Lt.__version||!0===De){e.activeTexture(i.TEXTURE0+ce);const Je=Zn.getPrimaries(Zn.workingColorSpace),dt=R.colorSpace===yu?null:Zn.getPrimaries(R.colorSpace),bn=R.colorSpace===yu||Je===dt?i.NONE:i.BROWSER_DEFAULT_WEBGL;i.pixelStorei(i.UNPACK_FLIP_Y_WEBGL,R.flipY),i.pixelStorei(i.UNPACK_PREMULTIPLY_ALPHA_WEBGL,R.premultiplyAlpha),i.pixelStorei(i.UNPACK_ALIGNMENT,R.unpackAlignment),i.pixelStorei(i.UNPACK_COLORSPACE_CONVERSION_WEBGL,bn);let Ve=b(R.image,!1,r.maxTextureSize);Ve=nt(R,Ve);const ct=s.convert(R.format,R.colorSpace),Wn=s.convert(R.type);let mt,an=M(R.internalFormat,ct,Wn,R.colorSpace,R.isVideoTexture);je(Te,R);const _n=R.mipmaps,kn=!0!==R.isVideoTexture,Yi=void 0===Lt.__version||!0===De,Z=Ae.dataReady,He=C(R,Ve);if(R.isDepthTexture)an=x(R.format===Qm,R.type),Yi&&(kn?e.texStorage2D(i.TEXTURE_2D,1,an,Ve.width,Ve.height):e.texImage2D(i.TEXTURE_2D,0,an,Ve.width,Ve.height,0,ct,Wn,null));else if(R.isDataTexture)if(_n.length>0){kn&&Yi&&e.texStorage2D(i.TEXTURE_2D,He,an,_n[0].width,_n[0].height);for(let Ce=0,Ee=_n.length;Ce0){const Ke=yP(mt.width,mt.height,R.format,R.type);for(const tn of R.layerUpdates){const Qn=mt.data.subarray(tn*Ke/mt.data.BYTES_PER_ELEMENT,(tn+1)*Ke/mt.data.BYTES_PER_ELEMENT);e.compressedTexSubImage3D(i.TEXTURE_2D_ARRAY,Ce,0,0,tn,mt.width,mt.height,1,ct,Qn,0,0)}R.clearLayerUpdates()}else e.compressedTexSubImage3D(i.TEXTURE_2D_ARRAY,Ce,0,0,0,mt.width,mt.height,Ve.depth,ct,mt.data,0,0)}else e.compressedTexImage3D(i.TEXTURE_2D_ARRAY,Ce,an,mt.width,mt.height,Ve.depth,0,mt.data,0,0);else console.warn("THREE.WebGLRenderer: Attempt to load unsupported compressed texture format in .uploadTexture()");else kn?Z&&e.texSubImage3D(i.TEXTURE_2D_ARRAY,Ce,0,0,0,mt.width,mt.height,Ve.depth,ct,Wn,mt.data):e.texImage3D(i.TEXTURE_2D_ARRAY,Ce,an,mt.width,mt.height,Ve.depth,0,ct,Wn,mt.data)}else{kn&&Yi&&e.texStorage2D(i.TEXTURE_2D,He,an,_n[0].width,_n[0].height);for(let Ce=0,Ee=_n.length;Ce0){const Ce=yP(Ve.width,Ve.height,R.format,R.type);for(const Ee of R.layerUpdates){const Ke=Ve.data.subarray(Ee*Ce/Ve.data.BYTES_PER_ELEMENT,(Ee+1)*Ce/Ve.data.BYTES_PER_ELEMENT);e.texSubImage3D(i.TEXTURE_2D_ARRAY,0,0,0,Ee,Ve.width,Ve.height,1,ct,Wn,Ke)}R.clearLayerUpdates()}else e.texSubImage3D(i.TEXTURE_2D_ARRAY,0,0,0,0,Ve.width,Ve.height,Ve.depth,ct,Wn,Ve.data)}else e.texImage3D(i.TEXTURE_2D_ARRAY,0,an,Ve.width,Ve.height,Ve.depth,0,ct,Wn,Ve.data);else if(R.isData3DTexture)kn?(Yi&&e.texStorage3D(i.TEXTURE_3D,He,an,Ve.width,Ve.height,Ve.depth),Z&&e.texSubImage3D(i.TEXTURE_3D,0,0,0,0,Ve.width,Ve.height,Ve.depth,ct,Wn,Ve.data)):e.texImage3D(i.TEXTURE_3D,0,an,Ve.width,Ve.height,Ve.depth,0,ct,Wn,Ve.data);else if(R.isFramebufferTexture){if(Yi)if(kn)e.texStorage2D(i.TEXTURE_2D,He,an,Ve.width,Ve.height);else{let Ce=Ve.width,Ee=Ve.height;for(let Ke=0;Ke>=1,Ee>>=1}}else if(_n.length>0){if(kn&&Yi){const Ce=ft(_n[0]);e.texStorage2D(i.TEXTURE_2D,He,an,Ce.width,Ce.height)}for(let Ce=0,Ee=_n.length;Ce>Ae),ct=Math.max(1,R.height>>Ae);De===i.TEXTURE_3D||De===i.TEXTURE_2D_ARRAY?e.texImage3D(De,Ae,dt,Ve,ct,R.depth,0,Lt,Je,null):e.texImage2D(De,Ae,dt,Ve,ct,0,Lt,Je,null)}e.bindFramebuffer(i.FRAMEBUFFER,z),Me(R)?a.framebufferTexture2DMultisampleEXT(i.FRAMEBUFFER,Te,De,n.get(ce).__webglTexture,0,tt(R)):(De===i.TEXTURE_2D||De>=i.TEXTURE_CUBE_MAP_POSITIVE_X&&De<=i.TEXTURE_CUBE_MAP_NEGATIVE_Z)&&i.framebufferTexture2D(i.FRAMEBUFFER,Te,De,n.get(ce).__webglTexture,Ae),e.bindFramebuffer(i.FRAMEBUFFER,null)}function Ze(z,R,ce){if(i.bindRenderbuffer(i.RENDERBUFFER,z),R.depthBuffer){const Te=R.depthTexture,Ae=x(R.stencilBuffer,Te&&Te.isDepthTexture?Te.type:null),Lt=R.stencilBuffer?i.DEPTH_STENCIL_ATTACHMENT:i.DEPTH_ATTACHMENT,Je=tt(R);Me(R)?a.renderbufferStorageMultisampleEXT(i.RENDERBUFFER,Je,Ae,R.width,R.height):ce?i.renderbufferStorageMultisample(i.RENDERBUFFER,Je,Ae,R.width,R.height):i.renderbufferStorage(i.RENDERBUFFER,Ae,R.width,R.height),i.framebufferRenderbuffer(i.FRAMEBUFFER,Lt,i.RENDERBUFFER,z)}else{const Te=R.textures;for(let De=0;De0&&!0===t.has("WEBGL_multisampled_render_to_texture")&&!1!==R.__useRenderToTexture}function nt(z,R){const ce=z.colorSpace,Te=z.format,De=z.type;return!0===z.isCompressedTexture||!0===z.isVideoTexture||ce!==ds&&ce!==yu&&(Zn.getTransfer(ce)===Oi?(Te!==To||De!==Kc)&&console.warn("THREE.WebGLTextures: sRGB encoded textures have to use RGBAFormat and UnsignedByteType."):console.error("THREE.WebGLTextures: Unsupported texture color space:",ce)),R}function ft(z){return typeof HTMLImageElement<"u"&&z instanceof HTMLImageElement?(c.width=z.naturalWidth||z.width,c.height=z.naturalHeight||z.height):typeof VideoFrame<"u"&&z instanceof VideoFrame?(c.width=z.displayWidth,c.height=z.displayHeight):(c.width=z.width,c.height=z.height),c}this.allocateTextureUnit=function ie(){const z=A;return z>=r.maxTextures&&console.warn("THREE.WebGLTextures: Trying to use "+z+" texture units while this GPU supports only "+r.maxTextures),A+=1,z},this.resetTextureUnits=function $(){A=0},this.setTexture2D=se,this.setTexture2DArray=function ge(z,R){const ce=n.get(z);z.version>0&&ce.__version!==z.version?en(ce,z,R):e.bindTexture(i.TEXTURE_2D_ARRAY,ce.__webglTexture,i.TEXTURE0+R)},this.setTexture3D=function Y(z,R){const ce=n.get(z);z.version>0&&ce.__version!==z.version?en(ce,z,R):e.bindTexture(i.TEXTURE_3D,ce.__webglTexture,i.TEXTURE0+R)},this.setTextureCube=function re(z,R){const ce=n.get(z);z.version>0&&ce.__version!==z.version?function ae(z,R,ce){if(6!==R.image.length)return;const Te=Et(z,R),De=R.source;e.bindTexture(i.TEXTURE_CUBE_MAP,z.__webglTexture,i.TEXTURE0+ce);const Ae=n.get(De);if(De.version!==Ae.__version||!0===Te){e.activeTexture(i.TEXTURE0+ce);const Lt=Zn.getPrimaries(Zn.workingColorSpace),Je=R.colorSpace===yu?null:Zn.getPrimaries(R.colorSpace),dt=R.colorSpace===yu||Lt===Je?i.NONE:i.BROWSER_DEFAULT_WEBGL;i.pixelStorei(i.UNPACK_FLIP_Y_WEBGL,R.flipY),i.pixelStorei(i.UNPACK_PREMULTIPLY_ALPHA_WEBGL,R.premultiplyAlpha),i.pixelStorei(i.UNPACK_ALIGNMENT,R.unpackAlignment),i.pixelStorei(i.UNPACK_COLORSPACE_CONVERSION_WEBGL,dt);const bn=R.isCompressedTexture||R.image[0].isCompressedTexture,Ve=R.image[0]&&R.image[0].isDataTexture,ct=[];for(let Ee=0;Ee<6;Ee++)ct[Ee]=bn||Ve?Ve?R.image[Ee].image:R.image[Ee]:b(R.image[Ee],!0,r.maxCubemapSize),ct[Ee]=nt(R,ct[Ee]);const Wn=ct[0],an=s.convert(R.format,R.colorSpace),mt=s.convert(R.type),_n=M(R.internalFormat,an,mt,R.colorSpace),kn=!0!==R.isVideoTexture,Yi=void 0===Ae.__version||!0===Te,Z=De.dataReady;let Ce,He=C(R,Wn);if(je(i.TEXTURE_CUBE_MAP,R),bn){kn&&Yi&&e.texStorage2D(i.TEXTURE_CUBE_MAP,He,_n,Wn.width,Wn.height);for(let Ee=0;Ee<6;Ee++){Ce=ct[Ee].mipmaps;for(let Ke=0;Ke0&&He++;const Ee=ft(ct[0]);e.texStorage2D(i.TEXTURE_CUBE_MAP,He,_n,Ee.width,Ee.height)}for(let Ee=0;Ee<6;Ee++)if(Ve){kn?Z&&e.texSubImage2D(i.TEXTURE_CUBE_MAP_POSITIVE_X+Ee,0,0,0,ct[Ee].width,ct[Ee].height,an,mt,ct[Ee].data):e.texImage2D(i.TEXTURE_CUBE_MAP_POSITIVE_X+Ee,0,_n,ct[Ee].width,ct[Ee].height,0,an,mt,ct[Ee].data);for(let Ke=0;Ke1;if(Lt||(void 0===Te.__webglTexture&&(Te.__webglTexture=i.createTexture()),Te.__version=R.version,o.memory.textures++),Ae){ce.__webglFramebuffer=[];for(let Je=0;Je<6;Je++)if(R.mipmaps&&R.mipmaps.length>0){ce.__webglFramebuffer[Je]=[];for(let dt=0;dt0){ce.__webglFramebuffer=[];for(let Je=0;Je0&&!1===Me(z)){ce.__webglMultisampledFramebuffer=i.createFramebuffer(),ce.__webglColorRenderbuffer=[],e.bindFramebuffer(i.FRAMEBUFFER,ce.__webglMultisampledFramebuffer);for(let Je=0;Je0)for(let dt=0;dt0)for(let dt=0;dt0)if(!1===Me(z)){const R=z.textures,ce=z.width,Te=z.height;let De=i.COLOR_BUFFER_BIT;const Ae=z.stencilBuffer?i.DEPTH_STENCIL_ATTACHMENT:i.DEPTH_ATTACHMENT,Lt=n.get(z),Je=R.length>1;if(Je)for(let dt=0;dtm+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(vue)))}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 ea;n.matrixAutoUpdate=!1,n.visible=!1,t.joints[e.jointName]=n,t.add(n)}return t.joints[e.jointName]}}class xue{constructor(){this.texture=null,this.mesh=null,this.depthNear=0,this.depthFar=0}init(t,e,n){if(null===this.texture){const r=new Io;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}}getMesh(t){if(null!==this.texture&&null===this.mesh){const e=t.cameras[0].viewport,n=new gl({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:e.z},depthHeight:{value:e.w}}});this.mesh=new Nn(new sf(20,20),n)}return this.mesh}reset(){this.texture=null,this.mesh=null}getDepthTexture(){return this.texture}}class wue extends ng{constructor(t,e){super();const n=this;let r=null,s=1,o=null,a="local-floor",l=1,c=null,d=null,h=null,p=null,m=null,g=null;const b=new xue,v=e.getContextAttributes();let y=null,M=null;const x=[],C=[],F=new xe;let D=null;const k=new yr;k.layers.enable(1),k.viewport=new gi;const B=new yr;B.layers.enable(2),B.viewport=new gi;const T=[k,B],A=new _ue;A.layers.enable(1),A.layers.enable(2);let $=null,ie=null;function ne(ae){const Pe=C.indexOf(ae.inputSource);if(-1===Pe)return;const Ze=x[Pe];void 0!==Ze&&(Ze.update(ae.inputSource,ae.frame,c||o),Ze.dispatchEvent({type:ae.type,data:ae.inputSource}))}function se(){r.removeEventListener("select",ne),r.removeEventListener("selectstart",ne),r.removeEventListener("selectend",ne),r.removeEventListener("squeeze",ne),r.removeEventListener("squeezestart",ne),r.removeEventListener("squeezeend",ne),r.removeEventListener("end",se),r.removeEventListener("inputsourceschange",ge);for(let ae=0;ae=0&&(C[Oe]=null,x[Oe].disconnect(Ze))}for(let Pe=0;Pe=C.length){C.push(Ze),Oe=Mt;break}if(null===C[Mt]){C[Mt]=Ze,Oe=Mt;break}}if(-1===Oe)break}const yt=x[Oe];yt&&yt.connect(Ze)}}this.cameraAutoUpdate=!0,this.enabled=!1,this.isPresenting=!1,this.getController=function(ae){let Pe=x[ae];return void 0===Pe&&(Pe=new bP,x[ae]=Pe),Pe.getTargetRaySpace()},this.getControllerGrip=function(ae){let Pe=x[ae];return void 0===Pe&&(Pe=new bP,x[ae]=Pe),Pe.getGripSpace()},this.getHand=function(ae){let Pe=x[ae];return void 0===Pe&&(Pe=new bP,x[ae]=Pe),Pe.getHandSpace()},this.setFramebufferScaleFactor=function(ae){s=ae,!0===n.isPresenting&&console.warn("THREE.WebXRManager: Cannot change framebuffer scale while presenting.")},this.setReferenceSpaceType=function(ae){a=ae,!0===n.isPresenting&&console.warn("THREE.WebXRManager: Cannot change reference space type while presenting.")},this.getReferenceSpace=function(){return c||o},this.setReferenceSpace=function(ae){c=ae},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 ae=vt(function*(Pe){if(r=Pe,null!==r){if(y=t.getRenderTarget(),r.addEventListener("select",ne),r.addEventListener("selectstart",ne),r.addEventListener("selectend",ne),r.addEventListener("squeeze",ne),r.addEventListener("squeezestart",ne),r.addEventListener("squeezeend",ne),r.addEventListener("end",se),r.addEventListener("inputsourceschange",ge),!0!==v.xrCompatible&&(yield e.makeXRCompatible()),D=t.getPixelRatio(),t.getSize(F),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 bu(m.framebufferWidth,m.framebufferHeight,{format:To,type:Kc,colorSpace:t.outputColorSpace,stencilBuffer:v.stencil});else{let Ze=null,Oe=null,yt=null;v.depth&&(yt=v.stencil?e.DEPTH24_STENCIL8:e.DEPTH_COMPONENT24,Ze=v.stencil?Qm:Zm,Oe=v.stencil?Km:vu);const Mt={colorFormat:e.RGBA8,depthFormat:yt,scaleFactor:s};h=new XRWebGLBinding(r,e),p=h.createProjectionLayer(Mt),r.updateRenderState({layers:[p]}),t.setPixelRatio(1),t.setSize(p.textureWidth,p.textureHeight,!1),M=new bu(p.textureWidth,p.textureHeight,{format:To,type:Kc,depthTexture:new r5(p.textureWidth,p.textureHeight,Oe,void 0,void 0,void 0,void 0,void 0,void 0,Ze),stencilBuffer:v.stencil,colorSpace:t.outputColorSpace,samples:v.antialias?4:0,resolveDepthBuffer:!1===p.ignoreDepthValues})}M.isXRRenderTarget=!0,this.setFoveation(l),c=null,o=yield r.requestReferenceSpace(a),en.setContext(r),en.start(),n.isPresenting=!0,n.dispatchEvent({type:"sessionstart"})}});return function(Pe){return ae.apply(this,arguments)}}(),this.getEnvironmentBlendMode=function(){if(null!==r)return r.environmentBlendMode},this.getDepthTexture=function(){return b.getDepthTexture()};const Y=new O,re=new O;function we(ae,Pe){null===Pe?ae.matrixWorld.copy(ae.matrix):ae.matrixWorld.multiplyMatrices(Pe.matrixWorld,ae.matrix),ae.matrixWorldInverse.copy(ae.matrixWorld).invert()}this.updateCamera=function(ae){if(null===r)return;null!==b.texture&&(ae.near=b.depthNear,ae.far=b.depthFar),A.near=B.near=k.near=ae.near,A.far=B.far=k.far=ae.far,($!==A.near||ie!==A.far)&&(r.updateRenderState({depthNear:A.near,depthFar:A.far}),$=A.near,ie=A.far,k.near=$,k.far=ie,B.near=$,B.far=ie,k.updateProjectionMatrix(),B.updateProjectionMatrix(),ae.updateProjectionMatrix());const Pe=ae.parent,Ze=A.cameras;we(A,Pe);for(let Oe=0;Oe0&&(v.alphaTest.value=y.alphaTest);const M=t.get(y),x=M.envMap,C=M.envMapRotation;x&&(v.envMap.value=x,df.copy(C),df.x*=-1,df.y*=-1,df.z*=-1,x.isCubeTexture&&!1===x.isRenderTargetTexture&&(df.y*=-1,df.z*=-1),v.envMapRotation.value.setFromMatrix4(Mue.makeRotationFromEuler(df)),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,v.lightMapIntensity.value=y.lightMapIntensity,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,W4(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 d(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===Do&&v.clearcoatNormalScale.value.negate())),y.dispersion>0&&(v.dispersion.value=y.dispersion),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 Sue(i,t,e,n){let r={},s={},o=[];const a=i.getParameter(i.MAX_UNIFORM_BUFFER_BINDINGS);function m(M,x,C,F){const D=M.value,k=x+"_"+C;if(void 0===F[k])return F[k]="number"==typeof D||"boolean"==typeof D?D:D.clone(),!0;{const B=F[k];if("number"==typeof D||"boolean"==typeof D){if(B!==D)return F[k]=D,!0}else if(!1===B.equals(D))return B.copy(D),!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 k=0,B=x.length;k0&&(C+=16-D),M.__size=C,M.__cache={}}(M),C=function d(M){const x=function h(){for(let M=0;M0),qt=!!le.morphAttributes.position,ai=!!le.morphAttributes.normal,Fi=!!le.morphAttributes.color;let Qi=_u;de.toneMapped&&(null===k||!0===k.isXRRenderTarget)&&(Qi=x.toneMapping);const ia=le.morphAttributes.position||le.morphAttributes.normal||le.morphAttributes.color,ui=void 0!==ia?ia.length:0,At=nt.get(de),fs=v.state.lights;!0!==ae||!0!==Pe&&L===T||bn.setState(de,L,L===T&&de.id===B);let hi=!1;de.version===At.__version?(At.needsLights&&At.lightsStateVersion!==fs.state.version||At.outputColorSpace!==bt||te.isBatchedMesh&&!1===At.batching||!te.isBatchedMesh&&!0===At.batching||te.isBatchedMesh&&!0===At.batchingColor&&null===te.colorTexture||te.isBatchedMesh&&!1===At.batchingColor&&null!==te.colorTexture||te.isInstancedMesh&&!1===At.instancing||!te.isInstancedMesh&&!0===At.instancing||te.isSkinnedMesh&&!1===At.skinning||!te.isSkinnedMesh&&!0===At.skinning||te.isInstancedMesh&&!0===At.instancingColor&&null===te.instanceColor||te.isInstancedMesh&&!1===At.instancingColor&&null!==te.instanceColor||te.isInstancedMesh&&!0===At.instancingMorph&&null===te.morphTexture||te.isInstancedMesh&&!1===At.instancingMorph&&null!==te.morphTexture||At.envMap!==xt||!0===de.fog&&At.fog!==$e||void 0!==At.numClippingPlanes&&(At.numClippingPlanes!==bn.numPlanes||At.numIntersection!==bn.numIntersection)||At.vertexAlphas!==Yt||At.vertexTangents!==on||At.morphTargets!==qt||At.morphNormals!==ai||At.morphColors!==Fi||At.toneMapping!==Qi||At.morphTargetsCount!==ui)&&(hi=!0):(hi=!0,At.__version=de.version);let vl=At.currentProgram;!0===hi&&(vl=_E(de,K,te));let Wg=!1,ra=!1,$O=!1;const xr=vl.getUniforms(),Ou=At.uniforms;if(Me.useProgram(vl.program)&&(Wg=!0,ra=!0,$O=!0),de.id!==B&&(B=de.id,ra=!0),Wg||T!==L){xr.setValue(N,"projectionMatrix",L.projectionMatrix),xr.setValue(N,"viewMatrix",L.matrixWorldInverse);const Fa=xr.map.cameraPosition;void 0!==Fa&&Fa.setValue(N,Oe.setFromMatrixPosition(L.matrixWorld)),tt.logarithmicDepthBuffer&&xr.setValue(N,"logDepthBufFC",2/(Math.log(L.far+1)/Math.LN2)),(de.isMeshPhongMaterial||de.isMeshToonMaterial||de.isMeshLambertMaterial||de.isMeshBasicMaterial||de.isMeshStandardMaterial||de.isShaderMaterial)&&xr.setValue(N,"isOrthographic",!0===L.isOrthographicCamera),T!==L&&(T=L,ra=!0,$O=!0)}if(te.isSkinnedMesh){xr.setOptional(N,te,"bindMatrix"),xr.setOptional(N,te,"bindMatrixInverse");const Fa=te.skeleton;Fa&&(null===Fa.boneTexture&&Fa.computeBoneTexture(),xr.setValue(N,"boneTexture",Fa.boneTexture,ft))}te.isBatchedMesh&&(xr.setOptional(N,te,"batchingTexture"),xr.setValue(N,"batchingTexture",te._matricesTexture,ft),xr.setOptional(N,te,"batchingIdTexture"),xr.setValue(N,"batchingIdTexture",te._indirectTexture,ft),xr.setOptional(N,te,"batchingColorTexture"),null!==te._colorsTexture&&xr.setValue(N,"batchingColorTexture",te._colorsTexture,ft));const WO=le.morphAttributes;if((void 0!==WO.position||void 0!==WO.normal||void 0!==WO.color)&&Wn.update(te,le,vl),(ra||At.receiveShadow!==te.receiveShadow)&&(At.receiveShadow=te.receiveShadow,xr.setValue(N,"receiveShadow",te.receiveShadow)),de.isMeshGouraudMaterial&&null!==de.envMap&&(Ou.envMap.value=xt,Ou.flipEnvMap.value=xt.isCubeTexture&&!1===xt.isRenderTargetTexture?-1:1),de.isMeshStandardMaterial&&null===de.envMap&&null!==K.environment&&(Ou.envMapIntensity.value=K.environmentIntensity),ra&&(xr.setValue(N,"toneMappingExposure",x.toneMappingExposure),At.needsLights&&function Sve(L,K){L.ambientLightColor.needsUpdate=K,L.lightProbe.needsUpdate=K,L.directionalLights.needsUpdate=K,L.directionalLightShadows.needsUpdate=K,L.pointLights.needsUpdate=K,L.pointLightShadows.needsUpdate=K,L.spotLights.needsUpdate=K,L.spotLightShadows.needsUpdate=K,L.rectAreaLights.needsUpdate=K,L.hemisphereLights.needsUpdate=K}(Ou,$O),$e&&!0===de.fog&&Lt.refreshFogUniforms(Ou,$e),Lt.refreshMaterialUniforms(Ou,de,re,Y,v.state.transmissionRenderTarget[L.id]),aS.upload(N,u$(At),Ou,ft)),de.isShaderMaterial&&!0===de.uniformsNeedUpdate&&(aS.upload(N,u$(At),Ou,ft),de.uniformsNeedUpdate=!1),de.isSpriteMaterial&&xr.setValue(N,"center",te.center),xr.setValue(N,"modelViewMatrix",te.modelViewMatrix),xr.setValue(N,"normalMatrix",te.normalMatrix),xr.setValue(N,"modelMatrix",te.matrixWorld),de.isShaderMaterial||de.isRawShaderMaterial){const Fa=de.uniformsGroups;for(let jO=0,Ave=Fa.length;jO{function $e(){de.forEach(function(rt){nt.get(rt).currentProgram.isReady()&&de.delete(rt)}),0!==de.size?setTimeout($e,10):te(L)}null!==Fe.get("KHR_parallel_shader_compile")?$e():setTimeout($e,10)})};let di=null;function rc(){If.stop()}function a$(){If.start()}const If=new X4;function GO(L,K,le,de){if(!1===L.visible)return;if(L.layers.test(K.layers))if(L.isGroup)le=L.renderOrder;else if(L.isLOD)!0===L.autoUpdate&&L.update(K);else if(L.isLight)v.pushLight(L),L.castShadow&&v.pushShadow(L);else if(L.isSprite){if(!L.frustumCulled||en.intersectsSprite(L)){de&&yt.setFromMatrixPosition(L.matrixWorld).applyMatrix4(Ze);const rt=De.update(L),bt=L.material;bt.visible&&b.push(L,rt,bt,le,yt.z,null)}}else if((L.isMesh||L.isLine||L.isPoints)&&(!L.frustumCulled||en.intersectsObject(L))){const rt=De.update(L),bt=L.material;if(de&&(void 0!==L.boundingSphere?(null===L.boundingSphere&&L.computeBoundingSphere(),yt.copy(L.boundingSphere.center)):(null===rt.boundingSphere&&rt.computeBoundingSphere(),yt.copy(rt.boundingSphere.center)),yt.applyMatrix4(L.matrixWorld).applyMatrix4(Ze)),Array.isArray(bt)){const xt=rt.groups;for(let Yt=0,on=xt.length;Yt0&&gE(te,K,le),$e.length>0&&gE($e,K,le),rt.length>0&&gE(rt,K,le),Me.buffers.depth.setTest(!0),Me.buffers.depth.setMask(!0),Me.buffers.color.setMask(!0),Me.setPolygonOffset(!1)}function c$(L,K,le,de){if(null!==(!0===le.isScene?le.overrideMaterial:null))return;void 0===v.state.transmissionRenderTarget[de.id]&&(v.state.transmissionRenderTarget[de.id]=new bu(1,1,{generateMipmaps:!0,type:Fe.has("EXT_color_buffer_half_float")||Fe.has("EXT_color_buffer_float")?Xm:Kc,minFilter:hl,samples:4,stencilBuffer:s,resolveDepthBuffer:!1,resolveStencilBuffer:!1,colorSpace:Zn.workingColorSpace}));const $e=v.state.transmissionRenderTarget[de.id],rt=de.viewport||A;$e.setSize(rt.z,rt.w);const bt=x.getRenderTarget();x.setRenderTarget($e),x.getClearColor(ne),se=x.getClearAlpha(),se<1&&x.setClearColor(16777215,.5),x.clear(),wt&&ct.render(le);const xt=x.toneMapping;x.toneMapping=_u;const Yt=de.viewport;if(void 0!==de.viewport&&(de.viewport=void 0),v.setupLightsView(de),!0===ae&&bn.setGlobalState(x.clippingPlanes,de),gE(L,le,de),ft.updateMultisampleRenderTarget($e),ft.updateRenderTargetMipmap($e),!1===Fe.has("WEBGL_multisampled_render_to_texture")){let on=!1;for(let qt=0,ai=K.length;qt0)for(let rt=0,bt=$e.length;rt0&&c$(de,te,L,K),wt&&ct.render(L),l$(b,L,K);null!==k&&(ft.updateMultisampleRenderTarget(k),ft.updateRenderTargetMipmap(k)),!0===L.isScene&&L.onAfterRender(x,L,K),kn.resetDefaultState(),B=-1,T=null,M.pop(),M.length>0?(v=M[M.length-1],!0===ae&&bn.setGlobalState(x.clippingPlanes,v.state.camera)):v=null,y.pop(),b=y.length>0?y[y.length-1]:null},this.getActiveCubeFace=function(){return F},this.getActiveMipmapLevel=function(){return D},this.getRenderTarget=function(){return k},this.setRenderTargetTextures=function(L,K,le){nt.get(L.texture).__webglTexture=K,nt.get(L.depthTexture).__webglTexture=le;const de=nt.get(L);de.__hasExternalTextures=!0,de.__autoAllocateDepthBuffer=void 0===le,de.__autoAllocateDepthBuffer||!0===Fe.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(L,K){const le=nt.get(L);le.__webglFramebuffer=K,le.__useDefaultFramebuffer=void 0===K},this.setRenderTarget=function(L,K=0,le=0){k=L,F=K,D=le;let de=!0,te=null,$e=!1,rt=!1;if(L){const xt=nt.get(L);void 0!==xt.__useDefaultFramebuffer?(Me.bindFramebuffer(N.FRAMEBUFFER,null),de=!1):void 0===xt.__webglFramebuffer?ft.setupRenderTarget(L):xt.__hasExternalTextures&&ft.rebindTextures(L,nt.get(L.texture).__webglTexture,nt.get(L.depthTexture).__webglTexture);const Yt=L.texture;(Yt.isData3DTexture||Yt.isDataArrayTexture||Yt.isCompressedArrayTexture)&&(rt=!0);const on=nt.get(L).__webglFramebuffer;L.isWebGLCubeRenderTarget?(te=Array.isArray(on[K])?on[K][le]:on[K],$e=!0):te=L.samples>0&&!1===ft.useMultisampledRTT(L)?nt.get(L).__webglMultisampledFramebuffer:Array.isArray(on)?on[le]:on,A.copy(L.viewport),$.copy(L.scissor),ie=L.scissorTest}else A.copy(Le).multiplyScalar(re).floor(),$.copy(je).multiplyScalar(re).floor(),ie=Et;if(Me.bindFramebuffer(N.FRAMEBUFFER,te)&&de&&Me.drawBuffers(L,te),Me.viewport(A),Me.scissor($),Me.setScissorTest(ie),$e){const xt=nt.get(L.texture);N.framebufferTexture2D(N.FRAMEBUFFER,N.COLOR_ATTACHMENT0,N.TEXTURE_CUBE_MAP_POSITIVE_X+K,xt.__webglTexture,le)}else if(rt){const xt=nt.get(L.texture);N.framebufferTextureLayer(N.FRAMEBUFFER,N.COLOR_ATTACHMENT0,xt.__webglTexture,le||0,K||0)}B=-1},this.readRenderTargetPixels=function(L,K,le,de,te,$e,rt){if(!L||!L.isWebGLRenderTarget)return void console.error("THREE.WebGLRenderer.readRenderTargetPixels: renderTarget is not THREE.WebGLRenderTarget.");let bt=nt.get(L).__webglFramebuffer;if(L.isWebGLCubeRenderTarget&&void 0!==rt&&(bt=bt[rt]),bt){Me.bindFramebuffer(N.FRAMEBUFFER,bt);try{const xt=L.texture,Yt=xt.format,on=xt.type;if(!tt.textureFormatReadable(Yt))return void console.error("THREE.WebGLRenderer.readRenderTargetPixels: renderTarget is not in RGBA or implementation defined format.");if(!tt.textureTypeReadable(on))return void console.error("THREE.WebGLRenderer.readRenderTargetPixels: renderTarget is not in UnsignedByteType or implementation defined type.");K>=0&&K<=L.width-de&&le>=0&&le<=L.height-te&&N.readPixels(K,le,de,te,_n.convert(Yt),_n.convert(on),$e)}finally{const xt=null!==k?nt.get(k).__webglFramebuffer:null;Me.bindFramebuffer(N.FRAMEBUFFER,xt)}}},this.readRenderTargetPixelsAsync=function(){var L=vt(function*(K,le,de,te,$e,rt,bt){if(!K||!K.isWebGLRenderTarget)throw new Error("THREE.WebGLRenderer.readRenderTargetPixels: renderTarget is not THREE.WebGLRenderTarget.");let xt=nt.get(K).__webglFramebuffer;if(K.isWebGLCubeRenderTarget&&void 0!==bt&&(xt=xt[bt]),xt){Me.bindFramebuffer(N.FRAMEBUFFER,xt);try{const Yt=K.texture,on=Yt.format,qt=Yt.type;if(!tt.textureFormatReadable(on))throw new Error("THREE.WebGLRenderer.readRenderTargetPixelsAsync: renderTarget is not in RGBA or implementation defined format.");if(!tt.textureTypeReadable(qt))throw new Error("THREE.WebGLRenderer.readRenderTargetPixelsAsync: renderTarget is not in UnsignedByteType or implementation defined type.");if(le>=0&&le<=K.width-te&&de>=0&&de<=K.height-$e){const ai=N.createBuffer();N.bindBuffer(N.PIXEL_PACK_BUFFER,ai),N.bufferData(N.PIXEL_PACK_BUFFER,rt.byteLength,N.STREAM_READ),N.readPixels(le,de,te,$e,_n.convert(on),_n.convert(qt),0),N.flush();const Fi=N.fenceSync(N.SYNC_GPU_COMMANDS_COMPLETE,0);yield function Zoe(i,t,e){return new Promise(function(n,r){setTimeout(function s(){switch(i.clientWaitSync(t,i.SYNC_FLUSH_COMMANDS_BIT,0)){case i.WAIT_FAILED:r();break;case i.TIMEOUT_EXPIRED:setTimeout(s,e);break;default:n()}},e)})}(N,Fi,4);try{N.bindBuffer(N.PIXEL_PACK_BUFFER,ai),N.getBufferSubData(N.PIXEL_PACK_BUFFER,0,rt)}finally{N.deleteBuffer(ai),N.deleteSync(Fi)}return rt}}finally{const Yt=null!==k?nt.get(k).__webglFramebuffer:null;Me.bindFramebuffer(N.FRAMEBUFFER,Yt)}}});return function(K,le,de,te,$e,rt,bt){return L.apply(this,arguments)}}(),this.copyFramebufferToTexture=function(L,K=null,le=0){!0!==L.isTexture&&(sg("WebGLRenderer: copyFramebufferToTexture function signature has changed."),K=arguments[0]||null,L=arguments[1]);const de=Math.pow(2,-le),te=Math.floor(L.image.width*de),$e=Math.floor(L.image.height*de),rt=null!==K?K.x:0,bt=null!==K?K.y:0;ft.setTexture2D(L,0),N.copyTexSubImage2D(N.TEXTURE_2D,le,0,0,rt,bt,te,$e),Me.unbindTexture()},this.copyTextureToTexture=function(L,K,le=null,de=null,te=0){let $e,rt,bt,xt,Yt,on;!0!==L.isTexture&&(sg("WebGLRenderer: copyTextureToTexture function signature has changed."),de=arguments[0]||null,L=arguments[1],K=arguments[2],te=arguments[3]||0,le=null),null!==le?($e=le.max.x-le.min.x,rt=le.max.y-le.min.y,bt=le.min.x,xt=le.min.y):($e=L.image.width,rt=L.image.height,bt=0,xt=0),null!==de?(Yt=de.x,on=de.y):(Yt=0,on=0);const qt=_n.convert(K.format),ai=_n.convert(K.type);ft.setTexture2D(K,0),N.pixelStorei(N.UNPACK_FLIP_Y_WEBGL,K.flipY),N.pixelStorei(N.UNPACK_PREMULTIPLY_ALPHA_WEBGL,K.premultiplyAlpha),N.pixelStorei(N.UNPACK_ALIGNMENT,K.unpackAlignment);const Fi=N.getParameter(N.UNPACK_ROW_LENGTH),Qi=N.getParameter(N.UNPACK_IMAGE_HEIGHT),ia=N.getParameter(N.UNPACK_SKIP_PIXELS),ui=N.getParameter(N.UNPACK_SKIP_ROWS),At=N.getParameter(N.UNPACK_SKIP_IMAGES),fs=L.isCompressedTexture?L.mipmaps[te]:L.image;N.pixelStorei(N.UNPACK_ROW_LENGTH,fs.width),N.pixelStorei(N.UNPACK_IMAGE_HEIGHT,fs.height),N.pixelStorei(N.UNPACK_SKIP_PIXELS,bt),N.pixelStorei(N.UNPACK_SKIP_ROWS,xt),L.isDataTexture?N.texSubImage2D(N.TEXTURE_2D,te,Yt,on,$e,rt,qt,ai,fs.data):L.isCompressedTexture?N.compressedTexSubImage2D(N.TEXTURE_2D,te,Yt,on,fs.width,fs.height,qt,fs.data):N.texSubImage2D(N.TEXTURE_2D,te,Yt,on,$e,rt,qt,ai,fs),N.pixelStorei(N.UNPACK_ROW_LENGTH,Fi),N.pixelStorei(N.UNPACK_IMAGE_HEIGHT,Qi),N.pixelStorei(N.UNPACK_SKIP_PIXELS,ia),N.pixelStorei(N.UNPACK_SKIP_ROWS,ui),N.pixelStorei(N.UNPACK_SKIP_IMAGES,At),0===te&&K.generateMipmaps&&N.generateMipmap(N.TEXTURE_2D),Me.unbindTexture()},this.copyTextureToTexture3D=function(L,K,le=null,de=null,te=0){let $e,rt,bt,xt,Yt,on,qt,ai,Fi;!0!==L.isTexture&&(sg("WebGLRenderer: copyTextureToTexture3D function signature has changed."),le=arguments[0]||null,de=arguments[1]||null,L=arguments[2],K=arguments[3],te=arguments[4]||0);const Qi=L.isCompressedTexture?L.mipmaps[te]:L.image;null!==le?($e=le.max.x-le.min.x,rt=le.max.y-le.min.y,bt=le.max.z-le.min.z,xt=le.min.x,Yt=le.min.y,on=le.min.z):($e=Qi.width,rt=Qi.height,bt=Qi.depth,xt=0,Yt=0,on=0),null!==de?(qt=de.x,ai=de.y,Fi=de.z):(qt=0,ai=0,Fi=0);const ia=_n.convert(K.format),ui=_n.convert(K.type);let At;if(K.isData3DTexture)ft.setTexture3D(K,0),At=N.TEXTURE_3D;else{if(!K.isDataArrayTexture&&!K.isCompressedArrayTexture)return void console.warn("THREE.WebGLRenderer.copyTextureToTexture3D: only supports THREE.DataTexture3D and THREE.DataTexture2DArray.");ft.setTexture2DArray(K,0),At=N.TEXTURE_2D_ARRAY}N.pixelStorei(N.UNPACK_FLIP_Y_WEBGL,K.flipY),N.pixelStorei(N.UNPACK_PREMULTIPLY_ALPHA_WEBGL,K.premultiplyAlpha),N.pixelStorei(N.UNPACK_ALIGNMENT,K.unpackAlignment);const fs=N.getParameter(N.UNPACK_ROW_LENGTH),hi=N.getParameter(N.UNPACK_IMAGE_HEIGHT),vl=N.getParameter(N.UNPACK_SKIP_PIXELS),Wg=N.getParameter(N.UNPACK_SKIP_ROWS),ra=N.getParameter(N.UNPACK_SKIP_IMAGES);N.pixelStorei(N.UNPACK_ROW_LENGTH,Qi.width),N.pixelStorei(N.UNPACK_IMAGE_HEIGHT,Qi.height),N.pixelStorei(N.UNPACK_SKIP_PIXELS,xt),N.pixelStorei(N.UNPACK_SKIP_ROWS,Yt),N.pixelStorei(N.UNPACK_SKIP_IMAGES,on),L.isDataTexture||L.isData3DTexture?N.texSubImage3D(At,te,qt,ai,Fi,$e,rt,bt,ia,ui,Qi.data):K.isCompressedArrayTexture?N.compressedTexSubImage3D(At,te,qt,ai,Fi,$e,rt,bt,ia,Qi.data):N.texSubImage3D(At,te,qt,ai,Fi,$e,rt,bt,ia,ui,Qi),N.pixelStorei(N.UNPACK_ROW_LENGTH,fs),N.pixelStorei(N.UNPACK_IMAGE_HEIGHT,hi),N.pixelStorei(N.UNPACK_SKIP_PIXELS,vl),N.pixelStorei(N.UNPACK_SKIP_ROWS,Wg),N.pixelStorei(N.UNPACK_SKIP_IMAGES,ra),0===te&&K.generateMipmaps&&N.generateMipmap(At),Me.unbindTexture()},this.initRenderTarget=function(L){void 0===nt.get(L).__webglFramebuffer&&ft.setupRenderTarget(L)},this.initTexture=function(L){L.isCubeTexture?ft.setTextureCube(L,0):L.isData3DTexture?ft.setTexture3D(L,0):L.isDataArrayTexture||L.isCompressedArrayTexture?ft.setTexture2DArray(L,0):ft.setTexture2D(L,0),Me.unbindTexture()},this.resetState=function(){F=0,D=0,k=null,Me.reset(),kn.reset()},typeof __THREE_DEVTOOLS__<"u"&&__THREE_DEVTOOLS__.dispatchEvent(new CustomEvent("observe",{detail:this}))}get coordinateSystem(){return Zc}get outputColorSpace(){return this._outputColorSpace}set outputColorSpace(t){this._outputColorSpace=t;const e=this.getContext();e.drawingBufferColorSpace=t===Hk?"display-p3":"srgb",e.unpackColorSpace=Zn.workingColorSpace===kC?"display-p3":"srgb"}}class Tb extends Or{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 ed,this.environmentIntensity=1,this.environmentRotation=new ed,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 MP{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=Zo()}onUploadCallback(){}set needsUpdate(t){!0===t&&this.version++}get updateRange(){return sg("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;r0){const r=e[n[0]];if(void 0!==r){this.morphTargetInfluences=[],this.morphTargetDictionary={};for(let s=0,o=r.length;sn)return;RP.applyMatrix4(i.matrixWorld);const l=t.ray.origin.distanceTo(RP);return lt.far?void 0:{distance:l,point:W5.clone().applyMatrix4(i.matrixWorld),index:r,face:null,faceIndex:null,object:i}}const j5=new O,Y5=new O;class Pg extends ff{constructor(t,e){super(t,e),this.isLineSegments=!0,this.type="LineSegments"}computeLineDistances(){const t=this.geometry;if(null===t.index){const e=t.attributes.position,n=[];for(let r=0,s=e.count;r0){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 d=n[r];return(r+(o-d)/(n[r+1]-d))/(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 xe:new O);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 O,r=[],s=[],o=[],a=new O,l=new Ft;for(let m=0;m<=t;m++)r[m]=this.getTangentAt(m/t,new O);s[0]=new O,o[0]=new O;let c=Number.MAX_VALUE;const d=Math.abs(r[0].x),h=Math.abs(r[0].y),p=Math.abs(r[0].z);d<=c&&(c=d,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(Ki(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(Ki(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 PP 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 xe){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(Z5(a,l.x,c.x,d.x,h.x),Z5(a,l.y,c.y,d.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]:(CS.subVectors(r[0],r[1]).add(r[0]),c=CS);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 d=c.getPoint(1);return this.currentPoint.copy(d),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 AS extends hn{constructor(t=[new xe(0,-.5),new xe(.5,0),new xe(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=Ki(r,0,2*Math.PI);const s=[],o=[],a=[],l=[],c=[],d=1/e,h=new O,p=new xe,m=new O,g=new O,b=new O;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*d*r,C=Math.sin(x),F=Math.cos(x);for(let D=0;D<=t.length-1;D++)h.x=t[D].x*C,h.y=t[D].y,h.z=t[D].x*F,o.push(h.x,h.y,h.z),p.x=M/e,p.y=D/(t.length-1),a.push(p.x,p.y),c.push(l[3*D+0]*C,l[3*D+1],l[3*D+0]*F)}for(let M=0;M0&&x(!0),e>0&&x(!1)),this.setIndex(d),this.setAttribute("position",new lt(h,3)),this.setAttribute("normal",new lt(p,3)),this.setAttribute("uv",new lt(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 TS 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 TS(t.radius,t.height,t.radialSegments,t.heightSegments,t.openEnded,t.thetaStart,t.thetaLength)}}class Gb 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 d=[],h=new O,p=new O,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 F=0;F<=e;F++){const D=F/e;h.x=-t*Math.cos(r+D*s)*Math.sin(o+x*a),h.y=t*Math.cos(o+x*a),h.z=t*Math.sin(r+D*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(D+C,1-x),M.push(c++)}d.push(M)}for(let y=0;y0)&&m.push(d[y][M+1],C,D),(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 dispersion(){return this._dispersion}set dispersion(t){this._dispersion>0!=t>0&&this.version++,this._dispersion=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.dispersion=t.dispersion,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 NS extends Ro{constructor(t){super(),this.isMeshPhongMaterial=!0,this.type="MeshPhongMaterial",this.color=new Ye(16777215),this.specular=new Ye(1118481),this.shininess=30,this.map=null,this.lightMap=null,this.lightMapIntensity=1,this.aoMap=null,this.aoMapIntensity=1,this.emissive=new Ye(0),this.emissiveIntensity=1,this.emissiveMap=null,this.bumpMap=null,this.bumpScale=1,this.normalMap=null,this.normalMapType=Kh,this.normalScale=new xe(1,1),this.displacementMap=null,this.displacementScale=1,this.displacementBias=0,this.specularMap=null,this.alphaMap=null,this.envMap=null,this.envMapRotation=new ed,this.combine=wC,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 _f(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 hG(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 ZP(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 QP(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 Wb{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 uG(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}}tc.prototype.TimeBufferType=Float32Array,tc.prototype.ValueBufferType=Float32Array,tc.prototype.DefaultInterpolation=_b;class Ng extends tc{constructor(t,e,n){super(t,e,n)}}Ng.prototype.ValueTypeName="bool",Ng.prototype.ValueBufferType=Array,Ng.prototype.DefaultInterpolation=gb,Ng.prototype.InterpolantFactoryMethodLinear=void 0,Ng.prototype.InterpolantFactoryMethodSmooth=void 0;class pG extends tc{}pG.prototype.ValueTypeName="color";class Bg extends tc{}Bg.prototype.ValueTypeName="number";class khe extends Wb{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 d=c+a;c!==d;c+=4)lo.slerpFlat(s,0,o,c-a,o,c,l);return s}}class Ug extends tc{InterpolantFactoryMethodLinear(t){return new khe(this.times,this.values,this.getValueSize(),t)}}Ug.prototype.ValueTypeName="quaternion",Ug.prototype.InterpolantFactoryMethodSmooth=void 0;class Vg extends tc{constructor(t,e,n){super(t,e,n)}}Vg.prototype.ValueTypeName="string",Vg.prototype.ValueBufferType=Array,Vg.prototype.DefaultInterpolation=gb,Vg.prototype.InterpolantFactoryMethodLinear=void 0,Vg.prototype.InterpolantFactoryMethodSmooth=void 0;class zg extends tc{}zg.prototype.ValueTypeName="vector";class jb{constructor(t="",e=-1,n=[],r=2500){this.name=t,this.tracks=n,this.duration=e,this.blendMode=r,this.uuid=Zo(),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(Ohe(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(tc.toJSON(n[s]));return r}static CreateFromMorphTargetSequence(t,e,n,r){const s=e.length,o=[];for(let a=0;a1){const h=d[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=[];QP(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:gG,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 ad={};class Fhe extends Error{constructor(t,e){super(t),this.response=e}}class Ia extends vf{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=Du.get(t);if(void 0!==s)return this.manager.itemStart(t),setTimeout(()=>{e&&e(s),this.manager.itemEnd(t)},0),s;if(void 0!==ad[t])return void ad[t].push({onLoad:e,onProgress:n,onError:r});ad[t]=[],ad[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 d=ad[t],h=c.body.getReader(),p=c.headers.get("X-File-Size")||c.headers.get("Content-Length"),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 F=new ProgressEvent("progress",{lengthComputable:g,loaded:b,total:m});for(let D=0,k=d.length;D{y.error(x)})}()}});return new Response(v)}throw new Fhe(`fetch for "${c.url}" responded with ${c.status}: ${c.statusText}`,c)}).then(c=>{switch(l){case"arraybuffer":return c.arrayBuffer();case"blob":return c.blob();case"document":return c.text().then(d=>(new DOMParser).parseFromString(d,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=>{Du.add(t,c);const d=ad[t];delete ad[t];for(let h=0,p=d.length;h{const d=ad[t];if(void 0===d)throw this.manager.itemError(t),c;delete ad[t];for(let h=0,p=d.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 BS extends vf{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=Du.get(t);if(void 0!==o)return s.manager.itemStart(t),setTimeout(function(){e&&e(o),s.manager.itemEnd(t)},0),o;const a=yb("img");function l(){d(),Du.add(t,this),e&&e(this),s.manager.itemEnd(t)}function c(h){d(),r&&r(h),s.manager.itemError(t),s.manager.itemEnd(t)}function d(){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 Hg extends vf{constructor(t){super(t)}load(t,e,n,r){const s=new Io,o=new BS(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 US extends Or{constructor(t,e=1){super(),this.isLight=!0,this.type="Light",this.color=new Ye(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()),void 0!==this.target&&(e.object.target=this.target.uuid),e}}const JP=new Ft,_G=new O,vG=new O;class eO{constructor(t){this.camera=t,this.intensity=1,this.bias=0,this.normalBias=0,this.radius=1,this.blurSamples=8,this.mapSize=new xe(512,512),this.map=null,this.mapPass=null,this.matrix=new Ft,this.autoUpdate=!0,this.needsUpdate=!1,this._frustum=new iS,this._frameExtents=new xe(1,1),this._viewportCount=1,this._viewports=[new gi(0,0,1,1)]}getViewportCount(){return this._viewportCount}getFrustum(){return this._frustum}updateMatrices(t){const e=this.camera,n=this.matrix;_G.setFromMatrixPosition(t.matrixWorld),e.position.copy(_G),vG.setFromMatrixPosition(t.target.matrixWorld),e.lookAt(vG),e.updateMatrixWorld(),JP.multiplyMatrices(e.projectionMatrix,e.matrixWorldInverse),this._frustum.setFromProjectionMatrix(JP),n.set(.5,0,0,.5,0,.5,0,.5,0,0,.5,.5,0,0,0,1),n.multiply(JP)}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.intensity=t.intensity,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 1!==this.intensity&&(t.intensity=this.intensity),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 Nhe extends eO{constructor(){super(new yr(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 yG extends US{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(Or.DEFAULT_UP),this.updateMatrix(),this.target=new Or,this.distance=n,this.angle=r,this.penumbra=s,this.decay=o,this.map=null,this.shadow=new Nhe}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 bG=new Ft,Yb=new O,tO=new O;class Bhe extends eO{constructor(){super(new yr(90,1,.5,500)),this.isPointLightShadow=!0,this._frameExtents=new xe(4,2),this._viewportCount=6,this._viewports=[new gi(2,1,1,1),new gi(0,1,1,1),new gi(3,1,1,1),new gi(1,1,1,1),new gi(3,0,1,1),new gi(1,0,1,1)],this._cubeDirections=[new O(1,0,0),new O(-1,0,0),new O(0,0,1),new O(0,0,-1),new O(0,1,0),new O(0,-1,0)],this._cubeUps=[new O(0,1,0),new O(0,1,0),new O(0,1,0),new O(0,1,0),new O(0,0,1),new O(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()),Yb.setFromMatrixPosition(t.matrixWorld),n.position.copy(Yb),tO.copy(n.position),tO.add(this._cubeDirections[e]),n.up.copy(this._cubeUps[e]),n.lookAt(tO),n.updateMatrixWorld(),r.makeTranslation(-Yb.x,-Yb.y,-Yb.z),bG.multiplyMatrices(n.projectionMatrix,n.matrixWorldInverse),this._frustum.setFromProjectionMatrix(bG)}}class xG extends US{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 Bhe}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 Uhe extends eO{constructor(){super(new Ab(-5,5,5,-5,.5,500)),this.isDirectionalLightShadow=!0}}class wG extends US{constructor(t,e){super(t,e),this.isDirectionalLight=!0,this.type="DirectionalLight",this.position.copy(Or.DEFAULT_UP),this.updateMatrix(),this.target=new Or,this.shadow=new Uhe}dispose(){this.shadow.dispose()}copy(t){return super.copy(t),this.target=t.target.clone(),this.shadow=t.shadow.clone(),this}}class nO extends US{constructor(t,e){super(t,e),this.isAmbientLight=!0,this.type="AmbientLight"}}class Tu{static decodeText(t){if(console.warn("THREE.LoaderUtils: decodeText() has been deprecated with r165 and will be removed with r175. Use TextDecoder instead."),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=Du.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 Du.add(t,c),e&&e(c),s.manager.itemEnd(t),c}).catch(function(c){r&&r(c),Du.remove(t),s.manager.itemError(t),s.manager.itemEnd(t)});Du.add(t,l),s.manager.itemStart(t)}}class DG{constructor(t=!0){this.autoStart=t,this.startTime=0,this.oldTime=0,this.elapsedTime=0,this.running=!1}start(){this.startTime=TG(),this.oldTime=this.startTime,this.elapsedTime=0,this.running=!0}stop(){this.getElapsedTime(),this.running=!1,this.autoStart=!1}getElapsedTime(){return this.getDelta(),this.elapsedTime}getDelta(){let t=0;if(this.autoStart&&!this.running)return this.start(),0;if(this.running){const e=TG();t=(e-this.oldTime)/1e3,this.oldTime=e,this.elapsedTime+=t}return t}}function TG(){return(typeof performance>"u"?Date:performance).now()}const rO="\\[\\]\\.:\\/",Khe=new RegExp("["+rO+"]","g"),sO="[^"+rO+"]",Zhe="[^"+rO.replace("\\.","")+"]",nfe=new RegExp("^"+/((?:WC+[\/:])*)/.source.replace("WC",sO)+/(WCOD+)?/.source.replace("WCOD",Zhe)+/(?:\.(WC+)(?:\[(.+)\])?)?/.source.replace("WC",sO)+/\.(WC+)(?:\[(.+)\])?/.source.replace("WC",sO)+"$"),ife=["material","materials","bones","map"];class rfe{constructor(t,e,n){const r=n||Ii.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 Ii=(()=>{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(Khe,"")}static parseTrackName(e){const n=nfe.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!==ife.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;an.name===t||n.userData.name===t);return e?(e.removeFromParent(),new nc(e)):null}getBoundings(){return(new Ns).setFromObject(this.nativeMesh)}clone(){return new nc(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 Nn&&this.disposeMesh(t)}),this.nativeMesh instanceof Nn&&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 cfe extends nc{get supportsFov(){return this.nativeCamera instanceof yr||"PerspectiveCamera"==this.nativeCamera.type}get fov(){return this.nativeCamera.fov||NaN}set fov(t){this.supportsFov&&(this.nativeCamera.fov=t,this.nativeCamera.updateProjectionMatrix())}constructor(t){super(t),this.nativeCamera=t}}class dfe extends Ise{createMaterial(t){let e={};t.color?e={color:t.color}:t.diffuse||(e={color:super.randomColor()});let n=t.shading||"unlit";switch(n){case"unlit":return new _r(Object.assign(Object.assign({},e),{map:t.diffuse||null}));case"standart":return new $b(Object.assign(Object.assign({},e),{map:t.diffuse||null}));case"phong":return new NS(Object.assign(Object.assign({},e),{map:t.diffuse||null}));case"wireframe":return new _r(Object.assign(Object.assign({},e),{wireframe:!0}));default:throw new Error(`"${n}" shading not implemented for three.js`)}}transformPrimitiveZUp(t){t.geometry.rotateX(Math.PI/2)}createPrimitive(t,e={}){var n,r,s,o;let a=null,l=this.createMaterial(e);switch(t.shape){case"PLANE":a=new Nn(new sf((null===(n=t.dimensions)||void 0===n?void 0:n.x)||1e4,(null===(r=t.dimensions)||void 0===r?void 0:r.y)||1e4,null===(s=t.segments)||void 0===s?void 0:s.x,null===(o=t.segments)||void 0===o?void 0:o.y),l);break;case"BOX":a=new Nn(new tf(...Be.spr(t.dimensions),...t.segments?Be.spr(t.segments):[]),l);break;case"CAPSULE":a=new Nn(new DS(t.radius,t.centersDistance,t.capSegments,t.radialSegments),l),this.transformPrimitiveZUp(a);break;case"CYLINDER":a=new Nn(new Og(t.radius,t.radius,t.height,t.radialSegments,t.heightSegments),l),this.transformPrimitiveZUp(a);break;case"CONE":a=new Nn(new TS(t.radius,t.height,t.radialSegments,t.heightSegments),l),this.transformPrimitiveZUp(a);break;case"SPHERE":a=new Nn(new Gb(t.radius,t.widthSegments,t.heightSegments),l),this.transformPrimitiveZUp(a);break;case"COMPOUND":a=new ea;for(const{position:d,rotation:h,shape:p}of t.children){const m=this.createPrimitive(p,e).nativeMesh;d&&m.position.set(...Be.spr(d)),h&&m.quaternion.set(...mr.spr(h)),a.add(m)}break;case"MESH":const c=new hn;c.setFromPoints(t.vertices.map(d=>new O(...Be.spr(d)))),c.setIndex(t.faces.reduce((d,h)=>(d.push(...h),d),[])),a=new Nn(c,l)}if(!a)throw new Error(`Primitive with shape "${t.shape}" not implemented`);return void 0!==e.castShadow&&(a.castShadow=e.castShadow),void 0!==e.receiveShadow&&(a.receiveShadow=e.receiveShadow),new nc(a)}createPerspectiveCamera(t={}){return new cfe(new yr(t.fov||75,t.aspectRatio||1,t.frustrum?t.frustrum.near:1,t.frustrum?t.frustrum.far:1e4))}}function jG(i,t){if(t===xoe)return console.warn("THREE.BufferGeometryUtils.toTrianglesDrawMode(): Geometry already defined as triangles."),i;if(t===zk||t===v4){let e=i.getIndex();if(null===e){const o=[],a=i.getAttribute("position");if(void 0===a)return console.error("THREE.BufferGeometryUtils.toTrianglesDrawMode(): Undefined position attribute. Processing not possible."),i;for(let l=0;l=2.0 are supported.")));const c=new $fe(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 d=0;d=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 hfe(){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 Bn={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_DISPERSION:"KHR_materials_dispersion",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 ffe{constructor(t){this.parser=t,this.name=Bn.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 Afe{constructor(t){this.parser=t,this.name=Bn.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 Dfe{constructor(t){this.parser=t,this.name=Bn.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 Tfe{constructor(t){this.name=Bn.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 d=r.count,h=r.byteStride,p=new Uint8Array(a,r.byteOffset||0,r.byteLength||0);return o.decodeGltfBufferAsync?o.decodeGltfBufferAsync(d,h,p,r.mode,r.filter).then(function(m){return m.buffer}):o.ready.then(function(){const m=new ArrayBuffer(d*h);return o.decodeGltfBuffer(new Uint8Array(m),d,h,p,r.mode,r.filter),m})})}return null}}class Ife{constructor(t){this.name=Bn.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!==Ra.TRIANGLES&&c.mode!==Ra.TRIANGLE_STRIP&&c.mode!==Ra.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(d=>(l[c]=d,l[c])));return a.length<1?null:(a.push(this.parser.createNodeMesh(t)),Promise.all(a).then(c=>{const d=c.pop(),h=d.isGroup?d.children:[d],p=c[0].count,m=[];for(const g of h){const b=new Ft,v=new O,y=new lo,M=new O(1,1,1),x=new z5(g.geometry,g.material,p);for(let C=0;C-1,o=s?a.match(/Firefox\/([0-9]+)\./)[1]:-1}this.textureLoader=typeof createImageBitmap>"u"||n&&r<17||s&&o<98?new Hg(this.options.manager):new jhe(this.options.manager),this.textureLoader.setCrossOrigin(this.options.crossOrigin),this.textureLoader.setRequestHeader(this.options.requestHeader),this.fileLoader=new Ia(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 Cf(s,a,r),ld(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,d]of o.children.entries())s(d,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(T,D[k*l+1]),l>=3&&v.setZ(T,D[k*l+2]),l>=4&&v.setW(T,D[k*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(d){d.flipY=!1,d.name=o.name||a.name||"",""===d.name&&"string"==typeof a.uri&&!1===a.uri.startsWith("data:image/")&&(d.name=a.uri);const p=(s.samplers||{})[o.sampler]||{};return d.magFilter=KG[p.magFilter]||or,d.minFilter=KG[p.minFilter]||hl,d.wrapS=ZG[p.wrapS]||Ql,d.wrapT=ZG[p.wrapT]||Ql,r.associations.set(d,{textures:t}),d}).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 d=Promise.resolve(l).then(function(h){return new Promise(function(p,m){let g=p;!0===e.isImageBitmapLoader&&(g=function(b){const v=new Io(b);v.needsUpdate=!0,p(v)}),e.load(Tu.resolveURL(h,s.path),g,void 0,m)})}).then(function(h){return!0===c&&a.revokeObjectURL(l),ld(h,o),h.userData.mimeType=o.mimeType||function Hfe(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]=d,d}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[Bn.KHR_TEXTURE_TRANSFORM]){const a=void 0!==n.extensions?n.extensions[Bn.KHR_TEXTURE_TRANSFORM]:void 0;if(a){const l=s.associations.get(o);o=s.extensions[Bn.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 pf,Ro.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 us,Ro.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 $b}loadMaterial(t){const e=this,r=this.extensions,s=this.json.materials[t];let o;const a={},c=[];if((s.extensions||{})[Bn.KHR_MATERIALS_UNLIT]){const h=r[Bn.KHR_MATERIALS_UNLIT];o=h.getMaterialType(),c.push(h.extendParams(a,s,e))}else{const h=s.pbrMetallicRoughness||{};if(a.color=new Ye(1,1,1),a.opacity=1,Array.isArray(h.baseColorFactor)){const p=h.baseColorFactor;a.color.setRGB(p[0],p[1],p[2],ds),a.opacity=p[3]}void 0!==h.baseColorTexture&&c.push(e.assignTexture(a,"map",h.baseColorTexture,cs)),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=Xo);const d=s.alphaMode||"OPAQUE";if("BLEND"===d?(a.transparent=!0,a.depthWrite=!1):(a.transparent=!1,"MASK"===d&&(a.alphaTest=void 0!==s.alphaCutoff?s.alphaCutoff:.5)),void 0!==s.normalTexture&&o!==_r&&(c.push(e.assignTexture(a,"normalMap",s.normalTexture)),a.normalScale=new xe(1,1),void 0!==s.normalTexture.scale)){const h=s.normalTexture.scale;a.normalScale.set(h,h)}if(void 0!==s.occlusionTexture&&o!==_r&&(c.push(e.assignTexture(a,"aoMap",s.occlusionTexture)),void 0!==s.occlusionTexture.strength&&(a.aoMapIntensity=s.occlusionTexture.strength)),void 0!==s.emissiveFactor&&o!==_r){const h=s.emissiveFactor;a.emissive=(new Ye).setRGB(h[0],h[1],h[2],ds)}return void 0!==s.emissiveTexture&&o!==_r&&c.push(e.assignTexture(a,"emissiveMap",s.emissiveTexture,cs)),Promise.all(c).then(function(){const h=new o(a);return s.name&&(h.name=s.name),ld(h,s),e.associations.set(h,{materials:t}),s.extensions&&Cf(r,h,s),h})}createUniqueName(t){const e=Ii.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[Bn.KHR_DRACO_MESH_COMPRESSION].decodePrimitive(a,e).then(function(l){return QG(l,a,e)})}const o=[];for(let a=0,l=t.length;a0&&Vfe(y,s),y.name=e.createUniqueName(s.name||"mesh_"+t),ld(y,s),v.extensions&&Cf(r,y,v),e.assignFinalMaterial(y),h.push(y)}for(let m=0,g=h.length;m1?new ea:1===c.length?c[0]:new Or,d!==c[0])for(let h=0,p=c.length;h{const h=new Map;for(const[p,m]of r.associations)(p instanceof Ro||p instanceof Io)&&h.set(p,m);return d.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(Ru[s.path]===Ru.weights?t.traverse(function(p){p.morphTargetInfluences&&l.push(p.name?p.name:p.uuid)}):l.push(a),Ru[s.path]){case Ru.weights:c=Bg;break;case Ru.rotation:c=Ug;break;case Ru.position:case Ru.scale:c=zg;break;default:c=1===n.itemSize?Bg:zg}const d=void 0!==r.interpolation?Nfe[r.interpolation]:_b,h=this._getArrayFromAccessor(n);for(let p=0,m=l.length;p{r.type.endsWith("Light")&&(console.warn("WORKAROUND: light intensity from GLB divided by 200."),r.intensity*=.005)}),new nc(n.scene)})}}const ho=(i,t)=>Array(i).fill(null).map((e,n)=>t(n));class Sf{static startDebugView(t,e){let n=this.activeDebugViews.get(t);return n?n.renderers.includes(e)||n.renderers.push(e):(n={view:new Sf(t),renderers:[e]},this.activeDebugViews.set(t,n)),n.view}static stopDebugView(t,e){const n=t.world,r=this.activeDebugViews.get(n);r&&(r.renderers=r.renderers.filter(s=>s!==e),0===r.renderers.length&&(r.view.dispose(),this.activeDebugViews.delete(n)))}constructor(t){this.world=t,this.debugScene=null,this.aSub=null,this.rSub=null,this.syncMap=new Map,this.debugScene=new Tb;const e=n=>{var r,s;const o=n.debugBodySettings;let c,l=this.lineSegmentPointsForShape(o.shape);c=l?new Pg((new hn).setFromPoints(l)):null===(r=this.world)||void 0===r?void 0:r.visualScene.factory.createPrimitive(o.shape,{shading:"wireframe",color:0}).nativeMesh,this.syncMap.set(n,c),null===(s=this.debugScene)||void 0===s||s.add(c)};for(const n of this.world.physicsWorld.children)e(n);this.aSub=this.world.physicsWorld.added$.subscribe(n=>e(n)),this.rSub=this.world.physicsWorld.removed$.subscribe(n=>{var r;const s=this.syncMap.get(n);s&&(this.syncMap.delete(n),null===(r=this.debugScene)||void 0===r||r.remove(s))})}get scene(){return this.debugScene}render(t,e){for(const[r,s]of this.syncMap.entries()){const o=r.debugBodySettings;if(o.ignoreTransform||(s.position.set(...Be.spr(r.position)),s.quaternion.set(...mr.spr(r.rotation))),s.material){let a=16777215;switch(o.type){case"RIGID_DYNAMIC":a=o.sleeping?255:16711680;break;case"RIGID_STATIC":a=65280;break;case"TRIGGER":a=16776960}s.material.color.set(a),s.material.needsUpdate=!0}}const n=t.autoClearColor;n&&(t.autoClearColor=!1),t.render(this.debugScene,e),n&&(t.autoClearColor=!0)}lineSegmentPointsForShape(t){if("BOX"===t.shape){const e=Be.scalarMult(t.dimensions,.5);return[...ho(8,n=>new O(n<4?e.x:-e.x,n%4<2?e.y:-e.y,n%2?e.z:-e.z)),...ho(8,n=>new O(n%2?e.x:-e.x,n<4?e.y:-e.y,n%4<2?e.z:-e.z)),...ho(8,n=>new O(n%4<2?e.x:-e.x,n%2?e.y:-e.y,n<4?e.z:-e.z))]}if("CYLINDER"===t.shape)return[...ho(32,e=>new O(t.radius*Math.sin(Math.floor((e+1)/2)*Math.PI/8),t.radius*Math.cos(Math.floor((e+1)/2)*Math.PI/8),-t.height/2)),...ho(32,e=>new O(t.radius*Math.sin(Math.floor((e+1)/2)*Math.PI/8),t.radius*Math.cos(Math.floor((e+1)/2)*Math.PI/8),t.height/2)),...ho(8,e=>new O(Math.floor(e/2)%2?0:e<4?t.radius:-t.radius,Math.floor(e/2)%2?e<4?t.radius:-t.radius:0,e%2?t.height/2:-t.height/2)),new O(0,0,-t.height/2),new O(0,0,t.height/2)];if("CONE"===t.shape)return[...ho(32,e=>new O(t.radius*Math.sin(Math.floor((e+1)/2)*Math.PI/8),t.radius*Math.cos(Math.floor((e+1)/2)*Math.PI/8),-t.height/2)),...ho(8,e=>new O(e%2||Math.floor(e/2)%2?0:e<4?t.radius:-t.radius,e%2?0:Math.floor(e/2)%2?e<4?t.radius:-t.radius:0,e%2?t.height/2:-t.height/2)),new O(0,0,-t.height/2),new O(0,0,t.height/2)];if("SPHERE"===t.shape)return[...ho(32,e=>new O(t.radius*Math.sin(Math.floor((e+1)/2)*Math.PI/8),t.radius*Math.cos(Math.floor((e+1)/2)*Math.PI/8),0)),...ho(32,e=>new O(t.radius*Math.sin(Math.floor((e+1)/2)*Math.PI/8),0,t.radius*Math.cos(Math.floor((e+1)/2)*Math.PI/8))),...ho(32,e=>new O(0,t.radius*Math.sin(Math.floor((e+1)/2)*Math.PI/8),t.radius*Math.cos(Math.floor((e+1)/2)*Math.PI/8)))];if("CAPSULE"===t.shape)return[...this.lineSegmentPointsForShape({shape:"CYLINDER",radius:t.radius,height:t.centersDistance}),...ho(16,e=>new O(t.radius*Math.cos(Math.floor((e+1)/2)*Math.PI/8),0,t.radius*Math.sin(Math.floor((e+1)/2)*Math.PI/8)+t.centersDistance/2)),...ho(16,e=>new O(t.radius*Math.cos(Math.floor((e+1)/2)*Math.PI/8),0,-t.radius*Math.sin(Math.floor((e+1)/2)*Math.PI/8)-t.centersDistance/2)),...ho(16,e=>new O(0,t.radius*Math.cos(Math.floor((e+1)/2)*Math.PI/8),t.radius*Math.sin(Math.floor((e+1)/2)*Math.PI/8)+t.centersDistance/2)),...ho(16,e=>new O(0,t.radius*Math.cos(Math.floor((e+1)/2)*Math.PI/8),-t.radius*Math.sin(Math.floor((e+1)/2)*Math.PI/8)-t.centersDistance/2))];if("CONVEX_HULL"===t.shape)return[...t.vertices.map(n=>[new O(n.x-.05,n.y,n.z),new O(n.x+.05,n.y,n.z),new O(n.x,n.y-.05,n.z),new O(n.x,n.y+.05,n.z),new O(n.x,n.y,n.z-.05),new O(n.x,n.y,n.z+.05)]).reduce((n,r)=>(n.push(...r),n),[])];if("COMPOUND"===t.shape){const e=[];for(const{position:n,shape:r,rotation:s}of t.children){let o=this.lineSegmentPointsForShape(r);if(!o)return null;e.push(...o.map(a=>new O(...Be.spr(Be.add(n||Be.O,Be.rot(a,s||mr.O))))))}return e}return null}dispose(){var t,e;this.debugScene=null,null===(t=this.aSub)||void 0===t||t.unsubscribe(),null===(e=this.rSub)||void 0===e||e.unsubscribe(),this.syncMap=new Map}}Sf.activeDebugViews=new Map;class JG extends bse{get physicsDebugViewActive(){return this._physicsDebugViewActive}set physicsDebugViewActive(t){this._physicsDebugViewActive!=t&&(this._physicsDebugViewActive=t,this.world&&(t?this.debugView=Sf.startDebugView(this.world,this):(Sf.stopDebugView(this.debugView,this),this.debugView=null)))}constructor(t,e,n,r={}){super(t,n,r),this.scene=t,this.camera=e,this.canvas=n,this.world=null,this.debugView=null,this._physicsDebugViewActive=!1,this.nativeRenderer=new Eue(Object.assign({canvas:n,alpha:this.rendererOptions.transparent},this.rendererOptions)),this.nativeRenderer.shadowMap.enabled=!0,this.nativeRenderer.setClearColor(this.rendererOptions.background),this.nativeRenderer.shadowMap.type=i4,this.nativeRenderer.setPixelRatio(this.rendererOptions.forceResolution||devicePixelRatio)}addToWorld(t){this.world=t,this.physicsDebugViewActive&&(this.debugView=Sf.startDebugView(this.world,this))}removeFromWorld(t){this.physicsDebugViewActive&&(Sf.stopDebugView(this.debugView,this),this.debugView=null),this.world=null}resizeRenderer(t){this.nativeRenderer.setSize(t.x,t.y),(this.camera.nativeCamera instanceof yr||"PerspectiveCamera"==this.camera.nativeCamera.type)&&Math.abs(this.camera.nativeCamera.aspect-t.x/t.y)>.01&&(this.camera.nativeCamera.aspect=t.x/t.y,this.camera.nativeCamera.updateProjectionMatrix())}render(){this.nativeRenderer.render(this.scene.nativeScene,this.camera.nativeCamera),this.physicsDebugViewActive&&this.debugView.render(this.nativeRenderer,this.camera.nativeCamera)}dispose(){this.camera.dispose(),this.nativeRenderer.clear(),this.nativeRenderer.dispose(),this.nativeRenderer.domElement=null}}const qfe={name:"CopyShader",uniforms:{tDiffuse:{value:null},opacity:{value:1}},vertexShader:"\n\n\t\tvarying vec2 vUv;\n\n\t\tvoid main() {\n\n\t\t\tvUv = uv;\n\t\t\tgl_Position = projectionMatrix * modelViewMatrix * vec4( position, 1.0 );\n\n\t\t}",fragmentShader:"\n\n\t\tuniform float opacity;\n\n\t\tuniform sampler2D tDiffuse;\n\n\t\tvarying vec2 vUv;\n\n\t\tvoid main() {\n\n\t\t\tvec4 texel = texture2D( tDiffuse, vUv );\n\t\t\tgl_FragColor = opacity * texel;\n\n\n\t\t}"};class YS{constructor(){this.isPass=!0,this.enabled=!0,this.needsSwap=!0,this.clear=!1,this.renderToScreen=!1}setSize(){}render(){console.error("THREE.Pass: .render() must be implemented in derived pass.")}dispose(){}}const Xfe=new Ab(-1,1,1,-1,0,1),Zfe=new class Kfe extends hn{constructor(){super(),this.setAttribute("position",new lt([-1,3,0,-1,-1,0,3,-1,0],3)),this.setAttribute("uv",new lt([0,2,0,0,2,0],2))}};class Qfe{constructor(t){this._mesh=new Nn(Zfe,t)}dispose(){this._mesh.geometry.dispose()}render(t){t.render(this._mesh,Xfe)}get material(){return this._mesh.material}set material(t){this._mesh.material=t}}class Jfe extends YS{constructor(t,e){super(),this.textureID=void 0!==e?e:"tDiffuse",t instanceof gl?(this.uniforms=t.uniforms,this.material=t):t&&(this.uniforms=j4.clone(t.uniforms),this.material=new gl({name:void 0!==t.name?t.name:"unspecified",defines:Object.assign({},t.defines),uniforms:this.uniforms,vertexShader:t.vertexShader,fragmentShader:t.fragmentShader})),this.fsQuad=new Qfe(this.material)}render(t,e,n){this.uniforms[this.textureID]&&(this.uniforms[this.textureID].value=n.texture),this.fsQuad.material=this.material,this.renderToScreen?(t.setRenderTarget(null),this.fsQuad.render(t)):(t.setRenderTarget(e),this.clear&&t.clear(t.autoClearColor,t.autoClearDepth,t.autoClearStencil),this.fsQuad.render(t))}dispose(){this.material.dispose(),this.fsQuad.dispose()}}class e8 extends YS{constructor(t,e){super(),this.scene=t,this.camera=e,this.clear=!0,this.needsSwap=!1,this.inverse=!1}render(t,e,n){const r=t.getContext(),s=t.state;let o,a;s.buffers.color.setMask(!1),s.buffers.depth.setMask(!1),s.buffers.color.setLocked(!0),s.buffers.depth.setLocked(!0),this.inverse?(o=0,a=1):(o=1,a=0),s.buffers.stencil.setTest(!0),s.buffers.stencil.setOp(r.REPLACE,r.REPLACE,r.REPLACE),s.buffers.stencil.setFunc(r.ALWAYS,o,4294967295),s.buffers.stencil.setClear(a),s.buffers.stencil.setLocked(!0),t.setRenderTarget(n),this.clear&&t.clear(),t.render(this.scene,this.camera),t.setRenderTarget(e),this.clear&&t.clear(),t.render(this.scene,this.camera),s.buffers.color.setLocked(!1),s.buffers.depth.setLocked(!1),s.buffers.color.setMask(!0),s.buffers.depth.setMask(!0),s.buffers.stencil.setLocked(!1),s.buffers.stencil.setFunc(r.EQUAL,1,4294967295),s.buffers.stencil.setOp(r.KEEP,r.KEEP,r.KEEP),s.buffers.stencil.setLocked(!0)}}class epe extends YS{constructor(){super(),this.needsSwap=!1}render(t){t.state.buffers.stencil.setLocked(!1),t.state.buffers.stencil.setTest(!1)}}class tpe{constructor(t,e){if(this.renderer=t,this._pixelRatio=t.getPixelRatio(),void 0===e){const n=t.getSize(new xe);this._width=n.width,this._height=n.height,(e=new bu(this._width*this._pixelRatio,this._height*this._pixelRatio,{type:Xm})).texture.name="EffectComposer.rt1"}else this._width=e.width,this._height=e.height;this.renderTarget1=e,this.renderTarget2=e.clone(),this.renderTarget2.texture.name="EffectComposer.rt2",this.writeBuffer=this.renderTarget1,this.readBuffer=this.renderTarget2,this.renderToScreen=!0,this.passes=[],this.copyPass=new Jfe(qfe),this.copyPass.material.blending=qc,this.clock=new DG}swapBuffers(){const t=this.readBuffer;this.readBuffer=this.writeBuffer,this.writeBuffer=t}addPass(t){this.passes.push(t),t.setSize(this._width*this._pixelRatio,this._height*this._pixelRatio)}insertPass(t,e){this.passes.splice(e,0,t),t.setSize(this._width*this._pixelRatio,this._height*this._pixelRatio)}removePass(t){const e=this.passes.indexOf(t);-1!==e&&this.passes.splice(e,1)}isLastEnabledPass(t){for(let e=t+1;e0?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;i8.fromArray(r,t),mO.fromArray(r,e),r8.fromArray(r,n),ka.subVectors(r8,mO),s8.subVectors(i8,mO),ka.cross(s8),ka.normalize(),s.push(ka.x,ka.y,ka.z),s.push(ka.x,ka.y,ka.z),s.push(ka.x,ka.y,ka.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 d=this.vertices.length;let h=this.parseVertexIndex(t,d),p=this.parseVertexIndex(e,d),m=this.parseVertexIndex(n,d);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?(qS.setRGB(parseFloat(h[4]),parseFloat(h[5]),parseFloat(h[6])).convertSRGBToLinear(),e.colors.push(qS.r,qS.g,qS.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"===d){const p=c.slice(1).trim().split(n8),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 ea;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 lt(d.normals,3)),d.colors.length>0&&(g=!0,b.setAttribute("color",new lt(d.colors,3))),!0===d.hasUVIndices&&b.setAttribute("uv",new lt(d.uvs,2));const v=[];for(let M=0,x=h.length;M1){for(let M=0,x=h.length;M0){const a=new pf({size:1,sizeAttenuation:!1}),l=new hn;l.setAttribute("position",new lt(e.vertices,3)),e.colors.length>0&&void 0!==e.colors[0]&&(l.setAttribute("color",new lt(e.colors,3)),a.vertexColors=!0);const c=new Nb(l,a);s.add(c)}return s}}class o8 extends vf{constructor(t){super(t)}load(t,e,n,r){const s=this,o=""===this.path?Tu.extractUrlBase(t):this.path,a=new Ia(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,d):c;h=h.toLowerCase();let p=d>=0?c.substring(d+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 dpe(this.resourcePath||e,this.materialOptions);return a.setCrossOrigin(this.crossOrigin),a.setManager(this.manager),a.setMaterials(o),a}}class dpe{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),d=e.loadTexture(function s(a,l){return"string"!=typeof l||""===l?"":/^https?:\/\//i.test(l)?l:a+l}(e.baseUrl,c.url));d.repeat.copy(c.scale),d.offset.copy(c.offset),d.wrapS=e.wrap,d.wrapT=e.wrap,("map"===a||"emissiveMap"===a)&&(d.colorSpace=cs),r[a]=d}for(const a in n){const l=n[a];let c;if(""!==l)switch(a.toLowerCase()){case"kd":r.color=(new Ye).fromArray(l).convertSRGBToLinear();break;case"ks":r.specular=(new Ye).fromArray(l).convertSRGBToLinear();break;case"ke":r.emissive=(new Ye).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 NS(r),this.materials[t]}getTextureParams(t,e){const n={scale:new xe(1,1),offset:new xe(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:gG;let a=o.getHandler(t);null===a&&(a=new Hg(o)),a.setCrossOrigin&&a.setCrossOrigin(this.crossOrigin);const l=a.load(t,n,r,s);return void 0!==e&&(l.mapping=e),l}}const upe=["determinateSpinner"];function hpe(i,t){if(1&i&&(Ri(),W(0,"svg",11),ke(1,"circle",12),q()),2&i){const e=he();St("viewBox",e._viewBox()),G(1),Go("stroke-dasharray",e._strokeCircumference(),"px")("stroke-dashoffset",e._strokeCircumference()/2,"px")("stroke-width",e._circleStrokeWidth(),"%"),St("r",e._circleRadius())}}const fpe=Xy(class{constructor(i){this._elementRef=i}},"primary"),ppe=new me("mat-progress-spinner-default-options",{providedIn:"root",factory:function mpe(){return{diameter:a8}}}),a8=100;let XS=(()=>{class i extends fpe{constructor(e,n,r){super(e),this.mode="mat-spinner"===this._elementRef.nativeElement.nodeName.toLowerCase()?"indeterminate":"determinate",this._value=0,this._diameter=a8,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,ks(e)))}get diameter(){return this._diameter}set diameter(e){this._diameter=ks(e)}get strokeWidth(){return this._strokeWidth??this.diameter/10}set strokeWidth(e){this._strokeWidth=ks(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)(E(pt),E(Rr,8),E(ppe))},i.\u0275cmp=ot({type:i,selectors:[["mat-progress-spinner"],["mat-spinner"]],viewQuery:function(e,n){if(1&e&&ii(upe,5),2&e){let r;Tt(r=It())&&(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&&(St("aria-valuemin",0)("aria-valuemax",100)("aria-valuenow","determinate"===n.mode?n.value:null)("mode",n.mode),Go("width",n.diameter,"px")("height",n.diameter,"px"),un("_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:[at],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&&(fe(0,hpe,2,8,"ng-template",null,0,Rc),W(2,"div",1,2),Ri(),W(4,"svg",3),ke(5,"circle",4),q()(),Ka(),W(6,"div",5)(7,"div",6)(8,"div",7),ny(9,8),q(),W(10,"div",9),ny(11,8),q(),W(12,"div",10),ny(13,8),q()()()),2&e){const r=tr(1);G(4),St("viewBox",n._viewBox()),G(1),Go("stroke-dasharray",n._strokeCircumference(),"px")("stroke-dashoffset",n._strokeDashOffset(),"px")("stroke-width",n._circleStrokeWidth(),"%"),St("r",n._circleRadius()),G(4),U("ngTemplateOutlet",r),G(2),U("ngTemplateOutlet",r),G(2),U("ngTemplateOutlet",r)}},dependencies:[vy],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})(),_pe=(()=>{class i{}return i.\u0275fac=function(e){return new(e||i)},i.\u0275mod=nn({type:i}),i.\u0275inj=Xt({imports:[So,Kn]}),i})();const vpe=["previewCanvasContainer"],ype=["previewCanvas"];function bpe(i,t){if(1&i){const e=mi();Gr(0),W(1,"label",11),Ge(2),q(),W(3,"input",12),Ue("change",function(r){cn(e);const s=he().$implicit;return s.value=r.currentTarget.checked,zt(s.change(s.value))}),q(),$r()}if(2&i){const e=he(),n=e.index,r=e.$implicit,s=he().index;G(1),U("for","custom_control_"+s+"_"+n),G(1),_i(r.label),G(1),U("id","custom_control_"+s+"_"+n)("type",r.type)("checked",r.value)}}function xpe(i,t){if(1&i){const e=mi();W(0,"div",9)(1,"label",11),Ge(2),q(),W(3,"input",14),Ue("change",function(){const s=cn(e).$implicit,o=he(2).$implicit;return o.value=s,zt(o.change(o.value))}),q()()}if(2&i){const e=t.$implicit,n=he(2),r=n.index,s=n.$implicit,o=he().index;G(1),U("for","custom_control_"+o+"_"+r+"_"+e),G(1),_i(e),G(1),U("id","custom_control_"+o+"_"+r+"_"+e)("checked",s.value===e)}}function wpe(i,t){if(1&i&&(W(0,"div",13)(1,"label"),Ge(2),q(),fe(3,xpe,4,4,"div",8),q()),2&i){const e=he().$implicit;G(2),_i(e.label),G(1),U("ngForOf",e.options)}}function Mpe(i,t){if(1&i){const e=mi();Gr(0),W(1,"label",11),Ge(2),q(),W(3,"input",15),Ue("colorChange",function(r){cn(e);const s=he().$implicit,o=he(2);return s.value=o.toRGB(r.value),zt(s.change(s.value))}),q(),ke(4,"ngx-mat-color-toggle",16)(5,"ngx-mat-color-picker",null,17),$r()}if(2&i){const e=tr(6),n=he(),r=n.index,s=n.$implicit,o=he().index;G(1),U("for","custom_control_"+o+"_"+r),G(1),_i(s.label),G(1),U("ngxMatColorPicker",e),G(1),U("for",e)}}function Cpe(i,t){if(1&i){const e=mi();Gr(0),W(1,"label",11),Ge(2),q(),W(3,"input",18),Ue("change",function(r){cn(e);const s=he().$implicit;return s.value=r.currentTarget.value,zt(s.change(s.value))}),q(),$r()}if(2&i){const e=he(),n=e.index,r=e.$implicit,s=he().index;G(1),U("for","custom_control_"+s+"_"+n),G(1),_i(r.label),G(1),U("id","custom_control_"+s+"_"+n)("min",r.minValue)("max",r.maxValue)("step",r.valueStep)("value",r.value)}}function Spe(i,t){if(1&i&&(W(0,"div",9),fe(1,bpe,4,5,"ng-container",6),fe(2,wpe,4,2,"div",10),fe(3,Mpe,7,4,"ng-container",6),fe(4,Cpe,4,7,"ng-container",6),q()),2&i){const e=t.$implicit;G(1),U("ngIf","checkbox"===e.type),G(1),U("ngIf","radio"===e.type),G(1),U("ngIf","color"===e.type),G(1),U("ngIf","slider"===e.type)}}function Epe(i,t){if(1&i&&(Gr(0),W(1,"h4"),Ge(2),q(),fe(3,Spe,5,4,"div",8),$r()),2&i){const e=t.$implicit;G(2),_i(e.title),G(1),U("ngForOf",e.controls)}}function Ape(i,t){if(1&i){const e=mi();W(0,"div",9)(1,"label",11),Ge(2),q(),W(3,"input",19),Ue("change",function(r){return zt(cn(e).$implicit.visible=r.currentTarget.checked)}),q()()}if(2&i){const e=t.$implicit;G(1),U("for","visibility_"+e.name),G(1),_i(e.name),G(1),U("id","visibility_"+e.name)("checked",e.visible)}}function Dpe(i,t){if(1&i&&(Gr(0),W(1,"h4"),Ge(2,"Objects visibility"),q(),fe(3,Ape,4,4,"div",8),$r()),2&i){const e=he();G(3),U("ngForOf",e.meshes)}}function Tpe(i,t){1&i&&ke(0,"mat-spinner",20)}const cd=i=>{i.colorSpace="srgb",i.anisotropy=8,i.magFilter=gr,i.minFilter=gr};let l8=(()=>{class i{constructor(e){this.cdr=e,this.visibilityControls=!0,this.groupFunction=null,this.customControls=[],this.onObjectLoaded=new We,this._paths$=new Ct(null),this.destroyed$=new Re,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 e4(new t8,{init:(s=vt(function*(){}),function(){return s.apply(this,arguments)}),simulate:()=>{}}),yield e.world.init(),e.world.visualScene.nativeScene.add(new nO(16777215,2));let n=new Ct({x:1,y:1});e.renderer=e.world.addRenderer(e.world.visualScene.factory.createPerspectiveCamera({frustrum:{near:.01,far:1e4}}),e.previewCanvas.nativeElement,{size:n.asObservable(),background:11184810}),e.controller=new Dse(e.renderer,{mouseOptions:{canvas:e.previewCanvas.nativeElement},orbiting:{sensitivityX:2,sensitivityY:2},orbitingElasticity:30}),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(Xe(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 gO,h=yield(new o8).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 ea;y.add(...b[v]),y.name=v,p.remove(...b[v]),p.add(y)}}e.meshes=p.children,e.meshes.sort((b,v)=>b.name>v.name?1:-1),p.traverse(b=>{if(b instanceof Nn){const v=b.material instanceof Array?b.material:[b.material];for(const y of v)y.transparent=!0,y.alphaTest=.5,y instanceof _r&&y.map&&(y.map.wrapS=Xi,y.map.wrapT=Xi,cd(y.map),y.map.needsUpdate=!0)}}),e.onObjectLoaded.next(p),e.entity=new mu({object3D:new nc(p)}),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=Be.scalarMult(Be.add(m.min,m.max),.5),e.controller.spherical={phi:1.22,theta:-1.32,radius:Be.dist(m.min,m.max)},e.cdr.markForCheck()}});return function(o){return s.apply(this,arguments)}}())})()}toRGB(e){return(e?.r||0)<<16|(e?.g||0)<<8|(e?.b||0)}ngOnDestroy(){this.destroyed$.next(),this.destroyed$.complete()}}return i.\u0275fac=function(e){return new(e||i)(E(ri))},i.\u0275cmp=ot({type:i,selectors:[["app-obj-viewer"]],viewQuery:function(e,n){if(1&e&&(ii(vpe,5),ii(ype,5)),2&e){let r;Tt(r=It())&&(n.previewCanvasContainer=r.first),Tt(r=It())&&(n.previewCanvas=r.first)}},inputs:{paths:"paths",visibilityControls:"visibilityControls",groupFunction:"groupFunction",customControls:"customControls"},outputs:{onObjectLoaded:"onObjectLoaded"},decls:8,vars:3,consts:[[1,"previewCanvasContainer"],["previewCanvasContainer",""],["width","640","height","480"],["previewCanvas",""],["id","controls"],[4,"ngFor","ngForOf"],[4,"ngIf"],["mode","indeterminate",4,"ngIf"],["class","controls-list",4,"ngFor","ngForOf"],[1,"controls-list"],["style","width: 100%",4,"ngIf"],[3,"for"],[3,"id","type","checked","change"],[2,"width","100%"],["type","radio",3,"id","checked","change"],["matInput","",1,"hidden",3,"ngxMatColorPicker","colorChange"],["matSuffix","",3,"for"],["picker",""],["type","range",3,"id","min","max","step","value","change"],["type","checkbox",3,"id","checked","change"],["mode","indeterminate"]],template:function(e,n){1&e&&(W(0,"div",0,1),ke(2,"canvas",2,3),W(4,"div",4),fe(5,Epe,4,2,"ng-container",5),fe(6,Dpe,4,1,"ng-container",6),q(),fe(7,Tpe,1,0,"mat-spinner",7),q()),2&e&&(G(5),U("ngForOf",n.customControls),G(1),U("ngIf",n.visibilityControls),G(1),U("ngIf",!n.entity))},dependencies:[Co,wi,Gte,jc,XS,Vie,gC,kH],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%] > h4[_ngcontent-%COMP%]{margin:0}.previewCanvasContainer[_ngcontent-%COMP%] #controls[_ngcontent-%COMP%] .controls-list[_ngcontent-%COMP%]{width:100%;display:flex;-webkit-user-select:none;user-select:none;align-items:center}.previewCanvasContainer[_ngcontent-%COMP%] #controls[_ngcontent-%COMP%] .controls-list[_ngcontent-%COMP%] > span[_ngcontent-%COMP%]{flex-grow:1}.previewCanvasContainer[_ngcontent-%COMP%] #controls[_ngcontent-%COMP%] .controls-list[_ngcontent-%COMP%] > label[_ngcontent-%COMP%]{flex-grow:1}"],changeDetection:0}),i})();function Ipe(i,t){if(1&i&&(Ri(),ke(0,"circle",3),$t(1,"async"),$t(2,"async")),2&i){const e=he();let n,r;St("cx",(null==(n=Qt(1,3,e.mapPointer$))?null:n.x)||0)("cy",(null==(r=Qt(2,5,e.mapPointer$))?null:r.y)||0)("r",10)}}const Rpe=function(){return{"stroke-width":3}};let kpe=(()=>{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 Re}set roadSpline(e){this._roadSpline$.next(e)}set pointer(e){this._pointer$.next(e)}ngAfterViewInit(){this._roadSpline$.pipe(Xe(this.destroyed$),et(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$),eu([this._roadSpline$,this.scalingSquare$,this.svgSize$]).pipe(Xe(this.destroyed$),et(([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$),eu([this._pointer$,this.scalingSquare$.asObservable(),this.svgSize$]).pipe(Xe(this.destroyed$),et(([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)(E(pt))},i.\u0275cmp=ot({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&&(Ri(),W(0,"svg",0),$t(1,"async"),$t(2,"async"),ke(3,"polyline",1),$t(4,"async"),Ge(5," cars "),fe(6,Ipe,3,7,"circle",2),$t(7,"async"),q()),2&e){let r;St("viewBox","0 0 "+(null==(r=Qt(1,4,n.svgSize$))?null:r.x)+" "+(null==(r=Qt(2,6,n.svgSize$))?null:r.y)),G(3),U("ngStyle",ro(12,Rpe)),St("points",Qt(4,8,n.mapPolyline$)),G(3),U("ngIf",Qt(7,10,n.mapPointer$))}},dependencies:[wi,Kw,zl],styles:["[_nghost-%COMP%]{overflow:auto}svg[_ngcontent-%COMP%]{width:100%;height:100%}"],changeDetection:0}),i})();const Ppe=["previewCanvasContainer"],Ope=["previewCanvas"];function Fpe(i,t){if(1&i&&(W(0,"mat-option",19),Ge(1),q()),2&i){const e=t.$implicit;U("value",e),G(1),ir(" ",e," ")}}function Lpe(i,t){if(1&i){const e=mi();Gr(0),W(1,"mat-form-field",1)(2,"mat-label"),Ge(3,"Custom FAM path"),q(),ke(4,"input",20,21),$t(6,"async"),q(),W(7,"button",22),Ue("click",function(){cn(e);const r=tr(5);return zt(he().onFamSelected(r.value))}),Ge(8,"LOAD"),q(),$r()}if(2&i){const e=he();G(4),U("value",Qt(6,1,e.previewFamLocation$))}}function Npe(i,t){1&i&&ke(0,"mat-spinner",23),2&i&&U("diameter",40)}function Bpe(i,t){1&i&&ke(0,"mat-spinner",24)}const Upe=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 Ef=(()=>{return(i=Ef||(Ef={})).ThreeModel="model",i.Bitmap="bitmap",i.TwoSidedBitmap="two_sided_bitmap",Ef;var i})();class Vpe extends Mse{constructor(t,e,n){super(t,{loadDepth:40,inertia:2}),this.mapGraph=t,this.famPath=e,this.hideUnknownEntities$=n,this.textureLoader=new Hg,this.terrainMaterials={},this.objLoader=new gO,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(Vc(),Xe(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=Xi,cd(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 Nn&&(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:Be.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:mr.fromAngle(Be.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 mu({object3D:new nc(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 _r({side:Xo,transparent:!0,visible:!1}),this.famPath?this.textureLoader.loadAsync(`${this.famPath}/background/${t}.png`).then(e=>{e.wrapS=Ql,e.wrapT=Xi,cd(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==Ef.ThreeModel){let r;try{if(!e.famPath)throw new Error;const o=new o8,a=new gO,l=yield o.loadAsync(`${e.famPath}/props/${t.data.data.resource_id}/0/material.mtl`);l.preload(),a.setMaterials(l),r=new nc(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 Nn){const a=o.material instanceof Array?o.material:[o.material];for(const l of a)l.transparent=!0,l.alphaTest=.5,l instanceof _r&&l.map&&(l.map.wrapS=Xi,l.map.wrapT=Xi,cd(l.map),l.map.needsUpdate=!0)}});const s=new mu({object3D: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==Ef.Bitmap||t.type==Ef.TwoSidedBitmap){const r=(c,d)=>new Array(d).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 ea,[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==Ef.TwoSidedBitmap){const[c,d]=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 mu({object3D:new nc(s)});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=>(cd(h),new _r({map:h,alphaTest:.5,transparent:!0,side:Xo}))),d=new Nn(new sf(e.x,e.y),c[0]);if(d.rotateX(Math.PI/2),d.position.set(0,0,e.y/2),c.length>1){let h=-1;YR(r.world).pipe(function Ose(i,t=zy,e){const n=II(i,t);return function Pse(i,t){return Jn((e,n)=>{const{leading:r=!0,trailing:s=!1}=t??{};let o=!1,a=null,l=null,c=!1;const d=()=>{l?.unsubscribe(),l=null,s&&(m(),c&&n.complete())},h=()=>{l=null,c&&n.complete()},p=g=>l=wr(i(g)).subscribe(jn(n,d,h)),m=()=>{if(o){o=!1;const g=a;a=null,n.next(g),!c&&p(g)}};e.subscribe(jn(n,g=>{o=!0,a=g,(!l||l.closed)&&(r?m():p(g))},()=>{c=!0,(!(s&&o&&l)||l.closed)&&n.complete()}))})}(()=>n,e)}(n&&!isNaN(+n)?1e3*+n:250)).subscribe(()=>{h=(h+1)%c.length,d.material=c[h]})}return[d,a]})()}}let zpe=(()=>{class i{constructor(e,n,r){this.eelDelegate=e,this.cdr=n,this.mainService=r,this._resource$=new Ct(null),this.changed=new We,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 Re}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 e4(new t8,{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 mu({object3D:e.world.visualScene.factory.createPrimitive({shape:"SPHERE",radius:1e3},{color:16777215})}),e.skySphere.object3D.nativeMesh.material.side=Xo,e.world.addEntity(e.skySphere),e.selectionSphere=new mu({object3D: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 nO(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=mr.lookAt(e.renderer.camera.position,Be.add(e.renderer.camera.position,Be.Y),Be.Z),YR(e.world).pipe(Xe(e.destroyed$)).subscribe(()=>{e.renderer&&(e.skySphere.position=e.renderer.camera.position,e.pointer$.next(e.renderer.camera.position))}),e.controller=new Ese(e.world.keyboardInput,e.renderer,{mouseOptions:{canvas:e.previewCanvas.nativeElement,pointerLock:!0},keymap:"wasd+arrows",cameraLinearSpeed:40,cameraBoostMultiplier:4,cameraMovementElasticity:100,cameraRotationElasticity:30,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(Xe(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(Xe(e.destroyed$),vn(([s,o])=>!!e.resource&&s.startsWith(e.resource.id)),Uc(3e3)).subscribe(vt(function*(){e.previewLoading$.next(!0),yield e.postTmpUpdates(e.resource?.id),yield e.loadPreview(),e.previewLoading$.next(!1)})),e.selectedSplineIndex$.pipe(Xe(e.destroyed$),Uc(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=Be.add(a,Be.rotAround({x:10,y:-12,z:5},{x:0,y:0,z:1},-e.resource.data.road_spline[s].orientation)),e.renderer.rotation=mr.lookAt(e.renderer.position,a,{x:0,y:0,z:1}),e.controller.reset())}e.selectedSplineItem$.next({id:ql(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:ql(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:ql(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 Hg,o=r.find(a=>a.endsWith("spherical.png"));if(o){const a=yield s.loadAsync(o);a.colorSpace="srgb",a.mapping=Xc,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=ub.fromMapArray(e.roadPath.map((r,s)=>({path:`${e.terrainChunksObjLocation}terrain_chunk_${s}`,position:r,loadOptions:{}}))||[],!e.isOpenedTrack);e.unloadPreview(),e.map=new Vpe(n,e.famPath&&"resources/"+e.famPath,e.mainService.hideHiddenFields$),e.map.resource=e.resource,e.map.isOpenedTrack=e.isOpenedTrack,YR(e.world).pipe(Xe(e.destroyed$)).subscribe(()=>{e.map&&e.renderer&&e.map.loaderCursor$.next(e.renderer.position)}),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)(E(Gc),E(ri),E(cl))},i.\u0275cmp=ot({type:i,selectors:[["app-tri-map-block-ui"]],viewQuery:function(e,n){if(1&e&&(ii(Ppe,5),ii(Ope,5)),2&e){let r;Tt(r=It())&&(n.previewCanvasContainer=r.first),Tt(r=It())&&(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&&(W(0,"div",0)(1,"h4"),Ge(2,"Preview *.FAM file"),q(),W(3,"mat-form-field",1)(4,"mat-label"),Ge(5,"Current preview FAM"),q(),W(6,"mat-select",2,3),Ue("valueChange",function(s){return n.onFamSelected(s)}),$t(8,"async"),$t(9,"async"),fe(10,Fpe,2,2,"mat-option",4),W(11,"mat-option",5),Ge(12,"custom"),q()()(),fe(13,Lpe,9,3,"ng-container",6),fe(14,Npe,1,1,"mat-spinner",7),$t(15,"async"),q(),W(16,"div",8)(17,"div",9,10),ke(19,"canvas",11,12),fe(21,Bpe,1,0,"mat-spinner",13),$t(22,"async"),q(),W(23,"div",14,10)(25,"mat-form-field",1)(26,"mat-label"),Ge(27,"Spline item"),q(),W(28,"input",15),Ue("ngModelChange",function(s){return n.selectedSplineIndex$.next(s)}),$t(29,"async"),$t(30,"async"),q()(),ke(31,"app-tri-minimap",16),$t(32,"async"),q()(),W(33,"h4"),Ge(34,"Road spline item"),q(),ke(35,"app-compound-block-ui",17),$t(36,"async"),W(37,"h4"),Ge(38,"AI info (block for 4 spline items)"),q(),ke(39,"app-compound-block-ui",17),$t(40,"async"),W(41,"h4"),Ge(42,"Terrain (block for 4 spline items)"),q(),ke(43,"app-compound-block-ui",17),$t(44,"async"),W(45,"h4"),Ge(46,"Common"),q(),ke(47,"app-compound-block-ui",18),$t(48,"async")),2&e){const r=tr(7);let s;G(6),U("value",n.previewFamPossibleLocations.includes(Qt(8,20,n.previewFamLocation$))?Qt(9,22,n.previewFamLocation$):"custom"),G(4),U("ngForOf",n.previewFamPossibleLocations),G(3),U("ngIf","custom"==r.value),G(1),U("ngIf",Qt(15,24,n.previewFamLoading$)),G(7),U("ngIf",Qt(22,26,n.previewLoading$)),G(7),U("min",0)("max",4*(null==(s=Qt(29,28,n._resource$))?null:s.data.num_chunks)-1)("ngModel",Qt(30,30,n.selectedSplineIndex$)),G(3),U("roadSpline",n.roadSpline)("pointer",Qt(32,32,n.pointer$))("splineClosed",!n.isOpenedTrack),G(4),U("resource",Qt(36,34,n.selectedSplineItem$))("hideBlockActions",!0),G(4),U("resource",Qt(40,36,n.selectedAiInfoItem$))("hideBlockActions",!0),G(4),U("resource",Qt(44,38,n.selectedTerrainItem$))("hideBlockActions",!0),G(4),U("resource",Qt(48,40,n._resource$))("hideBlockActions",!0)("fieldWhitelist",ro(42,Upe))}},dependencies:[Co,wi,$l,Bh,Wc,Hh,zh,fu,Yl,Yo,jc,$M,cb,Fm,XS,$c,kpe,zl],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})();const c8=i=>new Promise(t=>setTimeout(t,i)),d8=(i,t,e=null)=>{const n=document.createElement("canvas"),r=n.getContext("2d",{willReadFrequently:!0}),s=i.width,o=i.height;n.width=s,n.height=o,r.drawImage(i,0,0,s,o);const a=r.getImageData(0,0,s,o);for(let l=0;l{if(!(o instanceof Nn))return;let a=-1;if(o.name.startsWith("lbl__rt_frnt")?a=0:o.name.startsWith("lbl__lt_frnt")?a=1:o.name.startsWith("lbl__rt_rear")?a=2:o.name.startsWith("lbl__lt_rear")&&(a=3),a>-1){this.wheels[a]=o,a<2&&(this.frontWheels[a]=o),o.geometry.boundingBox||o.geometry.computeBoundingBox();const l=Be.avg(o.geometry.boundingBox.min,o.geometry.boundingBox.max);o.geometry.translate(...Be.spr(Be.neg(l))),o.position.set(...Be.spr(l)),this.wheelIdlePositions[a]=l}(o.name.includes("rsid")||o.name.includes("lite"))&&(r.push(o),this.originalTexWithTailLights=o.material.map)}),!this.originalTexWithTailLights)throw new Error("Not a driveable NFS1 car");this.tailLightColors=n.includes("TRAFFC.CFM")?[9509903,16711680]:[3212546,16258068],this.texWithTailLightsImg=document.createElement("img"),this.texWithTailLights=new Io(this.texWithTailLightsImg),this.texWithTailLights.flipY=this.originalTexWithTailLights.flipY,cd(this.texWithTailLights),this.recolorTailLights(this.tailLightColors[0]).then();for(const o of r)o.material.map=this.texWithTailLights;const s=new Hg;this.tyreTextures=[1,2,3,4].map(o=>s.load(`${n}/tyr${o}.png`));for(const o of this.tyreTextures)cd(o);this.tyreMaterial=new _r({map:this.tyreTextures[0]}),this.tyreMaterial.transparent=!0,this.tyreMaterial.alphaTest=.5,this.tyreMaterial.map.wrapS=Xi,this.tyreMaterial.map.wrapT=Xi,this.tyreMaterial.polygonOffset=!0,this.tyreMaterial.polygonOffsetFactor=-4;for(const o of this.wheels)o.material=this.tyreMaterial}get tailLightsOn(){return this._tailLightsOn}set tailLightsOn(t){t!==this._tailLightsOn&&(this._tailLightsOn=t,this.recolorTailLights(this.tailLightColors[t?1:0]))}get speed(){return this._speed}set speed(t){if(t!==this._speed){switch(this._speed=t,this.tyreTextureUpdateTimer&&clearInterval(this.tyreTextureUpdateTimer),t){case"idle":this.tyreMaterial.map=this.tyreTextures[0];break;case"slow":let e=!0;this.tyreTextureUpdateTimer=setInterval(()=>{this.tyreMaterial.map=this.tyreTextures[e?1:2],this.tyreMaterial.needsUpdate=!0,e=!e},16);break;case"fast":this.tyreMaterial.map=this.tyreTextures[3]}this.tyreMaterial.needsUpdate=!0}}get steeringAngle(){return this._steeringAngle}set steeringAngle(t){if(t!==this._steeringAngle){this._steeringAngle=t;for(const e of this.frontWheels)e.rotation.set(0,0,t)}}recolorTailLights(t){var e=this;return vt(function*(){if(e.originalTexWithTailLights&&e.texWithTailLights&&e.texWithTailLightsImg){for(let n=100;n>0&&!e.originalTexWithTailLights.source.data;n--)yield c8(50);((i,t,e,n=null)=>{const[r,s,o]=[t>>16,t>>8&255,255&t],[a,l,c]=[e>>16,e>>8&255,255&e];d8(i,(d,h)=>{d[h]==r&&d[h+1]==s&&d[h+2]==o&&(d[h]=a,d[h+1]=l,d[h+2]=c)},n)})(e.originalTexWithTailLights.source.data,e.tailLightsTexColor,t,e.texWithTailLightsImg),e.texWithTailLights.needsUpdate=!0}})()}dispose(){this.texWithTailLightsImg&&(this.texWithTailLightsImg.remove(),this.texWithTailLightsImg=null),this.texWithTailLights&&(this.texWithTailLights.dispose(),this.texWithTailLights=null),this.tyreTextureUpdateTimer&&clearInterval(this.tyreTextureUpdateTimer),this.tyreMaterial&&(this.tyreMaterial.dispose(),this.tyreMaterial=null)}}let $pe=(()=>{class i{constructor(e,n,r){this.eelDelegate=e,this.mainService=n,this.cdr=r,this._resource$=new Ct(null),this.changed=new We,this.previewPaths$=new Ct(null),this.destroyed$=new Re,this.customControls=[],this.serializerSettings={geometry__save_obj:!0,geometry__save_blend:!1,geometry__export_to_gg_web_engine:!1}}get resource(){return this._resource$.getValue()}set resource(e){this._resource$.next(e)}ngAfterViewInit(){var e=this;return vt(function*(){e._resource$.pipe(Xe(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(Xe(e.destroyed$),vn(([n,r])=>!!e.resource&&n.startsWith(e.resource.id)),Uc(1500)).subscribe(vt(function*(){e.previewPaths$.next(null),e.previewPaths$.next(yield e.postTmpUpdates(e.resource?.id))}))})()}onObjectLoaded(e){var n=this;return vt(function*(){if((n._resource$.value?.id||"").includes(".CFM__"))try{const r=n.resource?.id.split("/");r.pop(),r[r.length-1]=""+(+r[r.length-1]+1);const s=yield n.eelDelegate.retrieveValue(r.join("/")+"/data"),o=s.children_aliases.findIndex(l=>"!PAL"===l);if(-1==o)throw new Error("Not a car");const a=new Gpe(e,s.children[o].data.colors[254]>>>8,n.previewPaths$.value[0].substring(0,n.previewPaths$.value[0].lastIndexOf("/"))+"/assets");n.customControls=[{title:"TNFS car features",controls:[{label:"Brake lights on",type:"checkbox",value:!1,change:l=>{a.tailLightsOn=l}},{label:"Car speed",type:"radio",options:["idle","slow","fast"],value:"idle",change:l=>{a.speed=l}},{label:"Steering angle",type:"slider",minValue:-.7,maxValue:.7,valueStep:.05,value:0,change:l=>{a.steeringAngle=l}}]}],n.cdr.markForCheck()}catch{}})()}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)(E(Gc),E(cl),E(ri))},i.\u0275cmp=ot({type:i,selectors:[["app-orip-geometry-block-ui"]],inputs:{resource:"resource"},outputs:{changed:"changed"},decls:4,vars:7,consts:[[3,"paths","customControls","onObjectLoaded"],[3,"resource"]],template:function(e,n){1&e&&(W(0,"app-obj-viewer",0),Ue("onObjectLoaded",function(s){return n.onObjectLoaded(s)}),$t(1,"async"),q(),ke(2,"app-compound-block-ui",1),$t(3,"async")),2&e&&(U("paths",Qt(1,3,n.previewPaths$))("customControls",n.customControls),G(2),U("resource",Qt(3,5,n._resource$)))},dependencies:[$c,l8,zl],changeDetection:0}),i})();const Wpe=["class","block-ui"];function jpe(i,t){if(1&i&&(W(0,"mat-label",7),Ge(1),q()),2&i){const e=he(2);U("matTooltip",e.resourceDescription),G(1),ir("",null==e.resource?null:e.resource.name," ")}}function Ype(i,t){if(1&i&&(W(0,"mat-option",8),Ge(1),q()),2&i){const e=t.$implicit,n=t.index,r=he(2);U("value",n)("disabled",r.disabled),G(1),ir(" ",e.block_class_mro.split("__")[0]," ")}}function qpe(i,t){if(1&i){const e=mi();Gr(0),fe(1,jpe,2,2,"mat-label",1),$t(2,"async"),W(3,"div",2)(4,"mat-label"),Ge(5,"Resource type:"),q(),W(6,"mat-select",3),Ue("selectionChange",function(r){return cn(e),zt(he().setChoiceIndex(r.value))}),fe(7,Ype,2,3,"mat-option",4),q(),ke(8,"app-block-actions",5),q(),ke(9,"app-editor",6),$r()}if(2&i){const e=he();let n;G(1),U("ngIf",(null==e.resource?null:e.resource.name)&&(null==e.resource?null:e.resource.name)!=(null==(n=Qt(2,8,e.main.resource$))?null:n.name)),G(5),U("value",e.resourceData.choice_index)("disabled",e.disabled),G(1),U("ngForOf",e.resource.schema.possible_resource_schemas),G(1),U("resource",e.childResource),G(1),U("resource",e.childResource)("hideBlockActions",!0)("disabled",e.disabled)}}let u8=(()=>{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 We}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:ql(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)(E(cl))},i.\u0275cmp=ot({type:i,selectors:[["app-delegate",8,"block-ui"]],inputs:{resource:"resource",resourceDescription:"resourceDescription",hideBlockActions:"hideBlockActions",disabled:"disabled"},outputs:{changed:"changed"},attrs:Wpe,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"],[3,"resource","hideBlockActions","disabled"],["matTooltipPosition","above",3,"matTooltip"],[3,"value","disabled"]],template:function(e,n){1&e&&fe(0,qpe,10,10,"ng-container",0),2&e&&U("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 Xpe=["class","block-ui"];function Kpe(i,t){if(1&i&&(W(0,"mat-label",7),Ge(1),q()),2&i){const e=he(2);U("matTooltip",e.resourceDescription),G(1),ir(" ",e.resource.name," ")}}function Zpe(i,t){if(1&i){const e=mi();Gr(0),fe(1,Kpe,2,2,"mat-label",1),W(2,"mat-selection-list",2),Ue("selectionChange",function(r){return cn(e),zt(he().onSelection(r))}),W(3,"mat-list-option",3),Ge(4," Left "),q(),W(5,"mat-list-option",4),Ge(6," Right "),q()(),W(7,"mat-form-field",5)(8,"mat-label"),Ge(9,"Texture ID"),q(),W(10,"input",6),Ue("ngModelChange",function(r){return cn(e),zt(he().resource.data.texture_id=r)})("change",function(){return cn(e),zt(he().changed.emit())}),q()(),$r()}if(2&i){const e=he();G(1),U("ngIf",e.resource.name),G(2),U("selected",e.resource.data.has_left_fence),G(2),U("selected",e.resource.data.has_right_fence),G(5),U("max",63)("min",0)("step",1)("ngModel",e.resource.data.texture_id)}}let Qpe=(()=>{class i{constructor(){this.resource=null,this.resourceDescription="",this.changed=new We}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=ot({type:i,selectors:[["app-fence-type",8,"block-ui"]],inputs:{resource:"resource",resourceDescription:"resourceDescription"},outputs:{changed:"changed"},attrs:Xpe,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&&fe(0,Zpe,11,7,"ng-container",0),2&e&&U("ngIf",n.resource)},dependencies:[wi,$l,Bh,Wc,Hh,zh,fu,Yl,Yo,jc,Os,yC,vC],changeDetection:0}),i})(),Jpe=(()=>{class i{constructor(){this._resource=null,this.resourceMap={},this.changed=new We}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]=["",dl.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)(E(Jy),E(pte),E(nR))},i.\u0275cmp=ot({type:i,selectors:[["app-run-custom-action",8,"dialog"]],attrs:eme,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&&(W(0,"h1",0),Ge(1),q(),W(2,"div",1)(3,"p"),Ge(4),q()(),W(5,"form",2),fe(6,tme,4,4,"mat-form-field",3),q(),W(7,"div",4)(8,"button",5),Ue("click",function(){return n.dialogRef.close()}),Ge(9,"Cancel"),q(),W(10,"button",6),Ue("click",function(){return n.submit()}),Ge(11,"Run"),q()()),2&e&&(G(1),ir('Run action "',n.data.title,'"'),G(3),_i(n.data.description),G(1),U("formGroup",n.argsForm),G(1),U("ngForOf",n.data.args),G(4),U("disabled",n.argsForm.invalid))},dependencies:[Co,ER,$l,Wc,gR,Yl,Yo,jc,$M,cV,dV,uV,Uh,cC],styles:["form[_ngcontent-%COMP%]{padding:0 24px}"]}),i})();function h8(i,t){return t?e=>wy(t.pipe(Pi(1),function ime(){return Jn((i,t)=>{i.subscribe(jn(t,ms))})}()),e.pipe(h8(i))):Ji((e,n)=>wr(i(e,n)).pipe(Pi(1),GB(e)))}function f8(i,t=zy){const e=II(i,t);return h8(()=>e)}const rme=["mat-menu-item",""];function sme(i,t){1&i&&(Ri(),W(0,"svg",3),ke(1,"polygon",4),q())}const ome=[[["mat-icon"],["","matMenuItemIcon",""]],"*"],ame=["mat-icon, [matMenuItemIcon]","*"];function lme(i,t){if(1&i){const e=mi();W(0,"div",0),Ue("keydown",function(r){return cn(e),zt(he()._handleKeydown(r))})("click",function(){return cn(e),zt(he().closed.emit("click"))})("@transformMenu.start",function(r){return cn(e),zt(he()._onAnimationStart(r))})("@transformMenu.done",function(r){return cn(e),zt(he()._onAnimationDone(r))}),W(1,"div",1),Gt(2),q()()}if(2&i){const e=he();U("id",e.panelId)("ngClass",e._classList)("@transformMenu",e._panelAnimationState),St("aria-label",e.ariaLabel||null)("aria-labelledby",e.ariaLabelledby||null)("aria-describedby",e.ariaDescribedby||null)}}const cme=["*"],_O=new me("MAT_MENU_PANEL"),dme=HM(zM(class{}));let KS=(()=>{class i extends dme{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 Re,this._focused=new Re,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",jr("120ms cubic-bezier(0, 0, 0.2, 1)",si({opacity:1,transform:"scale(1)"}))),Pr("* => void",jr("100ms 25ms linear",si({opacity:0})))]),fadeInItems:Aa("fadeInItems",[Ps("showing",si({opacity:1})),Pr("void => *",[si({opacity:0}),jr("400ms 100ms cubic-bezier(0.55, 0, 0.55, 0.2)")])])};let hme=0;const p8=new me("mat-menu-default-options",{providedIn:"root",factory:function fme(){return{overlapTrigger:!1,xPosition:"after",yPosition:"below",backdropClass:"cdk-overlay-transparent-backdrop"}}});let Xb=(()=>{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 rm,this._classList={},this._panelAnimationState="void",this._animationDone=new Re,this.overlayPanelClass=this._defaultOptions.overlayPanelClass||"",this.backdropClass=this._defaultOptions.backdropClass,this._overlapTrigger=this._defaultOptions.overlapTrigger,this._hasBackdrop=this._defaultOptions.hasBackdrop,this.closed=new We,this.close=this.closed,this.panelId="mat-menu-panel-"+hme++}ngOnInit(){this.setPositionClasses()}ngAfterContentInit(){this._updateDirectDescendants(),this._keyManager=new AU(this._directDescendantItems).withWrap().withTypeAhead().withHomeAndEnd(),this._keyManager.tabOut.subscribe(()=>this.closed.emit("tab")),this._directDescendantItems.changes.pipe(Eo(this._directDescendantItems),Rs(e=>Mr(...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(Eo(this._directDescendantItems),Rs(n=>Mr(...n.map(r=>r._hovered))))}addItem(e){}removeItem(e){}_handleKeydown(e){const n=e.keyCode,r=this._keyManager;switch(n){case 27:jo(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(Pi(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(Eo(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)(E(pt),E(ht),E(p8),E(ri))},i.\u0275dir=ve({type:i,contentQueries:function(e,n,r){if(1&e&&($i(r,ume,5),$i(r,KS,5),$i(r,KS,4)),2&e){let s;Tt(s=It())&&(n.lazyContent=s.first),Tt(s=It())&&(n._allItems=s),Tt(s=It())&&(n.items=s)}},viewQuery:function(e,n){if(1&e&&ii(wo,5),2&e){let r;Tt(r=It())&&(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})(),pme=(()=>{class i extends Xb{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)(E(pt),E(ht),E(p8),E(ri))},i.\u0275cmp=ot({type:i,selectors:[["mat-menu"]],hostVars:3,hostBindings:function(e,n){2&e&&St("aria-label",null)("aria-labelledby",null)("aria-describedby",null)},exportAs:["matMenu"],features:[An([{provide:_O,useExisting:i}]),at],ngContentSelectors:cme,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&&(nr(),fe(0,lme,3,6,"ng-template"))},dependencies:[dm],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:[ZS.transformMenu,ZS.fadeInItems]},changeDetection:0}),i})();const m8=new me("mat-menu-scroll-strategy"),gme={provide:m8,deps:[as],useFactory:function mme(i){return()=>i.scrollStrategies.reposition()}},g8=Th({passive:!0});let _me=(()=>{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,d){this._overlay=e,this._element=n,this._viewContainerRef=r,this._menuItemInstance=a,this._dir=l,this._focusMonitor=c,this._ngZone=d,this._overlayRef=null,this._menuOpen=!1,this._closingActionsSubscription=Kt.EMPTY,this._hoverSubscription=Kt.EMPTY,this._menuCloseSubscription=Kt.EMPTY,this._changeDetectorRef=Pt(ri),this._handleTouchStart=h=>{$I(h)||(this._openedBy="touch")},this._openedBy=void 0,this.restoreFocus=!0,this.menuOpened=new We,this.onMenuOpen=this.menuOpened,this.menuClosed=new We,this.onMenuClose=this.menuClosed,this._scrollStrategy=s,this._parentMaterialMenu=o instanceof Xb?o:void 0,n.nativeElement.addEventListener("touchstart",this._handleTouchStart,g8)}ngAfterContentInit(){this._handleHover()}ngOnDestroy(){this._overlayRef&&(this._overlayRef.dispose(),this._overlayRef=null),this._element.nativeElement.removeEventListener("touchstart",this._handleTouchStart,g8),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 Xb&&(e._startAnimation(),e._directDescendantItems.changes.pipe(Xe(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 Xb?(n._resetAnimation(),n.lazyContent?n._animationDone.pipe(vn(r=>"void"===r.toState),Pi(1),Xe(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 Im({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],[d,h]=[r,s],p=0;if(this.triggersSubmenu()){if(h=r="before"===e.xPosition?"start":"end",s=d="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:d,overlayY:o,offsetY:p},{originX:s,originY:l,overlayX:h,overlayY:o,offsetY:p},{originX:r,originY:c,overlayX:d,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 Mr(e,this._parentMaterialMenu?this._parentMaterialMenu.closed:ut(),this._parentMaterialMenu?this._parentMaterialMenu._hovered().pipe(vn(o=>o!==this._menuItemInstance),vn(()=>this._menuOpen)):ut(),n)}_handleMousedown(e){GI(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(vn(e=>e===this._menuItemInstance&&!e.disabled),f8(0,TI)).subscribe(()=>{this._openedBy="mouse",this.menu instanceof Xb&&this.menu._isAnimating?this.menu._animationDone.pipe(Pi(1),f8(0,TI),Xe(this._parentMaterialMenu._hovered())).subscribe(()=>this.openMenu()):this.openMenu()}))}_getPortal(e){return(!this._portal||this._portal.templateRef!==e.templateRef)&&(this._portal=new Cm(e.templateRef,this._viewContainerRef)),this._portal}}return i.\u0275fac=function(e){return new(e||i)(E(as),E(pt),E(Wr),E(m8),E(_O,8),E(KS,10),E(Ea,8),E(zc),E(ht))},i.\u0275dir=ve({type:i,hostVars:3,hostBindings:function(e,n){1&e&&Ue("click",function(s){return n._handleClick(s)})("mousedown",function(s){return n._handleMousedown(s)})("keydown",function(s){return n._handleKeydown(s)}),2&e&&St("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})(),vme=(()=>{class i extends _me{}return i.\u0275fac=function(){let t;return function(n){return(t||(t=ni(i)))(n||i)}}(),i.\u0275dir=ve({type:i,selectors:[["","mat-menu-trigger-for",""],["","matMenuTriggerFor",""]],hostAttrs:[1,"mat-mdc-menu-trigger"],exportAs:["matMenuTrigger"],features:[at]}),i})(),yme=(()=>{class i{}return i.\u0275fac=function(e){return new(e||i)},i.\u0275mod=nn({type:i}),i.\u0275inj=Xt({providers:[gme],imports:[So,Zy,Kn,Rm,jy,Kn]}),i})();function bme(i,t){if(1&i){const e=mi();W(0,"button",7),Ue("click",function(){return cn(e),zt(he(2).deserialize())}),ke(1,"mat-icon",8),q()}}function xme(i,t){if(1&i){const e=mi();Gr(0),fe(1,bme,2,0,"button",4),W(2,"button",5),Ue("click",function(){return cn(e),zt(he().serializeBlockReversible())}),ke(3,"mat-icon",6),q(),$r()}if(2&i){const e=he();G(1),U("ngIf",e.isInReversibleSerializationState),G(1),U("disabled",e.isInReversibleSerializationState)}}function wme(i,t){1&i&&(W(0,"button",9),ke(1,"mat-icon",10),q()),2&i&&(he(),U("matMenuTriggerFor",tr(3)))}function Mme(i,t){if(1&i){const e=mi();W(0,"button",11),Ue("click",function(){const s=cn(e).$implicit;return zt(he().runCustomAction(s))}),W(1,"span"),Ge(2),q()()}if(2&i){const e=t.$implicit;G(2),_i(e.title)}}const Cme=function(){return[]};let QS=(()=>{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)(E(cl),E(Gc),E(ri),E(Lm),E(EV))},i.\u0275cmp=ot({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&&(fe(0,xme,4,2,"ng-container",0),fe(1,wme,2,1,"button",1),W(2,"mat-menu",null,2),fe(4,Mme,3,1,"button",3),q()),2&e&&(U("ngIf",null==n.resource||null==n.resource.schema?null:n.resource.schema.serializable_to_disc),G(1),U("ngIf",(null==n.resource||null==n.resource.schema.custom_actions?null:n.resource.schema.custom_actions.length)>0),G(3),U("ngForOf",(null==n.resource?null:n.resource.schema.custom_actions)||ro(3,Cme)))},dependencies:[Co,wi,Os,WM,hR,pme,KS,vme],styles:["[_nghost-%COMP%]{display:flex}"]}),i})();const Sme=["class","block-ui"];function Eme(i,t){if(1&i&&(W(0,"mat-label",7),Ge(1),q()),2&i){const e=he();U("matTooltip",e.resourceDescription),G(1),ir("",null==e.resource?null:e.resource.name," ")}}function Ame(i,t){if(1&i&&(W(0,"audio",8),ke(1,"source",9),$t(2,"async"),Ge(3," Your browser does not support the audio element. "),q()),2&i){const e=he();G(1),U("src",Qt(2,1,e.audioUrl$),Op)}}function Dme(i,t){1&i&&ke(0,"mat-spinner",10)}function Tme(i,t){1&i&&ke(0,"app-block-actions",11),2&i&&U("resource",he().resource)}const Ime=function(){return["wave_data"]};let Rme=(()=>{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 Re,this.changed=new We}set resource(e){this._resource$.next(e)}get resource(){return this._resource$.getValue()}ngAfterViewInit(){var e=this;return vt(function*(){e._resource$.pipe(Xe(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)(E(Gc),E(cl))},i.\u0275cmp=ot({type:i,selectors:[["app-eacs-audio",8,"block-ui"]],inputs:{resource:"resource",resourceDescription:"resourceDescription",hideBlockActions:"hideBlockActions"},outputs:{changed:"changed"},attrs:Sme,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&&(W(0,"div",0),fe(1,Eme,2,2,"mat-label",1),$t(2,"async"),fe(3,Ame,4,3,"audio",2),$t(4,"async"),fe(5,Dme,1,0,"mat-spinner",3),$t(6,"async"),ke(7,"div",4),fe(8,Tme,1,1,"app-block-actions",5),q(),ke(9,"app-compound-block-ui",6),$t(10,"async")),2&e){let r;G(1),U("ngIf",(null==n.resource?null:n.resource.name)&&(null==n.resource?null:n.resource.name)!=(null==(r=Qt(2,7,n.main.resource$))?null:r.name)),G(2),U("ngIf",Qt(4,9,n.audioUrl$)),G(2),U("ngIf",n.resource&&!Qt(6,11,n.audioUrl$)),G(3),U("ngIf",!n.hideBlockActions),G(1),U("resource",Qt(10,13,n._resource$))("hideBlockActions",!0)("fieldBlacklist",ro(15,Ime))}},dependencies:[wi,Yo,Os,XS,$c,QS,zl],styles:["#header[_ngcontent-%COMP%]{display:flex}"]}),i})();class kme{constructor(t,e){this.mesh=t,this.assetsPath=e,this.textures=[],this.tyreTextureUpdateTimer=void 0,this.tyreMaterial=null,this.tyreTextures=[],this._color=65280,this._speed="idle",this._steeringAngle=0,this.wheels=[],this.wheelIdlePositions=[],this.frontWheels=[];let n=new Set;if(t.traverse(r=>{if(!(r instanceof Nn))return;let s=-1;if(r.name.startsWith("part_hp_12")?s=0:r.name.startsWith("part_hp_14")?s=1:r.name.startsWith("part_hp_16")?s=2:r.name.startsWith("part_hp_18")&&(s=3),s>-1){r.geometry.boundingBox||r.geometry.computeBoundingBox();let a=Be.avg(r.geometry.boundingBox.min,r.geometry.boundingBox.max);return(0==s||2==s)&&(a={x:a.x,y:a.y,z:a.z+1.5}),r.geometry.translate(...Be.spr(Be.neg(a))),r.position.set(...Be.spr(a)),this.wheelIdlePositions[s]=a,this.wheels.push(r),void(s<2&&this.frontWheels.push(r))}const o=r.material.map;o&&n.add(o)}),this.textures=Array.from(n).map(r=>{const s=new Io(document.createElement("img"));return s.flipY=r.flipY,cd(s),[r,s]}),t.traverse(r=>{if(!(r instanceof Nn))return;const s=r.material.map;if(s){const o=this.textures.find(([a,l])=>a===s);o&&(r.material.map=o[1])}}),this.hasWheels){const r=new Hg;this.tyreTextures=[0,1,2,3].map(s=>r.load(`${e}/m${s}00.png`));for(const s of this.tyreTextures)cd(s);this.tyreMaterial=new _r({map:this.tyreTextures[0]}),this.tyreMaterial.transparent=!0,this.tyreMaterial.alphaTest=.5,this.tyreMaterial.map.wrapS=Xi,this.tyreMaterial.map.wrapT=Xi,this.tyreMaterial.polygonOffset=!0,this.tyreMaterial.polygonOffsetFactor=-4;for(const s of this.wheels)s.material=this.tyreMaterial}this.color=65280,this.recolorCar().then()}get color(){return this._color}set color(t){t!==this._color&&(this._color=t,this.recolorCar().then())}get speed(){return this._speed}set speed(t){if(t!==this._speed){switch(this._speed=t,this.tyreTextureUpdateTimer&&clearInterval(this.tyreTextureUpdateTimer),t){case"idle":this.tyreMaterial.map=this.tyreTextures[0];break;case"slow":let e=!0;this.tyreTextureUpdateTimer=setInterval(()=>{this.tyreMaterial.map=this.tyreTextures[e?1:2],this.tyreMaterial.needsUpdate=!0,e=!e},16);break;case"fast":this.tyreMaterial.map=this.tyreTextures[3]}this.tyreMaterial.needsUpdate=!0}}get steeringAngle(){return this._steeringAngle}set steeringAngle(t){if(t!==this._steeringAngle){this._steeringAngle=t;for(const e of this.frontWheels)e.rotation.set(0,0,t)}}get hasWheels(){return this.wheels.length>0}recolorCar(){var t=this;return vt(function*(){const[e,n,r]=[t.color>>16,t.color>>8&255,255&t.color];for(const[s,o]of t.textures){for(let a=100;a>0&&!s.source.data;a--)yield c8(50);d8(s.source.data,(a,l)=>{if(a[l]+a[l+2]{class i{constructor(e,n,r){this.eelDelegate=e,this.main=n,this.cdr=r,this._resource$=new Ct(null),this.changed=new We,this.customControls=[],this.previewPaths$=new Ct(null),this.destroyed$=new Re,this.serializerSettings={geometry__save_obj:!0,geometry__save_blend:!1,geometry__export_to_gg_web_engine:!1}}get resource(){return this._resource$.getValue()}set resource(e){this._resource$.next(e)}ngAfterViewInit(){var e=this;return vt(function*(){e._resource$.pipe(Xe(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.main.dataBlockChange$.pipe(Xe(e.destroyed$),vn(([n,r])=>!!e.resource&&n.startsWith(e.resource.id)),Uc(1500)).subscribe(vt(function*(){e.previewPaths$.next(null),e.previewPaths$.next(yield e.postTmpUpdates(e.resource?.id))}))})()}onObjectLoaded(e){var n=this;return vt(function*(){try{const r=new kme(e,n.previewPaths$.value[0].substring(0,n.previewPaths$.value[0].lastIndexOf("/"))+"/assets");let s=null;const o=a=>{s&&clearTimeout(s),s=setTimeout(()=>r.color=a,50)};n.customControls=[{title:"NFS2 car features",controls:[{label:"Car color",type:"color",value:65280,change:a=>o(a)}]}],r.hasWheels&&n.customControls[0].controls.push({label:"Car speed",type:"radio",options:["idle","slow","fast"],value:"idle",change:a=>{r.speed=a}},{label:"Steering angle",type:"slider",minValue:-.7,maxValue:.7,valueStep:.05,value:0,change:a=>{r.steeringAngle=a}}),n.cdr.markForCheck()}catch(r){console.error(r)}})()}postTmpUpdates(e){var n=this;return vt(function*(){if(e){const r=yield n.eelDelegate.serializeResourceTmp(e,Object.entries(n.main.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)(E(Gc),E(cl),E(ri))},i.\u0275cmp=ot({type:i,selectors:[["app-geo-geometry",8,"block-ui"]],inputs:{resource:"resource"},outputs:{changed:"changed"},attrs:Pme,decls:4,vars:8,consts:[[3,"paths","groupFunction","customControls","onObjectLoaded"],[3,"resource",4,"ngIf"],[3,"resource"]],template:function(e,n){1&e&&(W(0,"app-obj-viewer",0),Ue("onObjectLoaded",function(s){return n.onObjectLoaded(s)}),$t(1,"async"),q(),fe(2,Ome,2,3,"app-compound-block-ui",1),$t(3,"async")),2&e&&(U("paths",Qt(1,4,n.previewPaths$))("groupFunction",n.previewObjectGroupFunc)("customControls",n.customControls),G(2),U("ngIf",!Qt(3,6,n.main.hideHiddenFields$)))},dependencies:[wi,$c,l8,zl],changeDetection:0}),i})();const Lme=function(){return["children","items_descr"]};let Nme=(()=>{class i{constructor(){this._resource=null,this.hideBlockActions=!1,this.resourceMap={},this.changed=new We}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:ql(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=ot({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&&(U("resource",n.resource)("hideBlockActions",n.hideBlockActions)("fieldBlacklist",ro(4,Lme)),G(1),U("resources",n.resourceMap))},dependencies:[$c,_C],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 Bme(i,t){if(1&i&&(W(0,"mat-error"),Ge(1),q()),2&i){const e=he(2);G(1),Jp(" ",e.resourceError.data.error_class,": ",e.resourceError.data.error_text," ")}}function Ume(i,t){1&i&&ke(0,"mat-spinner",5)}function Vme(i,t){if(1&i&&(W(0,"div",2),fe(1,Bme,2,2,"mat-error",3),fe(2,Ume,1,0,"mat-spinner",4),q()),2&i){const e=he();G(1),U("ngIf",e.resourceError),G(1),U("ngIf",!e.resourceError)}}function zme(i,t){}let Kb=(()=>{class i{constructor(e){this.mainService=e,this._component=null,this._componentChangedSub=null,this.destroyed$=new Re,this.resourceSet$=new Re,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(Xe(this.destroyed$),Xe(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 Hme(i,t){1&i&&ke(0,"mat-icon",17)}function Gme(i,t){1&i&&ke(0,"mat-icon",18)}let $me=(()=>{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(bV,{data:{text:"There are unsaved changes, which will be lost. Are you sure you want to reload file?"}});if(!(yield rR(n.afterClosed())))return}yield e.mainService.reloadResource(),e.cdr.markForCheck()})()}}return i.\u0275fac=function(e){return new(e||i)(E(Gc),E(cl),E(Lm),E(EV),E(ri))},i.\u0275cmp=ot({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&&(W(0,"mat-toolbar",0)(1,"span"),Ge(2),$t(3,"async"),$t(4,"async"),q(),ke(5,"span",1),W(6,"button",2),Ue("click",function(){return n.toggleUnknownsVisibility()}),fe(7,Hme,1,0,"mat-icon",3),$t(8,"async"),fe(9,Gme,1,0,"mat-icon",4),$t(10,"async"),q(),ke(11,"mat-divider",5)(12,"app-block-actions",6),$t(13,"async"),W(14,"button",7),Ue("click",function(){return n.reloadResource()}),$t(15,"async"),ke(16,"mat-icon",8),q(),ke(17,"mat-divider",5),W(18,"button",9),Ue("click",function(){return n.saveResource()}),$t(19,"async"),$t(20,"async"),ke(21,"mat-icon",10),q()(),W(22,"div",11),ke(23,"div",12)(24,"app-editor",13),$t(25,"async"),$t(26,"async"),$t(27,"async"),W(28,"div",14)(29,"a",15),ke(30,"img",16),q()(),ke(31,"div",12),q()),2&e){let r;G(2),Jp("",(null==(r=Qt(3,9,n.mainService.resource$))?null:r.name)||"...","",Qt(4,11,n.mainService.hasUnsavedChanges$)?"*":"",""),G(5),U("ngIf",Qt(8,13,n.mainService.hideHiddenFields$)),G(2),U("ngIf",!Qt(10,15,n.mainService.hideHiddenFields$)),G(3),U("resource",Qt(13,17,n.mainService.resource$)),G(2),U("disabled",!Qt(15,19,n.mainService.eelDelegate.openedResourcePath$)),G(4),U("disabled",!Qt(19,21,n.mainService.resource$)||!Qt(20,23,n.mainService.hasUnsavedChanges$)),G(6),U("resource",Qt(25,25,n.mainService.customActionRunning$)?null:Qt(26,27,n.mainService.resource$)||Qt(27,29,n.mainService.error$))("hideBlockActions",!0)}},dependencies:[wi,vJ,bJ,Os,WM,hR,Kb,QS,zl],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 _8(i){return new pe(3e3,!1)}function Sge(){return typeof window<"u"&&typeof window.document<"u"}function vO(){return typeof process<"u"&&"[object process]"==={}.toString.call(process)}function ku(i){switch(i.length){case 0:return new Qy;case 1:return i[0];default:return new nV(i)}}function v8(i,t,e,n,r=new Map,s=new Map){const o=[],a=[];let l=-1,c=null;if(n.forEach(d=>{const h=d.get("offset"),p=h==l,m=p&&c||new Map;d.forEach((g,b)=>{let v=b,y=g;if("offset"!==b)switch(v=t.normalizePropertyName(v,o),y){case eR:y=r.get(b);break;case Hc: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 fge(i){return new pe(3502,!1)}();return a}function yO(i,t,e,n){switch(t){case"start":i.onStart(()=>n(e&&bO(e,"start",i)));break;case"done":i.onDone(()=>n(e&&bO(e,"done",i)));break;case"destroy":i.onDestroy(()=>n(e&&bO(e,"destroy",i)))}}function bO(i,t,e){const s=xO(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 xO(i,t,e,n,r="",s=0,o){return{element:i,triggerName:t,fromState:e,toState:n,phaseName:r,totalTime:s,disabled:!!o}}function ta(i,t,e){let n=i.get(t);return n||i.set(t,n=e),n}function y8(i){const t=i.indexOf(":");return[i.substring(1,t),i.slice(t+1)]}let wO=(i,t)=>!1,b8=(i,t,e)=>[],x8=null;function MO(i){const t=i.parentNode||i.host;return t===x8?null:t}(vO()||typeof Element<"u")&&(Sge()?(x8=(()=>document.documentElement)(),wO=(i,t)=>{for(;t;){if(t===i)return!0;t=MO(t)}return!1}):wO=(i,t)=>i.contains(t),b8=(i,t,e)=>{if(e)return Array.from(i.querySelectorAll(t));const n=i.querySelector(t);return n?[n]:[]});let Af=null,w8=!1;const M8=wO,C8=b8;let S8=(()=>{class i{validateStyleProperty(e){return function Age(i){Af||(Af=function Dge(){return typeof document<"u"?document.body:null}()||{},w8=!!Af.style&&"WebkitAppearance"in Af.style);let t=!0;return Af.style&&!function Ege(i){return"ebkit"==i.substring(1,6)}(i)&&(t=i in Af.style,!t&&w8&&(t="Webkit"+i.charAt(0).toUpperCase()+i.slice(1)in Af.style)),t}(e)}matchesElement(e,n){return!1}containsElement(e,n){return M8(e,n)}getParentElement(e){return MO(e)}query(e,n,r){return C8(e,n,r)}computeStyle(e,n,r){return r||""}animate(e,n,r,s,o,a=[],l){return new Qy(r,s)}}return i.\u0275fac=function(e){return new(e||i)},i.\u0275prov=Ie({token:i,factory:i.\u0275fac}),i})(),CO=(()=>{class i{}return i.NOOP=new S8,i})();const Tge=1e3,SO="ng-enter",JS="ng-leave",eE="ng-trigger",tE=".ng-trigger",A8="ng-animating",EO=".ng-animating";function dd(i){if("number"==typeof i)return i;const t=i.match(/^(-?[\.\d]+)(m?s)/);return!t||t.length<2?0:AO(parseFloat(t[1]),t[2])}function AO(i,t){return"s"===t?i*Tge:i}function nE(i,t,e){return i.hasOwnProperty("duration")?i:function Rge(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(_8()),{duration:0,delay:0,easing:""};r=AO(parseFloat(a[1]),a[2]);const l=a[3];null!=l&&(s=AO(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 Wme(){return new pe(3100,!1)}()),a=!0),s<0&&(t.push(function jme(){return new pe(3101,!1)}()),a=!0),a&&t.splice(l,0,_8())}return{duration:r,delay:s,easing:o}}(i,t,e)}function Zb(i,t={}){return Object.keys(i).forEach(e=>{t[e]=i[e]}),t}function D8(i){const t=new Map;return Object.keys(i).forEach(e=>{t.set(e,i[e])}),t}function Pu(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 I8(i,t,e){return e?t+":"+e+";":""}function R8(i){let t="";for(let e=0;e{const s=TO(r);e&&!e.has(r)&&e.set(r,i.style[s]),i.style[s]=n}),vO()&&R8(i))}function Df(i,t){i.style&&(t.forEach((e,n)=>{const r=TO(n);i.style[r]=""}),vO()&&R8(i))}function Qb(i){return Array.isArray(i)?1==i.length?i[0]:JU(i):i}const DO=new RegExp("{{\\s*(.+?)\\s*}}","g");function k8(i){let t=[];if("string"==typeof i){let e;for(;e=DO.exec(i);)t.push(e[1]);DO.lastIndex=0}return t}function Jb(i,t,e){const n=i.toString(),r=n.replace(DO,(s,o)=>{let a=t[o];return null==a&&(e.push(function qme(i){return new pe(3003,!1)}()),a=""),a.toString()});return r==n?i:r}function iE(i){const t=[];let e=i.next();for(;!e.done;)t.push(e.value),e=i.next();return t}const Oge=/-+([a-z0-9])/g;function TO(i){return i.replace(Oge,(...t)=>t[1].toUpperCase())}function Fge(i){return i.replace(/([a-z])([A-Z])/g,"$1-$2").toLowerCase()}function na(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 Xme(i){return new pe(3004,!1)}()}}function P8(i,t){return window.getComputedStyle(i)[t]}const oE="*";function zge(i,t){const e=[];return"string"==typeof i?i.split(/\s*,\s*/).forEach(n=>function Hge(i,t,e){if(":"==i[0]){const l=function Gge(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 lge(i){return new pe(3015,!1)}()),t;const r=n[1],s=n[2],o=n[3];t.push(O8(r,o));"<"==s[0]&&!(r==oE&&o==oE)&&t.push(O8(o,r))}(n,e,t)):e.push(i),e}const aE=new Set(["true","1"]),lE=new Set(["false","0"]);function O8(i,t){const e=aE.has(i)||lE.has(i),n=aE.has(t)||lE.has(t);return(r,s)=>{let o=i==oE||i==r,a=t==oE||t==s;return!o&&e&&"boolean"==typeof r&&(o=r?aE.has(i):lE.has(i)),!a&&n&&"boolean"==typeof s&&(a=s?aE.has(t):lE.has(t)),o&&a}}const $ge=new RegExp("s*:selfs*,?","g");function IO(i,t,e,n){return new Wge(i).build(t,e,n)}class Wge{constructor(t){this._driver=t}build(t,e,n){const r=new qge(e);return this._resetContextStyleTimingState(r),na(this,Qb(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 Zme(){return new pe(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(d=>{l.name=d,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 Qme(){return new pe(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=>{k8(l).forEach(c=>{o.hasOwnProperty(c)||s.add(c)})})}),s.size&&(iE(s.values()),e.errors.push(function Jme(i,t){return new pe(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=na(this,Qb(t.animation),e);return{type:1,matchers:zge(t.expr,e.errors),animation:n,queryCount:e.queryCount,depCount:e.depCount,options:Tf(t.options)}}visitSequence(t,e){return{type:2,steps:t.steps.map(n=>na(this,n,e)),options:Tf(t.options)}}visitGroup(t,e){const n=e.currentTime;let r=0;const s=t.steps.map(o=>{e.currentTime=n;const a=na(this,o,e);return r=Math.max(r,e.currentTime),a});return e.currentTime=r,{type:3,steps:s,options:Tf(t.options)}}visitAnimate(t,e){const n=function Kge(i,t){if(i.hasOwnProperty("duration"))return i;if("number"==typeof i)return RO(nE(i,t).duration,0,"");const e=i;if(e.split(/\s+/).some(s=>"{"==s.charAt(0)&&"{"==s.charAt(1))){const s=RO(0,0,"");return s.dynamic=!0,s.strValue=e,s}const r=nE(e,t);return RO(r.duration,r.delay,r.easing)}(t.timings,e.errors);e.currentAnimateTimings=n;let r,s=t.styles?t.styles:si({});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=si(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===Hc?n.push(a):e.errors.push(new pe(3002,!1)):n.push(D8(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),d=c.get(l);let h=!0;d&&(s!=r&&s>=d.startTime&&r<=d.endTime&&(e.errors.push(function tge(i,t,e,n,r){return new pe(3010,!1)}()),h=!1),s=d.startTime),h&&c.set(l,{startTime:s,endTime:r}),e.options&&function Pge(i,t,e){const n=t.params||{},r=k8(i);r.length&&r.forEach(s=>{n.hasOwnProperty(s)||e.push(function Yme(i){return new pe(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 nge(){return new pe(3011,!1)}()),n;let s=0;const o=[];let a=!1,l=!1,c=0;const d=t.steps.map(y=>{const M=this._makeStyleAst(y,e);let x=null!=M.offset?M.offset:function Xge(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:na(this,Qb(t.animation),e),options:Tf(t.options)}}visitAnimateChild(t,e){return e.depCount++,{type:9,options:Tf(t.options)}}visitAnimateRef(t,e){return{type:10,animation:this.visitReference(t.animation,e),options:Tf(t.options)}}visitQuery(t,e){const n=e.currentQuerySelector,r=t.options||{};e.queryCount++,e.currentQuery=t;const[s,o]=function jge(i){const t=!!i.split(/\s*,\s*/).find(e=>":self"==e);return t&&(i=i.replace($ge,"")),i=i.replace(/@\*/g,tE).replace(/@\w+/g,e=>tE+"-"+e.slice(1)).replace(/:animating/g,EO),[i,t]}(t.selector);e.currentQuerySelector=n.length?n+" "+s:s,ta(e.collectedStyles,e.currentQuerySelector,new Map);const a=na(this,Qb(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:Tf(t.options)}}visitStagger(t,e){e.currentQuery||e.errors.push(function oge(){return new pe(3013,!1)}());const n="full"===t.timings?{duration:0,delay:0,easing:"full"}:nE(t.timings,e.errors,!0);return{type:12,animation:na(this,Qb(t.animation),e),timings:n,options:null}}}class qge{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 Tf(i){return i?(i=Zb(i)).params&&(i.params=function Yge(i){return i?Zb(i):null}(i.params)):i={},i}function RO(i,t,e){return{duration:i,delay:t,easing:e}}function kO(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 cE{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 Jge=new RegExp(":enter","g"),t_e=new RegExp(":leave","g");function PO(i,t,e,n,r,s=new Map,o=new Map,a,l,c=[]){return(new n_e).buildKeyframes(i,t,e,n,r,s,o,a,l,c)}class n_e{buildKeyframes(t,e,n,r,s,o,a,l,c,d=[]){c=c||new cE;const h=new OO(t,e,c,r,s,d,[]);h.options=l;const p=l.delay?dd(l.delay):0;h.currentTimeline.delayNextStep(p),h.currentTimeline.setStyles([o],null,h.errors,l),na(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()):[kO(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:dd(Jb(s,r?.params??{},e.errors));n.delayNextStep(o)}}}_visitSubInstructions(t,e,n){let s=e.currentTimeline.currentTime;const o=null!=n.duration?dd(n.duration):null,a=null!=n.delay?dd(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),na(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=dE);const o=dd(s.delay);r.delayNextStep(o)}t.steps.length&&(t.steps.forEach(o=>na(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?dd(t.options.delay):0;t.steps.forEach(o=>{const a=e.createSubContext(t.options);s&&a.delayNextStep(s),na(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 nE(e.params?Jb(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?dd(r.delay):0;s&&(6===e.previousNode.type||0==n&&e.currentTimeline.hasCurrentStyleProperties())&&(e.currentTimeline.snapshotCurrentStyles(),e.previousNode=dE);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,d)=>{e.currentQueryIndex=d;const h=e.createSubContext(t.options,c);s&&h.delayNextStep(s),c===e.element&&(l=h.currentTimeline),na(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 d=e.currentTimeline;l&&d.delayNextStep(l);const h=d.currentTime;na(this,t.animation,e),e.previousNode=t,n.currentStaggerTime=r.currentTime-h+(r.startTime-n.currentTimeline.startTime)}}const dE={};class OO{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=dE,this.subContextCount=0,this.options={},this.currentQueryIndex=0,this.currentQueryTotal=0,this.currentStaggerTime=0,this.currentTimeline=l||new uE(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=dd(n.duration)),null!=n.delay&&(r.delay=dd(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]=Jb(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 OO(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=dE,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 i_e(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(Jge,"."+this._enterClassName)).replace(t_e,"."+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 age(i){return new pe(3014,!1)}()),a}}class uE{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 uE(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||Hc),this._currentKeyframe.set(e,Hc);this._currentEmptyStepKeyframe=this._currentKeyframe}setStyles(t,e,n,r){e&&this._previousKeyframe.set("easing",e);const s=r&&r.params||{},o=function r_e(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,Hc)}else Pu(r,e)}),e}(t,this._globalTimelineStyles);for(let[a,l]of o){const c=Jb(l,s,n);this._pendingStyles.set(a,c),this._localTimelineStyles.has(a)||this._backFill.set(a,this._globalTimelineStyles.get(a)??Hc),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=Pu(a,new Map,this._backFill);c.forEach((d,h)=>{d===eR?t.add(h):d===Hc&&e.add(h)}),n||c.set("offset",l/this.duration),r.push(c)});const s=t.size?iE(t.values()):[],o=e.size?iE(e.values()):[];if(n){const a=r[0],l=new Map(a);a.set("offset",0),l.set("offset",1),r=[a,l]}return kO(this.element,r,s,o,this.duration,this.startTime,this.easing,!1)}}class i_e extends uE{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=Pu(t[0]);l.set("offset",0),s.push(l);const c=Pu(t[0]);c.set("offset",N8(a)),s.push(c);const d=t.length-1;for(let h=1;h<=d;h++){let p=Pu(t[h]);const m=p.get("offset");p.set("offset",N8((e+m*n)/o)),s.push(p)}n=o,e=0,r="",t=s}return kO(this.element,t,this.preStyleProps,this.postStyleProps,n,e,r,!0)}}function N8(i,t=3){const e=Math.pow(10,t-1);return Math.round(i*e)/e}class FO{}const s_e=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 o_e extends FO{normalizePropertyName(t,e){return TO(t)}normalizeStyleValue(t,e,n,r){let s="";const o=n.toString().trim();if(s_e.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 Kme(i,t){return new pe(3005,!1)}())}return o+s}}function B8(i,t,e,n,r,s,o,a,l,c,d,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:d,totalTime:h,errors:p}}const LO={};class U8{constructor(t,e,n){this._triggerName=t,this.ast=e,this._stateStyles=n}match(t,e,n,r){return function a_e(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,d){const h=[],p=this.ast.options&&this.ast.options.params||LO,g=this.buildStyles(n,a&&a.params||LO,h),b=l&&l.params||LO,v=this.buildStyles(r,b,h),y=new Set,M=new Map,x=new Map,C="void"===r,F={params:l_e(b,p),delay:this.ast.options?.delay},D=d?[]:PO(t,e,this.ast.animation,s,o,g,v,F,c,h);let k=0;if(D.forEach(T=>{k=Math.max(T.duration+T.delay,k)}),h.length)return B8(e,this._triggerName,n,r,C,g,v,[],[],M,x,k,h);D.forEach(T=>{const A=T.element,$=ta(M,A,new Set);T.preStyleProps.forEach(ne=>$.add(ne));const ie=ta(x,A,new Set);T.postStyleProps.forEach(ne=>ie.add(ne)),A!==e&&y.add(A)});const B=iE(y.values());return B8(e,this._triggerName,n,r,C,g,v,D,B,M,x,k)}}function l_e(i,t){const e=Zb(t);for(const n in i)i.hasOwnProperty(n)&&null!=i[n]&&(e[n]=i[n]);return e}class c_e{constructor(t,e,n){this.styles=t,this.defaultParams=e,this.normalizer=n}buildStyles(t,e){const n=new Map,r=Zb(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=Jb(o,r,e));const l=this.normalizer.normalizePropertyName(a,e);o=this.normalizer.normalizeStyleValue(a,l,o,e),n.set(a,o)})}),n}}class u_e{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 c_e(r.style,r.options&&r.options.params||{},n))}),V8(this.states,"true","1"),V8(this.states,"false","0"),e.transitions.forEach(r=>{this.transitionFactories.push(new U8(t,r,this.states))}),this.fallbackTransition=function h_e(i,t,e){return new U8(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 V8(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 f_e=new cE;class p_e{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=IO(this._driver,e,n,r);if(n.length)throw function pge(i){return new pe(3503,!1)}();this._animations.set(t,s)}_buildPlayer(t,e,n){const r=t.element,s=v8(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=PO(this._driver,e,s,SO,JS,new Map,new Map,n,f_e,r),o.forEach(d=>{const h=ta(a,d.element,new Map);d.postStyleProps.forEach(p=>h.set(p,null))})):(r.push(function mge(){return new pe(3300,!1)}()),o=[]),r.length)throw function gge(i){return new pe(3504,!1)}();a.forEach((d,h)=>{d.forEach((p,m)=>{d.set(m,this._driver.computeStyle(h,m,Hc))})});const c=ku(o.map(d=>{const h=a.get(d.element);return this._buildPlayer(d,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 _ge(i){return new pe(3301,!1)}();return e}listen(t,e,n,r){const s=xO(e,"","","");return yO(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 z8="ng-animate-queued",NO="ng-animate-disabled",y_e=[],H8={namespaceId:"",setForRemoval:!1,setForMove:!1,hasAnimation:!1,removedBeforeQueried:!1},b_e={namespaceId:"",setForMove:!1,setForRemoval:!1,hasAnimation:!1,removedBeforeQueried:!0},Pa="__ng_removed";class BO{get params(){return this.options.params}constructor(t,e=""){this.namespaceId=e;const n=t&&t.hasOwnProperty("value");if(this.value=function C_e(i){return i??null}(n?t.value:t),n){const s=Zb(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 e0="void",UO=new BO(e0);class x_e{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,Oa(e,this._hostClassName)}listen(t,e,n,r){if(!this._triggers.has(e))throw function vge(i,t){return new pe(3302,!1)}();if(null==n||0==n.length)throw function yge(i){return new pe(3303,!1)}();if(!function S_e(i){return"start"==i||"done"==i}(n))throw function bge(i,t){return new pe(3400,!1)}();const s=ta(this._elementListeners,t,[]),o={name:e,phase:n,callback:r};s.push(o);const a=ta(this._engine.statesByElement,t,new Map);return a.has(e)||(Oa(t,eE),Oa(t,eE+"-"+e),a.set(e,UO)),()=>{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 xge(i){return new pe(3401,!1)}();return e}trigger(t,e,n,r=!0){const s=this._getTrigger(e),o=new VO(this.id,e,t);let a=this._engine.statesByElement.get(t);a||(Oa(t,eE),Oa(t,eE+"-"+e),this._engine.statesByElement.set(t,a=new Map));let l=a.get(e);const c=new BO(n,this.id);if(!(n&&n.hasOwnProperty("value"))&&l&&c.absorbOptions(l.options),a.set(e,c),l||(l=UO),c.value!==e0&&l.value===c.value){if(!function D_e(i,t){const e=Object.keys(i),n=Object.keys(t);if(e.length!=n.length)return!1;for(let r=0;r{Df(t,v),ic(t,y)})}return}const p=ta(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||(Oa(t,z8),o.onStart(()=>{$g(t,z8)})),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,tE,!0);n.forEach(r=>{if(r[Pa])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 d=this.trigger(t,c,e0,r);d&&a.push(d)}}),a.length)return this._engine.markElementAsRemoved(this.id,t,!0,e,o),n&&ku(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)||UO,d=new BO(e0),h=new VO(this.id,o,t);this._engine.totalQueuedPlayers++,this._queue.push({element:t,triggerName:o,transition:l,fromState:c,toState:d,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[Pa];(!s||s===H8)&&(n.afterFlush(()=>this.clearElementCache(t)),n.destroyInnerAnimations(t),n._onRemovalComplete(t,e))}}insertNode(t,e){Oa(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=xO(s,n.triggerName,n.fromState.value,n.toState.value);l._data=t,yO(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 w_e{_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 x_e(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(hE(e)){const s=this._fetchNamespace(t);if(s)return s.trigger(e,n,r),!0}return!1}insertNode(t,e,n,r){if(!hE(e))return;const s=e[Pa];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),Oa(t,NO)):this.disabledNodes.has(t)&&(this.disabledNodes.delete(t),$g(t,NO))}removeNode(t,e,n,r){if(hE(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[Pa]={namespaceId:t,setForRemoval:r,hasAnimation:n,removedBeforeQueried:!1,previousTriggersValues:s}}listen(t,e,n,r,s){return hE(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,tE,!0);e.forEach(n=>this.destroyActiveAnimationsForElement(n)),0!=this.playersByQueriedElement.size&&(e=this.driver.query(t,EO,!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 ku(this.players).onDone(()=>t());t()})}processLeaveNode(t){const e=t[Pa];if(e&&e.setForRemoval){if(t[Pa]=H8,e.namespaceId){this.destroyInnerAnimations(t);const n=this._fetchNamespace(e.namespaceId);n&&n.clearElementCache(t)}this._onRemovalComplete(t,e.setForRemoval)}t.classList?.contains(NO)&&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?ku(e).onDone(()=>{n.forEach(r=>r())}):n.forEach(r=>r())}}reportError(t){throw function wge(i){return new pe(3402,!1)}()}_flushAnimations(t,e){const n=new cE,r=[],s=new Map,o=[],a=new Map,l=new Map,c=new Map,d=new Set;this.disabledNodes.forEach(Y=>{d.add(Y);const re=this.driver.query(Y,".ng-animate-queued",!0);for(let J=0;J{const J=SO+b++;g.set(re,J),Y.forEach(we=>Oa(we,J))});const v=[],y=new Set,M=new Set;for(let Y=0;Yy.add(we)):M.add(re))}const x=new Map,C=W8(p,Array.from(y));C.forEach((Y,re)=>{const J=JS+b++;x.set(re,J),Y.forEach(we=>Oa(we,J))}),t.push(()=>{m.forEach((Y,re)=>{const J=g.get(re);Y.forEach(we=>$g(we,J))}),C.forEach((Y,re)=>{const J=x.get(re);Y.forEach(we=>$g(we,J))}),v.forEach(Y=>{this.processLeaveNode(Y)})});const F=[],D=[];for(let Y=this._namespaceList.length-1;Y>=0;Y--)this._namespaceList[Y].drainQueuedTransitions(e).forEach(J=>{const we=J.player,Le=J.element;if(F.push(we),this.collectedEnterElements.length){const Oe=Le[Pa];if(Oe&&Oe.setForMove){if(Oe.previousTriggersValues&&Oe.previousTriggersValues.has(J.triggerName)){const yt=Oe.previousTriggersValues.get(J.triggerName),Mt=this.statesByElement.get(J.element);if(Mt&&Mt.has(J.triggerName)){const wt=Mt.get(J.triggerName);wt.value=yt,Mt.set(J.triggerName,wt)}}return void we.destroy()}}const je=!h||!this.driver.containsElement(h,Le),Et=x.get(Le),en=g.get(Le),ae=this._buildInstruction(J,n,en,Et,je);if(ae.errors&&ae.errors.length)return void D.push(ae);if(je)return we.onStart(()=>Df(Le,ae.fromStyles)),we.onDestroy(()=>ic(Le,ae.toStyles)),void r.push(we);if(J.isFallbackTransition)return we.onStart(()=>Df(Le,ae.fromStyles)),we.onDestroy(()=>ic(Le,ae.toStyles)),void r.push(we);const Pe=[];ae.timelines.forEach(Oe=>{Oe.stretchStartingKeyframe=!0,this.disabledNodes.has(Oe.element)||Pe.push(Oe)}),ae.timelines=Pe,n.append(Le,ae.timelines),o.push({instruction:ae,player:we,element:Le}),ae.queriedElements.forEach(Oe=>ta(a,Oe,[]).push(we)),ae.preStyleProps.forEach((Oe,yt)=>{if(Oe.size){let Mt=l.get(yt);Mt||l.set(yt,Mt=new Set),Oe.forEach((wt,Cn)=>Mt.add(Cn))}}),ae.postStyleProps.forEach((Oe,yt)=>{let Mt=c.get(yt);Mt||c.set(yt,Mt=new Set),Oe.forEach((wt,Cn)=>Mt.add(Cn))})});if(D.length){const Y=[];D.forEach(re=>{Y.push(function Mge(i,t){return new pe(3505,!1)}())}),F.forEach(re=>re.destroy()),this.reportError(Y)}const k=new Map,B=new Map;o.forEach(Y=>{const re=Y.element;n.has(re)&&(B.set(re,re),this._beforeAnimationBuild(Y.player.namespaceId,Y.instruction,k))}),r.forEach(Y=>{const re=Y.element;this._getPreviousPlayers(re,!1,Y.namespaceId,Y.triggerName,null).forEach(we=>{ta(k,re,[]).push(we),we.destroy()})});const T=v.filter(Y=>Y8(Y,l,c)),A=new Map;$8(A,this.driver,M,c,Hc).forEach(Y=>{Y8(Y,l,c)&&T.push(Y)});const ie=new Map;m.forEach((Y,re)=>{$8(ie,this.driver,new Set(Y),l,eR)}),T.forEach(Y=>{const re=A.get(Y),J=ie.get(Y);A.set(Y,new Map([...Array.from(re?.entries()??[]),...Array.from(J?.entries()??[])]))});const ne=[],se=[],ge={};o.forEach(Y=>{const{element:re,player:J,instruction:we}=Y;if(n.has(re)){if(d.has(re))return J.onDestroy(()=>ic(re,we.toStyles)),J.disabled=!0,J.overrideTotalTime(we.totalTime),void r.push(J);let Le=ge;if(B.size>1){let Et=re;const en=[];for(;Et=Et.parentNode;){const ae=B.get(Et);if(ae){Le=ae;break}en.push(Et)}en.forEach(ae=>B.set(ae,Le))}const je=this._buildAnimation(J.namespaceId,we,k,s,ie,A);if(J.setRealPlayer(je),Le===ge)ne.push(J);else{const Et=this.playersByElement.get(Le);Et&&Et.length&&(J.parentPlayer=ku(Et)),r.push(J)}}else Df(re,we.fromStyles),J.onDestroy(()=>ic(re,we.toStyles)),se.push(J),d.has(re)&&r.push(J)}),se.forEach(Y=>{const re=s.get(Y.element);if(re&&re.length){const J=ku(re);Y.setRealPlayer(J)}}),r.forEach(Y=>{Y.parentPlayer?Y.syncPlayerEvents(Y.parentPlayer):Y.destroy()});for(let Y=0;Y!je.destroyed);Le.length?E_e(this,re,Le):this.processLeaveNode(re)}return v.length=0,ne.forEach(Y=>{this.players.push(Y),Y.onDone(()=>{Y.destroy();const re=this.players.indexOf(Y);this.players.splice(re,1)}),Y.play()}),ne}elementContainsData(t,e){let n=!1;const r=e[Pa];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==e0;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,d=c!==s,h=ta(n,c,[]);this._getPreviousPlayers(c,d,o,a,e.toState).forEach(m=>{const g=m.getRealPlayer();g.beforeDestroy&&g.beforeDestroy(),m.destroy(),h.push(m)})}Df(s,e.fromStyles)}_buildAnimation(t,e,n,r,s,o){const a=e.triggerName,l=e.element,c=[],d=new Set,h=new Set,p=e.timelines.map(g=>{const b=g.element;d.add(b);const v=b[Pa];if(v&&v.removedBeforeQueried)return new Qy(g.duration,g.delay);const y=b!==l,M=function A_e(i){const t=[];return j8(i,t),t}((n.get(b)||y_e).map(k=>k.getRealPlayer())).filter(k=>!!k.element&&k.element===b),x=s.get(b),C=o.get(b),F=v8(0,this._normalizer,0,g.keyframes,x,C),D=this._buildPlayer(g,F,M);if(g.subTimeline&&r&&h.add(b),y){const k=new VO(t,a,b);k.setRealPlayer(D),c.push(k)}return D});c.forEach(g=>{ta(this.playersByQueriedElement,g.element,[]).push(g),g.onDone(()=>function M_e(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))}),d.forEach(g=>Oa(g,A8));const m=ku(p);return m.onDestroy(()=>{d.forEach(g=>$g(g,A8)),ic(l,e.toStyles)}),h.forEach(g=>{ta(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 Qy(t.duration,t.delay)}}class VO{constructor(t,e,n){this.namespaceId=t,this.triggerName=e,this.element=n,this._player=new Qy,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=>yO(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){ta(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 hE(i){return i&&1===i.nodeType}function G8(i,t){const e=i.style.display;return i.style.display=t??"none",e}function $8(i,t,e,n,r){const s=[];e.forEach(l=>s.push(G8(l)));const o=[];n.forEach((l,c)=>{const d=new Map;l.forEach(h=>{const p=t.computeStyle(c,h,r);d.set(h,p),(!p||0==p.length)&&(c[Pa]=b_e,o.push(c))}),i.set(c,d)});let a=0;return e.forEach(l=>G8(l,s[a++])),o}function W8(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 Oa(i,t){i.classList?.add(t)}function $g(i,t){i.classList?.remove(t)}function E_e(i,t,e){ku(e).onDone(()=>i.processLeaveNode(t))}function j8(i,t){for(let e=0;er.add(s)):t.set(i,n),e.delete(i),!0}class fE{constructor(t,e,n){this.bodyNode=t,this._driver=e,this._normalizer=n,this._triggerCache={},this.onRemovalComplete=(r,s)=>{},this._transitionEngine=new w_e(t,e,n),this._timelineEngine=new p_e(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=[],d=IO(this._driver,s,l,c);if(l.length)throw function hge(i,t){return new pe(3404,!1)}();a=function d_e(i,t,e){return new u_e(i,t,e)}(r,d,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]=y8(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]=y8(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 I_e=(()=>{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&&(Df(this._element,this._startStyles),this._endStyles=null),this._endStyles&&(Df(this._element,this._endStyles),this._endStyles=null),ic(this._element,this._initialStyles),this._state=3)}}return i.initialStylesByElement=new WeakMap,i})();function zO(i){let t=null;return i.forEach((e,n)=>{(function R_e(i){return"display"===i||"position"===i})(n)&&(t=t||new Map,t.set(n,e))}),t}class q8{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:P8(this.element,r))}),this.currentSnapshot=t}triggerCallback(t){const e="start"===t?this._onStartFns:this._onDoneFns;e.forEach(n=>n()),e.length=0}}class k_e{validateStyleProperty(t){return!0}validateAnimatableStyleProperty(t){return!0}matchesElement(t,e){return!1}containsElement(t,e){return M8(t,e)}getParentElement(t){return MO(t)}query(t,e,n){return C8(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,d=o.filter(m=>m instanceof q8);(function Lge(i,t){return 0===i||0===t})(n,r)&&d.forEach(m=>{m.currentSnapshot.forEach((g,b)=>c.set(b,g))});let h=function kge(i){return i.length?i[0]instanceof Map?i:i.map(t=>D8(t)):[]}(e).map(m=>Pu(m));h=function Nge(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,P8(i,a)))}}return t}(t,h,c);const p=function T_e(i,t){let e=null,n=null;return Array.isArray(t)&&t.length?(e=zO(t[0]),t.length>1&&(n=zO(t[t.length-1]))):t instanceof Map&&(e=zO(t)),e||n?new I_e(i,e,n):null}(t,h);return new q8(t,h,l,p)}}let P_e=(()=>{class i extends ZU{constructor(e,n){super(),this._nextAnimationId=0,this._renderer=e.createRenderer(n.body,{id:"0",encapsulation:Ys.None,styles:[],data:{animation:[]}})}build(e){const n=this._nextAnimationId.toString();this._nextAnimationId++;const r=Array.isArray(e)?JU(e):e;return X8(this._renderer,null,n,"register",[r]),new O_e(n,this._renderer)}}return i.\u0275fac=function(e){return new(e||i)(ee(Fl),ee(Wt))},i.\u0275prov=Ie({token:i,factory:i.\u0275fac}),i})();class O_e extends IQ{constructor(t,e){super(),this._id=t,this._renderer=e}create(t,e){return new F_e(this._id,t,e||{},this._renderer)}}class F_e{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 X8(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 X8(i,t,e,n,r){return i.setProperty(t,`@@${e}:${n}`,r)}const K8="@.disabled";let L_e=(()=>{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 d=this._rendererCache.get(s);return d||(d=new Z8("",s,this.engine,()=>this._rendererCache.delete(s)),this._rendererCache.set(s,d)),d}const o=n.id,a=n.id+"-"+this._currentId;this._currentId++,this.engine.register(a,e);const l=d=>{Array.isArray(d)?d.forEach(l):this.engine.registerTrigger(o,a,e,d.name,d)};return n.data.animation.forEach(l),new N_e(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)(ee(Fl),ee(fE),ee(ht))},i.\u0275prov=Ie({token:i,factory:i.\u0275fac}),i})();class Z8{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==K8?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 N_e extends Z8{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==K8?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 B_e(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 U_e(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 Q8=[{provide:ZU,useClass:P_e},{provide:FO,useFactory:function z_e(){return new o_e}},{provide:fE,useClass:(()=>{class i extends fE{constructor(e,n,r,s){super(e.body,n,r)}ngOnDestroy(){this.flush()}}return i.\u0275fac=function(e){return new(e||i)(ee(Wt),ee(CO),ee(FO),ee(lm))},i.\u0275prov=Ie({token:i,factory:i.\u0275fac}),i})()},{provide:Fl,useFactory:function H_e(i,t,e){return new L_e(i,t,e)},deps:[nM,fE,ht]}],HO=[{provide:CO,useFactory:()=>new k_e},{provide:Rr,useValue:"BrowserAnimations"},...Q8],J8=[{provide:CO,useClass:S8},{provide:Rr,useValue:"NoopAnimations"},...Q8];let G_e=(()=>{class i{static withConfig(e){return{ngModule:i,providers:e.disableAnimations?J8:HO}}}return i.\u0275fac=function(e){return new(e||i)},i.\u0275mod=nn({type:i}),i.\u0275inj=Xt({providers:HO,imports:[RB]}),i})();const e$=new me("CdkAccordion");let $_e=0,W_e=(()=>{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=Kt.EMPTY,this.closed=new We,this.opened=new We,this.destroyed=new We,this.expandedChange=new We,this.id="cdk-accordion-child-"+$_e++,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)(E(e$,12),E(ri),E(UR))},i.\u0275dir=ve({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:e$,useValue:void 0}])]}),i})(),j_e=(()=>{class i{}return i.\u0275fac=function(e){return new(e||i)},i.\u0275mod=nn({type:i}),i.\u0275inj=Xt({}),i})();const Y_e=["body"];function q_e(i,t){}const X_e=[[["mat-expansion-panel-header"]],"*",[["mat-action-row"]]],K_e=["mat-expansion-panel-header","*","mat-action-row"];function Z_e(i,t){1&i&&ke(0,"span",2),2&i&&U("@indicatorRotate",he()._getExpandedState())}const Q_e=[[["mat-panel-title"]],[["mat-panel-description"]],"*"],J_e=["mat-panel-title","mat-panel-description","*"],t$=new me("MAT_ACCORDION"),n$="225ms cubic-bezier(0.4,0.0,0.2,1)",i$={indicatorRotate:Aa("indicatorRotate",[Ps("collapsed, void",si({transform:"rotate(0deg)"})),Ps("expanded",si({transform:"rotate(180deg)"})),Pr("expanded <=> collapsed, void => collapsed",jr(n$))]),bodyExpansion:Aa("bodyExpansion",[Ps("collapsed, void",si({height:"0px",visibility:"hidden"})),Ps("expanded",si({height:"*",visibility:"visible"})),Pr("expanded <=> collapsed, void => collapsed",jr(n$))])},r$=new me("MAT_EXPANSION_PANEL");let eve=(()=>{class i{constructor(e,n){this._template=e,this._expansionPanel=n}}return i.\u0275fac=function(e){return new(e||i)(E(wo),E(r$,8))},i.\u0275dir=ve({type:i,selectors:[["ng-template","matExpansionPanelContent",""]]}),i})(),tve=0;const s$=new me("MAT_EXPANSION_PANEL_DEFAULT_OPTIONS");let o$=(()=>{class i extends W_e{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 We,this.afterCollapse=new We,this._inputChanges=new Re,this._headerId="mat-expansion-panel-header-"+tve++,this._bodyAnimationDone=new Re,this.accordion=e,this._document=o,this._bodyAnimationDone.pipe(Vc((c,d)=>c.fromState===d.fromState&&c.toState===d.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(Eo(null),vn(()=>this.expanded&&!this._portal),Pi(1)).subscribe(()=>{this._portal=new Cm(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)(E(t$,12),E(ri),E(UR),E(Wr),E(Wt),E(Rr,8),E(s$,8))},i.\u0275cmp=ot({type:i,selectors:[["mat-expansion-panel"]],contentQueries:function(e,n,r){if(1&e&&$i(r,eve,5),2&e){let s;Tt(s=It())&&(n._lazyContent=s.first)}},viewQuery:function(e,n){if(1&e&&ii(Y_e,5),2&e){let r;Tt(r=It())&&(n._body=r.first)}},hostAttrs:[1,"mat-expansion-panel"],hostVars:6,hostBindings:function(e,n){2&e&&un("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:t$,useValue:void 0},{provide:r$,useExisting:i}]),at,yi],ngContentSelectors:K_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&&(nr(X_e),Gt(0),W(1,"div",0,1),Ue("@bodyExpansion.done",function(s){return n._bodyAnimationDone.next(s)}),W(3,"div",2),Gt(4,1),fe(5,q_e,0,0,"ng-template",3),q(),Gt(6,2),q()),2&e&&(G(1),U("@bodyExpansion",n._getExpandedState())("id",n.id),St("aria-labelledby",n._headerId),G(4),U("cdkPortalOutlet",n._portal))},dependencies:[Sm],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:[i$.bodyExpansion]},changeDetection:0}),i})();class nve{}const ive=XI(nve);let rve=(()=>{class i extends ive{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=Kt.EMPTY;const c=e.accordion?e.accordion._stateChanges.pipe(vn(d=>!(!d.hideToggle&&!d.togglePosition))):fo;this.tabIndex=parseInt(l||"")||0,this._parentChangeSubscription=Mr(e.opened,e.closed,c,e._inputChanges.pipe(vn(d=>!!(d.hideToggle||d.disabled||d.togglePosition)))).subscribe(()=>this._changeDetectorRef.markForCheck()),e.closed.pipe(vn(()=>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:jo(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)(E(o$,1),E(pt),E(zc),E(ri),E(s$,8),E(Rr,8),ma("tabindex"))},i.\u0275cmp=ot({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&&Ue("click",function(){return n._toggle()})("keydown",function(s){return n._keydown(s)}),2&e&&(St("id",n.panel._headerId)("tabindex",n.tabIndex)("aria-controls",n._getPanelId())("aria-expanded",n._isExpanded())("aria-disabled",n.panel.disabled),Go("height",n._getHeaderHeight()),un("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:[at],ngContentSelectors:J_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&&(nr(Q_e),W(0,"span",0),Gt(1),Gt(2,1),Gt(3,2),q(),fe(4,Z_e,1,1,"span",1)),2&e&&(un("mat-content-hide-toggle",!n._showToggle()),G(4),U("ngIf",n._showToggle()))},dependencies:[wi],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:[i$.indicatorRotate]},changeDetection:0}),i})(),sve=(()=>{class i{}return i.\u0275fac=function(e){return new(e||i)},i.\u0275dir=ve({type:i,selectors:[["mat-panel-description"]],hostAttrs:[1,"mat-expansion-panel-header-description"]}),i})(),ove=(()=>{class i{}return i.\u0275fac=function(e){return new(e||i)},i.\u0275dir=ve({type:i,selectors:[["mat-panel-title"]],hostAttrs:[1,"mat-expansion-panel-header-title"]}),i})(),ave=(()=>{class i{}return i.\u0275fac=function(e){return new(e||i)},i.\u0275mod=nn({type:i}),i.\u0275inj=Xt({imports:[So,Kn,j_e,kh]}),i})();function lve(i,t){if(1&i&&(W(0,"mat-option",19),Ge(1),q()),2&i){const e=t.$implicit;U("value",e),G(1),ir(" ",e," ")}}function cve(i,t){if(1&i){const e=mi();W(0,"mat-form-field",16)(1,"mat-select",17),Ue("selectionChange",function(r){return cn(e),zt(he(2)._changePageSize(r.value))}),fe(2,lve,2,2,"mat-option",18),q()()}if(2&i){const e=he(2);U("appearance",e._formFieldAppearance)("color",e.color),G(1),U("value",e.pageSize)("disabled",e.disabled)("aria-labelledby",e._pageSizeLabelId)("panelClass",e.selectConfig.panelClass||"")("disableOptionCentering",e.selectConfig.disableOptionCentering),G(1),U("ngForOf",e._displayedPageSizeOptions)}}function dve(i,t){if(1&i&&(W(0,"div",20),Ge(1),q()),2&i){const e=he(2);G(1),_i(e.pageSize)}}function uve(i,t){if(1&i&&(W(0,"div",12)(1,"div",13),Ge(2),q(),fe(3,cve,3,8,"mat-form-field",14),fe(4,dve,2,1,"div",15),q()),2&i){const e=he();G(1),O1("id",e._pageSizeLabelId),G(1),ir(" ",e._intl.itemsPerPageLabel," "),G(1),U("ngIf",e._displayedPageSizeOptions.length>1),G(1),U("ngIf",e._displayedPageSizeOptions.length<=1)}}function hve(i,t){if(1&i){const e=mi();W(0,"button",21),Ue("click",function(){return cn(e),zt(he().firstPage())}),Ri(),W(1,"svg",7),ke(2,"path",22),q()()}if(2&i){const e=he();U("matTooltip",e._intl.firstPageLabel)("matTooltipDisabled",e._previousButtonsDisabled())("matTooltipPosition","above")("disabled",e._previousButtonsDisabled()),St("aria-label",e._intl.firstPageLabel)}}function fve(i,t){if(1&i){const e=mi();Ri(),Ka(),W(0,"button",23),Ue("click",function(){return cn(e),zt(he().lastPage())}),Ri(),W(1,"svg",7),ke(2,"path",24),q()()}if(2&i){const e=he();U("matTooltip",e._intl.lastPageLabel)("matTooltipDisabled",e._nextButtonsDisabled())("matTooltipPosition","above")("disabled",e._nextButtonsDisabled()),St("aria-label",e._intl.lastPageLabel)}}let mE=(()=>{class i{constructor(){this.changes=new Re,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 mve={provide:mE,deps:[[new Ss,new _a,mE]],useFactory:function pve(i){return i||new mE}},_ve=new me("MAT_PAGINATOR_DEFAULT_OPTIONS"),vve=zM(vQ(class{}));let yve=(()=>{class i extends vve{get pageIndex(){return this._pageIndex}set pageIndex(e){this._pageIndex=Math.max(ks(e),0),this._changeDetectorRef.markForCheck()}get length(){return this._length}set length(e){this._length=ks(e),this._changeDetectorRef.markForCheck()}get pageSize(){return this._pageSize}set pageSize(e){this._pageSize=Math.max(ks(e),0),this._updateDisplayedPageSizeOptions()}get pageSizeOptions(){return this._pageSizeOptions}set pageSizeOptions(e){this._pageSizeOptions=(e||[]).map(n=>ks(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 We,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){bo()},i.\u0275dir=ve({type:i,inputs:{color:"color",pageIndex:"pageIndex",length:"length",pageSize:"pageSize",pageSizeOptions:"pageSizeOptions",hidePageSize:"hidePageSize",showFirstLastButtons:"showFirstLastButtons",selectConfig:"selectConfig"},outputs:{page:"page"},features:[at]}),i})(),bve=0,xve=(()=>{class i extends yve{constructor(e,n,r){super(e,n,r),this._pageSizeLabelId="mat-paginator-page-size-label-"+bve++,this._formFieldAppearance=r?.formFieldAppearance||"outline"}}return i.\u0275fac=function(e){return new(e||i)(E(mE),E(ri),E(_ve,8))},i.\u0275cmp=ot({type:i,selectors:[["mat-paginator"]],hostAttrs:["role","group",1,"mat-mdc-paginator"],inputs:{disabled:"disabled"},exportAs:["matPaginator"],features:[at],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&&(W(0,"div",0)(1,"div",1),fe(2,uve,5,4,"div",2),W(3,"div",3)(4,"div",4),Ge(5),q(),fe(6,hve,3,5,"button",5),W(7,"button",6),Ue("click",function(){return n.previousPage()}),Ri(),W(8,"svg",7),ke(9,"path",8),q()(),Ka(),W(10,"button",9),Ue("click",function(){return n.nextPage()}),Ri(),W(11,"svg",7),ke(12,"path",10),q()(),fe(13,fve,3,5,"button",11),q()()()),2&e&&(G(2),U("ngIf",!n.hidePageSize),G(3),ir(" ",n._intl.getRangeLabel(n.pageIndex,n.pageSize,n.length)," "),G(1),U("ngIf",n.showFirstLastButtons),G(1),U("matTooltip",n._intl.previousPageLabel)("matTooltipDisabled",n._previousButtonsDisabled())("matTooltipPosition","above")("disabled",n._previousButtonsDisabled()),St("aria-label",n._intl.previousPageLabel),G(3),U("matTooltip",n._intl.nextPageLabel)("matTooltipDisabled",n._nextButtonsDisabled())("matTooltipPosition","above")("disabled",n._nextButtonsDisabled()),St("aria-label",n._intl.nextPageLabel),G(3),U("ngIf",n.showFirstLastButtons))},dependencies:[Co,wi,WM,Yl,cb,Fm,Os],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})(),wve=(()=>{class i{}return i.\u0275fac=function(e){return new(e||i)},i.\u0275mod=nn({type:i}),i.\u0275inj=Xt({providers:[mve],imports:[So,jM,LH,RV]}),i})(),Mve=(()=>{class i{}return i.\u0275fac=function(e){return new(e||i)},i.\u0275mod=nn({type:i,bootstrap:[$me]}),i.\u0275inj=Xt({providers:[Gc,PH,{provide:TH,useValue:Oie}],imports:[RB,gK,G_e,Kz,yJ,hC,dH,ave,CV,AV,RV,jM,KV,wve,Jre,fH,LH,fV,_pe,yme,Zz,ZI,zie]}),i})();Ku($c,[Co,wi,Os,Kb,QS],[zl]),Ku(NR,[dm,Co,wi,vy,Wc,fu,Yl,o$,rve,ove,sve,Os,xve,cb,Fm,Kb],[]),Ku(_C,[Co,wi,yC,vC,hH,Kb],[]),Ku(u8,[Co,wi,Yo,Os,cb,Fm,Kb,QS],[zl]),I7().bootstrapModule(Mve).catch(i=>console.error(i))},489:function(Po,zs,ps){var ln;Po=ps.nmd(Po),function(){var V,Kr=200,Un="Expected a function",La="__lodash_hash_undefined__",Mi="__lodash_placeholder__",Ci=1,ms=2,Gs=4,$s=1,Oo=2,Pn=1,lr=2,sc=4,sa=8,bl=16,oa=32,xl=64,Na=128,aa=256,hd=512,yE=800,Yg=16,Tn=1/0,Ua=9007199254740991,xE=17976931348623157e292,Rf=NaN,la=4294967295,Re=la-1,n0=la>>>1,r0=[["ary",Na],["bind",Pn],["bindKey",lr],["curry",sa],["curryRight",bl],["flip",hd],["partial",oa],["partialRight",xl],["rearg",aa]],Jn="[object Arguments]",jn="[object Array]",wE="[object AsyncFunction]",et="[object Boolean]",oc="[object Date]",ME="[object DOMException]",fd="[object Error]",kf="[object Function]",s0="[object GeneratorFunction]",Fo="[object Map]",Fu="[object Number]",CE="[object Null]",Va="[object Object]",o0="[object Promise]",SE="[object Proxy]",pd="[object RegExp]",Lo="[object Set]",ac="[object String]",Pf="[object Symbol]",qg="[object Undefined]",md="[object WeakMap]",Lu="[object ArrayBuffer]",gd="[object DataView]",ca="[object Float32Array]",Of="[object Float64Array]",Xg="[object Int8Array]",Ff="[object Int16Array]",Kg="[object Int32Array]",Zg="[object Uint8Array]",Nu="[object Uint8ClampedArray]",Qg="[object Uint16Array]",Jg="[object Uint32Array]",AE=/\b__p \+= '';/g,DE=/\b(__p \+=) '' \+/g,TE=/(__e\(.*?\)|\b__t\)) \+\n'';/g,a0=/&(?:amp|lt|gt|quot|#39);/g,l0=/[&<>"']/g,IE=RegExp(a0.source),RE=RegExp(l0.source),YO=/<%-([\s\S]+?)%>/g,e_=/<%([\s\S]+?)%>/g,t_=/<%=([\s\S]+?)%>/g,c0=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,d0=/^\w*$/,u0=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,n_=/[\\^$.*+?()[\]{}|]/g,h0=RegExp(n_.source),Lf=/^\s+/,f0=/\s/,p0=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,wr=/\{\n\/\* \[wrapped with (.+)\] \*/,kE=/,? & /,PE=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,OE=/[()=,{}\[\]\/\s]/,FE=/\\(\\)?/g,m0=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,g0=/\w*$/,LE=/^[-+]0x[0-9a-f]+$/i,za=/^0b[01]+$/i,NE=/^\[object .+?Constructor\]$/,Ji=/^0o[0-7]+$/i,_d=/^(?:0|[1-9]\d*)$/,fo=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,i_=/($^)/,BE=/['\n\r\u2028\u2029\\]/g,Bu="\\ud800-\\udfff",v0="\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff",s_="\\u2700-\\u27bf",o_="a-z\\xdf-\\xf6\\xf8-\\xff",a_="A-Z\\xc0-\\xd6\\xd8-\\xde",y0="\\ufe0e\\ufe0f",b0="\\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",Mr="["+Bu+"]",Nf="["+b0+"]",vd="["+v0+"]",li="\\d+",l_="["+s_+"]",fi="["+o_+"]",Bf="[^"+Bu+b0+li+s_+o_+a_+"]",c_="\\ud83c[\\udffb-\\udfff]",Rt="[^"+Bu+"]",Vu="(?:\\ud83c[\\udde6-\\uddff]){2}",zu="[\\ud800-\\udbff][\\udc00-\\udfff]",Hu="["+a_+"]",pe="(?:"+fi+"|"+Bf+")",Uf="(?:"+Hu+"|"+Bf+")",Zt="(?:['\u2019](?:d|ll|m|re|s|t|ve))?",Yn="(?:['\u2019](?:D|LL|M|RE|S|T|VE))?",x0="(?:"+vd+"|"+c_+")?",GE="["+y0+"]?",WE=GE+x0+"(?:\\u200d(?:"+[Rt,Vu,zu].join("|")+")"+GE+x0+")*",jE="(?:"+[l_,Vu,zu].join("|")+")"+WE,qO="(?:"+[Rt+vd+"?",vd,Vu,zu,Mr].join("|")+")",wl=RegExp("['\u2019]","g"),XO=RegExp(vd,"g"),w0=RegExp(c_+"(?="+c_+")|"+qO+WE,"g"),KO=RegExp([Hu+"?"+fi+"+"+Zt+"(?="+[Nf,Hu,"$"].join("|")+")",Uf+"+"+Yn+"(?="+[Nf,Hu+pe,"$"].join("|")+")",Hu+"?"+pe+"+"+Zt,Hu+"+"+Yn,"\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])","\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",li,jE].join("|"),"g"),ZO=RegExp("[\\u200d"+Bu+v0+y0+"]"),YE=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,QO=["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"],qE=-1,Si={};Si[ca]=Si[Of]=Si[Xg]=Si[Ff]=Si[Kg]=Si[Zg]=Si[Nu]=Si[Qg]=Si[Jg]=!0,Si[Jn]=Si[jn]=Si[Lu]=Si[et]=Si[gd]=Si[oc]=Si[fd]=Si[kf]=Si[Fo]=Si[Fu]=Si[Va]=Si[pd]=Si[Lo]=Si[ac]=Si[md]=!1;var Sn={};Sn[Jn]=Sn[jn]=Sn[Lu]=Sn[gd]=Sn[et]=Sn[oc]=Sn[ca]=Sn[Of]=Sn[Xg]=Sn[Ff]=Sn[Kg]=Sn[Fo]=Sn[Fu]=Sn[Va]=Sn[pd]=Sn[Lo]=Sn[ac]=Sn[Pf]=Sn[Zg]=Sn[Nu]=Sn[Qg]=Sn[Jg]=!0,Sn[fd]=Sn[kf]=Sn[md]=!1;var tF={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},Ie=parseFloat,nF=parseInt,Xt="object"==typeof global&&global&&global.Object===Object&&global,zf="object"==typeof self&&self&&self.Object===Object&&self,Cr=Xt||zf||Function("return this")(),d_=zs&&!zs.nodeType&&zs,$u=d_&&Po&&!Po.nodeType&&Po,u_=$u&&$u.exports===d_,yd=u_&&Xt.process,gs=function(){try{return $u&&$u.require&&$u.require("util").types||yd&&yd.binding&&yd.binding("util")}catch{}}(),h_=gs&&gs.isArrayBuffer,M0=gs&&gs.isDate,kt=gs&&gs.isMap,Hf=gs&&gs.isRegExp,C0=gs&&gs.isSet,js=gs&&gs.isTypedArray;function _s(X,ue,oe){switch(oe.length){case 0:return X.call(ue);case 1:return X.call(ue,oe[0]);case 2:return X.call(ue,oe[0],oe[1]);case 3:return X.call(ue,oe[0],oe[1],oe[2])}return X.apply(ue,oe)}function iF(X,ue,oe,Ne){for(var Ht=-1,Vn=null==X?0:X.length;++Ht-1}function Wu(X,ue,oe){for(var Ne=-1,Ht=null==X?0:X.length;++Ne-1;);return oe}function da(X,ue){for(var oe=X.length;oe--&&Pt(ue,X[oe],0)>-1;);return oe}var QE=m_({\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"}),ot=m_({"&":"&","<":"<",">":">",'"':""","'":"'"});function Ku(X){return"\\"+tF[X]}function wd(X){return ZO.test(X)}function jf(X){var ue=-1,oe=Array(X.size);return X.forEach(function(Ne,Ht){oe[++ue]=[Ht,Ne]}),oe}function ve(X,ue){return function(oe){return X(ue(oe))}}function Hi(X,ue){for(var oe=-1,Ne=X.length,Ht=0,Vn=[];++oe",""":'"',"'":"'"}),ys=function X(ue){var u,oe=(ue=null==ue?Cr:ys.defaults(Cr.Object(),ue,ys.pick(Cr,QO))).Array,Ne=ue.Date,Ht=ue.Error,Vn=ue.Function,_t=ue.Math,oi=ue.Object,dc=ue.RegExp,E0=ue.String,Sr=ue.TypeError,er=oe.prototype,No=oi.prototype,qs=ue["__core-js_shared__"],Sl=Vn.prototype.toString,ti=No.hasOwnProperty,vi=0,tA=(u=/[^.]+$/.exec(qs&&qs.keys&&qs.keys.IE_PROTO||""))?"Symbol(src)_1."+u:"",Cd=No.toString,A0=Sl.call(oi),qf=Cr._,Xf=dc("^"+Sl.call(ti).replace(n_,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),Wa=u_?ue.Buffer:V,Bi=ue.Symbol,v_=ue.Uint8Array,bs=Wa?Wa.allocUnsafe:V,xs=ve(oi.getPrototypeOf,oi),Kf=oi.create,Sd=No.propertyIsEnumerable,uc=er.splice,go=Bi?Bi.isConcatSpreadable:V,Qu=Bi?Bi.iterator:V,Ed=Bi?Bi.toStringTag:V,Zf=function(){try{var u=wc(oi,"defineProperty");return u({},"",{}),u}catch{}}(),nA=ue.clearTimeout!==Cr.clearTimeout&&ue.clearTimeout,sF=Ne&&Ne.now!==Cr.Date.now&&Ne.now,oF=ue.setTimeout!==Cr.setTimeout&&ue.setTimeout,y_=_t.ceil,b_=_t.floor,D0=oi.getOwnPropertySymbols,aF=Wa?Wa.isBuffer:V,iA=ue.isFinite,lF=er.join,cF=ve(oi.keys,oi),dr=_t.max,Zr=_t.min,dF=Ne.now,T0=ue.parseInt,x_=_t.random,uF=er.reverse,I0=wc(ue,"DataView"),Qf=wc(ue,"Map"),ja=wc(ue,"Promise"),Ad=wc(ue,"Set"),yi=wc(ue,"WeakMap"),Dd=wc(oi,"create"),Jf=yi&&new yi,Td={},R0=Mc(I0),k0=Mc(Qf),rA=Mc(ja),w_=Mc(Ad),sA=Mc(yi),Qr=Bi?Bi.prototype:V,Id=Qr?Qr.valueOf:V,M_=Qr?Qr.toString:V;function I(u){if(ki(u)&&!rn(u)&&!(u instanceof Rn)){if(u instanceof Ei)return u;if(ti.call(u,"__wrapped__"))return ns(u)}return new Ei(u)}var Rd=function(){function u(){}return function(f){if(!xi(f))return{};if(Kf)return Kf(f);u.prototype=f;var _=new u;return u.prototype=V,_}}();function hc(){}function Ei(u,f){this.__wrapped__=u,this.__actions__=[],this.__chain__=!!f,this.__index__=0,this.__values__=V}function Rn(u){this.__wrapped__=u,this.__actions__=[],this.__dir__=1,this.__filtered__=!1,this.__iteratees__=[],this.__takeCount__=la,this.__views__=[]}function fc(u){var f=-1,_=null==u?0:u.length;for(this.clear();++f<_;){var w=u[f];this.set(w[0],w[1])}}function Dt(u){var f=-1,_=null==u?0:u.length;for(this.clear();++f<_;){var w=u[f];this.set(w[0],w[1])}}function ua(u){var f=-1,_=null==u?0:u.length;for(this.clear();++f<_;){var w=u[f];this.set(w[0],w[1])}}function zt(u){var f=-1,_=null==u?0:u.length;for(this.__data__=new ua;++f<_;)this.add(u[f])}function Jr(u){var f=this.__data__=new Dt(u);this.size=f.size}function A_(u,f){var _=rn(u),w=!_&&Ec(u),S=!_&&!w&&Ja(u),P=!_&&!w&&!S&&zo(u),H=_||w||S||P,j=H?Ys(u.length,E0):[],Q=j.length;for(var _e in u)(f||ti.call(u,_e))&&(!H||!("length"==_e||S&&("offset"==_e||"parent"==_e)||P&&("buffer"==_e||"byteLength"==_e||"byteOffset"==_e)||Qa(_e,Q)))&&j.push(_e);return j}function Vr(u){var f=u.length;return f?u[ih(0,f-1)]:V}function Ya(u,f){return Mp(Zs(u),Dl(f,0,u.length))}function N0(u){return Mp(Zs(u))}function Al(u,f,_){(_!==V&&!Vo(u[f],_)||_===V&&!(f in u))&&Bo(u,f,_)}function Xs(u,f,_){var w=u[f];(!ti.call(u,f)||!Vo(w,_)||_===V&&!(f in u))&&Bo(u,f,_)}function tp(u,f){for(var _=u.length;_--;)if(Vo(u[_][0],f))return _;return-1}function B0(u,f,_,w){return qa(u,function(S,P,H){f(w,S,_(S),H)}),w}function U0(u,f){return u&&ci(f,ur(f),u)}function Bo(u,f,_){"__proto__"==f&&Zf?Zf(u,f,{configurable:!0,enumerable:!0,value:_,writable:!0}):u[f]=_}function Ju(u,f){for(var _=-1,w=f.length,S=oe(w),P=null==u;++_=f?u:f)),u}function Ms(u,f,_,w,S,P){var H,j=f&Ci,Q=f&ms,_e=f&Gs;if(_&&(H=S?_(u,w,S,P):_(u)),H!==V)return H;if(!xi(u))return u;var ye=rn(u);if(ye){if(H=function ax(u){var f=u.length,_=new u.constructor(f);return f&&"string"==typeof u[0]&&ti.call(u,"index")&&(_.index=u.index,_.input=u.input),_}(u),!j)return Zs(u,H)}else{var be=zr(u),qe=be==kf||be==s0;if(Ja(u))return me(u,j);if(be==Va||be==Jn||qe&&!S){if(H=Q||qe?{}:TA(u),!j)return Q?function ah(u,f){return ci(u,rx(u),f)}(u,function fA(u,f){return u&&ci(f,Ds(f),u)}(H,u)):function U_(u,f){return ci(u,q_(u),f)}(u,U0(H,u))}else{if(!Sn[be])return S?u:{};H=function lx(u,f,_){var w=u.constructor;switch(f){case Lu:return J0(u);case et:case oc:return new w(+u);case gd:return function _F(u,f){var _=f?J0(u.buffer):u.buffer;return new u.constructor(_,u.byteOffset,u.byteLength)}(u,_);case ca:case Of:case Xg:case Ff:case Kg:case Zg:case Nu:case Qg:case Jg:return MA(u,_);case Fo:return new w;case Fu:case ac:return new w(u);case pd:return function vF(u){var f=new u.constructor(u.source,g0.exec(u));return f.lastIndex=u.lastIndex,f}(u);case Lo:return new w;case Pf:return function yF(u){return Id?oi(Id.call(u)):{}}(u)}}(u,be,j)}}P||(P=new Jr);var gt=P.get(u);if(gt)return gt;P.set(u,H),Zx(u)?u.forEach(function(Bt){H.add(Ms(Bt,f,_,Bt,u,P))}):Ev(u)&&u.forEach(function(Bt,En){H.set(En,Ms(Bt,f,_,En,u,P))});var mn=ye?V:(_e?Q?W_:_p:Q?Ds:ur)(u);return In(mn||u,function(Bt,En){mn&&(Bt=u[En=Bt]),Xs(H,En,Ms(Bt,f,_,En,u,P))}),H}function D_(u,f,_){var w=_.length;if(null==u)return!w;for(u=oi(u);w--;){var S=_[w],H=u[S];if(H===V&&!(S in u)||!(0,f[S])(H))return!1}return!0}function np(u,f,_){if("function"!=typeof u)throw new Sr(Un);return uh(function(){u.apply(V,_)},f)}function Pd(u,f,_,w){var S=-1,P=Ml,H=!0,j=u.length,Q=[],_e=f.length;if(!j)return Q;_&&(f=pi(f,Br(_))),w?(P=Wu,H=!1):f.length>=Kr&&(P=cc,H=!1,f=new zt(f));e:for(;++S-1},Dt.prototype.set=function cA(u,f){var _=this.__data__,w=tp(_,u);return w<0?(++this.size,_.push([u,f])):_[w][1]=f,this},ua.prototype.clear=function dA(){this.size=0,this.__data__={hash:new fc,map:new(Qf||Dt),string:new fc}},ua.prototype.delete=function uA(u){var f=Y_(this,u).delete(u);return this.size-=f?1:0,f},ua.prototype.get=function Se(u){return Y_(this,u).get(u)},ua.prototype.has=function zn(u){return Y_(this,u).has(u)},ua.prototype.set=function cn(u,f){var _=Y_(this,u),w=_.size;return _.set(u,f),this.size+=_.size==w?0:1,this},zt.prototype.add=zt.prototype.push=function Er(u){return this.__data__.set(u,La),this},zt.prototype.has=function L0(u){return this.__data__.has(u)},Jr.prototype.clear=function ha(){this.__data__=new Dt,this.size=0},Jr.prototype.delete=function S_(u){var f=this.__data__,_=f.delete(u);return this.size=f.size,_},Jr.prototype.get=function E_(u){return this.__data__.get(u)},Jr.prototype.has=function hA(u){return this.__data__.has(u)},Jr.prototype.set=function fF(u,f){var _=this.__data__;if(_ instanceof Dt){var w=_.__data__;if(!Qf||w.length0&&_(j)?f>1?qn(j,f-1,_,w,S):Cl(S,j):w||(S[S.length]=j)}return S}var Xa=V_(),Ai=V_(!0);function Ri(u,f){return u&&Xa(u,f,ur)}function I_(u,f){return u&&Ai(u,f,ur)}function Ka(u,f){return lc(f,function(_){return Pl(u[_])})}function pc(u,f){for(var _=0,w=(f=ga(f,u)).length;null!=u&&_f}function ip(u,f){return null!=u&&ti.call(u,f)}function rp(u,f){return null!=u&&f in oi(u)}function sp(u,f,_){for(var w=_?Wu:Ml,S=u[0].length,P=u.length,H=P,j=oe(P),Q=1/0,_e=[];H--;){var ye=u[H];H&&f&&(ye=pi(ye,Br(f))),Q=Zr(ye.length,Q),j[H]=!_&&(f||S>=120&&ye.length>=120)?new zt(H&&ye):V}ye=u[0];var be=-1,qe=j[0];e:for(;++be=j?Q:Q*("desc"==_[w]?-1:1)}return u.index-f.index}(P,H,_)})}function Y0(u,f,_){for(var w=-1,S=f.length,P={};++w-1;)j!==u&&uc.call(j,Q,1),uc.call(u,Q,1);return u}function nh(u,f){for(var _=u?f.length:0,w=_-1;_--;){var S=f[_];if(_==w||S!==P){var P=S;Qa(S)?uc.call(u,S,1):sh(u,S)}}return u}function ih(u,f){return u+b_(x_()*(f-u+1))}function rh(u,f){var _="";if(!u||f<1||f>Ua)return _;do{f%2&&(_+=u),(f=b_(f/2))&&(u+=u)}while(f);return _}function pn(u,f){return xp(K_(u,f,is),u+"")}function xA(u){return Vr(Tc(u))}function X0(u,f){var _=Tc(u);return Mp(_,Dl(f,0,_.length))}function Bd(u,f,_,w){if(!xi(u))return u;for(var S=-1,P=(f=ga(f,u)).length,H=P-1,j=u;null!=j&&++SS?0:S+f),(_=_>S?S:_)<0&&(_+=S),S=f>_?0:_-f>>>0,f>>>=0;for(var P=oe(S);++w>>1,H=u[P];null!==H&&!As(H)&&(_?H<=f:H=Kr){var _e=f?null:G_(u);if(_e)return Hn(_e);H=!1,S=cc,Q=new zt}else Q=f?[]:j;e:for(;++w=w?u:ts(u,f,_)}var Q0=nA||function(u){return Cr.clearTimeout(u)};function me(u,f){if(f)return u.slice();var _=u.length,w=bs?bs(_):new u.constructor(_);return u.copy(w),w}function J0(u){var f=new u.constructor(u.byteLength);return new v_(f).set(new v_(u)),f}function MA(u,f){var _=f?J0(u.buffer):u.buffer;return new u.constructor(_,u.byteOffset,u.length)}function CA(u,f){if(u!==f){var _=u!==V,w=null===u,S=u==u,P=As(u),H=f!==V,j=null===f,Q=f==f,_e=As(f);if(!j&&!_e&&!P&&u>f||P&&H&&Q&&!j&&!_e||w&&H&&Q||!_&&Q||!S)return 1;if(!w&&!P&&!_e&&u1?_[S-1]:V,H=S>2?_[2]:V;for(P=u.length>3&&"function"==typeof P?(S--,P):V,H&&Dr(_[0],_[1],H)&&(P=S<3?V:P,S=1),f=oi(f);++w-1?S[P?f[H]:H]:V}}function Cs(u){return vo(function(f){var _=f.length,w=_,S=Ei.prototype.thru;for(u&&f.reverse();w--;){var P=f[w];if("function"!=typeof P)throw new Sr(Un);if(S&&!H&&"wrapper"==Za(P))var H=new Ei([],!0)}for(w=H?w:_;++w<_;){var j=Za(P=f[w]),Q="wrapper"==j?j_(P):V;H=Q&&dh(Q[0])&&Q[1]==(Na|sa|oa|aa)&&!Q[4].length&&1==Q[9]?H[Za(Q[0])].apply(H,Q[3]):1==P.length&&dh(P)?H[j]():H.thru(P)}return function(){var _e=arguments,ye=_e[0];if(H&&1==_e.length&&rn(ye))return H.plant(ye).value();for(var be=0,qe=_?f[be].apply(this,_e):ye;++be<_;)qe=f[be].call(this,qe);return qe}})}function Gd(u,f,_,w,S,P,H,j,Q,_e){var ye=f&Na,be=f&Pn,qe=f&lr,gt=f&(sa|bl),Nt=f&hd,mn=qe?V:fp(u);return function Bt(){for(var En=arguments.length,Fn=oe(En),rs=En;rs--;)Fn[rs]=arguments[rs];if(gt)var ss=va(Bt),no=function Xu(X,ue){for(var oe=X.length,Ne=0;oe--;)X[oe]===ue&&++Ne;return Ne}(Fn,ss);if(w&&(Fn=Vd(Fn,w,S,gt)),P&&(Fn=SA(Fn,P,H,gt)),En-=no,gt&&En<_e){var Di=Hi(Fn,ss);return tx(u,f,Gd,Bt.placeholder,_,Fn,Di,j,Q,_e-En)}var Ts=be?_:this,xo=qe?Ts[u]:u;return En=Fn.length,j?Fn=function Es(u,f){for(var _=u.length,w=Zr(f.length,_),S=Zs(u);w--;){var P=f[w];u[w]=Qa(P,_)?S[P]:V}return u}(Fn,j):Nt&&En>1&&Fn.reverse(),ye&&Qj))return!1;var _e=P.get(u),ye=P.get(f);if(_e&&ye)return _e==f&&ye==u;var be=-1,qe=!0,gt=_&Oo?new zt:V;for(P.set(u,f),P.set(f,u);++be-1&&u%1==0&&u1?"& ":"")+f[w],f=f.join(_>2?", ":" "),u.replace(p0,"{\n/* [wrapped with "+f+"] */\n")}(w,function OA(u,f){return In(r0,function(_){var w="_."+_[0];f&_[1]&&!Ml(u,w)&&u.push(w)}),u.sort()}(function sx(u){var f=u.match(wr);return f?f[1].split(kE):[]}(w),_)))}function fx(u){var f=0,_=0;return function(){var w=dF(),S=Yg-(w-_);if(_=w,S>0){if(++f>=yE)return arguments[0]}else f=0;return u.apply(V,arguments)}}function Mp(u,f){var _=-1,w=u.length,S=w-1;for(f=f===V?w:f;++_1?u[f-1]:V;return _="function"==typeof _?(u.pop(),_):V,ph(u,_)});function Lx(u){var f=I(u);return f.__chain__=!0,f}function Dp(u,f){return f(u)}var Nx=vo(function(u){var f=u.length,_=f?u[0]:0,w=this.__wrapped__,S=function(P){return Ju(P,u)};return!(f>1||this.__actions__.length)&&w instanceof Rn&&Qa(_)?((w=w.slice(_,+_+(f?1:0))).__actions__.push({func:Dp,args:[S],thisArg:V}),new Ei(w,this.__chain__).thru(function(P){return f&&!P.length&&P.push(V),P})):this.thru(S)}),eD=up(function(u,f,_){ti.call(u,_)?++u[_]:Bo(u,_,1)}),Ux=AA(bx),Ip=AA(tv);function _v(u,f){return(rn(u)?In:qa)(u,Ot(f,3))}function kl(u,f){return(rn(u)?rF:T_)(u,Ot(f,3))}var nD=up(function(u,f,_){ti.call(u,_)?u[_].push(f):Bo(u,_,[f])}),rD=pn(function(u,f,_){var w=-1,S="function"==typeof f,P=Js(u)?oe(u.length):[];return qa(u,function(H){P[++w]=S?_s(f,H,_):fa(H,f,_)}),P}),sD=up(function(u,f,_){Bo(u,_,f)});function Rp(u,f){return(rn(u)?pi:eh)(u,Ot(f,3))}var ya=up(function(u,f,_){u[_?0:1].push(f)},function(){return[[],[]]}),fD=pn(function(u,f){if(null==u)return[];var _=f.length;return _>1&&Dr(u,f[0],f[1])?f=[]:_>2&&Dr(f[0],f[1],f[2])&&(f=[f[0]]),F_(u,qn(f,1),[])}),kp=sF||function(){return Cr.Date.now()};function gh(u,f,_){return f=_?V:f,_o(u,Na,V,V,V,V,f=u&&null==f?u.length:f)}function ba(u,f){var _;if("function"!=typeof f)throw new Sr(Un);return u=dn(u),function(){return--u>0&&(_=f.apply(this,arguments)),u<=1&&(f=V),_}}var Sc=pn(function(u,f,_){var w=Pn;if(_.length){var S=Hi(_,va(Sc));w|=oa}return _o(u,w,f,_,S)}),vv=pn(function(u,f,_){var w=Pn|lr;if(_.length){var S=Hi(_,va(vv));w|=oa}return _o(f,w,u,_,S)});function mD(u,f,_){var w,S,P,H,j,Q,_e=0,ye=!1,be=!1,qe=!0;if("function"!=typeof u)throw new Sr(Un);function gt(Di){var Ts=w,xo=S;return w=S=V,_e=Di,H=u.apply(xo,Ts)}function Bt(Di){var Ts=Di-Q;return Q===V||Ts>=f||Ts<0||be&&Di-_e>=P}function En(){var Di=kp();if(Bt(Di))return Fn(Di);j=uh(En,function mn(Di){var E1=f-(Di-Q);return be?Zr(E1,P-(Di-_e)):E1}(Di))}function Fn(Di){return j=V,qe&&w?gt(Di):(w=S=V,H)}function no(){var Di=kp(),Ts=Bt(Di);if(w=arguments,S=this,Q=Di,Ts){if(j===V)return function Nt(Di){return _e=Di,j=uh(En,f),ye?gt(Di):H}(Q);if(be)return Q0(j),j=uh(En,f),gt(Q)}return j===V&&(j=uh(En,f)),H}return f=yo(f)||0,xi(_)&&(ye=!!_.leading,P=(be="maxWait"in _)?dr(yo(_.maxWait)||0,f):P,qe="trailing"in _?!!_.trailing:qe),no.cancel=function rs(){j!==V&&Q0(j),_e=0,w=Q=S=j=V},no.flush=function ss(){return j===V?H:Fn(kp())},no}var DF=pn(function(u,f){return np(u,1,f)}),TF=pn(function(u,f,_){return np(u,yo(f)||0,_)});function Wd(u,f){if("function"!=typeof u||null!=f&&"function"!=typeof f)throw new Sr(Un);var _=function(){var w=arguments,S=f?f.apply(this,w):w[0],P=_.cache;if(P.has(S))return P.get(S);var H=u.apply(this,w);return _.cache=P.set(S,H)||P,H};return _.cache=new(Wd.Cache||ua),_}function wv(u){if("function"!=typeof u)throw new Sr(Un);return function(){var f=arguments;switch(f.length){case 0:return!u.call(this);case 1:return!u.call(this,f[0]);case 2:return!u.call(this,f[0],f[1]);case 3:return!u.call(this,f[0],f[1],f[2])}return!u.apply(this,f)}}Wd.Cache=ua;var Gx=Ud(function(u,f){var _=(f=1==f.length&&rn(f[0])?pi(f[0],Br(Ot())):pi(qn(f,1),Br(Ot()))).length;return pn(function(w){for(var S=-1,P=Zr(w.length,_);++S=f}),Ec=Ld(function(){return arguments}())?Ld:function(u){return ki(u)&&ti.call(u,"callee")&&!Sd.call(u,"callee")},rn=oe.isArray,RF=h_?Br(h_):function _A(u){return ki(u)&&es(u)==Lu};function Js(u){return null!=u&&Bp(u.length)&&!Pl(u)}function bi(u){return ki(u)&&Js(u)}var Ja=aF||Kd,qx=M0?Br(M0):function pF(u){return ki(u)&&es(u)==oc};function Lp(u){if(!ki(u))return!1;var f=es(u);return f==fd||f==ME||"string"==typeof u.message&&"string"==typeof u.name&&!eo(u)}function Pl(u){if(!xi(u))return!1;var f=es(u);return f==kf||f==s0||f==wE||f==SE}function Np(u){return"number"==typeof u&&u==dn(u)}function Bp(u){return"number"==typeof u&&u>-1&&u%1==0&&u<=Ua}function xi(u){var f=typeof u;return null!=u&&("object"==f||"function"==f)}function ki(u){return null!=u&&"object"==typeof u}var Ev=kt?Br(kt):function vA(u){return ki(u)&&zr(u)==Fo};function _h(u){return"number"==typeof u||ki(u)&&es(u)==Fu}function eo(u){if(!ki(u)||es(u)!=Va)return!1;var f=xs(u);if(null===f)return!0;var _=ti.call(f,"constructor")&&f.constructor;return"function"==typeof _&&_ instanceof _&&Sl.call(_)==A0}var Vp=Hf?Br(Hf):function gF(u){return ki(u)&&es(u)==pd},Zx=C0?Br(C0):function P_(u){return ki(u)&&zr(u)==Lo};function zp(u){return"string"==typeof u||!rn(u)&&ki(u)&&es(u)==ac}function As(u){return"symbol"==typeof u||ki(u)&&es(u)==Pf}var zo=js?Br(js):function G0(u){return ki(u)&&Bp(u.length)&&!!Si[es(u)]},Iv=gp(op),TD=gp(function(u,f){return u<=f});function Rv(u){if(!u)return[];if(Js(u))return zp(u)?mo(u):Zs(u);if(Qu&&u[Qu])return function eA(X){for(var ue,oe=[];!(ue=X.next()).done;)oe.push(ue.value);return oe}(u[Qu]());var f=zr(u);return(f==Fo?jf:f==Lo?Hn:Tc)(u)}function el(u){return u?(u=yo(u))===Tn||u===-Tn?(u<0?-1:1)*xE:u==u?u:0:0===u?u:0}function dn(u){var f=el(u),_=f%1;return f==f?_?f-_:f:0}function ID(u){return u?Dl(dn(u),0,la):0}function yo(u){if("number"==typeof u)return u;if(As(u))return Rf;if(xi(u)){var f="function"==typeof u.valueOf?u.valueOf():u;u=xi(f)?f+"":f}if("string"!=typeof u)return 0===u?u:+u;u=$n(u);var _=za.test(u);return _||Ji.test(u)?nF(u.slice(2),_?2:8):LE.test(u)?Rf:+u}function Ol(u){return ci(u,Ds(u))}function On(u){return null==u?"":Ks(u)}var pt=Ar(function(u,f){if(bp(f)||Js(f))ci(f,ur(f),u);else for(var _ in f)ti.call(f,_)&&Xs(u,_,f[_])}),Qx=Ar(function(u,f){ci(f,Ds(f),u)}),Fl=Ar(function(u,f,_,w){ci(f,Ds(f),u,w)}),tl=Ar(function(u,f,_,w){ci(f,ur(f),u,w)}),kD=vo(Ju),Dc=pn(function(u,f){u=oi(u);var _=-1,w=f.length,S=w>2?f[2]:V;for(S&&Dr(f[0],f[1],S)&&(w=1);++_1),P}),ci(u,W_(u),_),w&&(_=Ms(_,Ci|ms|Gs,_a));for(var S=f.length;S--;)sh(_,f[S]);return _}),HD=vo(function(u,f){return null==u?{}:function j0(u,f){return Y0(u,f,function(_,w){return Lv(u,w)})}(u,f)});function Nv(u,f){if(null==u)return{};var _=pi(W_(u),function(w){return[w]});return f=Ot(f),Y0(u,_,function(w,S){return f(w,S[0])})}var nw=lh(ur),Bv=lh(Ds);function Tc(u){return null==u?[]:qu(u,ur(u))}var G=Hd(function(u,f,_){return f=f.toLowerCase(),u+(_?Uv(f):f)});function Uv(u){return qd(On(u).toLowerCase())}function Vv(u){return(u=On(u))&&u.replace(fo,QE).replace(XO,"")}var e1=Hd(function(u,f,_){return u+(_?"-":"")+f.toLowerCase()}),rw=Hd(function(u,f,_){return u+(_?" ":"")+f.toLowerCase()}),t1=zd("toLowerCase"),zv=Hd(function(u,f,_){return u+(_?"_":"")+f.toLowerCase()}),s1=Hd(function(u,f,_){return u+(_?" ":"")+qd(f)}),lw=Hd(function(u,f,_){return u+(_?" ":"")+f.toUpperCase()}),qd=zd("toUpperCase");function cw(u,f,_){return u=On(u),(f=_?V:f)===V?function nn(X){return YE.test(X)}(u)?function fn(X){return X.match(KO)||[]}(u):function ZE(X){return X.match(PE)||[]}(u):u.match(f)||[]}var Gv=pn(function(u,f){try{return _s(u,V,f)}catch(_){return Lp(_)?_:new Ht(_)}}),c1=vo(function(u,f){return In(f,function(_){_=Uo(_),Bo(u,_,Sc(u[_],u))}),u});function $v(u){return function(){return u}}var dw=Cs(),f1=Cs(!0);function is(u){return u}function Hp(u){return O_("function"==typeof u?u:Ms(u,Ci))}var jv=pn(function(u,f){return function(_){return fa(_,u,f)}}),p1=pn(function(u,f){return function(_){return fa(u,_,f)}});function uw(u,f,_){var w=ur(f),S=Ka(f,w);null==_&&(!xi(f)||!S.length&&w.length)&&(_=f,f=u,u=this,S=Ka(f,ur(f)));var P=!(xi(_)&&"chain"in _&&!_.chain),H=Pl(u);return In(S,function(j){var Q=f[j];u[j]=Q,H&&(u.prototype[j]=function(){var _e=this.__chain__;if(P||_e){var ye=u(this.__wrapped__);return(ye.__actions__=Zs(this.__actions__)).push({func:Q,args:arguments,thisArg:u}),ye.__chain__=_e,ye}return Q.apply(u,Cl([this.value()],arguments))})}),u}function bo(){}var hw=pp(pi),g1=pp(XE),_1=pp(Gf);function vh(u){return cx(u)?p_(Uo(u)):function pa(u){return function(f){return pc(f,u)}}(u)}var Yv=ex(),yh=ex(!0);function bh(){return[]}function Kd(){return!1}var v1=z_(function(u,f){return u+f},0),y1=H_("ceil"),mw=z_(function(u,f){return u/f},1),b1=H_("floor"),C1=z_(function(u,f){return u*f},1),zF=H_("round"),Qv=z_(function(u,f){return u-f},0);return I.after=function pD(u,f){if("function"!=typeof f)throw new Sr(Un);return u=dn(u),function(){if(--u<1)return f.apply(this,arguments)}},I.ary=gh,I.assign=pt,I.assignIn=Qx,I.assignInWith=Fl,I.assignWith=tl,I.at=kD,I.before=ba,I.bind=Sc,I.bindAll=c1,I.bindKey=vv,I.castArray=function vD(){if(!arguments.length)return[];var u=arguments[0];return rn(u)?u:[u]},I.chain=Lx,I.chunk=function J_(u,f,_){f=(_?Dr(u,f,_):f===V)?1:dr(dn(f),0);var w=null==u?0:u.length;if(!w||f<1)return[];for(var S=0,P=0,H=oe(y_(w/f));SS?0:S+_),(w=w===V||w>S?S:dn(w))<0&&(w+=S),w=_>w?0:ID(w);_>>0)?(u=On(u))&&("string"==typeof f||null!=f&&!Vp(f))&&!(f=Ks(f))&&wd(u)?bc(mo(u),0,_):u.split(f,_):[]},I.spread=function Wx(u,f){if("function"!=typeof u)throw new Sr(Un);return f=null==f?0:dr(dn(f),0),pn(function(_){var w=_[f],S=bc(_,0,f);return w&&Cl(S,w),_s(u,this,S)})},I.tail=function Cc(u){var f=null==u?0:u.length;return f?ts(u,1,f):[]},I.take=function Tx(u,f,_){return u&&u.length?ts(u,0,(f=_||f===V?1:dn(f))<0?0:f):[]},I.takeRight=function Ix(u,f,_){var w=null==u?0:u.length;return w?ts(u,(f=w-(f=_||f===V?1:dn(f)))<0?0:f,w):[]},I.takeRightWhile=function qA(u,f){return u&&u.length?oh(u,Ot(f,3),!1,!0):[]},I.takeWhile=function EF(u,f){return u&&u.length?oh(u,Ot(f,3)):[]},I.tap=function ZA(u,f){return f(u),u},I.throttle=function Pp(u,f,_){var w=!0,S=!0;if("function"!=typeof u)throw new Sr(Un);return xi(_)&&(w="leading"in _?!!_.leading:w,S="trailing"in _?!!_.trailing:S),mD(u,f,{leading:w,maxWait:f,trailing:S})},I.thru=Dp,I.toArray=Rv,I.toPairs=nw,I.toPairsIn=Bv,I.toPath=function pw(u){return rn(u)?pi(u,Uo):As(u)?[u]:Zs(px(On(u)))},I.toPlainObject=Ol,I.transform=function WD(u,f,_){var w=rn(u),S=w||Ja(u)||zo(u);if(f=Ot(f,4),null==_){var P=u&&u.constructor;_=S?w?new P:[]:xi(u)&&Pl(P)?Rd(xs(u)):{}}return(S?In:Ri)(u,function(H,j,Q){return f(_,H,j,Q)}),_},I.unary=function jx(u){return gh(u,1)},I.union=Sp,I.unionBy=XA,I.unionWith=Rx,I.uniq=function kx(u){return u&&u.length?ni(u):[]},I.uniqBy=function Px(u,f){return u&&u.length?ni(u,Ot(f,2)):[]},I.uniqWith=function dv(u,f){return f="function"==typeof f?f:V,u&&u.length?ni(u,V,f):[]},I.unset=function jD(u,f){return null==u||sh(u,f)},I.unzip=Ep,I.unzipWith=ph,I.update=function YD(u,f,_){return null==u?u:Z0(u,f,dp(_))},I.updateWith=function qD(u,f,_,w){return w="function"==typeof w?w:V,null==u?u:Z0(u,f,dp(_),w)},I.values=Tc,I.valuesIn=function XD(u){return null==u?[]:qu(u,Ds(u))},I.without=Ap,I.words=cw,I.wrap=function Cv(u,f){return Mv(dp(f),u)},I.xor=Ox,I.xorBy=uv,I.xorWith=hv,I.zip=fv,I.zipObject=function mh(u,f){return yc(u||[],f||[],Xs)},I.zipObjectDeep=function KA(u,f){return yc(u||[],f||[],Bd)},I.zipWith=Fx,I.entries=nw,I.entriesIn=Bv,I.extend=Qx,I.extendWith=Fl,uw(I,I),I.add=v1,I.attempt=Gv,I.camelCase=G,I.capitalize=Uv,I.ceil=y1,I.clamp=function KD(u,f,_){return _===V&&(_=f,f=V),_!==V&&(_=(_=yo(_))==_?_:0),f!==V&&(f=(f=yo(f))==f?f:0),Dl(yo(u),f,_)},I.clone=function Xn(u){return Ms(u,Gs)},I.cloneDeep=function bD(u){return Ms(u,Ci|Gs)},I.cloneDeepWith=function Op(u,f){return Ms(u,Ci|Gs,f="function"==typeof f?f:V)},I.cloneWith=function yD(u,f){return Ms(u,Gs,f="function"==typeof f?f:V)},I.conformsTo=function Yx(u,f){return null==f||D_(u,f,ur(f))},I.deburr=Vv,I.defaultTo=function h1(u,f){return null==u||u!=u?f:u},I.divide=mw,I.endsWith=function QD(u,f,_){u=On(u),f=Ks(f);var w=u.length,S=_=_===V?w:Dl(dn(_),0,w);return(_-=f.length)>=0&&u.slice(_,S)==f},I.eq=Vo,I.escape=function JD(u){return(u=On(u))&&RE.test(u)?u.replace(l0,ot):u},I.escapeRegExp=function iw(u){return(u=On(u))&&h0.test(u)?u.replace(n_,"\\$&"):u},I.every=function mv(u,f,_){var w=rn(u)?XE:V0;return _&&Dr(u,f,_)&&(f=V),w(u,Ot(f,3))},I.find=Ux,I.findIndex=bx,I.findKey=function kv(u,f){return ee(u,Ot(f,3),Ri)},I.findLast=Ip,I.findLastIndex=tv,I.findLastKey=function Pv(u,f){return ee(u,Ot(f,3),I_)},I.floor=b1,I.forEach=_v,I.forEachRight=kl,I.forIn=function FD(u,f){return null==u?u:Xa(u,Ot(f,3),Ds)},I.forInRight=function Ov(u,f){return null==u?u:Ai(u,Ot(f,3),Ds)},I.forOwn=function nl(u,f){return u&&Ri(u,Ot(f,3))},I.forOwnRight=function LD(u,f){return u&&I_(u,Ot(f,3))},I.get=Fv,I.gt=xD,I.gte=wD,I.has=function UD(u,f){return null!=u&&ox(u,f,ip)},I.hasIn=Lv,I.head=wx,I.identity=is,I.includes=function iD(u,f,_,w){u=Js(u)?u:Tc(u),_=_&&!w?dn(_):0;var S=u.length;return _<0&&(_=dr(S+_,0)),zp(u)?_<=S&&u.indexOf(f,_)>-1:!!S&&Pt(u,f,_)>-1},I.indexOf=function fh(u,f,_){var w=null==u?0:u.length;if(!w)return-1;var S=null==_?0:dn(_);return S<0&&(S=dr(w+S,0)),Pt(u,f,S)},I.inRange=function ZD(u,f,_){return f=el(f),_===V?(_=f,f=0):_=el(_),function R_(u,f,_){return u>=Zr(f,_)&&u=-Ua&&u<=Ua},I.isSet=Zx,I.isString=zp,I.isSymbol=As,I.isTypedArray=zo,I.isUndefined=function ED(u){return u===V},I.isWeakMap=function AD(u){return ki(u)&&zr(u)==md},I.isWeakSet=function DD(u){return ki(u)&&"[object WeakSet]"==es(u)},I.join=function Mx(u,f){return null==u?"":lF.call(u,f)},I.kebabCase=e1,I.last=Tr,I.lastIndexOf=function ov(u,f,_){var w=null==u?0:u.length;if(!w)return-1;var S=w;return _!==V&&(S=(S=dn(_))<0?dr(w+S,0):Zr(S,w-1)),f==f?function Md(X,ue,oe){for(var Ne=oe+1;Ne--;)if(X[Ne]===ue)return Ne;return Ne}(u,f,S):Yu(u,Wf,S,!0)},I.lowerCase=rw,I.lowerFirst=t1,I.lt=Iv,I.lte=TD,I.max=function gw(u){return u&&u.length?Od(u,is,Fd):V},I.maxBy=function _w(u,f){return u&&u.length?Od(u,Ot(f,2),Fd):V},I.mean=function x1(u){return xd(u,is)},I.meanBy=function w1(u,f){return xd(u,Ot(f,2))},I.min=function to(u){return u&&u.length?Od(u,is,op):V},I.minBy=function M1(u,f){return u&&u.length?Od(u,Ot(f,2),op):V},I.stubArray=bh,I.stubFalse=Kd,I.stubObject=function fw(){return{}},I.stubString=function qv(){return""},I.stubTrue=function Xv(){return!0},I.multiply=C1,I.nth=function Cx(u,f){return u&&u.length?bA(u,dn(f)):V},I.noConflict=function E(){return Cr._===this&&(Cr._=qf),this},I.noop=bo,I.now=kp,I.pad=function n1(u,f,_){u=On(u);var w=(f=dn(f))?cr(u):0;if(!f||w>=f)return u;var S=(f-w)/2;return mp(b_(S),_)+u+mp(y_(S),_)},I.padEnd=function FF(u,f,_){u=On(u);var w=(f=dn(f))?cr(u):0;return f&&wf){var w=u;u=f,f=w}if(_||u%1||f%1){var S=x_();return Zr(u+S*(f-u+Ie("1e-"+((S+"").length-1))),f)}return ih(u,f)},I.reduce=function oD(u,f,_){var w=rn(u)?f_:S0,S=arguments.length<3;return w(u,Ot(f,4),_,S,qa)},I.reduceRight=function aD(u,f,_){var w=rn(u)?KE:S0,S=arguments.length<3;return w(u,Ot(f,4),_,S,T_)},I.repeat=function Gi(u,f,_){return f=(_?Dr(u,f,_):f===V)?1:dn(f),rh(On(u),f)},I.replace=function r1(){var u=arguments,f=On(u[0]);return u.length<3?f:f.replace(u[1],u[2])},I.result=function GD(u,f,_){var w=-1,S=(f=ga(f,u)).length;for(S||(S=1,u=V);++wUa)return[];var _=la,w=Zr(u,la);f=Ot(f),u-=la;for(var S=Ys(w,f);++_=P)return u;var j=_-cr(w);if(j<1)return w;var Q=H?bc(H,0,j).join(""):u.slice(0,j);if(S===V)return Q+w;if(H&&(j+=Q.length-j),Vp(S)){if(u.slice(j).search(S)){var _e,ye=Q;for(S.global||(S=dc(S.source,On(g0.exec(S))+"g")),S.lastIndex=0;_e=S.exec(ye);)var be=_e.index;Q=Q.slice(0,be===V?j:be)}}else if(u.indexOf(Ks(S),j)!=j){var qe=Q.lastIndexOf(S);qe>-1&&(Q=Q.slice(0,qe))}return Q+w},I.unescape=function l1(u){return(u=On(u))&&IE.test(u)?u.replace(a0,Yf):u},I.uniqueId=function Zv(u){var f=++vi;return On(u)+f},I.upperCase=lw,I.upperFirst=qd,I.each=_v,I.eachRight=kl,I.first=wx,uw(I,function(){var u={};return Ri(I,function(f,_){ti.call(I.prototype,_)||(u[_]=f)}),u}(),{chain:!1}),I.VERSION="4.17.21",In(["bind","bindKey","curry","curryRight","partial","partialRight"],function(u){I[u].placeholder=I}),In(["drop","take"],function(u,f){Rn.prototype[u]=function(_){_=_===V?1:dr(dn(_),0);var w=this.__filtered__&&!f?new Rn(this):this.clone();return w.__filtered__?w.__takeCount__=Zr(_,w.__takeCount__):w.__views__.push({size:Zr(_,la),type:u+(w.__dir__<0?"Right":"")}),w},Rn.prototype[u+"Right"]=function(_){return this.reverse()[u](_).reverse()}}),In(["filter","map","takeWhile"],function(u,f){var _=f+1,w=1==_||3==_;Rn.prototype[u]=function(S){var P=this.clone();return P.__iteratees__.push({iteratee:Ot(S,3),type:_}),P.__filtered__=P.__filtered__||w,P}}),In(["head","last"],function(u,f){var _="take"+(f?"Right":"");Rn.prototype[u]=function(){return this[_](1).value()[0]}}),In(["initial","tail"],function(u,f){var _="drop"+(f?"":"Right");Rn.prototype[u]=function(){return this.__filtered__?new Rn(this):this[_](1)}}),Rn.prototype.compact=function(){return this.filter(is)},Rn.prototype.find=function(u){return this.filter(u).head()},Rn.prototype.findLast=function(u){return this.reverse().find(u)},Rn.prototype.invokeMap=pn(function(u,f){return"function"==typeof u?new Rn(this):this.map(function(_){return fa(_,u,f)})}),Rn.prototype.reject=function(u){return this.filter(wv(Ot(u)))},Rn.prototype.slice=function(u,f){u=dn(u);var _=this;return _.__filtered__&&(u>0||f<0)?new Rn(_):(u<0?_=_.takeRight(-u):u&&(_=_.drop(u)),f!==V&&(_=(f=dn(f))<0?_.dropRight(-f):_.take(f-u)),_)},Rn.prototype.takeRightWhile=function(u){return this.reverse().takeWhile(u).reverse()},Rn.prototype.toArray=function(){return this.take(la)},Ri(Rn.prototype,function(u,f){var _=/^(?:filter|find|map|reject)|While$/.test(f),w=/^(?:head|last)$/.test(f),S=I[w?"take"+("last"==f?"Right":""):f],P=w||/^find/.test(f);S&&(I.prototype[f]=function(){var H=this.__wrapped__,j=w?[1]:arguments,Q=H instanceof Rn,_e=j[0],ye=Q||rn(H),be=function(En){var Fn=S.apply(I,Cl([En],j));return w&&qe?Fn[0]:Fn};ye&&_&&"function"==typeof _e&&1!=_e.length&&(Q=ye=!1);var qe=this.__chain__,Nt=P&&!qe,mn=Q&&!this.__actions__.length;if(!P&&ye){H=mn?H:new Rn(this);var Bt=u.apply(H,j);return Bt.__actions__.push({func:Dp,args:[be],thisArg:V}),new Ei(Bt,qe)}return Nt&&mn?u.apply(this,j):(Bt=this.thru(be),Nt?w?Bt.value()[0]:Bt.value():Bt)})}),In(["pop","push","shift","sort","splice","unshift"],function(u){var f=er[u],_=/^(?:push|sort|unshift)$/.test(u)?"tap":"thru",w=/^(?:pop|shift)$/.test(u);I.prototype[u]=function(){var S=arguments;if(w&&!this.__chain__){var P=this.value();return f.apply(rn(P)?P:[],S)}return this[_](function(H){return f.apply(rn(H)?H:[],S)})}}),Ri(Rn.prototype,function(u,f){var _=I[f];if(_){var w=_.name+"";ti.call(Td,w)||(Td[w]=[]),Td[w].push({name:f,func:_})}}),Td[Gd(V,lr).name]=[{name:"wrapper",func:V}],Rn.prototype.clone=function P0(){var u=new Rn(this.__wrapped__);return u.__actions__=Zs(this.__actions__),u.__dir__=this.__dir__,u.__filtered__=this.__filtered__,u.__iteratees__=Zs(this.__iteratees__),u.__takeCount__=this.__takeCount__,u.__views__=Zs(this.__views__),u},Rn.prototype.reverse=function kd(){if(this.__filtered__){var u=new Rn(this);u.__dir__=-1,u.__filtered__=!0}else(u=this.clone()).__dir__*=-1;return u},Rn.prototype.value=function ws(){var u=this.__wrapped__.value(),f=this.__dir__,_=rn(u),w=f<0,S=_?u.length:0,P=function yp(u,f,_){for(var w=-1,S=_.length;++w=this.__values__.length;return{done:u,value:u?V:this.__values__[this.__index__++]}},I.prototype.plant=function QA(u){for(var f,_=this;_ instanceof hc;){var w=ns(_);w.__index__=0,w.__values__=V,f?S.__wrapped__=w:f=w;var S=w;_=_.__wrapped__}return S.__wrapped__=u,f},I.prototype.reverse=function JA(){var u=this.__wrapped__;if(u instanceof Rn){var f=u;return this.__actions__.length&&(f=new Rn(this)),(f=f.reverse()).__actions__.push({func:Dp,args:[av],thisArg:V}),new Ei(f,this.__chain__)}return this.thru(av)},I.prototype.toJSON=I.prototype.valueOf=I.prototype.value=function AF(){return ma(this.__wrapped__,this.__actions__)},I.prototype.first=I.prototype.head,Qu&&(I.prototype[Qu]=function $d(){return this}),I}();Cr._=ys,(ln=function(){return ys}.call(zs,ps,zs,Po))!==V&&(Po.exports=ln)}.call(this)},738:function(Po){var zs;Po.exports=((zs=function(){function ps(Mi){return Nr.appendChild(Mi.dom),Mi}function ln(Mi){for(var Ci=0;CiKt+1e3&&(yl.update(1e3*Un/(Mi-Kt),100),Kt=Mi,Un=0,Hs)){var Ci=performance.memory;Hs.update(Ci.usedJSHeapSize/1048576,Ci.jsHeapSizeLimit/1048576)}return Mi},update:function(){Kr=this.end()},domElement:Nr,setMode:ln}}).Panel=function(ps,ln,V){var Nr=1/0,Kr=0,Kt=Math.round,Un=Kt(window.devicePixelRatio||1),yl=80*Un,La=48*Un,Hs=3*Un,Mi=2*Un,Ci=3*Un,ms=15*Un,Gs=74*Un,$s=30*Un,Oo=document.createElement("canvas");Oo.width=yl,Oo.height=La,Oo.style.cssText="width:80px;height:48px";var Pn=Oo.getContext("2d");return Pn.font="bold "+9*Un+"px Helvetica,Arial,sans-serif",Pn.textBaseline="top",Pn.fillStyle=V,Pn.fillRect(0,0,yl,La),Pn.fillStyle=ln,Pn.fillText(ps,Hs,Mi),Pn.fillRect(Ci,ms,Gs,$s),Pn.fillStyle=V,Pn.globalAlpha=.9,Pn.fillRect(Ci,ms,Gs,$s),{dom:Oo,update:function(lr,sc){Nr=Math.min(Nr,lr),Kr=Math.max(Kr,lr),Pn.fillStyle=V,Pn.globalAlpha=1,Pn.fillRect(0,0,yl,ms),Pn.fillStyle=ln,Pn.fillText(Kt(lr)+" "+ps+" ("+Kt(Nr)+"-"+Kt(Kr)+")",Hs,Mi),Pn.drawImage(Oo,Ci+Un,ms,Gs-Un,$s,Ci,ms,Gs-Un,$s),Pn.fillRect(Ci+Gs-Un,ms,Un,$s),Pn.fillStyle=V,Pn.globalAlpha=.9,Pn.fillRect(Ci+Gs-Un,ms,Un,Kt((1-lr/sc)*$s))}}},zs)}},Po=>{Po(Po.s=684)}]); \ No newline at end of file diff --git a/frontend/dist/gui/main.c72f5b1f0169f720.js b/frontend/dist/gui/main.c72f5b1f0169f720.js new file mode 100644 index 0000000..aeb1ec4 --- /dev/null +++ b/frontend/dist/gui/main.c72f5b1f0169f720.js @@ -0,0 +1 @@ +(self.webpackChunkgui=self.webpackChunkgui||[]).push([[179],{855:(Lo,Hs,ps)=>{"use strict";function ln(i){return"function"==typeof i}function V(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 Nr=V(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 Kr(i,t){if(i){const e=i.indexOf(t);0<=e&&i.splice(e,1)}}class Zt{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(ln(n))try{n()}catch(s){t=s instanceof Nr?s.errors:[s]}const{_finalizers:r}=this;if(r){this._finalizers=null;for(const s of r)try{Ha(s)}catch(o){t=t??[],o instanceof Nr?t=[...t,...o.errors]:t.push(o)}}if(t)throw new Nr(t)}}add(t){var e;if(t&&t!==this)if(this.closed)Ha(t);else{if(t instanceof Zt){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)&&Kr(e,t)}remove(t){const{_finalizers:e}=this;e&&Kr(e,t),t instanceof Zt&&t._removeParent(this)}}Zt.EMPTY=(()=>{const i=new Zt;return i.closed=!0,i})();const Un=Zt.EMPTY;function Al(i){return i instanceof Zt||i&&"closed"in i&&ln(i.remove)&&ln(i.add)&&ln(i.unsubscribe)}function Ha(i){ln(i)?i():i.unsubscribe()}const Gs={onUnhandledError:null,onStoppedNotification:null,Promise:void 0,useDeprecatedSynchronousErrorHandling:!1,useDeprecatedNextContext:!1},Mi={setTimeout(i,t,...e){const{delegate:n}=Mi;return n?.setTimeout?n.setTimeout(i,t,...e):setTimeout(i,t,...e)},clearTimeout(i){const{delegate:t}=Mi;return(t?.clearTimeout||clearTimeout)(i)},delegate:void 0};function Ci(i){Mi.setTimeout(()=>{const{onUnhandledError:t}=Gs;if(!t)throw i;t(i)})}function ms(){}const $s=On("C",void 0,void 0);function On(i,t,e){return{kind:i,value:t,error:e}}let dr=null;function fc(i){if(Gs.useDeprecatedSynchronousErrorHandling){const t=!dr;if(t&&(dr={errorThrown:!1,error:null}),i(),t){const{errorThrown:e,error:n}=dr;if(dr=null,e)throw n}}else i()}class Dl extends Zt{constructor(t){super(),this.isStopped=!1,t?(this.destination=t,Al(t)&&t.add(this)):this.destination=ME}static create(t,e,n){return new da(t,e,n)}next(t){this.isStopped?Xg(function No(i){return On("N",i,void 0)}(t),this):this._next(t)}error(t){this.isStopped?Xg(function Ws(i){return On("E",void 0,i)}(t),this):(this.isStopped=!0,this._error(t))}complete(){this.isStopped?Xg($s,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 ca=Function.prototype.bind;function Tl(i,t){return ca.call(i,t)}class Ga{constructor(t){this.partialObserver=t}next(t){const{partialObserver:e}=this;if(e.next)try{e.next(t)}catch(n){pd(n)}}error(t){const{partialObserver:e}=this;if(e.error)try{e.error(t)}catch(n){pd(n)}else pd(t)}complete(){const{partialObserver:t}=this;if(t.complete)try{t.complete()}catch(e){pd(e)}}}class da extends Dl{constructor(t,e,n){let r;if(super(),ln(t)||!t)r={next:t??void 0,error:e??void 0,complete:n??void 0};else{let s;this&&Gs.useDeprecatedNextContext?(s=Object.create(t),s.unsubscribe=()=>this.unsubscribe(),r={next:t.next&&Tl(t.next,s),error:t.error&&Tl(t.error,s),complete:t.complete&&Tl(t.complete,s)}):r=t}this.destination=new Ga(r)}}function pd(i){Gs.useDeprecatedSynchronousErrorHandling?function la(i){Gs.useDeprecatedSynchronousErrorHandling&&dr&&(dr.errorThrown=!0,dr.error=i)}(i):Ci(i)}function Xg(i,t){const{onStoppedNotification:e}=Gs;e&&Mi.setTimeout(()=>e(i,t))}const ME={closed:!0,next:ms,error:function wE(i){throw i},complete:ms},Kg="function"==typeof Symbol&&Symbol.observable||"@@observable";function $a(i){return i}function o0(i){return 0===i.length?$a:1===i.length?i[0]:function(e){return i.reduce((n,r)=>r(n),e)}}let In=(()=>{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 Pf(i){return i&&i instanceof Dl||function SE(i){return i&&ln(i.next)&&ln(i.error)&&ln(i.complete)}(i)&&Al(i)}(e)?e:new da(e,n,r);return fc(()=>{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=Wa(n))((r,s)=>{const o=new da({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)}[Kg](){return this}pipe(...e){return o0(e)(this)}toPromise(e){return new(e=Wa(e))((n,r)=>{let s;this.subscribe(o=>s=o,o=>r(o),()=>n(s))})}}return i.create=t=>new i(t),i})();function Wa(i){var t;return null!==(t=i??Gs.Promise)&&void 0!==t?t:Promise}const ua=V(i=>function(){i(this),this.name="ObjectUnsubscribedError",this.message="object unsubscribed"});let Re=(()=>{class i extends In{constructor(){super(),this.closed=!1,this.currentObservers=null,this.observers=[],this.isStopped=!1,this.hasError=!1,this.thrownError=null}lift(e){const n=new a0(this,this);return n.operator=e,n}_throwIfClosed(){if(this.closed)throw new ua}next(e){fc(()=>{if(this._throwIfClosed(),!this.isStopped){this.currentObservers||(this.currentObservers=Array.from(this.observers));for(const n of this.currentObservers)n.next(e)}})}error(e){fc(()=>{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(){fc(()=>{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?Un:(this.currentObservers=null,s.push(e),new Zt(()=>{this.currentObservers=null,Kr(s,e)}))}_checkFinalizedStatuses(e){const{hasError:n,thrownError:r,isStopped:s}=this;n?e.error(r):s&&e.complete()}asObservable(){const e=new In;return e.source=this,e}}return i.create=(t,e)=>new a0(t,e),i})();class a0 extends Re{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:Un}}function l0(i){return ln(i?.lift)}function ti(i){return t=>{if(l0(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 Yn(i,t,e,n,r){return new EE(i,t,e,n,r)}class EE extends Dl{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 et(i,t){return ti((e,n)=>{let r=0;e.subscribe(Yn(n,s=>{n.next(i.call(t,s,r++))}))})}function ha(i){return this instanceof ha?(this.v=i,this):new ha(i)}function Nf(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 Zg(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 i_=i=>i&&"number"==typeof i.length&&"function"!=typeof i;function r_(i){return ln(i?.then)}function f0(i){return ln(i[Kg])}function p0(i){return Symbol.asyncIterator&&ln(i?.[Symbol.asyncIterator])}function m0(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 g0=function s_(){return"function"==typeof Symbol&&Symbol.iterator?Symbol.iterator:"@@iterator"}();function Bf(i){return ln(i?.[g0])}function _0(i){return function Lf(i,t,e){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var r,n=e.apply(i,t||[]),s=[];return r=Object.create(("function"==typeof AsyncIterator?AsyncIterator:Object).prototype),a("next"),a("throw"),a("return",function o(m){return function(g){return Promise.resolve(g).then(m,h)}}),r[Symbol.asyncIterator]=function(){return this},r;function a(m,g){n[m]&&(r[m]=function(b){return new Promise(function(v,y){s.push([m,b,v,y])>1||l(m,b)})},g&&(r[m]=g(r[m])))}function l(m,g){try{!function c(m){m.value instanceof ha?Promise.resolve(m.value.v).then(d,h):p(s[0][2],m)}(n[m](g))}catch(b){p(s[0][3],b)}}function d(m){l("next",m)}function h(m){l("throw",m)}function p(m,g){m(g),s.shift(),s.length&&l(s[0][0],s[0][1])}}(this,arguments,function*(){const e=i.getReader();try{for(;;){const{value:n,done:r}=yield ha(e.read());if(r)return yield ha(void 0);yield yield ha(n)}}finally{e.releaseLock()}})}function v0(i){return ln(i?.getReader)}function wr(i){if(i instanceof In)return i;if(null!=i){if(f0(i))return function LE(i){return new In(t=>{const e=i[Kg]();if(ln(e.subscribe))return e.subscribe(t);throw new TypeError("Provided object does not correctly implement Symbol.observable")})}(i);if(i_(i))return function NE(i){return new In(t=>{for(let e=0;e{i.then(e=>{t.closed||(t.next(e),t.complete())},e=>t.error(e)).then(null,Ci)})}(i);if(p0(i))return y0(i);if(Bf(i))return function UE(i){return new In(t=>{for(const e of i)if(t.next(e),t.closed)return;t.complete()})}(i);if(v0(i))return function b0(i){return y0(_0(i))}(i)}throw m0(i)}function y0(i){return new In(t=>{(function VE(i,t){var e,n,r,s;return function gd(i,t,e,n){return new(e||(e=Promise))(function(s,o){function a(d){try{c(n.next(d))}catch(h){o(h)}}function l(d){try{c(n.throw(d))}catch(h){o(h)}}function c(d){d.done?s(d.value):function r(s){return s instanceof e?s:new e(function(o){o(s)})}(d.value).then(a,l)}c((n=n.apply(i,t||[])).next())})}(this,void 0,void 0,function*(){try{for(e=Nf(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 Ya(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 nr(i,t,e=1/0){return ln(t)?nr((n,r)=>et((s,o)=>t(n,s,r,o))(wr(i(n,r))),e):("number"==typeof t&&(e=t),ti((n,r)=>function zE(i,t,e,n,r,s,o,a){const l=[];let c=0,d=0,h=!1;const p=()=>{h&&!l.length&&!c&&t.complete()},m=b=>c{s&&t.next(b),c++;let v=!1;wr(e(b,d++)).subscribe(Yn(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(Yn(t,m,()=>{h=!0,p()})),()=>{a?.()}}(n,r,i,e)))}function yd(i=1/0){return nr($a,i)}const po=new In(i=>i.complete());function Hu(i){return i&&ln(i.schedule)}function a_(i){return i[i.length-1]}function x0(i){return ln(a_(i))?i.pop():void 0}function Gu(i){return Hu(a_(i))?i.pop():void 0}function l_(i,t=0){return ti((e,n)=>{e.subscribe(Yn(n,r=>Ya(n,i,()=>n.next(r),t),()=>Ya(n,i,()=>n.complete(),t),r=>Ya(n,i,()=>n.error(r),t)))})}function c_(i,t=0){return ti((e,n)=>{n.add(i.schedule(()=>e.subscribe(n),t))})}function d_(i,t){if(!i)throw new Error("Iterable cannot be null");return new In(e=>{Ya(e,t,()=>{const n=i[Symbol.asyncIterator]();Ya(e,t,()=>{n.next().then(r=>{r.done?e.complete():e.next(r.value)})},0,!0)})})}function Ni(i,t){return t?function C0(i,t){if(null!=i){if(f0(i))return function GE(i,t){return wr(i).pipe(c_(t),l_(t))}(i,t);if(i_(i))return function WE(i,t){return new In(e=>{let n=0;return t.schedule(function(){n===i.length?e.complete():(e.next(i[n++]),e.closed||this.schedule())})})}(i,t);if(r_(i))return function $E(i,t){return wr(i).pipe(c_(t),l_(t))}(i,t);if(p0(i))return d_(i,t);if(Bf(i))return function jE(i,t){return new In(e=>{let n;return Ya(e,t,()=>{n=i[g0](),Ya(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)}),()=>ln(n?.return)&&n.return()})}(i,t);if(v0(i))return function M0(i,t){return d_(_0(i),t)}(i,t)}throw m0(i)}(i,t):wr(i)}function Mr(...i){const t=Gu(i),e=function w0(i,t){return"number"==typeof a_(i)?i.pop():t}(i,1/0),n=i;return n.length?1===n.length?wr(n[0]):yd(e)(Ni(n,t)):po}function Uf(i={}){const{connector:t=(()=>new Re),resetOnError:e=!0,resetOnComplete:n=!0,resetOnRefCountZero:r=!0}=i;return s=>{let o,a,l,c=0,d=!1,h=!1;const p=()=>{a?.unsubscribe(),a=void 0},m=()=>{p(),o=l=void 0,d=h=!1},g=()=>{const b=o;m(),b?.unsubscribe()};return ti((b,v)=>{c++,!h&&!d&&p();const y=l=l??t();v.add(()=>{c--,0===c&&!h&&!d&&(a=bd(g,r))}),y.subscribe(v),!o&&c>0&&(o=new da({next:M=>y.next(M),error:M=>{h=!0,p(),a=bd(m,e,M),y.error(M)},complete:()=>{d=!0,p(),a=bd(m,n),y.complete()}}),wr(b).subscribe(o))})(s)}}function bd(i,t,...e){if(!0===t)return void i();if(!1===t)return;const n=new da({next:()=>{n.unsubscribe(),i()}});return wr(t(...e)).subscribe(n)}function li(i){for(let t in i)if(i[t]===li)return t;throw Error("Could not find renamed property on target object.")}function u_(i,t){for(const e in t)t.hasOwnProperty(e)&&!i.hasOwnProperty(e)&&(i[e]=t[e])}function fi(i){if("string"==typeof i)return i;if(Array.isArray(i))return"["+i.map(fi).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 Vf(i,t){return null==i||""===i?null===t?"":t:null==t||""===t?i:i+" "+t}const h_=li({__forward_ref__:li});function Gn(i){return i.__forward_ref__=Gn,i.toString=function(){return fi(this())},i}function kt(i){return $u(i)?i():i}function $u(i){return"function"==typeof i&&i.hasOwnProperty(h_)&&i.__forward_ref__===Gn}function Wu(i){return i&&!!i.\u0275providers}const Yu="https://g.co/ng/security#xss";class pe extends Error{constructor(t,e){super(zf(t,e)),this.code=t}}function zf(i,t){return`NG0${Math.abs(i)}${t?": "+t.trim():""}`}function Qt(i){return"string"==typeof i?i:null==i?"":String(i)}function Hf(i,t){throw new pe(-201,!1)}function En(i,t){null==i&&function ni(i,t,e,n){throw new Error(`ASSERTION ERROR: ${i}`+(null==n?"":` [Expected=> ${e} ${n} ${t} <=Actual]`))}(t,i,null,"!=")}function ke(i){return{token:i.token,providedIn:i.providedIn||null,factory:i.factory,value:void 0}}function Kt(i){return{providers:i.providers||[],imports:i.imports||[]}}function Gf(i){return f_(i,xd)||f_(i,m_)}function f_(i,t){return i.hasOwnProperty(t)?i[t]:null}function p_(i){return i&&(i.hasOwnProperty(gs)||i.hasOwnProperty(A0))?i[gs]:null}const xd=li({\u0275prov:li}),gs=li({\u0275inj:li}),m_=li({ngInjectableDef:li}),A0=li({ngInjectorDef:li});var Pt=(()=>((Pt=Pt||{})[Pt.Default=0]="Default",Pt[Pt.Host=1]="Host",Pt[Pt.Self=2]="Self",Pt[Pt.SkipSelf=4]="SkipSelf",Pt[Pt.Optional=8]="Optional",Pt))();let $f;function Ys(i){const t=$f;return $f=i,t}function _s(i,t,e){const n=Gf(i);return n&&"root"==n.providedIn?void 0===n.value?n.value=n.factory():n.value:e&Pt.Optional?null:void 0!==t?t:void Hf(fi(i))}const Rn=(()=>typeof globalThis<"u"&&globalThis||typeof global<"u"&&global||typeof window<"u"&&window||typeof self<"u"&&typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&self)(),Rl={},Xu="__NG_DI_FLAG__",pi="ngTempTokenPath",kl="ngTokenPath",g_=/\n/gm,eA="\u0275",Wf="__source";let Ku;function wd(i){const t=Ku;return Ku=i,t}function tA(i,t=Pt.Default){if(void 0===Ku)throw new pe(-203,!1);return null===Ku?_s(i,void 0,t):Ku.get(i,t&Pt.Optional?null:void 0,t)}function ee(i,t=Pt.Default){return(function D0(){return $f}()||tA)(kt(i),t)}function Ot(i,t=Pt.Default){return ee(i,jf(t))}function jf(i){return typeof i>"u"||"number"==typeof i?i:0|(i.optional&&8)|(i.host&&1)|(i.self&&2)|(i.skipSelf&&4)}function Yf(i){const t=[];for(let e=0;e((mo=mo||{})[mo.OnPush=0]="OnPush",mo[mo.Default=1]="Default",mo))(),qs=(()=>{return(i=qs||(qs={}))[i.Emulated=0]="Emulated",i[i.None=2]="None",i[i.ShadowDom=3]="ShadowDom",qs;var i})();const Xa={},$n=[],Br=li({\u0275cmp:li}),Qu=li({\u0275dir:li}),_c=li({\u0275pipe:li}),y_=li({\u0275mod:li}),fa=li({\u0275fac:li}),Ju=li({__NG_ELEMENT_ID__:li});let nA=0;function ot(i){return qa(()=>{const t=go(i),e={...t,decls:i.decls,vars:i.vars,template:i.template,consts:i.consts||null,ngContentSelectors:i.ngContentSelectors,onPush:i.changeDetection===mo.OnPush,directiveDefs:null,pipeDefs:null,dependencies:t.standalone&&i.dependencies||null,getStandaloneInjector:null,data:i.data||{},encapsulation:i.encapsulation||qs.Emulated,id:"c"+nA++,styles:i.styles||$n,_:null,schemas:i.schemas||null,tView:null};b_(e);const n=i.dependencies;return e.directiveDefs=Xf(n,!1),e.pipeDefs=Xf(n,!0),e})}function eh(i,t,e){const n=i.\u0275cmp;n.directiveDefs=Xf(t,!1),n.pipeDefs=Xf(e,!0)}function iA(i){return Hn(i)||Ur(i)}function Cd(i){return null!==i}function nn(i){return qa(()=>({type:i.type,bootstrap:i.bootstrap||$n,declarations:i.declarations||$n,imports:i.imports||$n,exports:i.exports||$n,transitiveCompileScopes:null,schemas:i.schemas||null,id:i.id||null}))}function qf(i,t){if(null==i)return Xa;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 ve(i){return qa(()=>{const t=go(i);return b_(t),t})}function Gi(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 Hn(i){return i[Br]||null}function Ur(i){return i[Qu]||null}function vs(i){return i[_c]||null}function ur(i,t){const e=i[y_]||null;if(!e&&!0===t)throw new Error(`Type ${fi(i)} does not have '\u0275mod' property.`);return e}function go(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||$n,viewQuery:i.viewQuery||null,features:i.features||null,setInput:null,findHostDirectiveDefs:null,hostDirectives:null,inputs:qf(i.inputs,t),outputs:qf(i.outputs)}}function b_(i){i.features?.forEach(t=>t(i))}function Xf(i,t){if(!i)return null;const e=t?vs:iA;return()=>("function"==typeof i?i():i).map(n=>e(n)).filter(Cd)}const Ka=0,at=1,fn=2,Bi=3,ys=4,X=5,ue=6,oe=7,Be=8,$t=9,Vn=10,yt=11,oi=12,vc=13,I0=14,Sr=15,ir=16,th=17,Vo=18,Xs=19,Pl=20,ii=21,yi=22,Ed=1,R0=2,Kf=7,Zf=8,Za=9,Ui=10;function bs(i){return Array.isArray(i)&&"object"==typeof i[Ed]}function xs(i){return Array.isArray(i)&&!0===i[Ed]}function Qf(i){return 0!=(4&i.flags)}function Ad(i){return i.componentOffset>-1}function yc(i){return 1==(1&i.flags)}function _o(i){return!!i.template}function nh(i){return 0!=(256&i[fn])}function Qa(i,t){return i.hasOwnProperty(fa)?i[fa]:null}class Td{constructor(t,e,n){this.previousValue=t,this.currentValue=e,this.firstChange=n}isFirstChange(){return this.firstChange}}function bi(){return Id}function Id(i){return i.type.prototype.ngOnChanges&&(i.setInput=Rd),tp}function tp(){const i=L0(this),t=i?.current;if(t){const e=i.previous;if(e===Xa)i.previous=t;else for(let n in t)e[n]=t[n];i.current=null,this.ngOnChanges(t)}}function Rd(i,t,e,n){const r=this.declaredInputs[e],s=L0(i)||function lA(i,t){return i[F0]=t}(i,{previous:Xa,current:null}),o=s.current||(s.current={}),a=s.previous,l=a[r];o[r]=new Td(l&&l.currentValue,t,a===Xa),i[n]=t}bi.ngInherit=!0;const F0="__ngSimpleChanges__";function L0(i){return i[F0]||null}const Qr=function(i,t,e){},kd="svg";function I(i){for(;Array.isArray(i);)i=i[Ka];return i}function bc(i,t){return I(t[i])}function Ei(i,t){return I(t[i.index])}function N0(i,t){return i.data[t]}function Od(i,t){return i[t]}function ws(i,t){const e=t[i];return bs(e)?e:e[Ka]}function np(i){return 64==(64&i[fn])}function Ol(i,t){return null==t?null:i[t]}function B0(i){i[Vo]=0}function A_(i,t){i[X]+=t;let e=i,n=i[Bi];for(;null!==n&&(1===t&&1===e[X]||-1===t&&0===e[X]);)n[X]+=t,e=n,n=n[Bi]}const Rt={lFrame:el(null),bindingsEnabled:!0};function pa(){return Rt.bindingsEnabled}function Se(){return Rt.lFrame.lView}function zn(){return Rt.lFrame.tView}function cn(i){return Rt.lFrame.contextLView=i,i[Be]}function Gt(i){return Rt.lFrame.contextLView=null,i}function Er(){let i=V0();for(;null!==i&&64===i.type;)i=i.parent;return i}function V0(){return Rt.lFrame.currentTNode}function ma(i,t){const e=Rt.lFrame;e.currentTNode=i,e.isParent=t}function D_(){return Rt.lFrame.isParent}function T_(){Rt.lFrame.isParent=!1}function Vr(){const i=Rt.lFrame;let t=i.bindingRootIndex;return-1===t&&(t=i.bindingRootIndex=i.tView.bindingStartIndex),t}function Fl(){return Rt.lFrame.bindingIndex++}function Ks(i){const t=Rt.lFrame,e=t.bindingIndex;return t.bindingIndex=t.bindingIndex+i,e}function G0(i,t){const e=Rt.lFrame;e.bindingIndex=e.bindingRootIndex=i,zo(t)}function zo(i){Rt.lFrame.currentDirectiveIndex=i}function ih(i){const t=Rt.lFrame.currentDirectiveIndex;return-1===t?null:i[t]}function Ll(){return Rt.lFrame.currentQueryIndex}function Ms(i){Rt.lFrame.currentQueryIndex=i}function vA(i){const t=i[at];return 2===t.type?t.declTNode:1===t.type?i[ue]:null}function R_(i,t,e){if(e&Pt.SkipSelf){let r=t,s=i;for(;!(r=r.parent,null!==r||e&Pt.Host||(r=vA(s),null===r||(s=s[Sr],10&r.type))););if(null===r)return!1;t=r,i=s}const n=Rt.lFrame=Fd();return n.currentTNode=t,n.lView=i,!0}function rp(i){const t=Fd(),e=i[at];Rt.lFrame=t,t.currentTNode=e.firstChild,t.lView=i,t.tView=e,t.contextLView=i,t.bindingIndex=e.bindingStartIndex,t.inI18n=!1}function Fd(){const i=Rt.lFrame,t=null===i?null:i.child;return null===t?el(i):t}function el(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 k_(){const i=Rt.lFrame;return Rt.lFrame=i.parent,i.currentTNode=null,i.lView=null,i}const $0=k_;function Ld(){const i=k_();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 Xn(){return Rt.lFrame.selectedIndex}function tl(i){Rt.lFrame.selectedIndex=i}function Ai(){const i=Rt.lFrame;return N0(i.tView,i.selectedIndex)}function ki(){Rt.lFrame.currentNamespace=kd}function ga(){!function wc(){Rt.lFrame.currentNamespace=null}()}function Nd(i,t){for(let e=t.directiveStart,n=t.directiveEnd;e=n)break}else t[l]<0&&(i[Vo]+=65536),(a>11>16&&(3&i[fn])===t){i[fn]+=2048,Qr(4,a,s);try{s.call(a)}finally{Qr(5,a,s)}}}else{Qr(4,a,s);try{s.call(a)}finally{Qr(5,a,s)}}}const _a=-1;class Bd{constructor(t,e,n){this.factory=t,this.resolving=!1,this.canSeeViewProviders=e,this.injectImpl=n}}function L_(i,t,e){let n=0;for(;nt){o=s-1;break}}}for(;s>16}(i),n=t;for(;e>0;)n=n[Sr],e--;return n}let Ud=!0;function cp(i){const t=Ud;return Ud=i,t}const B_=255,K0=5;let Z0=0;const va={};function oh(i,t){const e=Q0(i,t);if(-1!==e)return e;const n=t[at];n.firstCreatePass&&(i.injectorIndex=t.length,ah(n.data,i),ah(t,null),ah(n.blueprint,null));const r=lh(i,t),s=i.injectorIndex;if(lp(r)){const o=rh(r),a=sh(r,t),l=a[at].data;for(let c=0;c<8;c++)t[s+c]=a[o+c]|l[o+c]}return t[s+8]=r,s}function ah(i,t){i.push(0,0,0,0,0,0,0,0,t)}function Q0(i,t){return-1===i.injectorIndex||i.parent&&i.parent.injectorIndex===i.injectorIndex||null===t[i.injectorIndex+8]?-1:i.injectorIndex}function lh(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=dh(r),null===n)return _a;if(e++,r=r[Sr],-1!==n.injectorIndex)return n.injectorIndex|e<<16}return _a}function pn(i,t,e){!function U_(i,t,e){let n;"string"==typeof e?n=e.charCodeAt(0)||0:e.hasOwnProperty(Ju)&&(n=e[Ju]),null==n&&(n=e[Ju]=Z0++);const r=n&B_;t.data[i+(r>>K0)]|=1<=0?t&B_:Zs:t}(e);if("function"==typeof s){if(!R_(t,i,n))return n&Pt.Host?J0(r,0,n):Vd(t,e,n,r);try{const o=s(n);if(null!=o||n&Pt.Optional)return o;Hf()}finally{$0()}}else if("number"==typeof s){let o=null,a=Q0(i,t),l=_a,c=n&Pt.Host?t[ir][ue]:null;for((-1===a||n&Pt.SkipSelf)&&(l=-1===a?lh(i,t):t[a+8],l!==_a&&z_(n,!1)?(o=t[at],a=rh(l),t=sh(l,t)):a=-1);-1!==a;){const d=t[at];if(up(s,a,d.data)){const h=EA(a,t,e,o,n,c);if(h!==va)return h}l=t[a+8],l!==_a&&z_(n,t[at].data[a+8]===c)&&up(s,a,t)?(o=d,a=rh(l),t=sh(l,t)):a=-1}}return r}function EA(i,t,e,n,r,s){const o=t[at],a=o.data[i+8],d=ts(a,o,e,null==n?Ad(a)&&Ud:n!=o&&0!=(3&a.type),r&Pt.Host&&s===a);return null!==d?Sc(t,o,d,a):va}function ts(i,t,e,n,r){const s=i.providerIndexes,o=t.data,a=1048575&s,l=i.directiveStart,d=s>>20,p=r?a+d:i.directiveEnd;for(let m=n?a:a+d;m=l&&g.type===e)return m}if(r){const m=o[l];if(m&&_o(m)&&m.type===e)return l}return null}function Sc(i,t,e,n){let r=i[e];const s=t.data;if(function xA(i){return i instanceof Bd}(r)){const o=r;o.resolving&&function S0(i,t){const e=t?`. Dependency path: ${t.join(" > ")} > ${i}`:"";throw new pe(-200,`Circular dependency in DI detected for ${i}${e}`)}(function qn(i){return"function"==typeof i?i.name||i.toString():"object"==typeof i&&null!=i&&"function"==typeof i.type?i.type.name||i.type.toString():Qt(i)}(s[e]));const a=cp(o.canSeeViewProviders);o.resolving=!0;const l=o.injectImpl?Ys(o.injectImpl):null;R_(i,n,Pt.Default);try{r=i[e]=o.factory(void 0,s,i,n),t.firstCreatePass&&e>=n.directiveStart&&function es(i,t,e){const{ngOnChanges:n,ngOnInit:r,ngDoCheck:s}=t.type.prototype;if(n){const o=Id(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&&Ys(l),cp(a),o.resolving=!1,$0()}}return r}function up(i,t,e){return!!(e[t+(i>>K0)]&1<{const t=i.prototype.constructor,e=t[fa]||ch(t),n=Object.prototype;let r=Object.getPrototypeOf(i.prototype).constructor;for(;r&&r!==n;){const s=r[fa]||ch(r);if(s&&s!==e)return s;r=Object.getPrototypeOf(r)}return s=>new s})}function ch(i){return $u(i)?()=>{const t=ch(kt(i));return t&&t()}:Qa(i)}function dh(i){const t=i[at],e=t.type;return 2===e?t.declTNode:1===e?i[ue]:null}function ya(i){return function SA(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 ba(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,d){const h=l.hasOwnProperty(Ac)?l[Ac]:Object.defineProperty(l,Ac,{value:[]})[Ac];for(;h.length<=d;)h.push(null);return(h[d]=h[d]||[]).push(o),l}}return e&&(r.prototype=Object.create(e.prototype)),r.prototype.ngMetadataName=i,r.annotationCls=r,r})}class me{constructor(t,e){this._desc=t,this.ngMetadataName="InjectionToken",this.\u0275prov=void 0,"number"==typeof e?this.__NG_ELEMENT_ID__=e:void 0!==e&&(this.\u0275prov=ke({token:this,providedIn:e.providedIn||"root",factory:e.factory}))}get multi(){return this}toString(){return`InjectionToken ${this._desc}`}}function Ul(i,t){i.forEach(e=>Array.isArray(e)?Ul(e,t):t(e))}function G_(i,t,e){t>=i.length?i.push(e):i.splice(t,0,e)}function pp(i,t){return t>=i.length-1?i.pop():i.splice(t,1)[0]}function Gd(i,t){const e=[];for(let n=0;n=0?i[1|n]=e:(n=~n,function IA(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 Wd(i,t){const e=Tc(i,t);if(e>=0)return i[1|e]}function Tc(i,t){return function gp(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),Ss=Md(zd("Optional"),8),xa=Md(zd("SkipSelf"),4);var Es=(()=>((Es=Es||{})[Es.Important=1]="Important",Es[Es.DashCase=2]="DashCase",Es))();const Cp=new Map;let _x=0;const iv="__ngContext__";function Hr(i,t){bs(t)?(i[iv]=t[Pl],function vx(i){Cp.set(i[Pl],i)}(t)):i[iv]=t}let sv;function ov(i,t){return sv(i,t)}function _h(i){const t=i[Bi];return xs(t)?t[Bi]:t}function av(i){return Ax(i[vc])}function lv(i){return Ax(i[ys])}function Ax(i){for(;null!==i&&!xs(i);)i=i[ys];return i}function Tr(i,t,e,n,r){if(null!=n){let s,o=!1;xs(n)?s=n:bs(n)&&(o=!0,n=n[Ka]);const a=I(n);0===i&&null!==e?null==r?Px(t,e,a):kc(t,e,a,r||null,!0):1===i&&null!==e?kc(t,e,a,r||null,!0):2===i?function mv(i,t,e){const n=Ap(i,t);n&&function QA(i,t,e,n){i.removeChild(t,e,n)}(i,n,t,e)}(t,a,o):3===i&&t.destroyNode(a),null!=s&&function Vx(i,t,e,n,r){const s=e[Kf];s!==I(e)&&Tr(t,i,n,s,r);for(let a=Ui;a0&&(i[e-1][ys]=n[ys]);const s=pp(i,Ui+t);!function WA(i,t){yh(i,t,t[yt],2,null,null),t[Ka]=null,t[ue]=null}(n[at],n);const o=s[Xs];null!==o&&o.detachView(s[at]),n[Bi]=null,n[ys]=null,n[fn]&=-65}return n}function Ix(i,t){if(!(128&t[fn])){const e=t[yt];e.destroyNode&&yh(i,t,e,3,null,null),function qA(i){let t=i[vc];if(!t)return hv(i[at],i);for(;t;){let e=null;if(bs(t))e=t[vc];else{const n=t[Ui];n&&(e=n)}if(!e){for(;t&&!t[ys]&&t!==i;)bs(t)&&hv(t[at],t),t=t[Bi];null===t&&(t=i),bs(t)&&hv(t[at],t),e=t&&t[ys]}t=e}}(t)}}function hv(i,t){if(!(128&t[fn])){t[fn]&=-65,t[fn]|=128,function ZA(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===qs.None||s===qs.Emulated)return null}return Ei(n,e)}}(i,t.parent,e)}function kc(i,t,e,n,r){i.insertBefore(t,e,n,r)}function Px(i,t,e){i.appendChild(t,e)}function Ox(i,t,e,n,r){null!==n?kc(i,t,e,n,r):Px(i,t,e)}function Ap(i,t){return i.parentNode(t)}function Fx(i,t,e){return Nx(i,t,e)}let fv,Rp,vv,Nx=function Lx(i,t,e){return 40&i.type?Ei(i,e):null};function vh(i,t,e,n){const r=Rx(i,n,t),s=t[yt],a=Fx(n.parent||t[ue],n,t);if(null!=r)if(Array.isArray(e))for(let l=0;li,createScript:i=>i,createScriptURL:i=>i})}catch{}return Rp}()?.createHTML(i)||i}class Vl{constructor(t){this.changingThisBreaksApplicationSecurity=t}toString(){return`SafeValue must use [property]=binding: ${this.changingThisBreaksApplicationSecurity} (see ${Yu})`}}class oD extends Vl{getTypeName(){return"HTML"}}class aD extends Vl{getTypeName(){return"Style"}}class lD extends Vl{getTypeName(){return"Script"}}class cD extends Vl{getTypeName(){return"URL"}}class Pp extends Vl{getTypeName(){return"ResourceURL"}}function Js(i){return i instanceof Vl?i.changingThisBreaksApplicationSecurity:i}function Ma(i,t){const e=function dD(i){return i instanceof Vl&&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 ${Yu})`)}return e===t}class gD{constructor(t){this.inertDocumentHelper=t}getInertBodyElement(t){t=""+t;try{const e=(new window.DOMParser).parseFromString(jd(t),"text/html").body;return null===e?this.inertDocumentHelper.getInertBodyElement(t):(e.removeChild(e.firstChild),e)}catch{return null}}}class _D{constructor(t){this.defaultDoc=t,this.inertDocument=this.defaultDoc.implementation.createHTMLDocument("sanitization-inert")}getInertBodyElement(t){const e=this.inertDocument.createElement("template");return e.innerHTML=jd(t),e}}const vD=/^(?!javascript:)(?:[a-z0-9+.-]+:|[^&:\/?#]*(?:[\/?#]|$))/i;function bh(i){return(i=String(i)).match(vD)?i:"unsafe:"+i}function Ca(i){const t={};for(const e of i.split(","))t[e]=!0;return t}function Pc(...i){const t={};for(const e of i)for(const n in e)e.hasOwnProperty(n)&&(t[n]=!0);return t}const xv=Ca("area,br,col,hr,img,wbr"),wv=Ca("colgroup,dd,dt,li,p,tbody,td,tfoot,th,thead,tr"),Mv=Ca("rp,rt"),Cv=Pc(xv,Pc(wv,Ca("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")),Pc(Mv,Ca("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")),Pc(Mv,wv)),Yd=Ca("background,cite,href,itemtype,longdesc,poster,src,xlink:href"),Yx=Pc(Yd,Ca("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"),Ca("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")),Ev=Ca("script,style,template");class qx{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(!Cv.hasOwnProperty(e))return this.sanitizedSomething=!0,!Ev.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();Cv.hasOwnProperty(e)&&!xv.hasOwnProperty(e)&&(this.buf.push(""))}chars(t){this.buf.push(Xx(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 bD=/[\uD800-\uDBFF][\uDC00-\uDFFF]/g,xD=/([^\#-~ |!])/g;function Xx(i){return i.replace(/&/g,"&").replace(bD,function(t){return"&#"+(1024*(t.charCodeAt(0)-55296)+(t.charCodeAt(1)-56320)+65536)+";"}).replace(xD,function(t){return"&#"+t.charCodeAt(0)+";"}).replace(//g,">")}let Fp;function Kx(i,t){let e=null;try{Fp=Fp||function jx(i){const t=new _D(i);return function Op(){try{return!!(new window.DOMParser).parseFromString(jd(""),"text/html")}catch{return!1}}()?new gD(t):t}(i);let n=t?String(t):"";e=Fp.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=Fp.getInertBodyElement(n)}while(n!==s);return jd((new qx).sanitizeChildren(Av(e)||e))}finally{if(e){const n=Av(e)||e;for(;n.firstChild;)n.removeChild(n.firstChild)}}}function Av(i){return"content"in i&&function wD(i){return i.nodeType===Node.ELEMENT_NODE&&"TEMPLATE"===i.nodeName}(i)?i.content:null}var Kn=(()=>((Kn=Kn||{})[Kn.NONE=0]="NONE",Kn[Kn.HTML=1]="HTML",Kn[Kn.STYLE=2]="STYLE",Kn[Kn.SCRIPT=3]="SCRIPT",Kn[Kn.URL=4]="URL",Kn[Kn.RESOURCE_URL=5]="RESOURCE_URL",Kn))();function Lp(i){const t=function xi(){const i=Se();return i&&i[oi]}();return t?t.sanitize(Kn.URL,i)||"":Ma(i,"URL")?Js(i):bh(Qt(i))}const Np=new me("ENVIRONMENT_INITIALIZER"),rl=new me("INJECTOR",-1),Qx=new me("INJECTOR_DEF_TYPES");class Jx{get(t,e=Rl){if(e===Rl){const n=new Error(`NullInjectorError: No provider for ${fi(t)}!`);throw n.name="NullInjectorError",n}return e}}function AD(...i){return{\u0275providers:ew(0,i),\u0275fromNgModule:!0}}function ew(i,...t){const e=[],n=new Set;let r;return Ul(t,s=>{const o=s;Dv(o,e,[],n)&&(r||(r=[]),r.push(o))}),void 0!==r&&Bp(r,e),e}function Bp(i,t){for(let e=0;e{t.push(s)})}}function Dv(i,t,e,n){if(!(i=kt(i)))return!1;let r=null,s=p_(i);const o=!s&&Hn(i);if(s||o){if(o&&!o.standalone)return!1;r=i}else{const l=i.ngModule;if(s=p_(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)Dv(c,t,e,n)}}else{if(!s)return!1;{if(null!=s.imports&&!a){let c;n.add(r);try{Ul(s.imports,d=>{Dv(d,t,e,n)&&(c||(c=[]),c.push(d))})}finally{}void 0!==c&&Bp(c,t)}if(!a){const c=Qa(r)||(()=>new r);t.push({provide:r,useFactory:c,deps:$n},{provide:Qx,useValue:r,multi:!0},{provide:Np,useValue:()=>ee(r),multi:!0})}const l=s.providers;null==l||a||Up(l,d=>{t.push(d)})}}return r!==i&&void 0!==i.providers}function Up(i,t){for(let e of i)Wu(e)&&(e=e.\u0275providers),Array.isArray(e)?Up(e,t):t(e)}const Vp=li({provide:String,useValue:li});function wi(i){return null!==i&&"object"==typeof i&&Vp in i}function Fc(i){return"function"==typeof i}const Iv=new me("Set Injector scope."),zp={},TD={};let Rv;function xh(){return void 0===Rv&&(Rv=new Jx),Rv}class to{}class Hp extends to{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,Pv(t,o=>this.processProvider(o)),this.records.set(rl,$o(void 0,this)),r.has("environment")&&this.records.set(to,$o(void 0,this));const s=this.records.get(Iv);null!=s&&"string"==typeof s.value&&this.scopes.add(s.value),this.injectorDefTypes=new Set(this.get(Qx.multi,$n,Pt.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=wd(this),n=Ys(void 0);try{return t()}finally{wd(e),Ys(n)}}get(t,e=Rl,n=Pt.Default){this.assertNotDestroyed(),n=jf(n);const r=wd(this),s=Ys(void 0);try{if(!(n&Pt.SkipSelf)){let a=this.records.get(t);if(void 0===a){const l=function kD(i){return"function"==typeof i||"object"==typeof i&&i instanceof me}(t)&&Gf(t);a=l&&this.injectableDefInScope(l)?$o(kv(t),zp):null,this.records.set(t,a)}if(null!=a)return this.hydrate(t,a)}return(n&Pt.Self?xh():this.parent).get(t,e=n&Pt.Optional&&e===Rl?null:e)}catch(o){if("NullInjectorError"===o.name){if((o[pi]=o[pi]||[]).unshift(fi(t)),r)throw o;return function v_(i,t,e,n){const r=i[pi];throw t[Wf]&&r.unshift(t[Wf]),i.message=function T0(i,t,e,n=null){i=i&&"\n"===i.charAt(0)&&i.charAt(1)==eA?i.slice(2):i;let r=fi(t);if(Array.isArray(t))r=t.map(fi).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):fi(a)))}r=`{${s.join(", ")}}`}return`${e}${n?"("+n+")":""}[${r}]: ${i.replace(g_,"\n ")}`}("\n"+i.message,r,e,n),i[kl]=r,i[pi]=null,i}(o,t,"R3InjectorError",this.source)}throw o}finally{Ys(s),wd(r)}}resolveInjectorInitializers(){const t=wd(this),e=Ys(void 0);try{const n=this.get(Np.multi,$n,Pt.Self);for(const r of n)r()}finally{wd(t),Ys(e)}}toString(){const t=[],e=this.records;for(const n of e.keys())t.push(fi(n));return`R3Injector[${t.join(", ")}]`}assertNotDestroyed(){if(this._destroyed)throw new pe(205,!1)}processProvider(t){let e=Fc(t=kt(t))?t:kt(t&&t.provide);const n=function Gp(i){return wi(i)?$o(void 0,i.useValue):$o(As(i),zp)}(t);if(Fc(t)||!0!==t.multi)this.records.get(e);else{let r=this.records.get(e);r||(r=$o(void 0,zp,!0),r.factory=()=>Yf(r.multi),this.records.set(e,r)),e=t,r.multi.push(t)}this.records.set(e,n)}hydrate(t,e){return e.value===zp&&(e.value=TD,e.value=e.factory()),"object"==typeof e.value&&e.value&&function RD(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=kt(t.providedIn);return"string"==typeof e?"any"===e||this.scopes.has(e):this.injectorDefTypes.has(e)}}function kv(i){const t=Gf(i),e=null!==t?t.factory:Qa(i);if(null!==e)return e;if(i instanceof me)throw new pe(204,!1);if(i instanceof Function)return function tw(i){const t=i.length;if(t>0)throw Gd(t,"?"),new pe(204,!1);const e=function qu(i){return i&&(i[xd]||i[m_])||null}(i);return null!==e?()=>e.factory(i):()=>new i}(i);throw new pe(204,!1)}function As(i,t,e){let n;if(Fc(i)){const r=kt(i);return Qa(r)||kv(r)}if(wi(i))n=()=>kt(i.useValue);else if(function Tv(i){return!(!i||!i.useFactory)}(i))n=()=>i.useFactory(...Yf(i.deps||[]));else if(function Pi(i){return!(!i||!i.useExisting)}(i))n=()=>ee(kt(i.useExisting));else{const r=kt(i&&(i.useClass||i.provide));if(!function ID(i){return!!i.deps}(i))return Qa(r)||kv(r);n=()=>new r(...Yf(i.deps))}return n}function $o(i,t,e=!1){return{factory:i,value:t,multi:e?[]:void 0}}function Pv(i,t){for(const e of i)Array.isArray(e)?Pv(e,t):e&&Wu(e)?Pv(e.\u0275providers,t):t(e)}class PD{}class Ov{}class bo{resolveComponentFactory(t){throw function sl(i){const t=Error(`No component factory found for ${fi(i)}. Did you add it to @NgModule.entryComponents?`);return t.ngComponent=i,t}(t)}}let Hl=(()=>{class i{}return i.NULL=new bo,i})();function FD(){return Fn(Er(),Se())}function Fn(i,t){return new mt(Ei(i,t))}let mt=(()=>{class i{constructor(e){this.nativeElement=e}}return i.__NG_ELEMENT_ID__=FD,i})();function nw(i){return i instanceof mt?i.nativeElement:i}class Gl{}let ol=(()=>{class i{}return i.__NG_ELEMENT_ID__=()=>function LD(){const i=Se(),e=ws(Er().index,i);return(bs(e)?e:i)[yt]}(),i})(),ND=(()=>{class i{}return i.\u0275prov=ke({token:i,providedIn:"root",factory:()=>null}),i})();class Lc{constructor(t){this.full=t,this.major=t.split(".")[0],this.minor=t.split(".")[1],this.patch=t.split(".").slice(2).join(".")}}const BD=new Lc("15.2.10"),Fv={},Lv="ngOriginalError";function Nv(i){return i[Lv]}class al{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&&Nv(t);for(;e&&Nv(e);)e=Nv(e);return e||null}}function ll(i){return i instanceof Function?i():i}function rw(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 sw="ng-template";function jD(i,t,e){let n=0,r=!0;for(;ns?"":r[h+1].toLowerCase();const m=8&n?p:null;if(m&&-1!==rw(m,c,0)||2&n&&c!==p){if(Wo(n))return!1;o=!0}}}}else{if(!o&&!Wo(n)&&!Wo(l))return!1;if(o&&Wo(l))continue;o=!1,n=l|1&n}}return Wo(n)||o}function Wo(i){return 0==(1&i)}function ow(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&&!Wo(o)&&(t+=Nc(s,r),r=""),n=o,s=s||!Wo(n);e++}return""!==r&&(t+=Nc(s,r)),t}const sn={};function G(i){Hv(zn(),Se(),Xn()+i,!1)}function Hv(i,t,e,n){if(!n)if(3==(3&t[fn])){const s=i.preOrderCheckHooks;null!==s&&sp(t,s,e)}else{const s=i.preOrderHooks;null!==s&&op(t,s,0,e)}tl(e)}function cw(i,t=null,e=null,n){const r=dw(i,t,e,n);return r.resolveInjectorInitializers(),r}function dw(i,t=null,e=null,n,r=new Set){const s=[e||$n,AD(i)];return n=n||("object"==typeof i?void 0:fi(i)),new Hp(s,t||xh(),n||null,r)}let $i=(()=>{class i{static create(e,n){if(Array.isArray(e))return cw({name:""},n,e,"");{const r=e.name??"";return cw({name:r},e.parent,e.providers,r)}}}return i.THROW_IF_NOT_FOUND=Rl,i.NULL=new Jx,i.\u0275prov=ke({token:i,providedIn:"any",factory:()=>ee(rl)}),i.__NG_ELEMENT_ID__=-1,i})();function E(i,t=Pt.Default){const e=Se();return null===e?ee(i,t):V_(Er(),e,kt(i),t)}function xo(){throw new Error("invalid")}function gw(i,t){const e=i.contentQueries;if(null!==e)for(let n=0;nyi&&Hv(i,t,yi,!1),Qr(o?2:0,r),e(n,r)}finally{tl(s),Qr(o?3:1,r)}}function Zv(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,Mh(i,e,r.hostVars,sn),r)}function be(i,t,e,n,r,s){const o=Ei(i,t);!function Xe(i,t,e,n,r,s,o){if(null==s)i.removeAttribute(t,r,e);else{const a=null==o?Qt(s):o(s,n||"",r);i.setAttribute(t,r,a,e)}}(t[yt],o,s,i.value,e,n,r)}function _t(i,t,e,n,r,s){const o=s[t];if(null!==o){const a=n.setInput;for(let l=0;l0&&rs(e)}}function rs(i){for(let n=av(i);null!==n;n=lv(n))for(let r=Ui;r0&&rs(s)}const e=i[at].components;if(null!==e)for(let n=0;n0&&rs(r)}}function ss(i,t){const e=ws(t,i),n=e[at];(function io(i,t){for(let e=t.length;e-1&&(uv(t,n),pp(e,n))}this._attachedToViewContainer=!1}Ix(this._lView[at],this._lView)}onDestroy(t){yw(this._lView[at],this._lView,null,t)}markForCheck(){Ts(this._cdRefInjectingView||this._lView)}detach(){this._lView[fn]&=-65}reattach(){this._lView[fn]|=64}detectChanges(){wo(this._lView[at],this._lView,this.context)}checkNoChanges(){}attachToViewContainerRef(){if(this._appRef)throw new pe(902,!1);this._attachedToViewContainer=!0}detachFromAppRef(){this._appRef=null,function YA(i,t){yh(i,t,t[yt],2,null,null)}(this._lView[at],this._lView)}attachToAppRef(t){if(this._attachedToViewContainer)throw new pe(902,!1);this._appRef=t}}class y8 extends ny{constructor(t){super(t),this._view=t}detectChanges(){const t=this._view;wo(t[at],t,t[Be],!1)}checkNoChanges(){}get context(){return null}}class KF extends Hl{constructor(t){super(),this.ngModule=t}resolveComponentFactory(t){const e=Hn(t);return new iy(e,this.ngModule)}}function ZF(i){const t=[];for(let e in i)i.hasOwnProperty(e)&&t.push({propName:i[e],templateName:e});return t}class x8{constructor(t,e){this.injector=t,this.parentInjector=e}get(t,e,n){n=jf(n);const r=this.injector.get(t,Fv,n);return r!==Fv||e===Fv?r:this.parentInjector.get(t,e,n)}}class iy extends Ov{get inputs(){return ZF(this.componentDef.inputs)}get outputs(){return ZF(this.componentDef.outputs)}constructor(t,e){super(),this.componentDef=t,this.ngModule=e,this.componentType=t.type,this.selector=function e1(i){return i.map(JD).join(",")}(t.selectors),this.ngContentSelectors=t.ngContentSelectors?t.ngContentSelectors:[],this.isBoundToModule=!!e}create(t,e,n,r){let s=(r=r||this.ngModule)instanceof to?r:r?.injector;s&&null!==this.componentDef.getStandaloneInjector&&(s=this.componentDef.getStandaloneInjector(s)||s);const o=s?new x8(t,s):t,a=o.get(Gl,null);if(null===a)throw new pe(407,!1);const l=o.get(ND,null),c=a.createRenderer(null,this.componentDef),d=this.componentDef.selectors[0][0]||"div",h=n?function M1(i,t,e){return i.selectRootElement(t,e===qs.ShadowDom)}(c,n,this.componentDef.encapsulation):Ep(c,d,function b8(i){const t=i.toLowerCase();return"svg"===t?kd:"math"===t?"math":null}(d)),p=this.componentDef.onPush?288:272,m=ey(0,null,null,1,0,null,null,null,null,null),g=wh(null,m,null,p,null,null,a,c,l,o,null);let b,v;rp(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 M8(i,t){const e=i[at],n=yi;return i[n]=t,Zd(e,n,2,"#host",null)}(g,h),F=function C8(i,t,e,n,r,s,o,a){const l=r[at];!function S8(i,t,e,n){for(const r of i)t.mergedAttrs=Cc(t.mergedAttrs,r.hostAttrs);null!==t.mergedAttrs&&(Mw(t,t.mergedAttrs,!0),null!==e&&Hx(n,e,t))}(n,i,t,o);const c=s.createRenderer(t,e),d=wh(r,vw(e),null,e.onPush?32:16,r[i.index],i,s,c,a||null,null,null);return l.firstCreatePass&&P(l,i,n.length-1),Di(r,d),r[i.index]=d}(C,h,y,M,g,a,c);v=N0(m,yi),h&&function A8(i,t,e,n){if(n)L_(i,e,["ng-version",BD.full]);else{const{attrs:r,classes:s}=function t1(i){const t=[],e=[];let n=1,r=2;for(;n0&&zx(i,e,s.join(" "))}}(c,y,h,n),void 0!==e&&function D8(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=Cc(r.hostAttrs,e=Cc(e,r.hostAttrs))}}(n)}function P1(i){return i===Xa?{}:i===$n?[]:i}function R8(i,t){const e=i.viewQuery;i.viewQuery=e?(n,r)=>{t(n,r),e(n,r)}:t}function k8(i,t){const e=i.contentQueries;i.contentQueries=e?(n,r,s)=>{t(n,r,s),e(n,r,s)}:t}function P8(i,t){const e=i.hostBindings;i.hostBindings=e?(n,r)=>{t(n,r),e(n,r)}:t}function Sw(i){return!!O1(i)&&(Array.isArray(i)||!(i instanceof Map)&&Symbol.iterator in i)}function O1(i){return null!==i&&("function"==typeof i||"object"==typeof i)}function $l(i,t,e){return i[t]=e}function Is(i,t,e){return!Object.is(i[t],e)&&(i[t]=e,!0)}function Sh(i,t,e,n){const r=Is(i,t,e);return Is(i,t+1,n)||r}function At(i,t,e,n){const r=Se();return Is(r,Fl(),t)&&(zn(),be(Ai(),r,i,t,e,n)),At}function jp(i,t,e,n){return Is(i,Fl(),e)?t+Qt(e)+n:sn}function Yp(i,t,e,n,r,s){const a=Sh(i,function Ja(){return Rt.lFrame.bindingIndex}(),e,r);return Ks(2),a?t+Qt(e)+n+Qt(r)+s:sn}function fe(i,t,e,n,r,s,o,a){const l=Se(),c=zn(),d=i+yi,h=c.firstCreatePass?function G8(i,t,e,n,r,s,o,a,l){const c=t.consts,d=Zd(t,i,4,o||null,Ol(c,a));ty(t,e,d,Ol(c,l)),Nd(t,d);const h=d.tView=ey(2,d,n,r,s,t.directiveRegistry,t.pipeRegistry,null,t.schemas,c);return null!==t.queries&&(t.queries.template(t,d),h.queries=t.queries.embeddedTView(d)),d}(d,c,l,t,e,n,r,s,o):c.data[d];ma(h,!1);const p=l[yt].createComment("");vh(c,l,p,h),Hr(p,l),Di(l,l[d]=mn(p,l,p,h)),yc(h)&&Qv(c,l,h),null!=o&&Jv(l,h,a)}function rr(i){return Od(function gA(){return Rt.lFrame.contextLView}(),yi+i)}function U(i,t,e){const n=Se();return Is(n,Fl(),t)&&no(zn(),Ai(),n,i,t,n[yt],e,!1),U}function F1(i,t,e,n,r){const o=r?"class":"style";k1(i,e,t.inputs[o],o,n)}function W(i,t,e,n){const r=Se(),s=zn(),o=yi+i,a=r[yt],l=s.firstCreatePass?function W8(i,t,e,n,r,s){const o=t.consts,l=Zd(t,i,2,n,Ol(o,r));return ty(t,e,l,Ol(o,s)),null!==l.attrs&&Mw(l,l.attrs,!1),null!==l.mergedAttrs&&Mw(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]=Ep(a,t,function j0(){return Rt.lFrame.currentNamespace}()),d=yc(l);return ma(l,!0),Hx(a,c,l),32!=(32&l.flags)&&vh(s,r,c,l),0===function uA(){return Rt.lFrame.elementDepthCount}()&&Hr(c,r),function hA(){Rt.lFrame.elementDepthCount++}(),d&&(Qv(s,r,l),Zv(s,l,r)),null!==n&&Jv(r,l),W}function Y(){let i=Er();D_()?T_():(i=i.parent,ma(i,!1));const t=i;!function fA(){Rt.lFrame.elementDepthCount--}();const e=zn();return e.firstCreatePass&&(Nd(e,i),Qf(i)&&e.queries.elementEnd(i)),null!=t.classesWithoutHost&&function wA(i){return 0!=(8&i.flags)}(t)&&F1(e,t,Se(),t.classesWithoutHost,!0),null!=t.stylesWithoutHost&&function F_(i){return 0!=(16&i.flags)}(t)&&F1(e,t,Se(),t.stylesWithoutHost,!1),Y}function Te(i,t,e,n){return W(i,t,e,n),Y(),Te}function Gr(i,t,e){const n=Se(),r=zn(),s=i+yi,o=r.firstCreatePass?function j8(i,t,e,n,r){const s=t.consts,o=Ol(s,n),a=Zd(t,i,8,"ng-container",o);return null!==o&&Mw(a,o,!0),ty(t,e,a,Ol(s,r)),null!==t.queries&&t.queries.elementStart(t,a),a}(s,r,n,t,e):r.data[s];ma(o,!0);const a=n[s]=n[yt].createComment("");return vh(r,n,a,o),Hr(a,n),yc(o)&&(Qv(r,n,o),Zv(r,o,n)),null!=e&&Jv(n,o),Gr}function $r(){let i=Er();const t=zn();return D_()?T_():(i=i.parent,ma(i,!1)),t.firstCreatePass&&(Nd(t,i),Qf(i)&&t.queries.elementEnd(i)),$r}function sy(i,t,e){return Gr(i,t,e),$r(),sy}function mi(){return Se()}function oy(i){return!!i&&"function"==typeof i.then}function uL(i){return!!i&&"function"==typeof i.subscribe}const L1=uL;function Ue(i,t,e,n){const r=Se(),s=zn(),o=Er();return hL(s,r,r[yt],o,i,t,n),Ue}function N1(i,t){const e=Er(),n=Se(),r=zn();return hL(r,n,qF(ih(r.data),e,n),e,i,t),N1}function hL(i,t,e,n,r,s,o){const a=yc(n),c=i.firstCreatePass&&YF(i),d=t[Be],h=jF(t);let p=!0;if(3&n.type||o){const b=Ei(n,t),v=o?o(b):b,y=h.length,M=o?C=>o(I(C[n.index])):n.index;let x=null;if(!o&&a&&(x=function Y8(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=pL(n,t,d,s,!1);const C=e.listen(v,r,s);h.push(s,C),c&&c.push(r,M,y,y+1)}}else s=pL(n,t,d,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?ws(i.index,t):t);let l=fL(t,e,n,o),c=s.__ngNextListenerFn__;for(;c;)l=fL(t,e,c,o)&&l,c=c.__ngNextListenerFn__;return r&&!1===l&&(o.preventDefault(),o.returnValue=!1),l}}function he(i=1){return function yA(i){return(Rt.lFrame.contextLView=function W0(i,t){for(;i>0;)t=t[Sr],i--;return t}(i,Rt.lFrame.contextLView))[Be]}(i)}function q8(i,t){let e=null;const n=function XD(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 V1(i){return 2|i}function Eh(i){return(131068&i)>>2}function z1(i,t){return-131069&i|t<<2}function H1(i){return 1|i}function ML(i,t,e,n,r){const s=i[e+1],o=null===t;let a=n?Jd(s):Eh(s),l=!1;for(;0!==a&&(!1===l||o);){const d=i[a+1];eW(i[a],t)&&(l=!0,i[a+1]=n?H1(d):V1(d)),a=n?Jd(d):Eh(d)}l&&(i[e+1]=n?V1(s):H1(s))}function eW(i,t){return null===i||null==t||(Array.isArray(i)?i[1]:i)===t||!(!Array.isArray(i)||"string"!=typeof t)&&Tc(i,t)>=0}const Ir={textEnd:0,key:0,keyEnd:0,value:0,valueEnd:0};function CL(i){return i.substring(Ir.key,Ir.keyEnd)}function SL(i,t){const e=Ir.textEnd;return e===t?-1:(t=Ir.keyEnd=function rW(i,t,e){for(;t32;)t++;return t}(i,Ir.key=t,e),em(i,t,e))}function em(i,t,e){for(;t=0;e=SL(t,e))Cs(i,CL(t),!0)}function cl(i,t,e,n){const r=Se(),s=zn(),o=Ks(2);s.firstUpdatePass&&RL(s,i,o,n),t!==sn&&Is(r,o,t)&&PL(s,s.data[Xn()],r,r[yt],i,r[o+1]=function gW(i,t){return null==i||""===i||("string"==typeof t?i+=t:"object"==typeof i&&(i=fi(Js(i)))),i}(t,e),n,o)}function IL(i,t){return t>=i.expandoStartIndex}function RL(i,t,e,n){const r=i.data;if(null===r[e+1]){const s=r[Xn()],o=IL(i,e);FL(s,n)&&null===t&&!o&&(t=!1),t=function cW(i,t,e,n){const r=ih(i);let s=n?t.residualClasses:t.residualStyles;if(null===r)0===(n?t.classBindings:t.styleBindings)&&(e=ay(e=G1(null,i,t,e,n),t.attrs,n),s=null);else{const o=t.directiveStylingLast;if(-1===o||i[o]!==r)if(e=G1(r,i,t,e,n),null===s){let l=function dW(i,t,e){const n=e?t.classBindings:t.styleBindings;if(0!==Eh(n))return i[Jd(n)]}(i,t,n);void 0!==l&&Array.isArray(l)&&(l=G1(null,i,t,l[1],n),l=ay(l,t.attrs,n),function uW(i,t,e,n){i[Jd(e?t.classBindings:t.styleBindings)]=n}(i,t,n,l))}else s=function hW(i,t,e){let n;const r=t.directiveEnd;for(let s=1+t.directiveStylingLast;s0)&&(c=!0)):d=e,r)if(0!==l){const p=Jd(i[a+1]);i[n+1]=Aw(p,a),0!==p&&(i[p+1]=z1(i[p+1],n)),i[a+1]=function K8(i,t){return 131071&i|t<<17}(i[a+1],n)}else i[n+1]=Aw(a,0),0!==a&&(i[a+1]=z1(i[a+1],n)),a=n;else i[n+1]=Aw(l,0),0===a?a=n:i[l+1]=z1(i[l+1],n),l=n;c&&(i[n+1]=V1(i[n+1])),ML(i,d,n,!0),ML(i,d,n,!1),function J8(i,t,e,n,r){const s=r?i.residualClasses:i.residualStyles;null!=s&&"string"==typeof t&&Tc(s,t)>=0&&(e[n+1]=H1(e[n+1]))}(t,d,i,n,s),o=Aw(a,l),s?t.classBindings=o:t.styleBindings=o}(r,s,t,e,o,n)}}function G1(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),d=c?l[1]:l,h=null===d;let p=e[r+1];p===sn&&(p=h?$n:void 0);let m=h?Wd(p,n):d===n?p:void 0;if(c&&!Dw(m)&&(m=Wd(l,n)),Dw(m)&&(a=m,o))return a;const g=i[r+1];r=o?Jd(g):Eh(g)}if(null!==t){let l=s?t.residualClasses:t.residualStyles;null!=l&&(a=Wd(l,n))}return a}function Dw(i){return void 0!==i}function FL(i,t){return 0!=(i.flags&(t?8:16))}function ze(i,t=""){const e=Se(),n=zn(),r=i+yi,s=n.firstCreatePass?Zd(n,r,1,t,null):n.data[r],o=e[r]=function cv(i,t){return i.createText(t)}(e[yt],t);vh(n,e,o,s),ma(s,!1)}function _i(i){return Zi("",i,""),_i}function Zi(i,t,e){const n=Se(),r=jp(n,i,t,e);return r!==sn&&Bc(n,Xn(),r),Zi}function tm(i,t,e,n,r){const s=Se(),o=Yp(s,i,t,e,n,r);return o!==sn&&Bc(s,Xn(),o),tm}function GL(i,t,e){!function dl(i,t,e,n){const r=zn(),s=Ks(2);r.firstUpdatePass&&RL(r,null,s,n);const o=Se();if(e!==sn&&Is(o,s,e)){const a=r.data[Xn()];if(FL(a,n)&&!IL(r,s)){let l=n?a.classesWithoutHost:a.stylesWithoutHost;null!==l&&(e=Vf(l,e||"")),F1(r,a,o,e,n)}else!function mW(i,t,e,n,r,s,o,a){r===sn&&(r=$n);let l=0,c=0,d=0((rt=rt||{})[rt.LocaleId=0]="LocaleId",rt[rt.DayPeriodsFormat=1]="DayPeriodsFormat",rt[rt.DayPeriodsStandalone=2]="DayPeriodsStandalone",rt[rt.DaysFormat=3]="DaysFormat",rt[rt.DaysStandalone=4]="DaysStandalone",rt[rt.MonthsFormat=5]="MonthsFormat",rt[rt.MonthsStandalone=6]="MonthsStandalone",rt[rt.Eras=7]="Eras",rt[rt.FirstDayOfWeek=8]="FirstDayOfWeek",rt[rt.WeekendRange=9]="WeekendRange",rt[rt.DateFormat=10]="DateFormat",rt[rt.TimeFormat=11]="TimeFormat",rt[rt.DateTimeFormat=12]="DateTimeFormat",rt[rt.NumberSymbols=13]="NumberSymbols",rt[rt.NumberFormats=14]="NumberFormats",rt[rt.CurrencyCode=15]="CurrencyCode",rt[rt.CurrencySymbol=16]="CurrencySymbol",rt[rt.CurrencyName=17]="CurrencyName",rt[rt.Currencies=18]="Currencies",rt[rt.Directionality=19]="Directionality",rt[rt.PluralCase=20]="PluralCase",rt[rt.ExtraData=21]="ExtraData",rt))();const im="en-US";let t2=im;function j1(i,t,e,n,r){if(i=kt(i),Array.isArray(i))for(let s=0;s>20;if(Fc(i)||!i.multi){const m=new Bd(l,r,E),g=q1(a,t,r?d:d+p,h);-1===g?(pn(oh(c,o),s,a),Y1(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=q1(a,t,d+p,h),g=q1(a,t,d,d+p),v=g>=0&&e[g];if(r&&!v||!r&&!(m>=0&&e[m])){pn(oh(c,o),s,a);const y=function Pj(i,t,e,n,r){const s=new Bd(i,e,E);return s.multi=[],s.index=t,s.componentProviders=0,A2(s,r,n&&!e),s}(r?kj:Rj,e.length,r,n,l);!r&&v&&(e[g].providerFactory=y),Y1(s,i,t.length,0),t.push(a),c.directiveStart++,c.directiveEnd++,r&&(c.providerIndexes+=1048576),e.push(y),o.push(y)}else Y1(s,i,m>-1?m:g,A2(e[r?g:m],l,!r&&n));!r&&n&&v&&e[g].componentProviders++}}}function Y1(i,t,e,n){const r=Fc(t),s=function DD(i){return!!i.useClass}(t);if(r||s){const l=(s?kt(t.useClass):t).prototype.ngOnDestroy;if(l){const c=i.destroyHooks||(i.destroyHooks=[]);if(!r&&t.multi){const d=c.indexOf(e);-1===d?c.push(e,[n,l]):c[d+1].push(n,l)}else c.push(e,l)}}}function A2(i,t,e){return e&&i.componentProviders++,i.multi.push(t)-1}function q1(i,t,e,n){for(let r=e;r{e.providersResolver=(n,r)=>function Ij(i,t,e){const n=zn();if(n.firstCreatePass){const r=_o(i);j1(e,n.data,n.blueprint,r,!0),j1(t,n.data,n.blueprint,r,!1)}}(n,r?r(i):i,t)}}class rm{}class D2{}class T2 extends rm{constructor(t,e){super(),this._parent=e,this._bootstrapComponents=[],this.destroyCbs=[],this.componentFactoryResolver=new KF(this);const n=ur(t);this._bootstrapComponents=ll(n.bootstrap),this._r3Injector=dw(t,e,[{provide:rm,useValue:this},{provide:Hl,useValue:this.componentFactoryResolver}],fi(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 K1 extends D2{constructor(t){super(),this.moduleType=t}create(t){return new T2(this.moduleType,t)}}class Fj extends rm{constructor(t,e,n){super(),this.componentFactoryResolver=new KF(this),this.instance=null;const r=new Hp([...t,{provide:rm,useValue:this},{provide:Hl,useValue:this.componentFactoryResolver}],e||xh(),n,new Set(["environment"]));this.injector=r,r.resolveInjectorInitializers()}destroy(){this.injector.destroy()}onDestroy(t){this.injector.onDestroy(t)}}function Ow(i,t,e=null){return new Fj(i,t,e).injector}let Lj=(()=>{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=ew(0,e.type),r=n.length>0?Ow([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=ke({token:i,providedIn:"environment",factory:()=>new i(ee(to))}),i})();function Z1(i){i.getStandaloneInjector=t=>t.get(Lj).getOrCreateStandaloneInjector(i)}function so(i,t,e){const n=Vr()+i,r=Se();return r[n]===sn?$l(r,n,e?t.call(e):t()):function ry(i,t){return i[t]}(r,n)}function sm(i,t,e,n){return N2(Se(),Vr(),i,t,e,n)}function L2(i,t,e,n,r,s,o){return function V2(i,t,e,n,r,s,o,a,l){const c=t+e;return function Sa(i,t,e,n,r,s){const o=Sh(i,t,e,n);return Sh(i,t+2,r,s)||o}(i,c,r,s,o,a)?$l(i,c+4,l?n.call(l,r,s,o,a):n(r,s,o,a)):fy(i,c+4)}(Se(),Vr(),i,t,e,n,r,s,o)}function fy(i,t){const e=i[t];return e===sn?void 0:e}function N2(i,t,e,n,r,s){const o=t+e;return Is(i,o,r)?$l(i,o+1,s?n.call(s,r):n(r)):fy(i,o+1)}function Dt(i,t){const e=zn();let n;const r=i+yi;e.firstCreatePass?(n=function Qj(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=Qa(n.type)),o=Ys(E);try{const a=cp(!1),l=s();return cp(a),function $8(i,t,e,n){e>=i.data.length&&(i.data[e]=null,i.blueprint[e]=null),t[e]=n}(e,Se(),r,l),l}finally{Ys(o)}}function Lt(i,t,e){const n=i+yi,r=Se(),s=Od(r,n);return py(r,n)?N2(r,Vr(),t,s.transform,e,s):s.transform(e)}function J1(i,t,e,n){const r=i+yi,s=Se(),o=Od(s,r);return py(s,r)?function B2(i,t,e,n,r,s,o){const a=t+e;return Sh(i,a,r,s)?$l(i,a+2,o?n.call(o,r,s):n(r,s)):fy(i,a+2)}(s,Vr(),t,o.transform,e,n,o):o.transform(e,n)}function py(i,t){return i[at].data[t].pure}function eT(i){return t=>{setTimeout(i,void 0,t)}}const We=class n6 extends Re{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=eT(s),r&&(r=eT(r)),o&&(o=eT(o)));const a=super.subscribe({next:r,error:s,complete:o});return t instanceof Zt&&t.add(a),a}};function r6(){return this._results[Symbol.iterator]()}class om{get changes(){return this._changes||(this._changes=new We)}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=om.prototype;e[Symbol.iterator]||(e[Symbol.iterator]=r6)}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 Ar(i){return i.flat(Number.POSITIVE_INFINITY)}(t);(this._changesDetected=!function fp(i,t,e){if(i.length!==t.length)return!1;for(let n=0;n{class i{}return i.__NG_ELEMENT_ID__=a6,i})();const s6=Mo,o6=class extends s6{constructor(t,e,n){super(),this._declarationLView=t,this._declarationTContainer=e,this.elementRef=n}createEmbeddedView(t,e){const n=this._declarationTContainer.tView,r=wh(this._declarationLView,n,t,16,null,n.declTNode,null,null,null,null,e||null);r[th]=this._declarationLView[this._declarationTContainer.index];const o=this._declarationLView[Xs];return null!==o&&(r[Xs]=o.createEmbeddedView(n)),Ch(n,r,t),new ny(r)}};function a6(){return Fw(Er(),Se())}function Fw(i,t){return 4&i.type?new o6(t,i,Fn(i,t)):null}let Wr=(()=>{class i{}return i.__NG_ELEMENT_ID__=l6,i})();function l6(){return $2(Er(),Se())}const c6=Wr,H2=class extends c6{constructor(t,e,n){super(),this._lContainer=t,this._hostTNode=e,this._hostLView=n}get element(){return Fn(this._hostTNode,this._hostLView)}get injector(){return new Ec(this._hostTNode,this._hostLView)}get parentInjector(){const t=lh(this._hostTNode,this._hostLView);if(lp(t)){const e=sh(t,this._hostLView),n=rh(t);return new Ec(e[at].data[n+8],e)}return new Ec(null,this._hostLView)}clear(){for(;this.length>0;)this.remove(this.length-1)}get(t){const e=G2(this._lContainer);return null!==e&&e[t]||null}get length(){return this._lContainer.length-Ui}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 uh(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 iy(Hn(t)),c=n||this.parentInjector;if(!s&&null==l.ngModule){const p=(o?c:this.parentInjector).get(to,null);p&&(s=p)}const d=l.create(c,r,void 0,s);return this.insert(d.hostView,a),d}insert(t,e){const n=t._lView,r=n[at];if(function dA(i){return xs(i[Bi])}(n)){const d=this.indexOf(t);if(-1!==d)this.detach(d);else{const h=n[Bi],p=new H2(h,h[ue],h[Bi]);p.detach(p.indexOf(t))}}const s=this._adjustIndex(e),o=this._lContainer;!function dv(i,t,e,n){const r=Ui+n,s=e.length;n>0&&(e[r-1][ys]=t),n0)n.push(o[a/2]);else{const c=s[a+1],d=t[-l];for(let h=Ui;h{class i{constructor(e){this.appInits=e,this.resolve=Nw,this.reject=Nw,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)(ee(Bw,8))},i.\u0275prov=ke({token:i,factory:i.\u0275fac,providedIn:"root"}),i})();const cm=new me("AppId",{providedIn:"root",factory:function fN(){return`${hT()}${hT()}${hT()}`}});function hT(){return String.fromCharCode(97+Math.floor(25*Math.random()))}const pN=new me("Platform Initializer"),fT=new me("Platform ID",{providedIn:"platform",factory:()=>"unknown"}),Rr=new me("AnimationModuleType");let F6=(()=>{class i{log(e){console.log(e)}warn(e){console.warn(e)}}return i.\u0275fac=function(e){return new(e||i)},i.\u0275prov=ke({token:i,factory:i.\u0275fac,providedIn:"platform"}),i})();const ql=new me("LocaleId",{providedIn:"root",factory:()=>Ot(ql,Pt.Optional|Pt.SkipSelf)||function L6(){return typeof $localize<"u"&&$localize.locale||im}()});class B6{constructor(t,e){this.ngModuleFactory=t,this.componentFactories=e}}let mN=(()=>{class i{compileModuleSync(e){return new K1(e)}compileModuleAsync(e){return Promise.resolve(this.compileModuleSync(e))}compileModuleAndAllComponentsSync(e){const n=this.compileModuleSync(e),s=ll(ur(e).declarations).reduce((o,a)=>{const l=Hn(a);return l&&o.push(new iy(l)),o},[]);return new B6(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=ke({token:i,factory:i.\u0275fac,providedIn:"root"}),i})();const z6=(()=>Promise.resolve(0))();function pT(i){typeof Zone>"u"?z6.then(()=>{i&&i.apply(null,null)}):Zone.current.scheduleMicroTask("scheduleMicrotask",i)}class ft{constructor({enableLongStackTrace:t=!1,shouldCoalesceEventChangeDetection:e=!1,shouldCoalesceRunChangeDetection:n=!1}){if(this.hasPendingMacrotasks=!1,this.hasPendingMicrotasks=!1,this.isStable=!0,this.onUnstable=new We(!1),this.onMicrotaskEmpty=new We(!1),this.onStable=new We(!1),this.onError=new We(!1),typeof Zone>"u")throw new pe(908,!1);Zone.assertZonePatched();const r=this;r._nesting=0,r._outer=r._inner=Zone.current,Zone.TaskTrackingZoneSpec&&(r._inner=r._inner.fork(new Zone.TaskTrackingZoneSpec)),t&&Zone.longStackTraceZoneSpec&&(r._inner=r._inner.fork(Zone.longStackTraceZoneSpec)),r.shouldCoalesceEventChangeDetection=!n&&e,r.shouldCoalesceRunChangeDetection=n,r.lastRequestAnimationFrameId=-1,r.nativeRequestAnimationFrame=function H6(){let i=Rn.requestAnimationFrame,t=Rn.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 W6(i){const t=()=>{!function $6(i){i.isCheckStableRunning||-1!==i.lastRequestAnimationFrameId||(i.lastRequestAnimationFrameId=i.nativeRequestAnimationFrame.call(Rn,()=>{i.fakeTopEventTask||(i.fakeTopEventTask=Zone.root.scheduleEventTask("fakeTopEventTask",()=>{i.lastRequestAnimationFrameId=-1,gT(i),i.isCheckStableRunning=!0,mT(i),i.isCheckStableRunning=!1},void 0,()=>{},()=>{})),i.fakeTopEventTask.invoke()}),gT(i))}(i)};i._inner=i._inner.fork({name:"angular",properties:{isAngularZone:!0},onInvokeTask:(e,n,r,s,o,a)=>{try{return vN(i),e.invokeTask(r,s,o,a)}finally{(i.shouldCoalesceEventChangeDetection&&"eventTask"===s.type||i.shouldCoalesceRunChangeDetection)&&t(),yN(i)}},onInvoke:(e,n,r,s,o,a,l)=>{try{return vN(i),e.invoke(r,s,o,a,l)}finally{i.shouldCoalesceRunChangeDetection&&t(),yN(i)}},onHasTask:(e,n,r,s)=>{e.hasTask(r,s),n===r&&("microTask"==s.change?(i._hasPendingMicrotasks=s.microTask,gT(i),mT(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(!ft.isInAngularZone())throw new pe(909,!1)}static assertNotInAngularZone(){if(ft.isInAngularZone())throw new pe(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,G6,Nw,Nw);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 G6={};function mT(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 gT(i){i.hasPendingMicrotasks=!!(i._hasPendingMicrotasks||(i.shouldCoalesceEventChangeDetection||i.shouldCoalesceRunChangeDetection)&&-1!==i.lastRequestAnimationFrameId)}function vN(i){i._nesting++,i.isStable&&(i.isStable=!1,i.onUnstable.emit(null))}function yN(i){i._nesting--,mT(i)}class j6{constructor(){this.hasPendingMicrotasks=!1,this.hasPendingMacrotasks=!1,this.isStable=!0,this.onUnstable=new We,this.onMicrotaskEmpty=new We,this.onStable=new We,this.onError=new We}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 bN=new me(""),Vw=new me("");let yT,_T=(()=>{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,yT||(function Y6(i){yT=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:()=>{ft.assertNotInAngularZone(),pT(()=>{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())pT(()=>{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)(ee(ft),ee(vT),ee(Vw))},i.\u0275prov=ke({token:i,factory:i.\u0275fac}),i})(),vT=(()=>{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 yT?.findTestabilityInTree(this,e,n)??null}}return i.\u0275fac=function(e){return new(e||i)},i.\u0275prov=ke({token:i,factory:i.\u0275fac,providedIn:"platform"}),i})();const Vc=!1;let eu=null;const xN=new me("AllowMultipleToken"),bT=new me("PlatformDestroyListeners"),wN=new me("appBootstrapListener");class MN{constructor(t,e){this.name=t,this.token=e}}function SN(i,t,e=[]){const n=`Platform: ${t}`,r=new me(n);return(s=[])=>{let o=xT();if(!o||o.injector.get(xN,!1)){const a=[...e,...s,{provide:r,useValue:!0}];i?i(a):function K6(i){if(eu&&!eu.get(xN,!1))throw new pe(400,!1);eu=i;const t=i.get(AN);(function CN(i){const t=i.get(pN,null);t&&t.forEach(e=>e())})(i)}(function EN(i=[],t){return $i.create({name:t,providers:[{provide:Iv,useValue:"platform"},{provide:bT,useValue:new Set([()=>eu=null])},...i]})}(a,n))}return function Q6(i){const t=xT();if(!t)throw new pe(401,!1);return t}()}}function xT(){return eu?.get(AN)??null}let AN=(()=>{class i{constructor(e){this._injector=e,this._modules=[],this._destroyListeners=[],this._destroyed=!1}bootstrapModuleFactory(e,n){const r=function TN(i,t){let e;return e="noop"===i?new j6:("zone.js"===i?void 0:i)||new ft(t),e}(n?.ngZone,function DN(i){return{enableLongStackTrace:!1,shouldCoalesceEventChangeDetection:!(!i||!i.ngZoneEventCoalescing)||!1,shouldCoalesceRunChangeDetection:!(!i||!i.ngZoneRunCoalescing)||!1}}(n)),s=[{provide:ft,useValue:r}];return r.run(()=>{const o=$i.create({providers:s,parent:this.injector,name:e.moduleType.name}),a=e.create(o),l=a.injector.get(al,null);if(!l)throw new pe(402,!1);return r.runOutsideAngular(()=>{const c=r.onError.subscribe({next:d=>{l.handleError(d)}});a.onDestroy(()=>{zw(this._modules,a),c.unsubscribe()})}),function IN(i,t,e){try{const n=e();return oy(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(Uw);return c.runInitializers(),c.donePromise.then(()=>(function n2(i){En(i,"Expected localeId to be defined"),"string"==typeof i&&(t2=i.toLowerCase().replace(/_/g,"-"))}(a.injector.get(ql,im)||im),this._moduleDoBootstrap(a),a))})})}bootstrapModule(e,n=[]){const r=RN({},n);return function q6(i,t,e){const n=new K1(e);return Promise.resolve(n)}(0,0,e).then(s=>this.bootstrapModuleFactory(s,r))}_moduleDoBootstrap(e){const n=e.injector.get(dm);if(e._bootstrapComponents.length>0)e._bootstrapComponents.forEach(r=>n.bootstrap(r));else{if(!e.instance.ngDoBootstrap)throw new pe(-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 pe(404,!1);this._modules.slice().forEach(n=>n.destroy()),this._destroyListeners.forEach(n=>n());const e=this._injector.get(bT,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)(ee($i))},i.\u0275prov=ke({token:i,factory:i.\u0275fac,providedIn:"platform"}),i})();function RN(i,t){return Array.isArray(t)?t.reduce(RN,i):{...i,...t}}let dm=(()=>{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 In(a=>{this._stable=this._zone.isStable&&!this._zone.hasPendingMacrotasks&&!this._zone.hasPendingMicrotasks,this._zone.runOutsideAngular(()=>{a.next(this._stable),a.complete()})}),o=new In(a=>{let l;this._zone.runOutsideAngular(()=>{l=this._zone.onStable.subscribe(()=>{ft.assertNotInAngularZone(),pT(()=>{!this._stable&&!this._zone.hasPendingMacrotasks&&!this._zone.hasPendingMicrotasks&&(this._stable=!0,a.next(!0))})})});const c=this._zone.onUnstable.subscribe(()=>{ft.assertInAngularZone(),this._stable&&(this._stable=!1,this._zone.runOutsideAngular(()=>{a.next(!1)}))});return()=>{l.unsubscribe(),c.unsubscribe()}});this.isStable=Mr(s,o.pipe(Uf()))}bootstrap(e,n){const r=e instanceof Ov;if(!this._injector.get(Uw).done){!r&&function Sd(i){const t=Hn(i)||Ur(i)||vs(i);return null!==t&&t.standalone}(e);throw new pe(405,Vc)}let o;o=r?e:this._injector.get(Hl).resolveComponentFactory(e),this.componentTypes.push(o.componentType);const a=function X6(i){return i.isBoundToModule}(o)?void 0:this._injector.get(rm),c=o.create($i.NULL,[],n||o.selector,a),d=c.location.nativeElement,h=c.injector.get(bN,null);return h?.registerApplication(d),c.onDestroy(()=>{this.detachView(c.hostView),zw(this.components,c),h?.unregisterApplication(d)}),this._loadComponent(c),c}tick(){if(this._runningTick)throw new pe(101,!1);try{this._runningTick=!0;for(let e of this._views)e.detectChanges()}catch(e){this._zone.runOutsideAngular(()=>this._exceptionHandler.handleError(e))}finally{this._runningTick=!1}}attachView(e){const n=e;this._views.push(n),n.attachToAppRef(this)}detachView(e){const n=e;zw(this._views,n),n.detachFromAppRef()}_loadComponent(e){this.attachView(e.hostView),this.tick(),this.components.push(e);const n=this._injector.get(wN,[]);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),()=>zw(this._destroyListeners,e)}destroy(){if(this._destroyed)throw new pe(406,!1);const e=this._injector;e.destroy&&!e.destroyed&&e.destroy()}get viewCount(){return this._views.length}warnIfDestroyed(){}}return i.\u0275fac=function(e){return new(e||i)(ee(ft),ee(to),ee(al))},i.\u0275prov=ke({token:i,factory:i.\u0275fac,providedIn:"root"}),i})();function zw(i,t){const e=i.indexOf(t);e>-1&&i.splice(e,1)}let Zn=(()=>{class i{}return i.__NG_ELEMENT_ID__=e9,i})();function e9(i){return function t9(i,t,e){if(Ad(i)&&!e){const n=ws(i.index,t);return new ny(n,n)}return 47&i.type?new ny(t[ir],t):null}(Er(),Se(),16==(16&i))}class LN{constructor(){}supports(t){return Sw(t)}create(t){return new l9(t)}}const a9=(i,t)=>t;class l9{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||a9}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 c9(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 NN),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 NN),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 c9{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 d9{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 NN{constructor(){this.map=new Map}put(t){const e=t.trackById;let n=this.map.get(e);n||(n=new d9,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 BN(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 h9(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 h9{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 VN(){return new $w([new LN])}let $w=(()=>{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||VN()),deps:[[i,new xa,new Ss]]}}find(e){const n=this.factories.find(r=>r.supports(e));if(null!=n)return n;throw new pe(901,!1)}}return i.\u0275prov=ke({token:i,providedIn:"root",factory:VN}),i})();function zN(){return new gy([new UN])}let gy=(()=>{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||zN()),deps:[[i,new xa,new Ss]]}}find(e){const n=this.factories.find(r=>r.supports(e));if(n)return n;throw new pe(901,!1)}}return i.\u0275prov=ke({token:i,providedIn:"root",factory:zN}),i})();const m9=SN(null,"core",[]);let g9=(()=>{class i{constructor(e){}}return i.\u0275fac=function(e){return new(e||i)(ee(dm))},i.\u0275mod=nn({type:i}),i.\u0275inj=Kt({}),i})();let ET=null;function zc(){return ET}class y9{}const jt=new me("DocumentToken");let AT=(()=>{class i{historyGo(e){throw new Error("Not implemented")}}return i.\u0275fac=function(e){return new(e||i)},i.\u0275prov=ke({token:i,factory:function(){return function b9(){return ee(HN)}()},providedIn:"platform"}),i})();const x9=new me("Location Initialized");let HN=(()=>{class i extends AT{constructor(e){super(),this._doc=e,this._location=window.location,this._history=window.history}getBaseHrefFromDOM(){return zc().getBaseHref(this._doc)}onPopState(e){const n=zc().getGlobalEventTarget(this._doc,"window");return n.addEventListener("popstate",e,!1),()=>n.removeEventListener("popstate",e)}onHashChange(e){const n=zc().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){GN()?this._history.pushState(e,n,r):this._location.hash=r}replaceState(e,n,r){GN()?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)(ee(jt))},i.\u0275prov=ke({token:i,factory:function(){return function w9(){return new HN(ee(jt))}()},providedIn:"platform"}),i})();function GN(){return!!window.history.pushState}function DT(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 $N(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 Hc(i){return i&&"?"!==i[0]?"?"+i:i}let Th=(()=>{class i{historyGo(e){throw new Error("Not implemented")}}return i.\u0275fac=function(e){return new(e||i)},i.\u0275prov=ke({token:i,factory:function(){return Ot(jN)},providedIn:"root"}),i})();const WN=new me("appBaseHref");let jN=(()=>{class i extends Th{constructor(e,n){super(),this._platformLocation=e,this._removeListenerFns=[],this._baseHref=n??this._platformLocation.getBaseHrefFromDOM()??Ot(jt).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 DT(this._baseHref,e)}path(e=!1){const n=this._platformLocation.pathname+Hc(this._platformLocation.search),r=this._platformLocation.hash;return r&&e?`${n}${r}`:n}pushState(e,n,r,s){const o=this.prepareExternalUrl(r+Hc(s));this._platformLocation.pushState(e,n,o)}replaceState(e,n,r,s){const o=this.prepareExternalUrl(r+Hc(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)(ee(AT),ee(WN,8))},i.\u0275prov=ke({token:i,factory:i.\u0275fac,providedIn:"root"}),i})(),M9=(()=>{class i extends Th{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=DT(this._baseHref,e);return n.length>0?"#"+n:n}pushState(e,n,r,s){let o=this.prepareExternalUrl(r+Hc(s));0==o.length&&(o=this._platformLocation.pathname),this._platformLocation.pushState(e,n,o)}replaceState(e,n,r,s){let o=this.prepareExternalUrl(r+Hc(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)(ee(AT),ee(WN,8))},i.\u0275prov=ke({token:i,factory:i.\u0275fac}),i})(),_y=(()=>{class i{constructor(e){this._subject=new We,this._urlChangeListeners=[],this._urlChangeSubscription=null,this._locationStrategy=e;const n=this._locationStrategy.getBaseHref();this._basePath=function E9(i){if(new RegExp("^(https?:)?//").test(i)){const[,e]=i.split(/\/\/[^\/]+/);return e}return i}($N(YN(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+Hc(n))}normalize(e){return i.stripTrailingSlash(function S9(i,t){if(!i||!t.startsWith(i))return t;const e=t.substring(i.length);return""===e||["/",";","?","#"].includes(e[0])?e:t}(this._basePath,YN(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+Hc(n)),r)}replaceState(e,n="",r=null){this._locationStrategy.replaceState(r,"",e,n),this._notifyUrlChangeListeners(this.prepareExternalUrl(e+Hc(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=Hc,i.joinWithSlash=DT,i.stripTrailingSlash=$N,i.\u0275fac=function(e){return new(e||i)(ee(Th))},i.\u0275prov=ke({token:i,factory:function(){return function C9(){return new _y(ee(Th))}()},providedIn:"root"}),i})();function YN(i){return i.replace(/\/index.html$/,"")}var Co=(()=>((Co=Co||{})[Co.Decimal=0]="Decimal",Co[Co.Percent=1]="Percent",Co[Co.Currency=2]="Currency",Co[Co.Scientific=3]="Scientific",Co))(),zt=(()=>((zt=zt||{})[zt.Decimal=0]="Decimal",zt[zt.Group=1]="Group",zt[zt.List=2]="List",zt[zt.PercentSign=3]="PercentSign",zt[zt.PlusSign=4]="PlusSign",zt[zt.MinusSign=5]="MinusSign",zt[zt.Exponential=6]="Exponential",zt[zt.SuperscriptingExponent=7]="SuperscriptingExponent",zt[zt.PerMille=8]="PerMille",zt[zt.Infinity=9]="Infinity",zt[zt.NaN=10]="NaN",zt[zt.TimeSeparator=11]="TimeSeparator",zt[zt.CurrencyDecimal=12]="CurrencyDecimal",zt[zt.CurrencyGroup=13]="CurrencyGroup",zt))();function Ea(i,t){const e=ro(i),n=e[rt.NumberSymbols][t];if(typeof n>"u"){if(t===zt.CurrencyDecimal)return e[rt.NumberSymbols][zt.Decimal];if(t===zt.CurrencyGroup)return e[rt.NumberSymbols][zt.Group]}return n}const Q9=/^(\d+)?\.((\d+)(-(\d+))?)?$/,JN=22,Jw=".",yy="0",J9=";",eY=",",PT="#";function LT(i){const t=parseInt(i);if(isNaN(t))throw new Error("Invalid integer literal when parsing "+i);return t}const BT=/\s+/,nB=[];let hm=(()=>{class i{constructor(e,n,r,s){this._iterableDiffers=e,this._keyValueDiffers=n,this._ngEl=r,this._renderer=s,this.initialClasses=nB,this.stateMap=new Map}set klass(e){this.initialClasses=null!=e?e.trim().split(BT):nB}set ngClass(e){this.rawClass="string"==typeof e?e.trim().split(BT):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(BT).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)(E($w),E(gy),E(mt),E(ol))},i.\u0275dir=ve({type:i,selectors:[["","ngClass",""]],inputs:{klass:["class","klass"],ngClass:"ngClass"},standalone:!0}),i})();class uY{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 So=(()=>{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 uY(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),sB(a,r)}});for(let r=0,s=n.length;r{sB(n.get(r.currentIndex),r)})}static ngTemplateContextGuard(e,n){return!0}}return i.\u0275fac=function(e){return new(e||i)(E(Wr),E(Mo),E($w))},i.\u0275dir=ve({type:i,selectors:[["","ngFor","","ngForOf",""]],inputs:{ngForOf:"ngForOf",ngForTrackBy:"ngForTrackBy",ngForTemplate:"ngForTemplate"},standalone:!0}),i})();function sB(i,t){i.context.$implicit=t.item}let vi=(()=>{class i{constructor(e,n){this._viewContainer=e,this._context=new fY,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){oB("ngIfThen",e),this._thenTemplateRef=e,this._thenViewRef=null,this._updateView()}set ngIfElse(e){oB("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)(E(Wr),E(Mo))},i.\u0275dir=ve({type:i,selectors:[["","ngIf",""]],inputs:{ngIf:"ngIf",ngIfThen:"ngIfThen",ngIfElse:"ngIfElse"},standalone:!0}),i})();class fY{constructor(){this.$implicit=null,this.ngIf=null}}function oB(i,t){if(t&&!t.createEmbeddedView)throw new Error(`${i} must be a TemplateRef, but received '${fi(t)}'.`)}class UT{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 by=(()=>{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=ve({type:i,selectors:[["","ngSwitch",""]],inputs:{ngSwitch:"ngSwitch"},standalone:!0}),i})(),VT=(()=>{class i{constructor(e,n,r){this.ngSwitch=r,r._addCase(),this._view=new UT(e,n)}ngDoCheck(){this._view.enforceState(this.ngSwitch._matchCase(this.ngSwitchCase))}}return i.\u0275fac=function(e){return new(e||i)(E(Wr),E(Mo),E(by,9))},i.\u0275dir=ve({type:i,selectors:[["","ngSwitchCase",""]],inputs:{ngSwitchCase:"ngSwitchCase"},standalone:!0}),i})(),aB=(()=>{class i{constructor(e,n,r){r._addDefault(new UT(e,n))}}return i.\u0275fac=function(e){return new(e||i)(E(Wr),E(Mo),E(by,9))},i.\u0275dir=ve({type:i,selectors:[["","ngSwitchDefault",""]],standalone:!0}),i})(),eM=(()=>{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:Es.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)(E(mt),E(gy),E(ol))},i.\u0275dir=ve({type:i,selectors:[["","ngStyle",""]],inputs:{ngStyle:"ngStyle"},standalone:!0}),i})(),xy=(()=>{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)(E(Wr))},i.\u0275dir=ve({type:i,selectors:[["","ngTemplateOutlet",""]],inputs:{ngTemplateOutletContext:"ngTemplateOutletContext",ngTemplateOutlet:"ngTemplateOutlet",ngTemplateOutletInjector:"ngTemplateOutletInjector"},standalone:!0,features:[bi]}),i})();function fl(i,t){return new pe(2100,!1)}class mY{createSubscription(t,e){return t.subscribe({next:e,error:n=>{throw n}})}dispose(t){t.unsubscribe()}}class gY{createSubscription(t,e){return t.then(e,n=>{throw n})}dispose(t){}}const _Y=new gY,vY=new mY;let pl=(()=>{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(oy(e))return _Y;if(uL(e))return vY;throw fl()}_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)(E(Zn,16))},i.\u0275pipe=Gi({name:"async",type:i,pure:!1,standalone:!0}),i})(),cB=(()=>{class i{constructor(e){this.differs=e,this.keyValues=[],this.compareFn=dB}transform(e,n=dB){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 RY(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)(E(gy,16))},i.\u0275pipe=Gi({name:"keyvalue",type:i,pure:!1,standalone:!0}),i})();function dB(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 zT(i){return!(null==i||""===i||i!=i)}(e))return null;r=r||this._locale;try{return function rY(i,t,e){return function OT(i,t,e,n,r,s,o=!1){let a="",l=!1;if(isFinite(i)){let c=function oY(i){let n,r,s,o,a,t=Math.abs(i)+"",e=0;for((r=t.indexOf(Jw))>-1&&(t=t.replace(Jw,"")),(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)===yy;s++);if(s===(a=t.length))n=[0],r=1;else{for(a--;t.charAt(a)===yy;)a--;for(r-=s,n=[],o=0;s<=a;s++,o++)n[o]=Number(t.charAt(s))}return r>JN&&(n=n.splice(0,JN-1),e=r-1,r=1),{digits:n,exponent:e,integerLen:r}}(i);o&&(c=function sY(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 d=t.minInt,h=t.minFrac,p=t.maxFrac;if(s){const M=s.match(Q9);if(null===M)throw new Error(`${s} is not a valid digit info`);const x=M[1],C=M[3],F=M[5];null!=x&&(d=LT(x)),null!=C&&(h=LT(C)),null!=F?p=LT(F):null!=C&&h>p&&(p=h)}!function aY(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);d&&(n.unshift(d),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(Ea(e,n)),v.length&&(a+=Ea(e,r)+v.join("")),b&&(a+=Ea(e,zt.Exponential)+"+"+b)}else a=Ea(e,zt.Infinity);return a=i<0&&!l?t.negPre+a+t.negSuf:t.posPre+a+t.posSuf,a}(i,function FT(i,t="-"){const e={minInt:1,minFrac:0,maxFrac:0,posPre:"",posSuf:"",negPre:"",negSuf:"",gSize:0,lgSize:0},n=i.split(J9),r=n[0],s=n[1],o=-1!==r.indexOf(Jw)?r.split(Jw):[r.substring(0,r.lastIndexOf(yy)+1),r.substring(r.lastIndexOf(yy)+1)],a=o[0],l=o[1]||"";e.posPre=a.substring(0,a.indexOf(PT));for(let d=0;d{class i{}return i.\u0275fac=function(e){return new(e||i)},i.\u0275mod=nn({type:i}),i.\u0275inj=Kt({}),i})();const hB="browser";let BY=(()=>{class i{}return i.\u0275prov=ke({token:i,providedIn:"root",factory:()=>new UY(ee(jt),window)}),i})();class UY{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 VY(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=fB(this.window.history)||fB(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 fB(i){return Object.getOwnPropertyDescriptor(i,"scrollRestoration")}class p7 extends y9{constructor(){super(...arguments),this.supportsDOMEvents=!0}}class WT extends p7{static makeCurrent(){!function v9(i){ET||(ET=i)}(new WT)}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 m7(){return My=My||document.querySelector("base"),My?My.getAttribute("href"):null}();return null==e?null:function g7(i){iM=iM||document.createElement("a"),iM.setAttribute("href",i);const t=iM.pathname;return"/"===t.charAt(0)?t:`/${t}`}(e)}resetBaseElement(){My=null}getUserAgent(){return window.navigator.userAgent}getCookie(t){return function cY(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 iM,My=null;const vB=new me("TRANSITION_ID"),v7=[{provide:Bw,useFactory:function _7(i,t,e){return()=>{e.get(Uw).donePromise.then(()=>{const n=zc(),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=ke({token:i,factory:i.\u0275fac}),i})();const rM=new me("EventManagerPlugins");let sM=(()=>{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=ke({token:i,factory:i.\u0275fac}),i})(),Cy=(()=>{class i extends bB{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)(ee(jt))},i.\u0275prov=ke({token:i,factory:i.\u0275fac}),i})();const jT={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/"},YT=/%COMP%/g,MB=new me("RemoveStylesOnCompDestory",{providedIn:"root",factory:()=>!1});function CB(i,t){return t.flat(100).map(e=>e.replace(YT,i))}function SB(i){return t=>{if("__ngUnwrap__"===t)return i;!1===i(t)&&(t.preventDefault(),t.returnValue=!1)}}let oM=(()=>{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 qT(e)}createRenderer(e,n){if(!e||!n)return this.defaultRenderer;const r=this.getOrCreateRenderer(e,n);return r instanceof DB?r.applyToHost(e):r instanceof XT&&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 qs.Emulated:s=new DB(o,a,n,this.appId,l);break;case qs.ShadowDom:return new A7(o,a,e,n);default:s=new XT(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)(ee(sM),ee(Cy),ee(cm),ee(MB))},i.\u0275prov=ke({token:i,factory:i.\u0275fac}),i})();class qT{constructor(t){this.eventManager=t,this.data=Object.create(null),this.destroyNode=null}destroy(){}createElement(t,e){return e?document.createElementNS(jT[e]||e,t):document.createElement(t)}createComment(t){return document.createComment(t)}createText(t){return document.createTextNode(t)}appendChild(t,e){(AB(t)?t.content:t).appendChild(e)}insertBefore(t,e,n){t&&(AB(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=jT[r];s?t.setAttributeNS(s,e,n):t.setAttribute(e,n)}else t.setAttribute(e,n)}removeAttribute(t,e,n){if(n){const r=jT[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&(Es.DashCase|Es.Important)?t.style.setProperty(e,n,r&Es.Important?"important":""):t.style[e]=n}removeStyle(t,e,n){n&Es.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,SB(n)):this.eventManager.addEventListener(t,e,SB(n))}}function AB(i){return"TEMPLATE"===i.tagName&&void 0!==i.content}class A7 extends qT{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=CB(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 XT extends qT{constructor(t,e,n,r,s=n.id){super(t),this.sharedStylesHost=e,this.removeStylesOnCompDestory=r,this.rendererUsageCount=0,this.styles=CB(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 DB extends XT{constructor(t,e,n,r,s){const o=r+"-"+n.id;super(t,e,n,s,o),this.contentAttr=function C7(i){return"_ngcontent-%COMP%".replace(YT,i)}(o),this.hostAttr=function S7(i){return"_nghost-%COMP%".replace(YT,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 D7=(()=>{class i extends yB{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)(ee(jt))},i.\u0275prov=ke({token:i,factory:i.\u0275fac}),i})();const TB=["alt","control","meta","shift"],T7={"\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"},I7={alt:i=>i.altKey,control:i=>i.ctrlKey,meta:i=>i.metaKey,shift:i=>i.shiftKey};let R7=(()=>{class i extends yB{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(()=>zc().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."),TB.forEach(c=>{const d=n.indexOf(c);d>-1&&(n.splice(d,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=T7[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"),TB.forEach(o=>{o!==r&&(0,I7[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)(ee(jt))},i.\u0275prov=ke({token:i,factory:i.\u0275fac}),i})();const F7=SN(m9,"browser",[{provide:fT,useValue:hB},{provide:pN,useValue:function k7(){WT.makeCurrent()},multi:!0},{provide:jt,useFactory:function O7(){return function sD(i){vv=i}(document),document},deps:[]}]),kB=new me(""),PB=[{provide:Vw,useClass:class y7{addToWindow(t){Rn.getAngularTestability=(n,r=!0)=>{const s=t.findTestabilityInTree(n,r);if(null==s)throw new Error("Could not find testability for element.");return s},Rn.getAllAngularTestabilities=()=>t.getAllTestabilities(),Rn.getAllAngularRootElements=()=>t.getAllRootElements(),Rn.frameworkStabilizers||(Rn.frameworkStabilizers=[]),Rn.frameworkStabilizers.push(n=>{const r=Rn.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?zc().isShadowRoot(e)?this.findTestabilityInTree(t,e.host,!0):this.findTestabilityInTree(t,e.parentElement,!0):null)}},deps:[]},{provide:bN,useClass:_T,deps:[ft,vT,Vw]},{provide:_T,useClass:_T,deps:[ft,vT,Vw]}],OB=[{provide:Iv,useValue:"root"},{provide:al,useFactory:function P7(){return new al},deps:[]},{provide:rM,useClass:D7,multi:!0,deps:[jt,ft,fT]},{provide:rM,useClass:R7,multi:!0,deps:[jt]},{provide:oM,useClass:oM,deps:[sM,Cy,cm,MB]},{provide:Gl,useExisting:oM},{provide:bB,useExisting:Cy},{provide:Cy,useClass:Cy,deps:[jt]},{provide:sM,useClass:sM,deps:[rM,ft]},{provide:class zY{},useClass:b7,deps:[]},[]];let FB=(()=>{class i{constructor(e){}static withServerTransition(e){return{ngModule:i,providers:[{provide:cm,useValue:e.appId},{provide:vB,useExisting:cm},v7]}}}return i.\u0275fac=function(e){return new(e||i)(ee(kB,12))},i.\u0275mod=nn({type:i}),i.\u0275inj=Kt({providers:[...OB,...PB],imports:[Eo,g9]}),i})(),LB=(()=>{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)(ee(jt))},i.\u0275prov=ke({token:i,factory:function(e){let n=null;return n=e?new e:function N7(){return new LB(ee(jt))}(),n},providedIn:"root"}),i})();typeof window<"u"&&window;let QT=(()=>{class i{}return i.\u0275fac=function(e){return new(e||i)},i.\u0275prov=ke({token:i,factory:function(e){let n=null;return n=e?new(e||i):ee(UB),n},providedIn:"root"}),i})(),UB=(()=>{class i extends QT{constructor(e){super(),this._doc=e}sanitize(e,n){if(null==n)return null;switch(e){case Kn.NONE:return n;case Kn.HTML:return Ma(n,"HTML")?Js(n):Kx(this._doc,String(n)).toString();case Kn.STYLE:return Ma(n,"Style")?Js(n):n;case Kn.SCRIPT:if(Ma(n,"Script"))return Js(n);throw new Error("unsafe value used in a script context");case Kn.URL:return Ma(n,"URL")?Js(n):bh(String(n));case Kn.RESOURCE_URL:if(Ma(n,"ResourceURL"))return Js(n);throw new Error(`unsafe value used in a resource URL context (see ${Yu})`);default:throw new Error(`Unexpected SecurityContext ${e} (see ${Yu})`)}}bypassSecurityTrustHtml(e){return function uD(i){return new oD(i)}(e)}bypassSecurityTrustStyle(e){return function hD(i){return new aD(i)}(e)}bypassSecurityTrustScript(e){return function fD(i){return new lD(i)}(e)}bypassSecurityTrustUrl(e){return function pD(i){return new cD(i)}(e)}bypassSecurityTrustResourceUrl(e){return function mD(i){return new Pp(i)}(e)}}return i.\u0275fac=function(e){return new(e||i)(ee(jt))},i.\u0275prov=ke({token:i,factory:function(e){let n=null;return n=e?new e:function H7(i){return new UB(i.get(jt))}(ee($i)),n},providedIn:"root"}),i})();function ht(...i){return Ni(i,Gu(i))}class vt extends Re{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 fm=V(i=>function(){i(this),this.name="EmptyError",this.message="no elements in sequence"}),{isArray:G7}=Array,{getPrototypeOf:$7,prototype:W7,keys:j7}=Object;function VB(i){if(1===i.length){const t=i[0];if(G7(t))return{args:t,keys:null};if(function Y7(i){return i&&"object"==typeof i&&$7(i)===W7}(t)){const e=j7(t);return{args:e.map(n=>t[n]),keys:e}}}return{args:i,keys:null}}const{isArray:q7}=Array;function JT(i){return et(t=>function X7(i,t){return q7(t)?i(...t):i(t)}(i,t))}function zB(i,t){return i.reduce((e,n,r)=>(e[n]=t[r],e),{})}function nu(...i){const t=Gu(i),e=x0(i),{args:n,keys:r}=VB(i);if(0===n.length)return Ni([],t);const s=new In(function K7(i,t,e=$a){return n=>{HB(t,()=>{const{length:r}=i,s=new Array(r);let o=r,a=r;for(let l=0;l{const c=Ni(i[l],t);let d=!1;c.subscribe(Yn(n,h=>{s[l]=h,d||(d=!0,a--),a||n.next(e(s.slice()))},()=>{--o||n.complete()}))},n)},n)}}(n,t,r?o=>zB(r,o):$a));return e?s.pipe(JT(e)):s}function HB(i,t,e){i?Ya(e,i,t):t()}function Sy(...i){return function Z7(){return yd(1)}()(Ni(i,Gu(i)))}function Ey(i){return new In(t=>{wr(i()).subscribe(t)})}function pm(i,t){const e=ln(i)?i:()=>i,n=r=>r.error(e());return new In(t?r=>t.schedule(n,0,r):n)}function eI(){return ti((i,t)=>{let e=null;i._refCount++;const n=Yn(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 GB extends In{constructor(t,e){super(),this.source=t,this.subjectFactory=e,this._subject=null,this._refCount=0,this._connection=null,l0(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 Zt;const e=this.getSubject();t.add(this.source.subscribe(Yn(e,void 0,()=>{this._teardown(),e.complete()},n=>{this._teardown(),e.error(n)},()=>this._teardown()))),t.closed&&(this._connection=null,t=Zt.EMPTY)}return t}refCount(){return eI()(this)}}function Rs(i,t){return ti((e,n)=>{let r=null,s=0,o=!1;const a=()=>o&&!r&&n.complete();e.subscribe(Yn(n,l=>{r?.unsubscribe();let c=0;const d=s++;wr(i(l,d)).subscribe(r=Yn(n,h=>n.next(t?t(l,h,d,c++):h),()=>{r=null,a()}))},()=>{o=!0,a()}))})}function Oi(i){return i<=0?()=>po:ti((t,e)=>{let n=0;t.subscribe(Yn(e,r=>{++n<=i&&(e.next(r),i<=n&&e.complete())}))})}function Ao(...i){const t=Gu(i);return ti((e,n)=>{(t?Sy(i,e,t):Sy(i,e)).subscribe(n)})}function gn(i,t){return ti((e,n)=>{let r=0;e.subscribe(Yn(n,s=>i.call(t,s,r++)&&n.next(s)))})}function aM(i){return ti((t,e)=>{let n=!1;t.subscribe(Yn(e,r=>{n=!0,e.next(r)},()=>{n||e.next(i),e.complete()}))})}function $B(i=Q7){return ti((t,e)=>{let n=!1;t.subscribe(Yn(e,r=>{n=!0,e.next(r)},()=>n?e.complete():e.error(i())))})}function Q7(){return new fm}function iu(i,t){const e=arguments.length>=2;return n=>n.pipe(i?gn((r,s)=>i(r,s,n)):$a,Oi(1),e?aM(t):$B(()=>new fm))}function ru(i,t){return ln(t)?nr(i,t,1):nr(i,1)}function Vi(i,t,e){const n=ln(i)||t||e?{next:i,error:t,complete:e}:i;return n?ti((r,s)=>{var o;null===(o=n.subscribe)||void 0===o||o.call(n);let a=!0;r.subscribe(Yn(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)}))}):$a}function $c(i){return ti((t,e)=>{let s,n=null,r=!1;n=t.subscribe(Yn(e,void 0,void 0,o=>{s=wr(i(o,$c(i)(t))),n?(n.unsubscribe(),n=null,s.subscribe(e)):r=!0})),r&&(n.unsubscribe(),n=null,s.subscribe(e))})}function tI(i,t){return ti(function J7(i,t,e,n,r){return(s,o)=>{let a=e,l=t,c=0;s.subscribe(Yn(o,d=>{const h=c++;l=a?i(l,d,h):(a=!0,d),n&&o.next(l)},r&&(()=>{a&&o.next(l),o.complete()})))}}(i,t,arguments.length>=2,!0))}function nI(i){return i<=0?()=>po:ti((t,e)=>{let n=[];t.subscribe(Yn(e,r=>{n.push(r),i{for(const r of n)e.next(r);e.complete()},void 0,()=>{n=null}))})}function WB(i,t){const e=arguments.length>=2;return n=>n.pipe(i?gn((r,s)=>i(r,s,n)):$a,nI(1),e?aM(t):$B(()=>new fm))}function jB(i,t=!1){return ti((e,n)=>{let r=0;e.subscribe(Yn(n,s=>{const o=i(s,r++);(o||t)&&n.next(s),!o&&n.complete()}))})}function YB(i){return et(()=>i)}function su(i){return ti((t,e)=>{try{t.subscribe(e)}finally{e.add(i)}})}const _n="primary",Ay=Symbol("RouteTitle");class eq{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 eq(i)}function tq(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 XB(i){return Array.prototype.concat.apply([],i)}function KB(i){return i.length>0?i[i.length-1]:null}function os(i,t){for(const e in i)i.hasOwnProperty(e)&&t(i[e],e)}function ou(i){return L1(i)?i:oy(i)?Ni(Promise.resolve(i)):ht(i)}const lM=!1,iq={exact:function JB(i,t,e){if(!Ih(i.segments,t.segments)||!cM(i.segments,t.segments,e)||i.numberOfChildren!==t.numberOfChildren)return!1;for(const n in t.children)if(!i.children[n]||!JB(i.children[n],t.children[n],e))return!1;return!0},subset:e3},ZB={exact:function rq(i,t){return Xl(i,t)},subset:function sq(i,t){return Object.keys(t).length<=Object.keys(i).length&&Object.keys(t).every(e=>qB(i[e],t[e]))},ignored:()=>!0};function QB(i,t,e){return iq[e.paths](i.root,t.root,e.matrixParams)&&ZB[e.queryParams](i.queryParams,t.queryParams)&&!("exact"===e.fragment&&i.fragment!==t.fragment)}function e3(i,t,e){return t3(i,t,t.segments,e)}function t3(i,t,e,n){if(i.segments.length>e.length){const r=i.segments.slice(0,e.length);return!(!Ih(r,e)||t.hasChildren()||!cM(r,e,n))}if(i.segments.length===e.length){if(!Ih(i.segments,e)||!cM(i.segments,e,n))return!1;for(const r in t.children)if(!i.children[r]||!e3(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!!(Ih(i.segments,r)&&cM(i.segments,r,n)&&i.children[_n])&&t3(i.children[_n],t,s,n)}}function cM(i,t,e){return t.every((n,r)=>ZB[e](i[r].parameters,n.parameters))}class au{constructor(t=new Tn([],{}),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 lq.serialize(this)}}class Tn{constructor(t,e){this.segments=t,this.children=e,this.parent=null,os(e,(n,r)=>n.parent=this)}hasChildren(){return this.numberOfChildren>0}get numberOfChildren(){return Object.keys(this.children).length}toString(){return dM(this)}}class Dy{constructor(t,e){this.path=t,this.parameters=e}get parameterMap(){return this._parameterMap||(this._parameterMap=mm(this.parameters)),this._parameterMap}toString(){return s3(this)}}function Ih(i,t){return i.length===t.length&&i.every((e,n)=>e.path===t[n].path)}let Ty=(()=>{class i{}return i.\u0275fac=function(e){return new(e||i)},i.\u0275prov=ke({token:i,factory:function(){return new iI},providedIn:"root"}),i})();class iI{parse(t){const e=new _q(t);return new au(e.parseRootSegment(),e.parseQueryParams(),e.parseFragment())}serialize(t){const e=`/${Iy(t.root,!0)}`,n=function uq(i){const t=Object.keys(i).map(e=>{const n=i[e];return Array.isArray(n)?n.map(r=>`${uM(e)}=${uM(r)}`).join("&"):`${uM(e)}=${uM(n)}`}).filter(e=>!!e);return t.length?`?${t.join("&")}`:""}(t.queryParams);return`${e}${n}${"string"==typeof t.fragment?`#${function cq(i){return encodeURI(i)}(t.fragment)}`:""}`}}const lq=new iI;function dM(i){return i.segments.map(t=>s3(t)).join("/")}function Iy(i,t){if(!i.hasChildren())return dM(i);if(t){const e=i.children[_n]?Iy(i.children[_n],!1):"",n=[];return os(i.children,(r,s)=>{s!==_n&&n.push(`${s}:${Iy(r,!1)}`)}),n.length>0?`${e}(${n.join("//")})`:e}{const e=function aq(i,t){let e=[];return os(i.children,(n,r)=>{r===_n&&(e=e.concat(t(n,r)))}),os(i.children,(n,r)=>{r!==_n&&(e=e.concat(t(n,r)))}),e}(i,(n,r)=>r===_n?[Iy(i.children[_n],!1)]:[`${r}:${Iy(n,!1)}`]);return 1===Object.keys(i.children).length&&null!=i.children[_n]?`${dM(i)}/${e[0]}`:`${dM(i)}/(${e.join("//")})`}}function n3(i){return encodeURIComponent(i).replace(/%40/g,"@").replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",")}function uM(i){return n3(i).replace(/%3B/gi,";")}function rI(i){return n3(i).replace(/\(/g,"%28").replace(/\)/g,"%29").replace(/%26/gi,"&")}function hM(i){return decodeURIComponent(i)}function r3(i){return hM(i.replace(/\+/g,"%20"))}function s3(i){return`${rI(i.path)}${function dq(i){return Object.keys(i).map(t=>`;${rI(t)}=${rI(i[t])}`).join("")}(i.parameters)}`}const hq=/^[^\/()?;=#]+/;function fM(i){const t=i.match(hq);return t?t[0]:""}const fq=/^[^=?&#]+/,mq=/^[^&#]+/;class _q{constructor(t){this.url=t,this.remaining=t}parseRootSegment(){return this.consumeOptional("/"),""===this.remaining||this.peekStartsWith("?")||this.peekStartsWith("#")?new Tn([],{}):new Tn([],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[_n]=new Tn(t,e)),n}parseSegment(){const t=fM(this.remaining);if(""===t&&this.peekStartsWith(";"))throw new pe(4009,lM);return this.capture(t),new Dy(hM(t),this.parseMatrixParams())}parseMatrixParams(){const t={};for(;this.consumeOptional(";");)this.parseParam(t);return t}parseParam(t){const e=fM(this.remaining);if(!e)return;this.capture(e);let n="";if(this.consumeOptional("=")){const r=fM(this.remaining);r&&(n=r,this.capture(n))}t[hM(e)]=hM(n)}parseQueryParam(t){const e=function pq(i){const t=i.match(fq);return t?t[0]:""}(this.remaining);if(!e)return;this.capture(e);let n="";if(this.consumeOptional("=")){const o=function gq(i){const t=i.match(mq);return t?t[0]:""}(this.remaining);o&&(n=o,this.capture(n))}const r=r3(e),s=r3(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=fM(this.remaining),r=this.remaining[n.length];if("/"!==r&&")"!==r&&";"!==r)throw new pe(4010,lM);let s;n.indexOf(":")>-1?(s=n.slice(0,n.indexOf(":")),this.capture(s),this.capture(":")):t&&(s=_n);const o=this.parseChildren();e[s]=1===Object.keys(o).length?o[_n]:new Tn([],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 pe(4011,lM)}}function sI(i){return i.segments.length>0?new Tn([],{[_n]:i}):i}function pM(i){const t={};for(const n of Object.keys(i.children)){const s=pM(i.children[n]);(s.segments.length>0||s.hasChildren())&&(t[n]=s)}return function vq(i){if(1===i.numberOfChildren&&i.children[_n]){const t=i.children[_n];return new Tn(i.segments.concat(t.segments),t.children)}return i}(new Tn(i.segments,t))}function Rh(i){return i instanceof au}const oI=!1;function yq(i,t,e,n,r){if(0===e.length)return gm(t.root,t.root,t.root,n,r);const s=function d3(i){if("string"==typeof i[0]&&1===i.length&&"/"===i[0])return new c3(!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 os(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 c3(e,t,n)}(e);return s.toRoot()?gm(t.root,t.root,new Tn([],{}),n,r):function o(l){const c=function xq(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 u3(i,t,e){let n=i,r=t,s=e;for(;s>r;){if(s-=r,n=n.parent,!n)throw new pe(4005,oI&&"Invalid number of '../'");r=n.segments.length}return new _m(n,!1,r-s)}(e,n+(Ry(i.commands[0])?0:1),i.numberOfDoubleDots)}(s,t,i.snapshot?._urlSegment,l),d=c.processChildren?vm(c.segmentGroup,c.index,s.commands):aI(c.segmentGroup,c.index,s.commands);return gm(t.root,c.segmentGroup,d,n,r)}(i.snapshot?._lastPathIndex)}function Ry(i){return"object"==typeof i&&null!=i&&!i.outlets&&!i.segmentPath}function ky(i){return"object"==typeof i&&null!=i&&i.outlets}function gm(i,t,e,n,r){let o,s={};n&&os(n,(l,c)=>{s[c]=Array.isArray(l)?l.map(d=>`${d}`):`${l}`}),o=i===t?e:l3(i,t,e);const a=sI(pM(o));return new au(a,s,r)}function l3(i,t,e){const n={};return os(i.children,(r,s)=>{n[s]=r===t?e:l3(r,t,e)}),new Tn(i.segments,n)}class c3{constructor(t,e,n){if(this.isAbsolute=t,this.numberOfDoubleDots=e,this.commands=n,t&&n.length>0&&Ry(n[0]))throw new pe(4003,oI&&"Root segment cannot have matrix parameters");const r=n.find(ky);if(r&&r!==KB(n))throw new pe(4004,oI&&"{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 aI(i,t,e){if(i||(i=new Tn([],{})),0===i.segments.length&&i.hasChildren())return vm(i,t,e);const n=function Mq(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(ky(a))break;const l=`${a}`,c=n0&&void 0===l)break;if(l&&c&&"object"==typeof c&&void 0===c.outlets){if(!f3(l,c,o))return s;n+=2}else{if(!f3(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]=aI(i.children[o],t,s))}),os(i.children,(s,o)=>{void 0===n[o]&&(r[o]=s)}),new Tn(i.segments,r)}}function lI(i,t,e){const n=i.segments.slice(0,t);let r=0;for(;r{"string"==typeof e&&(e=[e]),null!==e&&(t[n]=lI(new Tn([],{}),0,e))}),t}function h3(i){const t={};return os(i,(e,n)=>t[n]=`${e}`),t}function f3(i,t,e){return i==e.path&&Xl(t,e.parameters)}const Py="imperative";class Kl{constructor(t,e){this.id=t,this.url=e}}class cI extends Kl{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 kh extends Kl{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 mM extends Kl{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 gM extends Kl{constructor(t,e,n,r){super(t,e),this.reason=n,this.code=r,this.type=16}}class dI extends Kl{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 Sq extends Kl{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 Eq extends Kl{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 Aq extends Kl{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 Dq extends Kl{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 Tq extends Kl{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 Iq{constructor(t){this.route=t,this.type=9}toString(){return`RouteConfigLoadStart(path: ${this.route.path})`}}class Rq{constructor(t){this.route=t,this.type=10}toString(){return`RouteConfigLoadEnd(path: ${this.route.path})`}}class kq{constructor(t){this.snapshot=t,this.type=11}toString(){return`ChildActivationStart(path: '${this.snapshot.routeConfig&&this.snapshot.routeConfig.path||""}')`}}class Pq{constructor(t){this.snapshot=t,this.type=12}toString(){return`ChildActivationEnd(path: '${this.snapshot.routeConfig&&this.snapshot.routeConfig.path||""}')`}}class Oq{constructor(t){this.snapshot=t,this.type=13}toString(){return`ActivationStart(path: '${this.snapshot.routeConfig&&this.snapshot.routeConfig.path||""}')`}}class Fq{constructor(t){this.snapshot=t,this.type=14}toString(){return`ActivationEnd(path: '${this.snapshot.routeConfig&&this.snapshot.routeConfig.path||""}')`}}class p3{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 Bq=(()=>{class i{createUrlTree(e,n,r,s,o,a){return yq(e||n.root,r,s,o,a)}}return i.\u0275fac=function(e){return new(e||i)},i.\u0275prov=ke({token:i,factory:i.\u0275fac}),i})(),Vq=(()=>{class i{}return i.\u0275fac=function(e){return new(e||i)},i.\u0275prov=ke({token:i,factory:function(t){return Bq.\u0275fac(t)},providedIn:"root"}),i})();class m3{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=uI(t,this._root);return e?e.children.map(n=>n.value):[]}firstChild(t){const e=uI(t,this._root);return e&&e.children.length>0?e.children[0].value:null}siblings(t){const e=hI(t,this._root);return e.length<2?[]:e[e.length-2].children.map(r=>r.value).filter(r=>r!==t)}pathFromRoot(t){return hI(t,this._root).map(e=>e.value)}}function uI(i,t){if(i===t.value)return t;for(const e of t.children){const n=uI(i,e);if(n)return n}return null}function hI(i,t){if(i===t.value)return[t];for(const e of t.children){const n=hI(i,e);if(n.length)return n.unshift(t),n}return[]}class Wc{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 g3 extends m3{constructor(t,e){super(t),this.snapshot=e,fI(this,t)}toString(){return this.snapshot.toString()}}function _3(i,t){const e=function zq(i,t){const o=new _M([],{},{},"",{},_n,t,null,i.root,-1,{});return new y3("",new Wc(o,[]))}(i,t),n=new vt([new Dy("",{})]),r=new vt({}),s=new vt({}),o=new vt({}),a=new vt(""),l=new bm(n,r,o,a,s,_n,t,e.root);return l.snapshot=e.root,new g3(new Wc(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(et(c=>c[Ay]))??ht(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(et(t=>mm(t)))),this._paramMap}get queryParamMap(){return this._queryParamMap||(this._queryParamMap=this.queryParams.pipe(et(t=>mm(t)))),this._queryParamMap}toString(){return this.snapshot?this.snapshot.toString():`Future(${this._futureSnapshot})`}}function v3(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 Hq(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 _M{get title(){return this.data?.[Ay]}constructor(t,e,n,r,s,o,a,l,c,d,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=d,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 y3 extends m3{constructor(t,e){super(e),this.url=t,fI(this,e)}toString(){return b3(this._root)}}function fI(i,t){t.value._routerState=i,t.children.forEach(e=>fI(i,e))}function b3(i){const t=i.children.length>0?` { ${i.children.map(b3).join(", ")} } `:"";return`${i.value}${t}`}function pI(i){if(i.snapshot){const t=i.snapshot,e=i._futureSnapshot;i.snapshot=e,Xl(t.queryParams,e.queryParams)||i.queryParams.next(e.queryParams),t.fragment!==e.fragment&&i.fragment.next(e.fragment),Xl(t.params,e.params)||i.params.next(e.params),function nq(i,t){if(i.length!==t.length)return!1;for(let e=0;eXl(e.parameters,t[n].parameters))}(i.url,t.url);return e&&!(!i.parent!=!t.parent)&&(!i.parent||mI(i.parent,t.parent))}function Oy(i,t,e){if(e&&i.shouldReuseRoute(t.value,e.value.snapshot)){const n=e.value;n._futureSnapshot=t.value;const r=function $q(i,t,e){return t.children.map(n=>{for(const r of e.children)if(i.shouldReuseRoute(n.value,r.value.snapshot))return Oy(i,n,r);return Oy(i,n)})}(i,t,e);return new Wc(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=>Oy(i,a)),o}}const n=function Wq(i){return new bm(new vt(i.url),new vt(i.params),new vt(i.queryParams),new vt(i.fragment),new vt(i.data),i.outlet,i.component,i)}(t.value),r=t.children.map(s=>Oy(i,s));return new Wc(n,r)}}const gI="ngNavigationCancelingError";function x3(i,t){const{redirectTo:e,navigationBehaviorOptions:n}=Rh(t)?{redirectTo:t,navigationBehaviorOptions:void 0}:t,r=w3(!1,0,t);return r.url=e,r.navigationBehaviorOptions=n,r}function w3(i,t,e){const n=new Error("NavigationCancelingError: "+(i||""));return n[gI]=!0,n.cancellationCode=t,e&&(n.url=e),n}function M3(i){return C3(i)&&Rh(i.url)}function C3(i){return i&&i[gI]}class jq{constructor(){this.outlet=null,this.route=null,this.resolver=null,this.injector=null,this.children=new Fy,this.attachRef=null}}let Fy=(()=>{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 jq,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=ke({token:i,factory:i.\u0275fac,providedIn:"root"}),i})();const vM=!1;let S3=(()=>{class i{constructor(){this.activated=null,this._activatedRoute=null,this.name=_n,this.activateEvents=new We,this.deactivateEvents=new We,this.attachEvents=new We,this.detachEvents=new We,this.parentContexts=Ot(Fy),this.location=Ot(Wr),this.changeDetector=Ot(Zn),this.environmentInjector=Ot(to)}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 pe(4012,vM);return this.activated.instance}get activatedRoute(){if(!this.activated)throw new pe(4012,vM);return this._activatedRoute}get activatedRouteData(){return this._activatedRoute?this._activatedRoute.snapshot.data:{}}detach(){if(!this.activated)throw new pe(4012,vM);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 pe(4013,vM);this._activatedRoute=e;const r=this.location,o=e.snapshot.component,a=this.parentContexts.getOrCreateContext(this.name).children,l=new Yq(e,a,r.injector);if(n&&function qq(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=ve({type:i,selectors:[["router-outlet"]],inputs:{name:"name"},outputs:{activateEvents:"activate",deactivateEvents:"deactivate",attachEvents:"attach",detachEvents:"detach"},exportAs:["outlet"],standalone:!0,features:[bi]}),i})();class Yq{constructor(t,e,n){this.route=t,this.childContexts=e,this.parent=n}get(t,e){return t===bm?this.route:t===Fy?this.childContexts:this.parent.get(t,e)}}let _I=(()=>{class i{}return i.\u0275fac=function(e){return new(e||i)},i.\u0275cmp=ot({type:i,selectors:[["ng-component"]],standalone:!0,features:[Z1],decls:1,vars:0,template:function(e,n){1&e&&Te(0,"router-outlet")},dependencies:[S3],encapsulation:2}),i})();function E3(i,t){return i.providers&&!i._injector&&(i._injector=Ow(i.providers,t,`Route: ${i.path}`)),i._injector??t}function yI(i){const t=i.children&&i.children.map(yI),e=t?{...i,children:t}:{...i};return!e.component&&!e.loadComponent&&(t||e.loadChildren)&&e.outlet&&e.outlet!==_n&&(e.component=_I),e}function Da(i){return i.outlet||_n}function A3(i,t){const e=i.filter(n=>Da(n)===t);return e.push(...i.filter(n=>Da(n)!==t)),e}function Ly(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 Jq{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),pI(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]}),os(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 Fq(s.value.snapshot))}),t.children.length&&this.forwardEvent(new Pq(t.value.snapshot))}activateRoutes(t,e,n){const r=t.value,s=e?e.value:null;if(pI(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),pI(a.route.value),this.activateChildRoutes(t,null,o.children)}else{const a=Ly(r.snapshot),l=a?.get(Hl)??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 D3{constructor(t){this.path=t,this.route=this.path[this.path.length-1]}}class yM{constructor(t,e){this.component=t,this.route=e}}function eX(i,t,e){const n=i._root;return Ny(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 Cr(i){return null!==Gf(i)}(i)?t.get(i):i:n}function Ny(i,t,e,n,r={canDeactivateChecks:[],canActivateChecks:[]}){const s=ym(t);return i.children.forEach(o=>{(function nX(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 iX(i,t,e){if("function"==typeof e)return e(i,t);switch(e){case"pathParamsChange":return!Ih(i.url,t.url);case"pathParamsOrQueryParamsChange":return!Ih(i.url,t.url)||!Xl(i.queryParams,t.queryParams);case"always":return!0;case"paramsOrQueryParamsChange":return!mI(i,t)||!Xl(i.queryParams,t.queryParams);default:return!mI(i,t)}}(o,s,s.routeConfig.runGuardsAndResolvers);l?r.canActivateChecks.push(new D3(n)):(s.data=o.data,s._resolvedData=o._resolvedData),Ny(i,t,s.component?a?a.children:null:e,n,r),l&&a&&a.outlet&&a.outlet.isActivated&&r.canDeactivateChecks.push(new yM(a.outlet.component,o))}else o&&By(t,a,r),r.canActivateChecks.push(new D3(n)),Ny(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]}),os(s,(o,a)=>By(o,e.getContext(a),r)),r}function By(i,t,e){const n=ym(i),r=i.value;os(n,(s,o)=>{By(s,r.component?t?t.children.getContext(o):null:t,e)}),e.canDeactivateChecks.push(new yM(r.component&&t&&t.outlet&&t.outlet.isActivated?t.outlet.component:null,r))}function Uy(i){return"function"==typeof i}function bI(i){return i instanceof fm||"EmptyError"===i?.name}const bM=Symbol("INITIAL_VALUE");function wm(){return Rs(i=>nu(i.map(t=>t.pipe(Oi(1),Ao(bM)))).pipe(et(t=>{for(const e of t)if(!0!==e){if(e===bM)return bM;if(!1===e||e instanceof au)return e}return!0}),gn(t=>t!==bM),Oi(1)))}function T3(i){return function CE(...i){return o0(i)}(Vi(t=>{if(Rh(t))throw x3(0,t)}),et(t=>!0===t))}const xI={matched:!1,consumedSegments:[],remainingSegments:[],parameters:{},positionalParamSegments:{}};function I3(i,t,e,n,r){const s=wI(i,t,e);return s.matched?function bX(i,t,e,n){const r=t.canMatch;return r&&0!==r.length?ht(r.map(o=>{const a=xm(o,i);return ou(function cX(i){return i&&Uy(i.canMatch)}(a)?a.canMatch(t,e):i.runInContext(()=>a(t,e)))})).pipe(wm(),T3()):ht(!0)}(n=E3(t,n),t,e).pipe(et(o=>!0===o?s:{...xI})):ht(s)}function wI(i,t,e){if(""===t.path)return"full"===t.pathMatch&&(i.hasChildren()||e.length>0)?{...xI}:{matched:!0,consumedSegments:[],remainingSegments:e,parameters:{},positionalParamSegments:{}};const r=(t.matcher||tq)(e,i,t);if(!r)return{...xI};const s={};os(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 xM(i,t,e,n){if(e.length>0&&function MX(i,t,e){return e.some(n=>wM(i,t,n)&&Da(n)!==_n)}(i,e,n)){const s=new Tn(t,function wX(i,t,e,n){const r={};r[_n]=n,n._sourceSegment=i,n._segmentIndexShift=t.length;for(const s of e)if(""===s.path&&Da(s)!==_n){const o=new Tn([],{});o._sourceSegment=i,o._segmentIndexShift=t.length,r[Da(s)]=o}return r}(i,t,n,new Tn(e,i.children)));return s._sourceSegment=i,s._segmentIndexShift=t.length,{segmentGroup:s,slicedSegments:[]}}if(0===e.length&&function CX(i,t,e){return e.some(n=>wM(i,t,n))}(i,e,n)){const s=new Tn(i.segments,function xX(i,t,e,n,r){const s={};for(const o of n)if(wM(i,e,o)&&!r[Da(o)]){const a=new Tn([],{});a._sourceSegment=i,a._segmentIndexShift=t.length,s[Da(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 Tn(i.segments,i.children);return r._sourceSegment=i,r._segmentIndexShift=t.length,{segmentGroup:r,slicedSegments:e}}function wM(i,t,e){return(!(i.hasChildren()||t.length>0)||"full"!==e.pathMatch)&&""===e.path}function R3(i,t,e,n){return!!(Da(i)===n||n!==_n&&wM(t,e,i))&&("**"===i.path||wI(t,i,e).matched)}function k3(i,t,e){return 0===t.length&&!i.children[e]}const MM=!1;class CM{constructor(t){this.segmentGroup=t||null}}class P3{constructor(t){this.urlTree=t}}function Vy(i){return pm(new CM(i))}function O3(i){return pm(new P3(i))}class DX{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=xM(this.urlTree.root,[],[],this.config).segmentGroup,e=new Tn(t.segments,t.children);return this.expandSegmentGroup(this.injector,this.config,e,_n).pipe(et(s=>this.createUrlTree(pM(s),this.urlTree.queryParams,this.urlTree.fragment))).pipe($c(s=>{if(s instanceof P3)return this.allowRedirects=!1,this.match(s.urlTree);throw s instanceof CM?this.noMatchError(s):s}))}match(t){return this.expandSegmentGroup(this.injector,this.config,t.root,_n).pipe(et(r=>this.createUrlTree(pM(r),t.queryParams,t.fragment))).pipe($c(r=>{throw r instanceof CM?this.noMatchError(r):r}))}noMatchError(t){return new pe(4002,MM)}createUrlTree(t,e,n){const r=sI(t);return new au(r,e,n)}expandSegmentGroup(t,e,n,r){return 0===n.segments.length&&n.hasChildren()?this.expandChildren(t,e,n).pipe(et(s=>new Tn([],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 Ni(r).pipe(ru(s=>{const o=n.children[s],a=A3(e,s);return this.expandSegmentGroup(t,a,o,s).pipe(et(l=>({segment:l,outlet:s})))}),tI((s,o)=>(s[o.outlet]=o.segment,s),{}),WB())}expandSegment(t,e,n,r,s,o){return Ni(n).pipe(ru(a=>this.expandSegmentAgainstRoute(t,e,n,a,r,s,o).pipe($c(c=>{if(c instanceof CM)return ht(null);throw c}))),iu(a=>!!a),$c((a,l)=>{if(bI(a))return k3(e,r,s)?ht(new Tn([],{})):Vy(e);throw a}))}expandSegmentAgainstRoute(t,e,n,r,s,o,a){return R3(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):Vy(e):Vy(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("/")?O3(s):this.lineralizeSegments(n,s).pipe(nr(o=>{const a=new Tn(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:d}=wI(e,r,s);if(!a)return Vy(e);const h=this.applyRedirectCommands(l,r.redirectTo,d);return r.redirectTo.startsWith("/")?O3(h):this.lineralizeSegments(r,h).pipe(nr(p=>this.expandSegment(t,e,n,p.concat(c),o,!1)))}matchSegmentAgainstRoute(t,e,n,r,s){return"**"===n.path?(t=E3(n,t),n.loadChildren?(n._loadedRoutes?ht({routes:n._loadedRoutes,injector:n._loadedInjector}):this.configLoader.loadChildren(t,n)).pipe(et(a=>(n._loadedRoutes=a.routes,n._loadedInjector=a.injector,new Tn(r,{})))):ht(new Tn(r,{}))):I3(e,n,r,t).pipe(Rs(({matched:o,consumedSegments:a,remainingSegments:l})=>o?this.getChildConfig(t=n._injector??t,n,r).pipe(nr(d=>{const h=d.injector??t,p=d.routes,{segmentGroup:m,slicedSegments:g}=xM(e,a,l,p),b=new Tn(m.segments,m.children);if(0===g.length&&b.hasChildren())return this.expandChildren(h,p,b).pipe(et(x=>new Tn(a,x)));if(0===p.length&&0===g.length)return ht(new Tn(a,{}));const v=Da(n)===s;return this.expandSegment(h,b,p,g,v?_n:s,!0).pipe(et(M=>new Tn(a.concat(M.segments),M.children)))})):Vy(e)))}getChildConfig(t,e,n){return e.children?ht({routes:e.children,injector:t}):e.loadChildren?void 0!==e._loadedRoutes?ht({routes:e._loadedRoutes,injector:e._loadedInjector}):function yX(i,t,e,n){const r=t.canLoad;return void 0===r||0===r.length?ht(!0):ht(r.map(o=>{const a=xm(o,i);return ou(function sX(i){return i&&Uy(i.canLoad)}(a)?a.canLoad(t,e):i.runInContext(()=>a(t,e)))})).pipe(wm(),T3())}(t,e,n).pipe(nr(r=>r?this.configLoader.loadChildren(t,e).pipe(Vi(s=>{e._loadedRoutes=s.routes,e._loadedInjector=s.injector})):function EX(i){return pm(w3(MM,3))}())):ht({routes:[],injector:t})}lineralizeSegments(t,e){let n=[],r=e.root;for(;;){if(n=n.concat(r.segments),0===r.numberOfChildren)return ht(n);if(r.numberOfChildren>1||!r.children[_n])return t.redirectTo,pm(new pe(4e3,MM));r=r.children[_n]}}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 au(s,this.createQueryParams(e.queryParams,this.urlTree.queryParams),e.fragment)}createQueryParams(t,e){const n={};return os(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 os(e.children,(a,l)=>{o[l]=this.createSegmentGroup(t,a,n,r)}),new Tn(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 pe(4001,MM);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 IX{}class PX{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=xM(this.urlTree.root,[],[],this.config.filter(e=>void 0===e.redirectTo)).segmentGroup;return this.processSegmentGroup(this.injector,this.config,t,_n).pipe(et(e=>{if(null===e)return null;const n=new _M([],Object.freeze({}),Object.freeze({...this.urlTree.queryParams}),this.urlTree.fragment,{},_n,this.rootComponentType,null,this.urlTree.root,-1,{}),r=new Wc(n,e),s=new y3(this.url,r);return this.inheritParamsAndData(s._root),s}))}inheritParamsAndData(t){const e=t.value,n=v3(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 Ni(Object.keys(n.children)).pipe(ru(r=>{const s=n.children[r],o=A3(e,r);return this.processSegmentGroup(t,o,s,r)}),tI((r,s)=>r&&s?(r.push(...s),r):null),jB(r=>null!==r),aM(null),WB(),et(r=>{if(null===r)return null;const s=L3(r);return function OX(i){i.sort((t,e)=>t.value.outlet===_n?-1:e.value.outlet===_n?1:t.value.outlet.localeCompare(e.value.outlet))}(s),s}))}processSegment(t,e,n,r,s){return Ni(e).pipe(ru(o=>this.processSegmentAgainstRoute(o._injector??t,o,n,r,s)),iu(o=>!!o),$c(o=>{if(bI(o))return k3(n,r,s)?ht([]):ht(null);throw o}))}processSegmentAgainstRoute(t,e,n,r,s){if(e.redirectTo||!R3(e,n,r,s))return ht(null);let o;if("**"===e.path){const a=r.length>0?KB(r).parameters:{},l=B3(n)+r.length;o=ht({snapshot:new _M(r,a,Object.freeze({...this.urlTree.queryParams}),this.urlTree.fragment,U3(e),Da(e),e.component??e._loadedComponent??null,e,N3(n),l,V3(e)),consumedSegments:[],remainingSegments:[]})}else o=I3(n,e,r,t).pipe(et(({matched:a,consumedSegments:l,remainingSegments:c,parameters:d})=>{if(!a)return null;const h=B3(n)+l.length;return{snapshot:new _M(l,d,Object.freeze({...this.urlTree.queryParams}),this.urlTree.fragment,U3(e),Da(e),e.component??e._loadedComponent??null,e,N3(n),h,V3(e)),consumedSegments:l,remainingSegments:c}}));return o.pipe(Rs(a=>{if(null===a)return ht(null);const{snapshot:l,consumedSegments:c,remainingSegments:d}=a;t=e._injector??t;const h=e._loadedInjector??t,p=function FX(i){return i.children?i.children:i.loadChildren?i._loadedRoutes:[]}(e),{segmentGroup:m,slicedSegments:g}=xM(n,c,d,p.filter(v=>void 0===v.redirectTo));if(0===g.length&&m.hasChildren())return this.processChildren(h,p,m).pipe(et(v=>null===v?null:[new Wc(l,v)]));if(0===p.length&&0===g.length)return ht([new Wc(l,[])]);const b=Da(e)===s;return this.processSegment(h,p,m,g,b?_n:s).pipe(et(v=>null===v?null:[new Wc(l,v)]))}))}}function LX(i){const t=i.value.routeConfig;return t&&""===t.path&&void 0===t.redirectTo}function L3(i){const t=[],e=new Set;for(const n of i){if(!LX(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=L3(n.children);t.push(new Wc(n.value,r))}return t.filter(n=>!e.has(n))}function N3(i){let t=i;for(;t._sourceSegment;)t=t._sourceSegment;return t}function B3(i){let t=i,e=t._segmentIndexShift??0;for(;t._sourceSegment;)t=t._sourceSegment,e+=t._segmentIndexShift??0;return e-1}function U3(i){return i.data||{}}function V3(i){return i.resolve||{}}function z3(i){return"string"==typeof i.title||null===i.title}function MI(i){return Rs(t=>{const e=i(t);return e?Ni(e).pipe(et(()=>t)):ht(t)})}const Mm=new me("ROUTES");let CI=(()=>{class i{constructor(){this.componentLoaders=new WeakMap,this.childrenLoaders=new WeakMap,this.compiler=Ot(mN)}loadComponent(e){if(this.componentLoaders.get(e))return this.componentLoaders.get(e);if(e._loadedComponent)return ht(e._loadedComponent);this.onLoadStartListener&&this.onLoadStartListener(e);const n=ou(e.loadComponent()).pipe(et(G3),Vi(s=>{this.onLoadEndListener&&this.onLoadEndListener(e),e._loadedComponent=s}),su(()=>{this.componentLoaders.delete(e)})),r=new GB(n,()=>new Re).pipe(eI());return this.componentLoaders.set(e,r),r}loadChildren(e,n){if(this.childrenLoaders.get(n))return this.childrenLoaders.get(n);if(n._loadedRoutes)return ht({routes:n._loadedRoutes,injector:n._loadedInjector});this.onLoadStartListener&&this.onLoadStartListener(n);const s=this.loadModuleFactoryOrRoutes(n.loadChildren).pipe(et(a=>{this.onLoadEndListener&&this.onLoadEndListener(n);let l,c,d=!1;Array.isArray(a)?c=a:(l=a.create(e).injector,c=XB(l.get(Mm,[],Pt.Self|Pt.Optional)));return{routes:c.map(yI),injector:l}}),su(()=>{this.childrenLoaders.delete(n)})),o=new GB(s,()=>new Re).pipe(eI());return this.childrenLoaders.set(n,o),o}loadModuleFactoryOrRoutes(e){return ou(e()).pipe(et(G3),nr(n=>n instanceof D2||Array.isArray(n)?ht(n):Ni(this.compiler.compileModuleAsync(n))))}}return i.\u0275fac=function(e){return new(e||i)},i.\u0275prov=ke({token:i,factory:i.\u0275fac,providedIn:"root"}),i})();function G3(i){return function $X(i){return i&&"object"==typeof i&&"default"in i}(i)?i.default:i}let EM=(()=>{class i{get hasRequestedNavigation(){return 0!==this.navigationId}constructor(){this.currentNavigation=null,this.lastSuccessfulNavigation=null,this.events=new Re,this.configLoader=Ot(CI),this.environmentInjector=Ot(to),this.urlSerializer=Ot(Ty),this.rootContexts=Ot(Fy),this.navigationId=0,this.afterPreactivation=()=>ht(void 0),this.rootComponentType=null,this.configLoader.onLoadEndListener=r=>this.events.next(new Rq(r)),this.configLoader.onLoadStartListener=r=>this.events.next(new Iq(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 vt({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:Py,restoredState:null,currentSnapshot:e.routerState.snapshot,targetSnapshot:null,currentRouterState:e.routerState,targetRouterState:null,guards:{canActivateChecks:[],canDeactivateChecks:[]},guardsResult:null}),this.transitions.pipe(gn(n=>0!==n.id),et(n=>({...n,extractedUrl:e.urlHandlingStrategy.extract(n.rawUrl)})),Rs(n=>{let r=!1,s=!1;return ht(n).pipe(Vi(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}}),Rs(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 d="";return this.events.next(new gM(o.id,e.serializeUrl(n.rawUrl),d,0)),e.rawUrlTree=o.rawUrl,o.resolve(null),po}if(e.urlHandlingStrategy.shouldProcessUrl(o.rawUrl))return $3(o.source)&&(e.browserUrlTree=o.extractedUrl),ht(o).pipe(Rs(d=>{const h=this.transitions?.getValue();return this.events.next(new cI(d.id,this.urlSerializer.serialize(d.extractedUrl),d.source,d.restoredState)),h!==this.transitions?.getValue()?po:Promise.resolve(d)}),function TX(i,t,e,n){return Rs(r=>function AX(i,t,e,n,r){return new DX(i,t,e,n,r).apply()}(i,t,e,r.extractedUrl,n).pipe(et(s=>({...r,urlAfterRedirects:s}))))}(this.environmentInjector,this.configLoader,this.urlSerializer,e.config),Vi(d=>{this.currentNavigation={...this.currentNavigation,finalUrl:d.urlAfterRedirects},n.urlAfterRedirects=d.urlAfterRedirects}),function BX(i,t,e,n,r){return nr(s=>function kX(i,t,e,n,r,s,o="emptyOnly"){return new PX(i,t,e,n,r,o,s).recognize().pipe(Rs(a=>null===a?function RX(i){return new In(t=>t.error(i))}(new IX):ht(a)))}(i,t,e,s.urlAfterRedirects,n.serialize(s.urlAfterRedirects),n,r).pipe(et(o=>({...s,targetSnapshot:o}))))}(this.environmentInjector,this.rootComponentType,e.config,this.urlSerializer,e.paramsInheritanceStrategy),Vi(d=>{if(n.targetSnapshot=d.targetSnapshot,"eager"===e.urlUpdateStrategy){if(!d.extras.skipLocationChange){const p=e.urlHandlingStrategy.merge(d.urlAfterRedirects,d.rawUrl);e.setBrowserUrl(p,d)}e.browserUrlTree=d.urlAfterRedirects}const h=new Sq(d.id,this.urlSerializer.serialize(d.extractedUrl),this.urlSerializer.serialize(d.urlAfterRedirects),d.targetSnapshot);this.events.next(h)}));if(l&&e.urlHandlingStrategy.shouldProcessUrl(e.rawUrlTree)){const{id:d,extractedUrl:h,source:p,restoredState:m,extras:g}=o,b=new cI(d,this.urlSerializer.serialize(h),p,m);this.events.next(b);const v=_3(h,this.rootComponentType).snapshot;return ht(n={...o,targetSnapshot:v,urlAfterRedirects:h,extras:{...g,skipLocationChange:!1,replaceUrl:!1}})}{const d="";return this.events.next(new gM(o.id,e.serializeUrl(n.extractedUrl),d,1)),e.rawUrlTree=o.rawUrl,o.resolve(null),po}}),Vi(o=>{const a=new Eq(o.id,this.urlSerializer.serialize(o.extractedUrl),this.urlSerializer.serialize(o.urlAfterRedirects),o.targetSnapshot);this.events.next(a)}),et(o=>n={...o,guards:eX(o.targetSnapshot,o.currentSnapshot,this.rootContexts)}),function uX(i,t){return nr(e=>{const{targetSnapshot:n,currentSnapshot:r,guards:{canActivateChecks:s,canDeactivateChecks:o}}=e;return 0===o.length&&0===s.length?ht({...e,guardsResult:!0}):function hX(i,t,e,n){return Ni(i).pipe(nr(r=>function vX(i,t,e,n,r){const s=t&&t.routeConfig?t.routeConfig.canDeactivate:null;return s&&0!==s.length?ht(s.map(a=>{const l=Ly(t)??r,c=xm(a,l);return ou(function lX(i){return i&&Uy(i.canDeactivate)}(c)?c.canDeactivate(i,t,e,n):l.runInContext(()=>c(i,t,e,n))).pipe(iu())})).pipe(wm()):ht(!0)}(r.component,r.route,e,t,n)),iu(r=>!0!==r,!0))}(o,n,r,i).pipe(nr(a=>a&&function rX(i){return"boolean"==typeof i}(a)?function fX(i,t,e,n){return Ni(t).pipe(ru(r=>Sy(function mX(i,t){return null!==i&&t&&t(new kq(i)),ht(!0)}(r.route.parent,n),function pX(i,t){return null!==i&&t&&t(new Oq(i)),ht(!0)}(r.route,n),function _X(i,t,e){const n=t[t.length-1],s=t.slice(0,t.length-1).reverse().map(o=>function tX(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=>Ey(()=>ht(o.guards.map(l=>{const c=Ly(o.node)??e,d=xm(l,c);return ou(function aX(i){return i&&Uy(i.canActivateChild)}(d)?d.canActivateChild(n,i):c.runInContext(()=>d(n,i))).pipe(iu())})).pipe(wm())));return ht(s).pipe(wm())}(i,r.path,e),function gX(i,t,e){const n=t.routeConfig?t.routeConfig.canActivate:null;if(!n||0===n.length)return ht(!0);const r=n.map(s=>Ey(()=>{const o=Ly(t)??e,a=xm(s,o);return ou(function oX(i){return i&&Uy(i.canActivate)}(a)?a.canActivate(t,i):o.runInContext(()=>a(t,i))).pipe(iu())}));return ht(r).pipe(wm())}(i,r.route,e))),iu(r=>!0!==r,!0))}(n,s,i,t):ht(a)),et(a=>({...e,guardsResult:a})))})}(this.environmentInjector,o=>this.events.next(o)),Vi(o=>{if(n.guardsResult=o.guardsResult,Rh(o.guardsResult))throw x3(0,o.guardsResult);const a=new Aq(o.id,this.urlSerializer.serialize(o.extractedUrl),this.urlSerializer.serialize(o.urlAfterRedirects),o.targetSnapshot,!!o.guardsResult);this.events.next(a)}),gn(o=>!!o.guardsResult||(e.restoreHistory(o),this.cancelNavigationTransition(o,"",3),!1)),MI(o=>{if(o.guards.canActivateChecks.length)return ht(o).pipe(Vi(a=>{const l=new Dq(a.id,this.urlSerializer.serialize(a.extractedUrl),this.urlSerializer.serialize(a.urlAfterRedirects),a.targetSnapshot);this.events.next(l)}),Rs(a=>{let l=!1;return ht(a).pipe(function UX(i,t){return nr(e=>{const{targetSnapshot:n,guards:{canActivateChecks:r}}=e;if(!r.length)return ht(e);let s=0;return Ni(r).pipe(ru(o=>function VX(i,t,e,n){const r=i.routeConfig,s=i._resolve;return void 0!==r?.title&&!z3(r)&&(s[Ay]=r.title),function zX(i,t,e,n){const r=function HX(i){return[...Object.keys(i),...Object.getOwnPropertySymbols(i)]}(i);if(0===r.length)return ht({});const s={};return Ni(r).pipe(nr(o=>function GX(i,t,e,n){const r=Ly(t)??n,s=xm(i,r);return ou(s.resolve?s.resolve(t,e):r.runInContext(()=>s(t,e)))}(i[o],t,e,n).pipe(iu(),Vi(a=>{s[o]=a}))),nI(1),YB(s),$c(o=>bI(o)?po:pm(o)))}(s,i,t,n).pipe(et(o=>(i._resolvedData=o,i.data=v3(i,e).resolve,r&&z3(r)&&(i.data[Ay]=r.title),null)))}(o.route,n,i,t)),Vi(()=>s++),nI(1),nr(o=>s===r.length?ht(e):po))})}(e.paramsInheritanceStrategy,this.environmentInjector),Vi({next:()=>l=!0,complete:()=>{l||(e.restoreHistory(a),this.cancelNavigationTransition(a,"",2))}}))}),Vi(a=>{const l=new Tq(a.id,this.urlSerializer.serialize(a.extractedUrl),this.urlSerializer.serialize(a.urlAfterRedirects),a.targetSnapshot);this.events.next(l)}))}),MI(o=>{const a=l=>{const c=[];l.routeConfig?.loadComponent&&!l.routeConfig._loadedComponent&&c.push(this.configLoader.loadComponent(l.routeConfig).pipe(Vi(d=>{l.component=d}),et(()=>{})));for(const d of l.children)c.push(...a(d));return c};return nu(a(o.targetSnapshot.root)).pipe(aM(),Oi(1))}),MI(()=>this.afterPreactivation()),et(o=>{const a=function Gq(i,t,e){const n=Oy(i,t._root,e?e._root:void 0);return new g3(n,t)}(e.routeReuseStrategy,o.targetSnapshot,o.currentRouterState);return n={...o,targetRouterState:a}}),Vi(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)=>et(n=>(new Jq(t,n.targetRouterState,n.currentRouterState,e).activate(i),n)))(this.rootContexts,e.routeReuseStrategy,o=>this.events.next(o)),Oi(1),Vi({next:o=>{r=!0,this.lastSuccessfulNavigation=this.currentNavigation,e.navigated=!0,this.events.next(new kh(o.id,this.urlSerializer.serialize(o.extractedUrl),this.urlSerializer.serialize(e.currentUrlTree))),e.titleStrategy?.updateTitle(o.targetRouterState.snapshot),o.resolve(!0)},complete:()=>{r=!0}}),su(()=>{r||s||this.cancelNavigationTransition(n,"",1),this.currentNavigation?.id===n.id&&(this.currentNavigation=null)}),$c(o=>{if(s=!0,C3(o)){M3(o)||(e.navigated=!0,e.restoreHistory(n,!0));const a=new mM(n.id,this.urlSerializer.serialize(n.extractedUrl),o.message,o.cancellationCode);if(this.events.next(a),M3(o)){const l=e.urlHandlingStrategy.merge(o.url,e.rawUrlTree),c={skipLocationChange:n.extras.skipLocationChange,replaceUrl:"eager"===e.urlUpdateStrategy||$3(n.source)};e.scheduleNavigation(l,Py,null,c,{resolve:n.resolve,reject:n.reject,promise:n.promise})}else n.resolve(!1)}else{e.restoreHistory(n,!0);const a=new dI(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 po}))}))}cancelNavigationTransition(e,n,r){const s=new mM(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=ke({token:i,factory:i.\u0275fac,providedIn:"root"}),i})();function $3(i){return i!==Py}let W3=(()=>{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===_n);return n}getResolvedTitleForRoute(e){return e.data[Ay]}}return i.\u0275fac=function(e){return new(e||i)},i.\u0275prov=ke({token:i,factory:function(){return Ot(WX)},providedIn:"root"}),i})(),WX=(()=>{class i extends W3{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)(ee(LB))},i.\u0275prov=ke({token:i,factory:i.\u0275fac,providedIn:"root"}),i})(),jX=(()=>{class i{}return i.\u0275fac=function(e){return new(e||i)},i.\u0275prov=ke({token:i,factory:function(){return Ot(qX)},providedIn:"root"}),i})();class YX{shouldDetach(t){return!1}store(t,e){}shouldAttach(t){return!1}retrieve(t){return null}shouldReuseRoute(t,e){return t.routeConfig===e.routeConfig}}let qX=(()=>{class i extends YX{}return i.\u0275fac=function(){let t;return function(n){return(t||(t=ri(i)))(n||i)}}(),i.\u0275prov=ke({token:i,factory:i.\u0275fac,providedIn:"root"}),i})();const AM=new me("",{providedIn:"root",factory:()=>({})});let KX=(()=>{class i{}return i.\u0275fac=function(e){return new(e||i)},i.\u0275prov=ke({token:i,factory:function(){return Ot(ZX)},providedIn:"root"}),i})(),ZX=(()=>{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=ke({token:i,factory:i.\u0275fac,providedIn:"root"}),i})();function QX(i){throw i}function JX(i,t,e){return t.parse("/")}const eK={paths:"exact",fragment:"ignored",matrixParams:"ignored",queryParams:"exact"},tK={paths:"subset",fragment:"ignored",matrixParams:"ignored",queryParams:"subset"};let Yo=(()=>{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=Ot(F6),this.isNgZoneEnabled=!1,this.options=Ot(AM,{optional:!0})||{},this.errorHandler=this.options.errorHandler||QX,this.malformedUriErrorHandler=this.options.malformedUriErrorHandler||JX,this.navigated=!1,this.lastSuccessfulId=-1,this.urlHandlingStrategy=Ot(KX),this.routeReuseStrategy=Ot(jX),this.urlCreationStrategy=Ot(Vq),this.titleStrategy=Ot(W3),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=XB(Ot(Mm,{optional:!0})??[]),this.navigationTransitions=Ot(EM),this.urlSerializer=Ot(Ty),this.location=Ot(_y),this.isNgZoneEnabled=Ot(ft)instanceof ft&&ft.isInAngularZone(),this.resetConfig(this.config),this.currentUrlTree=new au,this.rawUrlTree=this.currentUrlTree,this.browserUrlTree=this.currentUrlTree,this.routerState=_3(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),Py,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(yI),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 d=null;switch(a){case"merge":d={...this.currentUrlTree.queryParams,...s};break;case"preserve":d=this.currentUrlTree.queryParams;break;default:d=s||null}return null!==d&&(d=this.removeEmptyProps(d)),this.urlCreationStrategy.createUrlTree(r,this.routerState,this.currentUrlTree,e,d,c??null)}navigateByUrl(e,n={skipLocationChange:!1}){const r=Rh(e)?e:this.parseUrl(e),s=this.urlHandlingStrategy.merge(r,this.rawUrlTree);return this.scheduleNavigation(s,Py,null,n)}navigate(e,n={skipLocationChange:!1}){return function nK(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,d;return o?(a=o.resolve,l=o.reject,c=o.promise):c=new Promise((h,p)=>{a=h,l=p}),d="computed"===this.canceledNavigationResolution?r&&r.\u0275routerPageId?r.\u0275routerPageId:(this.browserPageId??0)+1:0,this.navigationTransitions.handleNavigationRequest({targetPageId:d,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=ke({token:i,factory:i.\u0275fac,providedIn:"root"}),i})();class j3{}let sK=(()=>{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(gn(e=>e instanceof kh),ru(()=>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=Ow(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 Ni(r).pipe(yd())}preloadConfig(e,n){return this.preloadingStrategy.preload(n,()=>{let r;r=n.loadChildren&&void 0===n.canLoad?this.loader.loadChildren(e,n):ht(null);const s=r.pipe(nr(o=>null===o?ht(void 0):(n._loadedRoutes=o.routes,n._loadedInjector=o.injector,this.processRoutes(o.injector??e,o.routes))));return n.loadComponent&&!n._loadedComponent?Ni([s,this.loader.loadComponent(n)]).pipe(yd()):s})}}return i.\u0275fac=function(e){return new(e||i)(ee(Yo),ee(mN),ee(to),ee(j3),ee(CI))},i.\u0275prov=ke({token:i,factory:i.\u0275fac,providedIn:"root"}),i})();const AI=new me("");let Y3=(()=>{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 cI?(this.store[this.lastId]=this.viewportScroller.getScrollPosition(),this.lastSource=e.navigationTrigger,this.restoredId=e.restoredState?e.restoredState.navigationId:0):e instanceof kh&&(this.lastId=e.id,this.scheduleScrollEvent(e,this.urlSerializer.parse(e.urlAfterRedirects).fragment))})}consumeScrollEvents(){return this.transitions.events.subscribe(e=>{e instanceof p3&&(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 p3(e,"popstate"===this.lastSource?this.store[this.restoredId]:null,n))})},0)})}ngOnDestroy(){this.routerEventsSubscription?.unsubscribe(),this.scrollEventsSubscription?.unsubscribe()}}return i.\u0275fac=function(e){xo()},i.\u0275prov=ke({token:i,factory:i.\u0275fac}),i})();var qo=(()=>((qo=qo||{})[qo.COMPLETE=0]="COMPLETE",qo[qo.FAILED=1]="FAILED",qo[qo.REDIRECTING=2]="REDIRECTING",qo))();const Cm=!1;function lu(i,t){return{\u0275kind:i,\u0275providers:t}}const DI=new me("",{providedIn:"root",factory:()=>!1});function X3(){const i=Ot($i);return t=>{const e=i.get(dm);if(t!==e.components[0])return;const n=i.get(Yo),r=i.get(K3);1===i.get(TI)&&n.initialNavigation(),i.get(Z3,null,Pt.Optional)?.setUpPreloading(),i.get(AI,null,Pt.Optional)?.init(),n.resetRootComponentType(e.componentTypes[0]),r.closed||(r.next(),r.complete(),r.unsubscribe())}}const K3=new me(Cm?"bootstrap done indicator":"",{factory:()=>new Re}),TI=new me(Cm?"initial navigation":"",{providedIn:"root",factory:()=>1});function dK(){let i=[];return i=Cm?[{provide:Np,multi:!0,useFactory:()=>{const t=Ot(Yo);return()=>t.events.subscribe(e=>{console.group?.(`Router Event: ${e.constructor.name}`),console.log(function Lq(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?.()})}}]:[],lu(1,i)}const Z3=new me(Cm?"router preloader":"");function uK(i){return lu(0,[{provide:Z3,useExisting:sK},{provide:j3,useExisting:i}])}const zy=!1,Q3=new me(zy?"router duplicate forRoot guard":"ROUTER_FORROOT_GUARD"),hK=[_y,{provide:Ty,useClass:iI},Yo,Fy,{provide:bm,useFactory:function q3(i){return i.routerState.root},deps:[Yo]},CI,zy?{provide:DI,useValue:!0}:[]];function fK(){return new MN("Router",Yo)}let J3=(()=>{class i{constructor(e){}static forRoot(e,n){return{ngModule:i,providers:[hK,zy&&n?.enableTracing?dK().\u0275providers:[],{provide:Mm,multi:!0,useValue:e},{provide:Q3,useFactory:_K,deps:[[Yo,new Ss,new xa]]},{provide:AM,useValue:n||{}},n?.useHash?{provide:Th,useClass:M9}:{provide:Th,useClass:jN},{provide:AI,useFactory:()=>{const i=Ot(BY),t=Ot(ft),e=Ot(AM),n=Ot(EM),r=Ot(Ty);return e.scrollOffset&&i.setOffset(e.scrollOffset),new Y3(r,n,i,t,e)}},n?.preloadingStrategy?uK(n.preloadingStrategy).\u0275providers:[],{provide:MN,multi:!0,useFactory:fK},n?.initialNavigation?vK(n):[],[{provide:eU,useFactory:X3},{provide:wN,multi:!0,useExisting:eU}]]}}static forChild(e){return{ngModule:i,providers:[{provide:Mm,multi:!0,useValue:e}]}}}return i.\u0275fac=function(e){return new(e||i)(ee(Q3,8))},i.\u0275mod=nn({type:i}),i.\u0275inj=Kt({imports:[_I]}),i})();function _K(i){if(zy&&i)throw new pe(4007,"The Router was provided more than once. This can happen if 'forRoot' is used outside of the root injector. Lazy loaded modules should use RouterModule.forChild() instead.");return"guarded"}function vK(i){return["disabled"===i.initialNavigation?lu(3,[{provide:Bw,multi:!0,useFactory:()=>{const t=Ot(Yo);return()=>{t.setUpLocationChangeListener()}}},{provide:TI,useValue:2}]).\u0275providers:[],"enabledBlocking"===i.initialNavigation?lu(2,[{provide:TI,useValue:0},{provide:Bw,multi:!0,deps:[$i],useFactory:t=>{const e=t.get(x9,Promise.resolve());return()=>e.then(()=>new Promise(n=>{const r=t.get(Yo),s=t.get(K3);(function oK(i,t){i.events.pipe(gn(e=>e instanceof kh||e instanceof mM||e instanceof dI||e instanceof gM),et(e=>e instanceof kh||e instanceof gM?qo.COMPLETE:e instanceof mM&&(0===e.code||1===e.code)?qo.REDIRECTING:qo.FAILED),gn(e=>e!==qo.REDIRECTING),Oi(1)).subscribe(()=>{t()})})(r,()=>{n(!0)}),t.get(EM).afterPreactivation=()=>(n(!0),s.closed?ht(void 0):s),r.initialNavigation()}))}}]).\u0275providers:[]]}const eU=new me(zy?"Router Initializer":""),bK=[];let xK=(()=>{class i{}return i.\u0275fac=function(e){return new(e||i)},i.\u0275mod=nn({type:i}),i.\u0275inj=Kt({imports:[J3.forRoot(bK),J3]}),i})();function tU(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 tt(i){return function(){var t=this,e=arguments;return new Promise(function(n,r){var s=i.apply(t,e);function o(l){tU(s,n,r,o,a,"next",l)}function a(l){tU(s,n,r,o,a,"throw",l)}o(void 0)})}}function Jt(i){return null!=i&&"false"!=`${i}`}function ks(i,t=0){return function wK(i){return!isNaN(parseFloat(i))&&!isNaN(Number(i))}(i)?Number(i):t}function DM(i){return Array.isArray(i)?i:[i]}function gr(i){return null==i?"":"string"==typeof i?i:`${i}px`}function jc(i){return i instanceof mt?i.nativeElement:i}const MK=["addListener","removeListener"],CK=["addEventListener","removeEventListener"],SK=["on","off"];function Ta(i,t,e,n){if(ln(e)&&(n=e,e=void 0),n)return Ta(i,t,e).pipe(JT(n));const[r,s]=function DK(i){return ln(i.addEventListener)&&ln(i.removeEventListener)}(i)?CK.map(o=>a=>i[o](t,a,e)):function EK(i){return ln(i.addListener)&&ln(i.removeListener)}(i)?MK.map(nU(i,t)):function AK(i){return ln(i.on)&&ln(i.off)}(i)?SK.map(nU(i,t)):[];if(!r&&i_(i))return nr(o=>Ta(o,t,e))(wr(i));if(!r)throw new TypeError("Invalid event target");return new In(o=>{const a=(...l)=>o.next(1s(a)})}function nU(i,t){return e=>n=>i[e](t,n)}class TK extends Zt{constructor(t,e){super()}schedule(t,e=0){return this}}const TM={setInterval(i,t,...e){const{delegate:n}=TM;return n?.setInterval?n.setInterval(i,t,...e):setInterval(i,t,...e)},clearInterval(i){const{delegate:t}=TM;return(t?.clearInterval||clearInterval)(i)},delegate:void 0};class II extends TK{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 TM.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&&TM.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,Kr(n,this),null!=t&&(this.id=this.recycleAsyncId(e,t,null)),this.delay=null,super.unsubscribe()}}}const Hy={schedule(i){let t=requestAnimationFrame,e=cancelAnimationFrame;const{delegate:n}=Hy;n&&(t=n.requestAnimationFrame,e=n.cancelAnimationFrame);const r=t(s=>{e=void 0,i(s)});return new Zt(()=>e?.(r))},requestAnimationFrame(...i){const{delegate:t}=Hy;return(t?.requestAnimationFrame||requestAnimationFrame)(...i)},cancelAnimationFrame(...i){const{delegate:t}=Hy;return(t?.cancelAnimationFrame||cancelAnimationFrame)(...i)},delegate:void 0},iU={now:()=>(iU.delegate||Date).now(),delegate:void 0};class Gy{constructor(t,e=Gy.now){this.schedulerActionCtor=t,this.now=e}schedule(t,e=0,n){return new this.schedulerActionCtor(this,t).schedule(n,e)}}Gy.now=iU.now;class RI extends Gy{constructor(t,e=Gy.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 kK=new class RK extends RI{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 IK extends II{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=Hy.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&&(Hy.cancelAnimationFrame(e),t._scheduled=void 0)}});let kI,PK=1;const IM={};function rU(i){return i in IM&&(delete IM[i],!0)}const OK={setImmediate(i){const t=PK++;return IM[t]=!0,kI||(kI=Promise.resolve()),kI.then(()=>rU(t)&&i()),t},clearImmediate(i){rU(i)}},{setImmediate:FK,clearImmediate:LK}=OK,RM={setImmediate(...i){const{delegate:t}=RM;return(t?.setImmediate||FK)(...i)},clearImmediate(i){const{delegate:t}=RM;return(t?.clearImmediate||LK)(i)},delegate:void 0},PI=new class BK extends RI{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 NK extends II{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=RM.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&&(RM.clearImmediate(e),t._scheduled===e&&(t._scheduled=void 0))}}),$y=new RI(II),UK=$y;function OI(i=0,t,e=UK){let n=-1;return null!=t&&(Hu(t)?e=t:n=t),new In(r=>{let s=function zK(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 kM(i,t=$y){return function VK(i){return ti((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(Yn(e,c=>{n=!0,r=c,s||wr(i(c)).subscribe(s=Yn(e,a,l))},()=>{o=!0,(!n||!s||s.closed)&&e.complete()}))})}(()=>OI(i,t))}function He(i){return ti((t,e)=>{wr(i).subscribe(Yn(e,()=>e.complete(),ms)),!e.closed&&t.subscribe(e)})}let FI;try{FI=typeof Intl<"u"&&Intl.v8BreakIterator}catch{FI=!1}let Sm,zi=(()=>{class i{constructor(e){this._platformId=e,this.isBrowser=this._platformId?function NY(i){return i===hB}(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&&!FI)&&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)(ee(fT))},i.\u0275prov=ke({token:i,factory:i.\u0275fac,providedIn:"root"}),i})();const sU=["color","button","checkbox","date","datetime-local","email","file","hidden","image","month","number","password","radio","range","reset","search","submit","tel","text","time","url","week"];function oU(){if(Sm)return Sm;if("object"!=typeof document||!document)return Sm=new Set(sU),Sm;let i=document.createElement("input");return Sm=new Set(sU.filter(t=>(i.setAttribute("type",t),i.type===t))),Sm}let Wy,PM,Oh,LI;function Ph(i){return function HK(){if(null==Wy&&typeof window<"u")try{window.addEventListener("test",null,Object.defineProperty({},"passive",{get:()=>Wy=!0}))}finally{Wy=Wy||!1}return Wy}()?i:!!i.capture}function aU(){if(null==Oh){if("object"!=typeof document||!document||"function"!=typeof Element||!Element)return Oh=!1,Oh;if("scrollBehavior"in document.documentElement.style)Oh=!0;else{const i=Element.prototype.scrollTo;Oh=!!i&&!/\{\s*\[native code\]\s*\}/.test(i.toString())}}return Oh}function jy(){if("object"!=typeof document||!document)return 0;if(null==PM){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),PM=0,0===i.scrollLeft&&(i.scrollLeft=1,PM=0===i.scrollLeft?1:2),i.remove()}return PM}function OM(){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 cu(i){return i.composedPath?i.composedPath()[0]:i.target}function NI(){return typeof __karma__<"u"&&!!__karma__||typeof jasmine<"u"&&!!jasmine||typeof jest<"u"&&!!jest||typeof Mocha<"u"&&!!Mocha}const WK=new me("cdk-dir-doc",{providedIn:"root",factory:function jK(){return Ot(jt)}}),YK=/^(ar|ckb|dv|he|iw|fa|nqo|ps|sd|ug|ur|yi|.*[-_](Adlm|Arab|Hebr|Nkoo|Rohg|Thaa))(?!.*[-_](Latn|Cyrl)($|-|_))($|-|_)/i;let Ia=(()=>{class i{constructor(e){this.value="ltr",this.change=new We,e&&(this.value=function qK(i){const t=i?.toLowerCase()||"";return"auto"===t&&typeof navigator<"u"&&navigator?.language?YK.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)(ee(WK,8))},i.\u0275prov=ke({token:i,factory:i.\u0275fac,providedIn:"root"}),i})(),Yy=(()=>{class i{}return i.\u0275fac=function(e){return new(e||i)},i.\u0275mod=nn({type:i}),i.\u0275inj=Kt({}),i})();const XK=["contentWrapper"],KK=["*"],ZK=new me("VIRTUAL_SCROLL_STRATEGY");let qy=(()=>{class i{constructor(e,n,r){this._ngZone=e,this._platform=n,this._scrolled=new Re,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 In(n=>{this._globalSubscription||this._addGlobalListener();const r=e>0?this._scrolled.pipe(kM(e)).subscribe(n):this._scrolled.subscribe(n);return this._scrolledCount++,()=>{r.unsubscribe(),this._scrolledCount--,this._scrolledCount||this._removeGlobalListener()}}):ht()}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(gn(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=jc(n),s=e.getElementRef().nativeElement;do{if(r==s)return!0}while(r=r.parentElement);return!1}_addGlobalListener(){this._globalSubscription=this._ngZone.runOutsideAngular(()=>Ta(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)(ee(ft),ee(zi),ee(jt,8))},i.\u0275prov=ke({token:i,factory:i.\u0275fac,providedIn:"root"}),i})(),lU=(()=>{class i{constructor(e,n,r,s){this.elementRef=e,this.scrollDispatcher=n,this.ngZone=r,this.dir=s,this._destroyed=new Re,this._elementScrolled=new In(o=>this.ngZone.runOutsideAngular(()=>Ta(this.elementRef.nativeElement,"scroll").pipe(He(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!=jy()?(null!=e.left&&(e.right=n.scrollWidth-n.clientWidth-e.left),2==jy()?e.left=e.right:1==jy()&&(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;aU()?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==jy()?e==n?s.scrollWidth-s.clientWidth-s.scrollLeft:s.scrollLeft:o&&1==jy()?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)(E(mt),E(qy),E(ft),E(Ia,8))},i.\u0275dir=ve({type:i,selectors:[["","cdk-scrollable",""],["","cdkScrollable",""]],standalone:!0}),i})(),FM=(()=>{class i{constructor(e,n,r){this._platform=e,this._change=new Re,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(kM(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)(ee(zi),ee(ft),ee(jt,8))},i.\u0275prov=ke({token:i,factory:i.\u0275fac,providedIn:"root"}),i})();const cU=new me("VIRTUAL_SCROLLABLE");let eZ=(()=>{class i extends lU{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)(E(mt),E(qy),E(ft),E(Ia,8))},i.\u0275dir=ve({type:i,features:[lt]}),i})();const nZ=typeof requestAnimationFrame<"u"?kK:PI;let iZ=(()=>{class i extends eZ{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=Ot(zi),this._detachedSubject=new Re,this._renderedRangeSubject=new Re,this._orientation="vertical",this._appendOnly=!1,this.scrolledIndexChange=new In(d=>this._scrollStrategy.scrolledIndexChange.subscribe(h=>Promise.resolve().then(()=>this.ngZone.run(()=>d.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=Zt.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(Ao(null),kM(0,nZ)).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(He(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 tZ(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)(E(mt),E(Zn),E(ft),E(ZK,8),E(Ia,8),E(qy),E(FM),E(cU,8))},i.\u0275cmp=ot({type:i,selectors:[["cdk-virtual-scroll-viewport"]],viewQuery:function(e,n){if(1&e&&Wn(XK,7),2&e){let r;St(r=Et())&&(n._contentWrapper=r.first)}},hostAttrs:[1,"cdk-virtual-scroll-viewport"],hostVars:4,hostBindings:function(e,n){2&e&&un("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:[Dn([{provide:lU,useFactory:(t,e)=>t||e,deps:[[new Ss,new vo(cU)],i]}]),lt,Z1],ngContentSelectors:KK,decls:4,vars:4,consts:[[1,"cdk-virtual-scroll-content-wrapper"],["contentWrapper",""],[1,"cdk-virtual-scroll-spacer"]],template:function(e,n){1&e&&(sr(),W(0,"div",0,1),Wt(2),Y(),Te(3,"div",2)),2&e&&(G(3),jo("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})(),Xy=(()=>{class i{}return i.\u0275fac=function(e){return new(e||i)},i.\u0275mod=nn({type:i}),i.\u0275inj=Kt({}),i})(),dU=(()=>{class i{}return i.\u0275fac=function(e){return new(e||i)},i.\u0275mod=nn({type:i}),i.\u0275inj=Kt({imports:[Yy,Xy,iZ,Yy,Xy]}),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 Fh 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 rZ extends BI{constructor(t){super(),this.element=t instanceof mt?t.nativeElement:t}}class LM{constructor(){this._isDisposed=!1,this.attachDomPortal=null}hasAttached(){return!!this._attachedPortal}attach(t){return t instanceof Fh?(this._attachedPortal=t,this.attachComponentPortal(t)):t instanceof Em?(this._attachedPortal=t,this.attachTemplatePortal(t)):this.attachDomPortal&&t instanceof rZ?(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 sZ extends LM{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||$i.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 LM{constructor(e,n,r){super(),this._componentFactoryResolver=e,this._viewContainerRef=n,this._isInitialized=!1,this.attached=new We,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)(E(Hl),E(Wr),E(jt))},i.\u0275dir=ve({type:i,selectors:[["","cdkPortalOutlet",""]],inputs:{portal:["cdkPortalOutlet","portal"]},outputs:{attached:"attached"},exportAs:["cdkPortalOutlet"],features:[lt]}),i})(),Lh=(()=>{class i{}return i.\u0275fac=function(e){return new(e||i)},i.\u0275mod=nn({type:i}),i.\u0275inj=Kt({}),i})();function Xo(i,...t){return t.length?t.some(e=>i[e]):i.altKey||i.shiftKey||i.ctrlKey||i.metaKey}const uU=aU();class yZ{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=gr(-this._previousScrollPosition.left),t.style.top=gr(-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"),uU&&(n.scrollBehavior=r.scrollBehavior="auto"),window.scroll(this._previousScrollPosition.left,this._previousScrollPosition.top),uU&&(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 bZ{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(gn(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 hU{enable(){}disable(){}attach(){}}function VI(i,t){return t.some(e=>i.bottome.bottom||i.righte.right)}function fU(i,t){return t.some(e=>i.tope.bottom||i.lefte.right)}class xZ{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();VI(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 wZ=(()=>{class i{constructor(e,n,r,s){this._scrollDispatcher=e,this._viewportRuler=n,this._ngZone=r,this.noop=()=>new hU,this.close=o=>new bZ(this._scrollDispatcher,this._ngZone,this._viewportRuler,o),this.block=()=>new yZ(this._viewportRuler,this._document),this.reposition=o=>new xZ(this._scrollDispatcher,this._viewportRuler,this._ngZone,o),this._document=s}}return i.\u0275fac=function(e){return new(e||i)(ee(qy),ee(FM),ee(ft),ee(jt))},i.\u0275prov=ke({token:i,factory:i.\u0275fac,providedIn:"root"}),i})();class km{constructor(t){if(this.scrollStrategy=new hU,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 MZ{constructor(t,e){this.connectionPair=t,this.scrollableViewProperties=e}}let pU=(()=>{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)(ee(jt))},i.\u0275prov=ke({token:i,factory:i.\u0275fac,providedIn:"root"}),i})(),CZ=(()=>{class i extends pU{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)(ee(jt),ee(ft,8))},i.\u0275prov=ke({token:i,factory:i.\u0275fac,providedIn:"root"}),i})(),SZ=(()=>{class i extends pU{constructor(e,n,r){super(e),this._platform=n,this._ngZone=r,this._cursorStyleIsSet=!1,this._pointerDownListener=s=>{this._pointerDownEventTarget=cu(s)},this._clickListener=s=>{const o=cu(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 d=l[c];if(d._outsidePointerEvents.observers.length<1||!d.hasAttached())continue;if(d.overlayElement.contains(o)||d.overlayElement.contains(a))break;const h=d._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)(ee(jt),ee(zi),ee(ft,8))},i.\u0275prov=ke({token:i,factory:i.\u0275fac,providedIn:"root"}),i})(),UM=(()=>{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||NI()){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 Re,this._outsidePointerEvents=new Re,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(Oi(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=gr(this._config.width),t.height=gr(this._config.height),t.minWidth=gr(this._config.minWidth),t.minHeight=gr(this._config.minHeight),t.maxWidth=gr(this._config.maxWidth),t.maxHeight=gr(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=DM(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(He(Mr(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 mU="cdk-overlay-connected-position-bounding-box",EZ=/([A-Za-z%]+)$/;class AZ{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 Re,this._resizeSubscription=Zt.EMPTY,this._offsetX=0,this._offsetY=0,this._appliedPanelClasses=[],this.positionChanges=this._positionChanges,this.setOrigin(t)}attach(t){this._validatePositions(),t.hostElement.classList.add(mU),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),d=this._getOverlayFit(c,e,n,a);if(d.isCompletelyWithinViewport)return this._isPushed=!1,void this._applyPosition(a,l);this._canFitWithFlexibleDimensions(d,c,n)?s.push({position:a,origin:l,overlayRect:e,boundingBoxRect:this._calculateBoundingBoxRect(l,a)}):(!o||o.overlayFit.visibleAreal&&(l=d,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&&Nh(this._boundingBox.style,{top:"",left:"",right:"",bottom:"",height:"",width:"",alignItems:"",justifyContent:""}),this._pane&&this._resetOverlayElementStyles(),this._overlayRef&&this._overlayRef.hostElement.classList.remove(mU),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=_U(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=gU(this._overlayRef.getConfig().minHeight),a=gU(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=_U(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 d=0,h=0;return d=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,d=t.x-this._viewportMargin;else if("start"===e.overlayX&&!r||"end"===e.overlayX&&r)h=t.x,d=n.right-t.x;else{const m=Math.min(n.right-t.x+n.left,t.x),g=this._lastBoundingBoxSize.width;d=2*m,h=t.x-m,d>g&&!this._isInitialRender&&!this._growAfterOpen&&(h=t.x-g/2)}return{top:o,left:h,bottom:a,right:p,width:d,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=gr(n.height),r.top=gr(n.top),r.bottom=gr(n.bottom),r.width=gr(n.width),r.left=gr(n.left),r.right=gr(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=gr(s)),o&&(r.maxWidth=gr(o))}this._lastBoundingBoxSize=n,Nh(this._boundingBox.style,r)}_resetBoundingBoxStyles(){Nh(this._boundingBox.style,{top:"0",left:"0",right:"0",bottom:"0",height:"",width:"",alignItems:"",justifyContent:""})}_resetOverlayElementStyles(){Nh(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 d=this._viewportRuler.getViewportScrollPosition();Nh(n,this._getExactOverlayY(e,t,d)),Nh(n,this._getExactOverlayX(e,t,d))}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=gr(o.maxHeight):s&&(n.maxHeight="")),o.maxWidth&&(r?n.maxWidth=gr(o.maxWidth):s&&(n.maxWidth="")),Nh(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=gr(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=gr(s.x),r}_getScrollVisibility(){const t=this._getOriginRect(),e=this._pane.getBoundingClientRect(),n=this._scrollables.map(r=>r.getElementRef().nativeElement.getBoundingClientRect());return{isOriginClipped:fU(t,n),isOriginOutsideView:VI(t,n),isOverlayClipped:fU(e,n),isOverlayOutsideView:VI(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&&DM(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 mt)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 Nh(i,t){for(let e in t)t.hasOwnProperty(e)&&(i[e]=t[e]);return i}function gU(i){if("number"!=typeof i&&null!=i){const[t,e]=i.split(EZ);return e&&"px"!==e?null:parseFloat(t)}return i||null}function _U(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 vU="cdk-global-overlay-wrapper";class yU{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(vU),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),d=this._xPosition,h=this._xOffset,p="rtl"===this._overlayRef.getConfig().direction;let m="",g="",b="";l?b="flex-start":"center"===d?(b="center",p?g=h:m=h):p?"left"===d||"end"===d?(b="flex-end",m=h):("right"===d||"start"===d)&&(b="flex-start",g=h):"left"===d||"start"===d?(b="flex-start",m=h):("right"===d||"end"===d)&&(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(vU),n.justifyContent=n.alignItems=t.marginTop=t.marginBottom=t.marginLeft=t.marginRight=t.position="",this._overlayRef=null,this._isDisposed=!0}}let DZ=(()=>{class i{constructor(e,n,r,s){this._viewportRuler=e,this._document=n,this._platform=r,this._overlayContainer=s}global(){return new yU}flexibleConnectedTo(e){return new AZ(e,this._viewportRuler,this._document,this._platform,this._overlayContainer)}}return i.\u0275fac=function(e){return new(e||i)(ee(FM),ee(jt),ee(zi),ee(UM))},i.\u0275prov=ke({token:i,factory:i.\u0275fac,providedIn:"root"}),i})(),TZ=0,as=(()=>{class i{constructor(e,n,r,s,o,a,l,c,d,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=d,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 Zy(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-"+TZ++,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(dm)),new sZ(e,this._componentFactoryResolver,this._appRef,this._injector,this._document)}}return i.\u0275fac=function(e){return new(e||i)(ee(wZ),ee(UM),ee(Hl),ee(DZ),ee(CZ),ee($i),ee(ft),ee(jt),ee(Ia),ee(_y),ee(SZ),ee(Rr,8))},i.\u0275prov=ke({token:i,factory:i.\u0275fac,providedIn:"root"}),i})();const IZ=[{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"}],bU=new me("cdk-connected-overlay-scroll-strategy");let zI=(()=>{class i{constructor(e){this.elementRef=e}}return i.\u0275fac=function(e){return new(e||i)(E(mt))},i.\u0275dir=ve({type:i,selectors:[["","cdk-overlay-origin",""],["","overlay-origin",""],["","cdkOverlayOrigin",""]],exportAs:["cdkOverlayOrigin"],standalone:!0}),i})(),xU=(()=>{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=Zt.EMPTY,this._attachSubscription=Zt.EMPTY,this._detachSubscription=Zt.EMPTY,this._positionSubscription=Zt.EMPTY,this.viewportMargin=0,this.open=!1,this.disableClose=!1,this.backdropClick=new We,this.positionChange=new We,this.attach=new We,this.detach=new We,this.overlayKeydown=new We,this.overlayOutsideClick=new We,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=IZ);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&&!Xo(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 zI?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(jB(()=>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)(E(as),E(Mo),E(Wr),E(bU),E(Ia,8))},i.\u0275dir=ve({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:[bi]}),i})();const kZ={provide:bU,deps:[as],useFactory:function RZ(i){return()=>i.scrollStrategies.reposition()}};let Pm=(()=>{class i{}return i.\u0275fac=function(e){return new(e||i)},i.\u0275mod=nn({type:i}),i.\u0275inj=Kt({providers:[as,kZ],imports:[Yy,Lh,dU,dU]}),i})();function ml(i,t=$y){return ti((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,d=t.now();if(d{s=c,o=t.now(),r||(r=t.schedule(l,i),n.add(r))},()=>{a(),n.complete()},void 0,()=>{s=r=null}))})}function wU(i){return gn((t,e)=>i<=e)}function Zl(i,t=$a){return i=i??PZ,ti((e,n)=>{let r,s=!0;e.subscribe(Yn(n,o=>{const a=t(o);(s||!i(r,a))&&(s=!1,r=a,n.next(o))}))})}function PZ(i,t){return i===t}let MU=(()=>{class i{create(e){return typeof MutationObserver>"u"?null:new MutationObserver(e)}}return i.\u0275fac=function(e){return new(e||i)},i.\u0275prov=ke({token:i,factory:i.\u0275fac,providedIn:"root"}),i})(),OZ=(()=>{class i{constructor(e){this._mutationObserverFactory=e,this._observedElements=new Map}ngOnDestroy(){this._observedElements.forEach((e,n)=>this._cleanupObserver(n))}observe(e){const n=jc(e);return new In(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 Re,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)(ee(MU))},i.\u0275prov=ke({token:i,factory:i.\u0275fac,providedIn:"root"}),i})(),CU=(()=>{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=ks(e),this._subscribe()}constructor(e,n,r){this._contentObserver=e,this._elementRef=n,this._ngZone=r,this.event=new We,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(ml(this.debounce)):e).subscribe(this.event)})}_unsubscribe(){this._currentSubscription?.unsubscribe()}}return i.\u0275fac=function(e){return new(e||i)(E(OZ),E(mt),E(ft))},i.\u0275dir=ve({type:i,selectors:[["","cdkObserveContent",""]],inputs:{disabled:["cdkObserveContentDisabled","disabled"],debounce:"debounce"},outputs:{event:"cdkObserveContent"},exportAs:["cdkObserveContent"]}),i})(),HI=(()=>{class i{}return i.\u0275fac=function(e){return new(e||i)},i.\u0275mod=nn({type:i}),i.\u0275inj=Kt({providers:[MU]}),i})();const SU=new Set;let Om,FZ=(()=>{class i{constructor(e){this._platform=e,this._matchMedia=this._platform.isBrowser&&window.matchMedia?window.matchMedia.bind(window):NZ}matchMedia(e){return(this._platform.WEBKIT||this._platform.BLINK)&&function LZ(i){if(!SU.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),SU.add(i))}catch(t){console.error(t)}}(e),this._matchMedia(e)}}return i.\u0275fac=function(e){return new(e||i)(ee(zi))},i.\u0275prov=ke({token:i,factory:i.\u0275fac,providedIn:"root"}),i})();function NZ(i){return{matches:"all"===i||""===i,media:i,addListener:()=>{},removeListener:()=>{}}}let GI=(()=>{class i{constructor(e,n){this._mediaMatcher=e,this._zone=n,this._queries=new Map,this._destroySubject=new Re}ngOnDestroy(){this._destroySubject.next(),this._destroySubject.complete()}isMatched(e){return EU(DM(e)).some(r=>this._registerQuery(r).mql.matches)}observe(e){let s=nu(EU(DM(e)).map(o=>this._registerQuery(o).observable));return s=Sy(s.pipe(Oi(1)),s.pipe(wU(1),ml(0))),s.pipe(et(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 In(o=>{const a=l=>this._zone.run(()=>o.next(l));return n.addListener(a),()=>{n.removeListener(a)}}).pipe(Ao(n),et(({matches:o})=>({query:e,matches:o})),He(this._destroySubject)),mql:n};return this._queries.set(e,s),s}}return i.\u0275fac=function(e){return new(e||i)(ee(FZ),ee(ft))},i.\u0275prov=ke({token:i,factory:i.\u0275fac,providedIn:"root"}),i})();function EU(i){return i.map(t=>t.split(",")).reduce((t,e)=>t.concat(e)).map(t=>t.trim())}function VM(i,t){return(i.getAttribute(t)||"").match(/\S+/g)||[]}const DU="cdk-describedby-message",zM="cdk-describedby-host";let $I=0,zZ=(()=>{class i{constructor(e,n){this._platform=n,this._messageRegistry=new Map,this._messagesContainer=null,this._id=""+$I++,this._document=e,this._id=Ot(cm)+"-"+$I++}describe(e,n,r){if(!this._canBeDescribed(e,n))return;const s=WI(n,r);"string"!=typeof n?(TU(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=WI(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(`[${zM}="${this._id}"]`);for(let n=0;n0!=r.indexOf(DU));e.setAttribute("aria-describedby",n.join(" "))}_addMessageReference(e,n){const r=this._messageRegistry.get(n);(function UZ(i,t,e){const n=VM(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(zM,this._id),r.referenceCount++}_removeMessageReference(e,n){const r=this._messageRegistry.get(n);r.referenceCount--,function VZ(i,t,e){const r=VM(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(zM)}_isElementDescribedByMessage(e,n){const r=VM(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)(ee(jt),ee(zi))},i.\u0275prov=ke({token:i,factory:i.\u0275fac,providedIn:"root"}),i})();function WI(i,t){return"string"==typeof i?`${t||""}/${i}`:i}function TU(i,t){i.id||(i.id=`${DU}-${t}-${$I++}`)}class IU{constructor(t){this._items=t,this._activeItemIndex=-1,this._activeItem=null,this._wrap=!1,this._letterKeyStream=new Re,this._typeaheadSubscription=Zt.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 Re,this.change=new Re,t instanceof om&&(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(Vi(e=>this._pressedLetters.push(e)),ml(t),gn(()=>this._pressedLetters.length>0),et(()=>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 om?this._items.toArray():this._items}}class HZ extends IU{setActiveItem(t){this.activeItem&&this.activeItem.setInactiveStyles(),super.setActiveItem(t),this.activeItem&&this.activeItem.setActiveStyles()}}class RU extends IU{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 HM=(()=>{class i{constructor(e){this._platform=e}isDisabled(e){return e.hasAttribute("disabled")}isVisible(e){return function $Z(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 GZ(i){try{return i.frameElement}catch{return null}}(function QZ(i){return i.ownerDocument&&i.ownerDocument.defaultView||window}(e));if(n&&(-1===PU(n)||!this.isVisible(n)))return!1;let r=e.nodeName.toLowerCase(),s=PU(e);return e.hasAttribute("contenteditable")?-1!==s:!("iframe"===r||"object"===r||this._platform.WEBKIT&&this._platform.IOS&&!function KZ(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 ZZ(i){return!function jZ(i){return function qZ(i){return"input"==i.nodeName.toLowerCase()}(i)&&"hidden"==i.type}(i)&&(function WZ(i){let t=i.nodeName.toLowerCase();return"input"===t||"select"===t||"button"===t||"textarea"===t}(i)||function YZ(i){return function XZ(i){return"a"==i.nodeName.toLowerCase()}(i)&&i.hasAttribute("href")}(i)||i.hasAttribute("contenteditable")||kU(i))}(e)&&!this.isDisabled(e)&&(n?.ignoreVisibility||this.isVisible(e))}}return i.\u0275fac=function(e){return new(e||i)(ee(zi))},i.\u0275prov=ke({token:i,factory:i.\u0275fac,providedIn:"root"}),i})();function kU(i){if(!i.hasAttribute("tabindex")||void 0===i.tabIndex)return!1;let t=i.getAttribute("tabindex");return!(!t||isNaN(parseInt(t,10)))}function PU(i){if(!kU(i))return null;const t=parseInt(i.getAttribute("tabindex")||"",10);return isNaN(t)?-1:t}class JZ{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(Oi(1)).subscribe(t)}}let jI=(()=>{class i{constructor(e,n,r){this._checker=e,this._ngZone=n,this._document=r}create(e,n=!1){return new JZ(e,this._checker,this._ngZone,this._document,n)}}return i.\u0275fac=function(e){return new(e||i)(ee(HM),ee(ft),ee(jt))},i.\u0275prov=ke({token:i,factory:i.\u0275fac,providedIn:"root"}),i})();function YI(i){return 0===i.buttons||0===i.offsetX&&0===i.offsetY}function qI(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 eQ=new me("cdk-input-modality-detector-options"),tQ={ignoreKeys:[18,17,224,91,16]},Fm=Ph({passive:!0,capture:!0});let nQ=(()=>{class i{get mostRecentModality(){return this._modality.value}constructor(e,n,r,s){this._platform=e,this._mostRecentTarget=null,this._modality=new vt(null),this._lastTouchMs=0,this._onKeydown=o=>{this._options?.ignoreKeys?.some(a=>a===o.keyCode)||(this._modality.next("keyboard"),this._mostRecentTarget=cu(o))},this._onMousedown=o=>{Date.now()-this._lastTouchMs<650||(this._modality.next(YI(o)?"keyboard":"mouse"),this._mostRecentTarget=cu(o))},this._onTouchstart=o=>{qI(o)?this._modality.next("keyboard"):(this._lastTouchMs=Date.now(),this._modality.next("touch"),this._mostRecentTarget=cu(o))},this._options={...tQ,...s},this.modalityDetected=this._modality.pipe(wU(1)),this.modalityChanged=this.modalityDetected.pipe(Zl()),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)(ee(zi),ee(ft),ee(jt),ee(eQ,8))},i.\u0275prov=ke({token:i,factory:i.\u0275fac,providedIn:"root"}),i})();const iQ=new me("liveAnnouncerElement",{providedIn:"root",factory:function rQ(){return null}}),sQ=new me("LIVE_ANNOUNCER_DEFAULT_OPTIONS");let oQ=0,XI=(()=>{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 Re,this._rootNodeFocusAndBlurListener=a=>{for(let c=cu(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=jc(e);if(!this._platform.isBrowser||1!==r.nodeType)return ht(null);const s=function $K(i){if(function GK(){if(null==LI){const i=typeof document<"u"?document.head:null;LI=!(!i||!i.createShadowRoot&&!i.attachShadow)}return LI}()){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 Re,rootNode:s};return this._elementInfo.set(r,a),this._registerGlobalListeners(a),a.subject}stopMonitoring(e){const n=jc(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=jc(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=cu(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,GM),n.addEventListener("blur",this._rootNodeFocusAndBlurListener,GM)}),this._rootNodeFocusListenerCount.set(n,r+1),1==++this._monitoredElementCount&&(this._ngZone.runOutsideAngular(()=>{this._getWindow().addEventListener("focus",this._windowFocusListener)}),this._inputModalityDetector.modalityDetected.pipe(He(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,GM),n.removeEventListener("blur",this._rootNodeFocusAndBlurListener,GM),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=Ot(GI).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,FU,LU),this._hasCheckedHighContrastMode=!0;const n=this.getHighContrastMode();1===n?e.add(KI,FU):2===n&&e.add(KI,LU)}}}return i.\u0275fac=function(e){return new(e||i)(ee(zi),ee(jt))},i.\u0275prov=ke({token:i,factory:i.\u0275fac,providedIn:"root"}),i})(),BU=(()=>{class i{constructor(e){e._applyBodyHighContrastModeCssClasses()}}return i.\u0275fac=function(e){return new(e||i)(ee(NU))},i.\u0275mod=nn({type:i}),i.\u0275inj=Kt({imports:[HI]}),i})();function lQ(i,t){}class $M{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 UU=(()=>{class i extends LM{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=d=>{this._portalOutlet.hasAttached();const h=this._portalOutlet.attachDomPortal(d);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=OM(),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=OM();return e===n||e.contains(n)}_initializeFocusTrap(){this._focusTrap=this._focusTrapFactory.create(this._elementRef.nativeElement),this._document&&(this._elementFocusedBeforeDialogWasOpened=OM())}_handleBackdropClicks(){this._overlayRef.backdropClick().subscribe(()=>{this._config.disableClose&&this._recaptureFocus()})}}return i.\u0275fac=function(e){return new(e||i)(E(mt),E(jI),E(jt,8),E($M),E(HM),E(ft),E(Zy),E(Yc))},i.\u0275cmp=ot({type:i,selectors:[["cdk-dialog-container"]],viewQuery:function(e,n){if(1&e&&Wn(Am,7),2&e){let r;St(r=Et())&&(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:[lt],decls:1,vars:0,consts:[["cdkPortalOutlet",""]],template:function(e,n){1&e&&fe(0,lQ,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 ZI{constructor(t,e){this.overlayRef=t,this.config=e,this.closed=new Re,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&&!Xo(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 VU=new me("DialogScrollStrategy"),cQ=new me("DialogData"),dQ=new me("DefaultDialogConfig"),hQ={provide:VU,deps:[as],useFactory:function uQ(i){return()=>i.scrollStrategies.block()}};let fQ=0,zU=(()=>{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 Re,this._afterOpenedAtThisLevel=new Re,this._ariaHiddenElements=new Map,this.afterAllClosed=Ey(()=>this.openDialogs.length?this._getAfterAllClosed():this._getAfterAllClosed().pipe(Ao(void 0))),this._scrollStrategy=a}open(e,n){(n={...this._defaultOptions||new $M,...n}).id=n.id||"cdk-dialog-"+fQ++,n.id&&this.getDialogById(n.id);const s=this._getOverlayConfig(n),o=this._overlay.create(s),a=new ZI(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(){QI(this.openDialogs,e=>e.close())}getDialogById(e){return this.openDialogs.find(n=>n.id===e)}ngOnDestroy(){QI(this._openDialogsAtThisLevel,e=>{!1===e.config.closeOnDestroy&&this._removeOpenDialog(e,!1)}),QI(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:$M,useValue:r},{provide:ZI,useValue:n},{provide:Zy,useValue:e}];let a;r.container?"function"==typeof r.container?a=r.container:(a=r.container.type,o.push(...r.container.providers(r))):a=UU;const l=new Fh(a,r.viewContainerRef,$i.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 Fh(e,s.viewContainerRef,o,s.componentFactoryResolver));n.componentInstance=a.instance}}_createInjector(e,n,r,s){const o=e.injector||e.viewContainerRef?.injector,a=[{provide:cQ,useValue:e.data},{provide:ZI,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(Ia,null,{optional:!0}))&&a.push({provide:Ia,useValue:{value:e.direction,change:ht()}}),$i.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)(ee(as),ee($i),ee(dQ,8),ee(i,12),ee(UM),ee(VU))},i.\u0275prov=ke({token:i,factory:i.\u0275fac}),i})();function QI(i,t){let e=i.length;for(;e--;)t(i[e])}let pQ=(()=>{class i{}return i.\u0275fac=function(e){return new(e||i)},i.\u0275mod=nn({type:i}),i.\u0275inj=Kt({providers:[zU,hQ],imports:[Pm,Lh,BU,Lh]}),i})();const mQ=["text"];function gQ(i,t){if(1&i&&Te(0,"mat-pseudo-checkbox",6),2&i){const e=he();U("state",e.selected?"checked":"unchecked")("disabled",e.disabled)}}function _Q(i,t){1&i&&Te(0,"mat-pseudo-checkbox",7),2&i&&U("disabled",he().disabled)}function vQ(i,t){if(1&i&&(W(0,"span",8),ze(1),Y()),2&i){const e=he();G(1),Zi("(",e.group.label,")")}}const yQ=[[["mat-icon"]],"*"],bQ=["mat-icon","*"],wQ=new me("mat-sanity-checks",{providedIn:"root",factory:function xQ(){return!0}});let Qn=(()=>{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!NI()&&("boolean"==typeof this._sanityChecks?this._sanityChecks:!!this._sanityChecks[e])}}return i.\u0275fac=function(e){return new(e||i)(ee(NU),ee(wQ,8),ee(jt))},i.\u0275mod=nn({type:i}),i.\u0275inj=Kt({imports:[Yy,Yy]}),i})();function WM(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 Qy(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 jM(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 JI(i,t=0){return class extends i{get tabIndex(){return this.disabled?-1:this._tabIndex}set tabIndex(e){this._tabIndex=null!=e?ks(e):this.defaultTabIndex}constructor(...e){super(...e),this._tabIndex=t,this.defaultTabIndex=t}}}function $U(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 MQ(i){return class extends i{constructor(...t){super(...t),this._isInitialized=!1,this._pendingSubscribers=[],this.initialized=new In(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 jU=(()=>{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=ke({token:i,factory:i.\u0275fac,providedIn:"root"}),i})();class SQ{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 YU=Ph({passive:!0,capture:!0});class EQ{constructor(){this._events=new Map,this._delegateEventHandler=t=>{const e=cu(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,YU)})}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,YU)))}}const qU={enterDuration:225,exitDuration:150},XU=Ph({passive:!0,capture:!0}),KU=["mousedown","touchstart"],ZU=["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=jc(n))}fadeInRipple(t,e,n={}){const r=this._containerRect=this._containerRect||this._containerElement.getBoundingClientRect(),s={...qU,...n.animation};n.centered&&(t=r.left+r.width/2,e=r.top+r.height/2);const o=n.radius||function DQ(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,d=document.createElement("div");d.classList.add("mat-ripple-element"),d.style.left=a-o+"px",d.style.top=l-o+"px",d.style.height=2*o+"px",d.style.width=2*o+"px",null!=n.color&&(d.style.backgroundColor=n.color),d.style.transitionDuration=`${c}ms`,this._containerElement.appendChild(d);const h=window.getComputedStyle(d),m=h.transitionDuration,g="none"===h.transitionProperty||"0s"===m||"0s, 0s"===m||0===r.width&&0===r.height,b=new SQ(this,d,n,g);d.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);d.addEventListener("transitionend",y),d.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={...qU,...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=jc(t);!this._platform.isBrowser||!e||e===this._triggerElement||(this._removeTriggerEvents(),this._triggerElement=e,KU.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(()=>{ZU.forEach(e=>{this._triggerElement.addEventListener(e,this,XU)})}),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=YI(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&&(KU.forEach(e=>Lm._eventManager.removeHandler(e,t,this)),this._pointerUpEventsRegistered&&ZU.forEach(e=>t.removeEventListener(e,this,XU)))}}Lm._eventManager=new EQ;const eR=new me("mat-ripple-global-options");let Bh=(()=>{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)(E(mt),E(ft),E(zi),E(eR,8),E(Rr,8))},i.\u0275dir=ve({type:i,selectors:[["","mat-ripple",""],["","matRipple",""]],hostAttrs:[1,"mat-ripple"],hostVars:2,hostBindings:function(e,n){2&e&&un("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})(),eb=(()=>{class i{}return i.\u0275fac=function(e){return new(e||i)},i.\u0275mod=nn({type:i}),i.\u0275inj=Kt({imports:[Qn,Qn]}),i})(),TQ=(()=>{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)(E(Rr,8))},i.\u0275cmp=ot({type:i,selectors:[["mat-pseudo-checkbox"]],hostAttrs:[1,"mat-pseudo-checkbox"],hostVars:12,hostBindings:function(e,n){2&e&&un("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})(),QU=(()=>{class i{}return i.\u0275fac=function(e){return new(e||i)},i.\u0275mod=nn({type:i}),i.\u0275inj=Kt({imports:[Qn]}),i})();const JU=new me("MAT_OPTION_PARENT_COMPONENT"),eV=new me("MatOptgroup");let IQ=0;class RQ{constructor(t,e=!1){this.source=t,this.isUserInput=e}}let kQ=(()=>{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-"+IQ++,this.onSelectionChange=new We,this._stateChanges=new Re}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)&&!Xo(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 RQ(this,e))}}return i.\u0275fac=function(e){xo()},i.\u0275dir=ve({type:i,viewQuery:function(e,n){if(1&e&&Wn(mQ,7),2&e){let r;St(r=Et())&&(n._text=r.first)}},inputs:{value:"value",id:"id",disabled:"disabled"},outputs:{onSelectionChange:"onSelectionChange"}}),i})(),Nm=(()=>{class i extends kQ{constructor(e,n,r,s){super(e,n,r,s)}}return i.\u0275fac=function(e){return new(e||i)(E(mt),E(Zn),E(JU,8),E(eV,8))},i.\u0275cmp=ot({type:i,selectors:[["mat-option"]],hostAttrs:["role","option",1,"mat-mdc-option","mdc-list-item"],hostVars:11,hostBindings:function(e,n){1&e&&Ue("click",function(){return n._selectViaInteraction()})("keydown",function(s){return n._handleKeydown(s)}),2&e&&(Yl("id",n.id),At("aria-selected",n.selected)("aria-disabled",n.disabled.toString()),un("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:[lt],ngContentSelectors:bQ,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&&(sr(yQ),fe(0,gQ,1,2,"mat-pseudo-checkbox",0),Wt(1),W(2,"span",1,2),Wt(4,1),Y(),fe(5,_Q,1,1,"mat-pseudo-checkbox",3),fe(6,vQ,2,1,"span",4),Te(7,"div",5)),2&e&&(U("ngIf",n.multiple),G(5),U("ngIf",!n.multiple&&n.selected&&!n.hideSingleSelectionIndicator),G(1),U("ngIf",n.group&&n.group._inert),G(1),U("matRippleTrigger",n._getHostElement())("matRippleDisabled",n.disabled||n.disableRipple))},dependencies:[Bh,vi,TQ],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})(),tR=(()=>{class i{}return i.\u0275fac=function(e){return new(e||i)},i.\u0275mod=nn({type:i}),i.\u0275inj=Kt({imports:[eb,Eo,Qn,QU]}),i})();class tV{}class FQ{}const qc="*";function Ra(i,t){return{type:7,name:i,definitions:t,options:{}}}function jr(i,t=null){return{type:4,styles:t,timings:i}}function iV(i,t=null){return{type:2,steps:i,options:t}}function si(i){return{type:6,styles:i,offset:null}}function Ps(i,t,e){return{type:0,name:i,styles:t,options:e}}function rV(i){return{type:5,steps:i}}function Pr(i,t,e=null){return{type:1,expr:i,animation:t,options:e}}function nR(i=null){return{type:9,options:i}}function iR(i,t,e=null){return{type:11,selector:i,animation:t,options:e}}function sV(i){Promise.resolve().then(i)}class tb{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(){sV(()=>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 oV{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?sV(()=>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 rR="!";function LQ(i,t){}class YM{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 sR="mdc-dialog--open",aV="mdc-dialog--opening",lV="mdc-dialog--closing";let UQ=(()=>{class i extends UU{constructor(e,n,r,s,o,a,l,c){super(e,n,r,s,o,a,l,c),this._animationStateChanged=new We}_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)(E(mt),E(jI),E(jt,8),E(YM),E(HM),E(ft),E(Zy),E(Yc))},i.\u0275cmp=ot({type:i,selectors:[["ng-component"]],features:[lt],decls:0,vars:0,template:function(e,n){},encapsulation:2}),i})();const cV="--mat-dialog-transition-duration";function dV(i){return null==i?null:"number"==typeof i?i:i.endsWith("ms")?ks(i.substring(0,i.length-2)):i.endsWith("s")?1e3*ks(i.substring(0,i.length-1)):"0"===i?0:null}let VQ=(()=>{class i extends UQ{constructor(e,n,r,s,o,a,l,c,d){super(e,n,r,s,o,a,l,d),this._animationMode=c,this._animationsEnabled="NoopAnimations"!==this._animationMode,this._hostElement=this._elementRef.nativeElement,this._openAnimationDuration=this._animationsEnabled?dV(this._config.enterAnimationDuration)??150:0,this._closeAnimationDuration=this._animationsEnabled?dV(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(cV,`${this._openAnimationDuration}ms`),this._requestAnimationFrame(()=>this._hostElement.classList.add(aV,sR)),this._waitForAnimationToComplete(this._openAnimationDuration,this._finishDialogOpen)):(this._hostElement.classList.add(sR),Promise.resolve().then(()=>this._finishDialogOpen()))}_startExitAnimation(){this._animationStateChanged.emit({state:"closing",totalTime:this._closeAnimationDuration}),this._hostElement.classList.remove(sR),this._animationsEnabled?(this._hostElement.style.setProperty(cV,`${this._openAnimationDuration}ms`),this._requestAnimationFrame(()=>this._hostElement.classList.add(lV)),this._waitForAnimationToComplete(this._closeAnimationDuration,this._finishDialogClose)):Promise.resolve().then(()=>this._finishDialogClose())}_clearAnimationClasses(){this._hostElement.classList.remove(aV,lV)}_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)(E(mt),E(jI),E(jt,8),E(YM),E(HM),E(ft),E(Zy),E(Rr,8),E(Yc))},i.\u0275cmp=ot({type:i,selectors:[["mat-dialog-container"]],hostAttrs:["tabindex","-1",1,"mat-mdc-dialog-container","mdc-dialog"],hostVars:8,hostBindings:function(e,n){2&e&&(Yl("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),un("_mat-animation-noopable",!n._animationsEnabled))},features:[lt],decls:3,vars:0,consts:[[1,"mdc-dialog__container"],[1,"mat-mdc-dialog-surface","mdc-dialog__surface"],["cdkPortalOutlet",""]],template:function(e,n){1&e&&(W(0,"div",0)(1,"div",1),fe(2,LQ,0,0,"ng-template",2),Y()())},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 nb{constructor(t,e,n){this._ref=t,this._containerInstance=n,this._afterOpened=new Re,this._beforeClosed=new Re,this._state=0,this.disableClose=e.disableClose,this.id=t.id,n._animationStateChanged.pipe(gn(r=>"opened"===r.state),Oi(1)).subscribe(()=>{this._afterOpened.next(),this._afterOpened.complete()}),n._animationStateChanged.pipe(gn(r=>"closed"===r.state),Oi(1)).subscribe(()=>{clearTimeout(this._closeFallbackTimeout),this._finishDialogClose()}),t.overlayRef.detachments().subscribe(()=>{this._beforeClosed.next(this._result),this._beforeClosed.complete(),this._finishDialogClose()}),Mr(this.backdropClick(),this.keydownEvents().pipe(gn(r=>27===r.keyCode&&!this.disableClose&&!Xo(r)))).subscribe(r=>{this.disableClose||(r.preventDefault(),uV(this,"keydown"===r.type?"keyboard":"mouse"))})}close(t){this._result=t,this._containerInstance._animationStateChanged.pipe(gn(e=>"closing"===e.state),Oi(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 uV(i,t,e){return i._closeInteractionType=t,i.close(e)}const oR=new me("MatMdcDialogData"),zQ=new me("mat-mdc-dialog-default-options"),hV=new me("mat-mdc-dialog-scroll-strategy"),GQ={provide:hV,deps:[as],useFactory:function HQ(i){return()=>i.scrollStrategies.block()}};let $Q=0,WQ=(()=>{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,d,h){this._overlay=e,this._defaultOptions=r,this._parentDialog=s,this._dialogRefConstructor=l,this._dialogContainerType=c,this._dialogDataToken=d,this._openDialogsAtThisLevel=[],this._afterAllClosedAtThisLevel=new Re,this._afterOpenedAtThisLevel=new Re,this._idPrefix="mat-dialog-",this.dialogConfigClass=YM,this.afterAllClosed=Ey(()=>this.openDialogs.length?this._getAfterAllClosed():this._getAfterAllClosed().pipe(Ao(void 0))),this._scrollStrategy=a,this._dialog=n.get(zU)}open(e,n){let r;(n={...this._defaultOptions||new YM,...n}).id=n.id||`${this._idPrefix}${$Q++}`,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:$M,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){xo()},i.\u0275prov=ke({token:i,factory:i.\u0275fac}),i})(),Bm=(()=>{class i extends WQ{constructor(e,n,r,s,o,a,l,c){super(e,n,s,a,l,o,nb,VQ,oR,c),this._idPrefix="mat-mdc-dialog-"}}return i.\u0275fac=function(e){return new(e||i)(ee(as),ee($i),ee(_y,8),ee(zQ,8),ee(hV),ee(i,12),ee(UM),ee(Rr,8))},i.\u0275prov=ke({token:i,factory:i.\u0275fac}),i})(),jQ=0,YQ=(()=>{class i{constructor(e,n,r){this.dialogRef=e,this._elementRef=n,this._dialog=r,this.type="button"}ngOnInit(){this.dialogRef||(this.dialogRef=gV(this._elementRef,this._dialog.openDialogs))}ngOnChanges(e){const n=e._matDialogClose||e._matDialogCloseResult;n&&(this.dialogResult=n.currentValue)}_onButtonClick(e){uV(this.dialogRef,0===e.screenX&&0===e.screenY?"keyboard":"mouse",this.dialogResult)}}return i.\u0275fac=function(e){return new(e||i)(E(nb,8),E(mt),E(Bm))},i.\u0275dir=ve({type:i,selectors:[["","mat-dialog-close",""],["","matDialogClose",""]],hostVars:2,hostBindings:function(e,n){1&e&&Ue("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:[bi]}),i})(),fV=(()=>{class i{constructor(e,n,r){this._dialogRef=e,this._elementRef=n,this._dialog=r,this.id="mat-mdc-dialog-title-"+jQ++}ngOnInit(){this._dialogRef||(this._dialogRef=gV(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)(E(nb,8),E(mt),E(Bm))},i.\u0275dir=ve({type:i,selectors:[["","mat-dialog-title",""],["","matDialogTitle",""]],hostAttrs:[1,"mat-mdc-dialog-title","mdc-dialog__title"],hostVars:1,hostBindings:function(e,n){2&e&&Yl("id",n.id)},inputs:{id:"id"},exportAs:["matDialogTitle"]}),i})(),pV=(()=>{class i{}return i.\u0275fac=function(e){return new(e||i)},i.\u0275dir=ve({type:i,selectors:[["","mat-dialog-content",""],["mat-dialog-content"],["","matDialogContent",""]],hostAttrs:[1,"mat-mdc-dialog-content","mdc-dialog__content"]}),i})(),mV=(()=>{class i{constructor(){this.align="start"}}return i.\u0275fac=function(e){return new(e||i)},i.\u0275dir=ve({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&&un("mat-mdc-dialog-actions-align-center","center"===n.align)("mat-mdc-dialog-actions-align-end","end"===n.align)},inputs:{align:"align"}}),i})();function gV(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 _V=(()=>{class i{}return i.\u0275fac=function(e){return new(e||i)},i.\u0275mod=nn({type:i}),i.\u0275inj=Kt({providers:[Bm,GQ],imports:[pQ,Pm,Lh,Qn,Qn]}),i})();const qQ=["mat-button",""],yV=[[["",8,"material-icons",3,"iconPositionEnd",""],["mat-icon",3,"iconPositionEnd",""],["","matButtonIcon","",3,"iconPositionEnd",""]],"*",[["","iconPositionEnd","",8,"material-icons"],["mat-icon","iconPositionEnd",""],["","matButtonIcon","","iconPositionEnd",""]]],bV=[".material-icons:not([iconPositionEnd]), mat-icon:not([iconPositionEnd]), [matButtonIcon]:not([iconPositionEnd])","*",".material-icons[iconPositionEnd], mat-icon[iconPositionEnd], [matButtonIcon][iconPositionEnd]"],KQ=["mat-mini-fab",""],QQ=["mat-icon-button",""],JQ=["*"],eJ=[{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"]}],tJ=Qy(WM(jM(class{constructor(i){this._elementRef=i}})));let aR=(()=>{class i extends tJ{constructor(e,n,r,s){super(e),this._platform=n,this._ngZone=r,this._animationMode=s,this._focusMonitor=Ot(Yc),this._isFab=!1;const o=e.nativeElement.classList;for(const a of eJ)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){xo()},i.\u0275dir=ve({type:i,viewQuery:function(e,n){if(1&e&&Wn(Bh,5),2&e){let r;St(r=Et())&&(n.ripple=r.first)}},features:[lt]}),i})(),qM=(()=>{class i extends aR{constructor(e,n,r,s){super(e,n,r,s)}}return i.\u0275fac=function(e){return new(e||i)(E(mt),E(zi),E(ft),E(Rr,8))},i.\u0275cmp=ot({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),un("_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:[lt],attrs:qQ,ngContentSelectors:bV,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&&(sr(yV),Te(0,"span",0),Wt(1),W(2,"span",1),Wt(3,1),Y(),Wt(4,2),Te(5,"span",2)(6,"span",3)(7,"span",4)),2&e&&(un("mdc-button__ripple",!n._isFab)("mdc-fab__ripple",n._isFab),G(6),U("matRippleDisabled",n._isRippleDisabled())("matRippleTrigger",n._elementRef.nativeElement))},dependencies:[Bh],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 iJ=new me("mat-mdc-fab-default-options",{providedIn:"root",factory:xV});function xV(){return{color:"accent"}}const wV=xV();let MV=(()=>{class i extends aR{constructor(e,n,r,s,o){super(e,n,r,s),this._options=o,this._isFab=!0,this._options=this._options||wV,this.color=this.defaultColor=this._options.color||wV.color}}return i.\u0275fac=function(e){return new(e||i)(E(mt),E(zi),E(ft),E(Rr,8),E(iJ,8))},i.\u0275cmp=ot({type:i,selectors:[["button","mat-mini-fab",""]],hostVars:7,hostBindings:function(e,n){2&e&&(At("disabled",n.disabled||null),un("_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:[lt],attrs:KQ,ngContentSelectors:bV,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&&(sr(yV),Te(0,"span",0),Wt(1),W(2,"span",1),Wt(3,1),Y(),Wt(4,2),Te(5,"span",2)(6,"span",3)(7,"span",4)),2&e&&(un("mdc-button__ripple",!n._isFab)("mdc-fab__ripple",n._isFab),G(6),U("matRippleDisabled",n._isRippleDisabled())("matRippleTrigger",n._elementRef.nativeElement))},dependencies:[Bh],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})(),XM=(()=>{class i extends aR{constructor(e,n,r,s){super(e,n,r,s)}}return i.\u0275fac=function(e){return new(e||i)(E(mt),E(zi),E(ft),E(Rr,8))},i.\u0275cmp=ot({type:i,selectors:[["button","mat-icon-button",""]],hostVars:7,hostBindings:function(e,n){2&e&&(At("disabled",n.disabled||null),un("_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:[lt],attrs:QQ,ngContentSelectors:JQ,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&&(sr(),Te(0,"span",0),Wt(1),Te(2,"span",1)(3,"span",2)(4,"span",3)),2&e&&(G(3),U("matRippleDisabled",n._isRippleDisabled())("matRippleCentered",!0)("matRippleTrigger",n._elementRef.nativeElement))},dependencies:[Bh],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})(),KM=(()=>{class i{}return i.\u0275fac=function(e){return new(e||i)},i.\u0275mod=nn({type:i}),i.\u0275inj=Kt({imports:[Qn,eb,Qn]}),i})();const rJ=["class","dialog"];let CV=(()=>{class i{constructor(e,n){this.dialogRef=e,this.data=n}}return i.\u0275fac=function(e){return new(e||i)(E(nb),E(oR))},i.\u0275cmp=ot({type:i,selectors:[["app-confirm",8,"dialog"]],attrs:rJ,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&&(W(0,"h1",0),ze(1,"Confirmation"),Y(),W(2,"div",1)(3,"p"),ze(4),Y()(),W(5,"div",2)(6,"button",3),Ue("click",function(){return n.dialogRef.close()}),ze(7,"Cancel"),Y(),W(8,"button",4),ze(9,"Yes"),Y()()),2&e&&(G(4),_i(n.data.text),G(4),U("mat-dialog-close",!0))},dependencies:[qM,YQ,fV,pV,mV]}),i})();function lR(i,t){const e="object"==typeof t;return new Promise((n,r)=>{const s=new da({next:o=>{n(o),s.unsubscribe()},error:r,complete:()=>{e?n(t.defaultValue):r(new fm)}});i.subscribe(s)})}let Ql=(()=>{class i{constructor(e){this.ngZone=e,this.openedResource$=new vt(null),this.openedResourcePath$=new vt(null),eel.expose(this.wrapHandler(this.openFile),"open_file"),eel.on_angular_ready(),setTimeout(tt(function*(){for(;;){if(eel._websocket){eel._websocket.onclose=()=>window.close();break}yield new Promise(n=>setTimeout(n,0))}}),0)}wrapHandler(e){return(...n)=>{try{ft.assertInAngularZone(),e.bind(this)(...n)}catch{this.ngZone.run(e,this,n)}}}openFile(e,n=!1){var r=this;return tt(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 tt(function*(){yield eel.open_file_with_system_app(e)()})()}retrieveValue(e){return tt(function*(){return yield eel.retrieve_value(e)()})()}runCustomAction(e,n,r){return tt(function*(){return eel.run_custom_action(e,n,r)()})()}saveFile(e){var n=this;return tt(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 tt(function*(){return eel.serialize_resource(e,n)()})()}serializeResourceTmp(e,n,r={}){return tt(function*(){return eel.serialize_resource_tmp(e,n,r)()})()}serializeReversible(e,n){return tt(function*(){return eel.serialize_reversible(e,n)()})()}deserializeResource(e){return tt(function*(){return eel.deserialize_resource(e)()})()}}return i.\u0275fac=function(e){return new(e||i)(ee(ft))},i.\u0275prov=ke({token:i,factory:i.\u0275fac,providedIn:"root"}),i})();var cR=ps(489);const SV=i=>!(!i||"object"!=typeof i),EV=(i={},t,e,n=[])=>{const r=[];if(SV(i)){const s=Object.entries(i);for(let o=0;o{class i{constructor(e){var n=this;this.eelDelegate=e,this._hasUnsavedChanges$=new vt(!1),this.resource$=new vt(null),this.error$=new vt(null),this.customActionRunning$=new vt(!1),this.changedDataBlocks={},this.dataBlockChange$=new Re,this.hideHiddenFields$=new vt(!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=EV(r.schema,"is_recursive_ref",!0);for(const[o,a]of s){const l=o.block_class_mro;let c=r.schema,d=c.block_class_mro===l?c:void 0;for(const h of a.slice(0,a.length-1))!d&&c[h]?.block_class_mro===l&&(d=c[h]),c=c[h];c[a[a.length-1]]=d}this.resource$.next(r),this.error$.next(null)}else this.resource$.next(null),this.error$.next(null)}),this.dataBlockChange$.subscribe(function(){var r=tt(function*([s,o]){n.changedDataBlocks[s]=o,n.updateUnsavedChanges();const a=yield n.eelDelegate.retrieveValue(s);n.changedDataBlocks[s]==o&&((0,cR.isNumber)(o)?Math.abs(o-a)<1e-10:(0,cR.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 tt(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 tt(function*(){return s.processExternalChanges(e,()=>s.eelDelegate.runCustomAction(e,n,r))})()}deserializeResource(e){var n=this;return tt(function*(){return n.processExternalChanges(e,()=>n.eelDelegate.deserializeResource(e))})()}reloadResource(){var e=this;return tt(function*(){const n=e.eelDelegate.openedResourcePath$.getValue();n&&e.eelDelegate.openFile(n,!0).then()})()}saveResource(){var e=this;return tt(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)(ee(Ql))},i.\u0275prov=ke({token:i,factory:i.\u0275fac,providedIn:"root"}),i})();function sJ(i,t){if(1&i){const e=mi();W(0,"div",2)(1,"button",3),Ue("click",function(){return cn(e),Gt(he().action())}),ze(2),Y()()}if(2&i){const e=he();G(2),Zi(" ",e.data.action," ")}}const oJ=["label"];function aJ(i,t){}const lJ=Math.pow(2,31)-1;class dR{constructor(t,e){this._overlayRef=e,this._afterDismissed=new Re,this._afterOpened=new Re,this._onAction=new Re,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,lJ))}_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 AV=new me("MatSnackBarData");class ZM{constructor(){this.politeness="assertive",this.announcementMessage="",this.duration=0,this.data=null,this.horizontalPosition="center",this.verticalPosition="bottom"}}let cJ=(()=>{class i{}return i.\u0275fac=function(e){return new(e||i)},i.\u0275dir=ve({type:i,selectors:[["","matSnackBarLabel",""]],hostAttrs:[1,"mat-mdc-snack-bar-label","mdc-snackbar__label"]}),i})(),dJ=(()=>{class i{}return i.\u0275fac=function(e){return new(e||i)},i.\u0275dir=ve({type:i,selectors:[["","matSnackBarActions",""]],hostAttrs:[1,"mat-mdc-snack-bar-actions","mdc-snackbar__actions"]}),i})(),uJ=(()=>{class i{}return i.\u0275fac=function(e){return new(e||i)},i.\u0275dir=ve({type:i,selectors:[["","matSnackBarAction",""]],hostAttrs:[1,"mat-mdc-snack-bar-action","mdc-snackbar__action"]}),i})(),hJ=(()=>{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)(E(dR),E(AV))},i.\u0275cmp=ot({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&&(W(0,"div",0),ze(1),Y(),fe(2,sJ,3,1,"div",1)),2&e&&(G(1),Zi(" ",n.data.message,"\n"),G(1),U("ngIf",n.hasAction))},dependencies:[vi,qM,cJ,dJ,uJ],styles:[".mat-mdc-simple-snack-bar{display:flex}"],encapsulation:2,changeDetection:0}),i})();const fJ={snackBarState:Ra("state",[Ps("void, hidden",si({transform:"scale(0.8)",opacity:0})),Ps("visible",si({transform:"scale(1)",opacity:1})),Pr("* => visible",jr("150ms cubic-bezier(0, 0, 0.2, 1)")),Pr("* => void, * => hidden",jr("75ms cubic-bezier(0.4, 0.0, 1, 1)",si({opacity:0})))])};let pJ=0,mJ=(()=>{class i extends LM{constructor(e,n,r,s,o){super(),this._ngZone=e,this._elementRef=n,this._changeDetectorRef=r,this._platform=s,this.snackBarConfig=o,this._document=Ot(jt),this._trackedModals=new Set,this._announceDelay=150,this._destroyed=!1,this._onAnnounce=new Re,this._onExit=new Re,this._onEnter=new Re,this._animationState="void",this._liveElementId="mat-snack-bar-container-live-"+pJ++,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(Oi(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)(E(ft),E(mt),E(Zn),E(zi),E(ZM))},i.\u0275dir=ve({type:i,viewQuery:function(e,n){if(1&e&&Wn(Am,7),2&e){let r;St(r=Et())&&(n._portalOutlet=r.first)}},features:[lt]}),i})(),gJ=(()=>{class i extends mJ{_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=ri(i)))(n||i)}}(),i.\u0275cmp=ot({type:i,selectors:[["mat-snack-bar-container"]],viewQuery:function(e,n){if(1&e&&Wn(oJ,7),2&e){let r;St(r=Et())&&(n._label=r.first)}},hostAttrs:[1,"mdc-snackbar","mat-mdc-snack-bar-container","mdc-snackbar--open"],hostVars:1,hostBindings:function(e,n){1&e&&N1("@state.done",function(s){return n.onAnimationEnd(s)}),2&e&&Tw("@state",n._animationState)},features:[lt],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&&(W(0,"div",0)(1,"div",1,2)(3,"div",3),fe(4,aJ,0,0,"ng-template",4),Y(),Te(5,"div"),Y()()),2&e&&(G(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:[fJ.snackBarState]}}),i})(),DV=(()=>{class i{}return i.\u0275fac=function(e){return new(e||i)},i.\u0275mod=nn({type:i}),i.\u0275inj=Kt({imports:[Pm,Lh,Eo,KM,Qn,Qn]}),i})();const TV=new me("mat-snack-bar-default-options",{providedIn:"root",factory:function _J(){return new ZM}});let vJ=(()=>{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=$i.create({parent:n&&n.viewContainerRef&&n.viewContainerRef.injector||this._injector,providers:[{provide:ZM,useValue:n}]}),o=new Fh(this.snackBarContainerComponent,n.viewContainerRef,s),a=e.attach(o);return a.instance.snackBarConfig=n,a.instance}_attach(e,n){const r={...new ZM,...this._defaultConfig,...n},s=this._createOverlay(r),o=this._attachSnackBarContainer(s,r),a=new dR(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 Fh(e,void 0,l),d=o.attachComponentPortal(c);a.instance=d.instance}return this._breakpointObserver.observe("(max-width: 599.98px) and (orientation: portrait)").pipe(He(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 $i.create({parent:e&&e.viewContainerRef&&e.viewContainerRef.injector||this._injector,providers:[{provide:dR,useValue:n},{provide:AV,useValue:e.data}]})}}return i.\u0275fac=function(e){return new(e||i)(ee(as),ee(XI),ee($i),ee(GI),ee(i,12),ee(TV))},i.\u0275prov=ke({token:i,factory:i.\u0275fac}),i})(),IV=(()=>{class i extends vJ{constructor(e,n,r,s,o,a){super(e,n,r,s,o,a),this.simpleSnackBarComponent=hJ,this.snackBarContainerComponent=gJ,this.handsetCssClass="mat-mdc-snack-bar-handset"}}return i.\u0275fac=function(e){return new(e||i)(ee(as),ee(XI),ee($i),ee(GI),ee(i,12),ee(TV))},i.\u0275prov=ke({token:i,factory:i.\u0275fac,providedIn:DV}),i})();const yJ=["*",[["mat-toolbar-row"]]],bJ=["*","mat-toolbar-row"],xJ=Qy(class{constructor(i){this._elementRef=i}});let wJ=(()=>{class i{}return i.\u0275fac=function(e){return new(e||i)},i.\u0275dir=ve({type:i,selectors:[["mat-toolbar-row"]],hostAttrs:[1,"mat-toolbar-row"],exportAs:["matToolbarRow"]}),i})(),MJ=(()=>{class i extends xJ{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)(E(mt),E(zi),E(jt))},i.\u0275cmp=ot({type:i,selectors:[["mat-toolbar"]],contentQueries:function(e,n,r){if(1&e&&Wi(r,wJ,5),2&e){let s;St(s=Et())&&(n._toolbarRows=s)}},hostAttrs:[1,"mat-toolbar"],hostVars:4,hostBindings:function(e,n){2&e&&un("mat-toolbar-multiple-rows",n._toolbarRows.length>0)("mat-toolbar-single-row",0===n._toolbarRows.length)},inputs:{color:"color"},exportAs:["matToolbar"],features:[lt],ngContentSelectors:bJ,decls:2,vars:0,template:function(e,n){1&e&&(sr(yJ),Wt(0),Wt(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})(),CJ=(()=>{class i{}return i.\u0275fac=function(e){return new(e||i)},i.\u0275mod=nn({type:i}),i.\u0275inj=Kt({imports:[Qn,Qn]}),i})(),SJ=(()=>{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=ot({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"),un("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})(),RV=(()=>{class i{}return i.\u0275fac=function(e){return new(e||i)},i.\u0275mod=nn({type:i}),i.\u0275inj=Kt({imports:[Qn,Qn]}),i})();const EJ=["tooltip"],kV=new me("mat-tooltip-scroll-strategy"),TJ={provide:kV,deps:[as],useFactory:function DJ(i){return()=>i.scrollStrategies.reposition({scrollThrottle:20})}},RJ=new me("mat-tooltip-default-options",{providedIn:"root",factory:function IJ(){return{showDelay:0,hideDelay:0,touchendHideDelay:1500}}}),PV="tooltip-panel",OV=Ph({passive:!0});let NJ=(()=>{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=ks(e)}get hideDelay(){return this._hideDelay}set hideDelay(e){this._hideDelay=ks(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,d,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 Re,this._scrollStrategy=d,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(He(this._destroyed)).subscribe(()=>{this._overlayRef&&this._updatePosition(this._overlayRef)})}ngAfterViewInit(){this._viewInitialized=!0,this._setupPointerEnterEventsIfNeeded(),this._focusMonitor.monitor(this._elementRef).pipe(He(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,OV)}),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 Fh(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(He(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 mt)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(He(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}-${PV}`,scrollStrategy:this._scrollStrategy()}),this._updatePosition(this._overlayRef),this._overlayRef.detachments().pipe(He(this._destroyed)).subscribe(()=>this._detach()),this._overlayRef.outsidePointerEvents().pipe(He(this._destroyed)).subscribe(()=>this._tooltipInstance?._handleBodyInteraction()),this._overlayRef.keydownEvents().pipe(He(this._destroyed)).subscribe(s=>{this._isTooltipVisible()&&27===s.keyCode&&!Xo(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(Oi(1),He(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}-${PV}-`;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,OV)})}_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){xo()},i.\u0275dir=ve({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})(),Os=(()=>{class i extends NJ{constructor(e,n,r,s,o,a,l,c,d,h,p,m){super(e,n,r,s,o,a,l,c,d,h,p,m),this._tooltipComponent=UJ,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)(E(as),E(mt),E(qy),E(Wr),E(ft),E(zi),E(zZ),E(Yc),E(kV),E(Ia,8),E(RJ,8),E(jt))},i.\u0275dir=ve({type:i,selectors:[["","matTooltip",""]],hostAttrs:[1,"mat-mdc-tooltip-trigger"],exportAs:["matTooltip"],features:[lt]}),i})(),BJ=(()=>{class i{constructor(e,n){this._changeDetectorRef=e,this._closeOnInteraction=!1,this._isVisible=!1,this._onHide=new Re,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)(E(Zn),E(Rr,8))},i.\u0275dir=ve({type:i}),i})(),UJ=(()=>{class i extends BJ{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)(E(Zn),E(mt),E(Rr,8))},i.\u0275cmp=ot({type:i,selectors:[["mat-tooltip-component"]],viewQuery:function(e,n){if(1&e&&Wn(EJ,7),2&e){let r;St(r=Et())&&(n._tooltip=r.first)}},hostAttrs:["aria-hidden","true"],hostVars:2,hostBindings:function(e,n){1&e&&Ue("mouseleave",function(s){return n._handleMouseLeave(s)}),2&e&&jo("zoom",n.isVisible()?1:null)},features:[lt],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&&(W(0,"div",0,1),Ue("animationend",function(s){return n._handleAnimationEnd(s)}),W(2,"div",2),ze(3),Y()()),2&e&&(un("mdc-tooltip--multiline",n._isMultiline),U("ngClass",n.tooltipClass),G(3),_i(n.message))},dependencies:[hm],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})(),FV=(()=>{class i{}return i.\u0275fac=function(e){return new(e||i)},i.\u0275mod=nn({type:i}),i.\u0275inj=Kt({providers:[TJ],imports:[BU,Eo,Pm,Qn,Qn,Xy]}),i})();function LV(...i){const t=x0(i),{args:e,keys:n}=VB(i),r=new In(s=>{const{length:o}=e;if(!o)return void s.complete();const a=new Array(o);let l=o,c=o;for(let d=0;d{h||(h=!0,c--),a[d]=p},()=>l--,void 0,()=>{(!l||!h)&&(c||s.next(n?zB(n,a):a),s.complete())}))}});return t?r.pipe(JT(t)):r}class uR{}class uu{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 uu?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 uu;return e.lazyInit=this.lazyInit&&this.lazyInit instanceof uu?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 VJ{encodeKey(t){return BV(t)}encodeValue(t){return BV(t)}decodeKey(t){return decodeURIComponent(t)}decodeValue(t){return decodeURIComponent(t)}}const HJ=/%(\d[a-f0-9])/gi,GJ={40:"@","3A":":",24:"$","2C":",","3B":";","3D":"=","3F":"?","2F":"/"};function BV(i){return encodeURIComponent(i).replace(HJ,(t,e)=>GJ[e]??t)}function QM(i){return`${i}`}class hu{constructor(t={}){if(this.updates=null,this.cloneFrom=null,this.encoder=t.encoder||new VJ,t.fromString){if(t.fromObject)throw new Error("Cannot specify both fromString and fromObject.");this.map=function zJ(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 hu({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 $J{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 UV(i){return typeof ArrayBuffer<"u"&&i instanceof ArrayBuffer}function VV(i){return typeof Blob<"u"&&i instanceof Blob}function zV(i){return typeof FormData<"u"&&i instanceof FormData}class ib{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 WJ(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 uu),this.context||(this.context=new $J),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 ib(e,n,s,{params:c,headers:l,context:d,reportProgress:a,responseType:r,withCredentials:o})}}var ls=(()=>((ls=ls||{})[ls.Sent=0]="Sent",ls[ls.UploadProgress=1]="UploadProgress",ls[ls.ResponseHeader=2]="ResponseHeader",ls[ls.DownloadProgress=3]="DownloadProgress",ls[ls.Response=4]="Response",ls[ls.User=5]="User",ls))();class YJ{constructor(t,e=200,n="OK"){this.headers=t.headers||new uu,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 hR extends YJ{constructor(t={}){super(t),this.type=ls.Response,this.body=void 0!==t.body?t.body:null}clone(t={}){return new hR({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 fR(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 pR=(()=>{class i{constructor(e){this.handler=e}request(e,n,r={}){let s;if(e instanceof ib)s=e;else{let l,c;l=r.headers instanceof uu?r.headers:new uu(r.headers),r.params&&(c=r.params instanceof hu?r.params:new hu({fromObject:r.params})),s=new ib(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=ht(s).pipe(ru(l=>this.handler.handle(l)));if(e instanceof ib||"events"===r.observe)return o;const a=o.pipe(gn(l=>l instanceof hR));switch(r.observe||"body"){case"body":switch(s.responseType){case"arraybuffer":return a.pipe(et(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(et(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(et(l=>{if(null!==l.body&&"string"!=typeof l.body)throw new Error("Response is not a string.");return l.body}));default:return a.pipe(et(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 hu).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,fR(r,n))}post(e,n,r={}){return this.request("POST",e,fR(r,n))}put(e,n,r={}){return this.request("PUT",e,fR(r,n))}}return i.\u0275fac=function(e){return new(e||i)(ee(uR))},i.\u0275prov=ke({token:i,factory:i.\u0275fac}),i})();const oee=["*"];let eC;function rb(i){return function aee(){if(void 0===eC&&(eC=null,typeof window<"u")){const i=window;void 0!==i.trustedTypes&&(eC=i.trustedTypes.createPolicy("angular#components",{createHTML:t=>t}))}return eC}()?.createHTML(i)||i}function XV(i){return Error(`Unable to find icon with the name "${i}"`)}function KV(i){return Error(`The URL provided to MatIconRegistry was not trusted as a resource URL via Angular's DomSanitizer. Attempted URL was "${i}".`)}function ZV(i){return Error(`The literal provided to MatIconRegistry was not trusted as safe HTML by Angular's DomSanitizer. Attempted literal was "${i}".`)}class Uh{constructor(t,e,n){this.url=t,this.svgText=e,this.options=n}}let tC=(()=>{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 Uh(r,null,s))}addSvgIconResolver(e){return this._resolvers.push(e),this}addSvgIconLiteralInNamespace(e,n,r,s){const o=this._sanitizer.sanitize(Kn.HTML,r);if(!o)throw ZV(r);const a=rb(o);return this._addSvgIconConfig(e,n,new Uh("",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 Uh(n,null,r))}addSvgIconSetLiteralInNamespace(e,n,r){const s=this._sanitizer.sanitize(Kn.HTML,n);if(!s)throw ZV(n);const o=rb(s);return this._addSvgIconSetConfig(e,new Uh("",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(Kn.RESOURCE_URL,e);if(!n)throw KV(e);const r=this._cachedIconsByUrl.get(n);return r?ht(nC(r)):this._loadSvgIconFromConfig(new Uh(e,null)).pipe(Vi(s=>this._cachedIconsByUrl.set(n,s)),et(s=>nC(s)))}getNamedSvgIcon(e,n=""){const r=QV(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(XV(r))}ngOnDestroy(){this._resolvers=[],this._svgIconConfigs.clear(),this._iconSetConfigs.clear(),this._cachedIconsByUrl.clear()}_getSvgFromConfig(e){return e.svgText?ht(nC(this._svgElementFromConfig(e))):this._loadSvgIconFromConfig(e).pipe(et(n=>nC(n)))}_getSvgFromIconSetConfigs(e,n){const r=this._extractIconWithNameFromAnySet(e,n);return r?ht(r):LV(n.filter(o=>!o.svgText).map(o=>this._loadSvgIconSetFromConfig(o).pipe($c(a=>{const c=`Loading icon set URL: ${this._sanitizer.sanitize(Kn.RESOURCE_URL,o.url)} failed: ${a.message}`;return this._errorHandler.handleError(new Error(c)),ht(null)})))).pipe(et(()=>{const o=this._extractIconWithNameFromAnySet(e,n);if(!o)throw XV(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(Vi(n=>e.svgText=n),et(()=>this._svgElementFromConfig(e)))}_loadSvgIconSetFromConfig(e){return e.svgText?ht(null):this._fetchIcon(e).pipe(Vi(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(rb(""));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(rb("")),r=e.attributes;for(let s=0;srb(c)),su(()=>this._inProgressUrlFetches.delete(o)),Uf());return this._inProgressUrlFetches.set(o,l),l}_addSvgIconConfig(e,n,r){return this._svgIconConfigs.set(QV(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:""}}}),JV=["clip-path","color-profile","src","cursor","fill","filter","marker","marker-start","marker-mid","marker-end","mask","stroke"],mee=JV.map(i=>`[${i}]`).join(", "),gee=/^url\(['"]?#(.*?)['"]?\)$/;let gR=(()=>{class i extends uee{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=Zt.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(mee),r=this._elementsWithExternalReferences=this._elementsWithExternalReferences||new Map;for(let s=0;s{const a=n[s],l=a.getAttribute(o),c=l?l.match(gee):null;if(c){let d=r.get(a);d||(d=[],r.set(a,d)),d.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(Oi(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)(E(mt),E(tC),ya("aria-hidden"),E(fee),E(al),E(hee,8))},i.\u0275cmp=ot({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),un("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:[lt],ngContentSelectors:oee,decls:1,vars:0,template:function(e,n){1&e&&(sr(),Wt(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})(),ez=(()=>{class i{}return i.\u0275fac=function(e){return new(e||i)},i.\u0275mod=nn({type:i}),i.\u0275inj=Kt({imports:[Qn,Qn]}),i})(),tz=(()=>{class i{constructor(e){this.viewContainerRef=e}}return i.\u0275fac=function(e){return new(e||i)(E(Wr))},i.\u0275dir=ve({type:i,selectors:[["","dataBlockUI",""]]}),i})(),_ee=(()=>{class i{constructor(){this.resource=null,this.name="",this.resourceDescription="",this.changed=new We}}return i.\u0275fac=function(e){return new(e||i)},i.\u0275cmp=ot({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&&(W(0,"p",0),ze(1),Y()),2&e&&(U("matTooltip",n.resourceDescription),G(1),tm("",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:[Os],changeDetection:0}),i})();function vee(i,t){if(1&i&&(W(0,"h2",4),ze(1),Y()),2&i){const e=he();U("matTooltip",e.resourceDescription),G(1),_i(e.name)}}function yee(i,t){1&i&&Te(0,"app-block-actions",5),2&i&&U("resource",he().resource)}const bee=function(i,t,e,n){return{id:i,name:t,data:e,schema:n}};function xee(i,t){if(1&i&&Te(0,"app-editor",7),2&i){const e=he().$implicit,n=he();U("resource",L2(3,bee,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 wee(i,t){if(1&i&&(Gr(0),fe(1,xee,1,8,"app-editor",6),Dt(2,"async"),$r()),2&i){const e=t.$implicit,n=he();G(1),U("ngIf",!(Lt(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 Jl=(()=>{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 We,this.destroyed$=new Re}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(He(this.destroyed$),gn(([n,r])=>!!this.resource&&n.startsWith(this.resource.id)&&!n.substring(this.resource.id.length+1).includes("/"))).subscribe(function(){var n=tt(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)(E(ka))},i.\u0275cmp=ot({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&&(fe(0,vee,2,2,"h2",0),Dt(1,"async"),fe(2,yee,1,1,"app-block-actions",1),W(3,"div",2),fe(4,wee,3,3,"ng-container",3),Y()),2&e){let r;U("ngIf",n.name&&n.name!=(null==(r=Lt(1,4,n.main.resource$))?null:r.name)),G(2),U("ngIf",!n.hideBlockActions),G(2),U("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})(),nz=(()=>{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)(E(ol),E(mt))},i.\u0275dir=ve({type:i}),i})(),Vh=(()=>{class i extends nz{}return i.\u0275fac=function(){let t;return function(n){return(t||(t=ri(i)))(n||i)}}(),i.\u0275dir=ve({type:i,features:[lt]}),i})();const Do=new me("NgValueAccessor"),Cee={provide:Do,useExisting:Gn(()=>gl),multi:!0},Eee=new me("CompositionEventMode");let gl=(()=>{class i extends nz{constructor(e,n,r){super(e,n),this._compositionMode=r,this._composing=!1,null==this._compositionMode&&(this._compositionMode=!function See(){const i=zc()?zc().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)(E(ol),E(mt),E(Eee,8))},i.\u0275dir=ve({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&&Ue("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:[Dn([Cee]),lt]}),i})();const Aee=!1;function fu(i){return null==i||("string"==typeof i||Array.isArray(i))&&0===i.length}function rz(i){return null!=i&&"number"==typeof i.length}const Yr=new me("NgValidators"),pu=new me("NgAsyncValidators"),Dee=/^(?=.{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 _l{static min(t){return sz(t)}static max(t){return oz(t)}static required(t){return function az(i){return fu(i.value)?{required:!0}:null}(t)}static requiredTrue(t){return function lz(i){return!0===i.value?null:{required:!0}}(t)}static email(t){return function cz(i){return fu(i.value)||Dee.test(i.value)?null:{email:!0}}(t)}static minLength(t){return dz(t)}static maxLength(t){return uz(t)}static pattern(t){return function hz(i){if(!i)return iC;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(fu(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 vz(t)}static composeAsync(t){return yz(t)}}function sz(i){return t=>{if(fu(t.value)||fu(i))return null;const e=parseFloat(t.value);return!isNaN(e)&&e{if(fu(t.value)||fu(i))return null;const e=parseFloat(t.value);return!isNaN(e)&&e>i?{max:{max:i,actual:t.value}}:null}}function dz(i){return t=>fu(t.value)||!rz(t.value)?null:t.value.lengthrz(t.value)&&t.value.length>i?{maxlength:{requiredLength:i,actualLength:t.value.length}}:null}function iC(i){return null}function fz(i){return null!=i}function pz(i){const t=oy(i)?Ni(i):i;if(Aee&&!L1(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 pe(-1101,e)}return t}function mz(i){let t={};return i.forEach(e=>{t=null!=e?{...t,...e}:t}),0===Object.keys(t).length?null:t}function gz(i,t){return t.map(e=>e(i))}function _z(i){return i.map(t=>function Tee(i){return!i.validate}(t)?t:e=>t.validate(e))}function vz(i){if(!i)return null;const t=i.filter(fz);return 0==t.length?null:function(e){return mz(gz(e,t))}}function _R(i){return null!=i?vz(_z(i)):null}function yz(i){if(!i)return null;const t=i.filter(fz);return 0==t.length?null:function(e){return LV(gz(e,t).map(pz)).pipe(et(mz))}}function vR(i){return null!=i?yz(_z(i)):null}function bz(i,t){return null===i?[t]:Array.isArray(i)?[...i,t]:[i,t]}function xz(i){return i._rawValidators}function wz(i){return i._rawAsyncValidators}function yR(i){return i?Array.isArray(i)?i:[i]:[]}function rC(i,t){return Array.isArray(i)?i.includes(t):i===t}function Mz(i,t){const e=yR(t);return yR(i).forEach(r=>{rC(e,r)||e.push(r)}),e}function Cz(i,t){return yR(t).filter(e=>!rC(i,e))}class Sz{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=_R(this._rawValidators)}_setAsyncValidators(t){this._rawAsyncValidators=t||[],this._composedAsyncValidatorFn=vR(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 ao extends Sz{get formDirective(){return null}get path(){return null}}class ec extends Sz{constructor(){super(...arguments),this._parent=null,this.name=null,this.valueAccessor=null}}class Ez{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 tc=(()=>{class i extends Ez{constructor(e){super(e)}}return i.\u0275fac=function(e){return new(e||i)(E(ec,2))},i.\u0275dir=ve({type:i,selectors:[["","formControlName",""],["","ngModel",""],["","formControl",""]],hostVars:14,hostBindings:function(e,n){2&e&&un("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:[lt]}),i})(),bR=(()=>{class i extends Ez{constructor(e){super(e)}}return i.\u0275fac=function(e){return new(e||i)(E(ao,10))},i.\u0275dir=ve({type:i,selectors:[["","formGroupName",""],["","formArrayName",""],["","ngModelGroup",""],["","formGroup",""],["form",3,"ngNoForm",""],["","ngForm",""]],hostVars:16,hostBindings:function(e,n){2&e&&un("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:[lt]}),i})();function Az(i,t){return i?`with name: '${t}'`:`at index: ${t}`}const MR=!1,sb="VALID",oC="INVALID",zm="PENDING",ob="DISABLED";function CR(i){return(aC(i)?i.validators:i)||null}function SR(i,t){return(aC(t)?t.asyncValidators:i)||null}function aC(i){return null!=i&&!Array.isArray(i)&&"object"==typeof i}function Dz(i,t,e){const n=i.controls;if(!(t?Object.keys(n):n).length)throw new pe(1e3,MR?function Pee(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 pe(1001,MR?function Oee(i,t){return`Cannot find form control ${Az(i,t)}`}(t,e):"")}function Tz(i,t,e){i._forEachChild((n,r)=>{if(void 0===e[r])throw new pe(1002,MR?function Fee(i,t){return`Must supply a value for form control ${Az(i,t)}`}(t,r):"")})}class lC{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===sb}get invalid(){return this.status===oC}get pending(){return this.status==zm}get disabled(){return this.status===ob}get enabled(){return this.status!==ob}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(Mz(t,this._rawValidators))}addAsyncValidators(t){this.setAsyncValidators(Mz(t,this._rawAsyncValidators))}removeValidators(t){this.setValidators(Cz(t,this._rawValidators))}removeAsyncValidators(t){this.setAsyncValidators(Cz(t,this._rawAsyncValidators))}hasValidator(t){return rC(this._rawValidators,t)}hasAsyncValidator(t){return rC(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=ob,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=sb,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===sb||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()?ob:sb}_runValidator(){return this.validator?this.validator(this):null}_runAsyncValidator(t){if(this.asyncValidator){this.status=zm,this._hasOwnPendingAsyncValidator=!0;const e=pz(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 We,this.statusChanges=new We}_calculateStatus(){return this._allControlsDisabled()?ob:this.errors?oC:this._hasOwnPendingAsyncValidator||this._anyControlsHaveStatus(zm)?zm:this._anyControlsHaveStatus(oC)?oC:sb}_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){aC(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 Lee(i){return Array.isArray(i)?_R(i):i||null}(this._rawValidators)}_assignAsyncValidators(t){this._rawAsyncValidators=Array.isArray(t)?t.slice():t,this._composedAsyncValidatorFn=function Nee(i){return Array.isArray(i)?vR(i):i||null}(this._rawAsyncValidators)}}class Hm extends lC{constructor(t,e,n){super(CR(e),SR(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={}){Tz(this,!0,t),Object.keys(t).forEach(n=>{Dz(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 Iz extends Hm{}const zh=new me("CallSetDisabledState",{providedIn:"root",factory:()=>ab}),ab="always";function cC(i,t){return[...t.path,i]}function lb(i,t,e=ab){ER(i,t),t.valueAccessor.writeValue(i.value),(i.disabled||"always"===e)&&t.valueAccessor.setDisabledState?.(i.disabled),function Uee(i,t){t.valueAccessor.registerOnChange(e=>{i._pendingValue=e,i._pendingChange=!0,i._pendingDirty=!0,"change"===i.updateOn&&Rz(i,t)})}(i,t),function zee(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 Vee(i,t){t.valueAccessor.registerOnTouched(()=>{i._pendingTouched=!0,"blur"===i.updateOn&&i._pendingChange&&Rz(i,t),"submit"!==i.updateOn&&i.markAsTouched()})}(i,t),function Bee(i,t){if(t.valueAccessor.setDisabledState){const e=n=>{t.valueAccessor.setDisabledState(n)};i.registerOnDisabledChange(e),t._registerOnDestroy(()=>{i._unregisterOnDisabledChange(e)})}}(i,t)}function dC(i,t,e=!0){const n=()=>{};t.valueAccessor&&(t.valueAccessor.registerOnChange(n),t.valueAccessor.registerOnTouched(n)),hC(i,t),i&&(t._invokeOnDestroyCallbacks(),i._registerOnCollectionChange(()=>{}))}function uC(i,t){i.forEach(e=>{e.registerOnValidatorChange&&e.registerOnValidatorChange(t)})}function ER(i,t){const e=xz(i);null!==t.validator?i.setValidators(bz(e,t.validator)):"function"==typeof e&&i.setValidators([e]);const n=wz(i);null!==t.asyncValidator?i.setAsyncValidators(bz(n,t.asyncValidator)):"function"==typeof n&&i.setAsyncValidators([n]);const r=()=>i.updateValueAndValidity();uC(t._rawValidators,r),uC(t._rawAsyncValidators,r)}function hC(i,t){let e=!1;if(null!==i){if(null!==t.validator){const r=xz(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=wz(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 uC(t._rawValidators,n),uC(t._rawAsyncValidators,n),e}function Rz(i,t){i._pendingDirty&&i.markAsDirty(),i.setValue(i._pendingValue,{emitModelToViewChange:!1}),t.viewToModelUpdate(i._pendingValue),i._pendingChange=!1}function kz(i,t){ER(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 Pz(i,t){i._syncPendingControls(),t.forEach(e=>{const n=e.control;"submit"===n.updateOn&&n._pendingChange&&(e.viewToModelUpdate(n._pendingValue),n._pendingChange=!1)})}function TR(i,t){if(!t)return null;let e,n,r;return Array.isArray(t),t.forEach(s=>{s.constructor===gl?e=s:function $ee(i){return Object.getPrototypeOf(i.constructor)===Vh}(s)?n=s:r=s}),r||n||e||null}const jee={provide:ao,useExisting:Gn(()=>db)},cb=(()=>Promise.resolve())();let db=(()=>{class i extends ao{constructor(e,n,r){super(),this.callSetDisabledState=r,this.submitted=!1,this._directives=new Set,this.ngSubmit=new We,this.form=new Hm({},_R(e),vR(n))}ngAfterViewInit(){this._setUpdateStrategy()}get formDirective(){return this}get control(){return this.form}get path(){return[]}get controls(){return this.form.controls}addControl(e){cb.then(()=>{const n=this._findContainer(e.path);e.control=n.registerControl(e.name,e.control),lb(e.control,e,this.callSetDisabledState),e.control.updateValueAndValidity({emitEvent:!1}),this._directives.add(e)})}getControl(e){return this.form.get(e.path)}removeControl(e){cb.then(()=>{const n=this._findContainer(e.path);n&&n.removeControl(e.name),this._directives.delete(e)})}addFormGroup(e){cb.then(()=>{const n=this._findContainer(e.path),r=new Hm({});kz(r,e),n.registerControl(e.name,r),r.updateValueAndValidity({emitEvent:!1})})}removeFormGroup(e){cb.then(()=>{const n=this._findContainer(e.path);n&&n.removeControl(e.name)})}getFormGroup(e){return this.form.get(e.path)}updateModel(e,n){cb.then(()=>{this.form.get(e.path).setValue(n)})}setValue(e){this.control.setValue(e)}onSubmit(e){return this.submitted=!0,Pz(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)(E(Yr,10),E(pu,10),E(zh,8))},i.\u0275dir=ve({type:i,selectors:[["form",3,"ngNoForm","",3,"formGroup",""],["ng-form"],["","ngForm",""]],hostBindings:function(e,n){1&e&&Ue("submit",function(s){return n.onSubmit(s)})("reset",function(){return n.onReset()})},inputs:{options:["ngFormOptions","options"]},outputs:{ngSubmit:"ngSubmit"},exportAs:["ngForm"],features:[Dn([jee]),lt]}),i})();function Oz(i,t){const e=i.indexOf(t);e>-1&&i.splice(e,1)}function Fz(i){return"object"==typeof i&&null!==i&&2===Object.keys(i).length&&"value"in i&&"disabled"in i}const nc=class extends lC{constructor(t=null,e,n){super(CR(e),SR(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}),aC(e)&&(e.nonNullable||e.initialValueIsDefault)&&(this.defaultValue=Fz(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){Oz(this._onChange,t)}registerOnDisabledChange(t){this._onDisabledChange.push(t)}_unregisterOnDisabledChange(t){Oz(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){Fz(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}},Xee={provide:ec,useExisting:Gn(()=>Xc)},Bz=(()=>Promise.resolve())();let Xc=(()=>{class i extends ec{constructor(e,n,r,s,o,a){super(),this._changeDetectorRef=o,this.callSetDisabledState=a,this.control=new nc,this._registered=!1,this.update=new We,this._parent=e,this._setValidators(n),this._setAsyncValidators(r),this.valueAccessor=TR(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(){lb(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){Bz.then(()=>{this.control.setValue(e,{emitViewToModelChange:!1}),this._changeDetectorRef?.markForCheck()})}_updateDisabled(e){const n=e.isDisabled.currentValue,r=0!==n&&function um(i){return"boolean"==typeof i?i:null!=i&&"false"!==i}(n);Bz.then(()=>{r&&!this.control.disabled?this.control.disable():!r&&this.control.disabled&&this.control.enable(),this._changeDetectorRef?.markForCheck()})}_getPath(e){return this._parent?cC(e,this._parent):[e]}}return i.\u0275fac=function(e){return new(e||i)(E(ao,9),E(Yr,10),E(pu,10),E(Do,10),E(Zn,8),E(zh,8))},i.\u0275dir=ve({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:[Dn([Xee]),lt,bi]}),i})(),IR=(()=>{class i{}return i.\u0275fac=function(e){return new(e||i)},i.\u0275dir=ve({type:i,selectors:[["form",3,"ngNoForm","",3,"ngNativeValidate",""]],hostAttrs:["novalidate",""]}),i})();const Kee={provide:Do,useExisting:Gn(()=>mu),multi:!0};let mu=(()=>{class i extends Vh{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=ri(i)))(n||i)}}(),i.\u0275dir=ve({type:i,selectors:[["input","type","number","formControlName",""],["input","type","number","formControl",""],["input","type","number","ngModel",""]],hostBindings:function(e,n){1&e&&Ue("input",function(s){return n.onChange(s.target.value)})("blur",function(){return n.onTouched()})},features:[Dn([Kee]),lt]}),i})(),Uz=(()=>{class i{}return i.\u0275fac=function(e){return new(e||i)},i.\u0275mod=nn({type:i}),i.\u0275inj=Kt({}),i})();const RR=new me("NgModelWithFormControlWarning"),tte={provide:ao,useExisting:Gn(()=>Hh)};let Hh=(()=>{class i extends ao{constructor(e,n,r){super(),this.callSetDisabledState=r,this.submitted=!1,this._onCollectionChange=()=>this._updateDomValue(),this.directives=[],this.form=null,this.ngSubmit=new We,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&&(hC(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 lb(n,e,this.callSetDisabledState),n.updateValueAndValidity({emitEvent:!1}),this.directives.push(e),n}getControl(e){return this.form.get(e.path)}removeControl(e){dC(e.control||null,e,!1),function Wee(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,Pz(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&&(dC(n||null,e),(i=>i instanceof nc)(r)&&(lb(r,e,this.callSetDisabledState),e.control=r))}),this.form._updateTreeValidity({emitEvent:!1})}_setUpFormContainer(e){const n=this.form.get(e.path);kz(n,e),n.updateValueAndValidity({emitEvent:!1})}_cleanUpFormContainer(e){if(this.form){const n=this.form.get(e.path);n&&function Hee(i,t){return hC(i,t)}(n,e)&&n.updateValueAndValidity({emitEvent:!1})}}_updateRegistrations(){this.form._registerOnCollectionChange(this._onCollectionChange),this._oldForm&&this._oldForm._registerOnCollectionChange(()=>{})}_updateValidators(){ER(this.form,this),this._oldForm&&hC(this._oldForm,this)}_checkFormPresent(){}}return i.\u0275fac=function(e){return new(e||i)(E(Yr,10),E(pu,10),E(zh,8))},i.\u0275dir=ve({type:i,selectors:[["","formGroup",""]],hostBindings:function(e,n){1&e&&Ue("submit",function(s){return n.onSubmit(s)})("reset",function(){return n.onReset()})},inputs:{form:["formGroup","form"]},outputs:{ngSubmit:"ngSubmit"},exportAs:["ngForm"],features:[Dn([tte]),lt,bi]}),i})();const rte={provide:ec,useExisting:Gn(()=>fC)};let fC=(()=>{class i extends ec{set isDisabled(e){}constructor(e,n,r,s,o){super(),this._ngModelWarningConfig=o,this._added=!1,this.update=new We,this._ngModelWarningSent=!1,this._parent=e,this._setValidators(n),this._setAsyncValidators(r),this.valueAccessor=TR(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 cC(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)(E(ao,13),E(Yr,10),E(pu,10),E(Do,10),E(RR,8))},i.\u0275dir=ve({type:i,selectors:[["","formControlName",""]],inputs:{name:["formControlName","name"],isDisabled:["disabled","isDisabled"],model:["ngModel","model"]},outputs:{update:"ngModelChange"},features:[Dn([rte]),lt,bi]}),i})();function jz(i){return"number"==typeof i?i:parseInt(i,10)}function Yz(i){return"number"==typeof i?i:parseFloat(i)}let Gh=(()=>{class i{constructor(){this._validator=iC}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):iC,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=ve({type:i,features:[bi]}),i})();const ute={provide:Yr,useExisting:Gn(()=>gu),multi:!0};let gu=(()=>{class i extends Gh{constructor(){super(...arguments),this.inputName="max",this.normalizeInput=e=>Yz(e),this.createValidator=e=>oz(e)}}return i.\u0275fac=function(){let t;return function(n){return(t||(t=ri(i)))(n||i)}}(),i.\u0275dir=ve({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:[Dn([ute]),lt]}),i})();const hte={provide:Yr,useExisting:Gn(()=>_u),multi:!0};let _u=(()=>{class i extends Gh{constructor(){super(...arguments),this.inputName="min",this.normalizeInput=e=>Yz(e),this.createValidator=e=>sz(e)}}return i.\u0275fac=function(){let t;return function(n){return(t||(t=ri(i)))(n||i)}}(),i.\u0275dir=ve({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:[Dn([hte]),lt]}),i})();const gte={provide:Yr,useExisting:Gn(()=>NR),multi:!0};let NR=(()=>{class i extends Gh{constructor(){super(...arguments),this.inputName="minlength",this.normalizeInput=e=>jz(e),this.createValidator=e=>dz(e)}}return i.\u0275fac=function(){let t;return function(n){return(t||(t=ri(i)))(n||i)}}(),i.\u0275dir=ve({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:[Dn([gte]),lt]}),i})();const _te={provide:Yr,useExisting:Gn(()=>BR),multi:!0};let BR=(()=>{class i extends Gh{constructor(){super(...arguments),this.inputName="maxlength",this.normalizeInput=e=>jz(e),this.createValidator=e=>uz(e)}}return i.\u0275fac=function(){let t;return function(n){return(t||(t=ri(i)))(n||i)}}(),i.\u0275dir=ve({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:[Dn([_te]),lt]}),i})(),Zz=(()=>{class i{}return i.\u0275fac=function(e){return new(e||i)},i.\u0275mod=nn({type:i}),i.\u0275inj=Kt({imports:[Uz]}),i})();class Qz extends lC{constructor(t,e,n){super(CR(e),SR(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={}){Tz(this,!1,t),t.forEach((n,r)=>{Dz(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 Jz(i){return!!i&&(void 0!==i.asyncValidators||void 0!==i.validators||void 0!==i.updateOn)}let yte=(()=>{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 Jz(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 Iz(r,n)}control(e,n,r){let s={};return this.useNonNullable?(Jz(n)?s=n:(s.validators=n,s.asyncValidators=r),new nc(e,{...s,nonNullable:!0})):new nc(e,n,r)}array(e,n,r){const s=e.map(o=>this._createControl(o));return new Qz(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 nc||e instanceof lC?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=ke({token:i,factory:i.\u0275fac,providedIn:"root"}),i})(),eH=(()=>{class i{static withConfig(e){return{ngModule:i,providers:[{provide:zh,useValue:e.callSetDisabledState??ab}]}}}return i.\u0275fac=function(e){return new(e||i)},i.\u0275mod=nn({type:i}),i.\u0275inj=Kt({imports:[Zz]}),i})(),tH=(()=>{class i{static withConfig(e){return{ngModule:i,providers:[{provide:RR,useValue:e.warnOnNgModelWithFormControl??"always"},{provide:zh,useValue:e.callSetDisabledState??ab}]}}}return i.\u0275fac=function(e){return new(e||i)},i.\u0275mod=nn({type:i}),i.\u0275inj=Kt({imports:[Zz]}),i})();const bte=["matFormFieldNotchedOutline",""],xte=["*"],wte=["textField"],Mte=["iconPrefixContainer"],Cte=["textPrefixContainer"];function Ste(i,t){1&i&&Te(0,"span",19)}function Ete(i,t){if(1&i){const e=mi();W(0,"label",17),Ue("cdkObserveContent",function(){return cn(e),Gt(he(2)._refreshOutlineNotchWidth())}),Wt(1,1),fe(2,Ste,1,0,"span",18),Y()}if(2&i){const e=he(2);U("floating",e._shouldLabelFloat())("cdkObserveContentDisabled",!e._hasOutline())("id",e._labelId),At("for",e._control.id)("aria-owns",e._control.id),G(2),U("ngIf",!e.hideRequiredMarker&&e._control.required)}}function Ate(i,t){1&i&&fe(0,Ete,3,6,"label",16),2&i&&U("ngIf",he()._hasFloatingLabel())}function Dte(i,t){1&i&&Te(0,"div",20)}function Tte(i,t){}function Ite(i,t){1&i&&fe(0,Tte,0,0,"ng-template",22),2&i&&(he(2),U("ngTemplateOutlet",rr(1)))}function Rte(i,t){if(1&i&&(W(0,"div",21),fe(1,Ite,1,1,"ng-template",9),Y()),2&i){const e=he();U("matFormFieldNotchedOutlineOpen",e._shouldLabelFloat())("matFormFieldNotchedOutlineLabelWidth",e._labelWidth),G(1),U("ngIf",!e._forceDisplayInfixLabel())}}function kte(i,t){1&i&&(W(0,"div",23,24),Wt(2,2),Y())}function Pte(i,t){1&i&&(W(0,"div",25,26),Wt(2,3),Y())}function Ote(i,t){}function Fte(i,t){1&i&&fe(0,Ote,0,0,"ng-template",22),2&i&&(he(),U("ngTemplateOutlet",rr(1)))}function Lte(i,t){1&i&&(W(0,"div",27),Wt(1,4),Y())}function Nte(i,t){1&i&&(W(0,"div",28),Wt(1,5),Y())}function Bte(i,t){1&i&&Te(0,"div",29)}function Ute(i,t){1&i&&(W(0,"div",30),Wt(1,6),Y()),2&i&&U("@transitionMessages",he()._subscriptAnimationState)}function Vte(i,t){if(1&i&&(W(0,"mat-hint",34),ze(1),Y()),2&i){const e=he(2);U("id",e._hintLabelId),G(1),_i(e.hintLabel)}}function zte(i,t){if(1&i&&(W(0,"div",31),fe(1,Vte,2,2,"mat-hint",32),Wt(2,7),Te(3,"div",33),Wt(4,8),Y()),2&i){const e=he();U("@transitionMessages",e._subscriptAnimationState),G(1),U("ngIf",e.hintLabel)}}const Hte=["*",[["mat-label"]],[["","matPrefix",""],["","matIconPrefix",""]],[["","matTextPrefix",""]],[["","matTextSuffix",""]],[["","matSuffix",""],["","matIconSuffix",""]],[["mat-error"],["","matError",""]],[["mat-hint",3,"align","end"]],[["mat-hint","align","end"]]],Gte=["*","mat-label","[matPrefix], [matIconPrefix]","[matTextPrefix]","[matTextSuffix]","[matSuffix], [matIconSuffix]","mat-error, [matError]","mat-hint:not([align='end'])","mat-hint[align='end']"];let To=(()=>{class i{}return i.\u0275fac=function(e){return new(e||i)},i.\u0275dir=ve({type:i,selectors:[["mat-label"]]}),i})(),$te=0;const nH=new me("MatError");let Wte=(()=>{class i{constructor(e,n){this.id="mat-mdc-error-"+$te++,e||n.nativeElement.setAttribute("aria-live","polite")}}return i.\u0275fac=function(e){return new(e||i)(ya("aria-live"),E(mt))},i.\u0275dir=ve({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&&Yl("id",n.id)},inputs:{id:"id"},features:[Dn([{provide:nH,useExisting:i}])]}),i})(),jte=0,iH=(()=>{class i{constructor(){this.align="start",this.id="mat-mdc-hint-"+jte++}}return i.\u0275fac=function(e){return new(e||i)},i.\u0275dir=ve({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&&(Yl("id",n.id),At("align",null),un("mat-mdc-form-field-hint-end","end"===n.align))},inputs:{align:"align",id:"id"}}),i})();const rH=new me("MatPrefix");let Yte=(()=>{class i{constructor(){this._isText=!1}set _isTextSelector(e){this._isText=!0}}return i.\u0275fac=function(e){return new(e||i)},i.\u0275dir=ve({type:i,selectors:[["","matPrefix",""],["","matIconPrefix",""],["","matTextPrefix",""]],inputs:{_isTextSelector:["matTextPrefix","_isTextSelector"]},features:[Dn([{provide:rH,useExisting:i}])]}),i})();const sH=new me("MatSuffix");let qte=(()=>{class i{constructor(){this._isText=!1}set _isTextSelector(e){this._isText=!0}}return i.\u0275fac=function(e){return new(e||i)},i.\u0275dir=ve({type:i,selectors:[["","matSuffix",""],["","matIconSuffix",""],["","matTextSuffix",""]],inputs:{_isTextSelector:["matTextSuffix","_isTextSelector"]},features:[Dn([{provide:sH,useExisting:i}])]}),i})(),oH=(()=>{class i{constructor(e){this._elementRef=e,this.floating=!1}getWidth(){return function Xte(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)(E(mt))},i.\u0275dir=ve({type:i,selectors:[["label","matFormFieldFloatingLabel",""]],hostAttrs:[1,"mdc-floating-label","mat-mdc-floating-label"],hostVars:2,hostBindings:function(e,n){2&e&&un("mdc-floating-label--float-above",n.floating)},inputs:{floating:"floating"}}),i})();const aH="mdc-line-ripple--active",pC="mdc-line-ripple--deactivating";let lH=(()=>{class i{constructor(e,n){this._elementRef=e,this._handleTransitionEnd=r=>{const s=this._elementRef.nativeElement.classList,o=s.contains(pC);"opacity"===r.propertyName&&o&&s.remove(aH,pC)},n.runOutsideAngular(()=>{e.nativeElement.addEventListener("transitionend",this._handleTransitionEnd)})}activate(){const e=this._elementRef.nativeElement.classList;e.remove(pC),e.add(aH)}deactivate(){this._elementRef.nativeElement.classList.add(pC)}ngOnDestroy(){this._elementRef.nativeElement.removeEventListener("transitionend",this._handleTransitionEnd)}}return i.\u0275fac=function(e){return new(e||i)(E(mt),E(ft))},i.\u0275dir=ve({type:i,selectors:[["div","matFormFieldLineRipple",""]],hostAttrs:[1,"mdc-line-ripple"]}),i})(),cH=(()=>{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)(E(mt),E(ft))},i.\u0275cmp=ot({type:i,selectors:[["div","matFormFieldNotchedOutline",""]],hostAttrs:[1,"mdc-notched-outline"],hostVars:2,hostBindings:function(e,n){2&e&&un("mdc-notched-outline--notched",n.open)},inputs:{labelWidth:["matFormFieldNotchedOutlineLabelWidth","labelWidth"],open:["matFormFieldNotchedOutlineOpen","open"]},attrs:bte,ngContentSelectors:xte,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&&(sr(),Te(0,"div",0),W(1,"div",1),Wt(2),Y(),Te(3,"div",2)),2&e&&(G(1),jo("width",n._getNotchWidth()))},encapsulation:2,changeDetection:0}),i})();const Kte={transitionMessages:Ra("transitionMessages",[Ps("enter",si({opacity:1,transform:"translateY(0%)"})),Pr("void => enter",[si({opacity:0,transform:"translateY(-5px)"}),jr("300ms cubic-bezier(0.55, 0, 0.55, 0.2)")])])};let UR=(()=>{class i{}return i.\u0275fac=function(e){return new(e||i)},i.\u0275dir=ve({type:i}),i})();const mC=new me("MatFormField"),Zte=new me("MAT_FORM_FIELD_DEFAULT_OPTIONS");let dH=0,vl=(()=>{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-"+dH++,this._hintLabelId="mat-mdc-hint-"+dH++,this._subscriptAnimationState="",this._labelWidth=0,this._destroyed=new Re,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(He(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(),Mr(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(He(this._destroyed)).subscribe(()=>{this._needsOutlineLabelOffsetUpdateOnStable&&(this._needsOutlineLabelOffsetUpdateOnStable=!1,this._updateOutlineLabelOffset())})}),this._dir.change.pipe(He(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)(E(mt),E(Zn),E(ft),E(Ia),E(zi),E(Zte,8),E(Rr,8),E(jt))},i.\u0275cmp=ot({type:i,selectors:[["mat-form-field"]],contentQueries:function(e,n,r){if(1&e&&(Wi(r,To,5),Wi(r,To,7),Wi(r,UR,5),Wi(r,rH,5),Wi(r,sH,5),Wi(r,nH,5),Wi(r,iH,5)),2&e){let s;St(s=Et())&&(n._labelChildNonStatic=s.first),St(s=Et())&&(n._labelChildStatic=s.first),St(s=Et())&&(n._formFieldControl=s.first),St(s=Et())&&(n._prefixChildren=s),St(s=Et())&&(n._suffixChildren=s),St(s=Et())&&(n._errorChildren=s),St(s=Et())&&(n._hintChildren=s)}},viewQuery:function(e,n){if(1&e&&(Wn(wte,5),Wn(Mte,5),Wn(Cte,5),Wn(oH,5),Wn(cH,5),Wn(lH,5)),2&e){let r;St(r=Et())&&(n._textField=r.first),St(r=Et())&&(n._iconPrefixContainer=r.first),St(r=Et())&&(n._textPrefixContainer=r.first),St(r=Et())&&(n._floatingLabel=r.first),St(r=Et())&&(n._notchedOutline=r.first),St(r=Et())&&(n._lineRipple=r.first)}},hostAttrs:[1,"mat-mdc-form-field"],hostVars:42,hostBindings:function(e,n){2&e&&un("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:[Dn([{provide:mC,useExisting:i}])],ngContentSelectors:Gte,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&&(sr(Hte),fe(0,Ate,1,1,"ng-template",null,0,Uc),W(2,"div",1,2),Ue("click",function(s){return n._control.onContainerClick&&n._control.onContainerClick(s)}),fe(4,Dte,1,0,"div",3),W(5,"div",4),fe(6,Rte,2,3,"div",5),fe(7,kte,3,0,"div",6),fe(8,Pte,3,0,"div",7),W(9,"div",8),fe(10,Fte,1,1,"ng-template",9),Wt(11),Y(),fe(12,Lte,2,0,"div",10),fe(13,Nte,2,0,"div",11),Y(),fe(14,Bte,1,0,"div",12),Y(),W(15,"div",13),fe(16,Ute,2,1,"div",14),fe(17,zte,5,2,"div",15),Y()),2&e&&(G(2),un("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),G(2),U("ngIf",!n._hasOutline()&&!n._control.disabled),G(2),U("ngIf",n._hasOutline()),G(1),U("ngIf",n._hasIconPrefix),G(1),U("ngIf",n._hasTextPrefix),G(2),U("ngIf",!n._hasOutline()||n._forceDisplayInfixLabel()),G(2),U("ngIf",n._hasTextSuffix),G(1),U("ngIf",n._hasIconSuffix),G(1),U("ngIf",!n._hasOutline()),G(1),un("mat-mdc-form-field-subscript-dynamic-size","dynamic"===n.subscriptSizing),U("ngSwitch",n._getDisplayedMessages()),G(1),U("ngSwitchCase","error"),G(1),U("ngSwitchCase","hint"))},dependencies:[vi,xy,by,VT,CU,iH,oH,cH,lH],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:[Kte.transitionMessages]},changeDetection:0}),i})(),gC=(()=>{class i{}return i.\u0275fac=function(e){return new(e||i)},i.\u0275mod=nn({type:i}),i.\u0275inj=Kt({imports:[Qn,Eo,HI,Qn]}),i})();const fH=Ph({passive:!0});let ene=(()=>{class i{constructor(e,n){this._platform=e,this._ngZone=n,this._monitoredElements=new Map}monitor(e){if(!this._platform.isBrowser)return po;const n=jc(e),r=this._monitoredElements.get(n);if(r)return r.subject;const s=new Re,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,fH),n.classList.add("cdk-text-field-autofill-monitored")}),this._monitoredElements.set(n,{subject:s,unlisten:()=>{n.removeEventListener("animationstart",a,fH)}}),s}stopMonitoring(e){const n=jc(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)(ee(zi),ee(ft))},i.\u0275prov=ke({token:i,factory:i.\u0275fac,providedIn:"root"}),i})(),tne=(()=>{class i{}return i.\u0275fac=function(e){return new(e||i)},i.\u0275mod=nn({type:i}),i.\u0275inj=Kt({}),i})();const VR=new me("MAT_INPUT_VALUE_ACCESSOR"),nne=["button","checkbox","file","hidden","image","radio","range","reset","submit"];let ine=0;const rne=$U(class{constructor(i,t,e,n){this._defaultErrorStateMatcher=i,this._parentForm=t,this._parentFormGroup=e,this.ngControl=n,this.stateChanges=new Re}});let ic=(()=>{class i extends rne{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(_l.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&&oU().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,d,h){super(a,s,o,r),this._elementRef=e,this._platform=n,this._autofillMonitor=c,this._formField=h,this._uid="mat-input-"+ine++,this.focused=!1,this.stateChanges=new Re,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=>oU().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&&d.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(){nne.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)(E(mt),E(zi),E(ec,10),E(db,8),E(Hh,8),E(jU),E(VR,10),E(ene),E(ft),E(mC,8))},i.\u0275dir=ve({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&&Ue("focus",function(){return n._focusChanged(!0)})("blur",function(){return n._focusChanged(!1)})("input",function(){return n._onInput()}),2&e&&(Yl("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),un("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:[Dn([{provide:UR,useExisting:i}]),lt,bi]}),i})(),pH=(()=>{class i{}return i.\u0275fac=function(e){return new(e||i)},i.\u0275mod=nn({type:i}),i.\u0275inj=Kt({imports:[Qn,gC,gC,tne,Qn]}),i})();function sne(i,t){if(1&i&&(W(0,"mat-label"),ze(1),Y()),2&i){const e=he(2);G(1),_i(e.resource.name)}}function one(i,t){if(1&i){const e=mi();W(0,"mat-form-field",1),fe(1,sne,2,1,"mat-label",2),W(2,"input",3),Ue("ngModelChange",function(r){return cn(e),Gt(he().resource.data=r)})("change",function(){return cn(e),Gt(he().changed.emit())}),Y()()}if(2&i){const e=he();U("matTooltip",e.resourceDescription),G(1),U("ngIf",e.resource.name),G(1),U("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 ane=(()=>{class i{constructor(){this.resource=null,this.resourceDescription="",this.disabled=!1,this.changed=new We}}return i.\u0275fac=function(e){return new(e||i)},i.\u0275cmp=ot({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&&fe(0,one,3,7,"mat-form-field",0),2&e&&U("ngIf",n.resource)},dependencies:[vi,gl,mu,tc,_u,gu,Xc,vl,To,ic,Os],changeDetection:0}),i})();function lne(i,t){if(1&i&&(W(0,"mat-label"),ze(1),Y()),2&i){const e=he(2);G(1),_i(e.resource.name)}}function cne(i,t){if(1&i){const e=mi();W(0,"mat-form-field",1),fe(1,lne,2,1,"mat-label",2),W(2,"input",3),Ue("ngModelChange",function(r){return cn(e),Gt(he().resource.data=r)})("change",function(){return cn(e),Gt(he().changed.emit())}),Y()()}if(2&i){const e=he();U("matTooltip",e.resourceDescription),G(1),U("ngIf",e.resource.name),G(1),U("disabled",e.disabled||void 0!==e.resource.schema.required_value)("maxlength",e.maxLength)("minlength",e.minLength)("ngModel",e.resource.data)}}let mH=(()=>{class i{constructor(){this._resource=null,this.resourceDescription="",this.disabled=!1,this.changed=new We,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=ot({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&&fe(0,cne,3,6,"mat-form-field",0),2&e&&U("ngIf",n.resource)},dependencies:[vi,gl,tc,NR,BR,Xc,vl,To,ic,Os],changeDetection:0}),i})();const rc=(i,t)=>i+(i.includes("__")?"/":"__")+t,$h=function(){return[]};function dne(i,t){if(1&i&&(W(0,"mat-panel-description"),ze(1," Click to view items ("),W(2,"b"),ze(3),Y(),ze(4,") "),Y()),2&i){const e=he(2);G(3),_i((e.resourceData||so(1,$h)).length)}}function une(i,t){1&i&&(W(0,"mat-panel-description"),ze(1," Empty array "),Y())}function hne(i,t){}function fne(i,t){if(1&i){const e=mi();W(0,"mat-expansion-panel",4),Ue("opened",function(){return cn(e),Gt(he().onContentsTrigger(!0))})("closed",function(){return cn(e),Gt(he().onContentsTrigger(!1))}),W(1,"mat-expansion-panel-header",5)(2,"mat-panel-title"),ze(3),Y(),fe(4,dne,5,2,"mat-panel-description",1),fe(5,une,2,0,"mat-panel-description",1),Y(),fe(6,hne,0,0,"ng-template",6),Y()}if(2&i){const e=he(),n=rr(3);G(1),U("matTooltip",e.resourceDescription),G(2),Zi(" ",e.name," "),G(1),U("ngIf",(e.resourceData||so(5,$h)).length>0),G(1),U("ngIf",0==(e.resourceData||so(6,$h)).length),G(1),U("ngTemplateOutlet",n)}}function pne(i,t){}function mne(i,t){if(1&i&&(Gr(0),W(1,"h2",5),ze(2),Y(),W(3,"div",7),fe(4,pne,0,0,"ng-template",6),Y(),$r()),2&i){const e=he(),n=rr(3);G(1),U("matTooltip",e.resourceDescription),G(1),_i(e.name),G(2),U("ngTemplateOutlet",n)}}function gne(i,t){}function _ne(i,t){if(1&i&&Te(0,"app-editor",10),2&i){const e=he().$implicit,n=he(3);U("resource",n.children[n.pageIndex*n.pageSize+e])("disabled",n.disabled)}}function vne(i,t){if(1&i&&(Gr(0),fe(1,_ne,1,2,"app-editor",9),$r()),2&i){const e=t.$implicit,n=he(3);G(1),U("ngIf",n.pageIndex*n.pageSize+e0)}let zR=(()=>{class i{constructor(e,n){this.main=e,this.cdr=n,this._resource=null,this.resourceDescription="",this.disabled=!1,this.changed=new We,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 Re}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:rc(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(He(this.destroyed$),gn(([n,r])=>!!this.resource&&n.startsWith(this.resource.id)&&!n.substring(this.resource.id.length+1).includes("/"))).subscribe(function(){var n=tt(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 vt(null),this.imageUrl$=new vt(null),this.destroyed$=new Re,this.changed=new We}set resource(e){this._resource$.next(e)}get resource(){return this._resource$.getValue()}ngAfterViewInit(){var e=this;return tt(function*(){e._resource$.pipe(He(e.destroyed$)).subscribe(function(){var n=tt(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)(E(Ql),E(ka))},i.\u0275cmp=ot({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&&(Te(0,"app-compound-block-ui",0),Dt(1,"async"),fe(2,Ane,2,3,"img",1),Dt(3,"async")),2&e&&(U("resource",Lt(1,3,n._resource$))("fieldBlacklist",so(7,Dne)),G(2),U("ngIf",Lt(3,5,n.imageUrl$)))},dependencies:[vi,Jl,pl],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 Ine=["*"],Fne=new me("MAT_CARD_CONFIG");let gH=(()=>{class i{constructor(e){this.appearance=e?.appearance||"raised"}}return i.\u0275fac=function(e){return new(e||i)(E(Fne,8))},i.\u0275cmp=ot({type:i,selectors:[["mat-card"]],hostAttrs:[1,"mat-mdc-card","mdc-card"],hostVars:4,hostBindings:function(e,n){2&e&&un("mat-mdc-card-outlined","outlined"===n.appearance)("mdc-card--outlined","outlined"===n.appearance)},inputs:{appearance:"appearance"},exportAs:["matCard"],ngContentSelectors:Ine,decls:1,vars:0,template:function(e,n){1&e&&(sr(),Wt(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})(),_H=(()=>{class i{}return i.\u0275fac=function(e){return new(e||i)},i.\u0275mod=nn({type:i}),i.\u0275inj=Kt({imports:[Qn,Eo,Qn]}),i})();class HR{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 Re,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 GR=(()=>{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=ke({token:i,factory:i.\u0275fac,providedIn:"root"}),i})(),oie=(()=>{class i{}return i.\u0275fac=function(e){return new(e||i)},i.\u0275mod=nn({type:i}),i.\u0275inj=Kt({imports:[Qn,Eo,eb,Qn]}),i})();const MH={transformPanel:Ra("transformPanel",[Pr("void => enter-dropdown",jr("120ms cubic-bezier(0, 0, 0.2, 1)",rV([si({opacity:0,transform:"scale(1, 0.8)"}),si({opacity:1,transform:"scale(1, 1)"})]))),Pr("void => enter-dialog",jr("150ms cubic-bezier(0, 0, 0.2, 1)",rV([si({opacity:0,transform:"scale(0.7)"}),si({transform:"none",opacity:1})]))),Pr("* => void",jr("100ms linear",si({opacity:0})))]),fadeInCalendar:Ra("fadeInCalendar",[Ps("void",si({opacity:0})),Ps("enter",si({opacity:1})),Pr("void => *",jr("120ms 100ms cubic-bezier(0.55, 0, 0.55, 0.2)"))])},EH=function(i){return{active:i}};function Cie(i,t){if(1&i){const e=mi();W(0,"button",2),Ue("click",function(){const s=cn(e).$implicit;return Gt(he().select(s))}),Y()}if(2&i){const e=t.$implicit,n=he();jo("background-color",e),U("ngClass",sm(3,EH,n.selectedColor===e))}}function Sie(i,t){if(1&i){const e=mi();W(0,"button",2),Ue("click",function(){const s=cn(e).$implicit;return Gt(he().select(s))}),Y()}if(2&i){const e=t.$implicit,n=he();jo("background-color",e),U("ngClass",sm(3,EH,n.selectedColor===e))}}const Eie=["button"],Aie=/^\s+/,Die=/\s+$/,$m=Math.round,Tie=(Math,Math,Math,/[^0-9]/g),AH=["#ffffff","#ffff00","#ff00ff","#ff0000","#c0c0c0","#808080","#808000","#800080","#800000","#00ffff","#00ff00","#008080","#008000","#0000ff","#000080","#000000"];function DH(i,t,e){const n=i.getImageData(t,e,1,1).data;return{r:n[0],g:n[1],b:n[2]}}function Wh(i){return 1==i.length?"0"+i:""+i}function Rie(i){return Math.round(255*parseFloat(i)).toString(16)}function TH(i){return Ko(i)/255}function Ko(i){return parseInt(i,16)}function IH(i,t,e,n){var r=[Wh($m(i).toString(16)),Wh($m(t).toString(16)),Wh($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 vu="(?:[-\\+]?\\d*\\.\\d+%?)|(?:[-\\+]?\\d+%?)",jR="[\\s|\\(]+("+vu+")[,|\\s]+("+vu+")[,|\\s]+("+vu+")\\s*\\)?",YR="[\\s|\\(]+("+vu+")[,|\\s]+("+vu+")[,|\\s]+("+vu+")[,|\\s]+("+vu+")\\s*\\)?",jh={CSS_UNIT:new RegExp(vu),rgb:new RegExp("rgb"+jR),rgba:new RegExp("rgba"+YR),hsl:new RegExp("hsl"+jR),hsla:new RegExp("hsla"+YR),hsv:new RegExp("hsv"+jR),hsva:new RegExp("hsva"+YR),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 qR(i){let t;return i=i.replace(Aie,"").replace(Die,"").toLowerCase(),(t=jh.rgb.exec(i))?{r:t[1],g:t[2],b:t[3],a:1}:(t=jh.rgba.exec(i))?{r:t[1],g:t[2],b:t[3],a:t[4]}:(t=jh.hex8.exec(i))?{r:Ko(t[1]),g:Ko(t[2]),b:Ko(t[3]),a:TH(t[4])}:(t=jh.hex6.exec(i))?{r:Ko(t[1]),g:Ko(t[2]),b:Ko(t[3]),a:1}:(t=jh.hex4.exec(i))?{r:Ko(t[1]+""+t[1]),g:Ko(t[2]+""+t[2]),b:Ko(t[3]+""+t[3]),a:TH(t[4]+""+t[4])}:(t=jh.hex3.exec(i))?{r:Ko(t[1]+""+t[1]),g:Ko(t[2]+""+t[2]),b:Ko(t[3]+""+t[3]),a:1}:null}class Yh{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=IH(this.r,this.g,this.b),this.rgba=this.toRgba()}toHex(t){return IH(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 Iie(i,t,e,n,r){var s=[Wh($m(i).toString(16)),Wh($m(t).toString(16)),Wh($m(e).toString(16)),Wh(Rie(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 RH=(()=>{class i{constructor(e,n){this.zone=e,this.colorChanged=new We,this.x=0,this.y=0,this.drag=!1,this._destroyed=new Re,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){xo()},i.\u0275dir=ve({type:i,inputs:{color:"color"},outputs:{colorChanged:"colorChanged"}}),i})(),Oie=(()=>{class i extends RH{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}=DH(this.ctx,e.offsetX,e.offsetY);this.emitChange(new Yh(n,r,s))}}return i.\u0275fac=function(e){return new(e||i)(E(ft))},i.\u0275cmp=ot({type:i,selectors:[["ngx-mat-color-slider"]],features:[lt],decls:1,vars:0,consts:[["id","color-strip","width","15","height","234",1,"zone-strip",3,"mousedown","mouseup"]],template:function(e,n){1&e&&(W(0,"canvas",0),Ue("mousedown",function(s){return n.onMousedown(s)})("mouseup",function(s){return n.onMouseup(s)}),Y())}}),i})(),Fie=(()=>{class i{constructor(){}onInput(e){this._formatInput(e.target)}_formatInput(e){let n=Number(e.value.replace(Tie,""));n=isNaN(n)?0:n,e.value=n}}return i.\u0275fac=function(e){return new(e||i)},i.\u0275dir=ve({type:i,selectors:[["","ngxMatNumericColorInput",""]],hostBindings:function(e,n){1&e&&Ue("input",function(s){return n.onInput(s)})}}),i})(),Nie=(()=>{class i extends RH{constructor(e){super(e,"color-block"),this.zone=e,this._resetBaseColor=!0,this.formGroup=new Hm({r:new nc(null,[_l.required]),g:new nc(null,[_l.required]),b:new nc(null,[_l.required]),a:new nc(null,[_l.required]),hex:new nc(null,[_l.required,_l.pattern(jh.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(){Mr(this.rCtrl.valueChanges,this.gCtrl.valueChanges,this.bCtrl.valueChanges,this.aCtrl.valueChanges).pipe(He(this._destroyed),ml(400)).subscribe(r=>{const s=new Yh(Number(this.rCtrl.value),Number(this.gCtrl.value),Number(this.bCtrl.value),Number(this.aCtrl.value));this.emitChange(s)}),this.hexCtrl.valueChanges.pipe(He(this._destroyed),ml(400),Zl()).subscribe(r=>{const s=qR(r);if(null!=s){const o=new Yh(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}=DH(this.ctx,e.offsetX,e.offsetY);this.emitChange(new Yh(n,r,s))}}return i.\u0275fac=function(e){return new(e||i)(E(ft))},i.\u0275cmp=ot({type:i,selectors:[["ngx-mat-color-canvas"]],hostAttrs:[1,"ngx-mat-color-canvas"],features:[lt,bi],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&&(W(0,"form",0)(1,"div",1)(2,"div",2)(3,"canvas",3),Ue("mousedown",function(s){return n.onMousedown(s)})("mouseup",function(s){return n.onMouseup(s)}),Y(),W(4,"ngx-mat-color-slider",4),Ue("colorChanged",function(s){return n.onSliderColorChanged(s)}),Y()(),W(5,"div",5)(6,"mat-form-field")(7,"mat-label"),ze(8,"R"),Y(),Te(9,"input",6),Y(),W(10,"mat-form-field")(11,"mat-label"),ze(12,"G"),Y(),Te(13,"input",7),Y(),W(14,"mat-form-field")(15,"mat-label"),ze(16,"B"),Y(),Te(17,"input",8),Y()()(),W(18,"div",1),Te(19,"button",9),W(20,"mat-form-field")(21,"mat-label"),ze(22,"HEX6"),Y(),W(23,"mat-label",10),ze(24,"#\xa0"),Y(),Te(25,"input",11),Y(),W(26,"mat-form-field",12)(27,"mat-label"),ze(28,"A"),Y(),Te(29,"input",13),Y()()()),2&e&&(U("formGroup",n.formGroup),G(19),jo("background-color",(null==n.color?null:n.color.rgba)||"transparent"))},dependencies:[ic,vl,To,Yte,MV,IR,gl,mu,tc,bR,_u,gu,Hh,fC,Oie,Fie],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})(),Bie=(()=>{class i{constructor(){this.colorChanged=new We,this.colors1=AH.slice(0,8),this.colors2=AH.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}=qR(e);this.colorChanged.emit(new Yh(n,r,s,o))}}return i.\u0275fac=function(e){return new(e||i)},i.\u0275cmp=ot({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&&(W(0,"div",0),fe(1,Cie,1,5,"button",1),Y(),W(2,"div",0),fe(3,Sie,1,5,"button",1),Y()),2&e&&(G(1),U("ngForOf",n.colors1),G(2),U("ngForOf",n.colors2))},dependencies:[hm,So,MV],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})(),kH=(()=>{class i{constructor(){this.colorChanged=new We}ngOnInit(){}handleColorChanged(e){this.colorChanged.emit(e)}}return i.\u0275fac=function(e){return new(e||i)},i.\u0275cmp=ot({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&&(W(0,"ngx-mat-color-canvas",0),Ue("colorChanged",function(s){return n.handleColorChanged(s)}),Y(),W(1,"ngx-mat-color-collection",0),Ue("colorChanged",function(s){return n.handleColorChanged(s)}),Y()),2&e&&(U("color",n.color),G(1),U("color",n.color))},dependencies:[Nie,Bie],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})(),XR=(()=>{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=qR(e);return n?new Yh(n.r,n.g,n.b,n.a):null}}return i.\u0275fac=function(e){return new(e||i)},i.\u0275prov=ke({token:i,factory:i.\u0275fac}),i})();const Uie={display:{colorInput:"hex"}},PH=new me("mat-color-formats"),OH=new me("ngx-mat-colorpicker-scroll-strategy"),zie={provide:OH,deps:[as],useFactory:function Vie(i){return()=>i.scrollStrategies.reposition()}},Hie=Qy(class{constructor(i){this._elementRef=i}});let FH=(()=>{class i extends Hie{constructor(e){super(e)}}return i.\u0275fac=function(e){return new(e||i)(E(mt))},i.\u0275cmp=ot({type:i,selectors:[["ngx-mat-color-picker-content"]],viewQuery:function(e,n){if(1&e&&Wn(kH,5),2&e){let r;St(r=Et())&&(n._palette=r.first)}},hostAttrs:[1,"ngx-mat-colorpicker-content"],hostVars:3,hostBindings:function(e,n){2&e&&(Tw("@transformPanel","enter"),un("ngx-mat-colorpicker-content-touch",n.picker.touchUi))},inputs:{color:"color"},exportAs:["ngxMatColorPickerContent"],features:[lt],decls:1,vars:1,consts:[[3,"color","colorChanged"]],template:function(e,n){1&e&&(W(0,"ngx-mat-color-palette",0),Ue("colorChanged",function(s){return n.picker.select(s)}),Y()),2&e&&U("color",n.picker._selected)},dependencies:[kH],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:[MH.transformPanel,MH.fadeInCalendar]},changeDetection:0}),i})(),LH=(()=>{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 We,this.closedStream=new We,this._touchUi=!1,this._opened=!1,this._defaultColor="primary",this._validSelected=null,this._disabledChange=new Re,this._focusedElementBeforeOpen=null,this._inputSubscription=Zt.EMPTY,this._selectedChanged=new Re,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(FH,{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 Fh(FH,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(Oi(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"),Mr(this._popupRef.backdropClick(),this._popupRef.detachments(),this._popupRef.keydownEvents().pipe(gn(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)(E(Bm),E(as),E(ft),E(XR),E(Ia,8),E(OH),E(jt,8),E(Wr))},i.\u0275cmp=ot({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 yC{constructor(t,e){this.target=t,this.targetElement=e,this.value=this.target.value}}const Gie={provide:Do,useExisting:Gn(()=>bC),multi:!0},$ie={provide:Yr,useExisting:Gn(()=>bC),multi:!0};let bC=(()=>{class i{constructor(e,n,r,s){if(this._elementRef=e,this._formField=n,this._colorFormats=r,this._adapter=s,this.colorChange=new We,this.colorInput=new We,this._disabledChange=new We,this._valueChange=new We,this._onTouched=()=>{},this._cvaOnChange=()=>{},this._validatorOnChange=()=>{},this._pickerSubscription=Zt.EMPTY,this._validator=_l.compose([]),this._lastValueValid=!1,!this._colorFormats)throw function Pie(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 yC(this,this._elementRef.nativeElement)),this.colorChange.emit(new yC(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 yC(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 yC(this,this._elementRef.nativeElement)))}}return i.\u0275fac=function(e){return new(e||i)(E(mt),E(vl,8),E(PH,8),E(XR))},i.\u0275dir=ve({type:i,selectors:[["input","ngxMatColorPicker",""]],hostVars:3,hostBindings:function(e,n){1&e&&Ue("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&&(Yl("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:[Dn([Gie,$ie,{provide:VR,useExisting:i}])]}),i})(),Wie=(()=>{class i{constructor(e){this._cd=e,this._stateChanges=Zt.EMPTY}get disabled(){if(null==this._disabled&&this.picker)return this.picker.disabled}set disabled(e){this._disabled=e}ngOnInit(){}ngOnChanges(e){e.picker&&this._watchStateChanges()}ngOnDestroy(){this._stateChanges.unsubscribe()}ngAfterContentInit(){this._watchStateChanges()}open(e){this.picker&&!this.disabled&&(this.picker.open(),e.stopPropagation())}_watchStateChanges(){const e=this.picker?this.picker._disabledChange:ht(),n=this.picker&&this.picker._pickerInput?this.picker._pickerInput._disabledChange:ht(),r=this.picker?Mr(this.picker.openedStream,this.picker.closedStream):ht();this._stateChanges.unsubscribe(),this._stateChanges=Mr(e,n,r).subscribe(()=>this._cd.markForCheck())}}return i.\u0275fac=function(e){return new(e||i)(E(Zn))},i.\u0275cmp=ot({type:i,selectors:[["ngx-mat-color-toggle"]],viewQuery:function(e,n){if(1&e&&Wn(Eie,5),2&e){let r;St(r=Et())&&(n._button=r.first)}},hostAttrs:[1,"ngx-mat-color-toggle"],hostVars:7,hostBindings:function(e,n){1&e&&Ue("focus",function(){return n._button.focus()}),2&e&&(At("tabindex",-1),un("ngx-mat-color-toggle-active",n.picker&&n.picker.opened)("mat-accent",n.picker&&"accent"===n.picker.color)("mat-warn",n.picker&&"warn"===n.picker.color))},inputs:{picker:["for","picker"],tabIndex:"tabIndex",disabled:"disabled"},exportAs:["ngxMatColorPickerToggle"],features:[bi],decls:4,vars:5,consts:[["mat-icon-button","","type","button",3,"disabled","click"],["button",""]],template:function(e,n){1&e&&(W(0,"button",0,1),Ue("click",function(s){return n.open(s)}),W(2,"mat-icon"),ze(3,"palette"),Y()()),2&e&&(U("disabled",n.disabled),At("aria-haspopup",n.picker?"dialog":null)("tabindex",n.disabled?-1:n.tabIndex),G(2),jo("color",null==n.picker||null==n.picker._selected?null:n.picker._selected.rgba))},dependencies:[XM,gR],styles:[".mat-form-field-appearance .mat-form-field-prefix .ngx-mat-color-toggle-default-icon,.mat-form-field-appearance .mat-form-field-suffix .ngx-mat-color-toggle-default-icon{width:1em}.mat-form-field:not(.mat-form-field-appearance) .mat-form-field-prefix .ngx-mat-color-toggle-default-icon,.mat-form-field:not(.mat-form-field-appearance) .mat-form-field-suffix .ngx-mat-color-toggle-default-icon{display:block;width:1.5em;height:1.5em}.mat-form-field:not(.mat-form-field-appearance) .mat-form-field-prefix .mat-icon-button .ngx-mat-color-toggle-default-icon,.mat-form-field:not(.mat-form-field-appearance) .mat-form-field-suffix .mat-icon-button .ngx-mat-color-toggle-default-icon{margin:auto}\n"],encapsulation:2}),i})(),jie=(()=>{class i{}return i.\u0275fac=function(e){return new(e||i)},i.\u0275mod=nn({type:i}),i.\u0275inj=Kt({providers:[XR,zie],imports:[Eo,pH,KM,_H,oie,eH,tH,_V,Lh,ez]}),i})();const Yie=["picker"],qie=function(i){return{"background-color":i}};function Xie(i,t){if(1&i){const e=mi();W(0,"div",5),Ue("click",function(r){const o=cn(e).index;return Gt(he().onColorClicked(r.currentTarget,o))}),Y()}if(2&i){const e=t.$implicit,n=t.index,r=he();U("ngStyle",sm(2,qie,"#"+r.lpad(e.toString(16),"0",8)))("matTooltip",n+": #"+e.toString(16))}}const Kie=function(){return["colors"]};let Zie=(()=>{class i{constructor(){this.resource=null,this.changed=new We,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 yU;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=ot({type:i,selectors:[["app-palette-block-ui"]],viewQuery:function(e,n){if(1&e&&Wn(Yie,5),2&e){let r;St(r=Et())&&(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&&(Te(0,"app-compound-block-ui",0),W(1,"div",1),fe(2,Xie,1,4,"div",2),Y(),W(3,"input",3),Ue("colorChange",function(s){return n.onColorChange(s.value)}),Y(),Te(4,"ngx-mat-color-picker",null,4)),2&e){const r=rr(5);U("resource",n.resource)("fieldBlacklist",so(4,Kie)),G(2),U("ngForOf",null==n.resourceData?null:n.resourceData.colors),G(1),U("ngxMatColorPicker",r)}},dependencies:[So,eM,ic,Os,bC,LH,Jl],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 Qie=["editor"];let Jie=(()=>{class i{constructor(e){this.cdr=e,this._resource=null,this.resourceDescription="",this.disabled=!1,this.changed=new We,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)(E(Zn))},i.\u0275cmp=ot({type:i,selectors:[["app-binary-block-ui"]],viewQuery:function(e,n){if(1&e&&Wn(Qie,5),2&e){let r;St(r=Et())&&(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&&(W(0,"h2",0),ze(1),Y(),Te(2,"div",null,1)),2&e&&(U("matTooltip",n.resourceDescription),G(1),_i(null==n.resource?null:n.resource.name))},dependencies:[Os],changeDetection:0}),i})();const ere=["picker"];function tre(i,t){if(1&i&&(W(0,"mat-label",8),ze(1),Y()),2&i){const e=he();G(1),_i(null==e.resource?null:e.resource.name)}}const nre=function(i){return{transform:i}};let ire=(()=>{class i{constructor(e){this.cdr=e,this.resource=null,this.resourceDescription="",this.changed=new We,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)(E(Zn))},i.\u0275cmp=ot({type:i,selectors:[["app-angle-block-ui"]],viewQuery:function(e,n){if(1&e&&Wn(ere,5),2&e){let r;St(r=Et())&&(n.picker=r.first)}},hostBindings:function(e,n){1&e&&Ue("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&&(W(0,"div",0)(1,"div",1,2)(3,"div",3),Te(4,"div",4)(5,"div",5),Y()(),W(6,"div",6),fe(7,tre,2,1,"mat-label",7),W(8,"mat-label"),ze(9),Dt(10,"number"),Y(),W(11,"mat-label"),ze(12),Dt(13,"number"),Y()()()),2&e&&(U("matTooltip",n.resourceDescription),G(3),U("ngStyle",sm(11,nre,"rotate("+((null==n.resource?null:n.resource.data)||0)+"rad)")),G(4),U("ngIf",null==n.resource?null:n.resource.name),G(2),Zi("",J1(10,5,180*(null==n.resource?null:n.resource.data)/n.pi||0,"1.2-2")," deg"),G(3),Zi("",J1(13,8,(null==n.resource?null:n.resource.data)||0,"1.2-2")," rad"))},dependencies:[vi,eM,To,Os,uB],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 NH{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,d=new Set;for(const h of e)!0===Array.isArray(h)?a.add(h):"object"==typeof h?l.add(h):"function"==typeof h?d.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===d.size){h=!0;for(const p of o)if(!1===d.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 rre(i,t){if(1&i&&(W(0,"mat-list-option",3),ze(1),Y()),2&i){const e=t.$implicit,n=he();U("value",e)("selected",n.selectedValue==e),G(1),Zi(" ",e," ")}}function sre(i,t){if(1&i&&(W(0,"mat-card"),Te(1,"app-editor",4),Y()),2&i){const e=he();G(1),U("resource",e.resources[e.selectedValue])}}let xC=(()=>{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)(E(NH))},i.\u0275cmp=ot({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&&(W(0,"mat-selection-list",0),Ue("selectionChange",function(s){return n.selectedValue=s.source.selectedOptions.selected[0].value}),fe(1,rre,2,3,"mat-list-option",1),Y(),fe(2,sre,2,1,"mat-card",2)),2&e&&(U("multiple",!1),G(1),U("ngForOf",n.keys),G(1),U("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})(),ore=(()=>{class i{constructor(){this._resource=null,this.resourceMap={},this.changed=new We}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",iR("@transformPanel",[nR()],{optional:!0}))]),transformPanel:Ra("transformPanel",[Ps("void",si({opacity:0,transform:"scale(1, 0.8)"})),Pr("void => showing",jr("120ms cubic-bezier(0, 0, 0.2, 1)",si({opacity:1,transform:"scale(1, 1)"}))),Pr("* => void",jr("100ms linear",si({opacity:0})))])};let BH=0;const UH=new me("mat-select-scroll-strategy"),vre=new me("MAT_SELECT_CONFIG"),yre={provide:UH,deps:[as],useFactory:function _re(i){return()=>i.scrollStrategies.reposition()}},bre=new me("MatSelectTrigger");class xre{constructor(t,e){this.source=t,this.value=e}}const wre=jM(JI(WM($U(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 Re}}))));let Mre=(()=>{class i extends wre{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(_l.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=ks(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,d,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=d,this._liveAnnouncer=g,this._defaultOptions=b,this._panelOpen=!1,this._compareWith=(v,y)=>v===y,this._uid="mat-select-"+BH++,this._triggerAriaLabelledBy=null,this._destroy=new Re,this._onChange=()=>{},this._onTouched=()=>{},this._valueId="mat-select-value-"+BH++,this._panelDoneAnimatingStream=new Re,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=Ey(()=>{const v=this.options;return v?v.changes.pipe(Ao(v),Rs(()=>Mr(...v.map(y=>y.onSelectionChange)))):this._ngZone.onStable.pipe(Oi(1),Rs(()=>this.optionSelectionChanges))}),this.openedChange=new We,this._openedStream=this.openedChange.pipe(gn(v=>v),et(()=>{})),this._closedStream=this.openedChange.pipe(gn(v=>!v),et(()=>{})),this.selectionChange=new We,this.valueChange=new We,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 HR(this.multiple),this.stateChanges.next(),this._panelDoneAnimatingStream.pipe(Zl(),He(this._destroy)).subscribe(()=>this._panelDoneAnimating(this.panelOpen))}ngAfterContentInit(){this._initKeyManager(),this._selectionModel.changed.pipe(He(this._destroy)).subscribe(e=>{e.added.forEach(n=>n.select()),e.removed.forEach(n=>n.deselect())}),this.options.changes.pipe(Ao(null),He(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&&!Xo(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||Xo(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(Oi(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 HZ(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=Mr(this.options.changes,this._destroy);this.optionSelectionChanges.pipe(He(e)).subscribe(n=>{this._onSelect(n.source,n.isUserInput),n.isUserInput&&!this.multiple&&this._panelOpen&&(this.close(),this.focus())}),Mr(...this.options.map(n=>n._stateChanges)).pipe(He(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)(E(FM),E(Zn),E(ft),E(jU),E(mt),E(Ia,8),E(db,8),E(Hh,8),E(mC,8),E(ec,10),ya("tabindex"),E(UH),E(XI),E(vre,8))},i.\u0275dir=ve({type:i,viewQuery:function(e,n){if(1&e&&(Wn(are,5),Wn(lre,5),Wn(xU,5)),2&e){let r;St(r=Et())&&(n.trigger=r.first),St(r=Et())&&(n.panel=r.first),St(r=Et())&&(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:[lt,bi]}),i})(),hb=(()=>{class i extends Mre{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(He(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 PQ(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 xre(this,e)}_getOverlayWidth(){return(this._preferredOverlayOrigin instanceof zI?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=ri(i)))(n||i)}}(),i.\u0275cmp=ot({type:i,selectors:[["mat-select"]],contentQueries:function(e,n,r){if(1&e&&(Wi(r,bre,5),Wi(r,Nm,5),Wi(r,eV,5)),2&e){let s;St(s=Et())&&(n.customTrigger=s.first),St(s=Et())&&(n.options=s),St(s=Et())&&(n.optionGroups=s)}},hostAttrs:["role","combobox","aria-autocomplete","none","aria-haspopup","listbox",1,"mat-mdc-select"],hostVars:19,hostBindings:function(e,n){1&e&&Ue("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()),un("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:[Dn([{provide:UR,useExisting:i},{provide:JU,useExisting:i}]),lt],ngContentSelectors:mre,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&&(sr(pre),W(0,"div",0,1),Ue("click",function(){return n.toggle()}),W(3,"div",2),fe(4,cre,2,1,"span",3),fe(5,hre,3,2,"span",4),Y(),W(6,"div",5)(7,"div",6),ki(),W(8,"svg",7),Te(9,"path",8),Y()()()(),fe(10,fre,3,9,"ng-template",9),Ue("backdropClick",function(){return n.close()})("attach",function(){return n._onAttached()})("detach",function(){return n.close()})),2&e){const r=rr(1);At("aria-owns",n.panelOpen?n.id+"-panel":null),G(3),U("ngSwitch",n.empty),At("id",n._valueId),G(1),U("ngSwitchCase",!0),G(1),U("ngSwitchCase",!1),G(5),U("cdkConnectedOverlayPanelClass",n._overlayPanelClass)("cdkConnectedOverlayScrollStrategy",n._scrollStrategy)("cdkConnectedOverlayOrigin",n._preferredOverlayOrigin||r)("cdkConnectedOverlayOpen",n.panelOpen)("cdkConnectedOverlayPositions",n._positions)("cdkConnectedOverlayWidth",n._overlayWidth)}},dependencies:[hm,by,VT,aB,xU,zI],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:[gre.transformPanel]},changeDetection:0}),i})(),VH=(()=>{class i{}return i.\u0275fac=function(e){return new(e||i)},i.\u0275mod=nn({type:i}),i.\u0275inj=Kt({providers:[yre],imports:[Eo,Pm,tR,Qn,Xy,gC,tR,Qn]}),i})();function Cre(i,t){if(1&i&&(W(0,"mat-label"),ze(1),Y()),2&i){const e=he(3);G(1),_i(e.resource.name)}}function Sre(i,t){if(1&i&&(W(0,"mat-option",6),ze(1),Y()),2&i){const e=t.$implicit,n=he(3);U("value",e[1])("disabled",n.disabled),G(1),Zi(" ",e[1]," ")}}function Ere(i,t){if(1&i){const e=mi();W(0,"mat-form-field",3),fe(1,Cre,2,1,"mat-label",0),W(2,"mat-select",4),Ue("valueChange",function(r){return cn(e),Gt(he(2).resource.data=r)})("selectionChange",function(){return cn(e),Gt(he(2).changed.emit())}),fe(3,Sre,2,3,"mat-option",5),Y()()}if(2&i){const e=he(2);U("matTooltip",e.resourceDescription),G(1),U("ngIf",e.resource.name),G(1),U("value",e.resource.data)("disabled",e.disabled),G(1),U("ngForOf",e.resource.schema.enum_names)}}function Are(i,t){if(1&i&&(W(0,"mat-label"),ze(1),Y()),2&i){const e=he(3);G(1),_i(e.resource.name)}}function Dre(i,t){if(1&i){const e=mi();W(0,"mat-form-field",3),fe(1,Are,2,1,"mat-label",0),W(2,"input",7),Ue("ngModelChange",function(r){return cn(e),Gt(he(2).resource.data=r)})("change",function(){return cn(e),Gt(he(2).changed.emit())}),Y()()}if(2&i){const e=he(2);U("matTooltip",e.resourceDescription),G(1),U("ngIf",e.resource.name),G(1),U("min",0)("max",256*(e.resource.schema.length||1)-1)("ngModel",e.resource.data)}}function Tre(i,t){if(1&i&&(Gr(0),fe(1,Ere,4,5,"mat-form-field",1),fe(2,Dre,3,5,"ng-template",null,2,Uc),$r()),2&i){const e=rr(3),n=he();G(1),U("ngIf",n.isKnownEnumValue(n.resource.data))("ngIfElse",e)}}let Ire=(()=>{class i{constructor(){this.resource=null,this.resourceDescription="",this.disabled=!1,this.changed=new We}isKnownEnumValue(e){return!!this.resource?.schema.enum_names.find(([n,r])=>r==e)}}return i.\u0275fac=function(e){return new(e||i)},i.\u0275cmp=ot({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&&fe(0,Tre,4,2,"ng-container",0),2&e&&U("ngIf",n.resource)},dependencies:[So,vi,gl,mu,tc,_u,gu,Xc,vl,To,ic,Os,hb,Nm],changeDetection:0}),i})();const Rre=["*"],Pre=["unscopedContent"];function Ore(i,t){1&i&&Wt(0,4)}function Fre(i,t){if(1&i&&(W(0,"div",11),Te(1,"input",12),W(2,"div",13),ki(),W(3,"svg",14),Te(4,"path",15),Y(),ga(),Te(5,"div",16),Y()()),2&i){const e=he();un("mdc-checkbox--disabled",e.disabled),G(1),U("checked",e.selected)("disabled",e.disabled)}}function Lre(i,t){if(1&i&&(W(0,"div",17),Te(1,"input",18),W(2,"div",19),Te(3,"div",20)(4,"div",21),Y()()),2&i){const e=he();un("mdc-radio--disabled",e.disabled),G(1),U("checked",e.selected)("disabled",e.disabled)}}function Nre(i,t){}function Bre(i,t){if(1&i&&(W(0,"span",22),fe(1,Nre,0,0,"ng-template",23),Y()),2&i){he();const e=rr(3);G(1),U("ngTemplateOutlet",e)}}function Ure(i,t){}function Vre(i,t){if(1&i&&(W(0,"span",24),fe(1,Ure,0,0,"ng-template",23),Y()),2&i){he();const e=rr(5);G(1),U("ngTemplateOutlet",e)}}function zre(i,t){}function Hre(i,t){1&i&&fe(0,zre,0,0,"ng-template",23),2&i&&(he(),U("ngTemplateOutlet",rr(1)))}function Gre(i,t){}function $re(i,t){if(1&i&&(W(0,"span",25),fe(1,Gre,0,0,"ng-template",23),Y()),2&i){he();const e=rr(3);G(1),U("ngTemplateOutlet",e)}}function Wre(i,t){}function jre(i,t){if(1&i&&(W(0,"span",25),fe(1,Wre,0,0,"ng-template",23),Y()),2&i){he();const e=rr(5);G(1),U("ngTemplateOutlet",e)}}function Yre(i,t){}function qre(i,t){1&i&&fe(0,Yre,0,0,"ng-template",23),2&i&&(he(),U("ngTemplateOutlet",rr(1)))}const Xre=[[["","matListItemTitle",""]],[["","matListItemLine",""]],"*",[["mat-divider"]],[["","matListItemAvatar",""],["","matListItemIcon",""]]],Kre=["[matListItemTitle]","[matListItemLine]","*","mat-divider","[matListItemAvatar],[matListItemIcon]"],zH=new me("ListOption");let Zre=(()=>{class i{constructor(e){this._elementRef=e}}return i.\u0275fac=function(e){return new(e||i)(E(mt))},i.\u0275dir=ve({type:i,selectors:[["","matListItemTitle",""]],hostAttrs:[1,"mat-mdc-list-item-title","mdc-list-item__primary-text"]}),i})(),Qre=(()=>{class i{constructor(e){this._elementRef=e}}return i.\u0275fac=function(e){return new(e||i)(E(mt))},i.\u0275dir=ve({type:i,selectors:[["","matListItemLine",""]],hostAttrs:[1,"mat-mdc-list-item-line","mdc-list-item__secondary-text"]}),i})(),HH=(()=>{class i{constructor(e){this._listOption=e}_isAlignedAtStart(){return!this._listOption||"after"===this._listOption?._getTogglePosition()}}return i.\u0275fac=function(e){return new(e||i)(E(zH,8))},i.\u0275dir=ve({type:i,hostVars:4,hostBindings:function(e,n){2&e&&un("mdc-list-item__start",n._isAlignedAtStart())("mdc-list-item__end",!n._isAlignedAtStart())}}),i})(),Jre=(()=>{class i extends HH{}return i.\u0275fac=function(){let t;return function(n){return(t||(t=ri(i)))(n||i)}}(),i.\u0275dir=ve({type:i,selectors:[["","matListItemAvatar",""]],hostAttrs:[1,"mat-mdc-list-item-avatar"],features:[lt]}),i})(),ese=(()=>{class i extends HH{}return i.\u0275fac=function(){let t;return function(n){return(t||(t=ri(i)))(n||i)}}(),i.\u0275dir=ve({type:i,selectors:[["","matListItemIcon",""]],hostAttrs:[1,"mat-mdc-list-item-icon"],features:[lt]}),i})();const tse=new me("MAT_LIST_CONFIG");let KR=(()=>{class i{constructor(){this._isNonInteractive=!0,this._disableRipple=!1,this._disabled=!1,this._defaultOptions=Ot(tse,{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=ve({type:i,hostVars:1,hostBindings:function(e,n){2&e&&At("aria-disabled",n.disabled)},inputs:{disableRipple:"disableRipple",disabled:"disabled"}}),i})(),GH=(()=>{class i{set lines(e){this._explicitLines=ks(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 Zt,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(Mr(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)(E(mt),E(ft),E(KR,8),E(zi),E(eR,8),E(Rr,8))},i.\u0275dir=ve({type:i,contentQueries:function(e,n,r){if(1&e&&(Wi(r,Jre,4),Wi(r,ese,4)),2&e){let s;St(s=Et())&&(n._avatars=s),St(s=Et())&&(n._icons=s)}},hostVars:4,hostBindings:function(e,n){2&e&&(At("aria-disabled",n.disabled)("disabled",n._isButtonElement&&n.disabled||null),un("mdc-list-item--disabled",n.disabled))},inputs:{lines:"lines",disableRipple:"disableRipple",disabled:"disabled"}}),i})();const $H=new me("SelectionList");let wC=(()=>{class i extends GH{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 We,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)(E(mt),E(ft),E($H),E(zi),E(Zn),E(eR,8),E(Rr,8))},i.\u0275cmp=ot({type:i,selectors:[["mat-list-option"]],contentQueries:function(e,n,r){if(1&e&&(Wi(r,Qre,5),Wi(r,Zre,5)),2&e){let s;St(s=Et())&&(n._lines=s),St(s=Et())&&(n._titles=s)}},viewQuery:function(e,n){if(1&e&&Wn(Pre,5),2&e){let r;St(r=Et())&&(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&&Ue("blur",function(){return n._handleBlur()})("click",function(){return n._toggleOnInteraction()}),2&e&&(At("aria-selected",n.selected),un("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:[Dn([{provide:GH,useExisting:i},{provide:zH,useExisting:i}]),lt],ngContentSelectors:Kre,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&&(sr(Xre),fe(0,Ore,1,0,"ng-template",null,0,Uc),fe(2,Fre,6,4,"ng-template",null,1,Uc),fe(4,Lre,5,4,"ng-template",null,2,Uc),fe(6,Bre,2,1,"span",3),fe(7,Vre,2,1,"span",4),fe(8,Hre,1,1,"ng-template",5),W(9,"span",6),Wt(10),Wt(11,1),W(12,"span",7,8),Ue("cdkObserveContent",function(){return n._updateItemLines(!0)}),Wt(14,2),Y()(),fe(15,$re,2,1,"span",9),fe(16,jre,2,1,"span",9),fe(17,qre,1,1,"ng-template",5),Wt(18,3),Te(19,"div",10)),2&e&&(G(6),U("ngIf",n._hasCheckboxAt("before")),G(1),U("ngIf",n._hasRadioAt("before")),G(1),U("ngIf",n._hasIconsOrAvatarsAt("before")),G(7),U("ngIf",n._hasCheckboxAt("after")),G(1),U("ngIf",n._hasRadioAt("after")),G(1),U("ngIf",n._hasIconsOrAvatarsAt("after")))},dependencies:[CU,vi,xy],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 nse={provide:Do,useExisting:Gn(()=>MC),multi:!0};class ise{constructor(t,e){this.source=t,this.options=e}}let MC=(()=>{class i extends KR{get multiple(){return this._multiple}set multiple(e){const n=Jt(e);n!==this._multiple&&(this._multiple=n,this.selectedOptions=new HR(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 Re,this._onChange=r=>{},this.selectionChange=new We,this.color="accent",this.compareWith=(r,s)=>r===s,this._multiple=!0,this._hideSingleSelectionIndicator=this._defaultOptions?.hideSingleSelectionIndicator??!1,this.selectedOptions=new HR(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 ise(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(He(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()&&Xo(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 RU(this._items).withHomeAndEnd().withTypeAhead().withWrap().skipPredicate(()=>this.disabled),this._resetActiveOption(),this._keyManager.change.subscribe(e=>this._setActiveOption(e)),this._items.changes.pipe(He(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=OM();return e&&this._element.nativeElement.contains(e)}}return i.\u0275fac=function(e){return new(e||i)(E(mt),E(ft))},i.\u0275cmp=ot({type:i,selectors:[["mat-selection-list"]],contentQueries:function(e,n,r){if(1&e&&Wi(r,wC,5),2&e){let s;St(s=Et())&&(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&&Ue("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:[Dn([nse,{provide:KR,useExisting:i},{provide:$H,useExisting:i}]),lt,bi],ngContentSelectors:Rre,decls:1,vars:0,template:function(e,n){1&e&&(sr(),Wt(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})(),rse=(()=>{class i{}return i.\u0275fac=function(e){return new(e||i)},i.\u0275mod=nn({type:i}),i.\u0275inj=Kt({imports:[HI,Eo,Qn,eb,QU,RV]}),i})();function sse(i,t){if(1&i&&(W(0,"mat-label"),ze(1),Y()),2&i){const e=he(2);G(1),_i(e.resource.name)}}function ose(i,t){if(1&i&&(W(0,"mat-list-option",5),ze(1),Y()),2&i){const e=t.$implicit,n=he(2);U("value",e.key)("selected",n.resource.data[e.key])("disabled",n.disabled),G(1),Zi(" ",e.key," ")}}function ase(i,t){if(1&i){const e=mi();Gr(0,1),fe(1,sse,2,1,"mat-label",2),W(2,"mat-selection-list",3),Ue("selectionChange",function(r){return cn(e),Gt(he().onSelection(r))}),fe(3,ose,2,4,"mat-list-option",4),Dt(4,"keyvalue"),Y(),$r()}if(2&i){const e=he();U("matTooltip",e.resourceDescription),G(1),U("ngIf",e.resource.name),G(1),U("disabled",e.disabled),G(1),U("ngForOf",Lt(4,4,e.resource.data))}}let lse=(()=>{class i{constructor(){this.resource=null,this.resourceDescription="",this.disabled=!1,this.changed=new We}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=ot({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&&fe(0,ase,5,6,"ng-container",0),2&e&&U("ngIf",n.resource)},dependencies:[So,vi,To,Os,MC,wC,cB],styles:["[_nghost-%COMP%]{padding-bottom:1.34375em}"],changeDetection:0}),i})();class WH{get tick$(){return this._tick$.asObservable()}get children(){return[...this._children]}constructor(t){this.parent=t,this._tick$=new Re,this._children=[],t&&t.addChild(this)}addChild(t){if(t.parent!==this)throw new Error("Incorrect child clock");this._children.includes(t)||this._children.push(t)}removeChild(t){if(t.parent!==this)throw new Error("Incorrect child clock");this._children=this._children.filter(e=>e!==t)}dispose(){this.parent&&this.parent.removeChild(this);for(const t of this._children)t.dispose();this._tick$.complete()}}const dse=typeof performance>"u"?()=>Date.now():()=>performance.now();class jm extends WH{static get instance(){return jm._instance||(jm._instance=new jm),jm._instance}get elapsedTime(){return dse()}constructor(){super(null);let t=this.elapsedTime;const e=()=>{requestAnimationFrame(e);const n=t,r=this.elapsedTime;t=r,this._tick$.next([n,r-n])};requestAnimationFrame(e)}dispose(){throw new Error("Cannot dispose global clock")}}class jH extends WH{get isRunning(){return!!this.tickSub}get isPaused(){return-1!==this.pausedAt}get isStopped(){return-1===this.startedAt}get timeScale(){return this._timeScale}set timeScale(t){if(t!==this._timeScale||this.pausedByTimescale&&0!==t){if(0===t)return void(this.isPaused||(this.pause(),this.pausedByTimescale=!0));if(this.isPaused&&this.pausedByTimescale&&(this.resume(),this.pausedByTimescale=!1),!this.isStopped){const e=this.isPaused?this.pausedAt:this.parentClock.elapsedTime;this.startedAt=e-(e-this.startedAt)*this.timeScale/t}this._timeScale=t}}get elapsedTime(){return this.isStopped?this.lastStopElapsed:this.isPaused?this._timeScale*(this.pausedAt-this.startedAt):this._timeScale*(this.parentClock.elapsedTime-this.startedAt)}constructor(t=!1,e=jm.instance){super(e),this.parentClock=e,this.tickSub=null,this._internalTick$=new Re,this.tickRateLimit=0,this.paused$=new Re,this.startedAt=-1,this.oldRelativeTime=0,this.pausedAt=-1,this.lastStopElapsed=0,this._timeScale=1,this.pausedByTimescale=!1,this.lastFiredTickElapsed=0,t&&this.start(),this._internalTick$.pipe(et(([n,r])=>[r,r-this.lastFiredTickElapsed]),gn(([n])=>!this.tickRateLimit||Math.floor(this.lastFiredTickElapsed*this.tickRateLimit/1e3)this.lastFiredTickElapsed=n)).subscribe(this._tick$)}start(){this.isRunning||(this.oldRelativeTime=0,this.startedAt=this.parentClock.elapsedTime,this.startListeningTicks())}stop(){this.stopListeningTicks(),this.lastStopElapsed=this.elapsedTime,this.startedAt=this.pausedAt=-1}pause(){this.stopListeningTicks(),this.pausedAt=this.parentClock.elapsedTime,this.pausedByTimescale=!1,this.paused$.next(!0)}resume(){this.isRunning||-1==this.pausedAt||(this.startedAt+=this.parentClock.elapsedTime-this.pausedAt,this.pausedAt=-1,this.startListeningTicks(),this.paused$.next(!1))}startListeningTicks(){if(this.tickSub)throw new Error("Clock is already ticking!");this.tickSub=this.parentClock.tick$.pipe(et(([t,e])=>[this.oldRelativeTime,this.oldRelativeTime+e*this.timeScale]),Vi(([t,e])=>this.oldRelativeTime=e)).subscribe(this._internalTick$)}stopListeningTicks(){var t;null===(t=this.tickSub)||void 0===t||t.unsubscribe(),this.tickSub=null}dispose(){this.stopListeningTicks(),this._internalTick$.complete(),super.dispose()}}const use={transparent:!1,background:0,size:"fullscreen",antialias:!0};class hse{constructor(t,e,n={}){this.scene=t,this.canvas=e,this.entity=null,this.rendererOptions=Object.assign(Object.assign({},use),n||{})}}class fb{static fromArray(t,e=!1){const n=new fb(t[0]);let r=n;for(let s=1;sn.map(r=>new fb(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]}constructor(t){this.data=t,this.adjacent=new Set}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(d=>!e.has(d));for(const d of c)e.add(d),r.push([d,a-1])}}return n}nodes(){return Array.from(this.walkRead(-1))}}var sc=(()=>{return(i=sc||(sc={}))[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",sc;var i})();let qh=(()=>{class i{constructor(){this.tick$=new Re,this._world=null,this._name="e0x"+(i.default_name_counter++).toString(16),this._selfActive=!0,this.parent=null,this._children=[],this._components=[],this._onSpawned$=new Re,this._onRemoved$=new Re}get world(){return this._world}get name(){return this._name}set name(e){this._name=e}get active(){return this._selfActive&&(!this.parent||this.parent.active)}set active(e){this._selfActive=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 fse extends qh{constructor(t){super(),this.tickOrder=t}}function Ym(i,t=sc.CONTROLLERS,e){const n=new fse(t);return e&&(n.name=e),i.addEntity(n),n.tick$.pipe(su(()=>{i.removeEntity(n,!0)}))}class ZR extends qh{get rendererSize$(){return this._rendererSize$.asObservable()}get rendererSize(){return this._rendererSize$.getValue()}get rendererOptions(){return this.renderer.rendererOptions}get physicsDebugViewActive(){return this.renderer.physicsDebugViewActive}set physicsDebugViewActive(t){this.renderer.physicsDebugViewActive=t}constructor(t){super(),this.renderer=t,this.tickOrder=sc.RENDERING,this._rendererSize$=new vt(null),this.addComponents(t),this.tick$.subscribe(()=>{this.renderer.render()})}onSpawned(t){this._rendererSize$.next(null),"fullscreen"==this.rendererOptions.size||"function"==typeof this.rendererOptions.size?(this.renderer.canvas&&(this.renderer.canvas.style.position="absolute"),Mr(Ta(window,"resize").pipe(kM(100)),Ta(window,"orientationchange")).pipe(He(this._onRemoved$),et(()=>({x:window.innerWidth,y:window.innerHeight})),Ao({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 In||void 0!==this.rendererOptions.size.subscribe&&void 0!==this.rendererOptions.size.pipe?this.rendererOptions.size.pipe(He(this._onRemoved$)).subscribe(e=>{this._rendererSize$.next(e)}):this._rendererSize$.next(this.rendererOptions.size),this._rendererSize$.pipe(He(this._onRemoved$),Zl((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 QR=i=>{i.updateVisibility?i.updateVisibility():YH(i)},YH=i=>{for(const t of i.children)QR(t)};class pse extends qh{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(){YH(this)}addChildren(...t){super.addChildren(...t);for(const e of t)QR(e)}removeChildren(t,e=!1){if(super.removeChildren(t,e),!e)for(const n of t)QR(n)}}class JR{constructor(){this._running=!1,this.stop$=new Re}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 mse extends JR{get output$(){return this._output$.asObservable()}constructor(t,e){super(),this.keyboard=t,this.keymap=e,this._output$=new Re}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")),nu(t.map(e=>this.keyboard.bindMany(...e))).pipe(He(this.stop$),et(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 ek=new In(ms);class CC extends JR{constructor(){super(),this.bindings={},this.skipKeyDownsOnExternalFocus=!0,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 vt(!1);return this.bindings[t].push(e),e.pipe(Zl(),su(()=>{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"),ek;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 vt(!1);this.bindings[n].push(r),e.push(r)}return nu(e).pipe(su(()=>{for(let n=0;nn.includes(!0)),Zl())}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 CC.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)}}CC.externalFocusBlacklist=[HTMLInputElement,HTMLTextAreaElement,HTMLSelectElement,HTMLButtonElement];class qr{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 qr.len(qr.sub(t,e))}static norm(t){const e=qr.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 _se={pointerLock:!1};var Fs=(()=>{return(i=Fs||(Fs={}))[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",Fs;var i})();class qm extends JR{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$=Ta(this._element,"wheel",{passive:!1}).pipe(He(this.stopped$),su(()=>this._wheel$=null),Vi(t=>t.preventDefault()),et(t=>t.deltaY),Uf())),this._wheel$}get isPointerLocked(){return!!document.pointerLockElement}get isPointerLocked$(){return Ta(document,"pointerlockchange").pipe(et(()=>this.isPointerLocked))}get state(){return this._state$.getValue()}get state$(){return this._state$.asObservable()}get multiTouchPositions$(){return this._multiTouchPositions$.asObservable()}get twoTouchGestureDelta$(){return this.state$.pipe(Rs(t=>t==Fs.DRAG_TOUCH_TWO_FINGERS?this.multiTouchPositions$:ek),et(t=>t.map(e=>({x:e.x,y:e.y}))),function gse(){return ti((i,t)=>{let e,n=!1;i.subscribe(Yn(t,r=>{const s=e;e=r,n&&t.next([s,r]),n=!0}))})}(),gn(([t,e])=>t.length>1&&e.length>1),et(([t,e])=>({centerPointDelta:qr.sub(qr.scalarMult(e.reduce((n,r)=>qr.add(n,r),qr.O),1/e.length),qr.scalarMult(t.reduce((n,r)=>qr.add(n,r),qr.O),1/e.length)),angleDelta:qr.angle(e[1],e[0])-qr.angle(t[1],t[0]),distanceDelta:qr.dist(e[1],e[0])-qr.dist(t[1],t[0])})))}get _element(){return this.options.canvas||window}constructor(t={}){super(),this._wheel$=null,this._delta$=new Re,this._position$=new vt(qr.O),this._multiTouchPositions$=new vt([]),this.stopped$=new Re,this._state$=new vt(Fs.NONE),this.options=Object.assign(Object.assign({},_se),t),this.canvasClickListener=this.canvasClickListener.bind(this)}startInternal(){this.options.canvas&&(this.options.canvas.style.touchAction="none"),this._state$.next(Fs.NONE);const t=[Fs.DRAG,Fs.DRAG_MIDDLE_BUTTON,Fs.DRAG_RIGHT_BUTTON],e=[Fs.NONE,Fs.DRAG,Fs.DRAG_TOUCH_TWO_FINGERS],n=[],r={};Ta(this._element,"mousemove").pipe(He(this.stopped$)).subscribe(o=>{this._delta$.next({x:o.movementX,y:o.movementY})}),Ta(this._element,"pointermove").pipe(He(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})}),!qm.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{if(0===n.length)try{this.options.canvas&&this.options.canvas.setPointerCapture(o.pointerId),window.addEventListener("pointerup",s),this._element.addEventListener("pointercancel",s)}catch(a){console.error(a)}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]||Fs.NONE)}),Ta(this._element,"contextmenu").pipe(He(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 vse{static lookAt(t,e,n){let r=Pe.sub(t,e);r=0===Pe.lenSq(r)?Object.assign(Object.assign({},r),{z:1}):Pe.norm(r);let s=Pe.cross(n,r);0===Pe.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=Pe.norm(r),s=Pe.cross(n,r)),s=Pe.norm(s);let o=Pe.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 Yi{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,d=t.w*Math.sin((1-n)*s)/o+e.w*Math.sin(n*s)/o;return isNaN(a)||isNaN(l)||isNaN(c)||isNaN(d)?Yi.clone(t):{x:a,y:l,z:c,w:d}}static fromAngle(t,e){const n=e/2,r=Math.sin(n);return Object.assign(Object.assign({},Pe.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],d=t[10],h=e+o+d;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>d){const p=2*Math.sqrt(1+e-o-d);return{x:.25*p,y:(n+s)/p,z:(r+l)/p,w:(c-a)/p}}if(o>d){const p=2*Math.sqrt(1+o-e-d);return{x:(n+s)/p,y:.25*p,z:(a+c)/p,w:(r-l)/p}}{const p=2*Math.sqrt(1+d-e-o);return{x:(r+l)/p,y:(a+c)/p,z:.25*p,w:(s-n)/p}}}static fromMatrix3(t){const e=t[0][0]+t[1][1]+t[2][2];let n,r,s,o;if(e>0){const a=.5/Math.sqrt(e+1);n=.25/a,r=(t[2][1]-t[1][2])*a,s=(t[0][2]-t[2][0])*a,o=(t[1][0]-t[0][1])*a}else if(t[0][0]>t[1][1]&&t[0][0]>t[2][2]){const a=2*Math.sqrt(1+t[0][0]-t[1][1]-t[2][2]);n=(t[2][1]-t[1][2])/a,r=.25*a,s=(t[0][1]+t[1][0])/a,o=(t[0][2]+t[2][0])/a}else if(t[1][1]>t[2][2]){const a=2*Math.sqrt(1+t[1][1]-t[0][0]-t[2][2]);n=(t[0][2]-t[2][0])/a,r=(t[0][1]+t[1][0])/a,s=.25*a,o=(t[1][2]+t[2][1])/a}else{const a=2*Math.sqrt(1+t[2][2]-t[0][0]-t[1][1]);n=(t[1][0]-t[0][1])/a,r=(t[0][2]+t[2][0])/a,s=(t[1][2]+t[2][1])/a,o=.25*a}return{w:n,x:r,y:s,z:o}}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),d=Math.sin(.5*e);return{w:c*a*s+d*l*o,x:d*a*s-c*l*o,y:c*l*s+d*a*o,z:c*a*o-d*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=Pe.Z){return this.fromMatrix4(vse.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 Pe{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 Pe.len(Pe.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=Pe.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,Yi.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)}}}function tk(i,t,e,n){return r=>r.pipe(tI((s,o)=>{var a;return{targetValue:o,currentValue:null!==(a=s.currentValue)&&void 0!==a?a:o,hasReachedTarget:!1}},{targetValue:null,currentValue:null,hasReachedTarget:!1}),Rs(s=>i.pipe(et(([o,a])=>{if(null===s.targetValue||null===s.currentValue)return s.currentValue;if(s.hasReachedTarget)return;const l=1-Math.exp(-a/t),c=e(s.currentValue,s.targetValue,l);return s.currentValue=c,n(c,s.targetValue)?(s.hasReachedTarget=!0,s.targetValue):c}))),et(s=>void 0!==s?s:null),gn(s=>null!==s))}ps(738);class xse extends qh{get avgReport(){return this._avgReport}get peakReport(){return this._peakReport}constructor(t=60,e=15){super(),this.maxSamples=t,this.maxRows=e,this.tickOrder=Number.MAX_SAFE_INTEGER,this.sampleIndex=0,this.collectedData=new Map,this._avgReport={totalTime:0,entries:[]},this._peakReport={totalTime:0,entries:[]}}onSpawned(t){super.onSpawned(t),this.sampleIndex=0;const e=()=>(typeof performance>"u"?Date:performance).now();this.world.tickForwardTo$.pipe(He(this.onRemoved$)).subscribe(n=>{n!==this&&(this.collectedData.has(n)?this.collectedData.get(n).push([this.sampleIndex,e(),0]):this.collectedData.set(n,[[this.sampleIndex,e(),0]]))}),this.world.tickForwardedTo$.pipe(He(this.onRemoved$)).subscribe(n=>{if(n===this)return;const r=this.collectedData.get(n);r[r.length-1][2]=e()}),this.tick$.pipe(He(this.onRemoved$)).subscribe(()=>{this.sampleIndex++;const n=Array.from(this.collectedData.entries());for(const[h,p]of n){for(;p.length>0&&p[0][0]h instanceof qh?""===h.name?h.constructor.name:h.name:"PHYSICS_WORLD"===h?"Physics simulation":h,s=h=>{let p=0,m=0;for(;mh.length-m+1){m--;break}p+=h[h.length-m-1][1]}return m>1&&(h=h.slice(0,h.length-m)).push([`Rest (${m})`,p]),h};let o=0,a=Array.from(this.collectedData.entries()).map(([h,p])=>{const m=p.reduce((g,[b,v,y])=>g+y-v,0)/this.maxSamples;return o+=m,[r(h),m]}).sort((h,p)=>p[1]-h[1]);a=s(a),this._avgReport={totalTime:o,entries:a};let l=new Map,c=Array.from(this.collectedData.entries()).map(([h,p])=>{let m=0;for(const[g,b,v]of p){const y=v-b;m=Math.max(m,y),l.set(g,y+(l.get(g)||0))}return[r(h),m]}).sort((h,p)=>p[1]-h[1]);c=s(c);let d=Array.from(l.values()).reduce((h,p)=>Math.max(h,p),0);this._peakReport={totalTime:d,entries:c}})}onRemoved(){super.onRemoved(),this.collectedData=new Map,this._avgReport={totalTime:0,entries:[]},this._peakReport={totalTime:0,entries:[]}}}var Xm=function(i,t,e,n){return new(e||(e=Promise))(function(s,o){function a(d){try{c(n.next(d))}catch(h){o(h)}}function l(d){try{c(n.throw(d))}catch(h){o(h)}}function c(d){d.done?s(d.value):function r(s){return s instanceof e?s:new e(function(o){o(s)})}(d.value).then(a,l)}c((n=n.apply(i,t||[])).next())})};class yl{static get documentWorlds(){return[...yl._documentWorlds]}constructor(t,e){this.visualScene=t,this.physicsWorld=e,this.worldClock=new jH(!1),this.keyboardInput=new CC,this.name="w0x"+(yl.default_name_counter++).toString(16),this.children=[],this.tickListeners=[],this.tickStarted$=new Re,this.tickForwardTo$=new Re,this.tickForwardedTo$=new Re,this.paused$=new Re,this.disposed$=new Re,this.keyboardInput.start(),window.ggstatic?this.registerConsoleCommands(window.ggstatic):(this.onGgStaticInitialized=this.onGgStaticInitialized.bind(this),window.addEventListener("ggstatic_added",this.onGgStaticInitialized)),this.worldClock.paused$.subscribe(this.paused$),yl._documentWorlds.push(this),yl.worldCreated$.next(this)}init(){return Xm(this,void 0,void 0,function*(){yield Promise.all([this.physicsWorld.init(),this.visualScene.init()]);const t=(e,n,r)=>{e.active&&(this.tickForwardTo$.next(e),e.tick$.next([n,r]),this.tickForwardedTo$.next(e))};this.worldClock.tick$.subscribe(([e,n])=>{this.tickStarted$.next();let r=0;for(;r=sc.PHYSICS_SIMULATION);r++)t(this.tickListeners[r],e,n);for(this.tickForwardTo$.next("PHYSICS_WORLD"),this.physicsWorld.simulate(n),this.tickForwardedTo$.next("PHYSICS_WORLD");re.tickOrder-n.tickOrder),t.onSpawned(this))}removeEntity(t,e=!1){if(t.world){if(t.world!==this)throw new Error("Entity is not a part of this world");this.children.splice(this.children.findIndex(n=>n===t),1),this.tickListeners.splice(this.tickListeners.findIndex(n=>n===t),1),t.onRemoved()}e&&t.dispose()}onGgStaticInitialized(){window.removeEventListener("ggstatic_added",this.onGgStaticInitialized),this.registerConsoleCommands(window.ggstatic)}registerConsoleCommands(t){t.registerConsoleCommand(this,"timescale",(...e)=>Xm(this,void 0,void 0,function*(){return isNaN(+e[0])||(this.worldClock.timeScale=+e[0]),this.worldClock.timeScale.toString()}),"args: [ float? ]; Get current time scale of selected world clock or set it. Default value is 1.0 (no time scale applied)"),t.registerConsoleCommand(this,"fps_limit",(...e)=>Xm(this,void 0,void 0,function*(){return isNaN(+e[0])||(this.worldClock.tickRateLimit=+e[0]),this.worldClock.tickRateLimit.toString()}),"args: [ int? ]; Get current tick rate limit of selected world clock or set it. 0 means no limit applied"),t.registerConsoleCommand(this,"renderers",()=>Xm(this,void 0,void 0,function*(){return this.children.filter(e=>e instanceof ZR).map(e=>e.name).join("\n")}),"no args; Print all renderers in selected world"),t.registerConsoleCommand(this,"debug_view",(...e)=>Xm(this,void 0,void 0,function*(){let r,n="toggle";for(let o of e)["1","0"].includes(o)?n="1"===o:r=o;let s=this.children.find(o=>o instanceof ZR&&(!r||o.name===r));if(s)return s.physicsDebugViewActive="toggle"===n?!s.physicsDebugViewActive:n,s.physicsDebugViewActive?"1":"0";throw r?new Error(`Renderer with name "${r}" not found`):new Error("No renderer found")}),'args: [ 0|1?, string? ]; Turn on/off physics debug view, skip first argument to toggle value. Second argument expects renderer name, if not provided first renderer will be picked. Use "renderers" to get list of renderers in the world'),t.registerConsoleCommand(this,"performance",(...e)=>Xm(this,void 0,void 0,function*(){let n="avg",r=20;for(let d of e)["avg","peak"].includes(d)?n=d:isNaN(+d)||(r=+d);const s=new xse(r,250);this.addEntity(s),yield function yse(i,t){const e="object"==typeof t;return new Promise((n,r)=>{let o,s=!1;i.subscribe({next:a=>{o=a,s=!0},error:r,complete:()=>{s?n(o):e?n(t.defaultValue):r(new fm)}})})}(this.worldClock.tick$.pipe(Oi(r)));const o="avg"===n?s.avgReport:s.peakReport;this.removeEntity(s);const a=o.entries.map(([d,h])=>`${d}:`+new Array(Math.max(0,26-d.length)).join(" ")+`${h.toFixed(2)} ms`+("avg"===n?` (${(100*h/o.totalTime).toFixed(2)}%)`:""));let l="lightgreen";o.totalTime>12&&(l=o.totalTime<16?"yellow":"red");const c=("avg"===n?"Average":"Peak")+" Frame time";return a.unshift(c+":"+new Array(Math.max(0,26-c.length)).join(" ")+`${o.totalTime.toFixed(2)} ms`),a.unshift(`Performance report (${r} samples)`),a.join("\n")}),'args: [ int?, avg|peak? ]; Measure how much time was spent per entity in world. Arguments are samples amount (20 by default) and "peak" or "avg" choice, both arguments are optional. "avg" report sorts entities by average time consumed, "peak" records highest value for each entity')}}yl.default_name_counter=0,yl._documentWorlds=[],yl.worldCreated$=new Re;class Sse extends hse{}class XH extends pse{constructor(){super(...arguments),this._world=null}get world(){return this._world}}class Zo extends XH{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}constructor(t){super(),this.tickOrder=sc.OBJECTS_BINDING,this._position=Pe.O,this._rotation=Yi.O,this.object3D=null,this.objectBody=null,t.objectBody&&(this.objectBody=t.objectBody,this.name=this.objectBody.name,this.addComponents(this.objectBody)),t.object3D&&(this.object3D=t.object3D,t.objectBody||(this._position=this.object3D.position,this._rotation=this.object3D.rotation,this.name=this.object3D.name),this.addComponents(this.object3D)),this.objectBody&&(this.tick$.subscribe(()=>{this.runTransformBinding(this.objectBody,this.object3D)}),this.runTransformBinding(this.objectBody,this.object3D))}}class Km extends fb{static fromMapArray(t,e=!1){const n=new Km(t[0]);let r=n;for(let s=1;sn.map(r=>new Km(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));othis.mapGraph.getNearestDummy(this.mapGraphNodes,this.loaderCursor$.getValue())),Zl(),Vi(r=>this._nearestDummy$.next(r))).subscribe(r=>{let o,s=new Set;if(this.options.inertia>0){o=new Set;const a=r.walkReadPreserveDepth(this.options.loadDepth+this.options.inertia);for(let l=0;lo.add(c.data)),l<=this.options.loadDepth&&a[l].forEach(c=>s.add(c.data))}else r.walkRead(this.options.loadDepth).forEach(a=>s.add(a.data)),o=s;for(const a of this.loaded.keys())o.has(a)?s.delete(a):n.includes(a)||n.push(a);for(let a of Array.from(s.keys()))e.includes(a)||e.push(a)}),this.tick$.pipe(Ao(null),He(this._onRemoved$)).subscribe(()=>{if(n.length){for(const r of n)this.disposeChunk(r);n=[]}if(e.length)if(this._initialLoadComplete$.value&&e.length>this.options.maxNodesLoadingPerTick){let r=e.slice(0,this.options.maxNodesLoadingPerTick);e=e.slice(this.options.maxNodesLoadingPerTick),Promise.all(r.map(s=>this.loadChunk(s))).then()}else Promise.all(e.map(r=>this.loadChunk(r))).then(()=>{this._initialLoadComplete$.value||this._initialLoadComplete$.next(!0)}),e=[]})}onRemoved(){super.onRemoved(),this.loadClock&&(this.loadClock.stop(),this.loadClock=null),this.loaderCursor$.next(Pe.O)}loadChunk(t){return function(i,t,e,n){return new(e||(e=Promise))(function(s,o){function a(d){try{c(n.next(d))}catch(h){o(h)}}function l(d){try{c(n.throw(d))}catch(h){o(h)}}function c(d){d.done?s(d.value):function r(s){return s instanceof e?s:new e(function(o){o(s)})}(d.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||Yi.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||Yi.O}]),[n,e]})}disposeChunk(t){this.loaded.has(t)&&(this.removeChildren(this.loaded.get(t),!0),this.loaded.delete(t))}}class Dse extends ZR{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 e4=function(i,t,e,n){return new(e||(e=Promise))(function(s,o){function a(d){try{c(n.next(d))}catch(h){o(h)}}function l(d){try{c(n.throw(d))}catch(h){o(h)}}function c(d){d.done?s(d.value):function r(s){return s instanceof e?s:new e(function(o){o(s)})}(d.value).then(a,l)}c((n=n.apply(i,t||[])).next())})};const t4={keymap:"wasd",cameraLinearSpeed:20,cameraMovementElasticity:0,cameraBoostMultiplier:2.5,cameraRotationSensitivity:1,cameraRotationElasticity:0,mouseOptions:{},ignoreMouseUnlessPointerLocked:!1,ignoreKeyboardUnlessPointerLocked:!1};class n4 extends qh{get active(){return super.active}set active(t){!super.active&&t&&this.reset(),super.active=t}get spherical(){return this._spherical}set spherical(t){this._spherical.phi=Math.max(1e-6,Math.min(Math.PI-1e-6,t.phi)),this._spherical.theta=t.theta,this.resetMotion$.next()}constructor(t,e,n={}){super(),this.keyboard=t,this.camera=e,this.tickOrder=sc.INPUT_CONTROLLERS,this._spherical={phi:0,radius:1,theta:0},this.resetMotion$=new Re,this.options=Object.assign(Object.assign({},t4),n),n.mouseOptions&&(this.options.mouseOptions=Object.assign(Object.assign({},t4.mouseOptions),n.mouseOptions)),this.mouseInput=new qm(this.options.mouseOptions),this.directionsInput=new mse(t,this.options.keymap)}reset(){this._spherical=Pe.toSpherical(Pe.rot({x:0,y:0,z:-1},this.camera.rotation)),this.resetMotion$.next()}onSpawned(t){const e=Object.create(null,{onSpawned:{get:()=>super.onSpawned}});return e4(this,void 0,void 0,function*(){yield e.onSpawned.call(this,t),this._spherical=Pe.toSpherical(Pe.rot({x:0,y:0,z:-1},this.camera.rotation));const n=["KeyE","KeyQ"];this.camera.camera.supportsFov&&n.push("KeyZ","KeyC"),n.push("ShiftLeft");let r=nu([this.directionsInput.output$,...n.map(c=>this.keyboard.bind(c))]).pipe(He(this._onRemoved$),et(([c,...d])=>{let h={direction:{},rest:[]};(!this.options.ignoreKeyboardUnlessPointerLocked||this.mouseInput.isPointerLocked)&&(h={direction:c,rest:d});let p=Object.assign({},Pe.O);const[m,g,b,v,y]=h.rest;void 0!==h.direction.upDown&&(p.z=h.direction.upDown?-1:1),void 0!==h.direction.leftRight&&(p.x=h.direction.leftRight?-1:1),m!=g&&(p.y=g?-1:1);let M=0;return b!=v&&(M=b?1:-1),p=Pe.norm(p),y&&(p=Pe.scalarMult(p,this.options.cameraBoostMultiplier)),[p,M]}));this.options.cameraMovementElasticity>0&&(r=r.pipe(tk(this.camera.tick$,this.options.cameraMovementElasticity,([c,d],[h,p],m)=>[Pe.lerp(c,h,m),p],([c,d],[h,p])=>d==p&&Pe.dist(c,h)<.001)));let s=Pe.O,o=0;r.subscribe(([c,d])=>{s=c,o=d});let a=qm.isTouchDevice(),l=this.mouseInput.delta$.pipe(He(this._onRemoved$),gn(()=>this.active&&(a||!this.options.ignoreMouseUnlessPointerLocked||this.mouseInput.isPointerLocked)));if(this.options.cameraRotationElasticity>0){const c=new vt(this._spherical);l.subscribe(h=>{const p=c.getValue();c.next({phi:Math.max(1e-6,Math.min(Math.PI-1e-6,p.phi+h.y*this.options.cameraRotationSensitivity/1e3)),theta:p.theta-h.x*this.options.cameraRotationSensitivity/1e3,radius:1})});const d=()=>{c.pipe(He(this._onRemoved$),tk(this.tick$,this.options.cameraRotationElasticity,(h,p,m)=>({phi:h.phi+m*(p.phi-h.phi),theta:h.theta+m*(p.theta-h.theta),radius:1}),(h,p)=>qr.dist({x:h.phi,y:h.theta},{x:p.phi,y:p.theta})<1e-4),He(this.resetMotion$)).subscribe(h=>{this._spherical.theta=h.theta,this._spherical.phi=h.phi})};this.resetMotion$.pipe(He(this._onRemoved$)).subscribe(()=>{c.next(this._spherical),d()}),d()}else l.subscribe(c=>{this._spherical.theta-=c.x*this.options.cameraRotationSensitivity/1e3,this._spherical.phi+=c.y*this.options.cameraRotationSensitivity/1e3,this._spherical.phi=Math.max(1e-6,Math.min(Math.PI-1e-6,this._spherical.phi))});this.camera.tick$.pipe(He(this._onRemoved$),gn(()=>this.active)).subscribe(([c,d])=>{this.camera.camera.fov+=o,this.camera.position=Pe.add(this.camera.position,Pe.rot(Pe.scalarMult(s,this.options.cameraLinearSpeed*d/1e3),this.camera.rotation)),this.camera.rotation=Yi.lookAt(this.camera.position,Pe.add(this.camera.position,Pe.fromSpherical(this._spherical)))}),this.mouseInput.start(),this.directionsInput.start()})}onRemoved(){const t=Object.create(null,{onRemoved:{get:()=>super.onRemoved}});return e4(this,void 0,void 0,function*(){yield t.onRemoved.call(this),yield this.mouseInput.stop(!0),yield this.directionsInput.stop()})}}var i4=function(i,t,e,n){return new(e||(e=Promise))(function(s,o){function a(d){try{c(n.next(d))}catch(h){o(h)}}function l(d){try{c(n.throw(d))}catch(h){o(h)}}function c(d){d.done?s(d.value):function r(s){return s instanceof e?s:new e(function(o){o(s)})}(d.value).then(a,l)}c((n=n.apply(i,t||[])).next())})};const Ise={mouseOptions:{},orbiting:{sensitivityX:1,sensitivityY:1},orbitingElasticity:0,zooming:{sensitivity:1},panning:{sensitivityX:1,sensitivityY:1},dollying:{sensitivity:1}};class Rse extends qh{get active(){return super.active}set active(t){!super.active&&t&&this.reset(),super.active=t}get spherical(){return this._spherical}set spherical(t){this._spherical.phi=Math.max(1e-6,Math.min(Math.PI-1e-6,t.phi)),this._spherical.theta=t.theta,this._spherical.radius=t.radius,this.resetMotion$.next()}constructor(t,e={}){super(),this.camera=t,this.tickOrder=sc.INPUT_CONTROLLERS,this._spherical={phi:0,radius:10,theta:0},this.target=Pe.O,this.resetMotion$=new Re,this.options=Object.assign(Object.assign({},Ise),e),this.mouseInput=new qm(this.options.mouseOptions)}reset(){let t=Pe.dist(this.target,this.camera.position);this.target=Pe.add(this.camera.position,Pe.rot({x:0,y:0,z:-t},this.camera.rotation)),this._spherical=Pe.toSpherical(Pe.sub(this.camera.position,this.target)),this.resetMotion$.next()}onSpawned(t){const e=Object.create(null,{onSpawned:{get:()=>super.onSpawned}});return i4(this,void 0,void 0,function*(){if(yield e.onSpawned.call(this,t),this._spherical=Pe.toSpherical(Pe.sub(this.camera.position,this.target)),this.options.orbiting){let r=this.mouseInput.delta$.pipe(He(this._onRemoved$),gn(()=>this.active&&this.mouseInput.state==Fs.DRAG));if(this.options.orbitingElasticity>0){const s=new vt(this._spherical);r.subscribe(a=>{const l=s.getValue();s.next({phi:Math.max(1e-6,Math.min(Math.PI-1e-6,l.phi-a.y*this.options.orbiting.sensitivityY/1e3)),theta:l.theta-a.x*this.options.orbiting.sensitivityX/1e3,radius:1})});const o=()=>{s.pipe(He(this._onRemoved$),tk(this.tick$,this.options.orbitingElasticity,(a,l,c)=>({phi:a.phi+c*(l.phi-a.phi),theta:a.theta+c*(l.theta-a.theta),radius:1}),(a,l)=>qr.dist({x:a.phi,y:a.theta},{x:l.phi,y:l.theta})<1e-4),He(this.resetMotion$)).subscribe(a=>{this._spherical.theta=a.theta,this._spherical.phi=a.phi})};this.resetMotion$.pipe(He(this._onRemoved$)).subscribe(()=>{s.next(this._spherical),o()}),o()}else r.subscribe(s=>{this._spherical.theta-=s.x*this.options.orbiting.sensitivityX/1e3,this._spherical.phi-=s.y*this.options.orbiting.sensitivityY/1e3,this._spherical.phi=Math.max(1e-6,Math.min(Math.PI-1e-6,this._spherical.phi))})}this.options.zooming&&this.mouseInput.wheel$.pipe(He(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=Pe.fromSpherical(this._spherical),o=Pe.rotAround(s,{x:-Math.sin(this._spherical.theta),y:Math.cos(this._spherical.theta),z:0},Math.PI/2),a=Pe.rotAround(s,Pe.norm(o),Math.PI/2);this.target=Pe.add(this.target,Pe.add(Pe.scalarMult(o,-this.options.panning.sensitivityY*r.y/1e3),Pe.scalarMult(a,this.options.panning.sensitivityX*r.x/1e3)))};this.options.panning&&this.mouseInput.delta$.pipe(He(this._onRemoved$),gn(()=>this.mouseInput.state==Fs.DRAG_RIGHT_BUTTON)).subscribe(r=>{n(r)}),this.options.dollying&&this.mouseInput.delta$.pipe(He(this._onRemoved$),gn(()=>this.mouseInput.state==Fs.DRAG_MIDDLE_BUTTON)).subscribe(r=>{this._spherical.radius*=Math.pow(.95,-this.options.dollying.sensitivity*r.y/10)}),qm.isTouchDevice()&&(this.options.dollying||this.options.panning)&&this.mouseInput.twoTouchGestureDelta$.pipe(He(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(He(this._onRemoved$),gn(()=>this.active),et(()=>this._spherical)).subscribe(r=>{this.camera.position=Pe.add(this.target,Pe.fromSpherical(r)),this.camera.rotation=Yi.lookAt(this.camera.position,this.target)}),yield this.mouseInput.start()})}onRemoved(){const t=Object.create(null,{onRemoved:{get:()=>super.onRemoved}});return i4(this,void 0,void 0,function*(){yield t.onRemoved.call(this),yield this.mouseInput.stop(!0)})}}class Pse{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 rk=function(i,t,e,n){return new(e||(e=Promise))(function(s,o){function a(d){try{c(n.next(d))}catch(h){o(h)}}function l(d){try{c(n.throw(d))}catch(h){o(h)}}function c(d){d.done?s(d.value):function r(s){return s instanceof e?s:new e(function(o){o(s)})}(d.value).then(a,l)}c((n=n.apply(i,t||[])).next())})},yu=(()=>{return(i=yu||(yu={}))[i.Nothing=0]="Nothing",i[i.Files=1]="Files",i[i.Entities=2]="Entities",yu;var i})();const r4={cachingStrategy:yu.Nothing,position:Pe.O,rotation:Yi.O,loadProps:!0},s4=i=>({meta:i.meta,resources:i.resources.map(({object3D:t,body:e})=>({object3D:t&&t.clone(),body:e&&e.clone()}))});class Ose{constructor(t){this.world=t,this.filesCache=new Map,this.loadResultCache=new Map}loadGgGlbFiles(t){return rk(this,arguments,void 0,function*(e,n=!1){if(n&&this.filesCache.has(e))return this.filesCache.get(e);const r=Promise.all([fetch(`${e}.glb`).then(o=>o.arrayBuffer()),fetch(`${e}.meta`).then(o=>o.text()).then(o=>JSON.parse(o))]);n&&this.filesCache.set(e,r);const s=yield r;return n&&this.filesCache.set(e,s),s})}loadGgGlbResources(t){return rk(this,arguments,void 0,function*(e,n=yu.Nothing){if(n==yu.Entities&&this.loadResultCache.has(e)){const c=this.loadResultCache.get(e),d=c instanceof Promise?yield c:c;return s4(d)}const[r,s]=yield this.loadGgGlbFiles(e,n==yu.Files);if(!r)throw new Error("GLB not found");const[o,a]=yield Promise.all([this.world.visualScene.loader.loadFromGgGlb(r,s),this.world.physicsWorld.loader.loadFromGgGlb(r,s)]),l={resources:[],meta:s};if(!o)return l;if(0==a.length)l.resources.push({object3D:o,body:null});else if(1==a.length)l.resources.push({object3D:o,body:a[0]});else{for(const c of a)l.resources.push({object3D:o.popChild(c.name),body:c});o.isEmpty()||l.resources.push({object3D:o,body:null})}return n==yu.Entities&&this.loadResultCache.set(e,s4(l)),l})}loadGgGlb(t){return rk(this,arguments,void 0,function*(e,n=r4){const r=Object.assign(Object.assign({},r4),n),{resources:s,meta:o}=yield this.loadGgGlbResources(e,r.cachingStrategy),a={entities:s.map(l=>new Zo({object3D:l.object3D,objectBody:l.body})),meta:o};return r.loadProps&&(a.props=yield Promise.all(o.dummies.filter(l=>l.is_prop||l.is_scene).map(l=>this.loadGgGlb(l.is_prop?(r.propsPath||e.substring(0,e.lastIndexOf("/")+1))+l.prop_id:l.scene_id,{loadProps:!!l.is_scene,position:Pe.add(Pe.rot(l.position,r.rotation),r.position),rotation:Yi.combineRotations(l.rotation,r.rotation)})))),a.entities.forEach(l=>{l.position=Pe.add(Pe.rot(Pe.clone(l.position),r.rotation),r.position),l.rotation=Yi.mult(Yi.clone(l.rotation),r.rotation)}),a})}}class sk extends yl{constructor(t,e){super(t,e),this.visualScene=t,this.physicsWorld=e,this.loader=new Ose(this)}addPrimitiveRigidBody(t,e=Pe.O,n=Yi.O,r={}){const s=new Zo({object3D:this.visualScene.factory.createPrimitive(t.shape,r),objectBody:this.physicsWorld.factory.createRigidBody(t)});return s.position=e,s.rotation=n,this.addEntity(s),s}addRenderer(t,e,n){const r=new Dse(this.visualScene.createRenderer(t,e,n));return this.addEntity(r),r}registerConsoleCommands(t){super.registerConsoleCommands(t),t.registerConsoleCommand(this,"gravity",(...e)=>function(i,t,e,n){return new(e||(e=Promise))(function(s,o){function a(d){try{c(n.next(d))}catch(h){o(h)}}function l(d){try{c(n.throw(d))}catch(h){o(h)}}function c(d){d.done?s(d.value):function r(s){return s instanceof e?s:new e(function(o){o(s)})}(d.value).then(a,l)}c((n=n.apply(i,t||[])).next())})}(this,void 0,void 0,function*(){if(1==e.length&&(e=["0","0",""+-+e[0]]),e.length>0){if(isNaN(+e[0])||isNaN(+e[1])||isNaN(+e[2]))throw new Error("Wrong arguments");this.physicsWorld.gravity={x:+e[0],y:+e[1],z:+e[2]}}return JSON.stringify(this.physicsWorld.gravity)}),'args: [ ?float, ?float, ?float ]; Get or set 3D world gravity vector. 1 argument sets vector {x: 0, y: 0, z: -value}, 3 arguments set the whole vector. Default value is "9.82" or "0 0 -9.82"')}}function o4(i,t=$y,e){const n=OI(i,t);return function Lse(i,t){return ti((e,n)=>{const{leading:r=!0,trailing:s=!1}=t??{};let o=!1,a=null,l=null,c=!1;const d=()=>{l?.unsubscribe(),l=null,s&&(m(),c&&n.complete())},h=()=>{l=null,c&&n.complete()},p=g=>l=wr(i(g)).subscribe(Yn(n,d,h)),m=()=>{if(o){o=!1;const g=a;a=null,n.next(g),!c&&p(g)}};e.subscribe(Yn(n,g=>{o=!0,a=g,(!l||l.closed)&&(r?m():p(g))},()=>{c=!0,(!(s&&o&&l)||l.closed)&&n.complete()}))})}(()=>n,e)}window.gg_version="0.0.56";const Nse=0,a4=1,Bse=2,l4=1,c4=2,Kc=3,ac=0,Io=1,Ls=2,Zc=0,Zm=1,d4=2,u4=3,h4=4,Use=5,Xh=100,Vse=101,zse=102,Hse=103,Gse=104,$se=200,Wse=201,jse=202,Yse=203,ak=204,lk=205,qse=206,Xse=207,Kse=208,Zse=209,Qse=210,Jse=211,eoe=212,toe=213,noe=214,ioe=0,roe=1,soe=2,SC=3,ooe=4,aoe=5,loe=6,coe=7,EC=0,doe=1,uoe=2,bu=0,hoe=1,foe=2,poe=3,moe=4,goe=5,_oe=6,voe=7,f4="attached",Qc=301,Kh=302,AC=303,DC=304,pb=306,Pa=1e3,Ii=1001,mb=1002,_r=1003,dk=1004,Qm=1005,lr=1006,gb=1007,bl=1008,Jc=1009,p4=1010,m4=1011,_b=1012,uk=1013,xu=1014,Qo=1015,Jm=1016,hk=1017,fk=1018,eg=1020,g4=35902,_4=1021,v4=1022,Ro=1023,y4=1024,b4=1025,tg=1026,ng=1027,pk=1028,TC=1029,x4=1030,mk=1031,gk=1033,IC=33776,RC=33777,kC=33778,PC=33779,_k=35840,vk=35841,yk=35842,bk=35843,xk=36196,wk=37492,Mk=37496,Ck=37808,Sk=37809,Ek=37810,Ak=37811,Dk=37812,Tk=37813,Ik=37814,Rk=37815,kk=37816,Pk=37817,Ok=37818,Fk=37819,Lk=37820,Nk=37821,OC=36492,Bk=36494,Uk=36495,w4=36283,Vk=36284,zk=36285,Hk=36286,vb=2300,yb=2301,Moe=0,C4=1,Wk=2,Soe=3201,Zh=0,Eoe=1,wu="",cs="srgb",ds="srgb-linear",jk="display-p3",LC="display-p3-linear",NC="linear",Fi="srgb",BC="rec709",UC="p3",sg=7680,Aoe=512,Doe=513,Toe=514,E4=515,Ioe=516,Roe=517,koe=518,Poe=519,A4="300 es",ed=2e3;class og{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]+Ns[i>>16&255]+Ns[i>>24&255]+"-"+Ns[255&t]+Ns[t>>8&255]+"-"+Ns[t>>16&15|64]+Ns[t>>24&255]+"-"+Ns[63&e|128]+Ns[e>>8&255]+"-"+Ns[e>>16&255]+Ns[e>>24&255]+Ns[255&n]+Ns[n>>8&255]+Ns[n>>16&255]+Ns[n>>24&255]).toLowerCase()}function Ji(i,t,e){return Math.max(t,Math.min(e,i))}function Yk(i,t){return(i%t+t)%t}function bb(i,t,e){return(1-e)*i+e*t}function lo(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 yn(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 Koe_radToDeg=function Woe(i){return i*ag};class xe{constructor(t=0,e=0){xe.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 wn{constructor(t,e,n,r,s,o,a,l,c){wn.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 d=this.elements;return d[0]=t,d[1]=r,d[2]=a,d[3]=e,d[4]=s,d[5]=l,d[6]=n,d[7]=o,d[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],d=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],F=r[2],D=r[5],k=r[8];return s[0]=o*b+a*M+l*F,s[3]=o*v+a*x+l*D,s[6]=o*y+a*C+l*k,s[1]=c*b+d*M+h*F,s[4]=c*v+d*x+h*D,s[7]=c*y+d*C+h*k,s[2]=p*b+m*M+g*F,s[5]=p*v+m*x+g*D,s[8]=p*y+m*C+g*k,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],d=t[8];return e*o*d-e*a*c-n*s*d+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],d=t[8],h=d*o-a*c,p=a*l-d*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-d*n)*b,t[2]=(a*n-r*o)*b,t[3]=p*b,t[4]=(d*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(qk.makeScale(t,e)),this}rotate(t){return this.premultiply(qk.makeRotation(-t)),this}translate(t,e){return this.premultiply(qk.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 qk=new wn;function T4(i){for(let t=i.length-1;t>=0;--t)if(i[t]>=65535)return!0;return!1}function xb(i){return document.createElementNS("http://www.w3.org/1999/xhtml",i)}function Qoe(){const i=xb("canvas");return i.style.display="block",i}Int8Array,Uint8Array,Uint8ClampedArray,Int16Array,Uint16Array,Int32Array,Uint32Array,Float32Array,Float64Array;const I4={};function cg(i){i in I4||(I4[i]=!0,console.warn(i))}const R4=(new wn).set(.8224621,.177538,0,.0331941,.9668058,0,.0170827,.0723974,.9105199),k4=(new wn).set(1.2249401,-.2249404,0,-.0420569,1.0420571,0,-.0196376,-.0786361,1.0982735),wb={[ds]:{transfer:NC,primaries:BC,luminanceCoefficients:[.2126,.7152,.0722],toReference:i=>i,fromReference:i=>i},[cs]:{transfer:Fi,primaries:BC,luminanceCoefficients:[.2126,.7152,.0722],toReference:i=>i.convertSRGBToLinear(),fromReference:i=>i.convertLinearToSRGB()},[LC]:{transfer:NC,primaries:UC,luminanceCoefficients:[.2289,.6917,.0793],toReference:i=>i.applyMatrix3(k4),fromReference:i=>i.applyMatrix3(R4)},[jk]:{transfer:Fi,primaries:UC,luminanceCoefficients:[.2289,.6917,.0793],toReference:i=>i.convertSRGBToLinear().applyMatrix3(k4),fromReference:i=>i.applyMatrix3(R4).convertLinearToSRGB()}},eae=new Set([ds,LC]),Jn={enabled:!0,_workingColorSpace:ds,get workingColorSpace(){return this._workingColorSpace},set workingColorSpace(i){if(!eae.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,wb[e].fromReference)((0,wb[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 wb[i].primaries},getTransfer:function(i){return i===wu?NC:wb[i].transfer},getLuminanceCoefficients:function(i,t=this._workingColorSpace){return i.fromArray(wb[t].luminanceCoefficients)}};function dg(i){return i<.04045?.0773993808*i:Math.pow(.9478672986*i+.0521327014,2.4)}function Xk(i){return i<.0031308?12.92*i:1.055*Math.pow(i,.41666)-.055}let ug;class tae{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===ug&&(ug=xb("canvas")),ug.width=t.width,ug.height=t.height;const n=ug.getContext("2d");t instanceof ImageData?n.putImageData(t,0,0):n.drawImage(t,0,0,t.width,t.height),e=ug}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=xb("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 og{constructor(e=i.DEFAULT_IMAGE,n=i.DEFAULT_MAPPING,r=Ii,s=Ii,o=lr,a=bl,l=Ro,c=Jc,d=i.DEFAULT_ANISOTROPY,h=wu){super(),this.isTexture=!0,Object.defineProperty(this,"id",{value:iae++}),this.uuid=Jo(),this.name="",this.source=new hg(e),this.mipmaps=[],this.mapping=n,this.channel=0,this.wrapS=r,this.wrapT=s,this.magFilter=o,this.minFilter=a,this.anisotropy=d,this.format=l,this.internalFormat=null,this.type=c,this.offset=new xe(0,0),this.repeat=new xe(1,1),this.center=new xe(0,0),this.rotation=0,this.matrixAutoUpdate=!0,this.matrix=new wn,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 Pa:e.x=e.x-Math.floor(e.x);break;case Ii:e.x=e.x<0?0:1;break;case mb: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 Pa:e.y=e.y-Math.floor(e.y);break;case Ii:e.y=e.y<0?0:1;break;case mb: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 gi{constructor(t=0,e=0,n=0,r=1){gi.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],d=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(d-p)<.01&&Math.abs(h-b)<.01&&Math.abs(g-v)<.01){if(Math.abs(d+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,F=(y+1)/2,D=(d+p)/4,k=(h+b)/4,B=(g+v)/4;return x>C&&x>F?x<.01?(n=0,r=.707106781,s=.707106781):(n=Math.sqrt(x),r=D/n,s=k/n):C>F?C<.01?(n=.707106781,r=0,s=.707106781):(r=Math.sqrt(C),n=D/r,s=B/r):F<.01?(n=.707106781,r=.707106781,s=0):(s=Math.sqrt(F),n=k/s,r=B/s),this.set(n,r,s,e),this}let M=Math.sqrt((v-g)*(v-g)+(h-b)*(h-b)+(p-d)*(p-d));return Math.abs(M)<.001&&(M=1),this.x=(v-g)/M,this.y=(h-b)/M,this.z=(p-d)/M,this.w=Math.acos((c+m+y-1)/2),this}setFromMatrixPosition(t){const e=t.elements;return this.x=e[12],this.y=e[13],this.z=e[14],this.w=e[15],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 rae extends og{constructor(t=1,e=1,n={}){super(),this.isRenderTarget=!0,this.width=t,this.height=e,this.depth=1,this.scissor=new gi(0,0,t,e),this.scissorTest=!1,this.viewport=new gi(0,0,t,e);const r={width:t,height:e,depth:1};n=Object.assign({generateMipmaps:!1,internalFormat:null,minFilter:lr,depthBuffer:!0,stencilBuffer:!1,resolveDepthBuffer:!0,resolveStencilBuffer:!0,depthTexture:null,samples:0,count:1},n);const s=new ko(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 F=Math.sqrt(x),D=Math.atan2(F,y*M);v=Math.sin(v*D)/F,a=Math.sin(a*D)/F}const C=a*M;if(l=l*v+p*C,c=c*v+m*C,d=d*v+g*C,h=h*v+b*C,v===1-a){const F=1/Math.sqrt(l*l+c*c+d*d+h*h);l*=F,c*=F,d*=F,h*=F}}t[e]=l,t[e+1]=c,t[e+2]=d,t[e+3]=h}static multiplyQuaternionsFlat(t,e,n,r,s,o){const a=n[r],l=n[r+1],c=n[r+2],d=n[r+3],h=s[o],p=s[o+1],m=s[o+2],g=s[o+3];return t[e]=a*g+d*h+l*m-c*p,t[e+1]=l*g+d*p+c*h-a*m,t[e+2]=c*g+d*m+a*p-l*h,t[e+3]=d*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),d=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*d*h+c*m*g,this._y=c*m*h-p*d*g,this._z=c*d*g+p*m*h,this._w=c*d*h-p*m*g;break;case"YXZ":this._x=p*d*h+c*m*g,this._y=c*m*h-p*d*g,this._z=c*d*g-p*m*h,this._w=c*d*h+p*m*g;break;case"ZXY":this._x=p*d*h-c*m*g,this._y=c*m*h+p*d*g,this._z=c*d*g+p*m*h,this._w=c*d*h-p*m*g;break;case"ZYX":this._x=p*d*h-c*m*g,this._y=c*m*h+p*d*g,this._z=c*d*g-p*m*h,this._w=c*d*h+p*m*g;break;case"YZX":this._x=p*d*h+c*m*g,this._y=c*m*h+p*d*g,this._z=c*d*g-p*m*h,this._w=c*d*h-p*m*g;break;case"XZY":this._x=p*d*h-c*m*g,this._y=c*m*h-p*d*g,this._z=c*d*g+p*m*h,this._w=c*d*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],d=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=(d-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=(d-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+d)/m}else{const m=2*Math.sqrt(1+h-n-a);this._w=(o-r)/m,this._x=(s+c)/m,this._y=(l+d)/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,d=e._w;return this._x=n*d+o*a+r*c-s*l,this._y=r*d+o*l+s*a-n*c,this._z=s*d+o*c+n*l-r*a,this._w=o*d-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),d=Math.atan2(c,a),h=Math.sin((1-e)*d)/c,p=Math.sin(e*d)/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 O{constructor(t=0,e=0,n=0){O.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(O4.setFromEuler(t))}applyAxisAngle(t,e){return this.applyQuaternion(O4.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),d=2*(a*e-s*r),h=2*(s*n-o*e);return this.x=e+l*c+o*h-a*d,this.y=n+l*d+a*c-s*h,this.z=r+l*h+s*d-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 Qk.copy(this).projectOnVector(t),this.sub(Qk)}reflect(t){return this.sub(Qk.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 Qk=new O,O4=new co;class Bs{constructor(t=new O(1/0,1/0,1/0),e=new O(-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;e=this.min.x&&t.x<=this.max.x&&t.y>=this.min.y&&t.y<=this.max.y&&t.z>=this.min.z&&t.z<=this.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.x>=this.min.x&&t.min.x<=this.max.x&&t.max.y>=this.min.y&&t.min.y<=this.max.y&&t.max.z>=this.min.z&&t.min.z<=this.max.z}intersectsSphere(t){return this.clampPoint(t.center,xl),xl.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(Mb),GC.subVectors(this.max,Mb),fg.subVectors(t.a,Mb),pg.subVectors(t.b,Mb),mg.subVectors(t.c,Mb),Cu.subVectors(pg,fg),Su.subVectors(mg,pg),Jh.subVectors(fg,mg);let e=[0,-Cu.z,Cu.y,0,-Su.z,Su.y,0,-Jh.z,Jh.y,Cu.z,0,-Cu.x,Su.z,0,-Su.x,Jh.z,0,-Jh.x,-Cu.y,Cu.x,0,-Su.y,Su.x,0,-Jh.y,Jh.x,0];return!(!Jk(e,fg,pg,mg,GC)||(e=[1,0,0,0,1,0,0,0,1],!Jk(e,fg,pg,mg,GC)))&&($C.crossVectors(Cu,Su),e=[$C.x,$C.y,$C.z],Jk(e,fg,pg,mg,GC))}clampPoint(t,e){return e.copy(t).clamp(this.min,this.max)}distanceToPoint(t){return this.clampPoint(t,xl).distanceTo(t)}getBoundingSphere(t){return this.isEmpty()?t.makeEmpty():(this.getCenter(t.center),t.radius=.5*this.getSize(xl).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()||(td[0].set(this.min.x,this.min.y,this.min.z).applyMatrix4(t),td[1].set(this.min.x,this.min.y,this.max.z).applyMatrix4(t),td[2].set(this.min.x,this.max.y,this.min.z).applyMatrix4(t),td[3].set(this.min.x,this.max.y,this.max.z).applyMatrix4(t),td[4].set(this.max.x,this.min.y,this.min.z).applyMatrix4(t),td[5].set(this.max.x,this.min.y,this.max.z).applyMatrix4(t),td[6].set(this.max.x,this.max.y,this.min.z).applyMatrix4(t),td[7].set(this.max.x,this.max.y,this.max.z).applyMatrix4(t),this.setFromPoints(td)),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 td=[new O,new O,new O,new O,new O,new O,new O,new O],xl=new O,HC=new Bs,fg=new O,pg=new O,mg=new O,Cu=new O,Su=new O,Jh=new O,Mb=new O,GC=new O,$C=new O,ef=new O;function Jk(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),d=n.dot(ef);if(Math.max(-Math.max(l,c,d),Math.min(l,c,d))>a)return!1}return!0}const sae=new Bs,Cb=new O,eP=new O;class Us{constructor(t=new O,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):sae.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;Cb.subVectors(t,this.center);const e=Cb.lengthSq();if(e>this.radius*this.radius){const n=Math.sqrt(e),r=.5*(n-this.radius);this.center.addScaledVector(Cb,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):(eP.subVectors(t.center,this.center).setLength(t.radius),this.expandByPoint(Cb.copy(t.center).add(eP)),this.expandByPoint(Cb.copy(t.center).sub(eP))),this)}equals(t){return t.center.equals(this.center)&&t.radius===this.radius}clone(){return(new this.constructor).copy(this)}}const nd=new O,tP=new O,WC=new O,Eu=new O,nP=new O,jC=new O,iP=new O;class Sb{constructor(t=new O,e=new O(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,nd)),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=nd.subVectors(t,this.origin).dot(this.direction);return e<0?this.origin.distanceToSquared(t):(nd.copy(this.origin).addScaledVector(this.direction,e),nd.distanceToSquared(t))}distanceSqToSegment(t,e,n,r){tP.copy(t).add(e).multiplyScalar(.5),WC.copy(e).sub(t).normalize(),Eu.copy(this.origin).sub(tP);const s=.5*t.distanceTo(e),o=-this.direction.dot(WC),a=Eu.dot(this.direction),l=-Eu.dot(WC),c=Eu.lengthSq(),d=Math.abs(1-o*o);let h,p,m,g;if(d>0)if(h=o*l-a,p=o*a-l,g=s*d,h>=0)if(p>=-g)if(p<=g){const b=1/d;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(tP).addScaledVector(WC,p),m}intersectSphere(t,e){nd.subVectors(t.center,this.origin);const n=nd.dot(this.direction),r=nd.dot(nd)-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,d=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),d>=0?(s=(t.min.y-p.y)*d,o=(t.max.y-p.y)*d):(s=(t.max.y-p.y)*d,o=(t.min.y-p.y)*d),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,nd)}intersectTriangle(t,e,n,r,s){nP.subVectors(e,t),jC.subVectors(n,t),iP.crossVectors(nP,jC);let a,o=this.direction.dot(iP);if(o>0){if(r)return null;a=1}else{if(!(o<0))return null;a=-1,o=-o}Eu.subVectors(this.origin,t);const l=a*this.direction.dot(jC.crossVectors(Eu,jC));if(l<0)return null;const c=a*this.direction.dot(nP.cross(Eu));if(c<0||l+c>o)return null;const d=-a*Eu.dot(iP);return d<0?null:this.at(d/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 Nt{constructor(t,e,n,r,s,o,a,l,c,d,h,p,m,g,b,v){Nt.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,d,h,p,m,g,b,v)}set(t,e,n,r,s,o,a,l,c,d,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]=d,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 Nt).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/gg.setFromMatrixColumn(t,0).length(),s=1/gg.setFromMatrixColumn(t,1).length(),o=1/gg.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),d=Math.cos(s),h=Math.sin(s);if("XYZ"===t.order){const p=o*d,m=o*h,g=a*d,b=a*h;e[0]=l*d,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*d,m=l*h,g=c*d,b=c*h;e[0]=p+b*a,e[4]=g*a-m,e[8]=o*c,e[1]=o*h,e[5]=o*d,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*d,m=l*h,g=c*d,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*d,e[9]=b-p*a,e[2]=-o*c,e[6]=a,e[10]=o*l}else if("ZYX"===t.order){const p=o*d,m=o*h,g=a*d,b=a*h;e[0]=l*d,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*d,e[4]=b-p*h,e[8]=g*h+m,e[1]=h,e[5]=o*d,e[9]=-a*d,e[2]=-c*d,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*d,e[4]=-h,e[8]=c*d,e[1]=p*h+b,e[5]=o*d,e[9]=m*h-g,e[2]=g*h-m,e[6]=a*d,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(oae,t,aae)}lookAt(t,e,n){const r=this.elements;return ea.subVectors(t,e),0===ea.lengthSq()&&(ea.z=1),ea.normalize(),Au.crossVectors(n,ea),0===Au.lengthSq()&&(1===Math.abs(n.z)?ea.x+=1e-4:ea.z+=1e-4,ea.normalize(),Au.crossVectors(n,ea)),Au.normalize(),YC.crossVectors(ea,Au),r[0]=Au.x,r[4]=YC.x,r[8]=ea.x,r[1]=Au.y,r[5]=YC.y,r[9]=ea.y,r[2]=Au.z,r[6]=YC.z,r[10]=ea.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],d=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],F=n[15],D=r[0],k=r[4],B=r[8],T=r[12],A=r[1],$=r[5],ie=r[9],ne=r[13],se=r[2],ge=r[6],q=r[10],re=r[14],J=r[3],we=r[7],Ne=r[11],Ye=r[15];return s[0]=o*D+a*A+l*se+c*J,s[4]=o*k+a*$+l*ge+c*we,s[8]=o*B+a*ie+l*q+c*Ne,s[12]=o*T+a*ne+l*re+c*Ye,s[1]=d*D+h*A+p*se+m*J,s[5]=d*k+h*$+p*ge+m*we,s[9]=d*B+h*ie+p*q+m*Ne,s[13]=d*T+h*ne+p*re+m*Ye,s[2]=g*D+b*A+v*se+y*J,s[6]=g*k+b*$+v*ge+y*we,s[10]=g*B+b*ie+v*q+y*Ne,s[14]=g*T+b*ne+v*re+y*Ye,s[3]=M*D+x*A+C*se+F*J,s[7]=M*k+x*$+C*ge+F*we,s[11]=M*B+x*ie+C*q+F*Ne,s[15]=M*T+x*ne+C*re+F*Ye,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],d=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*d-s*l*d)+t[11]*(+e*c*h-e*a*m-s*o*h+n*o*m+s*a*d-n*c*d)+t[15]*(-r*a*d-e*l*h+e*a*p+r*o*h-n*o*p+n*l*d)}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],d=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-d*v*c-g*l*m+o*v*m+d*l*y-o*p*y,C=d*b*c-g*h*c+g*a*m-o*b*m-d*a*y+o*h*y,F=g*h*l-d*b*l-g*a*p+o*b*p+d*a*v-o*h*v,D=e*M+n*x+r*C+s*F;if(0===D)return this.set(0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0);const k=1/D;return t[0]=M*k,t[1]=(b*p*s-h*v*s-b*r*m+n*v*m+h*r*y-n*p*y)*k,t[2]=(a*v*s-b*l*s+b*r*c-n*v*c-a*r*y+n*l*y)*k,t[3]=(h*l*s-a*p*s-h*r*c+n*p*c+a*r*m-n*l*m)*k,t[4]=x*k,t[5]=(d*v*s-g*p*s+g*r*m-e*v*m-d*r*y+e*p*y)*k,t[6]=(g*l*s-o*v*s-g*r*c+e*v*c+o*r*y-e*l*y)*k,t[7]=(o*p*s-d*l*s+d*r*c-e*p*c-o*r*m+e*l*m)*k,t[8]=C*k,t[9]=(g*h*s-d*b*s-g*n*m+e*b*m+d*n*y-e*h*y)*k,t[10]=(o*b*s-g*a*s+g*n*c-e*b*c-o*n*y+e*a*y)*k,t[11]=(d*a*s-o*h*s-d*n*c+e*h*c+o*n*m-e*a*m)*k,t[12]=F*k,t[13]=(d*b*r-g*h*r+g*n*p-e*b*p-d*n*v+e*h*v)*k,t[14]=(g*a*r-o*b*r-g*n*l+e*b*l+o*n*v-e*a*v)*k,t[15]=(o*h*r-d*a*r+d*n*l-e*h*l-o*n*p+e*a*p)*k,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,d=s*a;return this.set(c*o+n,c*a-r*l,c*l+r*a,0,c*a+r*l,d*a+n,d*l-r*o,0,c*l-r*a,d*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,d=o+o,h=a+a,p=s*c,m=s*d,g=s*h,b=o*d,v=o*h,y=a*h,M=l*c,x=l*d,C=l*h,F=n.x,D=n.y,k=n.z;return r[0]=(1-(b+y))*F,r[1]=(m+C)*F,r[2]=(g-x)*F,r[3]=0,r[4]=(m-C)*D,r[5]=(1-(p+y))*D,r[6]=(v+M)*D,r[7]=0,r[8]=(g+x)*k,r[9]=(v-M)*k,r[10]=(1-(p+b))*k,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=gg.set(r[0],r[1],r[2]).length();const o=gg.set(r[4],r[5],r[6]).length(),a=gg.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],wl.copy(this);const c=1/s,d=1/o,h=1/a;return wl.elements[0]*=c,wl.elements[1]*=c,wl.elements[2]*=c,wl.elements[4]*=d,wl.elements[5]*=d,wl.elements[6]*=d,wl.elements[8]*=h,wl.elements[9]*=h,wl.elements[10]*=h,e.setFromRotationMatrix(wl),n.x=s,n.y=o,n.z=a,this}makePerspective(t,e,n,r,s,o,a=ed){const l=this.elements,c=2*s/(e-t),d=2*s/(n-r),h=(e+t)/(e-t),p=(n+r)/(n-r);let m,g;if(a===ed)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]=d,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=ed){const l=this.elements,c=1/(e-t),d=1/(n-r),h=1/(o-s),p=(e+t)*c,m=(n+r)*d;let g,b;if(a===ed)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*d,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 gg=new O,wl=new Nt,oae=new O(0,0,0),aae=new O(1,1,1),Au=new O,YC=new O,ea=new O,F4=new Nt,L4=new co;let id=(()=>{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],d=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,d),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,d)):(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,d)):(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,d));break;case"YZX":this._z=Math.asin(Ji(c,-1,1)),Math.abs(c)<.9999999?(this._x=Math.atan2(-h,d),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,d),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 F4.makeRotationFromQuaternion(e),this.setFromRotationMatrix(F4,n,r)}setFromVector3(e,n=this._order){return this.set(e.x,e.y,e.z,n)}reorder(e){return L4.setFromEuler(this),this.setFromQuaternion(L4,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 rP{constructor(){this.mask=1}set(t){this.mask=(1<>>0}enable(t){this.mask|=1<{class i extends og{constructor(){super(),this.isObject3D=!0,Object.defineProperty(this,"id",{value:lae++}),this.uuid=Jo(),this.name="",this.type="Object3D",this.parent=null,this.children=[],this.up=i.DEFAULT_UP.clone();const e=new O,n=new id,r=new co,s=new O(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 Nt},normalMatrix:{value:new wn}}),this.matrix=new Nt,this.matrixWorld=new Nt,this.matrixAutoUpdate=i.DEFAULT_MATRIX_AUTO_UPDATE,this.matrixWorldAutoUpdate=i.DEFAULT_MATRIX_WORLD_AUTO_UPDATE,this.matrixWorldNeedsUpdate=!1,this.layers=new rP,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 _g.setFromAxisAngle(e,n),this.quaternion.multiply(_g),this}rotateOnWorldAxis(e,n){return _g.setFromAxisAngle(e,n),this.quaternion.premultiply(_g),this}rotateX(e){return this.rotateOnAxis(B4,e)}rotateY(e){return this.rotateOnAxis(U4,e)}rotateZ(e){return this.rotateOnAxis(V4,e)}translateOnAxis(e,n){return N4.copy(e).applyQuaternion(this.quaternion),this.position.add(N4.multiplyScalar(n)),this}translateX(e){return this.translateOnAxis(B4,e)}translateY(e){return this.translateOnAxis(U4,e)}translateZ(e){return this.translateOnAxis(V4,e)}localToWorld(e){return this.updateWorldMatrix(!0,!1),e.applyMatrix4(this.matrixWorld)}worldToLocal(e){return this.updateWorldMatrix(!0,!1),e.applyMatrix4(rd.copy(this.matrixWorld).invert())}lookAt(e,n,r){e.isVector3?qC.copy(e):qC.set(e,n,r);const s=this.parent;this.updateWorldMatrix(!0,!1),Eb.setFromMatrixPosition(this.matrixWorld),this.isCamera||this.isLight?rd.lookAt(Eb,qC,this.up):rd.lookAt(qC,Eb,this.up),this.quaternion.setFromRotationMatrix(rd),s&&(rd.extractRotation(s.matrixWorld),_g.setFromRotationMatrix(rd),this.quaternion.premultiply(_g.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.maxInstanceCount=this._maxInstanceCount,s.maxVertexCount=this._maxVertexCount,s.maxIndexCount=this._maxIndexCount,s.geometryInitialized=this._geometryInitialized,s.geometryCount=this._geometryCount,s.matricesTexture=this._matricesTexture.toJSON(e),null!==this._colorsTexture&&(s.colorsTexture=this._colorsTexture.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 d=0,h=c.length;d0){s.children=[];for(let l=0;l0){s.animations=[];for(let l=0;l0&&(r.geometries=l),c.length>0&&(r.materials=c),d.length>0&&(r.textures=d),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 d in l){const h=l[d];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){Ml.subVectors(r,e),sd.subVectors(n,e),oP.subVectors(t,e);const o=Ml.dot(Ml),a=Ml.dot(sd),l=Ml.dot(oP),c=sd.dot(sd),d=sd.dot(oP),h=o*c-a*a;if(0===h)return s.set(0,0,0),null;const p=1/h,m=(c*l-a*d)*p,g=(o*d-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,od)&&od.x>=0&&od.y>=0&&od.x+od.y<=1}static getInterpolation(t,e,n,r,s,o,a,l){return null===this.getBarycoord(t,e,n,r,od)?(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,od.x),l.addScaledVector(o,od.y),l.addScaledVector(a,od.z),l)}static isFrontFacing(t,e,n,r){return Ml.subVectors(n,e),sd.subVectors(t,e),Ml.cross(sd).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 Ml.subVectors(this.c,this.b),sd.subVectors(this.a,this.b),.5*Ml.cross(sd).length()}getMidpoint(t){return t.addVectors(this.a,this.b).add(this.c).multiplyScalar(1/3)}getNormal(t){return Oa.getNormal(this.a,this.b,this.c,t)}getPlane(t){return t.setFromCoplanarPoints(this.a,this.b,this.c)}getBarycoord(t,e){return Oa.getBarycoord(t,this.a,this.b,this.c,e)}getInterpolation(t,e,n,r,s){return Oa.getInterpolation(t,this.a,this.b,this.c,e,n,r,s)}containsPoint(t){return Oa.containsPoint(t,this.a,this.b,this.c)}isFrontFacing(t){return Oa.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;yg.subVectors(r,n),bg.subVectors(s,n),aP.subVectors(t,n);const l=yg.dot(aP),c=bg.dot(aP);if(l<=0&&c<=0)return e.copy(n);lP.subVectors(t,r);const d=yg.dot(lP),h=bg.dot(lP);if(d>=0&&h<=d)return e.copy(r);const p=l*h-d*c;if(p<=0&&l>=0&&d<=0)return o=l/(l-d),e.copy(n).addScaledVector(yg,o);cP.subVectors(t,s);const m=yg.dot(cP),g=bg.dot(cP);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(bg,a);const v=d*g-m*h;if(v<=0&&h-d>=0&&m-g>=0)return H4.subVectors(s,r),a=(h-d)/(h-d+(m-g)),e.copy(r).addScaledVector(H4,a);const y=1/(v+b+p);return o=b*y,a=p*y,e.copy(n).addScaledVector(yg,o).addScaledVector(bg,a)}equals(t){return t.a.equals(this.a)&&t.b.equals(this.b)&&t.c.equals(this.c)}}const G4={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},Du={h:0,s:0,l:0},XC={h:0,s:0,l:0};function dP(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 qe{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=cs){return t=Math.floor(t),this.r=(t>>16&255)/255,this.g=(t>>8&255)/255,this.b=(255&t)/255,Jn.toWorkingColorSpace(this,e),this}setRGB(t,e,n,r=Jn.workingColorSpace){return this.r=t,this.g=e,this.b=n,Jn.toWorkingColorSpace(this,r),this}setHSL(t,e,n,r=Jn.workingColorSpace){if(t=Yk(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=dP(o,s,t+1/3),this.g=dP(o,s,t),this.b=dP(o,s,t-1/3)}return Jn.toWorkingColorSpace(this,r),this}setStyle(t,e=cs){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=cs){const n=G4[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=dg(t.r),this.g=dg(t.g),this.b=dg(t.b),this}copyLinearToSRGB(t){return this.r=Xk(t.r),this.g=Xk(t.g),this.b=Xk(t.b),this}convertSRGBToLinear(){return this.copySRGBToLinear(this),this}convertLinearToSRGB(){return this.copyLinearToSRGB(this),this}getHex(t=cs){return Jn.fromWorkingColorSpace(Vs.copy(this),t),65536*Math.round(Ji(255*Vs.r,0,255))+256*Math.round(Ji(255*Vs.g,0,255))+Math.round(Ji(255*Vs.b,0,255))}getHexString(t=cs){return("000000"+this.getHex(t).toString(16)).slice(-6)}getHSL(t,e=Jn.workingColorSpace){Jn.fromWorkingColorSpace(Vs.copy(this),e);const n=Vs.r,r=Vs.g,s=Vs.b,o=Math.max(n,r,s),a=Math.min(n,r,s);let l,c;const d=(a+o)/2;if(a===o)l=0,c=0;else{const h=o-a;switch(c=d<=.5?h/(o+a):h/(2-o-a),o){case n:l=(r-s)/h+(r0!=t>0&&this.version++,this._alphaTest=t}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.dispersion&&(n.dispersion=this.dispersion),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!==Zm&&(n.blending=this.blending),this.side!==ac&&(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!==ak&&(n.blendSrc=this.blendSrc),this.blendDst!==lk&&(n.blendDst=this.blendDst),this.blendEquation!==Xh&&(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!==SC&&(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!==sg&&(n.stencilFail=this.stencilFail),this.stencilZFail!==sg&&(n.stencilZFail=this.stencilZFail),this.stencilZPass!==sg&&(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++}onBuild(){console.warn("Material: onBuild() has been removed.")}onBeforeRender(){console.warn("Material: onBeforeRender() has been removed.")}}class qi extends Po{constructor(t){super(),this.isMeshBasicMaterial=!0,this.type="MeshBasicMaterial",this.color=new qe(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 id,this.combine=EC,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 vr=new O,KC=new xe;class Hi{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=Qo,this.version=0}onUploadCallback(){}set needsUpdate(t){!0===t&&this.version++}get updateRange(){return cg("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],d=[];for(let h=0,p=c.length;h0&&(r[l]=d,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 d=[],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))&&(j4.copy(s).invert(),tf.copy(t.ray).applyMatrix4(j4),(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,d=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:iS.clone(),object:i}}(i,t,e,n,wg,Mg,Cg,nS);if(d){r&&(JC.fromBufferAttribute(r,a),eS.fromBufferAttribute(r,l),tS.fromBufferAttribute(r,c),d.uv=Oa.getInterpolation(nS,wg,Mg,Cg,JC,eS,tS,new xe)),s&&(JC.fromBufferAttribute(s,a),eS.fromBufferAttribute(s,l),tS.fromBufferAttribute(s,c),d.uv1=Oa.getInterpolation(nS,wg,Mg,Cg,JC,eS,tS,new xe)),o&&(q4.fromBufferAttribute(o,a),X4.fromBufferAttribute(o,l),K4.fromBufferAttribute(o,c),d.normal=Oa.getInterpolation(nS,wg,Mg,Cg,q4,X4,K4,new O),d.normal.dot(n.direction)>0&&d.normal.multiplyScalar(-1));const h={a,b:l,c,normal:new O,materialIndex:0};Oa.getNormal(wg,Mg,Cg,h.normal),d.face=h}return d}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=[],d=[],h=[];let p=0,m=0;function g(b,v,y,M,x,C,F,D,k,B,T){const A=C/k,$=F/B,ie=C/2,ne=F/2,se=D/2,ge=k+1,q=B+1;let re=0,J=0;const we=new O;for(let Ne=0;Ne0?1:-1,d.push(we.x,we.y,we.z),h.push(Tt/k),h.push(1-Ne/B),re+=1}for(let Ne=0;Ne0&&(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 fP extends Or{constructor(){super(),this.isCamera=!0,this.type="Camera",this.matrixWorldInverse=new Nt,this.projectionMatrix=new Nt,this.projectionMatrixInverse=new Nt,this.coordinateSystem=ed}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 Tu=new O,J4=new xe,e5=new xe;class yr extends fP{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*ag*Math.atan(e),this.updateProjectionMatrix()}getFocalLength(){const t=Math.tan(.5*Qh*this.fov);return.5*this.getFilmHeight()/t}getEffectiveFOV(){return 2*ag*Math.atan(Math.tan(.5*Qh*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){Tu.set(-1,-1,.5).applyMatrix4(this.projectionMatrixInverse),e.set(Tu.x,Tu.y).multiplyScalar(-t/Tu.z),Tu.set(1,1,.5).applyMatrix4(this.projectionMatrixInverse),n.set(Tu.x,Tu.y).multiplyScalar(-t/Tu.z)}getViewSize(t,e){return this.getViewBounds(t,J4,e5),e.subVectors(e5,J4)}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*Qh*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 yae extends Or{constructor(t,e,n){super(),this.type="CubeCamera",this.renderTarget=n,this.coordinateSystem=null,this.activeMipmapLevel=0;const r=new yr(-90,1,t,e);r.layers=this.layers,this.add(r);const s=new yr(-90,1,t,e);s.layers=this.layers,this.add(s);const o=new yr(-90,1,t,e);o.layers=this.layers,this.add(o);const a=new yr(-90,1,t,e);a.layers=this.layers,this.add(a);const l=new yr(-90,1,t,e);l.layers=this.layers,this.add(l);const c=new yr(-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===ed)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,d]=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,d),t.setRenderTarget(h,p,m),t.xr.enabled=g,n.texture.needsPMREMUpdate=!0}}class sS extends ko{constructor(t,e,n,r,s,o,a,l,c,d){super(t=void 0!==t?t:[],e=void 0!==e?e:Qc,n,r,s,o,a,l,c,d),this.isCubeTexture=!0,this.flipY=!1}get images(){return this.image}set images(t){this.image=t}}class bae extends Mu{constructor(t=1,e={}){super(t,t,e),this.isWebGLCubeRenderTarget=!0;const n={width:t,height:t,depth:1};this.texture=new sS([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:lr}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 Cl({name:"CubemapFromEquirect",uniforms:Sg(n_uniforms),vertexShader:n_vertexShader,fragmentShader:n_fragmentShader,side:Io,blending:Zc});s.uniforms.tEquirect.value=e;const o=new Mn(r,s),a=e.minFilter;return e.minFilter===bl&&(e.minFilter=lr),new yae(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 pP=new O,xae=new O,wae=new wn;class rf{constructor(t=new O(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=pP.subVectors(n,e).cross(xae.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(pP),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||wae.getNormalMatrix(t),r=this.coplanarPoint(pP).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 Us,oS=new O;class aS{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=ed){const n=this.planes,r=t.elements,s=r[0],o=r[1],a=r[2],l=r[3],c=r[4],d=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+d,v+g,C+M).normalize(),n[3].setComponents(l-o,p-d,v-g,C-M).normalize(),n[4].setComponents(l-a,p-h,v-b,C-x).normalize(),e===ed)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,oS.y=r.normal.y>0?t.max.y:t.min.y,oS.z=r.normal.z>0?t.max.z:t.min.z,r.distanceToPoint(oS)<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 t5(){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 Mae(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.isInterleavedBufferAttribute&&(a=a.data),a.isGLBufferAttribute){const d=t.get(a);return void((!d||d.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 ) || defined( USE_BATCHING_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 ) || defined( USE_BATCHING_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\n#ifdef USE_BATCHING_COLOR\n\tvec3 batchingColor = getBatchingColor( getIndirectIndex( gl_DrawID ) );\n\tvColor.xyz *= batchingColor.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}\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}",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_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\tfloat distanceFalloff = 1.0 / max( pow( lightDistance, decayExponent ), 0.01 );\n\tif ( cutoffDistance > 0.0 ) {\n\t\tdistanceFalloff *= pow2( saturate( 1.0 - pow4( lightDistance / cutoffDistance ) ) );\n\t}\n\treturn distanceFalloff;\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_DISPERSION\n\tmaterial.dispersion = dispersion;\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\tfloat dispersion;\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.shadowIntensity, 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.shadowIntensity, 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.shadowIntensity, 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 )\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\tfor ( int i = 0; i < MORPHTARGETS_COUNT; i ++ ) {\n\t\tif ( morphTargetInfluences[ i ] != 0.0 ) objectNormal += getMorph( gl_VertexID, i, 1 ).xyz * morphTargetInfluences[ i ];\n\t}\n#endif",morphtarget_pars_vertex:"#ifdef USE_MORPHTARGETS\n\t#ifndef USE_INSTANCING_MORPH\n\t\tuniform float morphTargetBaseInfluence;\n\t\tuniform float morphTargetInfluences[ MORPHTARGETS_COUNT ];\n\t#endif\n\tuniform sampler2DArray morphTargetsTexture;\n\tuniform ivec2 morphTargetsTextureSize;\n\tvec4 getMorph( const in int vertexIndex, const in int morphTargetIndex, const in int offset ) {\n\t\tint texelIndex = vertexIndex * MORPHTARGETS_TEXTURE_STRIDE + offset;\n\t\tint y = texelIndex / morphTargetsTextureSize.x;\n\t\tint x = texelIndex - y * morphTargetsTextureSize.x;\n\t\tivec3 morphUV = ivec3( x, y, morphTargetIndex );\n\t\treturn texelFetch( morphTargetsTexture, morphUV, 0 );\n\t}\n#endif",morphtarget_vertex:"#ifdef USE_MORPHTARGETS\n\ttransformed *= morphTargetBaseInfluence;\n\tfor ( int i = 0; i < MORPHTARGETS_COUNT; i ++ ) {\n\t\tif ( morphTargetInfluences[ i ] != 0.0 ) transformed += getMorph( gl_VertexID, i, 0 ).xyz * morphTargetInfluences[ i ];\n\t}\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.;const float ShiftRight8 = 1. / 256.;\nconst float Inv255 = 1. / 255.;\nconst vec4 PackFactors = vec4( 1.0, 256.0, 256.0 * 256.0, 256.0 * 256.0 * 256.0 );\nconst vec2 UnpackFactors2 = vec2( UnpackDownscale, 1.0 / PackFactors.g );\nconst vec3 UnpackFactors3 = vec3( UnpackDownscale / PackFactors.rg, 1.0 / PackFactors.b );\nconst vec4 UnpackFactors4 = vec4( UnpackDownscale / PackFactors.rgb, 1.0 / PackFactors.a );\nvec4 packDepthToRGBA( const in float v ) {\n\tif( v <= 0.0 )\n\t\treturn vec4( 0., 0., 0., 0. );\n\tif( v >= 1.0 )\n\t\treturn vec4( 1., 1., 1., 1. );\n\tfloat vuf;\n\tfloat af = modf( v * PackFactors.a, vuf );\n\tfloat bf = modf( vuf * ShiftRight8, vuf );\n\tfloat gf = modf( vuf * ShiftRight8, vuf );\n\treturn vec4( vuf * Inv255, gf * PackUpscale, bf * PackUpscale, af );\n}\nvec3 packDepthToRGB( const in float v ) {\n\tif( v <= 0.0 )\n\t\treturn vec3( 0., 0., 0. );\n\tif( v >= 1.0 )\n\t\treturn vec3( 1., 1., 1. );\n\tfloat vuf;\n\tfloat bf = modf( v * PackFactors.b, vuf );\n\tfloat gf = modf( vuf * ShiftRight8, vuf );\n\treturn vec3( vuf * Inv255, gf * PackUpscale, bf );\n}\nvec2 packDepthToRG( const in float v ) {\n\tif( v <= 0.0 )\n\t\treturn vec2( 0., 0. );\n\tif( v >= 1.0 )\n\t\treturn vec2( 1., 1. );\n\tfloat vuf;\n\tfloat gf = modf( v * 256., vuf );\n\treturn vec2( vuf * Inv255, gf );\n}\nfloat unpackRGBAToDepth( const in vec4 v ) {\n\treturn dot( v, UnpackFactors4 );\n}\nfloat unpackRGBToDepth( const in vec3 v ) {\n\treturn dot( v, UnpackFactors3 );\n}\nfloat unpackRGToDepth( const in vec2 v ) {\n\treturn v.r * UnpackFactors2.r + v.g * UnpackFactors2.g;\n}\nvec4 pack2HalfToRGBA( const in 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( const in 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 shadowIntensity;\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 shadowIntensity;\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 shadowIntensity;\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 shadowIntensity, 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 mix( 1.0, shadow, shadowIntensity );\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 shadowIntensity, 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 mix( 1.0, shadow, shadowIntensity );\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 shadowIntensity;\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 shadowIntensity;\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 shadowIntensity;\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.shadowIntensity, 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.shadowIntensity, 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.shadowIntensity, 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\tconst float StartCompression = 0.8 - 0.04;\n\tconst float 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, vec3( newPeak ), 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.dispersion, 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 dispersion, const in float ior, const in float thickness,\n\t\tconst in vec3 attenuationColor, const in float attenuationDistance ) {\n\t\tvec4 transmittedLight;\n\t\tvec3 transmittance;\n\t\t#ifdef USE_DISPERSION\n\t\t\tfloat halfSpread = ( ior - 1.0 ) * 0.025 * dispersion;\n\t\t\tvec3 iors = vec3( ior - halfSpread, ior, ior + halfSpread );\n\t\t\tfor ( int i = 0; i < 3; i ++ ) {\n\t\t\t\tvec3 transmissionRay = getVolumeTransmissionRay( n, v, thickness, iors[ i ], modelMatrix );\n\t\t\t\tvec3 refractedRayExit = position + transmissionRay;\n\t\t\n\t\t\t\tvec4 ndcPos = projMatrix * viewMatrix * vec4( refractedRayExit, 1.0 );\n\t\t\t\tvec2 refractionCoords = ndcPos.xy / ndcPos.w;\n\t\t\t\trefractionCoords += 1.0;\n\t\t\t\trefractionCoords /= 2.0;\n\t\t\n\t\t\t\tvec4 transmissionSample = getTransmissionSample( refractionCoords, roughness, iors[ i ] );\n\t\t\t\ttransmittedLight[ i ] = transmissionSample[ i ];\n\t\t\t\ttransmittedLight.a += transmissionSample.a;\n\t\t\t\ttransmittance[ i ] = diffuseColor[ i ] * volumeAttenuation( length( transmissionRay ), attenuationColor, attenuationDistance )[ i ];\n\t\t\t}\n\t\t\ttransmittedLight.a /= 3.0;\n\t\t\n\t\t#else\n\t\t\n\t\t\tvec3 transmissionRay = getVolumeTransmissionRay( n, v, thickness, ior, modelMatrix );\n\t\t\tvec3 refractedRayExit = position + transmissionRay;\n\t\t\tvec4 ndcPos = projMatrix * viewMatrix * vec4( refractedRayExit, 1.0 );\n\t\t\tvec2 refractionCoords = ndcPos.xy / ndcPos.w;\n\t\t\trefractionCoords += 1.0;\n\t\t\trefractionCoords /= 2.0;\n\t\t\ttransmittedLight = getTransmissionSample( refractionCoords, roughness, ior );\n\t\t\ttransmittance = diffuseColor * volumeAttenuation( length( transmissionRay ), attenuationColor, attenuationDistance );\n\t\t\n\t\t#endif\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#elif DEPTH_PACKING == 3202\n\t\tgl_FragColor = vec4( packDepthToRGB( fragCoordZ ), 1.0 );\n\t#elif DEPTH_PACKING == 3203\n\t\tgl_FragColor = vec4( packDepthToRG( fragCoordZ ), 0.0, 1.0 );\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_DISPERSION\n\tuniform float dispersion;\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}"},Qe={common:{diffuse:{value:new qe(16777215)},opacity:{value:1},map:{value:null},mapTransform:{value:new wn},alphaMap:{value:null},alphaMapTransform:{value:new wn},alphaTest:{value:0}},specularmap:{specularMap:{value:null},specularMapTransform:{value:new wn}},envmap:{envMap:{value:null},envMapRotation:{value:new wn},flipEnvMap:{value:-1},reflectivity:{value:1},ior:{value:1.5},refractionRatio:{value:.98}},aomap:{aoMap:{value:null},aoMapIntensity:{value:1},aoMapTransform:{value:new wn}},lightmap:{lightMap:{value:null},lightMapIntensity:{value:1},lightMapTransform:{value:new wn}},bumpmap:{bumpMap:{value:null},bumpMapTransform:{value:new wn},bumpScale:{value:1}},normalmap:{normalMap:{value:null},normalMapTransform:{value:new wn},normalScale:{value:new xe(1,1)}},displacementmap:{displacementMap:{value:null},displacementMapTransform:{value:new wn},displacementScale:{value:1},displacementBias:{value:0}},emissivemap:{emissiveMap:{value:null},emissiveMapTransform:{value:new wn}},metalnessmap:{metalnessMap:{value:null},metalnessMapTransform:{value:new wn}},roughnessmap:{roughnessMap:{value:null},roughnessMapTransform:{value:new wn}},gradientmap:{gradientMap:{value:null}},fog:{fogDensity:{value:25e-5},fogNear:{value:1},fogFar:{value:2e3},fogColor:{value:new qe(16777215)}},lights:{ambientLightColor:{value:[]},lightProbe:{value:[]},directionalLights:{value:[],properties:{direction:{},color:{}}},directionalLightShadows:{value:[],properties:{shadowIntensity:1,shadowBias:{},shadowNormalBias:{},shadowRadius:{},shadowMapSize:{}}},directionalShadowMap:{value:[]},directionalShadowMatrix:{value:[]},spotLights:{value:[],properties:{color:{},position:{},direction:{},distance:{},coneCos:{},penumbraCos:{},decay:{}}},spotLightShadows:{value:[],properties:{shadowIntensity:1,shadowBias:{},shadowNormalBias:{},shadowRadius:{},shadowMapSize:{}}},spotLightMap:{value:[]},spotShadowMap:{value:[]},spotLightMatrix:{value:[]},pointLights:{value:[],properties:{color:{},position:{},decay:{},distance:{}}},pointLightShadows:{value:[],properties:{shadowIntensity:1,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 qe(16777215)},opacity:{value:1},size:{value:1},scale:{value:1},map:{value:null},alphaMap:{value:null},alphaMapTransform:{value:new wn},alphaTest:{value:0},uvTransform:{value:new wn}},sprite:{diffuse:{value:new qe(16777215)},opacity:{value:1},center:{value:new xe(.5,.5)},rotation:{value:0},map:{value:null},mapTransform:{value:new wn},alphaMap:{value:null},alphaMapTransform:{value:new wn},alphaTest:{value:0}}},lc={basic:{uniforms:uo([Qe.common,Qe.specularmap,Qe.envmap,Qe.aomap,Qe.lightmap,Qe.fog]),vertexShader:Cn.meshbasic_vert,fragmentShader:Cn.meshbasic_frag},lambert:{uniforms:uo([Qe.common,Qe.specularmap,Qe.envmap,Qe.aomap,Qe.lightmap,Qe.emissivemap,Qe.bumpmap,Qe.normalmap,Qe.displacementmap,Qe.fog,Qe.lights,{emissive:{value:new qe(0)}}]),vertexShader:Cn.meshlambert_vert,fragmentShader:Cn.meshlambert_frag},phong:{uniforms:uo([Qe.common,Qe.specularmap,Qe.envmap,Qe.aomap,Qe.lightmap,Qe.emissivemap,Qe.bumpmap,Qe.normalmap,Qe.displacementmap,Qe.fog,Qe.lights,{emissive:{value:new qe(0)},specular:{value:new qe(1118481)},shininess:{value:30}}]),vertexShader:Cn.meshphong_vert,fragmentShader:Cn.meshphong_frag},standard:{uniforms:uo([Qe.common,Qe.envmap,Qe.aomap,Qe.lightmap,Qe.emissivemap,Qe.bumpmap,Qe.normalmap,Qe.displacementmap,Qe.roughnessmap,Qe.metalnessmap,Qe.fog,Qe.lights,{emissive:{value:new qe(0)},roughness:{value:1},metalness:{value:0},envMapIntensity:{value:1}}]),vertexShader:Cn.meshphysical_vert,fragmentShader:Cn.meshphysical_frag},toon:{uniforms:uo([Qe.common,Qe.aomap,Qe.lightmap,Qe.emissivemap,Qe.bumpmap,Qe.normalmap,Qe.displacementmap,Qe.gradientmap,Qe.fog,Qe.lights,{emissive:{value:new qe(0)}}]),vertexShader:Cn.meshtoon_vert,fragmentShader:Cn.meshtoon_frag},matcap:{uniforms:uo([Qe.common,Qe.bumpmap,Qe.normalmap,Qe.displacementmap,Qe.fog,{matcap:{value:null}}]),vertexShader:Cn.meshmatcap_vert,fragmentShader:Cn.meshmatcap_frag},points:{uniforms:uo([Qe.points,Qe.fog]),vertexShader:Cn.points_vert,fragmentShader:Cn.points_frag},dashed:{uniforms:uo([Qe.common,Qe.fog,{scale:{value:1},dashSize:{value:1},totalSize:{value:2}}]),vertexShader:Cn.linedashed_vert,fragmentShader:Cn.linedashed_frag},depth:{uniforms:uo([Qe.common,Qe.displacementmap]),vertexShader:Cn.depth_vert,fragmentShader:Cn.depth_frag},normal:{uniforms:uo([Qe.common,Qe.bumpmap,Qe.normalmap,Qe.displacementmap,{opacity:{value:1}}]),vertexShader:Cn.meshnormal_vert,fragmentShader:Cn.meshnormal_frag},sprite:{uniforms:uo([Qe.sprite,Qe.fog]),vertexShader:Cn.sprite_vert,fragmentShader:Cn.sprite_frag},background:{uniforms:{uvTransform:{value:new wn},t2D:{value:null},backgroundIntensity:{value:1}},vertexShader:Cn.background_vert,fragmentShader:Cn.background_frag},backgroundCube:{uniforms:{envMap:{value:null},flipEnvMap:{value:-1},backgroundBlurriness:{value:0},backgroundIntensity:{value:1},backgroundRotation:{value:new wn}},vertexShader:Cn.backgroundCube_vert,fragmentShader:Cn.backgroundCube_frag},cube:{uniforms:{tCube:{value:null},tFlip:{value:-1},opacity:{value:1}},vertexShader:Cn.cube_vert,fragmentShader:Cn.cube_frag},equirect:{uniforms:{tEquirect:{value:null}},vertexShader:Cn.equirect_vert,fragmentShader:Cn.equirect_frag},distanceRGBA:{uniforms:uo([Qe.common,Qe.displacementmap,{referencePosition:{value:new O},nearDistance:{value:1},farDistance:{value:1e3}}]),vertexShader:Cn.distanceRGBA_vert,fragmentShader:Cn.distanceRGBA_frag},shadow:{uniforms:uo([Qe.lights,Qe.fog,{color:{value:new qe(0)},opacity:{value:1}}]),vertexShader:Cn.shadow_vert,fragmentShader:Cn.shadow_frag}};lc.physical={uniforms:uo([lc.standard.uniforms,{clearcoat:{value:0},clearcoatMap:{value:null},clearcoatMapTransform:{value:new wn},clearcoatNormalMap:{value:null},clearcoatNormalMapTransform:{value:new wn},clearcoatNormalScale:{value:new xe(1,1)},clearcoatRoughness:{value:0},clearcoatRoughnessMap:{value:null},clearcoatRoughnessMapTransform:{value:new wn},dispersion:{value:0},iridescence:{value:0},iridescenceMap:{value:null},iridescenceMapTransform:{value:new wn},iridescenceIOR:{value:1.3},iridescenceThicknessMinimum:{value:100},iridescenceThicknessMaximum:{value:400},iridescenceThicknessMap:{value:null},iridescenceThicknessMapTransform:{value:new wn},sheen:{value:0},sheenColor:{value:new qe(0)},sheenColorMap:{value:null},sheenColorMapTransform:{value:new wn},sheenRoughness:{value:1},sheenRoughnessMap:{value:null},sheenRoughnessMapTransform:{value:new wn},transmission:{value:0},transmissionMap:{value:null},transmissionMapTransform:{value:new wn},transmissionSamplerSize:{value:new xe},transmissionSamplerMap:{value:null},thickness:{value:0},thicknessMap:{value:null},thicknessMapTransform:{value:new wn},attenuationDistance:{value:0},attenuationColor:{value:new qe(0)},specularColor:{value:new qe(1,1,1)},specularColorMap:{value:null},specularColorMapTransform:{value:new wn},specularIntensity:{value:1},specularIntensityMap:{value:null},specularIntensityMapTransform:{value:new wn},anisotropyVector:{value:new xe},anisotropyMap:{value:null},anisotropyMapTransform:{value:new wn}}]),vertexShader:Cn.meshphysical_vert,fragmentShader:Cn.meshphysical_frag};const lS={r:0,b:0,g:0},af=new id,Mce=new Nt;function Cce(i,t,e,n,r,s,o){const a=new qe(0);let c,d,l=!0===s?0:1,h=null,p=0,m=null;function g(M){let x=!0===M.isScene?M.background:null;return x&&x.isTexture&&(x=(M.backgroundBlurriness>0?e:t).get(x)),x}function y(M,x){M.getRGB(lS,Z4(i)),n.buffers.color.setClear(lS.r,lS.g,lS.b,x,o)}return{getClearColor:function(){return a},setClearColor:function(M,x=1){a.set(M),l=x,y(a,l)},getClearAlpha:function(){return l},setClearAlpha:function(M){l=M,y(a,l)},render:function b(M){let x=!1;const C=g(M);null===C?y(a,l):C&&C.isColor&&(y(C,1),x=!0);const F=i.xr.getEnvironmentBlendMode();"additive"===F?n.buffers.color.setClear(0,0,0,1,o):"alpha-blend"===F&&n.buffers.color.setClear(0,0,0,0,o),(i.autoClear||x)&&(n.buffers.depth.setTest(!0),n.buffers.depth.setMask(!0),n.buffers.color.setMask(!0),i.clear(i.autoClearColor,i.autoClearDepth,i.autoClearStencil))},addToRenderList:function v(M,x){const C=g(x);C&&(C.isCubeTexture||C.mapping===pb)?(void 0===d&&(d=new Mn(new nf(1,1,1),new Cl({name:"BackgroundCubeMaterial",uniforms:Sg(lc.backgroundCube.uniforms),vertexShader:lc.backgroundCube.vertexShader,fragmentShader:lc.backgroundCube.fragmentShader,side:Io,depthTest:!1,depthWrite:!1,fog:!1})),d.geometry.deleteAttribute("normal"),d.geometry.deleteAttribute("uv"),d.onBeforeRender=function(F,D,k){this.matrixWorld.copyPosition(k.matrixWorld)},Object.defineProperty(d.material,"envMap",{get:function(){return this.uniforms.envMap.value}}),r.update(d)),af.copy(x.backgroundRotation),af.x*=-1,af.y*=-1,af.z*=-1,C.isCubeTexture&&!1===C.isRenderTargetTexture&&(af.y*=-1,af.z*=-1),d.material.uniforms.envMap.value=C,d.material.uniforms.flipEnvMap.value=C.isCubeTexture&&!1===C.isRenderTargetTexture?-1:1,d.material.uniforms.backgroundBlurriness.value=x.backgroundBlurriness,d.material.uniforms.backgroundIntensity.value=x.backgroundIntensity,d.material.uniforms.backgroundRotation.value.setFromMatrix4(Mce.makeRotationFromEuler(af)),d.material.toneMapped=Jn.getTransfer(C.colorSpace)!==Fi,(h!==C||p!==C.version||m!==i.toneMapping)&&(d.material.needsUpdate=!0,h=C,p=C.version,m=i.toneMapping),d.layers.enableAll(),M.unshift(d,d.geometry,d.material,0,0,null)):C&&C.isTexture&&(void 0===c&&(c=new Mn(new Iu(2,2),new Cl({name:"BackgroundMaterial",uniforms:Sg(lc.background.uniforms),vertexShader:lc.background.vertexShader,fragmentShader:lc.background.fragmentShader,side:ac,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=C,c.material.uniforms.backgroundIntensity.value=x.backgroundIntensity,c.material.toneMapped=Jn.getTransfer(C.colorSpace)!==Fi,!0===C.matrixAutoUpdate&&C.updateMatrix(),c.material.uniforms.uvTransform.value.copy(C.matrix),(h!==C||p!==C.version||m!==i.toneMapping)&&(c.material.needsUpdate=!0,h=C,p=C.version,m=i.toneMapping),c.layers.enableAll(),M.unshift(c,c.geometry,c.material,0,0,null))}}}function Sce(i,t){const e=i.getParameter(i.MAX_VERTEX_ATTRIBS),n={},r=p(null);let s=r,o=!1;function c(A){return i.bindVertexArray(A)}function d(A){return i.deleteVertexArray(A)}function p(A){const $=[],ie=[],ne=[];for(let se=0;se=0){const Ne=se[J];let Ye=ge[J];if(void 0===Ye&&("instanceMatrix"===J&&A.instanceMatrix&&(Ye=A.instanceMatrix),"instanceColor"===J&&A.instanceColor&&(Ye=A.instanceColor)),void 0===Ne||Ne.attribute!==Ye||Ye&&Ne.data!==Ye.data)return!0;q++}return s.attributesNum!==q||s.index!==ne}(A,ne,ie,se),ge&&function g(A,$,ie,ne){const se={},ge=$.attributes;let q=0;const re=ie.getAttributes();for(const J in re)if(re[J].location>=0){let Ne=ge[J];void 0===Ne&&("instanceMatrix"===J&&A.instanceMatrix&&(Ne=A.instanceMatrix),"instanceColor"===J&&A.instanceColor&&(Ne=A.instanceColor));const Ye={};Ye.attribute=Ne,Ne&&Ne.data&&(Ye.data=Ne.data),se[J]=Ye,q++}s.attributes=se,s.attributesNum=q,s.index=ne}(A,ne,ie,se),null!==se&&t.update(se,i.ELEMENT_ARRAY_BUFFER),(ge||o)&&(o=!1,function C(A,$,ie,ne){b();const se=ne.attributes,ge=ie.getAttributes(),q=$.defaultAttributeValues;for(const re in ge){const J=ge[re];if(J.location>=0){let we=se[re];if(void 0===we&&("instanceMatrix"===re&&A.instanceMatrix&&(we=A.instanceMatrix),"instanceColor"===re&&A.instanceColor&&(we=A.instanceColor)),void 0!==we){const Ne=we.normalized,Ye=we.itemSize,Tt=t.get(we);if(void 0===Tt)continue;const en=Tt.buffer,ae=Tt.type,Oe=Tt.bytesPerElement,Ze=ae===i.INT||ae===i.UNSIGNED_INT||we.gpuType===uk;if(we.isInterleavedBufferAttribute){const Fe=we.data,bt=Fe.stride,Ct=we.offset;if(Fe.isInstancedInterleavedBuffer){for(let Mt=0;Mt0&&i.getShaderPrecisionFormat(i.FRAGMENT_SHADER,i.HIGH_FLOAT).precision>0)return"highp";D="mediump"}return"mediump"===D&&i.getShaderPrecisionFormat(i.VERTEX_SHADER,i.MEDIUM_FLOAT).precision>0&&i.getShaderPrecisionFormat(i.FRAGMENT_SHADER,i.MEDIUM_FLOAT).precision>0?"mediump":"lowp"}let c=void 0!==e.precision?e.precision:"highp";const d=l(c);d!==c&&(console.warn("THREE.WebGLRenderer:",c,"not supported, using",d,"instead."),c=d);const h=!0===e.logarithmicDepthBuffer,p=i.getParameter(i.MAX_TEXTURE_IMAGE_UNITS),m=i.getParameter(i.MAX_VERTEX_TEXTURE_IMAGE_UNITS);return{isWebGL2:!0,getMaxAnisotropy:function s(){if(void 0!==r)return r;if(!0===t.has("EXT_texture_filter_anisotropic")){const D=t.get("EXT_texture_filter_anisotropic");r=i.getParameter(D.MAX_TEXTURE_MAX_ANISOTROPY_EXT)}else r=0;return r},getMaxPrecision:l,textureFormatReadable:function o(D){return!(D!==Ro&&n.convert(D)!==i.getParameter(i.IMPLEMENTATION_COLOR_READ_FORMAT))},textureTypeReadable:function a(D){const k=D===Jm&&(t.has("EXT_color_buffer_half_float")||t.has("EXT_color_buffer_float"));return!(D!==Jc&&n.convert(D)!==i.getParameter(i.IMPLEMENTATION_COLOR_READ_TYPE)&&D!==Qo&&!k)},precision:c,logarithmicDepthBuffer:h,maxTextures:p,maxVertexTextures:m,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:m>0,maxSamples:i.getParameter(i.MAX_SAMPLES)}}function Dce(i){const t=this;let e=null,n=0,r=!1,s=!1;const o=new rf,a=new wn,l={value:null,needsUpdate:!1};function d(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=d(g,p,x,m);for(let F=0;F!==x;++F)C[F]=e[F];y.clippingState=C,this.numIntersection=b?this.numPlanes:0,this.numPlanes+=M}}}function Tce(i){let t=new WeakMap;function e(o,a){return a===AC?o.mapping=Qc:a===DC&&(o.mapping=Kh),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===AC||a===DC){if(t.has(o))return e(t.get(o).texture,o.mapping);{const l=o.image;if(l&&l.height>0){const c=new bae(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 Tb extends fP{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,d=(this.top-this.bottom)/this.view.fullHeight/this.zoom;s+=c*this.view.offsetX,o=s+c*this.view.width,a-=d*this.view.offsetY,l=a-d*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 n5=[.125,.215,.35,.446,.526,.582],mP=new Tb,r5=new qe;let gP=null,_P=0,vP=0,yP=!1;const cf=(1+Math.sqrt(5))/2,Tg=1/cf,s5=[new O(-cf,Tg,0),new O(cf,Tg,0),new O(-Tg,0,cf),new O(Tg,0,cf),new O(0,cf,-Tg),new O(0,cf,Tg),new O(-1,1,-1),new O(1,1,-1),new O(-1,1,1),new O(1,1,1)];class o5{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){gP=this._renderer.getRenderTarget(),_P=this._renderer.getActiveCubeFace(),vP=this._renderer.getActiveMipmapLevel(),yP=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=c5(),this._compileMaterial(this._cubemapMaterial))}compileEquirectangularShader(){null===this._equirectMaterial&&(this._equirectMaterial=l5(),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=n5[o-i+4-1]:0===o&&(l=0),n.push(l);const c=1/(a-2),d=-c,h=1+c,p=[d,d,h,d,h,h,d,d,h,h,d,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 D=0;D2?0:-1;M.set([k,B,0,k+2/3,B,0,k+2/3,B+1,0,k,B,0,k+2/3,B+1,0,k,B+1,0],b*g*D),x.set(p,v*g*D),C.set([D,D,D,D,D,D],y*g*D)}const F=new hn;F.setAttribute("position",new Hi(M,b)),F.setAttribute("uv",new Hi(x,v)),F.setAttribute("faceIndex",new Hi(C,y)),t.push(F),r>4&&r--}return{lodPlanes:t,sizeLods:e,sigmas:n}}(s)),this._blurMaterial=function Rce(i,t,e){const n=new Float32Array(20),r=new O(0,1,0);return new Cl({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:Zc,depthTest:!1,depthWrite:!1})}(s,t,e)}return r}_compileMaterial(t){const e=new Mn(this._lodPlanes[0],t);this._renderer.compile(e,mP)}_sceneToCubeUV(t,e,n,r){const a=new yr(90,1,e,n),l=[1,-1,1,1,1,1],c=[1,1,1,-1,-1,-1],d=this._renderer,h=d.autoClear,p=d.toneMapping;d.getClearColor(r5),d.toneMapping=bu,d.autoClear=!1;const m=new qi({name:"PMREM.Background",side:Io,depthWrite:!1,depthTest:!1}),g=new Mn(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(r5),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;cS(r,M*x,y>2?x:0,x,x),d.setRenderTarget(r),b&&d.render(g,a),d.render(t,a)}g.geometry.dispose(),g.material.dispose(),d.toneMapping=p,d.autoClear=h,t.background=v}_textureToCubeUV(t,e){const n=this._renderer,r=t.mapping===Qc||t.mapping===Kh;r?(null===this._cubemapMaterial&&(this._cubemapMaterial=c5()),this._cubemapMaterial.uniforms.flipEnvMap.value=!1===t.isRenderTargetTexture?-1:1):null===this._equirectMaterial&&(this._equirectMaterial=l5());const s=r?this._cubemapMaterial:this._equirectMaterial,o=new Mn(this._lodPlanes[0],s);s.uniforms.envMap.value=t;const l=this._cubeSize;cS(e,0,0,3*l,2*l),n.setRenderTarget(e),n.render(o,mP)}_applyPMREM(t){const e=this._renderer,n=e.autoClear;e.autoClear=!1;const r=this._lodPlanes.length;for(let s=1;s20&&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 k=0;k<20;++k){const B=k/b,T=Math.exp(-B*B/2);y.push(T),0===k?M+=T:kx-4?r-x+4:0),4*(this._cubeSize-C),3*C,2*C),l.setRenderTarget(e),l.render(h,mP)}}function a5(i,t,e){const n=new Mu(i,t,e);return n.texture.mapping=pb,n.texture.name="PMREM.cubeUv",n.scissorTest=!0,n}function cS(i,t,e,n,r){i.viewport.set(t,e,n,r),i.scissor.set(t,e,n,r)}function l5(){return new Cl({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:Zc,depthTest:!1,depthWrite:!1})}function c5(){return new Cl({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:Zc,depthTest:!1,depthWrite:!1})}function kce(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===AC||l===DC,d=l===Qc||l===Kh;if(c||d){let h=t.get(a);if(a.isRenderTargetTexture&&a.pmremVersion!==(void 0!==h?h.texture.pmremVersion:0))return null===e&&(e=new o5(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||d&&m&&function r(a){let l=0;for(let d=0;d<6;d++)void 0!==a[d]&&l++;return 6===l}(m)?(null===e&&(e=new o5(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 Pce(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&&cg("THREE.WebGLRenderer: "+n+" extension not supported."),r}}}function Oce(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&&(F=Math.ceil(C/t.maxTextureSize),C=t.maxTextureSize);const D=new Float32Array(C*F*4*h),k=new Zk(D,C,F,h);k.type=Qo,k.needsUpdate=!0;const B=4*x;for(let A=0;A0)return i;const r=t*e;let s=g5[r];if(void 0===s&&(s=new Float32Array(r),g5[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 Fr(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 Pde(i,t){const e=function kde(i){const t=Jn.getPrimaries(Jn.workingColorSpace),e=Jn.getPrimaries(i);let n;switch(t===e?n="":t===UC&&e===BC?n="LinearDisplayP3ToLinearSRGB":t===BC&&e===UC&&(n="LinearSRGBToLinearDisplayP3"),i){case ds:case LC:return[n,"LinearTransferOETF"];case cs:case jk: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 Ode(i,t){let e;switch(t){case hoe:e="Linear";break;case foe:e="Reinhard";break;case poe:e="OptimizedCineon";break;case moe:e="ACESFilmic";break;case _oe:e="AgX";break;case voe:e="Neutral";break;case goe:e="Custom";break;default:console.warn("THREE.WebGLProgram: Unsupported toneMapping:",t),e="Linear"}return"vec3 "+i+"( vec3 color ) { return "+e+"ToneMapping( color ); }"}const hS=new O;function Ib(i){return""!==i}function C5(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 S5(i,t){return i.replace(/NUM_CLIPPING_PLANES/g,t.numClippingPlanes).replace(/UNION_CLIPPING_PLANES/g,t.numClippingPlanes-t.numClipIntersection)}const Ude=/^[ \t]*#include +<([\w\d./]+)>/gm;function wP(i){return i.replace(Ude,zde)}const Vde=new Map;function zde(i,t){let e=Cn[t];if(void 0===e){const n=Vde.get(t);if(void 0===n)throw new Error("Can not resolve #include <"+t+">");e=Cn[n],console.warn('THREE.WebGLRenderer: Shader chunk "%s" has been deprecated. Use "%s" instead.',t,n)}return wP(e)}const Hde=/#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 E5(i){return i.replace(Hde,Gde)}function Gde(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(Ib).join("\n"),y.length>0&&(y+="\n")):(v=[A5(e),"#define SHADER_TYPE "+e.shaderType,"#define SHADER_NAME "+e.shaderName,g,e.extensionClipCullDistance?"#define USE_CLIP_DISTANCE":"",e.batching?"#define USE_BATCHING":"",e.batchingColor?"#define USE_BATCHING_COLOR":"",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 "+d:"",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_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.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","#ifdef USE_SKINNING","\tattribute vec4 skinIndex;","\tattribute vec4 skinWeight;","#endif","\n"].filter(Ib).join("\n"),y=[A5(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 "+d:"",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.dispersion?"#define USE_DISPERSION":"",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||e.batchingColor?"#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.decodeVideoTexture?"#define DECODE_VIDEO_TEXTURE":"",e.logarithmicDepthBuffer?"#define USE_LOGDEPTHBUF":"","uniform mat4 viewMatrix;","uniform vec3 cameraPosition;","uniform bool isOrthographic;",e.toneMapping!==bu?"#define TONE_MAPPING":"",e.toneMapping!==bu?Cn.tonemapping_pars_fragment:"",e.toneMapping!==bu?Ode("toneMapping",e.toneMapping):"",e.dithering?"#define DITHERING":"",e.opaque?"#define OPAQUE":"",Cn.colorspace_pars_fragment,Pde("linearToOutputTexel",e.outputColorSpace),(Jn.getLuminanceCoefficients(hS),["float luminance( const in vec3 rgb ) {",`\tconst vec3 weights = vec3( ${hS.x.toFixed(4)}, ${hS.y.toFixed(4)}, ${hS.z.toFixed(4)} );`,"\treturn dot( weights, rgb );","}"].join("\n")),e.useDepthPacking?"#define DEPTH_PACKING "+e.depthPacking:"","\n"].filter(Ib).join("\n")),o=wP(o),o=C5(o,e),o=S5(o,e),a=wP(a),a=C5(a,e),a=S5(a,e),o=E5(o),a=E5(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===A4?"":"layout(location = 0) out highp vec4 pc_fragColor;",e.glslVersion===A4?"":"#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,F=w5(r,r.VERTEX_SHADER,M+v+o),D=w5(r,r.FRAGMENT_SHADER,C);function k($){if(i.debug.checkShaderErrors){const ie=r.getProgramInfoLog(b).trim(),ne=r.getShaderInfoLog(F).trim(),se=r.getShaderInfoLog(D).trim();let ge=!0,q=!0;if(!1===r.getProgramParameter(b,r.LINK_STATUS))if(ge=!1,"function"==typeof i.debug.onShaderError)i.debug.onShaderError(r,b,F,D);else{const re=M5(r,F,"vertex"),J=M5(r,D,"fragment");console.error("THREE.WebGLProgram: Shader Error "+r.getError()+" - VALIDATE_STATUS "+r.getProgramParameter(b,r.VALIDATE_STATUS)+"\n\nMaterial Name: "+$.name+"\nMaterial Type: "+$.type+"\n\nProgram Info Log: "+ie+"\n"+re+"\n"+J)}else""!==ie?console.warn("THREE.WebGLProgram: Program Info Log:",ie):(""===ne||""===se)&&(q=!1);q&&($.diagnostics={runnable:ge,programLog:ie,vertexShader:{log:ne,prefix:v},fragmentShader:{log:se,prefix:y}})}r.deleteShader(F),r.deleteShader(D),B=new uS(r,b),T=function Bde(i,t){const e={},n=i.getProgramParameter(t,i.ACTIVE_ATTRIBUTES);for(let r=0;r0,ce=T.clearcoat>0,De=T.iridescence>0,Ae=T.sheen>0,Bt=T.transmission>0,Je=R&&!!T.anisotropyMap,ut=ce&&!!T.clearcoatMap,bn=ce&&!!T.clearcoatNormalMap,Ve=ce&&!!T.clearcoatRoughnessMap,dt=De&&!!T.iridescenceMap,jn=De&&!!T.iridescenceThicknessMap,an=Ae&&!!T.sheenColorMap,gt=Ae&&!!T.sheenRoughnessMap,vn=!!T.specularMap,Pn=!!T.specularColorMap,Ki=!!T.specularIntensityMap,Z=Bt&&!!T.transmissionMap,$e=Bt&&!!T.thicknessMap,Ee=!!T.alphaMap,ei=!!T.extensions;let br=bu;T.toneMapped&&(null===Fe||!0===Fe.isXRRenderTarget)&&(br=i.toneMapping);const hs={shaderID:we,shaderType:T.type,shaderName:T.name,vertexShader:en,fragmentShader:ae,defines:T.defines,customVertexShaderID:Oe,customFragmentShaderID:Ze,isRawShaderMaterial:!0===T.isRawShaderMaterial,glslVersion:T.glslVersion,precision:m,batching:Ct,batchingColor:Ct&&null!==ne._colorsTexture,instancing:bt,instancingColor:bt&&null!==ne.instanceColor,instancingMorph:bt&&null!==ne.morphTexture,supportsVertexTextures:p,outputColorSpace:null===Fe?i.outputColorSpace:!0===Fe.isXRRenderTarget?Fe.texture.colorSpace:ds,alphaToCoverage:!!T.alphaToCoverage,map:Mt,matcap:!!T.matcap,envMap:N,envMapMode:N&&re.mapping,envMapCubeUVHeight:J,aoMap:Ge,lightMap:Le,bumpMap:nt,normalMap:Me,displacementMap:p&&Ht,emissiveMap:it,normalMapObjectSpace:Me&&T.normalMapType===Eoe,normalMapTangentSpace:Me&&T.normalMapType===Zh,metalnessMap:pt,roughnessMap:z,anisotropy:R,anisotropyMap:Je,clearcoat:ce,clearcoatMap:ut,clearcoatNormalMap:bn,clearcoatRoughnessMap:Ve,dispersion:T.dispersion>0,iridescence:De,iridescenceMap:dt,iridescenceThicknessMap:jn,sheen:Ae,sheenColorMap:an,sheenRoughnessMap:gt,specularMap:vn,specularColorMap:Pn,specularIntensityMap:Ki,transmission:Bt,transmissionMap:Z,thicknessMap:$e,gradientMap:!!T.gradientMap,opaque:!1===T.transparent&&T.blending===Zm&&!1===T.alphaToCoverage,alphaMap:Ee,alphaTest:T.alphaTest>0,alphaHash:!!T.alphaHash,combine:T.combine,mapUv:Mt&&b(T.map.channel),aoMapUv:Ge&&b(T.aoMap.channel),lightMapUv:Le&&b(T.lightMap.channel),bumpMapUv:nt&&b(T.bumpMap.channel),normalMapUv:Me&&b(T.normalMap.channel),displacementMapUv:Ht&&b(T.displacementMap.channel),emissiveMapUv:it&&b(T.emissiveMap.channel),metalnessMapUv:pt&&b(T.metalnessMap.channel),roughnessMapUv:z&&b(T.roughnessMap.channel),anisotropyMapUv:Je&&b(T.anisotropyMap.channel),clearcoatMapUv:ut&&b(T.clearcoatMap.channel),clearcoatNormalMapUv:bn&&b(T.clearcoatNormalMap.channel),clearcoatRoughnessMapUv:Ve&&b(T.clearcoatRoughnessMap.channel),iridescenceMapUv:dt&&b(T.iridescenceMap.channel),iridescenceThicknessMapUv:jn&&b(T.iridescenceThicknessMap.channel),sheenColorMapUv:an&&b(T.sheenColorMap.channel),sheenRoughnessMapUv:gt&&b(T.sheenRoughnessMap.channel),specularMapUv:vn&&b(T.specularMap.channel),specularColorMapUv:Pn&&b(T.specularColorMap.channel),specularIntensityMapUv:Ki&&b(T.specularIntensityMap.channel),transmissionMapUv:Z&&b(T.transmissionMap.channel),thicknessMapUv:$e&&b(T.thicknessMap.channel),alphaMapUv:Ee&&b(T.alphaMap.channel),vertexTangents:!!ge.attributes.tangent&&(Me||R),vertexColors:T.vertexColors,vertexAlphas:!0===T.vertexColors&&!!ge.attributes.color&&4===ge.attributes.color.itemSize,pointsUvs:!0===ne.isPoints&&!!ge.attributes.uv&&(Mt||Ee),fog:!!se,useFog:!0===T.fog,fogExp2:!!se&&se.isFogExp2,flatShading:!0===T.flatShading,sizeAttenuation:!0===T.sizeAttenuation,logarithmicDepthBuffer:h,skinning:!0===ne.isSkinnedMesh,morphTargets:void 0!==ge.morphAttributes.position,morphNormals:void 0!==ge.morphAttributes.normal,morphColors:void 0!==ge.morphAttributes.color,morphTargetsCount:Ye,morphTextureStride:Tt,numDirLights:A.directional.length,numPointLights:A.point.length,numSpotLights:A.spot.length,numSpotLightMaps:A.spotLightMap.length,numRectAreaLights:A.rectArea.length,numHemiLights:A.hemi.length,numDirLightShadows:A.directionalShadowMap.length,numPointLightShadows:A.pointShadowMap.length,numSpotLightShadows:A.spotShadowMap.length,numSpotLightShadowsWithMaps:A.numSpotLightShadowsWithMaps,numLightProbes:A.numLightProbes,numClippingPlanes:o.numPlanes,numClipIntersection:o.numIntersection,dithering:T.dithering,shadowMapEnabled:i.shadowMap.enabled&&$.length>0,shadowMapType:i.shadowMap.type,toneMapping:br,decodeVideoTexture:Mt&&!0===T.map.isVideoTexture&&Jn.getTransfer(T.map.colorSpace)===Fi,premultipliedAlpha:T.premultipliedAlpha,doubleSided:T.side===Ls,flipSided:T.side===Io,useDepthPacking:T.depthPacking>=0,depthPacking:T.depthPacking||0,index0AttributeName:T.index0AttributeName,extensionClipCullDistance:ei&&!0===T.extensions.clipCullDistance&&n.has("WEBGL_clip_cull_distance"),extensionMultiDraw:(ei&&!0===T.extensions.multiDraw||Ct)&&n.has("WEBGL_multi_draw"),rendererExtensionParallelShaderCompile:n.has("KHR_parallel_shader_compile"),customProgramCacheKey:T.customProgramCacheKey()};return hs.vertexUv1s=c.has(1),hs.vertexUv2s=c.has(2),hs.vertexUv3s=c.has(3),c.clear(),hs},getProgramCacheKey:function y(T){const A=[];if(T.shaderID?A.push(T.shaderID):(A.push(T.customVertexShaderID),A.push(T.customFragmentShaderID)),void 0!==T.defines)for(const $ in T.defines)A.push($),A.push(T.defines[$]);return!1===T.isRawShaderMaterial&&(function M(T,A){T.push(A.precision),T.push(A.outputColorSpace),T.push(A.envMapMode),T.push(A.envMapCubeUVHeight),T.push(A.mapUv),T.push(A.alphaMapUv),T.push(A.lightMapUv),T.push(A.aoMapUv),T.push(A.bumpMapUv),T.push(A.normalMapUv),T.push(A.displacementMapUv),T.push(A.emissiveMapUv),T.push(A.metalnessMapUv),T.push(A.roughnessMapUv),T.push(A.anisotropyMapUv),T.push(A.clearcoatMapUv),T.push(A.clearcoatNormalMapUv),T.push(A.clearcoatRoughnessMapUv),T.push(A.iridescenceMapUv),T.push(A.iridescenceThicknessMapUv),T.push(A.sheenColorMapUv),T.push(A.sheenRoughnessMapUv),T.push(A.specularMapUv),T.push(A.specularColorMapUv),T.push(A.specularIntensityMapUv),T.push(A.transmissionMapUv),T.push(A.thicknessMapUv),T.push(A.combine),T.push(A.fogExp2),T.push(A.sizeAttenuation),T.push(A.morphTargetsCount),T.push(A.morphAttributeCount),T.push(A.numDirLights),T.push(A.numPointLights),T.push(A.numSpotLights),T.push(A.numSpotLightMaps),T.push(A.numHemiLights),T.push(A.numRectAreaLights),T.push(A.numDirLightShadows),T.push(A.numPointLightShadows),T.push(A.numSpotLightShadows),T.push(A.numSpotLightShadowsWithMaps),T.push(A.numLightProbes),T.push(A.shadowMapType),T.push(A.toneMapping),T.push(A.numClippingPlanes),T.push(A.numClipIntersection),T.push(A.depthPacking)}(A,T),function x(T,A){a.disableAll(),A.supportsVertexTextures&&a.enable(0),A.instancing&&a.enable(1),A.instancingColor&&a.enable(2),A.instancingMorph&&a.enable(3),A.matcap&&a.enable(4),A.envMap&&a.enable(5),A.normalMapObjectSpace&&a.enable(6),A.normalMapTangentSpace&&a.enable(7),A.clearcoat&&a.enable(8),A.iridescence&&a.enable(9),A.alphaTest&&a.enable(10),A.vertexColors&&a.enable(11),A.vertexAlphas&&a.enable(12),A.vertexUv1s&&a.enable(13),A.vertexUv2s&&a.enable(14),A.vertexUv3s&&a.enable(15),A.vertexTangents&&a.enable(16),A.anisotropy&&a.enable(17),A.alphaHash&&a.enable(18),A.batching&&a.enable(19),A.dispersion&&a.enable(20),A.batchingColor&&a.enable(21),T.push(a.mask),a.disableAll(),A.fog&&a.enable(0),A.useFog&&a.enable(1),A.flatShading&&a.enable(2),A.logarithmicDepthBuffer&&a.enable(3),A.skinning&&a.enable(4),A.morphTargets&&a.enable(5),A.morphNormals&&a.enable(6),A.morphColors&&a.enable(7),A.premultipliedAlpha&&a.enable(8),A.shadowMapEnabled&&a.enable(9),A.doubleSided&&a.enable(10),A.flipSided&&a.enable(11),A.useDepthPacking&&a.enable(12),A.dithering&&a.enable(13),A.transmission&&a.enable(14),A.sheen&&a.enable(15),A.opaque&&a.enable(16),A.pointsUvs&&a.enable(17),A.decodeVideoTexture&&a.enable(18),A.alphaToCoverage&&a.enable(19),T.push(a.mask)}(A,T),A.push(i.outputColorSpace)),A.push(T.customProgramCacheKey),A.join()},getUniforms:function C(T){const A=g[T.type];let $;return $=A?Q4.clone(lc[A].uniforms):T.uniforms,$},acquireProgram:function F(T,A){let $;for(let ie=0,ne=d.length;ie0?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 d(){for(let h=t,p=i.length;h1&&e.sort(h||tue),n.length>1&&n.sort(p||D5),r.length>1&&r.sort(p||D5)}}}function nue(){let i=new WeakMap;return{get:function t(n,r){const s=i.get(n);let o;return void 0===s?(o=new T5,i.set(n,[o])):r>=s.length?(o=new T5,s.push(o)):o=s[r],o},dispose:function e(){i=new WeakMap}}}function iue(){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 O,color:new qe};break;case"SpotLight":e={position:new O,direction:new O,color:new qe,distance:0,coneCos:0,penumbraCos:0,decay:0};break;case"PointLight":e={position:new O,color:new qe,distance:0,decay:0};break;case"HemisphereLight":e={direction:new O,skyColor:new qe,groundColor:new qe};break;case"RectAreaLight":e={color:new qe,position:new O,halfWidth:new O,halfHeight:new O}}return i[t.id]=e,e}}}let sue=0;function oue(i,t){return(t.castShadow?2:0)-(i.castShadow?2:0)+(t.map?1:0)-(i.map?1:0)}function aue(i){const t=new iue,e=function rue(){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={shadowIntensity:1,shadowBias:0,shadowNormalBias:0,shadowRadius:1,shadowMapSize:new xe};break;case"PointLight":e={shadowIntensity:1,shadowBias:0,shadowNormalBias:0,shadowRadius:1,shadowMapSize:new xe,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 O);const r=new O,s=new Nt,o=new Nt;return{setup:function a(c){let d=0,h=0,p=0;for(let T=0;T<9;T++)n.probe[T].set(0,0,0);let m=0,g=0,b=0,v=0,y=0,M=0,x=0,C=0,F=0,D=0,k=0;c.sort(oue);for(let T=0,A=c.length;T0&&(!0===i.has("OES_texture_float_linear")?(n.rectAreaLTC1=Qe.LTC_FLOAT_1,n.rectAreaLTC2=Qe.LTC_FLOAT_2):(n.rectAreaLTC1=Qe.LTC_HALF_1,n.rectAreaLTC2=Qe.LTC_HALF_2)),n.ambient[0]=d,n.ambient[1]=h,n.ambient[2]=p;const B=n.hash;(B.directionalLength!==m||B.pointLength!==g||B.spotLength!==b||B.rectAreaLength!==v||B.hemiLength!==y||B.numDirectionalShadows!==M||B.numPointShadows!==x||B.numSpotShadows!==C||B.numSpotMaps!==F||B.numLightProbes!==k)&&(n.directional.length=m,n.spot.length=b,n.rectArea.length=v,n.point.length=g,n.hemi.length=y,n.directionalShadow.length=M,n.directionalShadowMap.length=M,n.pointShadow.length=x,n.pointShadowMap.length=x,n.spotShadow.length=C,n.spotShadowMap.length=C,n.directionalShadowMatrix.length=M,n.pointShadowMatrix.length=x,n.spotLightMatrix.length=C+F-D,n.spotLightMap.length=F,n.numSpotLightShadowsWithMaps=D,n.numLightProbes=k,B.directionalLength=m,B.pointLength=g,B.spotLength=b,B.rectAreaLength=v,B.hemiLength=y,B.numDirectionalShadows=M,B.numPointShadows=x,B.numSpotShadows=C,B.numSpotMaps=F,B.numLightProbes=k,n.version=sue++)},setupView:function l(c,d){let h=0,p=0,m=0,g=0,b=0;const v=d.matrixWorldInverse;for(let y=0,M=c.length;y=o.length?(a=new I5(i),o.push(a)):a=o[s],a},dispose:function n(){t=new WeakMap}}}class R5 extends Po{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 k5 extends Po{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 cue="void main() {\n\tgl_Position = vec4( position, 1.0 );\n}",due="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 uue(i,t,e){let n=new aS;const r=new xe,s=new xe,o=new gi,a=new R5({depthPacking:Soe}),l=new k5,c={},d=e.maxTextureSize,h={[ac]:Io,[Io]:ac,[Ls]:Ls},p=new Cl({defines:{VSM_SAMPLES:8},uniforms:{shadow_pass:{value:null},resolution:{value:new xe},radius:{value:4}},vertexShader:cue,fragmentShader:due}),m=p.clone();m.defines.HORIZONTAL_PASS=1;const g=new hn;g.setAttribute("position",new Hi(new Float32Array([-1,-1,.5,3,-1,.5,-1,3,.5]),3));const b=new Mn(g,p),v=this;this.enabled=!1,this.autoUpdate=!0,this.needsUpdate=!1,this.type=l4;let y=this.type;function M(D,k){const B=t.update(b);p.defines.VSM_SAMPLES!==D.blurSamples&&(p.defines.VSM_SAMPLES=D.blurSamples,m.defines.VSM_SAMPLES=D.blurSamples,p.needsUpdate=!0,m.needsUpdate=!0),null===D.mapPass&&(D.mapPass=new Mu(r.x,r.y)),p.uniforms.shadow_pass.value=D.map.texture,p.uniforms.resolution.value=D.mapSize,p.uniforms.radius.value=D.radius,i.setRenderTarget(D.mapPass),i.clear(),i.renderBufferDirect(k,null,B,p,b,null),m.uniforms.shadow_pass.value=D.mapPass.texture,m.uniforms.resolution.value=D.mapSize,m.uniforms.radius.value=D.radius,i.setRenderTarget(D.map),i.clear(),i.renderBufferDirect(k,null,B,m,b,null)}function x(D,k,B,T){let A=null;const $=!0===B.isPointLight?D.customDistanceMaterial:D.customDepthMaterial;if(void 0!==$)A=$;else if(A=!0===B.isPointLight?l:a,i.localClippingEnabled&&!0===k.clipShadows&&Array.isArray(k.clippingPlanes)&&0!==k.clippingPlanes.length||k.displacementMap&&0!==k.displacementScale||k.alphaMap&&k.alphaTest>0||k.map&&k.alphaTest>0){const ie=A.uuid,ne=k.uuid;let se=c[ie];void 0===se&&(se={},c[ie]=se);let ge=se[ne];void 0===ge&&(ge=A.clone(),se[ne]=ge,k.addEventListener("dispose",F)),A=ge}return A.visible=k.visible,A.wireframe=k.wireframe,A.side=T===Kc?null!==k.shadowSide?k.shadowSide:k.side:null!==k.shadowSide?k.shadowSide:h[k.side],A.alphaMap=k.alphaMap,A.alphaTest=k.alphaTest,A.map=k.map,A.clipShadows=k.clipShadows,A.clippingPlanes=k.clippingPlanes,A.clipIntersection=k.clipIntersection,A.displacementMap=k.displacementMap,A.displacementScale=k.displacementScale,A.displacementBias=k.displacementBias,A.wireframeLinewidth=k.wireframeLinewidth,A.linewidth=k.linewidth,!0===B.isPointLight&&!0===A.isMeshDistanceMaterial&&(i.properties.get(A).light=B),A}function C(D,k,B,T,A){if(!1===D.visible)return;if(D.layers.test(k.layers)&&(D.isMesh||D.isLine||D.isPoints)&&(D.castShadow||D.receiveShadow&&A===Kc)&&(!D.frustumCulled||n.intersectsObject(D))){D.modelViewMatrix.multiplyMatrices(B.matrixWorldInverse,D.matrixWorld);const ne=t.update(D),se=D.material;if(Array.isArray(se)){const ge=ne.groups;for(let q=0,re=ge.length;qd||r.y>d)&&(r.x>d&&(s.x=Math.floor(d/we.x),r.x=s.x*we.x,J.mapSize.x=s.x),r.y>d&&(s.y=Math.floor(d/we.y),r.y=s.y*we.y,J.mapSize.y=s.y)),null===J.map||!0===ne||!0===se){const Ye=this.type!==Kc?{minFilter:_r,magFilter:_r}:{};null!==J.map&&J.map.dispose(),J.map=new Mu(r.x,r.y,Ye),J.map.texture.name=re.name+".shadowMap",J.camera.updateProjectionMatrix()}i.setRenderTarget(J.map),i.clear();const Ne=J.getViewportCount();for(let Ye=0;Ye=1):-1!==re.indexOf("OpenGL ES")&&(q=parseFloat(/^OpenGL ES (\d)/.exec(re)[1]),ge=q>=2);let J=null,we={};const Ne=i.getParameter(i.SCISSOR_BOX),Ye=i.getParameter(i.VIEWPORT),Tt=(new gi).fromArray(Ne),en=(new gi).fromArray(Ye);function ae(Z,$e,Ce,Ee){const Ke=new Uint8Array(4),tn=i.createTexture();i.bindTexture(Z,tn),i.texParameteri(Z,i.TEXTURE_MIN_FILTER,i.NEAREST),i.texParameteri(Z,i.TEXTURE_MAG_FILTER,i.NEAREST);for(let ei=0;ei"u")&&/OculusBrowser/g.test(navigator.userAgent),c=new xe,d=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(z,R){return m?new OffscreenCanvas(z,R):xb("canvas")}function b(z,R,ce){let Ie=1;const De=pt(z);if((De.width>ce||De.height>ce)&&(Ie=ce/Math.max(De.width,De.height)),Ie<1){if(typeof HTMLImageElement<"u"&&z instanceof HTMLImageElement||typeof HTMLCanvasElement<"u"&&z instanceof HTMLCanvasElement||typeof ImageBitmap<"u"&&z instanceof ImageBitmap||typeof VideoFrame<"u"&&z instanceof VideoFrame){const Ae=Math.floor(Ie*De.width),Bt=Math.floor(Ie*De.height);void 0===h&&(h=g(Ae,Bt));const Je=R?g(Ae,Bt):h;return Je.width=Ae,Je.height=Bt,Je.getContext("2d").drawImage(z,0,0,Ae,Bt),console.warn("THREE.WebGLRenderer: Texture has been resized from ("+De.width+"x"+De.height+") to ("+Ae+"x"+Bt+")."),Je}return"data"in z&&console.warn("THREE.WebGLRenderer: Image in DataTexture is too big ("+De.width+"x"+De.height+")."),z}return z}function v(z){return z.generateMipmaps&&z.minFilter!==_r&&z.minFilter!==lr}function y(z){i.generateMipmap(z)}function M(z,R,ce,Ie,De=!1){if(null!==z){if(void 0!==i[z])return i[z];console.warn("THREE.WebGLRenderer: Attempt to use non-existing WebGL internal format '"+z+"'")}let Ae=R;if(R===i.RED&&(ce===i.FLOAT&&(Ae=i.R32F),ce===i.HALF_FLOAT&&(Ae=i.R16F),ce===i.UNSIGNED_BYTE&&(Ae=i.R8)),R===i.RED_INTEGER&&(ce===i.UNSIGNED_BYTE&&(Ae=i.R8UI),ce===i.UNSIGNED_SHORT&&(Ae=i.R16UI),ce===i.UNSIGNED_INT&&(Ae=i.R32UI),ce===i.BYTE&&(Ae=i.R8I),ce===i.SHORT&&(Ae=i.R16I),ce===i.INT&&(Ae=i.R32I)),R===i.RG&&(ce===i.FLOAT&&(Ae=i.RG32F),ce===i.HALF_FLOAT&&(Ae=i.RG16F),ce===i.UNSIGNED_BYTE&&(Ae=i.RG8)),R===i.RG_INTEGER&&(ce===i.UNSIGNED_BYTE&&(Ae=i.RG8UI),ce===i.UNSIGNED_SHORT&&(Ae=i.RG16UI),ce===i.UNSIGNED_INT&&(Ae=i.RG32UI),ce===i.BYTE&&(Ae=i.RG8I),ce===i.SHORT&&(Ae=i.RG16I),ce===i.INT&&(Ae=i.RG32I)),R===i.RGB&&ce===i.UNSIGNED_INT_5_9_9_9_REV&&(Ae=i.RGB9_E5),R===i.RGBA){const Bt=De?NC:Jn.getTransfer(Ie);ce===i.FLOAT&&(Ae=i.RGBA32F),ce===i.HALF_FLOAT&&(Ae=i.RGBA16F),ce===i.UNSIGNED_BYTE&&(Ae=Bt===Fi?i.SRGB8_ALPHA8:i.RGBA8),ce===i.UNSIGNED_SHORT_4_4_4_4&&(Ae=i.RGBA4),ce===i.UNSIGNED_SHORT_5_5_5_1&&(Ae=i.RGB5_A1)}return(Ae===i.R16F||Ae===i.R32F||Ae===i.RG16F||Ae===i.RG32F||Ae===i.RGBA16F||Ae===i.RGBA32F)&&t.get("EXT_color_buffer_float"),Ae}function x(z,R){let ce;return z?null===R||R===xu||R===eg?ce=i.DEPTH24_STENCIL8:R===Qo?ce=i.DEPTH32F_STENCIL8:R===_b&&(ce=i.DEPTH24_STENCIL8,console.warn("DepthTexture: 16 bit depth attachment is not supported with stencil. Using 24-bit attachment.")):null===R||R===xu||R===eg?ce=i.DEPTH_COMPONENT24:R===Qo?ce=i.DEPTH_COMPONENT32F:R===_b&&(ce=i.DEPTH_COMPONENT16),ce}function C(z,R){return!0===v(z)||z.isFramebufferTexture&&z.minFilter!==_r&&z.minFilter!==lr?Math.log2(Math.max(R.width,R.height))+1:void 0!==z.mipmaps&&z.mipmaps.length>0?z.mipmaps.length:z.isCompressedTexture&&Array.isArray(z.image)?R.mipmaps.length:1}function F(z){const R=z.target;R.removeEventListener("dispose",F),function k(z){const R=n.get(z);if(void 0===R.__webglInit)return;const ce=z.source,Ie=p.get(ce);if(Ie){const De=Ie[R.__cacheKey];De.usedTimes--,0===De.usedTimes&&B(z),0===Object.keys(Ie).length&&p.delete(ce)}n.remove(z)}(R),R.isVideoTexture&&d.delete(R)}function D(z){const R=z.target;R.removeEventListener("dispose",D),function T(z){const R=n.get(z);if(z.depthTexture&&z.depthTexture.dispose(),z.isWebGLCubeRenderTarget)for(let Ie=0;Ie<6;Ie++){if(Array.isArray(R.__webglFramebuffer[Ie]))for(let De=0;De0&&ce.__version!==z.version){const Ie=z.image;if(null===Ie)console.warn("THREE.WebGLRenderer: Texture marked for update but no image data found.");else{if(!1!==Ie.complete)return void en(ce,z,R);console.warn("THREE.WebGLRenderer: Texture marked for update but image is incomplete")}}e.bindTexture(i.TEXTURE_2D,ce.__webglTexture,i.TEXTURE0+R)}const J={[Pa]:i.REPEAT,[Ii]:i.CLAMP_TO_EDGE,[mb]:i.MIRRORED_REPEAT},we={[_r]:i.NEAREST,[dk]:i.NEAREST_MIPMAP_NEAREST,[Qm]:i.NEAREST_MIPMAP_LINEAR,[lr]:i.LINEAR,[gb]:i.LINEAR_MIPMAP_NEAREST,[bl]:i.LINEAR_MIPMAP_LINEAR},Ne={[Aoe]:i.NEVER,[Poe]:i.ALWAYS,[Doe]:i.LESS,[E4]:i.LEQUAL,[Toe]:i.EQUAL,[koe]:i.GEQUAL,[Ioe]:i.GREATER,[Roe]:i.NOTEQUAL};function Ye(z,R){if(R.type===Qo&&!1===t.has("OES_texture_float_linear")&&(R.magFilter===lr||R.magFilter===gb||R.magFilter===Qm||R.magFilter===bl||R.minFilter===lr||R.minFilter===gb||R.minFilter===Qm||R.minFilter===bl)&&console.warn("THREE.WebGLRenderer: Unable to use linear filtering with floating point textures. OES_texture_float_linear not supported on this device."),i.texParameteri(z,i.TEXTURE_WRAP_S,J[R.wrapS]),i.texParameteri(z,i.TEXTURE_WRAP_T,J[R.wrapT]),(z===i.TEXTURE_3D||z===i.TEXTURE_2D_ARRAY)&&i.texParameteri(z,i.TEXTURE_WRAP_R,J[R.wrapR]),i.texParameteri(z,i.TEXTURE_MAG_FILTER,we[R.magFilter]),i.texParameteri(z,i.TEXTURE_MIN_FILTER,we[R.minFilter]),R.compareFunction&&(i.texParameteri(z,i.TEXTURE_COMPARE_MODE,i.COMPARE_REF_TO_TEXTURE),i.texParameteri(z,i.TEXTURE_COMPARE_FUNC,Ne[R.compareFunction])),!0===t.has("EXT_texture_filter_anisotropic")){if(R.magFilter===_r||R.minFilter!==Qm&&R.minFilter!==bl||R.type===Qo&&!1===t.has("OES_texture_float_linear"))return;if(R.anisotropy>1||n.get(R).__currentAnisotropy){const ce=t.get("EXT_texture_filter_anisotropic");i.texParameterf(z,ce.TEXTURE_MAX_ANISOTROPY_EXT,Math.min(R.anisotropy,r.getMaxAnisotropy())),n.get(R).__currentAnisotropy=R.anisotropy}}}function Tt(z,R){let ce=!1;void 0===z.__webglInit&&(z.__webglInit=!0,R.addEventListener("dispose",F));const Ie=R.source;let De=p.get(Ie);void 0===De&&(De={},p.set(Ie,De));const Ae=function ne(z){const R=[];return R.push(z.wrapS),R.push(z.wrapT),R.push(z.wrapR||0),R.push(z.magFilter),R.push(z.minFilter),R.push(z.anisotropy),R.push(z.internalFormat),R.push(z.format),R.push(z.type),R.push(z.generateMipmaps),R.push(z.premultiplyAlpha),R.push(z.flipY),R.push(z.unpackAlignment),R.push(z.colorSpace),R.join()}(R);if(Ae!==z.__cacheKey){void 0===De[Ae]&&(De[Ae]={texture:i.createTexture(),usedTimes:0},o.memory.textures++,ce=!0),De[Ae].usedTimes++;const Bt=De[z.__cacheKey];void 0!==Bt&&(De[z.__cacheKey].usedTimes--,0===Bt.usedTimes&&B(R)),z.__cacheKey=Ae,z.__webglTexture=De[Ae].texture}return ce}function en(z,R,ce){let Ie=i.TEXTURE_2D;(R.isDataArrayTexture||R.isCompressedArrayTexture)&&(Ie=i.TEXTURE_2D_ARRAY),R.isData3DTexture&&(Ie=i.TEXTURE_3D);const De=Tt(z,R),Ae=R.source;e.bindTexture(Ie,z.__webglTexture,i.TEXTURE0+ce);const Bt=n.get(Ae);if(Ae.version!==Bt.__version||!0===De){e.activeTexture(i.TEXTURE0+ce);const Je=Jn.getPrimaries(Jn.workingColorSpace),ut=R.colorSpace===wu?null:Jn.getPrimaries(R.colorSpace),bn=R.colorSpace===wu||Je===ut?i.NONE:i.BROWSER_DEFAULT_WEBGL;i.pixelStorei(i.UNPACK_FLIP_Y_WEBGL,R.flipY),i.pixelStorei(i.UNPACK_PREMULTIPLY_ALPHA_WEBGL,R.premultiplyAlpha),i.pixelStorei(i.UNPACK_ALIGNMENT,R.unpackAlignment),i.pixelStorei(i.UNPACK_COLORSPACE_CONVERSION_WEBGL,bn);let Ve=b(R.image,!1,r.maxTextureSize);Ve=it(R,Ve);const dt=s.convert(R.format,R.colorSpace),jn=s.convert(R.type);let gt,an=M(R.internalFormat,dt,jn,R.colorSpace,R.isVideoTexture);Ye(Ie,R);const vn=R.mipmaps,Pn=!0!==R.isVideoTexture,Ki=void 0===Bt.__version||!0===De,Z=Ae.dataReady,$e=C(R,Ve);if(R.isDepthTexture)an=x(R.format===ng,R.type),Ki&&(Pn?e.texStorage2D(i.TEXTURE_2D,1,an,Ve.width,Ve.height):e.texImage2D(i.TEXTURE_2D,0,an,Ve.width,Ve.height,0,dt,jn,null));else if(R.isDataTexture)if(vn.length>0){Pn&&Ki&&e.texStorage2D(i.TEXTURE_2D,$e,an,vn[0].width,vn[0].height);for(let Ce=0,Ee=vn.length;Ce0){const Ke=MP(gt.width,gt.height,R.format,R.type);for(const tn of R.layerUpdates){const ei=gt.data.subarray(tn*Ke/gt.data.BYTES_PER_ELEMENT,(tn+1)*Ke/gt.data.BYTES_PER_ELEMENT);e.compressedTexSubImage3D(i.TEXTURE_2D_ARRAY,Ce,0,0,tn,gt.width,gt.height,1,dt,ei,0,0)}R.clearLayerUpdates()}else e.compressedTexSubImage3D(i.TEXTURE_2D_ARRAY,Ce,0,0,0,gt.width,gt.height,Ve.depth,dt,gt.data,0,0)}else e.compressedTexImage3D(i.TEXTURE_2D_ARRAY,Ce,an,gt.width,gt.height,Ve.depth,0,gt.data,0,0);else console.warn("THREE.WebGLRenderer: Attempt to load unsupported compressed texture format in .uploadTexture()");else Pn?Z&&e.texSubImage3D(i.TEXTURE_2D_ARRAY,Ce,0,0,0,gt.width,gt.height,Ve.depth,dt,jn,gt.data):e.texImage3D(i.TEXTURE_2D_ARRAY,Ce,an,gt.width,gt.height,Ve.depth,0,dt,jn,gt.data)}else{Pn&&Ki&&e.texStorage2D(i.TEXTURE_2D,$e,an,vn[0].width,vn[0].height);for(let Ce=0,Ee=vn.length;Ce0){const Ce=MP(Ve.width,Ve.height,R.format,R.type);for(const Ee of R.layerUpdates){const Ke=Ve.data.subarray(Ee*Ce/Ve.data.BYTES_PER_ELEMENT,(Ee+1)*Ce/Ve.data.BYTES_PER_ELEMENT);e.texSubImage3D(i.TEXTURE_2D_ARRAY,0,0,0,Ee,Ve.width,Ve.height,1,dt,jn,Ke)}R.clearLayerUpdates()}else e.texSubImage3D(i.TEXTURE_2D_ARRAY,0,0,0,0,Ve.width,Ve.height,Ve.depth,dt,jn,Ve.data)}else e.texImage3D(i.TEXTURE_2D_ARRAY,0,an,Ve.width,Ve.height,Ve.depth,0,dt,jn,Ve.data);else if(R.isData3DTexture)Pn?(Ki&&e.texStorage3D(i.TEXTURE_3D,$e,an,Ve.width,Ve.height,Ve.depth),Z&&e.texSubImage3D(i.TEXTURE_3D,0,0,0,0,Ve.width,Ve.height,Ve.depth,dt,jn,Ve.data)):e.texImage3D(i.TEXTURE_3D,0,an,Ve.width,Ve.height,Ve.depth,0,dt,jn,Ve.data);else if(R.isFramebufferTexture){if(Ki)if(Pn)e.texStorage2D(i.TEXTURE_2D,$e,an,Ve.width,Ve.height);else{let Ce=Ve.width,Ee=Ve.height;for(let Ke=0;Ke<$e;Ke++)e.texImage2D(i.TEXTURE_2D,Ke,an,Ce,Ee,0,dt,jn,null),Ce>>=1,Ee>>=1}}else if(vn.length>0){if(Pn&&Ki){const Ce=pt(vn[0]);e.texStorage2D(i.TEXTURE_2D,$e,an,Ce.width,Ce.height)}for(let Ce=0,Ee=vn.length;Ce>Ae),dt=Math.max(1,R.height>>Ae);De===i.TEXTURE_3D||De===i.TEXTURE_2D_ARRAY?e.texImage3D(De,Ae,ut,Ve,dt,R.depth,0,Bt,Je,null):e.texImage2D(De,Ae,ut,Ve,dt,0,Bt,Je,null)}e.bindFramebuffer(i.FRAMEBUFFER,z),Me(R)?a.framebufferTexture2DMultisampleEXT(i.FRAMEBUFFER,Ie,De,n.get(ce).__webglTexture,0,nt(R)):(De===i.TEXTURE_2D||De>=i.TEXTURE_CUBE_MAP_POSITIVE_X&&De<=i.TEXTURE_CUBE_MAP_NEGATIVE_Z)&&i.framebufferTexture2D(i.FRAMEBUFFER,Ie,De,n.get(ce).__webglTexture,Ae),e.bindFramebuffer(i.FRAMEBUFFER,null)}function Ze(z,R,ce){if(i.bindRenderbuffer(i.RENDERBUFFER,z),R.depthBuffer){const Ie=R.depthTexture,Ae=x(R.stencilBuffer,Ie&&Ie.isDepthTexture?Ie.type:null),Bt=R.stencilBuffer?i.DEPTH_STENCIL_ATTACHMENT:i.DEPTH_ATTACHMENT,Je=nt(R);Me(R)?a.renderbufferStorageMultisampleEXT(i.RENDERBUFFER,Je,Ae,R.width,R.height):ce?i.renderbufferStorageMultisample(i.RENDERBUFFER,Je,Ae,R.width,R.height):i.renderbufferStorage(i.RENDERBUFFER,Ae,R.width,R.height),i.framebufferRenderbuffer(i.FRAMEBUFFER,Bt,i.RENDERBUFFER,z)}else{const Ie=R.textures;for(let De=0;De0&&!0===t.has("WEBGL_multisampled_render_to_texture")&&!1!==R.__useRenderToTexture}function it(z,R){const ce=z.colorSpace,Ie=z.format,De=z.type;return!0===z.isCompressedTexture||!0===z.isVideoTexture||ce!==ds&&ce!==wu&&(Jn.getTransfer(ce)===Fi?(Ie!==Ro||De!==Jc)&&console.warn("THREE.WebGLTextures: sRGB encoded textures have to use RGBAFormat and UnsignedByteType."):console.error("THREE.WebGLTextures: Unsupported texture color space:",ce)),R}function pt(z){return typeof HTMLImageElement<"u"&&z instanceof HTMLImageElement?(c.width=z.naturalWidth||z.width,c.height=z.naturalHeight||z.height):typeof VideoFrame<"u"&&z instanceof VideoFrame?(c.width=z.displayWidth,c.height=z.displayHeight):(c.width=z.width,c.height=z.height),c}this.allocateTextureUnit=function ie(){const z=A;return z>=r.maxTextures&&console.warn("THREE.WebGLTextures: Trying to use "+z+" texture units while this GPU supports only "+r.maxTextures),A+=1,z},this.resetTextureUnits=function $(){A=0},this.setTexture2D=se,this.setTexture2DArray=function ge(z,R){const ce=n.get(z);z.version>0&&ce.__version!==z.version?en(ce,z,R):e.bindTexture(i.TEXTURE_2D_ARRAY,ce.__webglTexture,i.TEXTURE0+R)},this.setTexture3D=function q(z,R){const ce=n.get(z);z.version>0&&ce.__version!==z.version?en(ce,z,R):e.bindTexture(i.TEXTURE_3D,ce.__webglTexture,i.TEXTURE0+R)},this.setTextureCube=function re(z,R){const ce=n.get(z);z.version>0&&ce.__version!==z.version?function ae(z,R,ce){if(6!==R.image.length)return;const Ie=Tt(z,R),De=R.source;e.bindTexture(i.TEXTURE_CUBE_MAP,z.__webglTexture,i.TEXTURE0+ce);const Ae=n.get(De);if(De.version!==Ae.__version||!0===Ie){e.activeTexture(i.TEXTURE0+ce);const Bt=Jn.getPrimaries(Jn.workingColorSpace),Je=R.colorSpace===wu?null:Jn.getPrimaries(R.colorSpace),ut=R.colorSpace===wu||Bt===Je?i.NONE:i.BROWSER_DEFAULT_WEBGL;i.pixelStorei(i.UNPACK_FLIP_Y_WEBGL,R.flipY),i.pixelStorei(i.UNPACK_PREMULTIPLY_ALPHA_WEBGL,R.premultiplyAlpha),i.pixelStorei(i.UNPACK_ALIGNMENT,R.unpackAlignment),i.pixelStorei(i.UNPACK_COLORSPACE_CONVERSION_WEBGL,ut);const bn=R.isCompressedTexture||R.image[0].isCompressedTexture,Ve=R.image[0]&&R.image[0].isDataTexture,dt=[];for(let Ee=0;Ee<6;Ee++)dt[Ee]=bn||Ve?Ve?R.image[Ee].image:R.image[Ee]:b(R.image[Ee],!0,r.maxCubemapSize),dt[Ee]=it(R,dt[Ee]);const jn=dt[0],an=s.convert(R.format,R.colorSpace),gt=s.convert(R.type),vn=M(R.internalFormat,an,gt,R.colorSpace),Pn=!0!==R.isVideoTexture,Ki=void 0===Ae.__version||!0===Ie,Z=De.dataReady;let Ce,$e=C(R,jn);if(Ye(i.TEXTURE_CUBE_MAP,R),bn){Pn&&Ki&&e.texStorage2D(i.TEXTURE_CUBE_MAP,$e,vn,jn.width,jn.height);for(let Ee=0;Ee<6;Ee++){Ce=dt[Ee].mipmaps;for(let Ke=0;Ke0&&$e++;const Ee=pt(dt[0]);e.texStorage2D(i.TEXTURE_CUBE_MAP,$e,vn,Ee.width,Ee.height)}for(let Ee=0;Ee<6;Ee++)if(Ve){Pn?Z&&e.texSubImage2D(i.TEXTURE_CUBE_MAP_POSITIVE_X+Ee,0,0,0,dt[Ee].width,dt[Ee].height,an,gt,dt[Ee].data):e.texImage2D(i.TEXTURE_CUBE_MAP_POSITIVE_X+Ee,0,vn,dt[Ee].width,dt[Ee].height,0,an,gt,dt[Ee].data);for(let Ke=0;Ke1;if(Bt||(void 0===Ie.__webglTexture&&(Ie.__webglTexture=i.createTexture()),Ie.__version=R.version,o.memory.textures++),Ae){ce.__webglFramebuffer=[];for(let Je=0;Je<6;Je++)if(R.mipmaps&&R.mipmaps.length>0){ce.__webglFramebuffer[Je]=[];for(let ut=0;ut0){ce.__webglFramebuffer=[];for(let Je=0;Je0&&!1===Me(z)){ce.__webglMultisampledFramebuffer=i.createFramebuffer(),ce.__webglColorRenderbuffer=[],e.bindFramebuffer(i.FRAMEBUFFER,ce.__webglMultisampledFramebuffer);for(let Je=0;Je0)for(let ut=0;ut0)for(let ut=0;ut0)if(!1===Me(z)){const R=z.textures,ce=z.width,Ie=z.height;let De=i.COLOR_BUFFER_BIT;const Ae=z.stencilBuffer?i.DEPTH_STENCIL_ATTACHMENT:i.DEPTH_ATTACHMENT,Bt=n.get(z),Je=R.length>1;if(Je)for(let ut=0;utm+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(bue)))}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 Fo;n.matrixAutoUpdate=!1,n.visible=!1,t.joints[e.jointName]=n,t.add(n)}return t.joints[e.jointName]}}class Mue{constructor(){this.texture=null,this.mesh=null,this.depthNear=0,this.depthFar=0}init(t,e,n){if(null===this.texture){const r=new ko;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}}getMesh(t){if(null!==this.texture&&null===this.mesh){const e=t.cameras[0].viewport,n=new Cl({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:e.z},depthHeight:{value:e.w}}});this.mesh=new Mn(new Iu(20,20),n)}return this.mesh}reset(){this.texture=null,this.mesh=null}getDepthTexture(){return this.texture}}class Cue extends og{constructor(t,e){super();const n=this;let r=null,s=1,o=null,a="local-floor",l=1,c=null,d=null,h=null,p=null,m=null,g=null;const b=new Mue,v=e.getContextAttributes();let y=null,M=null;const x=[],C=[],F=new xe;let D=null;const k=new yr;k.layers.enable(1),k.viewport=new gi;const B=new yr;B.layers.enable(2),B.viewport=new gi;const T=[k,B],A=new yue;A.layers.enable(1),A.layers.enable(2);let $=null,ie=null;function ne(ae){const Oe=C.indexOf(ae.inputSource);if(-1===Oe)return;const Ze=x[Oe];void 0!==Ze&&(Ze.update(ae.inputSource,ae.frame,c||o),Ze.dispatchEvent({type:ae.type,data:ae.inputSource}))}function se(){r.removeEventListener("select",ne),r.removeEventListener("selectstart",ne),r.removeEventListener("selectend",ne),r.removeEventListener("squeeze",ne),r.removeEventListener("squeezestart",ne),r.removeEventListener("squeezeend",ne),r.removeEventListener("end",se),r.removeEventListener("inputsourceschange",ge);for(let ae=0;ae=0&&(C[Fe]=null,x[Fe].disconnect(Ze))}for(let Oe=0;Oe=C.length){C.push(Ze),Fe=Ct;break}if(null===C[Ct]){C[Ct]=Ze,Fe=Ct;break}}if(-1===Fe)break}const bt=x[Fe];bt&&bt.connect(Ze)}}this.cameraAutoUpdate=!0,this.enabled=!1,this.isPresenting=!1,this.getController=function(ae){let Oe=x[ae];return void 0===Oe&&(Oe=new CP,x[ae]=Oe),Oe.getTargetRaySpace()},this.getControllerGrip=function(ae){let Oe=x[ae];return void 0===Oe&&(Oe=new CP,x[ae]=Oe),Oe.getGripSpace()},this.getHand=function(ae){let Oe=x[ae];return void 0===Oe&&(Oe=new CP,x[ae]=Oe),Oe.getHandSpace()},this.setFramebufferScaleFactor=function(ae){s=ae,!0===n.isPresenting&&console.warn("THREE.WebXRManager: Cannot change framebuffer scale while presenting.")},this.setReferenceSpaceType=function(ae){a=ae,!0===n.isPresenting&&console.warn("THREE.WebXRManager: Cannot change reference space type while presenting.")},this.getReferenceSpace=function(){return c||o},this.setReferenceSpace=function(ae){c=ae},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 ae=tt(function*(Oe){if(r=Oe,null!==r){if(y=t.getRenderTarget(),r.addEventListener("select",ne),r.addEventListener("selectstart",ne),r.addEventListener("selectend",ne),r.addEventListener("squeeze",ne),r.addEventListener("squeezestart",ne),r.addEventListener("squeezeend",ne),r.addEventListener("end",se),r.addEventListener("inputsourceschange",ge),!0!==v.xrCompatible&&(yield e.makeXRCompatible()),D=t.getPixelRatio(),t.getSize(F),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 Mu(m.framebufferWidth,m.framebufferHeight,{format:Ro,type:Jc,colorSpace:t.outputColorSpace,stencilBuffer:v.stencil});else{let Ze=null,Fe=null,bt=null;v.depth&&(bt=v.stencil?e.DEPTH24_STENCIL8:e.DEPTH_COMPONENT24,Ze=v.stencil?ng:tg,Fe=v.stencil?eg:xu);const Ct={colorFormat:e.RGBA8,depthFormat:bt,scaleFactor:s};h=new XRWebGLBinding(r,e),p=h.createProjectionLayer(Ct),r.updateRenderState({layers:[p]}),t.setPixelRatio(1),t.setSize(p.textureWidth,p.textureHeight,!1),M=new Mu(p.textureWidth,p.textureHeight,{format:Ro,type:Jc,depthTexture:new d5(p.textureWidth,p.textureHeight,Fe,void 0,void 0,void 0,void 0,void 0,void 0,Ze),stencilBuffer:v.stencil,colorSpace:t.outputColorSpace,samples:v.antialias?4:0,resolveDepthBuffer:!1===p.ignoreDepthValues})}M.isXRRenderTarget=!0,this.setFoveation(l),c=null,o=yield r.requestReferenceSpace(a),en.setContext(r),en.start(),n.isPresenting=!0,n.dispatchEvent({type:"sessionstart"})}});return function(Oe){return ae.apply(this,arguments)}}(),this.getEnvironmentBlendMode=function(){if(null!==r)return r.environmentBlendMode},this.getDepthTexture=function(){return b.getDepthTexture()};const q=new O,re=new O;function we(ae,Oe){null===Oe?ae.matrixWorld.copy(ae.matrix):ae.matrixWorld.multiplyMatrices(Oe.matrixWorld,ae.matrix),ae.matrixWorldInverse.copy(ae.matrixWorld).invert()}this.updateCamera=function(ae){if(null===r)return;null!==b.texture&&(ae.near=b.depthNear,ae.far=b.depthFar),A.near=B.near=k.near=ae.near,A.far=B.far=k.far=ae.far,($!==A.near||ie!==A.far)&&(r.updateRenderState({depthNear:A.near,depthFar:A.far}),$=A.near,ie=A.far,k.near=$,k.far=ie,B.near=$,B.far=ie,k.updateProjectionMatrix(),B.updateProjectionMatrix(),ae.updateProjectionMatrix());const Oe=ae.parent,Ze=A.cameras;we(A,Oe);for(let Fe=0;Fe0&&(v.alphaTest.value=y.alphaTest);const M=t.get(y),x=M.envMap,C=M.envMapRotation;x&&(v.envMap.value=x,df.copy(C),df.x*=-1,df.y*=-1,df.z*=-1,x.isCubeTexture&&!1===x.isRenderTargetTexture&&(df.y*=-1,df.z*=-1),v.envMapRotation.value.setFromMatrix4(Sue.makeRotationFromEuler(df)),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,v.lightMapIntensity.value=y.lightMapIntensity,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,Z4(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 d(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===Io&&v.clearcoatNormalScale.value.negate())),y.dispersion>0&&(v.dispersion.value=y.dispersion),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 Aue(i,t,e,n){let r={},s={},o=[];const a=i.getParameter(i.MAX_UNIFORM_BUFFER_BINDINGS);function m(M,x,C,F){const D=M.value,k=x+"_"+C;if(void 0===F[k])return F[k]="number"==typeof D||"boolean"==typeof D?D:D.clone(),!0;{const B=F[k];if("number"==typeof D||"boolean"==typeof D){if(B!==D)return F[k]=D,!0}else if(!1===B.equals(D))return B.copy(D),!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 k=0,B=x.length;k0&&(C+=16-D),M.__size=C,M.__cache={}}(M),C=function d(M){const x=function h(){for(let M=0;M0),Xt=!!le.morphAttributes.position,ai=!!le.morphAttributes.normal,Li=!!le.morphAttributes.color;let tr=bu;de.toneMapped&&(null===k||!0===k.isXRRenderTarget)&&(tr=x.toneMapping);const oa=le.morphAttributes.position||le.morphAttributes.normal||le.morphAttributes.color,ui=void 0!==oa?oa.length:0,It=it.get(de),fs=v.state.lights;!0!==ae||!0!==Oe&&L===T||bn.setState(de,L,L===T&&de.id===B);let hi=!1;de.version===It.__version?(It.needsLights&&It.lightsStateVersion!==fs.state.version||It.outputColorSpace!==xt||te.isBatchedMesh&&!1===It.batching||!te.isBatchedMesh&&!0===It.batching||te.isBatchedMesh&&!0===It.batchingColor&&null===te.colorTexture||te.isBatchedMesh&&!1===It.batchingColor&&null!==te.colorTexture||te.isInstancedMesh&&!1===It.instancing||!te.isInstancedMesh&&!0===It.instancing||te.isSkinnedMesh&&!1===It.skinning||!te.isSkinnedMesh&&!0===It.skinning||te.isInstancedMesh&&!0===It.instancingColor&&null===te.instanceColor||te.isInstancedMesh&&!1===It.instancingColor&&null!==te.instanceColor||te.isInstancedMesh&&!0===It.instancingMorph&&null===te.morphTexture||te.isInstancedMesh&&!1===It.instancingMorph&&null!==te.morphTexture||It.envMap!==wt||!0===de.fog&&It.fog!==je||void 0!==It.numClippingPlanes&&(It.numClippingPlanes!==bn.numPlanes||It.numIntersection!==bn.numIntersection)||It.vertexAlphas!==qt||It.vertexTangents!==on||It.morphTargets!==Xt||It.morphNormals!==ai||It.morphColors!==Li||It.toneMapping!==tr||It.morphTargetsCount!==ui)&&(hi=!0):(hi=!0,It.__version=de.version);let El=It.currentProgram;!0===hi&&(El=xE(de,K,te));let qg=!1,aa=!1,qO=!1;const xr=El.getUniforms(),Bu=It.uniforms;if(Me.useProgram(El.program)&&(qg=!0,aa=!0,qO=!0),de.id!==B&&(B=de.id,aa=!0),qg||T!==L){xr.setValue(N,"projectionMatrix",L.projectionMatrix),xr.setValue(N,"viewMatrix",L.matrixWorldInverse);const za=xr.map.cameraPosition;void 0!==za&&za.setValue(N,Fe.setFromMatrixPosition(L.matrixWorld)),nt.logarithmicDepthBuffer&&xr.setValue(N,"logDepthBufFC",2/(Math.log(L.far+1)/Math.LN2)),(de.isMeshPhongMaterial||de.isMeshToonMaterial||de.isMeshLambertMaterial||de.isMeshBasicMaterial||de.isMeshStandardMaterial||de.isShaderMaterial)&&xr.setValue(N,"isOrthographic",!0===L.isOrthographicCamera),T!==L&&(T=L,aa=!0,qO=!0)}if(te.isSkinnedMesh){xr.setOptional(N,te,"bindMatrix"),xr.setOptional(N,te,"bindMatrixInverse");const za=te.skeleton;za&&(null===za.boneTexture&&za.computeBoneTexture(),xr.setValue(N,"boneTexture",za.boneTexture,pt))}te.isBatchedMesh&&(xr.setOptional(N,te,"batchingTexture"),xr.setValue(N,"batchingTexture",te._matricesTexture,pt),xr.setOptional(N,te,"batchingIdTexture"),xr.setValue(N,"batchingIdTexture",te._indirectTexture,pt),xr.setOptional(N,te,"batchingColorTexture"),null!==te._colorsTexture&&xr.setValue(N,"batchingColorTexture",te._colorsTexture,pt));const XO=le.morphAttributes;if((void 0!==XO.position||void 0!==XO.normal||void 0!==XO.color)&&jn.update(te,le,El),(aa||It.receiveShadow!==te.receiveShadow)&&(It.receiveShadow=te.receiveShadow,xr.setValue(N,"receiveShadow",te.receiveShadow)),de.isMeshGouraudMaterial&&null!==de.envMap&&(Bu.envMap.value=wt,Bu.flipEnvMap.value=wt.isCubeTexture&&!1===wt.isRenderTargetTexture?-1:1),de.isMeshStandardMaterial&&null===de.envMap&&null!==K.environment&&(Bu.envMapIntensity.value=K.environmentIntensity),aa&&(xr.setValue(N,"toneMappingExposure",x.toneMappingExposure),It.needsLights&&function Rve(L,K){L.ambientLightColor.needsUpdate=K,L.lightProbe.needsUpdate=K,L.directionalLights.needsUpdate=K,L.directionalLightShadows.needsUpdate=K,L.pointLights.needsUpdate=K,L.pointLightShadows.needsUpdate=K,L.spotLights.needsUpdate=K,L.spotLightShadows.needsUpdate=K,L.rectAreaLights.needsUpdate=K,L.hemisphereLights.needsUpdate=K}(Bu,qO),je&&!0===de.fog&&Bt.refreshFogUniforms(Bu,je),Bt.refreshMaterialUniforms(Bu,de,re,q,v.state.transmissionRenderTarget[L.id]),uS.upload(N,g8(It),Bu,pt)),de.isShaderMaterial&&!0===de.uniformsNeedUpdate&&(uS.upload(N,g8(It),Bu,pt),de.uniformsNeedUpdate=!1),de.isSpriteMaterial&&xr.setValue(N,"center",te.center),xr.setValue(N,"modelViewMatrix",te.modelViewMatrix),xr.setValue(N,"normalMatrix",te.normalMatrix),xr.setValue(N,"modelMatrix",te.matrixWorld),de.isShaderMaterial||de.isRawShaderMaterial){const za=de.uniformsGroups;for(let KO=0,Pve=za.length;KO{function je(){de.forEach(function(st){it.get(st).currentProgram.isReady()&&de.delete(st)}),0!==de.size?setTimeout(je,10):te(L)}null!==Le.get("KHR_parallel_shader_compile")?je():setTimeout(je,10)})};let di=null;function hc(){kf.stop()}function h8(){kf.start()}const kf=new t5;function YO(L,K,le,de){if(!1===L.visible)return;if(L.layers.test(K.layers))if(L.isGroup)le=L.renderOrder;else if(L.isLOD)!0===L.autoUpdate&&L.update(K);else if(L.isLight)v.pushLight(L),L.castShadow&&v.pushShadow(L);else if(L.isSprite){if(!L.frustumCulled||en.intersectsSprite(L)){de&&bt.setFromMatrixPosition(L.matrixWorld).applyMatrix4(Ze);const st=De.update(L),xt=L.material;xt.visible&&b.push(L,st,xt,le,bt.z,null)}}else if((L.isMesh||L.isLine||L.isPoints)&&(!L.frustumCulled||en.intersectsObject(L))){const st=De.update(L),xt=L.material;if(de&&(void 0!==L.boundingSphere?(null===L.boundingSphere&&L.computeBoundingSphere(),bt.copy(L.boundingSphere.center)):(null===st.boundingSphere&&st.computeBoundingSphere(),bt.copy(st.boundingSphere.center)),bt.applyMatrix4(L.matrixWorld).applyMatrix4(Ze)),Array.isArray(xt)){const wt=st.groups;for(let qt=0,on=wt.length;qt0&&bE(te,K,le),je.length>0&&bE(je,K,le),st.length>0&&bE(st,K,le),Me.buffers.depth.setTest(!0),Me.buffers.depth.setMask(!0),Me.buffers.color.setMask(!0),Me.setPolygonOffset(!1)}function p8(L,K,le,de){if(null!==(!0===le.isScene?le.overrideMaterial:null))return;void 0===v.state.transmissionRenderTarget[de.id]&&(v.state.transmissionRenderTarget[de.id]=new Mu(1,1,{generateMipmaps:!0,type:Le.has("EXT_color_buffer_half_float")||Le.has("EXT_color_buffer_float")?Jm:Jc,minFilter:bl,samples:4,stencilBuffer:s,resolveDepthBuffer:!1,resolveStencilBuffer:!1,colorSpace:Jn.workingColorSpace}));const je=v.state.transmissionRenderTarget[de.id],st=de.viewport||A;je.setSize(st.z,st.w);const xt=x.getRenderTarget();x.setRenderTarget(je),x.getClearColor(ne),se=x.getClearAlpha(),se<1&&x.setClearColor(16777215,.5),x.clear(),Mt&&dt.render(le);const wt=x.toneMapping;x.toneMapping=bu;const qt=de.viewport;if(void 0!==de.viewport&&(de.viewport=void 0),v.setupLightsView(de),!0===ae&&bn.setGlobalState(x.clippingPlanes,de),bE(L,le,de),pt.updateMultisampleRenderTarget(je),pt.updateRenderTargetMipmap(je),!1===Le.has("WEBGL_multisampled_render_to_texture")){let on=!1;for(let Xt=0,ai=K.length;Xt0)for(let st=0,xt=je.length;st0&&p8(de,te,L,K),Mt&&dt.render(L),f8(b,L,K);null!==k&&(pt.updateMultisampleRenderTarget(k),pt.updateRenderTargetMipmap(k)),!0===L.isScene&&L.onAfterRender(x,L,K),Pn.resetDefaultState(),B=-1,T=null,M.pop(),M.length>0?(v=M[M.length-1],!0===ae&&bn.setGlobalState(x.clippingPlanes,v.state.camera)):v=null,y.pop(),b=y.length>0?y[y.length-1]:null},this.getActiveCubeFace=function(){return F},this.getActiveMipmapLevel=function(){return D},this.getRenderTarget=function(){return k},this.setRenderTargetTextures=function(L,K,le){it.get(L.texture).__webglTexture=K,it.get(L.depthTexture).__webglTexture=le;const de=it.get(L);de.__hasExternalTextures=!0,de.__autoAllocateDepthBuffer=void 0===le,de.__autoAllocateDepthBuffer||!0===Le.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(L,K){const le=it.get(L);le.__webglFramebuffer=K,le.__useDefaultFramebuffer=void 0===K},this.setRenderTarget=function(L,K=0,le=0){k=L,F=K,D=le;let de=!0,te=null,je=!1,st=!1;if(L){const wt=it.get(L);void 0!==wt.__useDefaultFramebuffer?(Me.bindFramebuffer(N.FRAMEBUFFER,null),de=!1):void 0===wt.__webglFramebuffer?pt.setupRenderTarget(L):wt.__hasExternalTextures&&pt.rebindTextures(L,it.get(L.texture).__webglTexture,it.get(L.depthTexture).__webglTexture);const qt=L.texture;(qt.isData3DTexture||qt.isDataArrayTexture||qt.isCompressedArrayTexture)&&(st=!0);const on=it.get(L).__webglFramebuffer;L.isWebGLCubeRenderTarget?(te=Array.isArray(on[K])?on[K][le]:on[K],je=!0):te=L.samples>0&&!1===pt.useMultisampledRTT(L)?it.get(L).__webglMultisampledFramebuffer:Array.isArray(on)?on[le]:on,A.copy(L.viewport),$.copy(L.scissor),ie=L.scissorTest}else A.copy(Ne).multiplyScalar(re).floor(),$.copy(Ye).multiplyScalar(re).floor(),ie=Tt;if(Me.bindFramebuffer(N.FRAMEBUFFER,te)&&de&&Me.drawBuffers(L,te),Me.viewport(A),Me.scissor($),Me.setScissorTest(ie),je){const wt=it.get(L.texture);N.framebufferTexture2D(N.FRAMEBUFFER,N.COLOR_ATTACHMENT0,N.TEXTURE_CUBE_MAP_POSITIVE_X+K,wt.__webglTexture,le)}else if(st){const wt=it.get(L.texture);N.framebufferTextureLayer(N.FRAMEBUFFER,N.COLOR_ATTACHMENT0,wt.__webglTexture,le||0,K||0)}B=-1},this.readRenderTargetPixels=function(L,K,le,de,te,je,st){if(!L||!L.isWebGLRenderTarget)return void console.error("THREE.WebGLRenderer.readRenderTargetPixels: renderTarget is not THREE.WebGLRenderTarget.");let xt=it.get(L).__webglFramebuffer;if(L.isWebGLCubeRenderTarget&&void 0!==st&&(xt=xt[st]),xt){Me.bindFramebuffer(N.FRAMEBUFFER,xt);try{const wt=L.texture,qt=wt.format,on=wt.type;if(!nt.textureFormatReadable(qt))return void console.error("THREE.WebGLRenderer.readRenderTargetPixels: renderTarget is not in RGBA or implementation defined format.");if(!nt.textureTypeReadable(on))return void console.error("THREE.WebGLRenderer.readRenderTargetPixels: renderTarget is not in UnsignedByteType or implementation defined type.");K>=0&&K<=L.width-de&&le>=0&&le<=L.height-te&&N.readPixels(K,le,de,te,vn.convert(qt),vn.convert(on),je)}finally{const wt=null!==k?it.get(k).__webglFramebuffer:null;Me.bindFramebuffer(N.FRAMEBUFFER,wt)}}},this.readRenderTargetPixelsAsync=function(){var L=tt(function*(K,le,de,te,je,st,xt){if(!K||!K.isWebGLRenderTarget)throw new Error("THREE.WebGLRenderer.readRenderTargetPixels: renderTarget is not THREE.WebGLRenderTarget.");let wt=it.get(K).__webglFramebuffer;if(K.isWebGLCubeRenderTarget&&void 0!==xt&&(wt=wt[xt]),wt){Me.bindFramebuffer(N.FRAMEBUFFER,wt);try{const qt=K.texture,on=qt.format,Xt=qt.type;if(!nt.textureFormatReadable(on))throw new Error("THREE.WebGLRenderer.readRenderTargetPixelsAsync: renderTarget is not in RGBA or implementation defined format.");if(!nt.textureTypeReadable(Xt))throw new Error("THREE.WebGLRenderer.readRenderTargetPixelsAsync: renderTarget is not in UnsignedByteType or implementation defined type.");if(le>=0&&le<=K.width-te&&de>=0&&de<=K.height-je){const ai=N.createBuffer();N.bindBuffer(N.PIXEL_PACK_BUFFER,ai),N.bufferData(N.PIXEL_PACK_BUFFER,st.byteLength,N.STREAM_READ),N.readPixels(le,de,te,je,vn.convert(on),vn.convert(Xt),0),N.flush();const Li=N.fenceSync(N.SYNC_GPU_COMMANDS_COMPLETE,0);yield function Joe(i,t,e){return new Promise(function(n,r){setTimeout(function s(){switch(i.clientWaitSync(t,i.SYNC_FLUSH_COMMANDS_BIT,0)){case i.WAIT_FAILED:r();break;case i.TIMEOUT_EXPIRED:setTimeout(s,e);break;default:n()}},e)})}(N,Li,4);try{N.bindBuffer(N.PIXEL_PACK_BUFFER,ai),N.getBufferSubData(N.PIXEL_PACK_BUFFER,0,st)}finally{N.deleteBuffer(ai),N.deleteSync(Li)}return st}}finally{const qt=null!==k?it.get(k).__webglFramebuffer:null;Me.bindFramebuffer(N.FRAMEBUFFER,qt)}}});return function(K,le,de,te,je,st,xt){return L.apply(this,arguments)}}(),this.copyFramebufferToTexture=function(L,K=null,le=0){!0!==L.isTexture&&(cg("WebGLRenderer: copyFramebufferToTexture function signature has changed."),K=arguments[0]||null,L=arguments[1]);const de=Math.pow(2,-le),te=Math.floor(L.image.width*de),je=Math.floor(L.image.height*de),st=null!==K?K.x:0,xt=null!==K?K.y:0;pt.setTexture2D(L,0),N.copyTexSubImage2D(N.TEXTURE_2D,le,0,0,st,xt,te,je),Me.unbindTexture()},this.copyTextureToTexture=function(L,K,le=null,de=null,te=0){let je,st,xt,wt,qt,on;!0!==L.isTexture&&(cg("WebGLRenderer: copyTextureToTexture function signature has changed."),de=arguments[0]||null,L=arguments[1],K=arguments[2],te=arguments[3]||0,le=null),null!==le?(je=le.max.x-le.min.x,st=le.max.y-le.min.y,xt=le.min.x,wt=le.min.y):(je=L.image.width,st=L.image.height,xt=0,wt=0),null!==de?(qt=de.x,on=de.y):(qt=0,on=0);const Xt=vn.convert(K.format),ai=vn.convert(K.type);pt.setTexture2D(K,0),N.pixelStorei(N.UNPACK_FLIP_Y_WEBGL,K.flipY),N.pixelStorei(N.UNPACK_PREMULTIPLY_ALPHA_WEBGL,K.premultiplyAlpha),N.pixelStorei(N.UNPACK_ALIGNMENT,K.unpackAlignment);const Li=N.getParameter(N.UNPACK_ROW_LENGTH),tr=N.getParameter(N.UNPACK_IMAGE_HEIGHT),oa=N.getParameter(N.UNPACK_SKIP_PIXELS),ui=N.getParameter(N.UNPACK_SKIP_ROWS),It=N.getParameter(N.UNPACK_SKIP_IMAGES),fs=L.isCompressedTexture?L.mipmaps[te]:L.image;N.pixelStorei(N.UNPACK_ROW_LENGTH,fs.width),N.pixelStorei(N.UNPACK_IMAGE_HEIGHT,fs.height),N.pixelStorei(N.UNPACK_SKIP_PIXELS,xt),N.pixelStorei(N.UNPACK_SKIP_ROWS,wt),L.isDataTexture?N.texSubImage2D(N.TEXTURE_2D,te,qt,on,je,st,Xt,ai,fs.data):L.isCompressedTexture?N.compressedTexSubImage2D(N.TEXTURE_2D,te,qt,on,fs.width,fs.height,Xt,fs.data):N.texSubImage2D(N.TEXTURE_2D,te,qt,on,je,st,Xt,ai,fs),N.pixelStorei(N.UNPACK_ROW_LENGTH,Li),N.pixelStorei(N.UNPACK_IMAGE_HEIGHT,tr),N.pixelStorei(N.UNPACK_SKIP_PIXELS,oa),N.pixelStorei(N.UNPACK_SKIP_ROWS,ui),N.pixelStorei(N.UNPACK_SKIP_IMAGES,It),0===te&&K.generateMipmaps&&N.generateMipmap(N.TEXTURE_2D),Me.unbindTexture()},this.copyTextureToTexture3D=function(L,K,le=null,de=null,te=0){let je,st,xt,wt,qt,on,Xt,ai,Li;!0!==L.isTexture&&(cg("WebGLRenderer: copyTextureToTexture3D function signature has changed."),le=arguments[0]||null,de=arguments[1]||null,L=arguments[2],K=arguments[3],te=arguments[4]||0);const tr=L.isCompressedTexture?L.mipmaps[te]:L.image;null!==le?(je=le.max.x-le.min.x,st=le.max.y-le.min.y,xt=le.max.z-le.min.z,wt=le.min.x,qt=le.min.y,on=le.min.z):(je=tr.width,st=tr.height,xt=tr.depth,wt=0,qt=0,on=0),null!==de?(Xt=de.x,ai=de.y,Li=de.z):(Xt=0,ai=0,Li=0);const oa=vn.convert(K.format),ui=vn.convert(K.type);let It;if(K.isData3DTexture)pt.setTexture3D(K,0),It=N.TEXTURE_3D;else{if(!K.isDataArrayTexture&&!K.isCompressedArrayTexture)return void console.warn("THREE.WebGLRenderer.copyTextureToTexture3D: only supports THREE.DataTexture3D and THREE.DataTexture2DArray.");pt.setTexture2DArray(K,0),It=N.TEXTURE_2D_ARRAY}N.pixelStorei(N.UNPACK_FLIP_Y_WEBGL,K.flipY),N.pixelStorei(N.UNPACK_PREMULTIPLY_ALPHA_WEBGL,K.premultiplyAlpha),N.pixelStorei(N.UNPACK_ALIGNMENT,K.unpackAlignment);const fs=N.getParameter(N.UNPACK_ROW_LENGTH),hi=N.getParameter(N.UNPACK_IMAGE_HEIGHT),El=N.getParameter(N.UNPACK_SKIP_PIXELS),qg=N.getParameter(N.UNPACK_SKIP_ROWS),aa=N.getParameter(N.UNPACK_SKIP_IMAGES);N.pixelStorei(N.UNPACK_ROW_LENGTH,tr.width),N.pixelStorei(N.UNPACK_IMAGE_HEIGHT,tr.height),N.pixelStorei(N.UNPACK_SKIP_PIXELS,wt),N.pixelStorei(N.UNPACK_SKIP_ROWS,qt),N.pixelStorei(N.UNPACK_SKIP_IMAGES,on),L.isDataTexture||L.isData3DTexture?N.texSubImage3D(It,te,Xt,ai,Li,je,st,xt,oa,ui,tr.data):K.isCompressedArrayTexture?N.compressedTexSubImage3D(It,te,Xt,ai,Li,je,st,xt,oa,tr.data):N.texSubImage3D(It,te,Xt,ai,Li,je,st,xt,oa,ui,tr),N.pixelStorei(N.UNPACK_ROW_LENGTH,fs),N.pixelStorei(N.UNPACK_IMAGE_HEIGHT,hi),N.pixelStorei(N.UNPACK_SKIP_PIXELS,El),N.pixelStorei(N.UNPACK_SKIP_ROWS,qg),N.pixelStorei(N.UNPACK_SKIP_IMAGES,aa),0===te&&K.generateMipmaps&&N.generateMipmap(It),Me.unbindTexture()},this.initRenderTarget=function(L){void 0===it.get(L).__webglFramebuffer&&pt.setupRenderTarget(L)},this.initTexture=function(L){L.isCubeTexture?pt.setTextureCube(L,0):L.isData3DTexture?pt.setTexture3D(L,0):L.isDataArrayTexture||L.isCompressedArrayTexture?pt.setTexture2DArray(L,0):pt.setTexture2D(L,0),Me.unbindTexture()},this.resetState=function(){F=0,D=0,k=null,Me.reset(),Pn.reset()},typeof __THREE_DEVTOOLS__<"u"&&__THREE_DEVTOOLS__.dispatchEvent(new CustomEvent("observe",{detail:this}))}get coordinateSystem(){return ed}get outputColorSpace(){return this._outputColorSpace}set outputColorSpace(t){this._outputColorSpace=t;const e=this.getContext();e.drawingBufferColorSpace=t===jk?"display-p3":"srgb",e.unpackColorSpace=Jn.workingColorSpace===LC?"display-p3":"srgb"}}class Rb extends Or{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 id,this.environmentIntensity=1,this.environmentRotation=new id,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 AP{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=Jo()}onUploadCallback(){}set needsUpdate(t){!0===t&&this.version++}get updateRange(){return cg("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;r0){const r=e[n[0]];if(void 0!==r){this.morphTargetInfluences=[],this.morphTargetDictionary={};for(let s=0,o=r.length;sn)return;FP.applyMatrix4(i.matrixWorld);const l=t.ray.origin.distanceTo(FP);return lt.far?void 0:{distance:l,point:Z5.clone().applyMatrix4(i.matrixWorld),index:r,face:null,faceIndex:null,object:i}}const Q5=new O,J5=new O;class Ng extends ff{constructor(t,e){super(t,e),this.isLineSegments=!0,this.type="LineSegments"}computeLineDistances(){const t=this.geometry;if(null===t.index){const e=t.attributes.position,n=[];for(let r=0,s=e.count;r0){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 cc{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 d=n[r];return(r+(o-d)/(n[r+1]-d))/(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 xe:new O);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 O,r=[],s=[],o=[],a=new O,l=new Nt;for(let m=0;m<=t;m++)r[m]=this.getTangentAt(m/t,new O);s[0]=new O,o[0]=new O;let c=Number.MAX_VALUE;const d=Math.abs(r[0].x),h=Math.abs(r[0].y),p=Math.abs(r[0].z);d<=c&&(c=d,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 NP extends cc{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 xe){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(iG(a,l.x,c.x,d.x,h.x),iG(a,l.y,c.y,d.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]:(DS.subVectors(r[0],r[1]).add(r[0]),c=DS);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 d=c.getPoint(1);return this.currentPoint.copy(d),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 RS extends hn{constructor(t=[new xe(0,-.5),new xe(.5,0),new xe(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=[],d=1/e,h=new O,p=new xe,m=new O,g=new O,b=new O;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*d*r,C=Math.sin(x),F=Math.cos(x);for(let D=0;D<=t.length-1;D++)h.x=t[D].x*C,h.y=t[D].y,h.z=t[D].x*F,o.push(h.x,h.y,h.z),p.x=M/e,p.y=D/(t.length-1),a.push(p.x,p.y),c.push(l[3*D+0]*C,l[3*D+1],l[3*D+0]*F)}for(let M=0;M0&&x(!0),e>0&&x(!1)),this.setIndex(d),this.setAttribute("position",new ct(h,3)),this.setAttribute("normal",new ct(p,3)),this.setAttribute("uv",new ct(m,2))}copy(t){return super.copy(t),this.parameters=Object.assign({},t.parameters),this}static fromJSON(t){return new Bg(t.radiusTop,t.radiusBottom,t.height,t.radialSegments,t.heightSegments,t.openEnded,t.thetaStart,t.thetaLength)}}class PS extends Bg{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 PS(t.radius,t.height,t.radialSegments,t.heightSegments,t.openEnded,t.thetaStart,t.thetaLength)}}class Wb 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 d=[],h=new O,p=new O,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 F=0;F<=e;F++){const D=F/e;h.x=-t*Math.cos(r+D*s)*Math.sin(o+x*a),h.y=t*Math.cos(o+x*a),h.z=t*Math.sin(r+D*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(D+C,1-x),M.push(c++)}d.push(M)}for(let y=0;y0)&&m.push(d[y][M+1],C,D),(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 dispersion(){return this._dispersion}set dispersion(t){this._dispersion>0!=t>0&&this.version++,this._dispersion=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.dispersion=t.dispersion,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 zS extends Po{constructor(t){super(),this.isMeshPhongMaterial=!0,this.type="MeshPhongMaterial",this.color=new qe(16777215),this.specular=new qe(1118481),this.shininess=30,this.map=null,this.lightMap=null,this.lightMapIntensity=1,this.aoMap=null,this.aoMapIntensity=1,this.emissive=new qe(0),this.emissiveIntensity=1,this.emissiveMap=null,this.bumpMap=null,this.bumpScale=1,this.normalMap=null,this.normalMapType=Zh,this.normalScale=new xe(1,1),this.displacementMap=null,this.displacementScale=1,this.displacementBias=0,this.specularMap=null,this.alphaMap=null,this.envMap=null,this.envMapRotation=new id,this.combine=EC,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 _f(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 vG(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 tO(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 nO(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 Yb{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 _G(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}}dc.prototype.TimeBufferType=Float32Array,dc.prototype.ValueBufferType=Float32Array,dc.prototype.DefaultInterpolation=yb;class zg extends dc{constructor(t,e,n){super(t,e,n)}}zg.prototype.ValueTypeName="bool",zg.prototype.ValueBufferType=Array,zg.prototype.DefaultInterpolation=vb,zg.prototype.InterpolantFactoryMethodLinear=void 0,zg.prototype.InterpolantFactoryMethodSmooth=void 0;class bG extends dc{}bG.prototype.ValueTypeName="color";class Hg extends dc{}Hg.prototype.ValueTypeName="number";class Ohe extends Yb{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 d=c+a;c!==d;c+=4)co.slerpFlat(s,0,o,c-a,o,c,l);return s}}class Gg extends dc{InterpolantFactoryMethodLinear(t){return new Ohe(this.times,this.values,this.getValueSize(),t)}}Gg.prototype.ValueTypeName="quaternion",Gg.prototype.InterpolantFactoryMethodSmooth=void 0;class $g extends dc{constructor(t,e,n){super(t,e,n)}}$g.prototype.ValueTypeName="string",$g.prototype.ValueBufferType=Array,$g.prototype.DefaultInterpolation=vb,$g.prototype.InterpolantFactoryMethodLinear=void 0,$g.prototype.InterpolantFactoryMethodSmooth=void 0;class Wg extends dc{}Wg.prototype.ValueTypeName="vector";class qb{constructor(t="",e=-1,n=[],r=2500){this.name=t,this.tracks=n,this.duration=e,this.blendMode=r,this.uuid=Jo(),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(Lhe(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(dc.toJSON(n[s]));return r}static CreateFromMorphTargetSequence(t,e,n,r){const s=e.length,o=[];for(let a=0;a1){const h=d[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=[];nO(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:wG,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 dd={};class Nhe extends Error{constructor(t,e){super(t),this.response=e}}class La extends vf{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=ku.get(t);if(void 0!==s)return this.manager.itemStart(t),setTimeout(()=>{e&&e(s),this.manager.itemEnd(t)},0),s;if(void 0!==dd[t])return void dd[t].push({onLoad:e,onProgress:n,onError:r});dd[t]=[],dd[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 d=dd[t],h=c.body.getReader(),p=c.headers.get("X-File-Size")||c.headers.get("Content-Length"),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 F=new ProgressEvent("progress",{lengthComputable:g,loaded:b,total:m});for(let D=0,k=d.length;D{y.error(x)})}()}});return new Response(v)}throw new Nhe(`fetch for "${c.url}" responded with ${c.status}: ${c.statusText}`,c)}).then(c=>{switch(l){case"arraybuffer":return c.arrayBuffer();case"blob":return c.blob();case"document":return c.text().then(d=>(new DOMParser).parseFromString(d,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=>{ku.add(t,c);const d=dd[t];delete dd[t];for(let h=0,p=d.length;h{const d=dd[t];if(void 0===d)throw this.manager.itemError(t),c;delete dd[t];for(let h=0,p=d.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 HS extends vf{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=ku.get(t);if(void 0!==o)return s.manager.itemStart(t),setTimeout(function(){e&&e(o),s.manager.itemEnd(t)},0),o;const a=xb("img");function l(){d(),ku.add(t,this),e&&e(this),s.manager.itemEnd(t)}function c(h){d(),r&&r(h),s.manager.itemError(t),s.manager.itemEnd(t)}function d(){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 yf extends vf{constructor(t){super(t)}load(t,e,n,r){const s=new ko,o=new HS(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 GS extends Or{constructor(t,e=1){super(),this.isLight=!0,this.type="Light",this.color=new qe(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()),void 0!==this.target&&(e.object.target=this.target.uuid),e}}const iO=new Nt,MG=new O,CG=new O;class rO{constructor(t){this.camera=t,this.intensity=1,this.bias=0,this.normalBias=0,this.radius=1,this.blurSamples=8,this.mapSize=new xe(512,512),this.map=null,this.mapPass=null,this.matrix=new Nt,this.autoUpdate=!0,this.needsUpdate=!1,this._frustum=new aS,this._frameExtents=new xe(1,1),this._viewportCount=1,this._viewports=[new gi(0,0,1,1)]}getViewportCount(){return this._viewportCount}getFrustum(){return this._frustum}updateMatrices(t){const e=this.camera,n=this.matrix;MG.setFromMatrixPosition(t.matrixWorld),e.position.copy(MG),CG.setFromMatrixPosition(t.target.matrixWorld),e.lookAt(CG),e.updateMatrixWorld(),iO.multiplyMatrices(e.projectionMatrix,e.matrixWorldInverse),this._frustum.setFromProjectionMatrix(iO),n.set(.5,0,0,.5,0,.5,0,.5,0,0,.5,.5,0,0,0,1),n.multiply(iO)}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.intensity=t.intensity,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 1!==this.intensity&&(t.intensity=this.intensity),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 Uhe extends rO{constructor(){super(new yr(50,1,.5,500)),this.isSpotLightShadow=!0,this.focus=1}updateMatrices(t){const e=this.camera,n=2*ag*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 SG extends GS{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(Or.DEFAULT_UP),this.updateMatrix(),this.target=new Or,this.distance=n,this.angle=r,this.penumbra=s,this.decay=o,this.map=null,this.shadow=new Uhe}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 EG=new Nt,Xb=new O,sO=new O;class Vhe extends rO{constructor(){super(new yr(90,1,.5,500)),this.isPointLightShadow=!0,this._frameExtents=new xe(4,2),this._viewportCount=6,this._viewports=[new gi(2,1,1,1),new gi(0,1,1,1),new gi(3,1,1,1),new gi(1,1,1,1),new gi(3,0,1,1),new gi(1,0,1,1)],this._cubeDirections=[new O(1,0,0),new O(-1,0,0),new O(0,0,1),new O(0,0,-1),new O(0,1,0),new O(0,-1,0)],this._cubeUps=[new O(0,1,0),new O(0,1,0),new O(0,1,0),new O(0,1,0),new O(0,0,1),new O(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()),Xb.setFromMatrixPosition(t.matrixWorld),n.position.copy(Xb),sO.copy(n.position),sO.add(this._cubeDirections[e]),n.up.copy(this._cubeUps[e]),n.lookAt(sO),n.updateMatrixWorld(),r.makeTranslation(-Xb.x,-Xb.y,-Xb.z),EG.multiplyMatrices(n.projectionMatrix,n.matrixWorldInverse),this._frustum.setFromProjectionMatrix(EG)}}class AG extends GS{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 Vhe}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 zhe extends rO{constructor(){super(new Tb(-5,5,5,-5,.5,500)),this.isDirectionalLightShadow=!0}}class DG extends GS{constructor(t,e){super(t,e),this.isDirectionalLight=!0,this.type="DirectionalLight",this.position.copy(Or.DEFAULT_UP),this.updateMatrix(),this.target=new Or,this.shadow=new zhe}dispose(){this.shadow.dispose()}copy(t){return super.copy(t),this.target=t.target.clone(),this.shadow=t.shadow.clone(),this}}class $S extends GS{constructor(t,e){super(t,e),this.isAmbientLight=!0,this.type="AmbientLight"}}class Pu{static decodeText(t){if(console.warn("THREE.LoaderUtils: decodeText() has been deprecated with r165 and will be removed with r175. Use TextDecoder instead."),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=ku.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 ku.add(t,c),e&&e(c),s.manager.itemEnd(t),c}).catch(function(c){r&&r(c),ku.remove(t),s.manager.itemError(t),s.manager.itemEnd(t)});ku.add(t,l),s.manager.itemStart(t)}}class OG{constructor(t=!0){this.autoStart=t,this.startTime=0,this.oldTime=0,this.elapsedTime=0,this.running=!1}start(){this.startTime=FG(),this.oldTime=this.startTime,this.elapsedTime=0,this.running=!0}stop(){this.getElapsedTime(),this.running=!1,this.autoStart=!1}getElapsedTime(){return this.getDelta(),this.elapsedTime}getDelta(){let t=0;if(this.autoStart&&!this.running)return this.start(),0;if(this.running){const e=FG();t=(e-this.oldTime)/1e3,this.oldTime=e,this.elapsedTime+=t}return t}}function FG(){return(typeof performance>"u"?Date:performance).now()}const aO="\\[\\]\\.:\\/",Qhe=new RegExp("["+aO+"]","g"),lO="[^"+aO+"]",Jhe="[^"+aO.replace("\\.","")+"]",rfe=new RegExp("^"+/((?:WC+[\/:])*)/.source.replace("WC",lO)+/(WCOD+)?/.source.replace("WCOD",Jhe)+/(?:\.(WC+)(?:\[(.+)\])?)?/.source.replace("WC",lO)+/\.(WC+)(?:\[(.+)\])?/.source.replace("WC",lO)+"$"),sfe=["material","materials","bones","map"];class ofe{constructor(t,e,n){const r=n||Ri.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 Ri=(()=>{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(Qhe,"")}static parseTrackName(e){const n=rfe.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!==sfe.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;an.name===t||n.userData.name===t);return e?(e.removeFromParent(),new na(e)):null}getBoundings(){return(new Bs).setFromObject(this.nativeMesh)}clone(){return new na(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 Mn&&this.disposeMesh(t)}),this.nativeMesh instanceof Mn&&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 ufe extends na{get supportsFov(){return this.nativeCamera instanceof yr||"PerspectiveCamera"==this.nativeCamera.type}get fov(){return this.nativeCamera.fov||NaN}set fov(t){this.supportsFov&&(this.nativeCamera.fov=t,this.nativeCamera.updateProjectionMatrix())}constructor(t){super(t),this.nativeCamera=t}}class hfe extends Pse{createMaterial(t){let e={};t.color?e={color:t.color}:t.diffuse||(e={color:super.randomColor()});let n=t.shading||"unlit";switch(n){case"unlit":return new qi(Object.assign(Object.assign({},e),{map:t.diffuse||null}));case"standart":return new jb(Object.assign(Object.assign({},e),{map:t.diffuse||null}));case"phong":return new zS(Object.assign(Object.assign({},e),{map:t.diffuse||null}));case"wireframe":return new qi(Object.assign(Object.assign({},e),{wireframe:!0}));default:throw new Error(`"${n}" shading not implemented for three.js`)}}transformPrimitiveZUp(t){t.geometry.rotateX(Math.PI/2)}createPrimitive(t,e={}){var n,r,s,o;let a=null,l=this.createMaterial(e);switch(t.shape){case"PLANE":a=new Mn(new Iu((null===(n=t.dimensions)||void 0===n?void 0:n.x)||1e4,(null===(r=t.dimensions)||void 0===r?void 0:r.y)||1e4,null===(s=t.segments)||void 0===s?void 0:s.x,null===(o=t.segments)||void 0===o?void 0:o.y),l);break;case"BOX":a=new Mn(new nf(...Pe.spr(t.dimensions),...t.segments?Pe.spr(t.segments):[]),l);break;case"CAPSULE":a=new Mn(new kS(t.radius,t.centersDistance,t.capSegments,t.radialSegments),l),this.transformPrimitiveZUp(a);break;case"CYLINDER":a=new Mn(new Bg(t.radius,t.radius,t.height,t.radialSegments,t.heightSegments),l),this.transformPrimitiveZUp(a);break;case"CONE":a=new Mn(new PS(t.radius,t.height,t.radialSegments,t.heightSegments),l),this.transformPrimitiveZUp(a);break;case"SPHERE":a=new Mn(new Wb(t.radius,t.widthSegments,t.heightSegments),l),this.transformPrimitiveZUp(a);break;case"COMPOUND":a=new Fo;for(const{position:d,rotation:h,shape:p}of t.children){const m=this.createPrimitive(p,e).nativeMesh;d&&m.position.set(...Pe.spr(d)),h&&m.quaternion.set(...Yi.spr(h)),a.add(m)}break;case"MESH":const c=new hn;c.setFromPoints(t.vertices.map(d=>new O(...Pe.spr(d)))),c.setIndex(t.faces.reduce((d,h)=>(d.push(...h),d),[])),a=new Mn(c,l)}if(!a)throw new Error(`Primitive with shape "${t.shape}" not implemented`);return void 0!==e.castShadow&&(a.castShadow=e.castShadow),void 0!==e.receiveShadow&&(a.receiveShadow=e.receiveShadow),new na(a)}createPerspectiveCamera(t={}){return new ufe(new yr(t.fov||75,t.aspectRatio||1,t.frustrum?t.frustrum.near:1,t.frustrum?t.frustrum.far:1e4))}}function QG(i,t){if(t===Moe)return console.warn("THREE.BufferGeometryUtils.toTrianglesDrawMode(): Geometry already defined as triangles."),i;if(t===Wk||t===C4){let e=i.getIndex();if(null===e){const o=[],a=i.getAttribute("position");if(void 0===a)return console.error("THREE.BufferGeometryUtils.toTrianglesDrawMode(): Undefined position attribute. Processing not possible."),i;for(let l=0;l=2.0 are supported.")));const c=new jfe(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 d=0;d=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 pfe(){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 Bn={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_DISPERSION:"KHR_materials_dispersion",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 mfe{constructor(t){this.parser=t,this.name=Bn.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 Tfe{constructor(t){this.parser=t,this.name=Bn.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 Ife{constructor(t){this.parser=t,this.name=Bn.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 Rfe{constructor(t){this.name=Bn.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 d=r.count,h=r.byteStride,p=new Uint8Array(a,r.byteOffset||0,r.byteLength||0);return o.decodeGltfBufferAsync?o.decodeGltfBufferAsync(d,h,p,r.mode,r.filter).then(function(m){return m.buffer}):o.ready.then(function(){const m=new ArrayBuffer(d*h);return o.decodeGltfBuffer(new Uint8Array(m),d,h,p,r.mode,r.filter),m})})}return null}}class kfe{constructor(t){this.name=Bn.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!==Na.TRIANGLES&&c.mode!==Na.TRIANGLE_STRIP&&c.mode!==Na.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(d=>(l[c]=d,l[c])));return a.length<1?null:(a.push(this.parser.createNodeMesh(t)),Promise.all(a).then(c=>{const d=c.pop(),h=d.isGroup?d.children:[d],p=c[0].count,m=[];for(const g of h){const b=new Nt,v=new O,y=new co,M=new O(1,1,1),x=new Y5(g.geometry,g.material,p);for(let C=0;C-1,o=s?a.match(/Firefox\/([0-9]+)\./)[1]:-1}this.textureLoader=typeof createImageBitmap>"u"||n&&r<17||s&&o<98?new yf(this.options.manager):new qhe(this.options.manager),this.textureLoader.setCrossOrigin(this.options.crossOrigin),this.textureLoader.setRequestHeader(this.options.requestHeader),this.fileLoader=new La(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 Sf(s,a,r),ud(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,d]of o.children.entries())s(d,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(T,D[k*l+1]),l>=3&&v.setZ(T,D[k*l+2]),l>=4&&v.setW(T,D[k*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(d){d.flipY=!1,d.name=o.name||a.name||"",""===d.name&&"string"==typeof a.uri&&!1===a.uri.startsWith("data:image/")&&(d.name=a.uri);const p=(s.samplers||{})[o.sampler]||{};return d.magFilter=n$[p.magFilter]||lr,d.minFilter=n$[p.minFilter]||bl,d.wrapS=i$[p.wrapS]||Pa,d.wrapT=i$[p.wrapT]||Pa,r.associations.set(d,{textures:t}),d}).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 d=Promise.resolve(l).then(function(h){return new Promise(function(p,m){let g=p;!0===e.isImageBitmapLoader&&(g=function(b){const v=new ko(b);v.needsUpdate=!0,p(v)}),e.load(Pu.resolveURL(h,s.path),g,void 0,m)})}).then(function(h){return!0===c&&a.revokeObjectURL(l),ud(h,o),h.userData.mimeType=o.mimeType||function $fe(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]=d,d}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[Bn.KHR_TEXTURE_TRANSFORM]){const a=void 0!==n.extensions?n.extensions[Bn.KHR_TEXTURE_TRANSFORM]:void 0;if(a){const l=s.associations.get(o);o=s.extensions[Bn.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 pf,Po.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 us,Po.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 jb}loadMaterial(t){const e=this,r=this.extensions,s=this.json.materials[t];let o;const a={},c=[];if((s.extensions||{})[Bn.KHR_MATERIALS_UNLIT]){const h=r[Bn.KHR_MATERIALS_UNLIT];o=h.getMaterialType(),c.push(h.extendParams(a,s,e))}else{const h=s.pbrMetallicRoughness||{};if(a.color=new qe(1,1,1),a.opacity=1,Array.isArray(h.baseColorFactor)){const p=h.baseColorFactor;a.color.setRGB(p[0],p[1],p[2],ds),a.opacity=p[3]}void 0!==h.baseColorTexture&&c.push(e.assignTexture(a,"map",h.baseColorTexture,cs)),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=Ls);const d=s.alphaMode||"OPAQUE";if("BLEND"===d?(a.transparent=!0,a.depthWrite=!1):(a.transparent=!1,"MASK"===d&&(a.alphaTest=void 0!==s.alphaCutoff?s.alphaCutoff:.5)),void 0!==s.normalTexture&&o!==qi&&(c.push(e.assignTexture(a,"normalMap",s.normalTexture)),a.normalScale=new xe(1,1),void 0!==s.normalTexture.scale)){const h=s.normalTexture.scale;a.normalScale.set(h,h)}if(void 0!==s.occlusionTexture&&o!==qi&&(c.push(e.assignTexture(a,"aoMap",s.occlusionTexture)),void 0!==s.occlusionTexture.strength&&(a.aoMapIntensity=s.occlusionTexture.strength)),void 0!==s.emissiveFactor&&o!==qi){const h=s.emissiveFactor;a.emissive=(new qe).setRGB(h[0],h[1],h[2],ds)}return void 0!==s.emissiveTexture&&o!==qi&&c.push(e.assignTexture(a,"emissiveMap",s.emissiveTexture,cs)),Promise.all(c).then(function(){const h=new o(a);return s.name&&(h.name=s.name),ud(h,s),e.associations.set(h,{materials:t}),s.extensions&&Sf(r,h,s),h})}createUniqueName(t){const e=Ri.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[Bn.KHR_DRACO_MESH_COMPRESSION].decodePrimitive(a,e).then(function(l){return r$(l,a,e)})}const o=[];for(let a=0,l=t.length;a0&&Hfe(y,s),y.name=e.createUniqueName(s.name||"mesh_"+t),ud(y,s),v.extensions&&Sf(r,y,v),e.assignFinalMaterial(y),h.push(y)}for(let m=0,g=h.length;m1?new Fo:1===c.length?c[0]:new Or,d!==c[0])for(let h=0,p=c.length;h{const h=new Map;for(const[p,m]of r.associations)(p instanceof Po||p instanceof ko)&&h.set(p,m);return d.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(Fu[s.path]===Fu.weights?t.traverse(function(p){p.morphTargetInfluences&&l.push(p.name?p.name:p.uuid)}):l.push(a),Fu[s.path]){case Fu.weights:c=Hg;break;case Fu.rotation:c=Gg;break;case Fu.position:case Fu.scale:c=Wg;break;default:c=1===n.itemSize?Hg:Wg}const d=void 0!==r.interpolation?Ufe[r.interpolation]:yb,h=this._getArrayFromAccessor(n);for(let p=0,m=l.length;p{r.type.endsWith("Light")&&(console.warn("WORKAROUND: light intensity from GLB divided by 200."),r.intensity*=.005)}),new na(n.scene)})}}const fo=(i,t)=>Array(i).fill(null).map((e,n)=>t(n));class Ef{static startDebugView(t,e){let n=this.activeDebugViews.get(t);return n?n.renderers.includes(e)||n.renderers.push(e):(n={view:new Ef(t),renderers:[e]},this.activeDebugViews.set(t,n)),n.view}static stopDebugView(t,e){const n=t.world,r=this.activeDebugViews.get(n);r&&(r.renderers=r.renderers.filter(s=>s!==e),0===r.renderers.length&&(r.view.dispose(),this.activeDebugViews.delete(n)))}constructor(t){this.world=t,this.debugScene=null,this.aSub=null,this.rSub=null,this.syncMap=new Map,this.debugScene=new Rb;const e=n=>{var r,s;const o=n.debugBodySettings;let c,l=this.lineSegmentPointsForShape(o.shape);c=l?new Ng((new hn).setFromPoints(l)):null===(r=this.world)||void 0===r?void 0:r.visualScene.factory.createPrimitive(o.shape,{shading:"wireframe",color:0}).nativeMesh,this.syncMap.set(n,c),null===(s=this.debugScene)||void 0===s||s.add(c)};for(const n of this.world.physicsWorld.children)e(n);this.aSub=this.world.physicsWorld.added$.subscribe(n=>e(n)),this.rSub=this.world.physicsWorld.removed$.subscribe(n=>{var r;const s=this.syncMap.get(n);s&&(this.syncMap.delete(n),null===(r=this.debugScene)||void 0===r||r.remove(s))})}get scene(){return this.debugScene}render(t,e){for(const[r,s]of this.syncMap.entries()){const o=r.debugBodySettings;if(o.ignoreTransform||(s.position.set(...Pe.spr(r.position)),s.quaternion.set(...Yi.spr(r.rotation))),s.material){let a=16777215;switch(o.type){case"RIGID_DYNAMIC":a=o.sleeping?255:16711680;break;case"RIGID_STATIC":a=65280;break;case"TRIGGER":a=16776960}s.material.color.set(a),s.material.needsUpdate=!0}}const n=t.autoClearColor;n&&(t.autoClearColor=!1),t.render(this.debugScene,e),n&&(t.autoClearColor=!0)}lineSegmentPointsForShape(t){if("BOX"===t.shape){const e=Pe.scalarMult(t.dimensions,.5);return[...fo(8,n=>new O(n<4?e.x:-e.x,n%4<2?e.y:-e.y,n%2?e.z:-e.z)),...fo(8,n=>new O(n%2?e.x:-e.x,n<4?e.y:-e.y,n%4<2?e.z:-e.z)),...fo(8,n=>new O(n%4<2?e.x:-e.x,n%2?e.y:-e.y,n<4?e.z:-e.z))]}if("CYLINDER"===t.shape)return[...fo(32,e=>new O(t.radius*Math.sin(Math.floor((e+1)/2)*Math.PI/8),t.radius*Math.cos(Math.floor((e+1)/2)*Math.PI/8),-t.height/2)),...fo(32,e=>new O(t.radius*Math.sin(Math.floor((e+1)/2)*Math.PI/8),t.radius*Math.cos(Math.floor((e+1)/2)*Math.PI/8),t.height/2)),...fo(8,e=>new O(Math.floor(e/2)%2?0:e<4?t.radius:-t.radius,Math.floor(e/2)%2?e<4?t.radius:-t.radius:0,e%2?t.height/2:-t.height/2)),new O(0,0,-t.height/2),new O(0,0,t.height/2)];if("CONE"===t.shape)return[...fo(32,e=>new O(t.radius*Math.sin(Math.floor((e+1)/2)*Math.PI/8),t.radius*Math.cos(Math.floor((e+1)/2)*Math.PI/8),-t.height/2)),...fo(8,e=>new O(e%2||Math.floor(e/2)%2?0:e<4?t.radius:-t.radius,e%2?0:Math.floor(e/2)%2?e<4?t.radius:-t.radius:0,e%2?t.height/2:-t.height/2)),new O(0,0,-t.height/2),new O(0,0,t.height/2)];if("SPHERE"===t.shape)return[...fo(32,e=>new O(t.radius*Math.sin(Math.floor((e+1)/2)*Math.PI/8),t.radius*Math.cos(Math.floor((e+1)/2)*Math.PI/8),0)),...fo(32,e=>new O(t.radius*Math.sin(Math.floor((e+1)/2)*Math.PI/8),0,t.radius*Math.cos(Math.floor((e+1)/2)*Math.PI/8))),...fo(32,e=>new O(0,t.radius*Math.sin(Math.floor((e+1)/2)*Math.PI/8),t.radius*Math.cos(Math.floor((e+1)/2)*Math.PI/8)))];if("CAPSULE"===t.shape)return[...this.lineSegmentPointsForShape({shape:"CYLINDER",radius:t.radius,height:t.centersDistance}),...fo(16,e=>new O(t.radius*Math.cos(Math.floor((e+1)/2)*Math.PI/8),0,t.radius*Math.sin(Math.floor((e+1)/2)*Math.PI/8)+t.centersDistance/2)),...fo(16,e=>new O(t.radius*Math.cos(Math.floor((e+1)/2)*Math.PI/8),0,-t.radius*Math.sin(Math.floor((e+1)/2)*Math.PI/8)-t.centersDistance/2)),...fo(16,e=>new O(0,t.radius*Math.cos(Math.floor((e+1)/2)*Math.PI/8),t.radius*Math.sin(Math.floor((e+1)/2)*Math.PI/8)+t.centersDistance/2)),...fo(16,e=>new O(0,t.radius*Math.cos(Math.floor((e+1)/2)*Math.PI/8),-t.radius*Math.sin(Math.floor((e+1)/2)*Math.PI/8)-t.centersDistance/2))];if("CONVEX_HULL"===t.shape)return[...t.vertices.map(n=>[new O(n.x-.05,n.y,n.z),new O(n.x+.05,n.y,n.z),new O(n.x,n.y-.05,n.z),new O(n.x,n.y+.05,n.z),new O(n.x,n.y,n.z-.05),new O(n.x,n.y,n.z+.05)]).reduce((n,r)=>(n.push(...r),n),[])];if("COMPOUND"===t.shape){const e=[];for(const{position:n,shape:r,rotation:s}of t.children){let o=this.lineSegmentPointsForShape(r);if(!o)return null;e.push(...o.map(a=>new O(...Pe.spr(Pe.add(n||Pe.O,Pe.rot(a,s||Yi.O))))))}return e}return null}dispose(){var t,e;this.debugScene=null,null===(t=this.aSub)||void 0===t||t.unsubscribe(),null===(e=this.rSub)||void 0===e||e.unsubscribe(),this.syncMap=new Map}}Ef.activeDebugViews=new Map;class s$ extends Sse{get physicsDebugViewActive(){return this._physicsDebugViewActive}set physicsDebugViewActive(t){this._physicsDebugViewActive!=t&&(this._physicsDebugViewActive=t,this.world&&(t?this.debugView=Ef.startDebugView(this.world,this):(Ef.stopDebugView(this.debugView,this),this.debugView=null)))}constructor(t,e,n,r={}){super(t,n,r),this.scene=t,this.camera=e,this.canvas=n,this.world=null,this.debugView=null,this._physicsDebugViewActive=!1,this.nativeRenderer=new Due(Object.assign({canvas:n,alpha:this.rendererOptions.transparent},this.rendererOptions)),this.nativeRenderer.shadowMap.enabled=!0,this.nativeRenderer.setClearColor(this.rendererOptions.background),this.nativeRenderer.shadowMap.type=c4,this.nativeRenderer.setPixelRatio(this.rendererOptions.forceResolution||devicePixelRatio)}addToWorld(t){this.world=t,this.physicsDebugViewActive&&(this.debugView=Ef.startDebugView(this.world,this))}removeFromWorld(t){this.physicsDebugViewActive&&(Ef.stopDebugView(this.debugView,this),this.debugView=null),this.world=null}resizeRenderer(t){this.nativeRenderer.setSize(t.x,t.y),(this.camera.nativeCamera instanceof yr||"PerspectiveCamera"==this.camera.nativeCamera.type)&&Math.abs(this.camera.nativeCamera.aspect-t.x/t.y)>.01&&(this.camera.nativeCamera.aspect=t.x/t.y,this.camera.nativeCamera.updateProjectionMatrix())}render(){this.nativeRenderer.render(this.scene.nativeScene,this.camera.nativeCamera),this.physicsDebugViewActive&&this.debugView.render(this.nativeRenderer,this.camera.nativeCamera)}dispose(){this.camera.dispose(),this.nativeRenderer.clear(),this.nativeRenderer.dispose(),this.nativeRenderer.domElement=null}}const Kfe={name:"CopyShader",uniforms:{tDiffuse:{value:null},opacity:{value:1}},vertexShader:"\n\n\t\tvarying vec2 vUv;\n\n\t\tvoid main() {\n\n\t\t\tvUv = uv;\n\t\t\tgl_Position = projectionMatrix * modelViewMatrix * vec4( position, 1.0 );\n\n\t\t}",fragmentShader:"\n\n\t\tuniform float opacity;\n\n\t\tuniform sampler2D tDiffuse;\n\n\t\tvarying vec2 vUv;\n\n\t\tvoid main() {\n\n\t\t\tvec4 texel = texture2D( tDiffuse, vUv );\n\t\t\tgl_FragColor = opacity * texel;\n\n\n\t\t}"};class QS{constructor(){this.isPass=!0,this.enabled=!0,this.needsSwap=!0,this.clear=!1,this.renderToScreen=!1}setSize(){}render(){console.error("THREE.Pass: .render() must be implemented in derived pass.")}dispose(){}}const Zfe=new Tb(-1,1,1,-1,0,1),Jfe=new class Qfe extends hn{constructor(){super(),this.setAttribute("position",new ct([-1,3,0,-1,-1,0,3,-1,0],3)),this.setAttribute("uv",new ct([0,2,0,0,2,0],2))}};class epe{constructor(t){this._mesh=new Mn(Jfe,t)}dispose(){this._mesh.geometry.dispose()}render(t){t.render(this._mesh,Zfe)}get material(){return this._mesh.material}set material(t){this._mesh.material=t}}class tpe extends QS{constructor(t,e){super(),this.textureID=void 0!==e?e:"tDiffuse",t instanceof Cl?(this.uniforms=t.uniforms,this.material=t):t&&(this.uniforms=Q4.clone(t.uniforms),this.material=new Cl({name:void 0!==t.name?t.name:"unspecified",defines:Object.assign({},t.defines),uniforms:this.uniforms,vertexShader:t.vertexShader,fragmentShader:t.fragmentShader})),this.fsQuad=new epe(this.material)}render(t,e,n){this.uniforms[this.textureID]&&(this.uniforms[this.textureID].value=n.texture),this.fsQuad.material=this.material,this.renderToScreen?(t.setRenderTarget(null),this.fsQuad.render(t)):(t.setRenderTarget(e),this.clear&&t.clear(t.autoClearColor,t.autoClearDepth,t.autoClearStencil),this.fsQuad.render(t))}dispose(){this.material.dispose(),this.fsQuad.dispose()}}class o$ extends QS{constructor(t,e){super(),this.scene=t,this.camera=e,this.clear=!0,this.needsSwap=!1,this.inverse=!1}render(t,e,n){const r=t.getContext(),s=t.state;let o,a;s.buffers.color.setMask(!1),s.buffers.depth.setMask(!1),s.buffers.color.setLocked(!0),s.buffers.depth.setLocked(!0),this.inverse?(o=0,a=1):(o=1,a=0),s.buffers.stencil.setTest(!0),s.buffers.stencil.setOp(r.REPLACE,r.REPLACE,r.REPLACE),s.buffers.stencil.setFunc(r.ALWAYS,o,4294967295),s.buffers.stencil.setClear(a),s.buffers.stencil.setLocked(!0),t.setRenderTarget(n),this.clear&&t.clear(),t.render(this.scene,this.camera),t.setRenderTarget(e),this.clear&&t.clear(),t.render(this.scene,this.camera),s.buffers.color.setLocked(!1),s.buffers.depth.setLocked(!1),s.buffers.color.setMask(!0),s.buffers.depth.setMask(!0),s.buffers.stencil.setLocked(!1),s.buffers.stencil.setFunc(r.EQUAL,1,4294967295),s.buffers.stencil.setOp(r.KEEP,r.KEEP,r.KEEP),s.buffers.stencil.setLocked(!0)}}class npe extends QS{constructor(){super(),this.needsSwap=!1}render(t){t.state.buffers.stencil.setLocked(!1),t.state.buffers.stencil.setTest(!1)}}class ipe{constructor(t,e){if(this.renderer=t,this._pixelRatio=t.getPixelRatio(),void 0===e){const n=t.getSize(new xe);this._width=n.width,this._height=n.height,(e=new Mu(this._width*this._pixelRatio,this._height*this._pixelRatio,{type:Jm})).texture.name="EffectComposer.rt1"}else this._width=e.width,this._height=e.height;this.renderTarget1=e,this.renderTarget2=e.clone(),this.renderTarget2.texture.name="EffectComposer.rt2",this.writeBuffer=this.renderTarget1,this.readBuffer=this.renderTarget2,this.renderToScreen=!0,this.passes=[],this.copyPass=new tpe(Kfe),this.copyPass.material.blending=Zc,this.clock=new OG}swapBuffers(){const t=this.readBuffer;this.readBuffer=this.writeBuffer,this.writeBuffer=t}addPass(t){this.passes.push(t),t.setSize(this._width*this._pixelRatio,this._height*this._pixelRatio)}insertPass(t,e){this.passes.splice(e,0,t),t.setSize(this._width*this._pixelRatio,this._height*this._pixelRatio)}removePass(t){const e=this.passes.indexOf(t);-1!==e&&this.passes.splice(e,1)}isLastEnabledPass(t){for(let e=t+1;e0?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;l$.fromArray(r,t),yO.fromArray(r,e),c$.fromArray(r,n),Ba.subVectors(c$,yO),d$.subVectors(l$,yO),Ba.cross(d$),Ba.normalize(),s.push(Ba.x,Ba.y,Ba.z),s.push(Ba.x,Ba.y,Ba.z),s.push(Ba.x,Ba.y,Ba.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 d=this.vertices.length;let h=this.parseVertexIndex(t,d),p=this.parseVertexIndex(e,d),m=this.parseVertexIndex(n,d);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?(JS.setRGB(parseFloat(h[4]),parseFloat(h[5]),parseFloat(h[6])).convertSRGBToLinear(),e.colors.push(JS.r,JS.g,JS.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"===d){const p=c.slice(1).trim().split(a$),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 Fo;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 ct(d.normals,3)),d.colors.length>0&&(g=!0,b.setAttribute("color",new ct(d.colors,3))),!0===d.hasUVIndices&&b.setAttribute("uv",new ct(d.uvs,2));const v=[];for(let M=0,x=h.length;M1){for(let M=0,x=h.length;M0){const a=new pf({size:1,sizeAttenuation:!1}),l=new hn;l.setAttribute("position",new ct(e.vertices,3)),e.colors.length>0&&void 0!==e.colors[0]&&(l.setAttribute("color",new ct(e.colors,3)),a.vertexColors=!0);const c=new Ub(l,a);s.add(c)}return s}}class bO extends vf{constructor(t){super(t)}load(t,e,n,r){const s=this,o=""===this.path?Pu.extractUrlBase(t):this.path,a=new La(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,d):c;h=h.toLowerCase();let p=d>=0?c.substring(d+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 hpe(this.resourcePath||e,this.materialOptions);return a.setCrossOrigin(this.crossOrigin),a.setManager(this.manager),a.setMaterials(o),a}}class hpe{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:ac,this.wrap=void 0!==this.options.wrap?this.options.wrap:Pa}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),d=e.loadTexture(function s(a,l){return"string"!=typeof l||""===l?"":/^https?:\/\//i.test(l)?l:a+l}(e.baseUrl,c.url));d.repeat.copy(c.scale),d.offset.copy(c.offset),d.wrapS=e.wrap,d.wrapT=e.wrap,("map"===a||"emissiveMap"===a)&&(d.colorSpace=cs),r[a]=d}for(const a in n){const l=n[a];let c;if(""!==l)switch(a.toLowerCase()){case"kd":r.color=(new qe).fromArray(l).convertSRGBToLinear();break;case"ks":r.specular=(new qe).fromArray(l).convertSRGBToLinear();break;case"ke":r.emissive=(new qe).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 zS(r),this.materials[t]}getTextureParams(t,e){const n={scale:new xe(1,1),offset:new xe(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:wG;let a=o.getHandler(t);null===a&&(a=new yf(o)),a.setCrossOrigin&&a.setCrossOrigin(this.crossOrigin);const l=a.load(t,n,r,s);return void 0!==e&&(l.mapping=e),l}}const fpe=["determinateSpinner"];function ppe(i,t){if(1&i&&(ki(),W(0,"svg",11),Te(1,"circle",12),Y()),2&i){const e=he();At("viewBox",e._viewBox()),G(1),jo("stroke-dasharray",e._strokeCircumference(),"px")("stroke-dashoffset",e._strokeCircumference()/2,"px")("stroke-width",e._circleStrokeWidth(),"%"),At("r",e._circleRadius())}}const mpe=Qy(class{constructor(i){this._elementRef=i}},"primary"),gpe=new me("mat-progress-spinner-default-options",{providedIn:"root",factory:function _pe(){return{diameter:u$}}}),u$=100;let Qb=(()=>{class i extends mpe{constructor(e,n,r){super(e),this.mode="mat-spinner"===this._elementRef.nativeElement.nodeName.toLowerCase()?"indeterminate":"determinate",this._value=0,this._diameter=u$,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,ks(e)))}get diameter(){return this._diameter}set diameter(e){this._diameter=ks(e)}get strokeWidth(){return this._strokeWidth??this.diameter/10}set strokeWidth(e){this._strokeWidth=ks(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)(E(mt),E(Rr,8),E(gpe))},i.\u0275cmp=ot({type:i,selectors:[["mat-progress-spinner"],["mat-spinner"]],viewQuery:function(e,n){if(1&e&&Wn(fpe,5),2&e){let r;St(r=Et())&&(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),jo("width",n.diameter,"px")("height",n.diameter,"px"),un("_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:[lt],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&&(fe(0,ppe,2,8,"ng-template",null,0,Uc),W(2,"div",1,2),ki(),W(4,"svg",3),Te(5,"circle",4),Y()(),ga(),W(6,"div",5)(7,"div",6)(8,"div",7),sy(9,8),Y(),W(10,"div",9),sy(11,8),Y(),W(12,"div",10),sy(13,8),Y()()()),2&e){const r=rr(1);G(4),At("viewBox",n._viewBox()),G(1),jo("stroke-dasharray",n._strokeCircumference(),"px")("stroke-dashoffset",n._strokeDashOffset(),"px")("stroke-width",n._circleStrokeWidth(),"%"),At("r",n._circleRadius()),G(4),U("ngTemplateOutlet",r),G(2),U("ngTemplateOutlet",r),G(2),U("ngTemplateOutlet",r)}},dependencies:[xy],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})(),ype=(()=>{class i{}return i.\u0275fac=function(e){return new(e||i)},i.\u0275mod=nn({type:i}),i.\u0275inj=Kt({imports:[Eo,Qn]}),i})();const bpe=["previewCanvasContainer"],xpe=["previewCanvas"];function wpe(i,t){if(1&i){const e=mi();Gr(0),W(1,"label",11),ze(2),Y(),W(3,"input",12),Ue("change",function(r){cn(e);const s=he().$implicit;return s.value=r.currentTarget.checked,Gt(s.change(s.value))}),Y(),$r()}if(2&i){const e=he(),n=e.index,r=e.$implicit,s=he().index;G(1),U("for","custom_control_"+s+"_"+n),G(1),_i(r.label),G(1),U("id","custom_control_"+s+"_"+n)("type",r.type)("checked",r.value)}}function Mpe(i,t){if(1&i){const e=mi();W(0,"div",9)(1,"label",11),ze(2),Y(),W(3,"input",14),Ue("change",function(){const s=cn(e).$implicit,o=he(2).$implicit;return o.value=s,Gt(o.change(o.value))}),Y()()}if(2&i){const e=t.$implicit,n=he(2),r=n.index,s=n.$implicit,o=he().index;G(1),U("for","custom_control_"+o+"_"+r+"_"+e),G(1),_i(e),G(1),U("id","custom_control_"+o+"_"+r+"_"+e)("checked",s.value===e)}}function Cpe(i,t){if(1&i&&(W(0,"div",13)(1,"label"),ze(2),Y(),fe(3,Mpe,4,4,"div",8),Y()),2&i){const e=he().$implicit;G(2),_i(e.label),G(1),U("ngForOf",e.options)}}function Spe(i,t){if(1&i){const e=mi();Gr(0),W(1,"label",11),ze(2),Y(),W(3,"input",15),Ue("colorChange",function(r){cn(e);const s=he().$implicit,o=he(2);return s.value=o.toRGB(r.value),Gt(s.change(s.value))}),Y(),Te(4,"ngx-mat-color-toggle",16)(5,"ngx-mat-color-picker",null,17),$r()}if(2&i){const e=rr(6),n=he(),r=n.index,s=n.$implicit,o=he().index;G(1),U("for","custom_control_"+o+"_"+r),G(1),_i(s.label),G(1),U("ngxMatColorPicker",e),G(1),U("for",e)}}function Epe(i,t){if(1&i){const e=mi();Gr(0),W(1,"label",11),ze(2),Y(),W(3,"input",18),Ue("change",function(r){cn(e);const s=he().$implicit;return s.value=r.currentTarget.value,Gt(s.change(s.value))}),Y(),$r()}if(2&i){const e=he(),n=e.index,r=e.$implicit,s=he().index;G(1),U("for","custom_control_"+s+"_"+n),G(1),_i(r.label),G(1),U("id","custom_control_"+s+"_"+n)("min",r.minValue)("max",r.maxValue)("step",r.valueStep)("value",r.value)}}function Ape(i,t){if(1&i&&(W(0,"div",9),fe(1,wpe,4,5,"ng-container",6),fe(2,Cpe,4,2,"div",10),fe(3,Spe,7,4,"ng-container",6),fe(4,Epe,4,7,"ng-container",6),Y()),2&i){const e=t.$implicit;G(1),U("ngIf","checkbox"===e.type),G(1),U("ngIf","radio"===e.type),G(1),U("ngIf","color"===e.type),G(1),U("ngIf","slider"===e.type)}}function Dpe(i,t){if(1&i&&(Gr(0),W(1,"h4"),ze(2),Y(),fe(3,Ape,5,4,"div",8),$r()),2&i){const e=t.$implicit;G(2),_i(e.title),G(1),U("ngForOf",e.controls)}}function Tpe(i,t){if(1&i){const e=mi();W(0,"div",9)(1,"label",11),ze(2),Y(),W(3,"input",19),Ue("change",function(r){return Gt(cn(e).$implicit.visible=r.currentTarget.checked)}),Y()()}if(2&i){const e=t.$implicit;G(1),U("for","visibility_"+e.name),G(1),_i(e.name),G(1),U("id","visibility_"+e.name)("checked",e.visible)}}function Ipe(i,t){if(1&i&&(Gr(0),W(1,"h4"),ze(2,"Objects visibility"),Y(),fe(3,Tpe,4,4,"div",8),$r()),2&i){const e=he();G(3),U("ngForOf",e.meshes)}}function Rpe(i,t){1&i&&Te(0,"mat-spinner",20)}const ia=i=>{i.colorSpace="srgb",i.anisotropy=8,i.magFilter=_r,i.minFilter=_r};let h$=(()=>{class i{constructor(e){this.cdr=e,this.visibilityControls=!0,this.groupFunction=null,this.customControls=[],this.onObjectLoaded=new We,this._paths$=new vt(null),this.destroyed$=new Re,this.entity=null,this.meshes=[]}get paths(){return this._paths$.getValue()}set paths(e){this._paths$.next(e)}ngAfterViewInit(){var e=this;return tt(function*(){var s;e.world=new sk(new vO,{init:(s=tt(function*(){}),function(){return s.apply(this,arguments)}),simulate:()=>{}}),yield e.world.init(),e.world.visualScene.nativeScene.add(new $S(16777215,2));let n=new vt({x:1,y:1});e.renderer=e.world.addRenderer(e.world.visualScene.factory.createPerspectiveCamera({frustrum:{near:.01,far:1e4}}),e.previewCanvas.nativeElement,{size:n.asObservable(),background:11184810}),e.controller=new Rse(e.renderer,{mouseOptions:{canvas:e.previewCanvas.nativeElement},orbiting:{sensitivityX:2,sensitivityY:2},orbitingElasticity:30}),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(He(e.destroyed$)).subscribe(function(){var s=tt(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 Zb,h=yield(new bO).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 Fo;y.add(...b[v]),y.name=v,p.remove(...b[v]),p.add(y)}}e.meshes=p.children,e.meshes.sort((b,v)=>b.name>v.name?1:-1),p.traverse(b=>{if(b instanceof Mn){const v=b.material instanceof Array?b.material:[b.material];for(const y of v)y.transparent=!0,y.alphaTest=.5,y instanceof qi&&y.map&&(y.map.wrapS=Ii,y.map.wrapT=Ii,ia(y.map),y.map.needsUpdate=!0)}}),e.onObjectLoaded.next(p),e.entity=new Zo({object3D:new na(p)}),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=Pe.scalarMult(Pe.add(m.min,m.max),.5),e.controller.spherical={phi:1.22,theta:-1.32,radius:Pe.dist(m.min,m.max)},e.cdr.markForCheck()}});return function(o){return s.apply(this,arguments)}}())})()}toRGB(e){return(e?.r||0)<<16|(e?.g||0)<<8|(e?.b||0)}ngOnDestroy(){this.destroyed$.next(),this.destroyed$.complete()}}return i.\u0275fac=function(e){return new(e||i)(E(Zn))},i.\u0275cmp=ot({type:i,selectors:[["app-obj-viewer"]],viewQuery:function(e,n){if(1&e&&(Wn(bpe,5),Wn(xpe,5)),2&e){let r;St(r=Et())&&(n.previewCanvasContainer=r.first),St(r=Et())&&(n.previewCanvas=r.first)}},inputs:{paths:"paths",visibilityControls:"visibilityControls",groupFunction:"groupFunction",customControls:"customControls"},outputs:{onObjectLoaded:"onObjectLoaded"},decls:8,vars:3,consts:[[1,"previewCanvasContainer"],["previewCanvasContainer",""],["width","640","height","480"],["previewCanvas",""],["id","controls"],[4,"ngFor","ngForOf"],[4,"ngIf"],["mode","indeterminate",4,"ngIf"],["class","controls-list",4,"ngFor","ngForOf"],[1,"controls-list"],["style","width: 100%",4,"ngIf"],[3,"for"],[3,"id","type","checked","change"],[2,"width","100%"],["type","radio",3,"id","checked","change"],["matInput","",1,"hidden",3,"ngxMatColorPicker","colorChange"],["matSuffix","",3,"for"],["picker",""],["type","range",3,"id","min","max","step","value","change"],["type","checkbox",3,"id","checked","change"],["mode","indeterminate"]],template:function(e,n){1&e&&(W(0,"div",0,1),Te(2,"canvas",2,3),W(4,"div",4),fe(5,Dpe,4,2,"ng-container",5),fe(6,Ipe,4,1,"ng-container",6),Y(),fe(7,Rpe,1,0,"mat-spinner",7),Y()),2&e&&(G(5),U("ngForOf",n.customControls),G(1),U("ngIf",n.visibilityControls),G(1),U("ngIf",!n.entity))},dependencies:[So,vi,qte,ic,Qb,Wie,bC,LH],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%] > h4[_ngcontent-%COMP%]{margin:0}.previewCanvasContainer[_ngcontent-%COMP%] #controls[_ngcontent-%COMP%] .controls-list[_ngcontent-%COMP%]{width:100%;display:flex;-webkit-user-select:none;user-select:none;align-items:center}.previewCanvasContainer[_ngcontent-%COMP%] #controls[_ngcontent-%COMP%] .controls-list[_ngcontent-%COMP%] > span[_ngcontent-%COMP%]{flex-grow:1}.previewCanvasContainer[_ngcontent-%COMP%] #controls[_ngcontent-%COMP%] .controls-list[_ngcontent-%COMP%] > label[_ngcontent-%COMP%]{flex-grow:1}"],changeDetection:0}),i})();function kpe(i,t){if(1&i&&(ki(),Te(0,"circle",5),Dt(1,"async"),Dt(2,"async")),2&i){const e=he();let n,r;At("cx",(null==(n=Lt(1,3,e.mapPointer$))?null:n.x)||0)("cy",(null==(r=Lt(2,5,e.mapPointer$))?null:r.y)||0)("r",10)}}const Ppe=function(){return{"stroke-width":3}};let f$=(()=>{class i{constructor(e){this.ref=e,this._roadSpline$=new vt([]),this._pointer$=new vt(null),this.splineClosed=!1,this.svgSize$=new vt({x:100,y:100}),this.scalingSquare$=new vt({x:0,y:0,width:100,height:100}),this.mapPolyline$=new vt(""),this.mapPointer$=new vt(null),this.destroyed$=new Re}set roadSpline(e){this._roadSpline$.next(e)}set pointer(e){this._pointer$.next(e)}get trackLength$(){return this._roadSpline$.pipe(et(e=>{let n=0;for(let r=1;r{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$),nu([this._roadSpline$,this.scalingSquare$,this.svgSize$]).pipe(He(this.destroyed$),et(([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$),nu([this._pointer$,this.scalingSquare$.asObservable(),this.svgSize$]).pipe(He(this.destroyed$),et(([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)(E(mt))},i.\u0275cmp=ot({type:i,selectors:[["app-tri-minimap"]],inputs:{roadSpline:"roadSpline",pointer:"pointer",splineClosed:"splineClosed"},decls:13,vars:16,consts:[[1,"container"],["shape-rendering","geometricPrecision"],[2,"fill","none","stroke","#333333",3,"ngStyle"],["fill","#e30","stroke","black","stroke-width","3",4,"ngIf"],[1,"info_div"],["fill","#e30","stroke","black","stroke-width","3"]],template:function(e,n){if(1&e&&(W(0,"div",0),ki(),W(1,"svg",1),Dt(2,"async"),Dt(3,"async"),Te(4,"polyline",2),Dt(5,"async"),ze(6," cars "),fe(7,kpe,3,7,"circle",3),Dt(8,"async"),Y(),ga(),W(9,"div",4)(10,"span"),ze(11),Dt(12,"async"),Y()()()),2&e){let r,s;G(1),At("viewBox","0 0 "+(null==(r=Lt(2,5,n.svgSize$))?null:r.x)+" "+(null==(r=Lt(3,7,n.svgSize$))?null:r.y)),G(3),U("ngStyle",so(15,Ppe)),At("points",Lt(5,9,n.mapPolyline$)),G(3),U("ngIf",Lt(8,11,n.mapPointer$)),G(4),Zi("Track length (m): ",null==(s=Lt(12,13,n.trackLength$))?null:s.toFixed(2),"")}},dependencies:[vi,eM,pl],styles:["[_nghost-%COMP%]{overflow:auto}.container[_ngcontent-%COMP%]{position:relative;width:100%;height:100%}.container[_ngcontent-%COMP%] svg[_ngcontent-%COMP%]{position:absolute;width:100%;height:100%}.container[_ngcontent-%COMP%] .info_div[_ngcontent-%COMP%]{color:#838383}"],changeDetection:0}),i})();const Ope=["previewCanvasContainer"],Fpe=["previewCanvas"];function Lpe(i,t){if(1&i&&(W(0,"mat-option",19),ze(1),Y()),2&i){const e=t.$implicit;U("value",e),G(1),Zi(" ",e," ")}}function Npe(i,t){if(1&i){const e=mi();Gr(0),W(1,"mat-form-field",1)(2,"mat-label"),ze(3,"Custom FAM path"),Y(),Te(4,"input",20,21),Dt(6,"async"),Y(),W(7,"button",22),Ue("click",function(){cn(e);const r=rr(5);return Gt(he().onFamSelected(r.value))}),ze(8,"LOAD"),Y(),$r()}if(2&i){const e=he();G(4),U("value",Lt(6,1,e.previewFamLocation$))}}function Bpe(i,t){1&i&&Te(0,"mat-spinner",23),2&i&&U("diameter",40)}function Upe(i,t){1&i&&Te(0,"mat-spinner",24)}const Vpe=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 Af=(()=>{return(i=Af||(Af={})).ThreeModel="model",i.Bitmap="bitmap",i.TwoSidedBitmap="two_sided_bitmap",Af;var i})();class zpe extends QH{constructor(t,e,n){super(t,{loadDepth:40,inertia:2}),this.mapGraph=t,this.famPath=e,this.hideUnknownEntities$=n,this.textureLoader=new yf,this.terrainMaterials={},this.objLoader=new Zb,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(Zl(),He(this._onRemoved$)).subscribe(e=>{for(const n of this.unknownEntities)n.visible=!e})}getPlaceholderTexture(){var t=this;return tt(function*(){return t._placeholder?t._placeholder:(t._placeholderPromise||(t._placeholderPromise=t.textureLoader.loadAsync("assets/placeholder_texture.png")),t._placeholderPromise)})()}getPlaceholderTerrainTexture(){var t=this;return tt(function*(){return t._placeholderTerrain?t._placeholderTerrain:(t._placeholderTerrainPromise||(t._placeholderTerrainPromise=t.textureLoader.loadAsync("assets/placeholder_texture.png").then(e=>(e.wrapS=Pa,e.wrapT=Ii,ia(e),e.flipY=!0,e))),t._placeholderTerrainPromise)})()}loadChunk(t){var e=this;return tt(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 Mn&&(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:Pe.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:Yi.fromAngle(Pe.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 Zo({object3D:new na(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 qi({side:Ls,transparent:!0,visible:!1}),this.famPath?this.textureLoader.loadAsync(`${this.famPath}/background/${t}.png`).then(e=>{e.wrapS=Pa,e.wrapT=Ii,ia(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 tt(function*(){let n=!1;if(t.type==Af.ThreeModel){let r;try{if(!e.famPath)throw new Error;const o=new bO,a=new Zb,l=yield o.loadAsync(`${e.famPath}/props/${t.data.data.resource_id}/0/material.mtl`);l.preload(),a.setMaterials(l),r=new na(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 Mn){const a=o.material instanceof Array?o.material:[o.material];for(const l of a)l.transparent=!0,l.alphaTest=.5,l instanceof qi&&l.map&&(l.map.wrapS=Ii,l.map.wrapT=Ii,ia(l.map),l.map.needsUpdate=!0)}});const s=new Zo({object3D: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==Af.Bitmap||t.type==Af.TwoSidedBitmap){const r=(c,d)=>new Array(d).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 Fo,[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==Af.TwoSidedBitmap){const[c,d]=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 Zo({object3D:new na(s)});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 tt(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=>(ia(h),new qi({map:h,alphaTest:.5,transparent:!0,side:Ls}))),d=new Mn(new Iu(e.x,e.y),c[0]);if(d.rotateX(Math.PI/2),d.position.set(0,0,e.y/2),c.length>1){let h=-1;Ym(r.world).pipe(o4(n&&!isNaN(+n)?1e3*+n:250)).subscribe(()=>{h=(h+1)%c.length,d.material=c[h]})}return[d,a]})()}}let Hpe=(()=>{class i{constructor(e,n,r){this.eelDelegate=e,this.cdr=n,this.mainService=r,this._resource$=new vt(null),this.changed=new We,this.previewLoading$=new vt(!0),this.previewFamLocation$=new vt(null),this.previewFamLoading$=new vt(!1),this.pointer$=new vt(null),this.selectedSplineIndex$=new vt(0),this.selectedSplineItem$=new vt(null),this.selectedAiInfoItem$=new vt(null),this.selectedTerrainItem$=new vt(null),this.famPath=null,this.name="",this.renderer=null,this.map=null,this.isOpenedTrack=!0,this.roadPath=null,this.destroyed$=new Re}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 tt(function*(){var s;e.world=new sk(new vO,{init:(s=tt(function*(){}),function(){return s.apply(this,arguments)}),simulate:()=>{},loader:{loadFromGgGlb:function(){var s=tt(function*(...o){return[]});return function(){return s.apply(this,arguments)}}()}}),yield e.world.init(),e.skySphere=new Zo({object3D:e.world.visualScene.factory.createPrimitive({shape:"SPHERE",radius:1e3},{color:16777215})}),e.skySphere.object3D.nativeMesh.material.side=Ls,e.world.addEntity(e.skySphere),e.selectionSphere=new Zo({object3D: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 $S(16777215,2));let n=new vt({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=Yi.lookAt(e.renderer.camera.position,Pe.add(e.renderer.camera.position,Pe.Y),Pe.Z),Ym(e.world).pipe(He(e.destroyed$)).subscribe(()=>{e.renderer&&(e.skySphere.position=e.renderer.camera.position,e.pointer$.next(e.renderer.camera.position))}),e.controller=new n4(e.world.keyboardInput,e.renderer,{mouseOptions:{canvas:e.previewCanvas.nativeElement,pointerLock:!0},keymap:"wasd+arrows",cameraLinearSpeed:40,cameraBoostMultiplier:4,cameraMovementElasticity:100,cameraRotationElasticity:30,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(He(e.destroyed$)).subscribe(function(){var s=tt(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(He(e.destroyed$),gn(([s,o])=>!!e.resource&&s.startsWith(e.resource.id)),ml(3e3)).subscribe(tt(function*(){e.previewLoading$.next(!0),yield e.postTmpUpdates(e.resource?.id),yield e.loadPreview(),e.previewLoading$.next(!1)})),e.selectedSplineIndex$.pipe(He(e.destroyed$),ml(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=Pe.add(a,Pe.rotAround({x:10,y:-12,z:5},{x:0,y:0,z:1},-e.resource.data.road_spline[s].orientation)),e.renderer.rotation=Yi.lookAt(e.renderer.position,a,{x:0,y:0,z:1}),e.controller.reset())}e.selectedSplineItem$.next({id:rc(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:rc(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:rc(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 tt(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 yf,o=r.find(a=>a.endsWith("spherical.png"));if(o){const a=yield s.loadAsync(o);a.colorSpace="srgb",a.mapping=Qc,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 tt(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 tt(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=Km.fromMapArray(e.roadPath.map((r,s)=>({path:`${e.terrainChunksObjLocation}terrain_chunk_${s}`,position:r,loadOptions:{}}))||[],!e.isOpenedTrack);e.unloadPreview(),e.map=new zpe(n,e.famPath&&"resources/"+e.famPath,e.mainService.hideHiddenFields$),e.map.resource=e.resource,e.map.isOpenedTrack=e.isOpenedTrack,Ym(e.world).pipe(He(e.destroyed$)).subscribe(()=>{e.map&&e.renderer&&e.map.loaderCursor$.next(e.renderer.position)}),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 tt(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)(E(Ql),E(Zn),E(ka))},i.\u0275cmp=ot({type:i,selectors:[["app-tri-map-block-ui"]],viewQuery:function(e,n){if(1&e&&(Wn(Ope,5),Wn(Fpe,5)),2&e){let r;St(r=Et())&&(n.previewCanvasContainer=r.first),St(r=Et())&&(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&&(W(0,"div",0)(1,"h4"),ze(2,"Preview *.FAM file"),Y(),W(3,"mat-form-field",1)(4,"mat-label"),ze(5,"Current preview FAM"),Y(),W(6,"mat-select",2,3),Ue("valueChange",function(s){return n.onFamSelected(s)}),Dt(8,"async"),Dt(9,"async"),fe(10,Lpe,2,2,"mat-option",4),W(11,"mat-option",5),ze(12,"custom"),Y()()(),fe(13,Npe,9,3,"ng-container",6),fe(14,Bpe,1,1,"mat-spinner",7),Dt(15,"async"),Y(),W(16,"div",8)(17,"div",9,10),Te(19,"canvas",11,12),fe(21,Upe,1,0,"mat-spinner",13),Dt(22,"async"),Y(),W(23,"div",14,10)(25,"mat-form-field",1)(26,"mat-label"),ze(27,"Spline item"),Y(),W(28,"input",15),Ue("ngModelChange",function(s){return n.selectedSplineIndex$.next(s)}),Dt(29,"async"),Dt(30,"async"),Y()(),Te(31,"app-tri-minimap",16),Dt(32,"async"),Y()(),W(33,"h4"),ze(34,"Road spline item"),Y(),Te(35,"app-compound-block-ui",17),Dt(36,"async"),W(37,"h4"),ze(38,"AI info (block for 4 spline items)"),Y(),Te(39,"app-compound-block-ui",17),Dt(40,"async"),W(41,"h4"),ze(42,"Terrain (block for 4 spline items)"),Y(),Te(43,"app-compound-block-ui",17),Dt(44,"async"),W(45,"h4"),ze(46,"Common"),Y(),Te(47,"app-compound-block-ui",18),Dt(48,"async")),2&e){const r=rr(7);let s;G(6),U("value",n.previewFamPossibleLocations.includes(Lt(8,20,n.previewFamLocation$))?Lt(9,22,n.previewFamLocation$):"custom"),G(4),U("ngForOf",n.previewFamPossibleLocations),G(3),U("ngIf","custom"==r.value),G(1),U("ngIf",Lt(15,24,n.previewFamLoading$)),G(7),U("ngIf",Lt(22,26,n.previewLoading$)),G(7),U("min",0)("max",4*(null==(s=Lt(29,28,n._resource$))?null:s.data.num_chunks)-1)("ngModel",Lt(30,30,n.selectedSplineIndex$)),G(3),U("roadSpline",n.roadSpline)("pointer",Lt(32,32,n.pointer$))("splineClosed",!n.isOpenedTrack),G(4),U("resource",Lt(36,34,n.selectedSplineItem$))("hideBlockActions",!0),G(4),U("resource",Lt(40,36,n.selectedAiInfoItem$))("hideBlockActions",!0),G(4),U("resource",Lt(44,38,n.selectedTerrainItem$))("hideBlockActions",!0),G(4),U("resource",Lt(48,40,n._resource$))("hideBlockActions",!0)("fieldWhitelist",so(42,Vpe))}},dependencies:[So,vi,gl,mu,tc,_u,gu,Xc,vl,To,ic,qM,hb,Nm,Qb,Jl,f$,pl],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})();const p$=i=>new Promise(t=>setTimeout(t,i)),m$=(i,t,e=null)=>{const n=document.createElement("canvas"),r=n.getContext("2d",{willReadFrequently:!0}),s=i.width,o=i.height;n.width=s,n.height=o,r.drawImage(i,0,0,s,o);const a=r.getImageData(0,0,s,o);for(let l=0;l{if(!(o instanceof Mn))return;let a=-1;if(o.name.startsWith("lbl__rt_frnt")?a=0:o.name.startsWith("lbl__lt_frnt")?a=1:o.name.startsWith("lbl__rt_rear")?a=2:o.name.startsWith("lbl__lt_rear")&&(a=3),a>-1){this.wheels[a]=o,a<2&&(this.frontWheels[a]=o),o.geometry.boundingBox||o.geometry.computeBoundingBox();const l=Pe.avg(o.geometry.boundingBox.min,o.geometry.boundingBox.max);o.geometry.translate(...Pe.spr(Pe.neg(l))),o.position.set(...Pe.spr(l)),this.wheelIdlePositions[a]=l}(o.name.includes("rsid")||o.name.includes("lite"))&&(r.push(o),this.originalTexWithTailLights=o.material.map)}),!this.originalTexWithTailLights)throw new Error("Not a driveable NFS1 car");this.tailLightColors=n.includes("TRAFFC.CFM")?[9509903,16711680]:[3212546,16258068],this.texWithTailLightsImg=document.createElement("img"),this.texWithTailLights=new ko(this.texWithTailLightsImg),this.texWithTailLights.flipY=this.originalTexWithTailLights.flipY,ia(this.texWithTailLights),this.recolorTailLights(this.tailLightColors[0]).then();for(const o of r)o.material.map=this.texWithTailLights;const s=new yf;this.tyreTextures=[1,2,3,4].map(o=>s.load(`${n}/tyr${o}.png`));for(const o of this.tyreTextures)ia(o);this.tyreMaterial=new qi({map:this.tyreTextures[0]}),this.tyreMaterial.transparent=!0,this.tyreMaterial.alphaTest=.5,this.tyreMaterial.map.wrapS=Ii,this.tyreMaterial.map.wrapT=Ii,this.tyreMaterial.polygonOffset=!0,this.tyreMaterial.polygonOffsetFactor=-4;for(const o of this.wheels)o.material=this.tyreMaterial}get tailLightsOn(){return this._tailLightsOn}set tailLightsOn(t){t!==this._tailLightsOn&&(this._tailLightsOn=t,this.recolorTailLights(this.tailLightColors[t?1:0]))}get speed(){return this._speed}set speed(t){if(t!==this._speed){switch(this._speed=t,this.tyreTextureUpdateTimer&&clearInterval(this.tyreTextureUpdateTimer),t){case"idle":this.tyreMaterial.map=this.tyreTextures[0];break;case"slow":let e=!0;this.tyreTextureUpdateTimer=setInterval(()=>{this.tyreMaterial.map=this.tyreTextures[e?1:2],this.tyreMaterial.needsUpdate=!0,e=!e},16);break;case"fast":this.tyreMaterial.map=this.tyreTextures[3]}this.tyreMaterial.needsUpdate=!0}}get steeringAngle(){return this._steeringAngle}set steeringAngle(t){if(t!==this._steeringAngle){this._steeringAngle=t;for(const e of this.frontWheels)e.rotation.set(0,0,t)}}recolorTailLights(t){var e=this;return tt(function*(){if(e.originalTexWithTailLights&&e.texWithTailLights&&e.texWithTailLightsImg){for(let n=100;n>0&&!e.originalTexWithTailLights.source.data;n--)yield p$(50);((i,t,e,n=null)=>{const[r,s,o]=[t>>16,t>>8&255,255&t],[a,l,c]=[e>>16,e>>8&255,255&e];m$(i,(d,h)=>{d[h]==r&&d[h+1]==s&&d[h+2]==o&&(d[h]=a,d[h+1]=l,d[h+2]=c)},n)})(e.originalTexWithTailLights.source.data,e.tailLightsTexColor,t,e.texWithTailLightsImg),e.texWithTailLights.needsUpdate=!0}})()}dispose(){this.texWithTailLightsImg&&(this.texWithTailLightsImg.remove(),this.texWithTailLightsImg=null),this.texWithTailLights&&(this.texWithTailLights.dispose(),this.texWithTailLights=null),this.tyreTextureUpdateTimer&&clearInterval(this.tyreTextureUpdateTimer),this.tyreMaterial&&(this.tyreMaterial.dispose(),this.tyreMaterial=null)}}let Wpe=(()=>{class i{constructor(e,n,r){this.eelDelegate=e,this.mainService=n,this.cdr=r,this._resource$=new vt(null),this.changed=new We,this.previewPaths$=new vt(null),this.destroyed$=new Re,this.customControls=[],this.serializerSettings={geometry__save_obj:!0,geometry__save_blend:!1,geometry__export_to_gg_web_engine:!1}}get resource(){return this._resource$.getValue()}set resource(e){this._resource$.next(e)}ngAfterViewInit(){var e=this;return tt(function*(){e._resource$.pipe(He(e.destroyed$)).subscribe(function(){var n=tt(function*(r){e.previewPaths$.next(yield e.loadPreviewFilePaths(r?.id))});return function(r){return n.apply(this,arguments)}}()),e.mainService.dataBlockChange$.pipe(He(e.destroyed$),gn(([n,r])=>!!e.resource&&n.startsWith(e.resource.id)),ml(1500)).subscribe(tt(function*(){e.previewPaths$.next(null),e.previewPaths$.next(yield e.postTmpUpdates(e.resource?.id))}))})()}onObjectLoaded(e){var n=this;return tt(function*(){if((n._resource$.value?.id||"").includes(".CFM__"))try{const r=n.resource?.id.split("/");r.pop(),r[r.length-1]=""+(+r[r.length-1]+1);const s=yield n.eelDelegate.retrieveValue(r.join("/")+"/data"),o=s.children_aliases.findIndex(l=>"!PAL"===l);if(-1==o)throw new Error("Not a car");const a=new $pe(e,s.children[o].data.colors[254]>>>8,n.previewPaths$.value[0].substring(0,n.previewPaths$.value[0].lastIndexOf("/"))+"/assets");n.customControls=[{title:"TNFS car features",controls:[{label:"Brake lights on",type:"checkbox",value:!1,change:l=>{a.tailLightsOn=l}},{label:"Car speed",type:"radio",options:["idle","slow","fast"],value:"idle",change:l=>{a.speed=l}},{label:"Steering angle",type:"slider",minValue:-.7,maxValue:.7,valueStep:.05,value:0,change:l=>{a.steeringAngle=l}}]}],n.cdr.markForCheck()}catch{}})()}postTmpUpdates(e){var n=this;return tt(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 tt(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)(E(Ql),E(ka),E(Zn))},i.\u0275cmp=ot({type:i,selectors:[["app-orip-geometry-block-ui"]],inputs:{resource:"resource"},outputs:{changed:"changed"},decls:4,vars:7,consts:[[3,"paths","customControls","onObjectLoaded"],[3,"resource"]],template:function(e,n){1&e&&(W(0,"app-obj-viewer",0),Ue("onObjectLoaded",function(s){return n.onObjectLoaded(s)}),Dt(1,"async"),Y(),Te(2,"app-compound-block-ui",1),Dt(3,"async")),2&e&&(U("paths",Lt(1,3,n.previewPaths$))("customControls",n.customControls),G(2),U("resource",Lt(3,5,n._resource$)))},dependencies:[Jl,h$,pl],changeDetection:0}),i})();const jpe=["class","block-ui"];function Ype(i,t){if(1&i&&(W(0,"mat-label",7),ze(1),Y()),2&i){const e=he(2);U("matTooltip",e.resourceDescription),G(1),Zi("",null==e.resource?null:e.resource.name," ")}}function qpe(i,t){if(1&i&&(W(0,"mat-option",8),ze(1),Y()),2&i){const e=t.$implicit,n=t.index,r=he(2);U("value",n)("disabled",r.disabled),G(1),Zi(" ",e.block_class_mro.split("__")[0]," ")}}function Xpe(i,t){if(1&i){const e=mi();Gr(0),fe(1,Ype,2,2,"mat-label",1),Dt(2,"async"),W(3,"div",2)(4,"mat-label"),ze(5,"Resource type:"),Y(),W(6,"mat-select",3),Ue("selectionChange",function(r){return cn(e),Gt(he().setChoiceIndex(r.value))}),fe(7,qpe,2,3,"mat-option",4),Y(),Te(8,"app-block-actions",5),Y(),Te(9,"app-editor",6),$r()}if(2&i){const e=he();let n;G(1),U("ngIf",(null==e.resource?null:e.resource.name)&&(null==e.resource?null:e.resource.name)!=(null==(n=Lt(2,8,e.main.resource$))?null:n.name)),G(5),U("value",e.resourceData.choice_index)("disabled",e.disabled),G(1),U("ngForOf",e.resource.schema.possible_resource_schemas),G(1),U("resource",e.childResource),G(1),U("resource",e.childResource)("hideBlockActions",!0)("disabled",e.disabled)}}let g$=(()=>{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 We}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:rc(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)(E(ka))},i.\u0275cmp=ot({type:i,selectors:[["app-delegate",8,"block-ui"]],inputs:{resource:"resource",resourceDescription:"resourceDescription",hideBlockActions:"hideBlockActions",disabled:"disabled"},outputs:{changed:"changed"},attrs:jpe,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"],[3,"resource","hideBlockActions","disabled"],["matTooltipPosition","above",3,"matTooltip"],[3,"value","disabled"]],template:function(e,n){1&e&&fe(0,Xpe,10,10,"ng-container",0),2&e&&U("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 Kpe=["class","block-ui"];function Zpe(i,t){if(1&i&&(W(0,"mat-label",7),ze(1),Y()),2&i){const e=he(2);U("matTooltip",e.resourceDescription),G(1),Zi(" ",e.resource.name," ")}}function Qpe(i,t){if(1&i){const e=mi();Gr(0),fe(1,Zpe,2,2,"mat-label",1),W(2,"mat-selection-list",2),Ue("selectionChange",function(r){return cn(e),Gt(he().onSelection(r))}),W(3,"mat-list-option",3),ze(4," Left "),Y(),W(5,"mat-list-option",4),ze(6," Right "),Y()(),W(7,"mat-form-field",5)(8,"mat-label"),ze(9,"Texture ID"),Y(),W(10,"input",6),Ue("ngModelChange",function(r){return cn(e),Gt(he().resource.data.texture_id=r)})("change",function(){return cn(e),Gt(he().changed.emit())}),Y()(),$r()}if(2&i){const e=he();G(1),U("ngIf",e.resource.name),G(2),U("selected",e.resource.data.has_left_fence),G(2),U("selected",e.resource.data.has_right_fence),G(5),U("max",63)("min",0)("step",1)("ngModel",e.resource.data.texture_id)}}let Jpe=(()=>{class i{constructor(){this.resource=null,this.resourceDescription="",this.changed=new We}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=ot({type:i,selectors:[["app-fence-type",8,"block-ui"]],inputs:{resource:"resource",resourceDescription:"resourceDescription"},outputs:{changed:"changed"},attrs:Kpe,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&&fe(0,Qpe,11,7,"ng-container",0),2&e&&U("ngIf",n.resource)},dependencies:[vi,gl,mu,tc,_u,gu,Xc,vl,To,ic,Os,MC,wC],changeDetection:0}),i})(),eme=(()=>{class i{constructor(){this._resource=null,this.resourceMap={},this.changed=new We}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]=["",_l.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)(E(nb),E(yte),E(oR))},i.\u0275cmp=ot({type:i,selectors:[["app-run-custom-action",8,"dialog"]],attrs:tme,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&&(W(0,"h1",0),ze(1),Y(),W(2,"div",1)(3,"p"),ze(4),Y()(),W(5,"form",2),fe(6,nme,4,4,"mat-form-field",3),Y(),W(7,"div",4)(8,"button",5),Ue("click",function(){return n.dialogRef.close()}),ze(9,"Cancel"),Y(),W(10,"button",6),Ue("click",function(){return n.submit()}),ze(11,"Run"),Y()()),2&e&&(G(1),Zi('Run action "',n.data.title,'"'),G(3),_i(n.data.description),G(1),U("formGroup",n.argsForm),G(1),U("ngForOf",n.data.args),G(4),U("disabled",n.argsForm.invalid))},dependencies:[So,IR,gl,tc,bR,vl,To,ic,qM,fV,pV,mV,Hh,fC],styles:["form[_ngcontent-%COMP%]{padding:0 24px}"]}),i})();function _$(i,t){return t?e=>Sy(t.pipe(Oi(1),function rme(){return ti((i,t)=>{i.subscribe(Yn(t,ms))})}()),e.pipe(_$(i))):nr((e,n)=>wr(i(e,n)).pipe(Oi(1),YB(e)))}function v$(i,t=$y){const e=OI(i,t);return _$(()=>e)}const sme=["mat-menu-item",""];function ome(i,t){1&i&&(ki(),W(0,"svg",3),Te(1,"polygon",4),Y())}const ame=[[["mat-icon"],["","matMenuItemIcon",""]],"*"],lme=["mat-icon, [matMenuItemIcon]","*"];function cme(i,t){if(1&i){const e=mi();W(0,"div",0),Ue("keydown",function(r){return cn(e),Gt(he()._handleKeydown(r))})("click",function(){return cn(e),Gt(he().closed.emit("click"))})("@transformMenu.start",function(r){return cn(e),Gt(he()._onAnimationStart(r))})("@transformMenu.done",function(r){return cn(e),Gt(he()._onAnimationDone(r))}),W(1,"div",1),Wt(2),Y()()}if(2&i){const e=he();U("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 dme=["*"],xO=new me("MAT_MENU_PANEL"),ume=jM(WM(class{}));let eE=(()=>{class i extends ume{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 Re,this._focused=new Re,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",jr("120ms cubic-bezier(0, 0, 0.2, 1)",si({opacity:1,transform:"scale(1)"}))),Pr("* => void",jr("100ms 25ms linear",si({opacity:0})))]),fadeInItems:Ra("fadeInItems",[Ps("showing",si({opacity:1})),Pr("void => *",[si({opacity:0}),jr("400ms 100ms cubic-bezier(0.55, 0, 0.55, 0.2)")])])};let fme=0;const y$=new me("mat-menu-default-options",{providedIn:"root",factory:function pme(){return{overlapTrigger:!1,xPosition:"after",yPosition:"below",backdropClass:"cdk-overlay-transparent-backdrop"}}});let Jb=(()=>{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 om,this._classList={},this._panelAnimationState="void",this._animationDone=new Re,this.overlayPanelClass=this._defaultOptions.overlayPanelClass||"",this.backdropClass=this._defaultOptions.backdropClass,this._overlapTrigger=this._defaultOptions.overlapTrigger,this._hasBackdrop=this._defaultOptions.hasBackdrop,this.closed=new We,this.close=this.closed,this.panelId="mat-menu-panel-"+fme++}ngOnInit(){this.setPositionClasses()}ngAfterContentInit(){this._updateDirectDescendants(),this._keyManager=new RU(this._directDescendantItems).withWrap().withTypeAhead().withHomeAndEnd(),this._keyManager.tabOut.subscribe(()=>this.closed.emit("tab")),this._directDescendantItems.changes.pipe(Ao(this._directDescendantItems),Rs(e=>Mr(...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(Ao(this._directDescendantItems),Rs(n=>Mr(...n.map(r=>r._hovered))))}addItem(e){}removeItem(e){}_handleKeydown(e){const n=e.keyCode,r=this._keyManager;switch(n){case 27:Xo(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(Oi(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(Ao(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)(E(mt),E(ft),E(y$),E(Zn))},i.\u0275dir=ve({type:i,contentQueries:function(e,n,r){if(1&e&&(Wi(r,hme,5),Wi(r,eE,5),Wi(r,eE,4)),2&e){let s;St(s=Et())&&(n.lazyContent=s.first),St(s=Et())&&(n._allItems=s),St(s=Et())&&(n.items=s)}},viewQuery:function(e,n){if(1&e&&Wn(Mo,5),2&e){let r;St(r=Et())&&(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})(),mme=(()=>{class i extends Jb{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)(E(mt),E(ft),E(y$),E(Zn))},i.\u0275cmp=ot({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:[Dn([{provide:xO,useExisting:i}]),lt],ngContentSelectors:dme,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&&(sr(),fe(0,cme,3,6,"ng-template"))},dependencies:[hm],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:[tE.transformMenu,tE.fadeInItems]},changeDetection:0}),i})();const b$=new me("mat-menu-scroll-strategy"),_me={provide:b$,deps:[as],useFactory:function gme(i){return()=>i.scrollStrategies.reposition()}},x$=Ph({passive:!0});let vme=(()=>{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,d){this._overlay=e,this._element=n,this._viewContainerRef=r,this._menuItemInstance=a,this._dir=l,this._focusMonitor=c,this._ngZone=d,this._overlayRef=null,this._menuOpen=!1,this._closingActionsSubscription=Zt.EMPTY,this._hoverSubscription=Zt.EMPTY,this._menuCloseSubscription=Zt.EMPTY,this._changeDetectorRef=Ot(Zn),this._handleTouchStart=h=>{qI(h)||(this._openedBy="touch")},this._openedBy=void 0,this.restoreFocus=!0,this.menuOpened=new We,this.onMenuOpen=this.menuOpened,this.menuClosed=new We,this.onMenuClose=this.menuClosed,this._scrollStrategy=s,this._parentMaterialMenu=o instanceof Jb?o:void 0,n.nativeElement.addEventListener("touchstart",this._handleTouchStart,x$)}ngAfterContentInit(){this._handleHover()}ngOnDestroy(){this._overlayRef&&(this._overlayRef.dispose(),this._overlayRef=null),this._element.nativeElement.removeEventListener("touchstart",this._handleTouchStart,x$),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 Jb&&(e._startAnimation(),e._directDescendantItems.changes.pipe(He(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 Jb?(n._resetAnimation(),n.lazyContent?n._animationDone.pipe(gn(r=>"void"===r.toState),Oi(1),He(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],[d,h]=[r,s],p=0;if(this.triggersSubmenu()){if(h=r="before"===e.xPosition?"start":"end",s=d="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:d,overlayY:o,offsetY:p},{originX:s,originY:l,overlayX:h,overlayY:o,offsetY:p},{originX:r,originY:c,overlayX:d,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 Mr(e,this._parentMaterialMenu?this._parentMaterialMenu.closed:ht(),this._parentMaterialMenu?this._parentMaterialMenu._hovered().pipe(gn(o=>o!==this._menuItemInstance),gn(()=>this._menuOpen)):ht(),n)}_handleMousedown(e){YI(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(gn(e=>e===this._menuItemInstance&&!e.disabled),v$(0,PI)).subscribe(()=>{this._openedBy="mouse",this.menu instanceof Jb&&this.menu._isAnimating?this.menu._animationDone.pipe(Oi(1),v$(0,PI),He(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)(E(as),E(mt),E(Wr),E(b$),E(xO,8),E(eE,10),E(Ia,8),E(Yc),E(ft))},i.\u0275dir=ve({type:i,hostVars:3,hostBindings:function(e,n){1&e&&Ue("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})(),yme=(()=>{class i extends vme{}return i.\u0275fac=function(){let t;return function(n){return(t||(t=ri(i)))(n||i)}}(),i.\u0275dir=ve({type:i,selectors:[["","mat-menu-trigger-for",""],["","matMenuTriggerFor",""]],hostAttrs:[1,"mat-mdc-menu-trigger"],exportAs:["matMenuTrigger"],features:[lt]}),i})(),bme=(()=>{class i{}return i.\u0275fac=function(e){return new(e||i)},i.\u0275mod=nn({type:i}),i.\u0275inj=Kt({providers:[_me],imports:[Eo,eb,Qn,Pm,Xy,Qn]}),i})();function xme(i,t){if(1&i){const e=mi();W(0,"button",7),Ue("click",function(){return cn(e),Gt(he(2).deserialize())}),Te(1,"mat-icon",8),Y()}}function wme(i,t){if(1&i){const e=mi();Gr(0),fe(1,xme,2,0,"button",4),W(2,"button",5),Ue("click",function(){return cn(e),Gt(he().serializeBlockReversible())}),Te(3,"mat-icon",6),Y(),$r()}if(2&i){const e=he();G(1),U("ngIf",e.isInReversibleSerializationState),G(1),U("disabled",e.isInReversibleSerializationState)}}function Mme(i,t){1&i&&(W(0,"button",9),Te(1,"mat-icon",10),Y()),2&i&&(he(),U("matMenuTriggerFor",rr(3)))}function Cme(i,t){if(1&i){const e=mi();W(0,"button",11),Ue("click",function(){const s=cn(e).$implicit;return Gt(he().runCustomAction(s))}),W(1,"span"),ze(2),Y()()}if(2&i){const e=t.$implicit;G(2),_i(e.title)}}const Sme=function(){return[]};let nE=(()=>{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 tt(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)(E(ka),E(Ql),E(Zn),E(Bm),E(IV))},i.\u0275cmp=ot({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&&(fe(0,wme,4,2,"ng-container",0),fe(1,Mme,2,1,"button",1),W(2,"mat-menu",null,2),fe(4,Cme,3,1,"button",3),Y()),2&e&&(U("ngIf",null==n.resource||null==n.resource.schema?null:n.resource.schema.serializable_to_disc),G(1),U("ngIf",(null==n.resource||null==n.resource.schema.custom_actions?null:n.resource.schema.custom_actions.length)>0),G(3),U("ngForOf",(null==n.resource?null:n.resource.schema.custom_actions)||so(3,Sme)))},dependencies:[So,vi,Os,XM,gR,mme,eE,yme],styles:["[_nghost-%COMP%]{display:flex}"]}),i})();const Eme=["class","block-ui"];function Ame(i,t){if(1&i&&(W(0,"mat-label",7),ze(1),Y()),2&i){const e=he();U("matTooltip",e.resourceDescription),G(1),Zi("",null==e.resource?null:e.resource.name," ")}}function Dme(i,t){if(1&i&&(W(0,"audio",8),Te(1,"source",9),Dt(2,"async"),ze(3," Your browser does not support the audio element. "),Y()),2&i){const e=he();G(1),U("src",Lt(2,1,e.audioUrl$),Lp)}}function Tme(i,t){1&i&&Te(0,"mat-spinner",10)}function Ime(i,t){1&i&&Te(0,"app-block-actions",11),2&i&&U("resource",he().resource)}const Rme=function(){return["wave_data"]};let kme=(()=>{class i{constructor(e,n){this.eelDelegate=e,this.main=n,this._resource$=new vt(null),this.audioUrl$=new vt(null),this.resourceDescription="",this.hideBlockActions=!1,this.destroyed$=new Re,this.changed=new We}set resource(e){this._resource$.next(e)}get resource(){return this._resource$.getValue()}ngAfterViewInit(){var e=this;return tt(function*(){e._resource$.pipe(He(e.destroyed$)).subscribe(function(){var n=tt(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)(E(Ql),E(ka))},i.\u0275cmp=ot({type:i,selectors:[["app-eacs-audio",8,"block-ui"]],inputs:{resource:"resource",resourceDescription:"resourceDescription",hideBlockActions:"hideBlockActions"},outputs:{changed:"changed"},attrs:Eme,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&&(W(0,"div",0),fe(1,Ame,2,2,"mat-label",1),Dt(2,"async"),fe(3,Dme,4,3,"audio",2),Dt(4,"async"),fe(5,Tme,1,0,"mat-spinner",3),Dt(6,"async"),Te(7,"div",4),fe(8,Ime,1,1,"app-block-actions",5),Y(),Te(9,"app-compound-block-ui",6),Dt(10,"async")),2&e){let r;G(1),U("ngIf",(null==n.resource?null:n.resource.name)&&(null==n.resource?null:n.resource.name)!=(null==(r=Lt(2,7,n.main.resource$))?null:r.name)),G(2),U("ngIf",Lt(4,9,n.audioUrl$)),G(2),U("ngIf",n.resource&&!Lt(6,11,n.audioUrl$)),G(3),U("ngIf",!n.hideBlockActions),G(1),U("resource",Lt(10,13,n._resource$))("hideBlockActions",!0)("fieldBlacklist",so(15,Rme))}},dependencies:[vi,To,Os,Qb,Jl,nE,pl],styles:["#header[_ngcontent-%COMP%]{display:flex}"]}),i})();class Pme{constructor(t,e){this.mesh=t,this.assetsPath=e,this.textures=[],this.tyreTextureUpdateTimer=void 0,this.tyreMaterial=null,this.tyreTextures=[],this._color=65280,this._speed="idle",this._steeringAngle=0,this.wheels=[],this.wheelIdlePositions=[],this.frontWheels=[];let n=new Set;if(t.traverse(r=>{if(!(r instanceof Mn))return;let s=-1;if(r.name.startsWith("part_hp_12")?s=0:r.name.startsWith("part_hp_14")?s=1:r.name.startsWith("part_hp_16")?s=2:r.name.startsWith("part_hp_18")&&(s=3),s>-1){r.geometry.boundingBox||r.geometry.computeBoundingBox();let a=Pe.avg(r.geometry.boundingBox.min,r.geometry.boundingBox.max);return(0==s||2==s)&&(a={x:a.x,y:a.y,z:a.z+1.5}),r.geometry.translate(...Pe.spr(Pe.neg(a))),r.position.set(...Pe.spr(a)),this.wheelIdlePositions[s]=a,this.wheels.push(r),void(s<2&&this.frontWheels.push(r))}const o=r.material.map;o&&n.add(o)}),this.textures=Array.from(n).map(r=>{const s=new ko(document.createElement("img"));return s.flipY=r.flipY,ia(s),[r,s]}),t.traverse(r=>{if(!(r instanceof Mn))return;const s=r.material.map;if(s){const o=this.textures.find(([a,l])=>a===s);o&&(r.material.map=o[1])}}),this.hasWheels){const r=new yf;this.tyreTextures=[0,1,2,3].map(s=>r.load(`${e}/m${s}00.png`));for(const s of this.tyreTextures)ia(s);this.tyreMaterial=new qi({map:this.tyreTextures[0]}),this.tyreMaterial.transparent=!0,this.tyreMaterial.alphaTest=.5,this.tyreMaterial.map.wrapS=Ii,this.tyreMaterial.map.wrapT=Ii,this.tyreMaterial.polygonOffset=!0,this.tyreMaterial.polygonOffsetFactor=-4;for(const s of this.wheels)s.material=this.tyreMaterial}this.color=65280,this.recolorCar().then()}get color(){return this._color}set color(t){t!==this._color&&(this._color=t,this.recolorCar().then())}get speed(){return this._speed}set speed(t){if(t!==this._speed){switch(this._speed=t,this.tyreTextureUpdateTimer&&clearInterval(this.tyreTextureUpdateTimer),t){case"idle":this.tyreMaterial.map=this.tyreTextures[0];break;case"slow":let e=!0;this.tyreTextureUpdateTimer=setInterval(()=>{this.tyreMaterial.map=this.tyreTextures[e?1:2],this.tyreMaterial.needsUpdate=!0,e=!e},16);break;case"fast":this.tyreMaterial.map=this.tyreTextures[3]}this.tyreMaterial.needsUpdate=!0}}get steeringAngle(){return this._steeringAngle}set steeringAngle(t){if(t!==this._steeringAngle){this._steeringAngle=t;for(const e of this.frontWheels)e.rotation.set(0,0,t)}}get hasWheels(){return this.wheels.length>0}recolorCar(){var t=this;return tt(function*(){const[e,n,r]=[t.color>>16,t.color>>8&255,255&t.color];for(const[s,o]of t.textures){for(let a=100;a>0&&!s.source.data;a--)yield p$(50);m$(s.source.data,(a,l)=>{if(a[l]+a[l+2]{class i{constructor(e,n,r){this.eelDelegate=e,this.main=n,this.cdr=r,this._resource$=new vt(null),this.changed=new We,this.customControls=[],this.previewPaths$=new vt(null),this.destroyed$=new Re,this.serializerSettings={geometry__save_obj:!0,geometry__save_blend:!1,geometry__export_to_gg_web_engine:!1}}get resource(){return this._resource$.getValue()}set resource(e){this._resource$.next(e)}ngAfterViewInit(){var e=this;return tt(function*(){e._resource$.pipe(He(e.destroyed$)).subscribe(function(){var n=tt(function*(r){e.previewPaths$.next(yield e.loadPreviewFilePaths(r?.id))});return function(r){return n.apply(this,arguments)}}()),e.main.dataBlockChange$.pipe(He(e.destroyed$),gn(([n,r])=>!!e.resource&&n.startsWith(e.resource.id)),ml(1500)).subscribe(tt(function*(){e.previewPaths$.next(null),e.previewPaths$.next(yield e.postTmpUpdates(e.resource?.id))}))})()}onObjectLoaded(e){var n=this;return tt(function*(){try{const r=new Pme(e,n.previewPaths$.value[0].substring(0,n.previewPaths$.value[0].lastIndexOf("/"))+"/assets");let s=null;const o=a=>{s&&clearTimeout(s),s=setTimeout(()=>r.color=a,50)};n.customControls=[{title:"NFS2 car features",controls:[{label:"Car color",type:"color",value:65280,change:a=>o(a)}]}],r.hasWheels&&n.customControls[0].controls.push({label:"Car speed",type:"radio",options:["idle","slow","fast"],value:"idle",change:a=>{r.speed=a}},{label:"Steering angle",type:"slider",minValue:-.7,maxValue:.7,valueStep:.05,value:0,change:a=>{r.steeringAngle=a}}),n.cdr.markForCheck()}catch(r){console.error(r)}})()}postTmpUpdates(e){var n=this;return tt(function*(){if(e){const r=yield n.eelDelegate.serializeResourceTmp(e,Object.entries(n.main.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 tt(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)(E(Ql),E(ka),E(Zn))},i.\u0275cmp=ot({type:i,selectors:[["app-geo-geometry",8,"block-ui"]],inputs:{resource:"resource"},outputs:{changed:"changed"},attrs:Ome,decls:4,vars:8,consts:[[3,"paths","groupFunction","customControls","onObjectLoaded"],[3,"resource",4,"ngIf"],[3,"resource"]],template:function(e,n){1&e&&(W(0,"app-obj-viewer",0),Ue("onObjectLoaded",function(s){return n.onObjectLoaded(s)}),Dt(1,"async"),Y(),fe(2,Fme,2,3,"app-compound-block-ui",1),Dt(3,"async")),2&e&&(U("paths",Lt(1,4,n.previewPaths$))("groupFunction",n.previewObjectGroupFunc)("customControls",n.customControls),G(2),U("ngIf",!Lt(3,6,n.main.hideHiddenFields$)))},dependencies:[vi,Jl,h$,pl],changeDetection:0}),i})();const Nme=function(){return["children","items_descr"]};let Bme=(()=>{class i{constructor(){this._resource=null,this.hideBlockActions=!1,this.resourceMap={},this.changed=new We}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:rc(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=ot({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&&Te(0,"app-compound-block-ui",0)(1,"app-sidenav-res-list",1),2&e&&(U("resource",n.resource)("hideBlockActions",n.hideBlockActions)("fieldBlacklist",so(4,Nme)),G(1),U("resources",n.resourceMap))},dependencies:[Jl,xC],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})();const Ume=["previewCanvasContainer"],Vme=["previewCanvas"];function zme(i,t){1&i&&Te(0,"mat-spinner",11)}var Df=(()=>{return(i=Df||(Df={})).ThreeModel="model",i.Bitmap="bitmap",i.TwoSidedBitmap="two_sided_bitmap",Df;var i})();class Hme extends QH{constructor(t,e,n){super(t,{loadDepth:40,inertia:2}),this.mapGraph=t,this.famPath=e,this.hideUnknownEntities$=n,this.textureLoader=new yf,this.terrainMaterials={},this.objLoader=new Zb,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(Zl(),He(this._onRemoved$)).subscribe(e=>{for(const n of this.unknownEntities)n.visible=!e})}getPlaceholderTexture(){var t=this;return tt(function*(){return t._placeholder?t._placeholder:(t._placeholderPromise||(t._placeholderPromise=t.textureLoader.loadAsync("assets/placeholder_texture.png")),t._placeholderPromise)})()}getPlaceholderTerrainTexture(){var t=this;return tt(function*(){return t._placeholderTerrain?t._placeholderTerrain:(t._placeholderTerrainPromise||(t._placeholderTerrainPromise=t.textureLoader.loadAsync("assets/placeholder_texture.png").then(e=>(e.wrapS=Pa,e.wrapT=Ii,ia(e),e.flipY=!0,e))),t._placeholderTerrainPromise)})()}loadChunk(t){var e=this;return tt(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 Mn&&(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:Pe.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:Yi.fromAngle(Pe.nZ,l.rotation)}));const o=(yield Promise.all(s.map(l=>e.loadPropInternal(l)))).filter(l=>!!l),a=new Zo({object3D:new na(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 qi({side:Ls,transparent:!0,visible:!1}),this.famPath?this.textureLoader.loadAsync(`${this.famPath}/background/${t}.png`).then(e=>{e.wrapS=Pa,e.wrapT=Ii,ia(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 tt(function*(){let n=!1;if(t.type==Df.ThreeModel){let r;try{if(!e.famPath)throw new Error;const o=new bO,a=new Zb,l=yield o.loadAsync(`${e.famPath}/props/${t.data.data.resource_id}/0/material.mtl`);l.preload(),a.setMaterials(l),r=new na(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 Mn){const a=o.material instanceof Array?o.material:[o.material];for(const l of a)l.transparent=!0,l.alphaTest=.5,l instanceof qi&&l.map&&(l.map.wrapS=Ii,l.map.wrapT=Ii,ia(l.map),l.map.needsUpdate=!0)}});const s=new Zo({object3D: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,d)=>new Array(d).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 Fo,[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,d]=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 Zo({object3D:new na(s)});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 tt(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=>(ia(h),new qi({map:h,alphaTest:.5,transparent:!0,side:Ls}))),d=new Mn(new Iu(e.x,e.y),c[0]);if(d.rotateX(Math.PI/2),d.position.set(0,0,e.y/2),c.length>1){let h=-1;Ym(r.world).pipe(o4(n&&!isNaN(+n)?1e3*+n:250)).subscribe(()=>{h=(h+1)%c.length,d.material=c[h]})}return[d,a]})()}}let Gme=(()=>{class i{constructor(e,n,r){this.eelDelegate=e,this.cdr=n,this.mainService=r,this._resource$=new vt(null),this.changed=new We,this.previewLoading$=new vt(!0),this.pointer$=new vt(null),this.selectedSplineIndex$=new vt(0),this.name="",this.renderer=null,this.map=null,this.roadPath=null,this.destroyed$=new Re}get resource(){return this._resource$.getValue()}set resource(e){this._resource$.next(e)}get roadSpline(){return this.resource?.data.block_positions||[]}ngAfterViewInit(){var e=this;return tt(function*(){var s;e.world=new sk(new vO,{init:(s=tt(function*(){}),function(){return s.apply(this,arguments)}),simulate:()=>{},loader:{loadFromGgGlb:function(){var s=tt(function*(...o){return[]});return function(){return s.apply(this,arguments)}}()}}),yield e.world.init(),e.skySphere=new Zo({object3D:e.world.visualScene.factory.createPrimitive({shape:"SPHERE",radius:1e3},{color:16777215})}),e.skySphere.object3D.nativeMesh.material.side=Ls,e.world.addEntity(e.skySphere),e.selectionSphere=new Zo({object3D: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 $S(16777215,2));let n=new vt({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=Yi.lookAt(e.renderer.camera.position,Pe.add(e.renderer.camera.position,Pe.Y),Pe.Z),Ym(e.world).pipe(He(e.destroyed$)).subscribe(()=>{e.renderer&&(e.skySphere.position=e.renderer.camera.position,e.pointer$.next(e.renderer.camera.position))}),e.controller=new n4(e.world.keyboardInput,e.renderer,{mouseOptions:{canvas:e.previewCanvas.nativeElement,pointerLock:!0},keymap:"wasd+arrows",cameraLinearSpeed:40,cameraBoostMultiplier:4,cameraMovementElasticity:100,cameraRotationElasticity:30,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(He(e.destroyed$)).subscribe(function(){var s=tt(function*(o){e.previewLoading$.next(!0),yield e.loadTerrainChunks(o?.id),yield e.loadPreview(),e.previewLoading$.next(!1)});return function(o){return s.apply(this,arguments)}}()),e.mainService.dataBlockChange$.pipe(He(e.destroyed$),gn(([s,o])=>!!e.resource&&s.startsWith(e.resource.id)),ml(3e3)).subscribe(tt(function*(){e.previewLoading$.next(!0),yield e.postTmpUpdates(e.resource?.id),yield e.loadPreview(),e.previewLoading$.next(!1)})),e.selectedSplineIndex$.pipe(He(e.destroyed$),ml(250)).subscribe(s=>{if(e.resource){let o=e.resource.data.block_positions[s];if(!o)return;o={x:o.x,y:o.z,z:o.y},e.selectionSphere.position=o,e.renderer&&(e.renderer.position=Pe.add(o,Pe.rotAround({x:10,y:-12,z:5},{x:0,y:0,z:1},-0)),e.renderer.rotation=Yi.lookAt(e.renderer.position,o,{x:0,y:0,z:1}),e.controller.reset())}})})()}loadTerrainChunks(e){var n=this;return tt(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 tt(function*(){if(e.roadPath=e.resource?.data.block_positions.map(r=>({x:r.x,y:r.z,z:r.y})),!e.terrainChunksObjLocation||!e.roadPath)return;const n=Km.fromMapArray(e.roadPath.map((r,s)=>({path:`${e.terrainChunksObjLocation}terrain_chunk_${s}`,position:r,loadOptions:{}}))||[],!0);e.unloadPreview(),e.map=new Hme(n,"",e.mainService.hideHiddenFields$),e.map.resource=e.resource,e.map.isOpenedTrack=!1,Ym(e.world).pipe(He(e.destroyed$)).subscribe(()=>{e.map&&e.renderer&&e.map.loaderCursor$.next(e.renderer.position)}),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 tt(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)(E(Ql),E(Zn),E(ka))},i.\u0275cmp=ot({type:i,selectors:[["app-trk-map-block-ui"]],viewQuery:function(e,n){if(1&e&&(Wn(Ume,5),Wn(Vme,5)),2&e){let r;St(r=Et())&&(n.previewCanvasContainer=r.first),St(r=Et())&&(n.previewCanvas=r.first)}},inputs:{resource:"resource"},outputs:{changed:"changed"},decls:19,vars:18,consts:[[1,"preview"],[1,"previewCanvasContainer"],["previewCanvasContainer",""],["width","640","height","480"],["previewCanvas",""],["mode","indeterminate",4,"ngIf"],[1,"previewNavigationContainer"],["appearance","fill"],["matInput","","type","number",3,"min","max","ngModel","ngModelChange"],[3,"roadSpline","pointer","splineClosed"],[3,"resource"],["mode","indeterminate"]],template:function(e,n){if(1&e&&(W(0,"div",0)(1,"div",1,2),Te(3,"canvas",3,4),fe(5,zme,1,0,"mat-spinner",5),Dt(6,"async"),Y(),W(7,"div",6,2)(9,"mat-form-field",7)(10,"mat-label"),ze(11,"Spline item"),Y(),W(12,"input",8),Ue("ngModelChange",function(s){return n.selectedSplineIndex$.next(s)}),Dt(13,"async"),Dt(14,"async"),Y()(),Te(15,"app-tri-minimap",9),Dt(16,"async"),Y()(),Te(17,"app-compound-block-ui",10),Dt(18,"async")),2&e){let r;G(5),U("ngIf",Lt(6,8,n.previewLoading$)),G(7),U("min",0)("max",4*(null==(r=Lt(13,10,n._resource$))?null:r.data.num_blocks)-1)("ngModel",Lt(14,12,n.selectedSplineIndex$)),G(3),U("roadSpline",n.roadSpline)("pointer",Lt(16,14,n.pointer$))("splineClosed",!0),G(2),U("resource",Lt(18,16,n._resource$))}},dependencies:[vi,gl,mu,tc,_u,gu,Xc,vl,To,ic,Qb,Jl,f$,pl],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})();function $me(i,t){if(1&i&&(W(0,"mat-error"),ze(1),Y()),2&i){const e=he(2);G(1),tm(" ",e.resourceError.data.error_class,": ",e.resourceError.data.error_text," ")}}function Wme(i,t){1&i&&Te(0,"mat-spinner",5)}function jme(i,t){if(1&i&&(W(0,"div",2),fe(1,$me,2,2,"mat-error",3),fe(2,Wme,1,0,"mat-spinner",4),Y()),2&i){const e=he();G(1),U("ngIf",e.resourceError),G(1),U("ngIf",!e.resourceError)}}function Yme(i,t){}let e0=(()=>{class i{constructor(e){this.mainService=e,this._component=null,this._componentChangedSub=null,this.destroyed$=new Re,this.resourceSet$=new Re,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(He(this.destroyed$),He(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 qme(i,t){1&i&&Te(0,"mat-icon",17)}function Xme(i,t){1&i&&Te(0,"mat-icon",18)}let Kme=(()=>{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 tt(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 tt(function*(){if(e.mainService.hasUnsavedChanges){let n=e.dialog.open(CV,{data:{text:"There are unsaved changes, which will be lost. Are you sure you want to reload file?"}});if(!(yield lR(n.afterClosed())))return}yield e.mainService.reloadResource(),e.cdr.markForCheck()})()}}return i.\u0275fac=function(e){return new(e||i)(E(Ql),E(ka),E(Bm),E(IV),E(Zn))},i.\u0275cmp=ot({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&&(W(0,"mat-toolbar",0)(1,"span"),ze(2),Dt(3,"async"),Dt(4,"async"),Y(),Te(5,"span",1),W(6,"button",2),Ue("click",function(){return n.toggleUnknownsVisibility()}),fe(7,qme,1,0,"mat-icon",3),Dt(8,"async"),fe(9,Xme,1,0,"mat-icon",4),Dt(10,"async"),Y(),Te(11,"mat-divider",5)(12,"app-block-actions",6),Dt(13,"async"),W(14,"button",7),Ue("click",function(){return n.reloadResource()}),Dt(15,"async"),Te(16,"mat-icon",8),Y(),Te(17,"mat-divider",5),W(18,"button",9),Ue("click",function(){return n.saveResource()}),Dt(19,"async"),Dt(20,"async"),Te(21,"mat-icon",10),Y()(),W(22,"div",11),Te(23,"div",12)(24,"app-editor",13),Dt(25,"async"),Dt(26,"async"),Dt(27,"async"),W(28,"div",14)(29,"a",15),Te(30,"img",16),Y()(),Te(31,"div",12),Y()),2&e){let r;G(2),tm("",(null==(r=Lt(3,9,n.mainService.resource$))?null:r.name)||"...","",Lt(4,11,n.mainService.hasUnsavedChanges$)?"*":"",""),G(5),U("ngIf",Lt(8,13,n.mainService.hideHiddenFields$)),G(2),U("ngIf",!Lt(10,15,n.mainService.hideHiddenFields$)),G(3),U("resource",Lt(13,17,n.mainService.resource$)),G(2),U("disabled",!Lt(15,19,n.mainService.eelDelegate.openedResourcePath$)),G(4),U("disabled",!Lt(19,21,n.mainService.resource$)||!Lt(20,23,n.mainService.hasUnsavedChanges$)),G(6),U("resource",Lt(25,25,n.mainService.customActionRunning$)?null:Lt(26,27,n.mainService.resource$)||Lt(27,29,n.mainService.error$))("hideBlockActions",!0)}},dependencies:[vi,MJ,SJ,Os,XM,gR,e0,nE,pl],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 w$(i){return new pe(3e3,!1)}function Rge(){return typeof window<"u"&&typeof window.document<"u"}function wO(){return typeof process<"u"&&"[object process]"==={}.toString.call(process)}function Lu(i){switch(i.length){case 0:return new tb;case 1:return i[0];default:return new oV(i)}}function M$(i,t,e,n,r=new Map,s=new Map){const o=[],a=[];let l=-1,c=null;if(n.forEach(d=>{const h=d.get("offset"),p=h==l,m=p&&c||new Map;d.forEach((g,b)=>{let v=b,y=g;if("offset"!==b)switch(v=t.normalizePropertyName(v,o),y){case rR:y=r.get(b);break;case qc: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 yge(i){return new pe(3502,!1)}();return a}function MO(i,t,e,n){switch(t){case"start":i.onStart(()=>n(e&&CO(e,"start",i)));break;case"done":i.onDone(()=>n(e&&CO(e,"done",i)));break;case"destroy":i.onDestroy(()=>n(e&&CO(e,"destroy",i)))}}function CO(i,t,e){const s=SO(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 SO(i,t,e,n,r="",s=0,o){return{element:i,triggerName:t,fromState:e,toState:n,phaseName:r,totalTime:s,disabled:!!o}}function ra(i,t,e){let n=i.get(t);return n||i.set(t,n=e),n}function C$(i){const t=i.indexOf(":");return[i.substring(1,t),i.slice(t+1)]}let EO=(i,t)=>!1,S$=(i,t,e)=>[],E$=null;function AO(i){const t=i.parentNode||i.host;return t===E$?null:t}(wO()||typeof Element<"u")&&(Rge()?(E$=(()=>document.documentElement)(),EO=(i,t)=>{for(;t;){if(t===i)return!0;t=AO(t)}return!1}):EO=(i,t)=>i.contains(t),S$=(i,t,e)=>{if(e)return Array.from(i.querySelectorAll(t));const n=i.querySelector(t);return n?[n]:[]});let Tf=null,A$=!1;const D$=EO,T$=S$;let I$=(()=>{class i{validateStyleProperty(e){return function Pge(i){Tf||(Tf=function Oge(){return typeof document<"u"?document.body:null}()||{},A$=!!Tf.style&&"WebkitAppearance"in Tf.style);let t=!0;return Tf.style&&!function kge(i){return"ebkit"==i.substring(1,6)}(i)&&(t=i in Tf.style,!t&&A$&&(t="Webkit"+i.charAt(0).toUpperCase()+i.slice(1)in Tf.style)),t}(e)}matchesElement(e,n){return!1}containsElement(e,n){return D$(e,n)}getParentElement(e){return AO(e)}query(e,n,r){return T$(e,n,r)}computeStyle(e,n,r){return r||""}animate(e,n,r,s,o,a=[],l){return new tb(r,s)}}return i.\u0275fac=function(e){return new(e||i)},i.\u0275prov=ke({token:i,factory:i.\u0275fac}),i})(),DO=(()=>{class i{}return i.NOOP=new I$,i})();const Fge=1e3,TO="ng-enter",iE="ng-leave",rE="ng-trigger",sE=".ng-trigger",k$="ng-animating",IO=".ng-animating";function hd(i){if("number"==typeof i)return i;const t=i.match(/^(-?[\.\d]+)(m?s)/);return!t||t.length<2?0:RO(parseFloat(t[1]),t[2])}function RO(i,t){return"s"===t?i*Fge:i}function oE(i,t,e){return i.hasOwnProperty("duration")?i:function Nge(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(w$()),{duration:0,delay:0,easing:""};r=RO(parseFloat(a[1]),a[2]);const l=a[3];null!=l&&(s=RO(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 Zme(){return new pe(3100,!1)}()),a=!0),s<0&&(t.push(function Qme(){return new pe(3101,!1)}()),a=!0),a&&t.splice(l,0,w$())}return{duration:r,delay:s,easing:o}}(i,t,e)}function t0(i,t={}){return Object.keys(i).forEach(e=>{t[e]=i[e]}),t}function P$(i){const t=new Map;return Object.keys(i).forEach(e=>{t.set(e,i[e])}),t}function Nu(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 F$(i,t,e){return e?t+":"+e+";":""}function L$(i){let t="";for(let e=0;e{const s=PO(r);e&&!e.has(r)&&e.set(r,i.style[s]),i.style[s]=n}),wO()&&L$(i))}function If(i,t){i.style&&(t.forEach((e,n)=>{const r=PO(n);i.style[r]=""}),wO()&&L$(i))}function n0(i){return Array.isArray(i)?1==i.length?i[0]:iV(i):i}const kO=new RegExp("{{\\s*(.+?)\\s*}}","g");function N$(i){let t=[];if("string"==typeof i){let e;for(;e=kO.exec(i);)t.push(e[1]);kO.lastIndex=0}return t}function r0(i,t,e){const n=i.toString(),r=n.replace(kO,(s,o)=>{let a=t[o];return null==a&&(e.push(function ege(i){return new pe(3003,!1)}()),a=""),a.toString()});return r==n?i:r}function aE(i){const t=[];let e=i.next();for(;!e.done;)t.push(e.value),e=i.next();return t}const Vge=/-+([a-z0-9])/g;function PO(i){return i.replace(Vge,(...t)=>t[1].toUpperCase())}function zge(i){return i.replace(/([a-z])([A-Z])/g,"$1-$2").toLowerCase()}function sa(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 tge(i){return new pe(3004,!1)}()}}function B$(i,t){return window.getComputedStyle(i)[t]}const dE="*";function Yge(i,t){const e=[];return"string"==typeof i?i.split(/\s*,\s*/).forEach(n=>function qge(i,t,e){if(":"==i[0]){const l=function Xge(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 pge(i){return new pe(3015,!1)}()),t;const r=n[1],s=n[2],o=n[3];t.push(U$(r,o));"<"==s[0]&&!(r==dE&&o==dE)&&t.push(U$(o,r))}(n,e,t)):e.push(i),e}const uE=new Set(["true","1"]),hE=new Set(["false","0"]);function U$(i,t){const e=uE.has(i)||hE.has(i),n=uE.has(t)||hE.has(t);return(r,s)=>{let o=i==dE||i==r,a=t==dE||t==s;return!o&&e&&"boolean"==typeof r&&(o=r?uE.has(i):hE.has(i)),!a&&n&&"boolean"==typeof s&&(a=s?uE.has(t):hE.has(t)),o&&a}}const Kge=new RegExp("s*:selfs*,?","g");function OO(i,t,e,n){return new Zge(i).build(t,e,n)}class Zge{constructor(t){this._driver=t}build(t,e,n){const r=new e_e(e);return this._resetContextStyleTimingState(r),sa(this,n0(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 ige(){return new pe(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(d=>{l.name=d,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 rge(){return new pe(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=>{N$(l).forEach(c=>{o.hasOwnProperty(c)||s.add(c)})})}),s.size&&(aE(s.values()),e.errors.push(function sge(i,t){return new pe(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=sa(this,n0(t.animation),e);return{type:1,matchers:Yge(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=>sa(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=sa(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 n_e(i,t){if(i.hasOwnProperty("duration"))return i;if("number"==typeof i)return FO(oE(i,t).duration,0,"");const e=i;if(e.split(/\s+/).some(s=>"{"==s.charAt(0)&&"{"==s.charAt(1))){const s=FO(0,0,"");return s.dynamic=!0,s.strValue=e,s}const r=oE(e,t);return FO(r.duration,r.delay,r.easing)}(t.timings,e.errors);e.currentAnimateTimings=n;let r,s=t.styles?t.styles:si({});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=si(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===qc?n.push(a):e.errors.push(new pe(3002,!1)):n.push(P$(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),d=c.get(l);let h=!0;d&&(s!=r&&s>=d.startTime&&r<=d.endTime&&(e.errors.push(function age(i,t,e,n,r){return new pe(3010,!1)}()),h=!1),s=d.startTime),h&&c.set(l,{startTime:s,endTime:r}),e.options&&function Uge(i,t,e){const n=t.params||{},r=N$(i);r.length&&r.forEach(s=>{n.hasOwnProperty(s)||e.push(function Jme(i){return new pe(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 lge(){return new pe(3011,!1)}()),n;let s=0;const o=[];let a=!1,l=!1,c=0;const d=t.steps.map(y=>{const M=this._makeStyleAst(y,e);let x=null!=M.offset?M.offset:function t_e(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:sa(this,n0(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 Qge(i){const t=!!i.split(/\s*,\s*/).find(e=>":self"==e);return t&&(i=i.replace(Kge,"")),i=i.replace(/@\*/g,sE).replace(/@\w+/g,e=>sE+"-"+e.slice(1)).replace(/:animating/g,IO),[i,t]}(t.selector);e.currentQuerySelector=n.length?n+" "+s:s,ra(e.collectedStyles,e.currentQuerySelector,new Map);const a=sa(this,n0(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 hge(){return new pe(3013,!1)}());const n="full"===t.timings?{duration:0,delay:0,easing:"full"}:oE(t.timings,e.errors,!0);return{type:12,animation:sa(this,n0(t.animation),e),timings:n,options:null}}}class e_e{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=t0(i)).params&&(i.params=function Jge(i){return i?t0(i):null}(i.params)):i={},i}function FO(i,t,e){return{duration:i,delay:t,easing:e}}function LO(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 fE{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 s_e=new RegExp(":enter","g"),a_e=new RegExp(":leave","g");function NO(i,t,e,n,r,s=new Map,o=new Map,a,l,c=[]){return(new l_e).buildKeyframes(i,t,e,n,r,s,o,a,l,c)}class l_e{buildKeyframes(t,e,n,r,s,o,a,l,c,d=[]){c=c||new fE;const h=new BO(t,e,c,r,s,d,[]);h.options=l;const p=l.delay?hd(l.delay):0;h.currentTimeline.delayNextStep(p),h.currentTimeline.setStyles([o],null,h.errors,l),sa(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()):[LO(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:hd(r0(s,r?.params??{},e.errors));n.delayNextStep(o)}}}_visitSubInstructions(t,e,n){let s=e.currentTimeline.currentTime;const o=null!=n.duration?hd(n.duration):null,a=null!=n.delay?hd(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),sa(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=pE);const o=hd(s.delay);r.delayNextStep(o)}t.steps.length&&(t.steps.forEach(o=>sa(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?hd(t.options.delay):0;t.steps.forEach(o=>{const a=e.createSubContext(t.options);s&&a.delayNextStep(s),sa(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 oE(e.params?r0(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?hd(r.delay):0;s&&(6===e.previousNode.type||0==n&&e.currentTimeline.hasCurrentStyleProperties())&&(e.currentTimeline.snapshotCurrentStyles(),e.previousNode=pE);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,d)=>{e.currentQueryIndex=d;const h=e.createSubContext(t.options,c);s&&h.delayNextStep(s),c===e.element&&(l=h.currentTimeline),sa(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 d=e.currentTimeline;l&&d.delayNextStep(l);const h=d.currentTime;sa(this,t.animation,e),e.previousNode=t,n.currentStaggerTime=r.currentTime-h+(r.startTime-n.currentTimeline.startTime)}}const pE={};class BO{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=pE,this.subContextCount=0,this.options={},this.currentQueryIndex=0,this.currentQueryTotal=0,this.currentStaggerTime=0,this.currentTimeline=l||new mE(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=hd(n.duration)),null!=n.delay&&(r.delay=hd(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]=r0(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 BO(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=pE,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 c_e(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(s_e,"."+this._enterClassName)).replace(a_e,"."+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 fge(i){return new pe(3014,!1)}()),a}}class mE{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 mE(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||qc),this._currentKeyframe.set(e,qc);this._currentEmptyStepKeyframe=this._currentKeyframe}setStyles(t,e,n,r){e&&this._previousKeyframe.set("easing",e);const s=r&&r.params||{},o=function d_e(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,qc)}else Nu(r,e)}),e}(t,this._globalTimelineStyles);for(let[a,l]of o){const c=r0(l,s,n);this._pendingStyles.set(a,c),this._localTimelineStyles.has(a)||this._backFill.set(a,this._globalTimelineStyles.get(a)??qc),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=Nu(a,new Map,this._backFill);c.forEach((d,h)=>{d===rR?t.add(h):d===qc&&e.add(h)}),n||c.set("offset",l/this.duration),r.push(c)});const s=t.size?aE(t.values()):[],o=e.size?aE(e.values()):[];if(n){const a=r[0],l=new Map(a);a.set("offset",0),l.set("offset",1),r=[a,l]}return LO(this.element,r,s,o,this.duration,this.startTime,this.easing,!1)}}class c_e extends mE{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=Nu(t[0]);l.set("offset",0),s.push(l);const c=Nu(t[0]);c.set("offset",H$(a)),s.push(c);const d=t.length-1;for(let h=1;h<=d;h++){let p=Nu(t[h]);const m=p.get("offset");p.set("offset",H$((e+m*n)/o)),s.push(p)}n=o,e=0,r="",t=s}return LO(this.element,t,this.preStyleProps,this.postStyleProps,n,e,r,!0)}}function H$(i,t=3){const e=Math.pow(10,t-1);return Math.round(i*e)/e}class UO{}const u_e=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 h_e extends UO{normalizePropertyName(t,e){return PO(t)}normalizeStyleValue(t,e,n,r){let s="";const o=n.toString().trim();if(u_e.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 nge(i,t){return new pe(3005,!1)}())}return o+s}}function G$(i,t,e,n,r,s,o,a,l,c,d,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:d,totalTime:h,errors:p}}const VO={};class $${constructor(t,e,n){this._triggerName=t,this.ast=e,this._stateStyles=n}match(t,e,n,r){return function f_e(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,d){const h=[],p=this.ast.options&&this.ast.options.params||VO,g=this.buildStyles(n,a&&a.params||VO,h),b=l&&l.params||VO,v=this.buildStyles(r,b,h),y=new Set,M=new Map,x=new Map,C="void"===r,F={params:p_e(b,p),delay:this.ast.options?.delay},D=d?[]:NO(t,e,this.ast.animation,s,o,g,v,F,c,h);let k=0;if(D.forEach(T=>{k=Math.max(T.duration+T.delay,k)}),h.length)return G$(e,this._triggerName,n,r,C,g,v,[],[],M,x,k,h);D.forEach(T=>{const A=T.element,$=ra(M,A,new Set);T.preStyleProps.forEach(ne=>$.add(ne));const ie=ra(x,A,new Set);T.postStyleProps.forEach(ne=>ie.add(ne)),A!==e&&y.add(A)});const B=aE(y.values());return G$(e,this._triggerName,n,r,C,g,v,D,B,M,x,k)}}function p_e(i,t){const e=t0(t);for(const n in i)i.hasOwnProperty(n)&&null!=i[n]&&(e[n]=i[n]);return e}class m_e{constructor(t,e,n){this.styles=t,this.defaultParams=e,this.normalizer=n}buildStyles(t,e){const n=new Map,r=t0(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=r0(o,r,e));const l=this.normalizer.normalizePropertyName(a,e);o=this.normalizer.normalizeStyleValue(a,l,o,e),n.set(a,o)})}),n}}class __e{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 m_e(r.style,r.options&&r.options.params||{},n))}),W$(this.states,"true","1"),W$(this.states,"false","0"),e.transitions.forEach(r=>{this.transitionFactories.push(new $$(t,r,this.states))}),this.fallbackTransition=function v_e(i,t,e){return new $$(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 W$(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 y_e=new fE;class b_e{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=OO(this._driver,e,n,r);if(n.length)throw function bge(i){return new pe(3503,!1)}();this._animations.set(t,s)}_buildPlayer(t,e,n){const r=t.element,s=M$(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=NO(this._driver,e,s,TO,iE,new Map,new Map,n,y_e,r),o.forEach(d=>{const h=ra(a,d.element,new Map);d.postStyleProps.forEach(p=>h.set(p,null))})):(r.push(function xge(){return new pe(3300,!1)}()),o=[]),r.length)throw function wge(i){return new pe(3504,!1)}();a.forEach((d,h)=>{d.forEach((p,m)=>{d.set(m,this._driver.computeStyle(h,m,qc))})});const c=Lu(o.map(d=>{const h=a.get(d.element);return this._buildPlayer(d,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 Mge(i){return new pe(3301,!1)}();return e}listen(t,e,n,r){const s=SO(e,"","","");return MO(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 j$="ng-animate-queued",zO="ng-animate-disabled",S_e=[],Y$={namespaceId:"",setForRemoval:!1,setForMove:!1,hasAnimation:!1,removedBeforeQueried:!1},E_e={namespaceId:"",setForMove:!1,setForRemoval:!1,hasAnimation:!1,removedBeforeQueried:!0},Ua="__ng_removed";class HO{get params(){return this.options.params}constructor(t,e=""){this.namespaceId=e;const n=t&&t.hasOwnProperty("value");if(this.value=function I_e(i){return i??null}(n?t.value:t),n){const s=t0(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 s0="void",GO=new HO(s0);class A_e{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,Va(e,this._hostClassName)}listen(t,e,n,r){if(!this._triggers.has(e))throw function Cge(i,t){return new pe(3302,!1)}();if(null==n||0==n.length)throw function Sge(i){return new pe(3303,!1)}();if(!function R_e(i){return"start"==i||"done"==i}(n))throw function Ege(i,t){return new pe(3400,!1)}();const s=ra(this._elementListeners,t,[]),o={name:e,phase:n,callback:r};s.push(o);const a=ra(this._engine.statesByElement,t,new Map);return a.has(e)||(Va(t,rE),Va(t,rE+"-"+e),a.set(e,GO)),()=>{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 Age(i){return new pe(3401,!1)}();return e}trigger(t,e,n,r=!0){const s=this._getTrigger(e),o=new $O(this.id,e,t);let a=this._engine.statesByElement.get(t);a||(Va(t,rE),Va(t,rE+"-"+e),this._engine.statesByElement.set(t,a=new Map));let l=a.get(e);const c=new HO(n,this.id);if(!(n&&n.hasOwnProperty("value"))&&l&&c.absorbOptions(l.options),a.set(e,c),l||(l=GO),c.value!==s0&&l.value===c.value){if(!function O_e(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),uc(t,y)})}return}const p=ra(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||(Va(t,j$),o.onStart(()=>{Yg(t,j$)})),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,sE,!0);n.forEach(r=>{if(r[Ua])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 d=this.trigger(t,c,s0,r);d&&a.push(d)}}),a.length)return this._engine.markElementAsRemoved(this.id,t,!0,e,o),n&&Lu(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)||GO,d=new HO(s0),h=new $O(this.id,o,t);this._engine.totalQueuedPlayers++,this._queue.push({element:t,triggerName:o,transition:l,fromState:c,toState:d,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[Ua];(!s||s===Y$)&&(n.afterFlush(()=>this.clearElementCache(t)),n.destroyInnerAnimations(t),n._onRemovalComplete(t,e))}}insertNode(t,e){Va(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=SO(s,n.triggerName,n.fromState.value,n.toState.value);l._data=t,MO(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 D_e{_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 A_e(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(gE(e)){const s=this._fetchNamespace(t);if(s)return s.trigger(e,n,r),!0}return!1}insertNode(t,e,n,r){if(!gE(e))return;const s=e[Ua];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),Va(t,zO)):this.disabledNodes.has(t)&&(this.disabledNodes.delete(t),Yg(t,zO))}removeNode(t,e,n,r){if(gE(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[Ua]={namespaceId:t,setForRemoval:r,hasAnimation:n,removedBeforeQueried:!1,previousTriggersValues:s}}listen(t,e,n,r,s){return gE(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,sE,!0);e.forEach(n=>this.destroyActiveAnimationsForElement(n)),0!=this.playersByQueriedElement.size&&(e=this.driver.query(t,IO,!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 Lu(this.players).onDone(()=>t());t()})}processLeaveNode(t){const e=t[Ua];if(e&&e.setForRemoval){if(t[Ua]=Y$,e.namespaceId){this.destroyInnerAnimations(t);const n=this._fetchNamespace(e.namespaceId);n&&n.clearElementCache(t)}this._onRemovalComplete(t,e.setForRemoval)}t.classList?.contains(zO)&&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?Lu(e).onDone(()=>{n.forEach(r=>r())}):n.forEach(r=>r())}}reportError(t){throw function Dge(i){return new pe(3402,!1)}()}_flushAnimations(t,e){const n=new fE,r=[],s=new Map,o=[],a=new Map,l=new Map,c=new Map,d=new Set;this.disabledNodes.forEach(q=>{d.add(q);const re=this.driver.query(q,".ng-animate-queued",!0);for(let J=0;J{const J=TO+b++;g.set(re,J),q.forEach(we=>Va(we,J))});const v=[],y=new Set,M=new Set;for(let q=0;qy.add(we)):M.add(re))}const x=new Map,C=K$(p,Array.from(y));C.forEach((q,re)=>{const J=iE+b++;x.set(re,J),q.forEach(we=>Va(we,J))}),t.push(()=>{m.forEach((q,re)=>{const J=g.get(re);q.forEach(we=>Yg(we,J))}),C.forEach((q,re)=>{const J=x.get(re);q.forEach(we=>Yg(we,J))}),v.forEach(q=>{this.processLeaveNode(q)})});const F=[],D=[];for(let q=this._namespaceList.length-1;q>=0;q--)this._namespaceList[q].drainQueuedTransitions(e).forEach(J=>{const we=J.player,Ne=J.element;if(F.push(we),this.collectedEnterElements.length){const Fe=Ne[Ua];if(Fe&&Fe.setForMove){if(Fe.previousTriggersValues&&Fe.previousTriggersValues.has(J.triggerName)){const bt=Fe.previousTriggersValues.get(J.triggerName),Ct=this.statesByElement.get(J.element);if(Ct&&Ct.has(J.triggerName)){const Mt=Ct.get(J.triggerName);Mt.value=bt,Ct.set(J.triggerName,Mt)}}return void we.destroy()}}const Ye=!h||!this.driver.containsElement(h,Ne),Tt=x.get(Ne),en=g.get(Ne),ae=this._buildInstruction(J,n,en,Tt,Ye);if(ae.errors&&ae.errors.length)return void D.push(ae);if(Ye)return we.onStart(()=>If(Ne,ae.fromStyles)),we.onDestroy(()=>uc(Ne,ae.toStyles)),void r.push(we);if(J.isFallbackTransition)return we.onStart(()=>If(Ne,ae.fromStyles)),we.onDestroy(()=>uc(Ne,ae.toStyles)),void r.push(we);const Oe=[];ae.timelines.forEach(Fe=>{Fe.stretchStartingKeyframe=!0,this.disabledNodes.has(Fe.element)||Oe.push(Fe)}),ae.timelines=Oe,n.append(Ne,ae.timelines),o.push({instruction:ae,player:we,element:Ne}),ae.queriedElements.forEach(Fe=>ra(a,Fe,[]).push(we)),ae.preStyleProps.forEach((Fe,bt)=>{if(Fe.size){let Ct=l.get(bt);Ct||l.set(bt,Ct=new Set),Fe.forEach((Mt,Sn)=>Ct.add(Sn))}}),ae.postStyleProps.forEach((Fe,bt)=>{let Ct=c.get(bt);Ct||c.set(bt,Ct=new Set),Fe.forEach((Mt,Sn)=>Ct.add(Sn))})});if(D.length){const q=[];D.forEach(re=>{q.push(function Tge(i,t){return new pe(3505,!1)}())}),F.forEach(re=>re.destroy()),this.reportError(q)}const k=new Map,B=new Map;o.forEach(q=>{const re=q.element;n.has(re)&&(B.set(re,re),this._beforeAnimationBuild(q.player.namespaceId,q.instruction,k))}),r.forEach(q=>{const re=q.element;this._getPreviousPlayers(re,!1,q.namespaceId,q.triggerName,null).forEach(we=>{ra(k,re,[]).push(we),we.destroy()})});const T=v.filter(q=>Q$(q,l,c)),A=new Map;X$(A,this.driver,M,c,qc).forEach(q=>{Q$(q,l,c)&&T.push(q)});const ie=new Map;m.forEach((q,re)=>{X$(ie,this.driver,new Set(q),l,rR)}),T.forEach(q=>{const re=A.get(q),J=ie.get(q);A.set(q,new Map([...Array.from(re?.entries()??[]),...Array.from(J?.entries()??[])]))});const ne=[],se=[],ge={};o.forEach(q=>{const{element:re,player:J,instruction:we}=q;if(n.has(re)){if(d.has(re))return J.onDestroy(()=>uc(re,we.toStyles)),J.disabled=!0,J.overrideTotalTime(we.totalTime),void r.push(J);let Ne=ge;if(B.size>1){let Tt=re;const en=[];for(;Tt=Tt.parentNode;){const ae=B.get(Tt);if(ae){Ne=ae;break}en.push(Tt)}en.forEach(ae=>B.set(ae,Ne))}const Ye=this._buildAnimation(J.namespaceId,we,k,s,ie,A);if(J.setRealPlayer(Ye),Ne===ge)ne.push(J);else{const Tt=this.playersByElement.get(Ne);Tt&&Tt.length&&(J.parentPlayer=Lu(Tt)),r.push(J)}}else If(re,we.fromStyles),J.onDestroy(()=>uc(re,we.toStyles)),se.push(J),d.has(re)&&r.push(J)}),se.forEach(q=>{const re=s.get(q.element);if(re&&re.length){const J=Lu(re);q.setRealPlayer(J)}}),r.forEach(q=>{q.parentPlayer?q.syncPlayerEvents(q.parentPlayer):q.destroy()});for(let q=0;q!Ye.destroyed);Ne.length?k_e(this,re,Ne):this.processLeaveNode(re)}return v.length=0,ne.forEach(q=>{this.players.push(q),q.onDone(()=>{q.destroy();const re=this.players.indexOf(q);this.players.splice(re,1)}),q.play()}),ne}elementContainsData(t,e){let n=!1;const r=e[Ua];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==s0;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,d=c!==s,h=ra(n,c,[]);this._getPreviousPlayers(c,d,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=[],d=new Set,h=new Set,p=e.timelines.map(g=>{const b=g.element;d.add(b);const v=b[Ua];if(v&&v.removedBeforeQueried)return new tb(g.duration,g.delay);const y=b!==l,M=function P_e(i){const t=[];return Z$(i,t),t}((n.get(b)||S_e).map(k=>k.getRealPlayer())).filter(k=>!!k.element&&k.element===b),x=s.get(b),C=o.get(b),F=M$(0,this._normalizer,0,g.keyframes,x,C),D=this._buildPlayer(g,F,M);if(g.subTimeline&&r&&h.add(b),y){const k=new $O(t,a,b);k.setRealPlayer(D),c.push(k)}return D});c.forEach(g=>{ra(this.playersByQueriedElement,g.element,[]).push(g),g.onDone(()=>function T_e(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))}),d.forEach(g=>Va(g,k$));const m=Lu(p);return m.onDestroy(()=>{d.forEach(g=>Yg(g,k$)),uc(l,e.toStyles)}),h.forEach(g=>{ra(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 tb(t.duration,t.delay)}}class $O{constructor(t,e,n){this.namespaceId=t,this.triggerName=e,this.element=n,this._player=new tb,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=>MO(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){ra(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 gE(i){return i&&1===i.nodeType}function q$(i,t){const e=i.style.display;return i.style.display=t??"none",e}function X$(i,t,e,n,r){const s=[];e.forEach(l=>s.push(q$(l)));const o=[];n.forEach((l,c)=>{const d=new Map;l.forEach(h=>{const p=t.computeStyle(c,h,r);d.set(h,p),(!p||0==p.length)&&(c[Ua]=E_e,o.push(c))}),i.set(c,d)});let a=0;return e.forEach(l=>q$(l,s[a++])),o}function K$(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 Va(i,t){i.classList?.add(t)}function Yg(i,t){i.classList?.remove(t)}function k_e(i,t,e){Lu(e).onDone(()=>i.processLeaveNode(t))}function Z$(i,t){for(let e=0;er.add(s)):t.set(i,n),e.delete(i),!0}class _E{constructor(t,e,n){this.bodyNode=t,this._driver=e,this._normalizer=n,this._triggerCache={},this.onRemovalComplete=(r,s)=>{},this._transitionEngine=new D_e(t,e,n),this._timelineEngine=new b_e(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=[],d=OO(this._driver,s,l,c);if(l.length)throw function vge(i,t){return new pe(3404,!1)}();a=function g_e(i,t,e){return new __e(i,t,e)}(r,d,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]=C$(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]=C$(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 L_e=(()=>{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&&uc(this._element,this._startStyles,this._initialStyles),this._state=1)}finish(){this.start(),this._state<2&&(uc(this._element,this._initialStyles),this._endStyles&&(uc(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),uc(this._element,this._initialStyles),this._state=3)}}return i.initialStylesByElement=new WeakMap,i})();function WO(i){let t=null;return i.forEach((e,n)=>{(function N_e(i){return"display"===i||"position"===i})(n)&&(t=t||new Map,t.set(n,e))}),t}class J${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:B$(this.element,r))}),this.currentSnapshot=t}triggerCallback(t){const e="start"===t?this._onStartFns:this._onDoneFns;e.forEach(n=>n()),e.length=0}}class B_e{validateStyleProperty(t){return!0}validateAnimatableStyleProperty(t){return!0}matchesElement(t,e){return!1}containsElement(t,e){return D$(t,e)}getParentElement(t){return AO(t)}query(t,e,n){return T$(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,d=o.filter(m=>m instanceof J$);(function Hge(i,t){return 0===i||0===t})(n,r)&&d.forEach(m=>{m.currentSnapshot.forEach((g,b)=>c.set(b,g))});let h=function Bge(i){return i.length?i[0]instanceof Map?i:i.map(t=>P$(t)):[]}(e).map(m=>Nu(m));h=function Gge(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,B$(i,a)))}}return t}(t,h,c);const p=function F_e(i,t){let e=null,n=null;return Array.isArray(t)&&t.length?(e=WO(t[0]),t.length>1&&(n=WO(t[t.length-1]))):t instanceof Map&&(e=WO(t)),e||n?new L_e(i,e,n):null}(t,h);return new J$(t,h,l,p)}}let U_e=(()=>{class i extends tV{constructor(e,n){super(),this._nextAnimationId=0,this._renderer=e.createRenderer(n.body,{id:"0",encapsulation:qs.None,styles:[],data:{animation:[]}})}build(e){const n=this._nextAnimationId.toString();this._nextAnimationId++;const r=Array.isArray(e)?iV(e):e;return e8(this._renderer,null,n,"register",[r]),new V_e(n,this._renderer)}}return i.\u0275fac=function(e){return new(e||i)(ee(Gl),ee(jt))},i.\u0275prov=ke({token:i,factory:i.\u0275fac}),i})();class V_e extends FQ{constructor(t,e){super(),this._id=t,this._renderer=e}create(t,e){return new z_e(this._id,t,e||{},this._renderer)}}class z_e{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 e8(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 e8(i,t,e,n,r){return i.setProperty(t,`@@${e}:${n}`,r)}const t8="@.disabled";let H_e=(()=>{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 d=this._rendererCache.get(s);return d||(d=new n8("",s,this.engine,()=>this._rendererCache.delete(s)),this._rendererCache.set(s,d)),d}const o=n.id,a=n.id+"-"+this._currentId;this._currentId++,this.engine.register(a,e);const l=d=>{Array.isArray(d)?d.forEach(l):this.engine.registerTrigger(o,a,e,d.name,d)};return n.data.animation.forEach(l),new G_e(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)(ee(Gl),ee(_E),ee(ft))},i.\u0275prov=ke({token:i,factory:i.\u0275fac}),i})();class n8{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==t8?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 G_e extends n8{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==t8?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 $_e(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 W_e(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 i8=[{provide:tV,useClass:U_e},{provide:UO,useFactory:function Y_e(){return new h_e}},{provide:_E,useClass:(()=>{class i extends _E{constructor(e,n,r,s){super(e.body,n,r)}ngOnDestroy(){this.flush()}}return i.\u0275fac=function(e){return new(e||i)(ee(jt),ee(DO),ee(UO),ee(dm))},i.\u0275prov=ke({token:i,factory:i.\u0275fac}),i})()},{provide:Gl,useFactory:function q_e(i,t,e){return new H_e(i,t,e)},deps:[oM,_E,ft]}],jO=[{provide:DO,useFactory:()=>new B_e},{provide:Rr,useValue:"BrowserAnimations"},...i8],r8=[{provide:DO,useClass:I$},{provide:Rr,useValue:"NoopAnimations"},...i8];let X_e=(()=>{class i{static withConfig(e){return{ngModule:i,providers:e.disableAnimations?r8:jO}}}return i.\u0275fac=function(e){return new(e||i)},i.\u0275mod=nn({type:i}),i.\u0275inj=Kt({providers:jO,imports:[FB]}),i})();const s8=new me("CdkAccordion");let K_e=0,Z_e=(()=>{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=Zt.EMPTY,this.closed=new We,this.opened=new We,this.destroyed=new We,this.expandedChange=new We,this.id="cdk-accordion-child-"+K_e++,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)(E(s8,12),E(Zn),E(GR))},i.\u0275dir=ve({type:i,selectors:[["cdk-accordion-item"],["","cdkAccordionItem",""]],inputs:{expanded:"expanded",disabled:"disabled"},outputs:{closed:"closed",opened:"opened",destroyed:"destroyed",expandedChange:"expandedChange"},exportAs:["cdkAccordionItem"],features:[Dn([{provide:s8,useValue:void 0}])]}),i})(),Q_e=(()=>{class i{}return i.\u0275fac=function(e){return new(e||i)},i.\u0275mod=nn({type:i}),i.\u0275inj=Kt({}),i})();const J_e=["body"];function eve(i,t){}const tve=[[["mat-expansion-panel-header"]],"*",[["mat-action-row"]]],nve=["mat-expansion-panel-header","*","mat-action-row"];function ive(i,t){1&i&&Te(0,"span",2),2&i&&U("@indicatorRotate",he()._getExpandedState())}const rve=[[["mat-panel-title"]],[["mat-panel-description"]],"*"],sve=["mat-panel-title","mat-panel-description","*"],o8=new me("MAT_ACCORDION"),a8="225ms cubic-bezier(0.4,0.0,0.2,1)",l8={indicatorRotate:Ra("indicatorRotate",[Ps("collapsed, void",si({transform:"rotate(0deg)"})),Ps("expanded",si({transform:"rotate(180deg)"})),Pr("expanded <=> collapsed, void => collapsed",jr(a8))]),bodyExpansion:Ra("bodyExpansion",[Ps("collapsed, void",si({height:"0px",visibility:"hidden"})),Ps("expanded",si({height:"*",visibility:"visible"})),Pr("expanded <=> collapsed, void => collapsed",jr(a8))])},c8=new me("MAT_EXPANSION_PANEL");let ove=(()=>{class i{constructor(e,n){this._template=e,this._expansionPanel=n}}return i.\u0275fac=function(e){return new(e||i)(E(Mo),E(c8,8))},i.\u0275dir=ve({type:i,selectors:[["ng-template","matExpansionPanelContent",""]]}),i})(),ave=0;const d8=new me("MAT_EXPANSION_PANEL_DEFAULT_OPTIONS");let u8=(()=>{class i extends Z_e{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 We,this.afterCollapse=new We,this._inputChanges=new Re,this._headerId="mat-expansion-panel-header-"+ave++,this._bodyAnimationDone=new Re,this.accordion=e,this._document=o,this._bodyAnimationDone.pipe(Zl((c,d)=>c.fromState===d.fromState&&c.toState===d.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(Ao(null),gn(()=>this.expanded&&!this._portal),Oi(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)(E(o8,12),E(Zn),E(GR),E(Wr),E(jt),E(Rr,8),E(d8,8))},i.\u0275cmp=ot({type:i,selectors:[["mat-expansion-panel"]],contentQueries:function(e,n,r){if(1&e&&Wi(r,ove,5),2&e){let s;St(s=Et())&&(n._lazyContent=s.first)}},viewQuery:function(e,n){if(1&e&&Wn(J_e,5),2&e){let r;St(r=Et())&&(n._body=r.first)}},hostAttrs:[1,"mat-expansion-panel"],hostVars:6,hostBindings:function(e,n){2&e&&un("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:[Dn([{provide:o8,useValue:void 0},{provide:c8,useExisting:i}]),lt,bi],ngContentSelectors:nve,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&&(sr(tve),Wt(0),W(1,"div",0,1),Ue("@bodyExpansion.done",function(s){return n._bodyAnimationDone.next(s)}),W(3,"div",2),Wt(4,1),fe(5,eve,0,0,"ng-template",3),Y(),Wt(6,2),Y()),2&e&&(G(1),U("@bodyExpansion",n._getExpandedState())("id",n.id),At("aria-labelledby",n._headerId),G(4),U("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:[l8.bodyExpansion]},changeDetection:0}),i})();class lve{}const cve=JI(lve);let dve=(()=>{class i extends cve{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=Zt.EMPTY;const c=e.accordion?e.accordion._stateChanges.pipe(gn(d=>!(!d.hideToggle&&!d.togglePosition))):po;this.tabIndex=parseInt(l||"")||0,this._parentChangeSubscription=Mr(e.opened,e.closed,c,e._inputChanges.pipe(gn(d=>!!(d.hideToggle||d.disabled||d.togglePosition)))).subscribe(()=>this._changeDetectorRef.markForCheck()),e.closed.pipe(gn(()=>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:Xo(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)(E(u8,1),E(mt),E(Yc),E(Zn),E(d8,8),E(Rr,8),ya("tabindex"))},i.\u0275cmp=ot({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&&Ue("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),jo("height",n._getHeaderHeight()),un("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:[lt],ngContentSelectors:sve,decls:5,vars:3,consts:[[1,"mat-content"],["class","mat-expansion-indicator",4,"ngIf"],[1,"mat-expansion-indicator"]],template:function(e,n){1&e&&(sr(rve),W(0,"span",0),Wt(1),Wt(2,1),Wt(3,2),Y(),fe(4,ive,1,1,"span",1)),2&e&&(un("mat-content-hide-toggle",!n._showToggle()),G(4),U("ngIf",n._showToggle()))},dependencies:[vi],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:[l8.indicatorRotate]},changeDetection:0}),i})(),uve=(()=>{class i{}return i.\u0275fac=function(e){return new(e||i)},i.\u0275dir=ve({type:i,selectors:[["mat-panel-description"]],hostAttrs:[1,"mat-expansion-panel-header-description"]}),i})(),hve=(()=>{class i{}return i.\u0275fac=function(e){return new(e||i)},i.\u0275dir=ve({type:i,selectors:[["mat-panel-title"]],hostAttrs:[1,"mat-expansion-panel-header-title"]}),i})(),fve=(()=>{class i{}return i.\u0275fac=function(e){return new(e||i)},i.\u0275mod=nn({type:i}),i.\u0275inj=Kt({imports:[Eo,Qn,Q_e,Lh]}),i})();function pve(i,t){if(1&i&&(W(0,"mat-option",19),ze(1),Y()),2&i){const e=t.$implicit;U("value",e),G(1),Zi(" ",e," ")}}function mve(i,t){if(1&i){const e=mi();W(0,"mat-form-field",16)(1,"mat-select",17),Ue("selectionChange",function(r){return cn(e),Gt(he(2)._changePageSize(r.value))}),fe(2,pve,2,2,"mat-option",18),Y()()}if(2&i){const e=he(2);U("appearance",e._formFieldAppearance)("color",e.color),G(1),U("value",e.pageSize)("disabled",e.disabled)("aria-labelledby",e._pageSizeLabelId)("panelClass",e.selectConfig.panelClass||"")("disableOptionCentering",e.selectConfig.disableOptionCentering),G(1),U("ngForOf",e._displayedPageSizeOptions)}}function gve(i,t){if(1&i&&(W(0,"div",20),ze(1),Y()),2&i){const e=he(2);G(1),_i(e.pageSize)}}function _ve(i,t){if(1&i&&(W(0,"div",12)(1,"div",13),ze(2),Y(),fe(3,mve,3,8,"mat-form-field",14),fe(4,gve,2,1,"div",15),Y()),2&i){const e=he();G(1),B1("id",e._pageSizeLabelId),G(1),Zi(" ",e._intl.itemsPerPageLabel," "),G(1),U("ngIf",e._displayedPageSizeOptions.length>1),G(1),U("ngIf",e._displayedPageSizeOptions.length<=1)}}function vve(i,t){if(1&i){const e=mi();W(0,"button",21),Ue("click",function(){return cn(e),Gt(he().firstPage())}),ki(),W(1,"svg",7),Te(2,"path",22),Y()()}if(2&i){const e=he();U("matTooltip",e._intl.firstPageLabel)("matTooltipDisabled",e._previousButtonsDisabled())("matTooltipPosition","above")("disabled",e._previousButtonsDisabled()),At("aria-label",e._intl.firstPageLabel)}}function yve(i,t){if(1&i){const e=mi();ki(),ga(),W(0,"button",23),Ue("click",function(){return cn(e),Gt(he().lastPage())}),ki(),W(1,"svg",7),Te(2,"path",24),Y()()}if(2&i){const e=he();U("matTooltip",e._intl.lastPageLabel)("matTooltipDisabled",e._nextButtonsDisabled())("matTooltipPosition","above")("disabled",e._nextButtonsDisabled()),At("aria-label",e._intl.lastPageLabel)}}let yE=(()=>{class i{constructor(){this.changes=new Re,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=ke({token:i,factory:i.\u0275fac,providedIn:"root"}),i})();const xve={provide:yE,deps:[[new Ss,new xa,yE]],useFactory:function bve(i){return i||new yE}},Mve=new me("MAT_PAGINATOR_DEFAULT_OPTIONS"),Cve=WM(MQ(class{}));let Sve=(()=>{class i extends Cve{get pageIndex(){return this._pageIndex}set pageIndex(e){this._pageIndex=Math.max(ks(e),0),this._changeDetectorRef.markForCheck()}get length(){return this._length}set length(e){this._length=ks(e),this._changeDetectorRef.markForCheck()}get pageSize(){return this._pageSize}set pageSize(e){this._pageSize=Math.max(ks(e),0),this._updateDisplayedPageSizeOptions()}get pageSizeOptions(){return this._pageSizeOptions}set pageSizeOptions(e){this._pageSizeOptions=(e||[]).map(n=>ks(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 We,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){xo()},i.\u0275dir=ve({type:i,inputs:{color:"color",pageIndex:"pageIndex",length:"length",pageSize:"pageSize",pageSizeOptions:"pageSizeOptions",hidePageSize:"hidePageSize",showFirstLastButtons:"showFirstLastButtons",selectConfig:"selectConfig"},outputs:{page:"page"},features:[lt]}),i})(),Eve=0,Ave=(()=>{class i extends Sve{constructor(e,n,r){super(e,n,r),this._pageSizeLabelId="mat-paginator-page-size-label-"+Eve++,this._formFieldAppearance=r?.formFieldAppearance||"outline"}}return i.\u0275fac=function(e){return new(e||i)(E(yE),E(Zn),E(Mve,8))},i.\u0275cmp=ot({type:i,selectors:[["mat-paginator"]],hostAttrs:["role","group",1,"mat-mdc-paginator"],inputs:{disabled:"disabled"},exportAs:["matPaginator"],features:[lt],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&&(W(0,"div",0)(1,"div",1),fe(2,_ve,5,4,"div",2),W(3,"div",3)(4,"div",4),ze(5),Y(),fe(6,vve,3,5,"button",5),W(7,"button",6),Ue("click",function(){return n.previousPage()}),ki(),W(8,"svg",7),Te(9,"path",8),Y()(),ga(),W(10,"button",9),Ue("click",function(){return n.nextPage()}),ki(),W(11,"svg",7),Te(12,"path",10),Y()(),fe(13,yve,3,5,"button",11),Y()()()),2&e&&(G(2),U("ngIf",!n.hidePageSize),G(3),Zi(" ",n._intl.getRangeLabel(n.pageIndex,n.pageSize,n.length)," "),G(1),U("ngIf",n.showFirstLastButtons),G(1),U("matTooltip",n._intl.previousPageLabel)("matTooltipDisabled",n._previousButtonsDisabled())("matTooltipPosition","above")("disabled",n._previousButtonsDisabled()),At("aria-label",n._intl.previousPageLabel),G(3),U("matTooltip",n._intl.nextPageLabel)("matTooltipDisabled",n._nextButtonsDisabled())("matTooltipPosition","above")("disabled",n._nextButtonsDisabled()),At("aria-label",n._intl.nextPageLabel),G(3),U("ngIf",n.showFirstLastButtons))},dependencies:[So,vi,XM,vl,hb,Nm,Os],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})(),Dve=(()=>{class i{}return i.\u0275fac=function(e){return new(e||i)},i.\u0275mod=nn({type:i}),i.\u0275inj=Kt({providers:[xve],imports:[Eo,KM,VH,FV]}),i})(),Tve=(()=>{class i{}return i.\u0275fac=function(e){return new(e||i)},i.\u0275mod=nn({type:i,bootstrap:[Kme]}),i.\u0275inj=Kt({providers:[Ql,NH,{provide:PH,useValue:Uie}],imports:[FB,xK,X_e,eH,CJ,gC,pH,fve,DV,RV,FV,KM,ez,Dve,rse,_H,VH,_V,ype,bme,tH,tR,jie]}),i})();eh(Jl,[So,vi,Os,e0,nE],[pl]),eh(zR,[hm,So,vi,xy,tc,Xc,vl,u8,dve,hve,uve,Os,Ave,hb,Nm,e0],[]),eh(xC,[So,vi,MC,wC,gH,e0],[]),eh(g$,[So,vi,To,Os,hb,Nm,e0,nE],[pl]),F7().bootstrapModule(Tve).catch(i=>console.error(i))},489:function(Lo,Hs,ps){var ln;Lo=ps.nmd(Lo),function(){var V,Kr=200,Un="Expected a function",Ha="__lodash_hash_undefined__",Mi="__lodash_placeholder__",Ci=1,ms=2,$s=4,Ws=1,No=2,On=1,dr=2,fc=4,la=8,Dl=16,ca=32,Tl=64,Ga=128,da=256,pd=512,ME=800,Kg=16,In=1/0,Wa=9007199254740991,SE=17976931348623157e292,Pf=NaN,ua=4294967295,Re=ua-1,a0=ua>>>1,l0=[["ary",Ga],["bind",On],["bindKey",dr],["curry",la],["curryRight",Dl],["flip",pd],["partial",ca],["partialRight",Tl],["rearg",da]],ti="[object Arguments]",Yn="[object Array]",EE="[object AsyncFunction]",et="[object Boolean]",pc="[object Date]",AE="[object DOMException]",md="[object Error]",Of="[object Function]",c0="[object GeneratorFunction]",Bo="[object Map]",Uu="[object Number]",DE="[object Null]",ja="[object Object]",d0="[object Promise]",TE="[object Proxy]",gd="[object RegExp]",Uo="[object Set]",mc="[object String]",Ff="[object Symbol]",Zg="[object Undefined]",_d="[object WeakMap]",Vu="[object ArrayBuffer]",vd="[object DataView]",ha="[object Float32Array]",Lf="[object Float64Array]",Qg="[object Int8Array]",Nf="[object Int16Array]",Jg="[object Int32Array]",e_="[object Uint8Array]",zu="[object Uint8ClampedArray]",t_="[object Uint16Array]",n_="[object Uint32Array]",RE=/\b__p \+= '';/g,kE=/\b(__p \+=) '' \+/g,PE=/(__e\(.*?\)|\b__t\)) \+\n'';/g,u0=/&(?:amp|lt|gt|quot|#39);/g,h0=/[&<>"']/g,OE=RegExp(u0.source),FE=RegExp(h0.source),ZO=/<%-([\s\S]+?)%>/g,i_=/<%([\s\S]+?)%>/g,r_=/<%=([\s\S]+?)%>/g,f0=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,p0=/^\w*$/,m0=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,s_=/[\\^$.*+?()[\]{}|]/g,g0=RegExp(s_.source),Bf=/^\s+/,_0=/\s/,v0=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,wr=/\{\n\/\* \[wrapped with (.+)\] \*/,LE=/,? & /,NE=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,BE=/[()=,{}\[\]\/\s]/,UE=/\\(\\)?/g,y0=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,b0=/\w*$/,VE=/^[-+]0x[0-9a-f]+$/i,Ya=/^0b[01]+$/i,zE=/^\[object .+?Constructor\]$/,nr=/^0o[0-7]+$/i,yd=/^(?:0|[1-9]\d*)$/,po=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,o_=/($^)/,HE=/['\n\r\u2028\u2029\\]/g,Hu="\\ud800-\\udfff",w0="\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff",l_="\\u2700-\\u27bf",c_="a-z\\xdf-\\xf6\\xf8-\\xff",d_="A-Z\\xc0-\\xd6\\xd8-\\xde",M0="\\ufe0e\\ufe0f",C0="\\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",Mr="["+Hu+"]",Uf="["+C0+"]",bd="["+w0+"]",li="\\d+",u_="["+l_+"]",fi="["+c_+"]",Vf="[^"+Hu+C0+li+l_+c_+d_+"]",h_="\\ud83c[\\udffb-\\udfff]",kt="[^"+Hu+"]",$u="(?:\\ud83c[\\udde6-\\uddff]){2}",Wu="[\\ud800-\\udbff][\\udc00-\\udfff]",ju="["+d_+"]",pe="(?:"+fi+"|"+Vf+")",zf="(?:"+ju+"|"+Vf+")",Qt="(?:['\u2019](?:d|ll|m|re|s|t|ve))?",qn="(?:['\u2019](?:D|LL|M|RE|S|T|VE))?",S0="(?:"+bd+"|"+h_+")?",YE="["+M0+"]?",XE=YE+S0+"(?:\\u200d(?:"+[kt,$u,Wu].join("|")+")"+YE+S0+")*",KE="(?:"+[u_,$u,Wu].join("|")+")"+XE,QO="(?:"+[kt+bd+"?",bd,$u,Wu,Mr].join("|")+")",Il=RegExp("['\u2019]","g"),JO=RegExp(bd,"g"),E0=RegExp(h_+"(?="+h_+")|"+QO+XE,"g"),eF=RegExp([ju+"?"+fi+"+"+Qt+"(?="+[Uf,ju,"$"].join("|")+")",zf+"+"+qn+"(?="+[Uf,ju+pe,"$"].join("|")+")",ju+"?"+pe+"+"+Qt,ju+"+"+qn,"\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])","\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",li,KE].join("|"),"g"),tF=RegExp("[\\u200d"+Hu+w0+M0+"]"),ZE=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,nF=["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"],QE=-1,Si={};Si[ha]=Si[Lf]=Si[Qg]=Si[Nf]=Si[Jg]=Si[e_]=Si[zu]=Si[t_]=Si[n_]=!0,Si[ti]=Si[Yn]=Si[Vu]=Si[et]=Si[vd]=Si[pc]=Si[md]=Si[Of]=Si[Bo]=Si[Uu]=Si[ja]=Si[gd]=Si[Uo]=Si[mc]=Si[_d]=!1;var En={};En[ti]=En[Yn]=En[Vu]=En[vd]=En[et]=En[pc]=En[ha]=En[Lf]=En[Qg]=En[Nf]=En[Jg]=En[Bo]=En[Uu]=En[ja]=En[gd]=En[Uo]=En[mc]=En[Ff]=En[e_]=En[zu]=En[t_]=En[n_]=!0,En[md]=En[Of]=En[_d]=!1;var sF={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},ke=parseFloat,oF=parseInt,Kt="object"==typeof global&&global&&global.Object===Object&&global,Gf="object"==typeof self&&self&&self.Object===Object&&self,Cr=Kt||Gf||Function("return this")(),f_=Hs&&!Hs.nodeType&&Hs,qu=f_&&Lo&&!Lo.nodeType&&Lo,p_=qu&&qu.exports===f_,xd=p_&&Kt.process,gs=function(){try{return qu&&qu.require&&qu.require("util").types||xd&&xd.binding&&xd.binding("util")}catch{}}(),m_=gs&&gs.isArrayBuffer,A0=gs&&gs.isDate,Pt=gs&&gs.isMap,$f=gs&&gs.isRegExp,D0=gs&&gs.isSet,Ys=gs&&gs.isTypedArray;function _s(X,ue,oe){switch(oe.length){case 0:return X.call(ue);case 1:return X.call(ue,oe[0]);case 2:return X.call(ue,oe[0],oe[1]);case 3:return X.call(ue,oe[0],oe[1],oe[2])}return X.apply(ue,oe)}function aF(X,ue,oe,Be){for(var $t=-1,Vn=null==X?0:X.length;++$t-1}function Xu(X,ue,oe){for(var Be=-1,$t=null==X?0:X.length;++Be<$t;)if(oe(ue,X[Be]))return!0;return!1}function pi(X,ue){for(var oe=-1,Be=null==X?0:X.length,$t=Array(Be);++oe-1;);return oe}function fa(X,ue){for(var oe=X.length;oe--&&Ot(ue,X[oe],0)>-1;);return oe}var nA=v_({\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"}),ot=v_({"&":"&","<":"<",">":">",'"':""","'":"'"});function eh(X){return"\\"+sF[X]}function Cd(X){return tF.test(X)}function qf(X){var ue=-1,oe=Array(X.size);return X.forEach(function(Be,$t){oe[++ue]=[$t,Be]}),oe}function ve(X,ue){return function(oe){return X(ue(oe))}}function Gi(X,ue){for(var oe=-1,Be=X.length,$t=0,Vn=[];++oe",""":'"',"'":"'"}),ys=function X(ue){var u,oe=(ue=null==ue?Cr:ys.defaults(Cr.Object(),ue,ys.pick(Cr,nF))).Array,Be=ue.Date,$t=ue.Error,Vn=ue.Function,yt=ue.Math,oi=ue.Object,vc=ue.RegExp,I0=ue.String,Sr=ue.TypeError,ir=oe.prototype,Vo=oi.prototype,Xs=ue["__core-js_shared__"],Pl=Vn.prototype.toString,ii=Vo.hasOwnProperty,yi=0,sA=(u=/[^.]+$/.exec(Xs&&Xs.keys&&Xs.keys.IE_PROTO||""))?"Symbol(src)_1."+u:"",Ed=Vo.toString,R0=Pl.call(oi),Kf=Cr._,Zf=vc("^"+Pl.call(ii).replace(s_,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),Za=p_?ue.Buffer:V,Ui=ue.Symbol,x_=ue.Uint8Array,bs=Za?Za.allocUnsafe:V,xs=ve(oi.getPrototypeOf,oi),Qf=oi.create,Ad=Vo.propertyIsEnumerable,yc=ir.splice,_o=Ui?Ui.isConcatSpreadable:V,nh=Ui?Ui.iterator:V,Dd=Ui?Ui.toStringTag:V,Jf=function(){try{var u=Ic(oi,"defineProperty");return u({},"",{}),u}catch{}}(),oA=ue.clearTimeout!==Cr.clearTimeout&&ue.clearTimeout,cF=Be&&Be.now!==Cr.Date.now&&Be.now,dF=ue.setTimeout!==Cr.setTimeout&&ue.setTimeout,w_=yt.ceil,M_=yt.floor,k0=oi.getOwnPropertySymbols,uF=Za?Za.isBuffer:V,aA=ue.isFinite,hF=ir.join,fF=ve(oi.keys,oi),hr=yt.max,Zr=yt.min,pF=Be.now,P0=ue.parseInt,C_=yt.random,mF=ir.reverse,O0=Ic(ue,"DataView"),ep=Ic(ue,"Map"),Qa=Ic(ue,"Promise"),Td=Ic(ue,"Set"),bi=Ic(ue,"WeakMap"),Id=Ic(oi,"create"),tp=bi&&new bi,Rd={},F0=Rc(O0),L0=Rc(ep),lA=Rc(Qa),S_=Rc(Td),cA=Rc(bi),Qr=Ui?Ui.prototype:V,kd=Qr?Qr.valueOf:V,E_=Qr?Qr.toString:V;function I(u){if(Pi(u)&&!rn(u)&&!(u instanceof kn)){if(u instanceof Ei)return u;if(ii.call(u,"__wrapped__"))return ns(u)}return new Ei(u)}var Pd=function(){function u(){}return function(f){if(!wi(f))return{};if(Qf)return Qf(f);u.prototype=f;var _=new u;return u.prototype=V,_}}();function bc(){}function Ei(u,f){this.__wrapped__=u,this.__actions__=[],this.__chain__=!!f,this.__index__=0,this.__values__=V}function kn(u){this.__wrapped__=u,this.__actions__=[],this.__dir__=1,this.__filtered__=!1,this.__iteratees__=[],this.__takeCount__=ua,this.__views__=[]}function xc(u){var f=-1,_=null==u?0:u.length;for(this.clear();++f<_;){var w=u[f];this.set(w[0],w[1])}}function Rt(u){var f=-1,_=null==u?0:u.length;for(this.clear();++f<_;){var w=u[f];this.set(w[0],w[1])}}function pa(u){var f=-1,_=null==u?0:u.length;for(this.clear();++f<_;){var w=u[f];this.set(w[0],w[1])}}function Gt(u){var f=-1,_=null==u?0:u.length;for(this.__data__=new pa;++f<_;)this.add(u[f])}function Jr(u){var f=this.__data__=new Rt(u);this.size=f.size}function I_(u,f){var _=rn(u),w=!_&&Oc(u),S=!_&&!w&&rl(u),P=!_&&!w&&!S&&$o(u),H=_||w||S||P,j=H?qs(u.length,I0):[],Q=j.length;for(var _e in u)(f||ii.call(u,_e))&&(!H||!("length"==_e||S&&("offset"==_e||"parent"==_e)||P&&("buffer"==_e||"byteLength"==_e||"byteOffset"==_e)||il(_e,Q)))&&j.push(_e);return j}function Vr(u){var f=u.length;return f?u[ah(0,f-1)]:V}function Ja(u,f){return Sp(Qs(u),Ll(f,0,u.length))}function z0(u){return Sp(Qs(u))}function Fl(u,f,_){(_!==V&&!Go(u[f],_)||_===V&&!(f in u))&&zo(u,f,_)}function Ks(u,f,_){var w=u[f];(!ii.call(u,f)||!Go(w,_)||_===V&&!(f in u))&&zo(u,f,_)}function ip(u,f){for(var _=u.length;_--;)if(Go(u[_][0],f))return _;return-1}function H0(u,f,_,w){return el(u,function(S,P,H){f(w,S,_(S),H)}),w}function G0(u,f){return u&&ci(f,fr(f),u)}function zo(u,f,_){"__proto__"==f&&Jf?Jf(u,f,{configurable:!0,enumerable:!0,value:_,writable:!0}):u[f]=_}function ih(u,f){for(var _=-1,w=f.length,S=oe(w),P=null==u;++_=f?u:f)),u}function Ms(u,f,_,w,S,P){var H,j=f&Ci,Q=f&ms,_e=f&$s;if(_&&(H=S?_(u,w,S,P):_(u)),H!==V)return H;if(!wi(u))return u;var ye=rn(u);if(ye){if(H=function ux(u){var f=u.length,_=new u.constructor(f);return f&&"string"==typeof u[0]&&ii.call(u,"index")&&(_.index=u.index,_.input=u.input),_}(u),!j)return Qs(u,H)}else{var be=zr(u),Xe=be==Of||be==c0;if(rl(u))return me(u,j);if(be==ja||be==ti||Xe&&!S){if(H=Q||Xe?{}:PA(u),!j)return Q?function uh(u,f){return ci(u,lx(u),f)}(u,function _A(u,f){return u&&ci(f,Ds(f),u)}(H,u)):function H_(u,f){return ci(u,Z_(u),f)}(u,G0(H,u))}else{if(!En[be])return S?u:{};H=function hx(u,f,_){var w=u.constructor;switch(f){case Vu:return ix(u);case et:case pc:return new w(+u);case vd:return function xF(u,f){var _=f?ix(u.buffer):u.buffer;return new u.constructor(_,u.byteOffset,u.byteLength)}(u,_);case ha:case Lf:case Qg:case Nf:case Jg:case e_:case zu:case t_:case n_:return AA(u,_);case Bo:return new w;case Uu:case mc:return new w(u);case gd:return function wF(u){var f=new u.constructor(u.source,b0.exec(u));return f.lastIndex=u.lastIndex,f}(u);case Uo:return new w;case Ff:return function MF(u){return kd?oi(kd.call(u)):{}}(u)}}(u,be,j)}}P||(P=new Jr);var _t=P.get(u);if(_t)return _t;P.set(u,H),tw(u)?u.forEach(function(Vt){H.add(Ms(Vt,f,_,Vt,u,P))}):Tv(u)&&u.forEach(function(Vt,An){H.set(An,Ms(Vt,f,_,An,u,P))});var mn=ye?V:(_e?Q?q_:yp:Q?Ds:fr)(u);return Rn(mn||u,function(Vt,An){mn&&(Vt=u[An=Vt]),Ks(H,An,Ms(Vt,f,_,An,u,P))}),H}function R_(u,f,_){var w=_.length;if(null==u)return!w;for(u=oi(u);w--;){var S=_[w],H=u[S];if(H===V&&!(S in u)||!(0,f[S])(H))return!1}return!0}function rp(u,f,_){if("function"!=typeof u)throw new Sr(Un);return mh(function(){u.apply(V,_)},f)}function Fd(u,f,_,w){var S=-1,P=Rl,H=!0,j=u.length,Q=[],_e=f.length;if(!j)return Q;_&&(f=pi(f,Br(_))),w?(P=Xu,H=!1):f.length>=Kr&&(P=_c,H=!1,f=new Gt(f));e:for(;++S-1},Rt.prototype.set=function fA(u,f){var _=this.__data__,w=ip(_,u);return w<0?(++this.size,_.push([u,f])):_[w][1]=f,this},pa.prototype.clear=function pA(){this.size=0,this.__data__={hash:new xc,map:new(ep||Rt),string:new xc}},pa.prototype.delete=function mA(u){var f=K_(this,u).delete(u);return this.size-=f?1:0,f},pa.prototype.get=function Se(u){return K_(this,u).get(u)},pa.prototype.has=function zn(u){return K_(this,u).has(u)},pa.prototype.set=function cn(u,f){var _=K_(this,u),w=_.size;return _.set(u,f),this.size+=_.size==w?0:1,this},Gt.prototype.add=Gt.prototype.push=function Er(u){return this.__data__.set(u,Ha),this},Gt.prototype.has=function V0(u){return this.__data__.has(u)},Jr.prototype.clear=function ma(){this.__data__=new Rt,this.size=0},Jr.prototype.delete=function D_(u){var f=this.__data__,_=f.delete(u);return this.size=f.size,_},Jr.prototype.get=function T_(u){return this.__data__.get(u)},Jr.prototype.has=function gA(u){return this.__data__.has(u)},Jr.prototype.set=function _F(u,f){var _=this.__data__;if(_ instanceof Rt){var w=_.__data__;if(!ep||w.length0&&_(j)?f>1?Xn(j,f-1,_,w,S):kl(S,j):w||(S[S.length]=j)}return S}var tl=G_(),Ai=G_(!0);function ki(u,f){return u&&tl(u,f,fr)}function P_(u,f){return u&&Ai(u,f,fr)}function ga(u,f){return gc(f,function(_){return zl(u[_])})}function wc(u,f){for(var _=0,w=(f=ba(f,u)).length;null!=u&&_f}function sp(u,f){return null!=u&&ii.call(u,f)}function op(u,f){return null!=u&&f in oi(u)}function ap(u,f,_){for(var w=_?Xu:Rl,S=u[0].length,P=u.length,H=P,j=oe(P),Q=1/0,_e=[];H--;){var ye=u[H];H&&f&&(ye=pi(ye,Br(f))),Q=Zr(ye.length,Q),j[H]=!_&&(f||S>=120&&ye.length>=120)?new Gt(H&&ye):V}ye=u[0];var be=-1,Xe=j[0];e:for(;++be=j?Q:Q*("desc"==_[w]?-1:1)}return u.index-f.index}(P,H,_)})}function Z0(u,f,_){for(var w=-1,S=f.length,P={};++w-1;)j!==u&&yc.call(j,Q,1),yc.call(u,Q,1);return u}function oh(u,f){for(var _=u?f.length:0,w=_-1;_--;){var S=f[_];if(_==w||S!==P){var P=S;il(S)?yc.call(u,S,1):ch(u,S)}}return u}function ah(u,f){return u+M_(C_()*(f-u+1))}function lh(u,f){var _="";if(!u||f<1||f>Wa)return _;do{f%2&&(_+=u),(f=M_(f/2))&&(u+=u)}while(f);return _}function pn(u,f){return Mp(J_(u,f,is),u+"")}function SA(u){return Vr(Nc(u))}function J0(u,f){var _=Nc(u);return Sp(_,Ll(f,0,_.length))}function Vd(u,f,_,w){if(!wi(u))return u;for(var S=-1,P=(f=ba(f,u)).length,H=P-1,j=u;null!=j&&++SS?0:S+f),(_=_>S?S:_)<0&&(_+=S),S=f>_?0:_-f>>>0,f>>>=0;for(var P=oe(S);++w>>1,H=u[P];null!==H&&!As(H)&&(_?H<=f:H=Kr){var _e=f?null:j_(u);if(_e)return Hn(_e);H=!1,S=_c,Q=new Gt}else Q=f?[]:j;e:for(;++w=w?u:ts(u,f,_)}var nx=oA||function(u){return Cr.clearTimeout(u)};function me(u,f){if(f)return u.slice();var _=u.length,w=bs?bs(_):new u.constructor(_);return u.copy(w),w}function ix(u){var f=new u.constructor(u.byteLength);return new x_(f).set(new x_(u)),f}function AA(u,f){var _=f?ix(u.buffer):u.buffer;return new u.constructor(_,u.byteOffset,u.length)}function DA(u,f){if(u!==f){var _=u!==V,w=null===u,S=u==u,P=As(u),H=f!==V,j=null===f,Q=f==f,_e=As(f);if(!j&&!_e&&!P&&u>f||P&&H&&Q&&!j&&!_e||w&&H&&Q||!_&&Q||!S)return 1;if(!w&&!P&&!_e&&u1?_[S-1]:V,H=S>2?_[2]:V;for(P=u.length>3&&"function"==typeof P?(S--,P):V,H&&Dr(_[0],_[1],H)&&(P=S<3?V:P,S=1),f=oi(f);++w-1?S[P?f[H]:H]:V}}function Cs(u){return yo(function(f){var _=f.length,w=_,S=Ei.prototype.thru;for(u&&f.reverse();w--;){var P=f[w];if("function"!=typeof P)throw new Sr(Un);if(S&&!H&&"wrapper"==nl(P))var H=new Ei([],!0)}for(w=H?w:_;++w<_;){var j=nl(P=f[w]),Q="wrapper"==j?X_(P):V;H=Q&&ph(Q[0])&&Q[1]==(Ga|la|ca|da)&&!Q[4].length&&1==Q[9]?H[nl(Q[0])].apply(H,Q[3]):1==P.length&&ph(P)?H[j]():H.thru(P)}return function(){var _e=arguments,ye=_e[0];if(H&&1==_e.length&&rn(ye))return H.plant(ye).value();for(var be=0,Xe=_?f[be].apply(this,_e):ye;++be<_;)Xe=f[be].call(this,Xe);return Xe}})}function Wd(u,f,_,w,S,P,H,j,Q,_e){var ye=f&Ga,be=f&On,Xe=f&dr,_t=f&(la|Dl),Ut=f&pd,mn=Xe?V:mp(u);return function Vt(){for(var An=arguments.length,Ln=oe(An),rs=An;rs--;)Ln[rs]=arguments[rs];if(_t)var ss=wa(Vt),io=function Ju(X,ue){for(var oe=X.length,Be=0;oe--;)X[oe]===ue&&++Be;return Be}(Ln,ss);if(w&&(Ln=Hd(Ln,w,S,_t)),P&&(Ln=TA(Ln,P,H,_t)),An-=io,_t&&An<_e){var Di=Gi(Ln,ss);return sx(u,f,Wd,Vt.placeholder,_,Ln,Di,j,Q,_e-An)}var Ts=be?_:this,wo=Xe?Ts[u]:u;return An=Ln.length,j?Ln=function Es(u,f){for(var _=u.length,w=Zr(f.length,_),S=Qs(u);w--;){var P=f[w];u[w]=il(P,_)?S[P]:V}return u}(Ln,j):Ut&&An>1&&Ln.reverse(),ye&&Qj))return!1;var _e=P.get(u),ye=P.get(f);if(_e&&ye)return _e==f&&ye==u;var be=-1,Xe=!0,_t=_&No?new Gt:V;for(P.set(u,f),P.set(f,u);++be-1&&u%1==0&&u1?"& ":"")+f[w],f=f.join(_>2?", ":" "),u.replace(v0,"{\n/* [wrapped with "+f+"] */\n")}(w,function BA(u,f){return Rn(l0,function(_){var w="_."+_[0];f&_[1]&&!Rl(u,w)&&u.push(w)}),u.sort()}(function cx(u){var f=u.match(wr);return f?f[1].split(LE):[]}(w),_)))}function _x(u){var f=0,_=0;return function(){var w=pF(),S=Kg-(w-_);if(_=w,S>0){if(++f>=ME)return arguments[0]}else f=0;return u.apply(V,arguments)}}function Sp(u,f){var _=-1,w=u.length,S=w-1;for(f=f===V?w:f;++_1?u[f-1]:V;return _="function"==typeof _?(u.pop(),_):V,vh(u,_)});function Vx(u){var f=I(u);return f.__chain__=!0,f}function Ip(u,f){return f(u)}var zx=yo(function(u){var f=u.length,_=f?u[0]:0,w=this.__wrapped__,S=function(P){return ih(P,u)};return!(f>1||this.__actions__.length)&&w instanceof kn&&il(_)?((w=w.slice(_,+_+(f?1:0))).__actions__.push({func:Ip,args:[S],thisArg:V}),new Ei(w,this.__chain__).thru(function(P){return f&&!P.length&&P.push(V),P})):this.thru(S)}),rD=fp(function(u,f,_){ii.call(u,_)?++u[_]:zo(u,_,1)}),Gx=RA(Cx),kp=RA(rv);function bv(u,f){return(rn(u)?Rn:el)(u,Ft(f,3))}function Vl(u,f){return(rn(u)?lF:k_)(u,Ft(f,3))}var oD=fp(function(u,f,_){ii.call(u,_)?u[_].push(f):zo(u,_,[f])}),lD=pn(function(u,f,_){var w=-1,S="function"==typeof f,P=eo(u)?oe(u.length):[];return el(u,function(H){P[++w]=S?_s(f,H,_):_a(H,f,_)}),P}),cD=fp(function(u,f,_){zo(u,_,f)});function Pp(u,f){return(rn(u)?pi:rh)(u,Ft(f,3))}var Ma=fp(function(u,f,_){u[_?0:1].push(f)},function(){return[[],[]]}),_D=pn(function(u,f){if(null==u)return[];var _=f.length;return _>1&&Dr(u,f[0],f[1])?f=[]:_>2&&Dr(f[0],f[1],f[2])&&(f=[f[0]]),B_(u,Xn(f,1),[])}),Op=cF||function(){return Cr.Date.now()};function bh(u,f,_){return f=_?V:f,vo(u,Ga,V,V,V,V,f=u&&null==f?u.length:f)}function Ca(u,f){var _;if("function"!=typeof f)throw new Sr(Un);return u=dn(u),function(){return--u>0&&(_=f.apply(this,arguments)),u<=1&&(f=V),_}}var Pc=pn(function(u,f,_){var w=On;if(_.length){var S=Gi(_,wa(Pc));w|=ca}return vo(u,w,f,_,S)}),xv=pn(function(u,f,_){var w=On|dr;if(_.length){var S=Gi(_,wa(xv));w|=ca}return vo(f,w,u,_,S)});function yD(u,f,_){var w,S,P,H,j,Q,_e=0,ye=!1,be=!1,Xe=!0;if("function"!=typeof u)throw new Sr(Un);function _t(Di){var Ts=w,wo=S;return w=S=V,_e=Di,H=u.apply(wo,Ts)}function Vt(Di){var Ts=Di-Q;return Q===V||Ts>=f||Ts<0||be&&Di-_e>=P}function An(){var Di=Op();if(Vt(Di))return Ln(Di);j=mh(An,function mn(Di){var I1=f-(Di-Q);return be?Zr(I1,P-(Di-_e)):I1}(Di))}function Ln(Di){return j=V,Xe&&w?_t(Di):(w=S=V,H)}function io(){var Di=Op(),Ts=Vt(Di);if(w=arguments,S=this,Q=Di,Ts){if(j===V)return function Ut(Di){return _e=Di,j=mh(An,f),ye?_t(Di):H}(Q);if(be)return nx(j),j=mh(An,f),_t(Q)}return j===V&&(j=mh(An,f)),H}return f=bo(f)||0,wi(_)&&(ye=!!_.leading,P=(be="maxWait"in _)?hr(bo(_.maxWait)||0,f):P,Xe="trailing"in _?!!_.trailing:Xe),io.cancel=function rs(){j!==V&&nx(j),_e=0,w=Q=S=j=V},io.flush=function ss(){return j===V?H:Ln(Op())},io}var kF=pn(function(u,f){return rp(u,1,f)}),PF=pn(function(u,f,_){return rp(u,bo(f)||0,_)});function Yd(u,f){if("function"!=typeof u||null!=f&&"function"!=typeof f)throw new Sr(Un);var _=function(){var w=arguments,S=f?f.apply(this,w):w[0],P=_.cache;if(P.has(S))return P.get(S);var H=u.apply(this,w);return _.cache=P.set(S,H)||P,H};return _.cache=new(Yd.Cache||pa),_}function Sv(u){if("function"!=typeof u)throw new Sr(Un);return function(){var f=arguments;switch(f.length){case 0:return!u.call(this);case 1:return!u.call(this,f[0]);case 2:return!u.call(this,f[0],f[1]);case 3:return!u.call(this,f[0],f[1],f[2])}return!u.apply(this,f)}}Yd.Cache=pa;var Yx=zd(function(u,f){var _=(f=1==f.length&&rn(f[0])?pi(f[0],Br(Ft())):pi(Xn(f,1),Br(Ft()))).length;return pn(function(w){for(var S=-1,P=Zr(w.length,_);++S=f}),Oc=Bd(function(){return arguments}())?Bd:function(u){return Pi(u)&&ii.call(u,"callee")&&!Ad.call(u,"callee")},rn=oe.isArray,FF=m_?Br(m_):function xA(u){return Pi(u)&&es(u)==Vu};function eo(u){return null!=u&&Vp(u.length)&&!zl(u)}function xi(u){return Pi(u)&&eo(u)}var rl=uF||Qd,Qx=A0?Br(A0):function vF(u){return Pi(u)&&es(u)==pc};function Bp(u){if(!Pi(u))return!1;var f=es(u);return f==md||f==AE||"string"==typeof u.message&&"string"==typeof u.name&&!to(u)}function zl(u){if(!wi(u))return!1;var f=es(u);return f==Of||f==c0||f==EE||f==TE}function Up(u){return"number"==typeof u&&u==dn(u)}function Vp(u){return"number"==typeof u&&u>-1&&u%1==0&&u<=Wa}function wi(u){var f=typeof u;return null!=u&&("object"==f||"function"==f)}function Pi(u){return null!=u&&"object"==typeof u}var Tv=Pt?Br(Pt):function wA(u){return Pi(u)&&zr(u)==Bo};function xh(u){return"number"==typeof u||Pi(u)&&es(u)==Uu}function to(u){if(!Pi(u)||es(u)!=ja)return!1;var f=xs(u);if(null===f)return!0;var _=ii.call(f,"constructor")&&f.constructor;return"function"==typeof _&&_ instanceof _&&Pl.call(_)==R0}var Hp=$f?Br($f):function bF(u){return Pi(u)&&es(u)==gd},tw=D0?Br(D0):function L_(u){return Pi(u)&&zr(u)==Uo};function Gp(u){return"string"==typeof u||!rn(u)&&Pi(u)&&es(u)==mc}function As(u){return"symbol"==typeof u||Pi(u)&&es(u)==Ff}var $o=Ys?Br(Ys):function Y0(u){return Pi(u)&&Vp(u.length)&&!!Si[es(u)]},Pv=vp(lp),PD=vp(function(u,f){return u<=f});function Ov(u){if(!u)return[];if(eo(u))return Gp(u)?go(u):Qs(u);if(nh&&u[nh])return function rA(X){for(var ue,oe=[];!(ue=X.next()).done;)oe.push(ue.value);return oe}(u[nh]());var f=zr(u);return(f==Bo?qf:f==Uo?Hn:Nc)(u)}function sl(u){return u?(u=bo(u))===In||u===-In?(u<0?-1:1)*SE:u==u?u:0:0===u?u:0}function dn(u){var f=sl(u),_=f%1;return f==f?_?f-_:f:0}function OD(u){return u?Ll(dn(u),0,ua):0}function bo(u){if("number"==typeof u)return u;if(As(u))return Pf;if(wi(u)){var f="function"==typeof u.valueOf?u.valueOf():u;u=wi(f)?f+"":f}if("string"!=typeof u)return 0===u?u:+u;u=$n(u);var _=Ya.test(u);return _||nr.test(u)?oF(u.slice(2),_?2:8):VE.test(u)?Pf:+u}function Hl(u){return ci(u,Ds(u))}function Fn(u){return null==u?"":Zs(u)}var mt=Ar(function(u,f){if(wp(f)||eo(f))ci(f,fr(f),u);else for(var _ in f)ii.call(f,_)&&Ks(u,_,f[_])}),nw=Ar(function(u,f){ci(f,Ds(f),u)}),Gl=Ar(function(u,f,_,w){ci(f,Ds(f),u,w)}),ol=Ar(function(u,f,_,w){ci(f,fr(f),u,w)}),LD=yo(ih),Lc=pn(function(u,f){u=oi(u);var _=-1,w=f.length,S=w>2?f[2]:V;for(S&&Dr(f[0],f[1],S)&&(w=1);++_1),P}),ci(u,q_(u),_),w&&(_=Ms(_,Ci|ms|$s,xa));for(var S=f.length;S--;)ch(_,f[S]);return _}),jD=yo(function(u,f){return null==u?{}:function K0(u,f){return Z0(u,f,function(_,w){return Uv(u,w)})}(u,f)});function Vv(u,f){if(null==u)return{};var _=pi(q_(u),function(w){return[w]});return f=Ft(f),Z0(u,_,function(w,S){return f(w,S[0])})}var ow=hh(fr),zv=hh(Ds);function Nc(u){return null==u?[]:Qu(u,fr(u))}var G=$d(function(u,f,_){return f=f.toLowerCase(),u+(_?Hv(f):f)});function Hv(u){return Kd(Fn(u).toLowerCase())}function Gv(u){return(u=Fn(u))&&u.replace(po,nA).replace(JO,"")}var s1=$d(function(u,f,_){return u+(_?"-":"")+f.toLowerCase()}),lw=$d(function(u,f,_){return u+(_?" ":"")+f.toLowerCase()}),o1=Gd("toLowerCase"),$v=$d(function(u,f,_){return u+(_?"_":"")+f.toLowerCase()}),c1=$d(function(u,f,_){return u+(_?" ":"")+Kd(f)}),hw=$d(function(u,f,_){return u+(_?" ":"")+f.toUpperCase()}),Kd=Gd("toUpperCase");function fw(u,f,_){return u=Fn(u),(f=_?V:f)===V?function nn(X){return ZE.test(X)}(u)?function fn(X){return X.match(eF)||[]}(u):function tA(X){return X.match(NE)||[]}(u):u.match(f)||[]}var jv=pn(function(u,f){try{return _s(u,V,f)}catch(_){return Bp(_)?_:new $t(_)}}),f1=yo(function(u,f){return Rn(f,function(_){_=Ho(_),zo(u,_,Pc(u[_],u))}),u});function Yv(u){return function(){return u}}var pw=Cs(),_1=Cs(!0);function is(u){return u}function $p(u){return N_("function"==typeof u?u:Ms(u,Ci))}var Xv=pn(function(u,f){return function(_){return _a(_,u,f)}}),v1=pn(function(u,f){return function(_){return _a(u,_,f)}});function mw(u,f,_){var w=fr(f),S=ga(f,w);null==_&&(!wi(f)||!S.length&&w.length)&&(_=f,f=u,u=this,S=ga(f,fr(f)));var P=!(wi(_)&&"chain"in _&&!_.chain),H=zl(u);return Rn(S,function(j){var Q=f[j];u[j]=Q,H&&(u.prototype[j]=function(){var _e=this.__chain__;if(P||_e){var ye=u(this.__wrapped__);return(ye.__actions__=Qs(this.__actions__)).push({func:Q,args:arguments,thisArg:u}),ye.__chain__=_e,ye}return Q.apply(u,kl([this.value()],arguments))})}),u}function xo(){}var gw=gp(pi),b1=gp(JE),x1=gp(Wf);function wh(u){return fx(u)?__(Ho(u)):function va(u){return function(f){return wc(f,u)}}(u)}var Kv=rx(),Mh=rx(!0);function Ch(){return[]}function Qd(){return!1}var w1=$_(function(u,f){return u+f},0),M1=W_("ceil"),yw=$_(function(u,f){return u/f},1),C1=W_("floor"),D1=$_(function(u,f){return u*f},1),WF=W_("round"),ty=$_(function(u,f){return u-f},0);return I.after=function vD(u,f){if("function"!=typeof f)throw new Sr(Un);return u=dn(u),function(){if(--u<1)return f.apply(this,arguments)}},I.ary=bh,I.assign=mt,I.assignIn=nw,I.assignInWith=Gl,I.assignWith=ol,I.at=LD,I.before=Ca,I.bind=Pc,I.bindAll=f1,I.bindKey=xv,I.castArray=function wD(){if(!arguments.length)return[];var u=arguments[0];return rn(u)?u:[u]},I.chain=Vx,I.chunk=function nv(u,f,_){f=(_?Dr(u,f,_):f===V)?1:hr(dn(f),0);var w=null==u?0:u.length;if(!w||f<1)return[];for(var S=0,P=0,H=oe(w_(w/f));SS?0:S+_),(w=w===V||w>S?S:dn(w))<0&&(w+=S),w=_>w?0:OD(w);_>>0)?(u=Fn(u))&&("string"==typeof f||null!=f&&!Hp(f))&&!(f=Zs(f))&&Cd(u)?Dc(go(u),0,_):u.split(f,_):[]},I.spread=function Xx(u,f){if("function"!=typeof u)throw new Sr(Un);return f=null==f?0:hr(dn(f),0),pn(function(_){var w=_[f],S=Dc(_,0,f);return w&&kl(S,w),_s(u,this,S)})},I.tail=function kc(u){var f=null==u?0:u.length;return f?ts(u,1,f):[]},I.take=function Px(u,f,_){return u&&u.length?ts(u,0,(f=_||f===V?1:dn(f))<0?0:f):[]},I.takeRight=function Ox(u,f,_){var w=null==u?0:u.length;return w?ts(u,(f=w-(f=_||f===V?1:dn(f)))<0?0:f,w):[]},I.takeRightWhile=function QA(u,f){return u&&u.length?dh(u,Ft(f,3),!1,!0):[]},I.takeWhile=function IF(u,f){return u&&u.length?dh(u,Ft(f,3)):[]},I.tap=function tD(u,f){return f(u),u},I.throttle=function Fp(u,f,_){var w=!0,S=!0;if("function"!=typeof u)throw new Sr(Un);return wi(_)&&(w="leading"in _?!!_.leading:w,S="trailing"in _?!!_.trailing:S),yD(u,f,{leading:w,maxWait:f,trailing:S})},I.thru=Ip,I.toArray=Ov,I.toPairs=ow,I.toPairsIn=zv,I.toPath=function vw(u){return rn(u)?pi(u,Ho):As(u)?[u]:Qs(vx(Fn(u)))},I.toPlainObject=Hl,I.transform=function XD(u,f,_){var w=rn(u),S=w||rl(u)||$o(u);if(f=Ft(f,4),null==_){var P=u&&u.constructor;_=S?w?new P:[]:wi(u)&&zl(P)?Pd(xs(u)):{}}return(S?Rn:ki)(u,function(H,j,Q){return f(_,H,j,Q)}),_},I.unary=function Kx(u){return bh(u,1)},I.union=Ap,I.unionBy=JA,I.unionWith=Fx,I.uniq=function Lx(u){return u&&u.length?ri(u):[]},I.uniqBy=function Nx(u,f){return u&&u.length?ri(u,Ft(f,2)):[]},I.uniqWith=function fv(u,f){return f="function"==typeof f?f:V,u&&u.length?ri(u,V,f):[]},I.unset=function KD(u,f){return null==u||ch(u,f)},I.unzip=Dp,I.unzipWith=vh,I.update=function ZD(u,f,_){return null==u?u:tx(u,f,hp(_))},I.updateWith=function QD(u,f,_,w){return w="function"==typeof w?w:V,null==u?u:tx(u,f,hp(_),w)},I.values=Nc,I.valuesIn=function JD(u){return null==u?[]:Qu(u,Ds(u))},I.without=Tp,I.words=fw,I.wrap=function Av(u,f){return Ev(hp(f),u)},I.xor=Bx,I.xorBy=pv,I.xorWith=mv,I.zip=gv,I.zipObject=function yh(u,f){return Ac(u||[],f||[],Ks)},I.zipObjectDeep=function eD(u,f){return Ac(u||[],f||[],Vd)},I.zipWith=Ux,I.entries=ow,I.entriesIn=zv,I.extend=nw,I.extendWith=Gl,mw(I,I),I.add=w1,I.attempt=jv,I.camelCase=G,I.capitalize=Hv,I.ceil=M1,I.clamp=function e1(u,f,_){return _===V&&(_=f,f=V),_!==V&&(_=(_=bo(_))==_?_:0),f!==V&&(f=(f=bo(f))==f?f:0),Ll(bo(u),f,_)},I.clone=function Kn(u){return Ms(u,$s)},I.cloneDeep=function CD(u){return Ms(u,Ci|$s)},I.cloneDeepWith=function Lp(u,f){return Ms(u,Ci|$s,f="function"==typeof f?f:V)},I.cloneWith=function MD(u,f){return Ms(u,$s,f="function"==typeof f?f:V)},I.conformsTo=function Zx(u,f){return null==f||R_(u,f,fr(f))},I.deburr=Gv,I.defaultTo=function g1(u,f){return null==u||u!=u?f:u},I.divide=yw,I.endsWith=function n1(u,f,_){u=Fn(u),f=Zs(f);var w=u.length,S=_=_===V?w:Ll(dn(_),0,w);return(_-=f.length)>=0&&u.slice(_,S)==f},I.eq=Go,I.escape=function r1(u){return(u=Fn(u))&&FE.test(u)?u.replace(h0,ot):u},I.escapeRegExp=function aw(u){return(u=Fn(u))&&g0.test(u)?u.replace(s_,"\\$&"):u},I.every=function vv(u,f,_){var w=rn(u)?JE:$0;return _&&Dr(u,f,_)&&(f=V),w(u,Ft(f,3))},I.find=Gx,I.findIndex=Cx,I.findKey=function Fv(u,f){return ee(u,Ft(f,3),ki)},I.findLast=kp,I.findLastIndex=rv,I.findLastKey=function Lv(u,f){return ee(u,Ft(f,3),P_)},I.floor=C1,I.forEach=bv,I.forEachRight=Vl,I.forIn=function UD(u,f){return null==u?u:tl(u,Ft(f,3),Ds)},I.forInRight=function Nv(u,f){return null==u?u:Ai(u,Ft(f,3),Ds)},I.forOwn=function al(u,f){return u&&ki(u,Ft(f,3))},I.forOwnRight=function VD(u,f){return u&&P_(u,Ft(f,3))},I.get=Bv,I.gt=SD,I.gte=ED,I.has=function GD(u,f){return null!=u&&dx(u,f,sp)},I.hasIn=Uv,I.head=Ex,I.identity=is,I.includes=function aD(u,f,_,w){u=eo(u)?u:Nc(u),_=_&&!w?dn(_):0;var S=u.length;return _<0&&(_=hr(S+_,0)),Gp(u)?_<=S&&u.indexOf(f,_)>-1:!!S&&Ot(u,f,_)>-1},I.indexOf=function _h(u,f,_){var w=null==u?0:u.length;if(!w)return-1;var S=null==_?0:dn(_);return S<0&&(S=hr(w+S,0)),Ot(u,f,S)},I.inRange=function t1(u,f,_){return f=sl(f),_===V?(_=f,f=0):_=sl(_),function O_(u,f,_){return u>=Zr(f,_)&&u=-Wa&&u<=Wa},I.isSet=tw,I.isString=Gp,I.isSymbol=As,I.isTypedArray=$o,I.isUndefined=function ID(u){return u===V},I.isWeakMap=function RD(u){return Pi(u)&&zr(u)==_d},I.isWeakSet=function kD(u){return Pi(u)&&"[object WeakSet]"==es(u)},I.join=function Ax(u,f){return null==u?"":hF.call(u,f)},I.kebabCase=s1,I.last=Tr,I.lastIndexOf=function cv(u,f,_){var w=null==u?0:u.length;if(!w)return-1;var S=w;return _!==V&&(S=(S=dn(_))<0?hr(w+S,0):Zr(S,w-1)),f==f?function Sd(X,ue,oe){for(var Be=oe+1;Be--;)if(X[Be]===ue)return Be;return Be}(u,f,S):Zu(u,Yf,S,!0)},I.lowerCase=lw,I.lowerFirst=o1,I.lt=Pv,I.lte=PD,I.max=function bw(u){return u&&u.length?Ld(u,is,Nd):V},I.maxBy=function xw(u,f){return u&&u.length?Ld(u,Ft(f,2),Nd):V},I.mean=function S1(u){return Md(u,is)},I.meanBy=function E1(u,f){return Md(u,Ft(f,2))},I.min=function no(u){return u&&u.length?Ld(u,is,lp):V},I.minBy=function A1(u,f){return u&&u.length?Ld(u,Ft(f,2),lp):V},I.stubArray=Ch,I.stubFalse=Qd,I.stubObject=function _w(){return{}},I.stubString=function Zv(){return""},I.stubTrue=function Qv(){return!0},I.multiply=D1,I.nth=function Dx(u,f){return u&&u.length?CA(u,dn(f)):V},I.noConflict=function E(){return Cr._===this&&(Cr._=Kf),this},I.noop=xo,I.now=Op,I.pad=function a1(u,f,_){u=Fn(u);var w=(f=dn(f))?ur(u):0;if(!f||w>=f)return u;var S=(f-w)/2;return _p(M_(S),_)+u+_p(w_(S),_)},I.padEnd=function UF(u,f,_){u=Fn(u);var w=(f=dn(f))?ur(u):0;return f&&wf){var w=u;u=f,f=w}if(_||u%1||f%1){var S=C_();return Zr(u+S*(f-u+ke("1e-"+((S+"").length-1))),f)}return ah(u,f)},I.reduce=function dD(u,f,_){var w=rn(u)?g_:T0,S=arguments.length<3;return w(u,Ft(f,4),_,S,el)},I.reduceRight=function uD(u,f,_){var w=rn(u)?eA:T0,S=arguments.length<3;return w(u,Ft(f,4),_,S,k_)},I.repeat=function $i(u,f,_){return f=(_?Dr(u,f,_):f===V)?1:dn(f),lh(Fn(u),f)},I.replace=function l1(){var u=arguments,f=Fn(u[0]);return u.length<3?f:f.replace(u[1],u[2])},I.result=function YD(u,f,_){var w=-1,S=(f=ba(f,u)).length;for(S||(S=1,u=V);++wWa)return[];var _=ua,w=Zr(u,ua);f=Ft(f),u-=ua;for(var S=qs(w,f);++_=P)return u;var j=_-ur(w);if(j<1)return w;var Q=H?Dc(H,0,j).join(""):u.slice(0,j);if(S===V)return Q+w;if(H&&(j+=Q.length-j),Hp(S)){if(u.slice(j).search(S)){var _e,ye=Q;for(S.global||(S=vc(S.source,Fn(b0.exec(S))+"g")),S.lastIndex=0;_e=S.exec(ye);)var be=_e.index;Q=Q.slice(0,be===V?j:be)}}else if(u.indexOf(Zs(S),j)!=j){var Xe=Q.lastIndexOf(S);Xe>-1&&(Q=Q.slice(0,Xe))}return Q+w},I.unescape=function h1(u){return(u=Fn(u))&&OE.test(u)?u.replace(u0,Xf):u},I.uniqueId=function ey(u){var f=++yi;return Fn(u)+f},I.upperCase=hw,I.upperFirst=Kd,I.each=bv,I.eachRight=Vl,I.first=Ex,mw(I,function(){var u={};return ki(I,function(f,_){ii.call(I.prototype,_)||(u[_]=f)}),u}(),{chain:!1}),I.VERSION="4.17.21",Rn(["bind","bindKey","curry","curryRight","partial","partialRight"],function(u){I[u].placeholder=I}),Rn(["drop","take"],function(u,f){kn.prototype[u]=function(_){_=_===V?1:hr(dn(_),0);var w=this.__filtered__&&!f?new kn(this):this.clone();return w.__filtered__?w.__takeCount__=Zr(_,w.__takeCount__):w.__views__.push({size:Zr(_,ua),type:u+(w.__dir__<0?"Right":"")}),w},kn.prototype[u+"Right"]=function(_){return this.reverse()[u](_).reverse()}}),Rn(["filter","map","takeWhile"],function(u,f){var _=f+1,w=1==_||3==_;kn.prototype[u]=function(S){var P=this.clone();return P.__iteratees__.push({iteratee:Ft(S,3),type:_}),P.__filtered__=P.__filtered__||w,P}}),Rn(["head","last"],function(u,f){var _="take"+(f?"Right":"");kn.prototype[u]=function(){return this[_](1).value()[0]}}),Rn(["initial","tail"],function(u,f){var _="drop"+(f?"":"Right");kn.prototype[u]=function(){return this.__filtered__?new kn(this):this[_](1)}}),kn.prototype.compact=function(){return this.filter(is)},kn.prototype.find=function(u){return this.filter(u).head()},kn.prototype.findLast=function(u){return this.reverse().find(u)},kn.prototype.invokeMap=pn(function(u,f){return"function"==typeof u?new kn(this):this.map(function(_){return _a(_,u,f)})}),kn.prototype.reject=function(u){return this.filter(Sv(Ft(u)))},kn.prototype.slice=function(u,f){u=dn(u);var _=this;return _.__filtered__&&(u>0||f<0)?new kn(_):(u<0?_=_.takeRight(-u):u&&(_=_.drop(u)),f!==V&&(_=(f=dn(f))<0?_.dropRight(-f):_.take(f-u)),_)},kn.prototype.takeRightWhile=function(u){return this.reverse().takeWhile(u).reverse()},kn.prototype.toArray=function(){return this.take(ua)},ki(kn.prototype,function(u,f){var _=/^(?:filter|find|map|reject)|While$/.test(f),w=/^(?:head|last)$/.test(f),S=I[w?"take"+("last"==f?"Right":""):f],P=w||/^find/.test(f);S&&(I.prototype[f]=function(){var H=this.__wrapped__,j=w?[1]:arguments,Q=H instanceof kn,_e=j[0],ye=Q||rn(H),be=function(An){var Ln=S.apply(I,kl([An],j));return w&&Xe?Ln[0]:Ln};ye&&_&&"function"==typeof _e&&1!=_e.length&&(Q=ye=!1);var Xe=this.__chain__,Ut=P&&!Xe,mn=Q&&!this.__actions__.length;if(!P&&ye){H=mn?H:new kn(this);var Vt=u.apply(H,j);return Vt.__actions__.push({func:Ip,args:[be],thisArg:V}),new Ei(Vt,Xe)}return Ut&&mn?u.apply(this,j):(Vt=this.thru(be),Ut?w?Vt.value()[0]:Vt.value():Vt)})}),Rn(["pop","push","shift","sort","splice","unshift"],function(u){var f=ir[u],_=/^(?:push|sort|unshift)$/.test(u)?"tap":"thru",w=/^(?:pop|shift)$/.test(u);I.prototype[u]=function(){var S=arguments;if(w&&!this.__chain__){var P=this.value();return f.apply(rn(P)?P:[],S)}return this[_](function(H){return f.apply(rn(H)?H:[],S)})}}),ki(kn.prototype,function(u,f){var _=I[f];if(_){var w=_.name+"";ii.call(Rd,w)||(Rd[w]=[]),Rd[w].push({name:f,func:_})}}),Rd[Wd(V,dr).name]=[{name:"wrapper",func:V}],kn.prototype.clone=function N0(){var u=new kn(this.__wrapped__);return u.__actions__=Qs(this.__actions__),u.__dir__=this.__dir__,u.__filtered__=this.__filtered__,u.__iteratees__=Qs(this.__iteratees__),u.__takeCount__=this.__takeCount__,u.__views__=Qs(this.__views__),u},kn.prototype.reverse=function Od(){if(this.__filtered__){var u=new kn(this);u.__dir__=-1,u.__filtered__=!0}else(u=this.clone()).__dir__*=-1;return u},kn.prototype.value=function ws(){var u=this.__wrapped__.value(),f=this.__dir__,_=rn(u),w=f<0,S=_?u.length:0,P=function xp(u,f,_){for(var w=-1,S=_.length;++w=this.__values__.length;return{done:u,value:u?V:this.__values__[this.__index__++]}},I.prototype.plant=function nD(u){for(var f,_=this;_ instanceof bc;){var w=ns(_);w.__index__=0,w.__values__=V,f?S.__wrapped__=w:f=w;var S=w;_=_.__wrapped__}return S.__wrapped__=u,f},I.prototype.reverse=function iD(){var u=this.__wrapped__;if(u instanceof kn){var f=u;return this.__actions__.length&&(f=new kn(this)),(f=f.reverse()).__actions__.push({func:Ip,args:[dv],thisArg:V}),new Ei(f,this.__chain__)}return this.thru(dv)},I.prototype.toJSON=I.prototype.valueOf=I.prototype.value=function RF(){return ya(this.__wrapped__,this.__actions__)},I.prototype.first=I.prototype.head,nh&&(I.prototype[nh]=function jd(){return this}),I}();Cr._=ys,(ln=function(){return ys}.call(Hs,ps,Hs,Lo))!==V&&(Lo.exports=ln)}.call(this)},738:function(Lo){var Hs;Lo.exports=((Hs=function(){function ps(Mi){return Nr.appendChild(Mi.dom),Mi}function ln(Mi){for(var Ci=0;CiZt+1e3&&(Al.update(1e3*Un/(Mi-Zt),100),Zt=Mi,Un=0,Gs)){var Ci=performance.memory;Gs.update(Ci.usedJSHeapSize/1048576,Ci.jsHeapSizeLimit/1048576)}return Mi},update:function(){Kr=this.end()},domElement:Nr,setMode:ln}}).Panel=function(ps,ln,V){var Nr=1/0,Kr=0,Zt=Math.round,Un=Zt(window.devicePixelRatio||1),Al=80*Un,Ha=48*Un,Gs=3*Un,Mi=2*Un,Ci=3*Un,ms=15*Un,$s=74*Un,Ws=30*Un,No=document.createElement("canvas");No.width=Al,No.height=Ha,No.style.cssText="width:80px;height:48px";var On=No.getContext("2d");return On.font="bold "+9*Un+"px Helvetica,Arial,sans-serif",On.textBaseline="top",On.fillStyle=V,On.fillRect(0,0,Al,Ha),On.fillStyle=ln,On.fillText(ps,Gs,Mi),On.fillRect(Ci,ms,$s,Ws),On.fillStyle=V,On.globalAlpha=.9,On.fillRect(Ci,ms,$s,Ws),{dom:No,update:function(dr,fc){Nr=Math.min(Nr,dr),Kr=Math.max(Kr,dr),On.fillStyle=V,On.globalAlpha=1,On.fillRect(0,0,Al,ms),On.fillStyle=ln,On.fillText(Zt(dr)+" "+ps+" ("+Zt(Nr)+"-"+Zt(Kr)+")",Gs,Mi),On.drawImage(No,Ci+Un,ms,$s-Un,Ws,Ci,ms,$s-Un,Ws),On.fillRect(Ci+$s-Un,ms,Un,Ws),On.fillStyle=V,On.globalAlpha=.9,On.fillRect(Ci+$s-Un,ms,Un,Zt((1-dr/fc)*Ws))}}},Hs)}},Lo=>{Lo(Lo.s=855)}]); \ No newline at end of file diff --git a/frontend/src/app/app.module.ts b/frontend/src/app/app.module.ts index f2a646c..6922957 100644 --- a/frontend/src/app/app.module.ts +++ b/frontend/src/app/app.module.ts @@ -39,9 +39,10 @@ import { MatDialogModule } from '@angular/material/dialog'; import { MatProgressSpinnerModule } from '@angular/material/progress-spinner'; import { MatMenuModule } from '@angular/material/menu'; import { TriMapBlockUiComponent } from './components/editor/eac/tri-map.block-ui/tri-map.block-ui.component'; +import { TrkMapBlockUiComponent } from './components/editor/eac/trk-map.block-ui/trk-map.block-ui.component'; import { RunCustomActionDialogComponent } from './components/run-custom-action.dialog/run-custom-action.dialog.component'; import { OripGeometryBlockUiComponent } from './components/editor/eac/orip-geometry.block-ui/orip-geometry.block-ui.component'; -import { MinimapComponent } from './components/editor/eac/tri-map.block-ui/minimap/minimap.component'; +import { MinimapComponent } from './components/editor/common/minimap/minimap.component'; import { DelegateBlockUiComponent } from './components/editor/library/delegate.block-ui/delegate.block-ui.component'; import { MatOptionModule } from '@angular/material/core'; import { FenceTypeBlockUiComponent } from './components/editor/eac/fence-type.block-ui/fence-type.block-ui.component'; @@ -78,6 +79,7 @@ import { FlagsBlockUiComponent, ConfirmDialogComponent, TriMapBlockUiComponent, + TrkMapBlockUiComponent, RunCustomActionDialogComponent, OripGeometryBlockUiComponent, MinimapComponent, diff --git a/frontend/src/app/components/editor/eac/tri-map.block-ui/minimap/minimap.component.html b/frontend/src/app/components/editor/common/minimap/minimap.component.html similarity index 60% rename from frontend/src/app/components/editor/eac/tri-map.block-ui/minimap/minimap.component.html rename to frontend/src/app/components/editor/common/minimap/minimap.component.html index 3ae6cd8..c9ad7c6 100644 --- a/frontend/src/app/components/editor/eac/tri-map.block-ui/minimap/minimap.component.html +++ b/frontend/src/app/components/editor/common/minimap/minimap.component.html @@ -1,4 +1,5 @@ - +
+ - + +
+ Track length (m): {{(trackLength$ | async)?.toFixed(2)}} +
+
diff --git a/frontend/src/app/components/editor/common/minimap/minimap.component.scss b/frontend/src/app/components/editor/common/minimap/minimap.component.scss new file mode 100644 index 0000000..78b1a5e --- /dev/null +++ b/frontend/src/app/components/editor/common/minimap/minimap.component.scss @@ -0,0 +1,21 @@ +:host { + overflow: auto; +} + +.container { + position: relative; + width: 100%; + height: 100%; + + svg { + position: absolute; + width: 100%; + height: 100%; + } + + .info_div { + color: #838383; + } +} + + diff --git a/frontend/src/app/components/editor/eac/tri-map.block-ui/minimap/minimap.component.ts b/frontend/src/app/components/editor/common/minimap/minimap.component.ts similarity index 89% rename from frontend/src/app/components/editor/eac/tri-map.block-ui/minimap/minimap.component.ts rename to frontend/src/app/components/editor/common/minimap/minimap.component.ts index 395982a..0263b8f 100644 --- a/frontend/src/app/components/editor/eac/tri-map.block-ui/minimap/minimap.component.ts +++ b/frontend/src/app/components/editor/common/minimap/minimap.component.ts @@ -1,7 +1,7 @@ import { AfterViewInit, ChangeDetectionStrategy, Component, ElementRef, Input, OnDestroy } from '@angular/core'; -import { BehaviorSubject, combineLatest, Subject } from 'rxjs'; +import { BehaviorSubject, combineLatest, Observable, Subject } from 'rxjs'; import { map, takeUntil } from 'rxjs/operators'; -import { Point2, Point3 } from '@gg-web-engine/core'; +import { Pnt3, Point2, Point3 } from '@gg-web-engine/core'; @Component({ selector: 'app-tri-minimap', @@ -33,9 +33,22 @@ export class MinimapComponent implements AfterViewInit, OnDestroy { mapPolyline$: BehaviorSubject = new BehaviorSubject(''); mapPointer$: BehaviorSubject = new BehaviorSubject(null); + get trackLength$(): Observable { + return this._roadSpline$.pipe( + map((s) => { + let ret = 0; + for (let i = 1; i < s.length; i++) { + ret += Pnt3.dist(s[i], s[i - 1]); + } + return ret; + }), + ); + } + private readonly destroyed$: Subject = new Subject(); - constructor(private readonly ref: ElementRef) {} + constructor(private readonly ref: ElementRef) { + } ngAfterViewInit() { this._roadSpline$ diff --git a/frontend/src/app/components/editor/eac/tri-map.block-ui/minimap/minimap.component.scss b/frontend/src/app/components/editor/eac/tri-map.block-ui/minimap/minimap.component.scss deleted file mode 100644 index 8f1f895..0000000 --- a/frontend/src/app/components/editor/eac/tri-map.block-ui/minimap/minimap.component.scss +++ /dev/null @@ -1,8 +0,0 @@ -:host { - overflow: auto; -} - -svg { - width: 100%; - height: 100%; -} diff --git a/frontend/src/app/components/editor/eac/trk-map.block-ui/trk-map.block-ui.component.html b/frontend/src/app/components/editor/eac/trk-map.block-ui/trk-map.block-ui.component.html new file mode 100644 index 0000000..fb95087 --- /dev/null +++ b/frontend/src/app/components/editor/eac/trk-map.block-ui/trk-map.block-ui.component.html @@ -0,0 +1,19 @@ +
+
+ + +
+
+ + Spline item + + + +
+
+ diff --git a/frontend/src/app/components/editor/eac/trk-map.block-ui/trk-map.block-ui.component.scss b/frontend/src/app/components/editor/eac/trk-map.block-ui/trk-map.block-ui.component.scss new file mode 100644 index 0000000..5fae5c6 --- /dev/null +++ b/frontend/src/app/components/editor/eac/trk-map.block-ui/trk-map.block-ui.component.scss @@ -0,0 +1,52 @@ +.preview { + width: 100%; + height: calc(100vh - 14rem); + display: flex; + column-gap: 1rem; + + .previewCanvasContainer { + flex-grow: 1; + position: relative; + overflow: hidden; + margin: 0 0 16px; + display: flex; + align-items: center; + justify-content: space-around; + + canvas { + position: absolute; + } + } + + .previewNavigationContainer { + width: 20rem; + flex-shrink: 0; + display: flex; + flex-direction: column; + + app-tri-minimap { + flex-grow: 1; + display: flex; + } + } + +} + +.famSelector { + display: flex; + align-items: center; + width: 100%; + column-gap: 1rem; + + h4 { + min-width: fit-content; + } + + mat-form-field { + flex-grow: 1; + } + + mat-spinner, button { + margin-bottom: 1.34375em; + } +} diff --git a/frontend/src/app/components/editor/eac/trk-map.block-ui/trk-map.block-ui.component.ts b/frontend/src/app/components/editor/eac/trk-map.block-ui/trk-map.block-ui.component.ts new file mode 100644 index 0000000..e698cf2 --- /dev/null +++ b/frontend/src/app/components/editor/eac/trk-map.block-ui/trk-map.block-ui.component.ts @@ -0,0 +1,602 @@ +import { + AfterViewInit, + ChangeDetectionStrategy, + ChangeDetectorRef, + Component, + ElementRef, + EventEmitter, + Input, + OnDestroy, + Output, + ViewChild, +} from '@angular/core'; +import { GuiComponentInterface } from '../../gui-component.interface'; +import { + createInlineTickController, + Entity3d, + FreeCameraController, + Gg3dWorld, + LoadResultWithProps, + MapGraph, + MapGraph3dEntity, + MapGraphNodeType, + Pnt3, + Point2, + Point3, + Qtrn, + Renderer3dEntity, +} from '@gg-web-engine/core'; +import { BehaviorSubject, debounceTime, distinctUntilChanged, filter, Subject, takeUntil, throttleTime } from 'rxjs'; +import { EelDelegateService } from '../../../../services/eel-delegate.service'; +import { + AmbientLight, + ClampToEdgeWrapping, + DoubleSide, + Group, + Material, + Mesh, + MeshBasicMaterial, + Object3D, + PlaneGeometry, + RepeatWrapping, + Texture, + TextureLoader, +} from 'three'; +import { MainService } from '../../../../services/main.service'; +import { ThreeDisplayObjectComponent, ThreeSceneComponent, ThreeVisualTypeDocRepo } from '@gg-web-engine/three'; +import { OBJLoader } from 'three/examples/jsm/loaders/OBJLoader'; +import { MTLLoader } from 'three/examples/jsm/loaders/MTLLoader'; +import { setupNfs1Texture } from '../../common/obj-viewer/obj-viewer.component'; + +export enum MapPropType { + ThreeModel = 'model', + Bitmap = 'bitmap', + TwoSidedBitmap = 'two_sided_bitmap', +} + +export class Nfs1MapWorldEntity extends MapGraph3dEntity { + public readonly textureLoader = new TextureLoader(); + private readonly terrainMaterials: { [key: string]: MeshBasicMaterial } = {}; + private readonly objLoader = new OBJLoader(); + + public resource: Resource | null = null; + public isOpenedTrack: boolean = false; + + constructor( + public override readonly mapGraph: MapGraph, + public readonly famPath: string | null, + private readonly hideUnknownEntities$: BehaviorSubject, + ) { + super(mapGraph, { loadDepth: 40, inertia: 2 }); + } + + private _placeholder: Texture | null = null; + private _placeholderPromise: Promise | null = null; + + unknownEntities: Set = new Set(); + + override onSpawned(world: Gg3dWorld) { + super.onSpawned(world); + this.hideUnknownEntities$.pipe(distinctUntilChanged(), takeUntil(this._onRemoved$)).subscribe(hide => { + for (const e of this.unknownEntities) { + e.visible = !hide; + } + }); + } + + async getPlaceholderTexture(): Promise { + if (this._placeholder) return this._placeholder; + if (!this._placeholderPromise) { + this._placeholderPromise = this.textureLoader.loadAsync('assets/placeholder_texture.png'); + } + return this._placeholderPromise; + } + + private _placeholderTerrain: Texture | null = null; + private _placeholderTerrainPromise: Promise | null = null; + + async getPlaceholderTerrainTexture(): Promise { + if (this._placeholderTerrain) return this._placeholderTerrain; + if (!this._placeholderTerrainPromise) { + this._placeholderTerrainPromise = this.textureLoader.loadAsync('assets/placeholder_texture.png').then(texture => { + texture.wrapS = RepeatWrapping; + texture.wrapT = ClampToEdgeWrapping; + setupNfs1Texture(texture); + texture.flipY = true; + return texture; + }); + } + return this._placeholderTerrainPromise; + } + + protected override async loadChunk( + node: MapGraphNodeType, + ): Promise<[Entity3d[], LoadResultWithProps]> { + const object = await this.objLoader.loadAsync(node.path + '.obj'); + object.position.set(node.position.x, node.position.y, node.position.z); + object.traverse(node => { + if (node instanceof Mesh) { + node.material = this.getTerrainMaterial( + (node.userData['name'] || node.name) + .substr((node.userData['name'] || node.name).lastIndexOf('_') + 1) + .split('.')[0], + ); + } + }); + let chunkIndex = +node.path.split('_')[node.path.split('_').length - 1]; + let propInstances = (this.resource!.data.props || []) + .filter((x: any) => x.road_point_idx >= chunkIndex * 4 && x.road_point_idx < (chunkIndex + 1) * 4) + .map((x: any) => ({ + ...x, + ...this.resource!.data.prop_descr[x.prop_descr_idx], + position: Pnt3.add( + { x: x.position.x, y: x.position.z, z: x.position.y }, + { + x: this.resource!.data.road_spline[x.road_point_idx].position.x, + y: this.resource!.data.road_spline[x.road_point_idx].position.z, + z: this.resource!.data.road_spline[x.road_point_idx].position.y, + }, + ), + rotation: Qtrn.fromAngle(Pnt3.nZ, x.rotation), + })); + const props = (await Promise.all(propInstances.map((x: any) => this.loadPropInternal(x)))).filter( + p => !!p, + ) as Entity3d[]; + const entity: Entity3d = new Entity3d({ + object3D: new ThreeDisplayObjectComponent(object), + }); + this.addChildren(entity, ...props); + this.loaded.set(node, [entity, ...props]); + return [[entity, ...props], null!]; + } + + protected override disposeChunk(node: MapGraphNodeType) { + for (const c of this.loaded.get(node) || []) { + this.unknownEntities.delete(c as Entity3d); + } + super.disposeChunk(node); + } + + getTerrainMaterial(matId: string): Material { + if (!this.terrainMaterials[matId]) { + this.terrainMaterials[matId] = new MeshBasicMaterial({ side: DoubleSide, transparent: true, visible: false }); + if (this.famPath) { + this.textureLoader + .loadAsync(`${this.famPath}/background/${matId}.png`) + .then(texture => { + texture.wrapS = RepeatWrapping; + texture.wrapT = ClampToEdgeWrapping; + setupNfs1Texture(texture); + texture.flipY = true; + this.terrainMaterials[matId].map = texture; + this.terrainMaterials[matId].needsUpdate = true; + this.terrainMaterials[matId].visible = true; + }) + .catch(err => { + console.warn(`Problem with loading terrain material ${matId}`); + this.getPlaceholderTerrainTexture().then(texture => { + this.terrainMaterials[matId].map = texture; + this.terrainMaterials[matId].needsUpdate = true; + this.terrainMaterials[matId].visible = true; + }); + }); + } else { + this.getPlaceholderTerrainTexture().then(texture => { + this.terrainMaterials[matId].map = texture; + this.terrainMaterials[matId].needsUpdate = true; + this.terrainMaterials[matId].visible = true; + }); + } + } + return this.terrainMaterials[matId]; + } + + protected async loadPropInternal(dummy: any): Promise | null> { + let isUnknown = false; + if (dummy.type == MapPropType.ThreeModel) { + // 3D model + let object: ThreeDisplayObjectComponent; + try { + if (!this.famPath) throw new Error(); + const mtlLoader = new MTLLoader(); + const objLoader = new OBJLoader(); + const mtl = await mtlLoader.loadAsync(`${this.famPath}/props/${dummy.data.data.resource_id}/0/material.mtl`); + mtl.preload(); + objLoader.setMaterials(mtl); + object = new ThreeDisplayObjectComponent( + await objLoader.loadAsync(`${this.famPath}/props/${dummy.data.data.resource_id}/0/geometry.obj`), + ); + } catch (err) { + isUnknown = true; + object = this.world!.visualScene.factory.createPrimitive( + { shape: 'SPHERE', radius: 5 }, + { diffuse: await this.getPlaceholderTexture() }, + ); + } + object.nativeMesh.traverse(x => { + if (x instanceof Mesh) { + const materials: Material[] = x.material instanceof Array ? x.material : [x.material]; + for (const m of materials) { + m.transparent = true; + m.alphaTest = 0.5; + if (m instanceof MeshBasicMaterial && m.map) { + m.map.wrapS = ClampToEdgeWrapping; + m.map.wrapT = ClampToEdgeWrapping; + setupNfs1Texture(m.map); + m.map.needsUpdate = true; + } + } + } + }); + const prop = new Entity3d({ object3D: object }); + prop.position = dummy.position; + prop.rotation = dummy.rotation; + if (isUnknown) { + this.unknownEntities.add(prop); + prop.visible = !this.hideUnknownEntities$.getValue(); + } + this.world!.addEntity(prop); + return prop; + } else if (dummy.type == MapPropType.Bitmap || dummy.type == MapPropType.TwoSidedBitmap) { + const textureIds = (resId: number, framesAmount: number) => + new Array(framesAmount) + .fill(null) + .map((_, i) => + this.isOpenedTrack + ? `${Math.floor(resId / 4) + i}/0000` + : `0/${(Math.floor(resId / 4) + i).toString().padStart(2, '0')}00`, + ) + .join(';'); + + const object: Object3D = new Group(); + const [plane, isUnknown] = await this.loadTexturePlaneProp( + textureIds(dummy.data.data.resource_id, dummy.flags.is_animated ? dummy.data.data.frame_count : 1), + { + x: dummy.data.data.width, + y: dummy.data.data.height, + }, + dummy.data.data.animation_interval, + ); + object.add(plane); + if (dummy.type == MapPropType.TwoSidedBitmap) { + const [plane2, isUnknown] = await this.loadTexturePlaneProp( + textureIds(dummy.data.data.resource_id_2, 1), + { + x: dummy.data.data.width_2, + y: dummy.data.data.height, + }, + dummy.data.data.animation_interval, + ); + plane2.rotateY(Math.PI / 2); + plane2.position.x = dummy.data.data.width / 2; + plane2.position.y = dummy.data.data.width_2 / 2; + object.add(plane2); + } + const entity = new Entity3d({ object3D: new ThreeDisplayObjectComponent(object) }); + entity.position = dummy.position; + entity.rotation = dummy.rotation; + if (isUnknown) { + this.unknownEntities.add(entity); + entity.visible = !this.hideUnknownEntities$.getValue(); + } + return entity; + } + return null; + } + + private async loadTexturePlaneProp( + texture: string, + size: Point2, + animationInterval: number, + ): Promise<[Object3D, boolean]> { + const textures = texture.split(';'); + const placeholder = await this.getPlaceholderTexture(); + let isUnknown = false; + let maps = []; + if (!this.famPath) { + isUnknown = true; + maps = textures.map(() => placeholder); + } else { + maps = await Promise.all( + textures.map(t => + this.textureLoader.loadAsync(`${this.famPath}/foreground/${t}.png`).catch(() => { + isUnknown = true; + return placeholder; + }), + ), + ); + } + const materials = maps.map(map => { + setupNfs1Texture(map); + return new MeshBasicMaterial({ map, alphaTest: 0.5, transparent: true, side: DoubleSide }); + }); + const plane = new Mesh(new PlaneGeometry(size.x, size.y), materials[0]); + plane.rotateX(Math.PI / 2); + plane.position.set(0, 0, size.y / 2); + if (materials.length > 1) { + let i = -1; + // TODO where to unsubscribe? + createInlineTickController(this.world!) + .pipe(throttleTime(animationInterval && !isNaN(+animationInterval) ? +animationInterval * 1000 : 250)) + .subscribe(() => { + i = (i + 1) % materials.length; + plane.material = materials[i]; + }); + } + return [plane, isUnknown]; + } +} + +@Component({ + selector: 'app-trk-map-block-ui', + templateUrl: './trk-map.block-ui.component.html', + styleUrls: ['./trk-map.block-ui.component.scss'], + changeDetection: ChangeDetectionStrategy.OnPush, +}) +export class TrkMapBlockUiComponent implements GuiComponentInterface, AfterViewInit, OnDestroy { + @ViewChild('previewCanvasContainer') previewCanvasContainer!: ElementRef; + @ViewChild('previewCanvas') previewCanvas!: ElementRef; + + get resource(): Resource | null { + return this._resource$.getValue(); + } + + @Input() + set resource(value: Resource | null) { + this._resource$.next(value); + } + + _resource$: BehaviorSubject = new BehaviorSubject(null); + + @Output('changed') changed: EventEmitter = new EventEmitter(); + + previewLoading$: BehaviorSubject = new BehaviorSubject(true); + private terrainChunksObjLocation: string | undefined; + + pointer$: BehaviorSubject = new BehaviorSubject(null); + + selectedSplineIndex$: BehaviorSubject = new BehaviorSubject(0); + name: string = ''; + world!: Gg3dWorld; + renderer: Renderer3dEntity | null = null; + map: Nfs1MapWorldEntity | null = null; + controller!: FreeCameraController; + roadPath: Point3[] | null = null; + skySphere!: Entity3d; + selectionSphere!: Entity3d; + + private readonly destroyed$: Subject = new Subject(); + + constructor( + private readonly eelDelegate: EelDelegateService, + private readonly cdr: ChangeDetectorRef, + private readonly mainService: MainService, + ) { + } + + get roadSpline(): Point3[] { + return (this.resource?.data.block_positions || []); + } + + async ngAfterViewInit() { + this.world = new Gg3dWorld(new ThreeSceneComponent(), { + init: async () => { + }, + simulate: () => { + }, + loader: { + loadFromGgGlb: async (...args: any[]) => [], + }, + } as any); + await this.world.init(); + this.skySphere = new Entity3d({ + object3D: this.world.visualScene.factory.createPrimitive( + { + shape: 'SPHERE', + radius: 1000, + }, + { color: 0xffffff }, + ), + }); + ((this.skySphere.object3D!.nativeMesh as Mesh).material as Material).side = DoubleSide; + this.world.addEntity(this.skySphere); + this.selectionSphere = new Entity3d({ + object3D: this.world.visualScene.factory.createPrimitive( + { shape: 'SPHERE', radius: 0.5 }, + { + color: 0xff0000, + shading: 'unlit', + }, + ), + }); + ((this.selectionSphere.object3D!.nativeMesh as Mesh).material as Material).opacity = 0.4; + ((this.selectionSphere.object3D!.nativeMesh as Mesh).material as Material).transparent = true; + this.world.addEntity(this.selectionSphere); + + this.world.visualScene.nativeScene!.add(new AmbientLight(0xffffff, 2)); + let rendererSize$: BehaviorSubject = new BehaviorSubject({ x: 1, y: 1 }); + this.renderer = this.world.addRenderer( + this.world.visualScene.factory.createPerspectiveCamera(), + this.previewCanvas.nativeElement, + { + size: rendererSize$.asObservable(), + background: 0xaaaaaa, + }, + ); + this.renderer.camera.position = { x: 0, y: 0, z: 2.5 }; + this.renderer.camera.rotation = Qtrn.lookAt( + this.renderer.camera.position, + Pnt3.add(this.renderer.camera.position, Pnt3.Y), + Pnt3.Z, + ); + createInlineTickController(this.world) + .pipe(takeUntil(this.destroyed$)) + .subscribe(() => { + if (this.renderer) { + this.skySphere.position = this.renderer.camera.position; + this.pointer$.next(this.renderer.camera.position); + } + }); + + this.controller = new FreeCameraController(this.world.keyboardInput, this.renderer, { + mouseOptions: { + canvas: this.previewCanvas.nativeElement, + pointerLock: true, + }, + keymap: 'wasd+arrows', + cameraLinearSpeed: 40, + cameraBoostMultiplier: 4, + cameraMovementElasticity: 100, + cameraRotationElasticity: 30, + ignoreMouseUnlessPointerLocked: true, + ignoreKeyboardUnlessPointerLocked: true, + }); + this.world.addEntity(this.controller); + const updateSize = () => { + rendererSize$.next({ + x: this.previewCanvasContainer.nativeElement.clientWidth, + y: this.previewCanvasContainer.nativeElement.clientHeight, + }); + }; + new ResizeObserver(updateSize).observe(this.previewCanvasContainer.nativeElement); + updateSize(); + this.world.start(); + + this._resource$.pipe(takeUntil(this.destroyed$)).subscribe(async res => { + this.previewLoading$.next(true); + await this.loadTerrainChunks(res?.id); + await this.loadPreview(); + this.previewLoading$.next(false); + }); + this.mainService.dataBlockChange$ + .pipe( + takeUntil(this.destroyed$), + filter(([blockId, _]) => !!this.resource && blockId.startsWith(this.resource!.id)), + debounceTime(3000), + ) + .subscribe(async () => { + this.previewLoading$.next(true); + await this.postTmpUpdates(this.resource?.id); + await this.loadPreview(); + this.previewLoading$.next(false); + }); + + this.selectedSplineIndex$.pipe(takeUntil(this.destroyed$), debounceTime(250)).subscribe(i => { + if (this.resource) { + let point = this.resource.data.block_positions[i]; + if (!point) { + return; + } + point = { x: point.x, y: point.z, z: point.y }; + this.selectionSphere.position = point; + const orientation = 0; + if (this.renderer) { + this.renderer.position = Pnt3.add( + point, + Pnt3.rotAround({ x: 10, y: -12, z: 5 }, { x: 0, y: 0, z: 1 }, -orientation), + ); + this.renderer.rotation = Qtrn.lookAt(this.renderer.position, point, { x: 0, y: 0, z: 1 }); + this.controller.reset(); + } + } + }); + } + + private async loadTerrainChunks(blockId: string | undefined) { + if (blockId) { + const paths = await this.eelDelegate.serializeResource(blockId, { + geometry__save_obj: true, + geometry__save_blend: false, + geometry__export_to_gg_web_engine: false, + maps__save_as_chunked: true, + maps__save_invisible_wall_collisions: false, + maps__save_terrain_collisions: false, + maps__save_spherical_skybox_texture: true, + maps__add_props_to_obj: false, + }); + let anyObjPath = paths.find(x => x.endsWith('.obj')) || ''; + this.terrainChunksObjLocation = anyObjPath.substring(0, anyObjPath.indexOf('terrain_chunk_')); + } else { + this.terrainChunksObjLocation = undefined; + } + } + + private async loadPreview() { + this.roadPath = + this.resource?.data.block_positions + .map((p: Point3) => ({ + x: p.x, + y: p.z, + z: p.y, + })); + if (!this.terrainChunksObjLocation || !this.roadPath) { + return; + } + const chunksGraph = MapGraph.fromMapArray( + this.roadPath.map((position: Point3, i: number) => ({ + path: `${this.terrainChunksObjLocation}terrain_chunk_${i}`, + position, + loadOptions: {}, + })) || [], + true, + ); + this.unloadPreview(); + this.map = new Nfs1MapWorldEntity( + chunksGraph, + '', + this.mainService.hideHiddenFields$, + ); + this.map.resource = this.resource; + this.map.isOpenedTrack = false; + + createInlineTickController(this.world) + .pipe(takeUntil(this.destroyed$)) + .subscribe(() => { + if (this.map && this.renderer) { + this.map.loaderCursor$.next(this.renderer.position); + } + }); + this.world.addEntity(this.map!); + this.cdr.markForCheck(); + } + + private unloadPreview() { + if (this.map) { + this.world.removeEntity(this.map); + this.map.dispose(); + this.map = null; + this.cdr.markForCheck(); + } + } + + private async postTmpUpdates(blockId: string | undefined) { + if (blockId) { + const paths = await this.eelDelegate.serializeResourceTmp( + blockId, + Object.entries(this.mainService.changedDataBlocks) + .filter(([id, _]) => id != '__has_external_changes__' && id.startsWith(blockId)) + .map(([id, value]) => { + return { id, value }; + }), + { + geometry__save_obj: true, + geometry__save_blend: false, + geometry__export_to_gg_web_engine: false, + maps__save_as_chunked: true, + maps__save_invisible_wall_collisions: false, + maps__save_terrain_collisions: false, + maps__save_spherical_skybox_texture: true, + maps__add_props_to_obj: false, + }, + ); + this.terrainChunksObjLocation = paths[0].substring(0, paths[0].indexOf('terrain_chunk_')); + } else { + this.terrainChunksObjLocation = undefined; + } + } + + ngOnDestroy(): void { + this.destroyed$.next(); + this.destroyed$.complete(); + } +} diff --git a/frontend/src/app/components/editor/editor.component.ts b/frontend/src/app/components/editor/editor.component.ts index 2208d9a..3f61925 100644 --- a/frontend/src/app/components/editor/editor.component.ts +++ b/frontend/src/app/components/editor/editor.component.ts @@ -25,6 +25,7 @@ import { SoundbankBlockUiComponent } from './eac/soundbank.block-ui/soundbank.bl import { EacsAudioBlockUiComponent } from './eac/eacs-audio.block-ui/eacs-audio.block-ui.component'; import { GeoGeometryBlockUiComponent } from './eac/geo-geometry.block-ui/geo-geometry.block-ui.component'; import { BaseArchiveBlockUiComponent } from './eac/base-archive.block-ui/base-archive.block-ui.component'; +import { TrkMapBlockUiComponent } from './eac/trk-map.block-ui/trk-map.block-ui.component'; @Component({ selector: 'app-editor', @@ -50,13 +51,15 @@ export class EditorComponent implements OnDestroy { AnyBitmapBlock: BitmapBlockUiComponent, BasePalette: PaletteBlockUiComponent, OripGeometry: OripGeometryBlockUiComponent, - GeoGeometry: GeoGeometryBlockUiComponent, BaseArchiveBlock: BaseArchiveBlockUiComponent, TriMap: TriMapBlockUiComponent, WwwwBlock: WwwwBlockUiComponent, FenceType: FenceTypeBlockUiComponent, SoundBank: SoundbankBlockUiComponent, EacsAudioFile: EacsAudioBlockUiComponent, + // NFS2 blocks + GeoGeometry: GeoGeometryBlockUiComponent, + TrkMap: TrkMapBlockUiComponent, }; @ViewChild(DataBlockUIDirective, { static: true }) dataBlockUiHost!: DataBlockUIDirective; diff --git a/generate_resource_doc.py b/generate_resource_doc.py index 0b154a5..a3d4bb3 100644 --- a/generate_resource_doc.py +++ b/generate_resource_doc.py @@ -144,6 +144,8 @@ def render_type(instance: DataBlock, possible_blocks_filter=None) -> str: **\*.QFS** image archive. {render_type(archives.ShpiBlock())}, **compressed** (compression algorithms not documented, can be found in resources/eac/compressions/) +**\*.TRK** main track file. {render_type(maps.TrkMap())} + **\*.UV** video, I just use ffmpeg to convert it **\*.VIV** archive with some data. {render_type(archives.BigfBlock())}""", @@ -157,8 +159,12 @@ def render_type(instance: DataBlock, possible_blocks_filter=None) -> str: geometries.GeoMesh(), geometries.GeoPolygon(), ], - # 'Maps': [ - # ], + 'Maps': [ + maps.TrkMap(), + maps.TrkSuperBlock(), + maps.TrkBlock(), + maps.TrkPolygon(), + ], # 'Physics': [ # ], 'Bitmaps': [ diff --git a/library/context.py b/library/context.py index 0451afb..e046c15 100644 --- a/library/context.py +++ b/library/context.py @@ -21,7 +21,10 @@ def data(self, local_path: str): for p in data_path: if p == '..': return self.parent.data('/'.join(data_path[1:])) - entry = entry[p] + if isinstance(entry, list): + entry = entry[int(p)] + else: + entry = entry[p] return entry def get_full_data(self): diff --git a/library/loader.py b/library/loader.py index 4ec0334..45a365d 100644 --- a/library/loader.py +++ b/library/loader.py @@ -54,6 +54,9 @@ def _find_block_class(file_path: str, header_str: str, header_bytes: bytes): elif header_str == 'BIGF': from resources.eac.archives import BigfBlock return BigfBlock + elif header_str == 'TRAC': + from resources.eac.maps import TrkMap + return TrkMap try: resource_id = header_bytes[0] if resource_id == 0x22: diff --git a/resources/eac/maps/__init__.py b/resources/eac/maps/__init__.py new file mode 100644 index 0000000..07eea33 --- /dev/null +++ b/resources/eac/maps/__init__.py @@ -0,0 +1,15 @@ +from .nfs2 import (TrkMap, + TrkSuperBlock, + TrkBlock, + TrkPolygon, + ) +from .tnfs import (RoadSplinePoint, + ModelPropDescrData, + BitmapPropDescrData, + TwoSidedBitmapPropDescrData, + PropDescr, + MapProp, + TerrainEntry, + AIEntry, + TriMap, + ) diff --git a/resources/eac/maps/nfs2.py b/resources/eac/maps/nfs2.py new file mode 100644 index 0000000..9707f33 --- /dev/null +++ b/resources/eac/maps/nfs2.py @@ -0,0 +1,100 @@ +from typing import Dict + +from library.read_blocks import (DeclarativeCompoundBlock, + IntegerBlock, + UTF8Block, BytesBlock, ArrayBlock) +from resources.eac.fields.misc import Point3D_32, Point3D_16 + + +class TrkPolygon(DeclarativeCompoundBlock): + class Fields(DeclarativeCompoundBlock.Fields): + texture = (IntegerBlock(length=2, is_signed=False), + {'description': 'Texture number'}) + texture2 = (IntegerBlock(length=2, is_signed=True), + {'description': '255 (texture number for the other side == none ?)'}) + vertices = ArrayBlock(child=IntegerBlock(length=1, is_signed=False), length=4) + + +class TrkBlock(DeclarativeCompoundBlock): + class Fields(DeclarativeCompoundBlock.Fields): + block_size = (IntegerBlock(length=4, is_signed=False), + {'description': 'Block size'}) + block_size_2 = (IntegerBlock(length=4, is_signed=False), + {'description': 'Block size (duplicated)'}) + num_extrablocks = (IntegerBlock(length=2, is_signed=False), + {'description': 'number of extrablocks'}) + unk = (IntegerBlock(length=2, is_signed=False), + {'is_unknown': True}) + block_idx = (IntegerBlock(length=4, is_signed=False), + {'description': 'Block index (serial number)'}) + bounds = (ArrayBlock(child=Point3D_32(), length=4), + {'description': 'Block bounding rectangle'}) + extrablocks_offset = (IntegerBlock(length=4, is_signed=False), + {'description': ''}) + nv8 = (IntegerBlock(length=2, is_signed=False), + {'description': ''}) + nv4 = (IntegerBlock(length=2, is_signed=False), + {'description': ''}) + nv2 = (IntegerBlock(length=2, is_signed=False), + {'description': ''}) + nv1 = (IntegerBlock(length=2, is_signed=False), + {'description': ''}) + np4 = (IntegerBlock(length=4, is_signed=False), + {'description': ''}) + np2 = (IntegerBlock(length=4, is_signed=False), + {'description': ''}) + np1 = (IntegerBlock(length=4, is_signed=False), + {'description': ''}) + vertices = ArrayBlock(child=Point3D_16(), + length=(lambda ctx: ctx.data('nv8') + ctx.data('nv1'), 'nv8+nv1')) + polygons = ArrayBlock(child=TrkPolygon(), + length=(lambda ctx: ctx.data('np4') + ctx.data('np2') + ctx.data('np1'), 'np4+np2+np1')) + tmp = BytesBlock( + length=lambda ctx: ctx.data('block_size') - 88 - 6 * (ctx.data('nv8') + ctx.data('nv1')) - 8 * ( + ctx.data('np4') + ctx.data('np2') + ctx.data('np1'))) + + +class TrkSuperBlock(DeclarativeCompoundBlock): + class Fields(DeclarativeCompoundBlock.Fields): + block_size = (IntegerBlock(length=4, is_signed=False), + {'description': 'Superblock size'}) + num_blocks = (IntegerBlock(length=4, is_signed=False), + {'description': 'Number of blocks in this superblock. Usually 8 or less in the last superblock'}) + unk = (IntegerBlock(length=4), + {'is_unknown': True}) + block_offsets = ArrayBlock(child=IntegerBlock(length=4, is_signed=False), + length=(lambda ctx: ctx.data('num_blocks'), 'num_blocks')) + blocks = (ArrayBlock(child=TrkBlock(), + length=(lambda ctx: ctx.data('num_blocks'), 'num_blocks')), + {'description': 'Blocks'}) + + +class TrkMap(DeclarativeCompoundBlock): + + @property + def schema(self) -> Dict: + return {**super().schema, + 'block_description': 'Main track file'} + + class Fields(DeclarativeCompoundBlock.Fields): + resource_id = (UTF8Block(length=4, required_value='TRAC'), + {'description': 'Resource ID'}) + unk0 = (BytesBlock(length=20), + {'is_unknown': True}) + num_superblocks = (IntegerBlock(length=4, is_signed=False), + {'description': 'Number of superblocks (nsblk)', + 'programmatic_value': lambda ctx: len(ctx.data('superblock_offsets'))}) + num_blocks = (IntegerBlock(length=4, is_signed=False), + {'description': 'Number of blocks (nblk)'}) + superblock_offsets = ArrayBlock(child=IntegerBlock(length=4, is_signed=False), + length=(lambda ctx: ctx.data('num_superblocks'), 'num_superblocks')) + block_positions = (ArrayBlock(child=Point3D_32(), + length=(lambda ctx: ctx.data('num_blocks'), 'num_blocks')), + {'description': 'Coordinates of road spline points in 3D space'}) + skip_bytes = (BytesBlock(length=(lambda ctx: ctx.data('superblock_offsets/0') - ctx.buffer.tell(), + 'up to offset superblock_offsets[0]')), + {'description': 'Useless padding'}) + superblocks = (ArrayBlock(child=TrkSuperBlock(), + length=(lambda ctx: ctx.data('num_superblocks'), 'num_superblocks')), + {'description': 'Superblocks', + 'custom_offset': 'superblock_offsets[0]'}) diff --git a/resources/eac/maps.py b/resources/eac/maps/tnfs.py similarity index 99% rename from resources/eac/maps.py rename to resources/eac/maps/tnfs.py index d6d764c..688b8ab 100644 --- a/resources/eac/maps.py +++ b/resources/eac/maps/tnfs.py @@ -333,8 +333,10 @@ class Fields(DeclarativeCompoundBlock.Fields): "tracks, finish line will be always located at spline point " "(num_chunks * 4 - 179)"}) ai_info = ArrayBlock(child=AIEntry(), length=600) - num_prop_descr = IntegerBlock(length=4, is_signed=False) - num_props = IntegerBlock(length=4, is_signed=False) + num_prop_descr = (IntegerBlock(length=4, is_signed=False), + {'programmatic_value': lambda ctx: len(ctx.data('prop_descr'))}) + num_props = (IntegerBlock(length=4, is_signed=False), + {'programmatic_value': lambda ctx: len(ctx.data('props'))}) objs_hdr = UTF8Block(length=4, required_value='SJBO') unk2 = (IntegerBlock(length=4, required_value=0x428c), {'is_unknown': True}) diff --git a/serializers/__init__.py b/serializers/__init__.py index 91c796a..a3c4e2e 100644 --- a/serializers/__init__.py +++ b/serializers/__init__.py @@ -8,7 +8,7 @@ from .fonts import FfnFontSerializer from .geometries import OripGeometrySerializer, GeoGeometrySerializer from .json import JsonSerializer -from .maps import TriMapSerializer +from .maps import TriMapSerializer, TrkMapSerializer from .misc_serializers import ShpiTextSerializer from .palettes import PaletteSerializer from .videos import FfmpegSupportedVideoSerializer diff --git a/serializers/maps.py b/serializers/maps.py index 6653fe5..1950ed2 100644 --- a/serializers/maps.py +++ b/serializers/maps.py @@ -6,9 +6,10 @@ from typing import List, Dict from library.utils.blender_scripts import get_blender_save_script, run_blender -from library.utils.meshes import SubMesh +from library.utils.meshes import SubMesh, Mesh from resources.eac.maps import RoadSplinePoint from serializers import BaseFileSerializer +from serializers.geometries import ObjExporter class TriMapSerializer(BaseFileSerializer): @@ -499,7 +500,8 @@ def mtl_append_foreground_textures(self, data, path, name): Ns 0.000000 map_Kd ../../ETRACKFM/{name[:3]}_001.FAM/{texture_name}.png""") - def render_props_to_obj(self, id, f, path, data, face_index_increment, is_opened_track, min_id, max_id, pivot=(0, 0, 0)): + def render_props_to_obj(self, id, f, path, data, face_index_increment, is_opened_track, min_id, max_id, + pivot=(0, 0, 0)): for i, p in enumerate(data['props']): if p['road_point_idx'] > max_id or p['road_point_idx'] < min_id: continue @@ -676,7 +678,8 @@ def serialize(self, data: dict, path: str, id=None, block=None, **kwargs): f.write(obj) face_index_increment += fii if self.settings.maps__add_props_to_obj: - self.render_props_to_obj(id, f, path, data, face_index_increment, is_opened_track, i * 4, i * 4 + 3, pivot) + self.render_props_to_obj(id, f, path, data, face_index_increment, is_opened_track, i * 4, + i * 4 + 3, pivot) blender_script += '\n\n\n' + self.blender_chunk_script.substitute({ 'new_file': True, 'save_invisible_wall_collisions': self.settings.maps__save_invisible_wall_collisions, @@ -704,7 +707,8 @@ def serialize(self, data: dict, path: str, id=None, block=None, **kwargs): f.write(obj) face_index_increment += fii if self.settings.maps__add_props_to_obj: - self.render_props_to_obj(id, f, path, data, face_index_increment, is_opened_track, 0, len(data['terrain']) * 4 - 1) + self.render_props_to_obj(id, f, path, data, face_index_increment, is_opened_track, 0, + len(data['terrain']) * 4 - 1) blender_script += '\n\n\n' + self.blender_chunk_script.substitute({ 'new_file': False, @@ -788,3 +792,62 @@ def serialize(self, data: dict, path: str, id=None, block=None, **kwargs): else: os.unlink(os.path.join(os.getcwd(), path, 'terrain.obj')) os.unlink(os.path.join(os.getcwd(), path, 'terrain.mtl')) + + +class TrkMapSerializer(BaseFileSerializer): + + def __init__(self): + super().__init__(is_dir=True) + + def serialize(self, data: dict, path: str, id=None, block=None, **kwargs): + super().serialize(data, path, id, block, **kwargs) + blocks = [] + for sb in data['superblocks']: + blocks += sb['blocks'] + chunks = [] + for block in blocks: + model = Mesh() + pivot = data['block_positions'][block['block_idx']] + next_pivot = data['block_positions'][ + block['block_idx'] + 1 + if block['block_idx'] < len(blocks) - 1 + else 0 + ] + model.pivot_offset = (pivot['x'], pivot['y'], pivot['z']) + model.vertices = [[v['x'], v['y'], v['z']] for v in block['vertices']] + for v in model.vertices[:block['nv8']]: + v[0] += next_pivot['x'] - pivot['x'] + v[1] += next_pivot['y'] - pivot['y'] + v[2] += next_pivot['z'] - pivot['z'] + for p in block['polygons'][(block['np4'] + block['np2']):]: + model.polygons.append([p['vertices'][0], p['vertices'][1], p['vertices'][2]]) + model.polygons.append([p['vertices'][2], p['vertices'][0], p['vertices'][3]]) + model.vertex_uvs = [[0, 0] for _ in block['vertices']] + model.texture_ids = [0 for _ in block['polygons']] + chunks.append(model) + + for mesh in chunks: + mesh.pivot_offset = (mesh.pivot_offset[0], mesh.pivot_offset[2], mesh.pivot_offset[1]) + mesh.change_axes(new_z='y', new_y='z') + if self.settings.maps__save_as_chunked: + for i, chunk in enumerate(chunks): + with open(os.path.join(path, f'terrain_chunk_{i}.obj'), 'w') as f: + chunk.pivot_offset = (0, 0, 0) + obj, fii = chunk.to_obj(1) + f.write(obj) + # TODO export to gg here + if not self.settings.geometry__save_obj: + if self.settings.maps__save_as_chunked: + for i in range(len(chunks)): + os.unlink(os.path.join(os.getcwd(), path, f'terrain_chunk_{i}.obj')) + else: + os.unlink(os.path.join(os.getcwd(), path, 'terrain.obj')) + os.unlink(os.path.join(os.getcwd(), path, 'terrain.mtl')) + else: + with open(os.path.join(path, 'terrain.obj'), 'w') as f: + face_index_increment = 1 + for chunk in chunks: + obj, fii = chunk.to_obj(face_index_increment) + f.write(obj) + face_index_increment += fii + ObjExporter().handle_obj(settings=self.settings, path=path, obj_name='terrain.obj') From 85c1f1651579315aaeb396eecd703dade5d60c12 Mon Sep 17 00:00:00 2001 From: andy Date: Thu, 19 Dec 2024 01:04:33 +0200 Subject: [PATCH 02/36] TRK track spline and basic mesh (proving grounds only) --- settings.py | 1 + 1 file changed, 1 insertion(+) diff --git a/settings.py b/settings.py index d82e803..5f2e7f1 100644 --- a/settings.py +++ b/settings.py @@ -29,6 +29,7 @@ 'Palette24Bit': 'PaletteSerializer', 'Palette32Bit': 'PaletteSerializer', 'TriMap': 'TriMapSerializer', + 'TrkMap': 'TrkMapSerializer', 'OripGeometry': 'OripGeometrySerializer', 'GeoGeometry': 'GeoGeometrySerializer', 'ShpiBlock': 'ShpiArchiveSerializer', From 276edc95fc9ad240499bd290b79da840a2dfa7c0 Mon Sep 17 00:00:00 2001 From: andy Date: Thu, 19 Dec 2024 01:25:13 +0200 Subject: [PATCH 03/36] trk bugfix --- resources/eac/maps/nfs2.py | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/resources/eac/maps/nfs2.py b/resources/eac/maps/nfs2.py index 9707f33..9c3f78f 100644 --- a/resources/eac/maps/nfs2.py +++ b/resources/eac/maps/nfs2.py @@ -23,8 +23,8 @@ class Fields(DeclarativeCompoundBlock.Fields): {'description': 'Block size (duplicated)'}) num_extrablocks = (IntegerBlock(length=2, is_signed=False), {'description': 'number of extrablocks'}) - unk = (IntegerBlock(length=2, is_signed=False), - {'is_unknown': True}) + unk0 = (IntegerBlock(length=2, is_signed=False), + {'is_unknown': True}) block_idx = (IntegerBlock(length=4, is_signed=False), {'description': 'Block index (serial number)'}) bounds = (ArrayBlock(child=Point3D_32(), length=4), @@ -39,12 +39,14 @@ class Fields(DeclarativeCompoundBlock.Fields): {'description': ''}) nv1 = (IntegerBlock(length=2, is_signed=False), {'description': ''}) - np4 = (IntegerBlock(length=4, is_signed=False), + np4 = (IntegerBlock(length=2, is_signed=False), {'description': ''}) - np2 = (IntegerBlock(length=4, is_signed=False), + np2 = (IntegerBlock(length=2, is_signed=False), {'description': ''}) - np1 = (IntegerBlock(length=4, is_signed=False), + np1 = (IntegerBlock(length=2, is_signed=False), {'description': ''}) + unk1 = (IntegerBlock(length=6), + {'is_unknown': True}) vertices = ArrayBlock(child=Point3D_16(), length=(lambda ctx: ctx.data('nv8') + ctx.data('nv1'), 'nv8+nv1')) polygons = ArrayBlock(child=TrkPolygon(), From aca9c1e65cd9196f15f44ce413ea1e2c5c636f9d Mon Sep 17 00:00:00 2001 From: andy Date: Thu, 19 Dec 2024 03:05:08 +0200 Subject: [PATCH 04/36] frontend textures preview in TRK gui --- frontend/dist/gui/index.html | 2 +- ...1f0169f720.js => main.f9cbbe4da86cd02c.js} | 2 +- .../common/minimap/minimap.component.ts | 5 +- .../trk-map.block-ui.component.html | 45 +++++---- .../trk-map.block-ui.component.scss | 2 +- .../trk-map.block-ui.component.ts | 92 +++++++++++++------ serializers/maps.py | 5 +- 7 files changed, 98 insertions(+), 55 deletions(-) rename frontend/dist/gui/{main.c72f5b1f0169f720.js => main.f9cbbe4da86cd02c.js} (82%) diff --git a/frontend/dist/gui/index.html b/frontend/dist/gui/index.html index 23d0129..14797ed 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.c72f5b1f0169f720.js b/frontend/dist/gui/main.f9cbbe4da86cd02c.js similarity index 82% rename from frontend/dist/gui/main.c72f5b1f0169f720.js rename to frontend/dist/gui/main.f9cbbe4da86cd02c.js index aeb1ec4..0a8704c 100644 --- a/frontend/dist/gui/main.c72f5b1f0169f720.js +++ b/frontend/dist/gui/main.f9cbbe4da86cd02c.js @@ -1 +1 @@ -(self.webpackChunkgui=self.webpackChunkgui||[]).push([[179],{855:(Lo,Hs,ps)=>{"use strict";function ln(i){return"function"==typeof i}function V(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 Nr=V(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 Kr(i,t){if(i){const e=i.indexOf(t);0<=e&&i.splice(e,1)}}class Zt{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(ln(n))try{n()}catch(s){t=s instanceof Nr?s.errors:[s]}const{_finalizers:r}=this;if(r){this._finalizers=null;for(const s of r)try{Ha(s)}catch(o){t=t??[],o instanceof Nr?t=[...t,...o.errors]:t.push(o)}}if(t)throw new Nr(t)}}add(t){var e;if(t&&t!==this)if(this.closed)Ha(t);else{if(t instanceof Zt){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)&&Kr(e,t)}remove(t){const{_finalizers:e}=this;e&&Kr(e,t),t instanceof Zt&&t._removeParent(this)}}Zt.EMPTY=(()=>{const i=new Zt;return i.closed=!0,i})();const Un=Zt.EMPTY;function Al(i){return i instanceof Zt||i&&"closed"in i&&ln(i.remove)&&ln(i.add)&&ln(i.unsubscribe)}function Ha(i){ln(i)?i():i.unsubscribe()}const Gs={onUnhandledError:null,onStoppedNotification:null,Promise:void 0,useDeprecatedSynchronousErrorHandling:!1,useDeprecatedNextContext:!1},Mi={setTimeout(i,t,...e){const{delegate:n}=Mi;return n?.setTimeout?n.setTimeout(i,t,...e):setTimeout(i,t,...e)},clearTimeout(i){const{delegate:t}=Mi;return(t?.clearTimeout||clearTimeout)(i)},delegate:void 0};function Ci(i){Mi.setTimeout(()=>{const{onUnhandledError:t}=Gs;if(!t)throw i;t(i)})}function ms(){}const $s=On("C",void 0,void 0);function On(i,t,e){return{kind:i,value:t,error:e}}let dr=null;function fc(i){if(Gs.useDeprecatedSynchronousErrorHandling){const t=!dr;if(t&&(dr={errorThrown:!1,error:null}),i(),t){const{errorThrown:e,error:n}=dr;if(dr=null,e)throw n}}else i()}class Dl extends Zt{constructor(t){super(),this.isStopped=!1,t?(this.destination=t,Al(t)&&t.add(this)):this.destination=ME}static create(t,e,n){return new da(t,e,n)}next(t){this.isStopped?Xg(function No(i){return On("N",i,void 0)}(t),this):this._next(t)}error(t){this.isStopped?Xg(function Ws(i){return On("E",void 0,i)}(t),this):(this.isStopped=!0,this._error(t))}complete(){this.isStopped?Xg($s,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 ca=Function.prototype.bind;function Tl(i,t){return ca.call(i,t)}class Ga{constructor(t){this.partialObserver=t}next(t){const{partialObserver:e}=this;if(e.next)try{e.next(t)}catch(n){pd(n)}}error(t){const{partialObserver:e}=this;if(e.error)try{e.error(t)}catch(n){pd(n)}else pd(t)}complete(){const{partialObserver:t}=this;if(t.complete)try{t.complete()}catch(e){pd(e)}}}class da extends Dl{constructor(t,e,n){let r;if(super(),ln(t)||!t)r={next:t??void 0,error:e??void 0,complete:n??void 0};else{let s;this&&Gs.useDeprecatedNextContext?(s=Object.create(t),s.unsubscribe=()=>this.unsubscribe(),r={next:t.next&&Tl(t.next,s),error:t.error&&Tl(t.error,s),complete:t.complete&&Tl(t.complete,s)}):r=t}this.destination=new Ga(r)}}function pd(i){Gs.useDeprecatedSynchronousErrorHandling?function la(i){Gs.useDeprecatedSynchronousErrorHandling&&dr&&(dr.errorThrown=!0,dr.error=i)}(i):Ci(i)}function Xg(i,t){const{onStoppedNotification:e}=Gs;e&&Mi.setTimeout(()=>e(i,t))}const ME={closed:!0,next:ms,error:function wE(i){throw i},complete:ms},Kg="function"==typeof Symbol&&Symbol.observable||"@@observable";function $a(i){return i}function o0(i){return 0===i.length?$a:1===i.length?i[0]:function(e){return i.reduce((n,r)=>r(n),e)}}let In=(()=>{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 Pf(i){return i&&i instanceof Dl||function SE(i){return i&&ln(i.next)&&ln(i.error)&&ln(i.complete)}(i)&&Al(i)}(e)?e:new da(e,n,r);return fc(()=>{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=Wa(n))((r,s)=>{const o=new da({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)}[Kg](){return this}pipe(...e){return o0(e)(this)}toPromise(e){return new(e=Wa(e))((n,r)=>{let s;this.subscribe(o=>s=o,o=>r(o),()=>n(s))})}}return i.create=t=>new i(t),i})();function Wa(i){var t;return null!==(t=i??Gs.Promise)&&void 0!==t?t:Promise}const ua=V(i=>function(){i(this),this.name="ObjectUnsubscribedError",this.message="object unsubscribed"});let Re=(()=>{class i extends In{constructor(){super(),this.closed=!1,this.currentObservers=null,this.observers=[],this.isStopped=!1,this.hasError=!1,this.thrownError=null}lift(e){const n=new a0(this,this);return n.operator=e,n}_throwIfClosed(){if(this.closed)throw new ua}next(e){fc(()=>{if(this._throwIfClosed(),!this.isStopped){this.currentObservers||(this.currentObservers=Array.from(this.observers));for(const n of this.currentObservers)n.next(e)}})}error(e){fc(()=>{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(){fc(()=>{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?Un:(this.currentObservers=null,s.push(e),new Zt(()=>{this.currentObservers=null,Kr(s,e)}))}_checkFinalizedStatuses(e){const{hasError:n,thrownError:r,isStopped:s}=this;n?e.error(r):s&&e.complete()}asObservable(){const e=new In;return e.source=this,e}}return i.create=(t,e)=>new a0(t,e),i})();class a0 extends Re{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:Un}}function l0(i){return ln(i?.lift)}function ti(i){return t=>{if(l0(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 Yn(i,t,e,n,r){return new EE(i,t,e,n,r)}class EE extends Dl{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 et(i,t){return ti((e,n)=>{let r=0;e.subscribe(Yn(n,s=>{n.next(i.call(t,s,r++))}))})}function ha(i){return this instanceof ha?(this.v=i,this):new ha(i)}function Nf(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 Zg(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 i_=i=>i&&"number"==typeof i.length&&"function"!=typeof i;function r_(i){return ln(i?.then)}function f0(i){return ln(i[Kg])}function p0(i){return Symbol.asyncIterator&&ln(i?.[Symbol.asyncIterator])}function m0(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 g0=function s_(){return"function"==typeof Symbol&&Symbol.iterator?Symbol.iterator:"@@iterator"}();function Bf(i){return ln(i?.[g0])}function _0(i){return function Lf(i,t,e){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var r,n=e.apply(i,t||[]),s=[];return r=Object.create(("function"==typeof AsyncIterator?AsyncIterator:Object).prototype),a("next"),a("throw"),a("return",function o(m){return function(g){return Promise.resolve(g).then(m,h)}}),r[Symbol.asyncIterator]=function(){return this},r;function a(m,g){n[m]&&(r[m]=function(b){return new Promise(function(v,y){s.push([m,b,v,y])>1||l(m,b)})},g&&(r[m]=g(r[m])))}function l(m,g){try{!function c(m){m.value instanceof ha?Promise.resolve(m.value.v).then(d,h):p(s[0][2],m)}(n[m](g))}catch(b){p(s[0][3],b)}}function d(m){l("next",m)}function h(m){l("throw",m)}function p(m,g){m(g),s.shift(),s.length&&l(s[0][0],s[0][1])}}(this,arguments,function*(){const e=i.getReader();try{for(;;){const{value:n,done:r}=yield ha(e.read());if(r)return yield ha(void 0);yield yield ha(n)}}finally{e.releaseLock()}})}function v0(i){return ln(i?.getReader)}function wr(i){if(i instanceof In)return i;if(null!=i){if(f0(i))return function LE(i){return new In(t=>{const e=i[Kg]();if(ln(e.subscribe))return e.subscribe(t);throw new TypeError("Provided object does not correctly implement Symbol.observable")})}(i);if(i_(i))return function NE(i){return new In(t=>{for(let e=0;e{i.then(e=>{t.closed||(t.next(e),t.complete())},e=>t.error(e)).then(null,Ci)})}(i);if(p0(i))return y0(i);if(Bf(i))return function UE(i){return new In(t=>{for(const e of i)if(t.next(e),t.closed)return;t.complete()})}(i);if(v0(i))return function b0(i){return y0(_0(i))}(i)}throw m0(i)}function y0(i){return new In(t=>{(function VE(i,t){var e,n,r,s;return function gd(i,t,e,n){return new(e||(e=Promise))(function(s,o){function a(d){try{c(n.next(d))}catch(h){o(h)}}function l(d){try{c(n.throw(d))}catch(h){o(h)}}function c(d){d.done?s(d.value):function r(s){return s instanceof e?s:new e(function(o){o(s)})}(d.value).then(a,l)}c((n=n.apply(i,t||[])).next())})}(this,void 0,void 0,function*(){try{for(e=Nf(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 Ya(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 nr(i,t,e=1/0){return ln(t)?nr((n,r)=>et((s,o)=>t(n,s,r,o))(wr(i(n,r))),e):("number"==typeof t&&(e=t),ti((n,r)=>function zE(i,t,e,n,r,s,o,a){const l=[];let c=0,d=0,h=!1;const p=()=>{h&&!l.length&&!c&&t.complete()},m=b=>c{s&&t.next(b),c++;let v=!1;wr(e(b,d++)).subscribe(Yn(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(Yn(t,m,()=>{h=!0,p()})),()=>{a?.()}}(n,r,i,e)))}function yd(i=1/0){return nr($a,i)}const po=new In(i=>i.complete());function Hu(i){return i&&ln(i.schedule)}function a_(i){return i[i.length-1]}function x0(i){return ln(a_(i))?i.pop():void 0}function Gu(i){return Hu(a_(i))?i.pop():void 0}function l_(i,t=0){return ti((e,n)=>{e.subscribe(Yn(n,r=>Ya(n,i,()=>n.next(r),t),()=>Ya(n,i,()=>n.complete(),t),r=>Ya(n,i,()=>n.error(r),t)))})}function c_(i,t=0){return ti((e,n)=>{n.add(i.schedule(()=>e.subscribe(n),t))})}function d_(i,t){if(!i)throw new Error("Iterable cannot be null");return new In(e=>{Ya(e,t,()=>{const n=i[Symbol.asyncIterator]();Ya(e,t,()=>{n.next().then(r=>{r.done?e.complete():e.next(r.value)})},0,!0)})})}function Ni(i,t){return t?function C0(i,t){if(null!=i){if(f0(i))return function GE(i,t){return wr(i).pipe(c_(t),l_(t))}(i,t);if(i_(i))return function WE(i,t){return new In(e=>{let n=0;return t.schedule(function(){n===i.length?e.complete():(e.next(i[n++]),e.closed||this.schedule())})})}(i,t);if(r_(i))return function $E(i,t){return wr(i).pipe(c_(t),l_(t))}(i,t);if(p0(i))return d_(i,t);if(Bf(i))return function jE(i,t){return new In(e=>{let n;return Ya(e,t,()=>{n=i[g0](),Ya(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)}),()=>ln(n?.return)&&n.return()})}(i,t);if(v0(i))return function M0(i,t){return d_(_0(i),t)}(i,t)}throw m0(i)}(i,t):wr(i)}function Mr(...i){const t=Gu(i),e=function w0(i,t){return"number"==typeof a_(i)?i.pop():t}(i,1/0),n=i;return n.length?1===n.length?wr(n[0]):yd(e)(Ni(n,t)):po}function Uf(i={}){const{connector:t=(()=>new Re),resetOnError:e=!0,resetOnComplete:n=!0,resetOnRefCountZero:r=!0}=i;return s=>{let o,a,l,c=0,d=!1,h=!1;const p=()=>{a?.unsubscribe(),a=void 0},m=()=>{p(),o=l=void 0,d=h=!1},g=()=>{const b=o;m(),b?.unsubscribe()};return ti((b,v)=>{c++,!h&&!d&&p();const y=l=l??t();v.add(()=>{c--,0===c&&!h&&!d&&(a=bd(g,r))}),y.subscribe(v),!o&&c>0&&(o=new da({next:M=>y.next(M),error:M=>{h=!0,p(),a=bd(m,e,M),y.error(M)},complete:()=>{d=!0,p(),a=bd(m,n),y.complete()}}),wr(b).subscribe(o))})(s)}}function bd(i,t,...e){if(!0===t)return void i();if(!1===t)return;const n=new da({next:()=>{n.unsubscribe(),i()}});return wr(t(...e)).subscribe(n)}function li(i){for(let t in i)if(i[t]===li)return t;throw Error("Could not find renamed property on target object.")}function u_(i,t){for(const e in t)t.hasOwnProperty(e)&&!i.hasOwnProperty(e)&&(i[e]=t[e])}function fi(i){if("string"==typeof i)return i;if(Array.isArray(i))return"["+i.map(fi).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 Vf(i,t){return null==i||""===i?null===t?"":t:null==t||""===t?i:i+" "+t}const h_=li({__forward_ref__:li});function Gn(i){return i.__forward_ref__=Gn,i.toString=function(){return fi(this())},i}function kt(i){return $u(i)?i():i}function $u(i){return"function"==typeof i&&i.hasOwnProperty(h_)&&i.__forward_ref__===Gn}function Wu(i){return i&&!!i.\u0275providers}const Yu="https://g.co/ng/security#xss";class pe extends Error{constructor(t,e){super(zf(t,e)),this.code=t}}function zf(i,t){return`NG0${Math.abs(i)}${t?": "+t.trim():""}`}function Qt(i){return"string"==typeof i?i:null==i?"":String(i)}function Hf(i,t){throw new pe(-201,!1)}function En(i,t){null==i&&function ni(i,t,e,n){throw new Error(`ASSERTION ERROR: ${i}`+(null==n?"":` [Expected=> ${e} ${n} ${t} <=Actual]`))}(t,i,null,"!=")}function ke(i){return{token:i.token,providedIn:i.providedIn||null,factory:i.factory,value:void 0}}function Kt(i){return{providers:i.providers||[],imports:i.imports||[]}}function Gf(i){return f_(i,xd)||f_(i,m_)}function f_(i,t){return i.hasOwnProperty(t)?i[t]:null}function p_(i){return i&&(i.hasOwnProperty(gs)||i.hasOwnProperty(A0))?i[gs]:null}const xd=li({\u0275prov:li}),gs=li({\u0275inj:li}),m_=li({ngInjectableDef:li}),A0=li({ngInjectorDef:li});var Pt=(()=>((Pt=Pt||{})[Pt.Default=0]="Default",Pt[Pt.Host=1]="Host",Pt[Pt.Self=2]="Self",Pt[Pt.SkipSelf=4]="SkipSelf",Pt[Pt.Optional=8]="Optional",Pt))();let $f;function Ys(i){const t=$f;return $f=i,t}function _s(i,t,e){const n=Gf(i);return n&&"root"==n.providedIn?void 0===n.value?n.value=n.factory():n.value:e&Pt.Optional?null:void 0!==t?t:void Hf(fi(i))}const Rn=(()=>typeof globalThis<"u"&&globalThis||typeof global<"u"&&global||typeof window<"u"&&window||typeof self<"u"&&typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&self)(),Rl={},Xu="__NG_DI_FLAG__",pi="ngTempTokenPath",kl="ngTokenPath",g_=/\n/gm,eA="\u0275",Wf="__source";let Ku;function wd(i){const t=Ku;return Ku=i,t}function tA(i,t=Pt.Default){if(void 0===Ku)throw new pe(-203,!1);return null===Ku?_s(i,void 0,t):Ku.get(i,t&Pt.Optional?null:void 0,t)}function ee(i,t=Pt.Default){return(function D0(){return $f}()||tA)(kt(i),t)}function Ot(i,t=Pt.Default){return ee(i,jf(t))}function jf(i){return typeof i>"u"||"number"==typeof i?i:0|(i.optional&&8)|(i.host&&1)|(i.self&&2)|(i.skipSelf&&4)}function Yf(i){const t=[];for(let e=0;e((mo=mo||{})[mo.OnPush=0]="OnPush",mo[mo.Default=1]="Default",mo))(),qs=(()=>{return(i=qs||(qs={}))[i.Emulated=0]="Emulated",i[i.None=2]="None",i[i.ShadowDom=3]="ShadowDom",qs;var i})();const Xa={},$n=[],Br=li({\u0275cmp:li}),Qu=li({\u0275dir:li}),_c=li({\u0275pipe:li}),y_=li({\u0275mod:li}),fa=li({\u0275fac:li}),Ju=li({__NG_ELEMENT_ID__:li});let nA=0;function ot(i){return qa(()=>{const t=go(i),e={...t,decls:i.decls,vars:i.vars,template:i.template,consts:i.consts||null,ngContentSelectors:i.ngContentSelectors,onPush:i.changeDetection===mo.OnPush,directiveDefs:null,pipeDefs:null,dependencies:t.standalone&&i.dependencies||null,getStandaloneInjector:null,data:i.data||{},encapsulation:i.encapsulation||qs.Emulated,id:"c"+nA++,styles:i.styles||$n,_:null,schemas:i.schemas||null,tView:null};b_(e);const n=i.dependencies;return e.directiveDefs=Xf(n,!1),e.pipeDefs=Xf(n,!0),e})}function eh(i,t,e){const n=i.\u0275cmp;n.directiveDefs=Xf(t,!1),n.pipeDefs=Xf(e,!0)}function iA(i){return Hn(i)||Ur(i)}function Cd(i){return null!==i}function nn(i){return qa(()=>({type:i.type,bootstrap:i.bootstrap||$n,declarations:i.declarations||$n,imports:i.imports||$n,exports:i.exports||$n,transitiveCompileScopes:null,schemas:i.schemas||null,id:i.id||null}))}function qf(i,t){if(null==i)return Xa;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 ve(i){return qa(()=>{const t=go(i);return b_(t),t})}function Gi(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 Hn(i){return i[Br]||null}function Ur(i){return i[Qu]||null}function vs(i){return i[_c]||null}function ur(i,t){const e=i[y_]||null;if(!e&&!0===t)throw new Error(`Type ${fi(i)} does not have '\u0275mod' property.`);return e}function go(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||$n,viewQuery:i.viewQuery||null,features:i.features||null,setInput:null,findHostDirectiveDefs:null,hostDirectives:null,inputs:qf(i.inputs,t),outputs:qf(i.outputs)}}function b_(i){i.features?.forEach(t=>t(i))}function Xf(i,t){if(!i)return null;const e=t?vs:iA;return()=>("function"==typeof i?i():i).map(n=>e(n)).filter(Cd)}const Ka=0,at=1,fn=2,Bi=3,ys=4,X=5,ue=6,oe=7,Be=8,$t=9,Vn=10,yt=11,oi=12,vc=13,I0=14,Sr=15,ir=16,th=17,Vo=18,Xs=19,Pl=20,ii=21,yi=22,Ed=1,R0=2,Kf=7,Zf=8,Za=9,Ui=10;function bs(i){return Array.isArray(i)&&"object"==typeof i[Ed]}function xs(i){return Array.isArray(i)&&!0===i[Ed]}function Qf(i){return 0!=(4&i.flags)}function Ad(i){return i.componentOffset>-1}function yc(i){return 1==(1&i.flags)}function _o(i){return!!i.template}function nh(i){return 0!=(256&i[fn])}function Qa(i,t){return i.hasOwnProperty(fa)?i[fa]:null}class Td{constructor(t,e,n){this.previousValue=t,this.currentValue=e,this.firstChange=n}isFirstChange(){return this.firstChange}}function bi(){return Id}function Id(i){return i.type.prototype.ngOnChanges&&(i.setInput=Rd),tp}function tp(){const i=L0(this),t=i?.current;if(t){const e=i.previous;if(e===Xa)i.previous=t;else for(let n in t)e[n]=t[n];i.current=null,this.ngOnChanges(t)}}function Rd(i,t,e,n){const r=this.declaredInputs[e],s=L0(i)||function lA(i,t){return i[F0]=t}(i,{previous:Xa,current:null}),o=s.current||(s.current={}),a=s.previous,l=a[r];o[r]=new Td(l&&l.currentValue,t,a===Xa),i[n]=t}bi.ngInherit=!0;const F0="__ngSimpleChanges__";function L0(i){return i[F0]||null}const Qr=function(i,t,e){},kd="svg";function I(i){for(;Array.isArray(i);)i=i[Ka];return i}function bc(i,t){return I(t[i])}function Ei(i,t){return I(t[i.index])}function N0(i,t){return i.data[t]}function Od(i,t){return i[t]}function ws(i,t){const e=t[i];return bs(e)?e:e[Ka]}function np(i){return 64==(64&i[fn])}function Ol(i,t){return null==t?null:i[t]}function B0(i){i[Vo]=0}function A_(i,t){i[X]+=t;let e=i,n=i[Bi];for(;null!==n&&(1===t&&1===e[X]||-1===t&&0===e[X]);)n[X]+=t,e=n,n=n[Bi]}const Rt={lFrame:el(null),bindingsEnabled:!0};function pa(){return Rt.bindingsEnabled}function Se(){return Rt.lFrame.lView}function zn(){return Rt.lFrame.tView}function cn(i){return Rt.lFrame.contextLView=i,i[Be]}function Gt(i){return Rt.lFrame.contextLView=null,i}function Er(){let i=V0();for(;null!==i&&64===i.type;)i=i.parent;return i}function V0(){return Rt.lFrame.currentTNode}function ma(i,t){const e=Rt.lFrame;e.currentTNode=i,e.isParent=t}function D_(){return Rt.lFrame.isParent}function T_(){Rt.lFrame.isParent=!1}function Vr(){const i=Rt.lFrame;let t=i.bindingRootIndex;return-1===t&&(t=i.bindingRootIndex=i.tView.bindingStartIndex),t}function Fl(){return Rt.lFrame.bindingIndex++}function Ks(i){const t=Rt.lFrame,e=t.bindingIndex;return t.bindingIndex=t.bindingIndex+i,e}function G0(i,t){const e=Rt.lFrame;e.bindingIndex=e.bindingRootIndex=i,zo(t)}function zo(i){Rt.lFrame.currentDirectiveIndex=i}function ih(i){const t=Rt.lFrame.currentDirectiveIndex;return-1===t?null:i[t]}function Ll(){return Rt.lFrame.currentQueryIndex}function Ms(i){Rt.lFrame.currentQueryIndex=i}function vA(i){const t=i[at];return 2===t.type?t.declTNode:1===t.type?i[ue]:null}function R_(i,t,e){if(e&Pt.SkipSelf){let r=t,s=i;for(;!(r=r.parent,null!==r||e&Pt.Host||(r=vA(s),null===r||(s=s[Sr],10&r.type))););if(null===r)return!1;t=r,i=s}const n=Rt.lFrame=Fd();return n.currentTNode=t,n.lView=i,!0}function rp(i){const t=Fd(),e=i[at];Rt.lFrame=t,t.currentTNode=e.firstChild,t.lView=i,t.tView=e,t.contextLView=i,t.bindingIndex=e.bindingStartIndex,t.inI18n=!1}function Fd(){const i=Rt.lFrame,t=null===i?null:i.child;return null===t?el(i):t}function el(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 k_(){const i=Rt.lFrame;return Rt.lFrame=i.parent,i.currentTNode=null,i.lView=null,i}const $0=k_;function Ld(){const i=k_();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 Xn(){return Rt.lFrame.selectedIndex}function tl(i){Rt.lFrame.selectedIndex=i}function Ai(){const i=Rt.lFrame;return N0(i.tView,i.selectedIndex)}function ki(){Rt.lFrame.currentNamespace=kd}function ga(){!function wc(){Rt.lFrame.currentNamespace=null}()}function Nd(i,t){for(let e=t.directiveStart,n=t.directiveEnd;e=n)break}else t[l]<0&&(i[Vo]+=65536),(a>11>16&&(3&i[fn])===t){i[fn]+=2048,Qr(4,a,s);try{s.call(a)}finally{Qr(5,a,s)}}}else{Qr(4,a,s);try{s.call(a)}finally{Qr(5,a,s)}}}const _a=-1;class Bd{constructor(t,e,n){this.factory=t,this.resolving=!1,this.canSeeViewProviders=e,this.injectImpl=n}}function L_(i,t,e){let n=0;for(;nt){o=s-1;break}}}for(;s>16}(i),n=t;for(;e>0;)n=n[Sr],e--;return n}let Ud=!0;function cp(i){const t=Ud;return Ud=i,t}const B_=255,K0=5;let Z0=0;const va={};function oh(i,t){const e=Q0(i,t);if(-1!==e)return e;const n=t[at];n.firstCreatePass&&(i.injectorIndex=t.length,ah(n.data,i),ah(t,null),ah(n.blueprint,null));const r=lh(i,t),s=i.injectorIndex;if(lp(r)){const o=rh(r),a=sh(r,t),l=a[at].data;for(let c=0;c<8;c++)t[s+c]=a[o+c]|l[o+c]}return t[s+8]=r,s}function ah(i,t){i.push(0,0,0,0,0,0,0,0,t)}function Q0(i,t){return-1===i.injectorIndex||i.parent&&i.parent.injectorIndex===i.injectorIndex||null===t[i.injectorIndex+8]?-1:i.injectorIndex}function lh(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=dh(r),null===n)return _a;if(e++,r=r[Sr],-1!==n.injectorIndex)return n.injectorIndex|e<<16}return _a}function pn(i,t,e){!function U_(i,t,e){let n;"string"==typeof e?n=e.charCodeAt(0)||0:e.hasOwnProperty(Ju)&&(n=e[Ju]),null==n&&(n=e[Ju]=Z0++);const r=n&B_;t.data[i+(r>>K0)]|=1<=0?t&B_:Zs:t}(e);if("function"==typeof s){if(!R_(t,i,n))return n&Pt.Host?J0(r,0,n):Vd(t,e,n,r);try{const o=s(n);if(null!=o||n&Pt.Optional)return o;Hf()}finally{$0()}}else if("number"==typeof s){let o=null,a=Q0(i,t),l=_a,c=n&Pt.Host?t[ir][ue]:null;for((-1===a||n&Pt.SkipSelf)&&(l=-1===a?lh(i,t):t[a+8],l!==_a&&z_(n,!1)?(o=t[at],a=rh(l),t=sh(l,t)):a=-1);-1!==a;){const d=t[at];if(up(s,a,d.data)){const h=EA(a,t,e,o,n,c);if(h!==va)return h}l=t[a+8],l!==_a&&z_(n,t[at].data[a+8]===c)&&up(s,a,t)?(o=d,a=rh(l),t=sh(l,t)):a=-1}}return r}function EA(i,t,e,n,r,s){const o=t[at],a=o.data[i+8],d=ts(a,o,e,null==n?Ad(a)&&Ud:n!=o&&0!=(3&a.type),r&Pt.Host&&s===a);return null!==d?Sc(t,o,d,a):va}function ts(i,t,e,n,r){const s=i.providerIndexes,o=t.data,a=1048575&s,l=i.directiveStart,d=s>>20,p=r?a+d:i.directiveEnd;for(let m=n?a:a+d;m=l&&g.type===e)return m}if(r){const m=o[l];if(m&&_o(m)&&m.type===e)return l}return null}function Sc(i,t,e,n){let r=i[e];const s=t.data;if(function xA(i){return i instanceof Bd}(r)){const o=r;o.resolving&&function S0(i,t){const e=t?`. Dependency path: ${t.join(" > ")} > ${i}`:"";throw new pe(-200,`Circular dependency in DI detected for ${i}${e}`)}(function qn(i){return"function"==typeof i?i.name||i.toString():"object"==typeof i&&null!=i&&"function"==typeof i.type?i.type.name||i.type.toString():Qt(i)}(s[e]));const a=cp(o.canSeeViewProviders);o.resolving=!0;const l=o.injectImpl?Ys(o.injectImpl):null;R_(i,n,Pt.Default);try{r=i[e]=o.factory(void 0,s,i,n),t.firstCreatePass&&e>=n.directiveStart&&function es(i,t,e){const{ngOnChanges:n,ngOnInit:r,ngDoCheck:s}=t.type.prototype;if(n){const o=Id(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&&Ys(l),cp(a),o.resolving=!1,$0()}}return r}function up(i,t,e){return!!(e[t+(i>>K0)]&1<{const t=i.prototype.constructor,e=t[fa]||ch(t),n=Object.prototype;let r=Object.getPrototypeOf(i.prototype).constructor;for(;r&&r!==n;){const s=r[fa]||ch(r);if(s&&s!==e)return s;r=Object.getPrototypeOf(r)}return s=>new s})}function ch(i){return $u(i)?()=>{const t=ch(kt(i));return t&&t()}:Qa(i)}function dh(i){const t=i[at],e=t.type;return 2===e?t.declTNode:1===e?i[ue]:null}function ya(i){return function SA(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 ba(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,d){const h=l.hasOwnProperty(Ac)?l[Ac]:Object.defineProperty(l,Ac,{value:[]})[Ac];for(;h.length<=d;)h.push(null);return(h[d]=h[d]||[]).push(o),l}}return e&&(r.prototype=Object.create(e.prototype)),r.prototype.ngMetadataName=i,r.annotationCls=r,r})}class me{constructor(t,e){this._desc=t,this.ngMetadataName="InjectionToken",this.\u0275prov=void 0,"number"==typeof e?this.__NG_ELEMENT_ID__=e:void 0!==e&&(this.\u0275prov=ke({token:this,providedIn:e.providedIn||"root",factory:e.factory}))}get multi(){return this}toString(){return`InjectionToken ${this._desc}`}}function Ul(i,t){i.forEach(e=>Array.isArray(e)?Ul(e,t):t(e))}function G_(i,t,e){t>=i.length?i.push(e):i.splice(t,0,e)}function pp(i,t){return t>=i.length-1?i.pop():i.splice(t,1)[0]}function Gd(i,t){const e=[];for(let n=0;n=0?i[1|n]=e:(n=~n,function IA(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 Wd(i,t){const e=Tc(i,t);if(e>=0)return i[1|e]}function Tc(i,t){return function gp(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),Ss=Md(zd("Optional"),8),xa=Md(zd("SkipSelf"),4);var Es=(()=>((Es=Es||{})[Es.Important=1]="Important",Es[Es.DashCase=2]="DashCase",Es))();const Cp=new Map;let _x=0;const iv="__ngContext__";function Hr(i,t){bs(t)?(i[iv]=t[Pl],function vx(i){Cp.set(i[Pl],i)}(t)):i[iv]=t}let sv;function ov(i,t){return sv(i,t)}function _h(i){const t=i[Bi];return xs(t)?t[Bi]:t}function av(i){return Ax(i[vc])}function lv(i){return Ax(i[ys])}function Ax(i){for(;null!==i&&!xs(i);)i=i[ys];return i}function Tr(i,t,e,n,r){if(null!=n){let s,o=!1;xs(n)?s=n:bs(n)&&(o=!0,n=n[Ka]);const a=I(n);0===i&&null!==e?null==r?Px(t,e,a):kc(t,e,a,r||null,!0):1===i&&null!==e?kc(t,e,a,r||null,!0):2===i?function mv(i,t,e){const n=Ap(i,t);n&&function QA(i,t,e,n){i.removeChild(t,e,n)}(i,n,t,e)}(t,a,o):3===i&&t.destroyNode(a),null!=s&&function Vx(i,t,e,n,r){const s=e[Kf];s!==I(e)&&Tr(t,i,n,s,r);for(let a=Ui;a0&&(i[e-1][ys]=n[ys]);const s=pp(i,Ui+t);!function WA(i,t){yh(i,t,t[yt],2,null,null),t[Ka]=null,t[ue]=null}(n[at],n);const o=s[Xs];null!==o&&o.detachView(s[at]),n[Bi]=null,n[ys]=null,n[fn]&=-65}return n}function Ix(i,t){if(!(128&t[fn])){const e=t[yt];e.destroyNode&&yh(i,t,e,3,null,null),function qA(i){let t=i[vc];if(!t)return hv(i[at],i);for(;t;){let e=null;if(bs(t))e=t[vc];else{const n=t[Ui];n&&(e=n)}if(!e){for(;t&&!t[ys]&&t!==i;)bs(t)&&hv(t[at],t),t=t[Bi];null===t&&(t=i),bs(t)&&hv(t[at],t),e=t&&t[ys]}t=e}}(t)}}function hv(i,t){if(!(128&t[fn])){t[fn]&=-65,t[fn]|=128,function ZA(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===qs.None||s===qs.Emulated)return null}return Ei(n,e)}}(i,t.parent,e)}function kc(i,t,e,n,r){i.insertBefore(t,e,n,r)}function Px(i,t,e){i.appendChild(t,e)}function Ox(i,t,e,n,r){null!==n?kc(i,t,e,n,r):Px(i,t,e)}function Ap(i,t){return i.parentNode(t)}function Fx(i,t,e){return Nx(i,t,e)}let fv,Rp,vv,Nx=function Lx(i,t,e){return 40&i.type?Ei(i,e):null};function vh(i,t,e,n){const r=Rx(i,n,t),s=t[yt],a=Fx(n.parent||t[ue],n,t);if(null!=r)if(Array.isArray(e))for(let l=0;li,createScript:i=>i,createScriptURL:i=>i})}catch{}return Rp}()?.createHTML(i)||i}class Vl{constructor(t){this.changingThisBreaksApplicationSecurity=t}toString(){return`SafeValue must use [property]=binding: ${this.changingThisBreaksApplicationSecurity} (see ${Yu})`}}class oD extends Vl{getTypeName(){return"HTML"}}class aD extends Vl{getTypeName(){return"Style"}}class lD extends Vl{getTypeName(){return"Script"}}class cD extends Vl{getTypeName(){return"URL"}}class Pp extends Vl{getTypeName(){return"ResourceURL"}}function Js(i){return i instanceof Vl?i.changingThisBreaksApplicationSecurity:i}function Ma(i,t){const e=function dD(i){return i instanceof Vl&&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 ${Yu})`)}return e===t}class gD{constructor(t){this.inertDocumentHelper=t}getInertBodyElement(t){t=""+t;try{const e=(new window.DOMParser).parseFromString(jd(t),"text/html").body;return null===e?this.inertDocumentHelper.getInertBodyElement(t):(e.removeChild(e.firstChild),e)}catch{return null}}}class _D{constructor(t){this.defaultDoc=t,this.inertDocument=this.defaultDoc.implementation.createHTMLDocument("sanitization-inert")}getInertBodyElement(t){const e=this.inertDocument.createElement("template");return e.innerHTML=jd(t),e}}const vD=/^(?!javascript:)(?:[a-z0-9+.-]+:|[^&:\/?#]*(?:[\/?#]|$))/i;function bh(i){return(i=String(i)).match(vD)?i:"unsafe:"+i}function Ca(i){const t={};for(const e of i.split(","))t[e]=!0;return t}function Pc(...i){const t={};for(const e of i)for(const n in e)e.hasOwnProperty(n)&&(t[n]=!0);return t}const xv=Ca("area,br,col,hr,img,wbr"),wv=Ca("colgroup,dd,dt,li,p,tbody,td,tfoot,th,thead,tr"),Mv=Ca("rp,rt"),Cv=Pc(xv,Pc(wv,Ca("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")),Pc(Mv,Ca("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")),Pc(Mv,wv)),Yd=Ca("background,cite,href,itemtype,longdesc,poster,src,xlink:href"),Yx=Pc(Yd,Ca("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"),Ca("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")),Ev=Ca("script,style,template");class qx{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(!Cv.hasOwnProperty(e))return this.sanitizedSomething=!0,!Ev.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();Cv.hasOwnProperty(e)&&!xv.hasOwnProperty(e)&&(this.buf.push(""))}chars(t){this.buf.push(Xx(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 bD=/[\uD800-\uDBFF][\uDC00-\uDFFF]/g,xD=/([^\#-~ |!])/g;function Xx(i){return i.replace(/&/g,"&").replace(bD,function(t){return"&#"+(1024*(t.charCodeAt(0)-55296)+(t.charCodeAt(1)-56320)+65536)+";"}).replace(xD,function(t){return"&#"+t.charCodeAt(0)+";"}).replace(//g,">")}let Fp;function Kx(i,t){let e=null;try{Fp=Fp||function jx(i){const t=new _D(i);return function Op(){try{return!!(new window.DOMParser).parseFromString(jd(""),"text/html")}catch{return!1}}()?new gD(t):t}(i);let n=t?String(t):"";e=Fp.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=Fp.getInertBodyElement(n)}while(n!==s);return jd((new qx).sanitizeChildren(Av(e)||e))}finally{if(e){const n=Av(e)||e;for(;n.firstChild;)n.removeChild(n.firstChild)}}}function Av(i){return"content"in i&&function wD(i){return i.nodeType===Node.ELEMENT_NODE&&"TEMPLATE"===i.nodeName}(i)?i.content:null}var Kn=(()=>((Kn=Kn||{})[Kn.NONE=0]="NONE",Kn[Kn.HTML=1]="HTML",Kn[Kn.STYLE=2]="STYLE",Kn[Kn.SCRIPT=3]="SCRIPT",Kn[Kn.URL=4]="URL",Kn[Kn.RESOURCE_URL=5]="RESOURCE_URL",Kn))();function Lp(i){const t=function xi(){const i=Se();return i&&i[oi]}();return t?t.sanitize(Kn.URL,i)||"":Ma(i,"URL")?Js(i):bh(Qt(i))}const Np=new me("ENVIRONMENT_INITIALIZER"),rl=new me("INJECTOR",-1),Qx=new me("INJECTOR_DEF_TYPES");class Jx{get(t,e=Rl){if(e===Rl){const n=new Error(`NullInjectorError: No provider for ${fi(t)}!`);throw n.name="NullInjectorError",n}return e}}function AD(...i){return{\u0275providers:ew(0,i),\u0275fromNgModule:!0}}function ew(i,...t){const e=[],n=new Set;let r;return Ul(t,s=>{const o=s;Dv(o,e,[],n)&&(r||(r=[]),r.push(o))}),void 0!==r&&Bp(r,e),e}function Bp(i,t){for(let e=0;e{t.push(s)})}}function Dv(i,t,e,n){if(!(i=kt(i)))return!1;let r=null,s=p_(i);const o=!s&&Hn(i);if(s||o){if(o&&!o.standalone)return!1;r=i}else{const l=i.ngModule;if(s=p_(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)Dv(c,t,e,n)}}else{if(!s)return!1;{if(null!=s.imports&&!a){let c;n.add(r);try{Ul(s.imports,d=>{Dv(d,t,e,n)&&(c||(c=[]),c.push(d))})}finally{}void 0!==c&&Bp(c,t)}if(!a){const c=Qa(r)||(()=>new r);t.push({provide:r,useFactory:c,deps:$n},{provide:Qx,useValue:r,multi:!0},{provide:Np,useValue:()=>ee(r),multi:!0})}const l=s.providers;null==l||a||Up(l,d=>{t.push(d)})}}return r!==i&&void 0!==i.providers}function Up(i,t){for(let e of i)Wu(e)&&(e=e.\u0275providers),Array.isArray(e)?Up(e,t):t(e)}const Vp=li({provide:String,useValue:li});function wi(i){return null!==i&&"object"==typeof i&&Vp in i}function Fc(i){return"function"==typeof i}const Iv=new me("Set Injector scope."),zp={},TD={};let Rv;function xh(){return void 0===Rv&&(Rv=new Jx),Rv}class to{}class Hp extends to{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,Pv(t,o=>this.processProvider(o)),this.records.set(rl,$o(void 0,this)),r.has("environment")&&this.records.set(to,$o(void 0,this));const s=this.records.get(Iv);null!=s&&"string"==typeof s.value&&this.scopes.add(s.value),this.injectorDefTypes=new Set(this.get(Qx.multi,$n,Pt.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=wd(this),n=Ys(void 0);try{return t()}finally{wd(e),Ys(n)}}get(t,e=Rl,n=Pt.Default){this.assertNotDestroyed(),n=jf(n);const r=wd(this),s=Ys(void 0);try{if(!(n&Pt.SkipSelf)){let a=this.records.get(t);if(void 0===a){const l=function kD(i){return"function"==typeof i||"object"==typeof i&&i instanceof me}(t)&&Gf(t);a=l&&this.injectableDefInScope(l)?$o(kv(t),zp):null,this.records.set(t,a)}if(null!=a)return this.hydrate(t,a)}return(n&Pt.Self?xh():this.parent).get(t,e=n&Pt.Optional&&e===Rl?null:e)}catch(o){if("NullInjectorError"===o.name){if((o[pi]=o[pi]||[]).unshift(fi(t)),r)throw o;return function v_(i,t,e,n){const r=i[pi];throw t[Wf]&&r.unshift(t[Wf]),i.message=function T0(i,t,e,n=null){i=i&&"\n"===i.charAt(0)&&i.charAt(1)==eA?i.slice(2):i;let r=fi(t);if(Array.isArray(t))r=t.map(fi).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):fi(a)))}r=`{${s.join(", ")}}`}return`${e}${n?"("+n+")":""}[${r}]: ${i.replace(g_,"\n ")}`}("\n"+i.message,r,e,n),i[kl]=r,i[pi]=null,i}(o,t,"R3InjectorError",this.source)}throw o}finally{Ys(s),wd(r)}}resolveInjectorInitializers(){const t=wd(this),e=Ys(void 0);try{const n=this.get(Np.multi,$n,Pt.Self);for(const r of n)r()}finally{wd(t),Ys(e)}}toString(){const t=[],e=this.records;for(const n of e.keys())t.push(fi(n));return`R3Injector[${t.join(", ")}]`}assertNotDestroyed(){if(this._destroyed)throw new pe(205,!1)}processProvider(t){let e=Fc(t=kt(t))?t:kt(t&&t.provide);const n=function Gp(i){return wi(i)?$o(void 0,i.useValue):$o(As(i),zp)}(t);if(Fc(t)||!0!==t.multi)this.records.get(e);else{let r=this.records.get(e);r||(r=$o(void 0,zp,!0),r.factory=()=>Yf(r.multi),this.records.set(e,r)),e=t,r.multi.push(t)}this.records.set(e,n)}hydrate(t,e){return e.value===zp&&(e.value=TD,e.value=e.factory()),"object"==typeof e.value&&e.value&&function RD(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=kt(t.providedIn);return"string"==typeof e?"any"===e||this.scopes.has(e):this.injectorDefTypes.has(e)}}function kv(i){const t=Gf(i),e=null!==t?t.factory:Qa(i);if(null!==e)return e;if(i instanceof me)throw new pe(204,!1);if(i instanceof Function)return function tw(i){const t=i.length;if(t>0)throw Gd(t,"?"),new pe(204,!1);const e=function qu(i){return i&&(i[xd]||i[m_])||null}(i);return null!==e?()=>e.factory(i):()=>new i}(i);throw new pe(204,!1)}function As(i,t,e){let n;if(Fc(i)){const r=kt(i);return Qa(r)||kv(r)}if(wi(i))n=()=>kt(i.useValue);else if(function Tv(i){return!(!i||!i.useFactory)}(i))n=()=>i.useFactory(...Yf(i.deps||[]));else if(function Pi(i){return!(!i||!i.useExisting)}(i))n=()=>ee(kt(i.useExisting));else{const r=kt(i&&(i.useClass||i.provide));if(!function ID(i){return!!i.deps}(i))return Qa(r)||kv(r);n=()=>new r(...Yf(i.deps))}return n}function $o(i,t,e=!1){return{factory:i,value:t,multi:e?[]:void 0}}function Pv(i,t){for(const e of i)Array.isArray(e)?Pv(e,t):e&&Wu(e)?Pv(e.\u0275providers,t):t(e)}class PD{}class Ov{}class bo{resolveComponentFactory(t){throw function sl(i){const t=Error(`No component factory found for ${fi(i)}. Did you add it to @NgModule.entryComponents?`);return t.ngComponent=i,t}(t)}}let Hl=(()=>{class i{}return i.NULL=new bo,i})();function FD(){return Fn(Er(),Se())}function Fn(i,t){return new mt(Ei(i,t))}let mt=(()=>{class i{constructor(e){this.nativeElement=e}}return i.__NG_ELEMENT_ID__=FD,i})();function nw(i){return i instanceof mt?i.nativeElement:i}class Gl{}let ol=(()=>{class i{}return i.__NG_ELEMENT_ID__=()=>function LD(){const i=Se(),e=ws(Er().index,i);return(bs(e)?e:i)[yt]}(),i})(),ND=(()=>{class i{}return i.\u0275prov=ke({token:i,providedIn:"root",factory:()=>null}),i})();class Lc{constructor(t){this.full=t,this.major=t.split(".")[0],this.minor=t.split(".")[1],this.patch=t.split(".").slice(2).join(".")}}const BD=new Lc("15.2.10"),Fv={},Lv="ngOriginalError";function Nv(i){return i[Lv]}class al{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&&Nv(t);for(;e&&Nv(e);)e=Nv(e);return e||null}}function ll(i){return i instanceof Function?i():i}function rw(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 sw="ng-template";function jD(i,t,e){let n=0,r=!0;for(;ns?"":r[h+1].toLowerCase();const m=8&n?p:null;if(m&&-1!==rw(m,c,0)||2&n&&c!==p){if(Wo(n))return!1;o=!0}}}}else{if(!o&&!Wo(n)&&!Wo(l))return!1;if(o&&Wo(l))continue;o=!1,n=l|1&n}}return Wo(n)||o}function Wo(i){return 0==(1&i)}function ow(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&&!Wo(o)&&(t+=Nc(s,r),r=""),n=o,s=s||!Wo(n);e++}return""!==r&&(t+=Nc(s,r)),t}const sn={};function G(i){Hv(zn(),Se(),Xn()+i,!1)}function Hv(i,t,e,n){if(!n)if(3==(3&t[fn])){const s=i.preOrderCheckHooks;null!==s&&sp(t,s,e)}else{const s=i.preOrderHooks;null!==s&&op(t,s,0,e)}tl(e)}function cw(i,t=null,e=null,n){const r=dw(i,t,e,n);return r.resolveInjectorInitializers(),r}function dw(i,t=null,e=null,n,r=new Set){const s=[e||$n,AD(i)];return n=n||("object"==typeof i?void 0:fi(i)),new Hp(s,t||xh(),n||null,r)}let $i=(()=>{class i{static create(e,n){if(Array.isArray(e))return cw({name:""},n,e,"");{const r=e.name??"";return cw({name:r},e.parent,e.providers,r)}}}return i.THROW_IF_NOT_FOUND=Rl,i.NULL=new Jx,i.\u0275prov=ke({token:i,providedIn:"any",factory:()=>ee(rl)}),i.__NG_ELEMENT_ID__=-1,i})();function E(i,t=Pt.Default){const e=Se();return null===e?ee(i,t):V_(Er(),e,kt(i),t)}function xo(){throw new Error("invalid")}function gw(i,t){const e=i.contentQueries;if(null!==e)for(let n=0;nyi&&Hv(i,t,yi,!1),Qr(o?2:0,r),e(n,r)}finally{tl(s),Qr(o?3:1,r)}}function Zv(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,Mh(i,e,r.hostVars,sn),r)}function be(i,t,e,n,r,s){const o=Ei(i,t);!function Xe(i,t,e,n,r,s,o){if(null==s)i.removeAttribute(t,r,e);else{const a=null==o?Qt(s):o(s,n||"",r);i.setAttribute(t,r,a,e)}}(t[yt],o,s,i.value,e,n,r)}function _t(i,t,e,n,r,s){const o=s[t];if(null!==o){const a=n.setInput;for(let l=0;l0&&rs(e)}}function rs(i){for(let n=av(i);null!==n;n=lv(n))for(let r=Ui;r0&&rs(s)}const e=i[at].components;if(null!==e)for(let n=0;n0&&rs(r)}}function ss(i,t){const e=ws(t,i),n=e[at];(function io(i,t){for(let e=t.length;e-1&&(uv(t,n),pp(e,n))}this._attachedToViewContainer=!1}Ix(this._lView[at],this._lView)}onDestroy(t){yw(this._lView[at],this._lView,null,t)}markForCheck(){Ts(this._cdRefInjectingView||this._lView)}detach(){this._lView[fn]&=-65}reattach(){this._lView[fn]|=64}detectChanges(){wo(this._lView[at],this._lView,this.context)}checkNoChanges(){}attachToViewContainerRef(){if(this._appRef)throw new pe(902,!1);this._attachedToViewContainer=!0}detachFromAppRef(){this._appRef=null,function YA(i,t){yh(i,t,t[yt],2,null,null)}(this._lView[at],this._lView)}attachToAppRef(t){if(this._attachedToViewContainer)throw new pe(902,!1);this._appRef=t}}class y8 extends ny{constructor(t){super(t),this._view=t}detectChanges(){const t=this._view;wo(t[at],t,t[Be],!1)}checkNoChanges(){}get context(){return null}}class KF extends Hl{constructor(t){super(),this.ngModule=t}resolveComponentFactory(t){const e=Hn(t);return new iy(e,this.ngModule)}}function ZF(i){const t=[];for(let e in i)i.hasOwnProperty(e)&&t.push({propName:i[e],templateName:e});return t}class x8{constructor(t,e){this.injector=t,this.parentInjector=e}get(t,e,n){n=jf(n);const r=this.injector.get(t,Fv,n);return r!==Fv||e===Fv?r:this.parentInjector.get(t,e,n)}}class iy extends Ov{get inputs(){return ZF(this.componentDef.inputs)}get outputs(){return ZF(this.componentDef.outputs)}constructor(t,e){super(),this.componentDef=t,this.ngModule=e,this.componentType=t.type,this.selector=function e1(i){return i.map(JD).join(",")}(t.selectors),this.ngContentSelectors=t.ngContentSelectors?t.ngContentSelectors:[],this.isBoundToModule=!!e}create(t,e,n,r){let s=(r=r||this.ngModule)instanceof to?r:r?.injector;s&&null!==this.componentDef.getStandaloneInjector&&(s=this.componentDef.getStandaloneInjector(s)||s);const o=s?new x8(t,s):t,a=o.get(Gl,null);if(null===a)throw new pe(407,!1);const l=o.get(ND,null),c=a.createRenderer(null,this.componentDef),d=this.componentDef.selectors[0][0]||"div",h=n?function M1(i,t,e){return i.selectRootElement(t,e===qs.ShadowDom)}(c,n,this.componentDef.encapsulation):Ep(c,d,function b8(i){const t=i.toLowerCase();return"svg"===t?kd:"math"===t?"math":null}(d)),p=this.componentDef.onPush?288:272,m=ey(0,null,null,1,0,null,null,null,null,null),g=wh(null,m,null,p,null,null,a,c,l,o,null);let b,v;rp(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 M8(i,t){const e=i[at],n=yi;return i[n]=t,Zd(e,n,2,"#host",null)}(g,h),F=function C8(i,t,e,n,r,s,o,a){const l=r[at];!function S8(i,t,e,n){for(const r of i)t.mergedAttrs=Cc(t.mergedAttrs,r.hostAttrs);null!==t.mergedAttrs&&(Mw(t,t.mergedAttrs,!0),null!==e&&Hx(n,e,t))}(n,i,t,o);const c=s.createRenderer(t,e),d=wh(r,vw(e),null,e.onPush?32:16,r[i.index],i,s,c,a||null,null,null);return l.firstCreatePass&&P(l,i,n.length-1),Di(r,d),r[i.index]=d}(C,h,y,M,g,a,c);v=N0(m,yi),h&&function A8(i,t,e,n){if(n)L_(i,e,["ng-version",BD.full]);else{const{attrs:r,classes:s}=function t1(i){const t=[],e=[];let n=1,r=2;for(;n0&&zx(i,e,s.join(" "))}}(c,y,h,n),void 0!==e&&function D8(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=Cc(r.hostAttrs,e=Cc(e,r.hostAttrs))}}(n)}function P1(i){return i===Xa?{}:i===$n?[]:i}function R8(i,t){const e=i.viewQuery;i.viewQuery=e?(n,r)=>{t(n,r),e(n,r)}:t}function k8(i,t){const e=i.contentQueries;i.contentQueries=e?(n,r,s)=>{t(n,r,s),e(n,r,s)}:t}function P8(i,t){const e=i.hostBindings;i.hostBindings=e?(n,r)=>{t(n,r),e(n,r)}:t}function Sw(i){return!!O1(i)&&(Array.isArray(i)||!(i instanceof Map)&&Symbol.iterator in i)}function O1(i){return null!==i&&("function"==typeof i||"object"==typeof i)}function $l(i,t,e){return i[t]=e}function Is(i,t,e){return!Object.is(i[t],e)&&(i[t]=e,!0)}function Sh(i,t,e,n){const r=Is(i,t,e);return Is(i,t+1,n)||r}function At(i,t,e,n){const r=Se();return Is(r,Fl(),t)&&(zn(),be(Ai(),r,i,t,e,n)),At}function jp(i,t,e,n){return Is(i,Fl(),e)?t+Qt(e)+n:sn}function Yp(i,t,e,n,r,s){const a=Sh(i,function Ja(){return Rt.lFrame.bindingIndex}(),e,r);return Ks(2),a?t+Qt(e)+n+Qt(r)+s:sn}function fe(i,t,e,n,r,s,o,a){const l=Se(),c=zn(),d=i+yi,h=c.firstCreatePass?function G8(i,t,e,n,r,s,o,a,l){const c=t.consts,d=Zd(t,i,4,o||null,Ol(c,a));ty(t,e,d,Ol(c,l)),Nd(t,d);const h=d.tView=ey(2,d,n,r,s,t.directiveRegistry,t.pipeRegistry,null,t.schemas,c);return null!==t.queries&&(t.queries.template(t,d),h.queries=t.queries.embeddedTView(d)),d}(d,c,l,t,e,n,r,s,o):c.data[d];ma(h,!1);const p=l[yt].createComment("");vh(c,l,p,h),Hr(p,l),Di(l,l[d]=mn(p,l,p,h)),yc(h)&&Qv(c,l,h),null!=o&&Jv(l,h,a)}function rr(i){return Od(function gA(){return Rt.lFrame.contextLView}(),yi+i)}function U(i,t,e){const n=Se();return Is(n,Fl(),t)&&no(zn(),Ai(),n,i,t,n[yt],e,!1),U}function F1(i,t,e,n,r){const o=r?"class":"style";k1(i,e,t.inputs[o],o,n)}function W(i,t,e,n){const r=Se(),s=zn(),o=yi+i,a=r[yt],l=s.firstCreatePass?function W8(i,t,e,n,r,s){const o=t.consts,l=Zd(t,i,2,n,Ol(o,r));return ty(t,e,l,Ol(o,s)),null!==l.attrs&&Mw(l,l.attrs,!1),null!==l.mergedAttrs&&Mw(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]=Ep(a,t,function j0(){return Rt.lFrame.currentNamespace}()),d=yc(l);return ma(l,!0),Hx(a,c,l),32!=(32&l.flags)&&vh(s,r,c,l),0===function uA(){return Rt.lFrame.elementDepthCount}()&&Hr(c,r),function hA(){Rt.lFrame.elementDepthCount++}(),d&&(Qv(s,r,l),Zv(s,l,r)),null!==n&&Jv(r,l),W}function Y(){let i=Er();D_()?T_():(i=i.parent,ma(i,!1));const t=i;!function fA(){Rt.lFrame.elementDepthCount--}();const e=zn();return e.firstCreatePass&&(Nd(e,i),Qf(i)&&e.queries.elementEnd(i)),null!=t.classesWithoutHost&&function wA(i){return 0!=(8&i.flags)}(t)&&F1(e,t,Se(),t.classesWithoutHost,!0),null!=t.stylesWithoutHost&&function F_(i){return 0!=(16&i.flags)}(t)&&F1(e,t,Se(),t.stylesWithoutHost,!1),Y}function Te(i,t,e,n){return W(i,t,e,n),Y(),Te}function Gr(i,t,e){const n=Se(),r=zn(),s=i+yi,o=r.firstCreatePass?function j8(i,t,e,n,r){const s=t.consts,o=Ol(s,n),a=Zd(t,i,8,"ng-container",o);return null!==o&&Mw(a,o,!0),ty(t,e,a,Ol(s,r)),null!==t.queries&&t.queries.elementStart(t,a),a}(s,r,n,t,e):r.data[s];ma(o,!0);const a=n[s]=n[yt].createComment("");return vh(r,n,a,o),Hr(a,n),yc(o)&&(Qv(r,n,o),Zv(r,o,n)),null!=e&&Jv(n,o),Gr}function $r(){let i=Er();const t=zn();return D_()?T_():(i=i.parent,ma(i,!1)),t.firstCreatePass&&(Nd(t,i),Qf(i)&&t.queries.elementEnd(i)),$r}function sy(i,t,e){return Gr(i,t,e),$r(),sy}function mi(){return Se()}function oy(i){return!!i&&"function"==typeof i.then}function uL(i){return!!i&&"function"==typeof i.subscribe}const L1=uL;function Ue(i,t,e,n){const r=Se(),s=zn(),o=Er();return hL(s,r,r[yt],o,i,t,n),Ue}function N1(i,t){const e=Er(),n=Se(),r=zn();return hL(r,n,qF(ih(r.data),e,n),e,i,t),N1}function hL(i,t,e,n,r,s,o){const a=yc(n),c=i.firstCreatePass&&YF(i),d=t[Be],h=jF(t);let p=!0;if(3&n.type||o){const b=Ei(n,t),v=o?o(b):b,y=h.length,M=o?C=>o(I(C[n.index])):n.index;let x=null;if(!o&&a&&(x=function Y8(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=pL(n,t,d,s,!1);const C=e.listen(v,r,s);h.push(s,C),c&&c.push(r,M,y,y+1)}}else s=pL(n,t,d,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?ws(i.index,t):t);let l=fL(t,e,n,o),c=s.__ngNextListenerFn__;for(;c;)l=fL(t,e,c,o)&&l,c=c.__ngNextListenerFn__;return r&&!1===l&&(o.preventDefault(),o.returnValue=!1),l}}function he(i=1){return function yA(i){return(Rt.lFrame.contextLView=function W0(i,t){for(;i>0;)t=t[Sr],i--;return t}(i,Rt.lFrame.contextLView))[Be]}(i)}function q8(i,t){let e=null;const n=function XD(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 V1(i){return 2|i}function Eh(i){return(131068&i)>>2}function z1(i,t){return-131069&i|t<<2}function H1(i){return 1|i}function ML(i,t,e,n,r){const s=i[e+1],o=null===t;let a=n?Jd(s):Eh(s),l=!1;for(;0!==a&&(!1===l||o);){const d=i[a+1];eW(i[a],t)&&(l=!0,i[a+1]=n?H1(d):V1(d)),a=n?Jd(d):Eh(d)}l&&(i[e+1]=n?V1(s):H1(s))}function eW(i,t){return null===i||null==t||(Array.isArray(i)?i[1]:i)===t||!(!Array.isArray(i)||"string"!=typeof t)&&Tc(i,t)>=0}const Ir={textEnd:0,key:0,keyEnd:0,value:0,valueEnd:0};function CL(i){return i.substring(Ir.key,Ir.keyEnd)}function SL(i,t){const e=Ir.textEnd;return e===t?-1:(t=Ir.keyEnd=function rW(i,t,e){for(;t32;)t++;return t}(i,Ir.key=t,e),em(i,t,e))}function em(i,t,e){for(;t=0;e=SL(t,e))Cs(i,CL(t),!0)}function cl(i,t,e,n){const r=Se(),s=zn(),o=Ks(2);s.firstUpdatePass&&RL(s,i,o,n),t!==sn&&Is(r,o,t)&&PL(s,s.data[Xn()],r,r[yt],i,r[o+1]=function gW(i,t){return null==i||""===i||("string"==typeof t?i+=t:"object"==typeof i&&(i=fi(Js(i)))),i}(t,e),n,o)}function IL(i,t){return t>=i.expandoStartIndex}function RL(i,t,e,n){const r=i.data;if(null===r[e+1]){const s=r[Xn()],o=IL(i,e);FL(s,n)&&null===t&&!o&&(t=!1),t=function cW(i,t,e,n){const r=ih(i);let s=n?t.residualClasses:t.residualStyles;if(null===r)0===(n?t.classBindings:t.styleBindings)&&(e=ay(e=G1(null,i,t,e,n),t.attrs,n),s=null);else{const o=t.directiveStylingLast;if(-1===o||i[o]!==r)if(e=G1(r,i,t,e,n),null===s){let l=function dW(i,t,e){const n=e?t.classBindings:t.styleBindings;if(0!==Eh(n))return i[Jd(n)]}(i,t,n);void 0!==l&&Array.isArray(l)&&(l=G1(null,i,t,l[1],n),l=ay(l,t.attrs,n),function uW(i,t,e,n){i[Jd(e?t.classBindings:t.styleBindings)]=n}(i,t,n,l))}else s=function hW(i,t,e){let n;const r=t.directiveEnd;for(let s=1+t.directiveStylingLast;s0)&&(c=!0)):d=e,r)if(0!==l){const p=Jd(i[a+1]);i[n+1]=Aw(p,a),0!==p&&(i[p+1]=z1(i[p+1],n)),i[a+1]=function K8(i,t){return 131071&i|t<<17}(i[a+1],n)}else i[n+1]=Aw(a,0),0!==a&&(i[a+1]=z1(i[a+1],n)),a=n;else i[n+1]=Aw(l,0),0===a?a=n:i[l+1]=z1(i[l+1],n),l=n;c&&(i[n+1]=V1(i[n+1])),ML(i,d,n,!0),ML(i,d,n,!1),function J8(i,t,e,n,r){const s=r?i.residualClasses:i.residualStyles;null!=s&&"string"==typeof t&&Tc(s,t)>=0&&(e[n+1]=H1(e[n+1]))}(t,d,i,n,s),o=Aw(a,l),s?t.classBindings=o:t.styleBindings=o}(r,s,t,e,o,n)}}function G1(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),d=c?l[1]:l,h=null===d;let p=e[r+1];p===sn&&(p=h?$n:void 0);let m=h?Wd(p,n):d===n?p:void 0;if(c&&!Dw(m)&&(m=Wd(l,n)),Dw(m)&&(a=m,o))return a;const g=i[r+1];r=o?Jd(g):Eh(g)}if(null!==t){let l=s?t.residualClasses:t.residualStyles;null!=l&&(a=Wd(l,n))}return a}function Dw(i){return void 0!==i}function FL(i,t){return 0!=(i.flags&(t?8:16))}function ze(i,t=""){const e=Se(),n=zn(),r=i+yi,s=n.firstCreatePass?Zd(n,r,1,t,null):n.data[r],o=e[r]=function cv(i,t){return i.createText(t)}(e[yt],t);vh(n,e,o,s),ma(s,!1)}function _i(i){return Zi("",i,""),_i}function Zi(i,t,e){const n=Se(),r=jp(n,i,t,e);return r!==sn&&Bc(n,Xn(),r),Zi}function tm(i,t,e,n,r){const s=Se(),o=Yp(s,i,t,e,n,r);return o!==sn&&Bc(s,Xn(),o),tm}function GL(i,t,e){!function dl(i,t,e,n){const r=zn(),s=Ks(2);r.firstUpdatePass&&RL(r,null,s,n);const o=Se();if(e!==sn&&Is(o,s,e)){const a=r.data[Xn()];if(FL(a,n)&&!IL(r,s)){let l=n?a.classesWithoutHost:a.stylesWithoutHost;null!==l&&(e=Vf(l,e||"")),F1(r,a,o,e,n)}else!function mW(i,t,e,n,r,s,o,a){r===sn&&(r=$n);let l=0,c=0,d=0((rt=rt||{})[rt.LocaleId=0]="LocaleId",rt[rt.DayPeriodsFormat=1]="DayPeriodsFormat",rt[rt.DayPeriodsStandalone=2]="DayPeriodsStandalone",rt[rt.DaysFormat=3]="DaysFormat",rt[rt.DaysStandalone=4]="DaysStandalone",rt[rt.MonthsFormat=5]="MonthsFormat",rt[rt.MonthsStandalone=6]="MonthsStandalone",rt[rt.Eras=7]="Eras",rt[rt.FirstDayOfWeek=8]="FirstDayOfWeek",rt[rt.WeekendRange=9]="WeekendRange",rt[rt.DateFormat=10]="DateFormat",rt[rt.TimeFormat=11]="TimeFormat",rt[rt.DateTimeFormat=12]="DateTimeFormat",rt[rt.NumberSymbols=13]="NumberSymbols",rt[rt.NumberFormats=14]="NumberFormats",rt[rt.CurrencyCode=15]="CurrencyCode",rt[rt.CurrencySymbol=16]="CurrencySymbol",rt[rt.CurrencyName=17]="CurrencyName",rt[rt.Currencies=18]="Currencies",rt[rt.Directionality=19]="Directionality",rt[rt.PluralCase=20]="PluralCase",rt[rt.ExtraData=21]="ExtraData",rt))();const im="en-US";let t2=im;function j1(i,t,e,n,r){if(i=kt(i),Array.isArray(i))for(let s=0;s>20;if(Fc(i)||!i.multi){const m=new Bd(l,r,E),g=q1(a,t,r?d:d+p,h);-1===g?(pn(oh(c,o),s,a),Y1(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=q1(a,t,d+p,h),g=q1(a,t,d,d+p),v=g>=0&&e[g];if(r&&!v||!r&&!(m>=0&&e[m])){pn(oh(c,o),s,a);const y=function Pj(i,t,e,n,r){const s=new Bd(i,e,E);return s.multi=[],s.index=t,s.componentProviders=0,A2(s,r,n&&!e),s}(r?kj:Rj,e.length,r,n,l);!r&&v&&(e[g].providerFactory=y),Y1(s,i,t.length,0),t.push(a),c.directiveStart++,c.directiveEnd++,r&&(c.providerIndexes+=1048576),e.push(y),o.push(y)}else Y1(s,i,m>-1?m:g,A2(e[r?g:m],l,!r&&n));!r&&n&&v&&e[g].componentProviders++}}}function Y1(i,t,e,n){const r=Fc(t),s=function DD(i){return!!i.useClass}(t);if(r||s){const l=(s?kt(t.useClass):t).prototype.ngOnDestroy;if(l){const c=i.destroyHooks||(i.destroyHooks=[]);if(!r&&t.multi){const d=c.indexOf(e);-1===d?c.push(e,[n,l]):c[d+1].push(n,l)}else c.push(e,l)}}}function A2(i,t,e){return e&&i.componentProviders++,i.multi.push(t)-1}function q1(i,t,e,n){for(let r=e;r{e.providersResolver=(n,r)=>function Ij(i,t,e){const n=zn();if(n.firstCreatePass){const r=_o(i);j1(e,n.data,n.blueprint,r,!0),j1(t,n.data,n.blueprint,r,!1)}}(n,r?r(i):i,t)}}class rm{}class D2{}class T2 extends rm{constructor(t,e){super(),this._parent=e,this._bootstrapComponents=[],this.destroyCbs=[],this.componentFactoryResolver=new KF(this);const n=ur(t);this._bootstrapComponents=ll(n.bootstrap),this._r3Injector=dw(t,e,[{provide:rm,useValue:this},{provide:Hl,useValue:this.componentFactoryResolver}],fi(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 K1 extends D2{constructor(t){super(),this.moduleType=t}create(t){return new T2(this.moduleType,t)}}class Fj extends rm{constructor(t,e,n){super(),this.componentFactoryResolver=new KF(this),this.instance=null;const r=new Hp([...t,{provide:rm,useValue:this},{provide:Hl,useValue:this.componentFactoryResolver}],e||xh(),n,new Set(["environment"]));this.injector=r,r.resolveInjectorInitializers()}destroy(){this.injector.destroy()}onDestroy(t){this.injector.onDestroy(t)}}function Ow(i,t,e=null){return new Fj(i,t,e).injector}let Lj=(()=>{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=ew(0,e.type),r=n.length>0?Ow([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=ke({token:i,providedIn:"environment",factory:()=>new i(ee(to))}),i})();function Z1(i){i.getStandaloneInjector=t=>t.get(Lj).getOrCreateStandaloneInjector(i)}function so(i,t,e){const n=Vr()+i,r=Se();return r[n]===sn?$l(r,n,e?t.call(e):t()):function ry(i,t){return i[t]}(r,n)}function sm(i,t,e,n){return N2(Se(),Vr(),i,t,e,n)}function L2(i,t,e,n,r,s,o){return function V2(i,t,e,n,r,s,o,a,l){const c=t+e;return function Sa(i,t,e,n,r,s){const o=Sh(i,t,e,n);return Sh(i,t+2,r,s)||o}(i,c,r,s,o,a)?$l(i,c+4,l?n.call(l,r,s,o,a):n(r,s,o,a)):fy(i,c+4)}(Se(),Vr(),i,t,e,n,r,s,o)}function fy(i,t){const e=i[t];return e===sn?void 0:e}function N2(i,t,e,n,r,s){const o=t+e;return Is(i,o,r)?$l(i,o+1,s?n.call(s,r):n(r)):fy(i,o+1)}function Dt(i,t){const e=zn();let n;const r=i+yi;e.firstCreatePass?(n=function Qj(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=Qa(n.type)),o=Ys(E);try{const a=cp(!1),l=s();return cp(a),function $8(i,t,e,n){e>=i.data.length&&(i.data[e]=null,i.blueprint[e]=null),t[e]=n}(e,Se(),r,l),l}finally{Ys(o)}}function Lt(i,t,e){const n=i+yi,r=Se(),s=Od(r,n);return py(r,n)?N2(r,Vr(),t,s.transform,e,s):s.transform(e)}function J1(i,t,e,n){const r=i+yi,s=Se(),o=Od(s,r);return py(s,r)?function B2(i,t,e,n,r,s,o){const a=t+e;return Sh(i,a,r,s)?$l(i,a+2,o?n.call(o,r,s):n(r,s)):fy(i,a+2)}(s,Vr(),t,o.transform,e,n,o):o.transform(e,n)}function py(i,t){return i[at].data[t].pure}function eT(i){return t=>{setTimeout(i,void 0,t)}}const We=class n6 extends Re{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=eT(s),r&&(r=eT(r)),o&&(o=eT(o)));const a=super.subscribe({next:r,error:s,complete:o});return t instanceof Zt&&t.add(a),a}};function r6(){return this._results[Symbol.iterator]()}class om{get changes(){return this._changes||(this._changes=new We)}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=om.prototype;e[Symbol.iterator]||(e[Symbol.iterator]=r6)}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 Ar(i){return i.flat(Number.POSITIVE_INFINITY)}(t);(this._changesDetected=!function fp(i,t,e){if(i.length!==t.length)return!1;for(let n=0;n{class i{}return i.__NG_ELEMENT_ID__=a6,i})();const s6=Mo,o6=class extends s6{constructor(t,e,n){super(),this._declarationLView=t,this._declarationTContainer=e,this.elementRef=n}createEmbeddedView(t,e){const n=this._declarationTContainer.tView,r=wh(this._declarationLView,n,t,16,null,n.declTNode,null,null,null,null,e||null);r[th]=this._declarationLView[this._declarationTContainer.index];const o=this._declarationLView[Xs];return null!==o&&(r[Xs]=o.createEmbeddedView(n)),Ch(n,r,t),new ny(r)}};function a6(){return Fw(Er(),Se())}function Fw(i,t){return 4&i.type?new o6(t,i,Fn(i,t)):null}let Wr=(()=>{class i{}return i.__NG_ELEMENT_ID__=l6,i})();function l6(){return $2(Er(),Se())}const c6=Wr,H2=class extends c6{constructor(t,e,n){super(),this._lContainer=t,this._hostTNode=e,this._hostLView=n}get element(){return Fn(this._hostTNode,this._hostLView)}get injector(){return new Ec(this._hostTNode,this._hostLView)}get parentInjector(){const t=lh(this._hostTNode,this._hostLView);if(lp(t)){const e=sh(t,this._hostLView),n=rh(t);return new Ec(e[at].data[n+8],e)}return new Ec(null,this._hostLView)}clear(){for(;this.length>0;)this.remove(this.length-1)}get(t){const e=G2(this._lContainer);return null!==e&&e[t]||null}get length(){return this._lContainer.length-Ui}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 uh(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 iy(Hn(t)),c=n||this.parentInjector;if(!s&&null==l.ngModule){const p=(o?c:this.parentInjector).get(to,null);p&&(s=p)}const d=l.create(c,r,void 0,s);return this.insert(d.hostView,a),d}insert(t,e){const n=t._lView,r=n[at];if(function dA(i){return xs(i[Bi])}(n)){const d=this.indexOf(t);if(-1!==d)this.detach(d);else{const h=n[Bi],p=new H2(h,h[ue],h[Bi]);p.detach(p.indexOf(t))}}const s=this._adjustIndex(e),o=this._lContainer;!function dv(i,t,e,n){const r=Ui+n,s=e.length;n>0&&(e[r-1][ys]=t),n0)n.push(o[a/2]);else{const c=s[a+1],d=t[-l];for(let h=Ui;h{class i{constructor(e){this.appInits=e,this.resolve=Nw,this.reject=Nw,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)(ee(Bw,8))},i.\u0275prov=ke({token:i,factory:i.\u0275fac,providedIn:"root"}),i})();const cm=new me("AppId",{providedIn:"root",factory:function fN(){return`${hT()}${hT()}${hT()}`}});function hT(){return String.fromCharCode(97+Math.floor(25*Math.random()))}const pN=new me("Platform Initializer"),fT=new me("Platform ID",{providedIn:"platform",factory:()=>"unknown"}),Rr=new me("AnimationModuleType");let F6=(()=>{class i{log(e){console.log(e)}warn(e){console.warn(e)}}return i.\u0275fac=function(e){return new(e||i)},i.\u0275prov=ke({token:i,factory:i.\u0275fac,providedIn:"platform"}),i})();const ql=new me("LocaleId",{providedIn:"root",factory:()=>Ot(ql,Pt.Optional|Pt.SkipSelf)||function L6(){return typeof $localize<"u"&&$localize.locale||im}()});class B6{constructor(t,e){this.ngModuleFactory=t,this.componentFactories=e}}let mN=(()=>{class i{compileModuleSync(e){return new K1(e)}compileModuleAsync(e){return Promise.resolve(this.compileModuleSync(e))}compileModuleAndAllComponentsSync(e){const n=this.compileModuleSync(e),s=ll(ur(e).declarations).reduce((o,a)=>{const l=Hn(a);return l&&o.push(new iy(l)),o},[]);return new B6(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=ke({token:i,factory:i.\u0275fac,providedIn:"root"}),i})();const z6=(()=>Promise.resolve(0))();function pT(i){typeof Zone>"u"?z6.then(()=>{i&&i.apply(null,null)}):Zone.current.scheduleMicroTask("scheduleMicrotask",i)}class ft{constructor({enableLongStackTrace:t=!1,shouldCoalesceEventChangeDetection:e=!1,shouldCoalesceRunChangeDetection:n=!1}){if(this.hasPendingMacrotasks=!1,this.hasPendingMicrotasks=!1,this.isStable=!0,this.onUnstable=new We(!1),this.onMicrotaskEmpty=new We(!1),this.onStable=new We(!1),this.onError=new We(!1),typeof Zone>"u")throw new pe(908,!1);Zone.assertZonePatched();const r=this;r._nesting=0,r._outer=r._inner=Zone.current,Zone.TaskTrackingZoneSpec&&(r._inner=r._inner.fork(new Zone.TaskTrackingZoneSpec)),t&&Zone.longStackTraceZoneSpec&&(r._inner=r._inner.fork(Zone.longStackTraceZoneSpec)),r.shouldCoalesceEventChangeDetection=!n&&e,r.shouldCoalesceRunChangeDetection=n,r.lastRequestAnimationFrameId=-1,r.nativeRequestAnimationFrame=function H6(){let i=Rn.requestAnimationFrame,t=Rn.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 W6(i){const t=()=>{!function $6(i){i.isCheckStableRunning||-1!==i.lastRequestAnimationFrameId||(i.lastRequestAnimationFrameId=i.nativeRequestAnimationFrame.call(Rn,()=>{i.fakeTopEventTask||(i.fakeTopEventTask=Zone.root.scheduleEventTask("fakeTopEventTask",()=>{i.lastRequestAnimationFrameId=-1,gT(i),i.isCheckStableRunning=!0,mT(i),i.isCheckStableRunning=!1},void 0,()=>{},()=>{})),i.fakeTopEventTask.invoke()}),gT(i))}(i)};i._inner=i._inner.fork({name:"angular",properties:{isAngularZone:!0},onInvokeTask:(e,n,r,s,o,a)=>{try{return vN(i),e.invokeTask(r,s,o,a)}finally{(i.shouldCoalesceEventChangeDetection&&"eventTask"===s.type||i.shouldCoalesceRunChangeDetection)&&t(),yN(i)}},onInvoke:(e,n,r,s,o,a,l)=>{try{return vN(i),e.invoke(r,s,o,a,l)}finally{i.shouldCoalesceRunChangeDetection&&t(),yN(i)}},onHasTask:(e,n,r,s)=>{e.hasTask(r,s),n===r&&("microTask"==s.change?(i._hasPendingMicrotasks=s.microTask,gT(i),mT(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(!ft.isInAngularZone())throw new pe(909,!1)}static assertNotInAngularZone(){if(ft.isInAngularZone())throw new pe(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,G6,Nw,Nw);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 G6={};function mT(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 gT(i){i.hasPendingMicrotasks=!!(i._hasPendingMicrotasks||(i.shouldCoalesceEventChangeDetection||i.shouldCoalesceRunChangeDetection)&&-1!==i.lastRequestAnimationFrameId)}function vN(i){i._nesting++,i.isStable&&(i.isStable=!1,i.onUnstable.emit(null))}function yN(i){i._nesting--,mT(i)}class j6{constructor(){this.hasPendingMicrotasks=!1,this.hasPendingMacrotasks=!1,this.isStable=!0,this.onUnstable=new We,this.onMicrotaskEmpty=new We,this.onStable=new We,this.onError=new We}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 bN=new me(""),Vw=new me("");let yT,_T=(()=>{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,yT||(function Y6(i){yT=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:()=>{ft.assertNotInAngularZone(),pT(()=>{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())pT(()=>{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)(ee(ft),ee(vT),ee(Vw))},i.\u0275prov=ke({token:i,factory:i.\u0275fac}),i})(),vT=(()=>{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 yT?.findTestabilityInTree(this,e,n)??null}}return i.\u0275fac=function(e){return new(e||i)},i.\u0275prov=ke({token:i,factory:i.\u0275fac,providedIn:"platform"}),i})();const Vc=!1;let eu=null;const xN=new me("AllowMultipleToken"),bT=new me("PlatformDestroyListeners"),wN=new me("appBootstrapListener");class MN{constructor(t,e){this.name=t,this.token=e}}function SN(i,t,e=[]){const n=`Platform: ${t}`,r=new me(n);return(s=[])=>{let o=xT();if(!o||o.injector.get(xN,!1)){const a=[...e,...s,{provide:r,useValue:!0}];i?i(a):function K6(i){if(eu&&!eu.get(xN,!1))throw new pe(400,!1);eu=i;const t=i.get(AN);(function CN(i){const t=i.get(pN,null);t&&t.forEach(e=>e())})(i)}(function EN(i=[],t){return $i.create({name:t,providers:[{provide:Iv,useValue:"platform"},{provide:bT,useValue:new Set([()=>eu=null])},...i]})}(a,n))}return function Q6(i){const t=xT();if(!t)throw new pe(401,!1);return t}()}}function xT(){return eu?.get(AN)??null}let AN=(()=>{class i{constructor(e){this._injector=e,this._modules=[],this._destroyListeners=[],this._destroyed=!1}bootstrapModuleFactory(e,n){const r=function TN(i,t){let e;return e="noop"===i?new j6:("zone.js"===i?void 0:i)||new ft(t),e}(n?.ngZone,function DN(i){return{enableLongStackTrace:!1,shouldCoalesceEventChangeDetection:!(!i||!i.ngZoneEventCoalescing)||!1,shouldCoalesceRunChangeDetection:!(!i||!i.ngZoneRunCoalescing)||!1}}(n)),s=[{provide:ft,useValue:r}];return r.run(()=>{const o=$i.create({providers:s,parent:this.injector,name:e.moduleType.name}),a=e.create(o),l=a.injector.get(al,null);if(!l)throw new pe(402,!1);return r.runOutsideAngular(()=>{const c=r.onError.subscribe({next:d=>{l.handleError(d)}});a.onDestroy(()=>{zw(this._modules,a),c.unsubscribe()})}),function IN(i,t,e){try{const n=e();return oy(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(Uw);return c.runInitializers(),c.donePromise.then(()=>(function n2(i){En(i,"Expected localeId to be defined"),"string"==typeof i&&(t2=i.toLowerCase().replace(/_/g,"-"))}(a.injector.get(ql,im)||im),this._moduleDoBootstrap(a),a))})})}bootstrapModule(e,n=[]){const r=RN({},n);return function q6(i,t,e){const n=new K1(e);return Promise.resolve(n)}(0,0,e).then(s=>this.bootstrapModuleFactory(s,r))}_moduleDoBootstrap(e){const n=e.injector.get(dm);if(e._bootstrapComponents.length>0)e._bootstrapComponents.forEach(r=>n.bootstrap(r));else{if(!e.instance.ngDoBootstrap)throw new pe(-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 pe(404,!1);this._modules.slice().forEach(n=>n.destroy()),this._destroyListeners.forEach(n=>n());const e=this._injector.get(bT,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)(ee($i))},i.\u0275prov=ke({token:i,factory:i.\u0275fac,providedIn:"platform"}),i})();function RN(i,t){return Array.isArray(t)?t.reduce(RN,i):{...i,...t}}let dm=(()=>{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 In(a=>{this._stable=this._zone.isStable&&!this._zone.hasPendingMacrotasks&&!this._zone.hasPendingMicrotasks,this._zone.runOutsideAngular(()=>{a.next(this._stable),a.complete()})}),o=new In(a=>{let l;this._zone.runOutsideAngular(()=>{l=this._zone.onStable.subscribe(()=>{ft.assertNotInAngularZone(),pT(()=>{!this._stable&&!this._zone.hasPendingMacrotasks&&!this._zone.hasPendingMicrotasks&&(this._stable=!0,a.next(!0))})})});const c=this._zone.onUnstable.subscribe(()=>{ft.assertInAngularZone(),this._stable&&(this._stable=!1,this._zone.runOutsideAngular(()=>{a.next(!1)}))});return()=>{l.unsubscribe(),c.unsubscribe()}});this.isStable=Mr(s,o.pipe(Uf()))}bootstrap(e,n){const r=e instanceof Ov;if(!this._injector.get(Uw).done){!r&&function Sd(i){const t=Hn(i)||Ur(i)||vs(i);return null!==t&&t.standalone}(e);throw new pe(405,Vc)}let o;o=r?e:this._injector.get(Hl).resolveComponentFactory(e),this.componentTypes.push(o.componentType);const a=function X6(i){return i.isBoundToModule}(o)?void 0:this._injector.get(rm),c=o.create($i.NULL,[],n||o.selector,a),d=c.location.nativeElement,h=c.injector.get(bN,null);return h?.registerApplication(d),c.onDestroy(()=>{this.detachView(c.hostView),zw(this.components,c),h?.unregisterApplication(d)}),this._loadComponent(c),c}tick(){if(this._runningTick)throw new pe(101,!1);try{this._runningTick=!0;for(let e of this._views)e.detectChanges()}catch(e){this._zone.runOutsideAngular(()=>this._exceptionHandler.handleError(e))}finally{this._runningTick=!1}}attachView(e){const n=e;this._views.push(n),n.attachToAppRef(this)}detachView(e){const n=e;zw(this._views,n),n.detachFromAppRef()}_loadComponent(e){this.attachView(e.hostView),this.tick(),this.components.push(e);const n=this._injector.get(wN,[]);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),()=>zw(this._destroyListeners,e)}destroy(){if(this._destroyed)throw new pe(406,!1);const e=this._injector;e.destroy&&!e.destroyed&&e.destroy()}get viewCount(){return this._views.length}warnIfDestroyed(){}}return i.\u0275fac=function(e){return new(e||i)(ee(ft),ee(to),ee(al))},i.\u0275prov=ke({token:i,factory:i.\u0275fac,providedIn:"root"}),i})();function zw(i,t){const e=i.indexOf(t);e>-1&&i.splice(e,1)}let Zn=(()=>{class i{}return i.__NG_ELEMENT_ID__=e9,i})();function e9(i){return function t9(i,t,e){if(Ad(i)&&!e){const n=ws(i.index,t);return new ny(n,n)}return 47&i.type?new ny(t[ir],t):null}(Er(),Se(),16==(16&i))}class LN{constructor(){}supports(t){return Sw(t)}create(t){return new l9(t)}}const a9=(i,t)=>t;class l9{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||a9}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 c9(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 NN),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 NN),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 c9{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 d9{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 NN{constructor(){this.map=new Map}put(t){const e=t.trackById;let n=this.map.get(e);n||(n=new d9,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 BN(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 h9(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 h9{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 VN(){return new $w([new LN])}let $w=(()=>{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||VN()),deps:[[i,new xa,new Ss]]}}find(e){const n=this.factories.find(r=>r.supports(e));if(null!=n)return n;throw new pe(901,!1)}}return i.\u0275prov=ke({token:i,providedIn:"root",factory:VN}),i})();function zN(){return new gy([new UN])}let gy=(()=>{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||zN()),deps:[[i,new xa,new Ss]]}}find(e){const n=this.factories.find(r=>r.supports(e));if(n)return n;throw new pe(901,!1)}}return i.\u0275prov=ke({token:i,providedIn:"root",factory:zN}),i})();const m9=SN(null,"core",[]);let g9=(()=>{class i{constructor(e){}}return i.\u0275fac=function(e){return new(e||i)(ee(dm))},i.\u0275mod=nn({type:i}),i.\u0275inj=Kt({}),i})();let ET=null;function zc(){return ET}class y9{}const jt=new me("DocumentToken");let AT=(()=>{class i{historyGo(e){throw new Error("Not implemented")}}return i.\u0275fac=function(e){return new(e||i)},i.\u0275prov=ke({token:i,factory:function(){return function b9(){return ee(HN)}()},providedIn:"platform"}),i})();const x9=new me("Location Initialized");let HN=(()=>{class i extends AT{constructor(e){super(),this._doc=e,this._location=window.location,this._history=window.history}getBaseHrefFromDOM(){return zc().getBaseHref(this._doc)}onPopState(e){const n=zc().getGlobalEventTarget(this._doc,"window");return n.addEventListener("popstate",e,!1),()=>n.removeEventListener("popstate",e)}onHashChange(e){const n=zc().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){GN()?this._history.pushState(e,n,r):this._location.hash=r}replaceState(e,n,r){GN()?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)(ee(jt))},i.\u0275prov=ke({token:i,factory:function(){return function w9(){return new HN(ee(jt))}()},providedIn:"platform"}),i})();function GN(){return!!window.history.pushState}function DT(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 $N(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 Hc(i){return i&&"?"!==i[0]?"?"+i:i}let Th=(()=>{class i{historyGo(e){throw new Error("Not implemented")}}return i.\u0275fac=function(e){return new(e||i)},i.\u0275prov=ke({token:i,factory:function(){return Ot(jN)},providedIn:"root"}),i})();const WN=new me("appBaseHref");let jN=(()=>{class i extends Th{constructor(e,n){super(),this._platformLocation=e,this._removeListenerFns=[],this._baseHref=n??this._platformLocation.getBaseHrefFromDOM()??Ot(jt).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 DT(this._baseHref,e)}path(e=!1){const n=this._platformLocation.pathname+Hc(this._platformLocation.search),r=this._platformLocation.hash;return r&&e?`${n}${r}`:n}pushState(e,n,r,s){const o=this.prepareExternalUrl(r+Hc(s));this._platformLocation.pushState(e,n,o)}replaceState(e,n,r,s){const o=this.prepareExternalUrl(r+Hc(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)(ee(AT),ee(WN,8))},i.\u0275prov=ke({token:i,factory:i.\u0275fac,providedIn:"root"}),i})(),M9=(()=>{class i extends Th{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=DT(this._baseHref,e);return n.length>0?"#"+n:n}pushState(e,n,r,s){let o=this.prepareExternalUrl(r+Hc(s));0==o.length&&(o=this._platformLocation.pathname),this._platformLocation.pushState(e,n,o)}replaceState(e,n,r,s){let o=this.prepareExternalUrl(r+Hc(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)(ee(AT),ee(WN,8))},i.\u0275prov=ke({token:i,factory:i.\u0275fac}),i})(),_y=(()=>{class i{constructor(e){this._subject=new We,this._urlChangeListeners=[],this._urlChangeSubscription=null,this._locationStrategy=e;const n=this._locationStrategy.getBaseHref();this._basePath=function E9(i){if(new RegExp("^(https?:)?//").test(i)){const[,e]=i.split(/\/\/[^\/]+/);return e}return i}($N(YN(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+Hc(n))}normalize(e){return i.stripTrailingSlash(function S9(i,t){if(!i||!t.startsWith(i))return t;const e=t.substring(i.length);return""===e||["/",";","?","#"].includes(e[0])?e:t}(this._basePath,YN(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+Hc(n)),r)}replaceState(e,n="",r=null){this._locationStrategy.replaceState(r,"",e,n),this._notifyUrlChangeListeners(this.prepareExternalUrl(e+Hc(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=Hc,i.joinWithSlash=DT,i.stripTrailingSlash=$N,i.\u0275fac=function(e){return new(e||i)(ee(Th))},i.\u0275prov=ke({token:i,factory:function(){return function C9(){return new _y(ee(Th))}()},providedIn:"root"}),i})();function YN(i){return i.replace(/\/index.html$/,"")}var Co=(()=>((Co=Co||{})[Co.Decimal=0]="Decimal",Co[Co.Percent=1]="Percent",Co[Co.Currency=2]="Currency",Co[Co.Scientific=3]="Scientific",Co))(),zt=(()=>((zt=zt||{})[zt.Decimal=0]="Decimal",zt[zt.Group=1]="Group",zt[zt.List=2]="List",zt[zt.PercentSign=3]="PercentSign",zt[zt.PlusSign=4]="PlusSign",zt[zt.MinusSign=5]="MinusSign",zt[zt.Exponential=6]="Exponential",zt[zt.SuperscriptingExponent=7]="SuperscriptingExponent",zt[zt.PerMille=8]="PerMille",zt[zt.Infinity=9]="Infinity",zt[zt.NaN=10]="NaN",zt[zt.TimeSeparator=11]="TimeSeparator",zt[zt.CurrencyDecimal=12]="CurrencyDecimal",zt[zt.CurrencyGroup=13]="CurrencyGroup",zt))();function Ea(i,t){const e=ro(i),n=e[rt.NumberSymbols][t];if(typeof n>"u"){if(t===zt.CurrencyDecimal)return e[rt.NumberSymbols][zt.Decimal];if(t===zt.CurrencyGroup)return e[rt.NumberSymbols][zt.Group]}return n}const Q9=/^(\d+)?\.((\d+)(-(\d+))?)?$/,JN=22,Jw=".",yy="0",J9=";",eY=",",PT="#";function LT(i){const t=parseInt(i);if(isNaN(t))throw new Error("Invalid integer literal when parsing "+i);return t}const BT=/\s+/,nB=[];let hm=(()=>{class i{constructor(e,n,r,s){this._iterableDiffers=e,this._keyValueDiffers=n,this._ngEl=r,this._renderer=s,this.initialClasses=nB,this.stateMap=new Map}set klass(e){this.initialClasses=null!=e?e.trim().split(BT):nB}set ngClass(e){this.rawClass="string"==typeof e?e.trim().split(BT):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(BT).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)(E($w),E(gy),E(mt),E(ol))},i.\u0275dir=ve({type:i,selectors:[["","ngClass",""]],inputs:{klass:["class","klass"],ngClass:"ngClass"},standalone:!0}),i})();class uY{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 So=(()=>{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 uY(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),sB(a,r)}});for(let r=0,s=n.length;r{sB(n.get(r.currentIndex),r)})}static ngTemplateContextGuard(e,n){return!0}}return i.\u0275fac=function(e){return new(e||i)(E(Wr),E(Mo),E($w))},i.\u0275dir=ve({type:i,selectors:[["","ngFor","","ngForOf",""]],inputs:{ngForOf:"ngForOf",ngForTrackBy:"ngForTrackBy",ngForTemplate:"ngForTemplate"},standalone:!0}),i})();function sB(i,t){i.context.$implicit=t.item}let vi=(()=>{class i{constructor(e,n){this._viewContainer=e,this._context=new fY,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){oB("ngIfThen",e),this._thenTemplateRef=e,this._thenViewRef=null,this._updateView()}set ngIfElse(e){oB("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)(E(Wr),E(Mo))},i.\u0275dir=ve({type:i,selectors:[["","ngIf",""]],inputs:{ngIf:"ngIf",ngIfThen:"ngIfThen",ngIfElse:"ngIfElse"},standalone:!0}),i})();class fY{constructor(){this.$implicit=null,this.ngIf=null}}function oB(i,t){if(t&&!t.createEmbeddedView)throw new Error(`${i} must be a TemplateRef, but received '${fi(t)}'.`)}class UT{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 by=(()=>{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=ve({type:i,selectors:[["","ngSwitch",""]],inputs:{ngSwitch:"ngSwitch"},standalone:!0}),i})(),VT=(()=>{class i{constructor(e,n,r){this.ngSwitch=r,r._addCase(),this._view=new UT(e,n)}ngDoCheck(){this._view.enforceState(this.ngSwitch._matchCase(this.ngSwitchCase))}}return i.\u0275fac=function(e){return new(e||i)(E(Wr),E(Mo),E(by,9))},i.\u0275dir=ve({type:i,selectors:[["","ngSwitchCase",""]],inputs:{ngSwitchCase:"ngSwitchCase"},standalone:!0}),i})(),aB=(()=>{class i{constructor(e,n,r){r._addDefault(new UT(e,n))}}return i.\u0275fac=function(e){return new(e||i)(E(Wr),E(Mo),E(by,9))},i.\u0275dir=ve({type:i,selectors:[["","ngSwitchDefault",""]],standalone:!0}),i})(),eM=(()=>{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:Es.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)(E(mt),E(gy),E(ol))},i.\u0275dir=ve({type:i,selectors:[["","ngStyle",""]],inputs:{ngStyle:"ngStyle"},standalone:!0}),i})(),xy=(()=>{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)(E(Wr))},i.\u0275dir=ve({type:i,selectors:[["","ngTemplateOutlet",""]],inputs:{ngTemplateOutletContext:"ngTemplateOutletContext",ngTemplateOutlet:"ngTemplateOutlet",ngTemplateOutletInjector:"ngTemplateOutletInjector"},standalone:!0,features:[bi]}),i})();function fl(i,t){return new pe(2100,!1)}class mY{createSubscription(t,e){return t.subscribe({next:e,error:n=>{throw n}})}dispose(t){t.unsubscribe()}}class gY{createSubscription(t,e){return t.then(e,n=>{throw n})}dispose(t){}}const _Y=new gY,vY=new mY;let pl=(()=>{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(oy(e))return _Y;if(uL(e))return vY;throw fl()}_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)(E(Zn,16))},i.\u0275pipe=Gi({name:"async",type:i,pure:!1,standalone:!0}),i})(),cB=(()=>{class i{constructor(e){this.differs=e,this.keyValues=[],this.compareFn=dB}transform(e,n=dB){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 RY(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)(E(gy,16))},i.\u0275pipe=Gi({name:"keyvalue",type:i,pure:!1,standalone:!0}),i})();function dB(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 zT(i){return!(null==i||""===i||i!=i)}(e))return null;r=r||this._locale;try{return function rY(i,t,e){return function OT(i,t,e,n,r,s,o=!1){let a="",l=!1;if(isFinite(i)){let c=function oY(i){let n,r,s,o,a,t=Math.abs(i)+"",e=0;for((r=t.indexOf(Jw))>-1&&(t=t.replace(Jw,"")),(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)===yy;s++);if(s===(a=t.length))n=[0],r=1;else{for(a--;t.charAt(a)===yy;)a--;for(r-=s,n=[],o=0;s<=a;s++,o++)n[o]=Number(t.charAt(s))}return r>JN&&(n=n.splice(0,JN-1),e=r-1,r=1),{digits:n,exponent:e,integerLen:r}}(i);o&&(c=function sY(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 d=t.minInt,h=t.minFrac,p=t.maxFrac;if(s){const M=s.match(Q9);if(null===M)throw new Error(`${s} is not a valid digit info`);const x=M[1],C=M[3],F=M[5];null!=x&&(d=LT(x)),null!=C&&(h=LT(C)),null!=F?p=LT(F):null!=C&&h>p&&(p=h)}!function aY(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);d&&(n.unshift(d),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(Ea(e,n)),v.length&&(a+=Ea(e,r)+v.join("")),b&&(a+=Ea(e,zt.Exponential)+"+"+b)}else a=Ea(e,zt.Infinity);return a=i<0&&!l?t.negPre+a+t.negSuf:t.posPre+a+t.posSuf,a}(i,function FT(i,t="-"){const e={minInt:1,minFrac:0,maxFrac:0,posPre:"",posSuf:"",negPre:"",negSuf:"",gSize:0,lgSize:0},n=i.split(J9),r=n[0],s=n[1],o=-1!==r.indexOf(Jw)?r.split(Jw):[r.substring(0,r.lastIndexOf(yy)+1),r.substring(r.lastIndexOf(yy)+1)],a=o[0],l=o[1]||"";e.posPre=a.substring(0,a.indexOf(PT));for(let d=0;d{class i{}return i.\u0275fac=function(e){return new(e||i)},i.\u0275mod=nn({type:i}),i.\u0275inj=Kt({}),i})();const hB="browser";let BY=(()=>{class i{}return i.\u0275prov=ke({token:i,providedIn:"root",factory:()=>new UY(ee(jt),window)}),i})();class UY{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 VY(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=fB(this.window.history)||fB(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 fB(i){return Object.getOwnPropertyDescriptor(i,"scrollRestoration")}class p7 extends y9{constructor(){super(...arguments),this.supportsDOMEvents=!0}}class WT extends p7{static makeCurrent(){!function v9(i){ET||(ET=i)}(new WT)}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 m7(){return My=My||document.querySelector("base"),My?My.getAttribute("href"):null}();return null==e?null:function g7(i){iM=iM||document.createElement("a"),iM.setAttribute("href",i);const t=iM.pathname;return"/"===t.charAt(0)?t:`/${t}`}(e)}resetBaseElement(){My=null}getUserAgent(){return window.navigator.userAgent}getCookie(t){return function cY(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 iM,My=null;const vB=new me("TRANSITION_ID"),v7=[{provide:Bw,useFactory:function _7(i,t,e){return()=>{e.get(Uw).donePromise.then(()=>{const n=zc(),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=ke({token:i,factory:i.\u0275fac}),i})();const rM=new me("EventManagerPlugins");let sM=(()=>{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=ke({token:i,factory:i.\u0275fac}),i})(),Cy=(()=>{class i extends bB{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)(ee(jt))},i.\u0275prov=ke({token:i,factory:i.\u0275fac}),i})();const jT={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/"},YT=/%COMP%/g,MB=new me("RemoveStylesOnCompDestory",{providedIn:"root",factory:()=>!1});function CB(i,t){return t.flat(100).map(e=>e.replace(YT,i))}function SB(i){return t=>{if("__ngUnwrap__"===t)return i;!1===i(t)&&(t.preventDefault(),t.returnValue=!1)}}let oM=(()=>{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 qT(e)}createRenderer(e,n){if(!e||!n)return this.defaultRenderer;const r=this.getOrCreateRenderer(e,n);return r instanceof DB?r.applyToHost(e):r instanceof XT&&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 qs.Emulated:s=new DB(o,a,n,this.appId,l);break;case qs.ShadowDom:return new A7(o,a,e,n);default:s=new XT(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)(ee(sM),ee(Cy),ee(cm),ee(MB))},i.\u0275prov=ke({token:i,factory:i.\u0275fac}),i})();class qT{constructor(t){this.eventManager=t,this.data=Object.create(null),this.destroyNode=null}destroy(){}createElement(t,e){return e?document.createElementNS(jT[e]||e,t):document.createElement(t)}createComment(t){return document.createComment(t)}createText(t){return document.createTextNode(t)}appendChild(t,e){(AB(t)?t.content:t).appendChild(e)}insertBefore(t,e,n){t&&(AB(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=jT[r];s?t.setAttributeNS(s,e,n):t.setAttribute(e,n)}else t.setAttribute(e,n)}removeAttribute(t,e,n){if(n){const r=jT[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&(Es.DashCase|Es.Important)?t.style.setProperty(e,n,r&Es.Important?"important":""):t.style[e]=n}removeStyle(t,e,n){n&Es.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,SB(n)):this.eventManager.addEventListener(t,e,SB(n))}}function AB(i){return"TEMPLATE"===i.tagName&&void 0!==i.content}class A7 extends qT{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=CB(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 XT extends qT{constructor(t,e,n,r,s=n.id){super(t),this.sharedStylesHost=e,this.removeStylesOnCompDestory=r,this.rendererUsageCount=0,this.styles=CB(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 DB extends XT{constructor(t,e,n,r,s){const o=r+"-"+n.id;super(t,e,n,s,o),this.contentAttr=function C7(i){return"_ngcontent-%COMP%".replace(YT,i)}(o),this.hostAttr=function S7(i){return"_nghost-%COMP%".replace(YT,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 D7=(()=>{class i extends yB{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)(ee(jt))},i.\u0275prov=ke({token:i,factory:i.\u0275fac}),i})();const TB=["alt","control","meta","shift"],T7={"\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"},I7={alt:i=>i.altKey,control:i=>i.ctrlKey,meta:i=>i.metaKey,shift:i=>i.shiftKey};let R7=(()=>{class i extends yB{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(()=>zc().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."),TB.forEach(c=>{const d=n.indexOf(c);d>-1&&(n.splice(d,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=T7[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"),TB.forEach(o=>{o!==r&&(0,I7[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)(ee(jt))},i.\u0275prov=ke({token:i,factory:i.\u0275fac}),i})();const F7=SN(m9,"browser",[{provide:fT,useValue:hB},{provide:pN,useValue:function k7(){WT.makeCurrent()},multi:!0},{provide:jt,useFactory:function O7(){return function sD(i){vv=i}(document),document},deps:[]}]),kB=new me(""),PB=[{provide:Vw,useClass:class y7{addToWindow(t){Rn.getAngularTestability=(n,r=!0)=>{const s=t.findTestabilityInTree(n,r);if(null==s)throw new Error("Could not find testability for element.");return s},Rn.getAllAngularTestabilities=()=>t.getAllTestabilities(),Rn.getAllAngularRootElements=()=>t.getAllRootElements(),Rn.frameworkStabilizers||(Rn.frameworkStabilizers=[]),Rn.frameworkStabilizers.push(n=>{const r=Rn.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?zc().isShadowRoot(e)?this.findTestabilityInTree(t,e.host,!0):this.findTestabilityInTree(t,e.parentElement,!0):null)}},deps:[]},{provide:bN,useClass:_T,deps:[ft,vT,Vw]},{provide:_T,useClass:_T,deps:[ft,vT,Vw]}],OB=[{provide:Iv,useValue:"root"},{provide:al,useFactory:function P7(){return new al},deps:[]},{provide:rM,useClass:D7,multi:!0,deps:[jt,ft,fT]},{provide:rM,useClass:R7,multi:!0,deps:[jt]},{provide:oM,useClass:oM,deps:[sM,Cy,cm,MB]},{provide:Gl,useExisting:oM},{provide:bB,useExisting:Cy},{provide:Cy,useClass:Cy,deps:[jt]},{provide:sM,useClass:sM,deps:[rM,ft]},{provide:class zY{},useClass:b7,deps:[]},[]];let FB=(()=>{class i{constructor(e){}static withServerTransition(e){return{ngModule:i,providers:[{provide:cm,useValue:e.appId},{provide:vB,useExisting:cm},v7]}}}return i.\u0275fac=function(e){return new(e||i)(ee(kB,12))},i.\u0275mod=nn({type:i}),i.\u0275inj=Kt({providers:[...OB,...PB],imports:[Eo,g9]}),i})(),LB=(()=>{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)(ee(jt))},i.\u0275prov=ke({token:i,factory:function(e){let n=null;return n=e?new e:function N7(){return new LB(ee(jt))}(),n},providedIn:"root"}),i})();typeof window<"u"&&window;let QT=(()=>{class i{}return i.\u0275fac=function(e){return new(e||i)},i.\u0275prov=ke({token:i,factory:function(e){let n=null;return n=e?new(e||i):ee(UB),n},providedIn:"root"}),i})(),UB=(()=>{class i extends QT{constructor(e){super(),this._doc=e}sanitize(e,n){if(null==n)return null;switch(e){case Kn.NONE:return n;case Kn.HTML:return Ma(n,"HTML")?Js(n):Kx(this._doc,String(n)).toString();case Kn.STYLE:return Ma(n,"Style")?Js(n):n;case Kn.SCRIPT:if(Ma(n,"Script"))return Js(n);throw new Error("unsafe value used in a script context");case Kn.URL:return Ma(n,"URL")?Js(n):bh(String(n));case Kn.RESOURCE_URL:if(Ma(n,"ResourceURL"))return Js(n);throw new Error(`unsafe value used in a resource URL context (see ${Yu})`);default:throw new Error(`Unexpected SecurityContext ${e} (see ${Yu})`)}}bypassSecurityTrustHtml(e){return function uD(i){return new oD(i)}(e)}bypassSecurityTrustStyle(e){return function hD(i){return new aD(i)}(e)}bypassSecurityTrustScript(e){return function fD(i){return new lD(i)}(e)}bypassSecurityTrustUrl(e){return function pD(i){return new cD(i)}(e)}bypassSecurityTrustResourceUrl(e){return function mD(i){return new Pp(i)}(e)}}return i.\u0275fac=function(e){return new(e||i)(ee(jt))},i.\u0275prov=ke({token:i,factory:function(e){let n=null;return n=e?new e:function H7(i){return new UB(i.get(jt))}(ee($i)),n},providedIn:"root"}),i})();function ht(...i){return Ni(i,Gu(i))}class vt extends Re{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 fm=V(i=>function(){i(this),this.name="EmptyError",this.message="no elements in sequence"}),{isArray:G7}=Array,{getPrototypeOf:$7,prototype:W7,keys:j7}=Object;function VB(i){if(1===i.length){const t=i[0];if(G7(t))return{args:t,keys:null};if(function Y7(i){return i&&"object"==typeof i&&$7(i)===W7}(t)){const e=j7(t);return{args:e.map(n=>t[n]),keys:e}}}return{args:i,keys:null}}const{isArray:q7}=Array;function JT(i){return et(t=>function X7(i,t){return q7(t)?i(...t):i(t)}(i,t))}function zB(i,t){return i.reduce((e,n,r)=>(e[n]=t[r],e),{})}function nu(...i){const t=Gu(i),e=x0(i),{args:n,keys:r}=VB(i);if(0===n.length)return Ni([],t);const s=new In(function K7(i,t,e=$a){return n=>{HB(t,()=>{const{length:r}=i,s=new Array(r);let o=r,a=r;for(let l=0;l{const c=Ni(i[l],t);let d=!1;c.subscribe(Yn(n,h=>{s[l]=h,d||(d=!0,a--),a||n.next(e(s.slice()))},()=>{--o||n.complete()}))},n)},n)}}(n,t,r?o=>zB(r,o):$a));return e?s.pipe(JT(e)):s}function HB(i,t,e){i?Ya(e,i,t):t()}function Sy(...i){return function Z7(){return yd(1)}()(Ni(i,Gu(i)))}function Ey(i){return new In(t=>{wr(i()).subscribe(t)})}function pm(i,t){const e=ln(i)?i:()=>i,n=r=>r.error(e());return new In(t?r=>t.schedule(n,0,r):n)}function eI(){return ti((i,t)=>{let e=null;i._refCount++;const n=Yn(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 GB extends In{constructor(t,e){super(),this.source=t,this.subjectFactory=e,this._subject=null,this._refCount=0,this._connection=null,l0(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 Zt;const e=this.getSubject();t.add(this.source.subscribe(Yn(e,void 0,()=>{this._teardown(),e.complete()},n=>{this._teardown(),e.error(n)},()=>this._teardown()))),t.closed&&(this._connection=null,t=Zt.EMPTY)}return t}refCount(){return eI()(this)}}function Rs(i,t){return ti((e,n)=>{let r=null,s=0,o=!1;const a=()=>o&&!r&&n.complete();e.subscribe(Yn(n,l=>{r?.unsubscribe();let c=0;const d=s++;wr(i(l,d)).subscribe(r=Yn(n,h=>n.next(t?t(l,h,d,c++):h),()=>{r=null,a()}))},()=>{o=!0,a()}))})}function Oi(i){return i<=0?()=>po:ti((t,e)=>{let n=0;t.subscribe(Yn(e,r=>{++n<=i&&(e.next(r),i<=n&&e.complete())}))})}function Ao(...i){const t=Gu(i);return ti((e,n)=>{(t?Sy(i,e,t):Sy(i,e)).subscribe(n)})}function gn(i,t){return ti((e,n)=>{let r=0;e.subscribe(Yn(n,s=>i.call(t,s,r++)&&n.next(s)))})}function aM(i){return ti((t,e)=>{let n=!1;t.subscribe(Yn(e,r=>{n=!0,e.next(r)},()=>{n||e.next(i),e.complete()}))})}function $B(i=Q7){return ti((t,e)=>{let n=!1;t.subscribe(Yn(e,r=>{n=!0,e.next(r)},()=>n?e.complete():e.error(i())))})}function Q7(){return new fm}function iu(i,t){const e=arguments.length>=2;return n=>n.pipe(i?gn((r,s)=>i(r,s,n)):$a,Oi(1),e?aM(t):$B(()=>new fm))}function ru(i,t){return ln(t)?nr(i,t,1):nr(i,1)}function Vi(i,t,e){const n=ln(i)||t||e?{next:i,error:t,complete:e}:i;return n?ti((r,s)=>{var o;null===(o=n.subscribe)||void 0===o||o.call(n);let a=!0;r.subscribe(Yn(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)}))}):$a}function $c(i){return ti((t,e)=>{let s,n=null,r=!1;n=t.subscribe(Yn(e,void 0,void 0,o=>{s=wr(i(o,$c(i)(t))),n?(n.unsubscribe(),n=null,s.subscribe(e)):r=!0})),r&&(n.unsubscribe(),n=null,s.subscribe(e))})}function tI(i,t){return ti(function J7(i,t,e,n,r){return(s,o)=>{let a=e,l=t,c=0;s.subscribe(Yn(o,d=>{const h=c++;l=a?i(l,d,h):(a=!0,d),n&&o.next(l)},r&&(()=>{a&&o.next(l),o.complete()})))}}(i,t,arguments.length>=2,!0))}function nI(i){return i<=0?()=>po:ti((t,e)=>{let n=[];t.subscribe(Yn(e,r=>{n.push(r),i{for(const r of n)e.next(r);e.complete()},void 0,()=>{n=null}))})}function WB(i,t){const e=arguments.length>=2;return n=>n.pipe(i?gn((r,s)=>i(r,s,n)):$a,nI(1),e?aM(t):$B(()=>new fm))}function jB(i,t=!1){return ti((e,n)=>{let r=0;e.subscribe(Yn(n,s=>{const o=i(s,r++);(o||t)&&n.next(s),!o&&n.complete()}))})}function YB(i){return et(()=>i)}function su(i){return ti((t,e)=>{try{t.subscribe(e)}finally{e.add(i)}})}const _n="primary",Ay=Symbol("RouteTitle");class eq{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 eq(i)}function tq(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 XB(i){return Array.prototype.concat.apply([],i)}function KB(i){return i.length>0?i[i.length-1]:null}function os(i,t){for(const e in i)i.hasOwnProperty(e)&&t(i[e],e)}function ou(i){return L1(i)?i:oy(i)?Ni(Promise.resolve(i)):ht(i)}const lM=!1,iq={exact:function JB(i,t,e){if(!Ih(i.segments,t.segments)||!cM(i.segments,t.segments,e)||i.numberOfChildren!==t.numberOfChildren)return!1;for(const n in t.children)if(!i.children[n]||!JB(i.children[n],t.children[n],e))return!1;return!0},subset:e3},ZB={exact:function rq(i,t){return Xl(i,t)},subset:function sq(i,t){return Object.keys(t).length<=Object.keys(i).length&&Object.keys(t).every(e=>qB(i[e],t[e]))},ignored:()=>!0};function QB(i,t,e){return iq[e.paths](i.root,t.root,e.matrixParams)&&ZB[e.queryParams](i.queryParams,t.queryParams)&&!("exact"===e.fragment&&i.fragment!==t.fragment)}function e3(i,t,e){return t3(i,t,t.segments,e)}function t3(i,t,e,n){if(i.segments.length>e.length){const r=i.segments.slice(0,e.length);return!(!Ih(r,e)||t.hasChildren()||!cM(r,e,n))}if(i.segments.length===e.length){if(!Ih(i.segments,e)||!cM(i.segments,e,n))return!1;for(const r in t.children)if(!i.children[r]||!e3(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!!(Ih(i.segments,r)&&cM(i.segments,r,n)&&i.children[_n])&&t3(i.children[_n],t,s,n)}}function cM(i,t,e){return t.every((n,r)=>ZB[e](i[r].parameters,n.parameters))}class au{constructor(t=new Tn([],{}),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 lq.serialize(this)}}class Tn{constructor(t,e){this.segments=t,this.children=e,this.parent=null,os(e,(n,r)=>n.parent=this)}hasChildren(){return this.numberOfChildren>0}get numberOfChildren(){return Object.keys(this.children).length}toString(){return dM(this)}}class Dy{constructor(t,e){this.path=t,this.parameters=e}get parameterMap(){return this._parameterMap||(this._parameterMap=mm(this.parameters)),this._parameterMap}toString(){return s3(this)}}function Ih(i,t){return i.length===t.length&&i.every((e,n)=>e.path===t[n].path)}let Ty=(()=>{class i{}return i.\u0275fac=function(e){return new(e||i)},i.\u0275prov=ke({token:i,factory:function(){return new iI},providedIn:"root"}),i})();class iI{parse(t){const e=new _q(t);return new au(e.parseRootSegment(),e.parseQueryParams(),e.parseFragment())}serialize(t){const e=`/${Iy(t.root,!0)}`,n=function uq(i){const t=Object.keys(i).map(e=>{const n=i[e];return Array.isArray(n)?n.map(r=>`${uM(e)}=${uM(r)}`).join("&"):`${uM(e)}=${uM(n)}`}).filter(e=>!!e);return t.length?`?${t.join("&")}`:""}(t.queryParams);return`${e}${n}${"string"==typeof t.fragment?`#${function cq(i){return encodeURI(i)}(t.fragment)}`:""}`}}const lq=new iI;function dM(i){return i.segments.map(t=>s3(t)).join("/")}function Iy(i,t){if(!i.hasChildren())return dM(i);if(t){const e=i.children[_n]?Iy(i.children[_n],!1):"",n=[];return os(i.children,(r,s)=>{s!==_n&&n.push(`${s}:${Iy(r,!1)}`)}),n.length>0?`${e}(${n.join("//")})`:e}{const e=function aq(i,t){let e=[];return os(i.children,(n,r)=>{r===_n&&(e=e.concat(t(n,r)))}),os(i.children,(n,r)=>{r!==_n&&(e=e.concat(t(n,r)))}),e}(i,(n,r)=>r===_n?[Iy(i.children[_n],!1)]:[`${r}:${Iy(n,!1)}`]);return 1===Object.keys(i.children).length&&null!=i.children[_n]?`${dM(i)}/${e[0]}`:`${dM(i)}/(${e.join("//")})`}}function n3(i){return encodeURIComponent(i).replace(/%40/g,"@").replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",")}function uM(i){return n3(i).replace(/%3B/gi,";")}function rI(i){return n3(i).replace(/\(/g,"%28").replace(/\)/g,"%29").replace(/%26/gi,"&")}function hM(i){return decodeURIComponent(i)}function r3(i){return hM(i.replace(/\+/g,"%20"))}function s3(i){return`${rI(i.path)}${function dq(i){return Object.keys(i).map(t=>`;${rI(t)}=${rI(i[t])}`).join("")}(i.parameters)}`}const hq=/^[^\/()?;=#]+/;function fM(i){const t=i.match(hq);return t?t[0]:""}const fq=/^[^=?&#]+/,mq=/^[^&#]+/;class _q{constructor(t){this.url=t,this.remaining=t}parseRootSegment(){return this.consumeOptional("/"),""===this.remaining||this.peekStartsWith("?")||this.peekStartsWith("#")?new Tn([],{}):new Tn([],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[_n]=new Tn(t,e)),n}parseSegment(){const t=fM(this.remaining);if(""===t&&this.peekStartsWith(";"))throw new pe(4009,lM);return this.capture(t),new Dy(hM(t),this.parseMatrixParams())}parseMatrixParams(){const t={};for(;this.consumeOptional(";");)this.parseParam(t);return t}parseParam(t){const e=fM(this.remaining);if(!e)return;this.capture(e);let n="";if(this.consumeOptional("=")){const r=fM(this.remaining);r&&(n=r,this.capture(n))}t[hM(e)]=hM(n)}parseQueryParam(t){const e=function pq(i){const t=i.match(fq);return t?t[0]:""}(this.remaining);if(!e)return;this.capture(e);let n="";if(this.consumeOptional("=")){const o=function gq(i){const t=i.match(mq);return t?t[0]:""}(this.remaining);o&&(n=o,this.capture(n))}const r=r3(e),s=r3(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=fM(this.remaining),r=this.remaining[n.length];if("/"!==r&&")"!==r&&";"!==r)throw new pe(4010,lM);let s;n.indexOf(":")>-1?(s=n.slice(0,n.indexOf(":")),this.capture(s),this.capture(":")):t&&(s=_n);const o=this.parseChildren();e[s]=1===Object.keys(o).length?o[_n]:new Tn([],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 pe(4011,lM)}}function sI(i){return i.segments.length>0?new Tn([],{[_n]:i}):i}function pM(i){const t={};for(const n of Object.keys(i.children)){const s=pM(i.children[n]);(s.segments.length>0||s.hasChildren())&&(t[n]=s)}return function vq(i){if(1===i.numberOfChildren&&i.children[_n]){const t=i.children[_n];return new Tn(i.segments.concat(t.segments),t.children)}return i}(new Tn(i.segments,t))}function Rh(i){return i instanceof au}const oI=!1;function yq(i,t,e,n,r){if(0===e.length)return gm(t.root,t.root,t.root,n,r);const s=function d3(i){if("string"==typeof i[0]&&1===i.length&&"/"===i[0])return new c3(!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 os(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 c3(e,t,n)}(e);return s.toRoot()?gm(t.root,t.root,new Tn([],{}),n,r):function o(l){const c=function xq(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 u3(i,t,e){let n=i,r=t,s=e;for(;s>r;){if(s-=r,n=n.parent,!n)throw new pe(4005,oI&&"Invalid number of '../'");r=n.segments.length}return new _m(n,!1,r-s)}(e,n+(Ry(i.commands[0])?0:1),i.numberOfDoubleDots)}(s,t,i.snapshot?._urlSegment,l),d=c.processChildren?vm(c.segmentGroup,c.index,s.commands):aI(c.segmentGroup,c.index,s.commands);return gm(t.root,c.segmentGroup,d,n,r)}(i.snapshot?._lastPathIndex)}function Ry(i){return"object"==typeof i&&null!=i&&!i.outlets&&!i.segmentPath}function ky(i){return"object"==typeof i&&null!=i&&i.outlets}function gm(i,t,e,n,r){let o,s={};n&&os(n,(l,c)=>{s[c]=Array.isArray(l)?l.map(d=>`${d}`):`${l}`}),o=i===t?e:l3(i,t,e);const a=sI(pM(o));return new au(a,s,r)}function l3(i,t,e){const n={};return os(i.children,(r,s)=>{n[s]=r===t?e:l3(r,t,e)}),new Tn(i.segments,n)}class c3{constructor(t,e,n){if(this.isAbsolute=t,this.numberOfDoubleDots=e,this.commands=n,t&&n.length>0&&Ry(n[0]))throw new pe(4003,oI&&"Root segment cannot have matrix parameters");const r=n.find(ky);if(r&&r!==KB(n))throw new pe(4004,oI&&"{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 aI(i,t,e){if(i||(i=new Tn([],{})),0===i.segments.length&&i.hasChildren())return vm(i,t,e);const n=function Mq(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(ky(a))break;const l=`${a}`,c=n0&&void 0===l)break;if(l&&c&&"object"==typeof c&&void 0===c.outlets){if(!f3(l,c,o))return s;n+=2}else{if(!f3(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]=aI(i.children[o],t,s))}),os(i.children,(s,o)=>{void 0===n[o]&&(r[o]=s)}),new Tn(i.segments,r)}}function lI(i,t,e){const n=i.segments.slice(0,t);let r=0;for(;r{"string"==typeof e&&(e=[e]),null!==e&&(t[n]=lI(new Tn([],{}),0,e))}),t}function h3(i){const t={};return os(i,(e,n)=>t[n]=`${e}`),t}function f3(i,t,e){return i==e.path&&Xl(t,e.parameters)}const Py="imperative";class Kl{constructor(t,e){this.id=t,this.url=e}}class cI extends Kl{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 kh extends Kl{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 mM extends Kl{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 gM extends Kl{constructor(t,e,n,r){super(t,e),this.reason=n,this.code=r,this.type=16}}class dI extends Kl{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 Sq extends Kl{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 Eq extends Kl{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 Aq extends Kl{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 Dq extends Kl{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 Tq extends Kl{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 Iq{constructor(t){this.route=t,this.type=9}toString(){return`RouteConfigLoadStart(path: ${this.route.path})`}}class Rq{constructor(t){this.route=t,this.type=10}toString(){return`RouteConfigLoadEnd(path: ${this.route.path})`}}class kq{constructor(t){this.snapshot=t,this.type=11}toString(){return`ChildActivationStart(path: '${this.snapshot.routeConfig&&this.snapshot.routeConfig.path||""}')`}}class Pq{constructor(t){this.snapshot=t,this.type=12}toString(){return`ChildActivationEnd(path: '${this.snapshot.routeConfig&&this.snapshot.routeConfig.path||""}')`}}class Oq{constructor(t){this.snapshot=t,this.type=13}toString(){return`ActivationStart(path: '${this.snapshot.routeConfig&&this.snapshot.routeConfig.path||""}')`}}class Fq{constructor(t){this.snapshot=t,this.type=14}toString(){return`ActivationEnd(path: '${this.snapshot.routeConfig&&this.snapshot.routeConfig.path||""}')`}}class p3{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 Bq=(()=>{class i{createUrlTree(e,n,r,s,o,a){return yq(e||n.root,r,s,o,a)}}return i.\u0275fac=function(e){return new(e||i)},i.\u0275prov=ke({token:i,factory:i.\u0275fac}),i})(),Vq=(()=>{class i{}return i.\u0275fac=function(e){return new(e||i)},i.\u0275prov=ke({token:i,factory:function(t){return Bq.\u0275fac(t)},providedIn:"root"}),i})();class m3{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=uI(t,this._root);return e?e.children.map(n=>n.value):[]}firstChild(t){const e=uI(t,this._root);return e&&e.children.length>0?e.children[0].value:null}siblings(t){const e=hI(t,this._root);return e.length<2?[]:e[e.length-2].children.map(r=>r.value).filter(r=>r!==t)}pathFromRoot(t){return hI(t,this._root).map(e=>e.value)}}function uI(i,t){if(i===t.value)return t;for(const e of t.children){const n=uI(i,e);if(n)return n}return null}function hI(i,t){if(i===t.value)return[t];for(const e of t.children){const n=hI(i,e);if(n.length)return n.unshift(t),n}return[]}class Wc{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 g3 extends m3{constructor(t,e){super(t),this.snapshot=e,fI(this,t)}toString(){return this.snapshot.toString()}}function _3(i,t){const e=function zq(i,t){const o=new _M([],{},{},"",{},_n,t,null,i.root,-1,{});return new y3("",new Wc(o,[]))}(i,t),n=new vt([new Dy("",{})]),r=new vt({}),s=new vt({}),o=new vt({}),a=new vt(""),l=new bm(n,r,o,a,s,_n,t,e.root);return l.snapshot=e.root,new g3(new Wc(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(et(c=>c[Ay]))??ht(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(et(t=>mm(t)))),this._paramMap}get queryParamMap(){return this._queryParamMap||(this._queryParamMap=this.queryParams.pipe(et(t=>mm(t)))),this._queryParamMap}toString(){return this.snapshot?this.snapshot.toString():`Future(${this._futureSnapshot})`}}function v3(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 Hq(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 _M{get title(){return this.data?.[Ay]}constructor(t,e,n,r,s,o,a,l,c,d,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=d,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 y3 extends m3{constructor(t,e){super(e),this.url=t,fI(this,e)}toString(){return b3(this._root)}}function fI(i,t){t.value._routerState=i,t.children.forEach(e=>fI(i,e))}function b3(i){const t=i.children.length>0?` { ${i.children.map(b3).join(", ")} } `:"";return`${i.value}${t}`}function pI(i){if(i.snapshot){const t=i.snapshot,e=i._futureSnapshot;i.snapshot=e,Xl(t.queryParams,e.queryParams)||i.queryParams.next(e.queryParams),t.fragment!==e.fragment&&i.fragment.next(e.fragment),Xl(t.params,e.params)||i.params.next(e.params),function nq(i,t){if(i.length!==t.length)return!1;for(let e=0;eXl(e.parameters,t[n].parameters))}(i.url,t.url);return e&&!(!i.parent!=!t.parent)&&(!i.parent||mI(i.parent,t.parent))}function Oy(i,t,e){if(e&&i.shouldReuseRoute(t.value,e.value.snapshot)){const n=e.value;n._futureSnapshot=t.value;const r=function $q(i,t,e){return t.children.map(n=>{for(const r of e.children)if(i.shouldReuseRoute(n.value,r.value.snapshot))return Oy(i,n,r);return Oy(i,n)})}(i,t,e);return new Wc(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=>Oy(i,a)),o}}const n=function Wq(i){return new bm(new vt(i.url),new vt(i.params),new vt(i.queryParams),new vt(i.fragment),new vt(i.data),i.outlet,i.component,i)}(t.value),r=t.children.map(s=>Oy(i,s));return new Wc(n,r)}}const gI="ngNavigationCancelingError";function x3(i,t){const{redirectTo:e,navigationBehaviorOptions:n}=Rh(t)?{redirectTo:t,navigationBehaviorOptions:void 0}:t,r=w3(!1,0,t);return r.url=e,r.navigationBehaviorOptions=n,r}function w3(i,t,e){const n=new Error("NavigationCancelingError: "+(i||""));return n[gI]=!0,n.cancellationCode=t,e&&(n.url=e),n}function M3(i){return C3(i)&&Rh(i.url)}function C3(i){return i&&i[gI]}class jq{constructor(){this.outlet=null,this.route=null,this.resolver=null,this.injector=null,this.children=new Fy,this.attachRef=null}}let Fy=(()=>{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 jq,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=ke({token:i,factory:i.\u0275fac,providedIn:"root"}),i})();const vM=!1;let S3=(()=>{class i{constructor(){this.activated=null,this._activatedRoute=null,this.name=_n,this.activateEvents=new We,this.deactivateEvents=new We,this.attachEvents=new We,this.detachEvents=new We,this.parentContexts=Ot(Fy),this.location=Ot(Wr),this.changeDetector=Ot(Zn),this.environmentInjector=Ot(to)}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 pe(4012,vM);return this.activated.instance}get activatedRoute(){if(!this.activated)throw new pe(4012,vM);return this._activatedRoute}get activatedRouteData(){return this._activatedRoute?this._activatedRoute.snapshot.data:{}}detach(){if(!this.activated)throw new pe(4012,vM);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 pe(4013,vM);this._activatedRoute=e;const r=this.location,o=e.snapshot.component,a=this.parentContexts.getOrCreateContext(this.name).children,l=new Yq(e,a,r.injector);if(n&&function qq(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=ve({type:i,selectors:[["router-outlet"]],inputs:{name:"name"},outputs:{activateEvents:"activate",deactivateEvents:"deactivate",attachEvents:"attach",detachEvents:"detach"},exportAs:["outlet"],standalone:!0,features:[bi]}),i})();class Yq{constructor(t,e,n){this.route=t,this.childContexts=e,this.parent=n}get(t,e){return t===bm?this.route:t===Fy?this.childContexts:this.parent.get(t,e)}}let _I=(()=>{class i{}return i.\u0275fac=function(e){return new(e||i)},i.\u0275cmp=ot({type:i,selectors:[["ng-component"]],standalone:!0,features:[Z1],decls:1,vars:0,template:function(e,n){1&e&&Te(0,"router-outlet")},dependencies:[S3],encapsulation:2}),i})();function E3(i,t){return i.providers&&!i._injector&&(i._injector=Ow(i.providers,t,`Route: ${i.path}`)),i._injector??t}function yI(i){const t=i.children&&i.children.map(yI),e=t?{...i,children:t}:{...i};return!e.component&&!e.loadComponent&&(t||e.loadChildren)&&e.outlet&&e.outlet!==_n&&(e.component=_I),e}function Da(i){return i.outlet||_n}function A3(i,t){const e=i.filter(n=>Da(n)===t);return e.push(...i.filter(n=>Da(n)!==t)),e}function Ly(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 Jq{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),pI(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]}),os(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 Fq(s.value.snapshot))}),t.children.length&&this.forwardEvent(new Pq(t.value.snapshot))}activateRoutes(t,e,n){const r=t.value,s=e?e.value:null;if(pI(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),pI(a.route.value),this.activateChildRoutes(t,null,o.children)}else{const a=Ly(r.snapshot),l=a?.get(Hl)??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 D3{constructor(t){this.path=t,this.route=this.path[this.path.length-1]}}class yM{constructor(t,e){this.component=t,this.route=e}}function eX(i,t,e){const n=i._root;return Ny(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 Cr(i){return null!==Gf(i)}(i)?t.get(i):i:n}function Ny(i,t,e,n,r={canDeactivateChecks:[],canActivateChecks:[]}){const s=ym(t);return i.children.forEach(o=>{(function nX(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 iX(i,t,e){if("function"==typeof e)return e(i,t);switch(e){case"pathParamsChange":return!Ih(i.url,t.url);case"pathParamsOrQueryParamsChange":return!Ih(i.url,t.url)||!Xl(i.queryParams,t.queryParams);case"always":return!0;case"paramsOrQueryParamsChange":return!mI(i,t)||!Xl(i.queryParams,t.queryParams);default:return!mI(i,t)}}(o,s,s.routeConfig.runGuardsAndResolvers);l?r.canActivateChecks.push(new D3(n)):(s.data=o.data,s._resolvedData=o._resolvedData),Ny(i,t,s.component?a?a.children:null:e,n,r),l&&a&&a.outlet&&a.outlet.isActivated&&r.canDeactivateChecks.push(new yM(a.outlet.component,o))}else o&&By(t,a,r),r.canActivateChecks.push(new D3(n)),Ny(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]}),os(s,(o,a)=>By(o,e.getContext(a),r)),r}function By(i,t,e){const n=ym(i),r=i.value;os(n,(s,o)=>{By(s,r.component?t?t.children.getContext(o):null:t,e)}),e.canDeactivateChecks.push(new yM(r.component&&t&&t.outlet&&t.outlet.isActivated?t.outlet.component:null,r))}function Uy(i){return"function"==typeof i}function bI(i){return i instanceof fm||"EmptyError"===i?.name}const bM=Symbol("INITIAL_VALUE");function wm(){return Rs(i=>nu(i.map(t=>t.pipe(Oi(1),Ao(bM)))).pipe(et(t=>{for(const e of t)if(!0!==e){if(e===bM)return bM;if(!1===e||e instanceof au)return e}return!0}),gn(t=>t!==bM),Oi(1)))}function T3(i){return function CE(...i){return o0(i)}(Vi(t=>{if(Rh(t))throw x3(0,t)}),et(t=>!0===t))}const xI={matched:!1,consumedSegments:[],remainingSegments:[],parameters:{},positionalParamSegments:{}};function I3(i,t,e,n,r){const s=wI(i,t,e);return s.matched?function bX(i,t,e,n){const r=t.canMatch;return r&&0!==r.length?ht(r.map(o=>{const a=xm(o,i);return ou(function cX(i){return i&&Uy(i.canMatch)}(a)?a.canMatch(t,e):i.runInContext(()=>a(t,e)))})).pipe(wm(),T3()):ht(!0)}(n=E3(t,n),t,e).pipe(et(o=>!0===o?s:{...xI})):ht(s)}function wI(i,t,e){if(""===t.path)return"full"===t.pathMatch&&(i.hasChildren()||e.length>0)?{...xI}:{matched:!0,consumedSegments:[],remainingSegments:e,parameters:{},positionalParamSegments:{}};const r=(t.matcher||tq)(e,i,t);if(!r)return{...xI};const s={};os(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 xM(i,t,e,n){if(e.length>0&&function MX(i,t,e){return e.some(n=>wM(i,t,n)&&Da(n)!==_n)}(i,e,n)){const s=new Tn(t,function wX(i,t,e,n){const r={};r[_n]=n,n._sourceSegment=i,n._segmentIndexShift=t.length;for(const s of e)if(""===s.path&&Da(s)!==_n){const o=new Tn([],{});o._sourceSegment=i,o._segmentIndexShift=t.length,r[Da(s)]=o}return r}(i,t,n,new Tn(e,i.children)));return s._sourceSegment=i,s._segmentIndexShift=t.length,{segmentGroup:s,slicedSegments:[]}}if(0===e.length&&function CX(i,t,e){return e.some(n=>wM(i,t,n))}(i,e,n)){const s=new Tn(i.segments,function xX(i,t,e,n,r){const s={};for(const o of n)if(wM(i,e,o)&&!r[Da(o)]){const a=new Tn([],{});a._sourceSegment=i,a._segmentIndexShift=t.length,s[Da(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 Tn(i.segments,i.children);return r._sourceSegment=i,r._segmentIndexShift=t.length,{segmentGroup:r,slicedSegments:e}}function wM(i,t,e){return(!(i.hasChildren()||t.length>0)||"full"!==e.pathMatch)&&""===e.path}function R3(i,t,e,n){return!!(Da(i)===n||n!==_n&&wM(t,e,i))&&("**"===i.path||wI(t,i,e).matched)}function k3(i,t,e){return 0===t.length&&!i.children[e]}const MM=!1;class CM{constructor(t){this.segmentGroup=t||null}}class P3{constructor(t){this.urlTree=t}}function Vy(i){return pm(new CM(i))}function O3(i){return pm(new P3(i))}class DX{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=xM(this.urlTree.root,[],[],this.config).segmentGroup,e=new Tn(t.segments,t.children);return this.expandSegmentGroup(this.injector,this.config,e,_n).pipe(et(s=>this.createUrlTree(pM(s),this.urlTree.queryParams,this.urlTree.fragment))).pipe($c(s=>{if(s instanceof P3)return this.allowRedirects=!1,this.match(s.urlTree);throw s instanceof CM?this.noMatchError(s):s}))}match(t){return this.expandSegmentGroup(this.injector,this.config,t.root,_n).pipe(et(r=>this.createUrlTree(pM(r),t.queryParams,t.fragment))).pipe($c(r=>{throw r instanceof CM?this.noMatchError(r):r}))}noMatchError(t){return new pe(4002,MM)}createUrlTree(t,e,n){const r=sI(t);return new au(r,e,n)}expandSegmentGroup(t,e,n,r){return 0===n.segments.length&&n.hasChildren()?this.expandChildren(t,e,n).pipe(et(s=>new Tn([],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 Ni(r).pipe(ru(s=>{const o=n.children[s],a=A3(e,s);return this.expandSegmentGroup(t,a,o,s).pipe(et(l=>({segment:l,outlet:s})))}),tI((s,o)=>(s[o.outlet]=o.segment,s),{}),WB())}expandSegment(t,e,n,r,s,o){return Ni(n).pipe(ru(a=>this.expandSegmentAgainstRoute(t,e,n,a,r,s,o).pipe($c(c=>{if(c instanceof CM)return ht(null);throw c}))),iu(a=>!!a),$c((a,l)=>{if(bI(a))return k3(e,r,s)?ht(new Tn([],{})):Vy(e);throw a}))}expandSegmentAgainstRoute(t,e,n,r,s,o,a){return R3(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):Vy(e):Vy(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("/")?O3(s):this.lineralizeSegments(n,s).pipe(nr(o=>{const a=new Tn(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:d}=wI(e,r,s);if(!a)return Vy(e);const h=this.applyRedirectCommands(l,r.redirectTo,d);return r.redirectTo.startsWith("/")?O3(h):this.lineralizeSegments(r,h).pipe(nr(p=>this.expandSegment(t,e,n,p.concat(c),o,!1)))}matchSegmentAgainstRoute(t,e,n,r,s){return"**"===n.path?(t=E3(n,t),n.loadChildren?(n._loadedRoutes?ht({routes:n._loadedRoutes,injector:n._loadedInjector}):this.configLoader.loadChildren(t,n)).pipe(et(a=>(n._loadedRoutes=a.routes,n._loadedInjector=a.injector,new Tn(r,{})))):ht(new Tn(r,{}))):I3(e,n,r,t).pipe(Rs(({matched:o,consumedSegments:a,remainingSegments:l})=>o?this.getChildConfig(t=n._injector??t,n,r).pipe(nr(d=>{const h=d.injector??t,p=d.routes,{segmentGroup:m,slicedSegments:g}=xM(e,a,l,p),b=new Tn(m.segments,m.children);if(0===g.length&&b.hasChildren())return this.expandChildren(h,p,b).pipe(et(x=>new Tn(a,x)));if(0===p.length&&0===g.length)return ht(new Tn(a,{}));const v=Da(n)===s;return this.expandSegment(h,b,p,g,v?_n:s,!0).pipe(et(M=>new Tn(a.concat(M.segments),M.children)))})):Vy(e)))}getChildConfig(t,e,n){return e.children?ht({routes:e.children,injector:t}):e.loadChildren?void 0!==e._loadedRoutes?ht({routes:e._loadedRoutes,injector:e._loadedInjector}):function yX(i,t,e,n){const r=t.canLoad;return void 0===r||0===r.length?ht(!0):ht(r.map(o=>{const a=xm(o,i);return ou(function sX(i){return i&&Uy(i.canLoad)}(a)?a.canLoad(t,e):i.runInContext(()=>a(t,e)))})).pipe(wm(),T3())}(t,e,n).pipe(nr(r=>r?this.configLoader.loadChildren(t,e).pipe(Vi(s=>{e._loadedRoutes=s.routes,e._loadedInjector=s.injector})):function EX(i){return pm(w3(MM,3))}())):ht({routes:[],injector:t})}lineralizeSegments(t,e){let n=[],r=e.root;for(;;){if(n=n.concat(r.segments),0===r.numberOfChildren)return ht(n);if(r.numberOfChildren>1||!r.children[_n])return t.redirectTo,pm(new pe(4e3,MM));r=r.children[_n]}}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 au(s,this.createQueryParams(e.queryParams,this.urlTree.queryParams),e.fragment)}createQueryParams(t,e){const n={};return os(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 os(e.children,(a,l)=>{o[l]=this.createSegmentGroup(t,a,n,r)}),new Tn(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 pe(4001,MM);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 IX{}class PX{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=xM(this.urlTree.root,[],[],this.config.filter(e=>void 0===e.redirectTo)).segmentGroup;return this.processSegmentGroup(this.injector,this.config,t,_n).pipe(et(e=>{if(null===e)return null;const n=new _M([],Object.freeze({}),Object.freeze({...this.urlTree.queryParams}),this.urlTree.fragment,{},_n,this.rootComponentType,null,this.urlTree.root,-1,{}),r=new Wc(n,e),s=new y3(this.url,r);return this.inheritParamsAndData(s._root),s}))}inheritParamsAndData(t){const e=t.value,n=v3(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 Ni(Object.keys(n.children)).pipe(ru(r=>{const s=n.children[r],o=A3(e,r);return this.processSegmentGroup(t,o,s,r)}),tI((r,s)=>r&&s?(r.push(...s),r):null),jB(r=>null!==r),aM(null),WB(),et(r=>{if(null===r)return null;const s=L3(r);return function OX(i){i.sort((t,e)=>t.value.outlet===_n?-1:e.value.outlet===_n?1:t.value.outlet.localeCompare(e.value.outlet))}(s),s}))}processSegment(t,e,n,r,s){return Ni(e).pipe(ru(o=>this.processSegmentAgainstRoute(o._injector??t,o,n,r,s)),iu(o=>!!o),$c(o=>{if(bI(o))return k3(n,r,s)?ht([]):ht(null);throw o}))}processSegmentAgainstRoute(t,e,n,r,s){if(e.redirectTo||!R3(e,n,r,s))return ht(null);let o;if("**"===e.path){const a=r.length>0?KB(r).parameters:{},l=B3(n)+r.length;o=ht({snapshot:new _M(r,a,Object.freeze({...this.urlTree.queryParams}),this.urlTree.fragment,U3(e),Da(e),e.component??e._loadedComponent??null,e,N3(n),l,V3(e)),consumedSegments:[],remainingSegments:[]})}else o=I3(n,e,r,t).pipe(et(({matched:a,consumedSegments:l,remainingSegments:c,parameters:d})=>{if(!a)return null;const h=B3(n)+l.length;return{snapshot:new _M(l,d,Object.freeze({...this.urlTree.queryParams}),this.urlTree.fragment,U3(e),Da(e),e.component??e._loadedComponent??null,e,N3(n),h,V3(e)),consumedSegments:l,remainingSegments:c}}));return o.pipe(Rs(a=>{if(null===a)return ht(null);const{snapshot:l,consumedSegments:c,remainingSegments:d}=a;t=e._injector??t;const h=e._loadedInjector??t,p=function FX(i){return i.children?i.children:i.loadChildren?i._loadedRoutes:[]}(e),{segmentGroup:m,slicedSegments:g}=xM(n,c,d,p.filter(v=>void 0===v.redirectTo));if(0===g.length&&m.hasChildren())return this.processChildren(h,p,m).pipe(et(v=>null===v?null:[new Wc(l,v)]));if(0===p.length&&0===g.length)return ht([new Wc(l,[])]);const b=Da(e)===s;return this.processSegment(h,p,m,g,b?_n:s).pipe(et(v=>null===v?null:[new Wc(l,v)]))}))}}function LX(i){const t=i.value.routeConfig;return t&&""===t.path&&void 0===t.redirectTo}function L3(i){const t=[],e=new Set;for(const n of i){if(!LX(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=L3(n.children);t.push(new Wc(n.value,r))}return t.filter(n=>!e.has(n))}function N3(i){let t=i;for(;t._sourceSegment;)t=t._sourceSegment;return t}function B3(i){let t=i,e=t._segmentIndexShift??0;for(;t._sourceSegment;)t=t._sourceSegment,e+=t._segmentIndexShift??0;return e-1}function U3(i){return i.data||{}}function V3(i){return i.resolve||{}}function z3(i){return"string"==typeof i.title||null===i.title}function MI(i){return Rs(t=>{const e=i(t);return e?Ni(e).pipe(et(()=>t)):ht(t)})}const Mm=new me("ROUTES");let CI=(()=>{class i{constructor(){this.componentLoaders=new WeakMap,this.childrenLoaders=new WeakMap,this.compiler=Ot(mN)}loadComponent(e){if(this.componentLoaders.get(e))return this.componentLoaders.get(e);if(e._loadedComponent)return ht(e._loadedComponent);this.onLoadStartListener&&this.onLoadStartListener(e);const n=ou(e.loadComponent()).pipe(et(G3),Vi(s=>{this.onLoadEndListener&&this.onLoadEndListener(e),e._loadedComponent=s}),su(()=>{this.componentLoaders.delete(e)})),r=new GB(n,()=>new Re).pipe(eI());return this.componentLoaders.set(e,r),r}loadChildren(e,n){if(this.childrenLoaders.get(n))return this.childrenLoaders.get(n);if(n._loadedRoutes)return ht({routes:n._loadedRoutes,injector:n._loadedInjector});this.onLoadStartListener&&this.onLoadStartListener(n);const s=this.loadModuleFactoryOrRoutes(n.loadChildren).pipe(et(a=>{this.onLoadEndListener&&this.onLoadEndListener(n);let l,c,d=!1;Array.isArray(a)?c=a:(l=a.create(e).injector,c=XB(l.get(Mm,[],Pt.Self|Pt.Optional)));return{routes:c.map(yI),injector:l}}),su(()=>{this.childrenLoaders.delete(n)})),o=new GB(s,()=>new Re).pipe(eI());return this.childrenLoaders.set(n,o),o}loadModuleFactoryOrRoutes(e){return ou(e()).pipe(et(G3),nr(n=>n instanceof D2||Array.isArray(n)?ht(n):Ni(this.compiler.compileModuleAsync(n))))}}return i.\u0275fac=function(e){return new(e||i)},i.\u0275prov=ke({token:i,factory:i.\u0275fac,providedIn:"root"}),i})();function G3(i){return function $X(i){return i&&"object"==typeof i&&"default"in i}(i)?i.default:i}let EM=(()=>{class i{get hasRequestedNavigation(){return 0!==this.navigationId}constructor(){this.currentNavigation=null,this.lastSuccessfulNavigation=null,this.events=new Re,this.configLoader=Ot(CI),this.environmentInjector=Ot(to),this.urlSerializer=Ot(Ty),this.rootContexts=Ot(Fy),this.navigationId=0,this.afterPreactivation=()=>ht(void 0),this.rootComponentType=null,this.configLoader.onLoadEndListener=r=>this.events.next(new Rq(r)),this.configLoader.onLoadStartListener=r=>this.events.next(new Iq(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 vt({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:Py,restoredState:null,currentSnapshot:e.routerState.snapshot,targetSnapshot:null,currentRouterState:e.routerState,targetRouterState:null,guards:{canActivateChecks:[],canDeactivateChecks:[]},guardsResult:null}),this.transitions.pipe(gn(n=>0!==n.id),et(n=>({...n,extractedUrl:e.urlHandlingStrategy.extract(n.rawUrl)})),Rs(n=>{let r=!1,s=!1;return ht(n).pipe(Vi(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}}),Rs(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 d="";return this.events.next(new gM(o.id,e.serializeUrl(n.rawUrl),d,0)),e.rawUrlTree=o.rawUrl,o.resolve(null),po}if(e.urlHandlingStrategy.shouldProcessUrl(o.rawUrl))return $3(o.source)&&(e.browserUrlTree=o.extractedUrl),ht(o).pipe(Rs(d=>{const h=this.transitions?.getValue();return this.events.next(new cI(d.id,this.urlSerializer.serialize(d.extractedUrl),d.source,d.restoredState)),h!==this.transitions?.getValue()?po:Promise.resolve(d)}),function TX(i,t,e,n){return Rs(r=>function AX(i,t,e,n,r){return new DX(i,t,e,n,r).apply()}(i,t,e,r.extractedUrl,n).pipe(et(s=>({...r,urlAfterRedirects:s}))))}(this.environmentInjector,this.configLoader,this.urlSerializer,e.config),Vi(d=>{this.currentNavigation={...this.currentNavigation,finalUrl:d.urlAfterRedirects},n.urlAfterRedirects=d.urlAfterRedirects}),function BX(i,t,e,n,r){return nr(s=>function kX(i,t,e,n,r,s,o="emptyOnly"){return new PX(i,t,e,n,r,o,s).recognize().pipe(Rs(a=>null===a?function RX(i){return new In(t=>t.error(i))}(new IX):ht(a)))}(i,t,e,s.urlAfterRedirects,n.serialize(s.urlAfterRedirects),n,r).pipe(et(o=>({...s,targetSnapshot:o}))))}(this.environmentInjector,this.rootComponentType,e.config,this.urlSerializer,e.paramsInheritanceStrategy),Vi(d=>{if(n.targetSnapshot=d.targetSnapshot,"eager"===e.urlUpdateStrategy){if(!d.extras.skipLocationChange){const p=e.urlHandlingStrategy.merge(d.urlAfterRedirects,d.rawUrl);e.setBrowserUrl(p,d)}e.browserUrlTree=d.urlAfterRedirects}const h=new Sq(d.id,this.urlSerializer.serialize(d.extractedUrl),this.urlSerializer.serialize(d.urlAfterRedirects),d.targetSnapshot);this.events.next(h)}));if(l&&e.urlHandlingStrategy.shouldProcessUrl(e.rawUrlTree)){const{id:d,extractedUrl:h,source:p,restoredState:m,extras:g}=o,b=new cI(d,this.urlSerializer.serialize(h),p,m);this.events.next(b);const v=_3(h,this.rootComponentType).snapshot;return ht(n={...o,targetSnapshot:v,urlAfterRedirects:h,extras:{...g,skipLocationChange:!1,replaceUrl:!1}})}{const d="";return this.events.next(new gM(o.id,e.serializeUrl(n.extractedUrl),d,1)),e.rawUrlTree=o.rawUrl,o.resolve(null),po}}),Vi(o=>{const a=new Eq(o.id,this.urlSerializer.serialize(o.extractedUrl),this.urlSerializer.serialize(o.urlAfterRedirects),o.targetSnapshot);this.events.next(a)}),et(o=>n={...o,guards:eX(o.targetSnapshot,o.currentSnapshot,this.rootContexts)}),function uX(i,t){return nr(e=>{const{targetSnapshot:n,currentSnapshot:r,guards:{canActivateChecks:s,canDeactivateChecks:o}}=e;return 0===o.length&&0===s.length?ht({...e,guardsResult:!0}):function hX(i,t,e,n){return Ni(i).pipe(nr(r=>function vX(i,t,e,n,r){const s=t&&t.routeConfig?t.routeConfig.canDeactivate:null;return s&&0!==s.length?ht(s.map(a=>{const l=Ly(t)??r,c=xm(a,l);return ou(function lX(i){return i&&Uy(i.canDeactivate)}(c)?c.canDeactivate(i,t,e,n):l.runInContext(()=>c(i,t,e,n))).pipe(iu())})).pipe(wm()):ht(!0)}(r.component,r.route,e,t,n)),iu(r=>!0!==r,!0))}(o,n,r,i).pipe(nr(a=>a&&function rX(i){return"boolean"==typeof i}(a)?function fX(i,t,e,n){return Ni(t).pipe(ru(r=>Sy(function mX(i,t){return null!==i&&t&&t(new kq(i)),ht(!0)}(r.route.parent,n),function pX(i,t){return null!==i&&t&&t(new Oq(i)),ht(!0)}(r.route,n),function _X(i,t,e){const n=t[t.length-1],s=t.slice(0,t.length-1).reverse().map(o=>function tX(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=>Ey(()=>ht(o.guards.map(l=>{const c=Ly(o.node)??e,d=xm(l,c);return ou(function aX(i){return i&&Uy(i.canActivateChild)}(d)?d.canActivateChild(n,i):c.runInContext(()=>d(n,i))).pipe(iu())})).pipe(wm())));return ht(s).pipe(wm())}(i,r.path,e),function gX(i,t,e){const n=t.routeConfig?t.routeConfig.canActivate:null;if(!n||0===n.length)return ht(!0);const r=n.map(s=>Ey(()=>{const o=Ly(t)??e,a=xm(s,o);return ou(function oX(i){return i&&Uy(i.canActivate)}(a)?a.canActivate(t,i):o.runInContext(()=>a(t,i))).pipe(iu())}));return ht(r).pipe(wm())}(i,r.route,e))),iu(r=>!0!==r,!0))}(n,s,i,t):ht(a)),et(a=>({...e,guardsResult:a})))})}(this.environmentInjector,o=>this.events.next(o)),Vi(o=>{if(n.guardsResult=o.guardsResult,Rh(o.guardsResult))throw x3(0,o.guardsResult);const a=new Aq(o.id,this.urlSerializer.serialize(o.extractedUrl),this.urlSerializer.serialize(o.urlAfterRedirects),o.targetSnapshot,!!o.guardsResult);this.events.next(a)}),gn(o=>!!o.guardsResult||(e.restoreHistory(o),this.cancelNavigationTransition(o,"",3),!1)),MI(o=>{if(o.guards.canActivateChecks.length)return ht(o).pipe(Vi(a=>{const l=new Dq(a.id,this.urlSerializer.serialize(a.extractedUrl),this.urlSerializer.serialize(a.urlAfterRedirects),a.targetSnapshot);this.events.next(l)}),Rs(a=>{let l=!1;return ht(a).pipe(function UX(i,t){return nr(e=>{const{targetSnapshot:n,guards:{canActivateChecks:r}}=e;if(!r.length)return ht(e);let s=0;return Ni(r).pipe(ru(o=>function VX(i,t,e,n){const r=i.routeConfig,s=i._resolve;return void 0!==r?.title&&!z3(r)&&(s[Ay]=r.title),function zX(i,t,e,n){const r=function HX(i){return[...Object.keys(i),...Object.getOwnPropertySymbols(i)]}(i);if(0===r.length)return ht({});const s={};return Ni(r).pipe(nr(o=>function GX(i,t,e,n){const r=Ly(t)??n,s=xm(i,r);return ou(s.resolve?s.resolve(t,e):r.runInContext(()=>s(t,e)))}(i[o],t,e,n).pipe(iu(),Vi(a=>{s[o]=a}))),nI(1),YB(s),$c(o=>bI(o)?po:pm(o)))}(s,i,t,n).pipe(et(o=>(i._resolvedData=o,i.data=v3(i,e).resolve,r&&z3(r)&&(i.data[Ay]=r.title),null)))}(o.route,n,i,t)),Vi(()=>s++),nI(1),nr(o=>s===r.length?ht(e):po))})}(e.paramsInheritanceStrategy,this.environmentInjector),Vi({next:()=>l=!0,complete:()=>{l||(e.restoreHistory(a),this.cancelNavigationTransition(a,"",2))}}))}),Vi(a=>{const l=new Tq(a.id,this.urlSerializer.serialize(a.extractedUrl),this.urlSerializer.serialize(a.urlAfterRedirects),a.targetSnapshot);this.events.next(l)}))}),MI(o=>{const a=l=>{const c=[];l.routeConfig?.loadComponent&&!l.routeConfig._loadedComponent&&c.push(this.configLoader.loadComponent(l.routeConfig).pipe(Vi(d=>{l.component=d}),et(()=>{})));for(const d of l.children)c.push(...a(d));return c};return nu(a(o.targetSnapshot.root)).pipe(aM(),Oi(1))}),MI(()=>this.afterPreactivation()),et(o=>{const a=function Gq(i,t,e){const n=Oy(i,t._root,e?e._root:void 0);return new g3(n,t)}(e.routeReuseStrategy,o.targetSnapshot,o.currentRouterState);return n={...o,targetRouterState:a}}),Vi(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)=>et(n=>(new Jq(t,n.targetRouterState,n.currentRouterState,e).activate(i),n)))(this.rootContexts,e.routeReuseStrategy,o=>this.events.next(o)),Oi(1),Vi({next:o=>{r=!0,this.lastSuccessfulNavigation=this.currentNavigation,e.navigated=!0,this.events.next(new kh(o.id,this.urlSerializer.serialize(o.extractedUrl),this.urlSerializer.serialize(e.currentUrlTree))),e.titleStrategy?.updateTitle(o.targetRouterState.snapshot),o.resolve(!0)},complete:()=>{r=!0}}),su(()=>{r||s||this.cancelNavigationTransition(n,"",1),this.currentNavigation?.id===n.id&&(this.currentNavigation=null)}),$c(o=>{if(s=!0,C3(o)){M3(o)||(e.navigated=!0,e.restoreHistory(n,!0));const a=new mM(n.id,this.urlSerializer.serialize(n.extractedUrl),o.message,o.cancellationCode);if(this.events.next(a),M3(o)){const l=e.urlHandlingStrategy.merge(o.url,e.rawUrlTree),c={skipLocationChange:n.extras.skipLocationChange,replaceUrl:"eager"===e.urlUpdateStrategy||$3(n.source)};e.scheduleNavigation(l,Py,null,c,{resolve:n.resolve,reject:n.reject,promise:n.promise})}else n.resolve(!1)}else{e.restoreHistory(n,!0);const a=new dI(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 po}))}))}cancelNavigationTransition(e,n,r){const s=new mM(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=ke({token:i,factory:i.\u0275fac,providedIn:"root"}),i})();function $3(i){return i!==Py}let W3=(()=>{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===_n);return n}getResolvedTitleForRoute(e){return e.data[Ay]}}return i.\u0275fac=function(e){return new(e||i)},i.\u0275prov=ke({token:i,factory:function(){return Ot(WX)},providedIn:"root"}),i})(),WX=(()=>{class i extends W3{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)(ee(LB))},i.\u0275prov=ke({token:i,factory:i.\u0275fac,providedIn:"root"}),i})(),jX=(()=>{class i{}return i.\u0275fac=function(e){return new(e||i)},i.\u0275prov=ke({token:i,factory:function(){return Ot(qX)},providedIn:"root"}),i})();class YX{shouldDetach(t){return!1}store(t,e){}shouldAttach(t){return!1}retrieve(t){return null}shouldReuseRoute(t,e){return t.routeConfig===e.routeConfig}}let qX=(()=>{class i extends YX{}return i.\u0275fac=function(){let t;return function(n){return(t||(t=ri(i)))(n||i)}}(),i.\u0275prov=ke({token:i,factory:i.\u0275fac,providedIn:"root"}),i})();const AM=new me("",{providedIn:"root",factory:()=>({})});let KX=(()=>{class i{}return i.\u0275fac=function(e){return new(e||i)},i.\u0275prov=ke({token:i,factory:function(){return Ot(ZX)},providedIn:"root"}),i})(),ZX=(()=>{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=ke({token:i,factory:i.\u0275fac,providedIn:"root"}),i})();function QX(i){throw i}function JX(i,t,e){return t.parse("/")}const eK={paths:"exact",fragment:"ignored",matrixParams:"ignored",queryParams:"exact"},tK={paths:"subset",fragment:"ignored",matrixParams:"ignored",queryParams:"subset"};let Yo=(()=>{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=Ot(F6),this.isNgZoneEnabled=!1,this.options=Ot(AM,{optional:!0})||{},this.errorHandler=this.options.errorHandler||QX,this.malformedUriErrorHandler=this.options.malformedUriErrorHandler||JX,this.navigated=!1,this.lastSuccessfulId=-1,this.urlHandlingStrategy=Ot(KX),this.routeReuseStrategy=Ot(jX),this.urlCreationStrategy=Ot(Vq),this.titleStrategy=Ot(W3),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=XB(Ot(Mm,{optional:!0})??[]),this.navigationTransitions=Ot(EM),this.urlSerializer=Ot(Ty),this.location=Ot(_y),this.isNgZoneEnabled=Ot(ft)instanceof ft&&ft.isInAngularZone(),this.resetConfig(this.config),this.currentUrlTree=new au,this.rawUrlTree=this.currentUrlTree,this.browserUrlTree=this.currentUrlTree,this.routerState=_3(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),Py,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(yI),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 d=null;switch(a){case"merge":d={...this.currentUrlTree.queryParams,...s};break;case"preserve":d=this.currentUrlTree.queryParams;break;default:d=s||null}return null!==d&&(d=this.removeEmptyProps(d)),this.urlCreationStrategy.createUrlTree(r,this.routerState,this.currentUrlTree,e,d,c??null)}navigateByUrl(e,n={skipLocationChange:!1}){const r=Rh(e)?e:this.parseUrl(e),s=this.urlHandlingStrategy.merge(r,this.rawUrlTree);return this.scheduleNavigation(s,Py,null,n)}navigate(e,n={skipLocationChange:!1}){return function nK(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,d;return o?(a=o.resolve,l=o.reject,c=o.promise):c=new Promise((h,p)=>{a=h,l=p}),d="computed"===this.canceledNavigationResolution?r&&r.\u0275routerPageId?r.\u0275routerPageId:(this.browserPageId??0)+1:0,this.navigationTransitions.handleNavigationRequest({targetPageId:d,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=ke({token:i,factory:i.\u0275fac,providedIn:"root"}),i})();class j3{}let sK=(()=>{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(gn(e=>e instanceof kh),ru(()=>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=Ow(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 Ni(r).pipe(yd())}preloadConfig(e,n){return this.preloadingStrategy.preload(n,()=>{let r;r=n.loadChildren&&void 0===n.canLoad?this.loader.loadChildren(e,n):ht(null);const s=r.pipe(nr(o=>null===o?ht(void 0):(n._loadedRoutes=o.routes,n._loadedInjector=o.injector,this.processRoutes(o.injector??e,o.routes))));return n.loadComponent&&!n._loadedComponent?Ni([s,this.loader.loadComponent(n)]).pipe(yd()):s})}}return i.\u0275fac=function(e){return new(e||i)(ee(Yo),ee(mN),ee(to),ee(j3),ee(CI))},i.\u0275prov=ke({token:i,factory:i.\u0275fac,providedIn:"root"}),i})();const AI=new me("");let Y3=(()=>{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 cI?(this.store[this.lastId]=this.viewportScroller.getScrollPosition(),this.lastSource=e.navigationTrigger,this.restoredId=e.restoredState?e.restoredState.navigationId:0):e instanceof kh&&(this.lastId=e.id,this.scheduleScrollEvent(e,this.urlSerializer.parse(e.urlAfterRedirects).fragment))})}consumeScrollEvents(){return this.transitions.events.subscribe(e=>{e instanceof p3&&(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 p3(e,"popstate"===this.lastSource?this.store[this.restoredId]:null,n))})},0)})}ngOnDestroy(){this.routerEventsSubscription?.unsubscribe(),this.scrollEventsSubscription?.unsubscribe()}}return i.\u0275fac=function(e){xo()},i.\u0275prov=ke({token:i,factory:i.\u0275fac}),i})();var qo=(()=>((qo=qo||{})[qo.COMPLETE=0]="COMPLETE",qo[qo.FAILED=1]="FAILED",qo[qo.REDIRECTING=2]="REDIRECTING",qo))();const Cm=!1;function lu(i,t){return{\u0275kind:i,\u0275providers:t}}const DI=new me("",{providedIn:"root",factory:()=>!1});function X3(){const i=Ot($i);return t=>{const e=i.get(dm);if(t!==e.components[0])return;const n=i.get(Yo),r=i.get(K3);1===i.get(TI)&&n.initialNavigation(),i.get(Z3,null,Pt.Optional)?.setUpPreloading(),i.get(AI,null,Pt.Optional)?.init(),n.resetRootComponentType(e.componentTypes[0]),r.closed||(r.next(),r.complete(),r.unsubscribe())}}const K3=new me(Cm?"bootstrap done indicator":"",{factory:()=>new Re}),TI=new me(Cm?"initial navigation":"",{providedIn:"root",factory:()=>1});function dK(){let i=[];return i=Cm?[{provide:Np,multi:!0,useFactory:()=>{const t=Ot(Yo);return()=>t.events.subscribe(e=>{console.group?.(`Router Event: ${e.constructor.name}`),console.log(function Lq(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?.()})}}]:[],lu(1,i)}const Z3=new me(Cm?"router preloader":"");function uK(i){return lu(0,[{provide:Z3,useExisting:sK},{provide:j3,useExisting:i}])}const zy=!1,Q3=new me(zy?"router duplicate forRoot guard":"ROUTER_FORROOT_GUARD"),hK=[_y,{provide:Ty,useClass:iI},Yo,Fy,{provide:bm,useFactory:function q3(i){return i.routerState.root},deps:[Yo]},CI,zy?{provide:DI,useValue:!0}:[]];function fK(){return new MN("Router",Yo)}let J3=(()=>{class i{constructor(e){}static forRoot(e,n){return{ngModule:i,providers:[hK,zy&&n?.enableTracing?dK().\u0275providers:[],{provide:Mm,multi:!0,useValue:e},{provide:Q3,useFactory:_K,deps:[[Yo,new Ss,new xa]]},{provide:AM,useValue:n||{}},n?.useHash?{provide:Th,useClass:M9}:{provide:Th,useClass:jN},{provide:AI,useFactory:()=>{const i=Ot(BY),t=Ot(ft),e=Ot(AM),n=Ot(EM),r=Ot(Ty);return e.scrollOffset&&i.setOffset(e.scrollOffset),new Y3(r,n,i,t,e)}},n?.preloadingStrategy?uK(n.preloadingStrategy).\u0275providers:[],{provide:MN,multi:!0,useFactory:fK},n?.initialNavigation?vK(n):[],[{provide:eU,useFactory:X3},{provide:wN,multi:!0,useExisting:eU}]]}}static forChild(e){return{ngModule:i,providers:[{provide:Mm,multi:!0,useValue:e}]}}}return i.\u0275fac=function(e){return new(e||i)(ee(Q3,8))},i.\u0275mod=nn({type:i}),i.\u0275inj=Kt({imports:[_I]}),i})();function _K(i){if(zy&&i)throw new pe(4007,"The Router was provided more than once. This can happen if 'forRoot' is used outside of the root injector. Lazy loaded modules should use RouterModule.forChild() instead.");return"guarded"}function vK(i){return["disabled"===i.initialNavigation?lu(3,[{provide:Bw,multi:!0,useFactory:()=>{const t=Ot(Yo);return()=>{t.setUpLocationChangeListener()}}},{provide:TI,useValue:2}]).\u0275providers:[],"enabledBlocking"===i.initialNavigation?lu(2,[{provide:TI,useValue:0},{provide:Bw,multi:!0,deps:[$i],useFactory:t=>{const e=t.get(x9,Promise.resolve());return()=>e.then(()=>new Promise(n=>{const r=t.get(Yo),s=t.get(K3);(function oK(i,t){i.events.pipe(gn(e=>e instanceof kh||e instanceof mM||e instanceof dI||e instanceof gM),et(e=>e instanceof kh||e instanceof gM?qo.COMPLETE:e instanceof mM&&(0===e.code||1===e.code)?qo.REDIRECTING:qo.FAILED),gn(e=>e!==qo.REDIRECTING),Oi(1)).subscribe(()=>{t()})})(r,()=>{n(!0)}),t.get(EM).afterPreactivation=()=>(n(!0),s.closed?ht(void 0):s),r.initialNavigation()}))}}]).\u0275providers:[]]}const eU=new me(zy?"Router Initializer":""),bK=[];let xK=(()=>{class i{}return i.\u0275fac=function(e){return new(e||i)},i.\u0275mod=nn({type:i}),i.\u0275inj=Kt({imports:[J3.forRoot(bK),J3]}),i})();function tU(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 tt(i){return function(){var t=this,e=arguments;return new Promise(function(n,r){var s=i.apply(t,e);function o(l){tU(s,n,r,o,a,"next",l)}function a(l){tU(s,n,r,o,a,"throw",l)}o(void 0)})}}function Jt(i){return null!=i&&"false"!=`${i}`}function ks(i,t=0){return function wK(i){return!isNaN(parseFloat(i))&&!isNaN(Number(i))}(i)?Number(i):t}function DM(i){return Array.isArray(i)?i:[i]}function gr(i){return null==i?"":"string"==typeof i?i:`${i}px`}function jc(i){return i instanceof mt?i.nativeElement:i}const MK=["addListener","removeListener"],CK=["addEventListener","removeEventListener"],SK=["on","off"];function Ta(i,t,e,n){if(ln(e)&&(n=e,e=void 0),n)return Ta(i,t,e).pipe(JT(n));const[r,s]=function DK(i){return ln(i.addEventListener)&&ln(i.removeEventListener)}(i)?CK.map(o=>a=>i[o](t,a,e)):function EK(i){return ln(i.addListener)&&ln(i.removeListener)}(i)?MK.map(nU(i,t)):function AK(i){return ln(i.on)&&ln(i.off)}(i)?SK.map(nU(i,t)):[];if(!r&&i_(i))return nr(o=>Ta(o,t,e))(wr(i));if(!r)throw new TypeError("Invalid event target");return new In(o=>{const a=(...l)=>o.next(1s(a)})}function nU(i,t){return e=>n=>i[e](t,n)}class TK extends Zt{constructor(t,e){super()}schedule(t,e=0){return this}}const TM={setInterval(i,t,...e){const{delegate:n}=TM;return n?.setInterval?n.setInterval(i,t,...e):setInterval(i,t,...e)},clearInterval(i){const{delegate:t}=TM;return(t?.clearInterval||clearInterval)(i)},delegate:void 0};class II extends TK{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 TM.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&&TM.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,Kr(n,this),null!=t&&(this.id=this.recycleAsyncId(e,t,null)),this.delay=null,super.unsubscribe()}}}const Hy={schedule(i){let t=requestAnimationFrame,e=cancelAnimationFrame;const{delegate:n}=Hy;n&&(t=n.requestAnimationFrame,e=n.cancelAnimationFrame);const r=t(s=>{e=void 0,i(s)});return new Zt(()=>e?.(r))},requestAnimationFrame(...i){const{delegate:t}=Hy;return(t?.requestAnimationFrame||requestAnimationFrame)(...i)},cancelAnimationFrame(...i){const{delegate:t}=Hy;return(t?.cancelAnimationFrame||cancelAnimationFrame)(...i)},delegate:void 0},iU={now:()=>(iU.delegate||Date).now(),delegate:void 0};class Gy{constructor(t,e=Gy.now){this.schedulerActionCtor=t,this.now=e}schedule(t,e=0,n){return new this.schedulerActionCtor(this,t).schedule(n,e)}}Gy.now=iU.now;class RI extends Gy{constructor(t,e=Gy.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 kK=new class RK extends RI{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 IK extends II{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=Hy.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&&(Hy.cancelAnimationFrame(e),t._scheduled=void 0)}});let kI,PK=1;const IM={};function rU(i){return i in IM&&(delete IM[i],!0)}const OK={setImmediate(i){const t=PK++;return IM[t]=!0,kI||(kI=Promise.resolve()),kI.then(()=>rU(t)&&i()),t},clearImmediate(i){rU(i)}},{setImmediate:FK,clearImmediate:LK}=OK,RM={setImmediate(...i){const{delegate:t}=RM;return(t?.setImmediate||FK)(...i)},clearImmediate(i){const{delegate:t}=RM;return(t?.clearImmediate||LK)(i)},delegate:void 0},PI=new class BK extends RI{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 NK extends II{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=RM.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&&(RM.clearImmediate(e),t._scheduled===e&&(t._scheduled=void 0))}}),$y=new RI(II),UK=$y;function OI(i=0,t,e=UK){let n=-1;return null!=t&&(Hu(t)?e=t:n=t),new In(r=>{let s=function zK(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 kM(i,t=$y){return function VK(i){return ti((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(Yn(e,c=>{n=!0,r=c,s||wr(i(c)).subscribe(s=Yn(e,a,l))},()=>{o=!0,(!n||!s||s.closed)&&e.complete()}))})}(()=>OI(i,t))}function He(i){return ti((t,e)=>{wr(i).subscribe(Yn(e,()=>e.complete(),ms)),!e.closed&&t.subscribe(e)})}let FI;try{FI=typeof Intl<"u"&&Intl.v8BreakIterator}catch{FI=!1}let Sm,zi=(()=>{class i{constructor(e){this._platformId=e,this.isBrowser=this._platformId?function NY(i){return i===hB}(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&&!FI)&&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)(ee(fT))},i.\u0275prov=ke({token:i,factory:i.\u0275fac,providedIn:"root"}),i})();const sU=["color","button","checkbox","date","datetime-local","email","file","hidden","image","month","number","password","radio","range","reset","search","submit","tel","text","time","url","week"];function oU(){if(Sm)return Sm;if("object"!=typeof document||!document)return Sm=new Set(sU),Sm;let i=document.createElement("input");return Sm=new Set(sU.filter(t=>(i.setAttribute("type",t),i.type===t))),Sm}let Wy,PM,Oh,LI;function Ph(i){return function HK(){if(null==Wy&&typeof window<"u")try{window.addEventListener("test",null,Object.defineProperty({},"passive",{get:()=>Wy=!0}))}finally{Wy=Wy||!1}return Wy}()?i:!!i.capture}function aU(){if(null==Oh){if("object"!=typeof document||!document||"function"!=typeof Element||!Element)return Oh=!1,Oh;if("scrollBehavior"in document.documentElement.style)Oh=!0;else{const i=Element.prototype.scrollTo;Oh=!!i&&!/\{\s*\[native code\]\s*\}/.test(i.toString())}}return Oh}function jy(){if("object"!=typeof document||!document)return 0;if(null==PM){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),PM=0,0===i.scrollLeft&&(i.scrollLeft=1,PM=0===i.scrollLeft?1:2),i.remove()}return PM}function OM(){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 cu(i){return i.composedPath?i.composedPath()[0]:i.target}function NI(){return typeof __karma__<"u"&&!!__karma__||typeof jasmine<"u"&&!!jasmine||typeof jest<"u"&&!!jest||typeof Mocha<"u"&&!!Mocha}const WK=new me("cdk-dir-doc",{providedIn:"root",factory:function jK(){return Ot(jt)}}),YK=/^(ar|ckb|dv|he|iw|fa|nqo|ps|sd|ug|ur|yi|.*[-_](Adlm|Arab|Hebr|Nkoo|Rohg|Thaa))(?!.*[-_](Latn|Cyrl)($|-|_))($|-|_)/i;let Ia=(()=>{class i{constructor(e){this.value="ltr",this.change=new We,e&&(this.value=function qK(i){const t=i?.toLowerCase()||"";return"auto"===t&&typeof navigator<"u"&&navigator?.language?YK.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)(ee(WK,8))},i.\u0275prov=ke({token:i,factory:i.\u0275fac,providedIn:"root"}),i})(),Yy=(()=>{class i{}return i.\u0275fac=function(e){return new(e||i)},i.\u0275mod=nn({type:i}),i.\u0275inj=Kt({}),i})();const XK=["contentWrapper"],KK=["*"],ZK=new me("VIRTUAL_SCROLL_STRATEGY");let qy=(()=>{class i{constructor(e,n,r){this._ngZone=e,this._platform=n,this._scrolled=new Re,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 In(n=>{this._globalSubscription||this._addGlobalListener();const r=e>0?this._scrolled.pipe(kM(e)).subscribe(n):this._scrolled.subscribe(n);return this._scrolledCount++,()=>{r.unsubscribe(),this._scrolledCount--,this._scrolledCount||this._removeGlobalListener()}}):ht()}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(gn(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=jc(n),s=e.getElementRef().nativeElement;do{if(r==s)return!0}while(r=r.parentElement);return!1}_addGlobalListener(){this._globalSubscription=this._ngZone.runOutsideAngular(()=>Ta(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)(ee(ft),ee(zi),ee(jt,8))},i.\u0275prov=ke({token:i,factory:i.\u0275fac,providedIn:"root"}),i})(),lU=(()=>{class i{constructor(e,n,r,s){this.elementRef=e,this.scrollDispatcher=n,this.ngZone=r,this.dir=s,this._destroyed=new Re,this._elementScrolled=new In(o=>this.ngZone.runOutsideAngular(()=>Ta(this.elementRef.nativeElement,"scroll").pipe(He(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!=jy()?(null!=e.left&&(e.right=n.scrollWidth-n.clientWidth-e.left),2==jy()?e.left=e.right:1==jy()&&(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;aU()?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==jy()?e==n?s.scrollWidth-s.clientWidth-s.scrollLeft:s.scrollLeft:o&&1==jy()?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)(E(mt),E(qy),E(ft),E(Ia,8))},i.\u0275dir=ve({type:i,selectors:[["","cdk-scrollable",""],["","cdkScrollable",""]],standalone:!0}),i})(),FM=(()=>{class i{constructor(e,n,r){this._platform=e,this._change=new Re,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(kM(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)(ee(zi),ee(ft),ee(jt,8))},i.\u0275prov=ke({token:i,factory:i.\u0275fac,providedIn:"root"}),i})();const cU=new me("VIRTUAL_SCROLLABLE");let eZ=(()=>{class i extends lU{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)(E(mt),E(qy),E(ft),E(Ia,8))},i.\u0275dir=ve({type:i,features:[lt]}),i})();const nZ=typeof requestAnimationFrame<"u"?kK:PI;let iZ=(()=>{class i extends eZ{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=Ot(zi),this._detachedSubject=new Re,this._renderedRangeSubject=new Re,this._orientation="vertical",this._appendOnly=!1,this.scrolledIndexChange=new In(d=>this._scrollStrategy.scrolledIndexChange.subscribe(h=>Promise.resolve().then(()=>this.ngZone.run(()=>d.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=Zt.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(Ao(null),kM(0,nZ)).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(He(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 tZ(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)(E(mt),E(Zn),E(ft),E(ZK,8),E(Ia,8),E(qy),E(FM),E(cU,8))},i.\u0275cmp=ot({type:i,selectors:[["cdk-virtual-scroll-viewport"]],viewQuery:function(e,n){if(1&e&&Wn(XK,7),2&e){let r;St(r=Et())&&(n._contentWrapper=r.first)}},hostAttrs:[1,"cdk-virtual-scroll-viewport"],hostVars:4,hostBindings:function(e,n){2&e&&un("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:[Dn([{provide:lU,useFactory:(t,e)=>t||e,deps:[[new Ss,new vo(cU)],i]}]),lt,Z1],ngContentSelectors:KK,decls:4,vars:4,consts:[[1,"cdk-virtual-scroll-content-wrapper"],["contentWrapper",""],[1,"cdk-virtual-scroll-spacer"]],template:function(e,n){1&e&&(sr(),W(0,"div",0,1),Wt(2),Y(),Te(3,"div",2)),2&e&&(G(3),jo("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})(),Xy=(()=>{class i{}return i.\u0275fac=function(e){return new(e||i)},i.\u0275mod=nn({type:i}),i.\u0275inj=Kt({}),i})(),dU=(()=>{class i{}return i.\u0275fac=function(e){return new(e||i)},i.\u0275mod=nn({type:i}),i.\u0275inj=Kt({imports:[Yy,Xy,iZ,Yy,Xy]}),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 Fh 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 rZ extends BI{constructor(t){super(),this.element=t instanceof mt?t.nativeElement:t}}class LM{constructor(){this._isDisposed=!1,this.attachDomPortal=null}hasAttached(){return!!this._attachedPortal}attach(t){return t instanceof Fh?(this._attachedPortal=t,this.attachComponentPortal(t)):t instanceof Em?(this._attachedPortal=t,this.attachTemplatePortal(t)):this.attachDomPortal&&t instanceof rZ?(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 sZ extends LM{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||$i.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 LM{constructor(e,n,r){super(),this._componentFactoryResolver=e,this._viewContainerRef=n,this._isInitialized=!1,this.attached=new We,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)(E(Hl),E(Wr),E(jt))},i.\u0275dir=ve({type:i,selectors:[["","cdkPortalOutlet",""]],inputs:{portal:["cdkPortalOutlet","portal"]},outputs:{attached:"attached"},exportAs:["cdkPortalOutlet"],features:[lt]}),i})(),Lh=(()=>{class i{}return i.\u0275fac=function(e){return new(e||i)},i.\u0275mod=nn({type:i}),i.\u0275inj=Kt({}),i})();function Xo(i,...t){return t.length?t.some(e=>i[e]):i.altKey||i.shiftKey||i.ctrlKey||i.metaKey}const uU=aU();class yZ{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=gr(-this._previousScrollPosition.left),t.style.top=gr(-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"),uU&&(n.scrollBehavior=r.scrollBehavior="auto"),window.scroll(this._previousScrollPosition.left,this._previousScrollPosition.top),uU&&(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 bZ{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(gn(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 hU{enable(){}disable(){}attach(){}}function VI(i,t){return t.some(e=>i.bottome.bottom||i.righte.right)}function fU(i,t){return t.some(e=>i.tope.bottom||i.lefte.right)}class xZ{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();VI(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 wZ=(()=>{class i{constructor(e,n,r,s){this._scrollDispatcher=e,this._viewportRuler=n,this._ngZone=r,this.noop=()=>new hU,this.close=o=>new bZ(this._scrollDispatcher,this._ngZone,this._viewportRuler,o),this.block=()=>new yZ(this._viewportRuler,this._document),this.reposition=o=>new xZ(this._scrollDispatcher,this._viewportRuler,this._ngZone,o),this._document=s}}return i.\u0275fac=function(e){return new(e||i)(ee(qy),ee(FM),ee(ft),ee(jt))},i.\u0275prov=ke({token:i,factory:i.\u0275fac,providedIn:"root"}),i})();class km{constructor(t){if(this.scrollStrategy=new hU,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 MZ{constructor(t,e){this.connectionPair=t,this.scrollableViewProperties=e}}let pU=(()=>{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)(ee(jt))},i.\u0275prov=ke({token:i,factory:i.\u0275fac,providedIn:"root"}),i})(),CZ=(()=>{class i extends pU{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)(ee(jt),ee(ft,8))},i.\u0275prov=ke({token:i,factory:i.\u0275fac,providedIn:"root"}),i})(),SZ=(()=>{class i extends pU{constructor(e,n,r){super(e),this._platform=n,this._ngZone=r,this._cursorStyleIsSet=!1,this._pointerDownListener=s=>{this._pointerDownEventTarget=cu(s)},this._clickListener=s=>{const o=cu(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 d=l[c];if(d._outsidePointerEvents.observers.length<1||!d.hasAttached())continue;if(d.overlayElement.contains(o)||d.overlayElement.contains(a))break;const h=d._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)(ee(jt),ee(zi),ee(ft,8))},i.\u0275prov=ke({token:i,factory:i.\u0275fac,providedIn:"root"}),i})(),UM=(()=>{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||NI()){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 Re,this._outsidePointerEvents=new Re,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(Oi(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=gr(this._config.width),t.height=gr(this._config.height),t.minWidth=gr(this._config.minWidth),t.minHeight=gr(this._config.minHeight),t.maxWidth=gr(this._config.maxWidth),t.maxHeight=gr(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=DM(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(He(Mr(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 mU="cdk-overlay-connected-position-bounding-box",EZ=/([A-Za-z%]+)$/;class AZ{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 Re,this._resizeSubscription=Zt.EMPTY,this._offsetX=0,this._offsetY=0,this._appliedPanelClasses=[],this.positionChanges=this._positionChanges,this.setOrigin(t)}attach(t){this._validatePositions(),t.hostElement.classList.add(mU),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),d=this._getOverlayFit(c,e,n,a);if(d.isCompletelyWithinViewport)return this._isPushed=!1,void this._applyPosition(a,l);this._canFitWithFlexibleDimensions(d,c,n)?s.push({position:a,origin:l,overlayRect:e,boundingBoxRect:this._calculateBoundingBoxRect(l,a)}):(!o||o.overlayFit.visibleAreal&&(l=d,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&&Nh(this._boundingBox.style,{top:"",left:"",right:"",bottom:"",height:"",width:"",alignItems:"",justifyContent:""}),this._pane&&this._resetOverlayElementStyles(),this._overlayRef&&this._overlayRef.hostElement.classList.remove(mU),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=_U(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=gU(this._overlayRef.getConfig().minHeight),a=gU(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=_U(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 d=0,h=0;return d=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,d=t.x-this._viewportMargin;else if("start"===e.overlayX&&!r||"end"===e.overlayX&&r)h=t.x,d=n.right-t.x;else{const m=Math.min(n.right-t.x+n.left,t.x),g=this._lastBoundingBoxSize.width;d=2*m,h=t.x-m,d>g&&!this._isInitialRender&&!this._growAfterOpen&&(h=t.x-g/2)}return{top:o,left:h,bottom:a,right:p,width:d,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=gr(n.height),r.top=gr(n.top),r.bottom=gr(n.bottom),r.width=gr(n.width),r.left=gr(n.left),r.right=gr(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=gr(s)),o&&(r.maxWidth=gr(o))}this._lastBoundingBoxSize=n,Nh(this._boundingBox.style,r)}_resetBoundingBoxStyles(){Nh(this._boundingBox.style,{top:"0",left:"0",right:"0",bottom:"0",height:"",width:"",alignItems:"",justifyContent:""})}_resetOverlayElementStyles(){Nh(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 d=this._viewportRuler.getViewportScrollPosition();Nh(n,this._getExactOverlayY(e,t,d)),Nh(n,this._getExactOverlayX(e,t,d))}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=gr(o.maxHeight):s&&(n.maxHeight="")),o.maxWidth&&(r?n.maxWidth=gr(o.maxWidth):s&&(n.maxWidth="")),Nh(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=gr(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=gr(s.x),r}_getScrollVisibility(){const t=this._getOriginRect(),e=this._pane.getBoundingClientRect(),n=this._scrollables.map(r=>r.getElementRef().nativeElement.getBoundingClientRect());return{isOriginClipped:fU(t,n),isOriginOutsideView:VI(t,n),isOverlayClipped:fU(e,n),isOverlayOutsideView:VI(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&&DM(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 mt)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 Nh(i,t){for(let e in t)t.hasOwnProperty(e)&&(i[e]=t[e]);return i}function gU(i){if("number"!=typeof i&&null!=i){const[t,e]=i.split(EZ);return e&&"px"!==e?null:parseFloat(t)}return i||null}function _U(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 vU="cdk-global-overlay-wrapper";class yU{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(vU),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),d=this._xPosition,h=this._xOffset,p="rtl"===this._overlayRef.getConfig().direction;let m="",g="",b="";l?b="flex-start":"center"===d?(b="center",p?g=h:m=h):p?"left"===d||"end"===d?(b="flex-end",m=h):("right"===d||"start"===d)&&(b="flex-start",g=h):"left"===d||"start"===d?(b="flex-start",m=h):("right"===d||"end"===d)&&(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(vU),n.justifyContent=n.alignItems=t.marginTop=t.marginBottom=t.marginLeft=t.marginRight=t.position="",this._overlayRef=null,this._isDisposed=!0}}let DZ=(()=>{class i{constructor(e,n,r,s){this._viewportRuler=e,this._document=n,this._platform=r,this._overlayContainer=s}global(){return new yU}flexibleConnectedTo(e){return new AZ(e,this._viewportRuler,this._document,this._platform,this._overlayContainer)}}return i.\u0275fac=function(e){return new(e||i)(ee(FM),ee(jt),ee(zi),ee(UM))},i.\u0275prov=ke({token:i,factory:i.\u0275fac,providedIn:"root"}),i})(),TZ=0,as=(()=>{class i{constructor(e,n,r,s,o,a,l,c,d,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=d,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 Zy(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-"+TZ++,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(dm)),new sZ(e,this._componentFactoryResolver,this._appRef,this._injector,this._document)}}return i.\u0275fac=function(e){return new(e||i)(ee(wZ),ee(UM),ee(Hl),ee(DZ),ee(CZ),ee($i),ee(ft),ee(jt),ee(Ia),ee(_y),ee(SZ),ee(Rr,8))},i.\u0275prov=ke({token:i,factory:i.\u0275fac,providedIn:"root"}),i})();const IZ=[{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"}],bU=new me("cdk-connected-overlay-scroll-strategy");let zI=(()=>{class i{constructor(e){this.elementRef=e}}return i.\u0275fac=function(e){return new(e||i)(E(mt))},i.\u0275dir=ve({type:i,selectors:[["","cdk-overlay-origin",""],["","overlay-origin",""],["","cdkOverlayOrigin",""]],exportAs:["cdkOverlayOrigin"],standalone:!0}),i})(),xU=(()=>{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=Zt.EMPTY,this._attachSubscription=Zt.EMPTY,this._detachSubscription=Zt.EMPTY,this._positionSubscription=Zt.EMPTY,this.viewportMargin=0,this.open=!1,this.disableClose=!1,this.backdropClick=new We,this.positionChange=new We,this.attach=new We,this.detach=new We,this.overlayKeydown=new We,this.overlayOutsideClick=new We,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=IZ);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&&!Xo(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 zI?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(jB(()=>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)(E(as),E(Mo),E(Wr),E(bU),E(Ia,8))},i.\u0275dir=ve({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:[bi]}),i})();const kZ={provide:bU,deps:[as],useFactory:function RZ(i){return()=>i.scrollStrategies.reposition()}};let Pm=(()=>{class i{}return i.\u0275fac=function(e){return new(e||i)},i.\u0275mod=nn({type:i}),i.\u0275inj=Kt({providers:[as,kZ],imports:[Yy,Lh,dU,dU]}),i})();function ml(i,t=$y){return ti((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,d=t.now();if(d{s=c,o=t.now(),r||(r=t.schedule(l,i),n.add(r))},()=>{a(),n.complete()},void 0,()=>{s=r=null}))})}function wU(i){return gn((t,e)=>i<=e)}function Zl(i,t=$a){return i=i??PZ,ti((e,n)=>{let r,s=!0;e.subscribe(Yn(n,o=>{const a=t(o);(s||!i(r,a))&&(s=!1,r=a,n.next(o))}))})}function PZ(i,t){return i===t}let MU=(()=>{class i{create(e){return typeof MutationObserver>"u"?null:new MutationObserver(e)}}return i.\u0275fac=function(e){return new(e||i)},i.\u0275prov=ke({token:i,factory:i.\u0275fac,providedIn:"root"}),i})(),OZ=(()=>{class i{constructor(e){this._mutationObserverFactory=e,this._observedElements=new Map}ngOnDestroy(){this._observedElements.forEach((e,n)=>this._cleanupObserver(n))}observe(e){const n=jc(e);return new In(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 Re,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)(ee(MU))},i.\u0275prov=ke({token:i,factory:i.\u0275fac,providedIn:"root"}),i})(),CU=(()=>{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=ks(e),this._subscribe()}constructor(e,n,r){this._contentObserver=e,this._elementRef=n,this._ngZone=r,this.event=new We,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(ml(this.debounce)):e).subscribe(this.event)})}_unsubscribe(){this._currentSubscription?.unsubscribe()}}return i.\u0275fac=function(e){return new(e||i)(E(OZ),E(mt),E(ft))},i.\u0275dir=ve({type:i,selectors:[["","cdkObserveContent",""]],inputs:{disabled:["cdkObserveContentDisabled","disabled"],debounce:"debounce"},outputs:{event:"cdkObserveContent"},exportAs:["cdkObserveContent"]}),i})(),HI=(()=>{class i{}return i.\u0275fac=function(e){return new(e||i)},i.\u0275mod=nn({type:i}),i.\u0275inj=Kt({providers:[MU]}),i})();const SU=new Set;let Om,FZ=(()=>{class i{constructor(e){this._platform=e,this._matchMedia=this._platform.isBrowser&&window.matchMedia?window.matchMedia.bind(window):NZ}matchMedia(e){return(this._platform.WEBKIT||this._platform.BLINK)&&function LZ(i){if(!SU.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),SU.add(i))}catch(t){console.error(t)}}(e),this._matchMedia(e)}}return i.\u0275fac=function(e){return new(e||i)(ee(zi))},i.\u0275prov=ke({token:i,factory:i.\u0275fac,providedIn:"root"}),i})();function NZ(i){return{matches:"all"===i||""===i,media:i,addListener:()=>{},removeListener:()=>{}}}let GI=(()=>{class i{constructor(e,n){this._mediaMatcher=e,this._zone=n,this._queries=new Map,this._destroySubject=new Re}ngOnDestroy(){this._destroySubject.next(),this._destroySubject.complete()}isMatched(e){return EU(DM(e)).some(r=>this._registerQuery(r).mql.matches)}observe(e){let s=nu(EU(DM(e)).map(o=>this._registerQuery(o).observable));return s=Sy(s.pipe(Oi(1)),s.pipe(wU(1),ml(0))),s.pipe(et(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 In(o=>{const a=l=>this._zone.run(()=>o.next(l));return n.addListener(a),()=>{n.removeListener(a)}}).pipe(Ao(n),et(({matches:o})=>({query:e,matches:o})),He(this._destroySubject)),mql:n};return this._queries.set(e,s),s}}return i.\u0275fac=function(e){return new(e||i)(ee(FZ),ee(ft))},i.\u0275prov=ke({token:i,factory:i.\u0275fac,providedIn:"root"}),i})();function EU(i){return i.map(t=>t.split(",")).reduce((t,e)=>t.concat(e)).map(t=>t.trim())}function VM(i,t){return(i.getAttribute(t)||"").match(/\S+/g)||[]}const DU="cdk-describedby-message",zM="cdk-describedby-host";let $I=0,zZ=(()=>{class i{constructor(e,n){this._platform=n,this._messageRegistry=new Map,this._messagesContainer=null,this._id=""+$I++,this._document=e,this._id=Ot(cm)+"-"+$I++}describe(e,n,r){if(!this._canBeDescribed(e,n))return;const s=WI(n,r);"string"!=typeof n?(TU(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=WI(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(`[${zM}="${this._id}"]`);for(let n=0;n0!=r.indexOf(DU));e.setAttribute("aria-describedby",n.join(" "))}_addMessageReference(e,n){const r=this._messageRegistry.get(n);(function UZ(i,t,e){const n=VM(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(zM,this._id),r.referenceCount++}_removeMessageReference(e,n){const r=this._messageRegistry.get(n);r.referenceCount--,function VZ(i,t,e){const r=VM(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(zM)}_isElementDescribedByMessage(e,n){const r=VM(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)(ee(jt),ee(zi))},i.\u0275prov=ke({token:i,factory:i.\u0275fac,providedIn:"root"}),i})();function WI(i,t){return"string"==typeof i?`${t||""}/${i}`:i}function TU(i,t){i.id||(i.id=`${DU}-${t}-${$I++}`)}class IU{constructor(t){this._items=t,this._activeItemIndex=-1,this._activeItem=null,this._wrap=!1,this._letterKeyStream=new Re,this._typeaheadSubscription=Zt.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 Re,this.change=new Re,t instanceof om&&(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(Vi(e=>this._pressedLetters.push(e)),ml(t),gn(()=>this._pressedLetters.length>0),et(()=>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 om?this._items.toArray():this._items}}class HZ extends IU{setActiveItem(t){this.activeItem&&this.activeItem.setInactiveStyles(),super.setActiveItem(t),this.activeItem&&this.activeItem.setActiveStyles()}}class RU extends IU{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 HM=(()=>{class i{constructor(e){this._platform=e}isDisabled(e){return e.hasAttribute("disabled")}isVisible(e){return function $Z(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 GZ(i){try{return i.frameElement}catch{return null}}(function QZ(i){return i.ownerDocument&&i.ownerDocument.defaultView||window}(e));if(n&&(-1===PU(n)||!this.isVisible(n)))return!1;let r=e.nodeName.toLowerCase(),s=PU(e);return e.hasAttribute("contenteditable")?-1!==s:!("iframe"===r||"object"===r||this._platform.WEBKIT&&this._platform.IOS&&!function KZ(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 ZZ(i){return!function jZ(i){return function qZ(i){return"input"==i.nodeName.toLowerCase()}(i)&&"hidden"==i.type}(i)&&(function WZ(i){let t=i.nodeName.toLowerCase();return"input"===t||"select"===t||"button"===t||"textarea"===t}(i)||function YZ(i){return function XZ(i){return"a"==i.nodeName.toLowerCase()}(i)&&i.hasAttribute("href")}(i)||i.hasAttribute("contenteditable")||kU(i))}(e)&&!this.isDisabled(e)&&(n?.ignoreVisibility||this.isVisible(e))}}return i.\u0275fac=function(e){return new(e||i)(ee(zi))},i.\u0275prov=ke({token:i,factory:i.\u0275fac,providedIn:"root"}),i})();function kU(i){if(!i.hasAttribute("tabindex")||void 0===i.tabIndex)return!1;let t=i.getAttribute("tabindex");return!(!t||isNaN(parseInt(t,10)))}function PU(i){if(!kU(i))return null;const t=parseInt(i.getAttribute("tabindex")||"",10);return isNaN(t)?-1:t}class JZ{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(Oi(1)).subscribe(t)}}let jI=(()=>{class i{constructor(e,n,r){this._checker=e,this._ngZone=n,this._document=r}create(e,n=!1){return new JZ(e,this._checker,this._ngZone,this._document,n)}}return i.\u0275fac=function(e){return new(e||i)(ee(HM),ee(ft),ee(jt))},i.\u0275prov=ke({token:i,factory:i.\u0275fac,providedIn:"root"}),i})();function YI(i){return 0===i.buttons||0===i.offsetX&&0===i.offsetY}function qI(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 eQ=new me("cdk-input-modality-detector-options"),tQ={ignoreKeys:[18,17,224,91,16]},Fm=Ph({passive:!0,capture:!0});let nQ=(()=>{class i{get mostRecentModality(){return this._modality.value}constructor(e,n,r,s){this._platform=e,this._mostRecentTarget=null,this._modality=new vt(null),this._lastTouchMs=0,this._onKeydown=o=>{this._options?.ignoreKeys?.some(a=>a===o.keyCode)||(this._modality.next("keyboard"),this._mostRecentTarget=cu(o))},this._onMousedown=o=>{Date.now()-this._lastTouchMs<650||(this._modality.next(YI(o)?"keyboard":"mouse"),this._mostRecentTarget=cu(o))},this._onTouchstart=o=>{qI(o)?this._modality.next("keyboard"):(this._lastTouchMs=Date.now(),this._modality.next("touch"),this._mostRecentTarget=cu(o))},this._options={...tQ,...s},this.modalityDetected=this._modality.pipe(wU(1)),this.modalityChanged=this.modalityDetected.pipe(Zl()),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)(ee(zi),ee(ft),ee(jt),ee(eQ,8))},i.\u0275prov=ke({token:i,factory:i.\u0275fac,providedIn:"root"}),i})();const iQ=new me("liveAnnouncerElement",{providedIn:"root",factory:function rQ(){return null}}),sQ=new me("LIVE_ANNOUNCER_DEFAULT_OPTIONS");let oQ=0,XI=(()=>{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 Re,this._rootNodeFocusAndBlurListener=a=>{for(let c=cu(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=jc(e);if(!this._platform.isBrowser||1!==r.nodeType)return ht(null);const s=function $K(i){if(function GK(){if(null==LI){const i=typeof document<"u"?document.head:null;LI=!(!i||!i.createShadowRoot&&!i.attachShadow)}return LI}()){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 Re,rootNode:s};return this._elementInfo.set(r,a),this._registerGlobalListeners(a),a.subject}stopMonitoring(e){const n=jc(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=jc(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=cu(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,GM),n.addEventListener("blur",this._rootNodeFocusAndBlurListener,GM)}),this._rootNodeFocusListenerCount.set(n,r+1),1==++this._monitoredElementCount&&(this._ngZone.runOutsideAngular(()=>{this._getWindow().addEventListener("focus",this._windowFocusListener)}),this._inputModalityDetector.modalityDetected.pipe(He(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,GM),n.removeEventListener("blur",this._rootNodeFocusAndBlurListener,GM),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=Ot(GI).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,FU,LU),this._hasCheckedHighContrastMode=!0;const n=this.getHighContrastMode();1===n?e.add(KI,FU):2===n&&e.add(KI,LU)}}}return i.\u0275fac=function(e){return new(e||i)(ee(zi),ee(jt))},i.\u0275prov=ke({token:i,factory:i.\u0275fac,providedIn:"root"}),i})(),BU=(()=>{class i{constructor(e){e._applyBodyHighContrastModeCssClasses()}}return i.\u0275fac=function(e){return new(e||i)(ee(NU))},i.\u0275mod=nn({type:i}),i.\u0275inj=Kt({imports:[HI]}),i})();function lQ(i,t){}class $M{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 UU=(()=>{class i extends LM{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=d=>{this._portalOutlet.hasAttached();const h=this._portalOutlet.attachDomPortal(d);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=OM(),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=OM();return e===n||e.contains(n)}_initializeFocusTrap(){this._focusTrap=this._focusTrapFactory.create(this._elementRef.nativeElement),this._document&&(this._elementFocusedBeforeDialogWasOpened=OM())}_handleBackdropClicks(){this._overlayRef.backdropClick().subscribe(()=>{this._config.disableClose&&this._recaptureFocus()})}}return i.\u0275fac=function(e){return new(e||i)(E(mt),E(jI),E(jt,8),E($M),E(HM),E(ft),E(Zy),E(Yc))},i.\u0275cmp=ot({type:i,selectors:[["cdk-dialog-container"]],viewQuery:function(e,n){if(1&e&&Wn(Am,7),2&e){let r;St(r=Et())&&(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:[lt],decls:1,vars:0,consts:[["cdkPortalOutlet",""]],template:function(e,n){1&e&&fe(0,lQ,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 ZI{constructor(t,e){this.overlayRef=t,this.config=e,this.closed=new Re,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&&!Xo(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 VU=new me("DialogScrollStrategy"),cQ=new me("DialogData"),dQ=new me("DefaultDialogConfig"),hQ={provide:VU,deps:[as],useFactory:function uQ(i){return()=>i.scrollStrategies.block()}};let fQ=0,zU=(()=>{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 Re,this._afterOpenedAtThisLevel=new Re,this._ariaHiddenElements=new Map,this.afterAllClosed=Ey(()=>this.openDialogs.length?this._getAfterAllClosed():this._getAfterAllClosed().pipe(Ao(void 0))),this._scrollStrategy=a}open(e,n){(n={...this._defaultOptions||new $M,...n}).id=n.id||"cdk-dialog-"+fQ++,n.id&&this.getDialogById(n.id);const s=this._getOverlayConfig(n),o=this._overlay.create(s),a=new ZI(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(){QI(this.openDialogs,e=>e.close())}getDialogById(e){return this.openDialogs.find(n=>n.id===e)}ngOnDestroy(){QI(this._openDialogsAtThisLevel,e=>{!1===e.config.closeOnDestroy&&this._removeOpenDialog(e,!1)}),QI(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:$M,useValue:r},{provide:ZI,useValue:n},{provide:Zy,useValue:e}];let a;r.container?"function"==typeof r.container?a=r.container:(a=r.container.type,o.push(...r.container.providers(r))):a=UU;const l=new Fh(a,r.viewContainerRef,$i.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 Fh(e,s.viewContainerRef,o,s.componentFactoryResolver));n.componentInstance=a.instance}}_createInjector(e,n,r,s){const o=e.injector||e.viewContainerRef?.injector,a=[{provide:cQ,useValue:e.data},{provide:ZI,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(Ia,null,{optional:!0}))&&a.push({provide:Ia,useValue:{value:e.direction,change:ht()}}),$i.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)(ee(as),ee($i),ee(dQ,8),ee(i,12),ee(UM),ee(VU))},i.\u0275prov=ke({token:i,factory:i.\u0275fac}),i})();function QI(i,t){let e=i.length;for(;e--;)t(i[e])}let pQ=(()=>{class i{}return i.\u0275fac=function(e){return new(e||i)},i.\u0275mod=nn({type:i}),i.\u0275inj=Kt({providers:[zU,hQ],imports:[Pm,Lh,BU,Lh]}),i})();const mQ=["text"];function gQ(i,t){if(1&i&&Te(0,"mat-pseudo-checkbox",6),2&i){const e=he();U("state",e.selected?"checked":"unchecked")("disabled",e.disabled)}}function _Q(i,t){1&i&&Te(0,"mat-pseudo-checkbox",7),2&i&&U("disabled",he().disabled)}function vQ(i,t){if(1&i&&(W(0,"span",8),ze(1),Y()),2&i){const e=he();G(1),Zi("(",e.group.label,")")}}const yQ=[[["mat-icon"]],"*"],bQ=["mat-icon","*"],wQ=new me("mat-sanity-checks",{providedIn:"root",factory:function xQ(){return!0}});let Qn=(()=>{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!NI()&&("boolean"==typeof this._sanityChecks?this._sanityChecks:!!this._sanityChecks[e])}}return i.\u0275fac=function(e){return new(e||i)(ee(NU),ee(wQ,8),ee(jt))},i.\u0275mod=nn({type:i}),i.\u0275inj=Kt({imports:[Yy,Yy]}),i})();function WM(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 Qy(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 jM(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 JI(i,t=0){return class extends i{get tabIndex(){return this.disabled?-1:this._tabIndex}set tabIndex(e){this._tabIndex=null!=e?ks(e):this.defaultTabIndex}constructor(...e){super(...e),this._tabIndex=t,this.defaultTabIndex=t}}}function $U(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 MQ(i){return class extends i{constructor(...t){super(...t),this._isInitialized=!1,this._pendingSubscribers=[],this.initialized=new In(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 jU=(()=>{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=ke({token:i,factory:i.\u0275fac,providedIn:"root"}),i})();class SQ{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 YU=Ph({passive:!0,capture:!0});class EQ{constructor(){this._events=new Map,this._delegateEventHandler=t=>{const e=cu(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,YU)})}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,YU)))}}const qU={enterDuration:225,exitDuration:150},XU=Ph({passive:!0,capture:!0}),KU=["mousedown","touchstart"],ZU=["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=jc(n))}fadeInRipple(t,e,n={}){const r=this._containerRect=this._containerRect||this._containerElement.getBoundingClientRect(),s={...qU,...n.animation};n.centered&&(t=r.left+r.width/2,e=r.top+r.height/2);const o=n.radius||function DQ(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,d=document.createElement("div");d.classList.add("mat-ripple-element"),d.style.left=a-o+"px",d.style.top=l-o+"px",d.style.height=2*o+"px",d.style.width=2*o+"px",null!=n.color&&(d.style.backgroundColor=n.color),d.style.transitionDuration=`${c}ms`,this._containerElement.appendChild(d);const h=window.getComputedStyle(d),m=h.transitionDuration,g="none"===h.transitionProperty||"0s"===m||"0s, 0s"===m||0===r.width&&0===r.height,b=new SQ(this,d,n,g);d.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);d.addEventListener("transitionend",y),d.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={...qU,...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=jc(t);!this._platform.isBrowser||!e||e===this._triggerElement||(this._removeTriggerEvents(),this._triggerElement=e,KU.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(()=>{ZU.forEach(e=>{this._triggerElement.addEventListener(e,this,XU)})}),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=YI(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&&(KU.forEach(e=>Lm._eventManager.removeHandler(e,t,this)),this._pointerUpEventsRegistered&&ZU.forEach(e=>t.removeEventListener(e,this,XU)))}}Lm._eventManager=new EQ;const eR=new me("mat-ripple-global-options");let Bh=(()=>{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)(E(mt),E(ft),E(zi),E(eR,8),E(Rr,8))},i.\u0275dir=ve({type:i,selectors:[["","mat-ripple",""],["","matRipple",""]],hostAttrs:[1,"mat-ripple"],hostVars:2,hostBindings:function(e,n){2&e&&un("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})(),eb=(()=>{class i{}return i.\u0275fac=function(e){return new(e||i)},i.\u0275mod=nn({type:i}),i.\u0275inj=Kt({imports:[Qn,Qn]}),i})(),TQ=(()=>{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)(E(Rr,8))},i.\u0275cmp=ot({type:i,selectors:[["mat-pseudo-checkbox"]],hostAttrs:[1,"mat-pseudo-checkbox"],hostVars:12,hostBindings:function(e,n){2&e&&un("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})(),QU=(()=>{class i{}return i.\u0275fac=function(e){return new(e||i)},i.\u0275mod=nn({type:i}),i.\u0275inj=Kt({imports:[Qn]}),i})();const JU=new me("MAT_OPTION_PARENT_COMPONENT"),eV=new me("MatOptgroup");let IQ=0;class RQ{constructor(t,e=!1){this.source=t,this.isUserInput=e}}let kQ=(()=>{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-"+IQ++,this.onSelectionChange=new We,this._stateChanges=new Re}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)&&!Xo(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 RQ(this,e))}}return i.\u0275fac=function(e){xo()},i.\u0275dir=ve({type:i,viewQuery:function(e,n){if(1&e&&Wn(mQ,7),2&e){let r;St(r=Et())&&(n._text=r.first)}},inputs:{value:"value",id:"id",disabled:"disabled"},outputs:{onSelectionChange:"onSelectionChange"}}),i})(),Nm=(()=>{class i extends kQ{constructor(e,n,r,s){super(e,n,r,s)}}return i.\u0275fac=function(e){return new(e||i)(E(mt),E(Zn),E(JU,8),E(eV,8))},i.\u0275cmp=ot({type:i,selectors:[["mat-option"]],hostAttrs:["role","option",1,"mat-mdc-option","mdc-list-item"],hostVars:11,hostBindings:function(e,n){1&e&&Ue("click",function(){return n._selectViaInteraction()})("keydown",function(s){return n._handleKeydown(s)}),2&e&&(Yl("id",n.id),At("aria-selected",n.selected)("aria-disabled",n.disabled.toString()),un("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:[lt],ngContentSelectors:bQ,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&&(sr(yQ),fe(0,gQ,1,2,"mat-pseudo-checkbox",0),Wt(1),W(2,"span",1,2),Wt(4,1),Y(),fe(5,_Q,1,1,"mat-pseudo-checkbox",3),fe(6,vQ,2,1,"span",4),Te(7,"div",5)),2&e&&(U("ngIf",n.multiple),G(5),U("ngIf",!n.multiple&&n.selected&&!n.hideSingleSelectionIndicator),G(1),U("ngIf",n.group&&n.group._inert),G(1),U("matRippleTrigger",n._getHostElement())("matRippleDisabled",n.disabled||n.disableRipple))},dependencies:[Bh,vi,TQ],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})(),tR=(()=>{class i{}return i.\u0275fac=function(e){return new(e||i)},i.\u0275mod=nn({type:i}),i.\u0275inj=Kt({imports:[eb,Eo,Qn,QU]}),i})();class tV{}class FQ{}const qc="*";function Ra(i,t){return{type:7,name:i,definitions:t,options:{}}}function jr(i,t=null){return{type:4,styles:t,timings:i}}function iV(i,t=null){return{type:2,steps:i,options:t}}function si(i){return{type:6,styles:i,offset:null}}function Ps(i,t,e){return{type:0,name:i,styles:t,options:e}}function rV(i){return{type:5,steps:i}}function Pr(i,t,e=null){return{type:1,expr:i,animation:t,options:e}}function nR(i=null){return{type:9,options:i}}function iR(i,t,e=null){return{type:11,selector:i,animation:t,options:e}}function sV(i){Promise.resolve().then(i)}class tb{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(){sV(()=>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 oV{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?sV(()=>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 rR="!";function LQ(i,t){}class YM{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 sR="mdc-dialog--open",aV="mdc-dialog--opening",lV="mdc-dialog--closing";let UQ=(()=>{class i extends UU{constructor(e,n,r,s,o,a,l,c){super(e,n,r,s,o,a,l,c),this._animationStateChanged=new We}_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)(E(mt),E(jI),E(jt,8),E(YM),E(HM),E(ft),E(Zy),E(Yc))},i.\u0275cmp=ot({type:i,selectors:[["ng-component"]],features:[lt],decls:0,vars:0,template:function(e,n){},encapsulation:2}),i})();const cV="--mat-dialog-transition-duration";function dV(i){return null==i?null:"number"==typeof i?i:i.endsWith("ms")?ks(i.substring(0,i.length-2)):i.endsWith("s")?1e3*ks(i.substring(0,i.length-1)):"0"===i?0:null}let VQ=(()=>{class i extends UQ{constructor(e,n,r,s,o,a,l,c,d){super(e,n,r,s,o,a,l,d),this._animationMode=c,this._animationsEnabled="NoopAnimations"!==this._animationMode,this._hostElement=this._elementRef.nativeElement,this._openAnimationDuration=this._animationsEnabled?dV(this._config.enterAnimationDuration)??150:0,this._closeAnimationDuration=this._animationsEnabled?dV(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(cV,`${this._openAnimationDuration}ms`),this._requestAnimationFrame(()=>this._hostElement.classList.add(aV,sR)),this._waitForAnimationToComplete(this._openAnimationDuration,this._finishDialogOpen)):(this._hostElement.classList.add(sR),Promise.resolve().then(()=>this._finishDialogOpen()))}_startExitAnimation(){this._animationStateChanged.emit({state:"closing",totalTime:this._closeAnimationDuration}),this._hostElement.classList.remove(sR),this._animationsEnabled?(this._hostElement.style.setProperty(cV,`${this._openAnimationDuration}ms`),this._requestAnimationFrame(()=>this._hostElement.classList.add(lV)),this._waitForAnimationToComplete(this._closeAnimationDuration,this._finishDialogClose)):Promise.resolve().then(()=>this._finishDialogClose())}_clearAnimationClasses(){this._hostElement.classList.remove(aV,lV)}_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)(E(mt),E(jI),E(jt,8),E(YM),E(HM),E(ft),E(Zy),E(Rr,8),E(Yc))},i.\u0275cmp=ot({type:i,selectors:[["mat-dialog-container"]],hostAttrs:["tabindex","-1",1,"mat-mdc-dialog-container","mdc-dialog"],hostVars:8,hostBindings:function(e,n){2&e&&(Yl("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),un("_mat-animation-noopable",!n._animationsEnabled))},features:[lt],decls:3,vars:0,consts:[[1,"mdc-dialog__container"],[1,"mat-mdc-dialog-surface","mdc-dialog__surface"],["cdkPortalOutlet",""]],template:function(e,n){1&e&&(W(0,"div",0)(1,"div",1),fe(2,LQ,0,0,"ng-template",2),Y()())},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 nb{constructor(t,e,n){this._ref=t,this._containerInstance=n,this._afterOpened=new Re,this._beforeClosed=new Re,this._state=0,this.disableClose=e.disableClose,this.id=t.id,n._animationStateChanged.pipe(gn(r=>"opened"===r.state),Oi(1)).subscribe(()=>{this._afterOpened.next(),this._afterOpened.complete()}),n._animationStateChanged.pipe(gn(r=>"closed"===r.state),Oi(1)).subscribe(()=>{clearTimeout(this._closeFallbackTimeout),this._finishDialogClose()}),t.overlayRef.detachments().subscribe(()=>{this._beforeClosed.next(this._result),this._beforeClosed.complete(),this._finishDialogClose()}),Mr(this.backdropClick(),this.keydownEvents().pipe(gn(r=>27===r.keyCode&&!this.disableClose&&!Xo(r)))).subscribe(r=>{this.disableClose||(r.preventDefault(),uV(this,"keydown"===r.type?"keyboard":"mouse"))})}close(t){this._result=t,this._containerInstance._animationStateChanged.pipe(gn(e=>"closing"===e.state),Oi(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 uV(i,t,e){return i._closeInteractionType=t,i.close(e)}const oR=new me("MatMdcDialogData"),zQ=new me("mat-mdc-dialog-default-options"),hV=new me("mat-mdc-dialog-scroll-strategy"),GQ={provide:hV,deps:[as],useFactory:function HQ(i){return()=>i.scrollStrategies.block()}};let $Q=0,WQ=(()=>{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,d,h){this._overlay=e,this._defaultOptions=r,this._parentDialog=s,this._dialogRefConstructor=l,this._dialogContainerType=c,this._dialogDataToken=d,this._openDialogsAtThisLevel=[],this._afterAllClosedAtThisLevel=new Re,this._afterOpenedAtThisLevel=new Re,this._idPrefix="mat-dialog-",this.dialogConfigClass=YM,this.afterAllClosed=Ey(()=>this.openDialogs.length?this._getAfterAllClosed():this._getAfterAllClosed().pipe(Ao(void 0))),this._scrollStrategy=a,this._dialog=n.get(zU)}open(e,n){let r;(n={...this._defaultOptions||new YM,...n}).id=n.id||`${this._idPrefix}${$Q++}`,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:$M,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){xo()},i.\u0275prov=ke({token:i,factory:i.\u0275fac}),i})(),Bm=(()=>{class i extends WQ{constructor(e,n,r,s,o,a,l,c){super(e,n,s,a,l,o,nb,VQ,oR,c),this._idPrefix="mat-mdc-dialog-"}}return i.\u0275fac=function(e){return new(e||i)(ee(as),ee($i),ee(_y,8),ee(zQ,8),ee(hV),ee(i,12),ee(UM),ee(Rr,8))},i.\u0275prov=ke({token:i,factory:i.\u0275fac}),i})(),jQ=0,YQ=(()=>{class i{constructor(e,n,r){this.dialogRef=e,this._elementRef=n,this._dialog=r,this.type="button"}ngOnInit(){this.dialogRef||(this.dialogRef=gV(this._elementRef,this._dialog.openDialogs))}ngOnChanges(e){const n=e._matDialogClose||e._matDialogCloseResult;n&&(this.dialogResult=n.currentValue)}_onButtonClick(e){uV(this.dialogRef,0===e.screenX&&0===e.screenY?"keyboard":"mouse",this.dialogResult)}}return i.\u0275fac=function(e){return new(e||i)(E(nb,8),E(mt),E(Bm))},i.\u0275dir=ve({type:i,selectors:[["","mat-dialog-close",""],["","matDialogClose",""]],hostVars:2,hostBindings:function(e,n){1&e&&Ue("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:[bi]}),i})(),fV=(()=>{class i{constructor(e,n,r){this._dialogRef=e,this._elementRef=n,this._dialog=r,this.id="mat-mdc-dialog-title-"+jQ++}ngOnInit(){this._dialogRef||(this._dialogRef=gV(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)(E(nb,8),E(mt),E(Bm))},i.\u0275dir=ve({type:i,selectors:[["","mat-dialog-title",""],["","matDialogTitle",""]],hostAttrs:[1,"mat-mdc-dialog-title","mdc-dialog__title"],hostVars:1,hostBindings:function(e,n){2&e&&Yl("id",n.id)},inputs:{id:"id"},exportAs:["matDialogTitle"]}),i})(),pV=(()=>{class i{}return i.\u0275fac=function(e){return new(e||i)},i.\u0275dir=ve({type:i,selectors:[["","mat-dialog-content",""],["mat-dialog-content"],["","matDialogContent",""]],hostAttrs:[1,"mat-mdc-dialog-content","mdc-dialog__content"]}),i})(),mV=(()=>{class i{constructor(){this.align="start"}}return i.\u0275fac=function(e){return new(e||i)},i.\u0275dir=ve({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&&un("mat-mdc-dialog-actions-align-center","center"===n.align)("mat-mdc-dialog-actions-align-end","end"===n.align)},inputs:{align:"align"}}),i})();function gV(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 _V=(()=>{class i{}return i.\u0275fac=function(e){return new(e||i)},i.\u0275mod=nn({type:i}),i.\u0275inj=Kt({providers:[Bm,GQ],imports:[pQ,Pm,Lh,Qn,Qn]}),i})();const qQ=["mat-button",""],yV=[[["",8,"material-icons",3,"iconPositionEnd",""],["mat-icon",3,"iconPositionEnd",""],["","matButtonIcon","",3,"iconPositionEnd",""]],"*",[["","iconPositionEnd","",8,"material-icons"],["mat-icon","iconPositionEnd",""],["","matButtonIcon","","iconPositionEnd",""]]],bV=[".material-icons:not([iconPositionEnd]), mat-icon:not([iconPositionEnd]), [matButtonIcon]:not([iconPositionEnd])","*",".material-icons[iconPositionEnd], mat-icon[iconPositionEnd], [matButtonIcon][iconPositionEnd]"],KQ=["mat-mini-fab",""],QQ=["mat-icon-button",""],JQ=["*"],eJ=[{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"]}],tJ=Qy(WM(jM(class{constructor(i){this._elementRef=i}})));let aR=(()=>{class i extends tJ{constructor(e,n,r,s){super(e),this._platform=n,this._ngZone=r,this._animationMode=s,this._focusMonitor=Ot(Yc),this._isFab=!1;const o=e.nativeElement.classList;for(const a of eJ)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){xo()},i.\u0275dir=ve({type:i,viewQuery:function(e,n){if(1&e&&Wn(Bh,5),2&e){let r;St(r=Et())&&(n.ripple=r.first)}},features:[lt]}),i})(),qM=(()=>{class i extends aR{constructor(e,n,r,s){super(e,n,r,s)}}return i.\u0275fac=function(e){return new(e||i)(E(mt),E(zi),E(ft),E(Rr,8))},i.\u0275cmp=ot({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),un("_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:[lt],attrs:qQ,ngContentSelectors:bV,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&&(sr(yV),Te(0,"span",0),Wt(1),W(2,"span",1),Wt(3,1),Y(),Wt(4,2),Te(5,"span",2)(6,"span",3)(7,"span",4)),2&e&&(un("mdc-button__ripple",!n._isFab)("mdc-fab__ripple",n._isFab),G(6),U("matRippleDisabled",n._isRippleDisabled())("matRippleTrigger",n._elementRef.nativeElement))},dependencies:[Bh],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 iJ=new me("mat-mdc-fab-default-options",{providedIn:"root",factory:xV});function xV(){return{color:"accent"}}const wV=xV();let MV=(()=>{class i extends aR{constructor(e,n,r,s,o){super(e,n,r,s),this._options=o,this._isFab=!0,this._options=this._options||wV,this.color=this.defaultColor=this._options.color||wV.color}}return i.\u0275fac=function(e){return new(e||i)(E(mt),E(zi),E(ft),E(Rr,8),E(iJ,8))},i.\u0275cmp=ot({type:i,selectors:[["button","mat-mini-fab",""]],hostVars:7,hostBindings:function(e,n){2&e&&(At("disabled",n.disabled||null),un("_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:[lt],attrs:KQ,ngContentSelectors:bV,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&&(sr(yV),Te(0,"span",0),Wt(1),W(2,"span",1),Wt(3,1),Y(),Wt(4,2),Te(5,"span",2)(6,"span",3)(7,"span",4)),2&e&&(un("mdc-button__ripple",!n._isFab)("mdc-fab__ripple",n._isFab),G(6),U("matRippleDisabled",n._isRippleDisabled())("matRippleTrigger",n._elementRef.nativeElement))},dependencies:[Bh],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})(),XM=(()=>{class i extends aR{constructor(e,n,r,s){super(e,n,r,s)}}return i.\u0275fac=function(e){return new(e||i)(E(mt),E(zi),E(ft),E(Rr,8))},i.\u0275cmp=ot({type:i,selectors:[["button","mat-icon-button",""]],hostVars:7,hostBindings:function(e,n){2&e&&(At("disabled",n.disabled||null),un("_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:[lt],attrs:QQ,ngContentSelectors:JQ,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&&(sr(),Te(0,"span",0),Wt(1),Te(2,"span",1)(3,"span",2)(4,"span",3)),2&e&&(G(3),U("matRippleDisabled",n._isRippleDisabled())("matRippleCentered",!0)("matRippleTrigger",n._elementRef.nativeElement))},dependencies:[Bh],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})(),KM=(()=>{class i{}return i.\u0275fac=function(e){return new(e||i)},i.\u0275mod=nn({type:i}),i.\u0275inj=Kt({imports:[Qn,eb,Qn]}),i})();const rJ=["class","dialog"];let CV=(()=>{class i{constructor(e,n){this.dialogRef=e,this.data=n}}return i.\u0275fac=function(e){return new(e||i)(E(nb),E(oR))},i.\u0275cmp=ot({type:i,selectors:[["app-confirm",8,"dialog"]],attrs:rJ,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&&(W(0,"h1",0),ze(1,"Confirmation"),Y(),W(2,"div",1)(3,"p"),ze(4),Y()(),W(5,"div",2)(6,"button",3),Ue("click",function(){return n.dialogRef.close()}),ze(7,"Cancel"),Y(),W(8,"button",4),ze(9,"Yes"),Y()()),2&e&&(G(4),_i(n.data.text),G(4),U("mat-dialog-close",!0))},dependencies:[qM,YQ,fV,pV,mV]}),i})();function lR(i,t){const e="object"==typeof t;return new Promise((n,r)=>{const s=new da({next:o=>{n(o),s.unsubscribe()},error:r,complete:()=>{e?n(t.defaultValue):r(new fm)}});i.subscribe(s)})}let Ql=(()=>{class i{constructor(e){this.ngZone=e,this.openedResource$=new vt(null),this.openedResourcePath$=new vt(null),eel.expose(this.wrapHandler(this.openFile),"open_file"),eel.on_angular_ready(),setTimeout(tt(function*(){for(;;){if(eel._websocket){eel._websocket.onclose=()=>window.close();break}yield new Promise(n=>setTimeout(n,0))}}),0)}wrapHandler(e){return(...n)=>{try{ft.assertInAngularZone(),e.bind(this)(...n)}catch{this.ngZone.run(e,this,n)}}}openFile(e,n=!1){var r=this;return tt(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 tt(function*(){yield eel.open_file_with_system_app(e)()})()}retrieveValue(e){return tt(function*(){return yield eel.retrieve_value(e)()})()}runCustomAction(e,n,r){return tt(function*(){return eel.run_custom_action(e,n,r)()})()}saveFile(e){var n=this;return tt(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 tt(function*(){return eel.serialize_resource(e,n)()})()}serializeResourceTmp(e,n,r={}){return tt(function*(){return eel.serialize_resource_tmp(e,n,r)()})()}serializeReversible(e,n){return tt(function*(){return eel.serialize_reversible(e,n)()})()}deserializeResource(e){return tt(function*(){return eel.deserialize_resource(e)()})()}}return i.\u0275fac=function(e){return new(e||i)(ee(ft))},i.\u0275prov=ke({token:i,factory:i.\u0275fac,providedIn:"root"}),i})();var cR=ps(489);const SV=i=>!(!i||"object"!=typeof i),EV=(i={},t,e,n=[])=>{const r=[];if(SV(i)){const s=Object.entries(i);for(let o=0;o{class i{constructor(e){var n=this;this.eelDelegate=e,this._hasUnsavedChanges$=new vt(!1),this.resource$=new vt(null),this.error$=new vt(null),this.customActionRunning$=new vt(!1),this.changedDataBlocks={},this.dataBlockChange$=new Re,this.hideHiddenFields$=new vt(!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=EV(r.schema,"is_recursive_ref",!0);for(const[o,a]of s){const l=o.block_class_mro;let c=r.schema,d=c.block_class_mro===l?c:void 0;for(const h of a.slice(0,a.length-1))!d&&c[h]?.block_class_mro===l&&(d=c[h]),c=c[h];c[a[a.length-1]]=d}this.resource$.next(r),this.error$.next(null)}else this.resource$.next(null),this.error$.next(null)}),this.dataBlockChange$.subscribe(function(){var r=tt(function*([s,o]){n.changedDataBlocks[s]=o,n.updateUnsavedChanges();const a=yield n.eelDelegate.retrieveValue(s);n.changedDataBlocks[s]==o&&((0,cR.isNumber)(o)?Math.abs(o-a)<1e-10:(0,cR.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 tt(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 tt(function*(){return s.processExternalChanges(e,()=>s.eelDelegate.runCustomAction(e,n,r))})()}deserializeResource(e){var n=this;return tt(function*(){return n.processExternalChanges(e,()=>n.eelDelegate.deserializeResource(e))})()}reloadResource(){var e=this;return tt(function*(){const n=e.eelDelegate.openedResourcePath$.getValue();n&&e.eelDelegate.openFile(n,!0).then()})()}saveResource(){var e=this;return tt(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)(ee(Ql))},i.\u0275prov=ke({token:i,factory:i.\u0275fac,providedIn:"root"}),i})();function sJ(i,t){if(1&i){const e=mi();W(0,"div",2)(1,"button",3),Ue("click",function(){return cn(e),Gt(he().action())}),ze(2),Y()()}if(2&i){const e=he();G(2),Zi(" ",e.data.action," ")}}const oJ=["label"];function aJ(i,t){}const lJ=Math.pow(2,31)-1;class dR{constructor(t,e){this._overlayRef=e,this._afterDismissed=new Re,this._afterOpened=new Re,this._onAction=new Re,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,lJ))}_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 AV=new me("MatSnackBarData");class ZM{constructor(){this.politeness="assertive",this.announcementMessage="",this.duration=0,this.data=null,this.horizontalPosition="center",this.verticalPosition="bottom"}}let cJ=(()=>{class i{}return i.\u0275fac=function(e){return new(e||i)},i.\u0275dir=ve({type:i,selectors:[["","matSnackBarLabel",""]],hostAttrs:[1,"mat-mdc-snack-bar-label","mdc-snackbar__label"]}),i})(),dJ=(()=>{class i{}return i.\u0275fac=function(e){return new(e||i)},i.\u0275dir=ve({type:i,selectors:[["","matSnackBarActions",""]],hostAttrs:[1,"mat-mdc-snack-bar-actions","mdc-snackbar__actions"]}),i})(),uJ=(()=>{class i{}return i.\u0275fac=function(e){return new(e||i)},i.\u0275dir=ve({type:i,selectors:[["","matSnackBarAction",""]],hostAttrs:[1,"mat-mdc-snack-bar-action","mdc-snackbar__action"]}),i})(),hJ=(()=>{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)(E(dR),E(AV))},i.\u0275cmp=ot({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&&(W(0,"div",0),ze(1),Y(),fe(2,sJ,3,1,"div",1)),2&e&&(G(1),Zi(" ",n.data.message,"\n"),G(1),U("ngIf",n.hasAction))},dependencies:[vi,qM,cJ,dJ,uJ],styles:[".mat-mdc-simple-snack-bar{display:flex}"],encapsulation:2,changeDetection:0}),i})();const fJ={snackBarState:Ra("state",[Ps("void, hidden",si({transform:"scale(0.8)",opacity:0})),Ps("visible",si({transform:"scale(1)",opacity:1})),Pr("* => visible",jr("150ms cubic-bezier(0, 0, 0.2, 1)")),Pr("* => void, * => hidden",jr("75ms cubic-bezier(0.4, 0.0, 1, 1)",si({opacity:0})))])};let pJ=0,mJ=(()=>{class i extends LM{constructor(e,n,r,s,o){super(),this._ngZone=e,this._elementRef=n,this._changeDetectorRef=r,this._platform=s,this.snackBarConfig=o,this._document=Ot(jt),this._trackedModals=new Set,this._announceDelay=150,this._destroyed=!1,this._onAnnounce=new Re,this._onExit=new Re,this._onEnter=new Re,this._animationState="void",this._liveElementId="mat-snack-bar-container-live-"+pJ++,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(Oi(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)(E(ft),E(mt),E(Zn),E(zi),E(ZM))},i.\u0275dir=ve({type:i,viewQuery:function(e,n){if(1&e&&Wn(Am,7),2&e){let r;St(r=Et())&&(n._portalOutlet=r.first)}},features:[lt]}),i})(),gJ=(()=>{class i extends mJ{_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=ri(i)))(n||i)}}(),i.\u0275cmp=ot({type:i,selectors:[["mat-snack-bar-container"]],viewQuery:function(e,n){if(1&e&&Wn(oJ,7),2&e){let r;St(r=Et())&&(n._label=r.first)}},hostAttrs:[1,"mdc-snackbar","mat-mdc-snack-bar-container","mdc-snackbar--open"],hostVars:1,hostBindings:function(e,n){1&e&&N1("@state.done",function(s){return n.onAnimationEnd(s)}),2&e&&Tw("@state",n._animationState)},features:[lt],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&&(W(0,"div",0)(1,"div",1,2)(3,"div",3),fe(4,aJ,0,0,"ng-template",4),Y(),Te(5,"div"),Y()()),2&e&&(G(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:[fJ.snackBarState]}}),i})(),DV=(()=>{class i{}return i.\u0275fac=function(e){return new(e||i)},i.\u0275mod=nn({type:i}),i.\u0275inj=Kt({imports:[Pm,Lh,Eo,KM,Qn,Qn]}),i})();const TV=new me("mat-snack-bar-default-options",{providedIn:"root",factory:function _J(){return new ZM}});let vJ=(()=>{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=$i.create({parent:n&&n.viewContainerRef&&n.viewContainerRef.injector||this._injector,providers:[{provide:ZM,useValue:n}]}),o=new Fh(this.snackBarContainerComponent,n.viewContainerRef,s),a=e.attach(o);return a.instance.snackBarConfig=n,a.instance}_attach(e,n){const r={...new ZM,...this._defaultConfig,...n},s=this._createOverlay(r),o=this._attachSnackBarContainer(s,r),a=new dR(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 Fh(e,void 0,l),d=o.attachComponentPortal(c);a.instance=d.instance}return this._breakpointObserver.observe("(max-width: 599.98px) and (orientation: portrait)").pipe(He(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 $i.create({parent:e&&e.viewContainerRef&&e.viewContainerRef.injector||this._injector,providers:[{provide:dR,useValue:n},{provide:AV,useValue:e.data}]})}}return i.\u0275fac=function(e){return new(e||i)(ee(as),ee(XI),ee($i),ee(GI),ee(i,12),ee(TV))},i.\u0275prov=ke({token:i,factory:i.\u0275fac}),i})(),IV=(()=>{class i extends vJ{constructor(e,n,r,s,o,a){super(e,n,r,s,o,a),this.simpleSnackBarComponent=hJ,this.snackBarContainerComponent=gJ,this.handsetCssClass="mat-mdc-snack-bar-handset"}}return i.\u0275fac=function(e){return new(e||i)(ee(as),ee(XI),ee($i),ee(GI),ee(i,12),ee(TV))},i.\u0275prov=ke({token:i,factory:i.\u0275fac,providedIn:DV}),i})();const yJ=["*",[["mat-toolbar-row"]]],bJ=["*","mat-toolbar-row"],xJ=Qy(class{constructor(i){this._elementRef=i}});let wJ=(()=>{class i{}return i.\u0275fac=function(e){return new(e||i)},i.\u0275dir=ve({type:i,selectors:[["mat-toolbar-row"]],hostAttrs:[1,"mat-toolbar-row"],exportAs:["matToolbarRow"]}),i})(),MJ=(()=>{class i extends xJ{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)(E(mt),E(zi),E(jt))},i.\u0275cmp=ot({type:i,selectors:[["mat-toolbar"]],contentQueries:function(e,n,r){if(1&e&&Wi(r,wJ,5),2&e){let s;St(s=Et())&&(n._toolbarRows=s)}},hostAttrs:[1,"mat-toolbar"],hostVars:4,hostBindings:function(e,n){2&e&&un("mat-toolbar-multiple-rows",n._toolbarRows.length>0)("mat-toolbar-single-row",0===n._toolbarRows.length)},inputs:{color:"color"},exportAs:["matToolbar"],features:[lt],ngContentSelectors:bJ,decls:2,vars:0,template:function(e,n){1&e&&(sr(yJ),Wt(0),Wt(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})(),CJ=(()=>{class i{}return i.\u0275fac=function(e){return new(e||i)},i.\u0275mod=nn({type:i}),i.\u0275inj=Kt({imports:[Qn,Qn]}),i})(),SJ=(()=>{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=ot({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"),un("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})(),RV=(()=>{class i{}return i.\u0275fac=function(e){return new(e||i)},i.\u0275mod=nn({type:i}),i.\u0275inj=Kt({imports:[Qn,Qn]}),i})();const EJ=["tooltip"],kV=new me("mat-tooltip-scroll-strategy"),TJ={provide:kV,deps:[as],useFactory:function DJ(i){return()=>i.scrollStrategies.reposition({scrollThrottle:20})}},RJ=new me("mat-tooltip-default-options",{providedIn:"root",factory:function IJ(){return{showDelay:0,hideDelay:0,touchendHideDelay:1500}}}),PV="tooltip-panel",OV=Ph({passive:!0});let NJ=(()=>{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=ks(e)}get hideDelay(){return this._hideDelay}set hideDelay(e){this._hideDelay=ks(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,d,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 Re,this._scrollStrategy=d,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(He(this._destroyed)).subscribe(()=>{this._overlayRef&&this._updatePosition(this._overlayRef)})}ngAfterViewInit(){this._viewInitialized=!0,this._setupPointerEnterEventsIfNeeded(),this._focusMonitor.monitor(this._elementRef).pipe(He(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,OV)}),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 Fh(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(He(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 mt)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(He(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}-${PV}`,scrollStrategy:this._scrollStrategy()}),this._updatePosition(this._overlayRef),this._overlayRef.detachments().pipe(He(this._destroyed)).subscribe(()=>this._detach()),this._overlayRef.outsidePointerEvents().pipe(He(this._destroyed)).subscribe(()=>this._tooltipInstance?._handleBodyInteraction()),this._overlayRef.keydownEvents().pipe(He(this._destroyed)).subscribe(s=>{this._isTooltipVisible()&&27===s.keyCode&&!Xo(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(Oi(1),He(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}-${PV}-`;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,OV)})}_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){xo()},i.\u0275dir=ve({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})(),Os=(()=>{class i extends NJ{constructor(e,n,r,s,o,a,l,c,d,h,p,m){super(e,n,r,s,o,a,l,c,d,h,p,m),this._tooltipComponent=UJ,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)(E(as),E(mt),E(qy),E(Wr),E(ft),E(zi),E(zZ),E(Yc),E(kV),E(Ia,8),E(RJ,8),E(jt))},i.\u0275dir=ve({type:i,selectors:[["","matTooltip",""]],hostAttrs:[1,"mat-mdc-tooltip-trigger"],exportAs:["matTooltip"],features:[lt]}),i})(),BJ=(()=>{class i{constructor(e,n){this._changeDetectorRef=e,this._closeOnInteraction=!1,this._isVisible=!1,this._onHide=new Re,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)(E(Zn),E(Rr,8))},i.\u0275dir=ve({type:i}),i})(),UJ=(()=>{class i extends BJ{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)(E(Zn),E(mt),E(Rr,8))},i.\u0275cmp=ot({type:i,selectors:[["mat-tooltip-component"]],viewQuery:function(e,n){if(1&e&&Wn(EJ,7),2&e){let r;St(r=Et())&&(n._tooltip=r.first)}},hostAttrs:["aria-hidden","true"],hostVars:2,hostBindings:function(e,n){1&e&&Ue("mouseleave",function(s){return n._handleMouseLeave(s)}),2&e&&jo("zoom",n.isVisible()?1:null)},features:[lt],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&&(W(0,"div",0,1),Ue("animationend",function(s){return n._handleAnimationEnd(s)}),W(2,"div",2),ze(3),Y()()),2&e&&(un("mdc-tooltip--multiline",n._isMultiline),U("ngClass",n.tooltipClass),G(3),_i(n.message))},dependencies:[hm],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})(),FV=(()=>{class i{}return i.\u0275fac=function(e){return new(e||i)},i.\u0275mod=nn({type:i}),i.\u0275inj=Kt({providers:[TJ],imports:[BU,Eo,Pm,Qn,Qn,Xy]}),i})();function LV(...i){const t=x0(i),{args:e,keys:n}=VB(i),r=new In(s=>{const{length:o}=e;if(!o)return void s.complete();const a=new Array(o);let l=o,c=o;for(let d=0;d{h||(h=!0,c--),a[d]=p},()=>l--,void 0,()=>{(!l||!h)&&(c||s.next(n?zB(n,a):a),s.complete())}))}});return t?r.pipe(JT(t)):r}class uR{}class uu{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 uu?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 uu;return e.lazyInit=this.lazyInit&&this.lazyInit instanceof uu?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 VJ{encodeKey(t){return BV(t)}encodeValue(t){return BV(t)}decodeKey(t){return decodeURIComponent(t)}decodeValue(t){return decodeURIComponent(t)}}const HJ=/%(\d[a-f0-9])/gi,GJ={40:"@","3A":":",24:"$","2C":",","3B":";","3D":"=","3F":"?","2F":"/"};function BV(i){return encodeURIComponent(i).replace(HJ,(t,e)=>GJ[e]??t)}function QM(i){return`${i}`}class hu{constructor(t={}){if(this.updates=null,this.cloneFrom=null,this.encoder=t.encoder||new VJ,t.fromString){if(t.fromObject)throw new Error("Cannot specify both fromString and fromObject.");this.map=function zJ(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 hu({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 $J{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 UV(i){return typeof ArrayBuffer<"u"&&i instanceof ArrayBuffer}function VV(i){return typeof Blob<"u"&&i instanceof Blob}function zV(i){return typeof FormData<"u"&&i instanceof FormData}class ib{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 WJ(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 uu),this.context||(this.context=new $J),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 ib(e,n,s,{params:c,headers:l,context:d,reportProgress:a,responseType:r,withCredentials:o})}}var ls=(()=>((ls=ls||{})[ls.Sent=0]="Sent",ls[ls.UploadProgress=1]="UploadProgress",ls[ls.ResponseHeader=2]="ResponseHeader",ls[ls.DownloadProgress=3]="DownloadProgress",ls[ls.Response=4]="Response",ls[ls.User=5]="User",ls))();class YJ{constructor(t,e=200,n="OK"){this.headers=t.headers||new uu,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 hR extends YJ{constructor(t={}){super(t),this.type=ls.Response,this.body=void 0!==t.body?t.body:null}clone(t={}){return new hR({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 fR(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 pR=(()=>{class i{constructor(e){this.handler=e}request(e,n,r={}){let s;if(e instanceof ib)s=e;else{let l,c;l=r.headers instanceof uu?r.headers:new uu(r.headers),r.params&&(c=r.params instanceof hu?r.params:new hu({fromObject:r.params})),s=new ib(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=ht(s).pipe(ru(l=>this.handler.handle(l)));if(e instanceof ib||"events"===r.observe)return o;const a=o.pipe(gn(l=>l instanceof hR));switch(r.observe||"body"){case"body":switch(s.responseType){case"arraybuffer":return a.pipe(et(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(et(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(et(l=>{if(null!==l.body&&"string"!=typeof l.body)throw new Error("Response is not a string.");return l.body}));default:return a.pipe(et(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 hu).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,fR(r,n))}post(e,n,r={}){return this.request("POST",e,fR(r,n))}put(e,n,r={}){return this.request("PUT",e,fR(r,n))}}return i.\u0275fac=function(e){return new(e||i)(ee(uR))},i.\u0275prov=ke({token:i,factory:i.\u0275fac}),i})();const oee=["*"];let eC;function rb(i){return function aee(){if(void 0===eC&&(eC=null,typeof window<"u")){const i=window;void 0!==i.trustedTypes&&(eC=i.trustedTypes.createPolicy("angular#components",{createHTML:t=>t}))}return eC}()?.createHTML(i)||i}function XV(i){return Error(`Unable to find icon with the name "${i}"`)}function KV(i){return Error(`The URL provided to MatIconRegistry was not trusted as a resource URL via Angular's DomSanitizer. Attempted URL was "${i}".`)}function ZV(i){return Error(`The literal provided to MatIconRegistry was not trusted as safe HTML by Angular's DomSanitizer. Attempted literal was "${i}".`)}class Uh{constructor(t,e,n){this.url=t,this.svgText=e,this.options=n}}let tC=(()=>{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 Uh(r,null,s))}addSvgIconResolver(e){return this._resolvers.push(e),this}addSvgIconLiteralInNamespace(e,n,r,s){const o=this._sanitizer.sanitize(Kn.HTML,r);if(!o)throw ZV(r);const a=rb(o);return this._addSvgIconConfig(e,n,new Uh("",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 Uh(n,null,r))}addSvgIconSetLiteralInNamespace(e,n,r){const s=this._sanitizer.sanitize(Kn.HTML,n);if(!s)throw ZV(n);const o=rb(s);return this._addSvgIconSetConfig(e,new Uh("",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(Kn.RESOURCE_URL,e);if(!n)throw KV(e);const r=this._cachedIconsByUrl.get(n);return r?ht(nC(r)):this._loadSvgIconFromConfig(new Uh(e,null)).pipe(Vi(s=>this._cachedIconsByUrl.set(n,s)),et(s=>nC(s)))}getNamedSvgIcon(e,n=""){const r=QV(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(XV(r))}ngOnDestroy(){this._resolvers=[],this._svgIconConfigs.clear(),this._iconSetConfigs.clear(),this._cachedIconsByUrl.clear()}_getSvgFromConfig(e){return e.svgText?ht(nC(this._svgElementFromConfig(e))):this._loadSvgIconFromConfig(e).pipe(et(n=>nC(n)))}_getSvgFromIconSetConfigs(e,n){const r=this._extractIconWithNameFromAnySet(e,n);return r?ht(r):LV(n.filter(o=>!o.svgText).map(o=>this._loadSvgIconSetFromConfig(o).pipe($c(a=>{const c=`Loading icon set URL: ${this._sanitizer.sanitize(Kn.RESOURCE_URL,o.url)} failed: ${a.message}`;return this._errorHandler.handleError(new Error(c)),ht(null)})))).pipe(et(()=>{const o=this._extractIconWithNameFromAnySet(e,n);if(!o)throw XV(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(Vi(n=>e.svgText=n),et(()=>this._svgElementFromConfig(e)))}_loadSvgIconSetFromConfig(e){return e.svgText?ht(null):this._fetchIcon(e).pipe(Vi(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(rb(""));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(rb("")),r=e.attributes;for(let s=0;srb(c)),su(()=>this._inProgressUrlFetches.delete(o)),Uf());return this._inProgressUrlFetches.set(o,l),l}_addSvgIconConfig(e,n,r){return this._svgIconConfigs.set(QV(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:""}}}),JV=["clip-path","color-profile","src","cursor","fill","filter","marker","marker-start","marker-mid","marker-end","mask","stroke"],mee=JV.map(i=>`[${i}]`).join(", "),gee=/^url\(['"]?#(.*?)['"]?\)$/;let gR=(()=>{class i extends uee{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=Zt.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(mee),r=this._elementsWithExternalReferences=this._elementsWithExternalReferences||new Map;for(let s=0;s{const a=n[s],l=a.getAttribute(o),c=l?l.match(gee):null;if(c){let d=r.get(a);d||(d=[],r.set(a,d)),d.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(Oi(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)(E(mt),E(tC),ya("aria-hidden"),E(fee),E(al),E(hee,8))},i.\u0275cmp=ot({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),un("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:[lt],ngContentSelectors:oee,decls:1,vars:0,template:function(e,n){1&e&&(sr(),Wt(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})(),ez=(()=>{class i{}return i.\u0275fac=function(e){return new(e||i)},i.\u0275mod=nn({type:i}),i.\u0275inj=Kt({imports:[Qn,Qn]}),i})(),tz=(()=>{class i{constructor(e){this.viewContainerRef=e}}return i.\u0275fac=function(e){return new(e||i)(E(Wr))},i.\u0275dir=ve({type:i,selectors:[["","dataBlockUI",""]]}),i})(),_ee=(()=>{class i{constructor(){this.resource=null,this.name="",this.resourceDescription="",this.changed=new We}}return i.\u0275fac=function(e){return new(e||i)},i.\u0275cmp=ot({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&&(W(0,"p",0),ze(1),Y()),2&e&&(U("matTooltip",n.resourceDescription),G(1),tm("",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:[Os],changeDetection:0}),i})();function vee(i,t){if(1&i&&(W(0,"h2",4),ze(1),Y()),2&i){const e=he();U("matTooltip",e.resourceDescription),G(1),_i(e.name)}}function yee(i,t){1&i&&Te(0,"app-block-actions",5),2&i&&U("resource",he().resource)}const bee=function(i,t,e,n){return{id:i,name:t,data:e,schema:n}};function xee(i,t){if(1&i&&Te(0,"app-editor",7),2&i){const e=he().$implicit,n=he();U("resource",L2(3,bee,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 wee(i,t){if(1&i&&(Gr(0),fe(1,xee,1,8,"app-editor",6),Dt(2,"async"),$r()),2&i){const e=t.$implicit,n=he();G(1),U("ngIf",!(Lt(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 Jl=(()=>{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 We,this.destroyed$=new Re}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(He(this.destroyed$),gn(([n,r])=>!!this.resource&&n.startsWith(this.resource.id)&&!n.substring(this.resource.id.length+1).includes("/"))).subscribe(function(){var n=tt(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)(E(ka))},i.\u0275cmp=ot({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&&(fe(0,vee,2,2,"h2",0),Dt(1,"async"),fe(2,yee,1,1,"app-block-actions",1),W(3,"div",2),fe(4,wee,3,3,"ng-container",3),Y()),2&e){let r;U("ngIf",n.name&&n.name!=(null==(r=Lt(1,4,n.main.resource$))?null:r.name)),G(2),U("ngIf",!n.hideBlockActions),G(2),U("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})(),nz=(()=>{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)(E(ol),E(mt))},i.\u0275dir=ve({type:i}),i})(),Vh=(()=>{class i extends nz{}return i.\u0275fac=function(){let t;return function(n){return(t||(t=ri(i)))(n||i)}}(),i.\u0275dir=ve({type:i,features:[lt]}),i})();const Do=new me("NgValueAccessor"),Cee={provide:Do,useExisting:Gn(()=>gl),multi:!0},Eee=new me("CompositionEventMode");let gl=(()=>{class i extends nz{constructor(e,n,r){super(e,n),this._compositionMode=r,this._composing=!1,null==this._compositionMode&&(this._compositionMode=!function See(){const i=zc()?zc().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)(E(ol),E(mt),E(Eee,8))},i.\u0275dir=ve({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&&Ue("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:[Dn([Cee]),lt]}),i})();const Aee=!1;function fu(i){return null==i||("string"==typeof i||Array.isArray(i))&&0===i.length}function rz(i){return null!=i&&"number"==typeof i.length}const Yr=new me("NgValidators"),pu=new me("NgAsyncValidators"),Dee=/^(?=.{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 _l{static min(t){return sz(t)}static max(t){return oz(t)}static required(t){return function az(i){return fu(i.value)?{required:!0}:null}(t)}static requiredTrue(t){return function lz(i){return!0===i.value?null:{required:!0}}(t)}static email(t){return function cz(i){return fu(i.value)||Dee.test(i.value)?null:{email:!0}}(t)}static minLength(t){return dz(t)}static maxLength(t){return uz(t)}static pattern(t){return function hz(i){if(!i)return iC;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(fu(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 vz(t)}static composeAsync(t){return yz(t)}}function sz(i){return t=>{if(fu(t.value)||fu(i))return null;const e=parseFloat(t.value);return!isNaN(e)&&e{if(fu(t.value)||fu(i))return null;const e=parseFloat(t.value);return!isNaN(e)&&e>i?{max:{max:i,actual:t.value}}:null}}function dz(i){return t=>fu(t.value)||!rz(t.value)?null:t.value.lengthrz(t.value)&&t.value.length>i?{maxlength:{requiredLength:i,actualLength:t.value.length}}:null}function iC(i){return null}function fz(i){return null!=i}function pz(i){const t=oy(i)?Ni(i):i;if(Aee&&!L1(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 pe(-1101,e)}return t}function mz(i){let t={};return i.forEach(e=>{t=null!=e?{...t,...e}:t}),0===Object.keys(t).length?null:t}function gz(i,t){return t.map(e=>e(i))}function _z(i){return i.map(t=>function Tee(i){return!i.validate}(t)?t:e=>t.validate(e))}function vz(i){if(!i)return null;const t=i.filter(fz);return 0==t.length?null:function(e){return mz(gz(e,t))}}function _R(i){return null!=i?vz(_z(i)):null}function yz(i){if(!i)return null;const t=i.filter(fz);return 0==t.length?null:function(e){return LV(gz(e,t).map(pz)).pipe(et(mz))}}function vR(i){return null!=i?yz(_z(i)):null}function bz(i,t){return null===i?[t]:Array.isArray(i)?[...i,t]:[i,t]}function xz(i){return i._rawValidators}function wz(i){return i._rawAsyncValidators}function yR(i){return i?Array.isArray(i)?i:[i]:[]}function rC(i,t){return Array.isArray(i)?i.includes(t):i===t}function Mz(i,t){const e=yR(t);return yR(i).forEach(r=>{rC(e,r)||e.push(r)}),e}function Cz(i,t){return yR(t).filter(e=>!rC(i,e))}class Sz{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=_R(this._rawValidators)}_setAsyncValidators(t){this._rawAsyncValidators=t||[],this._composedAsyncValidatorFn=vR(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 ao extends Sz{get formDirective(){return null}get path(){return null}}class ec extends Sz{constructor(){super(...arguments),this._parent=null,this.name=null,this.valueAccessor=null}}class Ez{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 tc=(()=>{class i extends Ez{constructor(e){super(e)}}return i.\u0275fac=function(e){return new(e||i)(E(ec,2))},i.\u0275dir=ve({type:i,selectors:[["","formControlName",""],["","ngModel",""],["","formControl",""]],hostVars:14,hostBindings:function(e,n){2&e&&un("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:[lt]}),i})(),bR=(()=>{class i extends Ez{constructor(e){super(e)}}return i.\u0275fac=function(e){return new(e||i)(E(ao,10))},i.\u0275dir=ve({type:i,selectors:[["","formGroupName",""],["","formArrayName",""],["","ngModelGroup",""],["","formGroup",""],["form",3,"ngNoForm",""],["","ngForm",""]],hostVars:16,hostBindings:function(e,n){2&e&&un("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:[lt]}),i})();function Az(i,t){return i?`with name: '${t}'`:`at index: ${t}`}const MR=!1,sb="VALID",oC="INVALID",zm="PENDING",ob="DISABLED";function CR(i){return(aC(i)?i.validators:i)||null}function SR(i,t){return(aC(t)?t.asyncValidators:i)||null}function aC(i){return null!=i&&!Array.isArray(i)&&"object"==typeof i}function Dz(i,t,e){const n=i.controls;if(!(t?Object.keys(n):n).length)throw new pe(1e3,MR?function Pee(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 pe(1001,MR?function Oee(i,t){return`Cannot find form control ${Az(i,t)}`}(t,e):"")}function Tz(i,t,e){i._forEachChild((n,r)=>{if(void 0===e[r])throw new pe(1002,MR?function Fee(i,t){return`Must supply a value for form control ${Az(i,t)}`}(t,r):"")})}class lC{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===sb}get invalid(){return this.status===oC}get pending(){return this.status==zm}get disabled(){return this.status===ob}get enabled(){return this.status!==ob}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(Mz(t,this._rawValidators))}addAsyncValidators(t){this.setAsyncValidators(Mz(t,this._rawAsyncValidators))}removeValidators(t){this.setValidators(Cz(t,this._rawValidators))}removeAsyncValidators(t){this.setAsyncValidators(Cz(t,this._rawAsyncValidators))}hasValidator(t){return rC(this._rawValidators,t)}hasAsyncValidator(t){return rC(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=ob,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=sb,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===sb||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()?ob:sb}_runValidator(){return this.validator?this.validator(this):null}_runAsyncValidator(t){if(this.asyncValidator){this.status=zm,this._hasOwnPendingAsyncValidator=!0;const e=pz(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 We,this.statusChanges=new We}_calculateStatus(){return this._allControlsDisabled()?ob:this.errors?oC:this._hasOwnPendingAsyncValidator||this._anyControlsHaveStatus(zm)?zm:this._anyControlsHaveStatus(oC)?oC:sb}_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){aC(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 Lee(i){return Array.isArray(i)?_R(i):i||null}(this._rawValidators)}_assignAsyncValidators(t){this._rawAsyncValidators=Array.isArray(t)?t.slice():t,this._composedAsyncValidatorFn=function Nee(i){return Array.isArray(i)?vR(i):i||null}(this._rawAsyncValidators)}}class Hm extends lC{constructor(t,e,n){super(CR(e),SR(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={}){Tz(this,!0,t),Object.keys(t).forEach(n=>{Dz(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 Iz extends Hm{}const zh=new me("CallSetDisabledState",{providedIn:"root",factory:()=>ab}),ab="always";function cC(i,t){return[...t.path,i]}function lb(i,t,e=ab){ER(i,t),t.valueAccessor.writeValue(i.value),(i.disabled||"always"===e)&&t.valueAccessor.setDisabledState?.(i.disabled),function Uee(i,t){t.valueAccessor.registerOnChange(e=>{i._pendingValue=e,i._pendingChange=!0,i._pendingDirty=!0,"change"===i.updateOn&&Rz(i,t)})}(i,t),function zee(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 Vee(i,t){t.valueAccessor.registerOnTouched(()=>{i._pendingTouched=!0,"blur"===i.updateOn&&i._pendingChange&&Rz(i,t),"submit"!==i.updateOn&&i.markAsTouched()})}(i,t),function Bee(i,t){if(t.valueAccessor.setDisabledState){const e=n=>{t.valueAccessor.setDisabledState(n)};i.registerOnDisabledChange(e),t._registerOnDestroy(()=>{i._unregisterOnDisabledChange(e)})}}(i,t)}function dC(i,t,e=!0){const n=()=>{};t.valueAccessor&&(t.valueAccessor.registerOnChange(n),t.valueAccessor.registerOnTouched(n)),hC(i,t),i&&(t._invokeOnDestroyCallbacks(),i._registerOnCollectionChange(()=>{}))}function uC(i,t){i.forEach(e=>{e.registerOnValidatorChange&&e.registerOnValidatorChange(t)})}function ER(i,t){const e=xz(i);null!==t.validator?i.setValidators(bz(e,t.validator)):"function"==typeof e&&i.setValidators([e]);const n=wz(i);null!==t.asyncValidator?i.setAsyncValidators(bz(n,t.asyncValidator)):"function"==typeof n&&i.setAsyncValidators([n]);const r=()=>i.updateValueAndValidity();uC(t._rawValidators,r),uC(t._rawAsyncValidators,r)}function hC(i,t){let e=!1;if(null!==i){if(null!==t.validator){const r=xz(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=wz(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 uC(t._rawValidators,n),uC(t._rawAsyncValidators,n),e}function Rz(i,t){i._pendingDirty&&i.markAsDirty(),i.setValue(i._pendingValue,{emitModelToViewChange:!1}),t.viewToModelUpdate(i._pendingValue),i._pendingChange=!1}function kz(i,t){ER(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 Pz(i,t){i._syncPendingControls(),t.forEach(e=>{const n=e.control;"submit"===n.updateOn&&n._pendingChange&&(e.viewToModelUpdate(n._pendingValue),n._pendingChange=!1)})}function TR(i,t){if(!t)return null;let e,n,r;return Array.isArray(t),t.forEach(s=>{s.constructor===gl?e=s:function $ee(i){return Object.getPrototypeOf(i.constructor)===Vh}(s)?n=s:r=s}),r||n||e||null}const jee={provide:ao,useExisting:Gn(()=>db)},cb=(()=>Promise.resolve())();let db=(()=>{class i extends ao{constructor(e,n,r){super(),this.callSetDisabledState=r,this.submitted=!1,this._directives=new Set,this.ngSubmit=new We,this.form=new Hm({},_R(e),vR(n))}ngAfterViewInit(){this._setUpdateStrategy()}get formDirective(){return this}get control(){return this.form}get path(){return[]}get controls(){return this.form.controls}addControl(e){cb.then(()=>{const n=this._findContainer(e.path);e.control=n.registerControl(e.name,e.control),lb(e.control,e,this.callSetDisabledState),e.control.updateValueAndValidity({emitEvent:!1}),this._directives.add(e)})}getControl(e){return this.form.get(e.path)}removeControl(e){cb.then(()=>{const n=this._findContainer(e.path);n&&n.removeControl(e.name),this._directives.delete(e)})}addFormGroup(e){cb.then(()=>{const n=this._findContainer(e.path),r=new Hm({});kz(r,e),n.registerControl(e.name,r),r.updateValueAndValidity({emitEvent:!1})})}removeFormGroup(e){cb.then(()=>{const n=this._findContainer(e.path);n&&n.removeControl(e.name)})}getFormGroup(e){return this.form.get(e.path)}updateModel(e,n){cb.then(()=>{this.form.get(e.path).setValue(n)})}setValue(e){this.control.setValue(e)}onSubmit(e){return this.submitted=!0,Pz(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)(E(Yr,10),E(pu,10),E(zh,8))},i.\u0275dir=ve({type:i,selectors:[["form",3,"ngNoForm","",3,"formGroup",""],["ng-form"],["","ngForm",""]],hostBindings:function(e,n){1&e&&Ue("submit",function(s){return n.onSubmit(s)})("reset",function(){return n.onReset()})},inputs:{options:["ngFormOptions","options"]},outputs:{ngSubmit:"ngSubmit"},exportAs:["ngForm"],features:[Dn([jee]),lt]}),i})();function Oz(i,t){const e=i.indexOf(t);e>-1&&i.splice(e,1)}function Fz(i){return"object"==typeof i&&null!==i&&2===Object.keys(i).length&&"value"in i&&"disabled"in i}const nc=class extends lC{constructor(t=null,e,n){super(CR(e),SR(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}),aC(e)&&(e.nonNullable||e.initialValueIsDefault)&&(this.defaultValue=Fz(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){Oz(this._onChange,t)}registerOnDisabledChange(t){this._onDisabledChange.push(t)}_unregisterOnDisabledChange(t){Oz(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){Fz(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}},Xee={provide:ec,useExisting:Gn(()=>Xc)},Bz=(()=>Promise.resolve())();let Xc=(()=>{class i extends ec{constructor(e,n,r,s,o,a){super(),this._changeDetectorRef=o,this.callSetDisabledState=a,this.control=new nc,this._registered=!1,this.update=new We,this._parent=e,this._setValidators(n),this._setAsyncValidators(r),this.valueAccessor=TR(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(){lb(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){Bz.then(()=>{this.control.setValue(e,{emitViewToModelChange:!1}),this._changeDetectorRef?.markForCheck()})}_updateDisabled(e){const n=e.isDisabled.currentValue,r=0!==n&&function um(i){return"boolean"==typeof i?i:null!=i&&"false"!==i}(n);Bz.then(()=>{r&&!this.control.disabled?this.control.disable():!r&&this.control.disabled&&this.control.enable(),this._changeDetectorRef?.markForCheck()})}_getPath(e){return this._parent?cC(e,this._parent):[e]}}return i.\u0275fac=function(e){return new(e||i)(E(ao,9),E(Yr,10),E(pu,10),E(Do,10),E(Zn,8),E(zh,8))},i.\u0275dir=ve({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:[Dn([Xee]),lt,bi]}),i})(),IR=(()=>{class i{}return i.\u0275fac=function(e){return new(e||i)},i.\u0275dir=ve({type:i,selectors:[["form",3,"ngNoForm","",3,"ngNativeValidate",""]],hostAttrs:["novalidate",""]}),i})();const Kee={provide:Do,useExisting:Gn(()=>mu),multi:!0};let mu=(()=>{class i extends Vh{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=ri(i)))(n||i)}}(),i.\u0275dir=ve({type:i,selectors:[["input","type","number","formControlName",""],["input","type","number","formControl",""],["input","type","number","ngModel",""]],hostBindings:function(e,n){1&e&&Ue("input",function(s){return n.onChange(s.target.value)})("blur",function(){return n.onTouched()})},features:[Dn([Kee]),lt]}),i})(),Uz=(()=>{class i{}return i.\u0275fac=function(e){return new(e||i)},i.\u0275mod=nn({type:i}),i.\u0275inj=Kt({}),i})();const RR=new me("NgModelWithFormControlWarning"),tte={provide:ao,useExisting:Gn(()=>Hh)};let Hh=(()=>{class i extends ao{constructor(e,n,r){super(),this.callSetDisabledState=r,this.submitted=!1,this._onCollectionChange=()=>this._updateDomValue(),this.directives=[],this.form=null,this.ngSubmit=new We,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&&(hC(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 lb(n,e,this.callSetDisabledState),n.updateValueAndValidity({emitEvent:!1}),this.directives.push(e),n}getControl(e){return this.form.get(e.path)}removeControl(e){dC(e.control||null,e,!1),function Wee(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,Pz(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&&(dC(n||null,e),(i=>i instanceof nc)(r)&&(lb(r,e,this.callSetDisabledState),e.control=r))}),this.form._updateTreeValidity({emitEvent:!1})}_setUpFormContainer(e){const n=this.form.get(e.path);kz(n,e),n.updateValueAndValidity({emitEvent:!1})}_cleanUpFormContainer(e){if(this.form){const n=this.form.get(e.path);n&&function Hee(i,t){return hC(i,t)}(n,e)&&n.updateValueAndValidity({emitEvent:!1})}}_updateRegistrations(){this.form._registerOnCollectionChange(this._onCollectionChange),this._oldForm&&this._oldForm._registerOnCollectionChange(()=>{})}_updateValidators(){ER(this.form,this),this._oldForm&&hC(this._oldForm,this)}_checkFormPresent(){}}return i.\u0275fac=function(e){return new(e||i)(E(Yr,10),E(pu,10),E(zh,8))},i.\u0275dir=ve({type:i,selectors:[["","formGroup",""]],hostBindings:function(e,n){1&e&&Ue("submit",function(s){return n.onSubmit(s)})("reset",function(){return n.onReset()})},inputs:{form:["formGroup","form"]},outputs:{ngSubmit:"ngSubmit"},exportAs:["ngForm"],features:[Dn([tte]),lt,bi]}),i})();const rte={provide:ec,useExisting:Gn(()=>fC)};let fC=(()=>{class i extends ec{set isDisabled(e){}constructor(e,n,r,s,o){super(),this._ngModelWarningConfig=o,this._added=!1,this.update=new We,this._ngModelWarningSent=!1,this._parent=e,this._setValidators(n),this._setAsyncValidators(r),this.valueAccessor=TR(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 cC(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)(E(ao,13),E(Yr,10),E(pu,10),E(Do,10),E(RR,8))},i.\u0275dir=ve({type:i,selectors:[["","formControlName",""]],inputs:{name:["formControlName","name"],isDisabled:["disabled","isDisabled"],model:["ngModel","model"]},outputs:{update:"ngModelChange"},features:[Dn([rte]),lt,bi]}),i})();function jz(i){return"number"==typeof i?i:parseInt(i,10)}function Yz(i){return"number"==typeof i?i:parseFloat(i)}let Gh=(()=>{class i{constructor(){this._validator=iC}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):iC,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=ve({type:i,features:[bi]}),i})();const ute={provide:Yr,useExisting:Gn(()=>gu),multi:!0};let gu=(()=>{class i extends Gh{constructor(){super(...arguments),this.inputName="max",this.normalizeInput=e=>Yz(e),this.createValidator=e=>oz(e)}}return i.\u0275fac=function(){let t;return function(n){return(t||(t=ri(i)))(n||i)}}(),i.\u0275dir=ve({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:[Dn([ute]),lt]}),i})();const hte={provide:Yr,useExisting:Gn(()=>_u),multi:!0};let _u=(()=>{class i extends Gh{constructor(){super(...arguments),this.inputName="min",this.normalizeInput=e=>Yz(e),this.createValidator=e=>sz(e)}}return i.\u0275fac=function(){let t;return function(n){return(t||(t=ri(i)))(n||i)}}(),i.\u0275dir=ve({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:[Dn([hte]),lt]}),i})();const gte={provide:Yr,useExisting:Gn(()=>NR),multi:!0};let NR=(()=>{class i extends Gh{constructor(){super(...arguments),this.inputName="minlength",this.normalizeInput=e=>jz(e),this.createValidator=e=>dz(e)}}return i.\u0275fac=function(){let t;return function(n){return(t||(t=ri(i)))(n||i)}}(),i.\u0275dir=ve({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:[Dn([gte]),lt]}),i})();const _te={provide:Yr,useExisting:Gn(()=>BR),multi:!0};let BR=(()=>{class i extends Gh{constructor(){super(...arguments),this.inputName="maxlength",this.normalizeInput=e=>jz(e),this.createValidator=e=>uz(e)}}return i.\u0275fac=function(){let t;return function(n){return(t||(t=ri(i)))(n||i)}}(),i.\u0275dir=ve({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:[Dn([_te]),lt]}),i})(),Zz=(()=>{class i{}return i.\u0275fac=function(e){return new(e||i)},i.\u0275mod=nn({type:i}),i.\u0275inj=Kt({imports:[Uz]}),i})();class Qz extends lC{constructor(t,e,n){super(CR(e),SR(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={}){Tz(this,!1,t),t.forEach((n,r)=>{Dz(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 Jz(i){return!!i&&(void 0!==i.asyncValidators||void 0!==i.validators||void 0!==i.updateOn)}let yte=(()=>{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 Jz(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 Iz(r,n)}control(e,n,r){let s={};return this.useNonNullable?(Jz(n)?s=n:(s.validators=n,s.asyncValidators=r),new nc(e,{...s,nonNullable:!0})):new nc(e,n,r)}array(e,n,r){const s=e.map(o=>this._createControl(o));return new Qz(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 nc||e instanceof lC?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=ke({token:i,factory:i.\u0275fac,providedIn:"root"}),i})(),eH=(()=>{class i{static withConfig(e){return{ngModule:i,providers:[{provide:zh,useValue:e.callSetDisabledState??ab}]}}}return i.\u0275fac=function(e){return new(e||i)},i.\u0275mod=nn({type:i}),i.\u0275inj=Kt({imports:[Zz]}),i})(),tH=(()=>{class i{static withConfig(e){return{ngModule:i,providers:[{provide:RR,useValue:e.warnOnNgModelWithFormControl??"always"},{provide:zh,useValue:e.callSetDisabledState??ab}]}}}return i.\u0275fac=function(e){return new(e||i)},i.\u0275mod=nn({type:i}),i.\u0275inj=Kt({imports:[Zz]}),i})();const bte=["matFormFieldNotchedOutline",""],xte=["*"],wte=["textField"],Mte=["iconPrefixContainer"],Cte=["textPrefixContainer"];function Ste(i,t){1&i&&Te(0,"span",19)}function Ete(i,t){if(1&i){const e=mi();W(0,"label",17),Ue("cdkObserveContent",function(){return cn(e),Gt(he(2)._refreshOutlineNotchWidth())}),Wt(1,1),fe(2,Ste,1,0,"span",18),Y()}if(2&i){const e=he(2);U("floating",e._shouldLabelFloat())("cdkObserveContentDisabled",!e._hasOutline())("id",e._labelId),At("for",e._control.id)("aria-owns",e._control.id),G(2),U("ngIf",!e.hideRequiredMarker&&e._control.required)}}function Ate(i,t){1&i&&fe(0,Ete,3,6,"label",16),2&i&&U("ngIf",he()._hasFloatingLabel())}function Dte(i,t){1&i&&Te(0,"div",20)}function Tte(i,t){}function Ite(i,t){1&i&&fe(0,Tte,0,0,"ng-template",22),2&i&&(he(2),U("ngTemplateOutlet",rr(1)))}function Rte(i,t){if(1&i&&(W(0,"div",21),fe(1,Ite,1,1,"ng-template",9),Y()),2&i){const e=he();U("matFormFieldNotchedOutlineOpen",e._shouldLabelFloat())("matFormFieldNotchedOutlineLabelWidth",e._labelWidth),G(1),U("ngIf",!e._forceDisplayInfixLabel())}}function kte(i,t){1&i&&(W(0,"div",23,24),Wt(2,2),Y())}function Pte(i,t){1&i&&(W(0,"div",25,26),Wt(2,3),Y())}function Ote(i,t){}function Fte(i,t){1&i&&fe(0,Ote,0,0,"ng-template",22),2&i&&(he(),U("ngTemplateOutlet",rr(1)))}function Lte(i,t){1&i&&(W(0,"div",27),Wt(1,4),Y())}function Nte(i,t){1&i&&(W(0,"div",28),Wt(1,5),Y())}function Bte(i,t){1&i&&Te(0,"div",29)}function Ute(i,t){1&i&&(W(0,"div",30),Wt(1,6),Y()),2&i&&U("@transitionMessages",he()._subscriptAnimationState)}function Vte(i,t){if(1&i&&(W(0,"mat-hint",34),ze(1),Y()),2&i){const e=he(2);U("id",e._hintLabelId),G(1),_i(e.hintLabel)}}function zte(i,t){if(1&i&&(W(0,"div",31),fe(1,Vte,2,2,"mat-hint",32),Wt(2,7),Te(3,"div",33),Wt(4,8),Y()),2&i){const e=he();U("@transitionMessages",e._subscriptAnimationState),G(1),U("ngIf",e.hintLabel)}}const Hte=["*",[["mat-label"]],[["","matPrefix",""],["","matIconPrefix",""]],[["","matTextPrefix",""]],[["","matTextSuffix",""]],[["","matSuffix",""],["","matIconSuffix",""]],[["mat-error"],["","matError",""]],[["mat-hint",3,"align","end"]],[["mat-hint","align","end"]]],Gte=["*","mat-label","[matPrefix], [matIconPrefix]","[matTextPrefix]","[matTextSuffix]","[matSuffix], [matIconSuffix]","mat-error, [matError]","mat-hint:not([align='end'])","mat-hint[align='end']"];let To=(()=>{class i{}return i.\u0275fac=function(e){return new(e||i)},i.\u0275dir=ve({type:i,selectors:[["mat-label"]]}),i})(),$te=0;const nH=new me("MatError");let Wte=(()=>{class i{constructor(e,n){this.id="mat-mdc-error-"+$te++,e||n.nativeElement.setAttribute("aria-live","polite")}}return i.\u0275fac=function(e){return new(e||i)(ya("aria-live"),E(mt))},i.\u0275dir=ve({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&&Yl("id",n.id)},inputs:{id:"id"},features:[Dn([{provide:nH,useExisting:i}])]}),i})(),jte=0,iH=(()=>{class i{constructor(){this.align="start",this.id="mat-mdc-hint-"+jte++}}return i.\u0275fac=function(e){return new(e||i)},i.\u0275dir=ve({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&&(Yl("id",n.id),At("align",null),un("mat-mdc-form-field-hint-end","end"===n.align))},inputs:{align:"align",id:"id"}}),i})();const rH=new me("MatPrefix");let Yte=(()=>{class i{constructor(){this._isText=!1}set _isTextSelector(e){this._isText=!0}}return i.\u0275fac=function(e){return new(e||i)},i.\u0275dir=ve({type:i,selectors:[["","matPrefix",""],["","matIconPrefix",""],["","matTextPrefix",""]],inputs:{_isTextSelector:["matTextPrefix","_isTextSelector"]},features:[Dn([{provide:rH,useExisting:i}])]}),i})();const sH=new me("MatSuffix");let qte=(()=>{class i{constructor(){this._isText=!1}set _isTextSelector(e){this._isText=!0}}return i.\u0275fac=function(e){return new(e||i)},i.\u0275dir=ve({type:i,selectors:[["","matSuffix",""],["","matIconSuffix",""],["","matTextSuffix",""]],inputs:{_isTextSelector:["matTextSuffix","_isTextSelector"]},features:[Dn([{provide:sH,useExisting:i}])]}),i})(),oH=(()=>{class i{constructor(e){this._elementRef=e,this.floating=!1}getWidth(){return function Xte(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)(E(mt))},i.\u0275dir=ve({type:i,selectors:[["label","matFormFieldFloatingLabel",""]],hostAttrs:[1,"mdc-floating-label","mat-mdc-floating-label"],hostVars:2,hostBindings:function(e,n){2&e&&un("mdc-floating-label--float-above",n.floating)},inputs:{floating:"floating"}}),i})();const aH="mdc-line-ripple--active",pC="mdc-line-ripple--deactivating";let lH=(()=>{class i{constructor(e,n){this._elementRef=e,this._handleTransitionEnd=r=>{const s=this._elementRef.nativeElement.classList,o=s.contains(pC);"opacity"===r.propertyName&&o&&s.remove(aH,pC)},n.runOutsideAngular(()=>{e.nativeElement.addEventListener("transitionend",this._handleTransitionEnd)})}activate(){const e=this._elementRef.nativeElement.classList;e.remove(pC),e.add(aH)}deactivate(){this._elementRef.nativeElement.classList.add(pC)}ngOnDestroy(){this._elementRef.nativeElement.removeEventListener("transitionend",this._handleTransitionEnd)}}return i.\u0275fac=function(e){return new(e||i)(E(mt),E(ft))},i.\u0275dir=ve({type:i,selectors:[["div","matFormFieldLineRipple",""]],hostAttrs:[1,"mdc-line-ripple"]}),i})(),cH=(()=>{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)(E(mt),E(ft))},i.\u0275cmp=ot({type:i,selectors:[["div","matFormFieldNotchedOutline",""]],hostAttrs:[1,"mdc-notched-outline"],hostVars:2,hostBindings:function(e,n){2&e&&un("mdc-notched-outline--notched",n.open)},inputs:{labelWidth:["matFormFieldNotchedOutlineLabelWidth","labelWidth"],open:["matFormFieldNotchedOutlineOpen","open"]},attrs:bte,ngContentSelectors:xte,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&&(sr(),Te(0,"div",0),W(1,"div",1),Wt(2),Y(),Te(3,"div",2)),2&e&&(G(1),jo("width",n._getNotchWidth()))},encapsulation:2,changeDetection:0}),i})();const Kte={transitionMessages:Ra("transitionMessages",[Ps("enter",si({opacity:1,transform:"translateY(0%)"})),Pr("void => enter",[si({opacity:0,transform:"translateY(-5px)"}),jr("300ms cubic-bezier(0.55, 0, 0.55, 0.2)")])])};let UR=(()=>{class i{}return i.\u0275fac=function(e){return new(e||i)},i.\u0275dir=ve({type:i}),i})();const mC=new me("MatFormField"),Zte=new me("MAT_FORM_FIELD_DEFAULT_OPTIONS");let dH=0,vl=(()=>{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-"+dH++,this._hintLabelId="mat-mdc-hint-"+dH++,this._subscriptAnimationState="",this._labelWidth=0,this._destroyed=new Re,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(He(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(),Mr(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(He(this._destroyed)).subscribe(()=>{this._needsOutlineLabelOffsetUpdateOnStable&&(this._needsOutlineLabelOffsetUpdateOnStable=!1,this._updateOutlineLabelOffset())})}),this._dir.change.pipe(He(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)(E(mt),E(Zn),E(ft),E(Ia),E(zi),E(Zte,8),E(Rr,8),E(jt))},i.\u0275cmp=ot({type:i,selectors:[["mat-form-field"]],contentQueries:function(e,n,r){if(1&e&&(Wi(r,To,5),Wi(r,To,7),Wi(r,UR,5),Wi(r,rH,5),Wi(r,sH,5),Wi(r,nH,5),Wi(r,iH,5)),2&e){let s;St(s=Et())&&(n._labelChildNonStatic=s.first),St(s=Et())&&(n._labelChildStatic=s.first),St(s=Et())&&(n._formFieldControl=s.first),St(s=Et())&&(n._prefixChildren=s),St(s=Et())&&(n._suffixChildren=s),St(s=Et())&&(n._errorChildren=s),St(s=Et())&&(n._hintChildren=s)}},viewQuery:function(e,n){if(1&e&&(Wn(wte,5),Wn(Mte,5),Wn(Cte,5),Wn(oH,5),Wn(cH,5),Wn(lH,5)),2&e){let r;St(r=Et())&&(n._textField=r.first),St(r=Et())&&(n._iconPrefixContainer=r.first),St(r=Et())&&(n._textPrefixContainer=r.first),St(r=Et())&&(n._floatingLabel=r.first),St(r=Et())&&(n._notchedOutline=r.first),St(r=Et())&&(n._lineRipple=r.first)}},hostAttrs:[1,"mat-mdc-form-field"],hostVars:42,hostBindings:function(e,n){2&e&&un("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:[Dn([{provide:mC,useExisting:i}])],ngContentSelectors:Gte,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&&(sr(Hte),fe(0,Ate,1,1,"ng-template",null,0,Uc),W(2,"div",1,2),Ue("click",function(s){return n._control.onContainerClick&&n._control.onContainerClick(s)}),fe(4,Dte,1,0,"div",3),W(5,"div",4),fe(6,Rte,2,3,"div",5),fe(7,kte,3,0,"div",6),fe(8,Pte,3,0,"div",7),W(9,"div",8),fe(10,Fte,1,1,"ng-template",9),Wt(11),Y(),fe(12,Lte,2,0,"div",10),fe(13,Nte,2,0,"div",11),Y(),fe(14,Bte,1,0,"div",12),Y(),W(15,"div",13),fe(16,Ute,2,1,"div",14),fe(17,zte,5,2,"div",15),Y()),2&e&&(G(2),un("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),G(2),U("ngIf",!n._hasOutline()&&!n._control.disabled),G(2),U("ngIf",n._hasOutline()),G(1),U("ngIf",n._hasIconPrefix),G(1),U("ngIf",n._hasTextPrefix),G(2),U("ngIf",!n._hasOutline()||n._forceDisplayInfixLabel()),G(2),U("ngIf",n._hasTextSuffix),G(1),U("ngIf",n._hasIconSuffix),G(1),U("ngIf",!n._hasOutline()),G(1),un("mat-mdc-form-field-subscript-dynamic-size","dynamic"===n.subscriptSizing),U("ngSwitch",n._getDisplayedMessages()),G(1),U("ngSwitchCase","error"),G(1),U("ngSwitchCase","hint"))},dependencies:[vi,xy,by,VT,CU,iH,oH,cH,lH],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:[Kte.transitionMessages]},changeDetection:0}),i})(),gC=(()=>{class i{}return i.\u0275fac=function(e){return new(e||i)},i.\u0275mod=nn({type:i}),i.\u0275inj=Kt({imports:[Qn,Eo,HI,Qn]}),i})();const fH=Ph({passive:!0});let ene=(()=>{class i{constructor(e,n){this._platform=e,this._ngZone=n,this._monitoredElements=new Map}monitor(e){if(!this._platform.isBrowser)return po;const n=jc(e),r=this._monitoredElements.get(n);if(r)return r.subject;const s=new Re,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,fH),n.classList.add("cdk-text-field-autofill-monitored")}),this._monitoredElements.set(n,{subject:s,unlisten:()=>{n.removeEventListener("animationstart",a,fH)}}),s}stopMonitoring(e){const n=jc(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)(ee(zi),ee(ft))},i.\u0275prov=ke({token:i,factory:i.\u0275fac,providedIn:"root"}),i})(),tne=(()=>{class i{}return i.\u0275fac=function(e){return new(e||i)},i.\u0275mod=nn({type:i}),i.\u0275inj=Kt({}),i})();const VR=new me("MAT_INPUT_VALUE_ACCESSOR"),nne=["button","checkbox","file","hidden","image","radio","range","reset","submit"];let ine=0;const rne=$U(class{constructor(i,t,e,n){this._defaultErrorStateMatcher=i,this._parentForm=t,this._parentFormGroup=e,this.ngControl=n,this.stateChanges=new Re}});let ic=(()=>{class i extends rne{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(_l.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&&oU().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,d,h){super(a,s,o,r),this._elementRef=e,this._platform=n,this._autofillMonitor=c,this._formField=h,this._uid="mat-input-"+ine++,this.focused=!1,this.stateChanges=new Re,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=>oU().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&&d.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(){nne.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)(E(mt),E(zi),E(ec,10),E(db,8),E(Hh,8),E(jU),E(VR,10),E(ene),E(ft),E(mC,8))},i.\u0275dir=ve({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&&Ue("focus",function(){return n._focusChanged(!0)})("blur",function(){return n._focusChanged(!1)})("input",function(){return n._onInput()}),2&e&&(Yl("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),un("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:[Dn([{provide:UR,useExisting:i}]),lt,bi]}),i})(),pH=(()=>{class i{}return i.\u0275fac=function(e){return new(e||i)},i.\u0275mod=nn({type:i}),i.\u0275inj=Kt({imports:[Qn,gC,gC,tne,Qn]}),i})();function sne(i,t){if(1&i&&(W(0,"mat-label"),ze(1),Y()),2&i){const e=he(2);G(1),_i(e.resource.name)}}function one(i,t){if(1&i){const e=mi();W(0,"mat-form-field",1),fe(1,sne,2,1,"mat-label",2),W(2,"input",3),Ue("ngModelChange",function(r){return cn(e),Gt(he().resource.data=r)})("change",function(){return cn(e),Gt(he().changed.emit())}),Y()()}if(2&i){const e=he();U("matTooltip",e.resourceDescription),G(1),U("ngIf",e.resource.name),G(1),U("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 ane=(()=>{class i{constructor(){this.resource=null,this.resourceDescription="",this.disabled=!1,this.changed=new We}}return i.\u0275fac=function(e){return new(e||i)},i.\u0275cmp=ot({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&&fe(0,one,3,7,"mat-form-field",0),2&e&&U("ngIf",n.resource)},dependencies:[vi,gl,mu,tc,_u,gu,Xc,vl,To,ic,Os],changeDetection:0}),i})();function lne(i,t){if(1&i&&(W(0,"mat-label"),ze(1),Y()),2&i){const e=he(2);G(1),_i(e.resource.name)}}function cne(i,t){if(1&i){const e=mi();W(0,"mat-form-field",1),fe(1,lne,2,1,"mat-label",2),W(2,"input",3),Ue("ngModelChange",function(r){return cn(e),Gt(he().resource.data=r)})("change",function(){return cn(e),Gt(he().changed.emit())}),Y()()}if(2&i){const e=he();U("matTooltip",e.resourceDescription),G(1),U("ngIf",e.resource.name),G(1),U("disabled",e.disabled||void 0!==e.resource.schema.required_value)("maxlength",e.maxLength)("minlength",e.minLength)("ngModel",e.resource.data)}}let mH=(()=>{class i{constructor(){this._resource=null,this.resourceDescription="",this.disabled=!1,this.changed=new We,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=ot({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&&fe(0,cne,3,6,"mat-form-field",0),2&e&&U("ngIf",n.resource)},dependencies:[vi,gl,tc,NR,BR,Xc,vl,To,ic,Os],changeDetection:0}),i})();const rc=(i,t)=>i+(i.includes("__")?"/":"__")+t,$h=function(){return[]};function dne(i,t){if(1&i&&(W(0,"mat-panel-description"),ze(1," Click to view items ("),W(2,"b"),ze(3),Y(),ze(4,") "),Y()),2&i){const e=he(2);G(3),_i((e.resourceData||so(1,$h)).length)}}function une(i,t){1&i&&(W(0,"mat-panel-description"),ze(1," Empty array "),Y())}function hne(i,t){}function fne(i,t){if(1&i){const e=mi();W(0,"mat-expansion-panel",4),Ue("opened",function(){return cn(e),Gt(he().onContentsTrigger(!0))})("closed",function(){return cn(e),Gt(he().onContentsTrigger(!1))}),W(1,"mat-expansion-panel-header",5)(2,"mat-panel-title"),ze(3),Y(),fe(4,dne,5,2,"mat-panel-description",1),fe(5,une,2,0,"mat-panel-description",1),Y(),fe(6,hne,0,0,"ng-template",6),Y()}if(2&i){const e=he(),n=rr(3);G(1),U("matTooltip",e.resourceDescription),G(2),Zi(" ",e.name," "),G(1),U("ngIf",(e.resourceData||so(5,$h)).length>0),G(1),U("ngIf",0==(e.resourceData||so(6,$h)).length),G(1),U("ngTemplateOutlet",n)}}function pne(i,t){}function mne(i,t){if(1&i&&(Gr(0),W(1,"h2",5),ze(2),Y(),W(3,"div",7),fe(4,pne,0,0,"ng-template",6),Y(),$r()),2&i){const e=he(),n=rr(3);G(1),U("matTooltip",e.resourceDescription),G(1),_i(e.name),G(2),U("ngTemplateOutlet",n)}}function gne(i,t){}function _ne(i,t){if(1&i&&Te(0,"app-editor",10),2&i){const e=he().$implicit,n=he(3);U("resource",n.children[n.pageIndex*n.pageSize+e])("disabled",n.disabled)}}function vne(i,t){if(1&i&&(Gr(0),fe(1,_ne,1,2,"app-editor",9),$r()),2&i){const e=t.$implicit,n=he(3);G(1),U("ngIf",n.pageIndex*n.pageSize+e0)}let zR=(()=>{class i{constructor(e,n){this.main=e,this.cdr=n,this._resource=null,this.resourceDescription="",this.disabled=!1,this.changed=new We,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 Re}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:rc(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(He(this.destroyed$),gn(([n,r])=>!!this.resource&&n.startsWith(this.resource.id)&&!n.substring(this.resource.id.length+1).includes("/"))).subscribe(function(){var n=tt(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 vt(null),this.imageUrl$=new vt(null),this.destroyed$=new Re,this.changed=new We}set resource(e){this._resource$.next(e)}get resource(){return this._resource$.getValue()}ngAfterViewInit(){var e=this;return tt(function*(){e._resource$.pipe(He(e.destroyed$)).subscribe(function(){var n=tt(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)(E(Ql),E(ka))},i.\u0275cmp=ot({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&&(Te(0,"app-compound-block-ui",0),Dt(1,"async"),fe(2,Ane,2,3,"img",1),Dt(3,"async")),2&e&&(U("resource",Lt(1,3,n._resource$))("fieldBlacklist",so(7,Dne)),G(2),U("ngIf",Lt(3,5,n.imageUrl$)))},dependencies:[vi,Jl,pl],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 Ine=["*"],Fne=new me("MAT_CARD_CONFIG");let gH=(()=>{class i{constructor(e){this.appearance=e?.appearance||"raised"}}return i.\u0275fac=function(e){return new(e||i)(E(Fne,8))},i.\u0275cmp=ot({type:i,selectors:[["mat-card"]],hostAttrs:[1,"mat-mdc-card","mdc-card"],hostVars:4,hostBindings:function(e,n){2&e&&un("mat-mdc-card-outlined","outlined"===n.appearance)("mdc-card--outlined","outlined"===n.appearance)},inputs:{appearance:"appearance"},exportAs:["matCard"],ngContentSelectors:Ine,decls:1,vars:0,template:function(e,n){1&e&&(sr(),Wt(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})(),_H=(()=>{class i{}return i.\u0275fac=function(e){return new(e||i)},i.\u0275mod=nn({type:i}),i.\u0275inj=Kt({imports:[Qn,Eo,Qn]}),i})();class HR{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 Re,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 GR=(()=>{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=ke({token:i,factory:i.\u0275fac,providedIn:"root"}),i})(),oie=(()=>{class i{}return i.\u0275fac=function(e){return new(e||i)},i.\u0275mod=nn({type:i}),i.\u0275inj=Kt({imports:[Qn,Eo,eb,Qn]}),i})();const MH={transformPanel:Ra("transformPanel",[Pr("void => enter-dropdown",jr("120ms cubic-bezier(0, 0, 0.2, 1)",rV([si({opacity:0,transform:"scale(1, 0.8)"}),si({opacity:1,transform:"scale(1, 1)"})]))),Pr("void => enter-dialog",jr("150ms cubic-bezier(0, 0, 0.2, 1)",rV([si({opacity:0,transform:"scale(0.7)"}),si({transform:"none",opacity:1})]))),Pr("* => void",jr("100ms linear",si({opacity:0})))]),fadeInCalendar:Ra("fadeInCalendar",[Ps("void",si({opacity:0})),Ps("enter",si({opacity:1})),Pr("void => *",jr("120ms 100ms cubic-bezier(0.55, 0, 0.55, 0.2)"))])},EH=function(i){return{active:i}};function Cie(i,t){if(1&i){const e=mi();W(0,"button",2),Ue("click",function(){const s=cn(e).$implicit;return Gt(he().select(s))}),Y()}if(2&i){const e=t.$implicit,n=he();jo("background-color",e),U("ngClass",sm(3,EH,n.selectedColor===e))}}function Sie(i,t){if(1&i){const e=mi();W(0,"button",2),Ue("click",function(){const s=cn(e).$implicit;return Gt(he().select(s))}),Y()}if(2&i){const e=t.$implicit,n=he();jo("background-color",e),U("ngClass",sm(3,EH,n.selectedColor===e))}}const Eie=["button"],Aie=/^\s+/,Die=/\s+$/,$m=Math.round,Tie=(Math,Math,Math,/[^0-9]/g),AH=["#ffffff","#ffff00","#ff00ff","#ff0000","#c0c0c0","#808080","#808000","#800080","#800000","#00ffff","#00ff00","#008080","#008000","#0000ff","#000080","#000000"];function DH(i,t,e){const n=i.getImageData(t,e,1,1).data;return{r:n[0],g:n[1],b:n[2]}}function Wh(i){return 1==i.length?"0"+i:""+i}function Rie(i){return Math.round(255*parseFloat(i)).toString(16)}function TH(i){return Ko(i)/255}function Ko(i){return parseInt(i,16)}function IH(i,t,e,n){var r=[Wh($m(i).toString(16)),Wh($m(t).toString(16)),Wh($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 vu="(?:[-\\+]?\\d*\\.\\d+%?)|(?:[-\\+]?\\d+%?)",jR="[\\s|\\(]+("+vu+")[,|\\s]+("+vu+")[,|\\s]+("+vu+")\\s*\\)?",YR="[\\s|\\(]+("+vu+")[,|\\s]+("+vu+")[,|\\s]+("+vu+")[,|\\s]+("+vu+")\\s*\\)?",jh={CSS_UNIT:new RegExp(vu),rgb:new RegExp("rgb"+jR),rgba:new RegExp("rgba"+YR),hsl:new RegExp("hsl"+jR),hsla:new RegExp("hsla"+YR),hsv:new RegExp("hsv"+jR),hsva:new RegExp("hsva"+YR),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 qR(i){let t;return i=i.replace(Aie,"").replace(Die,"").toLowerCase(),(t=jh.rgb.exec(i))?{r:t[1],g:t[2],b:t[3],a:1}:(t=jh.rgba.exec(i))?{r:t[1],g:t[2],b:t[3],a:t[4]}:(t=jh.hex8.exec(i))?{r:Ko(t[1]),g:Ko(t[2]),b:Ko(t[3]),a:TH(t[4])}:(t=jh.hex6.exec(i))?{r:Ko(t[1]),g:Ko(t[2]),b:Ko(t[3]),a:1}:(t=jh.hex4.exec(i))?{r:Ko(t[1]+""+t[1]),g:Ko(t[2]+""+t[2]),b:Ko(t[3]+""+t[3]),a:TH(t[4]+""+t[4])}:(t=jh.hex3.exec(i))?{r:Ko(t[1]+""+t[1]),g:Ko(t[2]+""+t[2]),b:Ko(t[3]+""+t[3]),a:1}:null}class Yh{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=IH(this.r,this.g,this.b),this.rgba=this.toRgba()}toHex(t){return IH(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 Iie(i,t,e,n,r){var s=[Wh($m(i).toString(16)),Wh($m(t).toString(16)),Wh($m(e).toString(16)),Wh(Rie(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 RH=(()=>{class i{constructor(e,n){this.zone=e,this.colorChanged=new We,this.x=0,this.y=0,this.drag=!1,this._destroyed=new Re,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){xo()},i.\u0275dir=ve({type:i,inputs:{color:"color"},outputs:{colorChanged:"colorChanged"}}),i})(),Oie=(()=>{class i extends RH{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}=DH(this.ctx,e.offsetX,e.offsetY);this.emitChange(new Yh(n,r,s))}}return i.\u0275fac=function(e){return new(e||i)(E(ft))},i.\u0275cmp=ot({type:i,selectors:[["ngx-mat-color-slider"]],features:[lt],decls:1,vars:0,consts:[["id","color-strip","width","15","height","234",1,"zone-strip",3,"mousedown","mouseup"]],template:function(e,n){1&e&&(W(0,"canvas",0),Ue("mousedown",function(s){return n.onMousedown(s)})("mouseup",function(s){return n.onMouseup(s)}),Y())}}),i})(),Fie=(()=>{class i{constructor(){}onInput(e){this._formatInput(e.target)}_formatInput(e){let n=Number(e.value.replace(Tie,""));n=isNaN(n)?0:n,e.value=n}}return i.\u0275fac=function(e){return new(e||i)},i.\u0275dir=ve({type:i,selectors:[["","ngxMatNumericColorInput",""]],hostBindings:function(e,n){1&e&&Ue("input",function(s){return n.onInput(s)})}}),i})(),Nie=(()=>{class i extends RH{constructor(e){super(e,"color-block"),this.zone=e,this._resetBaseColor=!0,this.formGroup=new Hm({r:new nc(null,[_l.required]),g:new nc(null,[_l.required]),b:new nc(null,[_l.required]),a:new nc(null,[_l.required]),hex:new nc(null,[_l.required,_l.pattern(jh.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(){Mr(this.rCtrl.valueChanges,this.gCtrl.valueChanges,this.bCtrl.valueChanges,this.aCtrl.valueChanges).pipe(He(this._destroyed),ml(400)).subscribe(r=>{const s=new Yh(Number(this.rCtrl.value),Number(this.gCtrl.value),Number(this.bCtrl.value),Number(this.aCtrl.value));this.emitChange(s)}),this.hexCtrl.valueChanges.pipe(He(this._destroyed),ml(400),Zl()).subscribe(r=>{const s=qR(r);if(null!=s){const o=new Yh(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}=DH(this.ctx,e.offsetX,e.offsetY);this.emitChange(new Yh(n,r,s))}}return i.\u0275fac=function(e){return new(e||i)(E(ft))},i.\u0275cmp=ot({type:i,selectors:[["ngx-mat-color-canvas"]],hostAttrs:[1,"ngx-mat-color-canvas"],features:[lt,bi],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&&(W(0,"form",0)(1,"div",1)(2,"div",2)(3,"canvas",3),Ue("mousedown",function(s){return n.onMousedown(s)})("mouseup",function(s){return n.onMouseup(s)}),Y(),W(4,"ngx-mat-color-slider",4),Ue("colorChanged",function(s){return n.onSliderColorChanged(s)}),Y()(),W(5,"div",5)(6,"mat-form-field")(7,"mat-label"),ze(8,"R"),Y(),Te(9,"input",6),Y(),W(10,"mat-form-field")(11,"mat-label"),ze(12,"G"),Y(),Te(13,"input",7),Y(),W(14,"mat-form-field")(15,"mat-label"),ze(16,"B"),Y(),Te(17,"input",8),Y()()(),W(18,"div",1),Te(19,"button",9),W(20,"mat-form-field")(21,"mat-label"),ze(22,"HEX6"),Y(),W(23,"mat-label",10),ze(24,"#\xa0"),Y(),Te(25,"input",11),Y(),W(26,"mat-form-field",12)(27,"mat-label"),ze(28,"A"),Y(),Te(29,"input",13),Y()()()),2&e&&(U("formGroup",n.formGroup),G(19),jo("background-color",(null==n.color?null:n.color.rgba)||"transparent"))},dependencies:[ic,vl,To,Yte,MV,IR,gl,mu,tc,bR,_u,gu,Hh,fC,Oie,Fie],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})(),Bie=(()=>{class i{constructor(){this.colorChanged=new We,this.colors1=AH.slice(0,8),this.colors2=AH.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}=qR(e);this.colorChanged.emit(new Yh(n,r,s,o))}}return i.\u0275fac=function(e){return new(e||i)},i.\u0275cmp=ot({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&&(W(0,"div",0),fe(1,Cie,1,5,"button",1),Y(),W(2,"div",0),fe(3,Sie,1,5,"button",1),Y()),2&e&&(G(1),U("ngForOf",n.colors1),G(2),U("ngForOf",n.colors2))},dependencies:[hm,So,MV],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})(),kH=(()=>{class i{constructor(){this.colorChanged=new We}ngOnInit(){}handleColorChanged(e){this.colorChanged.emit(e)}}return i.\u0275fac=function(e){return new(e||i)},i.\u0275cmp=ot({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&&(W(0,"ngx-mat-color-canvas",0),Ue("colorChanged",function(s){return n.handleColorChanged(s)}),Y(),W(1,"ngx-mat-color-collection",0),Ue("colorChanged",function(s){return n.handleColorChanged(s)}),Y()),2&e&&(U("color",n.color),G(1),U("color",n.color))},dependencies:[Nie,Bie],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})(),XR=(()=>{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=qR(e);return n?new Yh(n.r,n.g,n.b,n.a):null}}return i.\u0275fac=function(e){return new(e||i)},i.\u0275prov=ke({token:i,factory:i.\u0275fac}),i})();const Uie={display:{colorInput:"hex"}},PH=new me("mat-color-formats"),OH=new me("ngx-mat-colorpicker-scroll-strategy"),zie={provide:OH,deps:[as],useFactory:function Vie(i){return()=>i.scrollStrategies.reposition()}},Hie=Qy(class{constructor(i){this._elementRef=i}});let FH=(()=>{class i extends Hie{constructor(e){super(e)}}return i.\u0275fac=function(e){return new(e||i)(E(mt))},i.\u0275cmp=ot({type:i,selectors:[["ngx-mat-color-picker-content"]],viewQuery:function(e,n){if(1&e&&Wn(kH,5),2&e){let r;St(r=Et())&&(n._palette=r.first)}},hostAttrs:[1,"ngx-mat-colorpicker-content"],hostVars:3,hostBindings:function(e,n){2&e&&(Tw("@transformPanel","enter"),un("ngx-mat-colorpicker-content-touch",n.picker.touchUi))},inputs:{color:"color"},exportAs:["ngxMatColorPickerContent"],features:[lt],decls:1,vars:1,consts:[[3,"color","colorChanged"]],template:function(e,n){1&e&&(W(0,"ngx-mat-color-palette",0),Ue("colorChanged",function(s){return n.picker.select(s)}),Y()),2&e&&U("color",n.picker._selected)},dependencies:[kH],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:[MH.transformPanel,MH.fadeInCalendar]},changeDetection:0}),i})(),LH=(()=>{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 We,this.closedStream=new We,this._touchUi=!1,this._opened=!1,this._defaultColor="primary",this._validSelected=null,this._disabledChange=new Re,this._focusedElementBeforeOpen=null,this._inputSubscription=Zt.EMPTY,this._selectedChanged=new Re,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(FH,{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 Fh(FH,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(Oi(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"),Mr(this._popupRef.backdropClick(),this._popupRef.detachments(),this._popupRef.keydownEvents().pipe(gn(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)(E(Bm),E(as),E(ft),E(XR),E(Ia,8),E(OH),E(jt,8),E(Wr))},i.\u0275cmp=ot({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 yC{constructor(t,e){this.target=t,this.targetElement=e,this.value=this.target.value}}const Gie={provide:Do,useExisting:Gn(()=>bC),multi:!0},$ie={provide:Yr,useExisting:Gn(()=>bC),multi:!0};let bC=(()=>{class i{constructor(e,n,r,s){if(this._elementRef=e,this._formField=n,this._colorFormats=r,this._adapter=s,this.colorChange=new We,this.colorInput=new We,this._disabledChange=new We,this._valueChange=new We,this._onTouched=()=>{},this._cvaOnChange=()=>{},this._validatorOnChange=()=>{},this._pickerSubscription=Zt.EMPTY,this._validator=_l.compose([]),this._lastValueValid=!1,!this._colorFormats)throw function Pie(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 yC(this,this._elementRef.nativeElement)),this.colorChange.emit(new yC(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 yC(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 yC(this,this._elementRef.nativeElement)))}}return i.\u0275fac=function(e){return new(e||i)(E(mt),E(vl,8),E(PH,8),E(XR))},i.\u0275dir=ve({type:i,selectors:[["input","ngxMatColorPicker",""]],hostVars:3,hostBindings:function(e,n){1&e&&Ue("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&&(Yl("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:[Dn([Gie,$ie,{provide:VR,useExisting:i}])]}),i})(),Wie=(()=>{class i{constructor(e){this._cd=e,this._stateChanges=Zt.EMPTY}get disabled(){if(null==this._disabled&&this.picker)return this.picker.disabled}set disabled(e){this._disabled=e}ngOnInit(){}ngOnChanges(e){e.picker&&this._watchStateChanges()}ngOnDestroy(){this._stateChanges.unsubscribe()}ngAfterContentInit(){this._watchStateChanges()}open(e){this.picker&&!this.disabled&&(this.picker.open(),e.stopPropagation())}_watchStateChanges(){const e=this.picker?this.picker._disabledChange:ht(),n=this.picker&&this.picker._pickerInput?this.picker._pickerInput._disabledChange:ht(),r=this.picker?Mr(this.picker.openedStream,this.picker.closedStream):ht();this._stateChanges.unsubscribe(),this._stateChanges=Mr(e,n,r).subscribe(()=>this._cd.markForCheck())}}return i.\u0275fac=function(e){return new(e||i)(E(Zn))},i.\u0275cmp=ot({type:i,selectors:[["ngx-mat-color-toggle"]],viewQuery:function(e,n){if(1&e&&Wn(Eie,5),2&e){let r;St(r=Et())&&(n._button=r.first)}},hostAttrs:[1,"ngx-mat-color-toggle"],hostVars:7,hostBindings:function(e,n){1&e&&Ue("focus",function(){return n._button.focus()}),2&e&&(At("tabindex",-1),un("ngx-mat-color-toggle-active",n.picker&&n.picker.opened)("mat-accent",n.picker&&"accent"===n.picker.color)("mat-warn",n.picker&&"warn"===n.picker.color))},inputs:{picker:["for","picker"],tabIndex:"tabIndex",disabled:"disabled"},exportAs:["ngxMatColorPickerToggle"],features:[bi],decls:4,vars:5,consts:[["mat-icon-button","","type","button",3,"disabled","click"],["button",""]],template:function(e,n){1&e&&(W(0,"button",0,1),Ue("click",function(s){return n.open(s)}),W(2,"mat-icon"),ze(3,"palette"),Y()()),2&e&&(U("disabled",n.disabled),At("aria-haspopup",n.picker?"dialog":null)("tabindex",n.disabled?-1:n.tabIndex),G(2),jo("color",null==n.picker||null==n.picker._selected?null:n.picker._selected.rgba))},dependencies:[XM,gR],styles:[".mat-form-field-appearance .mat-form-field-prefix .ngx-mat-color-toggle-default-icon,.mat-form-field-appearance .mat-form-field-suffix .ngx-mat-color-toggle-default-icon{width:1em}.mat-form-field:not(.mat-form-field-appearance) .mat-form-field-prefix .ngx-mat-color-toggle-default-icon,.mat-form-field:not(.mat-form-field-appearance) .mat-form-field-suffix .ngx-mat-color-toggle-default-icon{display:block;width:1.5em;height:1.5em}.mat-form-field:not(.mat-form-field-appearance) .mat-form-field-prefix .mat-icon-button .ngx-mat-color-toggle-default-icon,.mat-form-field:not(.mat-form-field-appearance) .mat-form-field-suffix .mat-icon-button .ngx-mat-color-toggle-default-icon{margin:auto}\n"],encapsulation:2}),i})(),jie=(()=>{class i{}return i.\u0275fac=function(e){return new(e||i)},i.\u0275mod=nn({type:i}),i.\u0275inj=Kt({providers:[XR,zie],imports:[Eo,pH,KM,_H,oie,eH,tH,_V,Lh,ez]}),i})();const Yie=["picker"],qie=function(i){return{"background-color":i}};function Xie(i,t){if(1&i){const e=mi();W(0,"div",5),Ue("click",function(r){const o=cn(e).index;return Gt(he().onColorClicked(r.currentTarget,o))}),Y()}if(2&i){const e=t.$implicit,n=t.index,r=he();U("ngStyle",sm(2,qie,"#"+r.lpad(e.toString(16),"0",8)))("matTooltip",n+": #"+e.toString(16))}}const Kie=function(){return["colors"]};let Zie=(()=>{class i{constructor(){this.resource=null,this.changed=new We,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 yU;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=ot({type:i,selectors:[["app-palette-block-ui"]],viewQuery:function(e,n){if(1&e&&Wn(Yie,5),2&e){let r;St(r=Et())&&(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&&(Te(0,"app-compound-block-ui",0),W(1,"div",1),fe(2,Xie,1,4,"div",2),Y(),W(3,"input",3),Ue("colorChange",function(s){return n.onColorChange(s.value)}),Y(),Te(4,"ngx-mat-color-picker",null,4)),2&e){const r=rr(5);U("resource",n.resource)("fieldBlacklist",so(4,Kie)),G(2),U("ngForOf",null==n.resourceData?null:n.resourceData.colors),G(1),U("ngxMatColorPicker",r)}},dependencies:[So,eM,ic,Os,bC,LH,Jl],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 Qie=["editor"];let Jie=(()=>{class i{constructor(e){this.cdr=e,this._resource=null,this.resourceDescription="",this.disabled=!1,this.changed=new We,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)(E(Zn))},i.\u0275cmp=ot({type:i,selectors:[["app-binary-block-ui"]],viewQuery:function(e,n){if(1&e&&Wn(Qie,5),2&e){let r;St(r=Et())&&(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&&(W(0,"h2",0),ze(1),Y(),Te(2,"div",null,1)),2&e&&(U("matTooltip",n.resourceDescription),G(1),_i(null==n.resource?null:n.resource.name))},dependencies:[Os],changeDetection:0}),i})();const ere=["picker"];function tre(i,t){if(1&i&&(W(0,"mat-label",8),ze(1),Y()),2&i){const e=he();G(1),_i(null==e.resource?null:e.resource.name)}}const nre=function(i){return{transform:i}};let ire=(()=>{class i{constructor(e){this.cdr=e,this.resource=null,this.resourceDescription="",this.changed=new We,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)(E(Zn))},i.\u0275cmp=ot({type:i,selectors:[["app-angle-block-ui"]],viewQuery:function(e,n){if(1&e&&Wn(ere,5),2&e){let r;St(r=Et())&&(n.picker=r.first)}},hostBindings:function(e,n){1&e&&Ue("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&&(W(0,"div",0)(1,"div",1,2)(3,"div",3),Te(4,"div",4)(5,"div",5),Y()(),W(6,"div",6),fe(7,tre,2,1,"mat-label",7),W(8,"mat-label"),ze(9),Dt(10,"number"),Y(),W(11,"mat-label"),ze(12),Dt(13,"number"),Y()()()),2&e&&(U("matTooltip",n.resourceDescription),G(3),U("ngStyle",sm(11,nre,"rotate("+((null==n.resource?null:n.resource.data)||0)+"rad)")),G(4),U("ngIf",null==n.resource?null:n.resource.name),G(2),Zi("",J1(10,5,180*(null==n.resource?null:n.resource.data)/n.pi||0,"1.2-2")," deg"),G(3),Zi("",J1(13,8,(null==n.resource?null:n.resource.data)||0,"1.2-2")," rad"))},dependencies:[vi,eM,To,Os,uB],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 NH{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,d=new Set;for(const h of e)!0===Array.isArray(h)?a.add(h):"object"==typeof h?l.add(h):"function"==typeof h?d.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===d.size){h=!0;for(const p of o)if(!1===d.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 rre(i,t){if(1&i&&(W(0,"mat-list-option",3),ze(1),Y()),2&i){const e=t.$implicit,n=he();U("value",e)("selected",n.selectedValue==e),G(1),Zi(" ",e," ")}}function sre(i,t){if(1&i&&(W(0,"mat-card"),Te(1,"app-editor",4),Y()),2&i){const e=he();G(1),U("resource",e.resources[e.selectedValue])}}let xC=(()=>{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)(E(NH))},i.\u0275cmp=ot({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&&(W(0,"mat-selection-list",0),Ue("selectionChange",function(s){return n.selectedValue=s.source.selectedOptions.selected[0].value}),fe(1,rre,2,3,"mat-list-option",1),Y(),fe(2,sre,2,1,"mat-card",2)),2&e&&(U("multiple",!1),G(1),U("ngForOf",n.keys),G(1),U("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})(),ore=(()=>{class i{constructor(){this._resource=null,this.resourceMap={},this.changed=new We}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",iR("@transformPanel",[nR()],{optional:!0}))]),transformPanel:Ra("transformPanel",[Ps("void",si({opacity:0,transform:"scale(1, 0.8)"})),Pr("void => showing",jr("120ms cubic-bezier(0, 0, 0.2, 1)",si({opacity:1,transform:"scale(1, 1)"}))),Pr("* => void",jr("100ms linear",si({opacity:0})))])};let BH=0;const UH=new me("mat-select-scroll-strategy"),vre=new me("MAT_SELECT_CONFIG"),yre={provide:UH,deps:[as],useFactory:function _re(i){return()=>i.scrollStrategies.reposition()}},bre=new me("MatSelectTrigger");class xre{constructor(t,e){this.source=t,this.value=e}}const wre=jM(JI(WM($U(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 Re}}))));let Mre=(()=>{class i extends wre{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(_l.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=ks(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,d,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=d,this._liveAnnouncer=g,this._defaultOptions=b,this._panelOpen=!1,this._compareWith=(v,y)=>v===y,this._uid="mat-select-"+BH++,this._triggerAriaLabelledBy=null,this._destroy=new Re,this._onChange=()=>{},this._onTouched=()=>{},this._valueId="mat-select-value-"+BH++,this._panelDoneAnimatingStream=new Re,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=Ey(()=>{const v=this.options;return v?v.changes.pipe(Ao(v),Rs(()=>Mr(...v.map(y=>y.onSelectionChange)))):this._ngZone.onStable.pipe(Oi(1),Rs(()=>this.optionSelectionChanges))}),this.openedChange=new We,this._openedStream=this.openedChange.pipe(gn(v=>v),et(()=>{})),this._closedStream=this.openedChange.pipe(gn(v=>!v),et(()=>{})),this.selectionChange=new We,this.valueChange=new We,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 HR(this.multiple),this.stateChanges.next(),this._panelDoneAnimatingStream.pipe(Zl(),He(this._destroy)).subscribe(()=>this._panelDoneAnimating(this.panelOpen))}ngAfterContentInit(){this._initKeyManager(),this._selectionModel.changed.pipe(He(this._destroy)).subscribe(e=>{e.added.forEach(n=>n.select()),e.removed.forEach(n=>n.deselect())}),this.options.changes.pipe(Ao(null),He(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&&!Xo(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||Xo(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(Oi(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 HZ(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=Mr(this.options.changes,this._destroy);this.optionSelectionChanges.pipe(He(e)).subscribe(n=>{this._onSelect(n.source,n.isUserInput),n.isUserInput&&!this.multiple&&this._panelOpen&&(this.close(),this.focus())}),Mr(...this.options.map(n=>n._stateChanges)).pipe(He(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)(E(FM),E(Zn),E(ft),E(jU),E(mt),E(Ia,8),E(db,8),E(Hh,8),E(mC,8),E(ec,10),ya("tabindex"),E(UH),E(XI),E(vre,8))},i.\u0275dir=ve({type:i,viewQuery:function(e,n){if(1&e&&(Wn(are,5),Wn(lre,5),Wn(xU,5)),2&e){let r;St(r=Et())&&(n.trigger=r.first),St(r=Et())&&(n.panel=r.first),St(r=Et())&&(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:[lt,bi]}),i})(),hb=(()=>{class i extends Mre{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(He(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 PQ(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 xre(this,e)}_getOverlayWidth(){return(this._preferredOverlayOrigin instanceof zI?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=ri(i)))(n||i)}}(),i.\u0275cmp=ot({type:i,selectors:[["mat-select"]],contentQueries:function(e,n,r){if(1&e&&(Wi(r,bre,5),Wi(r,Nm,5),Wi(r,eV,5)),2&e){let s;St(s=Et())&&(n.customTrigger=s.first),St(s=Et())&&(n.options=s),St(s=Et())&&(n.optionGroups=s)}},hostAttrs:["role","combobox","aria-autocomplete","none","aria-haspopup","listbox",1,"mat-mdc-select"],hostVars:19,hostBindings:function(e,n){1&e&&Ue("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()),un("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:[Dn([{provide:UR,useExisting:i},{provide:JU,useExisting:i}]),lt],ngContentSelectors:mre,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&&(sr(pre),W(0,"div",0,1),Ue("click",function(){return n.toggle()}),W(3,"div",2),fe(4,cre,2,1,"span",3),fe(5,hre,3,2,"span",4),Y(),W(6,"div",5)(7,"div",6),ki(),W(8,"svg",7),Te(9,"path",8),Y()()()(),fe(10,fre,3,9,"ng-template",9),Ue("backdropClick",function(){return n.close()})("attach",function(){return n._onAttached()})("detach",function(){return n.close()})),2&e){const r=rr(1);At("aria-owns",n.panelOpen?n.id+"-panel":null),G(3),U("ngSwitch",n.empty),At("id",n._valueId),G(1),U("ngSwitchCase",!0),G(1),U("ngSwitchCase",!1),G(5),U("cdkConnectedOverlayPanelClass",n._overlayPanelClass)("cdkConnectedOverlayScrollStrategy",n._scrollStrategy)("cdkConnectedOverlayOrigin",n._preferredOverlayOrigin||r)("cdkConnectedOverlayOpen",n.panelOpen)("cdkConnectedOverlayPositions",n._positions)("cdkConnectedOverlayWidth",n._overlayWidth)}},dependencies:[hm,by,VT,aB,xU,zI],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:[gre.transformPanel]},changeDetection:0}),i})(),VH=(()=>{class i{}return i.\u0275fac=function(e){return new(e||i)},i.\u0275mod=nn({type:i}),i.\u0275inj=Kt({providers:[yre],imports:[Eo,Pm,tR,Qn,Xy,gC,tR,Qn]}),i})();function Cre(i,t){if(1&i&&(W(0,"mat-label"),ze(1),Y()),2&i){const e=he(3);G(1),_i(e.resource.name)}}function Sre(i,t){if(1&i&&(W(0,"mat-option",6),ze(1),Y()),2&i){const e=t.$implicit,n=he(3);U("value",e[1])("disabled",n.disabled),G(1),Zi(" ",e[1]," ")}}function Ere(i,t){if(1&i){const e=mi();W(0,"mat-form-field",3),fe(1,Cre,2,1,"mat-label",0),W(2,"mat-select",4),Ue("valueChange",function(r){return cn(e),Gt(he(2).resource.data=r)})("selectionChange",function(){return cn(e),Gt(he(2).changed.emit())}),fe(3,Sre,2,3,"mat-option",5),Y()()}if(2&i){const e=he(2);U("matTooltip",e.resourceDescription),G(1),U("ngIf",e.resource.name),G(1),U("value",e.resource.data)("disabled",e.disabled),G(1),U("ngForOf",e.resource.schema.enum_names)}}function Are(i,t){if(1&i&&(W(0,"mat-label"),ze(1),Y()),2&i){const e=he(3);G(1),_i(e.resource.name)}}function Dre(i,t){if(1&i){const e=mi();W(0,"mat-form-field",3),fe(1,Are,2,1,"mat-label",0),W(2,"input",7),Ue("ngModelChange",function(r){return cn(e),Gt(he(2).resource.data=r)})("change",function(){return cn(e),Gt(he(2).changed.emit())}),Y()()}if(2&i){const e=he(2);U("matTooltip",e.resourceDescription),G(1),U("ngIf",e.resource.name),G(1),U("min",0)("max",256*(e.resource.schema.length||1)-1)("ngModel",e.resource.data)}}function Tre(i,t){if(1&i&&(Gr(0),fe(1,Ere,4,5,"mat-form-field",1),fe(2,Dre,3,5,"ng-template",null,2,Uc),$r()),2&i){const e=rr(3),n=he();G(1),U("ngIf",n.isKnownEnumValue(n.resource.data))("ngIfElse",e)}}let Ire=(()=>{class i{constructor(){this.resource=null,this.resourceDescription="",this.disabled=!1,this.changed=new We}isKnownEnumValue(e){return!!this.resource?.schema.enum_names.find(([n,r])=>r==e)}}return i.\u0275fac=function(e){return new(e||i)},i.\u0275cmp=ot({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&&fe(0,Tre,4,2,"ng-container",0),2&e&&U("ngIf",n.resource)},dependencies:[So,vi,gl,mu,tc,_u,gu,Xc,vl,To,ic,Os,hb,Nm],changeDetection:0}),i})();const Rre=["*"],Pre=["unscopedContent"];function Ore(i,t){1&i&&Wt(0,4)}function Fre(i,t){if(1&i&&(W(0,"div",11),Te(1,"input",12),W(2,"div",13),ki(),W(3,"svg",14),Te(4,"path",15),Y(),ga(),Te(5,"div",16),Y()()),2&i){const e=he();un("mdc-checkbox--disabled",e.disabled),G(1),U("checked",e.selected)("disabled",e.disabled)}}function Lre(i,t){if(1&i&&(W(0,"div",17),Te(1,"input",18),W(2,"div",19),Te(3,"div",20)(4,"div",21),Y()()),2&i){const e=he();un("mdc-radio--disabled",e.disabled),G(1),U("checked",e.selected)("disabled",e.disabled)}}function Nre(i,t){}function Bre(i,t){if(1&i&&(W(0,"span",22),fe(1,Nre,0,0,"ng-template",23),Y()),2&i){he();const e=rr(3);G(1),U("ngTemplateOutlet",e)}}function Ure(i,t){}function Vre(i,t){if(1&i&&(W(0,"span",24),fe(1,Ure,0,0,"ng-template",23),Y()),2&i){he();const e=rr(5);G(1),U("ngTemplateOutlet",e)}}function zre(i,t){}function Hre(i,t){1&i&&fe(0,zre,0,0,"ng-template",23),2&i&&(he(),U("ngTemplateOutlet",rr(1)))}function Gre(i,t){}function $re(i,t){if(1&i&&(W(0,"span",25),fe(1,Gre,0,0,"ng-template",23),Y()),2&i){he();const e=rr(3);G(1),U("ngTemplateOutlet",e)}}function Wre(i,t){}function jre(i,t){if(1&i&&(W(0,"span",25),fe(1,Wre,0,0,"ng-template",23),Y()),2&i){he();const e=rr(5);G(1),U("ngTemplateOutlet",e)}}function Yre(i,t){}function qre(i,t){1&i&&fe(0,Yre,0,0,"ng-template",23),2&i&&(he(),U("ngTemplateOutlet",rr(1)))}const Xre=[[["","matListItemTitle",""]],[["","matListItemLine",""]],"*",[["mat-divider"]],[["","matListItemAvatar",""],["","matListItemIcon",""]]],Kre=["[matListItemTitle]","[matListItemLine]","*","mat-divider","[matListItemAvatar],[matListItemIcon]"],zH=new me("ListOption");let Zre=(()=>{class i{constructor(e){this._elementRef=e}}return i.\u0275fac=function(e){return new(e||i)(E(mt))},i.\u0275dir=ve({type:i,selectors:[["","matListItemTitle",""]],hostAttrs:[1,"mat-mdc-list-item-title","mdc-list-item__primary-text"]}),i})(),Qre=(()=>{class i{constructor(e){this._elementRef=e}}return i.\u0275fac=function(e){return new(e||i)(E(mt))},i.\u0275dir=ve({type:i,selectors:[["","matListItemLine",""]],hostAttrs:[1,"mat-mdc-list-item-line","mdc-list-item__secondary-text"]}),i})(),HH=(()=>{class i{constructor(e){this._listOption=e}_isAlignedAtStart(){return!this._listOption||"after"===this._listOption?._getTogglePosition()}}return i.\u0275fac=function(e){return new(e||i)(E(zH,8))},i.\u0275dir=ve({type:i,hostVars:4,hostBindings:function(e,n){2&e&&un("mdc-list-item__start",n._isAlignedAtStart())("mdc-list-item__end",!n._isAlignedAtStart())}}),i})(),Jre=(()=>{class i extends HH{}return i.\u0275fac=function(){let t;return function(n){return(t||(t=ri(i)))(n||i)}}(),i.\u0275dir=ve({type:i,selectors:[["","matListItemAvatar",""]],hostAttrs:[1,"mat-mdc-list-item-avatar"],features:[lt]}),i})(),ese=(()=>{class i extends HH{}return i.\u0275fac=function(){let t;return function(n){return(t||(t=ri(i)))(n||i)}}(),i.\u0275dir=ve({type:i,selectors:[["","matListItemIcon",""]],hostAttrs:[1,"mat-mdc-list-item-icon"],features:[lt]}),i})();const tse=new me("MAT_LIST_CONFIG");let KR=(()=>{class i{constructor(){this._isNonInteractive=!0,this._disableRipple=!1,this._disabled=!1,this._defaultOptions=Ot(tse,{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=ve({type:i,hostVars:1,hostBindings:function(e,n){2&e&&At("aria-disabled",n.disabled)},inputs:{disableRipple:"disableRipple",disabled:"disabled"}}),i})(),GH=(()=>{class i{set lines(e){this._explicitLines=ks(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 Zt,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(Mr(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)(E(mt),E(ft),E(KR,8),E(zi),E(eR,8),E(Rr,8))},i.\u0275dir=ve({type:i,contentQueries:function(e,n,r){if(1&e&&(Wi(r,Jre,4),Wi(r,ese,4)),2&e){let s;St(s=Et())&&(n._avatars=s),St(s=Et())&&(n._icons=s)}},hostVars:4,hostBindings:function(e,n){2&e&&(At("aria-disabled",n.disabled)("disabled",n._isButtonElement&&n.disabled||null),un("mdc-list-item--disabled",n.disabled))},inputs:{lines:"lines",disableRipple:"disableRipple",disabled:"disabled"}}),i})();const $H=new me("SelectionList");let wC=(()=>{class i extends GH{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 We,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)(E(mt),E(ft),E($H),E(zi),E(Zn),E(eR,8),E(Rr,8))},i.\u0275cmp=ot({type:i,selectors:[["mat-list-option"]],contentQueries:function(e,n,r){if(1&e&&(Wi(r,Qre,5),Wi(r,Zre,5)),2&e){let s;St(s=Et())&&(n._lines=s),St(s=Et())&&(n._titles=s)}},viewQuery:function(e,n){if(1&e&&Wn(Pre,5),2&e){let r;St(r=Et())&&(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&&Ue("blur",function(){return n._handleBlur()})("click",function(){return n._toggleOnInteraction()}),2&e&&(At("aria-selected",n.selected),un("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:[Dn([{provide:GH,useExisting:i},{provide:zH,useExisting:i}]),lt],ngContentSelectors:Kre,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&&(sr(Xre),fe(0,Ore,1,0,"ng-template",null,0,Uc),fe(2,Fre,6,4,"ng-template",null,1,Uc),fe(4,Lre,5,4,"ng-template",null,2,Uc),fe(6,Bre,2,1,"span",3),fe(7,Vre,2,1,"span",4),fe(8,Hre,1,1,"ng-template",5),W(9,"span",6),Wt(10),Wt(11,1),W(12,"span",7,8),Ue("cdkObserveContent",function(){return n._updateItemLines(!0)}),Wt(14,2),Y()(),fe(15,$re,2,1,"span",9),fe(16,jre,2,1,"span",9),fe(17,qre,1,1,"ng-template",5),Wt(18,3),Te(19,"div",10)),2&e&&(G(6),U("ngIf",n._hasCheckboxAt("before")),G(1),U("ngIf",n._hasRadioAt("before")),G(1),U("ngIf",n._hasIconsOrAvatarsAt("before")),G(7),U("ngIf",n._hasCheckboxAt("after")),G(1),U("ngIf",n._hasRadioAt("after")),G(1),U("ngIf",n._hasIconsOrAvatarsAt("after")))},dependencies:[CU,vi,xy],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 nse={provide:Do,useExisting:Gn(()=>MC),multi:!0};class ise{constructor(t,e){this.source=t,this.options=e}}let MC=(()=>{class i extends KR{get multiple(){return this._multiple}set multiple(e){const n=Jt(e);n!==this._multiple&&(this._multiple=n,this.selectedOptions=new HR(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 Re,this._onChange=r=>{},this.selectionChange=new We,this.color="accent",this.compareWith=(r,s)=>r===s,this._multiple=!0,this._hideSingleSelectionIndicator=this._defaultOptions?.hideSingleSelectionIndicator??!1,this.selectedOptions=new HR(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 ise(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(He(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()&&Xo(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 RU(this._items).withHomeAndEnd().withTypeAhead().withWrap().skipPredicate(()=>this.disabled),this._resetActiveOption(),this._keyManager.change.subscribe(e=>this._setActiveOption(e)),this._items.changes.pipe(He(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=OM();return e&&this._element.nativeElement.contains(e)}}return i.\u0275fac=function(e){return new(e||i)(E(mt),E(ft))},i.\u0275cmp=ot({type:i,selectors:[["mat-selection-list"]],contentQueries:function(e,n,r){if(1&e&&Wi(r,wC,5),2&e){let s;St(s=Et())&&(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&&Ue("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:[Dn([nse,{provide:KR,useExisting:i},{provide:$H,useExisting:i}]),lt,bi],ngContentSelectors:Rre,decls:1,vars:0,template:function(e,n){1&e&&(sr(),Wt(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})(),rse=(()=>{class i{}return i.\u0275fac=function(e){return new(e||i)},i.\u0275mod=nn({type:i}),i.\u0275inj=Kt({imports:[HI,Eo,Qn,eb,QU,RV]}),i})();function sse(i,t){if(1&i&&(W(0,"mat-label"),ze(1),Y()),2&i){const e=he(2);G(1),_i(e.resource.name)}}function ose(i,t){if(1&i&&(W(0,"mat-list-option",5),ze(1),Y()),2&i){const e=t.$implicit,n=he(2);U("value",e.key)("selected",n.resource.data[e.key])("disabled",n.disabled),G(1),Zi(" ",e.key," ")}}function ase(i,t){if(1&i){const e=mi();Gr(0,1),fe(1,sse,2,1,"mat-label",2),W(2,"mat-selection-list",3),Ue("selectionChange",function(r){return cn(e),Gt(he().onSelection(r))}),fe(3,ose,2,4,"mat-list-option",4),Dt(4,"keyvalue"),Y(),$r()}if(2&i){const e=he();U("matTooltip",e.resourceDescription),G(1),U("ngIf",e.resource.name),G(1),U("disabled",e.disabled),G(1),U("ngForOf",Lt(4,4,e.resource.data))}}let lse=(()=>{class i{constructor(){this.resource=null,this.resourceDescription="",this.disabled=!1,this.changed=new We}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=ot({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&&fe(0,ase,5,6,"ng-container",0),2&e&&U("ngIf",n.resource)},dependencies:[So,vi,To,Os,MC,wC,cB],styles:["[_nghost-%COMP%]{padding-bottom:1.34375em}"],changeDetection:0}),i})();class WH{get tick$(){return this._tick$.asObservable()}get children(){return[...this._children]}constructor(t){this.parent=t,this._tick$=new Re,this._children=[],t&&t.addChild(this)}addChild(t){if(t.parent!==this)throw new Error("Incorrect child clock");this._children.includes(t)||this._children.push(t)}removeChild(t){if(t.parent!==this)throw new Error("Incorrect child clock");this._children=this._children.filter(e=>e!==t)}dispose(){this.parent&&this.parent.removeChild(this);for(const t of this._children)t.dispose();this._tick$.complete()}}const dse=typeof performance>"u"?()=>Date.now():()=>performance.now();class jm extends WH{static get instance(){return jm._instance||(jm._instance=new jm),jm._instance}get elapsedTime(){return dse()}constructor(){super(null);let t=this.elapsedTime;const e=()=>{requestAnimationFrame(e);const n=t,r=this.elapsedTime;t=r,this._tick$.next([n,r-n])};requestAnimationFrame(e)}dispose(){throw new Error("Cannot dispose global clock")}}class jH extends WH{get isRunning(){return!!this.tickSub}get isPaused(){return-1!==this.pausedAt}get isStopped(){return-1===this.startedAt}get timeScale(){return this._timeScale}set timeScale(t){if(t!==this._timeScale||this.pausedByTimescale&&0!==t){if(0===t)return void(this.isPaused||(this.pause(),this.pausedByTimescale=!0));if(this.isPaused&&this.pausedByTimescale&&(this.resume(),this.pausedByTimescale=!1),!this.isStopped){const e=this.isPaused?this.pausedAt:this.parentClock.elapsedTime;this.startedAt=e-(e-this.startedAt)*this.timeScale/t}this._timeScale=t}}get elapsedTime(){return this.isStopped?this.lastStopElapsed:this.isPaused?this._timeScale*(this.pausedAt-this.startedAt):this._timeScale*(this.parentClock.elapsedTime-this.startedAt)}constructor(t=!1,e=jm.instance){super(e),this.parentClock=e,this.tickSub=null,this._internalTick$=new Re,this.tickRateLimit=0,this.paused$=new Re,this.startedAt=-1,this.oldRelativeTime=0,this.pausedAt=-1,this.lastStopElapsed=0,this._timeScale=1,this.pausedByTimescale=!1,this.lastFiredTickElapsed=0,t&&this.start(),this._internalTick$.pipe(et(([n,r])=>[r,r-this.lastFiredTickElapsed]),gn(([n])=>!this.tickRateLimit||Math.floor(this.lastFiredTickElapsed*this.tickRateLimit/1e3)this.lastFiredTickElapsed=n)).subscribe(this._tick$)}start(){this.isRunning||(this.oldRelativeTime=0,this.startedAt=this.parentClock.elapsedTime,this.startListeningTicks())}stop(){this.stopListeningTicks(),this.lastStopElapsed=this.elapsedTime,this.startedAt=this.pausedAt=-1}pause(){this.stopListeningTicks(),this.pausedAt=this.parentClock.elapsedTime,this.pausedByTimescale=!1,this.paused$.next(!0)}resume(){this.isRunning||-1==this.pausedAt||(this.startedAt+=this.parentClock.elapsedTime-this.pausedAt,this.pausedAt=-1,this.startListeningTicks(),this.paused$.next(!1))}startListeningTicks(){if(this.tickSub)throw new Error("Clock is already ticking!");this.tickSub=this.parentClock.tick$.pipe(et(([t,e])=>[this.oldRelativeTime,this.oldRelativeTime+e*this.timeScale]),Vi(([t,e])=>this.oldRelativeTime=e)).subscribe(this._internalTick$)}stopListeningTicks(){var t;null===(t=this.tickSub)||void 0===t||t.unsubscribe(),this.tickSub=null}dispose(){this.stopListeningTicks(),this._internalTick$.complete(),super.dispose()}}const use={transparent:!1,background:0,size:"fullscreen",antialias:!0};class hse{constructor(t,e,n={}){this.scene=t,this.canvas=e,this.entity=null,this.rendererOptions=Object.assign(Object.assign({},use),n||{})}}class fb{static fromArray(t,e=!1){const n=new fb(t[0]);let r=n;for(let s=1;sn.map(r=>new fb(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]}constructor(t){this.data=t,this.adjacent=new Set}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(d=>!e.has(d));for(const d of c)e.add(d),r.push([d,a-1])}}return n}nodes(){return Array.from(this.walkRead(-1))}}var sc=(()=>{return(i=sc||(sc={}))[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",sc;var i})();let qh=(()=>{class i{constructor(){this.tick$=new Re,this._world=null,this._name="e0x"+(i.default_name_counter++).toString(16),this._selfActive=!0,this.parent=null,this._children=[],this._components=[],this._onSpawned$=new Re,this._onRemoved$=new Re}get world(){return this._world}get name(){return this._name}set name(e){this._name=e}get active(){return this._selfActive&&(!this.parent||this.parent.active)}set active(e){this._selfActive=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 fse extends qh{constructor(t){super(),this.tickOrder=t}}function Ym(i,t=sc.CONTROLLERS,e){const n=new fse(t);return e&&(n.name=e),i.addEntity(n),n.tick$.pipe(su(()=>{i.removeEntity(n,!0)}))}class ZR extends qh{get rendererSize$(){return this._rendererSize$.asObservable()}get rendererSize(){return this._rendererSize$.getValue()}get rendererOptions(){return this.renderer.rendererOptions}get physicsDebugViewActive(){return this.renderer.physicsDebugViewActive}set physicsDebugViewActive(t){this.renderer.physicsDebugViewActive=t}constructor(t){super(),this.renderer=t,this.tickOrder=sc.RENDERING,this._rendererSize$=new vt(null),this.addComponents(t),this.tick$.subscribe(()=>{this.renderer.render()})}onSpawned(t){this._rendererSize$.next(null),"fullscreen"==this.rendererOptions.size||"function"==typeof this.rendererOptions.size?(this.renderer.canvas&&(this.renderer.canvas.style.position="absolute"),Mr(Ta(window,"resize").pipe(kM(100)),Ta(window,"orientationchange")).pipe(He(this._onRemoved$),et(()=>({x:window.innerWidth,y:window.innerHeight})),Ao({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 In||void 0!==this.rendererOptions.size.subscribe&&void 0!==this.rendererOptions.size.pipe?this.rendererOptions.size.pipe(He(this._onRemoved$)).subscribe(e=>{this._rendererSize$.next(e)}):this._rendererSize$.next(this.rendererOptions.size),this._rendererSize$.pipe(He(this._onRemoved$),Zl((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 QR=i=>{i.updateVisibility?i.updateVisibility():YH(i)},YH=i=>{for(const t of i.children)QR(t)};class pse extends qh{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(){YH(this)}addChildren(...t){super.addChildren(...t);for(const e of t)QR(e)}removeChildren(t,e=!1){if(super.removeChildren(t,e),!e)for(const n of t)QR(n)}}class JR{constructor(){this._running=!1,this.stop$=new Re}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 mse extends JR{get output$(){return this._output$.asObservable()}constructor(t,e){super(),this.keyboard=t,this.keymap=e,this._output$=new Re}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")),nu(t.map(e=>this.keyboard.bindMany(...e))).pipe(He(this.stop$),et(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 ek=new In(ms);class CC extends JR{constructor(){super(),this.bindings={},this.skipKeyDownsOnExternalFocus=!0,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 vt(!1);return this.bindings[t].push(e),e.pipe(Zl(),su(()=>{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"),ek;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 vt(!1);this.bindings[n].push(r),e.push(r)}return nu(e).pipe(su(()=>{for(let n=0;nn.includes(!0)),Zl())}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 CC.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)}}CC.externalFocusBlacklist=[HTMLInputElement,HTMLTextAreaElement,HTMLSelectElement,HTMLButtonElement];class qr{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 qr.len(qr.sub(t,e))}static norm(t){const e=qr.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 _se={pointerLock:!1};var Fs=(()=>{return(i=Fs||(Fs={}))[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",Fs;var i})();class qm extends JR{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$=Ta(this._element,"wheel",{passive:!1}).pipe(He(this.stopped$),su(()=>this._wheel$=null),Vi(t=>t.preventDefault()),et(t=>t.deltaY),Uf())),this._wheel$}get isPointerLocked(){return!!document.pointerLockElement}get isPointerLocked$(){return Ta(document,"pointerlockchange").pipe(et(()=>this.isPointerLocked))}get state(){return this._state$.getValue()}get state$(){return this._state$.asObservable()}get multiTouchPositions$(){return this._multiTouchPositions$.asObservable()}get twoTouchGestureDelta$(){return this.state$.pipe(Rs(t=>t==Fs.DRAG_TOUCH_TWO_FINGERS?this.multiTouchPositions$:ek),et(t=>t.map(e=>({x:e.x,y:e.y}))),function gse(){return ti((i,t)=>{let e,n=!1;i.subscribe(Yn(t,r=>{const s=e;e=r,n&&t.next([s,r]),n=!0}))})}(),gn(([t,e])=>t.length>1&&e.length>1),et(([t,e])=>({centerPointDelta:qr.sub(qr.scalarMult(e.reduce((n,r)=>qr.add(n,r),qr.O),1/e.length),qr.scalarMult(t.reduce((n,r)=>qr.add(n,r),qr.O),1/e.length)),angleDelta:qr.angle(e[1],e[0])-qr.angle(t[1],t[0]),distanceDelta:qr.dist(e[1],e[0])-qr.dist(t[1],t[0])})))}get _element(){return this.options.canvas||window}constructor(t={}){super(),this._wheel$=null,this._delta$=new Re,this._position$=new vt(qr.O),this._multiTouchPositions$=new vt([]),this.stopped$=new Re,this._state$=new vt(Fs.NONE),this.options=Object.assign(Object.assign({},_se),t),this.canvasClickListener=this.canvasClickListener.bind(this)}startInternal(){this.options.canvas&&(this.options.canvas.style.touchAction="none"),this._state$.next(Fs.NONE);const t=[Fs.DRAG,Fs.DRAG_MIDDLE_BUTTON,Fs.DRAG_RIGHT_BUTTON],e=[Fs.NONE,Fs.DRAG,Fs.DRAG_TOUCH_TWO_FINGERS],n=[],r={};Ta(this._element,"mousemove").pipe(He(this.stopped$)).subscribe(o=>{this._delta$.next({x:o.movementX,y:o.movementY})}),Ta(this._element,"pointermove").pipe(He(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})}),!qm.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{if(0===n.length)try{this.options.canvas&&this.options.canvas.setPointerCapture(o.pointerId),window.addEventListener("pointerup",s),this._element.addEventListener("pointercancel",s)}catch(a){console.error(a)}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]||Fs.NONE)}),Ta(this._element,"contextmenu").pipe(He(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 vse{static lookAt(t,e,n){let r=Pe.sub(t,e);r=0===Pe.lenSq(r)?Object.assign(Object.assign({},r),{z:1}):Pe.norm(r);let s=Pe.cross(n,r);0===Pe.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=Pe.norm(r),s=Pe.cross(n,r)),s=Pe.norm(s);let o=Pe.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 Yi{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,d=t.w*Math.sin((1-n)*s)/o+e.w*Math.sin(n*s)/o;return isNaN(a)||isNaN(l)||isNaN(c)||isNaN(d)?Yi.clone(t):{x:a,y:l,z:c,w:d}}static fromAngle(t,e){const n=e/2,r=Math.sin(n);return Object.assign(Object.assign({},Pe.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],d=t[10],h=e+o+d;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>d){const p=2*Math.sqrt(1+e-o-d);return{x:.25*p,y:(n+s)/p,z:(r+l)/p,w:(c-a)/p}}if(o>d){const p=2*Math.sqrt(1+o-e-d);return{x:(n+s)/p,y:.25*p,z:(a+c)/p,w:(r-l)/p}}{const p=2*Math.sqrt(1+d-e-o);return{x:(r+l)/p,y:(a+c)/p,z:.25*p,w:(s-n)/p}}}static fromMatrix3(t){const e=t[0][0]+t[1][1]+t[2][2];let n,r,s,o;if(e>0){const a=.5/Math.sqrt(e+1);n=.25/a,r=(t[2][1]-t[1][2])*a,s=(t[0][2]-t[2][0])*a,o=(t[1][0]-t[0][1])*a}else if(t[0][0]>t[1][1]&&t[0][0]>t[2][2]){const a=2*Math.sqrt(1+t[0][0]-t[1][1]-t[2][2]);n=(t[2][1]-t[1][2])/a,r=.25*a,s=(t[0][1]+t[1][0])/a,o=(t[0][2]+t[2][0])/a}else if(t[1][1]>t[2][2]){const a=2*Math.sqrt(1+t[1][1]-t[0][0]-t[2][2]);n=(t[0][2]-t[2][0])/a,r=(t[0][1]+t[1][0])/a,s=.25*a,o=(t[1][2]+t[2][1])/a}else{const a=2*Math.sqrt(1+t[2][2]-t[0][0]-t[1][1]);n=(t[1][0]-t[0][1])/a,r=(t[0][2]+t[2][0])/a,s=(t[1][2]+t[2][1])/a,o=.25*a}return{w:n,x:r,y:s,z:o}}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),d=Math.sin(.5*e);return{w:c*a*s+d*l*o,x:d*a*s-c*l*o,y:c*l*s+d*a*o,z:c*a*o-d*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=Pe.Z){return this.fromMatrix4(vse.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 Pe{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 Pe.len(Pe.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=Pe.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,Yi.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)}}}function tk(i,t,e,n){return r=>r.pipe(tI((s,o)=>{var a;return{targetValue:o,currentValue:null!==(a=s.currentValue)&&void 0!==a?a:o,hasReachedTarget:!1}},{targetValue:null,currentValue:null,hasReachedTarget:!1}),Rs(s=>i.pipe(et(([o,a])=>{if(null===s.targetValue||null===s.currentValue)return s.currentValue;if(s.hasReachedTarget)return;const l=1-Math.exp(-a/t),c=e(s.currentValue,s.targetValue,l);return s.currentValue=c,n(c,s.targetValue)?(s.hasReachedTarget=!0,s.targetValue):c}))),et(s=>void 0!==s?s:null),gn(s=>null!==s))}ps(738);class xse extends qh{get avgReport(){return this._avgReport}get peakReport(){return this._peakReport}constructor(t=60,e=15){super(),this.maxSamples=t,this.maxRows=e,this.tickOrder=Number.MAX_SAFE_INTEGER,this.sampleIndex=0,this.collectedData=new Map,this._avgReport={totalTime:0,entries:[]},this._peakReport={totalTime:0,entries:[]}}onSpawned(t){super.onSpawned(t),this.sampleIndex=0;const e=()=>(typeof performance>"u"?Date:performance).now();this.world.tickForwardTo$.pipe(He(this.onRemoved$)).subscribe(n=>{n!==this&&(this.collectedData.has(n)?this.collectedData.get(n).push([this.sampleIndex,e(),0]):this.collectedData.set(n,[[this.sampleIndex,e(),0]]))}),this.world.tickForwardedTo$.pipe(He(this.onRemoved$)).subscribe(n=>{if(n===this)return;const r=this.collectedData.get(n);r[r.length-1][2]=e()}),this.tick$.pipe(He(this.onRemoved$)).subscribe(()=>{this.sampleIndex++;const n=Array.from(this.collectedData.entries());for(const[h,p]of n){for(;p.length>0&&p[0][0]h instanceof qh?""===h.name?h.constructor.name:h.name:"PHYSICS_WORLD"===h?"Physics simulation":h,s=h=>{let p=0,m=0;for(;mh.length-m+1){m--;break}p+=h[h.length-m-1][1]}return m>1&&(h=h.slice(0,h.length-m)).push([`Rest (${m})`,p]),h};let o=0,a=Array.from(this.collectedData.entries()).map(([h,p])=>{const m=p.reduce((g,[b,v,y])=>g+y-v,0)/this.maxSamples;return o+=m,[r(h),m]}).sort((h,p)=>p[1]-h[1]);a=s(a),this._avgReport={totalTime:o,entries:a};let l=new Map,c=Array.from(this.collectedData.entries()).map(([h,p])=>{let m=0;for(const[g,b,v]of p){const y=v-b;m=Math.max(m,y),l.set(g,y+(l.get(g)||0))}return[r(h),m]}).sort((h,p)=>p[1]-h[1]);c=s(c);let d=Array.from(l.values()).reduce((h,p)=>Math.max(h,p),0);this._peakReport={totalTime:d,entries:c}})}onRemoved(){super.onRemoved(),this.collectedData=new Map,this._avgReport={totalTime:0,entries:[]},this._peakReport={totalTime:0,entries:[]}}}var Xm=function(i,t,e,n){return new(e||(e=Promise))(function(s,o){function a(d){try{c(n.next(d))}catch(h){o(h)}}function l(d){try{c(n.throw(d))}catch(h){o(h)}}function c(d){d.done?s(d.value):function r(s){return s instanceof e?s:new e(function(o){o(s)})}(d.value).then(a,l)}c((n=n.apply(i,t||[])).next())})};class yl{static get documentWorlds(){return[...yl._documentWorlds]}constructor(t,e){this.visualScene=t,this.physicsWorld=e,this.worldClock=new jH(!1),this.keyboardInput=new CC,this.name="w0x"+(yl.default_name_counter++).toString(16),this.children=[],this.tickListeners=[],this.tickStarted$=new Re,this.tickForwardTo$=new Re,this.tickForwardedTo$=new Re,this.paused$=new Re,this.disposed$=new Re,this.keyboardInput.start(),window.ggstatic?this.registerConsoleCommands(window.ggstatic):(this.onGgStaticInitialized=this.onGgStaticInitialized.bind(this),window.addEventListener("ggstatic_added",this.onGgStaticInitialized)),this.worldClock.paused$.subscribe(this.paused$),yl._documentWorlds.push(this),yl.worldCreated$.next(this)}init(){return Xm(this,void 0,void 0,function*(){yield Promise.all([this.physicsWorld.init(),this.visualScene.init()]);const t=(e,n,r)=>{e.active&&(this.tickForwardTo$.next(e),e.tick$.next([n,r]),this.tickForwardedTo$.next(e))};this.worldClock.tick$.subscribe(([e,n])=>{this.tickStarted$.next();let r=0;for(;r=sc.PHYSICS_SIMULATION);r++)t(this.tickListeners[r],e,n);for(this.tickForwardTo$.next("PHYSICS_WORLD"),this.physicsWorld.simulate(n),this.tickForwardedTo$.next("PHYSICS_WORLD");re.tickOrder-n.tickOrder),t.onSpawned(this))}removeEntity(t,e=!1){if(t.world){if(t.world!==this)throw new Error("Entity is not a part of this world");this.children.splice(this.children.findIndex(n=>n===t),1),this.tickListeners.splice(this.tickListeners.findIndex(n=>n===t),1),t.onRemoved()}e&&t.dispose()}onGgStaticInitialized(){window.removeEventListener("ggstatic_added",this.onGgStaticInitialized),this.registerConsoleCommands(window.ggstatic)}registerConsoleCommands(t){t.registerConsoleCommand(this,"timescale",(...e)=>Xm(this,void 0,void 0,function*(){return isNaN(+e[0])||(this.worldClock.timeScale=+e[0]),this.worldClock.timeScale.toString()}),"args: [ float? ]; Get current time scale of selected world clock or set it. Default value is 1.0 (no time scale applied)"),t.registerConsoleCommand(this,"fps_limit",(...e)=>Xm(this,void 0,void 0,function*(){return isNaN(+e[0])||(this.worldClock.tickRateLimit=+e[0]),this.worldClock.tickRateLimit.toString()}),"args: [ int? ]; Get current tick rate limit of selected world clock or set it. 0 means no limit applied"),t.registerConsoleCommand(this,"renderers",()=>Xm(this,void 0,void 0,function*(){return this.children.filter(e=>e instanceof ZR).map(e=>e.name).join("\n")}),"no args; Print all renderers in selected world"),t.registerConsoleCommand(this,"debug_view",(...e)=>Xm(this,void 0,void 0,function*(){let r,n="toggle";for(let o of e)["1","0"].includes(o)?n="1"===o:r=o;let s=this.children.find(o=>o instanceof ZR&&(!r||o.name===r));if(s)return s.physicsDebugViewActive="toggle"===n?!s.physicsDebugViewActive:n,s.physicsDebugViewActive?"1":"0";throw r?new Error(`Renderer with name "${r}" not found`):new Error("No renderer found")}),'args: [ 0|1?, string? ]; Turn on/off physics debug view, skip first argument to toggle value. Second argument expects renderer name, if not provided first renderer will be picked. Use "renderers" to get list of renderers in the world'),t.registerConsoleCommand(this,"performance",(...e)=>Xm(this,void 0,void 0,function*(){let n="avg",r=20;for(let d of e)["avg","peak"].includes(d)?n=d:isNaN(+d)||(r=+d);const s=new xse(r,250);this.addEntity(s),yield function yse(i,t){const e="object"==typeof t;return new Promise((n,r)=>{let o,s=!1;i.subscribe({next:a=>{o=a,s=!0},error:r,complete:()=>{s?n(o):e?n(t.defaultValue):r(new fm)}})})}(this.worldClock.tick$.pipe(Oi(r)));const o="avg"===n?s.avgReport:s.peakReport;this.removeEntity(s);const a=o.entries.map(([d,h])=>`${d}:`+new Array(Math.max(0,26-d.length)).join(" ")+`${h.toFixed(2)} ms`+("avg"===n?` (${(100*h/o.totalTime).toFixed(2)}%)`:""));let l="lightgreen";o.totalTime>12&&(l=o.totalTime<16?"yellow":"red");const c=("avg"===n?"Average":"Peak")+" Frame time";return a.unshift(c+":"+new Array(Math.max(0,26-c.length)).join(" ")+`${o.totalTime.toFixed(2)} ms`),a.unshift(`Performance report (${r} samples)`),a.join("\n")}),'args: [ int?, avg|peak? ]; Measure how much time was spent per entity in world. Arguments are samples amount (20 by default) and "peak" or "avg" choice, both arguments are optional. "avg" report sorts entities by average time consumed, "peak" records highest value for each entity')}}yl.default_name_counter=0,yl._documentWorlds=[],yl.worldCreated$=new Re;class Sse extends hse{}class XH extends pse{constructor(){super(...arguments),this._world=null}get world(){return this._world}}class Zo extends XH{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}constructor(t){super(),this.tickOrder=sc.OBJECTS_BINDING,this._position=Pe.O,this._rotation=Yi.O,this.object3D=null,this.objectBody=null,t.objectBody&&(this.objectBody=t.objectBody,this.name=this.objectBody.name,this.addComponents(this.objectBody)),t.object3D&&(this.object3D=t.object3D,t.objectBody||(this._position=this.object3D.position,this._rotation=this.object3D.rotation,this.name=this.object3D.name),this.addComponents(this.object3D)),this.objectBody&&(this.tick$.subscribe(()=>{this.runTransformBinding(this.objectBody,this.object3D)}),this.runTransformBinding(this.objectBody,this.object3D))}}class Km extends fb{static fromMapArray(t,e=!1){const n=new Km(t[0]);let r=n;for(let s=1;sn.map(r=>new Km(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));othis.mapGraph.getNearestDummy(this.mapGraphNodes,this.loaderCursor$.getValue())),Zl(),Vi(r=>this._nearestDummy$.next(r))).subscribe(r=>{let o,s=new Set;if(this.options.inertia>0){o=new Set;const a=r.walkReadPreserveDepth(this.options.loadDepth+this.options.inertia);for(let l=0;lo.add(c.data)),l<=this.options.loadDepth&&a[l].forEach(c=>s.add(c.data))}else r.walkRead(this.options.loadDepth).forEach(a=>s.add(a.data)),o=s;for(const a of this.loaded.keys())o.has(a)?s.delete(a):n.includes(a)||n.push(a);for(let a of Array.from(s.keys()))e.includes(a)||e.push(a)}),this.tick$.pipe(Ao(null),He(this._onRemoved$)).subscribe(()=>{if(n.length){for(const r of n)this.disposeChunk(r);n=[]}if(e.length)if(this._initialLoadComplete$.value&&e.length>this.options.maxNodesLoadingPerTick){let r=e.slice(0,this.options.maxNodesLoadingPerTick);e=e.slice(this.options.maxNodesLoadingPerTick),Promise.all(r.map(s=>this.loadChunk(s))).then()}else Promise.all(e.map(r=>this.loadChunk(r))).then(()=>{this._initialLoadComplete$.value||this._initialLoadComplete$.next(!0)}),e=[]})}onRemoved(){super.onRemoved(),this.loadClock&&(this.loadClock.stop(),this.loadClock=null),this.loaderCursor$.next(Pe.O)}loadChunk(t){return function(i,t,e,n){return new(e||(e=Promise))(function(s,o){function a(d){try{c(n.next(d))}catch(h){o(h)}}function l(d){try{c(n.throw(d))}catch(h){o(h)}}function c(d){d.done?s(d.value):function r(s){return s instanceof e?s:new e(function(o){o(s)})}(d.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||Yi.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||Yi.O}]),[n,e]})}disposeChunk(t){this.loaded.has(t)&&(this.removeChildren(this.loaded.get(t),!0),this.loaded.delete(t))}}class Dse extends ZR{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 e4=function(i,t,e,n){return new(e||(e=Promise))(function(s,o){function a(d){try{c(n.next(d))}catch(h){o(h)}}function l(d){try{c(n.throw(d))}catch(h){o(h)}}function c(d){d.done?s(d.value):function r(s){return s instanceof e?s:new e(function(o){o(s)})}(d.value).then(a,l)}c((n=n.apply(i,t||[])).next())})};const t4={keymap:"wasd",cameraLinearSpeed:20,cameraMovementElasticity:0,cameraBoostMultiplier:2.5,cameraRotationSensitivity:1,cameraRotationElasticity:0,mouseOptions:{},ignoreMouseUnlessPointerLocked:!1,ignoreKeyboardUnlessPointerLocked:!1};class n4 extends qh{get active(){return super.active}set active(t){!super.active&&t&&this.reset(),super.active=t}get spherical(){return this._spherical}set spherical(t){this._spherical.phi=Math.max(1e-6,Math.min(Math.PI-1e-6,t.phi)),this._spherical.theta=t.theta,this.resetMotion$.next()}constructor(t,e,n={}){super(),this.keyboard=t,this.camera=e,this.tickOrder=sc.INPUT_CONTROLLERS,this._spherical={phi:0,radius:1,theta:0},this.resetMotion$=new Re,this.options=Object.assign(Object.assign({},t4),n),n.mouseOptions&&(this.options.mouseOptions=Object.assign(Object.assign({},t4.mouseOptions),n.mouseOptions)),this.mouseInput=new qm(this.options.mouseOptions),this.directionsInput=new mse(t,this.options.keymap)}reset(){this._spherical=Pe.toSpherical(Pe.rot({x:0,y:0,z:-1},this.camera.rotation)),this.resetMotion$.next()}onSpawned(t){const e=Object.create(null,{onSpawned:{get:()=>super.onSpawned}});return e4(this,void 0,void 0,function*(){yield e.onSpawned.call(this,t),this._spherical=Pe.toSpherical(Pe.rot({x:0,y:0,z:-1},this.camera.rotation));const n=["KeyE","KeyQ"];this.camera.camera.supportsFov&&n.push("KeyZ","KeyC"),n.push("ShiftLeft");let r=nu([this.directionsInput.output$,...n.map(c=>this.keyboard.bind(c))]).pipe(He(this._onRemoved$),et(([c,...d])=>{let h={direction:{},rest:[]};(!this.options.ignoreKeyboardUnlessPointerLocked||this.mouseInput.isPointerLocked)&&(h={direction:c,rest:d});let p=Object.assign({},Pe.O);const[m,g,b,v,y]=h.rest;void 0!==h.direction.upDown&&(p.z=h.direction.upDown?-1:1),void 0!==h.direction.leftRight&&(p.x=h.direction.leftRight?-1:1),m!=g&&(p.y=g?-1:1);let M=0;return b!=v&&(M=b?1:-1),p=Pe.norm(p),y&&(p=Pe.scalarMult(p,this.options.cameraBoostMultiplier)),[p,M]}));this.options.cameraMovementElasticity>0&&(r=r.pipe(tk(this.camera.tick$,this.options.cameraMovementElasticity,([c,d],[h,p],m)=>[Pe.lerp(c,h,m),p],([c,d],[h,p])=>d==p&&Pe.dist(c,h)<.001)));let s=Pe.O,o=0;r.subscribe(([c,d])=>{s=c,o=d});let a=qm.isTouchDevice(),l=this.mouseInput.delta$.pipe(He(this._onRemoved$),gn(()=>this.active&&(a||!this.options.ignoreMouseUnlessPointerLocked||this.mouseInput.isPointerLocked)));if(this.options.cameraRotationElasticity>0){const c=new vt(this._spherical);l.subscribe(h=>{const p=c.getValue();c.next({phi:Math.max(1e-6,Math.min(Math.PI-1e-6,p.phi+h.y*this.options.cameraRotationSensitivity/1e3)),theta:p.theta-h.x*this.options.cameraRotationSensitivity/1e3,radius:1})});const d=()=>{c.pipe(He(this._onRemoved$),tk(this.tick$,this.options.cameraRotationElasticity,(h,p,m)=>({phi:h.phi+m*(p.phi-h.phi),theta:h.theta+m*(p.theta-h.theta),radius:1}),(h,p)=>qr.dist({x:h.phi,y:h.theta},{x:p.phi,y:p.theta})<1e-4),He(this.resetMotion$)).subscribe(h=>{this._spherical.theta=h.theta,this._spherical.phi=h.phi})};this.resetMotion$.pipe(He(this._onRemoved$)).subscribe(()=>{c.next(this._spherical),d()}),d()}else l.subscribe(c=>{this._spherical.theta-=c.x*this.options.cameraRotationSensitivity/1e3,this._spherical.phi+=c.y*this.options.cameraRotationSensitivity/1e3,this._spherical.phi=Math.max(1e-6,Math.min(Math.PI-1e-6,this._spherical.phi))});this.camera.tick$.pipe(He(this._onRemoved$),gn(()=>this.active)).subscribe(([c,d])=>{this.camera.camera.fov+=o,this.camera.position=Pe.add(this.camera.position,Pe.rot(Pe.scalarMult(s,this.options.cameraLinearSpeed*d/1e3),this.camera.rotation)),this.camera.rotation=Yi.lookAt(this.camera.position,Pe.add(this.camera.position,Pe.fromSpherical(this._spherical)))}),this.mouseInput.start(),this.directionsInput.start()})}onRemoved(){const t=Object.create(null,{onRemoved:{get:()=>super.onRemoved}});return e4(this,void 0,void 0,function*(){yield t.onRemoved.call(this),yield this.mouseInput.stop(!0),yield this.directionsInput.stop()})}}var i4=function(i,t,e,n){return new(e||(e=Promise))(function(s,o){function a(d){try{c(n.next(d))}catch(h){o(h)}}function l(d){try{c(n.throw(d))}catch(h){o(h)}}function c(d){d.done?s(d.value):function r(s){return s instanceof e?s:new e(function(o){o(s)})}(d.value).then(a,l)}c((n=n.apply(i,t||[])).next())})};const Ise={mouseOptions:{},orbiting:{sensitivityX:1,sensitivityY:1},orbitingElasticity:0,zooming:{sensitivity:1},panning:{sensitivityX:1,sensitivityY:1},dollying:{sensitivity:1}};class Rse extends qh{get active(){return super.active}set active(t){!super.active&&t&&this.reset(),super.active=t}get spherical(){return this._spherical}set spherical(t){this._spherical.phi=Math.max(1e-6,Math.min(Math.PI-1e-6,t.phi)),this._spherical.theta=t.theta,this._spherical.radius=t.radius,this.resetMotion$.next()}constructor(t,e={}){super(),this.camera=t,this.tickOrder=sc.INPUT_CONTROLLERS,this._spherical={phi:0,radius:10,theta:0},this.target=Pe.O,this.resetMotion$=new Re,this.options=Object.assign(Object.assign({},Ise),e),this.mouseInput=new qm(this.options.mouseOptions)}reset(){let t=Pe.dist(this.target,this.camera.position);this.target=Pe.add(this.camera.position,Pe.rot({x:0,y:0,z:-t},this.camera.rotation)),this._spherical=Pe.toSpherical(Pe.sub(this.camera.position,this.target)),this.resetMotion$.next()}onSpawned(t){const e=Object.create(null,{onSpawned:{get:()=>super.onSpawned}});return i4(this,void 0,void 0,function*(){if(yield e.onSpawned.call(this,t),this._spherical=Pe.toSpherical(Pe.sub(this.camera.position,this.target)),this.options.orbiting){let r=this.mouseInput.delta$.pipe(He(this._onRemoved$),gn(()=>this.active&&this.mouseInput.state==Fs.DRAG));if(this.options.orbitingElasticity>0){const s=new vt(this._spherical);r.subscribe(a=>{const l=s.getValue();s.next({phi:Math.max(1e-6,Math.min(Math.PI-1e-6,l.phi-a.y*this.options.orbiting.sensitivityY/1e3)),theta:l.theta-a.x*this.options.orbiting.sensitivityX/1e3,radius:1})});const o=()=>{s.pipe(He(this._onRemoved$),tk(this.tick$,this.options.orbitingElasticity,(a,l,c)=>({phi:a.phi+c*(l.phi-a.phi),theta:a.theta+c*(l.theta-a.theta),radius:1}),(a,l)=>qr.dist({x:a.phi,y:a.theta},{x:l.phi,y:l.theta})<1e-4),He(this.resetMotion$)).subscribe(a=>{this._spherical.theta=a.theta,this._spherical.phi=a.phi})};this.resetMotion$.pipe(He(this._onRemoved$)).subscribe(()=>{s.next(this._spherical),o()}),o()}else r.subscribe(s=>{this._spherical.theta-=s.x*this.options.orbiting.sensitivityX/1e3,this._spherical.phi-=s.y*this.options.orbiting.sensitivityY/1e3,this._spherical.phi=Math.max(1e-6,Math.min(Math.PI-1e-6,this._spherical.phi))})}this.options.zooming&&this.mouseInput.wheel$.pipe(He(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=Pe.fromSpherical(this._spherical),o=Pe.rotAround(s,{x:-Math.sin(this._spherical.theta),y:Math.cos(this._spherical.theta),z:0},Math.PI/2),a=Pe.rotAround(s,Pe.norm(o),Math.PI/2);this.target=Pe.add(this.target,Pe.add(Pe.scalarMult(o,-this.options.panning.sensitivityY*r.y/1e3),Pe.scalarMult(a,this.options.panning.sensitivityX*r.x/1e3)))};this.options.panning&&this.mouseInput.delta$.pipe(He(this._onRemoved$),gn(()=>this.mouseInput.state==Fs.DRAG_RIGHT_BUTTON)).subscribe(r=>{n(r)}),this.options.dollying&&this.mouseInput.delta$.pipe(He(this._onRemoved$),gn(()=>this.mouseInput.state==Fs.DRAG_MIDDLE_BUTTON)).subscribe(r=>{this._spherical.radius*=Math.pow(.95,-this.options.dollying.sensitivity*r.y/10)}),qm.isTouchDevice()&&(this.options.dollying||this.options.panning)&&this.mouseInput.twoTouchGestureDelta$.pipe(He(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(He(this._onRemoved$),gn(()=>this.active),et(()=>this._spherical)).subscribe(r=>{this.camera.position=Pe.add(this.target,Pe.fromSpherical(r)),this.camera.rotation=Yi.lookAt(this.camera.position,this.target)}),yield this.mouseInput.start()})}onRemoved(){const t=Object.create(null,{onRemoved:{get:()=>super.onRemoved}});return i4(this,void 0,void 0,function*(){yield t.onRemoved.call(this),yield this.mouseInput.stop(!0)})}}class Pse{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 rk=function(i,t,e,n){return new(e||(e=Promise))(function(s,o){function a(d){try{c(n.next(d))}catch(h){o(h)}}function l(d){try{c(n.throw(d))}catch(h){o(h)}}function c(d){d.done?s(d.value):function r(s){return s instanceof e?s:new e(function(o){o(s)})}(d.value).then(a,l)}c((n=n.apply(i,t||[])).next())})},yu=(()=>{return(i=yu||(yu={}))[i.Nothing=0]="Nothing",i[i.Files=1]="Files",i[i.Entities=2]="Entities",yu;var i})();const r4={cachingStrategy:yu.Nothing,position:Pe.O,rotation:Yi.O,loadProps:!0},s4=i=>({meta:i.meta,resources:i.resources.map(({object3D:t,body:e})=>({object3D:t&&t.clone(),body:e&&e.clone()}))});class Ose{constructor(t){this.world=t,this.filesCache=new Map,this.loadResultCache=new Map}loadGgGlbFiles(t){return rk(this,arguments,void 0,function*(e,n=!1){if(n&&this.filesCache.has(e))return this.filesCache.get(e);const r=Promise.all([fetch(`${e}.glb`).then(o=>o.arrayBuffer()),fetch(`${e}.meta`).then(o=>o.text()).then(o=>JSON.parse(o))]);n&&this.filesCache.set(e,r);const s=yield r;return n&&this.filesCache.set(e,s),s})}loadGgGlbResources(t){return rk(this,arguments,void 0,function*(e,n=yu.Nothing){if(n==yu.Entities&&this.loadResultCache.has(e)){const c=this.loadResultCache.get(e),d=c instanceof Promise?yield c:c;return s4(d)}const[r,s]=yield this.loadGgGlbFiles(e,n==yu.Files);if(!r)throw new Error("GLB not found");const[o,a]=yield Promise.all([this.world.visualScene.loader.loadFromGgGlb(r,s),this.world.physicsWorld.loader.loadFromGgGlb(r,s)]),l={resources:[],meta:s};if(!o)return l;if(0==a.length)l.resources.push({object3D:o,body:null});else if(1==a.length)l.resources.push({object3D:o,body:a[0]});else{for(const c of a)l.resources.push({object3D:o.popChild(c.name),body:c});o.isEmpty()||l.resources.push({object3D:o,body:null})}return n==yu.Entities&&this.loadResultCache.set(e,s4(l)),l})}loadGgGlb(t){return rk(this,arguments,void 0,function*(e,n=r4){const r=Object.assign(Object.assign({},r4),n),{resources:s,meta:o}=yield this.loadGgGlbResources(e,r.cachingStrategy),a={entities:s.map(l=>new Zo({object3D:l.object3D,objectBody:l.body})),meta:o};return r.loadProps&&(a.props=yield Promise.all(o.dummies.filter(l=>l.is_prop||l.is_scene).map(l=>this.loadGgGlb(l.is_prop?(r.propsPath||e.substring(0,e.lastIndexOf("/")+1))+l.prop_id:l.scene_id,{loadProps:!!l.is_scene,position:Pe.add(Pe.rot(l.position,r.rotation),r.position),rotation:Yi.combineRotations(l.rotation,r.rotation)})))),a.entities.forEach(l=>{l.position=Pe.add(Pe.rot(Pe.clone(l.position),r.rotation),r.position),l.rotation=Yi.mult(Yi.clone(l.rotation),r.rotation)}),a})}}class sk extends yl{constructor(t,e){super(t,e),this.visualScene=t,this.physicsWorld=e,this.loader=new Ose(this)}addPrimitiveRigidBody(t,e=Pe.O,n=Yi.O,r={}){const s=new Zo({object3D:this.visualScene.factory.createPrimitive(t.shape,r),objectBody:this.physicsWorld.factory.createRigidBody(t)});return s.position=e,s.rotation=n,this.addEntity(s),s}addRenderer(t,e,n){const r=new Dse(this.visualScene.createRenderer(t,e,n));return this.addEntity(r),r}registerConsoleCommands(t){super.registerConsoleCommands(t),t.registerConsoleCommand(this,"gravity",(...e)=>function(i,t,e,n){return new(e||(e=Promise))(function(s,o){function a(d){try{c(n.next(d))}catch(h){o(h)}}function l(d){try{c(n.throw(d))}catch(h){o(h)}}function c(d){d.done?s(d.value):function r(s){return s instanceof e?s:new e(function(o){o(s)})}(d.value).then(a,l)}c((n=n.apply(i,t||[])).next())})}(this,void 0,void 0,function*(){if(1==e.length&&(e=["0","0",""+-+e[0]]),e.length>0){if(isNaN(+e[0])||isNaN(+e[1])||isNaN(+e[2]))throw new Error("Wrong arguments");this.physicsWorld.gravity={x:+e[0],y:+e[1],z:+e[2]}}return JSON.stringify(this.physicsWorld.gravity)}),'args: [ ?float, ?float, ?float ]; Get or set 3D world gravity vector. 1 argument sets vector {x: 0, y: 0, z: -value}, 3 arguments set the whole vector. Default value is "9.82" or "0 0 -9.82"')}}function o4(i,t=$y,e){const n=OI(i,t);return function Lse(i,t){return ti((e,n)=>{const{leading:r=!0,trailing:s=!1}=t??{};let o=!1,a=null,l=null,c=!1;const d=()=>{l?.unsubscribe(),l=null,s&&(m(),c&&n.complete())},h=()=>{l=null,c&&n.complete()},p=g=>l=wr(i(g)).subscribe(Yn(n,d,h)),m=()=>{if(o){o=!1;const g=a;a=null,n.next(g),!c&&p(g)}};e.subscribe(Yn(n,g=>{o=!0,a=g,(!l||l.closed)&&(r?m():p(g))},()=>{c=!0,(!(s&&o&&l)||l.closed)&&n.complete()}))})}(()=>n,e)}window.gg_version="0.0.56";const Nse=0,a4=1,Bse=2,l4=1,c4=2,Kc=3,ac=0,Io=1,Ls=2,Zc=0,Zm=1,d4=2,u4=3,h4=4,Use=5,Xh=100,Vse=101,zse=102,Hse=103,Gse=104,$se=200,Wse=201,jse=202,Yse=203,ak=204,lk=205,qse=206,Xse=207,Kse=208,Zse=209,Qse=210,Jse=211,eoe=212,toe=213,noe=214,ioe=0,roe=1,soe=2,SC=3,ooe=4,aoe=5,loe=6,coe=7,EC=0,doe=1,uoe=2,bu=0,hoe=1,foe=2,poe=3,moe=4,goe=5,_oe=6,voe=7,f4="attached",Qc=301,Kh=302,AC=303,DC=304,pb=306,Pa=1e3,Ii=1001,mb=1002,_r=1003,dk=1004,Qm=1005,lr=1006,gb=1007,bl=1008,Jc=1009,p4=1010,m4=1011,_b=1012,uk=1013,xu=1014,Qo=1015,Jm=1016,hk=1017,fk=1018,eg=1020,g4=35902,_4=1021,v4=1022,Ro=1023,y4=1024,b4=1025,tg=1026,ng=1027,pk=1028,TC=1029,x4=1030,mk=1031,gk=1033,IC=33776,RC=33777,kC=33778,PC=33779,_k=35840,vk=35841,yk=35842,bk=35843,xk=36196,wk=37492,Mk=37496,Ck=37808,Sk=37809,Ek=37810,Ak=37811,Dk=37812,Tk=37813,Ik=37814,Rk=37815,kk=37816,Pk=37817,Ok=37818,Fk=37819,Lk=37820,Nk=37821,OC=36492,Bk=36494,Uk=36495,w4=36283,Vk=36284,zk=36285,Hk=36286,vb=2300,yb=2301,Moe=0,C4=1,Wk=2,Soe=3201,Zh=0,Eoe=1,wu="",cs="srgb",ds="srgb-linear",jk="display-p3",LC="display-p3-linear",NC="linear",Fi="srgb",BC="rec709",UC="p3",sg=7680,Aoe=512,Doe=513,Toe=514,E4=515,Ioe=516,Roe=517,koe=518,Poe=519,A4="300 es",ed=2e3;class og{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]+Ns[i>>16&255]+Ns[i>>24&255]+"-"+Ns[255&t]+Ns[t>>8&255]+"-"+Ns[t>>16&15|64]+Ns[t>>24&255]+"-"+Ns[63&e|128]+Ns[e>>8&255]+"-"+Ns[e>>16&255]+Ns[e>>24&255]+Ns[255&n]+Ns[n>>8&255]+Ns[n>>16&255]+Ns[n>>24&255]).toLowerCase()}function Ji(i,t,e){return Math.max(t,Math.min(e,i))}function Yk(i,t){return(i%t+t)%t}function bb(i,t,e){return(1-e)*i+e*t}function lo(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 yn(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 Koe_radToDeg=function Woe(i){return i*ag};class xe{constructor(t=0,e=0){xe.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 wn{constructor(t,e,n,r,s,o,a,l,c){wn.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 d=this.elements;return d[0]=t,d[1]=r,d[2]=a,d[3]=e,d[4]=s,d[5]=l,d[6]=n,d[7]=o,d[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],d=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],F=r[2],D=r[5],k=r[8];return s[0]=o*b+a*M+l*F,s[3]=o*v+a*x+l*D,s[6]=o*y+a*C+l*k,s[1]=c*b+d*M+h*F,s[4]=c*v+d*x+h*D,s[7]=c*y+d*C+h*k,s[2]=p*b+m*M+g*F,s[5]=p*v+m*x+g*D,s[8]=p*y+m*C+g*k,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],d=t[8];return e*o*d-e*a*c-n*s*d+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],d=t[8],h=d*o-a*c,p=a*l-d*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-d*n)*b,t[2]=(a*n-r*o)*b,t[3]=p*b,t[4]=(d*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(qk.makeScale(t,e)),this}rotate(t){return this.premultiply(qk.makeRotation(-t)),this}translate(t,e){return this.premultiply(qk.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 qk=new wn;function T4(i){for(let t=i.length-1;t>=0;--t)if(i[t]>=65535)return!0;return!1}function xb(i){return document.createElementNS("http://www.w3.org/1999/xhtml",i)}function Qoe(){const i=xb("canvas");return i.style.display="block",i}Int8Array,Uint8Array,Uint8ClampedArray,Int16Array,Uint16Array,Int32Array,Uint32Array,Float32Array,Float64Array;const I4={};function cg(i){i in I4||(I4[i]=!0,console.warn(i))}const R4=(new wn).set(.8224621,.177538,0,.0331941,.9668058,0,.0170827,.0723974,.9105199),k4=(new wn).set(1.2249401,-.2249404,0,-.0420569,1.0420571,0,-.0196376,-.0786361,1.0982735),wb={[ds]:{transfer:NC,primaries:BC,luminanceCoefficients:[.2126,.7152,.0722],toReference:i=>i,fromReference:i=>i},[cs]:{transfer:Fi,primaries:BC,luminanceCoefficients:[.2126,.7152,.0722],toReference:i=>i.convertSRGBToLinear(),fromReference:i=>i.convertLinearToSRGB()},[LC]:{transfer:NC,primaries:UC,luminanceCoefficients:[.2289,.6917,.0793],toReference:i=>i.applyMatrix3(k4),fromReference:i=>i.applyMatrix3(R4)},[jk]:{transfer:Fi,primaries:UC,luminanceCoefficients:[.2289,.6917,.0793],toReference:i=>i.convertSRGBToLinear().applyMatrix3(k4),fromReference:i=>i.applyMatrix3(R4).convertLinearToSRGB()}},eae=new Set([ds,LC]),Jn={enabled:!0,_workingColorSpace:ds,get workingColorSpace(){return this._workingColorSpace},set workingColorSpace(i){if(!eae.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,wb[e].fromReference)((0,wb[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 wb[i].primaries},getTransfer:function(i){return i===wu?NC:wb[i].transfer},getLuminanceCoefficients:function(i,t=this._workingColorSpace){return i.fromArray(wb[t].luminanceCoefficients)}};function dg(i){return i<.04045?.0773993808*i:Math.pow(.9478672986*i+.0521327014,2.4)}function Xk(i){return i<.0031308?12.92*i:1.055*Math.pow(i,.41666)-.055}let ug;class tae{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===ug&&(ug=xb("canvas")),ug.width=t.width,ug.height=t.height;const n=ug.getContext("2d");t instanceof ImageData?n.putImageData(t,0,0):n.drawImage(t,0,0,t.width,t.height),e=ug}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=xb("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 og{constructor(e=i.DEFAULT_IMAGE,n=i.DEFAULT_MAPPING,r=Ii,s=Ii,o=lr,a=bl,l=Ro,c=Jc,d=i.DEFAULT_ANISOTROPY,h=wu){super(),this.isTexture=!0,Object.defineProperty(this,"id",{value:iae++}),this.uuid=Jo(),this.name="",this.source=new hg(e),this.mipmaps=[],this.mapping=n,this.channel=0,this.wrapS=r,this.wrapT=s,this.magFilter=o,this.minFilter=a,this.anisotropy=d,this.format=l,this.internalFormat=null,this.type=c,this.offset=new xe(0,0),this.repeat=new xe(1,1),this.center=new xe(0,0),this.rotation=0,this.matrixAutoUpdate=!0,this.matrix=new wn,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 Pa:e.x=e.x-Math.floor(e.x);break;case Ii:e.x=e.x<0?0:1;break;case mb: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 Pa:e.y=e.y-Math.floor(e.y);break;case Ii:e.y=e.y<0?0:1;break;case mb: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 gi{constructor(t=0,e=0,n=0,r=1){gi.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],d=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(d-p)<.01&&Math.abs(h-b)<.01&&Math.abs(g-v)<.01){if(Math.abs(d+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,F=(y+1)/2,D=(d+p)/4,k=(h+b)/4,B=(g+v)/4;return x>C&&x>F?x<.01?(n=0,r=.707106781,s=.707106781):(n=Math.sqrt(x),r=D/n,s=k/n):C>F?C<.01?(n=.707106781,r=0,s=.707106781):(r=Math.sqrt(C),n=D/r,s=B/r):F<.01?(n=.707106781,r=.707106781,s=0):(s=Math.sqrt(F),n=k/s,r=B/s),this.set(n,r,s,e),this}let M=Math.sqrt((v-g)*(v-g)+(h-b)*(h-b)+(p-d)*(p-d));return Math.abs(M)<.001&&(M=1),this.x=(v-g)/M,this.y=(h-b)/M,this.z=(p-d)/M,this.w=Math.acos((c+m+y-1)/2),this}setFromMatrixPosition(t){const e=t.elements;return this.x=e[12],this.y=e[13],this.z=e[14],this.w=e[15],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 rae extends og{constructor(t=1,e=1,n={}){super(),this.isRenderTarget=!0,this.width=t,this.height=e,this.depth=1,this.scissor=new gi(0,0,t,e),this.scissorTest=!1,this.viewport=new gi(0,0,t,e);const r={width:t,height:e,depth:1};n=Object.assign({generateMipmaps:!1,internalFormat:null,minFilter:lr,depthBuffer:!0,stencilBuffer:!1,resolveDepthBuffer:!0,resolveStencilBuffer:!0,depthTexture:null,samples:0,count:1},n);const s=new ko(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 F=Math.sqrt(x),D=Math.atan2(F,y*M);v=Math.sin(v*D)/F,a=Math.sin(a*D)/F}const C=a*M;if(l=l*v+p*C,c=c*v+m*C,d=d*v+g*C,h=h*v+b*C,v===1-a){const F=1/Math.sqrt(l*l+c*c+d*d+h*h);l*=F,c*=F,d*=F,h*=F}}t[e]=l,t[e+1]=c,t[e+2]=d,t[e+3]=h}static multiplyQuaternionsFlat(t,e,n,r,s,o){const a=n[r],l=n[r+1],c=n[r+2],d=n[r+3],h=s[o],p=s[o+1],m=s[o+2],g=s[o+3];return t[e]=a*g+d*h+l*m-c*p,t[e+1]=l*g+d*p+c*h-a*m,t[e+2]=c*g+d*m+a*p-l*h,t[e+3]=d*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),d=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*d*h+c*m*g,this._y=c*m*h-p*d*g,this._z=c*d*g+p*m*h,this._w=c*d*h-p*m*g;break;case"YXZ":this._x=p*d*h+c*m*g,this._y=c*m*h-p*d*g,this._z=c*d*g-p*m*h,this._w=c*d*h+p*m*g;break;case"ZXY":this._x=p*d*h-c*m*g,this._y=c*m*h+p*d*g,this._z=c*d*g+p*m*h,this._w=c*d*h-p*m*g;break;case"ZYX":this._x=p*d*h-c*m*g,this._y=c*m*h+p*d*g,this._z=c*d*g-p*m*h,this._w=c*d*h+p*m*g;break;case"YZX":this._x=p*d*h+c*m*g,this._y=c*m*h+p*d*g,this._z=c*d*g-p*m*h,this._w=c*d*h-p*m*g;break;case"XZY":this._x=p*d*h-c*m*g,this._y=c*m*h-p*d*g,this._z=c*d*g+p*m*h,this._w=c*d*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],d=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=(d-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=(d-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+d)/m}else{const m=2*Math.sqrt(1+h-n-a);this._w=(o-r)/m,this._x=(s+c)/m,this._y=(l+d)/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,d=e._w;return this._x=n*d+o*a+r*c-s*l,this._y=r*d+o*l+s*a-n*c,this._z=s*d+o*c+n*l-r*a,this._w=o*d-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),d=Math.atan2(c,a),h=Math.sin((1-e)*d)/c,p=Math.sin(e*d)/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 O{constructor(t=0,e=0,n=0){O.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(O4.setFromEuler(t))}applyAxisAngle(t,e){return this.applyQuaternion(O4.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),d=2*(a*e-s*r),h=2*(s*n-o*e);return this.x=e+l*c+o*h-a*d,this.y=n+l*d+a*c-s*h,this.z=r+l*h+s*d-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 Qk.copy(this).projectOnVector(t),this.sub(Qk)}reflect(t){return this.sub(Qk.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 Qk=new O,O4=new co;class Bs{constructor(t=new O(1/0,1/0,1/0),e=new O(-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;e=this.min.x&&t.x<=this.max.x&&t.y>=this.min.y&&t.y<=this.max.y&&t.z>=this.min.z&&t.z<=this.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.x>=this.min.x&&t.min.x<=this.max.x&&t.max.y>=this.min.y&&t.min.y<=this.max.y&&t.max.z>=this.min.z&&t.min.z<=this.max.z}intersectsSphere(t){return this.clampPoint(t.center,xl),xl.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(Mb),GC.subVectors(this.max,Mb),fg.subVectors(t.a,Mb),pg.subVectors(t.b,Mb),mg.subVectors(t.c,Mb),Cu.subVectors(pg,fg),Su.subVectors(mg,pg),Jh.subVectors(fg,mg);let e=[0,-Cu.z,Cu.y,0,-Su.z,Su.y,0,-Jh.z,Jh.y,Cu.z,0,-Cu.x,Su.z,0,-Su.x,Jh.z,0,-Jh.x,-Cu.y,Cu.x,0,-Su.y,Su.x,0,-Jh.y,Jh.x,0];return!(!Jk(e,fg,pg,mg,GC)||(e=[1,0,0,0,1,0,0,0,1],!Jk(e,fg,pg,mg,GC)))&&($C.crossVectors(Cu,Su),e=[$C.x,$C.y,$C.z],Jk(e,fg,pg,mg,GC))}clampPoint(t,e){return e.copy(t).clamp(this.min,this.max)}distanceToPoint(t){return this.clampPoint(t,xl).distanceTo(t)}getBoundingSphere(t){return this.isEmpty()?t.makeEmpty():(this.getCenter(t.center),t.radius=.5*this.getSize(xl).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()||(td[0].set(this.min.x,this.min.y,this.min.z).applyMatrix4(t),td[1].set(this.min.x,this.min.y,this.max.z).applyMatrix4(t),td[2].set(this.min.x,this.max.y,this.min.z).applyMatrix4(t),td[3].set(this.min.x,this.max.y,this.max.z).applyMatrix4(t),td[4].set(this.max.x,this.min.y,this.min.z).applyMatrix4(t),td[5].set(this.max.x,this.min.y,this.max.z).applyMatrix4(t),td[6].set(this.max.x,this.max.y,this.min.z).applyMatrix4(t),td[7].set(this.max.x,this.max.y,this.max.z).applyMatrix4(t),this.setFromPoints(td)),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 td=[new O,new O,new O,new O,new O,new O,new O,new O],xl=new O,HC=new Bs,fg=new O,pg=new O,mg=new O,Cu=new O,Su=new O,Jh=new O,Mb=new O,GC=new O,$C=new O,ef=new O;function Jk(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),d=n.dot(ef);if(Math.max(-Math.max(l,c,d),Math.min(l,c,d))>a)return!1}return!0}const sae=new Bs,Cb=new O,eP=new O;class Us{constructor(t=new O,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):sae.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;Cb.subVectors(t,this.center);const e=Cb.lengthSq();if(e>this.radius*this.radius){const n=Math.sqrt(e),r=.5*(n-this.radius);this.center.addScaledVector(Cb,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):(eP.subVectors(t.center,this.center).setLength(t.radius),this.expandByPoint(Cb.copy(t.center).add(eP)),this.expandByPoint(Cb.copy(t.center).sub(eP))),this)}equals(t){return t.center.equals(this.center)&&t.radius===this.radius}clone(){return(new this.constructor).copy(this)}}const nd=new O,tP=new O,WC=new O,Eu=new O,nP=new O,jC=new O,iP=new O;class Sb{constructor(t=new O,e=new O(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,nd)),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=nd.subVectors(t,this.origin).dot(this.direction);return e<0?this.origin.distanceToSquared(t):(nd.copy(this.origin).addScaledVector(this.direction,e),nd.distanceToSquared(t))}distanceSqToSegment(t,e,n,r){tP.copy(t).add(e).multiplyScalar(.5),WC.copy(e).sub(t).normalize(),Eu.copy(this.origin).sub(tP);const s=.5*t.distanceTo(e),o=-this.direction.dot(WC),a=Eu.dot(this.direction),l=-Eu.dot(WC),c=Eu.lengthSq(),d=Math.abs(1-o*o);let h,p,m,g;if(d>0)if(h=o*l-a,p=o*a-l,g=s*d,h>=0)if(p>=-g)if(p<=g){const b=1/d;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(tP).addScaledVector(WC,p),m}intersectSphere(t,e){nd.subVectors(t.center,this.origin);const n=nd.dot(this.direction),r=nd.dot(nd)-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,d=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),d>=0?(s=(t.min.y-p.y)*d,o=(t.max.y-p.y)*d):(s=(t.max.y-p.y)*d,o=(t.min.y-p.y)*d),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,nd)}intersectTriangle(t,e,n,r,s){nP.subVectors(e,t),jC.subVectors(n,t),iP.crossVectors(nP,jC);let a,o=this.direction.dot(iP);if(o>0){if(r)return null;a=1}else{if(!(o<0))return null;a=-1,o=-o}Eu.subVectors(this.origin,t);const l=a*this.direction.dot(jC.crossVectors(Eu,jC));if(l<0)return null;const c=a*this.direction.dot(nP.cross(Eu));if(c<0||l+c>o)return null;const d=-a*Eu.dot(iP);return d<0?null:this.at(d/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 Nt{constructor(t,e,n,r,s,o,a,l,c,d,h,p,m,g,b,v){Nt.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,d,h,p,m,g,b,v)}set(t,e,n,r,s,o,a,l,c,d,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]=d,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 Nt).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/gg.setFromMatrixColumn(t,0).length(),s=1/gg.setFromMatrixColumn(t,1).length(),o=1/gg.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),d=Math.cos(s),h=Math.sin(s);if("XYZ"===t.order){const p=o*d,m=o*h,g=a*d,b=a*h;e[0]=l*d,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*d,m=l*h,g=c*d,b=c*h;e[0]=p+b*a,e[4]=g*a-m,e[8]=o*c,e[1]=o*h,e[5]=o*d,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*d,m=l*h,g=c*d,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*d,e[9]=b-p*a,e[2]=-o*c,e[6]=a,e[10]=o*l}else if("ZYX"===t.order){const p=o*d,m=o*h,g=a*d,b=a*h;e[0]=l*d,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*d,e[4]=b-p*h,e[8]=g*h+m,e[1]=h,e[5]=o*d,e[9]=-a*d,e[2]=-c*d,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*d,e[4]=-h,e[8]=c*d,e[1]=p*h+b,e[5]=o*d,e[9]=m*h-g,e[2]=g*h-m,e[6]=a*d,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(oae,t,aae)}lookAt(t,e,n){const r=this.elements;return ea.subVectors(t,e),0===ea.lengthSq()&&(ea.z=1),ea.normalize(),Au.crossVectors(n,ea),0===Au.lengthSq()&&(1===Math.abs(n.z)?ea.x+=1e-4:ea.z+=1e-4,ea.normalize(),Au.crossVectors(n,ea)),Au.normalize(),YC.crossVectors(ea,Au),r[0]=Au.x,r[4]=YC.x,r[8]=ea.x,r[1]=Au.y,r[5]=YC.y,r[9]=ea.y,r[2]=Au.z,r[6]=YC.z,r[10]=ea.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],d=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],F=n[15],D=r[0],k=r[4],B=r[8],T=r[12],A=r[1],$=r[5],ie=r[9],ne=r[13],se=r[2],ge=r[6],q=r[10],re=r[14],J=r[3],we=r[7],Ne=r[11],Ye=r[15];return s[0]=o*D+a*A+l*se+c*J,s[4]=o*k+a*$+l*ge+c*we,s[8]=o*B+a*ie+l*q+c*Ne,s[12]=o*T+a*ne+l*re+c*Ye,s[1]=d*D+h*A+p*se+m*J,s[5]=d*k+h*$+p*ge+m*we,s[9]=d*B+h*ie+p*q+m*Ne,s[13]=d*T+h*ne+p*re+m*Ye,s[2]=g*D+b*A+v*se+y*J,s[6]=g*k+b*$+v*ge+y*we,s[10]=g*B+b*ie+v*q+y*Ne,s[14]=g*T+b*ne+v*re+y*Ye,s[3]=M*D+x*A+C*se+F*J,s[7]=M*k+x*$+C*ge+F*we,s[11]=M*B+x*ie+C*q+F*Ne,s[15]=M*T+x*ne+C*re+F*Ye,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],d=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*d-s*l*d)+t[11]*(+e*c*h-e*a*m-s*o*h+n*o*m+s*a*d-n*c*d)+t[15]*(-r*a*d-e*l*h+e*a*p+r*o*h-n*o*p+n*l*d)}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],d=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-d*v*c-g*l*m+o*v*m+d*l*y-o*p*y,C=d*b*c-g*h*c+g*a*m-o*b*m-d*a*y+o*h*y,F=g*h*l-d*b*l-g*a*p+o*b*p+d*a*v-o*h*v,D=e*M+n*x+r*C+s*F;if(0===D)return this.set(0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0);const k=1/D;return t[0]=M*k,t[1]=(b*p*s-h*v*s-b*r*m+n*v*m+h*r*y-n*p*y)*k,t[2]=(a*v*s-b*l*s+b*r*c-n*v*c-a*r*y+n*l*y)*k,t[3]=(h*l*s-a*p*s-h*r*c+n*p*c+a*r*m-n*l*m)*k,t[4]=x*k,t[5]=(d*v*s-g*p*s+g*r*m-e*v*m-d*r*y+e*p*y)*k,t[6]=(g*l*s-o*v*s-g*r*c+e*v*c+o*r*y-e*l*y)*k,t[7]=(o*p*s-d*l*s+d*r*c-e*p*c-o*r*m+e*l*m)*k,t[8]=C*k,t[9]=(g*h*s-d*b*s-g*n*m+e*b*m+d*n*y-e*h*y)*k,t[10]=(o*b*s-g*a*s+g*n*c-e*b*c-o*n*y+e*a*y)*k,t[11]=(d*a*s-o*h*s-d*n*c+e*h*c+o*n*m-e*a*m)*k,t[12]=F*k,t[13]=(d*b*r-g*h*r+g*n*p-e*b*p-d*n*v+e*h*v)*k,t[14]=(g*a*r-o*b*r-g*n*l+e*b*l+o*n*v-e*a*v)*k,t[15]=(o*h*r-d*a*r+d*n*l-e*h*l-o*n*p+e*a*p)*k,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,d=s*a;return this.set(c*o+n,c*a-r*l,c*l+r*a,0,c*a+r*l,d*a+n,d*l-r*o,0,c*l-r*a,d*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,d=o+o,h=a+a,p=s*c,m=s*d,g=s*h,b=o*d,v=o*h,y=a*h,M=l*c,x=l*d,C=l*h,F=n.x,D=n.y,k=n.z;return r[0]=(1-(b+y))*F,r[1]=(m+C)*F,r[2]=(g-x)*F,r[3]=0,r[4]=(m-C)*D,r[5]=(1-(p+y))*D,r[6]=(v+M)*D,r[7]=0,r[8]=(g+x)*k,r[9]=(v-M)*k,r[10]=(1-(p+b))*k,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=gg.set(r[0],r[1],r[2]).length();const o=gg.set(r[4],r[5],r[6]).length(),a=gg.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],wl.copy(this);const c=1/s,d=1/o,h=1/a;return wl.elements[0]*=c,wl.elements[1]*=c,wl.elements[2]*=c,wl.elements[4]*=d,wl.elements[5]*=d,wl.elements[6]*=d,wl.elements[8]*=h,wl.elements[9]*=h,wl.elements[10]*=h,e.setFromRotationMatrix(wl),n.x=s,n.y=o,n.z=a,this}makePerspective(t,e,n,r,s,o,a=ed){const l=this.elements,c=2*s/(e-t),d=2*s/(n-r),h=(e+t)/(e-t),p=(n+r)/(n-r);let m,g;if(a===ed)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]=d,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=ed){const l=this.elements,c=1/(e-t),d=1/(n-r),h=1/(o-s),p=(e+t)*c,m=(n+r)*d;let g,b;if(a===ed)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*d,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 gg=new O,wl=new Nt,oae=new O(0,0,0),aae=new O(1,1,1),Au=new O,YC=new O,ea=new O,F4=new Nt,L4=new co;let id=(()=>{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],d=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,d),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,d)):(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,d)):(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,d));break;case"YZX":this._z=Math.asin(Ji(c,-1,1)),Math.abs(c)<.9999999?(this._x=Math.atan2(-h,d),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,d),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 F4.makeRotationFromQuaternion(e),this.setFromRotationMatrix(F4,n,r)}setFromVector3(e,n=this._order){return this.set(e.x,e.y,e.z,n)}reorder(e){return L4.setFromEuler(this),this.setFromQuaternion(L4,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 rP{constructor(){this.mask=1}set(t){this.mask=(1<>>0}enable(t){this.mask|=1<{class i extends og{constructor(){super(),this.isObject3D=!0,Object.defineProperty(this,"id",{value:lae++}),this.uuid=Jo(),this.name="",this.type="Object3D",this.parent=null,this.children=[],this.up=i.DEFAULT_UP.clone();const e=new O,n=new id,r=new co,s=new O(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 Nt},normalMatrix:{value:new wn}}),this.matrix=new Nt,this.matrixWorld=new Nt,this.matrixAutoUpdate=i.DEFAULT_MATRIX_AUTO_UPDATE,this.matrixWorldAutoUpdate=i.DEFAULT_MATRIX_WORLD_AUTO_UPDATE,this.matrixWorldNeedsUpdate=!1,this.layers=new rP,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 _g.setFromAxisAngle(e,n),this.quaternion.multiply(_g),this}rotateOnWorldAxis(e,n){return _g.setFromAxisAngle(e,n),this.quaternion.premultiply(_g),this}rotateX(e){return this.rotateOnAxis(B4,e)}rotateY(e){return this.rotateOnAxis(U4,e)}rotateZ(e){return this.rotateOnAxis(V4,e)}translateOnAxis(e,n){return N4.copy(e).applyQuaternion(this.quaternion),this.position.add(N4.multiplyScalar(n)),this}translateX(e){return this.translateOnAxis(B4,e)}translateY(e){return this.translateOnAxis(U4,e)}translateZ(e){return this.translateOnAxis(V4,e)}localToWorld(e){return this.updateWorldMatrix(!0,!1),e.applyMatrix4(this.matrixWorld)}worldToLocal(e){return this.updateWorldMatrix(!0,!1),e.applyMatrix4(rd.copy(this.matrixWorld).invert())}lookAt(e,n,r){e.isVector3?qC.copy(e):qC.set(e,n,r);const s=this.parent;this.updateWorldMatrix(!0,!1),Eb.setFromMatrixPosition(this.matrixWorld),this.isCamera||this.isLight?rd.lookAt(Eb,qC,this.up):rd.lookAt(qC,Eb,this.up),this.quaternion.setFromRotationMatrix(rd),s&&(rd.extractRotation(s.matrixWorld),_g.setFromRotationMatrix(rd),this.quaternion.premultiply(_g.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.maxInstanceCount=this._maxInstanceCount,s.maxVertexCount=this._maxVertexCount,s.maxIndexCount=this._maxIndexCount,s.geometryInitialized=this._geometryInitialized,s.geometryCount=this._geometryCount,s.matricesTexture=this._matricesTexture.toJSON(e),null!==this._colorsTexture&&(s.colorsTexture=this._colorsTexture.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 d=0,h=c.length;d0){s.children=[];for(let l=0;l0){s.animations=[];for(let l=0;l0&&(r.geometries=l),c.length>0&&(r.materials=c),d.length>0&&(r.textures=d),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 d in l){const h=l[d];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){Ml.subVectors(r,e),sd.subVectors(n,e),oP.subVectors(t,e);const o=Ml.dot(Ml),a=Ml.dot(sd),l=Ml.dot(oP),c=sd.dot(sd),d=sd.dot(oP),h=o*c-a*a;if(0===h)return s.set(0,0,0),null;const p=1/h,m=(c*l-a*d)*p,g=(o*d-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,od)&&od.x>=0&&od.y>=0&&od.x+od.y<=1}static getInterpolation(t,e,n,r,s,o,a,l){return null===this.getBarycoord(t,e,n,r,od)?(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,od.x),l.addScaledVector(o,od.y),l.addScaledVector(a,od.z),l)}static isFrontFacing(t,e,n,r){return Ml.subVectors(n,e),sd.subVectors(t,e),Ml.cross(sd).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 Ml.subVectors(this.c,this.b),sd.subVectors(this.a,this.b),.5*Ml.cross(sd).length()}getMidpoint(t){return t.addVectors(this.a,this.b).add(this.c).multiplyScalar(1/3)}getNormal(t){return Oa.getNormal(this.a,this.b,this.c,t)}getPlane(t){return t.setFromCoplanarPoints(this.a,this.b,this.c)}getBarycoord(t,e){return Oa.getBarycoord(t,this.a,this.b,this.c,e)}getInterpolation(t,e,n,r,s){return Oa.getInterpolation(t,this.a,this.b,this.c,e,n,r,s)}containsPoint(t){return Oa.containsPoint(t,this.a,this.b,this.c)}isFrontFacing(t){return Oa.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;yg.subVectors(r,n),bg.subVectors(s,n),aP.subVectors(t,n);const l=yg.dot(aP),c=bg.dot(aP);if(l<=0&&c<=0)return e.copy(n);lP.subVectors(t,r);const d=yg.dot(lP),h=bg.dot(lP);if(d>=0&&h<=d)return e.copy(r);const p=l*h-d*c;if(p<=0&&l>=0&&d<=0)return o=l/(l-d),e.copy(n).addScaledVector(yg,o);cP.subVectors(t,s);const m=yg.dot(cP),g=bg.dot(cP);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(bg,a);const v=d*g-m*h;if(v<=0&&h-d>=0&&m-g>=0)return H4.subVectors(s,r),a=(h-d)/(h-d+(m-g)),e.copy(r).addScaledVector(H4,a);const y=1/(v+b+p);return o=b*y,a=p*y,e.copy(n).addScaledVector(yg,o).addScaledVector(bg,a)}equals(t){return t.a.equals(this.a)&&t.b.equals(this.b)&&t.c.equals(this.c)}}const G4={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},Du={h:0,s:0,l:0},XC={h:0,s:0,l:0};function dP(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 qe{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=cs){return t=Math.floor(t),this.r=(t>>16&255)/255,this.g=(t>>8&255)/255,this.b=(255&t)/255,Jn.toWorkingColorSpace(this,e),this}setRGB(t,e,n,r=Jn.workingColorSpace){return this.r=t,this.g=e,this.b=n,Jn.toWorkingColorSpace(this,r),this}setHSL(t,e,n,r=Jn.workingColorSpace){if(t=Yk(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=dP(o,s,t+1/3),this.g=dP(o,s,t),this.b=dP(o,s,t-1/3)}return Jn.toWorkingColorSpace(this,r),this}setStyle(t,e=cs){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=cs){const n=G4[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=dg(t.r),this.g=dg(t.g),this.b=dg(t.b),this}copyLinearToSRGB(t){return this.r=Xk(t.r),this.g=Xk(t.g),this.b=Xk(t.b),this}convertSRGBToLinear(){return this.copySRGBToLinear(this),this}convertLinearToSRGB(){return this.copyLinearToSRGB(this),this}getHex(t=cs){return Jn.fromWorkingColorSpace(Vs.copy(this),t),65536*Math.round(Ji(255*Vs.r,0,255))+256*Math.round(Ji(255*Vs.g,0,255))+Math.round(Ji(255*Vs.b,0,255))}getHexString(t=cs){return("000000"+this.getHex(t).toString(16)).slice(-6)}getHSL(t,e=Jn.workingColorSpace){Jn.fromWorkingColorSpace(Vs.copy(this),e);const n=Vs.r,r=Vs.g,s=Vs.b,o=Math.max(n,r,s),a=Math.min(n,r,s);let l,c;const d=(a+o)/2;if(a===o)l=0,c=0;else{const h=o-a;switch(c=d<=.5?h/(o+a):h/(2-o-a),o){case n:l=(r-s)/h+(r0!=t>0&&this.version++,this._alphaTest=t}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.dispersion&&(n.dispersion=this.dispersion),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!==Zm&&(n.blending=this.blending),this.side!==ac&&(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!==ak&&(n.blendSrc=this.blendSrc),this.blendDst!==lk&&(n.blendDst=this.blendDst),this.blendEquation!==Xh&&(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!==SC&&(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!==sg&&(n.stencilFail=this.stencilFail),this.stencilZFail!==sg&&(n.stencilZFail=this.stencilZFail),this.stencilZPass!==sg&&(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++}onBuild(){console.warn("Material: onBuild() has been removed.")}onBeforeRender(){console.warn("Material: onBeforeRender() has been removed.")}}class qi extends Po{constructor(t){super(),this.isMeshBasicMaterial=!0,this.type="MeshBasicMaterial",this.color=new qe(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 id,this.combine=EC,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 vr=new O,KC=new xe;class Hi{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=Qo,this.version=0}onUploadCallback(){}set needsUpdate(t){!0===t&&this.version++}get updateRange(){return cg("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],d=[];for(let h=0,p=c.length;h0&&(r[l]=d,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 d=[],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))&&(j4.copy(s).invert(),tf.copy(t.ray).applyMatrix4(j4),(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,d=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:iS.clone(),object:i}}(i,t,e,n,wg,Mg,Cg,nS);if(d){r&&(JC.fromBufferAttribute(r,a),eS.fromBufferAttribute(r,l),tS.fromBufferAttribute(r,c),d.uv=Oa.getInterpolation(nS,wg,Mg,Cg,JC,eS,tS,new xe)),s&&(JC.fromBufferAttribute(s,a),eS.fromBufferAttribute(s,l),tS.fromBufferAttribute(s,c),d.uv1=Oa.getInterpolation(nS,wg,Mg,Cg,JC,eS,tS,new xe)),o&&(q4.fromBufferAttribute(o,a),X4.fromBufferAttribute(o,l),K4.fromBufferAttribute(o,c),d.normal=Oa.getInterpolation(nS,wg,Mg,Cg,q4,X4,K4,new O),d.normal.dot(n.direction)>0&&d.normal.multiplyScalar(-1));const h={a,b:l,c,normal:new O,materialIndex:0};Oa.getNormal(wg,Mg,Cg,h.normal),d.face=h}return d}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=[],d=[],h=[];let p=0,m=0;function g(b,v,y,M,x,C,F,D,k,B,T){const A=C/k,$=F/B,ie=C/2,ne=F/2,se=D/2,ge=k+1,q=B+1;let re=0,J=0;const we=new O;for(let Ne=0;Ne0?1:-1,d.push(we.x,we.y,we.z),h.push(Tt/k),h.push(1-Ne/B),re+=1}for(let Ne=0;Ne0&&(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 fP extends Or{constructor(){super(),this.isCamera=!0,this.type="Camera",this.matrixWorldInverse=new Nt,this.projectionMatrix=new Nt,this.projectionMatrixInverse=new Nt,this.coordinateSystem=ed}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 Tu=new O,J4=new xe,e5=new xe;class yr extends fP{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*ag*Math.atan(e),this.updateProjectionMatrix()}getFocalLength(){const t=Math.tan(.5*Qh*this.fov);return.5*this.getFilmHeight()/t}getEffectiveFOV(){return 2*ag*Math.atan(Math.tan(.5*Qh*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){Tu.set(-1,-1,.5).applyMatrix4(this.projectionMatrixInverse),e.set(Tu.x,Tu.y).multiplyScalar(-t/Tu.z),Tu.set(1,1,.5).applyMatrix4(this.projectionMatrixInverse),n.set(Tu.x,Tu.y).multiplyScalar(-t/Tu.z)}getViewSize(t,e){return this.getViewBounds(t,J4,e5),e.subVectors(e5,J4)}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*Qh*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 yae extends Or{constructor(t,e,n){super(),this.type="CubeCamera",this.renderTarget=n,this.coordinateSystem=null,this.activeMipmapLevel=0;const r=new yr(-90,1,t,e);r.layers=this.layers,this.add(r);const s=new yr(-90,1,t,e);s.layers=this.layers,this.add(s);const o=new yr(-90,1,t,e);o.layers=this.layers,this.add(o);const a=new yr(-90,1,t,e);a.layers=this.layers,this.add(a);const l=new yr(-90,1,t,e);l.layers=this.layers,this.add(l);const c=new yr(-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===ed)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,d]=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,d),t.setRenderTarget(h,p,m),t.xr.enabled=g,n.texture.needsPMREMUpdate=!0}}class sS extends ko{constructor(t,e,n,r,s,o,a,l,c,d){super(t=void 0!==t?t:[],e=void 0!==e?e:Qc,n,r,s,o,a,l,c,d),this.isCubeTexture=!0,this.flipY=!1}get images(){return this.image}set images(t){this.image=t}}class bae extends Mu{constructor(t=1,e={}){super(t,t,e),this.isWebGLCubeRenderTarget=!0;const n={width:t,height:t,depth:1};this.texture=new sS([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:lr}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 Cl({name:"CubemapFromEquirect",uniforms:Sg(n_uniforms),vertexShader:n_vertexShader,fragmentShader:n_fragmentShader,side:Io,blending:Zc});s.uniforms.tEquirect.value=e;const o=new Mn(r,s),a=e.minFilter;return e.minFilter===bl&&(e.minFilter=lr),new yae(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 pP=new O,xae=new O,wae=new wn;class rf{constructor(t=new O(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=pP.subVectors(n,e).cross(xae.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(pP),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||wae.getNormalMatrix(t),r=this.coplanarPoint(pP).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 Us,oS=new O;class aS{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=ed){const n=this.planes,r=t.elements,s=r[0],o=r[1],a=r[2],l=r[3],c=r[4],d=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+d,v+g,C+M).normalize(),n[3].setComponents(l-o,p-d,v-g,C-M).normalize(),n[4].setComponents(l-a,p-h,v-b,C-x).normalize(),e===ed)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,oS.y=r.normal.y>0?t.max.y:t.min.y,oS.z=r.normal.z>0?t.max.z:t.min.z,r.distanceToPoint(oS)<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 t5(){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 Mae(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.isInterleavedBufferAttribute&&(a=a.data),a.isGLBufferAttribute){const d=t.get(a);return void((!d||d.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 ) || defined( USE_BATCHING_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 ) || defined( USE_BATCHING_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\n#ifdef USE_BATCHING_COLOR\n\tvec3 batchingColor = getBatchingColor( getIndirectIndex( gl_DrawID ) );\n\tvColor.xyz *= batchingColor.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}\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}",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_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\tfloat distanceFalloff = 1.0 / max( pow( lightDistance, decayExponent ), 0.01 );\n\tif ( cutoffDistance > 0.0 ) {\n\t\tdistanceFalloff *= pow2( saturate( 1.0 - pow4( lightDistance / cutoffDistance ) ) );\n\t}\n\treturn distanceFalloff;\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_DISPERSION\n\tmaterial.dispersion = dispersion;\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\tfloat dispersion;\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.shadowIntensity, 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.shadowIntensity, 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.shadowIntensity, 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 )\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\tfor ( int i = 0; i < MORPHTARGETS_COUNT; i ++ ) {\n\t\tif ( morphTargetInfluences[ i ] != 0.0 ) objectNormal += getMorph( gl_VertexID, i, 1 ).xyz * morphTargetInfluences[ i ];\n\t}\n#endif",morphtarget_pars_vertex:"#ifdef USE_MORPHTARGETS\n\t#ifndef USE_INSTANCING_MORPH\n\t\tuniform float morphTargetBaseInfluence;\n\t\tuniform float morphTargetInfluences[ MORPHTARGETS_COUNT ];\n\t#endif\n\tuniform sampler2DArray morphTargetsTexture;\n\tuniform ivec2 morphTargetsTextureSize;\n\tvec4 getMorph( const in int vertexIndex, const in int morphTargetIndex, const in int offset ) {\n\t\tint texelIndex = vertexIndex * MORPHTARGETS_TEXTURE_STRIDE + offset;\n\t\tint y = texelIndex / morphTargetsTextureSize.x;\n\t\tint x = texelIndex - y * morphTargetsTextureSize.x;\n\t\tivec3 morphUV = ivec3( x, y, morphTargetIndex );\n\t\treturn texelFetch( morphTargetsTexture, morphUV, 0 );\n\t}\n#endif",morphtarget_vertex:"#ifdef USE_MORPHTARGETS\n\ttransformed *= morphTargetBaseInfluence;\n\tfor ( int i = 0; i < MORPHTARGETS_COUNT; i ++ ) {\n\t\tif ( morphTargetInfluences[ i ] != 0.0 ) transformed += getMorph( gl_VertexID, i, 0 ).xyz * morphTargetInfluences[ i ];\n\t}\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.;const float ShiftRight8 = 1. / 256.;\nconst float Inv255 = 1. / 255.;\nconst vec4 PackFactors = vec4( 1.0, 256.0, 256.0 * 256.0, 256.0 * 256.0 * 256.0 );\nconst vec2 UnpackFactors2 = vec2( UnpackDownscale, 1.0 / PackFactors.g );\nconst vec3 UnpackFactors3 = vec3( UnpackDownscale / PackFactors.rg, 1.0 / PackFactors.b );\nconst vec4 UnpackFactors4 = vec4( UnpackDownscale / PackFactors.rgb, 1.0 / PackFactors.a );\nvec4 packDepthToRGBA( const in float v ) {\n\tif( v <= 0.0 )\n\t\treturn vec4( 0., 0., 0., 0. );\n\tif( v >= 1.0 )\n\t\treturn vec4( 1., 1., 1., 1. );\n\tfloat vuf;\n\tfloat af = modf( v * PackFactors.a, vuf );\n\tfloat bf = modf( vuf * ShiftRight8, vuf );\n\tfloat gf = modf( vuf * ShiftRight8, vuf );\n\treturn vec4( vuf * Inv255, gf * PackUpscale, bf * PackUpscale, af );\n}\nvec3 packDepthToRGB( const in float v ) {\n\tif( v <= 0.0 )\n\t\treturn vec3( 0., 0., 0. );\n\tif( v >= 1.0 )\n\t\treturn vec3( 1., 1., 1. );\n\tfloat vuf;\n\tfloat bf = modf( v * PackFactors.b, vuf );\n\tfloat gf = modf( vuf * ShiftRight8, vuf );\n\treturn vec3( vuf * Inv255, gf * PackUpscale, bf );\n}\nvec2 packDepthToRG( const in float v ) {\n\tif( v <= 0.0 )\n\t\treturn vec2( 0., 0. );\n\tif( v >= 1.0 )\n\t\treturn vec2( 1., 1. );\n\tfloat vuf;\n\tfloat gf = modf( v * 256., vuf );\n\treturn vec2( vuf * Inv255, gf );\n}\nfloat unpackRGBAToDepth( const in vec4 v ) {\n\treturn dot( v, UnpackFactors4 );\n}\nfloat unpackRGBToDepth( const in vec3 v ) {\n\treturn dot( v, UnpackFactors3 );\n}\nfloat unpackRGToDepth( const in vec2 v ) {\n\treturn v.r * UnpackFactors2.r + v.g * UnpackFactors2.g;\n}\nvec4 pack2HalfToRGBA( const in 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( const in 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 shadowIntensity;\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 shadowIntensity;\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 shadowIntensity;\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 shadowIntensity, 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 mix( 1.0, shadow, shadowIntensity );\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 shadowIntensity, 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 mix( 1.0, shadow, shadowIntensity );\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 shadowIntensity;\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 shadowIntensity;\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 shadowIntensity;\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.shadowIntensity, 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.shadowIntensity, 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.shadowIntensity, 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\tconst float StartCompression = 0.8 - 0.04;\n\tconst float 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, vec3( newPeak ), 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.dispersion, 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 dispersion, const in float ior, const in float thickness,\n\t\tconst in vec3 attenuationColor, const in float attenuationDistance ) {\n\t\tvec4 transmittedLight;\n\t\tvec3 transmittance;\n\t\t#ifdef USE_DISPERSION\n\t\t\tfloat halfSpread = ( ior - 1.0 ) * 0.025 * dispersion;\n\t\t\tvec3 iors = vec3( ior - halfSpread, ior, ior + halfSpread );\n\t\t\tfor ( int i = 0; i < 3; i ++ ) {\n\t\t\t\tvec3 transmissionRay = getVolumeTransmissionRay( n, v, thickness, iors[ i ], modelMatrix );\n\t\t\t\tvec3 refractedRayExit = position + transmissionRay;\n\t\t\n\t\t\t\tvec4 ndcPos = projMatrix * viewMatrix * vec4( refractedRayExit, 1.0 );\n\t\t\t\tvec2 refractionCoords = ndcPos.xy / ndcPos.w;\n\t\t\t\trefractionCoords += 1.0;\n\t\t\t\trefractionCoords /= 2.0;\n\t\t\n\t\t\t\tvec4 transmissionSample = getTransmissionSample( refractionCoords, roughness, iors[ i ] );\n\t\t\t\ttransmittedLight[ i ] = transmissionSample[ i ];\n\t\t\t\ttransmittedLight.a += transmissionSample.a;\n\t\t\t\ttransmittance[ i ] = diffuseColor[ i ] * volumeAttenuation( length( transmissionRay ), attenuationColor, attenuationDistance )[ i ];\n\t\t\t}\n\t\t\ttransmittedLight.a /= 3.0;\n\t\t\n\t\t#else\n\t\t\n\t\t\tvec3 transmissionRay = getVolumeTransmissionRay( n, v, thickness, ior, modelMatrix );\n\t\t\tvec3 refractedRayExit = position + transmissionRay;\n\t\t\tvec4 ndcPos = projMatrix * viewMatrix * vec4( refractedRayExit, 1.0 );\n\t\t\tvec2 refractionCoords = ndcPos.xy / ndcPos.w;\n\t\t\trefractionCoords += 1.0;\n\t\t\trefractionCoords /= 2.0;\n\t\t\ttransmittedLight = getTransmissionSample( refractionCoords, roughness, ior );\n\t\t\ttransmittance = diffuseColor * volumeAttenuation( length( transmissionRay ), attenuationColor, attenuationDistance );\n\t\t\n\t\t#endif\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#elif DEPTH_PACKING == 3202\n\t\tgl_FragColor = vec4( packDepthToRGB( fragCoordZ ), 1.0 );\n\t#elif DEPTH_PACKING == 3203\n\t\tgl_FragColor = vec4( packDepthToRG( fragCoordZ ), 0.0, 1.0 );\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_DISPERSION\n\tuniform float dispersion;\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}"},Qe={common:{diffuse:{value:new qe(16777215)},opacity:{value:1},map:{value:null},mapTransform:{value:new wn},alphaMap:{value:null},alphaMapTransform:{value:new wn},alphaTest:{value:0}},specularmap:{specularMap:{value:null},specularMapTransform:{value:new wn}},envmap:{envMap:{value:null},envMapRotation:{value:new wn},flipEnvMap:{value:-1},reflectivity:{value:1},ior:{value:1.5},refractionRatio:{value:.98}},aomap:{aoMap:{value:null},aoMapIntensity:{value:1},aoMapTransform:{value:new wn}},lightmap:{lightMap:{value:null},lightMapIntensity:{value:1},lightMapTransform:{value:new wn}},bumpmap:{bumpMap:{value:null},bumpMapTransform:{value:new wn},bumpScale:{value:1}},normalmap:{normalMap:{value:null},normalMapTransform:{value:new wn},normalScale:{value:new xe(1,1)}},displacementmap:{displacementMap:{value:null},displacementMapTransform:{value:new wn},displacementScale:{value:1},displacementBias:{value:0}},emissivemap:{emissiveMap:{value:null},emissiveMapTransform:{value:new wn}},metalnessmap:{metalnessMap:{value:null},metalnessMapTransform:{value:new wn}},roughnessmap:{roughnessMap:{value:null},roughnessMapTransform:{value:new wn}},gradientmap:{gradientMap:{value:null}},fog:{fogDensity:{value:25e-5},fogNear:{value:1},fogFar:{value:2e3},fogColor:{value:new qe(16777215)}},lights:{ambientLightColor:{value:[]},lightProbe:{value:[]},directionalLights:{value:[],properties:{direction:{},color:{}}},directionalLightShadows:{value:[],properties:{shadowIntensity:1,shadowBias:{},shadowNormalBias:{},shadowRadius:{},shadowMapSize:{}}},directionalShadowMap:{value:[]},directionalShadowMatrix:{value:[]},spotLights:{value:[],properties:{color:{},position:{},direction:{},distance:{},coneCos:{},penumbraCos:{},decay:{}}},spotLightShadows:{value:[],properties:{shadowIntensity:1,shadowBias:{},shadowNormalBias:{},shadowRadius:{},shadowMapSize:{}}},spotLightMap:{value:[]},spotShadowMap:{value:[]},spotLightMatrix:{value:[]},pointLights:{value:[],properties:{color:{},position:{},decay:{},distance:{}}},pointLightShadows:{value:[],properties:{shadowIntensity:1,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 qe(16777215)},opacity:{value:1},size:{value:1},scale:{value:1},map:{value:null},alphaMap:{value:null},alphaMapTransform:{value:new wn},alphaTest:{value:0},uvTransform:{value:new wn}},sprite:{diffuse:{value:new qe(16777215)},opacity:{value:1},center:{value:new xe(.5,.5)},rotation:{value:0},map:{value:null},mapTransform:{value:new wn},alphaMap:{value:null},alphaMapTransform:{value:new wn},alphaTest:{value:0}}},lc={basic:{uniforms:uo([Qe.common,Qe.specularmap,Qe.envmap,Qe.aomap,Qe.lightmap,Qe.fog]),vertexShader:Cn.meshbasic_vert,fragmentShader:Cn.meshbasic_frag},lambert:{uniforms:uo([Qe.common,Qe.specularmap,Qe.envmap,Qe.aomap,Qe.lightmap,Qe.emissivemap,Qe.bumpmap,Qe.normalmap,Qe.displacementmap,Qe.fog,Qe.lights,{emissive:{value:new qe(0)}}]),vertexShader:Cn.meshlambert_vert,fragmentShader:Cn.meshlambert_frag},phong:{uniforms:uo([Qe.common,Qe.specularmap,Qe.envmap,Qe.aomap,Qe.lightmap,Qe.emissivemap,Qe.bumpmap,Qe.normalmap,Qe.displacementmap,Qe.fog,Qe.lights,{emissive:{value:new qe(0)},specular:{value:new qe(1118481)},shininess:{value:30}}]),vertexShader:Cn.meshphong_vert,fragmentShader:Cn.meshphong_frag},standard:{uniforms:uo([Qe.common,Qe.envmap,Qe.aomap,Qe.lightmap,Qe.emissivemap,Qe.bumpmap,Qe.normalmap,Qe.displacementmap,Qe.roughnessmap,Qe.metalnessmap,Qe.fog,Qe.lights,{emissive:{value:new qe(0)},roughness:{value:1},metalness:{value:0},envMapIntensity:{value:1}}]),vertexShader:Cn.meshphysical_vert,fragmentShader:Cn.meshphysical_frag},toon:{uniforms:uo([Qe.common,Qe.aomap,Qe.lightmap,Qe.emissivemap,Qe.bumpmap,Qe.normalmap,Qe.displacementmap,Qe.gradientmap,Qe.fog,Qe.lights,{emissive:{value:new qe(0)}}]),vertexShader:Cn.meshtoon_vert,fragmentShader:Cn.meshtoon_frag},matcap:{uniforms:uo([Qe.common,Qe.bumpmap,Qe.normalmap,Qe.displacementmap,Qe.fog,{matcap:{value:null}}]),vertexShader:Cn.meshmatcap_vert,fragmentShader:Cn.meshmatcap_frag},points:{uniforms:uo([Qe.points,Qe.fog]),vertexShader:Cn.points_vert,fragmentShader:Cn.points_frag},dashed:{uniforms:uo([Qe.common,Qe.fog,{scale:{value:1},dashSize:{value:1},totalSize:{value:2}}]),vertexShader:Cn.linedashed_vert,fragmentShader:Cn.linedashed_frag},depth:{uniforms:uo([Qe.common,Qe.displacementmap]),vertexShader:Cn.depth_vert,fragmentShader:Cn.depth_frag},normal:{uniforms:uo([Qe.common,Qe.bumpmap,Qe.normalmap,Qe.displacementmap,{opacity:{value:1}}]),vertexShader:Cn.meshnormal_vert,fragmentShader:Cn.meshnormal_frag},sprite:{uniforms:uo([Qe.sprite,Qe.fog]),vertexShader:Cn.sprite_vert,fragmentShader:Cn.sprite_frag},background:{uniforms:{uvTransform:{value:new wn},t2D:{value:null},backgroundIntensity:{value:1}},vertexShader:Cn.background_vert,fragmentShader:Cn.background_frag},backgroundCube:{uniforms:{envMap:{value:null},flipEnvMap:{value:-1},backgroundBlurriness:{value:0},backgroundIntensity:{value:1},backgroundRotation:{value:new wn}},vertexShader:Cn.backgroundCube_vert,fragmentShader:Cn.backgroundCube_frag},cube:{uniforms:{tCube:{value:null},tFlip:{value:-1},opacity:{value:1}},vertexShader:Cn.cube_vert,fragmentShader:Cn.cube_frag},equirect:{uniforms:{tEquirect:{value:null}},vertexShader:Cn.equirect_vert,fragmentShader:Cn.equirect_frag},distanceRGBA:{uniforms:uo([Qe.common,Qe.displacementmap,{referencePosition:{value:new O},nearDistance:{value:1},farDistance:{value:1e3}}]),vertexShader:Cn.distanceRGBA_vert,fragmentShader:Cn.distanceRGBA_frag},shadow:{uniforms:uo([Qe.lights,Qe.fog,{color:{value:new qe(0)},opacity:{value:1}}]),vertexShader:Cn.shadow_vert,fragmentShader:Cn.shadow_frag}};lc.physical={uniforms:uo([lc.standard.uniforms,{clearcoat:{value:0},clearcoatMap:{value:null},clearcoatMapTransform:{value:new wn},clearcoatNormalMap:{value:null},clearcoatNormalMapTransform:{value:new wn},clearcoatNormalScale:{value:new xe(1,1)},clearcoatRoughness:{value:0},clearcoatRoughnessMap:{value:null},clearcoatRoughnessMapTransform:{value:new wn},dispersion:{value:0},iridescence:{value:0},iridescenceMap:{value:null},iridescenceMapTransform:{value:new wn},iridescenceIOR:{value:1.3},iridescenceThicknessMinimum:{value:100},iridescenceThicknessMaximum:{value:400},iridescenceThicknessMap:{value:null},iridescenceThicknessMapTransform:{value:new wn},sheen:{value:0},sheenColor:{value:new qe(0)},sheenColorMap:{value:null},sheenColorMapTransform:{value:new wn},sheenRoughness:{value:1},sheenRoughnessMap:{value:null},sheenRoughnessMapTransform:{value:new wn},transmission:{value:0},transmissionMap:{value:null},transmissionMapTransform:{value:new wn},transmissionSamplerSize:{value:new xe},transmissionSamplerMap:{value:null},thickness:{value:0},thicknessMap:{value:null},thicknessMapTransform:{value:new wn},attenuationDistance:{value:0},attenuationColor:{value:new qe(0)},specularColor:{value:new qe(1,1,1)},specularColorMap:{value:null},specularColorMapTransform:{value:new wn},specularIntensity:{value:1},specularIntensityMap:{value:null},specularIntensityMapTransform:{value:new wn},anisotropyVector:{value:new xe},anisotropyMap:{value:null},anisotropyMapTransform:{value:new wn}}]),vertexShader:Cn.meshphysical_vert,fragmentShader:Cn.meshphysical_frag};const lS={r:0,b:0,g:0},af=new id,Mce=new Nt;function Cce(i,t,e,n,r,s,o){const a=new qe(0);let c,d,l=!0===s?0:1,h=null,p=0,m=null;function g(M){let x=!0===M.isScene?M.background:null;return x&&x.isTexture&&(x=(M.backgroundBlurriness>0?e:t).get(x)),x}function y(M,x){M.getRGB(lS,Z4(i)),n.buffers.color.setClear(lS.r,lS.g,lS.b,x,o)}return{getClearColor:function(){return a},setClearColor:function(M,x=1){a.set(M),l=x,y(a,l)},getClearAlpha:function(){return l},setClearAlpha:function(M){l=M,y(a,l)},render:function b(M){let x=!1;const C=g(M);null===C?y(a,l):C&&C.isColor&&(y(C,1),x=!0);const F=i.xr.getEnvironmentBlendMode();"additive"===F?n.buffers.color.setClear(0,0,0,1,o):"alpha-blend"===F&&n.buffers.color.setClear(0,0,0,0,o),(i.autoClear||x)&&(n.buffers.depth.setTest(!0),n.buffers.depth.setMask(!0),n.buffers.color.setMask(!0),i.clear(i.autoClearColor,i.autoClearDepth,i.autoClearStencil))},addToRenderList:function v(M,x){const C=g(x);C&&(C.isCubeTexture||C.mapping===pb)?(void 0===d&&(d=new Mn(new nf(1,1,1),new Cl({name:"BackgroundCubeMaterial",uniforms:Sg(lc.backgroundCube.uniforms),vertexShader:lc.backgroundCube.vertexShader,fragmentShader:lc.backgroundCube.fragmentShader,side:Io,depthTest:!1,depthWrite:!1,fog:!1})),d.geometry.deleteAttribute("normal"),d.geometry.deleteAttribute("uv"),d.onBeforeRender=function(F,D,k){this.matrixWorld.copyPosition(k.matrixWorld)},Object.defineProperty(d.material,"envMap",{get:function(){return this.uniforms.envMap.value}}),r.update(d)),af.copy(x.backgroundRotation),af.x*=-1,af.y*=-1,af.z*=-1,C.isCubeTexture&&!1===C.isRenderTargetTexture&&(af.y*=-1,af.z*=-1),d.material.uniforms.envMap.value=C,d.material.uniforms.flipEnvMap.value=C.isCubeTexture&&!1===C.isRenderTargetTexture?-1:1,d.material.uniforms.backgroundBlurriness.value=x.backgroundBlurriness,d.material.uniforms.backgroundIntensity.value=x.backgroundIntensity,d.material.uniforms.backgroundRotation.value.setFromMatrix4(Mce.makeRotationFromEuler(af)),d.material.toneMapped=Jn.getTransfer(C.colorSpace)!==Fi,(h!==C||p!==C.version||m!==i.toneMapping)&&(d.material.needsUpdate=!0,h=C,p=C.version,m=i.toneMapping),d.layers.enableAll(),M.unshift(d,d.geometry,d.material,0,0,null)):C&&C.isTexture&&(void 0===c&&(c=new Mn(new Iu(2,2),new Cl({name:"BackgroundMaterial",uniforms:Sg(lc.background.uniforms),vertexShader:lc.background.vertexShader,fragmentShader:lc.background.fragmentShader,side:ac,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=C,c.material.uniforms.backgroundIntensity.value=x.backgroundIntensity,c.material.toneMapped=Jn.getTransfer(C.colorSpace)!==Fi,!0===C.matrixAutoUpdate&&C.updateMatrix(),c.material.uniforms.uvTransform.value.copy(C.matrix),(h!==C||p!==C.version||m!==i.toneMapping)&&(c.material.needsUpdate=!0,h=C,p=C.version,m=i.toneMapping),c.layers.enableAll(),M.unshift(c,c.geometry,c.material,0,0,null))}}}function Sce(i,t){const e=i.getParameter(i.MAX_VERTEX_ATTRIBS),n={},r=p(null);let s=r,o=!1;function c(A){return i.bindVertexArray(A)}function d(A){return i.deleteVertexArray(A)}function p(A){const $=[],ie=[],ne=[];for(let se=0;se=0){const Ne=se[J];let Ye=ge[J];if(void 0===Ye&&("instanceMatrix"===J&&A.instanceMatrix&&(Ye=A.instanceMatrix),"instanceColor"===J&&A.instanceColor&&(Ye=A.instanceColor)),void 0===Ne||Ne.attribute!==Ye||Ye&&Ne.data!==Ye.data)return!0;q++}return s.attributesNum!==q||s.index!==ne}(A,ne,ie,se),ge&&function g(A,$,ie,ne){const se={},ge=$.attributes;let q=0;const re=ie.getAttributes();for(const J in re)if(re[J].location>=0){let Ne=ge[J];void 0===Ne&&("instanceMatrix"===J&&A.instanceMatrix&&(Ne=A.instanceMatrix),"instanceColor"===J&&A.instanceColor&&(Ne=A.instanceColor));const Ye={};Ye.attribute=Ne,Ne&&Ne.data&&(Ye.data=Ne.data),se[J]=Ye,q++}s.attributes=se,s.attributesNum=q,s.index=ne}(A,ne,ie,se),null!==se&&t.update(se,i.ELEMENT_ARRAY_BUFFER),(ge||o)&&(o=!1,function C(A,$,ie,ne){b();const se=ne.attributes,ge=ie.getAttributes(),q=$.defaultAttributeValues;for(const re in ge){const J=ge[re];if(J.location>=0){let we=se[re];if(void 0===we&&("instanceMatrix"===re&&A.instanceMatrix&&(we=A.instanceMatrix),"instanceColor"===re&&A.instanceColor&&(we=A.instanceColor)),void 0!==we){const Ne=we.normalized,Ye=we.itemSize,Tt=t.get(we);if(void 0===Tt)continue;const en=Tt.buffer,ae=Tt.type,Oe=Tt.bytesPerElement,Ze=ae===i.INT||ae===i.UNSIGNED_INT||we.gpuType===uk;if(we.isInterleavedBufferAttribute){const Fe=we.data,bt=Fe.stride,Ct=we.offset;if(Fe.isInstancedInterleavedBuffer){for(let Mt=0;Mt0&&i.getShaderPrecisionFormat(i.FRAGMENT_SHADER,i.HIGH_FLOAT).precision>0)return"highp";D="mediump"}return"mediump"===D&&i.getShaderPrecisionFormat(i.VERTEX_SHADER,i.MEDIUM_FLOAT).precision>0&&i.getShaderPrecisionFormat(i.FRAGMENT_SHADER,i.MEDIUM_FLOAT).precision>0?"mediump":"lowp"}let c=void 0!==e.precision?e.precision:"highp";const d=l(c);d!==c&&(console.warn("THREE.WebGLRenderer:",c,"not supported, using",d,"instead."),c=d);const h=!0===e.logarithmicDepthBuffer,p=i.getParameter(i.MAX_TEXTURE_IMAGE_UNITS),m=i.getParameter(i.MAX_VERTEX_TEXTURE_IMAGE_UNITS);return{isWebGL2:!0,getMaxAnisotropy:function s(){if(void 0!==r)return r;if(!0===t.has("EXT_texture_filter_anisotropic")){const D=t.get("EXT_texture_filter_anisotropic");r=i.getParameter(D.MAX_TEXTURE_MAX_ANISOTROPY_EXT)}else r=0;return r},getMaxPrecision:l,textureFormatReadable:function o(D){return!(D!==Ro&&n.convert(D)!==i.getParameter(i.IMPLEMENTATION_COLOR_READ_FORMAT))},textureTypeReadable:function a(D){const k=D===Jm&&(t.has("EXT_color_buffer_half_float")||t.has("EXT_color_buffer_float"));return!(D!==Jc&&n.convert(D)!==i.getParameter(i.IMPLEMENTATION_COLOR_READ_TYPE)&&D!==Qo&&!k)},precision:c,logarithmicDepthBuffer:h,maxTextures:p,maxVertexTextures:m,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:m>0,maxSamples:i.getParameter(i.MAX_SAMPLES)}}function Dce(i){const t=this;let e=null,n=0,r=!1,s=!1;const o=new rf,a=new wn,l={value:null,needsUpdate:!1};function d(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=d(g,p,x,m);for(let F=0;F!==x;++F)C[F]=e[F];y.clippingState=C,this.numIntersection=b?this.numPlanes:0,this.numPlanes+=M}}}function Tce(i){let t=new WeakMap;function e(o,a){return a===AC?o.mapping=Qc:a===DC&&(o.mapping=Kh),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===AC||a===DC){if(t.has(o))return e(t.get(o).texture,o.mapping);{const l=o.image;if(l&&l.height>0){const c=new bae(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 Tb extends fP{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,d=(this.top-this.bottom)/this.view.fullHeight/this.zoom;s+=c*this.view.offsetX,o=s+c*this.view.width,a-=d*this.view.offsetY,l=a-d*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 n5=[.125,.215,.35,.446,.526,.582],mP=new Tb,r5=new qe;let gP=null,_P=0,vP=0,yP=!1;const cf=(1+Math.sqrt(5))/2,Tg=1/cf,s5=[new O(-cf,Tg,0),new O(cf,Tg,0),new O(-Tg,0,cf),new O(Tg,0,cf),new O(0,cf,-Tg),new O(0,cf,Tg),new O(-1,1,-1),new O(1,1,-1),new O(-1,1,1),new O(1,1,1)];class o5{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){gP=this._renderer.getRenderTarget(),_P=this._renderer.getActiveCubeFace(),vP=this._renderer.getActiveMipmapLevel(),yP=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=c5(),this._compileMaterial(this._cubemapMaterial))}compileEquirectangularShader(){null===this._equirectMaterial&&(this._equirectMaterial=l5(),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=n5[o-i+4-1]:0===o&&(l=0),n.push(l);const c=1/(a-2),d=-c,h=1+c,p=[d,d,h,d,h,h,d,d,h,h,d,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 D=0;D2?0:-1;M.set([k,B,0,k+2/3,B,0,k+2/3,B+1,0,k,B,0,k+2/3,B+1,0,k,B+1,0],b*g*D),x.set(p,v*g*D),C.set([D,D,D,D,D,D],y*g*D)}const F=new hn;F.setAttribute("position",new Hi(M,b)),F.setAttribute("uv",new Hi(x,v)),F.setAttribute("faceIndex",new Hi(C,y)),t.push(F),r>4&&r--}return{lodPlanes:t,sizeLods:e,sigmas:n}}(s)),this._blurMaterial=function Rce(i,t,e){const n=new Float32Array(20),r=new O(0,1,0);return new Cl({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:Zc,depthTest:!1,depthWrite:!1})}(s,t,e)}return r}_compileMaterial(t){const e=new Mn(this._lodPlanes[0],t);this._renderer.compile(e,mP)}_sceneToCubeUV(t,e,n,r){const a=new yr(90,1,e,n),l=[1,-1,1,1,1,1],c=[1,1,1,-1,-1,-1],d=this._renderer,h=d.autoClear,p=d.toneMapping;d.getClearColor(r5),d.toneMapping=bu,d.autoClear=!1;const m=new qi({name:"PMREM.Background",side:Io,depthWrite:!1,depthTest:!1}),g=new Mn(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(r5),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;cS(r,M*x,y>2?x:0,x,x),d.setRenderTarget(r),b&&d.render(g,a),d.render(t,a)}g.geometry.dispose(),g.material.dispose(),d.toneMapping=p,d.autoClear=h,t.background=v}_textureToCubeUV(t,e){const n=this._renderer,r=t.mapping===Qc||t.mapping===Kh;r?(null===this._cubemapMaterial&&(this._cubemapMaterial=c5()),this._cubemapMaterial.uniforms.flipEnvMap.value=!1===t.isRenderTargetTexture?-1:1):null===this._equirectMaterial&&(this._equirectMaterial=l5());const s=r?this._cubemapMaterial:this._equirectMaterial,o=new Mn(this._lodPlanes[0],s);s.uniforms.envMap.value=t;const l=this._cubeSize;cS(e,0,0,3*l,2*l),n.setRenderTarget(e),n.render(o,mP)}_applyPMREM(t){const e=this._renderer,n=e.autoClear;e.autoClear=!1;const r=this._lodPlanes.length;for(let s=1;s20&&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 k=0;k<20;++k){const B=k/b,T=Math.exp(-B*B/2);y.push(T),0===k?M+=T:kx-4?r-x+4:0),4*(this._cubeSize-C),3*C,2*C),l.setRenderTarget(e),l.render(h,mP)}}function a5(i,t,e){const n=new Mu(i,t,e);return n.texture.mapping=pb,n.texture.name="PMREM.cubeUv",n.scissorTest=!0,n}function cS(i,t,e,n,r){i.viewport.set(t,e,n,r),i.scissor.set(t,e,n,r)}function l5(){return new Cl({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:Zc,depthTest:!1,depthWrite:!1})}function c5(){return new Cl({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:Zc,depthTest:!1,depthWrite:!1})}function kce(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===AC||l===DC,d=l===Qc||l===Kh;if(c||d){let h=t.get(a);if(a.isRenderTargetTexture&&a.pmremVersion!==(void 0!==h?h.texture.pmremVersion:0))return null===e&&(e=new o5(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||d&&m&&function r(a){let l=0;for(let d=0;d<6;d++)void 0!==a[d]&&l++;return 6===l}(m)?(null===e&&(e=new o5(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 Pce(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&&cg("THREE.WebGLRenderer: "+n+" extension not supported."),r}}}function Oce(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&&(F=Math.ceil(C/t.maxTextureSize),C=t.maxTextureSize);const D=new Float32Array(C*F*4*h),k=new Zk(D,C,F,h);k.type=Qo,k.needsUpdate=!0;const B=4*x;for(let A=0;A0)return i;const r=t*e;let s=g5[r];if(void 0===s&&(s=new Float32Array(r),g5[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 Fr(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 Pde(i,t){const e=function kde(i){const t=Jn.getPrimaries(Jn.workingColorSpace),e=Jn.getPrimaries(i);let n;switch(t===e?n="":t===UC&&e===BC?n="LinearDisplayP3ToLinearSRGB":t===BC&&e===UC&&(n="LinearSRGBToLinearDisplayP3"),i){case ds:case LC:return[n,"LinearTransferOETF"];case cs:case jk: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 Ode(i,t){let e;switch(t){case hoe:e="Linear";break;case foe:e="Reinhard";break;case poe:e="OptimizedCineon";break;case moe:e="ACESFilmic";break;case _oe:e="AgX";break;case voe:e="Neutral";break;case goe:e="Custom";break;default:console.warn("THREE.WebGLProgram: Unsupported toneMapping:",t),e="Linear"}return"vec3 "+i+"( vec3 color ) { return "+e+"ToneMapping( color ); }"}const hS=new O;function Ib(i){return""!==i}function C5(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 S5(i,t){return i.replace(/NUM_CLIPPING_PLANES/g,t.numClippingPlanes).replace(/UNION_CLIPPING_PLANES/g,t.numClippingPlanes-t.numClipIntersection)}const Ude=/^[ \t]*#include +<([\w\d./]+)>/gm;function wP(i){return i.replace(Ude,zde)}const Vde=new Map;function zde(i,t){let e=Cn[t];if(void 0===e){const n=Vde.get(t);if(void 0===n)throw new Error("Can not resolve #include <"+t+">");e=Cn[n],console.warn('THREE.WebGLRenderer: Shader chunk "%s" has been deprecated. Use "%s" instead.',t,n)}return wP(e)}const Hde=/#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 E5(i){return i.replace(Hde,Gde)}function Gde(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(Ib).join("\n"),y.length>0&&(y+="\n")):(v=[A5(e),"#define SHADER_TYPE "+e.shaderType,"#define SHADER_NAME "+e.shaderName,g,e.extensionClipCullDistance?"#define USE_CLIP_DISTANCE":"",e.batching?"#define USE_BATCHING":"",e.batchingColor?"#define USE_BATCHING_COLOR":"",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 "+d:"",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_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.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","#ifdef USE_SKINNING","\tattribute vec4 skinIndex;","\tattribute vec4 skinWeight;","#endif","\n"].filter(Ib).join("\n"),y=[A5(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 "+d:"",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.dispersion?"#define USE_DISPERSION":"",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||e.batchingColor?"#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.decodeVideoTexture?"#define DECODE_VIDEO_TEXTURE":"",e.logarithmicDepthBuffer?"#define USE_LOGDEPTHBUF":"","uniform mat4 viewMatrix;","uniform vec3 cameraPosition;","uniform bool isOrthographic;",e.toneMapping!==bu?"#define TONE_MAPPING":"",e.toneMapping!==bu?Cn.tonemapping_pars_fragment:"",e.toneMapping!==bu?Ode("toneMapping",e.toneMapping):"",e.dithering?"#define DITHERING":"",e.opaque?"#define OPAQUE":"",Cn.colorspace_pars_fragment,Pde("linearToOutputTexel",e.outputColorSpace),(Jn.getLuminanceCoefficients(hS),["float luminance( const in vec3 rgb ) {",`\tconst vec3 weights = vec3( ${hS.x.toFixed(4)}, ${hS.y.toFixed(4)}, ${hS.z.toFixed(4)} );`,"\treturn dot( weights, rgb );","}"].join("\n")),e.useDepthPacking?"#define DEPTH_PACKING "+e.depthPacking:"","\n"].filter(Ib).join("\n")),o=wP(o),o=C5(o,e),o=S5(o,e),a=wP(a),a=C5(a,e),a=S5(a,e),o=E5(o),a=E5(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===A4?"":"layout(location = 0) out highp vec4 pc_fragColor;",e.glslVersion===A4?"":"#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,F=w5(r,r.VERTEX_SHADER,M+v+o),D=w5(r,r.FRAGMENT_SHADER,C);function k($){if(i.debug.checkShaderErrors){const ie=r.getProgramInfoLog(b).trim(),ne=r.getShaderInfoLog(F).trim(),se=r.getShaderInfoLog(D).trim();let ge=!0,q=!0;if(!1===r.getProgramParameter(b,r.LINK_STATUS))if(ge=!1,"function"==typeof i.debug.onShaderError)i.debug.onShaderError(r,b,F,D);else{const re=M5(r,F,"vertex"),J=M5(r,D,"fragment");console.error("THREE.WebGLProgram: Shader Error "+r.getError()+" - VALIDATE_STATUS "+r.getProgramParameter(b,r.VALIDATE_STATUS)+"\n\nMaterial Name: "+$.name+"\nMaterial Type: "+$.type+"\n\nProgram Info Log: "+ie+"\n"+re+"\n"+J)}else""!==ie?console.warn("THREE.WebGLProgram: Program Info Log:",ie):(""===ne||""===se)&&(q=!1);q&&($.diagnostics={runnable:ge,programLog:ie,vertexShader:{log:ne,prefix:v},fragmentShader:{log:se,prefix:y}})}r.deleteShader(F),r.deleteShader(D),B=new uS(r,b),T=function Bde(i,t){const e={},n=i.getProgramParameter(t,i.ACTIVE_ATTRIBUTES);for(let r=0;r0,ce=T.clearcoat>0,De=T.iridescence>0,Ae=T.sheen>0,Bt=T.transmission>0,Je=R&&!!T.anisotropyMap,ut=ce&&!!T.clearcoatMap,bn=ce&&!!T.clearcoatNormalMap,Ve=ce&&!!T.clearcoatRoughnessMap,dt=De&&!!T.iridescenceMap,jn=De&&!!T.iridescenceThicknessMap,an=Ae&&!!T.sheenColorMap,gt=Ae&&!!T.sheenRoughnessMap,vn=!!T.specularMap,Pn=!!T.specularColorMap,Ki=!!T.specularIntensityMap,Z=Bt&&!!T.transmissionMap,$e=Bt&&!!T.thicknessMap,Ee=!!T.alphaMap,ei=!!T.extensions;let br=bu;T.toneMapped&&(null===Fe||!0===Fe.isXRRenderTarget)&&(br=i.toneMapping);const hs={shaderID:we,shaderType:T.type,shaderName:T.name,vertexShader:en,fragmentShader:ae,defines:T.defines,customVertexShaderID:Oe,customFragmentShaderID:Ze,isRawShaderMaterial:!0===T.isRawShaderMaterial,glslVersion:T.glslVersion,precision:m,batching:Ct,batchingColor:Ct&&null!==ne._colorsTexture,instancing:bt,instancingColor:bt&&null!==ne.instanceColor,instancingMorph:bt&&null!==ne.morphTexture,supportsVertexTextures:p,outputColorSpace:null===Fe?i.outputColorSpace:!0===Fe.isXRRenderTarget?Fe.texture.colorSpace:ds,alphaToCoverage:!!T.alphaToCoverage,map:Mt,matcap:!!T.matcap,envMap:N,envMapMode:N&&re.mapping,envMapCubeUVHeight:J,aoMap:Ge,lightMap:Le,bumpMap:nt,normalMap:Me,displacementMap:p&&Ht,emissiveMap:it,normalMapObjectSpace:Me&&T.normalMapType===Eoe,normalMapTangentSpace:Me&&T.normalMapType===Zh,metalnessMap:pt,roughnessMap:z,anisotropy:R,anisotropyMap:Je,clearcoat:ce,clearcoatMap:ut,clearcoatNormalMap:bn,clearcoatRoughnessMap:Ve,dispersion:T.dispersion>0,iridescence:De,iridescenceMap:dt,iridescenceThicknessMap:jn,sheen:Ae,sheenColorMap:an,sheenRoughnessMap:gt,specularMap:vn,specularColorMap:Pn,specularIntensityMap:Ki,transmission:Bt,transmissionMap:Z,thicknessMap:$e,gradientMap:!!T.gradientMap,opaque:!1===T.transparent&&T.blending===Zm&&!1===T.alphaToCoverage,alphaMap:Ee,alphaTest:T.alphaTest>0,alphaHash:!!T.alphaHash,combine:T.combine,mapUv:Mt&&b(T.map.channel),aoMapUv:Ge&&b(T.aoMap.channel),lightMapUv:Le&&b(T.lightMap.channel),bumpMapUv:nt&&b(T.bumpMap.channel),normalMapUv:Me&&b(T.normalMap.channel),displacementMapUv:Ht&&b(T.displacementMap.channel),emissiveMapUv:it&&b(T.emissiveMap.channel),metalnessMapUv:pt&&b(T.metalnessMap.channel),roughnessMapUv:z&&b(T.roughnessMap.channel),anisotropyMapUv:Je&&b(T.anisotropyMap.channel),clearcoatMapUv:ut&&b(T.clearcoatMap.channel),clearcoatNormalMapUv:bn&&b(T.clearcoatNormalMap.channel),clearcoatRoughnessMapUv:Ve&&b(T.clearcoatRoughnessMap.channel),iridescenceMapUv:dt&&b(T.iridescenceMap.channel),iridescenceThicknessMapUv:jn&&b(T.iridescenceThicknessMap.channel),sheenColorMapUv:an&&b(T.sheenColorMap.channel),sheenRoughnessMapUv:gt&&b(T.sheenRoughnessMap.channel),specularMapUv:vn&&b(T.specularMap.channel),specularColorMapUv:Pn&&b(T.specularColorMap.channel),specularIntensityMapUv:Ki&&b(T.specularIntensityMap.channel),transmissionMapUv:Z&&b(T.transmissionMap.channel),thicknessMapUv:$e&&b(T.thicknessMap.channel),alphaMapUv:Ee&&b(T.alphaMap.channel),vertexTangents:!!ge.attributes.tangent&&(Me||R),vertexColors:T.vertexColors,vertexAlphas:!0===T.vertexColors&&!!ge.attributes.color&&4===ge.attributes.color.itemSize,pointsUvs:!0===ne.isPoints&&!!ge.attributes.uv&&(Mt||Ee),fog:!!se,useFog:!0===T.fog,fogExp2:!!se&&se.isFogExp2,flatShading:!0===T.flatShading,sizeAttenuation:!0===T.sizeAttenuation,logarithmicDepthBuffer:h,skinning:!0===ne.isSkinnedMesh,morphTargets:void 0!==ge.morphAttributes.position,morphNormals:void 0!==ge.morphAttributes.normal,morphColors:void 0!==ge.morphAttributes.color,morphTargetsCount:Ye,morphTextureStride:Tt,numDirLights:A.directional.length,numPointLights:A.point.length,numSpotLights:A.spot.length,numSpotLightMaps:A.spotLightMap.length,numRectAreaLights:A.rectArea.length,numHemiLights:A.hemi.length,numDirLightShadows:A.directionalShadowMap.length,numPointLightShadows:A.pointShadowMap.length,numSpotLightShadows:A.spotShadowMap.length,numSpotLightShadowsWithMaps:A.numSpotLightShadowsWithMaps,numLightProbes:A.numLightProbes,numClippingPlanes:o.numPlanes,numClipIntersection:o.numIntersection,dithering:T.dithering,shadowMapEnabled:i.shadowMap.enabled&&$.length>0,shadowMapType:i.shadowMap.type,toneMapping:br,decodeVideoTexture:Mt&&!0===T.map.isVideoTexture&&Jn.getTransfer(T.map.colorSpace)===Fi,premultipliedAlpha:T.premultipliedAlpha,doubleSided:T.side===Ls,flipSided:T.side===Io,useDepthPacking:T.depthPacking>=0,depthPacking:T.depthPacking||0,index0AttributeName:T.index0AttributeName,extensionClipCullDistance:ei&&!0===T.extensions.clipCullDistance&&n.has("WEBGL_clip_cull_distance"),extensionMultiDraw:(ei&&!0===T.extensions.multiDraw||Ct)&&n.has("WEBGL_multi_draw"),rendererExtensionParallelShaderCompile:n.has("KHR_parallel_shader_compile"),customProgramCacheKey:T.customProgramCacheKey()};return hs.vertexUv1s=c.has(1),hs.vertexUv2s=c.has(2),hs.vertexUv3s=c.has(3),c.clear(),hs},getProgramCacheKey:function y(T){const A=[];if(T.shaderID?A.push(T.shaderID):(A.push(T.customVertexShaderID),A.push(T.customFragmentShaderID)),void 0!==T.defines)for(const $ in T.defines)A.push($),A.push(T.defines[$]);return!1===T.isRawShaderMaterial&&(function M(T,A){T.push(A.precision),T.push(A.outputColorSpace),T.push(A.envMapMode),T.push(A.envMapCubeUVHeight),T.push(A.mapUv),T.push(A.alphaMapUv),T.push(A.lightMapUv),T.push(A.aoMapUv),T.push(A.bumpMapUv),T.push(A.normalMapUv),T.push(A.displacementMapUv),T.push(A.emissiveMapUv),T.push(A.metalnessMapUv),T.push(A.roughnessMapUv),T.push(A.anisotropyMapUv),T.push(A.clearcoatMapUv),T.push(A.clearcoatNormalMapUv),T.push(A.clearcoatRoughnessMapUv),T.push(A.iridescenceMapUv),T.push(A.iridescenceThicknessMapUv),T.push(A.sheenColorMapUv),T.push(A.sheenRoughnessMapUv),T.push(A.specularMapUv),T.push(A.specularColorMapUv),T.push(A.specularIntensityMapUv),T.push(A.transmissionMapUv),T.push(A.thicknessMapUv),T.push(A.combine),T.push(A.fogExp2),T.push(A.sizeAttenuation),T.push(A.morphTargetsCount),T.push(A.morphAttributeCount),T.push(A.numDirLights),T.push(A.numPointLights),T.push(A.numSpotLights),T.push(A.numSpotLightMaps),T.push(A.numHemiLights),T.push(A.numRectAreaLights),T.push(A.numDirLightShadows),T.push(A.numPointLightShadows),T.push(A.numSpotLightShadows),T.push(A.numSpotLightShadowsWithMaps),T.push(A.numLightProbes),T.push(A.shadowMapType),T.push(A.toneMapping),T.push(A.numClippingPlanes),T.push(A.numClipIntersection),T.push(A.depthPacking)}(A,T),function x(T,A){a.disableAll(),A.supportsVertexTextures&&a.enable(0),A.instancing&&a.enable(1),A.instancingColor&&a.enable(2),A.instancingMorph&&a.enable(3),A.matcap&&a.enable(4),A.envMap&&a.enable(5),A.normalMapObjectSpace&&a.enable(6),A.normalMapTangentSpace&&a.enable(7),A.clearcoat&&a.enable(8),A.iridescence&&a.enable(9),A.alphaTest&&a.enable(10),A.vertexColors&&a.enable(11),A.vertexAlphas&&a.enable(12),A.vertexUv1s&&a.enable(13),A.vertexUv2s&&a.enable(14),A.vertexUv3s&&a.enable(15),A.vertexTangents&&a.enable(16),A.anisotropy&&a.enable(17),A.alphaHash&&a.enable(18),A.batching&&a.enable(19),A.dispersion&&a.enable(20),A.batchingColor&&a.enable(21),T.push(a.mask),a.disableAll(),A.fog&&a.enable(0),A.useFog&&a.enable(1),A.flatShading&&a.enable(2),A.logarithmicDepthBuffer&&a.enable(3),A.skinning&&a.enable(4),A.morphTargets&&a.enable(5),A.morphNormals&&a.enable(6),A.morphColors&&a.enable(7),A.premultipliedAlpha&&a.enable(8),A.shadowMapEnabled&&a.enable(9),A.doubleSided&&a.enable(10),A.flipSided&&a.enable(11),A.useDepthPacking&&a.enable(12),A.dithering&&a.enable(13),A.transmission&&a.enable(14),A.sheen&&a.enable(15),A.opaque&&a.enable(16),A.pointsUvs&&a.enable(17),A.decodeVideoTexture&&a.enable(18),A.alphaToCoverage&&a.enable(19),T.push(a.mask)}(A,T),A.push(i.outputColorSpace)),A.push(T.customProgramCacheKey),A.join()},getUniforms:function C(T){const A=g[T.type];let $;return $=A?Q4.clone(lc[A].uniforms):T.uniforms,$},acquireProgram:function F(T,A){let $;for(let ie=0,ne=d.length;ie0?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 d(){for(let h=t,p=i.length;h1&&e.sort(h||tue),n.length>1&&n.sort(p||D5),r.length>1&&r.sort(p||D5)}}}function nue(){let i=new WeakMap;return{get:function t(n,r){const s=i.get(n);let o;return void 0===s?(o=new T5,i.set(n,[o])):r>=s.length?(o=new T5,s.push(o)):o=s[r],o},dispose:function e(){i=new WeakMap}}}function iue(){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 O,color:new qe};break;case"SpotLight":e={position:new O,direction:new O,color:new qe,distance:0,coneCos:0,penumbraCos:0,decay:0};break;case"PointLight":e={position:new O,color:new qe,distance:0,decay:0};break;case"HemisphereLight":e={direction:new O,skyColor:new qe,groundColor:new qe};break;case"RectAreaLight":e={color:new qe,position:new O,halfWidth:new O,halfHeight:new O}}return i[t.id]=e,e}}}let sue=0;function oue(i,t){return(t.castShadow?2:0)-(i.castShadow?2:0)+(t.map?1:0)-(i.map?1:0)}function aue(i){const t=new iue,e=function rue(){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={shadowIntensity:1,shadowBias:0,shadowNormalBias:0,shadowRadius:1,shadowMapSize:new xe};break;case"PointLight":e={shadowIntensity:1,shadowBias:0,shadowNormalBias:0,shadowRadius:1,shadowMapSize:new xe,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 O);const r=new O,s=new Nt,o=new Nt;return{setup:function a(c){let d=0,h=0,p=0;for(let T=0;T<9;T++)n.probe[T].set(0,0,0);let m=0,g=0,b=0,v=0,y=0,M=0,x=0,C=0,F=0,D=0,k=0;c.sort(oue);for(let T=0,A=c.length;T0&&(!0===i.has("OES_texture_float_linear")?(n.rectAreaLTC1=Qe.LTC_FLOAT_1,n.rectAreaLTC2=Qe.LTC_FLOAT_2):(n.rectAreaLTC1=Qe.LTC_HALF_1,n.rectAreaLTC2=Qe.LTC_HALF_2)),n.ambient[0]=d,n.ambient[1]=h,n.ambient[2]=p;const B=n.hash;(B.directionalLength!==m||B.pointLength!==g||B.spotLength!==b||B.rectAreaLength!==v||B.hemiLength!==y||B.numDirectionalShadows!==M||B.numPointShadows!==x||B.numSpotShadows!==C||B.numSpotMaps!==F||B.numLightProbes!==k)&&(n.directional.length=m,n.spot.length=b,n.rectArea.length=v,n.point.length=g,n.hemi.length=y,n.directionalShadow.length=M,n.directionalShadowMap.length=M,n.pointShadow.length=x,n.pointShadowMap.length=x,n.spotShadow.length=C,n.spotShadowMap.length=C,n.directionalShadowMatrix.length=M,n.pointShadowMatrix.length=x,n.spotLightMatrix.length=C+F-D,n.spotLightMap.length=F,n.numSpotLightShadowsWithMaps=D,n.numLightProbes=k,B.directionalLength=m,B.pointLength=g,B.spotLength=b,B.rectAreaLength=v,B.hemiLength=y,B.numDirectionalShadows=M,B.numPointShadows=x,B.numSpotShadows=C,B.numSpotMaps=F,B.numLightProbes=k,n.version=sue++)},setupView:function l(c,d){let h=0,p=0,m=0,g=0,b=0;const v=d.matrixWorldInverse;for(let y=0,M=c.length;y=o.length?(a=new I5(i),o.push(a)):a=o[s],a},dispose:function n(){t=new WeakMap}}}class R5 extends Po{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 k5 extends Po{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 cue="void main() {\n\tgl_Position = vec4( position, 1.0 );\n}",due="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 uue(i,t,e){let n=new aS;const r=new xe,s=new xe,o=new gi,a=new R5({depthPacking:Soe}),l=new k5,c={},d=e.maxTextureSize,h={[ac]:Io,[Io]:ac,[Ls]:Ls},p=new Cl({defines:{VSM_SAMPLES:8},uniforms:{shadow_pass:{value:null},resolution:{value:new xe},radius:{value:4}},vertexShader:cue,fragmentShader:due}),m=p.clone();m.defines.HORIZONTAL_PASS=1;const g=new hn;g.setAttribute("position",new Hi(new Float32Array([-1,-1,.5,3,-1,.5,-1,3,.5]),3));const b=new Mn(g,p),v=this;this.enabled=!1,this.autoUpdate=!0,this.needsUpdate=!1,this.type=l4;let y=this.type;function M(D,k){const B=t.update(b);p.defines.VSM_SAMPLES!==D.blurSamples&&(p.defines.VSM_SAMPLES=D.blurSamples,m.defines.VSM_SAMPLES=D.blurSamples,p.needsUpdate=!0,m.needsUpdate=!0),null===D.mapPass&&(D.mapPass=new Mu(r.x,r.y)),p.uniforms.shadow_pass.value=D.map.texture,p.uniforms.resolution.value=D.mapSize,p.uniforms.radius.value=D.radius,i.setRenderTarget(D.mapPass),i.clear(),i.renderBufferDirect(k,null,B,p,b,null),m.uniforms.shadow_pass.value=D.mapPass.texture,m.uniforms.resolution.value=D.mapSize,m.uniforms.radius.value=D.radius,i.setRenderTarget(D.map),i.clear(),i.renderBufferDirect(k,null,B,m,b,null)}function x(D,k,B,T){let A=null;const $=!0===B.isPointLight?D.customDistanceMaterial:D.customDepthMaterial;if(void 0!==$)A=$;else if(A=!0===B.isPointLight?l:a,i.localClippingEnabled&&!0===k.clipShadows&&Array.isArray(k.clippingPlanes)&&0!==k.clippingPlanes.length||k.displacementMap&&0!==k.displacementScale||k.alphaMap&&k.alphaTest>0||k.map&&k.alphaTest>0){const ie=A.uuid,ne=k.uuid;let se=c[ie];void 0===se&&(se={},c[ie]=se);let ge=se[ne];void 0===ge&&(ge=A.clone(),se[ne]=ge,k.addEventListener("dispose",F)),A=ge}return A.visible=k.visible,A.wireframe=k.wireframe,A.side=T===Kc?null!==k.shadowSide?k.shadowSide:k.side:null!==k.shadowSide?k.shadowSide:h[k.side],A.alphaMap=k.alphaMap,A.alphaTest=k.alphaTest,A.map=k.map,A.clipShadows=k.clipShadows,A.clippingPlanes=k.clippingPlanes,A.clipIntersection=k.clipIntersection,A.displacementMap=k.displacementMap,A.displacementScale=k.displacementScale,A.displacementBias=k.displacementBias,A.wireframeLinewidth=k.wireframeLinewidth,A.linewidth=k.linewidth,!0===B.isPointLight&&!0===A.isMeshDistanceMaterial&&(i.properties.get(A).light=B),A}function C(D,k,B,T,A){if(!1===D.visible)return;if(D.layers.test(k.layers)&&(D.isMesh||D.isLine||D.isPoints)&&(D.castShadow||D.receiveShadow&&A===Kc)&&(!D.frustumCulled||n.intersectsObject(D))){D.modelViewMatrix.multiplyMatrices(B.matrixWorldInverse,D.matrixWorld);const ne=t.update(D),se=D.material;if(Array.isArray(se)){const ge=ne.groups;for(let q=0,re=ge.length;qd||r.y>d)&&(r.x>d&&(s.x=Math.floor(d/we.x),r.x=s.x*we.x,J.mapSize.x=s.x),r.y>d&&(s.y=Math.floor(d/we.y),r.y=s.y*we.y,J.mapSize.y=s.y)),null===J.map||!0===ne||!0===se){const Ye=this.type!==Kc?{minFilter:_r,magFilter:_r}:{};null!==J.map&&J.map.dispose(),J.map=new Mu(r.x,r.y,Ye),J.map.texture.name=re.name+".shadowMap",J.camera.updateProjectionMatrix()}i.setRenderTarget(J.map),i.clear();const Ne=J.getViewportCount();for(let Ye=0;Ye=1):-1!==re.indexOf("OpenGL ES")&&(q=parseFloat(/^OpenGL ES (\d)/.exec(re)[1]),ge=q>=2);let J=null,we={};const Ne=i.getParameter(i.SCISSOR_BOX),Ye=i.getParameter(i.VIEWPORT),Tt=(new gi).fromArray(Ne),en=(new gi).fromArray(Ye);function ae(Z,$e,Ce,Ee){const Ke=new Uint8Array(4),tn=i.createTexture();i.bindTexture(Z,tn),i.texParameteri(Z,i.TEXTURE_MIN_FILTER,i.NEAREST),i.texParameteri(Z,i.TEXTURE_MAG_FILTER,i.NEAREST);for(let ei=0;ei"u")&&/OculusBrowser/g.test(navigator.userAgent),c=new xe,d=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(z,R){return m?new OffscreenCanvas(z,R):xb("canvas")}function b(z,R,ce){let Ie=1;const De=pt(z);if((De.width>ce||De.height>ce)&&(Ie=ce/Math.max(De.width,De.height)),Ie<1){if(typeof HTMLImageElement<"u"&&z instanceof HTMLImageElement||typeof HTMLCanvasElement<"u"&&z instanceof HTMLCanvasElement||typeof ImageBitmap<"u"&&z instanceof ImageBitmap||typeof VideoFrame<"u"&&z instanceof VideoFrame){const Ae=Math.floor(Ie*De.width),Bt=Math.floor(Ie*De.height);void 0===h&&(h=g(Ae,Bt));const Je=R?g(Ae,Bt):h;return Je.width=Ae,Je.height=Bt,Je.getContext("2d").drawImage(z,0,0,Ae,Bt),console.warn("THREE.WebGLRenderer: Texture has been resized from ("+De.width+"x"+De.height+") to ("+Ae+"x"+Bt+")."),Je}return"data"in z&&console.warn("THREE.WebGLRenderer: Image in DataTexture is too big ("+De.width+"x"+De.height+")."),z}return z}function v(z){return z.generateMipmaps&&z.minFilter!==_r&&z.minFilter!==lr}function y(z){i.generateMipmap(z)}function M(z,R,ce,Ie,De=!1){if(null!==z){if(void 0!==i[z])return i[z];console.warn("THREE.WebGLRenderer: Attempt to use non-existing WebGL internal format '"+z+"'")}let Ae=R;if(R===i.RED&&(ce===i.FLOAT&&(Ae=i.R32F),ce===i.HALF_FLOAT&&(Ae=i.R16F),ce===i.UNSIGNED_BYTE&&(Ae=i.R8)),R===i.RED_INTEGER&&(ce===i.UNSIGNED_BYTE&&(Ae=i.R8UI),ce===i.UNSIGNED_SHORT&&(Ae=i.R16UI),ce===i.UNSIGNED_INT&&(Ae=i.R32UI),ce===i.BYTE&&(Ae=i.R8I),ce===i.SHORT&&(Ae=i.R16I),ce===i.INT&&(Ae=i.R32I)),R===i.RG&&(ce===i.FLOAT&&(Ae=i.RG32F),ce===i.HALF_FLOAT&&(Ae=i.RG16F),ce===i.UNSIGNED_BYTE&&(Ae=i.RG8)),R===i.RG_INTEGER&&(ce===i.UNSIGNED_BYTE&&(Ae=i.RG8UI),ce===i.UNSIGNED_SHORT&&(Ae=i.RG16UI),ce===i.UNSIGNED_INT&&(Ae=i.RG32UI),ce===i.BYTE&&(Ae=i.RG8I),ce===i.SHORT&&(Ae=i.RG16I),ce===i.INT&&(Ae=i.RG32I)),R===i.RGB&&ce===i.UNSIGNED_INT_5_9_9_9_REV&&(Ae=i.RGB9_E5),R===i.RGBA){const Bt=De?NC:Jn.getTransfer(Ie);ce===i.FLOAT&&(Ae=i.RGBA32F),ce===i.HALF_FLOAT&&(Ae=i.RGBA16F),ce===i.UNSIGNED_BYTE&&(Ae=Bt===Fi?i.SRGB8_ALPHA8:i.RGBA8),ce===i.UNSIGNED_SHORT_4_4_4_4&&(Ae=i.RGBA4),ce===i.UNSIGNED_SHORT_5_5_5_1&&(Ae=i.RGB5_A1)}return(Ae===i.R16F||Ae===i.R32F||Ae===i.RG16F||Ae===i.RG32F||Ae===i.RGBA16F||Ae===i.RGBA32F)&&t.get("EXT_color_buffer_float"),Ae}function x(z,R){let ce;return z?null===R||R===xu||R===eg?ce=i.DEPTH24_STENCIL8:R===Qo?ce=i.DEPTH32F_STENCIL8:R===_b&&(ce=i.DEPTH24_STENCIL8,console.warn("DepthTexture: 16 bit depth attachment is not supported with stencil. Using 24-bit attachment.")):null===R||R===xu||R===eg?ce=i.DEPTH_COMPONENT24:R===Qo?ce=i.DEPTH_COMPONENT32F:R===_b&&(ce=i.DEPTH_COMPONENT16),ce}function C(z,R){return!0===v(z)||z.isFramebufferTexture&&z.minFilter!==_r&&z.minFilter!==lr?Math.log2(Math.max(R.width,R.height))+1:void 0!==z.mipmaps&&z.mipmaps.length>0?z.mipmaps.length:z.isCompressedTexture&&Array.isArray(z.image)?R.mipmaps.length:1}function F(z){const R=z.target;R.removeEventListener("dispose",F),function k(z){const R=n.get(z);if(void 0===R.__webglInit)return;const ce=z.source,Ie=p.get(ce);if(Ie){const De=Ie[R.__cacheKey];De.usedTimes--,0===De.usedTimes&&B(z),0===Object.keys(Ie).length&&p.delete(ce)}n.remove(z)}(R),R.isVideoTexture&&d.delete(R)}function D(z){const R=z.target;R.removeEventListener("dispose",D),function T(z){const R=n.get(z);if(z.depthTexture&&z.depthTexture.dispose(),z.isWebGLCubeRenderTarget)for(let Ie=0;Ie<6;Ie++){if(Array.isArray(R.__webglFramebuffer[Ie]))for(let De=0;De0&&ce.__version!==z.version){const Ie=z.image;if(null===Ie)console.warn("THREE.WebGLRenderer: Texture marked for update but no image data found.");else{if(!1!==Ie.complete)return void en(ce,z,R);console.warn("THREE.WebGLRenderer: Texture marked for update but image is incomplete")}}e.bindTexture(i.TEXTURE_2D,ce.__webglTexture,i.TEXTURE0+R)}const J={[Pa]:i.REPEAT,[Ii]:i.CLAMP_TO_EDGE,[mb]:i.MIRRORED_REPEAT},we={[_r]:i.NEAREST,[dk]:i.NEAREST_MIPMAP_NEAREST,[Qm]:i.NEAREST_MIPMAP_LINEAR,[lr]:i.LINEAR,[gb]:i.LINEAR_MIPMAP_NEAREST,[bl]:i.LINEAR_MIPMAP_LINEAR},Ne={[Aoe]:i.NEVER,[Poe]:i.ALWAYS,[Doe]:i.LESS,[E4]:i.LEQUAL,[Toe]:i.EQUAL,[koe]:i.GEQUAL,[Ioe]:i.GREATER,[Roe]:i.NOTEQUAL};function Ye(z,R){if(R.type===Qo&&!1===t.has("OES_texture_float_linear")&&(R.magFilter===lr||R.magFilter===gb||R.magFilter===Qm||R.magFilter===bl||R.minFilter===lr||R.minFilter===gb||R.minFilter===Qm||R.minFilter===bl)&&console.warn("THREE.WebGLRenderer: Unable to use linear filtering with floating point textures. OES_texture_float_linear not supported on this device."),i.texParameteri(z,i.TEXTURE_WRAP_S,J[R.wrapS]),i.texParameteri(z,i.TEXTURE_WRAP_T,J[R.wrapT]),(z===i.TEXTURE_3D||z===i.TEXTURE_2D_ARRAY)&&i.texParameteri(z,i.TEXTURE_WRAP_R,J[R.wrapR]),i.texParameteri(z,i.TEXTURE_MAG_FILTER,we[R.magFilter]),i.texParameteri(z,i.TEXTURE_MIN_FILTER,we[R.minFilter]),R.compareFunction&&(i.texParameteri(z,i.TEXTURE_COMPARE_MODE,i.COMPARE_REF_TO_TEXTURE),i.texParameteri(z,i.TEXTURE_COMPARE_FUNC,Ne[R.compareFunction])),!0===t.has("EXT_texture_filter_anisotropic")){if(R.magFilter===_r||R.minFilter!==Qm&&R.minFilter!==bl||R.type===Qo&&!1===t.has("OES_texture_float_linear"))return;if(R.anisotropy>1||n.get(R).__currentAnisotropy){const ce=t.get("EXT_texture_filter_anisotropic");i.texParameterf(z,ce.TEXTURE_MAX_ANISOTROPY_EXT,Math.min(R.anisotropy,r.getMaxAnisotropy())),n.get(R).__currentAnisotropy=R.anisotropy}}}function Tt(z,R){let ce=!1;void 0===z.__webglInit&&(z.__webglInit=!0,R.addEventListener("dispose",F));const Ie=R.source;let De=p.get(Ie);void 0===De&&(De={},p.set(Ie,De));const Ae=function ne(z){const R=[];return R.push(z.wrapS),R.push(z.wrapT),R.push(z.wrapR||0),R.push(z.magFilter),R.push(z.minFilter),R.push(z.anisotropy),R.push(z.internalFormat),R.push(z.format),R.push(z.type),R.push(z.generateMipmaps),R.push(z.premultiplyAlpha),R.push(z.flipY),R.push(z.unpackAlignment),R.push(z.colorSpace),R.join()}(R);if(Ae!==z.__cacheKey){void 0===De[Ae]&&(De[Ae]={texture:i.createTexture(),usedTimes:0},o.memory.textures++,ce=!0),De[Ae].usedTimes++;const Bt=De[z.__cacheKey];void 0!==Bt&&(De[z.__cacheKey].usedTimes--,0===Bt.usedTimes&&B(R)),z.__cacheKey=Ae,z.__webglTexture=De[Ae].texture}return ce}function en(z,R,ce){let Ie=i.TEXTURE_2D;(R.isDataArrayTexture||R.isCompressedArrayTexture)&&(Ie=i.TEXTURE_2D_ARRAY),R.isData3DTexture&&(Ie=i.TEXTURE_3D);const De=Tt(z,R),Ae=R.source;e.bindTexture(Ie,z.__webglTexture,i.TEXTURE0+ce);const Bt=n.get(Ae);if(Ae.version!==Bt.__version||!0===De){e.activeTexture(i.TEXTURE0+ce);const Je=Jn.getPrimaries(Jn.workingColorSpace),ut=R.colorSpace===wu?null:Jn.getPrimaries(R.colorSpace),bn=R.colorSpace===wu||Je===ut?i.NONE:i.BROWSER_DEFAULT_WEBGL;i.pixelStorei(i.UNPACK_FLIP_Y_WEBGL,R.flipY),i.pixelStorei(i.UNPACK_PREMULTIPLY_ALPHA_WEBGL,R.premultiplyAlpha),i.pixelStorei(i.UNPACK_ALIGNMENT,R.unpackAlignment),i.pixelStorei(i.UNPACK_COLORSPACE_CONVERSION_WEBGL,bn);let Ve=b(R.image,!1,r.maxTextureSize);Ve=it(R,Ve);const dt=s.convert(R.format,R.colorSpace),jn=s.convert(R.type);let gt,an=M(R.internalFormat,dt,jn,R.colorSpace,R.isVideoTexture);Ye(Ie,R);const vn=R.mipmaps,Pn=!0!==R.isVideoTexture,Ki=void 0===Bt.__version||!0===De,Z=Ae.dataReady,$e=C(R,Ve);if(R.isDepthTexture)an=x(R.format===ng,R.type),Ki&&(Pn?e.texStorage2D(i.TEXTURE_2D,1,an,Ve.width,Ve.height):e.texImage2D(i.TEXTURE_2D,0,an,Ve.width,Ve.height,0,dt,jn,null));else if(R.isDataTexture)if(vn.length>0){Pn&&Ki&&e.texStorage2D(i.TEXTURE_2D,$e,an,vn[0].width,vn[0].height);for(let Ce=0,Ee=vn.length;Ce0){const Ke=MP(gt.width,gt.height,R.format,R.type);for(const tn of R.layerUpdates){const ei=gt.data.subarray(tn*Ke/gt.data.BYTES_PER_ELEMENT,(tn+1)*Ke/gt.data.BYTES_PER_ELEMENT);e.compressedTexSubImage3D(i.TEXTURE_2D_ARRAY,Ce,0,0,tn,gt.width,gt.height,1,dt,ei,0,0)}R.clearLayerUpdates()}else e.compressedTexSubImage3D(i.TEXTURE_2D_ARRAY,Ce,0,0,0,gt.width,gt.height,Ve.depth,dt,gt.data,0,0)}else e.compressedTexImage3D(i.TEXTURE_2D_ARRAY,Ce,an,gt.width,gt.height,Ve.depth,0,gt.data,0,0);else console.warn("THREE.WebGLRenderer: Attempt to load unsupported compressed texture format in .uploadTexture()");else Pn?Z&&e.texSubImage3D(i.TEXTURE_2D_ARRAY,Ce,0,0,0,gt.width,gt.height,Ve.depth,dt,jn,gt.data):e.texImage3D(i.TEXTURE_2D_ARRAY,Ce,an,gt.width,gt.height,Ve.depth,0,dt,jn,gt.data)}else{Pn&&Ki&&e.texStorage2D(i.TEXTURE_2D,$e,an,vn[0].width,vn[0].height);for(let Ce=0,Ee=vn.length;Ce0){const Ce=MP(Ve.width,Ve.height,R.format,R.type);for(const Ee of R.layerUpdates){const Ke=Ve.data.subarray(Ee*Ce/Ve.data.BYTES_PER_ELEMENT,(Ee+1)*Ce/Ve.data.BYTES_PER_ELEMENT);e.texSubImage3D(i.TEXTURE_2D_ARRAY,0,0,0,Ee,Ve.width,Ve.height,1,dt,jn,Ke)}R.clearLayerUpdates()}else e.texSubImage3D(i.TEXTURE_2D_ARRAY,0,0,0,0,Ve.width,Ve.height,Ve.depth,dt,jn,Ve.data)}else e.texImage3D(i.TEXTURE_2D_ARRAY,0,an,Ve.width,Ve.height,Ve.depth,0,dt,jn,Ve.data);else if(R.isData3DTexture)Pn?(Ki&&e.texStorage3D(i.TEXTURE_3D,$e,an,Ve.width,Ve.height,Ve.depth),Z&&e.texSubImage3D(i.TEXTURE_3D,0,0,0,0,Ve.width,Ve.height,Ve.depth,dt,jn,Ve.data)):e.texImage3D(i.TEXTURE_3D,0,an,Ve.width,Ve.height,Ve.depth,0,dt,jn,Ve.data);else if(R.isFramebufferTexture){if(Ki)if(Pn)e.texStorage2D(i.TEXTURE_2D,$e,an,Ve.width,Ve.height);else{let Ce=Ve.width,Ee=Ve.height;for(let Ke=0;Ke<$e;Ke++)e.texImage2D(i.TEXTURE_2D,Ke,an,Ce,Ee,0,dt,jn,null),Ce>>=1,Ee>>=1}}else if(vn.length>0){if(Pn&&Ki){const Ce=pt(vn[0]);e.texStorage2D(i.TEXTURE_2D,$e,an,Ce.width,Ce.height)}for(let Ce=0,Ee=vn.length;Ce>Ae),dt=Math.max(1,R.height>>Ae);De===i.TEXTURE_3D||De===i.TEXTURE_2D_ARRAY?e.texImage3D(De,Ae,ut,Ve,dt,R.depth,0,Bt,Je,null):e.texImage2D(De,Ae,ut,Ve,dt,0,Bt,Je,null)}e.bindFramebuffer(i.FRAMEBUFFER,z),Me(R)?a.framebufferTexture2DMultisampleEXT(i.FRAMEBUFFER,Ie,De,n.get(ce).__webglTexture,0,nt(R)):(De===i.TEXTURE_2D||De>=i.TEXTURE_CUBE_MAP_POSITIVE_X&&De<=i.TEXTURE_CUBE_MAP_NEGATIVE_Z)&&i.framebufferTexture2D(i.FRAMEBUFFER,Ie,De,n.get(ce).__webglTexture,Ae),e.bindFramebuffer(i.FRAMEBUFFER,null)}function Ze(z,R,ce){if(i.bindRenderbuffer(i.RENDERBUFFER,z),R.depthBuffer){const Ie=R.depthTexture,Ae=x(R.stencilBuffer,Ie&&Ie.isDepthTexture?Ie.type:null),Bt=R.stencilBuffer?i.DEPTH_STENCIL_ATTACHMENT:i.DEPTH_ATTACHMENT,Je=nt(R);Me(R)?a.renderbufferStorageMultisampleEXT(i.RENDERBUFFER,Je,Ae,R.width,R.height):ce?i.renderbufferStorageMultisample(i.RENDERBUFFER,Je,Ae,R.width,R.height):i.renderbufferStorage(i.RENDERBUFFER,Ae,R.width,R.height),i.framebufferRenderbuffer(i.FRAMEBUFFER,Bt,i.RENDERBUFFER,z)}else{const Ie=R.textures;for(let De=0;De0&&!0===t.has("WEBGL_multisampled_render_to_texture")&&!1!==R.__useRenderToTexture}function it(z,R){const ce=z.colorSpace,Ie=z.format,De=z.type;return!0===z.isCompressedTexture||!0===z.isVideoTexture||ce!==ds&&ce!==wu&&(Jn.getTransfer(ce)===Fi?(Ie!==Ro||De!==Jc)&&console.warn("THREE.WebGLTextures: sRGB encoded textures have to use RGBAFormat and UnsignedByteType."):console.error("THREE.WebGLTextures: Unsupported texture color space:",ce)),R}function pt(z){return typeof HTMLImageElement<"u"&&z instanceof HTMLImageElement?(c.width=z.naturalWidth||z.width,c.height=z.naturalHeight||z.height):typeof VideoFrame<"u"&&z instanceof VideoFrame?(c.width=z.displayWidth,c.height=z.displayHeight):(c.width=z.width,c.height=z.height),c}this.allocateTextureUnit=function ie(){const z=A;return z>=r.maxTextures&&console.warn("THREE.WebGLTextures: Trying to use "+z+" texture units while this GPU supports only "+r.maxTextures),A+=1,z},this.resetTextureUnits=function $(){A=0},this.setTexture2D=se,this.setTexture2DArray=function ge(z,R){const ce=n.get(z);z.version>0&&ce.__version!==z.version?en(ce,z,R):e.bindTexture(i.TEXTURE_2D_ARRAY,ce.__webglTexture,i.TEXTURE0+R)},this.setTexture3D=function q(z,R){const ce=n.get(z);z.version>0&&ce.__version!==z.version?en(ce,z,R):e.bindTexture(i.TEXTURE_3D,ce.__webglTexture,i.TEXTURE0+R)},this.setTextureCube=function re(z,R){const ce=n.get(z);z.version>0&&ce.__version!==z.version?function ae(z,R,ce){if(6!==R.image.length)return;const Ie=Tt(z,R),De=R.source;e.bindTexture(i.TEXTURE_CUBE_MAP,z.__webglTexture,i.TEXTURE0+ce);const Ae=n.get(De);if(De.version!==Ae.__version||!0===Ie){e.activeTexture(i.TEXTURE0+ce);const Bt=Jn.getPrimaries(Jn.workingColorSpace),Je=R.colorSpace===wu?null:Jn.getPrimaries(R.colorSpace),ut=R.colorSpace===wu||Bt===Je?i.NONE:i.BROWSER_DEFAULT_WEBGL;i.pixelStorei(i.UNPACK_FLIP_Y_WEBGL,R.flipY),i.pixelStorei(i.UNPACK_PREMULTIPLY_ALPHA_WEBGL,R.premultiplyAlpha),i.pixelStorei(i.UNPACK_ALIGNMENT,R.unpackAlignment),i.pixelStorei(i.UNPACK_COLORSPACE_CONVERSION_WEBGL,ut);const bn=R.isCompressedTexture||R.image[0].isCompressedTexture,Ve=R.image[0]&&R.image[0].isDataTexture,dt=[];for(let Ee=0;Ee<6;Ee++)dt[Ee]=bn||Ve?Ve?R.image[Ee].image:R.image[Ee]:b(R.image[Ee],!0,r.maxCubemapSize),dt[Ee]=it(R,dt[Ee]);const jn=dt[0],an=s.convert(R.format,R.colorSpace),gt=s.convert(R.type),vn=M(R.internalFormat,an,gt,R.colorSpace),Pn=!0!==R.isVideoTexture,Ki=void 0===Ae.__version||!0===Ie,Z=De.dataReady;let Ce,$e=C(R,jn);if(Ye(i.TEXTURE_CUBE_MAP,R),bn){Pn&&Ki&&e.texStorage2D(i.TEXTURE_CUBE_MAP,$e,vn,jn.width,jn.height);for(let Ee=0;Ee<6;Ee++){Ce=dt[Ee].mipmaps;for(let Ke=0;Ke0&&$e++;const Ee=pt(dt[0]);e.texStorage2D(i.TEXTURE_CUBE_MAP,$e,vn,Ee.width,Ee.height)}for(let Ee=0;Ee<6;Ee++)if(Ve){Pn?Z&&e.texSubImage2D(i.TEXTURE_CUBE_MAP_POSITIVE_X+Ee,0,0,0,dt[Ee].width,dt[Ee].height,an,gt,dt[Ee].data):e.texImage2D(i.TEXTURE_CUBE_MAP_POSITIVE_X+Ee,0,vn,dt[Ee].width,dt[Ee].height,0,an,gt,dt[Ee].data);for(let Ke=0;Ke1;if(Bt||(void 0===Ie.__webglTexture&&(Ie.__webglTexture=i.createTexture()),Ie.__version=R.version,o.memory.textures++),Ae){ce.__webglFramebuffer=[];for(let Je=0;Je<6;Je++)if(R.mipmaps&&R.mipmaps.length>0){ce.__webglFramebuffer[Je]=[];for(let ut=0;ut0){ce.__webglFramebuffer=[];for(let Je=0;Je0&&!1===Me(z)){ce.__webglMultisampledFramebuffer=i.createFramebuffer(),ce.__webglColorRenderbuffer=[],e.bindFramebuffer(i.FRAMEBUFFER,ce.__webglMultisampledFramebuffer);for(let Je=0;Je0)for(let ut=0;ut0)for(let ut=0;ut0)if(!1===Me(z)){const R=z.textures,ce=z.width,Ie=z.height;let De=i.COLOR_BUFFER_BIT;const Ae=z.stencilBuffer?i.DEPTH_STENCIL_ATTACHMENT:i.DEPTH_ATTACHMENT,Bt=n.get(z),Je=R.length>1;if(Je)for(let ut=0;utm+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(bue)))}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 Fo;n.matrixAutoUpdate=!1,n.visible=!1,t.joints[e.jointName]=n,t.add(n)}return t.joints[e.jointName]}}class Mue{constructor(){this.texture=null,this.mesh=null,this.depthNear=0,this.depthFar=0}init(t,e,n){if(null===this.texture){const r=new ko;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}}getMesh(t){if(null!==this.texture&&null===this.mesh){const e=t.cameras[0].viewport,n=new Cl({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:e.z},depthHeight:{value:e.w}}});this.mesh=new Mn(new Iu(20,20),n)}return this.mesh}reset(){this.texture=null,this.mesh=null}getDepthTexture(){return this.texture}}class Cue extends og{constructor(t,e){super();const n=this;let r=null,s=1,o=null,a="local-floor",l=1,c=null,d=null,h=null,p=null,m=null,g=null;const b=new Mue,v=e.getContextAttributes();let y=null,M=null;const x=[],C=[],F=new xe;let D=null;const k=new yr;k.layers.enable(1),k.viewport=new gi;const B=new yr;B.layers.enable(2),B.viewport=new gi;const T=[k,B],A=new yue;A.layers.enable(1),A.layers.enable(2);let $=null,ie=null;function ne(ae){const Oe=C.indexOf(ae.inputSource);if(-1===Oe)return;const Ze=x[Oe];void 0!==Ze&&(Ze.update(ae.inputSource,ae.frame,c||o),Ze.dispatchEvent({type:ae.type,data:ae.inputSource}))}function se(){r.removeEventListener("select",ne),r.removeEventListener("selectstart",ne),r.removeEventListener("selectend",ne),r.removeEventListener("squeeze",ne),r.removeEventListener("squeezestart",ne),r.removeEventListener("squeezeend",ne),r.removeEventListener("end",se),r.removeEventListener("inputsourceschange",ge);for(let ae=0;ae=0&&(C[Fe]=null,x[Fe].disconnect(Ze))}for(let Oe=0;Oe=C.length){C.push(Ze),Fe=Ct;break}if(null===C[Ct]){C[Ct]=Ze,Fe=Ct;break}}if(-1===Fe)break}const bt=x[Fe];bt&&bt.connect(Ze)}}this.cameraAutoUpdate=!0,this.enabled=!1,this.isPresenting=!1,this.getController=function(ae){let Oe=x[ae];return void 0===Oe&&(Oe=new CP,x[ae]=Oe),Oe.getTargetRaySpace()},this.getControllerGrip=function(ae){let Oe=x[ae];return void 0===Oe&&(Oe=new CP,x[ae]=Oe),Oe.getGripSpace()},this.getHand=function(ae){let Oe=x[ae];return void 0===Oe&&(Oe=new CP,x[ae]=Oe),Oe.getHandSpace()},this.setFramebufferScaleFactor=function(ae){s=ae,!0===n.isPresenting&&console.warn("THREE.WebXRManager: Cannot change framebuffer scale while presenting.")},this.setReferenceSpaceType=function(ae){a=ae,!0===n.isPresenting&&console.warn("THREE.WebXRManager: Cannot change reference space type while presenting.")},this.getReferenceSpace=function(){return c||o},this.setReferenceSpace=function(ae){c=ae},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 ae=tt(function*(Oe){if(r=Oe,null!==r){if(y=t.getRenderTarget(),r.addEventListener("select",ne),r.addEventListener("selectstart",ne),r.addEventListener("selectend",ne),r.addEventListener("squeeze",ne),r.addEventListener("squeezestart",ne),r.addEventListener("squeezeend",ne),r.addEventListener("end",se),r.addEventListener("inputsourceschange",ge),!0!==v.xrCompatible&&(yield e.makeXRCompatible()),D=t.getPixelRatio(),t.getSize(F),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 Mu(m.framebufferWidth,m.framebufferHeight,{format:Ro,type:Jc,colorSpace:t.outputColorSpace,stencilBuffer:v.stencil});else{let Ze=null,Fe=null,bt=null;v.depth&&(bt=v.stencil?e.DEPTH24_STENCIL8:e.DEPTH_COMPONENT24,Ze=v.stencil?ng:tg,Fe=v.stencil?eg:xu);const Ct={colorFormat:e.RGBA8,depthFormat:bt,scaleFactor:s};h=new XRWebGLBinding(r,e),p=h.createProjectionLayer(Ct),r.updateRenderState({layers:[p]}),t.setPixelRatio(1),t.setSize(p.textureWidth,p.textureHeight,!1),M=new Mu(p.textureWidth,p.textureHeight,{format:Ro,type:Jc,depthTexture:new d5(p.textureWidth,p.textureHeight,Fe,void 0,void 0,void 0,void 0,void 0,void 0,Ze),stencilBuffer:v.stencil,colorSpace:t.outputColorSpace,samples:v.antialias?4:0,resolveDepthBuffer:!1===p.ignoreDepthValues})}M.isXRRenderTarget=!0,this.setFoveation(l),c=null,o=yield r.requestReferenceSpace(a),en.setContext(r),en.start(),n.isPresenting=!0,n.dispatchEvent({type:"sessionstart"})}});return function(Oe){return ae.apply(this,arguments)}}(),this.getEnvironmentBlendMode=function(){if(null!==r)return r.environmentBlendMode},this.getDepthTexture=function(){return b.getDepthTexture()};const q=new O,re=new O;function we(ae,Oe){null===Oe?ae.matrixWorld.copy(ae.matrix):ae.matrixWorld.multiplyMatrices(Oe.matrixWorld,ae.matrix),ae.matrixWorldInverse.copy(ae.matrixWorld).invert()}this.updateCamera=function(ae){if(null===r)return;null!==b.texture&&(ae.near=b.depthNear,ae.far=b.depthFar),A.near=B.near=k.near=ae.near,A.far=B.far=k.far=ae.far,($!==A.near||ie!==A.far)&&(r.updateRenderState({depthNear:A.near,depthFar:A.far}),$=A.near,ie=A.far,k.near=$,k.far=ie,B.near=$,B.far=ie,k.updateProjectionMatrix(),B.updateProjectionMatrix(),ae.updateProjectionMatrix());const Oe=ae.parent,Ze=A.cameras;we(A,Oe);for(let Fe=0;Fe0&&(v.alphaTest.value=y.alphaTest);const M=t.get(y),x=M.envMap,C=M.envMapRotation;x&&(v.envMap.value=x,df.copy(C),df.x*=-1,df.y*=-1,df.z*=-1,x.isCubeTexture&&!1===x.isRenderTargetTexture&&(df.y*=-1,df.z*=-1),v.envMapRotation.value.setFromMatrix4(Sue.makeRotationFromEuler(df)),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,v.lightMapIntensity.value=y.lightMapIntensity,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,Z4(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 d(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===Io&&v.clearcoatNormalScale.value.negate())),y.dispersion>0&&(v.dispersion.value=y.dispersion),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 Aue(i,t,e,n){let r={},s={},o=[];const a=i.getParameter(i.MAX_UNIFORM_BUFFER_BINDINGS);function m(M,x,C,F){const D=M.value,k=x+"_"+C;if(void 0===F[k])return F[k]="number"==typeof D||"boolean"==typeof D?D:D.clone(),!0;{const B=F[k];if("number"==typeof D||"boolean"==typeof D){if(B!==D)return F[k]=D,!0}else if(!1===B.equals(D))return B.copy(D),!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 k=0,B=x.length;k0&&(C+=16-D),M.__size=C,M.__cache={}}(M),C=function d(M){const x=function h(){for(let M=0;M0),Xt=!!le.morphAttributes.position,ai=!!le.morphAttributes.normal,Li=!!le.morphAttributes.color;let tr=bu;de.toneMapped&&(null===k||!0===k.isXRRenderTarget)&&(tr=x.toneMapping);const oa=le.morphAttributes.position||le.morphAttributes.normal||le.morphAttributes.color,ui=void 0!==oa?oa.length:0,It=it.get(de),fs=v.state.lights;!0!==ae||!0!==Oe&&L===T||bn.setState(de,L,L===T&&de.id===B);let hi=!1;de.version===It.__version?(It.needsLights&&It.lightsStateVersion!==fs.state.version||It.outputColorSpace!==xt||te.isBatchedMesh&&!1===It.batching||!te.isBatchedMesh&&!0===It.batching||te.isBatchedMesh&&!0===It.batchingColor&&null===te.colorTexture||te.isBatchedMesh&&!1===It.batchingColor&&null!==te.colorTexture||te.isInstancedMesh&&!1===It.instancing||!te.isInstancedMesh&&!0===It.instancing||te.isSkinnedMesh&&!1===It.skinning||!te.isSkinnedMesh&&!0===It.skinning||te.isInstancedMesh&&!0===It.instancingColor&&null===te.instanceColor||te.isInstancedMesh&&!1===It.instancingColor&&null!==te.instanceColor||te.isInstancedMesh&&!0===It.instancingMorph&&null===te.morphTexture||te.isInstancedMesh&&!1===It.instancingMorph&&null!==te.morphTexture||It.envMap!==wt||!0===de.fog&&It.fog!==je||void 0!==It.numClippingPlanes&&(It.numClippingPlanes!==bn.numPlanes||It.numIntersection!==bn.numIntersection)||It.vertexAlphas!==qt||It.vertexTangents!==on||It.morphTargets!==Xt||It.morphNormals!==ai||It.morphColors!==Li||It.toneMapping!==tr||It.morphTargetsCount!==ui)&&(hi=!0):(hi=!0,It.__version=de.version);let El=It.currentProgram;!0===hi&&(El=xE(de,K,te));let qg=!1,aa=!1,qO=!1;const xr=El.getUniforms(),Bu=It.uniforms;if(Me.useProgram(El.program)&&(qg=!0,aa=!0,qO=!0),de.id!==B&&(B=de.id,aa=!0),qg||T!==L){xr.setValue(N,"projectionMatrix",L.projectionMatrix),xr.setValue(N,"viewMatrix",L.matrixWorldInverse);const za=xr.map.cameraPosition;void 0!==za&&za.setValue(N,Fe.setFromMatrixPosition(L.matrixWorld)),nt.logarithmicDepthBuffer&&xr.setValue(N,"logDepthBufFC",2/(Math.log(L.far+1)/Math.LN2)),(de.isMeshPhongMaterial||de.isMeshToonMaterial||de.isMeshLambertMaterial||de.isMeshBasicMaterial||de.isMeshStandardMaterial||de.isShaderMaterial)&&xr.setValue(N,"isOrthographic",!0===L.isOrthographicCamera),T!==L&&(T=L,aa=!0,qO=!0)}if(te.isSkinnedMesh){xr.setOptional(N,te,"bindMatrix"),xr.setOptional(N,te,"bindMatrixInverse");const za=te.skeleton;za&&(null===za.boneTexture&&za.computeBoneTexture(),xr.setValue(N,"boneTexture",za.boneTexture,pt))}te.isBatchedMesh&&(xr.setOptional(N,te,"batchingTexture"),xr.setValue(N,"batchingTexture",te._matricesTexture,pt),xr.setOptional(N,te,"batchingIdTexture"),xr.setValue(N,"batchingIdTexture",te._indirectTexture,pt),xr.setOptional(N,te,"batchingColorTexture"),null!==te._colorsTexture&&xr.setValue(N,"batchingColorTexture",te._colorsTexture,pt));const XO=le.morphAttributes;if((void 0!==XO.position||void 0!==XO.normal||void 0!==XO.color)&&jn.update(te,le,El),(aa||It.receiveShadow!==te.receiveShadow)&&(It.receiveShadow=te.receiveShadow,xr.setValue(N,"receiveShadow",te.receiveShadow)),de.isMeshGouraudMaterial&&null!==de.envMap&&(Bu.envMap.value=wt,Bu.flipEnvMap.value=wt.isCubeTexture&&!1===wt.isRenderTargetTexture?-1:1),de.isMeshStandardMaterial&&null===de.envMap&&null!==K.environment&&(Bu.envMapIntensity.value=K.environmentIntensity),aa&&(xr.setValue(N,"toneMappingExposure",x.toneMappingExposure),It.needsLights&&function Rve(L,K){L.ambientLightColor.needsUpdate=K,L.lightProbe.needsUpdate=K,L.directionalLights.needsUpdate=K,L.directionalLightShadows.needsUpdate=K,L.pointLights.needsUpdate=K,L.pointLightShadows.needsUpdate=K,L.spotLights.needsUpdate=K,L.spotLightShadows.needsUpdate=K,L.rectAreaLights.needsUpdate=K,L.hemisphereLights.needsUpdate=K}(Bu,qO),je&&!0===de.fog&&Bt.refreshFogUniforms(Bu,je),Bt.refreshMaterialUniforms(Bu,de,re,q,v.state.transmissionRenderTarget[L.id]),uS.upload(N,g8(It),Bu,pt)),de.isShaderMaterial&&!0===de.uniformsNeedUpdate&&(uS.upload(N,g8(It),Bu,pt),de.uniformsNeedUpdate=!1),de.isSpriteMaterial&&xr.setValue(N,"center",te.center),xr.setValue(N,"modelViewMatrix",te.modelViewMatrix),xr.setValue(N,"normalMatrix",te.normalMatrix),xr.setValue(N,"modelMatrix",te.matrixWorld),de.isShaderMaterial||de.isRawShaderMaterial){const za=de.uniformsGroups;for(let KO=0,Pve=za.length;KO{function je(){de.forEach(function(st){it.get(st).currentProgram.isReady()&&de.delete(st)}),0!==de.size?setTimeout(je,10):te(L)}null!==Le.get("KHR_parallel_shader_compile")?je():setTimeout(je,10)})};let di=null;function hc(){kf.stop()}function h8(){kf.start()}const kf=new t5;function YO(L,K,le,de){if(!1===L.visible)return;if(L.layers.test(K.layers))if(L.isGroup)le=L.renderOrder;else if(L.isLOD)!0===L.autoUpdate&&L.update(K);else if(L.isLight)v.pushLight(L),L.castShadow&&v.pushShadow(L);else if(L.isSprite){if(!L.frustumCulled||en.intersectsSprite(L)){de&&bt.setFromMatrixPosition(L.matrixWorld).applyMatrix4(Ze);const st=De.update(L),xt=L.material;xt.visible&&b.push(L,st,xt,le,bt.z,null)}}else if((L.isMesh||L.isLine||L.isPoints)&&(!L.frustumCulled||en.intersectsObject(L))){const st=De.update(L),xt=L.material;if(de&&(void 0!==L.boundingSphere?(null===L.boundingSphere&&L.computeBoundingSphere(),bt.copy(L.boundingSphere.center)):(null===st.boundingSphere&&st.computeBoundingSphere(),bt.copy(st.boundingSphere.center)),bt.applyMatrix4(L.matrixWorld).applyMatrix4(Ze)),Array.isArray(xt)){const wt=st.groups;for(let qt=0,on=wt.length;qt0&&bE(te,K,le),je.length>0&&bE(je,K,le),st.length>0&&bE(st,K,le),Me.buffers.depth.setTest(!0),Me.buffers.depth.setMask(!0),Me.buffers.color.setMask(!0),Me.setPolygonOffset(!1)}function p8(L,K,le,de){if(null!==(!0===le.isScene?le.overrideMaterial:null))return;void 0===v.state.transmissionRenderTarget[de.id]&&(v.state.transmissionRenderTarget[de.id]=new Mu(1,1,{generateMipmaps:!0,type:Le.has("EXT_color_buffer_half_float")||Le.has("EXT_color_buffer_float")?Jm:Jc,minFilter:bl,samples:4,stencilBuffer:s,resolveDepthBuffer:!1,resolveStencilBuffer:!1,colorSpace:Jn.workingColorSpace}));const je=v.state.transmissionRenderTarget[de.id],st=de.viewport||A;je.setSize(st.z,st.w);const xt=x.getRenderTarget();x.setRenderTarget(je),x.getClearColor(ne),se=x.getClearAlpha(),se<1&&x.setClearColor(16777215,.5),x.clear(),Mt&&dt.render(le);const wt=x.toneMapping;x.toneMapping=bu;const qt=de.viewport;if(void 0!==de.viewport&&(de.viewport=void 0),v.setupLightsView(de),!0===ae&&bn.setGlobalState(x.clippingPlanes,de),bE(L,le,de),pt.updateMultisampleRenderTarget(je),pt.updateRenderTargetMipmap(je),!1===Le.has("WEBGL_multisampled_render_to_texture")){let on=!1;for(let Xt=0,ai=K.length;Xt0)for(let st=0,xt=je.length;st0&&p8(de,te,L,K),Mt&&dt.render(L),f8(b,L,K);null!==k&&(pt.updateMultisampleRenderTarget(k),pt.updateRenderTargetMipmap(k)),!0===L.isScene&&L.onAfterRender(x,L,K),Pn.resetDefaultState(),B=-1,T=null,M.pop(),M.length>0?(v=M[M.length-1],!0===ae&&bn.setGlobalState(x.clippingPlanes,v.state.camera)):v=null,y.pop(),b=y.length>0?y[y.length-1]:null},this.getActiveCubeFace=function(){return F},this.getActiveMipmapLevel=function(){return D},this.getRenderTarget=function(){return k},this.setRenderTargetTextures=function(L,K,le){it.get(L.texture).__webglTexture=K,it.get(L.depthTexture).__webglTexture=le;const de=it.get(L);de.__hasExternalTextures=!0,de.__autoAllocateDepthBuffer=void 0===le,de.__autoAllocateDepthBuffer||!0===Le.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(L,K){const le=it.get(L);le.__webglFramebuffer=K,le.__useDefaultFramebuffer=void 0===K},this.setRenderTarget=function(L,K=0,le=0){k=L,F=K,D=le;let de=!0,te=null,je=!1,st=!1;if(L){const wt=it.get(L);void 0!==wt.__useDefaultFramebuffer?(Me.bindFramebuffer(N.FRAMEBUFFER,null),de=!1):void 0===wt.__webglFramebuffer?pt.setupRenderTarget(L):wt.__hasExternalTextures&&pt.rebindTextures(L,it.get(L.texture).__webglTexture,it.get(L.depthTexture).__webglTexture);const qt=L.texture;(qt.isData3DTexture||qt.isDataArrayTexture||qt.isCompressedArrayTexture)&&(st=!0);const on=it.get(L).__webglFramebuffer;L.isWebGLCubeRenderTarget?(te=Array.isArray(on[K])?on[K][le]:on[K],je=!0):te=L.samples>0&&!1===pt.useMultisampledRTT(L)?it.get(L).__webglMultisampledFramebuffer:Array.isArray(on)?on[le]:on,A.copy(L.viewport),$.copy(L.scissor),ie=L.scissorTest}else A.copy(Ne).multiplyScalar(re).floor(),$.copy(Ye).multiplyScalar(re).floor(),ie=Tt;if(Me.bindFramebuffer(N.FRAMEBUFFER,te)&&de&&Me.drawBuffers(L,te),Me.viewport(A),Me.scissor($),Me.setScissorTest(ie),je){const wt=it.get(L.texture);N.framebufferTexture2D(N.FRAMEBUFFER,N.COLOR_ATTACHMENT0,N.TEXTURE_CUBE_MAP_POSITIVE_X+K,wt.__webglTexture,le)}else if(st){const wt=it.get(L.texture);N.framebufferTextureLayer(N.FRAMEBUFFER,N.COLOR_ATTACHMENT0,wt.__webglTexture,le||0,K||0)}B=-1},this.readRenderTargetPixels=function(L,K,le,de,te,je,st){if(!L||!L.isWebGLRenderTarget)return void console.error("THREE.WebGLRenderer.readRenderTargetPixels: renderTarget is not THREE.WebGLRenderTarget.");let xt=it.get(L).__webglFramebuffer;if(L.isWebGLCubeRenderTarget&&void 0!==st&&(xt=xt[st]),xt){Me.bindFramebuffer(N.FRAMEBUFFER,xt);try{const wt=L.texture,qt=wt.format,on=wt.type;if(!nt.textureFormatReadable(qt))return void console.error("THREE.WebGLRenderer.readRenderTargetPixels: renderTarget is not in RGBA or implementation defined format.");if(!nt.textureTypeReadable(on))return void console.error("THREE.WebGLRenderer.readRenderTargetPixels: renderTarget is not in UnsignedByteType or implementation defined type.");K>=0&&K<=L.width-de&&le>=0&&le<=L.height-te&&N.readPixels(K,le,de,te,vn.convert(qt),vn.convert(on),je)}finally{const wt=null!==k?it.get(k).__webglFramebuffer:null;Me.bindFramebuffer(N.FRAMEBUFFER,wt)}}},this.readRenderTargetPixelsAsync=function(){var L=tt(function*(K,le,de,te,je,st,xt){if(!K||!K.isWebGLRenderTarget)throw new Error("THREE.WebGLRenderer.readRenderTargetPixels: renderTarget is not THREE.WebGLRenderTarget.");let wt=it.get(K).__webglFramebuffer;if(K.isWebGLCubeRenderTarget&&void 0!==xt&&(wt=wt[xt]),wt){Me.bindFramebuffer(N.FRAMEBUFFER,wt);try{const qt=K.texture,on=qt.format,Xt=qt.type;if(!nt.textureFormatReadable(on))throw new Error("THREE.WebGLRenderer.readRenderTargetPixelsAsync: renderTarget is not in RGBA or implementation defined format.");if(!nt.textureTypeReadable(Xt))throw new Error("THREE.WebGLRenderer.readRenderTargetPixelsAsync: renderTarget is not in UnsignedByteType or implementation defined type.");if(le>=0&&le<=K.width-te&&de>=0&&de<=K.height-je){const ai=N.createBuffer();N.bindBuffer(N.PIXEL_PACK_BUFFER,ai),N.bufferData(N.PIXEL_PACK_BUFFER,st.byteLength,N.STREAM_READ),N.readPixels(le,de,te,je,vn.convert(on),vn.convert(Xt),0),N.flush();const Li=N.fenceSync(N.SYNC_GPU_COMMANDS_COMPLETE,0);yield function Joe(i,t,e){return new Promise(function(n,r){setTimeout(function s(){switch(i.clientWaitSync(t,i.SYNC_FLUSH_COMMANDS_BIT,0)){case i.WAIT_FAILED:r();break;case i.TIMEOUT_EXPIRED:setTimeout(s,e);break;default:n()}},e)})}(N,Li,4);try{N.bindBuffer(N.PIXEL_PACK_BUFFER,ai),N.getBufferSubData(N.PIXEL_PACK_BUFFER,0,st)}finally{N.deleteBuffer(ai),N.deleteSync(Li)}return st}}finally{const qt=null!==k?it.get(k).__webglFramebuffer:null;Me.bindFramebuffer(N.FRAMEBUFFER,qt)}}});return function(K,le,de,te,je,st,xt){return L.apply(this,arguments)}}(),this.copyFramebufferToTexture=function(L,K=null,le=0){!0!==L.isTexture&&(cg("WebGLRenderer: copyFramebufferToTexture function signature has changed."),K=arguments[0]||null,L=arguments[1]);const de=Math.pow(2,-le),te=Math.floor(L.image.width*de),je=Math.floor(L.image.height*de),st=null!==K?K.x:0,xt=null!==K?K.y:0;pt.setTexture2D(L,0),N.copyTexSubImage2D(N.TEXTURE_2D,le,0,0,st,xt,te,je),Me.unbindTexture()},this.copyTextureToTexture=function(L,K,le=null,de=null,te=0){let je,st,xt,wt,qt,on;!0!==L.isTexture&&(cg("WebGLRenderer: copyTextureToTexture function signature has changed."),de=arguments[0]||null,L=arguments[1],K=arguments[2],te=arguments[3]||0,le=null),null!==le?(je=le.max.x-le.min.x,st=le.max.y-le.min.y,xt=le.min.x,wt=le.min.y):(je=L.image.width,st=L.image.height,xt=0,wt=0),null!==de?(qt=de.x,on=de.y):(qt=0,on=0);const Xt=vn.convert(K.format),ai=vn.convert(K.type);pt.setTexture2D(K,0),N.pixelStorei(N.UNPACK_FLIP_Y_WEBGL,K.flipY),N.pixelStorei(N.UNPACK_PREMULTIPLY_ALPHA_WEBGL,K.premultiplyAlpha),N.pixelStorei(N.UNPACK_ALIGNMENT,K.unpackAlignment);const Li=N.getParameter(N.UNPACK_ROW_LENGTH),tr=N.getParameter(N.UNPACK_IMAGE_HEIGHT),oa=N.getParameter(N.UNPACK_SKIP_PIXELS),ui=N.getParameter(N.UNPACK_SKIP_ROWS),It=N.getParameter(N.UNPACK_SKIP_IMAGES),fs=L.isCompressedTexture?L.mipmaps[te]:L.image;N.pixelStorei(N.UNPACK_ROW_LENGTH,fs.width),N.pixelStorei(N.UNPACK_IMAGE_HEIGHT,fs.height),N.pixelStorei(N.UNPACK_SKIP_PIXELS,xt),N.pixelStorei(N.UNPACK_SKIP_ROWS,wt),L.isDataTexture?N.texSubImage2D(N.TEXTURE_2D,te,qt,on,je,st,Xt,ai,fs.data):L.isCompressedTexture?N.compressedTexSubImage2D(N.TEXTURE_2D,te,qt,on,fs.width,fs.height,Xt,fs.data):N.texSubImage2D(N.TEXTURE_2D,te,qt,on,je,st,Xt,ai,fs),N.pixelStorei(N.UNPACK_ROW_LENGTH,Li),N.pixelStorei(N.UNPACK_IMAGE_HEIGHT,tr),N.pixelStorei(N.UNPACK_SKIP_PIXELS,oa),N.pixelStorei(N.UNPACK_SKIP_ROWS,ui),N.pixelStorei(N.UNPACK_SKIP_IMAGES,It),0===te&&K.generateMipmaps&&N.generateMipmap(N.TEXTURE_2D),Me.unbindTexture()},this.copyTextureToTexture3D=function(L,K,le=null,de=null,te=0){let je,st,xt,wt,qt,on,Xt,ai,Li;!0!==L.isTexture&&(cg("WebGLRenderer: copyTextureToTexture3D function signature has changed."),le=arguments[0]||null,de=arguments[1]||null,L=arguments[2],K=arguments[3],te=arguments[4]||0);const tr=L.isCompressedTexture?L.mipmaps[te]:L.image;null!==le?(je=le.max.x-le.min.x,st=le.max.y-le.min.y,xt=le.max.z-le.min.z,wt=le.min.x,qt=le.min.y,on=le.min.z):(je=tr.width,st=tr.height,xt=tr.depth,wt=0,qt=0,on=0),null!==de?(Xt=de.x,ai=de.y,Li=de.z):(Xt=0,ai=0,Li=0);const oa=vn.convert(K.format),ui=vn.convert(K.type);let It;if(K.isData3DTexture)pt.setTexture3D(K,0),It=N.TEXTURE_3D;else{if(!K.isDataArrayTexture&&!K.isCompressedArrayTexture)return void console.warn("THREE.WebGLRenderer.copyTextureToTexture3D: only supports THREE.DataTexture3D and THREE.DataTexture2DArray.");pt.setTexture2DArray(K,0),It=N.TEXTURE_2D_ARRAY}N.pixelStorei(N.UNPACK_FLIP_Y_WEBGL,K.flipY),N.pixelStorei(N.UNPACK_PREMULTIPLY_ALPHA_WEBGL,K.premultiplyAlpha),N.pixelStorei(N.UNPACK_ALIGNMENT,K.unpackAlignment);const fs=N.getParameter(N.UNPACK_ROW_LENGTH),hi=N.getParameter(N.UNPACK_IMAGE_HEIGHT),El=N.getParameter(N.UNPACK_SKIP_PIXELS),qg=N.getParameter(N.UNPACK_SKIP_ROWS),aa=N.getParameter(N.UNPACK_SKIP_IMAGES);N.pixelStorei(N.UNPACK_ROW_LENGTH,tr.width),N.pixelStorei(N.UNPACK_IMAGE_HEIGHT,tr.height),N.pixelStorei(N.UNPACK_SKIP_PIXELS,wt),N.pixelStorei(N.UNPACK_SKIP_ROWS,qt),N.pixelStorei(N.UNPACK_SKIP_IMAGES,on),L.isDataTexture||L.isData3DTexture?N.texSubImage3D(It,te,Xt,ai,Li,je,st,xt,oa,ui,tr.data):K.isCompressedArrayTexture?N.compressedTexSubImage3D(It,te,Xt,ai,Li,je,st,xt,oa,tr.data):N.texSubImage3D(It,te,Xt,ai,Li,je,st,xt,oa,ui,tr),N.pixelStorei(N.UNPACK_ROW_LENGTH,fs),N.pixelStorei(N.UNPACK_IMAGE_HEIGHT,hi),N.pixelStorei(N.UNPACK_SKIP_PIXELS,El),N.pixelStorei(N.UNPACK_SKIP_ROWS,qg),N.pixelStorei(N.UNPACK_SKIP_IMAGES,aa),0===te&&K.generateMipmaps&&N.generateMipmap(It),Me.unbindTexture()},this.initRenderTarget=function(L){void 0===it.get(L).__webglFramebuffer&&pt.setupRenderTarget(L)},this.initTexture=function(L){L.isCubeTexture?pt.setTextureCube(L,0):L.isData3DTexture?pt.setTexture3D(L,0):L.isDataArrayTexture||L.isCompressedArrayTexture?pt.setTexture2DArray(L,0):pt.setTexture2D(L,0),Me.unbindTexture()},this.resetState=function(){F=0,D=0,k=null,Me.reset(),Pn.reset()},typeof __THREE_DEVTOOLS__<"u"&&__THREE_DEVTOOLS__.dispatchEvent(new CustomEvent("observe",{detail:this}))}get coordinateSystem(){return ed}get outputColorSpace(){return this._outputColorSpace}set outputColorSpace(t){this._outputColorSpace=t;const e=this.getContext();e.drawingBufferColorSpace=t===jk?"display-p3":"srgb",e.unpackColorSpace=Jn.workingColorSpace===LC?"display-p3":"srgb"}}class Rb extends Or{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 id,this.environmentIntensity=1,this.environmentRotation=new id,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 AP{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=Jo()}onUploadCallback(){}set needsUpdate(t){!0===t&&this.version++}get updateRange(){return cg("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;r0){const r=e[n[0]];if(void 0!==r){this.morphTargetInfluences=[],this.morphTargetDictionary={};for(let s=0,o=r.length;sn)return;FP.applyMatrix4(i.matrixWorld);const l=t.ray.origin.distanceTo(FP);return lt.far?void 0:{distance:l,point:Z5.clone().applyMatrix4(i.matrixWorld),index:r,face:null,faceIndex:null,object:i}}const Q5=new O,J5=new O;class Ng extends ff{constructor(t,e){super(t,e),this.isLineSegments=!0,this.type="LineSegments"}computeLineDistances(){const t=this.geometry;if(null===t.index){const e=t.attributes.position,n=[];for(let r=0,s=e.count;r0){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 cc{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 d=n[r];return(r+(o-d)/(n[r+1]-d))/(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 xe:new O);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 O,r=[],s=[],o=[],a=new O,l=new Nt;for(let m=0;m<=t;m++)r[m]=this.getTangentAt(m/t,new O);s[0]=new O,o[0]=new O;let c=Number.MAX_VALUE;const d=Math.abs(r[0].x),h=Math.abs(r[0].y),p=Math.abs(r[0].z);d<=c&&(c=d,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 NP extends cc{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 xe){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(iG(a,l.x,c.x,d.x,h.x),iG(a,l.y,c.y,d.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]:(DS.subVectors(r[0],r[1]).add(r[0]),c=DS);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 d=c.getPoint(1);return this.currentPoint.copy(d),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 RS extends hn{constructor(t=[new xe(0,-.5),new xe(.5,0),new xe(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=[],d=1/e,h=new O,p=new xe,m=new O,g=new O,b=new O;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*d*r,C=Math.sin(x),F=Math.cos(x);for(let D=0;D<=t.length-1;D++)h.x=t[D].x*C,h.y=t[D].y,h.z=t[D].x*F,o.push(h.x,h.y,h.z),p.x=M/e,p.y=D/(t.length-1),a.push(p.x,p.y),c.push(l[3*D+0]*C,l[3*D+1],l[3*D+0]*F)}for(let M=0;M0&&x(!0),e>0&&x(!1)),this.setIndex(d),this.setAttribute("position",new ct(h,3)),this.setAttribute("normal",new ct(p,3)),this.setAttribute("uv",new ct(m,2))}copy(t){return super.copy(t),this.parameters=Object.assign({},t.parameters),this}static fromJSON(t){return new Bg(t.radiusTop,t.radiusBottom,t.height,t.radialSegments,t.heightSegments,t.openEnded,t.thetaStart,t.thetaLength)}}class PS extends Bg{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 PS(t.radius,t.height,t.radialSegments,t.heightSegments,t.openEnded,t.thetaStart,t.thetaLength)}}class Wb 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 d=[],h=new O,p=new O,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 F=0;F<=e;F++){const D=F/e;h.x=-t*Math.cos(r+D*s)*Math.sin(o+x*a),h.y=t*Math.cos(o+x*a),h.z=t*Math.sin(r+D*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(D+C,1-x),M.push(c++)}d.push(M)}for(let y=0;y0)&&m.push(d[y][M+1],C,D),(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 dispersion(){return this._dispersion}set dispersion(t){this._dispersion>0!=t>0&&this.version++,this._dispersion=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.dispersion=t.dispersion,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 zS extends Po{constructor(t){super(),this.isMeshPhongMaterial=!0,this.type="MeshPhongMaterial",this.color=new qe(16777215),this.specular=new qe(1118481),this.shininess=30,this.map=null,this.lightMap=null,this.lightMapIntensity=1,this.aoMap=null,this.aoMapIntensity=1,this.emissive=new qe(0),this.emissiveIntensity=1,this.emissiveMap=null,this.bumpMap=null,this.bumpScale=1,this.normalMap=null,this.normalMapType=Zh,this.normalScale=new xe(1,1),this.displacementMap=null,this.displacementScale=1,this.displacementBias=0,this.specularMap=null,this.alphaMap=null,this.envMap=null,this.envMapRotation=new id,this.combine=EC,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 _f(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 vG(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 tO(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 nO(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 Yb{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 _G(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}}dc.prototype.TimeBufferType=Float32Array,dc.prototype.ValueBufferType=Float32Array,dc.prototype.DefaultInterpolation=yb;class zg extends dc{constructor(t,e,n){super(t,e,n)}}zg.prototype.ValueTypeName="bool",zg.prototype.ValueBufferType=Array,zg.prototype.DefaultInterpolation=vb,zg.prototype.InterpolantFactoryMethodLinear=void 0,zg.prototype.InterpolantFactoryMethodSmooth=void 0;class bG extends dc{}bG.prototype.ValueTypeName="color";class Hg extends dc{}Hg.prototype.ValueTypeName="number";class Ohe extends Yb{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 d=c+a;c!==d;c+=4)co.slerpFlat(s,0,o,c-a,o,c,l);return s}}class Gg extends dc{InterpolantFactoryMethodLinear(t){return new Ohe(this.times,this.values,this.getValueSize(),t)}}Gg.prototype.ValueTypeName="quaternion",Gg.prototype.InterpolantFactoryMethodSmooth=void 0;class $g extends dc{constructor(t,e,n){super(t,e,n)}}$g.prototype.ValueTypeName="string",$g.prototype.ValueBufferType=Array,$g.prototype.DefaultInterpolation=vb,$g.prototype.InterpolantFactoryMethodLinear=void 0,$g.prototype.InterpolantFactoryMethodSmooth=void 0;class Wg extends dc{}Wg.prototype.ValueTypeName="vector";class qb{constructor(t="",e=-1,n=[],r=2500){this.name=t,this.tracks=n,this.duration=e,this.blendMode=r,this.uuid=Jo(),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(Lhe(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(dc.toJSON(n[s]));return r}static CreateFromMorphTargetSequence(t,e,n,r){const s=e.length,o=[];for(let a=0;a1){const h=d[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=[];nO(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:wG,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 dd={};class Nhe extends Error{constructor(t,e){super(t),this.response=e}}class La extends vf{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=ku.get(t);if(void 0!==s)return this.manager.itemStart(t),setTimeout(()=>{e&&e(s),this.manager.itemEnd(t)},0),s;if(void 0!==dd[t])return void dd[t].push({onLoad:e,onProgress:n,onError:r});dd[t]=[],dd[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 d=dd[t],h=c.body.getReader(),p=c.headers.get("X-File-Size")||c.headers.get("Content-Length"),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 F=new ProgressEvent("progress",{lengthComputable:g,loaded:b,total:m});for(let D=0,k=d.length;D{y.error(x)})}()}});return new Response(v)}throw new Nhe(`fetch for "${c.url}" responded with ${c.status}: ${c.statusText}`,c)}).then(c=>{switch(l){case"arraybuffer":return c.arrayBuffer();case"blob":return c.blob();case"document":return c.text().then(d=>(new DOMParser).parseFromString(d,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=>{ku.add(t,c);const d=dd[t];delete dd[t];for(let h=0,p=d.length;h{const d=dd[t];if(void 0===d)throw this.manager.itemError(t),c;delete dd[t];for(let h=0,p=d.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 HS extends vf{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=ku.get(t);if(void 0!==o)return s.manager.itemStart(t),setTimeout(function(){e&&e(o),s.manager.itemEnd(t)},0),o;const a=xb("img");function l(){d(),ku.add(t,this),e&&e(this),s.manager.itemEnd(t)}function c(h){d(),r&&r(h),s.manager.itemError(t),s.manager.itemEnd(t)}function d(){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 yf extends vf{constructor(t){super(t)}load(t,e,n,r){const s=new ko,o=new HS(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 GS extends Or{constructor(t,e=1){super(),this.isLight=!0,this.type="Light",this.color=new qe(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()),void 0!==this.target&&(e.object.target=this.target.uuid),e}}const iO=new Nt,MG=new O,CG=new O;class rO{constructor(t){this.camera=t,this.intensity=1,this.bias=0,this.normalBias=0,this.radius=1,this.blurSamples=8,this.mapSize=new xe(512,512),this.map=null,this.mapPass=null,this.matrix=new Nt,this.autoUpdate=!0,this.needsUpdate=!1,this._frustum=new aS,this._frameExtents=new xe(1,1),this._viewportCount=1,this._viewports=[new gi(0,0,1,1)]}getViewportCount(){return this._viewportCount}getFrustum(){return this._frustum}updateMatrices(t){const e=this.camera,n=this.matrix;MG.setFromMatrixPosition(t.matrixWorld),e.position.copy(MG),CG.setFromMatrixPosition(t.target.matrixWorld),e.lookAt(CG),e.updateMatrixWorld(),iO.multiplyMatrices(e.projectionMatrix,e.matrixWorldInverse),this._frustum.setFromProjectionMatrix(iO),n.set(.5,0,0,.5,0,.5,0,.5,0,0,.5,.5,0,0,0,1),n.multiply(iO)}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.intensity=t.intensity,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 1!==this.intensity&&(t.intensity=this.intensity),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 Uhe extends rO{constructor(){super(new yr(50,1,.5,500)),this.isSpotLightShadow=!0,this.focus=1}updateMatrices(t){const e=this.camera,n=2*ag*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 SG extends GS{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(Or.DEFAULT_UP),this.updateMatrix(),this.target=new Or,this.distance=n,this.angle=r,this.penumbra=s,this.decay=o,this.map=null,this.shadow=new Uhe}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 EG=new Nt,Xb=new O,sO=new O;class Vhe extends rO{constructor(){super(new yr(90,1,.5,500)),this.isPointLightShadow=!0,this._frameExtents=new xe(4,2),this._viewportCount=6,this._viewports=[new gi(2,1,1,1),new gi(0,1,1,1),new gi(3,1,1,1),new gi(1,1,1,1),new gi(3,0,1,1),new gi(1,0,1,1)],this._cubeDirections=[new O(1,0,0),new O(-1,0,0),new O(0,0,1),new O(0,0,-1),new O(0,1,0),new O(0,-1,0)],this._cubeUps=[new O(0,1,0),new O(0,1,0),new O(0,1,0),new O(0,1,0),new O(0,0,1),new O(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()),Xb.setFromMatrixPosition(t.matrixWorld),n.position.copy(Xb),sO.copy(n.position),sO.add(this._cubeDirections[e]),n.up.copy(this._cubeUps[e]),n.lookAt(sO),n.updateMatrixWorld(),r.makeTranslation(-Xb.x,-Xb.y,-Xb.z),EG.multiplyMatrices(n.projectionMatrix,n.matrixWorldInverse),this._frustum.setFromProjectionMatrix(EG)}}class AG extends GS{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 Vhe}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 zhe extends rO{constructor(){super(new Tb(-5,5,5,-5,.5,500)),this.isDirectionalLightShadow=!0}}class DG extends GS{constructor(t,e){super(t,e),this.isDirectionalLight=!0,this.type="DirectionalLight",this.position.copy(Or.DEFAULT_UP),this.updateMatrix(),this.target=new Or,this.shadow=new zhe}dispose(){this.shadow.dispose()}copy(t){return super.copy(t),this.target=t.target.clone(),this.shadow=t.shadow.clone(),this}}class $S extends GS{constructor(t,e){super(t,e),this.isAmbientLight=!0,this.type="AmbientLight"}}class Pu{static decodeText(t){if(console.warn("THREE.LoaderUtils: decodeText() has been deprecated with r165 and will be removed with r175. Use TextDecoder instead."),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=ku.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 ku.add(t,c),e&&e(c),s.manager.itemEnd(t),c}).catch(function(c){r&&r(c),ku.remove(t),s.manager.itemError(t),s.manager.itemEnd(t)});ku.add(t,l),s.manager.itemStart(t)}}class OG{constructor(t=!0){this.autoStart=t,this.startTime=0,this.oldTime=0,this.elapsedTime=0,this.running=!1}start(){this.startTime=FG(),this.oldTime=this.startTime,this.elapsedTime=0,this.running=!0}stop(){this.getElapsedTime(),this.running=!1,this.autoStart=!1}getElapsedTime(){return this.getDelta(),this.elapsedTime}getDelta(){let t=0;if(this.autoStart&&!this.running)return this.start(),0;if(this.running){const e=FG();t=(e-this.oldTime)/1e3,this.oldTime=e,this.elapsedTime+=t}return t}}function FG(){return(typeof performance>"u"?Date:performance).now()}const aO="\\[\\]\\.:\\/",Qhe=new RegExp("["+aO+"]","g"),lO="[^"+aO+"]",Jhe="[^"+aO.replace("\\.","")+"]",rfe=new RegExp("^"+/((?:WC+[\/:])*)/.source.replace("WC",lO)+/(WCOD+)?/.source.replace("WCOD",Jhe)+/(?:\.(WC+)(?:\[(.+)\])?)?/.source.replace("WC",lO)+/\.(WC+)(?:\[(.+)\])?/.source.replace("WC",lO)+"$"),sfe=["material","materials","bones","map"];class ofe{constructor(t,e,n){const r=n||Ri.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 Ri=(()=>{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(Qhe,"")}static parseTrackName(e){const n=rfe.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!==sfe.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;an.name===t||n.userData.name===t);return e?(e.removeFromParent(),new na(e)):null}getBoundings(){return(new Bs).setFromObject(this.nativeMesh)}clone(){return new na(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 Mn&&this.disposeMesh(t)}),this.nativeMesh instanceof Mn&&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 ufe extends na{get supportsFov(){return this.nativeCamera instanceof yr||"PerspectiveCamera"==this.nativeCamera.type}get fov(){return this.nativeCamera.fov||NaN}set fov(t){this.supportsFov&&(this.nativeCamera.fov=t,this.nativeCamera.updateProjectionMatrix())}constructor(t){super(t),this.nativeCamera=t}}class hfe extends Pse{createMaterial(t){let e={};t.color?e={color:t.color}:t.diffuse||(e={color:super.randomColor()});let n=t.shading||"unlit";switch(n){case"unlit":return new qi(Object.assign(Object.assign({},e),{map:t.diffuse||null}));case"standart":return new jb(Object.assign(Object.assign({},e),{map:t.diffuse||null}));case"phong":return new zS(Object.assign(Object.assign({},e),{map:t.diffuse||null}));case"wireframe":return new qi(Object.assign(Object.assign({},e),{wireframe:!0}));default:throw new Error(`"${n}" shading not implemented for three.js`)}}transformPrimitiveZUp(t){t.geometry.rotateX(Math.PI/2)}createPrimitive(t,e={}){var n,r,s,o;let a=null,l=this.createMaterial(e);switch(t.shape){case"PLANE":a=new Mn(new Iu((null===(n=t.dimensions)||void 0===n?void 0:n.x)||1e4,(null===(r=t.dimensions)||void 0===r?void 0:r.y)||1e4,null===(s=t.segments)||void 0===s?void 0:s.x,null===(o=t.segments)||void 0===o?void 0:o.y),l);break;case"BOX":a=new Mn(new nf(...Pe.spr(t.dimensions),...t.segments?Pe.spr(t.segments):[]),l);break;case"CAPSULE":a=new Mn(new kS(t.radius,t.centersDistance,t.capSegments,t.radialSegments),l),this.transformPrimitiveZUp(a);break;case"CYLINDER":a=new Mn(new Bg(t.radius,t.radius,t.height,t.radialSegments,t.heightSegments),l),this.transformPrimitiveZUp(a);break;case"CONE":a=new Mn(new PS(t.radius,t.height,t.radialSegments,t.heightSegments),l),this.transformPrimitiveZUp(a);break;case"SPHERE":a=new Mn(new Wb(t.radius,t.widthSegments,t.heightSegments),l),this.transformPrimitiveZUp(a);break;case"COMPOUND":a=new Fo;for(const{position:d,rotation:h,shape:p}of t.children){const m=this.createPrimitive(p,e).nativeMesh;d&&m.position.set(...Pe.spr(d)),h&&m.quaternion.set(...Yi.spr(h)),a.add(m)}break;case"MESH":const c=new hn;c.setFromPoints(t.vertices.map(d=>new O(...Pe.spr(d)))),c.setIndex(t.faces.reduce((d,h)=>(d.push(...h),d),[])),a=new Mn(c,l)}if(!a)throw new Error(`Primitive with shape "${t.shape}" not implemented`);return void 0!==e.castShadow&&(a.castShadow=e.castShadow),void 0!==e.receiveShadow&&(a.receiveShadow=e.receiveShadow),new na(a)}createPerspectiveCamera(t={}){return new ufe(new yr(t.fov||75,t.aspectRatio||1,t.frustrum?t.frustrum.near:1,t.frustrum?t.frustrum.far:1e4))}}function QG(i,t){if(t===Moe)return console.warn("THREE.BufferGeometryUtils.toTrianglesDrawMode(): Geometry already defined as triangles."),i;if(t===Wk||t===C4){let e=i.getIndex();if(null===e){const o=[],a=i.getAttribute("position");if(void 0===a)return console.error("THREE.BufferGeometryUtils.toTrianglesDrawMode(): Undefined position attribute. Processing not possible."),i;for(let l=0;l=2.0 are supported.")));const c=new jfe(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 d=0;d=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 pfe(){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 Bn={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_DISPERSION:"KHR_materials_dispersion",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 mfe{constructor(t){this.parser=t,this.name=Bn.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 Tfe{constructor(t){this.parser=t,this.name=Bn.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 Ife{constructor(t){this.parser=t,this.name=Bn.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 Rfe{constructor(t){this.name=Bn.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 d=r.count,h=r.byteStride,p=new Uint8Array(a,r.byteOffset||0,r.byteLength||0);return o.decodeGltfBufferAsync?o.decodeGltfBufferAsync(d,h,p,r.mode,r.filter).then(function(m){return m.buffer}):o.ready.then(function(){const m=new ArrayBuffer(d*h);return o.decodeGltfBuffer(new Uint8Array(m),d,h,p,r.mode,r.filter),m})})}return null}}class kfe{constructor(t){this.name=Bn.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!==Na.TRIANGLES&&c.mode!==Na.TRIANGLE_STRIP&&c.mode!==Na.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(d=>(l[c]=d,l[c])));return a.length<1?null:(a.push(this.parser.createNodeMesh(t)),Promise.all(a).then(c=>{const d=c.pop(),h=d.isGroup?d.children:[d],p=c[0].count,m=[];for(const g of h){const b=new Nt,v=new O,y=new co,M=new O(1,1,1),x=new Y5(g.geometry,g.material,p);for(let C=0;C-1,o=s?a.match(/Firefox\/([0-9]+)\./)[1]:-1}this.textureLoader=typeof createImageBitmap>"u"||n&&r<17||s&&o<98?new yf(this.options.manager):new qhe(this.options.manager),this.textureLoader.setCrossOrigin(this.options.crossOrigin),this.textureLoader.setRequestHeader(this.options.requestHeader),this.fileLoader=new La(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 Sf(s,a,r),ud(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,d]of o.children.entries())s(d,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(T,D[k*l+1]),l>=3&&v.setZ(T,D[k*l+2]),l>=4&&v.setW(T,D[k*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(d){d.flipY=!1,d.name=o.name||a.name||"",""===d.name&&"string"==typeof a.uri&&!1===a.uri.startsWith("data:image/")&&(d.name=a.uri);const p=(s.samplers||{})[o.sampler]||{};return d.magFilter=n$[p.magFilter]||lr,d.minFilter=n$[p.minFilter]||bl,d.wrapS=i$[p.wrapS]||Pa,d.wrapT=i$[p.wrapT]||Pa,r.associations.set(d,{textures:t}),d}).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 d=Promise.resolve(l).then(function(h){return new Promise(function(p,m){let g=p;!0===e.isImageBitmapLoader&&(g=function(b){const v=new ko(b);v.needsUpdate=!0,p(v)}),e.load(Pu.resolveURL(h,s.path),g,void 0,m)})}).then(function(h){return!0===c&&a.revokeObjectURL(l),ud(h,o),h.userData.mimeType=o.mimeType||function $fe(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]=d,d}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[Bn.KHR_TEXTURE_TRANSFORM]){const a=void 0!==n.extensions?n.extensions[Bn.KHR_TEXTURE_TRANSFORM]:void 0;if(a){const l=s.associations.get(o);o=s.extensions[Bn.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 pf,Po.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 us,Po.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 jb}loadMaterial(t){const e=this,r=this.extensions,s=this.json.materials[t];let o;const a={},c=[];if((s.extensions||{})[Bn.KHR_MATERIALS_UNLIT]){const h=r[Bn.KHR_MATERIALS_UNLIT];o=h.getMaterialType(),c.push(h.extendParams(a,s,e))}else{const h=s.pbrMetallicRoughness||{};if(a.color=new qe(1,1,1),a.opacity=1,Array.isArray(h.baseColorFactor)){const p=h.baseColorFactor;a.color.setRGB(p[0],p[1],p[2],ds),a.opacity=p[3]}void 0!==h.baseColorTexture&&c.push(e.assignTexture(a,"map",h.baseColorTexture,cs)),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=Ls);const d=s.alphaMode||"OPAQUE";if("BLEND"===d?(a.transparent=!0,a.depthWrite=!1):(a.transparent=!1,"MASK"===d&&(a.alphaTest=void 0!==s.alphaCutoff?s.alphaCutoff:.5)),void 0!==s.normalTexture&&o!==qi&&(c.push(e.assignTexture(a,"normalMap",s.normalTexture)),a.normalScale=new xe(1,1),void 0!==s.normalTexture.scale)){const h=s.normalTexture.scale;a.normalScale.set(h,h)}if(void 0!==s.occlusionTexture&&o!==qi&&(c.push(e.assignTexture(a,"aoMap",s.occlusionTexture)),void 0!==s.occlusionTexture.strength&&(a.aoMapIntensity=s.occlusionTexture.strength)),void 0!==s.emissiveFactor&&o!==qi){const h=s.emissiveFactor;a.emissive=(new qe).setRGB(h[0],h[1],h[2],ds)}return void 0!==s.emissiveTexture&&o!==qi&&c.push(e.assignTexture(a,"emissiveMap",s.emissiveTexture,cs)),Promise.all(c).then(function(){const h=new o(a);return s.name&&(h.name=s.name),ud(h,s),e.associations.set(h,{materials:t}),s.extensions&&Sf(r,h,s),h})}createUniqueName(t){const e=Ri.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[Bn.KHR_DRACO_MESH_COMPRESSION].decodePrimitive(a,e).then(function(l){return r$(l,a,e)})}const o=[];for(let a=0,l=t.length;a0&&Hfe(y,s),y.name=e.createUniqueName(s.name||"mesh_"+t),ud(y,s),v.extensions&&Sf(r,y,v),e.assignFinalMaterial(y),h.push(y)}for(let m=0,g=h.length;m1?new Fo:1===c.length?c[0]:new Or,d!==c[0])for(let h=0,p=c.length;h{const h=new Map;for(const[p,m]of r.associations)(p instanceof Po||p instanceof ko)&&h.set(p,m);return d.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(Fu[s.path]===Fu.weights?t.traverse(function(p){p.morphTargetInfluences&&l.push(p.name?p.name:p.uuid)}):l.push(a),Fu[s.path]){case Fu.weights:c=Hg;break;case Fu.rotation:c=Gg;break;case Fu.position:case Fu.scale:c=Wg;break;default:c=1===n.itemSize?Hg:Wg}const d=void 0!==r.interpolation?Ufe[r.interpolation]:yb,h=this._getArrayFromAccessor(n);for(let p=0,m=l.length;p{r.type.endsWith("Light")&&(console.warn("WORKAROUND: light intensity from GLB divided by 200."),r.intensity*=.005)}),new na(n.scene)})}}const fo=(i,t)=>Array(i).fill(null).map((e,n)=>t(n));class Ef{static startDebugView(t,e){let n=this.activeDebugViews.get(t);return n?n.renderers.includes(e)||n.renderers.push(e):(n={view:new Ef(t),renderers:[e]},this.activeDebugViews.set(t,n)),n.view}static stopDebugView(t,e){const n=t.world,r=this.activeDebugViews.get(n);r&&(r.renderers=r.renderers.filter(s=>s!==e),0===r.renderers.length&&(r.view.dispose(),this.activeDebugViews.delete(n)))}constructor(t){this.world=t,this.debugScene=null,this.aSub=null,this.rSub=null,this.syncMap=new Map,this.debugScene=new Rb;const e=n=>{var r,s;const o=n.debugBodySettings;let c,l=this.lineSegmentPointsForShape(o.shape);c=l?new Ng((new hn).setFromPoints(l)):null===(r=this.world)||void 0===r?void 0:r.visualScene.factory.createPrimitive(o.shape,{shading:"wireframe",color:0}).nativeMesh,this.syncMap.set(n,c),null===(s=this.debugScene)||void 0===s||s.add(c)};for(const n of this.world.physicsWorld.children)e(n);this.aSub=this.world.physicsWorld.added$.subscribe(n=>e(n)),this.rSub=this.world.physicsWorld.removed$.subscribe(n=>{var r;const s=this.syncMap.get(n);s&&(this.syncMap.delete(n),null===(r=this.debugScene)||void 0===r||r.remove(s))})}get scene(){return this.debugScene}render(t,e){for(const[r,s]of this.syncMap.entries()){const o=r.debugBodySettings;if(o.ignoreTransform||(s.position.set(...Pe.spr(r.position)),s.quaternion.set(...Yi.spr(r.rotation))),s.material){let a=16777215;switch(o.type){case"RIGID_DYNAMIC":a=o.sleeping?255:16711680;break;case"RIGID_STATIC":a=65280;break;case"TRIGGER":a=16776960}s.material.color.set(a),s.material.needsUpdate=!0}}const n=t.autoClearColor;n&&(t.autoClearColor=!1),t.render(this.debugScene,e),n&&(t.autoClearColor=!0)}lineSegmentPointsForShape(t){if("BOX"===t.shape){const e=Pe.scalarMult(t.dimensions,.5);return[...fo(8,n=>new O(n<4?e.x:-e.x,n%4<2?e.y:-e.y,n%2?e.z:-e.z)),...fo(8,n=>new O(n%2?e.x:-e.x,n<4?e.y:-e.y,n%4<2?e.z:-e.z)),...fo(8,n=>new O(n%4<2?e.x:-e.x,n%2?e.y:-e.y,n<4?e.z:-e.z))]}if("CYLINDER"===t.shape)return[...fo(32,e=>new O(t.radius*Math.sin(Math.floor((e+1)/2)*Math.PI/8),t.radius*Math.cos(Math.floor((e+1)/2)*Math.PI/8),-t.height/2)),...fo(32,e=>new O(t.radius*Math.sin(Math.floor((e+1)/2)*Math.PI/8),t.radius*Math.cos(Math.floor((e+1)/2)*Math.PI/8),t.height/2)),...fo(8,e=>new O(Math.floor(e/2)%2?0:e<4?t.radius:-t.radius,Math.floor(e/2)%2?e<4?t.radius:-t.radius:0,e%2?t.height/2:-t.height/2)),new O(0,0,-t.height/2),new O(0,0,t.height/2)];if("CONE"===t.shape)return[...fo(32,e=>new O(t.radius*Math.sin(Math.floor((e+1)/2)*Math.PI/8),t.radius*Math.cos(Math.floor((e+1)/2)*Math.PI/8),-t.height/2)),...fo(8,e=>new O(e%2||Math.floor(e/2)%2?0:e<4?t.radius:-t.radius,e%2?0:Math.floor(e/2)%2?e<4?t.radius:-t.radius:0,e%2?t.height/2:-t.height/2)),new O(0,0,-t.height/2),new O(0,0,t.height/2)];if("SPHERE"===t.shape)return[...fo(32,e=>new O(t.radius*Math.sin(Math.floor((e+1)/2)*Math.PI/8),t.radius*Math.cos(Math.floor((e+1)/2)*Math.PI/8),0)),...fo(32,e=>new O(t.radius*Math.sin(Math.floor((e+1)/2)*Math.PI/8),0,t.radius*Math.cos(Math.floor((e+1)/2)*Math.PI/8))),...fo(32,e=>new O(0,t.radius*Math.sin(Math.floor((e+1)/2)*Math.PI/8),t.radius*Math.cos(Math.floor((e+1)/2)*Math.PI/8)))];if("CAPSULE"===t.shape)return[...this.lineSegmentPointsForShape({shape:"CYLINDER",radius:t.radius,height:t.centersDistance}),...fo(16,e=>new O(t.radius*Math.cos(Math.floor((e+1)/2)*Math.PI/8),0,t.radius*Math.sin(Math.floor((e+1)/2)*Math.PI/8)+t.centersDistance/2)),...fo(16,e=>new O(t.radius*Math.cos(Math.floor((e+1)/2)*Math.PI/8),0,-t.radius*Math.sin(Math.floor((e+1)/2)*Math.PI/8)-t.centersDistance/2)),...fo(16,e=>new O(0,t.radius*Math.cos(Math.floor((e+1)/2)*Math.PI/8),t.radius*Math.sin(Math.floor((e+1)/2)*Math.PI/8)+t.centersDistance/2)),...fo(16,e=>new O(0,t.radius*Math.cos(Math.floor((e+1)/2)*Math.PI/8),-t.radius*Math.sin(Math.floor((e+1)/2)*Math.PI/8)-t.centersDistance/2))];if("CONVEX_HULL"===t.shape)return[...t.vertices.map(n=>[new O(n.x-.05,n.y,n.z),new O(n.x+.05,n.y,n.z),new O(n.x,n.y-.05,n.z),new O(n.x,n.y+.05,n.z),new O(n.x,n.y,n.z-.05),new O(n.x,n.y,n.z+.05)]).reduce((n,r)=>(n.push(...r),n),[])];if("COMPOUND"===t.shape){const e=[];for(const{position:n,shape:r,rotation:s}of t.children){let o=this.lineSegmentPointsForShape(r);if(!o)return null;e.push(...o.map(a=>new O(...Pe.spr(Pe.add(n||Pe.O,Pe.rot(a,s||Yi.O))))))}return e}return null}dispose(){var t,e;this.debugScene=null,null===(t=this.aSub)||void 0===t||t.unsubscribe(),null===(e=this.rSub)||void 0===e||e.unsubscribe(),this.syncMap=new Map}}Ef.activeDebugViews=new Map;class s$ extends Sse{get physicsDebugViewActive(){return this._physicsDebugViewActive}set physicsDebugViewActive(t){this._physicsDebugViewActive!=t&&(this._physicsDebugViewActive=t,this.world&&(t?this.debugView=Ef.startDebugView(this.world,this):(Ef.stopDebugView(this.debugView,this),this.debugView=null)))}constructor(t,e,n,r={}){super(t,n,r),this.scene=t,this.camera=e,this.canvas=n,this.world=null,this.debugView=null,this._physicsDebugViewActive=!1,this.nativeRenderer=new Due(Object.assign({canvas:n,alpha:this.rendererOptions.transparent},this.rendererOptions)),this.nativeRenderer.shadowMap.enabled=!0,this.nativeRenderer.setClearColor(this.rendererOptions.background),this.nativeRenderer.shadowMap.type=c4,this.nativeRenderer.setPixelRatio(this.rendererOptions.forceResolution||devicePixelRatio)}addToWorld(t){this.world=t,this.physicsDebugViewActive&&(this.debugView=Ef.startDebugView(this.world,this))}removeFromWorld(t){this.physicsDebugViewActive&&(Ef.stopDebugView(this.debugView,this),this.debugView=null),this.world=null}resizeRenderer(t){this.nativeRenderer.setSize(t.x,t.y),(this.camera.nativeCamera instanceof yr||"PerspectiveCamera"==this.camera.nativeCamera.type)&&Math.abs(this.camera.nativeCamera.aspect-t.x/t.y)>.01&&(this.camera.nativeCamera.aspect=t.x/t.y,this.camera.nativeCamera.updateProjectionMatrix())}render(){this.nativeRenderer.render(this.scene.nativeScene,this.camera.nativeCamera),this.physicsDebugViewActive&&this.debugView.render(this.nativeRenderer,this.camera.nativeCamera)}dispose(){this.camera.dispose(),this.nativeRenderer.clear(),this.nativeRenderer.dispose(),this.nativeRenderer.domElement=null}}const Kfe={name:"CopyShader",uniforms:{tDiffuse:{value:null},opacity:{value:1}},vertexShader:"\n\n\t\tvarying vec2 vUv;\n\n\t\tvoid main() {\n\n\t\t\tvUv = uv;\n\t\t\tgl_Position = projectionMatrix * modelViewMatrix * vec4( position, 1.0 );\n\n\t\t}",fragmentShader:"\n\n\t\tuniform float opacity;\n\n\t\tuniform sampler2D tDiffuse;\n\n\t\tvarying vec2 vUv;\n\n\t\tvoid main() {\n\n\t\t\tvec4 texel = texture2D( tDiffuse, vUv );\n\t\t\tgl_FragColor = opacity * texel;\n\n\n\t\t}"};class QS{constructor(){this.isPass=!0,this.enabled=!0,this.needsSwap=!0,this.clear=!1,this.renderToScreen=!1}setSize(){}render(){console.error("THREE.Pass: .render() must be implemented in derived pass.")}dispose(){}}const Zfe=new Tb(-1,1,1,-1,0,1),Jfe=new class Qfe extends hn{constructor(){super(),this.setAttribute("position",new ct([-1,3,0,-1,-1,0,3,-1,0],3)),this.setAttribute("uv",new ct([0,2,0,0,2,0],2))}};class epe{constructor(t){this._mesh=new Mn(Jfe,t)}dispose(){this._mesh.geometry.dispose()}render(t){t.render(this._mesh,Zfe)}get material(){return this._mesh.material}set material(t){this._mesh.material=t}}class tpe extends QS{constructor(t,e){super(),this.textureID=void 0!==e?e:"tDiffuse",t instanceof Cl?(this.uniforms=t.uniforms,this.material=t):t&&(this.uniforms=Q4.clone(t.uniforms),this.material=new Cl({name:void 0!==t.name?t.name:"unspecified",defines:Object.assign({},t.defines),uniforms:this.uniforms,vertexShader:t.vertexShader,fragmentShader:t.fragmentShader})),this.fsQuad=new epe(this.material)}render(t,e,n){this.uniforms[this.textureID]&&(this.uniforms[this.textureID].value=n.texture),this.fsQuad.material=this.material,this.renderToScreen?(t.setRenderTarget(null),this.fsQuad.render(t)):(t.setRenderTarget(e),this.clear&&t.clear(t.autoClearColor,t.autoClearDepth,t.autoClearStencil),this.fsQuad.render(t))}dispose(){this.material.dispose(),this.fsQuad.dispose()}}class o$ extends QS{constructor(t,e){super(),this.scene=t,this.camera=e,this.clear=!0,this.needsSwap=!1,this.inverse=!1}render(t,e,n){const r=t.getContext(),s=t.state;let o,a;s.buffers.color.setMask(!1),s.buffers.depth.setMask(!1),s.buffers.color.setLocked(!0),s.buffers.depth.setLocked(!0),this.inverse?(o=0,a=1):(o=1,a=0),s.buffers.stencil.setTest(!0),s.buffers.stencil.setOp(r.REPLACE,r.REPLACE,r.REPLACE),s.buffers.stencil.setFunc(r.ALWAYS,o,4294967295),s.buffers.stencil.setClear(a),s.buffers.stencil.setLocked(!0),t.setRenderTarget(n),this.clear&&t.clear(),t.render(this.scene,this.camera),t.setRenderTarget(e),this.clear&&t.clear(),t.render(this.scene,this.camera),s.buffers.color.setLocked(!1),s.buffers.depth.setLocked(!1),s.buffers.color.setMask(!0),s.buffers.depth.setMask(!0),s.buffers.stencil.setLocked(!1),s.buffers.stencil.setFunc(r.EQUAL,1,4294967295),s.buffers.stencil.setOp(r.KEEP,r.KEEP,r.KEEP),s.buffers.stencil.setLocked(!0)}}class npe extends QS{constructor(){super(),this.needsSwap=!1}render(t){t.state.buffers.stencil.setLocked(!1),t.state.buffers.stencil.setTest(!1)}}class ipe{constructor(t,e){if(this.renderer=t,this._pixelRatio=t.getPixelRatio(),void 0===e){const n=t.getSize(new xe);this._width=n.width,this._height=n.height,(e=new Mu(this._width*this._pixelRatio,this._height*this._pixelRatio,{type:Jm})).texture.name="EffectComposer.rt1"}else this._width=e.width,this._height=e.height;this.renderTarget1=e,this.renderTarget2=e.clone(),this.renderTarget2.texture.name="EffectComposer.rt2",this.writeBuffer=this.renderTarget1,this.readBuffer=this.renderTarget2,this.renderToScreen=!0,this.passes=[],this.copyPass=new tpe(Kfe),this.copyPass.material.blending=Zc,this.clock=new OG}swapBuffers(){const t=this.readBuffer;this.readBuffer=this.writeBuffer,this.writeBuffer=t}addPass(t){this.passes.push(t),t.setSize(this._width*this._pixelRatio,this._height*this._pixelRatio)}insertPass(t,e){this.passes.splice(e,0,t),t.setSize(this._width*this._pixelRatio,this._height*this._pixelRatio)}removePass(t){const e=this.passes.indexOf(t);-1!==e&&this.passes.splice(e,1)}isLastEnabledPass(t){for(let e=t+1;e0?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;l$.fromArray(r,t),yO.fromArray(r,e),c$.fromArray(r,n),Ba.subVectors(c$,yO),d$.subVectors(l$,yO),Ba.cross(d$),Ba.normalize(),s.push(Ba.x,Ba.y,Ba.z),s.push(Ba.x,Ba.y,Ba.z),s.push(Ba.x,Ba.y,Ba.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 d=this.vertices.length;let h=this.parseVertexIndex(t,d),p=this.parseVertexIndex(e,d),m=this.parseVertexIndex(n,d);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?(JS.setRGB(parseFloat(h[4]),parseFloat(h[5]),parseFloat(h[6])).convertSRGBToLinear(),e.colors.push(JS.r,JS.g,JS.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"===d){const p=c.slice(1).trim().split(a$),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 Fo;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 ct(d.normals,3)),d.colors.length>0&&(g=!0,b.setAttribute("color",new ct(d.colors,3))),!0===d.hasUVIndices&&b.setAttribute("uv",new ct(d.uvs,2));const v=[];for(let M=0,x=h.length;M1){for(let M=0,x=h.length;M0){const a=new pf({size:1,sizeAttenuation:!1}),l=new hn;l.setAttribute("position",new ct(e.vertices,3)),e.colors.length>0&&void 0!==e.colors[0]&&(l.setAttribute("color",new ct(e.colors,3)),a.vertexColors=!0);const c=new Ub(l,a);s.add(c)}return s}}class bO extends vf{constructor(t){super(t)}load(t,e,n,r){const s=this,o=""===this.path?Pu.extractUrlBase(t):this.path,a=new La(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,d):c;h=h.toLowerCase();let p=d>=0?c.substring(d+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 hpe(this.resourcePath||e,this.materialOptions);return a.setCrossOrigin(this.crossOrigin),a.setManager(this.manager),a.setMaterials(o),a}}class hpe{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:ac,this.wrap=void 0!==this.options.wrap?this.options.wrap:Pa}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),d=e.loadTexture(function s(a,l){return"string"!=typeof l||""===l?"":/^https?:\/\//i.test(l)?l:a+l}(e.baseUrl,c.url));d.repeat.copy(c.scale),d.offset.copy(c.offset),d.wrapS=e.wrap,d.wrapT=e.wrap,("map"===a||"emissiveMap"===a)&&(d.colorSpace=cs),r[a]=d}for(const a in n){const l=n[a];let c;if(""!==l)switch(a.toLowerCase()){case"kd":r.color=(new qe).fromArray(l).convertSRGBToLinear();break;case"ks":r.specular=(new qe).fromArray(l).convertSRGBToLinear();break;case"ke":r.emissive=(new qe).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 zS(r),this.materials[t]}getTextureParams(t,e){const n={scale:new xe(1,1),offset:new xe(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:wG;let a=o.getHandler(t);null===a&&(a=new yf(o)),a.setCrossOrigin&&a.setCrossOrigin(this.crossOrigin);const l=a.load(t,n,r,s);return void 0!==e&&(l.mapping=e),l}}const fpe=["determinateSpinner"];function ppe(i,t){if(1&i&&(ki(),W(0,"svg",11),Te(1,"circle",12),Y()),2&i){const e=he();At("viewBox",e._viewBox()),G(1),jo("stroke-dasharray",e._strokeCircumference(),"px")("stroke-dashoffset",e._strokeCircumference()/2,"px")("stroke-width",e._circleStrokeWidth(),"%"),At("r",e._circleRadius())}}const mpe=Qy(class{constructor(i){this._elementRef=i}},"primary"),gpe=new me("mat-progress-spinner-default-options",{providedIn:"root",factory:function _pe(){return{diameter:u$}}}),u$=100;let Qb=(()=>{class i extends mpe{constructor(e,n,r){super(e),this.mode="mat-spinner"===this._elementRef.nativeElement.nodeName.toLowerCase()?"indeterminate":"determinate",this._value=0,this._diameter=u$,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,ks(e)))}get diameter(){return this._diameter}set diameter(e){this._diameter=ks(e)}get strokeWidth(){return this._strokeWidth??this.diameter/10}set strokeWidth(e){this._strokeWidth=ks(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)(E(mt),E(Rr,8),E(gpe))},i.\u0275cmp=ot({type:i,selectors:[["mat-progress-spinner"],["mat-spinner"]],viewQuery:function(e,n){if(1&e&&Wn(fpe,5),2&e){let r;St(r=Et())&&(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),jo("width",n.diameter,"px")("height",n.diameter,"px"),un("_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:[lt],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&&(fe(0,ppe,2,8,"ng-template",null,0,Uc),W(2,"div",1,2),ki(),W(4,"svg",3),Te(5,"circle",4),Y()(),ga(),W(6,"div",5)(7,"div",6)(8,"div",7),sy(9,8),Y(),W(10,"div",9),sy(11,8),Y(),W(12,"div",10),sy(13,8),Y()()()),2&e){const r=rr(1);G(4),At("viewBox",n._viewBox()),G(1),jo("stroke-dasharray",n._strokeCircumference(),"px")("stroke-dashoffset",n._strokeDashOffset(),"px")("stroke-width",n._circleStrokeWidth(),"%"),At("r",n._circleRadius()),G(4),U("ngTemplateOutlet",r),G(2),U("ngTemplateOutlet",r),G(2),U("ngTemplateOutlet",r)}},dependencies:[xy],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})(),ype=(()=>{class i{}return i.\u0275fac=function(e){return new(e||i)},i.\u0275mod=nn({type:i}),i.\u0275inj=Kt({imports:[Eo,Qn]}),i})();const bpe=["previewCanvasContainer"],xpe=["previewCanvas"];function wpe(i,t){if(1&i){const e=mi();Gr(0),W(1,"label",11),ze(2),Y(),W(3,"input",12),Ue("change",function(r){cn(e);const s=he().$implicit;return s.value=r.currentTarget.checked,Gt(s.change(s.value))}),Y(),$r()}if(2&i){const e=he(),n=e.index,r=e.$implicit,s=he().index;G(1),U("for","custom_control_"+s+"_"+n),G(1),_i(r.label),G(1),U("id","custom_control_"+s+"_"+n)("type",r.type)("checked",r.value)}}function Mpe(i,t){if(1&i){const e=mi();W(0,"div",9)(1,"label",11),ze(2),Y(),W(3,"input",14),Ue("change",function(){const s=cn(e).$implicit,o=he(2).$implicit;return o.value=s,Gt(o.change(o.value))}),Y()()}if(2&i){const e=t.$implicit,n=he(2),r=n.index,s=n.$implicit,o=he().index;G(1),U("for","custom_control_"+o+"_"+r+"_"+e),G(1),_i(e),G(1),U("id","custom_control_"+o+"_"+r+"_"+e)("checked",s.value===e)}}function Cpe(i,t){if(1&i&&(W(0,"div",13)(1,"label"),ze(2),Y(),fe(3,Mpe,4,4,"div",8),Y()),2&i){const e=he().$implicit;G(2),_i(e.label),G(1),U("ngForOf",e.options)}}function Spe(i,t){if(1&i){const e=mi();Gr(0),W(1,"label",11),ze(2),Y(),W(3,"input",15),Ue("colorChange",function(r){cn(e);const s=he().$implicit,o=he(2);return s.value=o.toRGB(r.value),Gt(s.change(s.value))}),Y(),Te(4,"ngx-mat-color-toggle",16)(5,"ngx-mat-color-picker",null,17),$r()}if(2&i){const e=rr(6),n=he(),r=n.index,s=n.$implicit,o=he().index;G(1),U("for","custom_control_"+o+"_"+r),G(1),_i(s.label),G(1),U("ngxMatColorPicker",e),G(1),U("for",e)}}function Epe(i,t){if(1&i){const e=mi();Gr(0),W(1,"label",11),ze(2),Y(),W(3,"input",18),Ue("change",function(r){cn(e);const s=he().$implicit;return s.value=r.currentTarget.value,Gt(s.change(s.value))}),Y(),$r()}if(2&i){const e=he(),n=e.index,r=e.$implicit,s=he().index;G(1),U("for","custom_control_"+s+"_"+n),G(1),_i(r.label),G(1),U("id","custom_control_"+s+"_"+n)("min",r.minValue)("max",r.maxValue)("step",r.valueStep)("value",r.value)}}function Ape(i,t){if(1&i&&(W(0,"div",9),fe(1,wpe,4,5,"ng-container",6),fe(2,Cpe,4,2,"div",10),fe(3,Spe,7,4,"ng-container",6),fe(4,Epe,4,7,"ng-container",6),Y()),2&i){const e=t.$implicit;G(1),U("ngIf","checkbox"===e.type),G(1),U("ngIf","radio"===e.type),G(1),U("ngIf","color"===e.type),G(1),U("ngIf","slider"===e.type)}}function Dpe(i,t){if(1&i&&(Gr(0),W(1,"h4"),ze(2),Y(),fe(3,Ape,5,4,"div",8),$r()),2&i){const e=t.$implicit;G(2),_i(e.title),G(1),U("ngForOf",e.controls)}}function Tpe(i,t){if(1&i){const e=mi();W(0,"div",9)(1,"label",11),ze(2),Y(),W(3,"input",19),Ue("change",function(r){return Gt(cn(e).$implicit.visible=r.currentTarget.checked)}),Y()()}if(2&i){const e=t.$implicit;G(1),U("for","visibility_"+e.name),G(1),_i(e.name),G(1),U("id","visibility_"+e.name)("checked",e.visible)}}function Ipe(i,t){if(1&i&&(Gr(0),W(1,"h4"),ze(2,"Objects visibility"),Y(),fe(3,Tpe,4,4,"div",8),$r()),2&i){const e=he();G(3),U("ngForOf",e.meshes)}}function Rpe(i,t){1&i&&Te(0,"mat-spinner",20)}const ia=i=>{i.colorSpace="srgb",i.anisotropy=8,i.magFilter=_r,i.minFilter=_r};let h$=(()=>{class i{constructor(e){this.cdr=e,this.visibilityControls=!0,this.groupFunction=null,this.customControls=[],this.onObjectLoaded=new We,this._paths$=new vt(null),this.destroyed$=new Re,this.entity=null,this.meshes=[]}get paths(){return this._paths$.getValue()}set paths(e){this._paths$.next(e)}ngAfterViewInit(){var e=this;return tt(function*(){var s;e.world=new sk(new vO,{init:(s=tt(function*(){}),function(){return s.apply(this,arguments)}),simulate:()=>{}}),yield e.world.init(),e.world.visualScene.nativeScene.add(new $S(16777215,2));let n=new vt({x:1,y:1});e.renderer=e.world.addRenderer(e.world.visualScene.factory.createPerspectiveCamera({frustrum:{near:.01,far:1e4}}),e.previewCanvas.nativeElement,{size:n.asObservable(),background:11184810}),e.controller=new Rse(e.renderer,{mouseOptions:{canvas:e.previewCanvas.nativeElement},orbiting:{sensitivityX:2,sensitivityY:2},orbitingElasticity:30}),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(He(e.destroyed$)).subscribe(function(){var s=tt(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 Zb,h=yield(new bO).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 Fo;y.add(...b[v]),y.name=v,p.remove(...b[v]),p.add(y)}}e.meshes=p.children,e.meshes.sort((b,v)=>b.name>v.name?1:-1),p.traverse(b=>{if(b instanceof Mn){const v=b.material instanceof Array?b.material:[b.material];for(const y of v)y.transparent=!0,y.alphaTest=.5,y instanceof qi&&y.map&&(y.map.wrapS=Ii,y.map.wrapT=Ii,ia(y.map),y.map.needsUpdate=!0)}}),e.onObjectLoaded.next(p),e.entity=new Zo({object3D:new na(p)}),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=Pe.scalarMult(Pe.add(m.min,m.max),.5),e.controller.spherical={phi:1.22,theta:-1.32,radius:Pe.dist(m.min,m.max)},e.cdr.markForCheck()}});return function(o){return s.apply(this,arguments)}}())})()}toRGB(e){return(e?.r||0)<<16|(e?.g||0)<<8|(e?.b||0)}ngOnDestroy(){this.destroyed$.next(),this.destroyed$.complete()}}return i.\u0275fac=function(e){return new(e||i)(E(Zn))},i.\u0275cmp=ot({type:i,selectors:[["app-obj-viewer"]],viewQuery:function(e,n){if(1&e&&(Wn(bpe,5),Wn(xpe,5)),2&e){let r;St(r=Et())&&(n.previewCanvasContainer=r.first),St(r=Et())&&(n.previewCanvas=r.first)}},inputs:{paths:"paths",visibilityControls:"visibilityControls",groupFunction:"groupFunction",customControls:"customControls"},outputs:{onObjectLoaded:"onObjectLoaded"},decls:8,vars:3,consts:[[1,"previewCanvasContainer"],["previewCanvasContainer",""],["width","640","height","480"],["previewCanvas",""],["id","controls"],[4,"ngFor","ngForOf"],[4,"ngIf"],["mode","indeterminate",4,"ngIf"],["class","controls-list",4,"ngFor","ngForOf"],[1,"controls-list"],["style","width: 100%",4,"ngIf"],[3,"for"],[3,"id","type","checked","change"],[2,"width","100%"],["type","radio",3,"id","checked","change"],["matInput","",1,"hidden",3,"ngxMatColorPicker","colorChange"],["matSuffix","",3,"for"],["picker",""],["type","range",3,"id","min","max","step","value","change"],["type","checkbox",3,"id","checked","change"],["mode","indeterminate"]],template:function(e,n){1&e&&(W(0,"div",0,1),Te(2,"canvas",2,3),W(4,"div",4),fe(5,Dpe,4,2,"ng-container",5),fe(6,Ipe,4,1,"ng-container",6),Y(),fe(7,Rpe,1,0,"mat-spinner",7),Y()),2&e&&(G(5),U("ngForOf",n.customControls),G(1),U("ngIf",n.visibilityControls),G(1),U("ngIf",!n.entity))},dependencies:[So,vi,qte,ic,Qb,Wie,bC,LH],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%] > h4[_ngcontent-%COMP%]{margin:0}.previewCanvasContainer[_ngcontent-%COMP%] #controls[_ngcontent-%COMP%] .controls-list[_ngcontent-%COMP%]{width:100%;display:flex;-webkit-user-select:none;user-select:none;align-items:center}.previewCanvasContainer[_ngcontent-%COMP%] #controls[_ngcontent-%COMP%] .controls-list[_ngcontent-%COMP%] > span[_ngcontent-%COMP%]{flex-grow:1}.previewCanvasContainer[_ngcontent-%COMP%] #controls[_ngcontent-%COMP%] .controls-list[_ngcontent-%COMP%] > label[_ngcontent-%COMP%]{flex-grow:1}"],changeDetection:0}),i})();function kpe(i,t){if(1&i&&(ki(),Te(0,"circle",5),Dt(1,"async"),Dt(2,"async")),2&i){const e=he();let n,r;At("cx",(null==(n=Lt(1,3,e.mapPointer$))?null:n.x)||0)("cy",(null==(r=Lt(2,5,e.mapPointer$))?null:r.y)||0)("r",10)}}const Ppe=function(){return{"stroke-width":3}};let f$=(()=>{class i{constructor(e){this.ref=e,this._roadSpline$=new vt([]),this._pointer$=new vt(null),this.splineClosed=!1,this.svgSize$=new vt({x:100,y:100}),this.scalingSquare$=new vt({x:0,y:0,width:100,height:100}),this.mapPolyline$=new vt(""),this.mapPointer$=new vt(null),this.destroyed$=new Re}set roadSpline(e){this._roadSpline$.next(e)}set pointer(e){this._pointer$.next(e)}get trackLength$(){return this._roadSpline$.pipe(et(e=>{let n=0;for(let r=1;r{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$),nu([this._roadSpline$,this.scalingSquare$,this.svgSize$]).pipe(He(this.destroyed$),et(([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$),nu([this._pointer$,this.scalingSquare$.asObservable(),this.svgSize$]).pipe(He(this.destroyed$),et(([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)(E(mt))},i.\u0275cmp=ot({type:i,selectors:[["app-tri-minimap"]],inputs:{roadSpline:"roadSpline",pointer:"pointer",splineClosed:"splineClosed"},decls:13,vars:16,consts:[[1,"container"],["shape-rendering","geometricPrecision"],[2,"fill","none","stroke","#333333",3,"ngStyle"],["fill","#e30","stroke","black","stroke-width","3",4,"ngIf"],[1,"info_div"],["fill","#e30","stroke","black","stroke-width","3"]],template:function(e,n){if(1&e&&(W(0,"div",0),ki(),W(1,"svg",1),Dt(2,"async"),Dt(3,"async"),Te(4,"polyline",2),Dt(5,"async"),ze(6," cars "),fe(7,kpe,3,7,"circle",3),Dt(8,"async"),Y(),ga(),W(9,"div",4)(10,"span"),ze(11),Dt(12,"async"),Y()()()),2&e){let r,s;G(1),At("viewBox","0 0 "+(null==(r=Lt(2,5,n.svgSize$))?null:r.x)+" "+(null==(r=Lt(3,7,n.svgSize$))?null:r.y)),G(3),U("ngStyle",so(15,Ppe)),At("points",Lt(5,9,n.mapPolyline$)),G(3),U("ngIf",Lt(8,11,n.mapPointer$)),G(4),Zi("Track length (m): ",null==(s=Lt(12,13,n.trackLength$))?null:s.toFixed(2),"")}},dependencies:[vi,eM,pl],styles:["[_nghost-%COMP%]{overflow:auto}.container[_ngcontent-%COMP%]{position:relative;width:100%;height:100%}.container[_ngcontent-%COMP%] svg[_ngcontent-%COMP%]{position:absolute;width:100%;height:100%}.container[_ngcontent-%COMP%] .info_div[_ngcontent-%COMP%]{color:#838383}"],changeDetection:0}),i})();const Ope=["previewCanvasContainer"],Fpe=["previewCanvas"];function Lpe(i,t){if(1&i&&(W(0,"mat-option",19),ze(1),Y()),2&i){const e=t.$implicit;U("value",e),G(1),Zi(" ",e," ")}}function Npe(i,t){if(1&i){const e=mi();Gr(0),W(1,"mat-form-field",1)(2,"mat-label"),ze(3,"Custom FAM path"),Y(),Te(4,"input",20,21),Dt(6,"async"),Y(),W(7,"button",22),Ue("click",function(){cn(e);const r=rr(5);return Gt(he().onFamSelected(r.value))}),ze(8,"LOAD"),Y(),$r()}if(2&i){const e=he();G(4),U("value",Lt(6,1,e.previewFamLocation$))}}function Bpe(i,t){1&i&&Te(0,"mat-spinner",23),2&i&&U("diameter",40)}function Upe(i,t){1&i&&Te(0,"mat-spinner",24)}const Vpe=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 Af=(()=>{return(i=Af||(Af={})).ThreeModel="model",i.Bitmap="bitmap",i.TwoSidedBitmap="two_sided_bitmap",Af;var i})();class zpe extends QH{constructor(t,e,n){super(t,{loadDepth:40,inertia:2}),this.mapGraph=t,this.famPath=e,this.hideUnknownEntities$=n,this.textureLoader=new yf,this.terrainMaterials={},this.objLoader=new Zb,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(Zl(),He(this._onRemoved$)).subscribe(e=>{for(const n of this.unknownEntities)n.visible=!e})}getPlaceholderTexture(){var t=this;return tt(function*(){return t._placeholder?t._placeholder:(t._placeholderPromise||(t._placeholderPromise=t.textureLoader.loadAsync("assets/placeholder_texture.png")),t._placeholderPromise)})()}getPlaceholderTerrainTexture(){var t=this;return tt(function*(){return t._placeholderTerrain?t._placeholderTerrain:(t._placeholderTerrainPromise||(t._placeholderTerrainPromise=t.textureLoader.loadAsync("assets/placeholder_texture.png").then(e=>(e.wrapS=Pa,e.wrapT=Ii,ia(e),e.flipY=!0,e))),t._placeholderTerrainPromise)})()}loadChunk(t){var e=this;return tt(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 Mn&&(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:Pe.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:Yi.fromAngle(Pe.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 Zo({object3D:new na(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 qi({side:Ls,transparent:!0,visible:!1}),this.famPath?this.textureLoader.loadAsync(`${this.famPath}/background/${t}.png`).then(e=>{e.wrapS=Pa,e.wrapT=Ii,ia(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 tt(function*(){let n=!1;if(t.type==Af.ThreeModel){let r;try{if(!e.famPath)throw new Error;const o=new bO,a=new Zb,l=yield o.loadAsync(`${e.famPath}/props/${t.data.data.resource_id}/0/material.mtl`);l.preload(),a.setMaterials(l),r=new na(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 Mn){const a=o.material instanceof Array?o.material:[o.material];for(const l of a)l.transparent=!0,l.alphaTest=.5,l instanceof qi&&l.map&&(l.map.wrapS=Ii,l.map.wrapT=Ii,ia(l.map),l.map.needsUpdate=!0)}});const s=new Zo({object3D: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==Af.Bitmap||t.type==Af.TwoSidedBitmap){const r=(c,d)=>new Array(d).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 Fo,[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==Af.TwoSidedBitmap){const[c,d]=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 Zo({object3D:new na(s)});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 tt(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=>(ia(h),new qi({map:h,alphaTest:.5,transparent:!0,side:Ls}))),d=new Mn(new Iu(e.x,e.y),c[0]);if(d.rotateX(Math.PI/2),d.position.set(0,0,e.y/2),c.length>1){let h=-1;Ym(r.world).pipe(o4(n&&!isNaN(+n)?1e3*+n:250)).subscribe(()=>{h=(h+1)%c.length,d.material=c[h]})}return[d,a]})()}}let Hpe=(()=>{class i{constructor(e,n,r){this.eelDelegate=e,this.cdr=n,this.mainService=r,this._resource$=new vt(null),this.changed=new We,this.previewLoading$=new vt(!0),this.previewFamLocation$=new vt(null),this.previewFamLoading$=new vt(!1),this.pointer$=new vt(null),this.selectedSplineIndex$=new vt(0),this.selectedSplineItem$=new vt(null),this.selectedAiInfoItem$=new vt(null),this.selectedTerrainItem$=new vt(null),this.famPath=null,this.name="",this.renderer=null,this.map=null,this.isOpenedTrack=!0,this.roadPath=null,this.destroyed$=new Re}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 tt(function*(){var s;e.world=new sk(new vO,{init:(s=tt(function*(){}),function(){return s.apply(this,arguments)}),simulate:()=>{},loader:{loadFromGgGlb:function(){var s=tt(function*(...o){return[]});return function(){return s.apply(this,arguments)}}()}}),yield e.world.init(),e.skySphere=new Zo({object3D:e.world.visualScene.factory.createPrimitive({shape:"SPHERE",radius:1e3},{color:16777215})}),e.skySphere.object3D.nativeMesh.material.side=Ls,e.world.addEntity(e.skySphere),e.selectionSphere=new Zo({object3D: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 $S(16777215,2));let n=new vt({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=Yi.lookAt(e.renderer.camera.position,Pe.add(e.renderer.camera.position,Pe.Y),Pe.Z),Ym(e.world).pipe(He(e.destroyed$)).subscribe(()=>{e.renderer&&(e.skySphere.position=e.renderer.camera.position,e.pointer$.next(e.renderer.camera.position))}),e.controller=new n4(e.world.keyboardInput,e.renderer,{mouseOptions:{canvas:e.previewCanvas.nativeElement,pointerLock:!0},keymap:"wasd+arrows",cameraLinearSpeed:40,cameraBoostMultiplier:4,cameraMovementElasticity:100,cameraRotationElasticity:30,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(He(e.destroyed$)).subscribe(function(){var s=tt(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(He(e.destroyed$),gn(([s,o])=>!!e.resource&&s.startsWith(e.resource.id)),ml(3e3)).subscribe(tt(function*(){e.previewLoading$.next(!0),yield e.postTmpUpdates(e.resource?.id),yield e.loadPreview(),e.previewLoading$.next(!1)})),e.selectedSplineIndex$.pipe(He(e.destroyed$),ml(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=Pe.add(a,Pe.rotAround({x:10,y:-12,z:5},{x:0,y:0,z:1},-e.resource.data.road_spline[s].orientation)),e.renderer.rotation=Yi.lookAt(e.renderer.position,a,{x:0,y:0,z:1}),e.controller.reset())}e.selectedSplineItem$.next({id:rc(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:rc(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:rc(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 tt(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 yf,o=r.find(a=>a.endsWith("spherical.png"));if(o){const a=yield s.loadAsync(o);a.colorSpace="srgb",a.mapping=Qc,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 tt(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 tt(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=Km.fromMapArray(e.roadPath.map((r,s)=>({path:`${e.terrainChunksObjLocation}terrain_chunk_${s}`,position:r,loadOptions:{}}))||[],!e.isOpenedTrack);e.unloadPreview(),e.map=new zpe(n,e.famPath&&"resources/"+e.famPath,e.mainService.hideHiddenFields$),e.map.resource=e.resource,e.map.isOpenedTrack=e.isOpenedTrack,Ym(e.world).pipe(He(e.destroyed$)).subscribe(()=>{e.map&&e.renderer&&e.map.loaderCursor$.next(e.renderer.position)}),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 tt(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)(E(Ql),E(Zn),E(ka))},i.\u0275cmp=ot({type:i,selectors:[["app-tri-map-block-ui"]],viewQuery:function(e,n){if(1&e&&(Wn(Ope,5),Wn(Fpe,5)),2&e){let r;St(r=Et())&&(n.previewCanvasContainer=r.first),St(r=Et())&&(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&&(W(0,"div",0)(1,"h4"),ze(2,"Preview *.FAM file"),Y(),W(3,"mat-form-field",1)(4,"mat-label"),ze(5,"Current preview FAM"),Y(),W(6,"mat-select",2,3),Ue("valueChange",function(s){return n.onFamSelected(s)}),Dt(8,"async"),Dt(9,"async"),fe(10,Lpe,2,2,"mat-option",4),W(11,"mat-option",5),ze(12,"custom"),Y()()(),fe(13,Npe,9,3,"ng-container",6),fe(14,Bpe,1,1,"mat-spinner",7),Dt(15,"async"),Y(),W(16,"div",8)(17,"div",9,10),Te(19,"canvas",11,12),fe(21,Upe,1,0,"mat-spinner",13),Dt(22,"async"),Y(),W(23,"div",14,10)(25,"mat-form-field",1)(26,"mat-label"),ze(27,"Spline item"),Y(),W(28,"input",15),Ue("ngModelChange",function(s){return n.selectedSplineIndex$.next(s)}),Dt(29,"async"),Dt(30,"async"),Y()(),Te(31,"app-tri-minimap",16),Dt(32,"async"),Y()(),W(33,"h4"),ze(34,"Road spline item"),Y(),Te(35,"app-compound-block-ui",17),Dt(36,"async"),W(37,"h4"),ze(38,"AI info (block for 4 spline items)"),Y(),Te(39,"app-compound-block-ui",17),Dt(40,"async"),W(41,"h4"),ze(42,"Terrain (block for 4 spline items)"),Y(),Te(43,"app-compound-block-ui",17),Dt(44,"async"),W(45,"h4"),ze(46,"Common"),Y(),Te(47,"app-compound-block-ui",18),Dt(48,"async")),2&e){const r=rr(7);let s;G(6),U("value",n.previewFamPossibleLocations.includes(Lt(8,20,n.previewFamLocation$))?Lt(9,22,n.previewFamLocation$):"custom"),G(4),U("ngForOf",n.previewFamPossibleLocations),G(3),U("ngIf","custom"==r.value),G(1),U("ngIf",Lt(15,24,n.previewFamLoading$)),G(7),U("ngIf",Lt(22,26,n.previewLoading$)),G(7),U("min",0)("max",4*(null==(s=Lt(29,28,n._resource$))?null:s.data.num_chunks)-1)("ngModel",Lt(30,30,n.selectedSplineIndex$)),G(3),U("roadSpline",n.roadSpline)("pointer",Lt(32,32,n.pointer$))("splineClosed",!n.isOpenedTrack),G(4),U("resource",Lt(36,34,n.selectedSplineItem$))("hideBlockActions",!0),G(4),U("resource",Lt(40,36,n.selectedAiInfoItem$))("hideBlockActions",!0),G(4),U("resource",Lt(44,38,n.selectedTerrainItem$))("hideBlockActions",!0),G(4),U("resource",Lt(48,40,n._resource$))("hideBlockActions",!0)("fieldWhitelist",so(42,Vpe))}},dependencies:[So,vi,gl,mu,tc,_u,gu,Xc,vl,To,ic,qM,hb,Nm,Qb,Jl,f$,pl],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})();const p$=i=>new Promise(t=>setTimeout(t,i)),m$=(i,t,e=null)=>{const n=document.createElement("canvas"),r=n.getContext("2d",{willReadFrequently:!0}),s=i.width,o=i.height;n.width=s,n.height=o,r.drawImage(i,0,0,s,o);const a=r.getImageData(0,0,s,o);for(let l=0;l{if(!(o instanceof Mn))return;let a=-1;if(o.name.startsWith("lbl__rt_frnt")?a=0:o.name.startsWith("lbl__lt_frnt")?a=1:o.name.startsWith("lbl__rt_rear")?a=2:o.name.startsWith("lbl__lt_rear")&&(a=3),a>-1){this.wheels[a]=o,a<2&&(this.frontWheels[a]=o),o.geometry.boundingBox||o.geometry.computeBoundingBox();const l=Pe.avg(o.geometry.boundingBox.min,o.geometry.boundingBox.max);o.geometry.translate(...Pe.spr(Pe.neg(l))),o.position.set(...Pe.spr(l)),this.wheelIdlePositions[a]=l}(o.name.includes("rsid")||o.name.includes("lite"))&&(r.push(o),this.originalTexWithTailLights=o.material.map)}),!this.originalTexWithTailLights)throw new Error("Not a driveable NFS1 car");this.tailLightColors=n.includes("TRAFFC.CFM")?[9509903,16711680]:[3212546,16258068],this.texWithTailLightsImg=document.createElement("img"),this.texWithTailLights=new ko(this.texWithTailLightsImg),this.texWithTailLights.flipY=this.originalTexWithTailLights.flipY,ia(this.texWithTailLights),this.recolorTailLights(this.tailLightColors[0]).then();for(const o of r)o.material.map=this.texWithTailLights;const s=new yf;this.tyreTextures=[1,2,3,4].map(o=>s.load(`${n}/tyr${o}.png`));for(const o of this.tyreTextures)ia(o);this.tyreMaterial=new qi({map:this.tyreTextures[0]}),this.tyreMaterial.transparent=!0,this.tyreMaterial.alphaTest=.5,this.tyreMaterial.map.wrapS=Ii,this.tyreMaterial.map.wrapT=Ii,this.tyreMaterial.polygonOffset=!0,this.tyreMaterial.polygonOffsetFactor=-4;for(const o of this.wheels)o.material=this.tyreMaterial}get tailLightsOn(){return this._tailLightsOn}set tailLightsOn(t){t!==this._tailLightsOn&&(this._tailLightsOn=t,this.recolorTailLights(this.tailLightColors[t?1:0]))}get speed(){return this._speed}set speed(t){if(t!==this._speed){switch(this._speed=t,this.tyreTextureUpdateTimer&&clearInterval(this.tyreTextureUpdateTimer),t){case"idle":this.tyreMaterial.map=this.tyreTextures[0];break;case"slow":let e=!0;this.tyreTextureUpdateTimer=setInterval(()=>{this.tyreMaterial.map=this.tyreTextures[e?1:2],this.tyreMaterial.needsUpdate=!0,e=!e},16);break;case"fast":this.tyreMaterial.map=this.tyreTextures[3]}this.tyreMaterial.needsUpdate=!0}}get steeringAngle(){return this._steeringAngle}set steeringAngle(t){if(t!==this._steeringAngle){this._steeringAngle=t;for(const e of this.frontWheels)e.rotation.set(0,0,t)}}recolorTailLights(t){var e=this;return tt(function*(){if(e.originalTexWithTailLights&&e.texWithTailLights&&e.texWithTailLightsImg){for(let n=100;n>0&&!e.originalTexWithTailLights.source.data;n--)yield p$(50);((i,t,e,n=null)=>{const[r,s,o]=[t>>16,t>>8&255,255&t],[a,l,c]=[e>>16,e>>8&255,255&e];m$(i,(d,h)=>{d[h]==r&&d[h+1]==s&&d[h+2]==o&&(d[h]=a,d[h+1]=l,d[h+2]=c)},n)})(e.originalTexWithTailLights.source.data,e.tailLightsTexColor,t,e.texWithTailLightsImg),e.texWithTailLights.needsUpdate=!0}})()}dispose(){this.texWithTailLightsImg&&(this.texWithTailLightsImg.remove(),this.texWithTailLightsImg=null),this.texWithTailLights&&(this.texWithTailLights.dispose(),this.texWithTailLights=null),this.tyreTextureUpdateTimer&&clearInterval(this.tyreTextureUpdateTimer),this.tyreMaterial&&(this.tyreMaterial.dispose(),this.tyreMaterial=null)}}let Wpe=(()=>{class i{constructor(e,n,r){this.eelDelegate=e,this.mainService=n,this.cdr=r,this._resource$=new vt(null),this.changed=new We,this.previewPaths$=new vt(null),this.destroyed$=new Re,this.customControls=[],this.serializerSettings={geometry__save_obj:!0,geometry__save_blend:!1,geometry__export_to_gg_web_engine:!1}}get resource(){return this._resource$.getValue()}set resource(e){this._resource$.next(e)}ngAfterViewInit(){var e=this;return tt(function*(){e._resource$.pipe(He(e.destroyed$)).subscribe(function(){var n=tt(function*(r){e.previewPaths$.next(yield e.loadPreviewFilePaths(r?.id))});return function(r){return n.apply(this,arguments)}}()),e.mainService.dataBlockChange$.pipe(He(e.destroyed$),gn(([n,r])=>!!e.resource&&n.startsWith(e.resource.id)),ml(1500)).subscribe(tt(function*(){e.previewPaths$.next(null),e.previewPaths$.next(yield e.postTmpUpdates(e.resource?.id))}))})()}onObjectLoaded(e){var n=this;return tt(function*(){if((n._resource$.value?.id||"").includes(".CFM__"))try{const r=n.resource?.id.split("/");r.pop(),r[r.length-1]=""+(+r[r.length-1]+1);const s=yield n.eelDelegate.retrieveValue(r.join("/")+"/data"),o=s.children_aliases.findIndex(l=>"!PAL"===l);if(-1==o)throw new Error("Not a car");const a=new $pe(e,s.children[o].data.colors[254]>>>8,n.previewPaths$.value[0].substring(0,n.previewPaths$.value[0].lastIndexOf("/"))+"/assets");n.customControls=[{title:"TNFS car features",controls:[{label:"Brake lights on",type:"checkbox",value:!1,change:l=>{a.tailLightsOn=l}},{label:"Car speed",type:"radio",options:["idle","slow","fast"],value:"idle",change:l=>{a.speed=l}},{label:"Steering angle",type:"slider",minValue:-.7,maxValue:.7,valueStep:.05,value:0,change:l=>{a.steeringAngle=l}}]}],n.cdr.markForCheck()}catch{}})()}postTmpUpdates(e){var n=this;return tt(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 tt(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)(E(Ql),E(ka),E(Zn))},i.\u0275cmp=ot({type:i,selectors:[["app-orip-geometry-block-ui"]],inputs:{resource:"resource"},outputs:{changed:"changed"},decls:4,vars:7,consts:[[3,"paths","customControls","onObjectLoaded"],[3,"resource"]],template:function(e,n){1&e&&(W(0,"app-obj-viewer",0),Ue("onObjectLoaded",function(s){return n.onObjectLoaded(s)}),Dt(1,"async"),Y(),Te(2,"app-compound-block-ui",1),Dt(3,"async")),2&e&&(U("paths",Lt(1,3,n.previewPaths$))("customControls",n.customControls),G(2),U("resource",Lt(3,5,n._resource$)))},dependencies:[Jl,h$,pl],changeDetection:0}),i})();const jpe=["class","block-ui"];function Ype(i,t){if(1&i&&(W(0,"mat-label",7),ze(1),Y()),2&i){const e=he(2);U("matTooltip",e.resourceDescription),G(1),Zi("",null==e.resource?null:e.resource.name," ")}}function qpe(i,t){if(1&i&&(W(0,"mat-option",8),ze(1),Y()),2&i){const e=t.$implicit,n=t.index,r=he(2);U("value",n)("disabled",r.disabled),G(1),Zi(" ",e.block_class_mro.split("__")[0]," ")}}function Xpe(i,t){if(1&i){const e=mi();Gr(0),fe(1,Ype,2,2,"mat-label",1),Dt(2,"async"),W(3,"div",2)(4,"mat-label"),ze(5,"Resource type:"),Y(),W(6,"mat-select",3),Ue("selectionChange",function(r){return cn(e),Gt(he().setChoiceIndex(r.value))}),fe(7,qpe,2,3,"mat-option",4),Y(),Te(8,"app-block-actions",5),Y(),Te(9,"app-editor",6),$r()}if(2&i){const e=he();let n;G(1),U("ngIf",(null==e.resource?null:e.resource.name)&&(null==e.resource?null:e.resource.name)!=(null==(n=Lt(2,8,e.main.resource$))?null:n.name)),G(5),U("value",e.resourceData.choice_index)("disabled",e.disabled),G(1),U("ngForOf",e.resource.schema.possible_resource_schemas),G(1),U("resource",e.childResource),G(1),U("resource",e.childResource)("hideBlockActions",!0)("disabled",e.disabled)}}let g$=(()=>{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 We}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:rc(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)(E(ka))},i.\u0275cmp=ot({type:i,selectors:[["app-delegate",8,"block-ui"]],inputs:{resource:"resource",resourceDescription:"resourceDescription",hideBlockActions:"hideBlockActions",disabled:"disabled"},outputs:{changed:"changed"},attrs:jpe,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"],[3,"resource","hideBlockActions","disabled"],["matTooltipPosition","above",3,"matTooltip"],[3,"value","disabled"]],template:function(e,n){1&e&&fe(0,Xpe,10,10,"ng-container",0),2&e&&U("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 Kpe=["class","block-ui"];function Zpe(i,t){if(1&i&&(W(0,"mat-label",7),ze(1),Y()),2&i){const e=he(2);U("matTooltip",e.resourceDescription),G(1),Zi(" ",e.resource.name," ")}}function Qpe(i,t){if(1&i){const e=mi();Gr(0),fe(1,Zpe,2,2,"mat-label",1),W(2,"mat-selection-list",2),Ue("selectionChange",function(r){return cn(e),Gt(he().onSelection(r))}),W(3,"mat-list-option",3),ze(4," Left "),Y(),W(5,"mat-list-option",4),ze(6," Right "),Y()(),W(7,"mat-form-field",5)(8,"mat-label"),ze(9,"Texture ID"),Y(),W(10,"input",6),Ue("ngModelChange",function(r){return cn(e),Gt(he().resource.data.texture_id=r)})("change",function(){return cn(e),Gt(he().changed.emit())}),Y()(),$r()}if(2&i){const e=he();G(1),U("ngIf",e.resource.name),G(2),U("selected",e.resource.data.has_left_fence),G(2),U("selected",e.resource.data.has_right_fence),G(5),U("max",63)("min",0)("step",1)("ngModel",e.resource.data.texture_id)}}let Jpe=(()=>{class i{constructor(){this.resource=null,this.resourceDescription="",this.changed=new We}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=ot({type:i,selectors:[["app-fence-type",8,"block-ui"]],inputs:{resource:"resource",resourceDescription:"resourceDescription"},outputs:{changed:"changed"},attrs:Kpe,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&&fe(0,Qpe,11,7,"ng-container",0),2&e&&U("ngIf",n.resource)},dependencies:[vi,gl,mu,tc,_u,gu,Xc,vl,To,ic,Os,MC,wC],changeDetection:0}),i})(),eme=(()=>{class i{constructor(){this._resource=null,this.resourceMap={},this.changed=new We}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]=["",_l.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)(E(nb),E(yte),E(oR))},i.\u0275cmp=ot({type:i,selectors:[["app-run-custom-action",8,"dialog"]],attrs:tme,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&&(W(0,"h1",0),ze(1),Y(),W(2,"div",1)(3,"p"),ze(4),Y()(),W(5,"form",2),fe(6,nme,4,4,"mat-form-field",3),Y(),W(7,"div",4)(8,"button",5),Ue("click",function(){return n.dialogRef.close()}),ze(9,"Cancel"),Y(),W(10,"button",6),Ue("click",function(){return n.submit()}),ze(11,"Run"),Y()()),2&e&&(G(1),Zi('Run action "',n.data.title,'"'),G(3),_i(n.data.description),G(1),U("formGroup",n.argsForm),G(1),U("ngForOf",n.data.args),G(4),U("disabled",n.argsForm.invalid))},dependencies:[So,IR,gl,tc,bR,vl,To,ic,qM,fV,pV,mV,Hh,fC],styles:["form[_ngcontent-%COMP%]{padding:0 24px}"]}),i})();function _$(i,t){return t?e=>Sy(t.pipe(Oi(1),function rme(){return ti((i,t)=>{i.subscribe(Yn(t,ms))})}()),e.pipe(_$(i))):nr((e,n)=>wr(i(e,n)).pipe(Oi(1),YB(e)))}function v$(i,t=$y){const e=OI(i,t);return _$(()=>e)}const sme=["mat-menu-item",""];function ome(i,t){1&i&&(ki(),W(0,"svg",3),Te(1,"polygon",4),Y())}const ame=[[["mat-icon"],["","matMenuItemIcon",""]],"*"],lme=["mat-icon, [matMenuItemIcon]","*"];function cme(i,t){if(1&i){const e=mi();W(0,"div",0),Ue("keydown",function(r){return cn(e),Gt(he()._handleKeydown(r))})("click",function(){return cn(e),Gt(he().closed.emit("click"))})("@transformMenu.start",function(r){return cn(e),Gt(he()._onAnimationStart(r))})("@transformMenu.done",function(r){return cn(e),Gt(he()._onAnimationDone(r))}),W(1,"div",1),Wt(2),Y()()}if(2&i){const e=he();U("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 dme=["*"],xO=new me("MAT_MENU_PANEL"),ume=jM(WM(class{}));let eE=(()=>{class i extends ume{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 Re,this._focused=new Re,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",jr("120ms cubic-bezier(0, 0, 0.2, 1)",si({opacity:1,transform:"scale(1)"}))),Pr("* => void",jr("100ms 25ms linear",si({opacity:0})))]),fadeInItems:Ra("fadeInItems",[Ps("showing",si({opacity:1})),Pr("void => *",[si({opacity:0}),jr("400ms 100ms cubic-bezier(0.55, 0, 0.55, 0.2)")])])};let fme=0;const y$=new me("mat-menu-default-options",{providedIn:"root",factory:function pme(){return{overlapTrigger:!1,xPosition:"after",yPosition:"below",backdropClass:"cdk-overlay-transparent-backdrop"}}});let Jb=(()=>{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 om,this._classList={},this._panelAnimationState="void",this._animationDone=new Re,this.overlayPanelClass=this._defaultOptions.overlayPanelClass||"",this.backdropClass=this._defaultOptions.backdropClass,this._overlapTrigger=this._defaultOptions.overlapTrigger,this._hasBackdrop=this._defaultOptions.hasBackdrop,this.closed=new We,this.close=this.closed,this.panelId="mat-menu-panel-"+fme++}ngOnInit(){this.setPositionClasses()}ngAfterContentInit(){this._updateDirectDescendants(),this._keyManager=new RU(this._directDescendantItems).withWrap().withTypeAhead().withHomeAndEnd(),this._keyManager.tabOut.subscribe(()=>this.closed.emit("tab")),this._directDescendantItems.changes.pipe(Ao(this._directDescendantItems),Rs(e=>Mr(...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(Ao(this._directDescendantItems),Rs(n=>Mr(...n.map(r=>r._hovered))))}addItem(e){}removeItem(e){}_handleKeydown(e){const n=e.keyCode,r=this._keyManager;switch(n){case 27:Xo(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(Oi(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(Ao(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)(E(mt),E(ft),E(y$),E(Zn))},i.\u0275dir=ve({type:i,contentQueries:function(e,n,r){if(1&e&&(Wi(r,hme,5),Wi(r,eE,5),Wi(r,eE,4)),2&e){let s;St(s=Et())&&(n.lazyContent=s.first),St(s=Et())&&(n._allItems=s),St(s=Et())&&(n.items=s)}},viewQuery:function(e,n){if(1&e&&Wn(Mo,5),2&e){let r;St(r=Et())&&(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})(),mme=(()=>{class i extends Jb{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)(E(mt),E(ft),E(y$),E(Zn))},i.\u0275cmp=ot({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:[Dn([{provide:xO,useExisting:i}]),lt],ngContentSelectors:dme,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&&(sr(),fe(0,cme,3,6,"ng-template"))},dependencies:[hm],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:[tE.transformMenu,tE.fadeInItems]},changeDetection:0}),i})();const b$=new me("mat-menu-scroll-strategy"),_me={provide:b$,deps:[as],useFactory:function gme(i){return()=>i.scrollStrategies.reposition()}},x$=Ph({passive:!0});let vme=(()=>{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,d){this._overlay=e,this._element=n,this._viewContainerRef=r,this._menuItemInstance=a,this._dir=l,this._focusMonitor=c,this._ngZone=d,this._overlayRef=null,this._menuOpen=!1,this._closingActionsSubscription=Zt.EMPTY,this._hoverSubscription=Zt.EMPTY,this._menuCloseSubscription=Zt.EMPTY,this._changeDetectorRef=Ot(Zn),this._handleTouchStart=h=>{qI(h)||(this._openedBy="touch")},this._openedBy=void 0,this.restoreFocus=!0,this.menuOpened=new We,this.onMenuOpen=this.menuOpened,this.menuClosed=new We,this.onMenuClose=this.menuClosed,this._scrollStrategy=s,this._parentMaterialMenu=o instanceof Jb?o:void 0,n.nativeElement.addEventListener("touchstart",this._handleTouchStart,x$)}ngAfterContentInit(){this._handleHover()}ngOnDestroy(){this._overlayRef&&(this._overlayRef.dispose(),this._overlayRef=null),this._element.nativeElement.removeEventListener("touchstart",this._handleTouchStart,x$),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 Jb&&(e._startAnimation(),e._directDescendantItems.changes.pipe(He(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 Jb?(n._resetAnimation(),n.lazyContent?n._animationDone.pipe(gn(r=>"void"===r.toState),Oi(1),He(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],[d,h]=[r,s],p=0;if(this.triggersSubmenu()){if(h=r="before"===e.xPosition?"start":"end",s=d="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:d,overlayY:o,offsetY:p},{originX:s,originY:l,overlayX:h,overlayY:o,offsetY:p},{originX:r,originY:c,overlayX:d,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 Mr(e,this._parentMaterialMenu?this._parentMaterialMenu.closed:ht(),this._parentMaterialMenu?this._parentMaterialMenu._hovered().pipe(gn(o=>o!==this._menuItemInstance),gn(()=>this._menuOpen)):ht(),n)}_handleMousedown(e){YI(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(gn(e=>e===this._menuItemInstance&&!e.disabled),v$(0,PI)).subscribe(()=>{this._openedBy="mouse",this.menu instanceof Jb&&this.menu._isAnimating?this.menu._animationDone.pipe(Oi(1),v$(0,PI),He(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)(E(as),E(mt),E(Wr),E(b$),E(xO,8),E(eE,10),E(Ia,8),E(Yc),E(ft))},i.\u0275dir=ve({type:i,hostVars:3,hostBindings:function(e,n){1&e&&Ue("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})(),yme=(()=>{class i extends vme{}return i.\u0275fac=function(){let t;return function(n){return(t||(t=ri(i)))(n||i)}}(),i.\u0275dir=ve({type:i,selectors:[["","mat-menu-trigger-for",""],["","matMenuTriggerFor",""]],hostAttrs:[1,"mat-mdc-menu-trigger"],exportAs:["matMenuTrigger"],features:[lt]}),i})(),bme=(()=>{class i{}return i.\u0275fac=function(e){return new(e||i)},i.\u0275mod=nn({type:i}),i.\u0275inj=Kt({providers:[_me],imports:[Eo,eb,Qn,Pm,Xy,Qn]}),i})();function xme(i,t){if(1&i){const e=mi();W(0,"button",7),Ue("click",function(){return cn(e),Gt(he(2).deserialize())}),Te(1,"mat-icon",8),Y()}}function wme(i,t){if(1&i){const e=mi();Gr(0),fe(1,xme,2,0,"button",4),W(2,"button",5),Ue("click",function(){return cn(e),Gt(he().serializeBlockReversible())}),Te(3,"mat-icon",6),Y(),$r()}if(2&i){const e=he();G(1),U("ngIf",e.isInReversibleSerializationState),G(1),U("disabled",e.isInReversibleSerializationState)}}function Mme(i,t){1&i&&(W(0,"button",9),Te(1,"mat-icon",10),Y()),2&i&&(he(),U("matMenuTriggerFor",rr(3)))}function Cme(i,t){if(1&i){const e=mi();W(0,"button",11),Ue("click",function(){const s=cn(e).$implicit;return Gt(he().runCustomAction(s))}),W(1,"span"),ze(2),Y()()}if(2&i){const e=t.$implicit;G(2),_i(e.title)}}const Sme=function(){return[]};let nE=(()=>{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 tt(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)(E(ka),E(Ql),E(Zn),E(Bm),E(IV))},i.\u0275cmp=ot({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&&(fe(0,wme,4,2,"ng-container",0),fe(1,Mme,2,1,"button",1),W(2,"mat-menu",null,2),fe(4,Cme,3,1,"button",3),Y()),2&e&&(U("ngIf",null==n.resource||null==n.resource.schema?null:n.resource.schema.serializable_to_disc),G(1),U("ngIf",(null==n.resource||null==n.resource.schema.custom_actions?null:n.resource.schema.custom_actions.length)>0),G(3),U("ngForOf",(null==n.resource?null:n.resource.schema.custom_actions)||so(3,Sme)))},dependencies:[So,vi,Os,XM,gR,mme,eE,yme],styles:["[_nghost-%COMP%]{display:flex}"]}),i})();const Eme=["class","block-ui"];function Ame(i,t){if(1&i&&(W(0,"mat-label",7),ze(1),Y()),2&i){const e=he();U("matTooltip",e.resourceDescription),G(1),Zi("",null==e.resource?null:e.resource.name," ")}}function Dme(i,t){if(1&i&&(W(0,"audio",8),Te(1,"source",9),Dt(2,"async"),ze(3," Your browser does not support the audio element. "),Y()),2&i){const e=he();G(1),U("src",Lt(2,1,e.audioUrl$),Lp)}}function Tme(i,t){1&i&&Te(0,"mat-spinner",10)}function Ime(i,t){1&i&&Te(0,"app-block-actions",11),2&i&&U("resource",he().resource)}const Rme=function(){return["wave_data"]};let kme=(()=>{class i{constructor(e,n){this.eelDelegate=e,this.main=n,this._resource$=new vt(null),this.audioUrl$=new vt(null),this.resourceDescription="",this.hideBlockActions=!1,this.destroyed$=new Re,this.changed=new We}set resource(e){this._resource$.next(e)}get resource(){return this._resource$.getValue()}ngAfterViewInit(){var e=this;return tt(function*(){e._resource$.pipe(He(e.destroyed$)).subscribe(function(){var n=tt(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)(E(Ql),E(ka))},i.\u0275cmp=ot({type:i,selectors:[["app-eacs-audio",8,"block-ui"]],inputs:{resource:"resource",resourceDescription:"resourceDescription",hideBlockActions:"hideBlockActions"},outputs:{changed:"changed"},attrs:Eme,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&&(W(0,"div",0),fe(1,Ame,2,2,"mat-label",1),Dt(2,"async"),fe(3,Dme,4,3,"audio",2),Dt(4,"async"),fe(5,Tme,1,0,"mat-spinner",3),Dt(6,"async"),Te(7,"div",4),fe(8,Ime,1,1,"app-block-actions",5),Y(),Te(9,"app-compound-block-ui",6),Dt(10,"async")),2&e){let r;G(1),U("ngIf",(null==n.resource?null:n.resource.name)&&(null==n.resource?null:n.resource.name)!=(null==(r=Lt(2,7,n.main.resource$))?null:r.name)),G(2),U("ngIf",Lt(4,9,n.audioUrl$)),G(2),U("ngIf",n.resource&&!Lt(6,11,n.audioUrl$)),G(3),U("ngIf",!n.hideBlockActions),G(1),U("resource",Lt(10,13,n._resource$))("hideBlockActions",!0)("fieldBlacklist",so(15,Rme))}},dependencies:[vi,To,Os,Qb,Jl,nE,pl],styles:["#header[_ngcontent-%COMP%]{display:flex}"]}),i})();class Pme{constructor(t,e){this.mesh=t,this.assetsPath=e,this.textures=[],this.tyreTextureUpdateTimer=void 0,this.tyreMaterial=null,this.tyreTextures=[],this._color=65280,this._speed="idle",this._steeringAngle=0,this.wheels=[],this.wheelIdlePositions=[],this.frontWheels=[];let n=new Set;if(t.traverse(r=>{if(!(r instanceof Mn))return;let s=-1;if(r.name.startsWith("part_hp_12")?s=0:r.name.startsWith("part_hp_14")?s=1:r.name.startsWith("part_hp_16")?s=2:r.name.startsWith("part_hp_18")&&(s=3),s>-1){r.geometry.boundingBox||r.geometry.computeBoundingBox();let a=Pe.avg(r.geometry.boundingBox.min,r.geometry.boundingBox.max);return(0==s||2==s)&&(a={x:a.x,y:a.y,z:a.z+1.5}),r.geometry.translate(...Pe.spr(Pe.neg(a))),r.position.set(...Pe.spr(a)),this.wheelIdlePositions[s]=a,this.wheels.push(r),void(s<2&&this.frontWheels.push(r))}const o=r.material.map;o&&n.add(o)}),this.textures=Array.from(n).map(r=>{const s=new ko(document.createElement("img"));return s.flipY=r.flipY,ia(s),[r,s]}),t.traverse(r=>{if(!(r instanceof Mn))return;const s=r.material.map;if(s){const o=this.textures.find(([a,l])=>a===s);o&&(r.material.map=o[1])}}),this.hasWheels){const r=new yf;this.tyreTextures=[0,1,2,3].map(s=>r.load(`${e}/m${s}00.png`));for(const s of this.tyreTextures)ia(s);this.tyreMaterial=new qi({map:this.tyreTextures[0]}),this.tyreMaterial.transparent=!0,this.tyreMaterial.alphaTest=.5,this.tyreMaterial.map.wrapS=Ii,this.tyreMaterial.map.wrapT=Ii,this.tyreMaterial.polygonOffset=!0,this.tyreMaterial.polygonOffsetFactor=-4;for(const s of this.wheels)s.material=this.tyreMaterial}this.color=65280,this.recolorCar().then()}get color(){return this._color}set color(t){t!==this._color&&(this._color=t,this.recolorCar().then())}get speed(){return this._speed}set speed(t){if(t!==this._speed){switch(this._speed=t,this.tyreTextureUpdateTimer&&clearInterval(this.tyreTextureUpdateTimer),t){case"idle":this.tyreMaterial.map=this.tyreTextures[0];break;case"slow":let e=!0;this.tyreTextureUpdateTimer=setInterval(()=>{this.tyreMaterial.map=this.tyreTextures[e?1:2],this.tyreMaterial.needsUpdate=!0,e=!e},16);break;case"fast":this.tyreMaterial.map=this.tyreTextures[3]}this.tyreMaterial.needsUpdate=!0}}get steeringAngle(){return this._steeringAngle}set steeringAngle(t){if(t!==this._steeringAngle){this._steeringAngle=t;for(const e of this.frontWheels)e.rotation.set(0,0,t)}}get hasWheels(){return this.wheels.length>0}recolorCar(){var t=this;return tt(function*(){const[e,n,r]=[t.color>>16,t.color>>8&255,255&t.color];for(const[s,o]of t.textures){for(let a=100;a>0&&!s.source.data;a--)yield p$(50);m$(s.source.data,(a,l)=>{if(a[l]+a[l+2]{class i{constructor(e,n,r){this.eelDelegate=e,this.main=n,this.cdr=r,this._resource$=new vt(null),this.changed=new We,this.customControls=[],this.previewPaths$=new vt(null),this.destroyed$=new Re,this.serializerSettings={geometry__save_obj:!0,geometry__save_blend:!1,geometry__export_to_gg_web_engine:!1}}get resource(){return this._resource$.getValue()}set resource(e){this._resource$.next(e)}ngAfterViewInit(){var e=this;return tt(function*(){e._resource$.pipe(He(e.destroyed$)).subscribe(function(){var n=tt(function*(r){e.previewPaths$.next(yield e.loadPreviewFilePaths(r?.id))});return function(r){return n.apply(this,arguments)}}()),e.main.dataBlockChange$.pipe(He(e.destroyed$),gn(([n,r])=>!!e.resource&&n.startsWith(e.resource.id)),ml(1500)).subscribe(tt(function*(){e.previewPaths$.next(null),e.previewPaths$.next(yield e.postTmpUpdates(e.resource?.id))}))})()}onObjectLoaded(e){var n=this;return tt(function*(){try{const r=new Pme(e,n.previewPaths$.value[0].substring(0,n.previewPaths$.value[0].lastIndexOf("/"))+"/assets");let s=null;const o=a=>{s&&clearTimeout(s),s=setTimeout(()=>r.color=a,50)};n.customControls=[{title:"NFS2 car features",controls:[{label:"Car color",type:"color",value:65280,change:a=>o(a)}]}],r.hasWheels&&n.customControls[0].controls.push({label:"Car speed",type:"radio",options:["idle","slow","fast"],value:"idle",change:a=>{r.speed=a}},{label:"Steering angle",type:"slider",minValue:-.7,maxValue:.7,valueStep:.05,value:0,change:a=>{r.steeringAngle=a}}),n.cdr.markForCheck()}catch(r){console.error(r)}})()}postTmpUpdates(e){var n=this;return tt(function*(){if(e){const r=yield n.eelDelegate.serializeResourceTmp(e,Object.entries(n.main.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 tt(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)(E(Ql),E(ka),E(Zn))},i.\u0275cmp=ot({type:i,selectors:[["app-geo-geometry",8,"block-ui"]],inputs:{resource:"resource"},outputs:{changed:"changed"},attrs:Ome,decls:4,vars:8,consts:[[3,"paths","groupFunction","customControls","onObjectLoaded"],[3,"resource",4,"ngIf"],[3,"resource"]],template:function(e,n){1&e&&(W(0,"app-obj-viewer",0),Ue("onObjectLoaded",function(s){return n.onObjectLoaded(s)}),Dt(1,"async"),Y(),fe(2,Fme,2,3,"app-compound-block-ui",1),Dt(3,"async")),2&e&&(U("paths",Lt(1,4,n.previewPaths$))("groupFunction",n.previewObjectGroupFunc)("customControls",n.customControls),G(2),U("ngIf",!Lt(3,6,n.main.hideHiddenFields$)))},dependencies:[vi,Jl,h$,pl],changeDetection:0}),i})();const Nme=function(){return["children","items_descr"]};let Bme=(()=>{class i{constructor(){this._resource=null,this.hideBlockActions=!1,this.resourceMap={},this.changed=new We}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:rc(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=ot({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&&Te(0,"app-compound-block-ui",0)(1,"app-sidenav-res-list",1),2&e&&(U("resource",n.resource)("hideBlockActions",n.hideBlockActions)("fieldBlacklist",so(4,Nme)),G(1),U("resources",n.resourceMap))},dependencies:[Jl,xC],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})();const Ume=["previewCanvasContainer"],Vme=["previewCanvas"];function zme(i,t){1&i&&Te(0,"mat-spinner",11)}var Df=(()=>{return(i=Df||(Df={})).ThreeModel="model",i.Bitmap="bitmap",i.TwoSidedBitmap="two_sided_bitmap",Df;var i})();class Hme extends QH{constructor(t,e,n){super(t,{loadDepth:40,inertia:2}),this.mapGraph=t,this.famPath=e,this.hideUnknownEntities$=n,this.textureLoader=new yf,this.terrainMaterials={},this.objLoader=new Zb,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(Zl(),He(this._onRemoved$)).subscribe(e=>{for(const n of this.unknownEntities)n.visible=!e})}getPlaceholderTexture(){var t=this;return tt(function*(){return t._placeholder?t._placeholder:(t._placeholderPromise||(t._placeholderPromise=t.textureLoader.loadAsync("assets/placeholder_texture.png")),t._placeholderPromise)})()}getPlaceholderTerrainTexture(){var t=this;return tt(function*(){return t._placeholderTerrain?t._placeholderTerrain:(t._placeholderTerrainPromise||(t._placeholderTerrainPromise=t.textureLoader.loadAsync("assets/placeholder_texture.png").then(e=>(e.wrapS=Pa,e.wrapT=Ii,ia(e),e.flipY=!0,e))),t._placeholderTerrainPromise)})()}loadChunk(t){var e=this;return tt(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 Mn&&(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:Pe.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:Yi.fromAngle(Pe.nZ,l.rotation)}));const o=(yield Promise.all(s.map(l=>e.loadPropInternal(l)))).filter(l=>!!l),a=new Zo({object3D:new na(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 qi({side:Ls,transparent:!0,visible:!1}),this.famPath?this.textureLoader.loadAsync(`${this.famPath}/background/${t}.png`).then(e=>{e.wrapS=Pa,e.wrapT=Ii,ia(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 tt(function*(){let n=!1;if(t.type==Df.ThreeModel){let r;try{if(!e.famPath)throw new Error;const o=new bO,a=new Zb,l=yield o.loadAsync(`${e.famPath}/props/${t.data.data.resource_id}/0/material.mtl`);l.preload(),a.setMaterials(l),r=new na(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 Mn){const a=o.material instanceof Array?o.material:[o.material];for(const l of a)l.transparent=!0,l.alphaTest=.5,l instanceof qi&&l.map&&(l.map.wrapS=Ii,l.map.wrapT=Ii,ia(l.map),l.map.needsUpdate=!0)}});const s=new Zo({object3D: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,d)=>new Array(d).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 Fo,[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,d]=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 Zo({object3D:new na(s)});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 tt(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=>(ia(h),new qi({map:h,alphaTest:.5,transparent:!0,side:Ls}))),d=new Mn(new Iu(e.x,e.y),c[0]);if(d.rotateX(Math.PI/2),d.position.set(0,0,e.y/2),c.length>1){let h=-1;Ym(r.world).pipe(o4(n&&!isNaN(+n)?1e3*+n:250)).subscribe(()=>{h=(h+1)%c.length,d.material=c[h]})}return[d,a]})()}}let Gme=(()=>{class i{constructor(e,n,r){this.eelDelegate=e,this.cdr=n,this.mainService=r,this._resource$=new vt(null),this.changed=new We,this.previewLoading$=new vt(!0),this.pointer$=new vt(null),this.selectedSplineIndex$=new vt(0),this.name="",this.renderer=null,this.map=null,this.roadPath=null,this.destroyed$=new Re}get resource(){return this._resource$.getValue()}set resource(e){this._resource$.next(e)}get roadSpline(){return this.resource?.data.block_positions||[]}ngAfterViewInit(){var e=this;return tt(function*(){var s;e.world=new sk(new vO,{init:(s=tt(function*(){}),function(){return s.apply(this,arguments)}),simulate:()=>{},loader:{loadFromGgGlb:function(){var s=tt(function*(...o){return[]});return function(){return s.apply(this,arguments)}}()}}),yield e.world.init(),e.skySphere=new Zo({object3D:e.world.visualScene.factory.createPrimitive({shape:"SPHERE",radius:1e3},{color:16777215})}),e.skySphere.object3D.nativeMesh.material.side=Ls,e.world.addEntity(e.skySphere),e.selectionSphere=new Zo({object3D: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 $S(16777215,2));let n=new vt({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=Yi.lookAt(e.renderer.camera.position,Pe.add(e.renderer.camera.position,Pe.Y),Pe.Z),Ym(e.world).pipe(He(e.destroyed$)).subscribe(()=>{e.renderer&&(e.skySphere.position=e.renderer.camera.position,e.pointer$.next(e.renderer.camera.position))}),e.controller=new n4(e.world.keyboardInput,e.renderer,{mouseOptions:{canvas:e.previewCanvas.nativeElement,pointerLock:!0},keymap:"wasd+arrows",cameraLinearSpeed:40,cameraBoostMultiplier:4,cameraMovementElasticity:100,cameraRotationElasticity:30,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(He(e.destroyed$)).subscribe(function(){var s=tt(function*(o){e.previewLoading$.next(!0),yield e.loadTerrainChunks(o?.id),yield e.loadPreview(),e.previewLoading$.next(!1)});return function(o){return s.apply(this,arguments)}}()),e.mainService.dataBlockChange$.pipe(He(e.destroyed$),gn(([s,o])=>!!e.resource&&s.startsWith(e.resource.id)),ml(3e3)).subscribe(tt(function*(){e.previewLoading$.next(!0),yield e.postTmpUpdates(e.resource?.id),yield e.loadPreview(),e.previewLoading$.next(!1)})),e.selectedSplineIndex$.pipe(He(e.destroyed$),ml(250)).subscribe(s=>{if(e.resource){let o=e.resource.data.block_positions[s];if(!o)return;o={x:o.x,y:o.z,z:o.y},e.selectionSphere.position=o,e.renderer&&(e.renderer.position=Pe.add(o,Pe.rotAround({x:10,y:-12,z:5},{x:0,y:0,z:1},-0)),e.renderer.rotation=Yi.lookAt(e.renderer.position,o,{x:0,y:0,z:1}),e.controller.reset())}})})()}loadTerrainChunks(e){var n=this;return tt(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 tt(function*(){if(e.roadPath=e.resource?.data.block_positions.map(r=>({x:r.x,y:r.z,z:r.y})),!e.terrainChunksObjLocation||!e.roadPath)return;const n=Km.fromMapArray(e.roadPath.map((r,s)=>({path:`${e.terrainChunksObjLocation}terrain_chunk_${s}`,position:r,loadOptions:{}}))||[],!0);e.unloadPreview(),e.map=new Hme(n,"",e.mainService.hideHiddenFields$),e.map.resource=e.resource,e.map.isOpenedTrack=!1,Ym(e.world).pipe(He(e.destroyed$)).subscribe(()=>{e.map&&e.renderer&&e.map.loaderCursor$.next(e.renderer.position)}),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 tt(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)(E(Ql),E(Zn),E(ka))},i.\u0275cmp=ot({type:i,selectors:[["app-trk-map-block-ui"]],viewQuery:function(e,n){if(1&e&&(Wn(Ume,5),Wn(Vme,5)),2&e){let r;St(r=Et())&&(n.previewCanvasContainer=r.first),St(r=Et())&&(n.previewCanvas=r.first)}},inputs:{resource:"resource"},outputs:{changed:"changed"},decls:19,vars:18,consts:[[1,"preview"],[1,"previewCanvasContainer"],["previewCanvasContainer",""],["width","640","height","480"],["previewCanvas",""],["mode","indeterminate",4,"ngIf"],[1,"previewNavigationContainer"],["appearance","fill"],["matInput","","type","number",3,"min","max","ngModel","ngModelChange"],[3,"roadSpline","pointer","splineClosed"],[3,"resource"],["mode","indeterminate"]],template:function(e,n){if(1&e&&(W(0,"div",0)(1,"div",1,2),Te(3,"canvas",3,4),fe(5,zme,1,0,"mat-spinner",5),Dt(6,"async"),Y(),W(7,"div",6,2)(9,"mat-form-field",7)(10,"mat-label"),ze(11,"Spline item"),Y(),W(12,"input",8),Ue("ngModelChange",function(s){return n.selectedSplineIndex$.next(s)}),Dt(13,"async"),Dt(14,"async"),Y()(),Te(15,"app-tri-minimap",9),Dt(16,"async"),Y()(),Te(17,"app-compound-block-ui",10),Dt(18,"async")),2&e){let r;G(5),U("ngIf",Lt(6,8,n.previewLoading$)),G(7),U("min",0)("max",4*(null==(r=Lt(13,10,n._resource$))?null:r.data.num_blocks)-1)("ngModel",Lt(14,12,n.selectedSplineIndex$)),G(3),U("roadSpline",n.roadSpline)("pointer",Lt(16,14,n.pointer$))("splineClosed",!0),G(2),U("resource",Lt(18,16,n._resource$))}},dependencies:[vi,gl,mu,tc,_u,gu,Xc,vl,To,ic,Qb,Jl,f$,pl],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})();function $me(i,t){if(1&i&&(W(0,"mat-error"),ze(1),Y()),2&i){const e=he(2);G(1),tm(" ",e.resourceError.data.error_class,": ",e.resourceError.data.error_text," ")}}function Wme(i,t){1&i&&Te(0,"mat-spinner",5)}function jme(i,t){if(1&i&&(W(0,"div",2),fe(1,$me,2,2,"mat-error",3),fe(2,Wme,1,0,"mat-spinner",4),Y()),2&i){const e=he();G(1),U("ngIf",e.resourceError),G(1),U("ngIf",!e.resourceError)}}function Yme(i,t){}let e0=(()=>{class i{constructor(e){this.mainService=e,this._component=null,this._componentChangedSub=null,this.destroyed$=new Re,this.resourceSet$=new Re,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(He(this.destroyed$),He(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 qme(i,t){1&i&&Te(0,"mat-icon",17)}function Xme(i,t){1&i&&Te(0,"mat-icon",18)}let Kme=(()=>{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 tt(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 tt(function*(){if(e.mainService.hasUnsavedChanges){let n=e.dialog.open(CV,{data:{text:"There are unsaved changes, which will be lost. Are you sure you want to reload file?"}});if(!(yield lR(n.afterClosed())))return}yield e.mainService.reloadResource(),e.cdr.markForCheck()})()}}return i.\u0275fac=function(e){return new(e||i)(E(Ql),E(ka),E(Bm),E(IV),E(Zn))},i.\u0275cmp=ot({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&&(W(0,"mat-toolbar",0)(1,"span"),ze(2),Dt(3,"async"),Dt(4,"async"),Y(),Te(5,"span",1),W(6,"button",2),Ue("click",function(){return n.toggleUnknownsVisibility()}),fe(7,qme,1,0,"mat-icon",3),Dt(8,"async"),fe(9,Xme,1,0,"mat-icon",4),Dt(10,"async"),Y(),Te(11,"mat-divider",5)(12,"app-block-actions",6),Dt(13,"async"),W(14,"button",7),Ue("click",function(){return n.reloadResource()}),Dt(15,"async"),Te(16,"mat-icon",8),Y(),Te(17,"mat-divider",5),W(18,"button",9),Ue("click",function(){return n.saveResource()}),Dt(19,"async"),Dt(20,"async"),Te(21,"mat-icon",10),Y()(),W(22,"div",11),Te(23,"div",12)(24,"app-editor",13),Dt(25,"async"),Dt(26,"async"),Dt(27,"async"),W(28,"div",14)(29,"a",15),Te(30,"img",16),Y()(),Te(31,"div",12),Y()),2&e){let r;G(2),tm("",(null==(r=Lt(3,9,n.mainService.resource$))?null:r.name)||"...","",Lt(4,11,n.mainService.hasUnsavedChanges$)?"*":"",""),G(5),U("ngIf",Lt(8,13,n.mainService.hideHiddenFields$)),G(2),U("ngIf",!Lt(10,15,n.mainService.hideHiddenFields$)),G(3),U("resource",Lt(13,17,n.mainService.resource$)),G(2),U("disabled",!Lt(15,19,n.mainService.eelDelegate.openedResourcePath$)),G(4),U("disabled",!Lt(19,21,n.mainService.resource$)||!Lt(20,23,n.mainService.hasUnsavedChanges$)),G(6),U("resource",Lt(25,25,n.mainService.customActionRunning$)?null:Lt(26,27,n.mainService.resource$)||Lt(27,29,n.mainService.error$))("hideBlockActions",!0)}},dependencies:[vi,MJ,SJ,Os,XM,gR,e0,nE,pl],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 w$(i){return new pe(3e3,!1)}function Rge(){return typeof window<"u"&&typeof window.document<"u"}function wO(){return typeof process<"u"&&"[object process]"==={}.toString.call(process)}function Lu(i){switch(i.length){case 0:return new tb;case 1:return i[0];default:return new oV(i)}}function M$(i,t,e,n,r=new Map,s=new Map){const o=[],a=[];let l=-1,c=null;if(n.forEach(d=>{const h=d.get("offset"),p=h==l,m=p&&c||new Map;d.forEach((g,b)=>{let v=b,y=g;if("offset"!==b)switch(v=t.normalizePropertyName(v,o),y){case rR:y=r.get(b);break;case qc: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 yge(i){return new pe(3502,!1)}();return a}function MO(i,t,e,n){switch(t){case"start":i.onStart(()=>n(e&&CO(e,"start",i)));break;case"done":i.onDone(()=>n(e&&CO(e,"done",i)));break;case"destroy":i.onDestroy(()=>n(e&&CO(e,"destroy",i)))}}function CO(i,t,e){const s=SO(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 SO(i,t,e,n,r="",s=0,o){return{element:i,triggerName:t,fromState:e,toState:n,phaseName:r,totalTime:s,disabled:!!o}}function ra(i,t,e){let n=i.get(t);return n||i.set(t,n=e),n}function C$(i){const t=i.indexOf(":");return[i.substring(1,t),i.slice(t+1)]}let EO=(i,t)=>!1,S$=(i,t,e)=>[],E$=null;function AO(i){const t=i.parentNode||i.host;return t===E$?null:t}(wO()||typeof Element<"u")&&(Rge()?(E$=(()=>document.documentElement)(),EO=(i,t)=>{for(;t;){if(t===i)return!0;t=AO(t)}return!1}):EO=(i,t)=>i.contains(t),S$=(i,t,e)=>{if(e)return Array.from(i.querySelectorAll(t));const n=i.querySelector(t);return n?[n]:[]});let Tf=null,A$=!1;const D$=EO,T$=S$;let I$=(()=>{class i{validateStyleProperty(e){return function Pge(i){Tf||(Tf=function Oge(){return typeof document<"u"?document.body:null}()||{},A$=!!Tf.style&&"WebkitAppearance"in Tf.style);let t=!0;return Tf.style&&!function kge(i){return"ebkit"==i.substring(1,6)}(i)&&(t=i in Tf.style,!t&&A$&&(t="Webkit"+i.charAt(0).toUpperCase()+i.slice(1)in Tf.style)),t}(e)}matchesElement(e,n){return!1}containsElement(e,n){return D$(e,n)}getParentElement(e){return AO(e)}query(e,n,r){return T$(e,n,r)}computeStyle(e,n,r){return r||""}animate(e,n,r,s,o,a=[],l){return new tb(r,s)}}return i.\u0275fac=function(e){return new(e||i)},i.\u0275prov=ke({token:i,factory:i.\u0275fac}),i})(),DO=(()=>{class i{}return i.NOOP=new I$,i})();const Fge=1e3,TO="ng-enter",iE="ng-leave",rE="ng-trigger",sE=".ng-trigger",k$="ng-animating",IO=".ng-animating";function hd(i){if("number"==typeof i)return i;const t=i.match(/^(-?[\.\d]+)(m?s)/);return!t||t.length<2?0:RO(parseFloat(t[1]),t[2])}function RO(i,t){return"s"===t?i*Fge:i}function oE(i,t,e){return i.hasOwnProperty("duration")?i:function Nge(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(w$()),{duration:0,delay:0,easing:""};r=RO(parseFloat(a[1]),a[2]);const l=a[3];null!=l&&(s=RO(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 Zme(){return new pe(3100,!1)}()),a=!0),s<0&&(t.push(function Qme(){return new pe(3101,!1)}()),a=!0),a&&t.splice(l,0,w$())}return{duration:r,delay:s,easing:o}}(i,t,e)}function t0(i,t={}){return Object.keys(i).forEach(e=>{t[e]=i[e]}),t}function P$(i){const t=new Map;return Object.keys(i).forEach(e=>{t.set(e,i[e])}),t}function Nu(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 F$(i,t,e){return e?t+":"+e+";":""}function L$(i){let t="";for(let e=0;e{const s=PO(r);e&&!e.has(r)&&e.set(r,i.style[s]),i.style[s]=n}),wO()&&L$(i))}function If(i,t){i.style&&(t.forEach((e,n)=>{const r=PO(n);i.style[r]=""}),wO()&&L$(i))}function n0(i){return Array.isArray(i)?1==i.length?i[0]:iV(i):i}const kO=new RegExp("{{\\s*(.+?)\\s*}}","g");function N$(i){let t=[];if("string"==typeof i){let e;for(;e=kO.exec(i);)t.push(e[1]);kO.lastIndex=0}return t}function r0(i,t,e){const n=i.toString(),r=n.replace(kO,(s,o)=>{let a=t[o];return null==a&&(e.push(function ege(i){return new pe(3003,!1)}()),a=""),a.toString()});return r==n?i:r}function aE(i){const t=[];let e=i.next();for(;!e.done;)t.push(e.value),e=i.next();return t}const Vge=/-+([a-z0-9])/g;function PO(i){return i.replace(Vge,(...t)=>t[1].toUpperCase())}function zge(i){return i.replace(/([a-z])([A-Z])/g,"$1-$2").toLowerCase()}function sa(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 tge(i){return new pe(3004,!1)}()}}function B$(i,t){return window.getComputedStyle(i)[t]}const dE="*";function Yge(i,t){const e=[];return"string"==typeof i?i.split(/\s*,\s*/).forEach(n=>function qge(i,t,e){if(":"==i[0]){const l=function Xge(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 pge(i){return new pe(3015,!1)}()),t;const r=n[1],s=n[2],o=n[3];t.push(U$(r,o));"<"==s[0]&&!(r==dE&&o==dE)&&t.push(U$(o,r))}(n,e,t)):e.push(i),e}const uE=new Set(["true","1"]),hE=new Set(["false","0"]);function U$(i,t){const e=uE.has(i)||hE.has(i),n=uE.has(t)||hE.has(t);return(r,s)=>{let o=i==dE||i==r,a=t==dE||t==s;return!o&&e&&"boolean"==typeof r&&(o=r?uE.has(i):hE.has(i)),!a&&n&&"boolean"==typeof s&&(a=s?uE.has(t):hE.has(t)),o&&a}}const Kge=new RegExp("s*:selfs*,?","g");function OO(i,t,e,n){return new Zge(i).build(t,e,n)}class Zge{constructor(t){this._driver=t}build(t,e,n){const r=new e_e(e);return this._resetContextStyleTimingState(r),sa(this,n0(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 ige(){return new pe(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(d=>{l.name=d,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 rge(){return new pe(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=>{N$(l).forEach(c=>{o.hasOwnProperty(c)||s.add(c)})})}),s.size&&(aE(s.values()),e.errors.push(function sge(i,t){return new pe(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=sa(this,n0(t.animation),e);return{type:1,matchers:Yge(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=>sa(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=sa(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 n_e(i,t){if(i.hasOwnProperty("duration"))return i;if("number"==typeof i)return FO(oE(i,t).duration,0,"");const e=i;if(e.split(/\s+/).some(s=>"{"==s.charAt(0)&&"{"==s.charAt(1))){const s=FO(0,0,"");return s.dynamic=!0,s.strValue=e,s}const r=oE(e,t);return FO(r.duration,r.delay,r.easing)}(t.timings,e.errors);e.currentAnimateTimings=n;let r,s=t.styles?t.styles:si({});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=si(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===qc?n.push(a):e.errors.push(new pe(3002,!1)):n.push(P$(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),d=c.get(l);let h=!0;d&&(s!=r&&s>=d.startTime&&r<=d.endTime&&(e.errors.push(function age(i,t,e,n,r){return new pe(3010,!1)}()),h=!1),s=d.startTime),h&&c.set(l,{startTime:s,endTime:r}),e.options&&function Uge(i,t,e){const n=t.params||{},r=N$(i);r.length&&r.forEach(s=>{n.hasOwnProperty(s)||e.push(function Jme(i){return new pe(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 lge(){return new pe(3011,!1)}()),n;let s=0;const o=[];let a=!1,l=!1,c=0;const d=t.steps.map(y=>{const M=this._makeStyleAst(y,e);let x=null!=M.offset?M.offset:function t_e(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:sa(this,n0(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 Qge(i){const t=!!i.split(/\s*,\s*/).find(e=>":self"==e);return t&&(i=i.replace(Kge,"")),i=i.replace(/@\*/g,sE).replace(/@\w+/g,e=>sE+"-"+e.slice(1)).replace(/:animating/g,IO),[i,t]}(t.selector);e.currentQuerySelector=n.length?n+" "+s:s,ra(e.collectedStyles,e.currentQuerySelector,new Map);const a=sa(this,n0(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 hge(){return new pe(3013,!1)}());const n="full"===t.timings?{duration:0,delay:0,easing:"full"}:oE(t.timings,e.errors,!0);return{type:12,animation:sa(this,n0(t.animation),e),timings:n,options:null}}}class e_e{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=t0(i)).params&&(i.params=function Jge(i){return i?t0(i):null}(i.params)):i={},i}function FO(i,t,e){return{duration:i,delay:t,easing:e}}function LO(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 fE{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 s_e=new RegExp(":enter","g"),a_e=new RegExp(":leave","g");function NO(i,t,e,n,r,s=new Map,o=new Map,a,l,c=[]){return(new l_e).buildKeyframes(i,t,e,n,r,s,o,a,l,c)}class l_e{buildKeyframes(t,e,n,r,s,o,a,l,c,d=[]){c=c||new fE;const h=new BO(t,e,c,r,s,d,[]);h.options=l;const p=l.delay?hd(l.delay):0;h.currentTimeline.delayNextStep(p),h.currentTimeline.setStyles([o],null,h.errors,l),sa(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()):[LO(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:hd(r0(s,r?.params??{},e.errors));n.delayNextStep(o)}}}_visitSubInstructions(t,e,n){let s=e.currentTimeline.currentTime;const o=null!=n.duration?hd(n.duration):null,a=null!=n.delay?hd(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),sa(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=pE);const o=hd(s.delay);r.delayNextStep(o)}t.steps.length&&(t.steps.forEach(o=>sa(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?hd(t.options.delay):0;t.steps.forEach(o=>{const a=e.createSubContext(t.options);s&&a.delayNextStep(s),sa(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 oE(e.params?r0(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?hd(r.delay):0;s&&(6===e.previousNode.type||0==n&&e.currentTimeline.hasCurrentStyleProperties())&&(e.currentTimeline.snapshotCurrentStyles(),e.previousNode=pE);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,d)=>{e.currentQueryIndex=d;const h=e.createSubContext(t.options,c);s&&h.delayNextStep(s),c===e.element&&(l=h.currentTimeline),sa(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 d=e.currentTimeline;l&&d.delayNextStep(l);const h=d.currentTime;sa(this,t.animation,e),e.previousNode=t,n.currentStaggerTime=r.currentTime-h+(r.startTime-n.currentTimeline.startTime)}}const pE={};class BO{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=pE,this.subContextCount=0,this.options={},this.currentQueryIndex=0,this.currentQueryTotal=0,this.currentStaggerTime=0,this.currentTimeline=l||new mE(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=hd(n.duration)),null!=n.delay&&(r.delay=hd(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]=r0(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 BO(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=pE,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 c_e(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(s_e,"."+this._enterClassName)).replace(a_e,"."+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 fge(i){return new pe(3014,!1)}()),a}}class mE{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 mE(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||qc),this._currentKeyframe.set(e,qc);this._currentEmptyStepKeyframe=this._currentKeyframe}setStyles(t,e,n,r){e&&this._previousKeyframe.set("easing",e);const s=r&&r.params||{},o=function d_e(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,qc)}else Nu(r,e)}),e}(t,this._globalTimelineStyles);for(let[a,l]of o){const c=r0(l,s,n);this._pendingStyles.set(a,c),this._localTimelineStyles.has(a)||this._backFill.set(a,this._globalTimelineStyles.get(a)??qc),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=Nu(a,new Map,this._backFill);c.forEach((d,h)=>{d===rR?t.add(h):d===qc&&e.add(h)}),n||c.set("offset",l/this.duration),r.push(c)});const s=t.size?aE(t.values()):[],o=e.size?aE(e.values()):[];if(n){const a=r[0],l=new Map(a);a.set("offset",0),l.set("offset",1),r=[a,l]}return LO(this.element,r,s,o,this.duration,this.startTime,this.easing,!1)}}class c_e extends mE{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=Nu(t[0]);l.set("offset",0),s.push(l);const c=Nu(t[0]);c.set("offset",H$(a)),s.push(c);const d=t.length-1;for(let h=1;h<=d;h++){let p=Nu(t[h]);const m=p.get("offset");p.set("offset",H$((e+m*n)/o)),s.push(p)}n=o,e=0,r="",t=s}return LO(this.element,t,this.preStyleProps,this.postStyleProps,n,e,r,!0)}}function H$(i,t=3){const e=Math.pow(10,t-1);return Math.round(i*e)/e}class UO{}const u_e=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 h_e extends UO{normalizePropertyName(t,e){return PO(t)}normalizeStyleValue(t,e,n,r){let s="";const o=n.toString().trim();if(u_e.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 nge(i,t){return new pe(3005,!1)}())}return o+s}}function G$(i,t,e,n,r,s,o,a,l,c,d,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:d,totalTime:h,errors:p}}const VO={};class $${constructor(t,e,n){this._triggerName=t,this.ast=e,this._stateStyles=n}match(t,e,n,r){return function f_e(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,d){const h=[],p=this.ast.options&&this.ast.options.params||VO,g=this.buildStyles(n,a&&a.params||VO,h),b=l&&l.params||VO,v=this.buildStyles(r,b,h),y=new Set,M=new Map,x=new Map,C="void"===r,F={params:p_e(b,p),delay:this.ast.options?.delay},D=d?[]:NO(t,e,this.ast.animation,s,o,g,v,F,c,h);let k=0;if(D.forEach(T=>{k=Math.max(T.duration+T.delay,k)}),h.length)return G$(e,this._triggerName,n,r,C,g,v,[],[],M,x,k,h);D.forEach(T=>{const A=T.element,$=ra(M,A,new Set);T.preStyleProps.forEach(ne=>$.add(ne));const ie=ra(x,A,new Set);T.postStyleProps.forEach(ne=>ie.add(ne)),A!==e&&y.add(A)});const B=aE(y.values());return G$(e,this._triggerName,n,r,C,g,v,D,B,M,x,k)}}function p_e(i,t){const e=t0(t);for(const n in i)i.hasOwnProperty(n)&&null!=i[n]&&(e[n]=i[n]);return e}class m_e{constructor(t,e,n){this.styles=t,this.defaultParams=e,this.normalizer=n}buildStyles(t,e){const n=new Map,r=t0(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=r0(o,r,e));const l=this.normalizer.normalizePropertyName(a,e);o=this.normalizer.normalizeStyleValue(a,l,o,e),n.set(a,o)})}),n}}class __e{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 m_e(r.style,r.options&&r.options.params||{},n))}),W$(this.states,"true","1"),W$(this.states,"false","0"),e.transitions.forEach(r=>{this.transitionFactories.push(new $$(t,r,this.states))}),this.fallbackTransition=function v_e(i,t,e){return new $$(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 W$(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 y_e=new fE;class b_e{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=OO(this._driver,e,n,r);if(n.length)throw function bge(i){return new pe(3503,!1)}();this._animations.set(t,s)}_buildPlayer(t,e,n){const r=t.element,s=M$(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=NO(this._driver,e,s,TO,iE,new Map,new Map,n,y_e,r),o.forEach(d=>{const h=ra(a,d.element,new Map);d.postStyleProps.forEach(p=>h.set(p,null))})):(r.push(function xge(){return new pe(3300,!1)}()),o=[]),r.length)throw function wge(i){return new pe(3504,!1)}();a.forEach((d,h)=>{d.forEach((p,m)=>{d.set(m,this._driver.computeStyle(h,m,qc))})});const c=Lu(o.map(d=>{const h=a.get(d.element);return this._buildPlayer(d,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 Mge(i){return new pe(3301,!1)}();return e}listen(t,e,n,r){const s=SO(e,"","","");return MO(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 j$="ng-animate-queued",zO="ng-animate-disabled",S_e=[],Y$={namespaceId:"",setForRemoval:!1,setForMove:!1,hasAnimation:!1,removedBeforeQueried:!1},E_e={namespaceId:"",setForMove:!1,setForRemoval:!1,hasAnimation:!1,removedBeforeQueried:!0},Ua="__ng_removed";class HO{get params(){return this.options.params}constructor(t,e=""){this.namespaceId=e;const n=t&&t.hasOwnProperty("value");if(this.value=function I_e(i){return i??null}(n?t.value:t),n){const s=t0(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 s0="void",GO=new HO(s0);class A_e{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,Va(e,this._hostClassName)}listen(t,e,n,r){if(!this._triggers.has(e))throw function Cge(i,t){return new pe(3302,!1)}();if(null==n||0==n.length)throw function Sge(i){return new pe(3303,!1)}();if(!function R_e(i){return"start"==i||"done"==i}(n))throw function Ege(i,t){return new pe(3400,!1)}();const s=ra(this._elementListeners,t,[]),o={name:e,phase:n,callback:r};s.push(o);const a=ra(this._engine.statesByElement,t,new Map);return a.has(e)||(Va(t,rE),Va(t,rE+"-"+e),a.set(e,GO)),()=>{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 Age(i){return new pe(3401,!1)}();return e}trigger(t,e,n,r=!0){const s=this._getTrigger(e),o=new $O(this.id,e,t);let a=this._engine.statesByElement.get(t);a||(Va(t,rE),Va(t,rE+"-"+e),this._engine.statesByElement.set(t,a=new Map));let l=a.get(e);const c=new HO(n,this.id);if(!(n&&n.hasOwnProperty("value"))&&l&&c.absorbOptions(l.options),a.set(e,c),l||(l=GO),c.value!==s0&&l.value===c.value){if(!function O_e(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),uc(t,y)})}return}const p=ra(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||(Va(t,j$),o.onStart(()=>{Yg(t,j$)})),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,sE,!0);n.forEach(r=>{if(r[Ua])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 d=this.trigger(t,c,s0,r);d&&a.push(d)}}),a.length)return this._engine.markElementAsRemoved(this.id,t,!0,e,o),n&&Lu(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)||GO,d=new HO(s0),h=new $O(this.id,o,t);this._engine.totalQueuedPlayers++,this._queue.push({element:t,triggerName:o,transition:l,fromState:c,toState:d,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[Ua];(!s||s===Y$)&&(n.afterFlush(()=>this.clearElementCache(t)),n.destroyInnerAnimations(t),n._onRemovalComplete(t,e))}}insertNode(t,e){Va(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=SO(s,n.triggerName,n.fromState.value,n.toState.value);l._data=t,MO(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 D_e{_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 A_e(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(gE(e)){const s=this._fetchNamespace(t);if(s)return s.trigger(e,n,r),!0}return!1}insertNode(t,e,n,r){if(!gE(e))return;const s=e[Ua];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),Va(t,zO)):this.disabledNodes.has(t)&&(this.disabledNodes.delete(t),Yg(t,zO))}removeNode(t,e,n,r){if(gE(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[Ua]={namespaceId:t,setForRemoval:r,hasAnimation:n,removedBeforeQueried:!1,previousTriggersValues:s}}listen(t,e,n,r,s){return gE(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,sE,!0);e.forEach(n=>this.destroyActiveAnimationsForElement(n)),0!=this.playersByQueriedElement.size&&(e=this.driver.query(t,IO,!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 Lu(this.players).onDone(()=>t());t()})}processLeaveNode(t){const e=t[Ua];if(e&&e.setForRemoval){if(t[Ua]=Y$,e.namespaceId){this.destroyInnerAnimations(t);const n=this._fetchNamespace(e.namespaceId);n&&n.clearElementCache(t)}this._onRemovalComplete(t,e.setForRemoval)}t.classList?.contains(zO)&&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?Lu(e).onDone(()=>{n.forEach(r=>r())}):n.forEach(r=>r())}}reportError(t){throw function Dge(i){return new pe(3402,!1)}()}_flushAnimations(t,e){const n=new fE,r=[],s=new Map,o=[],a=new Map,l=new Map,c=new Map,d=new Set;this.disabledNodes.forEach(q=>{d.add(q);const re=this.driver.query(q,".ng-animate-queued",!0);for(let J=0;J{const J=TO+b++;g.set(re,J),q.forEach(we=>Va(we,J))});const v=[],y=new Set,M=new Set;for(let q=0;qy.add(we)):M.add(re))}const x=new Map,C=K$(p,Array.from(y));C.forEach((q,re)=>{const J=iE+b++;x.set(re,J),q.forEach(we=>Va(we,J))}),t.push(()=>{m.forEach((q,re)=>{const J=g.get(re);q.forEach(we=>Yg(we,J))}),C.forEach((q,re)=>{const J=x.get(re);q.forEach(we=>Yg(we,J))}),v.forEach(q=>{this.processLeaveNode(q)})});const F=[],D=[];for(let q=this._namespaceList.length-1;q>=0;q--)this._namespaceList[q].drainQueuedTransitions(e).forEach(J=>{const we=J.player,Ne=J.element;if(F.push(we),this.collectedEnterElements.length){const Fe=Ne[Ua];if(Fe&&Fe.setForMove){if(Fe.previousTriggersValues&&Fe.previousTriggersValues.has(J.triggerName)){const bt=Fe.previousTriggersValues.get(J.triggerName),Ct=this.statesByElement.get(J.element);if(Ct&&Ct.has(J.triggerName)){const Mt=Ct.get(J.triggerName);Mt.value=bt,Ct.set(J.triggerName,Mt)}}return void we.destroy()}}const Ye=!h||!this.driver.containsElement(h,Ne),Tt=x.get(Ne),en=g.get(Ne),ae=this._buildInstruction(J,n,en,Tt,Ye);if(ae.errors&&ae.errors.length)return void D.push(ae);if(Ye)return we.onStart(()=>If(Ne,ae.fromStyles)),we.onDestroy(()=>uc(Ne,ae.toStyles)),void r.push(we);if(J.isFallbackTransition)return we.onStart(()=>If(Ne,ae.fromStyles)),we.onDestroy(()=>uc(Ne,ae.toStyles)),void r.push(we);const Oe=[];ae.timelines.forEach(Fe=>{Fe.stretchStartingKeyframe=!0,this.disabledNodes.has(Fe.element)||Oe.push(Fe)}),ae.timelines=Oe,n.append(Ne,ae.timelines),o.push({instruction:ae,player:we,element:Ne}),ae.queriedElements.forEach(Fe=>ra(a,Fe,[]).push(we)),ae.preStyleProps.forEach((Fe,bt)=>{if(Fe.size){let Ct=l.get(bt);Ct||l.set(bt,Ct=new Set),Fe.forEach((Mt,Sn)=>Ct.add(Sn))}}),ae.postStyleProps.forEach((Fe,bt)=>{let Ct=c.get(bt);Ct||c.set(bt,Ct=new Set),Fe.forEach((Mt,Sn)=>Ct.add(Sn))})});if(D.length){const q=[];D.forEach(re=>{q.push(function Tge(i,t){return new pe(3505,!1)}())}),F.forEach(re=>re.destroy()),this.reportError(q)}const k=new Map,B=new Map;o.forEach(q=>{const re=q.element;n.has(re)&&(B.set(re,re),this._beforeAnimationBuild(q.player.namespaceId,q.instruction,k))}),r.forEach(q=>{const re=q.element;this._getPreviousPlayers(re,!1,q.namespaceId,q.triggerName,null).forEach(we=>{ra(k,re,[]).push(we),we.destroy()})});const T=v.filter(q=>Q$(q,l,c)),A=new Map;X$(A,this.driver,M,c,qc).forEach(q=>{Q$(q,l,c)&&T.push(q)});const ie=new Map;m.forEach((q,re)=>{X$(ie,this.driver,new Set(q),l,rR)}),T.forEach(q=>{const re=A.get(q),J=ie.get(q);A.set(q,new Map([...Array.from(re?.entries()??[]),...Array.from(J?.entries()??[])]))});const ne=[],se=[],ge={};o.forEach(q=>{const{element:re,player:J,instruction:we}=q;if(n.has(re)){if(d.has(re))return J.onDestroy(()=>uc(re,we.toStyles)),J.disabled=!0,J.overrideTotalTime(we.totalTime),void r.push(J);let Ne=ge;if(B.size>1){let Tt=re;const en=[];for(;Tt=Tt.parentNode;){const ae=B.get(Tt);if(ae){Ne=ae;break}en.push(Tt)}en.forEach(ae=>B.set(ae,Ne))}const Ye=this._buildAnimation(J.namespaceId,we,k,s,ie,A);if(J.setRealPlayer(Ye),Ne===ge)ne.push(J);else{const Tt=this.playersByElement.get(Ne);Tt&&Tt.length&&(J.parentPlayer=Lu(Tt)),r.push(J)}}else If(re,we.fromStyles),J.onDestroy(()=>uc(re,we.toStyles)),se.push(J),d.has(re)&&r.push(J)}),se.forEach(q=>{const re=s.get(q.element);if(re&&re.length){const J=Lu(re);q.setRealPlayer(J)}}),r.forEach(q=>{q.parentPlayer?q.syncPlayerEvents(q.parentPlayer):q.destroy()});for(let q=0;q!Ye.destroyed);Ne.length?k_e(this,re,Ne):this.processLeaveNode(re)}return v.length=0,ne.forEach(q=>{this.players.push(q),q.onDone(()=>{q.destroy();const re=this.players.indexOf(q);this.players.splice(re,1)}),q.play()}),ne}elementContainsData(t,e){let n=!1;const r=e[Ua];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==s0;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,d=c!==s,h=ra(n,c,[]);this._getPreviousPlayers(c,d,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=[],d=new Set,h=new Set,p=e.timelines.map(g=>{const b=g.element;d.add(b);const v=b[Ua];if(v&&v.removedBeforeQueried)return new tb(g.duration,g.delay);const y=b!==l,M=function P_e(i){const t=[];return Z$(i,t),t}((n.get(b)||S_e).map(k=>k.getRealPlayer())).filter(k=>!!k.element&&k.element===b),x=s.get(b),C=o.get(b),F=M$(0,this._normalizer,0,g.keyframes,x,C),D=this._buildPlayer(g,F,M);if(g.subTimeline&&r&&h.add(b),y){const k=new $O(t,a,b);k.setRealPlayer(D),c.push(k)}return D});c.forEach(g=>{ra(this.playersByQueriedElement,g.element,[]).push(g),g.onDone(()=>function T_e(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))}),d.forEach(g=>Va(g,k$));const m=Lu(p);return m.onDestroy(()=>{d.forEach(g=>Yg(g,k$)),uc(l,e.toStyles)}),h.forEach(g=>{ra(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 tb(t.duration,t.delay)}}class $O{constructor(t,e,n){this.namespaceId=t,this.triggerName=e,this.element=n,this._player=new tb,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=>MO(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){ra(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 gE(i){return i&&1===i.nodeType}function q$(i,t){const e=i.style.display;return i.style.display=t??"none",e}function X$(i,t,e,n,r){const s=[];e.forEach(l=>s.push(q$(l)));const o=[];n.forEach((l,c)=>{const d=new Map;l.forEach(h=>{const p=t.computeStyle(c,h,r);d.set(h,p),(!p||0==p.length)&&(c[Ua]=E_e,o.push(c))}),i.set(c,d)});let a=0;return e.forEach(l=>q$(l,s[a++])),o}function K$(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 Va(i,t){i.classList?.add(t)}function Yg(i,t){i.classList?.remove(t)}function k_e(i,t,e){Lu(e).onDone(()=>i.processLeaveNode(t))}function Z$(i,t){for(let e=0;er.add(s)):t.set(i,n),e.delete(i),!0}class _E{constructor(t,e,n){this.bodyNode=t,this._driver=e,this._normalizer=n,this._triggerCache={},this.onRemovalComplete=(r,s)=>{},this._transitionEngine=new D_e(t,e,n),this._timelineEngine=new b_e(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=[],d=OO(this._driver,s,l,c);if(l.length)throw function vge(i,t){return new pe(3404,!1)}();a=function g_e(i,t,e){return new __e(i,t,e)}(r,d,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]=C$(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]=C$(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 L_e=(()=>{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&&uc(this._element,this._startStyles,this._initialStyles),this._state=1)}finish(){this.start(),this._state<2&&(uc(this._element,this._initialStyles),this._endStyles&&(uc(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),uc(this._element,this._initialStyles),this._state=3)}}return i.initialStylesByElement=new WeakMap,i})();function WO(i){let t=null;return i.forEach((e,n)=>{(function N_e(i){return"display"===i||"position"===i})(n)&&(t=t||new Map,t.set(n,e))}),t}class J${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:B$(this.element,r))}),this.currentSnapshot=t}triggerCallback(t){const e="start"===t?this._onStartFns:this._onDoneFns;e.forEach(n=>n()),e.length=0}}class B_e{validateStyleProperty(t){return!0}validateAnimatableStyleProperty(t){return!0}matchesElement(t,e){return!1}containsElement(t,e){return D$(t,e)}getParentElement(t){return AO(t)}query(t,e,n){return T$(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,d=o.filter(m=>m instanceof J$);(function Hge(i,t){return 0===i||0===t})(n,r)&&d.forEach(m=>{m.currentSnapshot.forEach((g,b)=>c.set(b,g))});let h=function Bge(i){return i.length?i[0]instanceof Map?i:i.map(t=>P$(t)):[]}(e).map(m=>Nu(m));h=function Gge(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,B$(i,a)))}}return t}(t,h,c);const p=function F_e(i,t){let e=null,n=null;return Array.isArray(t)&&t.length?(e=WO(t[0]),t.length>1&&(n=WO(t[t.length-1]))):t instanceof Map&&(e=WO(t)),e||n?new L_e(i,e,n):null}(t,h);return new J$(t,h,l,p)}}let U_e=(()=>{class i extends tV{constructor(e,n){super(),this._nextAnimationId=0,this._renderer=e.createRenderer(n.body,{id:"0",encapsulation:qs.None,styles:[],data:{animation:[]}})}build(e){const n=this._nextAnimationId.toString();this._nextAnimationId++;const r=Array.isArray(e)?iV(e):e;return e8(this._renderer,null,n,"register",[r]),new V_e(n,this._renderer)}}return i.\u0275fac=function(e){return new(e||i)(ee(Gl),ee(jt))},i.\u0275prov=ke({token:i,factory:i.\u0275fac}),i})();class V_e extends FQ{constructor(t,e){super(),this._id=t,this._renderer=e}create(t,e){return new z_e(this._id,t,e||{},this._renderer)}}class z_e{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 e8(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 e8(i,t,e,n,r){return i.setProperty(t,`@@${e}:${n}`,r)}const t8="@.disabled";let H_e=(()=>{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 d=this._rendererCache.get(s);return d||(d=new n8("",s,this.engine,()=>this._rendererCache.delete(s)),this._rendererCache.set(s,d)),d}const o=n.id,a=n.id+"-"+this._currentId;this._currentId++,this.engine.register(a,e);const l=d=>{Array.isArray(d)?d.forEach(l):this.engine.registerTrigger(o,a,e,d.name,d)};return n.data.animation.forEach(l),new G_e(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)(ee(Gl),ee(_E),ee(ft))},i.\u0275prov=ke({token:i,factory:i.\u0275fac}),i})();class n8{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==t8?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 G_e extends n8{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==t8?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 $_e(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 W_e(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 i8=[{provide:tV,useClass:U_e},{provide:UO,useFactory:function Y_e(){return new h_e}},{provide:_E,useClass:(()=>{class i extends _E{constructor(e,n,r,s){super(e.body,n,r)}ngOnDestroy(){this.flush()}}return i.\u0275fac=function(e){return new(e||i)(ee(jt),ee(DO),ee(UO),ee(dm))},i.\u0275prov=ke({token:i,factory:i.\u0275fac}),i})()},{provide:Gl,useFactory:function q_e(i,t,e){return new H_e(i,t,e)},deps:[oM,_E,ft]}],jO=[{provide:DO,useFactory:()=>new B_e},{provide:Rr,useValue:"BrowserAnimations"},...i8],r8=[{provide:DO,useClass:I$},{provide:Rr,useValue:"NoopAnimations"},...i8];let X_e=(()=>{class i{static withConfig(e){return{ngModule:i,providers:e.disableAnimations?r8:jO}}}return i.\u0275fac=function(e){return new(e||i)},i.\u0275mod=nn({type:i}),i.\u0275inj=Kt({providers:jO,imports:[FB]}),i})();const s8=new me("CdkAccordion");let K_e=0,Z_e=(()=>{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=Zt.EMPTY,this.closed=new We,this.opened=new We,this.destroyed=new We,this.expandedChange=new We,this.id="cdk-accordion-child-"+K_e++,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)(E(s8,12),E(Zn),E(GR))},i.\u0275dir=ve({type:i,selectors:[["cdk-accordion-item"],["","cdkAccordionItem",""]],inputs:{expanded:"expanded",disabled:"disabled"},outputs:{closed:"closed",opened:"opened",destroyed:"destroyed",expandedChange:"expandedChange"},exportAs:["cdkAccordionItem"],features:[Dn([{provide:s8,useValue:void 0}])]}),i})(),Q_e=(()=>{class i{}return i.\u0275fac=function(e){return new(e||i)},i.\u0275mod=nn({type:i}),i.\u0275inj=Kt({}),i})();const J_e=["body"];function eve(i,t){}const tve=[[["mat-expansion-panel-header"]],"*",[["mat-action-row"]]],nve=["mat-expansion-panel-header","*","mat-action-row"];function ive(i,t){1&i&&Te(0,"span",2),2&i&&U("@indicatorRotate",he()._getExpandedState())}const rve=[[["mat-panel-title"]],[["mat-panel-description"]],"*"],sve=["mat-panel-title","mat-panel-description","*"],o8=new me("MAT_ACCORDION"),a8="225ms cubic-bezier(0.4,0.0,0.2,1)",l8={indicatorRotate:Ra("indicatorRotate",[Ps("collapsed, void",si({transform:"rotate(0deg)"})),Ps("expanded",si({transform:"rotate(180deg)"})),Pr("expanded <=> collapsed, void => collapsed",jr(a8))]),bodyExpansion:Ra("bodyExpansion",[Ps("collapsed, void",si({height:"0px",visibility:"hidden"})),Ps("expanded",si({height:"*",visibility:"visible"})),Pr("expanded <=> collapsed, void => collapsed",jr(a8))])},c8=new me("MAT_EXPANSION_PANEL");let ove=(()=>{class i{constructor(e,n){this._template=e,this._expansionPanel=n}}return i.\u0275fac=function(e){return new(e||i)(E(Mo),E(c8,8))},i.\u0275dir=ve({type:i,selectors:[["ng-template","matExpansionPanelContent",""]]}),i})(),ave=0;const d8=new me("MAT_EXPANSION_PANEL_DEFAULT_OPTIONS");let u8=(()=>{class i extends Z_e{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 We,this.afterCollapse=new We,this._inputChanges=new Re,this._headerId="mat-expansion-panel-header-"+ave++,this._bodyAnimationDone=new Re,this.accordion=e,this._document=o,this._bodyAnimationDone.pipe(Zl((c,d)=>c.fromState===d.fromState&&c.toState===d.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(Ao(null),gn(()=>this.expanded&&!this._portal),Oi(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)(E(o8,12),E(Zn),E(GR),E(Wr),E(jt),E(Rr,8),E(d8,8))},i.\u0275cmp=ot({type:i,selectors:[["mat-expansion-panel"]],contentQueries:function(e,n,r){if(1&e&&Wi(r,ove,5),2&e){let s;St(s=Et())&&(n._lazyContent=s.first)}},viewQuery:function(e,n){if(1&e&&Wn(J_e,5),2&e){let r;St(r=Et())&&(n._body=r.first)}},hostAttrs:[1,"mat-expansion-panel"],hostVars:6,hostBindings:function(e,n){2&e&&un("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:[Dn([{provide:o8,useValue:void 0},{provide:c8,useExisting:i}]),lt,bi],ngContentSelectors:nve,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&&(sr(tve),Wt(0),W(1,"div",0,1),Ue("@bodyExpansion.done",function(s){return n._bodyAnimationDone.next(s)}),W(3,"div",2),Wt(4,1),fe(5,eve,0,0,"ng-template",3),Y(),Wt(6,2),Y()),2&e&&(G(1),U("@bodyExpansion",n._getExpandedState())("id",n.id),At("aria-labelledby",n._headerId),G(4),U("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:[l8.bodyExpansion]},changeDetection:0}),i})();class lve{}const cve=JI(lve);let dve=(()=>{class i extends cve{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=Zt.EMPTY;const c=e.accordion?e.accordion._stateChanges.pipe(gn(d=>!(!d.hideToggle&&!d.togglePosition))):po;this.tabIndex=parseInt(l||"")||0,this._parentChangeSubscription=Mr(e.opened,e.closed,c,e._inputChanges.pipe(gn(d=>!!(d.hideToggle||d.disabled||d.togglePosition)))).subscribe(()=>this._changeDetectorRef.markForCheck()),e.closed.pipe(gn(()=>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:Xo(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)(E(u8,1),E(mt),E(Yc),E(Zn),E(d8,8),E(Rr,8),ya("tabindex"))},i.\u0275cmp=ot({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&&Ue("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),jo("height",n._getHeaderHeight()),un("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:[lt],ngContentSelectors:sve,decls:5,vars:3,consts:[[1,"mat-content"],["class","mat-expansion-indicator",4,"ngIf"],[1,"mat-expansion-indicator"]],template:function(e,n){1&e&&(sr(rve),W(0,"span",0),Wt(1),Wt(2,1),Wt(3,2),Y(),fe(4,ive,1,1,"span",1)),2&e&&(un("mat-content-hide-toggle",!n._showToggle()),G(4),U("ngIf",n._showToggle()))},dependencies:[vi],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:[l8.indicatorRotate]},changeDetection:0}),i})(),uve=(()=>{class i{}return i.\u0275fac=function(e){return new(e||i)},i.\u0275dir=ve({type:i,selectors:[["mat-panel-description"]],hostAttrs:[1,"mat-expansion-panel-header-description"]}),i})(),hve=(()=>{class i{}return i.\u0275fac=function(e){return new(e||i)},i.\u0275dir=ve({type:i,selectors:[["mat-panel-title"]],hostAttrs:[1,"mat-expansion-panel-header-title"]}),i})(),fve=(()=>{class i{}return i.\u0275fac=function(e){return new(e||i)},i.\u0275mod=nn({type:i}),i.\u0275inj=Kt({imports:[Eo,Qn,Q_e,Lh]}),i})();function pve(i,t){if(1&i&&(W(0,"mat-option",19),ze(1),Y()),2&i){const e=t.$implicit;U("value",e),G(1),Zi(" ",e," ")}}function mve(i,t){if(1&i){const e=mi();W(0,"mat-form-field",16)(1,"mat-select",17),Ue("selectionChange",function(r){return cn(e),Gt(he(2)._changePageSize(r.value))}),fe(2,pve,2,2,"mat-option",18),Y()()}if(2&i){const e=he(2);U("appearance",e._formFieldAppearance)("color",e.color),G(1),U("value",e.pageSize)("disabled",e.disabled)("aria-labelledby",e._pageSizeLabelId)("panelClass",e.selectConfig.panelClass||"")("disableOptionCentering",e.selectConfig.disableOptionCentering),G(1),U("ngForOf",e._displayedPageSizeOptions)}}function gve(i,t){if(1&i&&(W(0,"div",20),ze(1),Y()),2&i){const e=he(2);G(1),_i(e.pageSize)}}function _ve(i,t){if(1&i&&(W(0,"div",12)(1,"div",13),ze(2),Y(),fe(3,mve,3,8,"mat-form-field",14),fe(4,gve,2,1,"div",15),Y()),2&i){const e=he();G(1),B1("id",e._pageSizeLabelId),G(1),Zi(" ",e._intl.itemsPerPageLabel," "),G(1),U("ngIf",e._displayedPageSizeOptions.length>1),G(1),U("ngIf",e._displayedPageSizeOptions.length<=1)}}function vve(i,t){if(1&i){const e=mi();W(0,"button",21),Ue("click",function(){return cn(e),Gt(he().firstPage())}),ki(),W(1,"svg",7),Te(2,"path",22),Y()()}if(2&i){const e=he();U("matTooltip",e._intl.firstPageLabel)("matTooltipDisabled",e._previousButtonsDisabled())("matTooltipPosition","above")("disabled",e._previousButtonsDisabled()),At("aria-label",e._intl.firstPageLabel)}}function yve(i,t){if(1&i){const e=mi();ki(),ga(),W(0,"button",23),Ue("click",function(){return cn(e),Gt(he().lastPage())}),ki(),W(1,"svg",7),Te(2,"path",24),Y()()}if(2&i){const e=he();U("matTooltip",e._intl.lastPageLabel)("matTooltipDisabled",e._nextButtonsDisabled())("matTooltipPosition","above")("disabled",e._nextButtonsDisabled()),At("aria-label",e._intl.lastPageLabel)}}let yE=(()=>{class i{constructor(){this.changes=new Re,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=ke({token:i,factory:i.\u0275fac,providedIn:"root"}),i})();const xve={provide:yE,deps:[[new Ss,new xa,yE]],useFactory:function bve(i){return i||new yE}},Mve=new me("MAT_PAGINATOR_DEFAULT_OPTIONS"),Cve=WM(MQ(class{}));let Sve=(()=>{class i extends Cve{get pageIndex(){return this._pageIndex}set pageIndex(e){this._pageIndex=Math.max(ks(e),0),this._changeDetectorRef.markForCheck()}get length(){return this._length}set length(e){this._length=ks(e),this._changeDetectorRef.markForCheck()}get pageSize(){return this._pageSize}set pageSize(e){this._pageSize=Math.max(ks(e),0),this._updateDisplayedPageSizeOptions()}get pageSizeOptions(){return this._pageSizeOptions}set pageSizeOptions(e){this._pageSizeOptions=(e||[]).map(n=>ks(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 We,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){xo()},i.\u0275dir=ve({type:i,inputs:{color:"color",pageIndex:"pageIndex",length:"length",pageSize:"pageSize",pageSizeOptions:"pageSizeOptions",hidePageSize:"hidePageSize",showFirstLastButtons:"showFirstLastButtons",selectConfig:"selectConfig"},outputs:{page:"page"},features:[lt]}),i})(),Eve=0,Ave=(()=>{class i extends Sve{constructor(e,n,r){super(e,n,r),this._pageSizeLabelId="mat-paginator-page-size-label-"+Eve++,this._formFieldAppearance=r?.formFieldAppearance||"outline"}}return i.\u0275fac=function(e){return new(e||i)(E(yE),E(Zn),E(Mve,8))},i.\u0275cmp=ot({type:i,selectors:[["mat-paginator"]],hostAttrs:["role","group",1,"mat-mdc-paginator"],inputs:{disabled:"disabled"},exportAs:["matPaginator"],features:[lt],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&&(W(0,"div",0)(1,"div",1),fe(2,_ve,5,4,"div",2),W(3,"div",3)(4,"div",4),ze(5),Y(),fe(6,vve,3,5,"button",5),W(7,"button",6),Ue("click",function(){return n.previousPage()}),ki(),W(8,"svg",7),Te(9,"path",8),Y()(),ga(),W(10,"button",9),Ue("click",function(){return n.nextPage()}),ki(),W(11,"svg",7),Te(12,"path",10),Y()(),fe(13,yve,3,5,"button",11),Y()()()),2&e&&(G(2),U("ngIf",!n.hidePageSize),G(3),Zi(" ",n._intl.getRangeLabel(n.pageIndex,n.pageSize,n.length)," "),G(1),U("ngIf",n.showFirstLastButtons),G(1),U("matTooltip",n._intl.previousPageLabel)("matTooltipDisabled",n._previousButtonsDisabled())("matTooltipPosition","above")("disabled",n._previousButtonsDisabled()),At("aria-label",n._intl.previousPageLabel),G(3),U("matTooltip",n._intl.nextPageLabel)("matTooltipDisabled",n._nextButtonsDisabled())("matTooltipPosition","above")("disabled",n._nextButtonsDisabled()),At("aria-label",n._intl.nextPageLabel),G(3),U("ngIf",n.showFirstLastButtons))},dependencies:[So,vi,XM,vl,hb,Nm,Os],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})(),Dve=(()=>{class i{}return i.\u0275fac=function(e){return new(e||i)},i.\u0275mod=nn({type:i}),i.\u0275inj=Kt({providers:[xve],imports:[Eo,KM,VH,FV]}),i})(),Tve=(()=>{class i{}return i.\u0275fac=function(e){return new(e||i)},i.\u0275mod=nn({type:i,bootstrap:[Kme]}),i.\u0275inj=Kt({providers:[Ql,NH,{provide:PH,useValue:Uie}],imports:[FB,xK,X_e,eH,CJ,gC,pH,fve,DV,RV,FV,KM,ez,Dve,rse,_H,VH,_V,ype,bme,tH,tR,jie]}),i})();eh(Jl,[So,vi,Os,e0,nE],[pl]),eh(zR,[hm,So,vi,xy,tc,Xc,vl,u8,dve,hve,uve,Os,Ave,hb,Nm,e0],[]),eh(xC,[So,vi,MC,wC,gH,e0],[]),eh(g$,[So,vi,To,Os,hb,Nm,e0,nE],[pl]),F7().bootstrapModule(Tve).catch(i=>console.error(i))},489:function(Lo,Hs,ps){var ln;Lo=ps.nmd(Lo),function(){var V,Kr=200,Un="Expected a function",Ha="__lodash_hash_undefined__",Mi="__lodash_placeholder__",Ci=1,ms=2,$s=4,Ws=1,No=2,On=1,dr=2,fc=4,la=8,Dl=16,ca=32,Tl=64,Ga=128,da=256,pd=512,ME=800,Kg=16,In=1/0,Wa=9007199254740991,SE=17976931348623157e292,Pf=NaN,ua=4294967295,Re=ua-1,a0=ua>>>1,l0=[["ary",Ga],["bind",On],["bindKey",dr],["curry",la],["curryRight",Dl],["flip",pd],["partial",ca],["partialRight",Tl],["rearg",da]],ti="[object Arguments]",Yn="[object Array]",EE="[object AsyncFunction]",et="[object Boolean]",pc="[object Date]",AE="[object DOMException]",md="[object Error]",Of="[object Function]",c0="[object GeneratorFunction]",Bo="[object Map]",Uu="[object Number]",DE="[object Null]",ja="[object Object]",d0="[object Promise]",TE="[object Proxy]",gd="[object RegExp]",Uo="[object Set]",mc="[object String]",Ff="[object Symbol]",Zg="[object Undefined]",_d="[object WeakMap]",Vu="[object ArrayBuffer]",vd="[object DataView]",ha="[object Float32Array]",Lf="[object Float64Array]",Qg="[object Int8Array]",Nf="[object Int16Array]",Jg="[object Int32Array]",e_="[object Uint8Array]",zu="[object Uint8ClampedArray]",t_="[object Uint16Array]",n_="[object Uint32Array]",RE=/\b__p \+= '';/g,kE=/\b(__p \+=) '' \+/g,PE=/(__e\(.*?\)|\b__t\)) \+\n'';/g,u0=/&(?:amp|lt|gt|quot|#39);/g,h0=/[&<>"']/g,OE=RegExp(u0.source),FE=RegExp(h0.source),ZO=/<%-([\s\S]+?)%>/g,i_=/<%([\s\S]+?)%>/g,r_=/<%=([\s\S]+?)%>/g,f0=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,p0=/^\w*$/,m0=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,s_=/[\\^$.*+?()[\]{}|]/g,g0=RegExp(s_.source),Bf=/^\s+/,_0=/\s/,v0=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,wr=/\{\n\/\* \[wrapped with (.+)\] \*/,LE=/,? & /,NE=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,BE=/[()=,{}\[\]\/\s]/,UE=/\\(\\)?/g,y0=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,b0=/\w*$/,VE=/^[-+]0x[0-9a-f]+$/i,Ya=/^0b[01]+$/i,zE=/^\[object .+?Constructor\]$/,nr=/^0o[0-7]+$/i,yd=/^(?:0|[1-9]\d*)$/,po=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,o_=/($^)/,HE=/['\n\r\u2028\u2029\\]/g,Hu="\\ud800-\\udfff",w0="\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff",l_="\\u2700-\\u27bf",c_="a-z\\xdf-\\xf6\\xf8-\\xff",d_="A-Z\\xc0-\\xd6\\xd8-\\xde",M0="\\ufe0e\\ufe0f",C0="\\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",Mr="["+Hu+"]",Uf="["+C0+"]",bd="["+w0+"]",li="\\d+",u_="["+l_+"]",fi="["+c_+"]",Vf="[^"+Hu+C0+li+l_+c_+d_+"]",h_="\\ud83c[\\udffb-\\udfff]",kt="[^"+Hu+"]",$u="(?:\\ud83c[\\udde6-\\uddff]){2}",Wu="[\\ud800-\\udbff][\\udc00-\\udfff]",ju="["+d_+"]",pe="(?:"+fi+"|"+Vf+")",zf="(?:"+ju+"|"+Vf+")",Qt="(?:['\u2019](?:d|ll|m|re|s|t|ve))?",qn="(?:['\u2019](?:D|LL|M|RE|S|T|VE))?",S0="(?:"+bd+"|"+h_+")?",YE="["+M0+"]?",XE=YE+S0+"(?:\\u200d(?:"+[kt,$u,Wu].join("|")+")"+YE+S0+")*",KE="(?:"+[u_,$u,Wu].join("|")+")"+XE,QO="(?:"+[kt+bd+"?",bd,$u,Wu,Mr].join("|")+")",Il=RegExp("['\u2019]","g"),JO=RegExp(bd,"g"),E0=RegExp(h_+"(?="+h_+")|"+QO+XE,"g"),eF=RegExp([ju+"?"+fi+"+"+Qt+"(?="+[Uf,ju,"$"].join("|")+")",zf+"+"+qn+"(?="+[Uf,ju+pe,"$"].join("|")+")",ju+"?"+pe+"+"+Qt,ju+"+"+qn,"\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])","\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",li,KE].join("|"),"g"),tF=RegExp("[\\u200d"+Hu+w0+M0+"]"),ZE=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,nF=["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"],QE=-1,Si={};Si[ha]=Si[Lf]=Si[Qg]=Si[Nf]=Si[Jg]=Si[e_]=Si[zu]=Si[t_]=Si[n_]=!0,Si[ti]=Si[Yn]=Si[Vu]=Si[et]=Si[vd]=Si[pc]=Si[md]=Si[Of]=Si[Bo]=Si[Uu]=Si[ja]=Si[gd]=Si[Uo]=Si[mc]=Si[_d]=!1;var En={};En[ti]=En[Yn]=En[Vu]=En[vd]=En[et]=En[pc]=En[ha]=En[Lf]=En[Qg]=En[Nf]=En[Jg]=En[Bo]=En[Uu]=En[ja]=En[gd]=En[Uo]=En[mc]=En[Ff]=En[e_]=En[zu]=En[t_]=En[n_]=!0,En[md]=En[Of]=En[_d]=!1;var sF={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},ke=parseFloat,oF=parseInt,Kt="object"==typeof global&&global&&global.Object===Object&&global,Gf="object"==typeof self&&self&&self.Object===Object&&self,Cr=Kt||Gf||Function("return this")(),f_=Hs&&!Hs.nodeType&&Hs,qu=f_&&Lo&&!Lo.nodeType&&Lo,p_=qu&&qu.exports===f_,xd=p_&&Kt.process,gs=function(){try{return qu&&qu.require&&qu.require("util").types||xd&&xd.binding&&xd.binding("util")}catch{}}(),m_=gs&&gs.isArrayBuffer,A0=gs&&gs.isDate,Pt=gs&&gs.isMap,$f=gs&&gs.isRegExp,D0=gs&&gs.isSet,Ys=gs&&gs.isTypedArray;function _s(X,ue,oe){switch(oe.length){case 0:return X.call(ue);case 1:return X.call(ue,oe[0]);case 2:return X.call(ue,oe[0],oe[1]);case 3:return X.call(ue,oe[0],oe[1],oe[2])}return X.apply(ue,oe)}function aF(X,ue,oe,Be){for(var $t=-1,Vn=null==X?0:X.length;++$t-1}function Xu(X,ue,oe){for(var Be=-1,$t=null==X?0:X.length;++Be<$t;)if(oe(ue,X[Be]))return!0;return!1}function pi(X,ue){for(var oe=-1,Be=null==X?0:X.length,$t=Array(Be);++oe-1;);return oe}function fa(X,ue){for(var oe=X.length;oe--&&Ot(ue,X[oe],0)>-1;);return oe}var nA=v_({\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"}),ot=v_({"&":"&","<":"<",">":">",'"':""","'":"'"});function eh(X){return"\\"+sF[X]}function Cd(X){return tF.test(X)}function qf(X){var ue=-1,oe=Array(X.size);return X.forEach(function(Be,$t){oe[++ue]=[$t,Be]}),oe}function ve(X,ue){return function(oe){return X(ue(oe))}}function Gi(X,ue){for(var oe=-1,Be=X.length,$t=0,Vn=[];++oe",""":'"',"'":"'"}),ys=function X(ue){var u,oe=(ue=null==ue?Cr:ys.defaults(Cr.Object(),ue,ys.pick(Cr,nF))).Array,Be=ue.Date,$t=ue.Error,Vn=ue.Function,yt=ue.Math,oi=ue.Object,vc=ue.RegExp,I0=ue.String,Sr=ue.TypeError,ir=oe.prototype,Vo=oi.prototype,Xs=ue["__core-js_shared__"],Pl=Vn.prototype.toString,ii=Vo.hasOwnProperty,yi=0,sA=(u=/[^.]+$/.exec(Xs&&Xs.keys&&Xs.keys.IE_PROTO||""))?"Symbol(src)_1."+u:"",Ed=Vo.toString,R0=Pl.call(oi),Kf=Cr._,Zf=vc("^"+Pl.call(ii).replace(s_,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),Za=p_?ue.Buffer:V,Ui=ue.Symbol,x_=ue.Uint8Array,bs=Za?Za.allocUnsafe:V,xs=ve(oi.getPrototypeOf,oi),Qf=oi.create,Ad=Vo.propertyIsEnumerable,yc=ir.splice,_o=Ui?Ui.isConcatSpreadable:V,nh=Ui?Ui.iterator:V,Dd=Ui?Ui.toStringTag:V,Jf=function(){try{var u=Ic(oi,"defineProperty");return u({},"",{}),u}catch{}}(),oA=ue.clearTimeout!==Cr.clearTimeout&&ue.clearTimeout,cF=Be&&Be.now!==Cr.Date.now&&Be.now,dF=ue.setTimeout!==Cr.setTimeout&&ue.setTimeout,w_=yt.ceil,M_=yt.floor,k0=oi.getOwnPropertySymbols,uF=Za?Za.isBuffer:V,aA=ue.isFinite,hF=ir.join,fF=ve(oi.keys,oi),hr=yt.max,Zr=yt.min,pF=Be.now,P0=ue.parseInt,C_=yt.random,mF=ir.reverse,O0=Ic(ue,"DataView"),ep=Ic(ue,"Map"),Qa=Ic(ue,"Promise"),Td=Ic(ue,"Set"),bi=Ic(ue,"WeakMap"),Id=Ic(oi,"create"),tp=bi&&new bi,Rd={},F0=Rc(O0),L0=Rc(ep),lA=Rc(Qa),S_=Rc(Td),cA=Rc(bi),Qr=Ui?Ui.prototype:V,kd=Qr?Qr.valueOf:V,E_=Qr?Qr.toString:V;function I(u){if(Pi(u)&&!rn(u)&&!(u instanceof kn)){if(u instanceof Ei)return u;if(ii.call(u,"__wrapped__"))return ns(u)}return new Ei(u)}var Pd=function(){function u(){}return function(f){if(!wi(f))return{};if(Qf)return Qf(f);u.prototype=f;var _=new u;return u.prototype=V,_}}();function bc(){}function Ei(u,f){this.__wrapped__=u,this.__actions__=[],this.__chain__=!!f,this.__index__=0,this.__values__=V}function kn(u){this.__wrapped__=u,this.__actions__=[],this.__dir__=1,this.__filtered__=!1,this.__iteratees__=[],this.__takeCount__=ua,this.__views__=[]}function xc(u){var f=-1,_=null==u?0:u.length;for(this.clear();++f<_;){var w=u[f];this.set(w[0],w[1])}}function Rt(u){var f=-1,_=null==u?0:u.length;for(this.clear();++f<_;){var w=u[f];this.set(w[0],w[1])}}function pa(u){var f=-1,_=null==u?0:u.length;for(this.clear();++f<_;){var w=u[f];this.set(w[0],w[1])}}function Gt(u){var f=-1,_=null==u?0:u.length;for(this.__data__=new pa;++f<_;)this.add(u[f])}function Jr(u){var f=this.__data__=new Rt(u);this.size=f.size}function I_(u,f){var _=rn(u),w=!_&&Oc(u),S=!_&&!w&&rl(u),P=!_&&!w&&!S&&$o(u),H=_||w||S||P,j=H?qs(u.length,I0):[],Q=j.length;for(var _e in u)(f||ii.call(u,_e))&&(!H||!("length"==_e||S&&("offset"==_e||"parent"==_e)||P&&("buffer"==_e||"byteLength"==_e||"byteOffset"==_e)||il(_e,Q)))&&j.push(_e);return j}function Vr(u){var f=u.length;return f?u[ah(0,f-1)]:V}function Ja(u,f){return Sp(Qs(u),Ll(f,0,u.length))}function z0(u){return Sp(Qs(u))}function Fl(u,f,_){(_!==V&&!Go(u[f],_)||_===V&&!(f in u))&&zo(u,f,_)}function Ks(u,f,_){var w=u[f];(!ii.call(u,f)||!Go(w,_)||_===V&&!(f in u))&&zo(u,f,_)}function ip(u,f){for(var _=u.length;_--;)if(Go(u[_][0],f))return _;return-1}function H0(u,f,_,w){return el(u,function(S,P,H){f(w,S,_(S),H)}),w}function G0(u,f){return u&&ci(f,fr(f),u)}function zo(u,f,_){"__proto__"==f&&Jf?Jf(u,f,{configurable:!0,enumerable:!0,value:_,writable:!0}):u[f]=_}function ih(u,f){for(var _=-1,w=f.length,S=oe(w),P=null==u;++_=f?u:f)),u}function Ms(u,f,_,w,S,P){var H,j=f&Ci,Q=f&ms,_e=f&$s;if(_&&(H=S?_(u,w,S,P):_(u)),H!==V)return H;if(!wi(u))return u;var ye=rn(u);if(ye){if(H=function ux(u){var f=u.length,_=new u.constructor(f);return f&&"string"==typeof u[0]&&ii.call(u,"index")&&(_.index=u.index,_.input=u.input),_}(u),!j)return Qs(u,H)}else{var be=zr(u),Xe=be==Of||be==c0;if(rl(u))return me(u,j);if(be==ja||be==ti||Xe&&!S){if(H=Q||Xe?{}:PA(u),!j)return Q?function uh(u,f){return ci(u,lx(u),f)}(u,function _A(u,f){return u&&ci(f,Ds(f),u)}(H,u)):function H_(u,f){return ci(u,Z_(u),f)}(u,G0(H,u))}else{if(!En[be])return S?u:{};H=function hx(u,f,_){var w=u.constructor;switch(f){case Vu:return ix(u);case et:case pc:return new w(+u);case vd:return function xF(u,f){var _=f?ix(u.buffer):u.buffer;return new u.constructor(_,u.byteOffset,u.byteLength)}(u,_);case ha:case Lf:case Qg:case Nf:case Jg:case e_:case zu:case t_:case n_:return AA(u,_);case Bo:return new w;case Uu:case mc:return new w(u);case gd:return function wF(u){var f=new u.constructor(u.source,b0.exec(u));return f.lastIndex=u.lastIndex,f}(u);case Uo:return new w;case Ff:return function MF(u){return kd?oi(kd.call(u)):{}}(u)}}(u,be,j)}}P||(P=new Jr);var _t=P.get(u);if(_t)return _t;P.set(u,H),tw(u)?u.forEach(function(Vt){H.add(Ms(Vt,f,_,Vt,u,P))}):Tv(u)&&u.forEach(function(Vt,An){H.set(An,Ms(Vt,f,_,An,u,P))});var mn=ye?V:(_e?Q?q_:yp:Q?Ds:fr)(u);return Rn(mn||u,function(Vt,An){mn&&(Vt=u[An=Vt]),Ks(H,An,Ms(Vt,f,_,An,u,P))}),H}function R_(u,f,_){var w=_.length;if(null==u)return!w;for(u=oi(u);w--;){var S=_[w],H=u[S];if(H===V&&!(S in u)||!(0,f[S])(H))return!1}return!0}function rp(u,f,_){if("function"!=typeof u)throw new Sr(Un);return mh(function(){u.apply(V,_)},f)}function Fd(u,f,_,w){var S=-1,P=Rl,H=!0,j=u.length,Q=[],_e=f.length;if(!j)return Q;_&&(f=pi(f,Br(_))),w?(P=Xu,H=!1):f.length>=Kr&&(P=_c,H=!1,f=new Gt(f));e:for(;++S-1},Rt.prototype.set=function fA(u,f){var _=this.__data__,w=ip(_,u);return w<0?(++this.size,_.push([u,f])):_[w][1]=f,this},pa.prototype.clear=function pA(){this.size=0,this.__data__={hash:new xc,map:new(ep||Rt),string:new xc}},pa.prototype.delete=function mA(u){var f=K_(this,u).delete(u);return this.size-=f?1:0,f},pa.prototype.get=function Se(u){return K_(this,u).get(u)},pa.prototype.has=function zn(u){return K_(this,u).has(u)},pa.prototype.set=function cn(u,f){var _=K_(this,u),w=_.size;return _.set(u,f),this.size+=_.size==w?0:1,this},Gt.prototype.add=Gt.prototype.push=function Er(u){return this.__data__.set(u,Ha),this},Gt.prototype.has=function V0(u){return this.__data__.has(u)},Jr.prototype.clear=function ma(){this.__data__=new Rt,this.size=0},Jr.prototype.delete=function D_(u){var f=this.__data__,_=f.delete(u);return this.size=f.size,_},Jr.prototype.get=function T_(u){return this.__data__.get(u)},Jr.prototype.has=function gA(u){return this.__data__.has(u)},Jr.prototype.set=function _F(u,f){var _=this.__data__;if(_ instanceof Rt){var w=_.__data__;if(!ep||w.length0&&_(j)?f>1?Xn(j,f-1,_,w,S):kl(S,j):w||(S[S.length]=j)}return S}var tl=G_(),Ai=G_(!0);function ki(u,f){return u&&tl(u,f,fr)}function P_(u,f){return u&&Ai(u,f,fr)}function ga(u,f){return gc(f,function(_){return zl(u[_])})}function wc(u,f){for(var _=0,w=(f=ba(f,u)).length;null!=u&&_f}function sp(u,f){return null!=u&&ii.call(u,f)}function op(u,f){return null!=u&&f in oi(u)}function ap(u,f,_){for(var w=_?Xu:Rl,S=u[0].length,P=u.length,H=P,j=oe(P),Q=1/0,_e=[];H--;){var ye=u[H];H&&f&&(ye=pi(ye,Br(f))),Q=Zr(ye.length,Q),j[H]=!_&&(f||S>=120&&ye.length>=120)?new Gt(H&&ye):V}ye=u[0];var be=-1,Xe=j[0];e:for(;++be=j?Q:Q*("desc"==_[w]?-1:1)}return u.index-f.index}(P,H,_)})}function Z0(u,f,_){for(var w=-1,S=f.length,P={};++w-1;)j!==u&&yc.call(j,Q,1),yc.call(u,Q,1);return u}function oh(u,f){for(var _=u?f.length:0,w=_-1;_--;){var S=f[_];if(_==w||S!==P){var P=S;il(S)?yc.call(u,S,1):ch(u,S)}}return u}function ah(u,f){return u+M_(C_()*(f-u+1))}function lh(u,f){var _="";if(!u||f<1||f>Wa)return _;do{f%2&&(_+=u),(f=M_(f/2))&&(u+=u)}while(f);return _}function pn(u,f){return Mp(J_(u,f,is),u+"")}function SA(u){return Vr(Nc(u))}function J0(u,f){var _=Nc(u);return Sp(_,Ll(f,0,_.length))}function Vd(u,f,_,w){if(!wi(u))return u;for(var S=-1,P=(f=ba(f,u)).length,H=P-1,j=u;null!=j&&++SS?0:S+f),(_=_>S?S:_)<0&&(_+=S),S=f>_?0:_-f>>>0,f>>>=0;for(var P=oe(S);++w>>1,H=u[P];null!==H&&!As(H)&&(_?H<=f:H=Kr){var _e=f?null:j_(u);if(_e)return Hn(_e);H=!1,S=_c,Q=new Gt}else Q=f?[]:j;e:for(;++w=w?u:ts(u,f,_)}var nx=oA||function(u){return Cr.clearTimeout(u)};function me(u,f){if(f)return u.slice();var _=u.length,w=bs?bs(_):new u.constructor(_);return u.copy(w),w}function ix(u){var f=new u.constructor(u.byteLength);return new x_(f).set(new x_(u)),f}function AA(u,f){var _=f?ix(u.buffer):u.buffer;return new u.constructor(_,u.byteOffset,u.length)}function DA(u,f){if(u!==f){var _=u!==V,w=null===u,S=u==u,P=As(u),H=f!==V,j=null===f,Q=f==f,_e=As(f);if(!j&&!_e&&!P&&u>f||P&&H&&Q&&!j&&!_e||w&&H&&Q||!_&&Q||!S)return 1;if(!w&&!P&&!_e&&u1?_[S-1]:V,H=S>2?_[2]:V;for(P=u.length>3&&"function"==typeof P?(S--,P):V,H&&Dr(_[0],_[1],H)&&(P=S<3?V:P,S=1),f=oi(f);++w-1?S[P?f[H]:H]:V}}function Cs(u){return yo(function(f){var _=f.length,w=_,S=Ei.prototype.thru;for(u&&f.reverse();w--;){var P=f[w];if("function"!=typeof P)throw new Sr(Un);if(S&&!H&&"wrapper"==nl(P))var H=new Ei([],!0)}for(w=H?w:_;++w<_;){var j=nl(P=f[w]),Q="wrapper"==j?X_(P):V;H=Q&&ph(Q[0])&&Q[1]==(Ga|la|ca|da)&&!Q[4].length&&1==Q[9]?H[nl(Q[0])].apply(H,Q[3]):1==P.length&&ph(P)?H[j]():H.thru(P)}return function(){var _e=arguments,ye=_e[0];if(H&&1==_e.length&&rn(ye))return H.plant(ye).value();for(var be=0,Xe=_?f[be].apply(this,_e):ye;++be<_;)Xe=f[be].call(this,Xe);return Xe}})}function Wd(u,f,_,w,S,P,H,j,Q,_e){var ye=f&Ga,be=f&On,Xe=f&dr,_t=f&(la|Dl),Ut=f&pd,mn=Xe?V:mp(u);return function Vt(){for(var An=arguments.length,Ln=oe(An),rs=An;rs--;)Ln[rs]=arguments[rs];if(_t)var ss=wa(Vt),io=function Ju(X,ue){for(var oe=X.length,Be=0;oe--;)X[oe]===ue&&++Be;return Be}(Ln,ss);if(w&&(Ln=Hd(Ln,w,S,_t)),P&&(Ln=TA(Ln,P,H,_t)),An-=io,_t&&An<_e){var Di=Gi(Ln,ss);return sx(u,f,Wd,Vt.placeholder,_,Ln,Di,j,Q,_e-An)}var Ts=be?_:this,wo=Xe?Ts[u]:u;return An=Ln.length,j?Ln=function Es(u,f){for(var _=u.length,w=Zr(f.length,_),S=Qs(u);w--;){var P=f[w];u[w]=il(P,_)?S[P]:V}return u}(Ln,j):Ut&&An>1&&Ln.reverse(),ye&&Qj))return!1;var _e=P.get(u),ye=P.get(f);if(_e&&ye)return _e==f&&ye==u;var be=-1,Xe=!0,_t=_&No?new Gt:V;for(P.set(u,f),P.set(f,u);++be-1&&u%1==0&&u1?"& ":"")+f[w],f=f.join(_>2?", ":" "),u.replace(v0,"{\n/* [wrapped with "+f+"] */\n")}(w,function BA(u,f){return Rn(l0,function(_){var w="_."+_[0];f&_[1]&&!Rl(u,w)&&u.push(w)}),u.sort()}(function cx(u){var f=u.match(wr);return f?f[1].split(LE):[]}(w),_)))}function _x(u){var f=0,_=0;return function(){var w=pF(),S=Kg-(w-_);if(_=w,S>0){if(++f>=ME)return arguments[0]}else f=0;return u.apply(V,arguments)}}function Sp(u,f){var _=-1,w=u.length,S=w-1;for(f=f===V?w:f;++_1?u[f-1]:V;return _="function"==typeof _?(u.pop(),_):V,vh(u,_)});function Vx(u){var f=I(u);return f.__chain__=!0,f}function Ip(u,f){return f(u)}var zx=yo(function(u){var f=u.length,_=f?u[0]:0,w=this.__wrapped__,S=function(P){return ih(P,u)};return!(f>1||this.__actions__.length)&&w instanceof kn&&il(_)?((w=w.slice(_,+_+(f?1:0))).__actions__.push({func:Ip,args:[S],thisArg:V}),new Ei(w,this.__chain__).thru(function(P){return f&&!P.length&&P.push(V),P})):this.thru(S)}),rD=fp(function(u,f,_){ii.call(u,_)?++u[_]:zo(u,_,1)}),Gx=RA(Cx),kp=RA(rv);function bv(u,f){return(rn(u)?Rn:el)(u,Ft(f,3))}function Vl(u,f){return(rn(u)?lF:k_)(u,Ft(f,3))}var oD=fp(function(u,f,_){ii.call(u,_)?u[_].push(f):zo(u,_,[f])}),lD=pn(function(u,f,_){var w=-1,S="function"==typeof f,P=eo(u)?oe(u.length):[];return el(u,function(H){P[++w]=S?_s(f,H,_):_a(H,f,_)}),P}),cD=fp(function(u,f,_){zo(u,_,f)});function Pp(u,f){return(rn(u)?pi:rh)(u,Ft(f,3))}var Ma=fp(function(u,f,_){u[_?0:1].push(f)},function(){return[[],[]]}),_D=pn(function(u,f){if(null==u)return[];var _=f.length;return _>1&&Dr(u,f[0],f[1])?f=[]:_>2&&Dr(f[0],f[1],f[2])&&(f=[f[0]]),B_(u,Xn(f,1),[])}),Op=cF||function(){return Cr.Date.now()};function bh(u,f,_){return f=_?V:f,vo(u,Ga,V,V,V,V,f=u&&null==f?u.length:f)}function Ca(u,f){var _;if("function"!=typeof f)throw new Sr(Un);return u=dn(u),function(){return--u>0&&(_=f.apply(this,arguments)),u<=1&&(f=V),_}}var Pc=pn(function(u,f,_){var w=On;if(_.length){var S=Gi(_,wa(Pc));w|=ca}return vo(u,w,f,_,S)}),xv=pn(function(u,f,_){var w=On|dr;if(_.length){var S=Gi(_,wa(xv));w|=ca}return vo(f,w,u,_,S)});function yD(u,f,_){var w,S,P,H,j,Q,_e=0,ye=!1,be=!1,Xe=!0;if("function"!=typeof u)throw new Sr(Un);function _t(Di){var Ts=w,wo=S;return w=S=V,_e=Di,H=u.apply(wo,Ts)}function Vt(Di){var Ts=Di-Q;return Q===V||Ts>=f||Ts<0||be&&Di-_e>=P}function An(){var Di=Op();if(Vt(Di))return Ln(Di);j=mh(An,function mn(Di){var I1=f-(Di-Q);return be?Zr(I1,P-(Di-_e)):I1}(Di))}function Ln(Di){return j=V,Xe&&w?_t(Di):(w=S=V,H)}function io(){var Di=Op(),Ts=Vt(Di);if(w=arguments,S=this,Q=Di,Ts){if(j===V)return function Ut(Di){return _e=Di,j=mh(An,f),ye?_t(Di):H}(Q);if(be)return nx(j),j=mh(An,f),_t(Q)}return j===V&&(j=mh(An,f)),H}return f=bo(f)||0,wi(_)&&(ye=!!_.leading,P=(be="maxWait"in _)?hr(bo(_.maxWait)||0,f):P,Xe="trailing"in _?!!_.trailing:Xe),io.cancel=function rs(){j!==V&&nx(j),_e=0,w=Q=S=j=V},io.flush=function ss(){return j===V?H:Ln(Op())},io}var kF=pn(function(u,f){return rp(u,1,f)}),PF=pn(function(u,f,_){return rp(u,bo(f)||0,_)});function Yd(u,f){if("function"!=typeof u||null!=f&&"function"!=typeof f)throw new Sr(Un);var _=function(){var w=arguments,S=f?f.apply(this,w):w[0],P=_.cache;if(P.has(S))return P.get(S);var H=u.apply(this,w);return _.cache=P.set(S,H)||P,H};return _.cache=new(Yd.Cache||pa),_}function Sv(u){if("function"!=typeof u)throw new Sr(Un);return function(){var f=arguments;switch(f.length){case 0:return!u.call(this);case 1:return!u.call(this,f[0]);case 2:return!u.call(this,f[0],f[1]);case 3:return!u.call(this,f[0],f[1],f[2])}return!u.apply(this,f)}}Yd.Cache=pa;var Yx=zd(function(u,f){var _=(f=1==f.length&&rn(f[0])?pi(f[0],Br(Ft())):pi(Xn(f,1),Br(Ft()))).length;return pn(function(w){for(var S=-1,P=Zr(w.length,_);++S=f}),Oc=Bd(function(){return arguments}())?Bd:function(u){return Pi(u)&&ii.call(u,"callee")&&!Ad.call(u,"callee")},rn=oe.isArray,FF=m_?Br(m_):function xA(u){return Pi(u)&&es(u)==Vu};function eo(u){return null!=u&&Vp(u.length)&&!zl(u)}function xi(u){return Pi(u)&&eo(u)}var rl=uF||Qd,Qx=A0?Br(A0):function vF(u){return Pi(u)&&es(u)==pc};function Bp(u){if(!Pi(u))return!1;var f=es(u);return f==md||f==AE||"string"==typeof u.message&&"string"==typeof u.name&&!to(u)}function zl(u){if(!wi(u))return!1;var f=es(u);return f==Of||f==c0||f==EE||f==TE}function Up(u){return"number"==typeof u&&u==dn(u)}function Vp(u){return"number"==typeof u&&u>-1&&u%1==0&&u<=Wa}function wi(u){var f=typeof u;return null!=u&&("object"==f||"function"==f)}function Pi(u){return null!=u&&"object"==typeof u}var Tv=Pt?Br(Pt):function wA(u){return Pi(u)&&zr(u)==Bo};function xh(u){return"number"==typeof u||Pi(u)&&es(u)==Uu}function to(u){if(!Pi(u)||es(u)!=ja)return!1;var f=xs(u);if(null===f)return!0;var _=ii.call(f,"constructor")&&f.constructor;return"function"==typeof _&&_ instanceof _&&Pl.call(_)==R0}var Hp=$f?Br($f):function bF(u){return Pi(u)&&es(u)==gd},tw=D0?Br(D0):function L_(u){return Pi(u)&&zr(u)==Uo};function Gp(u){return"string"==typeof u||!rn(u)&&Pi(u)&&es(u)==mc}function As(u){return"symbol"==typeof u||Pi(u)&&es(u)==Ff}var $o=Ys?Br(Ys):function Y0(u){return Pi(u)&&Vp(u.length)&&!!Si[es(u)]},Pv=vp(lp),PD=vp(function(u,f){return u<=f});function Ov(u){if(!u)return[];if(eo(u))return Gp(u)?go(u):Qs(u);if(nh&&u[nh])return function rA(X){for(var ue,oe=[];!(ue=X.next()).done;)oe.push(ue.value);return oe}(u[nh]());var f=zr(u);return(f==Bo?qf:f==Uo?Hn:Nc)(u)}function sl(u){return u?(u=bo(u))===In||u===-In?(u<0?-1:1)*SE:u==u?u:0:0===u?u:0}function dn(u){var f=sl(u),_=f%1;return f==f?_?f-_:f:0}function OD(u){return u?Ll(dn(u),0,ua):0}function bo(u){if("number"==typeof u)return u;if(As(u))return Pf;if(wi(u)){var f="function"==typeof u.valueOf?u.valueOf():u;u=wi(f)?f+"":f}if("string"!=typeof u)return 0===u?u:+u;u=$n(u);var _=Ya.test(u);return _||nr.test(u)?oF(u.slice(2),_?2:8):VE.test(u)?Pf:+u}function Hl(u){return ci(u,Ds(u))}function Fn(u){return null==u?"":Zs(u)}var mt=Ar(function(u,f){if(wp(f)||eo(f))ci(f,fr(f),u);else for(var _ in f)ii.call(f,_)&&Ks(u,_,f[_])}),nw=Ar(function(u,f){ci(f,Ds(f),u)}),Gl=Ar(function(u,f,_,w){ci(f,Ds(f),u,w)}),ol=Ar(function(u,f,_,w){ci(f,fr(f),u,w)}),LD=yo(ih),Lc=pn(function(u,f){u=oi(u);var _=-1,w=f.length,S=w>2?f[2]:V;for(S&&Dr(f[0],f[1],S)&&(w=1);++_1),P}),ci(u,q_(u),_),w&&(_=Ms(_,Ci|ms|$s,xa));for(var S=f.length;S--;)ch(_,f[S]);return _}),jD=yo(function(u,f){return null==u?{}:function K0(u,f){return Z0(u,f,function(_,w){return Uv(u,w)})}(u,f)});function Vv(u,f){if(null==u)return{};var _=pi(q_(u),function(w){return[w]});return f=Ft(f),Z0(u,_,function(w,S){return f(w,S[0])})}var ow=hh(fr),zv=hh(Ds);function Nc(u){return null==u?[]:Qu(u,fr(u))}var G=$d(function(u,f,_){return f=f.toLowerCase(),u+(_?Hv(f):f)});function Hv(u){return Kd(Fn(u).toLowerCase())}function Gv(u){return(u=Fn(u))&&u.replace(po,nA).replace(JO,"")}var s1=$d(function(u,f,_){return u+(_?"-":"")+f.toLowerCase()}),lw=$d(function(u,f,_){return u+(_?" ":"")+f.toLowerCase()}),o1=Gd("toLowerCase"),$v=$d(function(u,f,_){return u+(_?"_":"")+f.toLowerCase()}),c1=$d(function(u,f,_){return u+(_?" ":"")+Kd(f)}),hw=$d(function(u,f,_){return u+(_?" ":"")+f.toUpperCase()}),Kd=Gd("toUpperCase");function fw(u,f,_){return u=Fn(u),(f=_?V:f)===V?function nn(X){return ZE.test(X)}(u)?function fn(X){return X.match(eF)||[]}(u):function tA(X){return X.match(NE)||[]}(u):u.match(f)||[]}var jv=pn(function(u,f){try{return _s(u,V,f)}catch(_){return Bp(_)?_:new $t(_)}}),f1=yo(function(u,f){return Rn(f,function(_){_=Ho(_),zo(u,_,Pc(u[_],u))}),u});function Yv(u){return function(){return u}}var pw=Cs(),_1=Cs(!0);function is(u){return u}function $p(u){return N_("function"==typeof u?u:Ms(u,Ci))}var Xv=pn(function(u,f){return function(_){return _a(_,u,f)}}),v1=pn(function(u,f){return function(_){return _a(u,_,f)}});function mw(u,f,_){var w=fr(f),S=ga(f,w);null==_&&(!wi(f)||!S.length&&w.length)&&(_=f,f=u,u=this,S=ga(f,fr(f)));var P=!(wi(_)&&"chain"in _&&!_.chain),H=zl(u);return Rn(S,function(j){var Q=f[j];u[j]=Q,H&&(u.prototype[j]=function(){var _e=this.__chain__;if(P||_e){var ye=u(this.__wrapped__);return(ye.__actions__=Qs(this.__actions__)).push({func:Q,args:arguments,thisArg:u}),ye.__chain__=_e,ye}return Q.apply(u,kl([this.value()],arguments))})}),u}function xo(){}var gw=gp(pi),b1=gp(JE),x1=gp(Wf);function wh(u){return fx(u)?__(Ho(u)):function va(u){return function(f){return wc(f,u)}}(u)}var Kv=rx(),Mh=rx(!0);function Ch(){return[]}function Qd(){return!1}var w1=$_(function(u,f){return u+f},0),M1=W_("ceil"),yw=$_(function(u,f){return u/f},1),C1=W_("floor"),D1=$_(function(u,f){return u*f},1),WF=W_("round"),ty=$_(function(u,f){return u-f},0);return I.after=function vD(u,f){if("function"!=typeof f)throw new Sr(Un);return u=dn(u),function(){if(--u<1)return f.apply(this,arguments)}},I.ary=bh,I.assign=mt,I.assignIn=nw,I.assignInWith=Gl,I.assignWith=ol,I.at=LD,I.before=Ca,I.bind=Pc,I.bindAll=f1,I.bindKey=xv,I.castArray=function wD(){if(!arguments.length)return[];var u=arguments[0];return rn(u)?u:[u]},I.chain=Vx,I.chunk=function nv(u,f,_){f=(_?Dr(u,f,_):f===V)?1:hr(dn(f),0);var w=null==u?0:u.length;if(!w||f<1)return[];for(var S=0,P=0,H=oe(w_(w/f));SS?0:S+_),(w=w===V||w>S?S:dn(w))<0&&(w+=S),w=_>w?0:OD(w);_>>0)?(u=Fn(u))&&("string"==typeof f||null!=f&&!Hp(f))&&!(f=Zs(f))&&Cd(u)?Dc(go(u),0,_):u.split(f,_):[]},I.spread=function Xx(u,f){if("function"!=typeof u)throw new Sr(Un);return f=null==f?0:hr(dn(f),0),pn(function(_){var w=_[f],S=Dc(_,0,f);return w&&kl(S,w),_s(u,this,S)})},I.tail=function kc(u){var f=null==u?0:u.length;return f?ts(u,1,f):[]},I.take=function Px(u,f,_){return u&&u.length?ts(u,0,(f=_||f===V?1:dn(f))<0?0:f):[]},I.takeRight=function Ox(u,f,_){var w=null==u?0:u.length;return w?ts(u,(f=w-(f=_||f===V?1:dn(f)))<0?0:f,w):[]},I.takeRightWhile=function QA(u,f){return u&&u.length?dh(u,Ft(f,3),!1,!0):[]},I.takeWhile=function IF(u,f){return u&&u.length?dh(u,Ft(f,3)):[]},I.tap=function tD(u,f){return f(u),u},I.throttle=function Fp(u,f,_){var w=!0,S=!0;if("function"!=typeof u)throw new Sr(Un);return wi(_)&&(w="leading"in _?!!_.leading:w,S="trailing"in _?!!_.trailing:S),yD(u,f,{leading:w,maxWait:f,trailing:S})},I.thru=Ip,I.toArray=Ov,I.toPairs=ow,I.toPairsIn=zv,I.toPath=function vw(u){return rn(u)?pi(u,Ho):As(u)?[u]:Qs(vx(Fn(u)))},I.toPlainObject=Hl,I.transform=function XD(u,f,_){var w=rn(u),S=w||rl(u)||$o(u);if(f=Ft(f,4),null==_){var P=u&&u.constructor;_=S?w?new P:[]:wi(u)&&zl(P)?Pd(xs(u)):{}}return(S?Rn:ki)(u,function(H,j,Q){return f(_,H,j,Q)}),_},I.unary=function Kx(u){return bh(u,1)},I.union=Ap,I.unionBy=JA,I.unionWith=Fx,I.uniq=function Lx(u){return u&&u.length?ri(u):[]},I.uniqBy=function Nx(u,f){return u&&u.length?ri(u,Ft(f,2)):[]},I.uniqWith=function fv(u,f){return f="function"==typeof f?f:V,u&&u.length?ri(u,V,f):[]},I.unset=function KD(u,f){return null==u||ch(u,f)},I.unzip=Dp,I.unzipWith=vh,I.update=function ZD(u,f,_){return null==u?u:tx(u,f,hp(_))},I.updateWith=function QD(u,f,_,w){return w="function"==typeof w?w:V,null==u?u:tx(u,f,hp(_),w)},I.values=Nc,I.valuesIn=function JD(u){return null==u?[]:Qu(u,Ds(u))},I.without=Tp,I.words=fw,I.wrap=function Av(u,f){return Ev(hp(f),u)},I.xor=Bx,I.xorBy=pv,I.xorWith=mv,I.zip=gv,I.zipObject=function yh(u,f){return Ac(u||[],f||[],Ks)},I.zipObjectDeep=function eD(u,f){return Ac(u||[],f||[],Vd)},I.zipWith=Ux,I.entries=ow,I.entriesIn=zv,I.extend=nw,I.extendWith=Gl,mw(I,I),I.add=w1,I.attempt=jv,I.camelCase=G,I.capitalize=Hv,I.ceil=M1,I.clamp=function e1(u,f,_){return _===V&&(_=f,f=V),_!==V&&(_=(_=bo(_))==_?_:0),f!==V&&(f=(f=bo(f))==f?f:0),Ll(bo(u),f,_)},I.clone=function Kn(u){return Ms(u,$s)},I.cloneDeep=function CD(u){return Ms(u,Ci|$s)},I.cloneDeepWith=function Lp(u,f){return Ms(u,Ci|$s,f="function"==typeof f?f:V)},I.cloneWith=function MD(u,f){return Ms(u,$s,f="function"==typeof f?f:V)},I.conformsTo=function Zx(u,f){return null==f||R_(u,f,fr(f))},I.deburr=Gv,I.defaultTo=function g1(u,f){return null==u||u!=u?f:u},I.divide=yw,I.endsWith=function n1(u,f,_){u=Fn(u),f=Zs(f);var w=u.length,S=_=_===V?w:Ll(dn(_),0,w);return(_-=f.length)>=0&&u.slice(_,S)==f},I.eq=Go,I.escape=function r1(u){return(u=Fn(u))&&FE.test(u)?u.replace(h0,ot):u},I.escapeRegExp=function aw(u){return(u=Fn(u))&&g0.test(u)?u.replace(s_,"\\$&"):u},I.every=function vv(u,f,_){var w=rn(u)?JE:$0;return _&&Dr(u,f,_)&&(f=V),w(u,Ft(f,3))},I.find=Gx,I.findIndex=Cx,I.findKey=function Fv(u,f){return ee(u,Ft(f,3),ki)},I.findLast=kp,I.findLastIndex=rv,I.findLastKey=function Lv(u,f){return ee(u,Ft(f,3),P_)},I.floor=C1,I.forEach=bv,I.forEachRight=Vl,I.forIn=function UD(u,f){return null==u?u:tl(u,Ft(f,3),Ds)},I.forInRight=function Nv(u,f){return null==u?u:Ai(u,Ft(f,3),Ds)},I.forOwn=function al(u,f){return u&&ki(u,Ft(f,3))},I.forOwnRight=function VD(u,f){return u&&P_(u,Ft(f,3))},I.get=Bv,I.gt=SD,I.gte=ED,I.has=function GD(u,f){return null!=u&&dx(u,f,sp)},I.hasIn=Uv,I.head=Ex,I.identity=is,I.includes=function aD(u,f,_,w){u=eo(u)?u:Nc(u),_=_&&!w?dn(_):0;var S=u.length;return _<0&&(_=hr(S+_,0)),Gp(u)?_<=S&&u.indexOf(f,_)>-1:!!S&&Ot(u,f,_)>-1},I.indexOf=function _h(u,f,_){var w=null==u?0:u.length;if(!w)return-1;var S=null==_?0:dn(_);return S<0&&(S=hr(w+S,0)),Ot(u,f,S)},I.inRange=function t1(u,f,_){return f=sl(f),_===V?(_=f,f=0):_=sl(_),function O_(u,f,_){return u>=Zr(f,_)&&u=-Wa&&u<=Wa},I.isSet=tw,I.isString=Gp,I.isSymbol=As,I.isTypedArray=$o,I.isUndefined=function ID(u){return u===V},I.isWeakMap=function RD(u){return Pi(u)&&zr(u)==_d},I.isWeakSet=function kD(u){return Pi(u)&&"[object WeakSet]"==es(u)},I.join=function Ax(u,f){return null==u?"":hF.call(u,f)},I.kebabCase=s1,I.last=Tr,I.lastIndexOf=function cv(u,f,_){var w=null==u?0:u.length;if(!w)return-1;var S=w;return _!==V&&(S=(S=dn(_))<0?hr(w+S,0):Zr(S,w-1)),f==f?function Sd(X,ue,oe){for(var Be=oe+1;Be--;)if(X[Be]===ue)return Be;return Be}(u,f,S):Zu(u,Yf,S,!0)},I.lowerCase=lw,I.lowerFirst=o1,I.lt=Pv,I.lte=PD,I.max=function bw(u){return u&&u.length?Ld(u,is,Nd):V},I.maxBy=function xw(u,f){return u&&u.length?Ld(u,Ft(f,2),Nd):V},I.mean=function S1(u){return Md(u,is)},I.meanBy=function E1(u,f){return Md(u,Ft(f,2))},I.min=function no(u){return u&&u.length?Ld(u,is,lp):V},I.minBy=function A1(u,f){return u&&u.length?Ld(u,Ft(f,2),lp):V},I.stubArray=Ch,I.stubFalse=Qd,I.stubObject=function _w(){return{}},I.stubString=function Zv(){return""},I.stubTrue=function Qv(){return!0},I.multiply=D1,I.nth=function Dx(u,f){return u&&u.length?CA(u,dn(f)):V},I.noConflict=function E(){return Cr._===this&&(Cr._=Kf),this},I.noop=xo,I.now=Op,I.pad=function a1(u,f,_){u=Fn(u);var w=(f=dn(f))?ur(u):0;if(!f||w>=f)return u;var S=(f-w)/2;return _p(M_(S),_)+u+_p(w_(S),_)},I.padEnd=function UF(u,f,_){u=Fn(u);var w=(f=dn(f))?ur(u):0;return f&&wf){var w=u;u=f,f=w}if(_||u%1||f%1){var S=C_();return Zr(u+S*(f-u+ke("1e-"+((S+"").length-1))),f)}return ah(u,f)},I.reduce=function dD(u,f,_){var w=rn(u)?g_:T0,S=arguments.length<3;return w(u,Ft(f,4),_,S,el)},I.reduceRight=function uD(u,f,_){var w=rn(u)?eA:T0,S=arguments.length<3;return w(u,Ft(f,4),_,S,k_)},I.repeat=function $i(u,f,_){return f=(_?Dr(u,f,_):f===V)?1:dn(f),lh(Fn(u),f)},I.replace=function l1(){var u=arguments,f=Fn(u[0]);return u.length<3?f:f.replace(u[1],u[2])},I.result=function YD(u,f,_){var w=-1,S=(f=ba(f,u)).length;for(S||(S=1,u=V);++wWa)return[];var _=ua,w=Zr(u,ua);f=Ft(f),u-=ua;for(var S=qs(w,f);++_=P)return u;var j=_-ur(w);if(j<1)return w;var Q=H?Dc(H,0,j).join(""):u.slice(0,j);if(S===V)return Q+w;if(H&&(j+=Q.length-j),Hp(S)){if(u.slice(j).search(S)){var _e,ye=Q;for(S.global||(S=vc(S.source,Fn(b0.exec(S))+"g")),S.lastIndex=0;_e=S.exec(ye);)var be=_e.index;Q=Q.slice(0,be===V?j:be)}}else if(u.indexOf(Zs(S),j)!=j){var Xe=Q.lastIndexOf(S);Xe>-1&&(Q=Q.slice(0,Xe))}return Q+w},I.unescape=function h1(u){return(u=Fn(u))&&OE.test(u)?u.replace(u0,Xf):u},I.uniqueId=function ey(u){var f=++yi;return Fn(u)+f},I.upperCase=hw,I.upperFirst=Kd,I.each=bv,I.eachRight=Vl,I.first=Ex,mw(I,function(){var u={};return ki(I,function(f,_){ii.call(I.prototype,_)||(u[_]=f)}),u}(),{chain:!1}),I.VERSION="4.17.21",Rn(["bind","bindKey","curry","curryRight","partial","partialRight"],function(u){I[u].placeholder=I}),Rn(["drop","take"],function(u,f){kn.prototype[u]=function(_){_=_===V?1:hr(dn(_),0);var w=this.__filtered__&&!f?new kn(this):this.clone();return w.__filtered__?w.__takeCount__=Zr(_,w.__takeCount__):w.__views__.push({size:Zr(_,ua),type:u+(w.__dir__<0?"Right":"")}),w},kn.prototype[u+"Right"]=function(_){return this.reverse()[u](_).reverse()}}),Rn(["filter","map","takeWhile"],function(u,f){var _=f+1,w=1==_||3==_;kn.prototype[u]=function(S){var P=this.clone();return P.__iteratees__.push({iteratee:Ft(S,3),type:_}),P.__filtered__=P.__filtered__||w,P}}),Rn(["head","last"],function(u,f){var _="take"+(f?"Right":"");kn.prototype[u]=function(){return this[_](1).value()[0]}}),Rn(["initial","tail"],function(u,f){var _="drop"+(f?"":"Right");kn.prototype[u]=function(){return this.__filtered__?new kn(this):this[_](1)}}),kn.prototype.compact=function(){return this.filter(is)},kn.prototype.find=function(u){return this.filter(u).head()},kn.prototype.findLast=function(u){return this.reverse().find(u)},kn.prototype.invokeMap=pn(function(u,f){return"function"==typeof u?new kn(this):this.map(function(_){return _a(_,u,f)})}),kn.prototype.reject=function(u){return this.filter(Sv(Ft(u)))},kn.prototype.slice=function(u,f){u=dn(u);var _=this;return _.__filtered__&&(u>0||f<0)?new kn(_):(u<0?_=_.takeRight(-u):u&&(_=_.drop(u)),f!==V&&(_=(f=dn(f))<0?_.dropRight(-f):_.take(f-u)),_)},kn.prototype.takeRightWhile=function(u){return this.reverse().takeWhile(u).reverse()},kn.prototype.toArray=function(){return this.take(ua)},ki(kn.prototype,function(u,f){var _=/^(?:filter|find|map|reject)|While$/.test(f),w=/^(?:head|last)$/.test(f),S=I[w?"take"+("last"==f?"Right":""):f],P=w||/^find/.test(f);S&&(I.prototype[f]=function(){var H=this.__wrapped__,j=w?[1]:arguments,Q=H instanceof kn,_e=j[0],ye=Q||rn(H),be=function(An){var Ln=S.apply(I,kl([An],j));return w&&Xe?Ln[0]:Ln};ye&&_&&"function"==typeof _e&&1!=_e.length&&(Q=ye=!1);var Xe=this.__chain__,Ut=P&&!Xe,mn=Q&&!this.__actions__.length;if(!P&&ye){H=mn?H:new kn(this);var Vt=u.apply(H,j);return Vt.__actions__.push({func:Ip,args:[be],thisArg:V}),new Ei(Vt,Xe)}return Ut&&mn?u.apply(this,j):(Vt=this.thru(be),Ut?w?Vt.value()[0]:Vt.value():Vt)})}),Rn(["pop","push","shift","sort","splice","unshift"],function(u){var f=ir[u],_=/^(?:push|sort|unshift)$/.test(u)?"tap":"thru",w=/^(?:pop|shift)$/.test(u);I.prototype[u]=function(){var S=arguments;if(w&&!this.__chain__){var P=this.value();return f.apply(rn(P)?P:[],S)}return this[_](function(H){return f.apply(rn(H)?H:[],S)})}}),ki(kn.prototype,function(u,f){var _=I[f];if(_){var w=_.name+"";ii.call(Rd,w)||(Rd[w]=[]),Rd[w].push({name:f,func:_})}}),Rd[Wd(V,dr).name]=[{name:"wrapper",func:V}],kn.prototype.clone=function N0(){var u=new kn(this.__wrapped__);return u.__actions__=Qs(this.__actions__),u.__dir__=this.__dir__,u.__filtered__=this.__filtered__,u.__iteratees__=Qs(this.__iteratees__),u.__takeCount__=this.__takeCount__,u.__views__=Qs(this.__views__),u},kn.prototype.reverse=function Od(){if(this.__filtered__){var u=new kn(this);u.__dir__=-1,u.__filtered__=!0}else(u=this.clone()).__dir__*=-1;return u},kn.prototype.value=function ws(){var u=this.__wrapped__.value(),f=this.__dir__,_=rn(u),w=f<0,S=_?u.length:0,P=function xp(u,f,_){for(var w=-1,S=_.length;++w=this.__values__.length;return{done:u,value:u?V:this.__values__[this.__index__++]}},I.prototype.plant=function nD(u){for(var f,_=this;_ instanceof bc;){var w=ns(_);w.__index__=0,w.__values__=V,f?S.__wrapped__=w:f=w;var S=w;_=_.__wrapped__}return S.__wrapped__=u,f},I.prototype.reverse=function iD(){var u=this.__wrapped__;if(u instanceof kn){var f=u;return this.__actions__.length&&(f=new kn(this)),(f=f.reverse()).__actions__.push({func:Ip,args:[dv],thisArg:V}),new Ei(f,this.__chain__)}return this.thru(dv)},I.prototype.toJSON=I.prototype.valueOf=I.prototype.value=function RF(){return ya(this.__wrapped__,this.__actions__)},I.prototype.first=I.prototype.head,nh&&(I.prototype[nh]=function jd(){return this}),I}();Cr._=ys,(ln=function(){return ys}.call(Hs,ps,Hs,Lo))!==V&&(Lo.exports=ln)}.call(this)},738:function(Lo){var Hs;Lo.exports=((Hs=function(){function ps(Mi){return Nr.appendChild(Mi.dom),Mi}function ln(Mi){for(var Ci=0;CiZt+1e3&&(Al.update(1e3*Un/(Mi-Zt),100),Zt=Mi,Un=0,Gs)){var Ci=performance.memory;Gs.update(Ci.usedJSHeapSize/1048576,Ci.jsHeapSizeLimit/1048576)}return Mi},update:function(){Kr=this.end()},domElement:Nr,setMode:ln}}).Panel=function(ps,ln,V){var Nr=1/0,Kr=0,Zt=Math.round,Un=Zt(window.devicePixelRatio||1),Al=80*Un,Ha=48*Un,Gs=3*Un,Mi=2*Un,Ci=3*Un,ms=15*Un,$s=74*Un,Ws=30*Un,No=document.createElement("canvas");No.width=Al,No.height=Ha,No.style.cssText="width:80px;height:48px";var On=No.getContext("2d");return On.font="bold "+9*Un+"px Helvetica,Arial,sans-serif",On.textBaseline="top",On.fillStyle=V,On.fillRect(0,0,Al,Ha),On.fillStyle=ln,On.fillText(ps,Gs,Mi),On.fillRect(Ci,ms,$s,Ws),On.fillStyle=V,On.globalAlpha=.9,On.fillRect(Ci,ms,$s,Ws),{dom:No,update:function(dr,fc){Nr=Math.min(Nr,dr),Kr=Math.max(Kr,dr),On.fillStyle=V,On.globalAlpha=1,On.fillRect(0,0,Al,ms),On.fillStyle=ln,On.fillText(Zt(dr)+" "+ps+" ("+Zt(Nr)+"-"+Zt(Kr)+")",Gs,Mi),On.drawImage(No,Ci+Un,ms,$s-Un,Ws,Ci,ms,$s-Un,Ws),On.fillRect(Ci+$s-Un,ms,Un,Ws),On.fillStyle=V,On.globalAlpha=.9,On.fillRect(Ci+$s-Un,ms,Un,Zt((1-dr/fc)*Ws))}}},Hs)}},Lo=>{Lo(Lo.s=855)}]); \ No newline at end of file +(self.webpackChunkgui=self.webpackChunkgui||[]).push([[179],{855:(Lo,Hs,ps)=>{"use strict";function cn(i){return"function"==typeof i}function V(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 Nr=V(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 Kr(i,t){if(i){const e=i.indexOf(t);0<=e&&i.splice(e,1)}}class Zt{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(cn(n))try{n()}catch(s){t=s instanceof Nr?s.errors:[s]}const{_finalizers:r}=this;if(r){this._finalizers=null;for(const s of r)try{Ha(s)}catch(o){t=t??[],o instanceof Nr?t=[...t,...o.errors]:t.push(o)}}if(t)throw new Nr(t)}}add(t){var e;if(t&&t!==this)if(this.closed)Ha(t);else{if(t instanceof Zt){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)&&Kr(e,t)}remove(t){const{_finalizers:e}=this;e&&Kr(e,t),t instanceof Zt&&t._removeParent(this)}}Zt.EMPTY=(()=>{const i=new Zt;return i.closed=!0,i})();const Un=Zt.EMPTY;function Al(i){return i instanceof Zt||i&&"closed"in i&&cn(i.remove)&&cn(i.add)&&cn(i.unsubscribe)}function Ha(i){cn(i)?i():i.unsubscribe()}const Gs={onUnhandledError:null,onStoppedNotification:null,Promise:void 0,useDeprecatedSynchronousErrorHandling:!1,useDeprecatedNextContext:!1},Mi={setTimeout(i,t,...e){const{delegate:n}=Mi;return n?.setTimeout?n.setTimeout(i,t,...e):setTimeout(i,t,...e)},clearTimeout(i){const{delegate:t}=Mi;return(t?.clearTimeout||clearTimeout)(i)},delegate:void 0};function Ci(i){Mi.setTimeout(()=>{const{onUnhandledError:t}=Gs;if(!t)throw i;t(i)})}function ms(){}const $s=On("C",void 0,void 0);function On(i,t,e){return{kind:i,value:t,error:e}}let dr=null;function pc(i){if(Gs.useDeprecatedSynchronousErrorHandling){const t=!dr;if(t&&(dr={errorThrown:!1,error:null}),i(),t){const{errorThrown:e,error:n}=dr;if(dr=null,e)throw n}}else i()}class Dl extends Zt{constructor(t){super(),this.isStopped=!1,t?(this.destination=t,Al(t)&&t.add(this)):this.destination=ME}static create(t,e,n){return new da(t,e,n)}next(t){this.isStopped?Xg(function No(i){return On("N",i,void 0)}(t),this):this._next(t)}error(t){this.isStopped?Xg(function Ws(i){return On("E",void 0,i)}(t),this):(this.isStopped=!0,this._error(t))}complete(){this.isStopped?Xg($s,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 ca=Function.prototype.bind;function Tl(i,t){return ca.call(i,t)}class Ga{constructor(t){this.partialObserver=t}next(t){const{partialObserver:e}=this;if(e.next)try{e.next(t)}catch(n){pd(n)}}error(t){const{partialObserver:e}=this;if(e.error)try{e.error(t)}catch(n){pd(n)}else pd(t)}complete(){const{partialObserver:t}=this;if(t.complete)try{t.complete()}catch(e){pd(e)}}}class da extends Dl{constructor(t,e,n){let r;if(super(),cn(t)||!t)r={next:t??void 0,error:e??void 0,complete:n??void 0};else{let s;this&&Gs.useDeprecatedNextContext?(s=Object.create(t),s.unsubscribe=()=>this.unsubscribe(),r={next:t.next&&Tl(t.next,s),error:t.error&&Tl(t.error,s),complete:t.complete&&Tl(t.complete,s)}):r=t}this.destination=new Ga(r)}}function pd(i){Gs.useDeprecatedSynchronousErrorHandling?function la(i){Gs.useDeprecatedSynchronousErrorHandling&&dr&&(dr.errorThrown=!0,dr.error=i)}(i):Ci(i)}function Xg(i,t){const{onStoppedNotification:e}=Gs;e&&Mi.setTimeout(()=>e(i,t))}const ME={closed:!0,next:ms,error:function wE(i){throw i},complete:ms},Kg="function"==typeof Symbol&&Symbol.observable||"@@observable";function $a(i){return i}function a0(i){return 0===i.length?$a:1===i.length?i[0]:function(e){return i.reduce((n,r)=>r(n),e)}}let In=(()=>{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 Pf(i){return i&&i instanceof Dl||function SE(i){return i&&cn(i.next)&&cn(i.error)&&cn(i.complete)}(i)&&Al(i)}(e)?e:new da(e,n,r);return pc(()=>{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=Wa(n))((r,s)=>{const o=new da({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)}[Kg](){return this}pipe(...e){return a0(e)(this)}toPromise(e){return new(e=Wa(e))((n,r)=>{let s;this.subscribe(o=>s=o,o=>r(o),()=>n(s))})}}return i.create=t=>new i(t),i})();function Wa(i){var t;return null!==(t=i??Gs.Promise)&&void 0!==t?t:Promise}const ua=V(i=>function(){i(this),this.name="ObjectUnsubscribedError",this.message="object unsubscribed"});let Re=(()=>{class i extends In{constructor(){super(),this.closed=!1,this.currentObservers=null,this.observers=[],this.isStopped=!1,this.hasError=!1,this.thrownError=null}lift(e){const n=new l0(this,this);return n.operator=e,n}_throwIfClosed(){if(this.closed)throw new ua}next(e){pc(()=>{if(this._throwIfClosed(),!this.isStopped){this.currentObservers||(this.currentObservers=Array.from(this.observers));for(const n of this.currentObservers)n.next(e)}})}error(e){pc(()=>{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(){pc(()=>{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?Un:(this.currentObservers=null,s.push(e),new Zt(()=>{this.currentObservers=null,Kr(s,e)}))}_checkFinalizedStatuses(e){const{hasError:n,thrownError:r,isStopped:s}=this;n?e.error(r):s&&e.complete()}asObservable(){const e=new In;return e.source=this,e}}return i.create=(t,e)=>new l0(t,e),i})();class l0 extends Re{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:Un}}function c0(i){return cn(i?.lift)}function ti(i){return t=>{if(c0(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 Yn(i,t,e,n,r){return new EE(i,t,e,n,r)}class EE extends Dl{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 et(i,t){return ti((e,n)=>{let r=0;e.subscribe(Yn(n,s=>{n.next(i.call(t,s,r++))}))})}function ha(i){return this instanceof ha?(this.v=i,this):new ha(i)}function Nf(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 Zg(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 i_=i=>i&&"number"==typeof i.length&&"function"!=typeof i;function r_(i){return cn(i?.then)}function p0(i){return cn(i[Kg])}function m0(i){return Symbol.asyncIterator&&cn(i?.[Symbol.asyncIterator])}function g0(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 _0=function s_(){return"function"==typeof Symbol&&Symbol.iterator?Symbol.iterator:"@@iterator"}();function Bf(i){return cn(i?.[_0])}function v0(i){return function Lf(i,t,e){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var r,n=e.apply(i,t||[]),s=[];return r=Object.create(("function"==typeof AsyncIterator?AsyncIterator:Object).prototype),a("next"),a("throw"),a("return",function o(m){return function(g){return Promise.resolve(g).then(m,h)}}),r[Symbol.asyncIterator]=function(){return this},r;function a(m,g){n[m]&&(r[m]=function(b){return new Promise(function(v,y){s.push([m,b,v,y])>1||l(m,b)})},g&&(r[m]=g(r[m])))}function l(m,g){try{!function c(m){m.value instanceof ha?Promise.resolve(m.value.v).then(d,h):p(s[0][2],m)}(n[m](g))}catch(b){p(s[0][3],b)}}function d(m){l("next",m)}function h(m){l("throw",m)}function p(m,g){m(g),s.shift(),s.length&&l(s[0][0],s[0][1])}}(this,arguments,function*(){const e=i.getReader();try{for(;;){const{value:n,done:r}=yield ha(e.read());if(r)return yield ha(void 0);yield yield ha(n)}}finally{e.releaseLock()}})}function y0(i){return cn(i?.getReader)}function wr(i){if(i instanceof In)return i;if(null!=i){if(p0(i))return function LE(i){return new In(t=>{const e=i[Kg]();if(cn(e.subscribe))return e.subscribe(t);throw new TypeError("Provided object does not correctly implement Symbol.observable")})}(i);if(i_(i))return function NE(i){return new In(t=>{for(let e=0;e{i.then(e=>{t.closed||(t.next(e),t.complete())},e=>t.error(e)).then(null,Ci)})}(i);if(m0(i))return b0(i);if(Bf(i))return function UE(i){return new In(t=>{for(const e of i)if(t.next(e),t.closed)return;t.complete()})}(i);if(y0(i))return function x0(i){return b0(v0(i))}(i)}throw g0(i)}function b0(i){return new In(t=>{(function VE(i,t){var e,n,r,s;return function gd(i,t,e,n){return new(e||(e=Promise))(function(s,o){function a(d){try{c(n.next(d))}catch(h){o(h)}}function l(d){try{c(n.throw(d))}catch(h){o(h)}}function c(d){d.done?s(d.value):function r(s){return s instanceof e?s:new e(function(o){o(s)})}(d.value).then(a,l)}c((n=n.apply(i,t||[])).next())})}(this,void 0,void 0,function*(){try{for(e=Nf(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 Ya(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 ir(i,t,e=1/0){return cn(t)?ir((n,r)=>et((s,o)=>t(n,s,r,o))(wr(i(n,r))),e):("number"==typeof t&&(e=t),ti((n,r)=>function zE(i,t,e,n,r,s,o,a){const l=[];let c=0,d=0,h=!1;const p=()=>{h&&!l.length&&!c&&t.complete()},m=b=>c{s&&t.next(b),c++;let v=!1;wr(e(b,d++)).subscribe(Yn(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(Yn(t,m,()=>{h=!0,p()})),()=>{a?.()}}(n,r,i,e)))}function yd(i=1/0){return ir($a,i)}const po=new In(i=>i.complete());function Gu(i){return i&&cn(i.schedule)}function a_(i){return i[i.length-1]}function w0(i){return cn(a_(i))?i.pop():void 0}function $u(i){return Gu(a_(i))?i.pop():void 0}function l_(i,t=0){return ti((e,n)=>{e.subscribe(Yn(n,r=>Ya(n,i,()=>n.next(r),t),()=>Ya(n,i,()=>n.complete(),t),r=>Ya(n,i,()=>n.error(r),t)))})}function c_(i,t=0){return ti((e,n)=>{n.add(i.schedule(()=>e.subscribe(n),t))})}function d_(i,t){if(!i)throw new Error("Iterable cannot be null");return new In(e=>{Ya(e,t,()=>{const n=i[Symbol.asyncIterator]();Ya(e,t,()=>{n.next().then(r=>{r.done?e.complete():e.next(r.value)})},0,!0)})})}function Ni(i,t){return t?function S0(i,t){if(null!=i){if(p0(i))return function GE(i,t){return wr(i).pipe(c_(t),l_(t))}(i,t);if(i_(i))return function WE(i,t){return new In(e=>{let n=0;return t.schedule(function(){n===i.length?e.complete():(e.next(i[n++]),e.closed||this.schedule())})})}(i,t);if(r_(i))return function $E(i,t){return wr(i).pipe(c_(t),l_(t))}(i,t);if(m0(i))return d_(i,t);if(Bf(i))return function jE(i,t){return new In(e=>{let n;return Ya(e,t,()=>{n=i[_0](),Ya(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)}),()=>cn(n?.return)&&n.return()})}(i,t);if(y0(i))return function C0(i,t){return d_(v0(i),t)}(i,t)}throw g0(i)}(i,t):wr(i)}function Mr(...i){const t=$u(i),e=function M0(i,t){return"number"==typeof a_(i)?i.pop():t}(i,1/0),n=i;return n.length?1===n.length?wr(n[0]):yd(e)(Ni(n,t)):po}function Uf(i={}){const{connector:t=(()=>new Re),resetOnError:e=!0,resetOnComplete:n=!0,resetOnRefCountZero:r=!0}=i;return s=>{let o,a,l,c=0,d=!1,h=!1;const p=()=>{a?.unsubscribe(),a=void 0},m=()=>{p(),o=l=void 0,d=h=!1},g=()=>{const b=o;m(),b?.unsubscribe()};return ti((b,v)=>{c++,!h&&!d&&p();const y=l=l??t();v.add(()=>{c--,0===c&&!h&&!d&&(a=bd(g,r))}),y.subscribe(v),!o&&c>0&&(o=new da({next:M=>y.next(M),error:M=>{h=!0,p(),a=bd(m,e,M),y.error(M)},complete:()=>{d=!0,p(),a=bd(m,n),y.complete()}}),wr(b).subscribe(o))})(s)}}function bd(i,t,...e){if(!0===t)return void i();if(!1===t)return;const n=new da({next:()=>{n.unsubscribe(),i()}});return wr(t(...e)).subscribe(n)}function li(i){for(let t in i)if(i[t]===li)return t;throw Error("Could not find renamed property on target object.")}function u_(i,t){for(const e in t)t.hasOwnProperty(e)&&!i.hasOwnProperty(e)&&(i[e]=t[e])}function pi(i){if("string"==typeof i)return i;if(Array.isArray(i))return"["+i.map(pi).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 Vf(i,t){return null==i||""===i?null===t?"":t:null==t||""===t?i:i+" "+t}const h_=li({__forward_ref__:li});function Gn(i){return i.__forward_ref__=Gn,i.toString=function(){return pi(this())},i}function Pt(i){return Wu(i)?i():i}function Wu(i){return"function"==typeof i&&i.hasOwnProperty(h_)&&i.__forward_ref__===Gn}function ju(i){return i&&!!i.\u0275providers}const qu="https://g.co/ng/security#xss";class pe extends Error{constructor(t,e){super(zf(t,e)),this.code=t}}function zf(i,t){return`NG0${Math.abs(i)}${t?": "+t.trim():""}`}function Qt(i){return"string"==typeof i?i:null==i?"":String(i)}function Hf(i,t){throw new pe(-201,!1)}function En(i,t){null==i&&function ni(i,t,e,n){throw new Error(`ASSERTION ERROR: ${i}`+(null==n?"":` [Expected=> ${e} ${n} ${t} <=Actual]`))}(t,i,null,"!=")}function ke(i){return{token:i.token,providedIn:i.providedIn||null,factory:i.factory,value:void 0}}function Kt(i){return{providers:i.providers||[],imports:i.imports||[]}}function Gf(i){return f_(i,xd)||f_(i,m_)}function f_(i,t){return i.hasOwnProperty(t)?i[t]:null}function p_(i){return i&&(i.hasOwnProperty(gs)||i.hasOwnProperty(D0))?i[gs]:null}const xd=li({\u0275prov:li}),gs=li({\u0275inj:li}),m_=li({ngInjectableDef:li}),D0=li({ngInjectorDef:li});var Ot=(()=>((Ot=Ot||{})[Ot.Default=0]="Default",Ot[Ot.Host=1]="Host",Ot[Ot.Self=2]="Self",Ot[Ot.SkipSelf=4]="SkipSelf",Ot[Ot.Optional=8]="Optional",Ot))();let $f;function Ys(i){const t=$f;return $f=i,t}function _s(i,t,e){const n=Gf(i);return n&&"root"==n.providedIn?void 0===n.value?n.value=n.factory():n.value:e&Ot.Optional?null:void 0!==t?t:void Hf(pi(i))}const Rn=(()=>typeof globalThis<"u"&&globalThis||typeof global<"u"&&global||typeof window<"u"&&window||typeof self<"u"&&typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&self)(),Rl={},Ku="__NG_DI_FLAG__",mi="ngTempTokenPath",kl="ngTokenPath",g_=/\n/gm,eA="\u0275",Wf="__source";let Zu;function wd(i){const t=Zu;return Zu=i,t}function tA(i,t=Ot.Default){if(void 0===Zu)throw new pe(-203,!1);return null===Zu?_s(i,void 0,t):Zu.get(i,t&Ot.Optional?null:void 0,t)}function ee(i,t=Ot.Default){return(function T0(){return $f}()||tA)(Pt(i),t)}function Ft(i,t=Ot.Default){return ee(i,jf(t))}function jf(i){return typeof i>"u"||"number"==typeof i?i:0|(i.optional&&8)|(i.host&&1)|(i.self&&2)|(i.skipSelf&&4)}function Yf(i){const t=[];for(let e=0;e((mo=mo||{})[mo.OnPush=0]="OnPush",mo[mo.Default=1]="Default",mo))(),qs=(()=>{return(i=qs||(qs={}))[i.Emulated=0]="Emulated",i[i.None=2]="None",i[i.ShadowDom=3]="ShadowDom",qs;var i})();const Xa={},$n=[],Br=li({\u0275cmp:li}),Ju=li({\u0275dir:li}),vc=li({\u0275pipe:li}),y_=li({\u0275mod:li}),fa=li({\u0275fac:li}),eh=li({__NG_ELEMENT_ID__:li});let nA=0;function ot(i){return qa(()=>{const t=go(i),e={...t,decls:i.decls,vars:i.vars,template:i.template,consts:i.consts||null,ngContentSelectors:i.ngContentSelectors,onPush:i.changeDetection===mo.OnPush,directiveDefs:null,pipeDefs:null,dependencies:t.standalone&&i.dependencies||null,getStandaloneInjector:null,data:i.data||{},encapsulation:i.encapsulation||qs.Emulated,id:"c"+nA++,styles:i.styles||$n,_:null,schemas:i.schemas||null,tView:null};b_(e);const n=i.dependencies;return e.directiveDefs=Xf(n,!1),e.pipeDefs=Xf(n,!0),e})}function th(i,t,e){const n=i.\u0275cmp;n.directiveDefs=Xf(t,!1),n.pipeDefs=Xf(e,!0)}function iA(i){return Hn(i)||Ur(i)}function Cd(i){return null!==i}function nn(i){return qa(()=>({type:i.type,bootstrap:i.bootstrap||$n,declarations:i.declarations||$n,imports:i.imports||$n,exports:i.exports||$n,transitiveCompileScopes:null,schemas:i.schemas||null,id:i.id||null}))}function qf(i,t){if(null==i)return Xa;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 ve(i){return qa(()=>{const t=go(i);return b_(t),t})}function Gi(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 Hn(i){return i[Br]||null}function Ur(i){return i[Ju]||null}function vs(i){return i[vc]||null}function ur(i,t){const e=i[y_]||null;if(!e&&!0===t)throw new Error(`Type ${pi(i)} does not have '\u0275mod' property.`);return e}function go(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||$n,viewQuery:i.viewQuery||null,features:i.features||null,setInput:null,findHostDirectiveDefs:null,hostDirectives:null,inputs:qf(i.inputs,t),outputs:qf(i.outputs)}}function b_(i){i.features?.forEach(t=>t(i))}function Xf(i,t){if(!i)return null;const e=t?vs:iA;return()=>("function"==typeof i?i():i).map(n=>e(n)).filter(Cd)}const Ka=0,at=1,fn=2,Bi=3,ys=4,X=5,ue=6,oe=7,Be=8,$t=9,Vn=10,yt=11,oi=12,yc=13,R0=14,Sr=15,rr=16,nh=17,Vo=18,Xs=19,Pl=20,ii=21,yi=22,Ed=1,k0=2,Kf=7,Zf=8,Za=9,Ui=10;function bs(i){return Array.isArray(i)&&"object"==typeof i[Ed]}function xs(i){return Array.isArray(i)&&!0===i[Ed]}function Qf(i){return 0!=(4&i.flags)}function Ad(i){return i.componentOffset>-1}function bc(i){return 1==(1&i.flags)}function _o(i){return!!i.template}function ih(i){return 0!=(256&i[fn])}function Qa(i,t){return i.hasOwnProperty(fa)?i[fa]:null}class Td{constructor(t,e,n){this.previousValue=t,this.currentValue=e,this.firstChange=n}isFirstChange(){return this.firstChange}}function bi(){return Id}function Id(i){return i.type.prototype.ngOnChanges&&(i.setInput=Rd),tp}function tp(){const i=N0(this),t=i?.current;if(t){const e=i.previous;if(e===Xa)i.previous=t;else for(let n in t)e[n]=t[n];i.current=null,this.ngOnChanges(t)}}function Rd(i,t,e,n){const r=this.declaredInputs[e],s=N0(i)||function lA(i,t){return i[L0]=t}(i,{previous:Xa,current:null}),o=s.current||(s.current={}),a=s.previous,l=a[r];o[r]=new Td(l&&l.currentValue,t,a===Xa),i[n]=t}bi.ngInherit=!0;const L0="__ngSimpleChanges__";function N0(i){return i[L0]||null}const Qr=function(i,t,e){},kd="svg";function I(i){for(;Array.isArray(i);)i=i[Ka];return i}function xc(i,t){return I(t[i])}function Ei(i,t){return I(t[i.index])}function B0(i,t){return i.data[t]}function Od(i,t){return i[t]}function ws(i,t){const e=t[i];return bs(e)?e:e[Ka]}function np(i){return 64==(64&i[fn])}function Ol(i,t){return null==t?null:i[t]}function U0(i){i[Vo]=0}function A_(i,t){i[X]+=t;let e=i,n=i[Bi];for(;null!==n&&(1===t&&1===e[X]||-1===t&&0===e[X]);)n[X]+=t,e=n,n=n[Bi]}const kt={lFrame:el(null),bindingsEnabled:!0};function pa(){return kt.bindingsEnabled}function Se(){return kt.lFrame.lView}function zn(){return kt.lFrame.tView}function an(i){return kt.lFrame.contextLView=i,i[Be]}function zt(i){return kt.lFrame.contextLView=null,i}function Er(){let i=z0();for(;null!==i&&64===i.type;)i=i.parent;return i}function z0(){return kt.lFrame.currentTNode}function ma(i,t){const e=kt.lFrame;e.currentTNode=i,e.isParent=t}function D_(){return kt.lFrame.isParent}function T_(){kt.lFrame.isParent=!1}function Vr(){const i=kt.lFrame;let t=i.bindingRootIndex;return-1===t&&(t=i.bindingRootIndex=i.tView.bindingStartIndex),t}function Fl(){return kt.lFrame.bindingIndex++}function Ks(i){const t=kt.lFrame,e=t.bindingIndex;return t.bindingIndex=t.bindingIndex+i,e}function $0(i,t){const e=kt.lFrame;e.bindingIndex=e.bindingRootIndex=i,zo(t)}function zo(i){kt.lFrame.currentDirectiveIndex=i}function rh(i){const t=kt.lFrame.currentDirectiveIndex;return-1===t?null:i[t]}function Ll(){return kt.lFrame.currentQueryIndex}function Ms(i){kt.lFrame.currentQueryIndex=i}function vA(i){const t=i[at];return 2===t.type?t.declTNode:1===t.type?i[ue]:null}function R_(i,t,e){if(e&Ot.SkipSelf){let r=t,s=i;for(;!(r=r.parent,null!==r||e&Ot.Host||(r=vA(s),null===r||(s=s[Sr],10&r.type))););if(null===r)return!1;t=r,i=s}const n=kt.lFrame=Fd();return n.currentTNode=t,n.lView=i,!0}function rp(i){const t=Fd(),e=i[at];kt.lFrame=t,t.currentTNode=e.firstChild,t.lView=i,t.tView=e,t.contextLView=i,t.bindingIndex=e.bindingStartIndex,t.inI18n=!1}function Fd(){const i=kt.lFrame,t=null===i?null:i.child;return null===t?el(i):t}function el(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 k_(){const i=kt.lFrame;return kt.lFrame=i.parent,i.currentTNode=null,i.lView=null,i}const W0=k_;function Ld(){const i=k_();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 Xn(){return kt.lFrame.selectedIndex}function tl(i){kt.lFrame.selectedIndex=i}function Ai(){const i=kt.lFrame;return B0(i.tView,i.selectedIndex)}function ki(){kt.lFrame.currentNamespace=kd}function ga(){!function Mc(){kt.lFrame.currentNamespace=null}()}function Nd(i,t){for(let e=t.directiveStart,n=t.directiveEnd;e=n)break}else t[l]<0&&(i[Vo]+=65536),(a>11>16&&(3&i[fn])===t){i[fn]+=2048,Qr(4,a,s);try{s.call(a)}finally{Qr(5,a,s)}}}else{Qr(4,a,s);try{s.call(a)}finally{Qr(5,a,s)}}}const _a=-1;class Bd{constructor(t,e,n){this.factory=t,this.resolving=!1,this.canSeeViewProviders=e,this.injectImpl=n}}function L_(i,t,e){let n=0;for(;nt){o=s-1;break}}}for(;s>16}(i),n=t;for(;e>0;)n=n[Sr],e--;return n}let Ud=!0;function cp(i){const t=Ud;return Ud=i,t}const B_=255,Z0=5;let Q0=0;const va={};function ah(i,t){const e=J0(i,t);if(-1!==e)return e;const n=t[at];n.firstCreatePass&&(i.injectorIndex=t.length,lh(n.data,i),lh(t,null),lh(n.blueprint,null));const r=ch(i,t),s=i.injectorIndex;if(lp(r)){const o=sh(r),a=oh(r,t),l=a[at].data;for(let c=0;c<8;c++)t[s+c]=a[o+c]|l[o+c]}return t[s+8]=r,s}function lh(i,t){i.push(0,0,0,0,0,0,0,0,t)}function J0(i,t){return-1===i.injectorIndex||i.parent&&i.parent.injectorIndex===i.injectorIndex||null===t[i.injectorIndex+8]?-1:i.injectorIndex}function ch(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=uh(r),null===n)return _a;if(e++,r=r[Sr],-1!==n.injectorIndex)return n.injectorIndex|e<<16}return _a}function pn(i,t,e){!function U_(i,t,e){let n;"string"==typeof e?n=e.charCodeAt(0)||0:e.hasOwnProperty(eh)&&(n=e[eh]),null==n&&(n=e[eh]=Q0++);const r=n&B_;t.data[i+(r>>Z0)]|=1<=0?t&B_:Zs:t}(e);if("function"==typeof s){if(!R_(t,i,n))return n&Ot.Host?ex(r,0,n):Vd(t,e,n,r);try{const o=s(n);if(null!=o||n&Ot.Optional)return o;Hf()}finally{W0()}}else if("number"==typeof s){let o=null,a=J0(i,t),l=_a,c=n&Ot.Host?t[rr][ue]:null;for((-1===a||n&Ot.SkipSelf)&&(l=-1===a?ch(i,t):t[a+8],l!==_a&&z_(n,!1)?(o=t[at],a=sh(l),t=oh(l,t)):a=-1);-1!==a;){const d=t[at];if(up(s,a,d.data)){const h=EA(a,t,e,o,n,c);if(h!==va)return h}l=t[a+8],l!==_a&&z_(n,t[at].data[a+8]===c)&&up(s,a,t)?(o=d,a=sh(l),t=oh(l,t)):a=-1}}return r}function EA(i,t,e,n,r,s){const o=t[at],a=o.data[i+8],d=ts(a,o,e,null==n?Ad(a)&&Ud:n!=o&&0!=(3&a.type),r&Ot.Host&&s===a);return null!==d?Ec(t,o,d,a):va}function ts(i,t,e,n,r){const s=i.providerIndexes,o=t.data,a=1048575&s,l=i.directiveStart,d=s>>20,p=r?a+d:i.directiveEnd;for(let m=n?a:a+d;m=l&&g.type===e)return m}if(r){const m=o[l];if(m&&_o(m)&&m.type===e)return l}return null}function Ec(i,t,e,n){let r=i[e];const s=t.data;if(function xA(i){return i instanceof Bd}(r)){const o=r;o.resolving&&function E0(i,t){const e=t?`. Dependency path: ${t.join(" > ")} > ${i}`:"";throw new pe(-200,`Circular dependency in DI detected for ${i}${e}`)}(function qn(i){return"function"==typeof i?i.name||i.toString():"object"==typeof i&&null!=i&&"function"==typeof i.type?i.type.name||i.type.toString():Qt(i)}(s[e]));const a=cp(o.canSeeViewProviders);o.resolving=!0;const l=o.injectImpl?Ys(o.injectImpl):null;R_(i,n,Ot.Default);try{r=i[e]=o.factory(void 0,s,i,n),t.firstCreatePass&&e>=n.directiveStart&&function es(i,t,e){const{ngOnChanges:n,ngOnInit:r,ngDoCheck:s}=t.type.prototype;if(n){const o=Id(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&&Ys(l),cp(a),o.resolving=!1,W0()}}return r}function up(i,t,e){return!!(e[t+(i>>Z0)]&1<{const t=i.prototype.constructor,e=t[fa]||dh(t),n=Object.prototype;let r=Object.getPrototypeOf(i.prototype).constructor;for(;r&&r!==n;){const s=r[fa]||dh(r);if(s&&s!==e)return s;r=Object.getPrototypeOf(r)}return s=>new s})}function dh(i){return Wu(i)?()=>{const t=dh(Pt(i));return t&&t()}:Qa(i)}function uh(i){const t=i[at],e=t.type;return 2===e?t.declTNode:1===e?i[ue]:null}function ya(i){return function SA(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 ba(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,d){const h=l.hasOwnProperty(Dc)?l[Dc]:Object.defineProperty(l,Dc,{value:[]})[Dc];for(;h.length<=d;)h.push(null);return(h[d]=h[d]||[]).push(o),l}}return e&&(r.prototype=Object.create(e.prototype)),r.prototype.ngMetadataName=i,r.annotationCls=r,r})}class me{constructor(t,e){this._desc=t,this.ngMetadataName="InjectionToken",this.\u0275prov=void 0,"number"==typeof e?this.__NG_ELEMENT_ID__=e:void 0!==e&&(this.\u0275prov=ke({token:this,providedIn:e.providedIn||"root",factory:e.factory}))}get multi(){return this}toString(){return`InjectionToken ${this._desc}`}}function Ul(i,t){i.forEach(e=>Array.isArray(e)?Ul(e,t):t(e))}function G_(i,t,e){t>=i.length?i.push(e):i.splice(t,0,e)}function pp(i,t){return t>=i.length-1?i.pop():i.splice(t,1)[0]}function Gd(i,t){const e=[];for(let n=0;n=0?i[1|n]=e:(n=~n,function IA(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 Wd(i,t){const e=Ic(i,t);if(e>=0)return i[1|e]}function Ic(i,t){return function gp(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),Ss=Md(zd("Optional"),8),xa=Md(zd("SkipSelf"),4);var Es=(()=>((Es=Es||{})[Es.Important=1]="Important",Es[Es.DashCase=2]="DashCase",Es))();const Cp=new Map;let vx=0;const iv="__ngContext__";function Hr(i,t){bs(t)?(i[iv]=t[Pl],function yx(i){Cp.set(i[Pl],i)}(t)):i[iv]=t}let sv;function ov(i,t){return sv(i,t)}function vh(i){const t=i[Bi];return xs(t)?t[Bi]:t}function av(i){return Dx(i[yc])}function lv(i){return Dx(i[ys])}function Dx(i){for(;null!==i&&!xs(i);)i=i[ys];return i}function Tr(i,t,e,n,r){if(null!=n){let s,o=!1;xs(n)?s=n:bs(n)&&(o=!0,n=n[Ka]);const a=I(n);0===i&&null!==e?null==r?Ox(t,e,a):Pc(t,e,a,r||null,!0):1===i&&null!==e?Pc(t,e,a,r||null,!0):2===i?function mv(i,t,e){const n=Ap(i,t);n&&function QA(i,t,e,n){i.removeChild(t,e,n)}(i,n,t,e)}(t,a,o):3===i&&t.destroyNode(a),null!=s&&function zx(i,t,e,n,r){const s=e[Kf];s!==I(e)&&Tr(t,i,n,s,r);for(let a=Ui;a0&&(i[e-1][ys]=n[ys]);const s=pp(i,Ui+t);!function WA(i,t){bh(i,t,t[yt],2,null,null),t[Ka]=null,t[ue]=null}(n[at],n);const o=s[Xs];null!==o&&o.detachView(s[at]),n[Bi]=null,n[ys]=null,n[fn]&=-65}return n}function Rx(i,t){if(!(128&t[fn])){const e=t[yt];e.destroyNode&&bh(i,t,e,3,null,null),function qA(i){let t=i[yc];if(!t)return hv(i[at],i);for(;t;){let e=null;if(bs(t))e=t[yc];else{const n=t[Ui];n&&(e=n)}if(!e){for(;t&&!t[ys]&&t!==i;)bs(t)&&hv(t[at],t),t=t[Bi];null===t&&(t=i),bs(t)&&hv(t[at],t),e=t&&t[ys]}t=e}}(t)}}function hv(i,t){if(!(128&t[fn])){t[fn]&=-65,t[fn]|=128,function ZA(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===qs.None||s===qs.Emulated)return null}return Ei(n,e)}}(i,t.parent,e)}function Pc(i,t,e,n,r){i.insertBefore(t,e,n,r)}function Ox(i,t,e){i.appendChild(t,e)}function Fx(i,t,e,n,r){null!==n?Pc(i,t,e,n,r):Ox(i,t,e)}function Ap(i,t){return i.parentNode(t)}function Lx(i,t,e){return Bx(i,t,e)}let fv,Rp,vv,Bx=function Nx(i,t,e){return 40&i.type?Ei(i,e):null};function yh(i,t,e,n){const r=kx(i,n,t),s=t[yt],a=Lx(n.parent||t[ue],n,t);if(null!=r)if(Array.isArray(e))for(let l=0;li,createScript:i=>i,createScriptURL:i=>i})}catch{}return Rp}()?.createHTML(i)||i}class Vl{constructor(t){this.changingThisBreaksApplicationSecurity=t}toString(){return`SafeValue must use [property]=binding: ${this.changingThisBreaksApplicationSecurity} (see ${qu})`}}class oD extends Vl{getTypeName(){return"HTML"}}class aD extends Vl{getTypeName(){return"Style"}}class lD extends Vl{getTypeName(){return"Script"}}class cD extends Vl{getTypeName(){return"URL"}}class Pp extends Vl{getTypeName(){return"ResourceURL"}}function Js(i){return i instanceof Vl?i.changingThisBreaksApplicationSecurity:i}function Ma(i,t){const e=function dD(i){return i instanceof Vl&&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 ${qu})`)}return e===t}class gD{constructor(t){this.inertDocumentHelper=t}getInertBodyElement(t){t=""+t;try{const e=(new window.DOMParser).parseFromString(jd(t),"text/html").body;return null===e?this.inertDocumentHelper.getInertBodyElement(t):(e.removeChild(e.firstChild),e)}catch{return null}}}class _D{constructor(t){this.defaultDoc=t,this.inertDocument=this.defaultDoc.implementation.createHTMLDocument("sanitization-inert")}getInertBodyElement(t){const e=this.inertDocument.createElement("template");return e.innerHTML=jd(t),e}}const vD=/^(?!javascript:)(?:[a-z0-9+.-]+:|[^&:\/?#]*(?:[\/?#]|$))/i;function xh(i){return(i=String(i)).match(vD)?i:"unsafe:"+i}function Ca(i){const t={};for(const e of i.split(","))t[e]=!0;return t}function Oc(...i){const t={};for(const e of i)for(const n in e)e.hasOwnProperty(n)&&(t[n]=!0);return t}const xv=Ca("area,br,col,hr,img,wbr"),wv=Ca("colgroup,dd,dt,li,p,tbody,td,tfoot,th,thead,tr"),Mv=Ca("rp,rt"),Cv=Oc(xv,Oc(wv,Ca("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")),Oc(Mv,Ca("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")),Oc(Mv,wv)),Yd=Ca("background,cite,href,itemtype,longdesc,poster,src,xlink:href"),qx=Oc(Yd,Ca("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"),Ca("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")),Ev=Ca("script,style,template");class Xx{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(!Cv.hasOwnProperty(e))return this.sanitizedSomething=!0,!Ev.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();Cv.hasOwnProperty(e)&&!xv.hasOwnProperty(e)&&(this.buf.push(""))}chars(t){this.buf.push(Kx(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 bD=/[\uD800-\uDBFF][\uDC00-\uDFFF]/g,xD=/([^\#-~ |!])/g;function Kx(i){return i.replace(/&/g,"&").replace(bD,function(t){return"&#"+(1024*(t.charCodeAt(0)-55296)+(t.charCodeAt(1)-56320)+65536)+";"}).replace(xD,function(t){return"&#"+t.charCodeAt(0)+";"}).replace(//g,">")}let Fp;function Zx(i,t){let e=null;try{Fp=Fp||function Yx(i){const t=new _D(i);return function Op(){try{return!!(new window.DOMParser).parseFromString(jd(""),"text/html")}catch{return!1}}()?new gD(t):t}(i);let n=t?String(t):"";e=Fp.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=Fp.getInertBodyElement(n)}while(n!==s);return jd((new Xx).sanitizeChildren(Av(e)||e))}finally{if(e){const n=Av(e)||e;for(;n.firstChild;)n.removeChild(n.firstChild)}}}function Av(i){return"content"in i&&function wD(i){return i.nodeType===Node.ELEMENT_NODE&&"TEMPLATE"===i.nodeName}(i)?i.content:null}var Kn=(()=>((Kn=Kn||{})[Kn.NONE=0]="NONE",Kn[Kn.HTML=1]="HTML",Kn[Kn.STYLE=2]="STYLE",Kn[Kn.SCRIPT=3]="SCRIPT",Kn[Kn.URL=4]="URL",Kn[Kn.RESOURCE_URL=5]="RESOURCE_URL",Kn))();function Lp(i){const t=function xi(){const i=Se();return i&&i[oi]}();return t?t.sanitize(Kn.URL,i)||"":Ma(i,"URL")?Js(i):xh(Qt(i))}const Np=new me("ENVIRONMENT_INITIALIZER"),rl=new me("INJECTOR",-1),Jx=new me("INJECTOR_DEF_TYPES");class ew{get(t,e=Rl){if(e===Rl){const n=new Error(`NullInjectorError: No provider for ${pi(t)}!`);throw n.name="NullInjectorError",n}return e}}function AD(...i){return{\u0275providers:tw(0,i),\u0275fromNgModule:!0}}function tw(i,...t){const e=[],n=new Set;let r;return Ul(t,s=>{const o=s;Dv(o,e,[],n)&&(r||(r=[]),r.push(o))}),void 0!==r&&Bp(r,e),e}function Bp(i,t){for(let e=0;e{t.push(s)})}}function Dv(i,t,e,n){if(!(i=Pt(i)))return!1;let r=null,s=p_(i);const o=!s&&Hn(i);if(s||o){if(o&&!o.standalone)return!1;r=i}else{const l=i.ngModule;if(s=p_(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)Dv(c,t,e,n)}}else{if(!s)return!1;{if(null!=s.imports&&!a){let c;n.add(r);try{Ul(s.imports,d=>{Dv(d,t,e,n)&&(c||(c=[]),c.push(d))})}finally{}void 0!==c&&Bp(c,t)}if(!a){const c=Qa(r)||(()=>new r);t.push({provide:r,useFactory:c,deps:$n},{provide:Jx,useValue:r,multi:!0},{provide:Np,useValue:()=>ee(r),multi:!0})}const l=s.providers;null==l||a||Up(l,d=>{t.push(d)})}}return r!==i&&void 0!==i.providers}function Up(i,t){for(let e of i)ju(e)&&(e=e.\u0275providers),Array.isArray(e)?Up(e,t):t(e)}const Vp=li({provide:String,useValue:li});function wi(i){return null!==i&&"object"==typeof i&&Vp in i}function Lc(i){return"function"==typeof i}const Iv=new me("Set Injector scope."),zp={},TD={};let Rv;function wh(){return void 0===Rv&&(Rv=new ew),Rv}class to{}class Hp extends to{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,Pv(t,o=>this.processProvider(o)),this.records.set(rl,$o(void 0,this)),r.has("environment")&&this.records.set(to,$o(void 0,this));const s=this.records.get(Iv);null!=s&&"string"==typeof s.value&&this.scopes.add(s.value),this.injectorDefTypes=new Set(this.get(Jx.multi,$n,Ot.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=wd(this),n=Ys(void 0);try{return t()}finally{wd(e),Ys(n)}}get(t,e=Rl,n=Ot.Default){this.assertNotDestroyed(),n=jf(n);const r=wd(this),s=Ys(void 0);try{if(!(n&Ot.SkipSelf)){let a=this.records.get(t);if(void 0===a){const l=function kD(i){return"function"==typeof i||"object"==typeof i&&i instanceof me}(t)&&Gf(t);a=l&&this.injectableDefInScope(l)?$o(kv(t),zp):null,this.records.set(t,a)}if(null!=a)return this.hydrate(t,a)}return(n&Ot.Self?wh():this.parent).get(t,e=n&Ot.Optional&&e===Rl?null:e)}catch(o){if("NullInjectorError"===o.name){if((o[mi]=o[mi]||[]).unshift(pi(t)),r)throw o;return function v_(i,t,e,n){const r=i[mi];throw t[Wf]&&r.unshift(t[Wf]),i.message=function I0(i,t,e,n=null){i=i&&"\n"===i.charAt(0)&&i.charAt(1)==eA?i.slice(2):i;let r=pi(t);if(Array.isArray(t))r=t.map(pi).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):pi(a)))}r=`{${s.join(", ")}}`}return`${e}${n?"("+n+")":""}[${r}]: ${i.replace(g_,"\n ")}`}("\n"+i.message,r,e,n),i[kl]=r,i[mi]=null,i}(o,t,"R3InjectorError",this.source)}throw o}finally{Ys(s),wd(r)}}resolveInjectorInitializers(){const t=wd(this),e=Ys(void 0);try{const n=this.get(Np.multi,$n,Ot.Self);for(const r of n)r()}finally{wd(t),Ys(e)}}toString(){const t=[],e=this.records;for(const n of e.keys())t.push(pi(n));return`R3Injector[${t.join(", ")}]`}assertNotDestroyed(){if(this._destroyed)throw new pe(205,!1)}processProvider(t){let e=Lc(t=Pt(t))?t:Pt(t&&t.provide);const n=function Gp(i){return wi(i)?$o(void 0,i.useValue):$o(As(i),zp)}(t);if(Lc(t)||!0!==t.multi)this.records.get(e);else{let r=this.records.get(e);r||(r=$o(void 0,zp,!0),r.factory=()=>Yf(r.multi),this.records.set(e,r)),e=t,r.multi.push(t)}this.records.set(e,n)}hydrate(t,e){return e.value===zp&&(e.value=TD,e.value=e.factory()),"object"==typeof e.value&&e.value&&function RD(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=Pt(t.providedIn);return"string"==typeof e?"any"===e||this.scopes.has(e):this.injectorDefTypes.has(e)}}function kv(i){const t=Gf(i),e=null!==t?t.factory:Qa(i);if(null!==e)return e;if(i instanceof me)throw new pe(204,!1);if(i instanceof Function)return function nw(i){const t=i.length;if(t>0)throw Gd(t,"?"),new pe(204,!1);const e=function Xu(i){return i&&(i[xd]||i[m_])||null}(i);return null!==e?()=>e.factory(i):()=>new i}(i);throw new pe(204,!1)}function As(i,t,e){let n;if(Lc(i)){const r=Pt(i);return Qa(r)||kv(r)}if(wi(i))n=()=>Pt(i.useValue);else if(function Tv(i){return!(!i||!i.useFactory)}(i))n=()=>i.useFactory(...Yf(i.deps||[]));else if(function Pi(i){return!(!i||!i.useExisting)}(i))n=()=>ee(Pt(i.useExisting));else{const r=Pt(i&&(i.useClass||i.provide));if(!function ID(i){return!!i.deps}(i))return Qa(r)||kv(r);n=()=>new r(...Yf(i.deps))}return n}function $o(i,t,e=!1){return{factory:i,value:t,multi:e?[]:void 0}}function Pv(i,t){for(const e of i)Array.isArray(e)?Pv(e,t):e&&ju(e)?Pv(e.\u0275providers,t):t(e)}class PD{}class Ov{}class bo{resolveComponentFactory(t){throw function sl(i){const t=Error(`No component factory found for ${pi(i)}. Did you add it to @NgModule.entryComponents?`);return t.ngComponent=i,t}(t)}}let Hl=(()=>{class i{}return i.NULL=new bo,i})();function FD(){return Fn(Er(),Se())}function Fn(i,t){return new mt(Ei(i,t))}let mt=(()=>{class i{constructor(e){this.nativeElement=e}}return i.__NG_ELEMENT_ID__=FD,i})();function iw(i){return i instanceof mt?i.nativeElement:i}class Gl{}let ol=(()=>{class i{}return i.__NG_ELEMENT_ID__=()=>function LD(){const i=Se(),e=ws(Er().index,i);return(bs(e)?e:i)[yt]}(),i})(),ND=(()=>{class i{}return i.\u0275prov=ke({token:i,providedIn:"root",factory:()=>null}),i})();class Nc{constructor(t){this.full=t,this.major=t.split(".")[0],this.minor=t.split(".")[1],this.patch=t.split(".").slice(2).join(".")}}const BD=new Nc("15.2.10"),Fv={},Lv="ngOriginalError";function Nv(i){return i[Lv]}class al{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&&Nv(t);for(;e&&Nv(e);)e=Nv(e);return e||null}}function ll(i){return i instanceof Function?i():i}function sw(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 ow="ng-template";function jD(i,t,e){let n=0,r=!0;for(;ns?"":r[h+1].toLowerCase();const m=8&n?p:null;if(m&&-1!==sw(m,c,0)||2&n&&c!==p){if(Wo(n))return!1;o=!0}}}}else{if(!o&&!Wo(n)&&!Wo(l))return!1;if(o&&Wo(l))continue;o=!1,n=l|1&n}}return Wo(n)||o}function Wo(i){return 0==(1&i)}function aw(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&&!Wo(o)&&(t+=Bc(s,r),r=""),n=o,s=s||!Wo(n);e++}return""!==r&&(t+=Bc(s,r)),t}const sn={};function G(i){Hv(zn(),Se(),Xn()+i,!1)}function Hv(i,t,e,n){if(!n)if(3==(3&t[fn])){const s=i.preOrderCheckHooks;null!==s&&sp(t,s,e)}else{const s=i.preOrderHooks;null!==s&&op(t,s,0,e)}tl(e)}function dw(i,t=null,e=null,n){const r=uw(i,t,e,n);return r.resolveInjectorInitializers(),r}function uw(i,t=null,e=null,n,r=new Set){const s=[e||$n,AD(i)];return n=n||("object"==typeof i?void 0:pi(i)),new Hp(s,t||wh(),n||null,r)}let $i=(()=>{class i{static create(e,n){if(Array.isArray(e))return dw({name:""},n,e,"");{const r=e.name??"";return dw({name:r},e.parent,e.providers,r)}}}return i.THROW_IF_NOT_FOUND=Rl,i.NULL=new ew,i.\u0275prov=ke({token:i,providedIn:"any",factory:()=>ee(rl)}),i.__NG_ELEMENT_ID__=-1,i})();function E(i,t=Ot.Default){const e=Se();return null===e?ee(i,t):V_(Er(),e,Pt(i),t)}function xo(){throw new Error("invalid")}function _w(i,t){const e=i.contentQueries;if(null!==e)for(let n=0;nyi&&Hv(i,t,yi,!1),Qr(o?2:0,r),e(n,r)}finally{tl(s),Qr(o?3:1,r)}}function Zv(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,Ch(i,e,r.hostVars,sn),r)}function be(i,t,e,n,r,s){const o=Ei(i,t);!function Xe(i,t,e,n,r,s,o){if(null==s)i.removeAttribute(t,r,e);else{const a=null==o?Qt(s):o(s,n||"",r);i.setAttribute(t,r,a,e)}}(t[yt],o,s,i.value,e,n,r)}function vt(i,t,e,n,r,s){const o=s[t];if(null!==o){const a=n.setInput;for(let l=0;l0&&rs(e)}}function rs(i){for(let n=av(i);null!==n;n=lv(n))for(let r=Ui;r0&&rs(s)}const e=i[at].components;if(null!==e)for(let n=0;n0&&rs(r)}}function ss(i,t){const e=ws(t,i),n=e[at];(function io(i,t){for(let e=t.length;e-1&&(uv(t,n),pp(e,n))}this._attachedToViewContainer=!1}Rx(this._lView[at],this._lView)}onDestroy(t){bw(this._lView[at],this._lView,null,t)}markForCheck(){Ts(this._cdRefInjectingView||this._lView)}detach(){this._lView[fn]&=-65}reattach(){this._lView[fn]|=64}detectChanges(){wo(this._lView[at],this._lView,this.context)}checkNoChanges(){}attachToViewContainerRef(){if(this._appRef)throw new pe(902,!1);this._attachedToViewContainer=!0}detachFromAppRef(){this._appRef=null,function YA(i,t){bh(i,t,t[yt],2,null,null)}(this._lView[at],this._lView)}attachToAppRef(t){if(this._attachedToViewContainer)throw new pe(902,!1);this._appRef=t}}class y8 extends ny{constructor(t){super(t),this._view=t}detectChanges(){const t=this._view;wo(t[at],t,t[Be],!1)}checkNoChanges(){}get context(){return null}}class KF extends Hl{constructor(t){super(),this.ngModule=t}resolveComponentFactory(t){const e=Hn(t);return new iy(e,this.ngModule)}}function ZF(i){const t=[];for(let e in i)i.hasOwnProperty(e)&&t.push({propName:i[e],templateName:e});return t}class x8{constructor(t,e){this.injector=t,this.parentInjector=e}get(t,e,n){n=jf(n);const r=this.injector.get(t,Fv,n);return r!==Fv||e===Fv?r:this.parentInjector.get(t,e,n)}}class iy extends Ov{get inputs(){return ZF(this.componentDef.inputs)}get outputs(){return ZF(this.componentDef.outputs)}constructor(t,e){super(),this.componentDef=t,this.ngModule=e,this.componentType=t.type,this.selector=function e1(i){return i.map(JD).join(",")}(t.selectors),this.ngContentSelectors=t.ngContentSelectors?t.ngContentSelectors:[],this.isBoundToModule=!!e}create(t,e,n,r){let s=(r=r||this.ngModule)instanceof to?r:r?.injector;s&&null!==this.componentDef.getStandaloneInjector&&(s=this.componentDef.getStandaloneInjector(s)||s);const o=s?new x8(t,s):t,a=o.get(Gl,null);if(null===a)throw new pe(407,!1);const l=o.get(ND,null),c=a.createRenderer(null,this.componentDef),d=this.componentDef.selectors[0][0]||"div",h=n?function M1(i,t,e){return i.selectRootElement(t,e===qs.ShadowDom)}(c,n,this.componentDef.encapsulation):Ep(c,d,function b8(i){const t=i.toLowerCase();return"svg"===t?kd:"math"===t?"math":null}(d)),p=this.componentDef.onPush?288:272,m=ey(0,null,null,1,0,null,null,null,null,null),g=Mh(null,m,null,p,null,null,a,c,l,o,null);let b,v;rp(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 M8(i,t){const e=i[at],n=yi;return i[n]=t,Zd(e,n,2,"#host",null)}(g,h),F=function C8(i,t,e,n,r,s,o,a){const l=r[at];!function S8(i,t,e,n){for(const r of i)t.mergedAttrs=Sc(t.mergedAttrs,r.hostAttrs);null!==t.mergedAttrs&&(Cw(t,t.mergedAttrs,!0),null!==e&&Gx(n,e,t))}(n,i,t,o);const c=s.createRenderer(t,e),d=Mh(r,yw(e),null,e.onPush?32:16,r[i.index],i,s,c,a||null,null,null);return l.firstCreatePass&&P(l,i,n.length-1),Di(r,d),r[i.index]=d}(C,h,y,M,g,a,c);v=B0(m,yi),h&&function A8(i,t,e,n){if(n)L_(i,e,["ng-version",BD.full]);else{const{attrs:r,classes:s}=function t1(i){const t=[],e=[];let n=1,r=2;for(;n0&&Hx(i,e,s.join(" "))}}(c,y,h,n),void 0!==e&&function D8(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=Sc(r.hostAttrs,e=Sc(e,r.hostAttrs))}}(n)}function P1(i){return i===Xa?{}:i===$n?[]:i}function R8(i,t){const e=i.viewQuery;i.viewQuery=e?(n,r)=>{t(n,r),e(n,r)}:t}function k8(i,t){const e=i.contentQueries;i.contentQueries=e?(n,r,s)=>{t(n,r,s),e(n,r,s)}:t}function P8(i,t){const e=i.hostBindings;i.hostBindings=e?(n,r)=>{t(n,r),e(n,r)}:t}function Ew(i){return!!O1(i)&&(Array.isArray(i)||!(i instanceof Map)&&Symbol.iterator in i)}function O1(i){return null!==i&&("function"==typeof i||"object"==typeof i)}function $l(i,t,e){return i[t]=e}function Is(i,t,e){return!Object.is(i[t],e)&&(i[t]=e,!0)}function Eh(i,t,e,n){const r=Is(i,t,e);return Is(i,t+1,n)||r}function Dt(i,t,e,n){const r=Se();return Is(r,Fl(),t)&&(zn(),be(Ai(),r,i,t,e,n)),Dt}function jp(i,t,e,n){return Is(i,Fl(),e)?t+Qt(e)+n:sn}function Yp(i,t,e,n,r,s){const a=Eh(i,function Ja(){return kt.lFrame.bindingIndex}(),e,r);return Ks(2),a?t+Qt(e)+n+Qt(r)+s:sn}function fe(i,t,e,n,r,s,o,a){const l=Se(),c=zn(),d=i+yi,h=c.firstCreatePass?function G8(i,t,e,n,r,s,o,a,l){const c=t.consts,d=Zd(t,i,4,o||null,Ol(c,a));ty(t,e,d,Ol(c,l)),Nd(t,d);const h=d.tView=ey(2,d,n,r,s,t.directiveRegistry,t.pipeRegistry,null,t.schemas,c);return null!==t.queries&&(t.queries.template(t,d),h.queries=t.queries.embeddedTView(d)),d}(d,c,l,t,e,n,r,s,o):c.data[d];ma(h,!1);const p=l[yt].createComment("");yh(c,l,p,h),Hr(p,l),Di(l,l[d]=mn(p,l,p,h)),bc(h)&&Qv(c,l,h),null!=o&&Jv(l,h,a)}function Zi(i){return Od(function gA(){return kt.lFrame.contextLView}(),yi+i)}function U(i,t,e){const n=Se();return Is(n,Fl(),t)&&no(zn(),Ai(),n,i,t,n[yt],e,!1),U}function F1(i,t,e,n,r){const o=r?"class":"style";k1(i,e,t.inputs[o],o,n)}function W(i,t,e,n){const r=Se(),s=zn(),o=yi+i,a=r[yt],l=s.firstCreatePass?function W8(i,t,e,n,r,s){const o=t.consts,l=Zd(t,i,2,n,Ol(o,r));return ty(t,e,l,Ol(o,s)),null!==l.attrs&&Cw(l,l.attrs,!1),null!==l.mergedAttrs&&Cw(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]=Ep(a,t,function Y0(){return kt.lFrame.currentNamespace}()),d=bc(l);return ma(l,!0),Gx(a,c,l),32!=(32&l.flags)&&yh(s,r,c,l),0===function uA(){return kt.lFrame.elementDepthCount}()&&Hr(c,r),function hA(){kt.lFrame.elementDepthCount++}(),d&&(Qv(s,r,l),Zv(s,l,r)),null!==n&&Jv(r,l),W}function j(){let i=Er();D_()?T_():(i=i.parent,ma(i,!1));const t=i;!function fA(){kt.lFrame.elementDepthCount--}();const e=zn();return e.firstCreatePass&&(Nd(e,i),Qf(i)&&e.queries.elementEnd(i)),null!=t.classesWithoutHost&&function wA(i){return 0!=(8&i.flags)}(t)&&F1(e,t,Se(),t.classesWithoutHost,!0),null!=t.stylesWithoutHost&&function F_(i){return 0!=(16&i.flags)}(t)&&F1(e,t,Se(),t.stylesWithoutHost,!1),j}function De(i,t,e,n){return W(i,t,e,n),j(),De}function Gr(i,t,e){const n=Se(),r=zn(),s=i+yi,o=r.firstCreatePass?function j8(i,t,e,n,r){const s=t.consts,o=Ol(s,n),a=Zd(t,i,8,"ng-container",o);return null!==o&&Cw(a,o,!0),ty(t,e,a,Ol(s,r)),null!==t.queries&&t.queries.elementStart(t,a),a}(s,r,n,t,e):r.data[s];ma(o,!0);const a=n[s]=n[yt].createComment("");return yh(r,n,a,o),Hr(a,n),bc(o)&&(Qv(r,n,o),Zv(r,o,n)),null!=e&&Jv(n,o),Gr}function $r(){let i=Er();const t=zn();return D_()?T_():(i=i.parent,ma(i,!1)),t.firstCreatePass&&(Nd(t,i),Qf(i)&&t.queries.elementEnd(i)),$r}function sy(i,t,e){return Gr(i,t,e),$r(),sy}function di(){return Se()}function oy(i){return!!i&&"function"==typeof i.then}function uL(i){return!!i&&"function"==typeof i.subscribe}const L1=uL;function Ue(i,t,e,n){const r=Se(),s=zn(),o=Er();return hL(s,r,r[yt],o,i,t,n),Ue}function N1(i,t){const e=Er(),n=Se(),r=zn();return hL(r,n,qF(rh(r.data),e,n),e,i,t),N1}function hL(i,t,e,n,r,s,o){const a=bc(n),c=i.firstCreatePass&&YF(i),d=t[Be],h=jF(t);let p=!0;if(3&n.type||o){const b=Ei(n,t),v=o?o(b):b,y=h.length,M=o?C=>o(I(C[n.index])):n.index;let x=null;if(!o&&a&&(x=function Y8(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=pL(n,t,d,s,!1);const C=e.listen(v,r,s);h.push(s,C),c&&c.push(r,M,y,y+1)}}else s=pL(n,t,d,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?ws(i.index,t):t);let l=fL(t,e,n,o),c=s.__ngNextListenerFn__;for(;c;)l=fL(t,e,c,o)&&l,c=c.__ngNextListenerFn__;return r&&!1===l&&(o.preventDefault(),o.returnValue=!1),l}}function he(i=1){return function yA(i){return(kt.lFrame.contextLView=function j0(i,t){for(;i>0;)t=t[Sr],i--;return t}(i,kt.lFrame.contextLView))[Be]}(i)}function q8(i,t){let e=null;const n=function XD(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 V1(i){return 2|i}function Ah(i){return(131068&i)>>2}function z1(i,t){return-131069&i|t<<2}function H1(i){return 1|i}function ML(i,t,e,n,r){const s=i[e+1],o=null===t;let a=n?Jd(s):Ah(s),l=!1;for(;0!==a&&(!1===l||o);){const d=i[a+1];eW(i[a],t)&&(l=!0,i[a+1]=n?H1(d):V1(d)),a=n?Jd(d):Ah(d)}l&&(i[e+1]=n?V1(s):H1(s))}function eW(i,t){return null===i||null==t||(Array.isArray(i)?i[1]:i)===t||!(!Array.isArray(i)||"string"!=typeof t)&&Ic(i,t)>=0}const Ir={textEnd:0,key:0,keyEnd:0,value:0,valueEnd:0};function CL(i){return i.substring(Ir.key,Ir.keyEnd)}function SL(i,t){const e=Ir.textEnd;return e===t?-1:(t=Ir.keyEnd=function rW(i,t,e){for(;t32;)t++;return t}(i,Ir.key=t,e),em(i,t,e))}function em(i,t,e){for(;t=0;e=SL(t,e))Cs(i,CL(t),!0)}function cl(i,t,e,n){const r=Se(),s=zn(),o=Ks(2);s.firstUpdatePass&&RL(s,i,o,n),t!==sn&&Is(r,o,t)&&PL(s,s.data[Xn()],r,r[yt],i,r[o+1]=function gW(i,t){return null==i||""===i||("string"==typeof t?i+=t:"object"==typeof i&&(i=pi(Js(i)))),i}(t,e),n,o)}function IL(i,t){return t>=i.expandoStartIndex}function RL(i,t,e,n){const r=i.data;if(null===r[e+1]){const s=r[Xn()],o=IL(i,e);FL(s,n)&&null===t&&!o&&(t=!1),t=function cW(i,t,e,n){const r=rh(i);let s=n?t.residualClasses:t.residualStyles;if(null===r)0===(n?t.classBindings:t.styleBindings)&&(e=ay(e=G1(null,i,t,e,n),t.attrs,n),s=null);else{const o=t.directiveStylingLast;if(-1===o||i[o]!==r)if(e=G1(r,i,t,e,n),null===s){let l=function dW(i,t,e){const n=e?t.classBindings:t.styleBindings;if(0!==Ah(n))return i[Jd(n)]}(i,t,n);void 0!==l&&Array.isArray(l)&&(l=G1(null,i,t,l[1],n),l=ay(l,t.attrs,n),function uW(i,t,e,n){i[Jd(e?t.classBindings:t.styleBindings)]=n}(i,t,n,l))}else s=function hW(i,t,e){let n;const r=t.directiveEnd;for(let s=1+t.directiveStylingLast;s0)&&(c=!0)):d=e,r)if(0!==l){const p=Jd(i[a+1]);i[n+1]=Dw(p,a),0!==p&&(i[p+1]=z1(i[p+1],n)),i[a+1]=function K8(i,t){return 131071&i|t<<17}(i[a+1],n)}else i[n+1]=Dw(a,0),0!==a&&(i[a+1]=z1(i[a+1],n)),a=n;else i[n+1]=Dw(l,0),0===a?a=n:i[l+1]=z1(i[l+1],n),l=n;c&&(i[n+1]=V1(i[n+1])),ML(i,d,n,!0),ML(i,d,n,!1),function J8(i,t,e,n,r){const s=r?i.residualClasses:i.residualStyles;null!=s&&"string"==typeof t&&Ic(s,t)>=0&&(e[n+1]=H1(e[n+1]))}(t,d,i,n,s),o=Dw(a,l),s?t.classBindings=o:t.styleBindings=o}(r,s,t,e,o,n)}}function G1(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),d=c?l[1]:l,h=null===d;let p=e[r+1];p===sn&&(p=h?$n:void 0);let m=h?Wd(p,n):d===n?p:void 0;if(c&&!Tw(m)&&(m=Wd(l,n)),Tw(m)&&(a=m,o))return a;const g=i[r+1];r=o?Jd(g):Ah(g)}if(null!==t){let l=s?t.residualClasses:t.residualStyles;null!=l&&(a=Wd(l,n))}return a}function Tw(i){return void 0!==i}function FL(i,t){return 0!=(i.flags&(t?8:16))}function Ve(i,t=""){const e=Se(),n=zn(),r=i+yi,s=n.firstCreatePass?Zd(n,r,1,t,null):n.data[r],o=e[r]=function cv(i,t){return i.createText(t)}(e[yt],t);yh(n,e,o,s),ma(s,!1)}function _i(i){return Qi("",i,""),_i}function Qi(i,t,e){const n=Se(),r=jp(n,i,t,e);return r!==sn&&Uc(n,Xn(),r),Qi}function tm(i,t,e,n,r){const s=Se(),o=Yp(s,i,t,e,n,r);return o!==sn&&Uc(s,Xn(),o),tm}function GL(i,t,e){!function dl(i,t,e,n){const r=zn(),s=Ks(2);r.firstUpdatePass&&RL(r,null,s,n);const o=Se();if(e!==sn&&Is(o,s,e)){const a=r.data[Xn()];if(FL(a,n)&&!IL(r,s)){let l=n?a.classesWithoutHost:a.stylesWithoutHost;null!==l&&(e=Vf(l,e||"")),F1(r,a,o,e,n)}else!function mW(i,t,e,n,r,s,o,a){r===sn&&(r=$n);let l=0,c=0,d=0((rt=rt||{})[rt.LocaleId=0]="LocaleId",rt[rt.DayPeriodsFormat=1]="DayPeriodsFormat",rt[rt.DayPeriodsStandalone=2]="DayPeriodsStandalone",rt[rt.DaysFormat=3]="DaysFormat",rt[rt.DaysStandalone=4]="DaysStandalone",rt[rt.MonthsFormat=5]="MonthsFormat",rt[rt.MonthsStandalone=6]="MonthsStandalone",rt[rt.Eras=7]="Eras",rt[rt.FirstDayOfWeek=8]="FirstDayOfWeek",rt[rt.WeekendRange=9]="WeekendRange",rt[rt.DateFormat=10]="DateFormat",rt[rt.TimeFormat=11]="TimeFormat",rt[rt.DateTimeFormat=12]="DateTimeFormat",rt[rt.NumberSymbols=13]="NumberSymbols",rt[rt.NumberFormats=14]="NumberFormats",rt[rt.CurrencyCode=15]="CurrencyCode",rt[rt.CurrencySymbol=16]="CurrencySymbol",rt[rt.CurrencyName=17]="CurrencyName",rt[rt.Currencies=18]="Currencies",rt[rt.Directionality=19]="Directionality",rt[rt.PluralCase=20]="PluralCase",rt[rt.ExtraData=21]="ExtraData",rt))();const im="en-US";let t2=im;function j1(i,t,e,n,r){if(i=Pt(i),Array.isArray(i))for(let s=0;s>20;if(Lc(i)||!i.multi){const m=new Bd(l,r,E),g=q1(a,t,r?d:d+p,h);-1===g?(pn(ah(c,o),s,a),Y1(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=q1(a,t,d+p,h),g=q1(a,t,d,d+p),v=g>=0&&e[g];if(r&&!v||!r&&!(m>=0&&e[m])){pn(ah(c,o),s,a);const y=function Pj(i,t,e,n,r){const s=new Bd(i,e,E);return s.multi=[],s.index=t,s.componentProviders=0,A2(s,r,n&&!e),s}(r?kj:Rj,e.length,r,n,l);!r&&v&&(e[g].providerFactory=y),Y1(s,i,t.length,0),t.push(a),c.directiveStart++,c.directiveEnd++,r&&(c.providerIndexes+=1048576),e.push(y),o.push(y)}else Y1(s,i,m>-1?m:g,A2(e[r?g:m],l,!r&&n));!r&&n&&v&&e[g].componentProviders++}}}function Y1(i,t,e,n){const r=Lc(t),s=function DD(i){return!!i.useClass}(t);if(r||s){const l=(s?Pt(t.useClass):t).prototype.ngOnDestroy;if(l){const c=i.destroyHooks||(i.destroyHooks=[]);if(!r&&t.multi){const d=c.indexOf(e);-1===d?c.push(e,[n,l]):c[d+1].push(n,l)}else c.push(e,l)}}}function A2(i,t,e){return e&&i.componentProviders++,i.multi.push(t)-1}function q1(i,t,e,n){for(let r=e;r{e.providersResolver=(n,r)=>function Ij(i,t,e){const n=zn();if(n.firstCreatePass){const r=_o(i);j1(e,n.data,n.blueprint,r,!0),j1(t,n.data,n.blueprint,r,!1)}}(n,r?r(i):i,t)}}class rm{}class D2{}class T2 extends rm{constructor(t,e){super(),this._parent=e,this._bootstrapComponents=[],this.destroyCbs=[],this.componentFactoryResolver=new KF(this);const n=ur(t);this._bootstrapComponents=ll(n.bootstrap),this._r3Injector=uw(t,e,[{provide:rm,useValue:this},{provide:Hl,useValue:this.componentFactoryResolver}],pi(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 K1 extends D2{constructor(t){super(),this.moduleType=t}create(t){return new T2(this.moduleType,t)}}class Fj extends rm{constructor(t,e,n){super(),this.componentFactoryResolver=new KF(this),this.instance=null;const r=new Hp([...t,{provide:rm,useValue:this},{provide:Hl,useValue:this.componentFactoryResolver}],e||wh(),n,new Set(["environment"]));this.injector=r,r.resolveInjectorInitializers()}destroy(){this.injector.destroy()}onDestroy(t){this.injector.onDestroy(t)}}function Fw(i,t,e=null){return new Fj(i,t,e).injector}let Lj=(()=>{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=tw(0,e.type),r=n.length>0?Fw([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=ke({token:i,providedIn:"environment",factory:()=>new i(ee(to))}),i})();function Z1(i){i.getStandaloneInjector=t=>t.get(Lj).getOrCreateStandaloneInjector(i)}function so(i,t,e){const n=Vr()+i,r=Se();return r[n]===sn?$l(r,n,e?t.call(e):t()):function ry(i,t){return i[t]}(r,n)}function sm(i,t,e,n){return N2(Se(),Vr(),i,t,e,n)}function L2(i,t,e,n,r,s,o){return function V2(i,t,e,n,r,s,o,a,l){const c=t+e;return function Sa(i,t,e,n,r,s){const o=Eh(i,t,e,n);return Eh(i,t+2,r,s)||o}(i,c,r,s,o,a)?$l(i,c+4,l?n.call(l,r,s,o,a):n(r,s,o,a)):fy(i,c+4)}(Se(),Vr(),i,t,e,n,r,s,o)}function fy(i,t){const e=i[t];return e===sn?void 0:e}function N2(i,t,e,n,r,s){const o=t+e;return Is(i,o,r)?$l(i,o+1,s?n.call(s,r):n(r)):fy(i,o+1)}function Ct(i,t){const e=zn();let n;const r=i+yi;e.firstCreatePass?(n=function Qj(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=Qa(n.type)),o=Ys(E);try{const a=cp(!1),l=s();return cp(a),function $8(i,t,e,n){e>=i.data.length&&(i.data[e]=null,i.blueprint[e]=null),t[e]=n}(e,Se(),r,l),l}finally{Ys(o)}}function Tt(i,t,e){const n=i+yi,r=Se(),s=Od(r,n);return py(r,n)?N2(r,Vr(),t,s.transform,e,s):s.transform(e)}function J1(i,t,e,n){const r=i+yi,s=Se(),o=Od(s,r);return py(s,r)?function B2(i,t,e,n,r,s,o){const a=t+e;return Eh(i,a,r,s)?$l(i,a+2,o?n.call(o,r,s):n(r,s)):fy(i,a+2)}(s,Vr(),t,o.transform,e,n,o):o.transform(e,n)}function py(i,t){return i[at].data[t].pure}function eT(i){return t=>{setTimeout(i,void 0,t)}}const We=class n6 extends Re{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=eT(s),r&&(r=eT(r)),o&&(o=eT(o)));const a=super.subscribe({next:r,error:s,complete:o});return t instanceof Zt&&t.add(a),a}};function r6(){return this._results[Symbol.iterator]()}class om{get changes(){return this._changes||(this._changes=new We)}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=om.prototype;e[Symbol.iterator]||(e[Symbol.iterator]=r6)}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 Ar(i){return i.flat(Number.POSITIVE_INFINITY)}(t);(this._changesDetected=!function fp(i,t,e){if(i.length!==t.length)return!1;for(let n=0;n{class i{}return i.__NG_ELEMENT_ID__=a6,i})();const s6=Mo,o6=class extends s6{constructor(t,e,n){super(),this._declarationLView=t,this._declarationTContainer=e,this.elementRef=n}createEmbeddedView(t,e){const n=this._declarationTContainer.tView,r=Mh(this._declarationLView,n,t,16,null,n.declTNode,null,null,null,null,e||null);r[nh]=this._declarationLView[this._declarationTContainer.index];const o=this._declarationLView[Xs];return null!==o&&(r[Xs]=o.createEmbeddedView(n)),Sh(n,r,t),new ny(r)}};function a6(){return Lw(Er(),Se())}function Lw(i,t){return 4&i.type?new o6(t,i,Fn(i,t)):null}let Wr=(()=>{class i{}return i.__NG_ELEMENT_ID__=l6,i})();function l6(){return $2(Er(),Se())}const c6=Wr,H2=class extends c6{constructor(t,e,n){super(),this._lContainer=t,this._hostTNode=e,this._hostLView=n}get element(){return Fn(this._hostTNode,this._hostLView)}get injector(){return new Ac(this._hostTNode,this._hostLView)}get parentInjector(){const t=ch(this._hostTNode,this._hostLView);if(lp(t)){const e=oh(t,this._hostLView),n=sh(t);return new Ac(e[at].data[n+8],e)}return new Ac(null,this._hostLView)}clear(){for(;this.length>0;)this.remove(this.length-1)}get(t){const e=G2(this._lContainer);return null!==e&&e[t]||null}get length(){return this._lContainer.length-Ui}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 hh(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 iy(Hn(t)),c=n||this.parentInjector;if(!s&&null==l.ngModule){const p=(o?c:this.parentInjector).get(to,null);p&&(s=p)}const d=l.create(c,r,void 0,s);return this.insert(d.hostView,a),d}insert(t,e){const n=t._lView,r=n[at];if(function dA(i){return xs(i[Bi])}(n)){const d=this.indexOf(t);if(-1!==d)this.detach(d);else{const h=n[Bi],p=new H2(h,h[ue],h[Bi]);p.detach(p.indexOf(t))}}const s=this._adjustIndex(e),o=this._lContainer;!function dv(i,t,e,n){const r=Ui+n,s=e.length;n>0&&(e[r-1][ys]=t),n0)n.push(o[a/2]);else{const c=s[a+1],d=t[-l];for(let h=Ui;h{class i{constructor(e){this.appInits=e,this.resolve=Bw,this.reject=Bw,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)(ee(Uw,8))},i.\u0275prov=ke({token:i,factory:i.\u0275fac,providedIn:"root"}),i})();const cm=new me("AppId",{providedIn:"root",factory:function fN(){return`${hT()}${hT()}${hT()}`}});function hT(){return String.fromCharCode(97+Math.floor(25*Math.random()))}const pN=new me("Platform Initializer"),fT=new me("Platform ID",{providedIn:"platform",factory:()=>"unknown"}),Rr=new me("AnimationModuleType");let F6=(()=>{class i{log(e){console.log(e)}warn(e){console.warn(e)}}return i.\u0275fac=function(e){return new(e||i)},i.\u0275prov=ke({token:i,factory:i.\u0275fac,providedIn:"platform"}),i})();const ql=new me("LocaleId",{providedIn:"root",factory:()=>Ft(ql,Ot.Optional|Ot.SkipSelf)||function L6(){return typeof $localize<"u"&&$localize.locale||im}()});class B6{constructor(t,e){this.ngModuleFactory=t,this.componentFactories=e}}let mN=(()=>{class i{compileModuleSync(e){return new K1(e)}compileModuleAsync(e){return Promise.resolve(this.compileModuleSync(e))}compileModuleAndAllComponentsSync(e){const n=this.compileModuleSync(e),s=ll(ur(e).declarations).reduce((o,a)=>{const l=Hn(a);return l&&o.push(new iy(l)),o},[]);return new B6(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=ke({token:i,factory:i.\u0275fac,providedIn:"root"}),i})();const z6=(()=>Promise.resolve(0))();function pT(i){typeof Zone>"u"?z6.then(()=>{i&&i.apply(null,null)}):Zone.current.scheduleMicroTask("scheduleMicrotask",i)}class ft{constructor({enableLongStackTrace:t=!1,shouldCoalesceEventChangeDetection:e=!1,shouldCoalesceRunChangeDetection:n=!1}){if(this.hasPendingMacrotasks=!1,this.hasPendingMicrotasks=!1,this.isStable=!0,this.onUnstable=new We(!1),this.onMicrotaskEmpty=new We(!1),this.onStable=new We(!1),this.onError=new We(!1),typeof Zone>"u")throw new pe(908,!1);Zone.assertZonePatched();const r=this;r._nesting=0,r._outer=r._inner=Zone.current,Zone.TaskTrackingZoneSpec&&(r._inner=r._inner.fork(new Zone.TaskTrackingZoneSpec)),t&&Zone.longStackTraceZoneSpec&&(r._inner=r._inner.fork(Zone.longStackTraceZoneSpec)),r.shouldCoalesceEventChangeDetection=!n&&e,r.shouldCoalesceRunChangeDetection=n,r.lastRequestAnimationFrameId=-1,r.nativeRequestAnimationFrame=function H6(){let i=Rn.requestAnimationFrame,t=Rn.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 W6(i){const t=()=>{!function $6(i){i.isCheckStableRunning||-1!==i.lastRequestAnimationFrameId||(i.lastRequestAnimationFrameId=i.nativeRequestAnimationFrame.call(Rn,()=>{i.fakeTopEventTask||(i.fakeTopEventTask=Zone.root.scheduleEventTask("fakeTopEventTask",()=>{i.lastRequestAnimationFrameId=-1,gT(i),i.isCheckStableRunning=!0,mT(i),i.isCheckStableRunning=!1},void 0,()=>{},()=>{})),i.fakeTopEventTask.invoke()}),gT(i))}(i)};i._inner=i._inner.fork({name:"angular",properties:{isAngularZone:!0},onInvokeTask:(e,n,r,s,o,a)=>{try{return vN(i),e.invokeTask(r,s,o,a)}finally{(i.shouldCoalesceEventChangeDetection&&"eventTask"===s.type||i.shouldCoalesceRunChangeDetection)&&t(),yN(i)}},onInvoke:(e,n,r,s,o,a,l)=>{try{return vN(i),e.invoke(r,s,o,a,l)}finally{i.shouldCoalesceRunChangeDetection&&t(),yN(i)}},onHasTask:(e,n,r,s)=>{e.hasTask(r,s),n===r&&("microTask"==s.change?(i._hasPendingMicrotasks=s.microTask,gT(i),mT(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(!ft.isInAngularZone())throw new pe(909,!1)}static assertNotInAngularZone(){if(ft.isInAngularZone())throw new pe(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,G6,Bw,Bw);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 G6={};function mT(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 gT(i){i.hasPendingMicrotasks=!!(i._hasPendingMicrotasks||(i.shouldCoalesceEventChangeDetection||i.shouldCoalesceRunChangeDetection)&&-1!==i.lastRequestAnimationFrameId)}function vN(i){i._nesting++,i.isStable&&(i.isStable=!1,i.onUnstable.emit(null))}function yN(i){i._nesting--,mT(i)}class j6{constructor(){this.hasPendingMicrotasks=!1,this.hasPendingMacrotasks=!1,this.isStable=!0,this.onUnstable=new We,this.onMicrotaskEmpty=new We,this.onStable=new We,this.onError=new We}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 bN=new me(""),zw=new me("");let yT,_T=(()=>{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,yT||(function Y6(i){yT=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:()=>{ft.assertNotInAngularZone(),pT(()=>{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())pT(()=>{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)(ee(ft),ee(vT),ee(zw))},i.\u0275prov=ke({token:i,factory:i.\u0275fac}),i})(),vT=(()=>{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 yT?.findTestabilityInTree(this,e,n)??null}}return i.\u0275fac=function(e){return new(e||i)},i.\u0275prov=ke({token:i,factory:i.\u0275fac,providedIn:"platform"}),i})();const zc=!1;let eu=null;const xN=new me("AllowMultipleToken"),bT=new me("PlatformDestroyListeners"),wN=new me("appBootstrapListener");class MN{constructor(t,e){this.name=t,this.token=e}}function SN(i,t,e=[]){const n=`Platform: ${t}`,r=new me(n);return(s=[])=>{let o=xT();if(!o||o.injector.get(xN,!1)){const a=[...e,...s,{provide:r,useValue:!0}];i?i(a):function K6(i){if(eu&&!eu.get(xN,!1))throw new pe(400,!1);eu=i;const t=i.get(AN);(function CN(i){const t=i.get(pN,null);t&&t.forEach(e=>e())})(i)}(function EN(i=[],t){return $i.create({name:t,providers:[{provide:Iv,useValue:"platform"},{provide:bT,useValue:new Set([()=>eu=null])},...i]})}(a,n))}return function Q6(i){const t=xT();if(!t)throw new pe(401,!1);return t}()}}function xT(){return eu?.get(AN)??null}let AN=(()=>{class i{constructor(e){this._injector=e,this._modules=[],this._destroyListeners=[],this._destroyed=!1}bootstrapModuleFactory(e,n){const r=function TN(i,t){let e;return e="noop"===i?new j6:("zone.js"===i?void 0:i)||new ft(t),e}(n?.ngZone,function DN(i){return{enableLongStackTrace:!1,shouldCoalesceEventChangeDetection:!(!i||!i.ngZoneEventCoalescing)||!1,shouldCoalesceRunChangeDetection:!(!i||!i.ngZoneRunCoalescing)||!1}}(n)),s=[{provide:ft,useValue:r}];return r.run(()=>{const o=$i.create({providers:s,parent:this.injector,name:e.moduleType.name}),a=e.create(o),l=a.injector.get(al,null);if(!l)throw new pe(402,!1);return r.runOutsideAngular(()=>{const c=r.onError.subscribe({next:d=>{l.handleError(d)}});a.onDestroy(()=>{Hw(this._modules,a),c.unsubscribe()})}),function IN(i,t,e){try{const n=e();return oy(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(Vw);return c.runInitializers(),c.donePromise.then(()=>(function n2(i){En(i,"Expected localeId to be defined"),"string"==typeof i&&(t2=i.toLowerCase().replace(/_/g,"-"))}(a.injector.get(ql,im)||im),this._moduleDoBootstrap(a),a))})})}bootstrapModule(e,n=[]){const r=RN({},n);return function q6(i,t,e){const n=new K1(e);return Promise.resolve(n)}(0,0,e).then(s=>this.bootstrapModuleFactory(s,r))}_moduleDoBootstrap(e){const n=e.injector.get(dm);if(e._bootstrapComponents.length>0)e._bootstrapComponents.forEach(r=>n.bootstrap(r));else{if(!e.instance.ngDoBootstrap)throw new pe(-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 pe(404,!1);this._modules.slice().forEach(n=>n.destroy()),this._destroyListeners.forEach(n=>n());const e=this._injector.get(bT,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)(ee($i))},i.\u0275prov=ke({token:i,factory:i.\u0275fac,providedIn:"platform"}),i})();function RN(i,t){return Array.isArray(t)?t.reduce(RN,i):{...i,...t}}let dm=(()=>{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 In(a=>{this._stable=this._zone.isStable&&!this._zone.hasPendingMacrotasks&&!this._zone.hasPendingMicrotasks,this._zone.runOutsideAngular(()=>{a.next(this._stable),a.complete()})}),o=new In(a=>{let l;this._zone.runOutsideAngular(()=>{l=this._zone.onStable.subscribe(()=>{ft.assertNotInAngularZone(),pT(()=>{!this._stable&&!this._zone.hasPendingMacrotasks&&!this._zone.hasPendingMicrotasks&&(this._stable=!0,a.next(!0))})})});const c=this._zone.onUnstable.subscribe(()=>{ft.assertInAngularZone(),this._stable&&(this._stable=!1,this._zone.runOutsideAngular(()=>{a.next(!1)}))});return()=>{l.unsubscribe(),c.unsubscribe()}});this.isStable=Mr(s,o.pipe(Uf()))}bootstrap(e,n){const r=e instanceof Ov;if(!this._injector.get(Vw).done){!r&&function Sd(i){const t=Hn(i)||Ur(i)||vs(i);return null!==t&&t.standalone}(e);throw new pe(405,zc)}let o;o=r?e:this._injector.get(Hl).resolveComponentFactory(e),this.componentTypes.push(o.componentType);const a=function X6(i){return i.isBoundToModule}(o)?void 0:this._injector.get(rm),c=o.create($i.NULL,[],n||o.selector,a),d=c.location.nativeElement,h=c.injector.get(bN,null);return h?.registerApplication(d),c.onDestroy(()=>{this.detachView(c.hostView),Hw(this.components,c),h?.unregisterApplication(d)}),this._loadComponent(c),c}tick(){if(this._runningTick)throw new pe(101,!1);try{this._runningTick=!0;for(let e of this._views)e.detectChanges()}catch(e){this._zone.runOutsideAngular(()=>this._exceptionHandler.handleError(e))}finally{this._runningTick=!1}}attachView(e){const n=e;this._views.push(n),n.attachToAppRef(this)}detachView(e){const n=e;Hw(this._views,n),n.detachFromAppRef()}_loadComponent(e){this.attachView(e.hostView),this.tick(),this.components.push(e);const n=this._injector.get(wN,[]);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),()=>Hw(this._destroyListeners,e)}destroy(){if(this._destroyed)throw new pe(406,!1);const e=this._injector;e.destroy&&!e.destroyed&&e.destroy()}get viewCount(){return this._views.length}warnIfDestroyed(){}}return i.\u0275fac=function(e){return new(e||i)(ee(ft),ee(to),ee(al))},i.\u0275prov=ke({token:i,factory:i.\u0275fac,providedIn:"root"}),i})();function Hw(i,t){const e=i.indexOf(t);e>-1&&i.splice(e,1)}let Zn=(()=>{class i{}return i.__NG_ELEMENT_ID__=e9,i})();function e9(i){return function t9(i,t,e){if(Ad(i)&&!e){const n=ws(i.index,t);return new ny(n,n)}return 47&i.type?new ny(t[rr],t):null}(Er(),Se(),16==(16&i))}class LN{constructor(){}supports(t){return Ew(t)}create(t){return new l9(t)}}const a9=(i,t)=>t;class l9{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||a9}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 c9(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 NN),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 NN),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 c9{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 d9{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 NN{constructor(){this.map=new Map}put(t){const e=t.trackById;let n=this.map.get(e);n||(n=new d9,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 BN(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 h9(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 h9{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 VN(){return new Ww([new LN])}let Ww=(()=>{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||VN()),deps:[[i,new xa,new Ss]]}}find(e){const n=this.factories.find(r=>r.supports(e));if(null!=n)return n;throw new pe(901,!1)}}return i.\u0275prov=ke({token:i,providedIn:"root",factory:VN}),i})();function zN(){return new gy([new UN])}let gy=(()=>{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||zN()),deps:[[i,new xa,new Ss]]}}find(e){const n=this.factories.find(r=>r.supports(e));if(n)return n;throw new pe(901,!1)}}return i.\u0275prov=ke({token:i,providedIn:"root",factory:zN}),i})();const m9=SN(null,"core",[]);let g9=(()=>{class i{constructor(e){}}return i.\u0275fac=function(e){return new(e||i)(ee(dm))},i.\u0275mod=nn({type:i}),i.\u0275inj=Kt({}),i})();let ET=null;function Hc(){return ET}class y9{}const jt=new me("DocumentToken");let AT=(()=>{class i{historyGo(e){throw new Error("Not implemented")}}return i.\u0275fac=function(e){return new(e||i)},i.\u0275prov=ke({token:i,factory:function(){return function b9(){return ee(HN)}()},providedIn:"platform"}),i})();const x9=new me("Location Initialized");let HN=(()=>{class i extends AT{constructor(e){super(),this._doc=e,this._location=window.location,this._history=window.history}getBaseHrefFromDOM(){return Hc().getBaseHref(this._doc)}onPopState(e){const n=Hc().getGlobalEventTarget(this._doc,"window");return n.addEventListener("popstate",e,!1),()=>n.removeEventListener("popstate",e)}onHashChange(e){const n=Hc().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){GN()?this._history.pushState(e,n,r):this._location.hash=r}replaceState(e,n,r){GN()?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)(ee(jt))},i.\u0275prov=ke({token:i,factory:function(){return function w9(){return new HN(ee(jt))}()},providedIn:"platform"}),i})();function GN(){return!!window.history.pushState}function DT(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 $N(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 Gc(i){return i&&"?"!==i[0]?"?"+i:i}let Ih=(()=>{class i{historyGo(e){throw new Error("Not implemented")}}return i.\u0275fac=function(e){return new(e||i)},i.\u0275prov=ke({token:i,factory:function(){return Ft(jN)},providedIn:"root"}),i})();const WN=new me("appBaseHref");let jN=(()=>{class i extends Ih{constructor(e,n){super(),this._platformLocation=e,this._removeListenerFns=[],this._baseHref=n??this._platformLocation.getBaseHrefFromDOM()??Ft(jt).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 DT(this._baseHref,e)}path(e=!1){const n=this._platformLocation.pathname+Gc(this._platformLocation.search),r=this._platformLocation.hash;return r&&e?`${n}${r}`:n}pushState(e,n,r,s){const o=this.prepareExternalUrl(r+Gc(s));this._platformLocation.pushState(e,n,o)}replaceState(e,n,r,s){const o=this.prepareExternalUrl(r+Gc(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)(ee(AT),ee(WN,8))},i.\u0275prov=ke({token:i,factory:i.\u0275fac,providedIn:"root"}),i})(),M9=(()=>{class i extends Ih{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=DT(this._baseHref,e);return n.length>0?"#"+n:n}pushState(e,n,r,s){let o=this.prepareExternalUrl(r+Gc(s));0==o.length&&(o=this._platformLocation.pathname),this._platformLocation.pushState(e,n,o)}replaceState(e,n,r,s){let o=this.prepareExternalUrl(r+Gc(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)(ee(AT),ee(WN,8))},i.\u0275prov=ke({token:i,factory:i.\u0275fac}),i})(),_y=(()=>{class i{constructor(e){this._subject=new We,this._urlChangeListeners=[],this._urlChangeSubscription=null,this._locationStrategy=e;const n=this._locationStrategy.getBaseHref();this._basePath=function E9(i){if(new RegExp("^(https?:)?//").test(i)){const[,e]=i.split(/\/\/[^\/]+/);return e}return i}($N(YN(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+Gc(n))}normalize(e){return i.stripTrailingSlash(function S9(i,t){if(!i||!t.startsWith(i))return t;const e=t.substring(i.length);return""===e||["/",";","?","#"].includes(e[0])?e:t}(this._basePath,YN(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+Gc(n)),r)}replaceState(e,n="",r=null){this._locationStrategy.replaceState(r,"",e,n),this._notifyUrlChangeListeners(this.prepareExternalUrl(e+Gc(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=Gc,i.joinWithSlash=DT,i.stripTrailingSlash=$N,i.\u0275fac=function(e){return new(e||i)(ee(Ih))},i.\u0275prov=ke({token:i,factory:function(){return function C9(){return new _y(ee(Ih))}()},providedIn:"root"}),i})();function YN(i){return i.replace(/\/index.html$/,"")}var Co=(()=>((Co=Co||{})[Co.Decimal=0]="Decimal",Co[Co.Percent=1]="Percent",Co[Co.Currency=2]="Currency",Co[Co.Scientific=3]="Scientific",Co))(),Ht=(()=>((Ht=Ht||{})[Ht.Decimal=0]="Decimal",Ht[Ht.Group=1]="Group",Ht[Ht.List=2]="List",Ht[Ht.PercentSign=3]="PercentSign",Ht[Ht.PlusSign=4]="PlusSign",Ht[Ht.MinusSign=5]="MinusSign",Ht[Ht.Exponential=6]="Exponential",Ht[Ht.SuperscriptingExponent=7]="SuperscriptingExponent",Ht[Ht.PerMille=8]="PerMille",Ht[Ht.Infinity=9]="Infinity",Ht[Ht.NaN=10]="NaN",Ht[Ht.TimeSeparator=11]="TimeSeparator",Ht[Ht.CurrencyDecimal=12]="CurrencyDecimal",Ht[Ht.CurrencyGroup=13]="CurrencyGroup",Ht))();function Ea(i,t){const e=ro(i),n=e[rt.NumberSymbols][t];if(typeof n>"u"){if(t===Ht.CurrencyDecimal)return e[rt.NumberSymbols][Ht.Decimal];if(t===Ht.CurrencyGroup)return e[rt.NumberSymbols][Ht.Group]}return n}const Q9=/^(\d+)?\.((\d+)(-(\d+))?)?$/,JN=22,eM=".",yy="0",J9=";",eY=",",PT="#";function LT(i){const t=parseInt(i);if(isNaN(t))throw new Error("Invalid integer literal when parsing "+i);return t}const BT=/\s+/,nB=[];let hm=(()=>{class i{constructor(e,n,r,s){this._iterableDiffers=e,this._keyValueDiffers=n,this._ngEl=r,this._renderer=s,this.initialClasses=nB,this.stateMap=new Map}set klass(e){this.initialClasses=null!=e?e.trim().split(BT):nB}set ngClass(e){this.rawClass="string"==typeof e?e.trim().split(BT):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(BT).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)(E(Ww),E(gy),E(mt),E(ol))},i.\u0275dir=ve({type:i,selectors:[["","ngClass",""]],inputs:{klass:["class","klass"],ngClass:"ngClass"},standalone:!0}),i})();class uY{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 So=(()=>{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 uY(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),sB(a,r)}});for(let r=0,s=n.length;r{sB(n.get(r.currentIndex),r)})}static ngTemplateContextGuard(e,n){return!0}}return i.\u0275fac=function(e){return new(e||i)(E(Wr),E(Mo),E(Ww))},i.\u0275dir=ve({type:i,selectors:[["","ngFor","","ngForOf",""]],inputs:{ngForOf:"ngForOf",ngForTrackBy:"ngForTrackBy",ngForTemplate:"ngForTemplate"},standalone:!0}),i})();function sB(i,t){i.context.$implicit=t.item}let vi=(()=>{class i{constructor(e,n){this._viewContainer=e,this._context=new fY,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){oB("ngIfThen",e),this._thenTemplateRef=e,this._thenViewRef=null,this._updateView()}set ngIfElse(e){oB("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)(E(Wr),E(Mo))},i.\u0275dir=ve({type:i,selectors:[["","ngIf",""]],inputs:{ngIf:"ngIf",ngIfThen:"ngIfThen",ngIfElse:"ngIfElse"},standalone:!0}),i})();class fY{constructor(){this.$implicit=null,this.ngIf=null}}function oB(i,t){if(t&&!t.createEmbeddedView)throw new Error(`${i} must be a TemplateRef, but received '${pi(t)}'.`)}class UT{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 by=(()=>{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=ve({type:i,selectors:[["","ngSwitch",""]],inputs:{ngSwitch:"ngSwitch"},standalone:!0}),i})(),VT=(()=>{class i{constructor(e,n,r){this.ngSwitch=r,r._addCase(),this._view=new UT(e,n)}ngDoCheck(){this._view.enforceState(this.ngSwitch._matchCase(this.ngSwitchCase))}}return i.\u0275fac=function(e){return new(e||i)(E(Wr),E(Mo),E(by,9))},i.\u0275dir=ve({type:i,selectors:[["","ngSwitchCase",""]],inputs:{ngSwitchCase:"ngSwitchCase"},standalone:!0}),i})(),aB=(()=>{class i{constructor(e,n,r){r._addDefault(new UT(e,n))}}return i.\u0275fac=function(e){return new(e||i)(E(Wr),E(Mo),E(by,9))},i.\u0275dir=ve({type:i,selectors:[["","ngSwitchDefault",""]],standalone:!0}),i})(),tM=(()=>{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:Es.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)(E(mt),E(gy),E(ol))},i.\u0275dir=ve({type:i,selectors:[["","ngStyle",""]],inputs:{ngStyle:"ngStyle"},standalone:!0}),i})(),xy=(()=>{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)(E(Wr))},i.\u0275dir=ve({type:i,selectors:[["","ngTemplateOutlet",""]],inputs:{ngTemplateOutletContext:"ngTemplateOutletContext",ngTemplateOutlet:"ngTemplateOutlet",ngTemplateOutletInjector:"ngTemplateOutletInjector"},standalone:!0,features:[bi]}),i})();function fl(i,t){return new pe(2100,!1)}class mY{createSubscription(t,e){return t.subscribe({next:e,error:n=>{throw n}})}dispose(t){t.unsubscribe()}}class gY{createSubscription(t,e){return t.then(e,n=>{throw n})}dispose(t){}}const _Y=new gY,vY=new mY;let pl=(()=>{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(oy(e))return _Y;if(uL(e))return vY;throw fl()}_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)(E(Zn,16))},i.\u0275pipe=Gi({name:"async",type:i,pure:!1,standalone:!0}),i})(),cB=(()=>{class i{constructor(e){this.differs=e,this.keyValues=[],this.compareFn=dB}transform(e,n=dB){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 RY(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)(E(gy,16))},i.\u0275pipe=Gi({name:"keyvalue",type:i,pure:!1,standalone:!0}),i})();function dB(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 zT(i){return!(null==i||""===i||i!=i)}(e))return null;r=r||this._locale;try{return function rY(i,t,e){return function OT(i,t,e,n,r,s,o=!1){let a="",l=!1;if(isFinite(i)){let c=function oY(i){let n,r,s,o,a,t=Math.abs(i)+"",e=0;for((r=t.indexOf(eM))>-1&&(t=t.replace(eM,"")),(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)===yy;s++);if(s===(a=t.length))n=[0],r=1;else{for(a--;t.charAt(a)===yy;)a--;for(r-=s,n=[],o=0;s<=a;s++,o++)n[o]=Number(t.charAt(s))}return r>JN&&(n=n.splice(0,JN-1),e=r-1,r=1),{digits:n,exponent:e,integerLen:r}}(i);o&&(c=function sY(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 d=t.minInt,h=t.minFrac,p=t.maxFrac;if(s){const M=s.match(Q9);if(null===M)throw new Error(`${s} is not a valid digit info`);const x=M[1],C=M[3],F=M[5];null!=x&&(d=LT(x)),null!=C&&(h=LT(C)),null!=F?p=LT(F):null!=C&&h>p&&(p=h)}!function aY(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);d&&(n.unshift(d),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(Ea(e,n)),v.length&&(a+=Ea(e,r)+v.join("")),b&&(a+=Ea(e,Ht.Exponential)+"+"+b)}else a=Ea(e,Ht.Infinity);return a=i<0&&!l?t.negPre+a+t.negSuf:t.posPre+a+t.posSuf,a}(i,function FT(i,t="-"){const e={minInt:1,minFrac:0,maxFrac:0,posPre:"",posSuf:"",negPre:"",negSuf:"",gSize:0,lgSize:0},n=i.split(J9),r=n[0],s=n[1],o=-1!==r.indexOf(eM)?r.split(eM):[r.substring(0,r.lastIndexOf(yy)+1),r.substring(r.lastIndexOf(yy)+1)],a=o[0],l=o[1]||"";e.posPre=a.substring(0,a.indexOf(PT));for(let d=0;d{class i{}return i.\u0275fac=function(e){return new(e||i)},i.\u0275mod=nn({type:i}),i.\u0275inj=Kt({}),i})();const hB="browser";let BY=(()=>{class i{}return i.\u0275prov=ke({token:i,providedIn:"root",factory:()=>new UY(ee(jt),window)}),i})();class UY{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 VY(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=fB(this.window.history)||fB(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 fB(i){return Object.getOwnPropertyDescriptor(i,"scrollRestoration")}class p7 extends y9{constructor(){super(...arguments),this.supportsDOMEvents=!0}}class WT extends p7{static makeCurrent(){!function v9(i){ET||(ET=i)}(new WT)}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 m7(){return My=My||document.querySelector("base"),My?My.getAttribute("href"):null}();return null==e?null:function g7(i){rM=rM||document.createElement("a"),rM.setAttribute("href",i);const t=rM.pathname;return"/"===t.charAt(0)?t:`/${t}`}(e)}resetBaseElement(){My=null}getUserAgent(){return window.navigator.userAgent}getCookie(t){return function cY(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 rM,My=null;const vB=new me("TRANSITION_ID"),v7=[{provide:Uw,useFactory:function _7(i,t,e){return()=>{e.get(Vw).donePromise.then(()=>{const n=Hc(),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=ke({token:i,factory:i.\u0275fac}),i})();const sM=new me("EventManagerPlugins");let oM=(()=>{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=ke({token:i,factory:i.\u0275fac}),i})(),Cy=(()=>{class i extends bB{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)(ee(jt))},i.\u0275prov=ke({token:i,factory:i.\u0275fac}),i})();const jT={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/"},YT=/%COMP%/g,MB=new me("RemoveStylesOnCompDestory",{providedIn:"root",factory:()=>!1});function CB(i,t){return t.flat(100).map(e=>e.replace(YT,i))}function SB(i){return t=>{if("__ngUnwrap__"===t)return i;!1===i(t)&&(t.preventDefault(),t.returnValue=!1)}}let aM=(()=>{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 qT(e)}createRenderer(e,n){if(!e||!n)return this.defaultRenderer;const r=this.getOrCreateRenderer(e,n);return r instanceof DB?r.applyToHost(e):r instanceof XT&&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 qs.Emulated:s=new DB(o,a,n,this.appId,l);break;case qs.ShadowDom:return new A7(o,a,e,n);default:s=new XT(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)(ee(oM),ee(Cy),ee(cm),ee(MB))},i.\u0275prov=ke({token:i,factory:i.\u0275fac}),i})();class qT{constructor(t){this.eventManager=t,this.data=Object.create(null),this.destroyNode=null}destroy(){}createElement(t,e){return e?document.createElementNS(jT[e]||e,t):document.createElement(t)}createComment(t){return document.createComment(t)}createText(t){return document.createTextNode(t)}appendChild(t,e){(AB(t)?t.content:t).appendChild(e)}insertBefore(t,e,n){t&&(AB(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=jT[r];s?t.setAttributeNS(s,e,n):t.setAttribute(e,n)}else t.setAttribute(e,n)}removeAttribute(t,e,n){if(n){const r=jT[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&(Es.DashCase|Es.Important)?t.style.setProperty(e,n,r&Es.Important?"important":""):t.style[e]=n}removeStyle(t,e,n){n&Es.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,SB(n)):this.eventManager.addEventListener(t,e,SB(n))}}function AB(i){return"TEMPLATE"===i.tagName&&void 0!==i.content}class A7 extends qT{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=CB(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 XT extends qT{constructor(t,e,n,r,s=n.id){super(t),this.sharedStylesHost=e,this.removeStylesOnCompDestory=r,this.rendererUsageCount=0,this.styles=CB(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 DB extends XT{constructor(t,e,n,r,s){const o=r+"-"+n.id;super(t,e,n,s,o),this.contentAttr=function C7(i){return"_ngcontent-%COMP%".replace(YT,i)}(o),this.hostAttr=function S7(i){return"_nghost-%COMP%".replace(YT,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 D7=(()=>{class i extends yB{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)(ee(jt))},i.\u0275prov=ke({token:i,factory:i.\u0275fac}),i})();const TB=["alt","control","meta","shift"],T7={"\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"},I7={alt:i=>i.altKey,control:i=>i.ctrlKey,meta:i=>i.metaKey,shift:i=>i.shiftKey};let R7=(()=>{class i extends yB{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(()=>Hc().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."),TB.forEach(c=>{const d=n.indexOf(c);d>-1&&(n.splice(d,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=T7[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"),TB.forEach(o=>{o!==r&&(0,I7[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)(ee(jt))},i.\u0275prov=ke({token:i,factory:i.\u0275fac}),i})();const F7=SN(m9,"browser",[{provide:fT,useValue:hB},{provide:pN,useValue:function k7(){WT.makeCurrent()},multi:!0},{provide:jt,useFactory:function O7(){return function sD(i){vv=i}(document),document},deps:[]}]),kB=new me(""),PB=[{provide:zw,useClass:class y7{addToWindow(t){Rn.getAngularTestability=(n,r=!0)=>{const s=t.findTestabilityInTree(n,r);if(null==s)throw new Error("Could not find testability for element.");return s},Rn.getAllAngularTestabilities=()=>t.getAllTestabilities(),Rn.getAllAngularRootElements=()=>t.getAllRootElements(),Rn.frameworkStabilizers||(Rn.frameworkStabilizers=[]),Rn.frameworkStabilizers.push(n=>{const r=Rn.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?Hc().isShadowRoot(e)?this.findTestabilityInTree(t,e.host,!0):this.findTestabilityInTree(t,e.parentElement,!0):null)}},deps:[]},{provide:bN,useClass:_T,deps:[ft,vT,zw]},{provide:_T,useClass:_T,deps:[ft,vT,zw]}],OB=[{provide:Iv,useValue:"root"},{provide:al,useFactory:function P7(){return new al},deps:[]},{provide:sM,useClass:D7,multi:!0,deps:[jt,ft,fT]},{provide:sM,useClass:R7,multi:!0,deps:[jt]},{provide:aM,useClass:aM,deps:[oM,Cy,cm,MB]},{provide:Gl,useExisting:aM},{provide:bB,useExisting:Cy},{provide:Cy,useClass:Cy,deps:[jt]},{provide:oM,useClass:oM,deps:[sM,ft]},{provide:class zY{},useClass:b7,deps:[]},[]];let FB=(()=>{class i{constructor(e){}static withServerTransition(e){return{ngModule:i,providers:[{provide:cm,useValue:e.appId},{provide:vB,useExisting:cm},v7]}}}return i.\u0275fac=function(e){return new(e||i)(ee(kB,12))},i.\u0275mod=nn({type:i}),i.\u0275inj=Kt({providers:[...OB,...PB],imports:[Eo,g9]}),i})(),LB=(()=>{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)(ee(jt))},i.\u0275prov=ke({token:i,factory:function(e){let n=null;return n=e?new e:function N7(){return new LB(ee(jt))}(),n},providedIn:"root"}),i})();typeof window<"u"&&window;let QT=(()=>{class i{}return i.\u0275fac=function(e){return new(e||i)},i.\u0275prov=ke({token:i,factory:function(e){let n=null;return n=e?new(e||i):ee(UB),n},providedIn:"root"}),i})(),UB=(()=>{class i extends QT{constructor(e){super(),this._doc=e}sanitize(e,n){if(null==n)return null;switch(e){case Kn.NONE:return n;case Kn.HTML:return Ma(n,"HTML")?Js(n):Zx(this._doc,String(n)).toString();case Kn.STYLE:return Ma(n,"Style")?Js(n):n;case Kn.SCRIPT:if(Ma(n,"Script"))return Js(n);throw new Error("unsafe value used in a script context");case Kn.URL:return Ma(n,"URL")?Js(n):xh(String(n));case Kn.RESOURCE_URL:if(Ma(n,"ResourceURL"))return Js(n);throw new Error(`unsafe value used in a resource URL context (see ${qu})`);default:throw new Error(`Unexpected SecurityContext ${e} (see ${qu})`)}}bypassSecurityTrustHtml(e){return function uD(i){return new oD(i)}(e)}bypassSecurityTrustStyle(e){return function hD(i){return new aD(i)}(e)}bypassSecurityTrustScript(e){return function fD(i){return new lD(i)}(e)}bypassSecurityTrustUrl(e){return function pD(i){return new cD(i)}(e)}bypassSecurityTrustResourceUrl(e){return function mD(i){return new Pp(i)}(e)}}return i.\u0275fac=function(e){return new(e||i)(ee(jt))},i.\u0275prov=ke({token:i,factory:function(e){let n=null;return n=e?new e:function H7(i){return new UB(i.get(jt))}(ee($i)),n},providedIn:"root"}),i})();function ht(...i){return Ni(i,$u(i))}class gt extends Re{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 fm=V(i=>function(){i(this),this.name="EmptyError",this.message="no elements in sequence"}),{isArray:G7}=Array,{getPrototypeOf:$7,prototype:W7,keys:j7}=Object;function VB(i){if(1===i.length){const t=i[0];if(G7(t))return{args:t,keys:null};if(function Y7(i){return i&&"object"==typeof i&&$7(i)===W7}(t)){const e=j7(t);return{args:e.map(n=>t[n]),keys:e}}}return{args:i,keys:null}}const{isArray:q7}=Array;function JT(i){return et(t=>function X7(i,t){return q7(t)?i(...t):i(t)}(i,t))}function zB(i,t){return i.reduce((e,n,r)=>(e[n]=t[r],e),{})}function nu(...i){const t=$u(i),e=w0(i),{args:n,keys:r}=VB(i);if(0===n.length)return Ni([],t);const s=new In(function K7(i,t,e=$a){return n=>{HB(t,()=>{const{length:r}=i,s=new Array(r);let o=r,a=r;for(let l=0;l{const c=Ni(i[l],t);let d=!1;c.subscribe(Yn(n,h=>{s[l]=h,d||(d=!0,a--),a||n.next(e(s.slice()))},()=>{--o||n.complete()}))},n)},n)}}(n,t,r?o=>zB(r,o):$a));return e?s.pipe(JT(e)):s}function HB(i,t,e){i?Ya(e,i,t):t()}function Sy(...i){return function Z7(){return yd(1)}()(Ni(i,$u(i)))}function Ey(i){return new In(t=>{wr(i()).subscribe(t)})}function pm(i,t){const e=cn(i)?i:()=>i,n=r=>r.error(e());return new In(t?r=>t.schedule(n,0,r):n)}function eI(){return ti((i,t)=>{let e=null;i._refCount++;const n=Yn(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 GB extends In{constructor(t,e){super(),this.source=t,this.subjectFactory=e,this._subject=null,this._refCount=0,this._connection=null,c0(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 Zt;const e=this.getSubject();t.add(this.source.subscribe(Yn(e,void 0,()=>{this._teardown(),e.complete()},n=>{this._teardown(),e.error(n)},()=>this._teardown()))),t.closed&&(this._connection=null,t=Zt.EMPTY)}return t}refCount(){return eI()(this)}}function Rs(i,t){return ti((e,n)=>{let r=null,s=0,o=!1;const a=()=>o&&!r&&n.complete();e.subscribe(Yn(n,l=>{r?.unsubscribe();let c=0;const d=s++;wr(i(l,d)).subscribe(r=Yn(n,h=>n.next(t?t(l,h,d,c++):h),()=>{r=null,a()}))},()=>{o=!0,a()}))})}function Oi(i){return i<=0?()=>po:ti((t,e)=>{let n=0;t.subscribe(Yn(e,r=>{++n<=i&&(e.next(r),i<=n&&e.complete())}))})}function Ao(...i){const t=$u(i);return ti((e,n)=>{(t?Sy(i,e,t):Sy(i,e)).subscribe(n)})}function gn(i,t){return ti((e,n)=>{let r=0;e.subscribe(Yn(n,s=>i.call(t,s,r++)&&n.next(s)))})}function lM(i){return ti((t,e)=>{let n=!1;t.subscribe(Yn(e,r=>{n=!0,e.next(r)},()=>{n||e.next(i),e.complete()}))})}function $B(i=Q7){return ti((t,e)=>{let n=!1;t.subscribe(Yn(e,r=>{n=!0,e.next(r)},()=>n?e.complete():e.error(i())))})}function Q7(){return new fm}function iu(i,t){const e=arguments.length>=2;return n=>n.pipe(i?gn((r,s)=>i(r,s,n)):$a,Oi(1),e?lM(t):$B(()=>new fm))}function ru(i,t){return cn(t)?ir(i,t,1):ir(i,1)}function Vi(i,t,e){const n=cn(i)||t||e?{next:i,error:t,complete:e}:i;return n?ti((r,s)=>{var o;null===(o=n.subscribe)||void 0===o||o.call(n);let a=!0;r.subscribe(Yn(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)}))}):$a}function Wc(i){return ti((t,e)=>{let s,n=null,r=!1;n=t.subscribe(Yn(e,void 0,void 0,o=>{s=wr(i(o,Wc(i)(t))),n?(n.unsubscribe(),n=null,s.subscribe(e)):r=!0})),r&&(n.unsubscribe(),n=null,s.subscribe(e))})}function tI(i,t){return ti(function J7(i,t,e,n,r){return(s,o)=>{let a=e,l=t,c=0;s.subscribe(Yn(o,d=>{const h=c++;l=a?i(l,d,h):(a=!0,d),n&&o.next(l)},r&&(()=>{a&&o.next(l),o.complete()})))}}(i,t,arguments.length>=2,!0))}function nI(i){return i<=0?()=>po:ti((t,e)=>{let n=[];t.subscribe(Yn(e,r=>{n.push(r),i{for(const r of n)e.next(r);e.complete()},void 0,()=>{n=null}))})}function WB(i,t){const e=arguments.length>=2;return n=>n.pipe(i?gn((r,s)=>i(r,s,n)):$a,nI(1),e?lM(t):$B(()=>new fm))}function jB(i,t=!1){return ti((e,n)=>{let r=0;e.subscribe(Yn(n,s=>{const o=i(s,r++);(o||t)&&n.next(s),!o&&n.complete()}))})}function YB(i){return et(()=>i)}function su(i){return ti((t,e)=>{try{t.subscribe(e)}finally{e.add(i)}})}const _n="primary",Ay=Symbol("RouteTitle");class eq{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 eq(i)}function tq(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 XB(i){return Array.prototype.concat.apply([],i)}function KB(i){return i.length>0?i[i.length-1]:null}function os(i,t){for(const e in i)i.hasOwnProperty(e)&&t(i[e],e)}function ou(i){return L1(i)?i:oy(i)?Ni(Promise.resolve(i)):ht(i)}const cM=!1,iq={exact:function JB(i,t,e){if(!Rh(i.segments,t.segments)||!dM(i.segments,t.segments,e)||i.numberOfChildren!==t.numberOfChildren)return!1;for(const n in t.children)if(!i.children[n]||!JB(i.children[n],t.children[n],e))return!1;return!0},subset:e3},ZB={exact:function rq(i,t){return Xl(i,t)},subset:function sq(i,t){return Object.keys(t).length<=Object.keys(i).length&&Object.keys(t).every(e=>qB(i[e],t[e]))},ignored:()=>!0};function QB(i,t,e){return iq[e.paths](i.root,t.root,e.matrixParams)&&ZB[e.queryParams](i.queryParams,t.queryParams)&&!("exact"===e.fragment&&i.fragment!==t.fragment)}function e3(i,t,e){return t3(i,t,t.segments,e)}function t3(i,t,e,n){if(i.segments.length>e.length){const r=i.segments.slice(0,e.length);return!(!Rh(r,e)||t.hasChildren()||!dM(r,e,n))}if(i.segments.length===e.length){if(!Rh(i.segments,e)||!dM(i.segments,e,n))return!1;for(const r in t.children)if(!i.children[r]||!e3(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!!(Rh(i.segments,r)&&dM(i.segments,r,n)&&i.children[_n])&&t3(i.children[_n],t,s,n)}}function dM(i,t,e){return t.every((n,r)=>ZB[e](i[r].parameters,n.parameters))}class au{constructor(t=new Tn([],{}),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 lq.serialize(this)}}class Tn{constructor(t,e){this.segments=t,this.children=e,this.parent=null,os(e,(n,r)=>n.parent=this)}hasChildren(){return this.numberOfChildren>0}get numberOfChildren(){return Object.keys(this.children).length}toString(){return uM(this)}}class Dy{constructor(t,e){this.path=t,this.parameters=e}get parameterMap(){return this._parameterMap||(this._parameterMap=mm(this.parameters)),this._parameterMap}toString(){return s3(this)}}function Rh(i,t){return i.length===t.length&&i.every((e,n)=>e.path===t[n].path)}let Ty=(()=>{class i{}return i.\u0275fac=function(e){return new(e||i)},i.\u0275prov=ke({token:i,factory:function(){return new iI},providedIn:"root"}),i})();class iI{parse(t){const e=new _q(t);return new au(e.parseRootSegment(),e.parseQueryParams(),e.parseFragment())}serialize(t){const e=`/${Iy(t.root,!0)}`,n=function uq(i){const t=Object.keys(i).map(e=>{const n=i[e];return Array.isArray(n)?n.map(r=>`${hM(e)}=${hM(r)}`).join("&"):`${hM(e)}=${hM(n)}`}).filter(e=>!!e);return t.length?`?${t.join("&")}`:""}(t.queryParams);return`${e}${n}${"string"==typeof t.fragment?`#${function cq(i){return encodeURI(i)}(t.fragment)}`:""}`}}const lq=new iI;function uM(i){return i.segments.map(t=>s3(t)).join("/")}function Iy(i,t){if(!i.hasChildren())return uM(i);if(t){const e=i.children[_n]?Iy(i.children[_n],!1):"",n=[];return os(i.children,(r,s)=>{s!==_n&&n.push(`${s}:${Iy(r,!1)}`)}),n.length>0?`${e}(${n.join("//")})`:e}{const e=function aq(i,t){let e=[];return os(i.children,(n,r)=>{r===_n&&(e=e.concat(t(n,r)))}),os(i.children,(n,r)=>{r!==_n&&(e=e.concat(t(n,r)))}),e}(i,(n,r)=>r===_n?[Iy(i.children[_n],!1)]:[`${r}:${Iy(n,!1)}`]);return 1===Object.keys(i.children).length&&null!=i.children[_n]?`${uM(i)}/${e[0]}`:`${uM(i)}/(${e.join("//")})`}}function n3(i){return encodeURIComponent(i).replace(/%40/g,"@").replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",")}function hM(i){return n3(i).replace(/%3B/gi,";")}function rI(i){return n3(i).replace(/\(/g,"%28").replace(/\)/g,"%29").replace(/%26/gi,"&")}function fM(i){return decodeURIComponent(i)}function r3(i){return fM(i.replace(/\+/g,"%20"))}function s3(i){return`${rI(i.path)}${function dq(i){return Object.keys(i).map(t=>`;${rI(t)}=${rI(i[t])}`).join("")}(i.parameters)}`}const hq=/^[^\/()?;=#]+/;function pM(i){const t=i.match(hq);return t?t[0]:""}const fq=/^[^=?&#]+/,mq=/^[^&#]+/;class _q{constructor(t){this.url=t,this.remaining=t}parseRootSegment(){return this.consumeOptional("/"),""===this.remaining||this.peekStartsWith("?")||this.peekStartsWith("#")?new Tn([],{}):new Tn([],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[_n]=new Tn(t,e)),n}parseSegment(){const t=pM(this.remaining);if(""===t&&this.peekStartsWith(";"))throw new pe(4009,cM);return this.capture(t),new Dy(fM(t),this.parseMatrixParams())}parseMatrixParams(){const t={};for(;this.consumeOptional(";");)this.parseParam(t);return t}parseParam(t){const e=pM(this.remaining);if(!e)return;this.capture(e);let n="";if(this.consumeOptional("=")){const r=pM(this.remaining);r&&(n=r,this.capture(n))}t[fM(e)]=fM(n)}parseQueryParam(t){const e=function pq(i){const t=i.match(fq);return t?t[0]:""}(this.remaining);if(!e)return;this.capture(e);let n="";if(this.consumeOptional("=")){const o=function gq(i){const t=i.match(mq);return t?t[0]:""}(this.remaining);o&&(n=o,this.capture(n))}const r=r3(e),s=r3(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=pM(this.remaining),r=this.remaining[n.length];if("/"!==r&&")"!==r&&";"!==r)throw new pe(4010,cM);let s;n.indexOf(":")>-1?(s=n.slice(0,n.indexOf(":")),this.capture(s),this.capture(":")):t&&(s=_n);const o=this.parseChildren();e[s]=1===Object.keys(o).length?o[_n]:new Tn([],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 pe(4011,cM)}}function sI(i){return i.segments.length>0?new Tn([],{[_n]:i}):i}function mM(i){const t={};for(const n of Object.keys(i.children)){const s=mM(i.children[n]);(s.segments.length>0||s.hasChildren())&&(t[n]=s)}return function vq(i){if(1===i.numberOfChildren&&i.children[_n]){const t=i.children[_n];return new Tn(i.segments.concat(t.segments),t.children)}return i}(new Tn(i.segments,t))}function kh(i){return i instanceof au}const oI=!1;function yq(i,t,e,n,r){if(0===e.length)return gm(t.root,t.root,t.root,n,r);const s=function d3(i){if("string"==typeof i[0]&&1===i.length&&"/"===i[0])return new c3(!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 os(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 c3(e,t,n)}(e);return s.toRoot()?gm(t.root,t.root,new Tn([],{}),n,r):function o(l){const c=function xq(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 u3(i,t,e){let n=i,r=t,s=e;for(;s>r;){if(s-=r,n=n.parent,!n)throw new pe(4005,oI&&"Invalid number of '../'");r=n.segments.length}return new _m(n,!1,r-s)}(e,n+(Ry(i.commands[0])?0:1),i.numberOfDoubleDots)}(s,t,i.snapshot?._urlSegment,l),d=c.processChildren?vm(c.segmentGroup,c.index,s.commands):aI(c.segmentGroup,c.index,s.commands);return gm(t.root,c.segmentGroup,d,n,r)}(i.snapshot?._lastPathIndex)}function Ry(i){return"object"==typeof i&&null!=i&&!i.outlets&&!i.segmentPath}function ky(i){return"object"==typeof i&&null!=i&&i.outlets}function gm(i,t,e,n,r){let o,s={};n&&os(n,(l,c)=>{s[c]=Array.isArray(l)?l.map(d=>`${d}`):`${l}`}),o=i===t?e:l3(i,t,e);const a=sI(mM(o));return new au(a,s,r)}function l3(i,t,e){const n={};return os(i.children,(r,s)=>{n[s]=r===t?e:l3(r,t,e)}),new Tn(i.segments,n)}class c3{constructor(t,e,n){if(this.isAbsolute=t,this.numberOfDoubleDots=e,this.commands=n,t&&n.length>0&&Ry(n[0]))throw new pe(4003,oI&&"Root segment cannot have matrix parameters");const r=n.find(ky);if(r&&r!==KB(n))throw new pe(4004,oI&&"{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 aI(i,t,e){if(i||(i=new Tn([],{})),0===i.segments.length&&i.hasChildren())return vm(i,t,e);const n=function Mq(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(ky(a))break;const l=`${a}`,c=n0&&void 0===l)break;if(l&&c&&"object"==typeof c&&void 0===c.outlets){if(!f3(l,c,o))return s;n+=2}else{if(!f3(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]=aI(i.children[o],t,s))}),os(i.children,(s,o)=>{void 0===n[o]&&(r[o]=s)}),new Tn(i.segments,r)}}function lI(i,t,e){const n=i.segments.slice(0,t);let r=0;for(;r{"string"==typeof e&&(e=[e]),null!==e&&(t[n]=lI(new Tn([],{}),0,e))}),t}function h3(i){const t={};return os(i,(e,n)=>t[n]=`${e}`),t}function f3(i,t,e){return i==e.path&&Xl(t,e.parameters)}const Py="imperative";class Kl{constructor(t,e){this.id=t,this.url=e}}class cI extends Kl{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 Ph extends Kl{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 gM extends Kl{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 _M extends Kl{constructor(t,e,n,r){super(t,e),this.reason=n,this.code=r,this.type=16}}class dI extends Kl{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 Sq extends Kl{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 Eq extends Kl{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 Aq extends Kl{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 Dq extends Kl{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 Tq extends Kl{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 Iq{constructor(t){this.route=t,this.type=9}toString(){return`RouteConfigLoadStart(path: ${this.route.path})`}}class Rq{constructor(t){this.route=t,this.type=10}toString(){return`RouteConfigLoadEnd(path: ${this.route.path})`}}class kq{constructor(t){this.snapshot=t,this.type=11}toString(){return`ChildActivationStart(path: '${this.snapshot.routeConfig&&this.snapshot.routeConfig.path||""}')`}}class Pq{constructor(t){this.snapshot=t,this.type=12}toString(){return`ChildActivationEnd(path: '${this.snapshot.routeConfig&&this.snapshot.routeConfig.path||""}')`}}class Oq{constructor(t){this.snapshot=t,this.type=13}toString(){return`ActivationStart(path: '${this.snapshot.routeConfig&&this.snapshot.routeConfig.path||""}')`}}class Fq{constructor(t){this.snapshot=t,this.type=14}toString(){return`ActivationEnd(path: '${this.snapshot.routeConfig&&this.snapshot.routeConfig.path||""}')`}}class p3{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 Bq=(()=>{class i{createUrlTree(e,n,r,s,o,a){return yq(e||n.root,r,s,o,a)}}return i.\u0275fac=function(e){return new(e||i)},i.\u0275prov=ke({token:i,factory:i.\u0275fac}),i})(),Vq=(()=>{class i{}return i.\u0275fac=function(e){return new(e||i)},i.\u0275prov=ke({token:i,factory:function(t){return Bq.\u0275fac(t)},providedIn:"root"}),i})();class m3{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=uI(t,this._root);return e?e.children.map(n=>n.value):[]}firstChild(t){const e=uI(t,this._root);return e&&e.children.length>0?e.children[0].value:null}siblings(t){const e=hI(t,this._root);return e.length<2?[]:e[e.length-2].children.map(r=>r.value).filter(r=>r!==t)}pathFromRoot(t){return hI(t,this._root).map(e=>e.value)}}function uI(i,t){if(i===t.value)return t;for(const e of t.children){const n=uI(i,e);if(n)return n}return null}function hI(i,t){if(i===t.value)return[t];for(const e of t.children){const n=hI(i,e);if(n.length)return n.unshift(t),n}return[]}class jc{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 g3 extends m3{constructor(t,e){super(t),this.snapshot=e,fI(this,t)}toString(){return this.snapshot.toString()}}function _3(i,t){const e=function zq(i,t){const o=new vM([],{},{},"",{},_n,t,null,i.root,-1,{});return new y3("",new jc(o,[]))}(i,t),n=new gt([new Dy("",{})]),r=new gt({}),s=new gt({}),o=new gt({}),a=new gt(""),l=new bm(n,r,o,a,s,_n,t,e.root);return l.snapshot=e.root,new g3(new jc(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(et(c=>c[Ay]))??ht(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(et(t=>mm(t)))),this._paramMap}get queryParamMap(){return this._queryParamMap||(this._queryParamMap=this.queryParams.pipe(et(t=>mm(t)))),this._queryParamMap}toString(){return this.snapshot?this.snapshot.toString():`Future(${this._futureSnapshot})`}}function v3(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 Hq(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 vM{get title(){return this.data?.[Ay]}constructor(t,e,n,r,s,o,a,l,c,d,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=d,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 y3 extends m3{constructor(t,e){super(e),this.url=t,fI(this,e)}toString(){return b3(this._root)}}function fI(i,t){t.value._routerState=i,t.children.forEach(e=>fI(i,e))}function b3(i){const t=i.children.length>0?` { ${i.children.map(b3).join(", ")} } `:"";return`${i.value}${t}`}function pI(i){if(i.snapshot){const t=i.snapshot,e=i._futureSnapshot;i.snapshot=e,Xl(t.queryParams,e.queryParams)||i.queryParams.next(e.queryParams),t.fragment!==e.fragment&&i.fragment.next(e.fragment),Xl(t.params,e.params)||i.params.next(e.params),function nq(i,t){if(i.length!==t.length)return!1;for(let e=0;eXl(e.parameters,t[n].parameters))}(i.url,t.url);return e&&!(!i.parent!=!t.parent)&&(!i.parent||mI(i.parent,t.parent))}function Oy(i,t,e){if(e&&i.shouldReuseRoute(t.value,e.value.snapshot)){const n=e.value;n._futureSnapshot=t.value;const r=function $q(i,t,e){return t.children.map(n=>{for(const r of e.children)if(i.shouldReuseRoute(n.value,r.value.snapshot))return Oy(i,n,r);return Oy(i,n)})}(i,t,e);return new jc(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=>Oy(i,a)),o}}const n=function Wq(i){return new bm(new gt(i.url),new gt(i.params),new gt(i.queryParams),new gt(i.fragment),new gt(i.data),i.outlet,i.component,i)}(t.value),r=t.children.map(s=>Oy(i,s));return new jc(n,r)}}const gI="ngNavigationCancelingError";function x3(i,t){const{redirectTo:e,navigationBehaviorOptions:n}=kh(t)?{redirectTo:t,navigationBehaviorOptions:void 0}:t,r=w3(!1,0,t);return r.url=e,r.navigationBehaviorOptions=n,r}function w3(i,t,e){const n=new Error("NavigationCancelingError: "+(i||""));return n[gI]=!0,n.cancellationCode=t,e&&(n.url=e),n}function M3(i){return C3(i)&&kh(i.url)}function C3(i){return i&&i[gI]}class jq{constructor(){this.outlet=null,this.route=null,this.resolver=null,this.injector=null,this.children=new Fy,this.attachRef=null}}let Fy=(()=>{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 jq,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=ke({token:i,factory:i.\u0275fac,providedIn:"root"}),i})();const yM=!1;let S3=(()=>{class i{constructor(){this.activated=null,this._activatedRoute=null,this.name=_n,this.activateEvents=new We,this.deactivateEvents=new We,this.attachEvents=new We,this.detachEvents=new We,this.parentContexts=Ft(Fy),this.location=Ft(Wr),this.changeDetector=Ft(Zn),this.environmentInjector=Ft(to)}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 pe(4012,yM);return this.activated.instance}get activatedRoute(){if(!this.activated)throw new pe(4012,yM);return this._activatedRoute}get activatedRouteData(){return this._activatedRoute?this._activatedRoute.snapshot.data:{}}detach(){if(!this.activated)throw new pe(4012,yM);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 pe(4013,yM);this._activatedRoute=e;const r=this.location,o=e.snapshot.component,a=this.parentContexts.getOrCreateContext(this.name).children,l=new Yq(e,a,r.injector);if(n&&function qq(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=ve({type:i,selectors:[["router-outlet"]],inputs:{name:"name"},outputs:{activateEvents:"activate",deactivateEvents:"deactivate",attachEvents:"attach",detachEvents:"detach"},exportAs:["outlet"],standalone:!0,features:[bi]}),i})();class Yq{constructor(t,e,n){this.route=t,this.childContexts=e,this.parent=n}get(t,e){return t===bm?this.route:t===Fy?this.childContexts:this.parent.get(t,e)}}let _I=(()=>{class i{}return i.\u0275fac=function(e){return new(e||i)},i.\u0275cmp=ot({type:i,selectors:[["ng-component"]],standalone:!0,features:[Z1],decls:1,vars:0,template:function(e,n){1&e&&De(0,"router-outlet")},dependencies:[S3],encapsulation:2}),i})();function E3(i,t){return i.providers&&!i._injector&&(i._injector=Fw(i.providers,t,`Route: ${i.path}`)),i._injector??t}function yI(i){const t=i.children&&i.children.map(yI),e=t?{...i,children:t}:{...i};return!e.component&&!e.loadComponent&&(t||e.loadChildren)&&e.outlet&&e.outlet!==_n&&(e.component=_I),e}function Da(i){return i.outlet||_n}function A3(i,t){const e=i.filter(n=>Da(n)===t);return e.push(...i.filter(n=>Da(n)!==t)),e}function Ly(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 Jq{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),pI(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]}),os(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 Fq(s.value.snapshot))}),t.children.length&&this.forwardEvent(new Pq(t.value.snapshot))}activateRoutes(t,e,n){const r=t.value,s=e?e.value:null;if(pI(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),pI(a.route.value),this.activateChildRoutes(t,null,o.children)}else{const a=Ly(r.snapshot),l=a?.get(Hl)??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 D3{constructor(t){this.path=t,this.route=this.path[this.path.length-1]}}class bM{constructor(t,e){this.component=t,this.route=e}}function eX(i,t,e){const n=i._root;return Ny(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 Cr(i){return null!==Gf(i)}(i)?t.get(i):i:n}function Ny(i,t,e,n,r={canDeactivateChecks:[],canActivateChecks:[]}){const s=ym(t);return i.children.forEach(o=>{(function nX(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 iX(i,t,e){if("function"==typeof e)return e(i,t);switch(e){case"pathParamsChange":return!Rh(i.url,t.url);case"pathParamsOrQueryParamsChange":return!Rh(i.url,t.url)||!Xl(i.queryParams,t.queryParams);case"always":return!0;case"paramsOrQueryParamsChange":return!mI(i,t)||!Xl(i.queryParams,t.queryParams);default:return!mI(i,t)}}(o,s,s.routeConfig.runGuardsAndResolvers);l?r.canActivateChecks.push(new D3(n)):(s.data=o.data,s._resolvedData=o._resolvedData),Ny(i,t,s.component?a?a.children:null:e,n,r),l&&a&&a.outlet&&a.outlet.isActivated&&r.canDeactivateChecks.push(new bM(a.outlet.component,o))}else o&&By(t,a,r),r.canActivateChecks.push(new D3(n)),Ny(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]}),os(s,(o,a)=>By(o,e.getContext(a),r)),r}function By(i,t,e){const n=ym(i),r=i.value;os(n,(s,o)=>{By(s,r.component?t?t.children.getContext(o):null:t,e)}),e.canDeactivateChecks.push(new bM(r.component&&t&&t.outlet&&t.outlet.isActivated?t.outlet.component:null,r))}function Uy(i){return"function"==typeof i}function bI(i){return i instanceof fm||"EmptyError"===i?.name}const xM=Symbol("INITIAL_VALUE");function wm(){return Rs(i=>nu(i.map(t=>t.pipe(Oi(1),Ao(xM)))).pipe(et(t=>{for(const e of t)if(!0!==e){if(e===xM)return xM;if(!1===e||e instanceof au)return e}return!0}),gn(t=>t!==xM),Oi(1)))}function T3(i){return function CE(...i){return a0(i)}(Vi(t=>{if(kh(t))throw x3(0,t)}),et(t=>!0===t))}const xI={matched:!1,consumedSegments:[],remainingSegments:[],parameters:{},positionalParamSegments:{}};function I3(i,t,e,n,r){const s=wI(i,t,e);return s.matched?function bX(i,t,e,n){const r=t.canMatch;return r&&0!==r.length?ht(r.map(o=>{const a=xm(o,i);return ou(function cX(i){return i&&Uy(i.canMatch)}(a)?a.canMatch(t,e):i.runInContext(()=>a(t,e)))})).pipe(wm(),T3()):ht(!0)}(n=E3(t,n),t,e).pipe(et(o=>!0===o?s:{...xI})):ht(s)}function wI(i,t,e){if(""===t.path)return"full"===t.pathMatch&&(i.hasChildren()||e.length>0)?{...xI}:{matched:!0,consumedSegments:[],remainingSegments:e,parameters:{},positionalParamSegments:{}};const r=(t.matcher||tq)(e,i,t);if(!r)return{...xI};const s={};os(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 wM(i,t,e,n){if(e.length>0&&function MX(i,t,e){return e.some(n=>MM(i,t,n)&&Da(n)!==_n)}(i,e,n)){const s=new Tn(t,function wX(i,t,e,n){const r={};r[_n]=n,n._sourceSegment=i,n._segmentIndexShift=t.length;for(const s of e)if(""===s.path&&Da(s)!==_n){const o=new Tn([],{});o._sourceSegment=i,o._segmentIndexShift=t.length,r[Da(s)]=o}return r}(i,t,n,new Tn(e,i.children)));return s._sourceSegment=i,s._segmentIndexShift=t.length,{segmentGroup:s,slicedSegments:[]}}if(0===e.length&&function CX(i,t,e){return e.some(n=>MM(i,t,n))}(i,e,n)){const s=new Tn(i.segments,function xX(i,t,e,n,r){const s={};for(const o of n)if(MM(i,e,o)&&!r[Da(o)]){const a=new Tn([],{});a._sourceSegment=i,a._segmentIndexShift=t.length,s[Da(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 Tn(i.segments,i.children);return r._sourceSegment=i,r._segmentIndexShift=t.length,{segmentGroup:r,slicedSegments:e}}function MM(i,t,e){return(!(i.hasChildren()||t.length>0)||"full"!==e.pathMatch)&&""===e.path}function R3(i,t,e,n){return!!(Da(i)===n||n!==_n&&MM(t,e,i))&&("**"===i.path||wI(t,i,e).matched)}function k3(i,t,e){return 0===t.length&&!i.children[e]}const CM=!1;class SM{constructor(t){this.segmentGroup=t||null}}class P3{constructor(t){this.urlTree=t}}function Vy(i){return pm(new SM(i))}function O3(i){return pm(new P3(i))}class DX{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=wM(this.urlTree.root,[],[],this.config).segmentGroup,e=new Tn(t.segments,t.children);return this.expandSegmentGroup(this.injector,this.config,e,_n).pipe(et(s=>this.createUrlTree(mM(s),this.urlTree.queryParams,this.urlTree.fragment))).pipe(Wc(s=>{if(s instanceof P3)return this.allowRedirects=!1,this.match(s.urlTree);throw s instanceof SM?this.noMatchError(s):s}))}match(t){return this.expandSegmentGroup(this.injector,this.config,t.root,_n).pipe(et(r=>this.createUrlTree(mM(r),t.queryParams,t.fragment))).pipe(Wc(r=>{throw r instanceof SM?this.noMatchError(r):r}))}noMatchError(t){return new pe(4002,CM)}createUrlTree(t,e,n){const r=sI(t);return new au(r,e,n)}expandSegmentGroup(t,e,n,r){return 0===n.segments.length&&n.hasChildren()?this.expandChildren(t,e,n).pipe(et(s=>new Tn([],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 Ni(r).pipe(ru(s=>{const o=n.children[s],a=A3(e,s);return this.expandSegmentGroup(t,a,o,s).pipe(et(l=>({segment:l,outlet:s})))}),tI((s,o)=>(s[o.outlet]=o.segment,s),{}),WB())}expandSegment(t,e,n,r,s,o){return Ni(n).pipe(ru(a=>this.expandSegmentAgainstRoute(t,e,n,a,r,s,o).pipe(Wc(c=>{if(c instanceof SM)return ht(null);throw c}))),iu(a=>!!a),Wc((a,l)=>{if(bI(a))return k3(e,r,s)?ht(new Tn([],{})):Vy(e);throw a}))}expandSegmentAgainstRoute(t,e,n,r,s,o,a){return R3(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):Vy(e):Vy(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("/")?O3(s):this.lineralizeSegments(n,s).pipe(ir(o=>{const a=new Tn(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:d}=wI(e,r,s);if(!a)return Vy(e);const h=this.applyRedirectCommands(l,r.redirectTo,d);return r.redirectTo.startsWith("/")?O3(h):this.lineralizeSegments(r,h).pipe(ir(p=>this.expandSegment(t,e,n,p.concat(c),o,!1)))}matchSegmentAgainstRoute(t,e,n,r,s){return"**"===n.path?(t=E3(n,t),n.loadChildren?(n._loadedRoutes?ht({routes:n._loadedRoutes,injector:n._loadedInjector}):this.configLoader.loadChildren(t,n)).pipe(et(a=>(n._loadedRoutes=a.routes,n._loadedInjector=a.injector,new Tn(r,{})))):ht(new Tn(r,{}))):I3(e,n,r,t).pipe(Rs(({matched:o,consumedSegments:a,remainingSegments:l})=>o?this.getChildConfig(t=n._injector??t,n,r).pipe(ir(d=>{const h=d.injector??t,p=d.routes,{segmentGroup:m,slicedSegments:g}=wM(e,a,l,p),b=new Tn(m.segments,m.children);if(0===g.length&&b.hasChildren())return this.expandChildren(h,p,b).pipe(et(x=>new Tn(a,x)));if(0===p.length&&0===g.length)return ht(new Tn(a,{}));const v=Da(n)===s;return this.expandSegment(h,b,p,g,v?_n:s,!0).pipe(et(M=>new Tn(a.concat(M.segments),M.children)))})):Vy(e)))}getChildConfig(t,e,n){return e.children?ht({routes:e.children,injector:t}):e.loadChildren?void 0!==e._loadedRoutes?ht({routes:e._loadedRoutes,injector:e._loadedInjector}):function yX(i,t,e,n){const r=t.canLoad;return void 0===r||0===r.length?ht(!0):ht(r.map(o=>{const a=xm(o,i);return ou(function sX(i){return i&&Uy(i.canLoad)}(a)?a.canLoad(t,e):i.runInContext(()=>a(t,e)))})).pipe(wm(),T3())}(t,e,n).pipe(ir(r=>r?this.configLoader.loadChildren(t,e).pipe(Vi(s=>{e._loadedRoutes=s.routes,e._loadedInjector=s.injector})):function EX(i){return pm(w3(CM,3))}())):ht({routes:[],injector:t})}lineralizeSegments(t,e){let n=[],r=e.root;for(;;){if(n=n.concat(r.segments),0===r.numberOfChildren)return ht(n);if(r.numberOfChildren>1||!r.children[_n])return t.redirectTo,pm(new pe(4e3,CM));r=r.children[_n]}}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 au(s,this.createQueryParams(e.queryParams,this.urlTree.queryParams),e.fragment)}createQueryParams(t,e){const n={};return os(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 os(e.children,(a,l)=>{o[l]=this.createSegmentGroup(t,a,n,r)}),new Tn(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 pe(4001,CM);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 IX{}class PX{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=wM(this.urlTree.root,[],[],this.config.filter(e=>void 0===e.redirectTo)).segmentGroup;return this.processSegmentGroup(this.injector,this.config,t,_n).pipe(et(e=>{if(null===e)return null;const n=new vM([],Object.freeze({}),Object.freeze({...this.urlTree.queryParams}),this.urlTree.fragment,{},_n,this.rootComponentType,null,this.urlTree.root,-1,{}),r=new jc(n,e),s=new y3(this.url,r);return this.inheritParamsAndData(s._root),s}))}inheritParamsAndData(t){const e=t.value,n=v3(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 Ni(Object.keys(n.children)).pipe(ru(r=>{const s=n.children[r],o=A3(e,r);return this.processSegmentGroup(t,o,s,r)}),tI((r,s)=>r&&s?(r.push(...s),r):null),jB(r=>null!==r),lM(null),WB(),et(r=>{if(null===r)return null;const s=L3(r);return function OX(i){i.sort((t,e)=>t.value.outlet===_n?-1:e.value.outlet===_n?1:t.value.outlet.localeCompare(e.value.outlet))}(s),s}))}processSegment(t,e,n,r,s){return Ni(e).pipe(ru(o=>this.processSegmentAgainstRoute(o._injector??t,o,n,r,s)),iu(o=>!!o),Wc(o=>{if(bI(o))return k3(n,r,s)?ht([]):ht(null);throw o}))}processSegmentAgainstRoute(t,e,n,r,s){if(e.redirectTo||!R3(e,n,r,s))return ht(null);let o;if("**"===e.path){const a=r.length>0?KB(r).parameters:{},l=B3(n)+r.length;o=ht({snapshot:new vM(r,a,Object.freeze({...this.urlTree.queryParams}),this.urlTree.fragment,U3(e),Da(e),e.component??e._loadedComponent??null,e,N3(n),l,V3(e)),consumedSegments:[],remainingSegments:[]})}else o=I3(n,e,r,t).pipe(et(({matched:a,consumedSegments:l,remainingSegments:c,parameters:d})=>{if(!a)return null;const h=B3(n)+l.length;return{snapshot:new vM(l,d,Object.freeze({...this.urlTree.queryParams}),this.urlTree.fragment,U3(e),Da(e),e.component??e._loadedComponent??null,e,N3(n),h,V3(e)),consumedSegments:l,remainingSegments:c}}));return o.pipe(Rs(a=>{if(null===a)return ht(null);const{snapshot:l,consumedSegments:c,remainingSegments:d}=a;t=e._injector??t;const h=e._loadedInjector??t,p=function FX(i){return i.children?i.children:i.loadChildren?i._loadedRoutes:[]}(e),{segmentGroup:m,slicedSegments:g}=wM(n,c,d,p.filter(v=>void 0===v.redirectTo));if(0===g.length&&m.hasChildren())return this.processChildren(h,p,m).pipe(et(v=>null===v?null:[new jc(l,v)]));if(0===p.length&&0===g.length)return ht([new jc(l,[])]);const b=Da(e)===s;return this.processSegment(h,p,m,g,b?_n:s).pipe(et(v=>null===v?null:[new jc(l,v)]))}))}}function LX(i){const t=i.value.routeConfig;return t&&""===t.path&&void 0===t.redirectTo}function L3(i){const t=[],e=new Set;for(const n of i){if(!LX(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=L3(n.children);t.push(new jc(n.value,r))}return t.filter(n=>!e.has(n))}function N3(i){let t=i;for(;t._sourceSegment;)t=t._sourceSegment;return t}function B3(i){let t=i,e=t._segmentIndexShift??0;for(;t._sourceSegment;)t=t._sourceSegment,e+=t._segmentIndexShift??0;return e-1}function U3(i){return i.data||{}}function V3(i){return i.resolve||{}}function z3(i){return"string"==typeof i.title||null===i.title}function MI(i){return Rs(t=>{const e=i(t);return e?Ni(e).pipe(et(()=>t)):ht(t)})}const Mm=new me("ROUTES");let CI=(()=>{class i{constructor(){this.componentLoaders=new WeakMap,this.childrenLoaders=new WeakMap,this.compiler=Ft(mN)}loadComponent(e){if(this.componentLoaders.get(e))return this.componentLoaders.get(e);if(e._loadedComponent)return ht(e._loadedComponent);this.onLoadStartListener&&this.onLoadStartListener(e);const n=ou(e.loadComponent()).pipe(et(G3),Vi(s=>{this.onLoadEndListener&&this.onLoadEndListener(e),e._loadedComponent=s}),su(()=>{this.componentLoaders.delete(e)})),r=new GB(n,()=>new Re).pipe(eI());return this.componentLoaders.set(e,r),r}loadChildren(e,n){if(this.childrenLoaders.get(n))return this.childrenLoaders.get(n);if(n._loadedRoutes)return ht({routes:n._loadedRoutes,injector:n._loadedInjector});this.onLoadStartListener&&this.onLoadStartListener(n);const s=this.loadModuleFactoryOrRoutes(n.loadChildren).pipe(et(a=>{this.onLoadEndListener&&this.onLoadEndListener(n);let l,c,d=!1;Array.isArray(a)?c=a:(l=a.create(e).injector,c=XB(l.get(Mm,[],Ot.Self|Ot.Optional)));return{routes:c.map(yI),injector:l}}),su(()=>{this.childrenLoaders.delete(n)})),o=new GB(s,()=>new Re).pipe(eI());return this.childrenLoaders.set(n,o),o}loadModuleFactoryOrRoutes(e){return ou(e()).pipe(et(G3),ir(n=>n instanceof D2||Array.isArray(n)?ht(n):Ni(this.compiler.compileModuleAsync(n))))}}return i.\u0275fac=function(e){return new(e||i)},i.\u0275prov=ke({token:i,factory:i.\u0275fac,providedIn:"root"}),i})();function G3(i){return function $X(i){return i&&"object"==typeof i&&"default"in i}(i)?i.default:i}let AM=(()=>{class i{get hasRequestedNavigation(){return 0!==this.navigationId}constructor(){this.currentNavigation=null,this.lastSuccessfulNavigation=null,this.events=new Re,this.configLoader=Ft(CI),this.environmentInjector=Ft(to),this.urlSerializer=Ft(Ty),this.rootContexts=Ft(Fy),this.navigationId=0,this.afterPreactivation=()=>ht(void 0),this.rootComponentType=null,this.configLoader.onLoadEndListener=r=>this.events.next(new Rq(r)),this.configLoader.onLoadStartListener=r=>this.events.next(new Iq(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 gt({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:Py,restoredState:null,currentSnapshot:e.routerState.snapshot,targetSnapshot:null,currentRouterState:e.routerState,targetRouterState:null,guards:{canActivateChecks:[],canDeactivateChecks:[]},guardsResult:null}),this.transitions.pipe(gn(n=>0!==n.id),et(n=>({...n,extractedUrl:e.urlHandlingStrategy.extract(n.rawUrl)})),Rs(n=>{let r=!1,s=!1;return ht(n).pipe(Vi(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}}),Rs(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 d="";return this.events.next(new _M(o.id,e.serializeUrl(n.rawUrl),d,0)),e.rawUrlTree=o.rawUrl,o.resolve(null),po}if(e.urlHandlingStrategy.shouldProcessUrl(o.rawUrl))return $3(o.source)&&(e.browserUrlTree=o.extractedUrl),ht(o).pipe(Rs(d=>{const h=this.transitions?.getValue();return this.events.next(new cI(d.id,this.urlSerializer.serialize(d.extractedUrl),d.source,d.restoredState)),h!==this.transitions?.getValue()?po:Promise.resolve(d)}),function TX(i,t,e,n){return Rs(r=>function AX(i,t,e,n,r){return new DX(i,t,e,n,r).apply()}(i,t,e,r.extractedUrl,n).pipe(et(s=>({...r,urlAfterRedirects:s}))))}(this.environmentInjector,this.configLoader,this.urlSerializer,e.config),Vi(d=>{this.currentNavigation={...this.currentNavigation,finalUrl:d.urlAfterRedirects},n.urlAfterRedirects=d.urlAfterRedirects}),function BX(i,t,e,n,r){return ir(s=>function kX(i,t,e,n,r,s,o="emptyOnly"){return new PX(i,t,e,n,r,o,s).recognize().pipe(Rs(a=>null===a?function RX(i){return new In(t=>t.error(i))}(new IX):ht(a)))}(i,t,e,s.urlAfterRedirects,n.serialize(s.urlAfterRedirects),n,r).pipe(et(o=>({...s,targetSnapshot:o}))))}(this.environmentInjector,this.rootComponentType,e.config,this.urlSerializer,e.paramsInheritanceStrategy),Vi(d=>{if(n.targetSnapshot=d.targetSnapshot,"eager"===e.urlUpdateStrategy){if(!d.extras.skipLocationChange){const p=e.urlHandlingStrategy.merge(d.urlAfterRedirects,d.rawUrl);e.setBrowserUrl(p,d)}e.browserUrlTree=d.urlAfterRedirects}const h=new Sq(d.id,this.urlSerializer.serialize(d.extractedUrl),this.urlSerializer.serialize(d.urlAfterRedirects),d.targetSnapshot);this.events.next(h)}));if(l&&e.urlHandlingStrategy.shouldProcessUrl(e.rawUrlTree)){const{id:d,extractedUrl:h,source:p,restoredState:m,extras:g}=o,b=new cI(d,this.urlSerializer.serialize(h),p,m);this.events.next(b);const v=_3(h,this.rootComponentType).snapshot;return ht(n={...o,targetSnapshot:v,urlAfterRedirects:h,extras:{...g,skipLocationChange:!1,replaceUrl:!1}})}{const d="";return this.events.next(new _M(o.id,e.serializeUrl(n.extractedUrl),d,1)),e.rawUrlTree=o.rawUrl,o.resolve(null),po}}),Vi(o=>{const a=new Eq(o.id,this.urlSerializer.serialize(o.extractedUrl),this.urlSerializer.serialize(o.urlAfterRedirects),o.targetSnapshot);this.events.next(a)}),et(o=>n={...o,guards:eX(o.targetSnapshot,o.currentSnapshot,this.rootContexts)}),function uX(i,t){return ir(e=>{const{targetSnapshot:n,currentSnapshot:r,guards:{canActivateChecks:s,canDeactivateChecks:o}}=e;return 0===o.length&&0===s.length?ht({...e,guardsResult:!0}):function hX(i,t,e,n){return Ni(i).pipe(ir(r=>function vX(i,t,e,n,r){const s=t&&t.routeConfig?t.routeConfig.canDeactivate:null;return s&&0!==s.length?ht(s.map(a=>{const l=Ly(t)??r,c=xm(a,l);return ou(function lX(i){return i&&Uy(i.canDeactivate)}(c)?c.canDeactivate(i,t,e,n):l.runInContext(()=>c(i,t,e,n))).pipe(iu())})).pipe(wm()):ht(!0)}(r.component,r.route,e,t,n)),iu(r=>!0!==r,!0))}(o,n,r,i).pipe(ir(a=>a&&function rX(i){return"boolean"==typeof i}(a)?function fX(i,t,e,n){return Ni(t).pipe(ru(r=>Sy(function mX(i,t){return null!==i&&t&&t(new kq(i)),ht(!0)}(r.route.parent,n),function pX(i,t){return null!==i&&t&&t(new Oq(i)),ht(!0)}(r.route,n),function _X(i,t,e){const n=t[t.length-1],s=t.slice(0,t.length-1).reverse().map(o=>function tX(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=>Ey(()=>ht(o.guards.map(l=>{const c=Ly(o.node)??e,d=xm(l,c);return ou(function aX(i){return i&&Uy(i.canActivateChild)}(d)?d.canActivateChild(n,i):c.runInContext(()=>d(n,i))).pipe(iu())})).pipe(wm())));return ht(s).pipe(wm())}(i,r.path,e),function gX(i,t,e){const n=t.routeConfig?t.routeConfig.canActivate:null;if(!n||0===n.length)return ht(!0);const r=n.map(s=>Ey(()=>{const o=Ly(t)??e,a=xm(s,o);return ou(function oX(i){return i&&Uy(i.canActivate)}(a)?a.canActivate(t,i):o.runInContext(()=>a(t,i))).pipe(iu())}));return ht(r).pipe(wm())}(i,r.route,e))),iu(r=>!0!==r,!0))}(n,s,i,t):ht(a)),et(a=>({...e,guardsResult:a})))})}(this.environmentInjector,o=>this.events.next(o)),Vi(o=>{if(n.guardsResult=o.guardsResult,kh(o.guardsResult))throw x3(0,o.guardsResult);const a=new Aq(o.id,this.urlSerializer.serialize(o.extractedUrl),this.urlSerializer.serialize(o.urlAfterRedirects),o.targetSnapshot,!!o.guardsResult);this.events.next(a)}),gn(o=>!!o.guardsResult||(e.restoreHistory(o),this.cancelNavigationTransition(o,"",3),!1)),MI(o=>{if(o.guards.canActivateChecks.length)return ht(o).pipe(Vi(a=>{const l=new Dq(a.id,this.urlSerializer.serialize(a.extractedUrl),this.urlSerializer.serialize(a.urlAfterRedirects),a.targetSnapshot);this.events.next(l)}),Rs(a=>{let l=!1;return ht(a).pipe(function UX(i,t){return ir(e=>{const{targetSnapshot:n,guards:{canActivateChecks:r}}=e;if(!r.length)return ht(e);let s=0;return Ni(r).pipe(ru(o=>function VX(i,t,e,n){const r=i.routeConfig,s=i._resolve;return void 0!==r?.title&&!z3(r)&&(s[Ay]=r.title),function zX(i,t,e,n){const r=function HX(i){return[...Object.keys(i),...Object.getOwnPropertySymbols(i)]}(i);if(0===r.length)return ht({});const s={};return Ni(r).pipe(ir(o=>function GX(i,t,e,n){const r=Ly(t)??n,s=xm(i,r);return ou(s.resolve?s.resolve(t,e):r.runInContext(()=>s(t,e)))}(i[o],t,e,n).pipe(iu(),Vi(a=>{s[o]=a}))),nI(1),YB(s),Wc(o=>bI(o)?po:pm(o)))}(s,i,t,n).pipe(et(o=>(i._resolvedData=o,i.data=v3(i,e).resolve,r&&z3(r)&&(i.data[Ay]=r.title),null)))}(o.route,n,i,t)),Vi(()=>s++),nI(1),ir(o=>s===r.length?ht(e):po))})}(e.paramsInheritanceStrategy,this.environmentInjector),Vi({next:()=>l=!0,complete:()=>{l||(e.restoreHistory(a),this.cancelNavigationTransition(a,"",2))}}))}),Vi(a=>{const l=new Tq(a.id,this.urlSerializer.serialize(a.extractedUrl),this.urlSerializer.serialize(a.urlAfterRedirects),a.targetSnapshot);this.events.next(l)}))}),MI(o=>{const a=l=>{const c=[];l.routeConfig?.loadComponent&&!l.routeConfig._loadedComponent&&c.push(this.configLoader.loadComponent(l.routeConfig).pipe(Vi(d=>{l.component=d}),et(()=>{})));for(const d of l.children)c.push(...a(d));return c};return nu(a(o.targetSnapshot.root)).pipe(lM(),Oi(1))}),MI(()=>this.afterPreactivation()),et(o=>{const a=function Gq(i,t,e){const n=Oy(i,t._root,e?e._root:void 0);return new g3(n,t)}(e.routeReuseStrategy,o.targetSnapshot,o.currentRouterState);return n={...o,targetRouterState:a}}),Vi(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)=>et(n=>(new Jq(t,n.targetRouterState,n.currentRouterState,e).activate(i),n)))(this.rootContexts,e.routeReuseStrategy,o=>this.events.next(o)),Oi(1),Vi({next:o=>{r=!0,this.lastSuccessfulNavigation=this.currentNavigation,e.navigated=!0,this.events.next(new Ph(o.id,this.urlSerializer.serialize(o.extractedUrl),this.urlSerializer.serialize(e.currentUrlTree))),e.titleStrategy?.updateTitle(o.targetRouterState.snapshot),o.resolve(!0)},complete:()=>{r=!0}}),su(()=>{r||s||this.cancelNavigationTransition(n,"",1),this.currentNavigation?.id===n.id&&(this.currentNavigation=null)}),Wc(o=>{if(s=!0,C3(o)){M3(o)||(e.navigated=!0,e.restoreHistory(n,!0));const a=new gM(n.id,this.urlSerializer.serialize(n.extractedUrl),o.message,o.cancellationCode);if(this.events.next(a),M3(o)){const l=e.urlHandlingStrategy.merge(o.url,e.rawUrlTree),c={skipLocationChange:n.extras.skipLocationChange,replaceUrl:"eager"===e.urlUpdateStrategy||$3(n.source)};e.scheduleNavigation(l,Py,null,c,{resolve:n.resolve,reject:n.reject,promise:n.promise})}else n.resolve(!1)}else{e.restoreHistory(n,!0);const a=new dI(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 po}))}))}cancelNavigationTransition(e,n,r){const s=new gM(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=ke({token:i,factory:i.\u0275fac,providedIn:"root"}),i})();function $3(i){return i!==Py}let W3=(()=>{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===_n);return n}getResolvedTitleForRoute(e){return e.data[Ay]}}return i.\u0275fac=function(e){return new(e||i)},i.\u0275prov=ke({token:i,factory:function(){return Ft(WX)},providedIn:"root"}),i})(),WX=(()=>{class i extends W3{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)(ee(LB))},i.\u0275prov=ke({token:i,factory:i.\u0275fac,providedIn:"root"}),i})(),jX=(()=>{class i{}return i.\u0275fac=function(e){return new(e||i)},i.\u0275prov=ke({token:i,factory:function(){return Ft(qX)},providedIn:"root"}),i})();class YX{shouldDetach(t){return!1}store(t,e){}shouldAttach(t){return!1}retrieve(t){return null}shouldReuseRoute(t,e){return t.routeConfig===e.routeConfig}}let qX=(()=>{class i extends YX{}return i.\u0275fac=function(){let t;return function(n){return(t||(t=ri(i)))(n||i)}}(),i.\u0275prov=ke({token:i,factory:i.\u0275fac,providedIn:"root"}),i})();const DM=new me("",{providedIn:"root",factory:()=>({})});let KX=(()=>{class i{}return i.\u0275fac=function(e){return new(e||i)},i.\u0275prov=ke({token:i,factory:function(){return Ft(ZX)},providedIn:"root"}),i})(),ZX=(()=>{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=ke({token:i,factory:i.\u0275fac,providedIn:"root"}),i})();function QX(i){throw i}function JX(i,t,e){return t.parse("/")}const eK={paths:"exact",fragment:"ignored",matrixParams:"ignored",queryParams:"exact"},tK={paths:"subset",fragment:"ignored",matrixParams:"ignored",queryParams:"subset"};let Yo=(()=>{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=Ft(F6),this.isNgZoneEnabled=!1,this.options=Ft(DM,{optional:!0})||{},this.errorHandler=this.options.errorHandler||QX,this.malformedUriErrorHandler=this.options.malformedUriErrorHandler||JX,this.navigated=!1,this.lastSuccessfulId=-1,this.urlHandlingStrategy=Ft(KX),this.routeReuseStrategy=Ft(jX),this.urlCreationStrategy=Ft(Vq),this.titleStrategy=Ft(W3),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=XB(Ft(Mm,{optional:!0})??[]),this.navigationTransitions=Ft(AM),this.urlSerializer=Ft(Ty),this.location=Ft(_y),this.isNgZoneEnabled=Ft(ft)instanceof ft&&ft.isInAngularZone(),this.resetConfig(this.config),this.currentUrlTree=new au,this.rawUrlTree=this.currentUrlTree,this.browserUrlTree=this.currentUrlTree,this.routerState=_3(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),Py,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(yI),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 d=null;switch(a){case"merge":d={...this.currentUrlTree.queryParams,...s};break;case"preserve":d=this.currentUrlTree.queryParams;break;default:d=s||null}return null!==d&&(d=this.removeEmptyProps(d)),this.urlCreationStrategy.createUrlTree(r,this.routerState,this.currentUrlTree,e,d,c??null)}navigateByUrl(e,n={skipLocationChange:!1}){const r=kh(e)?e:this.parseUrl(e),s=this.urlHandlingStrategy.merge(r,this.rawUrlTree);return this.scheduleNavigation(s,Py,null,n)}navigate(e,n={skipLocationChange:!1}){return function nK(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,d;return o?(a=o.resolve,l=o.reject,c=o.promise):c=new Promise((h,p)=>{a=h,l=p}),d="computed"===this.canceledNavigationResolution?r&&r.\u0275routerPageId?r.\u0275routerPageId:(this.browserPageId??0)+1:0,this.navigationTransitions.handleNavigationRequest({targetPageId:d,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=ke({token:i,factory:i.\u0275fac,providedIn:"root"}),i})();class j3{}let sK=(()=>{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(gn(e=>e instanceof Ph),ru(()=>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=Fw(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 Ni(r).pipe(yd())}preloadConfig(e,n){return this.preloadingStrategy.preload(n,()=>{let r;r=n.loadChildren&&void 0===n.canLoad?this.loader.loadChildren(e,n):ht(null);const s=r.pipe(ir(o=>null===o?ht(void 0):(n._loadedRoutes=o.routes,n._loadedInjector=o.injector,this.processRoutes(o.injector??e,o.routes))));return n.loadComponent&&!n._loadedComponent?Ni([s,this.loader.loadComponent(n)]).pipe(yd()):s})}}return i.\u0275fac=function(e){return new(e||i)(ee(Yo),ee(mN),ee(to),ee(j3),ee(CI))},i.\u0275prov=ke({token:i,factory:i.\u0275fac,providedIn:"root"}),i})();const AI=new me("");let Y3=(()=>{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 cI?(this.store[this.lastId]=this.viewportScroller.getScrollPosition(),this.lastSource=e.navigationTrigger,this.restoredId=e.restoredState?e.restoredState.navigationId:0):e instanceof Ph&&(this.lastId=e.id,this.scheduleScrollEvent(e,this.urlSerializer.parse(e.urlAfterRedirects).fragment))})}consumeScrollEvents(){return this.transitions.events.subscribe(e=>{e instanceof p3&&(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 p3(e,"popstate"===this.lastSource?this.store[this.restoredId]:null,n))})},0)})}ngOnDestroy(){this.routerEventsSubscription?.unsubscribe(),this.scrollEventsSubscription?.unsubscribe()}}return i.\u0275fac=function(e){xo()},i.\u0275prov=ke({token:i,factory:i.\u0275fac}),i})();var qo=(()=>((qo=qo||{})[qo.COMPLETE=0]="COMPLETE",qo[qo.FAILED=1]="FAILED",qo[qo.REDIRECTING=2]="REDIRECTING",qo))();const Cm=!1;function lu(i,t){return{\u0275kind:i,\u0275providers:t}}const DI=new me("",{providedIn:"root",factory:()=>!1});function X3(){const i=Ft($i);return t=>{const e=i.get(dm);if(t!==e.components[0])return;const n=i.get(Yo),r=i.get(K3);1===i.get(TI)&&n.initialNavigation(),i.get(Z3,null,Ot.Optional)?.setUpPreloading(),i.get(AI,null,Ot.Optional)?.init(),n.resetRootComponentType(e.componentTypes[0]),r.closed||(r.next(),r.complete(),r.unsubscribe())}}const K3=new me(Cm?"bootstrap done indicator":"",{factory:()=>new Re}),TI=new me(Cm?"initial navigation":"",{providedIn:"root",factory:()=>1});function dK(){let i=[];return i=Cm?[{provide:Np,multi:!0,useFactory:()=>{const t=Ft(Yo);return()=>t.events.subscribe(e=>{console.group?.(`Router Event: ${e.constructor.name}`),console.log(function Lq(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?.()})}}]:[],lu(1,i)}const Z3=new me(Cm?"router preloader":"");function uK(i){return lu(0,[{provide:Z3,useExisting:sK},{provide:j3,useExisting:i}])}const zy=!1,Q3=new me(zy?"router duplicate forRoot guard":"ROUTER_FORROOT_GUARD"),hK=[_y,{provide:Ty,useClass:iI},Yo,Fy,{provide:bm,useFactory:function q3(i){return i.routerState.root},deps:[Yo]},CI,zy?{provide:DI,useValue:!0}:[]];function fK(){return new MN("Router",Yo)}let J3=(()=>{class i{constructor(e){}static forRoot(e,n){return{ngModule:i,providers:[hK,zy&&n?.enableTracing?dK().\u0275providers:[],{provide:Mm,multi:!0,useValue:e},{provide:Q3,useFactory:_K,deps:[[Yo,new Ss,new xa]]},{provide:DM,useValue:n||{}},n?.useHash?{provide:Ih,useClass:M9}:{provide:Ih,useClass:jN},{provide:AI,useFactory:()=>{const i=Ft(BY),t=Ft(ft),e=Ft(DM),n=Ft(AM),r=Ft(Ty);return e.scrollOffset&&i.setOffset(e.scrollOffset),new Y3(r,n,i,t,e)}},n?.preloadingStrategy?uK(n.preloadingStrategy).\u0275providers:[],{provide:MN,multi:!0,useFactory:fK},n?.initialNavigation?vK(n):[],[{provide:eU,useFactory:X3},{provide:wN,multi:!0,useExisting:eU}]]}}static forChild(e){return{ngModule:i,providers:[{provide:Mm,multi:!0,useValue:e}]}}}return i.\u0275fac=function(e){return new(e||i)(ee(Q3,8))},i.\u0275mod=nn({type:i}),i.\u0275inj=Kt({imports:[_I]}),i})();function _K(i){if(zy&&i)throw new pe(4007,"The Router was provided more than once. This can happen if 'forRoot' is used outside of the root injector. Lazy loaded modules should use RouterModule.forChild() instead.");return"guarded"}function vK(i){return["disabled"===i.initialNavigation?lu(3,[{provide:Uw,multi:!0,useFactory:()=>{const t=Ft(Yo);return()=>{t.setUpLocationChangeListener()}}},{provide:TI,useValue:2}]).\u0275providers:[],"enabledBlocking"===i.initialNavigation?lu(2,[{provide:TI,useValue:0},{provide:Uw,multi:!0,deps:[$i],useFactory:t=>{const e=t.get(x9,Promise.resolve());return()=>e.then(()=>new Promise(n=>{const r=t.get(Yo),s=t.get(K3);(function oK(i,t){i.events.pipe(gn(e=>e instanceof Ph||e instanceof gM||e instanceof dI||e instanceof _M),et(e=>e instanceof Ph||e instanceof _M?qo.COMPLETE:e instanceof gM&&(0===e.code||1===e.code)?qo.REDIRECTING:qo.FAILED),gn(e=>e!==qo.REDIRECTING),Oi(1)).subscribe(()=>{t()})})(r,()=>{n(!0)}),t.get(AM).afterPreactivation=()=>(n(!0),s.closed?ht(void 0):s),r.initialNavigation()}))}}]).\u0275providers:[]]}const eU=new me(zy?"Router Initializer":""),bK=[];let xK=(()=>{class i{}return i.\u0275fac=function(e){return new(e||i)},i.\u0275mod=nn({type:i}),i.\u0275inj=Kt({imports:[J3.forRoot(bK),J3]}),i})();function tU(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 tt(i){return function(){var t=this,e=arguments;return new Promise(function(n,r){var s=i.apply(t,e);function o(l){tU(s,n,r,o,a,"next",l)}function a(l){tU(s,n,r,o,a,"throw",l)}o(void 0)})}}function Jt(i){return null!=i&&"false"!=`${i}`}function ks(i,t=0){return function wK(i){return!isNaN(parseFloat(i))&&!isNaN(Number(i))}(i)?Number(i):t}function TM(i){return Array.isArray(i)?i:[i]}function gr(i){return null==i?"":"string"==typeof i?i:`${i}px`}function Yc(i){return i instanceof mt?i.nativeElement:i}const MK=["addListener","removeListener"],CK=["addEventListener","removeEventListener"],SK=["on","off"];function Ta(i,t,e,n){if(cn(e)&&(n=e,e=void 0),n)return Ta(i,t,e).pipe(JT(n));const[r,s]=function DK(i){return cn(i.addEventListener)&&cn(i.removeEventListener)}(i)?CK.map(o=>a=>i[o](t,a,e)):function EK(i){return cn(i.addListener)&&cn(i.removeListener)}(i)?MK.map(nU(i,t)):function AK(i){return cn(i.on)&&cn(i.off)}(i)?SK.map(nU(i,t)):[];if(!r&&i_(i))return ir(o=>Ta(o,t,e))(wr(i));if(!r)throw new TypeError("Invalid event target");return new In(o=>{const a=(...l)=>o.next(1s(a)})}function nU(i,t){return e=>n=>i[e](t,n)}class TK extends Zt{constructor(t,e){super()}schedule(t,e=0){return this}}const IM={setInterval(i,t,...e){const{delegate:n}=IM;return n?.setInterval?n.setInterval(i,t,...e):setInterval(i,t,...e)},clearInterval(i){const{delegate:t}=IM;return(t?.clearInterval||clearInterval)(i)},delegate:void 0};class II extends TK{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 IM.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&&IM.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,Kr(n,this),null!=t&&(this.id=this.recycleAsyncId(e,t,null)),this.delay=null,super.unsubscribe()}}}const Hy={schedule(i){let t=requestAnimationFrame,e=cancelAnimationFrame;const{delegate:n}=Hy;n&&(t=n.requestAnimationFrame,e=n.cancelAnimationFrame);const r=t(s=>{e=void 0,i(s)});return new Zt(()=>e?.(r))},requestAnimationFrame(...i){const{delegate:t}=Hy;return(t?.requestAnimationFrame||requestAnimationFrame)(...i)},cancelAnimationFrame(...i){const{delegate:t}=Hy;return(t?.cancelAnimationFrame||cancelAnimationFrame)(...i)},delegate:void 0},iU={now:()=>(iU.delegate||Date).now(),delegate:void 0};class Gy{constructor(t,e=Gy.now){this.schedulerActionCtor=t,this.now=e}schedule(t,e=0,n){return new this.schedulerActionCtor(this,t).schedule(n,e)}}Gy.now=iU.now;class RI extends Gy{constructor(t,e=Gy.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 kK=new class RK extends RI{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 IK extends II{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=Hy.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&&(Hy.cancelAnimationFrame(e),t._scheduled=void 0)}});let kI,PK=1;const RM={};function rU(i){return i in RM&&(delete RM[i],!0)}const OK={setImmediate(i){const t=PK++;return RM[t]=!0,kI||(kI=Promise.resolve()),kI.then(()=>rU(t)&&i()),t},clearImmediate(i){rU(i)}},{setImmediate:FK,clearImmediate:LK}=OK,kM={setImmediate(...i){const{delegate:t}=kM;return(t?.setImmediate||FK)(...i)},clearImmediate(i){const{delegate:t}=kM;return(t?.clearImmediate||LK)(i)},delegate:void 0},PI=new class BK extends RI{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 NK extends II{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=kM.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&&(kM.clearImmediate(e),t._scheduled===e&&(t._scheduled=void 0))}}),$y=new RI(II),UK=$y;function OI(i=0,t,e=UK){let n=-1;return null!=t&&(Gu(t)?e=t:n=t),new In(r=>{let s=function zK(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 PM(i,t=$y){return function VK(i){return ti((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(Yn(e,c=>{n=!0,r=c,s||wr(i(c)).subscribe(s=Yn(e,a,l))},()=>{o=!0,(!n||!s||s.closed)&&e.complete()}))})}(()=>OI(i,t))}function He(i){return ti((t,e)=>{wr(i).subscribe(Yn(e,()=>e.complete(),ms)),!e.closed&&t.subscribe(e)})}let FI;try{FI=typeof Intl<"u"&&Intl.v8BreakIterator}catch{FI=!1}let Sm,zi=(()=>{class i{constructor(e){this._platformId=e,this.isBrowser=this._platformId?function NY(i){return i===hB}(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&&!FI)&&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)(ee(fT))},i.\u0275prov=ke({token:i,factory:i.\u0275fac,providedIn:"root"}),i})();const sU=["color","button","checkbox","date","datetime-local","email","file","hidden","image","month","number","password","radio","range","reset","search","submit","tel","text","time","url","week"];function oU(){if(Sm)return Sm;if("object"!=typeof document||!document)return Sm=new Set(sU),Sm;let i=document.createElement("input");return Sm=new Set(sU.filter(t=>(i.setAttribute("type",t),i.type===t))),Sm}let Wy,OM,Fh,LI;function Oh(i){return function HK(){if(null==Wy&&typeof window<"u")try{window.addEventListener("test",null,Object.defineProperty({},"passive",{get:()=>Wy=!0}))}finally{Wy=Wy||!1}return Wy}()?i:!!i.capture}function aU(){if(null==Fh){if("object"!=typeof document||!document||"function"!=typeof Element||!Element)return Fh=!1,Fh;if("scrollBehavior"in document.documentElement.style)Fh=!0;else{const i=Element.prototype.scrollTo;Fh=!!i&&!/\{\s*\[native code\]\s*\}/.test(i.toString())}}return Fh}function jy(){if("object"!=typeof document||!document)return 0;if(null==OM){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),OM=0,0===i.scrollLeft&&(i.scrollLeft=1,OM=0===i.scrollLeft?1:2),i.remove()}return OM}function FM(){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 cu(i){return i.composedPath?i.composedPath()[0]:i.target}function NI(){return typeof __karma__<"u"&&!!__karma__||typeof jasmine<"u"&&!!jasmine||typeof jest<"u"&&!!jest||typeof Mocha<"u"&&!!Mocha}const WK=new me("cdk-dir-doc",{providedIn:"root",factory:function jK(){return Ft(jt)}}),YK=/^(ar|ckb|dv|he|iw|fa|nqo|ps|sd|ug|ur|yi|.*[-_](Adlm|Arab|Hebr|Nkoo|Rohg|Thaa))(?!.*[-_](Latn|Cyrl)($|-|_))($|-|_)/i;let Ia=(()=>{class i{constructor(e){this.value="ltr",this.change=new We,e&&(this.value=function qK(i){const t=i?.toLowerCase()||"";return"auto"===t&&typeof navigator<"u"&&navigator?.language?YK.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)(ee(WK,8))},i.\u0275prov=ke({token:i,factory:i.\u0275fac,providedIn:"root"}),i})(),Yy=(()=>{class i{}return i.\u0275fac=function(e){return new(e||i)},i.\u0275mod=nn({type:i}),i.\u0275inj=Kt({}),i})();const XK=["contentWrapper"],KK=["*"],ZK=new me("VIRTUAL_SCROLL_STRATEGY");let qy=(()=>{class i{constructor(e,n,r){this._ngZone=e,this._platform=n,this._scrolled=new Re,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 In(n=>{this._globalSubscription||this._addGlobalListener();const r=e>0?this._scrolled.pipe(PM(e)).subscribe(n):this._scrolled.subscribe(n);return this._scrolledCount++,()=>{r.unsubscribe(),this._scrolledCount--,this._scrolledCount||this._removeGlobalListener()}}):ht()}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(gn(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=Yc(n),s=e.getElementRef().nativeElement;do{if(r==s)return!0}while(r=r.parentElement);return!1}_addGlobalListener(){this._globalSubscription=this._ngZone.runOutsideAngular(()=>Ta(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)(ee(ft),ee(zi),ee(jt,8))},i.\u0275prov=ke({token:i,factory:i.\u0275fac,providedIn:"root"}),i})(),lU=(()=>{class i{constructor(e,n,r,s){this.elementRef=e,this.scrollDispatcher=n,this.ngZone=r,this.dir=s,this._destroyed=new Re,this._elementScrolled=new In(o=>this.ngZone.runOutsideAngular(()=>Ta(this.elementRef.nativeElement,"scroll").pipe(He(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!=jy()?(null!=e.left&&(e.right=n.scrollWidth-n.clientWidth-e.left),2==jy()?e.left=e.right:1==jy()&&(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;aU()?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==jy()?e==n?s.scrollWidth-s.clientWidth-s.scrollLeft:s.scrollLeft:o&&1==jy()?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)(E(mt),E(qy),E(ft),E(Ia,8))},i.\u0275dir=ve({type:i,selectors:[["","cdk-scrollable",""],["","cdkScrollable",""]],standalone:!0}),i})(),LM=(()=>{class i{constructor(e,n,r){this._platform=e,this._change=new Re,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(PM(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)(ee(zi),ee(ft),ee(jt,8))},i.\u0275prov=ke({token:i,factory:i.\u0275fac,providedIn:"root"}),i})();const cU=new me("VIRTUAL_SCROLLABLE");let eZ=(()=>{class i extends lU{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)(E(mt),E(qy),E(ft),E(Ia,8))},i.\u0275dir=ve({type:i,features:[lt]}),i})();const nZ=typeof requestAnimationFrame<"u"?kK:PI;let iZ=(()=>{class i extends eZ{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=Ft(zi),this._detachedSubject=new Re,this._renderedRangeSubject=new Re,this._orientation="vertical",this._appendOnly=!1,this.scrolledIndexChange=new In(d=>this._scrollStrategy.scrolledIndexChange.subscribe(h=>Promise.resolve().then(()=>this.ngZone.run(()=>d.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=Zt.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(Ao(null),PM(0,nZ)).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(He(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 tZ(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)(E(mt),E(Zn),E(ft),E(ZK,8),E(Ia,8),E(qy),E(LM),E(cU,8))},i.\u0275cmp=ot({type:i,selectors:[["cdk-virtual-scroll-viewport"]],viewQuery:function(e,n){if(1&e&&Wn(XK,7),2&e){let r;Et(r=At())&&(n._contentWrapper=r.first)}},hostAttrs:[1,"cdk-virtual-scroll-viewport"],hostVars:4,hostBindings:function(e,n){2&e&&un("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:[Dn([{provide:lU,useFactory:(t,e)=>t||e,deps:[[new Ss,new vo(cU)],i]}]),lt,Z1],ngContentSelectors:KK,decls:4,vars:4,consts:[[1,"cdk-virtual-scroll-content-wrapper"],["contentWrapper",""],[1,"cdk-virtual-scroll-spacer"]],template:function(e,n){1&e&&(sr(),W(0,"div",0,1),Wt(2),j(),De(3,"div",2)),2&e&&(G(3),jo("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})(),Xy=(()=>{class i{}return i.\u0275fac=function(e){return new(e||i)},i.\u0275mod=nn({type:i}),i.\u0275inj=Kt({}),i})(),dU=(()=>{class i{}return i.\u0275fac=function(e){return new(e||i)},i.\u0275mod=nn({type:i}),i.\u0275inj=Kt({imports:[Yy,Xy,iZ,Yy,Xy]}),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 Lh 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 rZ extends BI{constructor(t){super(),this.element=t instanceof mt?t.nativeElement:t}}class NM{constructor(){this._isDisposed=!1,this.attachDomPortal=null}hasAttached(){return!!this._attachedPortal}attach(t){return t instanceof Lh?(this._attachedPortal=t,this.attachComponentPortal(t)):t instanceof Em?(this._attachedPortal=t,this.attachTemplatePortal(t)):this.attachDomPortal&&t instanceof rZ?(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 sZ extends NM{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||$i.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 NM{constructor(e,n,r){super(),this._componentFactoryResolver=e,this._viewContainerRef=n,this._isInitialized=!1,this.attached=new We,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)(E(Hl),E(Wr),E(jt))},i.\u0275dir=ve({type:i,selectors:[["","cdkPortalOutlet",""]],inputs:{portal:["cdkPortalOutlet","portal"]},outputs:{attached:"attached"},exportAs:["cdkPortalOutlet"],features:[lt]}),i})(),Nh=(()=>{class i{}return i.\u0275fac=function(e){return new(e||i)},i.\u0275mod=nn({type:i}),i.\u0275inj=Kt({}),i})();function Xo(i,...t){return t.length?t.some(e=>i[e]):i.altKey||i.shiftKey||i.ctrlKey||i.metaKey}const uU=aU();class yZ{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=gr(-this._previousScrollPosition.left),t.style.top=gr(-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"),uU&&(n.scrollBehavior=r.scrollBehavior="auto"),window.scroll(this._previousScrollPosition.left,this._previousScrollPosition.top),uU&&(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 bZ{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(gn(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 hU{enable(){}disable(){}attach(){}}function VI(i,t){return t.some(e=>i.bottome.bottom||i.righte.right)}function fU(i,t){return t.some(e=>i.tope.bottom||i.lefte.right)}class xZ{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();VI(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 wZ=(()=>{class i{constructor(e,n,r,s){this._scrollDispatcher=e,this._viewportRuler=n,this._ngZone=r,this.noop=()=>new hU,this.close=o=>new bZ(this._scrollDispatcher,this._ngZone,this._viewportRuler,o),this.block=()=>new yZ(this._viewportRuler,this._document),this.reposition=o=>new xZ(this._scrollDispatcher,this._viewportRuler,this._ngZone,o),this._document=s}}return i.\u0275fac=function(e){return new(e||i)(ee(qy),ee(LM),ee(ft),ee(jt))},i.\u0275prov=ke({token:i,factory:i.\u0275fac,providedIn:"root"}),i})();class km{constructor(t){if(this.scrollStrategy=new hU,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 MZ{constructor(t,e){this.connectionPair=t,this.scrollableViewProperties=e}}let pU=(()=>{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)(ee(jt))},i.\u0275prov=ke({token:i,factory:i.\u0275fac,providedIn:"root"}),i})(),CZ=(()=>{class i extends pU{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)(ee(jt),ee(ft,8))},i.\u0275prov=ke({token:i,factory:i.\u0275fac,providedIn:"root"}),i})(),SZ=(()=>{class i extends pU{constructor(e,n,r){super(e),this._platform=n,this._ngZone=r,this._cursorStyleIsSet=!1,this._pointerDownListener=s=>{this._pointerDownEventTarget=cu(s)},this._clickListener=s=>{const o=cu(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 d=l[c];if(d._outsidePointerEvents.observers.length<1||!d.hasAttached())continue;if(d.overlayElement.contains(o)||d.overlayElement.contains(a))break;const h=d._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)(ee(jt),ee(zi),ee(ft,8))},i.\u0275prov=ke({token:i,factory:i.\u0275fac,providedIn:"root"}),i})(),VM=(()=>{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||NI()){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 Re,this._outsidePointerEvents=new Re,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(Oi(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=gr(this._config.width),t.height=gr(this._config.height),t.minWidth=gr(this._config.minWidth),t.minHeight=gr(this._config.minHeight),t.maxWidth=gr(this._config.maxWidth),t.maxHeight=gr(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=TM(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(He(Mr(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 mU="cdk-overlay-connected-position-bounding-box",EZ=/([A-Za-z%]+)$/;class AZ{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 Re,this._resizeSubscription=Zt.EMPTY,this._offsetX=0,this._offsetY=0,this._appliedPanelClasses=[],this.positionChanges=this._positionChanges,this.setOrigin(t)}attach(t){this._validatePositions(),t.hostElement.classList.add(mU),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),d=this._getOverlayFit(c,e,n,a);if(d.isCompletelyWithinViewport)return this._isPushed=!1,void this._applyPosition(a,l);this._canFitWithFlexibleDimensions(d,c,n)?s.push({position:a,origin:l,overlayRect:e,boundingBoxRect:this._calculateBoundingBoxRect(l,a)}):(!o||o.overlayFit.visibleAreal&&(l=d,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&&Bh(this._boundingBox.style,{top:"",left:"",right:"",bottom:"",height:"",width:"",alignItems:"",justifyContent:""}),this._pane&&this._resetOverlayElementStyles(),this._overlayRef&&this._overlayRef.hostElement.classList.remove(mU),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=_U(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=gU(this._overlayRef.getConfig().minHeight),a=gU(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=_U(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 d=0,h=0;return d=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,d=t.x-this._viewportMargin;else if("start"===e.overlayX&&!r||"end"===e.overlayX&&r)h=t.x,d=n.right-t.x;else{const m=Math.min(n.right-t.x+n.left,t.x),g=this._lastBoundingBoxSize.width;d=2*m,h=t.x-m,d>g&&!this._isInitialRender&&!this._growAfterOpen&&(h=t.x-g/2)}return{top:o,left:h,bottom:a,right:p,width:d,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=gr(n.height),r.top=gr(n.top),r.bottom=gr(n.bottom),r.width=gr(n.width),r.left=gr(n.left),r.right=gr(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=gr(s)),o&&(r.maxWidth=gr(o))}this._lastBoundingBoxSize=n,Bh(this._boundingBox.style,r)}_resetBoundingBoxStyles(){Bh(this._boundingBox.style,{top:"0",left:"0",right:"0",bottom:"0",height:"",width:"",alignItems:"",justifyContent:""})}_resetOverlayElementStyles(){Bh(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 d=this._viewportRuler.getViewportScrollPosition();Bh(n,this._getExactOverlayY(e,t,d)),Bh(n,this._getExactOverlayX(e,t,d))}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=gr(o.maxHeight):s&&(n.maxHeight="")),o.maxWidth&&(r?n.maxWidth=gr(o.maxWidth):s&&(n.maxWidth="")),Bh(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=gr(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=gr(s.x),r}_getScrollVisibility(){const t=this._getOriginRect(),e=this._pane.getBoundingClientRect(),n=this._scrollables.map(r=>r.getElementRef().nativeElement.getBoundingClientRect());return{isOriginClipped:fU(t,n),isOriginOutsideView:VI(t,n),isOverlayClipped:fU(e,n),isOverlayOutsideView:VI(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&&TM(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 mt)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 Bh(i,t){for(let e in t)t.hasOwnProperty(e)&&(i[e]=t[e]);return i}function gU(i){if("number"!=typeof i&&null!=i){const[t,e]=i.split(EZ);return e&&"px"!==e?null:parseFloat(t)}return i||null}function _U(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 vU="cdk-global-overlay-wrapper";class yU{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(vU),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),d=this._xPosition,h=this._xOffset,p="rtl"===this._overlayRef.getConfig().direction;let m="",g="",b="";l?b="flex-start":"center"===d?(b="center",p?g=h:m=h):p?"left"===d||"end"===d?(b="flex-end",m=h):("right"===d||"start"===d)&&(b="flex-start",g=h):"left"===d||"start"===d?(b="flex-start",m=h):("right"===d||"end"===d)&&(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(vU),n.justifyContent=n.alignItems=t.marginTop=t.marginBottom=t.marginLeft=t.marginRight=t.position="",this._overlayRef=null,this._isDisposed=!0}}let DZ=(()=>{class i{constructor(e,n,r,s){this._viewportRuler=e,this._document=n,this._platform=r,this._overlayContainer=s}global(){return new yU}flexibleConnectedTo(e){return new AZ(e,this._viewportRuler,this._document,this._platform,this._overlayContainer)}}return i.\u0275fac=function(e){return new(e||i)(ee(LM),ee(jt),ee(zi),ee(VM))},i.\u0275prov=ke({token:i,factory:i.\u0275fac,providedIn:"root"}),i})(),TZ=0,as=(()=>{class i{constructor(e,n,r,s,o,a,l,c,d,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=d,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 Zy(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-"+TZ++,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(dm)),new sZ(e,this._componentFactoryResolver,this._appRef,this._injector,this._document)}}return i.\u0275fac=function(e){return new(e||i)(ee(wZ),ee(VM),ee(Hl),ee(DZ),ee(CZ),ee($i),ee(ft),ee(jt),ee(Ia),ee(_y),ee(SZ),ee(Rr,8))},i.\u0275prov=ke({token:i,factory:i.\u0275fac,providedIn:"root"}),i})();const IZ=[{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"}],bU=new me("cdk-connected-overlay-scroll-strategy");let zI=(()=>{class i{constructor(e){this.elementRef=e}}return i.\u0275fac=function(e){return new(e||i)(E(mt))},i.\u0275dir=ve({type:i,selectors:[["","cdk-overlay-origin",""],["","overlay-origin",""],["","cdkOverlayOrigin",""]],exportAs:["cdkOverlayOrigin"],standalone:!0}),i})(),xU=(()=>{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=Zt.EMPTY,this._attachSubscription=Zt.EMPTY,this._detachSubscription=Zt.EMPTY,this._positionSubscription=Zt.EMPTY,this.viewportMargin=0,this.open=!1,this.disableClose=!1,this.backdropClick=new We,this.positionChange=new We,this.attach=new We,this.detach=new We,this.overlayKeydown=new We,this.overlayOutsideClick=new We,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=IZ);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&&!Xo(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 zI?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(jB(()=>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)(E(as),E(Mo),E(Wr),E(bU),E(Ia,8))},i.\u0275dir=ve({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:[bi]}),i})();const kZ={provide:bU,deps:[as],useFactory:function RZ(i){return()=>i.scrollStrategies.reposition()}};let Pm=(()=>{class i{}return i.\u0275fac=function(e){return new(e||i)},i.\u0275mod=nn({type:i}),i.\u0275inj=Kt({providers:[as,kZ],imports:[Yy,Nh,dU,dU]}),i})();function ml(i,t=$y){return ti((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,d=t.now();if(d{s=c,o=t.now(),r||(r=t.schedule(l,i),n.add(r))},()=>{a(),n.complete()},void 0,()=>{s=r=null}))})}function wU(i){return gn((t,e)=>i<=e)}function Zl(i,t=$a){return i=i??PZ,ti((e,n)=>{let r,s=!0;e.subscribe(Yn(n,o=>{const a=t(o);(s||!i(r,a))&&(s=!1,r=a,n.next(o))}))})}function PZ(i,t){return i===t}let MU=(()=>{class i{create(e){return typeof MutationObserver>"u"?null:new MutationObserver(e)}}return i.\u0275fac=function(e){return new(e||i)},i.\u0275prov=ke({token:i,factory:i.\u0275fac,providedIn:"root"}),i})(),OZ=(()=>{class i{constructor(e){this._mutationObserverFactory=e,this._observedElements=new Map}ngOnDestroy(){this._observedElements.forEach((e,n)=>this._cleanupObserver(n))}observe(e){const n=Yc(e);return new In(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 Re,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)(ee(MU))},i.\u0275prov=ke({token:i,factory:i.\u0275fac,providedIn:"root"}),i})(),CU=(()=>{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=ks(e),this._subscribe()}constructor(e,n,r){this._contentObserver=e,this._elementRef=n,this._ngZone=r,this.event=new We,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(ml(this.debounce)):e).subscribe(this.event)})}_unsubscribe(){this._currentSubscription?.unsubscribe()}}return i.\u0275fac=function(e){return new(e||i)(E(OZ),E(mt),E(ft))},i.\u0275dir=ve({type:i,selectors:[["","cdkObserveContent",""]],inputs:{disabled:["cdkObserveContentDisabled","disabled"],debounce:"debounce"},outputs:{event:"cdkObserveContent"},exportAs:["cdkObserveContent"]}),i})(),HI=(()=>{class i{}return i.\u0275fac=function(e){return new(e||i)},i.\u0275mod=nn({type:i}),i.\u0275inj=Kt({providers:[MU]}),i})();const SU=new Set;let Om,FZ=(()=>{class i{constructor(e){this._platform=e,this._matchMedia=this._platform.isBrowser&&window.matchMedia?window.matchMedia.bind(window):NZ}matchMedia(e){return(this._platform.WEBKIT||this._platform.BLINK)&&function LZ(i){if(!SU.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),SU.add(i))}catch(t){console.error(t)}}(e),this._matchMedia(e)}}return i.\u0275fac=function(e){return new(e||i)(ee(zi))},i.\u0275prov=ke({token:i,factory:i.\u0275fac,providedIn:"root"}),i})();function NZ(i){return{matches:"all"===i||""===i,media:i,addListener:()=>{},removeListener:()=>{}}}let GI=(()=>{class i{constructor(e,n){this._mediaMatcher=e,this._zone=n,this._queries=new Map,this._destroySubject=new Re}ngOnDestroy(){this._destroySubject.next(),this._destroySubject.complete()}isMatched(e){return EU(TM(e)).some(r=>this._registerQuery(r).mql.matches)}observe(e){let s=nu(EU(TM(e)).map(o=>this._registerQuery(o).observable));return s=Sy(s.pipe(Oi(1)),s.pipe(wU(1),ml(0))),s.pipe(et(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 In(o=>{const a=l=>this._zone.run(()=>o.next(l));return n.addListener(a),()=>{n.removeListener(a)}}).pipe(Ao(n),et(({matches:o})=>({query:e,matches:o})),He(this._destroySubject)),mql:n};return this._queries.set(e,s),s}}return i.\u0275fac=function(e){return new(e||i)(ee(FZ),ee(ft))},i.\u0275prov=ke({token:i,factory:i.\u0275fac,providedIn:"root"}),i})();function EU(i){return i.map(t=>t.split(",")).reduce((t,e)=>t.concat(e)).map(t=>t.trim())}function zM(i,t){return(i.getAttribute(t)||"").match(/\S+/g)||[]}const DU="cdk-describedby-message",HM="cdk-describedby-host";let $I=0,zZ=(()=>{class i{constructor(e,n){this._platform=n,this._messageRegistry=new Map,this._messagesContainer=null,this._id=""+$I++,this._document=e,this._id=Ft(cm)+"-"+$I++}describe(e,n,r){if(!this._canBeDescribed(e,n))return;const s=WI(n,r);"string"!=typeof n?(TU(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=WI(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(`[${HM}="${this._id}"]`);for(let n=0;n0!=r.indexOf(DU));e.setAttribute("aria-describedby",n.join(" "))}_addMessageReference(e,n){const r=this._messageRegistry.get(n);(function UZ(i,t,e){const n=zM(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(HM,this._id),r.referenceCount++}_removeMessageReference(e,n){const r=this._messageRegistry.get(n);r.referenceCount--,function VZ(i,t,e){const r=zM(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(HM)}_isElementDescribedByMessage(e,n){const r=zM(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)(ee(jt),ee(zi))},i.\u0275prov=ke({token:i,factory:i.\u0275fac,providedIn:"root"}),i})();function WI(i,t){return"string"==typeof i?`${t||""}/${i}`:i}function TU(i,t){i.id||(i.id=`${DU}-${t}-${$I++}`)}class IU{constructor(t){this._items=t,this._activeItemIndex=-1,this._activeItem=null,this._wrap=!1,this._letterKeyStream=new Re,this._typeaheadSubscription=Zt.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 Re,this.change=new Re,t instanceof om&&(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(Vi(e=>this._pressedLetters.push(e)),ml(t),gn(()=>this._pressedLetters.length>0),et(()=>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 om?this._items.toArray():this._items}}class HZ extends IU{setActiveItem(t){this.activeItem&&this.activeItem.setInactiveStyles(),super.setActiveItem(t),this.activeItem&&this.activeItem.setActiveStyles()}}class RU extends IU{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 GM=(()=>{class i{constructor(e){this._platform=e}isDisabled(e){return e.hasAttribute("disabled")}isVisible(e){return function $Z(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 GZ(i){try{return i.frameElement}catch{return null}}(function QZ(i){return i.ownerDocument&&i.ownerDocument.defaultView||window}(e));if(n&&(-1===PU(n)||!this.isVisible(n)))return!1;let r=e.nodeName.toLowerCase(),s=PU(e);return e.hasAttribute("contenteditable")?-1!==s:!("iframe"===r||"object"===r||this._platform.WEBKIT&&this._platform.IOS&&!function KZ(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 ZZ(i){return!function jZ(i){return function qZ(i){return"input"==i.nodeName.toLowerCase()}(i)&&"hidden"==i.type}(i)&&(function WZ(i){let t=i.nodeName.toLowerCase();return"input"===t||"select"===t||"button"===t||"textarea"===t}(i)||function YZ(i){return function XZ(i){return"a"==i.nodeName.toLowerCase()}(i)&&i.hasAttribute("href")}(i)||i.hasAttribute("contenteditable")||kU(i))}(e)&&!this.isDisabled(e)&&(n?.ignoreVisibility||this.isVisible(e))}}return i.\u0275fac=function(e){return new(e||i)(ee(zi))},i.\u0275prov=ke({token:i,factory:i.\u0275fac,providedIn:"root"}),i})();function kU(i){if(!i.hasAttribute("tabindex")||void 0===i.tabIndex)return!1;let t=i.getAttribute("tabindex");return!(!t||isNaN(parseInt(t,10)))}function PU(i){if(!kU(i))return null;const t=parseInt(i.getAttribute("tabindex")||"",10);return isNaN(t)?-1:t}class JZ{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(Oi(1)).subscribe(t)}}let jI=(()=>{class i{constructor(e,n,r){this._checker=e,this._ngZone=n,this._document=r}create(e,n=!1){return new JZ(e,this._checker,this._ngZone,this._document,n)}}return i.\u0275fac=function(e){return new(e||i)(ee(GM),ee(ft),ee(jt))},i.\u0275prov=ke({token:i,factory:i.\u0275fac,providedIn:"root"}),i})();function YI(i){return 0===i.buttons||0===i.offsetX&&0===i.offsetY}function qI(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 eQ=new me("cdk-input-modality-detector-options"),tQ={ignoreKeys:[18,17,224,91,16]},Fm=Oh({passive:!0,capture:!0});let nQ=(()=>{class i{get mostRecentModality(){return this._modality.value}constructor(e,n,r,s){this._platform=e,this._mostRecentTarget=null,this._modality=new gt(null),this._lastTouchMs=0,this._onKeydown=o=>{this._options?.ignoreKeys?.some(a=>a===o.keyCode)||(this._modality.next("keyboard"),this._mostRecentTarget=cu(o))},this._onMousedown=o=>{Date.now()-this._lastTouchMs<650||(this._modality.next(YI(o)?"keyboard":"mouse"),this._mostRecentTarget=cu(o))},this._onTouchstart=o=>{qI(o)?this._modality.next("keyboard"):(this._lastTouchMs=Date.now(),this._modality.next("touch"),this._mostRecentTarget=cu(o))},this._options={...tQ,...s},this.modalityDetected=this._modality.pipe(wU(1)),this.modalityChanged=this.modalityDetected.pipe(Zl()),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)(ee(zi),ee(ft),ee(jt),ee(eQ,8))},i.\u0275prov=ke({token:i,factory:i.\u0275fac,providedIn:"root"}),i})();const iQ=new me("liveAnnouncerElement",{providedIn:"root",factory:function rQ(){return null}}),sQ=new me("LIVE_ANNOUNCER_DEFAULT_OPTIONS");let oQ=0,XI=(()=>{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 Re,this._rootNodeFocusAndBlurListener=a=>{for(let c=cu(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=Yc(e);if(!this._platform.isBrowser||1!==r.nodeType)return ht(null);const s=function $K(i){if(function GK(){if(null==LI){const i=typeof document<"u"?document.head:null;LI=!(!i||!i.createShadowRoot&&!i.attachShadow)}return LI}()){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 Re,rootNode:s};return this._elementInfo.set(r,a),this._registerGlobalListeners(a),a.subject}stopMonitoring(e){const n=Yc(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=Yc(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=cu(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,$M),n.addEventListener("blur",this._rootNodeFocusAndBlurListener,$M)}),this._rootNodeFocusListenerCount.set(n,r+1),1==++this._monitoredElementCount&&(this._ngZone.runOutsideAngular(()=>{this._getWindow().addEventListener("focus",this._windowFocusListener)}),this._inputModalityDetector.modalityDetected.pipe(He(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,$M),n.removeEventListener("blur",this._rootNodeFocusAndBlurListener,$M),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=Ft(GI).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,FU,LU),this._hasCheckedHighContrastMode=!0;const n=this.getHighContrastMode();1===n?e.add(KI,FU):2===n&&e.add(KI,LU)}}}return i.\u0275fac=function(e){return new(e||i)(ee(zi),ee(jt))},i.\u0275prov=ke({token:i,factory:i.\u0275fac,providedIn:"root"}),i})(),BU=(()=>{class i{constructor(e){e._applyBodyHighContrastModeCssClasses()}}return i.\u0275fac=function(e){return new(e||i)(ee(NU))},i.\u0275mod=nn({type:i}),i.\u0275inj=Kt({imports:[HI]}),i})();function lQ(i,t){}class WM{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 UU=(()=>{class i extends NM{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=d=>{this._portalOutlet.hasAttached();const h=this._portalOutlet.attachDomPortal(d);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=FM(),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=FM();return e===n||e.contains(n)}_initializeFocusTrap(){this._focusTrap=this._focusTrapFactory.create(this._elementRef.nativeElement),this._document&&(this._elementFocusedBeforeDialogWasOpened=FM())}_handleBackdropClicks(){this._overlayRef.backdropClick().subscribe(()=>{this._config.disableClose&&this._recaptureFocus()})}}return i.\u0275fac=function(e){return new(e||i)(E(mt),E(jI),E(jt,8),E(WM),E(GM),E(ft),E(Zy),E(qc))},i.\u0275cmp=ot({type:i,selectors:[["cdk-dialog-container"]],viewQuery:function(e,n){if(1&e&&Wn(Am,7),2&e){let r;Et(r=At())&&(n._portalOutlet=r.first)}},hostAttrs:["tabindex","-1",1,"cdk-dialog-container"],hostVars:6,hostBindings:function(e,n){2&e&&Dt("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:[lt],decls:1,vars:0,consts:[["cdkPortalOutlet",""]],template:function(e,n){1&e&&fe(0,lQ,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 ZI{constructor(t,e){this.overlayRef=t,this.config=e,this.closed=new Re,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&&!Xo(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 VU=new me("DialogScrollStrategy"),cQ=new me("DialogData"),dQ=new me("DefaultDialogConfig"),hQ={provide:VU,deps:[as],useFactory:function uQ(i){return()=>i.scrollStrategies.block()}};let fQ=0,zU=(()=>{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 Re,this._afterOpenedAtThisLevel=new Re,this._ariaHiddenElements=new Map,this.afterAllClosed=Ey(()=>this.openDialogs.length?this._getAfterAllClosed():this._getAfterAllClosed().pipe(Ao(void 0))),this._scrollStrategy=a}open(e,n){(n={...this._defaultOptions||new WM,...n}).id=n.id||"cdk-dialog-"+fQ++,n.id&&this.getDialogById(n.id);const s=this._getOverlayConfig(n),o=this._overlay.create(s),a=new ZI(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(){QI(this.openDialogs,e=>e.close())}getDialogById(e){return this.openDialogs.find(n=>n.id===e)}ngOnDestroy(){QI(this._openDialogsAtThisLevel,e=>{!1===e.config.closeOnDestroy&&this._removeOpenDialog(e,!1)}),QI(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:WM,useValue:r},{provide:ZI,useValue:n},{provide:Zy,useValue:e}];let a;r.container?"function"==typeof r.container?a=r.container:(a=r.container.type,o.push(...r.container.providers(r))):a=UU;const l=new Lh(a,r.viewContainerRef,$i.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 Lh(e,s.viewContainerRef,o,s.componentFactoryResolver));n.componentInstance=a.instance}}_createInjector(e,n,r,s){const o=e.injector||e.viewContainerRef?.injector,a=[{provide:cQ,useValue:e.data},{provide:ZI,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(Ia,null,{optional:!0}))&&a.push({provide:Ia,useValue:{value:e.direction,change:ht()}}),$i.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)(ee(as),ee($i),ee(dQ,8),ee(i,12),ee(VM),ee(VU))},i.\u0275prov=ke({token:i,factory:i.\u0275fac}),i})();function QI(i,t){let e=i.length;for(;e--;)t(i[e])}let pQ=(()=>{class i{}return i.\u0275fac=function(e){return new(e||i)},i.\u0275mod=nn({type:i}),i.\u0275inj=Kt({providers:[zU,hQ],imports:[Pm,Nh,BU,Nh]}),i})();const mQ=["text"];function gQ(i,t){if(1&i&&De(0,"mat-pseudo-checkbox",6),2&i){const e=he();U("state",e.selected?"checked":"unchecked")("disabled",e.disabled)}}function _Q(i,t){1&i&&De(0,"mat-pseudo-checkbox",7),2&i&&U("disabled",he().disabled)}function vQ(i,t){if(1&i&&(W(0,"span",8),Ve(1),j()),2&i){const e=he();G(1),Qi("(",e.group.label,")")}}const yQ=[[["mat-icon"]],"*"],bQ=["mat-icon","*"],wQ=new me("mat-sanity-checks",{providedIn:"root",factory:function xQ(){return!0}});let Qn=(()=>{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!NI()&&("boolean"==typeof this._sanityChecks?this._sanityChecks:!!this._sanityChecks[e])}}return i.\u0275fac=function(e){return new(e||i)(ee(NU),ee(wQ,8),ee(jt))},i.\u0275mod=nn({type:i}),i.\u0275inj=Kt({imports:[Yy,Yy]}),i})();function jM(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 Qy(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 YM(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 JI(i,t=0){return class extends i{get tabIndex(){return this.disabled?-1:this._tabIndex}set tabIndex(e){this._tabIndex=null!=e?ks(e):this.defaultTabIndex}constructor(...e){super(...e),this._tabIndex=t,this.defaultTabIndex=t}}}function $U(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 MQ(i){return class extends i{constructor(...t){super(...t),this._isInitialized=!1,this._pendingSubscribers=[],this.initialized=new In(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 jU=(()=>{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=ke({token:i,factory:i.\u0275fac,providedIn:"root"}),i})();class SQ{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 YU=Oh({passive:!0,capture:!0});class EQ{constructor(){this._events=new Map,this._delegateEventHandler=t=>{const e=cu(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,YU)})}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,YU)))}}const qU={enterDuration:225,exitDuration:150},XU=Oh({passive:!0,capture:!0}),KU=["mousedown","touchstart"],ZU=["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=Yc(n))}fadeInRipple(t,e,n={}){const r=this._containerRect=this._containerRect||this._containerElement.getBoundingClientRect(),s={...qU,...n.animation};n.centered&&(t=r.left+r.width/2,e=r.top+r.height/2);const o=n.radius||function DQ(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,d=document.createElement("div");d.classList.add("mat-ripple-element"),d.style.left=a-o+"px",d.style.top=l-o+"px",d.style.height=2*o+"px",d.style.width=2*o+"px",null!=n.color&&(d.style.backgroundColor=n.color),d.style.transitionDuration=`${c}ms`,this._containerElement.appendChild(d);const h=window.getComputedStyle(d),m=h.transitionDuration,g="none"===h.transitionProperty||"0s"===m||"0s, 0s"===m||0===r.width&&0===r.height,b=new SQ(this,d,n,g);d.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);d.addEventListener("transitionend",y),d.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={...qU,...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=Yc(t);!this._platform.isBrowser||!e||e===this._triggerElement||(this._removeTriggerEvents(),this._triggerElement=e,KU.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(()=>{ZU.forEach(e=>{this._triggerElement.addEventListener(e,this,XU)})}),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=YI(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&&(KU.forEach(e=>Lm._eventManager.removeHandler(e,t,this)),this._pointerUpEventsRegistered&&ZU.forEach(e=>t.removeEventListener(e,this,XU)))}}Lm._eventManager=new EQ;const eR=new me("mat-ripple-global-options");let Uh=(()=>{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)(E(mt),E(ft),E(zi),E(eR,8),E(Rr,8))},i.\u0275dir=ve({type:i,selectors:[["","mat-ripple",""],["","matRipple",""]],hostAttrs:[1,"mat-ripple"],hostVars:2,hostBindings:function(e,n){2&e&&un("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})(),eb=(()=>{class i{}return i.\u0275fac=function(e){return new(e||i)},i.\u0275mod=nn({type:i}),i.\u0275inj=Kt({imports:[Qn,Qn]}),i})(),TQ=(()=>{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)(E(Rr,8))},i.\u0275cmp=ot({type:i,selectors:[["mat-pseudo-checkbox"]],hostAttrs:[1,"mat-pseudo-checkbox"],hostVars:12,hostBindings:function(e,n){2&e&&un("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})(),QU=(()=>{class i{}return i.\u0275fac=function(e){return new(e||i)},i.\u0275mod=nn({type:i}),i.\u0275inj=Kt({imports:[Qn]}),i})();const JU=new me("MAT_OPTION_PARENT_COMPONENT"),eV=new me("MatOptgroup");let IQ=0;class RQ{constructor(t,e=!1){this.source=t,this.isUserInput=e}}let kQ=(()=>{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-"+IQ++,this.onSelectionChange=new We,this._stateChanges=new Re}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)&&!Xo(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 RQ(this,e))}}return i.\u0275fac=function(e){xo()},i.\u0275dir=ve({type:i,viewQuery:function(e,n){if(1&e&&Wn(mQ,7),2&e){let r;Et(r=At())&&(n._text=r.first)}},inputs:{value:"value",id:"id",disabled:"disabled"},outputs:{onSelectionChange:"onSelectionChange"}}),i})(),Nm=(()=>{class i extends kQ{constructor(e,n,r,s){super(e,n,r,s)}}return i.\u0275fac=function(e){return new(e||i)(E(mt),E(Zn),E(JU,8),E(eV,8))},i.\u0275cmp=ot({type:i,selectors:[["mat-option"]],hostAttrs:["role","option",1,"mat-mdc-option","mdc-list-item"],hostVars:11,hostBindings:function(e,n){1&e&&Ue("click",function(){return n._selectViaInteraction()})("keydown",function(s){return n._handleKeydown(s)}),2&e&&(Yl("id",n.id),Dt("aria-selected",n.selected)("aria-disabled",n.disabled.toString()),un("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:[lt],ngContentSelectors:bQ,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&&(sr(yQ),fe(0,gQ,1,2,"mat-pseudo-checkbox",0),Wt(1),W(2,"span",1,2),Wt(4,1),j(),fe(5,_Q,1,1,"mat-pseudo-checkbox",3),fe(6,vQ,2,1,"span",4),De(7,"div",5)),2&e&&(U("ngIf",n.multiple),G(5),U("ngIf",!n.multiple&&n.selected&&!n.hideSingleSelectionIndicator),G(1),U("ngIf",n.group&&n.group._inert),G(1),U("matRippleTrigger",n._getHostElement())("matRippleDisabled",n.disabled||n.disableRipple))},dependencies:[Uh,vi,TQ],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})(),tR=(()=>{class i{}return i.\u0275fac=function(e){return new(e||i)},i.\u0275mod=nn({type:i}),i.\u0275inj=Kt({imports:[eb,Eo,Qn,QU]}),i})();class tV{}class FQ{}const Xc="*";function Ra(i,t){return{type:7,name:i,definitions:t,options:{}}}function jr(i,t=null){return{type:4,styles:t,timings:i}}function iV(i,t=null){return{type:2,steps:i,options:t}}function si(i){return{type:6,styles:i,offset:null}}function Ps(i,t,e){return{type:0,name:i,styles:t,options:e}}function rV(i){return{type:5,steps:i}}function Pr(i,t,e=null){return{type:1,expr:i,animation:t,options:e}}function nR(i=null){return{type:9,options:i}}function iR(i,t,e=null){return{type:11,selector:i,animation:t,options:e}}function sV(i){Promise.resolve().then(i)}class tb{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(){sV(()=>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 oV{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?sV(()=>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 rR="!";function LQ(i,t){}class qM{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 sR="mdc-dialog--open",aV="mdc-dialog--opening",lV="mdc-dialog--closing";let UQ=(()=>{class i extends UU{constructor(e,n,r,s,o,a,l,c){super(e,n,r,s,o,a,l,c),this._animationStateChanged=new We}_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)(E(mt),E(jI),E(jt,8),E(qM),E(GM),E(ft),E(Zy),E(qc))},i.\u0275cmp=ot({type:i,selectors:[["ng-component"]],features:[lt],decls:0,vars:0,template:function(e,n){},encapsulation:2}),i})();const cV="--mat-dialog-transition-duration";function dV(i){return null==i?null:"number"==typeof i?i:i.endsWith("ms")?ks(i.substring(0,i.length-2)):i.endsWith("s")?1e3*ks(i.substring(0,i.length-1)):"0"===i?0:null}let VQ=(()=>{class i extends UQ{constructor(e,n,r,s,o,a,l,c,d){super(e,n,r,s,o,a,l,d),this._animationMode=c,this._animationsEnabled="NoopAnimations"!==this._animationMode,this._hostElement=this._elementRef.nativeElement,this._openAnimationDuration=this._animationsEnabled?dV(this._config.enterAnimationDuration)??150:0,this._closeAnimationDuration=this._animationsEnabled?dV(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(cV,`${this._openAnimationDuration}ms`),this._requestAnimationFrame(()=>this._hostElement.classList.add(aV,sR)),this._waitForAnimationToComplete(this._openAnimationDuration,this._finishDialogOpen)):(this._hostElement.classList.add(sR),Promise.resolve().then(()=>this._finishDialogOpen()))}_startExitAnimation(){this._animationStateChanged.emit({state:"closing",totalTime:this._closeAnimationDuration}),this._hostElement.classList.remove(sR),this._animationsEnabled?(this._hostElement.style.setProperty(cV,`${this._openAnimationDuration}ms`),this._requestAnimationFrame(()=>this._hostElement.classList.add(lV)),this._waitForAnimationToComplete(this._closeAnimationDuration,this._finishDialogClose)):Promise.resolve().then(()=>this._finishDialogClose())}_clearAnimationClasses(){this._hostElement.classList.remove(aV,lV)}_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)(E(mt),E(jI),E(jt,8),E(qM),E(GM),E(ft),E(Zy),E(Rr,8),E(qc))},i.\u0275cmp=ot({type:i,selectors:[["mat-dialog-container"]],hostAttrs:["tabindex","-1",1,"mat-mdc-dialog-container","mdc-dialog"],hostVars:8,hostBindings:function(e,n){2&e&&(Yl("id",n._config.id),Dt("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),un("_mat-animation-noopable",!n._animationsEnabled))},features:[lt],decls:3,vars:0,consts:[[1,"mdc-dialog__container"],[1,"mat-mdc-dialog-surface","mdc-dialog__surface"],["cdkPortalOutlet",""]],template:function(e,n){1&e&&(W(0,"div",0)(1,"div",1),fe(2,LQ,0,0,"ng-template",2),j()())},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 nb{constructor(t,e,n){this._ref=t,this._containerInstance=n,this._afterOpened=new Re,this._beforeClosed=new Re,this._state=0,this.disableClose=e.disableClose,this.id=t.id,n._animationStateChanged.pipe(gn(r=>"opened"===r.state),Oi(1)).subscribe(()=>{this._afterOpened.next(),this._afterOpened.complete()}),n._animationStateChanged.pipe(gn(r=>"closed"===r.state),Oi(1)).subscribe(()=>{clearTimeout(this._closeFallbackTimeout),this._finishDialogClose()}),t.overlayRef.detachments().subscribe(()=>{this._beforeClosed.next(this._result),this._beforeClosed.complete(),this._finishDialogClose()}),Mr(this.backdropClick(),this.keydownEvents().pipe(gn(r=>27===r.keyCode&&!this.disableClose&&!Xo(r)))).subscribe(r=>{this.disableClose||(r.preventDefault(),uV(this,"keydown"===r.type?"keyboard":"mouse"))})}close(t){this._result=t,this._containerInstance._animationStateChanged.pipe(gn(e=>"closing"===e.state),Oi(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 uV(i,t,e){return i._closeInteractionType=t,i.close(e)}const oR=new me("MatMdcDialogData"),zQ=new me("mat-mdc-dialog-default-options"),hV=new me("mat-mdc-dialog-scroll-strategy"),GQ={provide:hV,deps:[as],useFactory:function HQ(i){return()=>i.scrollStrategies.block()}};let $Q=0,WQ=(()=>{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,d,h){this._overlay=e,this._defaultOptions=r,this._parentDialog=s,this._dialogRefConstructor=l,this._dialogContainerType=c,this._dialogDataToken=d,this._openDialogsAtThisLevel=[],this._afterAllClosedAtThisLevel=new Re,this._afterOpenedAtThisLevel=new Re,this._idPrefix="mat-dialog-",this.dialogConfigClass=qM,this.afterAllClosed=Ey(()=>this.openDialogs.length?this._getAfterAllClosed():this._getAfterAllClosed().pipe(Ao(void 0))),this._scrollStrategy=a,this._dialog=n.get(zU)}open(e,n){let r;(n={...this._defaultOptions||new qM,...n}).id=n.id||`${this._idPrefix}${$Q++}`,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:WM,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){xo()},i.\u0275prov=ke({token:i,factory:i.\u0275fac}),i})(),Bm=(()=>{class i extends WQ{constructor(e,n,r,s,o,a,l,c){super(e,n,s,a,l,o,nb,VQ,oR,c),this._idPrefix="mat-mdc-dialog-"}}return i.\u0275fac=function(e){return new(e||i)(ee(as),ee($i),ee(_y,8),ee(zQ,8),ee(hV),ee(i,12),ee(VM),ee(Rr,8))},i.\u0275prov=ke({token:i,factory:i.\u0275fac}),i})(),jQ=0,YQ=(()=>{class i{constructor(e,n,r){this.dialogRef=e,this._elementRef=n,this._dialog=r,this.type="button"}ngOnInit(){this.dialogRef||(this.dialogRef=gV(this._elementRef,this._dialog.openDialogs))}ngOnChanges(e){const n=e._matDialogClose||e._matDialogCloseResult;n&&(this.dialogResult=n.currentValue)}_onButtonClick(e){uV(this.dialogRef,0===e.screenX&&0===e.screenY?"keyboard":"mouse",this.dialogResult)}}return i.\u0275fac=function(e){return new(e||i)(E(nb,8),E(mt),E(Bm))},i.\u0275dir=ve({type:i,selectors:[["","mat-dialog-close",""],["","matDialogClose",""]],hostVars:2,hostBindings:function(e,n){1&e&&Ue("click",function(s){return n._onButtonClick(s)}),2&e&&Dt("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:[bi]}),i})(),fV=(()=>{class i{constructor(e,n,r){this._dialogRef=e,this._elementRef=n,this._dialog=r,this.id="mat-mdc-dialog-title-"+jQ++}ngOnInit(){this._dialogRef||(this._dialogRef=gV(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)(E(nb,8),E(mt),E(Bm))},i.\u0275dir=ve({type:i,selectors:[["","mat-dialog-title",""],["","matDialogTitle",""]],hostAttrs:[1,"mat-mdc-dialog-title","mdc-dialog__title"],hostVars:1,hostBindings:function(e,n){2&e&&Yl("id",n.id)},inputs:{id:"id"},exportAs:["matDialogTitle"]}),i})(),pV=(()=>{class i{}return i.\u0275fac=function(e){return new(e||i)},i.\u0275dir=ve({type:i,selectors:[["","mat-dialog-content",""],["mat-dialog-content"],["","matDialogContent",""]],hostAttrs:[1,"mat-mdc-dialog-content","mdc-dialog__content"]}),i})(),mV=(()=>{class i{constructor(){this.align="start"}}return i.\u0275fac=function(e){return new(e||i)},i.\u0275dir=ve({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&&un("mat-mdc-dialog-actions-align-center","center"===n.align)("mat-mdc-dialog-actions-align-end","end"===n.align)},inputs:{align:"align"}}),i})();function gV(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 _V=(()=>{class i{}return i.\u0275fac=function(e){return new(e||i)},i.\u0275mod=nn({type:i}),i.\u0275inj=Kt({providers:[Bm,GQ],imports:[pQ,Pm,Nh,Qn,Qn]}),i})();const qQ=["mat-button",""],yV=[[["",8,"material-icons",3,"iconPositionEnd",""],["mat-icon",3,"iconPositionEnd",""],["","matButtonIcon","",3,"iconPositionEnd",""]],"*",[["","iconPositionEnd","",8,"material-icons"],["mat-icon","iconPositionEnd",""],["","matButtonIcon","","iconPositionEnd",""]]],bV=[".material-icons:not([iconPositionEnd]), mat-icon:not([iconPositionEnd]), [matButtonIcon]:not([iconPositionEnd])","*",".material-icons[iconPositionEnd], mat-icon[iconPositionEnd], [matButtonIcon][iconPositionEnd]"],KQ=["mat-mini-fab",""],QQ=["mat-icon-button",""],JQ=["*"],eJ=[{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"]}],tJ=Qy(jM(YM(class{constructor(i){this._elementRef=i}})));let aR=(()=>{class i extends tJ{constructor(e,n,r,s){super(e),this._platform=n,this._ngZone=r,this._animationMode=s,this._focusMonitor=Ft(qc),this._isFab=!1;const o=e.nativeElement.classList;for(const a of eJ)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){xo()},i.\u0275dir=ve({type:i,viewQuery:function(e,n){if(1&e&&Wn(Uh,5),2&e){let r;Et(r=At())&&(n.ripple=r.first)}},features:[lt]}),i})(),ib=(()=>{class i extends aR{constructor(e,n,r,s){super(e,n,r,s)}}return i.\u0275fac=function(e){return new(e||i)(E(mt),E(zi),E(ft),E(Rr,8))},i.\u0275cmp=ot({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&&(Dt("disabled",n.disabled||null),un("_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:[lt],attrs:qQ,ngContentSelectors:bV,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&&(sr(yV),De(0,"span",0),Wt(1),W(2,"span",1),Wt(3,1),j(),Wt(4,2),De(5,"span",2)(6,"span",3)(7,"span",4)),2&e&&(un("mdc-button__ripple",!n._isFab)("mdc-fab__ripple",n._isFab),G(6),U("matRippleDisabled",n._isRippleDisabled())("matRippleTrigger",n._elementRef.nativeElement))},dependencies:[Uh],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 iJ=new me("mat-mdc-fab-default-options",{providedIn:"root",factory:xV});function xV(){return{color:"accent"}}const wV=xV();let MV=(()=>{class i extends aR{constructor(e,n,r,s,o){super(e,n,r,s),this._options=o,this._isFab=!0,this._options=this._options||wV,this.color=this.defaultColor=this._options.color||wV.color}}return i.\u0275fac=function(e){return new(e||i)(E(mt),E(zi),E(ft),E(Rr,8),E(iJ,8))},i.\u0275cmp=ot({type:i,selectors:[["button","mat-mini-fab",""]],hostVars:7,hostBindings:function(e,n){2&e&&(Dt("disabled",n.disabled||null),un("_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:[lt],attrs:KQ,ngContentSelectors:bV,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&&(sr(yV),De(0,"span",0),Wt(1),W(2,"span",1),Wt(3,1),j(),Wt(4,2),De(5,"span",2)(6,"span",3)(7,"span",4)),2&e&&(un("mdc-button__ripple",!n._isFab)("mdc-fab__ripple",n._isFab),G(6),U("matRippleDisabled",n._isRippleDisabled())("matRippleTrigger",n._elementRef.nativeElement))},dependencies:[Uh],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})(),XM=(()=>{class i extends aR{constructor(e,n,r,s){super(e,n,r,s)}}return i.\u0275fac=function(e){return new(e||i)(E(mt),E(zi),E(ft),E(Rr,8))},i.\u0275cmp=ot({type:i,selectors:[["button","mat-icon-button",""]],hostVars:7,hostBindings:function(e,n){2&e&&(Dt("disabled",n.disabled||null),un("_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:[lt],attrs:QQ,ngContentSelectors:JQ,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&&(sr(),De(0,"span",0),Wt(1),De(2,"span",1)(3,"span",2)(4,"span",3)),2&e&&(G(3),U("matRippleDisabled",n._isRippleDisabled())("matRippleCentered",!0)("matRippleTrigger",n._elementRef.nativeElement))},dependencies:[Uh],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})(),KM=(()=>{class i{}return i.\u0275fac=function(e){return new(e||i)},i.\u0275mod=nn({type:i}),i.\u0275inj=Kt({imports:[Qn,eb,Qn]}),i})();const rJ=["class","dialog"];let CV=(()=>{class i{constructor(e,n){this.dialogRef=e,this.data=n}}return i.\u0275fac=function(e){return new(e||i)(E(nb),E(oR))},i.\u0275cmp=ot({type:i,selectors:[["app-confirm",8,"dialog"]],attrs:rJ,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&&(W(0,"h1",0),Ve(1,"Confirmation"),j(),W(2,"div",1)(3,"p"),Ve(4),j()(),W(5,"div",2)(6,"button",3),Ue("click",function(){return n.dialogRef.close()}),Ve(7,"Cancel"),j(),W(8,"button",4),Ve(9,"Yes"),j()()),2&e&&(G(4),_i(n.data.text),G(4),U("mat-dialog-close",!0))},dependencies:[ib,YQ,fV,pV,mV]}),i})();function lR(i,t){const e="object"==typeof t;return new Promise((n,r)=>{const s=new da({next:o=>{n(o),s.unsubscribe()},error:r,complete:()=>{e?n(t.defaultValue):r(new fm)}});i.subscribe(s)})}let Ql=(()=>{class i{constructor(e){this.ngZone=e,this.openedResource$=new gt(null),this.openedResourcePath$=new gt(null),eel.expose(this.wrapHandler(this.openFile),"open_file"),eel.on_angular_ready(),setTimeout(tt(function*(){for(;;){if(eel._websocket){eel._websocket.onclose=()=>window.close();break}yield new Promise(n=>setTimeout(n,0))}}),0)}wrapHandler(e){return(...n)=>{try{ft.assertInAngularZone(),e.bind(this)(...n)}catch{this.ngZone.run(e,this,n)}}}openFile(e,n=!1){var r=this;return tt(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 tt(function*(){yield eel.open_file_with_system_app(e)()})()}retrieveValue(e){return tt(function*(){return yield eel.retrieve_value(e)()})()}runCustomAction(e,n,r){return tt(function*(){return eel.run_custom_action(e,n,r)()})()}saveFile(e){var n=this;return tt(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 tt(function*(){return eel.serialize_resource(e,n)()})()}serializeResourceTmp(e,n,r={}){return tt(function*(){return eel.serialize_resource_tmp(e,n,r)()})()}serializeReversible(e,n){return tt(function*(){return eel.serialize_reversible(e,n)()})()}deserializeResource(e){return tt(function*(){return eel.deserialize_resource(e)()})()}}return i.\u0275fac=function(e){return new(e||i)(ee(ft))},i.\u0275prov=ke({token:i,factory:i.\u0275fac,providedIn:"root"}),i})();var cR=ps(489);const SV=i=>!(!i||"object"!=typeof i),EV=(i={},t,e,n=[])=>{const r=[];if(SV(i)){const s=Object.entries(i);for(let o=0;o{class i{constructor(e){var n=this;this.eelDelegate=e,this._hasUnsavedChanges$=new gt(!1),this.resource$=new gt(null),this.error$=new gt(null),this.customActionRunning$=new gt(!1),this.changedDataBlocks={},this.dataBlockChange$=new Re,this.hideHiddenFields$=new gt(!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=EV(r.schema,"is_recursive_ref",!0);for(const[o,a]of s){const l=o.block_class_mro;let c=r.schema,d=c.block_class_mro===l?c:void 0;for(const h of a.slice(0,a.length-1))!d&&c[h]?.block_class_mro===l&&(d=c[h]),c=c[h];c[a[a.length-1]]=d}this.resource$.next(r),this.error$.next(null)}else this.resource$.next(null),this.error$.next(null)}),this.dataBlockChange$.subscribe(function(){var r=tt(function*([s,o]){n.changedDataBlocks[s]=o,n.updateUnsavedChanges();const a=yield n.eelDelegate.retrieveValue(s);n.changedDataBlocks[s]==o&&((0,cR.isNumber)(o)?Math.abs(o-a)<1e-10:(0,cR.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 tt(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 tt(function*(){return s.processExternalChanges(e,()=>s.eelDelegate.runCustomAction(e,n,r))})()}deserializeResource(e){var n=this;return tt(function*(){return n.processExternalChanges(e,()=>n.eelDelegate.deserializeResource(e))})()}reloadResource(){var e=this;return tt(function*(){const n=e.eelDelegate.openedResourcePath$.getValue();n&&e.eelDelegate.openFile(n,!0).then()})()}saveResource(){var e=this;return tt(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)(ee(Ql))},i.\u0275prov=ke({token:i,factory:i.\u0275fac,providedIn:"root"}),i})();function sJ(i,t){if(1&i){const e=di();W(0,"div",2)(1,"button",3),Ue("click",function(){return an(e),zt(he().action())}),Ve(2),j()()}if(2&i){const e=he();G(2),Qi(" ",e.data.action," ")}}const oJ=["label"];function aJ(i,t){}const lJ=Math.pow(2,31)-1;class dR{constructor(t,e){this._overlayRef=e,this._afterDismissed=new Re,this._afterOpened=new Re,this._onAction=new Re,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,lJ))}_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 AV=new me("MatSnackBarData");class ZM{constructor(){this.politeness="assertive",this.announcementMessage="",this.duration=0,this.data=null,this.horizontalPosition="center",this.verticalPosition="bottom"}}let cJ=(()=>{class i{}return i.\u0275fac=function(e){return new(e||i)},i.\u0275dir=ve({type:i,selectors:[["","matSnackBarLabel",""]],hostAttrs:[1,"mat-mdc-snack-bar-label","mdc-snackbar__label"]}),i})(),dJ=(()=>{class i{}return i.\u0275fac=function(e){return new(e||i)},i.\u0275dir=ve({type:i,selectors:[["","matSnackBarActions",""]],hostAttrs:[1,"mat-mdc-snack-bar-actions","mdc-snackbar__actions"]}),i})(),uJ=(()=>{class i{}return i.\u0275fac=function(e){return new(e||i)},i.\u0275dir=ve({type:i,selectors:[["","matSnackBarAction",""]],hostAttrs:[1,"mat-mdc-snack-bar-action","mdc-snackbar__action"]}),i})(),hJ=(()=>{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)(E(dR),E(AV))},i.\u0275cmp=ot({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&&(W(0,"div",0),Ve(1),j(),fe(2,sJ,3,1,"div",1)),2&e&&(G(1),Qi(" ",n.data.message,"\n"),G(1),U("ngIf",n.hasAction))},dependencies:[vi,ib,cJ,dJ,uJ],styles:[".mat-mdc-simple-snack-bar{display:flex}"],encapsulation:2,changeDetection:0}),i})();const fJ={snackBarState:Ra("state",[Ps("void, hidden",si({transform:"scale(0.8)",opacity:0})),Ps("visible",si({transform:"scale(1)",opacity:1})),Pr("* => visible",jr("150ms cubic-bezier(0, 0, 0.2, 1)")),Pr("* => void, * => hidden",jr("75ms cubic-bezier(0.4, 0.0, 1, 1)",si({opacity:0})))])};let pJ=0,mJ=(()=>{class i extends NM{constructor(e,n,r,s,o){super(),this._ngZone=e,this._elementRef=n,this._changeDetectorRef=r,this._platform=s,this.snackBarConfig=o,this._document=Ft(jt),this._trackedModals=new Set,this._announceDelay=150,this._destroyed=!1,this._onAnnounce=new Re,this._onExit=new Re,this._onEnter=new Re,this._animationState="void",this._liveElementId="mat-snack-bar-container-live-"+pJ++,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(Oi(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)(E(ft),E(mt),E(Zn),E(zi),E(ZM))},i.\u0275dir=ve({type:i,viewQuery:function(e,n){if(1&e&&Wn(Am,7),2&e){let r;Et(r=At())&&(n._portalOutlet=r.first)}},features:[lt]}),i})(),gJ=(()=>{class i extends mJ{_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=ri(i)))(n||i)}}(),i.\u0275cmp=ot({type:i,selectors:[["mat-snack-bar-container"]],viewQuery:function(e,n){if(1&e&&Wn(oJ,7),2&e){let r;Et(r=At())&&(n._label=r.first)}},hostAttrs:[1,"mdc-snackbar","mat-mdc-snack-bar-container","mdc-snackbar--open"],hostVars:1,hostBindings:function(e,n){1&e&&N1("@state.done",function(s){return n.onAnimationEnd(s)}),2&e&&Iw("@state",n._animationState)},features:[lt],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&&(W(0,"div",0)(1,"div",1,2)(3,"div",3),fe(4,aJ,0,0,"ng-template",4),j(),De(5,"div"),j()()),2&e&&(G(5),Dt("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:[fJ.snackBarState]}}),i})(),DV=(()=>{class i{}return i.\u0275fac=function(e){return new(e||i)},i.\u0275mod=nn({type:i}),i.\u0275inj=Kt({imports:[Pm,Nh,Eo,KM,Qn,Qn]}),i})();const TV=new me("mat-snack-bar-default-options",{providedIn:"root",factory:function _J(){return new ZM}});let vJ=(()=>{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=$i.create({parent:n&&n.viewContainerRef&&n.viewContainerRef.injector||this._injector,providers:[{provide:ZM,useValue:n}]}),o=new Lh(this.snackBarContainerComponent,n.viewContainerRef,s),a=e.attach(o);return a.instance.snackBarConfig=n,a.instance}_attach(e,n){const r={...new ZM,...this._defaultConfig,...n},s=this._createOverlay(r),o=this._attachSnackBarContainer(s,r),a=new dR(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 Lh(e,void 0,l),d=o.attachComponentPortal(c);a.instance=d.instance}return this._breakpointObserver.observe("(max-width: 599.98px) and (orientation: portrait)").pipe(He(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 $i.create({parent:e&&e.viewContainerRef&&e.viewContainerRef.injector||this._injector,providers:[{provide:dR,useValue:n},{provide:AV,useValue:e.data}]})}}return i.\u0275fac=function(e){return new(e||i)(ee(as),ee(XI),ee($i),ee(GI),ee(i,12),ee(TV))},i.\u0275prov=ke({token:i,factory:i.\u0275fac}),i})(),IV=(()=>{class i extends vJ{constructor(e,n,r,s,o,a){super(e,n,r,s,o,a),this.simpleSnackBarComponent=hJ,this.snackBarContainerComponent=gJ,this.handsetCssClass="mat-mdc-snack-bar-handset"}}return i.\u0275fac=function(e){return new(e||i)(ee(as),ee(XI),ee($i),ee(GI),ee(i,12),ee(TV))},i.\u0275prov=ke({token:i,factory:i.\u0275fac,providedIn:DV}),i})();const yJ=["*",[["mat-toolbar-row"]]],bJ=["*","mat-toolbar-row"],xJ=Qy(class{constructor(i){this._elementRef=i}});let wJ=(()=>{class i{}return i.\u0275fac=function(e){return new(e||i)},i.\u0275dir=ve({type:i,selectors:[["mat-toolbar-row"]],hostAttrs:[1,"mat-toolbar-row"],exportAs:["matToolbarRow"]}),i})(),MJ=(()=>{class i extends xJ{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)(E(mt),E(zi),E(jt))},i.\u0275cmp=ot({type:i,selectors:[["mat-toolbar"]],contentQueries:function(e,n,r){if(1&e&&Wi(r,wJ,5),2&e){let s;Et(s=At())&&(n._toolbarRows=s)}},hostAttrs:[1,"mat-toolbar"],hostVars:4,hostBindings:function(e,n){2&e&&un("mat-toolbar-multiple-rows",n._toolbarRows.length>0)("mat-toolbar-single-row",0===n._toolbarRows.length)},inputs:{color:"color"},exportAs:["matToolbar"],features:[lt],ngContentSelectors:bJ,decls:2,vars:0,template:function(e,n){1&e&&(sr(yJ),Wt(0),Wt(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})(),CJ=(()=>{class i{}return i.\u0275fac=function(e){return new(e||i)},i.\u0275mod=nn({type:i}),i.\u0275inj=Kt({imports:[Qn,Qn]}),i})(),SJ=(()=>{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=ot({type:i,selectors:[["mat-divider"]],hostAttrs:["role","separator",1,"mat-divider"],hostVars:7,hostBindings:function(e,n){2&e&&(Dt("aria-orientation",n.vertical?"vertical":"horizontal"),un("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})(),RV=(()=>{class i{}return i.\u0275fac=function(e){return new(e||i)},i.\u0275mod=nn({type:i}),i.\u0275inj=Kt({imports:[Qn,Qn]}),i})();const EJ=["tooltip"],kV=new me("mat-tooltip-scroll-strategy"),TJ={provide:kV,deps:[as],useFactory:function DJ(i){return()=>i.scrollStrategies.reposition({scrollThrottle:20})}},RJ=new me("mat-tooltip-default-options",{providedIn:"root",factory:function IJ(){return{showDelay:0,hideDelay:0,touchendHideDelay:1500}}}),PV="tooltip-panel",OV=Oh({passive:!0});let NJ=(()=>{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=ks(e)}get hideDelay(){return this._hideDelay}set hideDelay(e){this._hideDelay=ks(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,d,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 Re,this._scrollStrategy=d,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(He(this._destroyed)).subscribe(()=>{this._overlayRef&&this._updatePosition(this._overlayRef)})}ngAfterViewInit(){this._viewInitialized=!0,this._setupPointerEnterEventsIfNeeded(),this._focusMonitor.monitor(this._elementRef).pipe(He(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,OV)}),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 Lh(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(He(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 mt)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(He(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}-${PV}`,scrollStrategy:this._scrollStrategy()}),this._updatePosition(this._overlayRef),this._overlayRef.detachments().pipe(He(this._destroyed)).subscribe(()=>this._detach()),this._overlayRef.outsidePointerEvents().pipe(He(this._destroyed)).subscribe(()=>this._tooltipInstance?._handleBodyInteraction()),this._overlayRef.keydownEvents().pipe(He(this._destroyed)).subscribe(s=>{this._isTooltipVisible()&&27===s.keyCode&&!Xo(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(Oi(1),He(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}-${PV}-`;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,OV)})}_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){xo()},i.\u0275dir=ve({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})(),Os=(()=>{class i extends NJ{constructor(e,n,r,s,o,a,l,c,d,h,p,m){super(e,n,r,s,o,a,l,c,d,h,p,m),this._tooltipComponent=UJ,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)(E(as),E(mt),E(qy),E(Wr),E(ft),E(zi),E(zZ),E(qc),E(kV),E(Ia,8),E(RJ,8),E(jt))},i.\u0275dir=ve({type:i,selectors:[["","matTooltip",""]],hostAttrs:[1,"mat-mdc-tooltip-trigger"],exportAs:["matTooltip"],features:[lt]}),i})(),BJ=(()=>{class i{constructor(e,n){this._changeDetectorRef=e,this._closeOnInteraction=!1,this._isVisible=!1,this._onHide=new Re,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)(E(Zn),E(Rr,8))},i.\u0275dir=ve({type:i}),i})(),UJ=(()=>{class i extends BJ{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)(E(Zn),E(mt),E(Rr,8))},i.\u0275cmp=ot({type:i,selectors:[["mat-tooltip-component"]],viewQuery:function(e,n){if(1&e&&Wn(EJ,7),2&e){let r;Et(r=At())&&(n._tooltip=r.first)}},hostAttrs:["aria-hidden","true"],hostVars:2,hostBindings:function(e,n){1&e&&Ue("mouseleave",function(s){return n._handleMouseLeave(s)}),2&e&&jo("zoom",n.isVisible()?1:null)},features:[lt],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&&(W(0,"div",0,1),Ue("animationend",function(s){return n._handleAnimationEnd(s)}),W(2,"div",2),Ve(3),j()()),2&e&&(un("mdc-tooltip--multiline",n._isMultiline),U("ngClass",n.tooltipClass),G(3),_i(n.message))},dependencies:[hm],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})(),FV=(()=>{class i{}return i.\u0275fac=function(e){return new(e||i)},i.\u0275mod=nn({type:i}),i.\u0275inj=Kt({providers:[TJ],imports:[BU,Eo,Pm,Qn,Qn,Xy]}),i})();function LV(...i){const t=w0(i),{args:e,keys:n}=VB(i),r=new In(s=>{const{length:o}=e;if(!o)return void s.complete();const a=new Array(o);let l=o,c=o;for(let d=0;d{h||(h=!0,c--),a[d]=p},()=>l--,void 0,()=>{(!l||!h)&&(c||s.next(n?zB(n,a):a),s.complete())}))}});return t?r.pipe(JT(t)):r}class uR{}class uu{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 uu?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 uu;return e.lazyInit=this.lazyInit&&this.lazyInit instanceof uu?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 VJ{encodeKey(t){return BV(t)}encodeValue(t){return BV(t)}decodeKey(t){return decodeURIComponent(t)}decodeValue(t){return decodeURIComponent(t)}}const HJ=/%(\d[a-f0-9])/gi,GJ={40:"@","3A":":",24:"$","2C":",","3B":";","3D":"=","3F":"?","2F":"/"};function BV(i){return encodeURIComponent(i).replace(HJ,(t,e)=>GJ[e]??t)}function QM(i){return`${i}`}class hu{constructor(t={}){if(this.updates=null,this.cloneFrom=null,this.encoder=t.encoder||new VJ,t.fromString){if(t.fromObject)throw new Error("Cannot specify both fromString and fromObject.");this.map=function zJ(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 hu({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 $J{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 UV(i){return typeof ArrayBuffer<"u"&&i instanceof ArrayBuffer}function VV(i){return typeof Blob<"u"&&i instanceof Blob}function zV(i){return typeof FormData<"u"&&i instanceof FormData}class rb{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 WJ(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 uu),this.context||(this.context=new $J),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 rb(e,n,s,{params:c,headers:l,context:d,reportProgress:a,responseType:r,withCredentials:o})}}var ls=(()=>((ls=ls||{})[ls.Sent=0]="Sent",ls[ls.UploadProgress=1]="UploadProgress",ls[ls.ResponseHeader=2]="ResponseHeader",ls[ls.DownloadProgress=3]="DownloadProgress",ls[ls.Response=4]="Response",ls[ls.User=5]="User",ls))();class YJ{constructor(t,e=200,n="OK"){this.headers=t.headers||new uu,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 hR extends YJ{constructor(t={}){super(t),this.type=ls.Response,this.body=void 0!==t.body?t.body:null}clone(t={}){return new hR({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 fR(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 pR=(()=>{class i{constructor(e){this.handler=e}request(e,n,r={}){let s;if(e instanceof rb)s=e;else{let l,c;l=r.headers instanceof uu?r.headers:new uu(r.headers),r.params&&(c=r.params instanceof hu?r.params:new hu({fromObject:r.params})),s=new rb(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=ht(s).pipe(ru(l=>this.handler.handle(l)));if(e instanceof rb||"events"===r.observe)return o;const a=o.pipe(gn(l=>l instanceof hR));switch(r.observe||"body"){case"body":switch(s.responseType){case"arraybuffer":return a.pipe(et(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(et(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(et(l=>{if(null!==l.body&&"string"!=typeof l.body)throw new Error("Response is not a string.");return l.body}));default:return a.pipe(et(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 hu).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,fR(r,n))}post(e,n,r={}){return this.request("POST",e,fR(r,n))}put(e,n,r={}){return this.request("PUT",e,fR(r,n))}}return i.\u0275fac=function(e){return new(e||i)(ee(uR))},i.\u0275prov=ke({token:i,factory:i.\u0275fac}),i})();const oee=["*"];let eC;function sb(i){return function aee(){if(void 0===eC&&(eC=null,typeof window<"u")){const i=window;void 0!==i.trustedTypes&&(eC=i.trustedTypes.createPolicy("angular#components",{createHTML:t=>t}))}return eC}()?.createHTML(i)||i}function XV(i){return Error(`Unable to find icon with the name "${i}"`)}function KV(i){return Error(`The URL provided to MatIconRegistry was not trusted as a resource URL via Angular's DomSanitizer. Attempted URL was "${i}".`)}function ZV(i){return Error(`The literal provided to MatIconRegistry was not trusted as safe HTML by Angular's DomSanitizer. Attempted literal was "${i}".`)}class Vh{constructor(t,e,n){this.url=t,this.svgText=e,this.options=n}}let tC=(()=>{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 Vh(r,null,s))}addSvgIconResolver(e){return this._resolvers.push(e),this}addSvgIconLiteralInNamespace(e,n,r,s){const o=this._sanitizer.sanitize(Kn.HTML,r);if(!o)throw ZV(r);const a=sb(o);return this._addSvgIconConfig(e,n,new Vh("",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 Vh(n,null,r))}addSvgIconSetLiteralInNamespace(e,n,r){const s=this._sanitizer.sanitize(Kn.HTML,n);if(!s)throw ZV(n);const o=sb(s);return this._addSvgIconSetConfig(e,new Vh("",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(Kn.RESOURCE_URL,e);if(!n)throw KV(e);const r=this._cachedIconsByUrl.get(n);return r?ht(nC(r)):this._loadSvgIconFromConfig(new Vh(e,null)).pipe(Vi(s=>this._cachedIconsByUrl.set(n,s)),et(s=>nC(s)))}getNamedSvgIcon(e,n=""){const r=QV(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(XV(r))}ngOnDestroy(){this._resolvers=[],this._svgIconConfigs.clear(),this._iconSetConfigs.clear(),this._cachedIconsByUrl.clear()}_getSvgFromConfig(e){return e.svgText?ht(nC(this._svgElementFromConfig(e))):this._loadSvgIconFromConfig(e).pipe(et(n=>nC(n)))}_getSvgFromIconSetConfigs(e,n){const r=this._extractIconWithNameFromAnySet(e,n);return r?ht(r):LV(n.filter(o=>!o.svgText).map(o=>this._loadSvgIconSetFromConfig(o).pipe(Wc(a=>{const c=`Loading icon set URL: ${this._sanitizer.sanitize(Kn.RESOURCE_URL,o.url)} failed: ${a.message}`;return this._errorHandler.handleError(new Error(c)),ht(null)})))).pipe(et(()=>{const o=this._extractIconWithNameFromAnySet(e,n);if(!o)throw XV(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(Vi(n=>e.svgText=n),et(()=>this._svgElementFromConfig(e)))}_loadSvgIconSetFromConfig(e){return e.svgText?ht(null):this._fetchIcon(e).pipe(Vi(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(sb(""));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(sb("")),r=e.attributes;for(let s=0;ssb(c)),su(()=>this._inProgressUrlFetches.delete(o)),Uf());return this._inProgressUrlFetches.set(o,l),l}_addSvgIconConfig(e,n,r){return this._svgIconConfigs.set(QV(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:""}}}),JV=["clip-path","color-profile","src","cursor","fill","filter","marker","marker-start","marker-mid","marker-end","mask","stroke"],mee=JV.map(i=>`[${i}]`).join(", "),gee=/^url\(['"]?#(.*?)['"]?\)$/;let gR=(()=>{class i extends uee{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=Zt.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(mee),r=this._elementsWithExternalReferences=this._elementsWithExternalReferences||new Map;for(let s=0;s{const a=n[s],l=a.getAttribute(o),c=l?l.match(gee):null;if(c){let d=r.get(a);d||(d=[],r.set(a,d)),d.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(Oi(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)(E(mt),E(tC),ya("aria-hidden"),E(fee),E(al),E(hee,8))},i.\u0275cmp=ot({type:i,selectors:[["mat-icon"]],hostAttrs:["role","img",1,"mat-icon","notranslate"],hostVars:8,hostBindings:function(e,n){2&e&&(Dt("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),un("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:[lt],ngContentSelectors:oee,decls:1,vars:0,template:function(e,n){1&e&&(sr(),Wt(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})(),ez=(()=>{class i{}return i.\u0275fac=function(e){return new(e||i)},i.\u0275mod=nn({type:i}),i.\u0275inj=Kt({imports:[Qn,Qn]}),i})(),tz=(()=>{class i{constructor(e){this.viewContainerRef=e}}return i.\u0275fac=function(e){return new(e||i)(E(Wr))},i.\u0275dir=ve({type:i,selectors:[["","dataBlockUI",""]]}),i})(),_ee=(()=>{class i{constructor(){this.resource=null,this.name="",this.resourceDescription="",this.changed=new We}}return i.\u0275fac=function(e){return new(e||i)},i.\u0275cmp=ot({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&&(W(0,"p",0),Ve(1),j()),2&e&&(U("matTooltip",n.resourceDescription),G(1),tm("",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:[Os],changeDetection:0}),i})();function vee(i,t){if(1&i&&(W(0,"h2",4),Ve(1),j()),2&i){const e=he();U("matTooltip",e.resourceDescription),G(1),_i(e.name)}}function yee(i,t){1&i&&De(0,"app-block-actions",5),2&i&&U("resource",he().resource)}const bee=function(i,t,e,n){return{id:i,name:t,data:e,schema:n}};function xee(i,t){if(1&i&&De(0,"app-editor",7),2&i){const e=he().$implicit,n=he();U("resource",L2(3,bee,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 wee(i,t){if(1&i&&(Gr(0),fe(1,xee,1,8,"app-editor",6),Ct(2,"async"),$r()),2&i){const e=t.$implicit,n=he();G(1),U("ngIf",!(Tt(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 Jl=(()=>{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 We,this.destroyed$=new Re}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(He(this.destroyed$),gn(([n,r])=>!!this.resource&&n.startsWith(this.resource.id)&&!n.substring(this.resource.id.length+1).includes("/"))).subscribe(function(){var n=tt(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)(E(ka))},i.\u0275cmp=ot({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&&(fe(0,vee,2,2,"h2",0),Ct(1,"async"),fe(2,yee,1,1,"app-block-actions",1),W(3,"div",2),fe(4,wee,3,3,"ng-container",3),j()),2&e){let r;U("ngIf",n.name&&n.name!=(null==(r=Tt(1,4,n.main.resource$))?null:r.name)),G(2),U("ngIf",!n.hideBlockActions),G(2),U("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})(),nz=(()=>{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)(E(ol),E(mt))},i.\u0275dir=ve({type:i}),i})(),zh=(()=>{class i extends nz{}return i.\u0275fac=function(){let t;return function(n){return(t||(t=ri(i)))(n||i)}}(),i.\u0275dir=ve({type:i,features:[lt]}),i})();const Do=new me("NgValueAccessor"),Cee={provide:Do,useExisting:Gn(()=>gl),multi:!0},Eee=new me("CompositionEventMode");let gl=(()=>{class i extends nz{constructor(e,n,r){super(e,n),this._compositionMode=r,this._composing=!1,null==this._compositionMode&&(this._compositionMode=!function See(){const i=Hc()?Hc().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)(E(ol),E(mt),E(Eee,8))},i.\u0275dir=ve({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&&Ue("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:[Dn([Cee]),lt]}),i})();const Aee=!1;function fu(i){return null==i||("string"==typeof i||Array.isArray(i))&&0===i.length}function rz(i){return null!=i&&"number"==typeof i.length}const Yr=new me("NgValidators"),pu=new me("NgAsyncValidators"),Dee=/^(?=.{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 _l{static min(t){return sz(t)}static max(t){return oz(t)}static required(t){return function az(i){return fu(i.value)?{required:!0}:null}(t)}static requiredTrue(t){return function lz(i){return!0===i.value?null:{required:!0}}(t)}static email(t){return function cz(i){return fu(i.value)||Dee.test(i.value)?null:{email:!0}}(t)}static minLength(t){return dz(t)}static maxLength(t){return uz(t)}static pattern(t){return function hz(i){if(!i)return iC;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(fu(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 vz(t)}static composeAsync(t){return yz(t)}}function sz(i){return t=>{if(fu(t.value)||fu(i))return null;const e=parseFloat(t.value);return!isNaN(e)&&e{if(fu(t.value)||fu(i))return null;const e=parseFloat(t.value);return!isNaN(e)&&e>i?{max:{max:i,actual:t.value}}:null}}function dz(i){return t=>fu(t.value)||!rz(t.value)?null:t.value.lengthrz(t.value)&&t.value.length>i?{maxlength:{requiredLength:i,actualLength:t.value.length}}:null}function iC(i){return null}function fz(i){return null!=i}function pz(i){const t=oy(i)?Ni(i):i;if(Aee&&!L1(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 pe(-1101,e)}return t}function mz(i){let t={};return i.forEach(e=>{t=null!=e?{...t,...e}:t}),0===Object.keys(t).length?null:t}function gz(i,t){return t.map(e=>e(i))}function _z(i){return i.map(t=>function Tee(i){return!i.validate}(t)?t:e=>t.validate(e))}function vz(i){if(!i)return null;const t=i.filter(fz);return 0==t.length?null:function(e){return mz(gz(e,t))}}function _R(i){return null!=i?vz(_z(i)):null}function yz(i){if(!i)return null;const t=i.filter(fz);return 0==t.length?null:function(e){return LV(gz(e,t).map(pz)).pipe(et(mz))}}function vR(i){return null!=i?yz(_z(i)):null}function bz(i,t){return null===i?[t]:Array.isArray(i)?[...i,t]:[i,t]}function xz(i){return i._rawValidators}function wz(i){return i._rawAsyncValidators}function yR(i){return i?Array.isArray(i)?i:[i]:[]}function rC(i,t){return Array.isArray(i)?i.includes(t):i===t}function Mz(i,t){const e=yR(t);return yR(i).forEach(r=>{rC(e,r)||e.push(r)}),e}function Cz(i,t){return yR(t).filter(e=>!rC(i,e))}class Sz{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=_R(this._rawValidators)}_setAsyncValidators(t){this._rawAsyncValidators=t||[],this._composedAsyncValidatorFn=vR(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 ao extends Sz{get formDirective(){return null}get path(){return null}}class ec extends Sz{constructor(){super(...arguments),this._parent=null,this.name=null,this.valueAccessor=null}}class Ez{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 tc=(()=>{class i extends Ez{constructor(e){super(e)}}return i.\u0275fac=function(e){return new(e||i)(E(ec,2))},i.\u0275dir=ve({type:i,selectors:[["","formControlName",""],["","ngModel",""],["","formControl",""]],hostVars:14,hostBindings:function(e,n){2&e&&un("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:[lt]}),i})(),bR=(()=>{class i extends Ez{constructor(e){super(e)}}return i.\u0275fac=function(e){return new(e||i)(E(ao,10))},i.\u0275dir=ve({type:i,selectors:[["","formGroupName",""],["","formArrayName",""],["","ngModelGroup",""],["","formGroup",""],["form",3,"ngNoForm",""],["","ngForm",""]],hostVars:16,hostBindings:function(e,n){2&e&&un("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:[lt]}),i})();function Az(i,t){return i?`with name: '${t}'`:`at index: ${t}`}const MR=!1,ob="VALID",oC="INVALID",zm="PENDING",ab="DISABLED";function CR(i){return(aC(i)?i.validators:i)||null}function SR(i,t){return(aC(t)?t.asyncValidators:i)||null}function aC(i){return null!=i&&!Array.isArray(i)&&"object"==typeof i}function Dz(i,t,e){const n=i.controls;if(!(t?Object.keys(n):n).length)throw new pe(1e3,MR?function Pee(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 pe(1001,MR?function Oee(i,t){return`Cannot find form control ${Az(i,t)}`}(t,e):"")}function Tz(i,t,e){i._forEachChild((n,r)=>{if(void 0===e[r])throw new pe(1002,MR?function Fee(i,t){return`Must supply a value for form control ${Az(i,t)}`}(t,r):"")})}class lC{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===ob}get invalid(){return this.status===oC}get pending(){return this.status==zm}get disabled(){return this.status===ab}get enabled(){return this.status!==ab}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(Mz(t,this._rawValidators))}addAsyncValidators(t){this.setAsyncValidators(Mz(t,this._rawAsyncValidators))}removeValidators(t){this.setValidators(Cz(t,this._rawValidators))}removeAsyncValidators(t){this.setAsyncValidators(Cz(t,this._rawAsyncValidators))}hasValidator(t){return rC(this._rawValidators,t)}hasAsyncValidator(t){return rC(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=ab,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=ob,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===ob||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()?ab:ob}_runValidator(){return this.validator?this.validator(this):null}_runAsyncValidator(t){if(this.asyncValidator){this.status=zm,this._hasOwnPendingAsyncValidator=!0;const e=pz(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 We,this.statusChanges=new We}_calculateStatus(){return this._allControlsDisabled()?ab:this.errors?oC:this._hasOwnPendingAsyncValidator||this._anyControlsHaveStatus(zm)?zm:this._anyControlsHaveStatus(oC)?oC:ob}_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){aC(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 Lee(i){return Array.isArray(i)?_R(i):i||null}(this._rawValidators)}_assignAsyncValidators(t){this._rawAsyncValidators=Array.isArray(t)?t.slice():t,this._composedAsyncValidatorFn=function Nee(i){return Array.isArray(i)?vR(i):i||null}(this._rawAsyncValidators)}}class Hm extends lC{constructor(t,e,n){super(CR(e),SR(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={}){Tz(this,!0,t),Object.keys(t).forEach(n=>{Dz(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 Iz extends Hm{}const Hh=new me("CallSetDisabledState",{providedIn:"root",factory:()=>lb}),lb="always";function cC(i,t){return[...t.path,i]}function cb(i,t,e=lb){ER(i,t),t.valueAccessor.writeValue(i.value),(i.disabled||"always"===e)&&t.valueAccessor.setDisabledState?.(i.disabled),function Uee(i,t){t.valueAccessor.registerOnChange(e=>{i._pendingValue=e,i._pendingChange=!0,i._pendingDirty=!0,"change"===i.updateOn&&Rz(i,t)})}(i,t),function zee(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 Vee(i,t){t.valueAccessor.registerOnTouched(()=>{i._pendingTouched=!0,"blur"===i.updateOn&&i._pendingChange&&Rz(i,t),"submit"!==i.updateOn&&i.markAsTouched()})}(i,t),function Bee(i,t){if(t.valueAccessor.setDisabledState){const e=n=>{t.valueAccessor.setDisabledState(n)};i.registerOnDisabledChange(e),t._registerOnDestroy(()=>{i._unregisterOnDisabledChange(e)})}}(i,t)}function dC(i,t,e=!0){const n=()=>{};t.valueAccessor&&(t.valueAccessor.registerOnChange(n),t.valueAccessor.registerOnTouched(n)),hC(i,t),i&&(t._invokeOnDestroyCallbacks(),i._registerOnCollectionChange(()=>{}))}function uC(i,t){i.forEach(e=>{e.registerOnValidatorChange&&e.registerOnValidatorChange(t)})}function ER(i,t){const e=xz(i);null!==t.validator?i.setValidators(bz(e,t.validator)):"function"==typeof e&&i.setValidators([e]);const n=wz(i);null!==t.asyncValidator?i.setAsyncValidators(bz(n,t.asyncValidator)):"function"==typeof n&&i.setAsyncValidators([n]);const r=()=>i.updateValueAndValidity();uC(t._rawValidators,r),uC(t._rawAsyncValidators,r)}function hC(i,t){let e=!1;if(null!==i){if(null!==t.validator){const r=xz(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=wz(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 uC(t._rawValidators,n),uC(t._rawAsyncValidators,n),e}function Rz(i,t){i._pendingDirty&&i.markAsDirty(),i.setValue(i._pendingValue,{emitModelToViewChange:!1}),t.viewToModelUpdate(i._pendingValue),i._pendingChange=!1}function kz(i,t){ER(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 Pz(i,t){i._syncPendingControls(),t.forEach(e=>{const n=e.control;"submit"===n.updateOn&&n._pendingChange&&(e.viewToModelUpdate(n._pendingValue),n._pendingChange=!1)})}function TR(i,t){if(!t)return null;let e,n,r;return Array.isArray(t),t.forEach(s=>{s.constructor===gl?e=s:function $ee(i){return Object.getPrototypeOf(i.constructor)===zh}(s)?n=s:r=s}),r||n||e||null}const jee={provide:ao,useExisting:Gn(()=>ub)},db=(()=>Promise.resolve())();let ub=(()=>{class i extends ao{constructor(e,n,r){super(),this.callSetDisabledState=r,this.submitted=!1,this._directives=new Set,this.ngSubmit=new We,this.form=new Hm({},_R(e),vR(n))}ngAfterViewInit(){this._setUpdateStrategy()}get formDirective(){return this}get control(){return this.form}get path(){return[]}get controls(){return this.form.controls}addControl(e){db.then(()=>{const n=this._findContainer(e.path);e.control=n.registerControl(e.name,e.control),cb(e.control,e,this.callSetDisabledState),e.control.updateValueAndValidity({emitEvent:!1}),this._directives.add(e)})}getControl(e){return this.form.get(e.path)}removeControl(e){db.then(()=>{const n=this._findContainer(e.path);n&&n.removeControl(e.name),this._directives.delete(e)})}addFormGroup(e){db.then(()=>{const n=this._findContainer(e.path),r=new Hm({});kz(r,e),n.registerControl(e.name,r),r.updateValueAndValidity({emitEvent:!1})})}removeFormGroup(e){db.then(()=>{const n=this._findContainer(e.path);n&&n.removeControl(e.name)})}getFormGroup(e){return this.form.get(e.path)}updateModel(e,n){db.then(()=>{this.form.get(e.path).setValue(n)})}setValue(e){this.control.setValue(e)}onSubmit(e){return this.submitted=!0,Pz(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)(E(Yr,10),E(pu,10),E(Hh,8))},i.\u0275dir=ve({type:i,selectors:[["form",3,"ngNoForm","",3,"formGroup",""],["ng-form"],["","ngForm",""]],hostBindings:function(e,n){1&e&&Ue("submit",function(s){return n.onSubmit(s)})("reset",function(){return n.onReset()})},inputs:{options:["ngFormOptions","options"]},outputs:{ngSubmit:"ngSubmit"},exportAs:["ngForm"],features:[Dn([jee]),lt]}),i})();function Oz(i,t){const e=i.indexOf(t);e>-1&&i.splice(e,1)}function Fz(i){return"object"==typeof i&&null!==i&&2===Object.keys(i).length&&"value"in i&&"disabled"in i}const nc=class extends lC{constructor(t=null,e,n){super(CR(e),SR(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}),aC(e)&&(e.nonNullable||e.initialValueIsDefault)&&(this.defaultValue=Fz(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){Oz(this._onChange,t)}registerOnDisabledChange(t){this._onDisabledChange.push(t)}_unregisterOnDisabledChange(t){Oz(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){Fz(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}},Xee={provide:ec,useExisting:Gn(()=>Kc)},Bz=(()=>Promise.resolve())();let Kc=(()=>{class i extends ec{constructor(e,n,r,s,o,a){super(),this._changeDetectorRef=o,this.callSetDisabledState=a,this.control=new nc,this._registered=!1,this.update=new We,this._parent=e,this._setValidators(n),this._setAsyncValidators(r),this.valueAccessor=TR(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(){cb(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){Bz.then(()=>{this.control.setValue(e,{emitViewToModelChange:!1}),this._changeDetectorRef?.markForCheck()})}_updateDisabled(e){const n=e.isDisabled.currentValue,r=0!==n&&function um(i){return"boolean"==typeof i?i:null!=i&&"false"!==i}(n);Bz.then(()=>{r&&!this.control.disabled?this.control.disable():!r&&this.control.disabled&&this.control.enable(),this._changeDetectorRef?.markForCheck()})}_getPath(e){return this._parent?cC(e,this._parent):[e]}}return i.\u0275fac=function(e){return new(e||i)(E(ao,9),E(Yr,10),E(pu,10),E(Do,10),E(Zn,8),E(Hh,8))},i.\u0275dir=ve({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:[Dn([Xee]),lt,bi]}),i})(),IR=(()=>{class i{}return i.\u0275fac=function(e){return new(e||i)},i.\u0275dir=ve({type:i,selectors:[["form",3,"ngNoForm","",3,"ngNativeValidate",""]],hostAttrs:["novalidate",""]}),i})();const Kee={provide:Do,useExisting:Gn(()=>mu),multi:!0};let mu=(()=>{class i extends zh{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=ri(i)))(n||i)}}(),i.\u0275dir=ve({type:i,selectors:[["input","type","number","formControlName",""],["input","type","number","formControl",""],["input","type","number","ngModel",""]],hostBindings:function(e,n){1&e&&Ue("input",function(s){return n.onChange(s.target.value)})("blur",function(){return n.onTouched()})},features:[Dn([Kee]),lt]}),i})(),Uz=(()=>{class i{}return i.\u0275fac=function(e){return new(e||i)},i.\u0275mod=nn({type:i}),i.\u0275inj=Kt({}),i})();const RR=new me("NgModelWithFormControlWarning"),tte={provide:ao,useExisting:Gn(()=>Gh)};let Gh=(()=>{class i extends ao{constructor(e,n,r){super(),this.callSetDisabledState=r,this.submitted=!1,this._onCollectionChange=()=>this._updateDomValue(),this.directives=[],this.form=null,this.ngSubmit=new We,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&&(hC(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 cb(n,e,this.callSetDisabledState),n.updateValueAndValidity({emitEvent:!1}),this.directives.push(e),n}getControl(e){return this.form.get(e.path)}removeControl(e){dC(e.control||null,e,!1),function Wee(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,Pz(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&&(dC(n||null,e),(i=>i instanceof nc)(r)&&(cb(r,e,this.callSetDisabledState),e.control=r))}),this.form._updateTreeValidity({emitEvent:!1})}_setUpFormContainer(e){const n=this.form.get(e.path);kz(n,e),n.updateValueAndValidity({emitEvent:!1})}_cleanUpFormContainer(e){if(this.form){const n=this.form.get(e.path);n&&function Hee(i,t){return hC(i,t)}(n,e)&&n.updateValueAndValidity({emitEvent:!1})}}_updateRegistrations(){this.form._registerOnCollectionChange(this._onCollectionChange),this._oldForm&&this._oldForm._registerOnCollectionChange(()=>{})}_updateValidators(){ER(this.form,this),this._oldForm&&hC(this._oldForm,this)}_checkFormPresent(){}}return i.\u0275fac=function(e){return new(e||i)(E(Yr,10),E(pu,10),E(Hh,8))},i.\u0275dir=ve({type:i,selectors:[["","formGroup",""]],hostBindings:function(e,n){1&e&&Ue("submit",function(s){return n.onSubmit(s)})("reset",function(){return n.onReset()})},inputs:{form:["formGroup","form"]},outputs:{ngSubmit:"ngSubmit"},exportAs:["ngForm"],features:[Dn([tte]),lt,bi]}),i})();const rte={provide:ec,useExisting:Gn(()=>fC)};let fC=(()=>{class i extends ec{set isDisabled(e){}constructor(e,n,r,s,o){super(),this._ngModelWarningConfig=o,this._added=!1,this.update=new We,this._ngModelWarningSent=!1,this._parent=e,this._setValidators(n),this._setAsyncValidators(r),this.valueAccessor=TR(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 cC(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)(E(ao,13),E(Yr,10),E(pu,10),E(Do,10),E(RR,8))},i.\u0275dir=ve({type:i,selectors:[["","formControlName",""]],inputs:{name:["formControlName","name"],isDisabled:["disabled","isDisabled"],model:["ngModel","model"]},outputs:{update:"ngModelChange"},features:[Dn([rte]),lt,bi]}),i})();function jz(i){return"number"==typeof i?i:parseInt(i,10)}function Yz(i){return"number"==typeof i?i:parseFloat(i)}let $h=(()=>{class i{constructor(){this._validator=iC}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):iC,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=ve({type:i,features:[bi]}),i})();const ute={provide:Yr,useExisting:Gn(()=>gu),multi:!0};let gu=(()=>{class i extends $h{constructor(){super(...arguments),this.inputName="max",this.normalizeInput=e=>Yz(e),this.createValidator=e=>oz(e)}}return i.\u0275fac=function(){let t;return function(n){return(t||(t=ri(i)))(n||i)}}(),i.\u0275dir=ve({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&&Dt("max",n._enabled?n.max:null)},inputs:{max:"max"},features:[Dn([ute]),lt]}),i})();const hte={provide:Yr,useExisting:Gn(()=>_u),multi:!0};let _u=(()=>{class i extends $h{constructor(){super(...arguments),this.inputName="min",this.normalizeInput=e=>Yz(e),this.createValidator=e=>sz(e)}}return i.\u0275fac=function(){let t;return function(n){return(t||(t=ri(i)))(n||i)}}(),i.\u0275dir=ve({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&&Dt("min",n._enabled?n.min:null)},inputs:{min:"min"},features:[Dn([hte]),lt]}),i})();const gte={provide:Yr,useExisting:Gn(()=>NR),multi:!0};let NR=(()=>{class i extends $h{constructor(){super(...arguments),this.inputName="minlength",this.normalizeInput=e=>jz(e),this.createValidator=e=>dz(e)}}return i.\u0275fac=function(){let t;return function(n){return(t||(t=ri(i)))(n||i)}}(),i.\u0275dir=ve({type:i,selectors:[["","minlength","","formControlName",""],["","minlength","","formControl",""],["","minlength","","ngModel",""]],hostVars:1,hostBindings:function(e,n){2&e&&Dt("minlength",n._enabled?n.minlength:null)},inputs:{minlength:"minlength"},features:[Dn([gte]),lt]}),i})();const _te={provide:Yr,useExisting:Gn(()=>BR),multi:!0};let BR=(()=>{class i extends $h{constructor(){super(...arguments),this.inputName="maxlength",this.normalizeInput=e=>jz(e),this.createValidator=e=>uz(e)}}return i.\u0275fac=function(){let t;return function(n){return(t||(t=ri(i)))(n||i)}}(),i.\u0275dir=ve({type:i,selectors:[["","maxlength","","formControlName",""],["","maxlength","","formControl",""],["","maxlength","","ngModel",""]],hostVars:1,hostBindings:function(e,n){2&e&&Dt("maxlength",n._enabled?n.maxlength:null)},inputs:{maxlength:"maxlength"},features:[Dn([_te]),lt]}),i})(),Zz=(()=>{class i{}return i.\u0275fac=function(e){return new(e||i)},i.\u0275mod=nn({type:i}),i.\u0275inj=Kt({imports:[Uz]}),i})();class Qz extends lC{constructor(t,e,n){super(CR(e),SR(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={}){Tz(this,!1,t),t.forEach((n,r)=>{Dz(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 Jz(i){return!!i&&(void 0!==i.asyncValidators||void 0!==i.validators||void 0!==i.updateOn)}let yte=(()=>{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 Jz(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 Iz(r,n)}control(e,n,r){let s={};return this.useNonNullable?(Jz(n)?s=n:(s.validators=n,s.asyncValidators=r),new nc(e,{...s,nonNullable:!0})):new nc(e,n,r)}array(e,n,r){const s=e.map(o=>this._createControl(o));return new Qz(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 nc||e instanceof lC?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=ke({token:i,factory:i.\u0275fac,providedIn:"root"}),i})(),eH=(()=>{class i{static withConfig(e){return{ngModule:i,providers:[{provide:Hh,useValue:e.callSetDisabledState??lb}]}}}return i.\u0275fac=function(e){return new(e||i)},i.\u0275mod=nn({type:i}),i.\u0275inj=Kt({imports:[Zz]}),i})(),tH=(()=>{class i{static withConfig(e){return{ngModule:i,providers:[{provide:RR,useValue:e.warnOnNgModelWithFormControl??"always"},{provide:Hh,useValue:e.callSetDisabledState??lb}]}}}return i.\u0275fac=function(e){return new(e||i)},i.\u0275mod=nn({type:i}),i.\u0275inj=Kt({imports:[Zz]}),i})();const bte=["matFormFieldNotchedOutline",""],xte=["*"],wte=["textField"],Mte=["iconPrefixContainer"],Cte=["textPrefixContainer"];function Ste(i,t){1&i&&De(0,"span",19)}function Ete(i,t){if(1&i){const e=di();W(0,"label",17),Ue("cdkObserveContent",function(){return an(e),zt(he(2)._refreshOutlineNotchWidth())}),Wt(1,1),fe(2,Ste,1,0,"span",18),j()}if(2&i){const e=he(2);U("floating",e._shouldLabelFloat())("cdkObserveContentDisabled",!e._hasOutline())("id",e._labelId),Dt("for",e._control.id)("aria-owns",e._control.id),G(2),U("ngIf",!e.hideRequiredMarker&&e._control.required)}}function Ate(i,t){1&i&&fe(0,Ete,3,6,"label",16),2&i&&U("ngIf",he()._hasFloatingLabel())}function Dte(i,t){1&i&&De(0,"div",20)}function Tte(i,t){}function Ite(i,t){1&i&&fe(0,Tte,0,0,"ng-template",22),2&i&&(he(2),U("ngTemplateOutlet",Zi(1)))}function Rte(i,t){if(1&i&&(W(0,"div",21),fe(1,Ite,1,1,"ng-template",9),j()),2&i){const e=he();U("matFormFieldNotchedOutlineOpen",e._shouldLabelFloat())("matFormFieldNotchedOutlineLabelWidth",e._labelWidth),G(1),U("ngIf",!e._forceDisplayInfixLabel())}}function kte(i,t){1&i&&(W(0,"div",23,24),Wt(2,2),j())}function Pte(i,t){1&i&&(W(0,"div",25,26),Wt(2,3),j())}function Ote(i,t){}function Fte(i,t){1&i&&fe(0,Ote,0,0,"ng-template",22),2&i&&(he(),U("ngTemplateOutlet",Zi(1)))}function Lte(i,t){1&i&&(W(0,"div",27),Wt(1,4),j())}function Nte(i,t){1&i&&(W(0,"div",28),Wt(1,5),j())}function Bte(i,t){1&i&&De(0,"div",29)}function Ute(i,t){1&i&&(W(0,"div",30),Wt(1,6),j()),2&i&&U("@transitionMessages",he()._subscriptAnimationState)}function Vte(i,t){if(1&i&&(W(0,"mat-hint",34),Ve(1),j()),2&i){const e=he(2);U("id",e._hintLabelId),G(1),_i(e.hintLabel)}}function zte(i,t){if(1&i&&(W(0,"div",31),fe(1,Vte,2,2,"mat-hint",32),Wt(2,7),De(3,"div",33),Wt(4,8),j()),2&i){const e=he();U("@transitionMessages",e._subscriptAnimationState),G(1),U("ngIf",e.hintLabel)}}const Hte=["*",[["mat-label"]],[["","matPrefix",""],["","matIconPrefix",""]],[["","matTextPrefix",""]],[["","matTextSuffix",""]],[["","matSuffix",""],["","matIconSuffix",""]],[["mat-error"],["","matError",""]],[["mat-hint",3,"align","end"]],[["mat-hint","align","end"]]],Gte=["*","mat-label","[matPrefix], [matIconPrefix]","[matTextPrefix]","[matTextSuffix]","[matSuffix], [matIconSuffix]","mat-error, [matError]","mat-hint:not([align='end'])","mat-hint[align='end']"];let To=(()=>{class i{}return i.\u0275fac=function(e){return new(e||i)},i.\u0275dir=ve({type:i,selectors:[["mat-label"]]}),i})(),$te=0;const nH=new me("MatError");let Wte=(()=>{class i{constructor(e,n){this.id="mat-mdc-error-"+$te++,e||n.nativeElement.setAttribute("aria-live","polite")}}return i.\u0275fac=function(e){return new(e||i)(ya("aria-live"),E(mt))},i.\u0275dir=ve({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&&Yl("id",n.id)},inputs:{id:"id"},features:[Dn([{provide:nH,useExisting:i}])]}),i})(),jte=0,iH=(()=>{class i{constructor(){this.align="start",this.id="mat-mdc-hint-"+jte++}}return i.\u0275fac=function(e){return new(e||i)},i.\u0275dir=ve({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&&(Yl("id",n.id),Dt("align",null),un("mat-mdc-form-field-hint-end","end"===n.align))},inputs:{align:"align",id:"id"}}),i})();const rH=new me("MatPrefix");let Yte=(()=>{class i{constructor(){this._isText=!1}set _isTextSelector(e){this._isText=!0}}return i.\u0275fac=function(e){return new(e||i)},i.\u0275dir=ve({type:i,selectors:[["","matPrefix",""],["","matIconPrefix",""],["","matTextPrefix",""]],inputs:{_isTextSelector:["matTextPrefix","_isTextSelector"]},features:[Dn([{provide:rH,useExisting:i}])]}),i})();const sH=new me("MatSuffix");let qte=(()=>{class i{constructor(){this._isText=!1}set _isTextSelector(e){this._isText=!0}}return i.\u0275fac=function(e){return new(e||i)},i.\u0275dir=ve({type:i,selectors:[["","matSuffix",""],["","matIconSuffix",""],["","matTextSuffix",""]],inputs:{_isTextSelector:["matTextSuffix","_isTextSelector"]},features:[Dn([{provide:sH,useExisting:i}])]}),i})(),oH=(()=>{class i{constructor(e){this._elementRef=e,this.floating=!1}getWidth(){return function Xte(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)(E(mt))},i.\u0275dir=ve({type:i,selectors:[["label","matFormFieldFloatingLabel",""]],hostAttrs:[1,"mdc-floating-label","mat-mdc-floating-label"],hostVars:2,hostBindings:function(e,n){2&e&&un("mdc-floating-label--float-above",n.floating)},inputs:{floating:"floating"}}),i})();const aH="mdc-line-ripple--active",pC="mdc-line-ripple--deactivating";let lH=(()=>{class i{constructor(e,n){this._elementRef=e,this._handleTransitionEnd=r=>{const s=this._elementRef.nativeElement.classList,o=s.contains(pC);"opacity"===r.propertyName&&o&&s.remove(aH,pC)},n.runOutsideAngular(()=>{e.nativeElement.addEventListener("transitionend",this._handleTransitionEnd)})}activate(){const e=this._elementRef.nativeElement.classList;e.remove(pC),e.add(aH)}deactivate(){this._elementRef.nativeElement.classList.add(pC)}ngOnDestroy(){this._elementRef.nativeElement.removeEventListener("transitionend",this._handleTransitionEnd)}}return i.\u0275fac=function(e){return new(e||i)(E(mt),E(ft))},i.\u0275dir=ve({type:i,selectors:[["div","matFormFieldLineRipple",""]],hostAttrs:[1,"mdc-line-ripple"]}),i})(),cH=(()=>{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)(E(mt),E(ft))},i.\u0275cmp=ot({type:i,selectors:[["div","matFormFieldNotchedOutline",""]],hostAttrs:[1,"mdc-notched-outline"],hostVars:2,hostBindings:function(e,n){2&e&&un("mdc-notched-outline--notched",n.open)},inputs:{labelWidth:["matFormFieldNotchedOutlineLabelWidth","labelWidth"],open:["matFormFieldNotchedOutlineOpen","open"]},attrs:bte,ngContentSelectors:xte,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&&(sr(),De(0,"div",0),W(1,"div",1),Wt(2),j(),De(3,"div",2)),2&e&&(G(1),jo("width",n._getNotchWidth()))},encapsulation:2,changeDetection:0}),i})();const Kte={transitionMessages:Ra("transitionMessages",[Ps("enter",si({opacity:1,transform:"translateY(0%)"})),Pr("void => enter",[si({opacity:0,transform:"translateY(-5px)"}),jr("300ms cubic-bezier(0.55, 0, 0.55, 0.2)")])])};let UR=(()=>{class i{}return i.\u0275fac=function(e){return new(e||i)},i.\u0275dir=ve({type:i}),i})();const mC=new me("MatFormField"),Zte=new me("MAT_FORM_FIELD_DEFAULT_OPTIONS");let dH=0,vl=(()=>{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-"+dH++,this._hintLabelId="mat-mdc-hint-"+dH++,this._subscriptAnimationState="",this._labelWidth=0,this._destroyed=new Re,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(He(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(),Mr(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(He(this._destroyed)).subscribe(()=>{this._needsOutlineLabelOffsetUpdateOnStable&&(this._needsOutlineLabelOffsetUpdateOnStable=!1,this._updateOutlineLabelOffset())})}),this._dir.change.pipe(He(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)(E(mt),E(Zn),E(ft),E(Ia),E(zi),E(Zte,8),E(Rr,8),E(jt))},i.\u0275cmp=ot({type:i,selectors:[["mat-form-field"]],contentQueries:function(e,n,r){if(1&e&&(Wi(r,To,5),Wi(r,To,7),Wi(r,UR,5),Wi(r,rH,5),Wi(r,sH,5),Wi(r,nH,5),Wi(r,iH,5)),2&e){let s;Et(s=At())&&(n._labelChildNonStatic=s.first),Et(s=At())&&(n._labelChildStatic=s.first),Et(s=At())&&(n._formFieldControl=s.first),Et(s=At())&&(n._prefixChildren=s),Et(s=At())&&(n._suffixChildren=s),Et(s=At())&&(n._errorChildren=s),Et(s=At())&&(n._hintChildren=s)}},viewQuery:function(e,n){if(1&e&&(Wn(wte,5),Wn(Mte,5),Wn(Cte,5),Wn(oH,5),Wn(cH,5),Wn(lH,5)),2&e){let r;Et(r=At())&&(n._textField=r.first),Et(r=At())&&(n._iconPrefixContainer=r.first),Et(r=At())&&(n._textPrefixContainer=r.first),Et(r=At())&&(n._floatingLabel=r.first),Et(r=At())&&(n._notchedOutline=r.first),Et(r=At())&&(n._lineRipple=r.first)}},hostAttrs:[1,"mat-mdc-form-field"],hostVars:42,hostBindings:function(e,n){2&e&&un("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:[Dn([{provide:mC,useExisting:i}])],ngContentSelectors:Gte,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&&(sr(Hte),fe(0,Ate,1,1,"ng-template",null,0,Vc),W(2,"div",1,2),Ue("click",function(s){return n._control.onContainerClick&&n._control.onContainerClick(s)}),fe(4,Dte,1,0,"div",3),W(5,"div",4),fe(6,Rte,2,3,"div",5),fe(7,kte,3,0,"div",6),fe(8,Pte,3,0,"div",7),W(9,"div",8),fe(10,Fte,1,1,"ng-template",9),Wt(11),j(),fe(12,Lte,2,0,"div",10),fe(13,Nte,2,0,"div",11),j(),fe(14,Bte,1,0,"div",12),j(),W(15,"div",13),fe(16,Ute,2,1,"div",14),fe(17,zte,5,2,"div",15),j()),2&e&&(G(2),un("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),G(2),U("ngIf",!n._hasOutline()&&!n._control.disabled),G(2),U("ngIf",n._hasOutline()),G(1),U("ngIf",n._hasIconPrefix),G(1),U("ngIf",n._hasTextPrefix),G(2),U("ngIf",!n._hasOutline()||n._forceDisplayInfixLabel()),G(2),U("ngIf",n._hasTextSuffix),G(1),U("ngIf",n._hasIconSuffix),G(1),U("ngIf",!n._hasOutline()),G(1),un("mat-mdc-form-field-subscript-dynamic-size","dynamic"===n.subscriptSizing),U("ngSwitch",n._getDisplayedMessages()),G(1),U("ngSwitchCase","error"),G(1),U("ngSwitchCase","hint"))},dependencies:[vi,xy,by,VT,CU,iH,oH,cH,lH],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:[Kte.transitionMessages]},changeDetection:0}),i})(),gC=(()=>{class i{}return i.\u0275fac=function(e){return new(e||i)},i.\u0275mod=nn({type:i}),i.\u0275inj=Kt({imports:[Qn,Eo,HI,Qn]}),i})();const fH=Oh({passive:!0});let ene=(()=>{class i{constructor(e,n){this._platform=e,this._ngZone=n,this._monitoredElements=new Map}monitor(e){if(!this._platform.isBrowser)return po;const n=Yc(e),r=this._monitoredElements.get(n);if(r)return r.subject;const s=new Re,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,fH),n.classList.add("cdk-text-field-autofill-monitored")}),this._monitoredElements.set(n,{subject:s,unlisten:()=>{n.removeEventListener("animationstart",a,fH)}}),s}stopMonitoring(e){const n=Yc(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)(ee(zi),ee(ft))},i.\u0275prov=ke({token:i,factory:i.\u0275fac,providedIn:"root"}),i})(),tne=(()=>{class i{}return i.\u0275fac=function(e){return new(e||i)},i.\u0275mod=nn({type:i}),i.\u0275inj=Kt({}),i})();const VR=new me("MAT_INPUT_VALUE_ACCESSOR"),nne=["button","checkbox","file","hidden","image","radio","range","reset","submit"];let ine=0;const rne=$U(class{constructor(i,t,e,n){this._defaultErrorStateMatcher=i,this._parentForm=t,this._parentFormGroup=e,this.ngControl=n,this.stateChanges=new Re}});let ic=(()=>{class i extends rne{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(_l.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&&oU().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,d,h){super(a,s,o,r),this._elementRef=e,this._platform=n,this._autofillMonitor=c,this._formField=h,this._uid="mat-input-"+ine++,this.focused=!1,this.stateChanges=new Re,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=>oU().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&&d.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(){nne.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)(E(mt),E(zi),E(ec,10),E(ub,8),E(Gh,8),E(jU),E(VR,10),E(ene),E(ft),E(mC,8))},i.\u0275dir=ve({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&&Ue("focus",function(){return n._focusChanged(!0)})("blur",function(){return n._focusChanged(!1)})("input",function(){return n._onInput()}),2&e&&(Yl("id",n.id)("disabled",n.disabled)("required",n.required),Dt("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),un("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:[Dn([{provide:UR,useExisting:i}]),lt,bi]}),i})(),pH=(()=>{class i{}return i.\u0275fac=function(e){return new(e||i)},i.\u0275mod=nn({type:i}),i.\u0275inj=Kt({imports:[Qn,gC,gC,tne,Qn]}),i})();function sne(i,t){if(1&i&&(W(0,"mat-label"),Ve(1),j()),2&i){const e=he(2);G(1),_i(e.resource.name)}}function one(i,t){if(1&i){const e=di();W(0,"mat-form-field",1),fe(1,sne,2,1,"mat-label",2),W(2,"input",3),Ue("ngModelChange",function(r){return an(e),zt(he().resource.data=r)})("change",function(){return an(e),zt(he().changed.emit())}),j()()}if(2&i){const e=he();U("matTooltip",e.resourceDescription),G(1),U("ngIf",e.resource.name),G(1),U("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 ane=(()=>{class i{constructor(){this.resource=null,this.resourceDescription="",this.disabled=!1,this.changed=new We}}return i.\u0275fac=function(e){return new(e||i)},i.\u0275cmp=ot({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&&fe(0,one,3,7,"mat-form-field",0),2&e&&U("ngIf",n.resource)},dependencies:[vi,gl,mu,tc,_u,gu,Kc,vl,To,ic,Os],changeDetection:0}),i})();function lne(i,t){if(1&i&&(W(0,"mat-label"),Ve(1),j()),2&i){const e=he(2);G(1),_i(e.resource.name)}}function cne(i,t){if(1&i){const e=di();W(0,"mat-form-field",1),fe(1,lne,2,1,"mat-label",2),W(2,"input",3),Ue("ngModelChange",function(r){return an(e),zt(he().resource.data=r)})("change",function(){return an(e),zt(he().changed.emit())}),j()()}if(2&i){const e=he();U("matTooltip",e.resourceDescription),G(1),U("ngIf",e.resource.name),G(1),U("disabled",e.disabled||void 0!==e.resource.schema.required_value)("maxlength",e.maxLength)("minlength",e.minLength)("ngModel",e.resource.data)}}let mH=(()=>{class i{constructor(){this._resource=null,this.resourceDescription="",this.disabled=!1,this.changed=new We,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=ot({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&&fe(0,cne,3,6,"mat-form-field",0),2&e&&U("ngIf",n.resource)},dependencies:[vi,gl,tc,NR,BR,Kc,vl,To,ic,Os],changeDetection:0}),i})();const rc=(i,t)=>i+(i.includes("__")?"/":"__")+t,Wh=function(){return[]};function dne(i,t){if(1&i&&(W(0,"mat-panel-description"),Ve(1," Click to view items ("),W(2,"b"),Ve(3),j(),Ve(4,") "),j()),2&i){const e=he(2);G(3),_i((e.resourceData||so(1,Wh)).length)}}function une(i,t){1&i&&(W(0,"mat-panel-description"),Ve(1," Empty array "),j())}function hne(i,t){}function fne(i,t){if(1&i){const e=di();W(0,"mat-expansion-panel",4),Ue("opened",function(){return an(e),zt(he().onContentsTrigger(!0))})("closed",function(){return an(e),zt(he().onContentsTrigger(!1))}),W(1,"mat-expansion-panel-header",5)(2,"mat-panel-title"),Ve(3),j(),fe(4,dne,5,2,"mat-panel-description",1),fe(5,une,2,0,"mat-panel-description",1),j(),fe(6,hne,0,0,"ng-template",6),j()}if(2&i){const e=he(),n=Zi(3);G(1),U("matTooltip",e.resourceDescription),G(2),Qi(" ",e.name," "),G(1),U("ngIf",(e.resourceData||so(5,Wh)).length>0),G(1),U("ngIf",0==(e.resourceData||so(6,Wh)).length),G(1),U("ngTemplateOutlet",n)}}function pne(i,t){}function mne(i,t){if(1&i&&(Gr(0),W(1,"h2",5),Ve(2),j(),W(3,"div",7),fe(4,pne,0,0,"ng-template",6),j(),$r()),2&i){const e=he(),n=Zi(3);G(1),U("matTooltip",e.resourceDescription),G(1),_i(e.name),G(2),U("ngTemplateOutlet",n)}}function gne(i,t){}function _ne(i,t){if(1&i&&De(0,"app-editor",10),2&i){const e=he().$implicit,n=he(3);U("resource",n.children[n.pageIndex*n.pageSize+e])("disabled",n.disabled)}}function vne(i,t){if(1&i&&(Gr(0),fe(1,_ne,1,2,"app-editor",9),$r()),2&i){const e=t.$implicit,n=he(3);G(1),U("ngIf",n.pageIndex*n.pageSize+e0)}let zR=(()=>{class i{constructor(e,n){this.main=e,this.cdr=n,this._resource=null,this.resourceDescription="",this.disabled=!1,this.changed=new We,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 Re}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:rc(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(He(this.destroyed$),gn(([n,r])=>!!this.resource&&n.startsWith(this.resource.id)&&!n.substring(this.resource.id.length+1).includes("/"))).subscribe(function(){var n=tt(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 gt(null),this.imageUrl$=new gt(null),this.destroyed$=new Re,this.changed=new We}set resource(e){this._resource$.next(e)}get resource(){return this._resource$.getValue()}ngAfterViewInit(){var e=this;return tt(function*(){e._resource$.pipe(He(e.destroyed$)).subscribe(function(){var n=tt(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)(E(Ql),E(ka))},i.\u0275cmp=ot({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&&(De(0,"app-compound-block-ui",0),Ct(1,"async"),fe(2,Ane,2,3,"img",1),Ct(3,"async")),2&e&&(U("resource",Tt(1,3,n._resource$))("fieldBlacklist",so(7,Dne)),G(2),U("ngIf",Tt(3,5,n.imageUrl$)))},dependencies:[vi,Jl,pl],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 Ine=["*"],Fne=new me("MAT_CARD_CONFIG");let gH=(()=>{class i{constructor(e){this.appearance=e?.appearance||"raised"}}return i.\u0275fac=function(e){return new(e||i)(E(Fne,8))},i.\u0275cmp=ot({type:i,selectors:[["mat-card"]],hostAttrs:[1,"mat-mdc-card","mdc-card"],hostVars:4,hostBindings:function(e,n){2&e&&un("mat-mdc-card-outlined","outlined"===n.appearance)("mdc-card--outlined","outlined"===n.appearance)},inputs:{appearance:"appearance"},exportAs:["matCard"],ngContentSelectors:Ine,decls:1,vars:0,template:function(e,n){1&e&&(sr(),Wt(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})(),_H=(()=>{class i{}return i.\u0275fac=function(e){return new(e||i)},i.\u0275mod=nn({type:i}),i.\u0275inj=Kt({imports:[Qn,Eo,Qn]}),i})();class HR{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 Re,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 GR=(()=>{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=ke({token:i,factory:i.\u0275fac,providedIn:"root"}),i})(),oie=(()=>{class i{}return i.\u0275fac=function(e){return new(e||i)},i.\u0275mod=nn({type:i}),i.\u0275inj=Kt({imports:[Qn,Eo,eb,Qn]}),i})();const MH={transformPanel:Ra("transformPanel",[Pr("void => enter-dropdown",jr("120ms cubic-bezier(0, 0, 0.2, 1)",rV([si({opacity:0,transform:"scale(1, 0.8)"}),si({opacity:1,transform:"scale(1, 1)"})]))),Pr("void => enter-dialog",jr("150ms cubic-bezier(0, 0, 0.2, 1)",rV([si({opacity:0,transform:"scale(0.7)"}),si({transform:"none",opacity:1})]))),Pr("* => void",jr("100ms linear",si({opacity:0})))]),fadeInCalendar:Ra("fadeInCalendar",[Ps("void",si({opacity:0})),Ps("enter",si({opacity:1})),Pr("void => *",jr("120ms 100ms cubic-bezier(0.55, 0, 0.55, 0.2)"))])},EH=function(i){return{active:i}};function Cie(i,t){if(1&i){const e=di();W(0,"button",2),Ue("click",function(){const s=an(e).$implicit;return zt(he().select(s))}),j()}if(2&i){const e=t.$implicit,n=he();jo("background-color",e),U("ngClass",sm(3,EH,n.selectedColor===e))}}function Sie(i,t){if(1&i){const e=di();W(0,"button",2),Ue("click",function(){const s=an(e).$implicit;return zt(he().select(s))}),j()}if(2&i){const e=t.$implicit,n=he();jo("background-color",e),U("ngClass",sm(3,EH,n.selectedColor===e))}}const Eie=["button"],Aie=/^\s+/,Die=/\s+$/,$m=Math.round,Tie=(Math,Math,Math,/[^0-9]/g),AH=["#ffffff","#ffff00","#ff00ff","#ff0000","#c0c0c0","#808080","#808000","#800080","#800000","#00ffff","#00ff00","#008080","#008000","#0000ff","#000080","#000000"];function DH(i,t,e){const n=i.getImageData(t,e,1,1).data;return{r:n[0],g:n[1],b:n[2]}}function jh(i){return 1==i.length?"0"+i:""+i}function Rie(i){return Math.round(255*parseFloat(i)).toString(16)}function TH(i){return Ko(i)/255}function Ko(i){return parseInt(i,16)}function IH(i,t,e,n){var r=[jh($m(i).toString(16)),jh($m(t).toString(16)),jh($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 vu="(?:[-\\+]?\\d*\\.\\d+%?)|(?:[-\\+]?\\d+%?)",jR="[\\s|\\(]+("+vu+")[,|\\s]+("+vu+")[,|\\s]+("+vu+")\\s*\\)?",YR="[\\s|\\(]+("+vu+")[,|\\s]+("+vu+")[,|\\s]+("+vu+")[,|\\s]+("+vu+")\\s*\\)?",Yh={CSS_UNIT:new RegExp(vu),rgb:new RegExp("rgb"+jR),rgba:new RegExp("rgba"+YR),hsl:new RegExp("hsl"+jR),hsla:new RegExp("hsla"+YR),hsv:new RegExp("hsv"+jR),hsva:new RegExp("hsva"+YR),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 qR(i){let t;return i=i.replace(Aie,"").replace(Die,"").toLowerCase(),(t=Yh.rgb.exec(i))?{r:t[1],g:t[2],b:t[3],a:1}:(t=Yh.rgba.exec(i))?{r:t[1],g:t[2],b:t[3],a:t[4]}:(t=Yh.hex8.exec(i))?{r:Ko(t[1]),g:Ko(t[2]),b:Ko(t[3]),a:TH(t[4])}:(t=Yh.hex6.exec(i))?{r:Ko(t[1]),g:Ko(t[2]),b:Ko(t[3]),a:1}:(t=Yh.hex4.exec(i))?{r:Ko(t[1]+""+t[1]),g:Ko(t[2]+""+t[2]),b:Ko(t[3]+""+t[3]),a:TH(t[4]+""+t[4])}:(t=Yh.hex3.exec(i))?{r:Ko(t[1]+""+t[1]),g:Ko(t[2]+""+t[2]),b:Ko(t[3]+""+t[3]),a:1}:null}class qh{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=IH(this.r,this.g,this.b),this.rgba=this.toRgba()}toHex(t){return IH(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 Iie(i,t,e,n,r){var s=[jh($m(i).toString(16)),jh($m(t).toString(16)),jh($m(e).toString(16)),jh(Rie(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 RH=(()=>{class i{constructor(e,n){this.zone=e,this.colorChanged=new We,this.x=0,this.y=0,this.drag=!1,this._destroyed=new Re,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){xo()},i.\u0275dir=ve({type:i,inputs:{color:"color"},outputs:{colorChanged:"colorChanged"}}),i})(),Oie=(()=>{class i extends RH{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}=DH(this.ctx,e.offsetX,e.offsetY);this.emitChange(new qh(n,r,s))}}return i.\u0275fac=function(e){return new(e||i)(E(ft))},i.\u0275cmp=ot({type:i,selectors:[["ngx-mat-color-slider"]],features:[lt],decls:1,vars:0,consts:[["id","color-strip","width","15","height","234",1,"zone-strip",3,"mousedown","mouseup"]],template:function(e,n){1&e&&(W(0,"canvas",0),Ue("mousedown",function(s){return n.onMousedown(s)})("mouseup",function(s){return n.onMouseup(s)}),j())}}),i})(),Fie=(()=>{class i{constructor(){}onInput(e){this._formatInput(e.target)}_formatInput(e){let n=Number(e.value.replace(Tie,""));n=isNaN(n)?0:n,e.value=n}}return i.\u0275fac=function(e){return new(e||i)},i.\u0275dir=ve({type:i,selectors:[["","ngxMatNumericColorInput",""]],hostBindings:function(e,n){1&e&&Ue("input",function(s){return n.onInput(s)})}}),i})(),Nie=(()=>{class i extends RH{constructor(e){super(e,"color-block"),this.zone=e,this._resetBaseColor=!0,this.formGroup=new Hm({r:new nc(null,[_l.required]),g:new nc(null,[_l.required]),b:new nc(null,[_l.required]),a:new nc(null,[_l.required]),hex:new nc(null,[_l.required,_l.pattern(Yh.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(){Mr(this.rCtrl.valueChanges,this.gCtrl.valueChanges,this.bCtrl.valueChanges,this.aCtrl.valueChanges).pipe(He(this._destroyed),ml(400)).subscribe(r=>{const s=new qh(Number(this.rCtrl.value),Number(this.gCtrl.value),Number(this.bCtrl.value),Number(this.aCtrl.value));this.emitChange(s)}),this.hexCtrl.valueChanges.pipe(He(this._destroyed),ml(400),Zl()).subscribe(r=>{const s=qR(r);if(null!=s){const o=new qh(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}=DH(this.ctx,e.offsetX,e.offsetY);this.emitChange(new qh(n,r,s))}}return i.\u0275fac=function(e){return new(e||i)(E(ft))},i.\u0275cmp=ot({type:i,selectors:[["ngx-mat-color-canvas"]],hostAttrs:[1,"ngx-mat-color-canvas"],features:[lt,bi],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&&(W(0,"form",0)(1,"div",1)(2,"div",2)(3,"canvas",3),Ue("mousedown",function(s){return n.onMousedown(s)})("mouseup",function(s){return n.onMouseup(s)}),j(),W(4,"ngx-mat-color-slider",4),Ue("colorChanged",function(s){return n.onSliderColorChanged(s)}),j()(),W(5,"div",5)(6,"mat-form-field")(7,"mat-label"),Ve(8,"R"),j(),De(9,"input",6),j(),W(10,"mat-form-field")(11,"mat-label"),Ve(12,"G"),j(),De(13,"input",7),j(),W(14,"mat-form-field")(15,"mat-label"),Ve(16,"B"),j(),De(17,"input",8),j()()(),W(18,"div",1),De(19,"button",9),W(20,"mat-form-field")(21,"mat-label"),Ve(22,"HEX6"),j(),W(23,"mat-label",10),Ve(24,"#\xa0"),j(),De(25,"input",11),j(),W(26,"mat-form-field",12)(27,"mat-label"),Ve(28,"A"),j(),De(29,"input",13),j()()()),2&e&&(U("formGroup",n.formGroup),G(19),jo("background-color",(null==n.color?null:n.color.rgba)||"transparent"))},dependencies:[ic,vl,To,Yte,MV,IR,gl,mu,tc,bR,_u,gu,Gh,fC,Oie,Fie],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})(),Bie=(()=>{class i{constructor(){this.colorChanged=new We,this.colors1=AH.slice(0,8),this.colors2=AH.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}=qR(e);this.colorChanged.emit(new qh(n,r,s,o))}}return i.\u0275fac=function(e){return new(e||i)},i.\u0275cmp=ot({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&&(W(0,"div",0),fe(1,Cie,1,5,"button",1),j(),W(2,"div",0),fe(3,Sie,1,5,"button",1),j()),2&e&&(G(1),U("ngForOf",n.colors1),G(2),U("ngForOf",n.colors2))},dependencies:[hm,So,MV],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})(),kH=(()=>{class i{constructor(){this.colorChanged=new We}ngOnInit(){}handleColorChanged(e){this.colorChanged.emit(e)}}return i.\u0275fac=function(e){return new(e||i)},i.\u0275cmp=ot({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&&(W(0,"ngx-mat-color-canvas",0),Ue("colorChanged",function(s){return n.handleColorChanged(s)}),j(),W(1,"ngx-mat-color-collection",0),Ue("colorChanged",function(s){return n.handleColorChanged(s)}),j()),2&e&&(U("color",n.color),G(1),U("color",n.color))},dependencies:[Nie,Bie],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})(),XR=(()=>{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=qR(e);return n?new qh(n.r,n.g,n.b,n.a):null}}return i.\u0275fac=function(e){return new(e||i)},i.\u0275prov=ke({token:i,factory:i.\u0275fac}),i})();const Uie={display:{colorInput:"hex"}},PH=new me("mat-color-formats"),OH=new me("ngx-mat-colorpicker-scroll-strategy"),zie={provide:OH,deps:[as],useFactory:function Vie(i){return()=>i.scrollStrategies.reposition()}},Hie=Qy(class{constructor(i){this._elementRef=i}});let FH=(()=>{class i extends Hie{constructor(e){super(e)}}return i.\u0275fac=function(e){return new(e||i)(E(mt))},i.\u0275cmp=ot({type:i,selectors:[["ngx-mat-color-picker-content"]],viewQuery:function(e,n){if(1&e&&Wn(kH,5),2&e){let r;Et(r=At())&&(n._palette=r.first)}},hostAttrs:[1,"ngx-mat-colorpicker-content"],hostVars:3,hostBindings:function(e,n){2&e&&(Iw("@transformPanel","enter"),un("ngx-mat-colorpicker-content-touch",n.picker.touchUi))},inputs:{color:"color"},exportAs:["ngxMatColorPickerContent"],features:[lt],decls:1,vars:1,consts:[[3,"color","colorChanged"]],template:function(e,n){1&e&&(W(0,"ngx-mat-color-palette",0),Ue("colorChanged",function(s){return n.picker.select(s)}),j()),2&e&&U("color",n.picker._selected)},dependencies:[kH],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:[MH.transformPanel,MH.fadeInCalendar]},changeDetection:0}),i})(),LH=(()=>{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 We,this.closedStream=new We,this._touchUi=!1,this._opened=!1,this._defaultColor="primary",this._validSelected=null,this._disabledChange=new Re,this._focusedElementBeforeOpen=null,this._inputSubscription=Zt.EMPTY,this._selectedChanged=new Re,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(FH,{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 Lh(FH,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(Oi(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"),Mr(this._popupRef.backdropClick(),this._popupRef.detachments(),this._popupRef.keydownEvents().pipe(gn(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)(E(Bm),E(as),E(ft),E(XR),E(Ia,8),E(OH),E(jt,8),E(Wr))},i.\u0275cmp=ot({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 yC{constructor(t,e){this.target=t,this.targetElement=e,this.value=this.target.value}}const Gie={provide:Do,useExisting:Gn(()=>bC),multi:!0},$ie={provide:Yr,useExisting:Gn(()=>bC),multi:!0};let bC=(()=>{class i{constructor(e,n,r,s){if(this._elementRef=e,this._formField=n,this._colorFormats=r,this._adapter=s,this.colorChange=new We,this.colorInput=new We,this._disabledChange=new We,this._valueChange=new We,this._onTouched=()=>{},this._cvaOnChange=()=>{},this._validatorOnChange=()=>{},this._pickerSubscription=Zt.EMPTY,this._validator=_l.compose([]),this._lastValueValid=!1,!this._colorFormats)throw function Pie(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 yC(this,this._elementRef.nativeElement)),this.colorChange.emit(new yC(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 yC(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 yC(this,this._elementRef.nativeElement)))}}return i.\u0275fac=function(e){return new(e||i)(E(mt),E(vl,8),E(PH,8),E(XR))},i.\u0275dir=ve({type:i,selectors:[["input","ngxMatColorPicker",""]],hostVars:3,hostBindings:function(e,n){1&e&&Ue("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&&(Yl("disabled",n.disabled),Dt("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:[Dn([Gie,$ie,{provide:VR,useExisting:i}])]}),i})(),Wie=(()=>{class i{constructor(e){this._cd=e,this._stateChanges=Zt.EMPTY}get disabled(){if(null==this._disabled&&this.picker)return this.picker.disabled}set disabled(e){this._disabled=e}ngOnInit(){}ngOnChanges(e){e.picker&&this._watchStateChanges()}ngOnDestroy(){this._stateChanges.unsubscribe()}ngAfterContentInit(){this._watchStateChanges()}open(e){this.picker&&!this.disabled&&(this.picker.open(),e.stopPropagation())}_watchStateChanges(){const e=this.picker?this.picker._disabledChange:ht(),n=this.picker&&this.picker._pickerInput?this.picker._pickerInput._disabledChange:ht(),r=this.picker?Mr(this.picker.openedStream,this.picker.closedStream):ht();this._stateChanges.unsubscribe(),this._stateChanges=Mr(e,n,r).subscribe(()=>this._cd.markForCheck())}}return i.\u0275fac=function(e){return new(e||i)(E(Zn))},i.\u0275cmp=ot({type:i,selectors:[["ngx-mat-color-toggle"]],viewQuery:function(e,n){if(1&e&&Wn(Eie,5),2&e){let r;Et(r=At())&&(n._button=r.first)}},hostAttrs:[1,"ngx-mat-color-toggle"],hostVars:7,hostBindings:function(e,n){1&e&&Ue("focus",function(){return n._button.focus()}),2&e&&(Dt("tabindex",-1),un("ngx-mat-color-toggle-active",n.picker&&n.picker.opened)("mat-accent",n.picker&&"accent"===n.picker.color)("mat-warn",n.picker&&"warn"===n.picker.color))},inputs:{picker:["for","picker"],tabIndex:"tabIndex",disabled:"disabled"},exportAs:["ngxMatColorPickerToggle"],features:[bi],decls:4,vars:5,consts:[["mat-icon-button","","type","button",3,"disabled","click"],["button",""]],template:function(e,n){1&e&&(W(0,"button",0,1),Ue("click",function(s){return n.open(s)}),W(2,"mat-icon"),Ve(3,"palette"),j()()),2&e&&(U("disabled",n.disabled),Dt("aria-haspopup",n.picker?"dialog":null)("tabindex",n.disabled?-1:n.tabIndex),G(2),jo("color",null==n.picker||null==n.picker._selected?null:n.picker._selected.rgba))},dependencies:[XM,gR],styles:[".mat-form-field-appearance .mat-form-field-prefix .ngx-mat-color-toggle-default-icon,.mat-form-field-appearance .mat-form-field-suffix .ngx-mat-color-toggle-default-icon{width:1em}.mat-form-field:not(.mat-form-field-appearance) .mat-form-field-prefix .ngx-mat-color-toggle-default-icon,.mat-form-field:not(.mat-form-field-appearance) .mat-form-field-suffix .ngx-mat-color-toggle-default-icon{display:block;width:1.5em;height:1.5em}.mat-form-field:not(.mat-form-field-appearance) .mat-form-field-prefix .mat-icon-button .ngx-mat-color-toggle-default-icon,.mat-form-field:not(.mat-form-field-appearance) .mat-form-field-suffix .mat-icon-button .ngx-mat-color-toggle-default-icon{margin:auto}\n"],encapsulation:2}),i})(),jie=(()=>{class i{}return i.\u0275fac=function(e){return new(e||i)},i.\u0275mod=nn({type:i}),i.\u0275inj=Kt({providers:[XR,zie],imports:[Eo,pH,KM,_H,oie,eH,tH,_V,Nh,ez]}),i})();const Yie=["picker"],qie=function(i){return{"background-color":i}};function Xie(i,t){if(1&i){const e=di();W(0,"div",5),Ue("click",function(r){const o=an(e).index;return zt(he().onColorClicked(r.currentTarget,o))}),j()}if(2&i){const e=t.$implicit,n=t.index,r=he();U("ngStyle",sm(2,qie,"#"+r.lpad(e.toString(16),"0",8)))("matTooltip",n+": #"+e.toString(16))}}const Kie=function(){return["colors"]};let Zie=(()=>{class i{constructor(){this.resource=null,this.changed=new We,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 yU;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=ot({type:i,selectors:[["app-palette-block-ui"]],viewQuery:function(e,n){if(1&e&&Wn(Yie,5),2&e){let r;Et(r=At())&&(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&&(De(0,"app-compound-block-ui",0),W(1,"div",1),fe(2,Xie,1,4,"div",2),j(),W(3,"input",3),Ue("colorChange",function(s){return n.onColorChange(s.value)}),j(),De(4,"ngx-mat-color-picker",null,4)),2&e){const r=Zi(5);U("resource",n.resource)("fieldBlacklist",so(4,Kie)),G(2),U("ngForOf",null==n.resourceData?null:n.resourceData.colors),G(1),U("ngxMatColorPicker",r)}},dependencies:[So,tM,ic,Os,bC,LH,Jl],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 Qie=["editor"];let Jie=(()=>{class i{constructor(e){this.cdr=e,this._resource=null,this.resourceDescription="",this.disabled=!1,this.changed=new We,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)(E(Zn))},i.\u0275cmp=ot({type:i,selectors:[["app-binary-block-ui"]],viewQuery:function(e,n){if(1&e&&Wn(Qie,5),2&e){let r;Et(r=At())&&(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&&(W(0,"h2",0),Ve(1),j(),De(2,"div",null,1)),2&e&&(U("matTooltip",n.resourceDescription),G(1),_i(null==n.resource?null:n.resource.name))},dependencies:[Os],changeDetection:0}),i})();const ere=["picker"];function tre(i,t){if(1&i&&(W(0,"mat-label",8),Ve(1),j()),2&i){const e=he();G(1),_i(null==e.resource?null:e.resource.name)}}const nre=function(i){return{transform:i}};let ire=(()=>{class i{constructor(e){this.cdr=e,this.resource=null,this.resourceDescription="",this.changed=new We,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)(E(Zn))},i.\u0275cmp=ot({type:i,selectors:[["app-angle-block-ui"]],viewQuery:function(e,n){if(1&e&&Wn(ere,5),2&e){let r;Et(r=At())&&(n.picker=r.first)}},hostBindings:function(e,n){1&e&&Ue("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&&(W(0,"div",0)(1,"div",1,2)(3,"div",3),De(4,"div",4)(5,"div",5),j()(),W(6,"div",6),fe(7,tre,2,1,"mat-label",7),W(8,"mat-label"),Ve(9),Ct(10,"number"),j(),W(11,"mat-label"),Ve(12),Ct(13,"number"),j()()()),2&e&&(U("matTooltip",n.resourceDescription),G(3),U("ngStyle",sm(11,nre,"rotate("+((null==n.resource?null:n.resource.data)||0)+"rad)")),G(4),U("ngIf",null==n.resource?null:n.resource.name),G(2),Qi("",J1(10,5,180*(null==n.resource?null:n.resource.data)/n.pi||0,"1.2-2")," deg"),G(3),Qi("",J1(13,8,(null==n.resource?null:n.resource.data)||0,"1.2-2")," rad"))},dependencies:[vi,tM,To,Os,uB],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 NH{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,d=new Set;for(const h of e)!0===Array.isArray(h)?a.add(h):"object"==typeof h?l.add(h):"function"==typeof h?d.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===d.size){h=!0;for(const p of o)if(!1===d.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 rre(i,t){if(1&i&&(W(0,"mat-list-option",3),Ve(1),j()),2&i){const e=t.$implicit,n=he();U("value",e)("selected",n.selectedValue==e),G(1),Qi(" ",e," ")}}function sre(i,t){if(1&i&&(W(0,"mat-card"),De(1,"app-editor",4),j()),2&i){const e=he();G(1),U("resource",e.resources[e.selectedValue])}}let xC=(()=>{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)(E(NH))},i.\u0275cmp=ot({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&&(W(0,"mat-selection-list",0),Ue("selectionChange",function(s){return n.selectedValue=s.source.selectedOptions.selected[0].value}),fe(1,rre,2,3,"mat-list-option",1),j(),fe(2,sre,2,1,"mat-card",2)),2&e&&(U("multiple",!1),G(1),U("ngForOf",n.keys),G(1),U("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})(),ore=(()=>{class i{constructor(){this._resource=null,this.resourceMap={},this.changed=new We}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",iR("@transformPanel",[nR()],{optional:!0}))]),transformPanel:Ra("transformPanel",[Ps("void",si({opacity:0,transform:"scale(1, 0.8)"})),Pr("void => showing",jr("120ms cubic-bezier(0, 0, 0.2, 1)",si({opacity:1,transform:"scale(1, 1)"}))),Pr("* => void",jr("100ms linear",si({opacity:0})))])};let BH=0;const UH=new me("mat-select-scroll-strategy"),vre=new me("MAT_SELECT_CONFIG"),yre={provide:UH,deps:[as],useFactory:function _re(i){return()=>i.scrollStrategies.reposition()}},bre=new me("MatSelectTrigger");class xre{constructor(t,e){this.source=t,this.value=e}}const wre=YM(JI(jM($U(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 Re}}))));let Mre=(()=>{class i extends wre{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(_l.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=ks(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,d,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=d,this._liveAnnouncer=g,this._defaultOptions=b,this._panelOpen=!1,this._compareWith=(v,y)=>v===y,this._uid="mat-select-"+BH++,this._triggerAriaLabelledBy=null,this._destroy=new Re,this._onChange=()=>{},this._onTouched=()=>{},this._valueId="mat-select-value-"+BH++,this._panelDoneAnimatingStream=new Re,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=Ey(()=>{const v=this.options;return v?v.changes.pipe(Ao(v),Rs(()=>Mr(...v.map(y=>y.onSelectionChange)))):this._ngZone.onStable.pipe(Oi(1),Rs(()=>this.optionSelectionChanges))}),this.openedChange=new We,this._openedStream=this.openedChange.pipe(gn(v=>v),et(()=>{})),this._closedStream=this.openedChange.pipe(gn(v=>!v),et(()=>{})),this.selectionChange=new We,this.valueChange=new We,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 HR(this.multiple),this.stateChanges.next(),this._panelDoneAnimatingStream.pipe(Zl(),He(this._destroy)).subscribe(()=>this._panelDoneAnimating(this.panelOpen))}ngAfterContentInit(){this._initKeyManager(),this._selectionModel.changed.pipe(He(this._destroy)).subscribe(e=>{e.added.forEach(n=>n.select()),e.removed.forEach(n=>n.deselect())}),this.options.changes.pipe(Ao(null),He(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&&!Xo(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||Xo(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(Oi(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 HZ(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=Mr(this.options.changes,this._destroy);this.optionSelectionChanges.pipe(He(e)).subscribe(n=>{this._onSelect(n.source,n.isUserInput),n.isUserInput&&!this.multiple&&this._panelOpen&&(this.close(),this.focus())}),Mr(...this.options.map(n=>n._stateChanges)).pipe(He(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)(E(LM),E(Zn),E(ft),E(jU),E(mt),E(Ia,8),E(ub,8),E(Gh,8),E(mC,8),E(ec,10),ya("tabindex"),E(UH),E(XI),E(vre,8))},i.\u0275dir=ve({type:i,viewQuery:function(e,n){if(1&e&&(Wn(are,5),Wn(lre,5),Wn(xU,5)),2&e){let r;Et(r=At())&&(n.trigger=r.first),Et(r=At())&&(n.panel=r.first),Et(r=At())&&(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:[lt,bi]}),i})(),fb=(()=>{class i extends Mre{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(He(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 PQ(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 xre(this,e)}_getOverlayWidth(){return(this._preferredOverlayOrigin instanceof zI?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=ri(i)))(n||i)}}(),i.\u0275cmp=ot({type:i,selectors:[["mat-select"]],contentQueries:function(e,n,r){if(1&e&&(Wi(r,bre,5),Wi(r,Nm,5),Wi(r,eV,5)),2&e){let s;Et(s=At())&&(n.customTrigger=s.first),Et(s=At())&&(n.options=s),Et(s=At())&&(n.optionGroups=s)}},hostAttrs:["role","combobox","aria-autocomplete","none","aria-haspopup","listbox",1,"mat-mdc-select"],hostVars:19,hostBindings:function(e,n){1&e&&Ue("keydown",function(s){return n._handleKeydown(s)})("focus",function(){return n._onFocus()})("blur",function(){return n._onBlur()}),2&e&&(Dt("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()),un("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:[Dn([{provide:UR,useExisting:i},{provide:JU,useExisting:i}]),lt],ngContentSelectors:mre,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&&(sr(pre),W(0,"div",0,1),Ue("click",function(){return n.toggle()}),W(3,"div",2),fe(4,cre,2,1,"span",3),fe(5,hre,3,2,"span",4),j(),W(6,"div",5)(7,"div",6),ki(),W(8,"svg",7),De(9,"path",8),j()()()(),fe(10,fre,3,9,"ng-template",9),Ue("backdropClick",function(){return n.close()})("attach",function(){return n._onAttached()})("detach",function(){return n.close()})),2&e){const r=Zi(1);Dt("aria-owns",n.panelOpen?n.id+"-panel":null),G(3),U("ngSwitch",n.empty),Dt("id",n._valueId),G(1),U("ngSwitchCase",!0),G(1),U("ngSwitchCase",!1),G(5),U("cdkConnectedOverlayPanelClass",n._overlayPanelClass)("cdkConnectedOverlayScrollStrategy",n._scrollStrategy)("cdkConnectedOverlayOrigin",n._preferredOverlayOrigin||r)("cdkConnectedOverlayOpen",n.panelOpen)("cdkConnectedOverlayPositions",n._positions)("cdkConnectedOverlayWidth",n._overlayWidth)}},dependencies:[hm,by,VT,aB,xU,zI],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:[gre.transformPanel]},changeDetection:0}),i})(),VH=(()=>{class i{}return i.\u0275fac=function(e){return new(e||i)},i.\u0275mod=nn({type:i}),i.\u0275inj=Kt({providers:[yre],imports:[Eo,Pm,tR,Qn,Xy,gC,tR,Qn]}),i})();function Cre(i,t){if(1&i&&(W(0,"mat-label"),Ve(1),j()),2&i){const e=he(3);G(1),_i(e.resource.name)}}function Sre(i,t){if(1&i&&(W(0,"mat-option",6),Ve(1),j()),2&i){const e=t.$implicit,n=he(3);U("value",e[1])("disabled",n.disabled),G(1),Qi(" ",e[1]," ")}}function Ere(i,t){if(1&i){const e=di();W(0,"mat-form-field",3),fe(1,Cre,2,1,"mat-label",0),W(2,"mat-select",4),Ue("valueChange",function(r){return an(e),zt(he(2).resource.data=r)})("selectionChange",function(){return an(e),zt(he(2).changed.emit())}),fe(3,Sre,2,3,"mat-option",5),j()()}if(2&i){const e=he(2);U("matTooltip",e.resourceDescription),G(1),U("ngIf",e.resource.name),G(1),U("value",e.resource.data)("disabled",e.disabled),G(1),U("ngForOf",e.resource.schema.enum_names)}}function Are(i,t){if(1&i&&(W(0,"mat-label"),Ve(1),j()),2&i){const e=he(3);G(1),_i(e.resource.name)}}function Dre(i,t){if(1&i){const e=di();W(0,"mat-form-field",3),fe(1,Are,2,1,"mat-label",0),W(2,"input",7),Ue("ngModelChange",function(r){return an(e),zt(he(2).resource.data=r)})("change",function(){return an(e),zt(he(2).changed.emit())}),j()()}if(2&i){const e=he(2);U("matTooltip",e.resourceDescription),G(1),U("ngIf",e.resource.name),G(1),U("min",0)("max",256*(e.resource.schema.length||1)-1)("ngModel",e.resource.data)}}function Tre(i,t){if(1&i&&(Gr(0),fe(1,Ere,4,5,"mat-form-field",1),fe(2,Dre,3,5,"ng-template",null,2,Vc),$r()),2&i){const e=Zi(3),n=he();G(1),U("ngIf",n.isKnownEnumValue(n.resource.data))("ngIfElse",e)}}let Ire=(()=>{class i{constructor(){this.resource=null,this.resourceDescription="",this.disabled=!1,this.changed=new We}isKnownEnumValue(e){return!!this.resource?.schema.enum_names.find(([n,r])=>r==e)}}return i.\u0275fac=function(e){return new(e||i)},i.\u0275cmp=ot({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&&fe(0,Tre,4,2,"ng-container",0),2&e&&U("ngIf",n.resource)},dependencies:[So,vi,gl,mu,tc,_u,gu,Kc,vl,To,ic,Os,fb,Nm],changeDetection:0}),i})();const Rre=["*"],Pre=["unscopedContent"];function Ore(i,t){1&i&&Wt(0,4)}function Fre(i,t){if(1&i&&(W(0,"div",11),De(1,"input",12),W(2,"div",13),ki(),W(3,"svg",14),De(4,"path",15),j(),ga(),De(5,"div",16),j()()),2&i){const e=he();un("mdc-checkbox--disabled",e.disabled),G(1),U("checked",e.selected)("disabled",e.disabled)}}function Lre(i,t){if(1&i&&(W(0,"div",17),De(1,"input",18),W(2,"div",19),De(3,"div",20)(4,"div",21),j()()),2&i){const e=he();un("mdc-radio--disabled",e.disabled),G(1),U("checked",e.selected)("disabled",e.disabled)}}function Nre(i,t){}function Bre(i,t){if(1&i&&(W(0,"span",22),fe(1,Nre,0,0,"ng-template",23),j()),2&i){he();const e=Zi(3);G(1),U("ngTemplateOutlet",e)}}function Ure(i,t){}function Vre(i,t){if(1&i&&(W(0,"span",24),fe(1,Ure,0,0,"ng-template",23),j()),2&i){he();const e=Zi(5);G(1),U("ngTemplateOutlet",e)}}function zre(i,t){}function Hre(i,t){1&i&&fe(0,zre,0,0,"ng-template",23),2&i&&(he(),U("ngTemplateOutlet",Zi(1)))}function Gre(i,t){}function $re(i,t){if(1&i&&(W(0,"span",25),fe(1,Gre,0,0,"ng-template",23),j()),2&i){he();const e=Zi(3);G(1),U("ngTemplateOutlet",e)}}function Wre(i,t){}function jre(i,t){if(1&i&&(W(0,"span",25),fe(1,Wre,0,0,"ng-template",23),j()),2&i){he();const e=Zi(5);G(1),U("ngTemplateOutlet",e)}}function Yre(i,t){}function qre(i,t){1&i&&fe(0,Yre,0,0,"ng-template",23),2&i&&(he(),U("ngTemplateOutlet",Zi(1)))}const Xre=[[["","matListItemTitle",""]],[["","matListItemLine",""]],"*",[["mat-divider"]],[["","matListItemAvatar",""],["","matListItemIcon",""]]],Kre=["[matListItemTitle]","[matListItemLine]","*","mat-divider","[matListItemAvatar],[matListItemIcon]"],zH=new me("ListOption");let Zre=(()=>{class i{constructor(e){this._elementRef=e}}return i.\u0275fac=function(e){return new(e||i)(E(mt))},i.\u0275dir=ve({type:i,selectors:[["","matListItemTitle",""]],hostAttrs:[1,"mat-mdc-list-item-title","mdc-list-item__primary-text"]}),i})(),Qre=(()=>{class i{constructor(e){this._elementRef=e}}return i.\u0275fac=function(e){return new(e||i)(E(mt))},i.\u0275dir=ve({type:i,selectors:[["","matListItemLine",""]],hostAttrs:[1,"mat-mdc-list-item-line","mdc-list-item__secondary-text"]}),i})(),HH=(()=>{class i{constructor(e){this._listOption=e}_isAlignedAtStart(){return!this._listOption||"after"===this._listOption?._getTogglePosition()}}return i.\u0275fac=function(e){return new(e||i)(E(zH,8))},i.\u0275dir=ve({type:i,hostVars:4,hostBindings:function(e,n){2&e&&un("mdc-list-item__start",n._isAlignedAtStart())("mdc-list-item__end",!n._isAlignedAtStart())}}),i})(),Jre=(()=>{class i extends HH{}return i.\u0275fac=function(){let t;return function(n){return(t||(t=ri(i)))(n||i)}}(),i.\u0275dir=ve({type:i,selectors:[["","matListItemAvatar",""]],hostAttrs:[1,"mat-mdc-list-item-avatar"],features:[lt]}),i})(),ese=(()=>{class i extends HH{}return i.\u0275fac=function(){let t;return function(n){return(t||(t=ri(i)))(n||i)}}(),i.\u0275dir=ve({type:i,selectors:[["","matListItemIcon",""]],hostAttrs:[1,"mat-mdc-list-item-icon"],features:[lt]}),i})();const tse=new me("MAT_LIST_CONFIG");let KR=(()=>{class i{constructor(){this._isNonInteractive=!0,this._disableRipple=!1,this._disabled=!1,this._defaultOptions=Ft(tse,{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=ve({type:i,hostVars:1,hostBindings:function(e,n){2&e&&Dt("aria-disabled",n.disabled)},inputs:{disableRipple:"disableRipple",disabled:"disabled"}}),i})(),GH=(()=>{class i{set lines(e){this._explicitLines=ks(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 Zt,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(Mr(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)(E(mt),E(ft),E(KR,8),E(zi),E(eR,8),E(Rr,8))},i.\u0275dir=ve({type:i,contentQueries:function(e,n,r){if(1&e&&(Wi(r,Jre,4),Wi(r,ese,4)),2&e){let s;Et(s=At())&&(n._avatars=s),Et(s=At())&&(n._icons=s)}},hostVars:4,hostBindings:function(e,n){2&e&&(Dt("aria-disabled",n.disabled)("disabled",n._isButtonElement&&n.disabled||null),un("mdc-list-item--disabled",n.disabled))},inputs:{lines:"lines",disableRipple:"disableRipple",disabled:"disabled"}}),i})();const $H=new me("SelectionList");let wC=(()=>{class i extends GH{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 We,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)(E(mt),E(ft),E($H),E(zi),E(Zn),E(eR,8),E(Rr,8))},i.\u0275cmp=ot({type:i,selectors:[["mat-list-option"]],contentQueries:function(e,n,r){if(1&e&&(Wi(r,Qre,5),Wi(r,Zre,5)),2&e){let s;Et(s=At())&&(n._lines=s),Et(s=At())&&(n._titles=s)}},viewQuery:function(e,n){if(1&e&&Wn(Pre,5),2&e){let r;Et(r=At())&&(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&&Ue("blur",function(){return n._handleBlur()})("click",function(){return n._toggleOnInteraction()}),2&e&&(Dt("aria-selected",n.selected),un("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:[Dn([{provide:GH,useExisting:i},{provide:zH,useExisting:i}]),lt],ngContentSelectors:Kre,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&&(sr(Xre),fe(0,Ore,1,0,"ng-template",null,0,Vc),fe(2,Fre,6,4,"ng-template",null,1,Vc),fe(4,Lre,5,4,"ng-template",null,2,Vc),fe(6,Bre,2,1,"span",3),fe(7,Vre,2,1,"span",4),fe(8,Hre,1,1,"ng-template",5),W(9,"span",6),Wt(10),Wt(11,1),W(12,"span",7,8),Ue("cdkObserveContent",function(){return n._updateItemLines(!0)}),Wt(14,2),j()(),fe(15,$re,2,1,"span",9),fe(16,jre,2,1,"span",9),fe(17,qre,1,1,"ng-template",5),Wt(18,3),De(19,"div",10)),2&e&&(G(6),U("ngIf",n._hasCheckboxAt("before")),G(1),U("ngIf",n._hasRadioAt("before")),G(1),U("ngIf",n._hasIconsOrAvatarsAt("before")),G(7),U("ngIf",n._hasCheckboxAt("after")),G(1),U("ngIf",n._hasRadioAt("after")),G(1),U("ngIf",n._hasIconsOrAvatarsAt("after")))},dependencies:[CU,vi,xy],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 nse={provide:Do,useExisting:Gn(()=>MC),multi:!0};class ise{constructor(t,e){this.source=t,this.options=e}}let MC=(()=>{class i extends KR{get multiple(){return this._multiple}set multiple(e){const n=Jt(e);n!==this._multiple&&(this._multiple=n,this.selectedOptions=new HR(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 Re,this._onChange=r=>{},this.selectionChange=new We,this.color="accent",this.compareWith=(r,s)=>r===s,this._multiple=!0,this._hideSingleSelectionIndicator=this._defaultOptions?.hideSingleSelectionIndicator??!1,this.selectedOptions=new HR(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 ise(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(He(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()&&Xo(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 RU(this._items).withHomeAndEnd().withTypeAhead().withWrap().skipPredicate(()=>this.disabled),this._resetActiveOption(),this._keyManager.change.subscribe(e=>this._setActiveOption(e)),this._items.changes.pipe(He(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=FM();return e&&this._element.nativeElement.contains(e)}}return i.\u0275fac=function(e){return new(e||i)(E(mt),E(ft))},i.\u0275cmp=ot({type:i,selectors:[["mat-selection-list"]],contentQueries:function(e,n,r){if(1&e&&Wi(r,wC,5),2&e){let s;Et(s=At())&&(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&&Ue("keydown",function(s){return n._handleKeydown(s)}),2&e&&Dt("aria-multiselectable",n.multiple)},inputs:{color:"color",compareWith:"compareWith",multiple:"multiple",hideSingleSelectionIndicator:"hideSingleSelectionIndicator",disabled:"disabled"},outputs:{selectionChange:"selectionChange"},exportAs:["matSelectionList"],features:[Dn([nse,{provide:KR,useExisting:i},{provide:$H,useExisting:i}]),lt,bi],ngContentSelectors:Rre,decls:1,vars:0,template:function(e,n){1&e&&(sr(),Wt(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})(),rse=(()=>{class i{}return i.\u0275fac=function(e){return new(e||i)},i.\u0275mod=nn({type:i}),i.\u0275inj=Kt({imports:[HI,Eo,Qn,eb,QU,RV]}),i})();function sse(i,t){if(1&i&&(W(0,"mat-label"),Ve(1),j()),2&i){const e=he(2);G(1),_i(e.resource.name)}}function ose(i,t){if(1&i&&(W(0,"mat-list-option",5),Ve(1),j()),2&i){const e=t.$implicit,n=he(2);U("value",e.key)("selected",n.resource.data[e.key])("disabled",n.disabled),G(1),Qi(" ",e.key," ")}}function ase(i,t){if(1&i){const e=di();Gr(0,1),fe(1,sse,2,1,"mat-label",2),W(2,"mat-selection-list",3),Ue("selectionChange",function(r){return an(e),zt(he().onSelection(r))}),fe(3,ose,2,4,"mat-list-option",4),Ct(4,"keyvalue"),j(),$r()}if(2&i){const e=he();U("matTooltip",e.resourceDescription),G(1),U("ngIf",e.resource.name),G(1),U("disabled",e.disabled),G(1),U("ngForOf",Tt(4,4,e.resource.data))}}let lse=(()=>{class i{constructor(){this.resource=null,this.resourceDescription="",this.disabled=!1,this.changed=new We}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=ot({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&&fe(0,ase,5,6,"ng-container",0),2&e&&U("ngIf",n.resource)},dependencies:[So,vi,To,Os,MC,wC,cB],styles:["[_nghost-%COMP%]{padding-bottom:1.34375em}"],changeDetection:0}),i})();class WH{get tick$(){return this._tick$.asObservable()}get children(){return[...this._children]}constructor(t){this.parent=t,this._tick$=new Re,this._children=[],t&&t.addChild(this)}addChild(t){if(t.parent!==this)throw new Error("Incorrect child clock");this._children.includes(t)||this._children.push(t)}removeChild(t){if(t.parent!==this)throw new Error("Incorrect child clock");this._children=this._children.filter(e=>e!==t)}dispose(){this.parent&&this.parent.removeChild(this);for(const t of this._children)t.dispose();this._tick$.complete()}}const dse=typeof performance>"u"?()=>Date.now():()=>performance.now();class jm extends WH{static get instance(){return jm._instance||(jm._instance=new jm),jm._instance}get elapsedTime(){return dse()}constructor(){super(null);let t=this.elapsedTime;const e=()=>{requestAnimationFrame(e);const n=t,r=this.elapsedTime;t=r,this._tick$.next([n,r-n])};requestAnimationFrame(e)}dispose(){throw new Error("Cannot dispose global clock")}}class jH extends WH{get isRunning(){return!!this.tickSub}get isPaused(){return-1!==this.pausedAt}get isStopped(){return-1===this.startedAt}get timeScale(){return this._timeScale}set timeScale(t){if(t!==this._timeScale||this.pausedByTimescale&&0!==t){if(0===t)return void(this.isPaused||(this.pause(),this.pausedByTimescale=!0));if(this.isPaused&&this.pausedByTimescale&&(this.resume(),this.pausedByTimescale=!1),!this.isStopped){const e=this.isPaused?this.pausedAt:this.parentClock.elapsedTime;this.startedAt=e-(e-this.startedAt)*this.timeScale/t}this._timeScale=t}}get elapsedTime(){return this.isStopped?this.lastStopElapsed:this.isPaused?this._timeScale*(this.pausedAt-this.startedAt):this._timeScale*(this.parentClock.elapsedTime-this.startedAt)}constructor(t=!1,e=jm.instance){super(e),this.parentClock=e,this.tickSub=null,this._internalTick$=new Re,this.tickRateLimit=0,this.paused$=new Re,this.startedAt=-1,this.oldRelativeTime=0,this.pausedAt=-1,this.lastStopElapsed=0,this._timeScale=1,this.pausedByTimescale=!1,this.lastFiredTickElapsed=0,t&&this.start(),this._internalTick$.pipe(et(([n,r])=>[r,r-this.lastFiredTickElapsed]),gn(([n])=>!this.tickRateLimit||Math.floor(this.lastFiredTickElapsed*this.tickRateLimit/1e3)this.lastFiredTickElapsed=n)).subscribe(this._tick$)}start(){this.isRunning||(this.oldRelativeTime=0,this.startedAt=this.parentClock.elapsedTime,this.startListeningTicks())}stop(){this.stopListeningTicks(),this.lastStopElapsed=this.elapsedTime,this.startedAt=this.pausedAt=-1}pause(){this.stopListeningTicks(),this.pausedAt=this.parentClock.elapsedTime,this.pausedByTimescale=!1,this.paused$.next(!0)}resume(){this.isRunning||-1==this.pausedAt||(this.startedAt+=this.parentClock.elapsedTime-this.pausedAt,this.pausedAt=-1,this.startListeningTicks(),this.paused$.next(!1))}startListeningTicks(){if(this.tickSub)throw new Error("Clock is already ticking!");this.tickSub=this.parentClock.tick$.pipe(et(([t,e])=>[this.oldRelativeTime,this.oldRelativeTime+e*this.timeScale]),Vi(([t,e])=>this.oldRelativeTime=e)).subscribe(this._internalTick$)}stopListeningTicks(){var t;null===(t=this.tickSub)||void 0===t||t.unsubscribe(),this.tickSub=null}dispose(){this.stopListeningTicks(),this._internalTick$.complete(),super.dispose()}}const use={transparent:!1,background:0,size:"fullscreen",antialias:!0};class hse{constructor(t,e,n={}){this.scene=t,this.canvas=e,this.entity=null,this.rendererOptions=Object.assign(Object.assign({},use),n||{})}}class pb{static fromArray(t,e=!1){const n=new pb(t[0]);let r=n;for(let s=1;sn.map(r=>new pb(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]}constructor(t){this.data=t,this.adjacent=new Set}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(d=>!e.has(d));for(const d of c)e.add(d),r.push([d,a-1])}}return n}nodes(){return Array.from(this.walkRead(-1))}}var sc=(()=>{return(i=sc||(sc={}))[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",sc;var i})();let Xh=(()=>{class i{constructor(){this.tick$=new Re,this._world=null,this._name="e0x"+(i.default_name_counter++).toString(16),this._selfActive=!0,this.parent=null,this._children=[],this._components=[],this._onSpawned$=new Re,this._onRemoved$=new Re}get world(){return this._world}get name(){return this._name}set name(e){this._name=e}get active(){return this._selfActive&&(!this.parent||this.parent.active)}set active(e){this._selfActive=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 fse extends Xh{constructor(t){super(),this.tickOrder=t}}function Ym(i,t=sc.CONTROLLERS,e){const n=new fse(t);return e&&(n.name=e),i.addEntity(n),n.tick$.pipe(su(()=>{i.removeEntity(n,!0)}))}class ZR extends Xh{get rendererSize$(){return this._rendererSize$.asObservable()}get rendererSize(){return this._rendererSize$.getValue()}get rendererOptions(){return this.renderer.rendererOptions}get physicsDebugViewActive(){return this.renderer.physicsDebugViewActive}set physicsDebugViewActive(t){this.renderer.physicsDebugViewActive=t}constructor(t){super(),this.renderer=t,this.tickOrder=sc.RENDERING,this._rendererSize$=new gt(null),this.addComponents(t),this.tick$.subscribe(()=>{this.renderer.render()})}onSpawned(t){this._rendererSize$.next(null),"fullscreen"==this.rendererOptions.size||"function"==typeof this.rendererOptions.size?(this.renderer.canvas&&(this.renderer.canvas.style.position="absolute"),Mr(Ta(window,"resize").pipe(PM(100)),Ta(window,"orientationchange")).pipe(He(this._onRemoved$),et(()=>({x:window.innerWidth,y:window.innerHeight})),Ao({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 In||void 0!==this.rendererOptions.size.subscribe&&void 0!==this.rendererOptions.size.pipe?this.rendererOptions.size.pipe(He(this._onRemoved$)).subscribe(e=>{this._rendererSize$.next(e)}):this._rendererSize$.next(this.rendererOptions.size),this._rendererSize$.pipe(He(this._onRemoved$),Zl((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 QR=i=>{i.updateVisibility?i.updateVisibility():YH(i)},YH=i=>{for(const t of i.children)QR(t)};class pse extends Xh{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(){YH(this)}addChildren(...t){super.addChildren(...t);for(const e of t)QR(e)}removeChildren(t,e=!1){if(super.removeChildren(t,e),!e)for(const n of t)QR(n)}}class JR{constructor(){this._running=!1,this.stop$=new Re}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 mse extends JR{get output$(){return this._output$.asObservable()}constructor(t,e){super(),this.keyboard=t,this.keymap=e,this._output$=new Re}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")),nu(t.map(e=>this.keyboard.bindMany(...e))).pipe(He(this.stop$),et(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 ek=new In(ms);class CC extends JR{constructor(){super(),this.bindings={},this.skipKeyDownsOnExternalFocus=!0,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 gt(!1);return this.bindings[t].push(e),e.pipe(Zl(),su(()=>{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"),ek;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 gt(!1);this.bindings[n].push(r),e.push(r)}return nu(e).pipe(su(()=>{for(let n=0;nn.includes(!0)),Zl())}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 CC.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)}}CC.externalFocusBlacklist=[HTMLInputElement,HTMLTextAreaElement,HTMLSelectElement,HTMLButtonElement];class qr{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 qr.len(qr.sub(t,e))}static norm(t){const e=qr.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 _se={pointerLock:!1};var Fs=(()=>{return(i=Fs||(Fs={}))[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",Fs;var i})();class qm extends JR{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$=Ta(this._element,"wheel",{passive:!1}).pipe(He(this.stopped$),su(()=>this._wheel$=null),Vi(t=>t.preventDefault()),et(t=>t.deltaY),Uf())),this._wheel$}get isPointerLocked(){return!!document.pointerLockElement}get isPointerLocked$(){return Ta(document,"pointerlockchange").pipe(et(()=>this.isPointerLocked))}get state(){return this._state$.getValue()}get state$(){return this._state$.asObservable()}get multiTouchPositions$(){return this._multiTouchPositions$.asObservable()}get twoTouchGestureDelta$(){return this.state$.pipe(Rs(t=>t==Fs.DRAG_TOUCH_TWO_FINGERS?this.multiTouchPositions$:ek),et(t=>t.map(e=>({x:e.x,y:e.y}))),function gse(){return ti((i,t)=>{let e,n=!1;i.subscribe(Yn(t,r=>{const s=e;e=r,n&&t.next([s,r]),n=!0}))})}(),gn(([t,e])=>t.length>1&&e.length>1),et(([t,e])=>({centerPointDelta:qr.sub(qr.scalarMult(e.reduce((n,r)=>qr.add(n,r),qr.O),1/e.length),qr.scalarMult(t.reduce((n,r)=>qr.add(n,r),qr.O),1/e.length)),angleDelta:qr.angle(e[1],e[0])-qr.angle(t[1],t[0]),distanceDelta:qr.dist(e[1],e[0])-qr.dist(t[1],t[0])})))}get _element(){return this.options.canvas||window}constructor(t={}){super(),this._wheel$=null,this._delta$=new Re,this._position$=new gt(qr.O),this._multiTouchPositions$=new gt([]),this.stopped$=new Re,this._state$=new gt(Fs.NONE),this.options=Object.assign(Object.assign({},_se),t),this.canvasClickListener=this.canvasClickListener.bind(this)}startInternal(){this.options.canvas&&(this.options.canvas.style.touchAction="none"),this._state$.next(Fs.NONE);const t=[Fs.DRAG,Fs.DRAG_MIDDLE_BUTTON,Fs.DRAG_RIGHT_BUTTON],e=[Fs.NONE,Fs.DRAG,Fs.DRAG_TOUCH_TWO_FINGERS],n=[],r={};Ta(this._element,"mousemove").pipe(He(this.stopped$)).subscribe(o=>{this._delta$.next({x:o.movementX,y:o.movementY})}),Ta(this._element,"pointermove").pipe(He(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})}),!qm.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{if(0===n.length)try{this.options.canvas&&this.options.canvas.setPointerCapture(o.pointerId),window.addEventListener("pointerup",s),this._element.addEventListener("pointercancel",s)}catch(a){console.error(a)}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]||Fs.NONE)}),Ta(this._element,"contextmenu").pipe(He(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 vse{static lookAt(t,e,n){let r=Pe.sub(t,e);r=0===Pe.lenSq(r)?Object.assign(Object.assign({},r),{z:1}):Pe.norm(r);let s=Pe.cross(n,r);0===Pe.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=Pe.norm(r),s=Pe.cross(n,r)),s=Pe.norm(s);let o=Pe.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 Yi{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,d=t.w*Math.sin((1-n)*s)/o+e.w*Math.sin(n*s)/o;return isNaN(a)||isNaN(l)||isNaN(c)||isNaN(d)?Yi.clone(t):{x:a,y:l,z:c,w:d}}static fromAngle(t,e){const n=e/2,r=Math.sin(n);return Object.assign(Object.assign({},Pe.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],d=t[10],h=e+o+d;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>d){const p=2*Math.sqrt(1+e-o-d);return{x:.25*p,y:(n+s)/p,z:(r+l)/p,w:(c-a)/p}}if(o>d){const p=2*Math.sqrt(1+o-e-d);return{x:(n+s)/p,y:.25*p,z:(a+c)/p,w:(r-l)/p}}{const p=2*Math.sqrt(1+d-e-o);return{x:(r+l)/p,y:(a+c)/p,z:.25*p,w:(s-n)/p}}}static fromMatrix3(t){const e=t[0][0]+t[1][1]+t[2][2];let n,r,s,o;if(e>0){const a=.5/Math.sqrt(e+1);n=.25/a,r=(t[2][1]-t[1][2])*a,s=(t[0][2]-t[2][0])*a,o=(t[1][0]-t[0][1])*a}else if(t[0][0]>t[1][1]&&t[0][0]>t[2][2]){const a=2*Math.sqrt(1+t[0][0]-t[1][1]-t[2][2]);n=(t[2][1]-t[1][2])/a,r=.25*a,s=(t[0][1]+t[1][0])/a,o=(t[0][2]+t[2][0])/a}else if(t[1][1]>t[2][2]){const a=2*Math.sqrt(1+t[1][1]-t[0][0]-t[2][2]);n=(t[0][2]-t[2][0])/a,r=(t[0][1]+t[1][0])/a,s=.25*a,o=(t[1][2]+t[2][1])/a}else{const a=2*Math.sqrt(1+t[2][2]-t[0][0]-t[1][1]);n=(t[1][0]-t[0][1])/a,r=(t[0][2]+t[2][0])/a,s=(t[1][2]+t[2][1])/a,o=.25*a}return{w:n,x:r,y:s,z:o}}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),d=Math.sin(.5*e);return{w:c*a*s+d*l*o,x:d*a*s-c*l*o,y:c*l*s+d*a*o,z:c*a*o-d*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=Pe.Z){return this.fromMatrix4(vse.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 Pe{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 Pe.len(Pe.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=Pe.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,Yi.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)}}}function tk(i,t,e,n){return r=>r.pipe(tI((s,o)=>{var a;return{targetValue:o,currentValue:null!==(a=s.currentValue)&&void 0!==a?a:o,hasReachedTarget:!1}},{targetValue:null,currentValue:null,hasReachedTarget:!1}),Rs(s=>i.pipe(et(([o,a])=>{if(null===s.targetValue||null===s.currentValue)return s.currentValue;if(s.hasReachedTarget)return;const l=1-Math.exp(-a/t),c=e(s.currentValue,s.targetValue,l);return s.currentValue=c,n(c,s.targetValue)?(s.hasReachedTarget=!0,s.targetValue):c}))),et(s=>void 0!==s?s:null),gn(s=>null!==s))}ps(738);class xse extends Xh{get avgReport(){return this._avgReport}get peakReport(){return this._peakReport}constructor(t=60,e=15){super(),this.maxSamples=t,this.maxRows=e,this.tickOrder=Number.MAX_SAFE_INTEGER,this.sampleIndex=0,this.collectedData=new Map,this._avgReport={totalTime:0,entries:[]},this._peakReport={totalTime:0,entries:[]}}onSpawned(t){super.onSpawned(t),this.sampleIndex=0;const e=()=>(typeof performance>"u"?Date:performance).now();this.world.tickForwardTo$.pipe(He(this.onRemoved$)).subscribe(n=>{n!==this&&(this.collectedData.has(n)?this.collectedData.get(n).push([this.sampleIndex,e(),0]):this.collectedData.set(n,[[this.sampleIndex,e(),0]]))}),this.world.tickForwardedTo$.pipe(He(this.onRemoved$)).subscribe(n=>{if(n===this)return;const r=this.collectedData.get(n);r[r.length-1][2]=e()}),this.tick$.pipe(He(this.onRemoved$)).subscribe(()=>{this.sampleIndex++;const n=Array.from(this.collectedData.entries());for(const[h,p]of n){for(;p.length>0&&p[0][0]h instanceof Xh?""===h.name?h.constructor.name:h.name:"PHYSICS_WORLD"===h?"Physics simulation":h,s=h=>{let p=0,m=0;for(;mh.length-m+1){m--;break}p+=h[h.length-m-1][1]}return m>1&&(h=h.slice(0,h.length-m)).push([`Rest (${m})`,p]),h};let o=0,a=Array.from(this.collectedData.entries()).map(([h,p])=>{const m=p.reduce((g,[b,v,y])=>g+y-v,0)/this.maxSamples;return o+=m,[r(h),m]}).sort((h,p)=>p[1]-h[1]);a=s(a),this._avgReport={totalTime:o,entries:a};let l=new Map,c=Array.from(this.collectedData.entries()).map(([h,p])=>{let m=0;for(const[g,b,v]of p){const y=v-b;m=Math.max(m,y),l.set(g,y+(l.get(g)||0))}return[r(h),m]}).sort((h,p)=>p[1]-h[1]);c=s(c);let d=Array.from(l.values()).reduce((h,p)=>Math.max(h,p),0);this._peakReport={totalTime:d,entries:c}})}onRemoved(){super.onRemoved(),this.collectedData=new Map,this._avgReport={totalTime:0,entries:[]},this._peakReport={totalTime:0,entries:[]}}}var Xm=function(i,t,e,n){return new(e||(e=Promise))(function(s,o){function a(d){try{c(n.next(d))}catch(h){o(h)}}function l(d){try{c(n.throw(d))}catch(h){o(h)}}function c(d){d.done?s(d.value):function r(s){return s instanceof e?s:new e(function(o){o(s)})}(d.value).then(a,l)}c((n=n.apply(i,t||[])).next())})};class yl{static get documentWorlds(){return[...yl._documentWorlds]}constructor(t,e){this.visualScene=t,this.physicsWorld=e,this.worldClock=new jH(!1),this.keyboardInput=new CC,this.name="w0x"+(yl.default_name_counter++).toString(16),this.children=[],this.tickListeners=[],this.tickStarted$=new Re,this.tickForwardTo$=new Re,this.tickForwardedTo$=new Re,this.paused$=new Re,this.disposed$=new Re,this.keyboardInput.start(),window.ggstatic?this.registerConsoleCommands(window.ggstatic):(this.onGgStaticInitialized=this.onGgStaticInitialized.bind(this),window.addEventListener("ggstatic_added",this.onGgStaticInitialized)),this.worldClock.paused$.subscribe(this.paused$),yl._documentWorlds.push(this),yl.worldCreated$.next(this)}init(){return Xm(this,void 0,void 0,function*(){yield Promise.all([this.physicsWorld.init(),this.visualScene.init()]);const t=(e,n,r)=>{e.active&&(this.tickForwardTo$.next(e),e.tick$.next([n,r]),this.tickForwardedTo$.next(e))};this.worldClock.tick$.subscribe(([e,n])=>{this.tickStarted$.next();let r=0;for(;r=sc.PHYSICS_SIMULATION);r++)t(this.tickListeners[r],e,n);for(this.tickForwardTo$.next("PHYSICS_WORLD"),this.physicsWorld.simulate(n),this.tickForwardedTo$.next("PHYSICS_WORLD");re.tickOrder-n.tickOrder),t.onSpawned(this))}removeEntity(t,e=!1){if(t.world){if(t.world!==this)throw new Error("Entity is not a part of this world");this.children.splice(this.children.findIndex(n=>n===t),1),this.tickListeners.splice(this.tickListeners.findIndex(n=>n===t),1),t.onRemoved()}e&&t.dispose()}onGgStaticInitialized(){window.removeEventListener("ggstatic_added",this.onGgStaticInitialized),this.registerConsoleCommands(window.ggstatic)}registerConsoleCommands(t){t.registerConsoleCommand(this,"timescale",(...e)=>Xm(this,void 0,void 0,function*(){return isNaN(+e[0])||(this.worldClock.timeScale=+e[0]),this.worldClock.timeScale.toString()}),"args: [ float? ]; Get current time scale of selected world clock or set it. Default value is 1.0 (no time scale applied)"),t.registerConsoleCommand(this,"fps_limit",(...e)=>Xm(this,void 0,void 0,function*(){return isNaN(+e[0])||(this.worldClock.tickRateLimit=+e[0]),this.worldClock.tickRateLimit.toString()}),"args: [ int? ]; Get current tick rate limit of selected world clock or set it. 0 means no limit applied"),t.registerConsoleCommand(this,"renderers",()=>Xm(this,void 0,void 0,function*(){return this.children.filter(e=>e instanceof ZR).map(e=>e.name).join("\n")}),"no args; Print all renderers in selected world"),t.registerConsoleCommand(this,"debug_view",(...e)=>Xm(this,void 0,void 0,function*(){let r,n="toggle";for(let o of e)["1","0"].includes(o)?n="1"===o:r=o;let s=this.children.find(o=>o instanceof ZR&&(!r||o.name===r));if(s)return s.physicsDebugViewActive="toggle"===n?!s.physicsDebugViewActive:n,s.physicsDebugViewActive?"1":"0";throw r?new Error(`Renderer with name "${r}" not found`):new Error("No renderer found")}),'args: [ 0|1?, string? ]; Turn on/off physics debug view, skip first argument to toggle value. Second argument expects renderer name, if not provided first renderer will be picked. Use "renderers" to get list of renderers in the world'),t.registerConsoleCommand(this,"performance",(...e)=>Xm(this,void 0,void 0,function*(){let n="avg",r=20;for(let d of e)["avg","peak"].includes(d)?n=d:isNaN(+d)||(r=+d);const s=new xse(r,250);this.addEntity(s),yield function yse(i,t){const e="object"==typeof t;return new Promise((n,r)=>{let o,s=!1;i.subscribe({next:a=>{o=a,s=!0},error:r,complete:()=>{s?n(o):e?n(t.defaultValue):r(new fm)}})})}(this.worldClock.tick$.pipe(Oi(r)));const o="avg"===n?s.avgReport:s.peakReport;this.removeEntity(s);const a=o.entries.map(([d,h])=>`${d}:`+new Array(Math.max(0,26-d.length)).join(" ")+`${h.toFixed(2)} ms`+("avg"===n?` (${(100*h/o.totalTime).toFixed(2)}%)`:""));let l="lightgreen";o.totalTime>12&&(l=o.totalTime<16?"yellow":"red");const c=("avg"===n?"Average":"Peak")+" Frame time";return a.unshift(c+":"+new Array(Math.max(0,26-c.length)).join(" ")+`${o.totalTime.toFixed(2)} ms`),a.unshift(`Performance report (${r} samples)`),a.join("\n")}),'args: [ int?, avg|peak? ]; Measure how much time was spent per entity in world. Arguments are samples amount (20 by default) and "peak" or "avg" choice, both arguments are optional. "avg" report sorts entities by average time consumed, "peak" records highest value for each entity')}}yl.default_name_counter=0,yl._documentWorlds=[],yl.worldCreated$=new Re;class Sse extends hse{}class XH extends pse{constructor(){super(...arguments),this._world=null}get world(){return this._world}}class Zo extends XH{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}constructor(t){super(),this.tickOrder=sc.OBJECTS_BINDING,this._position=Pe.O,this._rotation=Yi.O,this.object3D=null,this.objectBody=null,t.objectBody&&(this.objectBody=t.objectBody,this.name=this.objectBody.name,this.addComponents(this.objectBody)),t.object3D&&(this.object3D=t.object3D,t.objectBody||(this._position=this.object3D.position,this._rotation=this.object3D.rotation,this.name=this.object3D.name),this.addComponents(this.object3D)),this.objectBody&&(this.tick$.subscribe(()=>{this.runTransformBinding(this.objectBody,this.object3D)}),this.runTransformBinding(this.objectBody,this.object3D))}}class Km extends pb{static fromMapArray(t,e=!1){const n=new Km(t[0]);let r=n;for(let s=1;sn.map(r=>new Km(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));othis.mapGraph.getNearestDummy(this.mapGraphNodes,this.loaderCursor$.getValue())),Zl(),Vi(r=>this._nearestDummy$.next(r))).subscribe(r=>{let o,s=new Set;if(this.options.inertia>0){o=new Set;const a=r.walkReadPreserveDepth(this.options.loadDepth+this.options.inertia);for(let l=0;lo.add(c.data)),l<=this.options.loadDepth&&a[l].forEach(c=>s.add(c.data))}else r.walkRead(this.options.loadDepth).forEach(a=>s.add(a.data)),o=s;for(const a of this.loaded.keys())o.has(a)?s.delete(a):n.includes(a)||n.push(a);for(let a of Array.from(s.keys()))e.includes(a)||e.push(a)}),this.tick$.pipe(Ao(null),He(this._onRemoved$)).subscribe(()=>{if(n.length){for(const r of n)this.disposeChunk(r);n=[]}if(e.length)if(this._initialLoadComplete$.value&&e.length>this.options.maxNodesLoadingPerTick){let r=e.slice(0,this.options.maxNodesLoadingPerTick);e=e.slice(this.options.maxNodesLoadingPerTick),Promise.all(r.map(s=>this.loadChunk(s))).then()}else Promise.all(e.map(r=>this.loadChunk(r))).then(()=>{this._initialLoadComplete$.value||this._initialLoadComplete$.next(!0)}),e=[]})}onRemoved(){super.onRemoved(),this.loadClock&&(this.loadClock.stop(),this.loadClock=null),this.loaderCursor$.next(Pe.O)}loadChunk(t){return function(i,t,e,n){return new(e||(e=Promise))(function(s,o){function a(d){try{c(n.next(d))}catch(h){o(h)}}function l(d){try{c(n.throw(d))}catch(h){o(h)}}function c(d){d.done?s(d.value):function r(s){return s instanceof e?s:new e(function(o){o(s)})}(d.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||Yi.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||Yi.O}]),[n,e]})}disposeChunk(t){this.loaded.has(t)&&(this.removeChildren(this.loaded.get(t),!0),this.loaded.delete(t))}}class Dse extends ZR{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 e4=function(i,t,e,n){return new(e||(e=Promise))(function(s,o){function a(d){try{c(n.next(d))}catch(h){o(h)}}function l(d){try{c(n.throw(d))}catch(h){o(h)}}function c(d){d.done?s(d.value):function r(s){return s instanceof e?s:new e(function(o){o(s)})}(d.value).then(a,l)}c((n=n.apply(i,t||[])).next())})};const t4={keymap:"wasd",cameraLinearSpeed:20,cameraMovementElasticity:0,cameraBoostMultiplier:2.5,cameraRotationSensitivity:1,cameraRotationElasticity:0,mouseOptions:{},ignoreMouseUnlessPointerLocked:!1,ignoreKeyboardUnlessPointerLocked:!1};class n4 extends Xh{get active(){return super.active}set active(t){!super.active&&t&&this.reset(),super.active=t}get spherical(){return this._spherical}set spherical(t){this._spherical.phi=Math.max(1e-6,Math.min(Math.PI-1e-6,t.phi)),this._spherical.theta=t.theta,this.resetMotion$.next()}constructor(t,e,n={}){super(),this.keyboard=t,this.camera=e,this.tickOrder=sc.INPUT_CONTROLLERS,this._spherical={phi:0,radius:1,theta:0},this.resetMotion$=new Re,this.options=Object.assign(Object.assign({},t4),n),n.mouseOptions&&(this.options.mouseOptions=Object.assign(Object.assign({},t4.mouseOptions),n.mouseOptions)),this.mouseInput=new qm(this.options.mouseOptions),this.directionsInput=new mse(t,this.options.keymap)}reset(){this._spherical=Pe.toSpherical(Pe.rot({x:0,y:0,z:-1},this.camera.rotation)),this.resetMotion$.next()}onSpawned(t){const e=Object.create(null,{onSpawned:{get:()=>super.onSpawned}});return e4(this,void 0,void 0,function*(){yield e.onSpawned.call(this,t),this._spherical=Pe.toSpherical(Pe.rot({x:0,y:0,z:-1},this.camera.rotation));const n=["KeyE","KeyQ"];this.camera.camera.supportsFov&&n.push("KeyZ","KeyC"),n.push("ShiftLeft");let r=nu([this.directionsInput.output$,...n.map(c=>this.keyboard.bind(c))]).pipe(He(this._onRemoved$),et(([c,...d])=>{let h={direction:{},rest:[]};(!this.options.ignoreKeyboardUnlessPointerLocked||this.mouseInput.isPointerLocked)&&(h={direction:c,rest:d});let p=Object.assign({},Pe.O);const[m,g,b,v,y]=h.rest;void 0!==h.direction.upDown&&(p.z=h.direction.upDown?-1:1),void 0!==h.direction.leftRight&&(p.x=h.direction.leftRight?-1:1),m!=g&&(p.y=g?-1:1);let M=0;return b!=v&&(M=b?1:-1),p=Pe.norm(p),y&&(p=Pe.scalarMult(p,this.options.cameraBoostMultiplier)),[p,M]}));this.options.cameraMovementElasticity>0&&(r=r.pipe(tk(this.camera.tick$,this.options.cameraMovementElasticity,([c,d],[h,p],m)=>[Pe.lerp(c,h,m),p],([c,d],[h,p])=>d==p&&Pe.dist(c,h)<.001)));let s=Pe.O,o=0;r.subscribe(([c,d])=>{s=c,o=d});let a=qm.isTouchDevice(),l=this.mouseInput.delta$.pipe(He(this._onRemoved$),gn(()=>this.active&&(a||!this.options.ignoreMouseUnlessPointerLocked||this.mouseInput.isPointerLocked)));if(this.options.cameraRotationElasticity>0){const c=new gt(this._spherical);l.subscribe(h=>{const p=c.getValue();c.next({phi:Math.max(1e-6,Math.min(Math.PI-1e-6,p.phi+h.y*this.options.cameraRotationSensitivity/1e3)),theta:p.theta-h.x*this.options.cameraRotationSensitivity/1e3,radius:1})});const d=()=>{c.pipe(He(this._onRemoved$),tk(this.tick$,this.options.cameraRotationElasticity,(h,p,m)=>({phi:h.phi+m*(p.phi-h.phi),theta:h.theta+m*(p.theta-h.theta),radius:1}),(h,p)=>qr.dist({x:h.phi,y:h.theta},{x:p.phi,y:p.theta})<1e-4),He(this.resetMotion$)).subscribe(h=>{this._spherical.theta=h.theta,this._spherical.phi=h.phi})};this.resetMotion$.pipe(He(this._onRemoved$)).subscribe(()=>{c.next(this._spherical),d()}),d()}else l.subscribe(c=>{this._spherical.theta-=c.x*this.options.cameraRotationSensitivity/1e3,this._spherical.phi+=c.y*this.options.cameraRotationSensitivity/1e3,this._spherical.phi=Math.max(1e-6,Math.min(Math.PI-1e-6,this._spherical.phi))});this.camera.tick$.pipe(He(this._onRemoved$),gn(()=>this.active)).subscribe(([c,d])=>{this.camera.camera.fov+=o,this.camera.position=Pe.add(this.camera.position,Pe.rot(Pe.scalarMult(s,this.options.cameraLinearSpeed*d/1e3),this.camera.rotation)),this.camera.rotation=Yi.lookAt(this.camera.position,Pe.add(this.camera.position,Pe.fromSpherical(this._spherical)))}),this.mouseInput.start(),this.directionsInput.start()})}onRemoved(){const t=Object.create(null,{onRemoved:{get:()=>super.onRemoved}});return e4(this,void 0,void 0,function*(){yield t.onRemoved.call(this),yield this.mouseInput.stop(!0),yield this.directionsInput.stop()})}}var i4=function(i,t,e,n){return new(e||(e=Promise))(function(s,o){function a(d){try{c(n.next(d))}catch(h){o(h)}}function l(d){try{c(n.throw(d))}catch(h){o(h)}}function c(d){d.done?s(d.value):function r(s){return s instanceof e?s:new e(function(o){o(s)})}(d.value).then(a,l)}c((n=n.apply(i,t||[])).next())})};const Ise={mouseOptions:{},orbiting:{sensitivityX:1,sensitivityY:1},orbitingElasticity:0,zooming:{sensitivity:1},panning:{sensitivityX:1,sensitivityY:1},dollying:{sensitivity:1}};class Rse extends Xh{get active(){return super.active}set active(t){!super.active&&t&&this.reset(),super.active=t}get spherical(){return this._spherical}set spherical(t){this._spherical.phi=Math.max(1e-6,Math.min(Math.PI-1e-6,t.phi)),this._spherical.theta=t.theta,this._spherical.radius=t.radius,this.resetMotion$.next()}constructor(t,e={}){super(),this.camera=t,this.tickOrder=sc.INPUT_CONTROLLERS,this._spherical={phi:0,radius:10,theta:0},this.target=Pe.O,this.resetMotion$=new Re,this.options=Object.assign(Object.assign({},Ise),e),this.mouseInput=new qm(this.options.mouseOptions)}reset(){let t=Pe.dist(this.target,this.camera.position);this.target=Pe.add(this.camera.position,Pe.rot({x:0,y:0,z:-t},this.camera.rotation)),this._spherical=Pe.toSpherical(Pe.sub(this.camera.position,this.target)),this.resetMotion$.next()}onSpawned(t){const e=Object.create(null,{onSpawned:{get:()=>super.onSpawned}});return i4(this,void 0,void 0,function*(){if(yield e.onSpawned.call(this,t),this._spherical=Pe.toSpherical(Pe.sub(this.camera.position,this.target)),this.options.orbiting){let r=this.mouseInput.delta$.pipe(He(this._onRemoved$),gn(()=>this.active&&this.mouseInput.state==Fs.DRAG));if(this.options.orbitingElasticity>0){const s=new gt(this._spherical);r.subscribe(a=>{const l=s.getValue();s.next({phi:Math.max(1e-6,Math.min(Math.PI-1e-6,l.phi-a.y*this.options.orbiting.sensitivityY/1e3)),theta:l.theta-a.x*this.options.orbiting.sensitivityX/1e3,radius:1})});const o=()=>{s.pipe(He(this._onRemoved$),tk(this.tick$,this.options.orbitingElasticity,(a,l,c)=>({phi:a.phi+c*(l.phi-a.phi),theta:a.theta+c*(l.theta-a.theta),radius:1}),(a,l)=>qr.dist({x:a.phi,y:a.theta},{x:l.phi,y:l.theta})<1e-4),He(this.resetMotion$)).subscribe(a=>{this._spherical.theta=a.theta,this._spherical.phi=a.phi})};this.resetMotion$.pipe(He(this._onRemoved$)).subscribe(()=>{s.next(this._spherical),o()}),o()}else r.subscribe(s=>{this._spherical.theta-=s.x*this.options.orbiting.sensitivityX/1e3,this._spherical.phi-=s.y*this.options.orbiting.sensitivityY/1e3,this._spherical.phi=Math.max(1e-6,Math.min(Math.PI-1e-6,this._spherical.phi))})}this.options.zooming&&this.mouseInput.wheel$.pipe(He(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=Pe.fromSpherical(this._spherical),o=Pe.rotAround(s,{x:-Math.sin(this._spherical.theta),y:Math.cos(this._spherical.theta),z:0},Math.PI/2),a=Pe.rotAround(s,Pe.norm(o),Math.PI/2);this.target=Pe.add(this.target,Pe.add(Pe.scalarMult(o,-this.options.panning.sensitivityY*r.y/1e3),Pe.scalarMult(a,this.options.panning.sensitivityX*r.x/1e3)))};this.options.panning&&this.mouseInput.delta$.pipe(He(this._onRemoved$),gn(()=>this.mouseInput.state==Fs.DRAG_RIGHT_BUTTON)).subscribe(r=>{n(r)}),this.options.dollying&&this.mouseInput.delta$.pipe(He(this._onRemoved$),gn(()=>this.mouseInput.state==Fs.DRAG_MIDDLE_BUTTON)).subscribe(r=>{this._spherical.radius*=Math.pow(.95,-this.options.dollying.sensitivity*r.y/10)}),qm.isTouchDevice()&&(this.options.dollying||this.options.panning)&&this.mouseInput.twoTouchGestureDelta$.pipe(He(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(He(this._onRemoved$),gn(()=>this.active),et(()=>this._spherical)).subscribe(r=>{this.camera.position=Pe.add(this.target,Pe.fromSpherical(r)),this.camera.rotation=Yi.lookAt(this.camera.position,this.target)}),yield this.mouseInput.start()})}onRemoved(){const t=Object.create(null,{onRemoved:{get:()=>super.onRemoved}});return i4(this,void 0,void 0,function*(){yield t.onRemoved.call(this),yield this.mouseInput.stop(!0)})}}class Pse{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 rk=function(i,t,e,n){return new(e||(e=Promise))(function(s,o){function a(d){try{c(n.next(d))}catch(h){o(h)}}function l(d){try{c(n.throw(d))}catch(h){o(h)}}function c(d){d.done?s(d.value):function r(s){return s instanceof e?s:new e(function(o){o(s)})}(d.value).then(a,l)}c((n=n.apply(i,t||[])).next())})},yu=(()=>{return(i=yu||(yu={}))[i.Nothing=0]="Nothing",i[i.Files=1]="Files",i[i.Entities=2]="Entities",yu;var i})();const r4={cachingStrategy:yu.Nothing,position:Pe.O,rotation:Yi.O,loadProps:!0},s4=i=>({meta:i.meta,resources:i.resources.map(({object3D:t,body:e})=>({object3D:t&&t.clone(),body:e&&e.clone()}))});class Ose{constructor(t){this.world=t,this.filesCache=new Map,this.loadResultCache=new Map}loadGgGlbFiles(t){return rk(this,arguments,void 0,function*(e,n=!1){if(n&&this.filesCache.has(e))return this.filesCache.get(e);const r=Promise.all([fetch(`${e}.glb`).then(o=>o.arrayBuffer()),fetch(`${e}.meta`).then(o=>o.text()).then(o=>JSON.parse(o))]);n&&this.filesCache.set(e,r);const s=yield r;return n&&this.filesCache.set(e,s),s})}loadGgGlbResources(t){return rk(this,arguments,void 0,function*(e,n=yu.Nothing){if(n==yu.Entities&&this.loadResultCache.has(e)){const c=this.loadResultCache.get(e),d=c instanceof Promise?yield c:c;return s4(d)}const[r,s]=yield this.loadGgGlbFiles(e,n==yu.Files);if(!r)throw new Error("GLB not found");const[o,a]=yield Promise.all([this.world.visualScene.loader.loadFromGgGlb(r,s),this.world.physicsWorld.loader.loadFromGgGlb(r,s)]),l={resources:[],meta:s};if(!o)return l;if(0==a.length)l.resources.push({object3D:o,body:null});else if(1==a.length)l.resources.push({object3D:o,body:a[0]});else{for(const c of a)l.resources.push({object3D:o.popChild(c.name),body:c});o.isEmpty()||l.resources.push({object3D:o,body:null})}return n==yu.Entities&&this.loadResultCache.set(e,s4(l)),l})}loadGgGlb(t){return rk(this,arguments,void 0,function*(e,n=r4){const r=Object.assign(Object.assign({},r4),n),{resources:s,meta:o}=yield this.loadGgGlbResources(e,r.cachingStrategy),a={entities:s.map(l=>new Zo({object3D:l.object3D,objectBody:l.body})),meta:o};return r.loadProps&&(a.props=yield Promise.all(o.dummies.filter(l=>l.is_prop||l.is_scene).map(l=>this.loadGgGlb(l.is_prop?(r.propsPath||e.substring(0,e.lastIndexOf("/")+1))+l.prop_id:l.scene_id,{loadProps:!!l.is_scene,position:Pe.add(Pe.rot(l.position,r.rotation),r.position),rotation:Yi.combineRotations(l.rotation,r.rotation)})))),a.entities.forEach(l=>{l.position=Pe.add(Pe.rot(Pe.clone(l.position),r.rotation),r.position),l.rotation=Yi.mult(Yi.clone(l.rotation),r.rotation)}),a})}}class sk extends yl{constructor(t,e){super(t,e),this.visualScene=t,this.physicsWorld=e,this.loader=new Ose(this)}addPrimitiveRigidBody(t,e=Pe.O,n=Yi.O,r={}){const s=new Zo({object3D:this.visualScene.factory.createPrimitive(t.shape,r),objectBody:this.physicsWorld.factory.createRigidBody(t)});return s.position=e,s.rotation=n,this.addEntity(s),s}addRenderer(t,e,n){const r=new Dse(this.visualScene.createRenderer(t,e,n));return this.addEntity(r),r}registerConsoleCommands(t){super.registerConsoleCommands(t),t.registerConsoleCommand(this,"gravity",(...e)=>function(i,t,e,n){return new(e||(e=Promise))(function(s,o){function a(d){try{c(n.next(d))}catch(h){o(h)}}function l(d){try{c(n.throw(d))}catch(h){o(h)}}function c(d){d.done?s(d.value):function r(s){return s instanceof e?s:new e(function(o){o(s)})}(d.value).then(a,l)}c((n=n.apply(i,t||[])).next())})}(this,void 0,void 0,function*(){if(1==e.length&&(e=["0","0",""+-+e[0]]),e.length>0){if(isNaN(+e[0])||isNaN(+e[1])||isNaN(+e[2]))throw new Error("Wrong arguments");this.physicsWorld.gravity={x:+e[0],y:+e[1],z:+e[2]}}return JSON.stringify(this.physicsWorld.gravity)}),'args: [ ?float, ?float, ?float ]; Get or set 3D world gravity vector. 1 argument sets vector {x: 0, y: 0, z: -value}, 3 arguments set the whole vector. Default value is "9.82" or "0 0 -9.82"')}}function o4(i,t=$y,e){const n=OI(i,t);return function Lse(i,t){return ti((e,n)=>{const{leading:r=!0,trailing:s=!1}=t??{};let o=!1,a=null,l=null,c=!1;const d=()=>{l?.unsubscribe(),l=null,s&&(m(),c&&n.complete())},h=()=>{l=null,c&&n.complete()},p=g=>l=wr(i(g)).subscribe(Yn(n,d,h)),m=()=>{if(o){o=!1;const g=a;a=null,n.next(g),!c&&p(g)}};e.subscribe(Yn(n,g=>{o=!0,a=g,(!l||l.closed)&&(r?m():p(g))},()=>{c=!0,(!(s&&o&&l)||l.closed)&&n.complete()}))})}(()=>n,e)}window.gg_version="0.0.56";const Nse=0,a4=1,Bse=2,l4=1,c4=2,Zc=3,ac=0,Io=1,Ls=2,Qc=0,Zm=1,d4=2,u4=3,h4=4,Use=5,Kh=100,Vse=101,zse=102,Hse=103,Gse=104,$se=200,Wse=201,jse=202,Yse=203,ak=204,lk=205,qse=206,Xse=207,Kse=208,Zse=209,Qse=210,Jse=211,eoe=212,toe=213,noe=214,ioe=0,roe=1,soe=2,SC=3,ooe=4,aoe=5,loe=6,coe=7,EC=0,doe=1,uoe=2,bu=0,hoe=1,foe=2,poe=3,moe=4,goe=5,_oe=6,voe=7,f4="attached",lc=301,Zh=302,AC=303,DC=304,mb=306,Pa=1e3,Ii=1001,gb=1002,_r=1003,dk=1004,Qm=1005,lr=1006,_b=1007,bl=1008,Jc=1009,p4=1010,m4=1011,vb=1012,uk=1013,xu=1014,Qo=1015,Jm=1016,hk=1017,fk=1018,eg=1020,g4=35902,_4=1021,v4=1022,Ro=1023,y4=1024,b4=1025,tg=1026,ng=1027,pk=1028,TC=1029,x4=1030,mk=1031,gk=1033,IC=33776,RC=33777,kC=33778,PC=33779,_k=35840,vk=35841,yk=35842,bk=35843,xk=36196,wk=37492,Mk=37496,Ck=37808,Sk=37809,Ek=37810,Ak=37811,Dk=37812,Tk=37813,Ik=37814,Rk=37815,kk=37816,Pk=37817,Ok=37818,Fk=37819,Lk=37820,Nk=37821,OC=36492,Bk=36494,Uk=36495,w4=36283,Vk=36284,zk=36285,Hk=36286,yb=2300,bb=2301,Moe=0,C4=1,Wk=2,Soe=3201,Qh=0,Eoe=1,wu="",cs="srgb",ds="srgb-linear",jk="display-p3",LC="display-p3-linear",NC="linear",Fi="srgb",BC="rec709",UC="p3",sg=7680,Aoe=512,Doe=513,Toe=514,E4=515,Ioe=516,Roe=517,koe=518,Poe=519,A4="300 es",ed=2e3;class og{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]+Ns[i>>16&255]+Ns[i>>24&255]+"-"+Ns[255&t]+Ns[t>>8&255]+"-"+Ns[t>>16&15|64]+Ns[t>>24&255]+"-"+Ns[63&e|128]+Ns[e>>8&255]+"-"+Ns[e>>16&255]+Ns[e>>24&255]+Ns[255&n]+Ns[n>>8&255]+Ns[n>>16&255]+Ns[n>>24&255]).toLowerCase()}function er(i,t,e){return Math.max(t,Math.min(e,i))}function Yk(i,t){return(i%t+t)%t}function xb(i,t,e){return(1-e)*i+e*t}function lo(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 yn(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 Koe_radToDeg=function Woe(i){return i*ag};class xe{constructor(t=0,e=0){xe.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(er(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 wn{constructor(t,e,n,r,s,o,a,l,c){wn.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 d=this.elements;return d[0]=t,d[1]=r,d[2]=a,d[3]=e,d[4]=s,d[5]=l,d[6]=n,d[7]=o,d[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],d=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],F=r[2],D=r[5],k=r[8];return s[0]=o*b+a*M+l*F,s[3]=o*v+a*x+l*D,s[6]=o*y+a*C+l*k,s[1]=c*b+d*M+h*F,s[4]=c*v+d*x+h*D,s[7]=c*y+d*C+h*k,s[2]=p*b+m*M+g*F,s[5]=p*v+m*x+g*D,s[8]=p*y+m*C+g*k,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],d=t[8];return e*o*d-e*a*c-n*s*d+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],d=t[8],h=d*o-a*c,p=a*l-d*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-d*n)*b,t[2]=(a*n-r*o)*b,t[3]=p*b,t[4]=(d*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(qk.makeScale(t,e)),this}rotate(t){return this.premultiply(qk.makeRotation(-t)),this}translate(t,e){return this.premultiply(qk.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 qk=new wn;function T4(i){for(let t=i.length-1;t>=0;--t)if(i[t]>=65535)return!0;return!1}function wb(i){return document.createElementNS("http://www.w3.org/1999/xhtml",i)}function Qoe(){const i=wb("canvas");return i.style.display="block",i}Int8Array,Uint8Array,Uint8ClampedArray,Int16Array,Uint16Array,Int32Array,Uint32Array,Float32Array,Float64Array;const I4={};function cg(i){i in I4||(I4[i]=!0,console.warn(i))}const R4=(new wn).set(.8224621,.177538,0,.0331941,.9668058,0,.0170827,.0723974,.9105199),k4=(new wn).set(1.2249401,-.2249404,0,-.0420569,1.0420571,0,-.0196376,-.0786361,1.0982735),Mb={[ds]:{transfer:NC,primaries:BC,luminanceCoefficients:[.2126,.7152,.0722],toReference:i=>i,fromReference:i=>i},[cs]:{transfer:Fi,primaries:BC,luminanceCoefficients:[.2126,.7152,.0722],toReference:i=>i.convertSRGBToLinear(),fromReference:i=>i.convertLinearToSRGB()},[LC]:{transfer:NC,primaries:UC,luminanceCoefficients:[.2289,.6917,.0793],toReference:i=>i.applyMatrix3(k4),fromReference:i=>i.applyMatrix3(R4)},[jk]:{transfer:Fi,primaries:UC,luminanceCoefficients:[.2289,.6917,.0793],toReference:i=>i.convertSRGBToLinear().applyMatrix3(k4),fromReference:i=>i.applyMatrix3(R4).convertLinearToSRGB()}},eae=new Set([ds,LC]),Jn={enabled:!0,_workingColorSpace:ds,get workingColorSpace(){return this._workingColorSpace},set workingColorSpace(i){if(!eae.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,Mb[e].fromReference)((0,Mb[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 Mb[i].primaries},getTransfer:function(i){return i===wu?NC:Mb[i].transfer},getLuminanceCoefficients:function(i,t=this._workingColorSpace){return i.fromArray(Mb[t].luminanceCoefficients)}};function dg(i){return i<.04045?.0773993808*i:Math.pow(.9478672986*i+.0521327014,2.4)}function Xk(i){return i<.0031308?12.92*i:1.055*Math.pow(i,.41666)-.055}let ug;class tae{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===ug&&(ug=wb("canvas")),ug.width=t.width,ug.height=t.height;const n=ug.getContext("2d");t instanceof ImageData?n.putImageData(t,0,0):n.drawImage(t,0,0,t.width,t.height),e=ug}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=wb("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 og{constructor(e=i.DEFAULT_IMAGE,n=i.DEFAULT_MAPPING,r=Ii,s=Ii,o=lr,a=bl,l=Ro,c=Jc,d=i.DEFAULT_ANISOTROPY,h=wu){super(),this.isTexture=!0,Object.defineProperty(this,"id",{value:iae++}),this.uuid=Jo(),this.name="",this.source=new hg(e),this.mipmaps=[],this.mapping=n,this.channel=0,this.wrapS=r,this.wrapT=s,this.magFilter=o,this.minFilter=a,this.anisotropy=d,this.format=l,this.internalFormat=null,this.type=c,this.offset=new xe(0,0),this.repeat=new xe(1,1),this.center=new xe(0,0),this.rotation=0,this.matrixAutoUpdate=!0,this.matrix=new wn,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 Pa:e.x=e.x-Math.floor(e.x);break;case Ii:e.x=e.x<0?0:1;break;case gb: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 Pa:e.y=e.y-Math.floor(e.y);break;case Ii:e.y=e.y<0?0:1;break;case gb: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 gi{constructor(t=0,e=0,n=0,r=1){gi.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],d=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(d-p)<.01&&Math.abs(h-b)<.01&&Math.abs(g-v)<.01){if(Math.abs(d+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,F=(y+1)/2,D=(d+p)/4,k=(h+b)/4,B=(g+v)/4;return x>C&&x>F?x<.01?(n=0,r=.707106781,s=.707106781):(n=Math.sqrt(x),r=D/n,s=k/n):C>F?C<.01?(n=.707106781,r=0,s=.707106781):(r=Math.sqrt(C),n=D/r,s=B/r):F<.01?(n=.707106781,r=.707106781,s=0):(s=Math.sqrt(F),n=k/s,r=B/s),this.set(n,r,s,e),this}let M=Math.sqrt((v-g)*(v-g)+(h-b)*(h-b)+(p-d)*(p-d));return Math.abs(M)<.001&&(M=1),this.x=(v-g)/M,this.y=(h-b)/M,this.z=(p-d)/M,this.w=Math.acos((c+m+y-1)/2),this}setFromMatrixPosition(t){const e=t.elements;return this.x=e[12],this.y=e[13],this.z=e[14],this.w=e[15],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 rae extends og{constructor(t=1,e=1,n={}){super(),this.isRenderTarget=!0,this.width=t,this.height=e,this.depth=1,this.scissor=new gi(0,0,t,e),this.scissorTest=!1,this.viewport=new gi(0,0,t,e);const r={width:t,height:e,depth:1};n=Object.assign({generateMipmaps:!1,internalFormat:null,minFilter:lr,depthBuffer:!0,stencilBuffer:!1,resolveDepthBuffer:!0,resolveStencilBuffer:!0,depthTexture:null,samples:0,count:1},n);const s=new ko(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 F=Math.sqrt(x),D=Math.atan2(F,y*M);v=Math.sin(v*D)/F,a=Math.sin(a*D)/F}const C=a*M;if(l=l*v+p*C,c=c*v+m*C,d=d*v+g*C,h=h*v+b*C,v===1-a){const F=1/Math.sqrt(l*l+c*c+d*d+h*h);l*=F,c*=F,d*=F,h*=F}}t[e]=l,t[e+1]=c,t[e+2]=d,t[e+3]=h}static multiplyQuaternionsFlat(t,e,n,r,s,o){const a=n[r],l=n[r+1],c=n[r+2],d=n[r+3],h=s[o],p=s[o+1],m=s[o+2],g=s[o+3];return t[e]=a*g+d*h+l*m-c*p,t[e+1]=l*g+d*p+c*h-a*m,t[e+2]=c*g+d*m+a*p-l*h,t[e+3]=d*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),d=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*d*h+c*m*g,this._y=c*m*h-p*d*g,this._z=c*d*g+p*m*h,this._w=c*d*h-p*m*g;break;case"YXZ":this._x=p*d*h+c*m*g,this._y=c*m*h-p*d*g,this._z=c*d*g-p*m*h,this._w=c*d*h+p*m*g;break;case"ZXY":this._x=p*d*h-c*m*g,this._y=c*m*h+p*d*g,this._z=c*d*g+p*m*h,this._w=c*d*h-p*m*g;break;case"ZYX":this._x=p*d*h-c*m*g,this._y=c*m*h+p*d*g,this._z=c*d*g-p*m*h,this._w=c*d*h+p*m*g;break;case"YZX":this._x=p*d*h+c*m*g,this._y=c*m*h+p*d*g,this._z=c*d*g-p*m*h,this._w=c*d*h-p*m*g;break;case"XZY":this._x=p*d*h-c*m*g,this._y=c*m*h-p*d*g,this._z=c*d*g+p*m*h,this._w=c*d*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],d=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=(d-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=(d-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+d)/m}else{const m=2*Math.sqrt(1+h-n-a);this._w=(o-r)/m,this._x=(s+c)/m,this._y=(l+d)/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(er(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,d=e._w;return this._x=n*d+o*a+r*c-s*l,this._y=r*d+o*l+s*a-n*c,this._z=s*d+o*c+n*l-r*a,this._w=o*d-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),d=Math.atan2(c,a),h=Math.sin((1-e)*d)/c,p=Math.sin(e*d)/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 O{constructor(t=0,e=0,n=0){O.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(O4.setFromEuler(t))}applyAxisAngle(t,e){return this.applyQuaternion(O4.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),d=2*(a*e-s*r),h=2*(s*n-o*e);return this.x=e+l*c+o*h-a*d,this.y=n+l*d+a*c-s*h,this.z=r+l*h+s*d-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 Qk.copy(this).projectOnVector(t),this.sub(Qk)}reflect(t){return this.sub(Qk.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(er(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 Qk=new O,O4=new co;class Bs{constructor(t=new O(1/0,1/0,1/0),e=new O(-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;e=this.min.x&&t.x<=this.max.x&&t.y>=this.min.y&&t.y<=this.max.y&&t.z>=this.min.z&&t.z<=this.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.x>=this.min.x&&t.min.x<=this.max.x&&t.max.y>=this.min.y&&t.min.y<=this.max.y&&t.max.z>=this.min.z&&t.min.z<=this.max.z}intersectsSphere(t){return this.clampPoint(t.center,xl),xl.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(Cb),GC.subVectors(this.max,Cb),fg.subVectors(t.a,Cb),pg.subVectors(t.b,Cb),mg.subVectors(t.c,Cb),Cu.subVectors(pg,fg),Su.subVectors(mg,pg),ef.subVectors(fg,mg);let e=[0,-Cu.z,Cu.y,0,-Su.z,Su.y,0,-ef.z,ef.y,Cu.z,0,-Cu.x,Su.z,0,-Su.x,ef.z,0,-ef.x,-Cu.y,Cu.x,0,-Su.y,Su.x,0,-ef.y,ef.x,0];return!(!Jk(e,fg,pg,mg,GC)||(e=[1,0,0,0,1,0,0,0,1],!Jk(e,fg,pg,mg,GC)))&&($C.crossVectors(Cu,Su),e=[$C.x,$C.y,$C.z],Jk(e,fg,pg,mg,GC))}clampPoint(t,e){return e.copy(t).clamp(this.min,this.max)}distanceToPoint(t){return this.clampPoint(t,xl).distanceTo(t)}getBoundingSphere(t){return this.isEmpty()?t.makeEmpty():(this.getCenter(t.center),t.radius=.5*this.getSize(xl).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()||(td[0].set(this.min.x,this.min.y,this.min.z).applyMatrix4(t),td[1].set(this.min.x,this.min.y,this.max.z).applyMatrix4(t),td[2].set(this.min.x,this.max.y,this.min.z).applyMatrix4(t),td[3].set(this.min.x,this.max.y,this.max.z).applyMatrix4(t),td[4].set(this.max.x,this.min.y,this.min.z).applyMatrix4(t),td[5].set(this.max.x,this.min.y,this.max.z).applyMatrix4(t),td[6].set(this.max.x,this.max.y,this.min.z).applyMatrix4(t),td[7].set(this.max.x,this.max.y,this.max.z).applyMatrix4(t),this.setFromPoints(td)),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 td=[new O,new O,new O,new O,new O,new O,new O,new O],xl=new O,HC=new Bs,fg=new O,pg=new O,mg=new O,Cu=new O,Su=new O,ef=new O,Cb=new O,GC=new O,$C=new O,tf=new O;function Jk(i,t,e,n,r){for(let s=0,o=i.length-3;s<=o;s+=3){tf.fromArray(i,s);const a=r.x*Math.abs(tf.x)+r.y*Math.abs(tf.y)+r.z*Math.abs(tf.z),l=t.dot(tf),c=e.dot(tf),d=n.dot(tf);if(Math.max(-Math.max(l,c,d),Math.min(l,c,d))>a)return!1}return!0}const sae=new Bs,Sb=new O,eP=new O;class Us{constructor(t=new O,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):sae.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;Sb.subVectors(t,this.center);const e=Sb.lengthSq();if(e>this.radius*this.radius){const n=Math.sqrt(e),r=.5*(n-this.radius);this.center.addScaledVector(Sb,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):(eP.subVectors(t.center,this.center).setLength(t.radius),this.expandByPoint(Sb.copy(t.center).add(eP)),this.expandByPoint(Sb.copy(t.center).sub(eP))),this)}equals(t){return t.center.equals(this.center)&&t.radius===this.radius}clone(){return(new this.constructor).copy(this)}}const nd=new O,tP=new O,WC=new O,Eu=new O,nP=new O,jC=new O,iP=new O;class Eb{constructor(t=new O,e=new O(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,nd)),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=nd.subVectors(t,this.origin).dot(this.direction);return e<0?this.origin.distanceToSquared(t):(nd.copy(this.origin).addScaledVector(this.direction,e),nd.distanceToSquared(t))}distanceSqToSegment(t,e,n,r){tP.copy(t).add(e).multiplyScalar(.5),WC.copy(e).sub(t).normalize(),Eu.copy(this.origin).sub(tP);const s=.5*t.distanceTo(e),o=-this.direction.dot(WC),a=Eu.dot(this.direction),l=-Eu.dot(WC),c=Eu.lengthSq(),d=Math.abs(1-o*o);let h,p,m,g;if(d>0)if(h=o*l-a,p=o*a-l,g=s*d,h>=0)if(p>=-g)if(p<=g){const b=1/d;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(tP).addScaledVector(WC,p),m}intersectSphere(t,e){nd.subVectors(t.center,this.origin);const n=nd.dot(this.direction),r=nd.dot(nd)-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,d=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),d>=0?(s=(t.min.y-p.y)*d,o=(t.max.y-p.y)*d):(s=(t.max.y-p.y)*d,o=(t.min.y-p.y)*d),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,nd)}intersectTriangle(t,e,n,r,s){nP.subVectors(e,t),jC.subVectors(n,t),iP.crossVectors(nP,jC);let a,o=this.direction.dot(iP);if(o>0){if(r)return null;a=1}else{if(!(o<0))return null;a=-1,o=-o}Eu.subVectors(this.origin,t);const l=a*this.direction.dot(jC.crossVectors(Eu,jC));if(l<0)return null;const c=a*this.direction.dot(nP.cross(Eu));if(c<0||l+c>o)return null;const d=-a*Eu.dot(iP);return d<0?null:this.at(d/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 Nt{constructor(t,e,n,r,s,o,a,l,c,d,h,p,m,g,b,v){Nt.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,d,h,p,m,g,b,v)}set(t,e,n,r,s,o,a,l,c,d,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]=d,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 Nt).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/gg.setFromMatrixColumn(t,0).length(),s=1/gg.setFromMatrixColumn(t,1).length(),o=1/gg.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),d=Math.cos(s),h=Math.sin(s);if("XYZ"===t.order){const p=o*d,m=o*h,g=a*d,b=a*h;e[0]=l*d,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*d,m=l*h,g=c*d,b=c*h;e[0]=p+b*a,e[4]=g*a-m,e[8]=o*c,e[1]=o*h,e[5]=o*d,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*d,m=l*h,g=c*d,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*d,e[9]=b-p*a,e[2]=-o*c,e[6]=a,e[10]=o*l}else if("ZYX"===t.order){const p=o*d,m=o*h,g=a*d,b=a*h;e[0]=l*d,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*d,e[4]=b-p*h,e[8]=g*h+m,e[1]=h,e[5]=o*d,e[9]=-a*d,e[2]=-c*d,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*d,e[4]=-h,e[8]=c*d,e[1]=p*h+b,e[5]=o*d,e[9]=m*h-g,e[2]=g*h-m,e[6]=a*d,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(oae,t,aae)}lookAt(t,e,n){const r=this.elements;return ea.subVectors(t,e),0===ea.lengthSq()&&(ea.z=1),ea.normalize(),Au.crossVectors(n,ea),0===Au.lengthSq()&&(1===Math.abs(n.z)?ea.x+=1e-4:ea.z+=1e-4,ea.normalize(),Au.crossVectors(n,ea)),Au.normalize(),YC.crossVectors(ea,Au),r[0]=Au.x,r[4]=YC.x,r[8]=ea.x,r[1]=Au.y,r[5]=YC.y,r[9]=ea.y,r[2]=Au.z,r[6]=YC.z,r[10]=ea.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],d=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],F=n[15],D=r[0],k=r[4],B=r[8],T=r[12],A=r[1],$=r[5],ie=r[9],ne=r[13],se=r[2],ge=r[6],q=r[10],re=r[14],J=r[3],we=r[7],Ne=r[11],Ye=r[15];return s[0]=o*D+a*A+l*se+c*J,s[4]=o*k+a*$+l*ge+c*we,s[8]=o*B+a*ie+l*q+c*Ne,s[12]=o*T+a*ne+l*re+c*Ye,s[1]=d*D+h*A+p*se+m*J,s[5]=d*k+h*$+p*ge+m*we,s[9]=d*B+h*ie+p*q+m*Ne,s[13]=d*T+h*ne+p*re+m*Ye,s[2]=g*D+b*A+v*se+y*J,s[6]=g*k+b*$+v*ge+y*we,s[10]=g*B+b*ie+v*q+y*Ne,s[14]=g*T+b*ne+v*re+y*Ye,s[3]=M*D+x*A+C*se+F*J,s[7]=M*k+x*$+C*ge+F*we,s[11]=M*B+x*ie+C*q+F*Ne,s[15]=M*T+x*ne+C*re+F*Ye,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],d=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*d-s*l*d)+t[11]*(+e*c*h-e*a*m-s*o*h+n*o*m+s*a*d-n*c*d)+t[15]*(-r*a*d-e*l*h+e*a*p+r*o*h-n*o*p+n*l*d)}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],d=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-d*v*c-g*l*m+o*v*m+d*l*y-o*p*y,C=d*b*c-g*h*c+g*a*m-o*b*m-d*a*y+o*h*y,F=g*h*l-d*b*l-g*a*p+o*b*p+d*a*v-o*h*v,D=e*M+n*x+r*C+s*F;if(0===D)return this.set(0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0);const k=1/D;return t[0]=M*k,t[1]=(b*p*s-h*v*s-b*r*m+n*v*m+h*r*y-n*p*y)*k,t[2]=(a*v*s-b*l*s+b*r*c-n*v*c-a*r*y+n*l*y)*k,t[3]=(h*l*s-a*p*s-h*r*c+n*p*c+a*r*m-n*l*m)*k,t[4]=x*k,t[5]=(d*v*s-g*p*s+g*r*m-e*v*m-d*r*y+e*p*y)*k,t[6]=(g*l*s-o*v*s-g*r*c+e*v*c+o*r*y-e*l*y)*k,t[7]=(o*p*s-d*l*s+d*r*c-e*p*c-o*r*m+e*l*m)*k,t[8]=C*k,t[9]=(g*h*s-d*b*s-g*n*m+e*b*m+d*n*y-e*h*y)*k,t[10]=(o*b*s-g*a*s+g*n*c-e*b*c-o*n*y+e*a*y)*k,t[11]=(d*a*s-o*h*s-d*n*c+e*h*c+o*n*m-e*a*m)*k,t[12]=F*k,t[13]=(d*b*r-g*h*r+g*n*p-e*b*p-d*n*v+e*h*v)*k,t[14]=(g*a*r-o*b*r-g*n*l+e*b*l+o*n*v-e*a*v)*k,t[15]=(o*h*r-d*a*r+d*n*l-e*h*l-o*n*p+e*a*p)*k,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,d=s*a;return this.set(c*o+n,c*a-r*l,c*l+r*a,0,c*a+r*l,d*a+n,d*l-r*o,0,c*l-r*a,d*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,d=o+o,h=a+a,p=s*c,m=s*d,g=s*h,b=o*d,v=o*h,y=a*h,M=l*c,x=l*d,C=l*h,F=n.x,D=n.y,k=n.z;return r[0]=(1-(b+y))*F,r[1]=(m+C)*F,r[2]=(g-x)*F,r[3]=0,r[4]=(m-C)*D,r[5]=(1-(p+y))*D,r[6]=(v+M)*D,r[7]=0,r[8]=(g+x)*k,r[9]=(v-M)*k,r[10]=(1-(p+b))*k,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=gg.set(r[0],r[1],r[2]).length();const o=gg.set(r[4],r[5],r[6]).length(),a=gg.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],wl.copy(this);const c=1/s,d=1/o,h=1/a;return wl.elements[0]*=c,wl.elements[1]*=c,wl.elements[2]*=c,wl.elements[4]*=d,wl.elements[5]*=d,wl.elements[6]*=d,wl.elements[8]*=h,wl.elements[9]*=h,wl.elements[10]*=h,e.setFromRotationMatrix(wl),n.x=s,n.y=o,n.z=a,this}makePerspective(t,e,n,r,s,o,a=ed){const l=this.elements,c=2*s/(e-t),d=2*s/(n-r),h=(e+t)/(e-t),p=(n+r)/(n-r);let m,g;if(a===ed)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]=d,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=ed){const l=this.elements,c=1/(e-t),d=1/(n-r),h=1/(o-s),p=(e+t)*c,m=(n+r)*d;let g,b;if(a===ed)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*d,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 gg=new O,wl=new Nt,oae=new O(0,0,0),aae=new O(1,1,1),Au=new O,YC=new O,ea=new O,F4=new Nt,L4=new co;let id=(()=>{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],d=s[5],h=s[9],p=s[2],m=s[6],g=s[10];switch(n){case"XYZ":this._y=Math.asin(er(l,-1,1)),Math.abs(l)<.9999999?(this._x=Math.atan2(-h,g),this._z=Math.atan2(-a,o)):(this._x=Math.atan2(m,d),this._z=0);break;case"YXZ":this._x=Math.asin(-er(h,-1,1)),Math.abs(h)<.9999999?(this._y=Math.atan2(l,g),this._z=Math.atan2(c,d)):(this._y=Math.atan2(-p,o),this._z=0);break;case"ZXY":this._x=Math.asin(er(m,-1,1)),Math.abs(m)<.9999999?(this._y=Math.atan2(-p,g),this._z=Math.atan2(-a,d)):(this._y=0,this._z=Math.atan2(c,o));break;case"ZYX":this._y=Math.asin(-er(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,d));break;case"YZX":this._z=Math.asin(er(c,-1,1)),Math.abs(c)<.9999999?(this._x=Math.atan2(-h,d),this._y=Math.atan2(-p,o)):(this._x=0,this._y=Math.atan2(l,g));break;case"XZY":this._z=Math.asin(-er(a,-1,1)),Math.abs(a)<.9999999?(this._x=Math.atan2(m,d),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 F4.makeRotationFromQuaternion(e),this.setFromRotationMatrix(F4,n,r)}setFromVector3(e,n=this._order){return this.set(e.x,e.y,e.z,n)}reorder(e){return L4.setFromEuler(this),this.setFromQuaternion(L4,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 rP{constructor(){this.mask=1}set(t){this.mask=(1<>>0}enable(t){this.mask|=1<{class i extends og{constructor(){super(),this.isObject3D=!0,Object.defineProperty(this,"id",{value:lae++}),this.uuid=Jo(),this.name="",this.type="Object3D",this.parent=null,this.children=[],this.up=i.DEFAULT_UP.clone();const e=new O,n=new id,r=new co,s=new O(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 Nt},normalMatrix:{value:new wn}}),this.matrix=new Nt,this.matrixWorld=new Nt,this.matrixAutoUpdate=i.DEFAULT_MATRIX_AUTO_UPDATE,this.matrixWorldAutoUpdate=i.DEFAULT_MATRIX_WORLD_AUTO_UPDATE,this.matrixWorldNeedsUpdate=!1,this.layers=new rP,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 _g.setFromAxisAngle(e,n),this.quaternion.multiply(_g),this}rotateOnWorldAxis(e,n){return _g.setFromAxisAngle(e,n),this.quaternion.premultiply(_g),this}rotateX(e){return this.rotateOnAxis(B4,e)}rotateY(e){return this.rotateOnAxis(U4,e)}rotateZ(e){return this.rotateOnAxis(V4,e)}translateOnAxis(e,n){return N4.copy(e).applyQuaternion(this.quaternion),this.position.add(N4.multiplyScalar(n)),this}translateX(e){return this.translateOnAxis(B4,e)}translateY(e){return this.translateOnAxis(U4,e)}translateZ(e){return this.translateOnAxis(V4,e)}localToWorld(e){return this.updateWorldMatrix(!0,!1),e.applyMatrix4(this.matrixWorld)}worldToLocal(e){return this.updateWorldMatrix(!0,!1),e.applyMatrix4(rd.copy(this.matrixWorld).invert())}lookAt(e,n,r){e.isVector3?qC.copy(e):qC.set(e,n,r);const s=this.parent;this.updateWorldMatrix(!0,!1),Ab.setFromMatrixPosition(this.matrixWorld),this.isCamera||this.isLight?rd.lookAt(Ab,qC,this.up):rd.lookAt(qC,Ab,this.up),this.quaternion.setFromRotationMatrix(rd),s&&(rd.extractRotation(s.matrixWorld),_g.setFromRotationMatrix(rd),this.quaternion.premultiply(_g.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.maxInstanceCount=this._maxInstanceCount,s.maxVertexCount=this._maxVertexCount,s.maxIndexCount=this._maxIndexCount,s.geometryInitialized=this._geometryInitialized,s.geometryCount=this._geometryCount,s.matricesTexture=this._matricesTexture.toJSON(e),null!==this._colorsTexture&&(s.colorsTexture=this._colorsTexture.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 d=0,h=c.length;d0){s.children=[];for(let l=0;l0){s.animations=[];for(let l=0;l0&&(r.geometries=l),c.length>0&&(r.materials=c),d.length>0&&(r.textures=d),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 d in l){const h=l[d];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){Ml.subVectors(r,e),sd.subVectors(n,e),oP.subVectors(t,e);const o=Ml.dot(Ml),a=Ml.dot(sd),l=Ml.dot(oP),c=sd.dot(sd),d=sd.dot(oP),h=o*c-a*a;if(0===h)return s.set(0,0,0),null;const p=1/h,m=(c*l-a*d)*p,g=(o*d-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,od)&&od.x>=0&&od.y>=0&&od.x+od.y<=1}static getInterpolation(t,e,n,r,s,o,a,l){return null===this.getBarycoord(t,e,n,r,od)?(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,od.x),l.addScaledVector(o,od.y),l.addScaledVector(a,od.z),l)}static isFrontFacing(t,e,n,r){return Ml.subVectors(n,e),sd.subVectors(t,e),Ml.cross(sd).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 Ml.subVectors(this.c,this.b),sd.subVectors(this.a,this.b),.5*Ml.cross(sd).length()}getMidpoint(t){return t.addVectors(this.a,this.b).add(this.c).multiplyScalar(1/3)}getNormal(t){return Oa.getNormal(this.a,this.b,this.c,t)}getPlane(t){return t.setFromCoplanarPoints(this.a,this.b,this.c)}getBarycoord(t,e){return Oa.getBarycoord(t,this.a,this.b,this.c,e)}getInterpolation(t,e,n,r,s){return Oa.getInterpolation(t,this.a,this.b,this.c,e,n,r,s)}containsPoint(t){return Oa.containsPoint(t,this.a,this.b,this.c)}isFrontFacing(t){return Oa.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;yg.subVectors(r,n),bg.subVectors(s,n),aP.subVectors(t,n);const l=yg.dot(aP),c=bg.dot(aP);if(l<=0&&c<=0)return e.copy(n);lP.subVectors(t,r);const d=yg.dot(lP),h=bg.dot(lP);if(d>=0&&h<=d)return e.copy(r);const p=l*h-d*c;if(p<=0&&l>=0&&d<=0)return o=l/(l-d),e.copy(n).addScaledVector(yg,o);cP.subVectors(t,s);const m=yg.dot(cP),g=bg.dot(cP);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(bg,a);const v=d*g-m*h;if(v<=0&&h-d>=0&&m-g>=0)return H4.subVectors(s,r),a=(h-d)/(h-d+(m-g)),e.copy(r).addScaledVector(H4,a);const y=1/(v+b+p);return o=b*y,a=p*y,e.copy(n).addScaledVector(yg,o).addScaledVector(bg,a)}equals(t){return t.a.equals(this.a)&&t.b.equals(this.b)&&t.c.equals(this.c)}}const G4={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},Du={h:0,s:0,l:0},XC={h:0,s:0,l:0};function dP(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 qe{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=cs){return t=Math.floor(t),this.r=(t>>16&255)/255,this.g=(t>>8&255)/255,this.b=(255&t)/255,Jn.toWorkingColorSpace(this,e),this}setRGB(t,e,n,r=Jn.workingColorSpace){return this.r=t,this.g=e,this.b=n,Jn.toWorkingColorSpace(this,r),this}setHSL(t,e,n,r=Jn.workingColorSpace){if(t=Yk(t,1),e=er(e,0,1),n=er(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=dP(o,s,t+1/3),this.g=dP(o,s,t),this.b=dP(o,s,t-1/3)}return Jn.toWorkingColorSpace(this,r),this}setStyle(t,e=cs){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=cs){const n=G4[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=dg(t.r),this.g=dg(t.g),this.b=dg(t.b),this}copyLinearToSRGB(t){return this.r=Xk(t.r),this.g=Xk(t.g),this.b=Xk(t.b),this}convertSRGBToLinear(){return this.copySRGBToLinear(this),this}convertLinearToSRGB(){return this.copyLinearToSRGB(this),this}getHex(t=cs){return Jn.fromWorkingColorSpace(Vs.copy(this),t),65536*Math.round(er(255*Vs.r,0,255))+256*Math.round(er(255*Vs.g,0,255))+Math.round(er(255*Vs.b,0,255))}getHexString(t=cs){return("000000"+this.getHex(t).toString(16)).slice(-6)}getHSL(t,e=Jn.workingColorSpace){Jn.fromWorkingColorSpace(Vs.copy(this),e);const n=Vs.r,r=Vs.g,s=Vs.b,o=Math.max(n,r,s),a=Math.min(n,r,s);let l,c;const d=(a+o)/2;if(a===o)l=0,c=0;else{const h=o-a;switch(c=d<=.5?h/(o+a):h/(2-o-a),o){case n:l=(r-s)/h+(r0!=t>0&&this.version++,this._alphaTest=t}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.dispersion&&(n.dispersion=this.dispersion),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!==Zm&&(n.blending=this.blending),this.side!==ac&&(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!==ak&&(n.blendSrc=this.blendSrc),this.blendDst!==lk&&(n.blendDst=this.blendDst),this.blendEquation!==Kh&&(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!==SC&&(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!==sg&&(n.stencilFail=this.stencilFail),this.stencilZFail!==sg&&(n.stencilZFail=this.stencilZFail),this.stencilZPass!==sg&&(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++}onBuild(){console.warn("Material: onBuild() has been removed.")}onBeforeRender(){console.warn("Material: onBeforeRender() has been removed.")}}class qi extends Po{constructor(t){super(),this.isMeshBasicMaterial=!0,this.type="MeshBasicMaterial",this.color=new qe(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 id,this.combine=EC,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 vr=new O,KC=new xe;class Hi{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=Qo,this.version=0}onUploadCallback(){}set needsUpdate(t){!0===t&&this.version++}get updateRange(){return cg("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],d=[];for(let h=0,p=c.length;h0&&(r[l]=d,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 d=[],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))&&(j4.copy(s).invert(),nf.copy(t.ray).applyMatrix4(j4),(null===n.boundingBox||!1!==nf.intersectsBox(n.boundingBox))&&this._computeIntersections(t,e,nf)))}_computeIntersections(t,e,n){let r;const s=this.geometry,o=this.material,a=s.index,l=s.attributes.position,c=s.attributes.uv,d=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:iS.clone(),object:i}}(i,t,e,n,wg,Mg,Cg,nS);if(d){r&&(JC.fromBufferAttribute(r,a),eS.fromBufferAttribute(r,l),tS.fromBufferAttribute(r,c),d.uv=Oa.getInterpolation(nS,wg,Mg,Cg,JC,eS,tS,new xe)),s&&(JC.fromBufferAttribute(s,a),eS.fromBufferAttribute(s,l),tS.fromBufferAttribute(s,c),d.uv1=Oa.getInterpolation(nS,wg,Mg,Cg,JC,eS,tS,new xe)),o&&(q4.fromBufferAttribute(o,a),X4.fromBufferAttribute(o,l),K4.fromBufferAttribute(o,c),d.normal=Oa.getInterpolation(nS,wg,Mg,Cg,q4,X4,K4,new O),d.normal.dot(n.direction)>0&&d.normal.multiplyScalar(-1));const h={a,b:l,c,normal:new O,materialIndex:0};Oa.getNormal(wg,Mg,Cg,h.normal),d.face=h}return d}class rf 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=[],d=[],h=[];let p=0,m=0;function g(b,v,y,M,x,C,F,D,k,B,T){const A=C/k,$=F/B,ie=C/2,ne=F/2,se=D/2,ge=k+1,q=B+1;let re=0,J=0;const we=new O;for(let Ne=0;Ne0?1:-1,d.push(we.x,we.y,we.z),h.push(It/k),h.push(1-Ne/B),re+=1}for(let Ne=0;Ne0&&(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 fP extends Or{constructor(){super(),this.isCamera=!0,this.type="Camera",this.matrixWorldInverse=new Nt,this.projectionMatrix=new Nt,this.projectionMatrixInverse=new Nt,this.coordinateSystem=ed}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 Tu=new O,J4=new xe,e5=new xe;class yr extends fP{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*ag*Math.atan(e),this.updateProjectionMatrix()}getFocalLength(){const t=Math.tan(.5*Jh*this.fov);return.5*this.getFilmHeight()/t}getEffectiveFOV(){return 2*ag*Math.atan(Math.tan(.5*Jh*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){Tu.set(-1,-1,.5).applyMatrix4(this.projectionMatrixInverse),e.set(Tu.x,Tu.y).multiplyScalar(-t/Tu.z),Tu.set(1,1,.5).applyMatrix4(this.projectionMatrixInverse),n.set(Tu.x,Tu.y).multiplyScalar(-t/Tu.z)}getViewSize(t,e){return this.getViewBounds(t,J4,e5),e.subVectors(e5,J4)}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*Jh*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 yae extends Or{constructor(t,e,n){super(),this.type="CubeCamera",this.renderTarget=n,this.coordinateSystem=null,this.activeMipmapLevel=0;const r=new yr(-90,1,t,e);r.layers=this.layers,this.add(r);const s=new yr(-90,1,t,e);s.layers=this.layers,this.add(s);const o=new yr(-90,1,t,e);o.layers=this.layers,this.add(o);const a=new yr(-90,1,t,e);a.layers=this.layers,this.add(a);const l=new yr(-90,1,t,e);l.layers=this.layers,this.add(l);const c=new yr(-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===ed)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,d]=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,d),t.setRenderTarget(h,p,m),t.xr.enabled=g,n.texture.needsPMREMUpdate=!0}}class sS extends ko{constructor(t,e,n,r,s,o,a,l,c,d){super(t=void 0!==t?t:[],e=void 0!==e?e:lc,n,r,s,o,a,l,c,d),this.isCubeTexture=!0,this.flipY=!1}get images(){return this.image}set images(t){this.image=t}}class bae extends Mu{constructor(t=1,e={}){super(t,t,e),this.isWebGLCubeRenderTarget=!0;const n={width:t,height:t,depth:1};this.texture=new sS([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:lr}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 rf(5,5,5),s=new Cl({name:"CubemapFromEquirect",uniforms:Sg(n_uniforms),vertexShader:n_vertexShader,fragmentShader:n_fragmentShader,side:Io,blending:Qc});s.uniforms.tEquirect.value=e;const o=new Mn(r,s),a=e.minFilter;return e.minFilter===bl&&(e.minFilter=lr),new yae(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 pP=new O,xae=new O,wae=new wn;class sf{constructor(t=new O(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=pP.subVectors(n,e).cross(xae.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(pP),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||wae.getNormalMatrix(t),r=this.coplanarPoint(pP).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 af=new Us,oS=new O;class aS{constructor(t=new sf,e=new sf,n=new sf,r=new sf,s=new sf,o=new sf){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=ed){const n=this.planes,r=t.elements,s=r[0],o=r[1],a=r[2],l=r[3],c=r[4],d=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+d,v+g,C+M).normalize(),n[3].setComponents(l-o,p-d,v-g,C-M).normalize(),n[4].setComponents(l-a,p-h,v-b,C-x).normalize(),e===ed)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(),af.copy(t.boundingSphere).applyMatrix4(t.matrixWorld);else{const e=t.geometry;null===e.boundingSphere&&e.computeBoundingSphere(),af.copy(e.boundingSphere).applyMatrix4(t.matrixWorld)}return this.intersectsSphere(af)}intersectsSprite(t){return af.center.set(0,0,0),af.radius=.7071067811865476,af.applyMatrix4(t.matrixWorld),this.intersectsSphere(af)}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,oS.y=r.normal.y>0?t.max.y:t.min.y,oS.z=r.normal.z>0?t.max.z:t.min.z,r.distanceToPoint(oS)<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 t5(){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 Mae(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.isInterleavedBufferAttribute&&(a=a.data),a.isGLBufferAttribute){const d=t.get(a);return void((!d||d.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 ) || defined( USE_BATCHING_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 ) || defined( USE_BATCHING_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\n#ifdef USE_BATCHING_COLOR\n\tvec3 batchingColor = getBatchingColor( getIndirectIndex( gl_DrawID ) );\n\tvColor.xyz *= batchingColor.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}\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}",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_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\tfloat distanceFalloff = 1.0 / max( pow( lightDistance, decayExponent ), 0.01 );\n\tif ( cutoffDistance > 0.0 ) {\n\t\tdistanceFalloff *= pow2( saturate( 1.0 - pow4( lightDistance / cutoffDistance ) ) );\n\t}\n\treturn distanceFalloff;\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_DISPERSION\n\tmaterial.dispersion = dispersion;\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\tfloat dispersion;\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.shadowIntensity, 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.shadowIntensity, 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.shadowIntensity, 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 )\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\tfor ( int i = 0; i < MORPHTARGETS_COUNT; i ++ ) {\n\t\tif ( morphTargetInfluences[ i ] != 0.0 ) objectNormal += getMorph( gl_VertexID, i, 1 ).xyz * morphTargetInfluences[ i ];\n\t}\n#endif",morphtarget_pars_vertex:"#ifdef USE_MORPHTARGETS\n\t#ifndef USE_INSTANCING_MORPH\n\t\tuniform float morphTargetBaseInfluence;\n\t\tuniform float morphTargetInfluences[ MORPHTARGETS_COUNT ];\n\t#endif\n\tuniform sampler2DArray morphTargetsTexture;\n\tuniform ivec2 morphTargetsTextureSize;\n\tvec4 getMorph( const in int vertexIndex, const in int morphTargetIndex, const in int offset ) {\n\t\tint texelIndex = vertexIndex * MORPHTARGETS_TEXTURE_STRIDE + offset;\n\t\tint y = texelIndex / morphTargetsTextureSize.x;\n\t\tint x = texelIndex - y * morphTargetsTextureSize.x;\n\t\tivec3 morphUV = ivec3( x, y, morphTargetIndex );\n\t\treturn texelFetch( morphTargetsTexture, morphUV, 0 );\n\t}\n#endif",morphtarget_vertex:"#ifdef USE_MORPHTARGETS\n\ttransformed *= morphTargetBaseInfluence;\n\tfor ( int i = 0; i < MORPHTARGETS_COUNT; i ++ ) {\n\t\tif ( morphTargetInfluences[ i ] != 0.0 ) transformed += getMorph( gl_VertexID, i, 0 ).xyz * morphTargetInfluences[ i ];\n\t}\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.;const float ShiftRight8 = 1. / 256.;\nconst float Inv255 = 1. / 255.;\nconst vec4 PackFactors = vec4( 1.0, 256.0, 256.0 * 256.0, 256.0 * 256.0 * 256.0 );\nconst vec2 UnpackFactors2 = vec2( UnpackDownscale, 1.0 / PackFactors.g );\nconst vec3 UnpackFactors3 = vec3( UnpackDownscale / PackFactors.rg, 1.0 / PackFactors.b );\nconst vec4 UnpackFactors4 = vec4( UnpackDownscale / PackFactors.rgb, 1.0 / PackFactors.a );\nvec4 packDepthToRGBA( const in float v ) {\n\tif( v <= 0.0 )\n\t\treturn vec4( 0., 0., 0., 0. );\n\tif( v >= 1.0 )\n\t\treturn vec4( 1., 1., 1., 1. );\n\tfloat vuf;\n\tfloat af = modf( v * PackFactors.a, vuf );\n\tfloat bf = modf( vuf * ShiftRight8, vuf );\n\tfloat gf = modf( vuf * ShiftRight8, vuf );\n\treturn vec4( vuf * Inv255, gf * PackUpscale, bf * PackUpscale, af );\n}\nvec3 packDepthToRGB( const in float v ) {\n\tif( v <= 0.0 )\n\t\treturn vec3( 0., 0., 0. );\n\tif( v >= 1.0 )\n\t\treturn vec3( 1., 1., 1. );\n\tfloat vuf;\n\tfloat bf = modf( v * PackFactors.b, vuf );\n\tfloat gf = modf( vuf * ShiftRight8, vuf );\n\treturn vec3( vuf * Inv255, gf * PackUpscale, bf );\n}\nvec2 packDepthToRG( const in float v ) {\n\tif( v <= 0.0 )\n\t\treturn vec2( 0., 0. );\n\tif( v >= 1.0 )\n\t\treturn vec2( 1., 1. );\n\tfloat vuf;\n\tfloat gf = modf( v * 256., vuf );\n\treturn vec2( vuf * Inv255, gf );\n}\nfloat unpackRGBAToDepth( const in vec4 v ) {\n\treturn dot( v, UnpackFactors4 );\n}\nfloat unpackRGBToDepth( const in vec3 v ) {\n\treturn dot( v, UnpackFactors3 );\n}\nfloat unpackRGToDepth( const in vec2 v ) {\n\treturn v.r * UnpackFactors2.r + v.g * UnpackFactors2.g;\n}\nvec4 pack2HalfToRGBA( const in 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( const in 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 shadowIntensity;\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 shadowIntensity;\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 shadowIntensity;\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 shadowIntensity, 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 mix( 1.0, shadow, shadowIntensity );\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 shadowIntensity, 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 mix( 1.0, shadow, shadowIntensity );\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 shadowIntensity;\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 shadowIntensity;\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 shadowIntensity;\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.shadowIntensity, 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.shadowIntensity, 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.shadowIntensity, 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\tconst float StartCompression = 0.8 - 0.04;\n\tconst float 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, vec3( newPeak ), 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.dispersion, 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 dispersion, const in float ior, const in float thickness,\n\t\tconst in vec3 attenuationColor, const in float attenuationDistance ) {\n\t\tvec4 transmittedLight;\n\t\tvec3 transmittance;\n\t\t#ifdef USE_DISPERSION\n\t\t\tfloat halfSpread = ( ior - 1.0 ) * 0.025 * dispersion;\n\t\t\tvec3 iors = vec3( ior - halfSpread, ior, ior + halfSpread );\n\t\t\tfor ( int i = 0; i < 3; i ++ ) {\n\t\t\t\tvec3 transmissionRay = getVolumeTransmissionRay( n, v, thickness, iors[ i ], modelMatrix );\n\t\t\t\tvec3 refractedRayExit = position + transmissionRay;\n\t\t\n\t\t\t\tvec4 ndcPos = projMatrix * viewMatrix * vec4( refractedRayExit, 1.0 );\n\t\t\t\tvec2 refractionCoords = ndcPos.xy / ndcPos.w;\n\t\t\t\trefractionCoords += 1.0;\n\t\t\t\trefractionCoords /= 2.0;\n\t\t\n\t\t\t\tvec4 transmissionSample = getTransmissionSample( refractionCoords, roughness, iors[ i ] );\n\t\t\t\ttransmittedLight[ i ] = transmissionSample[ i ];\n\t\t\t\ttransmittedLight.a += transmissionSample.a;\n\t\t\t\ttransmittance[ i ] = diffuseColor[ i ] * volumeAttenuation( length( transmissionRay ), attenuationColor, attenuationDistance )[ i ];\n\t\t\t}\n\t\t\ttransmittedLight.a /= 3.0;\n\t\t\n\t\t#else\n\t\t\n\t\t\tvec3 transmissionRay = getVolumeTransmissionRay( n, v, thickness, ior, modelMatrix );\n\t\t\tvec3 refractedRayExit = position + transmissionRay;\n\t\t\tvec4 ndcPos = projMatrix * viewMatrix * vec4( refractedRayExit, 1.0 );\n\t\t\tvec2 refractionCoords = ndcPos.xy / ndcPos.w;\n\t\t\trefractionCoords += 1.0;\n\t\t\trefractionCoords /= 2.0;\n\t\t\ttransmittedLight = getTransmissionSample( refractionCoords, roughness, ior );\n\t\t\ttransmittance = diffuseColor * volumeAttenuation( length( transmissionRay ), attenuationColor, attenuationDistance );\n\t\t\n\t\t#endif\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#elif DEPTH_PACKING == 3202\n\t\tgl_FragColor = vec4( packDepthToRGB( fragCoordZ ), 1.0 );\n\t#elif DEPTH_PACKING == 3203\n\t\tgl_FragColor = vec4( packDepthToRG( fragCoordZ ), 0.0, 1.0 );\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_DISPERSION\n\tuniform float dispersion;\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}"},Qe={common:{diffuse:{value:new qe(16777215)},opacity:{value:1},map:{value:null},mapTransform:{value:new wn},alphaMap:{value:null},alphaMapTransform:{value:new wn},alphaTest:{value:0}},specularmap:{specularMap:{value:null},specularMapTransform:{value:new wn}},envmap:{envMap:{value:null},envMapRotation:{value:new wn},flipEnvMap:{value:-1},reflectivity:{value:1},ior:{value:1.5},refractionRatio:{value:.98}},aomap:{aoMap:{value:null},aoMapIntensity:{value:1},aoMapTransform:{value:new wn}},lightmap:{lightMap:{value:null},lightMapIntensity:{value:1},lightMapTransform:{value:new wn}},bumpmap:{bumpMap:{value:null},bumpMapTransform:{value:new wn},bumpScale:{value:1}},normalmap:{normalMap:{value:null},normalMapTransform:{value:new wn},normalScale:{value:new xe(1,1)}},displacementmap:{displacementMap:{value:null},displacementMapTransform:{value:new wn},displacementScale:{value:1},displacementBias:{value:0}},emissivemap:{emissiveMap:{value:null},emissiveMapTransform:{value:new wn}},metalnessmap:{metalnessMap:{value:null},metalnessMapTransform:{value:new wn}},roughnessmap:{roughnessMap:{value:null},roughnessMapTransform:{value:new wn}},gradientmap:{gradientMap:{value:null}},fog:{fogDensity:{value:25e-5},fogNear:{value:1},fogFar:{value:2e3},fogColor:{value:new qe(16777215)}},lights:{ambientLightColor:{value:[]},lightProbe:{value:[]},directionalLights:{value:[],properties:{direction:{},color:{}}},directionalLightShadows:{value:[],properties:{shadowIntensity:1,shadowBias:{},shadowNormalBias:{},shadowRadius:{},shadowMapSize:{}}},directionalShadowMap:{value:[]},directionalShadowMatrix:{value:[]},spotLights:{value:[],properties:{color:{},position:{},direction:{},distance:{},coneCos:{},penumbraCos:{},decay:{}}},spotLightShadows:{value:[],properties:{shadowIntensity:1,shadowBias:{},shadowNormalBias:{},shadowRadius:{},shadowMapSize:{}}},spotLightMap:{value:[]},spotShadowMap:{value:[]},spotLightMatrix:{value:[]},pointLights:{value:[],properties:{color:{},position:{},decay:{},distance:{}}},pointLightShadows:{value:[],properties:{shadowIntensity:1,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 qe(16777215)},opacity:{value:1},size:{value:1},scale:{value:1},map:{value:null},alphaMap:{value:null},alphaMapTransform:{value:new wn},alphaTest:{value:0},uvTransform:{value:new wn}},sprite:{diffuse:{value:new qe(16777215)},opacity:{value:1},center:{value:new xe(.5,.5)},rotation:{value:0},map:{value:null},mapTransform:{value:new wn},alphaMap:{value:null},alphaMapTransform:{value:new wn},alphaTest:{value:0}}},cc={basic:{uniforms:uo([Qe.common,Qe.specularmap,Qe.envmap,Qe.aomap,Qe.lightmap,Qe.fog]),vertexShader:Cn.meshbasic_vert,fragmentShader:Cn.meshbasic_frag},lambert:{uniforms:uo([Qe.common,Qe.specularmap,Qe.envmap,Qe.aomap,Qe.lightmap,Qe.emissivemap,Qe.bumpmap,Qe.normalmap,Qe.displacementmap,Qe.fog,Qe.lights,{emissive:{value:new qe(0)}}]),vertexShader:Cn.meshlambert_vert,fragmentShader:Cn.meshlambert_frag},phong:{uniforms:uo([Qe.common,Qe.specularmap,Qe.envmap,Qe.aomap,Qe.lightmap,Qe.emissivemap,Qe.bumpmap,Qe.normalmap,Qe.displacementmap,Qe.fog,Qe.lights,{emissive:{value:new qe(0)},specular:{value:new qe(1118481)},shininess:{value:30}}]),vertexShader:Cn.meshphong_vert,fragmentShader:Cn.meshphong_frag},standard:{uniforms:uo([Qe.common,Qe.envmap,Qe.aomap,Qe.lightmap,Qe.emissivemap,Qe.bumpmap,Qe.normalmap,Qe.displacementmap,Qe.roughnessmap,Qe.metalnessmap,Qe.fog,Qe.lights,{emissive:{value:new qe(0)},roughness:{value:1},metalness:{value:0},envMapIntensity:{value:1}}]),vertexShader:Cn.meshphysical_vert,fragmentShader:Cn.meshphysical_frag},toon:{uniforms:uo([Qe.common,Qe.aomap,Qe.lightmap,Qe.emissivemap,Qe.bumpmap,Qe.normalmap,Qe.displacementmap,Qe.gradientmap,Qe.fog,Qe.lights,{emissive:{value:new qe(0)}}]),vertexShader:Cn.meshtoon_vert,fragmentShader:Cn.meshtoon_frag},matcap:{uniforms:uo([Qe.common,Qe.bumpmap,Qe.normalmap,Qe.displacementmap,Qe.fog,{matcap:{value:null}}]),vertexShader:Cn.meshmatcap_vert,fragmentShader:Cn.meshmatcap_frag},points:{uniforms:uo([Qe.points,Qe.fog]),vertexShader:Cn.points_vert,fragmentShader:Cn.points_frag},dashed:{uniforms:uo([Qe.common,Qe.fog,{scale:{value:1},dashSize:{value:1},totalSize:{value:2}}]),vertexShader:Cn.linedashed_vert,fragmentShader:Cn.linedashed_frag},depth:{uniforms:uo([Qe.common,Qe.displacementmap]),vertexShader:Cn.depth_vert,fragmentShader:Cn.depth_frag},normal:{uniforms:uo([Qe.common,Qe.bumpmap,Qe.normalmap,Qe.displacementmap,{opacity:{value:1}}]),vertexShader:Cn.meshnormal_vert,fragmentShader:Cn.meshnormal_frag},sprite:{uniforms:uo([Qe.sprite,Qe.fog]),vertexShader:Cn.sprite_vert,fragmentShader:Cn.sprite_frag},background:{uniforms:{uvTransform:{value:new wn},t2D:{value:null},backgroundIntensity:{value:1}},vertexShader:Cn.background_vert,fragmentShader:Cn.background_frag},backgroundCube:{uniforms:{envMap:{value:null},flipEnvMap:{value:-1},backgroundBlurriness:{value:0},backgroundIntensity:{value:1},backgroundRotation:{value:new wn}},vertexShader:Cn.backgroundCube_vert,fragmentShader:Cn.backgroundCube_frag},cube:{uniforms:{tCube:{value:null},tFlip:{value:-1},opacity:{value:1}},vertexShader:Cn.cube_vert,fragmentShader:Cn.cube_frag},equirect:{uniforms:{tEquirect:{value:null}},vertexShader:Cn.equirect_vert,fragmentShader:Cn.equirect_frag},distanceRGBA:{uniforms:uo([Qe.common,Qe.displacementmap,{referencePosition:{value:new O},nearDistance:{value:1},farDistance:{value:1e3}}]),vertexShader:Cn.distanceRGBA_vert,fragmentShader:Cn.distanceRGBA_frag},shadow:{uniforms:uo([Qe.lights,Qe.fog,{color:{value:new qe(0)},opacity:{value:1}}]),vertexShader:Cn.shadow_vert,fragmentShader:Cn.shadow_frag}};cc.physical={uniforms:uo([cc.standard.uniforms,{clearcoat:{value:0},clearcoatMap:{value:null},clearcoatMapTransform:{value:new wn},clearcoatNormalMap:{value:null},clearcoatNormalMapTransform:{value:new wn},clearcoatNormalScale:{value:new xe(1,1)},clearcoatRoughness:{value:0},clearcoatRoughnessMap:{value:null},clearcoatRoughnessMapTransform:{value:new wn},dispersion:{value:0},iridescence:{value:0},iridescenceMap:{value:null},iridescenceMapTransform:{value:new wn},iridescenceIOR:{value:1.3},iridescenceThicknessMinimum:{value:100},iridescenceThicknessMaximum:{value:400},iridescenceThicknessMap:{value:null},iridescenceThicknessMapTransform:{value:new wn},sheen:{value:0},sheenColor:{value:new qe(0)},sheenColorMap:{value:null},sheenColorMapTransform:{value:new wn},sheenRoughness:{value:1},sheenRoughnessMap:{value:null},sheenRoughnessMapTransform:{value:new wn},transmission:{value:0},transmissionMap:{value:null},transmissionMapTransform:{value:new wn},transmissionSamplerSize:{value:new xe},transmissionSamplerMap:{value:null},thickness:{value:0},thicknessMap:{value:null},thicknessMapTransform:{value:new wn},attenuationDistance:{value:0},attenuationColor:{value:new qe(0)},specularColor:{value:new qe(1,1,1)},specularColorMap:{value:null},specularColorMapTransform:{value:new wn},specularIntensity:{value:1},specularIntensityMap:{value:null},specularIntensityMapTransform:{value:new wn},anisotropyVector:{value:new xe},anisotropyMap:{value:null},anisotropyMapTransform:{value:new wn}}]),vertexShader:Cn.meshphysical_vert,fragmentShader:Cn.meshphysical_frag};const lS={r:0,b:0,g:0},lf=new id,Mce=new Nt;function Cce(i,t,e,n,r,s,o){const a=new qe(0);let c,d,l=!0===s?0:1,h=null,p=0,m=null;function g(M){let x=!0===M.isScene?M.background:null;return x&&x.isTexture&&(x=(M.backgroundBlurriness>0?e:t).get(x)),x}function y(M,x){M.getRGB(lS,Z4(i)),n.buffers.color.setClear(lS.r,lS.g,lS.b,x,o)}return{getClearColor:function(){return a},setClearColor:function(M,x=1){a.set(M),l=x,y(a,l)},getClearAlpha:function(){return l},setClearAlpha:function(M){l=M,y(a,l)},render:function b(M){let x=!1;const C=g(M);null===C?y(a,l):C&&C.isColor&&(y(C,1),x=!0);const F=i.xr.getEnvironmentBlendMode();"additive"===F?n.buffers.color.setClear(0,0,0,1,o):"alpha-blend"===F&&n.buffers.color.setClear(0,0,0,0,o),(i.autoClear||x)&&(n.buffers.depth.setTest(!0),n.buffers.depth.setMask(!0),n.buffers.color.setMask(!0),i.clear(i.autoClearColor,i.autoClearDepth,i.autoClearStencil))},addToRenderList:function v(M,x){const C=g(x);C&&(C.isCubeTexture||C.mapping===mb)?(void 0===d&&(d=new Mn(new rf(1,1,1),new Cl({name:"BackgroundCubeMaterial",uniforms:Sg(cc.backgroundCube.uniforms),vertexShader:cc.backgroundCube.vertexShader,fragmentShader:cc.backgroundCube.fragmentShader,side:Io,depthTest:!1,depthWrite:!1,fog:!1})),d.geometry.deleteAttribute("normal"),d.geometry.deleteAttribute("uv"),d.onBeforeRender=function(F,D,k){this.matrixWorld.copyPosition(k.matrixWorld)},Object.defineProperty(d.material,"envMap",{get:function(){return this.uniforms.envMap.value}}),r.update(d)),lf.copy(x.backgroundRotation),lf.x*=-1,lf.y*=-1,lf.z*=-1,C.isCubeTexture&&!1===C.isRenderTargetTexture&&(lf.y*=-1,lf.z*=-1),d.material.uniforms.envMap.value=C,d.material.uniforms.flipEnvMap.value=C.isCubeTexture&&!1===C.isRenderTargetTexture?-1:1,d.material.uniforms.backgroundBlurriness.value=x.backgroundBlurriness,d.material.uniforms.backgroundIntensity.value=x.backgroundIntensity,d.material.uniforms.backgroundRotation.value.setFromMatrix4(Mce.makeRotationFromEuler(lf)),d.material.toneMapped=Jn.getTransfer(C.colorSpace)!==Fi,(h!==C||p!==C.version||m!==i.toneMapping)&&(d.material.needsUpdate=!0,h=C,p=C.version,m=i.toneMapping),d.layers.enableAll(),M.unshift(d,d.geometry,d.material,0,0,null)):C&&C.isTexture&&(void 0===c&&(c=new Mn(new Iu(2,2),new Cl({name:"BackgroundMaterial",uniforms:Sg(cc.background.uniforms),vertexShader:cc.background.vertexShader,fragmentShader:cc.background.fragmentShader,side:ac,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=C,c.material.uniforms.backgroundIntensity.value=x.backgroundIntensity,c.material.toneMapped=Jn.getTransfer(C.colorSpace)!==Fi,!0===C.matrixAutoUpdate&&C.updateMatrix(),c.material.uniforms.uvTransform.value.copy(C.matrix),(h!==C||p!==C.version||m!==i.toneMapping)&&(c.material.needsUpdate=!0,h=C,p=C.version,m=i.toneMapping),c.layers.enableAll(),M.unshift(c,c.geometry,c.material,0,0,null))}}}function Sce(i,t){const e=i.getParameter(i.MAX_VERTEX_ATTRIBS),n={},r=p(null);let s=r,o=!1;function c(A){return i.bindVertexArray(A)}function d(A){return i.deleteVertexArray(A)}function p(A){const $=[],ie=[],ne=[];for(let se=0;se=0){const Ne=se[J];let Ye=ge[J];if(void 0===Ye&&("instanceMatrix"===J&&A.instanceMatrix&&(Ye=A.instanceMatrix),"instanceColor"===J&&A.instanceColor&&(Ye=A.instanceColor)),void 0===Ne||Ne.attribute!==Ye||Ye&&Ne.data!==Ye.data)return!0;q++}return s.attributesNum!==q||s.index!==ne}(A,ne,ie,se),ge&&function g(A,$,ie,ne){const se={},ge=$.attributes;let q=0;const re=ie.getAttributes();for(const J in re)if(re[J].location>=0){let Ne=ge[J];void 0===Ne&&("instanceMatrix"===J&&A.instanceMatrix&&(Ne=A.instanceMatrix),"instanceColor"===J&&A.instanceColor&&(Ne=A.instanceColor));const Ye={};Ye.attribute=Ne,Ne&&Ne.data&&(Ye.data=Ne.data),se[J]=Ye,q++}s.attributes=se,s.attributesNum=q,s.index=ne}(A,ne,ie,se),null!==se&&t.update(se,i.ELEMENT_ARRAY_BUFFER),(ge||o)&&(o=!1,function C(A,$,ie,ne){b();const se=ne.attributes,ge=ie.getAttributes(),q=$.defaultAttributeValues;for(const re in ge){const J=ge[re];if(J.location>=0){let we=se[re];if(void 0===we&&("instanceMatrix"===re&&A.instanceMatrix&&(we=A.instanceMatrix),"instanceColor"===re&&A.instanceColor&&(we=A.instanceColor)),void 0!==we){const Ne=we.normalized,Ye=we.itemSize,It=t.get(we);if(void 0===It)continue;const en=It.buffer,ae=It.type,Oe=It.bytesPerElement,Ze=ae===i.INT||ae===i.UNSIGNED_INT||we.gpuType===uk;if(we.isInterleavedBufferAttribute){const Fe=we.data,bt=Fe.stride,St=we.offset;if(Fe.isInstancedInterleavedBuffer){for(let Mt=0;Mt0&&i.getShaderPrecisionFormat(i.FRAGMENT_SHADER,i.HIGH_FLOAT).precision>0)return"highp";D="mediump"}return"mediump"===D&&i.getShaderPrecisionFormat(i.VERTEX_SHADER,i.MEDIUM_FLOAT).precision>0&&i.getShaderPrecisionFormat(i.FRAGMENT_SHADER,i.MEDIUM_FLOAT).precision>0?"mediump":"lowp"}let c=void 0!==e.precision?e.precision:"highp";const d=l(c);d!==c&&(console.warn("THREE.WebGLRenderer:",c,"not supported, using",d,"instead."),c=d);const h=!0===e.logarithmicDepthBuffer,p=i.getParameter(i.MAX_TEXTURE_IMAGE_UNITS),m=i.getParameter(i.MAX_VERTEX_TEXTURE_IMAGE_UNITS);return{isWebGL2:!0,getMaxAnisotropy:function s(){if(void 0!==r)return r;if(!0===t.has("EXT_texture_filter_anisotropic")){const D=t.get("EXT_texture_filter_anisotropic");r=i.getParameter(D.MAX_TEXTURE_MAX_ANISOTROPY_EXT)}else r=0;return r},getMaxPrecision:l,textureFormatReadable:function o(D){return!(D!==Ro&&n.convert(D)!==i.getParameter(i.IMPLEMENTATION_COLOR_READ_FORMAT))},textureTypeReadable:function a(D){const k=D===Jm&&(t.has("EXT_color_buffer_half_float")||t.has("EXT_color_buffer_float"));return!(D!==Jc&&n.convert(D)!==i.getParameter(i.IMPLEMENTATION_COLOR_READ_TYPE)&&D!==Qo&&!k)},precision:c,logarithmicDepthBuffer:h,maxTextures:p,maxVertexTextures:m,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:m>0,maxSamples:i.getParameter(i.MAX_SAMPLES)}}function Dce(i){const t=this;let e=null,n=0,r=!1,s=!1;const o=new sf,a=new wn,l={value:null,needsUpdate:!1};function d(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=d(g,p,x,m);for(let F=0;F!==x;++F)C[F]=e[F];y.clippingState=C,this.numIntersection=b?this.numPlanes:0,this.numPlanes+=M}}}function Tce(i){let t=new WeakMap;function e(o,a){return a===AC?o.mapping=lc:a===DC&&(o.mapping=Zh),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===AC||a===DC){if(t.has(o))return e(t.get(o).texture,o.mapping);{const l=o.image;if(l&&l.height>0){const c=new bae(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 Ib extends fP{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,d=(this.top-this.bottom)/this.view.fullHeight/this.zoom;s+=c*this.view.offsetX,o=s+c*this.view.width,a-=d*this.view.offsetY,l=a-d*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 n5=[.125,.215,.35,.446,.526,.582],mP=new Ib,r5=new qe;let gP=null,_P=0,vP=0,yP=!1;const df=(1+Math.sqrt(5))/2,Tg=1/df,s5=[new O(-df,Tg,0),new O(df,Tg,0),new O(-Tg,0,df),new O(Tg,0,df),new O(0,df,-Tg),new O(0,df,Tg),new O(-1,1,-1),new O(1,1,-1),new O(-1,1,1),new O(1,1,1)];class o5{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){gP=this._renderer.getRenderTarget(),_P=this._renderer.getActiveCubeFace(),vP=this._renderer.getActiveMipmapLevel(),yP=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=c5(),this._compileMaterial(this._cubemapMaterial))}compileEquirectangularShader(){null===this._equirectMaterial&&(this._equirectMaterial=l5(),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=n5[o-i+4-1]:0===o&&(l=0),n.push(l);const c=1/(a-2),d=-c,h=1+c,p=[d,d,h,d,h,h,d,d,h,h,d,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 D=0;D2?0:-1;M.set([k,B,0,k+2/3,B,0,k+2/3,B+1,0,k,B,0,k+2/3,B+1,0,k,B+1,0],b*g*D),x.set(p,v*g*D),C.set([D,D,D,D,D,D],y*g*D)}const F=new hn;F.setAttribute("position",new Hi(M,b)),F.setAttribute("uv",new Hi(x,v)),F.setAttribute("faceIndex",new Hi(C,y)),t.push(F),r>4&&r--}return{lodPlanes:t,sizeLods:e,sigmas:n}}(s)),this._blurMaterial=function Rce(i,t,e){const n=new Float32Array(20),r=new O(0,1,0);return new Cl({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:Qc,depthTest:!1,depthWrite:!1})}(s,t,e)}return r}_compileMaterial(t){const e=new Mn(this._lodPlanes[0],t);this._renderer.compile(e,mP)}_sceneToCubeUV(t,e,n,r){const a=new yr(90,1,e,n),l=[1,-1,1,1,1,1],c=[1,1,1,-1,-1,-1],d=this._renderer,h=d.autoClear,p=d.toneMapping;d.getClearColor(r5),d.toneMapping=bu,d.autoClear=!1;const m=new qi({name:"PMREM.Background",side:Io,depthWrite:!1,depthTest:!1}),g=new Mn(new rf,m);let b=!1;const v=t.background;v?v.isColor&&(m.color.copy(v),t.background=null,b=!0):(m.color.copy(r5),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;cS(r,M*x,y>2?x:0,x,x),d.setRenderTarget(r),b&&d.render(g,a),d.render(t,a)}g.geometry.dispose(),g.material.dispose(),d.toneMapping=p,d.autoClear=h,t.background=v}_textureToCubeUV(t,e){const n=this._renderer,r=t.mapping===lc||t.mapping===Zh;r?(null===this._cubemapMaterial&&(this._cubemapMaterial=c5()),this._cubemapMaterial.uniforms.flipEnvMap.value=!1===t.isRenderTargetTexture?-1:1):null===this._equirectMaterial&&(this._equirectMaterial=l5());const s=r?this._cubemapMaterial:this._equirectMaterial,o=new Mn(this._lodPlanes[0],s);s.uniforms.envMap.value=t;const l=this._cubeSize;cS(e,0,0,3*l,2*l),n.setRenderTarget(e),n.render(o,mP)}_applyPMREM(t){const e=this._renderer,n=e.autoClear;e.autoClear=!1;const r=this._lodPlanes.length;for(let s=1;s20&&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 k=0;k<20;++k){const B=k/b,T=Math.exp(-B*B/2);y.push(T),0===k?M+=T:kx-4?r-x+4:0),4*(this._cubeSize-C),3*C,2*C),l.setRenderTarget(e),l.render(h,mP)}}function a5(i,t,e){const n=new Mu(i,t,e);return n.texture.mapping=mb,n.texture.name="PMREM.cubeUv",n.scissorTest=!0,n}function cS(i,t,e,n,r){i.viewport.set(t,e,n,r),i.scissor.set(t,e,n,r)}function l5(){return new Cl({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:Qc,depthTest:!1,depthWrite:!1})}function c5(){return new Cl({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:Qc,depthTest:!1,depthWrite:!1})}function kce(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===AC||l===DC,d=l===lc||l===Zh;if(c||d){let h=t.get(a);if(a.isRenderTargetTexture&&a.pmremVersion!==(void 0!==h?h.texture.pmremVersion:0))return null===e&&(e=new o5(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||d&&m&&function r(a){let l=0;for(let d=0;d<6;d++)void 0!==a[d]&&l++;return 6===l}(m)?(null===e&&(e=new o5(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 Pce(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&&cg("THREE.WebGLRenderer: "+n+" extension not supported."),r}}}function Oce(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&&(F=Math.ceil(C/t.maxTextureSize),C=t.maxTextureSize);const D=new Float32Array(C*F*4*h),k=new Zk(D,C,F,h);k.type=Qo,k.needsUpdate=!0;const B=4*x;for(let A=0;A0)return i;const r=t*e;let s=g5[r];if(void 0===s&&(s=new Float32Array(r),g5[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 Fr(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 Pde(i,t){const e=function kde(i){const t=Jn.getPrimaries(Jn.workingColorSpace),e=Jn.getPrimaries(i);let n;switch(t===e?n="":t===UC&&e===BC?n="LinearDisplayP3ToLinearSRGB":t===BC&&e===UC&&(n="LinearSRGBToLinearDisplayP3"),i){case ds:case LC:return[n,"LinearTransferOETF"];case cs:case jk: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 Ode(i,t){let e;switch(t){case hoe:e="Linear";break;case foe:e="Reinhard";break;case poe:e="OptimizedCineon";break;case moe:e="ACESFilmic";break;case _oe:e="AgX";break;case voe:e="Neutral";break;case goe:e="Custom";break;default:console.warn("THREE.WebGLProgram: Unsupported toneMapping:",t),e="Linear"}return"vec3 "+i+"( vec3 color ) { return "+e+"ToneMapping( color ); }"}const hS=new O;function Rb(i){return""!==i}function C5(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 S5(i,t){return i.replace(/NUM_CLIPPING_PLANES/g,t.numClippingPlanes).replace(/UNION_CLIPPING_PLANES/g,t.numClippingPlanes-t.numClipIntersection)}const Ude=/^[ \t]*#include +<([\w\d./]+)>/gm;function wP(i){return i.replace(Ude,zde)}const Vde=new Map;function zde(i,t){let e=Cn[t];if(void 0===e){const n=Vde.get(t);if(void 0===n)throw new Error("Can not resolve #include <"+t+">");e=Cn[n],console.warn('THREE.WebGLRenderer: Shader chunk "%s" has been deprecated. Use "%s" instead.',t,n)}return wP(e)}const Hde=/#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 E5(i){return i.replace(Hde,Gde)}function Gde(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(Rb).join("\n"),y.length>0&&(y+="\n")):(v=[A5(e),"#define SHADER_TYPE "+e.shaderType,"#define SHADER_NAME "+e.shaderName,g,e.extensionClipCullDistance?"#define USE_CLIP_DISTANCE":"",e.batching?"#define USE_BATCHING":"",e.batchingColor?"#define USE_BATCHING_COLOR":"",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 "+d:"",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_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.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","#ifdef USE_SKINNING","\tattribute vec4 skinIndex;","\tattribute vec4 skinWeight;","#endif","\n"].filter(Rb).join("\n"),y=[A5(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 "+d:"",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.dispersion?"#define USE_DISPERSION":"",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||e.batchingColor?"#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.decodeVideoTexture?"#define DECODE_VIDEO_TEXTURE":"",e.logarithmicDepthBuffer?"#define USE_LOGDEPTHBUF":"","uniform mat4 viewMatrix;","uniform vec3 cameraPosition;","uniform bool isOrthographic;",e.toneMapping!==bu?"#define TONE_MAPPING":"",e.toneMapping!==bu?Cn.tonemapping_pars_fragment:"",e.toneMapping!==bu?Ode("toneMapping",e.toneMapping):"",e.dithering?"#define DITHERING":"",e.opaque?"#define OPAQUE":"",Cn.colorspace_pars_fragment,Pde("linearToOutputTexel",e.outputColorSpace),(Jn.getLuminanceCoefficients(hS),["float luminance( const in vec3 rgb ) {",`\tconst vec3 weights = vec3( ${hS.x.toFixed(4)}, ${hS.y.toFixed(4)}, ${hS.z.toFixed(4)} );`,"\treturn dot( weights, rgb );","}"].join("\n")),e.useDepthPacking?"#define DEPTH_PACKING "+e.depthPacking:"","\n"].filter(Rb).join("\n")),o=wP(o),o=C5(o,e),o=S5(o,e),a=wP(a),a=C5(a,e),a=S5(a,e),o=E5(o),a=E5(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===A4?"":"layout(location = 0) out highp vec4 pc_fragColor;",e.glslVersion===A4?"":"#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,F=w5(r,r.VERTEX_SHADER,M+v+o),D=w5(r,r.FRAGMENT_SHADER,C);function k($){if(i.debug.checkShaderErrors){const ie=r.getProgramInfoLog(b).trim(),ne=r.getShaderInfoLog(F).trim(),se=r.getShaderInfoLog(D).trim();let ge=!0,q=!0;if(!1===r.getProgramParameter(b,r.LINK_STATUS))if(ge=!1,"function"==typeof i.debug.onShaderError)i.debug.onShaderError(r,b,F,D);else{const re=M5(r,F,"vertex"),J=M5(r,D,"fragment");console.error("THREE.WebGLProgram: Shader Error "+r.getError()+" - VALIDATE_STATUS "+r.getProgramParameter(b,r.VALIDATE_STATUS)+"\n\nMaterial Name: "+$.name+"\nMaterial Type: "+$.type+"\n\nProgram Info Log: "+ie+"\n"+re+"\n"+J)}else""!==ie?console.warn("THREE.WebGLProgram: Program Info Log:",ie):(""===ne||""===se)&&(q=!1);q&&($.diagnostics={runnable:ge,programLog:ie,vertexShader:{log:ne,prefix:v},fragmentShader:{log:se,prefix:y}})}r.deleteShader(F),r.deleteShader(D),B=new uS(r,b),T=function Bde(i,t){const e={},n=i.getProgramParameter(t,i.ACTIVE_ATTRIBUTES);for(let r=0;r0,ce=T.clearcoat>0,Te=T.iridescence>0,Ae=T.sheen>0,Bt=T.transmission>0,Je=R&&!!T.anisotropyMap,ut=ce&&!!T.clearcoatMap,bn=ce&&!!T.clearcoatNormalMap,ze=ce&&!!T.clearcoatRoughnessMap,dt=Te&&!!T.iridescenceMap,jn=Te&&!!T.iridescenceThicknessMap,ln=Ae&&!!T.sheenColorMap,_t=Ae&&!!T.sheenRoughnessMap,vn=!!T.specularMap,Pn=!!T.specularColorMap,Ki=!!T.specularIntensityMap,Z=Bt&&!!T.transmissionMap,$e=Bt&&!!T.thicknessMap,Ee=!!T.alphaMap,ei=!!T.extensions;let br=bu;T.toneMapped&&(null===Fe||!0===Fe.isXRRenderTarget)&&(br=i.toneMapping);const hs={shaderID:we,shaderType:T.type,shaderName:T.name,vertexShader:en,fragmentShader:ae,defines:T.defines,customVertexShaderID:Oe,customFragmentShaderID:Ze,isRawShaderMaterial:!0===T.isRawShaderMaterial,glslVersion:T.glslVersion,precision:m,batching:St,batchingColor:St&&null!==ne._colorsTexture,instancing:bt,instancingColor:bt&&null!==ne.instanceColor,instancingMorph:bt&&null!==ne.morphTexture,supportsVertexTextures:p,outputColorSpace:null===Fe?i.outputColorSpace:!0===Fe.isXRRenderTarget?Fe.texture.colorSpace:ds,alphaToCoverage:!!T.alphaToCoverage,map:Mt,matcap:!!T.matcap,envMap:N,envMapMode:N&&re.mapping,envMapCubeUVHeight:J,aoMap:Ge,lightMap:Le,bumpMap:nt,normalMap:Me,displacementMap:p&&Gt,emissiveMap:it,normalMapObjectSpace:Me&&T.normalMapType===Eoe,normalMapTangentSpace:Me&&T.normalMapType===Qh,metalnessMap:pt,roughnessMap:z,anisotropy:R,anisotropyMap:Je,clearcoat:ce,clearcoatMap:ut,clearcoatNormalMap:bn,clearcoatRoughnessMap:ze,dispersion:T.dispersion>0,iridescence:Te,iridescenceMap:dt,iridescenceThicknessMap:jn,sheen:Ae,sheenColorMap:ln,sheenRoughnessMap:_t,specularMap:vn,specularColorMap:Pn,specularIntensityMap:Ki,transmission:Bt,transmissionMap:Z,thicknessMap:$e,gradientMap:!!T.gradientMap,opaque:!1===T.transparent&&T.blending===Zm&&!1===T.alphaToCoverage,alphaMap:Ee,alphaTest:T.alphaTest>0,alphaHash:!!T.alphaHash,combine:T.combine,mapUv:Mt&&b(T.map.channel),aoMapUv:Ge&&b(T.aoMap.channel),lightMapUv:Le&&b(T.lightMap.channel),bumpMapUv:nt&&b(T.bumpMap.channel),normalMapUv:Me&&b(T.normalMap.channel),displacementMapUv:Gt&&b(T.displacementMap.channel),emissiveMapUv:it&&b(T.emissiveMap.channel),metalnessMapUv:pt&&b(T.metalnessMap.channel),roughnessMapUv:z&&b(T.roughnessMap.channel),anisotropyMapUv:Je&&b(T.anisotropyMap.channel),clearcoatMapUv:ut&&b(T.clearcoatMap.channel),clearcoatNormalMapUv:bn&&b(T.clearcoatNormalMap.channel),clearcoatRoughnessMapUv:ze&&b(T.clearcoatRoughnessMap.channel),iridescenceMapUv:dt&&b(T.iridescenceMap.channel),iridescenceThicknessMapUv:jn&&b(T.iridescenceThicknessMap.channel),sheenColorMapUv:ln&&b(T.sheenColorMap.channel),sheenRoughnessMapUv:_t&&b(T.sheenRoughnessMap.channel),specularMapUv:vn&&b(T.specularMap.channel),specularColorMapUv:Pn&&b(T.specularColorMap.channel),specularIntensityMapUv:Ki&&b(T.specularIntensityMap.channel),transmissionMapUv:Z&&b(T.transmissionMap.channel),thicknessMapUv:$e&&b(T.thicknessMap.channel),alphaMapUv:Ee&&b(T.alphaMap.channel),vertexTangents:!!ge.attributes.tangent&&(Me||R),vertexColors:T.vertexColors,vertexAlphas:!0===T.vertexColors&&!!ge.attributes.color&&4===ge.attributes.color.itemSize,pointsUvs:!0===ne.isPoints&&!!ge.attributes.uv&&(Mt||Ee),fog:!!se,useFog:!0===T.fog,fogExp2:!!se&&se.isFogExp2,flatShading:!0===T.flatShading,sizeAttenuation:!0===T.sizeAttenuation,logarithmicDepthBuffer:h,skinning:!0===ne.isSkinnedMesh,morphTargets:void 0!==ge.morphAttributes.position,morphNormals:void 0!==ge.morphAttributes.normal,morphColors:void 0!==ge.morphAttributes.color,morphTargetsCount:Ye,morphTextureStride:It,numDirLights:A.directional.length,numPointLights:A.point.length,numSpotLights:A.spot.length,numSpotLightMaps:A.spotLightMap.length,numRectAreaLights:A.rectArea.length,numHemiLights:A.hemi.length,numDirLightShadows:A.directionalShadowMap.length,numPointLightShadows:A.pointShadowMap.length,numSpotLightShadows:A.spotShadowMap.length,numSpotLightShadowsWithMaps:A.numSpotLightShadowsWithMaps,numLightProbes:A.numLightProbes,numClippingPlanes:o.numPlanes,numClipIntersection:o.numIntersection,dithering:T.dithering,shadowMapEnabled:i.shadowMap.enabled&&$.length>0,shadowMapType:i.shadowMap.type,toneMapping:br,decodeVideoTexture:Mt&&!0===T.map.isVideoTexture&&Jn.getTransfer(T.map.colorSpace)===Fi,premultipliedAlpha:T.premultipliedAlpha,doubleSided:T.side===Ls,flipSided:T.side===Io,useDepthPacking:T.depthPacking>=0,depthPacking:T.depthPacking||0,index0AttributeName:T.index0AttributeName,extensionClipCullDistance:ei&&!0===T.extensions.clipCullDistance&&n.has("WEBGL_clip_cull_distance"),extensionMultiDraw:(ei&&!0===T.extensions.multiDraw||St)&&n.has("WEBGL_multi_draw"),rendererExtensionParallelShaderCompile:n.has("KHR_parallel_shader_compile"),customProgramCacheKey:T.customProgramCacheKey()};return hs.vertexUv1s=c.has(1),hs.vertexUv2s=c.has(2),hs.vertexUv3s=c.has(3),c.clear(),hs},getProgramCacheKey:function y(T){const A=[];if(T.shaderID?A.push(T.shaderID):(A.push(T.customVertexShaderID),A.push(T.customFragmentShaderID)),void 0!==T.defines)for(const $ in T.defines)A.push($),A.push(T.defines[$]);return!1===T.isRawShaderMaterial&&(function M(T,A){T.push(A.precision),T.push(A.outputColorSpace),T.push(A.envMapMode),T.push(A.envMapCubeUVHeight),T.push(A.mapUv),T.push(A.alphaMapUv),T.push(A.lightMapUv),T.push(A.aoMapUv),T.push(A.bumpMapUv),T.push(A.normalMapUv),T.push(A.displacementMapUv),T.push(A.emissiveMapUv),T.push(A.metalnessMapUv),T.push(A.roughnessMapUv),T.push(A.anisotropyMapUv),T.push(A.clearcoatMapUv),T.push(A.clearcoatNormalMapUv),T.push(A.clearcoatRoughnessMapUv),T.push(A.iridescenceMapUv),T.push(A.iridescenceThicknessMapUv),T.push(A.sheenColorMapUv),T.push(A.sheenRoughnessMapUv),T.push(A.specularMapUv),T.push(A.specularColorMapUv),T.push(A.specularIntensityMapUv),T.push(A.transmissionMapUv),T.push(A.thicknessMapUv),T.push(A.combine),T.push(A.fogExp2),T.push(A.sizeAttenuation),T.push(A.morphTargetsCount),T.push(A.morphAttributeCount),T.push(A.numDirLights),T.push(A.numPointLights),T.push(A.numSpotLights),T.push(A.numSpotLightMaps),T.push(A.numHemiLights),T.push(A.numRectAreaLights),T.push(A.numDirLightShadows),T.push(A.numPointLightShadows),T.push(A.numSpotLightShadows),T.push(A.numSpotLightShadowsWithMaps),T.push(A.numLightProbes),T.push(A.shadowMapType),T.push(A.toneMapping),T.push(A.numClippingPlanes),T.push(A.numClipIntersection),T.push(A.depthPacking)}(A,T),function x(T,A){a.disableAll(),A.supportsVertexTextures&&a.enable(0),A.instancing&&a.enable(1),A.instancingColor&&a.enable(2),A.instancingMorph&&a.enable(3),A.matcap&&a.enable(4),A.envMap&&a.enable(5),A.normalMapObjectSpace&&a.enable(6),A.normalMapTangentSpace&&a.enable(7),A.clearcoat&&a.enable(8),A.iridescence&&a.enable(9),A.alphaTest&&a.enable(10),A.vertexColors&&a.enable(11),A.vertexAlphas&&a.enable(12),A.vertexUv1s&&a.enable(13),A.vertexUv2s&&a.enable(14),A.vertexUv3s&&a.enable(15),A.vertexTangents&&a.enable(16),A.anisotropy&&a.enable(17),A.alphaHash&&a.enable(18),A.batching&&a.enable(19),A.dispersion&&a.enable(20),A.batchingColor&&a.enable(21),T.push(a.mask),a.disableAll(),A.fog&&a.enable(0),A.useFog&&a.enable(1),A.flatShading&&a.enable(2),A.logarithmicDepthBuffer&&a.enable(3),A.skinning&&a.enable(4),A.morphTargets&&a.enable(5),A.morphNormals&&a.enable(6),A.morphColors&&a.enable(7),A.premultipliedAlpha&&a.enable(8),A.shadowMapEnabled&&a.enable(9),A.doubleSided&&a.enable(10),A.flipSided&&a.enable(11),A.useDepthPacking&&a.enable(12),A.dithering&&a.enable(13),A.transmission&&a.enable(14),A.sheen&&a.enable(15),A.opaque&&a.enable(16),A.pointsUvs&&a.enable(17),A.decodeVideoTexture&&a.enable(18),A.alphaToCoverage&&a.enable(19),T.push(a.mask)}(A,T),A.push(i.outputColorSpace)),A.push(T.customProgramCacheKey),A.join()},getUniforms:function C(T){const A=g[T.type];let $;return $=A?Q4.clone(cc[A].uniforms):T.uniforms,$},acquireProgram:function F(T,A){let $;for(let ie=0,ne=d.length;ie0?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 d(){for(let h=t,p=i.length;h1&&e.sort(h||tue),n.length>1&&n.sort(p||D5),r.length>1&&r.sort(p||D5)}}}function nue(){let i=new WeakMap;return{get:function t(n,r){const s=i.get(n);let o;return void 0===s?(o=new T5,i.set(n,[o])):r>=s.length?(o=new T5,s.push(o)):o=s[r],o},dispose:function e(){i=new WeakMap}}}function iue(){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 O,color:new qe};break;case"SpotLight":e={position:new O,direction:new O,color:new qe,distance:0,coneCos:0,penumbraCos:0,decay:0};break;case"PointLight":e={position:new O,color:new qe,distance:0,decay:0};break;case"HemisphereLight":e={direction:new O,skyColor:new qe,groundColor:new qe};break;case"RectAreaLight":e={color:new qe,position:new O,halfWidth:new O,halfHeight:new O}}return i[t.id]=e,e}}}let sue=0;function oue(i,t){return(t.castShadow?2:0)-(i.castShadow?2:0)+(t.map?1:0)-(i.map?1:0)}function aue(i){const t=new iue,e=function rue(){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={shadowIntensity:1,shadowBias:0,shadowNormalBias:0,shadowRadius:1,shadowMapSize:new xe};break;case"PointLight":e={shadowIntensity:1,shadowBias:0,shadowNormalBias:0,shadowRadius:1,shadowMapSize:new xe,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 O);const r=new O,s=new Nt,o=new Nt;return{setup:function a(c){let d=0,h=0,p=0;for(let T=0;T<9;T++)n.probe[T].set(0,0,0);let m=0,g=0,b=0,v=0,y=0,M=0,x=0,C=0,F=0,D=0,k=0;c.sort(oue);for(let T=0,A=c.length;T0&&(!0===i.has("OES_texture_float_linear")?(n.rectAreaLTC1=Qe.LTC_FLOAT_1,n.rectAreaLTC2=Qe.LTC_FLOAT_2):(n.rectAreaLTC1=Qe.LTC_HALF_1,n.rectAreaLTC2=Qe.LTC_HALF_2)),n.ambient[0]=d,n.ambient[1]=h,n.ambient[2]=p;const B=n.hash;(B.directionalLength!==m||B.pointLength!==g||B.spotLength!==b||B.rectAreaLength!==v||B.hemiLength!==y||B.numDirectionalShadows!==M||B.numPointShadows!==x||B.numSpotShadows!==C||B.numSpotMaps!==F||B.numLightProbes!==k)&&(n.directional.length=m,n.spot.length=b,n.rectArea.length=v,n.point.length=g,n.hemi.length=y,n.directionalShadow.length=M,n.directionalShadowMap.length=M,n.pointShadow.length=x,n.pointShadowMap.length=x,n.spotShadow.length=C,n.spotShadowMap.length=C,n.directionalShadowMatrix.length=M,n.pointShadowMatrix.length=x,n.spotLightMatrix.length=C+F-D,n.spotLightMap.length=F,n.numSpotLightShadowsWithMaps=D,n.numLightProbes=k,B.directionalLength=m,B.pointLength=g,B.spotLength=b,B.rectAreaLength=v,B.hemiLength=y,B.numDirectionalShadows=M,B.numPointShadows=x,B.numSpotShadows=C,B.numSpotMaps=F,B.numLightProbes=k,n.version=sue++)},setupView:function l(c,d){let h=0,p=0,m=0,g=0,b=0;const v=d.matrixWorldInverse;for(let y=0,M=c.length;y=o.length?(a=new I5(i),o.push(a)):a=o[s],a},dispose:function n(){t=new WeakMap}}}class R5 extends Po{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 k5 extends Po{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 cue="void main() {\n\tgl_Position = vec4( position, 1.0 );\n}",due="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 uue(i,t,e){let n=new aS;const r=new xe,s=new xe,o=new gi,a=new R5({depthPacking:Soe}),l=new k5,c={},d=e.maxTextureSize,h={[ac]:Io,[Io]:ac,[Ls]:Ls},p=new Cl({defines:{VSM_SAMPLES:8},uniforms:{shadow_pass:{value:null},resolution:{value:new xe},radius:{value:4}},vertexShader:cue,fragmentShader:due}),m=p.clone();m.defines.HORIZONTAL_PASS=1;const g=new hn;g.setAttribute("position",new Hi(new Float32Array([-1,-1,.5,3,-1,.5,-1,3,.5]),3));const b=new Mn(g,p),v=this;this.enabled=!1,this.autoUpdate=!0,this.needsUpdate=!1,this.type=l4;let y=this.type;function M(D,k){const B=t.update(b);p.defines.VSM_SAMPLES!==D.blurSamples&&(p.defines.VSM_SAMPLES=D.blurSamples,m.defines.VSM_SAMPLES=D.blurSamples,p.needsUpdate=!0,m.needsUpdate=!0),null===D.mapPass&&(D.mapPass=new Mu(r.x,r.y)),p.uniforms.shadow_pass.value=D.map.texture,p.uniforms.resolution.value=D.mapSize,p.uniforms.radius.value=D.radius,i.setRenderTarget(D.mapPass),i.clear(),i.renderBufferDirect(k,null,B,p,b,null),m.uniforms.shadow_pass.value=D.mapPass.texture,m.uniforms.resolution.value=D.mapSize,m.uniforms.radius.value=D.radius,i.setRenderTarget(D.map),i.clear(),i.renderBufferDirect(k,null,B,m,b,null)}function x(D,k,B,T){let A=null;const $=!0===B.isPointLight?D.customDistanceMaterial:D.customDepthMaterial;if(void 0!==$)A=$;else if(A=!0===B.isPointLight?l:a,i.localClippingEnabled&&!0===k.clipShadows&&Array.isArray(k.clippingPlanes)&&0!==k.clippingPlanes.length||k.displacementMap&&0!==k.displacementScale||k.alphaMap&&k.alphaTest>0||k.map&&k.alphaTest>0){const ie=A.uuid,ne=k.uuid;let se=c[ie];void 0===se&&(se={},c[ie]=se);let ge=se[ne];void 0===ge&&(ge=A.clone(),se[ne]=ge,k.addEventListener("dispose",F)),A=ge}return A.visible=k.visible,A.wireframe=k.wireframe,A.side=T===Zc?null!==k.shadowSide?k.shadowSide:k.side:null!==k.shadowSide?k.shadowSide:h[k.side],A.alphaMap=k.alphaMap,A.alphaTest=k.alphaTest,A.map=k.map,A.clipShadows=k.clipShadows,A.clippingPlanes=k.clippingPlanes,A.clipIntersection=k.clipIntersection,A.displacementMap=k.displacementMap,A.displacementScale=k.displacementScale,A.displacementBias=k.displacementBias,A.wireframeLinewidth=k.wireframeLinewidth,A.linewidth=k.linewidth,!0===B.isPointLight&&!0===A.isMeshDistanceMaterial&&(i.properties.get(A).light=B),A}function C(D,k,B,T,A){if(!1===D.visible)return;if(D.layers.test(k.layers)&&(D.isMesh||D.isLine||D.isPoints)&&(D.castShadow||D.receiveShadow&&A===Zc)&&(!D.frustumCulled||n.intersectsObject(D))){D.modelViewMatrix.multiplyMatrices(B.matrixWorldInverse,D.matrixWorld);const ne=t.update(D),se=D.material;if(Array.isArray(se)){const ge=ne.groups;for(let q=0,re=ge.length;qd||r.y>d)&&(r.x>d&&(s.x=Math.floor(d/we.x),r.x=s.x*we.x,J.mapSize.x=s.x),r.y>d&&(s.y=Math.floor(d/we.y),r.y=s.y*we.y,J.mapSize.y=s.y)),null===J.map||!0===ne||!0===se){const Ye=this.type!==Zc?{minFilter:_r,magFilter:_r}:{};null!==J.map&&J.map.dispose(),J.map=new Mu(r.x,r.y,Ye),J.map.texture.name=re.name+".shadowMap",J.camera.updateProjectionMatrix()}i.setRenderTarget(J.map),i.clear();const Ne=J.getViewportCount();for(let Ye=0;Ye=1):-1!==re.indexOf("OpenGL ES")&&(q=parseFloat(/^OpenGL ES (\d)/.exec(re)[1]),ge=q>=2);let J=null,we={};const Ne=i.getParameter(i.SCISSOR_BOX),Ye=i.getParameter(i.VIEWPORT),It=(new gi).fromArray(Ne),en=(new gi).fromArray(Ye);function ae(Z,$e,Ce,Ee){const Ke=new Uint8Array(4),tn=i.createTexture();i.bindTexture(Z,tn),i.texParameteri(Z,i.TEXTURE_MIN_FILTER,i.NEAREST),i.texParameteri(Z,i.TEXTURE_MAG_FILTER,i.NEAREST);for(let ei=0;ei"u")&&/OculusBrowser/g.test(navigator.userAgent),c=new xe,d=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(z,R){return m?new OffscreenCanvas(z,R):wb("canvas")}function b(z,R,ce){let Ie=1;const Te=pt(z);if((Te.width>ce||Te.height>ce)&&(Ie=ce/Math.max(Te.width,Te.height)),Ie<1){if(typeof HTMLImageElement<"u"&&z instanceof HTMLImageElement||typeof HTMLCanvasElement<"u"&&z instanceof HTMLCanvasElement||typeof ImageBitmap<"u"&&z instanceof ImageBitmap||typeof VideoFrame<"u"&&z instanceof VideoFrame){const Ae=Math.floor(Ie*Te.width),Bt=Math.floor(Ie*Te.height);void 0===h&&(h=g(Ae,Bt));const Je=R?g(Ae,Bt):h;return Je.width=Ae,Je.height=Bt,Je.getContext("2d").drawImage(z,0,0,Ae,Bt),console.warn("THREE.WebGLRenderer: Texture has been resized from ("+Te.width+"x"+Te.height+") to ("+Ae+"x"+Bt+")."),Je}return"data"in z&&console.warn("THREE.WebGLRenderer: Image in DataTexture is too big ("+Te.width+"x"+Te.height+")."),z}return z}function v(z){return z.generateMipmaps&&z.minFilter!==_r&&z.minFilter!==lr}function y(z){i.generateMipmap(z)}function M(z,R,ce,Ie,Te=!1){if(null!==z){if(void 0!==i[z])return i[z];console.warn("THREE.WebGLRenderer: Attempt to use non-existing WebGL internal format '"+z+"'")}let Ae=R;if(R===i.RED&&(ce===i.FLOAT&&(Ae=i.R32F),ce===i.HALF_FLOAT&&(Ae=i.R16F),ce===i.UNSIGNED_BYTE&&(Ae=i.R8)),R===i.RED_INTEGER&&(ce===i.UNSIGNED_BYTE&&(Ae=i.R8UI),ce===i.UNSIGNED_SHORT&&(Ae=i.R16UI),ce===i.UNSIGNED_INT&&(Ae=i.R32UI),ce===i.BYTE&&(Ae=i.R8I),ce===i.SHORT&&(Ae=i.R16I),ce===i.INT&&(Ae=i.R32I)),R===i.RG&&(ce===i.FLOAT&&(Ae=i.RG32F),ce===i.HALF_FLOAT&&(Ae=i.RG16F),ce===i.UNSIGNED_BYTE&&(Ae=i.RG8)),R===i.RG_INTEGER&&(ce===i.UNSIGNED_BYTE&&(Ae=i.RG8UI),ce===i.UNSIGNED_SHORT&&(Ae=i.RG16UI),ce===i.UNSIGNED_INT&&(Ae=i.RG32UI),ce===i.BYTE&&(Ae=i.RG8I),ce===i.SHORT&&(Ae=i.RG16I),ce===i.INT&&(Ae=i.RG32I)),R===i.RGB&&ce===i.UNSIGNED_INT_5_9_9_9_REV&&(Ae=i.RGB9_E5),R===i.RGBA){const Bt=Te?NC:Jn.getTransfer(Ie);ce===i.FLOAT&&(Ae=i.RGBA32F),ce===i.HALF_FLOAT&&(Ae=i.RGBA16F),ce===i.UNSIGNED_BYTE&&(Ae=Bt===Fi?i.SRGB8_ALPHA8:i.RGBA8),ce===i.UNSIGNED_SHORT_4_4_4_4&&(Ae=i.RGBA4),ce===i.UNSIGNED_SHORT_5_5_5_1&&(Ae=i.RGB5_A1)}return(Ae===i.R16F||Ae===i.R32F||Ae===i.RG16F||Ae===i.RG32F||Ae===i.RGBA16F||Ae===i.RGBA32F)&&t.get("EXT_color_buffer_float"),Ae}function x(z,R){let ce;return z?null===R||R===xu||R===eg?ce=i.DEPTH24_STENCIL8:R===Qo?ce=i.DEPTH32F_STENCIL8:R===vb&&(ce=i.DEPTH24_STENCIL8,console.warn("DepthTexture: 16 bit depth attachment is not supported with stencil. Using 24-bit attachment.")):null===R||R===xu||R===eg?ce=i.DEPTH_COMPONENT24:R===Qo?ce=i.DEPTH_COMPONENT32F:R===vb&&(ce=i.DEPTH_COMPONENT16),ce}function C(z,R){return!0===v(z)||z.isFramebufferTexture&&z.minFilter!==_r&&z.minFilter!==lr?Math.log2(Math.max(R.width,R.height))+1:void 0!==z.mipmaps&&z.mipmaps.length>0?z.mipmaps.length:z.isCompressedTexture&&Array.isArray(z.image)?R.mipmaps.length:1}function F(z){const R=z.target;R.removeEventListener("dispose",F),function k(z){const R=n.get(z);if(void 0===R.__webglInit)return;const ce=z.source,Ie=p.get(ce);if(Ie){const Te=Ie[R.__cacheKey];Te.usedTimes--,0===Te.usedTimes&&B(z),0===Object.keys(Ie).length&&p.delete(ce)}n.remove(z)}(R),R.isVideoTexture&&d.delete(R)}function D(z){const R=z.target;R.removeEventListener("dispose",D),function T(z){const R=n.get(z);if(z.depthTexture&&z.depthTexture.dispose(),z.isWebGLCubeRenderTarget)for(let Ie=0;Ie<6;Ie++){if(Array.isArray(R.__webglFramebuffer[Ie]))for(let Te=0;Te0&&ce.__version!==z.version){const Ie=z.image;if(null===Ie)console.warn("THREE.WebGLRenderer: Texture marked for update but no image data found.");else{if(!1!==Ie.complete)return void en(ce,z,R);console.warn("THREE.WebGLRenderer: Texture marked for update but image is incomplete")}}e.bindTexture(i.TEXTURE_2D,ce.__webglTexture,i.TEXTURE0+R)}const J={[Pa]:i.REPEAT,[Ii]:i.CLAMP_TO_EDGE,[gb]:i.MIRRORED_REPEAT},we={[_r]:i.NEAREST,[dk]:i.NEAREST_MIPMAP_NEAREST,[Qm]:i.NEAREST_MIPMAP_LINEAR,[lr]:i.LINEAR,[_b]:i.LINEAR_MIPMAP_NEAREST,[bl]:i.LINEAR_MIPMAP_LINEAR},Ne={[Aoe]:i.NEVER,[Poe]:i.ALWAYS,[Doe]:i.LESS,[E4]:i.LEQUAL,[Toe]:i.EQUAL,[koe]:i.GEQUAL,[Ioe]:i.GREATER,[Roe]:i.NOTEQUAL};function Ye(z,R){if(R.type===Qo&&!1===t.has("OES_texture_float_linear")&&(R.magFilter===lr||R.magFilter===_b||R.magFilter===Qm||R.magFilter===bl||R.minFilter===lr||R.minFilter===_b||R.minFilter===Qm||R.minFilter===bl)&&console.warn("THREE.WebGLRenderer: Unable to use linear filtering with floating point textures. OES_texture_float_linear not supported on this device."),i.texParameteri(z,i.TEXTURE_WRAP_S,J[R.wrapS]),i.texParameteri(z,i.TEXTURE_WRAP_T,J[R.wrapT]),(z===i.TEXTURE_3D||z===i.TEXTURE_2D_ARRAY)&&i.texParameteri(z,i.TEXTURE_WRAP_R,J[R.wrapR]),i.texParameteri(z,i.TEXTURE_MAG_FILTER,we[R.magFilter]),i.texParameteri(z,i.TEXTURE_MIN_FILTER,we[R.minFilter]),R.compareFunction&&(i.texParameteri(z,i.TEXTURE_COMPARE_MODE,i.COMPARE_REF_TO_TEXTURE),i.texParameteri(z,i.TEXTURE_COMPARE_FUNC,Ne[R.compareFunction])),!0===t.has("EXT_texture_filter_anisotropic")){if(R.magFilter===_r||R.minFilter!==Qm&&R.minFilter!==bl||R.type===Qo&&!1===t.has("OES_texture_float_linear"))return;if(R.anisotropy>1||n.get(R).__currentAnisotropy){const ce=t.get("EXT_texture_filter_anisotropic");i.texParameterf(z,ce.TEXTURE_MAX_ANISOTROPY_EXT,Math.min(R.anisotropy,r.getMaxAnisotropy())),n.get(R).__currentAnisotropy=R.anisotropy}}}function It(z,R){let ce=!1;void 0===z.__webglInit&&(z.__webglInit=!0,R.addEventListener("dispose",F));const Ie=R.source;let Te=p.get(Ie);void 0===Te&&(Te={},p.set(Ie,Te));const Ae=function ne(z){const R=[];return R.push(z.wrapS),R.push(z.wrapT),R.push(z.wrapR||0),R.push(z.magFilter),R.push(z.minFilter),R.push(z.anisotropy),R.push(z.internalFormat),R.push(z.format),R.push(z.type),R.push(z.generateMipmaps),R.push(z.premultiplyAlpha),R.push(z.flipY),R.push(z.unpackAlignment),R.push(z.colorSpace),R.join()}(R);if(Ae!==z.__cacheKey){void 0===Te[Ae]&&(Te[Ae]={texture:i.createTexture(),usedTimes:0},o.memory.textures++,ce=!0),Te[Ae].usedTimes++;const Bt=Te[z.__cacheKey];void 0!==Bt&&(Te[z.__cacheKey].usedTimes--,0===Bt.usedTimes&&B(R)),z.__cacheKey=Ae,z.__webglTexture=Te[Ae].texture}return ce}function en(z,R,ce){let Ie=i.TEXTURE_2D;(R.isDataArrayTexture||R.isCompressedArrayTexture)&&(Ie=i.TEXTURE_2D_ARRAY),R.isData3DTexture&&(Ie=i.TEXTURE_3D);const Te=It(z,R),Ae=R.source;e.bindTexture(Ie,z.__webglTexture,i.TEXTURE0+ce);const Bt=n.get(Ae);if(Ae.version!==Bt.__version||!0===Te){e.activeTexture(i.TEXTURE0+ce);const Je=Jn.getPrimaries(Jn.workingColorSpace),ut=R.colorSpace===wu?null:Jn.getPrimaries(R.colorSpace),bn=R.colorSpace===wu||Je===ut?i.NONE:i.BROWSER_DEFAULT_WEBGL;i.pixelStorei(i.UNPACK_FLIP_Y_WEBGL,R.flipY),i.pixelStorei(i.UNPACK_PREMULTIPLY_ALPHA_WEBGL,R.premultiplyAlpha),i.pixelStorei(i.UNPACK_ALIGNMENT,R.unpackAlignment),i.pixelStorei(i.UNPACK_COLORSPACE_CONVERSION_WEBGL,bn);let ze=b(R.image,!1,r.maxTextureSize);ze=it(R,ze);const dt=s.convert(R.format,R.colorSpace),jn=s.convert(R.type);let _t,ln=M(R.internalFormat,dt,jn,R.colorSpace,R.isVideoTexture);Ye(Ie,R);const vn=R.mipmaps,Pn=!0!==R.isVideoTexture,Ki=void 0===Bt.__version||!0===Te,Z=Ae.dataReady,$e=C(R,ze);if(R.isDepthTexture)ln=x(R.format===ng,R.type),Ki&&(Pn?e.texStorage2D(i.TEXTURE_2D,1,ln,ze.width,ze.height):e.texImage2D(i.TEXTURE_2D,0,ln,ze.width,ze.height,0,dt,jn,null));else if(R.isDataTexture)if(vn.length>0){Pn&&Ki&&e.texStorage2D(i.TEXTURE_2D,$e,ln,vn[0].width,vn[0].height);for(let Ce=0,Ee=vn.length;Ce0){const Ke=MP(_t.width,_t.height,R.format,R.type);for(const tn of R.layerUpdates){const ei=_t.data.subarray(tn*Ke/_t.data.BYTES_PER_ELEMENT,(tn+1)*Ke/_t.data.BYTES_PER_ELEMENT);e.compressedTexSubImage3D(i.TEXTURE_2D_ARRAY,Ce,0,0,tn,_t.width,_t.height,1,dt,ei,0,0)}R.clearLayerUpdates()}else e.compressedTexSubImage3D(i.TEXTURE_2D_ARRAY,Ce,0,0,0,_t.width,_t.height,ze.depth,dt,_t.data,0,0)}else e.compressedTexImage3D(i.TEXTURE_2D_ARRAY,Ce,ln,_t.width,_t.height,ze.depth,0,_t.data,0,0);else console.warn("THREE.WebGLRenderer: Attempt to load unsupported compressed texture format in .uploadTexture()");else Pn?Z&&e.texSubImage3D(i.TEXTURE_2D_ARRAY,Ce,0,0,0,_t.width,_t.height,ze.depth,dt,jn,_t.data):e.texImage3D(i.TEXTURE_2D_ARRAY,Ce,ln,_t.width,_t.height,ze.depth,0,dt,jn,_t.data)}else{Pn&&Ki&&e.texStorage2D(i.TEXTURE_2D,$e,ln,vn[0].width,vn[0].height);for(let Ce=0,Ee=vn.length;Ce0){const Ce=MP(ze.width,ze.height,R.format,R.type);for(const Ee of R.layerUpdates){const Ke=ze.data.subarray(Ee*Ce/ze.data.BYTES_PER_ELEMENT,(Ee+1)*Ce/ze.data.BYTES_PER_ELEMENT);e.texSubImage3D(i.TEXTURE_2D_ARRAY,0,0,0,Ee,ze.width,ze.height,1,dt,jn,Ke)}R.clearLayerUpdates()}else e.texSubImage3D(i.TEXTURE_2D_ARRAY,0,0,0,0,ze.width,ze.height,ze.depth,dt,jn,ze.data)}else e.texImage3D(i.TEXTURE_2D_ARRAY,0,ln,ze.width,ze.height,ze.depth,0,dt,jn,ze.data);else if(R.isData3DTexture)Pn?(Ki&&e.texStorage3D(i.TEXTURE_3D,$e,ln,ze.width,ze.height,ze.depth),Z&&e.texSubImage3D(i.TEXTURE_3D,0,0,0,0,ze.width,ze.height,ze.depth,dt,jn,ze.data)):e.texImage3D(i.TEXTURE_3D,0,ln,ze.width,ze.height,ze.depth,0,dt,jn,ze.data);else if(R.isFramebufferTexture){if(Ki)if(Pn)e.texStorage2D(i.TEXTURE_2D,$e,ln,ze.width,ze.height);else{let Ce=ze.width,Ee=ze.height;for(let Ke=0;Ke<$e;Ke++)e.texImage2D(i.TEXTURE_2D,Ke,ln,Ce,Ee,0,dt,jn,null),Ce>>=1,Ee>>=1}}else if(vn.length>0){if(Pn&&Ki){const Ce=pt(vn[0]);e.texStorage2D(i.TEXTURE_2D,$e,ln,Ce.width,Ce.height)}for(let Ce=0,Ee=vn.length;Ce>Ae),dt=Math.max(1,R.height>>Ae);Te===i.TEXTURE_3D||Te===i.TEXTURE_2D_ARRAY?e.texImage3D(Te,Ae,ut,ze,dt,R.depth,0,Bt,Je,null):e.texImage2D(Te,Ae,ut,ze,dt,0,Bt,Je,null)}e.bindFramebuffer(i.FRAMEBUFFER,z),Me(R)?a.framebufferTexture2DMultisampleEXT(i.FRAMEBUFFER,Ie,Te,n.get(ce).__webglTexture,0,nt(R)):(Te===i.TEXTURE_2D||Te>=i.TEXTURE_CUBE_MAP_POSITIVE_X&&Te<=i.TEXTURE_CUBE_MAP_NEGATIVE_Z)&&i.framebufferTexture2D(i.FRAMEBUFFER,Ie,Te,n.get(ce).__webglTexture,Ae),e.bindFramebuffer(i.FRAMEBUFFER,null)}function Ze(z,R,ce){if(i.bindRenderbuffer(i.RENDERBUFFER,z),R.depthBuffer){const Ie=R.depthTexture,Ae=x(R.stencilBuffer,Ie&&Ie.isDepthTexture?Ie.type:null),Bt=R.stencilBuffer?i.DEPTH_STENCIL_ATTACHMENT:i.DEPTH_ATTACHMENT,Je=nt(R);Me(R)?a.renderbufferStorageMultisampleEXT(i.RENDERBUFFER,Je,Ae,R.width,R.height):ce?i.renderbufferStorageMultisample(i.RENDERBUFFER,Je,Ae,R.width,R.height):i.renderbufferStorage(i.RENDERBUFFER,Ae,R.width,R.height),i.framebufferRenderbuffer(i.FRAMEBUFFER,Bt,i.RENDERBUFFER,z)}else{const Ie=R.textures;for(let Te=0;Te0&&!0===t.has("WEBGL_multisampled_render_to_texture")&&!1!==R.__useRenderToTexture}function it(z,R){const ce=z.colorSpace,Ie=z.format,Te=z.type;return!0===z.isCompressedTexture||!0===z.isVideoTexture||ce!==ds&&ce!==wu&&(Jn.getTransfer(ce)===Fi?(Ie!==Ro||Te!==Jc)&&console.warn("THREE.WebGLTextures: sRGB encoded textures have to use RGBAFormat and UnsignedByteType."):console.error("THREE.WebGLTextures: Unsupported texture color space:",ce)),R}function pt(z){return typeof HTMLImageElement<"u"&&z instanceof HTMLImageElement?(c.width=z.naturalWidth||z.width,c.height=z.naturalHeight||z.height):typeof VideoFrame<"u"&&z instanceof VideoFrame?(c.width=z.displayWidth,c.height=z.displayHeight):(c.width=z.width,c.height=z.height),c}this.allocateTextureUnit=function ie(){const z=A;return z>=r.maxTextures&&console.warn("THREE.WebGLTextures: Trying to use "+z+" texture units while this GPU supports only "+r.maxTextures),A+=1,z},this.resetTextureUnits=function $(){A=0},this.setTexture2D=se,this.setTexture2DArray=function ge(z,R){const ce=n.get(z);z.version>0&&ce.__version!==z.version?en(ce,z,R):e.bindTexture(i.TEXTURE_2D_ARRAY,ce.__webglTexture,i.TEXTURE0+R)},this.setTexture3D=function q(z,R){const ce=n.get(z);z.version>0&&ce.__version!==z.version?en(ce,z,R):e.bindTexture(i.TEXTURE_3D,ce.__webglTexture,i.TEXTURE0+R)},this.setTextureCube=function re(z,R){const ce=n.get(z);z.version>0&&ce.__version!==z.version?function ae(z,R,ce){if(6!==R.image.length)return;const Ie=It(z,R),Te=R.source;e.bindTexture(i.TEXTURE_CUBE_MAP,z.__webglTexture,i.TEXTURE0+ce);const Ae=n.get(Te);if(Te.version!==Ae.__version||!0===Ie){e.activeTexture(i.TEXTURE0+ce);const Bt=Jn.getPrimaries(Jn.workingColorSpace),Je=R.colorSpace===wu?null:Jn.getPrimaries(R.colorSpace),ut=R.colorSpace===wu||Bt===Je?i.NONE:i.BROWSER_DEFAULT_WEBGL;i.pixelStorei(i.UNPACK_FLIP_Y_WEBGL,R.flipY),i.pixelStorei(i.UNPACK_PREMULTIPLY_ALPHA_WEBGL,R.premultiplyAlpha),i.pixelStorei(i.UNPACK_ALIGNMENT,R.unpackAlignment),i.pixelStorei(i.UNPACK_COLORSPACE_CONVERSION_WEBGL,ut);const bn=R.isCompressedTexture||R.image[0].isCompressedTexture,ze=R.image[0]&&R.image[0].isDataTexture,dt=[];for(let Ee=0;Ee<6;Ee++)dt[Ee]=bn||ze?ze?R.image[Ee].image:R.image[Ee]:b(R.image[Ee],!0,r.maxCubemapSize),dt[Ee]=it(R,dt[Ee]);const jn=dt[0],ln=s.convert(R.format,R.colorSpace),_t=s.convert(R.type),vn=M(R.internalFormat,ln,_t,R.colorSpace),Pn=!0!==R.isVideoTexture,Ki=void 0===Ae.__version||!0===Ie,Z=Te.dataReady;let Ce,$e=C(R,jn);if(Ye(i.TEXTURE_CUBE_MAP,R),bn){Pn&&Ki&&e.texStorage2D(i.TEXTURE_CUBE_MAP,$e,vn,jn.width,jn.height);for(let Ee=0;Ee<6;Ee++){Ce=dt[Ee].mipmaps;for(let Ke=0;Ke0&&$e++;const Ee=pt(dt[0]);e.texStorage2D(i.TEXTURE_CUBE_MAP,$e,vn,Ee.width,Ee.height)}for(let Ee=0;Ee<6;Ee++)if(ze){Pn?Z&&e.texSubImage2D(i.TEXTURE_CUBE_MAP_POSITIVE_X+Ee,0,0,0,dt[Ee].width,dt[Ee].height,ln,_t,dt[Ee].data):e.texImage2D(i.TEXTURE_CUBE_MAP_POSITIVE_X+Ee,0,vn,dt[Ee].width,dt[Ee].height,0,ln,_t,dt[Ee].data);for(let Ke=0;Ke1;if(Bt||(void 0===Ie.__webglTexture&&(Ie.__webglTexture=i.createTexture()),Ie.__version=R.version,o.memory.textures++),Ae){ce.__webglFramebuffer=[];for(let Je=0;Je<6;Je++)if(R.mipmaps&&R.mipmaps.length>0){ce.__webglFramebuffer[Je]=[];for(let ut=0;ut0){ce.__webglFramebuffer=[];for(let Je=0;Je0&&!1===Me(z)){ce.__webglMultisampledFramebuffer=i.createFramebuffer(),ce.__webglColorRenderbuffer=[],e.bindFramebuffer(i.FRAMEBUFFER,ce.__webglMultisampledFramebuffer);for(let Je=0;Je0)for(let ut=0;ut0)for(let ut=0;ut0)if(!1===Me(z)){const R=z.textures,ce=z.width,Ie=z.height;let Te=i.COLOR_BUFFER_BIT;const Ae=z.stencilBuffer?i.DEPTH_STENCIL_ATTACHMENT:i.DEPTH_ATTACHMENT,Bt=n.get(z),Je=R.length>1;if(Je)for(let ut=0;utm+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(bue)))}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 Fo;n.matrixAutoUpdate=!1,n.visible=!1,t.joints[e.jointName]=n,t.add(n)}return t.joints[e.jointName]}}class Mue{constructor(){this.texture=null,this.mesh=null,this.depthNear=0,this.depthFar=0}init(t,e,n){if(null===this.texture){const r=new ko;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}}getMesh(t){if(null!==this.texture&&null===this.mesh){const e=t.cameras[0].viewport,n=new Cl({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:e.z},depthHeight:{value:e.w}}});this.mesh=new Mn(new Iu(20,20),n)}return this.mesh}reset(){this.texture=null,this.mesh=null}getDepthTexture(){return this.texture}}class Cue extends og{constructor(t,e){super();const n=this;let r=null,s=1,o=null,a="local-floor",l=1,c=null,d=null,h=null,p=null,m=null,g=null;const b=new Mue,v=e.getContextAttributes();let y=null,M=null;const x=[],C=[],F=new xe;let D=null;const k=new yr;k.layers.enable(1),k.viewport=new gi;const B=new yr;B.layers.enable(2),B.viewport=new gi;const T=[k,B],A=new yue;A.layers.enable(1),A.layers.enable(2);let $=null,ie=null;function ne(ae){const Oe=C.indexOf(ae.inputSource);if(-1===Oe)return;const Ze=x[Oe];void 0!==Ze&&(Ze.update(ae.inputSource,ae.frame,c||o),Ze.dispatchEvent({type:ae.type,data:ae.inputSource}))}function se(){r.removeEventListener("select",ne),r.removeEventListener("selectstart",ne),r.removeEventListener("selectend",ne),r.removeEventListener("squeeze",ne),r.removeEventListener("squeezestart",ne),r.removeEventListener("squeezeend",ne),r.removeEventListener("end",se),r.removeEventListener("inputsourceschange",ge);for(let ae=0;ae=0&&(C[Fe]=null,x[Fe].disconnect(Ze))}for(let Oe=0;Oe=C.length){C.push(Ze),Fe=St;break}if(null===C[St]){C[St]=Ze,Fe=St;break}}if(-1===Fe)break}const bt=x[Fe];bt&&bt.connect(Ze)}}this.cameraAutoUpdate=!0,this.enabled=!1,this.isPresenting=!1,this.getController=function(ae){let Oe=x[ae];return void 0===Oe&&(Oe=new CP,x[ae]=Oe),Oe.getTargetRaySpace()},this.getControllerGrip=function(ae){let Oe=x[ae];return void 0===Oe&&(Oe=new CP,x[ae]=Oe),Oe.getGripSpace()},this.getHand=function(ae){let Oe=x[ae];return void 0===Oe&&(Oe=new CP,x[ae]=Oe),Oe.getHandSpace()},this.setFramebufferScaleFactor=function(ae){s=ae,!0===n.isPresenting&&console.warn("THREE.WebXRManager: Cannot change framebuffer scale while presenting.")},this.setReferenceSpaceType=function(ae){a=ae,!0===n.isPresenting&&console.warn("THREE.WebXRManager: Cannot change reference space type while presenting.")},this.getReferenceSpace=function(){return c||o},this.setReferenceSpace=function(ae){c=ae},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 ae=tt(function*(Oe){if(r=Oe,null!==r){if(y=t.getRenderTarget(),r.addEventListener("select",ne),r.addEventListener("selectstart",ne),r.addEventListener("selectend",ne),r.addEventListener("squeeze",ne),r.addEventListener("squeezestart",ne),r.addEventListener("squeezeend",ne),r.addEventListener("end",se),r.addEventListener("inputsourceschange",ge),!0!==v.xrCompatible&&(yield e.makeXRCompatible()),D=t.getPixelRatio(),t.getSize(F),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 Mu(m.framebufferWidth,m.framebufferHeight,{format:Ro,type:Jc,colorSpace:t.outputColorSpace,stencilBuffer:v.stencil});else{let Ze=null,Fe=null,bt=null;v.depth&&(bt=v.stencil?e.DEPTH24_STENCIL8:e.DEPTH_COMPONENT24,Ze=v.stencil?ng:tg,Fe=v.stencil?eg:xu);const St={colorFormat:e.RGBA8,depthFormat:bt,scaleFactor:s};h=new XRWebGLBinding(r,e),p=h.createProjectionLayer(St),r.updateRenderState({layers:[p]}),t.setPixelRatio(1),t.setSize(p.textureWidth,p.textureHeight,!1),M=new Mu(p.textureWidth,p.textureHeight,{format:Ro,type:Jc,depthTexture:new d5(p.textureWidth,p.textureHeight,Fe,void 0,void 0,void 0,void 0,void 0,void 0,Ze),stencilBuffer:v.stencil,colorSpace:t.outputColorSpace,samples:v.antialias?4:0,resolveDepthBuffer:!1===p.ignoreDepthValues})}M.isXRRenderTarget=!0,this.setFoveation(l),c=null,o=yield r.requestReferenceSpace(a),en.setContext(r),en.start(),n.isPresenting=!0,n.dispatchEvent({type:"sessionstart"})}});return function(Oe){return ae.apply(this,arguments)}}(),this.getEnvironmentBlendMode=function(){if(null!==r)return r.environmentBlendMode},this.getDepthTexture=function(){return b.getDepthTexture()};const q=new O,re=new O;function we(ae,Oe){null===Oe?ae.matrixWorld.copy(ae.matrix):ae.matrixWorld.multiplyMatrices(Oe.matrixWorld,ae.matrix),ae.matrixWorldInverse.copy(ae.matrixWorld).invert()}this.updateCamera=function(ae){if(null===r)return;null!==b.texture&&(ae.near=b.depthNear,ae.far=b.depthFar),A.near=B.near=k.near=ae.near,A.far=B.far=k.far=ae.far,($!==A.near||ie!==A.far)&&(r.updateRenderState({depthNear:A.near,depthFar:A.far}),$=A.near,ie=A.far,k.near=$,k.far=ie,B.near=$,B.far=ie,k.updateProjectionMatrix(),B.updateProjectionMatrix(),ae.updateProjectionMatrix());const Oe=ae.parent,Ze=A.cameras;we(A,Oe);for(let Fe=0;Fe0&&(v.alphaTest.value=y.alphaTest);const M=t.get(y),x=M.envMap,C=M.envMapRotation;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(Sue.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,v.lightMapIntensity.value=y.lightMapIntensity,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,Z4(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 d(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===Io&&v.clearcoatNormalScale.value.negate())),y.dispersion>0&&(v.dispersion.value=y.dispersion),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 Aue(i,t,e,n){let r={},s={},o=[];const a=i.getParameter(i.MAX_UNIFORM_BUFFER_BINDINGS);function m(M,x,C,F){const D=M.value,k=x+"_"+C;if(void 0===F[k])return F[k]="number"==typeof D||"boolean"==typeof D?D:D.clone(),!0;{const B=F[k];if("number"==typeof D||"boolean"==typeof D){if(B!==D)return F[k]=D,!0}else if(!1===B.equals(D))return B.copy(D),!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 k=0,B=x.length;k0&&(C+=16-D),M.__size=C,M.__cache={}}(M),C=function d(M){const x=function h(){for(let M=0;M0),Xt=!!le.morphAttributes.position,ai=!!le.morphAttributes.normal,Li=!!le.morphAttributes.color;let nr=bu;de.toneMapped&&(null===k||!0===k.isXRRenderTarget)&&(nr=x.toneMapping);const oa=le.morphAttributes.position||le.morphAttributes.normal||le.morphAttributes.color,hi=void 0!==oa?oa.length:0,Rt=it.get(de),fs=v.state.lights;!0!==ae||!0!==Oe&&L===T||bn.setState(de,L,L===T&&de.id===B);let fi=!1;de.version===Rt.__version?(Rt.needsLights&&Rt.lightsStateVersion!==fs.state.version||Rt.outputColorSpace!==xt||te.isBatchedMesh&&!1===Rt.batching||!te.isBatchedMesh&&!0===Rt.batching||te.isBatchedMesh&&!0===Rt.batchingColor&&null===te.colorTexture||te.isBatchedMesh&&!1===Rt.batchingColor&&null!==te.colorTexture||te.isInstancedMesh&&!1===Rt.instancing||!te.isInstancedMesh&&!0===Rt.instancing||te.isSkinnedMesh&&!1===Rt.skinning||!te.isSkinnedMesh&&!0===Rt.skinning||te.isInstancedMesh&&!0===Rt.instancingColor&&null===te.instanceColor||te.isInstancedMesh&&!1===Rt.instancingColor&&null!==te.instanceColor||te.isInstancedMesh&&!0===Rt.instancingMorph&&null===te.morphTexture||te.isInstancedMesh&&!1===Rt.instancingMorph&&null!==te.morphTexture||Rt.envMap!==wt||!0===de.fog&&Rt.fog!==je||void 0!==Rt.numClippingPlanes&&(Rt.numClippingPlanes!==bn.numPlanes||Rt.numIntersection!==bn.numIntersection)||Rt.vertexAlphas!==qt||Rt.vertexTangents!==on||Rt.morphTargets!==Xt||Rt.morphNormals!==ai||Rt.morphColors!==Li||Rt.toneMapping!==nr||Rt.morphTargetsCount!==hi)&&(fi=!0):(fi=!0,Rt.__version=de.version);let El=Rt.currentProgram;!0===fi&&(El=xE(de,K,te));let qg=!1,aa=!1,qO=!1;const xr=El.getUniforms(),Uu=Rt.uniforms;if(Me.useProgram(El.program)&&(qg=!0,aa=!0,qO=!0),de.id!==B&&(B=de.id,aa=!0),qg||T!==L){xr.setValue(N,"projectionMatrix",L.projectionMatrix),xr.setValue(N,"viewMatrix",L.matrixWorldInverse);const za=xr.map.cameraPosition;void 0!==za&&za.setValue(N,Fe.setFromMatrixPosition(L.matrixWorld)),nt.logarithmicDepthBuffer&&xr.setValue(N,"logDepthBufFC",2/(Math.log(L.far+1)/Math.LN2)),(de.isMeshPhongMaterial||de.isMeshToonMaterial||de.isMeshLambertMaterial||de.isMeshBasicMaterial||de.isMeshStandardMaterial||de.isShaderMaterial)&&xr.setValue(N,"isOrthographic",!0===L.isOrthographicCamera),T!==L&&(T=L,aa=!0,qO=!0)}if(te.isSkinnedMesh){xr.setOptional(N,te,"bindMatrix"),xr.setOptional(N,te,"bindMatrixInverse");const za=te.skeleton;za&&(null===za.boneTexture&&za.computeBoneTexture(),xr.setValue(N,"boneTexture",za.boneTexture,pt))}te.isBatchedMesh&&(xr.setOptional(N,te,"batchingTexture"),xr.setValue(N,"batchingTexture",te._matricesTexture,pt),xr.setOptional(N,te,"batchingIdTexture"),xr.setValue(N,"batchingIdTexture",te._indirectTexture,pt),xr.setOptional(N,te,"batchingColorTexture"),null!==te._colorsTexture&&xr.setValue(N,"batchingColorTexture",te._colorsTexture,pt));const XO=le.morphAttributes;if((void 0!==XO.position||void 0!==XO.normal||void 0!==XO.color)&&jn.update(te,le,El),(aa||Rt.receiveShadow!==te.receiveShadow)&&(Rt.receiveShadow=te.receiveShadow,xr.setValue(N,"receiveShadow",te.receiveShadow)),de.isMeshGouraudMaterial&&null!==de.envMap&&(Uu.envMap.value=wt,Uu.flipEnvMap.value=wt.isCubeTexture&&!1===wt.isRenderTargetTexture?-1:1),de.isMeshStandardMaterial&&null===de.envMap&&null!==K.environment&&(Uu.envMapIntensity.value=K.environmentIntensity),aa&&(xr.setValue(N,"toneMappingExposure",x.toneMappingExposure),Rt.needsLights&&function kve(L,K){L.ambientLightColor.needsUpdate=K,L.lightProbe.needsUpdate=K,L.directionalLights.needsUpdate=K,L.directionalLightShadows.needsUpdate=K,L.pointLights.needsUpdate=K,L.pointLightShadows.needsUpdate=K,L.spotLights.needsUpdate=K,L.spotLightShadows.needsUpdate=K,L.rectAreaLights.needsUpdate=K,L.hemisphereLights.needsUpdate=K}(Uu,qO),je&&!0===de.fog&&Bt.refreshFogUniforms(Uu,je),Bt.refreshMaterialUniforms(Uu,de,re,q,v.state.transmissionRenderTarget[L.id]),uS.upload(N,g8(Rt),Uu,pt)),de.isShaderMaterial&&!0===de.uniformsNeedUpdate&&(uS.upload(N,g8(Rt),Uu,pt),de.uniformsNeedUpdate=!1),de.isSpriteMaterial&&xr.setValue(N,"center",te.center),xr.setValue(N,"modelViewMatrix",te.modelViewMatrix),xr.setValue(N,"normalMatrix",te.normalMatrix),xr.setValue(N,"modelMatrix",te.matrixWorld),de.isShaderMaterial||de.isRawShaderMaterial){const za=de.uniformsGroups;for(let KO=0,Ove=za.length;KO{function je(){de.forEach(function(st){it.get(st).currentProgram.isReady()&&de.delete(st)}),0!==de.size?setTimeout(je,10):te(L)}null!==Le.get("KHR_parallel_shader_compile")?je():setTimeout(je,10)})};let ui=null;function fc(){kf.stop()}function h8(){kf.start()}const kf=new t5;function YO(L,K,le,de){if(!1===L.visible)return;if(L.layers.test(K.layers))if(L.isGroup)le=L.renderOrder;else if(L.isLOD)!0===L.autoUpdate&&L.update(K);else if(L.isLight)v.pushLight(L),L.castShadow&&v.pushShadow(L);else if(L.isSprite){if(!L.frustumCulled||en.intersectsSprite(L)){de&&bt.setFromMatrixPosition(L.matrixWorld).applyMatrix4(Ze);const st=Te.update(L),xt=L.material;xt.visible&&b.push(L,st,xt,le,bt.z,null)}}else if((L.isMesh||L.isLine||L.isPoints)&&(!L.frustumCulled||en.intersectsObject(L))){const st=Te.update(L),xt=L.material;if(de&&(void 0!==L.boundingSphere?(null===L.boundingSphere&&L.computeBoundingSphere(),bt.copy(L.boundingSphere.center)):(null===st.boundingSphere&&st.computeBoundingSphere(),bt.copy(st.boundingSphere.center)),bt.applyMatrix4(L.matrixWorld).applyMatrix4(Ze)),Array.isArray(xt)){const wt=st.groups;for(let qt=0,on=wt.length;qt0&&bE(te,K,le),je.length>0&&bE(je,K,le),st.length>0&&bE(st,K,le),Me.buffers.depth.setTest(!0),Me.buffers.depth.setMask(!0),Me.buffers.color.setMask(!0),Me.setPolygonOffset(!1)}function p8(L,K,le,de){if(null!==(!0===le.isScene?le.overrideMaterial:null))return;void 0===v.state.transmissionRenderTarget[de.id]&&(v.state.transmissionRenderTarget[de.id]=new Mu(1,1,{generateMipmaps:!0,type:Le.has("EXT_color_buffer_half_float")||Le.has("EXT_color_buffer_float")?Jm:Jc,minFilter:bl,samples:4,stencilBuffer:s,resolveDepthBuffer:!1,resolveStencilBuffer:!1,colorSpace:Jn.workingColorSpace}));const je=v.state.transmissionRenderTarget[de.id],st=de.viewport||A;je.setSize(st.z,st.w);const xt=x.getRenderTarget();x.setRenderTarget(je),x.getClearColor(ne),se=x.getClearAlpha(),se<1&&x.setClearColor(16777215,.5),x.clear(),Mt&&dt.render(le);const wt=x.toneMapping;x.toneMapping=bu;const qt=de.viewport;if(void 0!==de.viewport&&(de.viewport=void 0),v.setupLightsView(de),!0===ae&&bn.setGlobalState(x.clippingPlanes,de),bE(L,le,de),pt.updateMultisampleRenderTarget(je),pt.updateRenderTargetMipmap(je),!1===Le.has("WEBGL_multisampled_render_to_texture")){let on=!1;for(let Xt=0,ai=K.length;Xt0)for(let st=0,xt=je.length;st0&&p8(de,te,L,K),Mt&&dt.render(L),f8(b,L,K);null!==k&&(pt.updateMultisampleRenderTarget(k),pt.updateRenderTargetMipmap(k)),!0===L.isScene&&L.onAfterRender(x,L,K),Pn.resetDefaultState(),B=-1,T=null,M.pop(),M.length>0?(v=M[M.length-1],!0===ae&&bn.setGlobalState(x.clippingPlanes,v.state.camera)):v=null,y.pop(),b=y.length>0?y[y.length-1]:null},this.getActiveCubeFace=function(){return F},this.getActiveMipmapLevel=function(){return D},this.getRenderTarget=function(){return k},this.setRenderTargetTextures=function(L,K,le){it.get(L.texture).__webglTexture=K,it.get(L.depthTexture).__webglTexture=le;const de=it.get(L);de.__hasExternalTextures=!0,de.__autoAllocateDepthBuffer=void 0===le,de.__autoAllocateDepthBuffer||!0===Le.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(L,K){const le=it.get(L);le.__webglFramebuffer=K,le.__useDefaultFramebuffer=void 0===K},this.setRenderTarget=function(L,K=0,le=0){k=L,F=K,D=le;let de=!0,te=null,je=!1,st=!1;if(L){const wt=it.get(L);void 0!==wt.__useDefaultFramebuffer?(Me.bindFramebuffer(N.FRAMEBUFFER,null),de=!1):void 0===wt.__webglFramebuffer?pt.setupRenderTarget(L):wt.__hasExternalTextures&&pt.rebindTextures(L,it.get(L.texture).__webglTexture,it.get(L.depthTexture).__webglTexture);const qt=L.texture;(qt.isData3DTexture||qt.isDataArrayTexture||qt.isCompressedArrayTexture)&&(st=!0);const on=it.get(L).__webglFramebuffer;L.isWebGLCubeRenderTarget?(te=Array.isArray(on[K])?on[K][le]:on[K],je=!0):te=L.samples>0&&!1===pt.useMultisampledRTT(L)?it.get(L).__webglMultisampledFramebuffer:Array.isArray(on)?on[le]:on,A.copy(L.viewport),$.copy(L.scissor),ie=L.scissorTest}else A.copy(Ne).multiplyScalar(re).floor(),$.copy(Ye).multiplyScalar(re).floor(),ie=It;if(Me.bindFramebuffer(N.FRAMEBUFFER,te)&&de&&Me.drawBuffers(L,te),Me.viewport(A),Me.scissor($),Me.setScissorTest(ie),je){const wt=it.get(L.texture);N.framebufferTexture2D(N.FRAMEBUFFER,N.COLOR_ATTACHMENT0,N.TEXTURE_CUBE_MAP_POSITIVE_X+K,wt.__webglTexture,le)}else if(st){const wt=it.get(L.texture);N.framebufferTextureLayer(N.FRAMEBUFFER,N.COLOR_ATTACHMENT0,wt.__webglTexture,le||0,K||0)}B=-1},this.readRenderTargetPixels=function(L,K,le,de,te,je,st){if(!L||!L.isWebGLRenderTarget)return void console.error("THREE.WebGLRenderer.readRenderTargetPixels: renderTarget is not THREE.WebGLRenderTarget.");let xt=it.get(L).__webglFramebuffer;if(L.isWebGLCubeRenderTarget&&void 0!==st&&(xt=xt[st]),xt){Me.bindFramebuffer(N.FRAMEBUFFER,xt);try{const wt=L.texture,qt=wt.format,on=wt.type;if(!nt.textureFormatReadable(qt))return void console.error("THREE.WebGLRenderer.readRenderTargetPixels: renderTarget is not in RGBA or implementation defined format.");if(!nt.textureTypeReadable(on))return void console.error("THREE.WebGLRenderer.readRenderTargetPixels: renderTarget is not in UnsignedByteType or implementation defined type.");K>=0&&K<=L.width-de&&le>=0&&le<=L.height-te&&N.readPixels(K,le,de,te,vn.convert(qt),vn.convert(on),je)}finally{const wt=null!==k?it.get(k).__webglFramebuffer:null;Me.bindFramebuffer(N.FRAMEBUFFER,wt)}}},this.readRenderTargetPixelsAsync=function(){var L=tt(function*(K,le,de,te,je,st,xt){if(!K||!K.isWebGLRenderTarget)throw new Error("THREE.WebGLRenderer.readRenderTargetPixels: renderTarget is not THREE.WebGLRenderTarget.");let wt=it.get(K).__webglFramebuffer;if(K.isWebGLCubeRenderTarget&&void 0!==xt&&(wt=wt[xt]),wt){Me.bindFramebuffer(N.FRAMEBUFFER,wt);try{const qt=K.texture,on=qt.format,Xt=qt.type;if(!nt.textureFormatReadable(on))throw new Error("THREE.WebGLRenderer.readRenderTargetPixelsAsync: renderTarget is not in RGBA or implementation defined format.");if(!nt.textureTypeReadable(Xt))throw new Error("THREE.WebGLRenderer.readRenderTargetPixelsAsync: renderTarget is not in UnsignedByteType or implementation defined type.");if(le>=0&&le<=K.width-te&&de>=0&&de<=K.height-je){const ai=N.createBuffer();N.bindBuffer(N.PIXEL_PACK_BUFFER,ai),N.bufferData(N.PIXEL_PACK_BUFFER,st.byteLength,N.STREAM_READ),N.readPixels(le,de,te,je,vn.convert(on),vn.convert(Xt),0),N.flush();const Li=N.fenceSync(N.SYNC_GPU_COMMANDS_COMPLETE,0);yield function Joe(i,t,e){return new Promise(function(n,r){setTimeout(function s(){switch(i.clientWaitSync(t,i.SYNC_FLUSH_COMMANDS_BIT,0)){case i.WAIT_FAILED:r();break;case i.TIMEOUT_EXPIRED:setTimeout(s,e);break;default:n()}},e)})}(N,Li,4);try{N.bindBuffer(N.PIXEL_PACK_BUFFER,ai),N.getBufferSubData(N.PIXEL_PACK_BUFFER,0,st)}finally{N.deleteBuffer(ai),N.deleteSync(Li)}return st}}finally{const qt=null!==k?it.get(k).__webglFramebuffer:null;Me.bindFramebuffer(N.FRAMEBUFFER,qt)}}});return function(K,le,de,te,je,st,xt){return L.apply(this,arguments)}}(),this.copyFramebufferToTexture=function(L,K=null,le=0){!0!==L.isTexture&&(cg("WebGLRenderer: copyFramebufferToTexture function signature has changed."),K=arguments[0]||null,L=arguments[1]);const de=Math.pow(2,-le),te=Math.floor(L.image.width*de),je=Math.floor(L.image.height*de),st=null!==K?K.x:0,xt=null!==K?K.y:0;pt.setTexture2D(L,0),N.copyTexSubImage2D(N.TEXTURE_2D,le,0,0,st,xt,te,je),Me.unbindTexture()},this.copyTextureToTexture=function(L,K,le=null,de=null,te=0){let je,st,xt,wt,qt,on;!0!==L.isTexture&&(cg("WebGLRenderer: copyTextureToTexture function signature has changed."),de=arguments[0]||null,L=arguments[1],K=arguments[2],te=arguments[3]||0,le=null),null!==le?(je=le.max.x-le.min.x,st=le.max.y-le.min.y,xt=le.min.x,wt=le.min.y):(je=L.image.width,st=L.image.height,xt=0,wt=0),null!==de?(qt=de.x,on=de.y):(qt=0,on=0);const Xt=vn.convert(K.format),ai=vn.convert(K.type);pt.setTexture2D(K,0),N.pixelStorei(N.UNPACK_FLIP_Y_WEBGL,K.flipY),N.pixelStorei(N.UNPACK_PREMULTIPLY_ALPHA_WEBGL,K.premultiplyAlpha),N.pixelStorei(N.UNPACK_ALIGNMENT,K.unpackAlignment);const Li=N.getParameter(N.UNPACK_ROW_LENGTH),nr=N.getParameter(N.UNPACK_IMAGE_HEIGHT),oa=N.getParameter(N.UNPACK_SKIP_PIXELS),hi=N.getParameter(N.UNPACK_SKIP_ROWS),Rt=N.getParameter(N.UNPACK_SKIP_IMAGES),fs=L.isCompressedTexture?L.mipmaps[te]:L.image;N.pixelStorei(N.UNPACK_ROW_LENGTH,fs.width),N.pixelStorei(N.UNPACK_IMAGE_HEIGHT,fs.height),N.pixelStorei(N.UNPACK_SKIP_PIXELS,xt),N.pixelStorei(N.UNPACK_SKIP_ROWS,wt),L.isDataTexture?N.texSubImage2D(N.TEXTURE_2D,te,qt,on,je,st,Xt,ai,fs.data):L.isCompressedTexture?N.compressedTexSubImage2D(N.TEXTURE_2D,te,qt,on,fs.width,fs.height,Xt,fs.data):N.texSubImage2D(N.TEXTURE_2D,te,qt,on,je,st,Xt,ai,fs),N.pixelStorei(N.UNPACK_ROW_LENGTH,Li),N.pixelStorei(N.UNPACK_IMAGE_HEIGHT,nr),N.pixelStorei(N.UNPACK_SKIP_PIXELS,oa),N.pixelStorei(N.UNPACK_SKIP_ROWS,hi),N.pixelStorei(N.UNPACK_SKIP_IMAGES,Rt),0===te&&K.generateMipmaps&&N.generateMipmap(N.TEXTURE_2D),Me.unbindTexture()},this.copyTextureToTexture3D=function(L,K,le=null,de=null,te=0){let je,st,xt,wt,qt,on,Xt,ai,Li;!0!==L.isTexture&&(cg("WebGLRenderer: copyTextureToTexture3D function signature has changed."),le=arguments[0]||null,de=arguments[1]||null,L=arguments[2],K=arguments[3],te=arguments[4]||0);const nr=L.isCompressedTexture?L.mipmaps[te]:L.image;null!==le?(je=le.max.x-le.min.x,st=le.max.y-le.min.y,xt=le.max.z-le.min.z,wt=le.min.x,qt=le.min.y,on=le.min.z):(je=nr.width,st=nr.height,xt=nr.depth,wt=0,qt=0,on=0),null!==de?(Xt=de.x,ai=de.y,Li=de.z):(Xt=0,ai=0,Li=0);const oa=vn.convert(K.format),hi=vn.convert(K.type);let Rt;if(K.isData3DTexture)pt.setTexture3D(K,0),Rt=N.TEXTURE_3D;else{if(!K.isDataArrayTexture&&!K.isCompressedArrayTexture)return void console.warn("THREE.WebGLRenderer.copyTextureToTexture3D: only supports THREE.DataTexture3D and THREE.DataTexture2DArray.");pt.setTexture2DArray(K,0),Rt=N.TEXTURE_2D_ARRAY}N.pixelStorei(N.UNPACK_FLIP_Y_WEBGL,K.flipY),N.pixelStorei(N.UNPACK_PREMULTIPLY_ALPHA_WEBGL,K.premultiplyAlpha),N.pixelStorei(N.UNPACK_ALIGNMENT,K.unpackAlignment);const fs=N.getParameter(N.UNPACK_ROW_LENGTH),fi=N.getParameter(N.UNPACK_IMAGE_HEIGHT),El=N.getParameter(N.UNPACK_SKIP_PIXELS),qg=N.getParameter(N.UNPACK_SKIP_ROWS),aa=N.getParameter(N.UNPACK_SKIP_IMAGES);N.pixelStorei(N.UNPACK_ROW_LENGTH,nr.width),N.pixelStorei(N.UNPACK_IMAGE_HEIGHT,nr.height),N.pixelStorei(N.UNPACK_SKIP_PIXELS,wt),N.pixelStorei(N.UNPACK_SKIP_ROWS,qt),N.pixelStorei(N.UNPACK_SKIP_IMAGES,on),L.isDataTexture||L.isData3DTexture?N.texSubImage3D(Rt,te,Xt,ai,Li,je,st,xt,oa,hi,nr.data):K.isCompressedArrayTexture?N.compressedTexSubImage3D(Rt,te,Xt,ai,Li,je,st,xt,oa,nr.data):N.texSubImage3D(Rt,te,Xt,ai,Li,je,st,xt,oa,hi,nr),N.pixelStorei(N.UNPACK_ROW_LENGTH,fs),N.pixelStorei(N.UNPACK_IMAGE_HEIGHT,fi),N.pixelStorei(N.UNPACK_SKIP_PIXELS,El),N.pixelStorei(N.UNPACK_SKIP_ROWS,qg),N.pixelStorei(N.UNPACK_SKIP_IMAGES,aa),0===te&&K.generateMipmaps&&N.generateMipmap(Rt),Me.unbindTexture()},this.initRenderTarget=function(L){void 0===it.get(L).__webglFramebuffer&&pt.setupRenderTarget(L)},this.initTexture=function(L){L.isCubeTexture?pt.setTextureCube(L,0):L.isData3DTexture?pt.setTexture3D(L,0):L.isDataArrayTexture||L.isCompressedArrayTexture?pt.setTexture2DArray(L,0):pt.setTexture2D(L,0),Me.unbindTexture()},this.resetState=function(){F=0,D=0,k=null,Me.reset(),Pn.reset()},typeof __THREE_DEVTOOLS__<"u"&&__THREE_DEVTOOLS__.dispatchEvent(new CustomEvent("observe",{detail:this}))}get coordinateSystem(){return ed}get outputColorSpace(){return this._outputColorSpace}set outputColorSpace(t){this._outputColorSpace=t;const e=this.getContext();e.drawingBufferColorSpace=t===jk?"display-p3":"srgb",e.unpackColorSpace=Jn.workingColorSpace===LC?"display-p3":"srgb"}}class kb extends Or{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 id,this.environmentIntensity=1,this.environmentRotation=new id,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 AP{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=Jo()}onUploadCallback(){}set needsUpdate(t){!0===t&&this.version++}get updateRange(){return cg("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;r0){const r=e[n[0]];if(void 0!==r){this.morphTargetInfluences=[],this.morphTargetDictionary={};for(let s=0,o=r.length;sn)return;FP.applyMatrix4(i.matrixWorld);const l=t.ray.origin.distanceTo(FP);return lt.far?void 0:{distance:l,point:Z5.clone().applyMatrix4(i.matrixWorld),index:r,face:null,faceIndex:null,object:i}}const Q5=new O,J5=new O;class Ng extends pf{constructor(t,e){super(t,e),this.isLineSegments=!0,this.type="LineSegments"}computeLineDistances(){const t=this.geometry;if(null===t.index){const e=t.attributes.position,n=[];for(let r=0,s=e.count;r0){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 dc{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 d=n[r];return(r+(o-d)/(n[r+1]-d))/(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 xe:new O);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 O,r=[],s=[],o=[],a=new O,l=new Nt;for(let m=0;m<=t;m++)r[m]=this.getTangentAt(m/t,new O);s[0]=new O,o[0]=new O;let c=Number.MAX_VALUE;const d=Math.abs(r[0].x),h=Math.abs(r[0].y),p=Math.abs(r[0].z);d<=c&&(c=d,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(er(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(er(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 NP extends dc{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 xe){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(iG(a,l.x,c.x,d.x,h.x),iG(a,l.y,c.y,d.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]:(DS.subVectors(r[0],r[1]).add(r[0]),c=DS);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 d=c.getPoint(1);return this.currentPoint.copy(d),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 RS extends hn{constructor(t=[new xe(0,-.5),new xe(.5,0),new xe(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=er(r,0,2*Math.PI);const s=[],o=[],a=[],l=[],c=[],d=1/e,h=new O,p=new xe,m=new O,g=new O,b=new O;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*d*r,C=Math.sin(x),F=Math.cos(x);for(let D=0;D<=t.length-1;D++)h.x=t[D].x*C,h.y=t[D].y,h.z=t[D].x*F,o.push(h.x,h.y,h.z),p.x=M/e,p.y=D/(t.length-1),a.push(p.x,p.y),c.push(l[3*D+0]*C,l[3*D+1],l[3*D+0]*F)}for(let M=0;M0&&x(!0),e>0&&x(!1)),this.setIndex(d),this.setAttribute("position",new ct(h,3)),this.setAttribute("normal",new ct(p,3)),this.setAttribute("uv",new ct(m,2))}copy(t){return super.copy(t),this.parameters=Object.assign({},t.parameters),this}static fromJSON(t){return new Bg(t.radiusTop,t.radiusBottom,t.height,t.radialSegments,t.heightSegments,t.openEnded,t.thetaStart,t.thetaLength)}}class PS extends Bg{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 PS(t.radius,t.height,t.radialSegments,t.heightSegments,t.openEnded,t.thetaStart,t.thetaLength)}}class jb 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 d=[],h=new O,p=new O,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 F=0;F<=e;F++){const D=F/e;h.x=-t*Math.cos(r+D*s)*Math.sin(o+x*a),h.y=t*Math.cos(o+x*a),h.z=t*Math.sin(r+D*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(D+C,1-x),M.push(c++)}d.push(M)}for(let y=0;y0)&&m.push(d[y][M+1],C,D),(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 dispersion(){return this._dispersion}set dispersion(t){this._dispersion>0!=t>0&&this.version++,this._dispersion=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.dispersion=t.dispersion,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 zS extends Po{constructor(t){super(),this.isMeshPhongMaterial=!0,this.type="MeshPhongMaterial",this.color=new qe(16777215),this.specular=new qe(1118481),this.shininess=30,this.map=null,this.lightMap=null,this.lightMapIntensity=1,this.aoMap=null,this.aoMapIntensity=1,this.emissive=new qe(0),this.emissiveIntensity=1,this.emissiveMap=null,this.bumpMap=null,this.bumpScale=1,this.normalMap=null,this.normalMapType=Qh,this.normalScale=new xe(1,1),this.displacementMap=null,this.displacementScale=1,this.displacementBias=0,this.specularMap=null,this.alphaMap=null,this.envMap=null,this.envMapRotation=new id,this.combine=EC,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 vf(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 vG(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 tO(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 nO(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 qb{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 _G(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}}uc.prototype.TimeBufferType=Float32Array,uc.prototype.ValueBufferType=Float32Array,uc.prototype.DefaultInterpolation=bb;class zg extends uc{constructor(t,e,n){super(t,e,n)}}zg.prototype.ValueTypeName="bool",zg.prototype.ValueBufferType=Array,zg.prototype.DefaultInterpolation=yb,zg.prototype.InterpolantFactoryMethodLinear=void 0,zg.prototype.InterpolantFactoryMethodSmooth=void 0;class bG extends uc{}bG.prototype.ValueTypeName="color";class Hg extends uc{}Hg.prototype.ValueTypeName="number";class Ohe extends qb{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 d=c+a;c!==d;c+=4)co.slerpFlat(s,0,o,c-a,o,c,l);return s}}class Gg extends uc{InterpolantFactoryMethodLinear(t){return new Ohe(this.times,this.values,this.getValueSize(),t)}}Gg.prototype.ValueTypeName="quaternion",Gg.prototype.InterpolantFactoryMethodSmooth=void 0;class $g extends uc{constructor(t,e,n){super(t,e,n)}}$g.prototype.ValueTypeName="string",$g.prototype.ValueBufferType=Array,$g.prototype.DefaultInterpolation=yb,$g.prototype.InterpolantFactoryMethodLinear=void 0,$g.prototype.InterpolantFactoryMethodSmooth=void 0;class Wg extends uc{}Wg.prototype.ValueTypeName="vector";class Xb{constructor(t="",e=-1,n=[],r=2500){this.name=t,this.tracks=n,this.duration=e,this.blendMode=r,this.uuid=Jo(),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(Lhe(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(uc.toJSON(n[s]));return r}static CreateFromMorphTargetSequence(t,e,n,r){const s=e.length,o=[];for(let a=0;a1){const h=d[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=[];nO(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:wG,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 dd={};class Nhe extends Error{constructor(t,e){super(t),this.response=e}}class La extends yf{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=ku.get(t);if(void 0!==s)return this.manager.itemStart(t),setTimeout(()=>{e&&e(s),this.manager.itemEnd(t)},0),s;if(void 0!==dd[t])return void dd[t].push({onLoad:e,onProgress:n,onError:r});dd[t]=[],dd[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 d=dd[t],h=c.body.getReader(),p=c.headers.get("X-File-Size")||c.headers.get("Content-Length"),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 F=new ProgressEvent("progress",{lengthComputable:g,loaded:b,total:m});for(let D=0,k=d.length;D{y.error(x)})}()}});return new Response(v)}throw new Nhe(`fetch for "${c.url}" responded with ${c.status}: ${c.statusText}`,c)}).then(c=>{switch(l){case"arraybuffer":return c.arrayBuffer();case"blob":return c.blob();case"document":return c.text().then(d=>(new DOMParser).parseFromString(d,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=>{ku.add(t,c);const d=dd[t];delete dd[t];for(let h=0,p=d.length;h{const d=dd[t];if(void 0===d)throw this.manager.itemError(t),c;delete dd[t];for(let h=0,p=d.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 HS extends yf{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=ku.get(t);if(void 0!==o)return s.manager.itemStart(t),setTimeout(function(){e&&e(o),s.manager.itemEnd(t)},0),o;const a=wb("img");function l(){d(),ku.add(t,this),e&&e(this),s.manager.itemEnd(t)}function c(h){d(),r&&r(h),s.manager.itemError(t),s.manager.itemEnd(t)}function d(){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 Pu extends yf{constructor(t){super(t)}load(t,e,n,r){const s=new ko,o=new HS(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 GS extends Or{constructor(t,e=1){super(),this.isLight=!0,this.type="Light",this.color=new qe(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()),void 0!==this.target&&(e.object.target=this.target.uuid),e}}const iO=new Nt,MG=new O,CG=new O;class rO{constructor(t){this.camera=t,this.intensity=1,this.bias=0,this.normalBias=0,this.radius=1,this.blurSamples=8,this.mapSize=new xe(512,512),this.map=null,this.mapPass=null,this.matrix=new Nt,this.autoUpdate=!0,this.needsUpdate=!1,this._frustum=new aS,this._frameExtents=new xe(1,1),this._viewportCount=1,this._viewports=[new gi(0,0,1,1)]}getViewportCount(){return this._viewportCount}getFrustum(){return this._frustum}updateMatrices(t){const e=this.camera,n=this.matrix;MG.setFromMatrixPosition(t.matrixWorld),e.position.copy(MG),CG.setFromMatrixPosition(t.target.matrixWorld),e.lookAt(CG),e.updateMatrixWorld(),iO.multiplyMatrices(e.projectionMatrix,e.matrixWorldInverse),this._frustum.setFromProjectionMatrix(iO),n.set(.5,0,0,.5,0,.5,0,.5,0,0,.5,.5,0,0,0,1),n.multiply(iO)}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.intensity=t.intensity,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 1!==this.intensity&&(t.intensity=this.intensity),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 Uhe extends rO{constructor(){super(new yr(50,1,.5,500)),this.isSpotLightShadow=!0,this.focus=1}updateMatrices(t){const e=this.camera,n=2*ag*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 SG extends GS{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(Or.DEFAULT_UP),this.updateMatrix(),this.target=new Or,this.distance=n,this.angle=r,this.penumbra=s,this.decay=o,this.map=null,this.shadow=new Uhe}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 EG=new Nt,Kb=new O,sO=new O;class Vhe extends rO{constructor(){super(new yr(90,1,.5,500)),this.isPointLightShadow=!0,this._frameExtents=new xe(4,2),this._viewportCount=6,this._viewports=[new gi(2,1,1,1),new gi(0,1,1,1),new gi(3,1,1,1),new gi(1,1,1,1),new gi(3,0,1,1),new gi(1,0,1,1)],this._cubeDirections=[new O(1,0,0),new O(-1,0,0),new O(0,0,1),new O(0,0,-1),new O(0,1,0),new O(0,-1,0)],this._cubeUps=[new O(0,1,0),new O(0,1,0),new O(0,1,0),new O(0,1,0),new O(0,0,1),new O(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()),Kb.setFromMatrixPosition(t.matrixWorld),n.position.copy(Kb),sO.copy(n.position),sO.add(this._cubeDirections[e]),n.up.copy(this._cubeUps[e]),n.lookAt(sO),n.updateMatrixWorld(),r.makeTranslation(-Kb.x,-Kb.y,-Kb.z),EG.multiplyMatrices(n.projectionMatrix,n.matrixWorldInverse),this._frustum.setFromProjectionMatrix(EG)}}class AG extends GS{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 Vhe}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 zhe extends rO{constructor(){super(new Ib(-5,5,5,-5,.5,500)),this.isDirectionalLightShadow=!0}}class DG extends GS{constructor(t,e){super(t,e),this.isDirectionalLight=!0,this.type="DirectionalLight",this.position.copy(Or.DEFAULT_UP),this.updateMatrix(),this.target=new Or,this.shadow=new zhe}dispose(){this.shadow.dispose()}copy(t){return super.copy(t),this.target=t.target.clone(),this.shadow=t.shadow.clone(),this}}class $S extends GS{constructor(t,e){super(t,e),this.isAmbientLight=!0,this.type="AmbientLight"}}class Ou{static decodeText(t){if(console.warn("THREE.LoaderUtils: decodeText() has been deprecated with r165 and will be removed with r175. Use TextDecoder instead."),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=ku.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 ku.add(t,c),e&&e(c),s.manager.itemEnd(t),c}).catch(function(c){r&&r(c),ku.remove(t),s.manager.itemError(t),s.manager.itemEnd(t)});ku.add(t,l),s.manager.itemStart(t)}}class OG{constructor(t=!0){this.autoStart=t,this.startTime=0,this.oldTime=0,this.elapsedTime=0,this.running=!1}start(){this.startTime=FG(),this.oldTime=this.startTime,this.elapsedTime=0,this.running=!0}stop(){this.getElapsedTime(),this.running=!1,this.autoStart=!1}getElapsedTime(){return this.getDelta(),this.elapsedTime}getDelta(){let t=0;if(this.autoStart&&!this.running)return this.start(),0;if(this.running){const e=FG();t=(e-this.oldTime)/1e3,this.oldTime=e,this.elapsedTime+=t}return t}}function FG(){return(typeof performance>"u"?Date:performance).now()}const aO="\\[\\]\\.:\\/",Qhe=new RegExp("["+aO+"]","g"),lO="[^"+aO+"]",Jhe="[^"+aO.replace("\\.","")+"]",rfe=new RegExp("^"+/((?:WC+[\/:])*)/.source.replace("WC",lO)+/(WCOD+)?/.source.replace("WCOD",Jhe)+/(?:\.(WC+)(?:\[(.+)\])?)?/.source.replace("WC",lO)+/\.(WC+)(?:\[(.+)\])?/.source.replace("WC",lO)+"$"),sfe=["material","materials","bones","map"];class ofe{constructor(t,e,n){const r=n||Ri.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 Ri=(()=>{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(Qhe,"")}static parseTrackName(e){const n=rfe.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!==sfe.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;an.name===t||n.userData.name===t);return e?(e.removeFromParent(),new na(e)):null}getBoundings(){return(new Bs).setFromObject(this.nativeMesh)}clone(){return new na(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 Mn&&this.disposeMesh(t)}),this.nativeMesh instanceof Mn&&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 ufe extends na{get supportsFov(){return this.nativeCamera instanceof yr||"PerspectiveCamera"==this.nativeCamera.type}get fov(){return this.nativeCamera.fov||NaN}set fov(t){this.supportsFov&&(this.nativeCamera.fov=t,this.nativeCamera.updateProjectionMatrix())}constructor(t){super(t),this.nativeCamera=t}}class hfe extends Pse{createMaterial(t){let e={};t.color?e={color:t.color}:t.diffuse||(e={color:super.randomColor()});let n=t.shading||"unlit";switch(n){case"unlit":return new qi(Object.assign(Object.assign({},e),{map:t.diffuse||null}));case"standart":return new Yb(Object.assign(Object.assign({},e),{map:t.diffuse||null}));case"phong":return new zS(Object.assign(Object.assign({},e),{map:t.diffuse||null}));case"wireframe":return new qi(Object.assign(Object.assign({},e),{wireframe:!0}));default:throw new Error(`"${n}" shading not implemented for three.js`)}}transformPrimitiveZUp(t){t.geometry.rotateX(Math.PI/2)}createPrimitive(t,e={}){var n,r,s,o;let a=null,l=this.createMaterial(e);switch(t.shape){case"PLANE":a=new Mn(new Iu((null===(n=t.dimensions)||void 0===n?void 0:n.x)||1e4,(null===(r=t.dimensions)||void 0===r?void 0:r.y)||1e4,null===(s=t.segments)||void 0===s?void 0:s.x,null===(o=t.segments)||void 0===o?void 0:o.y),l);break;case"BOX":a=new Mn(new rf(...Pe.spr(t.dimensions),...t.segments?Pe.spr(t.segments):[]),l);break;case"CAPSULE":a=new Mn(new kS(t.radius,t.centersDistance,t.capSegments,t.radialSegments),l),this.transformPrimitiveZUp(a);break;case"CYLINDER":a=new Mn(new Bg(t.radius,t.radius,t.height,t.radialSegments,t.heightSegments),l),this.transformPrimitiveZUp(a);break;case"CONE":a=new Mn(new PS(t.radius,t.height,t.radialSegments,t.heightSegments),l),this.transformPrimitiveZUp(a);break;case"SPHERE":a=new Mn(new jb(t.radius,t.widthSegments,t.heightSegments),l),this.transformPrimitiveZUp(a);break;case"COMPOUND":a=new Fo;for(const{position:d,rotation:h,shape:p}of t.children){const m=this.createPrimitive(p,e).nativeMesh;d&&m.position.set(...Pe.spr(d)),h&&m.quaternion.set(...Yi.spr(h)),a.add(m)}break;case"MESH":const c=new hn;c.setFromPoints(t.vertices.map(d=>new O(...Pe.spr(d)))),c.setIndex(t.faces.reduce((d,h)=>(d.push(...h),d),[])),a=new Mn(c,l)}if(!a)throw new Error(`Primitive with shape "${t.shape}" not implemented`);return void 0!==e.castShadow&&(a.castShadow=e.castShadow),void 0!==e.receiveShadow&&(a.receiveShadow=e.receiveShadow),new na(a)}createPerspectiveCamera(t={}){return new ufe(new yr(t.fov||75,t.aspectRatio||1,t.frustrum?t.frustrum.near:1,t.frustrum?t.frustrum.far:1e4))}}function QG(i,t){if(t===Moe)return console.warn("THREE.BufferGeometryUtils.toTrianglesDrawMode(): Geometry already defined as triangles."),i;if(t===Wk||t===C4){let e=i.getIndex();if(null===e){const o=[],a=i.getAttribute("position");if(void 0===a)return console.error("THREE.BufferGeometryUtils.toTrianglesDrawMode(): Undefined position attribute. Processing not possible."),i;for(let l=0;l=2.0 are supported.")));const c=new jfe(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 d=0;d=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 pfe(){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 Bn={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_DISPERSION:"KHR_materials_dispersion",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 mfe{constructor(t){this.parser=t,this.name=Bn.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 Tfe{constructor(t){this.parser=t,this.name=Bn.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 Ife{constructor(t){this.parser=t,this.name=Bn.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 Rfe{constructor(t){this.name=Bn.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 d=r.count,h=r.byteStride,p=new Uint8Array(a,r.byteOffset||0,r.byteLength||0);return o.decodeGltfBufferAsync?o.decodeGltfBufferAsync(d,h,p,r.mode,r.filter).then(function(m){return m.buffer}):o.ready.then(function(){const m=new ArrayBuffer(d*h);return o.decodeGltfBuffer(new Uint8Array(m),d,h,p,r.mode,r.filter),m})})}return null}}class kfe{constructor(t){this.name=Bn.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!==Na.TRIANGLES&&c.mode!==Na.TRIANGLE_STRIP&&c.mode!==Na.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(d=>(l[c]=d,l[c])));return a.length<1?null:(a.push(this.parser.createNodeMesh(t)),Promise.all(a).then(c=>{const d=c.pop(),h=d.isGroup?d.children:[d],p=c[0].count,m=[];for(const g of h){const b=new Nt,v=new O,y=new co,M=new O(1,1,1),x=new Y5(g.geometry,g.material,p);for(let C=0;C-1,o=s?a.match(/Firefox\/([0-9]+)\./)[1]:-1}this.textureLoader=typeof createImageBitmap>"u"||n&&r<17||s&&o<98?new Pu(this.options.manager):new qhe(this.options.manager),this.textureLoader.setCrossOrigin(this.options.crossOrigin),this.textureLoader.setRequestHeader(this.options.requestHeader),this.fileLoader=new La(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 Sf(s,a,r),ud(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,d]of o.children.entries())s(d,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(T,D[k*l+1]),l>=3&&v.setZ(T,D[k*l+2]),l>=4&&v.setW(T,D[k*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(d){d.flipY=!1,d.name=o.name||a.name||"",""===d.name&&"string"==typeof a.uri&&!1===a.uri.startsWith("data:image/")&&(d.name=a.uri);const p=(s.samplers||{})[o.sampler]||{};return d.magFilter=n$[p.magFilter]||lr,d.minFilter=n$[p.minFilter]||bl,d.wrapS=i$[p.wrapS]||Pa,d.wrapT=i$[p.wrapT]||Pa,r.associations.set(d,{textures:t}),d}).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 d=Promise.resolve(l).then(function(h){return new Promise(function(p,m){let g=p;!0===e.isImageBitmapLoader&&(g=function(b){const v=new ko(b);v.needsUpdate=!0,p(v)}),e.load(Ou.resolveURL(h,s.path),g,void 0,m)})}).then(function(h){return!0===c&&a.revokeObjectURL(l),ud(h,o),h.userData.mimeType=o.mimeType||function $fe(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]=d,d}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[Bn.KHR_TEXTURE_TRANSFORM]){const a=void 0!==n.extensions?n.extensions[Bn.KHR_TEXTURE_TRANSFORM]:void 0;if(a){const l=s.associations.get(o);o=s.extensions[Bn.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 mf,Po.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 us,Po.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 Yb}loadMaterial(t){const e=this,r=this.extensions,s=this.json.materials[t];let o;const a={},c=[];if((s.extensions||{})[Bn.KHR_MATERIALS_UNLIT]){const h=r[Bn.KHR_MATERIALS_UNLIT];o=h.getMaterialType(),c.push(h.extendParams(a,s,e))}else{const h=s.pbrMetallicRoughness||{};if(a.color=new qe(1,1,1),a.opacity=1,Array.isArray(h.baseColorFactor)){const p=h.baseColorFactor;a.color.setRGB(p[0],p[1],p[2],ds),a.opacity=p[3]}void 0!==h.baseColorTexture&&c.push(e.assignTexture(a,"map",h.baseColorTexture,cs)),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=Ls);const d=s.alphaMode||"OPAQUE";if("BLEND"===d?(a.transparent=!0,a.depthWrite=!1):(a.transparent=!1,"MASK"===d&&(a.alphaTest=void 0!==s.alphaCutoff?s.alphaCutoff:.5)),void 0!==s.normalTexture&&o!==qi&&(c.push(e.assignTexture(a,"normalMap",s.normalTexture)),a.normalScale=new xe(1,1),void 0!==s.normalTexture.scale)){const h=s.normalTexture.scale;a.normalScale.set(h,h)}if(void 0!==s.occlusionTexture&&o!==qi&&(c.push(e.assignTexture(a,"aoMap",s.occlusionTexture)),void 0!==s.occlusionTexture.strength&&(a.aoMapIntensity=s.occlusionTexture.strength)),void 0!==s.emissiveFactor&&o!==qi){const h=s.emissiveFactor;a.emissive=(new qe).setRGB(h[0],h[1],h[2],ds)}return void 0!==s.emissiveTexture&&o!==qi&&c.push(e.assignTexture(a,"emissiveMap",s.emissiveTexture,cs)),Promise.all(c).then(function(){const h=new o(a);return s.name&&(h.name=s.name),ud(h,s),e.associations.set(h,{materials:t}),s.extensions&&Sf(r,h,s),h})}createUniqueName(t){const e=Ri.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[Bn.KHR_DRACO_MESH_COMPRESSION].decodePrimitive(a,e).then(function(l){return r$(l,a,e)})}const o=[];for(let a=0,l=t.length;a0&&Hfe(y,s),y.name=e.createUniqueName(s.name||"mesh_"+t),ud(y,s),v.extensions&&Sf(r,y,v),e.assignFinalMaterial(y),h.push(y)}for(let m=0,g=h.length;m1?new Fo:1===c.length?c[0]:new Or,d!==c[0])for(let h=0,p=c.length;h{const h=new Map;for(const[p,m]of r.associations)(p instanceof Po||p instanceof ko)&&h.set(p,m);return d.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(Lu[s.path]===Lu.weights?t.traverse(function(p){p.morphTargetInfluences&&l.push(p.name?p.name:p.uuid)}):l.push(a),Lu[s.path]){case Lu.weights:c=Hg;break;case Lu.rotation:c=Gg;break;case Lu.position:case Lu.scale:c=Wg;break;default:c=1===n.itemSize?Hg:Wg}const d=void 0!==r.interpolation?Ufe[r.interpolation]:bb,h=this._getArrayFromAccessor(n);for(let p=0,m=l.length;p{r.type.endsWith("Light")&&(console.warn("WORKAROUND: light intensity from GLB divided by 200."),r.intensity*=.005)}),new na(n.scene)})}}const fo=(i,t)=>Array(i).fill(null).map((e,n)=>t(n));class Ef{static startDebugView(t,e){let n=this.activeDebugViews.get(t);return n?n.renderers.includes(e)||n.renderers.push(e):(n={view:new Ef(t),renderers:[e]},this.activeDebugViews.set(t,n)),n.view}static stopDebugView(t,e){const n=t.world,r=this.activeDebugViews.get(n);r&&(r.renderers=r.renderers.filter(s=>s!==e),0===r.renderers.length&&(r.view.dispose(),this.activeDebugViews.delete(n)))}constructor(t){this.world=t,this.debugScene=null,this.aSub=null,this.rSub=null,this.syncMap=new Map,this.debugScene=new kb;const e=n=>{var r,s;const o=n.debugBodySettings;let c,l=this.lineSegmentPointsForShape(o.shape);c=l?new Ng((new hn).setFromPoints(l)):null===(r=this.world)||void 0===r?void 0:r.visualScene.factory.createPrimitive(o.shape,{shading:"wireframe",color:0}).nativeMesh,this.syncMap.set(n,c),null===(s=this.debugScene)||void 0===s||s.add(c)};for(const n of this.world.physicsWorld.children)e(n);this.aSub=this.world.physicsWorld.added$.subscribe(n=>e(n)),this.rSub=this.world.physicsWorld.removed$.subscribe(n=>{var r;const s=this.syncMap.get(n);s&&(this.syncMap.delete(n),null===(r=this.debugScene)||void 0===r||r.remove(s))})}get scene(){return this.debugScene}render(t,e){for(const[r,s]of this.syncMap.entries()){const o=r.debugBodySettings;if(o.ignoreTransform||(s.position.set(...Pe.spr(r.position)),s.quaternion.set(...Yi.spr(r.rotation))),s.material){let a=16777215;switch(o.type){case"RIGID_DYNAMIC":a=o.sleeping?255:16711680;break;case"RIGID_STATIC":a=65280;break;case"TRIGGER":a=16776960}s.material.color.set(a),s.material.needsUpdate=!0}}const n=t.autoClearColor;n&&(t.autoClearColor=!1),t.render(this.debugScene,e),n&&(t.autoClearColor=!0)}lineSegmentPointsForShape(t){if("BOX"===t.shape){const e=Pe.scalarMult(t.dimensions,.5);return[...fo(8,n=>new O(n<4?e.x:-e.x,n%4<2?e.y:-e.y,n%2?e.z:-e.z)),...fo(8,n=>new O(n%2?e.x:-e.x,n<4?e.y:-e.y,n%4<2?e.z:-e.z)),...fo(8,n=>new O(n%4<2?e.x:-e.x,n%2?e.y:-e.y,n<4?e.z:-e.z))]}if("CYLINDER"===t.shape)return[...fo(32,e=>new O(t.radius*Math.sin(Math.floor((e+1)/2)*Math.PI/8),t.radius*Math.cos(Math.floor((e+1)/2)*Math.PI/8),-t.height/2)),...fo(32,e=>new O(t.radius*Math.sin(Math.floor((e+1)/2)*Math.PI/8),t.radius*Math.cos(Math.floor((e+1)/2)*Math.PI/8),t.height/2)),...fo(8,e=>new O(Math.floor(e/2)%2?0:e<4?t.radius:-t.radius,Math.floor(e/2)%2?e<4?t.radius:-t.radius:0,e%2?t.height/2:-t.height/2)),new O(0,0,-t.height/2),new O(0,0,t.height/2)];if("CONE"===t.shape)return[...fo(32,e=>new O(t.radius*Math.sin(Math.floor((e+1)/2)*Math.PI/8),t.radius*Math.cos(Math.floor((e+1)/2)*Math.PI/8),-t.height/2)),...fo(8,e=>new O(e%2||Math.floor(e/2)%2?0:e<4?t.radius:-t.radius,e%2?0:Math.floor(e/2)%2?e<4?t.radius:-t.radius:0,e%2?t.height/2:-t.height/2)),new O(0,0,-t.height/2),new O(0,0,t.height/2)];if("SPHERE"===t.shape)return[...fo(32,e=>new O(t.radius*Math.sin(Math.floor((e+1)/2)*Math.PI/8),t.radius*Math.cos(Math.floor((e+1)/2)*Math.PI/8),0)),...fo(32,e=>new O(t.radius*Math.sin(Math.floor((e+1)/2)*Math.PI/8),0,t.radius*Math.cos(Math.floor((e+1)/2)*Math.PI/8))),...fo(32,e=>new O(0,t.radius*Math.sin(Math.floor((e+1)/2)*Math.PI/8),t.radius*Math.cos(Math.floor((e+1)/2)*Math.PI/8)))];if("CAPSULE"===t.shape)return[...this.lineSegmentPointsForShape({shape:"CYLINDER",radius:t.radius,height:t.centersDistance}),...fo(16,e=>new O(t.radius*Math.cos(Math.floor((e+1)/2)*Math.PI/8),0,t.radius*Math.sin(Math.floor((e+1)/2)*Math.PI/8)+t.centersDistance/2)),...fo(16,e=>new O(t.radius*Math.cos(Math.floor((e+1)/2)*Math.PI/8),0,-t.radius*Math.sin(Math.floor((e+1)/2)*Math.PI/8)-t.centersDistance/2)),...fo(16,e=>new O(0,t.radius*Math.cos(Math.floor((e+1)/2)*Math.PI/8),t.radius*Math.sin(Math.floor((e+1)/2)*Math.PI/8)+t.centersDistance/2)),...fo(16,e=>new O(0,t.radius*Math.cos(Math.floor((e+1)/2)*Math.PI/8),-t.radius*Math.sin(Math.floor((e+1)/2)*Math.PI/8)-t.centersDistance/2))];if("CONVEX_HULL"===t.shape)return[...t.vertices.map(n=>[new O(n.x-.05,n.y,n.z),new O(n.x+.05,n.y,n.z),new O(n.x,n.y-.05,n.z),new O(n.x,n.y+.05,n.z),new O(n.x,n.y,n.z-.05),new O(n.x,n.y,n.z+.05)]).reduce((n,r)=>(n.push(...r),n),[])];if("COMPOUND"===t.shape){const e=[];for(const{position:n,shape:r,rotation:s}of t.children){let o=this.lineSegmentPointsForShape(r);if(!o)return null;e.push(...o.map(a=>new O(...Pe.spr(Pe.add(n||Pe.O,Pe.rot(a,s||Yi.O))))))}return e}return null}dispose(){var t,e;this.debugScene=null,null===(t=this.aSub)||void 0===t||t.unsubscribe(),null===(e=this.rSub)||void 0===e||e.unsubscribe(),this.syncMap=new Map}}Ef.activeDebugViews=new Map;class s$ extends Sse{get physicsDebugViewActive(){return this._physicsDebugViewActive}set physicsDebugViewActive(t){this._physicsDebugViewActive!=t&&(this._physicsDebugViewActive=t,this.world&&(t?this.debugView=Ef.startDebugView(this.world,this):(Ef.stopDebugView(this.debugView,this),this.debugView=null)))}constructor(t,e,n,r={}){super(t,n,r),this.scene=t,this.camera=e,this.canvas=n,this.world=null,this.debugView=null,this._physicsDebugViewActive=!1,this.nativeRenderer=new Due(Object.assign({canvas:n,alpha:this.rendererOptions.transparent},this.rendererOptions)),this.nativeRenderer.shadowMap.enabled=!0,this.nativeRenderer.setClearColor(this.rendererOptions.background),this.nativeRenderer.shadowMap.type=c4,this.nativeRenderer.setPixelRatio(this.rendererOptions.forceResolution||devicePixelRatio)}addToWorld(t){this.world=t,this.physicsDebugViewActive&&(this.debugView=Ef.startDebugView(this.world,this))}removeFromWorld(t){this.physicsDebugViewActive&&(Ef.stopDebugView(this.debugView,this),this.debugView=null),this.world=null}resizeRenderer(t){this.nativeRenderer.setSize(t.x,t.y),(this.camera.nativeCamera instanceof yr||"PerspectiveCamera"==this.camera.nativeCamera.type)&&Math.abs(this.camera.nativeCamera.aspect-t.x/t.y)>.01&&(this.camera.nativeCamera.aspect=t.x/t.y,this.camera.nativeCamera.updateProjectionMatrix())}render(){this.nativeRenderer.render(this.scene.nativeScene,this.camera.nativeCamera),this.physicsDebugViewActive&&this.debugView.render(this.nativeRenderer,this.camera.nativeCamera)}dispose(){this.camera.dispose(),this.nativeRenderer.clear(),this.nativeRenderer.dispose(),this.nativeRenderer.domElement=null}}const Kfe={name:"CopyShader",uniforms:{tDiffuse:{value:null},opacity:{value:1}},vertexShader:"\n\n\t\tvarying vec2 vUv;\n\n\t\tvoid main() {\n\n\t\t\tvUv = uv;\n\t\t\tgl_Position = projectionMatrix * modelViewMatrix * vec4( position, 1.0 );\n\n\t\t}",fragmentShader:"\n\n\t\tuniform float opacity;\n\n\t\tuniform sampler2D tDiffuse;\n\n\t\tvarying vec2 vUv;\n\n\t\tvoid main() {\n\n\t\t\tvec4 texel = texture2D( tDiffuse, vUv );\n\t\t\tgl_FragColor = opacity * texel;\n\n\n\t\t}"};class QS{constructor(){this.isPass=!0,this.enabled=!0,this.needsSwap=!0,this.clear=!1,this.renderToScreen=!1}setSize(){}render(){console.error("THREE.Pass: .render() must be implemented in derived pass.")}dispose(){}}const Zfe=new Ib(-1,1,1,-1,0,1),Jfe=new class Qfe extends hn{constructor(){super(),this.setAttribute("position",new ct([-1,3,0,-1,-1,0,3,-1,0],3)),this.setAttribute("uv",new ct([0,2,0,0,2,0],2))}};class epe{constructor(t){this._mesh=new Mn(Jfe,t)}dispose(){this._mesh.geometry.dispose()}render(t){t.render(this._mesh,Zfe)}get material(){return this._mesh.material}set material(t){this._mesh.material=t}}class tpe extends QS{constructor(t,e){super(),this.textureID=void 0!==e?e:"tDiffuse",t instanceof Cl?(this.uniforms=t.uniforms,this.material=t):t&&(this.uniforms=Q4.clone(t.uniforms),this.material=new Cl({name:void 0!==t.name?t.name:"unspecified",defines:Object.assign({},t.defines),uniforms:this.uniforms,vertexShader:t.vertexShader,fragmentShader:t.fragmentShader})),this.fsQuad=new epe(this.material)}render(t,e,n){this.uniforms[this.textureID]&&(this.uniforms[this.textureID].value=n.texture),this.fsQuad.material=this.material,this.renderToScreen?(t.setRenderTarget(null),this.fsQuad.render(t)):(t.setRenderTarget(e),this.clear&&t.clear(t.autoClearColor,t.autoClearDepth,t.autoClearStencil),this.fsQuad.render(t))}dispose(){this.material.dispose(),this.fsQuad.dispose()}}class o$ extends QS{constructor(t,e){super(),this.scene=t,this.camera=e,this.clear=!0,this.needsSwap=!1,this.inverse=!1}render(t,e,n){const r=t.getContext(),s=t.state;let o,a;s.buffers.color.setMask(!1),s.buffers.depth.setMask(!1),s.buffers.color.setLocked(!0),s.buffers.depth.setLocked(!0),this.inverse?(o=0,a=1):(o=1,a=0),s.buffers.stencil.setTest(!0),s.buffers.stencil.setOp(r.REPLACE,r.REPLACE,r.REPLACE),s.buffers.stencil.setFunc(r.ALWAYS,o,4294967295),s.buffers.stencil.setClear(a),s.buffers.stencil.setLocked(!0),t.setRenderTarget(n),this.clear&&t.clear(),t.render(this.scene,this.camera),t.setRenderTarget(e),this.clear&&t.clear(),t.render(this.scene,this.camera),s.buffers.color.setLocked(!1),s.buffers.depth.setLocked(!1),s.buffers.color.setMask(!0),s.buffers.depth.setMask(!0),s.buffers.stencil.setLocked(!1),s.buffers.stencil.setFunc(r.EQUAL,1,4294967295),s.buffers.stencil.setOp(r.KEEP,r.KEEP,r.KEEP),s.buffers.stencil.setLocked(!0)}}class npe extends QS{constructor(){super(),this.needsSwap=!1}render(t){t.state.buffers.stencil.setLocked(!1),t.state.buffers.stencil.setTest(!1)}}class ipe{constructor(t,e){if(this.renderer=t,this._pixelRatio=t.getPixelRatio(),void 0===e){const n=t.getSize(new xe);this._width=n.width,this._height=n.height,(e=new Mu(this._width*this._pixelRatio,this._height*this._pixelRatio,{type:Jm})).texture.name="EffectComposer.rt1"}else this._width=e.width,this._height=e.height;this.renderTarget1=e,this.renderTarget2=e.clone(),this.renderTarget2.texture.name="EffectComposer.rt2",this.writeBuffer=this.renderTarget1,this.readBuffer=this.renderTarget2,this.renderToScreen=!0,this.passes=[],this.copyPass=new tpe(Kfe),this.copyPass.material.blending=Qc,this.clock=new OG}swapBuffers(){const t=this.readBuffer;this.readBuffer=this.writeBuffer,this.writeBuffer=t}addPass(t){this.passes.push(t),t.setSize(this._width*this._pixelRatio,this._height*this._pixelRatio)}insertPass(t,e){this.passes.splice(e,0,t),t.setSize(this._width*this._pixelRatio,this._height*this._pixelRatio)}removePass(t){const e=this.passes.indexOf(t);-1!==e&&this.passes.splice(e,1)}isLastEnabledPass(t){for(let e=t+1;e0?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;l$.fromArray(r,t),yO.fromArray(r,e),c$.fromArray(r,n),Ba.subVectors(c$,yO),d$.subVectors(l$,yO),Ba.cross(d$),Ba.normalize(),s.push(Ba.x,Ba.y,Ba.z),s.push(Ba.x,Ba.y,Ba.z),s.push(Ba.x,Ba.y,Ba.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 d=this.vertices.length;let h=this.parseVertexIndex(t,d),p=this.parseVertexIndex(e,d),m=this.parseVertexIndex(n,d);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?(JS.setRGB(parseFloat(h[4]),parseFloat(h[5]),parseFloat(h[6])).convertSRGBToLinear(),e.colors.push(JS.r,JS.g,JS.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"===d){const p=c.slice(1).trim().split(a$),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 Fo;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 ct(d.normals,3)),d.colors.length>0&&(g=!0,b.setAttribute("color",new ct(d.colors,3))),!0===d.hasUVIndices&&b.setAttribute("uv",new ct(d.uvs,2));const v=[];for(let M=0,x=h.length;M1){for(let M=0,x=h.length;M0){const a=new mf({size:1,sizeAttenuation:!1}),l=new hn;l.setAttribute("position",new ct(e.vertices,3)),e.colors.length>0&&void 0!==e.colors[0]&&(l.setAttribute("color",new ct(e.colors,3)),a.vertexColors=!0);const c=new Vb(l,a);s.add(c)}return s}}class bO extends yf{constructor(t){super(t)}load(t,e,n,r){const s=this,o=""===this.path?Ou.extractUrlBase(t):this.path,a=new La(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,d):c;h=h.toLowerCase();let p=d>=0?c.substring(d+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 hpe(this.resourcePath||e,this.materialOptions);return a.setCrossOrigin(this.crossOrigin),a.setManager(this.manager),a.setMaterials(o),a}}class hpe{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:ac,this.wrap=void 0!==this.options.wrap?this.options.wrap:Pa}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),d=e.loadTexture(function s(a,l){return"string"!=typeof l||""===l?"":/^https?:\/\//i.test(l)?l:a+l}(e.baseUrl,c.url));d.repeat.copy(c.scale),d.offset.copy(c.offset),d.wrapS=e.wrap,d.wrapT=e.wrap,("map"===a||"emissiveMap"===a)&&(d.colorSpace=cs),r[a]=d}for(const a in n){const l=n[a];let c;if(""!==l)switch(a.toLowerCase()){case"kd":r.color=(new qe).fromArray(l).convertSRGBToLinear();break;case"ks":r.specular=(new qe).fromArray(l).convertSRGBToLinear();break;case"ke":r.emissive=(new qe).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 zS(r),this.materials[t]}getTextureParams(t,e){const n={scale:new xe(1,1),offset:new xe(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:wG;let a=o.getHandler(t);null===a&&(a=new Pu(o)),a.setCrossOrigin&&a.setCrossOrigin(this.crossOrigin);const l=a.load(t,n,r,s);return void 0!==e&&(l.mapping=e),l}}const fpe=["determinateSpinner"];function ppe(i,t){if(1&i&&(ki(),W(0,"svg",11),De(1,"circle",12),j()),2&i){const e=he();Dt("viewBox",e._viewBox()),G(1),jo("stroke-dasharray",e._strokeCircumference(),"px")("stroke-dashoffset",e._strokeCircumference()/2,"px")("stroke-width",e._circleStrokeWidth(),"%"),Dt("r",e._circleRadius())}}const mpe=Qy(class{constructor(i){this._elementRef=i}},"primary"),gpe=new me("mat-progress-spinner-default-options",{providedIn:"root",factory:function _pe(){return{diameter:u$}}}),u$=100;let Jb=(()=>{class i extends mpe{constructor(e,n,r){super(e),this.mode="mat-spinner"===this._elementRef.nativeElement.nodeName.toLowerCase()?"indeterminate":"determinate",this._value=0,this._diameter=u$,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,ks(e)))}get diameter(){return this._diameter}set diameter(e){this._diameter=ks(e)}get strokeWidth(){return this._strokeWidth??this.diameter/10}set strokeWidth(e){this._strokeWidth=ks(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)(E(mt),E(Rr,8),E(gpe))},i.\u0275cmp=ot({type:i,selectors:[["mat-progress-spinner"],["mat-spinner"]],viewQuery:function(e,n){if(1&e&&Wn(fpe,5),2&e){let r;Et(r=At())&&(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&&(Dt("aria-valuemin",0)("aria-valuemax",100)("aria-valuenow","determinate"===n.mode?n.value:null)("mode",n.mode),jo("width",n.diameter,"px")("height",n.diameter,"px"),un("_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:[lt],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&&(fe(0,ppe,2,8,"ng-template",null,0,Vc),W(2,"div",1,2),ki(),W(4,"svg",3),De(5,"circle",4),j()(),ga(),W(6,"div",5)(7,"div",6)(8,"div",7),sy(9,8),j(),W(10,"div",9),sy(11,8),j(),W(12,"div",10),sy(13,8),j()()()),2&e){const r=Zi(1);G(4),Dt("viewBox",n._viewBox()),G(1),jo("stroke-dasharray",n._strokeCircumference(),"px")("stroke-dashoffset",n._strokeDashOffset(),"px")("stroke-width",n._circleStrokeWidth(),"%"),Dt("r",n._circleRadius()),G(4),U("ngTemplateOutlet",r),G(2),U("ngTemplateOutlet",r),G(2),U("ngTemplateOutlet",r)}},dependencies:[xy],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})(),ype=(()=>{class i{}return i.\u0275fac=function(e){return new(e||i)},i.\u0275mod=nn({type:i}),i.\u0275inj=Kt({imports:[Eo,Qn]}),i})();const bpe=["previewCanvasContainer"],xpe=["previewCanvas"];function wpe(i,t){if(1&i){const e=di();Gr(0),W(1,"label",11),Ve(2),j(),W(3,"input",12),Ue("change",function(r){an(e);const s=he().$implicit;return s.value=r.currentTarget.checked,zt(s.change(s.value))}),j(),$r()}if(2&i){const e=he(),n=e.index,r=e.$implicit,s=he().index;G(1),U("for","custom_control_"+s+"_"+n),G(1),_i(r.label),G(1),U("id","custom_control_"+s+"_"+n)("type",r.type)("checked",r.value)}}function Mpe(i,t){if(1&i){const e=di();W(0,"div",9)(1,"label",11),Ve(2),j(),W(3,"input",14),Ue("change",function(){const s=an(e).$implicit,o=he(2).$implicit;return o.value=s,zt(o.change(o.value))}),j()()}if(2&i){const e=t.$implicit,n=he(2),r=n.index,s=n.$implicit,o=he().index;G(1),U("for","custom_control_"+o+"_"+r+"_"+e),G(1),_i(e),G(1),U("id","custom_control_"+o+"_"+r+"_"+e)("checked",s.value===e)}}function Cpe(i,t){if(1&i&&(W(0,"div",13)(1,"label"),Ve(2),j(),fe(3,Mpe,4,4,"div",8),j()),2&i){const e=he().$implicit;G(2),_i(e.label),G(1),U("ngForOf",e.options)}}function Spe(i,t){if(1&i){const e=di();Gr(0),W(1,"label",11),Ve(2),j(),W(3,"input",15),Ue("colorChange",function(r){an(e);const s=he().$implicit,o=he(2);return s.value=o.toRGB(r.value),zt(s.change(s.value))}),j(),De(4,"ngx-mat-color-toggle",16)(5,"ngx-mat-color-picker",null,17),$r()}if(2&i){const e=Zi(6),n=he(),r=n.index,s=n.$implicit,o=he().index;G(1),U("for","custom_control_"+o+"_"+r),G(1),_i(s.label),G(1),U("ngxMatColorPicker",e),G(1),U("for",e)}}function Epe(i,t){if(1&i){const e=di();Gr(0),W(1,"label",11),Ve(2),j(),W(3,"input",18),Ue("change",function(r){an(e);const s=he().$implicit;return s.value=r.currentTarget.value,zt(s.change(s.value))}),j(),$r()}if(2&i){const e=he(),n=e.index,r=e.$implicit,s=he().index;G(1),U("for","custom_control_"+s+"_"+n),G(1),_i(r.label),G(1),U("id","custom_control_"+s+"_"+n)("min",r.minValue)("max",r.maxValue)("step",r.valueStep)("value",r.value)}}function Ape(i,t){if(1&i&&(W(0,"div",9),fe(1,wpe,4,5,"ng-container",6),fe(2,Cpe,4,2,"div",10),fe(3,Spe,7,4,"ng-container",6),fe(4,Epe,4,7,"ng-container",6),j()),2&i){const e=t.$implicit;G(1),U("ngIf","checkbox"===e.type),G(1),U("ngIf","radio"===e.type),G(1),U("ngIf","color"===e.type),G(1),U("ngIf","slider"===e.type)}}function Dpe(i,t){if(1&i&&(Gr(0),W(1,"h4"),Ve(2),j(),fe(3,Ape,5,4,"div",8),$r()),2&i){const e=t.$implicit;G(2),_i(e.title),G(1),U("ngForOf",e.controls)}}function Tpe(i,t){if(1&i){const e=di();W(0,"div",9)(1,"label",11),Ve(2),j(),W(3,"input",19),Ue("change",function(r){return zt(an(e).$implicit.visible=r.currentTarget.checked)}),j()()}if(2&i){const e=t.$implicit;G(1),U("for","visibility_"+e.name),G(1),_i(e.name),G(1),U("id","visibility_"+e.name)("checked",e.visible)}}function Ipe(i,t){if(1&i&&(Gr(0),W(1,"h4"),Ve(2,"Objects visibility"),j(),fe(3,Tpe,4,4,"div",8),$r()),2&i){const e=he();G(3),U("ngForOf",e.meshes)}}function Rpe(i,t){1&i&&De(0,"mat-spinner",20)}const ia=i=>{i.colorSpace="srgb",i.anisotropy=8,i.magFilter=_r,i.minFilter=_r};let h$=(()=>{class i{constructor(e){this.cdr=e,this.visibilityControls=!0,this.groupFunction=null,this.customControls=[],this.onObjectLoaded=new We,this._paths$=new gt(null),this.destroyed$=new Re,this.entity=null,this.meshes=[]}get paths(){return this._paths$.getValue()}set paths(e){this._paths$.next(e)}ngAfterViewInit(){var e=this;return tt(function*(){var s;e.world=new sk(new vO,{init:(s=tt(function*(){}),function(){return s.apply(this,arguments)}),simulate:()=>{}}),yield e.world.init(),e.world.visualScene.nativeScene.add(new $S(16777215,2));let n=new gt({x:1,y:1});e.renderer=e.world.addRenderer(e.world.visualScene.factory.createPerspectiveCamera({frustrum:{near:.01,far:1e4}}),e.previewCanvas.nativeElement,{size:n.asObservable(),background:11184810}),e.controller=new Rse(e.renderer,{mouseOptions:{canvas:e.previewCanvas.nativeElement},orbiting:{sensitivityX:2,sensitivityY:2},orbitingElasticity:30}),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(He(e.destroyed$)).subscribe(function(){var s=tt(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 Qb,h=yield(new bO).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 Fo;y.add(...b[v]),y.name=v,p.remove(...b[v]),p.add(y)}}e.meshes=p.children,e.meshes.sort((b,v)=>b.name>v.name?1:-1),p.traverse(b=>{if(b instanceof Mn){const v=b.material instanceof Array?b.material:[b.material];for(const y of v)y.transparent=!0,y.alphaTest=.5,y instanceof qi&&y.map&&(y.map.wrapS=Ii,y.map.wrapT=Ii,ia(y.map),y.map.needsUpdate=!0)}}),e.onObjectLoaded.next(p),e.entity=new Zo({object3D:new na(p)}),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=Pe.scalarMult(Pe.add(m.min,m.max),.5),e.controller.spherical={phi:1.22,theta:-1.32,radius:Pe.dist(m.min,m.max)},e.cdr.markForCheck()}});return function(o){return s.apply(this,arguments)}}())})()}toRGB(e){return(e?.r||0)<<16|(e?.g||0)<<8|(e?.b||0)}ngOnDestroy(){this.destroyed$.next(),this.destroyed$.complete()}}return i.\u0275fac=function(e){return new(e||i)(E(Zn))},i.\u0275cmp=ot({type:i,selectors:[["app-obj-viewer"]],viewQuery:function(e,n){if(1&e&&(Wn(bpe,5),Wn(xpe,5)),2&e){let r;Et(r=At())&&(n.previewCanvasContainer=r.first),Et(r=At())&&(n.previewCanvas=r.first)}},inputs:{paths:"paths",visibilityControls:"visibilityControls",groupFunction:"groupFunction",customControls:"customControls"},outputs:{onObjectLoaded:"onObjectLoaded"},decls:8,vars:3,consts:[[1,"previewCanvasContainer"],["previewCanvasContainer",""],["width","640","height","480"],["previewCanvas",""],["id","controls"],[4,"ngFor","ngForOf"],[4,"ngIf"],["mode","indeterminate",4,"ngIf"],["class","controls-list",4,"ngFor","ngForOf"],[1,"controls-list"],["style","width: 100%",4,"ngIf"],[3,"for"],[3,"id","type","checked","change"],[2,"width","100%"],["type","radio",3,"id","checked","change"],["matInput","",1,"hidden",3,"ngxMatColorPicker","colorChange"],["matSuffix","",3,"for"],["picker",""],["type","range",3,"id","min","max","step","value","change"],["type","checkbox",3,"id","checked","change"],["mode","indeterminate"]],template:function(e,n){1&e&&(W(0,"div",0,1),De(2,"canvas",2,3),W(4,"div",4),fe(5,Dpe,4,2,"ng-container",5),fe(6,Ipe,4,1,"ng-container",6),j(),fe(7,Rpe,1,0,"mat-spinner",7),j()),2&e&&(G(5),U("ngForOf",n.customControls),G(1),U("ngIf",n.visibilityControls),G(1),U("ngIf",!n.entity))},dependencies:[So,vi,qte,ic,Jb,Wie,bC,LH],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%] > h4[_ngcontent-%COMP%]{margin:0}.previewCanvasContainer[_ngcontent-%COMP%] #controls[_ngcontent-%COMP%] .controls-list[_ngcontent-%COMP%]{width:100%;display:flex;-webkit-user-select:none;user-select:none;align-items:center}.previewCanvasContainer[_ngcontent-%COMP%] #controls[_ngcontent-%COMP%] .controls-list[_ngcontent-%COMP%] > span[_ngcontent-%COMP%]{flex-grow:1}.previewCanvasContainer[_ngcontent-%COMP%] #controls[_ngcontent-%COMP%] .controls-list[_ngcontent-%COMP%] > label[_ngcontent-%COMP%]{flex-grow:1}"],changeDetection:0}),i})();function kpe(i,t){if(1&i&&(ki(),De(0,"circle",5),Ct(1,"async"),Ct(2,"async")),2&i){const e=he();let n,r;Dt("cx",(null==(n=Tt(1,3,e.mapPointer$))?null:n.x)||0)("cy",(null==(r=Tt(2,5,e.mapPointer$))?null:r.y)||0)("r",10)}}const Ppe=function(){return{"stroke-width":3}};let f$=(()=>{class i{constructor(e){this.ref=e,this._roadSpline$=new gt([]),this._pointer$=new gt(null),this.splineClosed=!1,this.svgSize$=new gt({x:100,y:100}),this.scalingSquare$=new gt({x:0,y:0,width:100,height:100}),this.mapPolyline$=new gt(""),this.mapPointer$=new gt(null),this.destroyed$=new Re}set roadSpline(e){this._roadSpline$.next(e)}set pointer(e){this._pointer$.next(e)}get trackLength$(){return this._roadSpline$.pipe(et(e=>{let n=0;for(let r=1;r{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$),nu([this._roadSpline$,this.scalingSquare$,this.svgSize$]).pipe(He(this.destroyed$),et(([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$),nu([this._pointer$,this.scalingSquare$.asObservable(),this.svgSize$]).pipe(He(this.destroyed$),et(([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)(E(mt))},i.\u0275cmp=ot({type:i,selectors:[["app-tri-minimap"]],inputs:{roadSpline:"roadSpline",pointer:"pointer",splineClosed:"splineClosed"},decls:13,vars:16,consts:[[1,"container"],["shape-rendering","geometricPrecision"],[2,"fill","none","stroke","#333333",3,"ngStyle"],["fill","#e30","stroke","black","stroke-width","3",4,"ngIf"],[1,"info_div"],["fill","#e30","stroke","black","stroke-width","3"]],template:function(e,n){if(1&e&&(W(0,"div",0),ki(),W(1,"svg",1),Ct(2,"async"),Ct(3,"async"),De(4,"polyline",2),Ct(5,"async"),Ve(6," cars "),fe(7,kpe,3,7,"circle",3),Ct(8,"async"),j(),ga(),W(9,"div",4)(10,"span"),Ve(11),Ct(12,"async"),j()()()),2&e){let r,s;G(1),Dt("viewBox","0 0 "+(null==(r=Tt(2,5,n.svgSize$))?null:r.x)+" "+(null==(r=Tt(3,7,n.svgSize$))?null:r.y)),G(3),U("ngStyle",so(15,Ppe)),Dt("points",Tt(5,9,n.mapPolyline$)),G(3),U("ngIf",Tt(8,11,n.mapPointer$)),G(4),Qi("Track length (m): ",null==(s=Tt(12,13,n.trackLength$))?null:s.toFixed(2),"")}},dependencies:[vi,tM,pl],styles:["[_nghost-%COMP%]{overflow:auto}.container[_ngcontent-%COMP%]{position:relative;width:100%;height:100%}.container[_ngcontent-%COMP%] svg[_ngcontent-%COMP%]{position:absolute;width:100%;height:100%}.container[_ngcontent-%COMP%] .info_div[_ngcontent-%COMP%]{color:#838383}"],changeDetection:0}),i})();const Ope=["previewCanvasContainer"],Fpe=["previewCanvas"];function Lpe(i,t){if(1&i&&(W(0,"mat-option",19),Ve(1),j()),2&i){const e=t.$implicit;U("value",e),G(1),Qi(" ",e," ")}}function Npe(i,t){if(1&i){const e=di();Gr(0),W(1,"mat-form-field",1)(2,"mat-label"),Ve(3,"Custom FAM path"),j(),De(4,"input",20,21),Ct(6,"async"),j(),W(7,"button",22),Ue("click",function(){an(e);const r=Zi(5);return zt(he().onFamSelected(r.value))}),Ve(8,"LOAD"),j(),$r()}if(2&i){const e=he();G(4),U("value",Tt(6,1,e.previewFamLocation$))}}function Bpe(i,t){1&i&&De(0,"mat-spinner",23),2&i&&U("diameter",40)}function Upe(i,t){1&i&&De(0,"mat-spinner",24)}const Vpe=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 Af=(()=>{return(i=Af||(Af={})).ThreeModel="model",i.Bitmap="bitmap",i.TwoSidedBitmap="two_sided_bitmap",Af;var i})();class zpe extends QH{constructor(t,e,n){super(t,{loadDepth:40,inertia:2}),this.mapGraph=t,this.famPath=e,this.hideUnknownEntities$=n,this.textureLoader=new Pu,this.terrainMaterials={},this.objLoader=new Qb,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(Zl(),He(this._onRemoved$)).subscribe(e=>{for(const n of this.unknownEntities)n.visible=!e})}getPlaceholderTexture(){var t=this;return tt(function*(){return t._placeholder?t._placeholder:(t._placeholderPromise||(t._placeholderPromise=t.textureLoader.loadAsync("assets/placeholder_texture.png")),t._placeholderPromise)})()}getPlaceholderTerrainTexture(){var t=this;return tt(function*(){return t._placeholderTerrain?t._placeholderTerrain:(t._placeholderTerrainPromise||(t._placeholderTerrainPromise=t.textureLoader.loadAsync("assets/placeholder_texture.png").then(e=>(e.wrapS=Pa,e.wrapT=Ii,ia(e),e.flipY=!0,e))),t._placeholderTerrainPromise)})()}loadChunk(t){var e=this;return tt(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 Mn&&(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:Pe.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:Yi.fromAngle(Pe.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 Zo({object3D:new na(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 qi({side:Ls,transparent:!0,visible:!1}),this.famPath?this.textureLoader.loadAsync(`${this.famPath}/background/${t}.png`).then(e=>{e.wrapS=Pa,e.wrapT=Ii,ia(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 tt(function*(){let n=!1;if(t.type==Af.ThreeModel){let r;try{if(!e.famPath)throw new Error;const o=new bO,a=new Qb,l=yield o.loadAsync(`${e.famPath}/props/${t.data.data.resource_id}/0/material.mtl`);l.preload(),a.setMaterials(l),r=new na(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 Mn){const a=o.material instanceof Array?o.material:[o.material];for(const l of a)l.transparent=!0,l.alphaTest=.5,l instanceof qi&&l.map&&(l.map.wrapS=Ii,l.map.wrapT=Ii,ia(l.map),l.map.needsUpdate=!0)}});const s=new Zo({object3D: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==Af.Bitmap||t.type==Af.TwoSidedBitmap){const r=(c,d)=>new Array(d).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 Fo,[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==Af.TwoSidedBitmap){const[c,d]=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 Zo({object3D:new na(s)});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 tt(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=>(ia(h),new qi({map:h,alphaTest:.5,transparent:!0,side:Ls}))),d=new Mn(new Iu(e.x,e.y),c[0]);if(d.rotateX(Math.PI/2),d.position.set(0,0,e.y/2),c.length>1){let h=-1;Ym(r.world).pipe(o4(n&&!isNaN(+n)?1e3*+n:250)).subscribe(()=>{h=(h+1)%c.length,d.material=c[h]})}return[d,a]})()}}let Hpe=(()=>{class i{constructor(e,n,r){this.eelDelegate=e,this.cdr=n,this.mainService=r,this._resource$=new gt(null),this.changed=new We,this.previewLoading$=new gt(!0),this.previewFamLocation$=new gt(null),this.previewFamLoading$=new gt(!1),this.pointer$=new gt(null),this.selectedSplineIndex$=new gt(0),this.selectedSplineItem$=new gt(null),this.selectedAiInfoItem$=new gt(null),this.selectedTerrainItem$=new gt(null),this.famPath=null,this.name="",this.renderer=null,this.map=null,this.isOpenedTrack=!0,this.roadPath=null,this.destroyed$=new Re}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 tt(function*(){var s;e.world=new sk(new vO,{init:(s=tt(function*(){}),function(){return s.apply(this,arguments)}),simulate:()=>{},loader:{loadFromGgGlb:function(){var s=tt(function*(...o){return[]});return function(){return s.apply(this,arguments)}}()}}),yield e.world.init(),e.skySphere=new Zo({object3D:e.world.visualScene.factory.createPrimitive({shape:"SPHERE",radius:1e3},{color:16777215})}),e.skySphere.object3D.nativeMesh.material.side=Ls,e.world.addEntity(e.skySphere),e.selectionSphere=new Zo({object3D: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 $S(16777215,2));let n=new gt({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=Yi.lookAt(e.renderer.camera.position,Pe.add(e.renderer.camera.position,Pe.Y),Pe.Z),Ym(e.world).pipe(He(e.destroyed$)).subscribe(()=>{e.renderer&&(e.skySphere.position=e.renderer.camera.position,e.pointer$.next(e.renderer.camera.position))}),e.controller=new n4(e.world.keyboardInput,e.renderer,{mouseOptions:{canvas:e.previewCanvas.nativeElement,pointerLock:!0},keymap:"wasd+arrows",cameraLinearSpeed:40,cameraBoostMultiplier:4,cameraMovementElasticity:100,cameraRotationElasticity:30,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(He(e.destroyed$)).subscribe(function(){var s=tt(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(He(e.destroyed$),gn(([s,o])=>!!e.resource&&s.startsWith(e.resource.id)),ml(3e3)).subscribe(tt(function*(){e.previewLoading$.next(!0),yield e.postTmpUpdates(e.resource?.id),yield e.loadPreview(),e.previewLoading$.next(!1)})),e.selectedSplineIndex$.pipe(He(e.destroyed$),ml(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=Pe.add(a,Pe.rotAround({x:10,y:-12,z:5},{x:0,y:0,z:1},-e.resource.data.road_spline[s].orientation)),e.renderer.rotation=Yi.lookAt(e.renderer.position,a,{x:0,y:0,z:1}),e.controller.reset())}e.selectedSplineItem$.next({id:rc(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:rc(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:rc(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 tt(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 Pu,o=r.find(a=>a.endsWith("spherical.png"));if(o){const a=yield s.loadAsync(o);a.colorSpace="srgb",a.mapping=lc,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 tt(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 tt(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=Km.fromMapArray(e.roadPath.map((r,s)=>({path:`${e.terrainChunksObjLocation}terrain_chunk_${s}`,position:r,loadOptions:{}}))||[],!e.isOpenedTrack);e.unloadPreview(),e.map=new zpe(n,e.famPath&&"resources/"+e.famPath,e.mainService.hideHiddenFields$),e.map.resource=e.resource,e.map.isOpenedTrack=e.isOpenedTrack,Ym(e.world).pipe(He(e.destroyed$)).subscribe(()=>{e.map&&e.renderer&&e.map.loaderCursor$.next(e.renderer.position)}),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 tt(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)(E(Ql),E(Zn),E(ka))},i.\u0275cmp=ot({type:i,selectors:[["app-tri-map-block-ui"]],viewQuery:function(e,n){if(1&e&&(Wn(Ope,5),Wn(Fpe,5)),2&e){let r;Et(r=At())&&(n.previewCanvasContainer=r.first),Et(r=At())&&(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&&(W(0,"div",0)(1,"h4"),Ve(2,"Preview *.FAM file"),j(),W(3,"mat-form-field",1)(4,"mat-label"),Ve(5,"Current preview FAM"),j(),W(6,"mat-select",2,3),Ue("valueChange",function(s){return n.onFamSelected(s)}),Ct(8,"async"),Ct(9,"async"),fe(10,Lpe,2,2,"mat-option",4),W(11,"mat-option",5),Ve(12,"custom"),j()()(),fe(13,Npe,9,3,"ng-container",6),fe(14,Bpe,1,1,"mat-spinner",7),Ct(15,"async"),j(),W(16,"div",8)(17,"div",9,10),De(19,"canvas",11,12),fe(21,Upe,1,0,"mat-spinner",13),Ct(22,"async"),j(),W(23,"div",14,10)(25,"mat-form-field",1)(26,"mat-label"),Ve(27,"Spline item"),j(),W(28,"input",15),Ue("ngModelChange",function(s){return n.selectedSplineIndex$.next(s)}),Ct(29,"async"),Ct(30,"async"),j()(),De(31,"app-tri-minimap",16),Ct(32,"async"),j()(),W(33,"h4"),Ve(34,"Road spline item"),j(),De(35,"app-compound-block-ui",17),Ct(36,"async"),W(37,"h4"),Ve(38,"AI info (block for 4 spline items)"),j(),De(39,"app-compound-block-ui",17),Ct(40,"async"),W(41,"h4"),Ve(42,"Terrain (block for 4 spline items)"),j(),De(43,"app-compound-block-ui",17),Ct(44,"async"),W(45,"h4"),Ve(46,"Common"),j(),De(47,"app-compound-block-ui",18),Ct(48,"async")),2&e){const r=Zi(7);let s;G(6),U("value",n.previewFamPossibleLocations.includes(Tt(8,20,n.previewFamLocation$))?Tt(9,22,n.previewFamLocation$):"custom"),G(4),U("ngForOf",n.previewFamPossibleLocations),G(3),U("ngIf","custom"==r.value),G(1),U("ngIf",Tt(15,24,n.previewFamLoading$)),G(7),U("ngIf",Tt(22,26,n.previewLoading$)),G(7),U("min",0)("max",4*(null==(s=Tt(29,28,n._resource$))?null:s.data.num_chunks)-1)("ngModel",Tt(30,30,n.selectedSplineIndex$)),G(3),U("roadSpline",n.roadSpline)("pointer",Tt(32,32,n.pointer$))("splineClosed",!n.isOpenedTrack),G(4),U("resource",Tt(36,34,n.selectedSplineItem$))("hideBlockActions",!0),G(4),U("resource",Tt(40,36,n.selectedAiInfoItem$))("hideBlockActions",!0),G(4),U("resource",Tt(44,38,n.selectedTerrainItem$))("hideBlockActions",!0),G(4),U("resource",Tt(48,40,n._resource$))("hideBlockActions",!0)("fieldWhitelist",so(42,Vpe))}},dependencies:[So,vi,gl,mu,tc,_u,gu,Kc,vl,To,ic,ib,fb,Nm,Jb,Jl,f$,pl],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})();const p$=i=>new Promise(t=>setTimeout(t,i)),m$=(i,t,e=null)=>{const n=document.createElement("canvas"),r=n.getContext("2d",{willReadFrequently:!0}),s=i.width,o=i.height;n.width=s,n.height=o,r.drawImage(i,0,0,s,o);const a=r.getImageData(0,0,s,o);for(let l=0;l{if(!(o instanceof Mn))return;let a=-1;if(o.name.startsWith("lbl__rt_frnt")?a=0:o.name.startsWith("lbl__lt_frnt")?a=1:o.name.startsWith("lbl__rt_rear")?a=2:o.name.startsWith("lbl__lt_rear")&&(a=3),a>-1){this.wheels[a]=o,a<2&&(this.frontWheels[a]=o),o.geometry.boundingBox||o.geometry.computeBoundingBox();const l=Pe.avg(o.geometry.boundingBox.min,o.geometry.boundingBox.max);o.geometry.translate(...Pe.spr(Pe.neg(l))),o.position.set(...Pe.spr(l)),this.wheelIdlePositions[a]=l}(o.name.includes("rsid")||o.name.includes("lite"))&&(r.push(o),this.originalTexWithTailLights=o.material.map)}),!this.originalTexWithTailLights)throw new Error("Not a driveable NFS1 car");this.tailLightColors=n.includes("TRAFFC.CFM")?[9509903,16711680]:[3212546,16258068],this.texWithTailLightsImg=document.createElement("img"),this.texWithTailLights=new ko(this.texWithTailLightsImg),this.texWithTailLights.flipY=this.originalTexWithTailLights.flipY,ia(this.texWithTailLights),this.recolorTailLights(this.tailLightColors[0]).then();for(const o of r)o.material.map=this.texWithTailLights;const s=new Pu;this.tyreTextures=[1,2,3,4].map(o=>s.load(`${n}/tyr${o}.png`));for(const o of this.tyreTextures)ia(o);this.tyreMaterial=new qi({map:this.tyreTextures[0]}),this.tyreMaterial.transparent=!0,this.tyreMaterial.alphaTest=.5,this.tyreMaterial.map.wrapS=Ii,this.tyreMaterial.map.wrapT=Ii,this.tyreMaterial.polygonOffset=!0,this.tyreMaterial.polygonOffsetFactor=-4;for(const o of this.wheels)o.material=this.tyreMaterial}get tailLightsOn(){return this._tailLightsOn}set tailLightsOn(t){t!==this._tailLightsOn&&(this._tailLightsOn=t,this.recolorTailLights(this.tailLightColors[t?1:0]))}get speed(){return this._speed}set speed(t){if(t!==this._speed){switch(this._speed=t,this.tyreTextureUpdateTimer&&clearInterval(this.tyreTextureUpdateTimer),t){case"idle":this.tyreMaterial.map=this.tyreTextures[0];break;case"slow":let e=!0;this.tyreTextureUpdateTimer=setInterval(()=>{this.tyreMaterial.map=this.tyreTextures[e?1:2],this.tyreMaterial.needsUpdate=!0,e=!e},16);break;case"fast":this.tyreMaterial.map=this.tyreTextures[3]}this.tyreMaterial.needsUpdate=!0}}get steeringAngle(){return this._steeringAngle}set steeringAngle(t){if(t!==this._steeringAngle){this._steeringAngle=t;for(const e of this.frontWheels)e.rotation.set(0,0,t)}}recolorTailLights(t){var e=this;return tt(function*(){if(e.originalTexWithTailLights&&e.texWithTailLights&&e.texWithTailLightsImg){for(let n=100;n>0&&!e.originalTexWithTailLights.source.data;n--)yield p$(50);((i,t,e,n=null)=>{const[r,s,o]=[t>>16,t>>8&255,255&t],[a,l,c]=[e>>16,e>>8&255,255&e];m$(i,(d,h)=>{d[h]==r&&d[h+1]==s&&d[h+2]==o&&(d[h]=a,d[h+1]=l,d[h+2]=c)},n)})(e.originalTexWithTailLights.source.data,e.tailLightsTexColor,t,e.texWithTailLightsImg),e.texWithTailLights.needsUpdate=!0}})()}dispose(){this.texWithTailLightsImg&&(this.texWithTailLightsImg.remove(),this.texWithTailLightsImg=null),this.texWithTailLights&&(this.texWithTailLights.dispose(),this.texWithTailLights=null),this.tyreTextureUpdateTimer&&clearInterval(this.tyreTextureUpdateTimer),this.tyreMaterial&&(this.tyreMaterial.dispose(),this.tyreMaterial=null)}}let Wpe=(()=>{class i{constructor(e,n,r){this.eelDelegate=e,this.mainService=n,this.cdr=r,this._resource$=new gt(null),this.changed=new We,this.previewPaths$=new gt(null),this.destroyed$=new Re,this.customControls=[],this.serializerSettings={geometry__save_obj:!0,geometry__save_blend:!1,geometry__export_to_gg_web_engine:!1}}get resource(){return this._resource$.getValue()}set resource(e){this._resource$.next(e)}ngAfterViewInit(){var e=this;return tt(function*(){e._resource$.pipe(He(e.destroyed$)).subscribe(function(){var n=tt(function*(r){e.previewPaths$.next(yield e.loadPreviewFilePaths(r?.id))});return function(r){return n.apply(this,arguments)}}()),e.mainService.dataBlockChange$.pipe(He(e.destroyed$),gn(([n,r])=>!!e.resource&&n.startsWith(e.resource.id)),ml(1500)).subscribe(tt(function*(){e.previewPaths$.next(null),e.previewPaths$.next(yield e.postTmpUpdates(e.resource?.id))}))})()}onObjectLoaded(e){var n=this;return tt(function*(){if((n._resource$.value?.id||"").includes(".CFM__"))try{const r=n.resource?.id.split("/");r.pop(),r[r.length-1]=""+(+r[r.length-1]+1);const s=yield n.eelDelegate.retrieveValue(r.join("/")+"/data"),o=s.children_aliases.findIndex(l=>"!PAL"===l);if(-1==o)throw new Error("Not a car");const a=new $pe(e,s.children[o].data.colors[254]>>>8,n.previewPaths$.value[0].substring(0,n.previewPaths$.value[0].lastIndexOf("/"))+"/assets");n.customControls=[{title:"TNFS car features",controls:[{label:"Brake lights on",type:"checkbox",value:!1,change:l=>{a.tailLightsOn=l}},{label:"Car speed",type:"radio",options:["idle","slow","fast"],value:"idle",change:l=>{a.speed=l}},{label:"Steering angle",type:"slider",minValue:-.7,maxValue:.7,valueStep:.05,value:0,change:l=>{a.steeringAngle=l}}]}],n.cdr.markForCheck()}catch{}})()}postTmpUpdates(e){var n=this;return tt(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 tt(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)(E(Ql),E(ka),E(Zn))},i.\u0275cmp=ot({type:i,selectors:[["app-orip-geometry-block-ui"]],inputs:{resource:"resource"},outputs:{changed:"changed"},decls:4,vars:7,consts:[[3,"paths","customControls","onObjectLoaded"],[3,"resource"]],template:function(e,n){1&e&&(W(0,"app-obj-viewer",0),Ue("onObjectLoaded",function(s){return n.onObjectLoaded(s)}),Ct(1,"async"),j(),De(2,"app-compound-block-ui",1),Ct(3,"async")),2&e&&(U("paths",Tt(1,3,n.previewPaths$))("customControls",n.customControls),G(2),U("resource",Tt(3,5,n._resource$)))},dependencies:[Jl,h$,pl],changeDetection:0}),i})();const jpe=["class","block-ui"];function Ype(i,t){if(1&i&&(W(0,"mat-label",7),Ve(1),j()),2&i){const e=he(2);U("matTooltip",e.resourceDescription),G(1),Qi("",null==e.resource?null:e.resource.name," ")}}function qpe(i,t){if(1&i&&(W(0,"mat-option",8),Ve(1),j()),2&i){const e=t.$implicit,n=t.index,r=he(2);U("value",n)("disabled",r.disabled),G(1),Qi(" ",e.block_class_mro.split("__")[0]," ")}}function Xpe(i,t){if(1&i){const e=di();Gr(0),fe(1,Ype,2,2,"mat-label",1),Ct(2,"async"),W(3,"div",2)(4,"mat-label"),Ve(5,"Resource type:"),j(),W(6,"mat-select",3),Ue("selectionChange",function(r){return an(e),zt(he().setChoiceIndex(r.value))}),fe(7,qpe,2,3,"mat-option",4),j(),De(8,"app-block-actions",5),j(),De(9,"app-editor",6),$r()}if(2&i){const e=he();let n;G(1),U("ngIf",(null==e.resource?null:e.resource.name)&&(null==e.resource?null:e.resource.name)!=(null==(n=Tt(2,8,e.main.resource$))?null:n.name)),G(5),U("value",e.resourceData.choice_index)("disabled",e.disabled),G(1),U("ngForOf",e.resource.schema.possible_resource_schemas),G(1),U("resource",e.childResource),G(1),U("resource",e.childResource)("hideBlockActions",!0)("disabled",e.disabled)}}let g$=(()=>{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 We}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:rc(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)(E(ka))},i.\u0275cmp=ot({type:i,selectors:[["app-delegate",8,"block-ui"]],inputs:{resource:"resource",resourceDescription:"resourceDescription",hideBlockActions:"hideBlockActions",disabled:"disabled"},outputs:{changed:"changed"},attrs:jpe,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"],[3,"resource","hideBlockActions","disabled"],["matTooltipPosition","above",3,"matTooltip"],[3,"value","disabled"]],template:function(e,n){1&e&&fe(0,Xpe,10,10,"ng-container",0),2&e&&U("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 Kpe=["class","block-ui"];function Zpe(i,t){if(1&i&&(W(0,"mat-label",7),Ve(1),j()),2&i){const e=he(2);U("matTooltip",e.resourceDescription),G(1),Qi(" ",e.resource.name," ")}}function Qpe(i,t){if(1&i){const e=di();Gr(0),fe(1,Zpe,2,2,"mat-label",1),W(2,"mat-selection-list",2),Ue("selectionChange",function(r){return an(e),zt(he().onSelection(r))}),W(3,"mat-list-option",3),Ve(4," Left "),j(),W(5,"mat-list-option",4),Ve(6," Right "),j()(),W(7,"mat-form-field",5)(8,"mat-label"),Ve(9,"Texture ID"),j(),W(10,"input",6),Ue("ngModelChange",function(r){return an(e),zt(he().resource.data.texture_id=r)})("change",function(){return an(e),zt(he().changed.emit())}),j()(),$r()}if(2&i){const e=he();G(1),U("ngIf",e.resource.name),G(2),U("selected",e.resource.data.has_left_fence),G(2),U("selected",e.resource.data.has_right_fence),G(5),U("max",63)("min",0)("step",1)("ngModel",e.resource.data.texture_id)}}let Jpe=(()=>{class i{constructor(){this.resource=null,this.resourceDescription="",this.changed=new We}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=ot({type:i,selectors:[["app-fence-type",8,"block-ui"]],inputs:{resource:"resource",resourceDescription:"resourceDescription"},outputs:{changed:"changed"},attrs:Kpe,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&&fe(0,Qpe,11,7,"ng-container",0),2&e&&U("ngIf",n.resource)},dependencies:[vi,gl,mu,tc,_u,gu,Kc,vl,To,ic,Os,MC,wC],changeDetection:0}),i})(),eme=(()=>{class i{constructor(){this._resource=null,this.resourceMap={},this.changed=new We}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]=["",_l.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)(E(nb),E(yte),E(oR))},i.\u0275cmp=ot({type:i,selectors:[["app-run-custom-action",8,"dialog"]],attrs:tme,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&&(W(0,"h1",0),Ve(1),j(),W(2,"div",1)(3,"p"),Ve(4),j()(),W(5,"form",2),fe(6,nme,4,4,"mat-form-field",3),j(),W(7,"div",4)(8,"button",5),Ue("click",function(){return n.dialogRef.close()}),Ve(9,"Cancel"),j(),W(10,"button",6),Ue("click",function(){return n.submit()}),Ve(11,"Run"),j()()),2&e&&(G(1),Qi('Run action "',n.data.title,'"'),G(3),_i(n.data.description),G(1),U("formGroup",n.argsForm),G(1),U("ngForOf",n.data.args),G(4),U("disabled",n.argsForm.invalid))},dependencies:[So,IR,gl,tc,bR,vl,To,ic,ib,fV,pV,mV,Gh,fC],styles:["form[_ngcontent-%COMP%]{padding:0 24px}"]}),i})();function _$(i,t){return t?e=>Sy(t.pipe(Oi(1),function rme(){return ti((i,t)=>{i.subscribe(Yn(t,ms))})}()),e.pipe(_$(i))):ir((e,n)=>wr(i(e,n)).pipe(Oi(1),YB(e)))}function v$(i,t=$y){const e=OI(i,t);return _$(()=>e)}const sme=["mat-menu-item",""];function ome(i,t){1&i&&(ki(),W(0,"svg",3),De(1,"polygon",4),j())}const ame=[[["mat-icon"],["","matMenuItemIcon",""]],"*"],lme=["mat-icon, [matMenuItemIcon]","*"];function cme(i,t){if(1&i){const e=di();W(0,"div",0),Ue("keydown",function(r){return an(e),zt(he()._handleKeydown(r))})("click",function(){return an(e),zt(he().closed.emit("click"))})("@transformMenu.start",function(r){return an(e),zt(he()._onAnimationStart(r))})("@transformMenu.done",function(r){return an(e),zt(he()._onAnimationDone(r))}),W(1,"div",1),Wt(2),j()()}if(2&i){const e=he();U("id",e.panelId)("ngClass",e._classList)("@transformMenu",e._panelAnimationState),Dt("aria-label",e.ariaLabel||null)("aria-labelledby",e.ariaLabelledby||null)("aria-describedby",e.ariaDescribedby||null)}}const dme=["*"],xO=new me("MAT_MENU_PANEL"),ume=YM(jM(class{}));let eE=(()=>{class i extends ume{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 Re,this._focused=new Re,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",jr("120ms cubic-bezier(0, 0, 0.2, 1)",si({opacity:1,transform:"scale(1)"}))),Pr("* => void",jr("100ms 25ms linear",si({opacity:0})))]),fadeInItems:Ra("fadeInItems",[Ps("showing",si({opacity:1})),Pr("void => *",[si({opacity:0}),jr("400ms 100ms cubic-bezier(0.55, 0, 0.55, 0.2)")])])};let fme=0;const y$=new me("mat-menu-default-options",{providedIn:"root",factory:function pme(){return{overlapTrigger:!1,xPosition:"after",yPosition:"below",backdropClass:"cdk-overlay-transparent-backdrop"}}});let e0=(()=>{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 om,this._classList={},this._panelAnimationState="void",this._animationDone=new Re,this.overlayPanelClass=this._defaultOptions.overlayPanelClass||"",this.backdropClass=this._defaultOptions.backdropClass,this._overlapTrigger=this._defaultOptions.overlapTrigger,this._hasBackdrop=this._defaultOptions.hasBackdrop,this.closed=new We,this.close=this.closed,this.panelId="mat-menu-panel-"+fme++}ngOnInit(){this.setPositionClasses()}ngAfterContentInit(){this._updateDirectDescendants(),this._keyManager=new RU(this._directDescendantItems).withWrap().withTypeAhead().withHomeAndEnd(),this._keyManager.tabOut.subscribe(()=>this.closed.emit("tab")),this._directDescendantItems.changes.pipe(Ao(this._directDescendantItems),Rs(e=>Mr(...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(Ao(this._directDescendantItems),Rs(n=>Mr(...n.map(r=>r._hovered))))}addItem(e){}removeItem(e){}_handleKeydown(e){const n=e.keyCode,r=this._keyManager;switch(n){case 27:Xo(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(Oi(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(Ao(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)(E(mt),E(ft),E(y$),E(Zn))},i.\u0275dir=ve({type:i,contentQueries:function(e,n,r){if(1&e&&(Wi(r,hme,5),Wi(r,eE,5),Wi(r,eE,4)),2&e){let s;Et(s=At())&&(n.lazyContent=s.first),Et(s=At())&&(n._allItems=s),Et(s=At())&&(n.items=s)}},viewQuery:function(e,n){if(1&e&&Wn(Mo,5),2&e){let r;Et(r=At())&&(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})(),mme=(()=>{class i extends e0{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)(E(mt),E(ft),E(y$),E(Zn))},i.\u0275cmp=ot({type:i,selectors:[["mat-menu"]],hostVars:3,hostBindings:function(e,n){2&e&&Dt("aria-label",null)("aria-labelledby",null)("aria-describedby",null)},exportAs:["matMenu"],features:[Dn([{provide:xO,useExisting:i}]),lt],ngContentSelectors:dme,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&&(sr(),fe(0,cme,3,6,"ng-template"))},dependencies:[hm],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:[tE.transformMenu,tE.fadeInItems]},changeDetection:0}),i})();const b$=new me("mat-menu-scroll-strategy"),_me={provide:b$,deps:[as],useFactory:function gme(i){return()=>i.scrollStrategies.reposition()}},x$=Oh({passive:!0});let vme=(()=>{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,d){this._overlay=e,this._element=n,this._viewContainerRef=r,this._menuItemInstance=a,this._dir=l,this._focusMonitor=c,this._ngZone=d,this._overlayRef=null,this._menuOpen=!1,this._closingActionsSubscription=Zt.EMPTY,this._hoverSubscription=Zt.EMPTY,this._menuCloseSubscription=Zt.EMPTY,this._changeDetectorRef=Ft(Zn),this._handleTouchStart=h=>{qI(h)||(this._openedBy="touch")},this._openedBy=void 0,this.restoreFocus=!0,this.menuOpened=new We,this.onMenuOpen=this.menuOpened,this.menuClosed=new We,this.onMenuClose=this.menuClosed,this._scrollStrategy=s,this._parentMaterialMenu=o instanceof e0?o:void 0,n.nativeElement.addEventListener("touchstart",this._handleTouchStart,x$)}ngAfterContentInit(){this._handleHover()}ngOnDestroy(){this._overlayRef&&(this._overlayRef.dispose(),this._overlayRef=null),this._element.nativeElement.removeEventListener("touchstart",this._handleTouchStart,x$),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 e0&&(e._startAnimation(),e._directDescendantItems.changes.pipe(He(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 e0?(n._resetAnimation(),n.lazyContent?n._animationDone.pipe(gn(r=>"void"===r.toState),Oi(1),He(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],[d,h]=[r,s],p=0;if(this.triggersSubmenu()){if(h=r="before"===e.xPosition?"start":"end",s=d="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:d,overlayY:o,offsetY:p},{originX:s,originY:l,overlayX:h,overlayY:o,offsetY:p},{originX:r,originY:c,overlayX:d,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 Mr(e,this._parentMaterialMenu?this._parentMaterialMenu.closed:ht(),this._parentMaterialMenu?this._parentMaterialMenu._hovered().pipe(gn(o=>o!==this._menuItemInstance),gn(()=>this._menuOpen)):ht(),n)}_handleMousedown(e){YI(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(gn(e=>e===this._menuItemInstance&&!e.disabled),v$(0,PI)).subscribe(()=>{this._openedBy="mouse",this.menu instanceof e0&&this.menu._isAnimating?this.menu._animationDone.pipe(Oi(1),v$(0,PI),He(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)(E(as),E(mt),E(Wr),E(b$),E(xO,8),E(eE,10),E(Ia,8),E(qc),E(ft))},i.\u0275dir=ve({type:i,hostVars:3,hostBindings:function(e,n){1&e&&Ue("click",function(s){return n._handleClick(s)})("mousedown",function(s){return n._handleMousedown(s)})("keydown",function(s){return n._handleKeydown(s)}),2&e&&Dt("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})(),yme=(()=>{class i extends vme{}return i.\u0275fac=function(){let t;return function(n){return(t||(t=ri(i)))(n||i)}}(),i.\u0275dir=ve({type:i,selectors:[["","mat-menu-trigger-for",""],["","matMenuTriggerFor",""]],hostAttrs:[1,"mat-mdc-menu-trigger"],exportAs:["matMenuTrigger"],features:[lt]}),i})(),bme=(()=>{class i{}return i.\u0275fac=function(e){return new(e||i)},i.\u0275mod=nn({type:i}),i.\u0275inj=Kt({providers:[_me],imports:[Eo,eb,Qn,Pm,Xy,Qn]}),i})();function xme(i,t){if(1&i){const e=di();W(0,"button",7),Ue("click",function(){return an(e),zt(he(2).deserialize())}),De(1,"mat-icon",8),j()}}function wme(i,t){if(1&i){const e=di();Gr(0),fe(1,xme,2,0,"button",4),W(2,"button",5),Ue("click",function(){return an(e),zt(he().serializeBlockReversible())}),De(3,"mat-icon",6),j(),$r()}if(2&i){const e=he();G(1),U("ngIf",e.isInReversibleSerializationState),G(1),U("disabled",e.isInReversibleSerializationState)}}function Mme(i,t){1&i&&(W(0,"button",9),De(1,"mat-icon",10),j()),2&i&&(he(),U("matMenuTriggerFor",Zi(3)))}function Cme(i,t){if(1&i){const e=di();W(0,"button",11),Ue("click",function(){const s=an(e).$implicit;return zt(he().runCustomAction(s))}),W(1,"span"),Ve(2),j()()}if(2&i){const e=t.$implicit;G(2),_i(e.title)}}const Sme=function(){return[]};let nE=(()=>{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 tt(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)(E(ka),E(Ql),E(Zn),E(Bm),E(IV))},i.\u0275cmp=ot({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&&(fe(0,wme,4,2,"ng-container",0),fe(1,Mme,2,1,"button",1),W(2,"mat-menu",null,2),fe(4,Cme,3,1,"button",3),j()),2&e&&(U("ngIf",null==n.resource||null==n.resource.schema?null:n.resource.schema.serializable_to_disc),G(1),U("ngIf",(null==n.resource||null==n.resource.schema.custom_actions?null:n.resource.schema.custom_actions.length)>0),G(3),U("ngForOf",(null==n.resource?null:n.resource.schema.custom_actions)||so(3,Sme)))},dependencies:[So,vi,Os,XM,gR,mme,eE,yme],styles:["[_nghost-%COMP%]{display:flex}"]}),i})();const Eme=["class","block-ui"];function Ame(i,t){if(1&i&&(W(0,"mat-label",7),Ve(1),j()),2&i){const e=he();U("matTooltip",e.resourceDescription),G(1),Qi("",null==e.resource?null:e.resource.name," ")}}function Dme(i,t){if(1&i&&(W(0,"audio",8),De(1,"source",9),Ct(2,"async"),Ve(3," Your browser does not support the audio element. "),j()),2&i){const e=he();G(1),U("src",Tt(2,1,e.audioUrl$),Lp)}}function Tme(i,t){1&i&&De(0,"mat-spinner",10)}function Ime(i,t){1&i&&De(0,"app-block-actions",11),2&i&&U("resource",he().resource)}const Rme=function(){return["wave_data"]};let kme=(()=>{class i{constructor(e,n){this.eelDelegate=e,this.main=n,this._resource$=new gt(null),this.audioUrl$=new gt(null),this.resourceDescription="",this.hideBlockActions=!1,this.destroyed$=new Re,this.changed=new We}set resource(e){this._resource$.next(e)}get resource(){return this._resource$.getValue()}ngAfterViewInit(){var e=this;return tt(function*(){e._resource$.pipe(He(e.destroyed$)).subscribe(function(){var n=tt(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)(E(Ql),E(ka))},i.\u0275cmp=ot({type:i,selectors:[["app-eacs-audio",8,"block-ui"]],inputs:{resource:"resource",resourceDescription:"resourceDescription",hideBlockActions:"hideBlockActions"},outputs:{changed:"changed"},attrs:Eme,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&&(W(0,"div",0),fe(1,Ame,2,2,"mat-label",1),Ct(2,"async"),fe(3,Dme,4,3,"audio",2),Ct(4,"async"),fe(5,Tme,1,0,"mat-spinner",3),Ct(6,"async"),De(7,"div",4),fe(8,Ime,1,1,"app-block-actions",5),j(),De(9,"app-compound-block-ui",6),Ct(10,"async")),2&e){let r;G(1),U("ngIf",(null==n.resource?null:n.resource.name)&&(null==n.resource?null:n.resource.name)!=(null==(r=Tt(2,7,n.main.resource$))?null:r.name)),G(2),U("ngIf",Tt(4,9,n.audioUrl$)),G(2),U("ngIf",n.resource&&!Tt(6,11,n.audioUrl$)),G(3),U("ngIf",!n.hideBlockActions),G(1),U("resource",Tt(10,13,n._resource$))("hideBlockActions",!0)("fieldBlacklist",so(15,Rme))}},dependencies:[vi,To,Os,Jb,Jl,nE,pl],styles:["#header[_ngcontent-%COMP%]{display:flex}"]}),i})();class Pme{constructor(t,e){this.mesh=t,this.assetsPath=e,this.textures=[],this.tyreTextureUpdateTimer=void 0,this.tyreMaterial=null,this.tyreTextures=[],this._color=65280,this._speed="idle",this._steeringAngle=0,this.wheels=[],this.wheelIdlePositions=[],this.frontWheels=[];let n=new Set;if(t.traverse(r=>{if(!(r instanceof Mn))return;let s=-1;if(r.name.startsWith("part_hp_12")?s=0:r.name.startsWith("part_hp_14")?s=1:r.name.startsWith("part_hp_16")?s=2:r.name.startsWith("part_hp_18")&&(s=3),s>-1){r.geometry.boundingBox||r.geometry.computeBoundingBox();let a=Pe.avg(r.geometry.boundingBox.min,r.geometry.boundingBox.max);return(0==s||2==s)&&(a={x:a.x,y:a.y,z:a.z+1.5}),r.geometry.translate(...Pe.spr(Pe.neg(a))),r.position.set(...Pe.spr(a)),this.wheelIdlePositions[s]=a,this.wheels.push(r),void(s<2&&this.frontWheels.push(r))}const o=r.material.map;o&&n.add(o)}),this.textures=Array.from(n).map(r=>{const s=new ko(document.createElement("img"));return s.flipY=r.flipY,ia(s),[r,s]}),t.traverse(r=>{if(!(r instanceof Mn))return;const s=r.material.map;if(s){const o=this.textures.find(([a,l])=>a===s);o&&(r.material.map=o[1])}}),this.hasWheels){const r=new Pu;this.tyreTextures=[0,1,2,3].map(s=>r.load(`${e}/m${s}00.png`));for(const s of this.tyreTextures)ia(s);this.tyreMaterial=new qi({map:this.tyreTextures[0]}),this.tyreMaterial.transparent=!0,this.tyreMaterial.alphaTest=.5,this.tyreMaterial.map.wrapS=Ii,this.tyreMaterial.map.wrapT=Ii,this.tyreMaterial.polygonOffset=!0,this.tyreMaterial.polygonOffsetFactor=-4;for(const s of this.wheels)s.material=this.tyreMaterial}this.color=65280,this.recolorCar().then()}get color(){return this._color}set color(t){t!==this._color&&(this._color=t,this.recolorCar().then())}get speed(){return this._speed}set speed(t){if(t!==this._speed){switch(this._speed=t,this.tyreTextureUpdateTimer&&clearInterval(this.tyreTextureUpdateTimer),t){case"idle":this.tyreMaterial.map=this.tyreTextures[0];break;case"slow":let e=!0;this.tyreTextureUpdateTimer=setInterval(()=>{this.tyreMaterial.map=this.tyreTextures[e?1:2],this.tyreMaterial.needsUpdate=!0,e=!e},16);break;case"fast":this.tyreMaterial.map=this.tyreTextures[3]}this.tyreMaterial.needsUpdate=!0}}get steeringAngle(){return this._steeringAngle}set steeringAngle(t){if(t!==this._steeringAngle){this._steeringAngle=t;for(const e of this.frontWheels)e.rotation.set(0,0,t)}}get hasWheels(){return this.wheels.length>0}recolorCar(){var t=this;return tt(function*(){const[e,n,r]=[t.color>>16,t.color>>8&255,255&t.color];for(const[s,o]of t.textures){for(let a=100;a>0&&!s.source.data;a--)yield p$(50);m$(s.source.data,(a,l)=>{if(a[l]+a[l+2]{class i{constructor(e,n,r){this.eelDelegate=e,this.main=n,this.cdr=r,this._resource$=new gt(null),this.changed=new We,this.customControls=[],this.previewPaths$=new gt(null),this.destroyed$=new Re,this.serializerSettings={geometry__save_obj:!0,geometry__save_blend:!1,geometry__export_to_gg_web_engine:!1}}get resource(){return this._resource$.getValue()}set resource(e){this._resource$.next(e)}ngAfterViewInit(){var e=this;return tt(function*(){e._resource$.pipe(He(e.destroyed$)).subscribe(function(){var n=tt(function*(r){e.previewPaths$.next(yield e.loadPreviewFilePaths(r?.id))});return function(r){return n.apply(this,arguments)}}()),e.main.dataBlockChange$.pipe(He(e.destroyed$),gn(([n,r])=>!!e.resource&&n.startsWith(e.resource.id)),ml(1500)).subscribe(tt(function*(){e.previewPaths$.next(null),e.previewPaths$.next(yield e.postTmpUpdates(e.resource?.id))}))})()}onObjectLoaded(e){var n=this;return tt(function*(){try{const r=new Pme(e,n.previewPaths$.value[0].substring(0,n.previewPaths$.value[0].lastIndexOf("/"))+"/assets");let s=null;const o=a=>{s&&clearTimeout(s),s=setTimeout(()=>r.color=a,50)};n.customControls=[{title:"NFS2 car features",controls:[{label:"Car color",type:"color",value:65280,change:a=>o(a)}]}],r.hasWheels&&n.customControls[0].controls.push({label:"Car speed",type:"radio",options:["idle","slow","fast"],value:"idle",change:a=>{r.speed=a}},{label:"Steering angle",type:"slider",minValue:-.7,maxValue:.7,valueStep:.05,value:0,change:a=>{r.steeringAngle=a}}),n.cdr.markForCheck()}catch(r){console.error(r)}})()}postTmpUpdates(e){var n=this;return tt(function*(){if(e){const r=yield n.eelDelegate.serializeResourceTmp(e,Object.entries(n.main.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 tt(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)(E(Ql),E(ka),E(Zn))},i.\u0275cmp=ot({type:i,selectors:[["app-geo-geometry",8,"block-ui"]],inputs:{resource:"resource"},outputs:{changed:"changed"},attrs:Ome,decls:4,vars:8,consts:[[3,"paths","groupFunction","customControls","onObjectLoaded"],[3,"resource",4,"ngIf"],[3,"resource"]],template:function(e,n){1&e&&(W(0,"app-obj-viewer",0),Ue("onObjectLoaded",function(s){return n.onObjectLoaded(s)}),Ct(1,"async"),j(),fe(2,Fme,2,3,"app-compound-block-ui",1),Ct(3,"async")),2&e&&(U("paths",Tt(1,4,n.previewPaths$))("groupFunction",n.previewObjectGroupFunc)("customControls",n.customControls),G(2),U("ngIf",!Tt(3,6,n.main.hideHiddenFields$)))},dependencies:[vi,Jl,h$,pl],changeDetection:0}),i})();const Nme=function(){return["children","items_descr"]};let Bme=(()=>{class i{constructor(){this._resource=null,this.hideBlockActions=!1,this.resourceMap={},this.changed=new We}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:rc(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=ot({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&&De(0,"app-compound-block-ui",0)(1,"app-sidenav-res-list",1),2&e&&(U("resource",n.resource)("hideBlockActions",n.hideBlockActions)("fieldBlacklist",so(4,Nme)),G(1),U("resources",n.resourceMap))},dependencies:[Jl,xC],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})();const Ume=["previewCanvasContainer"],Vme=["previewCanvas"];function zme(i,t){1&i&&De(0,"mat-spinner",16),2&i&&U("diameter",40)}function Hme(i,t){1&i&&De(0,"mat-spinner",17)}var Df=(()=>{return(i=Df||(Df={})).ThreeModel="model",i.Bitmap="bitmap",i.TwoSidedBitmap="two_sided_bitmap",Df;var i})();class Gme extends QH{constructor(t,e,n){super(t,{loadDepth:40,inertia:2}),this.mapGraph=t,this.qfsPath=e,this.hideUnknownEntities$=n,this.textureLoader=new Pu,this.terrainMaterials={},this.objLoader=new Qb,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(Zl(),He(this._onRemoved$)).subscribe(e=>{for(const n of this.unknownEntities)n.visible=!e})}getPlaceholderTexture(){var t=this;return tt(function*(){return t._placeholder?t._placeholder:(t._placeholderPromise||(t._placeholderPromise=t.textureLoader.loadAsync("assets/placeholder_texture.png")),t._placeholderPromise)})()}getPlaceholderTerrainTexture(){var t=this;return tt(function*(){return t._placeholderTerrain?t._placeholderTerrain:(t._placeholderTerrainPromise||(t._placeholderTerrainPromise=t.textureLoader.loadAsync("assets/placeholder_texture.png").then(e=>(e.wrapS=Pa,e.wrapT=Ii,ia(e),e.flipY=!0,e))),t._placeholderTerrainPromise)})()}loadChunk(t){var e=this;return tt(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 Mn&&(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:Pe.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:Yi.fromAngle(Pe.nZ,l.rotation)}));const o=(yield Promise.all(s.map(l=>e.loadPropInternal(l)))).filter(l=>!!l),a=new Zo({object3D:new na(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 qi({side:Ls,transparent:!0,visible:!1}),this.qfsPath?this.textureLoader.loadAsync(`${this.qfsPath}/${t}.png`).then(e=>{e.wrapS=Pa,e.wrapT=Ii,ia(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 tt(function*(){let n=!1;if(t.type==Df.ThreeModel){let r;try{if(!e.qfsPath)throw new Error;const o=new bO,a=new Qb,l=yield o.loadAsync(`${e.qfsPath}/props/${t.data.data.resource_id}/0/material.mtl`);l.preload(),a.setMaterials(l),r=new na(yield a.loadAsync(`${e.qfsPath}/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 Mn){const a=o.material instanceof Array?o.material:[o.material];for(const l of a)l.transparent=!0,l.alphaTest=.5,l instanceof qi&&l.map&&(l.map.wrapS=Ii,l.map.wrapT=Ii,ia(l.map),l.map.needsUpdate=!0)}});const s=new Zo({object3D: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,d)=>new Array(d).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 Fo,[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,d]=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 Zo({object3D:new na(s)});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 tt(function*(){const s=t.split(";"),o=yield r.getPlaceholderTexture();let a=!1,l=[];r.qfsPath?l=yield Promise.all(s.map(h=>r.textureLoader.loadAsync(`${r.qfsPath}/foreground/${h}.png`).catch(()=>(a=!0,o)))):(a=!0,l=s.map(()=>o));const c=l.map(h=>(ia(h),new qi({map:h,alphaTest:.5,transparent:!0,side:Ls}))),d=new Mn(new Iu(e.x,e.y),c[0]);if(d.rotateX(Math.PI/2),d.position.set(0,0,e.y/2),c.length>1){let h=-1;Ym(r.world).pipe(o4(n&&!isNaN(+n)?1e3*+n:250)).subscribe(()=>{h=(h+1)%c.length,d.material=c[h]})}return[d,a]})()}}let $me=(()=>{class i{constructor(e,n,r){this.eelDelegate=e,this.cdr=n,this.mainService=r,this._resource$=new gt(null),this.changed=new We,this.previewLoading$=new gt(!0),this.previewQfsLocation$=new gt(null),this.previewQfsLoading$=new gt(!1),this.pointer$=new gt(null),this.selectedSplineIndex$=new gt(0),this.qfsPath=null,this.name="",this.renderer=null,this.map=null,this.roadPath=null,this.destroyed$=new Re}get resource(){return this._resource$.getValue()}set resource(e){this._resource$.next(e)}get roadSpline(){return this.resource?.data.block_positions||[]}ngAfterViewInit(){var e=this;return tt(function*(){var s;e.world=new sk(new vO,{init:(s=tt(function*(){}),function(){return s.apply(this,arguments)}),simulate:()=>{},loader:{loadFromGgGlb:function(){var s=tt(function*(...o){return[]});return function(){return s.apply(this,arguments)}}()}}),yield e.world.init(),e.skySphere=new Zo({object3D:e.world.visualScene.factory.createPrimitive({shape:"SPHERE",radius:1e3},{color:16777215})}),e.skySphere.object3D.nativeMesh.material.side=Ls,e.world.addEntity(e.skySphere),e.selectionSphere=new Zo({object3D: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 $S(16777215,2));let n=new gt({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=Yi.lookAt(e.renderer.camera.position,Pe.add(e.renderer.camera.position,Pe.Y),Pe.Z),Ym(e.world).pipe(He(e.destroyed$)).subscribe(()=>{e.renderer&&(e.skySphere.position=e.renderer.camera.position,e.pointer$.next(e.renderer.camera.position))}),e.controller=new n4(e.world.keyboardInput,e.renderer,{mouseOptions:{canvas:e.previewCanvas.nativeElement,pointerLock:!0},keymap:"wasd+arrows",cameraLinearSpeed:40,cameraBoostMultiplier:4,cameraMovementElasticity:100,cameraRotationElasticity:30,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(He(e.destroyed$)).subscribe(function(){var s=tt(function*(o){e.previewLoading$.next(!0),o?(e.previewQfsLocation$.next(o.id.substring(0,o.id.indexOf(".TRK"))+"0.QFS"),yield e.loadTerrainChunks(o.id),yield e.onQfsSelected(e.previewQfsLocation$.value)):(yield e.loadTerrainChunks(),yield e.loadPreview()),e.previewLoading$.next(!1)});return function(o){return s.apply(this,arguments)}}()),e.mainService.dataBlockChange$.pipe(He(e.destroyed$),gn(([s,o])=>!!e.resource&&s.startsWith(e.resource.id)),ml(3e3)).subscribe(tt(function*(){e.previewLoading$.next(!0),yield e.postTmpUpdates(e.resource?.id),yield e.loadPreview(),e.previewLoading$.next(!1)})),e.selectedSplineIndex$.pipe(He(e.destroyed$),ml(250)).subscribe(s=>{if(e.resource){let o=e.resource.data.block_positions[s];if(!o)return;o={x:o.x,y:o.z,z:o.y},e.selectionSphere.position=o,e.renderer&&(e.renderer.position=Pe.add(o,Pe.rotAround({x:10,y:-12,z:5},{x:0,y:0,z:1},-0)),e.renderer.rotation=Yi.lookAt(e.renderer.position,o,{x:0,y:0,z:1}),e.controller.reset())}})})()}onQfsSelected(e){var n=this;return tt(function*(){if(n.qfsPath!=e){n.previewQfsLoading$.next(!0);try{const r=yield n.eelDelegate.serializeResource(e),s=new Pu,o=r.find(a=>a.endsWith("spherical.png"));if(o){const a=yield s.loadAsync(o);a.colorSpace="srgb",a.mapping=lc,n.skySphere.object3D.nativeMesh.material.map=a}else n.skySphere.object3D.nativeMesh.material.map=null;n.skySphere.object3D.nativeMesh.material.needsUpdate=!0,n.qfsPath=e}catch{n.skySphere.object3D.nativeMesh.material.map=null,n.skySphere.object3D.nativeMesh.material.needsUpdate=!0,n.qfsPath=null}finally{n.previewQfsLoading$.next(!1)}yield n.loadPreview()}})()}loadTerrainChunks(e){var n=this;return tt(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 tt(function*(){if(e.roadPath=e.resource?.data.block_positions.map(r=>({x:r.x,y:r.z,z:r.y})),!e.terrainChunksObjLocation||!e.roadPath)return;const n=Km.fromMapArray(e.roadPath.map((r,s)=>({path:`${e.terrainChunksObjLocation}terrain_chunk_${s}`,position:r,loadOptions:{}}))||[],!0);e.unloadPreview(),e.map=new Gme(n,e.qfsPath&&"resources/"+e.qfsPath,e.mainService.hideHiddenFields$),e.map.resource=e.resource,e.map.isOpenedTrack=!1,Ym(e.world).pipe(He(e.destroyed$)).subscribe(()=>{e.map&&e.renderer&&e.map.loaderCursor$.next(e.renderer.position)}),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 tt(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)(E(Ql),E(Zn),E(ka))},i.\u0275cmp=ot({type:i,selectors:[["app-trk-map-block-ui"]],viewQuery:function(e,n){if(1&e&&(Wn(Ume,5),Wn(Vme,5)),2&e){let r;Et(r=At())&&(n.previewCanvasContainer=r.first),Et(r=At())&&(n.previewCanvas=r.first)}},inputs:{resource:"resource"},outputs:{changed:"changed"},decls:32,vars:24,consts:[[1,"qfsSelector"],["appearance","fill"],["matInput","","type","text",3,"value"],["customQfsInput",""],["mat-button","",3,"click"],["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"],["mode","indeterminate",3,"diameter"],["mode","indeterminate"]],template:function(e,n){if(1&e){const r=di();W(0,"div",0)(1,"h4"),Ve(2,"Preview QFS file"),j(),W(3,"mat-form-field",1)(4,"mat-label"),Ve(5,"Custom QFS path"),j(),De(6,"input",2,3),Ct(8,"async"),j(),W(9,"button",4),Ue("click",function(){an(r);const o=Zi(7);return zt(n.onQfsSelected(o.value))}),Ve(10,"LOAD"),j(),fe(11,zme,1,1,"mat-spinner",5),Ct(12,"async"),j(),W(13,"div",6)(14,"div",7,8),De(16,"canvas",9,10),fe(18,Hme,1,0,"mat-spinner",11),Ct(19,"async"),j(),W(20,"div",12,8)(22,"mat-form-field",1)(23,"mat-label"),Ve(24,"Spline item"),j(),W(25,"input",13),Ue("ngModelChange",function(o){return n.selectedSplineIndex$.next(o)}),Ct(26,"async"),Ct(27,"async"),j()(),De(28,"app-tri-minimap",14),Ct(29,"async"),j()(),De(30,"app-compound-block-ui",15),Ct(31,"async")}if(2&e){let r;G(6),U("value",Tt(8,10,n.previewQfsLocation$)),G(5),U("ngIf",Tt(12,12,n.previewQfsLoading$)),G(7),U("ngIf",Tt(19,14,n.previewLoading$)),G(7),U("min",0)("max",4*(null==(r=Tt(26,16,n._resource$))?null:r.data.num_blocks)-1)("ngModel",Tt(27,18,n.selectedSplineIndex$)),G(3),U("roadSpline",n.roadSpline)("pointer",Tt(29,20,n.pointer$))("splineClosed",!0),G(2),U("resource",Tt(31,22,n._resource$))}},dependencies:[vi,gl,mu,tc,_u,gu,Kc,vl,To,ic,ib,Jb,Jl,f$,pl],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}.qfsSelector[_ngcontent-%COMP%]{display:flex;align-items:center;width:100%;column-gap:1rem}.qfsSelector[_ngcontent-%COMP%] h4[_ngcontent-%COMP%]{min-width:-moz-fit-content;min-width:fit-content}.qfsSelector[_ngcontent-%COMP%] mat-form-field[_ngcontent-%COMP%]{flex-grow:1}.qfsSelector[_ngcontent-%COMP%] mat-spinner[_ngcontent-%COMP%], .qfsSelector[_ngcontent-%COMP%] button[_ngcontent-%COMP%]{margin-bottom:1.34375em}"],changeDetection:0}),i})();function Wme(i,t){if(1&i&&(W(0,"mat-error"),Ve(1),j()),2&i){const e=he(2);G(1),tm(" ",e.resourceError.data.error_class,": ",e.resourceError.data.error_text," ")}}function jme(i,t){1&i&&De(0,"mat-spinner",5)}function Yme(i,t){if(1&i&&(W(0,"div",2),fe(1,Wme,2,2,"mat-error",3),fe(2,jme,1,0,"mat-spinner",4),j()),2&i){const e=he();G(1),U("ngIf",e.resourceError),G(1),U("ngIf",!e.resourceError)}}function qme(i,t){}let t0=(()=>{class i{constructor(e){this.mainService=e,this._component=null,this._componentChangedSub=null,this.destroyed$=new Re,this.resourceSet$=new Re,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(He(this.destroyed$),He(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 Xme(i,t){1&i&&De(0,"mat-icon",17)}function Kme(i,t){1&i&&De(0,"mat-icon",18)}let Zme=(()=>{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 tt(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 tt(function*(){if(e.mainService.hasUnsavedChanges){let n=e.dialog.open(CV,{data:{text:"There are unsaved changes, which will be lost. Are you sure you want to reload file?"}});if(!(yield lR(n.afterClosed())))return}yield e.mainService.reloadResource(),e.cdr.markForCheck()})()}}return i.\u0275fac=function(e){return new(e||i)(E(Ql),E(ka),E(Bm),E(IV),E(Zn))},i.\u0275cmp=ot({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&&(W(0,"mat-toolbar",0)(1,"span"),Ve(2),Ct(3,"async"),Ct(4,"async"),j(),De(5,"span",1),W(6,"button",2),Ue("click",function(){return n.toggleUnknownsVisibility()}),fe(7,Xme,1,0,"mat-icon",3),Ct(8,"async"),fe(9,Kme,1,0,"mat-icon",4),Ct(10,"async"),j(),De(11,"mat-divider",5)(12,"app-block-actions",6),Ct(13,"async"),W(14,"button",7),Ue("click",function(){return n.reloadResource()}),Ct(15,"async"),De(16,"mat-icon",8),j(),De(17,"mat-divider",5),W(18,"button",9),Ue("click",function(){return n.saveResource()}),Ct(19,"async"),Ct(20,"async"),De(21,"mat-icon",10),j()(),W(22,"div",11),De(23,"div",12)(24,"app-editor",13),Ct(25,"async"),Ct(26,"async"),Ct(27,"async"),W(28,"div",14)(29,"a",15),De(30,"img",16),j()(),De(31,"div",12),j()),2&e){let r;G(2),tm("",(null==(r=Tt(3,9,n.mainService.resource$))?null:r.name)||"...","",Tt(4,11,n.mainService.hasUnsavedChanges$)?"*":"",""),G(5),U("ngIf",Tt(8,13,n.mainService.hideHiddenFields$)),G(2),U("ngIf",!Tt(10,15,n.mainService.hideHiddenFields$)),G(3),U("resource",Tt(13,17,n.mainService.resource$)),G(2),U("disabled",!Tt(15,19,n.mainService.eelDelegate.openedResourcePath$)),G(4),U("disabled",!Tt(19,21,n.mainService.resource$)||!Tt(20,23,n.mainService.hasUnsavedChanges$)),G(6),U("resource",Tt(25,25,n.mainService.customActionRunning$)?null:Tt(26,27,n.mainService.resource$)||Tt(27,29,n.mainService.error$))("hideBlockActions",!0)}},dependencies:[vi,MJ,SJ,Os,XM,gR,t0,nE,pl],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 w$(i){return new pe(3e3,!1)}function kge(){return typeof window<"u"&&typeof window.document<"u"}function wO(){return typeof process<"u"&&"[object process]"==={}.toString.call(process)}function Nu(i){switch(i.length){case 0:return new tb;case 1:return i[0];default:return new oV(i)}}function M$(i,t,e,n,r=new Map,s=new Map){const o=[],a=[];let l=-1,c=null;if(n.forEach(d=>{const h=d.get("offset"),p=h==l,m=p&&c||new Map;d.forEach((g,b)=>{let v=b,y=g;if("offset"!==b)switch(v=t.normalizePropertyName(v,o),y){case rR:y=r.get(b);break;case Xc: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 bge(i){return new pe(3502,!1)}();return a}function MO(i,t,e,n){switch(t){case"start":i.onStart(()=>n(e&&CO(e,"start",i)));break;case"done":i.onDone(()=>n(e&&CO(e,"done",i)));break;case"destroy":i.onDestroy(()=>n(e&&CO(e,"destroy",i)))}}function CO(i,t,e){const s=SO(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 SO(i,t,e,n,r="",s=0,o){return{element:i,triggerName:t,fromState:e,toState:n,phaseName:r,totalTime:s,disabled:!!o}}function ra(i,t,e){let n=i.get(t);return n||i.set(t,n=e),n}function C$(i){const t=i.indexOf(":");return[i.substring(1,t),i.slice(t+1)]}let EO=(i,t)=>!1,S$=(i,t,e)=>[],E$=null;function AO(i){const t=i.parentNode||i.host;return t===E$?null:t}(wO()||typeof Element<"u")&&(kge()?(E$=(()=>document.documentElement)(),EO=(i,t)=>{for(;t;){if(t===i)return!0;t=AO(t)}return!1}):EO=(i,t)=>i.contains(t),S$=(i,t,e)=>{if(e)return Array.from(i.querySelectorAll(t));const n=i.querySelector(t);return n?[n]:[]});let Tf=null,A$=!1;const D$=EO,T$=S$;let I$=(()=>{class i{validateStyleProperty(e){return function Oge(i){Tf||(Tf=function Fge(){return typeof document<"u"?document.body:null}()||{},A$=!!Tf.style&&"WebkitAppearance"in Tf.style);let t=!0;return Tf.style&&!function Pge(i){return"ebkit"==i.substring(1,6)}(i)&&(t=i in Tf.style,!t&&A$&&(t="Webkit"+i.charAt(0).toUpperCase()+i.slice(1)in Tf.style)),t}(e)}matchesElement(e,n){return!1}containsElement(e,n){return D$(e,n)}getParentElement(e){return AO(e)}query(e,n,r){return T$(e,n,r)}computeStyle(e,n,r){return r||""}animate(e,n,r,s,o,a=[],l){return new tb(r,s)}}return i.\u0275fac=function(e){return new(e||i)},i.\u0275prov=ke({token:i,factory:i.\u0275fac}),i})(),DO=(()=>{class i{}return i.NOOP=new I$,i})();const Lge=1e3,TO="ng-enter",iE="ng-leave",rE="ng-trigger",sE=".ng-trigger",k$="ng-animating",IO=".ng-animating";function hd(i){if("number"==typeof i)return i;const t=i.match(/^(-?[\.\d]+)(m?s)/);return!t||t.length<2?0:RO(parseFloat(t[1]),t[2])}function RO(i,t){return"s"===t?i*Lge:i}function oE(i,t,e){return i.hasOwnProperty("duration")?i:function Bge(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(w$()),{duration:0,delay:0,easing:""};r=RO(parseFloat(a[1]),a[2]);const l=a[3];null!=l&&(s=RO(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 Qme(){return new pe(3100,!1)}()),a=!0),s<0&&(t.push(function Jme(){return new pe(3101,!1)}()),a=!0),a&&t.splice(l,0,w$())}return{duration:r,delay:s,easing:o}}(i,t,e)}function n0(i,t={}){return Object.keys(i).forEach(e=>{t[e]=i[e]}),t}function P$(i){const t=new Map;return Object.keys(i).forEach(e=>{t.set(e,i[e])}),t}function Bu(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 F$(i,t,e){return e?t+":"+e+";":""}function L$(i){let t="";for(let e=0;e{const s=PO(r);e&&!e.has(r)&&e.set(r,i.style[s]),i.style[s]=n}),wO()&&L$(i))}function If(i,t){i.style&&(t.forEach((e,n)=>{const r=PO(n);i.style[r]=""}),wO()&&L$(i))}function r0(i){return Array.isArray(i)?1==i.length?i[0]:iV(i):i}const kO=new RegExp("{{\\s*(.+?)\\s*}}","g");function N$(i){let t=[];if("string"==typeof i){let e;for(;e=kO.exec(i);)t.push(e[1]);kO.lastIndex=0}return t}function s0(i,t,e){const n=i.toString(),r=n.replace(kO,(s,o)=>{let a=t[o];return null==a&&(e.push(function tge(i){return new pe(3003,!1)}()),a=""),a.toString()});return r==n?i:r}function aE(i){const t=[];let e=i.next();for(;!e.done;)t.push(e.value),e=i.next();return t}const zge=/-+([a-z0-9])/g;function PO(i){return i.replace(zge,(...t)=>t[1].toUpperCase())}function Hge(i){return i.replace(/([a-z])([A-Z])/g,"$1-$2").toLowerCase()}function sa(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 nge(i){return new pe(3004,!1)}()}}function B$(i,t){return window.getComputedStyle(i)[t]}const dE="*";function qge(i,t){const e=[];return"string"==typeof i?i.split(/\s*,\s*/).forEach(n=>function Xge(i,t,e){if(":"==i[0]){const l=function Kge(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 mge(i){return new pe(3015,!1)}()),t;const r=n[1],s=n[2],o=n[3];t.push(U$(r,o));"<"==s[0]&&!(r==dE&&o==dE)&&t.push(U$(o,r))}(n,e,t)):e.push(i),e}const uE=new Set(["true","1"]),hE=new Set(["false","0"]);function U$(i,t){const e=uE.has(i)||hE.has(i),n=uE.has(t)||hE.has(t);return(r,s)=>{let o=i==dE||i==r,a=t==dE||t==s;return!o&&e&&"boolean"==typeof r&&(o=r?uE.has(i):hE.has(i)),!a&&n&&"boolean"==typeof s&&(a=s?uE.has(t):hE.has(t)),o&&a}}const Zge=new RegExp("s*:selfs*,?","g");function OO(i,t,e,n){return new Qge(i).build(t,e,n)}class Qge{constructor(t){this._driver=t}build(t,e,n){const r=new t_e(e);return this._resetContextStyleTimingState(r),sa(this,r0(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 rge(){return new pe(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(d=>{l.name=d,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 sge(){return new pe(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=>{N$(l).forEach(c=>{o.hasOwnProperty(c)||s.add(c)})})}),s.size&&(aE(s.values()),e.errors.push(function oge(i,t){return new pe(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=sa(this,r0(t.animation),e);return{type:1,matchers:qge(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=>sa(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=sa(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 i_e(i,t){if(i.hasOwnProperty("duration"))return i;if("number"==typeof i)return FO(oE(i,t).duration,0,"");const e=i;if(e.split(/\s+/).some(s=>"{"==s.charAt(0)&&"{"==s.charAt(1))){const s=FO(0,0,"");return s.dynamic=!0,s.strValue=e,s}const r=oE(e,t);return FO(r.duration,r.delay,r.easing)}(t.timings,e.errors);e.currentAnimateTimings=n;let r,s=t.styles?t.styles:si({});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=si(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===Xc?n.push(a):e.errors.push(new pe(3002,!1)):n.push(P$(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),d=c.get(l);let h=!0;d&&(s!=r&&s>=d.startTime&&r<=d.endTime&&(e.errors.push(function lge(i,t,e,n,r){return new pe(3010,!1)}()),h=!1),s=d.startTime),h&&c.set(l,{startTime:s,endTime:r}),e.options&&function Vge(i,t,e){const n=t.params||{},r=N$(i);r.length&&r.forEach(s=>{n.hasOwnProperty(s)||e.push(function ege(i){return new pe(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 cge(){return new pe(3011,!1)}()),n;let s=0;const o=[];let a=!1,l=!1,c=0;const d=t.steps.map(y=>{const M=this._makeStyleAst(y,e);let x=null!=M.offset?M.offset:function n_e(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:sa(this,r0(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 Jge(i){const t=!!i.split(/\s*,\s*/).find(e=>":self"==e);return t&&(i=i.replace(Zge,"")),i=i.replace(/@\*/g,sE).replace(/@\w+/g,e=>sE+"-"+e.slice(1)).replace(/:animating/g,IO),[i,t]}(t.selector);e.currentQuerySelector=n.length?n+" "+s:s,ra(e.collectedStyles,e.currentQuerySelector,new Map);const a=sa(this,r0(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 fge(){return new pe(3013,!1)}());const n="full"===t.timings?{duration:0,delay:0,easing:"full"}:oE(t.timings,e.errors,!0);return{type:12,animation:sa(this,r0(t.animation),e),timings:n,options:null}}}class t_e{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=n0(i)).params&&(i.params=function e_e(i){return i?n0(i):null}(i.params)):i={},i}function FO(i,t,e){return{duration:i,delay:t,easing:e}}function LO(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 fE{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 o_e=new RegExp(":enter","g"),l_e=new RegExp(":leave","g");function NO(i,t,e,n,r,s=new Map,o=new Map,a,l,c=[]){return(new c_e).buildKeyframes(i,t,e,n,r,s,o,a,l,c)}class c_e{buildKeyframes(t,e,n,r,s,o,a,l,c,d=[]){c=c||new fE;const h=new BO(t,e,c,r,s,d,[]);h.options=l;const p=l.delay?hd(l.delay):0;h.currentTimeline.delayNextStep(p),h.currentTimeline.setStyles([o],null,h.errors,l),sa(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()):[LO(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:hd(s0(s,r?.params??{},e.errors));n.delayNextStep(o)}}}_visitSubInstructions(t,e,n){let s=e.currentTimeline.currentTime;const o=null!=n.duration?hd(n.duration):null,a=null!=n.delay?hd(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),sa(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=pE);const o=hd(s.delay);r.delayNextStep(o)}t.steps.length&&(t.steps.forEach(o=>sa(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?hd(t.options.delay):0;t.steps.forEach(o=>{const a=e.createSubContext(t.options);s&&a.delayNextStep(s),sa(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 oE(e.params?s0(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?hd(r.delay):0;s&&(6===e.previousNode.type||0==n&&e.currentTimeline.hasCurrentStyleProperties())&&(e.currentTimeline.snapshotCurrentStyles(),e.previousNode=pE);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,d)=>{e.currentQueryIndex=d;const h=e.createSubContext(t.options,c);s&&h.delayNextStep(s),c===e.element&&(l=h.currentTimeline),sa(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 d=e.currentTimeline;l&&d.delayNextStep(l);const h=d.currentTime;sa(this,t.animation,e),e.previousNode=t,n.currentStaggerTime=r.currentTime-h+(r.startTime-n.currentTimeline.startTime)}}const pE={};class BO{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=pE,this.subContextCount=0,this.options={},this.currentQueryIndex=0,this.currentQueryTotal=0,this.currentStaggerTime=0,this.currentTimeline=l||new mE(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=hd(n.duration)),null!=n.delay&&(r.delay=hd(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]=s0(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 BO(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=pE,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 d_e(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(o_e,"."+this._enterClassName)).replace(l_e,"."+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 pge(i){return new pe(3014,!1)}()),a}}class mE{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 mE(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||Xc),this._currentKeyframe.set(e,Xc);this._currentEmptyStepKeyframe=this._currentKeyframe}setStyles(t,e,n,r){e&&this._previousKeyframe.set("easing",e);const s=r&&r.params||{},o=function u_e(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,Xc)}else Bu(r,e)}),e}(t,this._globalTimelineStyles);for(let[a,l]of o){const c=s0(l,s,n);this._pendingStyles.set(a,c),this._localTimelineStyles.has(a)||this._backFill.set(a,this._globalTimelineStyles.get(a)??Xc),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=Bu(a,new Map,this._backFill);c.forEach((d,h)=>{d===rR?t.add(h):d===Xc&&e.add(h)}),n||c.set("offset",l/this.duration),r.push(c)});const s=t.size?aE(t.values()):[],o=e.size?aE(e.values()):[];if(n){const a=r[0],l=new Map(a);a.set("offset",0),l.set("offset",1),r=[a,l]}return LO(this.element,r,s,o,this.duration,this.startTime,this.easing,!1)}}class d_e extends mE{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=Bu(t[0]);l.set("offset",0),s.push(l);const c=Bu(t[0]);c.set("offset",H$(a)),s.push(c);const d=t.length-1;for(let h=1;h<=d;h++){let p=Bu(t[h]);const m=p.get("offset");p.set("offset",H$((e+m*n)/o)),s.push(p)}n=o,e=0,r="",t=s}return LO(this.element,t,this.preStyleProps,this.postStyleProps,n,e,r,!0)}}function H$(i,t=3){const e=Math.pow(10,t-1);return Math.round(i*e)/e}class UO{}const h_e=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 f_e extends UO{normalizePropertyName(t,e){return PO(t)}normalizeStyleValue(t,e,n,r){let s="";const o=n.toString().trim();if(h_e.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 ige(i,t){return new pe(3005,!1)}())}return o+s}}function G$(i,t,e,n,r,s,o,a,l,c,d,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:d,totalTime:h,errors:p}}const VO={};class $${constructor(t,e,n){this._triggerName=t,this.ast=e,this._stateStyles=n}match(t,e,n,r){return function p_e(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,d){const h=[],p=this.ast.options&&this.ast.options.params||VO,g=this.buildStyles(n,a&&a.params||VO,h),b=l&&l.params||VO,v=this.buildStyles(r,b,h),y=new Set,M=new Map,x=new Map,C="void"===r,F={params:m_e(b,p),delay:this.ast.options?.delay},D=d?[]:NO(t,e,this.ast.animation,s,o,g,v,F,c,h);let k=0;if(D.forEach(T=>{k=Math.max(T.duration+T.delay,k)}),h.length)return G$(e,this._triggerName,n,r,C,g,v,[],[],M,x,k,h);D.forEach(T=>{const A=T.element,$=ra(M,A,new Set);T.preStyleProps.forEach(ne=>$.add(ne));const ie=ra(x,A,new Set);T.postStyleProps.forEach(ne=>ie.add(ne)),A!==e&&y.add(A)});const B=aE(y.values());return G$(e,this._triggerName,n,r,C,g,v,D,B,M,x,k)}}function m_e(i,t){const e=n0(t);for(const n in i)i.hasOwnProperty(n)&&null!=i[n]&&(e[n]=i[n]);return e}class g_e{constructor(t,e,n){this.styles=t,this.defaultParams=e,this.normalizer=n}buildStyles(t,e){const n=new Map,r=n0(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=s0(o,r,e));const l=this.normalizer.normalizePropertyName(a,e);o=this.normalizer.normalizeStyleValue(a,l,o,e),n.set(a,o)})}),n}}class v_e{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 g_e(r.style,r.options&&r.options.params||{},n))}),W$(this.states,"true","1"),W$(this.states,"false","0"),e.transitions.forEach(r=>{this.transitionFactories.push(new $$(t,r,this.states))}),this.fallbackTransition=function y_e(i,t,e){return new $$(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 W$(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 b_e=new fE;class x_e{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=OO(this._driver,e,n,r);if(n.length)throw function xge(i){return new pe(3503,!1)}();this._animations.set(t,s)}_buildPlayer(t,e,n){const r=t.element,s=M$(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=NO(this._driver,e,s,TO,iE,new Map,new Map,n,b_e,r),o.forEach(d=>{const h=ra(a,d.element,new Map);d.postStyleProps.forEach(p=>h.set(p,null))})):(r.push(function wge(){return new pe(3300,!1)}()),o=[]),r.length)throw function Mge(i){return new pe(3504,!1)}();a.forEach((d,h)=>{d.forEach((p,m)=>{d.set(m,this._driver.computeStyle(h,m,Xc))})});const c=Nu(o.map(d=>{const h=a.get(d.element);return this._buildPlayer(d,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 Cge(i){return new pe(3301,!1)}();return e}listen(t,e,n,r){const s=SO(e,"","","");return MO(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 j$="ng-animate-queued",zO="ng-animate-disabled",E_e=[],Y$={namespaceId:"",setForRemoval:!1,setForMove:!1,hasAnimation:!1,removedBeforeQueried:!1},A_e={namespaceId:"",setForMove:!1,setForRemoval:!1,hasAnimation:!1,removedBeforeQueried:!0},Ua="__ng_removed";class HO{get params(){return this.options.params}constructor(t,e=""){this.namespaceId=e;const n=t&&t.hasOwnProperty("value");if(this.value=function R_e(i){return i??null}(n?t.value:t),n){const s=n0(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 o0="void",GO=new HO(o0);class D_e{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,Va(e,this._hostClassName)}listen(t,e,n,r){if(!this._triggers.has(e))throw function Sge(i,t){return new pe(3302,!1)}();if(null==n||0==n.length)throw function Ege(i){return new pe(3303,!1)}();if(!function k_e(i){return"start"==i||"done"==i}(n))throw function Age(i,t){return new pe(3400,!1)}();const s=ra(this._elementListeners,t,[]),o={name:e,phase:n,callback:r};s.push(o);const a=ra(this._engine.statesByElement,t,new Map);return a.has(e)||(Va(t,rE),Va(t,rE+"-"+e),a.set(e,GO)),()=>{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 Dge(i){return new pe(3401,!1)}();return e}trigger(t,e,n,r=!0){const s=this._getTrigger(e),o=new $O(this.id,e,t);let a=this._engine.statesByElement.get(t);a||(Va(t,rE),Va(t,rE+"-"+e),this._engine.statesByElement.set(t,a=new Map));let l=a.get(e);const c=new HO(n,this.id);if(!(n&&n.hasOwnProperty("value"))&&l&&c.absorbOptions(l.options),a.set(e,c),l||(l=GO),c.value!==o0&&l.value===c.value){if(!function F_e(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),hc(t,y)})}return}const p=ra(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||(Va(t,j$),o.onStart(()=>{Yg(t,j$)})),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,sE,!0);n.forEach(r=>{if(r[Ua])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 d=this.trigger(t,c,o0,r);d&&a.push(d)}}),a.length)return this._engine.markElementAsRemoved(this.id,t,!0,e,o),n&&Nu(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)||GO,d=new HO(o0),h=new $O(this.id,o,t);this._engine.totalQueuedPlayers++,this._queue.push({element:t,triggerName:o,transition:l,fromState:c,toState:d,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[Ua];(!s||s===Y$)&&(n.afterFlush(()=>this.clearElementCache(t)),n.destroyInnerAnimations(t),n._onRemovalComplete(t,e))}}insertNode(t,e){Va(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=SO(s,n.triggerName,n.fromState.value,n.toState.value);l._data=t,MO(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 T_e{_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 D_e(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(gE(e)){const s=this._fetchNamespace(t);if(s)return s.trigger(e,n,r),!0}return!1}insertNode(t,e,n,r){if(!gE(e))return;const s=e[Ua];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),Va(t,zO)):this.disabledNodes.has(t)&&(this.disabledNodes.delete(t),Yg(t,zO))}removeNode(t,e,n,r){if(gE(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[Ua]={namespaceId:t,setForRemoval:r,hasAnimation:n,removedBeforeQueried:!1,previousTriggersValues:s}}listen(t,e,n,r,s){return gE(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,sE,!0);e.forEach(n=>this.destroyActiveAnimationsForElement(n)),0!=this.playersByQueriedElement.size&&(e=this.driver.query(t,IO,!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 Nu(this.players).onDone(()=>t());t()})}processLeaveNode(t){const e=t[Ua];if(e&&e.setForRemoval){if(t[Ua]=Y$,e.namespaceId){this.destroyInnerAnimations(t);const n=this._fetchNamespace(e.namespaceId);n&&n.clearElementCache(t)}this._onRemovalComplete(t,e.setForRemoval)}t.classList?.contains(zO)&&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?Nu(e).onDone(()=>{n.forEach(r=>r())}):n.forEach(r=>r())}}reportError(t){throw function Tge(i){return new pe(3402,!1)}()}_flushAnimations(t,e){const n=new fE,r=[],s=new Map,o=[],a=new Map,l=new Map,c=new Map,d=new Set;this.disabledNodes.forEach(q=>{d.add(q);const re=this.driver.query(q,".ng-animate-queued",!0);for(let J=0;J{const J=TO+b++;g.set(re,J),q.forEach(we=>Va(we,J))});const v=[],y=new Set,M=new Set;for(let q=0;qy.add(we)):M.add(re))}const x=new Map,C=K$(p,Array.from(y));C.forEach((q,re)=>{const J=iE+b++;x.set(re,J),q.forEach(we=>Va(we,J))}),t.push(()=>{m.forEach((q,re)=>{const J=g.get(re);q.forEach(we=>Yg(we,J))}),C.forEach((q,re)=>{const J=x.get(re);q.forEach(we=>Yg(we,J))}),v.forEach(q=>{this.processLeaveNode(q)})});const F=[],D=[];for(let q=this._namespaceList.length-1;q>=0;q--)this._namespaceList[q].drainQueuedTransitions(e).forEach(J=>{const we=J.player,Ne=J.element;if(F.push(we),this.collectedEnterElements.length){const Fe=Ne[Ua];if(Fe&&Fe.setForMove){if(Fe.previousTriggersValues&&Fe.previousTriggersValues.has(J.triggerName)){const bt=Fe.previousTriggersValues.get(J.triggerName),St=this.statesByElement.get(J.element);if(St&&St.has(J.triggerName)){const Mt=St.get(J.triggerName);Mt.value=bt,St.set(J.triggerName,Mt)}}return void we.destroy()}}const Ye=!h||!this.driver.containsElement(h,Ne),It=x.get(Ne),en=g.get(Ne),ae=this._buildInstruction(J,n,en,It,Ye);if(ae.errors&&ae.errors.length)return void D.push(ae);if(Ye)return we.onStart(()=>If(Ne,ae.fromStyles)),we.onDestroy(()=>hc(Ne,ae.toStyles)),void r.push(we);if(J.isFallbackTransition)return we.onStart(()=>If(Ne,ae.fromStyles)),we.onDestroy(()=>hc(Ne,ae.toStyles)),void r.push(we);const Oe=[];ae.timelines.forEach(Fe=>{Fe.stretchStartingKeyframe=!0,this.disabledNodes.has(Fe.element)||Oe.push(Fe)}),ae.timelines=Oe,n.append(Ne,ae.timelines),o.push({instruction:ae,player:we,element:Ne}),ae.queriedElements.forEach(Fe=>ra(a,Fe,[]).push(we)),ae.preStyleProps.forEach((Fe,bt)=>{if(Fe.size){let St=l.get(bt);St||l.set(bt,St=new Set),Fe.forEach((Mt,Sn)=>St.add(Sn))}}),ae.postStyleProps.forEach((Fe,bt)=>{let St=c.get(bt);St||c.set(bt,St=new Set),Fe.forEach((Mt,Sn)=>St.add(Sn))})});if(D.length){const q=[];D.forEach(re=>{q.push(function Ige(i,t){return new pe(3505,!1)}())}),F.forEach(re=>re.destroy()),this.reportError(q)}const k=new Map,B=new Map;o.forEach(q=>{const re=q.element;n.has(re)&&(B.set(re,re),this._beforeAnimationBuild(q.player.namespaceId,q.instruction,k))}),r.forEach(q=>{const re=q.element;this._getPreviousPlayers(re,!1,q.namespaceId,q.triggerName,null).forEach(we=>{ra(k,re,[]).push(we),we.destroy()})});const T=v.filter(q=>Q$(q,l,c)),A=new Map;X$(A,this.driver,M,c,Xc).forEach(q=>{Q$(q,l,c)&&T.push(q)});const ie=new Map;m.forEach((q,re)=>{X$(ie,this.driver,new Set(q),l,rR)}),T.forEach(q=>{const re=A.get(q),J=ie.get(q);A.set(q,new Map([...Array.from(re?.entries()??[]),...Array.from(J?.entries()??[])]))});const ne=[],se=[],ge={};o.forEach(q=>{const{element:re,player:J,instruction:we}=q;if(n.has(re)){if(d.has(re))return J.onDestroy(()=>hc(re,we.toStyles)),J.disabled=!0,J.overrideTotalTime(we.totalTime),void r.push(J);let Ne=ge;if(B.size>1){let It=re;const en=[];for(;It=It.parentNode;){const ae=B.get(It);if(ae){Ne=ae;break}en.push(It)}en.forEach(ae=>B.set(ae,Ne))}const Ye=this._buildAnimation(J.namespaceId,we,k,s,ie,A);if(J.setRealPlayer(Ye),Ne===ge)ne.push(J);else{const It=this.playersByElement.get(Ne);It&&It.length&&(J.parentPlayer=Nu(It)),r.push(J)}}else If(re,we.fromStyles),J.onDestroy(()=>hc(re,we.toStyles)),se.push(J),d.has(re)&&r.push(J)}),se.forEach(q=>{const re=s.get(q.element);if(re&&re.length){const J=Nu(re);q.setRealPlayer(J)}}),r.forEach(q=>{q.parentPlayer?q.syncPlayerEvents(q.parentPlayer):q.destroy()});for(let q=0;q!Ye.destroyed);Ne.length?P_e(this,re,Ne):this.processLeaveNode(re)}return v.length=0,ne.forEach(q=>{this.players.push(q),q.onDone(()=>{q.destroy();const re=this.players.indexOf(q);this.players.splice(re,1)}),q.play()}),ne}elementContainsData(t,e){let n=!1;const r=e[Ua];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==o0;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,d=c!==s,h=ra(n,c,[]);this._getPreviousPlayers(c,d,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=[],d=new Set,h=new Set,p=e.timelines.map(g=>{const b=g.element;d.add(b);const v=b[Ua];if(v&&v.removedBeforeQueried)return new tb(g.duration,g.delay);const y=b!==l,M=function O_e(i){const t=[];return Z$(i,t),t}((n.get(b)||E_e).map(k=>k.getRealPlayer())).filter(k=>!!k.element&&k.element===b),x=s.get(b),C=o.get(b),F=M$(0,this._normalizer,0,g.keyframes,x,C),D=this._buildPlayer(g,F,M);if(g.subTimeline&&r&&h.add(b),y){const k=new $O(t,a,b);k.setRealPlayer(D),c.push(k)}return D});c.forEach(g=>{ra(this.playersByQueriedElement,g.element,[]).push(g),g.onDone(()=>function I_e(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))}),d.forEach(g=>Va(g,k$));const m=Nu(p);return m.onDestroy(()=>{d.forEach(g=>Yg(g,k$)),hc(l,e.toStyles)}),h.forEach(g=>{ra(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 tb(t.duration,t.delay)}}class $O{constructor(t,e,n){this.namespaceId=t,this.triggerName=e,this.element=n,this._player=new tb,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=>MO(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){ra(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 gE(i){return i&&1===i.nodeType}function q$(i,t){const e=i.style.display;return i.style.display=t??"none",e}function X$(i,t,e,n,r){const s=[];e.forEach(l=>s.push(q$(l)));const o=[];n.forEach((l,c)=>{const d=new Map;l.forEach(h=>{const p=t.computeStyle(c,h,r);d.set(h,p),(!p||0==p.length)&&(c[Ua]=A_e,o.push(c))}),i.set(c,d)});let a=0;return e.forEach(l=>q$(l,s[a++])),o}function K$(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 Va(i,t){i.classList?.add(t)}function Yg(i,t){i.classList?.remove(t)}function P_e(i,t,e){Nu(e).onDone(()=>i.processLeaveNode(t))}function Z$(i,t){for(let e=0;er.add(s)):t.set(i,n),e.delete(i),!0}class _E{constructor(t,e,n){this.bodyNode=t,this._driver=e,this._normalizer=n,this._triggerCache={},this.onRemovalComplete=(r,s)=>{},this._transitionEngine=new T_e(t,e,n),this._timelineEngine=new x_e(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=[],d=OO(this._driver,s,l,c);if(l.length)throw function yge(i,t){return new pe(3404,!1)}();a=function __e(i,t,e){return new v_e(i,t,e)}(r,d,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]=C$(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]=C$(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 N_e=(()=>{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&&hc(this._element,this._startStyles,this._initialStyles),this._state=1)}finish(){this.start(),this._state<2&&(hc(this._element,this._initialStyles),this._endStyles&&(hc(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),hc(this._element,this._initialStyles),this._state=3)}}return i.initialStylesByElement=new WeakMap,i})();function WO(i){let t=null;return i.forEach((e,n)=>{(function B_e(i){return"display"===i||"position"===i})(n)&&(t=t||new Map,t.set(n,e))}),t}class J${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:B$(this.element,r))}),this.currentSnapshot=t}triggerCallback(t){const e="start"===t?this._onStartFns:this._onDoneFns;e.forEach(n=>n()),e.length=0}}class U_e{validateStyleProperty(t){return!0}validateAnimatableStyleProperty(t){return!0}matchesElement(t,e){return!1}containsElement(t,e){return D$(t,e)}getParentElement(t){return AO(t)}query(t,e,n){return T$(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,d=o.filter(m=>m instanceof J$);(function Gge(i,t){return 0===i||0===t})(n,r)&&d.forEach(m=>{m.currentSnapshot.forEach((g,b)=>c.set(b,g))});let h=function Uge(i){return i.length?i[0]instanceof Map?i:i.map(t=>P$(t)):[]}(e).map(m=>Bu(m));h=function $ge(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,B$(i,a)))}}return t}(t,h,c);const p=function L_e(i,t){let e=null,n=null;return Array.isArray(t)&&t.length?(e=WO(t[0]),t.length>1&&(n=WO(t[t.length-1]))):t instanceof Map&&(e=WO(t)),e||n?new N_e(i,e,n):null}(t,h);return new J$(t,h,l,p)}}let V_e=(()=>{class i extends tV{constructor(e,n){super(),this._nextAnimationId=0,this._renderer=e.createRenderer(n.body,{id:"0",encapsulation:qs.None,styles:[],data:{animation:[]}})}build(e){const n=this._nextAnimationId.toString();this._nextAnimationId++;const r=Array.isArray(e)?iV(e):e;return e8(this._renderer,null,n,"register",[r]),new z_e(n,this._renderer)}}return i.\u0275fac=function(e){return new(e||i)(ee(Gl),ee(jt))},i.\u0275prov=ke({token:i,factory:i.\u0275fac}),i})();class z_e extends FQ{constructor(t,e){super(),this._id=t,this._renderer=e}create(t,e){return new H_e(this._id,t,e||{},this._renderer)}}class H_e{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 e8(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 e8(i,t,e,n,r){return i.setProperty(t,`@@${e}:${n}`,r)}const t8="@.disabled";let G_e=(()=>{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 d=this._rendererCache.get(s);return d||(d=new n8("",s,this.engine,()=>this._rendererCache.delete(s)),this._rendererCache.set(s,d)),d}const o=n.id,a=n.id+"-"+this._currentId;this._currentId++,this.engine.register(a,e);const l=d=>{Array.isArray(d)?d.forEach(l):this.engine.registerTrigger(o,a,e,d.name,d)};return n.data.animation.forEach(l),new $_e(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)(ee(Gl),ee(_E),ee(ft))},i.\u0275prov=ke({token:i,factory:i.\u0275fac}),i})();class n8{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==t8?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 $_e extends n8{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==t8?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 W_e(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 j_e(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 i8=[{provide:tV,useClass:V_e},{provide:UO,useFactory:function q_e(){return new f_e}},{provide:_E,useClass:(()=>{class i extends _E{constructor(e,n,r,s){super(e.body,n,r)}ngOnDestroy(){this.flush()}}return i.\u0275fac=function(e){return new(e||i)(ee(jt),ee(DO),ee(UO),ee(dm))},i.\u0275prov=ke({token:i,factory:i.\u0275fac}),i})()},{provide:Gl,useFactory:function X_e(i,t,e){return new G_e(i,t,e)},deps:[aM,_E,ft]}],jO=[{provide:DO,useFactory:()=>new U_e},{provide:Rr,useValue:"BrowserAnimations"},...i8],r8=[{provide:DO,useClass:I$},{provide:Rr,useValue:"NoopAnimations"},...i8];let K_e=(()=>{class i{static withConfig(e){return{ngModule:i,providers:e.disableAnimations?r8:jO}}}return i.\u0275fac=function(e){return new(e||i)},i.\u0275mod=nn({type:i}),i.\u0275inj=Kt({providers:jO,imports:[FB]}),i})();const s8=new me("CdkAccordion");let Z_e=0,Q_e=(()=>{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=Zt.EMPTY,this.closed=new We,this.opened=new We,this.destroyed=new We,this.expandedChange=new We,this.id="cdk-accordion-child-"+Z_e++,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)(E(s8,12),E(Zn),E(GR))},i.\u0275dir=ve({type:i,selectors:[["cdk-accordion-item"],["","cdkAccordionItem",""]],inputs:{expanded:"expanded",disabled:"disabled"},outputs:{closed:"closed",opened:"opened",destroyed:"destroyed",expandedChange:"expandedChange"},exportAs:["cdkAccordionItem"],features:[Dn([{provide:s8,useValue:void 0}])]}),i})(),J_e=(()=>{class i{}return i.\u0275fac=function(e){return new(e||i)},i.\u0275mod=nn({type:i}),i.\u0275inj=Kt({}),i})();const eve=["body"];function tve(i,t){}const nve=[[["mat-expansion-panel-header"]],"*",[["mat-action-row"]]],ive=["mat-expansion-panel-header","*","mat-action-row"];function rve(i,t){1&i&&De(0,"span",2),2&i&&U("@indicatorRotate",he()._getExpandedState())}const sve=[[["mat-panel-title"]],[["mat-panel-description"]],"*"],ove=["mat-panel-title","mat-panel-description","*"],o8=new me("MAT_ACCORDION"),a8="225ms cubic-bezier(0.4,0.0,0.2,1)",l8={indicatorRotate:Ra("indicatorRotate",[Ps("collapsed, void",si({transform:"rotate(0deg)"})),Ps("expanded",si({transform:"rotate(180deg)"})),Pr("expanded <=> collapsed, void => collapsed",jr(a8))]),bodyExpansion:Ra("bodyExpansion",[Ps("collapsed, void",si({height:"0px",visibility:"hidden"})),Ps("expanded",si({height:"*",visibility:"visible"})),Pr("expanded <=> collapsed, void => collapsed",jr(a8))])},c8=new me("MAT_EXPANSION_PANEL");let ave=(()=>{class i{constructor(e,n){this._template=e,this._expansionPanel=n}}return i.\u0275fac=function(e){return new(e||i)(E(Mo),E(c8,8))},i.\u0275dir=ve({type:i,selectors:[["ng-template","matExpansionPanelContent",""]]}),i})(),lve=0;const d8=new me("MAT_EXPANSION_PANEL_DEFAULT_OPTIONS");let u8=(()=>{class i extends Q_e{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 We,this.afterCollapse=new We,this._inputChanges=new Re,this._headerId="mat-expansion-panel-header-"+lve++,this._bodyAnimationDone=new Re,this.accordion=e,this._document=o,this._bodyAnimationDone.pipe(Zl((c,d)=>c.fromState===d.fromState&&c.toState===d.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(Ao(null),gn(()=>this.expanded&&!this._portal),Oi(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)(E(o8,12),E(Zn),E(GR),E(Wr),E(jt),E(Rr,8),E(d8,8))},i.\u0275cmp=ot({type:i,selectors:[["mat-expansion-panel"]],contentQueries:function(e,n,r){if(1&e&&Wi(r,ave,5),2&e){let s;Et(s=At())&&(n._lazyContent=s.first)}},viewQuery:function(e,n){if(1&e&&Wn(eve,5),2&e){let r;Et(r=At())&&(n._body=r.first)}},hostAttrs:[1,"mat-expansion-panel"],hostVars:6,hostBindings:function(e,n){2&e&&un("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:[Dn([{provide:o8,useValue:void 0},{provide:c8,useExisting:i}]),lt,bi],ngContentSelectors:ive,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&&(sr(nve),Wt(0),W(1,"div",0,1),Ue("@bodyExpansion.done",function(s){return n._bodyAnimationDone.next(s)}),W(3,"div",2),Wt(4,1),fe(5,tve,0,0,"ng-template",3),j(),Wt(6,2),j()),2&e&&(G(1),U("@bodyExpansion",n._getExpandedState())("id",n.id),Dt("aria-labelledby",n._headerId),G(4),U("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:[l8.bodyExpansion]},changeDetection:0}),i})();class cve{}const dve=JI(cve);let uve=(()=>{class i extends dve{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=Zt.EMPTY;const c=e.accordion?e.accordion._stateChanges.pipe(gn(d=>!(!d.hideToggle&&!d.togglePosition))):po;this.tabIndex=parseInt(l||"")||0,this._parentChangeSubscription=Mr(e.opened,e.closed,c,e._inputChanges.pipe(gn(d=>!!(d.hideToggle||d.disabled||d.togglePosition)))).subscribe(()=>this._changeDetectorRef.markForCheck()),e.closed.pipe(gn(()=>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:Xo(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)(E(u8,1),E(mt),E(qc),E(Zn),E(d8,8),E(Rr,8),ya("tabindex"))},i.\u0275cmp=ot({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&&Ue("click",function(){return n._toggle()})("keydown",function(s){return n._keydown(s)}),2&e&&(Dt("id",n.panel._headerId)("tabindex",n.tabIndex)("aria-controls",n._getPanelId())("aria-expanded",n._isExpanded())("aria-disabled",n.panel.disabled),jo("height",n._getHeaderHeight()),un("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:[lt],ngContentSelectors:ove,decls:5,vars:3,consts:[[1,"mat-content"],["class","mat-expansion-indicator",4,"ngIf"],[1,"mat-expansion-indicator"]],template:function(e,n){1&e&&(sr(sve),W(0,"span",0),Wt(1),Wt(2,1),Wt(3,2),j(),fe(4,rve,1,1,"span",1)),2&e&&(un("mat-content-hide-toggle",!n._showToggle()),G(4),U("ngIf",n._showToggle()))},dependencies:[vi],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:[l8.indicatorRotate]},changeDetection:0}),i})(),hve=(()=>{class i{}return i.\u0275fac=function(e){return new(e||i)},i.\u0275dir=ve({type:i,selectors:[["mat-panel-description"]],hostAttrs:[1,"mat-expansion-panel-header-description"]}),i})(),fve=(()=>{class i{}return i.\u0275fac=function(e){return new(e||i)},i.\u0275dir=ve({type:i,selectors:[["mat-panel-title"]],hostAttrs:[1,"mat-expansion-panel-header-title"]}),i})(),pve=(()=>{class i{}return i.\u0275fac=function(e){return new(e||i)},i.\u0275mod=nn({type:i}),i.\u0275inj=Kt({imports:[Eo,Qn,J_e,Nh]}),i})();function mve(i,t){if(1&i&&(W(0,"mat-option",19),Ve(1),j()),2&i){const e=t.$implicit;U("value",e),G(1),Qi(" ",e," ")}}function gve(i,t){if(1&i){const e=di();W(0,"mat-form-field",16)(1,"mat-select",17),Ue("selectionChange",function(r){return an(e),zt(he(2)._changePageSize(r.value))}),fe(2,mve,2,2,"mat-option",18),j()()}if(2&i){const e=he(2);U("appearance",e._formFieldAppearance)("color",e.color),G(1),U("value",e.pageSize)("disabled",e.disabled)("aria-labelledby",e._pageSizeLabelId)("panelClass",e.selectConfig.panelClass||"")("disableOptionCentering",e.selectConfig.disableOptionCentering),G(1),U("ngForOf",e._displayedPageSizeOptions)}}function _ve(i,t){if(1&i&&(W(0,"div",20),Ve(1),j()),2&i){const e=he(2);G(1),_i(e.pageSize)}}function vve(i,t){if(1&i&&(W(0,"div",12)(1,"div",13),Ve(2),j(),fe(3,gve,3,8,"mat-form-field",14),fe(4,_ve,2,1,"div",15),j()),2&i){const e=he();G(1),B1("id",e._pageSizeLabelId),G(1),Qi(" ",e._intl.itemsPerPageLabel," "),G(1),U("ngIf",e._displayedPageSizeOptions.length>1),G(1),U("ngIf",e._displayedPageSizeOptions.length<=1)}}function yve(i,t){if(1&i){const e=di();W(0,"button",21),Ue("click",function(){return an(e),zt(he().firstPage())}),ki(),W(1,"svg",7),De(2,"path",22),j()()}if(2&i){const e=he();U("matTooltip",e._intl.firstPageLabel)("matTooltipDisabled",e._previousButtonsDisabled())("matTooltipPosition","above")("disabled",e._previousButtonsDisabled()),Dt("aria-label",e._intl.firstPageLabel)}}function bve(i,t){if(1&i){const e=di();ki(),ga(),W(0,"button",23),Ue("click",function(){return an(e),zt(he().lastPage())}),ki(),W(1,"svg",7),De(2,"path",24),j()()}if(2&i){const e=he();U("matTooltip",e._intl.lastPageLabel)("matTooltipDisabled",e._nextButtonsDisabled())("matTooltipPosition","above")("disabled",e._nextButtonsDisabled()),Dt("aria-label",e._intl.lastPageLabel)}}let yE=(()=>{class i{constructor(){this.changes=new Re,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=ke({token:i,factory:i.\u0275fac,providedIn:"root"}),i})();const wve={provide:yE,deps:[[new Ss,new xa,yE]],useFactory:function xve(i){return i||new yE}},Cve=new me("MAT_PAGINATOR_DEFAULT_OPTIONS"),Sve=jM(MQ(class{}));let Eve=(()=>{class i extends Sve{get pageIndex(){return this._pageIndex}set pageIndex(e){this._pageIndex=Math.max(ks(e),0),this._changeDetectorRef.markForCheck()}get length(){return this._length}set length(e){this._length=ks(e),this._changeDetectorRef.markForCheck()}get pageSize(){return this._pageSize}set pageSize(e){this._pageSize=Math.max(ks(e),0),this._updateDisplayedPageSizeOptions()}get pageSizeOptions(){return this._pageSizeOptions}set pageSizeOptions(e){this._pageSizeOptions=(e||[]).map(n=>ks(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 We,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){xo()},i.\u0275dir=ve({type:i,inputs:{color:"color",pageIndex:"pageIndex",length:"length",pageSize:"pageSize",pageSizeOptions:"pageSizeOptions",hidePageSize:"hidePageSize",showFirstLastButtons:"showFirstLastButtons",selectConfig:"selectConfig"},outputs:{page:"page"},features:[lt]}),i})(),Ave=0,Dve=(()=>{class i extends Eve{constructor(e,n,r){super(e,n,r),this._pageSizeLabelId="mat-paginator-page-size-label-"+Ave++,this._formFieldAppearance=r?.formFieldAppearance||"outline"}}return i.\u0275fac=function(e){return new(e||i)(E(yE),E(Zn),E(Cve,8))},i.\u0275cmp=ot({type:i,selectors:[["mat-paginator"]],hostAttrs:["role","group",1,"mat-mdc-paginator"],inputs:{disabled:"disabled"},exportAs:["matPaginator"],features:[lt],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&&(W(0,"div",0)(1,"div",1),fe(2,vve,5,4,"div",2),W(3,"div",3)(4,"div",4),Ve(5),j(),fe(6,yve,3,5,"button",5),W(7,"button",6),Ue("click",function(){return n.previousPage()}),ki(),W(8,"svg",7),De(9,"path",8),j()(),ga(),W(10,"button",9),Ue("click",function(){return n.nextPage()}),ki(),W(11,"svg",7),De(12,"path",10),j()(),fe(13,bve,3,5,"button",11),j()()()),2&e&&(G(2),U("ngIf",!n.hidePageSize),G(3),Qi(" ",n._intl.getRangeLabel(n.pageIndex,n.pageSize,n.length)," "),G(1),U("ngIf",n.showFirstLastButtons),G(1),U("matTooltip",n._intl.previousPageLabel)("matTooltipDisabled",n._previousButtonsDisabled())("matTooltipPosition","above")("disabled",n._previousButtonsDisabled()),Dt("aria-label",n._intl.previousPageLabel),G(3),U("matTooltip",n._intl.nextPageLabel)("matTooltipDisabled",n._nextButtonsDisabled())("matTooltipPosition","above")("disabled",n._nextButtonsDisabled()),Dt("aria-label",n._intl.nextPageLabel),G(3),U("ngIf",n.showFirstLastButtons))},dependencies:[So,vi,XM,vl,fb,Nm,Os],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})(),Tve=(()=>{class i{}return i.\u0275fac=function(e){return new(e||i)},i.\u0275mod=nn({type:i}),i.\u0275inj=Kt({providers:[wve],imports:[Eo,KM,VH,FV]}),i})(),Ive=(()=>{class i{}return i.\u0275fac=function(e){return new(e||i)},i.\u0275mod=nn({type:i,bootstrap:[Zme]}),i.\u0275inj=Kt({providers:[Ql,NH,{provide:PH,useValue:Uie}],imports:[FB,xK,K_e,eH,CJ,gC,pH,pve,DV,RV,FV,KM,ez,Tve,rse,_H,VH,_V,ype,bme,tH,tR,jie]}),i})();th(Jl,[So,vi,Os,t0,nE],[pl]),th(zR,[hm,So,vi,xy,tc,Kc,vl,u8,uve,fve,hve,Os,Dve,fb,Nm,t0],[]),th(xC,[So,vi,MC,wC,gH,t0],[]),th(g$,[So,vi,To,Os,fb,Nm,t0,nE],[pl]),F7().bootstrapModule(Ive).catch(i=>console.error(i))},489:function(Lo,Hs,ps){var cn;Lo=ps.nmd(Lo),function(){var V,Kr=200,Un="Expected a function",Ha="__lodash_hash_undefined__",Mi="__lodash_placeholder__",Ci=1,ms=2,$s=4,Ws=1,No=2,On=1,dr=2,pc=4,la=8,Dl=16,ca=32,Tl=64,Ga=128,da=256,pd=512,ME=800,Kg=16,In=1/0,Wa=9007199254740991,SE=17976931348623157e292,Pf=NaN,ua=4294967295,Re=ua-1,l0=ua>>>1,c0=[["ary",Ga],["bind",On],["bindKey",dr],["curry",la],["curryRight",Dl],["flip",pd],["partial",ca],["partialRight",Tl],["rearg",da]],ti="[object Arguments]",Yn="[object Array]",EE="[object AsyncFunction]",et="[object Boolean]",mc="[object Date]",AE="[object DOMException]",md="[object Error]",Of="[object Function]",d0="[object GeneratorFunction]",Bo="[object Map]",Vu="[object Number]",DE="[object Null]",ja="[object Object]",u0="[object Promise]",TE="[object Proxy]",gd="[object RegExp]",Uo="[object Set]",gc="[object String]",Ff="[object Symbol]",Zg="[object Undefined]",_d="[object WeakMap]",zu="[object ArrayBuffer]",vd="[object DataView]",ha="[object Float32Array]",Lf="[object Float64Array]",Qg="[object Int8Array]",Nf="[object Int16Array]",Jg="[object Int32Array]",e_="[object Uint8Array]",Hu="[object Uint8ClampedArray]",t_="[object Uint16Array]",n_="[object Uint32Array]",RE=/\b__p \+= '';/g,kE=/\b(__p \+=) '' \+/g,PE=/(__e\(.*?\)|\b__t\)) \+\n'';/g,h0=/&(?:amp|lt|gt|quot|#39);/g,f0=/[&<>"']/g,OE=RegExp(h0.source),FE=RegExp(f0.source),ZO=/<%-([\s\S]+?)%>/g,i_=/<%([\s\S]+?)%>/g,r_=/<%=([\s\S]+?)%>/g,p0=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,m0=/^\w*$/,g0=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,s_=/[\\^$.*+?()[\]{}|]/g,_0=RegExp(s_.source),Bf=/^\s+/,v0=/\s/,y0=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,wr=/\{\n\/\* \[wrapped with (.+)\] \*/,LE=/,? & /,NE=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,BE=/[()=,{}\[\]\/\s]/,UE=/\\(\\)?/g,b0=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,x0=/\w*$/,VE=/^[-+]0x[0-9a-f]+$/i,Ya=/^0b[01]+$/i,zE=/^\[object .+?Constructor\]$/,ir=/^0o[0-7]+$/i,yd=/^(?:0|[1-9]\d*)$/,po=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,o_=/($^)/,HE=/['\n\r\u2028\u2029\\]/g,Gu="\\ud800-\\udfff",M0="\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff",l_="\\u2700-\\u27bf",c_="a-z\\xdf-\\xf6\\xf8-\\xff",d_="A-Z\\xc0-\\xd6\\xd8-\\xde",C0="\\ufe0e\\ufe0f",S0="\\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",Mr="["+Gu+"]",Uf="["+S0+"]",bd="["+M0+"]",li="\\d+",u_="["+l_+"]",pi="["+c_+"]",Vf="[^"+Gu+S0+li+l_+c_+d_+"]",h_="\\ud83c[\\udffb-\\udfff]",Pt="[^"+Gu+"]",Wu="(?:\\ud83c[\\udde6-\\uddff]){2}",ju="[\\ud800-\\udbff][\\udc00-\\udfff]",Yu="["+d_+"]",pe="(?:"+pi+"|"+Vf+")",zf="(?:"+Yu+"|"+Vf+")",Qt="(?:['\u2019](?:d|ll|m|re|s|t|ve))?",qn="(?:['\u2019](?:D|LL|M|RE|S|T|VE))?",E0="(?:"+bd+"|"+h_+")?",YE="["+C0+"]?",XE=YE+E0+"(?:\\u200d(?:"+[Pt,Wu,ju].join("|")+")"+YE+E0+")*",KE="(?:"+[u_,Wu,ju].join("|")+")"+XE,QO="(?:"+[Pt+bd+"?",bd,Wu,ju,Mr].join("|")+")",Il=RegExp("['\u2019]","g"),JO=RegExp(bd,"g"),A0=RegExp(h_+"(?="+h_+")|"+QO+XE,"g"),eF=RegExp([Yu+"?"+pi+"+"+Qt+"(?="+[Uf,Yu,"$"].join("|")+")",zf+"+"+qn+"(?="+[Uf,Yu+pe,"$"].join("|")+")",Yu+"?"+pe+"+"+Qt,Yu+"+"+qn,"\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])","\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",li,KE].join("|"),"g"),tF=RegExp("[\\u200d"+Gu+M0+C0+"]"),ZE=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,nF=["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"],QE=-1,Si={};Si[ha]=Si[Lf]=Si[Qg]=Si[Nf]=Si[Jg]=Si[e_]=Si[Hu]=Si[t_]=Si[n_]=!0,Si[ti]=Si[Yn]=Si[zu]=Si[et]=Si[vd]=Si[mc]=Si[md]=Si[Of]=Si[Bo]=Si[Vu]=Si[ja]=Si[gd]=Si[Uo]=Si[gc]=Si[_d]=!1;var En={};En[ti]=En[Yn]=En[zu]=En[vd]=En[et]=En[mc]=En[ha]=En[Lf]=En[Qg]=En[Nf]=En[Jg]=En[Bo]=En[Vu]=En[ja]=En[gd]=En[Uo]=En[gc]=En[Ff]=En[e_]=En[Hu]=En[t_]=En[n_]=!0,En[md]=En[Of]=En[_d]=!1;var sF={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},ke=parseFloat,oF=parseInt,Kt="object"==typeof global&&global&&global.Object===Object&&global,Gf="object"==typeof self&&self&&self.Object===Object&&self,Cr=Kt||Gf||Function("return this")(),f_=Hs&&!Hs.nodeType&&Hs,Xu=f_&&Lo&&!Lo.nodeType&&Lo,p_=Xu&&Xu.exports===f_,xd=p_&&Kt.process,gs=function(){try{return Xu&&Xu.require&&Xu.require("util").types||xd&&xd.binding&&xd.binding("util")}catch{}}(),m_=gs&&gs.isArrayBuffer,D0=gs&&gs.isDate,Ot=gs&&gs.isMap,$f=gs&&gs.isRegExp,T0=gs&&gs.isSet,Ys=gs&&gs.isTypedArray;function _s(X,ue,oe){switch(oe.length){case 0:return X.call(ue);case 1:return X.call(ue,oe[0]);case 2:return X.call(ue,oe[0],oe[1]);case 3:return X.call(ue,oe[0],oe[1],oe[2])}return X.apply(ue,oe)}function aF(X,ue,oe,Be){for(var $t=-1,Vn=null==X?0:X.length;++$t-1}function Ku(X,ue,oe){for(var Be=-1,$t=null==X?0:X.length;++Be<$t;)if(oe(ue,X[Be]))return!0;return!1}function mi(X,ue){for(var oe=-1,Be=null==X?0:X.length,$t=Array(Be);++oe-1;);return oe}function fa(X,ue){for(var oe=X.length;oe--&&Ft(ue,X[oe],0)>-1;);return oe}var nA=v_({\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"}),ot=v_({"&":"&","<":"<",">":">",'"':""","'":"'"});function th(X){return"\\"+sF[X]}function Cd(X){return tF.test(X)}function qf(X){var ue=-1,oe=Array(X.size);return X.forEach(function(Be,$t){oe[++ue]=[$t,Be]}),oe}function ve(X,ue){return function(oe){return X(ue(oe))}}function Gi(X,ue){for(var oe=-1,Be=X.length,$t=0,Vn=[];++oe",""":'"',"'":"'"}),ys=function X(ue){var u,oe=(ue=null==ue?Cr:ys.defaults(Cr.Object(),ue,ys.pick(Cr,nF))).Array,Be=ue.Date,$t=ue.Error,Vn=ue.Function,yt=ue.Math,oi=ue.Object,yc=ue.RegExp,R0=ue.String,Sr=ue.TypeError,rr=oe.prototype,Vo=oi.prototype,Xs=ue["__core-js_shared__"],Pl=Vn.prototype.toString,ii=Vo.hasOwnProperty,yi=0,sA=(u=/[^.]+$/.exec(Xs&&Xs.keys&&Xs.keys.IE_PROTO||""))?"Symbol(src)_1."+u:"",Ed=Vo.toString,k0=Pl.call(oi),Kf=Cr._,Zf=yc("^"+Pl.call(ii).replace(s_,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),Za=p_?ue.Buffer:V,Ui=ue.Symbol,x_=ue.Uint8Array,bs=Za?Za.allocUnsafe:V,xs=ve(oi.getPrototypeOf,oi),Qf=oi.create,Ad=Vo.propertyIsEnumerable,bc=rr.splice,_o=Ui?Ui.isConcatSpreadable:V,ih=Ui?Ui.iterator:V,Dd=Ui?Ui.toStringTag:V,Jf=function(){try{var u=Rc(oi,"defineProperty");return u({},"",{}),u}catch{}}(),oA=ue.clearTimeout!==Cr.clearTimeout&&ue.clearTimeout,cF=Be&&Be.now!==Cr.Date.now&&Be.now,dF=ue.setTimeout!==Cr.setTimeout&&ue.setTimeout,w_=yt.ceil,M_=yt.floor,P0=oi.getOwnPropertySymbols,uF=Za?Za.isBuffer:V,aA=ue.isFinite,hF=rr.join,fF=ve(oi.keys,oi),hr=yt.max,Zr=yt.min,pF=Be.now,O0=ue.parseInt,C_=yt.random,mF=rr.reverse,F0=Rc(ue,"DataView"),ep=Rc(ue,"Map"),Qa=Rc(ue,"Promise"),Td=Rc(ue,"Set"),bi=Rc(ue,"WeakMap"),Id=Rc(oi,"create"),tp=bi&&new bi,Rd={},L0=kc(F0),N0=kc(ep),lA=kc(Qa),S_=kc(Td),cA=kc(bi),Qr=Ui?Ui.prototype:V,kd=Qr?Qr.valueOf:V,E_=Qr?Qr.toString:V;function I(u){if(Pi(u)&&!rn(u)&&!(u instanceof kn)){if(u instanceof Ei)return u;if(ii.call(u,"__wrapped__"))return ns(u)}return new Ei(u)}var Pd=function(){function u(){}return function(f){if(!wi(f))return{};if(Qf)return Qf(f);u.prototype=f;var _=new u;return u.prototype=V,_}}();function xc(){}function Ei(u,f){this.__wrapped__=u,this.__actions__=[],this.__chain__=!!f,this.__index__=0,this.__values__=V}function kn(u){this.__wrapped__=u,this.__actions__=[],this.__dir__=1,this.__filtered__=!1,this.__iteratees__=[],this.__takeCount__=ua,this.__views__=[]}function wc(u){var f=-1,_=null==u?0:u.length;for(this.clear();++f<_;){var w=u[f];this.set(w[0],w[1])}}function kt(u){var f=-1,_=null==u?0:u.length;for(this.clear();++f<_;){var w=u[f];this.set(w[0],w[1])}}function pa(u){var f=-1,_=null==u?0:u.length;for(this.clear();++f<_;){var w=u[f];this.set(w[0],w[1])}}function zt(u){var f=-1,_=null==u?0:u.length;for(this.__data__=new pa;++f<_;)this.add(u[f])}function Jr(u){var f=this.__data__=new kt(u);this.size=f.size}function I_(u,f){var _=rn(u),w=!_&&Fc(u),S=!_&&!w&&rl(u),P=!_&&!w&&!S&&$o(u),H=_||w||S||P,Y=H?qs(u.length,R0):[],Q=Y.length;for(var _e in u)(f||ii.call(u,_e))&&(!H||!("length"==_e||S&&("offset"==_e||"parent"==_e)||P&&("buffer"==_e||"byteLength"==_e||"byteOffset"==_e)||il(_e,Q)))&&Y.push(_e);return Y}function Vr(u){var f=u.length;return f?u[lh(0,f-1)]:V}function Ja(u,f){return Sp(Qs(u),Ll(f,0,u.length))}function H0(u){return Sp(Qs(u))}function Fl(u,f,_){(_!==V&&!Go(u[f],_)||_===V&&!(f in u))&&zo(u,f,_)}function Ks(u,f,_){var w=u[f];(!ii.call(u,f)||!Go(w,_)||_===V&&!(f in u))&&zo(u,f,_)}function ip(u,f){for(var _=u.length;_--;)if(Go(u[_][0],f))return _;return-1}function G0(u,f,_,w){return el(u,function(S,P,H){f(w,S,_(S),H)}),w}function $0(u,f){return u&&ci(f,fr(f),u)}function zo(u,f,_){"__proto__"==f&&Jf?Jf(u,f,{configurable:!0,enumerable:!0,value:_,writable:!0}):u[f]=_}function rh(u,f){for(var _=-1,w=f.length,S=oe(w),P=null==u;++_=f?u:f)),u}function Ms(u,f,_,w,S,P){var H,Y=f&Ci,Q=f&ms,_e=f&$s;if(_&&(H=S?_(u,w,S,P):_(u)),H!==V)return H;if(!wi(u))return u;var ye=rn(u);if(ye){if(H=function hx(u){var f=u.length,_=new u.constructor(f);return f&&"string"==typeof u[0]&&ii.call(u,"index")&&(_.index=u.index,_.input=u.input),_}(u),!Y)return Qs(u,H)}else{var be=zr(u),Xe=be==Of||be==d0;if(rl(u))return me(u,Y);if(be==ja||be==ti||Xe&&!S){if(H=Q||Xe?{}:PA(u),!Y)return Q?function hh(u,f){return ci(u,cx(u),f)}(u,function _A(u,f){return u&&ci(f,Ds(f),u)}(H,u)):function H_(u,f){return ci(u,Z_(u),f)}(u,$0(H,u))}else{if(!En[be])return S?u:{};H=function fx(u,f,_){var w=u.constructor;switch(f){case zu:return rx(u);case et:case mc:return new w(+u);case vd:return function xF(u,f){var _=f?rx(u.buffer):u.buffer;return new u.constructor(_,u.byteOffset,u.byteLength)}(u,_);case ha:case Lf:case Qg:case Nf:case Jg:case e_:case Hu:case t_:case n_:return AA(u,_);case Bo:return new w;case Vu:case gc:return new w(u);case gd:return function wF(u){var f=new u.constructor(u.source,x0.exec(u));return f.lastIndex=u.lastIndex,f}(u);case Uo:return new w;case Ff:return function MF(u){return kd?oi(kd.call(u)):{}}(u)}}(u,be,Y)}}P||(P=new Jr);var vt=P.get(u);if(vt)return vt;P.set(u,H),nw(u)?u.forEach(function(Vt){H.add(Ms(Vt,f,_,Vt,u,P))}):Tv(u)&&u.forEach(function(Vt,An){H.set(An,Ms(Vt,f,_,An,u,P))});var mn=ye?V:(_e?Q?q_:yp:Q?Ds:fr)(u);return Rn(mn||u,function(Vt,An){mn&&(Vt=u[An=Vt]),Ks(H,An,Ms(Vt,f,_,An,u,P))}),H}function R_(u,f,_){var w=_.length;if(null==u)return!w;for(u=oi(u);w--;){var S=_[w],H=u[S];if(H===V&&!(S in u)||!(0,f[S])(H))return!1}return!0}function rp(u,f,_){if("function"!=typeof u)throw new Sr(Un);return gh(function(){u.apply(V,_)},f)}function Fd(u,f,_,w){var S=-1,P=Rl,H=!0,Y=u.length,Q=[],_e=f.length;if(!Y)return Q;_&&(f=mi(f,Br(_))),w?(P=Ku,H=!1):f.length>=Kr&&(P=vc,H=!1,f=new zt(f));e:for(;++S-1},kt.prototype.set=function fA(u,f){var _=this.__data__,w=ip(_,u);return w<0?(++this.size,_.push([u,f])):_[w][1]=f,this},pa.prototype.clear=function pA(){this.size=0,this.__data__={hash:new wc,map:new(ep||kt),string:new wc}},pa.prototype.delete=function mA(u){var f=K_(this,u).delete(u);return this.size-=f?1:0,f},pa.prototype.get=function Se(u){return K_(this,u).get(u)},pa.prototype.has=function zn(u){return K_(this,u).has(u)},pa.prototype.set=function an(u,f){var _=K_(this,u),w=_.size;return _.set(u,f),this.size+=_.size==w?0:1,this},zt.prototype.add=zt.prototype.push=function Er(u){return this.__data__.set(u,Ha),this},zt.prototype.has=function z0(u){return this.__data__.has(u)},Jr.prototype.clear=function ma(){this.__data__=new kt,this.size=0},Jr.prototype.delete=function D_(u){var f=this.__data__,_=f.delete(u);return this.size=f.size,_},Jr.prototype.get=function T_(u){return this.__data__.get(u)},Jr.prototype.has=function gA(u){return this.__data__.has(u)},Jr.prototype.set=function _F(u,f){var _=this.__data__;if(_ instanceof kt){var w=_.__data__;if(!ep||w.length0&&_(Y)?f>1?Xn(Y,f-1,_,w,S):kl(S,Y):w||(S[S.length]=Y)}return S}var tl=G_(),Ai=G_(!0);function ki(u,f){return u&&tl(u,f,fr)}function P_(u,f){return u&&Ai(u,f,fr)}function ga(u,f){return _c(f,function(_){return zl(u[_])})}function Mc(u,f){for(var _=0,w=(f=ba(f,u)).length;null!=u&&_f}function sp(u,f){return null!=u&&ii.call(u,f)}function op(u,f){return null!=u&&f in oi(u)}function ap(u,f,_){for(var w=_?Ku:Rl,S=u[0].length,P=u.length,H=P,Y=oe(P),Q=1/0,_e=[];H--;){var ye=u[H];H&&f&&(ye=mi(ye,Br(f))),Q=Zr(ye.length,Q),Y[H]=!_&&(f||S>=120&&ye.length>=120)?new zt(H&&ye):V}ye=u[0];var be=-1,Xe=Y[0];e:for(;++be=Y?Q:Q*("desc"==_[w]?-1:1)}return u.index-f.index}(P,H,_)})}function Q0(u,f,_){for(var w=-1,S=f.length,P={};++w-1;)Y!==u&&bc.call(Y,Q,1),bc.call(u,Q,1);return u}function ah(u,f){for(var _=u?f.length:0,w=_-1;_--;){var S=f[_];if(_==w||S!==P){var P=S;il(S)?bc.call(u,S,1):dh(u,S)}}return u}function lh(u,f){return u+M_(C_()*(f-u+1))}function ch(u,f){var _="";if(!u||f<1||f>Wa)return _;do{f%2&&(_+=u),(f=M_(f/2))&&(u+=u)}while(f);return _}function pn(u,f){return Mp(J_(u,f,is),u+"")}function SA(u){return Vr(Bc(u))}function ex(u,f){var _=Bc(u);return Sp(_,Ll(f,0,_.length))}function Vd(u,f,_,w){if(!wi(u))return u;for(var S=-1,P=(f=ba(f,u)).length,H=P-1,Y=u;null!=Y&&++SS?0:S+f),(_=_>S?S:_)<0&&(_+=S),S=f>_?0:_-f>>>0,f>>>=0;for(var P=oe(S);++w>>1,H=u[P];null!==H&&!As(H)&&(_?H<=f:H=Kr){var _e=f?null:j_(u);if(_e)return Hn(_e);H=!1,S=vc,Q=new zt}else Q=f?[]:Y;e:for(;++w=w?u:ts(u,f,_)}var ix=oA||function(u){return Cr.clearTimeout(u)};function me(u,f){if(f)return u.slice();var _=u.length,w=bs?bs(_):new u.constructor(_);return u.copy(w),w}function rx(u){var f=new u.constructor(u.byteLength);return new x_(f).set(new x_(u)),f}function AA(u,f){var _=f?rx(u.buffer):u.buffer;return new u.constructor(_,u.byteOffset,u.length)}function DA(u,f){if(u!==f){var _=u!==V,w=null===u,S=u==u,P=As(u),H=f!==V,Y=null===f,Q=f==f,_e=As(f);if(!Y&&!_e&&!P&&u>f||P&&H&&Q&&!Y&&!_e||w&&H&&Q||!_&&Q||!S)return 1;if(!w&&!P&&!_e&&u1?_[S-1]:V,H=S>2?_[2]:V;for(P=u.length>3&&"function"==typeof P?(S--,P):V,H&&Dr(_[0],_[1],H)&&(P=S<3?V:P,S=1),f=oi(f);++w-1?S[P?f[H]:H]:V}}function Cs(u){return yo(function(f){var _=f.length,w=_,S=Ei.prototype.thru;for(u&&f.reverse();w--;){var P=f[w];if("function"!=typeof P)throw new Sr(Un);if(S&&!H&&"wrapper"==nl(P))var H=new Ei([],!0)}for(w=H?w:_;++w<_;){var Y=nl(P=f[w]),Q="wrapper"==Y?X_(P):V;H=Q&&mh(Q[0])&&Q[1]==(Ga|la|ca|da)&&!Q[4].length&&1==Q[9]?H[nl(Q[0])].apply(H,Q[3]):1==P.length&&mh(P)?H[Y]():H.thru(P)}return function(){var _e=arguments,ye=_e[0];if(H&&1==_e.length&&rn(ye))return H.plant(ye).value();for(var be=0,Xe=_?f[be].apply(this,_e):ye;++be<_;)Xe=f[be].call(this,Xe);return Xe}})}function Wd(u,f,_,w,S,P,H,Y,Q,_e){var ye=f&Ga,be=f&On,Xe=f&dr,vt=f&(la|Dl),Ut=f&pd,mn=Xe?V:mp(u);return function Vt(){for(var An=arguments.length,Ln=oe(An),rs=An;rs--;)Ln[rs]=arguments[rs];if(vt)var ss=wa(Vt),io=function eh(X,ue){for(var oe=X.length,Be=0;oe--;)X[oe]===ue&&++Be;return Be}(Ln,ss);if(w&&(Ln=Hd(Ln,w,S,vt)),P&&(Ln=TA(Ln,P,H,vt)),An-=io,vt&&An<_e){var Di=Gi(Ln,ss);return ox(u,f,Wd,Vt.placeholder,_,Ln,Di,Y,Q,_e-An)}var Ts=be?_:this,wo=Xe?Ts[u]:u;return An=Ln.length,Y?Ln=function Es(u,f){for(var _=u.length,w=Zr(f.length,_),S=Qs(u);w--;){var P=f[w];u[w]=il(P,_)?S[P]:V}return u}(Ln,Y):Ut&&An>1&&Ln.reverse(),ye&&QY))return!1;var _e=P.get(u),ye=P.get(f);if(_e&&ye)return _e==f&&ye==u;var be=-1,Xe=!0,vt=_&No?new zt:V;for(P.set(u,f),P.set(f,u);++be-1&&u%1==0&&u1?"& ":"")+f[w],f=f.join(_>2?", ":" "),u.replace(y0,"{\n/* [wrapped with "+f+"] */\n")}(w,function BA(u,f){return Rn(c0,function(_){var w="_."+_[0];f&_[1]&&!Rl(u,w)&&u.push(w)}),u.sort()}(function dx(u){var f=u.match(wr);return f?f[1].split(LE):[]}(w),_)))}function vx(u){var f=0,_=0;return function(){var w=pF(),S=Kg-(w-_);if(_=w,S>0){if(++f>=ME)return arguments[0]}else f=0;return u.apply(V,arguments)}}function Sp(u,f){var _=-1,w=u.length,S=w-1;for(f=f===V?w:f;++_1?u[f-1]:V;return _="function"==typeof _?(u.pop(),_):V,yh(u,_)});function zx(u){var f=I(u);return f.__chain__=!0,f}function Ip(u,f){return f(u)}var Hx=yo(function(u){var f=u.length,_=f?u[0]:0,w=this.__wrapped__,S=function(P){return rh(P,u)};return!(f>1||this.__actions__.length)&&w instanceof kn&&il(_)?((w=w.slice(_,+_+(f?1:0))).__actions__.push({func:Ip,args:[S],thisArg:V}),new Ei(w,this.__chain__).thru(function(P){return f&&!P.length&&P.push(V),P})):this.thru(S)}),rD=fp(function(u,f,_){ii.call(u,_)?++u[_]:zo(u,_,1)}),$x=RA(Sx),kp=RA(rv);function bv(u,f){return(rn(u)?Rn:el)(u,Lt(f,3))}function Vl(u,f){return(rn(u)?lF:k_)(u,Lt(f,3))}var oD=fp(function(u,f,_){ii.call(u,_)?u[_].push(f):zo(u,_,[f])}),lD=pn(function(u,f,_){var w=-1,S="function"==typeof f,P=eo(u)?oe(u.length):[];return el(u,function(H){P[++w]=S?_s(f,H,_):_a(H,f,_)}),P}),cD=fp(function(u,f,_){zo(u,_,f)});function Pp(u,f){return(rn(u)?mi:sh)(u,Lt(f,3))}var Ma=fp(function(u,f,_){u[_?0:1].push(f)},function(){return[[],[]]}),_D=pn(function(u,f){if(null==u)return[];var _=f.length;return _>1&&Dr(u,f[0],f[1])?f=[]:_>2&&Dr(f[0],f[1],f[2])&&(f=[f[0]]),B_(u,Xn(f,1),[])}),Op=cF||function(){return Cr.Date.now()};function xh(u,f,_){return f=_?V:f,vo(u,Ga,V,V,V,V,f=u&&null==f?u.length:f)}function Ca(u,f){var _;if("function"!=typeof f)throw new Sr(Un);return u=dn(u),function(){return--u>0&&(_=f.apply(this,arguments)),u<=1&&(f=V),_}}var Oc=pn(function(u,f,_){var w=On;if(_.length){var S=Gi(_,wa(Oc));w|=ca}return vo(u,w,f,_,S)}),xv=pn(function(u,f,_){var w=On|dr;if(_.length){var S=Gi(_,wa(xv));w|=ca}return vo(f,w,u,_,S)});function yD(u,f,_){var w,S,P,H,Y,Q,_e=0,ye=!1,be=!1,Xe=!0;if("function"!=typeof u)throw new Sr(Un);function vt(Di){var Ts=w,wo=S;return w=S=V,_e=Di,H=u.apply(wo,Ts)}function Vt(Di){var Ts=Di-Q;return Q===V||Ts>=f||Ts<0||be&&Di-_e>=P}function An(){var Di=Op();if(Vt(Di))return Ln(Di);Y=gh(An,function mn(Di){var I1=f-(Di-Q);return be?Zr(I1,P-(Di-_e)):I1}(Di))}function Ln(Di){return Y=V,Xe&&w?vt(Di):(w=S=V,H)}function io(){var Di=Op(),Ts=Vt(Di);if(w=arguments,S=this,Q=Di,Ts){if(Y===V)return function Ut(Di){return _e=Di,Y=gh(An,f),ye?vt(Di):H}(Q);if(be)return ix(Y),Y=gh(An,f),vt(Q)}return Y===V&&(Y=gh(An,f)),H}return f=bo(f)||0,wi(_)&&(ye=!!_.leading,P=(be="maxWait"in _)?hr(bo(_.maxWait)||0,f):P,Xe="trailing"in _?!!_.trailing:Xe),io.cancel=function rs(){Y!==V&&ix(Y),_e=0,w=Q=S=Y=V},io.flush=function ss(){return Y===V?H:Ln(Op())},io}var kF=pn(function(u,f){return rp(u,1,f)}),PF=pn(function(u,f,_){return rp(u,bo(f)||0,_)});function Yd(u,f){if("function"!=typeof u||null!=f&&"function"!=typeof f)throw new Sr(Un);var _=function(){var w=arguments,S=f?f.apply(this,w):w[0],P=_.cache;if(P.has(S))return P.get(S);var H=u.apply(this,w);return _.cache=P.set(S,H)||P,H};return _.cache=new(Yd.Cache||pa),_}function Sv(u){if("function"!=typeof u)throw new Sr(Un);return function(){var f=arguments;switch(f.length){case 0:return!u.call(this);case 1:return!u.call(this,f[0]);case 2:return!u.call(this,f[0],f[1]);case 3:return!u.call(this,f[0],f[1],f[2])}return!u.apply(this,f)}}Yd.Cache=pa;var qx=zd(function(u,f){var _=(f=1==f.length&&rn(f[0])?mi(f[0],Br(Lt())):mi(Xn(f,1),Br(Lt()))).length;return pn(function(w){for(var S=-1,P=Zr(w.length,_);++S=f}),Fc=Bd(function(){return arguments}())?Bd:function(u){return Pi(u)&&ii.call(u,"callee")&&!Ad.call(u,"callee")},rn=oe.isArray,FF=m_?Br(m_):function xA(u){return Pi(u)&&es(u)==zu};function eo(u){return null!=u&&Vp(u.length)&&!zl(u)}function xi(u){return Pi(u)&&eo(u)}var rl=uF||Qd,Jx=D0?Br(D0):function vF(u){return Pi(u)&&es(u)==mc};function Bp(u){if(!Pi(u))return!1;var f=es(u);return f==md||f==AE||"string"==typeof u.message&&"string"==typeof u.name&&!to(u)}function zl(u){if(!wi(u))return!1;var f=es(u);return f==Of||f==d0||f==EE||f==TE}function Up(u){return"number"==typeof u&&u==dn(u)}function Vp(u){return"number"==typeof u&&u>-1&&u%1==0&&u<=Wa}function wi(u){var f=typeof u;return null!=u&&("object"==f||"function"==f)}function Pi(u){return null!=u&&"object"==typeof u}var Tv=Ot?Br(Ot):function wA(u){return Pi(u)&&zr(u)==Bo};function wh(u){return"number"==typeof u||Pi(u)&&es(u)==Vu}function to(u){if(!Pi(u)||es(u)!=ja)return!1;var f=xs(u);if(null===f)return!0;var _=ii.call(f,"constructor")&&f.constructor;return"function"==typeof _&&_ instanceof _&&Pl.call(_)==k0}var Hp=$f?Br($f):function bF(u){return Pi(u)&&es(u)==gd},nw=T0?Br(T0):function L_(u){return Pi(u)&&zr(u)==Uo};function Gp(u){return"string"==typeof u||!rn(u)&&Pi(u)&&es(u)==gc}function As(u){return"symbol"==typeof u||Pi(u)&&es(u)==Ff}var $o=Ys?Br(Ys):function q0(u){return Pi(u)&&Vp(u.length)&&!!Si[es(u)]},Pv=vp(lp),PD=vp(function(u,f){return u<=f});function Ov(u){if(!u)return[];if(eo(u))return Gp(u)?go(u):Qs(u);if(ih&&u[ih])return function rA(X){for(var ue,oe=[];!(ue=X.next()).done;)oe.push(ue.value);return oe}(u[ih]());var f=zr(u);return(f==Bo?qf:f==Uo?Hn:Bc)(u)}function sl(u){return u?(u=bo(u))===In||u===-In?(u<0?-1:1)*SE:u==u?u:0:0===u?u:0}function dn(u){var f=sl(u),_=f%1;return f==f?_?f-_:f:0}function OD(u){return u?Ll(dn(u),0,ua):0}function bo(u){if("number"==typeof u)return u;if(As(u))return Pf;if(wi(u)){var f="function"==typeof u.valueOf?u.valueOf():u;u=wi(f)?f+"":f}if("string"!=typeof u)return 0===u?u:+u;u=$n(u);var _=Ya.test(u);return _||ir.test(u)?oF(u.slice(2),_?2:8):VE.test(u)?Pf:+u}function Hl(u){return ci(u,Ds(u))}function Fn(u){return null==u?"":Zs(u)}var mt=Ar(function(u,f){if(wp(f)||eo(f))ci(f,fr(f),u);else for(var _ in f)ii.call(f,_)&&Ks(u,_,f[_])}),iw=Ar(function(u,f){ci(f,Ds(f),u)}),Gl=Ar(function(u,f,_,w){ci(f,Ds(f),u,w)}),ol=Ar(function(u,f,_,w){ci(f,fr(f),u,w)}),LD=yo(rh),Nc=pn(function(u,f){u=oi(u);var _=-1,w=f.length,S=w>2?f[2]:V;for(S&&Dr(f[0],f[1],S)&&(w=1);++_1),P}),ci(u,q_(u),_),w&&(_=Ms(_,Ci|ms|$s,xa));for(var S=f.length;S--;)dh(_,f[S]);return _}),jD=yo(function(u,f){return null==u?{}:function Z0(u,f){return Q0(u,f,function(_,w){return Uv(u,w)})}(u,f)});function Vv(u,f){if(null==u)return{};var _=mi(q_(u),function(w){return[w]});return f=Lt(f),Q0(u,_,function(w,S){return f(w,S[0])})}var aw=fh(fr),zv=fh(Ds);function Bc(u){return null==u?[]:Ju(u,fr(u))}var G=$d(function(u,f,_){return f=f.toLowerCase(),u+(_?Hv(f):f)});function Hv(u){return Kd(Fn(u).toLowerCase())}function Gv(u){return(u=Fn(u))&&u.replace(po,nA).replace(JO,"")}var s1=$d(function(u,f,_){return u+(_?"-":"")+f.toLowerCase()}),cw=$d(function(u,f,_){return u+(_?" ":"")+f.toLowerCase()}),o1=Gd("toLowerCase"),$v=$d(function(u,f,_){return u+(_?"_":"")+f.toLowerCase()}),c1=$d(function(u,f,_){return u+(_?" ":"")+Kd(f)}),fw=$d(function(u,f,_){return u+(_?" ":"")+f.toUpperCase()}),Kd=Gd("toUpperCase");function pw(u,f,_){return u=Fn(u),(f=_?V:f)===V?function nn(X){return ZE.test(X)}(u)?function fn(X){return X.match(eF)||[]}(u):function tA(X){return X.match(NE)||[]}(u):u.match(f)||[]}var jv=pn(function(u,f){try{return _s(u,V,f)}catch(_){return Bp(_)?_:new $t(_)}}),f1=yo(function(u,f){return Rn(f,function(_){_=Ho(_),zo(u,_,Oc(u[_],u))}),u});function Yv(u){return function(){return u}}var mw=Cs(),_1=Cs(!0);function is(u){return u}function $p(u){return N_("function"==typeof u?u:Ms(u,Ci))}var Xv=pn(function(u,f){return function(_){return _a(_,u,f)}}),v1=pn(function(u,f){return function(_){return _a(u,_,f)}});function gw(u,f,_){var w=fr(f),S=ga(f,w);null==_&&(!wi(f)||!S.length&&w.length)&&(_=f,f=u,u=this,S=ga(f,fr(f)));var P=!(wi(_)&&"chain"in _&&!_.chain),H=zl(u);return Rn(S,function(Y){var Q=f[Y];u[Y]=Q,H&&(u.prototype[Y]=function(){var _e=this.__chain__;if(P||_e){var ye=u(this.__wrapped__);return(ye.__actions__=Qs(this.__actions__)).push({func:Q,args:arguments,thisArg:u}),ye.__chain__=_e,ye}return Q.apply(u,kl([this.value()],arguments))})}),u}function xo(){}var _w=gp(mi),b1=gp(JE),x1=gp(Wf);function Mh(u){return px(u)?__(Ho(u)):function va(u){return function(f){return Mc(f,u)}}(u)}var Kv=sx(),Ch=sx(!0);function Sh(){return[]}function Qd(){return!1}var w1=$_(function(u,f){return u+f},0),M1=W_("ceil"),bw=$_(function(u,f){return u/f},1),C1=W_("floor"),D1=$_(function(u,f){return u*f},1),WF=W_("round"),ty=$_(function(u,f){return u-f},0);return I.after=function vD(u,f){if("function"!=typeof f)throw new Sr(Un);return u=dn(u),function(){if(--u<1)return f.apply(this,arguments)}},I.ary=xh,I.assign=mt,I.assignIn=iw,I.assignInWith=Gl,I.assignWith=ol,I.at=LD,I.before=Ca,I.bind=Oc,I.bindAll=f1,I.bindKey=xv,I.castArray=function wD(){if(!arguments.length)return[];var u=arguments[0];return rn(u)?u:[u]},I.chain=zx,I.chunk=function nv(u,f,_){f=(_?Dr(u,f,_):f===V)?1:hr(dn(f),0);var w=null==u?0:u.length;if(!w||f<1)return[];for(var S=0,P=0,H=oe(w_(w/f));SS?0:S+_),(w=w===V||w>S?S:dn(w))<0&&(w+=S),w=_>w?0:OD(w);_>>0)?(u=Fn(u))&&("string"==typeof f||null!=f&&!Hp(f))&&!(f=Zs(f))&&Cd(u)?Tc(go(u),0,_):u.split(f,_):[]},I.spread=function Kx(u,f){if("function"!=typeof u)throw new Sr(Un);return f=null==f?0:hr(dn(f),0),pn(function(_){var w=_[f],S=Tc(_,0,f);return w&&kl(S,w),_s(u,this,S)})},I.tail=function Pc(u){var f=null==u?0:u.length;return f?ts(u,1,f):[]},I.take=function Ox(u,f,_){return u&&u.length?ts(u,0,(f=_||f===V?1:dn(f))<0?0:f):[]},I.takeRight=function Fx(u,f,_){var w=null==u?0:u.length;return w?ts(u,(f=w-(f=_||f===V?1:dn(f)))<0?0:f,w):[]},I.takeRightWhile=function QA(u,f){return u&&u.length?uh(u,Lt(f,3),!1,!0):[]},I.takeWhile=function IF(u,f){return u&&u.length?uh(u,Lt(f,3)):[]},I.tap=function tD(u,f){return f(u),u},I.throttle=function Fp(u,f,_){var w=!0,S=!0;if("function"!=typeof u)throw new Sr(Un);return wi(_)&&(w="leading"in _?!!_.leading:w,S="trailing"in _?!!_.trailing:S),yD(u,f,{leading:w,maxWait:f,trailing:S})},I.thru=Ip,I.toArray=Ov,I.toPairs=aw,I.toPairsIn=zv,I.toPath=function yw(u){return rn(u)?mi(u,Ho):As(u)?[u]:Qs(yx(Fn(u)))},I.toPlainObject=Hl,I.transform=function XD(u,f,_){var w=rn(u),S=w||rl(u)||$o(u);if(f=Lt(f,4),null==_){var P=u&&u.constructor;_=S?w?new P:[]:wi(u)&&zl(P)?Pd(xs(u)):{}}return(S?Rn:ki)(u,function(H,Y,Q){return f(_,H,Y,Q)}),_},I.unary=function Zx(u){return xh(u,1)},I.union=Ap,I.unionBy=JA,I.unionWith=Lx,I.uniq=function Nx(u){return u&&u.length?ri(u):[]},I.uniqBy=function Bx(u,f){return u&&u.length?ri(u,Lt(f,2)):[]},I.uniqWith=function fv(u,f){return f="function"==typeof f?f:V,u&&u.length?ri(u,V,f):[]},I.unset=function KD(u,f){return null==u||dh(u,f)},I.unzip=Dp,I.unzipWith=yh,I.update=function ZD(u,f,_){return null==u?u:nx(u,f,hp(_))},I.updateWith=function QD(u,f,_,w){return w="function"==typeof w?w:V,null==u?u:nx(u,f,hp(_),w)},I.values=Bc,I.valuesIn=function JD(u){return null==u?[]:Ju(u,Ds(u))},I.without=Tp,I.words=pw,I.wrap=function Av(u,f){return Ev(hp(f),u)},I.xor=Ux,I.xorBy=pv,I.xorWith=mv,I.zip=gv,I.zipObject=function bh(u,f){return Dc(u||[],f||[],Ks)},I.zipObjectDeep=function eD(u,f){return Dc(u||[],f||[],Vd)},I.zipWith=Vx,I.entries=aw,I.entriesIn=zv,I.extend=iw,I.extendWith=Gl,gw(I,I),I.add=w1,I.attempt=jv,I.camelCase=G,I.capitalize=Hv,I.ceil=M1,I.clamp=function e1(u,f,_){return _===V&&(_=f,f=V),_!==V&&(_=(_=bo(_))==_?_:0),f!==V&&(f=(f=bo(f))==f?f:0),Ll(bo(u),f,_)},I.clone=function Kn(u){return Ms(u,$s)},I.cloneDeep=function CD(u){return Ms(u,Ci|$s)},I.cloneDeepWith=function Lp(u,f){return Ms(u,Ci|$s,f="function"==typeof f?f:V)},I.cloneWith=function MD(u,f){return Ms(u,$s,f="function"==typeof f?f:V)},I.conformsTo=function Qx(u,f){return null==f||R_(u,f,fr(f))},I.deburr=Gv,I.defaultTo=function g1(u,f){return null==u||u!=u?f:u},I.divide=bw,I.endsWith=function n1(u,f,_){u=Fn(u),f=Zs(f);var w=u.length,S=_=_===V?w:Ll(dn(_),0,w);return(_-=f.length)>=0&&u.slice(_,S)==f},I.eq=Go,I.escape=function r1(u){return(u=Fn(u))&&FE.test(u)?u.replace(f0,ot):u},I.escapeRegExp=function lw(u){return(u=Fn(u))&&_0.test(u)?u.replace(s_,"\\$&"):u},I.every=function vv(u,f,_){var w=rn(u)?JE:W0;return _&&Dr(u,f,_)&&(f=V),w(u,Lt(f,3))},I.find=$x,I.findIndex=Sx,I.findKey=function Fv(u,f){return ee(u,Lt(f,3),ki)},I.findLast=kp,I.findLastIndex=rv,I.findLastKey=function Lv(u,f){return ee(u,Lt(f,3),P_)},I.floor=C1,I.forEach=bv,I.forEachRight=Vl,I.forIn=function UD(u,f){return null==u?u:tl(u,Lt(f,3),Ds)},I.forInRight=function Nv(u,f){return null==u?u:Ai(u,Lt(f,3),Ds)},I.forOwn=function al(u,f){return u&&ki(u,Lt(f,3))},I.forOwnRight=function VD(u,f){return u&&P_(u,Lt(f,3))},I.get=Bv,I.gt=SD,I.gte=ED,I.has=function GD(u,f){return null!=u&&ux(u,f,sp)},I.hasIn=Uv,I.head=Ax,I.identity=is,I.includes=function aD(u,f,_,w){u=eo(u)?u:Bc(u),_=_&&!w?dn(_):0;var S=u.length;return _<0&&(_=hr(S+_,0)),Gp(u)?_<=S&&u.indexOf(f,_)>-1:!!S&&Ft(u,f,_)>-1},I.indexOf=function vh(u,f,_){var w=null==u?0:u.length;if(!w)return-1;var S=null==_?0:dn(_);return S<0&&(S=hr(w+S,0)),Ft(u,f,S)},I.inRange=function t1(u,f,_){return f=sl(f),_===V?(_=f,f=0):_=sl(_),function O_(u,f,_){return u>=Zr(f,_)&&u=-Wa&&u<=Wa},I.isSet=nw,I.isString=Gp,I.isSymbol=As,I.isTypedArray=$o,I.isUndefined=function ID(u){return u===V},I.isWeakMap=function RD(u){return Pi(u)&&zr(u)==_d},I.isWeakSet=function kD(u){return Pi(u)&&"[object WeakSet]"==es(u)},I.join=function Dx(u,f){return null==u?"":hF.call(u,f)},I.kebabCase=s1,I.last=Tr,I.lastIndexOf=function cv(u,f,_){var w=null==u?0:u.length;if(!w)return-1;var S=w;return _!==V&&(S=(S=dn(_))<0?hr(w+S,0):Zr(S,w-1)),f==f?function Sd(X,ue,oe){for(var Be=oe+1;Be--;)if(X[Be]===ue)return Be;return Be}(u,f,S):Qu(u,Yf,S,!0)},I.lowerCase=cw,I.lowerFirst=o1,I.lt=Pv,I.lte=PD,I.max=function xw(u){return u&&u.length?Ld(u,is,Nd):V},I.maxBy=function ww(u,f){return u&&u.length?Ld(u,Lt(f,2),Nd):V},I.mean=function S1(u){return Md(u,is)},I.meanBy=function E1(u,f){return Md(u,Lt(f,2))},I.min=function no(u){return u&&u.length?Ld(u,is,lp):V},I.minBy=function A1(u,f){return u&&u.length?Ld(u,Lt(f,2),lp):V},I.stubArray=Sh,I.stubFalse=Qd,I.stubObject=function vw(){return{}},I.stubString=function Zv(){return""},I.stubTrue=function Qv(){return!0},I.multiply=D1,I.nth=function Tx(u,f){return u&&u.length?CA(u,dn(f)):V},I.noConflict=function E(){return Cr._===this&&(Cr._=Kf),this},I.noop=xo,I.now=Op,I.pad=function a1(u,f,_){u=Fn(u);var w=(f=dn(f))?ur(u):0;if(!f||w>=f)return u;var S=(f-w)/2;return _p(M_(S),_)+u+_p(w_(S),_)},I.padEnd=function UF(u,f,_){u=Fn(u);var w=(f=dn(f))?ur(u):0;return f&&wf){var w=u;u=f,f=w}if(_||u%1||f%1){var S=C_();return Zr(u+S*(f-u+ke("1e-"+((S+"").length-1))),f)}return lh(u,f)},I.reduce=function dD(u,f,_){var w=rn(u)?g_:I0,S=arguments.length<3;return w(u,Lt(f,4),_,S,el)},I.reduceRight=function uD(u,f,_){var w=rn(u)?eA:I0,S=arguments.length<3;return w(u,Lt(f,4),_,S,k_)},I.repeat=function $i(u,f,_){return f=(_?Dr(u,f,_):f===V)?1:dn(f),ch(Fn(u),f)},I.replace=function l1(){var u=arguments,f=Fn(u[0]);return u.length<3?f:f.replace(u[1],u[2])},I.result=function YD(u,f,_){var w=-1,S=(f=ba(f,u)).length;for(S||(S=1,u=V);++wWa)return[];var _=ua,w=Zr(u,ua);f=Lt(f),u-=ua;for(var S=qs(w,f);++_=P)return u;var Y=_-ur(w);if(Y<1)return w;var Q=H?Tc(H,0,Y).join(""):u.slice(0,Y);if(S===V)return Q+w;if(H&&(Y+=Q.length-Y),Hp(S)){if(u.slice(Y).search(S)){var _e,ye=Q;for(S.global||(S=yc(S.source,Fn(x0.exec(S))+"g")),S.lastIndex=0;_e=S.exec(ye);)var be=_e.index;Q=Q.slice(0,be===V?Y:be)}}else if(u.indexOf(Zs(S),Y)!=Y){var Xe=Q.lastIndexOf(S);Xe>-1&&(Q=Q.slice(0,Xe))}return Q+w},I.unescape=function h1(u){return(u=Fn(u))&&OE.test(u)?u.replace(h0,Xf):u},I.uniqueId=function ey(u){var f=++yi;return Fn(u)+f},I.upperCase=fw,I.upperFirst=Kd,I.each=bv,I.eachRight=Vl,I.first=Ax,gw(I,function(){var u={};return ki(I,function(f,_){ii.call(I.prototype,_)||(u[_]=f)}),u}(),{chain:!1}),I.VERSION="4.17.21",Rn(["bind","bindKey","curry","curryRight","partial","partialRight"],function(u){I[u].placeholder=I}),Rn(["drop","take"],function(u,f){kn.prototype[u]=function(_){_=_===V?1:hr(dn(_),0);var w=this.__filtered__&&!f?new kn(this):this.clone();return w.__filtered__?w.__takeCount__=Zr(_,w.__takeCount__):w.__views__.push({size:Zr(_,ua),type:u+(w.__dir__<0?"Right":"")}),w},kn.prototype[u+"Right"]=function(_){return this.reverse()[u](_).reverse()}}),Rn(["filter","map","takeWhile"],function(u,f){var _=f+1,w=1==_||3==_;kn.prototype[u]=function(S){var P=this.clone();return P.__iteratees__.push({iteratee:Lt(S,3),type:_}),P.__filtered__=P.__filtered__||w,P}}),Rn(["head","last"],function(u,f){var _="take"+(f?"Right":"");kn.prototype[u]=function(){return this[_](1).value()[0]}}),Rn(["initial","tail"],function(u,f){var _="drop"+(f?"":"Right");kn.prototype[u]=function(){return this.__filtered__?new kn(this):this[_](1)}}),kn.prototype.compact=function(){return this.filter(is)},kn.prototype.find=function(u){return this.filter(u).head()},kn.prototype.findLast=function(u){return this.reverse().find(u)},kn.prototype.invokeMap=pn(function(u,f){return"function"==typeof u?new kn(this):this.map(function(_){return _a(_,u,f)})}),kn.prototype.reject=function(u){return this.filter(Sv(Lt(u)))},kn.prototype.slice=function(u,f){u=dn(u);var _=this;return _.__filtered__&&(u>0||f<0)?new kn(_):(u<0?_=_.takeRight(-u):u&&(_=_.drop(u)),f!==V&&(_=(f=dn(f))<0?_.dropRight(-f):_.take(f-u)),_)},kn.prototype.takeRightWhile=function(u){return this.reverse().takeWhile(u).reverse()},kn.prototype.toArray=function(){return this.take(ua)},ki(kn.prototype,function(u,f){var _=/^(?:filter|find|map|reject)|While$/.test(f),w=/^(?:head|last)$/.test(f),S=I[w?"take"+("last"==f?"Right":""):f],P=w||/^find/.test(f);S&&(I.prototype[f]=function(){var H=this.__wrapped__,Y=w?[1]:arguments,Q=H instanceof kn,_e=Y[0],ye=Q||rn(H),be=function(An){var Ln=S.apply(I,kl([An],Y));return w&&Xe?Ln[0]:Ln};ye&&_&&"function"==typeof _e&&1!=_e.length&&(Q=ye=!1);var Xe=this.__chain__,Ut=P&&!Xe,mn=Q&&!this.__actions__.length;if(!P&&ye){H=mn?H:new kn(this);var Vt=u.apply(H,Y);return Vt.__actions__.push({func:Ip,args:[be],thisArg:V}),new Ei(Vt,Xe)}return Ut&&mn?u.apply(this,Y):(Vt=this.thru(be),Ut?w?Vt.value()[0]:Vt.value():Vt)})}),Rn(["pop","push","shift","sort","splice","unshift"],function(u){var f=rr[u],_=/^(?:push|sort|unshift)$/.test(u)?"tap":"thru",w=/^(?:pop|shift)$/.test(u);I.prototype[u]=function(){var S=arguments;if(w&&!this.__chain__){var P=this.value();return f.apply(rn(P)?P:[],S)}return this[_](function(H){return f.apply(rn(H)?H:[],S)})}}),ki(kn.prototype,function(u,f){var _=I[f];if(_){var w=_.name+"";ii.call(Rd,w)||(Rd[w]=[]),Rd[w].push({name:f,func:_})}}),Rd[Wd(V,dr).name]=[{name:"wrapper",func:V}],kn.prototype.clone=function B0(){var u=new kn(this.__wrapped__);return u.__actions__=Qs(this.__actions__),u.__dir__=this.__dir__,u.__filtered__=this.__filtered__,u.__iteratees__=Qs(this.__iteratees__),u.__takeCount__=this.__takeCount__,u.__views__=Qs(this.__views__),u},kn.prototype.reverse=function Od(){if(this.__filtered__){var u=new kn(this);u.__dir__=-1,u.__filtered__=!0}else(u=this.clone()).__dir__*=-1;return u},kn.prototype.value=function ws(){var u=this.__wrapped__.value(),f=this.__dir__,_=rn(u),w=f<0,S=_?u.length:0,P=function xp(u,f,_){for(var w=-1,S=_.length;++w=this.__values__.length;return{done:u,value:u?V:this.__values__[this.__index__++]}},I.prototype.plant=function nD(u){for(var f,_=this;_ instanceof xc;){var w=ns(_);w.__index__=0,w.__values__=V,f?S.__wrapped__=w:f=w;var S=w;_=_.__wrapped__}return S.__wrapped__=u,f},I.prototype.reverse=function iD(){var u=this.__wrapped__;if(u instanceof kn){var f=u;return this.__actions__.length&&(f=new kn(this)),(f=f.reverse()).__actions__.push({func:Ip,args:[dv],thisArg:V}),new Ei(f,this.__chain__)}return this.thru(dv)},I.prototype.toJSON=I.prototype.valueOf=I.prototype.value=function RF(){return ya(this.__wrapped__,this.__actions__)},I.prototype.first=I.prototype.head,ih&&(I.prototype[ih]=function jd(){return this}),I}();Cr._=ys,(cn=function(){return ys}.call(Hs,ps,Hs,Lo))!==V&&(Lo.exports=cn)}.call(this)},738:function(Lo){var Hs;Lo.exports=((Hs=function(){function ps(Mi){return Nr.appendChild(Mi.dom),Mi}function cn(Mi){for(var Ci=0;CiZt+1e3&&(Al.update(1e3*Un/(Mi-Zt),100),Zt=Mi,Un=0,Gs)){var Ci=performance.memory;Gs.update(Ci.usedJSHeapSize/1048576,Ci.jsHeapSizeLimit/1048576)}return Mi},update:function(){Kr=this.end()},domElement:Nr,setMode:cn}}).Panel=function(ps,cn,V){var Nr=1/0,Kr=0,Zt=Math.round,Un=Zt(window.devicePixelRatio||1),Al=80*Un,Ha=48*Un,Gs=3*Un,Mi=2*Un,Ci=3*Un,ms=15*Un,$s=74*Un,Ws=30*Un,No=document.createElement("canvas");No.width=Al,No.height=Ha,No.style.cssText="width:80px;height:48px";var On=No.getContext("2d");return On.font="bold "+9*Un+"px Helvetica,Arial,sans-serif",On.textBaseline="top",On.fillStyle=V,On.fillRect(0,0,Al,Ha),On.fillStyle=cn,On.fillText(ps,Gs,Mi),On.fillRect(Ci,ms,$s,Ws),On.fillStyle=V,On.globalAlpha=.9,On.fillRect(Ci,ms,$s,Ws),{dom:No,update:function(dr,pc){Nr=Math.min(Nr,dr),Kr=Math.max(Kr,dr),On.fillStyle=V,On.globalAlpha=1,On.fillRect(0,0,Al,ms),On.fillStyle=cn,On.fillText(Zt(dr)+" "+ps+" ("+Zt(Nr)+"-"+Zt(Kr)+")",Gs,Mi),On.drawImage(No,Ci+Un,ms,$s-Un,Ws,Ci,ms,$s-Un,Ws),On.fillRect(Ci+$s-Un,ms,Un,Ws),On.fillStyle=V,On.globalAlpha=.9,On.fillRect(Ci+$s-Un,ms,Un,Zt((1-dr/pc)*Ws))}}},Hs)}},Lo=>{Lo(Lo.s=855)}]); \ No newline at end of file diff --git a/frontend/src/app/components/editor/common/minimap/minimap.component.ts b/frontend/src/app/components/editor/common/minimap/minimap.component.ts index 0263b8f..13565e1 100644 --- a/frontend/src/app/components/editor/common/minimap/minimap.component.ts +++ b/frontend/src/app/components/editor/common/minimap/minimap.component.ts @@ -35,7 +35,7 @@ export class MinimapComponent implements AfterViewInit, OnDestroy { get trackLength$(): Observable { return this._roadSpline$.pipe( - map((s) => { + map(s => { let ret = 0; for (let i = 1; i < s.length; i++) { ret += Pnt3.dist(s[i], s[i - 1]); @@ -47,8 +47,7 @@ export class MinimapComponent implements AfterViewInit, OnDestroy { private readonly destroyed$: Subject = new Subject(); - constructor(private readonly ref: ElementRef) { - } + constructor(private readonly ref: ElementRef) {} ngAfterViewInit() { this._roadSpline$ diff --git a/frontend/src/app/components/editor/eac/trk-map.block-ui/trk-map.block-ui.component.html b/frontend/src/app/components/editor/eac/trk-map.block-ui/trk-map.block-ui.component.html index fb95087..520a707 100644 --- a/frontend/src/app/components/editor/eac/trk-map.block-ui/trk-map.block-ui.component.html +++ b/frontend/src/app/components/editor/eac/trk-map.block-ui/trk-map.block-ui.component.html @@ -1,19 +1,28 @@ -
-
- - -
-
- - Spline item - - - -
+
+

Preview QFS file

+ + Custom QFS path + + + +
- +
+
+ + +
+
+ + Spline item + + + +
+
+ diff --git a/frontend/src/app/components/editor/eac/trk-map.block-ui/trk-map.block-ui.component.scss b/frontend/src/app/components/editor/eac/trk-map.block-ui/trk-map.block-ui.component.scss index 5fae5c6..a0a3863 100644 --- a/frontend/src/app/components/editor/eac/trk-map.block-ui/trk-map.block-ui.component.scss +++ b/frontend/src/app/components/editor/eac/trk-map.block-ui/trk-map.block-ui.component.scss @@ -32,7 +32,7 @@ } -.famSelector { +.qfsSelector { display: flex; align-items: center; width: 100%; diff --git a/frontend/src/app/components/editor/eac/trk-map.block-ui/trk-map.block-ui.component.ts b/frontend/src/app/components/editor/eac/trk-map.block-ui/trk-map.block-ui.component.ts index e698cf2..bca1447 100644 --- a/frontend/src/app/components/editor/eac/trk-map.block-ui/trk-map.block-ui.component.ts +++ b/frontend/src/app/components/editor/eac/trk-map.block-ui/trk-map.block-ui.component.ts @@ -31,6 +31,7 @@ import { EelDelegateService } from '../../../../services/eel-delegate.service'; import { AmbientLight, ClampToEdgeWrapping, + CubeReflectionMapping, DoubleSide, Group, Material, @@ -54,7 +55,7 @@ export enum MapPropType { TwoSidedBitmap = 'two_sided_bitmap', } -export class Nfs1MapWorldEntity extends MapGraph3dEntity { +export class Nfs2MapWorldEntity extends MapGraph3dEntity { public readonly textureLoader = new TextureLoader(); private readonly terrainMaterials: { [key: string]: MeshBasicMaterial } = {}; private readonly objLoader = new OBJLoader(); @@ -64,7 +65,7 @@ export class Nfs1MapWorldEntity extends MapGraph3dEntity, ) { super(mapGraph, { loadDepth: 40, inertia: 2 }); @@ -160,9 +161,9 @@ export class Nfs1MapWorldEntity extends MapGraph3dEntity { texture.wrapS = RepeatWrapping; texture.wrapT = ClampToEdgeWrapping; @@ -197,14 +198,14 @@ export class Nfs1MapWorldEntity extends MapGraph3dEntity placeholder); } else { maps = await Promise.all( textures.map(t => - this.textureLoader.loadAsync(`${this.famPath}/foreground/${t}.png`).catch(() => { + this.textureLoader.loadAsync(`${this.qfsPath}/foreground/${t}.png`).catch(() => { isUnknown = true; return placeholder; }), @@ -351,15 +352,18 @@ export class TrkMapBlockUiComponent implements GuiComponentInterface, AfterViewI @Output('changed') changed: EventEmitter = new EventEmitter(); previewLoading$: BehaviorSubject = new BehaviorSubject(true); + previewQfsLocation$: BehaviorSubject = new BehaviorSubject(null); + previewQfsLoading$: BehaviorSubject = new BehaviorSubject(false); private terrainChunksObjLocation: string | undefined; pointer$: BehaviorSubject = new BehaviorSubject(null); selectedSplineIndex$: BehaviorSubject = new BehaviorSubject(0); + qfsPath: string | null = null; name: string = ''; world!: Gg3dWorld; renderer: Renderer3dEntity | null = null; - map: Nfs1MapWorldEntity | null = null; + map: Nfs2MapWorldEntity | null = null; controller!: FreeCameraController; roadPath: Point3[] | null = null; skySphere!: Entity3d; @@ -371,19 +375,16 @@ export class TrkMapBlockUiComponent implements GuiComponentInterface, AfterViewI private readonly eelDelegate: EelDelegateService, private readonly cdr: ChangeDetectorRef, private readonly mainService: MainService, - ) { - } + ) {} get roadSpline(): Point3[] { - return (this.resource?.data.block_positions || []); + return this.resource?.data.block_positions || []; } async ngAfterViewInit() { this.world = new Gg3dWorld(new ThreeSceneComponent(), { - init: async () => { - }, - simulate: () => { - }, + init: async () => {}, + simulate: () => {}, loader: { loadFromGgGlb: async (...args: any[]) => [], }, @@ -464,8 +465,14 @@ export class TrkMapBlockUiComponent implements GuiComponentInterface, AfterViewI this._resource$.pipe(takeUntil(this.destroyed$)).subscribe(async res => { this.previewLoading$.next(true); - await this.loadTerrainChunks(res?.id); - await this.loadPreview(); + if (res) { + this.previewQfsLocation$.next(res.id.substring(0, res.id.indexOf('.TRK')) + '0.QFS'); + await this.loadTerrainChunks(res.id); + await this.onQfsSelected(this.previewQfsLocation$.value!); + } else { + await this.loadTerrainChunks(); + await this.loadPreview(); + } this.previewLoading$.next(false); }); this.mainService.dataBlockChange$ @@ -502,7 +509,36 @@ export class TrkMapBlockUiComponent implements GuiComponentInterface, AfterViewI }); } - private async loadTerrainChunks(blockId: string | undefined) { + async onQfsSelected(path: string) { + if (this.qfsPath == path) { + return; + } + this.previewQfsLoading$.next(true); + try { + const files = await this.eelDelegate.serializeResource(path); + const loader = new TextureLoader(); + const skyPath = files.find(x => x.endsWith('spherical.png')); + if (skyPath) { + const tex = await loader.loadAsync(skyPath); + tex.colorSpace = 'srgb'; + tex.mapping = CubeReflectionMapping; + ((this.skySphere.object3D!.nativeMesh as Mesh).material as MeshBasicMaterial).map = tex; + } else { + ((this.skySphere.object3D!.nativeMesh as Mesh).material as MeshBasicMaterial).map = null; + } + ((this.skySphere.object3D!.nativeMesh as Mesh).material as MeshBasicMaterial).needsUpdate = true; + this.qfsPath = path; + } catch (err) { + ((this.skySphere.object3D!.nativeMesh as Mesh).material as MeshBasicMaterial).map = null; + ((this.skySphere.object3D!.nativeMesh as Mesh).material as MeshBasicMaterial).needsUpdate = true; + this.qfsPath = null; + } finally { + this.previewQfsLoading$.next(false); + } + await this.loadPreview(); + } + + private async loadTerrainChunks(blockId?: string) { if (blockId) { const paths = await this.eelDelegate.serializeResource(blockId, { geometry__save_obj: true, @@ -522,13 +558,11 @@ export class TrkMapBlockUiComponent implements GuiComponentInterface, AfterViewI } private async loadPreview() { - this.roadPath = - this.resource?.data.block_positions - .map((p: Point3) => ({ - x: p.x, - y: p.z, - z: p.y, - })); + this.roadPath = this.resource?.data.block_positions.map((p: Point3) => ({ + x: p.x, + y: p.z, + z: p.y, + })); if (!this.terrainChunksObjLocation || !this.roadPath) { return; } @@ -541,9 +575,9 @@ export class TrkMapBlockUiComponent implements GuiComponentInterface, AfterViewI true, ); this.unloadPreview(); - this.map = new Nfs1MapWorldEntity( + this.map = new Nfs2MapWorldEntity( chunksGraph, - '', + this.qfsPath && 'resources/' + this.qfsPath, this.mainService.hideHiddenFields$, ); this.map.resource = this.resource; diff --git a/serializers/maps.py b/serializers/maps.py index 1950ed2..a7af2dc 100644 --- a/serializers/maps.py +++ b/serializers/maps.py @@ -821,9 +821,10 @@ def serialize(self, data: dict, path: str, id=None, block=None, **kwargs): v[2] += next_pivot['z'] - pivot['z'] for p in block['polygons'][(block['np4'] + block['np2']):]: model.polygons.append([p['vertices'][0], p['vertices'][1], p['vertices'][2]]) + model.texture_ids.append(f"{p['texture']:04}") model.polygons.append([p['vertices'][2], p['vertices'][0], p['vertices'][3]]) - model.vertex_uvs = [[0, 0] for _ in block['vertices']] - model.texture_ids = [0 for _ in block['polygons']] + model.texture_ids.append(f"{p['texture']:04}") + model.vertex_uvs = [[0 if i % 4 in [0, 3] else 1, 0 if i % 4 in [0, 1] else 1] for i, _ in enumerate(block['vertices'])] chunks.append(model) for mesh in chunks: From efb627d01e3d8595076bd9798b40610e6f9133e4 Mon Sep 17 00:00:00 2001 From: andy Date: Fri, 20 Dec 2024 22:19:52 +0200 Subject: [PATCH 05/36] use correct textures in TRK mesh --- frontend/dist/gui/index.html | 2 +- ...4da86cd02c.js => main.c299cf35154978ab.js} | 2 +- .../delegate.block-ui.component.html | 26 +++--- .../delegate.block-ui.component.ts | 2 + frontend/src/app/utils/block_class_str.ts | 7 ++ library/loader.py | 3 + resources/NFS2.md | 56 ++++++++++- resources/eac/maps/__init__.py | 2 + resources/eac/maps/nfs2.py | 92 +++++++++++++++++-- serializers/maps.py | 25 ++++- 10 files changed, 192 insertions(+), 25 deletions(-) rename frontend/dist/gui/{main.f9cbbe4da86cd02c.js => main.c299cf35154978ab.js} (82%) create mode 100644 frontend/src/app/utils/block_class_str.ts diff --git a/frontend/dist/gui/index.html b/frontend/dist/gui/index.html index 14797ed..6cc4d82 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.f9cbbe4da86cd02c.js b/frontend/dist/gui/main.c299cf35154978ab.js similarity index 82% rename from frontend/dist/gui/main.f9cbbe4da86cd02c.js rename to frontend/dist/gui/main.c299cf35154978ab.js index 0a8704c..4462dcb 100644 --- a/frontend/dist/gui/main.f9cbbe4da86cd02c.js +++ b/frontend/dist/gui/main.c299cf35154978ab.js @@ -1 +1 @@ -(self.webpackChunkgui=self.webpackChunkgui||[]).push([[179],{855:(Lo,Hs,ps)=>{"use strict";function cn(i){return"function"==typeof i}function V(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 Nr=V(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 Kr(i,t){if(i){const e=i.indexOf(t);0<=e&&i.splice(e,1)}}class Zt{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(cn(n))try{n()}catch(s){t=s instanceof Nr?s.errors:[s]}const{_finalizers:r}=this;if(r){this._finalizers=null;for(const s of r)try{Ha(s)}catch(o){t=t??[],o instanceof Nr?t=[...t,...o.errors]:t.push(o)}}if(t)throw new Nr(t)}}add(t){var e;if(t&&t!==this)if(this.closed)Ha(t);else{if(t instanceof Zt){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)&&Kr(e,t)}remove(t){const{_finalizers:e}=this;e&&Kr(e,t),t instanceof Zt&&t._removeParent(this)}}Zt.EMPTY=(()=>{const i=new Zt;return i.closed=!0,i})();const Un=Zt.EMPTY;function Al(i){return i instanceof Zt||i&&"closed"in i&&cn(i.remove)&&cn(i.add)&&cn(i.unsubscribe)}function Ha(i){cn(i)?i():i.unsubscribe()}const Gs={onUnhandledError:null,onStoppedNotification:null,Promise:void 0,useDeprecatedSynchronousErrorHandling:!1,useDeprecatedNextContext:!1},Mi={setTimeout(i,t,...e){const{delegate:n}=Mi;return n?.setTimeout?n.setTimeout(i,t,...e):setTimeout(i,t,...e)},clearTimeout(i){const{delegate:t}=Mi;return(t?.clearTimeout||clearTimeout)(i)},delegate:void 0};function Ci(i){Mi.setTimeout(()=>{const{onUnhandledError:t}=Gs;if(!t)throw i;t(i)})}function ms(){}const $s=On("C",void 0,void 0);function On(i,t,e){return{kind:i,value:t,error:e}}let dr=null;function pc(i){if(Gs.useDeprecatedSynchronousErrorHandling){const t=!dr;if(t&&(dr={errorThrown:!1,error:null}),i(),t){const{errorThrown:e,error:n}=dr;if(dr=null,e)throw n}}else i()}class Dl extends Zt{constructor(t){super(),this.isStopped=!1,t?(this.destination=t,Al(t)&&t.add(this)):this.destination=ME}static create(t,e,n){return new da(t,e,n)}next(t){this.isStopped?Xg(function No(i){return On("N",i,void 0)}(t),this):this._next(t)}error(t){this.isStopped?Xg(function Ws(i){return On("E",void 0,i)}(t),this):(this.isStopped=!0,this._error(t))}complete(){this.isStopped?Xg($s,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 ca=Function.prototype.bind;function Tl(i,t){return ca.call(i,t)}class Ga{constructor(t){this.partialObserver=t}next(t){const{partialObserver:e}=this;if(e.next)try{e.next(t)}catch(n){pd(n)}}error(t){const{partialObserver:e}=this;if(e.error)try{e.error(t)}catch(n){pd(n)}else pd(t)}complete(){const{partialObserver:t}=this;if(t.complete)try{t.complete()}catch(e){pd(e)}}}class da extends Dl{constructor(t,e,n){let r;if(super(),cn(t)||!t)r={next:t??void 0,error:e??void 0,complete:n??void 0};else{let s;this&&Gs.useDeprecatedNextContext?(s=Object.create(t),s.unsubscribe=()=>this.unsubscribe(),r={next:t.next&&Tl(t.next,s),error:t.error&&Tl(t.error,s),complete:t.complete&&Tl(t.complete,s)}):r=t}this.destination=new Ga(r)}}function pd(i){Gs.useDeprecatedSynchronousErrorHandling?function la(i){Gs.useDeprecatedSynchronousErrorHandling&&dr&&(dr.errorThrown=!0,dr.error=i)}(i):Ci(i)}function Xg(i,t){const{onStoppedNotification:e}=Gs;e&&Mi.setTimeout(()=>e(i,t))}const ME={closed:!0,next:ms,error:function wE(i){throw i},complete:ms},Kg="function"==typeof Symbol&&Symbol.observable||"@@observable";function $a(i){return i}function a0(i){return 0===i.length?$a:1===i.length?i[0]:function(e){return i.reduce((n,r)=>r(n),e)}}let In=(()=>{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 Pf(i){return i&&i instanceof Dl||function SE(i){return i&&cn(i.next)&&cn(i.error)&&cn(i.complete)}(i)&&Al(i)}(e)?e:new da(e,n,r);return pc(()=>{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=Wa(n))((r,s)=>{const o=new da({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)}[Kg](){return this}pipe(...e){return a0(e)(this)}toPromise(e){return new(e=Wa(e))((n,r)=>{let s;this.subscribe(o=>s=o,o=>r(o),()=>n(s))})}}return i.create=t=>new i(t),i})();function Wa(i){var t;return null!==(t=i??Gs.Promise)&&void 0!==t?t:Promise}const ua=V(i=>function(){i(this),this.name="ObjectUnsubscribedError",this.message="object unsubscribed"});let Re=(()=>{class i extends In{constructor(){super(),this.closed=!1,this.currentObservers=null,this.observers=[],this.isStopped=!1,this.hasError=!1,this.thrownError=null}lift(e){const n=new l0(this,this);return n.operator=e,n}_throwIfClosed(){if(this.closed)throw new ua}next(e){pc(()=>{if(this._throwIfClosed(),!this.isStopped){this.currentObservers||(this.currentObservers=Array.from(this.observers));for(const n of this.currentObservers)n.next(e)}})}error(e){pc(()=>{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(){pc(()=>{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?Un:(this.currentObservers=null,s.push(e),new Zt(()=>{this.currentObservers=null,Kr(s,e)}))}_checkFinalizedStatuses(e){const{hasError:n,thrownError:r,isStopped:s}=this;n?e.error(r):s&&e.complete()}asObservable(){const e=new In;return e.source=this,e}}return i.create=(t,e)=>new l0(t,e),i})();class l0 extends Re{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:Un}}function c0(i){return cn(i?.lift)}function ti(i){return t=>{if(c0(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 Yn(i,t,e,n,r){return new EE(i,t,e,n,r)}class EE extends Dl{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 et(i,t){return ti((e,n)=>{let r=0;e.subscribe(Yn(n,s=>{n.next(i.call(t,s,r++))}))})}function ha(i){return this instanceof ha?(this.v=i,this):new ha(i)}function Nf(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 Zg(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 i_=i=>i&&"number"==typeof i.length&&"function"!=typeof i;function r_(i){return cn(i?.then)}function p0(i){return cn(i[Kg])}function m0(i){return Symbol.asyncIterator&&cn(i?.[Symbol.asyncIterator])}function g0(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 _0=function s_(){return"function"==typeof Symbol&&Symbol.iterator?Symbol.iterator:"@@iterator"}();function Bf(i){return cn(i?.[_0])}function v0(i){return function Lf(i,t,e){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var r,n=e.apply(i,t||[]),s=[];return r=Object.create(("function"==typeof AsyncIterator?AsyncIterator:Object).prototype),a("next"),a("throw"),a("return",function o(m){return function(g){return Promise.resolve(g).then(m,h)}}),r[Symbol.asyncIterator]=function(){return this},r;function a(m,g){n[m]&&(r[m]=function(b){return new Promise(function(v,y){s.push([m,b,v,y])>1||l(m,b)})},g&&(r[m]=g(r[m])))}function l(m,g){try{!function c(m){m.value instanceof ha?Promise.resolve(m.value.v).then(d,h):p(s[0][2],m)}(n[m](g))}catch(b){p(s[0][3],b)}}function d(m){l("next",m)}function h(m){l("throw",m)}function p(m,g){m(g),s.shift(),s.length&&l(s[0][0],s[0][1])}}(this,arguments,function*(){const e=i.getReader();try{for(;;){const{value:n,done:r}=yield ha(e.read());if(r)return yield ha(void 0);yield yield ha(n)}}finally{e.releaseLock()}})}function y0(i){return cn(i?.getReader)}function wr(i){if(i instanceof In)return i;if(null!=i){if(p0(i))return function LE(i){return new In(t=>{const e=i[Kg]();if(cn(e.subscribe))return e.subscribe(t);throw new TypeError("Provided object does not correctly implement Symbol.observable")})}(i);if(i_(i))return function NE(i){return new In(t=>{for(let e=0;e{i.then(e=>{t.closed||(t.next(e),t.complete())},e=>t.error(e)).then(null,Ci)})}(i);if(m0(i))return b0(i);if(Bf(i))return function UE(i){return new In(t=>{for(const e of i)if(t.next(e),t.closed)return;t.complete()})}(i);if(y0(i))return function x0(i){return b0(v0(i))}(i)}throw g0(i)}function b0(i){return new In(t=>{(function VE(i,t){var e,n,r,s;return function gd(i,t,e,n){return new(e||(e=Promise))(function(s,o){function a(d){try{c(n.next(d))}catch(h){o(h)}}function l(d){try{c(n.throw(d))}catch(h){o(h)}}function c(d){d.done?s(d.value):function r(s){return s instanceof e?s:new e(function(o){o(s)})}(d.value).then(a,l)}c((n=n.apply(i,t||[])).next())})}(this,void 0,void 0,function*(){try{for(e=Nf(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 Ya(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 ir(i,t,e=1/0){return cn(t)?ir((n,r)=>et((s,o)=>t(n,s,r,o))(wr(i(n,r))),e):("number"==typeof t&&(e=t),ti((n,r)=>function zE(i,t,e,n,r,s,o,a){const l=[];let c=0,d=0,h=!1;const p=()=>{h&&!l.length&&!c&&t.complete()},m=b=>c{s&&t.next(b),c++;let v=!1;wr(e(b,d++)).subscribe(Yn(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(Yn(t,m,()=>{h=!0,p()})),()=>{a?.()}}(n,r,i,e)))}function yd(i=1/0){return ir($a,i)}const po=new In(i=>i.complete());function Gu(i){return i&&cn(i.schedule)}function a_(i){return i[i.length-1]}function w0(i){return cn(a_(i))?i.pop():void 0}function $u(i){return Gu(a_(i))?i.pop():void 0}function l_(i,t=0){return ti((e,n)=>{e.subscribe(Yn(n,r=>Ya(n,i,()=>n.next(r),t),()=>Ya(n,i,()=>n.complete(),t),r=>Ya(n,i,()=>n.error(r),t)))})}function c_(i,t=0){return ti((e,n)=>{n.add(i.schedule(()=>e.subscribe(n),t))})}function d_(i,t){if(!i)throw new Error("Iterable cannot be null");return new In(e=>{Ya(e,t,()=>{const n=i[Symbol.asyncIterator]();Ya(e,t,()=>{n.next().then(r=>{r.done?e.complete():e.next(r.value)})},0,!0)})})}function Ni(i,t){return t?function S0(i,t){if(null!=i){if(p0(i))return function GE(i,t){return wr(i).pipe(c_(t),l_(t))}(i,t);if(i_(i))return function WE(i,t){return new In(e=>{let n=0;return t.schedule(function(){n===i.length?e.complete():(e.next(i[n++]),e.closed||this.schedule())})})}(i,t);if(r_(i))return function $E(i,t){return wr(i).pipe(c_(t),l_(t))}(i,t);if(m0(i))return d_(i,t);if(Bf(i))return function jE(i,t){return new In(e=>{let n;return Ya(e,t,()=>{n=i[_0](),Ya(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)}),()=>cn(n?.return)&&n.return()})}(i,t);if(y0(i))return function C0(i,t){return d_(v0(i),t)}(i,t)}throw g0(i)}(i,t):wr(i)}function Mr(...i){const t=$u(i),e=function M0(i,t){return"number"==typeof a_(i)?i.pop():t}(i,1/0),n=i;return n.length?1===n.length?wr(n[0]):yd(e)(Ni(n,t)):po}function Uf(i={}){const{connector:t=(()=>new Re),resetOnError:e=!0,resetOnComplete:n=!0,resetOnRefCountZero:r=!0}=i;return s=>{let o,a,l,c=0,d=!1,h=!1;const p=()=>{a?.unsubscribe(),a=void 0},m=()=>{p(),o=l=void 0,d=h=!1},g=()=>{const b=o;m(),b?.unsubscribe()};return ti((b,v)=>{c++,!h&&!d&&p();const y=l=l??t();v.add(()=>{c--,0===c&&!h&&!d&&(a=bd(g,r))}),y.subscribe(v),!o&&c>0&&(o=new da({next:M=>y.next(M),error:M=>{h=!0,p(),a=bd(m,e,M),y.error(M)},complete:()=>{d=!0,p(),a=bd(m,n),y.complete()}}),wr(b).subscribe(o))})(s)}}function bd(i,t,...e){if(!0===t)return void i();if(!1===t)return;const n=new da({next:()=>{n.unsubscribe(),i()}});return wr(t(...e)).subscribe(n)}function li(i){for(let t in i)if(i[t]===li)return t;throw Error("Could not find renamed property on target object.")}function u_(i,t){for(const e in t)t.hasOwnProperty(e)&&!i.hasOwnProperty(e)&&(i[e]=t[e])}function pi(i){if("string"==typeof i)return i;if(Array.isArray(i))return"["+i.map(pi).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 Vf(i,t){return null==i||""===i?null===t?"":t:null==t||""===t?i:i+" "+t}const h_=li({__forward_ref__:li});function Gn(i){return i.__forward_ref__=Gn,i.toString=function(){return pi(this())},i}function Pt(i){return Wu(i)?i():i}function Wu(i){return"function"==typeof i&&i.hasOwnProperty(h_)&&i.__forward_ref__===Gn}function ju(i){return i&&!!i.\u0275providers}const qu="https://g.co/ng/security#xss";class pe extends Error{constructor(t,e){super(zf(t,e)),this.code=t}}function zf(i,t){return`NG0${Math.abs(i)}${t?": "+t.trim():""}`}function Qt(i){return"string"==typeof i?i:null==i?"":String(i)}function Hf(i,t){throw new pe(-201,!1)}function En(i,t){null==i&&function ni(i,t,e,n){throw new Error(`ASSERTION ERROR: ${i}`+(null==n?"":` [Expected=> ${e} ${n} ${t} <=Actual]`))}(t,i,null,"!=")}function ke(i){return{token:i.token,providedIn:i.providedIn||null,factory:i.factory,value:void 0}}function Kt(i){return{providers:i.providers||[],imports:i.imports||[]}}function Gf(i){return f_(i,xd)||f_(i,m_)}function f_(i,t){return i.hasOwnProperty(t)?i[t]:null}function p_(i){return i&&(i.hasOwnProperty(gs)||i.hasOwnProperty(D0))?i[gs]:null}const xd=li({\u0275prov:li}),gs=li({\u0275inj:li}),m_=li({ngInjectableDef:li}),D0=li({ngInjectorDef:li});var Ot=(()=>((Ot=Ot||{})[Ot.Default=0]="Default",Ot[Ot.Host=1]="Host",Ot[Ot.Self=2]="Self",Ot[Ot.SkipSelf=4]="SkipSelf",Ot[Ot.Optional=8]="Optional",Ot))();let $f;function Ys(i){const t=$f;return $f=i,t}function _s(i,t,e){const n=Gf(i);return n&&"root"==n.providedIn?void 0===n.value?n.value=n.factory():n.value:e&Ot.Optional?null:void 0!==t?t:void Hf(pi(i))}const Rn=(()=>typeof globalThis<"u"&&globalThis||typeof global<"u"&&global||typeof window<"u"&&window||typeof self<"u"&&typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&self)(),Rl={},Ku="__NG_DI_FLAG__",mi="ngTempTokenPath",kl="ngTokenPath",g_=/\n/gm,eA="\u0275",Wf="__source";let Zu;function wd(i){const t=Zu;return Zu=i,t}function tA(i,t=Ot.Default){if(void 0===Zu)throw new pe(-203,!1);return null===Zu?_s(i,void 0,t):Zu.get(i,t&Ot.Optional?null:void 0,t)}function ee(i,t=Ot.Default){return(function T0(){return $f}()||tA)(Pt(i),t)}function Ft(i,t=Ot.Default){return ee(i,jf(t))}function jf(i){return typeof i>"u"||"number"==typeof i?i:0|(i.optional&&8)|(i.host&&1)|(i.self&&2)|(i.skipSelf&&4)}function Yf(i){const t=[];for(let e=0;e((mo=mo||{})[mo.OnPush=0]="OnPush",mo[mo.Default=1]="Default",mo))(),qs=(()=>{return(i=qs||(qs={}))[i.Emulated=0]="Emulated",i[i.None=2]="None",i[i.ShadowDom=3]="ShadowDom",qs;var i})();const Xa={},$n=[],Br=li({\u0275cmp:li}),Ju=li({\u0275dir:li}),vc=li({\u0275pipe:li}),y_=li({\u0275mod:li}),fa=li({\u0275fac:li}),eh=li({__NG_ELEMENT_ID__:li});let nA=0;function ot(i){return qa(()=>{const t=go(i),e={...t,decls:i.decls,vars:i.vars,template:i.template,consts:i.consts||null,ngContentSelectors:i.ngContentSelectors,onPush:i.changeDetection===mo.OnPush,directiveDefs:null,pipeDefs:null,dependencies:t.standalone&&i.dependencies||null,getStandaloneInjector:null,data:i.data||{},encapsulation:i.encapsulation||qs.Emulated,id:"c"+nA++,styles:i.styles||$n,_:null,schemas:i.schemas||null,tView:null};b_(e);const n=i.dependencies;return e.directiveDefs=Xf(n,!1),e.pipeDefs=Xf(n,!0),e})}function th(i,t,e){const n=i.\u0275cmp;n.directiveDefs=Xf(t,!1),n.pipeDefs=Xf(e,!0)}function iA(i){return Hn(i)||Ur(i)}function Cd(i){return null!==i}function nn(i){return qa(()=>({type:i.type,bootstrap:i.bootstrap||$n,declarations:i.declarations||$n,imports:i.imports||$n,exports:i.exports||$n,transitiveCompileScopes:null,schemas:i.schemas||null,id:i.id||null}))}function qf(i,t){if(null==i)return Xa;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 ve(i){return qa(()=>{const t=go(i);return b_(t),t})}function Gi(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 Hn(i){return i[Br]||null}function Ur(i){return i[Ju]||null}function vs(i){return i[vc]||null}function ur(i,t){const e=i[y_]||null;if(!e&&!0===t)throw new Error(`Type ${pi(i)} does not have '\u0275mod' property.`);return e}function go(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||$n,viewQuery:i.viewQuery||null,features:i.features||null,setInput:null,findHostDirectiveDefs:null,hostDirectives:null,inputs:qf(i.inputs,t),outputs:qf(i.outputs)}}function b_(i){i.features?.forEach(t=>t(i))}function Xf(i,t){if(!i)return null;const e=t?vs:iA;return()=>("function"==typeof i?i():i).map(n=>e(n)).filter(Cd)}const Ka=0,at=1,fn=2,Bi=3,ys=4,X=5,ue=6,oe=7,Be=8,$t=9,Vn=10,yt=11,oi=12,yc=13,R0=14,Sr=15,rr=16,nh=17,Vo=18,Xs=19,Pl=20,ii=21,yi=22,Ed=1,k0=2,Kf=7,Zf=8,Za=9,Ui=10;function bs(i){return Array.isArray(i)&&"object"==typeof i[Ed]}function xs(i){return Array.isArray(i)&&!0===i[Ed]}function Qf(i){return 0!=(4&i.flags)}function Ad(i){return i.componentOffset>-1}function bc(i){return 1==(1&i.flags)}function _o(i){return!!i.template}function ih(i){return 0!=(256&i[fn])}function Qa(i,t){return i.hasOwnProperty(fa)?i[fa]:null}class Td{constructor(t,e,n){this.previousValue=t,this.currentValue=e,this.firstChange=n}isFirstChange(){return this.firstChange}}function bi(){return Id}function Id(i){return i.type.prototype.ngOnChanges&&(i.setInput=Rd),tp}function tp(){const i=N0(this),t=i?.current;if(t){const e=i.previous;if(e===Xa)i.previous=t;else for(let n in t)e[n]=t[n];i.current=null,this.ngOnChanges(t)}}function Rd(i,t,e,n){const r=this.declaredInputs[e],s=N0(i)||function lA(i,t){return i[L0]=t}(i,{previous:Xa,current:null}),o=s.current||(s.current={}),a=s.previous,l=a[r];o[r]=new Td(l&&l.currentValue,t,a===Xa),i[n]=t}bi.ngInherit=!0;const L0="__ngSimpleChanges__";function N0(i){return i[L0]||null}const Qr=function(i,t,e){},kd="svg";function I(i){for(;Array.isArray(i);)i=i[Ka];return i}function xc(i,t){return I(t[i])}function Ei(i,t){return I(t[i.index])}function B0(i,t){return i.data[t]}function Od(i,t){return i[t]}function ws(i,t){const e=t[i];return bs(e)?e:e[Ka]}function np(i){return 64==(64&i[fn])}function Ol(i,t){return null==t?null:i[t]}function U0(i){i[Vo]=0}function A_(i,t){i[X]+=t;let e=i,n=i[Bi];for(;null!==n&&(1===t&&1===e[X]||-1===t&&0===e[X]);)n[X]+=t,e=n,n=n[Bi]}const kt={lFrame:el(null),bindingsEnabled:!0};function pa(){return kt.bindingsEnabled}function Se(){return kt.lFrame.lView}function zn(){return kt.lFrame.tView}function an(i){return kt.lFrame.contextLView=i,i[Be]}function zt(i){return kt.lFrame.contextLView=null,i}function Er(){let i=z0();for(;null!==i&&64===i.type;)i=i.parent;return i}function z0(){return kt.lFrame.currentTNode}function ma(i,t){const e=kt.lFrame;e.currentTNode=i,e.isParent=t}function D_(){return kt.lFrame.isParent}function T_(){kt.lFrame.isParent=!1}function Vr(){const i=kt.lFrame;let t=i.bindingRootIndex;return-1===t&&(t=i.bindingRootIndex=i.tView.bindingStartIndex),t}function Fl(){return kt.lFrame.bindingIndex++}function Ks(i){const t=kt.lFrame,e=t.bindingIndex;return t.bindingIndex=t.bindingIndex+i,e}function $0(i,t){const e=kt.lFrame;e.bindingIndex=e.bindingRootIndex=i,zo(t)}function zo(i){kt.lFrame.currentDirectiveIndex=i}function rh(i){const t=kt.lFrame.currentDirectiveIndex;return-1===t?null:i[t]}function Ll(){return kt.lFrame.currentQueryIndex}function Ms(i){kt.lFrame.currentQueryIndex=i}function vA(i){const t=i[at];return 2===t.type?t.declTNode:1===t.type?i[ue]:null}function R_(i,t,e){if(e&Ot.SkipSelf){let r=t,s=i;for(;!(r=r.parent,null!==r||e&Ot.Host||(r=vA(s),null===r||(s=s[Sr],10&r.type))););if(null===r)return!1;t=r,i=s}const n=kt.lFrame=Fd();return n.currentTNode=t,n.lView=i,!0}function rp(i){const t=Fd(),e=i[at];kt.lFrame=t,t.currentTNode=e.firstChild,t.lView=i,t.tView=e,t.contextLView=i,t.bindingIndex=e.bindingStartIndex,t.inI18n=!1}function Fd(){const i=kt.lFrame,t=null===i?null:i.child;return null===t?el(i):t}function el(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 k_(){const i=kt.lFrame;return kt.lFrame=i.parent,i.currentTNode=null,i.lView=null,i}const W0=k_;function Ld(){const i=k_();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 Xn(){return kt.lFrame.selectedIndex}function tl(i){kt.lFrame.selectedIndex=i}function Ai(){const i=kt.lFrame;return B0(i.tView,i.selectedIndex)}function ki(){kt.lFrame.currentNamespace=kd}function ga(){!function Mc(){kt.lFrame.currentNamespace=null}()}function Nd(i,t){for(let e=t.directiveStart,n=t.directiveEnd;e=n)break}else t[l]<0&&(i[Vo]+=65536),(a>11>16&&(3&i[fn])===t){i[fn]+=2048,Qr(4,a,s);try{s.call(a)}finally{Qr(5,a,s)}}}else{Qr(4,a,s);try{s.call(a)}finally{Qr(5,a,s)}}}const _a=-1;class Bd{constructor(t,e,n){this.factory=t,this.resolving=!1,this.canSeeViewProviders=e,this.injectImpl=n}}function L_(i,t,e){let n=0;for(;nt){o=s-1;break}}}for(;s>16}(i),n=t;for(;e>0;)n=n[Sr],e--;return n}let Ud=!0;function cp(i){const t=Ud;return Ud=i,t}const B_=255,Z0=5;let Q0=0;const va={};function ah(i,t){const e=J0(i,t);if(-1!==e)return e;const n=t[at];n.firstCreatePass&&(i.injectorIndex=t.length,lh(n.data,i),lh(t,null),lh(n.blueprint,null));const r=ch(i,t),s=i.injectorIndex;if(lp(r)){const o=sh(r),a=oh(r,t),l=a[at].data;for(let c=0;c<8;c++)t[s+c]=a[o+c]|l[o+c]}return t[s+8]=r,s}function lh(i,t){i.push(0,0,0,0,0,0,0,0,t)}function J0(i,t){return-1===i.injectorIndex||i.parent&&i.parent.injectorIndex===i.injectorIndex||null===t[i.injectorIndex+8]?-1:i.injectorIndex}function ch(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=uh(r),null===n)return _a;if(e++,r=r[Sr],-1!==n.injectorIndex)return n.injectorIndex|e<<16}return _a}function pn(i,t,e){!function U_(i,t,e){let n;"string"==typeof e?n=e.charCodeAt(0)||0:e.hasOwnProperty(eh)&&(n=e[eh]),null==n&&(n=e[eh]=Q0++);const r=n&B_;t.data[i+(r>>Z0)]|=1<=0?t&B_:Zs:t}(e);if("function"==typeof s){if(!R_(t,i,n))return n&Ot.Host?ex(r,0,n):Vd(t,e,n,r);try{const o=s(n);if(null!=o||n&Ot.Optional)return o;Hf()}finally{W0()}}else if("number"==typeof s){let o=null,a=J0(i,t),l=_a,c=n&Ot.Host?t[rr][ue]:null;for((-1===a||n&Ot.SkipSelf)&&(l=-1===a?ch(i,t):t[a+8],l!==_a&&z_(n,!1)?(o=t[at],a=sh(l),t=oh(l,t)):a=-1);-1!==a;){const d=t[at];if(up(s,a,d.data)){const h=EA(a,t,e,o,n,c);if(h!==va)return h}l=t[a+8],l!==_a&&z_(n,t[at].data[a+8]===c)&&up(s,a,t)?(o=d,a=sh(l),t=oh(l,t)):a=-1}}return r}function EA(i,t,e,n,r,s){const o=t[at],a=o.data[i+8],d=ts(a,o,e,null==n?Ad(a)&&Ud:n!=o&&0!=(3&a.type),r&Ot.Host&&s===a);return null!==d?Ec(t,o,d,a):va}function ts(i,t,e,n,r){const s=i.providerIndexes,o=t.data,a=1048575&s,l=i.directiveStart,d=s>>20,p=r?a+d:i.directiveEnd;for(let m=n?a:a+d;m=l&&g.type===e)return m}if(r){const m=o[l];if(m&&_o(m)&&m.type===e)return l}return null}function Ec(i,t,e,n){let r=i[e];const s=t.data;if(function xA(i){return i instanceof Bd}(r)){const o=r;o.resolving&&function E0(i,t){const e=t?`. Dependency path: ${t.join(" > ")} > ${i}`:"";throw new pe(-200,`Circular dependency in DI detected for ${i}${e}`)}(function qn(i){return"function"==typeof i?i.name||i.toString():"object"==typeof i&&null!=i&&"function"==typeof i.type?i.type.name||i.type.toString():Qt(i)}(s[e]));const a=cp(o.canSeeViewProviders);o.resolving=!0;const l=o.injectImpl?Ys(o.injectImpl):null;R_(i,n,Ot.Default);try{r=i[e]=o.factory(void 0,s,i,n),t.firstCreatePass&&e>=n.directiveStart&&function es(i,t,e){const{ngOnChanges:n,ngOnInit:r,ngDoCheck:s}=t.type.prototype;if(n){const o=Id(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&&Ys(l),cp(a),o.resolving=!1,W0()}}return r}function up(i,t,e){return!!(e[t+(i>>Z0)]&1<{const t=i.prototype.constructor,e=t[fa]||dh(t),n=Object.prototype;let r=Object.getPrototypeOf(i.prototype).constructor;for(;r&&r!==n;){const s=r[fa]||dh(r);if(s&&s!==e)return s;r=Object.getPrototypeOf(r)}return s=>new s})}function dh(i){return Wu(i)?()=>{const t=dh(Pt(i));return t&&t()}:Qa(i)}function uh(i){const t=i[at],e=t.type;return 2===e?t.declTNode:1===e?i[ue]:null}function ya(i){return function SA(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 ba(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,d){const h=l.hasOwnProperty(Dc)?l[Dc]:Object.defineProperty(l,Dc,{value:[]})[Dc];for(;h.length<=d;)h.push(null);return(h[d]=h[d]||[]).push(o),l}}return e&&(r.prototype=Object.create(e.prototype)),r.prototype.ngMetadataName=i,r.annotationCls=r,r})}class me{constructor(t,e){this._desc=t,this.ngMetadataName="InjectionToken",this.\u0275prov=void 0,"number"==typeof e?this.__NG_ELEMENT_ID__=e:void 0!==e&&(this.\u0275prov=ke({token:this,providedIn:e.providedIn||"root",factory:e.factory}))}get multi(){return this}toString(){return`InjectionToken ${this._desc}`}}function Ul(i,t){i.forEach(e=>Array.isArray(e)?Ul(e,t):t(e))}function G_(i,t,e){t>=i.length?i.push(e):i.splice(t,0,e)}function pp(i,t){return t>=i.length-1?i.pop():i.splice(t,1)[0]}function Gd(i,t){const e=[];for(let n=0;n=0?i[1|n]=e:(n=~n,function IA(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 Wd(i,t){const e=Ic(i,t);if(e>=0)return i[1|e]}function Ic(i,t){return function gp(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),Ss=Md(zd("Optional"),8),xa=Md(zd("SkipSelf"),4);var Es=(()=>((Es=Es||{})[Es.Important=1]="Important",Es[Es.DashCase=2]="DashCase",Es))();const Cp=new Map;let vx=0;const iv="__ngContext__";function Hr(i,t){bs(t)?(i[iv]=t[Pl],function yx(i){Cp.set(i[Pl],i)}(t)):i[iv]=t}let sv;function ov(i,t){return sv(i,t)}function vh(i){const t=i[Bi];return xs(t)?t[Bi]:t}function av(i){return Dx(i[yc])}function lv(i){return Dx(i[ys])}function Dx(i){for(;null!==i&&!xs(i);)i=i[ys];return i}function Tr(i,t,e,n,r){if(null!=n){let s,o=!1;xs(n)?s=n:bs(n)&&(o=!0,n=n[Ka]);const a=I(n);0===i&&null!==e?null==r?Ox(t,e,a):Pc(t,e,a,r||null,!0):1===i&&null!==e?Pc(t,e,a,r||null,!0):2===i?function mv(i,t,e){const n=Ap(i,t);n&&function QA(i,t,e,n){i.removeChild(t,e,n)}(i,n,t,e)}(t,a,o):3===i&&t.destroyNode(a),null!=s&&function zx(i,t,e,n,r){const s=e[Kf];s!==I(e)&&Tr(t,i,n,s,r);for(let a=Ui;a0&&(i[e-1][ys]=n[ys]);const s=pp(i,Ui+t);!function WA(i,t){bh(i,t,t[yt],2,null,null),t[Ka]=null,t[ue]=null}(n[at],n);const o=s[Xs];null!==o&&o.detachView(s[at]),n[Bi]=null,n[ys]=null,n[fn]&=-65}return n}function Rx(i,t){if(!(128&t[fn])){const e=t[yt];e.destroyNode&&bh(i,t,e,3,null,null),function qA(i){let t=i[yc];if(!t)return hv(i[at],i);for(;t;){let e=null;if(bs(t))e=t[yc];else{const n=t[Ui];n&&(e=n)}if(!e){for(;t&&!t[ys]&&t!==i;)bs(t)&&hv(t[at],t),t=t[Bi];null===t&&(t=i),bs(t)&&hv(t[at],t),e=t&&t[ys]}t=e}}(t)}}function hv(i,t){if(!(128&t[fn])){t[fn]&=-65,t[fn]|=128,function ZA(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===qs.None||s===qs.Emulated)return null}return Ei(n,e)}}(i,t.parent,e)}function Pc(i,t,e,n,r){i.insertBefore(t,e,n,r)}function Ox(i,t,e){i.appendChild(t,e)}function Fx(i,t,e,n,r){null!==n?Pc(i,t,e,n,r):Ox(i,t,e)}function Ap(i,t){return i.parentNode(t)}function Lx(i,t,e){return Bx(i,t,e)}let fv,Rp,vv,Bx=function Nx(i,t,e){return 40&i.type?Ei(i,e):null};function yh(i,t,e,n){const r=kx(i,n,t),s=t[yt],a=Lx(n.parent||t[ue],n,t);if(null!=r)if(Array.isArray(e))for(let l=0;li,createScript:i=>i,createScriptURL:i=>i})}catch{}return Rp}()?.createHTML(i)||i}class Vl{constructor(t){this.changingThisBreaksApplicationSecurity=t}toString(){return`SafeValue must use [property]=binding: ${this.changingThisBreaksApplicationSecurity} (see ${qu})`}}class oD extends Vl{getTypeName(){return"HTML"}}class aD extends Vl{getTypeName(){return"Style"}}class lD extends Vl{getTypeName(){return"Script"}}class cD extends Vl{getTypeName(){return"URL"}}class Pp extends Vl{getTypeName(){return"ResourceURL"}}function Js(i){return i instanceof Vl?i.changingThisBreaksApplicationSecurity:i}function Ma(i,t){const e=function dD(i){return i instanceof Vl&&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 ${qu})`)}return e===t}class gD{constructor(t){this.inertDocumentHelper=t}getInertBodyElement(t){t=""+t;try{const e=(new window.DOMParser).parseFromString(jd(t),"text/html").body;return null===e?this.inertDocumentHelper.getInertBodyElement(t):(e.removeChild(e.firstChild),e)}catch{return null}}}class _D{constructor(t){this.defaultDoc=t,this.inertDocument=this.defaultDoc.implementation.createHTMLDocument("sanitization-inert")}getInertBodyElement(t){const e=this.inertDocument.createElement("template");return e.innerHTML=jd(t),e}}const vD=/^(?!javascript:)(?:[a-z0-9+.-]+:|[^&:\/?#]*(?:[\/?#]|$))/i;function xh(i){return(i=String(i)).match(vD)?i:"unsafe:"+i}function Ca(i){const t={};for(const e of i.split(","))t[e]=!0;return t}function Oc(...i){const t={};for(const e of i)for(const n in e)e.hasOwnProperty(n)&&(t[n]=!0);return t}const xv=Ca("area,br,col,hr,img,wbr"),wv=Ca("colgroup,dd,dt,li,p,tbody,td,tfoot,th,thead,tr"),Mv=Ca("rp,rt"),Cv=Oc(xv,Oc(wv,Ca("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")),Oc(Mv,Ca("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")),Oc(Mv,wv)),Yd=Ca("background,cite,href,itemtype,longdesc,poster,src,xlink:href"),qx=Oc(Yd,Ca("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"),Ca("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")),Ev=Ca("script,style,template");class Xx{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(!Cv.hasOwnProperty(e))return this.sanitizedSomething=!0,!Ev.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();Cv.hasOwnProperty(e)&&!xv.hasOwnProperty(e)&&(this.buf.push(""))}chars(t){this.buf.push(Kx(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 bD=/[\uD800-\uDBFF][\uDC00-\uDFFF]/g,xD=/([^\#-~ |!])/g;function Kx(i){return i.replace(/&/g,"&").replace(bD,function(t){return"&#"+(1024*(t.charCodeAt(0)-55296)+(t.charCodeAt(1)-56320)+65536)+";"}).replace(xD,function(t){return"&#"+t.charCodeAt(0)+";"}).replace(//g,">")}let Fp;function Zx(i,t){let e=null;try{Fp=Fp||function Yx(i){const t=new _D(i);return function Op(){try{return!!(new window.DOMParser).parseFromString(jd(""),"text/html")}catch{return!1}}()?new gD(t):t}(i);let n=t?String(t):"";e=Fp.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=Fp.getInertBodyElement(n)}while(n!==s);return jd((new Xx).sanitizeChildren(Av(e)||e))}finally{if(e){const n=Av(e)||e;for(;n.firstChild;)n.removeChild(n.firstChild)}}}function Av(i){return"content"in i&&function wD(i){return i.nodeType===Node.ELEMENT_NODE&&"TEMPLATE"===i.nodeName}(i)?i.content:null}var Kn=(()=>((Kn=Kn||{})[Kn.NONE=0]="NONE",Kn[Kn.HTML=1]="HTML",Kn[Kn.STYLE=2]="STYLE",Kn[Kn.SCRIPT=3]="SCRIPT",Kn[Kn.URL=4]="URL",Kn[Kn.RESOURCE_URL=5]="RESOURCE_URL",Kn))();function Lp(i){const t=function xi(){const i=Se();return i&&i[oi]}();return t?t.sanitize(Kn.URL,i)||"":Ma(i,"URL")?Js(i):xh(Qt(i))}const Np=new me("ENVIRONMENT_INITIALIZER"),rl=new me("INJECTOR",-1),Jx=new me("INJECTOR_DEF_TYPES");class ew{get(t,e=Rl){if(e===Rl){const n=new Error(`NullInjectorError: No provider for ${pi(t)}!`);throw n.name="NullInjectorError",n}return e}}function AD(...i){return{\u0275providers:tw(0,i),\u0275fromNgModule:!0}}function tw(i,...t){const e=[],n=new Set;let r;return Ul(t,s=>{const o=s;Dv(o,e,[],n)&&(r||(r=[]),r.push(o))}),void 0!==r&&Bp(r,e),e}function Bp(i,t){for(let e=0;e{t.push(s)})}}function Dv(i,t,e,n){if(!(i=Pt(i)))return!1;let r=null,s=p_(i);const o=!s&&Hn(i);if(s||o){if(o&&!o.standalone)return!1;r=i}else{const l=i.ngModule;if(s=p_(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)Dv(c,t,e,n)}}else{if(!s)return!1;{if(null!=s.imports&&!a){let c;n.add(r);try{Ul(s.imports,d=>{Dv(d,t,e,n)&&(c||(c=[]),c.push(d))})}finally{}void 0!==c&&Bp(c,t)}if(!a){const c=Qa(r)||(()=>new r);t.push({provide:r,useFactory:c,deps:$n},{provide:Jx,useValue:r,multi:!0},{provide:Np,useValue:()=>ee(r),multi:!0})}const l=s.providers;null==l||a||Up(l,d=>{t.push(d)})}}return r!==i&&void 0!==i.providers}function Up(i,t){for(let e of i)ju(e)&&(e=e.\u0275providers),Array.isArray(e)?Up(e,t):t(e)}const Vp=li({provide:String,useValue:li});function wi(i){return null!==i&&"object"==typeof i&&Vp in i}function Lc(i){return"function"==typeof i}const Iv=new me("Set Injector scope."),zp={},TD={};let Rv;function wh(){return void 0===Rv&&(Rv=new ew),Rv}class to{}class Hp extends to{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,Pv(t,o=>this.processProvider(o)),this.records.set(rl,$o(void 0,this)),r.has("environment")&&this.records.set(to,$o(void 0,this));const s=this.records.get(Iv);null!=s&&"string"==typeof s.value&&this.scopes.add(s.value),this.injectorDefTypes=new Set(this.get(Jx.multi,$n,Ot.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=wd(this),n=Ys(void 0);try{return t()}finally{wd(e),Ys(n)}}get(t,e=Rl,n=Ot.Default){this.assertNotDestroyed(),n=jf(n);const r=wd(this),s=Ys(void 0);try{if(!(n&Ot.SkipSelf)){let a=this.records.get(t);if(void 0===a){const l=function kD(i){return"function"==typeof i||"object"==typeof i&&i instanceof me}(t)&&Gf(t);a=l&&this.injectableDefInScope(l)?$o(kv(t),zp):null,this.records.set(t,a)}if(null!=a)return this.hydrate(t,a)}return(n&Ot.Self?wh():this.parent).get(t,e=n&Ot.Optional&&e===Rl?null:e)}catch(o){if("NullInjectorError"===o.name){if((o[mi]=o[mi]||[]).unshift(pi(t)),r)throw o;return function v_(i,t,e,n){const r=i[mi];throw t[Wf]&&r.unshift(t[Wf]),i.message=function I0(i,t,e,n=null){i=i&&"\n"===i.charAt(0)&&i.charAt(1)==eA?i.slice(2):i;let r=pi(t);if(Array.isArray(t))r=t.map(pi).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):pi(a)))}r=`{${s.join(", ")}}`}return`${e}${n?"("+n+")":""}[${r}]: ${i.replace(g_,"\n ")}`}("\n"+i.message,r,e,n),i[kl]=r,i[mi]=null,i}(o,t,"R3InjectorError",this.source)}throw o}finally{Ys(s),wd(r)}}resolveInjectorInitializers(){const t=wd(this),e=Ys(void 0);try{const n=this.get(Np.multi,$n,Ot.Self);for(const r of n)r()}finally{wd(t),Ys(e)}}toString(){const t=[],e=this.records;for(const n of e.keys())t.push(pi(n));return`R3Injector[${t.join(", ")}]`}assertNotDestroyed(){if(this._destroyed)throw new pe(205,!1)}processProvider(t){let e=Lc(t=Pt(t))?t:Pt(t&&t.provide);const n=function Gp(i){return wi(i)?$o(void 0,i.useValue):$o(As(i),zp)}(t);if(Lc(t)||!0!==t.multi)this.records.get(e);else{let r=this.records.get(e);r||(r=$o(void 0,zp,!0),r.factory=()=>Yf(r.multi),this.records.set(e,r)),e=t,r.multi.push(t)}this.records.set(e,n)}hydrate(t,e){return e.value===zp&&(e.value=TD,e.value=e.factory()),"object"==typeof e.value&&e.value&&function RD(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=Pt(t.providedIn);return"string"==typeof e?"any"===e||this.scopes.has(e):this.injectorDefTypes.has(e)}}function kv(i){const t=Gf(i),e=null!==t?t.factory:Qa(i);if(null!==e)return e;if(i instanceof me)throw new pe(204,!1);if(i instanceof Function)return function nw(i){const t=i.length;if(t>0)throw Gd(t,"?"),new pe(204,!1);const e=function Xu(i){return i&&(i[xd]||i[m_])||null}(i);return null!==e?()=>e.factory(i):()=>new i}(i);throw new pe(204,!1)}function As(i,t,e){let n;if(Lc(i)){const r=Pt(i);return Qa(r)||kv(r)}if(wi(i))n=()=>Pt(i.useValue);else if(function Tv(i){return!(!i||!i.useFactory)}(i))n=()=>i.useFactory(...Yf(i.deps||[]));else if(function Pi(i){return!(!i||!i.useExisting)}(i))n=()=>ee(Pt(i.useExisting));else{const r=Pt(i&&(i.useClass||i.provide));if(!function ID(i){return!!i.deps}(i))return Qa(r)||kv(r);n=()=>new r(...Yf(i.deps))}return n}function $o(i,t,e=!1){return{factory:i,value:t,multi:e?[]:void 0}}function Pv(i,t){for(const e of i)Array.isArray(e)?Pv(e,t):e&&ju(e)?Pv(e.\u0275providers,t):t(e)}class PD{}class Ov{}class bo{resolveComponentFactory(t){throw function sl(i){const t=Error(`No component factory found for ${pi(i)}. Did you add it to @NgModule.entryComponents?`);return t.ngComponent=i,t}(t)}}let Hl=(()=>{class i{}return i.NULL=new bo,i})();function FD(){return Fn(Er(),Se())}function Fn(i,t){return new mt(Ei(i,t))}let mt=(()=>{class i{constructor(e){this.nativeElement=e}}return i.__NG_ELEMENT_ID__=FD,i})();function iw(i){return i instanceof mt?i.nativeElement:i}class Gl{}let ol=(()=>{class i{}return i.__NG_ELEMENT_ID__=()=>function LD(){const i=Se(),e=ws(Er().index,i);return(bs(e)?e:i)[yt]}(),i})(),ND=(()=>{class i{}return i.\u0275prov=ke({token:i,providedIn:"root",factory:()=>null}),i})();class Nc{constructor(t){this.full=t,this.major=t.split(".")[0],this.minor=t.split(".")[1],this.patch=t.split(".").slice(2).join(".")}}const BD=new Nc("15.2.10"),Fv={},Lv="ngOriginalError";function Nv(i){return i[Lv]}class al{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&&Nv(t);for(;e&&Nv(e);)e=Nv(e);return e||null}}function ll(i){return i instanceof Function?i():i}function sw(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 ow="ng-template";function jD(i,t,e){let n=0,r=!0;for(;ns?"":r[h+1].toLowerCase();const m=8&n?p:null;if(m&&-1!==sw(m,c,0)||2&n&&c!==p){if(Wo(n))return!1;o=!0}}}}else{if(!o&&!Wo(n)&&!Wo(l))return!1;if(o&&Wo(l))continue;o=!1,n=l|1&n}}return Wo(n)||o}function Wo(i){return 0==(1&i)}function aw(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&&!Wo(o)&&(t+=Bc(s,r),r=""),n=o,s=s||!Wo(n);e++}return""!==r&&(t+=Bc(s,r)),t}const sn={};function G(i){Hv(zn(),Se(),Xn()+i,!1)}function Hv(i,t,e,n){if(!n)if(3==(3&t[fn])){const s=i.preOrderCheckHooks;null!==s&&sp(t,s,e)}else{const s=i.preOrderHooks;null!==s&&op(t,s,0,e)}tl(e)}function dw(i,t=null,e=null,n){const r=uw(i,t,e,n);return r.resolveInjectorInitializers(),r}function uw(i,t=null,e=null,n,r=new Set){const s=[e||$n,AD(i)];return n=n||("object"==typeof i?void 0:pi(i)),new Hp(s,t||wh(),n||null,r)}let $i=(()=>{class i{static create(e,n){if(Array.isArray(e))return dw({name:""},n,e,"");{const r=e.name??"";return dw({name:r},e.parent,e.providers,r)}}}return i.THROW_IF_NOT_FOUND=Rl,i.NULL=new ew,i.\u0275prov=ke({token:i,providedIn:"any",factory:()=>ee(rl)}),i.__NG_ELEMENT_ID__=-1,i})();function E(i,t=Ot.Default){const e=Se();return null===e?ee(i,t):V_(Er(),e,Pt(i),t)}function xo(){throw new Error("invalid")}function _w(i,t){const e=i.contentQueries;if(null!==e)for(let n=0;nyi&&Hv(i,t,yi,!1),Qr(o?2:0,r),e(n,r)}finally{tl(s),Qr(o?3:1,r)}}function Zv(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,Ch(i,e,r.hostVars,sn),r)}function be(i,t,e,n,r,s){const o=Ei(i,t);!function Xe(i,t,e,n,r,s,o){if(null==s)i.removeAttribute(t,r,e);else{const a=null==o?Qt(s):o(s,n||"",r);i.setAttribute(t,r,a,e)}}(t[yt],o,s,i.value,e,n,r)}function vt(i,t,e,n,r,s){const o=s[t];if(null!==o){const a=n.setInput;for(let l=0;l0&&rs(e)}}function rs(i){for(let n=av(i);null!==n;n=lv(n))for(let r=Ui;r0&&rs(s)}const e=i[at].components;if(null!==e)for(let n=0;n0&&rs(r)}}function ss(i,t){const e=ws(t,i),n=e[at];(function io(i,t){for(let e=t.length;e-1&&(uv(t,n),pp(e,n))}this._attachedToViewContainer=!1}Rx(this._lView[at],this._lView)}onDestroy(t){bw(this._lView[at],this._lView,null,t)}markForCheck(){Ts(this._cdRefInjectingView||this._lView)}detach(){this._lView[fn]&=-65}reattach(){this._lView[fn]|=64}detectChanges(){wo(this._lView[at],this._lView,this.context)}checkNoChanges(){}attachToViewContainerRef(){if(this._appRef)throw new pe(902,!1);this._attachedToViewContainer=!0}detachFromAppRef(){this._appRef=null,function YA(i,t){bh(i,t,t[yt],2,null,null)}(this._lView[at],this._lView)}attachToAppRef(t){if(this._attachedToViewContainer)throw new pe(902,!1);this._appRef=t}}class y8 extends ny{constructor(t){super(t),this._view=t}detectChanges(){const t=this._view;wo(t[at],t,t[Be],!1)}checkNoChanges(){}get context(){return null}}class KF extends Hl{constructor(t){super(),this.ngModule=t}resolveComponentFactory(t){const e=Hn(t);return new iy(e,this.ngModule)}}function ZF(i){const t=[];for(let e in i)i.hasOwnProperty(e)&&t.push({propName:i[e],templateName:e});return t}class x8{constructor(t,e){this.injector=t,this.parentInjector=e}get(t,e,n){n=jf(n);const r=this.injector.get(t,Fv,n);return r!==Fv||e===Fv?r:this.parentInjector.get(t,e,n)}}class iy extends Ov{get inputs(){return ZF(this.componentDef.inputs)}get outputs(){return ZF(this.componentDef.outputs)}constructor(t,e){super(),this.componentDef=t,this.ngModule=e,this.componentType=t.type,this.selector=function e1(i){return i.map(JD).join(",")}(t.selectors),this.ngContentSelectors=t.ngContentSelectors?t.ngContentSelectors:[],this.isBoundToModule=!!e}create(t,e,n,r){let s=(r=r||this.ngModule)instanceof to?r:r?.injector;s&&null!==this.componentDef.getStandaloneInjector&&(s=this.componentDef.getStandaloneInjector(s)||s);const o=s?new x8(t,s):t,a=o.get(Gl,null);if(null===a)throw new pe(407,!1);const l=o.get(ND,null),c=a.createRenderer(null,this.componentDef),d=this.componentDef.selectors[0][0]||"div",h=n?function M1(i,t,e){return i.selectRootElement(t,e===qs.ShadowDom)}(c,n,this.componentDef.encapsulation):Ep(c,d,function b8(i){const t=i.toLowerCase();return"svg"===t?kd:"math"===t?"math":null}(d)),p=this.componentDef.onPush?288:272,m=ey(0,null,null,1,0,null,null,null,null,null),g=Mh(null,m,null,p,null,null,a,c,l,o,null);let b,v;rp(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 M8(i,t){const e=i[at],n=yi;return i[n]=t,Zd(e,n,2,"#host",null)}(g,h),F=function C8(i,t,e,n,r,s,o,a){const l=r[at];!function S8(i,t,e,n){for(const r of i)t.mergedAttrs=Sc(t.mergedAttrs,r.hostAttrs);null!==t.mergedAttrs&&(Cw(t,t.mergedAttrs,!0),null!==e&&Gx(n,e,t))}(n,i,t,o);const c=s.createRenderer(t,e),d=Mh(r,yw(e),null,e.onPush?32:16,r[i.index],i,s,c,a||null,null,null);return l.firstCreatePass&&P(l,i,n.length-1),Di(r,d),r[i.index]=d}(C,h,y,M,g,a,c);v=B0(m,yi),h&&function A8(i,t,e,n){if(n)L_(i,e,["ng-version",BD.full]);else{const{attrs:r,classes:s}=function t1(i){const t=[],e=[];let n=1,r=2;for(;n0&&Hx(i,e,s.join(" "))}}(c,y,h,n),void 0!==e&&function D8(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=Sc(r.hostAttrs,e=Sc(e,r.hostAttrs))}}(n)}function P1(i){return i===Xa?{}:i===$n?[]:i}function R8(i,t){const e=i.viewQuery;i.viewQuery=e?(n,r)=>{t(n,r),e(n,r)}:t}function k8(i,t){const e=i.contentQueries;i.contentQueries=e?(n,r,s)=>{t(n,r,s),e(n,r,s)}:t}function P8(i,t){const e=i.hostBindings;i.hostBindings=e?(n,r)=>{t(n,r),e(n,r)}:t}function Ew(i){return!!O1(i)&&(Array.isArray(i)||!(i instanceof Map)&&Symbol.iterator in i)}function O1(i){return null!==i&&("function"==typeof i||"object"==typeof i)}function $l(i,t,e){return i[t]=e}function Is(i,t,e){return!Object.is(i[t],e)&&(i[t]=e,!0)}function Eh(i,t,e,n){const r=Is(i,t,e);return Is(i,t+1,n)||r}function Dt(i,t,e,n){const r=Se();return Is(r,Fl(),t)&&(zn(),be(Ai(),r,i,t,e,n)),Dt}function jp(i,t,e,n){return Is(i,Fl(),e)?t+Qt(e)+n:sn}function Yp(i,t,e,n,r,s){const a=Eh(i,function Ja(){return kt.lFrame.bindingIndex}(),e,r);return Ks(2),a?t+Qt(e)+n+Qt(r)+s:sn}function fe(i,t,e,n,r,s,o,a){const l=Se(),c=zn(),d=i+yi,h=c.firstCreatePass?function G8(i,t,e,n,r,s,o,a,l){const c=t.consts,d=Zd(t,i,4,o||null,Ol(c,a));ty(t,e,d,Ol(c,l)),Nd(t,d);const h=d.tView=ey(2,d,n,r,s,t.directiveRegistry,t.pipeRegistry,null,t.schemas,c);return null!==t.queries&&(t.queries.template(t,d),h.queries=t.queries.embeddedTView(d)),d}(d,c,l,t,e,n,r,s,o):c.data[d];ma(h,!1);const p=l[yt].createComment("");yh(c,l,p,h),Hr(p,l),Di(l,l[d]=mn(p,l,p,h)),bc(h)&&Qv(c,l,h),null!=o&&Jv(l,h,a)}function Zi(i){return Od(function gA(){return kt.lFrame.contextLView}(),yi+i)}function U(i,t,e){const n=Se();return Is(n,Fl(),t)&&no(zn(),Ai(),n,i,t,n[yt],e,!1),U}function F1(i,t,e,n,r){const o=r?"class":"style";k1(i,e,t.inputs[o],o,n)}function W(i,t,e,n){const r=Se(),s=zn(),o=yi+i,a=r[yt],l=s.firstCreatePass?function W8(i,t,e,n,r,s){const o=t.consts,l=Zd(t,i,2,n,Ol(o,r));return ty(t,e,l,Ol(o,s)),null!==l.attrs&&Cw(l,l.attrs,!1),null!==l.mergedAttrs&&Cw(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]=Ep(a,t,function Y0(){return kt.lFrame.currentNamespace}()),d=bc(l);return ma(l,!0),Gx(a,c,l),32!=(32&l.flags)&&yh(s,r,c,l),0===function uA(){return kt.lFrame.elementDepthCount}()&&Hr(c,r),function hA(){kt.lFrame.elementDepthCount++}(),d&&(Qv(s,r,l),Zv(s,l,r)),null!==n&&Jv(r,l),W}function j(){let i=Er();D_()?T_():(i=i.parent,ma(i,!1));const t=i;!function fA(){kt.lFrame.elementDepthCount--}();const e=zn();return e.firstCreatePass&&(Nd(e,i),Qf(i)&&e.queries.elementEnd(i)),null!=t.classesWithoutHost&&function wA(i){return 0!=(8&i.flags)}(t)&&F1(e,t,Se(),t.classesWithoutHost,!0),null!=t.stylesWithoutHost&&function F_(i){return 0!=(16&i.flags)}(t)&&F1(e,t,Se(),t.stylesWithoutHost,!1),j}function De(i,t,e,n){return W(i,t,e,n),j(),De}function Gr(i,t,e){const n=Se(),r=zn(),s=i+yi,o=r.firstCreatePass?function j8(i,t,e,n,r){const s=t.consts,o=Ol(s,n),a=Zd(t,i,8,"ng-container",o);return null!==o&&Cw(a,o,!0),ty(t,e,a,Ol(s,r)),null!==t.queries&&t.queries.elementStart(t,a),a}(s,r,n,t,e):r.data[s];ma(o,!0);const a=n[s]=n[yt].createComment("");return yh(r,n,a,o),Hr(a,n),bc(o)&&(Qv(r,n,o),Zv(r,o,n)),null!=e&&Jv(n,o),Gr}function $r(){let i=Er();const t=zn();return D_()?T_():(i=i.parent,ma(i,!1)),t.firstCreatePass&&(Nd(t,i),Qf(i)&&t.queries.elementEnd(i)),$r}function sy(i,t,e){return Gr(i,t,e),$r(),sy}function di(){return Se()}function oy(i){return!!i&&"function"==typeof i.then}function uL(i){return!!i&&"function"==typeof i.subscribe}const L1=uL;function Ue(i,t,e,n){const r=Se(),s=zn(),o=Er();return hL(s,r,r[yt],o,i,t,n),Ue}function N1(i,t){const e=Er(),n=Se(),r=zn();return hL(r,n,qF(rh(r.data),e,n),e,i,t),N1}function hL(i,t,e,n,r,s,o){const a=bc(n),c=i.firstCreatePass&&YF(i),d=t[Be],h=jF(t);let p=!0;if(3&n.type||o){const b=Ei(n,t),v=o?o(b):b,y=h.length,M=o?C=>o(I(C[n.index])):n.index;let x=null;if(!o&&a&&(x=function Y8(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=pL(n,t,d,s,!1);const C=e.listen(v,r,s);h.push(s,C),c&&c.push(r,M,y,y+1)}}else s=pL(n,t,d,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?ws(i.index,t):t);let l=fL(t,e,n,o),c=s.__ngNextListenerFn__;for(;c;)l=fL(t,e,c,o)&&l,c=c.__ngNextListenerFn__;return r&&!1===l&&(o.preventDefault(),o.returnValue=!1),l}}function he(i=1){return function yA(i){return(kt.lFrame.contextLView=function j0(i,t){for(;i>0;)t=t[Sr],i--;return t}(i,kt.lFrame.contextLView))[Be]}(i)}function q8(i,t){let e=null;const n=function XD(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 V1(i){return 2|i}function Ah(i){return(131068&i)>>2}function z1(i,t){return-131069&i|t<<2}function H1(i){return 1|i}function ML(i,t,e,n,r){const s=i[e+1],o=null===t;let a=n?Jd(s):Ah(s),l=!1;for(;0!==a&&(!1===l||o);){const d=i[a+1];eW(i[a],t)&&(l=!0,i[a+1]=n?H1(d):V1(d)),a=n?Jd(d):Ah(d)}l&&(i[e+1]=n?V1(s):H1(s))}function eW(i,t){return null===i||null==t||(Array.isArray(i)?i[1]:i)===t||!(!Array.isArray(i)||"string"!=typeof t)&&Ic(i,t)>=0}const Ir={textEnd:0,key:0,keyEnd:0,value:0,valueEnd:0};function CL(i){return i.substring(Ir.key,Ir.keyEnd)}function SL(i,t){const e=Ir.textEnd;return e===t?-1:(t=Ir.keyEnd=function rW(i,t,e){for(;t32;)t++;return t}(i,Ir.key=t,e),em(i,t,e))}function em(i,t,e){for(;t=0;e=SL(t,e))Cs(i,CL(t),!0)}function cl(i,t,e,n){const r=Se(),s=zn(),o=Ks(2);s.firstUpdatePass&&RL(s,i,o,n),t!==sn&&Is(r,o,t)&&PL(s,s.data[Xn()],r,r[yt],i,r[o+1]=function gW(i,t){return null==i||""===i||("string"==typeof t?i+=t:"object"==typeof i&&(i=pi(Js(i)))),i}(t,e),n,o)}function IL(i,t){return t>=i.expandoStartIndex}function RL(i,t,e,n){const r=i.data;if(null===r[e+1]){const s=r[Xn()],o=IL(i,e);FL(s,n)&&null===t&&!o&&(t=!1),t=function cW(i,t,e,n){const r=rh(i);let s=n?t.residualClasses:t.residualStyles;if(null===r)0===(n?t.classBindings:t.styleBindings)&&(e=ay(e=G1(null,i,t,e,n),t.attrs,n),s=null);else{const o=t.directiveStylingLast;if(-1===o||i[o]!==r)if(e=G1(r,i,t,e,n),null===s){let l=function dW(i,t,e){const n=e?t.classBindings:t.styleBindings;if(0!==Ah(n))return i[Jd(n)]}(i,t,n);void 0!==l&&Array.isArray(l)&&(l=G1(null,i,t,l[1],n),l=ay(l,t.attrs,n),function uW(i,t,e,n){i[Jd(e?t.classBindings:t.styleBindings)]=n}(i,t,n,l))}else s=function hW(i,t,e){let n;const r=t.directiveEnd;for(let s=1+t.directiveStylingLast;s0)&&(c=!0)):d=e,r)if(0!==l){const p=Jd(i[a+1]);i[n+1]=Dw(p,a),0!==p&&(i[p+1]=z1(i[p+1],n)),i[a+1]=function K8(i,t){return 131071&i|t<<17}(i[a+1],n)}else i[n+1]=Dw(a,0),0!==a&&(i[a+1]=z1(i[a+1],n)),a=n;else i[n+1]=Dw(l,0),0===a?a=n:i[l+1]=z1(i[l+1],n),l=n;c&&(i[n+1]=V1(i[n+1])),ML(i,d,n,!0),ML(i,d,n,!1),function J8(i,t,e,n,r){const s=r?i.residualClasses:i.residualStyles;null!=s&&"string"==typeof t&&Ic(s,t)>=0&&(e[n+1]=H1(e[n+1]))}(t,d,i,n,s),o=Dw(a,l),s?t.classBindings=o:t.styleBindings=o}(r,s,t,e,o,n)}}function G1(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),d=c?l[1]:l,h=null===d;let p=e[r+1];p===sn&&(p=h?$n:void 0);let m=h?Wd(p,n):d===n?p:void 0;if(c&&!Tw(m)&&(m=Wd(l,n)),Tw(m)&&(a=m,o))return a;const g=i[r+1];r=o?Jd(g):Ah(g)}if(null!==t){let l=s?t.residualClasses:t.residualStyles;null!=l&&(a=Wd(l,n))}return a}function Tw(i){return void 0!==i}function FL(i,t){return 0!=(i.flags&(t?8:16))}function Ve(i,t=""){const e=Se(),n=zn(),r=i+yi,s=n.firstCreatePass?Zd(n,r,1,t,null):n.data[r],o=e[r]=function cv(i,t){return i.createText(t)}(e[yt],t);yh(n,e,o,s),ma(s,!1)}function _i(i){return Qi("",i,""),_i}function Qi(i,t,e){const n=Se(),r=jp(n,i,t,e);return r!==sn&&Uc(n,Xn(),r),Qi}function tm(i,t,e,n,r){const s=Se(),o=Yp(s,i,t,e,n,r);return o!==sn&&Uc(s,Xn(),o),tm}function GL(i,t,e){!function dl(i,t,e,n){const r=zn(),s=Ks(2);r.firstUpdatePass&&RL(r,null,s,n);const o=Se();if(e!==sn&&Is(o,s,e)){const a=r.data[Xn()];if(FL(a,n)&&!IL(r,s)){let l=n?a.classesWithoutHost:a.stylesWithoutHost;null!==l&&(e=Vf(l,e||"")),F1(r,a,o,e,n)}else!function mW(i,t,e,n,r,s,o,a){r===sn&&(r=$n);let l=0,c=0,d=0((rt=rt||{})[rt.LocaleId=0]="LocaleId",rt[rt.DayPeriodsFormat=1]="DayPeriodsFormat",rt[rt.DayPeriodsStandalone=2]="DayPeriodsStandalone",rt[rt.DaysFormat=3]="DaysFormat",rt[rt.DaysStandalone=4]="DaysStandalone",rt[rt.MonthsFormat=5]="MonthsFormat",rt[rt.MonthsStandalone=6]="MonthsStandalone",rt[rt.Eras=7]="Eras",rt[rt.FirstDayOfWeek=8]="FirstDayOfWeek",rt[rt.WeekendRange=9]="WeekendRange",rt[rt.DateFormat=10]="DateFormat",rt[rt.TimeFormat=11]="TimeFormat",rt[rt.DateTimeFormat=12]="DateTimeFormat",rt[rt.NumberSymbols=13]="NumberSymbols",rt[rt.NumberFormats=14]="NumberFormats",rt[rt.CurrencyCode=15]="CurrencyCode",rt[rt.CurrencySymbol=16]="CurrencySymbol",rt[rt.CurrencyName=17]="CurrencyName",rt[rt.Currencies=18]="Currencies",rt[rt.Directionality=19]="Directionality",rt[rt.PluralCase=20]="PluralCase",rt[rt.ExtraData=21]="ExtraData",rt))();const im="en-US";let t2=im;function j1(i,t,e,n,r){if(i=Pt(i),Array.isArray(i))for(let s=0;s>20;if(Lc(i)||!i.multi){const m=new Bd(l,r,E),g=q1(a,t,r?d:d+p,h);-1===g?(pn(ah(c,o),s,a),Y1(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=q1(a,t,d+p,h),g=q1(a,t,d,d+p),v=g>=0&&e[g];if(r&&!v||!r&&!(m>=0&&e[m])){pn(ah(c,o),s,a);const y=function Pj(i,t,e,n,r){const s=new Bd(i,e,E);return s.multi=[],s.index=t,s.componentProviders=0,A2(s,r,n&&!e),s}(r?kj:Rj,e.length,r,n,l);!r&&v&&(e[g].providerFactory=y),Y1(s,i,t.length,0),t.push(a),c.directiveStart++,c.directiveEnd++,r&&(c.providerIndexes+=1048576),e.push(y),o.push(y)}else Y1(s,i,m>-1?m:g,A2(e[r?g:m],l,!r&&n));!r&&n&&v&&e[g].componentProviders++}}}function Y1(i,t,e,n){const r=Lc(t),s=function DD(i){return!!i.useClass}(t);if(r||s){const l=(s?Pt(t.useClass):t).prototype.ngOnDestroy;if(l){const c=i.destroyHooks||(i.destroyHooks=[]);if(!r&&t.multi){const d=c.indexOf(e);-1===d?c.push(e,[n,l]):c[d+1].push(n,l)}else c.push(e,l)}}}function A2(i,t,e){return e&&i.componentProviders++,i.multi.push(t)-1}function q1(i,t,e,n){for(let r=e;r{e.providersResolver=(n,r)=>function Ij(i,t,e){const n=zn();if(n.firstCreatePass){const r=_o(i);j1(e,n.data,n.blueprint,r,!0),j1(t,n.data,n.blueprint,r,!1)}}(n,r?r(i):i,t)}}class rm{}class D2{}class T2 extends rm{constructor(t,e){super(),this._parent=e,this._bootstrapComponents=[],this.destroyCbs=[],this.componentFactoryResolver=new KF(this);const n=ur(t);this._bootstrapComponents=ll(n.bootstrap),this._r3Injector=uw(t,e,[{provide:rm,useValue:this},{provide:Hl,useValue:this.componentFactoryResolver}],pi(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 K1 extends D2{constructor(t){super(),this.moduleType=t}create(t){return new T2(this.moduleType,t)}}class Fj extends rm{constructor(t,e,n){super(),this.componentFactoryResolver=new KF(this),this.instance=null;const r=new Hp([...t,{provide:rm,useValue:this},{provide:Hl,useValue:this.componentFactoryResolver}],e||wh(),n,new Set(["environment"]));this.injector=r,r.resolveInjectorInitializers()}destroy(){this.injector.destroy()}onDestroy(t){this.injector.onDestroy(t)}}function Fw(i,t,e=null){return new Fj(i,t,e).injector}let Lj=(()=>{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=tw(0,e.type),r=n.length>0?Fw([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=ke({token:i,providedIn:"environment",factory:()=>new i(ee(to))}),i})();function Z1(i){i.getStandaloneInjector=t=>t.get(Lj).getOrCreateStandaloneInjector(i)}function so(i,t,e){const n=Vr()+i,r=Se();return r[n]===sn?$l(r,n,e?t.call(e):t()):function ry(i,t){return i[t]}(r,n)}function sm(i,t,e,n){return N2(Se(),Vr(),i,t,e,n)}function L2(i,t,e,n,r,s,o){return function V2(i,t,e,n,r,s,o,a,l){const c=t+e;return function Sa(i,t,e,n,r,s){const o=Eh(i,t,e,n);return Eh(i,t+2,r,s)||o}(i,c,r,s,o,a)?$l(i,c+4,l?n.call(l,r,s,o,a):n(r,s,o,a)):fy(i,c+4)}(Se(),Vr(),i,t,e,n,r,s,o)}function fy(i,t){const e=i[t];return e===sn?void 0:e}function N2(i,t,e,n,r,s){const o=t+e;return Is(i,o,r)?$l(i,o+1,s?n.call(s,r):n(r)):fy(i,o+1)}function Ct(i,t){const e=zn();let n;const r=i+yi;e.firstCreatePass?(n=function Qj(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=Qa(n.type)),o=Ys(E);try{const a=cp(!1),l=s();return cp(a),function $8(i,t,e,n){e>=i.data.length&&(i.data[e]=null,i.blueprint[e]=null),t[e]=n}(e,Se(),r,l),l}finally{Ys(o)}}function Tt(i,t,e){const n=i+yi,r=Se(),s=Od(r,n);return py(r,n)?N2(r,Vr(),t,s.transform,e,s):s.transform(e)}function J1(i,t,e,n){const r=i+yi,s=Se(),o=Od(s,r);return py(s,r)?function B2(i,t,e,n,r,s,o){const a=t+e;return Eh(i,a,r,s)?$l(i,a+2,o?n.call(o,r,s):n(r,s)):fy(i,a+2)}(s,Vr(),t,o.transform,e,n,o):o.transform(e,n)}function py(i,t){return i[at].data[t].pure}function eT(i){return t=>{setTimeout(i,void 0,t)}}const We=class n6 extends Re{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=eT(s),r&&(r=eT(r)),o&&(o=eT(o)));const a=super.subscribe({next:r,error:s,complete:o});return t instanceof Zt&&t.add(a),a}};function r6(){return this._results[Symbol.iterator]()}class om{get changes(){return this._changes||(this._changes=new We)}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=om.prototype;e[Symbol.iterator]||(e[Symbol.iterator]=r6)}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 Ar(i){return i.flat(Number.POSITIVE_INFINITY)}(t);(this._changesDetected=!function fp(i,t,e){if(i.length!==t.length)return!1;for(let n=0;n{class i{}return i.__NG_ELEMENT_ID__=a6,i})();const s6=Mo,o6=class extends s6{constructor(t,e,n){super(),this._declarationLView=t,this._declarationTContainer=e,this.elementRef=n}createEmbeddedView(t,e){const n=this._declarationTContainer.tView,r=Mh(this._declarationLView,n,t,16,null,n.declTNode,null,null,null,null,e||null);r[nh]=this._declarationLView[this._declarationTContainer.index];const o=this._declarationLView[Xs];return null!==o&&(r[Xs]=o.createEmbeddedView(n)),Sh(n,r,t),new ny(r)}};function a6(){return Lw(Er(),Se())}function Lw(i,t){return 4&i.type?new o6(t,i,Fn(i,t)):null}let Wr=(()=>{class i{}return i.__NG_ELEMENT_ID__=l6,i})();function l6(){return $2(Er(),Se())}const c6=Wr,H2=class extends c6{constructor(t,e,n){super(),this._lContainer=t,this._hostTNode=e,this._hostLView=n}get element(){return Fn(this._hostTNode,this._hostLView)}get injector(){return new Ac(this._hostTNode,this._hostLView)}get parentInjector(){const t=ch(this._hostTNode,this._hostLView);if(lp(t)){const e=oh(t,this._hostLView),n=sh(t);return new Ac(e[at].data[n+8],e)}return new Ac(null,this._hostLView)}clear(){for(;this.length>0;)this.remove(this.length-1)}get(t){const e=G2(this._lContainer);return null!==e&&e[t]||null}get length(){return this._lContainer.length-Ui}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 hh(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 iy(Hn(t)),c=n||this.parentInjector;if(!s&&null==l.ngModule){const p=(o?c:this.parentInjector).get(to,null);p&&(s=p)}const d=l.create(c,r,void 0,s);return this.insert(d.hostView,a),d}insert(t,e){const n=t._lView,r=n[at];if(function dA(i){return xs(i[Bi])}(n)){const d=this.indexOf(t);if(-1!==d)this.detach(d);else{const h=n[Bi],p=new H2(h,h[ue],h[Bi]);p.detach(p.indexOf(t))}}const s=this._adjustIndex(e),o=this._lContainer;!function dv(i,t,e,n){const r=Ui+n,s=e.length;n>0&&(e[r-1][ys]=t),n0)n.push(o[a/2]);else{const c=s[a+1],d=t[-l];for(let h=Ui;h{class i{constructor(e){this.appInits=e,this.resolve=Bw,this.reject=Bw,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)(ee(Uw,8))},i.\u0275prov=ke({token:i,factory:i.\u0275fac,providedIn:"root"}),i})();const cm=new me("AppId",{providedIn:"root",factory:function fN(){return`${hT()}${hT()}${hT()}`}});function hT(){return String.fromCharCode(97+Math.floor(25*Math.random()))}const pN=new me("Platform Initializer"),fT=new me("Platform ID",{providedIn:"platform",factory:()=>"unknown"}),Rr=new me("AnimationModuleType");let F6=(()=>{class i{log(e){console.log(e)}warn(e){console.warn(e)}}return i.\u0275fac=function(e){return new(e||i)},i.\u0275prov=ke({token:i,factory:i.\u0275fac,providedIn:"platform"}),i})();const ql=new me("LocaleId",{providedIn:"root",factory:()=>Ft(ql,Ot.Optional|Ot.SkipSelf)||function L6(){return typeof $localize<"u"&&$localize.locale||im}()});class B6{constructor(t,e){this.ngModuleFactory=t,this.componentFactories=e}}let mN=(()=>{class i{compileModuleSync(e){return new K1(e)}compileModuleAsync(e){return Promise.resolve(this.compileModuleSync(e))}compileModuleAndAllComponentsSync(e){const n=this.compileModuleSync(e),s=ll(ur(e).declarations).reduce((o,a)=>{const l=Hn(a);return l&&o.push(new iy(l)),o},[]);return new B6(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=ke({token:i,factory:i.\u0275fac,providedIn:"root"}),i})();const z6=(()=>Promise.resolve(0))();function pT(i){typeof Zone>"u"?z6.then(()=>{i&&i.apply(null,null)}):Zone.current.scheduleMicroTask("scheduleMicrotask",i)}class ft{constructor({enableLongStackTrace:t=!1,shouldCoalesceEventChangeDetection:e=!1,shouldCoalesceRunChangeDetection:n=!1}){if(this.hasPendingMacrotasks=!1,this.hasPendingMicrotasks=!1,this.isStable=!0,this.onUnstable=new We(!1),this.onMicrotaskEmpty=new We(!1),this.onStable=new We(!1),this.onError=new We(!1),typeof Zone>"u")throw new pe(908,!1);Zone.assertZonePatched();const r=this;r._nesting=0,r._outer=r._inner=Zone.current,Zone.TaskTrackingZoneSpec&&(r._inner=r._inner.fork(new Zone.TaskTrackingZoneSpec)),t&&Zone.longStackTraceZoneSpec&&(r._inner=r._inner.fork(Zone.longStackTraceZoneSpec)),r.shouldCoalesceEventChangeDetection=!n&&e,r.shouldCoalesceRunChangeDetection=n,r.lastRequestAnimationFrameId=-1,r.nativeRequestAnimationFrame=function H6(){let i=Rn.requestAnimationFrame,t=Rn.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 W6(i){const t=()=>{!function $6(i){i.isCheckStableRunning||-1!==i.lastRequestAnimationFrameId||(i.lastRequestAnimationFrameId=i.nativeRequestAnimationFrame.call(Rn,()=>{i.fakeTopEventTask||(i.fakeTopEventTask=Zone.root.scheduleEventTask("fakeTopEventTask",()=>{i.lastRequestAnimationFrameId=-1,gT(i),i.isCheckStableRunning=!0,mT(i),i.isCheckStableRunning=!1},void 0,()=>{},()=>{})),i.fakeTopEventTask.invoke()}),gT(i))}(i)};i._inner=i._inner.fork({name:"angular",properties:{isAngularZone:!0},onInvokeTask:(e,n,r,s,o,a)=>{try{return vN(i),e.invokeTask(r,s,o,a)}finally{(i.shouldCoalesceEventChangeDetection&&"eventTask"===s.type||i.shouldCoalesceRunChangeDetection)&&t(),yN(i)}},onInvoke:(e,n,r,s,o,a,l)=>{try{return vN(i),e.invoke(r,s,o,a,l)}finally{i.shouldCoalesceRunChangeDetection&&t(),yN(i)}},onHasTask:(e,n,r,s)=>{e.hasTask(r,s),n===r&&("microTask"==s.change?(i._hasPendingMicrotasks=s.microTask,gT(i),mT(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(!ft.isInAngularZone())throw new pe(909,!1)}static assertNotInAngularZone(){if(ft.isInAngularZone())throw new pe(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,G6,Bw,Bw);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 G6={};function mT(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 gT(i){i.hasPendingMicrotasks=!!(i._hasPendingMicrotasks||(i.shouldCoalesceEventChangeDetection||i.shouldCoalesceRunChangeDetection)&&-1!==i.lastRequestAnimationFrameId)}function vN(i){i._nesting++,i.isStable&&(i.isStable=!1,i.onUnstable.emit(null))}function yN(i){i._nesting--,mT(i)}class j6{constructor(){this.hasPendingMicrotasks=!1,this.hasPendingMacrotasks=!1,this.isStable=!0,this.onUnstable=new We,this.onMicrotaskEmpty=new We,this.onStable=new We,this.onError=new We}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 bN=new me(""),zw=new me("");let yT,_T=(()=>{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,yT||(function Y6(i){yT=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:()=>{ft.assertNotInAngularZone(),pT(()=>{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())pT(()=>{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)(ee(ft),ee(vT),ee(zw))},i.\u0275prov=ke({token:i,factory:i.\u0275fac}),i})(),vT=(()=>{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 yT?.findTestabilityInTree(this,e,n)??null}}return i.\u0275fac=function(e){return new(e||i)},i.\u0275prov=ke({token:i,factory:i.\u0275fac,providedIn:"platform"}),i})();const zc=!1;let eu=null;const xN=new me("AllowMultipleToken"),bT=new me("PlatformDestroyListeners"),wN=new me("appBootstrapListener");class MN{constructor(t,e){this.name=t,this.token=e}}function SN(i,t,e=[]){const n=`Platform: ${t}`,r=new me(n);return(s=[])=>{let o=xT();if(!o||o.injector.get(xN,!1)){const a=[...e,...s,{provide:r,useValue:!0}];i?i(a):function K6(i){if(eu&&!eu.get(xN,!1))throw new pe(400,!1);eu=i;const t=i.get(AN);(function CN(i){const t=i.get(pN,null);t&&t.forEach(e=>e())})(i)}(function EN(i=[],t){return $i.create({name:t,providers:[{provide:Iv,useValue:"platform"},{provide:bT,useValue:new Set([()=>eu=null])},...i]})}(a,n))}return function Q6(i){const t=xT();if(!t)throw new pe(401,!1);return t}()}}function xT(){return eu?.get(AN)??null}let AN=(()=>{class i{constructor(e){this._injector=e,this._modules=[],this._destroyListeners=[],this._destroyed=!1}bootstrapModuleFactory(e,n){const r=function TN(i,t){let e;return e="noop"===i?new j6:("zone.js"===i?void 0:i)||new ft(t),e}(n?.ngZone,function DN(i){return{enableLongStackTrace:!1,shouldCoalesceEventChangeDetection:!(!i||!i.ngZoneEventCoalescing)||!1,shouldCoalesceRunChangeDetection:!(!i||!i.ngZoneRunCoalescing)||!1}}(n)),s=[{provide:ft,useValue:r}];return r.run(()=>{const o=$i.create({providers:s,parent:this.injector,name:e.moduleType.name}),a=e.create(o),l=a.injector.get(al,null);if(!l)throw new pe(402,!1);return r.runOutsideAngular(()=>{const c=r.onError.subscribe({next:d=>{l.handleError(d)}});a.onDestroy(()=>{Hw(this._modules,a),c.unsubscribe()})}),function IN(i,t,e){try{const n=e();return oy(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(Vw);return c.runInitializers(),c.donePromise.then(()=>(function n2(i){En(i,"Expected localeId to be defined"),"string"==typeof i&&(t2=i.toLowerCase().replace(/_/g,"-"))}(a.injector.get(ql,im)||im),this._moduleDoBootstrap(a),a))})})}bootstrapModule(e,n=[]){const r=RN({},n);return function q6(i,t,e){const n=new K1(e);return Promise.resolve(n)}(0,0,e).then(s=>this.bootstrapModuleFactory(s,r))}_moduleDoBootstrap(e){const n=e.injector.get(dm);if(e._bootstrapComponents.length>0)e._bootstrapComponents.forEach(r=>n.bootstrap(r));else{if(!e.instance.ngDoBootstrap)throw new pe(-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 pe(404,!1);this._modules.slice().forEach(n=>n.destroy()),this._destroyListeners.forEach(n=>n());const e=this._injector.get(bT,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)(ee($i))},i.\u0275prov=ke({token:i,factory:i.\u0275fac,providedIn:"platform"}),i})();function RN(i,t){return Array.isArray(t)?t.reduce(RN,i):{...i,...t}}let dm=(()=>{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 In(a=>{this._stable=this._zone.isStable&&!this._zone.hasPendingMacrotasks&&!this._zone.hasPendingMicrotasks,this._zone.runOutsideAngular(()=>{a.next(this._stable),a.complete()})}),o=new In(a=>{let l;this._zone.runOutsideAngular(()=>{l=this._zone.onStable.subscribe(()=>{ft.assertNotInAngularZone(),pT(()=>{!this._stable&&!this._zone.hasPendingMacrotasks&&!this._zone.hasPendingMicrotasks&&(this._stable=!0,a.next(!0))})})});const c=this._zone.onUnstable.subscribe(()=>{ft.assertInAngularZone(),this._stable&&(this._stable=!1,this._zone.runOutsideAngular(()=>{a.next(!1)}))});return()=>{l.unsubscribe(),c.unsubscribe()}});this.isStable=Mr(s,o.pipe(Uf()))}bootstrap(e,n){const r=e instanceof Ov;if(!this._injector.get(Vw).done){!r&&function Sd(i){const t=Hn(i)||Ur(i)||vs(i);return null!==t&&t.standalone}(e);throw new pe(405,zc)}let o;o=r?e:this._injector.get(Hl).resolveComponentFactory(e),this.componentTypes.push(o.componentType);const a=function X6(i){return i.isBoundToModule}(o)?void 0:this._injector.get(rm),c=o.create($i.NULL,[],n||o.selector,a),d=c.location.nativeElement,h=c.injector.get(bN,null);return h?.registerApplication(d),c.onDestroy(()=>{this.detachView(c.hostView),Hw(this.components,c),h?.unregisterApplication(d)}),this._loadComponent(c),c}tick(){if(this._runningTick)throw new pe(101,!1);try{this._runningTick=!0;for(let e of this._views)e.detectChanges()}catch(e){this._zone.runOutsideAngular(()=>this._exceptionHandler.handleError(e))}finally{this._runningTick=!1}}attachView(e){const n=e;this._views.push(n),n.attachToAppRef(this)}detachView(e){const n=e;Hw(this._views,n),n.detachFromAppRef()}_loadComponent(e){this.attachView(e.hostView),this.tick(),this.components.push(e);const n=this._injector.get(wN,[]);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),()=>Hw(this._destroyListeners,e)}destroy(){if(this._destroyed)throw new pe(406,!1);const e=this._injector;e.destroy&&!e.destroyed&&e.destroy()}get viewCount(){return this._views.length}warnIfDestroyed(){}}return i.\u0275fac=function(e){return new(e||i)(ee(ft),ee(to),ee(al))},i.\u0275prov=ke({token:i,factory:i.\u0275fac,providedIn:"root"}),i})();function Hw(i,t){const e=i.indexOf(t);e>-1&&i.splice(e,1)}let Zn=(()=>{class i{}return i.__NG_ELEMENT_ID__=e9,i})();function e9(i){return function t9(i,t,e){if(Ad(i)&&!e){const n=ws(i.index,t);return new ny(n,n)}return 47&i.type?new ny(t[rr],t):null}(Er(),Se(),16==(16&i))}class LN{constructor(){}supports(t){return Ew(t)}create(t){return new l9(t)}}const a9=(i,t)=>t;class l9{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||a9}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 c9(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 NN),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 NN),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 c9{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 d9{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 NN{constructor(){this.map=new Map}put(t){const e=t.trackById;let n=this.map.get(e);n||(n=new d9,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 BN(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 h9(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 h9{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 VN(){return new Ww([new LN])}let Ww=(()=>{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||VN()),deps:[[i,new xa,new Ss]]}}find(e){const n=this.factories.find(r=>r.supports(e));if(null!=n)return n;throw new pe(901,!1)}}return i.\u0275prov=ke({token:i,providedIn:"root",factory:VN}),i})();function zN(){return new gy([new UN])}let gy=(()=>{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||zN()),deps:[[i,new xa,new Ss]]}}find(e){const n=this.factories.find(r=>r.supports(e));if(n)return n;throw new pe(901,!1)}}return i.\u0275prov=ke({token:i,providedIn:"root",factory:zN}),i})();const m9=SN(null,"core",[]);let g9=(()=>{class i{constructor(e){}}return i.\u0275fac=function(e){return new(e||i)(ee(dm))},i.\u0275mod=nn({type:i}),i.\u0275inj=Kt({}),i})();let ET=null;function Hc(){return ET}class y9{}const jt=new me("DocumentToken");let AT=(()=>{class i{historyGo(e){throw new Error("Not implemented")}}return i.\u0275fac=function(e){return new(e||i)},i.\u0275prov=ke({token:i,factory:function(){return function b9(){return ee(HN)}()},providedIn:"platform"}),i})();const x9=new me("Location Initialized");let HN=(()=>{class i extends AT{constructor(e){super(),this._doc=e,this._location=window.location,this._history=window.history}getBaseHrefFromDOM(){return Hc().getBaseHref(this._doc)}onPopState(e){const n=Hc().getGlobalEventTarget(this._doc,"window");return n.addEventListener("popstate",e,!1),()=>n.removeEventListener("popstate",e)}onHashChange(e){const n=Hc().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){GN()?this._history.pushState(e,n,r):this._location.hash=r}replaceState(e,n,r){GN()?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)(ee(jt))},i.\u0275prov=ke({token:i,factory:function(){return function w9(){return new HN(ee(jt))}()},providedIn:"platform"}),i})();function GN(){return!!window.history.pushState}function DT(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 $N(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 Gc(i){return i&&"?"!==i[0]?"?"+i:i}let Ih=(()=>{class i{historyGo(e){throw new Error("Not implemented")}}return i.\u0275fac=function(e){return new(e||i)},i.\u0275prov=ke({token:i,factory:function(){return Ft(jN)},providedIn:"root"}),i})();const WN=new me("appBaseHref");let jN=(()=>{class i extends Ih{constructor(e,n){super(),this._platformLocation=e,this._removeListenerFns=[],this._baseHref=n??this._platformLocation.getBaseHrefFromDOM()??Ft(jt).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 DT(this._baseHref,e)}path(e=!1){const n=this._platformLocation.pathname+Gc(this._platformLocation.search),r=this._platformLocation.hash;return r&&e?`${n}${r}`:n}pushState(e,n,r,s){const o=this.prepareExternalUrl(r+Gc(s));this._platformLocation.pushState(e,n,o)}replaceState(e,n,r,s){const o=this.prepareExternalUrl(r+Gc(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)(ee(AT),ee(WN,8))},i.\u0275prov=ke({token:i,factory:i.\u0275fac,providedIn:"root"}),i})(),M9=(()=>{class i extends Ih{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=DT(this._baseHref,e);return n.length>0?"#"+n:n}pushState(e,n,r,s){let o=this.prepareExternalUrl(r+Gc(s));0==o.length&&(o=this._platformLocation.pathname),this._platformLocation.pushState(e,n,o)}replaceState(e,n,r,s){let o=this.prepareExternalUrl(r+Gc(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)(ee(AT),ee(WN,8))},i.\u0275prov=ke({token:i,factory:i.\u0275fac}),i})(),_y=(()=>{class i{constructor(e){this._subject=new We,this._urlChangeListeners=[],this._urlChangeSubscription=null,this._locationStrategy=e;const n=this._locationStrategy.getBaseHref();this._basePath=function E9(i){if(new RegExp("^(https?:)?//").test(i)){const[,e]=i.split(/\/\/[^\/]+/);return e}return i}($N(YN(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+Gc(n))}normalize(e){return i.stripTrailingSlash(function S9(i,t){if(!i||!t.startsWith(i))return t;const e=t.substring(i.length);return""===e||["/",";","?","#"].includes(e[0])?e:t}(this._basePath,YN(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+Gc(n)),r)}replaceState(e,n="",r=null){this._locationStrategy.replaceState(r,"",e,n),this._notifyUrlChangeListeners(this.prepareExternalUrl(e+Gc(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=Gc,i.joinWithSlash=DT,i.stripTrailingSlash=$N,i.\u0275fac=function(e){return new(e||i)(ee(Ih))},i.\u0275prov=ke({token:i,factory:function(){return function C9(){return new _y(ee(Ih))}()},providedIn:"root"}),i})();function YN(i){return i.replace(/\/index.html$/,"")}var Co=(()=>((Co=Co||{})[Co.Decimal=0]="Decimal",Co[Co.Percent=1]="Percent",Co[Co.Currency=2]="Currency",Co[Co.Scientific=3]="Scientific",Co))(),Ht=(()=>((Ht=Ht||{})[Ht.Decimal=0]="Decimal",Ht[Ht.Group=1]="Group",Ht[Ht.List=2]="List",Ht[Ht.PercentSign=3]="PercentSign",Ht[Ht.PlusSign=4]="PlusSign",Ht[Ht.MinusSign=5]="MinusSign",Ht[Ht.Exponential=6]="Exponential",Ht[Ht.SuperscriptingExponent=7]="SuperscriptingExponent",Ht[Ht.PerMille=8]="PerMille",Ht[Ht.Infinity=9]="Infinity",Ht[Ht.NaN=10]="NaN",Ht[Ht.TimeSeparator=11]="TimeSeparator",Ht[Ht.CurrencyDecimal=12]="CurrencyDecimal",Ht[Ht.CurrencyGroup=13]="CurrencyGroup",Ht))();function Ea(i,t){const e=ro(i),n=e[rt.NumberSymbols][t];if(typeof n>"u"){if(t===Ht.CurrencyDecimal)return e[rt.NumberSymbols][Ht.Decimal];if(t===Ht.CurrencyGroup)return e[rt.NumberSymbols][Ht.Group]}return n}const Q9=/^(\d+)?\.((\d+)(-(\d+))?)?$/,JN=22,eM=".",yy="0",J9=";",eY=",",PT="#";function LT(i){const t=parseInt(i);if(isNaN(t))throw new Error("Invalid integer literal when parsing "+i);return t}const BT=/\s+/,nB=[];let hm=(()=>{class i{constructor(e,n,r,s){this._iterableDiffers=e,this._keyValueDiffers=n,this._ngEl=r,this._renderer=s,this.initialClasses=nB,this.stateMap=new Map}set klass(e){this.initialClasses=null!=e?e.trim().split(BT):nB}set ngClass(e){this.rawClass="string"==typeof e?e.trim().split(BT):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(BT).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)(E(Ww),E(gy),E(mt),E(ol))},i.\u0275dir=ve({type:i,selectors:[["","ngClass",""]],inputs:{klass:["class","klass"],ngClass:"ngClass"},standalone:!0}),i})();class uY{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 So=(()=>{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 uY(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),sB(a,r)}});for(let r=0,s=n.length;r{sB(n.get(r.currentIndex),r)})}static ngTemplateContextGuard(e,n){return!0}}return i.\u0275fac=function(e){return new(e||i)(E(Wr),E(Mo),E(Ww))},i.\u0275dir=ve({type:i,selectors:[["","ngFor","","ngForOf",""]],inputs:{ngForOf:"ngForOf",ngForTrackBy:"ngForTrackBy",ngForTemplate:"ngForTemplate"},standalone:!0}),i})();function sB(i,t){i.context.$implicit=t.item}let vi=(()=>{class i{constructor(e,n){this._viewContainer=e,this._context=new fY,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){oB("ngIfThen",e),this._thenTemplateRef=e,this._thenViewRef=null,this._updateView()}set ngIfElse(e){oB("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)(E(Wr),E(Mo))},i.\u0275dir=ve({type:i,selectors:[["","ngIf",""]],inputs:{ngIf:"ngIf",ngIfThen:"ngIfThen",ngIfElse:"ngIfElse"},standalone:!0}),i})();class fY{constructor(){this.$implicit=null,this.ngIf=null}}function oB(i,t){if(t&&!t.createEmbeddedView)throw new Error(`${i} must be a TemplateRef, but received '${pi(t)}'.`)}class UT{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 by=(()=>{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=ve({type:i,selectors:[["","ngSwitch",""]],inputs:{ngSwitch:"ngSwitch"},standalone:!0}),i})(),VT=(()=>{class i{constructor(e,n,r){this.ngSwitch=r,r._addCase(),this._view=new UT(e,n)}ngDoCheck(){this._view.enforceState(this.ngSwitch._matchCase(this.ngSwitchCase))}}return i.\u0275fac=function(e){return new(e||i)(E(Wr),E(Mo),E(by,9))},i.\u0275dir=ve({type:i,selectors:[["","ngSwitchCase",""]],inputs:{ngSwitchCase:"ngSwitchCase"},standalone:!0}),i})(),aB=(()=>{class i{constructor(e,n,r){r._addDefault(new UT(e,n))}}return i.\u0275fac=function(e){return new(e||i)(E(Wr),E(Mo),E(by,9))},i.\u0275dir=ve({type:i,selectors:[["","ngSwitchDefault",""]],standalone:!0}),i})(),tM=(()=>{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:Es.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)(E(mt),E(gy),E(ol))},i.\u0275dir=ve({type:i,selectors:[["","ngStyle",""]],inputs:{ngStyle:"ngStyle"},standalone:!0}),i})(),xy=(()=>{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)(E(Wr))},i.\u0275dir=ve({type:i,selectors:[["","ngTemplateOutlet",""]],inputs:{ngTemplateOutletContext:"ngTemplateOutletContext",ngTemplateOutlet:"ngTemplateOutlet",ngTemplateOutletInjector:"ngTemplateOutletInjector"},standalone:!0,features:[bi]}),i})();function fl(i,t){return new pe(2100,!1)}class mY{createSubscription(t,e){return t.subscribe({next:e,error:n=>{throw n}})}dispose(t){t.unsubscribe()}}class gY{createSubscription(t,e){return t.then(e,n=>{throw n})}dispose(t){}}const _Y=new gY,vY=new mY;let pl=(()=>{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(oy(e))return _Y;if(uL(e))return vY;throw fl()}_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)(E(Zn,16))},i.\u0275pipe=Gi({name:"async",type:i,pure:!1,standalone:!0}),i})(),cB=(()=>{class i{constructor(e){this.differs=e,this.keyValues=[],this.compareFn=dB}transform(e,n=dB){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 RY(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)(E(gy,16))},i.\u0275pipe=Gi({name:"keyvalue",type:i,pure:!1,standalone:!0}),i})();function dB(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 zT(i){return!(null==i||""===i||i!=i)}(e))return null;r=r||this._locale;try{return function rY(i,t,e){return function OT(i,t,e,n,r,s,o=!1){let a="",l=!1;if(isFinite(i)){let c=function oY(i){let n,r,s,o,a,t=Math.abs(i)+"",e=0;for((r=t.indexOf(eM))>-1&&(t=t.replace(eM,"")),(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)===yy;s++);if(s===(a=t.length))n=[0],r=1;else{for(a--;t.charAt(a)===yy;)a--;for(r-=s,n=[],o=0;s<=a;s++,o++)n[o]=Number(t.charAt(s))}return r>JN&&(n=n.splice(0,JN-1),e=r-1,r=1),{digits:n,exponent:e,integerLen:r}}(i);o&&(c=function sY(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 d=t.minInt,h=t.minFrac,p=t.maxFrac;if(s){const M=s.match(Q9);if(null===M)throw new Error(`${s} is not a valid digit info`);const x=M[1],C=M[3],F=M[5];null!=x&&(d=LT(x)),null!=C&&(h=LT(C)),null!=F?p=LT(F):null!=C&&h>p&&(p=h)}!function aY(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);d&&(n.unshift(d),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(Ea(e,n)),v.length&&(a+=Ea(e,r)+v.join("")),b&&(a+=Ea(e,Ht.Exponential)+"+"+b)}else a=Ea(e,Ht.Infinity);return a=i<0&&!l?t.negPre+a+t.negSuf:t.posPre+a+t.posSuf,a}(i,function FT(i,t="-"){const e={minInt:1,minFrac:0,maxFrac:0,posPre:"",posSuf:"",negPre:"",negSuf:"",gSize:0,lgSize:0},n=i.split(J9),r=n[0],s=n[1],o=-1!==r.indexOf(eM)?r.split(eM):[r.substring(0,r.lastIndexOf(yy)+1),r.substring(r.lastIndexOf(yy)+1)],a=o[0],l=o[1]||"";e.posPre=a.substring(0,a.indexOf(PT));for(let d=0;d{class i{}return i.\u0275fac=function(e){return new(e||i)},i.\u0275mod=nn({type:i}),i.\u0275inj=Kt({}),i})();const hB="browser";let BY=(()=>{class i{}return i.\u0275prov=ke({token:i,providedIn:"root",factory:()=>new UY(ee(jt),window)}),i})();class UY{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 VY(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=fB(this.window.history)||fB(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 fB(i){return Object.getOwnPropertyDescriptor(i,"scrollRestoration")}class p7 extends y9{constructor(){super(...arguments),this.supportsDOMEvents=!0}}class WT extends p7{static makeCurrent(){!function v9(i){ET||(ET=i)}(new WT)}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 m7(){return My=My||document.querySelector("base"),My?My.getAttribute("href"):null}();return null==e?null:function g7(i){rM=rM||document.createElement("a"),rM.setAttribute("href",i);const t=rM.pathname;return"/"===t.charAt(0)?t:`/${t}`}(e)}resetBaseElement(){My=null}getUserAgent(){return window.navigator.userAgent}getCookie(t){return function cY(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 rM,My=null;const vB=new me("TRANSITION_ID"),v7=[{provide:Uw,useFactory:function _7(i,t,e){return()=>{e.get(Vw).donePromise.then(()=>{const n=Hc(),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=ke({token:i,factory:i.\u0275fac}),i})();const sM=new me("EventManagerPlugins");let oM=(()=>{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=ke({token:i,factory:i.\u0275fac}),i})(),Cy=(()=>{class i extends bB{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)(ee(jt))},i.\u0275prov=ke({token:i,factory:i.\u0275fac}),i})();const jT={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/"},YT=/%COMP%/g,MB=new me("RemoveStylesOnCompDestory",{providedIn:"root",factory:()=>!1});function CB(i,t){return t.flat(100).map(e=>e.replace(YT,i))}function SB(i){return t=>{if("__ngUnwrap__"===t)return i;!1===i(t)&&(t.preventDefault(),t.returnValue=!1)}}let aM=(()=>{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 qT(e)}createRenderer(e,n){if(!e||!n)return this.defaultRenderer;const r=this.getOrCreateRenderer(e,n);return r instanceof DB?r.applyToHost(e):r instanceof XT&&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 qs.Emulated:s=new DB(o,a,n,this.appId,l);break;case qs.ShadowDom:return new A7(o,a,e,n);default:s=new XT(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)(ee(oM),ee(Cy),ee(cm),ee(MB))},i.\u0275prov=ke({token:i,factory:i.\u0275fac}),i})();class qT{constructor(t){this.eventManager=t,this.data=Object.create(null),this.destroyNode=null}destroy(){}createElement(t,e){return e?document.createElementNS(jT[e]||e,t):document.createElement(t)}createComment(t){return document.createComment(t)}createText(t){return document.createTextNode(t)}appendChild(t,e){(AB(t)?t.content:t).appendChild(e)}insertBefore(t,e,n){t&&(AB(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=jT[r];s?t.setAttributeNS(s,e,n):t.setAttribute(e,n)}else t.setAttribute(e,n)}removeAttribute(t,e,n){if(n){const r=jT[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&(Es.DashCase|Es.Important)?t.style.setProperty(e,n,r&Es.Important?"important":""):t.style[e]=n}removeStyle(t,e,n){n&Es.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,SB(n)):this.eventManager.addEventListener(t,e,SB(n))}}function AB(i){return"TEMPLATE"===i.tagName&&void 0!==i.content}class A7 extends qT{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=CB(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 XT extends qT{constructor(t,e,n,r,s=n.id){super(t),this.sharedStylesHost=e,this.removeStylesOnCompDestory=r,this.rendererUsageCount=0,this.styles=CB(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 DB extends XT{constructor(t,e,n,r,s){const o=r+"-"+n.id;super(t,e,n,s,o),this.contentAttr=function C7(i){return"_ngcontent-%COMP%".replace(YT,i)}(o),this.hostAttr=function S7(i){return"_nghost-%COMP%".replace(YT,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 D7=(()=>{class i extends yB{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)(ee(jt))},i.\u0275prov=ke({token:i,factory:i.\u0275fac}),i})();const TB=["alt","control","meta","shift"],T7={"\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"},I7={alt:i=>i.altKey,control:i=>i.ctrlKey,meta:i=>i.metaKey,shift:i=>i.shiftKey};let R7=(()=>{class i extends yB{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(()=>Hc().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."),TB.forEach(c=>{const d=n.indexOf(c);d>-1&&(n.splice(d,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=T7[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"),TB.forEach(o=>{o!==r&&(0,I7[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)(ee(jt))},i.\u0275prov=ke({token:i,factory:i.\u0275fac}),i})();const F7=SN(m9,"browser",[{provide:fT,useValue:hB},{provide:pN,useValue:function k7(){WT.makeCurrent()},multi:!0},{provide:jt,useFactory:function O7(){return function sD(i){vv=i}(document),document},deps:[]}]),kB=new me(""),PB=[{provide:zw,useClass:class y7{addToWindow(t){Rn.getAngularTestability=(n,r=!0)=>{const s=t.findTestabilityInTree(n,r);if(null==s)throw new Error("Could not find testability for element.");return s},Rn.getAllAngularTestabilities=()=>t.getAllTestabilities(),Rn.getAllAngularRootElements=()=>t.getAllRootElements(),Rn.frameworkStabilizers||(Rn.frameworkStabilizers=[]),Rn.frameworkStabilizers.push(n=>{const r=Rn.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?Hc().isShadowRoot(e)?this.findTestabilityInTree(t,e.host,!0):this.findTestabilityInTree(t,e.parentElement,!0):null)}},deps:[]},{provide:bN,useClass:_T,deps:[ft,vT,zw]},{provide:_T,useClass:_T,deps:[ft,vT,zw]}],OB=[{provide:Iv,useValue:"root"},{provide:al,useFactory:function P7(){return new al},deps:[]},{provide:sM,useClass:D7,multi:!0,deps:[jt,ft,fT]},{provide:sM,useClass:R7,multi:!0,deps:[jt]},{provide:aM,useClass:aM,deps:[oM,Cy,cm,MB]},{provide:Gl,useExisting:aM},{provide:bB,useExisting:Cy},{provide:Cy,useClass:Cy,deps:[jt]},{provide:oM,useClass:oM,deps:[sM,ft]},{provide:class zY{},useClass:b7,deps:[]},[]];let FB=(()=>{class i{constructor(e){}static withServerTransition(e){return{ngModule:i,providers:[{provide:cm,useValue:e.appId},{provide:vB,useExisting:cm},v7]}}}return i.\u0275fac=function(e){return new(e||i)(ee(kB,12))},i.\u0275mod=nn({type:i}),i.\u0275inj=Kt({providers:[...OB,...PB],imports:[Eo,g9]}),i})(),LB=(()=>{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)(ee(jt))},i.\u0275prov=ke({token:i,factory:function(e){let n=null;return n=e?new e:function N7(){return new LB(ee(jt))}(),n},providedIn:"root"}),i})();typeof window<"u"&&window;let QT=(()=>{class i{}return i.\u0275fac=function(e){return new(e||i)},i.\u0275prov=ke({token:i,factory:function(e){let n=null;return n=e?new(e||i):ee(UB),n},providedIn:"root"}),i})(),UB=(()=>{class i extends QT{constructor(e){super(),this._doc=e}sanitize(e,n){if(null==n)return null;switch(e){case Kn.NONE:return n;case Kn.HTML:return Ma(n,"HTML")?Js(n):Zx(this._doc,String(n)).toString();case Kn.STYLE:return Ma(n,"Style")?Js(n):n;case Kn.SCRIPT:if(Ma(n,"Script"))return Js(n);throw new Error("unsafe value used in a script context");case Kn.URL:return Ma(n,"URL")?Js(n):xh(String(n));case Kn.RESOURCE_URL:if(Ma(n,"ResourceURL"))return Js(n);throw new Error(`unsafe value used in a resource URL context (see ${qu})`);default:throw new Error(`Unexpected SecurityContext ${e} (see ${qu})`)}}bypassSecurityTrustHtml(e){return function uD(i){return new oD(i)}(e)}bypassSecurityTrustStyle(e){return function hD(i){return new aD(i)}(e)}bypassSecurityTrustScript(e){return function fD(i){return new lD(i)}(e)}bypassSecurityTrustUrl(e){return function pD(i){return new cD(i)}(e)}bypassSecurityTrustResourceUrl(e){return function mD(i){return new Pp(i)}(e)}}return i.\u0275fac=function(e){return new(e||i)(ee(jt))},i.\u0275prov=ke({token:i,factory:function(e){let n=null;return n=e?new e:function H7(i){return new UB(i.get(jt))}(ee($i)),n},providedIn:"root"}),i})();function ht(...i){return Ni(i,$u(i))}class gt extends Re{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 fm=V(i=>function(){i(this),this.name="EmptyError",this.message="no elements in sequence"}),{isArray:G7}=Array,{getPrototypeOf:$7,prototype:W7,keys:j7}=Object;function VB(i){if(1===i.length){const t=i[0];if(G7(t))return{args:t,keys:null};if(function Y7(i){return i&&"object"==typeof i&&$7(i)===W7}(t)){const e=j7(t);return{args:e.map(n=>t[n]),keys:e}}}return{args:i,keys:null}}const{isArray:q7}=Array;function JT(i){return et(t=>function X7(i,t){return q7(t)?i(...t):i(t)}(i,t))}function zB(i,t){return i.reduce((e,n,r)=>(e[n]=t[r],e),{})}function nu(...i){const t=$u(i),e=w0(i),{args:n,keys:r}=VB(i);if(0===n.length)return Ni([],t);const s=new In(function K7(i,t,e=$a){return n=>{HB(t,()=>{const{length:r}=i,s=new Array(r);let o=r,a=r;for(let l=0;l{const c=Ni(i[l],t);let d=!1;c.subscribe(Yn(n,h=>{s[l]=h,d||(d=!0,a--),a||n.next(e(s.slice()))},()=>{--o||n.complete()}))},n)},n)}}(n,t,r?o=>zB(r,o):$a));return e?s.pipe(JT(e)):s}function HB(i,t,e){i?Ya(e,i,t):t()}function Sy(...i){return function Z7(){return yd(1)}()(Ni(i,$u(i)))}function Ey(i){return new In(t=>{wr(i()).subscribe(t)})}function pm(i,t){const e=cn(i)?i:()=>i,n=r=>r.error(e());return new In(t?r=>t.schedule(n,0,r):n)}function eI(){return ti((i,t)=>{let e=null;i._refCount++;const n=Yn(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 GB extends In{constructor(t,e){super(),this.source=t,this.subjectFactory=e,this._subject=null,this._refCount=0,this._connection=null,c0(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 Zt;const e=this.getSubject();t.add(this.source.subscribe(Yn(e,void 0,()=>{this._teardown(),e.complete()},n=>{this._teardown(),e.error(n)},()=>this._teardown()))),t.closed&&(this._connection=null,t=Zt.EMPTY)}return t}refCount(){return eI()(this)}}function Rs(i,t){return ti((e,n)=>{let r=null,s=0,o=!1;const a=()=>o&&!r&&n.complete();e.subscribe(Yn(n,l=>{r?.unsubscribe();let c=0;const d=s++;wr(i(l,d)).subscribe(r=Yn(n,h=>n.next(t?t(l,h,d,c++):h),()=>{r=null,a()}))},()=>{o=!0,a()}))})}function Oi(i){return i<=0?()=>po:ti((t,e)=>{let n=0;t.subscribe(Yn(e,r=>{++n<=i&&(e.next(r),i<=n&&e.complete())}))})}function Ao(...i){const t=$u(i);return ti((e,n)=>{(t?Sy(i,e,t):Sy(i,e)).subscribe(n)})}function gn(i,t){return ti((e,n)=>{let r=0;e.subscribe(Yn(n,s=>i.call(t,s,r++)&&n.next(s)))})}function lM(i){return ti((t,e)=>{let n=!1;t.subscribe(Yn(e,r=>{n=!0,e.next(r)},()=>{n||e.next(i),e.complete()}))})}function $B(i=Q7){return ti((t,e)=>{let n=!1;t.subscribe(Yn(e,r=>{n=!0,e.next(r)},()=>n?e.complete():e.error(i())))})}function Q7(){return new fm}function iu(i,t){const e=arguments.length>=2;return n=>n.pipe(i?gn((r,s)=>i(r,s,n)):$a,Oi(1),e?lM(t):$B(()=>new fm))}function ru(i,t){return cn(t)?ir(i,t,1):ir(i,1)}function Vi(i,t,e){const n=cn(i)||t||e?{next:i,error:t,complete:e}:i;return n?ti((r,s)=>{var o;null===(o=n.subscribe)||void 0===o||o.call(n);let a=!0;r.subscribe(Yn(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)}))}):$a}function Wc(i){return ti((t,e)=>{let s,n=null,r=!1;n=t.subscribe(Yn(e,void 0,void 0,o=>{s=wr(i(o,Wc(i)(t))),n?(n.unsubscribe(),n=null,s.subscribe(e)):r=!0})),r&&(n.unsubscribe(),n=null,s.subscribe(e))})}function tI(i,t){return ti(function J7(i,t,e,n,r){return(s,o)=>{let a=e,l=t,c=0;s.subscribe(Yn(o,d=>{const h=c++;l=a?i(l,d,h):(a=!0,d),n&&o.next(l)},r&&(()=>{a&&o.next(l),o.complete()})))}}(i,t,arguments.length>=2,!0))}function nI(i){return i<=0?()=>po:ti((t,e)=>{let n=[];t.subscribe(Yn(e,r=>{n.push(r),i{for(const r of n)e.next(r);e.complete()},void 0,()=>{n=null}))})}function WB(i,t){const e=arguments.length>=2;return n=>n.pipe(i?gn((r,s)=>i(r,s,n)):$a,nI(1),e?lM(t):$B(()=>new fm))}function jB(i,t=!1){return ti((e,n)=>{let r=0;e.subscribe(Yn(n,s=>{const o=i(s,r++);(o||t)&&n.next(s),!o&&n.complete()}))})}function YB(i){return et(()=>i)}function su(i){return ti((t,e)=>{try{t.subscribe(e)}finally{e.add(i)}})}const _n="primary",Ay=Symbol("RouteTitle");class eq{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 eq(i)}function tq(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 XB(i){return Array.prototype.concat.apply([],i)}function KB(i){return i.length>0?i[i.length-1]:null}function os(i,t){for(const e in i)i.hasOwnProperty(e)&&t(i[e],e)}function ou(i){return L1(i)?i:oy(i)?Ni(Promise.resolve(i)):ht(i)}const cM=!1,iq={exact:function JB(i,t,e){if(!Rh(i.segments,t.segments)||!dM(i.segments,t.segments,e)||i.numberOfChildren!==t.numberOfChildren)return!1;for(const n in t.children)if(!i.children[n]||!JB(i.children[n],t.children[n],e))return!1;return!0},subset:e3},ZB={exact:function rq(i,t){return Xl(i,t)},subset:function sq(i,t){return Object.keys(t).length<=Object.keys(i).length&&Object.keys(t).every(e=>qB(i[e],t[e]))},ignored:()=>!0};function QB(i,t,e){return iq[e.paths](i.root,t.root,e.matrixParams)&&ZB[e.queryParams](i.queryParams,t.queryParams)&&!("exact"===e.fragment&&i.fragment!==t.fragment)}function e3(i,t,e){return t3(i,t,t.segments,e)}function t3(i,t,e,n){if(i.segments.length>e.length){const r=i.segments.slice(0,e.length);return!(!Rh(r,e)||t.hasChildren()||!dM(r,e,n))}if(i.segments.length===e.length){if(!Rh(i.segments,e)||!dM(i.segments,e,n))return!1;for(const r in t.children)if(!i.children[r]||!e3(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!!(Rh(i.segments,r)&&dM(i.segments,r,n)&&i.children[_n])&&t3(i.children[_n],t,s,n)}}function dM(i,t,e){return t.every((n,r)=>ZB[e](i[r].parameters,n.parameters))}class au{constructor(t=new Tn([],{}),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 lq.serialize(this)}}class Tn{constructor(t,e){this.segments=t,this.children=e,this.parent=null,os(e,(n,r)=>n.parent=this)}hasChildren(){return this.numberOfChildren>0}get numberOfChildren(){return Object.keys(this.children).length}toString(){return uM(this)}}class Dy{constructor(t,e){this.path=t,this.parameters=e}get parameterMap(){return this._parameterMap||(this._parameterMap=mm(this.parameters)),this._parameterMap}toString(){return s3(this)}}function Rh(i,t){return i.length===t.length&&i.every((e,n)=>e.path===t[n].path)}let Ty=(()=>{class i{}return i.\u0275fac=function(e){return new(e||i)},i.\u0275prov=ke({token:i,factory:function(){return new iI},providedIn:"root"}),i})();class iI{parse(t){const e=new _q(t);return new au(e.parseRootSegment(),e.parseQueryParams(),e.parseFragment())}serialize(t){const e=`/${Iy(t.root,!0)}`,n=function uq(i){const t=Object.keys(i).map(e=>{const n=i[e];return Array.isArray(n)?n.map(r=>`${hM(e)}=${hM(r)}`).join("&"):`${hM(e)}=${hM(n)}`}).filter(e=>!!e);return t.length?`?${t.join("&")}`:""}(t.queryParams);return`${e}${n}${"string"==typeof t.fragment?`#${function cq(i){return encodeURI(i)}(t.fragment)}`:""}`}}const lq=new iI;function uM(i){return i.segments.map(t=>s3(t)).join("/")}function Iy(i,t){if(!i.hasChildren())return uM(i);if(t){const e=i.children[_n]?Iy(i.children[_n],!1):"",n=[];return os(i.children,(r,s)=>{s!==_n&&n.push(`${s}:${Iy(r,!1)}`)}),n.length>0?`${e}(${n.join("//")})`:e}{const e=function aq(i,t){let e=[];return os(i.children,(n,r)=>{r===_n&&(e=e.concat(t(n,r)))}),os(i.children,(n,r)=>{r!==_n&&(e=e.concat(t(n,r)))}),e}(i,(n,r)=>r===_n?[Iy(i.children[_n],!1)]:[`${r}:${Iy(n,!1)}`]);return 1===Object.keys(i.children).length&&null!=i.children[_n]?`${uM(i)}/${e[0]}`:`${uM(i)}/(${e.join("//")})`}}function n3(i){return encodeURIComponent(i).replace(/%40/g,"@").replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",")}function hM(i){return n3(i).replace(/%3B/gi,";")}function rI(i){return n3(i).replace(/\(/g,"%28").replace(/\)/g,"%29").replace(/%26/gi,"&")}function fM(i){return decodeURIComponent(i)}function r3(i){return fM(i.replace(/\+/g,"%20"))}function s3(i){return`${rI(i.path)}${function dq(i){return Object.keys(i).map(t=>`;${rI(t)}=${rI(i[t])}`).join("")}(i.parameters)}`}const hq=/^[^\/()?;=#]+/;function pM(i){const t=i.match(hq);return t?t[0]:""}const fq=/^[^=?&#]+/,mq=/^[^&#]+/;class _q{constructor(t){this.url=t,this.remaining=t}parseRootSegment(){return this.consumeOptional("/"),""===this.remaining||this.peekStartsWith("?")||this.peekStartsWith("#")?new Tn([],{}):new Tn([],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[_n]=new Tn(t,e)),n}parseSegment(){const t=pM(this.remaining);if(""===t&&this.peekStartsWith(";"))throw new pe(4009,cM);return this.capture(t),new Dy(fM(t),this.parseMatrixParams())}parseMatrixParams(){const t={};for(;this.consumeOptional(";");)this.parseParam(t);return t}parseParam(t){const e=pM(this.remaining);if(!e)return;this.capture(e);let n="";if(this.consumeOptional("=")){const r=pM(this.remaining);r&&(n=r,this.capture(n))}t[fM(e)]=fM(n)}parseQueryParam(t){const e=function pq(i){const t=i.match(fq);return t?t[0]:""}(this.remaining);if(!e)return;this.capture(e);let n="";if(this.consumeOptional("=")){const o=function gq(i){const t=i.match(mq);return t?t[0]:""}(this.remaining);o&&(n=o,this.capture(n))}const r=r3(e),s=r3(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=pM(this.remaining),r=this.remaining[n.length];if("/"!==r&&")"!==r&&";"!==r)throw new pe(4010,cM);let s;n.indexOf(":")>-1?(s=n.slice(0,n.indexOf(":")),this.capture(s),this.capture(":")):t&&(s=_n);const o=this.parseChildren();e[s]=1===Object.keys(o).length?o[_n]:new Tn([],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 pe(4011,cM)}}function sI(i){return i.segments.length>0?new Tn([],{[_n]:i}):i}function mM(i){const t={};for(const n of Object.keys(i.children)){const s=mM(i.children[n]);(s.segments.length>0||s.hasChildren())&&(t[n]=s)}return function vq(i){if(1===i.numberOfChildren&&i.children[_n]){const t=i.children[_n];return new Tn(i.segments.concat(t.segments),t.children)}return i}(new Tn(i.segments,t))}function kh(i){return i instanceof au}const oI=!1;function yq(i,t,e,n,r){if(0===e.length)return gm(t.root,t.root,t.root,n,r);const s=function d3(i){if("string"==typeof i[0]&&1===i.length&&"/"===i[0])return new c3(!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 os(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 c3(e,t,n)}(e);return s.toRoot()?gm(t.root,t.root,new Tn([],{}),n,r):function o(l){const c=function xq(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 u3(i,t,e){let n=i,r=t,s=e;for(;s>r;){if(s-=r,n=n.parent,!n)throw new pe(4005,oI&&"Invalid number of '../'");r=n.segments.length}return new _m(n,!1,r-s)}(e,n+(Ry(i.commands[0])?0:1),i.numberOfDoubleDots)}(s,t,i.snapshot?._urlSegment,l),d=c.processChildren?vm(c.segmentGroup,c.index,s.commands):aI(c.segmentGroup,c.index,s.commands);return gm(t.root,c.segmentGroup,d,n,r)}(i.snapshot?._lastPathIndex)}function Ry(i){return"object"==typeof i&&null!=i&&!i.outlets&&!i.segmentPath}function ky(i){return"object"==typeof i&&null!=i&&i.outlets}function gm(i,t,e,n,r){let o,s={};n&&os(n,(l,c)=>{s[c]=Array.isArray(l)?l.map(d=>`${d}`):`${l}`}),o=i===t?e:l3(i,t,e);const a=sI(mM(o));return new au(a,s,r)}function l3(i,t,e){const n={};return os(i.children,(r,s)=>{n[s]=r===t?e:l3(r,t,e)}),new Tn(i.segments,n)}class c3{constructor(t,e,n){if(this.isAbsolute=t,this.numberOfDoubleDots=e,this.commands=n,t&&n.length>0&&Ry(n[0]))throw new pe(4003,oI&&"Root segment cannot have matrix parameters");const r=n.find(ky);if(r&&r!==KB(n))throw new pe(4004,oI&&"{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 aI(i,t,e){if(i||(i=new Tn([],{})),0===i.segments.length&&i.hasChildren())return vm(i,t,e);const n=function Mq(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(ky(a))break;const l=`${a}`,c=n0&&void 0===l)break;if(l&&c&&"object"==typeof c&&void 0===c.outlets){if(!f3(l,c,o))return s;n+=2}else{if(!f3(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]=aI(i.children[o],t,s))}),os(i.children,(s,o)=>{void 0===n[o]&&(r[o]=s)}),new Tn(i.segments,r)}}function lI(i,t,e){const n=i.segments.slice(0,t);let r=0;for(;r{"string"==typeof e&&(e=[e]),null!==e&&(t[n]=lI(new Tn([],{}),0,e))}),t}function h3(i){const t={};return os(i,(e,n)=>t[n]=`${e}`),t}function f3(i,t,e){return i==e.path&&Xl(t,e.parameters)}const Py="imperative";class Kl{constructor(t,e){this.id=t,this.url=e}}class cI extends Kl{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 Ph extends Kl{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 gM extends Kl{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 _M extends Kl{constructor(t,e,n,r){super(t,e),this.reason=n,this.code=r,this.type=16}}class dI extends Kl{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 Sq extends Kl{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 Eq extends Kl{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 Aq extends Kl{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 Dq extends Kl{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 Tq extends Kl{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 Iq{constructor(t){this.route=t,this.type=9}toString(){return`RouteConfigLoadStart(path: ${this.route.path})`}}class Rq{constructor(t){this.route=t,this.type=10}toString(){return`RouteConfigLoadEnd(path: ${this.route.path})`}}class kq{constructor(t){this.snapshot=t,this.type=11}toString(){return`ChildActivationStart(path: '${this.snapshot.routeConfig&&this.snapshot.routeConfig.path||""}')`}}class Pq{constructor(t){this.snapshot=t,this.type=12}toString(){return`ChildActivationEnd(path: '${this.snapshot.routeConfig&&this.snapshot.routeConfig.path||""}')`}}class Oq{constructor(t){this.snapshot=t,this.type=13}toString(){return`ActivationStart(path: '${this.snapshot.routeConfig&&this.snapshot.routeConfig.path||""}')`}}class Fq{constructor(t){this.snapshot=t,this.type=14}toString(){return`ActivationEnd(path: '${this.snapshot.routeConfig&&this.snapshot.routeConfig.path||""}')`}}class p3{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 Bq=(()=>{class i{createUrlTree(e,n,r,s,o,a){return yq(e||n.root,r,s,o,a)}}return i.\u0275fac=function(e){return new(e||i)},i.\u0275prov=ke({token:i,factory:i.\u0275fac}),i})(),Vq=(()=>{class i{}return i.\u0275fac=function(e){return new(e||i)},i.\u0275prov=ke({token:i,factory:function(t){return Bq.\u0275fac(t)},providedIn:"root"}),i})();class m3{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=uI(t,this._root);return e?e.children.map(n=>n.value):[]}firstChild(t){const e=uI(t,this._root);return e&&e.children.length>0?e.children[0].value:null}siblings(t){const e=hI(t,this._root);return e.length<2?[]:e[e.length-2].children.map(r=>r.value).filter(r=>r!==t)}pathFromRoot(t){return hI(t,this._root).map(e=>e.value)}}function uI(i,t){if(i===t.value)return t;for(const e of t.children){const n=uI(i,e);if(n)return n}return null}function hI(i,t){if(i===t.value)return[t];for(const e of t.children){const n=hI(i,e);if(n.length)return n.unshift(t),n}return[]}class jc{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 g3 extends m3{constructor(t,e){super(t),this.snapshot=e,fI(this,t)}toString(){return this.snapshot.toString()}}function _3(i,t){const e=function zq(i,t){const o=new vM([],{},{},"",{},_n,t,null,i.root,-1,{});return new y3("",new jc(o,[]))}(i,t),n=new gt([new Dy("",{})]),r=new gt({}),s=new gt({}),o=new gt({}),a=new gt(""),l=new bm(n,r,o,a,s,_n,t,e.root);return l.snapshot=e.root,new g3(new jc(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(et(c=>c[Ay]))??ht(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(et(t=>mm(t)))),this._paramMap}get queryParamMap(){return this._queryParamMap||(this._queryParamMap=this.queryParams.pipe(et(t=>mm(t)))),this._queryParamMap}toString(){return this.snapshot?this.snapshot.toString():`Future(${this._futureSnapshot})`}}function v3(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 Hq(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 vM{get title(){return this.data?.[Ay]}constructor(t,e,n,r,s,o,a,l,c,d,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=d,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 y3 extends m3{constructor(t,e){super(e),this.url=t,fI(this,e)}toString(){return b3(this._root)}}function fI(i,t){t.value._routerState=i,t.children.forEach(e=>fI(i,e))}function b3(i){const t=i.children.length>0?` { ${i.children.map(b3).join(", ")} } `:"";return`${i.value}${t}`}function pI(i){if(i.snapshot){const t=i.snapshot,e=i._futureSnapshot;i.snapshot=e,Xl(t.queryParams,e.queryParams)||i.queryParams.next(e.queryParams),t.fragment!==e.fragment&&i.fragment.next(e.fragment),Xl(t.params,e.params)||i.params.next(e.params),function nq(i,t){if(i.length!==t.length)return!1;for(let e=0;eXl(e.parameters,t[n].parameters))}(i.url,t.url);return e&&!(!i.parent!=!t.parent)&&(!i.parent||mI(i.parent,t.parent))}function Oy(i,t,e){if(e&&i.shouldReuseRoute(t.value,e.value.snapshot)){const n=e.value;n._futureSnapshot=t.value;const r=function $q(i,t,e){return t.children.map(n=>{for(const r of e.children)if(i.shouldReuseRoute(n.value,r.value.snapshot))return Oy(i,n,r);return Oy(i,n)})}(i,t,e);return new jc(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=>Oy(i,a)),o}}const n=function Wq(i){return new bm(new gt(i.url),new gt(i.params),new gt(i.queryParams),new gt(i.fragment),new gt(i.data),i.outlet,i.component,i)}(t.value),r=t.children.map(s=>Oy(i,s));return new jc(n,r)}}const gI="ngNavigationCancelingError";function x3(i,t){const{redirectTo:e,navigationBehaviorOptions:n}=kh(t)?{redirectTo:t,navigationBehaviorOptions:void 0}:t,r=w3(!1,0,t);return r.url=e,r.navigationBehaviorOptions=n,r}function w3(i,t,e){const n=new Error("NavigationCancelingError: "+(i||""));return n[gI]=!0,n.cancellationCode=t,e&&(n.url=e),n}function M3(i){return C3(i)&&kh(i.url)}function C3(i){return i&&i[gI]}class jq{constructor(){this.outlet=null,this.route=null,this.resolver=null,this.injector=null,this.children=new Fy,this.attachRef=null}}let Fy=(()=>{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 jq,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=ke({token:i,factory:i.\u0275fac,providedIn:"root"}),i})();const yM=!1;let S3=(()=>{class i{constructor(){this.activated=null,this._activatedRoute=null,this.name=_n,this.activateEvents=new We,this.deactivateEvents=new We,this.attachEvents=new We,this.detachEvents=new We,this.parentContexts=Ft(Fy),this.location=Ft(Wr),this.changeDetector=Ft(Zn),this.environmentInjector=Ft(to)}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 pe(4012,yM);return this.activated.instance}get activatedRoute(){if(!this.activated)throw new pe(4012,yM);return this._activatedRoute}get activatedRouteData(){return this._activatedRoute?this._activatedRoute.snapshot.data:{}}detach(){if(!this.activated)throw new pe(4012,yM);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 pe(4013,yM);this._activatedRoute=e;const r=this.location,o=e.snapshot.component,a=this.parentContexts.getOrCreateContext(this.name).children,l=new Yq(e,a,r.injector);if(n&&function qq(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=ve({type:i,selectors:[["router-outlet"]],inputs:{name:"name"},outputs:{activateEvents:"activate",deactivateEvents:"deactivate",attachEvents:"attach",detachEvents:"detach"},exportAs:["outlet"],standalone:!0,features:[bi]}),i})();class Yq{constructor(t,e,n){this.route=t,this.childContexts=e,this.parent=n}get(t,e){return t===bm?this.route:t===Fy?this.childContexts:this.parent.get(t,e)}}let _I=(()=>{class i{}return i.\u0275fac=function(e){return new(e||i)},i.\u0275cmp=ot({type:i,selectors:[["ng-component"]],standalone:!0,features:[Z1],decls:1,vars:0,template:function(e,n){1&e&&De(0,"router-outlet")},dependencies:[S3],encapsulation:2}),i})();function E3(i,t){return i.providers&&!i._injector&&(i._injector=Fw(i.providers,t,`Route: ${i.path}`)),i._injector??t}function yI(i){const t=i.children&&i.children.map(yI),e=t?{...i,children:t}:{...i};return!e.component&&!e.loadComponent&&(t||e.loadChildren)&&e.outlet&&e.outlet!==_n&&(e.component=_I),e}function Da(i){return i.outlet||_n}function A3(i,t){const e=i.filter(n=>Da(n)===t);return e.push(...i.filter(n=>Da(n)!==t)),e}function Ly(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 Jq{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),pI(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]}),os(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 Fq(s.value.snapshot))}),t.children.length&&this.forwardEvent(new Pq(t.value.snapshot))}activateRoutes(t,e,n){const r=t.value,s=e?e.value:null;if(pI(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),pI(a.route.value),this.activateChildRoutes(t,null,o.children)}else{const a=Ly(r.snapshot),l=a?.get(Hl)??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 D3{constructor(t){this.path=t,this.route=this.path[this.path.length-1]}}class bM{constructor(t,e){this.component=t,this.route=e}}function eX(i,t,e){const n=i._root;return Ny(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 Cr(i){return null!==Gf(i)}(i)?t.get(i):i:n}function Ny(i,t,e,n,r={canDeactivateChecks:[],canActivateChecks:[]}){const s=ym(t);return i.children.forEach(o=>{(function nX(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 iX(i,t,e){if("function"==typeof e)return e(i,t);switch(e){case"pathParamsChange":return!Rh(i.url,t.url);case"pathParamsOrQueryParamsChange":return!Rh(i.url,t.url)||!Xl(i.queryParams,t.queryParams);case"always":return!0;case"paramsOrQueryParamsChange":return!mI(i,t)||!Xl(i.queryParams,t.queryParams);default:return!mI(i,t)}}(o,s,s.routeConfig.runGuardsAndResolvers);l?r.canActivateChecks.push(new D3(n)):(s.data=o.data,s._resolvedData=o._resolvedData),Ny(i,t,s.component?a?a.children:null:e,n,r),l&&a&&a.outlet&&a.outlet.isActivated&&r.canDeactivateChecks.push(new bM(a.outlet.component,o))}else o&&By(t,a,r),r.canActivateChecks.push(new D3(n)),Ny(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]}),os(s,(o,a)=>By(o,e.getContext(a),r)),r}function By(i,t,e){const n=ym(i),r=i.value;os(n,(s,o)=>{By(s,r.component?t?t.children.getContext(o):null:t,e)}),e.canDeactivateChecks.push(new bM(r.component&&t&&t.outlet&&t.outlet.isActivated?t.outlet.component:null,r))}function Uy(i){return"function"==typeof i}function bI(i){return i instanceof fm||"EmptyError"===i?.name}const xM=Symbol("INITIAL_VALUE");function wm(){return Rs(i=>nu(i.map(t=>t.pipe(Oi(1),Ao(xM)))).pipe(et(t=>{for(const e of t)if(!0!==e){if(e===xM)return xM;if(!1===e||e instanceof au)return e}return!0}),gn(t=>t!==xM),Oi(1)))}function T3(i){return function CE(...i){return a0(i)}(Vi(t=>{if(kh(t))throw x3(0,t)}),et(t=>!0===t))}const xI={matched:!1,consumedSegments:[],remainingSegments:[],parameters:{},positionalParamSegments:{}};function I3(i,t,e,n,r){const s=wI(i,t,e);return s.matched?function bX(i,t,e,n){const r=t.canMatch;return r&&0!==r.length?ht(r.map(o=>{const a=xm(o,i);return ou(function cX(i){return i&&Uy(i.canMatch)}(a)?a.canMatch(t,e):i.runInContext(()=>a(t,e)))})).pipe(wm(),T3()):ht(!0)}(n=E3(t,n),t,e).pipe(et(o=>!0===o?s:{...xI})):ht(s)}function wI(i,t,e){if(""===t.path)return"full"===t.pathMatch&&(i.hasChildren()||e.length>0)?{...xI}:{matched:!0,consumedSegments:[],remainingSegments:e,parameters:{},positionalParamSegments:{}};const r=(t.matcher||tq)(e,i,t);if(!r)return{...xI};const s={};os(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 wM(i,t,e,n){if(e.length>0&&function MX(i,t,e){return e.some(n=>MM(i,t,n)&&Da(n)!==_n)}(i,e,n)){const s=new Tn(t,function wX(i,t,e,n){const r={};r[_n]=n,n._sourceSegment=i,n._segmentIndexShift=t.length;for(const s of e)if(""===s.path&&Da(s)!==_n){const o=new Tn([],{});o._sourceSegment=i,o._segmentIndexShift=t.length,r[Da(s)]=o}return r}(i,t,n,new Tn(e,i.children)));return s._sourceSegment=i,s._segmentIndexShift=t.length,{segmentGroup:s,slicedSegments:[]}}if(0===e.length&&function CX(i,t,e){return e.some(n=>MM(i,t,n))}(i,e,n)){const s=new Tn(i.segments,function xX(i,t,e,n,r){const s={};for(const o of n)if(MM(i,e,o)&&!r[Da(o)]){const a=new Tn([],{});a._sourceSegment=i,a._segmentIndexShift=t.length,s[Da(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 Tn(i.segments,i.children);return r._sourceSegment=i,r._segmentIndexShift=t.length,{segmentGroup:r,slicedSegments:e}}function MM(i,t,e){return(!(i.hasChildren()||t.length>0)||"full"!==e.pathMatch)&&""===e.path}function R3(i,t,e,n){return!!(Da(i)===n||n!==_n&&MM(t,e,i))&&("**"===i.path||wI(t,i,e).matched)}function k3(i,t,e){return 0===t.length&&!i.children[e]}const CM=!1;class SM{constructor(t){this.segmentGroup=t||null}}class P3{constructor(t){this.urlTree=t}}function Vy(i){return pm(new SM(i))}function O3(i){return pm(new P3(i))}class DX{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=wM(this.urlTree.root,[],[],this.config).segmentGroup,e=new Tn(t.segments,t.children);return this.expandSegmentGroup(this.injector,this.config,e,_n).pipe(et(s=>this.createUrlTree(mM(s),this.urlTree.queryParams,this.urlTree.fragment))).pipe(Wc(s=>{if(s instanceof P3)return this.allowRedirects=!1,this.match(s.urlTree);throw s instanceof SM?this.noMatchError(s):s}))}match(t){return this.expandSegmentGroup(this.injector,this.config,t.root,_n).pipe(et(r=>this.createUrlTree(mM(r),t.queryParams,t.fragment))).pipe(Wc(r=>{throw r instanceof SM?this.noMatchError(r):r}))}noMatchError(t){return new pe(4002,CM)}createUrlTree(t,e,n){const r=sI(t);return new au(r,e,n)}expandSegmentGroup(t,e,n,r){return 0===n.segments.length&&n.hasChildren()?this.expandChildren(t,e,n).pipe(et(s=>new Tn([],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 Ni(r).pipe(ru(s=>{const o=n.children[s],a=A3(e,s);return this.expandSegmentGroup(t,a,o,s).pipe(et(l=>({segment:l,outlet:s})))}),tI((s,o)=>(s[o.outlet]=o.segment,s),{}),WB())}expandSegment(t,e,n,r,s,o){return Ni(n).pipe(ru(a=>this.expandSegmentAgainstRoute(t,e,n,a,r,s,o).pipe(Wc(c=>{if(c instanceof SM)return ht(null);throw c}))),iu(a=>!!a),Wc((a,l)=>{if(bI(a))return k3(e,r,s)?ht(new Tn([],{})):Vy(e);throw a}))}expandSegmentAgainstRoute(t,e,n,r,s,o,a){return R3(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):Vy(e):Vy(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("/")?O3(s):this.lineralizeSegments(n,s).pipe(ir(o=>{const a=new Tn(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:d}=wI(e,r,s);if(!a)return Vy(e);const h=this.applyRedirectCommands(l,r.redirectTo,d);return r.redirectTo.startsWith("/")?O3(h):this.lineralizeSegments(r,h).pipe(ir(p=>this.expandSegment(t,e,n,p.concat(c),o,!1)))}matchSegmentAgainstRoute(t,e,n,r,s){return"**"===n.path?(t=E3(n,t),n.loadChildren?(n._loadedRoutes?ht({routes:n._loadedRoutes,injector:n._loadedInjector}):this.configLoader.loadChildren(t,n)).pipe(et(a=>(n._loadedRoutes=a.routes,n._loadedInjector=a.injector,new Tn(r,{})))):ht(new Tn(r,{}))):I3(e,n,r,t).pipe(Rs(({matched:o,consumedSegments:a,remainingSegments:l})=>o?this.getChildConfig(t=n._injector??t,n,r).pipe(ir(d=>{const h=d.injector??t,p=d.routes,{segmentGroup:m,slicedSegments:g}=wM(e,a,l,p),b=new Tn(m.segments,m.children);if(0===g.length&&b.hasChildren())return this.expandChildren(h,p,b).pipe(et(x=>new Tn(a,x)));if(0===p.length&&0===g.length)return ht(new Tn(a,{}));const v=Da(n)===s;return this.expandSegment(h,b,p,g,v?_n:s,!0).pipe(et(M=>new Tn(a.concat(M.segments),M.children)))})):Vy(e)))}getChildConfig(t,e,n){return e.children?ht({routes:e.children,injector:t}):e.loadChildren?void 0!==e._loadedRoutes?ht({routes:e._loadedRoutes,injector:e._loadedInjector}):function yX(i,t,e,n){const r=t.canLoad;return void 0===r||0===r.length?ht(!0):ht(r.map(o=>{const a=xm(o,i);return ou(function sX(i){return i&&Uy(i.canLoad)}(a)?a.canLoad(t,e):i.runInContext(()=>a(t,e)))})).pipe(wm(),T3())}(t,e,n).pipe(ir(r=>r?this.configLoader.loadChildren(t,e).pipe(Vi(s=>{e._loadedRoutes=s.routes,e._loadedInjector=s.injector})):function EX(i){return pm(w3(CM,3))}())):ht({routes:[],injector:t})}lineralizeSegments(t,e){let n=[],r=e.root;for(;;){if(n=n.concat(r.segments),0===r.numberOfChildren)return ht(n);if(r.numberOfChildren>1||!r.children[_n])return t.redirectTo,pm(new pe(4e3,CM));r=r.children[_n]}}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 au(s,this.createQueryParams(e.queryParams,this.urlTree.queryParams),e.fragment)}createQueryParams(t,e){const n={};return os(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 os(e.children,(a,l)=>{o[l]=this.createSegmentGroup(t,a,n,r)}),new Tn(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 pe(4001,CM);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 IX{}class PX{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=wM(this.urlTree.root,[],[],this.config.filter(e=>void 0===e.redirectTo)).segmentGroup;return this.processSegmentGroup(this.injector,this.config,t,_n).pipe(et(e=>{if(null===e)return null;const n=new vM([],Object.freeze({}),Object.freeze({...this.urlTree.queryParams}),this.urlTree.fragment,{},_n,this.rootComponentType,null,this.urlTree.root,-1,{}),r=new jc(n,e),s=new y3(this.url,r);return this.inheritParamsAndData(s._root),s}))}inheritParamsAndData(t){const e=t.value,n=v3(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 Ni(Object.keys(n.children)).pipe(ru(r=>{const s=n.children[r],o=A3(e,r);return this.processSegmentGroup(t,o,s,r)}),tI((r,s)=>r&&s?(r.push(...s),r):null),jB(r=>null!==r),lM(null),WB(),et(r=>{if(null===r)return null;const s=L3(r);return function OX(i){i.sort((t,e)=>t.value.outlet===_n?-1:e.value.outlet===_n?1:t.value.outlet.localeCompare(e.value.outlet))}(s),s}))}processSegment(t,e,n,r,s){return Ni(e).pipe(ru(o=>this.processSegmentAgainstRoute(o._injector??t,o,n,r,s)),iu(o=>!!o),Wc(o=>{if(bI(o))return k3(n,r,s)?ht([]):ht(null);throw o}))}processSegmentAgainstRoute(t,e,n,r,s){if(e.redirectTo||!R3(e,n,r,s))return ht(null);let o;if("**"===e.path){const a=r.length>0?KB(r).parameters:{},l=B3(n)+r.length;o=ht({snapshot:new vM(r,a,Object.freeze({...this.urlTree.queryParams}),this.urlTree.fragment,U3(e),Da(e),e.component??e._loadedComponent??null,e,N3(n),l,V3(e)),consumedSegments:[],remainingSegments:[]})}else o=I3(n,e,r,t).pipe(et(({matched:a,consumedSegments:l,remainingSegments:c,parameters:d})=>{if(!a)return null;const h=B3(n)+l.length;return{snapshot:new vM(l,d,Object.freeze({...this.urlTree.queryParams}),this.urlTree.fragment,U3(e),Da(e),e.component??e._loadedComponent??null,e,N3(n),h,V3(e)),consumedSegments:l,remainingSegments:c}}));return o.pipe(Rs(a=>{if(null===a)return ht(null);const{snapshot:l,consumedSegments:c,remainingSegments:d}=a;t=e._injector??t;const h=e._loadedInjector??t,p=function FX(i){return i.children?i.children:i.loadChildren?i._loadedRoutes:[]}(e),{segmentGroup:m,slicedSegments:g}=wM(n,c,d,p.filter(v=>void 0===v.redirectTo));if(0===g.length&&m.hasChildren())return this.processChildren(h,p,m).pipe(et(v=>null===v?null:[new jc(l,v)]));if(0===p.length&&0===g.length)return ht([new jc(l,[])]);const b=Da(e)===s;return this.processSegment(h,p,m,g,b?_n:s).pipe(et(v=>null===v?null:[new jc(l,v)]))}))}}function LX(i){const t=i.value.routeConfig;return t&&""===t.path&&void 0===t.redirectTo}function L3(i){const t=[],e=new Set;for(const n of i){if(!LX(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=L3(n.children);t.push(new jc(n.value,r))}return t.filter(n=>!e.has(n))}function N3(i){let t=i;for(;t._sourceSegment;)t=t._sourceSegment;return t}function B3(i){let t=i,e=t._segmentIndexShift??0;for(;t._sourceSegment;)t=t._sourceSegment,e+=t._segmentIndexShift??0;return e-1}function U3(i){return i.data||{}}function V3(i){return i.resolve||{}}function z3(i){return"string"==typeof i.title||null===i.title}function MI(i){return Rs(t=>{const e=i(t);return e?Ni(e).pipe(et(()=>t)):ht(t)})}const Mm=new me("ROUTES");let CI=(()=>{class i{constructor(){this.componentLoaders=new WeakMap,this.childrenLoaders=new WeakMap,this.compiler=Ft(mN)}loadComponent(e){if(this.componentLoaders.get(e))return this.componentLoaders.get(e);if(e._loadedComponent)return ht(e._loadedComponent);this.onLoadStartListener&&this.onLoadStartListener(e);const n=ou(e.loadComponent()).pipe(et(G3),Vi(s=>{this.onLoadEndListener&&this.onLoadEndListener(e),e._loadedComponent=s}),su(()=>{this.componentLoaders.delete(e)})),r=new GB(n,()=>new Re).pipe(eI());return this.componentLoaders.set(e,r),r}loadChildren(e,n){if(this.childrenLoaders.get(n))return this.childrenLoaders.get(n);if(n._loadedRoutes)return ht({routes:n._loadedRoutes,injector:n._loadedInjector});this.onLoadStartListener&&this.onLoadStartListener(n);const s=this.loadModuleFactoryOrRoutes(n.loadChildren).pipe(et(a=>{this.onLoadEndListener&&this.onLoadEndListener(n);let l,c,d=!1;Array.isArray(a)?c=a:(l=a.create(e).injector,c=XB(l.get(Mm,[],Ot.Self|Ot.Optional)));return{routes:c.map(yI),injector:l}}),su(()=>{this.childrenLoaders.delete(n)})),o=new GB(s,()=>new Re).pipe(eI());return this.childrenLoaders.set(n,o),o}loadModuleFactoryOrRoutes(e){return ou(e()).pipe(et(G3),ir(n=>n instanceof D2||Array.isArray(n)?ht(n):Ni(this.compiler.compileModuleAsync(n))))}}return i.\u0275fac=function(e){return new(e||i)},i.\u0275prov=ke({token:i,factory:i.\u0275fac,providedIn:"root"}),i})();function G3(i){return function $X(i){return i&&"object"==typeof i&&"default"in i}(i)?i.default:i}let AM=(()=>{class i{get hasRequestedNavigation(){return 0!==this.navigationId}constructor(){this.currentNavigation=null,this.lastSuccessfulNavigation=null,this.events=new Re,this.configLoader=Ft(CI),this.environmentInjector=Ft(to),this.urlSerializer=Ft(Ty),this.rootContexts=Ft(Fy),this.navigationId=0,this.afterPreactivation=()=>ht(void 0),this.rootComponentType=null,this.configLoader.onLoadEndListener=r=>this.events.next(new Rq(r)),this.configLoader.onLoadStartListener=r=>this.events.next(new Iq(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 gt({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:Py,restoredState:null,currentSnapshot:e.routerState.snapshot,targetSnapshot:null,currentRouterState:e.routerState,targetRouterState:null,guards:{canActivateChecks:[],canDeactivateChecks:[]},guardsResult:null}),this.transitions.pipe(gn(n=>0!==n.id),et(n=>({...n,extractedUrl:e.urlHandlingStrategy.extract(n.rawUrl)})),Rs(n=>{let r=!1,s=!1;return ht(n).pipe(Vi(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}}),Rs(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 d="";return this.events.next(new _M(o.id,e.serializeUrl(n.rawUrl),d,0)),e.rawUrlTree=o.rawUrl,o.resolve(null),po}if(e.urlHandlingStrategy.shouldProcessUrl(o.rawUrl))return $3(o.source)&&(e.browserUrlTree=o.extractedUrl),ht(o).pipe(Rs(d=>{const h=this.transitions?.getValue();return this.events.next(new cI(d.id,this.urlSerializer.serialize(d.extractedUrl),d.source,d.restoredState)),h!==this.transitions?.getValue()?po:Promise.resolve(d)}),function TX(i,t,e,n){return Rs(r=>function AX(i,t,e,n,r){return new DX(i,t,e,n,r).apply()}(i,t,e,r.extractedUrl,n).pipe(et(s=>({...r,urlAfterRedirects:s}))))}(this.environmentInjector,this.configLoader,this.urlSerializer,e.config),Vi(d=>{this.currentNavigation={...this.currentNavigation,finalUrl:d.urlAfterRedirects},n.urlAfterRedirects=d.urlAfterRedirects}),function BX(i,t,e,n,r){return ir(s=>function kX(i,t,e,n,r,s,o="emptyOnly"){return new PX(i,t,e,n,r,o,s).recognize().pipe(Rs(a=>null===a?function RX(i){return new In(t=>t.error(i))}(new IX):ht(a)))}(i,t,e,s.urlAfterRedirects,n.serialize(s.urlAfterRedirects),n,r).pipe(et(o=>({...s,targetSnapshot:o}))))}(this.environmentInjector,this.rootComponentType,e.config,this.urlSerializer,e.paramsInheritanceStrategy),Vi(d=>{if(n.targetSnapshot=d.targetSnapshot,"eager"===e.urlUpdateStrategy){if(!d.extras.skipLocationChange){const p=e.urlHandlingStrategy.merge(d.urlAfterRedirects,d.rawUrl);e.setBrowserUrl(p,d)}e.browserUrlTree=d.urlAfterRedirects}const h=new Sq(d.id,this.urlSerializer.serialize(d.extractedUrl),this.urlSerializer.serialize(d.urlAfterRedirects),d.targetSnapshot);this.events.next(h)}));if(l&&e.urlHandlingStrategy.shouldProcessUrl(e.rawUrlTree)){const{id:d,extractedUrl:h,source:p,restoredState:m,extras:g}=o,b=new cI(d,this.urlSerializer.serialize(h),p,m);this.events.next(b);const v=_3(h,this.rootComponentType).snapshot;return ht(n={...o,targetSnapshot:v,urlAfterRedirects:h,extras:{...g,skipLocationChange:!1,replaceUrl:!1}})}{const d="";return this.events.next(new _M(o.id,e.serializeUrl(n.extractedUrl),d,1)),e.rawUrlTree=o.rawUrl,o.resolve(null),po}}),Vi(o=>{const a=new Eq(o.id,this.urlSerializer.serialize(o.extractedUrl),this.urlSerializer.serialize(o.urlAfterRedirects),o.targetSnapshot);this.events.next(a)}),et(o=>n={...o,guards:eX(o.targetSnapshot,o.currentSnapshot,this.rootContexts)}),function uX(i,t){return ir(e=>{const{targetSnapshot:n,currentSnapshot:r,guards:{canActivateChecks:s,canDeactivateChecks:o}}=e;return 0===o.length&&0===s.length?ht({...e,guardsResult:!0}):function hX(i,t,e,n){return Ni(i).pipe(ir(r=>function vX(i,t,e,n,r){const s=t&&t.routeConfig?t.routeConfig.canDeactivate:null;return s&&0!==s.length?ht(s.map(a=>{const l=Ly(t)??r,c=xm(a,l);return ou(function lX(i){return i&&Uy(i.canDeactivate)}(c)?c.canDeactivate(i,t,e,n):l.runInContext(()=>c(i,t,e,n))).pipe(iu())})).pipe(wm()):ht(!0)}(r.component,r.route,e,t,n)),iu(r=>!0!==r,!0))}(o,n,r,i).pipe(ir(a=>a&&function rX(i){return"boolean"==typeof i}(a)?function fX(i,t,e,n){return Ni(t).pipe(ru(r=>Sy(function mX(i,t){return null!==i&&t&&t(new kq(i)),ht(!0)}(r.route.parent,n),function pX(i,t){return null!==i&&t&&t(new Oq(i)),ht(!0)}(r.route,n),function _X(i,t,e){const n=t[t.length-1],s=t.slice(0,t.length-1).reverse().map(o=>function tX(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=>Ey(()=>ht(o.guards.map(l=>{const c=Ly(o.node)??e,d=xm(l,c);return ou(function aX(i){return i&&Uy(i.canActivateChild)}(d)?d.canActivateChild(n,i):c.runInContext(()=>d(n,i))).pipe(iu())})).pipe(wm())));return ht(s).pipe(wm())}(i,r.path,e),function gX(i,t,e){const n=t.routeConfig?t.routeConfig.canActivate:null;if(!n||0===n.length)return ht(!0);const r=n.map(s=>Ey(()=>{const o=Ly(t)??e,a=xm(s,o);return ou(function oX(i){return i&&Uy(i.canActivate)}(a)?a.canActivate(t,i):o.runInContext(()=>a(t,i))).pipe(iu())}));return ht(r).pipe(wm())}(i,r.route,e))),iu(r=>!0!==r,!0))}(n,s,i,t):ht(a)),et(a=>({...e,guardsResult:a})))})}(this.environmentInjector,o=>this.events.next(o)),Vi(o=>{if(n.guardsResult=o.guardsResult,kh(o.guardsResult))throw x3(0,o.guardsResult);const a=new Aq(o.id,this.urlSerializer.serialize(o.extractedUrl),this.urlSerializer.serialize(o.urlAfterRedirects),o.targetSnapshot,!!o.guardsResult);this.events.next(a)}),gn(o=>!!o.guardsResult||(e.restoreHistory(o),this.cancelNavigationTransition(o,"",3),!1)),MI(o=>{if(o.guards.canActivateChecks.length)return ht(o).pipe(Vi(a=>{const l=new Dq(a.id,this.urlSerializer.serialize(a.extractedUrl),this.urlSerializer.serialize(a.urlAfterRedirects),a.targetSnapshot);this.events.next(l)}),Rs(a=>{let l=!1;return ht(a).pipe(function UX(i,t){return ir(e=>{const{targetSnapshot:n,guards:{canActivateChecks:r}}=e;if(!r.length)return ht(e);let s=0;return Ni(r).pipe(ru(o=>function VX(i,t,e,n){const r=i.routeConfig,s=i._resolve;return void 0!==r?.title&&!z3(r)&&(s[Ay]=r.title),function zX(i,t,e,n){const r=function HX(i){return[...Object.keys(i),...Object.getOwnPropertySymbols(i)]}(i);if(0===r.length)return ht({});const s={};return Ni(r).pipe(ir(o=>function GX(i,t,e,n){const r=Ly(t)??n,s=xm(i,r);return ou(s.resolve?s.resolve(t,e):r.runInContext(()=>s(t,e)))}(i[o],t,e,n).pipe(iu(),Vi(a=>{s[o]=a}))),nI(1),YB(s),Wc(o=>bI(o)?po:pm(o)))}(s,i,t,n).pipe(et(o=>(i._resolvedData=o,i.data=v3(i,e).resolve,r&&z3(r)&&(i.data[Ay]=r.title),null)))}(o.route,n,i,t)),Vi(()=>s++),nI(1),ir(o=>s===r.length?ht(e):po))})}(e.paramsInheritanceStrategy,this.environmentInjector),Vi({next:()=>l=!0,complete:()=>{l||(e.restoreHistory(a),this.cancelNavigationTransition(a,"",2))}}))}),Vi(a=>{const l=new Tq(a.id,this.urlSerializer.serialize(a.extractedUrl),this.urlSerializer.serialize(a.urlAfterRedirects),a.targetSnapshot);this.events.next(l)}))}),MI(o=>{const a=l=>{const c=[];l.routeConfig?.loadComponent&&!l.routeConfig._loadedComponent&&c.push(this.configLoader.loadComponent(l.routeConfig).pipe(Vi(d=>{l.component=d}),et(()=>{})));for(const d of l.children)c.push(...a(d));return c};return nu(a(o.targetSnapshot.root)).pipe(lM(),Oi(1))}),MI(()=>this.afterPreactivation()),et(o=>{const a=function Gq(i,t,e){const n=Oy(i,t._root,e?e._root:void 0);return new g3(n,t)}(e.routeReuseStrategy,o.targetSnapshot,o.currentRouterState);return n={...o,targetRouterState:a}}),Vi(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)=>et(n=>(new Jq(t,n.targetRouterState,n.currentRouterState,e).activate(i),n)))(this.rootContexts,e.routeReuseStrategy,o=>this.events.next(o)),Oi(1),Vi({next:o=>{r=!0,this.lastSuccessfulNavigation=this.currentNavigation,e.navigated=!0,this.events.next(new Ph(o.id,this.urlSerializer.serialize(o.extractedUrl),this.urlSerializer.serialize(e.currentUrlTree))),e.titleStrategy?.updateTitle(o.targetRouterState.snapshot),o.resolve(!0)},complete:()=>{r=!0}}),su(()=>{r||s||this.cancelNavigationTransition(n,"",1),this.currentNavigation?.id===n.id&&(this.currentNavigation=null)}),Wc(o=>{if(s=!0,C3(o)){M3(o)||(e.navigated=!0,e.restoreHistory(n,!0));const a=new gM(n.id,this.urlSerializer.serialize(n.extractedUrl),o.message,o.cancellationCode);if(this.events.next(a),M3(o)){const l=e.urlHandlingStrategy.merge(o.url,e.rawUrlTree),c={skipLocationChange:n.extras.skipLocationChange,replaceUrl:"eager"===e.urlUpdateStrategy||$3(n.source)};e.scheduleNavigation(l,Py,null,c,{resolve:n.resolve,reject:n.reject,promise:n.promise})}else n.resolve(!1)}else{e.restoreHistory(n,!0);const a=new dI(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 po}))}))}cancelNavigationTransition(e,n,r){const s=new gM(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=ke({token:i,factory:i.\u0275fac,providedIn:"root"}),i})();function $3(i){return i!==Py}let W3=(()=>{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===_n);return n}getResolvedTitleForRoute(e){return e.data[Ay]}}return i.\u0275fac=function(e){return new(e||i)},i.\u0275prov=ke({token:i,factory:function(){return Ft(WX)},providedIn:"root"}),i})(),WX=(()=>{class i extends W3{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)(ee(LB))},i.\u0275prov=ke({token:i,factory:i.\u0275fac,providedIn:"root"}),i})(),jX=(()=>{class i{}return i.\u0275fac=function(e){return new(e||i)},i.\u0275prov=ke({token:i,factory:function(){return Ft(qX)},providedIn:"root"}),i})();class YX{shouldDetach(t){return!1}store(t,e){}shouldAttach(t){return!1}retrieve(t){return null}shouldReuseRoute(t,e){return t.routeConfig===e.routeConfig}}let qX=(()=>{class i extends YX{}return i.\u0275fac=function(){let t;return function(n){return(t||(t=ri(i)))(n||i)}}(),i.\u0275prov=ke({token:i,factory:i.\u0275fac,providedIn:"root"}),i})();const DM=new me("",{providedIn:"root",factory:()=>({})});let KX=(()=>{class i{}return i.\u0275fac=function(e){return new(e||i)},i.\u0275prov=ke({token:i,factory:function(){return Ft(ZX)},providedIn:"root"}),i})(),ZX=(()=>{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=ke({token:i,factory:i.\u0275fac,providedIn:"root"}),i})();function QX(i){throw i}function JX(i,t,e){return t.parse("/")}const eK={paths:"exact",fragment:"ignored",matrixParams:"ignored",queryParams:"exact"},tK={paths:"subset",fragment:"ignored",matrixParams:"ignored",queryParams:"subset"};let Yo=(()=>{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=Ft(F6),this.isNgZoneEnabled=!1,this.options=Ft(DM,{optional:!0})||{},this.errorHandler=this.options.errorHandler||QX,this.malformedUriErrorHandler=this.options.malformedUriErrorHandler||JX,this.navigated=!1,this.lastSuccessfulId=-1,this.urlHandlingStrategy=Ft(KX),this.routeReuseStrategy=Ft(jX),this.urlCreationStrategy=Ft(Vq),this.titleStrategy=Ft(W3),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=XB(Ft(Mm,{optional:!0})??[]),this.navigationTransitions=Ft(AM),this.urlSerializer=Ft(Ty),this.location=Ft(_y),this.isNgZoneEnabled=Ft(ft)instanceof ft&&ft.isInAngularZone(),this.resetConfig(this.config),this.currentUrlTree=new au,this.rawUrlTree=this.currentUrlTree,this.browserUrlTree=this.currentUrlTree,this.routerState=_3(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),Py,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(yI),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 d=null;switch(a){case"merge":d={...this.currentUrlTree.queryParams,...s};break;case"preserve":d=this.currentUrlTree.queryParams;break;default:d=s||null}return null!==d&&(d=this.removeEmptyProps(d)),this.urlCreationStrategy.createUrlTree(r,this.routerState,this.currentUrlTree,e,d,c??null)}navigateByUrl(e,n={skipLocationChange:!1}){const r=kh(e)?e:this.parseUrl(e),s=this.urlHandlingStrategy.merge(r,this.rawUrlTree);return this.scheduleNavigation(s,Py,null,n)}navigate(e,n={skipLocationChange:!1}){return function nK(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,d;return o?(a=o.resolve,l=o.reject,c=o.promise):c=new Promise((h,p)=>{a=h,l=p}),d="computed"===this.canceledNavigationResolution?r&&r.\u0275routerPageId?r.\u0275routerPageId:(this.browserPageId??0)+1:0,this.navigationTransitions.handleNavigationRequest({targetPageId:d,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=ke({token:i,factory:i.\u0275fac,providedIn:"root"}),i})();class j3{}let sK=(()=>{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(gn(e=>e instanceof Ph),ru(()=>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=Fw(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 Ni(r).pipe(yd())}preloadConfig(e,n){return this.preloadingStrategy.preload(n,()=>{let r;r=n.loadChildren&&void 0===n.canLoad?this.loader.loadChildren(e,n):ht(null);const s=r.pipe(ir(o=>null===o?ht(void 0):(n._loadedRoutes=o.routes,n._loadedInjector=o.injector,this.processRoutes(o.injector??e,o.routes))));return n.loadComponent&&!n._loadedComponent?Ni([s,this.loader.loadComponent(n)]).pipe(yd()):s})}}return i.\u0275fac=function(e){return new(e||i)(ee(Yo),ee(mN),ee(to),ee(j3),ee(CI))},i.\u0275prov=ke({token:i,factory:i.\u0275fac,providedIn:"root"}),i})();const AI=new me("");let Y3=(()=>{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 cI?(this.store[this.lastId]=this.viewportScroller.getScrollPosition(),this.lastSource=e.navigationTrigger,this.restoredId=e.restoredState?e.restoredState.navigationId:0):e instanceof Ph&&(this.lastId=e.id,this.scheduleScrollEvent(e,this.urlSerializer.parse(e.urlAfterRedirects).fragment))})}consumeScrollEvents(){return this.transitions.events.subscribe(e=>{e instanceof p3&&(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 p3(e,"popstate"===this.lastSource?this.store[this.restoredId]:null,n))})},0)})}ngOnDestroy(){this.routerEventsSubscription?.unsubscribe(),this.scrollEventsSubscription?.unsubscribe()}}return i.\u0275fac=function(e){xo()},i.\u0275prov=ke({token:i,factory:i.\u0275fac}),i})();var qo=(()=>((qo=qo||{})[qo.COMPLETE=0]="COMPLETE",qo[qo.FAILED=1]="FAILED",qo[qo.REDIRECTING=2]="REDIRECTING",qo))();const Cm=!1;function lu(i,t){return{\u0275kind:i,\u0275providers:t}}const DI=new me("",{providedIn:"root",factory:()=>!1});function X3(){const i=Ft($i);return t=>{const e=i.get(dm);if(t!==e.components[0])return;const n=i.get(Yo),r=i.get(K3);1===i.get(TI)&&n.initialNavigation(),i.get(Z3,null,Ot.Optional)?.setUpPreloading(),i.get(AI,null,Ot.Optional)?.init(),n.resetRootComponentType(e.componentTypes[0]),r.closed||(r.next(),r.complete(),r.unsubscribe())}}const K3=new me(Cm?"bootstrap done indicator":"",{factory:()=>new Re}),TI=new me(Cm?"initial navigation":"",{providedIn:"root",factory:()=>1});function dK(){let i=[];return i=Cm?[{provide:Np,multi:!0,useFactory:()=>{const t=Ft(Yo);return()=>t.events.subscribe(e=>{console.group?.(`Router Event: ${e.constructor.name}`),console.log(function Lq(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?.()})}}]:[],lu(1,i)}const Z3=new me(Cm?"router preloader":"");function uK(i){return lu(0,[{provide:Z3,useExisting:sK},{provide:j3,useExisting:i}])}const zy=!1,Q3=new me(zy?"router duplicate forRoot guard":"ROUTER_FORROOT_GUARD"),hK=[_y,{provide:Ty,useClass:iI},Yo,Fy,{provide:bm,useFactory:function q3(i){return i.routerState.root},deps:[Yo]},CI,zy?{provide:DI,useValue:!0}:[]];function fK(){return new MN("Router",Yo)}let J3=(()=>{class i{constructor(e){}static forRoot(e,n){return{ngModule:i,providers:[hK,zy&&n?.enableTracing?dK().\u0275providers:[],{provide:Mm,multi:!0,useValue:e},{provide:Q3,useFactory:_K,deps:[[Yo,new Ss,new xa]]},{provide:DM,useValue:n||{}},n?.useHash?{provide:Ih,useClass:M9}:{provide:Ih,useClass:jN},{provide:AI,useFactory:()=>{const i=Ft(BY),t=Ft(ft),e=Ft(DM),n=Ft(AM),r=Ft(Ty);return e.scrollOffset&&i.setOffset(e.scrollOffset),new Y3(r,n,i,t,e)}},n?.preloadingStrategy?uK(n.preloadingStrategy).\u0275providers:[],{provide:MN,multi:!0,useFactory:fK},n?.initialNavigation?vK(n):[],[{provide:eU,useFactory:X3},{provide:wN,multi:!0,useExisting:eU}]]}}static forChild(e){return{ngModule:i,providers:[{provide:Mm,multi:!0,useValue:e}]}}}return i.\u0275fac=function(e){return new(e||i)(ee(Q3,8))},i.\u0275mod=nn({type:i}),i.\u0275inj=Kt({imports:[_I]}),i})();function _K(i){if(zy&&i)throw new pe(4007,"The Router was provided more than once. This can happen if 'forRoot' is used outside of the root injector. Lazy loaded modules should use RouterModule.forChild() instead.");return"guarded"}function vK(i){return["disabled"===i.initialNavigation?lu(3,[{provide:Uw,multi:!0,useFactory:()=>{const t=Ft(Yo);return()=>{t.setUpLocationChangeListener()}}},{provide:TI,useValue:2}]).\u0275providers:[],"enabledBlocking"===i.initialNavigation?lu(2,[{provide:TI,useValue:0},{provide:Uw,multi:!0,deps:[$i],useFactory:t=>{const e=t.get(x9,Promise.resolve());return()=>e.then(()=>new Promise(n=>{const r=t.get(Yo),s=t.get(K3);(function oK(i,t){i.events.pipe(gn(e=>e instanceof Ph||e instanceof gM||e instanceof dI||e instanceof _M),et(e=>e instanceof Ph||e instanceof _M?qo.COMPLETE:e instanceof gM&&(0===e.code||1===e.code)?qo.REDIRECTING:qo.FAILED),gn(e=>e!==qo.REDIRECTING),Oi(1)).subscribe(()=>{t()})})(r,()=>{n(!0)}),t.get(AM).afterPreactivation=()=>(n(!0),s.closed?ht(void 0):s),r.initialNavigation()}))}}]).\u0275providers:[]]}const eU=new me(zy?"Router Initializer":""),bK=[];let xK=(()=>{class i{}return i.\u0275fac=function(e){return new(e||i)},i.\u0275mod=nn({type:i}),i.\u0275inj=Kt({imports:[J3.forRoot(bK),J3]}),i})();function tU(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 tt(i){return function(){var t=this,e=arguments;return new Promise(function(n,r){var s=i.apply(t,e);function o(l){tU(s,n,r,o,a,"next",l)}function a(l){tU(s,n,r,o,a,"throw",l)}o(void 0)})}}function Jt(i){return null!=i&&"false"!=`${i}`}function ks(i,t=0){return function wK(i){return!isNaN(parseFloat(i))&&!isNaN(Number(i))}(i)?Number(i):t}function TM(i){return Array.isArray(i)?i:[i]}function gr(i){return null==i?"":"string"==typeof i?i:`${i}px`}function Yc(i){return i instanceof mt?i.nativeElement:i}const MK=["addListener","removeListener"],CK=["addEventListener","removeEventListener"],SK=["on","off"];function Ta(i,t,e,n){if(cn(e)&&(n=e,e=void 0),n)return Ta(i,t,e).pipe(JT(n));const[r,s]=function DK(i){return cn(i.addEventListener)&&cn(i.removeEventListener)}(i)?CK.map(o=>a=>i[o](t,a,e)):function EK(i){return cn(i.addListener)&&cn(i.removeListener)}(i)?MK.map(nU(i,t)):function AK(i){return cn(i.on)&&cn(i.off)}(i)?SK.map(nU(i,t)):[];if(!r&&i_(i))return ir(o=>Ta(o,t,e))(wr(i));if(!r)throw new TypeError("Invalid event target");return new In(o=>{const a=(...l)=>o.next(1s(a)})}function nU(i,t){return e=>n=>i[e](t,n)}class TK extends Zt{constructor(t,e){super()}schedule(t,e=0){return this}}const IM={setInterval(i,t,...e){const{delegate:n}=IM;return n?.setInterval?n.setInterval(i,t,...e):setInterval(i,t,...e)},clearInterval(i){const{delegate:t}=IM;return(t?.clearInterval||clearInterval)(i)},delegate:void 0};class II extends TK{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 IM.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&&IM.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,Kr(n,this),null!=t&&(this.id=this.recycleAsyncId(e,t,null)),this.delay=null,super.unsubscribe()}}}const Hy={schedule(i){let t=requestAnimationFrame,e=cancelAnimationFrame;const{delegate:n}=Hy;n&&(t=n.requestAnimationFrame,e=n.cancelAnimationFrame);const r=t(s=>{e=void 0,i(s)});return new Zt(()=>e?.(r))},requestAnimationFrame(...i){const{delegate:t}=Hy;return(t?.requestAnimationFrame||requestAnimationFrame)(...i)},cancelAnimationFrame(...i){const{delegate:t}=Hy;return(t?.cancelAnimationFrame||cancelAnimationFrame)(...i)},delegate:void 0},iU={now:()=>(iU.delegate||Date).now(),delegate:void 0};class Gy{constructor(t,e=Gy.now){this.schedulerActionCtor=t,this.now=e}schedule(t,e=0,n){return new this.schedulerActionCtor(this,t).schedule(n,e)}}Gy.now=iU.now;class RI extends Gy{constructor(t,e=Gy.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 kK=new class RK extends RI{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 IK extends II{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=Hy.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&&(Hy.cancelAnimationFrame(e),t._scheduled=void 0)}});let kI,PK=1;const RM={};function rU(i){return i in RM&&(delete RM[i],!0)}const OK={setImmediate(i){const t=PK++;return RM[t]=!0,kI||(kI=Promise.resolve()),kI.then(()=>rU(t)&&i()),t},clearImmediate(i){rU(i)}},{setImmediate:FK,clearImmediate:LK}=OK,kM={setImmediate(...i){const{delegate:t}=kM;return(t?.setImmediate||FK)(...i)},clearImmediate(i){const{delegate:t}=kM;return(t?.clearImmediate||LK)(i)},delegate:void 0},PI=new class BK extends RI{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 NK extends II{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=kM.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&&(kM.clearImmediate(e),t._scheduled===e&&(t._scheduled=void 0))}}),$y=new RI(II),UK=$y;function OI(i=0,t,e=UK){let n=-1;return null!=t&&(Gu(t)?e=t:n=t),new In(r=>{let s=function zK(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 PM(i,t=$y){return function VK(i){return ti((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(Yn(e,c=>{n=!0,r=c,s||wr(i(c)).subscribe(s=Yn(e,a,l))},()=>{o=!0,(!n||!s||s.closed)&&e.complete()}))})}(()=>OI(i,t))}function He(i){return ti((t,e)=>{wr(i).subscribe(Yn(e,()=>e.complete(),ms)),!e.closed&&t.subscribe(e)})}let FI;try{FI=typeof Intl<"u"&&Intl.v8BreakIterator}catch{FI=!1}let Sm,zi=(()=>{class i{constructor(e){this._platformId=e,this.isBrowser=this._platformId?function NY(i){return i===hB}(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&&!FI)&&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)(ee(fT))},i.\u0275prov=ke({token:i,factory:i.\u0275fac,providedIn:"root"}),i})();const sU=["color","button","checkbox","date","datetime-local","email","file","hidden","image","month","number","password","radio","range","reset","search","submit","tel","text","time","url","week"];function oU(){if(Sm)return Sm;if("object"!=typeof document||!document)return Sm=new Set(sU),Sm;let i=document.createElement("input");return Sm=new Set(sU.filter(t=>(i.setAttribute("type",t),i.type===t))),Sm}let Wy,OM,Fh,LI;function Oh(i){return function HK(){if(null==Wy&&typeof window<"u")try{window.addEventListener("test",null,Object.defineProperty({},"passive",{get:()=>Wy=!0}))}finally{Wy=Wy||!1}return Wy}()?i:!!i.capture}function aU(){if(null==Fh){if("object"!=typeof document||!document||"function"!=typeof Element||!Element)return Fh=!1,Fh;if("scrollBehavior"in document.documentElement.style)Fh=!0;else{const i=Element.prototype.scrollTo;Fh=!!i&&!/\{\s*\[native code\]\s*\}/.test(i.toString())}}return Fh}function jy(){if("object"!=typeof document||!document)return 0;if(null==OM){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),OM=0,0===i.scrollLeft&&(i.scrollLeft=1,OM=0===i.scrollLeft?1:2),i.remove()}return OM}function FM(){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 cu(i){return i.composedPath?i.composedPath()[0]:i.target}function NI(){return typeof __karma__<"u"&&!!__karma__||typeof jasmine<"u"&&!!jasmine||typeof jest<"u"&&!!jest||typeof Mocha<"u"&&!!Mocha}const WK=new me("cdk-dir-doc",{providedIn:"root",factory:function jK(){return Ft(jt)}}),YK=/^(ar|ckb|dv|he|iw|fa|nqo|ps|sd|ug|ur|yi|.*[-_](Adlm|Arab|Hebr|Nkoo|Rohg|Thaa))(?!.*[-_](Latn|Cyrl)($|-|_))($|-|_)/i;let Ia=(()=>{class i{constructor(e){this.value="ltr",this.change=new We,e&&(this.value=function qK(i){const t=i?.toLowerCase()||"";return"auto"===t&&typeof navigator<"u"&&navigator?.language?YK.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)(ee(WK,8))},i.\u0275prov=ke({token:i,factory:i.\u0275fac,providedIn:"root"}),i})(),Yy=(()=>{class i{}return i.\u0275fac=function(e){return new(e||i)},i.\u0275mod=nn({type:i}),i.\u0275inj=Kt({}),i})();const XK=["contentWrapper"],KK=["*"],ZK=new me("VIRTUAL_SCROLL_STRATEGY");let qy=(()=>{class i{constructor(e,n,r){this._ngZone=e,this._platform=n,this._scrolled=new Re,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 In(n=>{this._globalSubscription||this._addGlobalListener();const r=e>0?this._scrolled.pipe(PM(e)).subscribe(n):this._scrolled.subscribe(n);return this._scrolledCount++,()=>{r.unsubscribe(),this._scrolledCount--,this._scrolledCount||this._removeGlobalListener()}}):ht()}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(gn(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=Yc(n),s=e.getElementRef().nativeElement;do{if(r==s)return!0}while(r=r.parentElement);return!1}_addGlobalListener(){this._globalSubscription=this._ngZone.runOutsideAngular(()=>Ta(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)(ee(ft),ee(zi),ee(jt,8))},i.\u0275prov=ke({token:i,factory:i.\u0275fac,providedIn:"root"}),i})(),lU=(()=>{class i{constructor(e,n,r,s){this.elementRef=e,this.scrollDispatcher=n,this.ngZone=r,this.dir=s,this._destroyed=new Re,this._elementScrolled=new In(o=>this.ngZone.runOutsideAngular(()=>Ta(this.elementRef.nativeElement,"scroll").pipe(He(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!=jy()?(null!=e.left&&(e.right=n.scrollWidth-n.clientWidth-e.left),2==jy()?e.left=e.right:1==jy()&&(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;aU()?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==jy()?e==n?s.scrollWidth-s.clientWidth-s.scrollLeft:s.scrollLeft:o&&1==jy()?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)(E(mt),E(qy),E(ft),E(Ia,8))},i.\u0275dir=ve({type:i,selectors:[["","cdk-scrollable",""],["","cdkScrollable",""]],standalone:!0}),i})(),LM=(()=>{class i{constructor(e,n,r){this._platform=e,this._change=new Re,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(PM(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)(ee(zi),ee(ft),ee(jt,8))},i.\u0275prov=ke({token:i,factory:i.\u0275fac,providedIn:"root"}),i})();const cU=new me("VIRTUAL_SCROLLABLE");let eZ=(()=>{class i extends lU{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)(E(mt),E(qy),E(ft),E(Ia,8))},i.\u0275dir=ve({type:i,features:[lt]}),i})();const nZ=typeof requestAnimationFrame<"u"?kK:PI;let iZ=(()=>{class i extends eZ{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=Ft(zi),this._detachedSubject=new Re,this._renderedRangeSubject=new Re,this._orientation="vertical",this._appendOnly=!1,this.scrolledIndexChange=new In(d=>this._scrollStrategy.scrolledIndexChange.subscribe(h=>Promise.resolve().then(()=>this.ngZone.run(()=>d.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=Zt.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(Ao(null),PM(0,nZ)).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(He(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 tZ(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)(E(mt),E(Zn),E(ft),E(ZK,8),E(Ia,8),E(qy),E(LM),E(cU,8))},i.\u0275cmp=ot({type:i,selectors:[["cdk-virtual-scroll-viewport"]],viewQuery:function(e,n){if(1&e&&Wn(XK,7),2&e){let r;Et(r=At())&&(n._contentWrapper=r.first)}},hostAttrs:[1,"cdk-virtual-scroll-viewport"],hostVars:4,hostBindings:function(e,n){2&e&&un("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:[Dn([{provide:lU,useFactory:(t,e)=>t||e,deps:[[new Ss,new vo(cU)],i]}]),lt,Z1],ngContentSelectors:KK,decls:4,vars:4,consts:[[1,"cdk-virtual-scroll-content-wrapper"],["contentWrapper",""],[1,"cdk-virtual-scroll-spacer"]],template:function(e,n){1&e&&(sr(),W(0,"div",0,1),Wt(2),j(),De(3,"div",2)),2&e&&(G(3),jo("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})(),Xy=(()=>{class i{}return i.\u0275fac=function(e){return new(e||i)},i.\u0275mod=nn({type:i}),i.\u0275inj=Kt({}),i})(),dU=(()=>{class i{}return i.\u0275fac=function(e){return new(e||i)},i.\u0275mod=nn({type:i}),i.\u0275inj=Kt({imports:[Yy,Xy,iZ,Yy,Xy]}),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 Lh 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 rZ extends BI{constructor(t){super(),this.element=t instanceof mt?t.nativeElement:t}}class NM{constructor(){this._isDisposed=!1,this.attachDomPortal=null}hasAttached(){return!!this._attachedPortal}attach(t){return t instanceof Lh?(this._attachedPortal=t,this.attachComponentPortal(t)):t instanceof Em?(this._attachedPortal=t,this.attachTemplatePortal(t)):this.attachDomPortal&&t instanceof rZ?(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 sZ extends NM{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||$i.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 NM{constructor(e,n,r){super(),this._componentFactoryResolver=e,this._viewContainerRef=n,this._isInitialized=!1,this.attached=new We,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)(E(Hl),E(Wr),E(jt))},i.\u0275dir=ve({type:i,selectors:[["","cdkPortalOutlet",""]],inputs:{portal:["cdkPortalOutlet","portal"]},outputs:{attached:"attached"},exportAs:["cdkPortalOutlet"],features:[lt]}),i})(),Nh=(()=>{class i{}return i.\u0275fac=function(e){return new(e||i)},i.\u0275mod=nn({type:i}),i.\u0275inj=Kt({}),i})();function Xo(i,...t){return t.length?t.some(e=>i[e]):i.altKey||i.shiftKey||i.ctrlKey||i.metaKey}const uU=aU();class yZ{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=gr(-this._previousScrollPosition.left),t.style.top=gr(-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"),uU&&(n.scrollBehavior=r.scrollBehavior="auto"),window.scroll(this._previousScrollPosition.left,this._previousScrollPosition.top),uU&&(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 bZ{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(gn(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 hU{enable(){}disable(){}attach(){}}function VI(i,t){return t.some(e=>i.bottome.bottom||i.righte.right)}function fU(i,t){return t.some(e=>i.tope.bottom||i.lefte.right)}class xZ{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();VI(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 wZ=(()=>{class i{constructor(e,n,r,s){this._scrollDispatcher=e,this._viewportRuler=n,this._ngZone=r,this.noop=()=>new hU,this.close=o=>new bZ(this._scrollDispatcher,this._ngZone,this._viewportRuler,o),this.block=()=>new yZ(this._viewportRuler,this._document),this.reposition=o=>new xZ(this._scrollDispatcher,this._viewportRuler,this._ngZone,o),this._document=s}}return i.\u0275fac=function(e){return new(e||i)(ee(qy),ee(LM),ee(ft),ee(jt))},i.\u0275prov=ke({token:i,factory:i.\u0275fac,providedIn:"root"}),i})();class km{constructor(t){if(this.scrollStrategy=new hU,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 MZ{constructor(t,e){this.connectionPair=t,this.scrollableViewProperties=e}}let pU=(()=>{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)(ee(jt))},i.\u0275prov=ke({token:i,factory:i.\u0275fac,providedIn:"root"}),i})(),CZ=(()=>{class i extends pU{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)(ee(jt),ee(ft,8))},i.\u0275prov=ke({token:i,factory:i.\u0275fac,providedIn:"root"}),i})(),SZ=(()=>{class i extends pU{constructor(e,n,r){super(e),this._platform=n,this._ngZone=r,this._cursorStyleIsSet=!1,this._pointerDownListener=s=>{this._pointerDownEventTarget=cu(s)},this._clickListener=s=>{const o=cu(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 d=l[c];if(d._outsidePointerEvents.observers.length<1||!d.hasAttached())continue;if(d.overlayElement.contains(o)||d.overlayElement.contains(a))break;const h=d._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)(ee(jt),ee(zi),ee(ft,8))},i.\u0275prov=ke({token:i,factory:i.\u0275fac,providedIn:"root"}),i})(),VM=(()=>{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||NI()){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 Re,this._outsidePointerEvents=new Re,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(Oi(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=gr(this._config.width),t.height=gr(this._config.height),t.minWidth=gr(this._config.minWidth),t.minHeight=gr(this._config.minHeight),t.maxWidth=gr(this._config.maxWidth),t.maxHeight=gr(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=TM(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(He(Mr(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 mU="cdk-overlay-connected-position-bounding-box",EZ=/([A-Za-z%]+)$/;class AZ{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 Re,this._resizeSubscription=Zt.EMPTY,this._offsetX=0,this._offsetY=0,this._appliedPanelClasses=[],this.positionChanges=this._positionChanges,this.setOrigin(t)}attach(t){this._validatePositions(),t.hostElement.classList.add(mU),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),d=this._getOverlayFit(c,e,n,a);if(d.isCompletelyWithinViewport)return this._isPushed=!1,void this._applyPosition(a,l);this._canFitWithFlexibleDimensions(d,c,n)?s.push({position:a,origin:l,overlayRect:e,boundingBoxRect:this._calculateBoundingBoxRect(l,a)}):(!o||o.overlayFit.visibleAreal&&(l=d,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&&Bh(this._boundingBox.style,{top:"",left:"",right:"",bottom:"",height:"",width:"",alignItems:"",justifyContent:""}),this._pane&&this._resetOverlayElementStyles(),this._overlayRef&&this._overlayRef.hostElement.classList.remove(mU),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=_U(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=gU(this._overlayRef.getConfig().minHeight),a=gU(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=_U(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 d=0,h=0;return d=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,d=t.x-this._viewportMargin;else if("start"===e.overlayX&&!r||"end"===e.overlayX&&r)h=t.x,d=n.right-t.x;else{const m=Math.min(n.right-t.x+n.left,t.x),g=this._lastBoundingBoxSize.width;d=2*m,h=t.x-m,d>g&&!this._isInitialRender&&!this._growAfterOpen&&(h=t.x-g/2)}return{top:o,left:h,bottom:a,right:p,width:d,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=gr(n.height),r.top=gr(n.top),r.bottom=gr(n.bottom),r.width=gr(n.width),r.left=gr(n.left),r.right=gr(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=gr(s)),o&&(r.maxWidth=gr(o))}this._lastBoundingBoxSize=n,Bh(this._boundingBox.style,r)}_resetBoundingBoxStyles(){Bh(this._boundingBox.style,{top:"0",left:"0",right:"0",bottom:"0",height:"",width:"",alignItems:"",justifyContent:""})}_resetOverlayElementStyles(){Bh(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 d=this._viewportRuler.getViewportScrollPosition();Bh(n,this._getExactOverlayY(e,t,d)),Bh(n,this._getExactOverlayX(e,t,d))}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=gr(o.maxHeight):s&&(n.maxHeight="")),o.maxWidth&&(r?n.maxWidth=gr(o.maxWidth):s&&(n.maxWidth="")),Bh(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=gr(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=gr(s.x),r}_getScrollVisibility(){const t=this._getOriginRect(),e=this._pane.getBoundingClientRect(),n=this._scrollables.map(r=>r.getElementRef().nativeElement.getBoundingClientRect());return{isOriginClipped:fU(t,n),isOriginOutsideView:VI(t,n),isOverlayClipped:fU(e,n),isOverlayOutsideView:VI(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&&TM(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 mt)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 Bh(i,t){for(let e in t)t.hasOwnProperty(e)&&(i[e]=t[e]);return i}function gU(i){if("number"!=typeof i&&null!=i){const[t,e]=i.split(EZ);return e&&"px"!==e?null:parseFloat(t)}return i||null}function _U(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 vU="cdk-global-overlay-wrapper";class yU{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(vU),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),d=this._xPosition,h=this._xOffset,p="rtl"===this._overlayRef.getConfig().direction;let m="",g="",b="";l?b="flex-start":"center"===d?(b="center",p?g=h:m=h):p?"left"===d||"end"===d?(b="flex-end",m=h):("right"===d||"start"===d)&&(b="flex-start",g=h):"left"===d||"start"===d?(b="flex-start",m=h):("right"===d||"end"===d)&&(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(vU),n.justifyContent=n.alignItems=t.marginTop=t.marginBottom=t.marginLeft=t.marginRight=t.position="",this._overlayRef=null,this._isDisposed=!0}}let DZ=(()=>{class i{constructor(e,n,r,s){this._viewportRuler=e,this._document=n,this._platform=r,this._overlayContainer=s}global(){return new yU}flexibleConnectedTo(e){return new AZ(e,this._viewportRuler,this._document,this._platform,this._overlayContainer)}}return i.\u0275fac=function(e){return new(e||i)(ee(LM),ee(jt),ee(zi),ee(VM))},i.\u0275prov=ke({token:i,factory:i.\u0275fac,providedIn:"root"}),i})(),TZ=0,as=(()=>{class i{constructor(e,n,r,s,o,a,l,c,d,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=d,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 Zy(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-"+TZ++,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(dm)),new sZ(e,this._componentFactoryResolver,this._appRef,this._injector,this._document)}}return i.\u0275fac=function(e){return new(e||i)(ee(wZ),ee(VM),ee(Hl),ee(DZ),ee(CZ),ee($i),ee(ft),ee(jt),ee(Ia),ee(_y),ee(SZ),ee(Rr,8))},i.\u0275prov=ke({token:i,factory:i.\u0275fac,providedIn:"root"}),i})();const IZ=[{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"}],bU=new me("cdk-connected-overlay-scroll-strategy");let zI=(()=>{class i{constructor(e){this.elementRef=e}}return i.\u0275fac=function(e){return new(e||i)(E(mt))},i.\u0275dir=ve({type:i,selectors:[["","cdk-overlay-origin",""],["","overlay-origin",""],["","cdkOverlayOrigin",""]],exportAs:["cdkOverlayOrigin"],standalone:!0}),i})(),xU=(()=>{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=Zt.EMPTY,this._attachSubscription=Zt.EMPTY,this._detachSubscription=Zt.EMPTY,this._positionSubscription=Zt.EMPTY,this.viewportMargin=0,this.open=!1,this.disableClose=!1,this.backdropClick=new We,this.positionChange=new We,this.attach=new We,this.detach=new We,this.overlayKeydown=new We,this.overlayOutsideClick=new We,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=IZ);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&&!Xo(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 zI?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(jB(()=>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)(E(as),E(Mo),E(Wr),E(bU),E(Ia,8))},i.\u0275dir=ve({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:[bi]}),i})();const kZ={provide:bU,deps:[as],useFactory:function RZ(i){return()=>i.scrollStrategies.reposition()}};let Pm=(()=>{class i{}return i.\u0275fac=function(e){return new(e||i)},i.\u0275mod=nn({type:i}),i.\u0275inj=Kt({providers:[as,kZ],imports:[Yy,Nh,dU,dU]}),i})();function ml(i,t=$y){return ti((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,d=t.now();if(d{s=c,o=t.now(),r||(r=t.schedule(l,i),n.add(r))},()=>{a(),n.complete()},void 0,()=>{s=r=null}))})}function wU(i){return gn((t,e)=>i<=e)}function Zl(i,t=$a){return i=i??PZ,ti((e,n)=>{let r,s=!0;e.subscribe(Yn(n,o=>{const a=t(o);(s||!i(r,a))&&(s=!1,r=a,n.next(o))}))})}function PZ(i,t){return i===t}let MU=(()=>{class i{create(e){return typeof MutationObserver>"u"?null:new MutationObserver(e)}}return i.\u0275fac=function(e){return new(e||i)},i.\u0275prov=ke({token:i,factory:i.\u0275fac,providedIn:"root"}),i})(),OZ=(()=>{class i{constructor(e){this._mutationObserverFactory=e,this._observedElements=new Map}ngOnDestroy(){this._observedElements.forEach((e,n)=>this._cleanupObserver(n))}observe(e){const n=Yc(e);return new In(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 Re,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)(ee(MU))},i.\u0275prov=ke({token:i,factory:i.\u0275fac,providedIn:"root"}),i})(),CU=(()=>{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=ks(e),this._subscribe()}constructor(e,n,r){this._contentObserver=e,this._elementRef=n,this._ngZone=r,this.event=new We,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(ml(this.debounce)):e).subscribe(this.event)})}_unsubscribe(){this._currentSubscription?.unsubscribe()}}return i.\u0275fac=function(e){return new(e||i)(E(OZ),E(mt),E(ft))},i.\u0275dir=ve({type:i,selectors:[["","cdkObserveContent",""]],inputs:{disabled:["cdkObserveContentDisabled","disabled"],debounce:"debounce"},outputs:{event:"cdkObserveContent"},exportAs:["cdkObserveContent"]}),i})(),HI=(()=>{class i{}return i.\u0275fac=function(e){return new(e||i)},i.\u0275mod=nn({type:i}),i.\u0275inj=Kt({providers:[MU]}),i})();const SU=new Set;let Om,FZ=(()=>{class i{constructor(e){this._platform=e,this._matchMedia=this._platform.isBrowser&&window.matchMedia?window.matchMedia.bind(window):NZ}matchMedia(e){return(this._platform.WEBKIT||this._platform.BLINK)&&function LZ(i){if(!SU.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),SU.add(i))}catch(t){console.error(t)}}(e),this._matchMedia(e)}}return i.\u0275fac=function(e){return new(e||i)(ee(zi))},i.\u0275prov=ke({token:i,factory:i.\u0275fac,providedIn:"root"}),i})();function NZ(i){return{matches:"all"===i||""===i,media:i,addListener:()=>{},removeListener:()=>{}}}let GI=(()=>{class i{constructor(e,n){this._mediaMatcher=e,this._zone=n,this._queries=new Map,this._destroySubject=new Re}ngOnDestroy(){this._destroySubject.next(),this._destroySubject.complete()}isMatched(e){return EU(TM(e)).some(r=>this._registerQuery(r).mql.matches)}observe(e){let s=nu(EU(TM(e)).map(o=>this._registerQuery(o).observable));return s=Sy(s.pipe(Oi(1)),s.pipe(wU(1),ml(0))),s.pipe(et(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 In(o=>{const a=l=>this._zone.run(()=>o.next(l));return n.addListener(a),()=>{n.removeListener(a)}}).pipe(Ao(n),et(({matches:o})=>({query:e,matches:o})),He(this._destroySubject)),mql:n};return this._queries.set(e,s),s}}return i.\u0275fac=function(e){return new(e||i)(ee(FZ),ee(ft))},i.\u0275prov=ke({token:i,factory:i.\u0275fac,providedIn:"root"}),i})();function EU(i){return i.map(t=>t.split(",")).reduce((t,e)=>t.concat(e)).map(t=>t.trim())}function zM(i,t){return(i.getAttribute(t)||"").match(/\S+/g)||[]}const DU="cdk-describedby-message",HM="cdk-describedby-host";let $I=0,zZ=(()=>{class i{constructor(e,n){this._platform=n,this._messageRegistry=new Map,this._messagesContainer=null,this._id=""+$I++,this._document=e,this._id=Ft(cm)+"-"+$I++}describe(e,n,r){if(!this._canBeDescribed(e,n))return;const s=WI(n,r);"string"!=typeof n?(TU(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=WI(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(`[${HM}="${this._id}"]`);for(let n=0;n0!=r.indexOf(DU));e.setAttribute("aria-describedby",n.join(" "))}_addMessageReference(e,n){const r=this._messageRegistry.get(n);(function UZ(i,t,e){const n=zM(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(HM,this._id),r.referenceCount++}_removeMessageReference(e,n){const r=this._messageRegistry.get(n);r.referenceCount--,function VZ(i,t,e){const r=zM(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(HM)}_isElementDescribedByMessage(e,n){const r=zM(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)(ee(jt),ee(zi))},i.\u0275prov=ke({token:i,factory:i.\u0275fac,providedIn:"root"}),i})();function WI(i,t){return"string"==typeof i?`${t||""}/${i}`:i}function TU(i,t){i.id||(i.id=`${DU}-${t}-${$I++}`)}class IU{constructor(t){this._items=t,this._activeItemIndex=-1,this._activeItem=null,this._wrap=!1,this._letterKeyStream=new Re,this._typeaheadSubscription=Zt.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 Re,this.change=new Re,t instanceof om&&(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(Vi(e=>this._pressedLetters.push(e)),ml(t),gn(()=>this._pressedLetters.length>0),et(()=>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 om?this._items.toArray():this._items}}class HZ extends IU{setActiveItem(t){this.activeItem&&this.activeItem.setInactiveStyles(),super.setActiveItem(t),this.activeItem&&this.activeItem.setActiveStyles()}}class RU extends IU{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 GM=(()=>{class i{constructor(e){this._platform=e}isDisabled(e){return e.hasAttribute("disabled")}isVisible(e){return function $Z(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 GZ(i){try{return i.frameElement}catch{return null}}(function QZ(i){return i.ownerDocument&&i.ownerDocument.defaultView||window}(e));if(n&&(-1===PU(n)||!this.isVisible(n)))return!1;let r=e.nodeName.toLowerCase(),s=PU(e);return e.hasAttribute("contenteditable")?-1!==s:!("iframe"===r||"object"===r||this._platform.WEBKIT&&this._platform.IOS&&!function KZ(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 ZZ(i){return!function jZ(i){return function qZ(i){return"input"==i.nodeName.toLowerCase()}(i)&&"hidden"==i.type}(i)&&(function WZ(i){let t=i.nodeName.toLowerCase();return"input"===t||"select"===t||"button"===t||"textarea"===t}(i)||function YZ(i){return function XZ(i){return"a"==i.nodeName.toLowerCase()}(i)&&i.hasAttribute("href")}(i)||i.hasAttribute("contenteditable")||kU(i))}(e)&&!this.isDisabled(e)&&(n?.ignoreVisibility||this.isVisible(e))}}return i.\u0275fac=function(e){return new(e||i)(ee(zi))},i.\u0275prov=ke({token:i,factory:i.\u0275fac,providedIn:"root"}),i})();function kU(i){if(!i.hasAttribute("tabindex")||void 0===i.tabIndex)return!1;let t=i.getAttribute("tabindex");return!(!t||isNaN(parseInt(t,10)))}function PU(i){if(!kU(i))return null;const t=parseInt(i.getAttribute("tabindex")||"",10);return isNaN(t)?-1:t}class JZ{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(Oi(1)).subscribe(t)}}let jI=(()=>{class i{constructor(e,n,r){this._checker=e,this._ngZone=n,this._document=r}create(e,n=!1){return new JZ(e,this._checker,this._ngZone,this._document,n)}}return i.\u0275fac=function(e){return new(e||i)(ee(GM),ee(ft),ee(jt))},i.\u0275prov=ke({token:i,factory:i.\u0275fac,providedIn:"root"}),i})();function YI(i){return 0===i.buttons||0===i.offsetX&&0===i.offsetY}function qI(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 eQ=new me("cdk-input-modality-detector-options"),tQ={ignoreKeys:[18,17,224,91,16]},Fm=Oh({passive:!0,capture:!0});let nQ=(()=>{class i{get mostRecentModality(){return this._modality.value}constructor(e,n,r,s){this._platform=e,this._mostRecentTarget=null,this._modality=new gt(null),this._lastTouchMs=0,this._onKeydown=o=>{this._options?.ignoreKeys?.some(a=>a===o.keyCode)||(this._modality.next("keyboard"),this._mostRecentTarget=cu(o))},this._onMousedown=o=>{Date.now()-this._lastTouchMs<650||(this._modality.next(YI(o)?"keyboard":"mouse"),this._mostRecentTarget=cu(o))},this._onTouchstart=o=>{qI(o)?this._modality.next("keyboard"):(this._lastTouchMs=Date.now(),this._modality.next("touch"),this._mostRecentTarget=cu(o))},this._options={...tQ,...s},this.modalityDetected=this._modality.pipe(wU(1)),this.modalityChanged=this.modalityDetected.pipe(Zl()),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)(ee(zi),ee(ft),ee(jt),ee(eQ,8))},i.\u0275prov=ke({token:i,factory:i.\u0275fac,providedIn:"root"}),i})();const iQ=new me("liveAnnouncerElement",{providedIn:"root",factory:function rQ(){return null}}),sQ=new me("LIVE_ANNOUNCER_DEFAULT_OPTIONS");let oQ=0,XI=(()=>{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 Re,this._rootNodeFocusAndBlurListener=a=>{for(let c=cu(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=Yc(e);if(!this._platform.isBrowser||1!==r.nodeType)return ht(null);const s=function $K(i){if(function GK(){if(null==LI){const i=typeof document<"u"?document.head:null;LI=!(!i||!i.createShadowRoot&&!i.attachShadow)}return LI}()){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 Re,rootNode:s};return this._elementInfo.set(r,a),this._registerGlobalListeners(a),a.subject}stopMonitoring(e){const n=Yc(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=Yc(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=cu(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,$M),n.addEventListener("blur",this._rootNodeFocusAndBlurListener,$M)}),this._rootNodeFocusListenerCount.set(n,r+1),1==++this._monitoredElementCount&&(this._ngZone.runOutsideAngular(()=>{this._getWindow().addEventListener("focus",this._windowFocusListener)}),this._inputModalityDetector.modalityDetected.pipe(He(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,$M),n.removeEventListener("blur",this._rootNodeFocusAndBlurListener,$M),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=Ft(GI).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,FU,LU),this._hasCheckedHighContrastMode=!0;const n=this.getHighContrastMode();1===n?e.add(KI,FU):2===n&&e.add(KI,LU)}}}return i.\u0275fac=function(e){return new(e||i)(ee(zi),ee(jt))},i.\u0275prov=ke({token:i,factory:i.\u0275fac,providedIn:"root"}),i})(),BU=(()=>{class i{constructor(e){e._applyBodyHighContrastModeCssClasses()}}return i.\u0275fac=function(e){return new(e||i)(ee(NU))},i.\u0275mod=nn({type:i}),i.\u0275inj=Kt({imports:[HI]}),i})();function lQ(i,t){}class WM{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 UU=(()=>{class i extends NM{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=d=>{this._portalOutlet.hasAttached();const h=this._portalOutlet.attachDomPortal(d);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=FM(),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=FM();return e===n||e.contains(n)}_initializeFocusTrap(){this._focusTrap=this._focusTrapFactory.create(this._elementRef.nativeElement),this._document&&(this._elementFocusedBeforeDialogWasOpened=FM())}_handleBackdropClicks(){this._overlayRef.backdropClick().subscribe(()=>{this._config.disableClose&&this._recaptureFocus()})}}return i.\u0275fac=function(e){return new(e||i)(E(mt),E(jI),E(jt,8),E(WM),E(GM),E(ft),E(Zy),E(qc))},i.\u0275cmp=ot({type:i,selectors:[["cdk-dialog-container"]],viewQuery:function(e,n){if(1&e&&Wn(Am,7),2&e){let r;Et(r=At())&&(n._portalOutlet=r.first)}},hostAttrs:["tabindex","-1",1,"cdk-dialog-container"],hostVars:6,hostBindings:function(e,n){2&e&&Dt("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:[lt],decls:1,vars:0,consts:[["cdkPortalOutlet",""]],template:function(e,n){1&e&&fe(0,lQ,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 ZI{constructor(t,e){this.overlayRef=t,this.config=e,this.closed=new Re,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&&!Xo(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 VU=new me("DialogScrollStrategy"),cQ=new me("DialogData"),dQ=new me("DefaultDialogConfig"),hQ={provide:VU,deps:[as],useFactory:function uQ(i){return()=>i.scrollStrategies.block()}};let fQ=0,zU=(()=>{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 Re,this._afterOpenedAtThisLevel=new Re,this._ariaHiddenElements=new Map,this.afterAllClosed=Ey(()=>this.openDialogs.length?this._getAfterAllClosed():this._getAfterAllClosed().pipe(Ao(void 0))),this._scrollStrategy=a}open(e,n){(n={...this._defaultOptions||new WM,...n}).id=n.id||"cdk-dialog-"+fQ++,n.id&&this.getDialogById(n.id);const s=this._getOverlayConfig(n),o=this._overlay.create(s),a=new ZI(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(){QI(this.openDialogs,e=>e.close())}getDialogById(e){return this.openDialogs.find(n=>n.id===e)}ngOnDestroy(){QI(this._openDialogsAtThisLevel,e=>{!1===e.config.closeOnDestroy&&this._removeOpenDialog(e,!1)}),QI(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:WM,useValue:r},{provide:ZI,useValue:n},{provide:Zy,useValue:e}];let a;r.container?"function"==typeof r.container?a=r.container:(a=r.container.type,o.push(...r.container.providers(r))):a=UU;const l=new Lh(a,r.viewContainerRef,$i.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 Lh(e,s.viewContainerRef,o,s.componentFactoryResolver));n.componentInstance=a.instance}}_createInjector(e,n,r,s){const o=e.injector||e.viewContainerRef?.injector,a=[{provide:cQ,useValue:e.data},{provide:ZI,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(Ia,null,{optional:!0}))&&a.push({provide:Ia,useValue:{value:e.direction,change:ht()}}),$i.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)(ee(as),ee($i),ee(dQ,8),ee(i,12),ee(VM),ee(VU))},i.\u0275prov=ke({token:i,factory:i.\u0275fac}),i})();function QI(i,t){let e=i.length;for(;e--;)t(i[e])}let pQ=(()=>{class i{}return i.\u0275fac=function(e){return new(e||i)},i.\u0275mod=nn({type:i}),i.\u0275inj=Kt({providers:[zU,hQ],imports:[Pm,Nh,BU,Nh]}),i})();const mQ=["text"];function gQ(i,t){if(1&i&&De(0,"mat-pseudo-checkbox",6),2&i){const e=he();U("state",e.selected?"checked":"unchecked")("disabled",e.disabled)}}function _Q(i,t){1&i&&De(0,"mat-pseudo-checkbox",7),2&i&&U("disabled",he().disabled)}function vQ(i,t){if(1&i&&(W(0,"span",8),Ve(1),j()),2&i){const e=he();G(1),Qi("(",e.group.label,")")}}const yQ=[[["mat-icon"]],"*"],bQ=["mat-icon","*"],wQ=new me("mat-sanity-checks",{providedIn:"root",factory:function xQ(){return!0}});let Qn=(()=>{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!NI()&&("boolean"==typeof this._sanityChecks?this._sanityChecks:!!this._sanityChecks[e])}}return i.\u0275fac=function(e){return new(e||i)(ee(NU),ee(wQ,8),ee(jt))},i.\u0275mod=nn({type:i}),i.\u0275inj=Kt({imports:[Yy,Yy]}),i})();function jM(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 Qy(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 YM(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 JI(i,t=0){return class extends i{get tabIndex(){return this.disabled?-1:this._tabIndex}set tabIndex(e){this._tabIndex=null!=e?ks(e):this.defaultTabIndex}constructor(...e){super(...e),this._tabIndex=t,this.defaultTabIndex=t}}}function $U(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 MQ(i){return class extends i{constructor(...t){super(...t),this._isInitialized=!1,this._pendingSubscribers=[],this.initialized=new In(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 jU=(()=>{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=ke({token:i,factory:i.\u0275fac,providedIn:"root"}),i})();class SQ{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 YU=Oh({passive:!0,capture:!0});class EQ{constructor(){this._events=new Map,this._delegateEventHandler=t=>{const e=cu(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,YU)})}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,YU)))}}const qU={enterDuration:225,exitDuration:150},XU=Oh({passive:!0,capture:!0}),KU=["mousedown","touchstart"],ZU=["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=Yc(n))}fadeInRipple(t,e,n={}){const r=this._containerRect=this._containerRect||this._containerElement.getBoundingClientRect(),s={...qU,...n.animation};n.centered&&(t=r.left+r.width/2,e=r.top+r.height/2);const o=n.radius||function DQ(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,d=document.createElement("div");d.classList.add("mat-ripple-element"),d.style.left=a-o+"px",d.style.top=l-o+"px",d.style.height=2*o+"px",d.style.width=2*o+"px",null!=n.color&&(d.style.backgroundColor=n.color),d.style.transitionDuration=`${c}ms`,this._containerElement.appendChild(d);const h=window.getComputedStyle(d),m=h.transitionDuration,g="none"===h.transitionProperty||"0s"===m||"0s, 0s"===m||0===r.width&&0===r.height,b=new SQ(this,d,n,g);d.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);d.addEventListener("transitionend",y),d.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={...qU,...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=Yc(t);!this._platform.isBrowser||!e||e===this._triggerElement||(this._removeTriggerEvents(),this._triggerElement=e,KU.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(()=>{ZU.forEach(e=>{this._triggerElement.addEventListener(e,this,XU)})}),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=YI(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&&(KU.forEach(e=>Lm._eventManager.removeHandler(e,t,this)),this._pointerUpEventsRegistered&&ZU.forEach(e=>t.removeEventListener(e,this,XU)))}}Lm._eventManager=new EQ;const eR=new me("mat-ripple-global-options");let Uh=(()=>{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)(E(mt),E(ft),E(zi),E(eR,8),E(Rr,8))},i.\u0275dir=ve({type:i,selectors:[["","mat-ripple",""],["","matRipple",""]],hostAttrs:[1,"mat-ripple"],hostVars:2,hostBindings:function(e,n){2&e&&un("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})(),eb=(()=>{class i{}return i.\u0275fac=function(e){return new(e||i)},i.\u0275mod=nn({type:i}),i.\u0275inj=Kt({imports:[Qn,Qn]}),i})(),TQ=(()=>{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)(E(Rr,8))},i.\u0275cmp=ot({type:i,selectors:[["mat-pseudo-checkbox"]],hostAttrs:[1,"mat-pseudo-checkbox"],hostVars:12,hostBindings:function(e,n){2&e&&un("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})(),QU=(()=>{class i{}return i.\u0275fac=function(e){return new(e||i)},i.\u0275mod=nn({type:i}),i.\u0275inj=Kt({imports:[Qn]}),i})();const JU=new me("MAT_OPTION_PARENT_COMPONENT"),eV=new me("MatOptgroup");let IQ=0;class RQ{constructor(t,e=!1){this.source=t,this.isUserInput=e}}let kQ=(()=>{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-"+IQ++,this.onSelectionChange=new We,this._stateChanges=new Re}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)&&!Xo(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 RQ(this,e))}}return i.\u0275fac=function(e){xo()},i.\u0275dir=ve({type:i,viewQuery:function(e,n){if(1&e&&Wn(mQ,7),2&e){let r;Et(r=At())&&(n._text=r.first)}},inputs:{value:"value",id:"id",disabled:"disabled"},outputs:{onSelectionChange:"onSelectionChange"}}),i})(),Nm=(()=>{class i extends kQ{constructor(e,n,r,s){super(e,n,r,s)}}return i.\u0275fac=function(e){return new(e||i)(E(mt),E(Zn),E(JU,8),E(eV,8))},i.\u0275cmp=ot({type:i,selectors:[["mat-option"]],hostAttrs:["role","option",1,"mat-mdc-option","mdc-list-item"],hostVars:11,hostBindings:function(e,n){1&e&&Ue("click",function(){return n._selectViaInteraction()})("keydown",function(s){return n._handleKeydown(s)}),2&e&&(Yl("id",n.id),Dt("aria-selected",n.selected)("aria-disabled",n.disabled.toString()),un("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:[lt],ngContentSelectors:bQ,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&&(sr(yQ),fe(0,gQ,1,2,"mat-pseudo-checkbox",0),Wt(1),W(2,"span",1,2),Wt(4,1),j(),fe(5,_Q,1,1,"mat-pseudo-checkbox",3),fe(6,vQ,2,1,"span",4),De(7,"div",5)),2&e&&(U("ngIf",n.multiple),G(5),U("ngIf",!n.multiple&&n.selected&&!n.hideSingleSelectionIndicator),G(1),U("ngIf",n.group&&n.group._inert),G(1),U("matRippleTrigger",n._getHostElement())("matRippleDisabled",n.disabled||n.disableRipple))},dependencies:[Uh,vi,TQ],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})(),tR=(()=>{class i{}return i.\u0275fac=function(e){return new(e||i)},i.\u0275mod=nn({type:i}),i.\u0275inj=Kt({imports:[eb,Eo,Qn,QU]}),i})();class tV{}class FQ{}const Xc="*";function Ra(i,t){return{type:7,name:i,definitions:t,options:{}}}function jr(i,t=null){return{type:4,styles:t,timings:i}}function iV(i,t=null){return{type:2,steps:i,options:t}}function si(i){return{type:6,styles:i,offset:null}}function Ps(i,t,e){return{type:0,name:i,styles:t,options:e}}function rV(i){return{type:5,steps:i}}function Pr(i,t,e=null){return{type:1,expr:i,animation:t,options:e}}function nR(i=null){return{type:9,options:i}}function iR(i,t,e=null){return{type:11,selector:i,animation:t,options:e}}function sV(i){Promise.resolve().then(i)}class tb{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(){sV(()=>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 oV{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?sV(()=>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 rR="!";function LQ(i,t){}class qM{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 sR="mdc-dialog--open",aV="mdc-dialog--opening",lV="mdc-dialog--closing";let UQ=(()=>{class i extends UU{constructor(e,n,r,s,o,a,l,c){super(e,n,r,s,o,a,l,c),this._animationStateChanged=new We}_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)(E(mt),E(jI),E(jt,8),E(qM),E(GM),E(ft),E(Zy),E(qc))},i.\u0275cmp=ot({type:i,selectors:[["ng-component"]],features:[lt],decls:0,vars:0,template:function(e,n){},encapsulation:2}),i})();const cV="--mat-dialog-transition-duration";function dV(i){return null==i?null:"number"==typeof i?i:i.endsWith("ms")?ks(i.substring(0,i.length-2)):i.endsWith("s")?1e3*ks(i.substring(0,i.length-1)):"0"===i?0:null}let VQ=(()=>{class i extends UQ{constructor(e,n,r,s,o,a,l,c,d){super(e,n,r,s,o,a,l,d),this._animationMode=c,this._animationsEnabled="NoopAnimations"!==this._animationMode,this._hostElement=this._elementRef.nativeElement,this._openAnimationDuration=this._animationsEnabled?dV(this._config.enterAnimationDuration)??150:0,this._closeAnimationDuration=this._animationsEnabled?dV(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(cV,`${this._openAnimationDuration}ms`),this._requestAnimationFrame(()=>this._hostElement.classList.add(aV,sR)),this._waitForAnimationToComplete(this._openAnimationDuration,this._finishDialogOpen)):(this._hostElement.classList.add(sR),Promise.resolve().then(()=>this._finishDialogOpen()))}_startExitAnimation(){this._animationStateChanged.emit({state:"closing",totalTime:this._closeAnimationDuration}),this._hostElement.classList.remove(sR),this._animationsEnabled?(this._hostElement.style.setProperty(cV,`${this._openAnimationDuration}ms`),this._requestAnimationFrame(()=>this._hostElement.classList.add(lV)),this._waitForAnimationToComplete(this._closeAnimationDuration,this._finishDialogClose)):Promise.resolve().then(()=>this._finishDialogClose())}_clearAnimationClasses(){this._hostElement.classList.remove(aV,lV)}_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)(E(mt),E(jI),E(jt,8),E(qM),E(GM),E(ft),E(Zy),E(Rr,8),E(qc))},i.\u0275cmp=ot({type:i,selectors:[["mat-dialog-container"]],hostAttrs:["tabindex","-1",1,"mat-mdc-dialog-container","mdc-dialog"],hostVars:8,hostBindings:function(e,n){2&e&&(Yl("id",n._config.id),Dt("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),un("_mat-animation-noopable",!n._animationsEnabled))},features:[lt],decls:3,vars:0,consts:[[1,"mdc-dialog__container"],[1,"mat-mdc-dialog-surface","mdc-dialog__surface"],["cdkPortalOutlet",""]],template:function(e,n){1&e&&(W(0,"div",0)(1,"div",1),fe(2,LQ,0,0,"ng-template",2),j()())},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 nb{constructor(t,e,n){this._ref=t,this._containerInstance=n,this._afterOpened=new Re,this._beforeClosed=new Re,this._state=0,this.disableClose=e.disableClose,this.id=t.id,n._animationStateChanged.pipe(gn(r=>"opened"===r.state),Oi(1)).subscribe(()=>{this._afterOpened.next(),this._afterOpened.complete()}),n._animationStateChanged.pipe(gn(r=>"closed"===r.state),Oi(1)).subscribe(()=>{clearTimeout(this._closeFallbackTimeout),this._finishDialogClose()}),t.overlayRef.detachments().subscribe(()=>{this._beforeClosed.next(this._result),this._beforeClosed.complete(),this._finishDialogClose()}),Mr(this.backdropClick(),this.keydownEvents().pipe(gn(r=>27===r.keyCode&&!this.disableClose&&!Xo(r)))).subscribe(r=>{this.disableClose||(r.preventDefault(),uV(this,"keydown"===r.type?"keyboard":"mouse"))})}close(t){this._result=t,this._containerInstance._animationStateChanged.pipe(gn(e=>"closing"===e.state),Oi(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 uV(i,t,e){return i._closeInteractionType=t,i.close(e)}const oR=new me("MatMdcDialogData"),zQ=new me("mat-mdc-dialog-default-options"),hV=new me("mat-mdc-dialog-scroll-strategy"),GQ={provide:hV,deps:[as],useFactory:function HQ(i){return()=>i.scrollStrategies.block()}};let $Q=0,WQ=(()=>{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,d,h){this._overlay=e,this._defaultOptions=r,this._parentDialog=s,this._dialogRefConstructor=l,this._dialogContainerType=c,this._dialogDataToken=d,this._openDialogsAtThisLevel=[],this._afterAllClosedAtThisLevel=new Re,this._afterOpenedAtThisLevel=new Re,this._idPrefix="mat-dialog-",this.dialogConfigClass=qM,this.afterAllClosed=Ey(()=>this.openDialogs.length?this._getAfterAllClosed():this._getAfterAllClosed().pipe(Ao(void 0))),this._scrollStrategy=a,this._dialog=n.get(zU)}open(e,n){let r;(n={...this._defaultOptions||new qM,...n}).id=n.id||`${this._idPrefix}${$Q++}`,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:WM,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){xo()},i.\u0275prov=ke({token:i,factory:i.\u0275fac}),i})(),Bm=(()=>{class i extends WQ{constructor(e,n,r,s,o,a,l,c){super(e,n,s,a,l,o,nb,VQ,oR,c),this._idPrefix="mat-mdc-dialog-"}}return i.\u0275fac=function(e){return new(e||i)(ee(as),ee($i),ee(_y,8),ee(zQ,8),ee(hV),ee(i,12),ee(VM),ee(Rr,8))},i.\u0275prov=ke({token:i,factory:i.\u0275fac}),i})(),jQ=0,YQ=(()=>{class i{constructor(e,n,r){this.dialogRef=e,this._elementRef=n,this._dialog=r,this.type="button"}ngOnInit(){this.dialogRef||(this.dialogRef=gV(this._elementRef,this._dialog.openDialogs))}ngOnChanges(e){const n=e._matDialogClose||e._matDialogCloseResult;n&&(this.dialogResult=n.currentValue)}_onButtonClick(e){uV(this.dialogRef,0===e.screenX&&0===e.screenY?"keyboard":"mouse",this.dialogResult)}}return i.\u0275fac=function(e){return new(e||i)(E(nb,8),E(mt),E(Bm))},i.\u0275dir=ve({type:i,selectors:[["","mat-dialog-close",""],["","matDialogClose",""]],hostVars:2,hostBindings:function(e,n){1&e&&Ue("click",function(s){return n._onButtonClick(s)}),2&e&&Dt("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:[bi]}),i})(),fV=(()=>{class i{constructor(e,n,r){this._dialogRef=e,this._elementRef=n,this._dialog=r,this.id="mat-mdc-dialog-title-"+jQ++}ngOnInit(){this._dialogRef||(this._dialogRef=gV(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)(E(nb,8),E(mt),E(Bm))},i.\u0275dir=ve({type:i,selectors:[["","mat-dialog-title",""],["","matDialogTitle",""]],hostAttrs:[1,"mat-mdc-dialog-title","mdc-dialog__title"],hostVars:1,hostBindings:function(e,n){2&e&&Yl("id",n.id)},inputs:{id:"id"},exportAs:["matDialogTitle"]}),i})(),pV=(()=>{class i{}return i.\u0275fac=function(e){return new(e||i)},i.\u0275dir=ve({type:i,selectors:[["","mat-dialog-content",""],["mat-dialog-content"],["","matDialogContent",""]],hostAttrs:[1,"mat-mdc-dialog-content","mdc-dialog__content"]}),i})(),mV=(()=>{class i{constructor(){this.align="start"}}return i.\u0275fac=function(e){return new(e||i)},i.\u0275dir=ve({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&&un("mat-mdc-dialog-actions-align-center","center"===n.align)("mat-mdc-dialog-actions-align-end","end"===n.align)},inputs:{align:"align"}}),i})();function gV(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 _V=(()=>{class i{}return i.\u0275fac=function(e){return new(e||i)},i.\u0275mod=nn({type:i}),i.\u0275inj=Kt({providers:[Bm,GQ],imports:[pQ,Pm,Nh,Qn,Qn]}),i})();const qQ=["mat-button",""],yV=[[["",8,"material-icons",3,"iconPositionEnd",""],["mat-icon",3,"iconPositionEnd",""],["","matButtonIcon","",3,"iconPositionEnd",""]],"*",[["","iconPositionEnd","",8,"material-icons"],["mat-icon","iconPositionEnd",""],["","matButtonIcon","","iconPositionEnd",""]]],bV=[".material-icons:not([iconPositionEnd]), mat-icon:not([iconPositionEnd]), [matButtonIcon]:not([iconPositionEnd])","*",".material-icons[iconPositionEnd], mat-icon[iconPositionEnd], [matButtonIcon][iconPositionEnd]"],KQ=["mat-mini-fab",""],QQ=["mat-icon-button",""],JQ=["*"],eJ=[{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"]}],tJ=Qy(jM(YM(class{constructor(i){this._elementRef=i}})));let aR=(()=>{class i extends tJ{constructor(e,n,r,s){super(e),this._platform=n,this._ngZone=r,this._animationMode=s,this._focusMonitor=Ft(qc),this._isFab=!1;const o=e.nativeElement.classList;for(const a of eJ)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){xo()},i.\u0275dir=ve({type:i,viewQuery:function(e,n){if(1&e&&Wn(Uh,5),2&e){let r;Et(r=At())&&(n.ripple=r.first)}},features:[lt]}),i})(),ib=(()=>{class i extends aR{constructor(e,n,r,s){super(e,n,r,s)}}return i.\u0275fac=function(e){return new(e||i)(E(mt),E(zi),E(ft),E(Rr,8))},i.\u0275cmp=ot({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&&(Dt("disabled",n.disabled||null),un("_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:[lt],attrs:qQ,ngContentSelectors:bV,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&&(sr(yV),De(0,"span",0),Wt(1),W(2,"span",1),Wt(3,1),j(),Wt(4,2),De(5,"span",2)(6,"span",3)(7,"span",4)),2&e&&(un("mdc-button__ripple",!n._isFab)("mdc-fab__ripple",n._isFab),G(6),U("matRippleDisabled",n._isRippleDisabled())("matRippleTrigger",n._elementRef.nativeElement))},dependencies:[Uh],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 iJ=new me("mat-mdc-fab-default-options",{providedIn:"root",factory:xV});function xV(){return{color:"accent"}}const wV=xV();let MV=(()=>{class i extends aR{constructor(e,n,r,s,o){super(e,n,r,s),this._options=o,this._isFab=!0,this._options=this._options||wV,this.color=this.defaultColor=this._options.color||wV.color}}return i.\u0275fac=function(e){return new(e||i)(E(mt),E(zi),E(ft),E(Rr,8),E(iJ,8))},i.\u0275cmp=ot({type:i,selectors:[["button","mat-mini-fab",""]],hostVars:7,hostBindings:function(e,n){2&e&&(Dt("disabled",n.disabled||null),un("_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:[lt],attrs:KQ,ngContentSelectors:bV,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&&(sr(yV),De(0,"span",0),Wt(1),W(2,"span",1),Wt(3,1),j(),Wt(4,2),De(5,"span",2)(6,"span",3)(7,"span",4)),2&e&&(un("mdc-button__ripple",!n._isFab)("mdc-fab__ripple",n._isFab),G(6),U("matRippleDisabled",n._isRippleDisabled())("matRippleTrigger",n._elementRef.nativeElement))},dependencies:[Uh],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})(),XM=(()=>{class i extends aR{constructor(e,n,r,s){super(e,n,r,s)}}return i.\u0275fac=function(e){return new(e||i)(E(mt),E(zi),E(ft),E(Rr,8))},i.\u0275cmp=ot({type:i,selectors:[["button","mat-icon-button",""]],hostVars:7,hostBindings:function(e,n){2&e&&(Dt("disabled",n.disabled||null),un("_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:[lt],attrs:QQ,ngContentSelectors:JQ,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&&(sr(),De(0,"span",0),Wt(1),De(2,"span",1)(3,"span",2)(4,"span",3)),2&e&&(G(3),U("matRippleDisabled",n._isRippleDisabled())("matRippleCentered",!0)("matRippleTrigger",n._elementRef.nativeElement))},dependencies:[Uh],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})(),KM=(()=>{class i{}return i.\u0275fac=function(e){return new(e||i)},i.\u0275mod=nn({type:i}),i.\u0275inj=Kt({imports:[Qn,eb,Qn]}),i})();const rJ=["class","dialog"];let CV=(()=>{class i{constructor(e,n){this.dialogRef=e,this.data=n}}return i.\u0275fac=function(e){return new(e||i)(E(nb),E(oR))},i.\u0275cmp=ot({type:i,selectors:[["app-confirm",8,"dialog"]],attrs:rJ,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&&(W(0,"h1",0),Ve(1,"Confirmation"),j(),W(2,"div",1)(3,"p"),Ve(4),j()(),W(5,"div",2)(6,"button",3),Ue("click",function(){return n.dialogRef.close()}),Ve(7,"Cancel"),j(),W(8,"button",4),Ve(9,"Yes"),j()()),2&e&&(G(4),_i(n.data.text),G(4),U("mat-dialog-close",!0))},dependencies:[ib,YQ,fV,pV,mV]}),i})();function lR(i,t){const e="object"==typeof t;return new Promise((n,r)=>{const s=new da({next:o=>{n(o),s.unsubscribe()},error:r,complete:()=>{e?n(t.defaultValue):r(new fm)}});i.subscribe(s)})}let Ql=(()=>{class i{constructor(e){this.ngZone=e,this.openedResource$=new gt(null),this.openedResourcePath$=new gt(null),eel.expose(this.wrapHandler(this.openFile),"open_file"),eel.on_angular_ready(),setTimeout(tt(function*(){for(;;){if(eel._websocket){eel._websocket.onclose=()=>window.close();break}yield new Promise(n=>setTimeout(n,0))}}),0)}wrapHandler(e){return(...n)=>{try{ft.assertInAngularZone(),e.bind(this)(...n)}catch{this.ngZone.run(e,this,n)}}}openFile(e,n=!1){var r=this;return tt(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 tt(function*(){yield eel.open_file_with_system_app(e)()})()}retrieveValue(e){return tt(function*(){return yield eel.retrieve_value(e)()})()}runCustomAction(e,n,r){return tt(function*(){return eel.run_custom_action(e,n,r)()})()}saveFile(e){var n=this;return tt(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 tt(function*(){return eel.serialize_resource(e,n)()})()}serializeResourceTmp(e,n,r={}){return tt(function*(){return eel.serialize_resource_tmp(e,n,r)()})()}serializeReversible(e,n){return tt(function*(){return eel.serialize_reversible(e,n)()})()}deserializeResource(e){return tt(function*(){return eel.deserialize_resource(e)()})()}}return i.\u0275fac=function(e){return new(e||i)(ee(ft))},i.\u0275prov=ke({token:i,factory:i.\u0275fac,providedIn:"root"}),i})();var cR=ps(489);const SV=i=>!(!i||"object"!=typeof i),EV=(i={},t,e,n=[])=>{const r=[];if(SV(i)){const s=Object.entries(i);for(let o=0;o{class i{constructor(e){var n=this;this.eelDelegate=e,this._hasUnsavedChanges$=new gt(!1),this.resource$=new gt(null),this.error$=new gt(null),this.customActionRunning$=new gt(!1),this.changedDataBlocks={},this.dataBlockChange$=new Re,this.hideHiddenFields$=new gt(!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=EV(r.schema,"is_recursive_ref",!0);for(const[o,a]of s){const l=o.block_class_mro;let c=r.schema,d=c.block_class_mro===l?c:void 0;for(const h of a.slice(0,a.length-1))!d&&c[h]?.block_class_mro===l&&(d=c[h]),c=c[h];c[a[a.length-1]]=d}this.resource$.next(r),this.error$.next(null)}else this.resource$.next(null),this.error$.next(null)}),this.dataBlockChange$.subscribe(function(){var r=tt(function*([s,o]){n.changedDataBlocks[s]=o,n.updateUnsavedChanges();const a=yield n.eelDelegate.retrieveValue(s);n.changedDataBlocks[s]==o&&((0,cR.isNumber)(o)?Math.abs(o-a)<1e-10:(0,cR.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 tt(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 tt(function*(){return s.processExternalChanges(e,()=>s.eelDelegate.runCustomAction(e,n,r))})()}deserializeResource(e){var n=this;return tt(function*(){return n.processExternalChanges(e,()=>n.eelDelegate.deserializeResource(e))})()}reloadResource(){var e=this;return tt(function*(){const n=e.eelDelegate.openedResourcePath$.getValue();n&&e.eelDelegate.openFile(n,!0).then()})()}saveResource(){var e=this;return tt(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)(ee(Ql))},i.\u0275prov=ke({token:i,factory:i.\u0275fac,providedIn:"root"}),i})();function sJ(i,t){if(1&i){const e=di();W(0,"div",2)(1,"button",3),Ue("click",function(){return an(e),zt(he().action())}),Ve(2),j()()}if(2&i){const e=he();G(2),Qi(" ",e.data.action," ")}}const oJ=["label"];function aJ(i,t){}const lJ=Math.pow(2,31)-1;class dR{constructor(t,e){this._overlayRef=e,this._afterDismissed=new Re,this._afterOpened=new Re,this._onAction=new Re,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,lJ))}_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 AV=new me("MatSnackBarData");class ZM{constructor(){this.politeness="assertive",this.announcementMessage="",this.duration=0,this.data=null,this.horizontalPosition="center",this.verticalPosition="bottom"}}let cJ=(()=>{class i{}return i.\u0275fac=function(e){return new(e||i)},i.\u0275dir=ve({type:i,selectors:[["","matSnackBarLabel",""]],hostAttrs:[1,"mat-mdc-snack-bar-label","mdc-snackbar__label"]}),i})(),dJ=(()=>{class i{}return i.\u0275fac=function(e){return new(e||i)},i.\u0275dir=ve({type:i,selectors:[["","matSnackBarActions",""]],hostAttrs:[1,"mat-mdc-snack-bar-actions","mdc-snackbar__actions"]}),i})(),uJ=(()=>{class i{}return i.\u0275fac=function(e){return new(e||i)},i.\u0275dir=ve({type:i,selectors:[["","matSnackBarAction",""]],hostAttrs:[1,"mat-mdc-snack-bar-action","mdc-snackbar__action"]}),i})(),hJ=(()=>{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)(E(dR),E(AV))},i.\u0275cmp=ot({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&&(W(0,"div",0),Ve(1),j(),fe(2,sJ,3,1,"div",1)),2&e&&(G(1),Qi(" ",n.data.message,"\n"),G(1),U("ngIf",n.hasAction))},dependencies:[vi,ib,cJ,dJ,uJ],styles:[".mat-mdc-simple-snack-bar{display:flex}"],encapsulation:2,changeDetection:0}),i})();const fJ={snackBarState:Ra("state",[Ps("void, hidden",si({transform:"scale(0.8)",opacity:0})),Ps("visible",si({transform:"scale(1)",opacity:1})),Pr("* => visible",jr("150ms cubic-bezier(0, 0, 0.2, 1)")),Pr("* => void, * => hidden",jr("75ms cubic-bezier(0.4, 0.0, 1, 1)",si({opacity:0})))])};let pJ=0,mJ=(()=>{class i extends NM{constructor(e,n,r,s,o){super(),this._ngZone=e,this._elementRef=n,this._changeDetectorRef=r,this._platform=s,this.snackBarConfig=o,this._document=Ft(jt),this._trackedModals=new Set,this._announceDelay=150,this._destroyed=!1,this._onAnnounce=new Re,this._onExit=new Re,this._onEnter=new Re,this._animationState="void",this._liveElementId="mat-snack-bar-container-live-"+pJ++,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(Oi(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)(E(ft),E(mt),E(Zn),E(zi),E(ZM))},i.\u0275dir=ve({type:i,viewQuery:function(e,n){if(1&e&&Wn(Am,7),2&e){let r;Et(r=At())&&(n._portalOutlet=r.first)}},features:[lt]}),i})(),gJ=(()=>{class i extends mJ{_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=ri(i)))(n||i)}}(),i.\u0275cmp=ot({type:i,selectors:[["mat-snack-bar-container"]],viewQuery:function(e,n){if(1&e&&Wn(oJ,7),2&e){let r;Et(r=At())&&(n._label=r.first)}},hostAttrs:[1,"mdc-snackbar","mat-mdc-snack-bar-container","mdc-snackbar--open"],hostVars:1,hostBindings:function(e,n){1&e&&N1("@state.done",function(s){return n.onAnimationEnd(s)}),2&e&&Iw("@state",n._animationState)},features:[lt],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&&(W(0,"div",0)(1,"div",1,2)(3,"div",3),fe(4,aJ,0,0,"ng-template",4),j(),De(5,"div"),j()()),2&e&&(G(5),Dt("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:[fJ.snackBarState]}}),i})(),DV=(()=>{class i{}return i.\u0275fac=function(e){return new(e||i)},i.\u0275mod=nn({type:i}),i.\u0275inj=Kt({imports:[Pm,Nh,Eo,KM,Qn,Qn]}),i})();const TV=new me("mat-snack-bar-default-options",{providedIn:"root",factory:function _J(){return new ZM}});let vJ=(()=>{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=$i.create({parent:n&&n.viewContainerRef&&n.viewContainerRef.injector||this._injector,providers:[{provide:ZM,useValue:n}]}),o=new Lh(this.snackBarContainerComponent,n.viewContainerRef,s),a=e.attach(o);return a.instance.snackBarConfig=n,a.instance}_attach(e,n){const r={...new ZM,...this._defaultConfig,...n},s=this._createOverlay(r),o=this._attachSnackBarContainer(s,r),a=new dR(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 Lh(e,void 0,l),d=o.attachComponentPortal(c);a.instance=d.instance}return this._breakpointObserver.observe("(max-width: 599.98px) and (orientation: portrait)").pipe(He(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 $i.create({parent:e&&e.viewContainerRef&&e.viewContainerRef.injector||this._injector,providers:[{provide:dR,useValue:n},{provide:AV,useValue:e.data}]})}}return i.\u0275fac=function(e){return new(e||i)(ee(as),ee(XI),ee($i),ee(GI),ee(i,12),ee(TV))},i.\u0275prov=ke({token:i,factory:i.\u0275fac}),i})(),IV=(()=>{class i extends vJ{constructor(e,n,r,s,o,a){super(e,n,r,s,o,a),this.simpleSnackBarComponent=hJ,this.snackBarContainerComponent=gJ,this.handsetCssClass="mat-mdc-snack-bar-handset"}}return i.\u0275fac=function(e){return new(e||i)(ee(as),ee(XI),ee($i),ee(GI),ee(i,12),ee(TV))},i.\u0275prov=ke({token:i,factory:i.\u0275fac,providedIn:DV}),i})();const yJ=["*",[["mat-toolbar-row"]]],bJ=["*","mat-toolbar-row"],xJ=Qy(class{constructor(i){this._elementRef=i}});let wJ=(()=>{class i{}return i.\u0275fac=function(e){return new(e||i)},i.\u0275dir=ve({type:i,selectors:[["mat-toolbar-row"]],hostAttrs:[1,"mat-toolbar-row"],exportAs:["matToolbarRow"]}),i})(),MJ=(()=>{class i extends xJ{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)(E(mt),E(zi),E(jt))},i.\u0275cmp=ot({type:i,selectors:[["mat-toolbar"]],contentQueries:function(e,n,r){if(1&e&&Wi(r,wJ,5),2&e){let s;Et(s=At())&&(n._toolbarRows=s)}},hostAttrs:[1,"mat-toolbar"],hostVars:4,hostBindings:function(e,n){2&e&&un("mat-toolbar-multiple-rows",n._toolbarRows.length>0)("mat-toolbar-single-row",0===n._toolbarRows.length)},inputs:{color:"color"},exportAs:["matToolbar"],features:[lt],ngContentSelectors:bJ,decls:2,vars:0,template:function(e,n){1&e&&(sr(yJ),Wt(0),Wt(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})(),CJ=(()=>{class i{}return i.\u0275fac=function(e){return new(e||i)},i.\u0275mod=nn({type:i}),i.\u0275inj=Kt({imports:[Qn,Qn]}),i})(),SJ=(()=>{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=ot({type:i,selectors:[["mat-divider"]],hostAttrs:["role","separator",1,"mat-divider"],hostVars:7,hostBindings:function(e,n){2&e&&(Dt("aria-orientation",n.vertical?"vertical":"horizontal"),un("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})(),RV=(()=>{class i{}return i.\u0275fac=function(e){return new(e||i)},i.\u0275mod=nn({type:i}),i.\u0275inj=Kt({imports:[Qn,Qn]}),i})();const EJ=["tooltip"],kV=new me("mat-tooltip-scroll-strategy"),TJ={provide:kV,deps:[as],useFactory:function DJ(i){return()=>i.scrollStrategies.reposition({scrollThrottle:20})}},RJ=new me("mat-tooltip-default-options",{providedIn:"root",factory:function IJ(){return{showDelay:0,hideDelay:0,touchendHideDelay:1500}}}),PV="tooltip-panel",OV=Oh({passive:!0});let NJ=(()=>{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=ks(e)}get hideDelay(){return this._hideDelay}set hideDelay(e){this._hideDelay=ks(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,d,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 Re,this._scrollStrategy=d,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(He(this._destroyed)).subscribe(()=>{this._overlayRef&&this._updatePosition(this._overlayRef)})}ngAfterViewInit(){this._viewInitialized=!0,this._setupPointerEnterEventsIfNeeded(),this._focusMonitor.monitor(this._elementRef).pipe(He(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,OV)}),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 Lh(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(He(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 mt)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(He(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}-${PV}`,scrollStrategy:this._scrollStrategy()}),this._updatePosition(this._overlayRef),this._overlayRef.detachments().pipe(He(this._destroyed)).subscribe(()=>this._detach()),this._overlayRef.outsidePointerEvents().pipe(He(this._destroyed)).subscribe(()=>this._tooltipInstance?._handleBodyInteraction()),this._overlayRef.keydownEvents().pipe(He(this._destroyed)).subscribe(s=>{this._isTooltipVisible()&&27===s.keyCode&&!Xo(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(Oi(1),He(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}-${PV}-`;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,OV)})}_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){xo()},i.\u0275dir=ve({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})(),Os=(()=>{class i extends NJ{constructor(e,n,r,s,o,a,l,c,d,h,p,m){super(e,n,r,s,o,a,l,c,d,h,p,m),this._tooltipComponent=UJ,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)(E(as),E(mt),E(qy),E(Wr),E(ft),E(zi),E(zZ),E(qc),E(kV),E(Ia,8),E(RJ,8),E(jt))},i.\u0275dir=ve({type:i,selectors:[["","matTooltip",""]],hostAttrs:[1,"mat-mdc-tooltip-trigger"],exportAs:["matTooltip"],features:[lt]}),i})(),BJ=(()=>{class i{constructor(e,n){this._changeDetectorRef=e,this._closeOnInteraction=!1,this._isVisible=!1,this._onHide=new Re,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)(E(Zn),E(Rr,8))},i.\u0275dir=ve({type:i}),i})(),UJ=(()=>{class i extends BJ{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)(E(Zn),E(mt),E(Rr,8))},i.\u0275cmp=ot({type:i,selectors:[["mat-tooltip-component"]],viewQuery:function(e,n){if(1&e&&Wn(EJ,7),2&e){let r;Et(r=At())&&(n._tooltip=r.first)}},hostAttrs:["aria-hidden","true"],hostVars:2,hostBindings:function(e,n){1&e&&Ue("mouseleave",function(s){return n._handleMouseLeave(s)}),2&e&&jo("zoom",n.isVisible()?1:null)},features:[lt],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&&(W(0,"div",0,1),Ue("animationend",function(s){return n._handleAnimationEnd(s)}),W(2,"div",2),Ve(3),j()()),2&e&&(un("mdc-tooltip--multiline",n._isMultiline),U("ngClass",n.tooltipClass),G(3),_i(n.message))},dependencies:[hm],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})(),FV=(()=>{class i{}return i.\u0275fac=function(e){return new(e||i)},i.\u0275mod=nn({type:i}),i.\u0275inj=Kt({providers:[TJ],imports:[BU,Eo,Pm,Qn,Qn,Xy]}),i})();function LV(...i){const t=w0(i),{args:e,keys:n}=VB(i),r=new In(s=>{const{length:o}=e;if(!o)return void s.complete();const a=new Array(o);let l=o,c=o;for(let d=0;d{h||(h=!0,c--),a[d]=p},()=>l--,void 0,()=>{(!l||!h)&&(c||s.next(n?zB(n,a):a),s.complete())}))}});return t?r.pipe(JT(t)):r}class uR{}class uu{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 uu?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 uu;return e.lazyInit=this.lazyInit&&this.lazyInit instanceof uu?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 VJ{encodeKey(t){return BV(t)}encodeValue(t){return BV(t)}decodeKey(t){return decodeURIComponent(t)}decodeValue(t){return decodeURIComponent(t)}}const HJ=/%(\d[a-f0-9])/gi,GJ={40:"@","3A":":",24:"$","2C":",","3B":";","3D":"=","3F":"?","2F":"/"};function BV(i){return encodeURIComponent(i).replace(HJ,(t,e)=>GJ[e]??t)}function QM(i){return`${i}`}class hu{constructor(t={}){if(this.updates=null,this.cloneFrom=null,this.encoder=t.encoder||new VJ,t.fromString){if(t.fromObject)throw new Error("Cannot specify both fromString and fromObject.");this.map=function zJ(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 hu({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 $J{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 UV(i){return typeof ArrayBuffer<"u"&&i instanceof ArrayBuffer}function VV(i){return typeof Blob<"u"&&i instanceof Blob}function zV(i){return typeof FormData<"u"&&i instanceof FormData}class rb{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 WJ(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 uu),this.context||(this.context=new $J),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 rb(e,n,s,{params:c,headers:l,context:d,reportProgress:a,responseType:r,withCredentials:o})}}var ls=(()=>((ls=ls||{})[ls.Sent=0]="Sent",ls[ls.UploadProgress=1]="UploadProgress",ls[ls.ResponseHeader=2]="ResponseHeader",ls[ls.DownloadProgress=3]="DownloadProgress",ls[ls.Response=4]="Response",ls[ls.User=5]="User",ls))();class YJ{constructor(t,e=200,n="OK"){this.headers=t.headers||new uu,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 hR extends YJ{constructor(t={}){super(t),this.type=ls.Response,this.body=void 0!==t.body?t.body:null}clone(t={}){return new hR({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 fR(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 pR=(()=>{class i{constructor(e){this.handler=e}request(e,n,r={}){let s;if(e instanceof rb)s=e;else{let l,c;l=r.headers instanceof uu?r.headers:new uu(r.headers),r.params&&(c=r.params instanceof hu?r.params:new hu({fromObject:r.params})),s=new rb(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=ht(s).pipe(ru(l=>this.handler.handle(l)));if(e instanceof rb||"events"===r.observe)return o;const a=o.pipe(gn(l=>l instanceof hR));switch(r.observe||"body"){case"body":switch(s.responseType){case"arraybuffer":return a.pipe(et(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(et(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(et(l=>{if(null!==l.body&&"string"!=typeof l.body)throw new Error("Response is not a string.");return l.body}));default:return a.pipe(et(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 hu).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,fR(r,n))}post(e,n,r={}){return this.request("POST",e,fR(r,n))}put(e,n,r={}){return this.request("PUT",e,fR(r,n))}}return i.\u0275fac=function(e){return new(e||i)(ee(uR))},i.\u0275prov=ke({token:i,factory:i.\u0275fac}),i})();const oee=["*"];let eC;function sb(i){return function aee(){if(void 0===eC&&(eC=null,typeof window<"u")){const i=window;void 0!==i.trustedTypes&&(eC=i.trustedTypes.createPolicy("angular#components",{createHTML:t=>t}))}return eC}()?.createHTML(i)||i}function XV(i){return Error(`Unable to find icon with the name "${i}"`)}function KV(i){return Error(`The URL provided to MatIconRegistry was not trusted as a resource URL via Angular's DomSanitizer. Attempted URL was "${i}".`)}function ZV(i){return Error(`The literal provided to MatIconRegistry was not trusted as safe HTML by Angular's DomSanitizer. Attempted literal was "${i}".`)}class Vh{constructor(t,e,n){this.url=t,this.svgText=e,this.options=n}}let tC=(()=>{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 Vh(r,null,s))}addSvgIconResolver(e){return this._resolvers.push(e),this}addSvgIconLiteralInNamespace(e,n,r,s){const o=this._sanitizer.sanitize(Kn.HTML,r);if(!o)throw ZV(r);const a=sb(o);return this._addSvgIconConfig(e,n,new Vh("",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 Vh(n,null,r))}addSvgIconSetLiteralInNamespace(e,n,r){const s=this._sanitizer.sanitize(Kn.HTML,n);if(!s)throw ZV(n);const o=sb(s);return this._addSvgIconSetConfig(e,new Vh("",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(Kn.RESOURCE_URL,e);if(!n)throw KV(e);const r=this._cachedIconsByUrl.get(n);return r?ht(nC(r)):this._loadSvgIconFromConfig(new Vh(e,null)).pipe(Vi(s=>this._cachedIconsByUrl.set(n,s)),et(s=>nC(s)))}getNamedSvgIcon(e,n=""){const r=QV(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(XV(r))}ngOnDestroy(){this._resolvers=[],this._svgIconConfigs.clear(),this._iconSetConfigs.clear(),this._cachedIconsByUrl.clear()}_getSvgFromConfig(e){return e.svgText?ht(nC(this._svgElementFromConfig(e))):this._loadSvgIconFromConfig(e).pipe(et(n=>nC(n)))}_getSvgFromIconSetConfigs(e,n){const r=this._extractIconWithNameFromAnySet(e,n);return r?ht(r):LV(n.filter(o=>!o.svgText).map(o=>this._loadSvgIconSetFromConfig(o).pipe(Wc(a=>{const c=`Loading icon set URL: ${this._sanitizer.sanitize(Kn.RESOURCE_URL,o.url)} failed: ${a.message}`;return this._errorHandler.handleError(new Error(c)),ht(null)})))).pipe(et(()=>{const o=this._extractIconWithNameFromAnySet(e,n);if(!o)throw XV(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(Vi(n=>e.svgText=n),et(()=>this._svgElementFromConfig(e)))}_loadSvgIconSetFromConfig(e){return e.svgText?ht(null):this._fetchIcon(e).pipe(Vi(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(sb(""));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(sb("")),r=e.attributes;for(let s=0;ssb(c)),su(()=>this._inProgressUrlFetches.delete(o)),Uf());return this._inProgressUrlFetches.set(o,l),l}_addSvgIconConfig(e,n,r){return this._svgIconConfigs.set(QV(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:""}}}),JV=["clip-path","color-profile","src","cursor","fill","filter","marker","marker-start","marker-mid","marker-end","mask","stroke"],mee=JV.map(i=>`[${i}]`).join(", "),gee=/^url\(['"]?#(.*?)['"]?\)$/;let gR=(()=>{class i extends uee{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=Zt.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(mee),r=this._elementsWithExternalReferences=this._elementsWithExternalReferences||new Map;for(let s=0;s{const a=n[s],l=a.getAttribute(o),c=l?l.match(gee):null;if(c){let d=r.get(a);d||(d=[],r.set(a,d)),d.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(Oi(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)(E(mt),E(tC),ya("aria-hidden"),E(fee),E(al),E(hee,8))},i.\u0275cmp=ot({type:i,selectors:[["mat-icon"]],hostAttrs:["role","img",1,"mat-icon","notranslate"],hostVars:8,hostBindings:function(e,n){2&e&&(Dt("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),un("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:[lt],ngContentSelectors:oee,decls:1,vars:0,template:function(e,n){1&e&&(sr(),Wt(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})(),ez=(()=>{class i{}return i.\u0275fac=function(e){return new(e||i)},i.\u0275mod=nn({type:i}),i.\u0275inj=Kt({imports:[Qn,Qn]}),i})(),tz=(()=>{class i{constructor(e){this.viewContainerRef=e}}return i.\u0275fac=function(e){return new(e||i)(E(Wr))},i.\u0275dir=ve({type:i,selectors:[["","dataBlockUI",""]]}),i})(),_ee=(()=>{class i{constructor(){this.resource=null,this.name="",this.resourceDescription="",this.changed=new We}}return i.\u0275fac=function(e){return new(e||i)},i.\u0275cmp=ot({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&&(W(0,"p",0),Ve(1),j()),2&e&&(U("matTooltip",n.resourceDescription),G(1),tm("",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:[Os],changeDetection:0}),i})();function vee(i,t){if(1&i&&(W(0,"h2",4),Ve(1),j()),2&i){const e=he();U("matTooltip",e.resourceDescription),G(1),_i(e.name)}}function yee(i,t){1&i&&De(0,"app-block-actions",5),2&i&&U("resource",he().resource)}const bee=function(i,t,e,n){return{id:i,name:t,data:e,schema:n}};function xee(i,t){if(1&i&&De(0,"app-editor",7),2&i){const e=he().$implicit,n=he();U("resource",L2(3,bee,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 wee(i,t){if(1&i&&(Gr(0),fe(1,xee,1,8,"app-editor",6),Ct(2,"async"),$r()),2&i){const e=t.$implicit,n=he();G(1),U("ngIf",!(Tt(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 Jl=(()=>{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 We,this.destroyed$=new Re}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(He(this.destroyed$),gn(([n,r])=>!!this.resource&&n.startsWith(this.resource.id)&&!n.substring(this.resource.id.length+1).includes("/"))).subscribe(function(){var n=tt(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)(E(ka))},i.\u0275cmp=ot({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&&(fe(0,vee,2,2,"h2",0),Ct(1,"async"),fe(2,yee,1,1,"app-block-actions",1),W(3,"div",2),fe(4,wee,3,3,"ng-container",3),j()),2&e){let r;U("ngIf",n.name&&n.name!=(null==(r=Tt(1,4,n.main.resource$))?null:r.name)),G(2),U("ngIf",!n.hideBlockActions),G(2),U("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})(),nz=(()=>{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)(E(ol),E(mt))},i.\u0275dir=ve({type:i}),i})(),zh=(()=>{class i extends nz{}return i.\u0275fac=function(){let t;return function(n){return(t||(t=ri(i)))(n||i)}}(),i.\u0275dir=ve({type:i,features:[lt]}),i})();const Do=new me("NgValueAccessor"),Cee={provide:Do,useExisting:Gn(()=>gl),multi:!0},Eee=new me("CompositionEventMode");let gl=(()=>{class i extends nz{constructor(e,n,r){super(e,n),this._compositionMode=r,this._composing=!1,null==this._compositionMode&&(this._compositionMode=!function See(){const i=Hc()?Hc().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)(E(ol),E(mt),E(Eee,8))},i.\u0275dir=ve({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&&Ue("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:[Dn([Cee]),lt]}),i})();const Aee=!1;function fu(i){return null==i||("string"==typeof i||Array.isArray(i))&&0===i.length}function rz(i){return null!=i&&"number"==typeof i.length}const Yr=new me("NgValidators"),pu=new me("NgAsyncValidators"),Dee=/^(?=.{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 _l{static min(t){return sz(t)}static max(t){return oz(t)}static required(t){return function az(i){return fu(i.value)?{required:!0}:null}(t)}static requiredTrue(t){return function lz(i){return!0===i.value?null:{required:!0}}(t)}static email(t){return function cz(i){return fu(i.value)||Dee.test(i.value)?null:{email:!0}}(t)}static minLength(t){return dz(t)}static maxLength(t){return uz(t)}static pattern(t){return function hz(i){if(!i)return iC;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(fu(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 vz(t)}static composeAsync(t){return yz(t)}}function sz(i){return t=>{if(fu(t.value)||fu(i))return null;const e=parseFloat(t.value);return!isNaN(e)&&e{if(fu(t.value)||fu(i))return null;const e=parseFloat(t.value);return!isNaN(e)&&e>i?{max:{max:i,actual:t.value}}:null}}function dz(i){return t=>fu(t.value)||!rz(t.value)?null:t.value.lengthrz(t.value)&&t.value.length>i?{maxlength:{requiredLength:i,actualLength:t.value.length}}:null}function iC(i){return null}function fz(i){return null!=i}function pz(i){const t=oy(i)?Ni(i):i;if(Aee&&!L1(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 pe(-1101,e)}return t}function mz(i){let t={};return i.forEach(e=>{t=null!=e?{...t,...e}:t}),0===Object.keys(t).length?null:t}function gz(i,t){return t.map(e=>e(i))}function _z(i){return i.map(t=>function Tee(i){return!i.validate}(t)?t:e=>t.validate(e))}function vz(i){if(!i)return null;const t=i.filter(fz);return 0==t.length?null:function(e){return mz(gz(e,t))}}function _R(i){return null!=i?vz(_z(i)):null}function yz(i){if(!i)return null;const t=i.filter(fz);return 0==t.length?null:function(e){return LV(gz(e,t).map(pz)).pipe(et(mz))}}function vR(i){return null!=i?yz(_z(i)):null}function bz(i,t){return null===i?[t]:Array.isArray(i)?[...i,t]:[i,t]}function xz(i){return i._rawValidators}function wz(i){return i._rawAsyncValidators}function yR(i){return i?Array.isArray(i)?i:[i]:[]}function rC(i,t){return Array.isArray(i)?i.includes(t):i===t}function Mz(i,t){const e=yR(t);return yR(i).forEach(r=>{rC(e,r)||e.push(r)}),e}function Cz(i,t){return yR(t).filter(e=>!rC(i,e))}class Sz{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=_R(this._rawValidators)}_setAsyncValidators(t){this._rawAsyncValidators=t||[],this._composedAsyncValidatorFn=vR(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 ao extends Sz{get formDirective(){return null}get path(){return null}}class ec extends Sz{constructor(){super(...arguments),this._parent=null,this.name=null,this.valueAccessor=null}}class Ez{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 tc=(()=>{class i extends Ez{constructor(e){super(e)}}return i.\u0275fac=function(e){return new(e||i)(E(ec,2))},i.\u0275dir=ve({type:i,selectors:[["","formControlName",""],["","ngModel",""],["","formControl",""]],hostVars:14,hostBindings:function(e,n){2&e&&un("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:[lt]}),i})(),bR=(()=>{class i extends Ez{constructor(e){super(e)}}return i.\u0275fac=function(e){return new(e||i)(E(ao,10))},i.\u0275dir=ve({type:i,selectors:[["","formGroupName",""],["","formArrayName",""],["","ngModelGroup",""],["","formGroup",""],["form",3,"ngNoForm",""],["","ngForm",""]],hostVars:16,hostBindings:function(e,n){2&e&&un("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:[lt]}),i})();function Az(i,t){return i?`with name: '${t}'`:`at index: ${t}`}const MR=!1,ob="VALID",oC="INVALID",zm="PENDING",ab="DISABLED";function CR(i){return(aC(i)?i.validators:i)||null}function SR(i,t){return(aC(t)?t.asyncValidators:i)||null}function aC(i){return null!=i&&!Array.isArray(i)&&"object"==typeof i}function Dz(i,t,e){const n=i.controls;if(!(t?Object.keys(n):n).length)throw new pe(1e3,MR?function Pee(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 pe(1001,MR?function Oee(i,t){return`Cannot find form control ${Az(i,t)}`}(t,e):"")}function Tz(i,t,e){i._forEachChild((n,r)=>{if(void 0===e[r])throw new pe(1002,MR?function Fee(i,t){return`Must supply a value for form control ${Az(i,t)}`}(t,r):"")})}class lC{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===ob}get invalid(){return this.status===oC}get pending(){return this.status==zm}get disabled(){return this.status===ab}get enabled(){return this.status!==ab}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(Mz(t,this._rawValidators))}addAsyncValidators(t){this.setAsyncValidators(Mz(t,this._rawAsyncValidators))}removeValidators(t){this.setValidators(Cz(t,this._rawValidators))}removeAsyncValidators(t){this.setAsyncValidators(Cz(t,this._rawAsyncValidators))}hasValidator(t){return rC(this._rawValidators,t)}hasAsyncValidator(t){return rC(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=ab,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=ob,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===ob||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()?ab:ob}_runValidator(){return this.validator?this.validator(this):null}_runAsyncValidator(t){if(this.asyncValidator){this.status=zm,this._hasOwnPendingAsyncValidator=!0;const e=pz(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 We,this.statusChanges=new We}_calculateStatus(){return this._allControlsDisabled()?ab:this.errors?oC:this._hasOwnPendingAsyncValidator||this._anyControlsHaveStatus(zm)?zm:this._anyControlsHaveStatus(oC)?oC:ob}_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){aC(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 Lee(i){return Array.isArray(i)?_R(i):i||null}(this._rawValidators)}_assignAsyncValidators(t){this._rawAsyncValidators=Array.isArray(t)?t.slice():t,this._composedAsyncValidatorFn=function Nee(i){return Array.isArray(i)?vR(i):i||null}(this._rawAsyncValidators)}}class Hm extends lC{constructor(t,e,n){super(CR(e),SR(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={}){Tz(this,!0,t),Object.keys(t).forEach(n=>{Dz(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 Iz extends Hm{}const Hh=new me("CallSetDisabledState",{providedIn:"root",factory:()=>lb}),lb="always";function cC(i,t){return[...t.path,i]}function cb(i,t,e=lb){ER(i,t),t.valueAccessor.writeValue(i.value),(i.disabled||"always"===e)&&t.valueAccessor.setDisabledState?.(i.disabled),function Uee(i,t){t.valueAccessor.registerOnChange(e=>{i._pendingValue=e,i._pendingChange=!0,i._pendingDirty=!0,"change"===i.updateOn&&Rz(i,t)})}(i,t),function zee(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 Vee(i,t){t.valueAccessor.registerOnTouched(()=>{i._pendingTouched=!0,"blur"===i.updateOn&&i._pendingChange&&Rz(i,t),"submit"!==i.updateOn&&i.markAsTouched()})}(i,t),function Bee(i,t){if(t.valueAccessor.setDisabledState){const e=n=>{t.valueAccessor.setDisabledState(n)};i.registerOnDisabledChange(e),t._registerOnDestroy(()=>{i._unregisterOnDisabledChange(e)})}}(i,t)}function dC(i,t,e=!0){const n=()=>{};t.valueAccessor&&(t.valueAccessor.registerOnChange(n),t.valueAccessor.registerOnTouched(n)),hC(i,t),i&&(t._invokeOnDestroyCallbacks(),i._registerOnCollectionChange(()=>{}))}function uC(i,t){i.forEach(e=>{e.registerOnValidatorChange&&e.registerOnValidatorChange(t)})}function ER(i,t){const e=xz(i);null!==t.validator?i.setValidators(bz(e,t.validator)):"function"==typeof e&&i.setValidators([e]);const n=wz(i);null!==t.asyncValidator?i.setAsyncValidators(bz(n,t.asyncValidator)):"function"==typeof n&&i.setAsyncValidators([n]);const r=()=>i.updateValueAndValidity();uC(t._rawValidators,r),uC(t._rawAsyncValidators,r)}function hC(i,t){let e=!1;if(null!==i){if(null!==t.validator){const r=xz(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=wz(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 uC(t._rawValidators,n),uC(t._rawAsyncValidators,n),e}function Rz(i,t){i._pendingDirty&&i.markAsDirty(),i.setValue(i._pendingValue,{emitModelToViewChange:!1}),t.viewToModelUpdate(i._pendingValue),i._pendingChange=!1}function kz(i,t){ER(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 Pz(i,t){i._syncPendingControls(),t.forEach(e=>{const n=e.control;"submit"===n.updateOn&&n._pendingChange&&(e.viewToModelUpdate(n._pendingValue),n._pendingChange=!1)})}function TR(i,t){if(!t)return null;let e,n,r;return Array.isArray(t),t.forEach(s=>{s.constructor===gl?e=s:function $ee(i){return Object.getPrototypeOf(i.constructor)===zh}(s)?n=s:r=s}),r||n||e||null}const jee={provide:ao,useExisting:Gn(()=>ub)},db=(()=>Promise.resolve())();let ub=(()=>{class i extends ao{constructor(e,n,r){super(),this.callSetDisabledState=r,this.submitted=!1,this._directives=new Set,this.ngSubmit=new We,this.form=new Hm({},_R(e),vR(n))}ngAfterViewInit(){this._setUpdateStrategy()}get formDirective(){return this}get control(){return this.form}get path(){return[]}get controls(){return this.form.controls}addControl(e){db.then(()=>{const n=this._findContainer(e.path);e.control=n.registerControl(e.name,e.control),cb(e.control,e,this.callSetDisabledState),e.control.updateValueAndValidity({emitEvent:!1}),this._directives.add(e)})}getControl(e){return this.form.get(e.path)}removeControl(e){db.then(()=>{const n=this._findContainer(e.path);n&&n.removeControl(e.name),this._directives.delete(e)})}addFormGroup(e){db.then(()=>{const n=this._findContainer(e.path),r=new Hm({});kz(r,e),n.registerControl(e.name,r),r.updateValueAndValidity({emitEvent:!1})})}removeFormGroup(e){db.then(()=>{const n=this._findContainer(e.path);n&&n.removeControl(e.name)})}getFormGroup(e){return this.form.get(e.path)}updateModel(e,n){db.then(()=>{this.form.get(e.path).setValue(n)})}setValue(e){this.control.setValue(e)}onSubmit(e){return this.submitted=!0,Pz(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)(E(Yr,10),E(pu,10),E(Hh,8))},i.\u0275dir=ve({type:i,selectors:[["form",3,"ngNoForm","",3,"formGroup",""],["ng-form"],["","ngForm",""]],hostBindings:function(e,n){1&e&&Ue("submit",function(s){return n.onSubmit(s)})("reset",function(){return n.onReset()})},inputs:{options:["ngFormOptions","options"]},outputs:{ngSubmit:"ngSubmit"},exportAs:["ngForm"],features:[Dn([jee]),lt]}),i})();function Oz(i,t){const e=i.indexOf(t);e>-1&&i.splice(e,1)}function Fz(i){return"object"==typeof i&&null!==i&&2===Object.keys(i).length&&"value"in i&&"disabled"in i}const nc=class extends lC{constructor(t=null,e,n){super(CR(e),SR(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}),aC(e)&&(e.nonNullable||e.initialValueIsDefault)&&(this.defaultValue=Fz(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){Oz(this._onChange,t)}registerOnDisabledChange(t){this._onDisabledChange.push(t)}_unregisterOnDisabledChange(t){Oz(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){Fz(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}},Xee={provide:ec,useExisting:Gn(()=>Kc)},Bz=(()=>Promise.resolve())();let Kc=(()=>{class i extends ec{constructor(e,n,r,s,o,a){super(),this._changeDetectorRef=o,this.callSetDisabledState=a,this.control=new nc,this._registered=!1,this.update=new We,this._parent=e,this._setValidators(n),this._setAsyncValidators(r),this.valueAccessor=TR(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(){cb(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){Bz.then(()=>{this.control.setValue(e,{emitViewToModelChange:!1}),this._changeDetectorRef?.markForCheck()})}_updateDisabled(e){const n=e.isDisabled.currentValue,r=0!==n&&function um(i){return"boolean"==typeof i?i:null!=i&&"false"!==i}(n);Bz.then(()=>{r&&!this.control.disabled?this.control.disable():!r&&this.control.disabled&&this.control.enable(),this._changeDetectorRef?.markForCheck()})}_getPath(e){return this._parent?cC(e,this._parent):[e]}}return i.\u0275fac=function(e){return new(e||i)(E(ao,9),E(Yr,10),E(pu,10),E(Do,10),E(Zn,8),E(Hh,8))},i.\u0275dir=ve({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:[Dn([Xee]),lt,bi]}),i})(),IR=(()=>{class i{}return i.\u0275fac=function(e){return new(e||i)},i.\u0275dir=ve({type:i,selectors:[["form",3,"ngNoForm","",3,"ngNativeValidate",""]],hostAttrs:["novalidate",""]}),i})();const Kee={provide:Do,useExisting:Gn(()=>mu),multi:!0};let mu=(()=>{class i extends zh{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=ri(i)))(n||i)}}(),i.\u0275dir=ve({type:i,selectors:[["input","type","number","formControlName",""],["input","type","number","formControl",""],["input","type","number","ngModel",""]],hostBindings:function(e,n){1&e&&Ue("input",function(s){return n.onChange(s.target.value)})("blur",function(){return n.onTouched()})},features:[Dn([Kee]),lt]}),i})(),Uz=(()=>{class i{}return i.\u0275fac=function(e){return new(e||i)},i.\u0275mod=nn({type:i}),i.\u0275inj=Kt({}),i})();const RR=new me("NgModelWithFormControlWarning"),tte={provide:ao,useExisting:Gn(()=>Gh)};let Gh=(()=>{class i extends ao{constructor(e,n,r){super(),this.callSetDisabledState=r,this.submitted=!1,this._onCollectionChange=()=>this._updateDomValue(),this.directives=[],this.form=null,this.ngSubmit=new We,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&&(hC(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 cb(n,e,this.callSetDisabledState),n.updateValueAndValidity({emitEvent:!1}),this.directives.push(e),n}getControl(e){return this.form.get(e.path)}removeControl(e){dC(e.control||null,e,!1),function Wee(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,Pz(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&&(dC(n||null,e),(i=>i instanceof nc)(r)&&(cb(r,e,this.callSetDisabledState),e.control=r))}),this.form._updateTreeValidity({emitEvent:!1})}_setUpFormContainer(e){const n=this.form.get(e.path);kz(n,e),n.updateValueAndValidity({emitEvent:!1})}_cleanUpFormContainer(e){if(this.form){const n=this.form.get(e.path);n&&function Hee(i,t){return hC(i,t)}(n,e)&&n.updateValueAndValidity({emitEvent:!1})}}_updateRegistrations(){this.form._registerOnCollectionChange(this._onCollectionChange),this._oldForm&&this._oldForm._registerOnCollectionChange(()=>{})}_updateValidators(){ER(this.form,this),this._oldForm&&hC(this._oldForm,this)}_checkFormPresent(){}}return i.\u0275fac=function(e){return new(e||i)(E(Yr,10),E(pu,10),E(Hh,8))},i.\u0275dir=ve({type:i,selectors:[["","formGroup",""]],hostBindings:function(e,n){1&e&&Ue("submit",function(s){return n.onSubmit(s)})("reset",function(){return n.onReset()})},inputs:{form:["formGroup","form"]},outputs:{ngSubmit:"ngSubmit"},exportAs:["ngForm"],features:[Dn([tte]),lt,bi]}),i})();const rte={provide:ec,useExisting:Gn(()=>fC)};let fC=(()=>{class i extends ec{set isDisabled(e){}constructor(e,n,r,s,o){super(),this._ngModelWarningConfig=o,this._added=!1,this.update=new We,this._ngModelWarningSent=!1,this._parent=e,this._setValidators(n),this._setAsyncValidators(r),this.valueAccessor=TR(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 cC(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)(E(ao,13),E(Yr,10),E(pu,10),E(Do,10),E(RR,8))},i.\u0275dir=ve({type:i,selectors:[["","formControlName",""]],inputs:{name:["formControlName","name"],isDisabled:["disabled","isDisabled"],model:["ngModel","model"]},outputs:{update:"ngModelChange"},features:[Dn([rte]),lt,bi]}),i})();function jz(i){return"number"==typeof i?i:parseInt(i,10)}function Yz(i){return"number"==typeof i?i:parseFloat(i)}let $h=(()=>{class i{constructor(){this._validator=iC}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):iC,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=ve({type:i,features:[bi]}),i})();const ute={provide:Yr,useExisting:Gn(()=>gu),multi:!0};let gu=(()=>{class i extends $h{constructor(){super(...arguments),this.inputName="max",this.normalizeInput=e=>Yz(e),this.createValidator=e=>oz(e)}}return i.\u0275fac=function(){let t;return function(n){return(t||(t=ri(i)))(n||i)}}(),i.\u0275dir=ve({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&&Dt("max",n._enabled?n.max:null)},inputs:{max:"max"},features:[Dn([ute]),lt]}),i})();const hte={provide:Yr,useExisting:Gn(()=>_u),multi:!0};let _u=(()=>{class i extends $h{constructor(){super(...arguments),this.inputName="min",this.normalizeInput=e=>Yz(e),this.createValidator=e=>sz(e)}}return i.\u0275fac=function(){let t;return function(n){return(t||(t=ri(i)))(n||i)}}(),i.\u0275dir=ve({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&&Dt("min",n._enabled?n.min:null)},inputs:{min:"min"},features:[Dn([hte]),lt]}),i})();const gte={provide:Yr,useExisting:Gn(()=>NR),multi:!0};let NR=(()=>{class i extends $h{constructor(){super(...arguments),this.inputName="minlength",this.normalizeInput=e=>jz(e),this.createValidator=e=>dz(e)}}return i.\u0275fac=function(){let t;return function(n){return(t||(t=ri(i)))(n||i)}}(),i.\u0275dir=ve({type:i,selectors:[["","minlength","","formControlName",""],["","minlength","","formControl",""],["","minlength","","ngModel",""]],hostVars:1,hostBindings:function(e,n){2&e&&Dt("minlength",n._enabled?n.minlength:null)},inputs:{minlength:"minlength"},features:[Dn([gte]),lt]}),i})();const _te={provide:Yr,useExisting:Gn(()=>BR),multi:!0};let BR=(()=>{class i extends $h{constructor(){super(...arguments),this.inputName="maxlength",this.normalizeInput=e=>jz(e),this.createValidator=e=>uz(e)}}return i.\u0275fac=function(){let t;return function(n){return(t||(t=ri(i)))(n||i)}}(),i.\u0275dir=ve({type:i,selectors:[["","maxlength","","formControlName",""],["","maxlength","","formControl",""],["","maxlength","","ngModel",""]],hostVars:1,hostBindings:function(e,n){2&e&&Dt("maxlength",n._enabled?n.maxlength:null)},inputs:{maxlength:"maxlength"},features:[Dn([_te]),lt]}),i})(),Zz=(()=>{class i{}return i.\u0275fac=function(e){return new(e||i)},i.\u0275mod=nn({type:i}),i.\u0275inj=Kt({imports:[Uz]}),i})();class Qz extends lC{constructor(t,e,n){super(CR(e),SR(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={}){Tz(this,!1,t),t.forEach((n,r)=>{Dz(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 Jz(i){return!!i&&(void 0!==i.asyncValidators||void 0!==i.validators||void 0!==i.updateOn)}let yte=(()=>{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 Jz(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 Iz(r,n)}control(e,n,r){let s={};return this.useNonNullable?(Jz(n)?s=n:(s.validators=n,s.asyncValidators=r),new nc(e,{...s,nonNullable:!0})):new nc(e,n,r)}array(e,n,r){const s=e.map(o=>this._createControl(o));return new Qz(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 nc||e instanceof lC?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=ke({token:i,factory:i.\u0275fac,providedIn:"root"}),i})(),eH=(()=>{class i{static withConfig(e){return{ngModule:i,providers:[{provide:Hh,useValue:e.callSetDisabledState??lb}]}}}return i.\u0275fac=function(e){return new(e||i)},i.\u0275mod=nn({type:i}),i.\u0275inj=Kt({imports:[Zz]}),i})(),tH=(()=>{class i{static withConfig(e){return{ngModule:i,providers:[{provide:RR,useValue:e.warnOnNgModelWithFormControl??"always"},{provide:Hh,useValue:e.callSetDisabledState??lb}]}}}return i.\u0275fac=function(e){return new(e||i)},i.\u0275mod=nn({type:i}),i.\u0275inj=Kt({imports:[Zz]}),i})();const bte=["matFormFieldNotchedOutline",""],xte=["*"],wte=["textField"],Mte=["iconPrefixContainer"],Cte=["textPrefixContainer"];function Ste(i,t){1&i&&De(0,"span",19)}function Ete(i,t){if(1&i){const e=di();W(0,"label",17),Ue("cdkObserveContent",function(){return an(e),zt(he(2)._refreshOutlineNotchWidth())}),Wt(1,1),fe(2,Ste,1,0,"span",18),j()}if(2&i){const e=he(2);U("floating",e._shouldLabelFloat())("cdkObserveContentDisabled",!e._hasOutline())("id",e._labelId),Dt("for",e._control.id)("aria-owns",e._control.id),G(2),U("ngIf",!e.hideRequiredMarker&&e._control.required)}}function Ate(i,t){1&i&&fe(0,Ete,3,6,"label",16),2&i&&U("ngIf",he()._hasFloatingLabel())}function Dte(i,t){1&i&&De(0,"div",20)}function Tte(i,t){}function Ite(i,t){1&i&&fe(0,Tte,0,0,"ng-template",22),2&i&&(he(2),U("ngTemplateOutlet",Zi(1)))}function Rte(i,t){if(1&i&&(W(0,"div",21),fe(1,Ite,1,1,"ng-template",9),j()),2&i){const e=he();U("matFormFieldNotchedOutlineOpen",e._shouldLabelFloat())("matFormFieldNotchedOutlineLabelWidth",e._labelWidth),G(1),U("ngIf",!e._forceDisplayInfixLabel())}}function kte(i,t){1&i&&(W(0,"div",23,24),Wt(2,2),j())}function Pte(i,t){1&i&&(W(0,"div",25,26),Wt(2,3),j())}function Ote(i,t){}function Fte(i,t){1&i&&fe(0,Ote,0,0,"ng-template",22),2&i&&(he(),U("ngTemplateOutlet",Zi(1)))}function Lte(i,t){1&i&&(W(0,"div",27),Wt(1,4),j())}function Nte(i,t){1&i&&(W(0,"div",28),Wt(1,5),j())}function Bte(i,t){1&i&&De(0,"div",29)}function Ute(i,t){1&i&&(W(0,"div",30),Wt(1,6),j()),2&i&&U("@transitionMessages",he()._subscriptAnimationState)}function Vte(i,t){if(1&i&&(W(0,"mat-hint",34),Ve(1),j()),2&i){const e=he(2);U("id",e._hintLabelId),G(1),_i(e.hintLabel)}}function zte(i,t){if(1&i&&(W(0,"div",31),fe(1,Vte,2,2,"mat-hint",32),Wt(2,7),De(3,"div",33),Wt(4,8),j()),2&i){const e=he();U("@transitionMessages",e._subscriptAnimationState),G(1),U("ngIf",e.hintLabel)}}const Hte=["*",[["mat-label"]],[["","matPrefix",""],["","matIconPrefix",""]],[["","matTextPrefix",""]],[["","matTextSuffix",""]],[["","matSuffix",""],["","matIconSuffix",""]],[["mat-error"],["","matError",""]],[["mat-hint",3,"align","end"]],[["mat-hint","align","end"]]],Gte=["*","mat-label","[matPrefix], [matIconPrefix]","[matTextPrefix]","[matTextSuffix]","[matSuffix], [matIconSuffix]","mat-error, [matError]","mat-hint:not([align='end'])","mat-hint[align='end']"];let To=(()=>{class i{}return i.\u0275fac=function(e){return new(e||i)},i.\u0275dir=ve({type:i,selectors:[["mat-label"]]}),i})(),$te=0;const nH=new me("MatError");let Wte=(()=>{class i{constructor(e,n){this.id="mat-mdc-error-"+$te++,e||n.nativeElement.setAttribute("aria-live","polite")}}return i.\u0275fac=function(e){return new(e||i)(ya("aria-live"),E(mt))},i.\u0275dir=ve({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&&Yl("id",n.id)},inputs:{id:"id"},features:[Dn([{provide:nH,useExisting:i}])]}),i})(),jte=0,iH=(()=>{class i{constructor(){this.align="start",this.id="mat-mdc-hint-"+jte++}}return i.\u0275fac=function(e){return new(e||i)},i.\u0275dir=ve({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&&(Yl("id",n.id),Dt("align",null),un("mat-mdc-form-field-hint-end","end"===n.align))},inputs:{align:"align",id:"id"}}),i})();const rH=new me("MatPrefix");let Yte=(()=>{class i{constructor(){this._isText=!1}set _isTextSelector(e){this._isText=!0}}return i.\u0275fac=function(e){return new(e||i)},i.\u0275dir=ve({type:i,selectors:[["","matPrefix",""],["","matIconPrefix",""],["","matTextPrefix",""]],inputs:{_isTextSelector:["matTextPrefix","_isTextSelector"]},features:[Dn([{provide:rH,useExisting:i}])]}),i})();const sH=new me("MatSuffix");let qte=(()=>{class i{constructor(){this._isText=!1}set _isTextSelector(e){this._isText=!0}}return i.\u0275fac=function(e){return new(e||i)},i.\u0275dir=ve({type:i,selectors:[["","matSuffix",""],["","matIconSuffix",""],["","matTextSuffix",""]],inputs:{_isTextSelector:["matTextSuffix","_isTextSelector"]},features:[Dn([{provide:sH,useExisting:i}])]}),i})(),oH=(()=>{class i{constructor(e){this._elementRef=e,this.floating=!1}getWidth(){return function Xte(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)(E(mt))},i.\u0275dir=ve({type:i,selectors:[["label","matFormFieldFloatingLabel",""]],hostAttrs:[1,"mdc-floating-label","mat-mdc-floating-label"],hostVars:2,hostBindings:function(e,n){2&e&&un("mdc-floating-label--float-above",n.floating)},inputs:{floating:"floating"}}),i})();const aH="mdc-line-ripple--active",pC="mdc-line-ripple--deactivating";let lH=(()=>{class i{constructor(e,n){this._elementRef=e,this._handleTransitionEnd=r=>{const s=this._elementRef.nativeElement.classList,o=s.contains(pC);"opacity"===r.propertyName&&o&&s.remove(aH,pC)},n.runOutsideAngular(()=>{e.nativeElement.addEventListener("transitionend",this._handleTransitionEnd)})}activate(){const e=this._elementRef.nativeElement.classList;e.remove(pC),e.add(aH)}deactivate(){this._elementRef.nativeElement.classList.add(pC)}ngOnDestroy(){this._elementRef.nativeElement.removeEventListener("transitionend",this._handleTransitionEnd)}}return i.\u0275fac=function(e){return new(e||i)(E(mt),E(ft))},i.\u0275dir=ve({type:i,selectors:[["div","matFormFieldLineRipple",""]],hostAttrs:[1,"mdc-line-ripple"]}),i})(),cH=(()=>{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)(E(mt),E(ft))},i.\u0275cmp=ot({type:i,selectors:[["div","matFormFieldNotchedOutline",""]],hostAttrs:[1,"mdc-notched-outline"],hostVars:2,hostBindings:function(e,n){2&e&&un("mdc-notched-outline--notched",n.open)},inputs:{labelWidth:["matFormFieldNotchedOutlineLabelWidth","labelWidth"],open:["matFormFieldNotchedOutlineOpen","open"]},attrs:bte,ngContentSelectors:xte,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&&(sr(),De(0,"div",0),W(1,"div",1),Wt(2),j(),De(3,"div",2)),2&e&&(G(1),jo("width",n._getNotchWidth()))},encapsulation:2,changeDetection:0}),i})();const Kte={transitionMessages:Ra("transitionMessages",[Ps("enter",si({opacity:1,transform:"translateY(0%)"})),Pr("void => enter",[si({opacity:0,transform:"translateY(-5px)"}),jr("300ms cubic-bezier(0.55, 0, 0.55, 0.2)")])])};let UR=(()=>{class i{}return i.\u0275fac=function(e){return new(e||i)},i.\u0275dir=ve({type:i}),i})();const mC=new me("MatFormField"),Zte=new me("MAT_FORM_FIELD_DEFAULT_OPTIONS");let dH=0,vl=(()=>{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-"+dH++,this._hintLabelId="mat-mdc-hint-"+dH++,this._subscriptAnimationState="",this._labelWidth=0,this._destroyed=new Re,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(He(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(),Mr(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(He(this._destroyed)).subscribe(()=>{this._needsOutlineLabelOffsetUpdateOnStable&&(this._needsOutlineLabelOffsetUpdateOnStable=!1,this._updateOutlineLabelOffset())})}),this._dir.change.pipe(He(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)(E(mt),E(Zn),E(ft),E(Ia),E(zi),E(Zte,8),E(Rr,8),E(jt))},i.\u0275cmp=ot({type:i,selectors:[["mat-form-field"]],contentQueries:function(e,n,r){if(1&e&&(Wi(r,To,5),Wi(r,To,7),Wi(r,UR,5),Wi(r,rH,5),Wi(r,sH,5),Wi(r,nH,5),Wi(r,iH,5)),2&e){let s;Et(s=At())&&(n._labelChildNonStatic=s.first),Et(s=At())&&(n._labelChildStatic=s.first),Et(s=At())&&(n._formFieldControl=s.first),Et(s=At())&&(n._prefixChildren=s),Et(s=At())&&(n._suffixChildren=s),Et(s=At())&&(n._errorChildren=s),Et(s=At())&&(n._hintChildren=s)}},viewQuery:function(e,n){if(1&e&&(Wn(wte,5),Wn(Mte,5),Wn(Cte,5),Wn(oH,5),Wn(cH,5),Wn(lH,5)),2&e){let r;Et(r=At())&&(n._textField=r.first),Et(r=At())&&(n._iconPrefixContainer=r.first),Et(r=At())&&(n._textPrefixContainer=r.first),Et(r=At())&&(n._floatingLabel=r.first),Et(r=At())&&(n._notchedOutline=r.first),Et(r=At())&&(n._lineRipple=r.first)}},hostAttrs:[1,"mat-mdc-form-field"],hostVars:42,hostBindings:function(e,n){2&e&&un("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:[Dn([{provide:mC,useExisting:i}])],ngContentSelectors:Gte,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&&(sr(Hte),fe(0,Ate,1,1,"ng-template",null,0,Vc),W(2,"div",1,2),Ue("click",function(s){return n._control.onContainerClick&&n._control.onContainerClick(s)}),fe(4,Dte,1,0,"div",3),W(5,"div",4),fe(6,Rte,2,3,"div",5),fe(7,kte,3,0,"div",6),fe(8,Pte,3,0,"div",7),W(9,"div",8),fe(10,Fte,1,1,"ng-template",9),Wt(11),j(),fe(12,Lte,2,0,"div",10),fe(13,Nte,2,0,"div",11),j(),fe(14,Bte,1,0,"div",12),j(),W(15,"div",13),fe(16,Ute,2,1,"div",14),fe(17,zte,5,2,"div",15),j()),2&e&&(G(2),un("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),G(2),U("ngIf",!n._hasOutline()&&!n._control.disabled),G(2),U("ngIf",n._hasOutline()),G(1),U("ngIf",n._hasIconPrefix),G(1),U("ngIf",n._hasTextPrefix),G(2),U("ngIf",!n._hasOutline()||n._forceDisplayInfixLabel()),G(2),U("ngIf",n._hasTextSuffix),G(1),U("ngIf",n._hasIconSuffix),G(1),U("ngIf",!n._hasOutline()),G(1),un("mat-mdc-form-field-subscript-dynamic-size","dynamic"===n.subscriptSizing),U("ngSwitch",n._getDisplayedMessages()),G(1),U("ngSwitchCase","error"),G(1),U("ngSwitchCase","hint"))},dependencies:[vi,xy,by,VT,CU,iH,oH,cH,lH],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:[Kte.transitionMessages]},changeDetection:0}),i})(),gC=(()=>{class i{}return i.\u0275fac=function(e){return new(e||i)},i.\u0275mod=nn({type:i}),i.\u0275inj=Kt({imports:[Qn,Eo,HI,Qn]}),i})();const fH=Oh({passive:!0});let ene=(()=>{class i{constructor(e,n){this._platform=e,this._ngZone=n,this._monitoredElements=new Map}monitor(e){if(!this._platform.isBrowser)return po;const n=Yc(e),r=this._monitoredElements.get(n);if(r)return r.subject;const s=new Re,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,fH),n.classList.add("cdk-text-field-autofill-monitored")}),this._monitoredElements.set(n,{subject:s,unlisten:()=>{n.removeEventListener("animationstart",a,fH)}}),s}stopMonitoring(e){const n=Yc(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)(ee(zi),ee(ft))},i.\u0275prov=ke({token:i,factory:i.\u0275fac,providedIn:"root"}),i})(),tne=(()=>{class i{}return i.\u0275fac=function(e){return new(e||i)},i.\u0275mod=nn({type:i}),i.\u0275inj=Kt({}),i})();const VR=new me("MAT_INPUT_VALUE_ACCESSOR"),nne=["button","checkbox","file","hidden","image","radio","range","reset","submit"];let ine=0;const rne=$U(class{constructor(i,t,e,n){this._defaultErrorStateMatcher=i,this._parentForm=t,this._parentFormGroup=e,this.ngControl=n,this.stateChanges=new Re}});let ic=(()=>{class i extends rne{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(_l.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&&oU().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,d,h){super(a,s,o,r),this._elementRef=e,this._platform=n,this._autofillMonitor=c,this._formField=h,this._uid="mat-input-"+ine++,this.focused=!1,this.stateChanges=new Re,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=>oU().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&&d.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(){nne.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)(E(mt),E(zi),E(ec,10),E(ub,8),E(Gh,8),E(jU),E(VR,10),E(ene),E(ft),E(mC,8))},i.\u0275dir=ve({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&&Ue("focus",function(){return n._focusChanged(!0)})("blur",function(){return n._focusChanged(!1)})("input",function(){return n._onInput()}),2&e&&(Yl("id",n.id)("disabled",n.disabled)("required",n.required),Dt("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),un("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:[Dn([{provide:UR,useExisting:i}]),lt,bi]}),i})(),pH=(()=>{class i{}return i.\u0275fac=function(e){return new(e||i)},i.\u0275mod=nn({type:i}),i.\u0275inj=Kt({imports:[Qn,gC,gC,tne,Qn]}),i})();function sne(i,t){if(1&i&&(W(0,"mat-label"),Ve(1),j()),2&i){const e=he(2);G(1),_i(e.resource.name)}}function one(i,t){if(1&i){const e=di();W(0,"mat-form-field",1),fe(1,sne,2,1,"mat-label",2),W(2,"input",3),Ue("ngModelChange",function(r){return an(e),zt(he().resource.data=r)})("change",function(){return an(e),zt(he().changed.emit())}),j()()}if(2&i){const e=he();U("matTooltip",e.resourceDescription),G(1),U("ngIf",e.resource.name),G(1),U("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 ane=(()=>{class i{constructor(){this.resource=null,this.resourceDescription="",this.disabled=!1,this.changed=new We}}return i.\u0275fac=function(e){return new(e||i)},i.\u0275cmp=ot({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&&fe(0,one,3,7,"mat-form-field",0),2&e&&U("ngIf",n.resource)},dependencies:[vi,gl,mu,tc,_u,gu,Kc,vl,To,ic,Os],changeDetection:0}),i})();function lne(i,t){if(1&i&&(W(0,"mat-label"),Ve(1),j()),2&i){const e=he(2);G(1),_i(e.resource.name)}}function cne(i,t){if(1&i){const e=di();W(0,"mat-form-field",1),fe(1,lne,2,1,"mat-label",2),W(2,"input",3),Ue("ngModelChange",function(r){return an(e),zt(he().resource.data=r)})("change",function(){return an(e),zt(he().changed.emit())}),j()()}if(2&i){const e=he();U("matTooltip",e.resourceDescription),G(1),U("ngIf",e.resource.name),G(1),U("disabled",e.disabled||void 0!==e.resource.schema.required_value)("maxlength",e.maxLength)("minlength",e.minLength)("ngModel",e.resource.data)}}let mH=(()=>{class i{constructor(){this._resource=null,this.resourceDescription="",this.disabled=!1,this.changed=new We,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=ot({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&&fe(0,cne,3,6,"mat-form-field",0),2&e&&U("ngIf",n.resource)},dependencies:[vi,gl,tc,NR,BR,Kc,vl,To,ic,Os],changeDetection:0}),i})();const rc=(i,t)=>i+(i.includes("__")?"/":"__")+t,Wh=function(){return[]};function dne(i,t){if(1&i&&(W(0,"mat-panel-description"),Ve(1," Click to view items ("),W(2,"b"),Ve(3),j(),Ve(4,") "),j()),2&i){const e=he(2);G(3),_i((e.resourceData||so(1,Wh)).length)}}function une(i,t){1&i&&(W(0,"mat-panel-description"),Ve(1," Empty array "),j())}function hne(i,t){}function fne(i,t){if(1&i){const e=di();W(0,"mat-expansion-panel",4),Ue("opened",function(){return an(e),zt(he().onContentsTrigger(!0))})("closed",function(){return an(e),zt(he().onContentsTrigger(!1))}),W(1,"mat-expansion-panel-header",5)(2,"mat-panel-title"),Ve(3),j(),fe(4,dne,5,2,"mat-panel-description",1),fe(5,une,2,0,"mat-panel-description",1),j(),fe(6,hne,0,0,"ng-template",6),j()}if(2&i){const e=he(),n=Zi(3);G(1),U("matTooltip",e.resourceDescription),G(2),Qi(" ",e.name," "),G(1),U("ngIf",(e.resourceData||so(5,Wh)).length>0),G(1),U("ngIf",0==(e.resourceData||so(6,Wh)).length),G(1),U("ngTemplateOutlet",n)}}function pne(i,t){}function mne(i,t){if(1&i&&(Gr(0),W(1,"h2",5),Ve(2),j(),W(3,"div",7),fe(4,pne,0,0,"ng-template",6),j(),$r()),2&i){const e=he(),n=Zi(3);G(1),U("matTooltip",e.resourceDescription),G(1),_i(e.name),G(2),U("ngTemplateOutlet",n)}}function gne(i,t){}function _ne(i,t){if(1&i&&De(0,"app-editor",10),2&i){const e=he().$implicit,n=he(3);U("resource",n.children[n.pageIndex*n.pageSize+e])("disabled",n.disabled)}}function vne(i,t){if(1&i&&(Gr(0),fe(1,_ne,1,2,"app-editor",9),$r()),2&i){const e=t.$implicit,n=he(3);G(1),U("ngIf",n.pageIndex*n.pageSize+e0)}let zR=(()=>{class i{constructor(e,n){this.main=e,this.cdr=n,this._resource=null,this.resourceDescription="",this.disabled=!1,this.changed=new We,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 Re}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:rc(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(He(this.destroyed$),gn(([n,r])=>!!this.resource&&n.startsWith(this.resource.id)&&!n.substring(this.resource.id.length+1).includes("/"))).subscribe(function(){var n=tt(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 gt(null),this.imageUrl$=new gt(null),this.destroyed$=new Re,this.changed=new We}set resource(e){this._resource$.next(e)}get resource(){return this._resource$.getValue()}ngAfterViewInit(){var e=this;return tt(function*(){e._resource$.pipe(He(e.destroyed$)).subscribe(function(){var n=tt(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)(E(Ql),E(ka))},i.\u0275cmp=ot({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&&(De(0,"app-compound-block-ui",0),Ct(1,"async"),fe(2,Ane,2,3,"img",1),Ct(3,"async")),2&e&&(U("resource",Tt(1,3,n._resource$))("fieldBlacklist",so(7,Dne)),G(2),U("ngIf",Tt(3,5,n.imageUrl$)))},dependencies:[vi,Jl,pl],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 Ine=["*"],Fne=new me("MAT_CARD_CONFIG");let gH=(()=>{class i{constructor(e){this.appearance=e?.appearance||"raised"}}return i.\u0275fac=function(e){return new(e||i)(E(Fne,8))},i.\u0275cmp=ot({type:i,selectors:[["mat-card"]],hostAttrs:[1,"mat-mdc-card","mdc-card"],hostVars:4,hostBindings:function(e,n){2&e&&un("mat-mdc-card-outlined","outlined"===n.appearance)("mdc-card--outlined","outlined"===n.appearance)},inputs:{appearance:"appearance"},exportAs:["matCard"],ngContentSelectors:Ine,decls:1,vars:0,template:function(e,n){1&e&&(sr(),Wt(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})(),_H=(()=>{class i{}return i.\u0275fac=function(e){return new(e||i)},i.\u0275mod=nn({type:i}),i.\u0275inj=Kt({imports:[Qn,Eo,Qn]}),i})();class HR{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 Re,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 GR=(()=>{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=ke({token:i,factory:i.\u0275fac,providedIn:"root"}),i})(),oie=(()=>{class i{}return i.\u0275fac=function(e){return new(e||i)},i.\u0275mod=nn({type:i}),i.\u0275inj=Kt({imports:[Qn,Eo,eb,Qn]}),i})();const MH={transformPanel:Ra("transformPanel",[Pr("void => enter-dropdown",jr("120ms cubic-bezier(0, 0, 0.2, 1)",rV([si({opacity:0,transform:"scale(1, 0.8)"}),si({opacity:1,transform:"scale(1, 1)"})]))),Pr("void => enter-dialog",jr("150ms cubic-bezier(0, 0, 0.2, 1)",rV([si({opacity:0,transform:"scale(0.7)"}),si({transform:"none",opacity:1})]))),Pr("* => void",jr("100ms linear",si({opacity:0})))]),fadeInCalendar:Ra("fadeInCalendar",[Ps("void",si({opacity:0})),Ps("enter",si({opacity:1})),Pr("void => *",jr("120ms 100ms cubic-bezier(0.55, 0, 0.55, 0.2)"))])},EH=function(i){return{active:i}};function Cie(i,t){if(1&i){const e=di();W(0,"button",2),Ue("click",function(){const s=an(e).$implicit;return zt(he().select(s))}),j()}if(2&i){const e=t.$implicit,n=he();jo("background-color",e),U("ngClass",sm(3,EH,n.selectedColor===e))}}function Sie(i,t){if(1&i){const e=di();W(0,"button",2),Ue("click",function(){const s=an(e).$implicit;return zt(he().select(s))}),j()}if(2&i){const e=t.$implicit,n=he();jo("background-color",e),U("ngClass",sm(3,EH,n.selectedColor===e))}}const Eie=["button"],Aie=/^\s+/,Die=/\s+$/,$m=Math.round,Tie=(Math,Math,Math,/[^0-9]/g),AH=["#ffffff","#ffff00","#ff00ff","#ff0000","#c0c0c0","#808080","#808000","#800080","#800000","#00ffff","#00ff00","#008080","#008000","#0000ff","#000080","#000000"];function DH(i,t,e){const n=i.getImageData(t,e,1,1).data;return{r:n[0],g:n[1],b:n[2]}}function jh(i){return 1==i.length?"0"+i:""+i}function Rie(i){return Math.round(255*parseFloat(i)).toString(16)}function TH(i){return Ko(i)/255}function Ko(i){return parseInt(i,16)}function IH(i,t,e,n){var r=[jh($m(i).toString(16)),jh($m(t).toString(16)),jh($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 vu="(?:[-\\+]?\\d*\\.\\d+%?)|(?:[-\\+]?\\d+%?)",jR="[\\s|\\(]+("+vu+")[,|\\s]+("+vu+")[,|\\s]+("+vu+")\\s*\\)?",YR="[\\s|\\(]+("+vu+")[,|\\s]+("+vu+")[,|\\s]+("+vu+")[,|\\s]+("+vu+")\\s*\\)?",Yh={CSS_UNIT:new RegExp(vu),rgb:new RegExp("rgb"+jR),rgba:new RegExp("rgba"+YR),hsl:new RegExp("hsl"+jR),hsla:new RegExp("hsla"+YR),hsv:new RegExp("hsv"+jR),hsva:new RegExp("hsva"+YR),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 qR(i){let t;return i=i.replace(Aie,"").replace(Die,"").toLowerCase(),(t=Yh.rgb.exec(i))?{r:t[1],g:t[2],b:t[3],a:1}:(t=Yh.rgba.exec(i))?{r:t[1],g:t[2],b:t[3],a:t[4]}:(t=Yh.hex8.exec(i))?{r:Ko(t[1]),g:Ko(t[2]),b:Ko(t[3]),a:TH(t[4])}:(t=Yh.hex6.exec(i))?{r:Ko(t[1]),g:Ko(t[2]),b:Ko(t[3]),a:1}:(t=Yh.hex4.exec(i))?{r:Ko(t[1]+""+t[1]),g:Ko(t[2]+""+t[2]),b:Ko(t[3]+""+t[3]),a:TH(t[4]+""+t[4])}:(t=Yh.hex3.exec(i))?{r:Ko(t[1]+""+t[1]),g:Ko(t[2]+""+t[2]),b:Ko(t[3]+""+t[3]),a:1}:null}class qh{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=IH(this.r,this.g,this.b),this.rgba=this.toRgba()}toHex(t){return IH(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 Iie(i,t,e,n,r){var s=[jh($m(i).toString(16)),jh($m(t).toString(16)),jh($m(e).toString(16)),jh(Rie(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 RH=(()=>{class i{constructor(e,n){this.zone=e,this.colorChanged=new We,this.x=0,this.y=0,this.drag=!1,this._destroyed=new Re,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){xo()},i.\u0275dir=ve({type:i,inputs:{color:"color"},outputs:{colorChanged:"colorChanged"}}),i})(),Oie=(()=>{class i extends RH{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}=DH(this.ctx,e.offsetX,e.offsetY);this.emitChange(new qh(n,r,s))}}return i.\u0275fac=function(e){return new(e||i)(E(ft))},i.\u0275cmp=ot({type:i,selectors:[["ngx-mat-color-slider"]],features:[lt],decls:1,vars:0,consts:[["id","color-strip","width","15","height","234",1,"zone-strip",3,"mousedown","mouseup"]],template:function(e,n){1&e&&(W(0,"canvas",0),Ue("mousedown",function(s){return n.onMousedown(s)})("mouseup",function(s){return n.onMouseup(s)}),j())}}),i})(),Fie=(()=>{class i{constructor(){}onInput(e){this._formatInput(e.target)}_formatInput(e){let n=Number(e.value.replace(Tie,""));n=isNaN(n)?0:n,e.value=n}}return i.\u0275fac=function(e){return new(e||i)},i.\u0275dir=ve({type:i,selectors:[["","ngxMatNumericColorInput",""]],hostBindings:function(e,n){1&e&&Ue("input",function(s){return n.onInput(s)})}}),i})(),Nie=(()=>{class i extends RH{constructor(e){super(e,"color-block"),this.zone=e,this._resetBaseColor=!0,this.formGroup=new Hm({r:new nc(null,[_l.required]),g:new nc(null,[_l.required]),b:new nc(null,[_l.required]),a:new nc(null,[_l.required]),hex:new nc(null,[_l.required,_l.pattern(Yh.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(){Mr(this.rCtrl.valueChanges,this.gCtrl.valueChanges,this.bCtrl.valueChanges,this.aCtrl.valueChanges).pipe(He(this._destroyed),ml(400)).subscribe(r=>{const s=new qh(Number(this.rCtrl.value),Number(this.gCtrl.value),Number(this.bCtrl.value),Number(this.aCtrl.value));this.emitChange(s)}),this.hexCtrl.valueChanges.pipe(He(this._destroyed),ml(400),Zl()).subscribe(r=>{const s=qR(r);if(null!=s){const o=new qh(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}=DH(this.ctx,e.offsetX,e.offsetY);this.emitChange(new qh(n,r,s))}}return i.\u0275fac=function(e){return new(e||i)(E(ft))},i.\u0275cmp=ot({type:i,selectors:[["ngx-mat-color-canvas"]],hostAttrs:[1,"ngx-mat-color-canvas"],features:[lt,bi],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&&(W(0,"form",0)(1,"div",1)(2,"div",2)(3,"canvas",3),Ue("mousedown",function(s){return n.onMousedown(s)})("mouseup",function(s){return n.onMouseup(s)}),j(),W(4,"ngx-mat-color-slider",4),Ue("colorChanged",function(s){return n.onSliderColorChanged(s)}),j()(),W(5,"div",5)(6,"mat-form-field")(7,"mat-label"),Ve(8,"R"),j(),De(9,"input",6),j(),W(10,"mat-form-field")(11,"mat-label"),Ve(12,"G"),j(),De(13,"input",7),j(),W(14,"mat-form-field")(15,"mat-label"),Ve(16,"B"),j(),De(17,"input",8),j()()(),W(18,"div",1),De(19,"button",9),W(20,"mat-form-field")(21,"mat-label"),Ve(22,"HEX6"),j(),W(23,"mat-label",10),Ve(24,"#\xa0"),j(),De(25,"input",11),j(),W(26,"mat-form-field",12)(27,"mat-label"),Ve(28,"A"),j(),De(29,"input",13),j()()()),2&e&&(U("formGroup",n.formGroup),G(19),jo("background-color",(null==n.color?null:n.color.rgba)||"transparent"))},dependencies:[ic,vl,To,Yte,MV,IR,gl,mu,tc,bR,_u,gu,Gh,fC,Oie,Fie],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})(),Bie=(()=>{class i{constructor(){this.colorChanged=new We,this.colors1=AH.slice(0,8),this.colors2=AH.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}=qR(e);this.colorChanged.emit(new qh(n,r,s,o))}}return i.\u0275fac=function(e){return new(e||i)},i.\u0275cmp=ot({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&&(W(0,"div",0),fe(1,Cie,1,5,"button",1),j(),W(2,"div",0),fe(3,Sie,1,5,"button",1),j()),2&e&&(G(1),U("ngForOf",n.colors1),G(2),U("ngForOf",n.colors2))},dependencies:[hm,So,MV],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})(),kH=(()=>{class i{constructor(){this.colorChanged=new We}ngOnInit(){}handleColorChanged(e){this.colorChanged.emit(e)}}return i.\u0275fac=function(e){return new(e||i)},i.\u0275cmp=ot({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&&(W(0,"ngx-mat-color-canvas",0),Ue("colorChanged",function(s){return n.handleColorChanged(s)}),j(),W(1,"ngx-mat-color-collection",0),Ue("colorChanged",function(s){return n.handleColorChanged(s)}),j()),2&e&&(U("color",n.color),G(1),U("color",n.color))},dependencies:[Nie,Bie],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})(),XR=(()=>{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=qR(e);return n?new qh(n.r,n.g,n.b,n.a):null}}return i.\u0275fac=function(e){return new(e||i)},i.\u0275prov=ke({token:i,factory:i.\u0275fac}),i})();const Uie={display:{colorInput:"hex"}},PH=new me("mat-color-formats"),OH=new me("ngx-mat-colorpicker-scroll-strategy"),zie={provide:OH,deps:[as],useFactory:function Vie(i){return()=>i.scrollStrategies.reposition()}},Hie=Qy(class{constructor(i){this._elementRef=i}});let FH=(()=>{class i extends Hie{constructor(e){super(e)}}return i.\u0275fac=function(e){return new(e||i)(E(mt))},i.\u0275cmp=ot({type:i,selectors:[["ngx-mat-color-picker-content"]],viewQuery:function(e,n){if(1&e&&Wn(kH,5),2&e){let r;Et(r=At())&&(n._palette=r.first)}},hostAttrs:[1,"ngx-mat-colorpicker-content"],hostVars:3,hostBindings:function(e,n){2&e&&(Iw("@transformPanel","enter"),un("ngx-mat-colorpicker-content-touch",n.picker.touchUi))},inputs:{color:"color"},exportAs:["ngxMatColorPickerContent"],features:[lt],decls:1,vars:1,consts:[[3,"color","colorChanged"]],template:function(e,n){1&e&&(W(0,"ngx-mat-color-palette",0),Ue("colorChanged",function(s){return n.picker.select(s)}),j()),2&e&&U("color",n.picker._selected)},dependencies:[kH],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:[MH.transformPanel,MH.fadeInCalendar]},changeDetection:0}),i})(),LH=(()=>{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 We,this.closedStream=new We,this._touchUi=!1,this._opened=!1,this._defaultColor="primary",this._validSelected=null,this._disabledChange=new Re,this._focusedElementBeforeOpen=null,this._inputSubscription=Zt.EMPTY,this._selectedChanged=new Re,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(FH,{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 Lh(FH,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(Oi(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"),Mr(this._popupRef.backdropClick(),this._popupRef.detachments(),this._popupRef.keydownEvents().pipe(gn(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)(E(Bm),E(as),E(ft),E(XR),E(Ia,8),E(OH),E(jt,8),E(Wr))},i.\u0275cmp=ot({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 yC{constructor(t,e){this.target=t,this.targetElement=e,this.value=this.target.value}}const Gie={provide:Do,useExisting:Gn(()=>bC),multi:!0},$ie={provide:Yr,useExisting:Gn(()=>bC),multi:!0};let bC=(()=>{class i{constructor(e,n,r,s){if(this._elementRef=e,this._formField=n,this._colorFormats=r,this._adapter=s,this.colorChange=new We,this.colorInput=new We,this._disabledChange=new We,this._valueChange=new We,this._onTouched=()=>{},this._cvaOnChange=()=>{},this._validatorOnChange=()=>{},this._pickerSubscription=Zt.EMPTY,this._validator=_l.compose([]),this._lastValueValid=!1,!this._colorFormats)throw function Pie(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 yC(this,this._elementRef.nativeElement)),this.colorChange.emit(new yC(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 yC(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 yC(this,this._elementRef.nativeElement)))}}return i.\u0275fac=function(e){return new(e||i)(E(mt),E(vl,8),E(PH,8),E(XR))},i.\u0275dir=ve({type:i,selectors:[["input","ngxMatColorPicker",""]],hostVars:3,hostBindings:function(e,n){1&e&&Ue("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&&(Yl("disabled",n.disabled),Dt("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:[Dn([Gie,$ie,{provide:VR,useExisting:i}])]}),i})(),Wie=(()=>{class i{constructor(e){this._cd=e,this._stateChanges=Zt.EMPTY}get disabled(){if(null==this._disabled&&this.picker)return this.picker.disabled}set disabled(e){this._disabled=e}ngOnInit(){}ngOnChanges(e){e.picker&&this._watchStateChanges()}ngOnDestroy(){this._stateChanges.unsubscribe()}ngAfterContentInit(){this._watchStateChanges()}open(e){this.picker&&!this.disabled&&(this.picker.open(),e.stopPropagation())}_watchStateChanges(){const e=this.picker?this.picker._disabledChange:ht(),n=this.picker&&this.picker._pickerInput?this.picker._pickerInput._disabledChange:ht(),r=this.picker?Mr(this.picker.openedStream,this.picker.closedStream):ht();this._stateChanges.unsubscribe(),this._stateChanges=Mr(e,n,r).subscribe(()=>this._cd.markForCheck())}}return i.\u0275fac=function(e){return new(e||i)(E(Zn))},i.\u0275cmp=ot({type:i,selectors:[["ngx-mat-color-toggle"]],viewQuery:function(e,n){if(1&e&&Wn(Eie,5),2&e){let r;Et(r=At())&&(n._button=r.first)}},hostAttrs:[1,"ngx-mat-color-toggle"],hostVars:7,hostBindings:function(e,n){1&e&&Ue("focus",function(){return n._button.focus()}),2&e&&(Dt("tabindex",-1),un("ngx-mat-color-toggle-active",n.picker&&n.picker.opened)("mat-accent",n.picker&&"accent"===n.picker.color)("mat-warn",n.picker&&"warn"===n.picker.color))},inputs:{picker:["for","picker"],tabIndex:"tabIndex",disabled:"disabled"},exportAs:["ngxMatColorPickerToggle"],features:[bi],decls:4,vars:5,consts:[["mat-icon-button","","type","button",3,"disabled","click"],["button",""]],template:function(e,n){1&e&&(W(0,"button",0,1),Ue("click",function(s){return n.open(s)}),W(2,"mat-icon"),Ve(3,"palette"),j()()),2&e&&(U("disabled",n.disabled),Dt("aria-haspopup",n.picker?"dialog":null)("tabindex",n.disabled?-1:n.tabIndex),G(2),jo("color",null==n.picker||null==n.picker._selected?null:n.picker._selected.rgba))},dependencies:[XM,gR],styles:[".mat-form-field-appearance .mat-form-field-prefix .ngx-mat-color-toggle-default-icon,.mat-form-field-appearance .mat-form-field-suffix .ngx-mat-color-toggle-default-icon{width:1em}.mat-form-field:not(.mat-form-field-appearance) .mat-form-field-prefix .ngx-mat-color-toggle-default-icon,.mat-form-field:not(.mat-form-field-appearance) .mat-form-field-suffix .ngx-mat-color-toggle-default-icon{display:block;width:1.5em;height:1.5em}.mat-form-field:not(.mat-form-field-appearance) .mat-form-field-prefix .mat-icon-button .ngx-mat-color-toggle-default-icon,.mat-form-field:not(.mat-form-field-appearance) .mat-form-field-suffix .mat-icon-button .ngx-mat-color-toggle-default-icon{margin:auto}\n"],encapsulation:2}),i})(),jie=(()=>{class i{}return i.\u0275fac=function(e){return new(e||i)},i.\u0275mod=nn({type:i}),i.\u0275inj=Kt({providers:[XR,zie],imports:[Eo,pH,KM,_H,oie,eH,tH,_V,Nh,ez]}),i})();const Yie=["picker"],qie=function(i){return{"background-color":i}};function Xie(i,t){if(1&i){const e=di();W(0,"div",5),Ue("click",function(r){const o=an(e).index;return zt(he().onColorClicked(r.currentTarget,o))}),j()}if(2&i){const e=t.$implicit,n=t.index,r=he();U("ngStyle",sm(2,qie,"#"+r.lpad(e.toString(16),"0",8)))("matTooltip",n+": #"+e.toString(16))}}const Kie=function(){return["colors"]};let Zie=(()=>{class i{constructor(){this.resource=null,this.changed=new We,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 yU;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=ot({type:i,selectors:[["app-palette-block-ui"]],viewQuery:function(e,n){if(1&e&&Wn(Yie,5),2&e){let r;Et(r=At())&&(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&&(De(0,"app-compound-block-ui",0),W(1,"div",1),fe(2,Xie,1,4,"div",2),j(),W(3,"input",3),Ue("colorChange",function(s){return n.onColorChange(s.value)}),j(),De(4,"ngx-mat-color-picker",null,4)),2&e){const r=Zi(5);U("resource",n.resource)("fieldBlacklist",so(4,Kie)),G(2),U("ngForOf",null==n.resourceData?null:n.resourceData.colors),G(1),U("ngxMatColorPicker",r)}},dependencies:[So,tM,ic,Os,bC,LH,Jl],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 Qie=["editor"];let Jie=(()=>{class i{constructor(e){this.cdr=e,this._resource=null,this.resourceDescription="",this.disabled=!1,this.changed=new We,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)(E(Zn))},i.\u0275cmp=ot({type:i,selectors:[["app-binary-block-ui"]],viewQuery:function(e,n){if(1&e&&Wn(Qie,5),2&e){let r;Et(r=At())&&(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&&(W(0,"h2",0),Ve(1),j(),De(2,"div",null,1)),2&e&&(U("matTooltip",n.resourceDescription),G(1),_i(null==n.resource?null:n.resource.name))},dependencies:[Os],changeDetection:0}),i})();const ere=["picker"];function tre(i,t){if(1&i&&(W(0,"mat-label",8),Ve(1),j()),2&i){const e=he();G(1),_i(null==e.resource?null:e.resource.name)}}const nre=function(i){return{transform:i}};let ire=(()=>{class i{constructor(e){this.cdr=e,this.resource=null,this.resourceDescription="",this.changed=new We,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)(E(Zn))},i.\u0275cmp=ot({type:i,selectors:[["app-angle-block-ui"]],viewQuery:function(e,n){if(1&e&&Wn(ere,5),2&e){let r;Et(r=At())&&(n.picker=r.first)}},hostBindings:function(e,n){1&e&&Ue("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&&(W(0,"div",0)(1,"div",1,2)(3,"div",3),De(4,"div",4)(5,"div",5),j()(),W(6,"div",6),fe(7,tre,2,1,"mat-label",7),W(8,"mat-label"),Ve(9),Ct(10,"number"),j(),W(11,"mat-label"),Ve(12),Ct(13,"number"),j()()()),2&e&&(U("matTooltip",n.resourceDescription),G(3),U("ngStyle",sm(11,nre,"rotate("+((null==n.resource?null:n.resource.data)||0)+"rad)")),G(4),U("ngIf",null==n.resource?null:n.resource.name),G(2),Qi("",J1(10,5,180*(null==n.resource?null:n.resource.data)/n.pi||0,"1.2-2")," deg"),G(3),Qi("",J1(13,8,(null==n.resource?null:n.resource.data)||0,"1.2-2")," rad"))},dependencies:[vi,tM,To,Os,uB],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 NH{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,d=new Set;for(const h of e)!0===Array.isArray(h)?a.add(h):"object"==typeof h?l.add(h):"function"==typeof h?d.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===d.size){h=!0;for(const p of o)if(!1===d.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 rre(i,t){if(1&i&&(W(0,"mat-list-option",3),Ve(1),j()),2&i){const e=t.$implicit,n=he();U("value",e)("selected",n.selectedValue==e),G(1),Qi(" ",e," ")}}function sre(i,t){if(1&i&&(W(0,"mat-card"),De(1,"app-editor",4),j()),2&i){const e=he();G(1),U("resource",e.resources[e.selectedValue])}}let xC=(()=>{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)(E(NH))},i.\u0275cmp=ot({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&&(W(0,"mat-selection-list",0),Ue("selectionChange",function(s){return n.selectedValue=s.source.selectedOptions.selected[0].value}),fe(1,rre,2,3,"mat-list-option",1),j(),fe(2,sre,2,1,"mat-card",2)),2&e&&(U("multiple",!1),G(1),U("ngForOf",n.keys),G(1),U("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})(),ore=(()=>{class i{constructor(){this._resource=null,this.resourceMap={},this.changed=new We}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",iR("@transformPanel",[nR()],{optional:!0}))]),transformPanel:Ra("transformPanel",[Ps("void",si({opacity:0,transform:"scale(1, 0.8)"})),Pr("void => showing",jr("120ms cubic-bezier(0, 0, 0.2, 1)",si({opacity:1,transform:"scale(1, 1)"}))),Pr("* => void",jr("100ms linear",si({opacity:0})))])};let BH=0;const UH=new me("mat-select-scroll-strategy"),vre=new me("MAT_SELECT_CONFIG"),yre={provide:UH,deps:[as],useFactory:function _re(i){return()=>i.scrollStrategies.reposition()}},bre=new me("MatSelectTrigger");class xre{constructor(t,e){this.source=t,this.value=e}}const wre=YM(JI(jM($U(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 Re}}))));let Mre=(()=>{class i extends wre{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(_l.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=ks(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,d,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=d,this._liveAnnouncer=g,this._defaultOptions=b,this._panelOpen=!1,this._compareWith=(v,y)=>v===y,this._uid="mat-select-"+BH++,this._triggerAriaLabelledBy=null,this._destroy=new Re,this._onChange=()=>{},this._onTouched=()=>{},this._valueId="mat-select-value-"+BH++,this._panelDoneAnimatingStream=new Re,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=Ey(()=>{const v=this.options;return v?v.changes.pipe(Ao(v),Rs(()=>Mr(...v.map(y=>y.onSelectionChange)))):this._ngZone.onStable.pipe(Oi(1),Rs(()=>this.optionSelectionChanges))}),this.openedChange=new We,this._openedStream=this.openedChange.pipe(gn(v=>v),et(()=>{})),this._closedStream=this.openedChange.pipe(gn(v=>!v),et(()=>{})),this.selectionChange=new We,this.valueChange=new We,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 HR(this.multiple),this.stateChanges.next(),this._panelDoneAnimatingStream.pipe(Zl(),He(this._destroy)).subscribe(()=>this._panelDoneAnimating(this.panelOpen))}ngAfterContentInit(){this._initKeyManager(),this._selectionModel.changed.pipe(He(this._destroy)).subscribe(e=>{e.added.forEach(n=>n.select()),e.removed.forEach(n=>n.deselect())}),this.options.changes.pipe(Ao(null),He(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&&!Xo(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||Xo(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(Oi(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 HZ(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=Mr(this.options.changes,this._destroy);this.optionSelectionChanges.pipe(He(e)).subscribe(n=>{this._onSelect(n.source,n.isUserInput),n.isUserInput&&!this.multiple&&this._panelOpen&&(this.close(),this.focus())}),Mr(...this.options.map(n=>n._stateChanges)).pipe(He(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)(E(LM),E(Zn),E(ft),E(jU),E(mt),E(Ia,8),E(ub,8),E(Gh,8),E(mC,8),E(ec,10),ya("tabindex"),E(UH),E(XI),E(vre,8))},i.\u0275dir=ve({type:i,viewQuery:function(e,n){if(1&e&&(Wn(are,5),Wn(lre,5),Wn(xU,5)),2&e){let r;Et(r=At())&&(n.trigger=r.first),Et(r=At())&&(n.panel=r.first),Et(r=At())&&(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:[lt,bi]}),i})(),fb=(()=>{class i extends Mre{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(He(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 PQ(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 xre(this,e)}_getOverlayWidth(){return(this._preferredOverlayOrigin instanceof zI?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=ri(i)))(n||i)}}(),i.\u0275cmp=ot({type:i,selectors:[["mat-select"]],contentQueries:function(e,n,r){if(1&e&&(Wi(r,bre,5),Wi(r,Nm,5),Wi(r,eV,5)),2&e){let s;Et(s=At())&&(n.customTrigger=s.first),Et(s=At())&&(n.options=s),Et(s=At())&&(n.optionGroups=s)}},hostAttrs:["role","combobox","aria-autocomplete","none","aria-haspopup","listbox",1,"mat-mdc-select"],hostVars:19,hostBindings:function(e,n){1&e&&Ue("keydown",function(s){return n._handleKeydown(s)})("focus",function(){return n._onFocus()})("blur",function(){return n._onBlur()}),2&e&&(Dt("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()),un("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:[Dn([{provide:UR,useExisting:i},{provide:JU,useExisting:i}]),lt],ngContentSelectors:mre,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&&(sr(pre),W(0,"div",0,1),Ue("click",function(){return n.toggle()}),W(3,"div",2),fe(4,cre,2,1,"span",3),fe(5,hre,3,2,"span",4),j(),W(6,"div",5)(7,"div",6),ki(),W(8,"svg",7),De(9,"path",8),j()()()(),fe(10,fre,3,9,"ng-template",9),Ue("backdropClick",function(){return n.close()})("attach",function(){return n._onAttached()})("detach",function(){return n.close()})),2&e){const r=Zi(1);Dt("aria-owns",n.panelOpen?n.id+"-panel":null),G(3),U("ngSwitch",n.empty),Dt("id",n._valueId),G(1),U("ngSwitchCase",!0),G(1),U("ngSwitchCase",!1),G(5),U("cdkConnectedOverlayPanelClass",n._overlayPanelClass)("cdkConnectedOverlayScrollStrategy",n._scrollStrategy)("cdkConnectedOverlayOrigin",n._preferredOverlayOrigin||r)("cdkConnectedOverlayOpen",n.panelOpen)("cdkConnectedOverlayPositions",n._positions)("cdkConnectedOverlayWidth",n._overlayWidth)}},dependencies:[hm,by,VT,aB,xU,zI],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:[gre.transformPanel]},changeDetection:0}),i})(),VH=(()=>{class i{}return i.\u0275fac=function(e){return new(e||i)},i.\u0275mod=nn({type:i}),i.\u0275inj=Kt({providers:[yre],imports:[Eo,Pm,tR,Qn,Xy,gC,tR,Qn]}),i})();function Cre(i,t){if(1&i&&(W(0,"mat-label"),Ve(1),j()),2&i){const e=he(3);G(1),_i(e.resource.name)}}function Sre(i,t){if(1&i&&(W(0,"mat-option",6),Ve(1),j()),2&i){const e=t.$implicit,n=he(3);U("value",e[1])("disabled",n.disabled),G(1),Qi(" ",e[1]," ")}}function Ere(i,t){if(1&i){const e=di();W(0,"mat-form-field",3),fe(1,Cre,2,1,"mat-label",0),W(2,"mat-select",4),Ue("valueChange",function(r){return an(e),zt(he(2).resource.data=r)})("selectionChange",function(){return an(e),zt(he(2).changed.emit())}),fe(3,Sre,2,3,"mat-option",5),j()()}if(2&i){const e=he(2);U("matTooltip",e.resourceDescription),G(1),U("ngIf",e.resource.name),G(1),U("value",e.resource.data)("disabled",e.disabled),G(1),U("ngForOf",e.resource.schema.enum_names)}}function Are(i,t){if(1&i&&(W(0,"mat-label"),Ve(1),j()),2&i){const e=he(3);G(1),_i(e.resource.name)}}function Dre(i,t){if(1&i){const e=di();W(0,"mat-form-field",3),fe(1,Are,2,1,"mat-label",0),W(2,"input",7),Ue("ngModelChange",function(r){return an(e),zt(he(2).resource.data=r)})("change",function(){return an(e),zt(he(2).changed.emit())}),j()()}if(2&i){const e=he(2);U("matTooltip",e.resourceDescription),G(1),U("ngIf",e.resource.name),G(1),U("min",0)("max",256*(e.resource.schema.length||1)-1)("ngModel",e.resource.data)}}function Tre(i,t){if(1&i&&(Gr(0),fe(1,Ere,4,5,"mat-form-field",1),fe(2,Dre,3,5,"ng-template",null,2,Vc),$r()),2&i){const e=Zi(3),n=he();G(1),U("ngIf",n.isKnownEnumValue(n.resource.data))("ngIfElse",e)}}let Ire=(()=>{class i{constructor(){this.resource=null,this.resourceDescription="",this.disabled=!1,this.changed=new We}isKnownEnumValue(e){return!!this.resource?.schema.enum_names.find(([n,r])=>r==e)}}return i.\u0275fac=function(e){return new(e||i)},i.\u0275cmp=ot({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&&fe(0,Tre,4,2,"ng-container",0),2&e&&U("ngIf",n.resource)},dependencies:[So,vi,gl,mu,tc,_u,gu,Kc,vl,To,ic,Os,fb,Nm],changeDetection:0}),i})();const Rre=["*"],Pre=["unscopedContent"];function Ore(i,t){1&i&&Wt(0,4)}function Fre(i,t){if(1&i&&(W(0,"div",11),De(1,"input",12),W(2,"div",13),ki(),W(3,"svg",14),De(4,"path",15),j(),ga(),De(5,"div",16),j()()),2&i){const e=he();un("mdc-checkbox--disabled",e.disabled),G(1),U("checked",e.selected)("disabled",e.disabled)}}function Lre(i,t){if(1&i&&(W(0,"div",17),De(1,"input",18),W(2,"div",19),De(3,"div",20)(4,"div",21),j()()),2&i){const e=he();un("mdc-radio--disabled",e.disabled),G(1),U("checked",e.selected)("disabled",e.disabled)}}function Nre(i,t){}function Bre(i,t){if(1&i&&(W(0,"span",22),fe(1,Nre,0,0,"ng-template",23),j()),2&i){he();const e=Zi(3);G(1),U("ngTemplateOutlet",e)}}function Ure(i,t){}function Vre(i,t){if(1&i&&(W(0,"span",24),fe(1,Ure,0,0,"ng-template",23),j()),2&i){he();const e=Zi(5);G(1),U("ngTemplateOutlet",e)}}function zre(i,t){}function Hre(i,t){1&i&&fe(0,zre,0,0,"ng-template",23),2&i&&(he(),U("ngTemplateOutlet",Zi(1)))}function Gre(i,t){}function $re(i,t){if(1&i&&(W(0,"span",25),fe(1,Gre,0,0,"ng-template",23),j()),2&i){he();const e=Zi(3);G(1),U("ngTemplateOutlet",e)}}function Wre(i,t){}function jre(i,t){if(1&i&&(W(0,"span",25),fe(1,Wre,0,0,"ng-template",23),j()),2&i){he();const e=Zi(5);G(1),U("ngTemplateOutlet",e)}}function Yre(i,t){}function qre(i,t){1&i&&fe(0,Yre,0,0,"ng-template",23),2&i&&(he(),U("ngTemplateOutlet",Zi(1)))}const Xre=[[["","matListItemTitle",""]],[["","matListItemLine",""]],"*",[["mat-divider"]],[["","matListItemAvatar",""],["","matListItemIcon",""]]],Kre=["[matListItemTitle]","[matListItemLine]","*","mat-divider","[matListItemAvatar],[matListItemIcon]"],zH=new me("ListOption");let Zre=(()=>{class i{constructor(e){this._elementRef=e}}return i.\u0275fac=function(e){return new(e||i)(E(mt))},i.\u0275dir=ve({type:i,selectors:[["","matListItemTitle",""]],hostAttrs:[1,"mat-mdc-list-item-title","mdc-list-item__primary-text"]}),i})(),Qre=(()=>{class i{constructor(e){this._elementRef=e}}return i.\u0275fac=function(e){return new(e||i)(E(mt))},i.\u0275dir=ve({type:i,selectors:[["","matListItemLine",""]],hostAttrs:[1,"mat-mdc-list-item-line","mdc-list-item__secondary-text"]}),i})(),HH=(()=>{class i{constructor(e){this._listOption=e}_isAlignedAtStart(){return!this._listOption||"after"===this._listOption?._getTogglePosition()}}return i.\u0275fac=function(e){return new(e||i)(E(zH,8))},i.\u0275dir=ve({type:i,hostVars:4,hostBindings:function(e,n){2&e&&un("mdc-list-item__start",n._isAlignedAtStart())("mdc-list-item__end",!n._isAlignedAtStart())}}),i})(),Jre=(()=>{class i extends HH{}return i.\u0275fac=function(){let t;return function(n){return(t||(t=ri(i)))(n||i)}}(),i.\u0275dir=ve({type:i,selectors:[["","matListItemAvatar",""]],hostAttrs:[1,"mat-mdc-list-item-avatar"],features:[lt]}),i})(),ese=(()=>{class i extends HH{}return i.\u0275fac=function(){let t;return function(n){return(t||(t=ri(i)))(n||i)}}(),i.\u0275dir=ve({type:i,selectors:[["","matListItemIcon",""]],hostAttrs:[1,"mat-mdc-list-item-icon"],features:[lt]}),i})();const tse=new me("MAT_LIST_CONFIG");let KR=(()=>{class i{constructor(){this._isNonInteractive=!0,this._disableRipple=!1,this._disabled=!1,this._defaultOptions=Ft(tse,{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=ve({type:i,hostVars:1,hostBindings:function(e,n){2&e&&Dt("aria-disabled",n.disabled)},inputs:{disableRipple:"disableRipple",disabled:"disabled"}}),i})(),GH=(()=>{class i{set lines(e){this._explicitLines=ks(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 Zt,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(Mr(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)(E(mt),E(ft),E(KR,8),E(zi),E(eR,8),E(Rr,8))},i.\u0275dir=ve({type:i,contentQueries:function(e,n,r){if(1&e&&(Wi(r,Jre,4),Wi(r,ese,4)),2&e){let s;Et(s=At())&&(n._avatars=s),Et(s=At())&&(n._icons=s)}},hostVars:4,hostBindings:function(e,n){2&e&&(Dt("aria-disabled",n.disabled)("disabled",n._isButtonElement&&n.disabled||null),un("mdc-list-item--disabled",n.disabled))},inputs:{lines:"lines",disableRipple:"disableRipple",disabled:"disabled"}}),i})();const $H=new me("SelectionList");let wC=(()=>{class i extends GH{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 We,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)(E(mt),E(ft),E($H),E(zi),E(Zn),E(eR,8),E(Rr,8))},i.\u0275cmp=ot({type:i,selectors:[["mat-list-option"]],contentQueries:function(e,n,r){if(1&e&&(Wi(r,Qre,5),Wi(r,Zre,5)),2&e){let s;Et(s=At())&&(n._lines=s),Et(s=At())&&(n._titles=s)}},viewQuery:function(e,n){if(1&e&&Wn(Pre,5),2&e){let r;Et(r=At())&&(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&&Ue("blur",function(){return n._handleBlur()})("click",function(){return n._toggleOnInteraction()}),2&e&&(Dt("aria-selected",n.selected),un("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:[Dn([{provide:GH,useExisting:i},{provide:zH,useExisting:i}]),lt],ngContentSelectors:Kre,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&&(sr(Xre),fe(0,Ore,1,0,"ng-template",null,0,Vc),fe(2,Fre,6,4,"ng-template",null,1,Vc),fe(4,Lre,5,4,"ng-template",null,2,Vc),fe(6,Bre,2,1,"span",3),fe(7,Vre,2,1,"span",4),fe(8,Hre,1,1,"ng-template",5),W(9,"span",6),Wt(10),Wt(11,1),W(12,"span",7,8),Ue("cdkObserveContent",function(){return n._updateItemLines(!0)}),Wt(14,2),j()(),fe(15,$re,2,1,"span",9),fe(16,jre,2,1,"span",9),fe(17,qre,1,1,"ng-template",5),Wt(18,3),De(19,"div",10)),2&e&&(G(6),U("ngIf",n._hasCheckboxAt("before")),G(1),U("ngIf",n._hasRadioAt("before")),G(1),U("ngIf",n._hasIconsOrAvatarsAt("before")),G(7),U("ngIf",n._hasCheckboxAt("after")),G(1),U("ngIf",n._hasRadioAt("after")),G(1),U("ngIf",n._hasIconsOrAvatarsAt("after")))},dependencies:[CU,vi,xy],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 nse={provide:Do,useExisting:Gn(()=>MC),multi:!0};class ise{constructor(t,e){this.source=t,this.options=e}}let MC=(()=>{class i extends KR{get multiple(){return this._multiple}set multiple(e){const n=Jt(e);n!==this._multiple&&(this._multiple=n,this.selectedOptions=new HR(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 Re,this._onChange=r=>{},this.selectionChange=new We,this.color="accent",this.compareWith=(r,s)=>r===s,this._multiple=!0,this._hideSingleSelectionIndicator=this._defaultOptions?.hideSingleSelectionIndicator??!1,this.selectedOptions=new HR(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 ise(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(He(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()&&Xo(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 RU(this._items).withHomeAndEnd().withTypeAhead().withWrap().skipPredicate(()=>this.disabled),this._resetActiveOption(),this._keyManager.change.subscribe(e=>this._setActiveOption(e)),this._items.changes.pipe(He(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=FM();return e&&this._element.nativeElement.contains(e)}}return i.\u0275fac=function(e){return new(e||i)(E(mt),E(ft))},i.\u0275cmp=ot({type:i,selectors:[["mat-selection-list"]],contentQueries:function(e,n,r){if(1&e&&Wi(r,wC,5),2&e){let s;Et(s=At())&&(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&&Ue("keydown",function(s){return n._handleKeydown(s)}),2&e&&Dt("aria-multiselectable",n.multiple)},inputs:{color:"color",compareWith:"compareWith",multiple:"multiple",hideSingleSelectionIndicator:"hideSingleSelectionIndicator",disabled:"disabled"},outputs:{selectionChange:"selectionChange"},exportAs:["matSelectionList"],features:[Dn([nse,{provide:KR,useExisting:i},{provide:$H,useExisting:i}]),lt,bi],ngContentSelectors:Rre,decls:1,vars:0,template:function(e,n){1&e&&(sr(),Wt(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})(),rse=(()=>{class i{}return i.\u0275fac=function(e){return new(e||i)},i.\u0275mod=nn({type:i}),i.\u0275inj=Kt({imports:[HI,Eo,Qn,eb,QU,RV]}),i})();function sse(i,t){if(1&i&&(W(0,"mat-label"),Ve(1),j()),2&i){const e=he(2);G(1),_i(e.resource.name)}}function ose(i,t){if(1&i&&(W(0,"mat-list-option",5),Ve(1),j()),2&i){const e=t.$implicit,n=he(2);U("value",e.key)("selected",n.resource.data[e.key])("disabled",n.disabled),G(1),Qi(" ",e.key," ")}}function ase(i,t){if(1&i){const e=di();Gr(0,1),fe(1,sse,2,1,"mat-label",2),W(2,"mat-selection-list",3),Ue("selectionChange",function(r){return an(e),zt(he().onSelection(r))}),fe(3,ose,2,4,"mat-list-option",4),Ct(4,"keyvalue"),j(),$r()}if(2&i){const e=he();U("matTooltip",e.resourceDescription),G(1),U("ngIf",e.resource.name),G(1),U("disabled",e.disabled),G(1),U("ngForOf",Tt(4,4,e.resource.data))}}let lse=(()=>{class i{constructor(){this.resource=null,this.resourceDescription="",this.disabled=!1,this.changed=new We}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=ot({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&&fe(0,ase,5,6,"ng-container",0),2&e&&U("ngIf",n.resource)},dependencies:[So,vi,To,Os,MC,wC,cB],styles:["[_nghost-%COMP%]{padding-bottom:1.34375em}"],changeDetection:0}),i})();class WH{get tick$(){return this._tick$.asObservable()}get children(){return[...this._children]}constructor(t){this.parent=t,this._tick$=new Re,this._children=[],t&&t.addChild(this)}addChild(t){if(t.parent!==this)throw new Error("Incorrect child clock");this._children.includes(t)||this._children.push(t)}removeChild(t){if(t.parent!==this)throw new Error("Incorrect child clock");this._children=this._children.filter(e=>e!==t)}dispose(){this.parent&&this.parent.removeChild(this);for(const t of this._children)t.dispose();this._tick$.complete()}}const dse=typeof performance>"u"?()=>Date.now():()=>performance.now();class jm extends WH{static get instance(){return jm._instance||(jm._instance=new jm),jm._instance}get elapsedTime(){return dse()}constructor(){super(null);let t=this.elapsedTime;const e=()=>{requestAnimationFrame(e);const n=t,r=this.elapsedTime;t=r,this._tick$.next([n,r-n])};requestAnimationFrame(e)}dispose(){throw new Error("Cannot dispose global clock")}}class jH extends WH{get isRunning(){return!!this.tickSub}get isPaused(){return-1!==this.pausedAt}get isStopped(){return-1===this.startedAt}get timeScale(){return this._timeScale}set timeScale(t){if(t!==this._timeScale||this.pausedByTimescale&&0!==t){if(0===t)return void(this.isPaused||(this.pause(),this.pausedByTimescale=!0));if(this.isPaused&&this.pausedByTimescale&&(this.resume(),this.pausedByTimescale=!1),!this.isStopped){const e=this.isPaused?this.pausedAt:this.parentClock.elapsedTime;this.startedAt=e-(e-this.startedAt)*this.timeScale/t}this._timeScale=t}}get elapsedTime(){return this.isStopped?this.lastStopElapsed:this.isPaused?this._timeScale*(this.pausedAt-this.startedAt):this._timeScale*(this.parentClock.elapsedTime-this.startedAt)}constructor(t=!1,e=jm.instance){super(e),this.parentClock=e,this.tickSub=null,this._internalTick$=new Re,this.tickRateLimit=0,this.paused$=new Re,this.startedAt=-1,this.oldRelativeTime=0,this.pausedAt=-1,this.lastStopElapsed=0,this._timeScale=1,this.pausedByTimescale=!1,this.lastFiredTickElapsed=0,t&&this.start(),this._internalTick$.pipe(et(([n,r])=>[r,r-this.lastFiredTickElapsed]),gn(([n])=>!this.tickRateLimit||Math.floor(this.lastFiredTickElapsed*this.tickRateLimit/1e3)this.lastFiredTickElapsed=n)).subscribe(this._tick$)}start(){this.isRunning||(this.oldRelativeTime=0,this.startedAt=this.parentClock.elapsedTime,this.startListeningTicks())}stop(){this.stopListeningTicks(),this.lastStopElapsed=this.elapsedTime,this.startedAt=this.pausedAt=-1}pause(){this.stopListeningTicks(),this.pausedAt=this.parentClock.elapsedTime,this.pausedByTimescale=!1,this.paused$.next(!0)}resume(){this.isRunning||-1==this.pausedAt||(this.startedAt+=this.parentClock.elapsedTime-this.pausedAt,this.pausedAt=-1,this.startListeningTicks(),this.paused$.next(!1))}startListeningTicks(){if(this.tickSub)throw new Error("Clock is already ticking!");this.tickSub=this.parentClock.tick$.pipe(et(([t,e])=>[this.oldRelativeTime,this.oldRelativeTime+e*this.timeScale]),Vi(([t,e])=>this.oldRelativeTime=e)).subscribe(this._internalTick$)}stopListeningTicks(){var t;null===(t=this.tickSub)||void 0===t||t.unsubscribe(),this.tickSub=null}dispose(){this.stopListeningTicks(),this._internalTick$.complete(),super.dispose()}}const use={transparent:!1,background:0,size:"fullscreen",antialias:!0};class hse{constructor(t,e,n={}){this.scene=t,this.canvas=e,this.entity=null,this.rendererOptions=Object.assign(Object.assign({},use),n||{})}}class pb{static fromArray(t,e=!1){const n=new pb(t[0]);let r=n;for(let s=1;sn.map(r=>new pb(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]}constructor(t){this.data=t,this.adjacent=new Set}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(d=>!e.has(d));for(const d of c)e.add(d),r.push([d,a-1])}}return n}nodes(){return Array.from(this.walkRead(-1))}}var sc=(()=>{return(i=sc||(sc={}))[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",sc;var i})();let Xh=(()=>{class i{constructor(){this.tick$=new Re,this._world=null,this._name="e0x"+(i.default_name_counter++).toString(16),this._selfActive=!0,this.parent=null,this._children=[],this._components=[],this._onSpawned$=new Re,this._onRemoved$=new Re}get world(){return this._world}get name(){return this._name}set name(e){this._name=e}get active(){return this._selfActive&&(!this.parent||this.parent.active)}set active(e){this._selfActive=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 fse extends Xh{constructor(t){super(),this.tickOrder=t}}function Ym(i,t=sc.CONTROLLERS,e){const n=new fse(t);return e&&(n.name=e),i.addEntity(n),n.tick$.pipe(su(()=>{i.removeEntity(n,!0)}))}class ZR extends Xh{get rendererSize$(){return this._rendererSize$.asObservable()}get rendererSize(){return this._rendererSize$.getValue()}get rendererOptions(){return this.renderer.rendererOptions}get physicsDebugViewActive(){return this.renderer.physicsDebugViewActive}set physicsDebugViewActive(t){this.renderer.physicsDebugViewActive=t}constructor(t){super(),this.renderer=t,this.tickOrder=sc.RENDERING,this._rendererSize$=new gt(null),this.addComponents(t),this.tick$.subscribe(()=>{this.renderer.render()})}onSpawned(t){this._rendererSize$.next(null),"fullscreen"==this.rendererOptions.size||"function"==typeof this.rendererOptions.size?(this.renderer.canvas&&(this.renderer.canvas.style.position="absolute"),Mr(Ta(window,"resize").pipe(PM(100)),Ta(window,"orientationchange")).pipe(He(this._onRemoved$),et(()=>({x:window.innerWidth,y:window.innerHeight})),Ao({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 In||void 0!==this.rendererOptions.size.subscribe&&void 0!==this.rendererOptions.size.pipe?this.rendererOptions.size.pipe(He(this._onRemoved$)).subscribe(e=>{this._rendererSize$.next(e)}):this._rendererSize$.next(this.rendererOptions.size),this._rendererSize$.pipe(He(this._onRemoved$),Zl((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 QR=i=>{i.updateVisibility?i.updateVisibility():YH(i)},YH=i=>{for(const t of i.children)QR(t)};class pse extends Xh{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(){YH(this)}addChildren(...t){super.addChildren(...t);for(const e of t)QR(e)}removeChildren(t,e=!1){if(super.removeChildren(t,e),!e)for(const n of t)QR(n)}}class JR{constructor(){this._running=!1,this.stop$=new Re}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 mse extends JR{get output$(){return this._output$.asObservable()}constructor(t,e){super(),this.keyboard=t,this.keymap=e,this._output$=new Re}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")),nu(t.map(e=>this.keyboard.bindMany(...e))).pipe(He(this.stop$),et(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 ek=new In(ms);class CC extends JR{constructor(){super(),this.bindings={},this.skipKeyDownsOnExternalFocus=!0,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 gt(!1);return this.bindings[t].push(e),e.pipe(Zl(),su(()=>{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"),ek;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 gt(!1);this.bindings[n].push(r),e.push(r)}return nu(e).pipe(su(()=>{for(let n=0;nn.includes(!0)),Zl())}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 CC.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)}}CC.externalFocusBlacklist=[HTMLInputElement,HTMLTextAreaElement,HTMLSelectElement,HTMLButtonElement];class qr{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 qr.len(qr.sub(t,e))}static norm(t){const e=qr.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 _se={pointerLock:!1};var Fs=(()=>{return(i=Fs||(Fs={}))[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",Fs;var i})();class qm extends JR{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$=Ta(this._element,"wheel",{passive:!1}).pipe(He(this.stopped$),su(()=>this._wheel$=null),Vi(t=>t.preventDefault()),et(t=>t.deltaY),Uf())),this._wheel$}get isPointerLocked(){return!!document.pointerLockElement}get isPointerLocked$(){return Ta(document,"pointerlockchange").pipe(et(()=>this.isPointerLocked))}get state(){return this._state$.getValue()}get state$(){return this._state$.asObservable()}get multiTouchPositions$(){return this._multiTouchPositions$.asObservable()}get twoTouchGestureDelta$(){return this.state$.pipe(Rs(t=>t==Fs.DRAG_TOUCH_TWO_FINGERS?this.multiTouchPositions$:ek),et(t=>t.map(e=>({x:e.x,y:e.y}))),function gse(){return ti((i,t)=>{let e,n=!1;i.subscribe(Yn(t,r=>{const s=e;e=r,n&&t.next([s,r]),n=!0}))})}(),gn(([t,e])=>t.length>1&&e.length>1),et(([t,e])=>({centerPointDelta:qr.sub(qr.scalarMult(e.reduce((n,r)=>qr.add(n,r),qr.O),1/e.length),qr.scalarMult(t.reduce((n,r)=>qr.add(n,r),qr.O),1/e.length)),angleDelta:qr.angle(e[1],e[0])-qr.angle(t[1],t[0]),distanceDelta:qr.dist(e[1],e[0])-qr.dist(t[1],t[0])})))}get _element(){return this.options.canvas||window}constructor(t={}){super(),this._wheel$=null,this._delta$=new Re,this._position$=new gt(qr.O),this._multiTouchPositions$=new gt([]),this.stopped$=new Re,this._state$=new gt(Fs.NONE),this.options=Object.assign(Object.assign({},_se),t),this.canvasClickListener=this.canvasClickListener.bind(this)}startInternal(){this.options.canvas&&(this.options.canvas.style.touchAction="none"),this._state$.next(Fs.NONE);const t=[Fs.DRAG,Fs.DRAG_MIDDLE_BUTTON,Fs.DRAG_RIGHT_BUTTON],e=[Fs.NONE,Fs.DRAG,Fs.DRAG_TOUCH_TWO_FINGERS],n=[],r={};Ta(this._element,"mousemove").pipe(He(this.stopped$)).subscribe(o=>{this._delta$.next({x:o.movementX,y:o.movementY})}),Ta(this._element,"pointermove").pipe(He(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})}),!qm.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{if(0===n.length)try{this.options.canvas&&this.options.canvas.setPointerCapture(o.pointerId),window.addEventListener("pointerup",s),this._element.addEventListener("pointercancel",s)}catch(a){console.error(a)}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]||Fs.NONE)}),Ta(this._element,"contextmenu").pipe(He(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 vse{static lookAt(t,e,n){let r=Pe.sub(t,e);r=0===Pe.lenSq(r)?Object.assign(Object.assign({},r),{z:1}):Pe.norm(r);let s=Pe.cross(n,r);0===Pe.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=Pe.norm(r),s=Pe.cross(n,r)),s=Pe.norm(s);let o=Pe.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 Yi{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,d=t.w*Math.sin((1-n)*s)/o+e.w*Math.sin(n*s)/o;return isNaN(a)||isNaN(l)||isNaN(c)||isNaN(d)?Yi.clone(t):{x:a,y:l,z:c,w:d}}static fromAngle(t,e){const n=e/2,r=Math.sin(n);return Object.assign(Object.assign({},Pe.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],d=t[10],h=e+o+d;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>d){const p=2*Math.sqrt(1+e-o-d);return{x:.25*p,y:(n+s)/p,z:(r+l)/p,w:(c-a)/p}}if(o>d){const p=2*Math.sqrt(1+o-e-d);return{x:(n+s)/p,y:.25*p,z:(a+c)/p,w:(r-l)/p}}{const p=2*Math.sqrt(1+d-e-o);return{x:(r+l)/p,y:(a+c)/p,z:.25*p,w:(s-n)/p}}}static fromMatrix3(t){const e=t[0][0]+t[1][1]+t[2][2];let n,r,s,o;if(e>0){const a=.5/Math.sqrt(e+1);n=.25/a,r=(t[2][1]-t[1][2])*a,s=(t[0][2]-t[2][0])*a,o=(t[1][0]-t[0][1])*a}else if(t[0][0]>t[1][1]&&t[0][0]>t[2][2]){const a=2*Math.sqrt(1+t[0][0]-t[1][1]-t[2][2]);n=(t[2][1]-t[1][2])/a,r=.25*a,s=(t[0][1]+t[1][0])/a,o=(t[0][2]+t[2][0])/a}else if(t[1][1]>t[2][2]){const a=2*Math.sqrt(1+t[1][1]-t[0][0]-t[2][2]);n=(t[0][2]-t[2][0])/a,r=(t[0][1]+t[1][0])/a,s=.25*a,o=(t[1][2]+t[2][1])/a}else{const a=2*Math.sqrt(1+t[2][2]-t[0][0]-t[1][1]);n=(t[1][0]-t[0][1])/a,r=(t[0][2]+t[2][0])/a,s=(t[1][2]+t[2][1])/a,o=.25*a}return{w:n,x:r,y:s,z:o}}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),d=Math.sin(.5*e);return{w:c*a*s+d*l*o,x:d*a*s-c*l*o,y:c*l*s+d*a*o,z:c*a*o-d*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=Pe.Z){return this.fromMatrix4(vse.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 Pe{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 Pe.len(Pe.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=Pe.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,Yi.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)}}}function tk(i,t,e,n){return r=>r.pipe(tI((s,o)=>{var a;return{targetValue:o,currentValue:null!==(a=s.currentValue)&&void 0!==a?a:o,hasReachedTarget:!1}},{targetValue:null,currentValue:null,hasReachedTarget:!1}),Rs(s=>i.pipe(et(([o,a])=>{if(null===s.targetValue||null===s.currentValue)return s.currentValue;if(s.hasReachedTarget)return;const l=1-Math.exp(-a/t),c=e(s.currentValue,s.targetValue,l);return s.currentValue=c,n(c,s.targetValue)?(s.hasReachedTarget=!0,s.targetValue):c}))),et(s=>void 0!==s?s:null),gn(s=>null!==s))}ps(738);class xse extends Xh{get avgReport(){return this._avgReport}get peakReport(){return this._peakReport}constructor(t=60,e=15){super(),this.maxSamples=t,this.maxRows=e,this.tickOrder=Number.MAX_SAFE_INTEGER,this.sampleIndex=0,this.collectedData=new Map,this._avgReport={totalTime:0,entries:[]},this._peakReport={totalTime:0,entries:[]}}onSpawned(t){super.onSpawned(t),this.sampleIndex=0;const e=()=>(typeof performance>"u"?Date:performance).now();this.world.tickForwardTo$.pipe(He(this.onRemoved$)).subscribe(n=>{n!==this&&(this.collectedData.has(n)?this.collectedData.get(n).push([this.sampleIndex,e(),0]):this.collectedData.set(n,[[this.sampleIndex,e(),0]]))}),this.world.tickForwardedTo$.pipe(He(this.onRemoved$)).subscribe(n=>{if(n===this)return;const r=this.collectedData.get(n);r[r.length-1][2]=e()}),this.tick$.pipe(He(this.onRemoved$)).subscribe(()=>{this.sampleIndex++;const n=Array.from(this.collectedData.entries());for(const[h,p]of n){for(;p.length>0&&p[0][0]h instanceof Xh?""===h.name?h.constructor.name:h.name:"PHYSICS_WORLD"===h?"Physics simulation":h,s=h=>{let p=0,m=0;for(;mh.length-m+1){m--;break}p+=h[h.length-m-1][1]}return m>1&&(h=h.slice(0,h.length-m)).push([`Rest (${m})`,p]),h};let o=0,a=Array.from(this.collectedData.entries()).map(([h,p])=>{const m=p.reduce((g,[b,v,y])=>g+y-v,0)/this.maxSamples;return o+=m,[r(h),m]}).sort((h,p)=>p[1]-h[1]);a=s(a),this._avgReport={totalTime:o,entries:a};let l=new Map,c=Array.from(this.collectedData.entries()).map(([h,p])=>{let m=0;for(const[g,b,v]of p){const y=v-b;m=Math.max(m,y),l.set(g,y+(l.get(g)||0))}return[r(h),m]}).sort((h,p)=>p[1]-h[1]);c=s(c);let d=Array.from(l.values()).reduce((h,p)=>Math.max(h,p),0);this._peakReport={totalTime:d,entries:c}})}onRemoved(){super.onRemoved(),this.collectedData=new Map,this._avgReport={totalTime:0,entries:[]},this._peakReport={totalTime:0,entries:[]}}}var Xm=function(i,t,e,n){return new(e||(e=Promise))(function(s,o){function a(d){try{c(n.next(d))}catch(h){o(h)}}function l(d){try{c(n.throw(d))}catch(h){o(h)}}function c(d){d.done?s(d.value):function r(s){return s instanceof e?s:new e(function(o){o(s)})}(d.value).then(a,l)}c((n=n.apply(i,t||[])).next())})};class yl{static get documentWorlds(){return[...yl._documentWorlds]}constructor(t,e){this.visualScene=t,this.physicsWorld=e,this.worldClock=new jH(!1),this.keyboardInput=new CC,this.name="w0x"+(yl.default_name_counter++).toString(16),this.children=[],this.tickListeners=[],this.tickStarted$=new Re,this.tickForwardTo$=new Re,this.tickForwardedTo$=new Re,this.paused$=new Re,this.disposed$=new Re,this.keyboardInput.start(),window.ggstatic?this.registerConsoleCommands(window.ggstatic):(this.onGgStaticInitialized=this.onGgStaticInitialized.bind(this),window.addEventListener("ggstatic_added",this.onGgStaticInitialized)),this.worldClock.paused$.subscribe(this.paused$),yl._documentWorlds.push(this),yl.worldCreated$.next(this)}init(){return Xm(this,void 0,void 0,function*(){yield Promise.all([this.physicsWorld.init(),this.visualScene.init()]);const t=(e,n,r)=>{e.active&&(this.tickForwardTo$.next(e),e.tick$.next([n,r]),this.tickForwardedTo$.next(e))};this.worldClock.tick$.subscribe(([e,n])=>{this.tickStarted$.next();let r=0;for(;r=sc.PHYSICS_SIMULATION);r++)t(this.tickListeners[r],e,n);for(this.tickForwardTo$.next("PHYSICS_WORLD"),this.physicsWorld.simulate(n),this.tickForwardedTo$.next("PHYSICS_WORLD");re.tickOrder-n.tickOrder),t.onSpawned(this))}removeEntity(t,e=!1){if(t.world){if(t.world!==this)throw new Error("Entity is not a part of this world");this.children.splice(this.children.findIndex(n=>n===t),1),this.tickListeners.splice(this.tickListeners.findIndex(n=>n===t),1),t.onRemoved()}e&&t.dispose()}onGgStaticInitialized(){window.removeEventListener("ggstatic_added",this.onGgStaticInitialized),this.registerConsoleCommands(window.ggstatic)}registerConsoleCommands(t){t.registerConsoleCommand(this,"timescale",(...e)=>Xm(this,void 0,void 0,function*(){return isNaN(+e[0])||(this.worldClock.timeScale=+e[0]),this.worldClock.timeScale.toString()}),"args: [ float? ]; Get current time scale of selected world clock or set it. Default value is 1.0 (no time scale applied)"),t.registerConsoleCommand(this,"fps_limit",(...e)=>Xm(this,void 0,void 0,function*(){return isNaN(+e[0])||(this.worldClock.tickRateLimit=+e[0]),this.worldClock.tickRateLimit.toString()}),"args: [ int? ]; Get current tick rate limit of selected world clock or set it. 0 means no limit applied"),t.registerConsoleCommand(this,"renderers",()=>Xm(this,void 0,void 0,function*(){return this.children.filter(e=>e instanceof ZR).map(e=>e.name).join("\n")}),"no args; Print all renderers in selected world"),t.registerConsoleCommand(this,"debug_view",(...e)=>Xm(this,void 0,void 0,function*(){let r,n="toggle";for(let o of e)["1","0"].includes(o)?n="1"===o:r=o;let s=this.children.find(o=>o instanceof ZR&&(!r||o.name===r));if(s)return s.physicsDebugViewActive="toggle"===n?!s.physicsDebugViewActive:n,s.physicsDebugViewActive?"1":"0";throw r?new Error(`Renderer with name "${r}" not found`):new Error("No renderer found")}),'args: [ 0|1?, string? ]; Turn on/off physics debug view, skip first argument to toggle value. Second argument expects renderer name, if not provided first renderer will be picked. Use "renderers" to get list of renderers in the world'),t.registerConsoleCommand(this,"performance",(...e)=>Xm(this,void 0,void 0,function*(){let n="avg",r=20;for(let d of e)["avg","peak"].includes(d)?n=d:isNaN(+d)||(r=+d);const s=new xse(r,250);this.addEntity(s),yield function yse(i,t){const e="object"==typeof t;return new Promise((n,r)=>{let o,s=!1;i.subscribe({next:a=>{o=a,s=!0},error:r,complete:()=>{s?n(o):e?n(t.defaultValue):r(new fm)}})})}(this.worldClock.tick$.pipe(Oi(r)));const o="avg"===n?s.avgReport:s.peakReport;this.removeEntity(s);const a=o.entries.map(([d,h])=>`${d}:`+new Array(Math.max(0,26-d.length)).join(" ")+`${h.toFixed(2)} ms`+("avg"===n?` (${(100*h/o.totalTime).toFixed(2)}%)`:""));let l="lightgreen";o.totalTime>12&&(l=o.totalTime<16?"yellow":"red");const c=("avg"===n?"Average":"Peak")+" Frame time";return a.unshift(c+":"+new Array(Math.max(0,26-c.length)).join(" ")+`${o.totalTime.toFixed(2)} ms`),a.unshift(`Performance report (${r} samples)`),a.join("\n")}),'args: [ int?, avg|peak? ]; Measure how much time was spent per entity in world. Arguments are samples amount (20 by default) and "peak" or "avg" choice, both arguments are optional. "avg" report sorts entities by average time consumed, "peak" records highest value for each entity')}}yl.default_name_counter=0,yl._documentWorlds=[],yl.worldCreated$=new Re;class Sse extends hse{}class XH extends pse{constructor(){super(...arguments),this._world=null}get world(){return this._world}}class Zo extends XH{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}constructor(t){super(),this.tickOrder=sc.OBJECTS_BINDING,this._position=Pe.O,this._rotation=Yi.O,this.object3D=null,this.objectBody=null,t.objectBody&&(this.objectBody=t.objectBody,this.name=this.objectBody.name,this.addComponents(this.objectBody)),t.object3D&&(this.object3D=t.object3D,t.objectBody||(this._position=this.object3D.position,this._rotation=this.object3D.rotation,this.name=this.object3D.name),this.addComponents(this.object3D)),this.objectBody&&(this.tick$.subscribe(()=>{this.runTransformBinding(this.objectBody,this.object3D)}),this.runTransformBinding(this.objectBody,this.object3D))}}class Km extends pb{static fromMapArray(t,e=!1){const n=new Km(t[0]);let r=n;for(let s=1;sn.map(r=>new Km(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));othis.mapGraph.getNearestDummy(this.mapGraphNodes,this.loaderCursor$.getValue())),Zl(),Vi(r=>this._nearestDummy$.next(r))).subscribe(r=>{let o,s=new Set;if(this.options.inertia>0){o=new Set;const a=r.walkReadPreserveDepth(this.options.loadDepth+this.options.inertia);for(let l=0;lo.add(c.data)),l<=this.options.loadDepth&&a[l].forEach(c=>s.add(c.data))}else r.walkRead(this.options.loadDepth).forEach(a=>s.add(a.data)),o=s;for(const a of this.loaded.keys())o.has(a)?s.delete(a):n.includes(a)||n.push(a);for(let a of Array.from(s.keys()))e.includes(a)||e.push(a)}),this.tick$.pipe(Ao(null),He(this._onRemoved$)).subscribe(()=>{if(n.length){for(const r of n)this.disposeChunk(r);n=[]}if(e.length)if(this._initialLoadComplete$.value&&e.length>this.options.maxNodesLoadingPerTick){let r=e.slice(0,this.options.maxNodesLoadingPerTick);e=e.slice(this.options.maxNodesLoadingPerTick),Promise.all(r.map(s=>this.loadChunk(s))).then()}else Promise.all(e.map(r=>this.loadChunk(r))).then(()=>{this._initialLoadComplete$.value||this._initialLoadComplete$.next(!0)}),e=[]})}onRemoved(){super.onRemoved(),this.loadClock&&(this.loadClock.stop(),this.loadClock=null),this.loaderCursor$.next(Pe.O)}loadChunk(t){return function(i,t,e,n){return new(e||(e=Promise))(function(s,o){function a(d){try{c(n.next(d))}catch(h){o(h)}}function l(d){try{c(n.throw(d))}catch(h){o(h)}}function c(d){d.done?s(d.value):function r(s){return s instanceof e?s:new e(function(o){o(s)})}(d.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||Yi.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||Yi.O}]),[n,e]})}disposeChunk(t){this.loaded.has(t)&&(this.removeChildren(this.loaded.get(t),!0),this.loaded.delete(t))}}class Dse extends ZR{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 e4=function(i,t,e,n){return new(e||(e=Promise))(function(s,o){function a(d){try{c(n.next(d))}catch(h){o(h)}}function l(d){try{c(n.throw(d))}catch(h){o(h)}}function c(d){d.done?s(d.value):function r(s){return s instanceof e?s:new e(function(o){o(s)})}(d.value).then(a,l)}c((n=n.apply(i,t||[])).next())})};const t4={keymap:"wasd",cameraLinearSpeed:20,cameraMovementElasticity:0,cameraBoostMultiplier:2.5,cameraRotationSensitivity:1,cameraRotationElasticity:0,mouseOptions:{},ignoreMouseUnlessPointerLocked:!1,ignoreKeyboardUnlessPointerLocked:!1};class n4 extends Xh{get active(){return super.active}set active(t){!super.active&&t&&this.reset(),super.active=t}get spherical(){return this._spherical}set spherical(t){this._spherical.phi=Math.max(1e-6,Math.min(Math.PI-1e-6,t.phi)),this._spherical.theta=t.theta,this.resetMotion$.next()}constructor(t,e,n={}){super(),this.keyboard=t,this.camera=e,this.tickOrder=sc.INPUT_CONTROLLERS,this._spherical={phi:0,radius:1,theta:0},this.resetMotion$=new Re,this.options=Object.assign(Object.assign({},t4),n),n.mouseOptions&&(this.options.mouseOptions=Object.assign(Object.assign({},t4.mouseOptions),n.mouseOptions)),this.mouseInput=new qm(this.options.mouseOptions),this.directionsInput=new mse(t,this.options.keymap)}reset(){this._spherical=Pe.toSpherical(Pe.rot({x:0,y:0,z:-1},this.camera.rotation)),this.resetMotion$.next()}onSpawned(t){const e=Object.create(null,{onSpawned:{get:()=>super.onSpawned}});return e4(this,void 0,void 0,function*(){yield e.onSpawned.call(this,t),this._spherical=Pe.toSpherical(Pe.rot({x:0,y:0,z:-1},this.camera.rotation));const n=["KeyE","KeyQ"];this.camera.camera.supportsFov&&n.push("KeyZ","KeyC"),n.push("ShiftLeft");let r=nu([this.directionsInput.output$,...n.map(c=>this.keyboard.bind(c))]).pipe(He(this._onRemoved$),et(([c,...d])=>{let h={direction:{},rest:[]};(!this.options.ignoreKeyboardUnlessPointerLocked||this.mouseInput.isPointerLocked)&&(h={direction:c,rest:d});let p=Object.assign({},Pe.O);const[m,g,b,v,y]=h.rest;void 0!==h.direction.upDown&&(p.z=h.direction.upDown?-1:1),void 0!==h.direction.leftRight&&(p.x=h.direction.leftRight?-1:1),m!=g&&(p.y=g?-1:1);let M=0;return b!=v&&(M=b?1:-1),p=Pe.norm(p),y&&(p=Pe.scalarMult(p,this.options.cameraBoostMultiplier)),[p,M]}));this.options.cameraMovementElasticity>0&&(r=r.pipe(tk(this.camera.tick$,this.options.cameraMovementElasticity,([c,d],[h,p],m)=>[Pe.lerp(c,h,m),p],([c,d],[h,p])=>d==p&&Pe.dist(c,h)<.001)));let s=Pe.O,o=0;r.subscribe(([c,d])=>{s=c,o=d});let a=qm.isTouchDevice(),l=this.mouseInput.delta$.pipe(He(this._onRemoved$),gn(()=>this.active&&(a||!this.options.ignoreMouseUnlessPointerLocked||this.mouseInput.isPointerLocked)));if(this.options.cameraRotationElasticity>0){const c=new gt(this._spherical);l.subscribe(h=>{const p=c.getValue();c.next({phi:Math.max(1e-6,Math.min(Math.PI-1e-6,p.phi+h.y*this.options.cameraRotationSensitivity/1e3)),theta:p.theta-h.x*this.options.cameraRotationSensitivity/1e3,radius:1})});const d=()=>{c.pipe(He(this._onRemoved$),tk(this.tick$,this.options.cameraRotationElasticity,(h,p,m)=>({phi:h.phi+m*(p.phi-h.phi),theta:h.theta+m*(p.theta-h.theta),radius:1}),(h,p)=>qr.dist({x:h.phi,y:h.theta},{x:p.phi,y:p.theta})<1e-4),He(this.resetMotion$)).subscribe(h=>{this._spherical.theta=h.theta,this._spherical.phi=h.phi})};this.resetMotion$.pipe(He(this._onRemoved$)).subscribe(()=>{c.next(this._spherical),d()}),d()}else l.subscribe(c=>{this._spherical.theta-=c.x*this.options.cameraRotationSensitivity/1e3,this._spherical.phi+=c.y*this.options.cameraRotationSensitivity/1e3,this._spherical.phi=Math.max(1e-6,Math.min(Math.PI-1e-6,this._spherical.phi))});this.camera.tick$.pipe(He(this._onRemoved$),gn(()=>this.active)).subscribe(([c,d])=>{this.camera.camera.fov+=o,this.camera.position=Pe.add(this.camera.position,Pe.rot(Pe.scalarMult(s,this.options.cameraLinearSpeed*d/1e3),this.camera.rotation)),this.camera.rotation=Yi.lookAt(this.camera.position,Pe.add(this.camera.position,Pe.fromSpherical(this._spherical)))}),this.mouseInput.start(),this.directionsInput.start()})}onRemoved(){const t=Object.create(null,{onRemoved:{get:()=>super.onRemoved}});return e4(this,void 0,void 0,function*(){yield t.onRemoved.call(this),yield this.mouseInput.stop(!0),yield this.directionsInput.stop()})}}var i4=function(i,t,e,n){return new(e||(e=Promise))(function(s,o){function a(d){try{c(n.next(d))}catch(h){o(h)}}function l(d){try{c(n.throw(d))}catch(h){o(h)}}function c(d){d.done?s(d.value):function r(s){return s instanceof e?s:new e(function(o){o(s)})}(d.value).then(a,l)}c((n=n.apply(i,t||[])).next())})};const Ise={mouseOptions:{},orbiting:{sensitivityX:1,sensitivityY:1},orbitingElasticity:0,zooming:{sensitivity:1},panning:{sensitivityX:1,sensitivityY:1},dollying:{sensitivity:1}};class Rse extends Xh{get active(){return super.active}set active(t){!super.active&&t&&this.reset(),super.active=t}get spherical(){return this._spherical}set spherical(t){this._spherical.phi=Math.max(1e-6,Math.min(Math.PI-1e-6,t.phi)),this._spherical.theta=t.theta,this._spherical.radius=t.radius,this.resetMotion$.next()}constructor(t,e={}){super(),this.camera=t,this.tickOrder=sc.INPUT_CONTROLLERS,this._spherical={phi:0,radius:10,theta:0},this.target=Pe.O,this.resetMotion$=new Re,this.options=Object.assign(Object.assign({},Ise),e),this.mouseInput=new qm(this.options.mouseOptions)}reset(){let t=Pe.dist(this.target,this.camera.position);this.target=Pe.add(this.camera.position,Pe.rot({x:0,y:0,z:-t},this.camera.rotation)),this._spherical=Pe.toSpherical(Pe.sub(this.camera.position,this.target)),this.resetMotion$.next()}onSpawned(t){const e=Object.create(null,{onSpawned:{get:()=>super.onSpawned}});return i4(this,void 0,void 0,function*(){if(yield e.onSpawned.call(this,t),this._spherical=Pe.toSpherical(Pe.sub(this.camera.position,this.target)),this.options.orbiting){let r=this.mouseInput.delta$.pipe(He(this._onRemoved$),gn(()=>this.active&&this.mouseInput.state==Fs.DRAG));if(this.options.orbitingElasticity>0){const s=new gt(this._spherical);r.subscribe(a=>{const l=s.getValue();s.next({phi:Math.max(1e-6,Math.min(Math.PI-1e-6,l.phi-a.y*this.options.orbiting.sensitivityY/1e3)),theta:l.theta-a.x*this.options.orbiting.sensitivityX/1e3,radius:1})});const o=()=>{s.pipe(He(this._onRemoved$),tk(this.tick$,this.options.orbitingElasticity,(a,l,c)=>({phi:a.phi+c*(l.phi-a.phi),theta:a.theta+c*(l.theta-a.theta),radius:1}),(a,l)=>qr.dist({x:a.phi,y:a.theta},{x:l.phi,y:l.theta})<1e-4),He(this.resetMotion$)).subscribe(a=>{this._spherical.theta=a.theta,this._spherical.phi=a.phi})};this.resetMotion$.pipe(He(this._onRemoved$)).subscribe(()=>{s.next(this._spherical),o()}),o()}else r.subscribe(s=>{this._spherical.theta-=s.x*this.options.orbiting.sensitivityX/1e3,this._spherical.phi-=s.y*this.options.orbiting.sensitivityY/1e3,this._spherical.phi=Math.max(1e-6,Math.min(Math.PI-1e-6,this._spherical.phi))})}this.options.zooming&&this.mouseInput.wheel$.pipe(He(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=Pe.fromSpherical(this._spherical),o=Pe.rotAround(s,{x:-Math.sin(this._spherical.theta),y:Math.cos(this._spherical.theta),z:0},Math.PI/2),a=Pe.rotAround(s,Pe.norm(o),Math.PI/2);this.target=Pe.add(this.target,Pe.add(Pe.scalarMult(o,-this.options.panning.sensitivityY*r.y/1e3),Pe.scalarMult(a,this.options.panning.sensitivityX*r.x/1e3)))};this.options.panning&&this.mouseInput.delta$.pipe(He(this._onRemoved$),gn(()=>this.mouseInput.state==Fs.DRAG_RIGHT_BUTTON)).subscribe(r=>{n(r)}),this.options.dollying&&this.mouseInput.delta$.pipe(He(this._onRemoved$),gn(()=>this.mouseInput.state==Fs.DRAG_MIDDLE_BUTTON)).subscribe(r=>{this._spherical.radius*=Math.pow(.95,-this.options.dollying.sensitivity*r.y/10)}),qm.isTouchDevice()&&(this.options.dollying||this.options.panning)&&this.mouseInput.twoTouchGestureDelta$.pipe(He(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(He(this._onRemoved$),gn(()=>this.active),et(()=>this._spherical)).subscribe(r=>{this.camera.position=Pe.add(this.target,Pe.fromSpherical(r)),this.camera.rotation=Yi.lookAt(this.camera.position,this.target)}),yield this.mouseInput.start()})}onRemoved(){const t=Object.create(null,{onRemoved:{get:()=>super.onRemoved}});return i4(this,void 0,void 0,function*(){yield t.onRemoved.call(this),yield this.mouseInput.stop(!0)})}}class Pse{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 rk=function(i,t,e,n){return new(e||(e=Promise))(function(s,o){function a(d){try{c(n.next(d))}catch(h){o(h)}}function l(d){try{c(n.throw(d))}catch(h){o(h)}}function c(d){d.done?s(d.value):function r(s){return s instanceof e?s:new e(function(o){o(s)})}(d.value).then(a,l)}c((n=n.apply(i,t||[])).next())})},yu=(()=>{return(i=yu||(yu={}))[i.Nothing=0]="Nothing",i[i.Files=1]="Files",i[i.Entities=2]="Entities",yu;var i})();const r4={cachingStrategy:yu.Nothing,position:Pe.O,rotation:Yi.O,loadProps:!0},s4=i=>({meta:i.meta,resources:i.resources.map(({object3D:t,body:e})=>({object3D:t&&t.clone(),body:e&&e.clone()}))});class Ose{constructor(t){this.world=t,this.filesCache=new Map,this.loadResultCache=new Map}loadGgGlbFiles(t){return rk(this,arguments,void 0,function*(e,n=!1){if(n&&this.filesCache.has(e))return this.filesCache.get(e);const r=Promise.all([fetch(`${e}.glb`).then(o=>o.arrayBuffer()),fetch(`${e}.meta`).then(o=>o.text()).then(o=>JSON.parse(o))]);n&&this.filesCache.set(e,r);const s=yield r;return n&&this.filesCache.set(e,s),s})}loadGgGlbResources(t){return rk(this,arguments,void 0,function*(e,n=yu.Nothing){if(n==yu.Entities&&this.loadResultCache.has(e)){const c=this.loadResultCache.get(e),d=c instanceof Promise?yield c:c;return s4(d)}const[r,s]=yield this.loadGgGlbFiles(e,n==yu.Files);if(!r)throw new Error("GLB not found");const[o,a]=yield Promise.all([this.world.visualScene.loader.loadFromGgGlb(r,s),this.world.physicsWorld.loader.loadFromGgGlb(r,s)]),l={resources:[],meta:s};if(!o)return l;if(0==a.length)l.resources.push({object3D:o,body:null});else if(1==a.length)l.resources.push({object3D:o,body:a[0]});else{for(const c of a)l.resources.push({object3D:o.popChild(c.name),body:c});o.isEmpty()||l.resources.push({object3D:o,body:null})}return n==yu.Entities&&this.loadResultCache.set(e,s4(l)),l})}loadGgGlb(t){return rk(this,arguments,void 0,function*(e,n=r4){const r=Object.assign(Object.assign({},r4),n),{resources:s,meta:o}=yield this.loadGgGlbResources(e,r.cachingStrategy),a={entities:s.map(l=>new Zo({object3D:l.object3D,objectBody:l.body})),meta:o};return r.loadProps&&(a.props=yield Promise.all(o.dummies.filter(l=>l.is_prop||l.is_scene).map(l=>this.loadGgGlb(l.is_prop?(r.propsPath||e.substring(0,e.lastIndexOf("/")+1))+l.prop_id:l.scene_id,{loadProps:!!l.is_scene,position:Pe.add(Pe.rot(l.position,r.rotation),r.position),rotation:Yi.combineRotations(l.rotation,r.rotation)})))),a.entities.forEach(l=>{l.position=Pe.add(Pe.rot(Pe.clone(l.position),r.rotation),r.position),l.rotation=Yi.mult(Yi.clone(l.rotation),r.rotation)}),a})}}class sk extends yl{constructor(t,e){super(t,e),this.visualScene=t,this.physicsWorld=e,this.loader=new Ose(this)}addPrimitiveRigidBody(t,e=Pe.O,n=Yi.O,r={}){const s=new Zo({object3D:this.visualScene.factory.createPrimitive(t.shape,r),objectBody:this.physicsWorld.factory.createRigidBody(t)});return s.position=e,s.rotation=n,this.addEntity(s),s}addRenderer(t,e,n){const r=new Dse(this.visualScene.createRenderer(t,e,n));return this.addEntity(r),r}registerConsoleCommands(t){super.registerConsoleCommands(t),t.registerConsoleCommand(this,"gravity",(...e)=>function(i,t,e,n){return new(e||(e=Promise))(function(s,o){function a(d){try{c(n.next(d))}catch(h){o(h)}}function l(d){try{c(n.throw(d))}catch(h){o(h)}}function c(d){d.done?s(d.value):function r(s){return s instanceof e?s:new e(function(o){o(s)})}(d.value).then(a,l)}c((n=n.apply(i,t||[])).next())})}(this,void 0,void 0,function*(){if(1==e.length&&(e=["0","0",""+-+e[0]]),e.length>0){if(isNaN(+e[0])||isNaN(+e[1])||isNaN(+e[2]))throw new Error("Wrong arguments");this.physicsWorld.gravity={x:+e[0],y:+e[1],z:+e[2]}}return JSON.stringify(this.physicsWorld.gravity)}),'args: [ ?float, ?float, ?float ]; Get or set 3D world gravity vector. 1 argument sets vector {x: 0, y: 0, z: -value}, 3 arguments set the whole vector. Default value is "9.82" or "0 0 -9.82"')}}function o4(i,t=$y,e){const n=OI(i,t);return function Lse(i,t){return ti((e,n)=>{const{leading:r=!0,trailing:s=!1}=t??{};let o=!1,a=null,l=null,c=!1;const d=()=>{l?.unsubscribe(),l=null,s&&(m(),c&&n.complete())},h=()=>{l=null,c&&n.complete()},p=g=>l=wr(i(g)).subscribe(Yn(n,d,h)),m=()=>{if(o){o=!1;const g=a;a=null,n.next(g),!c&&p(g)}};e.subscribe(Yn(n,g=>{o=!0,a=g,(!l||l.closed)&&(r?m():p(g))},()=>{c=!0,(!(s&&o&&l)||l.closed)&&n.complete()}))})}(()=>n,e)}window.gg_version="0.0.56";const Nse=0,a4=1,Bse=2,l4=1,c4=2,Zc=3,ac=0,Io=1,Ls=2,Qc=0,Zm=1,d4=2,u4=3,h4=4,Use=5,Kh=100,Vse=101,zse=102,Hse=103,Gse=104,$se=200,Wse=201,jse=202,Yse=203,ak=204,lk=205,qse=206,Xse=207,Kse=208,Zse=209,Qse=210,Jse=211,eoe=212,toe=213,noe=214,ioe=0,roe=1,soe=2,SC=3,ooe=4,aoe=5,loe=6,coe=7,EC=0,doe=1,uoe=2,bu=0,hoe=1,foe=2,poe=3,moe=4,goe=5,_oe=6,voe=7,f4="attached",lc=301,Zh=302,AC=303,DC=304,mb=306,Pa=1e3,Ii=1001,gb=1002,_r=1003,dk=1004,Qm=1005,lr=1006,_b=1007,bl=1008,Jc=1009,p4=1010,m4=1011,vb=1012,uk=1013,xu=1014,Qo=1015,Jm=1016,hk=1017,fk=1018,eg=1020,g4=35902,_4=1021,v4=1022,Ro=1023,y4=1024,b4=1025,tg=1026,ng=1027,pk=1028,TC=1029,x4=1030,mk=1031,gk=1033,IC=33776,RC=33777,kC=33778,PC=33779,_k=35840,vk=35841,yk=35842,bk=35843,xk=36196,wk=37492,Mk=37496,Ck=37808,Sk=37809,Ek=37810,Ak=37811,Dk=37812,Tk=37813,Ik=37814,Rk=37815,kk=37816,Pk=37817,Ok=37818,Fk=37819,Lk=37820,Nk=37821,OC=36492,Bk=36494,Uk=36495,w4=36283,Vk=36284,zk=36285,Hk=36286,yb=2300,bb=2301,Moe=0,C4=1,Wk=2,Soe=3201,Qh=0,Eoe=1,wu="",cs="srgb",ds="srgb-linear",jk="display-p3",LC="display-p3-linear",NC="linear",Fi="srgb",BC="rec709",UC="p3",sg=7680,Aoe=512,Doe=513,Toe=514,E4=515,Ioe=516,Roe=517,koe=518,Poe=519,A4="300 es",ed=2e3;class og{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]+Ns[i>>16&255]+Ns[i>>24&255]+"-"+Ns[255&t]+Ns[t>>8&255]+"-"+Ns[t>>16&15|64]+Ns[t>>24&255]+"-"+Ns[63&e|128]+Ns[e>>8&255]+"-"+Ns[e>>16&255]+Ns[e>>24&255]+Ns[255&n]+Ns[n>>8&255]+Ns[n>>16&255]+Ns[n>>24&255]).toLowerCase()}function er(i,t,e){return Math.max(t,Math.min(e,i))}function Yk(i,t){return(i%t+t)%t}function xb(i,t,e){return(1-e)*i+e*t}function lo(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 yn(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 Koe_radToDeg=function Woe(i){return i*ag};class xe{constructor(t=0,e=0){xe.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(er(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 wn{constructor(t,e,n,r,s,o,a,l,c){wn.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 d=this.elements;return d[0]=t,d[1]=r,d[2]=a,d[3]=e,d[4]=s,d[5]=l,d[6]=n,d[7]=o,d[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],d=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],F=r[2],D=r[5],k=r[8];return s[0]=o*b+a*M+l*F,s[3]=o*v+a*x+l*D,s[6]=o*y+a*C+l*k,s[1]=c*b+d*M+h*F,s[4]=c*v+d*x+h*D,s[7]=c*y+d*C+h*k,s[2]=p*b+m*M+g*F,s[5]=p*v+m*x+g*D,s[8]=p*y+m*C+g*k,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],d=t[8];return e*o*d-e*a*c-n*s*d+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],d=t[8],h=d*o-a*c,p=a*l-d*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-d*n)*b,t[2]=(a*n-r*o)*b,t[3]=p*b,t[4]=(d*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(qk.makeScale(t,e)),this}rotate(t){return this.premultiply(qk.makeRotation(-t)),this}translate(t,e){return this.premultiply(qk.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 qk=new wn;function T4(i){for(let t=i.length-1;t>=0;--t)if(i[t]>=65535)return!0;return!1}function wb(i){return document.createElementNS("http://www.w3.org/1999/xhtml",i)}function Qoe(){const i=wb("canvas");return i.style.display="block",i}Int8Array,Uint8Array,Uint8ClampedArray,Int16Array,Uint16Array,Int32Array,Uint32Array,Float32Array,Float64Array;const I4={};function cg(i){i in I4||(I4[i]=!0,console.warn(i))}const R4=(new wn).set(.8224621,.177538,0,.0331941,.9668058,0,.0170827,.0723974,.9105199),k4=(new wn).set(1.2249401,-.2249404,0,-.0420569,1.0420571,0,-.0196376,-.0786361,1.0982735),Mb={[ds]:{transfer:NC,primaries:BC,luminanceCoefficients:[.2126,.7152,.0722],toReference:i=>i,fromReference:i=>i},[cs]:{transfer:Fi,primaries:BC,luminanceCoefficients:[.2126,.7152,.0722],toReference:i=>i.convertSRGBToLinear(),fromReference:i=>i.convertLinearToSRGB()},[LC]:{transfer:NC,primaries:UC,luminanceCoefficients:[.2289,.6917,.0793],toReference:i=>i.applyMatrix3(k4),fromReference:i=>i.applyMatrix3(R4)},[jk]:{transfer:Fi,primaries:UC,luminanceCoefficients:[.2289,.6917,.0793],toReference:i=>i.convertSRGBToLinear().applyMatrix3(k4),fromReference:i=>i.applyMatrix3(R4).convertLinearToSRGB()}},eae=new Set([ds,LC]),Jn={enabled:!0,_workingColorSpace:ds,get workingColorSpace(){return this._workingColorSpace},set workingColorSpace(i){if(!eae.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,Mb[e].fromReference)((0,Mb[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 Mb[i].primaries},getTransfer:function(i){return i===wu?NC:Mb[i].transfer},getLuminanceCoefficients:function(i,t=this._workingColorSpace){return i.fromArray(Mb[t].luminanceCoefficients)}};function dg(i){return i<.04045?.0773993808*i:Math.pow(.9478672986*i+.0521327014,2.4)}function Xk(i){return i<.0031308?12.92*i:1.055*Math.pow(i,.41666)-.055}let ug;class tae{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===ug&&(ug=wb("canvas")),ug.width=t.width,ug.height=t.height;const n=ug.getContext("2d");t instanceof ImageData?n.putImageData(t,0,0):n.drawImage(t,0,0,t.width,t.height),e=ug}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=wb("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 og{constructor(e=i.DEFAULT_IMAGE,n=i.DEFAULT_MAPPING,r=Ii,s=Ii,o=lr,a=bl,l=Ro,c=Jc,d=i.DEFAULT_ANISOTROPY,h=wu){super(),this.isTexture=!0,Object.defineProperty(this,"id",{value:iae++}),this.uuid=Jo(),this.name="",this.source=new hg(e),this.mipmaps=[],this.mapping=n,this.channel=0,this.wrapS=r,this.wrapT=s,this.magFilter=o,this.minFilter=a,this.anisotropy=d,this.format=l,this.internalFormat=null,this.type=c,this.offset=new xe(0,0),this.repeat=new xe(1,1),this.center=new xe(0,0),this.rotation=0,this.matrixAutoUpdate=!0,this.matrix=new wn,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 Pa:e.x=e.x-Math.floor(e.x);break;case Ii:e.x=e.x<0?0:1;break;case gb: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 Pa:e.y=e.y-Math.floor(e.y);break;case Ii:e.y=e.y<0?0:1;break;case gb: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 gi{constructor(t=0,e=0,n=0,r=1){gi.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],d=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(d-p)<.01&&Math.abs(h-b)<.01&&Math.abs(g-v)<.01){if(Math.abs(d+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,F=(y+1)/2,D=(d+p)/4,k=(h+b)/4,B=(g+v)/4;return x>C&&x>F?x<.01?(n=0,r=.707106781,s=.707106781):(n=Math.sqrt(x),r=D/n,s=k/n):C>F?C<.01?(n=.707106781,r=0,s=.707106781):(r=Math.sqrt(C),n=D/r,s=B/r):F<.01?(n=.707106781,r=.707106781,s=0):(s=Math.sqrt(F),n=k/s,r=B/s),this.set(n,r,s,e),this}let M=Math.sqrt((v-g)*(v-g)+(h-b)*(h-b)+(p-d)*(p-d));return Math.abs(M)<.001&&(M=1),this.x=(v-g)/M,this.y=(h-b)/M,this.z=(p-d)/M,this.w=Math.acos((c+m+y-1)/2),this}setFromMatrixPosition(t){const e=t.elements;return this.x=e[12],this.y=e[13],this.z=e[14],this.w=e[15],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 rae extends og{constructor(t=1,e=1,n={}){super(),this.isRenderTarget=!0,this.width=t,this.height=e,this.depth=1,this.scissor=new gi(0,0,t,e),this.scissorTest=!1,this.viewport=new gi(0,0,t,e);const r={width:t,height:e,depth:1};n=Object.assign({generateMipmaps:!1,internalFormat:null,minFilter:lr,depthBuffer:!0,stencilBuffer:!1,resolveDepthBuffer:!0,resolveStencilBuffer:!0,depthTexture:null,samples:0,count:1},n);const s=new ko(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 F=Math.sqrt(x),D=Math.atan2(F,y*M);v=Math.sin(v*D)/F,a=Math.sin(a*D)/F}const C=a*M;if(l=l*v+p*C,c=c*v+m*C,d=d*v+g*C,h=h*v+b*C,v===1-a){const F=1/Math.sqrt(l*l+c*c+d*d+h*h);l*=F,c*=F,d*=F,h*=F}}t[e]=l,t[e+1]=c,t[e+2]=d,t[e+3]=h}static multiplyQuaternionsFlat(t,e,n,r,s,o){const a=n[r],l=n[r+1],c=n[r+2],d=n[r+3],h=s[o],p=s[o+1],m=s[o+2],g=s[o+3];return t[e]=a*g+d*h+l*m-c*p,t[e+1]=l*g+d*p+c*h-a*m,t[e+2]=c*g+d*m+a*p-l*h,t[e+3]=d*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),d=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*d*h+c*m*g,this._y=c*m*h-p*d*g,this._z=c*d*g+p*m*h,this._w=c*d*h-p*m*g;break;case"YXZ":this._x=p*d*h+c*m*g,this._y=c*m*h-p*d*g,this._z=c*d*g-p*m*h,this._w=c*d*h+p*m*g;break;case"ZXY":this._x=p*d*h-c*m*g,this._y=c*m*h+p*d*g,this._z=c*d*g+p*m*h,this._w=c*d*h-p*m*g;break;case"ZYX":this._x=p*d*h-c*m*g,this._y=c*m*h+p*d*g,this._z=c*d*g-p*m*h,this._w=c*d*h+p*m*g;break;case"YZX":this._x=p*d*h+c*m*g,this._y=c*m*h+p*d*g,this._z=c*d*g-p*m*h,this._w=c*d*h-p*m*g;break;case"XZY":this._x=p*d*h-c*m*g,this._y=c*m*h-p*d*g,this._z=c*d*g+p*m*h,this._w=c*d*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],d=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=(d-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=(d-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+d)/m}else{const m=2*Math.sqrt(1+h-n-a);this._w=(o-r)/m,this._x=(s+c)/m,this._y=(l+d)/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(er(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,d=e._w;return this._x=n*d+o*a+r*c-s*l,this._y=r*d+o*l+s*a-n*c,this._z=s*d+o*c+n*l-r*a,this._w=o*d-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),d=Math.atan2(c,a),h=Math.sin((1-e)*d)/c,p=Math.sin(e*d)/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 O{constructor(t=0,e=0,n=0){O.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(O4.setFromEuler(t))}applyAxisAngle(t,e){return this.applyQuaternion(O4.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),d=2*(a*e-s*r),h=2*(s*n-o*e);return this.x=e+l*c+o*h-a*d,this.y=n+l*d+a*c-s*h,this.z=r+l*h+s*d-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 Qk.copy(this).projectOnVector(t),this.sub(Qk)}reflect(t){return this.sub(Qk.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(er(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 Qk=new O,O4=new co;class Bs{constructor(t=new O(1/0,1/0,1/0),e=new O(-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;e=this.min.x&&t.x<=this.max.x&&t.y>=this.min.y&&t.y<=this.max.y&&t.z>=this.min.z&&t.z<=this.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.x>=this.min.x&&t.min.x<=this.max.x&&t.max.y>=this.min.y&&t.min.y<=this.max.y&&t.max.z>=this.min.z&&t.min.z<=this.max.z}intersectsSphere(t){return this.clampPoint(t.center,xl),xl.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(Cb),GC.subVectors(this.max,Cb),fg.subVectors(t.a,Cb),pg.subVectors(t.b,Cb),mg.subVectors(t.c,Cb),Cu.subVectors(pg,fg),Su.subVectors(mg,pg),ef.subVectors(fg,mg);let e=[0,-Cu.z,Cu.y,0,-Su.z,Su.y,0,-ef.z,ef.y,Cu.z,0,-Cu.x,Su.z,0,-Su.x,ef.z,0,-ef.x,-Cu.y,Cu.x,0,-Su.y,Su.x,0,-ef.y,ef.x,0];return!(!Jk(e,fg,pg,mg,GC)||(e=[1,0,0,0,1,0,0,0,1],!Jk(e,fg,pg,mg,GC)))&&($C.crossVectors(Cu,Su),e=[$C.x,$C.y,$C.z],Jk(e,fg,pg,mg,GC))}clampPoint(t,e){return e.copy(t).clamp(this.min,this.max)}distanceToPoint(t){return this.clampPoint(t,xl).distanceTo(t)}getBoundingSphere(t){return this.isEmpty()?t.makeEmpty():(this.getCenter(t.center),t.radius=.5*this.getSize(xl).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()||(td[0].set(this.min.x,this.min.y,this.min.z).applyMatrix4(t),td[1].set(this.min.x,this.min.y,this.max.z).applyMatrix4(t),td[2].set(this.min.x,this.max.y,this.min.z).applyMatrix4(t),td[3].set(this.min.x,this.max.y,this.max.z).applyMatrix4(t),td[4].set(this.max.x,this.min.y,this.min.z).applyMatrix4(t),td[5].set(this.max.x,this.min.y,this.max.z).applyMatrix4(t),td[6].set(this.max.x,this.max.y,this.min.z).applyMatrix4(t),td[7].set(this.max.x,this.max.y,this.max.z).applyMatrix4(t),this.setFromPoints(td)),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 td=[new O,new O,new O,new O,new O,new O,new O,new O],xl=new O,HC=new Bs,fg=new O,pg=new O,mg=new O,Cu=new O,Su=new O,ef=new O,Cb=new O,GC=new O,$C=new O,tf=new O;function Jk(i,t,e,n,r){for(let s=0,o=i.length-3;s<=o;s+=3){tf.fromArray(i,s);const a=r.x*Math.abs(tf.x)+r.y*Math.abs(tf.y)+r.z*Math.abs(tf.z),l=t.dot(tf),c=e.dot(tf),d=n.dot(tf);if(Math.max(-Math.max(l,c,d),Math.min(l,c,d))>a)return!1}return!0}const sae=new Bs,Sb=new O,eP=new O;class Us{constructor(t=new O,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):sae.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;Sb.subVectors(t,this.center);const e=Sb.lengthSq();if(e>this.radius*this.radius){const n=Math.sqrt(e),r=.5*(n-this.radius);this.center.addScaledVector(Sb,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):(eP.subVectors(t.center,this.center).setLength(t.radius),this.expandByPoint(Sb.copy(t.center).add(eP)),this.expandByPoint(Sb.copy(t.center).sub(eP))),this)}equals(t){return t.center.equals(this.center)&&t.radius===this.radius}clone(){return(new this.constructor).copy(this)}}const nd=new O,tP=new O,WC=new O,Eu=new O,nP=new O,jC=new O,iP=new O;class Eb{constructor(t=new O,e=new O(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,nd)),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=nd.subVectors(t,this.origin).dot(this.direction);return e<0?this.origin.distanceToSquared(t):(nd.copy(this.origin).addScaledVector(this.direction,e),nd.distanceToSquared(t))}distanceSqToSegment(t,e,n,r){tP.copy(t).add(e).multiplyScalar(.5),WC.copy(e).sub(t).normalize(),Eu.copy(this.origin).sub(tP);const s=.5*t.distanceTo(e),o=-this.direction.dot(WC),a=Eu.dot(this.direction),l=-Eu.dot(WC),c=Eu.lengthSq(),d=Math.abs(1-o*o);let h,p,m,g;if(d>0)if(h=o*l-a,p=o*a-l,g=s*d,h>=0)if(p>=-g)if(p<=g){const b=1/d;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(tP).addScaledVector(WC,p),m}intersectSphere(t,e){nd.subVectors(t.center,this.origin);const n=nd.dot(this.direction),r=nd.dot(nd)-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,d=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),d>=0?(s=(t.min.y-p.y)*d,o=(t.max.y-p.y)*d):(s=(t.max.y-p.y)*d,o=(t.min.y-p.y)*d),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,nd)}intersectTriangle(t,e,n,r,s){nP.subVectors(e,t),jC.subVectors(n,t),iP.crossVectors(nP,jC);let a,o=this.direction.dot(iP);if(o>0){if(r)return null;a=1}else{if(!(o<0))return null;a=-1,o=-o}Eu.subVectors(this.origin,t);const l=a*this.direction.dot(jC.crossVectors(Eu,jC));if(l<0)return null;const c=a*this.direction.dot(nP.cross(Eu));if(c<0||l+c>o)return null;const d=-a*Eu.dot(iP);return d<0?null:this.at(d/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 Nt{constructor(t,e,n,r,s,o,a,l,c,d,h,p,m,g,b,v){Nt.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,d,h,p,m,g,b,v)}set(t,e,n,r,s,o,a,l,c,d,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]=d,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 Nt).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/gg.setFromMatrixColumn(t,0).length(),s=1/gg.setFromMatrixColumn(t,1).length(),o=1/gg.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),d=Math.cos(s),h=Math.sin(s);if("XYZ"===t.order){const p=o*d,m=o*h,g=a*d,b=a*h;e[0]=l*d,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*d,m=l*h,g=c*d,b=c*h;e[0]=p+b*a,e[4]=g*a-m,e[8]=o*c,e[1]=o*h,e[5]=o*d,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*d,m=l*h,g=c*d,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*d,e[9]=b-p*a,e[2]=-o*c,e[6]=a,e[10]=o*l}else if("ZYX"===t.order){const p=o*d,m=o*h,g=a*d,b=a*h;e[0]=l*d,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*d,e[4]=b-p*h,e[8]=g*h+m,e[1]=h,e[5]=o*d,e[9]=-a*d,e[2]=-c*d,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*d,e[4]=-h,e[8]=c*d,e[1]=p*h+b,e[5]=o*d,e[9]=m*h-g,e[2]=g*h-m,e[6]=a*d,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(oae,t,aae)}lookAt(t,e,n){const r=this.elements;return ea.subVectors(t,e),0===ea.lengthSq()&&(ea.z=1),ea.normalize(),Au.crossVectors(n,ea),0===Au.lengthSq()&&(1===Math.abs(n.z)?ea.x+=1e-4:ea.z+=1e-4,ea.normalize(),Au.crossVectors(n,ea)),Au.normalize(),YC.crossVectors(ea,Au),r[0]=Au.x,r[4]=YC.x,r[8]=ea.x,r[1]=Au.y,r[5]=YC.y,r[9]=ea.y,r[2]=Au.z,r[6]=YC.z,r[10]=ea.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],d=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],F=n[15],D=r[0],k=r[4],B=r[8],T=r[12],A=r[1],$=r[5],ie=r[9],ne=r[13],se=r[2],ge=r[6],q=r[10],re=r[14],J=r[3],we=r[7],Ne=r[11],Ye=r[15];return s[0]=o*D+a*A+l*se+c*J,s[4]=o*k+a*$+l*ge+c*we,s[8]=o*B+a*ie+l*q+c*Ne,s[12]=o*T+a*ne+l*re+c*Ye,s[1]=d*D+h*A+p*se+m*J,s[5]=d*k+h*$+p*ge+m*we,s[9]=d*B+h*ie+p*q+m*Ne,s[13]=d*T+h*ne+p*re+m*Ye,s[2]=g*D+b*A+v*se+y*J,s[6]=g*k+b*$+v*ge+y*we,s[10]=g*B+b*ie+v*q+y*Ne,s[14]=g*T+b*ne+v*re+y*Ye,s[3]=M*D+x*A+C*se+F*J,s[7]=M*k+x*$+C*ge+F*we,s[11]=M*B+x*ie+C*q+F*Ne,s[15]=M*T+x*ne+C*re+F*Ye,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],d=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*d-s*l*d)+t[11]*(+e*c*h-e*a*m-s*o*h+n*o*m+s*a*d-n*c*d)+t[15]*(-r*a*d-e*l*h+e*a*p+r*o*h-n*o*p+n*l*d)}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],d=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-d*v*c-g*l*m+o*v*m+d*l*y-o*p*y,C=d*b*c-g*h*c+g*a*m-o*b*m-d*a*y+o*h*y,F=g*h*l-d*b*l-g*a*p+o*b*p+d*a*v-o*h*v,D=e*M+n*x+r*C+s*F;if(0===D)return this.set(0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0);const k=1/D;return t[0]=M*k,t[1]=(b*p*s-h*v*s-b*r*m+n*v*m+h*r*y-n*p*y)*k,t[2]=(a*v*s-b*l*s+b*r*c-n*v*c-a*r*y+n*l*y)*k,t[3]=(h*l*s-a*p*s-h*r*c+n*p*c+a*r*m-n*l*m)*k,t[4]=x*k,t[5]=(d*v*s-g*p*s+g*r*m-e*v*m-d*r*y+e*p*y)*k,t[6]=(g*l*s-o*v*s-g*r*c+e*v*c+o*r*y-e*l*y)*k,t[7]=(o*p*s-d*l*s+d*r*c-e*p*c-o*r*m+e*l*m)*k,t[8]=C*k,t[9]=(g*h*s-d*b*s-g*n*m+e*b*m+d*n*y-e*h*y)*k,t[10]=(o*b*s-g*a*s+g*n*c-e*b*c-o*n*y+e*a*y)*k,t[11]=(d*a*s-o*h*s-d*n*c+e*h*c+o*n*m-e*a*m)*k,t[12]=F*k,t[13]=(d*b*r-g*h*r+g*n*p-e*b*p-d*n*v+e*h*v)*k,t[14]=(g*a*r-o*b*r-g*n*l+e*b*l+o*n*v-e*a*v)*k,t[15]=(o*h*r-d*a*r+d*n*l-e*h*l-o*n*p+e*a*p)*k,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,d=s*a;return this.set(c*o+n,c*a-r*l,c*l+r*a,0,c*a+r*l,d*a+n,d*l-r*o,0,c*l-r*a,d*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,d=o+o,h=a+a,p=s*c,m=s*d,g=s*h,b=o*d,v=o*h,y=a*h,M=l*c,x=l*d,C=l*h,F=n.x,D=n.y,k=n.z;return r[0]=(1-(b+y))*F,r[1]=(m+C)*F,r[2]=(g-x)*F,r[3]=0,r[4]=(m-C)*D,r[5]=(1-(p+y))*D,r[6]=(v+M)*D,r[7]=0,r[8]=(g+x)*k,r[9]=(v-M)*k,r[10]=(1-(p+b))*k,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=gg.set(r[0],r[1],r[2]).length();const o=gg.set(r[4],r[5],r[6]).length(),a=gg.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],wl.copy(this);const c=1/s,d=1/o,h=1/a;return wl.elements[0]*=c,wl.elements[1]*=c,wl.elements[2]*=c,wl.elements[4]*=d,wl.elements[5]*=d,wl.elements[6]*=d,wl.elements[8]*=h,wl.elements[9]*=h,wl.elements[10]*=h,e.setFromRotationMatrix(wl),n.x=s,n.y=o,n.z=a,this}makePerspective(t,e,n,r,s,o,a=ed){const l=this.elements,c=2*s/(e-t),d=2*s/(n-r),h=(e+t)/(e-t),p=(n+r)/(n-r);let m,g;if(a===ed)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]=d,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=ed){const l=this.elements,c=1/(e-t),d=1/(n-r),h=1/(o-s),p=(e+t)*c,m=(n+r)*d;let g,b;if(a===ed)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*d,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 gg=new O,wl=new Nt,oae=new O(0,0,0),aae=new O(1,1,1),Au=new O,YC=new O,ea=new O,F4=new Nt,L4=new co;let id=(()=>{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],d=s[5],h=s[9],p=s[2],m=s[6],g=s[10];switch(n){case"XYZ":this._y=Math.asin(er(l,-1,1)),Math.abs(l)<.9999999?(this._x=Math.atan2(-h,g),this._z=Math.atan2(-a,o)):(this._x=Math.atan2(m,d),this._z=0);break;case"YXZ":this._x=Math.asin(-er(h,-1,1)),Math.abs(h)<.9999999?(this._y=Math.atan2(l,g),this._z=Math.atan2(c,d)):(this._y=Math.atan2(-p,o),this._z=0);break;case"ZXY":this._x=Math.asin(er(m,-1,1)),Math.abs(m)<.9999999?(this._y=Math.atan2(-p,g),this._z=Math.atan2(-a,d)):(this._y=0,this._z=Math.atan2(c,o));break;case"ZYX":this._y=Math.asin(-er(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,d));break;case"YZX":this._z=Math.asin(er(c,-1,1)),Math.abs(c)<.9999999?(this._x=Math.atan2(-h,d),this._y=Math.atan2(-p,o)):(this._x=0,this._y=Math.atan2(l,g));break;case"XZY":this._z=Math.asin(-er(a,-1,1)),Math.abs(a)<.9999999?(this._x=Math.atan2(m,d),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 F4.makeRotationFromQuaternion(e),this.setFromRotationMatrix(F4,n,r)}setFromVector3(e,n=this._order){return this.set(e.x,e.y,e.z,n)}reorder(e){return L4.setFromEuler(this),this.setFromQuaternion(L4,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 rP{constructor(){this.mask=1}set(t){this.mask=(1<>>0}enable(t){this.mask|=1<{class i extends og{constructor(){super(),this.isObject3D=!0,Object.defineProperty(this,"id",{value:lae++}),this.uuid=Jo(),this.name="",this.type="Object3D",this.parent=null,this.children=[],this.up=i.DEFAULT_UP.clone();const e=new O,n=new id,r=new co,s=new O(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 Nt},normalMatrix:{value:new wn}}),this.matrix=new Nt,this.matrixWorld=new Nt,this.matrixAutoUpdate=i.DEFAULT_MATRIX_AUTO_UPDATE,this.matrixWorldAutoUpdate=i.DEFAULT_MATRIX_WORLD_AUTO_UPDATE,this.matrixWorldNeedsUpdate=!1,this.layers=new rP,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 _g.setFromAxisAngle(e,n),this.quaternion.multiply(_g),this}rotateOnWorldAxis(e,n){return _g.setFromAxisAngle(e,n),this.quaternion.premultiply(_g),this}rotateX(e){return this.rotateOnAxis(B4,e)}rotateY(e){return this.rotateOnAxis(U4,e)}rotateZ(e){return this.rotateOnAxis(V4,e)}translateOnAxis(e,n){return N4.copy(e).applyQuaternion(this.quaternion),this.position.add(N4.multiplyScalar(n)),this}translateX(e){return this.translateOnAxis(B4,e)}translateY(e){return this.translateOnAxis(U4,e)}translateZ(e){return this.translateOnAxis(V4,e)}localToWorld(e){return this.updateWorldMatrix(!0,!1),e.applyMatrix4(this.matrixWorld)}worldToLocal(e){return this.updateWorldMatrix(!0,!1),e.applyMatrix4(rd.copy(this.matrixWorld).invert())}lookAt(e,n,r){e.isVector3?qC.copy(e):qC.set(e,n,r);const s=this.parent;this.updateWorldMatrix(!0,!1),Ab.setFromMatrixPosition(this.matrixWorld),this.isCamera||this.isLight?rd.lookAt(Ab,qC,this.up):rd.lookAt(qC,Ab,this.up),this.quaternion.setFromRotationMatrix(rd),s&&(rd.extractRotation(s.matrixWorld),_g.setFromRotationMatrix(rd),this.quaternion.premultiply(_g.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.maxInstanceCount=this._maxInstanceCount,s.maxVertexCount=this._maxVertexCount,s.maxIndexCount=this._maxIndexCount,s.geometryInitialized=this._geometryInitialized,s.geometryCount=this._geometryCount,s.matricesTexture=this._matricesTexture.toJSON(e),null!==this._colorsTexture&&(s.colorsTexture=this._colorsTexture.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 d=0,h=c.length;d0){s.children=[];for(let l=0;l0){s.animations=[];for(let l=0;l0&&(r.geometries=l),c.length>0&&(r.materials=c),d.length>0&&(r.textures=d),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 d in l){const h=l[d];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){Ml.subVectors(r,e),sd.subVectors(n,e),oP.subVectors(t,e);const o=Ml.dot(Ml),a=Ml.dot(sd),l=Ml.dot(oP),c=sd.dot(sd),d=sd.dot(oP),h=o*c-a*a;if(0===h)return s.set(0,0,0),null;const p=1/h,m=(c*l-a*d)*p,g=(o*d-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,od)&&od.x>=0&&od.y>=0&&od.x+od.y<=1}static getInterpolation(t,e,n,r,s,o,a,l){return null===this.getBarycoord(t,e,n,r,od)?(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,od.x),l.addScaledVector(o,od.y),l.addScaledVector(a,od.z),l)}static isFrontFacing(t,e,n,r){return Ml.subVectors(n,e),sd.subVectors(t,e),Ml.cross(sd).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 Ml.subVectors(this.c,this.b),sd.subVectors(this.a,this.b),.5*Ml.cross(sd).length()}getMidpoint(t){return t.addVectors(this.a,this.b).add(this.c).multiplyScalar(1/3)}getNormal(t){return Oa.getNormal(this.a,this.b,this.c,t)}getPlane(t){return t.setFromCoplanarPoints(this.a,this.b,this.c)}getBarycoord(t,e){return Oa.getBarycoord(t,this.a,this.b,this.c,e)}getInterpolation(t,e,n,r,s){return Oa.getInterpolation(t,this.a,this.b,this.c,e,n,r,s)}containsPoint(t){return Oa.containsPoint(t,this.a,this.b,this.c)}isFrontFacing(t){return Oa.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;yg.subVectors(r,n),bg.subVectors(s,n),aP.subVectors(t,n);const l=yg.dot(aP),c=bg.dot(aP);if(l<=0&&c<=0)return e.copy(n);lP.subVectors(t,r);const d=yg.dot(lP),h=bg.dot(lP);if(d>=0&&h<=d)return e.copy(r);const p=l*h-d*c;if(p<=0&&l>=0&&d<=0)return o=l/(l-d),e.copy(n).addScaledVector(yg,o);cP.subVectors(t,s);const m=yg.dot(cP),g=bg.dot(cP);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(bg,a);const v=d*g-m*h;if(v<=0&&h-d>=0&&m-g>=0)return H4.subVectors(s,r),a=(h-d)/(h-d+(m-g)),e.copy(r).addScaledVector(H4,a);const y=1/(v+b+p);return o=b*y,a=p*y,e.copy(n).addScaledVector(yg,o).addScaledVector(bg,a)}equals(t){return t.a.equals(this.a)&&t.b.equals(this.b)&&t.c.equals(this.c)}}const G4={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},Du={h:0,s:0,l:0},XC={h:0,s:0,l:0};function dP(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 qe{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=cs){return t=Math.floor(t),this.r=(t>>16&255)/255,this.g=(t>>8&255)/255,this.b=(255&t)/255,Jn.toWorkingColorSpace(this,e),this}setRGB(t,e,n,r=Jn.workingColorSpace){return this.r=t,this.g=e,this.b=n,Jn.toWorkingColorSpace(this,r),this}setHSL(t,e,n,r=Jn.workingColorSpace){if(t=Yk(t,1),e=er(e,0,1),n=er(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=dP(o,s,t+1/3),this.g=dP(o,s,t),this.b=dP(o,s,t-1/3)}return Jn.toWorkingColorSpace(this,r),this}setStyle(t,e=cs){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=cs){const n=G4[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=dg(t.r),this.g=dg(t.g),this.b=dg(t.b),this}copyLinearToSRGB(t){return this.r=Xk(t.r),this.g=Xk(t.g),this.b=Xk(t.b),this}convertSRGBToLinear(){return this.copySRGBToLinear(this),this}convertLinearToSRGB(){return this.copyLinearToSRGB(this),this}getHex(t=cs){return Jn.fromWorkingColorSpace(Vs.copy(this),t),65536*Math.round(er(255*Vs.r,0,255))+256*Math.round(er(255*Vs.g,0,255))+Math.round(er(255*Vs.b,0,255))}getHexString(t=cs){return("000000"+this.getHex(t).toString(16)).slice(-6)}getHSL(t,e=Jn.workingColorSpace){Jn.fromWorkingColorSpace(Vs.copy(this),e);const n=Vs.r,r=Vs.g,s=Vs.b,o=Math.max(n,r,s),a=Math.min(n,r,s);let l,c;const d=(a+o)/2;if(a===o)l=0,c=0;else{const h=o-a;switch(c=d<=.5?h/(o+a):h/(2-o-a),o){case n:l=(r-s)/h+(r0!=t>0&&this.version++,this._alphaTest=t}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.dispersion&&(n.dispersion=this.dispersion),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!==Zm&&(n.blending=this.blending),this.side!==ac&&(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!==ak&&(n.blendSrc=this.blendSrc),this.blendDst!==lk&&(n.blendDst=this.blendDst),this.blendEquation!==Kh&&(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!==SC&&(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!==sg&&(n.stencilFail=this.stencilFail),this.stencilZFail!==sg&&(n.stencilZFail=this.stencilZFail),this.stencilZPass!==sg&&(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++}onBuild(){console.warn("Material: onBuild() has been removed.")}onBeforeRender(){console.warn("Material: onBeforeRender() has been removed.")}}class qi extends Po{constructor(t){super(),this.isMeshBasicMaterial=!0,this.type="MeshBasicMaterial",this.color=new qe(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 id,this.combine=EC,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 vr=new O,KC=new xe;class Hi{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=Qo,this.version=0}onUploadCallback(){}set needsUpdate(t){!0===t&&this.version++}get updateRange(){return cg("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],d=[];for(let h=0,p=c.length;h0&&(r[l]=d,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 d=[],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))&&(j4.copy(s).invert(),nf.copy(t.ray).applyMatrix4(j4),(null===n.boundingBox||!1!==nf.intersectsBox(n.boundingBox))&&this._computeIntersections(t,e,nf)))}_computeIntersections(t,e,n){let r;const s=this.geometry,o=this.material,a=s.index,l=s.attributes.position,c=s.attributes.uv,d=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:iS.clone(),object:i}}(i,t,e,n,wg,Mg,Cg,nS);if(d){r&&(JC.fromBufferAttribute(r,a),eS.fromBufferAttribute(r,l),tS.fromBufferAttribute(r,c),d.uv=Oa.getInterpolation(nS,wg,Mg,Cg,JC,eS,tS,new xe)),s&&(JC.fromBufferAttribute(s,a),eS.fromBufferAttribute(s,l),tS.fromBufferAttribute(s,c),d.uv1=Oa.getInterpolation(nS,wg,Mg,Cg,JC,eS,tS,new xe)),o&&(q4.fromBufferAttribute(o,a),X4.fromBufferAttribute(o,l),K4.fromBufferAttribute(o,c),d.normal=Oa.getInterpolation(nS,wg,Mg,Cg,q4,X4,K4,new O),d.normal.dot(n.direction)>0&&d.normal.multiplyScalar(-1));const h={a,b:l,c,normal:new O,materialIndex:0};Oa.getNormal(wg,Mg,Cg,h.normal),d.face=h}return d}class rf 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=[],d=[],h=[];let p=0,m=0;function g(b,v,y,M,x,C,F,D,k,B,T){const A=C/k,$=F/B,ie=C/2,ne=F/2,se=D/2,ge=k+1,q=B+1;let re=0,J=0;const we=new O;for(let Ne=0;Ne0?1:-1,d.push(we.x,we.y,we.z),h.push(It/k),h.push(1-Ne/B),re+=1}for(let Ne=0;Ne0&&(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 fP extends Or{constructor(){super(),this.isCamera=!0,this.type="Camera",this.matrixWorldInverse=new Nt,this.projectionMatrix=new Nt,this.projectionMatrixInverse=new Nt,this.coordinateSystem=ed}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 Tu=new O,J4=new xe,e5=new xe;class yr extends fP{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*ag*Math.atan(e),this.updateProjectionMatrix()}getFocalLength(){const t=Math.tan(.5*Jh*this.fov);return.5*this.getFilmHeight()/t}getEffectiveFOV(){return 2*ag*Math.atan(Math.tan(.5*Jh*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){Tu.set(-1,-1,.5).applyMatrix4(this.projectionMatrixInverse),e.set(Tu.x,Tu.y).multiplyScalar(-t/Tu.z),Tu.set(1,1,.5).applyMatrix4(this.projectionMatrixInverse),n.set(Tu.x,Tu.y).multiplyScalar(-t/Tu.z)}getViewSize(t,e){return this.getViewBounds(t,J4,e5),e.subVectors(e5,J4)}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*Jh*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 yae extends Or{constructor(t,e,n){super(),this.type="CubeCamera",this.renderTarget=n,this.coordinateSystem=null,this.activeMipmapLevel=0;const r=new yr(-90,1,t,e);r.layers=this.layers,this.add(r);const s=new yr(-90,1,t,e);s.layers=this.layers,this.add(s);const o=new yr(-90,1,t,e);o.layers=this.layers,this.add(o);const a=new yr(-90,1,t,e);a.layers=this.layers,this.add(a);const l=new yr(-90,1,t,e);l.layers=this.layers,this.add(l);const c=new yr(-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===ed)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,d]=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,d),t.setRenderTarget(h,p,m),t.xr.enabled=g,n.texture.needsPMREMUpdate=!0}}class sS extends ko{constructor(t,e,n,r,s,o,a,l,c,d){super(t=void 0!==t?t:[],e=void 0!==e?e:lc,n,r,s,o,a,l,c,d),this.isCubeTexture=!0,this.flipY=!1}get images(){return this.image}set images(t){this.image=t}}class bae extends Mu{constructor(t=1,e={}){super(t,t,e),this.isWebGLCubeRenderTarget=!0;const n={width:t,height:t,depth:1};this.texture=new sS([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:lr}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 rf(5,5,5),s=new Cl({name:"CubemapFromEquirect",uniforms:Sg(n_uniforms),vertexShader:n_vertexShader,fragmentShader:n_fragmentShader,side:Io,blending:Qc});s.uniforms.tEquirect.value=e;const o=new Mn(r,s),a=e.minFilter;return e.minFilter===bl&&(e.minFilter=lr),new yae(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 pP=new O,xae=new O,wae=new wn;class sf{constructor(t=new O(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=pP.subVectors(n,e).cross(xae.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(pP),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||wae.getNormalMatrix(t),r=this.coplanarPoint(pP).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 af=new Us,oS=new O;class aS{constructor(t=new sf,e=new sf,n=new sf,r=new sf,s=new sf,o=new sf){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=ed){const n=this.planes,r=t.elements,s=r[0],o=r[1],a=r[2],l=r[3],c=r[4],d=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+d,v+g,C+M).normalize(),n[3].setComponents(l-o,p-d,v-g,C-M).normalize(),n[4].setComponents(l-a,p-h,v-b,C-x).normalize(),e===ed)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(),af.copy(t.boundingSphere).applyMatrix4(t.matrixWorld);else{const e=t.geometry;null===e.boundingSphere&&e.computeBoundingSphere(),af.copy(e.boundingSphere).applyMatrix4(t.matrixWorld)}return this.intersectsSphere(af)}intersectsSprite(t){return af.center.set(0,0,0),af.radius=.7071067811865476,af.applyMatrix4(t.matrixWorld),this.intersectsSphere(af)}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,oS.y=r.normal.y>0?t.max.y:t.min.y,oS.z=r.normal.z>0?t.max.z:t.min.z,r.distanceToPoint(oS)<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 t5(){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 Mae(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.isInterleavedBufferAttribute&&(a=a.data),a.isGLBufferAttribute){const d=t.get(a);return void((!d||d.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 ) || defined( USE_BATCHING_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 ) || defined( USE_BATCHING_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\n#ifdef USE_BATCHING_COLOR\n\tvec3 batchingColor = getBatchingColor( getIndirectIndex( gl_DrawID ) );\n\tvColor.xyz *= batchingColor.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}\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}",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_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\tfloat distanceFalloff = 1.0 / max( pow( lightDistance, decayExponent ), 0.01 );\n\tif ( cutoffDistance > 0.0 ) {\n\t\tdistanceFalloff *= pow2( saturate( 1.0 - pow4( lightDistance / cutoffDistance ) ) );\n\t}\n\treturn distanceFalloff;\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_DISPERSION\n\tmaterial.dispersion = dispersion;\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\tfloat dispersion;\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.shadowIntensity, 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.shadowIntensity, 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.shadowIntensity, 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 )\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\tfor ( int i = 0; i < MORPHTARGETS_COUNT; i ++ ) {\n\t\tif ( morphTargetInfluences[ i ] != 0.0 ) objectNormal += getMorph( gl_VertexID, i, 1 ).xyz * morphTargetInfluences[ i ];\n\t}\n#endif",morphtarget_pars_vertex:"#ifdef USE_MORPHTARGETS\n\t#ifndef USE_INSTANCING_MORPH\n\t\tuniform float morphTargetBaseInfluence;\n\t\tuniform float morphTargetInfluences[ MORPHTARGETS_COUNT ];\n\t#endif\n\tuniform sampler2DArray morphTargetsTexture;\n\tuniform ivec2 morphTargetsTextureSize;\n\tvec4 getMorph( const in int vertexIndex, const in int morphTargetIndex, const in int offset ) {\n\t\tint texelIndex = vertexIndex * MORPHTARGETS_TEXTURE_STRIDE + offset;\n\t\tint y = texelIndex / morphTargetsTextureSize.x;\n\t\tint x = texelIndex - y * morphTargetsTextureSize.x;\n\t\tivec3 morphUV = ivec3( x, y, morphTargetIndex );\n\t\treturn texelFetch( morphTargetsTexture, morphUV, 0 );\n\t}\n#endif",morphtarget_vertex:"#ifdef USE_MORPHTARGETS\n\ttransformed *= morphTargetBaseInfluence;\n\tfor ( int i = 0; i < MORPHTARGETS_COUNT; i ++ ) {\n\t\tif ( morphTargetInfluences[ i ] != 0.0 ) transformed += getMorph( gl_VertexID, i, 0 ).xyz * morphTargetInfluences[ i ];\n\t}\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.;const float ShiftRight8 = 1. / 256.;\nconst float Inv255 = 1. / 255.;\nconst vec4 PackFactors = vec4( 1.0, 256.0, 256.0 * 256.0, 256.0 * 256.0 * 256.0 );\nconst vec2 UnpackFactors2 = vec2( UnpackDownscale, 1.0 / PackFactors.g );\nconst vec3 UnpackFactors3 = vec3( UnpackDownscale / PackFactors.rg, 1.0 / PackFactors.b );\nconst vec4 UnpackFactors4 = vec4( UnpackDownscale / PackFactors.rgb, 1.0 / PackFactors.a );\nvec4 packDepthToRGBA( const in float v ) {\n\tif( v <= 0.0 )\n\t\treturn vec4( 0., 0., 0., 0. );\n\tif( v >= 1.0 )\n\t\treturn vec4( 1., 1., 1., 1. );\n\tfloat vuf;\n\tfloat af = modf( v * PackFactors.a, vuf );\n\tfloat bf = modf( vuf * ShiftRight8, vuf );\n\tfloat gf = modf( vuf * ShiftRight8, vuf );\n\treturn vec4( vuf * Inv255, gf * PackUpscale, bf * PackUpscale, af );\n}\nvec3 packDepthToRGB( const in float v ) {\n\tif( v <= 0.0 )\n\t\treturn vec3( 0., 0., 0. );\n\tif( v >= 1.0 )\n\t\treturn vec3( 1., 1., 1. );\n\tfloat vuf;\n\tfloat bf = modf( v * PackFactors.b, vuf );\n\tfloat gf = modf( vuf * ShiftRight8, vuf );\n\treturn vec3( vuf * Inv255, gf * PackUpscale, bf );\n}\nvec2 packDepthToRG( const in float v ) {\n\tif( v <= 0.0 )\n\t\treturn vec2( 0., 0. );\n\tif( v >= 1.0 )\n\t\treturn vec2( 1., 1. );\n\tfloat vuf;\n\tfloat gf = modf( v * 256., vuf );\n\treturn vec2( vuf * Inv255, gf );\n}\nfloat unpackRGBAToDepth( const in vec4 v ) {\n\treturn dot( v, UnpackFactors4 );\n}\nfloat unpackRGBToDepth( const in vec3 v ) {\n\treturn dot( v, UnpackFactors3 );\n}\nfloat unpackRGToDepth( const in vec2 v ) {\n\treturn v.r * UnpackFactors2.r + v.g * UnpackFactors2.g;\n}\nvec4 pack2HalfToRGBA( const in 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( const in 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 shadowIntensity;\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 shadowIntensity;\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 shadowIntensity;\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 shadowIntensity, 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 mix( 1.0, shadow, shadowIntensity );\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 shadowIntensity, 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 mix( 1.0, shadow, shadowIntensity );\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 shadowIntensity;\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 shadowIntensity;\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 shadowIntensity;\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.shadowIntensity, 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.shadowIntensity, 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.shadowIntensity, 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\tconst float StartCompression = 0.8 - 0.04;\n\tconst float 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, vec3( newPeak ), 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.dispersion, 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 dispersion, const in float ior, const in float thickness,\n\t\tconst in vec3 attenuationColor, const in float attenuationDistance ) {\n\t\tvec4 transmittedLight;\n\t\tvec3 transmittance;\n\t\t#ifdef USE_DISPERSION\n\t\t\tfloat halfSpread = ( ior - 1.0 ) * 0.025 * dispersion;\n\t\t\tvec3 iors = vec3( ior - halfSpread, ior, ior + halfSpread );\n\t\t\tfor ( int i = 0; i < 3; i ++ ) {\n\t\t\t\tvec3 transmissionRay = getVolumeTransmissionRay( n, v, thickness, iors[ i ], modelMatrix );\n\t\t\t\tvec3 refractedRayExit = position + transmissionRay;\n\t\t\n\t\t\t\tvec4 ndcPos = projMatrix * viewMatrix * vec4( refractedRayExit, 1.0 );\n\t\t\t\tvec2 refractionCoords = ndcPos.xy / ndcPos.w;\n\t\t\t\trefractionCoords += 1.0;\n\t\t\t\trefractionCoords /= 2.0;\n\t\t\n\t\t\t\tvec4 transmissionSample = getTransmissionSample( refractionCoords, roughness, iors[ i ] );\n\t\t\t\ttransmittedLight[ i ] = transmissionSample[ i ];\n\t\t\t\ttransmittedLight.a += transmissionSample.a;\n\t\t\t\ttransmittance[ i ] = diffuseColor[ i ] * volumeAttenuation( length( transmissionRay ), attenuationColor, attenuationDistance )[ i ];\n\t\t\t}\n\t\t\ttransmittedLight.a /= 3.0;\n\t\t\n\t\t#else\n\t\t\n\t\t\tvec3 transmissionRay = getVolumeTransmissionRay( n, v, thickness, ior, modelMatrix );\n\t\t\tvec3 refractedRayExit = position + transmissionRay;\n\t\t\tvec4 ndcPos = projMatrix * viewMatrix * vec4( refractedRayExit, 1.0 );\n\t\t\tvec2 refractionCoords = ndcPos.xy / ndcPos.w;\n\t\t\trefractionCoords += 1.0;\n\t\t\trefractionCoords /= 2.0;\n\t\t\ttransmittedLight = getTransmissionSample( refractionCoords, roughness, ior );\n\t\t\ttransmittance = diffuseColor * volumeAttenuation( length( transmissionRay ), attenuationColor, attenuationDistance );\n\t\t\n\t\t#endif\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#elif DEPTH_PACKING == 3202\n\t\tgl_FragColor = vec4( packDepthToRGB( fragCoordZ ), 1.0 );\n\t#elif DEPTH_PACKING == 3203\n\t\tgl_FragColor = vec4( packDepthToRG( fragCoordZ ), 0.0, 1.0 );\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_DISPERSION\n\tuniform float dispersion;\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}"},Qe={common:{diffuse:{value:new qe(16777215)},opacity:{value:1},map:{value:null},mapTransform:{value:new wn},alphaMap:{value:null},alphaMapTransform:{value:new wn},alphaTest:{value:0}},specularmap:{specularMap:{value:null},specularMapTransform:{value:new wn}},envmap:{envMap:{value:null},envMapRotation:{value:new wn},flipEnvMap:{value:-1},reflectivity:{value:1},ior:{value:1.5},refractionRatio:{value:.98}},aomap:{aoMap:{value:null},aoMapIntensity:{value:1},aoMapTransform:{value:new wn}},lightmap:{lightMap:{value:null},lightMapIntensity:{value:1},lightMapTransform:{value:new wn}},bumpmap:{bumpMap:{value:null},bumpMapTransform:{value:new wn},bumpScale:{value:1}},normalmap:{normalMap:{value:null},normalMapTransform:{value:new wn},normalScale:{value:new xe(1,1)}},displacementmap:{displacementMap:{value:null},displacementMapTransform:{value:new wn},displacementScale:{value:1},displacementBias:{value:0}},emissivemap:{emissiveMap:{value:null},emissiveMapTransform:{value:new wn}},metalnessmap:{metalnessMap:{value:null},metalnessMapTransform:{value:new wn}},roughnessmap:{roughnessMap:{value:null},roughnessMapTransform:{value:new wn}},gradientmap:{gradientMap:{value:null}},fog:{fogDensity:{value:25e-5},fogNear:{value:1},fogFar:{value:2e3},fogColor:{value:new qe(16777215)}},lights:{ambientLightColor:{value:[]},lightProbe:{value:[]},directionalLights:{value:[],properties:{direction:{},color:{}}},directionalLightShadows:{value:[],properties:{shadowIntensity:1,shadowBias:{},shadowNormalBias:{},shadowRadius:{},shadowMapSize:{}}},directionalShadowMap:{value:[]},directionalShadowMatrix:{value:[]},spotLights:{value:[],properties:{color:{},position:{},direction:{},distance:{},coneCos:{},penumbraCos:{},decay:{}}},spotLightShadows:{value:[],properties:{shadowIntensity:1,shadowBias:{},shadowNormalBias:{},shadowRadius:{},shadowMapSize:{}}},spotLightMap:{value:[]},spotShadowMap:{value:[]},spotLightMatrix:{value:[]},pointLights:{value:[],properties:{color:{},position:{},decay:{},distance:{}}},pointLightShadows:{value:[],properties:{shadowIntensity:1,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 qe(16777215)},opacity:{value:1},size:{value:1},scale:{value:1},map:{value:null},alphaMap:{value:null},alphaMapTransform:{value:new wn},alphaTest:{value:0},uvTransform:{value:new wn}},sprite:{diffuse:{value:new qe(16777215)},opacity:{value:1},center:{value:new xe(.5,.5)},rotation:{value:0},map:{value:null},mapTransform:{value:new wn},alphaMap:{value:null},alphaMapTransform:{value:new wn},alphaTest:{value:0}}},cc={basic:{uniforms:uo([Qe.common,Qe.specularmap,Qe.envmap,Qe.aomap,Qe.lightmap,Qe.fog]),vertexShader:Cn.meshbasic_vert,fragmentShader:Cn.meshbasic_frag},lambert:{uniforms:uo([Qe.common,Qe.specularmap,Qe.envmap,Qe.aomap,Qe.lightmap,Qe.emissivemap,Qe.bumpmap,Qe.normalmap,Qe.displacementmap,Qe.fog,Qe.lights,{emissive:{value:new qe(0)}}]),vertexShader:Cn.meshlambert_vert,fragmentShader:Cn.meshlambert_frag},phong:{uniforms:uo([Qe.common,Qe.specularmap,Qe.envmap,Qe.aomap,Qe.lightmap,Qe.emissivemap,Qe.bumpmap,Qe.normalmap,Qe.displacementmap,Qe.fog,Qe.lights,{emissive:{value:new qe(0)},specular:{value:new qe(1118481)},shininess:{value:30}}]),vertexShader:Cn.meshphong_vert,fragmentShader:Cn.meshphong_frag},standard:{uniforms:uo([Qe.common,Qe.envmap,Qe.aomap,Qe.lightmap,Qe.emissivemap,Qe.bumpmap,Qe.normalmap,Qe.displacementmap,Qe.roughnessmap,Qe.metalnessmap,Qe.fog,Qe.lights,{emissive:{value:new qe(0)},roughness:{value:1},metalness:{value:0},envMapIntensity:{value:1}}]),vertexShader:Cn.meshphysical_vert,fragmentShader:Cn.meshphysical_frag},toon:{uniforms:uo([Qe.common,Qe.aomap,Qe.lightmap,Qe.emissivemap,Qe.bumpmap,Qe.normalmap,Qe.displacementmap,Qe.gradientmap,Qe.fog,Qe.lights,{emissive:{value:new qe(0)}}]),vertexShader:Cn.meshtoon_vert,fragmentShader:Cn.meshtoon_frag},matcap:{uniforms:uo([Qe.common,Qe.bumpmap,Qe.normalmap,Qe.displacementmap,Qe.fog,{matcap:{value:null}}]),vertexShader:Cn.meshmatcap_vert,fragmentShader:Cn.meshmatcap_frag},points:{uniforms:uo([Qe.points,Qe.fog]),vertexShader:Cn.points_vert,fragmentShader:Cn.points_frag},dashed:{uniforms:uo([Qe.common,Qe.fog,{scale:{value:1},dashSize:{value:1},totalSize:{value:2}}]),vertexShader:Cn.linedashed_vert,fragmentShader:Cn.linedashed_frag},depth:{uniforms:uo([Qe.common,Qe.displacementmap]),vertexShader:Cn.depth_vert,fragmentShader:Cn.depth_frag},normal:{uniforms:uo([Qe.common,Qe.bumpmap,Qe.normalmap,Qe.displacementmap,{opacity:{value:1}}]),vertexShader:Cn.meshnormal_vert,fragmentShader:Cn.meshnormal_frag},sprite:{uniforms:uo([Qe.sprite,Qe.fog]),vertexShader:Cn.sprite_vert,fragmentShader:Cn.sprite_frag},background:{uniforms:{uvTransform:{value:new wn},t2D:{value:null},backgroundIntensity:{value:1}},vertexShader:Cn.background_vert,fragmentShader:Cn.background_frag},backgroundCube:{uniforms:{envMap:{value:null},flipEnvMap:{value:-1},backgroundBlurriness:{value:0},backgroundIntensity:{value:1},backgroundRotation:{value:new wn}},vertexShader:Cn.backgroundCube_vert,fragmentShader:Cn.backgroundCube_frag},cube:{uniforms:{tCube:{value:null},tFlip:{value:-1},opacity:{value:1}},vertexShader:Cn.cube_vert,fragmentShader:Cn.cube_frag},equirect:{uniforms:{tEquirect:{value:null}},vertexShader:Cn.equirect_vert,fragmentShader:Cn.equirect_frag},distanceRGBA:{uniforms:uo([Qe.common,Qe.displacementmap,{referencePosition:{value:new O},nearDistance:{value:1},farDistance:{value:1e3}}]),vertexShader:Cn.distanceRGBA_vert,fragmentShader:Cn.distanceRGBA_frag},shadow:{uniforms:uo([Qe.lights,Qe.fog,{color:{value:new qe(0)},opacity:{value:1}}]),vertexShader:Cn.shadow_vert,fragmentShader:Cn.shadow_frag}};cc.physical={uniforms:uo([cc.standard.uniforms,{clearcoat:{value:0},clearcoatMap:{value:null},clearcoatMapTransform:{value:new wn},clearcoatNormalMap:{value:null},clearcoatNormalMapTransform:{value:new wn},clearcoatNormalScale:{value:new xe(1,1)},clearcoatRoughness:{value:0},clearcoatRoughnessMap:{value:null},clearcoatRoughnessMapTransform:{value:new wn},dispersion:{value:0},iridescence:{value:0},iridescenceMap:{value:null},iridescenceMapTransform:{value:new wn},iridescenceIOR:{value:1.3},iridescenceThicknessMinimum:{value:100},iridescenceThicknessMaximum:{value:400},iridescenceThicknessMap:{value:null},iridescenceThicknessMapTransform:{value:new wn},sheen:{value:0},sheenColor:{value:new qe(0)},sheenColorMap:{value:null},sheenColorMapTransform:{value:new wn},sheenRoughness:{value:1},sheenRoughnessMap:{value:null},sheenRoughnessMapTransform:{value:new wn},transmission:{value:0},transmissionMap:{value:null},transmissionMapTransform:{value:new wn},transmissionSamplerSize:{value:new xe},transmissionSamplerMap:{value:null},thickness:{value:0},thicknessMap:{value:null},thicknessMapTransform:{value:new wn},attenuationDistance:{value:0},attenuationColor:{value:new qe(0)},specularColor:{value:new qe(1,1,1)},specularColorMap:{value:null},specularColorMapTransform:{value:new wn},specularIntensity:{value:1},specularIntensityMap:{value:null},specularIntensityMapTransform:{value:new wn},anisotropyVector:{value:new xe},anisotropyMap:{value:null},anisotropyMapTransform:{value:new wn}}]),vertexShader:Cn.meshphysical_vert,fragmentShader:Cn.meshphysical_frag};const lS={r:0,b:0,g:0},lf=new id,Mce=new Nt;function Cce(i,t,e,n,r,s,o){const a=new qe(0);let c,d,l=!0===s?0:1,h=null,p=0,m=null;function g(M){let x=!0===M.isScene?M.background:null;return x&&x.isTexture&&(x=(M.backgroundBlurriness>0?e:t).get(x)),x}function y(M,x){M.getRGB(lS,Z4(i)),n.buffers.color.setClear(lS.r,lS.g,lS.b,x,o)}return{getClearColor:function(){return a},setClearColor:function(M,x=1){a.set(M),l=x,y(a,l)},getClearAlpha:function(){return l},setClearAlpha:function(M){l=M,y(a,l)},render:function b(M){let x=!1;const C=g(M);null===C?y(a,l):C&&C.isColor&&(y(C,1),x=!0);const F=i.xr.getEnvironmentBlendMode();"additive"===F?n.buffers.color.setClear(0,0,0,1,o):"alpha-blend"===F&&n.buffers.color.setClear(0,0,0,0,o),(i.autoClear||x)&&(n.buffers.depth.setTest(!0),n.buffers.depth.setMask(!0),n.buffers.color.setMask(!0),i.clear(i.autoClearColor,i.autoClearDepth,i.autoClearStencil))},addToRenderList:function v(M,x){const C=g(x);C&&(C.isCubeTexture||C.mapping===mb)?(void 0===d&&(d=new Mn(new rf(1,1,1),new Cl({name:"BackgroundCubeMaterial",uniforms:Sg(cc.backgroundCube.uniforms),vertexShader:cc.backgroundCube.vertexShader,fragmentShader:cc.backgroundCube.fragmentShader,side:Io,depthTest:!1,depthWrite:!1,fog:!1})),d.geometry.deleteAttribute("normal"),d.geometry.deleteAttribute("uv"),d.onBeforeRender=function(F,D,k){this.matrixWorld.copyPosition(k.matrixWorld)},Object.defineProperty(d.material,"envMap",{get:function(){return this.uniforms.envMap.value}}),r.update(d)),lf.copy(x.backgroundRotation),lf.x*=-1,lf.y*=-1,lf.z*=-1,C.isCubeTexture&&!1===C.isRenderTargetTexture&&(lf.y*=-1,lf.z*=-1),d.material.uniforms.envMap.value=C,d.material.uniforms.flipEnvMap.value=C.isCubeTexture&&!1===C.isRenderTargetTexture?-1:1,d.material.uniforms.backgroundBlurriness.value=x.backgroundBlurriness,d.material.uniforms.backgroundIntensity.value=x.backgroundIntensity,d.material.uniforms.backgroundRotation.value.setFromMatrix4(Mce.makeRotationFromEuler(lf)),d.material.toneMapped=Jn.getTransfer(C.colorSpace)!==Fi,(h!==C||p!==C.version||m!==i.toneMapping)&&(d.material.needsUpdate=!0,h=C,p=C.version,m=i.toneMapping),d.layers.enableAll(),M.unshift(d,d.geometry,d.material,0,0,null)):C&&C.isTexture&&(void 0===c&&(c=new Mn(new Iu(2,2),new Cl({name:"BackgroundMaterial",uniforms:Sg(cc.background.uniforms),vertexShader:cc.background.vertexShader,fragmentShader:cc.background.fragmentShader,side:ac,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=C,c.material.uniforms.backgroundIntensity.value=x.backgroundIntensity,c.material.toneMapped=Jn.getTransfer(C.colorSpace)!==Fi,!0===C.matrixAutoUpdate&&C.updateMatrix(),c.material.uniforms.uvTransform.value.copy(C.matrix),(h!==C||p!==C.version||m!==i.toneMapping)&&(c.material.needsUpdate=!0,h=C,p=C.version,m=i.toneMapping),c.layers.enableAll(),M.unshift(c,c.geometry,c.material,0,0,null))}}}function Sce(i,t){const e=i.getParameter(i.MAX_VERTEX_ATTRIBS),n={},r=p(null);let s=r,o=!1;function c(A){return i.bindVertexArray(A)}function d(A){return i.deleteVertexArray(A)}function p(A){const $=[],ie=[],ne=[];for(let se=0;se=0){const Ne=se[J];let Ye=ge[J];if(void 0===Ye&&("instanceMatrix"===J&&A.instanceMatrix&&(Ye=A.instanceMatrix),"instanceColor"===J&&A.instanceColor&&(Ye=A.instanceColor)),void 0===Ne||Ne.attribute!==Ye||Ye&&Ne.data!==Ye.data)return!0;q++}return s.attributesNum!==q||s.index!==ne}(A,ne,ie,se),ge&&function g(A,$,ie,ne){const se={},ge=$.attributes;let q=0;const re=ie.getAttributes();for(const J in re)if(re[J].location>=0){let Ne=ge[J];void 0===Ne&&("instanceMatrix"===J&&A.instanceMatrix&&(Ne=A.instanceMatrix),"instanceColor"===J&&A.instanceColor&&(Ne=A.instanceColor));const Ye={};Ye.attribute=Ne,Ne&&Ne.data&&(Ye.data=Ne.data),se[J]=Ye,q++}s.attributes=se,s.attributesNum=q,s.index=ne}(A,ne,ie,se),null!==se&&t.update(se,i.ELEMENT_ARRAY_BUFFER),(ge||o)&&(o=!1,function C(A,$,ie,ne){b();const se=ne.attributes,ge=ie.getAttributes(),q=$.defaultAttributeValues;for(const re in ge){const J=ge[re];if(J.location>=0){let we=se[re];if(void 0===we&&("instanceMatrix"===re&&A.instanceMatrix&&(we=A.instanceMatrix),"instanceColor"===re&&A.instanceColor&&(we=A.instanceColor)),void 0!==we){const Ne=we.normalized,Ye=we.itemSize,It=t.get(we);if(void 0===It)continue;const en=It.buffer,ae=It.type,Oe=It.bytesPerElement,Ze=ae===i.INT||ae===i.UNSIGNED_INT||we.gpuType===uk;if(we.isInterleavedBufferAttribute){const Fe=we.data,bt=Fe.stride,St=we.offset;if(Fe.isInstancedInterleavedBuffer){for(let Mt=0;Mt0&&i.getShaderPrecisionFormat(i.FRAGMENT_SHADER,i.HIGH_FLOAT).precision>0)return"highp";D="mediump"}return"mediump"===D&&i.getShaderPrecisionFormat(i.VERTEX_SHADER,i.MEDIUM_FLOAT).precision>0&&i.getShaderPrecisionFormat(i.FRAGMENT_SHADER,i.MEDIUM_FLOAT).precision>0?"mediump":"lowp"}let c=void 0!==e.precision?e.precision:"highp";const d=l(c);d!==c&&(console.warn("THREE.WebGLRenderer:",c,"not supported, using",d,"instead."),c=d);const h=!0===e.logarithmicDepthBuffer,p=i.getParameter(i.MAX_TEXTURE_IMAGE_UNITS),m=i.getParameter(i.MAX_VERTEX_TEXTURE_IMAGE_UNITS);return{isWebGL2:!0,getMaxAnisotropy:function s(){if(void 0!==r)return r;if(!0===t.has("EXT_texture_filter_anisotropic")){const D=t.get("EXT_texture_filter_anisotropic");r=i.getParameter(D.MAX_TEXTURE_MAX_ANISOTROPY_EXT)}else r=0;return r},getMaxPrecision:l,textureFormatReadable:function o(D){return!(D!==Ro&&n.convert(D)!==i.getParameter(i.IMPLEMENTATION_COLOR_READ_FORMAT))},textureTypeReadable:function a(D){const k=D===Jm&&(t.has("EXT_color_buffer_half_float")||t.has("EXT_color_buffer_float"));return!(D!==Jc&&n.convert(D)!==i.getParameter(i.IMPLEMENTATION_COLOR_READ_TYPE)&&D!==Qo&&!k)},precision:c,logarithmicDepthBuffer:h,maxTextures:p,maxVertexTextures:m,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:m>0,maxSamples:i.getParameter(i.MAX_SAMPLES)}}function Dce(i){const t=this;let e=null,n=0,r=!1,s=!1;const o=new sf,a=new wn,l={value:null,needsUpdate:!1};function d(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=d(g,p,x,m);for(let F=0;F!==x;++F)C[F]=e[F];y.clippingState=C,this.numIntersection=b?this.numPlanes:0,this.numPlanes+=M}}}function Tce(i){let t=new WeakMap;function e(o,a){return a===AC?o.mapping=lc:a===DC&&(o.mapping=Zh),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===AC||a===DC){if(t.has(o))return e(t.get(o).texture,o.mapping);{const l=o.image;if(l&&l.height>0){const c=new bae(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 Ib extends fP{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,d=(this.top-this.bottom)/this.view.fullHeight/this.zoom;s+=c*this.view.offsetX,o=s+c*this.view.width,a-=d*this.view.offsetY,l=a-d*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 n5=[.125,.215,.35,.446,.526,.582],mP=new Ib,r5=new qe;let gP=null,_P=0,vP=0,yP=!1;const df=(1+Math.sqrt(5))/2,Tg=1/df,s5=[new O(-df,Tg,0),new O(df,Tg,0),new O(-Tg,0,df),new O(Tg,0,df),new O(0,df,-Tg),new O(0,df,Tg),new O(-1,1,-1),new O(1,1,-1),new O(-1,1,1),new O(1,1,1)];class o5{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){gP=this._renderer.getRenderTarget(),_P=this._renderer.getActiveCubeFace(),vP=this._renderer.getActiveMipmapLevel(),yP=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=c5(),this._compileMaterial(this._cubemapMaterial))}compileEquirectangularShader(){null===this._equirectMaterial&&(this._equirectMaterial=l5(),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=n5[o-i+4-1]:0===o&&(l=0),n.push(l);const c=1/(a-2),d=-c,h=1+c,p=[d,d,h,d,h,h,d,d,h,h,d,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 D=0;D2?0:-1;M.set([k,B,0,k+2/3,B,0,k+2/3,B+1,0,k,B,0,k+2/3,B+1,0,k,B+1,0],b*g*D),x.set(p,v*g*D),C.set([D,D,D,D,D,D],y*g*D)}const F=new hn;F.setAttribute("position",new Hi(M,b)),F.setAttribute("uv",new Hi(x,v)),F.setAttribute("faceIndex",new Hi(C,y)),t.push(F),r>4&&r--}return{lodPlanes:t,sizeLods:e,sigmas:n}}(s)),this._blurMaterial=function Rce(i,t,e){const n=new Float32Array(20),r=new O(0,1,0);return new Cl({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:Qc,depthTest:!1,depthWrite:!1})}(s,t,e)}return r}_compileMaterial(t){const e=new Mn(this._lodPlanes[0],t);this._renderer.compile(e,mP)}_sceneToCubeUV(t,e,n,r){const a=new yr(90,1,e,n),l=[1,-1,1,1,1,1],c=[1,1,1,-1,-1,-1],d=this._renderer,h=d.autoClear,p=d.toneMapping;d.getClearColor(r5),d.toneMapping=bu,d.autoClear=!1;const m=new qi({name:"PMREM.Background",side:Io,depthWrite:!1,depthTest:!1}),g=new Mn(new rf,m);let b=!1;const v=t.background;v?v.isColor&&(m.color.copy(v),t.background=null,b=!0):(m.color.copy(r5),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;cS(r,M*x,y>2?x:0,x,x),d.setRenderTarget(r),b&&d.render(g,a),d.render(t,a)}g.geometry.dispose(),g.material.dispose(),d.toneMapping=p,d.autoClear=h,t.background=v}_textureToCubeUV(t,e){const n=this._renderer,r=t.mapping===lc||t.mapping===Zh;r?(null===this._cubemapMaterial&&(this._cubemapMaterial=c5()),this._cubemapMaterial.uniforms.flipEnvMap.value=!1===t.isRenderTargetTexture?-1:1):null===this._equirectMaterial&&(this._equirectMaterial=l5());const s=r?this._cubemapMaterial:this._equirectMaterial,o=new Mn(this._lodPlanes[0],s);s.uniforms.envMap.value=t;const l=this._cubeSize;cS(e,0,0,3*l,2*l),n.setRenderTarget(e),n.render(o,mP)}_applyPMREM(t){const e=this._renderer,n=e.autoClear;e.autoClear=!1;const r=this._lodPlanes.length;for(let s=1;s20&&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 k=0;k<20;++k){const B=k/b,T=Math.exp(-B*B/2);y.push(T),0===k?M+=T:kx-4?r-x+4:0),4*(this._cubeSize-C),3*C,2*C),l.setRenderTarget(e),l.render(h,mP)}}function a5(i,t,e){const n=new Mu(i,t,e);return n.texture.mapping=mb,n.texture.name="PMREM.cubeUv",n.scissorTest=!0,n}function cS(i,t,e,n,r){i.viewport.set(t,e,n,r),i.scissor.set(t,e,n,r)}function l5(){return new Cl({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:Qc,depthTest:!1,depthWrite:!1})}function c5(){return new Cl({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:Qc,depthTest:!1,depthWrite:!1})}function kce(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===AC||l===DC,d=l===lc||l===Zh;if(c||d){let h=t.get(a);if(a.isRenderTargetTexture&&a.pmremVersion!==(void 0!==h?h.texture.pmremVersion:0))return null===e&&(e=new o5(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||d&&m&&function r(a){let l=0;for(let d=0;d<6;d++)void 0!==a[d]&&l++;return 6===l}(m)?(null===e&&(e=new o5(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 Pce(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&&cg("THREE.WebGLRenderer: "+n+" extension not supported."),r}}}function Oce(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&&(F=Math.ceil(C/t.maxTextureSize),C=t.maxTextureSize);const D=new Float32Array(C*F*4*h),k=new Zk(D,C,F,h);k.type=Qo,k.needsUpdate=!0;const B=4*x;for(let A=0;A0)return i;const r=t*e;let s=g5[r];if(void 0===s&&(s=new Float32Array(r),g5[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 Fr(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 Pde(i,t){const e=function kde(i){const t=Jn.getPrimaries(Jn.workingColorSpace),e=Jn.getPrimaries(i);let n;switch(t===e?n="":t===UC&&e===BC?n="LinearDisplayP3ToLinearSRGB":t===BC&&e===UC&&(n="LinearSRGBToLinearDisplayP3"),i){case ds:case LC:return[n,"LinearTransferOETF"];case cs:case jk: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 Ode(i,t){let e;switch(t){case hoe:e="Linear";break;case foe:e="Reinhard";break;case poe:e="OptimizedCineon";break;case moe:e="ACESFilmic";break;case _oe:e="AgX";break;case voe:e="Neutral";break;case goe:e="Custom";break;default:console.warn("THREE.WebGLProgram: Unsupported toneMapping:",t),e="Linear"}return"vec3 "+i+"( vec3 color ) { return "+e+"ToneMapping( color ); }"}const hS=new O;function Rb(i){return""!==i}function C5(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 S5(i,t){return i.replace(/NUM_CLIPPING_PLANES/g,t.numClippingPlanes).replace(/UNION_CLIPPING_PLANES/g,t.numClippingPlanes-t.numClipIntersection)}const Ude=/^[ \t]*#include +<([\w\d./]+)>/gm;function wP(i){return i.replace(Ude,zde)}const Vde=new Map;function zde(i,t){let e=Cn[t];if(void 0===e){const n=Vde.get(t);if(void 0===n)throw new Error("Can not resolve #include <"+t+">");e=Cn[n],console.warn('THREE.WebGLRenderer: Shader chunk "%s" has been deprecated. Use "%s" instead.',t,n)}return wP(e)}const Hde=/#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 E5(i){return i.replace(Hde,Gde)}function Gde(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(Rb).join("\n"),y.length>0&&(y+="\n")):(v=[A5(e),"#define SHADER_TYPE "+e.shaderType,"#define SHADER_NAME "+e.shaderName,g,e.extensionClipCullDistance?"#define USE_CLIP_DISTANCE":"",e.batching?"#define USE_BATCHING":"",e.batchingColor?"#define USE_BATCHING_COLOR":"",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 "+d:"",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_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.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","#ifdef USE_SKINNING","\tattribute vec4 skinIndex;","\tattribute vec4 skinWeight;","#endif","\n"].filter(Rb).join("\n"),y=[A5(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 "+d:"",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.dispersion?"#define USE_DISPERSION":"",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||e.batchingColor?"#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.decodeVideoTexture?"#define DECODE_VIDEO_TEXTURE":"",e.logarithmicDepthBuffer?"#define USE_LOGDEPTHBUF":"","uniform mat4 viewMatrix;","uniform vec3 cameraPosition;","uniform bool isOrthographic;",e.toneMapping!==bu?"#define TONE_MAPPING":"",e.toneMapping!==bu?Cn.tonemapping_pars_fragment:"",e.toneMapping!==bu?Ode("toneMapping",e.toneMapping):"",e.dithering?"#define DITHERING":"",e.opaque?"#define OPAQUE":"",Cn.colorspace_pars_fragment,Pde("linearToOutputTexel",e.outputColorSpace),(Jn.getLuminanceCoefficients(hS),["float luminance( const in vec3 rgb ) {",`\tconst vec3 weights = vec3( ${hS.x.toFixed(4)}, ${hS.y.toFixed(4)}, ${hS.z.toFixed(4)} );`,"\treturn dot( weights, rgb );","}"].join("\n")),e.useDepthPacking?"#define DEPTH_PACKING "+e.depthPacking:"","\n"].filter(Rb).join("\n")),o=wP(o),o=C5(o,e),o=S5(o,e),a=wP(a),a=C5(a,e),a=S5(a,e),o=E5(o),a=E5(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===A4?"":"layout(location = 0) out highp vec4 pc_fragColor;",e.glslVersion===A4?"":"#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,F=w5(r,r.VERTEX_SHADER,M+v+o),D=w5(r,r.FRAGMENT_SHADER,C);function k($){if(i.debug.checkShaderErrors){const ie=r.getProgramInfoLog(b).trim(),ne=r.getShaderInfoLog(F).trim(),se=r.getShaderInfoLog(D).trim();let ge=!0,q=!0;if(!1===r.getProgramParameter(b,r.LINK_STATUS))if(ge=!1,"function"==typeof i.debug.onShaderError)i.debug.onShaderError(r,b,F,D);else{const re=M5(r,F,"vertex"),J=M5(r,D,"fragment");console.error("THREE.WebGLProgram: Shader Error "+r.getError()+" - VALIDATE_STATUS "+r.getProgramParameter(b,r.VALIDATE_STATUS)+"\n\nMaterial Name: "+$.name+"\nMaterial Type: "+$.type+"\n\nProgram Info Log: "+ie+"\n"+re+"\n"+J)}else""!==ie?console.warn("THREE.WebGLProgram: Program Info Log:",ie):(""===ne||""===se)&&(q=!1);q&&($.diagnostics={runnable:ge,programLog:ie,vertexShader:{log:ne,prefix:v},fragmentShader:{log:se,prefix:y}})}r.deleteShader(F),r.deleteShader(D),B=new uS(r,b),T=function Bde(i,t){const e={},n=i.getProgramParameter(t,i.ACTIVE_ATTRIBUTES);for(let r=0;r0,ce=T.clearcoat>0,Te=T.iridescence>0,Ae=T.sheen>0,Bt=T.transmission>0,Je=R&&!!T.anisotropyMap,ut=ce&&!!T.clearcoatMap,bn=ce&&!!T.clearcoatNormalMap,ze=ce&&!!T.clearcoatRoughnessMap,dt=Te&&!!T.iridescenceMap,jn=Te&&!!T.iridescenceThicknessMap,ln=Ae&&!!T.sheenColorMap,_t=Ae&&!!T.sheenRoughnessMap,vn=!!T.specularMap,Pn=!!T.specularColorMap,Ki=!!T.specularIntensityMap,Z=Bt&&!!T.transmissionMap,$e=Bt&&!!T.thicknessMap,Ee=!!T.alphaMap,ei=!!T.extensions;let br=bu;T.toneMapped&&(null===Fe||!0===Fe.isXRRenderTarget)&&(br=i.toneMapping);const hs={shaderID:we,shaderType:T.type,shaderName:T.name,vertexShader:en,fragmentShader:ae,defines:T.defines,customVertexShaderID:Oe,customFragmentShaderID:Ze,isRawShaderMaterial:!0===T.isRawShaderMaterial,glslVersion:T.glslVersion,precision:m,batching:St,batchingColor:St&&null!==ne._colorsTexture,instancing:bt,instancingColor:bt&&null!==ne.instanceColor,instancingMorph:bt&&null!==ne.morphTexture,supportsVertexTextures:p,outputColorSpace:null===Fe?i.outputColorSpace:!0===Fe.isXRRenderTarget?Fe.texture.colorSpace:ds,alphaToCoverage:!!T.alphaToCoverage,map:Mt,matcap:!!T.matcap,envMap:N,envMapMode:N&&re.mapping,envMapCubeUVHeight:J,aoMap:Ge,lightMap:Le,bumpMap:nt,normalMap:Me,displacementMap:p&&Gt,emissiveMap:it,normalMapObjectSpace:Me&&T.normalMapType===Eoe,normalMapTangentSpace:Me&&T.normalMapType===Qh,metalnessMap:pt,roughnessMap:z,anisotropy:R,anisotropyMap:Je,clearcoat:ce,clearcoatMap:ut,clearcoatNormalMap:bn,clearcoatRoughnessMap:ze,dispersion:T.dispersion>0,iridescence:Te,iridescenceMap:dt,iridescenceThicknessMap:jn,sheen:Ae,sheenColorMap:ln,sheenRoughnessMap:_t,specularMap:vn,specularColorMap:Pn,specularIntensityMap:Ki,transmission:Bt,transmissionMap:Z,thicknessMap:$e,gradientMap:!!T.gradientMap,opaque:!1===T.transparent&&T.blending===Zm&&!1===T.alphaToCoverage,alphaMap:Ee,alphaTest:T.alphaTest>0,alphaHash:!!T.alphaHash,combine:T.combine,mapUv:Mt&&b(T.map.channel),aoMapUv:Ge&&b(T.aoMap.channel),lightMapUv:Le&&b(T.lightMap.channel),bumpMapUv:nt&&b(T.bumpMap.channel),normalMapUv:Me&&b(T.normalMap.channel),displacementMapUv:Gt&&b(T.displacementMap.channel),emissiveMapUv:it&&b(T.emissiveMap.channel),metalnessMapUv:pt&&b(T.metalnessMap.channel),roughnessMapUv:z&&b(T.roughnessMap.channel),anisotropyMapUv:Je&&b(T.anisotropyMap.channel),clearcoatMapUv:ut&&b(T.clearcoatMap.channel),clearcoatNormalMapUv:bn&&b(T.clearcoatNormalMap.channel),clearcoatRoughnessMapUv:ze&&b(T.clearcoatRoughnessMap.channel),iridescenceMapUv:dt&&b(T.iridescenceMap.channel),iridescenceThicknessMapUv:jn&&b(T.iridescenceThicknessMap.channel),sheenColorMapUv:ln&&b(T.sheenColorMap.channel),sheenRoughnessMapUv:_t&&b(T.sheenRoughnessMap.channel),specularMapUv:vn&&b(T.specularMap.channel),specularColorMapUv:Pn&&b(T.specularColorMap.channel),specularIntensityMapUv:Ki&&b(T.specularIntensityMap.channel),transmissionMapUv:Z&&b(T.transmissionMap.channel),thicknessMapUv:$e&&b(T.thicknessMap.channel),alphaMapUv:Ee&&b(T.alphaMap.channel),vertexTangents:!!ge.attributes.tangent&&(Me||R),vertexColors:T.vertexColors,vertexAlphas:!0===T.vertexColors&&!!ge.attributes.color&&4===ge.attributes.color.itemSize,pointsUvs:!0===ne.isPoints&&!!ge.attributes.uv&&(Mt||Ee),fog:!!se,useFog:!0===T.fog,fogExp2:!!se&&se.isFogExp2,flatShading:!0===T.flatShading,sizeAttenuation:!0===T.sizeAttenuation,logarithmicDepthBuffer:h,skinning:!0===ne.isSkinnedMesh,morphTargets:void 0!==ge.morphAttributes.position,morphNormals:void 0!==ge.morphAttributes.normal,morphColors:void 0!==ge.morphAttributes.color,morphTargetsCount:Ye,morphTextureStride:It,numDirLights:A.directional.length,numPointLights:A.point.length,numSpotLights:A.spot.length,numSpotLightMaps:A.spotLightMap.length,numRectAreaLights:A.rectArea.length,numHemiLights:A.hemi.length,numDirLightShadows:A.directionalShadowMap.length,numPointLightShadows:A.pointShadowMap.length,numSpotLightShadows:A.spotShadowMap.length,numSpotLightShadowsWithMaps:A.numSpotLightShadowsWithMaps,numLightProbes:A.numLightProbes,numClippingPlanes:o.numPlanes,numClipIntersection:o.numIntersection,dithering:T.dithering,shadowMapEnabled:i.shadowMap.enabled&&$.length>0,shadowMapType:i.shadowMap.type,toneMapping:br,decodeVideoTexture:Mt&&!0===T.map.isVideoTexture&&Jn.getTransfer(T.map.colorSpace)===Fi,premultipliedAlpha:T.premultipliedAlpha,doubleSided:T.side===Ls,flipSided:T.side===Io,useDepthPacking:T.depthPacking>=0,depthPacking:T.depthPacking||0,index0AttributeName:T.index0AttributeName,extensionClipCullDistance:ei&&!0===T.extensions.clipCullDistance&&n.has("WEBGL_clip_cull_distance"),extensionMultiDraw:(ei&&!0===T.extensions.multiDraw||St)&&n.has("WEBGL_multi_draw"),rendererExtensionParallelShaderCompile:n.has("KHR_parallel_shader_compile"),customProgramCacheKey:T.customProgramCacheKey()};return hs.vertexUv1s=c.has(1),hs.vertexUv2s=c.has(2),hs.vertexUv3s=c.has(3),c.clear(),hs},getProgramCacheKey:function y(T){const A=[];if(T.shaderID?A.push(T.shaderID):(A.push(T.customVertexShaderID),A.push(T.customFragmentShaderID)),void 0!==T.defines)for(const $ in T.defines)A.push($),A.push(T.defines[$]);return!1===T.isRawShaderMaterial&&(function M(T,A){T.push(A.precision),T.push(A.outputColorSpace),T.push(A.envMapMode),T.push(A.envMapCubeUVHeight),T.push(A.mapUv),T.push(A.alphaMapUv),T.push(A.lightMapUv),T.push(A.aoMapUv),T.push(A.bumpMapUv),T.push(A.normalMapUv),T.push(A.displacementMapUv),T.push(A.emissiveMapUv),T.push(A.metalnessMapUv),T.push(A.roughnessMapUv),T.push(A.anisotropyMapUv),T.push(A.clearcoatMapUv),T.push(A.clearcoatNormalMapUv),T.push(A.clearcoatRoughnessMapUv),T.push(A.iridescenceMapUv),T.push(A.iridescenceThicknessMapUv),T.push(A.sheenColorMapUv),T.push(A.sheenRoughnessMapUv),T.push(A.specularMapUv),T.push(A.specularColorMapUv),T.push(A.specularIntensityMapUv),T.push(A.transmissionMapUv),T.push(A.thicknessMapUv),T.push(A.combine),T.push(A.fogExp2),T.push(A.sizeAttenuation),T.push(A.morphTargetsCount),T.push(A.morphAttributeCount),T.push(A.numDirLights),T.push(A.numPointLights),T.push(A.numSpotLights),T.push(A.numSpotLightMaps),T.push(A.numHemiLights),T.push(A.numRectAreaLights),T.push(A.numDirLightShadows),T.push(A.numPointLightShadows),T.push(A.numSpotLightShadows),T.push(A.numSpotLightShadowsWithMaps),T.push(A.numLightProbes),T.push(A.shadowMapType),T.push(A.toneMapping),T.push(A.numClippingPlanes),T.push(A.numClipIntersection),T.push(A.depthPacking)}(A,T),function x(T,A){a.disableAll(),A.supportsVertexTextures&&a.enable(0),A.instancing&&a.enable(1),A.instancingColor&&a.enable(2),A.instancingMorph&&a.enable(3),A.matcap&&a.enable(4),A.envMap&&a.enable(5),A.normalMapObjectSpace&&a.enable(6),A.normalMapTangentSpace&&a.enable(7),A.clearcoat&&a.enable(8),A.iridescence&&a.enable(9),A.alphaTest&&a.enable(10),A.vertexColors&&a.enable(11),A.vertexAlphas&&a.enable(12),A.vertexUv1s&&a.enable(13),A.vertexUv2s&&a.enable(14),A.vertexUv3s&&a.enable(15),A.vertexTangents&&a.enable(16),A.anisotropy&&a.enable(17),A.alphaHash&&a.enable(18),A.batching&&a.enable(19),A.dispersion&&a.enable(20),A.batchingColor&&a.enable(21),T.push(a.mask),a.disableAll(),A.fog&&a.enable(0),A.useFog&&a.enable(1),A.flatShading&&a.enable(2),A.logarithmicDepthBuffer&&a.enable(3),A.skinning&&a.enable(4),A.morphTargets&&a.enable(5),A.morphNormals&&a.enable(6),A.morphColors&&a.enable(7),A.premultipliedAlpha&&a.enable(8),A.shadowMapEnabled&&a.enable(9),A.doubleSided&&a.enable(10),A.flipSided&&a.enable(11),A.useDepthPacking&&a.enable(12),A.dithering&&a.enable(13),A.transmission&&a.enable(14),A.sheen&&a.enable(15),A.opaque&&a.enable(16),A.pointsUvs&&a.enable(17),A.decodeVideoTexture&&a.enable(18),A.alphaToCoverage&&a.enable(19),T.push(a.mask)}(A,T),A.push(i.outputColorSpace)),A.push(T.customProgramCacheKey),A.join()},getUniforms:function C(T){const A=g[T.type];let $;return $=A?Q4.clone(cc[A].uniforms):T.uniforms,$},acquireProgram:function F(T,A){let $;for(let ie=0,ne=d.length;ie0?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 d(){for(let h=t,p=i.length;h1&&e.sort(h||tue),n.length>1&&n.sort(p||D5),r.length>1&&r.sort(p||D5)}}}function nue(){let i=new WeakMap;return{get:function t(n,r){const s=i.get(n);let o;return void 0===s?(o=new T5,i.set(n,[o])):r>=s.length?(o=new T5,s.push(o)):o=s[r],o},dispose:function e(){i=new WeakMap}}}function iue(){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 O,color:new qe};break;case"SpotLight":e={position:new O,direction:new O,color:new qe,distance:0,coneCos:0,penumbraCos:0,decay:0};break;case"PointLight":e={position:new O,color:new qe,distance:0,decay:0};break;case"HemisphereLight":e={direction:new O,skyColor:new qe,groundColor:new qe};break;case"RectAreaLight":e={color:new qe,position:new O,halfWidth:new O,halfHeight:new O}}return i[t.id]=e,e}}}let sue=0;function oue(i,t){return(t.castShadow?2:0)-(i.castShadow?2:0)+(t.map?1:0)-(i.map?1:0)}function aue(i){const t=new iue,e=function rue(){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={shadowIntensity:1,shadowBias:0,shadowNormalBias:0,shadowRadius:1,shadowMapSize:new xe};break;case"PointLight":e={shadowIntensity:1,shadowBias:0,shadowNormalBias:0,shadowRadius:1,shadowMapSize:new xe,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 O);const r=new O,s=new Nt,o=new Nt;return{setup:function a(c){let d=0,h=0,p=0;for(let T=0;T<9;T++)n.probe[T].set(0,0,0);let m=0,g=0,b=0,v=0,y=0,M=0,x=0,C=0,F=0,D=0,k=0;c.sort(oue);for(let T=0,A=c.length;T0&&(!0===i.has("OES_texture_float_linear")?(n.rectAreaLTC1=Qe.LTC_FLOAT_1,n.rectAreaLTC2=Qe.LTC_FLOAT_2):(n.rectAreaLTC1=Qe.LTC_HALF_1,n.rectAreaLTC2=Qe.LTC_HALF_2)),n.ambient[0]=d,n.ambient[1]=h,n.ambient[2]=p;const B=n.hash;(B.directionalLength!==m||B.pointLength!==g||B.spotLength!==b||B.rectAreaLength!==v||B.hemiLength!==y||B.numDirectionalShadows!==M||B.numPointShadows!==x||B.numSpotShadows!==C||B.numSpotMaps!==F||B.numLightProbes!==k)&&(n.directional.length=m,n.spot.length=b,n.rectArea.length=v,n.point.length=g,n.hemi.length=y,n.directionalShadow.length=M,n.directionalShadowMap.length=M,n.pointShadow.length=x,n.pointShadowMap.length=x,n.spotShadow.length=C,n.spotShadowMap.length=C,n.directionalShadowMatrix.length=M,n.pointShadowMatrix.length=x,n.spotLightMatrix.length=C+F-D,n.spotLightMap.length=F,n.numSpotLightShadowsWithMaps=D,n.numLightProbes=k,B.directionalLength=m,B.pointLength=g,B.spotLength=b,B.rectAreaLength=v,B.hemiLength=y,B.numDirectionalShadows=M,B.numPointShadows=x,B.numSpotShadows=C,B.numSpotMaps=F,B.numLightProbes=k,n.version=sue++)},setupView:function l(c,d){let h=0,p=0,m=0,g=0,b=0;const v=d.matrixWorldInverse;for(let y=0,M=c.length;y=o.length?(a=new I5(i),o.push(a)):a=o[s],a},dispose:function n(){t=new WeakMap}}}class R5 extends Po{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 k5 extends Po{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 cue="void main() {\n\tgl_Position = vec4( position, 1.0 );\n}",due="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 uue(i,t,e){let n=new aS;const r=new xe,s=new xe,o=new gi,a=new R5({depthPacking:Soe}),l=new k5,c={},d=e.maxTextureSize,h={[ac]:Io,[Io]:ac,[Ls]:Ls},p=new Cl({defines:{VSM_SAMPLES:8},uniforms:{shadow_pass:{value:null},resolution:{value:new xe},radius:{value:4}},vertexShader:cue,fragmentShader:due}),m=p.clone();m.defines.HORIZONTAL_PASS=1;const g=new hn;g.setAttribute("position",new Hi(new Float32Array([-1,-1,.5,3,-1,.5,-1,3,.5]),3));const b=new Mn(g,p),v=this;this.enabled=!1,this.autoUpdate=!0,this.needsUpdate=!1,this.type=l4;let y=this.type;function M(D,k){const B=t.update(b);p.defines.VSM_SAMPLES!==D.blurSamples&&(p.defines.VSM_SAMPLES=D.blurSamples,m.defines.VSM_SAMPLES=D.blurSamples,p.needsUpdate=!0,m.needsUpdate=!0),null===D.mapPass&&(D.mapPass=new Mu(r.x,r.y)),p.uniforms.shadow_pass.value=D.map.texture,p.uniforms.resolution.value=D.mapSize,p.uniforms.radius.value=D.radius,i.setRenderTarget(D.mapPass),i.clear(),i.renderBufferDirect(k,null,B,p,b,null),m.uniforms.shadow_pass.value=D.mapPass.texture,m.uniforms.resolution.value=D.mapSize,m.uniforms.radius.value=D.radius,i.setRenderTarget(D.map),i.clear(),i.renderBufferDirect(k,null,B,m,b,null)}function x(D,k,B,T){let A=null;const $=!0===B.isPointLight?D.customDistanceMaterial:D.customDepthMaterial;if(void 0!==$)A=$;else if(A=!0===B.isPointLight?l:a,i.localClippingEnabled&&!0===k.clipShadows&&Array.isArray(k.clippingPlanes)&&0!==k.clippingPlanes.length||k.displacementMap&&0!==k.displacementScale||k.alphaMap&&k.alphaTest>0||k.map&&k.alphaTest>0){const ie=A.uuid,ne=k.uuid;let se=c[ie];void 0===se&&(se={},c[ie]=se);let ge=se[ne];void 0===ge&&(ge=A.clone(),se[ne]=ge,k.addEventListener("dispose",F)),A=ge}return A.visible=k.visible,A.wireframe=k.wireframe,A.side=T===Zc?null!==k.shadowSide?k.shadowSide:k.side:null!==k.shadowSide?k.shadowSide:h[k.side],A.alphaMap=k.alphaMap,A.alphaTest=k.alphaTest,A.map=k.map,A.clipShadows=k.clipShadows,A.clippingPlanes=k.clippingPlanes,A.clipIntersection=k.clipIntersection,A.displacementMap=k.displacementMap,A.displacementScale=k.displacementScale,A.displacementBias=k.displacementBias,A.wireframeLinewidth=k.wireframeLinewidth,A.linewidth=k.linewidth,!0===B.isPointLight&&!0===A.isMeshDistanceMaterial&&(i.properties.get(A).light=B),A}function C(D,k,B,T,A){if(!1===D.visible)return;if(D.layers.test(k.layers)&&(D.isMesh||D.isLine||D.isPoints)&&(D.castShadow||D.receiveShadow&&A===Zc)&&(!D.frustumCulled||n.intersectsObject(D))){D.modelViewMatrix.multiplyMatrices(B.matrixWorldInverse,D.matrixWorld);const ne=t.update(D),se=D.material;if(Array.isArray(se)){const ge=ne.groups;for(let q=0,re=ge.length;qd||r.y>d)&&(r.x>d&&(s.x=Math.floor(d/we.x),r.x=s.x*we.x,J.mapSize.x=s.x),r.y>d&&(s.y=Math.floor(d/we.y),r.y=s.y*we.y,J.mapSize.y=s.y)),null===J.map||!0===ne||!0===se){const Ye=this.type!==Zc?{minFilter:_r,magFilter:_r}:{};null!==J.map&&J.map.dispose(),J.map=new Mu(r.x,r.y,Ye),J.map.texture.name=re.name+".shadowMap",J.camera.updateProjectionMatrix()}i.setRenderTarget(J.map),i.clear();const Ne=J.getViewportCount();for(let Ye=0;Ye=1):-1!==re.indexOf("OpenGL ES")&&(q=parseFloat(/^OpenGL ES (\d)/.exec(re)[1]),ge=q>=2);let J=null,we={};const Ne=i.getParameter(i.SCISSOR_BOX),Ye=i.getParameter(i.VIEWPORT),It=(new gi).fromArray(Ne),en=(new gi).fromArray(Ye);function ae(Z,$e,Ce,Ee){const Ke=new Uint8Array(4),tn=i.createTexture();i.bindTexture(Z,tn),i.texParameteri(Z,i.TEXTURE_MIN_FILTER,i.NEAREST),i.texParameteri(Z,i.TEXTURE_MAG_FILTER,i.NEAREST);for(let ei=0;ei"u")&&/OculusBrowser/g.test(navigator.userAgent),c=new xe,d=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(z,R){return m?new OffscreenCanvas(z,R):wb("canvas")}function b(z,R,ce){let Ie=1;const Te=pt(z);if((Te.width>ce||Te.height>ce)&&(Ie=ce/Math.max(Te.width,Te.height)),Ie<1){if(typeof HTMLImageElement<"u"&&z instanceof HTMLImageElement||typeof HTMLCanvasElement<"u"&&z instanceof HTMLCanvasElement||typeof ImageBitmap<"u"&&z instanceof ImageBitmap||typeof VideoFrame<"u"&&z instanceof VideoFrame){const Ae=Math.floor(Ie*Te.width),Bt=Math.floor(Ie*Te.height);void 0===h&&(h=g(Ae,Bt));const Je=R?g(Ae,Bt):h;return Je.width=Ae,Je.height=Bt,Je.getContext("2d").drawImage(z,0,0,Ae,Bt),console.warn("THREE.WebGLRenderer: Texture has been resized from ("+Te.width+"x"+Te.height+") to ("+Ae+"x"+Bt+")."),Je}return"data"in z&&console.warn("THREE.WebGLRenderer: Image in DataTexture is too big ("+Te.width+"x"+Te.height+")."),z}return z}function v(z){return z.generateMipmaps&&z.minFilter!==_r&&z.minFilter!==lr}function y(z){i.generateMipmap(z)}function M(z,R,ce,Ie,Te=!1){if(null!==z){if(void 0!==i[z])return i[z];console.warn("THREE.WebGLRenderer: Attempt to use non-existing WebGL internal format '"+z+"'")}let Ae=R;if(R===i.RED&&(ce===i.FLOAT&&(Ae=i.R32F),ce===i.HALF_FLOAT&&(Ae=i.R16F),ce===i.UNSIGNED_BYTE&&(Ae=i.R8)),R===i.RED_INTEGER&&(ce===i.UNSIGNED_BYTE&&(Ae=i.R8UI),ce===i.UNSIGNED_SHORT&&(Ae=i.R16UI),ce===i.UNSIGNED_INT&&(Ae=i.R32UI),ce===i.BYTE&&(Ae=i.R8I),ce===i.SHORT&&(Ae=i.R16I),ce===i.INT&&(Ae=i.R32I)),R===i.RG&&(ce===i.FLOAT&&(Ae=i.RG32F),ce===i.HALF_FLOAT&&(Ae=i.RG16F),ce===i.UNSIGNED_BYTE&&(Ae=i.RG8)),R===i.RG_INTEGER&&(ce===i.UNSIGNED_BYTE&&(Ae=i.RG8UI),ce===i.UNSIGNED_SHORT&&(Ae=i.RG16UI),ce===i.UNSIGNED_INT&&(Ae=i.RG32UI),ce===i.BYTE&&(Ae=i.RG8I),ce===i.SHORT&&(Ae=i.RG16I),ce===i.INT&&(Ae=i.RG32I)),R===i.RGB&&ce===i.UNSIGNED_INT_5_9_9_9_REV&&(Ae=i.RGB9_E5),R===i.RGBA){const Bt=Te?NC:Jn.getTransfer(Ie);ce===i.FLOAT&&(Ae=i.RGBA32F),ce===i.HALF_FLOAT&&(Ae=i.RGBA16F),ce===i.UNSIGNED_BYTE&&(Ae=Bt===Fi?i.SRGB8_ALPHA8:i.RGBA8),ce===i.UNSIGNED_SHORT_4_4_4_4&&(Ae=i.RGBA4),ce===i.UNSIGNED_SHORT_5_5_5_1&&(Ae=i.RGB5_A1)}return(Ae===i.R16F||Ae===i.R32F||Ae===i.RG16F||Ae===i.RG32F||Ae===i.RGBA16F||Ae===i.RGBA32F)&&t.get("EXT_color_buffer_float"),Ae}function x(z,R){let ce;return z?null===R||R===xu||R===eg?ce=i.DEPTH24_STENCIL8:R===Qo?ce=i.DEPTH32F_STENCIL8:R===vb&&(ce=i.DEPTH24_STENCIL8,console.warn("DepthTexture: 16 bit depth attachment is not supported with stencil. Using 24-bit attachment.")):null===R||R===xu||R===eg?ce=i.DEPTH_COMPONENT24:R===Qo?ce=i.DEPTH_COMPONENT32F:R===vb&&(ce=i.DEPTH_COMPONENT16),ce}function C(z,R){return!0===v(z)||z.isFramebufferTexture&&z.minFilter!==_r&&z.minFilter!==lr?Math.log2(Math.max(R.width,R.height))+1:void 0!==z.mipmaps&&z.mipmaps.length>0?z.mipmaps.length:z.isCompressedTexture&&Array.isArray(z.image)?R.mipmaps.length:1}function F(z){const R=z.target;R.removeEventListener("dispose",F),function k(z){const R=n.get(z);if(void 0===R.__webglInit)return;const ce=z.source,Ie=p.get(ce);if(Ie){const Te=Ie[R.__cacheKey];Te.usedTimes--,0===Te.usedTimes&&B(z),0===Object.keys(Ie).length&&p.delete(ce)}n.remove(z)}(R),R.isVideoTexture&&d.delete(R)}function D(z){const R=z.target;R.removeEventListener("dispose",D),function T(z){const R=n.get(z);if(z.depthTexture&&z.depthTexture.dispose(),z.isWebGLCubeRenderTarget)for(let Ie=0;Ie<6;Ie++){if(Array.isArray(R.__webglFramebuffer[Ie]))for(let Te=0;Te0&&ce.__version!==z.version){const Ie=z.image;if(null===Ie)console.warn("THREE.WebGLRenderer: Texture marked for update but no image data found.");else{if(!1!==Ie.complete)return void en(ce,z,R);console.warn("THREE.WebGLRenderer: Texture marked for update but image is incomplete")}}e.bindTexture(i.TEXTURE_2D,ce.__webglTexture,i.TEXTURE0+R)}const J={[Pa]:i.REPEAT,[Ii]:i.CLAMP_TO_EDGE,[gb]:i.MIRRORED_REPEAT},we={[_r]:i.NEAREST,[dk]:i.NEAREST_MIPMAP_NEAREST,[Qm]:i.NEAREST_MIPMAP_LINEAR,[lr]:i.LINEAR,[_b]:i.LINEAR_MIPMAP_NEAREST,[bl]:i.LINEAR_MIPMAP_LINEAR},Ne={[Aoe]:i.NEVER,[Poe]:i.ALWAYS,[Doe]:i.LESS,[E4]:i.LEQUAL,[Toe]:i.EQUAL,[koe]:i.GEQUAL,[Ioe]:i.GREATER,[Roe]:i.NOTEQUAL};function Ye(z,R){if(R.type===Qo&&!1===t.has("OES_texture_float_linear")&&(R.magFilter===lr||R.magFilter===_b||R.magFilter===Qm||R.magFilter===bl||R.minFilter===lr||R.minFilter===_b||R.minFilter===Qm||R.minFilter===bl)&&console.warn("THREE.WebGLRenderer: Unable to use linear filtering with floating point textures. OES_texture_float_linear not supported on this device."),i.texParameteri(z,i.TEXTURE_WRAP_S,J[R.wrapS]),i.texParameteri(z,i.TEXTURE_WRAP_T,J[R.wrapT]),(z===i.TEXTURE_3D||z===i.TEXTURE_2D_ARRAY)&&i.texParameteri(z,i.TEXTURE_WRAP_R,J[R.wrapR]),i.texParameteri(z,i.TEXTURE_MAG_FILTER,we[R.magFilter]),i.texParameteri(z,i.TEXTURE_MIN_FILTER,we[R.minFilter]),R.compareFunction&&(i.texParameteri(z,i.TEXTURE_COMPARE_MODE,i.COMPARE_REF_TO_TEXTURE),i.texParameteri(z,i.TEXTURE_COMPARE_FUNC,Ne[R.compareFunction])),!0===t.has("EXT_texture_filter_anisotropic")){if(R.magFilter===_r||R.minFilter!==Qm&&R.minFilter!==bl||R.type===Qo&&!1===t.has("OES_texture_float_linear"))return;if(R.anisotropy>1||n.get(R).__currentAnisotropy){const ce=t.get("EXT_texture_filter_anisotropic");i.texParameterf(z,ce.TEXTURE_MAX_ANISOTROPY_EXT,Math.min(R.anisotropy,r.getMaxAnisotropy())),n.get(R).__currentAnisotropy=R.anisotropy}}}function It(z,R){let ce=!1;void 0===z.__webglInit&&(z.__webglInit=!0,R.addEventListener("dispose",F));const Ie=R.source;let Te=p.get(Ie);void 0===Te&&(Te={},p.set(Ie,Te));const Ae=function ne(z){const R=[];return R.push(z.wrapS),R.push(z.wrapT),R.push(z.wrapR||0),R.push(z.magFilter),R.push(z.minFilter),R.push(z.anisotropy),R.push(z.internalFormat),R.push(z.format),R.push(z.type),R.push(z.generateMipmaps),R.push(z.premultiplyAlpha),R.push(z.flipY),R.push(z.unpackAlignment),R.push(z.colorSpace),R.join()}(R);if(Ae!==z.__cacheKey){void 0===Te[Ae]&&(Te[Ae]={texture:i.createTexture(),usedTimes:0},o.memory.textures++,ce=!0),Te[Ae].usedTimes++;const Bt=Te[z.__cacheKey];void 0!==Bt&&(Te[z.__cacheKey].usedTimes--,0===Bt.usedTimes&&B(R)),z.__cacheKey=Ae,z.__webglTexture=Te[Ae].texture}return ce}function en(z,R,ce){let Ie=i.TEXTURE_2D;(R.isDataArrayTexture||R.isCompressedArrayTexture)&&(Ie=i.TEXTURE_2D_ARRAY),R.isData3DTexture&&(Ie=i.TEXTURE_3D);const Te=It(z,R),Ae=R.source;e.bindTexture(Ie,z.__webglTexture,i.TEXTURE0+ce);const Bt=n.get(Ae);if(Ae.version!==Bt.__version||!0===Te){e.activeTexture(i.TEXTURE0+ce);const Je=Jn.getPrimaries(Jn.workingColorSpace),ut=R.colorSpace===wu?null:Jn.getPrimaries(R.colorSpace),bn=R.colorSpace===wu||Je===ut?i.NONE:i.BROWSER_DEFAULT_WEBGL;i.pixelStorei(i.UNPACK_FLIP_Y_WEBGL,R.flipY),i.pixelStorei(i.UNPACK_PREMULTIPLY_ALPHA_WEBGL,R.premultiplyAlpha),i.pixelStorei(i.UNPACK_ALIGNMENT,R.unpackAlignment),i.pixelStorei(i.UNPACK_COLORSPACE_CONVERSION_WEBGL,bn);let ze=b(R.image,!1,r.maxTextureSize);ze=it(R,ze);const dt=s.convert(R.format,R.colorSpace),jn=s.convert(R.type);let _t,ln=M(R.internalFormat,dt,jn,R.colorSpace,R.isVideoTexture);Ye(Ie,R);const vn=R.mipmaps,Pn=!0!==R.isVideoTexture,Ki=void 0===Bt.__version||!0===Te,Z=Ae.dataReady,$e=C(R,ze);if(R.isDepthTexture)ln=x(R.format===ng,R.type),Ki&&(Pn?e.texStorage2D(i.TEXTURE_2D,1,ln,ze.width,ze.height):e.texImage2D(i.TEXTURE_2D,0,ln,ze.width,ze.height,0,dt,jn,null));else if(R.isDataTexture)if(vn.length>0){Pn&&Ki&&e.texStorage2D(i.TEXTURE_2D,$e,ln,vn[0].width,vn[0].height);for(let Ce=0,Ee=vn.length;Ce0){const Ke=MP(_t.width,_t.height,R.format,R.type);for(const tn of R.layerUpdates){const ei=_t.data.subarray(tn*Ke/_t.data.BYTES_PER_ELEMENT,(tn+1)*Ke/_t.data.BYTES_PER_ELEMENT);e.compressedTexSubImage3D(i.TEXTURE_2D_ARRAY,Ce,0,0,tn,_t.width,_t.height,1,dt,ei,0,0)}R.clearLayerUpdates()}else e.compressedTexSubImage3D(i.TEXTURE_2D_ARRAY,Ce,0,0,0,_t.width,_t.height,ze.depth,dt,_t.data,0,0)}else e.compressedTexImage3D(i.TEXTURE_2D_ARRAY,Ce,ln,_t.width,_t.height,ze.depth,0,_t.data,0,0);else console.warn("THREE.WebGLRenderer: Attempt to load unsupported compressed texture format in .uploadTexture()");else Pn?Z&&e.texSubImage3D(i.TEXTURE_2D_ARRAY,Ce,0,0,0,_t.width,_t.height,ze.depth,dt,jn,_t.data):e.texImage3D(i.TEXTURE_2D_ARRAY,Ce,ln,_t.width,_t.height,ze.depth,0,dt,jn,_t.data)}else{Pn&&Ki&&e.texStorage2D(i.TEXTURE_2D,$e,ln,vn[0].width,vn[0].height);for(let Ce=0,Ee=vn.length;Ce0){const Ce=MP(ze.width,ze.height,R.format,R.type);for(const Ee of R.layerUpdates){const Ke=ze.data.subarray(Ee*Ce/ze.data.BYTES_PER_ELEMENT,(Ee+1)*Ce/ze.data.BYTES_PER_ELEMENT);e.texSubImage3D(i.TEXTURE_2D_ARRAY,0,0,0,Ee,ze.width,ze.height,1,dt,jn,Ke)}R.clearLayerUpdates()}else e.texSubImage3D(i.TEXTURE_2D_ARRAY,0,0,0,0,ze.width,ze.height,ze.depth,dt,jn,ze.data)}else e.texImage3D(i.TEXTURE_2D_ARRAY,0,ln,ze.width,ze.height,ze.depth,0,dt,jn,ze.data);else if(R.isData3DTexture)Pn?(Ki&&e.texStorage3D(i.TEXTURE_3D,$e,ln,ze.width,ze.height,ze.depth),Z&&e.texSubImage3D(i.TEXTURE_3D,0,0,0,0,ze.width,ze.height,ze.depth,dt,jn,ze.data)):e.texImage3D(i.TEXTURE_3D,0,ln,ze.width,ze.height,ze.depth,0,dt,jn,ze.data);else if(R.isFramebufferTexture){if(Ki)if(Pn)e.texStorage2D(i.TEXTURE_2D,$e,ln,ze.width,ze.height);else{let Ce=ze.width,Ee=ze.height;for(let Ke=0;Ke<$e;Ke++)e.texImage2D(i.TEXTURE_2D,Ke,ln,Ce,Ee,0,dt,jn,null),Ce>>=1,Ee>>=1}}else if(vn.length>0){if(Pn&&Ki){const Ce=pt(vn[0]);e.texStorage2D(i.TEXTURE_2D,$e,ln,Ce.width,Ce.height)}for(let Ce=0,Ee=vn.length;Ce>Ae),dt=Math.max(1,R.height>>Ae);Te===i.TEXTURE_3D||Te===i.TEXTURE_2D_ARRAY?e.texImage3D(Te,Ae,ut,ze,dt,R.depth,0,Bt,Je,null):e.texImage2D(Te,Ae,ut,ze,dt,0,Bt,Je,null)}e.bindFramebuffer(i.FRAMEBUFFER,z),Me(R)?a.framebufferTexture2DMultisampleEXT(i.FRAMEBUFFER,Ie,Te,n.get(ce).__webglTexture,0,nt(R)):(Te===i.TEXTURE_2D||Te>=i.TEXTURE_CUBE_MAP_POSITIVE_X&&Te<=i.TEXTURE_CUBE_MAP_NEGATIVE_Z)&&i.framebufferTexture2D(i.FRAMEBUFFER,Ie,Te,n.get(ce).__webglTexture,Ae),e.bindFramebuffer(i.FRAMEBUFFER,null)}function Ze(z,R,ce){if(i.bindRenderbuffer(i.RENDERBUFFER,z),R.depthBuffer){const Ie=R.depthTexture,Ae=x(R.stencilBuffer,Ie&&Ie.isDepthTexture?Ie.type:null),Bt=R.stencilBuffer?i.DEPTH_STENCIL_ATTACHMENT:i.DEPTH_ATTACHMENT,Je=nt(R);Me(R)?a.renderbufferStorageMultisampleEXT(i.RENDERBUFFER,Je,Ae,R.width,R.height):ce?i.renderbufferStorageMultisample(i.RENDERBUFFER,Je,Ae,R.width,R.height):i.renderbufferStorage(i.RENDERBUFFER,Ae,R.width,R.height),i.framebufferRenderbuffer(i.FRAMEBUFFER,Bt,i.RENDERBUFFER,z)}else{const Ie=R.textures;for(let Te=0;Te0&&!0===t.has("WEBGL_multisampled_render_to_texture")&&!1!==R.__useRenderToTexture}function it(z,R){const ce=z.colorSpace,Ie=z.format,Te=z.type;return!0===z.isCompressedTexture||!0===z.isVideoTexture||ce!==ds&&ce!==wu&&(Jn.getTransfer(ce)===Fi?(Ie!==Ro||Te!==Jc)&&console.warn("THREE.WebGLTextures: sRGB encoded textures have to use RGBAFormat and UnsignedByteType."):console.error("THREE.WebGLTextures: Unsupported texture color space:",ce)),R}function pt(z){return typeof HTMLImageElement<"u"&&z instanceof HTMLImageElement?(c.width=z.naturalWidth||z.width,c.height=z.naturalHeight||z.height):typeof VideoFrame<"u"&&z instanceof VideoFrame?(c.width=z.displayWidth,c.height=z.displayHeight):(c.width=z.width,c.height=z.height),c}this.allocateTextureUnit=function ie(){const z=A;return z>=r.maxTextures&&console.warn("THREE.WebGLTextures: Trying to use "+z+" texture units while this GPU supports only "+r.maxTextures),A+=1,z},this.resetTextureUnits=function $(){A=0},this.setTexture2D=se,this.setTexture2DArray=function ge(z,R){const ce=n.get(z);z.version>0&&ce.__version!==z.version?en(ce,z,R):e.bindTexture(i.TEXTURE_2D_ARRAY,ce.__webglTexture,i.TEXTURE0+R)},this.setTexture3D=function q(z,R){const ce=n.get(z);z.version>0&&ce.__version!==z.version?en(ce,z,R):e.bindTexture(i.TEXTURE_3D,ce.__webglTexture,i.TEXTURE0+R)},this.setTextureCube=function re(z,R){const ce=n.get(z);z.version>0&&ce.__version!==z.version?function ae(z,R,ce){if(6!==R.image.length)return;const Ie=It(z,R),Te=R.source;e.bindTexture(i.TEXTURE_CUBE_MAP,z.__webglTexture,i.TEXTURE0+ce);const Ae=n.get(Te);if(Te.version!==Ae.__version||!0===Ie){e.activeTexture(i.TEXTURE0+ce);const Bt=Jn.getPrimaries(Jn.workingColorSpace),Je=R.colorSpace===wu?null:Jn.getPrimaries(R.colorSpace),ut=R.colorSpace===wu||Bt===Je?i.NONE:i.BROWSER_DEFAULT_WEBGL;i.pixelStorei(i.UNPACK_FLIP_Y_WEBGL,R.flipY),i.pixelStorei(i.UNPACK_PREMULTIPLY_ALPHA_WEBGL,R.premultiplyAlpha),i.pixelStorei(i.UNPACK_ALIGNMENT,R.unpackAlignment),i.pixelStorei(i.UNPACK_COLORSPACE_CONVERSION_WEBGL,ut);const bn=R.isCompressedTexture||R.image[0].isCompressedTexture,ze=R.image[0]&&R.image[0].isDataTexture,dt=[];for(let Ee=0;Ee<6;Ee++)dt[Ee]=bn||ze?ze?R.image[Ee].image:R.image[Ee]:b(R.image[Ee],!0,r.maxCubemapSize),dt[Ee]=it(R,dt[Ee]);const jn=dt[0],ln=s.convert(R.format,R.colorSpace),_t=s.convert(R.type),vn=M(R.internalFormat,ln,_t,R.colorSpace),Pn=!0!==R.isVideoTexture,Ki=void 0===Ae.__version||!0===Ie,Z=Te.dataReady;let Ce,$e=C(R,jn);if(Ye(i.TEXTURE_CUBE_MAP,R),bn){Pn&&Ki&&e.texStorage2D(i.TEXTURE_CUBE_MAP,$e,vn,jn.width,jn.height);for(let Ee=0;Ee<6;Ee++){Ce=dt[Ee].mipmaps;for(let Ke=0;Ke0&&$e++;const Ee=pt(dt[0]);e.texStorage2D(i.TEXTURE_CUBE_MAP,$e,vn,Ee.width,Ee.height)}for(let Ee=0;Ee<6;Ee++)if(ze){Pn?Z&&e.texSubImage2D(i.TEXTURE_CUBE_MAP_POSITIVE_X+Ee,0,0,0,dt[Ee].width,dt[Ee].height,ln,_t,dt[Ee].data):e.texImage2D(i.TEXTURE_CUBE_MAP_POSITIVE_X+Ee,0,vn,dt[Ee].width,dt[Ee].height,0,ln,_t,dt[Ee].data);for(let Ke=0;Ke1;if(Bt||(void 0===Ie.__webglTexture&&(Ie.__webglTexture=i.createTexture()),Ie.__version=R.version,o.memory.textures++),Ae){ce.__webglFramebuffer=[];for(let Je=0;Je<6;Je++)if(R.mipmaps&&R.mipmaps.length>0){ce.__webglFramebuffer[Je]=[];for(let ut=0;ut0){ce.__webglFramebuffer=[];for(let Je=0;Je0&&!1===Me(z)){ce.__webglMultisampledFramebuffer=i.createFramebuffer(),ce.__webglColorRenderbuffer=[],e.bindFramebuffer(i.FRAMEBUFFER,ce.__webglMultisampledFramebuffer);for(let Je=0;Je0)for(let ut=0;ut0)for(let ut=0;ut0)if(!1===Me(z)){const R=z.textures,ce=z.width,Ie=z.height;let Te=i.COLOR_BUFFER_BIT;const Ae=z.stencilBuffer?i.DEPTH_STENCIL_ATTACHMENT:i.DEPTH_ATTACHMENT,Bt=n.get(z),Je=R.length>1;if(Je)for(let ut=0;utm+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(bue)))}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 Fo;n.matrixAutoUpdate=!1,n.visible=!1,t.joints[e.jointName]=n,t.add(n)}return t.joints[e.jointName]}}class Mue{constructor(){this.texture=null,this.mesh=null,this.depthNear=0,this.depthFar=0}init(t,e,n){if(null===this.texture){const r=new ko;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}}getMesh(t){if(null!==this.texture&&null===this.mesh){const e=t.cameras[0].viewport,n=new Cl({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:e.z},depthHeight:{value:e.w}}});this.mesh=new Mn(new Iu(20,20),n)}return this.mesh}reset(){this.texture=null,this.mesh=null}getDepthTexture(){return this.texture}}class Cue extends og{constructor(t,e){super();const n=this;let r=null,s=1,o=null,a="local-floor",l=1,c=null,d=null,h=null,p=null,m=null,g=null;const b=new Mue,v=e.getContextAttributes();let y=null,M=null;const x=[],C=[],F=new xe;let D=null;const k=new yr;k.layers.enable(1),k.viewport=new gi;const B=new yr;B.layers.enable(2),B.viewport=new gi;const T=[k,B],A=new yue;A.layers.enable(1),A.layers.enable(2);let $=null,ie=null;function ne(ae){const Oe=C.indexOf(ae.inputSource);if(-1===Oe)return;const Ze=x[Oe];void 0!==Ze&&(Ze.update(ae.inputSource,ae.frame,c||o),Ze.dispatchEvent({type:ae.type,data:ae.inputSource}))}function se(){r.removeEventListener("select",ne),r.removeEventListener("selectstart",ne),r.removeEventListener("selectend",ne),r.removeEventListener("squeeze",ne),r.removeEventListener("squeezestart",ne),r.removeEventListener("squeezeend",ne),r.removeEventListener("end",se),r.removeEventListener("inputsourceschange",ge);for(let ae=0;ae=0&&(C[Fe]=null,x[Fe].disconnect(Ze))}for(let Oe=0;Oe=C.length){C.push(Ze),Fe=St;break}if(null===C[St]){C[St]=Ze,Fe=St;break}}if(-1===Fe)break}const bt=x[Fe];bt&&bt.connect(Ze)}}this.cameraAutoUpdate=!0,this.enabled=!1,this.isPresenting=!1,this.getController=function(ae){let Oe=x[ae];return void 0===Oe&&(Oe=new CP,x[ae]=Oe),Oe.getTargetRaySpace()},this.getControllerGrip=function(ae){let Oe=x[ae];return void 0===Oe&&(Oe=new CP,x[ae]=Oe),Oe.getGripSpace()},this.getHand=function(ae){let Oe=x[ae];return void 0===Oe&&(Oe=new CP,x[ae]=Oe),Oe.getHandSpace()},this.setFramebufferScaleFactor=function(ae){s=ae,!0===n.isPresenting&&console.warn("THREE.WebXRManager: Cannot change framebuffer scale while presenting.")},this.setReferenceSpaceType=function(ae){a=ae,!0===n.isPresenting&&console.warn("THREE.WebXRManager: Cannot change reference space type while presenting.")},this.getReferenceSpace=function(){return c||o},this.setReferenceSpace=function(ae){c=ae},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 ae=tt(function*(Oe){if(r=Oe,null!==r){if(y=t.getRenderTarget(),r.addEventListener("select",ne),r.addEventListener("selectstart",ne),r.addEventListener("selectend",ne),r.addEventListener("squeeze",ne),r.addEventListener("squeezestart",ne),r.addEventListener("squeezeend",ne),r.addEventListener("end",se),r.addEventListener("inputsourceschange",ge),!0!==v.xrCompatible&&(yield e.makeXRCompatible()),D=t.getPixelRatio(),t.getSize(F),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 Mu(m.framebufferWidth,m.framebufferHeight,{format:Ro,type:Jc,colorSpace:t.outputColorSpace,stencilBuffer:v.stencil});else{let Ze=null,Fe=null,bt=null;v.depth&&(bt=v.stencil?e.DEPTH24_STENCIL8:e.DEPTH_COMPONENT24,Ze=v.stencil?ng:tg,Fe=v.stencil?eg:xu);const St={colorFormat:e.RGBA8,depthFormat:bt,scaleFactor:s};h=new XRWebGLBinding(r,e),p=h.createProjectionLayer(St),r.updateRenderState({layers:[p]}),t.setPixelRatio(1),t.setSize(p.textureWidth,p.textureHeight,!1),M=new Mu(p.textureWidth,p.textureHeight,{format:Ro,type:Jc,depthTexture:new d5(p.textureWidth,p.textureHeight,Fe,void 0,void 0,void 0,void 0,void 0,void 0,Ze),stencilBuffer:v.stencil,colorSpace:t.outputColorSpace,samples:v.antialias?4:0,resolveDepthBuffer:!1===p.ignoreDepthValues})}M.isXRRenderTarget=!0,this.setFoveation(l),c=null,o=yield r.requestReferenceSpace(a),en.setContext(r),en.start(),n.isPresenting=!0,n.dispatchEvent({type:"sessionstart"})}});return function(Oe){return ae.apply(this,arguments)}}(),this.getEnvironmentBlendMode=function(){if(null!==r)return r.environmentBlendMode},this.getDepthTexture=function(){return b.getDepthTexture()};const q=new O,re=new O;function we(ae,Oe){null===Oe?ae.matrixWorld.copy(ae.matrix):ae.matrixWorld.multiplyMatrices(Oe.matrixWorld,ae.matrix),ae.matrixWorldInverse.copy(ae.matrixWorld).invert()}this.updateCamera=function(ae){if(null===r)return;null!==b.texture&&(ae.near=b.depthNear,ae.far=b.depthFar),A.near=B.near=k.near=ae.near,A.far=B.far=k.far=ae.far,($!==A.near||ie!==A.far)&&(r.updateRenderState({depthNear:A.near,depthFar:A.far}),$=A.near,ie=A.far,k.near=$,k.far=ie,B.near=$,B.far=ie,k.updateProjectionMatrix(),B.updateProjectionMatrix(),ae.updateProjectionMatrix());const Oe=ae.parent,Ze=A.cameras;we(A,Oe);for(let Fe=0;Fe0&&(v.alphaTest.value=y.alphaTest);const M=t.get(y),x=M.envMap,C=M.envMapRotation;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(Sue.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,v.lightMapIntensity.value=y.lightMapIntensity,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,Z4(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 d(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===Io&&v.clearcoatNormalScale.value.negate())),y.dispersion>0&&(v.dispersion.value=y.dispersion),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 Aue(i,t,e,n){let r={},s={},o=[];const a=i.getParameter(i.MAX_UNIFORM_BUFFER_BINDINGS);function m(M,x,C,F){const D=M.value,k=x+"_"+C;if(void 0===F[k])return F[k]="number"==typeof D||"boolean"==typeof D?D:D.clone(),!0;{const B=F[k];if("number"==typeof D||"boolean"==typeof D){if(B!==D)return F[k]=D,!0}else if(!1===B.equals(D))return B.copy(D),!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 k=0,B=x.length;k0&&(C+=16-D),M.__size=C,M.__cache={}}(M),C=function d(M){const x=function h(){for(let M=0;M0),Xt=!!le.morphAttributes.position,ai=!!le.morphAttributes.normal,Li=!!le.morphAttributes.color;let nr=bu;de.toneMapped&&(null===k||!0===k.isXRRenderTarget)&&(nr=x.toneMapping);const oa=le.morphAttributes.position||le.morphAttributes.normal||le.morphAttributes.color,hi=void 0!==oa?oa.length:0,Rt=it.get(de),fs=v.state.lights;!0!==ae||!0!==Oe&&L===T||bn.setState(de,L,L===T&&de.id===B);let fi=!1;de.version===Rt.__version?(Rt.needsLights&&Rt.lightsStateVersion!==fs.state.version||Rt.outputColorSpace!==xt||te.isBatchedMesh&&!1===Rt.batching||!te.isBatchedMesh&&!0===Rt.batching||te.isBatchedMesh&&!0===Rt.batchingColor&&null===te.colorTexture||te.isBatchedMesh&&!1===Rt.batchingColor&&null!==te.colorTexture||te.isInstancedMesh&&!1===Rt.instancing||!te.isInstancedMesh&&!0===Rt.instancing||te.isSkinnedMesh&&!1===Rt.skinning||!te.isSkinnedMesh&&!0===Rt.skinning||te.isInstancedMesh&&!0===Rt.instancingColor&&null===te.instanceColor||te.isInstancedMesh&&!1===Rt.instancingColor&&null!==te.instanceColor||te.isInstancedMesh&&!0===Rt.instancingMorph&&null===te.morphTexture||te.isInstancedMesh&&!1===Rt.instancingMorph&&null!==te.morphTexture||Rt.envMap!==wt||!0===de.fog&&Rt.fog!==je||void 0!==Rt.numClippingPlanes&&(Rt.numClippingPlanes!==bn.numPlanes||Rt.numIntersection!==bn.numIntersection)||Rt.vertexAlphas!==qt||Rt.vertexTangents!==on||Rt.morphTargets!==Xt||Rt.morphNormals!==ai||Rt.morphColors!==Li||Rt.toneMapping!==nr||Rt.morphTargetsCount!==hi)&&(fi=!0):(fi=!0,Rt.__version=de.version);let El=Rt.currentProgram;!0===fi&&(El=xE(de,K,te));let qg=!1,aa=!1,qO=!1;const xr=El.getUniforms(),Uu=Rt.uniforms;if(Me.useProgram(El.program)&&(qg=!0,aa=!0,qO=!0),de.id!==B&&(B=de.id,aa=!0),qg||T!==L){xr.setValue(N,"projectionMatrix",L.projectionMatrix),xr.setValue(N,"viewMatrix",L.matrixWorldInverse);const za=xr.map.cameraPosition;void 0!==za&&za.setValue(N,Fe.setFromMatrixPosition(L.matrixWorld)),nt.logarithmicDepthBuffer&&xr.setValue(N,"logDepthBufFC",2/(Math.log(L.far+1)/Math.LN2)),(de.isMeshPhongMaterial||de.isMeshToonMaterial||de.isMeshLambertMaterial||de.isMeshBasicMaterial||de.isMeshStandardMaterial||de.isShaderMaterial)&&xr.setValue(N,"isOrthographic",!0===L.isOrthographicCamera),T!==L&&(T=L,aa=!0,qO=!0)}if(te.isSkinnedMesh){xr.setOptional(N,te,"bindMatrix"),xr.setOptional(N,te,"bindMatrixInverse");const za=te.skeleton;za&&(null===za.boneTexture&&za.computeBoneTexture(),xr.setValue(N,"boneTexture",za.boneTexture,pt))}te.isBatchedMesh&&(xr.setOptional(N,te,"batchingTexture"),xr.setValue(N,"batchingTexture",te._matricesTexture,pt),xr.setOptional(N,te,"batchingIdTexture"),xr.setValue(N,"batchingIdTexture",te._indirectTexture,pt),xr.setOptional(N,te,"batchingColorTexture"),null!==te._colorsTexture&&xr.setValue(N,"batchingColorTexture",te._colorsTexture,pt));const XO=le.morphAttributes;if((void 0!==XO.position||void 0!==XO.normal||void 0!==XO.color)&&jn.update(te,le,El),(aa||Rt.receiveShadow!==te.receiveShadow)&&(Rt.receiveShadow=te.receiveShadow,xr.setValue(N,"receiveShadow",te.receiveShadow)),de.isMeshGouraudMaterial&&null!==de.envMap&&(Uu.envMap.value=wt,Uu.flipEnvMap.value=wt.isCubeTexture&&!1===wt.isRenderTargetTexture?-1:1),de.isMeshStandardMaterial&&null===de.envMap&&null!==K.environment&&(Uu.envMapIntensity.value=K.environmentIntensity),aa&&(xr.setValue(N,"toneMappingExposure",x.toneMappingExposure),Rt.needsLights&&function kve(L,K){L.ambientLightColor.needsUpdate=K,L.lightProbe.needsUpdate=K,L.directionalLights.needsUpdate=K,L.directionalLightShadows.needsUpdate=K,L.pointLights.needsUpdate=K,L.pointLightShadows.needsUpdate=K,L.spotLights.needsUpdate=K,L.spotLightShadows.needsUpdate=K,L.rectAreaLights.needsUpdate=K,L.hemisphereLights.needsUpdate=K}(Uu,qO),je&&!0===de.fog&&Bt.refreshFogUniforms(Uu,je),Bt.refreshMaterialUniforms(Uu,de,re,q,v.state.transmissionRenderTarget[L.id]),uS.upload(N,g8(Rt),Uu,pt)),de.isShaderMaterial&&!0===de.uniformsNeedUpdate&&(uS.upload(N,g8(Rt),Uu,pt),de.uniformsNeedUpdate=!1),de.isSpriteMaterial&&xr.setValue(N,"center",te.center),xr.setValue(N,"modelViewMatrix",te.modelViewMatrix),xr.setValue(N,"normalMatrix",te.normalMatrix),xr.setValue(N,"modelMatrix",te.matrixWorld),de.isShaderMaterial||de.isRawShaderMaterial){const za=de.uniformsGroups;for(let KO=0,Ove=za.length;KO{function je(){de.forEach(function(st){it.get(st).currentProgram.isReady()&&de.delete(st)}),0!==de.size?setTimeout(je,10):te(L)}null!==Le.get("KHR_parallel_shader_compile")?je():setTimeout(je,10)})};let ui=null;function fc(){kf.stop()}function h8(){kf.start()}const kf=new t5;function YO(L,K,le,de){if(!1===L.visible)return;if(L.layers.test(K.layers))if(L.isGroup)le=L.renderOrder;else if(L.isLOD)!0===L.autoUpdate&&L.update(K);else if(L.isLight)v.pushLight(L),L.castShadow&&v.pushShadow(L);else if(L.isSprite){if(!L.frustumCulled||en.intersectsSprite(L)){de&&bt.setFromMatrixPosition(L.matrixWorld).applyMatrix4(Ze);const st=Te.update(L),xt=L.material;xt.visible&&b.push(L,st,xt,le,bt.z,null)}}else if((L.isMesh||L.isLine||L.isPoints)&&(!L.frustumCulled||en.intersectsObject(L))){const st=Te.update(L),xt=L.material;if(de&&(void 0!==L.boundingSphere?(null===L.boundingSphere&&L.computeBoundingSphere(),bt.copy(L.boundingSphere.center)):(null===st.boundingSphere&&st.computeBoundingSphere(),bt.copy(st.boundingSphere.center)),bt.applyMatrix4(L.matrixWorld).applyMatrix4(Ze)),Array.isArray(xt)){const wt=st.groups;for(let qt=0,on=wt.length;qt0&&bE(te,K,le),je.length>0&&bE(je,K,le),st.length>0&&bE(st,K,le),Me.buffers.depth.setTest(!0),Me.buffers.depth.setMask(!0),Me.buffers.color.setMask(!0),Me.setPolygonOffset(!1)}function p8(L,K,le,de){if(null!==(!0===le.isScene?le.overrideMaterial:null))return;void 0===v.state.transmissionRenderTarget[de.id]&&(v.state.transmissionRenderTarget[de.id]=new Mu(1,1,{generateMipmaps:!0,type:Le.has("EXT_color_buffer_half_float")||Le.has("EXT_color_buffer_float")?Jm:Jc,minFilter:bl,samples:4,stencilBuffer:s,resolveDepthBuffer:!1,resolveStencilBuffer:!1,colorSpace:Jn.workingColorSpace}));const je=v.state.transmissionRenderTarget[de.id],st=de.viewport||A;je.setSize(st.z,st.w);const xt=x.getRenderTarget();x.setRenderTarget(je),x.getClearColor(ne),se=x.getClearAlpha(),se<1&&x.setClearColor(16777215,.5),x.clear(),Mt&&dt.render(le);const wt=x.toneMapping;x.toneMapping=bu;const qt=de.viewport;if(void 0!==de.viewport&&(de.viewport=void 0),v.setupLightsView(de),!0===ae&&bn.setGlobalState(x.clippingPlanes,de),bE(L,le,de),pt.updateMultisampleRenderTarget(je),pt.updateRenderTargetMipmap(je),!1===Le.has("WEBGL_multisampled_render_to_texture")){let on=!1;for(let Xt=0,ai=K.length;Xt0)for(let st=0,xt=je.length;st0&&p8(de,te,L,K),Mt&&dt.render(L),f8(b,L,K);null!==k&&(pt.updateMultisampleRenderTarget(k),pt.updateRenderTargetMipmap(k)),!0===L.isScene&&L.onAfterRender(x,L,K),Pn.resetDefaultState(),B=-1,T=null,M.pop(),M.length>0?(v=M[M.length-1],!0===ae&&bn.setGlobalState(x.clippingPlanes,v.state.camera)):v=null,y.pop(),b=y.length>0?y[y.length-1]:null},this.getActiveCubeFace=function(){return F},this.getActiveMipmapLevel=function(){return D},this.getRenderTarget=function(){return k},this.setRenderTargetTextures=function(L,K,le){it.get(L.texture).__webglTexture=K,it.get(L.depthTexture).__webglTexture=le;const de=it.get(L);de.__hasExternalTextures=!0,de.__autoAllocateDepthBuffer=void 0===le,de.__autoAllocateDepthBuffer||!0===Le.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(L,K){const le=it.get(L);le.__webglFramebuffer=K,le.__useDefaultFramebuffer=void 0===K},this.setRenderTarget=function(L,K=0,le=0){k=L,F=K,D=le;let de=!0,te=null,je=!1,st=!1;if(L){const wt=it.get(L);void 0!==wt.__useDefaultFramebuffer?(Me.bindFramebuffer(N.FRAMEBUFFER,null),de=!1):void 0===wt.__webglFramebuffer?pt.setupRenderTarget(L):wt.__hasExternalTextures&&pt.rebindTextures(L,it.get(L.texture).__webglTexture,it.get(L.depthTexture).__webglTexture);const qt=L.texture;(qt.isData3DTexture||qt.isDataArrayTexture||qt.isCompressedArrayTexture)&&(st=!0);const on=it.get(L).__webglFramebuffer;L.isWebGLCubeRenderTarget?(te=Array.isArray(on[K])?on[K][le]:on[K],je=!0):te=L.samples>0&&!1===pt.useMultisampledRTT(L)?it.get(L).__webglMultisampledFramebuffer:Array.isArray(on)?on[le]:on,A.copy(L.viewport),$.copy(L.scissor),ie=L.scissorTest}else A.copy(Ne).multiplyScalar(re).floor(),$.copy(Ye).multiplyScalar(re).floor(),ie=It;if(Me.bindFramebuffer(N.FRAMEBUFFER,te)&&de&&Me.drawBuffers(L,te),Me.viewport(A),Me.scissor($),Me.setScissorTest(ie),je){const wt=it.get(L.texture);N.framebufferTexture2D(N.FRAMEBUFFER,N.COLOR_ATTACHMENT0,N.TEXTURE_CUBE_MAP_POSITIVE_X+K,wt.__webglTexture,le)}else if(st){const wt=it.get(L.texture);N.framebufferTextureLayer(N.FRAMEBUFFER,N.COLOR_ATTACHMENT0,wt.__webglTexture,le||0,K||0)}B=-1},this.readRenderTargetPixels=function(L,K,le,de,te,je,st){if(!L||!L.isWebGLRenderTarget)return void console.error("THREE.WebGLRenderer.readRenderTargetPixels: renderTarget is not THREE.WebGLRenderTarget.");let xt=it.get(L).__webglFramebuffer;if(L.isWebGLCubeRenderTarget&&void 0!==st&&(xt=xt[st]),xt){Me.bindFramebuffer(N.FRAMEBUFFER,xt);try{const wt=L.texture,qt=wt.format,on=wt.type;if(!nt.textureFormatReadable(qt))return void console.error("THREE.WebGLRenderer.readRenderTargetPixels: renderTarget is not in RGBA or implementation defined format.");if(!nt.textureTypeReadable(on))return void console.error("THREE.WebGLRenderer.readRenderTargetPixels: renderTarget is not in UnsignedByteType or implementation defined type.");K>=0&&K<=L.width-de&&le>=0&&le<=L.height-te&&N.readPixels(K,le,de,te,vn.convert(qt),vn.convert(on),je)}finally{const wt=null!==k?it.get(k).__webglFramebuffer:null;Me.bindFramebuffer(N.FRAMEBUFFER,wt)}}},this.readRenderTargetPixelsAsync=function(){var L=tt(function*(K,le,de,te,je,st,xt){if(!K||!K.isWebGLRenderTarget)throw new Error("THREE.WebGLRenderer.readRenderTargetPixels: renderTarget is not THREE.WebGLRenderTarget.");let wt=it.get(K).__webglFramebuffer;if(K.isWebGLCubeRenderTarget&&void 0!==xt&&(wt=wt[xt]),wt){Me.bindFramebuffer(N.FRAMEBUFFER,wt);try{const qt=K.texture,on=qt.format,Xt=qt.type;if(!nt.textureFormatReadable(on))throw new Error("THREE.WebGLRenderer.readRenderTargetPixelsAsync: renderTarget is not in RGBA or implementation defined format.");if(!nt.textureTypeReadable(Xt))throw new Error("THREE.WebGLRenderer.readRenderTargetPixelsAsync: renderTarget is not in UnsignedByteType or implementation defined type.");if(le>=0&&le<=K.width-te&&de>=0&&de<=K.height-je){const ai=N.createBuffer();N.bindBuffer(N.PIXEL_PACK_BUFFER,ai),N.bufferData(N.PIXEL_PACK_BUFFER,st.byteLength,N.STREAM_READ),N.readPixels(le,de,te,je,vn.convert(on),vn.convert(Xt),0),N.flush();const Li=N.fenceSync(N.SYNC_GPU_COMMANDS_COMPLETE,0);yield function Joe(i,t,e){return new Promise(function(n,r){setTimeout(function s(){switch(i.clientWaitSync(t,i.SYNC_FLUSH_COMMANDS_BIT,0)){case i.WAIT_FAILED:r();break;case i.TIMEOUT_EXPIRED:setTimeout(s,e);break;default:n()}},e)})}(N,Li,4);try{N.bindBuffer(N.PIXEL_PACK_BUFFER,ai),N.getBufferSubData(N.PIXEL_PACK_BUFFER,0,st)}finally{N.deleteBuffer(ai),N.deleteSync(Li)}return st}}finally{const qt=null!==k?it.get(k).__webglFramebuffer:null;Me.bindFramebuffer(N.FRAMEBUFFER,qt)}}});return function(K,le,de,te,je,st,xt){return L.apply(this,arguments)}}(),this.copyFramebufferToTexture=function(L,K=null,le=0){!0!==L.isTexture&&(cg("WebGLRenderer: copyFramebufferToTexture function signature has changed."),K=arguments[0]||null,L=arguments[1]);const de=Math.pow(2,-le),te=Math.floor(L.image.width*de),je=Math.floor(L.image.height*de),st=null!==K?K.x:0,xt=null!==K?K.y:0;pt.setTexture2D(L,0),N.copyTexSubImage2D(N.TEXTURE_2D,le,0,0,st,xt,te,je),Me.unbindTexture()},this.copyTextureToTexture=function(L,K,le=null,de=null,te=0){let je,st,xt,wt,qt,on;!0!==L.isTexture&&(cg("WebGLRenderer: copyTextureToTexture function signature has changed."),de=arguments[0]||null,L=arguments[1],K=arguments[2],te=arguments[3]||0,le=null),null!==le?(je=le.max.x-le.min.x,st=le.max.y-le.min.y,xt=le.min.x,wt=le.min.y):(je=L.image.width,st=L.image.height,xt=0,wt=0),null!==de?(qt=de.x,on=de.y):(qt=0,on=0);const Xt=vn.convert(K.format),ai=vn.convert(K.type);pt.setTexture2D(K,0),N.pixelStorei(N.UNPACK_FLIP_Y_WEBGL,K.flipY),N.pixelStorei(N.UNPACK_PREMULTIPLY_ALPHA_WEBGL,K.premultiplyAlpha),N.pixelStorei(N.UNPACK_ALIGNMENT,K.unpackAlignment);const Li=N.getParameter(N.UNPACK_ROW_LENGTH),nr=N.getParameter(N.UNPACK_IMAGE_HEIGHT),oa=N.getParameter(N.UNPACK_SKIP_PIXELS),hi=N.getParameter(N.UNPACK_SKIP_ROWS),Rt=N.getParameter(N.UNPACK_SKIP_IMAGES),fs=L.isCompressedTexture?L.mipmaps[te]:L.image;N.pixelStorei(N.UNPACK_ROW_LENGTH,fs.width),N.pixelStorei(N.UNPACK_IMAGE_HEIGHT,fs.height),N.pixelStorei(N.UNPACK_SKIP_PIXELS,xt),N.pixelStorei(N.UNPACK_SKIP_ROWS,wt),L.isDataTexture?N.texSubImage2D(N.TEXTURE_2D,te,qt,on,je,st,Xt,ai,fs.data):L.isCompressedTexture?N.compressedTexSubImage2D(N.TEXTURE_2D,te,qt,on,fs.width,fs.height,Xt,fs.data):N.texSubImage2D(N.TEXTURE_2D,te,qt,on,je,st,Xt,ai,fs),N.pixelStorei(N.UNPACK_ROW_LENGTH,Li),N.pixelStorei(N.UNPACK_IMAGE_HEIGHT,nr),N.pixelStorei(N.UNPACK_SKIP_PIXELS,oa),N.pixelStorei(N.UNPACK_SKIP_ROWS,hi),N.pixelStorei(N.UNPACK_SKIP_IMAGES,Rt),0===te&&K.generateMipmaps&&N.generateMipmap(N.TEXTURE_2D),Me.unbindTexture()},this.copyTextureToTexture3D=function(L,K,le=null,de=null,te=0){let je,st,xt,wt,qt,on,Xt,ai,Li;!0!==L.isTexture&&(cg("WebGLRenderer: copyTextureToTexture3D function signature has changed."),le=arguments[0]||null,de=arguments[1]||null,L=arguments[2],K=arguments[3],te=arguments[4]||0);const nr=L.isCompressedTexture?L.mipmaps[te]:L.image;null!==le?(je=le.max.x-le.min.x,st=le.max.y-le.min.y,xt=le.max.z-le.min.z,wt=le.min.x,qt=le.min.y,on=le.min.z):(je=nr.width,st=nr.height,xt=nr.depth,wt=0,qt=0,on=0),null!==de?(Xt=de.x,ai=de.y,Li=de.z):(Xt=0,ai=0,Li=0);const oa=vn.convert(K.format),hi=vn.convert(K.type);let Rt;if(K.isData3DTexture)pt.setTexture3D(K,0),Rt=N.TEXTURE_3D;else{if(!K.isDataArrayTexture&&!K.isCompressedArrayTexture)return void console.warn("THREE.WebGLRenderer.copyTextureToTexture3D: only supports THREE.DataTexture3D and THREE.DataTexture2DArray.");pt.setTexture2DArray(K,0),Rt=N.TEXTURE_2D_ARRAY}N.pixelStorei(N.UNPACK_FLIP_Y_WEBGL,K.flipY),N.pixelStorei(N.UNPACK_PREMULTIPLY_ALPHA_WEBGL,K.premultiplyAlpha),N.pixelStorei(N.UNPACK_ALIGNMENT,K.unpackAlignment);const fs=N.getParameter(N.UNPACK_ROW_LENGTH),fi=N.getParameter(N.UNPACK_IMAGE_HEIGHT),El=N.getParameter(N.UNPACK_SKIP_PIXELS),qg=N.getParameter(N.UNPACK_SKIP_ROWS),aa=N.getParameter(N.UNPACK_SKIP_IMAGES);N.pixelStorei(N.UNPACK_ROW_LENGTH,nr.width),N.pixelStorei(N.UNPACK_IMAGE_HEIGHT,nr.height),N.pixelStorei(N.UNPACK_SKIP_PIXELS,wt),N.pixelStorei(N.UNPACK_SKIP_ROWS,qt),N.pixelStorei(N.UNPACK_SKIP_IMAGES,on),L.isDataTexture||L.isData3DTexture?N.texSubImage3D(Rt,te,Xt,ai,Li,je,st,xt,oa,hi,nr.data):K.isCompressedArrayTexture?N.compressedTexSubImage3D(Rt,te,Xt,ai,Li,je,st,xt,oa,nr.data):N.texSubImage3D(Rt,te,Xt,ai,Li,je,st,xt,oa,hi,nr),N.pixelStorei(N.UNPACK_ROW_LENGTH,fs),N.pixelStorei(N.UNPACK_IMAGE_HEIGHT,fi),N.pixelStorei(N.UNPACK_SKIP_PIXELS,El),N.pixelStorei(N.UNPACK_SKIP_ROWS,qg),N.pixelStorei(N.UNPACK_SKIP_IMAGES,aa),0===te&&K.generateMipmaps&&N.generateMipmap(Rt),Me.unbindTexture()},this.initRenderTarget=function(L){void 0===it.get(L).__webglFramebuffer&&pt.setupRenderTarget(L)},this.initTexture=function(L){L.isCubeTexture?pt.setTextureCube(L,0):L.isData3DTexture?pt.setTexture3D(L,0):L.isDataArrayTexture||L.isCompressedArrayTexture?pt.setTexture2DArray(L,0):pt.setTexture2D(L,0),Me.unbindTexture()},this.resetState=function(){F=0,D=0,k=null,Me.reset(),Pn.reset()},typeof __THREE_DEVTOOLS__<"u"&&__THREE_DEVTOOLS__.dispatchEvent(new CustomEvent("observe",{detail:this}))}get coordinateSystem(){return ed}get outputColorSpace(){return this._outputColorSpace}set outputColorSpace(t){this._outputColorSpace=t;const e=this.getContext();e.drawingBufferColorSpace=t===jk?"display-p3":"srgb",e.unpackColorSpace=Jn.workingColorSpace===LC?"display-p3":"srgb"}}class kb extends Or{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 id,this.environmentIntensity=1,this.environmentRotation=new id,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 AP{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=Jo()}onUploadCallback(){}set needsUpdate(t){!0===t&&this.version++}get updateRange(){return cg("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;r0){const r=e[n[0]];if(void 0!==r){this.morphTargetInfluences=[],this.morphTargetDictionary={};for(let s=0,o=r.length;sn)return;FP.applyMatrix4(i.matrixWorld);const l=t.ray.origin.distanceTo(FP);return lt.far?void 0:{distance:l,point:Z5.clone().applyMatrix4(i.matrixWorld),index:r,face:null,faceIndex:null,object:i}}const Q5=new O,J5=new O;class Ng extends pf{constructor(t,e){super(t,e),this.isLineSegments=!0,this.type="LineSegments"}computeLineDistances(){const t=this.geometry;if(null===t.index){const e=t.attributes.position,n=[];for(let r=0,s=e.count;r0){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 dc{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 d=n[r];return(r+(o-d)/(n[r+1]-d))/(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 xe:new O);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 O,r=[],s=[],o=[],a=new O,l=new Nt;for(let m=0;m<=t;m++)r[m]=this.getTangentAt(m/t,new O);s[0]=new O,o[0]=new O;let c=Number.MAX_VALUE;const d=Math.abs(r[0].x),h=Math.abs(r[0].y),p=Math.abs(r[0].z);d<=c&&(c=d,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(er(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(er(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 NP extends dc{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 xe){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(iG(a,l.x,c.x,d.x,h.x),iG(a,l.y,c.y,d.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]:(DS.subVectors(r[0],r[1]).add(r[0]),c=DS);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 d=c.getPoint(1);return this.currentPoint.copy(d),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 RS extends hn{constructor(t=[new xe(0,-.5),new xe(.5,0),new xe(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=er(r,0,2*Math.PI);const s=[],o=[],a=[],l=[],c=[],d=1/e,h=new O,p=new xe,m=new O,g=new O,b=new O;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*d*r,C=Math.sin(x),F=Math.cos(x);for(let D=0;D<=t.length-1;D++)h.x=t[D].x*C,h.y=t[D].y,h.z=t[D].x*F,o.push(h.x,h.y,h.z),p.x=M/e,p.y=D/(t.length-1),a.push(p.x,p.y),c.push(l[3*D+0]*C,l[3*D+1],l[3*D+0]*F)}for(let M=0;M0&&x(!0),e>0&&x(!1)),this.setIndex(d),this.setAttribute("position",new ct(h,3)),this.setAttribute("normal",new ct(p,3)),this.setAttribute("uv",new ct(m,2))}copy(t){return super.copy(t),this.parameters=Object.assign({},t.parameters),this}static fromJSON(t){return new Bg(t.radiusTop,t.radiusBottom,t.height,t.radialSegments,t.heightSegments,t.openEnded,t.thetaStart,t.thetaLength)}}class PS extends Bg{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 PS(t.radius,t.height,t.radialSegments,t.heightSegments,t.openEnded,t.thetaStart,t.thetaLength)}}class jb 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 d=[],h=new O,p=new O,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 F=0;F<=e;F++){const D=F/e;h.x=-t*Math.cos(r+D*s)*Math.sin(o+x*a),h.y=t*Math.cos(o+x*a),h.z=t*Math.sin(r+D*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(D+C,1-x),M.push(c++)}d.push(M)}for(let y=0;y0)&&m.push(d[y][M+1],C,D),(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 dispersion(){return this._dispersion}set dispersion(t){this._dispersion>0!=t>0&&this.version++,this._dispersion=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.dispersion=t.dispersion,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 zS extends Po{constructor(t){super(),this.isMeshPhongMaterial=!0,this.type="MeshPhongMaterial",this.color=new qe(16777215),this.specular=new qe(1118481),this.shininess=30,this.map=null,this.lightMap=null,this.lightMapIntensity=1,this.aoMap=null,this.aoMapIntensity=1,this.emissive=new qe(0),this.emissiveIntensity=1,this.emissiveMap=null,this.bumpMap=null,this.bumpScale=1,this.normalMap=null,this.normalMapType=Qh,this.normalScale=new xe(1,1),this.displacementMap=null,this.displacementScale=1,this.displacementBias=0,this.specularMap=null,this.alphaMap=null,this.envMap=null,this.envMapRotation=new id,this.combine=EC,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 vf(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 vG(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 tO(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 nO(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 qb{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 _G(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}}uc.prototype.TimeBufferType=Float32Array,uc.prototype.ValueBufferType=Float32Array,uc.prototype.DefaultInterpolation=bb;class zg extends uc{constructor(t,e,n){super(t,e,n)}}zg.prototype.ValueTypeName="bool",zg.prototype.ValueBufferType=Array,zg.prototype.DefaultInterpolation=yb,zg.prototype.InterpolantFactoryMethodLinear=void 0,zg.prototype.InterpolantFactoryMethodSmooth=void 0;class bG extends uc{}bG.prototype.ValueTypeName="color";class Hg extends uc{}Hg.prototype.ValueTypeName="number";class Ohe extends qb{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 d=c+a;c!==d;c+=4)co.slerpFlat(s,0,o,c-a,o,c,l);return s}}class Gg extends uc{InterpolantFactoryMethodLinear(t){return new Ohe(this.times,this.values,this.getValueSize(),t)}}Gg.prototype.ValueTypeName="quaternion",Gg.prototype.InterpolantFactoryMethodSmooth=void 0;class $g extends uc{constructor(t,e,n){super(t,e,n)}}$g.prototype.ValueTypeName="string",$g.prototype.ValueBufferType=Array,$g.prototype.DefaultInterpolation=yb,$g.prototype.InterpolantFactoryMethodLinear=void 0,$g.prototype.InterpolantFactoryMethodSmooth=void 0;class Wg extends uc{}Wg.prototype.ValueTypeName="vector";class Xb{constructor(t="",e=-1,n=[],r=2500){this.name=t,this.tracks=n,this.duration=e,this.blendMode=r,this.uuid=Jo(),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(Lhe(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(uc.toJSON(n[s]));return r}static CreateFromMorphTargetSequence(t,e,n,r){const s=e.length,o=[];for(let a=0;a1){const h=d[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=[];nO(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:wG,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 dd={};class Nhe extends Error{constructor(t,e){super(t),this.response=e}}class La extends yf{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=ku.get(t);if(void 0!==s)return this.manager.itemStart(t),setTimeout(()=>{e&&e(s),this.manager.itemEnd(t)},0),s;if(void 0!==dd[t])return void dd[t].push({onLoad:e,onProgress:n,onError:r});dd[t]=[],dd[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 d=dd[t],h=c.body.getReader(),p=c.headers.get("X-File-Size")||c.headers.get("Content-Length"),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 F=new ProgressEvent("progress",{lengthComputable:g,loaded:b,total:m});for(let D=0,k=d.length;D{y.error(x)})}()}});return new Response(v)}throw new Nhe(`fetch for "${c.url}" responded with ${c.status}: ${c.statusText}`,c)}).then(c=>{switch(l){case"arraybuffer":return c.arrayBuffer();case"blob":return c.blob();case"document":return c.text().then(d=>(new DOMParser).parseFromString(d,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=>{ku.add(t,c);const d=dd[t];delete dd[t];for(let h=0,p=d.length;h{const d=dd[t];if(void 0===d)throw this.manager.itemError(t),c;delete dd[t];for(let h=0,p=d.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 HS extends yf{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=ku.get(t);if(void 0!==o)return s.manager.itemStart(t),setTimeout(function(){e&&e(o),s.manager.itemEnd(t)},0),o;const a=wb("img");function l(){d(),ku.add(t,this),e&&e(this),s.manager.itemEnd(t)}function c(h){d(),r&&r(h),s.manager.itemError(t),s.manager.itemEnd(t)}function d(){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 Pu extends yf{constructor(t){super(t)}load(t,e,n,r){const s=new ko,o=new HS(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 GS extends Or{constructor(t,e=1){super(),this.isLight=!0,this.type="Light",this.color=new qe(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()),void 0!==this.target&&(e.object.target=this.target.uuid),e}}const iO=new Nt,MG=new O,CG=new O;class rO{constructor(t){this.camera=t,this.intensity=1,this.bias=0,this.normalBias=0,this.radius=1,this.blurSamples=8,this.mapSize=new xe(512,512),this.map=null,this.mapPass=null,this.matrix=new Nt,this.autoUpdate=!0,this.needsUpdate=!1,this._frustum=new aS,this._frameExtents=new xe(1,1),this._viewportCount=1,this._viewports=[new gi(0,0,1,1)]}getViewportCount(){return this._viewportCount}getFrustum(){return this._frustum}updateMatrices(t){const e=this.camera,n=this.matrix;MG.setFromMatrixPosition(t.matrixWorld),e.position.copy(MG),CG.setFromMatrixPosition(t.target.matrixWorld),e.lookAt(CG),e.updateMatrixWorld(),iO.multiplyMatrices(e.projectionMatrix,e.matrixWorldInverse),this._frustum.setFromProjectionMatrix(iO),n.set(.5,0,0,.5,0,.5,0,.5,0,0,.5,.5,0,0,0,1),n.multiply(iO)}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.intensity=t.intensity,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 1!==this.intensity&&(t.intensity=this.intensity),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 Uhe extends rO{constructor(){super(new yr(50,1,.5,500)),this.isSpotLightShadow=!0,this.focus=1}updateMatrices(t){const e=this.camera,n=2*ag*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 SG extends GS{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(Or.DEFAULT_UP),this.updateMatrix(),this.target=new Or,this.distance=n,this.angle=r,this.penumbra=s,this.decay=o,this.map=null,this.shadow=new Uhe}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 EG=new Nt,Kb=new O,sO=new O;class Vhe extends rO{constructor(){super(new yr(90,1,.5,500)),this.isPointLightShadow=!0,this._frameExtents=new xe(4,2),this._viewportCount=6,this._viewports=[new gi(2,1,1,1),new gi(0,1,1,1),new gi(3,1,1,1),new gi(1,1,1,1),new gi(3,0,1,1),new gi(1,0,1,1)],this._cubeDirections=[new O(1,0,0),new O(-1,0,0),new O(0,0,1),new O(0,0,-1),new O(0,1,0),new O(0,-1,0)],this._cubeUps=[new O(0,1,0),new O(0,1,0),new O(0,1,0),new O(0,1,0),new O(0,0,1),new O(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()),Kb.setFromMatrixPosition(t.matrixWorld),n.position.copy(Kb),sO.copy(n.position),sO.add(this._cubeDirections[e]),n.up.copy(this._cubeUps[e]),n.lookAt(sO),n.updateMatrixWorld(),r.makeTranslation(-Kb.x,-Kb.y,-Kb.z),EG.multiplyMatrices(n.projectionMatrix,n.matrixWorldInverse),this._frustum.setFromProjectionMatrix(EG)}}class AG extends GS{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 Vhe}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 zhe extends rO{constructor(){super(new Ib(-5,5,5,-5,.5,500)),this.isDirectionalLightShadow=!0}}class DG extends GS{constructor(t,e){super(t,e),this.isDirectionalLight=!0,this.type="DirectionalLight",this.position.copy(Or.DEFAULT_UP),this.updateMatrix(),this.target=new Or,this.shadow=new zhe}dispose(){this.shadow.dispose()}copy(t){return super.copy(t),this.target=t.target.clone(),this.shadow=t.shadow.clone(),this}}class $S extends GS{constructor(t,e){super(t,e),this.isAmbientLight=!0,this.type="AmbientLight"}}class Ou{static decodeText(t){if(console.warn("THREE.LoaderUtils: decodeText() has been deprecated with r165 and will be removed with r175. Use TextDecoder instead."),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=ku.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 ku.add(t,c),e&&e(c),s.manager.itemEnd(t),c}).catch(function(c){r&&r(c),ku.remove(t),s.manager.itemError(t),s.manager.itemEnd(t)});ku.add(t,l),s.manager.itemStart(t)}}class OG{constructor(t=!0){this.autoStart=t,this.startTime=0,this.oldTime=0,this.elapsedTime=0,this.running=!1}start(){this.startTime=FG(),this.oldTime=this.startTime,this.elapsedTime=0,this.running=!0}stop(){this.getElapsedTime(),this.running=!1,this.autoStart=!1}getElapsedTime(){return this.getDelta(),this.elapsedTime}getDelta(){let t=0;if(this.autoStart&&!this.running)return this.start(),0;if(this.running){const e=FG();t=(e-this.oldTime)/1e3,this.oldTime=e,this.elapsedTime+=t}return t}}function FG(){return(typeof performance>"u"?Date:performance).now()}const aO="\\[\\]\\.:\\/",Qhe=new RegExp("["+aO+"]","g"),lO="[^"+aO+"]",Jhe="[^"+aO.replace("\\.","")+"]",rfe=new RegExp("^"+/((?:WC+[\/:])*)/.source.replace("WC",lO)+/(WCOD+)?/.source.replace("WCOD",Jhe)+/(?:\.(WC+)(?:\[(.+)\])?)?/.source.replace("WC",lO)+/\.(WC+)(?:\[(.+)\])?/.source.replace("WC",lO)+"$"),sfe=["material","materials","bones","map"];class ofe{constructor(t,e,n){const r=n||Ri.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 Ri=(()=>{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(Qhe,"")}static parseTrackName(e){const n=rfe.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!==sfe.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;an.name===t||n.userData.name===t);return e?(e.removeFromParent(),new na(e)):null}getBoundings(){return(new Bs).setFromObject(this.nativeMesh)}clone(){return new na(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 Mn&&this.disposeMesh(t)}),this.nativeMesh instanceof Mn&&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 ufe extends na{get supportsFov(){return this.nativeCamera instanceof yr||"PerspectiveCamera"==this.nativeCamera.type}get fov(){return this.nativeCamera.fov||NaN}set fov(t){this.supportsFov&&(this.nativeCamera.fov=t,this.nativeCamera.updateProjectionMatrix())}constructor(t){super(t),this.nativeCamera=t}}class hfe extends Pse{createMaterial(t){let e={};t.color?e={color:t.color}:t.diffuse||(e={color:super.randomColor()});let n=t.shading||"unlit";switch(n){case"unlit":return new qi(Object.assign(Object.assign({},e),{map:t.diffuse||null}));case"standart":return new Yb(Object.assign(Object.assign({},e),{map:t.diffuse||null}));case"phong":return new zS(Object.assign(Object.assign({},e),{map:t.diffuse||null}));case"wireframe":return new qi(Object.assign(Object.assign({},e),{wireframe:!0}));default:throw new Error(`"${n}" shading not implemented for three.js`)}}transformPrimitiveZUp(t){t.geometry.rotateX(Math.PI/2)}createPrimitive(t,e={}){var n,r,s,o;let a=null,l=this.createMaterial(e);switch(t.shape){case"PLANE":a=new Mn(new Iu((null===(n=t.dimensions)||void 0===n?void 0:n.x)||1e4,(null===(r=t.dimensions)||void 0===r?void 0:r.y)||1e4,null===(s=t.segments)||void 0===s?void 0:s.x,null===(o=t.segments)||void 0===o?void 0:o.y),l);break;case"BOX":a=new Mn(new rf(...Pe.spr(t.dimensions),...t.segments?Pe.spr(t.segments):[]),l);break;case"CAPSULE":a=new Mn(new kS(t.radius,t.centersDistance,t.capSegments,t.radialSegments),l),this.transformPrimitiveZUp(a);break;case"CYLINDER":a=new Mn(new Bg(t.radius,t.radius,t.height,t.radialSegments,t.heightSegments),l),this.transformPrimitiveZUp(a);break;case"CONE":a=new Mn(new PS(t.radius,t.height,t.radialSegments,t.heightSegments),l),this.transformPrimitiveZUp(a);break;case"SPHERE":a=new Mn(new jb(t.radius,t.widthSegments,t.heightSegments),l),this.transformPrimitiveZUp(a);break;case"COMPOUND":a=new Fo;for(const{position:d,rotation:h,shape:p}of t.children){const m=this.createPrimitive(p,e).nativeMesh;d&&m.position.set(...Pe.spr(d)),h&&m.quaternion.set(...Yi.spr(h)),a.add(m)}break;case"MESH":const c=new hn;c.setFromPoints(t.vertices.map(d=>new O(...Pe.spr(d)))),c.setIndex(t.faces.reduce((d,h)=>(d.push(...h),d),[])),a=new Mn(c,l)}if(!a)throw new Error(`Primitive with shape "${t.shape}" not implemented`);return void 0!==e.castShadow&&(a.castShadow=e.castShadow),void 0!==e.receiveShadow&&(a.receiveShadow=e.receiveShadow),new na(a)}createPerspectiveCamera(t={}){return new ufe(new yr(t.fov||75,t.aspectRatio||1,t.frustrum?t.frustrum.near:1,t.frustrum?t.frustrum.far:1e4))}}function QG(i,t){if(t===Moe)return console.warn("THREE.BufferGeometryUtils.toTrianglesDrawMode(): Geometry already defined as triangles."),i;if(t===Wk||t===C4){let e=i.getIndex();if(null===e){const o=[],a=i.getAttribute("position");if(void 0===a)return console.error("THREE.BufferGeometryUtils.toTrianglesDrawMode(): Undefined position attribute. Processing not possible."),i;for(let l=0;l=2.0 are supported.")));const c=new jfe(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 d=0;d=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 pfe(){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 Bn={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_DISPERSION:"KHR_materials_dispersion",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 mfe{constructor(t){this.parser=t,this.name=Bn.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 Tfe{constructor(t){this.parser=t,this.name=Bn.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 Ife{constructor(t){this.parser=t,this.name=Bn.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 Rfe{constructor(t){this.name=Bn.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 d=r.count,h=r.byteStride,p=new Uint8Array(a,r.byteOffset||0,r.byteLength||0);return o.decodeGltfBufferAsync?o.decodeGltfBufferAsync(d,h,p,r.mode,r.filter).then(function(m){return m.buffer}):o.ready.then(function(){const m=new ArrayBuffer(d*h);return o.decodeGltfBuffer(new Uint8Array(m),d,h,p,r.mode,r.filter),m})})}return null}}class kfe{constructor(t){this.name=Bn.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!==Na.TRIANGLES&&c.mode!==Na.TRIANGLE_STRIP&&c.mode!==Na.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(d=>(l[c]=d,l[c])));return a.length<1?null:(a.push(this.parser.createNodeMesh(t)),Promise.all(a).then(c=>{const d=c.pop(),h=d.isGroup?d.children:[d],p=c[0].count,m=[];for(const g of h){const b=new Nt,v=new O,y=new co,M=new O(1,1,1),x=new Y5(g.geometry,g.material,p);for(let C=0;C-1,o=s?a.match(/Firefox\/([0-9]+)\./)[1]:-1}this.textureLoader=typeof createImageBitmap>"u"||n&&r<17||s&&o<98?new Pu(this.options.manager):new qhe(this.options.manager),this.textureLoader.setCrossOrigin(this.options.crossOrigin),this.textureLoader.setRequestHeader(this.options.requestHeader),this.fileLoader=new La(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 Sf(s,a,r),ud(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,d]of o.children.entries())s(d,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(T,D[k*l+1]),l>=3&&v.setZ(T,D[k*l+2]),l>=4&&v.setW(T,D[k*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(d){d.flipY=!1,d.name=o.name||a.name||"",""===d.name&&"string"==typeof a.uri&&!1===a.uri.startsWith("data:image/")&&(d.name=a.uri);const p=(s.samplers||{})[o.sampler]||{};return d.magFilter=n$[p.magFilter]||lr,d.minFilter=n$[p.minFilter]||bl,d.wrapS=i$[p.wrapS]||Pa,d.wrapT=i$[p.wrapT]||Pa,r.associations.set(d,{textures:t}),d}).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 d=Promise.resolve(l).then(function(h){return new Promise(function(p,m){let g=p;!0===e.isImageBitmapLoader&&(g=function(b){const v=new ko(b);v.needsUpdate=!0,p(v)}),e.load(Ou.resolveURL(h,s.path),g,void 0,m)})}).then(function(h){return!0===c&&a.revokeObjectURL(l),ud(h,o),h.userData.mimeType=o.mimeType||function $fe(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]=d,d}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[Bn.KHR_TEXTURE_TRANSFORM]){const a=void 0!==n.extensions?n.extensions[Bn.KHR_TEXTURE_TRANSFORM]:void 0;if(a){const l=s.associations.get(o);o=s.extensions[Bn.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 mf,Po.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 us,Po.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 Yb}loadMaterial(t){const e=this,r=this.extensions,s=this.json.materials[t];let o;const a={},c=[];if((s.extensions||{})[Bn.KHR_MATERIALS_UNLIT]){const h=r[Bn.KHR_MATERIALS_UNLIT];o=h.getMaterialType(),c.push(h.extendParams(a,s,e))}else{const h=s.pbrMetallicRoughness||{};if(a.color=new qe(1,1,1),a.opacity=1,Array.isArray(h.baseColorFactor)){const p=h.baseColorFactor;a.color.setRGB(p[0],p[1],p[2],ds),a.opacity=p[3]}void 0!==h.baseColorTexture&&c.push(e.assignTexture(a,"map",h.baseColorTexture,cs)),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=Ls);const d=s.alphaMode||"OPAQUE";if("BLEND"===d?(a.transparent=!0,a.depthWrite=!1):(a.transparent=!1,"MASK"===d&&(a.alphaTest=void 0!==s.alphaCutoff?s.alphaCutoff:.5)),void 0!==s.normalTexture&&o!==qi&&(c.push(e.assignTexture(a,"normalMap",s.normalTexture)),a.normalScale=new xe(1,1),void 0!==s.normalTexture.scale)){const h=s.normalTexture.scale;a.normalScale.set(h,h)}if(void 0!==s.occlusionTexture&&o!==qi&&(c.push(e.assignTexture(a,"aoMap",s.occlusionTexture)),void 0!==s.occlusionTexture.strength&&(a.aoMapIntensity=s.occlusionTexture.strength)),void 0!==s.emissiveFactor&&o!==qi){const h=s.emissiveFactor;a.emissive=(new qe).setRGB(h[0],h[1],h[2],ds)}return void 0!==s.emissiveTexture&&o!==qi&&c.push(e.assignTexture(a,"emissiveMap",s.emissiveTexture,cs)),Promise.all(c).then(function(){const h=new o(a);return s.name&&(h.name=s.name),ud(h,s),e.associations.set(h,{materials:t}),s.extensions&&Sf(r,h,s),h})}createUniqueName(t){const e=Ri.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[Bn.KHR_DRACO_MESH_COMPRESSION].decodePrimitive(a,e).then(function(l){return r$(l,a,e)})}const o=[];for(let a=0,l=t.length;a0&&Hfe(y,s),y.name=e.createUniqueName(s.name||"mesh_"+t),ud(y,s),v.extensions&&Sf(r,y,v),e.assignFinalMaterial(y),h.push(y)}for(let m=0,g=h.length;m1?new Fo:1===c.length?c[0]:new Or,d!==c[0])for(let h=0,p=c.length;h{const h=new Map;for(const[p,m]of r.associations)(p instanceof Po||p instanceof ko)&&h.set(p,m);return d.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(Lu[s.path]===Lu.weights?t.traverse(function(p){p.morphTargetInfluences&&l.push(p.name?p.name:p.uuid)}):l.push(a),Lu[s.path]){case Lu.weights:c=Hg;break;case Lu.rotation:c=Gg;break;case Lu.position:case Lu.scale:c=Wg;break;default:c=1===n.itemSize?Hg:Wg}const d=void 0!==r.interpolation?Ufe[r.interpolation]:bb,h=this._getArrayFromAccessor(n);for(let p=0,m=l.length;p{r.type.endsWith("Light")&&(console.warn("WORKAROUND: light intensity from GLB divided by 200."),r.intensity*=.005)}),new na(n.scene)})}}const fo=(i,t)=>Array(i).fill(null).map((e,n)=>t(n));class Ef{static startDebugView(t,e){let n=this.activeDebugViews.get(t);return n?n.renderers.includes(e)||n.renderers.push(e):(n={view:new Ef(t),renderers:[e]},this.activeDebugViews.set(t,n)),n.view}static stopDebugView(t,e){const n=t.world,r=this.activeDebugViews.get(n);r&&(r.renderers=r.renderers.filter(s=>s!==e),0===r.renderers.length&&(r.view.dispose(),this.activeDebugViews.delete(n)))}constructor(t){this.world=t,this.debugScene=null,this.aSub=null,this.rSub=null,this.syncMap=new Map,this.debugScene=new kb;const e=n=>{var r,s;const o=n.debugBodySettings;let c,l=this.lineSegmentPointsForShape(o.shape);c=l?new Ng((new hn).setFromPoints(l)):null===(r=this.world)||void 0===r?void 0:r.visualScene.factory.createPrimitive(o.shape,{shading:"wireframe",color:0}).nativeMesh,this.syncMap.set(n,c),null===(s=this.debugScene)||void 0===s||s.add(c)};for(const n of this.world.physicsWorld.children)e(n);this.aSub=this.world.physicsWorld.added$.subscribe(n=>e(n)),this.rSub=this.world.physicsWorld.removed$.subscribe(n=>{var r;const s=this.syncMap.get(n);s&&(this.syncMap.delete(n),null===(r=this.debugScene)||void 0===r||r.remove(s))})}get scene(){return this.debugScene}render(t,e){for(const[r,s]of this.syncMap.entries()){const o=r.debugBodySettings;if(o.ignoreTransform||(s.position.set(...Pe.spr(r.position)),s.quaternion.set(...Yi.spr(r.rotation))),s.material){let a=16777215;switch(o.type){case"RIGID_DYNAMIC":a=o.sleeping?255:16711680;break;case"RIGID_STATIC":a=65280;break;case"TRIGGER":a=16776960}s.material.color.set(a),s.material.needsUpdate=!0}}const n=t.autoClearColor;n&&(t.autoClearColor=!1),t.render(this.debugScene,e),n&&(t.autoClearColor=!0)}lineSegmentPointsForShape(t){if("BOX"===t.shape){const e=Pe.scalarMult(t.dimensions,.5);return[...fo(8,n=>new O(n<4?e.x:-e.x,n%4<2?e.y:-e.y,n%2?e.z:-e.z)),...fo(8,n=>new O(n%2?e.x:-e.x,n<4?e.y:-e.y,n%4<2?e.z:-e.z)),...fo(8,n=>new O(n%4<2?e.x:-e.x,n%2?e.y:-e.y,n<4?e.z:-e.z))]}if("CYLINDER"===t.shape)return[...fo(32,e=>new O(t.radius*Math.sin(Math.floor((e+1)/2)*Math.PI/8),t.radius*Math.cos(Math.floor((e+1)/2)*Math.PI/8),-t.height/2)),...fo(32,e=>new O(t.radius*Math.sin(Math.floor((e+1)/2)*Math.PI/8),t.radius*Math.cos(Math.floor((e+1)/2)*Math.PI/8),t.height/2)),...fo(8,e=>new O(Math.floor(e/2)%2?0:e<4?t.radius:-t.radius,Math.floor(e/2)%2?e<4?t.radius:-t.radius:0,e%2?t.height/2:-t.height/2)),new O(0,0,-t.height/2),new O(0,0,t.height/2)];if("CONE"===t.shape)return[...fo(32,e=>new O(t.radius*Math.sin(Math.floor((e+1)/2)*Math.PI/8),t.radius*Math.cos(Math.floor((e+1)/2)*Math.PI/8),-t.height/2)),...fo(8,e=>new O(e%2||Math.floor(e/2)%2?0:e<4?t.radius:-t.radius,e%2?0:Math.floor(e/2)%2?e<4?t.radius:-t.radius:0,e%2?t.height/2:-t.height/2)),new O(0,0,-t.height/2),new O(0,0,t.height/2)];if("SPHERE"===t.shape)return[...fo(32,e=>new O(t.radius*Math.sin(Math.floor((e+1)/2)*Math.PI/8),t.radius*Math.cos(Math.floor((e+1)/2)*Math.PI/8),0)),...fo(32,e=>new O(t.radius*Math.sin(Math.floor((e+1)/2)*Math.PI/8),0,t.radius*Math.cos(Math.floor((e+1)/2)*Math.PI/8))),...fo(32,e=>new O(0,t.radius*Math.sin(Math.floor((e+1)/2)*Math.PI/8),t.radius*Math.cos(Math.floor((e+1)/2)*Math.PI/8)))];if("CAPSULE"===t.shape)return[...this.lineSegmentPointsForShape({shape:"CYLINDER",radius:t.radius,height:t.centersDistance}),...fo(16,e=>new O(t.radius*Math.cos(Math.floor((e+1)/2)*Math.PI/8),0,t.radius*Math.sin(Math.floor((e+1)/2)*Math.PI/8)+t.centersDistance/2)),...fo(16,e=>new O(t.radius*Math.cos(Math.floor((e+1)/2)*Math.PI/8),0,-t.radius*Math.sin(Math.floor((e+1)/2)*Math.PI/8)-t.centersDistance/2)),...fo(16,e=>new O(0,t.radius*Math.cos(Math.floor((e+1)/2)*Math.PI/8),t.radius*Math.sin(Math.floor((e+1)/2)*Math.PI/8)+t.centersDistance/2)),...fo(16,e=>new O(0,t.radius*Math.cos(Math.floor((e+1)/2)*Math.PI/8),-t.radius*Math.sin(Math.floor((e+1)/2)*Math.PI/8)-t.centersDistance/2))];if("CONVEX_HULL"===t.shape)return[...t.vertices.map(n=>[new O(n.x-.05,n.y,n.z),new O(n.x+.05,n.y,n.z),new O(n.x,n.y-.05,n.z),new O(n.x,n.y+.05,n.z),new O(n.x,n.y,n.z-.05),new O(n.x,n.y,n.z+.05)]).reduce((n,r)=>(n.push(...r),n),[])];if("COMPOUND"===t.shape){const e=[];for(const{position:n,shape:r,rotation:s}of t.children){let o=this.lineSegmentPointsForShape(r);if(!o)return null;e.push(...o.map(a=>new O(...Pe.spr(Pe.add(n||Pe.O,Pe.rot(a,s||Yi.O))))))}return e}return null}dispose(){var t,e;this.debugScene=null,null===(t=this.aSub)||void 0===t||t.unsubscribe(),null===(e=this.rSub)||void 0===e||e.unsubscribe(),this.syncMap=new Map}}Ef.activeDebugViews=new Map;class s$ extends Sse{get physicsDebugViewActive(){return this._physicsDebugViewActive}set physicsDebugViewActive(t){this._physicsDebugViewActive!=t&&(this._physicsDebugViewActive=t,this.world&&(t?this.debugView=Ef.startDebugView(this.world,this):(Ef.stopDebugView(this.debugView,this),this.debugView=null)))}constructor(t,e,n,r={}){super(t,n,r),this.scene=t,this.camera=e,this.canvas=n,this.world=null,this.debugView=null,this._physicsDebugViewActive=!1,this.nativeRenderer=new Due(Object.assign({canvas:n,alpha:this.rendererOptions.transparent},this.rendererOptions)),this.nativeRenderer.shadowMap.enabled=!0,this.nativeRenderer.setClearColor(this.rendererOptions.background),this.nativeRenderer.shadowMap.type=c4,this.nativeRenderer.setPixelRatio(this.rendererOptions.forceResolution||devicePixelRatio)}addToWorld(t){this.world=t,this.physicsDebugViewActive&&(this.debugView=Ef.startDebugView(this.world,this))}removeFromWorld(t){this.physicsDebugViewActive&&(Ef.stopDebugView(this.debugView,this),this.debugView=null),this.world=null}resizeRenderer(t){this.nativeRenderer.setSize(t.x,t.y),(this.camera.nativeCamera instanceof yr||"PerspectiveCamera"==this.camera.nativeCamera.type)&&Math.abs(this.camera.nativeCamera.aspect-t.x/t.y)>.01&&(this.camera.nativeCamera.aspect=t.x/t.y,this.camera.nativeCamera.updateProjectionMatrix())}render(){this.nativeRenderer.render(this.scene.nativeScene,this.camera.nativeCamera),this.physicsDebugViewActive&&this.debugView.render(this.nativeRenderer,this.camera.nativeCamera)}dispose(){this.camera.dispose(),this.nativeRenderer.clear(),this.nativeRenderer.dispose(),this.nativeRenderer.domElement=null}}const Kfe={name:"CopyShader",uniforms:{tDiffuse:{value:null},opacity:{value:1}},vertexShader:"\n\n\t\tvarying vec2 vUv;\n\n\t\tvoid main() {\n\n\t\t\tvUv = uv;\n\t\t\tgl_Position = projectionMatrix * modelViewMatrix * vec4( position, 1.0 );\n\n\t\t}",fragmentShader:"\n\n\t\tuniform float opacity;\n\n\t\tuniform sampler2D tDiffuse;\n\n\t\tvarying vec2 vUv;\n\n\t\tvoid main() {\n\n\t\t\tvec4 texel = texture2D( tDiffuse, vUv );\n\t\t\tgl_FragColor = opacity * texel;\n\n\n\t\t}"};class QS{constructor(){this.isPass=!0,this.enabled=!0,this.needsSwap=!0,this.clear=!1,this.renderToScreen=!1}setSize(){}render(){console.error("THREE.Pass: .render() must be implemented in derived pass.")}dispose(){}}const Zfe=new Ib(-1,1,1,-1,0,1),Jfe=new class Qfe extends hn{constructor(){super(),this.setAttribute("position",new ct([-1,3,0,-1,-1,0,3,-1,0],3)),this.setAttribute("uv",new ct([0,2,0,0,2,0],2))}};class epe{constructor(t){this._mesh=new Mn(Jfe,t)}dispose(){this._mesh.geometry.dispose()}render(t){t.render(this._mesh,Zfe)}get material(){return this._mesh.material}set material(t){this._mesh.material=t}}class tpe extends QS{constructor(t,e){super(),this.textureID=void 0!==e?e:"tDiffuse",t instanceof Cl?(this.uniforms=t.uniforms,this.material=t):t&&(this.uniforms=Q4.clone(t.uniforms),this.material=new Cl({name:void 0!==t.name?t.name:"unspecified",defines:Object.assign({},t.defines),uniforms:this.uniforms,vertexShader:t.vertexShader,fragmentShader:t.fragmentShader})),this.fsQuad=new epe(this.material)}render(t,e,n){this.uniforms[this.textureID]&&(this.uniforms[this.textureID].value=n.texture),this.fsQuad.material=this.material,this.renderToScreen?(t.setRenderTarget(null),this.fsQuad.render(t)):(t.setRenderTarget(e),this.clear&&t.clear(t.autoClearColor,t.autoClearDepth,t.autoClearStencil),this.fsQuad.render(t))}dispose(){this.material.dispose(),this.fsQuad.dispose()}}class o$ extends QS{constructor(t,e){super(),this.scene=t,this.camera=e,this.clear=!0,this.needsSwap=!1,this.inverse=!1}render(t,e,n){const r=t.getContext(),s=t.state;let o,a;s.buffers.color.setMask(!1),s.buffers.depth.setMask(!1),s.buffers.color.setLocked(!0),s.buffers.depth.setLocked(!0),this.inverse?(o=0,a=1):(o=1,a=0),s.buffers.stencil.setTest(!0),s.buffers.stencil.setOp(r.REPLACE,r.REPLACE,r.REPLACE),s.buffers.stencil.setFunc(r.ALWAYS,o,4294967295),s.buffers.stencil.setClear(a),s.buffers.stencil.setLocked(!0),t.setRenderTarget(n),this.clear&&t.clear(),t.render(this.scene,this.camera),t.setRenderTarget(e),this.clear&&t.clear(),t.render(this.scene,this.camera),s.buffers.color.setLocked(!1),s.buffers.depth.setLocked(!1),s.buffers.color.setMask(!0),s.buffers.depth.setMask(!0),s.buffers.stencil.setLocked(!1),s.buffers.stencil.setFunc(r.EQUAL,1,4294967295),s.buffers.stencil.setOp(r.KEEP,r.KEEP,r.KEEP),s.buffers.stencil.setLocked(!0)}}class npe extends QS{constructor(){super(),this.needsSwap=!1}render(t){t.state.buffers.stencil.setLocked(!1),t.state.buffers.stencil.setTest(!1)}}class ipe{constructor(t,e){if(this.renderer=t,this._pixelRatio=t.getPixelRatio(),void 0===e){const n=t.getSize(new xe);this._width=n.width,this._height=n.height,(e=new Mu(this._width*this._pixelRatio,this._height*this._pixelRatio,{type:Jm})).texture.name="EffectComposer.rt1"}else this._width=e.width,this._height=e.height;this.renderTarget1=e,this.renderTarget2=e.clone(),this.renderTarget2.texture.name="EffectComposer.rt2",this.writeBuffer=this.renderTarget1,this.readBuffer=this.renderTarget2,this.renderToScreen=!0,this.passes=[],this.copyPass=new tpe(Kfe),this.copyPass.material.blending=Qc,this.clock=new OG}swapBuffers(){const t=this.readBuffer;this.readBuffer=this.writeBuffer,this.writeBuffer=t}addPass(t){this.passes.push(t),t.setSize(this._width*this._pixelRatio,this._height*this._pixelRatio)}insertPass(t,e){this.passes.splice(e,0,t),t.setSize(this._width*this._pixelRatio,this._height*this._pixelRatio)}removePass(t){const e=this.passes.indexOf(t);-1!==e&&this.passes.splice(e,1)}isLastEnabledPass(t){for(let e=t+1;e0?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;l$.fromArray(r,t),yO.fromArray(r,e),c$.fromArray(r,n),Ba.subVectors(c$,yO),d$.subVectors(l$,yO),Ba.cross(d$),Ba.normalize(),s.push(Ba.x,Ba.y,Ba.z),s.push(Ba.x,Ba.y,Ba.z),s.push(Ba.x,Ba.y,Ba.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 d=this.vertices.length;let h=this.parseVertexIndex(t,d),p=this.parseVertexIndex(e,d),m=this.parseVertexIndex(n,d);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?(JS.setRGB(parseFloat(h[4]),parseFloat(h[5]),parseFloat(h[6])).convertSRGBToLinear(),e.colors.push(JS.r,JS.g,JS.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"===d){const p=c.slice(1).trim().split(a$),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 Fo;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 ct(d.normals,3)),d.colors.length>0&&(g=!0,b.setAttribute("color",new ct(d.colors,3))),!0===d.hasUVIndices&&b.setAttribute("uv",new ct(d.uvs,2));const v=[];for(let M=0,x=h.length;M1){for(let M=0,x=h.length;M0){const a=new mf({size:1,sizeAttenuation:!1}),l=new hn;l.setAttribute("position",new ct(e.vertices,3)),e.colors.length>0&&void 0!==e.colors[0]&&(l.setAttribute("color",new ct(e.colors,3)),a.vertexColors=!0);const c=new Vb(l,a);s.add(c)}return s}}class bO extends yf{constructor(t){super(t)}load(t,e,n,r){const s=this,o=""===this.path?Ou.extractUrlBase(t):this.path,a=new La(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,d):c;h=h.toLowerCase();let p=d>=0?c.substring(d+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 hpe(this.resourcePath||e,this.materialOptions);return a.setCrossOrigin(this.crossOrigin),a.setManager(this.manager),a.setMaterials(o),a}}class hpe{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:ac,this.wrap=void 0!==this.options.wrap?this.options.wrap:Pa}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),d=e.loadTexture(function s(a,l){return"string"!=typeof l||""===l?"":/^https?:\/\//i.test(l)?l:a+l}(e.baseUrl,c.url));d.repeat.copy(c.scale),d.offset.copy(c.offset),d.wrapS=e.wrap,d.wrapT=e.wrap,("map"===a||"emissiveMap"===a)&&(d.colorSpace=cs),r[a]=d}for(const a in n){const l=n[a];let c;if(""!==l)switch(a.toLowerCase()){case"kd":r.color=(new qe).fromArray(l).convertSRGBToLinear();break;case"ks":r.specular=(new qe).fromArray(l).convertSRGBToLinear();break;case"ke":r.emissive=(new qe).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 zS(r),this.materials[t]}getTextureParams(t,e){const n={scale:new xe(1,1),offset:new xe(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:wG;let a=o.getHandler(t);null===a&&(a=new Pu(o)),a.setCrossOrigin&&a.setCrossOrigin(this.crossOrigin);const l=a.load(t,n,r,s);return void 0!==e&&(l.mapping=e),l}}const fpe=["determinateSpinner"];function ppe(i,t){if(1&i&&(ki(),W(0,"svg",11),De(1,"circle",12),j()),2&i){const e=he();Dt("viewBox",e._viewBox()),G(1),jo("stroke-dasharray",e._strokeCircumference(),"px")("stroke-dashoffset",e._strokeCircumference()/2,"px")("stroke-width",e._circleStrokeWidth(),"%"),Dt("r",e._circleRadius())}}const mpe=Qy(class{constructor(i){this._elementRef=i}},"primary"),gpe=new me("mat-progress-spinner-default-options",{providedIn:"root",factory:function _pe(){return{diameter:u$}}}),u$=100;let Jb=(()=>{class i extends mpe{constructor(e,n,r){super(e),this.mode="mat-spinner"===this._elementRef.nativeElement.nodeName.toLowerCase()?"indeterminate":"determinate",this._value=0,this._diameter=u$,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,ks(e)))}get diameter(){return this._diameter}set diameter(e){this._diameter=ks(e)}get strokeWidth(){return this._strokeWidth??this.diameter/10}set strokeWidth(e){this._strokeWidth=ks(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)(E(mt),E(Rr,8),E(gpe))},i.\u0275cmp=ot({type:i,selectors:[["mat-progress-spinner"],["mat-spinner"]],viewQuery:function(e,n){if(1&e&&Wn(fpe,5),2&e){let r;Et(r=At())&&(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&&(Dt("aria-valuemin",0)("aria-valuemax",100)("aria-valuenow","determinate"===n.mode?n.value:null)("mode",n.mode),jo("width",n.diameter,"px")("height",n.diameter,"px"),un("_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:[lt],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&&(fe(0,ppe,2,8,"ng-template",null,0,Vc),W(2,"div",1,2),ki(),W(4,"svg",3),De(5,"circle",4),j()(),ga(),W(6,"div",5)(7,"div",6)(8,"div",7),sy(9,8),j(),W(10,"div",9),sy(11,8),j(),W(12,"div",10),sy(13,8),j()()()),2&e){const r=Zi(1);G(4),Dt("viewBox",n._viewBox()),G(1),jo("stroke-dasharray",n._strokeCircumference(),"px")("stroke-dashoffset",n._strokeDashOffset(),"px")("stroke-width",n._circleStrokeWidth(),"%"),Dt("r",n._circleRadius()),G(4),U("ngTemplateOutlet",r),G(2),U("ngTemplateOutlet",r),G(2),U("ngTemplateOutlet",r)}},dependencies:[xy],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})(),ype=(()=>{class i{}return i.\u0275fac=function(e){return new(e||i)},i.\u0275mod=nn({type:i}),i.\u0275inj=Kt({imports:[Eo,Qn]}),i})();const bpe=["previewCanvasContainer"],xpe=["previewCanvas"];function wpe(i,t){if(1&i){const e=di();Gr(0),W(1,"label",11),Ve(2),j(),W(3,"input",12),Ue("change",function(r){an(e);const s=he().$implicit;return s.value=r.currentTarget.checked,zt(s.change(s.value))}),j(),$r()}if(2&i){const e=he(),n=e.index,r=e.$implicit,s=he().index;G(1),U("for","custom_control_"+s+"_"+n),G(1),_i(r.label),G(1),U("id","custom_control_"+s+"_"+n)("type",r.type)("checked",r.value)}}function Mpe(i,t){if(1&i){const e=di();W(0,"div",9)(1,"label",11),Ve(2),j(),W(3,"input",14),Ue("change",function(){const s=an(e).$implicit,o=he(2).$implicit;return o.value=s,zt(o.change(o.value))}),j()()}if(2&i){const e=t.$implicit,n=he(2),r=n.index,s=n.$implicit,o=he().index;G(1),U("for","custom_control_"+o+"_"+r+"_"+e),G(1),_i(e),G(1),U("id","custom_control_"+o+"_"+r+"_"+e)("checked",s.value===e)}}function Cpe(i,t){if(1&i&&(W(0,"div",13)(1,"label"),Ve(2),j(),fe(3,Mpe,4,4,"div",8),j()),2&i){const e=he().$implicit;G(2),_i(e.label),G(1),U("ngForOf",e.options)}}function Spe(i,t){if(1&i){const e=di();Gr(0),W(1,"label",11),Ve(2),j(),W(3,"input",15),Ue("colorChange",function(r){an(e);const s=he().$implicit,o=he(2);return s.value=o.toRGB(r.value),zt(s.change(s.value))}),j(),De(4,"ngx-mat-color-toggle",16)(5,"ngx-mat-color-picker",null,17),$r()}if(2&i){const e=Zi(6),n=he(),r=n.index,s=n.$implicit,o=he().index;G(1),U("for","custom_control_"+o+"_"+r),G(1),_i(s.label),G(1),U("ngxMatColorPicker",e),G(1),U("for",e)}}function Epe(i,t){if(1&i){const e=di();Gr(0),W(1,"label",11),Ve(2),j(),W(3,"input",18),Ue("change",function(r){an(e);const s=he().$implicit;return s.value=r.currentTarget.value,zt(s.change(s.value))}),j(),$r()}if(2&i){const e=he(),n=e.index,r=e.$implicit,s=he().index;G(1),U("for","custom_control_"+s+"_"+n),G(1),_i(r.label),G(1),U("id","custom_control_"+s+"_"+n)("min",r.minValue)("max",r.maxValue)("step",r.valueStep)("value",r.value)}}function Ape(i,t){if(1&i&&(W(0,"div",9),fe(1,wpe,4,5,"ng-container",6),fe(2,Cpe,4,2,"div",10),fe(3,Spe,7,4,"ng-container",6),fe(4,Epe,4,7,"ng-container",6),j()),2&i){const e=t.$implicit;G(1),U("ngIf","checkbox"===e.type),G(1),U("ngIf","radio"===e.type),G(1),U("ngIf","color"===e.type),G(1),U("ngIf","slider"===e.type)}}function Dpe(i,t){if(1&i&&(Gr(0),W(1,"h4"),Ve(2),j(),fe(3,Ape,5,4,"div",8),$r()),2&i){const e=t.$implicit;G(2),_i(e.title),G(1),U("ngForOf",e.controls)}}function Tpe(i,t){if(1&i){const e=di();W(0,"div",9)(1,"label",11),Ve(2),j(),W(3,"input",19),Ue("change",function(r){return zt(an(e).$implicit.visible=r.currentTarget.checked)}),j()()}if(2&i){const e=t.$implicit;G(1),U("for","visibility_"+e.name),G(1),_i(e.name),G(1),U("id","visibility_"+e.name)("checked",e.visible)}}function Ipe(i,t){if(1&i&&(Gr(0),W(1,"h4"),Ve(2,"Objects visibility"),j(),fe(3,Tpe,4,4,"div",8),$r()),2&i){const e=he();G(3),U("ngForOf",e.meshes)}}function Rpe(i,t){1&i&&De(0,"mat-spinner",20)}const ia=i=>{i.colorSpace="srgb",i.anisotropy=8,i.magFilter=_r,i.minFilter=_r};let h$=(()=>{class i{constructor(e){this.cdr=e,this.visibilityControls=!0,this.groupFunction=null,this.customControls=[],this.onObjectLoaded=new We,this._paths$=new gt(null),this.destroyed$=new Re,this.entity=null,this.meshes=[]}get paths(){return this._paths$.getValue()}set paths(e){this._paths$.next(e)}ngAfterViewInit(){var e=this;return tt(function*(){var s;e.world=new sk(new vO,{init:(s=tt(function*(){}),function(){return s.apply(this,arguments)}),simulate:()=>{}}),yield e.world.init(),e.world.visualScene.nativeScene.add(new $S(16777215,2));let n=new gt({x:1,y:1});e.renderer=e.world.addRenderer(e.world.visualScene.factory.createPerspectiveCamera({frustrum:{near:.01,far:1e4}}),e.previewCanvas.nativeElement,{size:n.asObservable(),background:11184810}),e.controller=new Rse(e.renderer,{mouseOptions:{canvas:e.previewCanvas.nativeElement},orbiting:{sensitivityX:2,sensitivityY:2},orbitingElasticity:30}),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(He(e.destroyed$)).subscribe(function(){var s=tt(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 Qb,h=yield(new bO).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 Fo;y.add(...b[v]),y.name=v,p.remove(...b[v]),p.add(y)}}e.meshes=p.children,e.meshes.sort((b,v)=>b.name>v.name?1:-1),p.traverse(b=>{if(b instanceof Mn){const v=b.material instanceof Array?b.material:[b.material];for(const y of v)y.transparent=!0,y.alphaTest=.5,y instanceof qi&&y.map&&(y.map.wrapS=Ii,y.map.wrapT=Ii,ia(y.map),y.map.needsUpdate=!0)}}),e.onObjectLoaded.next(p),e.entity=new Zo({object3D:new na(p)}),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=Pe.scalarMult(Pe.add(m.min,m.max),.5),e.controller.spherical={phi:1.22,theta:-1.32,radius:Pe.dist(m.min,m.max)},e.cdr.markForCheck()}});return function(o){return s.apply(this,arguments)}}())})()}toRGB(e){return(e?.r||0)<<16|(e?.g||0)<<8|(e?.b||0)}ngOnDestroy(){this.destroyed$.next(),this.destroyed$.complete()}}return i.\u0275fac=function(e){return new(e||i)(E(Zn))},i.\u0275cmp=ot({type:i,selectors:[["app-obj-viewer"]],viewQuery:function(e,n){if(1&e&&(Wn(bpe,5),Wn(xpe,5)),2&e){let r;Et(r=At())&&(n.previewCanvasContainer=r.first),Et(r=At())&&(n.previewCanvas=r.first)}},inputs:{paths:"paths",visibilityControls:"visibilityControls",groupFunction:"groupFunction",customControls:"customControls"},outputs:{onObjectLoaded:"onObjectLoaded"},decls:8,vars:3,consts:[[1,"previewCanvasContainer"],["previewCanvasContainer",""],["width","640","height","480"],["previewCanvas",""],["id","controls"],[4,"ngFor","ngForOf"],[4,"ngIf"],["mode","indeterminate",4,"ngIf"],["class","controls-list",4,"ngFor","ngForOf"],[1,"controls-list"],["style","width: 100%",4,"ngIf"],[3,"for"],[3,"id","type","checked","change"],[2,"width","100%"],["type","radio",3,"id","checked","change"],["matInput","",1,"hidden",3,"ngxMatColorPicker","colorChange"],["matSuffix","",3,"for"],["picker",""],["type","range",3,"id","min","max","step","value","change"],["type","checkbox",3,"id","checked","change"],["mode","indeterminate"]],template:function(e,n){1&e&&(W(0,"div",0,1),De(2,"canvas",2,3),W(4,"div",4),fe(5,Dpe,4,2,"ng-container",5),fe(6,Ipe,4,1,"ng-container",6),j(),fe(7,Rpe,1,0,"mat-spinner",7),j()),2&e&&(G(5),U("ngForOf",n.customControls),G(1),U("ngIf",n.visibilityControls),G(1),U("ngIf",!n.entity))},dependencies:[So,vi,qte,ic,Jb,Wie,bC,LH],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%] > h4[_ngcontent-%COMP%]{margin:0}.previewCanvasContainer[_ngcontent-%COMP%] #controls[_ngcontent-%COMP%] .controls-list[_ngcontent-%COMP%]{width:100%;display:flex;-webkit-user-select:none;user-select:none;align-items:center}.previewCanvasContainer[_ngcontent-%COMP%] #controls[_ngcontent-%COMP%] .controls-list[_ngcontent-%COMP%] > span[_ngcontent-%COMP%]{flex-grow:1}.previewCanvasContainer[_ngcontent-%COMP%] #controls[_ngcontent-%COMP%] .controls-list[_ngcontent-%COMP%] > label[_ngcontent-%COMP%]{flex-grow:1}"],changeDetection:0}),i})();function kpe(i,t){if(1&i&&(ki(),De(0,"circle",5),Ct(1,"async"),Ct(2,"async")),2&i){const e=he();let n,r;Dt("cx",(null==(n=Tt(1,3,e.mapPointer$))?null:n.x)||0)("cy",(null==(r=Tt(2,5,e.mapPointer$))?null:r.y)||0)("r",10)}}const Ppe=function(){return{"stroke-width":3}};let f$=(()=>{class i{constructor(e){this.ref=e,this._roadSpline$=new gt([]),this._pointer$=new gt(null),this.splineClosed=!1,this.svgSize$=new gt({x:100,y:100}),this.scalingSquare$=new gt({x:0,y:0,width:100,height:100}),this.mapPolyline$=new gt(""),this.mapPointer$=new gt(null),this.destroyed$=new Re}set roadSpline(e){this._roadSpline$.next(e)}set pointer(e){this._pointer$.next(e)}get trackLength$(){return this._roadSpline$.pipe(et(e=>{let n=0;for(let r=1;r{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$),nu([this._roadSpline$,this.scalingSquare$,this.svgSize$]).pipe(He(this.destroyed$),et(([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$),nu([this._pointer$,this.scalingSquare$.asObservable(),this.svgSize$]).pipe(He(this.destroyed$),et(([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)(E(mt))},i.\u0275cmp=ot({type:i,selectors:[["app-tri-minimap"]],inputs:{roadSpline:"roadSpline",pointer:"pointer",splineClosed:"splineClosed"},decls:13,vars:16,consts:[[1,"container"],["shape-rendering","geometricPrecision"],[2,"fill","none","stroke","#333333",3,"ngStyle"],["fill","#e30","stroke","black","stroke-width","3",4,"ngIf"],[1,"info_div"],["fill","#e30","stroke","black","stroke-width","3"]],template:function(e,n){if(1&e&&(W(0,"div",0),ki(),W(1,"svg",1),Ct(2,"async"),Ct(3,"async"),De(4,"polyline",2),Ct(5,"async"),Ve(6," cars "),fe(7,kpe,3,7,"circle",3),Ct(8,"async"),j(),ga(),W(9,"div",4)(10,"span"),Ve(11),Ct(12,"async"),j()()()),2&e){let r,s;G(1),Dt("viewBox","0 0 "+(null==(r=Tt(2,5,n.svgSize$))?null:r.x)+" "+(null==(r=Tt(3,7,n.svgSize$))?null:r.y)),G(3),U("ngStyle",so(15,Ppe)),Dt("points",Tt(5,9,n.mapPolyline$)),G(3),U("ngIf",Tt(8,11,n.mapPointer$)),G(4),Qi("Track length (m): ",null==(s=Tt(12,13,n.trackLength$))?null:s.toFixed(2),"")}},dependencies:[vi,tM,pl],styles:["[_nghost-%COMP%]{overflow:auto}.container[_ngcontent-%COMP%]{position:relative;width:100%;height:100%}.container[_ngcontent-%COMP%] svg[_ngcontent-%COMP%]{position:absolute;width:100%;height:100%}.container[_ngcontent-%COMP%] .info_div[_ngcontent-%COMP%]{color:#838383}"],changeDetection:0}),i})();const Ope=["previewCanvasContainer"],Fpe=["previewCanvas"];function Lpe(i,t){if(1&i&&(W(0,"mat-option",19),Ve(1),j()),2&i){const e=t.$implicit;U("value",e),G(1),Qi(" ",e," ")}}function Npe(i,t){if(1&i){const e=di();Gr(0),W(1,"mat-form-field",1)(2,"mat-label"),Ve(3,"Custom FAM path"),j(),De(4,"input",20,21),Ct(6,"async"),j(),W(7,"button",22),Ue("click",function(){an(e);const r=Zi(5);return zt(he().onFamSelected(r.value))}),Ve(8,"LOAD"),j(),$r()}if(2&i){const e=he();G(4),U("value",Tt(6,1,e.previewFamLocation$))}}function Bpe(i,t){1&i&&De(0,"mat-spinner",23),2&i&&U("diameter",40)}function Upe(i,t){1&i&&De(0,"mat-spinner",24)}const Vpe=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 Af=(()=>{return(i=Af||(Af={})).ThreeModel="model",i.Bitmap="bitmap",i.TwoSidedBitmap="two_sided_bitmap",Af;var i})();class zpe extends QH{constructor(t,e,n){super(t,{loadDepth:40,inertia:2}),this.mapGraph=t,this.famPath=e,this.hideUnknownEntities$=n,this.textureLoader=new Pu,this.terrainMaterials={},this.objLoader=new Qb,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(Zl(),He(this._onRemoved$)).subscribe(e=>{for(const n of this.unknownEntities)n.visible=!e})}getPlaceholderTexture(){var t=this;return tt(function*(){return t._placeholder?t._placeholder:(t._placeholderPromise||(t._placeholderPromise=t.textureLoader.loadAsync("assets/placeholder_texture.png")),t._placeholderPromise)})()}getPlaceholderTerrainTexture(){var t=this;return tt(function*(){return t._placeholderTerrain?t._placeholderTerrain:(t._placeholderTerrainPromise||(t._placeholderTerrainPromise=t.textureLoader.loadAsync("assets/placeholder_texture.png").then(e=>(e.wrapS=Pa,e.wrapT=Ii,ia(e),e.flipY=!0,e))),t._placeholderTerrainPromise)})()}loadChunk(t){var e=this;return tt(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 Mn&&(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:Pe.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:Yi.fromAngle(Pe.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 Zo({object3D:new na(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 qi({side:Ls,transparent:!0,visible:!1}),this.famPath?this.textureLoader.loadAsync(`${this.famPath}/background/${t}.png`).then(e=>{e.wrapS=Pa,e.wrapT=Ii,ia(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 tt(function*(){let n=!1;if(t.type==Af.ThreeModel){let r;try{if(!e.famPath)throw new Error;const o=new bO,a=new Qb,l=yield o.loadAsync(`${e.famPath}/props/${t.data.data.resource_id}/0/material.mtl`);l.preload(),a.setMaterials(l),r=new na(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 Mn){const a=o.material instanceof Array?o.material:[o.material];for(const l of a)l.transparent=!0,l.alphaTest=.5,l instanceof qi&&l.map&&(l.map.wrapS=Ii,l.map.wrapT=Ii,ia(l.map),l.map.needsUpdate=!0)}});const s=new Zo({object3D: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==Af.Bitmap||t.type==Af.TwoSidedBitmap){const r=(c,d)=>new Array(d).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 Fo,[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==Af.TwoSidedBitmap){const[c,d]=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 Zo({object3D:new na(s)});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 tt(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=>(ia(h),new qi({map:h,alphaTest:.5,transparent:!0,side:Ls}))),d=new Mn(new Iu(e.x,e.y),c[0]);if(d.rotateX(Math.PI/2),d.position.set(0,0,e.y/2),c.length>1){let h=-1;Ym(r.world).pipe(o4(n&&!isNaN(+n)?1e3*+n:250)).subscribe(()=>{h=(h+1)%c.length,d.material=c[h]})}return[d,a]})()}}let Hpe=(()=>{class i{constructor(e,n,r){this.eelDelegate=e,this.cdr=n,this.mainService=r,this._resource$=new gt(null),this.changed=new We,this.previewLoading$=new gt(!0),this.previewFamLocation$=new gt(null),this.previewFamLoading$=new gt(!1),this.pointer$=new gt(null),this.selectedSplineIndex$=new gt(0),this.selectedSplineItem$=new gt(null),this.selectedAiInfoItem$=new gt(null),this.selectedTerrainItem$=new gt(null),this.famPath=null,this.name="",this.renderer=null,this.map=null,this.isOpenedTrack=!0,this.roadPath=null,this.destroyed$=new Re}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 tt(function*(){var s;e.world=new sk(new vO,{init:(s=tt(function*(){}),function(){return s.apply(this,arguments)}),simulate:()=>{},loader:{loadFromGgGlb:function(){var s=tt(function*(...o){return[]});return function(){return s.apply(this,arguments)}}()}}),yield e.world.init(),e.skySphere=new Zo({object3D:e.world.visualScene.factory.createPrimitive({shape:"SPHERE",radius:1e3},{color:16777215})}),e.skySphere.object3D.nativeMesh.material.side=Ls,e.world.addEntity(e.skySphere),e.selectionSphere=new Zo({object3D: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 $S(16777215,2));let n=new gt({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=Yi.lookAt(e.renderer.camera.position,Pe.add(e.renderer.camera.position,Pe.Y),Pe.Z),Ym(e.world).pipe(He(e.destroyed$)).subscribe(()=>{e.renderer&&(e.skySphere.position=e.renderer.camera.position,e.pointer$.next(e.renderer.camera.position))}),e.controller=new n4(e.world.keyboardInput,e.renderer,{mouseOptions:{canvas:e.previewCanvas.nativeElement,pointerLock:!0},keymap:"wasd+arrows",cameraLinearSpeed:40,cameraBoostMultiplier:4,cameraMovementElasticity:100,cameraRotationElasticity:30,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(He(e.destroyed$)).subscribe(function(){var s=tt(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(He(e.destroyed$),gn(([s,o])=>!!e.resource&&s.startsWith(e.resource.id)),ml(3e3)).subscribe(tt(function*(){e.previewLoading$.next(!0),yield e.postTmpUpdates(e.resource?.id),yield e.loadPreview(),e.previewLoading$.next(!1)})),e.selectedSplineIndex$.pipe(He(e.destroyed$),ml(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=Pe.add(a,Pe.rotAround({x:10,y:-12,z:5},{x:0,y:0,z:1},-e.resource.data.road_spline[s].orientation)),e.renderer.rotation=Yi.lookAt(e.renderer.position,a,{x:0,y:0,z:1}),e.controller.reset())}e.selectedSplineItem$.next({id:rc(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:rc(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:rc(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 tt(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 Pu,o=r.find(a=>a.endsWith("spherical.png"));if(o){const a=yield s.loadAsync(o);a.colorSpace="srgb",a.mapping=lc,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 tt(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 tt(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=Km.fromMapArray(e.roadPath.map((r,s)=>({path:`${e.terrainChunksObjLocation}terrain_chunk_${s}`,position:r,loadOptions:{}}))||[],!e.isOpenedTrack);e.unloadPreview(),e.map=new zpe(n,e.famPath&&"resources/"+e.famPath,e.mainService.hideHiddenFields$),e.map.resource=e.resource,e.map.isOpenedTrack=e.isOpenedTrack,Ym(e.world).pipe(He(e.destroyed$)).subscribe(()=>{e.map&&e.renderer&&e.map.loaderCursor$.next(e.renderer.position)}),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 tt(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)(E(Ql),E(Zn),E(ka))},i.\u0275cmp=ot({type:i,selectors:[["app-tri-map-block-ui"]],viewQuery:function(e,n){if(1&e&&(Wn(Ope,5),Wn(Fpe,5)),2&e){let r;Et(r=At())&&(n.previewCanvasContainer=r.first),Et(r=At())&&(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&&(W(0,"div",0)(1,"h4"),Ve(2,"Preview *.FAM file"),j(),W(3,"mat-form-field",1)(4,"mat-label"),Ve(5,"Current preview FAM"),j(),W(6,"mat-select",2,3),Ue("valueChange",function(s){return n.onFamSelected(s)}),Ct(8,"async"),Ct(9,"async"),fe(10,Lpe,2,2,"mat-option",4),W(11,"mat-option",5),Ve(12,"custom"),j()()(),fe(13,Npe,9,3,"ng-container",6),fe(14,Bpe,1,1,"mat-spinner",7),Ct(15,"async"),j(),W(16,"div",8)(17,"div",9,10),De(19,"canvas",11,12),fe(21,Upe,1,0,"mat-spinner",13),Ct(22,"async"),j(),W(23,"div",14,10)(25,"mat-form-field",1)(26,"mat-label"),Ve(27,"Spline item"),j(),W(28,"input",15),Ue("ngModelChange",function(s){return n.selectedSplineIndex$.next(s)}),Ct(29,"async"),Ct(30,"async"),j()(),De(31,"app-tri-minimap",16),Ct(32,"async"),j()(),W(33,"h4"),Ve(34,"Road spline item"),j(),De(35,"app-compound-block-ui",17),Ct(36,"async"),W(37,"h4"),Ve(38,"AI info (block for 4 spline items)"),j(),De(39,"app-compound-block-ui",17),Ct(40,"async"),W(41,"h4"),Ve(42,"Terrain (block for 4 spline items)"),j(),De(43,"app-compound-block-ui",17),Ct(44,"async"),W(45,"h4"),Ve(46,"Common"),j(),De(47,"app-compound-block-ui",18),Ct(48,"async")),2&e){const r=Zi(7);let s;G(6),U("value",n.previewFamPossibleLocations.includes(Tt(8,20,n.previewFamLocation$))?Tt(9,22,n.previewFamLocation$):"custom"),G(4),U("ngForOf",n.previewFamPossibleLocations),G(3),U("ngIf","custom"==r.value),G(1),U("ngIf",Tt(15,24,n.previewFamLoading$)),G(7),U("ngIf",Tt(22,26,n.previewLoading$)),G(7),U("min",0)("max",4*(null==(s=Tt(29,28,n._resource$))?null:s.data.num_chunks)-1)("ngModel",Tt(30,30,n.selectedSplineIndex$)),G(3),U("roadSpline",n.roadSpline)("pointer",Tt(32,32,n.pointer$))("splineClosed",!n.isOpenedTrack),G(4),U("resource",Tt(36,34,n.selectedSplineItem$))("hideBlockActions",!0),G(4),U("resource",Tt(40,36,n.selectedAiInfoItem$))("hideBlockActions",!0),G(4),U("resource",Tt(44,38,n.selectedTerrainItem$))("hideBlockActions",!0),G(4),U("resource",Tt(48,40,n._resource$))("hideBlockActions",!0)("fieldWhitelist",so(42,Vpe))}},dependencies:[So,vi,gl,mu,tc,_u,gu,Kc,vl,To,ic,ib,fb,Nm,Jb,Jl,f$,pl],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})();const p$=i=>new Promise(t=>setTimeout(t,i)),m$=(i,t,e=null)=>{const n=document.createElement("canvas"),r=n.getContext("2d",{willReadFrequently:!0}),s=i.width,o=i.height;n.width=s,n.height=o,r.drawImage(i,0,0,s,o);const a=r.getImageData(0,0,s,o);for(let l=0;l{if(!(o instanceof Mn))return;let a=-1;if(o.name.startsWith("lbl__rt_frnt")?a=0:o.name.startsWith("lbl__lt_frnt")?a=1:o.name.startsWith("lbl__rt_rear")?a=2:o.name.startsWith("lbl__lt_rear")&&(a=3),a>-1){this.wheels[a]=o,a<2&&(this.frontWheels[a]=o),o.geometry.boundingBox||o.geometry.computeBoundingBox();const l=Pe.avg(o.geometry.boundingBox.min,o.geometry.boundingBox.max);o.geometry.translate(...Pe.spr(Pe.neg(l))),o.position.set(...Pe.spr(l)),this.wheelIdlePositions[a]=l}(o.name.includes("rsid")||o.name.includes("lite"))&&(r.push(o),this.originalTexWithTailLights=o.material.map)}),!this.originalTexWithTailLights)throw new Error("Not a driveable NFS1 car");this.tailLightColors=n.includes("TRAFFC.CFM")?[9509903,16711680]:[3212546,16258068],this.texWithTailLightsImg=document.createElement("img"),this.texWithTailLights=new ko(this.texWithTailLightsImg),this.texWithTailLights.flipY=this.originalTexWithTailLights.flipY,ia(this.texWithTailLights),this.recolorTailLights(this.tailLightColors[0]).then();for(const o of r)o.material.map=this.texWithTailLights;const s=new Pu;this.tyreTextures=[1,2,3,4].map(o=>s.load(`${n}/tyr${o}.png`));for(const o of this.tyreTextures)ia(o);this.tyreMaterial=new qi({map:this.tyreTextures[0]}),this.tyreMaterial.transparent=!0,this.tyreMaterial.alphaTest=.5,this.tyreMaterial.map.wrapS=Ii,this.tyreMaterial.map.wrapT=Ii,this.tyreMaterial.polygonOffset=!0,this.tyreMaterial.polygonOffsetFactor=-4;for(const o of this.wheels)o.material=this.tyreMaterial}get tailLightsOn(){return this._tailLightsOn}set tailLightsOn(t){t!==this._tailLightsOn&&(this._tailLightsOn=t,this.recolorTailLights(this.tailLightColors[t?1:0]))}get speed(){return this._speed}set speed(t){if(t!==this._speed){switch(this._speed=t,this.tyreTextureUpdateTimer&&clearInterval(this.tyreTextureUpdateTimer),t){case"idle":this.tyreMaterial.map=this.tyreTextures[0];break;case"slow":let e=!0;this.tyreTextureUpdateTimer=setInterval(()=>{this.tyreMaterial.map=this.tyreTextures[e?1:2],this.tyreMaterial.needsUpdate=!0,e=!e},16);break;case"fast":this.tyreMaterial.map=this.tyreTextures[3]}this.tyreMaterial.needsUpdate=!0}}get steeringAngle(){return this._steeringAngle}set steeringAngle(t){if(t!==this._steeringAngle){this._steeringAngle=t;for(const e of this.frontWheels)e.rotation.set(0,0,t)}}recolorTailLights(t){var e=this;return tt(function*(){if(e.originalTexWithTailLights&&e.texWithTailLights&&e.texWithTailLightsImg){for(let n=100;n>0&&!e.originalTexWithTailLights.source.data;n--)yield p$(50);((i,t,e,n=null)=>{const[r,s,o]=[t>>16,t>>8&255,255&t],[a,l,c]=[e>>16,e>>8&255,255&e];m$(i,(d,h)=>{d[h]==r&&d[h+1]==s&&d[h+2]==o&&(d[h]=a,d[h+1]=l,d[h+2]=c)},n)})(e.originalTexWithTailLights.source.data,e.tailLightsTexColor,t,e.texWithTailLightsImg),e.texWithTailLights.needsUpdate=!0}})()}dispose(){this.texWithTailLightsImg&&(this.texWithTailLightsImg.remove(),this.texWithTailLightsImg=null),this.texWithTailLights&&(this.texWithTailLights.dispose(),this.texWithTailLights=null),this.tyreTextureUpdateTimer&&clearInterval(this.tyreTextureUpdateTimer),this.tyreMaterial&&(this.tyreMaterial.dispose(),this.tyreMaterial=null)}}let Wpe=(()=>{class i{constructor(e,n,r){this.eelDelegate=e,this.mainService=n,this.cdr=r,this._resource$=new gt(null),this.changed=new We,this.previewPaths$=new gt(null),this.destroyed$=new Re,this.customControls=[],this.serializerSettings={geometry__save_obj:!0,geometry__save_blend:!1,geometry__export_to_gg_web_engine:!1}}get resource(){return this._resource$.getValue()}set resource(e){this._resource$.next(e)}ngAfterViewInit(){var e=this;return tt(function*(){e._resource$.pipe(He(e.destroyed$)).subscribe(function(){var n=tt(function*(r){e.previewPaths$.next(yield e.loadPreviewFilePaths(r?.id))});return function(r){return n.apply(this,arguments)}}()),e.mainService.dataBlockChange$.pipe(He(e.destroyed$),gn(([n,r])=>!!e.resource&&n.startsWith(e.resource.id)),ml(1500)).subscribe(tt(function*(){e.previewPaths$.next(null),e.previewPaths$.next(yield e.postTmpUpdates(e.resource?.id))}))})()}onObjectLoaded(e){var n=this;return tt(function*(){if((n._resource$.value?.id||"").includes(".CFM__"))try{const r=n.resource?.id.split("/");r.pop(),r[r.length-1]=""+(+r[r.length-1]+1);const s=yield n.eelDelegate.retrieveValue(r.join("/")+"/data"),o=s.children_aliases.findIndex(l=>"!PAL"===l);if(-1==o)throw new Error("Not a car");const a=new $pe(e,s.children[o].data.colors[254]>>>8,n.previewPaths$.value[0].substring(0,n.previewPaths$.value[0].lastIndexOf("/"))+"/assets");n.customControls=[{title:"TNFS car features",controls:[{label:"Brake lights on",type:"checkbox",value:!1,change:l=>{a.tailLightsOn=l}},{label:"Car speed",type:"radio",options:["idle","slow","fast"],value:"idle",change:l=>{a.speed=l}},{label:"Steering angle",type:"slider",minValue:-.7,maxValue:.7,valueStep:.05,value:0,change:l=>{a.steeringAngle=l}}]}],n.cdr.markForCheck()}catch{}})()}postTmpUpdates(e){var n=this;return tt(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 tt(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)(E(Ql),E(ka),E(Zn))},i.\u0275cmp=ot({type:i,selectors:[["app-orip-geometry-block-ui"]],inputs:{resource:"resource"},outputs:{changed:"changed"},decls:4,vars:7,consts:[[3,"paths","customControls","onObjectLoaded"],[3,"resource"]],template:function(e,n){1&e&&(W(0,"app-obj-viewer",0),Ue("onObjectLoaded",function(s){return n.onObjectLoaded(s)}),Ct(1,"async"),j(),De(2,"app-compound-block-ui",1),Ct(3,"async")),2&e&&(U("paths",Tt(1,3,n.previewPaths$))("customControls",n.customControls),G(2),U("resource",Tt(3,5,n._resource$)))},dependencies:[Jl,h$,pl],changeDetection:0}),i})();const jpe=["class","block-ui"];function Ype(i,t){if(1&i&&(W(0,"mat-label",7),Ve(1),j()),2&i){const e=he(2);U("matTooltip",e.resourceDescription),G(1),Qi("",null==e.resource?null:e.resource.name," ")}}function qpe(i,t){if(1&i&&(W(0,"mat-option",8),Ve(1),j()),2&i){const e=t.$implicit,n=t.index,r=he(2);U("value",n)("disabled",r.disabled),G(1),Qi(" ",e.block_class_mro.split("__")[0]," ")}}function Xpe(i,t){if(1&i){const e=di();Gr(0),fe(1,Ype,2,2,"mat-label",1),Ct(2,"async"),W(3,"div",2)(4,"mat-label"),Ve(5,"Resource type:"),j(),W(6,"mat-select",3),Ue("selectionChange",function(r){return an(e),zt(he().setChoiceIndex(r.value))}),fe(7,qpe,2,3,"mat-option",4),j(),De(8,"app-block-actions",5),j(),De(9,"app-editor",6),$r()}if(2&i){const e=he();let n;G(1),U("ngIf",(null==e.resource?null:e.resource.name)&&(null==e.resource?null:e.resource.name)!=(null==(n=Tt(2,8,e.main.resource$))?null:n.name)),G(5),U("value",e.resourceData.choice_index)("disabled",e.disabled),G(1),U("ngForOf",e.resource.schema.possible_resource_schemas),G(1),U("resource",e.childResource),G(1),U("resource",e.childResource)("hideBlockActions",!0)("disabled",e.disabled)}}let g$=(()=>{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 We}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:rc(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)(E(ka))},i.\u0275cmp=ot({type:i,selectors:[["app-delegate",8,"block-ui"]],inputs:{resource:"resource",resourceDescription:"resourceDescription",hideBlockActions:"hideBlockActions",disabled:"disabled"},outputs:{changed:"changed"},attrs:jpe,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"],[3,"resource","hideBlockActions","disabled"],["matTooltipPosition","above",3,"matTooltip"],[3,"value","disabled"]],template:function(e,n){1&e&&fe(0,Xpe,10,10,"ng-container",0),2&e&&U("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 Kpe=["class","block-ui"];function Zpe(i,t){if(1&i&&(W(0,"mat-label",7),Ve(1),j()),2&i){const e=he(2);U("matTooltip",e.resourceDescription),G(1),Qi(" ",e.resource.name," ")}}function Qpe(i,t){if(1&i){const e=di();Gr(0),fe(1,Zpe,2,2,"mat-label",1),W(2,"mat-selection-list",2),Ue("selectionChange",function(r){return an(e),zt(he().onSelection(r))}),W(3,"mat-list-option",3),Ve(4," Left "),j(),W(5,"mat-list-option",4),Ve(6," Right "),j()(),W(7,"mat-form-field",5)(8,"mat-label"),Ve(9,"Texture ID"),j(),W(10,"input",6),Ue("ngModelChange",function(r){return an(e),zt(he().resource.data.texture_id=r)})("change",function(){return an(e),zt(he().changed.emit())}),j()(),$r()}if(2&i){const e=he();G(1),U("ngIf",e.resource.name),G(2),U("selected",e.resource.data.has_left_fence),G(2),U("selected",e.resource.data.has_right_fence),G(5),U("max",63)("min",0)("step",1)("ngModel",e.resource.data.texture_id)}}let Jpe=(()=>{class i{constructor(){this.resource=null,this.resourceDescription="",this.changed=new We}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=ot({type:i,selectors:[["app-fence-type",8,"block-ui"]],inputs:{resource:"resource",resourceDescription:"resourceDescription"},outputs:{changed:"changed"},attrs:Kpe,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&&fe(0,Qpe,11,7,"ng-container",0),2&e&&U("ngIf",n.resource)},dependencies:[vi,gl,mu,tc,_u,gu,Kc,vl,To,ic,Os,MC,wC],changeDetection:0}),i})(),eme=(()=>{class i{constructor(){this._resource=null,this.resourceMap={},this.changed=new We}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]=["",_l.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)(E(nb),E(yte),E(oR))},i.\u0275cmp=ot({type:i,selectors:[["app-run-custom-action",8,"dialog"]],attrs:tme,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&&(W(0,"h1",0),Ve(1),j(),W(2,"div",1)(3,"p"),Ve(4),j()(),W(5,"form",2),fe(6,nme,4,4,"mat-form-field",3),j(),W(7,"div",4)(8,"button",5),Ue("click",function(){return n.dialogRef.close()}),Ve(9,"Cancel"),j(),W(10,"button",6),Ue("click",function(){return n.submit()}),Ve(11,"Run"),j()()),2&e&&(G(1),Qi('Run action "',n.data.title,'"'),G(3),_i(n.data.description),G(1),U("formGroup",n.argsForm),G(1),U("ngForOf",n.data.args),G(4),U("disabled",n.argsForm.invalid))},dependencies:[So,IR,gl,tc,bR,vl,To,ic,ib,fV,pV,mV,Gh,fC],styles:["form[_ngcontent-%COMP%]{padding:0 24px}"]}),i})();function _$(i,t){return t?e=>Sy(t.pipe(Oi(1),function rme(){return ti((i,t)=>{i.subscribe(Yn(t,ms))})}()),e.pipe(_$(i))):ir((e,n)=>wr(i(e,n)).pipe(Oi(1),YB(e)))}function v$(i,t=$y){const e=OI(i,t);return _$(()=>e)}const sme=["mat-menu-item",""];function ome(i,t){1&i&&(ki(),W(0,"svg",3),De(1,"polygon",4),j())}const ame=[[["mat-icon"],["","matMenuItemIcon",""]],"*"],lme=["mat-icon, [matMenuItemIcon]","*"];function cme(i,t){if(1&i){const e=di();W(0,"div",0),Ue("keydown",function(r){return an(e),zt(he()._handleKeydown(r))})("click",function(){return an(e),zt(he().closed.emit("click"))})("@transformMenu.start",function(r){return an(e),zt(he()._onAnimationStart(r))})("@transformMenu.done",function(r){return an(e),zt(he()._onAnimationDone(r))}),W(1,"div",1),Wt(2),j()()}if(2&i){const e=he();U("id",e.panelId)("ngClass",e._classList)("@transformMenu",e._panelAnimationState),Dt("aria-label",e.ariaLabel||null)("aria-labelledby",e.ariaLabelledby||null)("aria-describedby",e.ariaDescribedby||null)}}const dme=["*"],xO=new me("MAT_MENU_PANEL"),ume=YM(jM(class{}));let eE=(()=>{class i extends ume{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 Re,this._focused=new Re,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",jr("120ms cubic-bezier(0, 0, 0.2, 1)",si({opacity:1,transform:"scale(1)"}))),Pr("* => void",jr("100ms 25ms linear",si({opacity:0})))]),fadeInItems:Ra("fadeInItems",[Ps("showing",si({opacity:1})),Pr("void => *",[si({opacity:0}),jr("400ms 100ms cubic-bezier(0.55, 0, 0.55, 0.2)")])])};let fme=0;const y$=new me("mat-menu-default-options",{providedIn:"root",factory:function pme(){return{overlapTrigger:!1,xPosition:"after",yPosition:"below",backdropClass:"cdk-overlay-transparent-backdrop"}}});let e0=(()=>{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 om,this._classList={},this._panelAnimationState="void",this._animationDone=new Re,this.overlayPanelClass=this._defaultOptions.overlayPanelClass||"",this.backdropClass=this._defaultOptions.backdropClass,this._overlapTrigger=this._defaultOptions.overlapTrigger,this._hasBackdrop=this._defaultOptions.hasBackdrop,this.closed=new We,this.close=this.closed,this.panelId="mat-menu-panel-"+fme++}ngOnInit(){this.setPositionClasses()}ngAfterContentInit(){this._updateDirectDescendants(),this._keyManager=new RU(this._directDescendantItems).withWrap().withTypeAhead().withHomeAndEnd(),this._keyManager.tabOut.subscribe(()=>this.closed.emit("tab")),this._directDescendantItems.changes.pipe(Ao(this._directDescendantItems),Rs(e=>Mr(...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(Ao(this._directDescendantItems),Rs(n=>Mr(...n.map(r=>r._hovered))))}addItem(e){}removeItem(e){}_handleKeydown(e){const n=e.keyCode,r=this._keyManager;switch(n){case 27:Xo(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(Oi(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(Ao(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)(E(mt),E(ft),E(y$),E(Zn))},i.\u0275dir=ve({type:i,contentQueries:function(e,n,r){if(1&e&&(Wi(r,hme,5),Wi(r,eE,5),Wi(r,eE,4)),2&e){let s;Et(s=At())&&(n.lazyContent=s.first),Et(s=At())&&(n._allItems=s),Et(s=At())&&(n.items=s)}},viewQuery:function(e,n){if(1&e&&Wn(Mo,5),2&e){let r;Et(r=At())&&(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})(),mme=(()=>{class i extends e0{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)(E(mt),E(ft),E(y$),E(Zn))},i.\u0275cmp=ot({type:i,selectors:[["mat-menu"]],hostVars:3,hostBindings:function(e,n){2&e&&Dt("aria-label",null)("aria-labelledby",null)("aria-describedby",null)},exportAs:["matMenu"],features:[Dn([{provide:xO,useExisting:i}]),lt],ngContentSelectors:dme,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&&(sr(),fe(0,cme,3,6,"ng-template"))},dependencies:[hm],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:[tE.transformMenu,tE.fadeInItems]},changeDetection:0}),i})();const b$=new me("mat-menu-scroll-strategy"),_me={provide:b$,deps:[as],useFactory:function gme(i){return()=>i.scrollStrategies.reposition()}},x$=Oh({passive:!0});let vme=(()=>{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,d){this._overlay=e,this._element=n,this._viewContainerRef=r,this._menuItemInstance=a,this._dir=l,this._focusMonitor=c,this._ngZone=d,this._overlayRef=null,this._menuOpen=!1,this._closingActionsSubscription=Zt.EMPTY,this._hoverSubscription=Zt.EMPTY,this._menuCloseSubscription=Zt.EMPTY,this._changeDetectorRef=Ft(Zn),this._handleTouchStart=h=>{qI(h)||(this._openedBy="touch")},this._openedBy=void 0,this.restoreFocus=!0,this.menuOpened=new We,this.onMenuOpen=this.menuOpened,this.menuClosed=new We,this.onMenuClose=this.menuClosed,this._scrollStrategy=s,this._parentMaterialMenu=o instanceof e0?o:void 0,n.nativeElement.addEventListener("touchstart",this._handleTouchStart,x$)}ngAfterContentInit(){this._handleHover()}ngOnDestroy(){this._overlayRef&&(this._overlayRef.dispose(),this._overlayRef=null),this._element.nativeElement.removeEventListener("touchstart",this._handleTouchStart,x$),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 e0&&(e._startAnimation(),e._directDescendantItems.changes.pipe(He(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 e0?(n._resetAnimation(),n.lazyContent?n._animationDone.pipe(gn(r=>"void"===r.toState),Oi(1),He(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],[d,h]=[r,s],p=0;if(this.triggersSubmenu()){if(h=r="before"===e.xPosition?"start":"end",s=d="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:d,overlayY:o,offsetY:p},{originX:s,originY:l,overlayX:h,overlayY:o,offsetY:p},{originX:r,originY:c,overlayX:d,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 Mr(e,this._parentMaterialMenu?this._parentMaterialMenu.closed:ht(),this._parentMaterialMenu?this._parentMaterialMenu._hovered().pipe(gn(o=>o!==this._menuItemInstance),gn(()=>this._menuOpen)):ht(),n)}_handleMousedown(e){YI(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(gn(e=>e===this._menuItemInstance&&!e.disabled),v$(0,PI)).subscribe(()=>{this._openedBy="mouse",this.menu instanceof e0&&this.menu._isAnimating?this.menu._animationDone.pipe(Oi(1),v$(0,PI),He(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)(E(as),E(mt),E(Wr),E(b$),E(xO,8),E(eE,10),E(Ia,8),E(qc),E(ft))},i.\u0275dir=ve({type:i,hostVars:3,hostBindings:function(e,n){1&e&&Ue("click",function(s){return n._handleClick(s)})("mousedown",function(s){return n._handleMousedown(s)})("keydown",function(s){return n._handleKeydown(s)}),2&e&&Dt("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})(),yme=(()=>{class i extends vme{}return i.\u0275fac=function(){let t;return function(n){return(t||(t=ri(i)))(n||i)}}(),i.\u0275dir=ve({type:i,selectors:[["","mat-menu-trigger-for",""],["","matMenuTriggerFor",""]],hostAttrs:[1,"mat-mdc-menu-trigger"],exportAs:["matMenuTrigger"],features:[lt]}),i})(),bme=(()=>{class i{}return i.\u0275fac=function(e){return new(e||i)},i.\u0275mod=nn({type:i}),i.\u0275inj=Kt({providers:[_me],imports:[Eo,eb,Qn,Pm,Xy,Qn]}),i})();function xme(i,t){if(1&i){const e=di();W(0,"button",7),Ue("click",function(){return an(e),zt(he(2).deserialize())}),De(1,"mat-icon",8),j()}}function wme(i,t){if(1&i){const e=di();Gr(0),fe(1,xme,2,0,"button",4),W(2,"button",5),Ue("click",function(){return an(e),zt(he().serializeBlockReversible())}),De(3,"mat-icon",6),j(),$r()}if(2&i){const e=he();G(1),U("ngIf",e.isInReversibleSerializationState),G(1),U("disabled",e.isInReversibleSerializationState)}}function Mme(i,t){1&i&&(W(0,"button",9),De(1,"mat-icon",10),j()),2&i&&(he(),U("matMenuTriggerFor",Zi(3)))}function Cme(i,t){if(1&i){const e=di();W(0,"button",11),Ue("click",function(){const s=an(e).$implicit;return zt(he().runCustomAction(s))}),W(1,"span"),Ve(2),j()()}if(2&i){const e=t.$implicit;G(2),_i(e.title)}}const Sme=function(){return[]};let nE=(()=>{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 tt(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)(E(ka),E(Ql),E(Zn),E(Bm),E(IV))},i.\u0275cmp=ot({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&&(fe(0,wme,4,2,"ng-container",0),fe(1,Mme,2,1,"button",1),W(2,"mat-menu",null,2),fe(4,Cme,3,1,"button",3),j()),2&e&&(U("ngIf",null==n.resource||null==n.resource.schema?null:n.resource.schema.serializable_to_disc),G(1),U("ngIf",(null==n.resource||null==n.resource.schema.custom_actions?null:n.resource.schema.custom_actions.length)>0),G(3),U("ngForOf",(null==n.resource?null:n.resource.schema.custom_actions)||so(3,Sme)))},dependencies:[So,vi,Os,XM,gR,mme,eE,yme],styles:["[_nghost-%COMP%]{display:flex}"]}),i})();const Eme=["class","block-ui"];function Ame(i,t){if(1&i&&(W(0,"mat-label",7),Ve(1),j()),2&i){const e=he();U("matTooltip",e.resourceDescription),G(1),Qi("",null==e.resource?null:e.resource.name," ")}}function Dme(i,t){if(1&i&&(W(0,"audio",8),De(1,"source",9),Ct(2,"async"),Ve(3," Your browser does not support the audio element. "),j()),2&i){const e=he();G(1),U("src",Tt(2,1,e.audioUrl$),Lp)}}function Tme(i,t){1&i&&De(0,"mat-spinner",10)}function Ime(i,t){1&i&&De(0,"app-block-actions",11),2&i&&U("resource",he().resource)}const Rme=function(){return["wave_data"]};let kme=(()=>{class i{constructor(e,n){this.eelDelegate=e,this.main=n,this._resource$=new gt(null),this.audioUrl$=new gt(null),this.resourceDescription="",this.hideBlockActions=!1,this.destroyed$=new Re,this.changed=new We}set resource(e){this._resource$.next(e)}get resource(){return this._resource$.getValue()}ngAfterViewInit(){var e=this;return tt(function*(){e._resource$.pipe(He(e.destroyed$)).subscribe(function(){var n=tt(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)(E(Ql),E(ka))},i.\u0275cmp=ot({type:i,selectors:[["app-eacs-audio",8,"block-ui"]],inputs:{resource:"resource",resourceDescription:"resourceDescription",hideBlockActions:"hideBlockActions"},outputs:{changed:"changed"},attrs:Eme,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&&(W(0,"div",0),fe(1,Ame,2,2,"mat-label",1),Ct(2,"async"),fe(3,Dme,4,3,"audio",2),Ct(4,"async"),fe(5,Tme,1,0,"mat-spinner",3),Ct(6,"async"),De(7,"div",4),fe(8,Ime,1,1,"app-block-actions",5),j(),De(9,"app-compound-block-ui",6),Ct(10,"async")),2&e){let r;G(1),U("ngIf",(null==n.resource?null:n.resource.name)&&(null==n.resource?null:n.resource.name)!=(null==(r=Tt(2,7,n.main.resource$))?null:r.name)),G(2),U("ngIf",Tt(4,9,n.audioUrl$)),G(2),U("ngIf",n.resource&&!Tt(6,11,n.audioUrl$)),G(3),U("ngIf",!n.hideBlockActions),G(1),U("resource",Tt(10,13,n._resource$))("hideBlockActions",!0)("fieldBlacklist",so(15,Rme))}},dependencies:[vi,To,Os,Jb,Jl,nE,pl],styles:["#header[_ngcontent-%COMP%]{display:flex}"]}),i})();class Pme{constructor(t,e){this.mesh=t,this.assetsPath=e,this.textures=[],this.tyreTextureUpdateTimer=void 0,this.tyreMaterial=null,this.tyreTextures=[],this._color=65280,this._speed="idle",this._steeringAngle=0,this.wheels=[],this.wheelIdlePositions=[],this.frontWheels=[];let n=new Set;if(t.traverse(r=>{if(!(r instanceof Mn))return;let s=-1;if(r.name.startsWith("part_hp_12")?s=0:r.name.startsWith("part_hp_14")?s=1:r.name.startsWith("part_hp_16")?s=2:r.name.startsWith("part_hp_18")&&(s=3),s>-1){r.geometry.boundingBox||r.geometry.computeBoundingBox();let a=Pe.avg(r.geometry.boundingBox.min,r.geometry.boundingBox.max);return(0==s||2==s)&&(a={x:a.x,y:a.y,z:a.z+1.5}),r.geometry.translate(...Pe.spr(Pe.neg(a))),r.position.set(...Pe.spr(a)),this.wheelIdlePositions[s]=a,this.wheels.push(r),void(s<2&&this.frontWheels.push(r))}const o=r.material.map;o&&n.add(o)}),this.textures=Array.from(n).map(r=>{const s=new ko(document.createElement("img"));return s.flipY=r.flipY,ia(s),[r,s]}),t.traverse(r=>{if(!(r instanceof Mn))return;const s=r.material.map;if(s){const o=this.textures.find(([a,l])=>a===s);o&&(r.material.map=o[1])}}),this.hasWheels){const r=new Pu;this.tyreTextures=[0,1,2,3].map(s=>r.load(`${e}/m${s}00.png`));for(const s of this.tyreTextures)ia(s);this.tyreMaterial=new qi({map:this.tyreTextures[0]}),this.tyreMaterial.transparent=!0,this.tyreMaterial.alphaTest=.5,this.tyreMaterial.map.wrapS=Ii,this.tyreMaterial.map.wrapT=Ii,this.tyreMaterial.polygonOffset=!0,this.tyreMaterial.polygonOffsetFactor=-4;for(const s of this.wheels)s.material=this.tyreMaterial}this.color=65280,this.recolorCar().then()}get color(){return this._color}set color(t){t!==this._color&&(this._color=t,this.recolorCar().then())}get speed(){return this._speed}set speed(t){if(t!==this._speed){switch(this._speed=t,this.tyreTextureUpdateTimer&&clearInterval(this.tyreTextureUpdateTimer),t){case"idle":this.tyreMaterial.map=this.tyreTextures[0];break;case"slow":let e=!0;this.tyreTextureUpdateTimer=setInterval(()=>{this.tyreMaterial.map=this.tyreTextures[e?1:2],this.tyreMaterial.needsUpdate=!0,e=!e},16);break;case"fast":this.tyreMaterial.map=this.tyreTextures[3]}this.tyreMaterial.needsUpdate=!0}}get steeringAngle(){return this._steeringAngle}set steeringAngle(t){if(t!==this._steeringAngle){this._steeringAngle=t;for(const e of this.frontWheels)e.rotation.set(0,0,t)}}get hasWheels(){return this.wheels.length>0}recolorCar(){var t=this;return tt(function*(){const[e,n,r]=[t.color>>16,t.color>>8&255,255&t.color];for(const[s,o]of t.textures){for(let a=100;a>0&&!s.source.data;a--)yield p$(50);m$(s.source.data,(a,l)=>{if(a[l]+a[l+2]{class i{constructor(e,n,r){this.eelDelegate=e,this.main=n,this.cdr=r,this._resource$=new gt(null),this.changed=new We,this.customControls=[],this.previewPaths$=new gt(null),this.destroyed$=new Re,this.serializerSettings={geometry__save_obj:!0,geometry__save_blend:!1,geometry__export_to_gg_web_engine:!1}}get resource(){return this._resource$.getValue()}set resource(e){this._resource$.next(e)}ngAfterViewInit(){var e=this;return tt(function*(){e._resource$.pipe(He(e.destroyed$)).subscribe(function(){var n=tt(function*(r){e.previewPaths$.next(yield e.loadPreviewFilePaths(r?.id))});return function(r){return n.apply(this,arguments)}}()),e.main.dataBlockChange$.pipe(He(e.destroyed$),gn(([n,r])=>!!e.resource&&n.startsWith(e.resource.id)),ml(1500)).subscribe(tt(function*(){e.previewPaths$.next(null),e.previewPaths$.next(yield e.postTmpUpdates(e.resource?.id))}))})()}onObjectLoaded(e){var n=this;return tt(function*(){try{const r=new Pme(e,n.previewPaths$.value[0].substring(0,n.previewPaths$.value[0].lastIndexOf("/"))+"/assets");let s=null;const o=a=>{s&&clearTimeout(s),s=setTimeout(()=>r.color=a,50)};n.customControls=[{title:"NFS2 car features",controls:[{label:"Car color",type:"color",value:65280,change:a=>o(a)}]}],r.hasWheels&&n.customControls[0].controls.push({label:"Car speed",type:"radio",options:["idle","slow","fast"],value:"idle",change:a=>{r.speed=a}},{label:"Steering angle",type:"slider",minValue:-.7,maxValue:.7,valueStep:.05,value:0,change:a=>{r.steeringAngle=a}}),n.cdr.markForCheck()}catch(r){console.error(r)}})()}postTmpUpdates(e){var n=this;return tt(function*(){if(e){const r=yield n.eelDelegate.serializeResourceTmp(e,Object.entries(n.main.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 tt(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)(E(Ql),E(ka),E(Zn))},i.\u0275cmp=ot({type:i,selectors:[["app-geo-geometry",8,"block-ui"]],inputs:{resource:"resource"},outputs:{changed:"changed"},attrs:Ome,decls:4,vars:8,consts:[[3,"paths","groupFunction","customControls","onObjectLoaded"],[3,"resource",4,"ngIf"],[3,"resource"]],template:function(e,n){1&e&&(W(0,"app-obj-viewer",0),Ue("onObjectLoaded",function(s){return n.onObjectLoaded(s)}),Ct(1,"async"),j(),fe(2,Fme,2,3,"app-compound-block-ui",1),Ct(3,"async")),2&e&&(U("paths",Tt(1,4,n.previewPaths$))("groupFunction",n.previewObjectGroupFunc)("customControls",n.customControls),G(2),U("ngIf",!Tt(3,6,n.main.hideHiddenFields$)))},dependencies:[vi,Jl,h$,pl],changeDetection:0}),i})();const Nme=function(){return["children","items_descr"]};let Bme=(()=>{class i{constructor(){this._resource=null,this.hideBlockActions=!1,this.resourceMap={},this.changed=new We}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:rc(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=ot({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&&De(0,"app-compound-block-ui",0)(1,"app-sidenav-res-list",1),2&e&&(U("resource",n.resource)("hideBlockActions",n.hideBlockActions)("fieldBlacklist",so(4,Nme)),G(1),U("resources",n.resourceMap))},dependencies:[Jl,xC],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})();const Ume=["previewCanvasContainer"],Vme=["previewCanvas"];function zme(i,t){1&i&&De(0,"mat-spinner",16),2&i&&U("diameter",40)}function Hme(i,t){1&i&&De(0,"mat-spinner",17)}var Df=(()=>{return(i=Df||(Df={})).ThreeModel="model",i.Bitmap="bitmap",i.TwoSidedBitmap="two_sided_bitmap",Df;var i})();class Gme extends QH{constructor(t,e,n){super(t,{loadDepth:40,inertia:2}),this.mapGraph=t,this.qfsPath=e,this.hideUnknownEntities$=n,this.textureLoader=new Pu,this.terrainMaterials={},this.objLoader=new Qb,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(Zl(),He(this._onRemoved$)).subscribe(e=>{for(const n of this.unknownEntities)n.visible=!e})}getPlaceholderTexture(){var t=this;return tt(function*(){return t._placeholder?t._placeholder:(t._placeholderPromise||(t._placeholderPromise=t.textureLoader.loadAsync("assets/placeholder_texture.png")),t._placeholderPromise)})()}getPlaceholderTerrainTexture(){var t=this;return tt(function*(){return t._placeholderTerrain?t._placeholderTerrain:(t._placeholderTerrainPromise||(t._placeholderTerrainPromise=t.textureLoader.loadAsync("assets/placeholder_texture.png").then(e=>(e.wrapS=Pa,e.wrapT=Ii,ia(e),e.flipY=!0,e))),t._placeholderTerrainPromise)})()}loadChunk(t){var e=this;return tt(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 Mn&&(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:Pe.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:Yi.fromAngle(Pe.nZ,l.rotation)}));const o=(yield Promise.all(s.map(l=>e.loadPropInternal(l)))).filter(l=>!!l),a=new Zo({object3D:new na(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 qi({side:Ls,transparent:!0,visible:!1}),this.qfsPath?this.textureLoader.loadAsync(`${this.qfsPath}/${t}.png`).then(e=>{e.wrapS=Pa,e.wrapT=Ii,ia(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 tt(function*(){let n=!1;if(t.type==Df.ThreeModel){let r;try{if(!e.qfsPath)throw new Error;const o=new bO,a=new Qb,l=yield o.loadAsync(`${e.qfsPath}/props/${t.data.data.resource_id}/0/material.mtl`);l.preload(),a.setMaterials(l),r=new na(yield a.loadAsync(`${e.qfsPath}/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 Mn){const a=o.material instanceof Array?o.material:[o.material];for(const l of a)l.transparent=!0,l.alphaTest=.5,l instanceof qi&&l.map&&(l.map.wrapS=Ii,l.map.wrapT=Ii,ia(l.map),l.map.needsUpdate=!0)}});const s=new Zo({object3D: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,d)=>new Array(d).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 Fo,[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,d]=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 Zo({object3D:new na(s)});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 tt(function*(){const s=t.split(";"),o=yield r.getPlaceholderTexture();let a=!1,l=[];r.qfsPath?l=yield Promise.all(s.map(h=>r.textureLoader.loadAsync(`${r.qfsPath}/foreground/${h}.png`).catch(()=>(a=!0,o)))):(a=!0,l=s.map(()=>o));const c=l.map(h=>(ia(h),new qi({map:h,alphaTest:.5,transparent:!0,side:Ls}))),d=new Mn(new Iu(e.x,e.y),c[0]);if(d.rotateX(Math.PI/2),d.position.set(0,0,e.y/2),c.length>1){let h=-1;Ym(r.world).pipe(o4(n&&!isNaN(+n)?1e3*+n:250)).subscribe(()=>{h=(h+1)%c.length,d.material=c[h]})}return[d,a]})()}}let $me=(()=>{class i{constructor(e,n,r){this.eelDelegate=e,this.cdr=n,this.mainService=r,this._resource$=new gt(null),this.changed=new We,this.previewLoading$=new gt(!0),this.previewQfsLocation$=new gt(null),this.previewQfsLoading$=new gt(!1),this.pointer$=new gt(null),this.selectedSplineIndex$=new gt(0),this.qfsPath=null,this.name="",this.renderer=null,this.map=null,this.roadPath=null,this.destroyed$=new Re}get resource(){return this._resource$.getValue()}set resource(e){this._resource$.next(e)}get roadSpline(){return this.resource?.data.block_positions||[]}ngAfterViewInit(){var e=this;return tt(function*(){var s;e.world=new sk(new vO,{init:(s=tt(function*(){}),function(){return s.apply(this,arguments)}),simulate:()=>{},loader:{loadFromGgGlb:function(){var s=tt(function*(...o){return[]});return function(){return s.apply(this,arguments)}}()}}),yield e.world.init(),e.skySphere=new Zo({object3D:e.world.visualScene.factory.createPrimitive({shape:"SPHERE",radius:1e3},{color:16777215})}),e.skySphere.object3D.nativeMesh.material.side=Ls,e.world.addEntity(e.skySphere),e.selectionSphere=new Zo({object3D: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 $S(16777215,2));let n=new gt({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=Yi.lookAt(e.renderer.camera.position,Pe.add(e.renderer.camera.position,Pe.Y),Pe.Z),Ym(e.world).pipe(He(e.destroyed$)).subscribe(()=>{e.renderer&&(e.skySphere.position=e.renderer.camera.position,e.pointer$.next(e.renderer.camera.position))}),e.controller=new n4(e.world.keyboardInput,e.renderer,{mouseOptions:{canvas:e.previewCanvas.nativeElement,pointerLock:!0},keymap:"wasd+arrows",cameraLinearSpeed:40,cameraBoostMultiplier:4,cameraMovementElasticity:100,cameraRotationElasticity:30,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(He(e.destroyed$)).subscribe(function(){var s=tt(function*(o){e.previewLoading$.next(!0),o?(e.previewQfsLocation$.next(o.id.substring(0,o.id.indexOf(".TRK"))+"0.QFS"),yield e.loadTerrainChunks(o.id),yield e.onQfsSelected(e.previewQfsLocation$.value)):(yield e.loadTerrainChunks(),yield e.loadPreview()),e.previewLoading$.next(!1)});return function(o){return s.apply(this,arguments)}}()),e.mainService.dataBlockChange$.pipe(He(e.destroyed$),gn(([s,o])=>!!e.resource&&s.startsWith(e.resource.id)),ml(3e3)).subscribe(tt(function*(){e.previewLoading$.next(!0),yield e.postTmpUpdates(e.resource?.id),yield e.loadPreview(),e.previewLoading$.next(!1)})),e.selectedSplineIndex$.pipe(He(e.destroyed$),ml(250)).subscribe(s=>{if(e.resource){let o=e.resource.data.block_positions[s];if(!o)return;o={x:o.x,y:o.z,z:o.y},e.selectionSphere.position=o,e.renderer&&(e.renderer.position=Pe.add(o,Pe.rotAround({x:10,y:-12,z:5},{x:0,y:0,z:1},-0)),e.renderer.rotation=Yi.lookAt(e.renderer.position,o,{x:0,y:0,z:1}),e.controller.reset())}})})()}onQfsSelected(e){var n=this;return tt(function*(){if(n.qfsPath!=e){n.previewQfsLoading$.next(!0);try{const r=yield n.eelDelegate.serializeResource(e),s=new Pu,o=r.find(a=>a.endsWith("spherical.png"));if(o){const a=yield s.loadAsync(o);a.colorSpace="srgb",a.mapping=lc,n.skySphere.object3D.nativeMesh.material.map=a}else n.skySphere.object3D.nativeMesh.material.map=null;n.skySphere.object3D.nativeMesh.material.needsUpdate=!0,n.qfsPath=e}catch{n.skySphere.object3D.nativeMesh.material.map=null,n.skySphere.object3D.nativeMesh.material.needsUpdate=!0,n.qfsPath=null}finally{n.previewQfsLoading$.next(!1)}yield n.loadPreview()}})()}loadTerrainChunks(e){var n=this;return tt(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 tt(function*(){if(e.roadPath=e.resource?.data.block_positions.map(r=>({x:r.x,y:r.z,z:r.y})),!e.terrainChunksObjLocation||!e.roadPath)return;const n=Km.fromMapArray(e.roadPath.map((r,s)=>({path:`${e.terrainChunksObjLocation}terrain_chunk_${s}`,position:r,loadOptions:{}}))||[],!0);e.unloadPreview(),e.map=new Gme(n,e.qfsPath&&"resources/"+e.qfsPath,e.mainService.hideHiddenFields$),e.map.resource=e.resource,e.map.isOpenedTrack=!1,Ym(e.world).pipe(He(e.destroyed$)).subscribe(()=>{e.map&&e.renderer&&e.map.loaderCursor$.next(e.renderer.position)}),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 tt(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)(E(Ql),E(Zn),E(ka))},i.\u0275cmp=ot({type:i,selectors:[["app-trk-map-block-ui"]],viewQuery:function(e,n){if(1&e&&(Wn(Ume,5),Wn(Vme,5)),2&e){let r;Et(r=At())&&(n.previewCanvasContainer=r.first),Et(r=At())&&(n.previewCanvas=r.first)}},inputs:{resource:"resource"},outputs:{changed:"changed"},decls:32,vars:24,consts:[[1,"qfsSelector"],["appearance","fill"],["matInput","","type","text",3,"value"],["customQfsInput",""],["mat-button","",3,"click"],["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"],["mode","indeterminate",3,"diameter"],["mode","indeterminate"]],template:function(e,n){if(1&e){const r=di();W(0,"div",0)(1,"h4"),Ve(2,"Preview QFS file"),j(),W(3,"mat-form-field",1)(4,"mat-label"),Ve(5,"Custom QFS path"),j(),De(6,"input",2,3),Ct(8,"async"),j(),W(9,"button",4),Ue("click",function(){an(r);const o=Zi(7);return zt(n.onQfsSelected(o.value))}),Ve(10,"LOAD"),j(),fe(11,zme,1,1,"mat-spinner",5),Ct(12,"async"),j(),W(13,"div",6)(14,"div",7,8),De(16,"canvas",9,10),fe(18,Hme,1,0,"mat-spinner",11),Ct(19,"async"),j(),W(20,"div",12,8)(22,"mat-form-field",1)(23,"mat-label"),Ve(24,"Spline item"),j(),W(25,"input",13),Ue("ngModelChange",function(o){return n.selectedSplineIndex$.next(o)}),Ct(26,"async"),Ct(27,"async"),j()(),De(28,"app-tri-minimap",14),Ct(29,"async"),j()(),De(30,"app-compound-block-ui",15),Ct(31,"async")}if(2&e){let r;G(6),U("value",Tt(8,10,n.previewQfsLocation$)),G(5),U("ngIf",Tt(12,12,n.previewQfsLoading$)),G(7),U("ngIf",Tt(19,14,n.previewLoading$)),G(7),U("min",0)("max",4*(null==(r=Tt(26,16,n._resource$))?null:r.data.num_blocks)-1)("ngModel",Tt(27,18,n.selectedSplineIndex$)),G(3),U("roadSpline",n.roadSpline)("pointer",Tt(29,20,n.pointer$))("splineClosed",!0),G(2),U("resource",Tt(31,22,n._resource$))}},dependencies:[vi,gl,mu,tc,_u,gu,Kc,vl,To,ic,ib,Jb,Jl,f$,pl],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}.qfsSelector[_ngcontent-%COMP%]{display:flex;align-items:center;width:100%;column-gap:1rem}.qfsSelector[_ngcontent-%COMP%] h4[_ngcontent-%COMP%]{min-width:-moz-fit-content;min-width:fit-content}.qfsSelector[_ngcontent-%COMP%] mat-form-field[_ngcontent-%COMP%]{flex-grow:1}.qfsSelector[_ngcontent-%COMP%] mat-spinner[_ngcontent-%COMP%], .qfsSelector[_ngcontent-%COMP%] button[_ngcontent-%COMP%]{margin-bottom:1.34375em}"],changeDetection:0}),i})();function Wme(i,t){if(1&i&&(W(0,"mat-error"),Ve(1),j()),2&i){const e=he(2);G(1),tm(" ",e.resourceError.data.error_class,": ",e.resourceError.data.error_text," ")}}function jme(i,t){1&i&&De(0,"mat-spinner",5)}function Yme(i,t){if(1&i&&(W(0,"div",2),fe(1,Wme,2,2,"mat-error",3),fe(2,jme,1,0,"mat-spinner",4),j()),2&i){const e=he();G(1),U("ngIf",e.resourceError),G(1),U("ngIf",!e.resourceError)}}function qme(i,t){}let t0=(()=>{class i{constructor(e){this.mainService=e,this._component=null,this._componentChangedSub=null,this.destroyed$=new Re,this.resourceSet$=new Re,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(He(this.destroyed$),He(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 Xme(i,t){1&i&&De(0,"mat-icon",17)}function Kme(i,t){1&i&&De(0,"mat-icon",18)}let Zme=(()=>{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 tt(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 tt(function*(){if(e.mainService.hasUnsavedChanges){let n=e.dialog.open(CV,{data:{text:"There are unsaved changes, which will be lost. Are you sure you want to reload file?"}});if(!(yield lR(n.afterClosed())))return}yield e.mainService.reloadResource(),e.cdr.markForCheck()})()}}return i.\u0275fac=function(e){return new(e||i)(E(Ql),E(ka),E(Bm),E(IV),E(Zn))},i.\u0275cmp=ot({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&&(W(0,"mat-toolbar",0)(1,"span"),Ve(2),Ct(3,"async"),Ct(4,"async"),j(),De(5,"span",1),W(6,"button",2),Ue("click",function(){return n.toggleUnknownsVisibility()}),fe(7,Xme,1,0,"mat-icon",3),Ct(8,"async"),fe(9,Kme,1,0,"mat-icon",4),Ct(10,"async"),j(),De(11,"mat-divider",5)(12,"app-block-actions",6),Ct(13,"async"),W(14,"button",7),Ue("click",function(){return n.reloadResource()}),Ct(15,"async"),De(16,"mat-icon",8),j(),De(17,"mat-divider",5),W(18,"button",9),Ue("click",function(){return n.saveResource()}),Ct(19,"async"),Ct(20,"async"),De(21,"mat-icon",10),j()(),W(22,"div",11),De(23,"div",12)(24,"app-editor",13),Ct(25,"async"),Ct(26,"async"),Ct(27,"async"),W(28,"div",14)(29,"a",15),De(30,"img",16),j()(),De(31,"div",12),j()),2&e){let r;G(2),tm("",(null==(r=Tt(3,9,n.mainService.resource$))?null:r.name)||"...","",Tt(4,11,n.mainService.hasUnsavedChanges$)?"*":"",""),G(5),U("ngIf",Tt(8,13,n.mainService.hideHiddenFields$)),G(2),U("ngIf",!Tt(10,15,n.mainService.hideHiddenFields$)),G(3),U("resource",Tt(13,17,n.mainService.resource$)),G(2),U("disabled",!Tt(15,19,n.mainService.eelDelegate.openedResourcePath$)),G(4),U("disabled",!Tt(19,21,n.mainService.resource$)||!Tt(20,23,n.mainService.hasUnsavedChanges$)),G(6),U("resource",Tt(25,25,n.mainService.customActionRunning$)?null:Tt(26,27,n.mainService.resource$)||Tt(27,29,n.mainService.error$))("hideBlockActions",!0)}},dependencies:[vi,MJ,SJ,Os,XM,gR,t0,nE,pl],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 w$(i){return new pe(3e3,!1)}function kge(){return typeof window<"u"&&typeof window.document<"u"}function wO(){return typeof process<"u"&&"[object process]"==={}.toString.call(process)}function Nu(i){switch(i.length){case 0:return new tb;case 1:return i[0];default:return new oV(i)}}function M$(i,t,e,n,r=new Map,s=new Map){const o=[],a=[];let l=-1,c=null;if(n.forEach(d=>{const h=d.get("offset"),p=h==l,m=p&&c||new Map;d.forEach((g,b)=>{let v=b,y=g;if("offset"!==b)switch(v=t.normalizePropertyName(v,o),y){case rR:y=r.get(b);break;case Xc: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 bge(i){return new pe(3502,!1)}();return a}function MO(i,t,e,n){switch(t){case"start":i.onStart(()=>n(e&&CO(e,"start",i)));break;case"done":i.onDone(()=>n(e&&CO(e,"done",i)));break;case"destroy":i.onDestroy(()=>n(e&&CO(e,"destroy",i)))}}function CO(i,t,e){const s=SO(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 SO(i,t,e,n,r="",s=0,o){return{element:i,triggerName:t,fromState:e,toState:n,phaseName:r,totalTime:s,disabled:!!o}}function ra(i,t,e){let n=i.get(t);return n||i.set(t,n=e),n}function C$(i){const t=i.indexOf(":");return[i.substring(1,t),i.slice(t+1)]}let EO=(i,t)=>!1,S$=(i,t,e)=>[],E$=null;function AO(i){const t=i.parentNode||i.host;return t===E$?null:t}(wO()||typeof Element<"u")&&(kge()?(E$=(()=>document.documentElement)(),EO=(i,t)=>{for(;t;){if(t===i)return!0;t=AO(t)}return!1}):EO=(i,t)=>i.contains(t),S$=(i,t,e)=>{if(e)return Array.from(i.querySelectorAll(t));const n=i.querySelector(t);return n?[n]:[]});let Tf=null,A$=!1;const D$=EO,T$=S$;let I$=(()=>{class i{validateStyleProperty(e){return function Oge(i){Tf||(Tf=function Fge(){return typeof document<"u"?document.body:null}()||{},A$=!!Tf.style&&"WebkitAppearance"in Tf.style);let t=!0;return Tf.style&&!function Pge(i){return"ebkit"==i.substring(1,6)}(i)&&(t=i in Tf.style,!t&&A$&&(t="Webkit"+i.charAt(0).toUpperCase()+i.slice(1)in Tf.style)),t}(e)}matchesElement(e,n){return!1}containsElement(e,n){return D$(e,n)}getParentElement(e){return AO(e)}query(e,n,r){return T$(e,n,r)}computeStyle(e,n,r){return r||""}animate(e,n,r,s,o,a=[],l){return new tb(r,s)}}return i.\u0275fac=function(e){return new(e||i)},i.\u0275prov=ke({token:i,factory:i.\u0275fac}),i})(),DO=(()=>{class i{}return i.NOOP=new I$,i})();const Lge=1e3,TO="ng-enter",iE="ng-leave",rE="ng-trigger",sE=".ng-trigger",k$="ng-animating",IO=".ng-animating";function hd(i){if("number"==typeof i)return i;const t=i.match(/^(-?[\.\d]+)(m?s)/);return!t||t.length<2?0:RO(parseFloat(t[1]),t[2])}function RO(i,t){return"s"===t?i*Lge:i}function oE(i,t,e){return i.hasOwnProperty("duration")?i:function Bge(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(w$()),{duration:0,delay:0,easing:""};r=RO(parseFloat(a[1]),a[2]);const l=a[3];null!=l&&(s=RO(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 Qme(){return new pe(3100,!1)}()),a=!0),s<0&&(t.push(function Jme(){return new pe(3101,!1)}()),a=!0),a&&t.splice(l,0,w$())}return{duration:r,delay:s,easing:o}}(i,t,e)}function n0(i,t={}){return Object.keys(i).forEach(e=>{t[e]=i[e]}),t}function P$(i){const t=new Map;return Object.keys(i).forEach(e=>{t.set(e,i[e])}),t}function Bu(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 F$(i,t,e){return e?t+":"+e+";":""}function L$(i){let t="";for(let e=0;e{const s=PO(r);e&&!e.has(r)&&e.set(r,i.style[s]),i.style[s]=n}),wO()&&L$(i))}function If(i,t){i.style&&(t.forEach((e,n)=>{const r=PO(n);i.style[r]=""}),wO()&&L$(i))}function r0(i){return Array.isArray(i)?1==i.length?i[0]:iV(i):i}const kO=new RegExp("{{\\s*(.+?)\\s*}}","g");function N$(i){let t=[];if("string"==typeof i){let e;for(;e=kO.exec(i);)t.push(e[1]);kO.lastIndex=0}return t}function s0(i,t,e){const n=i.toString(),r=n.replace(kO,(s,o)=>{let a=t[o];return null==a&&(e.push(function tge(i){return new pe(3003,!1)}()),a=""),a.toString()});return r==n?i:r}function aE(i){const t=[];let e=i.next();for(;!e.done;)t.push(e.value),e=i.next();return t}const zge=/-+([a-z0-9])/g;function PO(i){return i.replace(zge,(...t)=>t[1].toUpperCase())}function Hge(i){return i.replace(/([a-z])([A-Z])/g,"$1-$2").toLowerCase()}function sa(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 nge(i){return new pe(3004,!1)}()}}function B$(i,t){return window.getComputedStyle(i)[t]}const dE="*";function qge(i,t){const e=[];return"string"==typeof i?i.split(/\s*,\s*/).forEach(n=>function Xge(i,t,e){if(":"==i[0]){const l=function Kge(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 mge(i){return new pe(3015,!1)}()),t;const r=n[1],s=n[2],o=n[3];t.push(U$(r,o));"<"==s[0]&&!(r==dE&&o==dE)&&t.push(U$(o,r))}(n,e,t)):e.push(i),e}const uE=new Set(["true","1"]),hE=new Set(["false","0"]);function U$(i,t){const e=uE.has(i)||hE.has(i),n=uE.has(t)||hE.has(t);return(r,s)=>{let o=i==dE||i==r,a=t==dE||t==s;return!o&&e&&"boolean"==typeof r&&(o=r?uE.has(i):hE.has(i)),!a&&n&&"boolean"==typeof s&&(a=s?uE.has(t):hE.has(t)),o&&a}}const Zge=new RegExp("s*:selfs*,?","g");function OO(i,t,e,n){return new Qge(i).build(t,e,n)}class Qge{constructor(t){this._driver=t}build(t,e,n){const r=new t_e(e);return this._resetContextStyleTimingState(r),sa(this,r0(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 rge(){return new pe(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(d=>{l.name=d,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 sge(){return new pe(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=>{N$(l).forEach(c=>{o.hasOwnProperty(c)||s.add(c)})})}),s.size&&(aE(s.values()),e.errors.push(function oge(i,t){return new pe(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=sa(this,r0(t.animation),e);return{type:1,matchers:qge(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=>sa(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=sa(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 i_e(i,t){if(i.hasOwnProperty("duration"))return i;if("number"==typeof i)return FO(oE(i,t).duration,0,"");const e=i;if(e.split(/\s+/).some(s=>"{"==s.charAt(0)&&"{"==s.charAt(1))){const s=FO(0,0,"");return s.dynamic=!0,s.strValue=e,s}const r=oE(e,t);return FO(r.duration,r.delay,r.easing)}(t.timings,e.errors);e.currentAnimateTimings=n;let r,s=t.styles?t.styles:si({});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=si(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===Xc?n.push(a):e.errors.push(new pe(3002,!1)):n.push(P$(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),d=c.get(l);let h=!0;d&&(s!=r&&s>=d.startTime&&r<=d.endTime&&(e.errors.push(function lge(i,t,e,n,r){return new pe(3010,!1)}()),h=!1),s=d.startTime),h&&c.set(l,{startTime:s,endTime:r}),e.options&&function Vge(i,t,e){const n=t.params||{},r=N$(i);r.length&&r.forEach(s=>{n.hasOwnProperty(s)||e.push(function ege(i){return new pe(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 cge(){return new pe(3011,!1)}()),n;let s=0;const o=[];let a=!1,l=!1,c=0;const d=t.steps.map(y=>{const M=this._makeStyleAst(y,e);let x=null!=M.offset?M.offset:function n_e(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:sa(this,r0(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 Jge(i){const t=!!i.split(/\s*,\s*/).find(e=>":self"==e);return t&&(i=i.replace(Zge,"")),i=i.replace(/@\*/g,sE).replace(/@\w+/g,e=>sE+"-"+e.slice(1)).replace(/:animating/g,IO),[i,t]}(t.selector);e.currentQuerySelector=n.length?n+" "+s:s,ra(e.collectedStyles,e.currentQuerySelector,new Map);const a=sa(this,r0(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 fge(){return new pe(3013,!1)}());const n="full"===t.timings?{duration:0,delay:0,easing:"full"}:oE(t.timings,e.errors,!0);return{type:12,animation:sa(this,r0(t.animation),e),timings:n,options:null}}}class t_e{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=n0(i)).params&&(i.params=function e_e(i){return i?n0(i):null}(i.params)):i={},i}function FO(i,t,e){return{duration:i,delay:t,easing:e}}function LO(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 fE{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 o_e=new RegExp(":enter","g"),l_e=new RegExp(":leave","g");function NO(i,t,e,n,r,s=new Map,o=new Map,a,l,c=[]){return(new c_e).buildKeyframes(i,t,e,n,r,s,o,a,l,c)}class c_e{buildKeyframes(t,e,n,r,s,o,a,l,c,d=[]){c=c||new fE;const h=new BO(t,e,c,r,s,d,[]);h.options=l;const p=l.delay?hd(l.delay):0;h.currentTimeline.delayNextStep(p),h.currentTimeline.setStyles([o],null,h.errors,l),sa(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()):[LO(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:hd(s0(s,r?.params??{},e.errors));n.delayNextStep(o)}}}_visitSubInstructions(t,e,n){let s=e.currentTimeline.currentTime;const o=null!=n.duration?hd(n.duration):null,a=null!=n.delay?hd(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),sa(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=pE);const o=hd(s.delay);r.delayNextStep(o)}t.steps.length&&(t.steps.forEach(o=>sa(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?hd(t.options.delay):0;t.steps.forEach(o=>{const a=e.createSubContext(t.options);s&&a.delayNextStep(s),sa(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 oE(e.params?s0(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?hd(r.delay):0;s&&(6===e.previousNode.type||0==n&&e.currentTimeline.hasCurrentStyleProperties())&&(e.currentTimeline.snapshotCurrentStyles(),e.previousNode=pE);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,d)=>{e.currentQueryIndex=d;const h=e.createSubContext(t.options,c);s&&h.delayNextStep(s),c===e.element&&(l=h.currentTimeline),sa(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 d=e.currentTimeline;l&&d.delayNextStep(l);const h=d.currentTime;sa(this,t.animation,e),e.previousNode=t,n.currentStaggerTime=r.currentTime-h+(r.startTime-n.currentTimeline.startTime)}}const pE={};class BO{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=pE,this.subContextCount=0,this.options={},this.currentQueryIndex=0,this.currentQueryTotal=0,this.currentStaggerTime=0,this.currentTimeline=l||new mE(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=hd(n.duration)),null!=n.delay&&(r.delay=hd(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]=s0(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 BO(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=pE,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 d_e(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(o_e,"."+this._enterClassName)).replace(l_e,"."+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 pge(i){return new pe(3014,!1)}()),a}}class mE{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 mE(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||Xc),this._currentKeyframe.set(e,Xc);this._currentEmptyStepKeyframe=this._currentKeyframe}setStyles(t,e,n,r){e&&this._previousKeyframe.set("easing",e);const s=r&&r.params||{},o=function u_e(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,Xc)}else Bu(r,e)}),e}(t,this._globalTimelineStyles);for(let[a,l]of o){const c=s0(l,s,n);this._pendingStyles.set(a,c),this._localTimelineStyles.has(a)||this._backFill.set(a,this._globalTimelineStyles.get(a)??Xc),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=Bu(a,new Map,this._backFill);c.forEach((d,h)=>{d===rR?t.add(h):d===Xc&&e.add(h)}),n||c.set("offset",l/this.duration),r.push(c)});const s=t.size?aE(t.values()):[],o=e.size?aE(e.values()):[];if(n){const a=r[0],l=new Map(a);a.set("offset",0),l.set("offset",1),r=[a,l]}return LO(this.element,r,s,o,this.duration,this.startTime,this.easing,!1)}}class d_e extends mE{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=Bu(t[0]);l.set("offset",0),s.push(l);const c=Bu(t[0]);c.set("offset",H$(a)),s.push(c);const d=t.length-1;for(let h=1;h<=d;h++){let p=Bu(t[h]);const m=p.get("offset");p.set("offset",H$((e+m*n)/o)),s.push(p)}n=o,e=0,r="",t=s}return LO(this.element,t,this.preStyleProps,this.postStyleProps,n,e,r,!0)}}function H$(i,t=3){const e=Math.pow(10,t-1);return Math.round(i*e)/e}class UO{}const h_e=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 f_e extends UO{normalizePropertyName(t,e){return PO(t)}normalizeStyleValue(t,e,n,r){let s="";const o=n.toString().trim();if(h_e.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 ige(i,t){return new pe(3005,!1)}())}return o+s}}function G$(i,t,e,n,r,s,o,a,l,c,d,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:d,totalTime:h,errors:p}}const VO={};class $${constructor(t,e,n){this._triggerName=t,this.ast=e,this._stateStyles=n}match(t,e,n,r){return function p_e(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,d){const h=[],p=this.ast.options&&this.ast.options.params||VO,g=this.buildStyles(n,a&&a.params||VO,h),b=l&&l.params||VO,v=this.buildStyles(r,b,h),y=new Set,M=new Map,x=new Map,C="void"===r,F={params:m_e(b,p),delay:this.ast.options?.delay},D=d?[]:NO(t,e,this.ast.animation,s,o,g,v,F,c,h);let k=0;if(D.forEach(T=>{k=Math.max(T.duration+T.delay,k)}),h.length)return G$(e,this._triggerName,n,r,C,g,v,[],[],M,x,k,h);D.forEach(T=>{const A=T.element,$=ra(M,A,new Set);T.preStyleProps.forEach(ne=>$.add(ne));const ie=ra(x,A,new Set);T.postStyleProps.forEach(ne=>ie.add(ne)),A!==e&&y.add(A)});const B=aE(y.values());return G$(e,this._triggerName,n,r,C,g,v,D,B,M,x,k)}}function m_e(i,t){const e=n0(t);for(const n in i)i.hasOwnProperty(n)&&null!=i[n]&&(e[n]=i[n]);return e}class g_e{constructor(t,e,n){this.styles=t,this.defaultParams=e,this.normalizer=n}buildStyles(t,e){const n=new Map,r=n0(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=s0(o,r,e));const l=this.normalizer.normalizePropertyName(a,e);o=this.normalizer.normalizeStyleValue(a,l,o,e),n.set(a,o)})}),n}}class v_e{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 g_e(r.style,r.options&&r.options.params||{},n))}),W$(this.states,"true","1"),W$(this.states,"false","0"),e.transitions.forEach(r=>{this.transitionFactories.push(new $$(t,r,this.states))}),this.fallbackTransition=function y_e(i,t,e){return new $$(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 W$(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 b_e=new fE;class x_e{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=OO(this._driver,e,n,r);if(n.length)throw function xge(i){return new pe(3503,!1)}();this._animations.set(t,s)}_buildPlayer(t,e,n){const r=t.element,s=M$(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=NO(this._driver,e,s,TO,iE,new Map,new Map,n,b_e,r),o.forEach(d=>{const h=ra(a,d.element,new Map);d.postStyleProps.forEach(p=>h.set(p,null))})):(r.push(function wge(){return new pe(3300,!1)}()),o=[]),r.length)throw function Mge(i){return new pe(3504,!1)}();a.forEach((d,h)=>{d.forEach((p,m)=>{d.set(m,this._driver.computeStyle(h,m,Xc))})});const c=Nu(o.map(d=>{const h=a.get(d.element);return this._buildPlayer(d,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 Cge(i){return new pe(3301,!1)}();return e}listen(t,e,n,r){const s=SO(e,"","","");return MO(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 j$="ng-animate-queued",zO="ng-animate-disabled",E_e=[],Y$={namespaceId:"",setForRemoval:!1,setForMove:!1,hasAnimation:!1,removedBeforeQueried:!1},A_e={namespaceId:"",setForMove:!1,setForRemoval:!1,hasAnimation:!1,removedBeforeQueried:!0},Ua="__ng_removed";class HO{get params(){return this.options.params}constructor(t,e=""){this.namespaceId=e;const n=t&&t.hasOwnProperty("value");if(this.value=function R_e(i){return i??null}(n?t.value:t),n){const s=n0(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 o0="void",GO=new HO(o0);class D_e{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,Va(e,this._hostClassName)}listen(t,e,n,r){if(!this._triggers.has(e))throw function Sge(i,t){return new pe(3302,!1)}();if(null==n||0==n.length)throw function Ege(i){return new pe(3303,!1)}();if(!function k_e(i){return"start"==i||"done"==i}(n))throw function Age(i,t){return new pe(3400,!1)}();const s=ra(this._elementListeners,t,[]),o={name:e,phase:n,callback:r};s.push(o);const a=ra(this._engine.statesByElement,t,new Map);return a.has(e)||(Va(t,rE),Va(t,rE+"-"+e),a.set(e,GO)),()=>{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 Dge(i){return new pe(3401,!1)}();return e}trigger(t,e,n,r=!0){const s=this._getTrigger(e),o=new $O(this.id,e,t);let a=this._engine.statesByElement.get(t);a||(Va(t,rE),Va(t,rE+"-"+e),this._engine.statesByElement.set(t,a=new Map));let l=a.get(e);const c=new HO(n,this.id);if(!(n&&n.hasOwnProperty("value"))&&l&&c.absorbOptions(l.options),a.set(e,c),l||(l=GO),c.value!==o0&&l.value===c.value){if(!function F_e(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),hc(t,y)})}return}const p=ra(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||(Va(t,j$),o.onStart(()=>{Yg(t,j$)})),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,sE,!0);n.forEach(r=>{if(r[Ua])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 d=this.trigger(t,c,o0,r);d&&a.push(d)}}),a.length)return this._engine.markElementAsRemoved(this.id,t,!0,e,o),n&&Nu(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)||GO,d=new HO(o0),h=new $O(this.id,o,t);this._engine.totalQueuedPlayers++,this._queue.push({element:t,triggerName:o,transition:l,fromState:c,toState:d,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[Ua];(!s||s===Y$)&&(n.afterFlush(()=>this.clearElementCache(t)),n.destroyInnerAnimations(t),n._onRemovalComplete(t,e))}}insertNode(t,e){Va(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=SO(s,n.triggerName,n.fromState.value,n.toState.value);l._data=t,MO(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 T_e{_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 D_e(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(gE(e)){const s=this._fetchNamespace(t);if(s)return s.trigger(e,n,r),!0}return!1}insertNode(t,e,n,r){if(!gE(e))return;const s=e[Ua];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),Va(t,zO)):this.disabledNodes.has(t)&&(this.disabledNodes.delete(t),Yg(t,zO))}removeNode(t,e,n,r){if(gE(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[Ua]={namespaceId:t,setForRemoval:r,hasAnimation:n,removedBeforeQueried:!1,previousTriggersValues:s}}listen(t,e,n,r,s){return gE(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,sE,!0);e.forEach(n=>this.destroyActiveAnimationsForElement(n)),0!=this.playersByQueriedElement.size&&(e=this.driver.query(t,IO,!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 Nu(this.players).onDone(()=>t());t()})}processLeaveNode(t){const e=t[Ua];if(e&&e.setForRemoval){if(t[Ua]=Y$,e.namespaceId){this.destroyInnerAnimations(t);const n=this._fetchNamespace(e.namespaceId);n&&n.clearElementCache(t)}this._onRemovalComplete(t,e.setForRemoval)}t.classList?.contains(zO)&&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?Nu(e).onDone(()=>{n.forEach(r=>r())}):n.forEach(r=>r())}}reportError(t){throw function Tge(i){return new pe(3402,!1)}()}_flushAnimations(t,e){const n=new fE,r=[],s=new Map,o=[],a=new Map,l=new Map,c=new Map,d=new Set;this.disabledNodes.forEach(q=>{d.add(q);const re=this.driver.query(q,".ng-animate-queued",!0);for(let J=0;J{const J=TO+b++;g.set(re,J),q.forEach(we=>Va(we,J))});const v=[],y=new Set,M=new Set;for(let q=0;qy.add(we)):M.add(re))}const x=new Map,C=K$(p,Array.from(y));C.forEach((q,re)=>{const J=iE+b++;x.set(re,J),q.forEach(we=>Va(we,J))}),t.push(()=>{m.forEach((q,re)=>{const J=g.get(re);q.forEach(we=>Yg(we,J))}),C.forEach((q,re)=>{const J=x.get(re);q.forEach(we=>Yg(we,J))}),v.forEach(q=>{this.processLeaveNode(q)})});const F=[],D=[];for(let q=this._namespaceList.length-1;q>=0;q--)this._namespaceList[q].drainQueuedTransitions(e).forEach(J=>{const we=J.player,Ne=J.element;if(F.push(we),this.collectedEnterElements.length){const Fe=Ne[Ua];if(Fe&&Fe.setForMove){if(Fe.previousTriggersValues&&Fe.previousTriggersValues.has(J.triggerName)){const bt=Fe.previousTriggersValues.get(J.triggerName),St=this.statesByElement.get(J.element);if(St&&St.has(J.triggerName)){const Mt=St.get(J.triggerName);Mt.value=bt,St.set(J.triggerName,Mt)}}return void we.destroy()}}const Ye=!h||!this.driver.containsElement(h,Ne),It=x.get(Ne),en=g.get(Ne),ae=this._buildInstruction(J,n,en,It,Ye);if(ae.errors&&ae.errors.length)return void D.push(ae);if(Ye)return we.onStart(()=>If(Ne,ae.fromStyles)),we.onDestroy(()=>hc(Ne,ae.toStyles)),void r.push(we);if(J.isFallbackTransition)return we.onStart(()=>If(Ne,ae.fromStyles)),we.onDestroy(()=>hc(Ne,ae.toStyles)),void r.push(we);const Oe=[];ae.timelines.forEach(Fe=>{Fe.stretchStartingKeyframe=!0,this.disabledNodes.has(Fe.element)||Oe.push(Fe)}),ae.timelines=Oe,n.append(Ne,ae.timelines),o.push({instruction:ae,player:we,element:Ne}),ae.queriedElements.forEach(Fe=>ra(a,Fe,[]).push(we)),ae.preStyleProps.forEach((Fe,bt)=>{if(Fe.size){let St=l.get(bt);St||l.set(bt,St=new Set),Fe.forEach((Mt,Sn)=>St.add(Sn))}}),ae.postStyleProps.forEach((Fe,bt)=>{let St=c.get(bt);St||c.set(bt,St=new Set),Fe.forEach((Mt,Sn)=>St.add(Sn))})});if(D.length){const q=[];D.forEach(re=>{q.push(function Ige(i,t){return new pe(3505,!1)}())}),F.forEach(re=>re.destroy()),this.reportError(q)}const k=new Map,B=new Map;o.forEach(q=>{const re=q.element;n.has(re)&&(B.set(re,re),this._beforeAnimationBuild(q.player.namespaceId,q.instruction,k))}),r.forEach(q=>{const re=q.element;this._getPreviousPlayers(re,!1,q.namespaceId,q.triggerName,null).forEach(we=>{ra(k,re,[]).push(we),we.destroy()})});const T=v.filter(q=>Q$(q,l,c)),A=new Map;X$(A,this.driver,M,c,Xc).forEach(q=>{Q$(q,l,c)&&T.push(q)});const ie=new Map;m.forEach((q,re)=>{X$(ie,this.driver,new Set(q),l,rR)}),T.forEach(q=>{const re=A.get(q),J=ie.get(q);A.set(q,new Map([...Array.from(re?.entries()??[]),...Array.from(J?.entries()??[])]))});const ne=[],se=[],ge={};o.forEach(q=>{const{element:re,player:J,instruction:we}=q;if(n.has(re)){if(d.has(re))return J.onDestroy(()=>hc(re,we.toStyles)),J.disabled=!0,J.overrideTotalTime(we.totalTime),void r.push(J);let Ne=ge;if(B.size>1){let It=re;const en=[];for(;It=It.parentNode;){const ae=B.get(It);if(ae){Ne=ae;break}en.push(It)}en.forEach(ae=>B.set(ae,Ne))}const Ye=this._buildAnimation(J.namespaceId,we,k,s,ie,A);if(J.setRealPlayer(Ye),Ne===ge)ne.push(J);else{const It=this.playersByElement.get(Ne);It&&It.length&&(J.parentPlayer=Nu(It)),r.push(J)}}else If(re,we.fromStyles),J.onDestroy(()=>hc(re,we.toStyles)),se.push(J),d.has(re)&&r.push(J)}),se.forEach(q=>{const re=s.get(q.element);if(re&&re.length){const J=Nu(re);q.setRealPlayer(J)}}),r.forEach(q=>{q.parentPlayer?q.syncPlayerEvents(q.parentPlayer):q.destroy()});for(let q=0;q!Ye.destroyed);Ne.length?P_e(this,re,Ne):this.processLeaveNode(re)}return v.length=0,ne.forEach(q=>{this.players.push(q),q.onDone(()=>{q.destroy();const re=this.players.indexOf(q);this.players.splice(re,1)}),q.play()}),ne}elementContainsData(t,e){let n=!1;const r=e[Ua];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==o0;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,d=c!==s,h=ra(n,c,[]);this._getPreviousPlayers(c,d,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=[],d=new Set,h=new Set,p=e.timelines.map(g=>{const b=g.element;d.add(b);const v=b[Ua];if(v&&v.removedBeforeQueried)return new tb(g.duration,g.delay);const y=b!==l,M=function O_e(i){const t=[];return Z$(i,t),t}((n.get(b)||E_e).map(k=>k.getRealPlayer())).filter(k=>!!k.element&&k.element===b),x=s.get(b),C=o.get(b),F=M$(0,this._normalizer,0,g.keyframes,x,C),D=this._buildPlayer(g,F,M);if(g.subTimeline&&r&&h.add(b),y){const k=new $O(t,a,b);k.setRealPlayer(D),c.push(k)}return D});c.forEach(g=>{ra(this.playersByQueriedElement,g.element,[]).push(g),g.onDone(()=>function I_e(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))}),d.forEach(g=>Va(g,k$));const m=Nu(p);return m.onDestroy(()=>{d.forEach(g=>Yg(g,k$)),hc(l,e.toStyles)}),h.forEach(g=>{ra(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 tb(t.duration,t.delay)}}class $O{constructor(t,e,n){this.namespaceId=t,this.triggerName=e,this.element=n,this._player=new tb,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=>MO(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){ra(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 gE(i){return i&&1===i.nodeType}function q$(i,t){const e=i.style.display;return i.style.display=t??"none",e}function X$(i,t,e,n,r){const s=[];e.forEach(l=>s.push(q$(l)));const o=[];n.forEach((l,c)=>{const d=new Map;l.forEach(h=>{const p=t.computeStyle(c,h,r);d.set(h,p),(!p||0==p.length)&&(c[Ua]=A_e,o.push(c))}),i.set(c,d)});let a=0;return e.forEach(l=>q$(l,s[a++])),o}function K$(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 Va(i,t){i.classList?.add(t)}function Yg(i,t){i.classList?.remove(t)}function P_e(i,t,e){Nu(e).onDone(()=>i.processLeaveNode(t))}function Z$(i,t){for(let e=0;er.add(s)):t.set(i,n),e.delete(i),!0}class _E{constructor(t,e,n){this.bodyNode=t,this._driver=e,this._normalizer=n,this._triggerCache={},this.onRemovalComplete=(r,s)=>{},this._transitionEngine=new T_e(t,e,n),this._timelineEngine=new x_e(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=[],d=OO(this._driver,s,l,c);if(l.length)throw function yge(i,t){return new pe(3404,!1)}();a=function __e(i,t,e){return new v_e(i,t,e)}(r,d,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]=C$(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]=C$(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 N_e=(()=>{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&&hc(this._element,this._startStyles,this._initialStyles),this._state=1)}finish(){this.start(),this._state<2&&(hc(this._element,this._initialStyles),this._endStyles&&(hc(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),hc(this._element,this._initialStyles),this._state=3)}}return i.initialStylesByElement=new WeakMap,i})();function WO(i){let t=null;return i.forEach((e,n)=>{(function B_e(i){return"display"===i||"position"===i})(n)&&(t=t||new Map,t.set(n,e))}),t}class J${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:B$(this.element,r))}),this.currentSnapshot=t}triggerCallback(t){const e="start"===t?this._onStartFns:this._onDoneFns;e.forEach(n=>n()),e.length=0}}class U_e{validateStyleProperty(t){return!0}validateAnimatableStyleProperty(t){return!0}matchesElement(t,e){return!1}containsElement(t,e){return D$(t,e)}getParentElement(t){return AO(t)}query(t,e,n){return T$(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,d=o.filter(m=>m instanceof J$);(function Gge(i,t){return 0===i||0===t})(n,r)&&d.forEach(m=>{m.currentSnapshot.forEach((g,b)=>c.set(b,g))});let h=function Uge(i){return i.length?i[0]instanceof Map?i:i.map(t=>P$(t)):[]}(e).map(m=>Bu(m));h=function $ge(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,B$(i,a)))}}return t}(t,h,c);const p=function L_e(i,t){let e=null,n=null;return Array.isArray(t)&&t.length?(e=WO(t[0]),t.length>1&&(n=WO(t[t.length-1]))):t instanceof Map&&(e=WO(t)),e||n?new N_e(i,e,n):null}(t,h);return new J$(t,h,l,p)}}let V_e=(()=>{class i extends tV{constructor(e,n){super(),this._nextAnimationId=0,this._renderer=e.createRenderer(n.body,{id:"0",encapsulation:qs.None,styles:[],data:{animation:[]}})}build(e){const n=this._nextAnimationId.toString();this._nextAnimationId++;const r=Array.isArray(e)?iV(e):e;return e8(this._renderer,null,n,"register",[r]),new z_e(n,this._renderer)}}return i.\u0275fac=function(e){return new(e||i)(ee(Gl),ee(jt))},i.\u0275prov=ke({token:i,factory:i.\u0275fac}),i})();class z_e extends FQ{constructor(t,e){super(),this._id=t,this._renderer=e}create(t,e){return new H_e(this._id,t,e||{},this._renderer)}}class H_e{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 e8(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 e8(i,t,e,n,r){return i.setProperty(t,`@@${e}:${n}`,r)}const t8="@.disabled";let G_e=(()=>{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 d=this._rendererCache.get(s);return d||(d=new n8("",s,this.engine,()=>this._rendererCache.delete(s)),this._rendererCache.set(s,d)),d}const o=n.id,a=n.id+"-"+this._currentId;this._currentId++,this.engine.register(a,e);const l=d=>{Array.isArray(d)?d.forEach(l):this.engine.registerTrigger(o,a,e,d.name,d)};return n.data.animation.forEach(l),new $_e(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)(ee(Gl),ee(_E),ee(ft))},i.\u0275prov=ke({token:i,factory:i.\u0275fac}),i})();class n8{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==t8?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 $_e extends n8{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==t8?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 W_e(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 j_e(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 i8=[{provide:tV,useClass:V_e},{provide:UO,useFactory:function q_e(){return new f_e}},{provide:_E,useClass:(()=>{class i extends _E{constructor(e,n,r,s){super(e.body,n,r)}ngOnDestroy(){this.flush()}}return i.\u0275fac=function(e){return new(e||i)(ee(jt),ee(DO),ee(UO),ee(dm))},i.\u0275prov=ke({token:i,factory:i.\u0275fac}),i})()},{provide:Gl,useFactory:function X_e(i,t,e){return new G_e(i,t,e)},deps:[aM,_E,ft]}],jO=[{provide:DO,useFactory:()=>new U_e},{provide:Rr,useValue:"BrowserAnimations"},...i8],r8=[{provide:DO,useClass:I$},{provide:Rr,useValue:"NoopAnimations"},...i8];let K_e=(()=>{class i{static withConfig(e){return{ngModule:i,providers:e.disableAnimations?r8:jO}}}return i.\u0275fac=function(e){return new(e||i)},i.\u0275mod=nn({type:i}),i.\u0275inj=Kt({providers:jO,imports:[FB]}),i})();const s8=new me("CdkAccordion");let Z_e=0,Q_e=(()=>{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=Zt.EMPTY,this.closed=new We,this.opened=new We,this.destroyed=new We,this.expandedChange=new We,this.id="cdk-accordion-child-"+Z_e++,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)(E(s8,12),E(Zn),E(GR))},i.\u0275dir=ve({type:i,selectors:[["cdk-accordion-item"],["","cdkAccordionItem",""]],inputs:{expanded:"expanded",disabled:"disabled"},outputs:{closed:"closed",opened:"opened",destroyed:"destroyed",expandedChange:"expandedChange"},exportAs:["cdkAccordionItem"],features:[Dn([{provide:s8,useValue:void 0}])]}),i})(),J_e=(()=>{class i{}return i.\u0275fac=function(e){return new(e||i)},i.\u0275mod=nn({type:i}),i.\u0275inj=Kt({}),i})();const eve=["body"];function tve(i,t){}const nve=[[["mat-expansion-panel-header"]],"*",[["mat-action-row"]]],ive=["mat-expansion-panel-header","*","mat-action-row"];function rve(i,t){1&i&&De(0,"span",2),2&i&&U("@indicatorRotate",he()._getExpandedState())}const sve=[[["mat-panel-title"]],[["mat-panel-description"]],"*"],ove=["mat-panel-title","mat-panel-description","*"],o8=new me("MAT_ACCORDION"),a8="225ms cubic-bezier(0.4,0.0,0.2,1)",l8={indicatorRotate:Ra("indicatorRotate",[Ps("collapsed, void",si({transform:"rotate(0deg)"})),Ps("expanded",si({transform:"rotate(180deg)"})),Pr("expanded <=> collapsed, void => collapsed",jr(a8))]),bodyExpansion:Ra("bodyExpansion",[Ps("collapsed, void",si({height:"0px",visibility:"hidden"})),Ps("expanded",si({height:"*",visibility:"visible"})),Pr("expanded <=> collapsed, void => collapsed",jr(a8))])},c8=new me("MAT_EXPANSION_PANEL");let ave=(()=>{class i{constructor(e,n){this._template=e,this._expansionPanel=n}}return i.\u0275fac=function(e){return new(e||i)(E(Mo),E(c8,8))},i.\u0275dir=ve({type:i,selectors:[["ng-template","matExpansionPanelContent",""]]}),i})(),lve=0;const d8=new me("MAT_EXPANSION_PANEL_DEFAULT_OPTIONS");let u8=(()=>{class i extends Q_e{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 We,this.afterCollapse=new We,this._inputChanges=new Re,this._headerId="mat-expansion-panel-header-"+lve++,this._bodyAnimationDone=new Re,this.accordion=e,this._document=o,this._bodyAnimationDone.pipe(Zl((c,d)=>c.fromState===d.fromState&&c.toState===d.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(Ao(null),gn(()=>this.expanded&&!this._portal),Oi(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)(E(o8,12),E(Zn),E(GR),E(Wr),E(jt),E(Rr,8),E(d8,8))},i.\u0275cmp=ot({type:i,selectors:[["mat-expansion-panel"]],contentQueries:function(e,n,r){if(1&e&&Wi(r,ave,5),2&e){let s;Et(s=At())&&(n._lazyContent=s.first)}},viewQuery:function(e,n){if(1&e&&Wn(eve,5),2&e){let r;Et(r=At())&&(n._body=r.first)}},hostAttrs:[1,"mat-expansion-panel"],hostVars:6,hostBindings:function(e,n){2&e&&un("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:[Dn([{provide:o8,useValue:void 0},{provide:c8,useExisting:i}]),lt,bi],ngContentSelectors:ive,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&&(sr(nve),Wt(0),W(1,"div",0,1),Ue("@bodyExpansion.done",function(s){return n._bodyAnimationDone.next(s)}),W(3,"div",2),Wt(4,1),fe(5,tve,0,0,"ng-template",3),j(),Wt(6,2),j()),2&e&&(G(1),U("@bodyExpansion",n._getExpandedState())("id",n.id),Dt("aria-labelledby",n._headerId),G(4),U("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:[l8.bodyExpansion]},changeDetection:0}),i})();class cve{}const dve=JI(cve);let uve=(()=>{class i extends dve{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=Zt.EMPTY;const c=e.accordion?e.accordion._stateChanges.pipe(gn(d=>!(!d.hideToggle&&!d.togglePosition))):po;this.tabIndex=parseInt(l||"")||0,this._parentChangeSubscription=Mr(e.opened,e.closed,c,e._inputChanges.pipe(gn(d=>!!(d.hideToggle||d.disabled||d.togglePosition)))).subscribe(()=>this._changeDetectorRef.markForCheck()),e.closed.pipe(gn(()=>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:Xo(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)(E(u8,1),E(mt),E(qc),E(Zn),E(d8,8),E(Rr,8),ya("tabindex"))},i.\u0275cmp=ot({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&&Ue("click",function(){return n._toggle()})("keydown",function(s){return n._keydown(s)}),2&e&&(Dt("id",n.panel._headerId)("tabindex",n.tabIndex)("aria-controls",n._getPanelId())("aria-expanded",n._isExpanded())("aria-disabled",n.panel.disabled),jo("height",n._getHeaderHeight()),un("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:[lt],ngContentSelectors:ove,decls:5,vars:3,consts:[[1,"mat-content"],["class","mat-expansion-indicator",4,"ngIf"],[1,"mat-expansion-indicator"]],template:function(e,n){1&e&&(sr(sve),W(0,"span",0),Wt(1),Wt(2,1),Wt(3,2),j(),fe(4,rve,1,1,"span",1)),2&e&&(un("mat-content-hide-toggle",!n._showToggle()),G(4),U("ngIf",n._showToggle()))},dependencies:[vi],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:[l8.indicatorRotate]},changeDetection:0}),i})(),hve=(()=>{class i{}return i.\u0275fac=function(e){return new(e||i)},i.\u0275dir=ve({type:i,selectors:[["mat-panel-description"]],hostAttrs:[1,"mat-expansion-panel-header-description"]}),i})(),fve=(()=>{class i{}return i.\u0275fac=function(e){return new(e||i)},i.\u0275dir=ve({type:i,selectors:[["mat-panel-title"]],hostAttrs:[1,"mat-expansion-panel-header-title"]}),i})(),pve=(()=>{class i{}return i.\u0275fac=function(e){return new(e||i)},i.\u0275mod=nn({type:i}),i.\u0275inj=Kt({imports:[Eo,Qn,J_e,Nh]}),i})();function mve(i,t){if(1&i&&(W(0,"mat-option",19),Ve(1),j()),2&i){const e=t.$implicit;U("value",e),G(1),Qi(" ",e," ")}}function gve(i,t){if(1&i){const e=di();W(0,"mat-form-field",16)(1,"mat-select",17),Ue("selectionChange",function(r){return an(e),zt(he(2)._changePageSize(r.value))}),fe(2,mve,2,2,"mat-option",18),j()()}if(2&i){const e=he(2);U("appearance",e._formFieldAppearance)("color",e.color),G(1),U("value",e.pageSize)("disabled",e.disabled)("aria-labelledby",e._pageSizeLabelId)("panelClass",e.selectConfig.panelClass||"")("disableOptionCentering",e.selectConfig.disableOptionCentering),G(1),U("ngForOf",e._displayedPageSizeOptions)}}function _ve(i,t){if(1&i&&(W(0,"div",20),Ve(1),j()),2&i){const e=he(2);G(1),_i(e.pageSize)}}function vve(i,t){if(1&i&&(W(0,"div",12)(1,"div",13),Ve(2),j(),fe(3,gve,3,8,"mat-form-field",14),fe(4,_ve,2,1,"div",15),j()),2&i){const e=he();G(1),B1("id",e._pageSizeLabelId),G(1),Qi(" ",e._intl.itemsPerPageLabel," "),G(1),U("ngIf",e._displayedPageSizeOptions.length>1),G(1),U("ngIf",e._displayedPageSizeOptions.length<=1)}}function yve(i,t){if(1&i){const e=di();W(0,"button",21),Ue("click",function(){return an(e),zt(he().firstPage())}),ki(),W(1,"svg",7),De(2,"path",22),j()()}if(2&i){const e=he();U("matTooltip",e._intl.firstPageLabel)("matTooltipDisabled",e._previousButtonsDisabled())("matTooltipPosition","above")("disabled",e._previousButtonsDisabled()),Dt("aria-label",e._intl.firstPageLabel)}}function bve(i,t){if(1&i){const e=di();ki(),ga(),W(0,"button",23),Ue("click",function(){return an(e),zt(he().lastPage())}),ki(),W(1,"svg",7),De(2,"path",24),j()()}if(2&i){const e=he();U("matTooltip",e._intl.lastPageLabel)("matTooltipDisabled",e._nextButtonsDisabled())("matTooltipPosition","above")("disabled",e._nextButtonsDisabled()),Dt("aria-label",e._intl.lastPageLabel)}}let yE=(()=>{class i{constructor(){this.changes=new Re,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=ke({token:i,factory:i.\u0275fac,providedIn:"root"}),i})();const wve={provide:yE,deps:[[new Ss,new xa,yE]],useFactory:function xve(i){return i||new yE}},Cve=new me("MAT_PAGINATOR_DEFAULT_OPTIONS"),Sve=jM(MQ(class{}));let Eve=(()=>{class i extends Sve{get pageIndex(){return this._pageIndex}set pageIndex(e){this._pageIndex=Math.max(ks(e),0),this._changeDetectorRef.markForCheck()}get length(){return this._length}set length(e){this._length=ks(e),this._changeDetectorRef.markForCheck()}get pageSize(){return this._pageSize}set pageSize(e){this._pageSize=Math.max(ks(e),0),this._updateDisplayedPageSizeOptions()}get pageSizeOptions(){return this._pageSizeOptions}set pageSizeOptions(e){this._pageSizeOptions=(e||[]).map(n=>ks(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 We,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){xo()},i.\u0275dir=ve({type:i,inputs:{color:"color",pageIndex:"pageIndex",length:"length",pageSize:"pageSize",pageSizeOptions:"pageSizeOptions",hidePageSize:"hidePageSize",showFirstLastButtons:"showFirstLastButtons",selectConfig:"selectConfig"},outputs:{page:"page"},features:[lt]}),i})(),Ave=0,Dve=(()=>{class i extends Eve{constructor(e,n,r){super(e,n,r),this._pageSizeLabelId="mat-paginator-page-size-label-"+Ave++,this._formFieldAppearance=r?.formFieldAppearance||"outline"}}return i.\u0275fac=function(e){return new(e||i)(E(yE),E(Zn),E(Cve,8))},i.\u0275cmp=ot({type:i,selectors:[["mat-paginator"]],hostAttrs:["role","group",1,"mat-mdc-paginator"],inputs:{disabled:"disabled"},exportAs:["matPaginator"],features:[lt],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&&(W(0,"div",0)(1,"div",1),fe(2,vve,5,4,"div",2),W(3,"div",3)(4,"div",4),Ve(5),j(),fe(6,yve,3,5,"button",5),W(7,"button",6),Ue("click",function(){return n.previousPage()}),ki(),W(8,"svg",7),De(9,"path",8),j()(),ga(),W(10,"button",9),Ue("click",function(){return n.nextPage()}),ki(),W(11,"svg",7),De(12,"path",10),j()(),fe(13,bve,3,5,"button",11),j()()()),2&e&&(G(2),U("ngIf",!n.hidePageSize),G(3),Qi(" ",n._intl.getRangeLabel(n.pageIndex,n.pageSize,n.length)," "),G(1),U("ngIf",n.showFirstLastButtons),G(1),U("matTooltip",n._intl.previousPageLabel)("matTooltipDisabled",n._previousButtonsDisabled())("matTooltipPosition","above")("disabled",n._previousButtonsDisabled()),Dt("aria-label",n._intl.previousPageLabel),G(3),U("matTooltip",n._intl.nextPageLabel)("matTooltipDisabled",n._nextButtonsDisabled())("matTooltipPosition","above")("disabled",n._nextButtonsDisabled()),Dt("aria-label",n._intl.nextPageLabel),G(3),U("ngIf",n.showFirstLastButtons))},dependencies:[So,vi,XM,vl,fb,Nm,Os],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})(),Tve=(()=>{class i{}return i.\u0275fac=function(e){return new(e||i)},i.\u0275mod=nn({type:i}),i.\u0275inj=Kt({providers:[wve],imports:[Eo,KM,VH,FV]}),i})(),Ive=(()=>{class i{}return i.\u0275fac=function(e){return new(e||i)},i.\u0275mod=nn({type:i,bootstrap:[Zme]}),i.\u0275inj=Kt({providers:[Ql,NH,{provide:PH,useValue:Uie}],imports:[FB,xK,K_e,eH,CJ,gC,pH,pve,DV,RV,FV,KM,ez,Tve,rse,_H,VH,_V,ype,bme,tH,tR,jie]}),i})();th(Jl,[So,vi,Os,t0,nE],[pl]),th(zR,[hm,So,vi,xy,tc,Kc,vl,u8,uve,fve,hve,Os,Dve,fb,Nm,t0],[]),th(xC,[So,vi,MC,wC,gH,t0],[]),th(g$,[So,vi,To,Os,fb,Nm,t0,nE],[pl]),F7().bootstrapModule(Ive).catch(i=>console.error(i))},489:function(Lo,Hs,ps){var cn;Lo=ps.nmd(Lo),function(){var V,Kr=200,Un="Expected a function",Ha="__lodash_hash_undefined__",Mi="__lodash_placeholder__",Ci=1,ms=2,$s=4,Ws=1,No=2,On=1,dr=2,pc=4,la=8,Dl=16,ca=32,Tl=64,Ga=128,da=256,pd=512,ME=800,Kg=16,In=1/0,Wa=9007199254740991,SE=17976931348623157e292,Pf=NaN,ua=4294967295,Re=ua-1,l0=ua>>>1,c0=[["ary",Ga],["bind",On],["bindKey",dr],["curry",la],["curryRight",Dl],["flip",pd],["partial",ca],["partialRight",Tl],["rearg",da]],ti="[object Arguments]",Yn="[object Array]",EE="[object AsyncFunction]",et="[object Boolean]",mc="[object Date]",AE="[object DOMException]",md="[object Error]",Of="[object Function]",d0="[object GeneratorFunction]",Bo="[object Map]",Vu="[object Number]",DE="[object Null]",ja="[object Object]",u0="[object Promise]",TE="[object Proxy]",gd="[object RegExp]",Uo="[object Set]",gc="[object String]",Ff="[object Symbol]",Zg="[object Undefined]",_d="[object WeakMap]",zu="[object ArrayBuffer]",vd="[object DataView]",ha="[object Float32Array]",Lf="[object Float64Array]",Qg="[object Int8Array]",Nf="[object Int16Array]",Jg="[object Int32Array]",e_="[object Uint8Array]",Hu="[object Uint8ClampedArray]",t_="[object Uint16Array]",n_="[object Uint32Array]",RE=/\b__p \+= '';/g,kE=/\b(__p \+=) '' \+/g,PE=/(__e\(.*?\)|\b__t\)) \+\n'';/g,h0=/&(?:amp|lt|gt|quot|#39);/g,f0=/[&<>"']/g,OE=RegExp(h0.source),FE=RegExp(f0.source),ZO=/<%-([\s\S]+?)%>/g,i_=/<%([\s\S]+?)%>/g,r_=/<%=([\s\S]+?)%>/g,p0=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,m0=/^\w*$/,g0=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,s_=/[\\^$.*+?()[\]{}|]/g,_0=RegExp(s_.source),Bf=/^\s+/,v0=/\s/,y0=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,wr=/\{\n\/\* \[wrapped with (.+)\] \*/,LE=/,? & /,NE=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,BE=/[()=,{}\[\]\/\s]/,UE=/\\(\\)?/g,b0=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,x0=/\w*$/,VE=/^[-+]0x[0-9a-f]+$/i,Ya=/^0b[01]+$/i,zE=/^\[object .+?Constructor\]$/,ir=/^0o[0-7]+$/i,yd=/^(?:0|[1-9]\d*)$/,po=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,o_=/($^)/,HE=/['\n\r\u2028\u2029\\]/g,Gu="\\ud800-\\udfff",M0="\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff",l_="\\u2700-\\u27bf",c_="a-z\\xdf-\\xf6\\xf8-\\xff",d_="A-Z\\xc0-\\xd6\\xd8-\\xde",C0="\\ufe0e\\ufe0f",S0="\\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",Mr="["+Gu+"]",Uf="["+S0+"]",bd="["+M0+"]",li="\\d+",u_="["+l_+"]",pi="["+c_+"]",Vf="[^"+Gu+S0+li+l_+c_+d_+"]",h_="\\ud83c[\\udffb-\\udfff]",Pt="[^"+Gu+"]",Wu="(?:\\ud83c[\\udde6-\\uddff]){2}",ju="[\\ud800-\\udbff][\\udc00-\\udfff]",Yu="["+d_+"]",pe="(?:"+pi+"|"+Vf+")",zf="(?:"+Yu+"|"+Vf+")",Qt="(?:['\u2019](?:d|ll|m|re|s|t|ve))?",qn="(?:['\u2019](?:D|LL|M|RE|S|T|VE))?",E0="(?:"+bd+"|"+h_+")?",YE="["+C0+"]?",XE=YE+E0+"(?:\\u200d(?:"+[Pt,Wu,ju].join("|")+")"+YE+E0+")*",KE="(?:"+[u_,Wu,ju].join("|")+")"+XE,QO="(?:"+[Pt+bd+"?",bd,Wu,ju,Mr].join("|")+")",Il=RegExp("['\u2019]","g"),JO=RegExp(bd,"g"),A0=RegExp(h_+"(?="+h_+")|"+QO+XE,"g"),eF=RegExp([Yu+"?"+pi+"+"+Qt+"(?="+[Uf,Yu,"$"].join("|")+")",zf+"+"+qn+"(?="+[Uf,Yu+pe,"$"].join("|")+")",Yu+"?"+pe+"+"+Qt,Yu+"+"+qn,"\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])","\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",li,KE].join("|"),"g"),tF=RegExp("[\\u200d"+Gu+M0+C0+"]"),ZE=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,nF=["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"],QE=-1,Si={};Si[ha]=Si[Lf]=Si[Qg]=Si[Nf]=Si[Jg]=Si[e_]=Si[Hu]=Si[t_]=Si[n_]=!0,Si[ti]=Si[Yn]=Si[zu]=Si[et]=Si[vd]=Si[mc]=Si[md]=Si[Of]=Si[Bo]=Si[Vu]=Si[ja]=Si[gd]=Si[Uo]=Si[gc]=Si[_d]=!1;var En={};En[ti]=En[Yn]=En[zu]=En[vd]=En[et]=En[mc]=En[ha]=En[Lf]=En[Qg]=En[Nf]=En[Jg]=En[Bo]=En[Vu]=En[ja]=En[gd]=En[Uo]=En[gc]=En[Ff]=En[e_]=En[Hu]=En[t_]=En[n_]=!0,En[md]=En[Of]=En[_d]=!1;var sF={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},ke=parseFloat,oF=parseInt,Kt="object"==typeof global&&global&&global.Object===Object&&global,Gf="object"==typeof self&&self&&self.Object===Object&&self,Cr=Kt||Gf||Function("return this")(),f_=Hs&&!Hs.nodeType&&Hs,Xu=f_&&Lo&&!Lo.nodeType&&Lo,p_=Xu&&Xu.exports===f_,xd=p_&&Kt.process,gs=function(){try{return Xu&&Xu.require&&Xu.require("util").types||xd&&xd.binding&&xd.binding("util")}catch{}}(),m_=gs&&gs.isArrayBuffer,D0=gs&&gs.isDate,Ot=gs&&gs.isMap,$f=gs&&gs.isRegExp,T0=gs&&gs.isSet,Ys=gs&&gs.isTypedArray;function _s(X,ue,oe){switch(oe.length){case 0:return X.call(ue);case 1:return X.call(ue,oe[0]);case 2:return X.call(ue,oe[0],oe[1]);case 3:return X.call(ue,oe[0],oe[1],oe[2])}return X.apply(ue,oe)}function aF(X,ue,oe,Be){for(var $t=-1,Vn=null==X?0:X.length;++$t-1}function Ku(X,ue,oe){for(var Be=-1,$t=null==X?0:X.length;++Be<$t;)if(oe(ue,X[Be]))return!0;return!1}function mi(X,ue){for(var oe=-1,Be=null==X?0:X.length,$t=Array(Be);++oe-1;);return oe}function fa(X,ue){for(var oe=X.length;oe--&&Ft(ue,X[oe],0)>-1;);return oe}var nA=v_({\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"}),ot=v_({"&":"&","<":"<",">":">",'"':""","'":"'"});function th(X){return"\\"+sF[X]}function Cd(X){return tF.test(X)}function qf(X){var ue=-1,oe=Array(X.size);return X.forEach(function(Be,$t){oe[++ue]=[$t,Be]}),oe}function ve(X,ue){return function(oe){return X(ue(oe))}}function Gi(X,ue){for(var oe=-1,Be=X.length,$t=0,Vn=[];++oe",""":'"',"'":"'"}),ys=function X(ue){var u,oe=(ue=null==ue?Cr:ys.defaults(Cr.Object(),ue,ys.pick(Cr,nF))).Array,Be=ue.Date,$t=ue.Error,Vn=ue.Function,yt=ue.Math,oi=ue.Object,yc=ue.RegExp,R0=ue.String,Sr=ue.TypeError,rr=oe.prototype,Vo=oi.prototype,Xs=ue["__core-js_shared__"],Pl=Vn.prototype.toString,ii=Vo.hasOwnProperty,yi=0,sA=(u=/[^.]+$/.exec(Xs&&Xs.keys&&Xs.keys.IE_PROTO||""))?"Symbol(src)_1."+u:"",Ed=Vo.toString,k0=Pl.call(oi),Kf=Cr._,Zf=yc("^"+Pl.call(ii).replace(s_,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),Za=p_?ue.Buffer:V,Ui=ue.Symbol,x_=ue.Uint8Array,bs=Za?Za.allocUnsafe:V,xs=ve(oi.getPrototypeOf,oi),Qf=oi.create,Ad=Vo.propertyIsEnumerable,bc=rr.splice,_o=Ui?Ui.isConcatSpreadable:V,ih=Ui?Ui.iterator:V,Dd=Ui?Ui.toStringTag:V,Jf=function(){try{var u=Rc(oi,"defineProperty");return u({},"",{}),u}catch{}}(),oA=ue.clearTimeout!==Cr.clearTimeout&&ue.clearTimeout,cF=Be&&Be.now!==Cr.Date.now&&Be.now,dF=ue.setTimeout!==Cr.setTimeout&&ue.setTimeout,w_=yt.ceil,M_=yt.floor,P0=oi.getOwnPropertySymbols,uF=Za?Za.isBuffer:V,aA=ue.isFinite,hF=rr.join,fF=ve(oi.keys,oi),hr=yt.max,Zr=yt.min,pF=Be.now,O0=ue.parseInt,C_=yt.random,mF=rr.reverse,F0=Rc(ue,"DataView"),ep=Rc(ue,"Map"),Qa=Rc(ue,"Promise"),Td=Rc(ue,"Set"),bi=Rc(ue,"WeakMap"),Id=Rc(oi,"create"),tp=bi&&new bi,Rd={},L0=kc(F0),N0=kc(ep),lA=kc(Qa),S_=kc(Td),cA=kc(bi),Qr=Ui?Ui.prototype:V,kd=Qr?Qr.valueOf:V,E_=Qr?Qr.toString:V;function I(u){if(Pi(u)&&!rn(u)&&!(u instanceof kn)){if(u instanceof Ei)return u;if(ii.call(u,"__wrapped__"))return ns(u)}return new Ei(u)}var Pd=function(){function u(){}return function(f){if(!wi(f))return{};if(Qf)return Qf(f);u.prototype=f;var _=new u;return u.prototype=V,_}}();function xc(){}function Ei(u,f){this.__wrapped__=u,this.__actions__=[],this.__chain__=!!f,this.__index__=0,this.__values__=V}function kn(u){this.__wrapped__=u,this.__actions__=[],this.__dir__=1,this.__filtered__=!1,this.__iteratees__=[],this.__takeCount__=ua,this.__views__=[]}function wc(u){var f=-1,_=null==u?0:u.length;for(this.clear();++f<_;){var w=u[f];this.set(w[0],w[1])}}function kt(u){var f=-1,_=null==u?0:u.length;for(this.clear();++f<_;){var w=u[f];this.set(w[0],w[1])}}function pa(u){var f=-1,_=null==u?0:u.length;for(this.clear();++f<_;){var w=u[f];this.set(w[0],w[1])}}function zt(u){var f=-1,_=null==u?0:u.length;for(this.__data__=new pa;++f<_;)this.add(u[f])}function Jr(u){var f=this.__data__=new kt(u);this.size=f.size}function I_(u,f){var _=rn(u),w=!_&&Fc(u),S=!_&&!w&&rl(u),P=!_&&!w&&!S&&$o(u),H=_||w||S||P,Y=H?qs(u.length,R0):[],Q=Y.length;for(var _e in u)(f||ii.call(u,_e))&&(!H||!("length"==_e||S&&("offset"==_e||"parent"==_e)||P&&("buffer"==_e||"byteLength"==_e||"byteOffset"==_e)||il(_e,Q)))&&Y.push(_e);return Y}function Vr(u){var f=u.length;return f?u[lh(0,f-1)]:V}function Ja(u,f){return Sp(Qs(u),Ll(f,0,u.length))}function H0(u){return Sp(Qs(u))}function Fl(u,f,_){(_!==V&&!Go(u[f],_)||_===V&&!(f in u))&&zo(u,f,_)}function Ks(u,f,_){var w=u[f];(!ii.call(u,f)||!Go(w,_)||_===V&&!(f in u))&&zo(u,f,_)}function ip(u,f){for(var _=u.length;_--;)if(Go(u[_][0],f))return _;return-1}function G0(u,f,_,w){return el(u,function(S,P,H){f(w,S,_(S),H)}),w}function $0(u,f){return u&&ci(f,fr(f),u)}function zo(u,f,_){"__proto__"==f&&Jf?Jf(u,f,{configurable:!0,enumerable:!0,value:_,writable:!0}):u[f]=_}function rh(u,f){for(var _=-1,w=f.length,S=oe(w),P=null==u;++_=f?u:f)),u}function Ms(u,f,_,w,S,P){var H,Y=f&Ci,Q=f&ms,_e=f&$s;if(_&&(H=S?_(u,w,S,P):_(u)),H!==V)return H;if(!wi(u))return u;var ye=rn(u);if(ye){if(H=function hx(u){var f=u.length,_=new u.constructor(f);return f&&"string"==typeof u[0]&&ii.call(u,"index")&&(_.index=u.index,_.input=u.input),_}(u),!Y)return Qs(u,H)}else{var be=zr(u),Xe=be==Of||be==d0;if(rl(u))return me(u,Y);if(be==ja||be==ti||Xe&&!S){if(H=Q||Xe?{}:PA(u),!Y)return Q?function hh(u,f){return ci(u,cx(u),f)}(u,function _A(u,f){return u&&ci(f,Ds(f),u)}(H,u)):function H_(u,f){return ci(u,Z_(u),f)}(u,$0(H,u))}else{if(!En[be])return S?u:{};H=function fx(u,f,_){var w=u.constructor;switch(f){case zu:return rx(u);case et:case mc:return new w(+u);case vd:return function xF(u,f){var _=f?rx(u.buffer):u.buffer;return new u.constructor(_,u.byteOffset,u.byteLength)}(u,_);case ha:case Lf:case Qg:case Nf:case Jg:case e_:case Hu:case t_:case n_:return AA(u,_);case Bo:return new w;case Vu:case gc:return new w(u);case gd:return function wF(u){var f=new u.constructor(u.source,x0.exec(u));return f.lastIndex=u.lastIndex,f}(u);case Uo:return new w;case Ff:return function MF(u){return kd?oi(kd.call(u)):{}}(u)}}(u,be,Y)}}P||(P=new Jr);var vt=P.get(u);if(vt)return vt;P.set(u,H),nw(u)?u.forEach(function(Vt){H.add(Ms(Vt,f,_,Vt,u,P))}):Tv(u)&&u.forEach(function(Vt,An){H.set(An,Ms(Vt,f,_,An,u,P))});var mn=ye?V:(_e?Q?q_:yp:Q?Ds:fr)(u);return Rn(mn||u,function(Vt,An){mn&&(Vt=u[An=Vt]),Ks(H,An,Ms(Vt,f,_,An,u,P))}),H}function R_(u,f,_){var w=_.length;if(null==u)return!w;for(u=oi(u);w--;){var S=_[w],H=u[S];if(H===V&&!(S in u)||!(0,f[S])(H))return!1}return!0}function rp(u,f,_){if("function"!=typeof u)throw new Sr(Un);return gh(function(){u.apply(V,_)},f)}function Fd(u,f,_,w){var S=-1,P=Rl,H=!0,Y=u.length,Q=[],_e=f.length;if(!Y)return Q;_&&(f=mi(f,Br(_))),w?(P=Ku,H=!1):f.length>=Kr&&(P=vc,H=!1,f=new zt(f));e:for(;++S-1},kt.prototype.set=function fA(u,f){var _=this.__data__,w=ip(_,u);return w<0?(++this.size,_.push([u,f])):_[w][1]=f,this},pa.prototype.clear=function pA(){this.size=0,this.__data__={hash:new wc,map:new(ep||kt),string:new wc}},pa.prototype.delete=function mA(u){var f=K_(this,u).delete(u);return this.size-=f?1:0,f},pa.prototype.get=function Se(u){return K_(this,u).get(u)},pa.prototype.has=function zn(u){return K_(this,u).has(u)},pa.prototype.set=function an(u,f){var _=K_(this,u),w=_.size;return _.set(u,f),this.size+=_.size==w?0:1,this},zt.prototype.add=zt.prototype.push=function Er(u){return this.__data__.set(u,Ha),this},zt.prototype.has=function z0(u){return this.__data__.has(u)},Jr.prototype.clear=function ma(){this.__data__=new kt,this.size=0},Jr.prototype.delete=function D_(u){var f=this.__data__,_=f.delete(u);return this.size=f.size,_},Jr.prototype.get=function T_(u){return this.__data__.get(u)},Jr.prototype.has=function gA(u){return this.__data__.has(u)},Jr.prototype.set=function _F(u,f){var _=this.__data__;if(_ instanceof kt){var w=_.__data__;if(!ep||w.length0&&_(Y)?f>1?Xn(Y,f-1,_,w,S):kl(S,Y):w||(S[S.length]=Y)}return S}var tl=G_(),Ai=G_(!0);function ki(u,f){return u&&tl(u,f,fr)}function P_(u,f){return u&&Ai(u,f,fr)}function ga(u,f){return _c(f,function(_){return zl(u[_])})}function Mc(u,f){for(var _=0,w=(f=ba(f,u)).length;null!=u&&_f}function sp(u,f){return null!=u&&ii.call(u,f)}function op(u,f){return null!=u&&f in oi(u)}function ap(u,f,_){for(var w=_?Ku:Rl,S=u[0].length,P=u.length,H=P,Y=oe(P),Q=1/0,_e=[];H--;){var ye=u[H];H&&f&&(ye=mi(ye,Br(f))),Q=Zr(ye.length,Q),Y[H]=!_&&(f||S>=120&&ye.length>=120)?new zt(H&&ye):V}ye=u[0];var be=-1,Xe=Y[0];e:for(;++be=Y?Q:Q*("desc"==_[w]?-1:1)}return u.index-f.index}(P,H,_)})}function Q0(u,f,_){for(var w=-1,S=f.length,P={};++w-1;)Y!==u&&bc.call(Y,Q,1),bc.call(u,Q,1);return u}function ah(u,f){for(var _=u?f.length:0,w=_-1;_--;){var S=f[_];if(_==w||S!==P){var P=S;il(S)?bc.call(u,S,1):dh(u,S)}}return u}function lh(u,f){return u+M_(C_()*(f-u+1))}function ch(u,f){var _="";if(!u||f<1||f>Wa)return _;do{f%2&&(_+=u),(f=M_(f/2))&&(u+=u)}while(f);return _}function pn(u,f){return Mp(J_(u,f,is),u+"")}function SA(u){return Vr(Bc(u))}function ex(u,f){var _=Bc(u);return Sp(_,Ll(f,0,_.length))}function Vd(u,f,_,w){if(!wi(u))return u;for(var S=-1,P=(f=ba(f,u)).length,H=P-1,Y=u;null!=Y&&++SS?0:S+f),(_=_>S?S:_)<0&&(_+=S),S=f>_?0:_-f>>>0,f>>>=0;for(var P=oe(S);++w>>1,H=u[P];null!==H&&!As(H)&&(_?H<=f:H=Kr){var _e=f?null:j_(u);if(_e)return Hn(_e);H=!1,S=vc,Q=new zt}else Q=f?[]:Y;e:for(;++w=w?u:ts(u,f,_)}var ix=oA||function(u){return Cr.clearTimeout(u)};function me(u,f){if(f)return u.slice();var _=u.length,w=bs?bs(_):new u.constructor(_);return u.copy(w),w}function rx(u){var f=new u.constructor(u.byteLength);return new x_(f).set(new x_(u)),f}function AA(u,f){var _=f?rx(u.buffer):u.buffer;return new u.constructor(_,u.byteOffset,u.length)}function DA(u,f){if(u!==f){var _=u!==V,w=null===u,S=u==u,P=As(u),H=f!==V,Y=null===f,Q=f==f,_e=As(f);if(!Y&&!_e&&!P&&u>f||P&&H&&Q&&!Y&&!_e||w&&H&&Q||!_&&Q||!S)return 1;if(!w&&!P&&!_e&&u1?_[S-1]:V,H=S>2?_[2]:V;for(P=u.length>3&&"function"==typeof P?(S--,P):V,H&&Dr(_[0],_[1],H)&&(P=S<3?V:P,S=1),f=oi(f);++w-1?S[P?f[H]:H]:V}}function Cs(u){return yo(function(f){var _=f.length,w=_,S=Ei.prototype.thru;for(u&&f.reverse();w--;){var P=f[w];if("function"!=typeof P)throw new Sr(Un);if(S&&!H&&"wrapper"==nl(P))var H=new Ei([],!0)}for(w=H?w:_;++w<_;){var Y=nl(P=f[w]),Q="wrapper"==Y?X_(P):V;H=Q&&mh(Q[0])&&Q[1]==(Ga|la|ca|da)&&!Q[4].length&&1==Q[9]?H[nl(Q[0])].apply(H,Q[3]):1==P.length&&mh(P)?H[Y]():H.thru(P)}return function(){var _e=arguments,ye=_e[0];if(H&&1==_e.length&&rn(ye))return H.plant(ye).value();for(var be=0,Xe=_?f[be].apply(this,_e):ye;++be<_;)Xe=f[be].call(this,Xe);return Xe}})}function Wd(u,f,_,w,S,P,H,Y,Q,_e){var ye=f&Ga,be=f&On,Xe=f&dr,vt=f&(la|Dl),Ut=f&pd,mn=Xe?V:mp(u);return function Vt(){for(var An=arguments.length,Ln=oe(An),rs=An;rs--;)Ln[rs]=arguments[rs];if(vt)var ss=wa(Vt),io=function eh(X,ue){for(var oe=X.length,Be=0;oe--;)X[oe]===ue&&++Be;return Be}(Ln,ss);if(w&&(Ln=Hd(Ln,w,S,vt)),P&&(Ln=TA(Ln,P,H,vt)),An-=io,vt&&An<_e){var Di=Gi(Ln,ss);return ox(u,f,Wd,Vt.placeholder,_,Ln,Di,Y,Q,_e-An)}var Ts=be?_:this,wo=Xe?Ts[u]:u;return An=Ln.length,Y?Ln=function Es(u,f){for(var _=u.length,w=Zr(f.length,_),S=Qs(u);w--;){var P=f[w];u[w]=il(P,_)?S[P]:V}return u}(Ln,Y):Ut&&An>1&&Ln.reverse(),ye&&QY))return!1;var _e=P.get(u),ye=P.get(f);if(_e&&ye)return _e==f&&ye==u;var be=-1,Xe=!0,vt=_&No?new zt:V;for(P.set(u,f),P.set(f,u);++be-1&&u%1==0&&u1?"& ":"")+f[w],f=f.join(_>2?", ":" "),u.replace(y0,"{\n/* [wrapped with "+f+"] */\n")}(w,function BA(u,f){return Rn(c0,function(_){var w="_."+_[0];f&_[1]&&!Rl(u,w)&&u.push(w)}),u.sort()}(function dx(u){var f=u.match(wr);return f?f[1].split(LE):[]}(w),_)))}function vx(u){var f=0,_=0;return function(){var w=pF(),S=Kg-(w-_);if(_=w,S>0){if(++f>=ME)return arguments[0]}else f=0;return u.apply(V,arguments)}}function Sp(u,f){var _=-1,w=u.length,S=w-1;for(f=f===V?w:f;++_1?u[f-1]:V;return _="function"==typeof _?(u.pop(),_):V,yh(u,_)});function zx(u){var f=I(u);return f.__chain__=!0,f}function Ip(u,f){return f(u)}var Hx=yo(function(u){var f=u.length,_=f?u[0]:0,w=this.__wrapped__,S=function(P){return rh(P,u)};return!(f>1||this.__actions__.length)&&w instanceof kn&&il(_)?((w=w.slice(_,+_+(f?1:0))).__actions__.push({func:Ip,args:[S],thisArg:V}),new Ei(w,this.__chain__).thru(function(P){return f&&!P.length&&P.push(V),P})):this.thru(S)}),rD=fp(function(u,f,_){ii.call(u,_)?++u[_]:zo(u,_,1)}),$x=RA(Sx),kp=RA(rv);function bv(u,f){return(rn(u)?Rn:el)(u,Lt(f,3))}function Vl(u,f){return(rn(u)?lF:k_)(u,Lt(f,3))}var oD=fp(function(u,f,_){ii.call(u,_)?u[_].push(f):zo(u,_,[f])}),lD=pn(function(u,f,_){var w=-1,S="function"==typeof f,P=eo(u)?oe(u.length):[];return el(u,function(H){P[++w]=S?_s(f,H,_):_a(H,f,_)}),P}),cD=fp(function(u,f,_){zo(u,_,f)});function Pp(u,f){return(rn(u)?mi:sh)(u,Lt(f,3))}var Ma=fp(function(u,f,_){u[_?0:1].push(f)},function(){return[[],[]]}),_D=pn(function(u,f){if(null==u)return[];var _=f.length;return _>1&&Dr(u,f[0],f[1])?f=[]:_>2&&Dr(f[0],f[1],f[2])&&(f=[f[0]]),B_(u,Xn(f,1),[])}),Op=cF||function(){return Cr.Date.now()};function xh(u,f,_){return f=_?V:f,vo(u,Ga,V,V,V,V,f=u&&null==f?u.length:f)}function Ca(u,f){var _;if("function"!=typeof f)throw new Sr(Un);return u=dn(u),function(){return--u>0&&(_=f.apply(this,arguments)),u<=1&&(f=V),_}}var Oc=pn(function(u,f,_){var w=On;if(_.length){var S=Gi(_,wa(Oc));w|=ca}return vo(u,w,f,_,S)}),xv=pn(function(u,f,_){var w=On|dr;if(_.length){var S=Gi(_,wa(xv));w|=ca}return vo(f,w,u,_,S)});function yD(u,f,_){var w,S,P,H,Y,Q,_e=0,ye=!1,be=!1,Xe=!0;if("function"!=typeof u)throw new Sr(Un);function vt(Di){var Ts=w,wo=S;return w=S=V,_e=Di,H=u.apply(wo,Ts)}function Vt(Di){var Ts=Di-Q;return Q===V||Ts>=f||Ts<0||be&&Di-_e>=P}function An(){var Di=Op();if(Vt(Di))return Ln(Di);Y=gh(An,function mn(Di){var I1=f-(Di-Q);return be?Zr(I1,P-(Di-_e)):I1}(Di))}function Ln(Di){return Y=V,Xe&&w?vt(Di):(w=S=V,H)}function io(){var Di=Op(),Ts=Vt(Di);if(w=arguments,S=this,Q=Di,Ts){if(Y===V)return function Ut(Di){return _e=Di,Y=gh(An,f),ye?vt(Di):H}(Q);if(be)return ix(Y),Y=gh(An,f),vt(Q)}return Y===V&&(Y=gh(An,f)),H}return f=bo(f)||0,wi(_)&&(ye=!!_.leading,P=(be="maxWait"in _)?hr(bo(_.maxWait)||0,f):P,Xe="trailing"in _?!!_.trailing:Xe),io.cancel=function rs(){Y!==V&&ix(Y),_e=0,w=Q=S=Y=V},io.flush=function ss(){return Y===V?H:Ln(Op())},io}var kF=pn(function(u,f){return rp(u,1,f)}),PF=pn(function(u,f,_){return rp(u,bo(f)||0,_)});function Yd(u,f){if("function"!=typeof u||null!=f&&"function"!=typeof f)throw new Sr(Un);var _=function(){var w=arguments,S=f?f.apply(this,w):w[0],P=_.cache;if(P.has(S))return P.get(S);var H=u.apply(this,w);return _.cache=P.set(S,H)||P,H};return _.cache=new(Yd.Cache||pa),_}function Sv(u){if("function"!=typeof u)throw new Sr(Un);return function(){var f=arguments;switch(f.length){case 0:return!u.call(this);case 1:return!u.call(this,f[0]);case 2:return!u.call(this,f[0],f[1]);case 3:return!u.call(this,f[0],f[1],f[2])}return!u.apply(this,f)}}Yd.Cache=pa;var qx=zd(function(u,f){var _=(f=1==f.length&&rn(f[0])?mi(f[0],Br(Lt())):mi(Xn(f,1),Br(Lt()))).length;return pn(function(w){for(var S=-1,P=Zr(w.length,_);++S=f}),Fc=Bd(function(){return arguments}())?Bd:function(u){return Pi(u)&&ii.call(u,"callee")&&!Ad.call(u,"callee")},rn=oe.isArray,FF=m_?Br(m_):function xA(u){return Pi(u)&&es(u)==zu};function eo(u){return null!=u&&Vp(u.length)&&!zl(u)}function xi(u){return Pi(u)&&eo(u)}var rl=uF||Qd,Jx=D0?Br(D0):function vF(u){return Pi(u)&&es(u)==mc};function Bp(u){if(!Pi(u))return!1;var f=es(u);return f==md||f==AE||"string"==typeof u.message&&"string"==typeof u.name&&!to(u)}function zl(u){if(!wi(u))return!1;var f=es(u);return f==Of||f==d0||f==EE||f==TE}function Up(u){return"number"==typeof u&&u==dn(u)}function Vp(u){return"number"==typeof u&&u>-1&&u%1==0&&u<=Wa}function wi(u){var f=typeof u;return null!=u&&("object"==f||"function"==f)}function Pi(u){return null!=u&&"object"==typeof u}var Tv=Ot?Br(Ot):function wA(u){return Pi(u)&&zr(u)==Bo};function wh(u){return"number"==typeof u||Pi(u)&&es(u)==Vu}function to(u){if(!Pi(u)||es(u)!=ja)return!1;var f=xs(u);if(null===f)return!0;var _=ii.call(f,"constructor")&&f.constructor;return"function"==typeof _&&_ instanceof _&&Pl.call(_)==k0}var Hp=$f?Br($f):function bF(u){return Pi(u)&&es(u)==gd},nw=T0?Br(T0):function L_(u){return Pi(u)&&zr(u)==Uo};function Gp(u){return"string"==typeof u||!rn(u)&&Pi(u)&&es(u)==gc}function As(u){return"symbol"==typeof u||Pi(u)&&es(u)==Ff}var $o=Ys?Br(Ys):function q0(u){return Pi(u)&&Vp(u.length)&&!!Si[es(u)]},Pv=vp(lp),PD=vp(function(u,f){return u<=f});function Ov(u){if(!u)return[];if(eo(u))return Gp(u)?go(u):Qs(u);if(ih&&u[ih])return function rA(X){for(var ue,oe=[];!(ue=X.next()).done;)oe.push(ue.value);return oe}(u[ih]());var f=zr(u);return(f==Bo?qf:f==Uo?Hn:Bc)(u)}function sl(u){return u?(u=bo(u))===In||u===-In?(u<0?-1:1)*SE:u==u?u:0:0===u?u:0}function dn(u){var f=sl(u),_=f%1;return f==f?_?f-_:f:0}function OD(u){return u?Ll(dn(u),0,ua):0}function bo(u){if("number"==typeof u)return u;if(As(u))return Pf;if(wi(u)){var f="function"==typeof u.valueOf?u.valueOf():u;u=wi(f)?f+"":f}if("string"!=typeof u)return 0===u?u:+u;u=$n(u);var _=Ya.test(u);return _||ir.test(u)?oF(u.slice(2),_?2:8):VE.test(u)?Pf:+u}function Hl(u){return ci(u,Ds(u))}function Fn(u){return null==u?"":Zs(u)}var mt=Ar(function(u,f){if(wp(f)||eo(f))ci(f,fr(f),u);else for(var _ in f)ii.call(f,_)&&Ks(u,_,f[_])}),iw=Ar(function(u,f){ci(f,Ds(f),u)}),Gl=Ar(function(u,f,_,w){ci(f,Ds(f),u,w)}),ol=Ar(function(u,f,_,w){ci(f,fr(f),u,w)}),LD=yo(rh),Nc=pn(function(u,f){u=oi(u);var _=-1,w=f.length,S=w>2?f[2]:V;for(S&&Dr(f[0],f[1],S)&&(w=1);++_1),P}),ci(u,q_(u),_),w&&(_=Ms(_,Ci|ms|$s,xa));for(var S=f.length;S--;)dh(_,f[S]);return _}),jD=yo(function(u,f){return null==u?{}:function Z0(u,f){return Q0(u,f,function(_,w){return Uv(u,w)})}(u,f)});function Vv(u,f){if(null==u)return{};var _=mi(q_(u),function(w){return[w]});return f=Lt(f),Q0(u,_,function(w,S){return f(w,S[0])})}var aw=fh(fr),zv=fh(Ds);function Bc(u){return null==u?[]:Ju(u,fr(u))}var G=$d(function(u,f,_){return f=f.toLowerCase(),u+(_?Hv(f):f)});function Hv(u){return Kd(Fn(u).toLowerCase())}function Gv(u){return(u=Fn(u))&&u.replace(po,nA).replace(JO,"")}var s1=$d(function(u,f,_){return u+(_?"-":"")+f.toLowerCase()}),cw=$d(function(u,f,_){return u+(_?" ":"")+f.toLowerCase()}),o1=Gd("toLowerCase"),$v=$d(function(u,f,_){return u+(_?"_":"")+f.toLowerCase()}),c1=$d(function(u,f,_){return u+(_?" ":"")+Kd(f)}),fw=$d(function(u,f,_){return u+(_?" ":"")+f.toUpperCase()}),Kd=Gd("toUpperCase");function pw(u,f,_){return u=Fn(u),(f=_?V:f)===V?function nn(X){return ZE.test(X)}(u)?function fn(X){return X.match(eF)||[]}(u):function tA(X){return X.match(NE)||[]}(u):u.match(f)||[]}var jv=pn(function(u,f){try{return _s(u,V,f)}catch(_){return Bp(_)?_:new $t(_)}}),f1=yo(function(u,f){return Rn(f,function(_){_=Ho(_),zo(u,_,Oc(u[_],u))}),u});function Yv(u){return function(){return u}}var mw=Cs(),_1=Cs(!0);function is(u){return u}function $p(u){return N_("function"==typeof u?u:Ms(u,Ci))}var Xv=pn(function(u,f){return function(_){return _a(_,u,f)}}),v1=pn(function(u,f){return function(_){return _a(u,_,f)}});function gw(u,f,_){var w=fr(f),S=ga(f,w);null==_&&(!wi(f)||!S.length&&w.length)&&(_=f,f=u,u=this,S=ga(f,fr(f)));var P=!(wi(_)&&"chain"in _&&!_.chain),H=zl(u);return Rn(S,function(Y){var Q=f[Y];u[Y]=Q,H&&(u.prototype[Y]=function(){var _e=this.__chain__;if(P||_e){var ye=u(this.__wrapped__);return(ye.__actions__=Qs(this.__actions__)).push({func:Q,args:arguments,thisArg:u}),ye.__chain__=_e,ye}return Q.apply(u,kl([this.value()],arguments))})}),u}function xo(){}var _w=gp(mi),b1=gp(JE),x1=gp(Wf);function Mh(u){return px(u)?__(Ho(u)):function va(u){return function(f){return Mc(f,u)}}(u)}var Kv=sx(),Ch=sx(!0);function Sh(){return[]}function Qd(){return!1}var w1=$_(function(u,f){return u+f},0),M1=W_("ceil"),bw=$_(function(u,f){return u/f},1),C1=W_("floor"),D1=$_(function(u,f){return u*f},1),WF=W_("round"),ty=$_(function(u,f){return u-f},0);return I.after=function vD(u,f){if("function"!=typeof f)throw new Sr(Un);return u=dn(u),function(){if(--u<1)return f.apply(this,arguments)}},I.ary=xh,I.assign=mt,I.assignIn=iw,I.assignInWith=Gl,I.assignWith=ol,I.at=LD,I.before=Ca,I.bind=Oc,I.bindAll=f1,I.bindKey=xv,I.castArray=function wD(){if(!arguments.length)return[];var u=arguments[0];return rn(u)?u:[u]},I.chain=zx,I.chunk=function nv(u,f,_){f=(_?Dr(u,f,_):f===V)?1:hr(dn(f),0);var w=null==u?0:u.length;if(!w||f<1)return[];for(var S=0,P=0,H=oe(w_(w/f));SS?0:S+_),(w=w===V||w>S?S:dn(w))<0&&(w+=S),w=_>w?0:OD(w);_>>0)?(u=Fn(u))&&("string"==typeof f||null!=f&&!Hp(f))&&!(f=Zs(f))&&Cd(u)?Tc(go(u),0,_):u.split(f,_):[]},I.spread=function Kx(u,f){if("function"!=typeof u)throw new Sr(Un);return f=null==f?0:hr(dn(f),0),pn(function(_){var w=_[f],S=Tc(_,0,f);return w&&kl(S,w),_s(u,this,S)})},I.tail=function Pc(u){var f=null==u?0:u.length;return f?ts(u,1,f):[]},I.take=function Ox(u,f,_){return u&&u.length?ts(u,0,(f=_||f===V?1:dn(f))<0?0:f):[]},I.takeRight=function Fx(u,f,_){var w=null==u?0:u.length;return w?ts(u,(f=w-(f=_||f===V?1:dn(f)))<0?0:f,w):[]},I.takeRightWhile=function QA(u,f){return u&&u.length?uh(u,Lt(f,3),!1,!0):[]},I.takeWhile=function IF(u,f){return u&&u.length?uh(u,Lt(f,3)):[]},I.tap=function tD(u,f){return f(u),u},I.throttle=function Fp(u,f,_){var w=!0,S=!0;if("function"!=typeof u)throw new Sr(Un);return wi(_)&&(w="leading"in _?!!_.leading:w,S="trailing"in _?!!_.trailing:S),yD(u,f,{leading:w,maxWait:f,trailing:S})},I.thru=Ip,I.toArray=Ov,I.toPairs=aw,I.toPairsIn=zv,I.toPath=function yw(u){return rn(u)?mi(u,Ho):As(u)?[u]:Qs(yx(Fn(u)))},I.toPlainObject=Hl,I.transform=function XD(u,f,_){var w=rn(u),S=w||rl(u)||$o(u);if(f=Lt(f,4),null==_){var P=u&&u.constructor;_=S?w?new P:[]:wi(u)&&zl(P)?Pd(xs(u)):{}}return(S?Rn:ki)(u,function(H,Y,Q){return f(_,H,Y,Q)}),_},I.unary=function Zx(u){return xh(u,1)},I.union=Ap,I.unionBy=JA,I.unionWith=Lx,I.uniq=function Nx(u){return u&&u.length?ri(u):[]},I.uniqBy=function Bx(u,f){return u&&u.length?ri(u,Lt(f,2)):[]},I.uniqWith=function fv(u,f){return f="function"==typeof f?f:V,u&&u.length?ri(u,V,f):[]},I.unset=function KD(u,f){return null==u||dh(u,f)},I.unzip=Dp,I.unzipWith=yh,I.update=function ZD(u,f,_){return null==u?u:nx(u,f,hp(_))},I.updateWith=function QD(u,f,_,w){return w="function"==typeof w?w:V,null==u?u:nx(u,f,hp(_),w)},I.values=Bc,I.valuesIn=function JD(u){return null==u?[]:Ju(u,Ds(u))},I.without=Tp,I.words=pw,I.wrap=function Av(u,f){return Ev(hp(f),u)},I.xor=Ux,I.xorBy=pv,I.xorWith=mv,I.zip=gv,I.zipObject=function bh(u,f){return Dc(u||[],f||[],Ks)},I.zipObjectDeep=function eD(u,f){return Dc(u||[],f||[],Vd)},I.zipWith=Vx,I.entries=aw,I.entriesIn=zv,I.extend=iw,I.extendWith=Gl,gw(I,I),I.add=w1,I.attempt=jv,I.camelCase=G,I.capitalize=Hv,I.ceil=M1,I.clamp=function e1(u,f,_){return _===V&&(_=f,f=V),_!==V&&(_=(_=bo(_))==_?_:0),f!==V&&(f=(f=bo(f))==f?f:0),Ll(bo(u),f,_)},I.clone=function Kn(u){return Ms(u,$s)},I.cloneDeep=function CD(u){return Ms(u,Ci|$s)},I.cloneDeepWith=function Lp(u,f){return Ms(u,Ci|$s,f="function"==typeof f?f:V)},I.cloneWith=function MD(u,f){return Ms(u,$s,f="function"==typeof f?f:V)},I.conformsTo=function Qx(u,f){return null==f||R_(u,f,fr(f))},I.deburr=Gv,I.defaultTo=function g1(u,f){return null==u||u!=u?f:u},I.divide=bw,I.endsWith=function n1(u,f,_){u=Fn(u),f=Zs(f);var w=u.length,S=_=_===V?w:Ll(dn(_),0,w);return(_-=f.length)>=0&&u.slice(_,S)==f},I.eq=Go,I.escape=function r1(u){return(u=Fn(u))&&FE.test(u)?u.replace(f0,ot):u},I.escapeRegExp=function lw(u){return(u=Fn(u))&&_0.test(u)?u.replace(s_,"\\$&"):u},I.every=function vv(u,f,_){var w=rn(u)?JE:W0;return _&&Dr(u,f,_)&&(f=V),w(u,Lt(f,3))},I.find=$x,I.findIndex=Sx,I.findKey=function Fv(u,f){return ee(u,Lt(f,3),ki)},I.findLast=kp,I.findLastIndex=rv,I.findLastKey=function Lv(u,f){return ee(u,Lt(f,3),P_)},I.floor=C1,I.forEach=bv,I.forEachRight=Vl,I.forIn=function UD(u,f){return null==u?u:tl(u,Lt(f,3),Ds)},I.forInRight=function Nv(u,f){return null==u?u:Ai(u,Lt(f,3),Ds)},I.forOwn=function al(u,f){return u&&ki(u,Lt(f,3))},I.forOwnRight=function VD(u,f){return u&&P_(u,Lt(f,3))},I.get=Bv,I.gt=SD,I.gte=ED,I.has=function GD(u,f){return null!=u&&ux(u,f,sp)},I.hasIn=Uv,I.head=Ax,I.identity=is,I.includes=function aD(u,f,_,w){u=eo(u)?u:Bc(u),_=_&&!w?dn(_):0;var S=u.length;return _<0&&(_=hr(S+_,0)),Gp(u)?_<=S&&u.indexOf(f,_)>-1:!!S&&Ft(u,f,_)>-1},I.indexOf=function vh(u,f,_){var w=null==u?0:u.length;if(!w)return-1;var S=null==_?0:dn(_);return S<0&&(S=hr(w+S,0)),Ft(u,f,S)},I.inRange=function t1(u,f,_){return f=sl(f),_===V?(_=f,f=0):_=sl(_),function O_(u,f,_){return u>=Zr(f,_)&&u=-Wa&&u<=Wa},I.isSet=nw,I.isString=Gp,I.isSymbol=As,I.isTypedArray=$o,I.isUndefined=function ID(u){return u===V},I.isWeakMap=function RD(u){return Pi(u)&&zr(u)==_d},I.isWeakSet=function kD(u){return Pi(u)&&"[object WeakSet]"==es(u)},I.join=function Dx(u,f){return null==u?"":hF.call(u,f)},I.kebabCase=s1,I.last=Tr,I.lastIndexOf=function cv(u,f,_){var w=null==u?0:u.length;if(!w)return-1;var S=w;return _!==V&&(S=(S=dn(_))<0?hr(w+S,0):Zr(S,w-1)),f==f?function Sd(X,ue,oe){for(var Be=oe+1;Be--;)if(X[Be]===ue)return Be;return Be}(u,f,S):Qu(u,Yf,S,!0)},I.lowerCase=cw,I.lowerFirst=o1,I.lt=Pv,I.lte=PD,I.max=function xw(u){return u&&u.length?Ld(u,is,Nd):V},I.maxBy=function ww(u,f){return u&&u.length?Ld(u,Lt(f,2),Nd):V},I.mean=function S1(u){return Md(u,is)},I.meanBy=function E1(u,f){return Md(u,Lt(f,2))},I.min=function no(u){return u&&u.length?Ld(u,is,lp):V},I.minBy=function A1(u,f){return u&&u.length?Ld(u,Lt(f,2),lp):V},I.stubArray=Sh,I.stubFalse=Qd,I.stubObject=function vw(){return{}},I.stubString=function Zv(){return""},I.stubTrue=function Qv(){return!0},I.multiply=D1,I.nth=function Tx(u,f){return u&&u.length?CA(u,dn(f)):V},I.noConflict=function E(){return Cr._===this&&(Cr._=Kf),this},I.noop=xo,I.now=Op,I.pad=function a1(u,f,_){u=Fn(u);var w=(f=dn(f))?ur(u):0;if(!f||w>=f)return u;var S=(f-w)/2;return _p(M_(S),_)+u+_p(w_(S),_)},I.padEnd=function UF(u,f,_){u=Fn(u);var w=(f=dn(f))?ur(u):0;return f&&wf){var w=u;u=f,f=w}if(_||u%1||f%1){var S=C_();return Zr(u+S*(f-u+ke("1e-"+((S+"").length-1))),f)}return lh(u,f)},I.reduce=function dD(u,f,_){var w=rn(u)?g_:I0,S=arguments.length<3;return w(u,Lt(f,4),_,S,el)},I.reduceRight=function uD(u,f,_){var w=rn(u)?eA:I0,S=arguments.length<3;return w(u,Lt(f,4),_,S,k_)},I.repeat=function $i(u,f,_){return f=(_?Dr(u,f,_):f===V)?1:dn(f),ch(Fn(u),f)},I.replace=function l1(){var u=arguments,f=Fn(u[0]);return u.length<3?f:f.replace(u[1],u[2])},I.result=function YD(u,f,_){var w=-1,S=(f=ba(f,u)).length;for(S||(S=1,u=V);++wWa)return[];var _=ua,w=Zr(u,ua);f=Lt(f),u-=ua;for(var S=qs(w,f);++_=P)return u;var Y=_-ur(w);if(Y<1)return w;var Q=H?Tc(H,0,Y).join(""):u.slice(0,Y);if(S===V)return Q+w;if(H&&(Y+=Q.length-Y),Hp(S)){if(u.slice(Y).search(S)){var _e,ye=Q;for(S.global||(S=yc(S.source,Fn(x0.exec(S))+"g")),S.lastIndex=0;_e=S.exec(ye);)var be=_e.index;Q=Q.slice(0,be===V?Y:be)}}else if(u.indexOf(Zs(S),Y)!=Y){var Xe=Q.lastIndexOf(S);Xe>-1&&(Q=Q.slice(0,Xe))}return Q+w},I.unescape=function h1(u){return(u=Fn(u))&&OE.test(u)?u.replace(h0,Xf):u},I.uniqueId=function ey(u){var f=++yi;return Fn(u)+f},I.upperCase=fw,I.upperFirst=Kd,I.each=bv,I.eachRight=Vl,I.first=Ax,gw(I,function(){var u={};return ki(I,function(f,_){ii.call(I.prototype,_)||(u[_]=f)}),u}(),{chain:!1}),I.VERSION="4.17.21",Rn(["bind","bindKey","curry","curryRight","partial","partialRight"],function(u){I[u].placeholder=I}),Rn(["drop","take"],function(u,f){kn.prototype[u]=function(_){_=_===V?1:hr(dn(_),0);var w=this.__filtered__&&!f?new kn(this):this.clone();return w.__filtered__?w.__takeCount__=Zr(_,w.__takeCount__):w.__views__.push({size:Zr(_,ua),type:u+(w.__dir__<0?"Right":"")}),w},kn.prototype[u+"Right"]=function(_){return this.reverse()[u](_).reverse()}}),Rn(["filter","map","takeWhile"],function(u,f){var _=f+1,w=1==_||3==_;kn.prototype[u]=function(S){var P=this.clone();return P.__iteratees__.push({iteratee:Lt(S,3),type:_}),P.__filtered__=P.__filtered__||w,P}}),Rn(["head","last"],function(u,f){var _="take"+(f?"Right":"");kn.prototype[u]=function(){return this[_](1).value()[0]}}),Rn(["initial","tail"],function(u,f){var _="drop"+(f?"":"Right");kn.prototype[u]=function(){return this.__filtered__?new kn(this):this[_](1)}}),kn.prototype.compact=function(){return this.filter(is)},kn.prototype.find=function(u){return this.filter(u).head()},kn.prototype.findLast=function(u){return this.reverse().find(u)},kn.prototype.invokeMap=pn(function(u,f){return"function"==typeof u?new kn(this):this.map(function(_){return _a(_,u,f)})}),kn.prototype.reject=function(u){return this.filter(Sv(Lt(u)))},kn.prototype.slice=function(u,f){u=dn(u);var _=this;return _.__filtered__&&(u>0||f<0)?new kn(_):(u<0?_=_.takeRight(-u):u&&(_=_.drop(u)),f!==V&&(_=(f=dn(f))<0?_.dropRight(-f):_.take(f-u)),_)},kn.prototype.takeRightWhile=function(u){return this.reverse().takeWhile(u).reverse()},kn.prototype.toArray=function(){return this.take(ua)},ki(kn.prototype,function(u,f){var _=/^(?:filter|find|map|reject)|While$/.test(f),w=/^(?:head|last)$/.test(f),S=I[w?"take"+("last"==f?"Right":""):f],P=w||/^find/.test(f);S&&(I.prototype[f]=function(){var H=this.__wrapped__,Y=w?[1]:arguments,Q=H instanceof kn,_e=Y[0],ye=Q||rn(H),be=function(An){var Ln=S.apply(I,kl([An],Y));return w&&Xe?Ln[0]:Ln};ye&&_&&"function"==typeof _e&&1!=_e.length&&(Q=ye=!1);var Xe=this.__chain__,Ut=P&&!Xe,mn=Q&&!this.__actions__.length;if(!P&&ye){H=mn?H:new kn(this);var Vt=u.apply(H,Y);return Vt.__actions__.push({func:Ip,args:[be],thisArg:V}),new Ei(Vt,Xe)}return Ut&&mn?u.apply(this,Y):(Vt=this.thru(be),Ut?w?Vt.value()[0]:Vt.value():Vt)})}),Rn(["pop","push","shift","sort","splice","unshift"],function(u){var f=rr[u],_=/^(?:push|sort|unshift)$/.test(u)?"tap":"thru",w=/^(?:pop|shift)$/.test(u);I.prototype[u]=function(){var S=arguments;if(w&&!this.__chain__){var P=this.value();return f.apply(rn(P)?P:[],S)}return this[_](function(H){return f.apply(rn(H)?H:[],S)})}}),ki(kn.prototype,function(u,f){var _=I[f];if(_){var w=_.name+"";ii.call(Rd,w)||(Rd[w]=[]),Rd[w].push({name:f,func:_})}}),Rd[Wd(V,dr).name]=[{name:"wrapper",func:V}],kn.prototype.clone=function B0(){var u=new kn(this.__wrapped__);return u.__actions__=Qs(this.__actions__),u.__dir__=this.__dir__,u.__filtered__=this.__filtered__,u.__iteratees__=Qs(this.__iteratees__),u.__takeCount__=this.__takeCount__,u.__views__=Qs(this.__views__),u},kn.prototype.reverse=function Od(){if(this.__filtered__){var u=new kn(this);u.__dir__=-1,u.__filtered__=!0}else(u=this.clone()).__dir__*=-1;return u},kn.prototype.value=function ws(){var u=this.__wrapped__.value(),f=this.__dir__,_=rn(u),w=f<0,S=_?u.length:0,P=function xp(u,f,_){for(var w=-1,S=_.length;++w=this.__values__.length;return{done:u,value:u?V:this.__values__[this.__index__++]}},I.prototype.plant=function nD(u){for(var f,_=this;_ instanceof xc;){var w=ns(_);w.__index__=0,w.__values__=V,f?S.__wrapped__=w:f=w;var S=w;_=_.__wrapped__}return S.__wrapped__=u,f},I.prototype.reverse=function iD(){var u=this.__wrapped__;if(u instanceof kn){var f=u;return this.__actions__.length&&(f=new kn(this)),(f=f.reverse()).__actions__.push({func:Ip,args:[dv],thisArg:V}),new Ei(f,this.__chain__)}return this.thru(dv)},I.prototype.toJSON=I.prototype.valueOf=I.prototype.value=function RF(){return ya(this.__wrapped__,this.__actions__)},I.prototype.first=I.prototype.head,ih&&(I.prototype[ih]=function jd(){return this}),I}();Cr._=ys,(cn=function(){return ys}.call(Hs,ps,Hs,Lo))!==V&&(Lo.exports=cn)}.call(this)},738:function(Lo){var Hs;Lo.exports=((Hs=function(){function ps(Mi){return Nr.appendChild(Mi.dom),Mi}function cn(Mi){for(var Ci=0;CiZt+1e3&&(Al.update(1e3*Un/(Mi-Zt),100),Zt=Mi,Un=0,Gs)){var Ci=performance.memory;Gs.update(Ci.usedJSHeapSize/1048576,Ci.jsHeapSizeLimit/1048576)}return Mi},update:function(){Kr=this.end()},domElement:Nr,setMode:cn}}).Panel=function(ps,cn,V){var Nr=1/0,Kr=0,Zt=Math.round,Un=Zt(window.devicePixelRatio||1),Al=80*Un,Ha=48*Un,Gs=3*Un,Mi=2*Un,Ci=3*Un,ms=15*Un,$s=74*Un,Ws=30*Un,No=document.createElement("canvas");No.width=Al,No.height=Ha,No.style.cssText="width:80px;height:48px";var On=No.getContext("2d");return On.font="bold "+9*Un+"px Helvetica,Arial,sans-serif",On.textBaseline="top",On.fillStyle=V,On.fillRect(0,0,Al,Ha),On.fillStyle=cn,On.fillText(ps,Gs,Mi),On.fillRect(Ci,ms,$s,Ws),On.fillStyle=V,On.globalAlpha=.9,On.fillRect(Ci,ms,$s,Ws),{dom:No,update:function(dr,pc){Nr=Math.min(Nr,dr),Kr=Math.max(Kr,dr),On.fillStyle=V,On.globalAlpha=1,On.fillRect(0,0,Al,ms),On.fillStyle=cn,On.fillText(Zt(dr)+" "+ps+" ("+Zt(Nr)+"-"+Zt(Kr)+")",Gs,Mi),On.drawImage(No,Ci+Un,ms,$s-Un,Ws,Ci,ms,$s-Un,Ws),On.fillRect(Ci+$s-Un,ms,Un,Ws),On.fillStyle=V,On.globalAlpha=.9,On.fillRect(Ci+$s-Un,ms,Un,Zt((1-dr/pc)*Ws))}}},Hs)}},Lo=>{Lo(Lo.s=855)}]); \ No newline at end of file +(self.webpackChunkgui=self.webpackChunkgui||[]).push([[179],{790:(Lo,Hs,ps)=>{"use strict";function cn(i){return"function"==typeof i}function V(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 Nr=V(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 Kr(i,t){if(i){const e=i.indexOf(t);0<=e&&i.splice(e,1)}}class Zt{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(cn(n))try{n()}catch(s){t=s instanceof Nr?s.errors:[s]}const{_finalizers:r}=this;if(r){this._finalizers=null;for(const s of r)try{Ha(s)}catch(o){t=t??[],o instanceof Nr?t=[...t,...o.errors]:t.push(o)}}if(t)throw new Nr(t)}}add(t){var e;if(t&&t!==this)if(this.closed)Ha(t);else{if(t instanceof Zt){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)&&Kr(e,t)}remove(t){const{_finalizers:e}=this;e&&Kr(e,t),t instanceof Zt&&t._removeParent(this)}}Zt.EMPTY=(()=>{const i=new Zt;return i.closed=!0,i})();const Un=Zt.EMPTY;function Al(i){return i instanceof Zt||i&&"closed"in i&&cn(i.remove)&&cn(i.add)&&cn(i.unsubscribe)}function Ha(i){cn(i)?i():i.unsubscribe()}const Gs={onUnhandledError:null,onStoppedNotification:null,Promise:void 0,useDeprecatedSynchronousErrorHandling:!1,useDeprecatedNextContext:!1},Mi={setTimeout(i,t,...e){const{delegate:n}=Mi;return n?.setTimeout?n.setTimeout(i,t,...e):setTimeout(i,t,...e)},clearTimeout(i){const{delegate:t}=Mi;return(t?.clearTimeout||clearTimeout)(i)},delegate:void 0};function Ci(i){Mi.setTimeout(()=>{const{onUnhandledError:t}=Gs;if(!t)throw i;t(i)})}function ms(){}const $s=On("C",void 0,void 0);function On(i,t,e){return{kind:i,value:t,error:e}}let dr=null;function pc(i){if(Gs.useDeprecatedSynchronousErrorHandling){const t=!dr;if(t&&(dr={errorThrown:!1,error:null}),i(),t){const{errorThrown:e,error:n}=dr;if(dr=null,e)throw n}}else i()}class Dl extends Zt{constructor(t){super(),this.isStopped=!1,t?(this.destination=t,Al(t)&&t.add(this)):this.destination=ME}static create(t,e,n){return new da(t,e,n)}next(t){this.isStopped?Xg(function No(i){return On("N",i,void 0)}(t),this):this._next(t)}error(t){this.isStopped?Xg(function Ws(i){return On("E",void 0,i)}(t),this):(this.isStopped=!0,this._error(t))}complete(){this.isStopped?Xg($s,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 ca=Function.prototype.bind;function Tl(i,t){return ca.call(i,t)}class Ga{constructor(t){this.partialObserver=t}next(t){const{partialObserver:e}=this;if(e.next)try{e.next(t)}catch(n){pd(n)}}error(t){const{partialObserver:e}=this;if(e.error)try{e.error(t)}catch(n){pd(n)}else pd(t)}complete(){const{partialObserver:t}=this;if(t.complete)try{t.complete()}catch(e){pd(e)}}}class da extends Dl{constructor(t,e,n){let r;if(super(),cn(t)||!t)r={next:t??void 0,error:e??void 0,complete:n??void 0};else{let s;this&&Gs.useDeprecatedNextContext?(s=Object.create(t),s.unsubscribe=()=>this.unsubscribe(),r={next:t.next&&Tl(t.next,s),error:t.error&&Tl(t.error,s),complete:t.complete&&Tl(t.complete,s)}):r=t}this.destination=new Ga(r)}}function pd(i){Gs.useDeprecatedSynchronousErrorHandling?function la(i){Gs.useDeprecatedSynchronousErrorHandling&&dr&&(dr.errorThrown=!0,dr.error=i)}(i):Ci(i)}function Xg(i,t){const{onStoppedNotification:e}=Gs;e&&Mi.setTimeout(()=>e(i,t))}const ME={closed:!0,next:ms,error:function wE(i){throw i},complete:ms},Kg="function"==typeof Symbol&&Symbol.observable||"@@observable";function $a(i){return i}function a0(i){return 0===i.length?$a:1===i.length?i[0]:function(e){return i.reduce((n,r)=>r(n),e)}}let In=(()=>{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 Pf(i){return i&&i instanceof Dl||function SE(i){return i&&cn(i.next)&&cn(i.error)&&cn(i.complete)}(i)&&Al(i)}(e)?e:new da(e,n,r);return pc(()=>{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=Wa(n))((r,s)=>{const o=new da({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)}[Kg](){return this}pipe(...e){return a0(e)(this)}toPromise(e){return new(e=Wa(e))((n,r)=>{let s;this.subscribe(o=>s=o,o=>r(o),()=>n(s))})}}return i.create=t=>new i(t),i})();function Wa(i){var t;return null!==(t=i??Gs.Promise)&&void 0!==t?t:Promise}const ua=V(i=>function(){i(this),this.name="ObjectUnsubscribedError",this.message="object unsubscribed"});let Re=(()=>{class i extends In{constructor(){super(),this.closed=!1,this.currentObservers=null,this.observers=[],this.isStopped=!1,this.hasError=!1,this.thrownError=null}lift(e){const n=new l0(this,this);return n.operator=e,n}_throwIfClosed(){if(this.closed)throw new ua}next(e){pc(()=>{if(this._throwIfClosed(),!this.isStopped){this.currentObservers||(this.currentObservers=Array.from(this.observers));for(const n of this.currentObservers)n.next(e)}})}error(e){pc(()=>{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(){pc(()=>{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?Un:(this.currentObservers=null,s.push(e),new Zt(()=>{this.currentObservers=null,Kr(s,e)}))}_checkFinalizedStatuses(e){const{hasError:n,thrownError:r,isStopped:s}=this;n?e.error(r):s&&e.complete()}asObservable(){const e=new In;return e.source=this,e}}return i.create=(t,e)=>new l0(t,e),i})();class l0 extends Re{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:Un}}function c0(i){return cn(i?.lift)}function ti(i){return t=>{if(c0(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 Yn(i,t,e,n,r){return new EE(i,t,e,n,r)}class EE extends Dl{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 et(i,t){return ti((e,n)=>{let r=0;e.subscribe(Yn(n,s=>{n.next(i.call(t,s,r++))}))})}function ha(i){return this instanceof ha?(this.v=i,this):new ha(i)}function Nf(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 Zg(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 i_=i=>i&&"number"==typeof i.length&&"function"!=typeof i;function r_(i){return cn(i?.then)}function p0(i){return cn(i[Kg])}function m0(i){return Symbol.asyncIterator&&cn(i?.[Symbol.asyncIterator])}function g0(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 _0=function s_(){return"function"==typeof Symbol&&Symbol.iterator?Symbol.iterator:"@@iterator"}();function Bf(i){return cn(i?.[_0])}function v0(i){return function Lf(i,t,e){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var r,n=e.apply(i,t||[]),s=[];return r=Object.create(("function"==typeof AsyncIterator?AsyncIterator:Object).prototype),a("next"),a("throw"),a("return",function o(m){return function(g){return Promise.resolve(g).then(m,h)}}),r[Symbol.asyncIterator]=function(){return this},r;function a(m,g){n[m]&&(r[m]=function(b){return new Promise(function(v,y){s.push([m,b,v,y])>1||l(m,b)})},g&&(r[m]=g(r[m])))}function l(m,g){try{!function c(m){m.value instanceof ha?Promise.resolve(m.value.v).then(d,h):p(s[0][2],m)}(n[m](g))}catch(b){p(s[0][3],b)}}function d(m){l("next",m)}function h(m){l("throw",m)}function p(m,g){m(g),s.shift(),s.length&&l(s[0][0],s[0][1])}}(this,arguments,function*(){const e=i.getReader();try{for(;;){const{value:n,done:r}=yield ha(e.read());if(r)return yield ha(void 0);yield yield ha(n)}}finally{e.releaseLock()}})}function y0(i){return cn(i?.getReader)}function wr(i){if(i instanceof In)return i;if(null!=i){if(p0(i))return function LE(i){return new In(t=>{const e=i[Kg]();if(cn(e.subscribe))return e.subscribe(t);throw new TypeError("Provided object does not correctly implement Symbol.observable")})}(i);if(i_(i))return function NE(i){return new In(t=>{for(let e=0;e{i.then(e=>{t.closed||(t.next(e),t.complete())},e=>t.error(e)).then(null,Ci)})}(i);if(m0(i))return b0(i);if(Bf(i))return function UE(i){return new In(t=>{for(const e of i)if(t.next(e),t.closed)return;t.complete()})}(i);if(y0(i))return function x0(i){return b0(v0(i))}(i)}throw g0(i)}function b0(i){return new In(t=>{(function VE(i,t){var e,n,r,s;return function gd(i,t,e,n){return new(e||(e=Promise))(function(s,o){function a(d){try{c(n.next(d))}catch(h){o(h)}}function l(d){try{c(n.throw(d))}catch(h){o(h)}}function c(d){d.done?s(d.value):function r(s){return s instanceof e?s:new e(function(o){o(s)})}(d.value).then(a,l)}c((n=n.apply(i,t||[])).next())})}(this,void 0,void 0,function*(){try{for(e=Nf(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 Ya(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 ir(i,t,e=1/0){return cn(t)?ir((n,r)=>et((s,o)=>t(n,s,r,o))(wr(i(n,r))),e):("number"==typeof t&&(e=t),ti((n,r)=>function zE(i,t,e,n,r,s,o,a){const l=[];let c=0,d=0,h=!1;const p=()=>{h&&!l.length&&!c&&t.complete()},m=b=>c{s&&t.next(b),c++;let v=!1;wr(e(b,d++)).subscribe(Yn(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(Yn(t,m,()=>{h=!0,p()})),()=>{a?.()}}(n,r,i,e)))}function yd(i=1/0){return ir($a,i)}const po=new In(i=>i.complete());function Gu(i){return i&&cn(i.schedule)}function a_(i){return i[i.length-1]}function w0(i){return cn(a_(i))?i.pop():void 0}function $u(i){return Gu(a_(i))?i.pop():void 0}function l_(i,t=0){return ti((e,n)=>{e.subscribe(Yn(n,r=>Ya(n,i,()=>n.next(r),t),()=>Ya(n,i,()=>n.complete(),t),r=>Ya(n,i,()=>n.error(r),t)))})}function c_(i,t=0){return ti((e,n)=>{n.add(i.schedule(()=>e.subscribe(n),t))})}function d_(i,t){if(!i)throw new Error("Iterable cannot be null");return new In(e=>{Ya(e,t,()=>{const n=i[Symbol.asyncIterator]();Ya(e,t,()=>{n.next().then(r=>{r.done?e.complete():e.next(r.value)})},0,!0)})})}function Ni(i,t){return t?function S0(i,t){if(null!=i){if(p0(i))return function GE(i,t){return wr(i).pipe(c_(t),l_(t))}(i,t);if(i_(i))return function WE(i,t){return new In(e=>{let n=0;return t.schedule(function(){n===i.length?e.complete():(e.next(i[n++]),e.closed||this.schedule())})})}(i,t);if(r_(i))return function $E(i,t){return wr(i).pipe(c_(t),l_(t))}(i,t);if(m0(i))return d_(i,t);if(Bf(i))return function jE(i,t){return new In(e=>{let n;return Ya(e,t,()=>{n=i[_0](),Ya(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)}),()=>cn(n?.return)&&n.return()})}(i,t);if(y0(i))return function C0(i,t){return d_(v0(i),t)}(i,t)}throw g0(i)}(i,t):wr(i)}function Mr(...i){const t=$u(i),e=function M0(i,t){return"number"==typeof a_(i)?i.pop():t}(i,1/0),n=i;return n.length?1===n.length?wr(n[0]):yd(e)(Ni(n,t)):po}function Uf(i={}){const{connector:t=(()=>new Re),resetOnError:e=!0,resetOnComplete:n=!0,resetOnRefCountZero:r=!0}=i;return s=>{let o,a,l,c=0,d=!1,h=!1;const p=()=>{a?.unsubscribe(),a=void 0},m=()=>{p(),o=l=void 0,d=h=!1},g=()=>{const b=o;m(),b?.unsubscribe()};return ti((b,v)=>{c++,!h&&!d&&p();const y=l=l??t();v.add(()=>{c--,0===c&&!h&&!d&&(a=bd(g,r))}),y.subscribe(v),!o&&c>0&&(o=new da({next:M=>y.next(M),error:M=>{h=!0,p(),a=bd(m,e,M),y.error(M)},complete:()=>{d=!0,p(),a=bd(m,n),y.complete()}}),wr(b).subscribe(o))})(s)}}function bd(i,t,...e){if(!0===t)return void i();if(!1===t)return;const n=new da({next:()=>{n.unsubscribe(),i()}});return wr(t(...e)).subscribe(n)}function li(i){for(let t in i)if(i[t]===li)return t;throw Error("Could not find renamed property on target object.")}function u_(i,t){for(const e in t)t.hasOwnProperty(e)&&!i.hasOwnProperty(e)&&(i[e]=t[e])}function pi(i){if("string"==typeof i)return i;if(Array.isArray(i))return"["+i.map(pi).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 Vf(i,t){return null==i||""===i?null===t?"":t:null==t||""===t?i:i+" "+t}const h_=li({__forward_ref__:li});function Gn(i){return i.__forward_ref__=Gn,i.toString=function(){return pi(this())},i}function Pt(i){return Wu(i)?i():i}function Wu(i){return"function"==typeof i&&i.hasOwnProperty(h_)&&i.__forward_ref__===Gn}function ju(i){return i&&!!i.\u0275providers}const qu="https://g.co/ng/security#xss";class pe extends Error{constructor(t,e){super(zf(t,e)),this.code=t}}function zf(i,t){return`NG0${Math.abs(i)}${t?": "+t.trim():""}`}function Qt(i){return"string"==typeof i?i:null==i?"":String(i)}function Hf(i,t){throw new pe(-201,!1)}function En(i,t){null==i&&function ni(i,t,e,n){throw new Error(`ASSERTION ERROR: ${i}`+(null==n?"":` [Expected=> ${e} ${n} ${t} <=Actual]`))}(t,i,null,"!=")}function ke(i){return{token:i.token,providedIn:i.providedIn||null,factory:i.factory,value:void 0}}function Kt(i){return{providers:i.providers||[],imports:i.imports||[]}}function Gf(i){return f_(i,xd)||f_(i,m_)}function f_(i,t){return i.hasOwnProperty(t)?i[t]:null}function p_(i){return i&&(i.hasOwnProperty(gs)||i.hasOwnProperty(D0))?i[gs]:null}const xd=li({\u0275prov:li}),gs=li({\u0275inj:li}),m_=li({ngInjectableDef:li}),D0=li({ngInjectorDef:li});var Ot=(()=>((Ot=Ot||{})[Ot.Default=0]="Default",Ot[Ot.Host=1]="Host",Ot[Ot.Self=2]="Self",Ot[Ot.SkipSelf=4]="SkipSelf",Ot[Ot.Optional=8]="Optional",Ot))();let $f;function Ys(i){const t=$f;return $f=i,t}function _s(i,t,e){const n=Gf(i);return n&&"root"==n.providedIn?void 0===n.value?n.value=n.factory():n.value:e&Ot.Optional?null:void 0!==t?t:void Hf(pi(i))}const Rn=(()=>typeof globalThis<"u"&&globalThis||typeof global<"u"&&global||typeof window<"u"&&window||typeof self<"u"&&typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&self)(),Rl={},Ku="__NG_DI_FLAG__",mi="ngTempTokenPath",kl="ngTokenPath",g_=/\n/gm,eA="\u0275",Wf="__source";let Zu;function wd(i){const t=Zu;return Zu=i,t}function tA(i,t=Ot.Default){if(void 0===Zu)throw new pe(-203,!1);return null===Zu?_s(i,void 0,t):Zu.get(i,t&Ot.Optional?null:void 0,t)}function ee(i,t=Ot.Default){return(function T0(){return $f}()||tA)(Pt(i),t)}function Ft(i,t=Ot.Default){return ee(i,jf(t))}function jf(i){return typeof i>"u"||"number"==typeof i?i:0|(i.optional&&8)|(i.host&&1)|(i.self&&2)|(i.skipSelf&&4)}function Yf(i){const t=[];for(let e=0;e((mo=mo||{})[mo.OnPush=0]="OnPush",mo[mo.Default=1]="Default",mo))(),qs=(()=>{return(i=qs||(qs={}))[i.Emulated=0]="Emulated",i[i.None=2]="None",i[i.ShadowDom=3]="ShadowDom",qs;var i})();const Xa={},$n=[],Br=li({\u0275cmp:li}),Ju=li({\u0275dir:li}),vc=li({\u0275pipe:li}),y_=li({\u0275mod:li}),fa=li({\u0275fac:li}),eh=li({__NG_ELEMENT_ID__:li});let nA=0;function ot(i){return qa(()=>{const t=go(i),e={...t,decls:i.decls,vars:i.vars,template:i.template,consts:i.consts||null,ngContentSelectors:i.ngContentSelectors,onPush:i.changeDetection===mo.OnPush,directiveDefs:null,pipeDefs:null,dependencies:t.standalone&&i.dependencies||null,getStandaloneInjector:null,data:i.data||{},encapsulation:i.encapsulation||qs.Emulated,id:"c"+nA++,styles:i.styles||$n,_:null,schemas:i.schemas||null,tView:null};b_(e);const n=i.dependencies;return e.directiveDefs=Xf(n,!1),e.pipeDefs=Xf(n,!0),e})}function th(i,t,e){const n=i.\u0275cmp;n.directiveDefs=Xf(t,!1),n.pipeDefs=Xf(e,!0)}function iA(i){return Hn(i)||Ur(i)}function Cd(i){return null!==i}function nn(i){return qa(()=>({type:i.type,bootstrap:i.bootstrap||$n,declarations:i.declarations||$n,imports:i.imports||$n,exports:i.exports||$n,transitiveCompileScopes:null,schemas:i.schemas||null,id:i.id||null}))}function qf(i,t){if(null==i)return Xa;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 ve(i){return qa(()=>{const t=go(i);return b_(t),t})}function Gi(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 Hn(i){return i[Br]||null}function Ur(i){return i[Ju]||null}function vs(i){return i[vc]||null}function ur(i,t){const e=i[y_]||null;if(!e&&!0===t)throw new Error(`Type ${pi(i)} does not have '\u0275mod' property.`);return e}function go(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||$n,viewQuery:i.viewQuery||null,features:i.features||null,setInput:null,findHostDirectiveDefs:null,hostDirectives:null,inputs:qf(i.inputs,t),outputs:qf(i.outputs)}}function b_(i){i.features?.forEach(t=>t(i))}function Xf(i,t){if(!i)return null;const e=t?vs:iA;return()=>("function"==typeof i?i():i).map(n=>e(n)).filter(Cd)}const Ka=0,at=1,fn=2,Bi=3,ys=4,X=5,ue=6,oe=7,Be=8,$t=9,Vn=10,yt=11,oi=12,yc=13,R0=14,Sr=15,rr=16,nh=17,Vo=18,Xs=19,Pl=20,ii=21,yi=22,Ed=1,k0=2,Kf=7,Zf=8,Za=9,Ui=10;function bs(i){return Array.isArray(i)&&"object"==typeof i[Ed]}function xs(i){return Array.isArray(i)&&!0===i[Ed]}function Qf(i){return 0!=(4&i.flags)}function Ad(i){return i.componentOffset>-1}function bc(i){return 1==(1&i.flags)}function _o(i){return!!i.template}function ih(i){return 0!=(256&i[fn])}function Qa(i,t){return i.hasOwnProperty(fa)?i[fa]:null}class Td{constructor(t,e,n){this.previousValue=t,this.currentValue=e,this.firstChange=n}isFirstChange(){return this.firstChange}}function bi(){return Id}function Id(i){return i.type.prototype.ngOnChanges&&(i.setInput=Rd),tp}function tp(){const i=N0(this),t=i?.current;if(t){const e=i.previous;if(e===Xa)i.previous=t;else for(let n in t)e[n]=t[n];i.current=null,this.ngOnChanges(t)}}function Rd(i,t,e,n){const r=this.declaredInputs[e],s=N0(i)||function lA(i,t){return i[L0]=t}(i,{previous:Xa,current:null}),o=s.current||(s.current={}),a=s.previous,l=a[r];o[r]=new Td(l&&l.currentValue,t,a===Xa),i[n]=t}bi.ngInherit=!0;const L0="__ngSimpleChanges__";function N0(i){return i[L0]||null}const Qr=function(i,t,e){},kd="svg";function I(i){for(;Array.isArray(i);)i=i[Ka];return i}function xc(i,t){return I(t[i])}function Ei(i,t){return I(t[i.index])}function B0(i,t){return i.data[t]}function Od(i,t){return i[t]}function ws(i,t){const e=t[i];return bs(e)?e:e[Ka]}function np(i){return 64==(64&i[fn])}function Ol(i,t){return null==t?null:i[t]}function U0(i){i[Vo]=0}function A_(i,t){i[X]+=t;let e=i,n=i[Bi];for(;null!==n&&(1===t&&1===e[X]||-1===t&&0===e[X]);)n[X]+=t,e=n,n=n[Bi]}const kt={lFrame:el(null),bindingsEnabled:!0};function pa(){return kt.bindingsEnabled}function Se(){return kt.lFrame.lView}function zn(){return kt.lFrame.tView}function an(i){return kt.lFrame.contextLView=i,i[Be]}function zt(i){return kt.lFrame.contextLView=null,i}function Er(){let i=z0();for(;null!==i&&64===i.type;)i=i.parent;return i}function z0(){return kt.lFrame.currentTNode}function ma(i,t){const e=kt.lFrame;e.currentTNode=i,e.isParent=t}function D_(){return kt.lFrame.isParent}function T_(){kt.lFrame.isParent=!1}function Vr(){const i=kt.lFrame;let t=i.bindingRootIndex;return-1===t&&(t=i.bindingRootIndex=i.tView.bindingStartIndex),t}function Fl(){return kt.lFrame.bindingIndex++}function Ks(i){const t=kt.lFrame,e=t.bindingIndex;return t.bindingIndex=t.bindingIndex+i,e}function $0(i,t){const e=kt.lFrame;e.bindingIndex=e.bindingRootIndex=i,zo(t)}function zo(i){kt.lFrame.currentDirectiveIndex=i}function rh(i){const t=kt.lFrame.currentDirectiveIndex;return-1===t?null:i[t]}function Ll(){return kt.lFrame.currentQueryIndex}function Ms(i){kt.lFrame.currentQueryIndex=i}function vA(i){const t=i[at];return 2===t.type?t.declTNode:1===t.type?i[ue]:null}function R_(i,t,e){if(e&Ot.SkipSelf){let r=t,s=i;for(;!(r=r.parent,null!==r||e&Ot.Host||(r=vA(s),null===r||(s=s[Sr],10&r.type))););if(null===r)return!1;t=r,i=s}const n=kt.lFrame=Fd();return n.currentTNode=t,n.lView=i,!0}function rp(i){const t=Fd(),e=i[at];kt.lFrame=t,t.currentTNode=e.firstChild,t.lView=i,t.tView=e,t.contextLView=i,t.bindingIndex=e.bindingStartIndex,t.inI18n=!1}function Fd(){const i=kt.lFrame,t=null===i?null:i.child;return null===t?el(i):t}function el(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 k_(){const i=kt.lFrame;return kt.lFrame=i.parent,i.currentTNode=null,i.lView=null,i}const W0=k_;function Ld(){const i=k_();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 Xn(){return kt.lFrame.selectedIndex}function tl(i){kt.lFrame.selectedIndex=i}function Ai(){const i=kt.lFrame;return B0(i.tView,i.selectedIndex)}function ki(){kt.lFrame.currentNamespace=kd}function ga(){!function Mc(){kt.lFrame.currentNamespace=null}()}function Nd(i,t){for(let e=t.directiveStart,n=t.directiveEnd;e=n)break}else t[l]<0&&(i[Vo]+=65536),(a>11>16&&(3&i[fn])===t){i[fn]+=2048,Qr(4,a,s);try{s.call(a)}finally{Qr(5,a,s)}}}else{Qr(4,a,s);try{s.call(a)}finally{Qr(5,a,s)}}}const _a=-1;class Bd{constructor(t,e,n){this.factory=t,this.resolving=!1,this.canSeeViewProviders=e,this.injectImpl=n}}function L_(i,t,e){let n=0;for(;nt){o=s-1;break}}}for(;s>16}(i),n=t;for(;e>0;)n=n[Sr],e--;return n}let Ud=!0;function cp(i){const t=Ud;return Ud=i,t}const B_=255,Z0=5;let Q0=0;const va={};function ah(i,t){const e=J0(i,t);if(-1!==e)return e;const n=t[at];n.firstCreatePass&&(i.injectorIndex=t.length,lh(n.data,i),lh(t,null),lh(n.blueprint,null));const r=ch(i,t),s=i.injectorIndex;if(lp(r)){const o=sh(r),a=oh(r,t),l=a[at].data;for(let c=0;c<8;c++)t[s+c]=a[o+c]|l[o+c]}return t[s+8]=r,s}function lh(i,t){i.push(0,0,0,0,0,0,0,0,t)}function J0(i,t){return-1===i.injectorIndex||i.parent&&i.parent.injectorIndex===i.injectorIndex||null===t[i.injectorIndex+8]?-1:i.injectorIndex}function ch(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=uh(r),null===n)return _a;if(e++,r=r[Sr],-1!==n.injectorIndex)return n.injectorIndex|e<<16}return _a}function pn(i,t,e){!function U_(i,t,e){let n;"string"==typeof e?n=e.charCodeAt(0)||0:e.hasOwnProperty(eh)&&(n=e[eh]),null==n&&(n=e[eh]=Q0++);const r=n&B_;t.data[i+(r>>Z0)]|=1<=0?t&B_:Zs:t}(e);if("function"==typeof s){if(!R_(t,i,n))return n&Ot.Host?ex(r,0,n):Vd(t,e,n,r);try{const o=s(n);if(null!=o||n&Ot.Optional)return o;Hf()}finally{W0()}}else if("number"==typeof s){let o=null,a=J0(i,t),l=_a,c=n&Ot.Host?t[rr][ue]:null;for((-1===a||n&Ot.SkipSelf)&&(l=-1===a?ch(i,t):t[a+8],l!==_a&&z_(n,!1)?(o=t[at],a=sh(l),t=oh(l,t)):a=-1);-1!==a;){const d=t[at];if(up(s,a,d.data)){const h=EA(a,t,e,o,n,c);if(h!==va)return h}l=t[a+8],l!==_a&&z_(n,t[at].data[a+8]===c)&&up(s,a,t)?(o=d,a=sh(l),t=oh(l,t)):a=-1}}return r}function EA(i,t,e,n,r,s){const o=t[at],a=o.data[i+8],d=ts(a,o,e,null==n?Ad(a)&&Ud:n!=o&&0!=(3&a.type),r&Ot.Host&&s===a);return null!==d?Ec(t,o,d,a):va}function ts(i,t,e,n,r){const s=i.providerIndexes,o=t.data,a=1048575&s,l=i.directiveStart,d=s>>20,p=r?a+d:i.directiveEnd;for(let m=n?a:a+d;m=l&&g.type===e)return m}if(r){const m=o[l];if(m&&_o(m)&&m.type===e)return l}return null}function Ec(i,t,e,n){let r=i[e];const s=t.data;if(function xA(i){return i instanceof Bd}(r)){const o=r;o.resolving&&function E0(i,t){const e=t?`. Dependency path: ${t.join(" > ")} > ${i}`:"";throw new pe(-200,`Circular dependency in DI detected for ${i}${e}`)}(function qn(i){return"function"==typeof i?i.name||i.toString():"object"==typeof i&&null!=i&&"function"==typeof i.type?i.type.name||i.type.toString():Qt(i)}(s[e]));const a=cp(o.canSeeViewProviders);o.resolving=!0;const l=o.injectImpl?Ys(o.injectImpl):null;R_(i,n,Ot.Default);try{r=i[e]=o.factory(void 0,s,i,n),t.firstCreatePass&&e>=n.directiveStart&&function es(i,t,e){const{ngOnChanges:n,ngOnInit:r,ngDoCheck:s}=t.type.prototype;if(n){const o=Id(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&&Ys(l),cp(a),o.resolving=!1,W0()}}return r}function up(i,t,e){return!!(e[t+(i>>Z0)]&1<{const t=i.prototype.constructor,e=t[fa]||dh(t),n=Object.prototype;let r=Object.getPrototypeOf(i.prototype).constructor;for(;r&&r!==n;){const s=r[fa]||dh(r);if(s&&s!==e)return s;r=Object.getPrototypeOf(r)}return s=>new s})}function dh(i){return Wu(i)?()=>{const t=dh(Pt(i));return t&&t()}:Qa(i)}function uh(i){const t=i[at],e=t.type;return 2===e?t.declTNode:1===e?i[ue]:null}function ya(i){return function SA(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 ba(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,d){const h=l.hasOwnProperty(Dc)?l[Dc]:Object.defineProperty(l,Dc,{value:[]})[Dc];for(;h.length<=d;)h.push(null);return(h[d]=h[d]||[]).push(o),l}}return e&&(r.prototype=Object.create(e.prototype)),r.prototype.ngMetadataName=i,r.annotationCls=r,r})}class me{constructor(t,e){this._desc=t,this.ngMetadataName="InjectionToken",this.\u0275prov=void 0,"number"==typeof e?this.__NG_ELEMENT_ID__=e:void 0!==e&&(this.\u0275prov=ke({token:this,providedIn:e.providedIn||"root",factory:e.factory}))}get multi(){return this}toString(){return`InjectionToken ${this._desc}`}}function Ul(i,t){i.forEach(e=>Array.isArray(e)?Ul(e,t):t(e))}function G_(i,t,e){t>=i.length?i.push(e):i.splice(t,0,e)}function pp(i,t){return t>=i.length-1?i.pop():i.splice(t,1)[0]}function Gd(i,t){const e=[];for(let n=0;n=0?i[1|n]=e:(n=~n,function IA(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 Wd(i,t){const e=Ic(i,t);if(e>=0)return i[1|e]}function Ic(i,t){return function gp(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),Ss=Md(zd("Optional"),8),xa=Md(zd("SkipSelf"),4);var Es=(()=>((Es=Es||{})[Es.Important=1]="Important",Es[Es.DashCase=2]="DashCase",Es))();const Cp=new Map;let vx=0;const iv="__ngContext__";function Hr(i,t){bs(t)?(i[iv]=t[Pl],function yx(i){Cp.set(i[Pl],i)}(t)):i[iv]=t}let sv;function ov(i,t){return sv(i,t)}function vh(i){const t=i[Bi];return xs(t)?t[Bi]:t}function av(i){return Dx(i[yc])}function lv(i){return Dx(i[ys])}function Dx(i){for(;null!==i&&!xs(i);)i=i[ys];return i}function Tr(i,t,e,n,r){if(null!=n){let s,o=!1;xs(n)?s=n:bs(n)&&(o=!0,n=n[Ka]);const a=I(n);0===i&&null!==e?null==r?Ox(t,e,a):Pc(t,e,a,r||null,!0):1===i&&null!==e?Pc(t,e,a,r||null,!0):2===i?function mv(i,t,e){const n=Ap(i,t);n&&function QA(i,t,e,n){i.removeChild(t,e,n)}(i,n,t,e)}(t,a,o):3===i&&t.destroyNode(a),null!=s&&function zx(i,t,e,n,r){const s=e[Kf];s!==I(e)&&Tr(t,i,n,s,r);for(let a=Ui;a0&&(i[e-1][ys]=n[ys]);const s=pp(i,Ui+t);!function WA(i,t){bh(i,t,t[yt],2,null,null),t[Ka]=null,t[ue]=null}(n[at],n);const o=s[Xs];null!==o&&o.detachView(s[at]),n[Bi]=null,n[ys]=null,n[fn]&=-65}return n}function Rx(i,t){if(!(128&t[fn])){const e=t[yt];e.destroyNode&&bh(i,t,e,3,null,null),function qA(i){let t=i[yc];if(!t)return hv(i[at],i);for(;t;){let e=null;if(bs(t))e=t[yc];else{const n=t[Ui];n&&(e=n)}if(!e){for(;t&&!t[ys]&&t!==i;)bs(t)&&hv(t[at],t),t=t[Bi];null===t&&(t=i),bs(t)&&hv(t[at],t),e=t&&t[ys]}t=e}}(t)}}function hv(i,t){if(!(128&t[fn])){t[fn]&=-65,t[fn]|=128,function ZA(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===qs.None||s===qs.Emulated)return null}return Ei(n,e)}}(i,t.parent,e)}function Pc(i,t,e,n,r){i.insertBefore(t,e,n,r)}function Ox(i,t,e){i.appendChild(t,e)}function Fx(i,t,e,n,r){null!==n?Pc(i,t,e,n,r):Ox(i,t,e)}function Ap(i,t){return i.parentNode(t)}function Lx(i,t,e){return Bx(i,t,e)}let fv,Rp,vv,Bx=function Nx(i,t,e){return 40&i.type?Ei(i,e):null};function yh(i,t,e,n){const r=kx(i,n,t),s=t[yt],a=Lx(n.parent||t[ue],n,t);if(null!=r)if(Array.isArray(e))for(let l=0;li,createScript:i=>i,createScriptURL:i=>i})}catch{}return Rp}()?.createHTML(i)||i}class Vl{constructor(t){this.changingThisBreaksApplicationSecurity=t}toString(){return`SafeValue must use [property]=binding: ${this.changingThisBreaksApplicationSecurity} (see ${qu})`}}class oD extends Vl{getTypeName(){return"HTML"}}class aD extends Vl{getTypeName(){return"Style"}}class lD extends Vl{getTypeName(){return"Script"}}class cD extends Vl{getTypeName(){return"URL"}}class Pp extends Vl{getTypeName(){return"ResourceURL"}}function Js(i){return i instanceof Vl?i.changingThisBreaksApplicationSecurity:i}function Ma(i,t){const e=function dD(i){return i instanceof Vl&&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 ${qu})`)}return e===t}class gD{constructor(t){this.inertDocumentHelper=t}getInertBodyElement(t){t=""+t;try{const e=(new window.DOMParser).parseFromString(jd(t),"text/html").body;return null===e?this.inertDocumentHelper.getInertBodyElement(t):(e.removeChild(e.firstChild),e)}catch{return null}}}class _D{constructor(t){this.defaultDoc=t,this.inertDocument=this.defaultDoc.implementation.createHTMLDocument("sanitization-inert")}getInertBodyElement(t){const e=this.inertDocument.createElement("template");return e.innerHTML=jd(t),e}}const vD=/^(?!javascript:)(?:[a-z0-9+.-]+:|[^&:\/?#]*(?:[\/?#]|$))/i;function xh(i){return(i=String(i)).match(vD)?i:"unsafe:"+i}function Ca(i){const t={};for(const e of i.split(","))t[e]=!0;return t}function Oc(...i){const t={};for(const e of i)for(const n in e)e.hasOwnProperty(n)&&(t[n]=!0);return t}const xv=Ca("area,br,col,hr,img,wbr"),wv=Ca("colgroup,dd,dt,li,p,tbody,td,tfoot,th,thead,tr"),Mv=Ca("rp,rt"),Cv=Oc(xv,Oc(wv,Ca("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")),Oc(Mv,Ca("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")),Oc(Mv,wv)),Yd=Ca("background,cite,href,itemtype,longdesc,poster,src,xlink:href"),qx=Oc(Yd,Ca("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"),Ca("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")),Ev=Ca("script,style,template");class Xx{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(!Cv.hasOwnProperty(e))return this.sanitizedSomething=!0,!Ev.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();Cv.hasOwnProperty(e)&&!xv.hasOwnProperty(e)&&(this.buf.push(""))}chars(t){this.buf.push(Kx(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 bD=/[\uD800-\uDBFF][\uDC00-\uDFFF]/g,xD=/([^\#-~ |!])/g;function Kx(i){return i.replace(/&/g,"&").replace(bD,function(t){return"&#"+(1024*(t.charCodeAt(0)-55296)+(t.charCodeAt(1)-56320)+65536)+";"}).replace(xD,function(t){return"&#"+t.charCodeAt(0)+";"}).replace(//g,">")}let Fp;function Zx(i,t){let e=null;try{Fp=Fp||function Yx(i){const t=new _D(i);return function Op(){try{return!!(new window.DOMParser).parseFromString(jd(""),"text/html")}catch{return!1}}()?new gD(t):t}(i);let n=t?String(t):"";e=Fp.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=Fp.getInertBodyElement(n)}while(n!==s);return jd((new Xx).sanitizeChildren(Av(e)||e))}finally{if(e){const n=Av(e)||e;for(;n.firstChild;)n.removeChild(n.firstChild)}}}function Av(i){return"content"in i&&function wD(i){return i.nodeType===Node.ELEMENT_NODE&&"TEMPLATE"===i.nodeName}(i)?i.content:null}var Kn=(()=>((Kn=Kn||{})[Kn.NONE=0]="NONE",Kn[Kn.HTML=1]="HTML",Kn[Kn.STYLE=2]="STYLE",Kn[Kn.SCRIPT=3]="SCRIPT",Kn[Kn.URL=4]="URL",Kn[Kn.RESOURCE_URL=5]="RESOURCE_URL",Kn))();function Lp(i){const t=function xi(){const i=Se();return i&&i[oi]}();return t?t.sanitize(Kn.URL,i)||"":Ma(i,"URL")?Js(i):xh(Qt(i))}const Np=new me("ENVIRONMENT_INITIALIZER"),rl=new me("INJECTOR",-1),Jx=new me("INJECTOR_DEF_TYPES");class ew{get(t,e=Rl){if(e===Rl){const n=new Error(`NullInjectorError: No provider for ${pi(t)}!`);throw n.name="NullInjectorError",n}return e}}function AD(...i){return{\u0275providers:tw(0,i),\u0275fromNgModule:!0}}function tw(i,...t){const e=[],n=new Set;let r;return Ul(t,s=>{const o=s;Dv(o,e,[],n)&&(r||(r=[]),r.push(o))}),void 0!==r&&Bp(r,e),e}function Bp(i,t){for(let e=0;e{t.push(s)})}}function Dv(i,t,e,n){if(!(i=Pt(i)))return!1;let r=null,s=p_(i);const o=!s&&Hn(i);if(s||o){if(o&&!o.standalone)return!1;r=i}else{const l=i.ngModule;if(s=p_(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)Dv(c,t,e,n)}}else{if(!s)return!1;{if(null!=s.imports&&!a){let c;n.add(r);try{Ul(s.imports,d=>{Dv(d,t,e,n)&&(c||(c=[]),c.push(d))})}finally{}void 0!==c&&Bp(c,t)}if(!a){const c=Qa(r)||(()=>new r);t.push({provide:r,useFactory:c,deps:$n},{provide:Jx,useValue:r,multi:!0},{provide:Np,useValue:()=>ee(r),multi:!0})}const l=s.providers;null==l||a||Up(l,d=>{t.push(d)})}}return r!==i&&void 0!==i.providers}function Up(i,t){for(let e of i)ju(e)&&(e=e.\u0275providers),Array.isArray(e)?Up(e,t):t(e)}const Vp=li({provide:String,useValue:li});function wi(i){return null!==i&&"object"==typeof i&&Vp in i}function Lc(i){return"function"==typeof i}const Iv=new me("Set Injector scope."),zp={},TD={};let Rv;function wh(){return void 0===Rv&&(Rv=new ew),Rv}class to{}class Hp extends to{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,Pv(t,o=>this.processProvider(o)),this.records.set(rl,$o(void 0,this)),r.has("environment")&&this.records.set(to,$o(void 0,this));const s=this.records.get(Iv);null!=s&&"string"==typeof s.value&&this.scopes.add(s.value),this.injectorDefTypes=new Set(this.get(Jx.multi,$n,Ot.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=wd(this),n=Ys(void 0);try{return t()}finally{wd(e),Ys(n)}}get(t,e=Rl,n=Ot.Default){this.assertNotDestroyed(),n=jf(n);const r=wd(this),s=Ys(void 0);try{if(!(n&Ot.SkipSelf)){let a=this.records.get(t);if(void 0===a){const l=function kD(i){return"function"==typeof i||"object"==typeof i&&i instanceof me}(t)&&Gf(t);a=l&&this.injectableDefInScope(l)?$o(kv(t),zp):null,this.records.set(t,a)}if(null!=a)return this.hydrate(t,a)}return(n&Ot.Self?wh():this.parent).get(t,e=n&Ot.Optional&&e===Rl?null:e)}catch(o){if("NullInjectorError"===o.name){if((o[mi]=o[mi]||[]).unshift(pi(t)),r)throw o;return function v_(i,t,e,n){const r=i[mi];throw t[Wf]&&r.unshift(t[Wf]),i.message=function I0(i,t,e,n=null){i=i&&"\n"===i.charAt(0)&&i.charAt(1)==eA?i.slice(2):i;let r=pi(t);if(Array.isArray(t))r=t.map(pi).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):pi(a)))}r=`{${s.join(", ")}}`}return`${e}${n?"("+n+")":""}[${r}]: ${i.replace(g_,"\n ")}`}("\n"+i.message,r,e,n),i[kl]=r,i[mi]=null,i}(o,t,"R3InjectorError",this.source)}throw o}finally{Ys(s),wd(r)}}resolveInjectorInitializers(){const t=wd(this),e=Ys(void 0);try{const n=this.get(Np.multi,$n,Ot.Self);for(const r of n)r()}finally{wd(t),Ys(e)}}toString(){const t=[],e=this.records;for(const n of e.keys())t.push(pi(n));return`R3Injector[${t.join(", ")}]`}assertNotDestroyed(){if(this._destroyed)throw new pe(205,!1)}processProvider(t){let e=Lc(t=Pt(t))?t:Pt(t&&t.provide);const n=function Gp(i){return wi(i)?$o(void 0,i.useValue):$o(As(i),zp)}(t);if(Lc(t)||!0!==t.multi)this.records.get(e);else{let r=this.records.get(e);r||(r=$o(void 0,zp,!0),r.factory=()=>Yf(r.multi),this.records.set(e,r)),e=t,r.multi.push(t)}this.records.set(e,n)}hydrate(t,e){return e.value===zp&&(e.value=TD,e.value=e.factory()),"object"==typeof e.value&&e.value&&function RD(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=Pt(t.providedIn);return"string"==typeof e?"any"===e||this.scopes.has(e):this.injectorDefTypes.has(e)}}function kv(i){const t=Gf(i),e=null!==t?t.factory:Qa(i);if(null!==e)return e;if(i instanceof me)throw new pe(204,!1);if(i instanceof Function)return function nw(i){const t=i.length;if(t>0)throw Gd(t,"?"),new pe(204,!1);const e=function Xu(i){return i&&(i[xd]||i[m_])||null}(i);return null!==e?()=>e.factory(i):()=>new i}(i);throw new pe(204,!1)}function As(i,t,e){let n;if(Lc(i)){const r=Pt(i);return Qa(r)||kv(r)}if(wi(i))n=()=>Pt(i.useValue);else if(function Tv(i){return!(!i||!i.useFactory)}(i))n=()=>i.useFactory(...Yf(i.deps||[]));else if(function Pi(i){return!(!i||!i.useExisting)}(i))n=()=>ee(Pt(i.useExisting));else{const r=Pt(i&&(i.useClass||i.provide));if(!function ID(i){return!!i.deps}(i))return Qa(r)||kv(r);n=()=>new r(...Yf(i.deps))}return n}function $o(i,t,e=!1){return{factory:i,value:t,multi:e?[]:void 0}}function Pv(i,t){for(const e of i)Array.isArray(e)?Pv(e,t):e&&ju(e)?Pv(e.\u0275providers,t):t(e)}class PD{}class Ov{}class bo{resolveComponentFactory(t){throw function sl(i){const t=Error(`No component factory found for ${pi(i)}. Did you add it to @NgModule.entryComponents?`);return t.ngComponent=i,t}(t)}}let Hl=(()=>{class i{}return i.NULL=new bo,i})();function FD(){return Fn(Er(),Se())}function Fn(i,t){return new mt(Ei(i,t))}let mt=(()=>{class i{constructor(e){this.nativeElement=e}}return i.__NG_ELEMENT_ID__=FD,i})();function iw(i){return i instanceof mt?i.nativeElement:i}class Gl{}let ol=(()=>{class i{}return i.__NG_ELEMENT_ID__=()=>function LD(){const i=Se(),e=ws(Er().index,i);return(bs(e)?e:i)[yt]}(),i})(),ND=(()=>{class i{}return i.\u0275prov=ke({token:i,providedIn:"root",factory:()=>null}),i})();class Nc{constructor(t){this.full=t,this.major=t.split(".")[0],this.minor=t.split(".")[1],this.patch=t.split(".").slice(2).join(".")}}const BD=new Nc("15.2.10"),Fv={},Lv="ngOriginalError";function Nv(i){return i[Lv]}class al{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&&Nv(t);for(;e&&Nv(e);)e=Nv(e);return e||null}}function ll(i){return i instanceof Function?i():i}function sw(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 ow="ng-template";function jD(i,t,e){let n=0,r=!0;for(;ns?"":r[h+1].toLowerCase();const m=8&n?p:null;if(m&&-1!==sw(m,c,0)||2&n&&c!==p){if(Wo(n))return!1;o=!0}}}}else{if(!o&&!Wo(n)&&!Wo(l))return!1;if(o&&Wo(l))continue;o=!1,n=l|1&n}}return Wo(n)||o}function Wo(i){return 0==(1&i)}function aw(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&&!Wo(o)&&(t+=Bc(s,r),r=""),n=o,s=s||!Wo(n);e++}return""!==r&&(t+=Bc(s,r)),t}const sn={};function G(i){Hv(zn(),Se(),Xn()+i,!1)}function Hv(i,t,e,n){if(!n)if(3==(3&t[fn])){const s=i.preOrderCheckHooks;null!==s&&sp(t,s,e)}else{const s=i.preOrderHooks;null!==s&&op(t,s,0,e)}tl(e)}function dw(i,t=null,e=null,n){const r=uw(i,t,e,n);return r.resolveInjectorInitializers(),r}function uw(i,t=null,e=null,n,r=new Set){const s=[e||$n,AD(i)];return n=n||("object"==typeof i?void 0:pi(i)),new Hp(s,t||wh(),n||null,r)}let $i=(()=>{class i{static create(e,n){if(Array.isArray(e))return dw({name:""},n,e,"");{const r=e.name??"";return dw({name:r},e.parent,e.providers,r)}}}return i.THROW_IF_NOT_FOUND=Rl,i.NULL=new ew,i.\u0275prov=ke({token:i,providedIn:"any",factory:()=>ee(rl)}),i.__NG_ELEMENT_ID__=-1,i})();function E(i,t=Ot.Default){const e=Se();return null===e?ee(i,t):V_(Er(),e,Pt(i),t)}function xo(){throw new Error("invalid")}function _w(i,t){const e=i.contentQueries;if(null!==e)for(let n=0;nyi&&Hv(i,t,yi,!1),Qr(o?2:0,r),e(n,r)}finally{tl(s),Qr(o?3:1,r)}}function Zv(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,Ch(i,e,r.hostVars,sn),r)}function be(i,t,e,n,r,s){const o=Ei(i,t);!function Xe(i,t,e,n,r,s,o){if(null==s)i.removeAttribute(t,r,e);else{const a=null==o?Qt(s):o(s,n||"",r);i.setAttribute(t,r,a,e)}}(t[yt],o,s,i.value,e,n,r)}function vt(i,t,e,n,r,s){const o=s[t];if(null!==o){const a=n.setInput;for(let l=0;l0&&rs(e)}}function rs(i){for(let n=av(i);null!==n;n=lv(n))for(let r=Ui;r0&&rs(s)}const e=i[at].components;if(null!==e)for(let n=0;n0&&rs(r)}}function ss(i,t){const e=ws(t,i),n=e[at];(function io(i,t){for(let e=t.length;e-1&&(uv(t,n),pp(e,n))}this._attachedToViewContainer=!1}Rx(this._lView[at],this._lView)}onDestroy(t){bw(this._lView[at],this._lView,null,t)}markForCheck(){Ts(this._cdRefInjectingView||this._lView)}detach(){this._lView[fn]&=-65}reattach(){this._lView[fn]|=64}detectChanges(){wo(this._lView[at],this._lView,this.context)}checkNoChanges(){}attachToViewContainerRef(){if(this._appRef)throw new pe(902,!1);this._attachedToViewContainer=!0}detachFromAppRef(){this._appRef=null,function YA(i,t){bh(i,t,t[yt],2,null,null)}(this._lView[at],this._lView)}attachToAppRef(t){if(this._attachedToViewContainer)throw new pe(902,!1);this._appRef=t}}class b8 extends ny{constructor(t){super(t),this._view=t}detectChanges(){const t=this._view;wo(t[at],t,t[Be],!1)}checkNoChanges(){}get context(){return null}}class KF extends Hl{constructor(t){super(),this.ngModule=t}resolveComponentFactory(t){const e=Hn(t);return new iy(e,this.ngModule)}}function ZF(i){const t=[];for(let e in i)i.hasOwnProperty(e)&&t.push({propName:i[e],templateName:e});return t}class w8{constructor(t,e){this.injector=t,this.parentInjector=e}get(t,e,n){n=jf(n);const r=this.injector.get(t,Fv,n);return r!==Fv||e===Fv?r:this.parentInjector.get(t,e,n)}}class iy extends Ov{get inputs(){return ZF(this.componentDef.inputs)}get outputs(){return ZF(this.componentDef.outputs)}constructor(t,e){super(),this.componentDef=t,this.ngModule=e,this.componentType=t.type,this.selector=function e1(i){return i.map(JD).join(",")}(t.selectors),this.ngContentSelectors=t.ngContentSelectors?t.ngContentSelectors:[],this.isBoundToModule=!!e}create(t,e,n,r){let s=(r=r||this.ngModule)instanceof to?r:r?.injector;s&&null!==this.componentDef.getStandaloneInjector&&(s=this.componentDef.getStandaloneInjector(s)||s);const o=s?new w8(t,s):t,a=o.get(Gl,null);if(null===a)throw new pe(407,!1);const l=o.get(ND,null),c=a.createRenderer(null,this.componentDef),d=this.componentDef.selectors[0][0]||"div",h=n?function M1(i,t,e){return i.selectRootElement(t,e===qs.ShadowDom)}(c,n,this.componentDef.encapsulation):Ep(c,d,function x8(i){const t=i.toLowerCase();return"svg"===t?kd:"math"===t?"math":null}(d)),p=this.componentDef.onPush?288:272,m=ey(0,null,null,1,0,null,null,null,null,null),g=Mh(null,m,null,p,null,null,a,c,l,o,null);let b,v;rp(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 C8(i,t){const e=i[at],n=yi;return i[n]=t,Zd(e,n,2,"#host",null)}(g,h),F=function S8(i,t,e,n,r,s,o,a){const l=r[at];!function E8(i,t,e,n){for(const r of i)t.mergedAttrs=Sc(t.mergedAttrs,r.hostAttrs);null!==t.mergedAttrs&&(Cw(t,t.mergedAttrs,!0),null!==e&&Gx(n,e,t))}(n,i,t,o);const c=s.createRenderer(t,e),d=Mh(r,yw(e),null,e.onPush?32:16,r[i.index],i,s,c,a||null,null,null);return l.firstCreatePass&&P(l,i,n.length-1),Di(r,d),r[i.index]=d}(C,h,y,M,g,a,c);v=B0(m,yi),h&&function D8(i,t,e,n){if(n)L_(i,e,["ng-version",BD.full]);else{const{attrs:r,classes:s}=function t1(i){const t=[],e=[];let n=1,r=2;for(;n0&&Hx(i,e,s.join(" "))}}(c,y,h,n),void 0!==e&&function T8(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=Sc(r.hostAttrs,e=Sc(e,r.hostAttrs))}}(n)}function P1(i){return i===Xa?{}:i===$n?[]:i}function k8(i,t){const e=i.viewQuery;i.viewQuery=e?(n,r)=>{t(n,r),e(n,r)}:t}function P8(i,t){const e=i.contentQueries;i.contentQueries=e?(n,r,s)=>{t(n,r,s),e(n,r,s)}:t}function O8(i,t){const e=i.hostBindings;i.hostBindings=e?(n,r)=>{t(n,r),e(n,r)}:t}function Ew(i){return!!O1(i)&&(Array.isArray(i)||!(i instanceof Map)&&Symbol.iterator in i)}function O1(i){return null!==i&&("function"==typeof i||"object"==typeof i)}function $l(i,t,e){return i[t]=e}function Is(i,t,e){return!Object.is(i[t],e)&&(i[t]=e,!0)}function Eh(i,t,e,n){const r=Is(i,t,e);return Is(i,t+1,n)||r}function Dt(i,t,e,n){const r=Se();return Is(r,Fl(),t)&&(zn(),be(Ai(),r,i,t,e,n)),Dt}function jp(i,t,e,n){return Is(i,Fl(),e)?t+Qt(e)+n:sn}function Yp(i,t,e,n,r,s){const a=Eh(i,function Ja(){return kt.lFrame.bindingIndex}(),e,r);return Ks(2),a?t+Qt(e)+n+Qt(r)+s:sn}function fe(i,t,e,n,r,s,o,a){const l=Se(),c=zn(),d=i+yi,h=c.firstCreatePass?function $8(i,t,e,n,r,s,o,a,l){const c=t.consts,d=Zd(t,i,4,o||null,Ol(c,a));ty(t,e,d,Ol(c,l)),Nd(t,d);const h=d.tView=ey(2,d,n,r,s,t.directiveRegistry,t.pipeRegistry,null,t.schemas,c);return null!==t.queries&&(t.queries.template(t,d),h.queries=t.queries.embeddedTView(d)),d}(d,c,l,t,e,n,r,s,o):c.data[d];ma(h,!1);const p=l[yt].createComment("");yh(c,l,p,h),Hr(p,l),Di(l,l[d]=mn(p,l,p,h)),bc(h)&&Qv(c,l,h),null!=o&&Jv(l,h,a)}function Zi(i){return Od(function gA(){return kt.lFrame.contextLView}(),yi+i)}function U(i,t,e){const n=Se();return Is(n,Fl(),t)&&no(zn(),Ai(),n,i,t,n[yt],e,!1),U}function F1(i,t,e,n,r){const o=r?"class":"style";k1(i,e,t.inputs[o],o,n)}function W(i,t,e,n){const r=Se(),s=zn(),o=yi+i,a=r[yt],l=s.firstCreatePass?function j8(i,t,e,n,r,s){const o=t.consts,l=Zd(t,i,2,n,Ol(o,r));return ty(t,e,l,Ol(o,s)),null!==l.attrs&&Cw(l,l.attrs,!1),null!==l.mergedAttrs&&Cw(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]=Ep(a,t,function Y0(){return kt.lFrame.currentNamespace}()),d=bc(l);return ma(l,!0),Gx(a,c,l),32!=(32&l.flags)&&yh(s,r,c,l),0===function uA(){return kt.lFrame.elementDepthCount}()&&Hr(c,r),function hA(){kt.lFrame.elementDepthCount++}(),d&&(Qv(s,r,l),Zv(s,l,r)),null!==n&&Jv(r,l),W}function j(){let i=Er();D_()?T_():(i=i.parent,ma(i,!1));const t=i;!function fA(){kt.lFrame.elementDepthCount--}();const e=zn();return e.firstCreatePass&&(Nd(e,i),Qf(i)&&e.queries.elementEnd(i)),null!=t.classesWithoutHost&&function wA(i){return 0!=(8&i.flags)}(t)&&F1(e,t,Se(),t.classesWithoutHost,!0),null!=t.stylesWithoutHost&&function F_(i){return 0!=(16&i.flags)}(t)&&F1(e,t,Se(),t.stylesWithoutHost,!1),j}function De(i,t,e,n){return W(i,t,e,n),j(),De}function Gr(i,t,e){const n=Se(),r=zn(),s=i+yi,o=r.firstCreatePass?function Y8(i,t,e,n,r){const s=t.consts,o=Ol(s,n),a=Zd(t,i,8,"ng-container",o);return null!==o&&Cw(a,o,!0),ty(t,e,a,Ol(s,r)),null!==t.queries&&t.queries.elementStart(t,a),a}(s,r,n,t,e):r.data[s];ma(o,!0);const a=n[s]=n[yt].createComment("");return yh(r,n,a,o),Hr(a,n),bc(o)&&(Qv(r,n,o),Zv(r,o,n)),null!=e&&Jv(n,o),Gr}function $r(){let i=Er();const t=zn();return D_()?T_():(i=i.parent,ma(i,!1)),t.firstCreatePass&&(Nd(t,i),Qf(i)&&t.queries.elementEnd(i)),$r}function sy(i,t,e){return Gr(i,t,e),$r(),sy}function di(){return Se()}function oy(i){return!!i&&"function"==typeof i.then}function uL(i){return!!i&&"function"==typeof i.subscribe}const L1=uL;function Ue(i,t,e,n){const r=Se(),s=zn(),o=Er();return hL(s,r,r[yt],o,i,t,n),Ue}function N1(i,t){const e=Er(),n=Se(),r=zn();return hL(r,n,qF(rh(r.data),e,n),e,i,t),N1}function hL(i,t,e,n,r,s,o){const a=bc(n),c=i.firstCreatePass&&YF(i),d=t[Be],h=jF(t);let p=!0;if(3&n.type||o){const b=Ei(n,t),v=o?o(b):b,y=h.length,M=o?C=>o(I(C[n.index])):n.index;let x=null;if(!o&&a&&(x=function q8(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=pL(n,t,d,s,!1);const C=e.listen(v,r,s);h.push(s,C),c&&c.push(r,M,y,y+1)}}else s=pL(n,t,d,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?ws(i.index,t):t);let l=fL(t,e,n,o),c=s.__ngNextListenerFn__;for(;c;)l=fL(t,e,c,o)&&l,c=c.__ngNextListenerFn__;return r&&!1===l&&(o.preventDefault(),o.returnValue=!1),l}}function he(i=1){return function yA(i){return(kt.lFrame.contextLView=function j0(i,t){for(;i>0;)t=t[Sr],i--;return t}(i,kt.lFrame.contextLView))[Be]}(i)}function X8(i,t){let e=null;const n=function XD(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 V1(i){return 2|i}function Ah(i){return(131068&i)>>2}function z1(i,t){return-131069&i|t<<2}function H1(i){return 1|i}function ML(i,t,e,n,r){const s=i[e+1],o=null===t;let a=n?Jd(s):Ah(s),l=!1;for(;0!==a&&(!1===l||o);){const d=i[a+1];tW(i[a],t)&&(l=!0,i[a+1]=n?H1(d):V1(d)),a=n?Jd(d):Ah(d)}l&&(i[e+1]=n?V1(s):H1(s))}function tW(i,t){return null===i||null==t||(Array.isArray(i)?i[1]:i)===t||!(!Array.isArray(i)||"string"!=typeof t)&&Ic(i,t)>=0}const Ir={textEnd:0,key:0,keyEnd:0,value:0,valueEnd:0};function CL(i){return i.substring(Ir.key,Ir.keyEnd)}function SL(i,t){const e=Ir.textEnd;return e===t?-1:(t=Ir.keyEnd=function sW(i,t,e){for(;t32;)t++;return t}(i,Ir.key=t,e),em(i,t,e))}function em(i,t,e){for(;t=0;e=SL(t,e))Cs(i,CL(t),!0)}function cl(i,t,e,n){const r=Se(),s=zn(),o=Ks(2);s.firstUpdatePass&&RL(s,i,o,n),t!==sn&&Is(r,o,t)&&PL(s,s.data[Xn()],r,r[yt],i,r[o+1]=function _W(i,t){return null==i||""===i||("string"==typeof t?i+=t:"object"==typeof i&&(i=pi(Js(i)))),i}(t,e),n,o)}function IL(i,t){return t>=i.expandoStartIndex}function RL(i,t,e,n){const r=i.data;if(null===r[e+1]){const s=r[Xn()],o=IL(i,e);FL(s,n)&&null===t&&!o&&(t=!1),t=function dW(i,t,e,n){const r=rh(i);let s=n?t.residualClasses:t.residualStyles;if(null===r)0===(n?t.classBindings:t.styleBindings)&&(e=ay(e=G1(null,i,t,e,n),t.attrs,n),s=null);else{const o=t.directiveStylingLast;if(-1===o||i[o]!==r)if(e=G1(r,i,t,e,n),null===s){let l=function uW(i,t,e){const n=e?t.classBindings:t.styleBindings;if(0!==Ah(n))return i[Jd(n)]}(i,t,n);void 0!==l&&Array.isArray(l)&&(l=G1(null,i,t,l[1],n),l=ay(l,t.attrs,n),function hW(i,t,e,n){i[Jd(e?t.classBindings:t.styleBindings)]=n}(i,t,n,l))}else s=function fW(i,t,e){let n;const r=t.directiveEnd;for(let s=1+t.directiveStylingLast;s0)&&(c=!0)):d=e,r)if(0!==l){const p=Jd(i[a+1]);i[n+1]=Dw(p,a),0!==p&&(i[p+1]=z1(i[p+1],n)),i[a+1]=function Z8(i,t){return 131071&i|t<<17}(i[a+1],n)}else i[n+1]=Dw(a,0),0!==a&&(i[a+1]=z1(i[a+1],n)),a=n;else i[n+1]=Dw(l,0),0===a?a=n:i[l+1]=z1(i[l+1],n),l=n;c&&(i[n+1]=V1(i[n+1])),ML(i,d,n,!0),ML(i,d,n,!1),function eW(i,t,e,n,r){const s=r?i.residualClasses:i.residualStyles;null!=s&&"string"==typeof t&&Ic(s,t)>=0&&(e[n+1]=H1(e[n+1]))}(t,d,i,n,s),o=Dw(a,l),s?t.classBindings=o:t.styleBindings=o}(r,s,t,e,o,n)}}function G1(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),d=c?l[1]:l,h=null===d;let p=e[r+1];p===sn&&(p=h?$n:void 0);let m=h?Wd(p,n):d===n?p:void 0;if(c&&!Tw(m)&&(m=Wd(l,n)),Tw(m)&&(a=m,o))return a;const g=i[r+1];r=o?Jd(g):Ah(g)}if(null!==t){let l=s?t.residualClasses:t.residualStyles;null!=l&&(a=Wd(l,n))}return a}function Tw(i){return void 0!==i}function FL(i,t){return 0!=(i.flags&(t?8:16))}function Ve(i,t=""){const e=Se(),n=zn(),r=i+yi,s=n.firstCreatePass?Zd(n,r,1,t,null):n.data[r],o=e[r]=function cv(i,t){return i.createText(t)}(e[yt],t);yh(n,e,o,s),ma(s,!1)}function _i(i){return Qi("",i,""),_i}function Qi(i,t,e){const n=Se(),r=jp(n,i,t,e);return r!==sn&&Uc(n,Xn(),r),Qi}function tm(i,t,e,n,r){const s=Se(),o=Yp(s,i,t,e,n,r);return o!==sn&&Uc(s,Xn(),o),tm}function GL(i,t,e){!function dl(i,t,e,n){const r=zn(),s=Ks(2);r.firstUpdatePass&&RL(r,null,s,n);const o=Se();if(e!==sn&&Is(o,s,e)){const a=r.data[Xn()];if(FL(a,n)&&!IL(r,s)){let l=n?a.classesWithoutHost:a.stylesWithoutHost;null!==l&&(e=Vf(l,e||"")),F1(r,a,o,e,n)}else!function gW(i,t,e,n,r,s,o,a){r===sn&&(r=$n);let l=0,c=0,d=0((rt=rt||{})[rt.LocaleId=0]="LocaleId",rt[rt.DayPeriodsFormat=1]="DayPeriodsFormat",rt[rt.DayPeriodsStandalone=2]="DayPeriodsStandalone",rt[rt.DaysFormat=3]="DaysFormat",rt[rt.DaysStandalone=4]="DaysStandalone",rt[rt.MonthsFormat=5]="MonthsFormat",rt[rt.MonthsStandalone=6]="MonthsStandalone",rt[rt.Eras=7]="Eras",rt[rt.FirstDayOfWeek=8]="FirstDayOfWeek",rt[rt.WeekendRange=9]="WeekendRange",rt[rt.DateFormat=10]="DateFormat",rt[rt.TimeFormat=11]="TimeFormat",rt[rt.DateTimeFormat=12]="DateTimeFormat",rt[rt.NumberSymbols=13]="NumberSymbols",rt[rt.NumberFormats=14]="NumberFormats",rt[rt.CurrencyCode=15]="CurrencyCode",rt[rt.CurrencySymbol=16]="CurrencySymbol",rt[rt.CurrencyName=17]="CurrencyName",rt[rt.Currencies=18]="Currencies",rt[rt.Directionality=19]="Directionality",rt[rt.PluralCase=20]="PluralCase",rt[rt.ExtraData=21]="ExtraData",rt))();const im="en-US";let t2=im;function j1(i,t,e,n,r){if(i=Pt(i),Array.isArray(i))for(let s=0;s>20;if(Lc(i)||!i.multi){const m=new Bd(l,r,E),g=q1(a,t,r?d:d+p,h);-1===g?(pn(ah(c,o),s,a),Y1(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=q1(a,t,d+p,h),g=q1(a,t,d,d+p),v=g>=0&&e[g];if(r&&!v||!r&&!(m>=0&&e[m])){pn(ah(c,o),s,a);const y=function Oj(i,t,e,n,r){const s=new Bd(i,e,E);return s.multi=[],s.index=t,s.componentProviders=0,A2(s,r,n&&!e),s}(r?Pj:kj,e.length,r,n,l);!r&&v&&(e[g].providerFactory=y),Y1(s,i,t.length,0),t.push(a),c.directiveStart++,c.directiveEnd++,r&&(c.providerIndexes+=1048576),e.push(y),o.push(y)}else Y1(s,i,m>-1?m:g,A2(e[r?g:m],l,!r&&n));!r&&n&&v&&e[g].componentProviders++}}}function Y1(i,t,e,n){const r=Lc(t),s=function DD(i){return!!i.useClass}(t);if(r||s){const l=(s?Pt(t.useClass):t).prototype.ngOnDestroy;if(l){const c=i.destroyHooks||(i.destroyHooks=[]);if(!r&&t.multi){const d=c.indexOf(e);-1===d?c.push(e,[n,l]):c[d+1].push(n,l)}else c.push(e,l)}}}function A2(i,t,e){return e&&i.componentProviders++,i.multi.push(t)-1}function q1(i,t,e,n){for(let r=e;r{e.providersResolver=(n,r)=>function Rj(i,t,e){const n=zn();if(n.firstCreatePass){const r=_o(i);j1(e,n.data,n.blueprint,r,!0),j1(t,n.data,n.blueprint,r,!1)}}(n,r?r(i):i,t)}}class rm{}class D2{}class T2 extends rm{constructor(t,e){super(),this._parent=e,this._bootstrapComponents=[],this.destroyCbs=[],this.componentFactoryResolver=new KF(this);const n=ur(t);this._bootstrapComponents=ll(n.bootstrap),this._r3Injector=uw(t,e,[{provide:rm,useValue:this},{provide:Hl,useValue:this.componentFactoryResolver}],pi(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 K1 extends D2{constructor(t){super(),this.moduleType=t}create(t){return new T2(this.moduleType,t)}}class Lj extends rm{constructor(t,e,n){super(),this.componentFactoryResolver=new KF(this),this.instance=null;const r=new Hp([...t,{provide:rm,useValue:this},{provide:Hl,useValue:this.componentFactoryResolver}],e||wh(),n,new Set(["environment"]));this.injector=r,r.resolveInjectorInitializers()}destroy(){this.injector.destroy()}onDestroy(t){this.injector.onDestroy(t)}}function Fw(i,t,e=null){return new Lj(i,t,e).injector}let Nj=(()=>{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=tw(0,e.type),r=n.length>0?Fw([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=ke({token:i,providedIn:"environment",factory:()=>new i(ee(to))}),i})();function Z1(i){i.getStandaloneInjector=t=>t.get(Nj).getOrCreateStandaloneInjector(i)}function so(i,t,e){const n=Vr()+i,r=Se();return r[n]===sn?$l(r,n,e?t.call(e):t()):function ry(i,t){return i[t]}(r,n)}function sm(i,t,e,n){return N2(Se(),Vr(),i,t,e,n)}function L2(i,t,e,n,r,s,o){return function V2(i,t,e,n,r,s,o,a,l){const c=t+e;return function Sa(i,t,e,n,r,s){const o=Eh(i,t,e,n);return Eh(i,t+2,r,s)||o}(i,c,r,s,o,a)?$l(i,c+4,l?n.call(l,r,s,o,a):n(r,s,o,a)):fy(i,c+4)}(Se(),Vr(),i,t,e,n,r,s,o)}function fy(i,t){const e=i[t];return e===sn?void 0:e}function N2(i,t,e,n,r,s){const o=t+e;return Is(i,o,r)?$l(i,o+1,s?n.call(s,r):n(r)):fy(i,o+1)}function Ct(i,t){const e=zn();let n;const r=i+yi;e.firstCreatePass?(n=function Jj(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=Qa(n.type)),o=Ys(E);try{const a=cp(!1),l=s();return cp(a),function W8(i,t,e,n){e>=i.data.length&&(i.data[e]=null,i.blueprint[e]=null),t[e]=n}(e,Se(),r,l),l}finally{Ys(o)}}function Tt(i,t,e){const n=i+yi,r=Se(),s=Od(r,n);return py(r,n)?N2(r,Vr(),t,s.transform,e,s):s.transform(e)}function J1(i,t,e,n){const r=i+yi,s=Se(),o=Od(s,r);return py(s,r)?function B2(i,t,e,n,r,s,o){const a=t+e;return Eh(i,a,r,s)?$l(i,a+2,o?n.call(o,r,s):n(r,s)):fy(i,a+2)}(s,Vr(),t,o.transform,e,n,o):o.transform(e,n)}function py(i,t){return i[at].data[t].pure}function eT(i){return t=>{setTimeout(i,void 0,t)}}const We=class r6 extends Re{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=eT(s),r&&(r=eT(r)),o&&(o=eT(o)));const a=super.subscribe({next:r,error:s,complete:o});return t instanceof Zt&&t.add(a),a}};function s6(){return this._results[Symbol.iterator]()}class om{get changes(){return this._changes||(this._changes=new We)}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=om.prototype;e[Symbol.iterator]||(e[Symbol.iterator]=s6)}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 Ar(i){return i.flat(Number.POSITIVE_INFINITY)}(t);(this._changesDetected=!function fp(i,t,e){if(i.length!==t.length)return!1;for(let n=0;n{class i{}return i.__NG_ELEMENT_ID__=l6,i})();const o6=Mo,a6=class extends o6{constructor(t,e,n){super(),this._declarationLView=t,this._declarationTContainer=e,this.elementRef=n}createEmbeddedView(t,e){const n=this._declarationTContainer.tView,r=Mh(this._declarationLView,n,t,16,null,n.declTNode,null,null,null,null,e||null);r[nh]=this._declarationLView[this._declarationTContainer.index];const o=this._declarationLView[Xs];return null!==o&&(r[Xs]=o.createEmbeddedView(n)),Sh(n,r,t),new ny(r)}};function l6(){return Lw(Er(),Se())}function Lw(i,t){return 4&i.type?new a6(t,i,Fn(i,t)):null}let Wr=(()=>{class i{}return i.__NG_ELEMENT_ID__=c6,i})();function c6(){return $2(Er(),Se())}const d6=Wr,H2=class extends d6{constructor(t,e,n){super(),this._lContainer=t,this._hostTNode=e,this._hostLView=n}get element(){return Fn(this._hostTNode,this._hostLView)}get injector(){return new Ac(this._hostTNode,this._hostLView)}get parentInjector(){const t=ch(this._hostTNode,this._hostLView);if(lp(t)){const e=oh(t,this._hostLView),n=sh(t);return new Ac(e[at].data[n+8],e)}return new Ac(null,this._hostLView)}clear(){for(;this.length>0;)this.remove(this.length-1)}get(t){const e=G2(this._lContainer);return null!==e&&e[t]||null}get length(){return this._lContainer.length-Ui}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 hh(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 iy(Hn(t)),c=n||this.parentInjector;if(!s&&null==l.ngModule){const p=(o?c:this.parentInjector).get(to,null);p&&(s=p)}const d=l.create(c,r,void 0,s);return this.insert(d.hostView,a),d}insert(t,e){const n=t._lView,r=n[at];if(function dA(i){return xs(i[Bi])}(n)){const d=this.indexOf(t);if(-1!==d)this.detach(d);else{const h=n[Bi],p=new H2(h,h[ue],h[Bi]);p.detach(p.indexOf(t))}}const s=this._adjustIndex(e),o=this._lContainer;!function dv(i,t,e,n){const r=Ui+n,s=e.length;n>0&&(e[r-1][ys]=t),n0)n.push(o[a/2]);else{const c=s[a+1],d=t[-l];for(let h=Ui;h{class i{constructor(e){this.appInits=e,this.resolve=Bw,this.reject=Bw,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)(ee(Uw,8))},i.\u0275prov=ke({token:i,factory:i.\u0275fac,providedIn:"root"}),i})();const cm=new me("AppId",{providedIn:"root",factory:function fN(){return`${hT()}${hT()}${hT()}`}});function hT(){return String.fromCharCode(97+Math.floor(25*Math.random()))}const pN=new me("Platform Initializer"),fT=new me("Platform ID",{providedIn:"platform",factory:()=>"unknown"}),Rr=new me("AnimationModuleType");let L6=(()=>{class i{log(e){console.log(e)}warn(e){console.warn(e)}}return i.\u0275fac=function(e){return new(e||i)},i.\u0275prov=ke({token:i,factory:i.\u0275fac,providedIn:"platform"}),i})();const ql=new me("LocaleId",{providedIn:"root",factory:()=>Ft(ql,Ot.Optional|Ot.SkipSelf)||function N6(){return typeof $localize<"u"&&$localize.locale||im}()});class U6{constructor(t,e){this.ngModuleFactory=t,this.componentFactories=e}}let mN=(()=>{class i{compileModuleSync(e){return new K1(e)}compileModuleAsync(e){return Promise.resolve(this.compileModuleSync(e))}compileModuleAndAllComponentsSync(e){const n=this.compileModuleSync(e),s=ll(ur(e).declarations).reduce((o,a)=>{const l=Hn(a);return l&&o.push(new iy(l)),o},[]);return new U6(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=ke({token:i,factory:i.\u0275fac,providedIn:"root"}),i})();const H6=(()=>Promise.resolve(0))();function pT(i){typeof Zone>"u"?H6.then(()=>{i&&i.apply(null,null)}):Zone.current.scheduleMicroTask("scheduleMicrotask",i)}class ft{constructor({enableLongStackTrace:t=!1,shouldCoalesceEventChangeDetection:e=!1,shouldCoalesceRunChangeDetection:n=!1}){if(this.hasPendingMacrotasks=!1,this.hasPendingMicrotasks=!1,this.isStable=!0,this.onUnstable=new We(!1),this.onMicrotaskEmpty=new We(!1),this.onStable=new We(!1),this.onError=new We(!1),typeof Zone>"u")throw new pe(908,!1);Zone.assertZonePatched();const r=this;r._nesting=0,r._outer=r._inner=Zone.current,Zone.TaskTrackingZoneSpec&&(r._inner=r._inner.fork(new Zone.TaskTrackingZoneSpec)),t&&Zone.longStackTraceZoneSpec&&(r._inner=r._inner.fork(Zone.longStackTraceZoneSpec)),r.shouldCoalesceEventChangeDetection=!n&&e,r.shouldCoalesceRunChangeDetection=n,r.lastRequestAnimationFrameId=-1,r.nativeRequestAnimationFrame=function G6(){let i=Rn.requestAnimationFrame,t=Rn.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 j6(i){const t=()=>{!function W6(i){i.isCheckStableRunning||-1!==i.lastRequestAnimationFrameId||(i.lastRequestAnimationFrameId=i.nativeRequestAnimationFrame.call(Rn,()=>{i.fakeTopEventTask||(i.fakeTopEventTask=Zone.root.scheduleEventTask("fakeTopEventTask",()=>{i.lastRequestAnimationFrameId=-1,gT(i),i.isCheckStableRunning=!0,mT(i),i.isCheckStableRunning=!1},void 0,()=>{},()=>{})),i.fakeTopEventTask.invoke()}),gT(i))}(i)};i._inner=i._inner.fork({name:"angular",properties:{isAngularZone:!0},onInvokeTask:(e,n,r,s,o,a)=>{try{return vN(i),e.invokeTask(r,s,o,a)}finally{(i.shouldCoalesceEventChangeDetection&&"eventTask"===s.type||i.shouldCoalesceRunChangeDetection)&&t(),yN(i)}},onInvoke:(e,n,r,s,o,a,l)=>{try{return vN(i),e.invoke(r,s,o,a,l)}finally{i.shouldCoalesceRunChangeDetection&&t(),yN(i)}},onHasTask:(e,n,r,s)=>{e.hasTask(r,s),n===r&&("microTask"==s.change?(i._hasPendingMicrotasks=s.microTask,gT(i),mT(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(!ft.isInAngularZone())throw new pe(909,!1)}static assertNotInAngularZone(){if(ft.isInAngularZone())throw new pe(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,$6,Bw,Bw);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 $6={};function mT(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 gT(i){i.hasPendingMicrotasks=!!(i._hasPendingMicrotasks||(i.shouldCoalesceEventChangeDetection||i.shouldCoalesceRunChangeDetection)&&-1!==i.lastRequestAnimationFrameId)}function vN(i){i._nesting++,i.isStable&&(i.isStable=!1,i.onUnstable.emit(null))}function yN(i){i._nesting--,mT(i)}class Y6{constructor(){this.hasPendingMicrotasks=!1,this.hasPendingMacrotasks=!1,this.isStable=!0,this.onUnstable=new We,this.onMicrotaskEmpty=new We,this.onStable=new We,this.onError=new We}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 bN=new me(""),zw=new me("");let yT,_T=(()=>{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,yT||(function q6(i){yT=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:()=>{ft.assertNotInAngularZone(),pT(()=>{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())pT(()=>{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)(ee(ft),ee(vT),ee(zw))},i.\u0275prov=ke({token:i,factory:i.\u0275fac}),i})(),vT=(()=>{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 yT?.findTestabilityInTree(this,e,n)??null}}return i.\u0275fac=function(e){return new(e||i)},i.\u0275prov=ke({token:i,factory:i.\u0275fac,providedIn:"platform"}),i})();const zc=!1;let eu=null;const xN=new me("AllowMultipleToken"),bT=new me("PlatformDestroyListeners"),wN=new me("appBootstrapListener");class MN{constructor(t,e){this.name=t,this.token=e}}function SN(i,t,e=[]){const n=`Platform: ${t}`,r=new me(n);return(s=[])=>{let o=xT();if(!o||o.injector.get(xN,!1)){const a=[...e,...s,{provide:r,useValue:!0}];i?i(a):function Z6(i){if(eu&&!eu.get(xN,!1))throw new pe(400,!1);eu=i;const t=i.get(AN);(function CN(i){const t=i.get(pN,null);t&&t.forEach(e=>e())})(i)}(function EN(i=[],t){return $i.create({name:t,providers:[{provide:Iv,useValue:"platform"},{provide:bT,useValue:new Set([()=>eu=null])},...i]})}(a,n))}return function J6(i){const t=xT();if(!t)throw new pe(401,!1);return t}()}}function xT(){return eu?.get(AN)??null}let AN=(()=>{class i{constructor(e){this._injector=e,this._modules=[],this._destroyListeners=[],this._destroyed=!1}bootstrapModuleFactory(e,n){const r=function TN(i,t){let e;return e="noop"===i?new Y6:("zone.js"===i?void 0:i)||new ft(t),e}(n?.ngZone,function DN(i){return{enableLongStackTrace:!1,shouldCoalesceEventChangeDetection:!(!i||!i.ngZoneEventCoalescing)||!1,shouldCoalesceRunChangeDetection:!(!i||!i.ngZoneRunCoalescing)||!1}}(n)),s=[{provide:ft,useValue:r}];return r.run(()=>{const o=$i.create({providers:s,parent:this.injector,name:e.moduleType.name}),a=e.create(o),l=a.injector.get(al,null);if(!l)throw new pe(402,!1);return r.runOutsideAngular(()=>{const c=r.onError.subscribe({next:d=>{l.handleError(d)}});a.onDestroy(()=>{Hw(this._modules,a),c.unsubscribe()})}),function IN(i,t,e){try{const n=e();return oy(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(Vw);return c.runInitializers(),c.donePromise.then(()=>(function n2(i){En(i,"Expected localeId to be defined"),"string"==typeof i&&(t2=i.toLowerCase().replace(/_/g,"-"))}(a.injector.get(ql,im)||im),this._moduleDoBootstrap(a),a))})})}bootstrapModule(e,n=[]){const r=RN({},n);return function X6(i,t,e){const n=new K1(e);return Promise.resolve(n)}(0,0,e).then(s=>this.bootstrapModuleFactory(s,r))}_moduleDoBootstrap(e){const n=e.injector.get(dm);if(e._bootstrapComponents.length>0)e._bootstrapComponents.forEach(r=>n.bootstrap(r));else{if(!e.instance.ngDoBootstrap)throw new pe(-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 pe(404,!1);this._modules.slice().forEach(n=>n.destroy()),this._destroyListeners.forEach(n=>n());const e=this._injector.get(bT,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)(ee($i))},i.\u0275prov=ke({token:i,factory:i.\u0275fac,providedIn:"platform"}),i})();function RN(i,t){return Array.isArray(t)?t.reduce(RN,i):{...i,...t}}let dm=(()=>{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 In(a=>{this._stable=this._zone.isStable&&!this._zone.hasPendingMacrotasks&&!this._zone.hasPendingMicrotasks,this._zone.runOutsideAngular(()=>{a.next(this._stable),a.complete()})}),o=new In(a=>{let l;this._zone.runOutsideAngular(()=>{l=this._zone.onStable.subscribe(()=>{ft.assertNotInAngularZone(),pT(()=>{!this._stable&&!this._zone.hasPendingMacrotasks&&!this._zone.hasPendingMicrotasks&&(this._stable=!0,a.next(!0))})})});const c=this._zone.onUnstable.subscribe(()=>{ft.assertInAngularZone(),this._stable&&(this._stable=!1,this._zone.runOutsideAngular(()=>{a.next(!1)}))});return()=>{l.unsubscribe(),c.unsubscribe()}});this.isStable=Mr(s,o.pipe(Uf()))}bootstrap(e,n){const r=e instanceof Ov;if(!this._injector.get(Vw).done){!r&&function Sd(i){const t=Hn(i)||Ur(i)||vs(i);return null!==t&&t.standalone}(e);throw new pe(405,zc)}let o;o=r?e:this._injector.get(Hl).resolveComponentFactory(e),this.componentTypes.push(o.componentType);const a=function K6(i){return i.isBoundToModule}(o)?void 0:this._injector.get(rm),c=o.create($i.NULL,[],n||o.selector,a),d=c.location.nativeElement,h=c.injector.get(bN,null);return h?.registerApplication(d),c.onDestroy(()=>{this.detachView(c.hostView),Hw(this.components,c),h?.unregisterApplication(d)}),this._loadComponent(c),c}tick(){if(this._runningTick)throw new pe(101,!1);try{this._runningTick=!0;for(let e of this._views)e.detectChanges()}catch(e){this._zone.runOutsideAngular(()=>this._exceptionHandler.handleError(e))}finally{this._runningTick=!1}}attachView(e){const n=e;this._views.push(n),n.attachToAppRef(this)}detachView(e){const n=e;Hw(this._views,n),n.detachFromAppRef()}_loadComponent(e){this.attachView(e.hostView),this.tick(),this.components.push(e);const n=this._injector.get(wN,[]);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),()=>Hw(this._destroyListeners,e)}destroy(){if(this._destroyed)throw new pe(406,!1);const e=this._injector;e.destroy&&!e.destroyed&&e.destroy()}get viewCount(){return this._views.length}warnIfDestroyed(){}}return i.\u0275fac=function(e){return new(e||i)(ee(ft),ee(to),ee(al))},i.\u0275prov=ke({token:i,factory:i.\u0275fac,providedIn:"root"}),i})();function Hw(i,t){const e=i.indexOf(t);e>-1&&i.splice(e,1)}let Zn=(()=>{class i{}return i.__NG_ELEMENT_ID__=t9,i})();function t9(i){return function n9(i,t,e){if(Ad(i)&&!e){const n=ws(i.index,t);return new ny(n,n)}return 47&i.type?new ny(t[rr],t):null}(Er(),Se(),16==(16&i))}class LN{constructor(){}supports(t){return Ew(t)}create(t){return new c9(t)}}const l9=(i,t)=>t;class c9{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||l9}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 d9(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 NN),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 NN),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 d9{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 u9{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 NN{constructor(){this.map=new Map}put(t){const e=t.trackById;let n=this.map.get(e);n||(n=new u9,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 BN(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 f9(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 f9{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 VN(){return new Ww([new LN])}let Ww=(()=>{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||VN()),deps:[[i,new xa,new Ss]]}}find(e){const n=this.factories.find(r=>r.supports(e));if(null!=n)return n;throw new pe(901,!1)}}return i.\u0275prov=ke({token:i,providedIn:"root",factory:VN}),i})();function zN(){return new gy([new UN])}let gy=(()=>{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||zN()),deps:[[i,new xa,new Ss]]}}find(e){const n=this.factories.find(r=>r.supports(e));if(n)return n;throw new pe(901,!1)}}return i.\u0275prov=ke({token:i,providedIn:"root",factory:zN}),i})();const g9=SN(null,"core",[]);let _9=(()=>{class i{constructor(e){}}return i.\u0275fac=function(e){return new(e||i)(ee(dm))},i.\u0275mod=nn({type:i}),i.\u0275inj=Kt({}),i})();let ET=null;function Hc(){return ET}class b9{}const jt=new me("DocumentToken");let AT=(()=>{class i{historyGo(e){throw new Error("Not implemented")}}return i.\u0275fac=function(e){return new(e||i)},i.\u0275prov=ke({token:i,factory:function(){return function x9(){return ee(HN)}()},providedIn:"platform"}),i})();const w9=new me("Location Initialized");let HN=(()=>{class i extends AT{constructor(e){super(),this._doc=e,this._location=window.location,this._history=window.history}getBaseHrefFromDOM(){return Hc().getBaseHref(this._doc)}onPopState(e){const n=Hc().getGlobalEventTarget(this._doc,"window");return n.addEventListener("popstate",e,!1),()=>n.removeEventListener("popstate",e)}onHashChange(e){const n=Hc().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){GN()?this._history.pushState(e,n,r):this._location.hash=r}replaceState(e,n,r){GN()?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)(ee(jt))},i.\u0275prov=ke({token:i,factory:function(){return function M9(){return new HN(ee(jt))}()},providedIn:"platform"}),i})();function GN(){return!!window.history.pushState}function DT(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 $N(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 Gc(i){return i&&"?"!==i[0]?"?"+i:i}let Ih=(()=>{class i{historyGo(e){throw new Error("Not implemented")}}return i.\u0275fac=function(e){return new(e||i)},i.\u0275prov=ke({token:i,factory:function(){return Ft(jN)},providedIn:"root"}),i})();const WN=new me("appBaseHref");let jN=(()=>{class i extends Ih{constructor(e,n){super(),this._platformLocation=e,this._removeListenerFns=[],this._baseHref=n??this._platformLocation.getBaseHrefFromDOM()??Ft(jt).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 DT(this._baseHref,e)}path(e=!1){const n=this._platformLocation.pathname+Gc(this._platformLocation.search),r=this._platformLocation.hash;return r&&e?`${n}${r}`:n}pushState(e,n,r,s){const o=this.prepareExternalUrl(r+Gc(s));this._platformLocation.pushState(e,n,o)}replaceState(e,n,r,s){const o=this.prepareExternalUrl(r+Gc(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)(ee(AT),ee(WN,8))},i.\u0275prov=ke({token:i,factory:i.\u0275fac,providedIn:"root"}),i})(),C9=(()=>{class i extends Ih{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=DT(this._baseHref,e);return n.length>0?"#"+n:n}pushState(e,n,r,s){let o=this.prepareExternalUrl(r+Gc(s));0==o.length&&(o=this._platformLocation.pathname),this._platformLocation.pushState(e,n,o)}replaceState(e,n,r,s){let o=this.prepareExternalUrl(r+Gc(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)(ee(AT),ee(WN,8))},i.\u0275prov=ke({token:i,factory:i.\u0275fac}),i})(),_y=(()=>{class i{constructor(e){this._subject=new We,this._urlChangeListeners=[],this._urlChangeSubscription=null,this._locationStrategy=e;const n=this._locationStrategy.getBaseHref();this._basePath=function A9(i){if(new RegExp("^(https?:)?//").test(i)){const[,e]=i.split(/\/\/[^\/]+/);return e}return i}($N(YN(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+Gc(n))}normalize(e){return i.stripTrailingSlash(function E9(i,t){if(!i||!t.startsWith(i))return t;const e=t.substring(i.length);return""===e||["/",";","?","#"].includes(e[0])?e:t}(this._basePath,YN(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+Gc(n)),r)}replaceState(e,n="",r=null){this._locationStrategy.replaceState(r,"",e,n),this._notifyUrlChangeListeners(this.prepareExternalUrl(e+Gc(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=Gc,i.joinWithSlash=DT,i.stripTrailingSlash=$N,i.\u0275fac=function(e){return new(e||i)(ee(Ih))},i.\u0275prov=ke({token:i,factory:function(){return function S9(){return new _y(ee(Ih))}()},providedIn:"root"}),i})();function YN(i){return i.replace(/\/index.html$/,"")}var Co=(()=>((Co=Co||{})[Co.Decimal=0]="Decimal",Co[Co.Percent=1]="Percent",Co[Co.Currency=2]="Currency",Co[Co.Scientific=3]="Scientific",Co))(),Ht=(()=>((Ht=Ht||{})[Ht.Decimal=0]="Decimal",Ht[Ht.Group=1]="Group",Ht[Ht.List=2]="List",Ht[Ht.PercentSign=3]="PercentSign",Ht[Ht.PlusSign=4]="PlusSign",Ht[Ht.MinusSign=5]="MinusSign",Ht[Ht.Exponential=6]="Exponential",Ht[Ht.SuperscriptingExponent=7]="SuperscriptingExponent",Ht[Ht.PerMille=8]="PerMille",Ht[Ht.Infinity=9]="Infinity",Ht[Ht.NaN=10]="NaN",Ht[Ht.TimeSeparator=11]="TimeSeparator",Ht[Ht.CurrencyDecimal=12]="CurrencyDecimal",Ht[Ht.CurrencyGroup=13]="CurrencyGroup",Ht))();function Ea(i,t){const e=ro(i),n=e[rt.NumberSymbols][t];if(typeof n>"u"){if(t===Ht.CurrencyDecimal)return e[rt.NumberSymbols][Ht.Decimal];if(t===Ht.CurrencyGroup)return e[rt.NumberSymbols][Ht.Group]}return n}const J9=/^(\d+)?\.((\d+)(-(\d+))?)?$/,JN=22,eM=".",yy="0",eY=";",tY=",",PT="#";function LT(i){const t=parseInt(i);if(isNaN(t))throw new Error("Invalid integer literal when parsing "+i);return t}const BT=/\s+/,nB=[];let hm=(()=>{class i{constructor(e,n,r,s){this._iterableDiffers=e,this._keyValueDiffers=n,this._ngEl=r,this._renderer=s,this.initialClasses=nB,this.stateMap=new Map}set klass(e){this.initialClasses=null!=e?e.trim().split(BT):nB}set ngClass(e){this.rawClass="string"==typeof e?e.trim().split(BT):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(BT).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)(E(Ww),E(gy),E(mt),E(ol))},i.\u0275dir=ve({type:i,selectors:[["","ngClass",""]],inputs:{klass:["class","klass"],ngClass:"ngClass"},standalone:!0}),i})();class hY{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 So=(()=>{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 hY(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),sB(a,r)}});for(let r=0,s=n.length;r{sB(n.get(r.currentIndex),r)})}static ngTemplateContextGuard(e,n){return!0}}return i.\u0275fac=function(e){return new(e||i)(E(Wr),E(Mo),E(Ww))},i.\u0275dir=ve({type:i,selectors:[["","ngFor","","ngForOf",""]],inputs:{ngForOf:"ngForOf",ngForTrackBy:"ngForTrackBy",ngForTemplate:"ngForTemplate"},standalone:!0}),i})();function sB(i,t){i.context.$implicit=t.item}let vi=(()=>{class i{constructor(e,n){this._viewContainer=e,this._context=new pY,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){oB("ngIfThen",e),this._thenTemplateRef=e,this._thenViewRef=null,this._updateView()}set ngIfElse(e){oB("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)(E(Wr),E(Mo))},i.\u0275dir=ve({type:i,selectors:[["","ngIf",""]],inputs:{ngIf:"ngIf",ngIfThen:"ngIfThen",ngIfElse:"ngIfElse"},standalone:!0}),i})();class pY{constructor(){this.$implicit=null,this.ngIf=null}}function oB(i,t){if(t&&!t.createEmbeddedView)throw new Error(`${i} must be a TemplateRef, but received '${pi(t)}'.`)}class UT{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 by=(()=>{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=ve({type:i,selectors:[["","ngSwitch",""]],inputs:{ngSwitch:"ngSwitch"},standalone:!0}),i})(),VT=(()=>{class i{constructor(e,n,r){this.ngSwitch=r,r._addCase(),this._view=new UT(e,n)}ngDoCheck(){this._view.enforceState(this.ngSwitch._matchCase(this.ngSwitchCase))}}return i.\u0275fac=function(e){return new(e||i)(E(Wr),E(Mo),E(by,9))},i.\u0275dir=ve({type:i,selectors:[["","ngSwitchCase",""]],inputs:{ngSwitchCase:"ngSwitchCase"},standalone:!0}),i})(),aB=(()=>{class i{constructor(e,n,r){r._addDefault(new UT(e,n))}}return i.\u0275fac=function(e){return new(e||i)(E(Wr),E(Mo),E(by,9))},i.\u0275dir=ve({type:i,selectors:[["","ngSwitchDefault",""]],standalone:!0}),i})(),tM=(()=>{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:Es.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)(E(mt),E(gy),E(ol))},i.\u0275dir=ve({type:i,selectors:[["","ngStyle",""]],inputs:{ngStyle:"ngStyle"},standalone:!0}),i})(),xy=(()=>{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)(E(Wr))},i.\u0275dir=ve({type:i,selectors:[["","ngTemplateOutlet",""]],inputs:{ngTemplateOutletContext:"ngTemplateOutletContext",ngTemplateOutlet:"ngTemplateOutlet",ngTemplateOutletInjector:"ngTemplateOutletInjector"},standalone:!0,features:[bi]}),i})();function fl(i,t){return new pe(2100,!1)}class gY{createSubscription(t,e){return t.subscribe({next:e,error:n=>{throw n}})}dispose(t){t.unsubscribe()}}class _Y{createSubscription(t,e){return t.then(e,n=>{throw n})}dispose(t){}}const vY=new _Y,yY=new gY;let pl=(()=>{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(oy(e))return vY;if(uL(e))return yY;throw fl()}_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)(E(Zn,16))},i.\u0275pipe=Gi({name:"async",type:i,pure:!1,standalone:!0}),i})(),cB=(()=>{class i{constructor(e){this.differs=e,this.keyValues=[],this.compareFn=dB}transform(e,n=dB){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 kY(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)(E(gy,16))},i.\u0275pipe=Gi({name:"keyvalue",type:i,pure:!1,standalone:!0}),i})();function dB(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 zT(i){return!(null==i||""===i||i!=i)}(e))return null;r=r||this._locale;try{return function sY(i,t,e){return function OT(i,t,e,n,r,s,o=!1){let a="",l=!1;if(isFinite(i)){let c=function aY(i){let n,r,s,o,a,t=Math.abs(i)+"",e=0;for((r=t.indexOf(eM))>-1&&(t=t.replace(eM,"")),(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)===yy;s++);if(s===(a=t.length))n=[0],r=1;else{for(a--;t.charAt(a)===yy;)a--;for(r-=s,n=[],o=0;s<=a;s++,o++)n[o]=Number(t.charAt(s))}return r>JN&&(n=n.splice(0,JN-1),e=r-1,r=1),{digits:n,exponent:e,integerLen:r}}(i);o&&(c=function oY(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 d=t.minInt,h=t.minFrac,p=t.maxFrac;if(s){const M=s.match(J9);if(null===M)throw new Error(`${s} is not a valid digit info`);const x=M[1],C=M[3],F=M[5];null!=x&&(d=LT(x)),null!=C&&(h=LT(C)),null!=F?p=LT(F):null!=C&&h>p&&(p=h)}!function lY(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);d&&(n.unshift(d),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(Ea(e,n)),v.length&&(a+=Ea(e,r)+v.join("")),b&&(a+=Ea(e,Ht.Exponential)+"+"+b)}else a=Ea(e,Ht.Infinity);return a=i<0&&!l?t.negPre+a+t.negSuf:t.posPre+a+t.posSuf,a}(i,function FT(i,t="-"){const e={minInt:1,minFrac:0,maxFrac:0,posPre:"",posSuf:"",negPre:"",negSuf:"",gSize:0,lgSize:0},n=i.split(eY),r=n[0],s=n[1],o=-1!==r.indexOf(eM)?r.split(eM):[r.substring(0,r.lastIndexOf(yy)+1),r.substring(r.lastIndexOf(yy)+1)],a=o[0],l=o[1]||"";e.posPre=a.substring(0,a.indexOf(PT));for(let d=0;d{class i{}return i.\u0275fac=function(e){return new(e||i)},i.\u0275mod=nn({type:i}),i.\u0275inj=Kt({}),i})();const hB="browser";let UY=(()=>{class i{}return i.\u0275prov=ke({token:i,providedIn:"root",factory:()=>new VY(ee(jt),window)}),i})();class VY{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 zY(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=fB(this.window.history)||fB(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 fB(i){return Object.getOwnPropertyDescriptor(i,"scrollRestoration")}class m7 extends b9{constructor(){super(...arguments),this.supportsDOMEvents=!0}}class WT extends m7{static makeCurrent(){!function y9(i){ET||(ET=i)}(new WT)}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 g7(){return My=My||document.querySelector("base"),My?My.getAttribute("href"):null}();return null==e?null:function _7(i){rM=rM||document.createElement("a"),rM.setAttribute("href",i);const t=rM.pathname;return"/"===t.charAt(0)?t:`/${t}`}(e)}resetBaseElement(){My=null}getUserAgent(){return window.navigator.userAgent}getCookie(t){return function dY(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 rM,My=null;const vB=new me("TRANSITION_ID"),y7=[{provide:Uw,useFactory:function v7(i,t,e){return()=>{e.get(Vw).donePromise.then(()=>{const n=Hc(),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=ke({token:i,factory:i.\u0275fac}),i})();const sM=new me("EventManagerPlugins");let oM=(()=>{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=ke({token:i,factory:i.\u0275fac}),i})(),Cy=(()=>{class i extends bB{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)(ee(jt))},i.\u0275prov=ke({token:i,factory:i.\u0275fac}),i})();const jT={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/"},YT=/%COMP%/g,MB=new me("RemoveStylesOnCompDestory",{providedIn:"root",factory:()=>!1});function CB(i,t){return t.flat(100).map(e=>e.replace(YT,i))}function SB(i){return t=>{if("__ngUnwrap__"===t)return i;!1===i(t)&&(t.preventDefault(),t.returnValue=!1)}}let aM=(()=>{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 qT(e)}createRenderer(e,n){if(!e||!n)return this.defaultRenderer;const r=this.getOrCreateRenderer(e,n);return r instanceof DB?r.applyToHost(e):r instanceof XT&&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 qs.Emulated:s=new DB(o,a,n,this.appId,l);break;case qs.ShadowDom:return new D7(o,a,e,n);default:s=new XT(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)(ee(oM),ee(Cy),ee(cm),ee(MB))},i.\u0275prov=ke({token:i,factory:i.\u0275fac}),i})();class qT{constructor(t){this.eventManager=t,this.data=Object.create(null),this.destroyNode=null}destroy(){}createElement(t,e){return e?document.createElementNS(jT[e]||e,t):document.createElement(t)}createComment(t){return document.createComment(t)}createText(t){return document.createTextNode(t)}appendChild(t,e){(AB(t)?t.content:t).appendChild(e)}insertBefore(t,e,n){t&&(AB(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=jT[r];s?t.setAttributeNS(s,e,n):t.setAttribute(e,n)}else t.setAttribute(e,n)}removeAttribute(t,e,n){if(n){const r=jT[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&(Es.DashCase|Es.Important)?t.style.setProperty(e,n,r&Es.Important?"important":""):t.style[e]=n}removeStyle(t,e,n){n&Es.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,SB(n)):this.eventManager.addEventListener(t,e,SB(n))}}function AB(i){return"TEMPLATE"===i.tagName&&void 0!==i.content}class D7 extends qT{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=CB(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 XT extends qT{constructor(t,e,n,r,s=n.id){super(t),this.sharedStylesHost=e,this.removeStylesOnCompDestory=r,this.rendererUsageCount=0,this.styles=CB(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 DB extends XT{constructor(t,e,n,r,s){const o=r+"-"+n.id;super(t,e,n,s,o),this.contentAttr=function S7(i){return"_ngcontent-%COMP%".replace(YT,i)}(o),this.hostAttr=function E7(i){return"_nghost-%COMP%".replace(YT,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 T7=(()=>{class i extends yB{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)(ee(jt))},i.\u0275prov=ke({token:i,factory:i.\u0275fac}),i})();const TB=["alt","control","meta","shift"],I7={"\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"},R7={alt:i=>i.altKey,control:i=>i.ctrlKey,meta:i=>i.metaKey,shift:i=>i.shiftKey};let k7=(()=>{class i extends yB{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(()=>Hc().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."),TB.forEach(c=>{const d=n.indexOf(c);d>-1&&(n.splice(d,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=I7[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"),TB.forEach(o=>{o!==r&&(0,R7[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)(ee(jt))},i.\u0275prov=ke({token:i,factory:i.\u0275fac}),i})();const L7=SN(g9,"browser",[{provide:fT,useValue:hB},{provide:pN,useValue:function P7(){WT.makeCurrent()},multi:!0},{provide:jt,useFactory:function F7(){return function sD(i){vv=i}(document),document},deps:[]}]),kB=new me(""),PB=[{provide:zw,useClass:class b7{addToWindow(t){Rn.getAngularTestability=(n,r=!0)=>{const s=t.findTestabilityInTree(n,r);if(null==s)throw new Error("Could not find testability for element.");return s},Rn.getAllAngularTestabilities=()=>t.getAllTestabilities(),Rn.getAllAngularRootElements=()=>t.getAllRootElements(),Rn.frameworkStabilizers||(Rn.frameworkStabilizers=[]),Rn.frameworkStabilizers.push(n=>{const r=Rn.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?Hc().isShadowRoot(e)?this.findTestabilityInTree(t,e.host,!0):this.findTestabilityInTree(t,e.parentElement,!0):null)}},deps:[]},{provide:bN,useClass:_T,deps:[ft,vT,zw]},{provide:_T,useClass:_T,deps:[ft,vT,zw]}],OB=[{provide:Iv,useValue:"root"},{provide:al,useFactory:function O7(){return new al},deps:[]},{provide:sM,useClass:T7,multi:!0,deps:[jt,ft,fT]},{provide:sM,useClass:k7,multi:!0,deps:[jt]},{provide:aM,useClass:aM,deps:[oM,Cy,cm,MB]},{provide:Gl,useExisting:aM},{provide:bB,useExisting:Cy},{provide:Cy,useClass:Cy,deps:[jt]},{provide:oM,useClass:oM,deps:[sM,ft]},{provide:class HY{},useClass:x7,deps:[]},[]];let FB=(()=>{class i{constructor(e){}static withServerTransition(e){return{ngModule:i,providers:[{provide:cm,useValue:e.appId},{provide:vB,useExisting:cm},y7]}}}return i.\u0275fac=function(e){return new(e||i)(ee(kB,12))},i.\u0275mod=nn({type:i}),i.\u0275inj=Kt({providers:[...OB,...PB],imports:[Eo,_9]}),i})(),LB=(()=>{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)(ee(jt))},i.\u0275prov=ke({token:i,factory:function(e){let n=null;return n=e?new e:function B7(){return new LB(ee(jt))}(),n},providedIn:"root"}),i})();typeof window<"u"&&window;let QT=(()=>{class i{}return i.\u0275fac=function(e){return new(e||i)},i.\u0275prov=ke({token:i,factory:function(e){let n=null;return n=e?new(e||i):ee(UB),n},providedIn:"root"}),i})(),UB=(()=>{class i extends QT{constructor(e){super(),this._doc=e}sanitize(e,n){if(null==n)return null;switch(e){case Kn.NONE:return n;case Kn.HTML:return Ma(n,"HTML")?Js(n):Zx(this._doc,String(n)).toString();case Kn.STYLE:return Ma(n,"Style")?Js(n):n;case Kn.SCRIPT:if(Ma(n,"Script"))return Js(n);throw new Error("unsafe value used in a script context");case Kn.URL:return Ma(n,"URL")?Js(n):xh(String(n));case Kn.RESOURCE_URL:if(Ma(n,"ResourceURL"))return Js(n);throw new Error(`unsafe value used in a resource URL context (see ${qu})`);default:throw new Error(`Unexpected SecurityContext ${e} (see ${qu})`)}}bypassSecurityTrustHtml(e){return function uD(i){return new oD(i)}(e)}bypassSecurityTrustStyle(e){return function hD(i){return new aD(i)}(e)}bypassSecurityTrustScript(e){return function fD(i){return new lD(i)}(e)}bypassSecurityTrustUrl(e){return function pD(i){return new cD(i)}(e)}bypassSecurityTrustResourceUrl(e){return function mD(i){return new Pp(i)}(e)}}return i.\u0275fac=function(e){return new(e||i)(ee(jt))},i.\u0275prov=ke({token:i,factory:function(e){let n=null;return n=e?new e:function G7(i){return new UB(i.get(jt))}(ee($i)),n},providedIn:"root"}),i})();function ht(...i){return Ni(i,$u(i))}class gt extends Re{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 fm=V(i=>function(){i(this),this.name="EmptyError",this.message="no elements in sequence"}),{isArray:$7}=Array,{getPrototypeOf:W7,prototype:j7,keys:Y7}=Object;function VB(i){if(1===i.length){const t=i[0];if($7(t))return{args:t,keys:null};if(function q7(i){return i&&"object"==typeof i&&W7(i)===j7}(t)){const e=Y7(t);return{args:e.map(n=>t[n]),keys:e}}}return{args:i,keys:null}}const{isArray:X7}=Array;function JT(i){return et(t=>function K7(i,t){return X7(t)?i(...t):i(t)}(i,t))}function zB(i,t){return i.reduce((e,n,r)=>(e[n]=t[r],e),{})}function nu(...i){const t=$u(i),e=w0(i),{args:n,keys:r}=VB(i);if(0===n.length)return Ni([],t);const s=new In(function Z7(i,t,e=$a){return n=>{HB(t,()=>{const{length:r}=i,s=new Array(r);let o=r,a=r;for(let l=0;l{const c=Ni(i[l],t);let d=!1;c.subscribe(Yn(n,h=>{s[l]=h,d||(d=!0,a--),a||n.next(e(s.slice()))},()=>{--o||n.complete()}))},n)},n)}}(n,t,r?o=>zB(r,o):$a));return e?s.pipe(JT(e)):s}function HB(i,t,e){i?Ya(e,i,t):t()}function Sy(...i){return function Q7(){return yd(1)}()(Ni(i,$u(i)))}function Ey(i){return new In(t=>{wr(i()).subscribe(t)})}function pm(i,t){const e=cn(i)?i:()=>i,n=r=>r.error(e());return new In(t?r=>t.schedule(n,0,r):n)}function eI(){return ti((i,t)=>{let e=null;i._refCount++;const n=Yn(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 GB extends In{constructor(t,e){super(),this.source=t,this.subjectFactory=e,this._subject=null,this._refCount=0,this._connection=null,c0(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 Zt;const e=this.getSubject();t.add(this.source.subscribe(Yn(e,void 0,()=>{this._teardown(),e.complete()},n=>{this._teardown(),e.error(n)},()=>this._teardown()))),t.closed&&(this._connection=null,t=Zt.EMPTY)}return t}refCount(){return eI()(this)}}function Rs(i,t){return ti((e,n)=>{let r=null,s=0,o=!1;const a=()=>o&&!r&&n.complete();e.subscribe(Yn(n,l=>{r?.unsubscribe();let c=0;const d=s++;wr(i(l,d)).subscribe(r=Yn(n,h=>n.next(t?t(l,h,d,c++):h),()=>{r=null,a()}))},()=>{o=!0,a()}))})}function Oi(i){return i<=0?()=>po:ti((t,e)=>{let n=0;t.subscribe(Yn(e,r=>{++n<=i&&(e.next(r),i<=n&&e.complete())}))})}function Ao(...i){const t=$u(i);return ti((e,n)=>{(t?Sy(i,e,t):Sy(i,e)).subscribe(n)})}function gn(i,t){return ti((e,n)=>{let r=0;e.subscribe(Yn(n,s=>i.call(t,s,r++)&&n.next(s)))})}function lM(i){return ti((t,e)=>{let n=!1;t.subscribe(Yn(e,r=>{n=!0,e.next(r)},()=>{n||e.next(i),e.complete()}))})}function $B(i=J7){return ti((t,e)=>{let n=!1;t.subscribe(Yn(e,r=>{n=!0,e.next(r)},()=>n?e.complete():e.error(i())))})}function J7(){return new fm}function iu(i,t){const e=arguments.length>=2;return n=>n.pipe(i?gn((r,s)=>i(r,s,n)):$a,Oi(1),e?lM(t):$B(()=>new fm))}function ru(i,t){return cn(t)?ir(i,t,1):ir(i,1)}function Vi(i,t,e){const n=cn(i)||t||e?{next:i,error:t,complete:e}:i;return n?ti((r,s)=>{var o;null===(o=n.subscribe)||void 0===o||o.call(n);let a=!0;r.subscribe(Yn(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)}))}):$a}function Wc(i){return ti((t,e)=>{let s,n=null,r=!1;n=t.subscribe(Yn(e,void 0,void 0,o=>{s=wr(i(o,Wc(i)(t))),n?(n.unsubscribe(),n=null,s.subscribe(e)):r=!0})),r&&(n.unsubscribe(),n=null,s.subscribe(e))})}function tI(i,t){return ti(function eq(i,t,e,n,r){return(s,o)=>{let a=e,l=t,c=0;s.subscribe(Yn(o,d=>{const h=c++;l=a?i(l,d,h):(a=!0,d),n&&o.next(l)},r&&(()=>{a&&o.next(l),o.complete()})))}}(i,t,arguments.length>=2,!0))}function nI(i){return i<=0?()=>po:ti((t,e)=>{let n=[];t.subscribe(Yn(e,r=>{n.push(r),i{for(const r of n)e.next(r);e.complete()},void 0,()=>{n=null}))})}function WB(i,t){const e=arguments.length>=2;return n=>n.pipe(i?gn((r,s)=>i(r,s,n)):$a,nI(1),e?lM(t):$B(()=>new fm))}function jB(i,t=!1){return ti((e,n)=>{let r=0;e.subscribe(Yn(n,s=>{const o=i(s,r++);(o||t)&&n.next(s),!o&&n.complete()}))})}function YB(i){return et(()=>i)}function su(i){return ti((t,e)=>{try{t.subscribe(e)}finally{e.add(i)}})}const _n="primary",Ay=Symbol("RouteTitle");class tq{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 tq(i)}function nq(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 XB(i){return Array.prototype.concat.apply([],i)}function KB(i){return i.length>0?i[i.length-1]:null}function os(i,t){for(const e in i)i.hasOwnProperty(e)&&t(i[e],e)}function ou(i){return L1(i)?i:oy(i)?Ni(Promise.resolve(i)):ht(i)}const cM=!1,rq={exact:function JB(i,t,e){if(!Rh(i.segments,t.segments)||!dM(i.segments,t.segments,e)||i.numberOfChildren!==t.numberOfChildren)return!1;for(const n in t.children)if(!i.children[n]||!JB(i.children[n],t.children[n],e))return!1;return!0},subset:e3},ZB={exact:function sq(i,t){return Xl(i,t)},subset:function oq(i,t){return Object.keys(t).length<=Object.keys(i).length&&Object.keys(t).every(e=>qB(i[e],t[e]))},ignored:()=>!0};function QB(i,t,e){return rq[e.paths](i.root,t.root,e.matrixParams)&&ZB[e.queryParams](i.queryParams,t.queryParams)&&!("exact"===e.fragment&&i.fragment!==t.fragment)}function e3(i,t,e){return t3(i,t,t.segments,e)}function t3(i,t,e,n){if(i.segments.length>e.length){const r=i.segments.slice(0,e.length);return!(!Rh(r,e)||t.hasChildren()||!dM(r,e,n))}if(i.segments.length===e.length){if(!Rh(i.segments,e)||!dM(i.segments,e,n))return!1;for(const r in t.children)if(!i.children[r]||!e3(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!!(Rh(i.segments,r)&&dM(i.segments,r,n)&&i.children[_n])&&t3(i.children[_n],t,s,n)}}function dM(i,t,e){return t.every((n,r)=>ZB[e](i[r].parameters,n.parameters))}class au{constructor(t=new Tn([],{}),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 cq.serialize(this)}}class Tn{constructor(t,e){this.segments=t,this.children=e,this.parent=null,os(e,(n,r)=>n.parent=this)}hasChildren(){return this.numberOfChildren>0}get numberOfChildren(){return Object.keys(this.children).length}toString(){return uM(this)}}class Dy{constructor(t,e){this.path=t,this.parameters=e}get parameterMap(){return this._parameterMap||(this._parameterMap=mm(this.parameters)),this._parameterMap}toString(){return s3(this)}}function Rh(i,t){return i.length===t.length&&i.every((e,n)=>e.path===t[n].path)}let Ty=(()=>{class i{}return i.\u0275fac=function(e){return new(e||i)},i.\u0275prov=ke({token:i,factory:function(){return new iI},providedIn:"root"}),i})();class iI{parse(t){const e=new vq(t);return new au(e.parseRootSegment(),e.parseQueryParams(),e.parseFragment())}serialize(t){const e=`/${Iy(t.root,!0)}`,n=function hq(i){const t=Object.keys(i).map(e=>{const n=i[e];return Array.isArray(n)?n.map(r=>`${hM(e)}=${hM(r)}`).join("&"):`${hM(e)}=${hM(n)}`}).filter(e=>!!e);return t.length?`?${t.join("&")}`:""}(t.queryParams);return`${e}${n}${"string"==typeof t.fragment?`#${function dq(i){return encodeURI(i)}(t.fragment)}`:""}`}}const cq=new iI;function uM(i){return i.segments.map(t=>s3(t)).join("/")}function Iy(i,t){if(!i.hasChildren())return uM(i);if(t){const e=i.children[_n]?Iy(i.children[_n],!1):"",n=[];return os(i.children,(r,s)=>{s!==_n&&n.push(`${s}:${Iy(r,!1)}`)}),n.length>0?`${e}(${n.join("//")})`:e}{const e=function lq(i,t){let e=[];return os(i.children,(n,r)=>{r===_n&&(e=e.concat(t(n,r)))}),os(i.children,(n,r)=>{r!==_n&&(e=e.concat(t(n,r)))}),e}(i,(n,r)=>r===_n?[Iy(i.children[_n],!1)]:[`${r}:${Iy(n,!1)}`]);return 1===Object.keys(i.children).length&&null!=i.children[_n]?`${uM(i)}/${e[0]}`:`${uM(i)}/(${e.join("//")})`}}function n3(i){return encodeURIComponent(i).replace(/%40/g,"@").replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",")}function hM(i){return n3(i).replace(/%3B/gi,";")}function rI(i){return n3(i).replace(/\(/g,"%28").replace(/\)/g,"%29").replace(/%26/gi,"&")}function fM(i){return decodeURIComponent(i)}function r3(i){return fM(i.replace(/\+/g,"%20"))}function s3(i){return`${rI(i.path)}${function uq(i){return Object.keys(i).map(t=>`;${rI(t)}=${rI(i[t])}`).join("")}(i.parameters)}`}const fq=/^[^\/()?;=#]+/;function pM(i){const t=i.match(fq);return t?t[0]:""}const pq=/^[^=?&#]+/,gq=/^[^&#]+/;class vq{constructor(t){this.url=t,this.remaining=t}parseRootSegment(){return this.consumeOptional("/"),""===this.remaining||this.peekStartsWith("?")||this.peekStartsWith("#")?new Tn([],{}):new Tn([],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[_n]=new Tn(t,e)),n}parseSegment(){const t=pM(this.remaining);if(""===t&&this.peekStartsWith(";"))throw new pe(4009,cM);return this.capture(t),new Dy(fM(t),this.parseMatrixParams())}parseMatrixParams(){const t={};for(;this.consumeOptional(";");)this.parseParam(t);return t}parseParam(t){const e=pM(this.remaining);if(!e)return;this.capture(e);let n="";if(this.consumeOptional("=")){const r=pM(this.remaining);r&&(n=r,this.capture(n))}t[fM(e)]=fM(n)}parseQueryParam(t){const e=function mq(i){const t=i.match(pq);return t?t[0]:""}(this.remaining);if(!e)return;this.capture(e);let n="";if(this.consumeOptional("=")){const o=function _q(i){const t=i.match(gq);return t?t[0]:""}(this.remaining);o&&(n=o,this.capture(n))}const r=r3(e),s=r3(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=pM(this.remaining),r=this.remaining[n.length];if("/"!==r&&")"!==r&&";"!==r)throw new pe(4010,cM);let s;n.indexOf(":")>-1?(s=n.slice(0,n.indexOf(":")),this.capture(s),this.capture(":")):t&&(s=_n);const o=this.parseChildren();e[s]=1===Object.keys(o).length?o[_n]:new Tn([],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 pe(4011,cM)}}function sI(i){return i.segments.length>0?new Tn([],{[_n]:i}):i}function mM(i){const t={};for(const n of Object.keys(i.children)){const s=mM(i.children[n]);(s.segments.length>0||s.hasChildren())&&(t[n]=s)}return function yq(i){if(1===i.numberOfChildren&&i.children[_n]){const t=i.children[_n];return new Tn(i.segments.concat(t.segments),t.children)}return i}(new Tn(i.segments,t))}function kh(i){return i instanceof au}const oI=!1;function bq(i,t,e,n,r){if(0===e.length)return gm(t.root,t.root,t.root,n,r);const s=function d3(i){if("string"==typeof i[0]&&1===i.length&&"/"===i[0])return new c3(!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 os(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 c3(e,t,n)}(e);return s.toRoot()?gm(t.root,t.root,new Tn([],{}),n,r):function o(l){const c=function wq(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 u3(i,t,e){let n=i,r=t,s=e;for(;s>r;){if(s-=r,n=n.parent,!n)throw new pe(4005,oI&&"Invalid number of '../'");r=n.segments.length}return new _m(n,!1,r-s)}(e,n+(Ry(i.commands[0])?0:1),i.numberOfDoubleDots)}(s,t,i.snapshot?._urlSegment,l),d=c.processChildren?vm(c.segmentGroup,c.index,s.commands):aI(c.segmentGroup,c.index,s.commands);return gm(t.root,c.segmentGroup,d,n,r)}(i.snapshot?._lastPathIndex)}function Ry(i){return"object"==typeof i&&null!=i&&!i.outlets&&!i.segmentPath}function ky(i){return"object"==typeof i&&null!=i&&i.outlets}function gm(i,t,e,n,r){let o,s={};n&&os(n,(l,c)=>{s[c]=Array.isArray(l)?l.map(d=>`${d}`):`${l}`}),o=i===t?e:l3(i,t,e);const a=sI(mM(o));return new au(a,s,r)}function l3(i,t,e){const n={};return os(i.children,(r,s)=>{n[s]=r===t?e:l3(r,t,e)}),new Tn(i.segments,n)}class c3{constructor(t,e,n){if(this.isAbsolute=t,this.numberOfDoubleDots=e,this.commands=n,t&&n.length>0&&Ry(n[0]))throw new pe(4003,oI&&"Root segment cannot have matrix parameters");const r=n.find(ky);if(r&&r!==KB(n))throw new pe(4004,oI&&"{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 aI(i,t,e){if(i||(i=new Tn([],{})),0===i.segments.length&&i.hasChildren())return vm(i,t,e);const n=function Cq(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(ky(a))break;const l=`${a}`,c=n0&&void 0===l)break;if(l&&c&&"object"==typeof c&&void 0===c.outlets){if(!f3(l,c,o))return s;n+=2}else{if(!f3(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]=aI(i.children[o],t,s))}),os(i.children,(s,o)=>{void 0===n[o]&&(r[o]=s)}),new Tn(i.segments,r)}}function lI(i,t,e){const n=i.segments.slice(0,t);let r=0;for(;r{"string"==typeof e&&(e=[e]),null!==e&&(t[n]=lI(new Tn([],{}),0,e))}),t}function h3(i){const t={};return os(i,(e,n)=>t[n]=`${e}`),t}function f3(i,t,e){return i==e.path&&Xl(t,e.parameters)}const Py="imperative";class Kl{constructor(t,e){this.id=t,this.url=e}}class cI extends Kl{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 Ph extends Kl{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 gM extends Kl{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 _M extends Kl{constructor(t,e,n,r){super(t,e),this.reason=n,this.code=r,this.type=16}}class dI extends Kl{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 Eq extends Kl{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 Aq extends Kl{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 Dq extends Kl{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 Tq extends Kl{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 Iq extends Kl{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 Rq{constructor(t){this.route=t,this.type=9}toString(){return`RouteConfigLoadStart(path: ${this.route.path})`}}class kq{constructor(t){this.route=t,this.type=10}toString(){return`RouteConfigLoadEnd(path: ${this.route.path})`}}class Pq{constructor(t){this.snapshot=t,this.type=11}toString(){return`ChildActivationStart(path: '${this.snapshot.routeConfig&&this.snapshot.routeConfig.path||""}')`}}class Oq{constructor(t){this.snapshot=t,this.type=12}toString(){return`ChildActivationEnd(path: '${this.snapshot.routeConfig&&this.snapshot.routeConfig.path||""}')`}}class Fq{constructor(t){this.snapshot=t,this.type=13}toString(){return`ActivationStart(path: '${this.snapshot.routeConfig&&this.snapshot.routeConfig.path||""}')`}}class Lq{constructor(t){this.snapshot=t,this.type=14}toString(){return`ActivationEnd(path: '${this.snapshot.routeConfig&&this.snapshot.routeConfig.path||""}')`}}class p3{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 Uq=(()=>{class i{createUrlTree(e,n,r,s,o,a){return bq(e||n.root,r,s,o,a)}}return i.\u0275fac=function(e){return new(e||i)},i.\u0275prov=ke({token:i,factory:i.\u0275fac}),i})(),zq=(()=>{class i{}return i.\u0275fac=function(e){return new(e||i)},i.\u0275prov=ke({token:i,factory:function(t){return Uq.\u0275fac(t)},providedIn:"root"}),i})();class m3{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=uI(t,this._root);return e?e.children.map(n=>n.value):[]}firstChild(t){const e=uI(t,this._root);return e&&e.children.length>0?e.children[0].value:null}siblings(t){const e=hI(t,this._root);return e.length<2?[]:e[e.length-2].children.map(r=>r.value).filter(r=>r!==t)}pathFromRoot(t){return hI(t,this._root).map(e=>e.value)}}function uI(i,t){if(i===t.value)return t;for(const e of t.children){const n=uI(i,e);if(n)return n}return null}function hI(i,t){if(i===t.value)return[t];for(const e of t.children){const n=hI(i,e);if(n.length)return n.unshift(t),n}return[]}class jc{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 g3 extends m3{constructor(t,e){super(t),this.snapshot=e,fI(this,t)}toString(){return this.snapshot.toString()}}function _3(i,t){const e=function Hq(i,t){const o=new vM([],{},{},"",{},_n,t,null,i.root,-1,{});return new y3("",new jc(o,[]))}(i,t),n=new gt([new Dy("",{})]),r=new gt({}),s=new gt({}),o=new gt({}),a=new gt(""),l=new bm(n,r,o,a,s,_n,t,e.root);return l.snapshot=e.root,new g3(new jc(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(et(c=>c[Ay]))??ht(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(et(t=>mm(t)))),this._paramMap}get queryParamMap(){return this._queryParamMap||(this._queryParamMap=this.queryParams.pipe(et(t=>mm(t)))),this._queryParamMap}toString(){return this.snapshot?this.snapshot.toString():`Future(${this._futureSnapshot})`}}function v3(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 Gq(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 vM{get title(){return this.data?.[Ay]}constructor(t,e,n,r,s,o,a,l,c,d,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=d,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 y3 extends m3{constructor(t,e){super(e),this.url=t,fI(this,e)}toString(){return b3(this._root)}}function fI(i,t){t.value._routerState=i,t.children.forEach(e=>fI(i,e))}function b3(i){const t=i.children.length>0?` { ${i.children.map(b3).join(", ")} } `:"";return`${i.value}${t}`}function pI(i){if(i.snapshot){const t=i.snapshot,e=i._futureSnapshot;i.snapshot=e,Xl(t.queryParams,e.queryParams)||i.queryParams.next(e.queryParams),t.fragment!==e.fragment&&i.fragment.next(e.fragment),Xl(t.params,e.params)||i.params.next(e.params),function iq(i,t){if(i.length!==t.length)return!1;for(let e=0;eXl(e.parameters,t[n].parameters))}(i.url,t.url);return e&&!(!i.parent!=!t.parent)&&(!i.parent||mI(i.parent,t.parent))}function Oy(i,t,e){if(e&&i.shouldReuseRoute(t.value,e.value.snapshot)){const n=e.value;n._futureSnapshot=t.value;const r=function Wq(i,t,e){return t.children.map(n=>{for(const r of e.children)if(i.shouldReuseRoute(n.value,r.value.snapshot))return Oy(i,n,r);return Oy(i,n)})}(i,t,e);return new jc(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=>Oy(i,a)),o}}const n=function jq(i){return new bm(new gt(i.url),new gt(i.params),new gt(i.queryParams),new gt(i.fragment),new gt(i.data),i.outlet,i.component,i)}(t.value),r=t.children.map(s=>Oy(i,s));return new jc(n,r)}}const gI="ngNavigationCancelingError";function x3(i,t){const{redirectTo:e,navigationBehaviorOptions:n}=kh(t)?{redirectTo:t,navigationBehaviorOptions:void 0}:t,r=w3(!1,0,t);return r.url=e,r.navigationBehaviorOptions=n,r}function w3(i,t,e){const n=new Error("NavigationCancelingError: "+(i||""));return n[gI]=!0,n.cancellationCode=t,e&&(n.url=e),n}function M3(i){return C3(i)&&kh(i.url)}function C3(i){return i&&i[gI]}class Yq{constructor(){this.outlet=null,this.route=null,this.resolver=null,this.injector=null,this.children=new Fy,this.attachRef=null}}let Fy=(()=>{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 Yq,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=ke({token:i,factory:i.\u0275fac,providedIn:"root"}),i})();const yM=!1;let S3=(()=>{class i{constructor(){this.activated=null,this._activatedRoute=null,this.name=_n,this.activateEvents=new We,this.deactivateEvents=new We,this.attachEvents=new We,this.detachEvents=new We,this.parentContexts=Ft(Fy),this.location=Ft(Wr),this.changeDetector=Ft(Zn),this.environmentInjector=Ft(to)}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 pe(4012,yM);return this.activated.instance}get activatedRoute(){if(!this.activated)throw new pe(4012,yM);return this._activatedRoute}get activatedRouteData(){return this._activatedRoute?this._activatedRoute.snapshot.data:{}}detach(){if(!this.activated)throw new pe(4012,yM);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 pe(4013,yM);this._activatedRoute=e;const r=this.location,o=e.snapshot.component,a=this.parentContexts.getOrCreateContext(this.name).children,l=new qq(e,a,r.injector);if(n&&function Xq(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=ve({type:i,selectors:[["router-outlet"]],inputs:{name:"name"},outputs:{activateEvents:"activate",deactivateEvents:"deactivate",attachEvents:"attach",detachEvents:"detach"},exportAs:["outlet"],standalone:!0,features:[bi]}),i})();class qq{constructor(t,e,n){this.route=t,this.childContexts=e,this.parent=n}get(t,e){return t===bm?this.route:t===Fy?this.childContexts:this.parent.get(t,e)}}let _I=(()=>{class i{}return i.\u0275fac=function(e){return new(e||i)},i.\u0275cmp=ot({type:i,selectors:[["ng-component"]],standalone:!0,features:[Z1],decls:1,vars:0,template:function(e,n){1&e&&De(0,"router-outlet")},dependencies:[S3],encapsulation:2}),i})();function E3(i,t){return i.providers&&!i._injector&&(i._injector=Fw(i.providers,t,`Route: ${i.path}`)),i._injector??t}function yI(i){const t=i.children&&i.children.map(yI),e=t?{...i,children:t}:{...i};return!e.component&&!e.loadComponent&&(t||e.loadChildren)&&e.outlet&&e.outlet!==_n&&(e.component=_I),e}function Da(i){return i.outlet||_n}function A3(i,t){const e=i.filter(n=>Da(n)===t);return e.push(...i.filter(n=>Da(n)!==t)),e}function Ly(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 eX{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),pI(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]}),os(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 Lq(s.value.snapshot))}),t.children.length&&this.forwardEvent(new Oq(t.value.snapshot))}activateRoutes(t,e,n){const r=t.value,s=e?e.value:null;if(pI(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),pI(a.route.value),this.activateChildRoutes(t,null,o.children)}else{const a=Ly(r.snapshot),l=a?.get(Hl)??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 D3{constructor(t){this.path=t,this.route=this.path[this.path.length-1]}}class bM{constructor(t,e){this.component=t,this.route=e}}function tX(i,t,e){const n=i._root;return Ny(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 Cr(i){return null!==Gf(i)}(i)?t.get(i):i:n}function Ny(i,t,e,n,r={canDeactivateChecks:[],canActivateChecks:[]}){const s=ym(t);return i.children.forEach(o=>{(function iX(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 rX(i,t,e){if("function"==typeof e)return e(i,t);switch(e){case"pathParamsChange":return!Rh(i.url,t.url);case"pathParamsOrQueryParamsChange":return!Rh(i.url,t.url)||!Xl(i.queryParams,t.queryParams);case"always":return!0;case"paramsOrQueryParamsChange":return!mI(i,t)||!Xl(i.queryParams,t.queryParams);default:return!mI(i,t)}}(o,s,s.routeConfig.runGuardsAndResolvers);l?r.canActivateChecks.push(new D3(n)):(s.data=o.data,s._resolvedData=o._resolvedData),Ny(i,t,s.component?a?a.children:null:e,n,r),l&&a&&a.outlet&&a.outlet.isActivated&&r.canDeactivateChecks.push(new bM(a.outlet.component,o))}else o&&By(t,a,r),r.canActivateChecks.push(new D3(n)),Ny(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]}),os(s,(o,a)=>By(o,e.getContext(a),r)),r}function By(i,t,e){const n=ym(i),r=i.value;os(n,(s,o)=>{By(s,r.component?t?t.children.getContext(o):null:t,e)}),e.canDeactivateChecks.push(new bM(r.component&&t&&t.outlet&&t.outlet.isActivated?t.outlet.component:null,r))}function Uy(i){return"function"==typeof i}function bI(i){return i instanceof fm||"EmptyError"===i?.name}const xM=Symbol("INITIAL_VALUE");function wm(){return Rs(i=>nu(i.map(t=>t.pipe(Oi(1),Ao(xM)))).pipe(et(t=>{for(const e of t)if(!0!==e){if(e===xM)return xM;if(!1===e||e instanceof au)return e}return!0}),gn(t=>t!==xM),Oi(1)))}function T3(i){return function CE(...i){return a0(i)}(Vi(t=>{if(kh(t))throw x3(0,t)}),et(t=>!0===t))}const xI={matched:!1,consumedSegments:[],remainingSegments:[],parameters:{},positionalParamSegments:{}};function I3(i,t,e,n,r){const s=wI(i,t,e);return s.matched?function xX(i,t,e,n){const r=t.canMatch;return r&&0!==r.length?ht(r.map(o=>{const a=xm(o,i);return ou(function dX(i){return i&&Uy(i.canMatch)}(a)?a.canMatch(t,e):i.runInContext(()=>a(t,e)))})).pipe(wm(),T3()):ht(!0)}(n=E3(t,n),t,e).pipe(et(o=>!0===o?s:{...xI})):ht(s)}function wI(i,t,e){if(""===t.path)return"full"===t.pathMatch&&(i.hasChildren()||e.length>0)?{...xI}:{matched:!0,consumedSegments:[],remainingSegments:e,parameters:{},positionalParamSegments:{}};const r=(t.matcher||nq)(e,i,t);if(!r)return{...xI};const s={};os(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 wM(i,t,e,n){if(e.length>0&&function CX(i,t,e){return e.some(n=>MM(i,t,n)&&Da(n)!==_n)}(i,e,n)){const s=new Tn(t,function MX(i,t,e,n){const r={};r[_n]=n,n._sourceSegment=i,n._segmentIndexShift=t.length;for(const s of e)if(""===s.path&&Da(s)!==_n){const o=new Tn([],{});o._sourceSegment=i,o._segmentIndexShift=t.length,r[Da(s)]=o}return r}(i,t,n,new Tn(e,i.children)));return s._sourceSegment=i,s._segmentIndexShift=t.length,{segmentGroup:s,slicedSegments:[]}}if(0===e.length&&function SX(i,t,e){return e.some(n=>MM(i,t,n))}(i,e,n)){const s=new Tn(i.segments,function wX(i,t,e,n,r){const s={};for(const o of n)if(MM(i,e,o)&&!r[Da(o)]){const a=new Tn([],{});a._sourceSegment=i,a._segmentIndexShift=t.length,s[Da(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 Tn(i.segments,i.children);return r._sourceSegment=i,r._segmentIndexShift=t.length,{segmentGroup:r,slicedSegments:e}}function MM(i,t,e){return(!(i.hasChildren()||t.length>0)||"full"!==e.pathMatch)&&""===e.path}function R3(i,t,e,n){return!!(Da(i)===n||n!==_n&&MM(t,e,i))&&("**"===i.path||wI(t,i,e).matched)}function k3(i,t,e){return 0===t.length&&!i.children[e]}const CM=!1;class SM{constructor(t){this.segmentGroup=t||null}}class P3{constructor(t){this.urlTree=t}}function Vy(i){return pm(new SM(i))}function O3(i){return pm(new P3(i))}class TX{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=wM(this.urlTree.root,[],[],this.config).segmentGroup,e=new Tn(t.segments,t.children);return this.expandSegmentGroup(this.injector,this.config,e,_n).pipe(et(s=>this.createUrlTree(mM(s),this.urlTree.queryParams,this.urlTree.fragment))).pipe(Wc(s=>{if(s instanceof P3)return this.allowRedirects=!1,this.match(s.urlTree);throw s instanceof SM?this.noMatchError(s):s}))}match(t){return this.expandSegmentGroup(this.injector,this.config,t.root,_n).pipe(et(r=>this.createUrlTree(mM(r),t.queryParams,t.fragment))).pipe(Wc(r=>{throw r instanceof SM?this.noMatchError(r):r}))}noMatchError(t){return new pe(4002,CM)}createUrlTree(t,e,n){const r=sI(t);return new au(r,e,n)}expandSegmentGroup(t,e,n,r){return 0===n.segments.length&&n.hasChildren()?this.expandChildren(t,e,n).pipe(et(s=>new Tn([],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 Ni(r).pipe(ru(s=>{const o=n.children[s],a=A3(e,s);return this.expandSegmentGroup(t,a,o,s).pipe(et(l=>({segment:l,outlet:s})))}),tI((s,o)=>(s[o.outlet]=o.segment,s),{}),WB())}expandSegment(t,e,n,r,s,o){return Ni(n).pipe(ru(a=>this.expandSegmentAgainstRoute(t,e,n,a,r,s,o).pipe(Wc(c=>{if(c instanceof SM)return ht(null);throw c}))),iu(a=>!!a),Wc((a,l)=>{if(bI(a))return k3(e,r,s)?ht(new Tn([],{})):Vy(e);throw a}))}expandSegmentAgainstRoute(t,e,n,r,s,o,a){return R3(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):Vy(e):Vy(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("/")?O3(s):this.lineralizeSegments(n,s).pipe(ir(o=>{const a=new Tn(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:d}=wI(e,r,s);if(!a)return Vy(e);const h=this.applyRedirectCommands(l,r.redirectTo,d);return r.redirectTo.startsWith("/")?O3(h):this.lineralizeSegments(r,h).pipe(ir(p=>this.expandSegment(t,e,n,p.concat(c),o,!1)))}matchSegmentAgainstRoute(t,e,n,r,s){return"**"===n.path?(t=E3(n,t),n.loadChildren?(n._loadedRoutes?ht({routes:n._loadedRoutes,injector:n._loadedInjector}):this.configLoader.loadChildren(t,n)).pipe(et(a=>(n._loadedRoutes=a.routes,n._loadedInjector=a.injector,new Tn(r,{})))):ht(new Tn(r,{}))):I3(e,n,r,t).pipe(Rs(({matched:o,consumedSegments:a,remainingSegments:l})=>o?this.getChildConfig(t=n._injector??t,n,r).pipe(ir(d=>{const h=d.injector??t,p=d.routes,{segmentGroup:m,slicedSegments:g}=wM(e,a,l,p),b=new Tn(m.segments,m.children);if(0===g.length&&b.hasChildren())return this.expandChildren(h,p,b).pipe(et(x=>new Tn(a,x)));if(0===p.length&&0===g.length)return ht(new Tn(a,{}));const v=Da(n)===s;return this.expandSegment(h,b,p,g,v?_n:s,!0).pipe(et(M=>new Tn(a.concat(M.segments),M.children)))})):Vy(e)))}getChildConfig(t,e,n){return e.children?ht({routes:e.children,injector:t}):e.loadChildren?void 0!==e._loadedRoutes?ht({routes:e._loadedRoutes,injector:e._loadedInjector}):function bX(i,t,e,n){const r=t.canLoad;return void 0===r||0===r.length?ht(!0):ht(r.map(o=>{const a=xm(o,i);return ou(function oX(i){return i&&Uy(i.canLoad)}(a)?a.canLoad(t,e):i.runInContext(()=>a(t,e)))})).pipe(wm(),T3())}(t,e,n).pipe(ir(r=>r?this.configLoader.loadChildren(t,e).pipe(Vi(s=>{e._loadedRoutes=s.routes,e._loadedInjector=s.injector})):function AX(i){return pm(w3(CM,3))}())):ht({routes:[],injector:t})}lineralizeSegments(t,e){let n=[],r=e.root;for(;;){if(n=n.concat(r.segments),0===r.numberOfChildren)return ht(n);if(r.numberOfChildren>1||!r.children[_n])return t.redirectTo,pm(new pe(4e3,CM));r=r.children[_n]}}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 au(s,this.createQueryParams(e.queryParams,this.urlTree.queryParams),e.fragment)}createQueryParams(t,e){const n={};return os(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 os(e.children,(a,l)=>{o[l]=this.createSegmentGroup(t,a,n,r)}),new Tn(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 pe(4001,CM);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 RX{}class OX{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=wM(this.urlTree.root,[],[],this.config.filter(e=>void 0===e.redirectTo)).segmentGroup;return this.processSegmentGroup(this.injector,this.config,t,_n).pipe(et(e=>{if(null===e)return null;const n=new vM([],Object.freeze({}),Object.freeze({...this.urlTree.queryParams}),this.urlTree.fragment,{},_n,this.rootComponentType,null,this.urlTree.root,-1,{}),r=new jc(n,e),s=new y3(this.url,r);return this.inheritParamsAndData(s._root),s}))}inheritParamsAndData(t){const e=t.value,n=v3(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 Ni(Object.keys(n.children)).pipe(ru(r=>{const s=n.children[r],o=A3(e,r);return this.processSegmentGroup(t,o,s,r)}),tI((r,s)=>r&&s?(r.push(...s),r):null),jB(r=>null!==r),lM(null),WB(),et(r=>{if(null===r)return null;const s=L3(r);return function FX(i){i.sort((t,e)=>t.value.outlet===_n?-1:e.value.outlet===_n?1:t.value.outlet.localeCompare(e.value.outlet))}(s),s}))}processSegment(t,e,n,r,s){return Ni(e).pipe(ru(o=>this.processSegmentAgainstRoute(o._injector??t,o,n,r,s)),iu(o=>!!o),Wc(o=>{if(bI(o))return k3(n,r,s)?ht([]):ht(null);throw o}))}processSegmentAgainstRoute(t,e,n,r,s){if(e.redirectTo||!R3(e,n,r,s))return ht(null);let o;if("**"===e.path){const a=r.length>0?KB(r).parameters:{},l=B3(n)+r.length;o=ht({snapshot:new vM(r,a,Object.freeze({...this.urlTree.queryParams}),this.urlTree.fragment,U3(e),Da(e),e.component??e._loadedComponent??null,e,N3(n),l,V3(e)),consumedSegments:[],remainingSegments:[]})}else o=I3(n,e,r,t).pipe(et(({matched:a,consumedSegments:l,remainingSegments:c,parameters:d})=>{if(!a)return null;const h=B3(n)+l.length;return{snapshot:new vM(l,d,Object.freeze({...this.urlTree.queryParams}),this.urlTree.fragment,U3(e),Da(e),e.component??e._loadedComponent??null,e,N3(n),h,V3(e)),consumedSegments:l,remainingSegments:c}}));return o.pipe(Rs(a=>{if(null===a)return ht(null);const{snapshot:l,consumedSegments:c,remainingSegments:d}=a;t=e._injector??t;const h=e._loadedInjector??t,p=function LX(i){return i.children?i.children:i.loadChildren?i._loadedRoutes:[]}(e),{segmentGroup:m,slicedSegments:g}=wM(n,c,d,p.filter(v=>void 0===v.redirectTo));if(0===g.length&&m.hasChildren())return this.processChildren(h,p,m).pipe(et(v=>null===v?null:[new jc(l,v)]));if(0===p.length&&0===g.length)return ht([new jc(l,[])]);const b=Da(e)===s;return this.processSegment(h,p,m,g,b?_n:s).pipe(et(v=>null===v?null:[new jc(l,v)]))}))}}function NX(i){const t=i.value.routeConfig;return t&&""===t.path&&void 0===t.redirectTo}function L3(i){const t=[],e=new Set;for(const n of i){if(!NX(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=L3(n.children);t.push(new jc(n.value,r))}return t.filter(n=>!e.has(n))}function N3(i){let t=i;for(;t._sourceSegment;)t=t._sourceSegment;return t}function B3(i){let t=i,e=t._segmentIndexShift??0;for(;t._sourceSegment;)t=t._sourceSegment,e+=t._segmentIndexShift??0;return e-1}function U3(i){return i.data||{}}function V3(i){return i.resolve||{}}function z3(i){return"string"==typeof i.title||null===i.title}function MI(i){return Rs(t=>{const e=i(t);return e?Ni(e).pipe(et(()=>t)):ht(t)})}const Mm=new me("ROUTES");let CI=(()=>{class i{constructor(){this.componentLoaders=new WeakMap,this.childrenLoaders=new WeakMap,this.compiler=Ft(mN)}loadComponent(e){if(this.componentLoaders.get(e))return this.componentLoaders.get(e);if(e._loadedComponent)return ht(e._loadedComponent);this.onLoadStartListener&&this.onLoadStartListener(e);const n=ou(e.loadComponent()).pipe(et(G3),Vi(s=>{this.onLoadEndListener&&this.onLoadEndListener(e),e._loadedComponent=s}),su(()=>{this.componentLoaders.delete(e)})),r=new GB(n,()=>new Re).pipe(eI());return this.componentLoaders.set(e,r),r}loadChildren(e,n){if(this.childrenLoaders.get(n))return this.childrenLoaders.get(n);if(n._loadedRoutes)return ht({routes:n._loadedRoutes,injector:n._loadedInjector});this.onLoadStartListener&&this.onLoadStartListener(n);const s=this.loadModuleFactoryOrRoutes(n.loadChildren).pipe(et(a=>{this.onLoadEndListener&&this.onLoadEndListener(n);let l,c,d=!1;Array.isArray(a)?c=a:(l=a.create(e).injector,c=XB(l.get(Mm,[],Ot.Self|Ot.Optional)));return{routes:c.map(yI),injector:l}}),su(()=>{this.childrenLoaders.delete(n)})),o=new GB(s,()=>new Re).pipe(eI());return this.childrenLoaders.set(n,o),o}loadModuleFactoryOrRoutes(e){return ou(e()).pipe(et(G3),ir(n=>n instanceof D2||Array.isArray(n)?ht(n):Ni(this.compiler.compileModuleAsync(n))))}}return i.\u0275fac=function(e){return new(e||i)},i.\u0275prov=ke({token:i,factory:i.\u0275fac,providedIn:"root"}),i})();function G3(i){return function WX(i){return i&&"object"==typeof i&&"default"in i}(i)?i.default:i}let AM=(()=>{class i{get hasRequestedNavigation(){return 0!==this.navigationId}constructor(){this.currentNavigation=null,this.lastSuccessfulNavigation=null,this.events=new Re,this.configLoader=Ft(CI),this.environmentInjector=Ft(to),this.urlSerializer=Ft(Ty),this.rootContexts=Ft(Fy),this.navigationId=0,this.afterPreactivation=()=>ht(void 0),this.rootComponentType=null,this.configLoader.onLoadEndListener=r=>this.events.next(new kq(r)),this.configLoader.onLoadStartListener=r=>this.events.next(new Rq(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 gt({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:Py,restoredState:null,currentSnapshot:e.routerState.snapshot,targetSnapshot:null,currentRouterState:e.routerState,targetRouterState:null,guards:{canActivateChecks:[],canDeactivateChecks:[]},guardsResult:null}),this.transitions.pipe(gn(n=>0!==n.id),et(n=>({...n,extractedUrl:e.urlHandlingStrategy.extract(n.rawUrl)})),Rs(n=>{let r=!1,s=!1;return ht(n).pipe(Vi(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}}),Rs(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 d="";return this.events.next(new _M(o.id,e.serializeUrl(n.rawUrl),d,0)),e.rawUrlTree=o.rawUrl,o.resolve(null),po}if(e.urlHandlingStrategy.shouldProcessUrl(o.rawUrl))return $3(o.source)&&(e.browserUrlTree=o.extractedUrl),ht(o).pipe(Rs(d=>{const h=this.transitions?.getValue();return this.events.next(new cI(d.id,this.urlSerializer.serialize(d.extractedUrl),d.source,d.restoredState)),h!==this.transitions?.getValue()?po:Promise.resolve(d)}),function IX(i,t,e,n){return Rs(r=>function DX(i,t,e,n,r){return new TX(i,t,e,n,r).apply()}(i,t,e,r.extractedUrl,n).pipe(et(s=>({...r,urlAfterRedirects:s}))))}(this.environmentInjector,this.configLoader,this.urlSerializer,e.config),Vi(d=>{this.currentNavigation={...this.currentNavigation,finalUrl:d.urlAfterRedirects},n.urlAfterRedirects=d.urlAfterRedirects}),function UX(i,t,e,n,r){return ir(s=>function PX(i,t,e,n,r,s,o="emptyOnly"){return new OX(i,t,e,n,r,o,s).recognize().pipe(Rs(a=>null===a?function kX(i){return new In(t=>t.error(i))}(new RX):ht(a)))}(i,t,e,s.urlAfterRedirects,n.serialize(s.urlAfterRedirects),n,r).pipe(et(o=>({...s,targetSnapshot:o}))))}(this.environmentInjector,this.rootComponentType,e.config,this.urlSerializer,e.paramsInheritanceStrategy),Vi(d=>{if(n.targetSnapshot=d.targetSnapshot,"eager"===e.urlUpdateStrategy){if(!d.extras.skipLocationChange){const p=e.urlHandlingStrategy.merge(d.urlAfterRedirects,d.rawUrl);e.setBrowserUrl(p,d)}e.browserUrlTree=d.urlAfterRedirects}const h=new Eq(d.id,this.urlSerializer.serialize(d.extractedUrl),this.urlSerializer.serialize(d.urlAfterRedirects),d.targetSnapshot);this.events.next(h)}));if(l&&e.urlHandlingStrategy.shouldProcessUrl(e.rawUrlTree)){const{id:d,extractedUrl:h,source:p,restoredState:m,extras:g}=o,b=new cI(d,this.urlSerializer.serialize(h),p,m);this.events.next(b);const v=_3(h,this.rootComponentType).snapshot;return ht(n={...o,targetSnapshot:v,urlAfterRedirects:h,extras:{...g,skipLocationChange:!1,replaceUrl:!1}})}{const d="";return this.events.next(new _M(o.id,e.serializeUrl(n.extractedUrl),d,1)),e.rawUrlTree=o.rawUrl,o.resolve(null),po}}),Vi(o=>{const a=new Aq(o.id,this.urlSerializer.serialize(o.extractedUrl),this.urlSerializer.serialize(o.urlAfterRedirects),o.targetSnapshot);this.events.next(a)}),et(o=>n={...o,guards:tX(o.targetSnapshot,o.currentSnapshot,this.rootContexts)}),function hX(i,t){return ir(e=>{const{targetSnapshot:n,currentSnapshot:r,guards:{canActivateChecks:s,canDeactivateChecks:o}}=e;return 0===o.length&&0===s.length?ht({...e,guardsResult:!0}):function fX(i,t,e,n){return Ni(i).pipe(ir(r=>function yX(i,t,e,n,r){const s=t&&t.routeConfig?t.routeConfig.canDeactivate:null;return s&&0!==s.length?ht(s.map(a=>{const l=Ly(t)??r,c=xm(a,l);return ou(function cX(i){return i&&Uy(i.canDeactivate)}(c)?c.canDeactivate(i,t,e,n):l.runInContext(()=>c(i,t,e,n))).pipe(iu())})).pipe(wm()):ht(!0)}(r.component,r.route,e,t,n)),iu(r=>!0!==r,!0))}(o,n,r,i).pipe(ir(a=>a&&function sX(i){return"boolean"==typeof i}(a)?function pX(i,t,e,n){return Ni(t).pipe(ru(r=>Sy(function gX(i,t){return null!==i&&t&&t(new Pq(i)),ht(!0)}(r.route.parent,n),function mX(i,t){return null!==i&&t&&t(new Fq(i)),ht(!0)}(r.route,n),function vX(i,t,e){const n=t[t.length-1],s=t.slice(0,t.length-1).reverse().map(o=>function nX(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=>Ey(()=>ht(o.guards.map(l=>{const c=Ly(o.node)??e,d=xm(l,c);return ou(function lX(i){return i&&Uy(i.canActivateChild)}(d)?d.canActivateChild(n,i):c.runInContext(()=>d(n,i))).pipe(iu())})).pipe(wm())));return ht(s).pipe(wm())}(i,r.path,e),function _X(i,t,e){const n=t.routeConfig?t.routeConfig.canActivate:null;if(!n||0===n.length)return ht(!0);const r=n.map(s=>Ey(()=>{const o=Ly(t)??e,a=xm(s,o);return ou(function aX(i){return i&&Uy(i.canActivate)}(a)?a.canActivate(t,i):o.runInContext(()=>a(t,i))).pipe(iu())}));return ht(r).pipe(wm())}(i,r.route,e))),iu(r=>!0!==r,!0))}(n,s,i,t):ht(a)),et(a=>({...e,guardsResult:a})))})}(this.environmentInjector,o=>this.events.next(o)),Vi(o=>{if(n.guardsResult=o.guardsResult,kh(o.guardsResult))throw x3(0,o.guardsResult);const a=new Dq(o.id,this.urlSerializer.serialize(o.extractedUrl),this.urlSerializer.serialize(o.urlAfterRedirects),o.targetSnapshot,!!o.guardsResult);this.events.next(a)}),gn(o=>!!o.guardsResult||(e.restoreHistory(o),this.cancelNavigationTransition(o,"",3),!1)),MI(o=>{if(o.guards.canActivateChecks.length)return ht(o).pipe(Vi(a=>{const l=new Tq(a.id,this.urlSerializer.serialize(a.extractedUrl),this.urlSerializer.serialize(a.urlAfterRedirects),a.targetSnapshot);this.events.next(l)}),Rs(a=>{let l=!1;return ht(a).pipe(function VX(i,t){return ir(e=>{const{targetSnapshot:n,guards:{canActivateChecks:r}}=e;if(!r.length)return ht(e);let s=0;return Ni(r).pipe(ru(o=>function zX(i,t,e,n){const r=i.routeConfig,s=i._resolve;return void 0!==r?.title&&!z3(r)&&(s[Ay]=r.title),function HX(i,t,e,n){const r=function GX(i){return[...Object.keys(i),...Object.getOwnPropertySymbols(i)]}(i);if(0===r.length)return ht({});const s={};return Ni(r).pipe(ir(o=>function $X(i,t,e,n){const r=Ly(t)??n,s=xm(i,r);return ou(s.resolve?s.resolve(t,e):r.runInContext(()=>s(t,e)))}(i[o],t,e,n).pipe(iu(),Vi(a=>{s[o]=a}))),nI(1),YB(s),Wc(o=>bI(o)?po:pm(o)))}(s,i,t,n).pipe(et(o=>(i._resolvedData=o,i.data=v3(i,e).resolve,r&&z3(r)&&(i.data[Ay]=r.title),null)))}(o.route,n,i,t)),Vi(()=>s++),nI(1),ir(o=>s===r.length?ht(e):po))})}(e.paramsInheritanceStrategy,this.environmentInjector),Vi({next:()=>l=!0,complete:()=>{l||(e.restoreHistory(a),this.cancelNavigationTransition(a,"",2))}}))}),Vi(a=>{const l=new Iq(a.id,this.urlSerializer.serialize(a.extractedUrl),this.urlSerializer.serialize(a.urlAfterRedirects),a.targetSnapshot);this.events.next(l)}))}),MI(o=>{const a=l=>{const c=[];l.routeConfig?.loadComponent&&!l.routeConfig._loadedComponent&&c.push(this.configLoader.loadComponent(l.routeConfig).pipe(Vi(d=>{l.component=d}),et(()=>{})));for(const d of l.children)c.push(...a(d));return c};return nu(a(o.targetSnapshot.root)).pipe(lM(),Oi(1))}),MI(()=>this.afterPreactivation()),et(o=>{const a=function $q(i,t,e){const n=Oy(i,t._root,e?e._root:void 0);return new g3(n,t)}(e.routeReuseStrategy,o.targetSnapshot,o.currentRouterState);return n={...o,targetRouterState:a}}),Vi(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)=>et(n=>(new eX(t,n.targetRouterState,n.currentRouterState,e).activate(i),n)))(this.rootContexts,e.routeReuseStrategy,o=>this.events.next(o)),Oi(1),Vi({next:o=>{r=!0,this.lastSuccessfulNavigation=this.currentNavigation,e.navigated=!0,this.events.next(new Ph(o.id,this.urlSerializer.serialize(o.extractedUrl),this.urlSerializer.serialize(e.currentUrlTree))),e.titleStrategy?.updateTitle(o.targetRouterState.snapshot),o.resolve(!0)},complete:()=>{r=!0}}),su(()=>{r||s||this.cancelNavigationTransition(n,"",1),this.currentNavigation?.id===n.id&&(this.currentNavigation=null)}),Wc(o=>{if(s=!0,C3(o)){M3(o)||(e.navigated=!0,e.restoreHistory(n,!0));const a=new gM(n.id,this.urlSerializer.serialize(n.extractedUrl),o.message,o.cancellationCode);if(this.events.next(a),M3(o)){const l=e.urlHandlingStrategy.merge(o.url,e.rawUrlTree),c={skipLocationChange:n.extras.skipLocationChange,replaceUrl:"eager"===e.urlUpdateStrategy||$3(n.source)};e.scheduleNavigation(l,Py,null,c,{resolve:n.resolve,reject:n.reject,promise:n.promise})}else n.resolve(!1)}else{e.restoreHistory(n,!0);const a=new dI(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 po}))}))}cancelNavigationTransition(e,n,r){const s=new gM(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=ke({token:i,factory:i.\u0275fac,providedIn:"root"}),i})();function $3(i){return i!==Py}let W3=(()=>{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===_n);return n}getResolvedTitleForRoute(e){return e.data[Ay]}}return i.\u0275fac=function(e){return new(e||i)},i.\u0275prov=ke({token:i,factory:function(){return Ft(jX)},providedIn:"root"}),i})(),jX=(()=>{class i extends W3{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)(ee(LB))},i.\u0275prov=ke({token:i,factory:i.\u0275fac,providedIn:"root"}),i})(),YX=(()=>{class i{}return i.\u0275fac=function(e){return new(e||i)},i.\u0275prov=ke({token:i,factory:function(){return Ft(XX)},providedIn:"root"}),i})();class qX{shouldDetach(t){return!1}store(t,e){}shouldAttach(t){return!1}retrieve(t){return null}shouldReuseRoute(t,e){return t.routeConfig===e.routeConfig}}let XX=(()=>{class i extends qX{}return i.\u0275fac=function(){let t;return function(n){return(t||(t=ri(i)))(n||i)}}(),i.\u0275prov=ke({token:i,factory:i.\u0275fac,providedIn:"root"}),i})();const DM=new me("",{providedIn:"root",factory:()=>({})});let ZX=(()=>{class i{}return i.\u0275fac=function(e){return new(e||i)},i.\u0275prov=ke({token:i,factory:function(){return Ft(QX)},providedIn:"root"}),i})(),QX=(()=>{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=ke({token:i,factory:i.\u0275fac,providedIn:"root"}),i})();function JX(i){throw i}function eK(i,t,e){return t.parse("/")}const tK={paths:"exact",fragment:"ignored",matrixParams:"ignored",queryParams:"exact"},nK={paths:"subset",fragment:"ignored",matrixParams:"ignored",queryParams:"subset"};let Yo=(()=>{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=Ft(L6),this.isNgZoneEnabled=!1,this.options=Ft(DM,{optional:!0})||{},this.errorHandler=this.options.errorHandler||JX,this.malformedUriErrorHandler=this.options.malformedUriErrorHandler||eK,this.navigated=!1,this.lastSuccessfulId=-1,this.urlHandlingStrategy=Ft(ZX),this.routeReuseStrategy=Ft(YX),this.urlCreationStrategy=Ft(zq),this.titleStrategy=Ft(W3),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=XB(Ft(Mm,{optional:!0})??[]),this.navigationTransitions=Ft(AM),this.urlSerializer=Ft(Ty),this.location=Ft(_y),this.isNgZoneEnabled=Ft(ft)instanceof ft&&ft.isInAngularZone(),this.resetConfig(this.config),this.currentUrlTree=new au,this.rawUrlTree=this.currentUrlTree,this.browserUrlTree=this.currentUrlTree,this.routerState=_3(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),Py,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(yI),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 d=null;switch(a){case"merge":d={...this.currentUrlTree.queryParams,...s};break;case"preserve":d=this.currentUrlTree.queryParams;break;default:d=s||null}return null!==d&&(d=this.removeEmptyProps(d)),this.urlCreationStrategy.createUrlTree(r,this.routerState,this.currentUrlTree,e,d,c??null)}navigateByUrl(e,n={skipLocationChange:!1}){const r=kh(e)?e:this.parseUrl(e),s=this.urlHandlingStrategy.merge(r,this.rawUrlTree);return this.scheduleNavigation(s,Py,null,n)}navigate(e,n={skipLocationChange:!1}){return function iK(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,d;return o?(a=o.resolve,l=o.reject,c=o.promise):c=new Promise((h,p)=>{a=h,l=p}),d="computed"===this.canceledNavigationResolution?r&&r.\u0275routerPageId?r.\u0275routerPageId:(this.browserPageId??0)+1:0,this.navigationTransitions.handleNavigationRequest({targetPageId:d,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=ke({token:i,factory:i.\u0275fac,providedIn:"root"}),i})();class j3{}let oK=(()=>{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(gn(e=>e instanceof Ph),ru(()=>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=Fw(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 Ni(r).pipe(yd())}preloadConfig(e,n){return this.preloadingStrategy.preload(n,()=>{let r;r=n.loadChildren&&void 0===n.canLoad?this.loader.loadChildren(e,n):ht(null);const s=r.pipe(ir(o=>null===o?ht(void 0):(n._loadedRoutes=o.routes,n._loadedInjector=o.injector,this.processRoutes(o.injector??e,o.routes))));return n.loadComponent&&!n._loadedComponent?Ni([s,this.loader.loadComponent(n)]).pipe(yd()):s})}}return i.\u0275fac=function(e){return new(e||i)(ee(Yo),ee(mN),ee(to),ee(j3),ee(CI))},i.\u0275prov=ke({token:i,factory:i.\u0275fac,providedIn:"root"}),i})();const AI=new me("");let Y3=(()=>{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 cI?(this.store[this.lastId]=this.viewportScroller.getScrollPosition(),this.lastSource=e.navigationTrigger,this.restoredId=e.restoredState?e.restoredState.navigationId:0):e instanceof Ph&&(this.lastId=e.id,this.scheduleScrollEvent(e,this.urlSerializer.parse(e.urlAfterRedirects).fragment))})}consumeScrollEvents(){return this.transitions.events.subscribe(e=>{e instanceof p3&&(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 p3(e,"popstate"===this.lastSource?this.store[this.restoredId]:null,n))})},0)})}ngOnDestroy(){this.routerEventsSubscription?.unsubscribe(),this.scrollEventsSubscription?.unsubscribe()}}return i.\u0275fac=function(e){xo()},i.\u0275prov=ke({token:i,factory:i.\u0275fac}),i})();var qo=(()=>((qo=qo||{})[qo.COMPLETE=0]="COMPLETE",qo[qo.FAILED=1]="FAILED",qo[qo.REDIRECTING=2]="REDIRECTING",qo))();const Cm=!1;function lu(i,t){return{\u0275kind:i,\u0275providers:t}}const DI=new me("",{providedIn:"root",factory:()=>!1});function X3(){const i=Ft($i);return t=>{const e=i.get(dm);if(t!==e.components[0])return;const n=i.get(Yo),r=i.get(K3);1===i.get(TI)&&n.initialNavigation(),i.get(Z3,null,Ot.Optional)?.setUpPreloading(),i.get(AI,null,Ot.Optional)?.init(),n.resetRootComponentType(e.componentTypes[0]),r.closed||(r.next(),r.complete(),r.unsubscribe())}}const K3=new me(Cm?"bootstrap done indicator":"",{factory:()=>new Re}),TI=new me(Cm?"initial navigation":"",{providedIn:"root",factory:()=>1});function uK(){let i=[];return i=Cm?[{provide:Np,multi:!0,useFactory:()=>{const t=Ft(Yo);return()=>t.events.subscribe(e=>{console.group?.(`Router Event: ${e.constructor.name}`),console.log(function Nq(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?.()})}}]:[],lu(1,i)}const Z3=new me(Cm?"router preloader":"");function hK(i){return lu(0,[{provide:Z3,useExisting:oK},{provide:j3,useExisting:i}])}const zy=!1,Q3=new me(zy?"router duplicate forRoot guard":"ROUTER_FORROOT_GUARD"),fK=[_y,{provide:Ty,useClass:iI},Yo,Fy,{provide:bm,useFactory:function q3(i){return i.routerState.root},deps:[Yo]},CI,zy?{provide:DI,useValue:!0}:[]];function pK(){return new MN("Router",Yo)}let J3=(()=>{class i{constructor(e){}static forRoot(e,n){return{ngModule:i,providers:[fK,zy&&n?.enableTracing?uK().\u0275providers:[],{provide:Mm,multi:!0,useValue:e},{provide:Q3,useFactory:vK,deps:[[Yo,new Ss,new xa]]},{provide:DM,useValue:n||{}},n?.useHash?{provide:Ih,useClass:C9}:{provide:Ih,useClass:jN},{provide:AI,useFactory:()=>{const i=Ft(UY),t=Ft(ft),e=Ft(DM),n=Ft(AM),r=Ft(Ty);return e.scrollOffset&&i.setOffset(e.scrollOffset),new Y3(r,n,i,t,e)}},n?.preloadingStrategy?hK(n.preloadingStrategy).\u0275providers:[],{provide:MN,multi:!0,useFactory:pK},n?.initialNavigation?yK(n):[],[{provide:eU,useFactory:X3},{provide:wN,multi:!0,useExisting:eU}]]}}static forChild(e){return{ngModule:i,providers:[{provide:Mm,multi:!0,useValue:e}]}}}return i.\u0275fac=function(e){return new(e||i)(ee(Q3,8))},i.\u0275mod=nn({type:i}),i.\u0275inj=Kt({imports:[_I]}),i})();function vK(i){if(zy&&i)throw new pe(4007,"The Router was provided more than once. This can happen if 'forRoot' is used outside of the root injector. Lazy loaded modules should use RouterModule.forChild() instead.");return"guarded"}function yK(i){return["disabled"===i.initialNavigation?lu(3,[{provide:Uw,multi:!0,useFactory:()=>{const t=Ft(Yo);return()=>{t.setUpLocationChangeListener()}}},{provide:TI,useValue:2}]).\u0275providers:[],"enabledBlocking"===i.initialNavigation?lu(2,[{provide:TI,useValue:0},{provide:Uw,multi:!0,deps:[$i],useFactory:t=>{const e=t.get(w9,Promise.resolve());return()=>e.then(()=>new Promise(n=>{const r=t.get(Yo),s=t.get(K3);(function aK(i,t){i.events.pipe(gn(e=>e instanceof Ph||e instanceof gM||e instanceof dI||e instanceof _M),et(e=>e instanceof Ph||e instanceof _M?qo.COMPLETE:e instanceof gM&&(0===e.code||1===e.code)?qo.REDIRECTING:qo.FAILED),gn(e=>e!==qo.REDIRECTING),Oi(1)).subscribe(()=>{t()})})(r,()=>{n(!0)}),t.get(AM).afterPreactivation=()=>(n(!0),s.closed?ht(void 0):s),r.initialNavigation()}))}}]).\u0275providers:[]]}const eU=new me(zy?"Router Initializer":""),xK=[];let wK=(()=>{class i{}return i.\u0275fac=function(e){return new(e||i)},i.\u0275mod=nn({type:i}),i.\u0275inj=Kt({imports:[J3.forRoot(xK),J3]}),i})();function tU(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 tt(i){return function(){var t=this,e=arguments;return new Promise(function(n,r){var s=i.apply(t,e);function o(l){tU(s,n,r,o,a,"next",l)}function a(l){tU(s,n,r,o,a,"throw",l)}o(void 0)})}}function Jt(i){return null!=i&&"false"!=`${i}`}function ks(i,t=0){return function MK(i){return!isNaN(parseFloat(i))&&!isNaN(Number(i))}(i)?Number(i):t}function TM(i){return Array.isArray(i)?i:[i]}function gr(i){return null==i?"":"string"==typeof i?i:`${i}px`}function Yc(i){return i instanceof mt?i.nativeElement:i}const CK=["addListener","removeListener"],SK=["addEventListener","removeEventListener"],EK=["on","off"];function Ta(i,t,e,n){if(cn(e)&&(n=e,e=void 0),n)return Ta(i,t,e).pipe(JT(n));const[r,s]=function TK(i){return cn(i.addEventListener)&&cn(i.removeEventListener)}(i)?SK.map(o=>a=>i[o](t,a,e)):function AK(i){return cn(i.addListener)&&cn(i.removeListener)}(i)?CK.map(nU(i,t)):function DK(i){return cn(i.on)&&cn(i.off)}(i)?EK.map(nU(i,t)):[];if(!r&&i_(i))return ir(o=>Ta(o,t,e))(wr(i));if(!r)throw new TypeError("Invalid event target");return new In(o=>{const a=(...l)=>o.next(1s(a)})}function nU(i,t){return e=>n=>i[e](t,n)}class IK extends Zt{constructor(t,e){super()}schedule(t,e=0){return this}}const IM={setInterval(i,t,...e){const{delegate:n}=IM;return n?.setInterval?n.setInterval(i,t,...e):setInterval(i,t,...e)},clearInterval(i){const{delegate:t}=IM;return(t?.clearInterval||clearInterval)(i)},delegate:void 0};class II extends IK{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 IM.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&&IM.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,Kr(n,this),null!=t&&(this.id=this.recycleAsyncId(e,t,null)),this.delay=null,super.unsubscribe()}}}const Hy={schedule(i){let t=requestAnimationFrame,e=cancelAnimationFrame;const{delegate:n}=Hy;n&&(t=n.requestAnimationFrame,e=n.cancelAnimationFrame);const r=t(s=>{e=void 0,i(s)});return new Zt(()=>e?.(r))},requestAnimationFrame(...i){const{delegate:t}=Hy;return(t?.requestAnimationFrame||requestAnimationFrame)(...i)},cancelAnimationFrame(...i){const{delegate:t}=Hy;return(t?.cancelAnimationFrame||cancelAnimationFrame)(...i)},delegate:void 0},iU={now:()=>(iU.delegate||Date).now(),delegate:void 0};class Gy{constructor(t,e=Gy.now){this.schedulerActionCtor=t,this.now=e}schedule(t,e=0,n){return new this.schedulerActionCtor(this,t).schedule(n,e)}}Gy.now=iU.now;class RI extends Gy{constructor(t,e=Gy.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 PK=new class kK extends RI{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 RK extends II{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=Hy.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&&(Hy.cancelAnimationFrame(e),t._scheduled=void 0)}});let kI,OK=1;const RM={};function rU(i){return i in RM&&(delete RM[i],!0)}const FK={setImmediate(i){const t=OK++;return RM[t]=!0,kI||(kI=Promise.resolve()),kI.then(()=>rU(t)&&i()),t},clearImmediate(i){rU(i)}},{setImmediate:LK,clearImmediate:NK}=FK,kM={setImmediate(...i){const{delegate:t}=kM;return(t?.setImmediate||LK)(...i)},clearImmediate(i){const{delegate:t}=kM;return(t?.clearImmediate||NK)(i)},delegate:void 0},PI=new class UK extends RI{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 BK extends II{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=kM.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&&(kM.clearImmediate(e),t._scheduled===e&&(t._scheduled=void 0))}}),$y=new RI(II),VK=$y;function OI(i=0,t,e=VK){let n=-1;return null!=t&&(Gu(t)?e=t:n=t),new In(r=>{let s=function HK(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 PM(i,t=$y){return function zK(i){return ti((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(Yn(e,c=>{n=!0,r=c,s||wr(i(c)).subscribe(s=Yn(e,a,l))},()=>{o=!0,(!n||!s||s.closed)&&e.complete()}))})}(()=>OI(i,t))}function He(i){return ti((t,e)=>{wr(i).subscribe(Yn(e,()=>e.complete(),ms)),!e.closed&&t.subscribe(e)})}let FI;try{FI=typeof Intl<"u"&&Intl.v8BreakIterator}catch{FI=!1}let Sm,zi=(()=>{class i{constructor(e){this._platformId=e,this.isBrowser=this._platformId?function BY(i){return i===hB}(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&&!FI)&&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)(ee(fT))},i.\u0275prov=ke({token:i,factory:i.\u0275fac,providedIn:"root"}),i})();const sU=["color","button","checkbox","date","datetime-local","email","file","hidden","image","month","number","password","radio","range","reset","search","submit","tel","text","time","url","week"];function oU(){if(Sm)return Sm;if("object"!=typeof document||!document)return Sm=new Set(sU),Sm;let i=document.createElement("input");return Sm=new Set(sU.filter(t=>(i.setAttribute("type",t),i.type===t))),Sm}let Wy,OM,Fh,LI;function Oh(i){return function GK(){if(null==Wy&&typeof window<"u")try{window.addEventListener("test",null,Object.defineProperty({},"passive",{get:()=>Wy=!0}))}finally{Wy=Wy||!1}return Wy}()?i:!!i.capture}function aU(){if(null==Fh){if("object"!=typeof document||!document||"function"!=typeof Element||!Element)return Fh=!1,Fh;if("scrollBehavior"in document.documentElement.style)Fh=!0;else{const i=Element.prototype.scrollTo;Fh=!!i&&!/\{\s*\[native code\]\s*\}/.test(i.toString())}}return Fh}function jy(){if("object"!=typeof document||!document)return 0;if(null==OM){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),OM=0,0===i.scrollLeft&&(i.scrollLeft=1,OM=0===i.scrollLeft?1:2),i.remove()}return OM}function FM(){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 cu(i){return i.composedPath?i.composedPath()[0]:i.target}function NI(){return typeof __karma__<"u"&&!!__karma__||typeof jasmine<"u"&&!!jasmine||typeof jest<"u"&&!!jest||typeof Mocha<"u"&&!!Mocha}const jK=new me("cdk-dir-doc",{providedIn:"root",factory:function YK(){return Ft(jt)}}),qK=/^(ar|ckb|dv|he|iw|fa|nqo|ps|sd|ug|ur|yi|.*[-_](Adlm|Arab|Hebr|Nkoo|Rohg|Thaa))(?!.*[-_](Latn|Cyrl)($|-|_))($|-|_)/i;let Ia=(()=>{class i{constructor(e){this.value="ltr",this.change=new We,e&&(this.value=function XK(i){const t=i?.toLowerCase()||"";return"auto"===t&&typeof navigator<"u"&&navigator?.language?qK.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)(ee(jK,8))},i.\u0275prov=ke({token:i,factory:i.\u0275fac,providedIn:"root"}),i})(),Yy=(()=>{class i{}return i.\u0275fac=function(e){return new(e||i)},i.\u0275mod=nn({type:i}),i.\u0275inj=Kt({}),i})();const KK=["contentWrapper"],ZK=["*"],QK=new me("VIRTUAL_SCROLL_STRATEGY");let qy=(()=>{class i{constructor(e,n,r){this._ngZone=e,this._platform=n,this._scrolled=new Re,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 In(n=>{this._globalSubscription||this._addGlobalListener();const r=e>0?this._scrolled.pipe(PM(e)).subscribe(n):this._scrolled.subscribe(n);return this._scrolledCount++,()=>{r.unsubscribe(),this._scrolledCount--,this._scrolledCount||this._removeGlobalListener()}}):ht()}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(gn(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=Yc(n),s=e.getElementRef().nativeElement;do{if(r==s)return!0}while(r=r.parentElement);return!1}_addGlobalListener(){this._globalSubscription=this._ngZone.runOutsideAngular(()=>Ta(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)(ee(ft),ee(zi),ee(jt,8))},i.\u0275prov=ke({token:i,factory:i.\u0275fac,providedIn:"root"}),i})(),lU=(()=>{class i{constructor(e,n,r,s){this.elementRef=e,this.scrollDispatcher=n,this.ngZone=r,this.dir=s,this._destroyed=new Re,this._elementScrolled=new In(o=>this.ngZone.runOutsideAngular(()=>Ta(this.elementRef.nativeElement,"scroll").pipe(He(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!=jy()?(null!=e.left&&(e.right=n.scrollWidth-n.clientWidth-e.left),2==jy()?e.left=e.right:1==jy()&&(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;aU()?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==jy()?e==n?s.scrollWidth-s.clientWidth-s.scrollLeft:s.scrollLeft:o&&1==jy()?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)(E(mt),E(qy),E(ft),E(Ia,8))},i.\u0275dir=ve({type:i,selectors:[["","cdk-scrollable",""],["","cdkScrollable",""]],standalone:!0}),i})(),LM=(()=>{class i{constructor(e,n,r){this._platform=e,this._change=new Re,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(PM(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)(ee(zi),ee(ft),ee(jt,8))},i.\u0275prov=ke({token:i,factory:i.\u0275fac,providedIn:"root"}),i})();const cU=new me("VIRTUAL_SCROLLABLE");let tZ=(()=>{class i extends lU{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)(E(mt),E(qy),E(ft),E(Ia,8))},i.\u0275dir=ve({type:i,features:[lt]}),i})();const iZ=typeof requestAnimationFrame<"u"?PK:PI;let rZ=(()=>{class i extends tZ{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=Ft(zi),this._detachedSubject=new Re,this._renderedRangeSubject=new Re,this._orientation="vertical",this._appendOnly=!1,this.scrolledIndexChange=new In(d=>this._scrollStrategy.scrolledIndexChange.subscribe(h=>Promise.resolve().then(()=>this.ngZone.run(()=>d.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=Zt.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(Ao(null),PM(0,iZ)).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(He(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 nZ(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)(E(mt),E(Zn),E(ft),E(QK,8),E(Ia,8),E(qy),E(LM),E(cU,8))},i.\u0275cmp=ot({type:i,selectors:[["cdk-virtual-scroll-viewport"]],viewQuery:function(e,n){if(1&e&&Wn(KK,7),2&e){let r;Et(r=At())&&(n._contentWrapper=r.first)}},hostAttrs:[1,"cdk-virtual-scroll-viewport"],hostVars:4,hostBindings:function(e,n){2&e&&un("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:[Dn([{provide:lU,useFactory:(t,e)=>t||e,deps:[[new Ss,new vo(cU)],i]}]),lt,Z1],ngContentSelectors:ZK,decls:4,vars:4,consts:[[1,"cdk-virtual-scroll-content-wrapper"],["contentWrapper",""],[1,"cdk-virtual-scroll-spacer"]],template:function(e,n){1&e&&(sr(),W(0,"div",0,1),Wt(2),j(),De(3,"div",2)),2&e&&(G(3),jo("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})(),Xy=(()=>{class i{}return i.\u0275fac=function(e){return new(e||i)},i.\u0275mod=nn({type:i}),i.\u0275inj=Kt({}),i})(),dU=(()=>{class i{}return i.\u0275fac=function(e){return new(e||i)},i.\u0275mod=nn({type:i}),i.\u0275inj=Kt({imports:[Yy,Xy,rZ,Yy,Xy]}),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 Lh 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 sZ extends BI{constructor(t){super(),this.element=t instanceof mt?t.nativeElement:t}}class NM{constructor(){this._isDisposed=!1,this.attachDomPortal=null}hasAttached(){return!!this._attachedPortal}attach(t){return t instanceof Lh?(this._attachedPortal=t,this.attachComponentPortal(t)):t instanceof Em?(this._attachedPortal=t,this.attachTemplatePortal(t)):this.attachDomPortal&&t instanceof sZ?(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 oZ extends NM{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||$i.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 NM{constructor(e,n,r){super(),this._componentFactoryResolver=e,this._viewContainerRef=n,this._isInitialized=!1,this.attached=new We,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)(E(Hl),E(Wr),E(jt))},i.\u0275dir=ve({type:i,selectors:[["","cdkPortalOutlet",""]],inputs:{portal:["cdkPortalOutlet","portal"]},outputs:{attached:"attached"},exportAs:["cdkPortalOutlet"],features:[lt]}),i})(),Nh=(()=>{class i{}return i.\u0275fac=function(e){return new(e||i)},i.\u0275mod=nn({type:i}),i.\u0275inj=Kt({}),i})();function Xo(i,...t){return t.length?t.some(e=>i[e]):i.altKey||i.shiftKey||i.ctrlKey||i.metaKey}const uU=aU();class bZ{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=gr(-this._previousScrollPosition.left),t.style.top=gr(-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"),uU&&(n.scrollBehavior=r.scrollBehavior="auto"),window.scroll(this._previousScrollPosition.left,this._previousScrollPosition.top),uU&&(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 xZ{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(gn(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 hU{enable(){}disable(){}attach(){}}function VI(i,t){return t.some(e=>i.bottome.bottom||i.righte.right)}function fU(i,t){return t.some(e=>i.tope.bottom||i.lefte.right)}class wZ{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();VI(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 MZ=(()=>{class i{constructor(e,n,r,s){this._scrollDispatcher=e,this._viewportRuler=n,this._ngZone=r,this.noop=()=>new hU,this.close=o=>new xZ(this._scrollDispatcher,this._ngZone,this._viewportRuler,o),this.block=()=>new bZ(this._viewportRuler,this._document),this.reposition=o=>new wZ(this._scrollDispatcher,this._viewportRuler,this._ngZone,o),this._document=s}}return i.\u0275fac=function(e){return new(e||i)(ee(qy),ee(LM),ee(ft),ee(jt))},i.\u0275prov=ke({token:i,factory:i.\u0275fac,providedIn:"root"}),i})();class km{constructor(t){if(this.scrollStrategy=new hU,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 CZ{constructor(t,e){this.connectionPair=t,this.scrollableViewProperties=e}}let pU=(()=>{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)(ee(jt))},i.\u0275prov=ke({token:i,factory:i.\u0275fac,providedIn:"root"}),i})(),SZ=(()=>{class i extends pU{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)(ee(jt),ee(ft,8))},i.\u0275prov=ke({token:i,factory:i.\u0275fac,providedIn:"root"}),i})(),EZ=(()=>{class i extends pU{constructor(e,n,r){super(e),this._platform=n,this._ngZone=r,this._cursorStyleIsSet=!1,this._pointerDownListener=s=>{this._pointerDownEventTarget=cu(s)},this._clickListener=s=>{const o=cu(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 d=l[c];if(d._outsidePointerEvents.observers.length<1||!d.hasAttached())continue;if(d.overlayElement.contains(o)||d.overlayElement.contains(a))break;const h=d._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)(ee(jt),ee(zi),ee(ft,8))},i.\u0275prov=ke({token:i,factory:i.\u0275fac,providedIn:"root"}),i})(),VM=(()=>{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||NI()){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 Re,this._outsidePointerEvents=new Re,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(Oi(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=gr(this._config.width),t.height=gr(this._config.height),t.minWidth=gr(this._config.minWidth),t.minHeight=gr(this._config.minHeight),t.maxWidth=gr(this._config.maxWidth),t.maxHeight=gr(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=TM(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(He(Mr(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 mU="cdk-overlay-connected-position-bounding-box",AZ=/([A-Za-z%]+)$/;class DZ{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 Re,this._resizeSubscription=Zt.EMPTY,this._offsetX=0,this._offsetY=0,this._appliedPanelClasses=[],this.positionChanges=this._positionChanges,this.setOrigin(t)}attach(t){this._validatePositions(),t.hostElement.classList.add(mU),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),d=this._getOverlayFit(c,e,n,a);if(d.isCompletelyWithinViewport)return this._isPushed=!1,void this._applyPosition(a,l);this._canFitWithFlexibleDimensions(d,c,n)?s.push({position:a,origin:l,overlayRect:e,boundingBoxRect:this._calculateBoundingBoxRect(l,a)}):(!o||o.overlayFit.visibleAreal&&(l=d,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&&Bh(this._boundingBox.style,{top:"",left:"",right:"",bottom:"",height:"",width:"",alignItems:"",justifyContent:""}),this._pane&&this._resetOverlayElementStyles(),this._overlayRef&&this._overlayRef.hostElement.classList.remove(mU),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=_U(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=gU(this._overlayRef.getConfig().minHeight),a=gU(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=_U(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 d=0,h=0;return d=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,d=t.x-this._viewportMargin;else if("start"===e.overlayX&&!r||"end"===e.overlayX&&r)h=t.x,d=n.right-t.x;else{const m=Math.min(n.right-t.x+n.left,t.x),g=this._lastBoundingBoxSize.width;d=2*m,h=t.x-m,d>g&&!this._isInitialRender&&!this._growAfterOpen&&(h=t.x-g/2)}return{top:o,left:h,bottom:a,right:p,width:d,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=gr(n.height),r.top=gr(n.top),r.bottom=gr(n.bottom),r.width=gr(n.width),r.left=gr(n.left),r.right=gr(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=gr(s)),o&&(r.maxWidth=gr(o))}this._lastBoundingBoxSize=n,Bh(this._boundingBox.style,r)}_resetBoundingBoxStyles(){Bh(this._boundingBox.style,{top:"0",left:"0",right:"0",bottom:"0",height:"",width:"",alignItems:"",justifyContent:""})}_resetOverlayElementStyles(){Bh(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 d=this._viewportRuler.getViewportScrollPosition();Bh(n,this._getExactOverlayY(e,t,d)),Bh(n,this._getExactOverlayX(e,t,d))}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=gr(o.maxHeight):s&&(n.maxHeight="")),o.maxWidth&&(r?n.maxWidth=gr(o.maxWidth):s&&(n.maxWidth="")),Bh(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=gr(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=gr(s.x),r}_getScrollVisibility(){const t=this._getOriginRect(),e=this._pane.getBoundingClientRect(),n=this._scrollables.map(r=>r.getElementRef().nativeElement.getBoundingClientRect());return{isOriginClipped:fU(t,n),isOriginOutsideView:VI(t,n),isOverlayClipped:fU(e,n),isOverlayOutsideView:VI(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&&TM(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 mt)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 Bh(i,t){for(let e in t)t.hasOwnProperty(e)&&(i[e]=t[e]);return i}function gU(i){if("number"!=typeof i&&null!=i){const[t,e]=i.split(AZ);return e&&"px"!==e?null:parseFloat(t)}return i||null}function _U(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 vU="cdk-global-overlay-wrapper";class yU{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(vU),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),d=this._xPosition,h=this._xOffset,p="rtl"===this._overlayRef.getConfig().direction;let m="",g="",b="";l?b="flex-start":"center"===d?(b="center",p?g=h:m=h):p?"left"===d||"end"===d?(b="flex-end",m=h):("right"===d||"start"===d)&&(b="flex-start",g=h):"left"===d||"start"===d?(b="flex-start",m=h):("right"===d||"end"===d)&&(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(vU),n.justifyContent=n.alignItems=t.marginTop=t.marginBottom=t.marginLeft=t.marginRight=t.position="",this._overlayRef=null,this._isDisposed=!0}}let TZ=(()=>{class i{constructor(e,n,r,s){this._viewportRuler=e,this._document=n,this._platform=r,this._overlayContainer=s}global(){return new yU}flexibleConnectedTo(e){return new DZ(e,this._viewportRuler,this._document,this._platform,this._overlayContainer)}}return i.\u0275fac=function(e){return new(e||i)(ee(LM),ee(jt),ee(zi),ee(VM))},i.\u0275prov=ke({token:i,factory:i.\u0275fac,providedIn:"root"}),i})(),IZ=0,as=(()=>{class i{constructor(e,n,r,s,o,a,l,c,d,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=d,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 Zy(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-"+IZ++,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(dm)),new oZ(e,this._componentFactoryResolver,this._appRef,this._injector,this._document)}}return i.\u0275fac=function(e){return new(e||i)(ee(MZ),ee(VM),ee(Hl),ee(TZ),ee(SZ),ee($i),ee(ft),ee(jt),ee(Ia),ee(_y),ee(EZ),ee(Rr,8))},i.\u0275prov=ke({token:i,factory:i.\u0275fac,providedIn:"root"}),i})();const RZ=[{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"}],bU=new me("cdk-connected-overlay-scroll-strategy");let zI=(()=>{class i{constructor(e){this.elementRef=e}}return i.\u0275fac=function(e){return new(e||i)(E(mt))},i.\u0275dir=ve({type:i,selectors:[["","cdk-overlay-origin",""],["","overlay-origin",""],["","cdkOverlayOrigin",""]],exportAs:["cdkOverlayOrigin"],standalone:!0}),i})(),xU=(()=>{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=Zt.EMPTY,this._attachSubscription=Zt.EMPTY,this._detachSubscription=Zt.EMPTY,this._positionSubscription=Zt.EMPTY,this.viewportMargin=0,this.open=!1,this.disableClose=!1,this.backdropClick=new We,this.positionChange=new We,this.attach=new We,this.detach=new We,this.overlayKeydown=new We,this.overlayOutsideClick=new We,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=RZ);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&&!Xo(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 zI?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(jB(()=>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)(E(as),E(Mo),E(Wr),E(bU),E(Ia,8))},i.\u0275dir=ve({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:[bi]}),i})();const PZ={provide:bU,deps:[as],useFactory:function kZ(i){return()=>i.scrollStrategies.reposition()}};let Pm=(()=>{class i{}return i.\u0275fac=function(e){return new(e||i)},i.\u0275mod=nn({type:i}),i.\u0275inj=Kt({providers:[as,PZ],imports:[Yy,Nh,dU,dU]}),i})();function ml(i,t=$y){return ti((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,d=t.now();if(d{s=c,o=t.now(),r||(r=t.schedule(l,i),n.add(r))},()=>{a(),n.complete()},void 0,()=>{s=r=null}))})}function wU(i){return gn((t,e)=>i<=e)}function Zl(i,t=$a){return i=i??OZ,ti((e,n)=>{let r,s=!0;e.subscribe(Yn(n,o=>{const a=t(o);(s||!i(r,a))&&(s=!1,r=a,n.next(o))}))})}function OZ(i,t){return i===t}let MU=(()=>{class i{create(e){return typeof MutationObserver>"u"?null:new MutationObserver(e)}}return i.\u0275fac=function(e){return new(e||i)},i.\u0275prov=ke({token:i,factory:i.\u0275fac,providedIn:"root"}),i})(),FZ=(()=>{class i{constructor(e){this._mutationObserverFactory=e,this._observedElements=new Map}ngOnDestroy(){this._observedElements.forEach((e,n)=>this._cleanupObserver(n))}observe(e){const n=Yc(e);return new In(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 Re,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)(ee(MU))},i.\u0275prov=ke({token:i,factory:i.\u0275fac,providedIn:"root"}),i})(),CU=(()=>{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=ks(e),this._subscribe()}constructor(e,n,r){this._contentObserver=e,this._elementRef=n,this._ngZone=r,this.event=new We,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(ml(this.debounce)):e).subscribe(this.event)})}_unsubscribe(){this._currentSubscription?.unsubscribe()}}return i.\u0275fac=function(e){return new(e||i)(E(FZ),E(mt),E(ft))},i.\u0275dir=ve({type:i,selectors:[["","cdkObserveContent",""]],inputs:{disabled:["cdkObserveContentDisabled","disabled"],debounce:"debounce"},outputs:{event:"cdkObserveContent"},exportAs:["cdkObserveContent"]}),i})(),HI=(()=>{class i{}return i.\u0275fac=function(e){return new(e||i)},i.\u0275mod=nn({type:i}),i.\u0275inj=Kt({providers:[MU]}),i})();const SU=new Set;let Om,LZ=(()=>{class i{constructor(e){this._platform=e,this._matchMedia=this._platform.isBrowser&&window.matchMedia?window.matchMedia.bind(window):BZ}matchMedia(e){return(this._platform.WEBKIT||this._platform.BLINK)&&function NZ(i){if(!SU.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),SU.add(i))}catch(t){console.error(t)}}(e),this._matchMedia(e)}}return i.\u0275fac=function(e){return new(e||i)(ee(zi))},i.\u0275prov=ke({token:i,factory:i.\u0275fac,providedIn:"root"}),i})();function BZ(i){return{matches:"all"===i||""===i,media:i,addListener:()=>{},removeListener:()=>{}}}let GI=(()=>{class i{constructor(e,n){this._mediaMatcher=e,this._zone=n,this._queries=new Map,this._destroySubject=new Re}ngOnDestroy(){this._destroySubject.next(),this._destroySubject.complete()}isMatched(e){return EU(TM(e)).some(r=>this._registerQuery(r).mql.matches)}observe(e){let s=nu(EU(TM(e)).map(o=>this._registerQuery(o).observable));return s=Sy(s.pipe(Oi(1)),s.pipe(wU(1),ml(0))),s.pipe(et(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 In(o=>{const a=l=>this._zone.run(()=>o.next(l));return n.addListener(a),()=>{n.removeListener(a)}}).pipe(Ao(n),et(({matches:o})=>({query:e,matches:o})),He(this._destroySubject)),mql:n};return this._queries.set(e,s),s}}return i.\u0275fac=function(e){return new(e||i)(ee(LZ),ee(ft))},i.\u0275prov=ke({token:i,factory:i.\u0275fac,providedIn:"root"}),i})();function EU(i){return i.map(t=>t.split(",")).reduce((t,e)=>t.concat(e)).map(t=>t.trim())}function zM(i,t){return(i.getAttribute(t)||"").match(/\S+/g)||[]}const DU="cdk-describedby-message",HM="cdk-describedby-host";let $I=0,HZ=(()=>{class i{constructor(e,n){this._platform=n,this._messageRegistry=new Map,this._messagesContainer=null,this._id=""+$I++,this._document=e,this._id=Ft(cm)+"-"+$I++}describe(e,n,r){if(!this._canBeDescribed(e,n))return;const s=WI(n,r);"string"!=typeof n?(TU(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=WI(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(`[${HM}="${this._id}"]`);for(let n=0;n0!=r.indexOf(DU));e.setAttribute("aria-describedby",n.join(" "))}_addMessageReference(e,n){const r=this._messageRegistry.get(n);(function VZ(i,t,e){const n=zM(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(HM,this._id),r.referenceCount++}_removeMessageReference(e,n){const r=this._messageRegistry.get(n);r.referenceCount--,function zZ(i,t,e){const r=zM(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(HM)}_isElementDescribedByMessage(e,n){const r=zM(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)(ee(jt),ee(zi))},i.\u0275prov=ke({token:i,factory:i.\u0275fac,providedIn:"root"}),i})();function WI(i,t){return"string"==typeof i?`${t||""}/${i}`:i}function TU(i,t){i.id||(i.id=`${DU}-${t}-${$I++}`)}class IU{constructor(t){this._items=t,this._activeItemIndex=-1,this._activeItem=null,this._wrap=!1,this._letterKeyStream=new Re,this._typeaheadSubscription=Zt.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 Re,this.change=new Re,t instanceof om&&(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(Vi(e=>this._pressedLetters.push(e)),ml(t),gn(()=>this._pressedLetters.length>0),et(()=>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 om?this._items.toArray():this._items}}class GZ extends IU{setActiveItem(t){this.activeItem&&this.activeItem.setInactiveStyles(),super.setActiveItem(t),this.activeItem&&this.activeItem.setActiveStyles()}}class RU extends IU{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 GM=(()=>{class i{constructor(e){this._platform=e}isDisabled(e){return e.hasAttribute("disabled")}isVisible(e){return function WZ(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 $Z(i){try{return i.frameElement}catch{return null}}(function JZ(i){return i.ownerDocument&&i.ownerDocument.defaultView||window}(e));if(n&&(-1===PU(n)||!this.isVisible(n)))return!1;let r=e.nodeName.toLowerCase(),s=PU(e);return e.hasAttribute("contenteditable")?-1!==s:!("iframe"===r||"object"===r||this._platform.WEBKIT&&this._platform.IOS&&!function ZZ(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 QZ(i){return!function YZ(i){return function XZ(i){return"input"==i.nodeName.toLowerCase()}(i)&&"hidden"==i.type}(i)&&(function jZ(i){let t=i.nodeName.toLowerCase();return"input"===t||"select"===t||"button"===t||"textarea"===t}(i)||function qZ(i){return function KZ(i){return"a"==i.nodeName.toLowerCase()}(i)&&i.hasAttribute("href")}(i)||i.hasAttribute("contenteditable")||kU(i))}(e)&&!this.isDisabled(e)&&(n?.ignoreVisibility||this.isVisible(e))}}return i.\u0275fac=function(e){return new(e||i)(ee(zi))},i.\u0275prov=ke({token:i,factory:i.\u0275fac,providedIn:"root"}),i})();function kU(i){if(!i.hasAttribute("tabindex")||void 0===i.tabIndex)return!1;let t=i.getAttribute("tabindex");return!(!t||isNaN(parseInt(t,10)))}function PU(i){if(!kU(i))return null;const t=parseInt(i.getAttribute("tabindex")||"",10);return isNaN(t)?-1:t}class eQ{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(Oi(1)).subscribe(t)}}let jI=(()=>{class i{constructor(e,n,r){this._checker=e,this._ngZone=n,this._document=r}create(e,n=!1){return new eQ(e,this._checker,this._ngZone,this._document,n)}}return i.\u0275fac=function(e){return new(e||i)(ee(GM),ee(ft),ee(jt))},i.\u0275prov=ke({token:i,factory:i.\u0275fac,providedIn:"root"}),i})();function YI(i){return 0===i.buttons||0===i.offsetX&&0===i.offsetY}function qI(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 tQ=new me("cdk-input-modality-detector-options"),nQ={ignoreKeys:[18,17,224,91,16]},Fm=Oh({passive:!0,capture:!0});let iQ=(()=>{class i{get mostRecentModality(){return this._modality.value}constructor(e,n,r,s){this._platform=e,this._mostRecentTarget=null,this._modality=new gt(null),this._lastTouchMs=0,this._onKeydown=o=>{this._options?.ignoreKeys?.some(a=>a===o.keyCode)||(this._modality.next("keyboard"),this._mostRecentTarget=cu(o))},this._onMousedown=o=>{Date.now()-this._lastTouchMs<650||(this._modality.next(YI(o)?"keyboard":"mouse"),this._mostRecentTarget=cu(o))},this._onTouchstart=o=>{qI(o)?this._modality.next("keyboard"):(this._lastTouchMs=Date.now(),this._modality.next("touch"),this._mostRecentTarget=cu(o))},this._options={...nQ,...s},this.modalityDetected=this._modality.pipe(wU(1)),this.modalityChanged=this.modalityDetected.pipe(Zl()),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)(ee(zi),ee(ft),ee(jt),ee(tQ,8))},i.\u0275prov=ke({token:i,factory:i.\u0275fac,providedIn:"root"}),i})();const rQ=new me("liveAnnouncerElement",{providedIn:"root",factory:function sQ(){return null}}),oQ=new me("LIVE_ANNOUNCER_DEFAULT_OPTIONS");let aQ=0,XI=(()=>{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 Re,this._rootNodeFocusAndBlurListener=a=>{for(let c=cu(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=Yc(e);if(!this._platform.isBrowser||1!==r.nodeType)return ht(null);const s=function WK(i){if(function $K(){if(null==LI){const i=typeof document<"u"?document.head:null;LI=!(!i||!i.createShadowRoot&&!i.attachShadow)}return LI}()){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 Re,rootNode:s};return this._elementInfo.set(r,a),this._registerGlobalListeners(a),a.subject}stopMonitoring(e){const n=Yc(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=Yc(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=cu(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,$M),n.addEventListener("blur",this._rootNodeFocusAndBlurListener,$M)}),this._rootNodeFocusListenerCount.set(n,r+1),1==++this._monitoredElementCount&&(this._ngZone.runOutsideAngular(()=>{this._getWindow().addEventListener("focus",this._windowFocusListener)}),this._inputModalityDetector.modalityDetected.pipe(He(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,$M),n.removeEventListener("blur",this._rootNodeFocusAndBlurListener,$M),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=Ft(GI).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,FU,LU),this._hasCheckedHighContrastMode=!0;const n=this.getHighContrastMode();1===n?e.add(KI,FU):2===n&&e.add(KI,LU)}}}return i.\u0275fac=function(e){return new(e||i)(ee(zi),ee(jt))},i.\u0275prov=ke({token:i,factory:i.\u0275fac,providedIn:"root"}),i})(),BU=(()=>{class i{constructor(e){e._applyBodyHighContrastModeCssClasses()}}return i.\u0275fac=function(e){return new(e||i)(ee(NU))},i.\u0275mod=nn({type:i}),i.\u0275inj=Kt({imports:[HI]}),i})();function cQ(i,t){}class WM{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 UU=(()=>{class i extends NM{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=d=>{this._portalOutlet.hasAttached();const h=this._portalOutlet.attachDomPortal(d);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=FM(),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=FM();return e===n||e.contains(n)}_initializeFocusTrap(){this._focusTrap=this._focusTrapFactory.create(this._elementRef.nativeElement),this._document&&(this._elementFocusedBeforeDialogWasOpened=FM())}_handleBackdropClicks(){this._overlayRef.backdropClick().subscribe(()=>{this._config.disableClose&&this._recaptureFocus()})}}return i.\u0275fac=function(e){return new(e||i)(E(mt),E(jI),E(jt,8),E(WM),E(GM),E(ft),E(Zy),E(qc))},i.\u0275cmp=ot({type:i,selectors:[["cdk-dialog-container"]],viewQuery:function(e,n){if(1&e&&Wn(Am,7),2&e){let r;Et(r=At())&&(n._portalOutlet=r.first)}},hostAttrs:["tabindex","-1",1,"cdk-dialog-container"],hostVars:6,hostBindings:function(e,n){2&e&&Dt("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:[lt],decls:1,vars:0,consts:[["cdkPortalOutlet",""]],template:function(e,n){1&e&&fe(0,cQ,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 ZI{constructor(t,e){this.overlayRef=t,this.config=e,this.closed=new Re,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&&!Xo(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 VU=new me("DialogScrollStrategy"),dQ=new me("DialogData"),uQ=new me("DefaultDialogConfig"),fQ={provide:VU,deps:[as],useFactory:function hQ(i){return()=>i.scrollStrategies.block()}};let pQ=0,zU=(()=>{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 Re,this._afterOpenedAtThisLevel=new Re,this._ariaHiddenElements=new Map,this.afterAllClosed=Ey(()=>this.openDialogs.length?this._getAfterAllClosed():this._getAfterAllClosed().pipe(Ao(void 0))),this._scrollStrategy=a}open(e,n){(n={...this._defaultOptions||new WM,...n}).id=n.id||"cdk-dialog-"+pQ++,n.id&&this.getDialogById(n.id);const s=this._getOverlayConfig(n),o=this._overlay.create(s),a=new ZI(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(){QI(this.openDialogs,e=>e.close())}getDialogById(e){return this.openDialogs.find(n=>n.id===e)}ngOnDestroy(){QI(this._openDialogsAtThisLevel,e=>{!1===e.config.closeOnDestroy&&this._removeOpenDialog(e,!1)}),QI(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:WM,useValue:r},{provide:ZI,useValue:n},{provide:Zy,useValue:e}];let a;r.container?"function"==typeof r.container?a=r.container:(a=r.container.type,o.push(...r.container.providers(r))):a=UU;const l=new Lh(a,r.viewContainerRef,$i.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 Lh(e,s.viewContainerRef,o,s.componentFactoryResolver));n.componentInstance=a.instance}}_createInjector(e,n,r,s){const o=e.injector||e.viewContainerRef?.injector,a=[{provide:dQ,useValue:e.data},{provide:ZI,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(Ia,null,{optional:!0}))&&a.push({provide:Ia,useValue:{value:e.direction,change:ht()}}),$i.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)(ee(as),ee($i),ee(uQ,8),ee(i,12),ee(VM),ee(VU))},i.\u0275prov=ke({token:i,factory:i.\u0275fac}),i})();function QI(i,t){let e=i.length;for(;e--;)t(i[e])}let mQ=(()=>{class i{}return i.\u0275fac=function(e){return new(e||i)},i.\u0275mod=nn({type:i}),i.\u0275inj=Kt({providers:[zU,fQ],imports:[Pm,Nh,BU,Nh]}),i})();const gQ=["text"];function _Q(i,t){if(1&i&&De(0,"mat-pseudo-checkbox",6),2&i){const e=he();U("state",e.selected?"checked":"unchecked")("disabled",e.disabled)}}function vQ(i,t){1&i&&De(0,"mat-pseudo-checkbox",7),2&i&&U("disabled",he().disabled)}function yQ(i,t){if(1&i&&(W(0,"span",8),Ve(1),j()),2&i){const e=he();G(1),Qi("(",e.group.label,")")}}const bQ=[[["mat-icon"]],"*"],xQ=["mat-icon","*"],MQ=new me("mat-sanity-checks",{providedIn:"root",factory:function wQ(){return!0}});let Qn=(()=>{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!NI()&&("boolean"==typeof this._sanityChecks?this._sanityChecks:!!this._sanityChecks[e])}}return i.\u0275fac=function(e){return new(e||i)(ee(NU),ee(MQ,8),ee(jt))},i.\u0275mod=nn({type:i}),i.\u0275inj=Kt({imports:[Yy,Yy]}),i})();function jM(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 Qy(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 YM(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 JI(i,t=0){return class extends i{get tabIndex(){return this.disabled?-1:this._tabIndex}set tabIndex(e){this._tabIndex=null!=e?ks(e):this.defaultTabIndex}constructor(...e){super(...e),this._tabIndex=t,this.defaultTabIndex=t}}}function $U(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 CQ(i){return class extends i{constructor(...t){super(...t),this._isInitialized=!1,this._pendingSubscribers=[],this.initialized=new In(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 jU=(()=>{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=ke({token:i,factory:i.\u0275fac,providedIn:"root"}),i})();class EQ{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 YU=Oh({passive:!0,capture:!0});class AQ{constructor(){this._events=new Map,this._delegateEventHandler=t=>{const e=cu(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,YU)})}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,YU)))}}const qU={enterDuration:225,exitDuration:150},XU=Oh({passive:!0,capture:!0}),KU=["mousedown","touchstart"],ZU=["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=Yc(n))}fadeInRipple(t,e,n={}){const r=this._containerRect=this._containerRect||this._containerElement.getBoundingClientRect(),s={...qU,...n.animation};n.centered&&(t=r.left+r.width/2,e=r.top+r.height/2);const o=n.radius||function TQ(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,d=document.createElement("div");d.classList.add("mat-ripple-element"),d.style.left=a-o+"px",d.style.top=l-o+"px",d.style.height=2*o+"px",d.style.width=2*o+"px",null!=n.color&&(d.style.backgroundColor=n.color),d.style.transitionDuration=`${c}ms`,this._containerElement.appendChild(d);const h=window.getComputedStyle(d),m=h.transitionDuration,g="none"===h.transitionProperty||"0s"===m||"0s, 0s"===m||0===r.width&&0===r.height,b=new EQ(this,d,n,g);d.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);d.addEventListener("transitionend",y),d.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={...qU,...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=Yc(t);!this._platform.isBrowser||!e||e===this._triggerElement||(this._removeTriggerEvents(),this._triggerElement=e,KU.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(()=>{ZU.forEach(e=>{this._triggerElement.addEventListener(e,this,XU)})}),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=YI(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&&(KU.forEach(e=>Lm._eventManager.removeHandler(e,t,this)),this._pointerUpEventsRegistered&&ZU.forEach(e=>t.removeEventListener(e,this,XU)))}}Lm._eventManager=new AQ;const eR=new me("mat-ripple-global-options");let Uh=(()=>{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)(E(mt),E(ft),E(zi),E(eR,8),E(Rr,8))},i.\u0275dir=ve({type:i,selectors:[["","mat-ripple",""],["","matRipple",""]],hostAttrs:[1,"mat-ripple"],hostVars:2,hostBindings:function(e,n){2&e&&un("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})(),eb=(()=>{class i{}return i.\u0275fac=function(e){return new(e||i)},i.\u0275mod=nn({type:i}),i.\u0275inj=Kt({imports:[Qn,Qn]}),i})(),IQ=(()=>{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)(E(Rr,8))},i.\u0275cmp=ot({type:i,selectors:[["mat-pseudo-checkbox"]],hostAttrs:[1,"mat-pseudo-checkbox"],hostVars:12,hostBindings:function(e,n){2&e&&un("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})(),QU=(()=>{class i{}return i.\u0275fac=function(e){return new(e||i)},i.\u0275mod=nn({type:i}),i.\u0275inj=Kt({imports:[Qn]}),i})();const JU=new me("MAT_OPTION_PARENT_COMPONENT"),eV=new me("MatOptgroup");let RQ=0;class kQ{constructor(t,e=!1){this.source=t,this.isUserInput=e}}let PQ=(()=>{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-"+RQ++,this.onSelectionChange=new We,this._stateChanges=new Re}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)&&!Xo(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 kQ(this,e))}}return i.\u0275fac=function(e){xo()},i.\u0275dir=ve({type:i,viewQuery:function(e,n){if(1&e&&Wn(gQ,7),2&e){let r;Et(r=At())&&(n._text=r.first)}},inputs:{value:"value",id:"id",disabled:"disabled"},outputs:{onSelectionChange:"onSelectionChange"}}),i})(),Nm=(()=>{class i extends PQ{constructor(e,n,r,s){super(e,n,r,s)}}return i.\u0275fac=function(e){return new(e||i)(E(mt),E(Zn),E(JU,8),E(eV,8))},i.\u0275cmp=ot({type:i,selectors:[["mat-option"]],hostAttrs:["role","option",1,"mat-mdc-option","mdc-list-item"],hostVars:11,hostBindings:function(e,n){1&e&&Ue("click",function(){return n._selectViaInteraction()})("keydown",function(s){return n._handleKeydown(s)}),2&e&&(Yl("id",n.id),Dt("aria-selected",n.selected)("aria-disabled",n.disabled.toString()),un("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:[lt],ngContentSelectors:xQ,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&&(sr(bQ),fe(0,_Q,1,2,"mat-pseudo-checkbox",0),Wt(1),W(2,"span",1,2),Wt(4,1),j(),fe(5,vQ,1,1,"mat-pseudo-checkbox",3),fe(6,yQ,2,1,"span",4),De(7,"div",5)),2&e&&(U("ngIf",n.multiple),G(5),U("ngIf",!n.multiple&&n.selected&&!n.hideSingleSelectionIndicator),G(1),U("ngIf",n.group&&n.group._inert),G(1),U("matRippleTrigger",n._getHostElement())("matRippleDisabled",n.disabled||n.disableRipple))},dependencies:[Uh,vi,IQ],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})(),tR=(()=>{class i{}return i.\u0275fac=function(e){return new(e||i)},i.\u0275mod=nn({type:i}),i.\u0275inj=Kt({imports:[eb,Eo,Qn,QU]}),i})();class tV{}class LQ{}const Xc="*";function Ra(i,t){return{type:7,name:i,definitions:t,options:{}}}function jr(i,t=null){return{type:4,styles:t,timings:i}}function iV(i,t=null){return{type:2,steps:i,options:t}}function si(i){return{type:6,styles:i,offset:null}}function Ps(i,t,e){return{type:0,name:i,styles:t,options:e}}function rV(i){return{type:5,steps:i}}function Pr(i,t,e=null){return{type:1,expr:i,animation:t,options:e}}function nR(i=null){return{type:9,options:i}}function iR(i,t,e=null){return{type:11,selector:i,animation:t,options:e}}function sV(i){Promise.resolve().then(i)}class tb{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(){sV(()=>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 oV{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?sV(()=>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 rR="!";function NQ(i,t){}class qM{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 sR="mdc-dialog--open",aV="mdc-dialog--opening",lV="mdc-dialog--closing";let VQ=(()=>{class i extends UU{constructor(e,n,r,s,o,a,l,c){super(e,n,r,s,o,a,l,c),this._animationStateChanged=new We}_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)(E(mt),E(jI),E(jt,8),E(qM),E(GM),E(ft),E(Zy),E(qc))},i.\u0275cmp=ot({type:i,selectors:[["ng-component"]],features:[lt],decls:0,vars:0,template:function(e,n){},encapsulation:2}),i})();const cV="--mat-dialog-transition-duration";function dV(i){return null==i?null:"number"==typeof i?i:i.endsWith("ms")?ks(i.substring(0,i.length-2)):i.endsWith("s")?1e3*ks(i.substring(0,i.length-1)):"0"===i?0:null}let zQ=(()=>{class i extends VQ{constructor(e,n,r,s,o,a,l,c,d){super(e,n,r,s,o,a,l,d),this._animationMode=c,this._animationsEnabled="NoopAnimations"!==this._animationMode,this._hostElement=this._elementRef.nativeElement,this._openAnimationDuration=this._animationsEnabled?dV(this._config.enterAnimationDuration)??150:0,this._closeAnimationDuration=this._animationsEnabled?dV(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(cV,`${this._openAnimationDuration}ms`),this._requestAnimationFrame(()=>this._hostElement.classList.add(aV,sR)),this._waitForAnimationToComplete(this._openAnimationDuration,this._finishDialogOpen)):(this._hostElement.classList.add(sR),Promise.resolve().then(()=>this._finishDialogOpen()))}_startExitAnimation(){this._animationStateChanged.emit({state:"closing",totalTime:this._closeAnimationDuration}),this._hostElement.classList.remove(sR),this._animationsEnabled?(this._hostElement.style.setProperty(cV,`${this._openAnimationDuration}ms`),this._requestAnimationFrame(()=>this._hostElement.classList.add(lV)),this._waitForAnimationToComplete(this._closeAnimationDuration,this._finishDialogClose)):Promise.resolve().then(()=>this._finishDialogClose())}_clearAnimationClasses(){this._hostElement.classList.remove(aV,lV)}_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)(E(mt),E(jI),E(jt,8),E(qM),E(GM),E(ft),E(Zy),E(Rr,8),E(qc))},i.\u0275cmp=ot({type:i,selectors:[["mat-dialog-container"]],hostAttrs:["tabindex","-1",1,"mat-mdc-dialog-container","mdc-dialog"],hostVars:8,hostBindings:function(e,n){2&e&&(Yl("id",n._config.id),Dt("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),un("_mat-animation-noopable",!n._animationsEnabled))},features:[lt],decls:3,vars:0,consts:[[1,"mdc-dialog__container"],[1,"mat-mdc-dialog-surface","mdc-dialog__surface"],["cdkPortalOutlet",""]],template:function(e,n){1&e&&(W(0,"div",0)(1,"div",1),fe(2,NQ,0,0,"ng-template",2),j()())},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 nb{constructor(t,e,n){this._ref=t,this._containerInstance=n,this._afterOpened=new Re,this._beforeClosed=new Re,this._state=0,this.disableClose=e.disableClose,this.id=t.id,n._animationStateChanged.pipe(gn(r=>"opened"===r.state),Oi(1)).subscribe(()=>{this._afterOpened.next(),this._afterOpened.complete()}),n._animationStateChanged.pipe(gn(r=>"closed"===r.state),Oi(1)).subscribe(()=>{clearTimeout(this._closeFallbackTimeout),this._finishDialogClose()}),t.overlayRef.detachments().subscribe(()=>{this._beforeClosed.next(this._result),this._beforeClosed.complete(),this._finishDialogClose()}),Mr(this.backdropClick(),this.keydownEvents().pipe(gn(r=>27===r.keyCode&&!this.disableClose&&!Xo(r)))).subscribe(r=>{this.disableClose||(r.preventDefault(),uV(this,"keydown"===r.type?"keyboard":"mouse"))})}close(t){this._result=t,this._containerInstance._animationStateChanged.pipe(gn(e=>"closing"===e.state),Oi(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 uV(i,t,e){return i._closeInteractionType=t,i.close(e)}const oR=new me("MatMdcDialogData"),HQ=new me("mat-mdc-dialog-default-options"),hV=new me("mat-mdc-dialog-scroll-strategy"),$Q={provide:hV,deps:[as],useFactory:function GQ(i){return()=>i.scrollStrategies.block()}};let WQ=0,jQ=(()=>{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,d,h){this._overlay=e,this._defaultOptions=r,this._parentDialog=s,this._dialogRefConstructor=l,this._dialogContainerType=c,this._dialogDataToken=d,this._openDialogsAtThisLevel=[],this._afterAllClosedAtThisLevel=new Re,this._afterOpenedAtThisLevel=new Re,this._idPrefix="mat-dialog-",this.dialogConfigClass=qM,this.afterAllClosed=Ey(()=>this.openDialogs.length?this._getAfterAllClosed():this._getAfterAllClosed().pipe(Ao(void 0))),this._scrollStrategy=a,this._dialog=n.get(zU)}open(e,n){let r;(n={...this._defaultOptions||new qM,...n}).id=n.id||`${this._idPrefix}${WQ++}`,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:WM,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){xo()},i.\u0275prov=ke({token:i,factory:i.\u0275fac}),i})(),Bm=(()=>{class i extends jQ{constructor(e,n,r,s,o,a,l,c){super(e,n,s,a,l,o,nb,zQ,oR,c),this._idPrefix="mat-mdc-dialog-"}}return i.\u0275fac=function(e){return new(e||i)(ee(as),ee($i),ee(_y,8),ee(HQ,8),ee(hV),ee(i,12),ee(VM),ee(Rr,8))},i.\u0275prov=ke({token:i,factory:i.\u0275fac}),i})(),YQ=0,qQ=(()=>{class i{constructor(e,n,r){this.dialogRef=e,this._elementRef=n,this._dialog=r,this.type="button"}ngOnInit(){this.dialogRef||(this.dialogRef=gV(this._elementRef,this._dialog.openDialogs))}ngOnChanges(e){const n=e._matDialogClose||e._matDialogCloseResult;n&&(this.dialogResult=n.currentValue)}_onButtonClick(e){uV(this.dialogRef,0===e.screenX&&0===e.screenY?"keyboard":"mouse",this.dialogResult)}}return i.\u0275fac=function(e){return new(e||i)(E(nb,8),E(mt),E(Bm))},i.\u0275dir=ve({type:i,selectors:[["","mat-dialog-close",""],["","matDialogClose",""]],hostVars:2,hostBindings:function(e,n){1&e&&Ue("click",function(s){return n._onButtonClick(s)}),2&e&&Dt("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:[bi]}),i})(),fV=(()=>{class i{constructor(e,n,r){this._dialogRef=e,this._elementRef=n,this._dialog=r,this.id="mat-mdc-dialog-title-"+YQ++}ngOnInit(){this._dialogRef||(this._dialogRef=gV(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)(E(nb,8),E(mt),E(Bm))},i.\u0275dir=ve({type:i,selectors:[["","mat-dialog-title",""],["","matDialogTitle",""]],hostAttrs:[1,"mat-mdc-dialog-title","mdc-dialog__title"],hostVars:1,hostBindings:function(e,n){2&e&&Yl("id",n.id)},inputs:{id:"id"},exportAs:["matDialogTitle"]}),i})(),pV=(()=>{class i{}return i.\u0275fac=function(e){return new(e||i)},i.\u0275dir=ve({type:i,selectors:[["","mat-dialog-content",""],["mat-dialog-content"],["","matDialogContent",""]],hostAttrs:[1,"mat-mdc-dialog-content","mdc-dialog__content"]}),i})(),mV=(()=>{class i{constructor(){this.align="start"}}return i.\u0275fac=function(e){return new(e||i)},i.\u0275dir=ve({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&&un("mat-mdc-dialog-actions-align-center","center"===n.align)("mat-mdc-dialog-actions-align-end","end"===n.align)},inputs:{align:"align"}}),i})();function gV(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 _V=(()=>{class i{}return i.\u0275fac=function(e){return new(e||i)},i.\u0275mod=nn({type:i}),i.\u0275inj=Kt({providers:[Bm,$Q],imports:[mQ,Pm,Nh,Qn,Qn]}),i})();const XQ=["mat-button",""],yV=[[["",8,"material-icons",3,"iconPositionEnd",""],["mat-icon",3,"iconPositionEnd",""],["","matButtonIcon","",3,"iconPositionEnd",""]],"*",[["","iconPositionEnd","",8,"material-icons"],["mat-icon","iconPositionEnd",""],["","matButtonIcon","","iconPositionEnd",""]]],bV=[".material-icons:not([iconPositionEnd]), mat-icon:not([iconPositionEnd]), [matButtonIcon]:not([iconPositionEnd])","*",".material-icons[iconPositionEnd], mat-icon[iconPositionEnd], [matButtonIcon][iconPositionEnd]"],ZQ=["mat-mini-fab",""],JQ=["mat-icon-button",""],eJ=["*"],tJ=[{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"]}],nJ=Qy(jM(YM(class{constructor(i){this._elementRef=i}})));let aR=(()=>{class i extends nJ{constructor(e,n,r,s){super(e),this._platform=n,this._ngZone=r,this._animationMode=s,this._focusMonitor=Ft(qc),this._isFab=!1;const o=e.nativeElement.classList;for(const a of tJ)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){xo()},i.\u0275dir=ve({type:i,viewQuery:function(e,n){if(1&e&&Wn(Uh,5),2&e){let r;Et(r=At())&&(n.ripple=r.first)}},features:[lt]}),i})(),ib=(()=>{class i extends aR{constructor(e,n,r,s){super(e,n,r,s)}}return i.\u0275fac=function(e){return new(e||i)(E(mt),E(zi),E(ft),E(Rr,8))},i.\u0275cmp=ot({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&&(Dt("disabled",n.disabled||null),un("_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:[lt],attrs:XQ,ngContentSelectors:bV,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&&(sr(yV),De(0,"span",0),Wt(1),W(2,"span",1),Wt(3,1),j(),Wt(4,2),De(5,"span",2)(6,"span",3)(7,"span",4)),2&e&&(un("mdc-button__ripple",!n._isFab)("mdc-fab__ripple",n._isFab),G(6),U("matRippleDisabled",n._isRippleDisabled())("matRippleTrigger",n._elementRef.nativeElement))},dependencies:[Uh],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 rJ=new me("mat-mdc-fab-default-options",{providedIn:"root",factory:xV});function xV(){return{color:"accent"}}const wV=xV();let MV=(()=>{class i extends aR{constructor(e,n,r,s,o){super(e,n,r,s),this._options=o,this._isFab=!0,this._options=this._options||wV,this.color=this.defaultColor=this._options.color||wV.color}}return i.\u0275fac=function(e){return new(e||i)(E(mt),E(zi),E(ft),E(Rr,8),E(rJ,8))},i.\u0275cmp=ot({type:i,selectors:[["button","mat-mini-fab",""]],hostVars:7,hostBindings:function(e,n){2&e&&(Dt("disabled",n.disabled||null),un("_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:[lt],attrs:ZQ,ngContentSelectors:bV,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&&(sr(yV),De(0,"span",0),Wt(1),W(2,"span",1),Wt(3,1),j(),Wt(4,2),De(5,"span",2)(6,"span",3)(7,"span",4)),2&e&&(un("mdc-button__ripple",!n._isFab)("mdc-fab__ripple",n._isFab),G(6),U("matRippleDisabled",n._isRippleDisabled())("matRippleTrigger",n._elementRef.nativeElement))},dependencies:[Uh],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})(),XM=(()=>{class i extends aR{constructor(e,n,r,s){super(e,n,r,s)}}return i.\u0275fac=function(e){return new(e||i)(E(mt),E(zi),E(ft),E(Rr,8))},i.\u0275cmp=ot({type:i,selectors:[["button","mat-icon-button",""]],hostVars:7,hostBindings:function(e,n){2&e&&(Dt("disabled",n.disabled||null),un("_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:[lt],attrs:JQ,ngContentSelectors:eJ,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&&(sr(),De(0,"span",0),Wt(1),De(2,"span",1)(3,"span",2)(4,"span",3)),2&e&&(G(3),U("matRippleDisabled",n._isRippleDisabled())("matRippleCentered",!0)("matRippleTrigger",n._elementRef.nativeElement))},dependencies:[Uh],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})(),KM=(()=>{class i{}return i.\u0275fac=function(e){return new(e||i)},i.\u0275mod=nn({type:i}),i.\u0275inj=Kt({imports:[Qn,eb,Qn]}),i})();const sJ=["class","dialog"];let CV=(()=>{class i{constructor(e,n){this.dialogRef=e,this.data=n}}return i.\u0275fac=function(e){return new(e||i)(E(nb),E(oR))},i.\u0275cmp=ot({type:i,selectors:[["app-confirm",8,"dialog"]],attrs:sJ,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&&(W(0,"h1",0),Ve(1,"Confirmation"),j(),W(2,"div",1)(3,"p"),Ve(4),j()(),W(5,"div",2)(6,"button",3),Ue("click",function(){return n.dialogRef.close()}),Ve(7,"Cancel"),j(),W(8,"button",4),Ve(9,"Yes"),j()()),2&e&&(G(4),_i(n.data.text),G(4),U("mat-dialog-close",!0))},dependencies:[ib,qQ,fV,pV,mV]}),i})();function lR(i,t){const e="object"==typeof t;return new Promise((n,r)=>{const s=new da({next:o=>{n(o),s.unsubscribe()},error:r,complete:()=>{e?n(t.defaultValue):r(new fm)}});i.subscribe(s)})}let Ql=(()=>{class i{constructor(e){this.ngZone=e,this.openedResource$=new gt(null),this.openedResourcePath$=new gt(null),eel.expose(this.wrapHandler(this.openFile),"open_file"),eel.on_angular_ready(),setTimeout(tt(function*(){for(;;){if(eel._websocket){eel._websocket.onclose=()=>window.close();break}yield new Promise(n=>setTimeout(n,0))}}),0)}wrapHandler(e){return(...n)=>{try{ft.assertInAngularZone(),e.bind(this)(...n)}catch{this.ngZone.run(e,this,n)}}}openFile(e,n=!1){var r=this;return tt(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 tt(function*(){yield eel.open_file_with_system_app(e)()})()}retrieveValue(e){return tt(function*(){return yield eel.retrieve_value(e)()})()}runCustomAction(e,n,r){return tt(function*(){return eel.run_custom_action(e,n,r)()})()}saveFile(e){var n=this;return tt(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 tt(function*(){return eel.serialize_resource(e,n)()})()}serializeResourceTmp(e,n,r={}){return tt(function*(){return eel.serialize_resource_tmp(e,n,r)()})()}serializeReversible(e,n){return tt(function*(){return eel.serialize_reversible(e,n)()})()}deserializeResource(e){return tt(function*(){return eel.deserialize_resource(e)()})()}}return i.\u0275fac=function(e){return new(e||i)(ee(ft))},i.\u0275prov=ke({token:i,factory:i.\u0275fac,providedIn:"root"}),i})();var cR=ps(489);const SV=i=>!(!i||"object"!=typeof i),EV=(i={},t,e,n=[])=>{const r=[];if(SV(i)){const s=Object.entries(i);for(let o=0;o{class i{constructor(e){var n=this;this.eelDelegate=e,this._hasUnsavedChanges$=new gt(!1),this.resource$=new gt(null),this.error$=new gt(null),this.customActionRunning$=new gt(!1),this.changedDataBlocks={},this.dataBlockChange$=new Re,this.hideHiddenFields$=new gt(!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=EV(r.schema,"is_recursive_ref",!0);for(const[o,a]of s){const l=o.block_class_mro;let c=r.schema,d=c.block_class_mro===l?c:void 0;for(const h of a.slice(0,a.length-1))!d&&c[h]?.block_class_mro===l&&(d=c[h]),c=c[h];c[a[a.length-1]]=d}this.resource$.next(r),this.error$.next(null)}else this.resource$.next(null),this.error$.next(null)}),this.dataBlockChange$.subscribe(function(){var r=tt(function*([s,o]){n.changedDataBlocks[s]=o,n.updateUnsavedChanges();const a=yield n.eelDelegate.retrieveValue(s);n.changedDataBlocks[s]==o&&((0,cR.isNumber)(o)?Math.abs(o-a)<1e-10:(0,cR.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 tt(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 tt(function*(){return s.processExternalChanges(e,()=>s.eelDelegate.runCustomAction(e,n,r))})()}deserializeResource(e){var n=this;return tt(function*(){return n.processExternalChanges(e,()=>n.eelDelegate.deserializeResource(e))})()}reloadResource(){var e=this;return tt(function*(){const n=e.eelDelegate.openedResourcePath$.getValue();n&&e.eelDelegate.openFile(n,!0).then()})()}saveResource(){var e=this;return tt(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)(ee(Ql))},i.\u0275prov=ke({token:i,factory:i.\u0275fac,providedIn:"root"}),i})();function oJ(i,t){if(1&i){const e=di();W(0,"div",2)(1,"button",3),Ue("click",function(){return an(e),zt(he().action())}),Ve(2),j()()}if(2&i){const e=he();G(2),Qi(" ",e.data.action," ")}}const aJ=["label"];function lJ(i,t){}const cJ=Math.pow(2,31)-1;class dR{constructor(t,e){this._overlayRef=e,this._afterDismissed=new Re,this._afterOpened=new Re,this._onAction=new Re,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,cJ))}_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 AV=new me("MatSnackBarData");class ZM{constructor(){this.politeness="assertive",this.announcementMessage="",this.duration=0,this.data=null,this.horizontalPosition="center",this.verticalPosition="bottom"}}let dJ=(()=>{class i{}return i.\u0275fac=function(e){return new(e||i)},i.\u0275dir=ve({type:i,selectors:[["","matSnackBarLabel",""]],hostAttrs:[1,"mat-mdc-snack-bar-label","mdc-snackbar__label"]}),i})(),uJ=(()=>{class i{}return i.\u0275fac=function(e){return new(e||i)},i.\u0275dir=ve({type:i,selectors:[["","matSnackBarActions",""]],hostAttrs:[1,"mat-mdc-snack-bar-actions","mdc-snackbar__actions"]}),i})(),hJ=(()=>{class i{}return i.\u0275fac=function(e){return new(e||i)},i.\u0275dir=ve({type:i,selectors:[["","matSnackBarAction",""]],hostAttrs:[1,"mat-mdc-snack-bar-action","mdc-snackbar__action"]}),i})(),fJ=(()=>{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)(E(dR),E(AV))},i.\u0275cmp=ot({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&&(W(0,"div",0),Ve(1),j(),fe(2,oJ,3,1,"div",1)),2&e&&(G(1),Qi(" ",n.data.message,"\n"),G(1),U("ngIf",n.hasAction))},dependencies:[vi,ib,dJ,uJ,hJ],styles:[".mat-mdc-simple-snack-bar{display:flex}"],encapsulation:2,changeDetection:0}),i})();const pJ={snackBarState:Ra("state",[Ps("void, hidden",si({transform:"scale(0.8)",opacity:0})),Ps("visible",si({transform:"scale(1)",opacity:1})),Pr("* => visible",jr("150ms cubic-bezier(0, 0, 0.2, 1)")),Pr("* => void, * => hidden",jr("75ms cubic-bezier(0.4, 0.0, 1, 1)",si({opacity:0})))])};let mJ=0,gJ=(()=>{class i extends NM{constructor(e,n,r,s,o){super(),this._ngZone=e,this._elementRef=n,this._changeDetectorRef=r,this._platform=s,this.snackBarConfig=o,this._document=Ft(jt),this._trackedModals=new Set,this._announceDelay=150,this._destroyed=!1,this._onAnnounce=new Re,this._onExit=new Re,this._onEnter=new Re,this._animationState="void",this._liveElementId="mat-snack-bar-container-live-"+mJ++,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(Oi(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)(E(ft),E(mt),E(Zn),E(zi),E(ZM))},i.\u0275dir=ve({type:i,viewQuery:function(e,n){if(1&e&&Wn(Am,7),2&e){let r;Et(r=At())&&(n._portalOutlet=r.first)}},features:[lt]}),i})(),_J=(()=>{class i extends gJ{_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=ri(i)))(n||i)}}(),i.\u0275cmp=ot({type:i,selectors:[["mat-snack-bar-container"]],viewQuery:function(e,n){if(1&e&&Wn(aJ,7),2&e){let r;Et(r=At())&&(n._label=r.first)}},hostAttrs:[1,"mdc-snackbar","mat-mdc-snack-bar-container","mdc-snackbar--open"],hostVars:1,hostBindings:function(e,n){1&e&&N1("@state.done",function(s){return n.onAnimationEnd(s)}),2&e&&Iw("@state",n._animationState)},features:[lt],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&&(W(0,"div",0)(1,"div",1,2)(3,"div",3),fe(4,lJ,0,0,"ng-template",4),j(),De(5,"div"),j()()),2&e&&(G(5),Dt("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:[pJ.snackBarState]}}),i})(),DV=(()=>{class i{}return i.\u0275fac=function(e){return new(e||i)},i.\u0275mod=nn({type:i}),i.\u0275inj=Kt({imports:[Pm,Nh,Eo,KM,Qn,Qn]}),i})();const TV=new me("mat-snack-bar-default-options",{providedIn:"root",factory:function vJ(){return new ZM}});let yJ=(()=>{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=$i.create({parent:n&&n.viewContainerRef&&n.viewContainerRef.injector||this._injector,providers:[{provide:ZM,useValue:n}]}),o=new Lh(this.snackBarContainerComponent,n.viewContainerRef,s),a=e.attach(o);return a.instance.snackBarConfig=n,a.instance}_attach(e,n){const r={...new ZM,...this._defaultConfig,...n},s=this._createOverlay(r),o=this._attachSnackBarContainer(s,r),a=new dR(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 Lh(e,void 0,l),d=o.attachComponentPortal(c);a.instance=d.instance}return this._breakpointObserver.observe("(max-width: 599.98px) and (orientation: portrait)").pipe(He(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 $i.create({parent:e&&e.viewContainerRef&&e.viewContainerRef.injector||this._injector,providers:[{provide:dR,useValue:n},{provide:AV,useValue:e.data}]})}}return i.\u0275fac=function(e){return new(e||i)(ee(as),ee(XI),ee($i),ee(GI),ee(i,12),ee(TV))},i.\u0275prov=ke({token:i,factory:i.\u0275fac}),i})(),IV=(()=>{class i extends yJ{constructor(e,n,r,s,o,a){super(e,n,r,s,o,a),this.simpleSnackBarComponent=fJ,this.snackBarContainerComponent=_J,this.handsetCssClass="mat-mdc-snack-bar-handset"}}return i.\u0275fac=function(e){return new(e||i)(ee(as),ee(XI),ee($i),ee(GI),ee(i,12),ee(TV))},i.\u0275prov=ke({token:i,factory:i.\u0275fac,providedIn:DV}),i})();const bJ=["*",[["mat-toolbar-row"]]],xJ=["*","mat-toolbar-row"],wJ=Qy(class{constructor(i){this._elementRef=i}});let MJ=(()=>{class i{}return i.\u0275fac=function(e){return new(e||i)},i.\u0275dir=ve({type:i,selectors:[["mat-toolbar-row"]],hostAttrs:[1,"mat-toolbar-row"],exportAs:["matToolbarRow"]}),i})(),CJ=(()=>{class i extends wJ{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)(E(mt),E(zi),E(jt))},i.\u0275cmp=ot({type:i,selectors:[["mat-toolbar"]],contentQueries:function(e,n,r){if(1&e&&Wi(r,MJ,5),2&e){let s;Et(s=At())&&(n._toolbarRows=s)}},hostAttrs:[1,"mat-toolbar"],hostVars:4,hostBindings:function(e,n){2&e&&un("mat-toolbar-multiple-rows",n._toolbarRows.length>0)("mat-toolbar-single-row",0===n._toolbarRows.length)},inputs:{color:"color"},exportAs:["matToolbar"],features:[lt],ngContentSelectors:xJ,decls:2,vars:0,template:function(e,n){1&e&&(sr(bJ),Wt(0),Wt(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})(),SJ=(()=>{class i{}return i.\u0275fac=function(e){return new(e||i)},i.\u0275mod=nn({type:i}),i.\u0275inj=Kt({imports:[Qn,Qn]}),i})(),EJ=(()=>{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=ot({type:i,selectors:[["mat-divider"]],hostAttrs:["role","separator",1,"mat-divider"],hostVars:7,hostBindings:function(e,n){2&e&&(Dt("aria-orientation",n.vertical?"vertical":"horizontal"),un("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})(),RV=(()=>{class i{}return i.\u0275fac=function(e){return new(e||i)},i.\u0275mod=nn({type:i}),i.\u0275inj=Kt({imports:[Qn,Qn]}),i})();const AJ=["tooltip"],kV=new me("mat-tooltip-scroll-strategy"),IJ={provide:kV,deps:[as],useFactory:function TJ(i){return()=>i.scrollStrategies.reposition({scrollThrottle:20})}},kJ=new me("mat-tooltip-default-options",{providedIn:"root",factory:function RJ(){return{showDelay:0,hideDelay:0,touchendHideDelay:1500}}}),PV="tooltip-panel",OV=Oh({passive:!0});let BJ=(()=>{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=ks(e)}get hideDelay(){return this._hideDelay}set hideDelay(e){this._hideDelay=ks(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,d,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 Re,this._scrollStrategy=d,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(He(this._destroyed)).subscribe(()=>{this._overlayRef&&this._updatePosition(this._overlayRef)})}ngAfterViewInit(){this._viewInitialized=!0,this._setupPointerEnterEventsIfNeeded(),this._focusMonitor.monitor(this._elementRef).pipe(He(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,OV)}),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 Lh(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(He(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 mt)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(He(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}-${PV}`,scrollStrategy:this._scrollStrategy()}),this._updatePosition(this._overlayRef),this._overlayRef.detachments().pipe(He(this._destroyed)).subscribe(()=>this._detach()),this._overlayRef.outsidePointerEvents().pipe(He(this._destroyed)).subscribe(()=>this._tooltipInstance?._handleBodyInteraction()),this._overlayRef.keydownEvents().pipe(He(this._destroyed)).subscribe(s=>{this._isTooltipVisible()&&27===s.keyCode&&!Xo(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(Oi(1),He(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}-${PV}-`;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,OV)})}_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){xo()},i.\u0275dir=ve({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})(),Os=(()=>{class i extends BJ{constructor(e,n,r,s,o,a,l,c,d,h,p,m){super(e,n,r,s,o,a,l,c,d,h,p,m),this._tooltipComponent=VJ,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)(E(as),E(mt),E(qy),E(Wr),E(ft),E(zi),E(HZ),E(qc),E(kV),E(Ia,8),E(kJ,8),E(jt))},i.\u0275dir=ve({type:i,selectors:[["","matTooltip",""]],hostAttrs:[1,"mat-mdc-tooltip-trigger"],exportAs:["matTooltip"],features:[lt]}),i})(),UJ=(()=>{class i{constructor(e,n){this._changeDetectorRef=e,this._closeOnInteraction=!1,this._isVisible=!1,this._onHide=new Re,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)(E(Zn),E(Rr,8))},i.\u0275dir=ve({type:i}),i})(),VJ=(()=>{class i extends UJ{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)(E(Zn),E(mt),E(Rr,8))},i.\u0275cmp=ot({type:i,selectors:[["mat-tooltip-component"]],viewQuery:function(e,n){if(1&e&&Wn(AJ,7),2&e){let r;Et(r=At())&&(n._tooltip=r.first)}},hostAttrs:["aria-hidden","true"],hostVars:2,hostBindings:function(e,n){1&e&&Ue("mouseleave",function(s){return n._handleMouseLeave(s)}),2&e&&jo("zoom",n.isVisible()?1:null)},features:[lt],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&&(W(0,"div",0,1),Ue("animationend",function(s){return n._handleAnimationEnd(s)}),W(2,"div",2),Ve(3),j()()),2&e&&(un("mdc-tooltip--multiline",n._isMultiline),U("ngClass",n.tooltipClass),G(3),_i(n.message))},dependencies:[hm],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})(),FV=(()=>{class i{}return i.\u0275fac=function(e){return new(e||i)},i.\u0275mod=nn({type:i}),i.\u0275inj=Kt({providers:[IJ],imports:[BU,Eo,Pm,Qn,Qn,Xy]}),i})();function LV(...i){const t=w0(i),{args:e,keys:n}=VB(i),r=new In(s=>{const{length:o}=e;if(!o)return void s.complete();const a=new Array(o);let l=o,c=o;for(let d=0;d{h||(h=!0,c--),a[d]=p},()=>l--,void 0,()=>{(!l||!h)&&(c||s.next(n?zB(n,a):a),s.complete())}))}});return t?r.pipe(JT(t)):r}class uR{}class uu{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 uu?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 uu;return e.lazyInit=this.lazyInit&&this.lazyInit instanceof uu?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 zJ{encodeKey(t){return BV(t)}encodeValue(t){return BV(t)}decodeKey(t){return decodeURIComponent(t)}decodeValue(t){return decodeURIComponent(t)}}const GJ=/%(\d[a-f0-9])/gi,$J={40:"@","3A":":",24:"$","2C":",","3B":";","3D":"=","3F":"?","2F":"/"};function BV(i){return encodeURIComponent(i).replace(GJ,(t,e)=>$J[e]??t)}function QM(i){return`${i}`}class hu{constructor(t={}){if(this.updates=null,this.cloneFrom=null,this.encoder=t.encoder||new zJ,t.fromString){if(t.fromObject)throw new Error("Cannot specify both fromString and fromObject.");this.map=function HJ(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 hu({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 WJ{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 UV(i){return typeof ArrayBuffer<"u"&&i instanceof ArrayBuffer}function VV(i){return typeof Blob<"u"&&i instanceof Blob}function zV(i){return typeof FormData<"u"&&i instanceof FormData}class rb{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 jJ(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 uu),this.context||(this.context=new WJ),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 rb(e,n,s,{params:c,headers:l,context:d,reportProgress:a,responseType:r,withCredentials:o})}}var ls=(()=>((ls=ls||{})[ls.Sent=0]="Sent",ls[ls.UploadProgress=1]="UploadProgress",ls[ls.ResponseHeader=2]="ResponseHeader",ls[ls.DownloadProgress=3]="DownloadProgress",ls[ls.Response=4]="Response",ls[ls.User=5]="User",ls))();class qJ{constructor(t,e=200,n="OK"){this.headers=t.headers||new uu,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 hR extends qJ{constructor(t={}){super(t),this.type=ls.Response,this.body=void 0!==t.body?t.body:null}clone(t={}){return new hR({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 fR(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 pR=(()=>{class i{constructor(e){this.handler=e}request(e,n,r={}){let s;if(e instanceof rb)s=e;else{let l,c;l=r.headers instanceof uu?r.headers:new uu(r.headers),r.params&&(c=r.params instanceof hu?r.params:new hu({fromObject:r.params})),s=new rb(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=ht(s).pipe(ru(l=>this.handler.handle(l)));if(e instanceof rb||"events"===r.observe)return o;const a=o.pipe(gn(l=>l instanceof hR));switch(r.observe||"body"){case"body":switch(s.responseType){case"arraybuffer":return a.pipe(et(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(et(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(et(l=>{if(null!==l.body&&"string"!=typeof l.body)throw new Error("Response is not a string.");return l.body}));default:return a.pipe(et(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 hu).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,fR(r,n))}post(e,n,r={}){return this.request("POST",e,fR(r,n))}put(e,n,r={}){return this.request("PUT",e,fR(r,n))}}return i.\u0275fac=function(e){return new(e||i)(ee(uR))},i.\u0275prov=ke({token:i,factory:i.\u0275fac}),i})();const aee=["*"];let eC;function sb(i){return function lee(){if(void 0===eC&&(eC=null,typeof window<"u")){const i=window;void 0!==i.trustedTypes&&(eC=i.trustedTypes.createPolicy("angular#components",{createHTML:t=>t}))}return eC}()?.createHTML(i)||i}function XV(i){return Error(`Unable to find icon with the name "${i}"`)}function KV(i){return Error(`The URL provided to MatIconRegistry was not trusted as a resource URL via Angular's DomSanitizer. Attempted URL was "${i}".`)}function ZV(i){return Error(`The literal provided to MatIconRegistry was not trusted as safe HTML by Angular's DomSanitizer. Attempted literal was "${i}".`)}class Vh{constructor(t,e,n){this.url=t,this.svgText=e,this.options=n}}let tC=(()=>{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 Vh(r,null,s))}addSvgIconResolver(e){return this._resolvers.push(e),this}addSvgIconLiteralInNamespace(e,n,r,s){const o=this._sanitizer.sanitize(Kn.HTML,r);if(!o)throw ZV(r);const a=sb(o);return this._addSvgIconConfig(e,n,new Vh("",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 Vh(n,null,r))}addSvgIconSetLiteralInNamespace(e,n,r){const s=this._sanitizer.sanitize(Kn.HTML,n);if(!s)throw ZV(n);const o=sb(s);return this._addSvgIconSetConfig(e,new Vh("",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(Kn.RESOURCE_URL,e);if(!n)throw KV(e);const r=this._cachedIconsByUrl.get(n);return r?ht(nC(r)):this._loadSvgIconFromConfig(new Vh(e,null)).pipe(Vi(s=>this._cachedIconsByUrl.set(n,s)),et(s=>nC(s)))}getNamedSvgIcon(e,n=""){const r=QV(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(XV(r))}ngOnDestroy(){this._resolvers=[],this._svgIconConfigs.clear(),this._iconSetConfigs.clear(),this._cachedIconsByUrl.clear()}_getSvgFromConfig(e){return e.svgText?ht(nC(this._svgElementFromConfig(e))):this._loadSvgIconFromConfig(e).pipe(et(n=>nC(n)))}_getSvgFromIconSetConfigs(e,n){const r=this._extractIconWithNameFromAnySet(e,n);return r?ht(r):LV(n.filter(o=>!o.svgText).map(o=>this._loadSvgIconSetFromConfig(o).pipe(Wc(a=>{const c=`Loading icon set URL: ${this._sanitizer.sanitize(Kn.RESOURCE_URL,o.url)} failed: ${a.message}`;return this._errorHandler.handleError(new Error(c)),ht(null)})))).pipe(et(()=>{const o=this._extractIconWithNameFromAnySet(e,n);if(!o)throw XV(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(Vi(n=>e.svgText=n),et(()=>this._svgElementFromConfig(e)))}_loadSvgIconSetFromConfig(e){return e.svgText?ht(null):this._fetchIcon(e).pipe(Vi(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(sb(""));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(sb("")),r=e.attributes;for(let s=0;ssb(c)),su(()=>this._inProgressUrlFetches.delete(o)),Uf());return this._inProgressUrlFetches.set(o,l),l}_addSvgIconConfig(e,n,r){return this._svgIconConfigs.set(QV(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:""}}}),JV=["clip-path","color-profile","src","cursor","fill","filter","marker","marker-start","marker-mid","marker-end","mask","stroke"],gee=JV.map(i=>`[${i}]`).join(", "),_ee=/^url\(['"]?#(.*?)['"]?\)$/;let gR=(()=>{class i extends hee{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=Zt.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(gee),r=this._elementsWithExternalReferences=this._elementsWithExternalReferences||new Map;for(let s=0;s{const a=n[s],l=a.getAttribute(o),c=l?l.match(_ee):null;if(c){let d=r.get(a);d||(d=[],r.set(a,d)),d.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(Oi(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)(E(mt),E(tC),ya("aria-hidden"),E(pee),E(al),E(fee,8))},i.\u0275cmp=ot({type:i,selectors:[["mat-icon"]],hostAttrs:["role","img",1,"mat-icon","notranslate"],hostVars:8,hostBindings:function(e,n){2&e&&(Dt("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),un("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:[lt],ngContentSelectors:aee,decls:1,vars:0,template:function(e,n){1&e&&(sr(),Wt(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})(),ez=(()=>{class i{}return i.\u0275fac=function(e){return new(e||i)},i.\u0275mod=nn({type:i}),i.\u0275inj=Kt({imports:[Qn,Qn]}),i})(),tz=(()=>{class i{constructor(e){this.viewContainerRef=e}}return i.\u0275fac=function(e){return new(e||i)(E(Wr))},i.\u0275dir=ve({type:i,selectors:[["","dataBlockUI",""]]}),i})(),vee=(()=>{class i{constructor(){this.resource=null,this.name="",this.resourceDescription="",this.changed=new We}}return i.\u0275fac=function(e){return new(e||i)},i.\u0275cmp=ot({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&&(W(0,"p",0),Ve(1),j()),2&e&&(U("matTooltip",n.resourceDescription),G(1),tm("",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:[Os],changeDetection:0}),i})();function yee(i,t){if(1&i&&(W(0,"h2",4),Ve(1),j()),2&i){const e=he();U("matTooltip",e.resourceDescription),G(1),_i(e.name)}}function bee(i,t){1&i&&De(0,"app-block-actions",5),2&i&&U("resource",he().resource)}const xee=function(i,t,e,n){return{id:i,name:t,data:e,schema:n}};function wee(i,t){if(1&i&&De(0,"app-editor",7),2&i){const e=he().$implicit,n=he();U("resource",L2(3,xee,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 Mee(i,t){if(1&i&&(Gr(0),fe(1,wee,1,8,"app-editor",6),Ct(2,"async"),$r()),2&i){const e=t.$implicit,n=he();G(1),U("ngIf",!(Tt(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 Jl=(()=>{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 We,this.destroyed$=new Re}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(He(this.destroyed$),gn(([n,r])=>!!this.resource&&n.startsWith(this.resource.id)&&!n.substring(this.resource.id.length+1).includes("/"))).subscribe(function(){var n=tt(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)(E(ka))},i.\u0275cmp=ot({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&&(fe(0,yee,2,2,"h2",0),Ct(1,"async"),fe(2,bee,1,1,"app-block-actions",1),W(3,"div",2),fe(4,Mee,3,3,"ng-container",3),j()),2&e){let r;U("ngIf",n.name&&n.name!=(null==(r=Tt(1,4,n.main.resource$))?null:r.name)),G(2),U("ngIf",!n.hideBlockActions),G(2),U("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})(),nz=(()=>{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)(E(ol),E(mt))},i.\u0275dir=ve({type:i}),i})(),zh=(()=>{class i extends nz{}return i.\u0275fac=function(){let t;return function(n){return(t||(t=ri(i)))(n||i)}}(),i.\u0275dir=ve({type:i,features:[lt]}),i})();const Do=new me("NgValueAccessor"),See={provide:Do,useExisting:Gn(()=>gl),multi:!0},Aee=new me("CompositionEventMode");let gl=(()=>{class i extends nz{constructor(e,n,r){super(e,n),this._compositionMode=r,this._composing=!1,null==this._compositionMode&&(this._compositionMode=!function Eee(){const i=Hc()?Hc().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)(E(ol),E(mt),E(Aee,8))},i.\u0275dir=ve({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&&Ue("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:[Dn([See]),lt]}),i})();const Dee=!1;function fu(i){return null==i||("string"==typeof i||Array.isArray(i))&&0===i.length}function rz(i){return null!=i&&"number"==typeof i.length}const Yr=new me("NgValidators"),pu=new me("NgAsyncValidators"),Tee=/^(?=.{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 _l{static min(t){return sz(t)}static max(t){return oz(t)}static required(t){return function az(i){return fu(i.value)?{required:!0}:null}(t)}static requiredTrue(t){return function lz(i){return!0===i.value?null:{required:!0}}(t)}static email(t){return function cz(i){return fu(i.value)||Tee.test(i.value)?null:{email:!0}}(t)}static minLength(t){return dz(t)}static maxLength(t){return uz(t)}static pattern(t){return function hz(i){if(!i)return iC;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(fu(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 vz(t)}static composeAsync(t){return yz(t)}}function sz(i){return t=>{if(fu(t.value)||fu(i))return null;const e=parseFloat(t.value);return!isNaN(e)&&e{if(fu(t.value)||fu(i))return null;const e=parseFloat(t.value);return!isNaN(e)&&e>i?{max:{max:i,actual:t.value}}:null}}function dz(i){return t=>fu(t.value)||!rz(t.value)?null:t.value.lengthrz(t.value)&&t.value.length>i?{maxlength:{requiredLength:i,actualLength:t.value.length}}:null}function iC(i){return null}function fz(i){return null!=i}function pz(i){const t=oy(i)?Ni(i):i;if(Dee&&!L1(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 pe(-1101,e)}return t}function mz(i){let t={};return i.forEach(e=>{t=null!=e?{...t,...e}:t}),0===Object.keys(t).length?null:t}function gz(i,t){return t.map(e=>e(i))}function _z(i){return i.map(t=>function Iee(i){return!i.validate}(t)?t:e=>t.validate(e))}function vz(i){if(!i)return null;const t=i.filter(fz);return 0==t.length?null:function(e){return mz(gz(e,t))}}function _R(i){return null!=i?vz(_z(i)):null}function yz(i){if(!i)return null;const t=i.filter(fz);return 0==t.length?null:function(e){return LV(gz(e,t).map(pz)).pipe(et(mz))}}function vR(i){return null!=i?yz(_z(i)):null}function bz(i,t){return null===i?[t]:Array.isArray(i)?[...i,t]:[i,t]}function xz(i){return i._rawValidators}function wz(i){return i._rawAsyncValidators}function yR(i){return i?Array.isArray(i)?i:[i]:[]}function rC(i,t){return Array.isArray(i)?i.includes(t):i===t}function Mz(i,t){const e=yR(t);return yR(i).forEach(r=>{rC(e,r)||e.push(r)}),e}function Cz(i,t){return yR(t).filter(e=>!rC(i,e))}class Sz{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=_R(this._rawValidators)}_setAsyncValidators(t){this._rawAsyncValidators=t||[],this._composedAsyncValidatorFn=vR(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 ao extends Sz{get formDirective(){return null}get path(){return null}}class ec extends Sz{constructor(){super(...arguments),this._parent=null,this.name=null,this.valueAccessor=null}}class Ez{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 tc=(()=>{class i extends Ez{constructor(e){super(e)}}return i.\u0275fac=function(e){return new(e||i)(E(ec,2))},i.\u0275dir=ve({type:i,selectors:[["","formControlName",""],["","ngModel",""],["","formControl",""]],hostVars:14,hostBindings:function(e,n){2&e&&un("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:[lt]}),i})(),bR=(()=>{class i extends Ez{constructor(e){super(e)}}return i.\u0275fac=function(e){return new(e||i)(E(ao,10))},i.\u0275dir=ve({type:i,selectors:[["","formGroupName",""],["","formArrayName",""],["","ngModelGroup",""],["","formGroup",""],["form",3,"ngNoForm",""],["","ngForm",""]],hostVars:16,hostBindings:function(e,n){2&e&&un("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:[lt]}),i})();function Az(i,t){return i?`with name: '${t}'`:`at index: ${t}`}const MR=!1,ob="VALID",oC="INVALID",zm="PENDING",ab="DISABLED";function CR(i){return(aC(i)?i.validators:i)||null}function SR(i,t){return(aC(t)?t.asyncValidators:i)||null}function aC(i){return null!=i&&!Array.isArray(i)&&"object"==typeof i}function Dz(i,t,e){const n=i.controls;if(!(t?Object.keys(n):n).length)throw new pe(1e3,MR?function Oee(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 pe(1001,MR?function Fee(i,t){return`Cannot find form control ${Az(i,t)}`}(t,e):"")}function Tz(i,t,e){i._forEachChild((n,r)=>{if(void 0===e[r])throw new pe(1002,MR?function Lee(i,t){return`Must supply a value for form control ${Az(i,t)}`}(t,r):"")})}class lC{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===ob}get invalid(){return this.status===oC}get pending(){return this.status==zm}get disabled(){return this.status===ab}get enabled(){return this.status!==ab}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(Mz(t,this._rawValidators))}addAsyncValidators(t){this.setAsyncValidators(Mz(t,this._rawAsyncValidators))}removeValidators(t){this.setValidators(Cz(t,this._rawValidators))}removeAsyncValidators(t){this.setAsyncValidators(Cz(t,this._rawAsyncValidators))}hasValidator(t){return rC(this._rawValidators,t)}hasAsyncValidator(t){return rC(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=ab,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=ob,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===ob||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()?ab:ob}_runValidator(){return this.validator?this.validator(this):null}_runAsyncValidator(t){if(this.asyncValidator){this.status=zm,this._hasOwnPendingAsyncValidator=!0;const e=pz(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 We,this.statusChanges=new We}_calculateStatus(){return this._allControlsDisabled()?ab:this.errors?oC:this._hasOwnPendingAsyncValidator||this._anyControlsHaveStatus(zm)?zm:this._anyControlsHaveStatus(oC)?oC:ob}_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){aC(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 Nee(i){return Array.isArray(i)?_R(i):i||null}(this._rawValidators)}_assignAsyncValidators(t){this._rawAsyncValidators=Array.isArray(t)?t.slice():t,this._composedAsyncValidatorFn=function Bee(i){return Array.isArray(i)?vR(i):i||null}(this._rawAsyncValidators)}}class Hm extends lC{constructor(t,e,n){super(CR(e),SR(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={}){Tz(this,!0,t),Object.keys(t).forEach(n=>{Dz(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 Iz extends Hm{}const Hh=new me("CallSetDisabledState",{providedIn:"root",factory:()=>lb}),lb="always";function cC(i,t){return[...t.path,i]}function cb(i,t,e=lb){ER(i,t),t.valueAccessor.writeValue(i.value),(i.disabled||"always"===e)&&t.valueAccessor.setDisabledState?.(i.disabled),function Vee(i,t){t.valueAccessor.registerOnChange(e=>{i._pendingValue=e,i._pendingChange=!0,i._pendingDirty=!0,"change"===i.updateOn&&Rz(i,t)})}(i,t),function Hee(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 zee(i,t){t.valueAccessor.registerOnTouched(()=>{i._pendingTouched=!0,"blur"===i.updateOn&&i._pendingChange&&Rz(i,t),"submit"!==i.updateOn&&i.markAsTouched()})}(i,t),function Uee(i,t){if(t.valueAccessor.setDisabledState){const e=n=>{t.valueAccessor.setDisabledState(n)};i.registerOnDisabledChange(e),t._registerOnDestroy(()=>{i._unregisterOnDisabledChange(e)})}}(i,t)}function dC(i,t,e=!0){const n=()=>{};t.valueAccessor&&(t.valueAccessor.registerOnChange(n),t.valueAccessor.registerOnTouched(n)),hC(i,t),i&&(t._invokeOnDestroyCallbacks(),i._registerOnCollectionChange(()=>{}))}function uC(i,t){i.forEach(e=>{e.registerOnValidatorChange&&e.registerOnValidatorChange(t)})}function ER(i,t){const e=xz(i);null!==t.validator?i.setValidators(bz(e,t.validator)):"function"==typeof e&&i.setValidators([e]);const n=wz(i);null!==t.asyncValidator?i.setAsyncValidators(bz(n,t.asyncValidator)):"function"==typeof n&&i.setAsyncValidators([n]);const r=()=>i.updateValueAndValidity();uC(t._rawValidators,r),uC(t._rawAsyncValidators,r)}function hC(i,t){let e=!1;if(null!==i){if(null!==t.validator){const r=xz(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=wz(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 uC(t._rawValidators,n),uC(t._rawAsyncValidators,n),e}function Rz(i,t){i._pendingDirty&&i.markAsDirty(),i.setValue(i._pendingValue,{emitModelToViewChange:!1}),t.viewToModelUpdate(i._pendingValue),i._pendingChange=!1}function kz(i,t){ER(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 Pz(i,t){i._syncPendingControls(),t.forEach(e=>{const n=e.control;"submit"===n.updateOn&&n._pendingChange&&(e.viewToModelUpdate(n._pendingValue),n._pendingChange=!1)})}function TR(i,t){if(!t)return null;let e,n,r;return Array.isArray(t),t.forEach(s=>{s.constructor===gl?e=s:function Wee(i){return Object.getPrototypeOf(i.constructor)===zh}(s)?n=s:r=s}),r||n||e||null}const Yee={provide:ao,useExisting:Gn(()=>ub)},db=(()=>Promise.resolve())();let ub=(()=>{class i extends ao{constructor(e,n,r){super(),this.callSetDisabledState=r,this.submitted=!1,this._directives=new Set,this.ngSubmit=new We,this.form=new Hm({},_R(e),vR(n))}ngAfterViewInit(){this._setUpdateStrategy()}get formDirective(){return this}get control(){return this.form}get path(){return[]}get controls(){return this.form.controls}addControl(e){db.then(()=>{const n=this._findContainer(e.path);e.control=n.registerControl(e.name,e.control),cb(e.control,e,this.callSetDisabledState),e.control.updateValueAndValidity({emitEvent:!1}),this._directives.add(e)})}getControl(e){return this.form.get(e.path)}removeControl(e){db.then(()=>{const n=this._findContainer(e.path);n&&n.removeControl(e.name),this._directives.delete(e)})}addFormGroup(e){db.then(()=>{const n=this._findContainer(e.path),r=new Hm({});kz(r,e),n.registerControl(e.name,r),r.updateValueAndValidity({emitEvent:!1})})}removeFormGroup(e){db.then(()=>{const n=this._findContainer(e.path);n&&n.removeControl(e.name)})}getFormGroup(e){return this.form.get(e.path)}updateModel(e,n){db.then(()=>{this.form.get(e.path).setValue(n)})}setValue(e){this.control.setValue(e)}onSubmit(e){return this.submitted=!0,Pz(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)(E(Yr,10),E(pu,10),E(Hh,8))},i.\u0275dir=ve({type:i,selectors:[["form",3,"ngNoForm","",3,"formGroup",""],["ng-form"],["","ngForm",""]],hostBindings:function(e,n){1&e&&Ue("submit",function(s){return n.onSubmit(s)})("reset",function(){return n.onReset()})},inputs:{options:["ngFormOptions","options"]},outputs:{ngSubmit:"ngSubmit"},exportAs:["ngForm"],features:[Dn([Yee]),lt]}),i})();function Oz(i,t){const e=i.indexOf(t);e>-1&&i.splice(e,1)}function Fz(i){return"object"==typeof i&&null!==i&&2===Object.keys(i).length&&"value"in i&&"disabled"in i}const nc=class extends lC{constructor(t=null,e,n){super(CR(e),SR(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}),aC(e)&&(e.nonNullable||e.initialValueIsDefault)&&(this.defaultValue=Fz(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){Oz(this._onChange,t)}registerOnDisabledChange(t){this._onDisabledChange.push(t)}_unregisterOnDisabledChange(t){Oz(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){Fz(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}},Kee={provide:ec,useExisting:Gn(()=>Kc)},Bz=(()=>Promise.resolve())();let Kc=(()=>{class i extends ec{constructor(e,n,r,s,o,a){super(),this._changeDetectorRef=o,this.callSetDisabledState=a,this.control=new nc,this._registered=!1,this.update=new We,this._parent=e,this._setValidators(n),this._setAsyncValidators(r),this.valueAccessor=TR(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(){cb(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){Bz.then(()=>{this.control.setValue(e,{emitViewToModelChange:!1}),this._changeDetectorRef?.markForCheck()})}_updateDisabled(e){const n=e.isDisabled.currentValue,r=0!==n&&function um(i){return"boolean"==typeof i?i:null!=i&&"false"!==i}(n);Bz.then(()=>{r&&!this.control.disabled?this.control.disable():!r&&this.control.disabled&&this.control.enable(),this._changeDetectorRef?.markForCheck()})}_getPath(e){return this._parent?cC(e,this._parent):[e]}}return i.\u0275fac=function(e){return new(e||i)(E(ao,9),E(Yr,10),E(pu,10),E(Do,10),E(Zn,8),E(Hh,8))},i.\u0275dir=ve({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:[Dn([Kee]),lt,bi]}),i})(),IR=(()=>{class i{}return i.\u0275fac=function(e){return new(e||i)},i.\u0275dir=ve({type:i,selectors:[["form",3,"ngNoForm","",3,"ngNativeValidate",""]],hostAttrs:["novalidate",""]}),i})();const Zee={provide:Do,useExisting:Gn(()=>mu),multi:!0};let mu=(()=>{class i extends zh{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=ri(i)))(n||i)}}(),i.\u0275dir=ve({type:i,selectors:[["input","type","number","formControlName",""],["input","type","number","formControl",""],["input","type","number","ngModel",""]],hostBindings:function(e,n){1&e&&Ue("input",function(s){return n.onChange(s.target.value)})("blur",function(){return n.onTouched()})},features:[Dn([Zee]),lt]}),i})(),Uz=(()=>{class i{}return i.\u0275fac=function(e){return new(e||i)},i.\u0275mod=nn({type:i}),i.\u0275inj=Kt({}),i})();const RR=new me("NgModelWithFormControlWarning"),nte={provide:ao,useExisting:Gn(()=>Gh)};let Gh=(()=>{class i extends ao{constructor(e,n,r){super(),this.callSetDisabledState=r,this.submitted=!1,this._onCollectionChange=()=>this._updateDomValue(),this.directives=[],this.form=null,this.ngSubmit=new We,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&&(hC(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 cb(n,e,this.callSetDisabledState),n.updateValueAndValidity({emitEvent:!1}),this.directives.push(e),n}getControl(e){return this.form.get(e.path)}removeControl(e){dC(e.control||null,e,!1),function jee(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,Pz(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&&(dC(n||null,e),(i=>i instanceof nc)(r)&&(cb(r,e,this.callSetDisabledState),e.control=r))}),this.form._updateTreeValidity({emitEvent:!1})}_setUpFormContainer(e){const n=this.form.get(e.path);kz(n,e),n.updateValueAndValidity({emitEvent:!1})}_cleanUpFormContainer(e){if(this.form){const n=this.form.get(e.path);n&&function Gee(i,t){return hC(i,t)}(n,e)&&n.updateValueAndValidity({emitEvent:!1})}}_updateRegistrations(){this.form._registerOnCollectionChange(this._onCollectionChange),this._oldForm&&this._oldForm._registerOnCollectionChange(()=>{})}_updateValidators(){ER(this.form,this),this._oldForm&&hC(this._oldForm,this)}_checkFormPresent(){}}return i.\u0275fac=function(e){return new(e||i)(E(Yr,10),E(pu,10),E(Hh,8))},i.\u0275dir=ve({type:i,selectors:[["","formGroup",""]],hostBindings:function(e,n){1&e&&Ue("submit",function(s){return n.onSubmit(s)})("reset",function(){return n.onReset()})},inputs:{form:["formGroup","form"]},outputs:{ngSubmit:"ngSubmit"},exportAs:["ngForm"],features:[Dn([nte]),lt,bi]}),i})();const ste={provide:ec,useExisting:Gn(()=>fC)};let fC=(()=>{class i extends ec{set isDisabled(e){}constructor(e,n,r,s,o){super(),this._ngModelWarningConfig=o,this._added=!1,this.update=new We,this._ngModelWarningSent=!1,this._parent=e,this._setValidators(n),this._setAsyncValidators(r),this.valueAccessor=TR(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 cC(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)(E(ao,13),E(Yr,10),E(pu,10),E(Do,10),E(RR,8))},i.\u0275dir=ve({type:i,selectors:[["","formControlName",""]],inputs:{name:["formControlName","name"],isDisabled:["disabled","isDisabled"],model:["ngModel","model"]},outputs:{update:"ngModelChange"},features:[Dn([ste]),lt,bi]}),i})();function jz(i){return"number"==typeof i?i:parseInt(i,10)}function Yz(i){return"number"==typeof i?i:parseFloat(i)}let $h=(()=>{class i{constructor(){this._validator=iC}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):iC,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=ve({type:i,features:[bi]}),i})();const hte={provide:Yr,useExisting:Gn(()=>gu),multi:!0};let gu=(()=>{class i extends $h{constructor(){super(...arguments),this.inputName="max",this.normalizeInput=e=>Yz(e),this.createValidator=e=>oz(e)}}return i.\u0275fac=function(){let t;return function(n){return(t||(t=ri(i)))(n||i)}}(),i.\u0275dir=ve({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&&Dt("max",n._enabled?n.max:null)},inputs:{max:"max"},features:[Dn([hte]),lt]}),i})();const fte={provide:Yr,useExisting:Gn(()=>_u),multi:!0};let _u=(()=>{class i extends $h{constructor(){super(...arguments),this.inputName="min",this.normalizeInput=e=>Yz(e),this.createValidator=e=>sz(e)}}return i.\u0275fac=function(){let t;return function(n){return(t||(t=ri(i)))(n||i)}}(),i.\u0275dir=ve({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&&Dt("min",n._enabled?n.min:null)},inputs:{min:"min"},features:[Dn([fte]),lt]}),i})();const _te={provide:Yr,useExisting:Gn(()=>NR),multi:!0};let NR=(()=>{class i extends $h{constructor(){super(...arguments),this.inputName="minlength",this.normalizeInput=e=>jz(e),this.createValidator=e=>dz(e)}}return i.\u0275fac=function(){let t;return function(n){return(t||(t=ri(i)))(n||i)}}(),i.\u0275dir=ve({type:i,selectors:[["","minlength","","formControlName",""],["","minlength","","formControl",""],["","minlength","","ngModel",""]],hostVars:1,hostBindings:function(e,n){2&e&&Dt("minlength",n._enabled?n.minlength:null)},inputs:{minlength:"minlength"},features:[Dn([_te]),lt]}),i})();const vte={provide:Yr,useExisting:Gn(()=>BR),multi:!0};let BR=(()=>{class i extends $h{constructor(){super(...arguments),this.inputName="maxlength",this.normalizeInput=e=>jz(e),this.createValidator=e=>uz(e)}}return i.\u0275fac=function(){let t;return function(n){return(t||(t=ri(i)))(n||i)}}(),i.\u0275dir=ve({type:i,selectors:[["","maxlength","","formControlName",""],["","maxlength","","formControl",""],["","maxlength","","ngModel",""]],hostVars:1,hostBindings:function(e,n){2&e&&Dt("maxlength",n._enabled?n.maxlength:null)},inputs:{maxlength:"maxlength"},features:[Dn([vte]),lt]}),i})(),Zz=(()=>{class i{}return i.\u0275fac=function(e){return new(e||i)},i.\u0275mod=nn({type:i}),i.\u0275inj=Kt({imports:[Uz]}),i})();class Qz extends lC{constructor(t,e,n){super(CR(e),SR(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={}){Tz(this,!1,t),t.forEach((n,r)=>{Dz(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 Jz(i){return!!i&&(void 0!==i.asyncValidators||void 0!==i.validators||void 0!==i.updateOn)}let bte=(()=>{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 Jz(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 Iz(r,n)}control(e,n,r){let s={};return this.useNonNullable?(Jz(n)?s=n:(s.validators=n,s.asyncValidators=r),new nc(e,{...s,nonNullable:!0})):new nc(e,n,r)}array(e,n,r){const s=e.map(o=>this._createControl(o));return new Qz(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 nc||e instanceof lC?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=ke({token:i,factory:i.\u0275fac,providedIn:"root"}),i})(),eH=(()=>{class i{static withConfig(e){return{ngModule:i,providers:[{provide:Hh,useValue:e.callSetDisabledState??lb}]}}}return i.\u0275fac=function(e){return new(e||i)},i.\u0275mod=nn({type:i}),i.\u0275inj=Kt({imports:[Zz]}),i})(),tH=(()=>{class i{static withConfig(e){return{ngModule:i,providers:[{provide:RR,useValue:e.warnOnNgModelWithFormControl??"always"},{provide:Hh,useValue:e.callSetDisabledState??lb}]}}}return i.\u0275fac=function(e){return new(e||i)},i.\u0275mod=nn({type:i}),i.\u0275inj=Kt({imports:[Zz]}),i})();const xte=["matFormFieldNotchedOutline",""],wte=["*"],Mte=["textField"],Cte=["iconPrefixContainer"],Ste=["textPrefixContainer"];function Ete(i,t){1&i&&De(0,"span",19)}function Ate(i,t){if(1&i){const e=di();W(0,"label",17),Ue("cdkObserveContent",function(){return an(e),zt(he(2)._refreshOutlineNotchWidth())}),Wt(1,1),fe(2,Ete,1,0,"span",18),j()}if(2&i){const e=he(2);U("floating",e._shouldLabelFloat())("cdkObserveContentDisabled",!e._hasOutline())("id",e._labelId),Dt("for",e._control.id)("aria-owns",e._control.id),G(2),U("ngIf",!e.hideRequiredMarker&&e._control.required)}}function Dte(i,t){1&i&&fe(0,Ate,3,6,"label",16),2&i&&U("ngIf",he()._hasFloatingLabel())}function Tte(i,t){1&i&&De(0,"div",20)}function Ite(i,t){}function Rte(i,t){1&i&&fe(0,Ite,0,0,"ng-template",22),2&i&&(he(2),U("ngTemplateOutlet",Zi(1)))}function kte(i,t){if(1&i&&(W(0,"div",21),fe(1,Rte,1,1,"ng-template",9),j()),2&i){const e=he();U("matFormFieldNotchedOutlineOpen",e._shouldLabelFloat())("matFormFieldNotchedOutlineLabelWidth",e._labelWidth),G(1),U("ngIf",!e._forceDisplayInfixLabel())}}function Pte(i,t){1&i&&(W(0,"div",23,24),Wt(2,2),j())}function Ote(i,t){1&i&&(W(0,"div",25,26),Wt(2,3),j())}function Fte(i,t){}function Lte(i,t){1&i&&fe(0,Fte,0,0,"ng-template",22),2&i&&(he(),U("ngTemplateOutlet",Zi(1)))}function Nte(i,t){1&i&&(W(0,"div",27),Wt(1,4),j())}function Bte(i,t){1&i&&(W(0,"div",28),Wt(1,5),j())}function Ute(i,t){1&i&&De(0,"div",29)}function Vte(i,t){1&i&&(W(0,"div",30),Wt(1,6),j()),2&i&&U("@transitionMessages",he()._subscriptAnimationState)}function zte(i,t){if(1&i&&(W(0,"mat-hint",34),Ve(1),j()),2&i){const e=he(2);U("id",e._hintLabelId),G(1),_i(e.hintLabel)}}function Hte(i,t){if(1&i&&(W(0,"div",31),fe(1,zte,2,2,"mat-hint",32),Wt(2,7),De(3,"div",33),Wt(4,8),j()),2&i){const e=he();U("@transitionMessages",e._subscriptAnimationState),G(1),U("ngIf",e.hintLabel)}}const Gte=["*",[["mat-label"]],[["","matPrefix",""],["","matIconPrefix",""]],[["","matTextPrefix",""]],[["","matTextSuffix",""]],[["","matSuffix",""],["","matIconSuffix",""]],[["mat-error"],["","matError",""]],[["mat-hint",3,"align","end"]],[["mat-hint","align","end"]]],$te=["*","mat-label","[matPrefix], [matIconPrefix]","[matTextPrefix]","[matTextSuffix]","[matSuffix], [matIconSuffix]","mat-error, [matError]","mat-hint:not([align='end'])","mat-hint[align='end']"];let To=(()=>{class i{}return i.\u0275fac=function(e){return new(e||i)},i.\u0275dir=ve({type:i,selectors:[["mat-label"]]}),i})(),Wte=0;const nH=new me("MatError");let jte=(()=>{class i{constructor(e,n){this.id="mat-mdc-error-"+Wte++,e||n.nativeElement.setAttribute("aria-live","polite")}}return i.\u0275fac=function(e){return new(e||i)(ya("aria-live"),E(mt))},i.\u0275dir=ve({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&&Yl("id",n.id)},inputs:{id:"id"},features:[Dn([{provide:nH,useExisting:i}])]}),i})(),Yte=0,iH=(()=>{class i{constructor(){this.align="start",this.id="mat-mdc-hint-"+Yte++}}return i.\u0275fac=function(e){return new(e||i)},i.\u0275dir=ve({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&&(Yl("id",n.id),Dt("align",null),un("mat-mdc-form-field-hint-end","end"===n.align))},inputs:{align:"align",id:"id"}}),i})();const rH=new me("MatPrefix");let qte=(()=>{class i{constructor(){this._isText=!1}set _isTextSelector(e){this._isText=!0}}return i.\u0275fac=function(e){return new(e||i)},i.\u0275dir=ve({type:i,selectors:[["","matPrefix",""],["","matIconPrefix",""],["","matTextPrefix",""]],inputs:{_isTextSelector:["matTextPrefix","_isTextSelector"]},features:[Dn([{provide:rH,useExisting:i}])]}),i})();const sH=new me("MatSuffix");let Xte=(()=>{class i{constructor(){this._isText=!1}set _isTextSelector(e){this._isText=!0}}return i.\u0275fac=function(e){return new(e||i)},i.\u0275dir=ve({type:i,selectors:[["","matSuffix",""],["","matIconSuffix",""],["","matTextSuffix",""]],inputs:{_isTextSelector:["matTextSuffix","_isTextSelector"]},features:[Dn([{provide:sH,useExisting:i}])]}),i})(),oH=(()=>{class i{constructor(e){this._elementRef=e,this.floating=!1}getWidth(){return function Kte(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)(E(mt))},i.\u0275dir=ve({type:i,selectors:[["label","matFormFieldFloatingLabel",""]],hostAttrs:[1,"mdc-floating-label","mat-mdc-floating-label"],hostVars:2,hostBindings:function(e,n){2&e&&un("mdc-floating-label--float-above",n.floating)},inputs:{floating:"floating"}}),i})();const aH="mdc-line-ripple--active",pC="mdc-line-ripple--deactivating";let lH=(()=>{class i{constructor(e,n){this._elementRef=e,this._handleTransitionEnd=r=>{const s=this._elementRef.nativeElement.classList,o=s.contains(pC);"opacity"===r.propertyName&&o&&s.remove(aH,pC)},n.runOutsideAngular(()=>{e.nativeElement.addEventListener("transitionend",this._handleTransitionEnd)})}activate(){const e=this._elementRef.nativeElement.classList;e.remove(pC),e.add(aH)}deactivate(){this._elementRef.nativeElement.classList.add(pC)}ngOnDestroy(){this._elementRef.nativeElement.removeEventListener("transitionend",this._handleTransitionEnd)}}return i.\u0275fac=function(e){return new(e||i)(E(mt),E(ft))},i.\u0275dir=ve({type:i,selectors:[["div","matFormFieldLineRipple",""]],hostAttrs:[1,"mdc-line-ripple"]}),i})(),cH=(()=>{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)(E(mt),E(ft))},i.\u0275cmp=ot({type:i,selectors:[["div","matFormFieldNotchedOutline",""]],hostAttrs:[1,"mdc-notched-outline"],hostVars:2,hostBindings:function(e,n){2&e&&un("mdc-notched-outline--notched",n.open)},inputs:{labelWidth:["matFormFieldNotchedOutlineLabelWidth","labelWidth"],open:["matFormFieldNotchedOutlineOpen","open"]},attrs:xte,ngContentSelectors:wte,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&&(sr(),De(0,"div",0),W(1,"div",1),Wt(2),j(),De(3,"div",2)),2&e&&(G(1),jo("width",n._getNotchWidth()))},encapsulation:2,changeDetection:0}),i})();const Zte={transitionMessages:Ra("transitionMessages",[Ps("enter",si({opacity:1,transform:"translateY(0%)"})),Pr("void => enter",[si({opacity:0,transform:"translateY(-5px)"}),jr("300ms cubic-bezier(0.55, 0, 0.55, 0.2)")])])};let UR=(()=>{class i{}return i.\u0275fac=function(e){return new(e||i)},i.\u0275dir=ve({type:i}),i})();const mC=new me("MatFormField"),Qte=new me("MAT_FORM_FIELD_DEFAULT_OPTIONS");let dH=0,vl=(()=>{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-"+dH++,this._hintLabelId="mat-mdc-hint-"+dH++,this._subscriptAnimationState="",this._labelWidth=0,this._destroyed=new Re,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(He(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(),Mr(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(He(this._destroyed)).subscribe(()=>{this._needsOutlineLabelOffsetUpdateOnStable&&(this._needsOutlineLabelOffsetUpdateOnStable=!1,this._updateOutlineLabelOffset())})}),this._dir.change.pipe(He(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)(E(mt),E(Zn),E(ft),E(Ia),E(zi),E(Qte,8),E(Rr,8),E(jt))},i.\u0275cmp=ot({type:i,selectors:[["mat-form-field"]],contentQueries:function(e,n,r){if(1&e&&(Wi(r,To,5),Wi(r,To,7),Wi(r,UR,5),Wi(r,rH,5),Wi(r,sH,5),Wi(r,nH,5),Wi(r,iH,5)),2&e){let s;Et(s=At())&&(n._labelChildNonStatic=s.first),Et(s=At())&&(n._labelChildStatic=s.first),Et(s=At())&&(n._formFieldControl=s.first),Et(s=At())&&(n._prefixChildren=s),Et(s=At())&&(n._suffixChildren=s),Et(s=At())&&(n._errorChildren=s),Et(s=At())&&(n._hintChildren=s)}},viewQuery:function(e,n){if(1&e&&(Wn(Mte,5),Wn(Cte,5),Wn(Ste,5),Wn(oH,5),Wn(cH,5),Wn(lH,5)),2&e){let r;Et(r=At())&&(n._textField=r.first),Et(r=At())&&(n._iconPrefixContainer=r.first),Et(r=At())&&(n._textPrefixContainer=r.first),Et(r=At())&&(n._floatingLabel=r.first),Et(r=At())&&(n._notchedOutline=r.first),Et(r=At())&&(n._lineRipple=r.first)}},hostAttrs:[1,"mat-mdc-form-field"],hostVars:42,hostBindings:function(e,n){2&e&&un("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:[Dn([{provide:mC,useExisting:i}])],ngContentSelectors:$te,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&&(sr(Gte),fe(0,Dte,1,1,"ng-template",null,0,Vc),W(2,"div",1,2),Ue("click",function(s){return n._control.onContainerClick&&n._control.onContainerClick(s)}),fe(4,Tte,1,0,"div",3),W(5,"div",4),fe(6,kte,2,3,"div",5),fe(7,Pte,3,0,"div",6),fe(8,Ote,3,0,"div",7),W(9,"div",8),fe(10,Lte,1,1,"ng-template",9),Wt(11),j(),fe(12,Nte,2,0,"div",10),fe(13,Bte,2,0,"div",11),j(),fe(14,Ute,1,0,"div",12),j(),W(15,"div",13),fe(16,Vte,2,1,"div",14),fe(17,Hte,5,2,"div",15),j()),2&e&&(G(2),un("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),G(2),U("ngIf",!n._hasOutline()&&!n._control.disabled),G(2),U("ngIf",n._hasOutline()),G(1),U("ngIf",n._hasIconPrefix),G(1),U("ngIf",n._hasTextPrefix),G(2),U("ngIf",!n._hasOutline()||n._forceDisplayInfixLabel()),G(2),U("ngIf",n._hasTextSuffix),G(1),U("ngIf",n._hasIconSuffix),G(1),U("ngIf",!n._hasOutline()),G(1),un("mat-mdc-form-field-subscript-dynamic-size","dynamic"===n.subscriptSizing),U("ngSwitch",n._getDisplayedMessages()),G(1),U("ngSwitchCase","error"),G(1),U("ngSwitchCase","hint"))},dependencies:[vi,xy,by,VT,CU,iH,oH,cH,lH],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:[Zte.transitionMessages]},changeDetection:0}),i})(),gC=(()=>{class i{}return i.\u0275fac=function(e){return new(e||i)},i.\u0275mod=nn({type:i}),i.\u0275inj=Kt({imports:[Qn,Eo,HI,Qn]}),i})();const fH=Oh({passive:!0});let tne=(()=>{class i{constructor(e,n){this._platform=e,this._ngZone=n,this._monitoredElements=new Map}monitor(e){if(!this._platform.isBrowser)return po;const n=Yc(e),r=this._monitoredElements.get(n);if(r)return r.subject;const s=new Re,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,fH),n.classList.add("cdk-text-field-autofill-monitored")}),this._monitoredElements.set(n,{subject:s,unlisten:()=>{n.removeEventListener("animationstart",a,fH)}}),s}stopMonitoring(e){const n=Yc(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)(ee(zi),ee(ft))},i.\u0275prov=ke({token:i,factory:i.\u0275fac,providedIn:"root"}),i})(),nne=(()=>{class i{}return i.\u0275fac=function(e){return new(e||i)},i.\u0275mod=nn({type:i}),i.\u0275inj=Kt({}),i})();const VR=new me("MAT_INPUT_VALUE_ACCESSOR"),ine=["button","checkbox","file","hidden","image","radio","range","reset","submit"];let rne=0;const sne=$U(class{constructor(i,t,e,n){this._defaultErrorStateMatcher=i,this._parentForm=t,this._parentFormGroup=e,this.ngControl=n,this.stateChanges=new Re}});let ic=(()=>{class i extends sne{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(_l.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&&oU().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,d,h){super(a,s,o,r),this._elementRef=e,this._platform=n,this._autofillMonitor=c,this._formField=h,this._uid="mat-input-"+rne++,this.focused=!1,this.stateChanges=new Re,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=>oU().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&&d.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(){ine.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)(E(mt),E(zi),E(ec,10),E(ub,8),E(Gh,8),E(jU),E(VR,10),E(tne),E(ft),E(mC,8))},i.\u0275dir=ve({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&&Ue("focus",function(){return n._focusChanged(!0)})("blur",function(){return n._focusChanged(!1)})("input",function(){return n._onInput()}),2&e&&(Yl("id",n.id)("disabled",n.disabled)("required",n.required),Dt("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),un("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:[Dn([{provide:UR,useExisting:i}]),lt,bi]}),i})(),pH=(()=>{class i{}return i.\u0275fac=function(e){return new(e||i)},i.\u0275mod=nn({type:i}),i.\u0275inj=Kt({imports:[Qn,gC,gC,nne,Qn]}),i})();function one(i,t){if(1&i&&(W(0,"mat-label"),Ve(1),j()),2&i){const e=he(2);G(1),_i(e.resource.name)}}function ane(i,t){if(1&i){const e=di();W(0,"mat-form-field",1),fe(1,one,2,1,"mat-label",2),W(2,"input",3),Ue("ngModelChange",function(r){return an(e),zt(he().resource.data=r)})("change",function(){return an(e),zt(he().changed.emit())}),j()()}if(2&i){const e=he();U("matTooltip",e.resourceDescription),G(1),U("ngIf",e.resource.name),G(1),U("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 lne=(()=>{class i{constructor(){this.resource=null,this.resourceDescription="",this.disabled=!1,this.changed=new We}}return i.\u0275fac=function(e){return new(e||i)},i.\u0275cmp=ot({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&&fe(0,ane,3,7,"mat-form-field",0),2&e&&U("ngIf",n.resource)},dependencies:[vi,gl,mu,tc,_u,gu,Kc,vl,To,ic,Os],changeDetection:0}),i})();function cne(i,t){if(1&i&&(W(0,"mat-label"),Ve(1),j()),2&i){const e=he(2);G(1),_i(e.resource.name)}}function dne(i,t){if(1&i){const e=di();W(0,"mat-form-field",1),fe(1,cne,2,1,"mat-label",2),W(2,"input",3),Ue("ngModelChange",function(r){return an(e),zt(he().resource.data=r)})("change",function(){return an(e),zt(he().changed.emit())}),j()()}if(2&i){const e=he();U("matTooltip",e.resourceDescription),G(1),U("ngIf",e.resource.name),G(1),U("disabled",e.disabled||void 0!==e.resource.schema.required_value)("maxlength",e.maxLength)("minlength",e.minLength)("ngModel",e.resource.data)}}let mH=(()=>{class i{constructor(){this._resource=null,this.resourceDescription="",this.disabled=!1,this.changed=new We,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=ot({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&&fe(0,dne,3,6,"mat-form-field",0),2&e&&U("ngIf",n.resource)},dependencies:[vi,gl,tc,NR,BR,Kc,vl,To,ic,Os],changeDetection:0}),i})();const rc=(i,t)=>i+(i.includes("__")?"/":"__")+t,Wh=function(){return[]};function une(i,t){if(1&i&&(W(0,"mat-panel-description"),Ve(1," Click to view items ("),W(2,"b"),Ve(3),j(),Ve(4,") "),j()),2&i){const e=he(2);G(3),_i((e.resourceData||so(1,Wh)).length)}}function hne(i,t){1&i&&(W(0,"mat-panel-description"),Ve(1," Empty array "),j())}function fne(i,t){}function pne(i,t){if(1&i){const e=di();W(0,"mat-expansion-panel",4),Ue("opened",function(){return an(e),zt(he().onContentsTrigger(!0))})("closed",function(){return an(e),zt(he().onContentsTrigger(!1))}),W(1,"mat-expansion-panel-header",5)(2,"mat-panel-title"),Ve(3),j(),fe(4,une,5,2,"mat-panel-description",1),fe(5,hne,2,0,"mat-panel-description",1),j(),fe(6,fne,0,0,"ng-template",6),j()}if(2&i){const e=he(),n=Zi(3);G(1),U("matTooltip",e.resourceDescription),G(2),Qi(" ",e.name," "),G(1),U("ngIf",(e.resourceData||so(5,Wh)).length>0),G(1),U("ngIf",0==(e.resourceData||so(6,Wh)).length),G(1),U("ngTemplateOutlet",n)}}function mne(i,t){}function gne(i,t){if(1&i&&(Gr(0),W(1,"h2",5),Ve(2),j(),W(3,"div",7),fe(4,mne,0,0,"ng-template",6),j(),$r()),2&i){const e=he(),n=Zi(3);G(1),U("matTooltip",e.resourceDescription),G(1),_i(e.name),G(2),U("ngTemplateOutlet",n)}}function _ne(i,t){}function vne(i,t){if(1&i&&De(0,"app-editor",10),2&i){const e=he().$implicit,n=he(3);U("resource",n.children[n.pageIndex*n.pageSize+e])("disabled",n.disabled)}}function yne(i,t){if(1&i&&(Gr(0),fe(1,vne,1,2,"app-editor",9),$r()),2&i){const e=t.$implicit,n=he(3);G(1),U("ngIf",n.pageIndex*n.pageSize+e0)}let zR=(()=>{class i{constructor(e,n){this.main=e,this.cdr=n,this._resource=null,this.resourceDescription="",this.disabled=!1,this.changed=new We,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 Re}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:rc(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(He(this.destroyed$),gn(([n,r])=>!!this.resource&&n.startsWith(this.resource.id)&&!n.substring(this.resource.id.length+1).includes("/"))).subscribe(function(){var n=tt(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 gt(null),this.imageUrl$=new gt(null),this.destroyed$=new Re,this.changed=new We}set resource(e){this._resource$.next(e)}get resource(){return this._resource$.getValue()}ngAfterViewInit(){var e=this;return tt(function*(){e._resource$.pipe(He(e.destroyed$)).subscribe(function(){var n=tt(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)(E(Ql),E(ka))},i.\u0275cmp=ot({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&&(De(0,"app-compound-block-ui",0),Ct(1,"async"),fe(2,Dne,2,3,"img",1),Ct(3,"async")),2&e&&(U("resource",Tt(1,3,n._resource$))("fieldBlacklist",so(7,Tne)),G(2),U("ngIf",Tt(3,5,n.imageUrl$)))},dependencies:[vi,Jl,pl],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 Rne=["*"],Lne=new me("MAT_CARD_CONFIG");let gH=(()=>{class i{constructor(e){this.appearance=e?.appearance||"raised"}}return i.\u0275fac=function(e){return new(e||i)(E(Lne,8))},i.\u0275cmp=ot({type:i,selectors:[["mat-card"]],hostAttrs:[1,"mat-mdc-card","mdc-card"],hostVars:4,hostBindings:function(e,n){2&e&&un("mat-mdc-card-outlined","outlined"===n.appearance)("mdc-card--outlined","outlined"===n.appearance)},inputs:{appearance:"appearance"},exportAs:["matCard"],ngContentSelectors:Rne,decls:1,vars:0,template:function(e,n){1&e&&(sr(),Wt(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})(),_H=(()=>{class i{}return i.\u0275fac=function(e){return new(e||i)},i.\u0275mod=nn({type:i}),i.\u0275inj=Kt({imports:[Qn,Eo,Qn]}),i})();class HR{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 Re,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 GR=(()=>{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=ke({token:i,factory:i.\u0275fac,providedIn:"root"}),i})(),aie=(()=>{class i{}return i.\u0275fac=function(e){return new(e||i)},i.\u0275mod=nn({type:i}),i.\u0275inj=Kt({imports:[Qn,Eo,eb,Qn]}),i})();const MH={transformPanel:Ra("transformPanel",[Pr("void => enter-dropdown",jr("120ms cubic-bezier(0, 0, 0.2, 1)",rV([si({opacity:0,transform:"scale(1, 0.8)"}),si({opacity:1,transform:"scale(1, 1)"})]))),Pr("void => enter-dialog",jr("150ms cubic-bezier(0, 0, 0.2, 1)",rV([si({opacity:0,transform:"scale(0.7)"}),si({transform:"none",opacity:1})]))),Pr("* => void",jr("100ms linear",si({opacity:0})))]),fadeInCalendar:Ra("fadeInCalendar",[Ps("void",si({opacity:0})),Ps("enter",si({opacity:1})),Pr("void => *",jr("120ms 100ms cubic-bezier(0.55, 0, 0.55, 0.2)"))])},EH=function(i){return{active:i}};function Sie(i,t){if(1&i){const e=di();W(0,"button",2),Ue("click",function(){const s=an(e).$implicit;return zt(he().select(s))}),j()}if(2&i){const e=t.$implicit,n=he();jo("background-color",e),U("ngClass",sm(3,EH,n.selectedColor===e))}}function Eie(i,t){if(1&i){const e=di();W(0,"button",2),Ue("click",function(){const s=an(e).$implicit;return zt(he().select(s))}),j()}if(2&i){const e=t.$implicit,n=he();jo("background-color",e),U("ngClass",sm(3,EH,n.selectedColor===e))}}const Aie=["button"],Die=/^\s+/,Tie=/\s+$/,$m=Math.round,Iie=(Math,Math,Math,/[^0-9]/g),AH=["#ffffff","#ffff00","#ff00ff","#ff0000","#c0c0c0","#808080","#808000","#800080","#800000","#00ffff","#00ff00","#008080","#008000","#0000ff","#000080","#000000"];function DH(i,t,e){const n=i.getImageData(t,e,1,1).data;return{r:n[0],g:n[1],b:n[2]}}function jh(i){return 1==i.length?"0"+i:""+i}function kie(i){return Math.round(255*parseFloat(i)).toString(16)}function TH(i){return Ko(i)/255}function Ko(i){return parseInt(i,16)}function IH(i,t,e,n){var r=[jh($m(i).toString(16)),jh($m(t).toString(16)),jh($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 vu="(?:[-\\+]?\\d*\\.\\d+%?)|(?:[-\\+]?\\d+%?)",jR="[\\s|\\(]+("+vu+")[,|\\s]+("+vu+")[,|\\s]+("+vu+")\\s*\\)?",YR="[\\s|\\(]+("+vu+")[,|\\s]+("+vu+")[,|\\s]+("+vu+")[,|\\s]+("+vu+")\\s*\\)?",Yh={CSS_UNIT:new RegExp(vu),rgb:new RegExp("rgb"+jR),rgba:new RegExp("rgba"+YR),hsl:new RegExp("hsl"+jR),hsla:new RegExp("hsla"+YR),hsv:new RegExp("hsv"+jR),hsva:new RegExp("hsva"+YR),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 qR(i){let t;return i=i.replace(Die,"").replace(Tie,"").toLowerCase(),(t=Yh.rgb.exec(i))?{r:t[1],g:t[2],b:t[3],a:1}:(t=Yh.rgba.exec(i))?{r:t[1],g:t[2],b:t[3],a:t[4]}:(t=Yh.hex8.exec(i))?{r:Ko(t[1]),g:Ko(t[2]),b:Ko(t[3]),a:TH(t[4])}:(t=Yh.hex6.exec(i))?{r:Ko(t[1]),g:Ko(t[2]),b:Ko(t[3]),a:1}:(t=Yh.hex4.exec(i))?{r:Ko(t[1]+""+t[1]),g:Ko(t[2]+""+t[2]),b:Ko(t[3]+""+t[3]),a:TH(t[4]+""+t[4])}:(t=Yh.hex3.exec(i))?{r:Ko(t[1]+""+t[1]),g:Ko(t[2]+""+t[2]),b:Ko(t[3]+""+t[3]),a:1}:null}class qh{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=IH(this.r,this.g,this.b),this.rgba=this.toRgba()}toHex(t){return IH(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 Rie(i,t,e,n,r){var s=[jh($m(i).toString(16)),jh($m(t).toString(16)),jh($m(e).toString(16)),jh(kie(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 RH=(()=>{class i{constructor(e,n){this.zone=e,this.colorChanged=new We,this.x=0,this.y=0,this.drag=!1,this._destroyed=new Re,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){xo()},i.\u0275dir=ve({type:i,inputs:{color:"color"},outputs:{colorChanged:"colorChanged"}}),i})(),Fie=(()=>{class i extends RH{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}=DH(this.ctx,e.offsetX,e.offsetY);this.emitChange(new qh(n,r,s))}}return i.\u0275fac=function(e){return new(e||i)(E(ft))},i.\u0275cmp=ot({type:i,selectors:[["ngx-mat-color-slider"]],features:[lt],decls:1,vars:0,consts:[["id","color-strip","width","15","height","234",1,"zone-strip",3,"mousedown","mouseup"]],template:function(e,n){1&e&&(W(0,"canvas",0),Ue("mousedown",function(s){return n.onMousedown(s)})("mouseup",function(s){return n.onMouseup(s)}),j())}}),i})(),Lie=(()=>{class i{constructor(){}onInput(e){this._formatInput(e.target)}_formatInput(e){let n=Number(e.value.replace(Iie,""));n=isNaN(n)?0:n,e.value=n}}return i.\u0275fac=function(e){return new(e||i)},i.\u0275dir=ve({type:i,selectors:[["","ngxMatNumericColorInput",""]],hostBindings:function(e,n){1&e&&Ue("input",function(s){return n.onInput(s)})}}),i})(),Bie=(()=>{class i extends RH{constructor(e){super(e,"color-block"),this.zone=e,this._resetBaseColor=!0,this.formGroup=new Hm({r:new nc(null,[_l.required]),g:new nc(null,[_l.required]),b:new nc(null,[_l.required]),a:new nc(null,[_l.required]),hex:new nc(null,[_l.required,_l.pattern(Yh.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(){Mr(this.rCtrl.valueChanges,this.gCtrl.valueChanges,this.bCtrl.valueChanges,this.aCtrl.valueChanges).pipe(He(this._destroyed),ml(400)).subscribe(r=>{const s=new qh(Number(this.rCtrl.value),Number(this.gCtrl.value),Number(this.bCtrl.value),Number(this.aCtrl.value));this.emitChange(s)}),this.hexCtrl.valueChanges.pipe(He(this._destroyed),ml(400),Zl()).subscribe(r=>{const s=qR(r);if(null!=s){const o=new qh(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}=DH(this.ctx,e.offsetX,e.offsetY);this.emitChange(new qh(n,r,s))}}return i.\u0275fac=function(e){return new(e||i)(E(ft))},i.\u0275cmp=ot({type:i,selectors:[["ngx-mat-color-canvas"]],hostAttrs:[1,"ngx-mat-color-canvas"],features:[lt,bi],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&&(W(0,"form",0)(1,"div",1)(2,"div",2)(3,"canvas",3),Ue("mousedown",function(s){return n.onMousedown(s)})("mouseup",function(s){return n.onMouseup(s)}),j(),W(4,"ngx-mat-color-slider",4),Ue("colorChanged",function(s){return n.onSliderColorChanged(s)}),j()(),W(5,"div",5)(6,"mat-form-field")(7,"mat-label"),Ve(8,"R"),j(),De(9,"input",6),j(),W(10,"mat-form-field")(11,"mat-label"),Ve(12,"G"),j(),De(13,"input",7),j(),W(14,"mat-form-field")(15,"mat-label"),Ve(16,"B"),j(),De(17,"input",8),j()()(),W(18,"div",1),De(19,"button",9),W(20,"mat-form-field")(21,"mat-label"),Ve(22,"HEX6"),j(),W(23,"mat-label",10),Ve(24,"#\xa0"),j(),De(25,"input",11),j(),W(26,"mat-form-field",12)(27,"mat-label"),Ve(28,"A"),j(),De(29,"input",13),j()()()),2&e&&(U("formGroup",n.formGroup),G(19),jo("background-color",(null==n.color?null:n.color.rgba)||"transparent"))},dependencies:[ic,vl,To,qte,MV,IR,gl,mu,tc,bR,_u,gu,Gh,fC,Fie,Lie],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})(),Uie=(()=>{class i{constructor(){this.colorChanged=new We,this.colors1=AH.slice(0,8),this.colors2=AH.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}=qR(e);this.colorChanged.emit(new qh(n,r,s,o))}}return i.\u0275fac=function(e){return new(e||i)},i.\u0275cmp=ot({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&&(W(0,"div",0),fe(1,Sie,1,5,"button",1),j(),W(2,"div",0),fe(3,Eie,1,5,"button",1),j()),2&e&&(G(1),U("ngForOf",n.colors1),G(2),U("ngForOf",n.colors2))},dependencies:[hm,So,MV],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})(),kH=(()=>{class i{constructor(){this.colorChanged=new We}ngOnInit(){}handleColorChanged(e){this.colorChanged.emit(e)}}return i.\u0275fac=function(e){return new(e||i)},i.\u0275cmp=ot({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&&(W(0,"ngx-mat-color-canvas",0),Ue("colorChanged",function(s){return n.handleColorChanged(s)}),j(),W(1,"ngx-mat-color-collection",0),Ue("colorChanged",function(s){return n.handleColorChanged(s)}),j()),2&e&&(U("color",n.color),G(1),U("color",n.color))},dependencies:[Bie,Uie],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})(),XR=(()=>{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=qR(e);return n?new qh(n.r,n.g,n.b,n.a):null}}return i.\u0275fac=function(e){return new(e||i)},i.\u0275prov=ke({token:i,factory:i.\u0275fac}),i})();const Vie={display:{colorInput:"hex"}},PH=new me("mat-color-formats"),OH=new me("ngx-mat-colorpicker-scroll-strategy"),Hie={provide:OH,deps:[as],useFactory:function zie(i){return()=>i.scrollStrategies.reposition()}},Gie=Qy(class{constructor(i){this._elementRef=i}});let FH=(()=>{class i extends Gie{constructor(e){super(e)}}return i.\u0275fac=function(e){return new(e||i)(E(mt))},i.\u0275cmp=ot({type:i,selectors:[["ngx-mat-color-picker-content"]],viewQuery:function(e,n){if(1&e&&Wn(kH,5),2&e){let r;Et(r=At())&&(n._palette=r.first)}},hostAttrs:[1,"ngx-mat-colorpicker-content"],hostVars:3,hostBindings:function(e,n){2&e&&(Iw("@transformPanel","enter"),un("ngx-mat-colorpicker-content-touch",n.picker.touchUi))},inputs:{color:"color"},exportAs:["ngxMatColorPickerContent"],features:[lt],decls:1,vars:1,consts:[[3,"color","colorChanged"]],template:function(e,n){1&e&&(W(0,"ngx-mat-color-palette",0),Ue("colorChanged",function(s){return n.picker.select(s)}),j()),2&e&&U("color",n.picker._selected)},dependencies:[kH],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:[MH.transformPanel,MH.fadeInCalendar]},changeDetection:0}),i})(),LH=(()=>{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 We,this.closedStream=new We,this._touchUi=!1,this._opened=!1,this._defaultColor="primary",this._validSelected=null,this._disabledChange=new Re,this._focusedElementBeforeOpen=null,this._inputSubscription=Zt.EMPTY,this._selectedChanged=new Re,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(FH,{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 Lh(FH,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(Oi(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"),Mr(this._popupRef.backdropClick(),this._popupRef.detachments(),this._popupRef.keydownEvents().pipe(gn(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)(E(Bm),E(as),E(ft),E(XR),E(Ia,8),E(OH),E(jt,8),E(Wr))},i.\u0275cmp=ot({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 yC{constructor(t,e){this.target=t,this.targetElement=e,this.value=this.target.value}}const $ie={provide:Do,useExisting:Gn(()=>bC),multi:!0},Wie={provide:Yr,useExisting:Gn(()=>bC),multi:!0};let bC=(()=>{class i{constructor(e,n,r,s){if(this._elementRef=e,this._formField=n,this._colorFormats=r,this._adapter=s,this.colorChange=new We,this.colorInput=new We,this._disabledChange=new We,this._valueChange=new We,this._onTouched=()=>{},this._cvaOnChange=()=>{},this._validatorOnChange=()=>{},this._pickerSubscription=Zt.EMPTY,this._validator=_l.compose([]),this._lastValueValid=!1,!this._colorFormats)throw function Oie(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 yC(this,this._elementRef.nativeElement)),this.colorChange.emit(new yC(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 yC(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 yC(this,this._elementRef.nativeElement)))}}return i.\u0275fac=function(e){return new(e||i)(E(mt),E(vl,8),E(PH,8),E(XR))},i.\u0275dir=ve({type:i,selectors:[["input","ngxMatColorPicker",""]],hostVars:3,hostBindings:function(e,n){1&e&&Ue("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&&(Yl("disabled",n.disabled),Dt("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:[Dn([$ie,Wie,{provide:VR,useExisting:i}])]}),i})(),jie=(()=>{class i{constructor(e){this._cd=e,this._stateChanges=Zt.EMPTY}get disabled(){if(null==this._disabled&&this.picker)return this.picker.disabled}set disabled(e){this._disabled=e}ngOnInit(){}ngOnChanges(e){e.picker&&this._watchStateChanges()}ngOnDestroy(){this._stateChanges.unsubscribe()}ngAfterContentInit(){this._watchStateChanges()}open(e){this.picker&&!this.disabled&&(this.picker.open(),e.stopPropagation())}_watchStateChanges(){const e=this.picker?this.picker._disabledChange:ht(),n=this.picker&&this.picker._pickerInput?this.picker._pickerInput._disabledChange:ht(),r=this.picker?Mr(this.picker.openedStream,this.picker.closedStream):ht();this._stateChanges.unsubscribe(),this._stateChanges=Mr(e,n,r).subscribe(()=>this._cd.markForCheck())}}return i.\u0275fac=function(e){return new(e||i)(E(Zn))},i.\u0275cmp=ot({type:i,selectors:[["ngx-mat-color-toggle"]],viewQuery:function(e,n){if(1&e&&Wn(Aie,5),2&e){let r;Et(r=At())&&(n._button=r.first)}},hostAttrs:[1,"ngx-mat-color-toggle"],hostVars:7,hostBindings:function(e,n){1&e&&Ue("focus",function(){return n._button.focus()}),2&e&&(Dt("tabindex",-1),un("ngx-mat-color-toggle-active",n.picker&&n.picker.opened)("mat-accent",n.picker&&"accent"===n.picker.color)("mat-warn",n.picker&&"warn"===n.picker.color))},inputs:{picker:["for","picker"],tabIndex:"tabIndex",disabled:"disabled"},exportAs:["ngxMatColorPickerToggle"],features:[bi],decls:4,vars:5,consts:[["mat-icon-button","","type","button",3,"disabled","click"],["button",""]],template:function(e,n){1&e&&(W(0,"button",0,1),Ue("click",function(s){return n.open(s)}),W(2,"mat-icon"),Ve(3,"palette"),j()()),2&e&&(U("disabled",n.disabled),Dt("aria-haspopup",n.picker?"dialog":null)("tabindex",n.disabled?-1:n.tabIndex),G(2),jo("color",null==n.picker||null==n.picker._selected?null:n.picker._selected.rgba))},dependencies:[XM,gR],styles:[".mat-form-field-appearance .mat-form-field-prefix .ngx-mat-color-toggle-default-icon,.mat-form-field-appearance .mat-form-field-suffix .ngx-mat-color-toggle-default-icon{width:1em}.mat-form-field:not(.mat-form-field-appearance) .mat-form-field-prefix .ngx-mat-color-toggle-default-icon,.mat-form-field:not(.mat-form-field-appearance) .mat-form-field-suffix .ngx-mat-color-toggle-default-icon{display:block;width:1.5em;height:1.5em}.mat-form-field:not(.mat-form-field-appearance) .mat-form-field-prefix .mat-icon-button .ngx-mat-color-toggle-default-icon,.mat-form-field:not(.mat-form-field-appearance) .mat-form-field-suffix .mat-icon-button .ngx-mat-color-toggle-default-icon{margin:auto}\n"],encapsulation:2}),i})(),Yie=(()=>{class i{}return i.\u0275fac=function(e){return new(e||i)},i.\u0275mod=nn({type:i}),i.\u0275inj=Kt({providers:[XR,Hie],imports:[Eo,pH,KM,_H,aie,eH,tH,_V,Nh,ez]}),i})();const qie=["picker"],Xie=function(i){return{"background-color":i}};function Kie(i,t){if(1&i){const e=di();W(0,"div",5),Ue("click",function(r){const o=an(e).index;return zt(he().onColorClicked(r.currentTarget,o))}),j()}if(2&i){const e=t.$implicit,n=t.index,r=he();U("ngStyle",sm(2,Xie,"#"+r.lpad(e.toString(16),"0",8)))("matTooltip",n+": #"+e.toString(16))}}const Zie=function(){return["colors"]};let Qie=(()=>{class i{constructor(){this.resource=null,this.changed=new We,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 yU;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=ot({type:i,selectors:[["app-palette-block-ui"]],viewQuery:function(e,n){if(1&e&&Wn(qie,5),2&e){let r;Et(r=At())&&(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&&(De(0,"app-compound-block-ui",0),W(1,"div",1),fe(2,Kie,1,4,"div",2),j(),W(3,"input",3),Ue("colorChange",function(s){return n.onColorChange(s.value)}),j(),De(4,"ngx-mat-color-picker",null,4)),2&e){const r=Zi(5);U("resource",n.resource)("fieldBlacklist",so(4,Zie)),G(2),U("ngForOf",null==n.resourceData?null:n.resourceData.colors),G(1),U("ngxMatColorPicker",r)}},dependencies:[So,tM,ic,Os,bC,LH,Jl],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 Jie=["editor"];let ere=(()=>{class i{constructor(e){this.cdr=e,this._resource=null,this.resourceDescription="",this.disabled=!1,this.changed=new We,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)(E(Zn))},i.\u0275cmp=ot({type:i,selectors:[["app-binary-block-ui"]],viewQuery:function(e,n){if(1&e&&Wn(Jie,5),2&e){let r;Et(r=At())&&(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&&(W(0,"h2",0),Ve(1),j(),De(2,"div",null,1)),2&e&&(U("matTooltip",n.resourceDescription),G(1),_i(null==n.resource?null:n.resource.name))},dependencies:[Os],changeDetection:0}),i})();const tre=["picker"];function nre(i,t){if(1&i&&(W(0,"mat-label",8),Ve(1),j()),2&i){const e=he();G(1),_i(null==e.resource?null:e.resource.name)}}const ire=function(i){return{transform:i}};let rre=(()=>{class i{constructor(e){this.cdr=e,this.resource=null,this.resourceDescription="",this.changed=new We,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)(E(Zn))},i.\u0275cmp=ot({type:i,selectors:[["app-angle-block-ui"]],viewQuery:function(e,n){if(1&e&&Wn(tre,5),2&e){let r;Et(r=At())&&(n.picker=r.first)}},hostBindings:function(e,n){1&e&&Ue("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&&(W(0,"div",0)(1,"div",1,2)(3,"div",3),De(4,"div",4)(5,"div",5),j()(),W(6,"div",6),fe(7,nre,2,1,"mat-label",7),W(8,"mat-label"),Ve(9),Ct(10,"number"),j(),W(11,"mat-label"),Ve(12),Ct(13,"number"),j()()()),2&e&&(U("matTooltip",n.resourceDescription),G(3),U("ngStyle",sm(11,ire,"rotate("+((null==n.resource?null:n.resource.data)||0)+"rad)")),G(4),U("ngIf",null==n.resource?null:n.resource.name),G(2),Qi("",J1(10,5,180*(null==n.resource?null:n.resource.data)/n.pi||0,"1.2-2")," deg"),G(3),Qi("",J1(13,8,(null==n.resource?null:n.resource.data)||0,"1.2-2")," rad"))},dependencies:[vi,tM,To,Os,uB],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 NH{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,d=new Set;for(const h of e)!0===Array.isArray(h)?a.add(h):"object"==typeof h?l.add(h):"function"==typeof h?d.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===d.size){h=!0;for(const p of o)if(!1===d.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 sre(i,t){if(1&i&&(W(0,"mat-list-option",3),Ve(1),j()),2&i){const e=t.$implicit,n=he();U("value",e)("selected",n.selectedValue==e),G(1),Qi(" ",e," ")}}function ore(i,t){if(1&i&&(W(0,"mat-card"),De(1,"app-editor",4),j()),2&i){const e=he();G(1),U("resource",e.resources[e.selectedValue])}}let xC=(()=>{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)(E(NH))},i.\u0275cmp=ot({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&&(W(0,"mat-selection-list",0),Ue("selectionChange",function(s){return n.selectedValue=s.source.selectedOptions.selected[0].value}),fe(1,sre,2,3,"mat-list-option",1),j(),fe(2,ore,2,1,"mat-card",2)),2&e&&(U("multiple",!1),G(1),U("ngForOf",n.keys),G(1),U("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})(),are=(()=>{class i{constructor(){this._resource=null,this.resourceMap={},this.changed=new We}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",iR("@transformPanel",[nR()],{optional:!0}))]),transformPanel:Ra("transformPanel",[Ps("void",si({opacity:0,transform:"scale(1, 0.8)"})),Pr("void => showing",jr("120ms cubic-bezier(0, 0, 0.2, 1)",si({opacity:1,transform:"scale(1, 1)"}))),Pr("* => void",jr("100ms linear",si({opacity:0})))])};let BH=0;const UH=new me("mat-select-scroll-strategy"),yre=new me("MAT_SELECT_CONFIG"),bre={provide:UH,deps:[as],useFactory:function vre(i){return()=>i.scrollStrategies.reposition()}},xre=new me("MatSelectTrigger");class wre{constructor(t,e){this.source=t,this.value=e}}const Mre=YM(JI(jM($U(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 Re}}))));let Cre=(()=>{class i extends Mre{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(_l.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=ks(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,d,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=d,this._liveAnnouncer=g,this._defaultOptions=b,this._panelOpen=!1,this._compareWith=(v,y)=>v===y,this._uid="mat-select-"+BH++,this._triggerAriaLabelledBy=null,this._destroy=new Re,this._onChange=()=>{},this._onTouched=()=>{},this._valueId="mat-select-value-"+BH++,this._panelDoneAnimatingStream=new Re,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=Ey(()=>{const v=this.options;return v?v.changes.pipe(Ao(v),Rs(()=>Mr(...v.map(y=>y.onSelectionChange)))):this._ngZone.onStable.pipe(Oi(1),Rs(()=>this.optionSelectionChanges))}),this.openedChange=new We,this._openedStream=this.openedChange.pipe(gn(v=>v),et(()=>{})),this._closedStream=this.openedChange.pipe(gn(v=>!v),et(()=>{})),this.selectionChange=new We,this.valueChange=new We,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 HR(this.multiple),this.stateChanges.next(),this._panelDoneAnimatingStream.pipe(Zl(),He(this._destroy)).subscribe(()=>this._panelDoneAnimating(this.panelOpen))}ngAfterContentInit(){this._initKeyManager(),this._selectionModel.changed.pipe(He(this._destroy)).subscribe(e=>{e.added.forEach(n=>n.select()),e.removed.forEach(n=>n.deselect())}),this.options.changes.pipe(Ao(null),He(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&&!Xo(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||Xo(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(Oi(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 GZ(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=Mr(this.options.changes,this._destroy);this.optionSelectionChanges.pipe(He(e)).subscribe(n=>{this._onSelect(n.source,n.isUserInput),n.isUserInput&&!this.multiple&&this._panelOpen&&(this.close(),this.focus())}),Mr(...this.options.map(n=>n._stateChanges)).pipe(He(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)(E(LM),E(Zn),E(ft),E(jU),E(mt),E(Ia,8),E(ub,8),E(Gh,8),E(mC,8),E(ec,10),ya("tabindex"),E(UH),E(XI),E(yre,8))},i.\u0275dir=ve({type:i,viewQuery:function(e,n){if(1&e&&(Wn(lre,5),Wn(cre,5),Wn(xU,5)),2&e){let r;Et(r=At())&&(n.trigger=r.first),Et(r=At())&&(n.panel=r.first),Et(r=At())&&(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:[lt,bi]}),i})(),fb=(()=>{class i extends Cre{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(He(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 OQ(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 wre(this,e)}_getOverlayWidth(){return(this._preferredOverlayOrigin instanceof zI?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=ri(i)))(n||i)}}(),i.\u0275cmp=ot({type:i,selectors:[["mat-select"]],contentQueries:function(e,n,r){if(1&e&&(Wi(r,xre,5),Wi(r,Nm,5),Wi(r,eV,5)),2&e){let s;Et(s=At())&&(n.customTrigger=s.first),Et(s=At())&&(n.options=s),Et(s=At())&&(n.optionGroups=s)}},hostAttrs:["role","combobox","aria-autocomplete","none","aria-haspopup","listbox",1,"mat-mdc-select"],hostVars:19,hostBindings:function(e,n){1&e&&Ue("keydown",function(s){return n._handleKeydown(s)})("focus",function(){return n._onFocus()})("blur",function(){return n._onBlur()}),2&e&&(Dt("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()),un("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:[Dn([{provide:UR,useExisting:i},{provide:JU,useExisting:i}]),lt],ngContentSelectors:gre,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&&(sr(mre),W(0,"div",0,1),Ue("click",function(){return n.toggle()}),W(3,"div",2),fe(4,dre,2,1,"span",3),fe(5,fre,3,2,"span",4),j(),W(6,"div",5)(7,"div",6),ki(),W(8,"svg",7),De(9,"path",8),j()()()(),fe(10,pre,3,9,"ng-template",9),Ue("backdropClick",function(){return n.close()})("attach",function(){return n._onAttached()})("detach",function(){return n.close()})),2&e){const r=Zi(1);Dt("aria-owns",n.panelOpen?n.id+"-panel":null),G(3),U("ngSwitch",n.empty),Dt("id",n._valueId),G(1),U("ngSwitchCase",!0),G(1),U("ngSwitchCase",!1),G(5),U("cdkConnectedOverlayPanelClass",n._overlayPanelClass)("cdkConnectedOverlayScrollStrategy",n._scrollStrategy)("cdkConnectedOverlayOrigin",n._preferredOverlayOrigin||r)("cdkConnectedOverlayOpen",n.panelOpen)("cdkConnectedOverlayPositions",n._positions)("cdkConnectedOverlayWidth",n._overlayWidth)}},dependencies:[hm,by,VT,aB,xU,zI],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:[_re.transformPanel]},changeDetection:0}),i})(),VH=(()=>{class i{}return i.\u0275fac=function(e){return new(e||i)},i.\u0275mod=nn({type:i}),i.\u0275inj=Kt({providers:[bre],imports:[Eo,Pm,tR,Qn,Xy,gC,tR,Qn]}),i})();function Sre(i,t){if(1&i&&(W(0,"mat-label"),Ve(1),j()),2&i){const e=he(3);G(1),_i(e.resource.name)}}function Ere(i,t){if(1&i&&(W(0,"mat-option",6),Ve(1),j()),2&i){const e=t.$implicit,n=he(3);U("value",e[1])("disabled",n.disabled),G(1),Qi(" ",e[1]," ")}}function Are(i,t){if(1&i){const e=di();W(0,"mat-form-field",3),fe(1,Sre,2,1,"mat-label",0),W(2,"mat-select",4),Ue("valueChange",function(r){return an(e),zt(he(2).resource.data=r)})("selectionChange",function(){return an(e),zt(he(2).changed.emit())}),fe(3,Ere,2,3,"mat-option",5),j()()}if(2&i){const e=he(2);U("matTooltip",e.resourceDescription),G(1),U("ngIf",e.resource.name),G(1),U("value",e.resource.data)("disabled",e.disabled),G(1),U("ngForOf",e.resource.schema.enum_names)}}function Dre(i,t){if(1&i&&(W(0,"mat-label"),Ve(1),j()),2&i){const e=he(3);G(1),_i(e.resource.name)}}function Tre(i,t){if(1&i){const e=di();W(0,"mat-form-field",3),fe(1,Dre,2,1,"mat-label",0),W(2,"input",7),Ue("ngModelChange",function(r){return an(e),zt(he(2).resource.data=r)})("change",function(){return an(e),zt(he(2).changed.emit())}),j()()}if(2&i){const e=he(2);U("matTooltip",e.resourceDescription),G(1),U("ngIf",e.resource.name),G(1),U("min",0)("max",256*(e.resource.schema.length||1)-1)("ngModel",e.resource.data)}}function Ire(i,t){if(1&i&&(Gr(0),fe(1,Are,4,5,"mat-form-field",1),fe(2,Tre,3,5,"ng-template",null,2,Vc),$r()),2&i){const e=Zi(3),n=he();G(1),U("ngIf",n.isKnownEnumValue(n.resource.data))("ngIfElse",e)}}let Rre=(()=>{class i{constructor(){this.resource=null,this.resourceDescription="",this.disabled=!1,this.changed=new We}isKnownEnumValue(e){return!!this.resource?.schema.enum_names.find(([n,r])=>r==e)}}return i.\u0275fac=function(e){return new(e||i)},i.\u0275cmp=ot({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&&fe(0,Ire,4,2,"ng-container",0),2&e&&U("ngIf",n.resource)},dependencies:[So,vi,gl,mu,tc,_u,gu,Kc,vl,To,ic,Os,fb,Nm],changeDetection:0}),i})();const kre=["*"],Ore=["unscopedContent"];function Fre(i,t){1&i&&Wt(0,4)}function Lre(i,t){if(1&i&&(W(0,"div",11),De(1,"input",12),W(2,"div",13),ki(),W(3,"svg",14),De(4,"path",15),j(),ga(),De(5,"div",16),j()()),2&i){const e=he();un("mdc-checkbox--disabled",e.disabled),G(1),U("checked",e.selected)("disabled",e.disabled)}}function Nre(i,t){if(1&i&&(W(0,"div",17),De(1,"input",18),W(2,"div",19),De(3,"div",20)(4,"div",21),j()()),2&i){const e=he();un("mdc-radio--disabled",e.disabled),G(1),U("checked",e.selected)("disabled",e.disabled)}}function Bre(i,t){}function Ure(i,t){if(1&i&&(W(0,"span",22),fe(1,Bre,0,0,"ng-template",23),j()),2&i){he();const e=Zi(3);G(1),U("ngTemplateOutlet",e)}}function Vre(i,t){}function zre(i,t){if(1&i&&(W(0,"span",24),fe(1,Vre,0,0,"ng-template",23),j()),2&i){he();const e=Zi(5);G(1),U("ngTemplateOutlet",e)}}function Hre(i,t){}function Gre(i,t){1&i&&fe(0,Hre,0,0,"ng-template",23),2&i&&(he(),U("ngTemplateOutlet",Zi(1)))}function $re(i,t){}function Wre(i,t){if(1&i&&(W(0,"span",25),fe(1,$re,0,0,"ng-template",23),j()),2&i){he();const e=Zi(3);G(1),U("ngTemplateOutlet",e)}}function jre(i,t){}function Yre(i,t){if(1&i&&(W(0,"span",25),fe(1,jre,0,0,"ng-template",23),j()),2&i){he();const e=Zi(5);G(1),U("ngTemplateOutlet",e)}}function qre(i,t){}function Xre(i,t){1&i&&fe(0,qre,0,0,"ng-template",23),2&i&&(he(),U("ngTemplateOutlet",Zi(1)))}const Kre=[[["","matListItemTitle",""]],[["","matListItemLine",""]],"*",[["mat-divider"]],[["","matListItemAvatar",""],["","matListItemIcon",""]]],Zre=["[matListItemTitle]","[matListItemLine]","*","mat-divider","[matListItemAvatar],[matListItemIcon]"],zH=new me("ListOption");let Qre=(()=>{class i{constructor(e){this._elementRef=e}}return i.\u0275fac=function(e){return new(e||i)(E(mt))},i.\u0275dir=ve({type:i,selectors:[["","matListItemTitle",""]],hostAttrs:[1,"mat-mdc-list-item-title","mdc-list-item__primary-text"]}),i})(),Jre=(()=>{class i{constructor(e){this._elementRef=e}}return i.\u0275fac=function(e){return new(e||i)(E(mt))},i.\u0275dir=ve({type:i,selectors:[["","matListItemLine",""]],hostAttrs:[1,"mat-mdc-list-item-line","mdc-list-item__secondary-text"]}),i})(),HH=(()=>{class i{constructor(e){this._listOption=e}_isAlignedAtStart(){return!this._listOption||"after"===this._listOption?._getTogglePosition()}}return i.\u0275fac=function(e){return new(e||i)(E(zH,8))},i.\u0275dir=ve({type:i,hostVars:4,hostBindings:function(e,n){2&e&&un("mdc-list-item__start",n._isAlignedAtStart())("mdc-list-item__end",!n._isAlignedAtStart())}}),i})(),ese=(()=>{class i extends HH{}return i.\u0275fac=function(){let t;return function(n){return(t||(t=ri(i)))(n||i)}}(),i.\u0275dir=ve({type:i,selectors:[["","matListItemAvatar",""]],hostAttrs:[1,"mat-mdc-list-item-avatar"],features:[lt]}),i})(),tse=(()=>{class i extends HH{}return i.\u0275fac=function(){let t;return function(n){return(t||(t=ri(i)))(n||i)}}(),i.\u0275dir=ve({type:i,selectors:[["","matListItemIcon",""]],hostAttrs:[1,"mat-mdc-list-item-icon"],features:[lt]}),i})();const nse=new me("MAT_LIST_CONFIG");let KR=(()=>{class i{constructor(){this._isNonInteractive=!0,this._disableRipple=!1,this._disabled=!1,this._defaultOptions=Ft(nse,{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=ve({type:i,hostVars:1,hostBindings:function(e,n){2&e&&Dt("aria-disabled",n.disabled)},inputs:{disableRipple:"disableRipple",disabled:"disabled"}}),i})(),GH=(()=>{class i{set lines(e){this._explicitLines=ks(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 Zt,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(Mr(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)(E(mt),E(ft),E(KR,8),E(zi),E(eR,8),E(Rr,8))},i.\u0275dir=ve({type:i,contentQueries:function(e,n,r){if(1&e&&(Wi(r,ese,4),Wi(r,tse,4)),2&e){let s;Et(s=At())&&(n._avatars=s),Et(s=At())&&(n._icons=s)}},hostVars:4,hostBindings:function(e,n){2&e&&(Dt("aria-disabled",n.disabled)("disabled",n._isButtonElement&&n.disabled||null),un("mdc-list-item--disabled",n.disabled))},inputs:{lines:"lines",disableRipple:"disableRipple",disabled:"disabled"}}),i})();const $H=new me("SelectionList");let wC=(()=>{class i extends GH{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 We,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)(E(mt),E(ft),E($H),E(zi),E(Zn),E(eR,8),E(Rr,8))},i.\u0275cmp=ot({type:i,selectors:[["mat-list-option"]],contentQueries:function(e,n,r){if(1&e&&(Wi(r,Jre,5),Wi(r,Qre,5)),2&e){let s;Et(s=At())&&(n._lines=s),Et(s=At())&&(n._titles=s)}},viewQuery:function(e,n){if(1&e&&Wn(Ore,5),2&e){let r;Et(r=At())&&(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&&Ue("blur",function(){return n._handleBlur()})("click",function(){return n._toggleOnInteraction()}),2&e&&(Dt("aria-selected",n.selected),un("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:[Dn([{provide:GH,useExisting:i},{provide:zH,useExisting:i}]),lt],ngContentSelectors:Zre,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&&(sr(Kre),fe(0,Fre,1,0,"ng-template",null,0,Vc),fe(2,Lre,6,4,"ng-template",null,1,Vc),fe(4,Nre,5,4,"ng-template",null,2,Vc),fe(6,Ure,2,1,"span",3),fe(7,zre,2,1,"span",4),fe(8,Gre,1,1,"ng-template",5),W(9,"span",6),Wt(10),Wt(11,1),W(12,"span",7,8),Ue("cdkObserveContent",function(){return n._updateItemLines(!0)}),Wt(14,2),j()(),fe(15,Wre,2,1,"span",9),fe(16,Yre,2,1,"span",9),fe(17,Xre,1,1,"ng-template",5),Wt(18,3),De(19,"div",10)),2&e&&(G(6),U("ngIf",n._hasCheckboxAt("before")),G(1),U("ngIf",n._hasRadioAt("before")),G(1),U("ngIf",n._hasIconsOrAvatarsAt("before")),G(7),U("ngIf",n._hasCheckboxAt("after")),G(1),U("ngIf",n._hasRadioAt("after")),G(1),U("ngIf",n._hasIconsOrAvatarsAt("after")))},dependencies:[CU,vi,xy],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 ise={provide:Do,useExisting:Gn(()=>MC),multi:!0};class rse{constructor(t,e){this.source=t,this.options=e}}let MC=(()=>{class i extends KR{get multiple(){return this._multiple}set multiple(e){const n=Jt(e);n!==this._multiple&&(this._multiple=n,this.selectedOptions=new HR(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 Re,this._onChange=r=>{},this.selectionChange=new We,this.color="accent",this.compareWith=(r,s)=>r===s,this._multiple=!0,this._hideSingleSelectionIndicator=this._defaultOptions?.hideSingleSelectionIndicator??!1,this.selectedOptions=new HR(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 rse(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(He(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()&&Xo(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 RU(this._items).withHomeAndEnd().withTypeAhead().withWrap().skipPredicate(()=>this.disabled),this._resetActiveOption(),this._keyManager.change.subscribe(e=>this._setActiveOption(e)),this._items.changes.pipe(He(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=FM();return e&&this._element.nativeElement.contains(e)}}return i.\u0275fac=function(e){return new(e||i)(E(mt),E(ft))},i.\u0275cmp=ot({type:i,selectors:[["mat-selection-list"]],contentQueries:function(e,n,r){if(1&e&&Wi(r,wC,5),2&e){let s;Et(s=At())&&(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&&Ue("keydown",function(s){return n._handleKeydown(s)}),2&e&&Dt("aria-multiselectable",n.multiple)},inputs:{color:"color",compareWith:"compareWith",multiple:"multiple",hideSingleSelectionIndicator:"hideSingleSelectionIndicator",disabled:"disabled"},outputs:{selectionChange:"selectionChange"},exportAs:["matSelectionList"],features:[Dn([ise,{provide:KR,useExisting:i},{provide:$H,useExisting:i}]),lt,bi],ngContentSelectors:kre,decls:1,vars:0,template:function(e,n){1&e&&(sr(),Wt(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})(),sse=(()=>{class i{}return i.\u0275fac=function(e){return new(e||i)},i.\u0275mod=nn({type:i}),i.\u0275inj=Kt({imports:[HI,Eo,Qn,eb,QU,RV]}),i})();function ose(i,t){if(1&i&&(W(0,"mat-label"),Ve(1),j()),2&i){const e=he(2);G(1),_i(e.resource.name)}}function ase(i,t){if(1&i&&(W(0,"mat-list-option",5),Ve(1),j()),2&i){const e=t.$implicit,n=he(2);U("value",e.key)("selected",n.resource.data[e.key])("disabled",n.disabled),G(1),Qi(" ",e.key," ")}}function lse(i,t){if(1&i){const e=di();Gr(0,1),fe(1,ose,2,1,"mat-label",2),W(2,"mat-selection-list",3),Ue("selectionChange",function(r){return an(e),zt(he().onSelection(r))}),fe(3,ase,2,4,"mat-list-option",4),Ct(4,"keyvalue"),j(),$r()}if(2&i){const e=he();U("matTooltip",e.resourceDescription),G(1),U("ngIf",e.resource.name),G(1),U("disabled",e.disabled),G(1),U("ngForOf",Tt(4,4,e.resource.data))}}let cse=(()=>{class i{constructor(){this.resource=null,this.resourceDescription="",this.disabled=!1,this.changed=new We}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=ot({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&&fe(0,lse,5,6,"ng-container",0),2&e&&U("ngIf",n.resource)},dependencies:[So,vi,To,Os,MC,wC,cB],styles:["[_nghost-%COMP%]{padding-bottom:1.34375em}"],changeDetection:0}),i})();class WH{get tick$(){return this._tick$.asObservable()}get children(){return[...this._children]}constructor(t){this.parent=t,this._tick$=new Re,this._children=[],t&&t.addChild(this)}addChild(t){if(t.parent!==this)throw new Error("Incorrect child clock");this._children.includes(t)||this._children.push(t)}removeChild(t){if(t.parent!==this)throw new Error("Incorrect child clock");this._children=this._children.filter(e=>e!==t)}dispose(){this.parent&&this.parent.removeChild(this);for(const t of this._children)t.dispose();this._tick$.complete()}}const use=typeof performance>"u"?()=>Date.now():()=>performance.now();class jm extends WH{static get instance(){return jm._instance||(jm._instance=new jm),jm._instance}get elapsedTime(){return use()}constructor(){super(null);let t=this.elapsedTime;const e=()=>{requestAnimationFrame(e);const n=t,r=this.elapsedTime;t=r,this._tick$.next([n,r-n])};requestAnimationFrame(e)}dispose(){throw new Error("Cannot dispose global clock")}}class jH extends WH{get isRunning(){return!!this.tickSub}get isPaused(){return-1!==this.pausedAt}get isStopped(){return-1===this.startedAt}get timeScale(){return this._timeScale}set timeScale(t){if(t!==this._timeScale||this.pausedByTimescale&&0!==t){if(0===t)return void(this.isPaused||(this.pause(),this.pausedByTimescale=!0));if(this.isPaused&&this.pausedByTimescale&&(this.resume(),this.pausedByTimescale=!1),!this.isStopped){const e=this.isPaused?this.pausedAt:this.parentClock.elapsedTime;this.startedAt=e-(e-this.startedAt)*this.timeScale/t}this._timeScale=t}}get elapsedTime(){return this.isStopped?this.lastStopElapsed:this.isPaused?this._timeScale*(this.pausedAt-this.startedAt):this._timeScale*(this.parentClock.elapsedTime-this.startedAt)}constructor(t=!1,e=jm.instance){super(e),this.parentClock=e,this.tickSub=null,this._internalTick$=new Re,this.tickRateLimit=0,this.paused$=new Re,this.startedAt=-1,this.oldRelativeTime=0,this.pausedAt=-1,this.lastStopElapsed=0,this._timeScale=1,this.pausedByTimescale=!1,this.lastFiredTickElapsed=0,t&&this.start(),this._internalTick$.pipe(et(([n,r])=>[r,r-this.lastFiredTickElapsed]),gn(([n])=>!this.tickRateLimit||Math.floor(this.lastFiredTickElapsed*this.tickRateLimit/1e3)this.lastFiredTickElapsed=n)).subscribe(this._tick$)}start(){this.isRunning||(this.oldRelativeTime=0,this.startedAt=this.parentClock.elapsedTime,this.startListeningTicks())}stop(){this.stopListeningTicks(),this.lastStopElapsed=this.elapsedTime,this.startedAt=this.pausedAt=-1}pause(){this.stopListeningTicks(),this.pausedAt=this.parentClock.elapsedTime,this.pausedByTimescale=!1,this.paused$.next(!0)}resume(){this.isRunning||-1==this.pausedAt||(this.startedAt+=this.parentClock.elapsedTime-this.pausedAt,this.pausedAt=-1,this.startListeningTicks(),this.paused$.next(!1))}startListeningTicks(){if(this.tickSub)throw new Error("Clock is already ticking!");this.tickSub=this.parentClock.tick$.pipe(et(([t,e])=>[this.oldRelativeTime,this.oldRelativeTime+e*this.timeScale]),Vi(([t,e])=>this.oldRelativeTime=e)).subscribe(this._internalTick$)}stopListeningTicks(){var t;null===(t=this.tickSub)||void 0===t||t.unsubscribe(),this.tickSub=null}dispose(){this.stopListeningTicks(),this._internalTick$.complete(),super.dispose()}}const hse={transparent:!1,background:0,size:"fullscreen",antialias:!0};class fse{constructor(t,e,n={}){this.scene=t,this.canvas=e,this.entity=null,this.rendererOptions=Object.assign(Object.assign({},hse),n||{})}}class pb{static fromArray(t,e=!1){const n=new pb(t[0]);let r=n;for(let s=1;sn.map(r=>new pb(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]}constructor(t){this.data=t,this.adjacent=new Set}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(d=>!e.has(d));for(const d of c)e.add(d),r.push([d,a-1])}}return n}nodes(){return Array.from(this.walkRead(-1))}}var sc=(()=>{return(i=sc||(sc={}))[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",sc;var i})();let Xh=(()=>{class i{constructor(){this.tick$=new Re,this._world=null,this._name="e0x"+(i.default_name_counter++).toString(16),this._selfActive=!0,this.parent=null,this._children=[],this._components=[],this._onSpawned$=new Re,this._onRemoved$=new Re}get world(){return this._world}get name(){return this._name}set name(e){this._name=e}get active(){return this._selfActive&&(!this.parent||this.parent.active)}set active(e){this._selfActive=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 pse extends Xh{constructor(t){super(),this.tickOrder=t}}function Ym(i,t=sc.CONTROLLERS,e){const n=new pse(t);return e&&(n.name=e),i.addEntity(n),n.tick$.pipe(su(()=>{i.removeEntity(n,!0)}))}class ZR extends Xh{get rendererSize$(){return this._rendererSize$.asObservable()}get rendererSize(){return this._rendererSize$.getValue()}get rendererOptions(){return this.renderer.rendererOptions}get physicsDebugViewActive(){return this.renderer.physicsDebugViewActive}set physicsDebugViewActive(t){this.renderer.physicsDebugViewActive=t}constructor(t){super(),this.renderer=t,this.tickOrder=sc.RENDERING,this._rendererSize$=new gt(null),this.addComponents(t),this.tick$.subscribe(()=>{this.renderer.render()})}onSpawned(t){this._rendererSize$.next(null),"fullscreen"==this.rendererOptions.size||"function"==typeof this.rendererOptions.size?(this.renderer.canvas&&(this.renderer.canvas.style.position="absolute"),Mr(Ta(window,"resize").pipe(PM(100)),Ta(window,"orientationchange")).pipe(He(this._onRemoved$),et(()=>({x:window.innerWidth,y:window.innerHeight})),Ao({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 In||void 0!==this.rendererOptions.size.subscribe&&void 0!==this.rendererOptions.size.pipe?this.rendererOptions.size.pipe(He(this._onRemoved$)).subscribe(e=>{this._rendererSize$.next(e)}):this._rendererSize$.next(this.rendererOptions.size),this._rendererSize$.pipe(He(this._onRemoved$),Zl((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 QR=i=>{i.updateVisibility?i.updateVisibility():YH(i)},YH=i=>{for(const t of i.children)QR(t)};class mse extends Xh{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(){YH(this)}addChildren(...t){super.addChildren(...t);for(const e of t)QR(e)}removeChildren(t,e=!1){if(super.removeChildren(t,e),!e)for(const n of t)QR(n)}}class JR{constructor(){this._running=!1,this.stop$=new Re}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 gse extends JR{get output$(){return this._output$.asObservable()}constructor(t,e){super(),this.keyboard=t,this.keymap=e,this._output$=new Re}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")),nu(t.map(e=>this.keyboard.bindMany(...e))).pipe(He(this.stop$),et(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 ek=new In(ms);class CC extends JR{constructor(){super(),this.bindings={},this.skipKeyDownsOnExternalFocus=!0,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 gt(!1);return this.bindings[t].push(e),e.pipe(Zl(),su(()=>{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"),ek;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 gt(!1);this.bindings[n].push(r),e.push(r)}return nu(e).pipe(su(()=>{for(let n=0;nn.includes(!0)),Zl())}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 CC.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)}}CC.externalFocusBlacklist=[HTMLInputElement,HTMLTextAreaElement,HTMLSelectElement,HTMLButtonElement];class qr{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 qr.len(qr.sub(t,e))}static norm(t){const e=qr.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 vse={pointerLock:!1};var Fs=(()=>{return(i=Fs||(Fs={}))[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",Fs;var i})();class qm extends JR{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$=Ta(this._element,"wheel",{passive:!1}).pipe(He(this.stopped$),su(()=>this._wheel$=null),Vi(t=>t.preventDefault()),et(t=>t.deltaY),Uf())),this._wheel$}get isPointerLocked(){return!!document.pointerLockElement}get isPointerLocked$(){return Ta(document,"pointerlockchange").pipe(et(()=>this.isPointerLocked))}get state(){return this._state$.getValue()}get state$(){return this._state$.asObservable()}get multiTouchPositions$(){return this._multiTouchPositions$.asObservable()}get twoTouchGestureDelta$(){return this.state$.pipe(Rs(t=>t==Fs.DRAG_TOUCH_TWO_FINGERS?this.multiTouchPositions$:ek),et(t=>t.map(e=>({x:e.x,y:e.y}))),function _se(){return ti((i,t)=>{let e,n=!1;i.subscribe(Yn(t,r=>{const s=e;e=r,n&&t.next([s,r]),n=!0}))})}(),gn(([t,e])=>t.length>1&&e.length>1),et(([t,e])=>({centerPointDelta:qr.sub(qr.scalarMult(e.reduce((n,r)=>qr.add(n,r),qr.O),1/e.length),qr.scalarMult(t.reduce((n,r)=>qr.add(n,r),qr.O),1/e.length)),angleDelta:qr.angle(e[1],e[0])-qr.angle(t[1],t[0]),distanceDelta:qr.dist(e[1],e[0])-qr.dist(t[1],t[0])})))}get _element(){return this.options.canvas||window}constructor(t={}){super(),this._wheel$=null,this._delta$=new Re,this._position$=new gt(qr.O),this._multiTouchPositions$=new gt([]),this.stopped$=new Re,this._state$=new gt(Fs.NONE),this.options=Object.assign(Object.assign({},vse),t),this.canvasClickListener=this.canvasClickListener.bind(this)}startInternal(){this.options.canvas&&(this.options.canvas.style.touchAction="none"),this._state$.next(Fs.NONE);const t=[Fs.DRAG,Fs.DRAG_MIDDLE_BUTTON,Fs.DRAG_RIGHT_BUTTON],e=[Fs.NONE,Fs.DRAG,Fs.DRAG_TOUCH_TWO_FINGERS],n=[],r={};Ta(this._element,"mousemove").pipe(He(this.stopped$)).subscribe(o=>{this._delta$.next({x:o.movementX,y:o.movementY})}),Ta(this._element,"pointermove").pipe(He(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})}),!qm.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{if(0===n.length)try{this.options.canvas&&this.options.canvas.setPointerCapture(o.pointerId),window.addEventListener("pointerup",s),this._element.addEventListener("pointercancel",s)}catch(a){console.error(a)}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]||Fs.NONE)}),Ta(this._element,"contextmenu").pipe(He(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 yse{static lookAt(t,e,n){let r=Pe.sub(t,e);r=0===Pe.lenSq(r)?Object.assign(Object.assign({},r),{z:1}):Pe.norm(r);let s=Pe.cross(n,r);0===Pe.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=Pe.norm(r),s=Pe.cross(n,r)),s=Pe.norm(s);let o=Pe.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 Yi{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,d=t.w*Math.sin((1-n)*s)/o+e.w*Math.sin(n*s)/o;return isNaN(a)||isNaN(l)||isNaN(c)||isNaN(d)?Yi.clone(t):{x:a,y:l,z:c,w:d}}static fromAngle(t,e){const n=e/2,r=Math.sin(n);return Object.assign(Object.assign({},Pe.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],d=t[10],h=e+o+d;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>d){const p=2*Math.sqrt(1+e-o-d);return{x:.25*p,y:(n+s)/p,z:(r+l)/p,w:(c-a)/p}}if(o>d){const p=2*Math.sqrt(1+o-e-d);return{x:(n+s)/p,y:.25*p,z:(a+c)/p,w:(r-l)/p}}{const p=2*Math.sqrt(1+d-e-o);return{x:(r+l)/p,y:(a+c)/p,z:.25*p,w:(s-n)/p}}}static fromMatrix3(t){const e=t[0][0]+t[1][1]+t[2][2];let n,r,s,o;if(e>0){const a=.5/Math.sqrt(e+1);n=.25/a,r=(t[2][1]-t[1][2])*a,s=(t[0][2]-t[2][0])*a,o=(t[1][0]-t[0][1])*a}else if(t[0][0]>t[1][1]&&t[0][0]>t[2][2]){const a=2*Math.sqrt(1+t[0][0]-t[1][1]-t[2][2]);n=(t[2][1]-t[1][2])/a,r=.25*a,s=(t[0][1]+t[1][0])/a,o=(t[0][2]+t[2][0])/a}else if(t[1][1]>t[2][2]){const a=2*Math.sqrt(1+t[1][1]-t[0][0]-t[2][2]);n=(t[0][2]-t[2][0])/a,r=(t[0][1]+t[1][0])/a,s=.25*a,o=(t[1][2]+t[2][1])/a}else{const a=2*Math.sqrt(1+t[2][2]-t[0][0]-t[1][1]);n=(t[1][0]-t[0][1])/a,r=(t[0][2]+t[2][0])/a,s=(t[1][2]+t[2][1])/a,o=.25*a}return{w:n,x:r,y:s,z:o}}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),d=Math.sin(.5*e);return{w:c*a*s+d*l*o,x:d*a*s-c*l*o,y:c*l*s+d*a*o,z:c*a*o-d*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=Pe.Z){return this.fromMatrix4(yse.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 Pe{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 Pe.len(Pe.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=Pe.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,Yi.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)}}}function tk(i,t,e,n){return r=>r.pipe(tI((s,o)=>{var a;return{targetValue:o,currentValue:null!==(a=s.currentValue)&&void 0!==a?a:o,hasReachedTarget:!1}},{targetValue:null,currentValue:null,hasReachedTarget:!1}),Rs(s=>i.pipe(et(([o,a])=>{if(null===s.targetValue||null===s.currentValue)return s.currentValue;if(s.hasReachedTarget)return;const l=1-Math.exp(-a/t),c=e(s.currentValue,s.targetValue,l);return s.currentValue=c,n(c,s.targetValue)?(s.hasReachedTarget=!0,s.targetValue):c}))),et(s=>void 0!==s?s:null),gn(s=>null!==s))}ps(738);class wse extends Xh{get avgReport(){return this._avgReport}get peakReport(){return this._peakReport}constructor(t=60,e=15){super(),this.maxSamples=t,this.maxRows=e,this.tickOrder=Number.MAX_SAFE_INTEGER,this.sampleIndex=0,this.collectedData=new Map,this._avgReport={totalTime:0,entries:[]},this._peakReport={totalTime:0,entries:[]}}onSpawned(t){super.onSpawned(t),this.sampleIndex=0;const e=()=>(typeof performance>"u"?Date:performance).now();this.world.tickForwardTo$.pipe(He(this.onRemoved$)).subscribe(n=>{n!==this&&(this.collectedData.has(n)?this.collectedData.get(n).push([this.sampleIndex,e(),0]):this.collectedData.set(n,[[this.sampleIndex,e(),0]]))}),this.world.tickForwardedTo$.pipe(He(this.onRemoved$)).subscribe(n=>{if(n===this)return;const r=this.collectedData.get(n);r[r.length-1][2]=e()}),this.tick$.pipe(He(this.onRemoved$)).subscribe(()=>{this.sampleIndex++;const n=Array.from(this.collectedData.entries());for(const[h,p]of n){for(;p.length>0&&p[0][0]h instanceof Xh?""===h.name?h.constructor.name:h.name:"PHYSICS_WORLD"===h?"Physics simulation":h,s=h=>{let p=0,m=0;for(;mh.length-m+1){m--;break}p+=h[h.length-m-1][1]}return m>1&&(h=h.slice(0,h.length-m)).push([`Rest (${m})`,p]),h};let o=0,a=Array.from(this.collectedData.entries()).map(([h,p])=>{const m=p.reduce((g,[b,v,y])=>g+y-v,0)/this.maxSamples;return o+=m,[r(h),m]}).sort((h,p)=>p[1]-h[1]);a=s(a),this._avgReport={totalTime:o,entries:a};let l=new Map,c=Array.from(this.collectedData.entries()).map(([h,p])=>{let m=0;for(const[g,b,v]of p){const y=v-b;m=Math.max(m,y),l.set(g,y+(l.get(g)||0))}return[r(h),m]}).sort((h,p)=>p[1]-h[1]);c=s(c);let d=Array.from(l.values()).reduce((h,p)=>Math.max(h,p),0);this._peakReport={totalTime:d,entries:c}})}onRemoved(){super.onRemoved(),this.collectedData=new Map,this._avgReport={totalTime:0,entries:[]},this._peakReport={totalTime:0,entries:[]}}}var Xm=function(i,t,e,n){return new(e||(e=Promise))(function(s,o){function a(d){try{c(n.next(d))}catch(h){o(h)}}function l(d){try{c(n.throw(d))}catch(h){o(h)}}function c(d){d.done?s(d.value):function r(s){return s instanceof e?s:new e(function(o){o(s)})}(d.value).then(a,l)}c((n=n.apply(i,t||[])).next())})};class yl{static get documentWorlds(){return[...yl._documentWorlds]}constructor(t,e){this.visualScene=t,this.physicsWorld=e,this.worldClock=new jH(!1),this.keyboardInput=new CC,this.name="w0x"+(yl.default_name_counter++).toString(16),this.children=[],this.tickListeners=[],this.tickStarted$=new Re,this.tickForwardTo$=new Re,this.tickForwardedTo$=new Re,this.paused$=new Re,this.disposed$=new Re,this.keyboardInput.start(),window.ggstatic?this.registerConsoleCommands(window.ggstatic):(this.onGgStaticInitialized=this.onGgStaticInitialized.bind(this),window.addEventListener("ggstatic_added",this.onGgStaticInitialized)),this.worldClock.paused$.subscribe(this.paused$),yl._documentWorlds.push(this),yl.worldCreated$.next(this)}init(){return Xm(this,void 0,void 0,function*(){yield Promise.all([this.physicsWorld.init(),this.visualScene.init()]);const t=(e,n,r)=>{e.active&&(this.tickForwardTo$.next(e),e.tick$.next([n,r]),this.tickForwardedTo$.next(e))};this.worldClock.tick$.subscribe(([e,n])=>{this.tickStarted$.next();let r=0;for(;r=sc.PHYSICS_SIMULATION);r++)t(this.tickListeners[r],e,n);for(this.tickForwardTo$.next("PHYSICS_WORLD"),this.physicsWorld.simulate(n),this.tickForwardedTo$.next("PHYSICS_WORLD");re.tickOrder-n.tickOrder),t.onSpawned(this))}removeEntity(t,e=!1){if(t.world){if(t.world!==this)throw new Error("Entity is not a part of this world");this.children.splice(this.children.findIndex(n=>n===t),1),this.tickListeners.splice(this.tickListeners.findIndex(n=>n===t),1),t.onRemoved()}e&&t.dispose()}onGgStaticInitialized(){window.removeEventListener("ggstatic_added",this.onGgStaticInitialized),this.registerConsoleCommands(window.ggstatic)}registerConsoleCommands(t){t.registerConsoleCommand(this,"timescale",(...e)=>Xm(this,void 0,void 0,function*(){return isNaN(+e[0])||(this.worldClock.timeScale=+e[0]),this.worldClock.timeScale.toString()}),"args: [ float? ]; Get current time scale of selected world clock or set it. Default value is 1.0 (no time scale applied)"),t.registerConsoleCommand(this,"fps_limit",(...e)=>Xm(this,void 0,void 0,function*(){return isNaN(+e[0])||(this.worldClock.tickRateLimit=+e[0]),this.worldClock.tickRateLimit.toString()}),"args: [ int? ]; Get current tick rate limit of selected world clock or set it. 0 means no limit applied"),t.registerConsoleCommand(this,"renderers",()=>Xm(this,void 0,void 0,function*(){return this.children.filter(e=>e instanceof ZR).map(e=>e.name).join("\n")}),"no args; Print all renderers in selected world"),t.registerConsoleCommand(this,"debug_view",(...e)=>Xm(this,void 0,void 0,function*(){let r,n="toggle";for(let o of e)["1","0"].includes(o)?n="1"===o:r=o;let s=this.children.find(o=>o instanceof ZR&&(!r||o.name===r));if(s)return s.physicsDebugViewActive="toggle"===n?!s.physicsDebugViewActive:n,s.physicsDebugViewActive?"1":"0";throw r?new Error(`Renderer with name "${r}" not found`):new Error("No renderer found")}),'args: [ 0|1?, string? ]; Turn on/off physics debug view, skip first argument to toggle value. Second argument expects renderer name, if not provided first renderer will be picked. Use "renderers" to get list of renderers in the world'),t.registerConsoleCommand(this,"performance",(...e)=>Xm(this,void 0,void 0,function*(){let n="avg",r=20;for(let d of e)["avg","peak"].includes(d)?n=d:isNaN(+d)||(r=+d);const s=new wse(r,250);this.addEntity(s),yield function bse(i,t){const e="object"==typeof t;return new Promise((n,r)=>{let o,s=!1;i.subscribe({next:a=>{o=a,s=!0},error:r,complete:()=>{s?n(o):e?n(t.defaultValue):r(new fm)}})})}(this.worldClock.tick$.pipe(Oi(r)));const o="avg"===n?s.avgReport:s.peakReport;this.removeEntity(s);const a=o.entries.map(([d,h])=>`${d}:`+new Array(Math.max(0,26-d.length)).join(" ")+`${h.toFixed(2)} ms`+("avg"===n?` (${(100*h/o.totalTime).toFixed(2)}%)`:""));let l="lightgreen";o.totalTime>12&&(l=o.totalTime<16?"yellow":"red");const c=("avg"===n?"Average":"Peak")+" Frame time";return a.unshift(c+":"+new Array(Math.max(0,26-c.length)).join(" ")+`${o.totalTime.toFixed(2)} ms`),a.unshift(`Performance report (${r} samples)`),a.join("\n")}),'args: [ int?, avg|peak? ]; Measure how much time was spent per entity in world. Arguments are samples amount (20 by default) and "peak" or "avg" choice, both arguments are optional. "avg" report sorts entities by average time consumed, "peak" records highest value for each entity')}}yl.default_name_counter=0,yl._documentWorlds=[],yl.worldCreated$=new Re;class Ese extends fse{}class XH extends mse{constructor(){super(...arguments),this._world=null}get world(){return this._world}}class Zo extends XH{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}constructor(t){super(),this.tickOrder=sc.OBJECTS_BINDING,this._position=Pe.O,this._rotation=Yi.O,this.object3D=null,this.objectBody=null,t.objectBody&&(this.objectBody=t.objectBody,this.name=this.objectBody.name,this.addComponents(this.objectBody)),t.object3D&&(this.object3D=t.object3D,t.objectBody||(this._position=this.object3D.position,this._rotation=this.object3D.rotation,this.name=this.object3D.name),this.addComponents(this.object3D)),this.objectBody&&(this.tick$.subscribe(()=>{this.runTransformBinding(this.objectBody,this.object3D)}),this.runTransformBinding(this.objectBody,this.object3D))}}class Km extends pb{static fromMapArray(t,e=!1){const n=new Km(t[0]);let r=n;for(let s=1;sn.map(r=>new Km(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));othis.mapGraph.getNearestDummy(this.mapGraphNodes,this.loaderCursor$.getValue())),Zl(),Vi(r=>this._nearestDummy$.next(r))).subscribe(r=>{let o,s=new Set;if(this.options.inertia>0){o=new Set;const a=r.walkReadPreserveDepth(this.options.loadDepth+this.options.inertia);for(let l=0;lo.add(c.data)),l<=this.options.loadDepth&&a[l].forEach(c=>s.add(c.data))}else r.walkRead(this.options.loadDepth).forEach(a=>s.add(a.data)),o=s;for(const a of this.loaded.keys())o.has(a)?s.delete(a):n.includes(a)||n.push(a);for(let a of Array.from(s.keys()))e.includes(a)||e.push(a)}),this.tick$.pipe(Ao(null),He(this._onRemoved$)).subscribe(()=>{if(n.length){for(const r of n)this.disposeChunk(r);n=[]}if(e.length)if(this._initialLoadComplete$.value&&e.length>this.options.maxNodesLoadingPerTick){let r=e.slice(0,this.options.maxNodesLoadingPerTick);e=e.slice(this.options.maxNodesLoadingPerTick),Promise.all(r.map(s=>this.loadChunk(s))).then()}else Promise.all(e.map(r=>this.loadChunk(r))).then(()=>{this._initialLoadComplete$.value||this._initialLoadComplete$.next(!0)}),e=[]})}onRemoved(){super.onRemoved(),this.loadClock&&(this.loadClock.stop(),this.loadClock=null),this.loaderCursor$.next(Pe.O)}loadChunk(t){return function(i,t,e,n){return new(e||(e=Promise))(function(s,o){function a(d){try{c(n.next(d))}catch(h){o(h)}}function l(d){try{c(n.throw(d))}catch(h){o(h)}}function c(d){d.done?s(d.value):function r(s){return s instanceof e?s:new e(function(o){o(s)})}(d.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||Yi.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||Yi.O}]),[n,e]})}disposeChunk(t){this.loaded.has(t)&&(this.removeChildren(this.loaded.get(t),!0),this.loaded.delete(t))}}class Tse extends ZR{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 e4=function(i,t,e,n){return new(e||(e=Promise))(function(s,o){function a(d){try{c(n.next(d))}catch(h){o(h)}}function l(d){try{c(n.throw(d))}catch(h){o(h)}}function c(d){d.done?s(d.value):function r(s){return s instanceof e?s:new e(function(o){o(s)})}(d.value).then(a,l)}c((n=n.apply(i,t||[])).next())})};const t4={keymap:"wasd",cameraLinearSpeed:20,cameraMovementElasticity:0,cameraBoostMultiplier:2.5,cameraRotationSensitivity:1,cameraRotationElasticity:0,mouseOptions:{},ignoreMouseUnlessPointerLocked:!1,ignoreKeyboardUnlessPointerLocked:!1};class n4 extends Xh{get active(){return super.active}set active(t){!super.active&&t&&this.reset(),super.active=t}get spherical(){return this._spherical}set spherical(t){this._spherical.phi=Math.max(1e-6,Math.min(Math.PI-1e-6,t.phi)),this._spherical.theta=t.theta,this.resetMotion$.next()}constructor(t,e,n={}){super(),this.keyboard=t,this.camera=e,this.tickOrder=sc.INPUT_CONTROLLERS,this._spherical={phi:0,radius:1,theta:0},this.resetMotion$=new Re,this.options=Object.assign(Object.assign({},t4),n),n.mouseOptions&&(this.options.mouseOptions=Object.assign(Object.assign({},t4.mouseOptions),n.mouseOptions)),this.mouseInput=new qm(this.options.mouseOptions),this.directionsInput=new gse(t,this.options.keymap)}reset(){this._spherical=Pe.toSpherical(Pe.rot({x:0,y:0,z:-1},this.camera.rotation)),this.resetMotion$.next()}onSpawned(t){const e=Object.create(null,{onSpawned:{get:()=>super.onSpawned}});return e4(this,void 0,void 0,function*(){yield e.onSpawned.call(this,t),this._spherical=Pe.toSpherical(Pe.rot({x:0,y:0,z:-1},this.camera.rotation));const n=["KeyE","KeyQ"];this.camera.camera.supportsFov&&n.push("KeyZ","KeyC"),n.push("ShiftLeft");let r=nu([this.directionsInput.output$,...n.map(c=>this.keyboard.bind(c))]).pipe(He(this._onRemoved$),et(([c,...d])=>{let h={direction:{},rest:[]};(!this.options.ignoreKeyboardUnlessPointerLocked||this.mouseInput.isPointerLocked)&&(h={direction:c,rest:d});let p=Object.assign({},Pe.O);const[m,g,b,v,y]=h.rest;void 0!==h.direction.upDown&&(p.z=h.direction.upDown?-1:1),void 0!==h.direction.leftRight&&(p.x=h.direction.leftRight?-1:1),m!=g&&(p.y=g?-1:1);let M=0;return b!=v&&(M=b?1:-1),p=Pe.norm(p),y&&(p=Pe.scalarMult(p,this.options.cameraBoostMultiplier)),[p,M]}));this.options.cameraMovementElasticity>0&&(r=r.pipe(tk(this.camera.tick$,this.options.cameraMovementElasticity,([c,d],[h,p],m)=>[Pe.lerp(c,h,m),p],([c,d],[h,p])=>d==p&&Pe.dist(c,h)<.001)));let s=Pe.O,o=0;r.subscribe(([c,d])=>{s=c,o=d});let a=qm.isTouchDevice(),l=this.mouseInput.delta$.pipe(He(this._onRemoved$),gn(()=>this.active&&(a||!this.options.ignoreMouseUnlessPointerLocked||this.mouseInput.isPointerLocked)));if(this.options.cameraRotationElasticity>0){const c=new gt(this._spherical);l.subscribe(h=>{const p=c.getValue();c.next({phi:Math.max(1e-6,Math.min(Math.PI-1e-6,p.phi+h.y*this.options.cameraRotationSensitivity/1e3)),theta:p.theta-h.x*this.options.cameraRotationSensitivity/1e3,radius:1})});const d=()=>{c.pipe(He(this._onRemoved$),tk(this.tick$,this.options.cameraRotationElasticity,(h,p,m)=>({phi:h.phi+m*(p.phi-h.phi),theta:h.theta+m*(p.theta-h.theta),radius:1}),(h,p)=>qr.dist({x:h.phi,y:h.theta},{x:p.phi,y:p.theta})<1e-4),He(this.resetMotion$)).subscribe(h=>{this._spherical.theta=h.theta,this._spherical.phi=h.phi})};this.resetMotion$.pipe(He(this._onRemoved$)).subscribe(()=>{c.next(this._spherical),d()}),d()}else l.subscribe(c=>{this._spherical.theta-=c.x*this.options.cameraRotationSensitivity/1e3,this._spherical.phi+=c.y*this.options.cameraRotationSensitivity/1e3,this._spherical.phi=Math.max(1e-6,Math.min(Math.PI-1e-6,this._spherical.phi))});this.camera.tick$.pipe(He(this._onRemoved$),gn(()=>this.active)).subscribe(([c,d])=>{this.camera.camera.fov+=o,this.camera.position=Pe.add(this.camera.position,Pe.rot(Pe.scalarMult(s,this.options.cameraLinearSpeed*d/1e3),this.camera.rotation)),this.camera.rotation=Yi.lookAt(this.camera.position,Pe.add(this.camera.position,Pe.fromSpherical(this._spherical)))}),this.mouseInput.start(),this.directionsInput.start()})}onRemoved(){const t=Object.create(null,{onRemoved:{get:()=>super.onRemoved}});return e4(this,void 0,void 0,function*(){yield t.onRemoved.call(this),yield this.mouseInput.stop(!0),yield this.directionsInput.stop()})}}var i4=function(i,t,e,n){return new(e||(e=Promise))(function(s,o){function a(d){try{c(n.next(d))}catch(h){o(h)}}function l(d){try{c(n.throw(d))}catch(h){o(h)}}function c(d){d.done?s(d.value):function r(s){return s instanceof e?s:new e(function(o){o(s)})}(d.value).then(a,l)}c((n=n.apply(i,t||[])).next())})};const Rse={mouseOptions:{},orbiting:{sensitivityX:1,sensitivityY:1},orbitingElasticity:0,zooming:{sensitivity:1},panning:{sensitivityX:1,sensitivityY:1},dollying:{sensitivity:1}};class kse extends Xh{get active(){return super.active}set active(t){!super.active&&t&&this.reset(),super.active=t}get spherical(){return this._spherical}set spherical(t){this._spherical.phi=Math.max(1e-6,Math.min(Math.PI-1e-6,t.phi)),this._spherical.theta=t.theta,this._spherical.radius=t.radius,this.resetMotion$.next()}constructor(t,e={}){super(),this.camera=t,this.tickOrder=sc.INPUT_CONTROLLERS,this._spherical={phi:0,radius:10,theta:0},this.target=Pe.O,this.resetMotion$=new Re,this.options=Object.assign(Object.assign({},Rse),e),this.mouseInput=new qm(this.options.mouseOptions)}reset(){let t=Pe.dist(this.target,this.camera.position);this.target=Pe.add(this.camera.position,Pe.rot({x:0,y:0,z:-t},this.camera.rotation)),this._spherical=Pe.toSpherical(Pe.sub(this.camera.position,this.target)),this.resetMotion$.next()}onSpawned(t){const e=Object.create(null,{onSpawned:{get:()=>super.onSpawned}});return i4(this,void 0,void 0,function*(){if(yield e.onSpawned.call(this,t),this._spherical=Pe.toSpherical(Pe.sub(this.camera.position,this.target)),this.options.orbiting){let r=this.mouseInput.delta$.pipe(He(this._onRemoved$),gn(()=>this.active&&this.mouseInput.state==Fs.DRAG));if(this.options.orbitingElasticity>0){const s=new gt(this._spherical);r.subscribe(a=>{const l=s.getValue();s.next({phi:Math.max(1e-6,Math.min(Math.PI-1e-6,l.phi-a.y*this.options.orbiting.sensitivityY/1e3)),theta:l.theta-a.x*this.options.orbiting.sensitivityX/1e3,radius:1})});const o=()=>{s.pipe(He(this._onRemoved$),tk(this.tick$,this.options.orbitingElasticity,(a,l,c)=>({phi:a.phi+c*(l.phi-a.phi),theta:a.theta+c*(l.theta-a.theta),radius:1}),(a,l)=>qr.dist({x:a.phi,y:a.theta},{x:l.phi,y:l.theta})<1e-4),He(this.resetMotion$)).subscribe(a=>{this._spherical.theta=a.theta,this._spherical.phi=a.phi})};this.resetMotion$.pipe(He(this._onRemoved$)).subscribe(()=>{s.next(this._spherical),o()}),o()}else r.subscribe(s=>{this._spherical.theta-=s.x*this.options.orbiting.sensitivityX/1e3,this._spherical.phi-=s.y*this.options.orbiting.sensitivityY/1e3,this._spherical.phi=Math.max(1e-6,Math.min(Math.PI-1e-6,this._spherical.phi))})}this.options.zooming&&this.mouseInput.wheel$.pipe(He(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=Pe.fromSpherical(this._spherical),o=Pe.rotAround(s,{x:-Math.sin(this._spherical.theta),y:Math.cos(this._spherical.theta),z:0},Math.PI/2),a=Pe.rotAround(s,Pe.norm(o),Math.PI/2);this.target=Pe.add(this.target,Pe.add(Pe.scalarMult(o,-this.options.panning.sensitivityY*r.y/1e3),Pe.scalarMult(a,this.options.panning.sensitivityX*r.x/1e3)))};this.options.panning&&this.mouseInput.delta$.pipe(He(this._onRemoved$),gn(()=>this.mouseInput.state==Fs.DRAG_RIGHT_BUTTON)).subscribe(r=>{n(r)}),this.options.dollying&&this.mouseInput.delta$.pipe(He(this._onRemoved$),gn(()=>this.mouseInput.state==Fs.DRAG_MIDDLE_BUTTON)).subscribe(r=>{this._spherical.radius*=Math.pow(.95,-this.options.dollying.sensitivity*r.y/10)}),qm.isTouchDevice()&&(this.options.dollying||this.options.panning)&&this.mouseInput.twoTouchGestureDelta$.pipe(He(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(He(this._onRemoved$),gn(()=>this.active),et(()=>this._spherical)).subscribe(r=>{this.camera.position=Pe.add(this.target,Pe.fromSpherical(r)),this.camera.rotation=Yi.lookAt(this.camera.position,this.target)}),yield this.mouseInput.start()})}onRemoved(){const t=Object.create(null,{onRemoved:{get:()=>super.onRemoved}});return i4(this,void 0,void 0,function*(){yield t.onRemoved.call(this),yield this.mouseInput.stop(!0)})}}class Ose{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 rk=function(i,t,e,n){return new(e||(e=Promise))(function(s,o){function a(d){try{c(n.next(d))}catch(h){o(h)}}function l(d){try{c(n.throw(d))}catch(h){o(h)}}function c(d){d.done?s(d.value):function r(s){return s instanceof e?s:new e(function(o){o(s)})}(d.value).then(a,l)}c((n=n.apply(i,t||[])).next())})},yu=(()=>{return(i=yu||(yu={}))[i.Nothing=0]="Nothing",i[i.Files=1]="Files",i[i.Entities=2]="Entities",yu;var i})();const r4={cachingStrategy:yu.Nothing,position:Pe.O,rotation:Yi.O,loadProps:!0},s4=i=>({meta:i.meta,resources:i.resources.map(({object3D:t,body:e})=>({object3D:t&&t.clone(),body:e&&e.clone()}))});class Fse{constructor(t){this.world=t,this.filesCache=new Map,this.loadResultCache=new Map}loadGgGlbFiles(t){return rk(this,arguments,void 0,function*(e,n=!1){if(n&&this.filesCache.has(e))return this.filesCache.get(e);const r=Promise.all([fetch(`${e}.glb`).then(o=>o.arrayBuffer()),fetch(`${e}.meta`).then(o=>o.text()).then(o=>JSON.parse(o))]);n&&this.filesCache.set(e,r);const s=yield r;return n&&this.filesCache.set(e,s),s})}loadGgGlbResources(t){return rk(this,arguments,void 0,function*(e,n=yu.Nothing){if(n==yu.Entities&&this.loadResultCache.has(e)){const c=this.loadResultCache.get(e),d=c instanceof Promise?yield c:c;return s4(d)}const[r,s]=yield this.loadGgGlbFiles(e,n==yu.Files);if(!r)throw new Error("GLB not found");const[o,a]=yield Promise.all([this.world.visualScene.loader.loadFromGgGlb(r,s),this.world.physicsWorld.loader.loadFromGgGlb(r,s)]),l={resources:[],meta:s};if(!o)return l;if(0==a.length)l.resources.push({object3D:o,body:null});else if(1==a.length)l.resources.push({object3D:o,body:a[0]});else{for(const c of a)l.resources.push({object3D:o.popChild(c.name),body:c});o.isEmpty()||l.resources.push({object3D:o,body:null})}return n==yu.Entities&&this.loadResultCache.set(e,s4(l)),l})}loadGgGlb(t){return rk(this,arguments,void 0,function*(e,n=r4){const r=Object.assign(Object.assign({},r4),n),{resources:s,meta:o}=yield this.loadGgGlbResources(e,r.cachingStrategy),a={entities:s.map(l=>new Zo({object3D:l.object3D,objectBody:l.body})),meta:o};return r.loadProps&&(a.props=yield Promise.all(o.dummies.filter(l=>l.is_prop||l.is_scene).map(l=>this.loadGgGlb(l.is_prop?(r.propsPath||e.substring(0,e.lastIndexOf("/")+1))+l.prop_id:l.scene_id,{loadProps:!!l.is_scene,position:Pe.add(Pe.rot(l.position,r.rotation),r.position),rotation:Yi.combineRotations(l.rotation,r.rotation)})))),a.entities.forEach(l=>{l.position=Pe.add(Pe.rot(Pe.clone(l.position),r.rotation),r.position),l.rotation=Yi.mult(Yi.clone(l.rotation),r.rotation)}),a})}}class sk extends yl{constructor(t,e){super(t,e),this.visualScene=t,this.physicsWorld=e,this.loader=new Fse(this)}addPrimitiveRigidBody(t,e=Pe.O,n=Yi.O,r={}){const s=new Zo({object3D:this.visualScene.factory.createPrimitive(t.shape,r),objectBody:this.physicsWorld.factory.createRigidBody(t)});return s.position=e,s.rotation=n,this.addEntity(s),s}addRenderer(t,e,n){const r=new Tse(this.visualScene.createRenderer(t,e,n));return this.addEntity(r),r}registerConsoleCommands(t){super.registerConsoleCommands(t),t.registerConsoleCommand(this,"gravity",(...e)=>function(i,t,e,n){return new(e||(e=Promise))(function(s,o){function a(d){try{c(n.next(d))}catch(h){o(h)}}function l(d){try{c(n.throw(d))}catch(h){o(h)}}function c(d){d.done?s(d.value):function r(s){return s instanceof e?s:new e(function(o){o(s)})}(d.value).then(a,l)}c((n=n.apply(i,t||[])).next())})}(this,void 0,void 0,function*(){if(1==e.length&&(e=["0","0",""+-+e[0]]),e.length>0){if(isNaN(+e[0])||isNaN(+e[1])||isNaN(+e[2]))throw new Error("Wrong arguments");this.physicsWorld.gravity={x:+e[0],y:+e[1],z:+e[2]}}return JSON.stringify(this.physicsWorld.gravity)}),'args: [ ?float, ?float, ?float ]; Get or set 3D world gravity vector. 1 argument sets vector {x: 0, y: 0, z: -value}, 3 arguments set the whole vector. Default value is "9.82" or "0 0 -9.82"')}}function o4(i,t=$y,e){const n=OI(i,t);return function Nse(i,t){return ti((e,n)=>{const{leading:r=!0,trailing:s=!1}=t??{};let o=!1,a=null,l=null,c=!1;const d=()=>{l?.unsubscribe(),l=null,s&&(m(),c&&n.complete())},h=()=>{l=null,c&&n.complete()},p=g=>l=wr(i(g)).subscribe(Yn(n,d,h)),m=()=>{if(o){o=!1;const g=a;a=null,n.next(g),!c&&p(g)}};e.subscribe(Yn(n,g=>{o=!0,a=g,(!l||l.closed)&&(r?m():p(g))},()=>{c=!0,(!(s&&o&&l)||l.closed)&&n.complete()}))})}(()=>n,e)}window.gg_version="0.0.56";const Bse=0,a4=1,Use=2,l4=1,c4=2,Zc=3,ac=0,Io=1,Ls=2,Qc=0,Zm=1,d4=2,u4=3,h4=4,Vse=5,Kh=100,zse=101,Hse=102,Gse=103,$se=104,Wse=200,jse=201,Yse=202,qse=203,ak=204,lk=205,Xse=206,Kse=207,Zse=208,Qse=209,Jse=210,eoe=211,toe=212,noe=213,ioe=214,roe=0,soe=1,ooe=2,SC=3,aoe=4,loe=5,coe=6,doe=7,EC=0,uoe=1,hoe=2,bu=0,foe=1,poe=2,moe=3,goe=4,_oe=5,voe=6,yoe=7,f4="attached",lc=301,Zh=302,AC=303,DC=304,mb=306,Pa=1e3,Ii=1001,gb=1002,_r=1003,dk=1004,Qm=1005,lr=1006,_b=1007,bl=1008,Jc=1009,p4=1010,m4=1011,vb=1012,uk=1013,xu=1014,Qo=1015,Jm=1016,hk=1017,fk=1018,eg=1020,g4=35902,_4=1021,v4=1022,Ro=1023,y4=1024,b4=1025,tg=1026,ng=1027,pk=1028,TC=1029,x4=1030,mk=1031,gk=1033,IC=33776,RC=33777,kC=33778,PC=33779,_k=35840,vk=35841,yk=35842,bk=35843,xk=36196,wk=37492,Mk=37496,Ck=37808,Sk=37809,Ek=37810,Ak=37811,Dk=37812,Tk=37813,Ik=37814,Rk=37815,kk=37816,Pk=37817,Ok=37818,Fk=37819,Lk=37820,Nk=37821,OC=36492,Bk=36494,Uk=36495,w4=36283,Vk=36284,zk=36285,Hk=36286,yb=2300,bb=2301,Coe=0,C4=1,Wk=2,Eoe=3201,Qh=0,Aoe=1,wu="",cs="srgb",ds="srgb-linear",jk="display-p3",LC="display-p3-linear",NC="linear",Fi="srgb",BC="rec709",UC="p3",sg=7680,Doe=512,Toe=513,Ioe=514,E4=515,Roe=516,koe=517,Poe=518,Ooe=519,A4="300 es",ed=2e3;class og{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]+Ns[i>>16&255]+Ns[i>>24&255]+"-"+Ns[255&t]+Ns[t>>8&255]+"-"+Ns[t>>16&15|64]+Ns[t>>24&255]+"-"+Ns[63&e|128]+Ns[e>>8&255]+"-"+Ns[e>>16&255]+Ns[e>>24&255]+Ns[255&n]+Ns[n>>8&255]+Ns[n>>16&255]+Ns[n>>24&255]).toLowerCase()}function er(i,t,e){return Math.max(t,Math.min(e,i))}function Yk(i,t){return(i%t+t)%t}function xb(i,t,e){return(1-e)*i+e*t}function lo(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 yn(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 Zoe_radToDeg=function joe(i){return i*ag};class xe{constructor(t=0,e=0){xe.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(er(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 wn{constructor(t,e,n,r,s,o,a,l,c){wn.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 d=this.elements;return d[0]=t,d[1]=r,d[2]=a,d[3]=e,d[4]=s,d[5]=l,d[6]=n,d[7]=o,d[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],d=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],F=r[2],D=r[5],k=r[8];return s[0]=o*b+a*M+l*F,s[3]=o*v+a*x+l*D,s[6]=o*y+a*C+l*k,s[1]=c*b+d*M+h*F,s[4]=c*v+d*x+h*D,s[7]=c*y+d*C+h*k,s[2]=p*b+m*M+g*F,s[5]=p*v+m*x+g*D,s[8]=p*y+m*C+g*k,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],d=t[8];return e*o*d-e*a*c-n*s*d+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],d=t[8],h=d*o-a*c,p=a*l-d*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-d*n)*b,t[2]=(a*n-r*o)*b,t[3]=p*b,t[4]=(d*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(qk.makeScale(t,e)),this}rotate(t){return this.premultiply(qk.makeRotation(-t)),this}translate(t,e){return this.premultiply(qk.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 qk=new wn;function T4(i){for(let t=i.length-1;t>=0;--t)if(i[t]>=65535)return!0;return!1}function wb(i){return document.createElementNS("http://www.w3.org/1999/xhtml",i)}function Joe(){const i=wb("canvas");return i.style.display="block",i}Int8Array,Uint8Array,Uint8ClampedArray,Int16Array,Uint16Array,Int32Array,Uint32Array,Float32Array,Float64Array;const I4={};function cg(i){i in I4||(I4[i]=!0,console.warn(i))}const R4=(new wn).set(.8224621,.177538,0,.0331941,.9668058,0,.0170827,.0723974,.9105199),k4=(new wn).set(1.2249401,-.2249404,0,-.0420569,1.0420571,0,-.0196376,-.0786361,1.0982735),Mb={[ds]:{transfer:NC,primaries:BC,luminanceCoefficients:[.2126,.7152,.0722],toReference:i=>i,fromReference:i=>i},[cs]:{transfer:Fi,primaries:BC,luminanceCoefficients:[.2126,.7152,.0722],toReference:i=>i.convertSRGBToLinear(),fromReference:i=>i.convertLinearToSRGB()},[LC]:{transfer:NC,primaries:UC,luminanceCoefficients:[.2289,.6917,.0793],toReference:i=>i.applyMatrix3(k4),fromReference:i=>i.applyMatrix3(R4)},[jk]:{transfer:Fi,primaries:UC,luminanceCoefficients:[.2289,.6917,.0793],toReference:i=>i.convertSRGBToLinear().applyMatrix3(k4),fromReference:i=>i.applyMatrix3(R4).convertLinearToSRGB()}},tae=new Set([ds,LC]),Jn={enabled:!0,_workingColorSpace:ds,get workingColorSpace(){return this._workingColorSpace},set workingColorSpace(i){if(!tae.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,Mb[e].fromReference)((0,Mb[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 Mb[i].primaries},getTransfer:function(i){return i===wu?NC:Mb[i].transfer},getLuminanceCoefficients:function(i,t=this._workingColorSpace){return i.fromArray(Mb[t].luminanceCoefficients)}};function dg(i){return i<.04045?.0773993808*i:Math.pow(.9478672986*i+.0521327014,2.4)}function Xk(i){return i<.0031308?12.92*i:1.055*Math.pow(i,.41666)-.055}let ug;class nae{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===ug&&(ug=wb("canvas")),ug.width=t.width,ug.height=t.height;const n=ug.getContext("2d");t instanceof ImageData?n.putImageData(t,0,0):n.drawImage(t,0,0,t.width,t.height),e=ug}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=wb("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 og{constructor(e=i.DEFAULT_IMAGE,n=i.DEFAULT_MAPPING,r=Ii,s=Ii,o=lr,a=bl,l=Ro,c=Jc,d=i.DEFAULT_ANISOTROPY,h=wu){super(),this.isTexture=!0,Object.defineProperty(this,"id",{value:rae++}),this.uuid=Jo(),this.name="",this.source=new hg(e),this.mipmaps=[],this.mapping=n,this.channel=0,this.wrapS=r,this.wrapT=s,this.magFilter=o,this.minFilter=a,this.anisotropy=d,this.format=l,this.internalFormat=null,this.type=c,this.offset=new xe(0,0),this.repeat=new xe(1,1),this.center=new xe(0,0),this.rotation=0,this.matrixAutoUpdate=!0,this.matrix=new wn,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 Pa:e.x=e.x-Math.floor(e.x);break;case Ii:e.x=e.x<0?0:1;break;case gb: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 Pa:e.y=e.y-Math.floor(e.y);break;case Ii:e.y=e.y<0?0:1;break;case gb: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 gi{constructor(t=0,e=0,n=0,r=1){gi.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],d=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(d-p)<.01&&Math.abs(h-b)<.01&&Math.abs(g-v)<.01){if(Math.abs(d+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,F=(y+1)/2,D=(d+p)/4,k=(h+b)/4,B=(g+v)/4;return x>C&&x>F?x<.01?(n=0,r=.707106781,s=.707106781):(n=Math.sqrt(x),r=D/n,s=k/n):C>F?C<.01?(n=.707106781,r=0,s=.707106781):(r=Math.sqrt(C),n=D/r,s=B/r):F<.01?(n=.707106781,r=.707106781,s=0):(s=Math.sqrt(F),n=k/s,r=B/s),this.set(n,r,s,e),this}let M=Math.sqrt((v-g)*(v-g)+(h-b)*(h-b)+(p-d)*(p-d));return Math.abs(M)<.001&&(M=1),this.x=(v-g)/M,this.y=(h-b)/M,this.z=(p-d)/M,this.w=Math.acos((c+m+y-1)/2),this}setFromMatrixPosition(t){const e=t.elements;return this.x=e[12],this.y=e[13],this.z=e[14],this.w=e[15],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 sae extends og{constructor(t=1,e=1,n={}){super(),this.isRenderTarget=!0,this.width=t,this.height=e,this.depth=1,this.scissor=new gi(0,0,t,e),this.scissorTest=!1,this.viewport=new gi(0,0,t,e);const r={width:t,height:e,depth:1};n=Object.assign({generateMipmaps:!1,internalFormat:null,minFilter:lr,depthBuffer:!0,stencilBuffer:!1,resolveDepthBuffer:!0,resolveStencilBuffer:!0,depthTexture:null,samples:0,count:1},n);const s=new ko(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 F=Math.sqrt(x),D=Math.atan2(F,y*M);v=Math.sin(v*D)/F,a=Math.sin(a*D)/F}const C=a*M;if(l=l*v+p*C,c=c*v+m*C,d=d*v+g*C,h=h*v+b*C,v===1-a){const F=1/Math.sqrt(l*l+c*c+d*d+h*h);l*=F,c*=F,d*=F,h*=F}}t[e]=l,t[e+1]=c,t[e+2]=d,t[e+3]=h}static multiplyQuaternionsFlat(t,e,n,r,s,o){const a=n[r],l=n[r+1],c=n[r+2],d=n[r+3],h=s[o],p=s[o+1],m=s[o+2],g=s[o+3];return t[e]=a*g+d*h+l*m-c*p,t[e+1]=l*g+d*p+c*h-a*m,t[e+2]=c*g+d*m+a*p-l*h,t[e+3]=d*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),d=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*d*h+c*m*g,this._y=c*m*h-p*d*g,this._z=c*d*g+p*m*h,this._w=c*d*h-p*m*g;break;case"YXZ":this._x=p*d*h+c*m*g,this._y=c*m*h-p*d*g,this._z=c*d*g-p*m*h,this._w=c*d*h+p*m*g;break;case"ZXY":this._x=p*d*h-c*m*g,this._y=c*m*h+p*d*g,this._z=c*d*g+p*m*h,this._w=c*d*h-p*m*g;break;case"ZYX":this._x=p*d*h-c*m*g,this._y=c*m*h+p*d*g,this._z=c*d*g-p*m*h,this._w=c*d*h+p*m*g;break;case"YZX":this._x=p*d*h+c*m*g,this._y=c*m*h+p*d*g,this._z=c*d*g-p*m*h,this._w=c*d*h-p*m*g;break;case"XZY":this._x=p*d*h-c*m*g,this._y=c*m*h-p*d*g,this._z=c*d*g+p*m*h,this._w=c*d*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],d=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=(d-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=(d-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+d)/m}else{const m=2*Math.sqrt(1+h-n-a);this._w=(o-r)/m,this._x=(s+c)/m,this._y=(l+d)/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(er(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,d=e._w;return this._x=n*d+o*a+r*c-s*l,this._y=r*d+o*l+s*a-n*c,this._z=s*d+o*c+n*l-r*a,this._w=o*d-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),d=Math.atan2(c,a),h=Math.sin((1-e)*d)/c,p=Math.sin(e*d)/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 O{constructor(t=0,e=0,n=0){O.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(O4.setFromEuler(t))}applyAxisAngle(t,e){return this.applyQuaternion(O4.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),d=2*(a*e-s*r),h=2*(s*n-o*e);return this.x=e+l*c+o*h-a*d,this.y=n+l*d+a*c-s*h,this.z=r+l*h+s*d-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 Qk.copy(this).projectOnVector(t),this.sub(Qk)}reflect(t){return this.sub(Qk.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(er(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 Qk=new O,O4=new co;class Bs{constructor(t=new O(1/0,1/0,1/0),e=new O(-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;e=this.min.x&&t.x<=this.max.x&&t.y>=this.min.y&&t.y<=this.max.y&&t.z>=this.min.z&&t.z<=this.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.x>=this.min.x&&t.min.x<=this.max.x&&t.max.y>=this.min.y&&t.min.y<=this.max.y&&t.max.z>=this.min.z&&t.min.z<=this.max.z}intersectsSphere(t){return this.clampPoint(t.center,xl),xl.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(Cb),GC.subVectors(this.max,Cb),fg.subVectors(t.a,Cb),pg.subVectors(t.b,Cb),mg.subVectors(t.c,Cb),Cu.subVectors(pg,fg),Su.subVectors(mg,pg),ef.subVectors(fg,mg);let e=[0,-Cu.z,Cu.y,0,-Su.z,Su.y,0,-ef.z,ef.y,Cu.z,0,-Cu.x,Su.z,0,-Su.x,ef.z,0,-ef.x,-Cu.y,Cu.x,0,-Su.y,Su.x,0,-ef.y,ef.x,0];return!(!Jk(e,fg,pg,mg,GC)||(e=[1,0,0,0,1,0,0,0,1],!Jk(e,fg,pg,mg,GC)))&&($C.crossVectors(Cu,Su),e=[$C.x,$C.y,$C.z],Jk(e,fg,pg,mg,GC))}clampPoint(t,e){return e.copy(t).clamp(this.min,this.max)}distanceToPoint(t){return this.clampPoint(t,xl).distanceTo(t)}getBoundingSphere(t){return this.isEmpty()?t.makeEmpty():(this.getCenter(t.center),t.radius=.5*this.getSize(xl).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()||(td[0].set(this.min.x,this.min.y,this.min.z).applyMatrix4(t),td[1].set(this.min.x,this.min.y,this.max.z).applyMatrix4(t),td[2].set(this.min.x,this.max.y,this.min.z).applyMatrix4(t),td[3].set(this.min.x,this.max.y,this.max.z).applyMatrix4(t),td[4].set(this.max.x,this.min.y,this.min.z).applyMatrix4(t),td[5].set(this.max.x,this.min.y,this.max.z).applyMatrix4(t),td[6].set(this.max.x,this.max.y,this.min.z).applyMatrix4(t),td[7].set(this.max.x,this.max.y,this.max.z).applyMatrix4(t),this.setFromPoints(td)),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 td=[new O,new O,new O,new O,new O,new O,new O,new O],xl=new O,HC=new Bs,fg=new O,pg=new O,mg=new O,Cu=new O,Su=new O,ef=new O,Cb=new O,GC=new O,$C=new O,tf=new O;function Jk(i,t,e,n,r){for(let s=0,o=i.length-3;s<=o;s+=3){tf.fromArray(i,s);const a=r.x*Math.abs(tf.x)+r.y*Math.abs(tf.y)+r.z*Math.abs(tf.z),l=t.dot(tf),c=e.dot(tf),d=n.dot(tf);if(Math.max(-Math.max(l,c,d),Math.min(l,c,d))>a)return!1}return!0}const oae=new Bs,Sb=new O,eP=new O;class Us{constructor(t=new O,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):oae.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;Sb.subVectors(t,this.center);const e=Sb.lengthSq();if(e>this.radius*this.radius){const n=Math.sqrt(e),r=.5*(n-this.radius);this.center.addScaledVector(Sb,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):(eP.subVectors(t.center,this.center).setLength(t.radius),this.expandByPoint(Sb.copy(t.center).add(eP)),this.expandByPoint(Sb.copy(t.center).sub(eP))),this)}equals(t){return t.center.equals(this.center)&&t.radius===this.radius}clone(){return(new this.constructor).copy(this)}}const nd=new O,tP=new O,WC=new O,Eu=new O,nP=new O,jC=new O,iP=new O;class Eb{constructor(t=new O,e=new O(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,nd)),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=nd.subVectors(t,this.origin).dot(this.direction);return e<0?this.origin.distanceToSquared(t):(nd.copy(this.origin).addScaledVector(this.direction,e),nd.distanceToSquared(t))}distanceSqToSegment(t,e,n,r){tP.copy(t).add(e).multiplyScalar(.5),WC.copy(e).sub(t).normalize(),Eu.copy(this.origin).sub(tP);const s=.5*t.distanceTo(e),o=-this.direction.dot(WC),a=Eu.dot(this.direction),l=-Eu.dot(WC),c=Eu.lengthSq(),d=Math.abs(1-o*o);let h,p,m,g;if(d>0)if(h=o*l-a,p=o*a-l,g=s*d,h>=0)if(p>=-g)if(p<=g){const b=1/d;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(tP).addScaledVector(WC,p),m}intersectSphere(t,e){nd.subVectors(t.center,this.origin);const n=nd.dot(this.direction),r=nd.dot(nd)-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,d=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),d>=0?(s=(t.min.y-p.y)*d,o=(t.max.y-p.y)*d):(s=(t.max.y-p.y)*d,o=(t.min.y-p.y)*d),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,nd)}intersectTriangle(t,e,n,r,s){nP.subVectors(e,t),jC.subVectors(n,t),iP.crossVectors(nP,jC);let a,o=this.direction.dot(iP);if(o>0){if(r)return null;a=1}else{if(!(o<0))return null;a=-1,o=-o}Eu.subVectors(this.origin,t);const l=a*this.direction.dot(jC.crossVectors(Eu,jC));if(l<0)return null;const c=a*this.direction.dot(nP.cross(Eu));if(c<0||l+c>o)return null;const d=-a*Eu.dot(iP);return d<0?null:this.at(d/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 Nt{constructor(t,e,n,r,s,o,a,l,c,d,h,p,m,g,b,v){Nt.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,d,h,p,m,g,b,v)}set(t,e,n,r,s,o,a,l,c,d,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]=d,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 Nt).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/gg.setFromMatrixColumn(t,0).length(),s=1/gg.setFromMatrixColumn(t,1).length(),o=1/gg.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),d=Math.cos(s),h=Math.sin(s);if("XYZ"===t.order){const p=o*d,m=o*h,g=a*d,b=a*h;e[0]=l*d,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*d,m=l*h,g=c*d,b=c*h;e[0]=p+b*a,e[4]=g*a-m,e[8]=o*c,e[1]=o*h,e[5]=o*d,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*d,m=l*h,g=c*d,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*d,e[9]=b-p*a,e[2]=-o*c,e[6]=a,e[10]=o*l}else if("ZYX"===t.order){const p=o*d,m=o*h,g=a*d,b=a*h;e[0]=l*d,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*d,e[4]=b-p*h,e[8]=g*h+m,e[1]=h,e[5]=o*d,e[9]=-a*d,e[2]=-c*d,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*d,e[4]=-h,e[8]=c*d,e[1]=p*h+b,e[5]=o*d,e[9]=m*h-g,e[2]=g*h-m,e[6]=a*d,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(aae,t,lae)}lookAt(t,e,n){const r=this.elements;return ea.subVectors(t,e),0===ea.lengthSq()&&(ea.z=1),ea.normalize(),Au.crossVectors(n,ea),0===Au.lengthSq()&&(1===Math.abs(n.z)?ea.x+=1e-4:ea.z+=1e-4,ea.normalize(),Au.crossVectors(n,ea)),Au.normalize(),YC.crossVectors(ea,Au),r[0]=Au.x,r[4]=YC.x,r[8]=ea.x,r[1]=Au.y,r[5]=YC.y,r[9]=ea.y,r[2]=Au.z,r[6]=YC.z,r[10]=ea.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],d=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],F=n[15],D=r[0],k=r[4],B=r[8],T=r[12],A=r[1],$=r[5],ie=r[9],ne=r[13],se=r[2],ge=r[6],q=r[10],re=r[14],J=r[3],we=r[7],Ne=r[11],Ye=r[15];return s[0]=o*D+a*A+l*se+c*J,s[4]=o*k+a*$+l*ge+c*we,s[8]=o*B+a*ie+l*q+c*Ne,s[12]=o*T+a*ne+l*re+c*Ye,s[1]=d*D+h*A+p*se+m*J,s[5]=d*k+h*$+p*ge+m*we,s[9]=d*B+h*ie+p*q+m*Ne,s[13]=d*T+h*ne+p*re+m*Ye,s[2]=g*D+b*A+v*se+y*J,s[6]=g*k+b*$+v*ge+y*we,s[10]=g*B+b*ie+v*q+y*Ne,s[14]=g*T+b*ne+v*re+y*Ye,s[3]=M*D+x*A+C*se+F*J,s[7]=M*k+x*$+C*ge+F*we,s[11]=M*B+x*ie+C*q+F*Ne,s[15]=M*T+x*ne+C*re+F*Ye,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],d=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*d-s*l*d)+t[11]*(+e*c*h-e*a*m-s*o*h+n*o*m+s*a*d-n*c*d)+t[15]*(-r*a*d-e*l*h+e*a*p+r*o*h-n*o*p+n*l*d)}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],d=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-d*v*c-g*l*m+o*v*m+d*l*y-o*p*y,C=d*b*c-g*h*c+g*a*m-o*b*m-d*a*y+o*h*y,F=g*h*l-d*b*l-g*a*p+o*b*p+d*a*v-o*h*v,D=e*M+n*x+r*C+s*F;if(0===D)return this.set(0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0);const k=1/D;return t[0]=M*k,t[1]=(b*p*s-h*v*s-b*r*m+n*v*m+h*r*y-n*p*y)*k,t[2]=(a*v*s-b*l*s+b*r*c-n*v*c-a*r*y+n*l*y)*k,t[3]=(h*l*s-a*p*s-h*r*c+n*p*c+a*r*m-n*l*m)*k,t[4]=x*k,t[5]=(d*v*s-g*p*s+g*r*m-e*v*m-d*r*y+e*p*y)*k,t[6]=(g*l*s-o*v*s-g*r*c+e*v*c+o*r*y-e*l*y)*k,t[7]=(o*p*s-d*l*s+d*r*c-e*p*c-o*r*m+e*l*m)*k,t[8]=C*k,t[9]=(g*h*s-d*b*s-g*n*m+e*b*m+d*n*y-e*h*y)*k,t[10]=(o*b*s-g*a*s+g*n*c-e*b*c-o*n*y+e*a*y)*k,t[11]=(d*a*s-o*h*s-d*n*c+e*h*c+o*n*m-e*a*m)*k,t[12]=F*k,t[13]=(d*b*r-g*h*r+g*n*p-e*b*p-d*n*v+e*h*v)*k,t[14]=(g*a*r-o*b*r-g*n*l+e*b*l+o*n*v-e*a*v)*k,t[15]=(o*h*r-d*a*r+d*n*l-e*h*l-o*n*p+e*a*p)*k,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,d=s*a;return this.set(c*o+n,c*a-r*l,c*l+r*a,0,c*a+r*l,d*a+n,d*l-r*o,0,c*l-r*a,d*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,d=o+o,h=a+a,p=s*c,m=s*d,g=s*h,b=o*d,v=o*h,y=a*h,M=l*c,x=l*d,C=l*h,F=n.x,D=n.y,k=n.z;return r[0]=(1-(b+y))*F,r[1]=(m+C)*F,r[2]=(g-x)*F,r[3]=0,r[4]=(m-C)*D,r[5]=(1-(p+y))*D,r[6]=(v+M)*D,r[7]=0,r[8]=(g+x)*k,r[9]=(v-M)*k,r[10]=(1-(p+b))*k,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=gg.set(r[0],r[1],r[2]).length();const o=gg.set(r[4],r[5],r[6]).length(),a=gg.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],wl.copy(this);const c=1/s,d=1/o,h=1/a;return wl.elements[0]*=c,wl.elements[1]*=c,wl.elements[2]*=c,wl.elements[4]*=d,wl.elements[5]*=d,wl.elements[6]*=d,wl.elements[8]*=h,wl.elements[9]*=h,wl.elements[10]*=h,e.setFromRotationMatrix(wl),n.x=s,n.y=o,n.z=a,this}makePerspective(t,e,n,r,s,o,a=ed){const l=this.elements,c=2*s/(e-t),d=2*s/(n-r),h=(e+t)/(e-t),p=(n+r)/(n-r);let m,g;if(a===ed)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]=d,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=ed){const l=this.elements,c=1/(e-t),d=1/(n-r),h=1/(o-s),p=(e+t)*c,m=(n+r)*d;let g,b;if(a===ed)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*d,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 gg=new O,wl=new Nt,aae=new O(0,0,0),lae=new O(1,1,1),Au=new O,YC=new O,ea=new O,F4=new Nt,L4=new co;let id=(()=>{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],d=s[5],h=s[9],p=s[2],m=s[6],g=s[10];switch(n){case"XYZ":this._y=Math.asin(er(l,-1,1)),Math.abs(l)<.9999999?(this._x=Math.atan2(-h,g),this._z=Math.atan2(-a,o)):(this._x=Math.atan2(m,d),this._z=0);break;case"YXZ":this._x=Math.asin(-er(h,-1,1)),Math.abs(h)<.9999999?(this._y=Math.atan2(l,g),this._z=Math.atan2(c,d)):(this._y=Math.atan2(-p,o),this._z=0);break;case"ZXY":this._x=Math.asin(er(m,-1,1)),Math.abs(m)<.9999999?(this._y=Math.atan2(-p,g),this._z=Math.atan2(-a,d)):(this._y=0,this._z=Math.atan2(c,o));break;case"ZYX":this._y=Math.asin(-er(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,d));break;case"YZX":this._z=Math.asin(er(c,-1,1)),Math.abs(c)<.9999999?(this._x=Math.atan2(-h,d),this._y=Math.atan2(-p,o)):(this._x=0,this._y=Math.atan2(l,g));break;case"XZY":this._z=Math.asin(-er(a,-1,1)),Math.abs(a)<.9999999?(this._x=Math.atan2(m,d),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 F4.makeRotationFromQuaternion(e),this.setFromRotationMatrix(F4,n,r)}setFromVector3(e,n=this._order){return this.set(e.x,e.y,e.z,n)}reorder(e){return L4.setFromEuler(this),this.setFromQuaternion(L4,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 rP{constructor(){this.mask=1}set(t){this.mask=(1<>>0}enable(t){this.mask|=1<{class i extends og{constructor(){super(),this.isObject3D=!0,Object.defineProperty(this,"id",{value:cae++}),this.uuid=Jo(),this.name="",this.type="Object3D",this.parent=null,this.children=[],this.up=i.DEFAULT_UP.clone();const e=new O,n=new id,r=new co,s=new O(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 Nt},normalMatrix:{value:new wn}}),this.matrix=new Nt,this.matrixWorld=new Nt,this.matrixAutoUpdate=i.DEFAULT_MATRIX_AUTO_UPDATE,this.matrixWorldAutoUpdate=i.DEFAULT_MATRIX_WORLD_AUTO_UPDATE,this.matrixWorldNeedsUpdate=!1,this.layers=new rP,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 _g.setFromAxisAngle(e,n),this.quaternion.multiply(_g),this}rotateOnWorldAxis(e,n){return _g.setFromAxisAngle(e,n),this.quaternion.premultiply(_g),this}rotateX(e){return this.rotateOnAxis(B4,e)}rotateY(e){return this.rotateOnAxis(U4,e)}rotateZ(e){return this.rotateOnAxis(V4,e)}translateOnAxis(e,n){return N4.copy(e).applyQuaternion(this.quaternion),this.position.add(N4.multiplyScalar(n)),this}translateX(e){return this.translateOnAxis(B4,e)}translateY(e){return this.translateOnAxis(U4,e)}translateZ(e){return this.translateOnAxis(V4,e)}localToWorld(e){return this.updateWorldMatrix(!0,!1),e.applyMatrix4(this.matrixWorld)}worldToLocal(e){return this.updateWorldMatrix(!0,!1),e.applyMatrix4(rd.copy(this.matrixWorld).invert())}lookAt(e,n,r){e.isVector3?qC.copy(e):qC.set(e,n,r);const s=this.parent;this.updateWorldMatrix(!0,!1),Ab.setFromMatrixPosition(this.matrixWorld),this.isCamera||this.isLight?rd.lookAt(Ab,qC,this.up):rd.lookAt(qC,Ab,this.up),this.quaternion.setFromRotationMatrix(rd),s&&(rd.extractRotation(s.matrixWorld),_g.setFromRotationMatrix(rd),this.quaternion.premultiply(_g.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.maxInstanceCount=this._maxInstanceCount,s.maxVertexCount=this._maxVertexCount,s.maxIndexCount=this._maxIndexCount,s.geometryInitialized=this._geometryInitialized,s.geometryCount=this._geometryCount,s.matricesTexture=this._matricesTexture.toJSON(e),null!==this._colorsTexture&&(s.colorsTexture=this._colorsTexture.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 d=0,h=c.length;d0){s.children=[];for(let l=0;l0){s.animations=[];for(let l=0;l0&&(r.geometries=l),c.length>0&&(r.materials=c),d.length>0&&(r.textures=d),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 d in l){const h=l[d];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){Ml.subVectors(r,e),sd.subVectors(n,e),oP.subVectors(t,e);const o=Ml.dot(Ml),a=Ml.dot(sd),l=Ml.dot(oP),c=sd.dot(sd),d=sd.dot(oP),h=o*c-a*a;if(0===h)return s.set(0,0,0),null;const p=1/h,m=(c*l-a*d)*p,g=(o*d-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,od)&&od.x>=0&&od.y>=0&&od.x+od.y<=1}static getInterpolation(t,e,n,r,s,o,a,l){return null===this.getBarycoord(t,e,n,r,od)?(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,od.x),l.addScaledVector(o,od.y),l.addScaledVector(a,od.z),l)}static isFrontFacing(t,e,n,r){return Ml.subVectors(n,e),sd.subVectors(t,e),Ml.cross(sd).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 Ml.subVectors(this.c,this.b),sd.subVectors(this.a,this.b),.5*Ml.cross(sd).length()}getMidpoint(t){return t.addVectors(this.a,this.b).add(this.c).multiplyScalar(1/3)}getNormal(t){return Oa.getNormal(this.a,this.b,this.c,t)}getPlane(t){return t.setFromCoplanarPoints(this.a,this.b,this.c)}getBarycoord(t,e){return Oa.getBarycoord(t,this.a,this.b,this.c,e)}getInterpolation(t,e,n,r,s){return Oa.getInterpolation(t,this.a,this.b,this.c,e,n,r,s)}containsPoint(t){return Oa.containsPoint(t,this.a,this.b,this.c)}isFrontFacing(t){return Oa.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;yg.subVectors(r,n),bg.subVectors(s,n),aP.subVectors(t,n);const l=yg.dot(aP),c=bg.dot(aP);if(l<=0&&c<=0)return e.copy(n);lP.subVectors(t,r);const d=yg.dot(lP),h=bg.dot(lP);if(d>=0&&h<=d)return e.copy(r);const p=l*h-d*c;if(p<=0&&l>=0&&d<=0)return o=l/(l-d),e.copy(n).addScaledVector(yg,o);cP.subVectors(t,s);const m=yg.dot(cP),g=bg.dot(cP);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(bg,a);const v=d*g-m*h;if(v<=0&&h-d>=0&&m-g>=0)return H4.subVectors(s,r),a=(h-d)/(h-d+(m-g)),e.copy(r).addScaledVector(H4,a);const y=1/(v+b+p);return o=b*y,a=p*y,e.copy(n).addScaledVector(yg,o).addScaledVector(bg,a)}equals(t){return t.a.equals(this.a)&&t.b.equals(this.b)&&t.c.equals(this.c)}}const G4={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},Du={h:0,s:0,l:0},XC={h:0,s:0,l:0};function dP(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 qe{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=cs){return t=Math.floor(t),this.r=(t>>16&255)/255,this.g=(t>>8&255)/255,this.b=(255&t)/255,Jn.toWorkingColorSpace(this,e),this}setRGB(t,e,n,r=Jn.workingColorSpace){return this.r=t,this.g=e,this.b=n,Jn.toWorkingColorSpace(this,r),this}setHSL(t,e,n,r=Jn.workingColorSpace){if(t=Yk(t,1),e=er(e,0,1),n=er(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=dP(o,s,t+1/3),this.g=dP(o,s,t),this.b=dP(o,s,t-1/3)}return Jn.toWorkingColorSpace(this,r),this}setStyle(t,e=cs){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=cs){const n=G4[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=dg(t.r),this.g=dg(t.g),this.b=dg(t.b),this}copyLinearToSRGB(t){return this.r=Xk(t.r),this.g=Xk(t.g),this.b=Xk(t.b),this}convertSRGBToLinear(){return this.copySRGBToLinear(this),this}convertLinearToSRGB(){return this.copyLinearToSRGB(this),this}getHex(t=cs){return Jn.fromWorkingColorSpace(Vs.copy(this),t),65536*Math.round(er(255*Vs.r,0,255))+256*Math.round(er(255*Vs.g,0,255))+Math.round(er(255*Vs.b,0,255))}getHexString(t=cs){return("000000"+this.getHex(t).toString(16)).slice(-6)}getHSL(t,e=Jn.workingColorSpace){Jn.fromWorkingColorSpace(Vs.copy(this),e);const n=Vs.r,r=Vs.g,s=Vs.b,o=Math.max(n,r,s),a=Math.min(n,r,s);let l,c;const d=(a+o)/2;if(a===o)l=0,c=0;else{const h=o-a;switch(c=d<=.5?h/(o+a):h/(2-o-a),o){case n:l=(r-s)/h+(r0!=t>0&&this.version++,this._alphaTest=t}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.dispersion&&(n.dispersion=this.dispersion),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!==Zm&&(n.blending=this.blending),this.side!==ac&&(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!==ak&&(n.blendSrc=this.blendSrc),this.blendDst!==lk&&(n.blendDst=this.blendDst),this.blendEquation!==Kh&&(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!==SC&&(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!==sg&&(n.stencilFail=this.stencilFail),this.stencilZFail!==sg&&(n.stencilZFail=this.stencilZFail),this.stencilZPass!==sg&&(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++}onBuild(){console.warn("Material: onBuild() has been removed.")}onBeforeRender(){console.warn("Material: onBeforeRender() has been removed.")}}class qi extends Po{constructor(t){super(),this.isMeshBasicMaterial=!0,this.type="MeshBasicMaterial",this.color=new qe(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 id,this.combine=EC,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 vr=new O,KC=new xe;class Hi{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=Qo,this.version=0}onUploadCallback(){}set needsUpdate(t){!0===t&&this.version++}get updateRange(){return cg("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],d=[];for(let h=0,p=c.length;h0&&(r[l]=d,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 d=[],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))&&(j4.copy(s).invert(),nf.copy(t.ray).applyMatrix4(j4),(null===n.boundingBox||!1!==nf.intersectsBox(n.boundingBox))&&this._computeIntersections(t,e,nf)))}_computeIntersections(t,e,n){let r;const s=this.geometry,o=this.material,a=s.index,l=s.attributes.position,c=s.attributes.uv,d=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:iS.clone(),object:i}}(i,t,e,n,wg,Mg,Cg,nS);if(d){r&&(JC.fromBufferAttribute(r,a),eS.fromBufferAttribute(r,l),tS.fromBufferAttribute(r,c),d.uv=Oa.getInterpolation(nS,wg,Mg,Cg,JC,eS,tS,new xe)),s&&(JC.fromBufferAttribute(s,a),eS.fromBufferAttribute(s,l),tS.fromBufferAttribute(s,c),d.uv1=Oa.getInterpolation(nS,wg,Mg,Cg,JC,eS,tS,new xe)),o&&(q4.fromBufferAttribute(o,a),X4.fromBufferAttribute(o,l),K4.fromBufferAttribute(o,c),d.normal=Oa.getInterpolation(nS,wg,Mg,Cg,q4,X4,K4,new O),d.normal.dot(n.direction)>0&&d.normal.multiplyScalar(-1));const h={a,b:l,c,normal:new O,materialIndex:0};Oa.getNormal(wg,Mg,Cg,h.normal),d.face=h}return d}class rf 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=[],d=[],h=[];let p=0,m=0;function g(b,v,y,M,x,C,F,D,k,B,T){const A=C/k,$=F/B,ie=C/2,ne=F/2,se=D/2,ge=k+1,q=B+1;let re=0,J=0;const we=new O;for(let Ne=0;Ne0?1:-1,d.push(we.x,we.y,we.z),h.push(It/k),h.push(1-Ne/B),re+=1}for(let Ne=0;Ne0&&(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 fP extends Or{constructor(){super(),this.isCamera=!0,this.type="Camera",this.matrixWorldInverse=new Nt,this.projectionMatrix=new Nt,this.projectionMatrixInverse=new Nt,this.coordinateSystem=ed}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 Tu=new O,J4=new xe,e5=new xe;class yr extends fP{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*ag*Math.atan(e),this.updateProjectionMatrix()}getFocalLength(){const t=Math.tan(.5*Jh*this.fov);return.5*this.getFilmHeight()/t}getEffectiveFOV(){return 2*ag*Math.atan(Math.tan(.5*Jh*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){Tu.set(-1,-1,.5).applyMatrix4(this.projectionMatrixInverse),e.set(Tu.x,Tu.y).multiplyScalar(-t/Tu.z),Tu.set(1,1,.5).applyMatrix4(this.projectionMatrixInverse),n.set(Tu.x,Tu.y).multiplyScalar(-t/Tu.z)}getViewSize(t,e){return this.getViewBounds(t,J4,e5),e.subVectors(e5,J4)}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*Jh*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 bae extends Or{constructor(t,e,n){super(),this.type="CubeCamera",this.renderTarget=n,this.coordinateSystem=null,this.activeMipmapLevel=0;const r=new yr(-90,1,t,e);r.layers=this.layers,this.add(r);const s=new yr(-90,1,t,e);s.layers=this.layers,this.add(s);const o=new yr(-90,1,t,e);o.layers=this.layers,this.add(o);const a=new yr(-90,1,t,e);a.layers=this.layers,this.add(a);const l=new yr(-90,1,t,e);l.layers=this.layers,this.add(l);const c=new yr(-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===ed)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,d]=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,d),t.setRenderTarget(h,p,m),t.xr.enabled=g,n.texture.needsPMREMUpdate=!0}}class sS extends ko{constructor(t,e,n,r,s,o,a,l,c,d){super(t=void 0!==t?t:[],e=void 0!==e?e:lc,n,r,s,o,a,l,c,d),this.isCubeTexture=!0,this.flipY=!1}get images(){return this.image}set images(t){this.image=t}}class xae extends Mu{constructor(t=1,e={}){super(t,t,e),this.isWebGLCubeRenderTarget=!0;const n={width:t,height:t,depth:1};this.texture=new sS([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:lr}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 rf(5,5,5),s=new Cl({name:"CubemapFromEquirect",uniforms:Sg(n_uniforms),vertexShader:n_vertexShader,fragmentShader:n_fragmentShader,side:Io,blending:Qc});s.uniforms.tEquirect.value=e;const o=new Mn(r,s),a=e.minFilter;return e.minFilter===bl&&(e.minFilter=lr),new bae(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 pP=new O,wae=new O,Mae=new wn;class sf{constructor(t=new O(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=pP.subVectors(n,e).cross(wae.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(pP),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||Mae.getNormalMatrix(t),r=this.coplanarPoint(pP).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 af=new Us,oS=new O;class aS{constructor(t=new sf,e=new sf,n=new sf,r=new sf,s=new sf,o=new sf){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=ed){const n=this.planes,r=t.elements,s=r[0],o=r[1],a=r[2],l=r[3],c=r[4],d=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+d,v+g,C+M).normalize(),n[3].setComponents(l-o,p-d,v-g,C-M).normalize(),n[4].setComponents(l-a,p-h,v-b,C-x).normalize(),e===ed)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(),af.copy(t.boundingSphere).applyMatrix4(t.matrixWorld);else{const e=t.geometry;null===e.boundingSphere&&e.computeBoundingSphere(),af.copy(e.boundingSphere).applyMatrix4(t.matrixWorld)}return this.intersectsSphere(af)}intersectsSprite(t){return af.center.set(0,0,0),af.radius=.7071067811865476,af.applyMatrix4(t.matrixWorld),this.intersectsSphere(af)}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,oS.y=r.normal.y>0?t.max.y:t.min.y,oS.z=r.normal.z>0?t.max.z:t.min.z,r.distanceToPoint(oS)<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 t5(){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 Cae(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.isInterleavedBufferAttribute&&(a=a.data),a.isGLBufferAttribute){const d=t.get(a);return void((!d||d.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 ) || defined( USE_BATCHING_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 ) || defined( USE_BATCHING_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\n#ifdef USE_BATCHING_COLOR\n\tvec3 batchingColor = getBatchingColor( getIndirectIndex( gl_DrawID ) );\n\tvColor.xyz *= batchingColor.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}\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}",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_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\tfloat distanceFalloff = 1.0 / max( pow( lightDistance, decayExponent ), 0.01 );\n\tif ( cutoffDistance > 0.0 ) {\n\t\tdistanceFalloff *= pow2( saturate( 1.0 - pow4( lightDistance / cutoffDistance ) ) );\n\t}\n\treturn distanceFalloff;\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_DISPERSION\n\tmaterial.dispersion = dispersion;\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\tfloat dispersion;\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.shadowIntensity, 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.shadowIntensity, 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.shadowIntensity, 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 )\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\tfor ( int i = 0; i < MORPHTARGETS_COUNT; i ++ ) {\n\t\tif ( morphTargetInfluences[ i ] != 0.0 ) objectNormal += getMorph( gl_VertexID, i, 1 ).xyz * morphTargetInfluences[ i ];\n\t}\n#endif",morphtarget_pars_vertex:"#ifdef USE_MORPHTARGETS\n\t#ifndef USE_INSTANCING_MORPH\n\t\tuniform float morphTargetBaseInfluence;\n\t\tuniform float morphTargetInfluences[ MORPHTARGETS_COUNT ];\n\t#endif\n\tuniform sampler2DArray morphTargetsTexture;\n\tuniform ivec2 morphTargetsTextureSize;\n\tvec4 getMorph( const in int vertexIndex, const in int morphTargetIndex, const in int offset ) {\n\t\tint texelIndex = vertexIndex * MORPHTARGETS_TEXTURE_STRIDE + offset;\n\t\tint y = texelIndex / morphTargetsTextureSize.x;\n\t\tint x = texelIndex - y * morphTargetsTextureSize.x;\n\t\tivec3 morphUV = ivec3( x, y, morphTargetIndex );\n\t\treturn texelFetch( morphTargetsTexture, morphUV, 0 );\n\t}\n#endif",morphtarget_vertex:"#ifdef USE_MORPHTARGETS\n\ttransformed *= morphTargetBaseInfluence;\n\tfor ( int i = 0; i < MORPHTARGETS_COUNT; i ++ ) {\n\t\tif ( morphTargetInfluences[ i ] != 0.0 ) transformed += getMorph( gl_VertexID, i, 0 ).xyz * morphTargetInfluences[ i ];\n\t}\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.;const float ShiftRight8 = 1. / 256.;\nconst float Inv255 = 1. / 255.;\nconst vec4 PackFactors = vec4( 1.0, 256.0, 256.0 * 256.0, 256.0 * 256.0 * 256.0 );\nconst vec2 UnpackFactors2 = vec2( UnpackDownscale, 1.0 / PackFactors.g );\nconst vec3 UnpackFactors3 = vec3( UnpackDownscale / PackFactors.rg, 1.0 / PackFactors.b );\nconst vec4 UnpackFactors4 = vec4( UnpackDownscale / PackFactors.rgb, 1.0 / PackFactors.a );\nvec4 packDepthToRGBA( const in float v ) {\n\tif( v <= 0.0 )\n\t\treturn vec4( 0., 0., 0., 0. );\n\tif( v >= 1.0 )\n\t\treturn vec4( 1., 1., 1., 1. );\n\tfloat vuf;\n\tfloat af = modf( v * PackFactors.a, vuf );\n\tfloat bf = modf( vuf * ShiftRight8, vuf );\n\tfloat gf = modf( vuf * ShiftRight8, vuf );\n\treturn vec4( vuf * Inv255, gf * PackUpscale, bf * PackUpscale, af );\n}\nvec3 packDepthToRGB( const in float v ) {\n\tif( v <= 0.0 )\n\t\treturn vec3( 0., 0., 0. );\n\tif( v >= 1.0 )\n\t\treturn vec3( 1., 1., 1. );\n\tfloat vuf;\n\tfloat bf = modf( v * PackFactors.b, vuf );\n\tfloat gf = modf( vuf * ShiftRight8, vuf );\n\treturn vec3( vuf * Inv255, gf * PackUpscale, bf );\n}\nvec2 packDepthToRG( const in float v ) {\n\tif( v <= 0.0 )\n\t\treturn vec2( 0., 0. );\n\tif( v >= 1.0 )\n\t\treturn vec2( 1., 1. );\n\tfloat vuf;\n\tfloat gf = modf( v * 256., vuf );\n\treturn vec2( vuf * Inv255, gf );\n}\nfloat unpackRGBAToDepth( const in vec4 v ) {\n\treturn dot( v, UnpackFactors4 );\n}\nfloat unpackRGBToDepth( const in vec3 v ) {\n\treturn dot( v, UnpackFactors3 );\n}\nfloat unpackRGToDepth( const in vec2 v ) {\n\treturn v.r * UnpackFactors2.r + v.g * UnpackFactors2.g;\n}\nvec4 pack2HalfToRGBA( const in 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( const in 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 shadowIntensity;\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 shadowIntensity;\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 shadowIntensity;\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 shadowIntensity, 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 mix( 1.0, shadow, shadowIntensity );\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 shadowIntensity, 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 mix( 1.0, shadow, shadowIntensity );\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 shadowIntensity;\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 shadowIntensity;\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 shadowIntensity;\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.shadowIntensity, 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.shadowIntensity, 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.shadowIntensity, 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\tconst float StartCompression = 0.8 - 0.04;\n\tconst float 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, vec3( newPeak ), 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.dispersion, 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 dispersion, const in float ior, const in float thickness,\n\t\tconst in vec3 attenuationColor, const in float attenuationDistance ) {\n\t\tvec4 transmittedLight;\n\t\tvec3 transmittance;\n\t\t#ifdef USE_DISPERSION\n\t\t\tfloat halfSpread = ( ior - 1.0 ) * 0.025 * dispersion;\n\t\t\tvec3 iors = vec3( ior - halfSpread, ior, ior + halfSpread );\n\t\t\tfor ( int i = 0; i < 3; i ++ ) {\n\t\t\t\tvec3 transmissionRay = getVolumeTransmissionRay( n, v, thickness, iors[ i ], modelMatrix );\n\t\t\t\tvec3 refractedRayExit = position + transmissionRay;\n\t\t\n\t\t\t\tvec4 ndcPos = projMatrix * viewMatrix * vec4( refractedRayExit, 1.0 );\n\t\t\t\tvec2 refractionCoords = ndcPos.xy / ndcPos.w;\n\t\t\t\trefractionCoords += 1.0;\n\t\t\t\trefractionCoords /= 2.0;\n\t\t\n\t\t\t\tvec4 transmissionSample = getTransmissionSample( refractionCoords, roughness, iors[ i ] );\n\t\t\t\ttransmittedLight[ i ] = transmissionSample[ i ];\n\t\t\t\ttransmittedLight.a += transmissionSample.a;\n\t\t\t\ttransmittance[ i ] = diffuseColor[ i ] * volumeAttenuation( length( transmissionRay ), attenuationColor, attenuationDistance )[ i ];\n\t\t\t}\n\t\t\ttransmittedLight.a /= 3.0;\n\t\t\n\t\t#else\n\t\t\n\t\t\tvec3 transmissionRay = getVolumeTransmissionRay( n, v, thickness, ior, modelMatrix );\n\t\t\tvec3 refractedRayExit = position + transmissionRay;\n\t\t\tvec4 ndcPos = projMatrix * viewMatrix * vec4( refractedRayExit, 1.0 );\n\t\t\tvec2 refractionCoords = ndcPos.xy / ndcPos.w;\n\t\t\trefractionCoords += 1.0;\n\t\t\trefractionCoords /= 2.0;\n\t\t\ttransmittedLight = getTransmissionSample( refractionCoords, roughness, ior );\n\t\t\ttransmittance = diffuseColor * volumeAttenuation( length( transmissionRay ), attenuationColor, attenuationDistance );\n\t\t\n\t\t#endif\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#elif DEPTH_PACKING == 3202\n\t\tgl_FragColor = vec4( packDepthToRGB( fragCoordZ ), 1.0 );\n\t#elif DEPTH_PACKING == 3203\n\t\tgl_FragColor = vec4( packDepthToRG( fragCoordZ ), 0.0, 1.0 );\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_DISPERSION\n\tuniform float dispersion;\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}"},Qe={common:{diffuse:{value:new qe(16777215)},opacity:{value:1},map:{value:null},mapTransform:{value:new wn},alphaMap:{value:null},alphaMapTransform:{value:new wn},alphaTest:{value:0}},specularmap:{specularMap:{value:null},specularMapTransform:{value:new wn}},envmap:{envMap:{value:null},envMapRotation:{value:new wn},flipEnvMap:{value:-1},reflectivity:{value:1},ior:{value:1.5},refractionRatio:{value:.98}},aomap:{aoMap:{value:null},aoMapIntensity:{value:1},aoMapTransform:{value:new wn}},lightmap:{lightMap:{value:null},lightMapIntensity:{value:1},lightMapTransform:{value:new wn}},bumpmap:{bumpMap:{value:null},bumpMapTransform:{value:new wn},bumpScale:{value:1}},normalmap:{normalMap:{value:null},normalMapTransform:{value:new wn},normalScale:{value:new xe(1,1)}},displacementmap:{displacementMap:{value:null},displacementMapTransform:{value:new wn},displacementScale:{value:1},displacementBias:{value:0}},emissivemap:{emissiveMap:{value:null},emissiveMapTransform:{value:new wn}},metalnessmap:{metalnessMap:{value:null},metalnessMapTransform:{value:new wn}},roughnessmap:{roughnessMap:{value:null},roughnessMapTransform:{value:new wn}},gradientmap:{gradientMap:{value:null}},fog:{fogDensity:{value:25e-5},fogNear:{value:1},fogFar:{value:2e3},fogColor:{value:new qe(16777215)}},lights:{ambientLightColor:{value:[]},lightProbe:{value:[]},directionalLights:{value:[],properties:{direction:{},color:{}}},directionalLightShadows:{value:[],properties:{shadowIntensity:1,shadowBias:{},shadowNormalBias:{},shadowRadius:{},shadowMapSize:{}}},directionalShadowMap:{value:[]},directionalShadowMatrix:{value:[]},spotLights:{value:[],properties:{color:{},position:{},direction:{},distance:{},coneCos:{},penumbraCos:{},decay:{}}},spotLightShadows:{value:[],properties:{shadowIntensity:1,shadowBias:{},shadowNormalBias:{},shadowRadius:{},shadowMapSize:{}}},spotLightMap:{value:[]},spotShadowMap:{value:[]},spotLightMatrix:{value:[]},pointLights:{value:[],properties:{color:{},position:{},decay:{},distance:{}}},pointLightShadows:{value:[],properties:{shadowIntensity:1,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 qe(16777215)},opacity:{value:1},size:{value:1},scale:{value:1},map:{value:null},alphaMap:{value:null},alphaMapTransform:{value:new wn},alphaTest:{value:0},uvTransform:{value:new wn}},sprite:{diffuse:{value:new qe(16777215)},opacity:{value:1},center:{value:new xe(.5,.5)},rotation:{value:0},map:{value:null},mapTransform:{value:new wn},alphaMap:{value:null},alphaMapTransform:{value:new wn},alphaTest:{value:0}}},cc={basic:{uniforms:uo([Qe.common,Qe.specularmap,Qe.envmap,Qe.aomap,Qe.lightmap,Qe.fog]),vertexShader:Cn.meshbasic_vert,fragmentShader:Cn.meshbasic_frag},lambert:{uniforms:uo([Qe.common,Qe.specularmap,Qe.envmap,Qe.aomap,Qe.lightmap,Qe.emissivemap,Qe.bumpmap,Qe.normalmap,Qe.displacementmap,Qe.fog,Qe.lights,{emissive:{value:new qe(0)}}]),vertexShader:Cn.meshlambert_vert,fragmentShader:Cn.meshlambert_frag},phong:{uniforms:uo([Qe.common,Qe.specularmap,Qe.envmap,Qe.aomap,Qe.lightmap,Qe.emissivemap,Qe.bumpmap,Qe.normalmap,Qe.displacementmap,Qe.fog,Qe.lights,{emissive:{value:new qe(0)},specular:{value:new qe(1118481)},shininess:{value:30}}]),vertexShader:Cn.meshphong_vert,fragmentShader:Cn.meshphong_frag},standard:{uniforms:uo([Qe.common,Qe.envmap,Qe.aomap,Qe.lightmap,Qe.emissivemap,Qe.bumpmap,Qe.normalmap,Qe.displacementmap,Qe.roughnessmap,Qe.metalnessmap,Qe.fog,Qe.lights,{emissive:{value:new qe(0)},roughness:{value:1},metalness:{value:0},envMapIntensity:{value:1}}]),vertexShader:Cn.meshphysical_vert,fragmentShader:Cn.meshphysical_frag},toon:{uniforms:uo([Qe.common,Qe.aomap,Qe.lightmap,Qe.emissivemap,Qe.bumpmap,Qe.normalmap,Qe.displacementmap,Qe.gradientmap,Qe.fog,Qe.lights,{emissive:{value:new qe(0)}}]),vertexShader:Cn.meshtoon_vert,fragmentShader:Cn.meshtoon_frag},matcap:{uniforms:uo([Qe.common,Qe.bumpmap,Qe.normalmap,Qe.displacementmap,Qe.fog,{matcap:{value:null}}]),vertexShader:Cn.meshmatcap_vert,fragmentShader:Cn.meshmatcap_frag},points:{uniforms:uo([Qe.points,Qe.fog]),vertexShader:Cn.points_vert,fragmentShader:Cn.points_frag},dashed:{uniforms:uo([Qe.common,Qe.fog,{scale:{value:1},dashSize:{value:1},totalSize:{value:2}}]),vertexShader:Cn.linedashed_vert,fragmentShader:Cn.linedashed_frag},depth:{uniforms:uo([Qe.common,Qe.displacementmap]),vertexShader:Cn.depth_vert,fragmentShader:Cn.depth_frag},normal:{uniforms:uo([Qe.common,Qe.bumpmap,Qe.normalmap,Qe.displacementmap,{opacity:{value:1}}]),vertexShader:Cn.meshnormal_vert,fragmentShader:Cn.meshnormal_frag},sprite:{uniforms:uo([Qe.sprite,Qe.fog]),vertexShader:Cn.sprite_vert,fragmentShader:Cn.sprite_frag},background:{uniforms:{uvTransform:{value:new wn},t2D:{value:null},backgroundIntensity:{value:1}},vertexShader:Cn.background_vert,fragmentShader:Cn.background_frag},backgroundCube:{uniforms:{envMap:{value:null},flipEnvMap:{value:-1},backgroundBlurriness:{value:0},backgroundIntensity:{value:1},backgroundRotation:{value:new wn}},vertexShader:Cn.backgroundCube_vert,fragmentShader:Cn.backgroundCube_frag},cube:{uniforms:{tCube:{value:null},tFlip:{value:-1},opacity:{value:1}},vertexShader:Cn.cube_vert,fragmentShader:Cn.cube_frag},equirect:{uniforms:{tEquirect:{value:null}},vertexShader:Cn.equirect_vert,fragmentShader:Cn.equirect_frag},distanceRGBA:{uniforms:uo([Qe.common,Qe.displacementmap,{referencePosition:{value:new O},nearDistance:{value:1},farDistance:{value:1e3}}]),vertexShader:Cn.distanceRGBA_vert,fragmentShader:Cn.distanceRGBA_frag},shadow:{uniforms:uo([Qe.lights,Qe.fog,{color:{value:new qe(0)},opacity:{value:1}}]),vertexShader:Cn.shadow_vert,fragmentShader:Cn.shadow_frag}};cc.physical={uniforms:uo([cc.standard.uniforms,{clearcoat:{value:0},clearcoatMap:{value:null},clearcoatMapTransform:{value:new wn},clearcoatNormalMap:{value:null},clearcoatNormalMapTransform:{value:new wn},clearcoatNormalScale:{value:new xe(1,1)},clearcoatRoughness:{value:0},clearcoatRoughnessMap:{value:null},clearcoatRoughnessMapTransform:{value:new wn},dispersion:{value:0},iridescence:{value:0},iridescenceMap:{value:null},iridescenceMapTransform:{value:new wn},iridescenceIOR:{value:1.3},iridescenceThicknessMinimum:{value:100},iridescenceThicknessMaximum:{value:400},iridescenceThicknessMap:{value:null},iridescenceThicknessMapTransform:{value:new wn},sheen:{value:0},sheenColor:{value:new qe(0)},sheenColorMap:{value:null},sheenColorMapTransform:{value:new wn},sheenRoughness:{value:1},sheenRoughnessMap:{value:null},sheenRoughnessMapTransform:{value:new wn},transmission:{value:0},transmissionMap:{value:null},transmissionMapTransform:{value:new wn},transmissionSamplerSize:{value:new xe},transmissionSamplerMap:{value:null},thickness:{value:0},thicknessMap:{value:null},thicknessMapTransform:{value:new wn},attenuationDistance:{value:0},attenuationColor:{value:new qe(0)},specularColor:{value:new qe(1,1,1)},specularColorMap:{value:null},specularColorMapTransform:{value:new wn},specularIntensity:{value:1},specularIntensityMap:{value:null},specularIntensityMapTransform:{value:new wn},anisotropyVector:{value:new xe},anisotropyMap:{value:null},anisotropyMapTransform:{value:new wn}}]),vertexShader:Cn.meshphysical_vert,fragmentShader:Cn.meshphysical_frag};const lS={r:0,b:0,g:0},lf=new id,Cce=new Nt;function Sce(i,t,e,n,r,s,o){const a=new qe(0);let c,d,l=!0===s?0:1,h=null,p=0,m=null;function g(M){let x=!0===M.isScene?M.background:null;return x&&x.isTexture&&(x=(M.backgroundBlurriness>0?e:t).get(x)),x}function y(M,x){M.getRGB(lS,Z4(i)),n.buffers.color.setClear(lS.r,lS.g,lS.b,x,o)}return{getClearColor:function(){return a},setClearColor:function(M,x=1){a.set(M),l=x,y(a,l)},getClearAlpha:function(){return l},setClearAlpha:function(M){l=M,y(a,l)},render:function b(M){let x=!1;const C=g(M);null===C?y(a,l):C&&C.isColor&&(y(C,1),x=!0);const F=i.xr.getEnvironmentBlendMode();"additive"===F?n.buffers.color.setClear(0,0,0,1,o):"alpha-blend"===F&&n.buffers.color.setClear(0,0,0,0,o),(i.autoClear||x)&&(n.buffers.depth.setTest(!0),n.buffers.depth.setMask(!0),n.buffers.color.setMask(!0),i.clear(i.autoClearColor,i.autoClearDepth,i.autoClearStencil))},addToRenderList:function v(M,x){const C=g(x);C&&(C.isCubeTexture||C.mapping===mb)?(void 0===d&&(d=new Mn(new rf(1,1,1),new Cl({name:"BackgroundCubeMaterial",uniforms:Sg(cc.backgroundCube.uniforms),vertexShader:cc.backgroundCube.vertexShader,fragmentShader:cc.backgroundCube.fragmentShader,side:Io,depthTest:!1,depthWrite:!1,fog:!1})),d.geometry.deleteAttribute("normal"),d.geometry.deleteAttribute("uv"),d.onBeforeRender=function(F,D,k){this.matrixWorld.copyPosition(k.matrixWorld)},Object.defineProperty(d.material,"envMap",{get:function(){return this.uniforms.envMap.value}}),r.update(d)),lf.copy(x.backgroundRotation),lf.x*=-1,lf.y*=-1,lf.z*=-1,C.isCubeTexture&&!1===C.isRenderTargetTexture&&(lf.y*=-1,lf.z*=-1),d.material.uniforms.envMap.value=C,d.material.uniforms.flipEnvMap.value=C.isCubeTexture&&!1===C.isRenderTargetTexture?-1:1,d.material.uniforms.backgroundBlurriness.value=x.backgroundBlurriness,d.material.uniforms.backgroundIntensity.value=x.backgroundIntensity,d.material.uniforms.backgroundRotation.value.setFromMatrix4(Cce.makeRotationFromEuler(lf)),d.material.toneMapped=Jn.getTransfer(C.colorSpace)!==Fi,(h!==C||p!==C.version||m!==i.toneMapping)&&(d.material.needsUpdate=!0,h=C,p=C.version,m=i.toneMapping),d.layers.enableAll(),M.unshift(d,d.geometry,d.material,0,0,null)):C&&C.isTexture&&(void 0===c&&(c=new Mn(new Iu(2,2),new Cl({name:"BackgroundMaterial",uniforms:Sg(cc.background.uniforms),vertexShader:cc.background.vertexShader,fragmentShader:cc.background.fragmentShader,side:ac,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=C,c.material.uniforms.backgroundIntensity.value=x.backgroundIntensity,c.material.toneMapped=Jn.getTransfer(C.colorSpace)!==Fi,!0===C.matrixAutoUpdate&&C.updateMatrix(),c.material.uniforms.uvTransform.value.copy(C.matrix),(h!==C||p!==C.version||m!==i.toneMapping)&&(c.material.needsUpdate=!0,h=C,p=C.version,m=i.toneMapping),c.layers.enableAll(),M.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(A){return i.bindVertexArray(A)}function d(A){return i.deleteVertexArray(A)}function p(A){const $=[],ie=[],ne=[];for(let se=0;se=0){const Ne=se[J];let Ye=ge[J];if(void 0===Ye&&("instanceMatrix"===J&&A.instanceMatrix&&(Ye=A.instanceMatrix),"instanceColor"===J&&A.instanceColor&&(Ye=A.instanceColor)),void 0===Ne||Ne.attribute!==Ye||Ye&&Ne.data!==Ye.data)return!0;q++}return s.attributesNum!==q||s.index!==ne}(A,ne,ie,se),ge&&function g(A,$,ie,ne){const se={},ge=$.attributes;let q=0;const re=ie.getAttributes();for(const J in re)if(re[J].location>=0){let Ne=ge[J];void 0===Ne&&("instanceMatrix"===J&&A.instanceMatrix&&(Ne=A.instanceMatrix),"instanceColor"===J&&A.instanceColor&&(Ne=A.instanceColor));const Ye={};Ye.attribute=Ne,Ne&&Ne.data&&(Ye.data=Ne.data),se[J]=Ye,q++}s.attributes=se,s.attributesNum=q,s.index=ne}(A,ne,ie,se),null!==se&&t.update(se,i.ELEMENT_ARRAY_BUFFER),(ge||o)&&(o=!1,function C(A,$,ie,ne){b();const se=ne.attributes,ge=ie.getAttributes(),q=$.defaultAttributeValues;for(const re in ge){const J=ge[re];if(J.location>=0){let we=se[re];if(void 0===we&&("instanceMatrix"===re&&A.instanceMatrix&&(we=A.instanceMatrix),"instanceColor"===re&&A.instanceColor&&(we=A.instanceColor)),void 0!==we){const Ne=we.normalized,Ye=we.itemSize,It=t.get(we);if(void 0===It)continue;const en=It.buffer,ae=It.type,Oe=It.bytesPerElement,Ze=ae===i.INT||ae===i.UNSIGNED_INT||we.gpuType===uk;if(we.isInterleavedBufferAttribute){const Fe=we.data,bt=Fe.stride,St=we.offset;if(Fe.isInstancedInterleavedBuffer){for(let Mt=0;Mt0&&i.getShaderPrecisionFormat(i.FRAGMENT_SHADER,i.HIGH_FLOAT).precision>0)return"highp";D="mediump"}return"mediump"===D&&i.getShaderPrecisionFormat(i.VERTEX_SHADER,i.MEDIUM_FLOAT).precision>0&&i.getShaderPrecisionFormat(i.FRAGMENT_SHADER,i.MEDIUM_FLOAT).precision>0?"mediump":"lowp"}let c=void 0!==e.precision?e.precision:"highp";const d=l(c);d!==c&&(console.warn("THREE.WebGLRenderer:",c,"not supported, using",d,"instead."),c=d);const h=!0===e.logarithmicDepthBuffer,p=i.getParameter(i.MAX_TEXTURE_IMAGE_UNITS),m=i.getParameter(i.MAX_VERTEX_TEXTURE_IMAGE_UNITS);return{isWebGL2:!0,getMaxAnisotropy:function s(){if(void 0!==r)return r;if(!0===t.has("EXT_texture_filter_anisotropic")){const D=t.get("EXT_texture_filter_anisotropic");r=i.getParameter(D.MAX_TEXTURE_MAX_ANISOTROPY_EXT)}else r=0;return r},getMaxPrecision:l,textureFormatReadable:function o(D){return!(D!==Ro&&n.convert(D)!==i.getParameter(i.IMPLEMENTATION_COLOR_READ_FORMAT))},textureTypeReadable:function a(D){const k=D===Jm&&(t.has("EXT_color_buffer_half_float")||t.has("EXT_color_buffer_float"));return!(D!==Jc&&n.convert(D)!==i.getParameter(i.IMPLEMENTATION_COLOR_READ_TYPE)&&D!==Qo&&!k)},precision:c,logarithmicDepthBuffer:h,maxTextures:p,maxVertexTextures:m,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:m>0,maxSamples:i.getParameter(i.MAX_SAMPLES)}}function Tce(i){const t=this;let e=null,n=0,r=!1,s=!1;const o=new sf,a=new wn,l={value:null,needsUpdate:!1};function d(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=d(g,p,x,m);for(let F=0;F!==x;++F)C[F]=e[F];y.clippingState=C,this.numIntersection=b?this.numPlanes:0,this.numPlanes+=M}}}function Ice(i){let t=new WeakMap;function e(o,a){return a===AC?o.mapping=lc:a===DC&&(o.mapping=Zh),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===AC||a===DC){if(t.has(o))return e(t.get(o).texture,o.mapping);{const l=o.image;if(l&&l.height>0){const c=new xae(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 Ib extends fP{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,d=(this.top-this.bottom)/this.view.fullHeight/this.zoom;s+=c*this.view.offsetX,o=s+c*this.view.width,a-=d*this.view.offsetY,l=a-d*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 n5=[.125,.215,.35,.446,.526,.582],mP=new Ib,r5=new qe;let gP=null,_P=0,vP=0,yP=!1;const df=(1+Math.sqrt(5))/2,Tg=1/df,s5=[new O(-df,Tg,0),new O(df,Tg,0),new O(-Tg,0,df),new O(Tg,0,df),new O(0,df,-Tg),new O(0,df,Tg),new O(-1,1,-1),new O(1,1,-1),new O(-1,1,1),new O(1,1,1)];class o5{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){gP=this._renderer.getRenderTarget(),_P=this._renderer.getActiveCubeFace(),vP=this._renderer.getActiveMipmapLevel(),yP=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=c5(),this._compileMaterial(this._cubemapMaterial))}compileEquirectangularShader(){null===this._equirectMaterial&&(this._equirectMaterial=l5(),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=n5[o-i+4-1]:0===o&&(l=0),n.push(l);const c=1/(a-2),d=-c,h=1+c,p=[d,d,h,d,h,h,d,d,h,h,d,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 D=0;D2?0:-1;M.set([k,B,0,k+2/3,B,0,k+2/3,B+1,0,k,B,0,k+2/3,B+1,0,k,B+1,0],b*g*D),x.set(p,v*g*D),C.set([D,D,D,D,D,D],y*g*D)}const F=new hn;F.setAttribute("position",new Hi(M,b)),F.setAttribute("uv",new Hi(x,v)),F.setAttribute("faceIndex",new Hi(C,y)),t.push(F),r>4&&r--}return{lodPlanes:t,sizeLods:e,sigmas:n}}(s)),this._blurMaterial=function kce(i,t,e){const n=new Float32Array(20),r=new O(0,1,0);return new Cl({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:Qc,depthTest:!1,depthWrite:!1})}(s,t,e)}return r}_compileMaterial(t){const e=new Mn(this._lodPlanes[0],t);this._renderer.compile(e,mP)}_sceneToCubeUV(t,e,n,r){const a=new yr(90,1,e,n),l=[1,-1,1,1,1,1],c=[1,1,1,-1,-1,-1],d=this._renderer,h=d.autoClear,p=d.toneMapping;d.getClearColor(r5),d.toneMapping=bu,d.autoClear=!1;const m=new qi({name:"PMREM.Background",side:Io,depthWrite:!1,depthTest:!1}),g=new Mn(new rf,m);let b=!1;const v=t.background;v?v.isColor&&(m.color.copy(v),t.background=null,b=!0):(m.color.copy(r5),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;cS(r,M*x,y>2?x:0,x,x),d.setRenderTarget(r),b&&d.render(g,a),d.render(t,a)}g.geometry.dispose(),g.material.dispose(),d.toneMapping=p,d.autoClear=h,t.background=v}_textureToCubeUV(t,e){const n=this._renderer,r=t.mapping===lc||t.mapping===Zh;r?(null===this._cubemapMaterial&&(this._cubemapMaterial=c5()),this._cubemapMaterial.uniforms.flipEnvMap.value=!1===t.isRenderTargetTexture?-1:1):null===this._equirectMaterial&&(this._equirectMaterial=l5());const s=r?this._cubemapMaterial:this._equirectMaterial,o=new Mn(this._lodPlanes[0],s);s.uniforms.envMap.value=t;const l=this._cubeSize;cS(e,0,0,3*l,2*l),n.setRenderTarget(e),n.render(o,mP)}_applyPMREM(t){const e=this._renderer,n=e.autoClear;e.autoClear=!1;const r=this._lodPlanes.length;for(let s=1;s20&&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 k=0;k<20;++k){const B=k/b,T=Math.exp(-B*B/2);y.push(T),0===k?M+=T:kx-4?r-x+4:0),4*(this._cubeSize-C),3*C,2*C),l.setRenderTarget(e),l.render(h,mP)}}function a5(i,t,e){const n=new Mu(i,t,e);return n.texture.mapping=mb,n.texture.name="PMREM.cubeUv",n.scissorTest=!0,n}function cS(i,t,e,n,r){i.viewport.set(t,e,n,r),i.scissor.set(t,e,n,r)}function l5(){return new Cl({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:Qc,depthTest:!1,depthWrite:!1})}function c5(){return new Cl({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:Qc,depthTest:!1,depthWrite:!1})}function Pce(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===AC||l===DC,d=l===lc||l===Zh;if(c||d){let h=t.get(a);if(a.isRenderTargetTexture&&a.pmremVersion!==(void 0!==h?h.texture.pmremVersion:0))return null===e&&(e=new o5(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||d&&m&&function r(a){let l=0;for(let d=0;d<6;d++)void 0!==a[d]&&l++;return 6===l}(m)?(null===e&&(e=new o5(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 Oce(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&&cg("THREE.WebGLRenderer: "+n+" extension not supported."),r}}}function Fce(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&&(F=Math.ceil(C/t.maxTextureSize),C=t.maxTextureSize);const D=new Float32Array(C*F*4*h),k=new Zk(D,C,F,h);k.type=Qo,k.needsUpdate=!0;const B=4*x;for(let A=0;A0)return i;const r=t*e;let s=g5[r];if(void 0===s&&(s=new Float32Array(r),g5[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 Fr(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 Ode(i,t){const e=function Pde(i){const t=Jn.getPrimaries(Jn.workingColorSpace),e=Jn.getPrimaries(i);let n;switch(t===e?n="":t===UC&&e===BC?n="LinearDisplayP3ToLinearSRGB":t===BC&&e===UC&&(n="LinearSRGBToLinearDisplayP3"),i){case ds:case LC:return[n,"LinearTransferOETF"];case cs:case jk: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 Fde(i,t){let e;switch(t){case foe:e="Linear";break;case poe:e="Reinhard";break;case moe:e="OptimizedCineon";break;case goe:e="ACESFilmic";break;case voe:e="AgX";break;case yoe:e="Neutral";break;case _oe:e="Custom";break;default:console.warn("THREE.WebGLProgram: Unsupported toneMapping:",t),e="Linear"}return"vec3 "+i+"( vec3 color ) { return "+e+"ToneMapping( color ); }"}const hS=new O;function Rb(i){return""!==i}function C5(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 S5(i,t){return i.replace(/NUM_CLIPPING_PLANES/g,t.numClippingPlanes).replace(/UNION_CLIPPING_PLANES/g,t.numClippingPlanes-t.numClipIntersection)}const Vde=/^[ \t]*#include +<([\w\d./]+)>/gm;function wP(i){return i.replace(Vde,Hde)}const zde=new Map;function Hde(i,t){let e=Cn[t];if(void 0===e){const n=zde.get(t);if(void 0===n)throw new Error("Can not resolve #include <"+t+">");e=Cn[n],console.warn('THREE.WebGLRenderer: Shader chunk "%s" has been deprecated. Use "%s" instead.',t,n)}return wP(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 E5(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(Rb).join("\n"),y.length>0&&(y+="\n")):(v=[A5(e),"#define SHADER_TYPE "+e.shaderType,"#define SHADER_NAME "+e.shaderName,g,e.extensionClipCullDistance?"#define USE_CLIP_DISTANCE":"",e.batching?"#define USE_BATCHING":"",e.batchingColor?"#define USE_BATCHING_COLOR":"",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 "+d:"",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_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.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","#ifdef USE_SKINNING","\tattribute vec4 skinIndex;","\tattribute vec4 skinWeight;","#endif","\n"].filter(Rb).join("\n"),y=[A5(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 "+d:"",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.dispersion?"#define USE_DISPERSION":"",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||e.batchingColor?"#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.decodeVideoTexture?"#define DECODE_VIDEO_TEXTURE":"",e.logarithmicDepthBuffer?"#define USE_LOGDEPTHBUF":"","uniform mat4 viewMatrix;","uniform vec3 cameraPosition;","uniform bool isOrthographic;",e.toneMapping!==bu?"#define TONE_MAPPING":"",e.toneMapping!==bu?Cn.tonemapping_pars_fragment:"",e.toneMapping!==bu?Fde("toneMapping",e.toneMapping):"",e.dithering?"#define DITHERING":"",e.opaque?"#define OPAQUE":"",Cn.colorspace_pars_fragment,Ode("linearToOutputTexel",e.outputColorSpace),(Jn.getLuminanceCoefficients(hS),["float luminance( const in vec3 rgb ) {",`\tconst vec3 weights = vec3( ${hS.x.toFixed(4)}, ${hS.y.toFixed(4)}, ${hS.z.toFixed(4)} );`,"\treturn dot( weights, rgb );","}"].join("\n")),e.useDepthPacking?"#define DEPTH_PACKING "+e.depthPacking:"","\n"].filter(Rb).join("\n")),o=wP(o),o=C5(o,e),o=S5(o,e),a=wP(a),a=C5(a,e),a=S5(a,e),o=E5(o),a=E5(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===A4?"":"layout(location = 0) out highp vec4 pc_fragColor;",e.glslVersion===A4?"":"#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,F=w5(r,r.VERTEX_SHADER,M+v+o),D=w5(r,r.FRAGMENT_SHADER,C);function k($){if(i.debug.checkShaderErrors){const ie=r.getProgramInfoLog(b).trim(),ne=r.getShaderInfoLog(F).trim(),se=r.getShaderInfoLog(D).trim();let ge=!0,q=!0;if(!1===r.getProgramParameter(b,r.LINK_STATUS))if(ge=!1,"function"==typeof i.debug.onShaderError)i.debug.onShaderError(r,b,F,D);else{const re=M5(r,F,"vertex"),J=M5(r,D,"fragment");console.error("THREE.WebGLProgram: Shader Error "+r.getError()+" - VALIDATE_STATUS "+r.getProgramParameter(b,r.VALIDATE_STATUS)+"\n\nMaterial Name: "+$.name+"\nMaterial Type: "+$.type+"\n\nProgram Info Log: "+ie+"\n"+re+"\n"+J)}else""!==ie?console.warn("THREE.WebGLProgram: Program Info Log:",ie):(""===ne||""===se)&&(q=!1);q&&($.diagnostics={runnable:ge,programLog:ie,vertexShader:{log:ne,prefix:v},fragmentShader:{log:se,prefix:y}})}r.deleteShader(F),r.deleteShader(D),B=new uS(r,b),T=function Ude(i,t){const e={},n=i.getProgramParameter(t,i.ACTIVE_ATTRIBUTES);for(let r=0;r0,ce=T.clearcoat>0,Te=T.iridescence>0,Ae=T.sheen>0,Bt=T.transmission>0,Je=R&&!!T.anisotropyMap,ut=ce&&!!T.clearcoatMap,bn=ce&&!!T.clearcoatNormalMap,ze=ce&&!!T.clearcoatRoughnessMap,dt=Te&&!!T.iridescenceMap,jn=Te&&!!T.iridescenceThicknessMap,ln=Ae&&!!T.sheenColorMap,_t=Ae&&!!T.sheenRoughnessMap,vn=!!T.specularMap,Pn=!!T.specularColorMap,Ki=!!T.specularIntensityMap,Z=Bt&&!!T.transmissionMap,$e=Bt&&!!T.thicknessMap,Ee=!!T.alphaMap,ei=!!T.extensions;let br=bu;T.toneMapped&&(null===Fe||!0===Fe.isXRRenderTarget)&&(br=i.toneMapping);const hs={shaderID:we,shaderType:T.type,shaderName:T.name,vertexShader:en,fragmentShader:ae,defines:T.defines,customVertexShaderID:Oe,customFragmentShaderID:Ze,isRawShaderMaterial:!0===T.isRawShaderMaterial,glslVersion:T.glslVersion,precision:m,batching:St,batchingColor:St&&null!==ne._colorsTexture,instancing:bt,instancingColor:bt&&null!==ne.instanceColor,instancingMorph:bt&&null!==ne.morphTexture,supportsVertexTextures:p,outputColorSpace:null===Fe?i.outputColorSpace:!0===Fe.isXRRenderTarget?Fe.texture.colorSpace:ds,alphaToCoverage:!!T.alphaToCoverage,map:Mt,matcap:!!T.matcap,envMap:N,envMapMode:N&&re.mapping,envMapCubeUVHeight:J,aoMap:Ge,lightMap:Le,bumpMap:nt,normalMap:Me,displacementMap:p&&Gt,emissiveMap:it,normalMapObjectSpace:Me&&T.normalMapType===Aoe,normalMapTangentSpace:Me&&T.normalMapType===Qh,metalnessMap:pt,roughnessMap:z,anisotropy:R,anisotropyMap:Je,clearcoat:ce,clearcoatMap:ut,clearcoatNormalMap:bn,clearcoatRoughnessMap:ze,dispersion:T.dispersion>0,iridescence:Te,iridescenceMap:dt,iridescenceThicknessMap:jn,sheen:Ae,sheenColorMap:ln,sheenRoughnessMap:_t,specularMap:vn,specularColorMap:Pn,specularIntensityMap:Ki,transmission:Bt,transmissionMap:Z,thicknessMap:$e,gradientMap:!!T.gradientMap,opaque:!1===T.transparent&&T.blending===Zm&&!1===T.alphaToCoverage,alphaMap:Ee,alphaTest:T.alphaTest>0,alphaHash:!!T.alphaHash,combine:T.combine,mapUv:Mt&&b(T.map.channel),aoMapUv:Ge&&b(T.aoMap.channel),lightMapUv:Le&&b(T.lightMap.channel),bumpMapUv:nt&&b(T.bumpMap.channel),normalMapUv:Me&&b(T.normalMap.channel),displacementMapUv:Gt&&b(T.displacementMap.channel),emissiveMapUv:it&&b(T.emissiveMap.channel),metalnessMapUv:pt&&b(T.metalnessMap.channel),roughnessMapUv:z&&b(T.roughnessMap.channel),anisotropyMapUv:Je&&b(T.anisotropyMap.channel),clearcoatMapUv:ut&&b(T.clearcoatMap.channel),clearcoatNormalMapUv:bn&&b(T.clearcoatNormalMap.channel),clearcoatRoughnessMapUv:ze&&b(T.clearcoatRoughnessMap.channel),iridescenceMapUv:dt&&b(T.iridescenceMap.channel),iridescenceThicknessMapUv:jn&&b(T.iridescenceThicknessMap.channel),sheenColorMapUv:ln&&b(T.sheenColorMap.channel),sheenRoughnessMapUv:_t&&b(T.sheenRoughnessMap.channel),specularMapUv:vn&&b(T.specularMap.channel),specularColorMapUv:Pn&&b(T.specularColorMap.channel),specularIntensityMapUv:Ki&&b(T.specularIntensityMap.channel),transmissionMapUv:Z&&b(T.transmissionMap.channel),thicknessMapUv:$e&&b(T.thicknessMap.channel),alphaMapUv:Ee&&b(T.alphaMap.channel),vertexTangents:!!ge.attributes.tangent&&(Me||R),vertexColors:T.vertexColors,vertexAlphas:!0===T.vertexColors&&!!ge.attributes.color&&4===ge.attributes.color.itemSize,pointsUvs:!0===ne.isPoints&&!!ge.attributes.uv&&(Mt||Ee),fog:!!se,useFog:!0===T.fog,fogExp2:!!se&&se.isFogExp2,flatShading:!0===T.flatShading,sizeAttenuation:!0===T.sizeAttenuation,logarithmicDepthBuffer:h,skinning:!0===ne.isSkinnedMesh,morphTargets:void 0!==ge.morphAttributes.position,morphNormals:void 0!==ge.morphAttributes.normal,morphColors:void 0!==ge.morphAttributes.color,morphTargetsCount:Ye,morphTextureStride:It,numDirLights:A.directional.length,numPointLights:A.point.length,numSpotLights:A.spot.length,numSpotLightMaps:A.spotLightMap.length,numRectAreaLights:A.rectArea.length,numHemiLights:A.hemi.length,numDirLightShadows:A.directionalShadowMap.length,numPointLightShadows:A.pointShadowMap.length,numSpotLightShadows:A.spotShadowMap.length,numSpotLightShadowsWithMaps:A.numSpotLightShadowsWithMaps,numLightProbes:A.numLightProbes,numClippingPlanes:o.numPlanes,numClipIntersection:o.numIntersection,dithering:T.dithering,shadowMapEnabled:i.shadowMap.enabled&&$.length>0,shadowMapType:i.shadowMap.type,toneMapping:br,decodeVideoTexture:Mt&&!0===T.map.isVideoTexture&&Jn.getTransfer(T.map.colorSpace)===Fi,premultipliedAlpha:T.premultipliedAlpha,doubleSided:T.side===Ls,flipSided:T.side===Io,useDepthPacking:T.depthPacking>=0,depthPacking:T.depthPacking||0,index0AttributeName:T.index0AttributeName,extensionClipCullDistance:ei&&!0===T.extensions.clipCullDistance&&n.has("WEBGL_clip_cull_distance"),extensionMultiDraw:(ei&&!0===T.extensions.multiDraw||St)&&n.has("WEBGL_multi_draw"),rendererExtensionParallelShaderCompile:n.has("KHR_parallel_shader_compile"),customProgramCacheKey:T.customProgramCacheKey()};return hs.vertexUv1s=c.has(1),hs.vertexUv2s=c.has(2),hs.vertexUv3s=c.has(3),c.clear(),hs},getProgramCacheKey:function y(T){const A=[];if(T.shaderID?A.push(T.shaderID):(A.push(T.customVertexShaderID),A.push(T.customFragmentShaderID)),void 0!==T.defines)for(const $ in T.defines)A.push($),A.push(T.defines[$]);return!1===T.isRawShaderMaterial&&(function M(T,A){T.push(A.precision),T.push(A.outputColorSpace),T.push(A.envMapMode),T.push(A.envMapCubeUVHeight),T.push(A.mapUv),T.push(A.alphaMapUv),T.push(A.lightMapUv),T.push(A.aoMapUv),T.push(A.bumpMapUv),T.push(A.normalMapUv),T.push(A.displacementMapUv),T.push(A.emissiveMapUv),T.push(A.metalnessMapUv),T.push(A.roughnessMapUv),T.push(A.anisotropyMapUv),T.push(A.clearcoatMapUv),T.push(A.clearcoatNormalMapUv),T.push(A.clearcoatRoughnessMapUv),T.push(A.iridescenceMapUv),T.push(A.iridescenceThicknessMapUv),T.push(A.sheenColorMapUv),T.push(A.sheenRoughnessMapUv),T.push(A.specularMapUv),T.push(A.specularColorMapUv),T.push(A.specularIntensityMapUv),T.push(A.transmissionMapUv),T.push(A.thicknessMapUv),T.push(A.combine),T.push(A.fogExp2),T.push(A.sizeAttenuation),T.push(A.morphTargetsCount),T.push(A.morphAttributeCount),T.push(A.numDirLights),T.push(A.numPointLights),T.push(A.numSpotLights),T.push(A.numSpotLightMaps),T.push(A.numHemiLights),T.push(A.numRectAreaLights),T.push(A.numDirLightShadows),T.push(A.numPointLightShadows),T.push(A.numSpotLightShadows),T.push(A.numSpotLightShadowsWithMaps),T.push(A.numLightProbes),T.push(A.shadowMapType),T.push(A.toneMapping),T.push(A.numClippingPlanes),T.push(A.numClipIntersection),T.push(A.depthPacking)}(A,T),function x(T,A){a.disableAll(),A.supportsVertexTextures&&a.enable(0),A.instancing&&a.enable(1),A.instancingColor&&a.enable(2),A.instancingMorph&&a.enable(3),A.matcap&&a.enable(4),A.envMap&&a.enable(5),A.normalMapObjectSpace&&a.enable(6),A.normalMapTangentSpace&&a.enable(7),A.clearcoat&&a.enable(8),A.iridescence&&a.enable(9),A.alphaTest&&a.enable(10),A.vertexColors&&a.enable(11),A.vertexAlphas&&a.enable(12),A.vertexUv1s&&a.enable(13),A.vertexUv2s&&a.enable(14),A.vertexUv3s&&a.enable(15),A.vertexTangents&&a.enable(16),A.anisotropy&&a.enable(17),A.alphaHash&&a.enable(18),A.batching&&a.enable(19),A.dispersion&&a.enable(20),A.batchingColor&&a.enable(21),T.push(a.mask),a.disableAll(),A.fog&&a.enable(0),A.useFog&&a.enable(1),A.flatShading&&a.enable(2),A.logarithmicDepthBuffer&&a.enable(3),A.skinning&&a.enable(4),A.morphTargets&&a.enable(5),A.morphNormals&&a.enable(6),A.morphColors&&a.enable(7),A.premultipliedAlpha&&a.enable(8),A.shadowMapEnabled&&a.enable(9),A.doubleSided&&a.enable(10),A.flipSided&&a.enable(11),A.useDepthPacking&&a.enable(12),A.dithering&&a.enable(13),A.transmission&&a.enable(14),A.sheen&&a.enable(15),A.opaque&&a.enable(16),A.pointsUvs&&a.enable(17),A.decodeVideoTexture&&a.enable(18),A.alphaToCoverage&&a.enable(19),T.push(a.mask)}(A,T),A.push(i.outputColorSpace)),A.push(T.customProgramCacheKey),A.join()},getUniforms:function C(T){const A=g[T.type];let $;return $=A?Q4.clone(cc[A].uniforms):T.uniforms,$},acquireProgram:function F(T,A){let $;for(let ie=0,ne=d.length;ie0?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 d(){for(let h=t,p=i.length;h1&&e.sort(h||nue),n.length>1&&n.sort(p||D5),r.length>1&&r.sort(p||D5)}}}function iue(){let i=new WeakMap;return{get:function t(n,r){const s=i.get(n);let o;return void 0===s?(o=new T5,i.set(n,[o])):r>=s.length?(o=new T5,s.push(o)):o=s[r],o},dispose:function e(){i=new WeakMap}}}function rue(){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 O,color:new qe};break;case"SpotLight":e={position:new O,direction:new O,color:new qe,distance:0,coneCos:0,penumbraCos:0,decay:0};break;case"PointLight":e={position:new O,color:new qe,distance:0,decay:0};break;case"HemisphereLight":e={direction:new O,skyColor:new qe,groundColor:new qe};break;case"RectAreaLight":e={color:new qe,position:new O,halfWidth:new O,halfHeight:new O}}return i[t.id]=e,e}}}let oue=0;function aue(i,t){return(t.castShadow?2:0)-(i.castShadow?2:0)+(t.map?1:0)-(i.map?1:0)}function lue(i){const t=new rue,e=function sue(){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={shadowIntensity:1,shadowBias:0,shadowNormalBias:0,shadowRadius:1,shadowMapSize:new xe};break;case"PointLight":e={shadowIntensity:1,shadowBias:0,shadowNormalBias:0,shadowRadius:1,shadowMapSize:new xe,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 O);const r=new O,s=new Nt,o=new Nt;return{setup:function a(c){let d=0,h=0,p=0;for(let T=0;T<9;T++)n.probe[T].set(0,0,0);let m=0,g=0,b=0,v=0,y=0,M=0,x=0,C=0,F=0,D=0,k=0;c.sort(aue);for(let T=0,A=c.length;T0&&(!0===i.has("OES_texture_float_linear")?(n.rectAreaLTC1=Qe.LTC_FLOAT_1,n.rectAreaLTC2=Qe.LTC_FLOAT_2):(n.rectAreaLTC1=Qe.LTC_HALF_1,n.rectAreaLTC2=Qe.LTC_HALF_2)),n.ambient[0]=d,n.ambient[1]=h,n.ambient[2]=p;const B=n.hash;(B.directionalLength!==m||B.pointLength!==g||B.spotLength!==b||B.rectAreaLength!==v||B.hemiLength!==y||B.numDirectionalShadows!==M||B.numPointShadows!==x||B.numSpotShadows!==C||B.numSpotMaps!==F||B.numLightProbes!==k)&&(n.directional.length=m,n.spot.length=b,n.rectArea.length=v,n.point.length=g,n.hemi.length=y,n.directionalShadow.length=M,n.directionalShadowMap.length=M,n.pointShadow.length=x,n.pointShadowMap.length=x,n.spotShadow.length=C,n.spotShadowMap.length=C,n.directionalShadowMatrix.length=M,n.pointShadowMatrix.length=x,n.spotLightMatrix.length=C+F-D,n.spotLightMap.length=F,n.numSpotLightShadowsWithMaps=D,n.numLightProbes=k,B.directionalLength=m,B.pointLength=g,B.spotLength=b,B.rectAreaLength=v,B.hemiLength=y,B.numDirectionalShadows=M,B.numPointShadows=x,B.numSpotShadows=C,B.numSpotMaps=F,B.numLightProbes=k,n.version=oue++)},setupView:function l(c,d){let h=0,p=0,m=0,g=0,b=0;const v=d.matrixWorldInverse;for(let y=0,M=c.length;y=o.length?(a=new I5(i),o.push(a)):a=o[s],a},dispose:function n(){t=new WeakMap}}}class R5 extends Po{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 k5 extends Po{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 due="void main() {\n\tgl_Position = vec4( position, 1.0 );\n}",uue="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 hue(i,t,e){let n=new aS;const r=new xe,s=new xe,o=new gi,a=new R5({depthPacking:Eoe}),l=new k5,c={},d=e.maxTextureSize,h={[ac]:Io,[Io]:ac,[Ls]:Ls},p=new Cl({defines:{VSM_SAMPLES:8},uniforms:{shadow_pass:{value:null},resolution:{value:new xe},radius:{value:4}},vertexShader:due,fragmentShader:uue}),m=p.clone();m.defines.HORIZONTAL_PASS=1;const g=new hn;g.setAttribute("position",new Hi(new Float32Array([-1,-1,.5,3,-1,.5,-1,3,.5]),3));const b=new Mn(g,p),v=this;this.enabled=!1,this.autoUpdate=!0,this.needsUpdate=!1,this.type=l4;let y=this.type;function M(D,k){const B=t.update(b);p.defines.VSM_SAMPLES!==D.blurSamples&&(p.defines.VSM_SAMPLES=D.blurSamples,m.defines.VSM_SAMPLES=D.blurSamples,p.needsUpdate=!0,m.needsUpdate=!0),null===D.mapPass&&(D.mapPass=new Mu(r.x,r.y)),p.uniforms.shadow_pass.value=D.map.texture,p.uniforms.resolution.value=D.mapSize,p.uniforms.radius.value=D.radius,i.setRenderTarget(D.mapPass),i.clear(),i.renderBufferDirect(k,null,B,p,b,null),m.uniforms.shadow_pass.value=D.mapPass.texture,m.uniforms.resolution.value=D.mapSize,m.uniforms.radius.value=D.radius,i.setRenderTarget(D.map),i.clear(),i.renderBufferDirect(k,null,B,m,b,null)}function x(D,k,B,T){let A=null;const $=!0===B.isPointLight?D.customDistanceMaterial:D.customDepthMaterial;if(void 0!==$)A=$;else if(A=!0===B.isPointLight?l:a,i.localClippingEnabled&&!0===k.clipShadows&&Array.isArray(k.clippingPlanes)&&0!==k.clippingPlanes.length||k.displacementMap&&0!==k.displacementScale||k.alphaMap&&k.alphaTest>0||k.map&&k.alphaTest>0){const ie=A.uuid,ne=k.uuid;let se=c[ie];void 0===se&&(se={},c[ie]=se);let ge=se[ne];void 0===ge&&(ge=A.clone(),se[ne]=ge,k.addEventListener("dispose",F)),A=ge}return A.visible=k.visible,A.wireframe=k.wireframe,A.side=T===Zc?null!==k.shadowSide?k.shadowSide:k.side:null!==k.shadowSide?k.shadowSide:h[k.side],A.alphaMap=k.alphaMap,A.alphaTest=k.alphaTest,A.map=k.map,A.clipShadows=k.clipShadows,A.clippingPlanes=k.clippingPlanes,A.clipIntersection=k.clipIntersection,A.displacementMap=k.displacementMap,A.displacementScale=k.displacementScale,A.displacementBias=k.displacementBias,A.wireframeLinewidth=k.wireframeLinewidth,A.linewidth=k.linewidth,!0===B.isPointLight&&!0===A.isMeshDistanceMaterial&&(i.properties.get(A).light=B),A}function C(D,k,B,T,A){if(!1===D.visible)return;if(D.layers.test(k.layers)&&(D.isMesh||D.isLine||D.isPoints)&&(D.castShadow||D.receiveShadow&&A===Zc)&&(!D.frustumCulled||n.intersectsObject(D))){D.modelViewMatrix.multiplyMatrices(B.matrixWorldInverse,D.matrixWorld);const ne=t.update(D),se=D.material;if(Array.isArray(se)){const ge=ne.groups;for(let q=0,re=ge.length;qd||r.y>d)&&(r.x>d&&(s.x=Math.floor(d/we.x),r.x=s.x*we.x,J.mapSize.x=s.x),r.y>d&&(s.y=Math.floor(d/we.y),r.y=s.y*we.y,J.mapSize.y=s.y)),null===J.map||!0===ne||!0===se){const Ye=this.type!==Zc?{minFilter:_r,magFilter:_r}:{};null!==J.map&&J.map.dispose(),J.map=new Mu(r.x,r.y,Ye),J.map.texture.name=re.name+".shadowMap",J.camera.updateProjectionMatrix()}i.setRenderTarget(J.map),i.clear();const Ne=J.getViewportCount();for(let Ye=0;Ye=1):-1!==re.indexOf("OpenGL ES")&&(q=parseFloat(/^OpenGL ES (\d)/.exec(re)[1]),ge=q>=2);let J=null,we={};const Ne=i.getParameter(i.SCISSOR_BOX),Ye=i.getParameter(i.VIEWPORT),It=(new gi).fromArray(Ne),en=(new gi).fromArray(Ye);function ae(Z,$e,Ce,Ee){const Ke=new Uint8Array(4),tn=i.createTexture();i.bindTexture(Z,tn),i.texParameteri(Z,i.TEXTURE_MIN_FILTER,i.NEAREST),i.texParameteri(Z,i.TEXTURE_MAG_FILTER,i.NEAREST);for(let ei=0;ei"u")&&/OculusBrowser/g.test(navigator.userAgent),c=new xe,d=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(z,R){return m?new OffscreenCanvas(z,R):wb("canvas")}function b(z,R,ce){let Ie=1;const Te=pt(z);if((Te.width>ce||Te.height>ce)&&(Ie=ce/Math.max(Te.width,Te.height)),Ie<1){if(typeof HTMLImageElement<"u"&&z instanceof HTMLImageElement||typeof HTMLCanvasElement<"u"&&z instanceof HTMLCanvasElement||typeof ImageBitmap<"u"&&z instanceof ImageBitmap||typeof VideoFrame<"u"&&z instanceof VideoFrame){const Ae=Math.floor(Ie*Te.width),Bt=Math.floor(Ie*Te.height);void 0===h&&(h=g(Ae,Bt));const Je=R?g(Ae,Bt):h;return Je.width=Ae,Je.height=Bt,Je.getContext("2d").drawImage(z,0,0,Ae,Bt),console.warn("THREE.WebGLRenderer: Texture has been resized from ("+Te.width+"x"+Te.height+") to ("+Ae+"x"+Bt+")."),Je}return"data"in z&&console.warn("THREE.WebGLRenderer: Image in DataTexture is too big ("+Te.width+"x"+Te.height+")."),z}return z}function v(z){return z.generateMipmaps&&z.minFilter!==_r&&z.minFilter!==lr}function y(z){i.generateMipmap(z)}function M(z,R,ce,Ie,Te=!1){if(null!==z){if(void 0!==i[z])return i[z];console.warn("THREE.WebGLRenderer: Attempt to use non-existing WebGL internal format '"+z+"'")}let Ae=R;if(R===i.RED&&(ce===i.FLOAT&&(Ae=i.R32F),ce===i.HALF_FLOAT&&(Ae=i.R16F),ce===i.UNSIGNED_BYTE&&(Ae=i.R8)),R===i.RED_INTEGER&&(ce===i.UNSIGNED_BYTE&&(Ae=i.R8UI),ce===i.UNSIGNED_SHORT&&(Ae=i.R16UI),ce===i.UNSIGNED_INT&&(Ae=i.R32UI),ce===i.BYTE&&(Ae=i.R8I),ce===i.SHORT&&(Ae=i.R16I),ce===i.INT&&(Ae=i.R32I)),R===i.RG&&(ce===i.FLOAT&&(Ae=i.RG32F),ce===i.HALF_FLOAT&&(Ae=i.RG16F),ce===i.UNSIGNED_BYTE&&(Ae=i.RG8)),R===i.RG_INTEGER&&(ce===i.UNSIGNED_BYTE&&(Ae=i.RG8UI),ce===i.UNSIGNED_SHORT&&(Ae=i.RG16UI),ce===i.UNSIGNED_INT&&(Ae=i.RG32UI),ce===i.BYTE&&(Ae=i.RG8I),ce===i.SHORT&&(Ae=i.RG16I),ce===i.INT&&(Ae=i.RG32I)),R===i.RGB&&ce===i.UNSIGNED_INT_5_9_9_9_REV&&(Ae=i.RGB9_E5),R===i.RGBA){const Bt=Te?NC:Jn.getTransfer(Ie);ce===i.FLOAT&&(Ae=i.RGBA32F),ce===i.HALF_FLOAT&&(Ae=i.RGBA16F),ce===i.UNSIGNED_BYTE&&(Ae=Bt===Fi?i.SRGB8_ALPHA8:i.RGBA8),ce===i.UNSIGNED_SHORT_4_4_4_4&&(Ae=i.RGBA4),ce===i.UNSIGNED_SHORT_5_5_5_1&&(Ae=i.RGB5_A1)}return(Ae===i.R16F||Ae===i.R32F||Ae===i.RG16F||Ae===i.RG32F||Ae===i.RGBA16F||Ae===i.RGBA32F)&&t.get("EXT_color_buffer_float"),Ae}function x(z,R){let ce;return z?null===R||R===xu||R===eg?ce=i.DEPTH24_STENCIL8:R===Qo?ce=i.DEPTH32F_STENCIL8:R===vb&&(ce=i.DEPTH24_STENCIL8,console.warn("DepthTexture: 16 bit depth attachment is not supported with stencil. Using 24-bit attachment.")):null===R||R===xu||R===eg?ce=i.DEPTH_COMPONENT24:R===Qo?ce=i.DEPTH_COMPONENT32F:R===vb&&(ce=i.DEPTH_COMPONENT16),ce}function C(z,R){return!0===v(z)||z.isFramebufferTexture&&z.minFilter!==_r&&z.minFilter!==lr?Math.log2(Math.max(R.width,R.height))+1:void 0!==z.mipmaps&&z.mipmaps.length>0?z.mipmaps.length:z.isCompressedTexture&&Array.isArray(z.image)?R.mipmaps.length:1}function F(z){const R=z.target;R.removeEventListener("dispose",F),function k(z){const R=n.get(z);if(void 0===R.__webglInit)return;const ce=z.source,Ie=p.get(ce);if(Ie){const Te=Ie[R.__cacheKey];Te.usedTimes--,0===Te.usedTimes&&B(z),0===Object.keys(Ie).length&&p.delete(ce)}n.remove(z)}(R),R.isVideoTexture&&d.delete(R)}function D(z){const R=z.target;R.removeEventListener("dispose",D),function T(z){const R=n.get(z);if(z.depthTexture&&z.depthTexture.dispose(),z.isWebGLCubeRenderTarget)for(let Ie=0;Ie<6;Ie++){if(Array.isArray(R.__webglFramebuffer[Ie]))for(let Te=0;Te0&&ce.__version!==z.version){const Ie=z.image;if(null===Ie)console.warn("THREE.WebGLRenderer: Texture marked for update but no image data found.");else{if(!1!==Ie.complete)return void en(ce,z,R);console.warn("THREE.WebGLRenderer: Texture marked for update but image is incomplete")}}e.bindTexture(i.TEXTURE_2D,ce.__webglTexture,i.TEXTURE0+R)}const J={[Pa]:i.REPEAT,[Ii]:i.CLAMP_TO_EDGE,[gb]:i.MIRRORED_REPEAT},we={[_r]:i.NEAREST,[dk]:i.NEAREST_MIPMAP_NEAREST,[Qm]:i.NEAREST_MIPMAP_LINEAR,[lr]:i.LINEAR,[_b]:i.LINEAR_MIPMAP_NEAREST,[bl]:i.LINEAR_MIPMAP_LINEAR},Ne={[Doe]:i.NEVER,[Ooe]:i.ALWAYS,[Toe]:i.LESS,[E4]:i.LEQUAL,[Ioe]:i.EQUAL,[Poe]:i.GEQUAL,[Roe]:i.GREATER,[koe]:i.NOTEQUAL};function Ye(z,R){if(R.type===Qo&&!1===t.has("OES_texture_float_linear")&&(R.magFilter===lr||R.magFilter===_b||R.magFilter===Qm||R.magFilter===bl||R.minFilter===lr||R.minFilter===_b||R.minFilter===Qm||R.minFilter===bl)&&console.warn("THREE.WebGLRenderer: Unable to use linear filtering with floating point textures. OES_texture_float_linear not supported on this device."),i.texParameteri(z,i.TEXTURE_WRAP_S,J[R.wrapS]),i.texParameteri(z,i.TEXTURE_WRAP_T,J[R.wrapT]),(z===i.TEXTURE_3D||z===i.TEXTURE_2D_ARRAY)&&i.texParameteri(z,i.TEXTURE_WRAP_R,J[R.wrapR]),i.texParameteri(z,i.TEXTURE_MAG_FILTER,we[R.magFilter]),i.texParameteri(z,i.TEXTURE_MIN_FILTER,we[R.minFilter]),R.compareFunction&&(i.texParameteri(z,i.TEXTURE_COMPARE_MODE,i.COMPARE_REF_TO_TEXTURE),i.texParameteri(z,i.TEXTURE_COMPARE_FUNC,Ne[R.compareFunction])),!0===t.has("EXT_texture_filter_anisotropic")){if(R.magFilter===_r||R.minFilter!==Qm&&R.minFilter!==bl||R.type===Qo&&!1===t.has("OES_texture_float_linear"))return;if(R.anisotropy>1||n.get(R).__currentAnisotropy){const ce=t.get("EXT_texture_filter_anisotropic");i.texParameterf(z,ce.TEXTURE_MAX_ANISOTROPY_EXT,Math.min(R.anisotropy,r.getMaxAnisotropy())),n.get(R).__currentAnisotropy=R.anisotropy}}}function It(z,R){let ce=!1;void 0===z.__webglInit&&(z.__webglInit=!0,R.addEventListener("dispose",F));const Ie=R.source;let Te=p.get(Ie);void 0===Te&&(Te={},p.set(Ie,Te));const Ae=function ne(z){const R=[];return R.push(z.wrapS),R.push(z.wrapT),R.push(z.wrapR||0),R.push(z.magFilter),R.push(z.minFilter),R.push(z.anisotropy),R.push(z.internalFormat),R.push(z.format),R.push(z.type),R.push(z.generateMipmaps),R.push(z.premultiplyAlpha),R.push(z.flipY),R.push(z.unpackAlignment),R.push(z.colorSpace),R.join()}(R);if(Ae!==z.__cacheKey){void 0===Te[Ae]&&(Te[Ae]={texture:i.createTexture(),usedTimes:0},o.memory.textures++,ce=!0),Te[Ae].usedTimes++;const Bt=Te[z.__cacheKey];void 0!==Bt&&(Te[z.__cacheKey].usedTimes--,0===Bt.usedTimes&&B(R)),z.__cacheKey=Ae,z.__webglTexture=Te[Ae].texture}return ce}function en(z,R,ce){let Ie=i.TEXTURE_2D;(R.isDataArrayTexture||R.isCompressedArrayTexture)&&(Ie=i.TEXTURE_2D_ARRAY),R.isData3DTexture&&(Ie=i.TEXTURE_3D);const Te=It(z,R),Ae=R.source;e.bindTexture(Ie,z.__webglTexture,i.TEXTURE0+ce);const Bt=n.get(Ae);if(Ae.version!==Bt.__version||!0===Te){e.activeTexture(i.TEXTURE0+ce);const Je=Jn.getPrimaries(Jn.workingColorSpace),ut=R.colorSpace===wu?null:Jn.getPrimaries(R.colorSpace),bn=R.colorSpace===wu||Je===ut?i.NONE:i.BROWSER_DEFAULT_WEBGL;i.pixelStorei(i.UNPACK_FLIP_Y_WEBGL,R.flipY),i.pixelStorei(i.UNPACK_PREMULTIPLY_ALPHA_WEBGL,R.premultiplyAlpha),i.pixelStorei(i.UNPACK_ALIGNMENT,R.unpackAlignment),i.pixelStorei(i.UNPACK_COLORSPACE_CONVERSION_WEBGL,bn);let ze=b(R.image,!1,r.maxTextureSize);ze=it(R,ze);const dt=s.convert(R.format,R.colorSpace),jn=s.convert(R.type);let _t,ln=M(R.internalFormat,dt,jn,R.colorSpace,R.isVideoTexture);Ye(Ie,R);const vn=R.mipmaps,Pn=!0!==R.isVideoTexture,Ki=void 0===Bt.__version||!0===Te,Z=Ae.dataReady,$e=C(R,ze);if(R.isDepthTexture)ln=x(R.format===ng,R.type),Ki&&(Pn?e.texStorage2D(i.TEXTURE_2D,1,ln,ze.width,ze.height):e.texImage2D(i.TEXTURE_2D,0,ln,ze.width,ze.height,0,dt,jn,null));else if(R.isDataTexture)if(vn.length>0){Pn&&Ki&&e.texStorage2D(i.TEXTURE_2D,$e,ln,vn[0].width,vn[0].height);for(let Ce=0,Ee=vn.length;Ce0){const Ke=MP(_t.width,_t.height,R.format,R.type);for(const tn of R.layerUpdates){const ei=_t.data.subarray(tn*Ke/_t.data.BYTES_PER_ELEMENT,(tn+1)*Ke/_t.data.BYTES_PER_ELEMENT);e.compressedTexSubImage3D(i.TEXTURE_2D_ARRAY,Ce,0,0,tn,_t.width,_t.height,1,dt,ei,0,0)}R.clearLayerUpdates()}else e.compressedTexSubImage3D(i.TEXTURE_2D_ARRAY,Ce,0,0,0,_t.width,_t.height,ze.depth,dt,_t.data,0,0)}else e.compressedTexImage3D(i.TEXTURE_2D_ARRAY,Ce,ln,_t.width,_t.height,ze.depth,0,_t.data,0,0);else console.warn("THREE.WebGLRenderer: Attempt to load unsupported compressed texture format in .uploadTexture()");else Pn?Z&&e.texSubImage3D(i.TEXTURE_2D_ARRAY,Ce,0,0,0,_t.width,_t.height,ze.depth,dt,jn,_t.data):e.texImage3D(i.TEXTURE_2D_ARRAY,Ce,ln,_t.width,_t.height,ze.depth,0,dt,jn,_t.data)}else{Pn&&Ki&&e.texStorage2D(i.TEXTURE_2D,$e,ln,vn[0].width,vn[0].height);for(let Ce=0,Ee=vn.length;Ce0){const Ce=MP(ze.width,ze.height,R.format,R.type);for(const Ee of R.layerUpdates){const Ke=ze.data.subarray(Ee*Ce/ze.data.BYTES_PER_ELEMENT,(Ee+1)*Ce/ze.data.BYTES_PER_ELEMENT);e.texSubImage3D(i.TEXTURE_2D_ARRAY,0,0,0,Ee,ze.width,ze.height,1,dt,jn,Ke)}R.clearLayerUpdates()}else e.texSubImage3D(i.TEXTURE_2D_ARRAY,0,0,0,0,ze.width,ze.height,ze.depth,dt,jn,ze.data)}else e.texImage3D(i.TEXTURE_2D_ARRAY,0,ln,ze.width,ze.height,ze.depth,0,dt,jn,ze.data);else if(R.isData3DTexture)Pn?(Ki&&e.texStorage3D(i.TEXTURE_3D,$e,ln,ze.width,ze.height,ze.depth),Z&&e.texSubImage3D(i.TEXTURE_3D,0,0,0,0,ze.width,ze.height,ze.depth,dt,jn,ze.data)):e.texImage3D(i.TEXTURE_3D,0,ln,ze.width,ze.height,ze.depth,0,dt,jn,ze.data);else if(R.isFramebufferTexture){if(Ki)if(Pn)e.texStorage2D(i.TEXTURE_2D,$e,ln,ze.width,ze.height);else{let Ce=ze.width,Ee=ze.height;for(let Ke=0;Ke<$e;Ke++)e.texImage2D(i.TEXTURE_2D,Ke,ln,Ce,Ee,0,dt,jn,null),Ce>>=1,Ee>>=1}}else if(vn.length>0){if(Pn&&Ki){const Ce=pt(vn[0]);e.texStorage2D(i.TEXTURE_2D,$e,ln,Ce.width,Ce.height)}for(let Ce=0,Ee=vn.length;Ce>Ae),dt=Math.max(1,R.height>>Ae);Te===i.TEXTURE_3D||Te===i.TEXTURE_2D_ARRAY?e.texImage3D(Te,Ae,ut,ze,dt,R.depth,0,Bt,Je,null):e.texImage2D(Te,Ae,ut,ze,dt,0,Bt,Je,null)}e.bindFramebuffer(i.FRAMEBUFFER,z),Me(R)?a.framebufferTexture2DMultisampleEXT(i.FRAMEBUFFER,Ie,Te,n.get(ce).__webglTexture,0,nt(R)):(Te===i.TEXTURE_2D||Te>=i.TEXTURE_CUBE_MAP_POSITIVE_X&&Te<=i.TEXTURE_CUBE_MAP_NEGATIVE_Z)&&i.framebufferTexture2D(i.FRAMEBUFFER,Ie,Te,n.get(ce).__webglTexture,Ae),e.bindFramebuffer(i.FRAMEBUFFER,null)}function Ze(z,R,ce){if(i.bindRenderbuffer(i.RENDERBUFFER,z),R.depthBuffer){const Ie=R.depthTexture,Ae=x(R.stencilBuffer,Ie&&Ie.isDepthTexture?Ie.type:null),Bt=R.stencilBuffer?i.DEPTH_STENCIL_ATTACHMENT:i.DEPTH_ATTACHMENT,Je=nt(R);Me(R)?a.renderbufferStorageMultisampleEXT(i.RENDERBUFFER,Je,Ae,R.width,R.height):ce?i.renderbufferStorageMultisample(i.RENDERBUFFER,Je,Ae,R.width,R.height):i.renderbufferStorage(i.RENDERBUFFER,Ae,R.width,R.height),i.framebufferRenderbuffer(i.FRAMEBUFFER,Bt,i.RENDERBUFFER,z)}else{const Ie=R.textures;for(let Te=0;Te0&&!0===t.has("WEBGL_multisampled_render_to_texture")&&!1!==R.__useRenderToTexture}function it(z,R){const ce=z.colorSpace,Ie=z.format,Te=z.type;return!0===z.isCompressedTexture||!0===z.isVideoTexture||ce!==ds&&ce!==wu&&(Jn.getTransfer(ce)===Fi?(Ie!==Ro||Te!==Jc)&&console.warn("THREE.WebGLTextures: sRGB encoded textures have to use RGBAFormat and UnsignedByteType."):console.error("THREE.WebGLTextures: Unsupported texture color space:",ce)),R}function pt(z){return typeof HTMLImageElement<"u"&&z instanceof HTMLImageElement?(c.width=z.naturalWidth||z.width,c.height=z.naturalHeight||z.height):typeof VideoFrame<"u"&&z instanceof VideoFrame?(c.width=z.displayWidth,c.height=z.displayHeight):(c.width=z.width,c.height=z.height),c}this.allocateTextureUnit=function ie(){const z=A;return z>=r.maxTextures&&console.warn("THREE.WebGLTextures: Trying to use "+z+" texture units while this GPU supports only "+r.maxTextures),A+=1,z},this.resetTextureUnits=function $(){A=0},this.setTexture2D=se,this.setTexture2DArray=function ge(z,R){const ce=n.get(z);z.version>0&&ce.__version!==z.version?en(ce,z,R):e.bindTexture(i.TEXTURE_2D_ARRAY,ce.__webglTexture,i.TEXTURE0+R)},this.setTexture3D=function q(z,R){const ce=n.get(z);z.version>0&&ce.__version!==z.version?en(ce,z,R):e.bindTexture(i.TEXTURE_3D,ce.__webglTexture,i.TEXTURE0+R)},this.setTextureCube=function re(z,R){const ce=n.get(z);z.version>0&&ce.__version!==z.version?function ae(z,R,ce){if(6!==R.image.length)return;const Ie=It(z,R),Te=R.source;e.bindTexture(i.TEXTURE_CUBE_MAP,z.__webglTexture,i.TEXTURE0+ce);const Ae=n.get(Te);if(Te.version!==Ae.__version||!0===Ie){e.activeTexture(i.TEXTURE0+ce);const Bt=Jn.getPrimaries(Jn.workingColorSpace),Je=R.colorSpace===wu?null:Jn.getPrimaries(R.colorSpace),ut=R.colorSpace===wu||Bt===Je?i.NONE:i.BROWSER_DEFAULT_WEBGL;i.pixelStorei(i.UNPACK_FLIP_Y_WEBGL,R.flipY),i.pixelStorei(i.UNPACK_PREMULTIPLY_ALPHA_WEBGL,R.premultiplyAlpha),i.pixelStorei(i.UNPACK_ALIGNMENT,R.unpackAlignment),i.pixelStorei(i.UNPACK_COLORSPACE_CONVERSION_WEBGL,ut);const bn=R.isCompressedTexture||R.image[0].isCompressedTexture,ze=R.image[0]&&R.image[0].isDataTexture,dt=[];for(let Ee=0;Ee<6;Ee++)dt[Ee]=bn||ze?ze?R.image[Ee].image:R.image[Ee]:b(R.image[Ee],!0,r.maxCubemapSize),dt[Ee]=it(R,dt[Ee]);const jn=dt[0],ln=s.convert(R.format,R.colorSpace),_t=s.convert(R.type),vn=M(R.internalFormat,ln,_t,R.colorSpace),Pn=!0!==R.isVideoTexture,Ki=void 0===Ae.__version||!0===Ie,Z=Te.dataReady;let Ce,$e=C(R,jn);if(Ye(i.TEXTURE_CUBE_MAP,R),bn){Pn&&Ki&&e.texStorage2D(i.TEXTURE_CUBE_MAP,$e,vn,jn.width,jn.height);for(let Ee=0;Ee<6;Ee++){Ce=dt[Ee].mipmaps;for(let Ke=0;Ke0&&$e++;const Ee=pt(dt[0]);e.texStorage2D(i.TEXTURE_CUBE_MAP,$e,vn,Ee.width,Ee.height)}for(let Ee=0;Ee<6;Ee++)if(ze){Pn?Z&&e.texSubImage2D(i.TEXTURE_CUBE_MAP_POSITIVE_X+Ee,0,0,0,dt[Ee].width,dt[Ee].height,ln,_t,dt[Ee].data):e.texImage2D(i.TEXTURE_CUBE_MAP_POSITIVE_X+Ee,0,vn,dt[Ee].width,dt[Ee].height,0,ln,_t,dt[Ee].data);for(let Ke=0;Ke1;if(Bt||(void 0===Ie.__webglTexture&&(Ie.__webglTexture=i.createTexture()),Ie.__version=R.version,o.memory.textures++),Ae){ce.__webglFramebuffer=[];for(let Je=0;Je<6;Je++)if(R.mipmaps&&R.mipmaps.length>0){ce.__webglFramebuffer[Je]=[];for(let ut=0;ut0){ce.__webglFramebuffer=[];for(let Je=0;Je0&&!1===Me(z)){ce.__webglMultisampledFramebuffer=i.createFramebuffer(),ce.__webglColorRenderbuffer=[],e.bindFramebuffer(i.FRAMEBUFFER,ce.__webglMultisampledFramebuffer);for(let Je=0;Je0)for(let ut=0;ut0)for(let ut=0;ut0)if(!1===Me(z)){const R=z.textures,ce=z.width,Ie=z.height;let Te=i.COLOR_BUFFER_BIT;const Ae=z.stencilBuffer?i.DEPTH_STENCIL_ATTACHMENT:i.DEPTH_ATTACHMENT,Bt=n.get(z),Je=R.length>1;if(Je)for(let ut=0;utm+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(xue)))}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 Fo;n.matrixAutoUpdate=!1,n.visible=!1,t.joints[e.jointName]=n,t.add(n)}return t.joints[e.jointName]}}class Cue{constructor(){this.texture=null,this.mesh=null,this.depthNear=0,this.depthFar=0}init(t,e,n){if(null===this.texture){const r=new ko;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}}getMesh(t){if(null!==this.texture&&null===this.mesh){const e=t.cameras[0].viewport,n=new Cl({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:e.z},depthHeight:{value:e.w}}});this.mesh=new Mn(new Iu(20,20),n)}return this.mesh}reset(){this.texture=null,this.mesh=null}getDepthTexture(){return this.texture}}class Sue extends og{constructor(t,e){super();const n=this;let r=null,s=1,o=null,a="local-floor",l=1,c=null,d=null,h=null,p=null,m=null,g=null;const b=new Cue,v=e.getContextAttributes();let y=null,M=null;const x=[],C=[],F=new xe;let D=null;const k=new yr;k.layers.enable(1),k.viewport=new gi;const B=new yr;B.layers.enable(2),B.viewport=new gi;const T=[k,B],A=new bue;A.layers.enable(1),A.layers.enable(2);let $=null,ie=null;function ne(ae){const Oe=C.indexOf(ae.inputSource);if(-1===Oe)return;const Ze=x[Oe];void 0!==Ze&&(Ze.update(ae.inputSource,ae.frame,c||o),Ze.dispatchEvent({type:ae.type,data:ae.inputSource}))}function se(){r.removeEventListener("select",ne),r.removeEventListener("selectstart",ne),r.removeEventListener("selectend",ne),r.removeEventListener("squeeze",ne),r.removeEventListener("squeezestart",ne),r.removeEventListener("squeezeend",ne),r.removeEventListener("end",se),r.removeEventListener("inputsourceschange",ge);for(let ae=0;ae=0&&(C[Fe]=null,x[Fe].disconnect(Ze))}for(let Oe=0;Oe=C.length){C.push(Ze),Fe=St;break}if(null===C[St]){C[St]=Ze,Fe=St;break}}if(-1===Fe)break}const bt=x[Fe];bt&&bt.connect(Ze)}}this.cameraAutoUpdate=!0,this.enabled=!1,this.isPresenting=!1,this.getController=function(ae){let Oe=x[ae];return void 0===Oe&&(Oe=new CP,x[ae]=Oe),Oe.getTargetRaySpace()},this.getControllerGrip=function(ae){let Oe=x[ae];return void 0===Oe&&(Oe=new CP,x[ae]=Oe),Oe.getGripSpace()},this.getHand=function(ae){let Oe=x[ae];return void 0===Oe&&(Oe=new CP,x[ae]=Oe),Oe.getHandSpace()},this.setFramebufferScaleFactor=function(ae){s=ae,!0===n.isPresenting&&console.warn("THREE.WebXRManager: Cannot change framebuffer scale while presenting.")},this.setReferenceSpaceType=function(ae){a=ae,!0===n.isPresenting&&console.warn("THREE.WebXRManager: Cannot change reference space type while presenting.")},this.getReferenceSpace=function(){return c||o},this.setReferenceSpace=function(ae){c=ae},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 ae=tt(function*(Oe){if(r=Oe,null!==r){if(y=t.getRenderTarget(),r.addEventListener("select",ne),r.addEventListener("selectstart",ne),r.addEventListener("selectend",ne),r.addEventListener("squeeze",ne),r.addEventListener("squeezestart",ne),r.addEventListener("squeezeend",ne),r.addEventListener("end",se),r.addEventListener("inputsourceschange",ge),!0!==v.xrCompatible&&(yield e.makeXRCompatible()),D=t.getPixelRatio(),t.getSize(F),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 Mu(m.framebufferWidth,m.framebufferHeight,{format:Ro,type:Jc,colorSpace:t.outputColorSpace,stencilBuffer:v.stencil});else{let Ze=null,Fe=null,bt=null;v.depth&&(bt=v.stencil?e.DEPTH24_STENCIL8:e.DEPTH_COMPONENT24,Ze=v.stencil?ng:tg,Fe=v.stencil?eg:xu);const St={colorFormat:e.RGBA8,depthFormat:bt,scaleFactor:s};h=new XRWebGLBinding(r,e),p=h.createProjectionLayer(St),r.updateRenderState({layers:[p]}),t.setPixelRatio(1),t.setSize(p.textureWidth,p.textureHeight,!1),M=new Mu(p.textureWidth,p.textureHeight,{format:Ro,type:Jc,depthTexture:new d5(p.textureWidth,p.textureHeight,Fe,void 0,void 0,void 0,void 0,void 0,void 0,Ze),stencilBuffer:v.stencil,colorSpace:t.outputColorSpace,samples:v.antialias?4:0,resolveDepthBuffer:!1===p.ignoreDepthValues})}M.isXRRenderTarget=!0,this.setFoveation(l),c=null,o=yield r.requestReferenceSpace(a),en.setContext(r),en.start(),n.isPresenting=!0,n.dispatchEvent({type:"sessionstart"})}});return function(Oe){return ae.apply(this,arguments)}}(),this.getEnvironmentBlendMode=function(){if(null!==r)return r.environmentBlendMode},this.getDepthTexture=function(){return b.getDepthTexture()};const q=new O,re=new O;function we(ae,Oe){null===Oe?ae.matrixWorld.copy(ae.matrix):ae.matrixWorld.multiplyMatrices(Oe.matrixWorld,ae.matrix),ae.matrixWorldInverse.copy(ae.matrixWorld).invert()}this.updateCamera=function(ae){if(null===r)return;null!==b.texture&&(ae.near=b.depthNear,ae.far=b.depthFar),A.near=B.near=k.near=ae.near,A.far=B.far=k.far=ae.far,($!==A.near||ie!==A.far)&&(r.updateRenderState({depthNear:A.near,depthFar:A.far}),$=A.near,ie=A.far,k.near=$,k.far=ie,B.near=$,B.far=ie,k.updateProjectionMatrix(),B.updateProjectionMatrix(),ae.updateProjectionMatrix());const Oe=ae.parent,Ze=A.cameras;we(A,Oe);for(let Fe=0;Fe0&&(v.alphaTest.value=y.alphaTest);const M=t.get(y),x=M.envMap,C=M.envMapRotation;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(Eue.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,v.lightMapIntensity.value=y.lightMapIntensity,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,Z4(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 d(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===Io&&v.clearcoatNormalScale.value.negate())),y.dispersion>0&&(v.dispersion.value=y.dispersion),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 Due(i,t,e,n){let r={},s={},o=[];const a=i.getParameter(i.MAX_UNIFORM_BUFFER_BINDINGS);function m(M,x,C,F){const D=M.value,k=x+"_"+C;if(void 0===F[k])return F[k]="number"==typeof D||"boolean"==typeof D?D:D.clone(),!0;{const B=F[k];if("number"==typeof D||"boolean"==typeof D){if(B!==D)return F[k]=D,!0}else if(!1===B.equals(D))return B.copy(D),!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 k=0,B=x.length;k0&&(C+=16-D),M.__size=C,M.__cache={}}(M),C=function d(M){const x=function h(){for(let M=0;M0),Xt=!!le.morphAttributes.position,ai=!!le.morphAttributes.normal,Li=!!le.morphAttributes.color;let nr=bu;de.toneMapped&&(null===k||!0===k.isXRRenderTarget)&&(nr=x.toneMapping);const oa=le.morphAttributes.position||le.morphAttributes.normal||le.morphAttributes.color,hi=void 0!==oa?oa.length:0,Rt=it.get(de),fs=v.state.lights;!0!==ae||!0!==Oe&&L===T||bn.setState(de,L,L===T&&de.id===B);let fi=!1;de.version===Rt.__version?(Rt.needsLights&&Rt.lightsStateVersion!==fs.state.version||Rt.outputColorSpace!==xt||te.isBatchedMesh&&!1===Rt.batching||!te.isBatchedMesh&&!0===Rt.batching||te.isBatchedMesh&&!0===Rt.batchingColor&&null===te.colorTexture||te.isBatchedMesh&&!1===Rt.batchingColor&&null!==te.colorTexture||te.isInstancedMesh&&!1===Rt.instancing||!te.isInstancedMesh&&!0===Rt.instancing||te.isSkinnedMesh&&!1===Rt.skinning||!te.isSkinnedMesh&&!0===Rt.skinning||te.isInstancedMesh&&!0===Rt.instancingColor&&null===te.instanceColor||te.isInstancedMesh&&!1===Rt.instancingColor&&null!==te.instanceColor||te.isInstancedMesh&&!0===Rt.instancingMorph&&null===te.morphTexture||te.isInstancedMesh&&!1===Rt.instancingMorph&&null!==te.morphTexture||Rt.envMap!==wt||!0===de.fog&&Rt.fog!==je||void 0!==Rt.numClippingPlanes&&(Rt.numClippingPlanes!==bn.numPlanes||Rt.numIntersection!==bn.numIntersection)||Rt.vertexAlphas!==qt||Rt.vertexTangents!==on||Rt.morphTargets!==Xt||Rt.morphNormals!==ai||Rt.morphColors!==Li||Rt.toneMapping!==nr||Rt.morphTargetsCount!==hi)&&(fi=!0):(fi=!0,Rt.__version=de.version);let El=Rt.currentProgram;!0===fi&&(El=xE(de,K,te));let qg=!1,aa=!1,qO=!1;const xr=El.getUniforms(),Uu=Rt.uniforms;if(Me.useProgram(El.program)&&(qg=!0,aa=!0,qO=!0),de.id!==B&&(B=de.id,aa=!0),qg||T!==L){xr.setValue(N,"projectionMatrix",L.projectionMatrix),xr.setValue(N,"viewMatrix",L.matrixWorldInverse);const za=xr.map.cameraPosition;void 0!==za&&za.setValue(N,Fe.setFromMatrixPosition(L.matrixWorld)),nt.logarithmicDepthBuffer&&xr.setValue(N,"logDepthBufFC",2/(Math.log(L.far+1)/Math.LN2)),(de.isMeshPhongMaterial||de.isMeshToonMaterial||de.isMeshLambertMaterial||de.isMeshBasicMaterial||de.isMeshStandardMaterial||de.isShaderMaterial)&&xr.setValue(N,"isOrthographic",!0===L.isOrthographicCamera),T!==L&&(T=L,aa=!0,qO=!0)}if(te.isSkinnedMesh){xr.setOptional(N,te,"bindMatrix"),xr.setOptional(N,te,"bindMatrixInverse");const za=te.skeleton;za&&(null===za.boneTexture&&za.computeBoneTexture(),xr.setValue(N,"boneTexture",za.boneTexture,pt))}te.isBatchedMesh&&(xr.setOptional(N,te,"batchingTexture"),xr.setValue(N,"batchingTexture",te._matricesTexture,pt),xr.setOptional(N,te,"batchingIdTexture"),xr.setValue(N,"batchingIdTexture",te._indirectTexture,pt),xr.setOptional(N,te,"batchingColorTexture"),null!==te._colorsTexture&&xr.setValue(N,"batchingColorTexture",te._colorsTexture,pt));const XO=le.morphAttributes;if((void 0!==XO.position||void 0!==XO.normal||void 0!==XO.color)&&jn.update(te,le,El),(aa||Rt.receiveShadow!==te.receiveShadow)&&(Rt.receiveShadow=te.receiveShadow,xr.setValue(N,"receiveShadow",te.receiveShadow)),de.isMeshGouraudMaterial&&null!==de.envMap&&(Uu.envMap.value=wt,Uu.flipEnvMap.value=wt.isCubeTexture&&!1===wt.isRenderTargetTexture?-1:1),de.isMeshStandardMaterial&&null===de.envMap&&null!==K.environment&&(Uu.envMapIntensity.value=K.environmentIntensity),aa&&(xr.setValue(N,"toneMappingExposure",x.toneMappingExposure),Rt.needsLights&&function Pve(L,K){L.ambientLightColor.needsUpdate=K,L.lightProbe.needsUpdate=K,L.directionalLights.needsUpdate=K,L.directionalLightShadows.needsUpdate=K,L.pointLights.needsUpdate=K,L.pointLightShadows.needsUpdate=K,L.spotLights.needsUpdate=K,L.spotLightShadows.needsUpdate=K,L.rectAreaLights.needsUpdate=K,L.hemisphereLights.needsUpdate=K}(Uu,qO),je&&!0===de.fog&&Bt.refreshFogUniforms(Uu,je),Bt.refreshMaterialUniforms(Uu,de,re,q,v.state.transmissionRenderTarget[L.id]),uS.upload(N,_8(Rt),Uu,pt)),de.isShaderMaterial&&!0===de.uniformsNeedUpdate&&(uS.upload(N,_8(Rt),Uu,pt),de.uniformsNeedUpdate=!1),de.isSpriteMaterial&&xr.setValue(N,"center",te.center),xr.setValue(N,"modelViewMatrix",te.modelViewMatrix),xr.setValue(N,"normalMatrix",te.normalMatrix),xr.setValue(N,"modelMatrix",te.matrixWorld),de.isShaderMaterial||de.isRawShaderMaterial){const za=de.uniformsGroups;for(let KO=0,Fve=za.length;KO{function je(){de.forEach(function(st){it.get(st).currentProgram.isReady()&&de.delete(st)}),0!==de.size?setTimeout(je,10):te(L)}null!==Le.get("KHR_parallel_shader_compile")?je():setTimeout(je,10)})};let ui=null;function fc(){kf.stop()}function f8(){kf.start()}const kf=new t5;function YO(L,K,le,de){if(!1===L.visible)return;if(L.layers.test(K.layers))if(L.isGroup)le=L.renderOrder;else if(L.isLOD)!0===L.autoUpdate&&L.update(K);else if(L.isLight)v.pushLight(L),L.castShadow&&v.pushShadow(L);else if(L.isSprite){if(!L.frustumCulled||en.intersectsSprite(L)){de&&bt.setFromMatrixPosition(L.matrixWorld).applyMatrix4(Ze);const st=Te.update(L),xt=L.material;xt.visible&&b.push(L,st,xt,le,bt.z,null)}}else if((L.isMesh||L.isLine||L.isPoints)&&(!L.frustumCulled||en.intersectsObject(L))){const st=Te.update(L),xt=L.material;if(de&&(void 0!==L.boundingSphere?(null===L.boundingSphere&&L.computeBoundingSphere(),bt.copy(L.boundingSphere.center)):(null===st.boundingSphere&&st.computeBoundingSphere(),bt.copy(st.boundingSphere.center)),bt.applyMatrix4(L.matrixWorld).applyMatrix4(Ze)),Array.isArray(xt)){const wt=st.groups;for(let qt=0,on=wt.length;qt0&&bE(te,K,le),je.length>0&&bE(je,K,le),st.length>0&&bE(st,K,le),Me.buffers.depth.setTest(!0),Me.buffers.depth.setMask(!0),Me.buffers.color.setMask(!0),Me.setPolygonOffset(!1)}function m8(L,K,le,de){if(null!==(!0===le.isScene?le.overrideMaterial:null))return;void 0===v.state.transmissionRenderTarget[de.id]&&(v.state.transmissionRenderTarget[de.id]=new Mu(1,1,{generateMipmaps:!0,type:Le.has("EXT_color_buffer_half_float")||Le.has("EXT_color_buffer_float")?Jm:Jc,minFilter:bl,samples:4,stencilBuffer:s,resolveDepthBuffer:!1,resolveStencilBuffer:!1,colorSpace:Jn.workingColorSpace}));const je=v.state.transmissionRenderTarget[de.id],st=de.viewport||A;je.setSize(st.z,st.w);const xt=x.getRenderTarget();x.setRenderTarget(je),x.getClearColor(ne),se=x.getClearAlpha(),se<1&&x.setClearColor(16777215,.5),x.clear(),Mt&&dt.render(le);const wt=x.toneMapping;x.toneMapping=bu;const qt=de.viewport;if(void 0!==de.viewport&&(de.viewport=void 0),v.setupLightsView(de),!0===ae&&bn.setGlobalState(x.clippingPlanes,de),bE(L,le,de),pt.updateMultisampleRenderTarget(je),pt.updateRenderTargetMipmap(je),!1===Le.has("WEBGL_multisampled_render_to_texture")){let on=!1;for(let Xt=0,ai=K.length;Xt0)for(let st=0,xt=je.length;st0&&m8(de,te,L,K),Mt&&dt.render(L),p8(b,L,K);null!==k&&(pt.updateMultisampleRenderTarget(k),pt.updateRenderTargetMipmap(k)),!0===L.isScene&&L.onAfterRender(x,L,K),Pn.resetDefaultState(),B=-1,T=null,M.pop(),M.length>0?(v=M[M.length-1],!0===ae&&bn.setGlobalState(x.clippingPlanes,v.state.camera)):v=null,y.pop(),b=y.length>0?y[y.length-1]:null},this.getActiveCubeFace=function(){return F},this.getActiveMipmapLevel=function(){return D},this.getRenderTarget=function(){return k},this.setRenderTargetTextures=function(L,K,le){it.get(L.texture).__webglTexture=K,it.get(L.depthTexture).__webglTexture=le;const de=it.get(L);de.__hasExternalTextures=!0,de.__autoAllocateDepthBuffer=void 0===le,de.__autoAllocateDepthBuffer||!0===Le.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(L,K){const le=it.get(L);le.__webglFramebuffer=K,le.__useDefaultFramebuffer=void 0===K},this.setRenderTarget=function(L,K=0,le=0){k=L,F=K,D=le;let de=!0,te=null,je=!1,st=!1;if(L){const wt=it.get(L);void 0!==wt.__useDefaultFramebuffer?(Me.bindFramebuffer(N.FRAMEBUFFER,null),de=!1):void 0===wt.__webglFramebuffer?pt.setupRenderTarget(L):wt.__hasExternalTextures&&pt.rebindTextures(L,it.get(L.texture).__webglTexture,it.get(L.depthTexture).__webglTexture);const qt=L.texture;(qt.isData3DTexture||qt.isDataArrayTexture||qt.isCompressedArrayTexture)&&(st=!0);const on=it.get(L).__webglFramebuffer;L.isWebGLCubeRenderTarget?(te=Array.isArray(on[K])?on[K][le]:on[K],je=!0):te=L.samples>0&&!1===pt.useMultisampledRTT(L)?it.get(L).__webglMultisampledFramebuffer:Array.isArray(on)?on[le]:on,A.copy(L.viewport),$.copy(L.scissor),ie=L.scissorTest}else A.copy(Ne).multiplyScalar(re).floor(),$.copy(Ye).multiplyScalar(re).floor(),ie=It;if(Me.bindFramebuffer(N.FRAMEBUFFER,te)&&de&&Me.drawBuffers(L,te),Me.viewport(A),Me.scissor($),Me.setScissorTest(ie),je){const wt=it.get(L.texture);N.framebufferTexture2D(N.FRAMEBUFFER,N.COLOR_ATTACHMENT0,N.TEXTURE_CUBE_MAP_POSITIVE_X+K,wt.__webglTexture,le)}else if(st){const wt=it.get(L.texture);N.framebufferTextureLayer(N.FRAMEBUFFER,N.COLOR_ATTACHMENT0,wt.__webglTexture,le||0,K||0)}B=-1},this.readRenderTargetPixels=function(L,K,le,de,te,je,st){if(!L||!L.isWebGLRenderTarget)return void console.error("THREE.WebGLRenderer.readRenderTargetPixels: renderTarget is not THREE.WebGLRenderTarget.");let xt=it.get(L).__webglFramebuffer;if(L.isWebGLCubeRenderTarget&&void 0!==st&&(xt=xt[st]),xt){Me.bindFramebuffer(N.FRAMEBUFFER,xt);try{const wt=L.texture,qt=wt.format,on=wt.type;if(!nt.textureFormatReadable(qt))return void console.error("THREE.WebGLRenderer.readRenderTargetPixels: renderTarget is not in RGBA or implementation defined format.");if(!nt.textureTypeReadable(on))return void console.error("THREE.WebGLRenderer.readRenderTargetPixels: renderTarget is not in UnsignedByteType or implementation defined type.");K>=0&&K<=L.width-de&&le>=0&&le<=L.height-te&&N.readPixels(K,le,de,te,vn.convert(qt),vn.convert(on),je)}finally{const wt=null!==k?it.get(k).__webglFramebuffer:null;Me.bindFramebuffer(N.FRAMEBUFFER,wt)}}},this.readRenderTargetPixelsAsync=function(){var L=tt(function*(K,le,de,te,je,st,xt){if(!K||!K.isWebGLRenderTarget)throw new Error("THREE.WebGLRenderer.readRenderTargetPixels: renderTarget is not THREE.WebGLRenderTarget.");let wt=it.get(K).__webglFramebuffer;if(K.isWebGLCubeRenderTarget&&void 0!==xt&&(wt=wt[xt]),wt){Me.bindFramebuffer(N.FRAMEBUFFER,wt);try{const qt=K.texture,on=qt.format,Xt=qt.type;if(!nt.textureFormatReadable(on))throw new Error("THREE.WebGLRenderer.readRenderTargetPixelsAsync: renderTarget is not in RGBA or implementation defined format.");if(!nt.textureTypeReadable(Xt))throw new Error("THREE.WebGLRenderer.readRenderTargetPixelsAsync: renderTarget is not in UnsignedByteType or implementation defined type.");if(le>=0&&le<=K.width-te&&de>=0&&de<=K.height-je){const ai=N.createBuffer();N.bindBuffer(N.PIXEL_PACK_BUFFER,ai),N.bufferData(N.PIXEL_PACK_BUFFER,st.byteLength,N.STREAM_READ),N.readPixels(le,de,te,je,vn.convert(on),vn.convert(Xt),0),N.flush();const Li=N.fenceSync(N.SYNC_GPU_COMMANDS_COMPLETE,0);yield function eae(i,t,e){return new Promise(function(n,r){setTimeout(function s(){switch(i.clientWaitSync(t,i.SYNC_FLUSH_COMMANDS_BIT,0)){case i.WAIT_FAILED:r();break;case i.TIMEOUT_EXPIRED:setTimeout(s,e);break;default:n()}},e)})}(N,Li,4);try{N.bindBuffer(N.PIXEL_PACK_BUFFER,ai),N.getBufferSubData(N.PIXEL_PACK_BUFFER,0,st)}finally{N.deleteBuffer(ai),N.deleteSync(Li)}return st}}finally{const qt=null!==k?it.get(k).__webglFramebuffer:null;Me.bindFramebuffer(N.FRAMEBUFFER,qt)}}});return function(K,le,de,te,je,st,xt){return L.apply(this,arguments)}}(),this.copyFramebufferToTexture=function(L,K=null,le=0){!0!==L.isTexture&&(cg("WebGLRenderer: copyFramebufferToTexture function signature has changed."),K=arguments[0]||null,L=arguments[1]);const de=Math.pow(2,-le),te=Math.floor(L.image.width*de),je=Math.floor(L.image.height*de),st=null!==K?K.x:0,xt=null!==K?K.y:0;pt.setTexture2D(L,0),N.copyTexSubImage2D(N.TEXTURE_2D,le,0,0,st,xt,te,je),Me.unbindTexture()},this.copyTextureToTexture=function(L,K,le=null,de=null,te=0){let je,st,xt,wt,qt,on;!0!==L.isTexture&&(cg("WebGLRenderer: copyTextureToTexture function signature has changed."),de=arguments[0]||null,L=arguments[1],K=arguments[2],te=arguments[3]||0,le=null),null!==le?(je=le.max.x-le.min.x,st=le.max.y-le.min.y,xt=le.min.x,wt=le.min.y):(je=L.image.width,st=L.image.height,xt=0,wt=0),null!==de?(qt=de.x,on=de.y):(qt=0,on=0);const Xt=vn.convert(K.format),ai=vn.convert(K.type);pt.setTexture2D(K,0),N.pixelStorei(N.UNPACK_FLIP_Y_WEBGL,K.flipY),N.pixelStorei(N.UNPACK_PREMULTIPLY_ALPHA_WEBGL,K.premultiplyAlpha),N.pixelStorei(N.UNPACK_ALIGNMENT,K.unpackAlignment);const Li=N.getParameter(N.UNPACK_ROW_LENGTH),nr=N.getParameter(N.UNPACK_IMAGE_HEIGHT),oa=N.getParameter(N.UNPACK_SKIP_PIXELS),hi=N.getParameter(N.UNPACK_SKIP_ROWS),Rt=N.getParameter(N.UNPACK_SKIP_IMAGES),fs=L.isCompressedTexture?L.mipmaps[te]:L.image;N.pixelStorei(N.UNPACK_ROW_LENGTH,fs.width),N.pixelStorei(N.UNPACK_IMAGE_HEIGHT,fs.height),N.pixelStorei(N.UNPACK_SKIP_PIXELS,xt),N.pixelStorei(N.UNPACK_SKIP_ROWS,wt),L.isDataTexture?N.texSubImage2D(N.TEXTURE_2D,te,qt,on,je,st,Xt,ai,fs.data):L.isCompressedTexture?N.compressedTexSubImage2D(N.TEXTURE_2D,te,qt,on,fs.width,fs.height,Xt,fs.data):N.texSubImage2D(N.TEXTURE_2D,te,qt,on,je,st,Xt,ai,fs),N.pixelStorei(N.UNPACK_ROW_LENGTH,Li),N.pixelStorei(N.UNPACK_IMAGE_HEIGHT,nr),N.pixelStorei(N.UNPACK_SKIP_PIXELS,oa),N.pixelStorei(N.UNPACK_SKIP_ROWS,hi),N.pixelStorei(N.UNPACK_SKIP_IMAGES,Rt),0===te&&K.generateMipmaps&&N.generateMipmap(N.TEXTURE_2D),Me.unbindTexture()},this.copyTextureToTexture3D=function(L,K,le=null,de=null,te=0){let je,st,xt,wt,qt,on,Xt,ai,Li;!0!==L.isTexture&&(cg("WebGLRenderer: copyTextureToTexture3D function signature has changed."),le=arguments[0]||null,de=arguments[1]||null,L=arguments[2],K=arguments[3],te=arguments[4]||0);const nr=L.isCompressedTexture?L.mipmaps[te]:L.image;null!==le?(je=le.max.x-le.min.x,st=le.max.y-le.min.y,xt=le.max.z-le.min.z,wt=le.min.x,qt=le.min.y,on=le.min.z):(je=nr.width,st=nr.height,xt=nr.depth,wt=0,qt=0,on=0),null!==de?(Xt=de.x,ai=de.y,Li=de.z):(Xt=0,ai=0,Li=0);const oa=vn.convert(K.format),hi=vn.convert(K.type);let Rt;if(K.isData3DTexture)pt.setTexture3D(K,0),Rt=N.TEXTURE_3D;else{if(!K.isDataArrayTexture&&!K.isCompressedArrayTexture)return void console.warn("THREE.WebGLRenderer.copyTextureToTexture3D: only supports THREE.DataTexture3D and THREE.DataTexture2DArray.");pt.setTexture2DArray(K,0),Rt=N.TEXTURE_2D_ARRAY}N.pixelStorei(N.UNPACK_FLIP_Y_WEBGL,K.flipY),N.pixelStorei(N.UNPACK_PREMULTIPLY_ALPHA_WEBGL,K.premultiplyAlpha),N.pixelStorei(N.UNPACK_ALIGNMENT,K.unpackAlignment);const fs=N.getParameter(N.UNPACK_ROW_LENGTH),fi=N.getParameter(N.UNPACK_IMAGE_HEIGHT),El=N.getParameter(N.UNPACK_SKIP_PIXELS),qg=N.getParameter(N.UNPACK_SKIP_ROWS),aa=N.getParameter(N.UNPACK_SKIP_IMAGES);N.pixelStorei(N.UNPACK_ROW_LENGTH,nr.width),N.pixelStorei(N.UNPACK_IMAGE_HEIGHT,nr.height),N.pixelStorei(N.UNPACK_SKIP_PIXELS,wt),N.pixelStorei(N.UNPACK_SKIP_ROWS,qt),N.pixelStorei(N.UNPACK_SKIP_IMAGES,on),L.isDataTexture||L.isData3DTexture?N.texSubImage3D(Rt,te,Xt,ai,Li,je,st,xt,oa,hi,nr.data):K.isCompressedArrayTexture?N.compressedTexSubImage3D(Rt,te,Xt,ai,Li,je,st,xt,oa,nr.data):N.texSubImage3D(Rt,te,Xt,ai,Li,je,st,xt,oa,hi,nr),N.pixelStorei(N.UNPACK_ROW_LENGTH,fs),N.pixelStorei(N.UNPACK_IMAGE_HEIGHT,fi),N.pixelStorei(N.UNPACK_SKIP_PIXELS,El),N.pixelStorei(N.UNPACK_SKIP_ROWS,qg),N.pixelStorei(N.UNPACK_SKIP_IMAGES,aa),0===te&&K.generateMipmaps&&N.generateMipmap(Rt),Me.unbindTexture()},this.initRenderTarget=function(L){void 0===it.get(L).__webglFramebuffer&&pt.setupRenderTarget(L)},this.initTexture=function(L){L.isCubeTexture?pt.setTextureCube(L,0):L.isData3DTexture?pt.setTexture3D(L,0):L.isDataArrayTexture||L.isCompressedArrayTexture?pt.setTexture2DArray(L,0):pt.setTexture2D(L,0),Me.unbindTexture()},this.resetState=function(){F=0,D=0,k=null,Me.reset(),Pn.reset()},typeof __THREE_DEVTOOLS__<"u"&&__THREE_DEVTOOLS__.dispatchEvent(new CustomEvent("observe",{detail:this}))}get coordinateSystem(){return ed}get outputColorSpace(){return this._outputColorSpace}set outputColorSpace(t){this._outputColorSpace=t;const e=this.getContext();e.drawingBufferColorSpace=t===jk?"display-p3":"srgb",e.unpackColorSpace=Jn.workingColorSpace===LC?"display-p3":"srgb"}}class kb extends Or{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 id,this.environmentIntensity=1,this.environmentRotation=new id,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 AP{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=Jo()}onUploadCallback(){}set needsUpdate(t){!0===t&&this.version++}get updateRange(){return cg("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;r0){const r=e[n[0]];if(void 0!==r){this.morphTargetInfluences=[],this.morphTargetDictionary={};for(let s=0,o=r.length;sn)return;FP.applyMatrix4(i.matrixWorld);const l=t.ray.origin.distanceTo(FP);return lt.far?void 0:{distance:l,point:Z5.clone().applyMatrix4(i.matrixWorld),index:r,face:null,faceIndex:null,object:i}}const Q5=new O,J5=new O;class Ng extends pf{constructor(t,e){super(t,e),this.isLineSegments=!0,this.type="LineSegments"}computeLineDistances(){const t=this.geometry;if(null===t.index){const e=t.attributes.position,n=[];for(let r=0,s=e.count;r0){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 dc{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 d=n[r];return(r+(o-d)/(n[r+1]-d))/(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 xe:new O);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 O,r=[],s=[],o=[],a=new O,l=new Nt;for(let m=0;m<=t;m++)r[m]=this.getTangentAt(m/t,new O);s[0]=new O,o[0]=new O;let c=Number.MAX_VALUE;const d=Math.abs(r[0].x),h=Math.abs(r[0].y),p=Math.abs(r[0].z);d<=c&&(c=d,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(er(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(er(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 NP extends dc{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 xe){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(iG(a,l.x,c.x,d.x,h.x),iG(a,l.y,c.y,d.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]:(DS.subVectors(r[0],r[1]).add(r[0]),c=DS);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 d=c.getPoint(1);return this.currentPoint.copy(d),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 RS extends hn{constructor(t=[new xe(0,-.5),new xe(.5,0),new xe(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=er(r,0,2*Math.PI);const s=[],o=[],a=[],l=[],c=[],d=1/e,h=new O,p=new xe,m=new O,g=new O,b=new O;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*d*r,C=Math.sin(x),F=Math.cos(x);for(let D=0;D<=t.length-1;D++)h.x=t[D].x*C,h.y=t[D].y,h.z=t[D].x*F,o.push(h.x,h.y,h.z),p.x=M/e,p.y=D/(t.length-1),a.push(p.x,p.y),c.push(l[3*D+0]*C,l[3*D+1],l[3*D+0]*F)}for(let M=0;M0&&x(!0),e>0&&x(!1)),this.setIndex(d),this.setAttribute("position",new ct(h,3)),this.setAttribute("normal",new ct(p,3)),this.setAttribute("uv",new ct(m,2))}copy(t){return super.copy(t),this.parameters=Object.assign({},t.parameters),this}static fromJSON(t){return new Bg(t.radiusTop,t.radiusBottom,t.height,t.radialSegments,t.heightSegments,t.openEnded,t.thetaStart,t.thetaLength)}}class PS extends Bg{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 PS(t.radius,t.height,t.radialSegments,t.heightSegments,t.openEnded,t.thetaStart,t.thetaLength)}}class jb 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 d=[],h=new O,p=new O,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 F=0;F<=e;F++){const D=F/e;h.x=-t*Math.cos(r+D*s)*Math.sin(o+x*a),h.y=t*Math.cos(o+x*a),h.z=t*Math.sin(r+D*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(D+C,1-x),M.push(c++)}d.push(M)}for(let y=0;y0)&&m.push(d[y][M+1],C,D),(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 dispersion(){return this._dispersion}set dispersion(t){this._dispersion>0!=t>0&&this.version++,this._dispersion=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.dispersion=t.dispersion,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 zS extends Po{constructor(t){super(),this.isMeshPhongMaterial=!0,this.type="MeshPhongMaterial",this.color=new qe(16777215),this.specular=new qe(1118481),this.shininess=30,this.map=null,this.lightMap=null,this.lightMapIntensity=1,this.aoMap=null,this.aoMapIntensity=1,this.emissive=new qe(0),this.emissiveIntensity=1,this.emissiveMap=null,this.bumpMap=null,this.bumpScale=1,this.normalMap=null,this.normalMapType=Qh,this.normalScale=new xe(1,1),this.displacementMap=null,this.displacementScale=1,this.displacementBias=0,this.specularMap=null,this.alphaMap=null,this.envMap=null,this.envMapRotation=new id,this.combine=EC,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 vf(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 vG(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 tO(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 nO(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 qb{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 _G(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}}uc.prototype.TimeBufferType=Float32Array,uc.prototype.ValueBufferType=Float32Array,uc.prototype.DefaultInterpolation=bb;class zg extends uc{constructor(t,e,n){super(t,e,n)}}zg.prototype.ValueTypeName="bool",zg.prototype.ValueBufferType=Array,zg.prototype.DefaultInterpolation=yb,zg.prototype.InterpolantFactoryMethodLinear=void 0,zg.prototype.InterpolantFactoryMethodSmooth=void 0;class bG extends uc{}bG.prototype.ValueTypeName="color";class Hg extends uc{}Hg.prototype.ValueTypeName="number";class Fhe extends qb{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 d=c+a;c!==d;c+=4)co.slerpFlat(s,0,o,c-a,o,c,l);return s}}class Gg extends uc{InterpolantFactoryMethodLinear(t){return new Fhe(this.times,this.values,this.getValueSize(),t)}}Gg.prototype.ValueTypeName="quaternion",Gg.prototype.InterpolantFactoryMethodSmooth=void 0;class $g extends uc{constructor(t,e,n){super(t,e,n)}}$g.prototype.ValueTypeName="string",$g.prototype.ValueBufferType=Array,$g.prototype.DefaultInterpolation=yb,$g.prototype.InterpolantFactoryMethodLinear=void 0,$g.prototype.InterpolantFactoryMethodSmooth=void 0;class Wg extends uc{}Wg.prototype.ValueTypeName="vector";class Xb{constructor(t="",e=-1,n=[],r=2500){this.name=t,this.tracks=n,this.duration=e,this.blendMode=r,this.uuid=Jo(),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(Nhe(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(uc.toJSON(n[s]));return r}static CreateFromMorphTargetSequence(t,e,n,r){const s=e.length,o=[];for(let a=0;a1){const h=d[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=[];nO(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:wG,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 dd={};class Bhe extends Error{constructor(t,e){super(t),this.response=e}}class La extends yf{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=ku.get(t);if(void 0!==s)return this.manager.itemStart(t),setTimeout(()=>{e&&e(s),this.manager.itemEnd(t)},0),s;if(void 0!==dd[t])return void dd[t].push({onLoad:e,onProgress:n,onError:r});dd[t]=[],dd[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 d=dd[t],h=c.body.getReader(),p=c.headers.get("X-File-Size")||c.headers.get("Content-Length"),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 F=new ProgressEvent("progress",{lengthComputable:g,loaded:b,total:m});for(let D=0,k=d.length;D{y.error(x)})}()}});return new Response(v)}throw new Bhe(`fetch for "${c.url}" responded with ${c.status}: ${c.statusText}`,c)}).then(c=>{switch(l){case"arraybuffer":return c.arrayBuffer();case"blob":return c.blob();case"document":return c.text().then(d=>(new DOMParser).parseFromString(d,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=>{ku.add(t,c);const d=dd[t];delete dd[t];for(let h=0,p=d.length;h{const d=dd[t];if(void 0===d)throw this.manager.itemError(t),c;delete dd[t];for(let h=0,p=d.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 HS extends yf{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=ku.get(t);if(void 0!==o)return s.manager.itemStart(t),setTimeout(function(){e&&e(o),s.manager.itemEnd(t)},0),o;const a=wb("img");function l(){d(),ku.add(t,this),e&&e(this),s.manager.itemEnd(t)}function c(h){d(),r&&r(h),s.manager.itemError(t),s.manager.itemEnd(t)}function d(){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 Pu extends yf{constructor(t){super(t)}load(t,e,n,r){const s=new ko,o=new HS(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 GS extends Or{constructor(t,e=1){super(),this.isLight=!0,this.type="Light",this.color=new qe(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()),void 0!==this.target&&(e.object.target=this.target.uuid),e}}const iO=new Nt,MG=new O,CG=new O;class rO{constructor(t){this.camera=t,this.intensity=1,this.bias=0,this.normalBias=0,this.radius=1,this.blurSamples=8,this.mapSize=new xe(512,512),this.map=null,this.mapPass=null,this.matrix=new Nt,this.autoUpdate=!0,this.needsUpdate=!1,this._frustum=new aS,this._frameExtents=new xe(1,1),this._viewportCount=1,this._viewports=[new gi(0,0,1,1)]}getViewportCount(){return this._viewportCount}getFrustum(){return this._frustum}updateMatrices(t){const e=this.camera,n=this.matrix;MG.setFromMatrixPosition(t.matrixWorld),e.position.copy(MG),CG.setFromMatrixPosition(t.target.matrixWorld),e.lookAt(CG),e.updateMatrixWorld(),iO.multiplyMatrices(e.projectionMatrix,e.matrixWorldInverse),this._frustum.setFromProjectionMatrix(iO),n.set(.5,0,0,.5,0,.5,0,.5,0,0,.5,.5,0,0,0,1),n.multiply(iO)}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.intensity=t.intensity,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 1!==this.intensity&&(t.intensity=this.intensity),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 Vhe extends rO{constructor(){super(new yr(50,1,.5,500)),this.isSpotLightShadow=!0,this.focus=1}updateMatrices(t){const e=this.camera,n=2*ag*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 SG extends GS{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(Or.DEFAULT_UP),this.updateMatrix(),this.target=new Or,this.distance=n,this.angle=r,this.penumbra=s,this.decay=o,this.map=null,this.shadow=new Vhe}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 EG=new Nt,Kb=new O,sO=new O;class zhe extends rO{constructor(){super(new yr(90,1,.5,500)),this.isPointLightShadow=!0,this._frameExtents=new xe(4,2),this._viewportCount=6,this._viewports=[new gi(2,1,1,1),new gi(0,1,1,1),new gi(3,1,1,1),new gi(1,1,1,1),new gi(3,0,1,1),new gi(1,0,1,1)],this._cubeDirections=[new O(1,0,0),new O(-1,0,0),new O(0,0,1),new O(0,0,-1),new O(0,1,0),new O(0,-1,0)],this._cubeUps=[new O(0,1,0),new O(0,1,0),new O(0,1,0),new O(0,1,0),new O(0,0,1),new O(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()),Kb.setFromMatrixPosition(t.matrixWorld),n.position.copy(Kb),sO.copy(n.position),sO.add(this._cubeDirections[e]),n.up.copy(this._cubeUps[e]),n.lookAt(sO),n.updateMatrixWorld(),r.makeTranslation(-Kb.x,-Kb.y,-Kb.z),EG.multiplyMatrices(n.projectionMatrix,n.matrixWorldInverse),this._frustum.setFromProjectionMatrix(EG)}}class AG extends GS{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 zhe}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 Hhe extends rO{constructor(){super(new Ib(-5,5,5,-5,.5,500)),this.isDirectionalLightShadow=!0}}class DG extends GS{constructor(t,e){super(t,e),this.isDirectionalLight=!0,this.type="DirectionalLight",this.position.copy(Or.DEFAULT_UP),this.updateMatrix(),this.target=new Or,this.shadow=new Hhe}dispose(){this.shadow.dispose()}copy(t){return super.copy(t),this.target=t.target.clone(),this.shadow=t.shadow.clone(),this}}class $S extends GS{constructor(t,e){super(t,e),this.isAmbientLight=!0,this.type="AmbientLight"}}class Ou{static decodeText(t){if(console.warn("THREE.LoaderUtils: decodeText() has been deprecated with r165 and will be removed with r175. Use TextDecoder instead."),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=ku.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 ku.add(t,c),e&&e(c),s.manager.itemEnd(t),c}).catch(function(c){r&&r(c),ku.remove(t),s.manager.itemError(t),s.manager.itemEnd(t)});ku.add(t,l),s.manager.itemStart(t)}}class OG{constructor(t=!0){this.autoStart=t,this.startTime=0,this.oldTime=0,this.elapsedTime=0,this.running=!1}start(){this.startTime=FG(),this.oldTime=this.startTime,this.elapsedTime=0,this.running=!0}stop(){this.getElapsedTime(),this.running=!1,this.autoStart=!1}getElapsedTime(){return this.getDelta(),this.elapsedTime}getDelta(){let t=0;if(this.autoStart&&!this.running)return this.start(),0;if(this.running){const e=FG();t=(e-this.oldTime)/1e3,this.oldTime=e,this.elapsedTime+=t}return t}}function FG(){return(typeof performance>"u"?Date:performance).now()}const aO="\\[\\]\\.:\\/",Jhe=new RegExp("["+aO+"]","g"),lO="[^"+aO+"]",efe="[^"+aO.replace("\\.","")+"]",sfe=new RegExp("^"+/((?:WC+[\/:])*)/.source.replace("WC",lO)+/(WCOD+)?/.source.replace("WCOD",efe)+/(?:\.(WC+)(?:\[(.+)\])?)?/.source.replace("WC",lO)+/\.(WC+)(?:\[(.+)\])?/.source.replace("WC",lO)+"$"),ofe=["material","materials","bones","map"];class afe{constructor(t,e,n){const r=n||Ri.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 Ri=(()=>{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(Jhe,"")}static parseTrackName(e){const n=sfe.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!==ofe.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;an.name===t||n.userData.name===t);return e?(e.removeFromParent(),new na(e)):null}getBoundings(){return(new Bs).setFromObject(this.nativeMesh)}clone(){return new na(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 Mn&&this.disposeMesh(t)}),this.nativeMesh instanceof Mn&&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 hfe extends na{get supportsFov(){return this.nativeCamera instanceof yr||"PerspectiveCamera"==this.nativeCamera.type}get fov(){return this.nativeCamera.fov||NaN}set fov(t){this.supportsFov&&(this.nativeCamera.fov=t,this.nativeCamera.updateProjectionMatrix())}constructor(t){super(t),this.nativeCamera=t}}class ffe extends Ose{createMaterial(t){let e={};t.color?e={color:t.color}:t.diffuse||(e={color:super.randomColor()});let n=t.shading||"unlit";switch(n){case"unlit":return new qi(Object.assign(Object.assign({},e),{map:t.diffuse||null}));case"standart":return new Yb(Object.assign(Object.assign({},e),{map:t.diffuse||null}));case"phong":return new zS(Object.assign(Object.assign({},e),{map:t.diffuse||null}));case"wireframe":return new qi(Object.assign(Object.assign({},e),{wireframe:!0}));default:throw new Error(`"${n}" shading not implemented for three.js`)}}transformPrimitiveZUp(t){t.geometry.rotateX(Math.PI/2)}createPrimitive(t,e={}){var n,r,s,o;let a=null,l=this.createMaterial(e);switch(t.shape){case"PLANE":a=new Mn(new Iu((null===(n=t.dimensions)||void 0===n?void 0:n.x)||1e4,(null===(r=t.dimensions)||void 0===r?void 0:r.y)||1e4,null===(s=t.segments)||void 0===s?void 0:s.x,null===(o=t.segments)||void 0===o?void 0:o.y),l);break;case"BOX":a=new Mn(new rf(...Pe.spr(t.dimensions),...t.segments?Pe.spr(t.segments):[]),l);break;case"CAPSULE":a=new Mn(new kS(t.radius,t.centersDistance,t.capSegments,t.radialSegments),l),this.transformPrimitiveZUp(a);break;case"CYLINDER":a=new Mn(new Bg(t.radius,t.radius,t.height,t.radialSegments,t.heightSegments),l),this.transformPrimitiveZUp(a);break;case"CONE":a=new Mn(new PS(t.radius,t.height,t.radialSegments,t.heightSegments),l),this.transformPrimitiveZUp(a);break;case"SPHERE":a=new Mn(new jb(t.radius,t.widthSegments,t.heightSegments),l),this.transformPrimitiveZUp(a);break;case"COMPOUND":a=new Fo;for(const{position:d,rotation:h,shape:p}of t.children){const m=this.createPrimitive(p,e).nativeMesh;d&&m.position.set(...Pe.spr(d)),h&&m.quaternion.set(...Yi.spr(h)),a.add(m)}break;case"MESH":const c=new hn;c.setFromPoints(t.vertices.map(d=>new O(...Pe.spr(d)))),c.setIndex(t.faces.reduce((d,h)=>(d.push(...h),d),[])),a=new Mn(c,l)}if(!a)throw new Error(`Primitive with shape "${t.shape}" not implemented`);return void 0!==e.castShadow&&(a.castShadow=e.castShadow),void 0!==e.receiveShadow&&(a.receiveShadow=e.receiveShadow),new na(a)}createPerspectiveCamera(t={}){return new hfe(new yr(t.fov||75,t.aspectRatio||1,t.frustrum?t.frustrum.near:1,t.frustrum?t.frustrum.far:1e4))}}function QG(i,t){if(t===Coe)return console.warn("THREE.BufferGeometryUtils.toTrianglesDrawMode(): Geometry already defined as triangles."),i;if(t===Wk||t===C4){let e=i.getIndex();if(null===e){const o=[],a=i.getAttribute("position");if(void 0===a)return console.error("THREE.BufferGeometryUtils.toTrianglesDrawMode(): Undefined position attribute. Processing not possible."),i;for(let l=0;l=2.0 are supported.")));const c=new Yfe(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 d=0;d=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 mfe(){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 Bn={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_DISPERSION:"KHR_materials_dispersion",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 gfe{constructor(t){this.parser=t,this.name=Bn.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 Ife{constructor(t){this.parser=t,this.name=Bn.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 Rfe{constructor(t){this.parser=t,this.name=Bn.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 kfe{constructor(t){this.name=Bn.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 d=r.count,h=r.byteStride,p=new Uint8Array(a,r.byteOffset||0,r.byteLength||0);return o.decodeGltfBufferAsync?o.decodeGltfBufferAsync(d,h,p,r.mode,r.filter).then(function(m){return m.buffer}):o.ready.then(function(){const m=new ArrayBuffer(d*h);return o.decodeGltfBuffer(new Uint8Array(m),d,h,p,r.mode,r.filter),m})})}return null}}class Pfe{constructor(t){this.name=Bn.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!==Na.TRIANGLES&&c.mode!==Na.TRIANGLE_STRIP&&c.mode!==Na.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(d=>(l[c]=d,l[c])));return a.length<1?null:(a.push(this.parser.createNodeMesh(t)),Promise.all(a).then(c=>{const d=c.pop(),h=d.isGroup?d.children:[d],p=c[0].count,m=[];for(const g of h){const b=new Nt,v=new O,y=new co,M=new O(1,1,1),x=new Y5(g.geometry,g.material,p);for(let C=0;C-1,o=s?a.match(/Firefox\/([0-9]+)\./)[1]:-1}this.textureLoader=typeof createImageBitmap>"u"||n&&r<17||s&&o<98?new Pu(this.options.manager):new Xhe(this.options.manager),this.textureLoader.setCrossOrigin(this.options.crossOrigin),this.textureLoader.setRequestHeader(this.options.requestHeader),this.fileLoader=new La(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 Sf(s,a,r),ud(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,d]of o.children.entries())s(d,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(T,D[k*l+1]),l>=3&&v.setZ(T,D[k*l+2]),l>=4&&v.setW(T,D[k*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(d){d.flipY=!1,d.name=o.name||a.name||"",""===d.name&&"string"==typeof a.uri&&!1===a.uri.startsWith("data:image/")&&(d.name=a.uri);const p=(s.samplers||{})[o.sampler]||{};return d.magFilter=n$[p.magFilter]||lr,d.minFilter=n$[p.minFilter]||bl,d.wrapS=i$[p.wrapS]||Pa,d.wrapT=i$[p.wrapT]||Pa,r.associations.set(d,{textures:t}),d}).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 d=Promise.resolve(l).then(function(h){return new Promise(function(p,m){let g=p;!0===e.isImageBitmapLoader&&(g=function(b){const v=new ko(b);v.needsUpdate=!0,p(v)}),e.load(Ou.resolveURL(h,s.path),g,void 0,m)})}).then(function(h){return!0===c&&a.revokeObjectURL(l),ud(h,o),h.userData.mimeType=o.mimeType||function Wfe(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]=d,d}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[Bn.KHR_TEXTURE_TRANSFORM]){const a=void 0!==n.extensions?n.extensions[Bn.KHR_TEXTURE_TRANSFORM]:void 0;if(a){const l=s.associations.get(o);o=s.extensions[Bn.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 mf,Po.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 us,Po.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 Yb}loadMaterial(t){const e=this,r=this.extensions,s=this.json.materials[t];let o;const a={},c=[];if((s.extensions||{})[Bn.KHR_MATERIALS_UNLIT]){const h=r[Bn.KHR_MATERIALS_UNLIT];o=h.getMaterialType(),c.push(h.extendParams(a,s,e))}else{const h=s.pbrMetallicRoughness||{};if(a.color=new qe(1,1,1),a.opacity=1,Array.isArray(h.baseColorFactor)){const p=h.baseColorFactor;a.color.setRGB(p[0],p[1],p[2],ds),a.opacity=p[3]}void 0!==h.baseColorTexture&&c.push(e.assignTexture(a,"map",h.baseColorTexture,cs)),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=Ls);const d=s.alphaMode||"OPAQUE";if("BLEND"===d?(a.transparent=!0,a.depthWrite=!1):(a.transparent=!1,"MASK"===d&&(a.alphaTest=void 0!==s.alphaCutoff?s.alphaCutoff:.5)),void 0!==s.normalTexture&&o!==qi&&(c.push(e.assignTexture(a,"normalMap",s.normalTexture)),a.normalScale=new xe(1,1),void 0!==s.normalTexture.scale)){const h=s.normalTexture.scale;a.normalScale.set(h,h)}if(void 0!==s.occlusionTexture&&o!==qi&&(c.push(e.assignTexture(a,"aoMap",s.occlusionTexture)),void 0!==s.occlusionTexture.strength&&(a.aoMapIntensity=s.occlusionTexture.strength)),void 0!==s.emissiveFactor&&o!==qi){const h=s.emissiveFactor;a.emissive=(new qe).setRGB(h[0],h[1],h[2],ds)}return void 0!==s.emissiveTexture&&o!==qi&&c.push(e.assignTexture(a,"emissiveMap",s.emissiveTexture,cs)),Promise.all(c).then(function(){const h=new o(a);return s.name&&(h.name=s.name),ud(h,s),e.associations.set(h,{materials:t}),s.extensions&&Sf(r,h,s),h})}createUniqueName(t){const e=Ri.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[Bn.KHR_DRACO_MESH_COMPRESSION].decodePrimitive(a,e).then(function(l){return r$(l,a,e)})}const o=[];for(let a=0,l=t.length;a0&&Gfe(y,s),y.name=e.createUniqueName(s.name||"mesh_"+t),ud(y,s),v.extensions&&Sf(r,y,v),e.assignFinalMaterial(y),h.push(y)}for(let m=0,g=h.length;m1?new Fo:1===c.length?c[0]:new Or,d!==c[0])for(let h=0,p=c.length;h{const h=new Map;for(const[p,m]of r.associations)(p instanceof Po||p instanceof ko)&&h.set(p,m);return d.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(Lu[s.path]===Lu.weights?t.traverse(function(p){p.morphTargetInfluences&&l.push(p.name?p.name:p.uuid)}):l.push(a),Lu[s.path]){case Lu.weights:c=Hg;break;case Lu.rotation:c=Gg;break;case Lu.position:case Lu.scale:c=Wg;break;default:c=1===n.itemSize?Hg:Wg}const d=void 0!==r.interpolation?Vfe[r.interpolation]:bb,h=this._getArrayFromAccessor(n);for(let p=0,m=l.length;p{r.type.endsWith("Light")&&(console.warn("WORKAROUND: light intensity from GLB divided by 200."),r.intensity*=.005)}),new na(n.scene)})}}const fo=(i,t)=>Array(i).fill(null).map((e,n)=>t(n));class Ef{static startDebugView(t,e){let n=this.activeDebugViews.get(t);return n?n.renderers.includes(e)||n.renderers.push(e):(n={view:new Ef(t),renderers:[e]},this.activeDebugViews.set(t,n)),n.view}static stopDebugView(t,e){const n=t.world,r=this.activeDebugViews.get(n);r&&(r.renderers=r.renderers.filter(s=>s!==e),0===r.renderers.length&&(r.view.dispose(),this.activeDebugViews.delete(n)))}constructor(t){this.world=t,this.debugScene=null,this.aSub=null,this.rSub=null,this.syncMap=new Map,this.debugScene=new kb;const e=n=>{var r,s;const o=n.debugBodySettings;let c,l=this.lineSegmentPointsForShape(o.shape);c=l?new Ng((new hn).setFromPoints(l)):null===(r=this.world)||void 0===r?void 0:r.visualScene.factory.createPrimitive(o.shape,{shading:"wireframe",color:0}).nativeMesh,this.syncMap.set(n,c),null===(s=this.debugScene)||void 0===s||s.add(c)};for(const n of this.world.physicsWorld.children)e(n);this.aSub=this.world.physicsWorld.added$.subscribe(n=>e(n)),this.rSub=this.world.physicsWorld.removed$.subscribe(n=>{var r;const s=this.syncMap.get(n);s&&(this.syncMap.delete(n),null===(r=this.debugScene)||void 0===r||r.remove(s))})}get scene(){return this.debugScene}render(t,e){for(const[r,s]of this.syncMap.entries()){const o=r.debugBodySettings;if(o.ignoreTransform||(s.position.set(...Pe.spr(r.position)),s.quaternion.set(...Yi.spr(r.rotation))),s.material){let a=16777215;switch(o.type){case"RIGID_DYNAMIC":a=o.sleeping?255:16711680;break;case"RIGID_STATIC":a=65280;break;case"TRIGGER":a=16776960}s.material.color.set(a),s.material.needsUpdate=!0}}const n=t.autoClearColor;n&&(t.autoClearColor=!1),t.render(this.debugScene,e),n&&(t.autoClearColor=!0)}lineSegmentPointsForShape(t){if("BOX"===t.shape){const e=Pe.scalarMult(t.dimensions,.5);return[...fo(8,n=>new O(n<4?e.x:-e.x,n%4<2?e.y:-e.y,n%2?e.z:-e.z)),...fo(8,n=>new O(n%2?e.x:-e.x,n<4?e.y:-e.y,n%4<2?e.z:-e.z)),...fo(8,n=>new O(n%4<2?e.x:-e.x,n%2?e.y:-e.y,n<4?e.z:-e.z))]}if("CYLINDER"===t.shape)return[...fo(32,e=>new O(t.radius*Math.sin(Math.floor((e+1)/2)*Math.PI/8),t.radius*Math.cos(Math.floor((e+1)/2)*Math.PI/8),-t.height/2)),...fo(32,e=>new O(t.radius*Math.sin(Math.floor((e+1)/2)*Math.PI/8),t.radius*Math.cos(Math.floor((e+1)/2)*Math.PI/8),t.height/2)),...fo(8,e=>new O(Math.floor(e/2)%2?0:e<4?t.radius:-t.radius,Math.floor(e/2)%2?e<4?t.radius:-t.radius:0,e%2?t.height/2:-t.height/2)),new O(0,0,-t.height/2),new O(0,0,t.height/2)];if("CONE"===t.shape)return[...fo(32,e=>new O(t.radius*Math.sin(Math.floor((e+1)/2)*Math.PI/8),t.radius*Math.cos(Math.floor((e+1)/2)*Math.PI/8),-t.height/2)),...fo(8,e=>new O(e%2||Math.floor(e/2)%2?0:e<4?t.radius:-t.radius,e%2?0:Math.floor(e/2)%2?e<4?t.radius:-t.radius:0,e%2?t.height/2:-t.height/2)),new O(0,0,-t.height/2),new O(0,0,t.height/2)];if("SPHERE"===t.shape)return[...fo(32,e=>new O(t.radius*Math.sin(Math.floor((e+1)/2)*Math.PI/8),t.radius*Math.cos(Math.floor((e+1)/2)*Math.PI/8),0)),...fo(32,e=>new O(t.radius*Math.sin(Math.floor((e+1)/2)*Math.PI/8),0,t.radius*Math.cos(Math.floor((e+1)/2)*Math.PI/8))),...fo(32,e=>new O(0,t.radius*Math.sin(Math.floor((e+1)/2)*Math.PI/8),t.radius*Math.cos(Math.floor((e+1)/2)*Math.PI/8)))];if("CAPSULE"===t.shape)return[...this.lineSegmentPointsForShape({shape:"CYLINDER",radius:t.radius,height:t.centersDistance}),...fo(16,e=>new O(t.radius*Math.cos(Math.floor((e+1)/2)*Math.PI/8),0,t.radius*Math.sin(Math.floor((e+1)/2)*Math.PI/8)+t.centersDistance/2)),...fo(16,e=>new O(t.radius*Math.cos(Math.floor((e+1)/2)*Math.PI/8),0,-t.radius*Math.sin(Math.floor((e+1)/2)*Math.PI/8)-t.centersDistance/2)),...fo(16,e=>new O(0,t.radius*Math.cos(Math.floor((e+1)/2)*Math.PI/8),t.radius*Math.sin(Math.floor((e+1)/2)*Math.PI/8)+t.centersDistance/2)),...fo(16,e=>new O(0,t.radius*Math.cos(Math.floor((e+1)/2)*Math.PI/8),-t.radius*Math.sin(Math.floor((e+1)/2)*Math.PI/8)-t.centersDistance/2))];if("CONVEX_HULL"===t.shape)return[...t.vertices.map(n=>[new O(n.x-.05,n.y,n.z),new O(n.x+.05,n.y,n.z),new O(n.x,n.y-.05,n.z),new O(n.x,n.y+.05,n.z),new O(n.x,n.y,n.z-.05),new O(n.x,n.y,n.z+.05)]).reduce((n,r)=>(n.push(...r),n),[])];if("COMPOUND"===t.shape){const e=[];for(const{position:n,shape:r,rotation:s}of t.children){let o=this.lineSegmentPointsForShape(r);if(!o)return null;e.push(...o.map(a=>new O(...Pe.spr(Pe.add(n||Pe.O,Pe.rot(a,s||Yi.O))))))}return e}return null}dispose(){var t,e;this.debugScene=null,null===(t=this.aSub)||void 0===t||t.unsubscribe(),null===(e=this.rSub)||void 0===e||e.unsubscribe(),this.syncMap=new Map}}Ef.activeDebugViews=new Map;class s$ extends Ese{get physicsDebugViewActive(){return this._physicsDebugViewActive}set physicsDebugViewActive(t){this._physicsDebugViewActive!=t&&(this._physicsDebugViewActive=t,this.world&&(t?this.debugView=Ef.startDebugView(this.world,this):(Ef.stopDebugView(this.debugView,this),this.debugView=null)))}constructor(t,e,n,r={}){super(t,n,r),this.scene=t,this.camera=e,this.canvas=n,this.world=null,this.debugView=null,this._physicsDebugViewActive=!1,this.nativeRenderer=new Tue(Object.assign({canvas:n,alpha:this.rendererOptions.transparent},this.rendererOptions)),this.nativeRenderer.shadowMap.enabled=!0,this.nativeRenderer.setClearColor(this.rendererOptions.background),this.nativeRenderer.shadowMap.type=c4,this.nativeRenderer.setPixelRatio(this.rendererOptions.forceResolution||devicePixelRatio)}addToWorld(t){this.world=t,this.physicsDebugViewActive&&(this.debugView=Ef.startDebugView(this.world,this))}removeFromWorld(t){this.physicsDebugViewActive&&(Ef.stopDebugView(this.debugView,this),this.debugView=null),this.world=null}resizeRenderer(t){this.nativeRenderer.setSize(t.x,t.y),(this.camera.nativeCamera instanceof yr||"PerspectiveCamera"==this.camera.nativeCamera.type)&&Math.abs(this.camera.nativeCamera.aspect-t.x/t.y)>.01&&(this.camera.nativeCamera.aspect=t.x/t.y,this.camera.nativeCamera.updateProjectionMatrix())}render(){this.nativeRenderer.render(this.scene.nativeScene,this.camera.nativeCamera),this.physicsDebugViewActive&&this.debugView.render(this.nativeRenderer,this.camera.nativeCamera)}dispose(){this.camera.dispose(),this.nativeRenderer.clear(),this.nativeRenderer.dispose(),this.nativeRenderer.domElement=null}}const Zfe={name:"CopyShader",uniforms:{tDiffuse:{value:null},opacity:{value:1}},vertexShader:"\n\n\t\tvarying vec2 vUv;\n\n\t\tvoid main() {\n\n\t\t\tvUv = uv;\n\t\t\tgl_Position = projectionMatrix * modelViewMatrix * vec4( position, 1.0 );\n\n\t\t}",fragmentShader:"\n\n\t\tuniform float opacity;\n\n\t\tuniform sampler2D tDiffuse;\n\n\t\tvarying vec2 vUv;\n\n\t\tvoid main() {\n\n\t\t\tvec4 texel = texture2D( tDiffuse, vUv );\n\t\t\tgl_FragColor = opacity * texel;\n\n\n\t\t}"};class QS{constructor(){this.isPass=!0,this.enabled=!0,this.needsSwap=!0,this.clear=!1,this.renderToScreen=!1}setSize(){}render(){console.error("THREE.Pass: .render() must be implemented in derived pass.")}dispose(){}}const Qfe=new Ib(-1,1,1,-1,0,1),epe=new class Jfe extends hn{constructor(){super(),this.setAttribute("position",new ct([-1,3,0,-1,-1,0,3,-1,0],3)),this.setAttribute("uv",new ct([0,2,0,0,2,0],2))}};class tpe{constructor(t){this._mesh=new Mn(epe,t)}dispose(){this._mesh.geometry.dispose()}render(t){t.render(this._mesh,Qfe)}get material(){return this._mesh.material}set material(t){this._mesh.material=t}}class npe extends QS{constructor(t,e){super(),this.textureID=void 0!==e?e:"tDiffuse",t instanceof Cl?(this.uniforms=t.uniforms,this.material=t):t&&(this.uniforms=Q4.clone(t.uniforms),this.material=new Cl({name:void 0!==t.name?t.name:"unspecified",defines:Object.assign({},t.defines),uniforms:this.uniforms,vertexShader:t.vertexShader,fragmentShader:t.fragmentShader})),this.fsQuad=new tpe(this.material)}render(t,e,n){this.uniforms[this.textureID]&&(this.uniforms[this.textureID].value=n.texture),this.fsQuad.material=this.material,this.renderToScreen?(t.setRenderTarget(null),this.fsQuad.render(t)):(t.setRenderTarget(e),this.clear&&t.clear(t.autoClearColor,t.autoClearDepth,t.autoClearStencil),this.fsQuad.render(t))}dispose(){this.material.dispose(),this.fsQuad.dispose()}}class o$ extends QS{constructor(t,e){super(),this.scene=t,this.camera=e,this.clear=!0,this.needsSwap=!1,this.inverse=!1}render(t,e,n){const r=t.getContext(),s=t.state;let o,a;s.buffers.color.setMask(!1),s.buffers.depth.setMask(!1),s.buffers.color.setLocked(!0),s.buffers.depth.setLocked(!0),this.inverse?(o=0,a=1):(o=1,a=0),s.buffers.stencil.setTest(!0),s.buffers.stencil.setOp(r.REPLACE,r.REPLACE,r.REPLACE),s.buffers.stencil.setFunc(r.ALWAYS,o,4294967295),s.buffers.stencil.setClear(a),s.buffers.stencil.setLocked(!0),t.setRenderTarget(n),this.clear&&t.clear(),t.render(this.scene,this.camera),t.setRenderTarget(e),this.clear&&t.clear(),t.render(this.scene,this.camera),s.buffers.color.setLocked(!1),s.buffers.depth.setLocked(!1),s.buffers.color.setMask(!0),s.buffers.depth.setMask(!0),s.buffers.stencil.setLocked(!1),s.buffers.stencil.setFunc(r.EQUAL,1,4294967295),s.buffers.stencil.setOp(r.KEEP,r.KEEP,r.KEEP),s.buffers.stencil.setLocked(!0)}}class ipe extends QS{constructor(){super(),this.needsSwap=!1}render(t){t.state.buffers.stencil.setLocked(!1),t.state.buffers.stencil.setTest(!1)}}class rpe{constructor(t,e){if(this.renderer=t,this._pixelRatio=t.getPixelRatio(),void 0===e){const n=t.getSize(new xe);this._width=n.width,this._height=n.height,(e=new Mu(this._width*this._pixelRatio,this._height*this._pixelRatio,{type:Jm})).texture.name="EffectComposer.rt1"}else this._width=e.width,this._height=e.height;this.renderTarget1=e,this.renderTarget2=e.clone(),this.renderTarget2.texture.name="EffectComposer.rt2",this.writeBuffer=this.renderTarget1,this.readBuffer=this.renderTarget2,this.renderToScreen=!0,this.passes=[],this.copyPass=new npe(Zfe),this.copyPass.material.blending=Qc,this.clock=new OG}swapBuffers(){const t=this.readBuffer;this.readBuffer=this.writeBuffer,this.writeBuffer=t}addPass(t){this.passes.push(t),t.setSize(this._width*this._pixelRatio,this._height*this._pixelRatio)}insertPass(t,e){this.passes.splice(e,0,t),t.setSize(this._width*this._pixelRatio,this._height*this._pixelRatio)}removePass(t){const e=this.passes.indexOf(t);-1!==e&&this.passes.splice(e,1)}isLastEnabledPass(t){for(let e=t+1;e0?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;l$.fromArray(r,t),yO.fromArray(r,e),c$.fromArray(r,n),Ba.subVectors(c$,yO),d$.subVectors(l$,yO),Ba.cross(d$),Ba.normalize(),s.push(Ba.x,Ba.y,Ba.z),s.push(Ba.x,Ba.y,Ba.z),s.push(Ba.x,Ba.y,Ba.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 d=this.vertices.length;let h=this.parseVertexIndex(t,d),p=this.parseVertexIndex(e,d),m=this.parseVertexIndex(n,d);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?(JS.setRGB(parseFloat(h[4]),parseFloat(h[5]),parseFloat(h[6])).convertSRGBToLinear(),e.colors.push(JS.r,JS.g,JS.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"===d){const p=c.slice(1).trim().split(a$),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 Fo;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 ct(d.normals,3)),d.colors.length>0&&(g=!0,b.setAttribute("color",new ct(d.colors,3))),!0===d.hasUVIndices&&b.setAttribute("uv",new ct(d.uvs,2));const v=[];for(let M=0,x=h.length;M1){for(let M=0,x=h.length;M0){const a=new mf({size:1,sizeAttenuation:!1}),l=new hn;l.setAttribute("position",new ct(e.vertices,3)),e.colors.length>0&&void 0!==e.colors[0]&&(l.setAttribute("color",new ct(e.colors,3)),a.vertexColors=!0);const c=new Vb(l,a);s.add(c)}return s}}class bO extends yf{constructor(t){super(t)}load(t,e,n,r){const s=this,o=""===this.path?Ou.extractUrlBase(t):this.path,a=new La(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,d):c;h=h.toLowerCase();let p=d>=0?c.substring(d+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 fpe(this.resourcePath||e,this.materialOptions);return a.setCrossOrigin(this.crossOrigin),a.setManager(this.manager),a.setMaterials(o),a}}class fpe{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:ac,this.wrap=void 0!==this.options.wrap?this.options.wrap:Pa}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),d=e.loadTexture(function s(a,l){return"string"!=typeof l||""===l?"":/^https?:\/\//i.test(l)?l:a+l}(e.baseUrl,c.url));d.repeat.copy(c.scale),d.offset.copy(c.offset),d.wrapS=e.wrap,d.wrapT=e.wrap,("map"===a||"emissiveMap"===a)&&(d.colorSpace=cs),r[a]=d}for(const a in n){const l=n[a];let c;if(""!==l)switch(a.toLowerCase()){case"kd":r.color=(new qe).fromArray(l).convertSRGBToLinear();break;case"ks":r.specular=(new qe).fromArray(l).convertSRGBToLinear();break;case"ke":r.emissive=(new qe).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 zS(r),this.materials[t]}getTextureParams(t,e){const n={scale:new xe(1,1),offset:new xe(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:wG;let a=o.getHandler(t);null===a&&(a=new Pu(o)),a.setCrossOrigin&&a.setCrossOrigin(this.crossOrigin);const l=a.load(t,n,r,s);return void 0!==e&&(l.mapping=e),l}}const ppe=["determinateSpinner"];function mpe(i,t){if(1&i&&(ki(),W(0,"svg",11),De(1,"circle",12),j()),2&i){const e=he();Dt("viewBox",e._viewBox()),G(1),jo("stroke-dasharray",e._strokeCircumference(),"px")("stroke-dashoffset",e._strokeCircumference()/2,"px")("stroke-width",e._circleStrokeWidth(),"%"),Dt("r",e._circleRadius())}}const gpe=Qy(class{constructor(i){this._elementRef=i}},"primary"),_pe=new me("mat-progress-spinner-default-options",{providedIn:"root",factory:function vpe(){return{diameter:u$}}}),u$=100;let Jb=(()=>{class i extends gpe{constructor(e,n,r){super(e),this.mode="mat-spinner"===this._elementRef.nativeElement.nodeName.toLowerCase()?"indeterminate":"determinate",this._value=0,this._diameter=u$,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,ks(e)))}get diameter(){return this._diameter}set diameter(e){this._diameter=ks(e)}get strokeWidth(){return this._strokeWidth??this.diameter/10}set strokeWidth(e){this._strokeWidth=ks(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)(E(mt),E(Rr,8),E(_pe))},i.\u0275cmp=ot({type:i,selectors:[["mat-progress-spinner"],["mat-spinner"]],viewQuery:function(e,n){if(1&e&&Wn(ppe,5),2&e){let r;Et(r=At())&&(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&&(Dt("aria-valuemin",0)("aria-valuemax",100)("aria-valuenow","determinate"===n.mode?n.value:null)("mode",n.mode),jo("width",n.diameter,"px")("height",n.diameter,"px"),un("_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:[lt],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&&(fe(0,mpe,2,8,"ng-template",null,0,Vc),W(2,"div",1,2),ki(),W(4,"svg",3),De(5,"circle",4),j()(),ga(),W(6,"div",5)(7,"div",6)(8,"div",7),sy(9,8),j(),W(10,"div",9),sy(11,8),j(),W(12,"div",10),sy(13,8),j()()()),2&e){const r=Zi(1);G(4),Dt("viewBox",n._viewBox()),G(1),jo("stroke-dasharray",n._strokeCircumference(),"px")("stroke-dashoffset",n._strokeDashOffset(),"px")("stroke-width",n._circleStrokeWidth(),"%"),Dt("r",n._circleRadius()),G(4),U("ngTemplateOutlet",r),G(2),U("ngTemplateOutlet",r),G(2),U("ngTemplateOutlet",r)}},dependencies:[xy],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})(),bpe=(()=>{class i{}return i.\u0275fac=function(e){return new(e||i)},i.\u0275mod=nn({type:i}),i.\u0275inj=Kt({imports:[Eo,Qn]}),i})();const xpe=["previewCanvasContainer"],wpe=["previewCanvas"];function Mpe(i,t){if(1&i){const e=di();Gr(0),W(1,"label",11),Ve(2),j(),W(3,"input",12),Ue("change",function(r){an(e);const s=he().$implicit;return s.value=r.currentTarget.checked,zt(s.change(s.value))}),j(),$r()}if(2&i){const e=he(),n=e.index,r=e.$implicit,s=he().index;G(1),U("for","custom_control_"+s+"_"+n),G(1),_i(r.label),G(1),U("id","custom_control_"+s+"_"+n)("type",r.type)("checked",r.value)}}function Cpe(i,t){if(1&i){const e=di();W(0,"div",9)(1,"label",11),Ve(2),j(),W(3,"input",14),Ue("change",function(){const s=an(e).$implicit,o=he(2).$implicit;return o.value=s,zt(o.change(o.value))}),j()()}if(2&i){const e=t.$implicit,n=he(2),r=n.index,s=n.$implicit,o=he().index;G(1),U("for","custom_control_"+o+"_"+r+"_"+e),G(1),_i(e),G(1),U("id","custom_control_"+o+"_"+r+"_"+e)("checked",s.value===e)}}function Spe(i,t){if(1&i&&(W(0,"div",13)(1,"label"),Ve(2),j(),fe(3,Cpe,4,4,"div",8),j()),2&i){const e=he().$implicit;G(2),_i(e.label),G(1),U("ngForOf",e.options)}}function Epe(i,t){if(1&i){const e=di();Gr(0),W(1,"label",11),Ve(2),j(),W(3,"input",15),Ue("colorChange",function(r){an(e);const s=he().$implicit,o=he(2);return s.value=o.toRGB(r.value),zt(s.change(s.value))}),j(),De(4,"ngx-mat-color-toggle",16)(5,"ngx-mat-color-picker",null,17),$r()}if(2&i){const e=Zi(6),n=he(),r=n.index,s=n.$implicit,o=he().index;G(1),U("for","custom_control_"+o+"_"+r),G(1),_i(s.label),G(1),U("ngxMatColorPicker",e),G(1),U("for",e)}}function Ape(i,t){if(1&i){const e=di();Gr(0),W(1,"label",11),Ve(2),j(),W(3,"input",18),Ue("change",function(r){an(e);const s=he().$implicit;return s.value=r.currentTarget.value,zt(s.change(s.value))}),j(),$r()}if(2&i){const e=he(),n=e.index,r=e.$implicit,s=he().index;G(1),U("for","custom_control_"+s+"_"+n),G(1),_i(r.label),G(1),U("id","custom_control_"+s+"_"+n)("min",r.minValue)("max",r.maxValue)("step",r.valueStep)("value",r.value)}}function Dpe(i,t){if(1&i&&(W(0,"div",9),fe(1,Mpe,4,5,"ng-container",6),fe(2,Spe,4,2,"div",10),fe(3,Epe,7,4,"ng-container",6),fe(4,Ape,4,7,"ng-container",6),j()),2&i){const e=t.$implicit;G(1),U("ngIf","checkbox"===e.type),G(1),U("ngIf","radio"===e.type),G(1),U("ngIf","color"===e.type),G(1),U("ngIf","slider"===e.type)}}function Tpe(i,t){if(1&i&&(Gr(0),W(1,"h4"),Ve(2),j(),fe(3,Dpe,5,4,"div",8),$r()),2&i){const e=t.$implicit;G(2),_i(e.title),G(1),U("ngForOf",e.controls)}}function Ipe(i,t){if(1&i){const e=di();W(0,"div",9)(1,"label",11),Ve(2),j(),W(3,"input",19),Ue("change",function(r){return zt(an(e).$implicit.visible=r.currentTarget.checked)}),j()()}if(2&i){const e=t.$implicit;G(1),U("for","visibility_"+e.name),G(1),_i(e.name),G(1),U("id","visibility_"+e.name)("checked",e.visible)}}function Rpe(i,t){if(1&i&&(Gr(0),W(1,"h4"),Ve(2,"Objects visibility"),j(),fe(3,Ipe,4,4,"div",8),$r()),2&i){const e=he();G(3),U("ngForOf",e.meshes)}}function kpe(i,t){1&i&&De(0,"mat-spinner",20)}const ia=i=>{i.colorSpace="srgb",i.anisotropy=8,i.magFilter=_r,i.minFilter=_r};let h$=(()=>{class i{constructor(e){this.cdr=e,this.visibilityControls=!0,this.groupFunction=null,this.customControls=[],this.onObjectLoaded=new We,this._paths$=new gt(null),this.destroyed$=new Re,this.entity=null,this.meshes=[]}get paths(){return this._paths$.getValue()}set paths(e){this._paths$.next(e)}ngAfterViewInit(){var e=this;return tt(function*(){var s;e.world=new sk(new vO,{init:(s=tt(function*(){}),function(){return s.apply(this,arguments)}),simulate:()=>{}}),yield e.world.init(),e.world.visualScene.nativeScene.add(new $S(16777215,2));let n=new gt({x:1,y:1});e.renderer=e.world.addRenderer(e.world.visualScene.factory.createPerspectiveCamera({frustrum:{near:.01,far:1e4}}),e.previewCanvas.nativeElement,{size:n.asObservable(),background:11184810}),e.controller=new kse(e.renderer,{mouseOptions:{canvas:e.previewCanvas.nativeElement},orbiting:{sensitivityX:2,sensitivityY:2},orbitingElasticity:30}),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(He(e.destroyed$)).subscribe(function(){var s=tt(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 Qb,h=yield(new bO).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 Fo;y.add(...b[v]),y.name=v,p.remove(...b[v]),p.add(y)}}e.meshes=p.children,e.meshes.sort((b,v)=>b.name>v.name?1:-1),p.traverse(b=>{if(b instanceof Mn){const v=b.material instanceof Array?b.material:[b.material];for(const y of v)y.transparent=!0,y.alphaTest=.5,y instanceof qi&&y.map&&(y.map.wrapS=Ii,y.map.wrapT=Ii,ia(y.map),y.map.needsUpdate=!0)}}),e.onObjectLoaded.next(p),e.entity=new Zo({object3D:new na(p)}),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=Pe.scalarMult(Pe.add(m.min,m.max),.5),e.controller.spherical={phi:1.22,theta:-1.32,radius:Pe.dist(m.min,m.max)},e.cdr.markForCheck()}});return function(o){return s.apply(this,arguments)}}())})()}toRGB(e){return(e?.r||0)<<16|(e?.g||0)<<8|(e?.b||0)}ngOnDestroy(){this.destroyed$.next(),this.destroyed$.complete()}}return i.\u0275fac=function(e){return new(e||i)(E(Zn))},i.\u0275cmp=ot({type:i,selectors:[["app-obj-viewer"]],viewQuery:function(e,n){if(1&e&&(Wn(xpe,5),Wn(wpe,5)),2&e){let r;Et(r=At())&&(n.previewCanvasContainer=r.first),Et(r=At())&&(n.previewCanvas=r.first)}},inputs:{paths:"paths",visibilityControls:"visibilityControls",groupFunction:"groupFunction",customControls:"customControls"},outputs:{onObjectLoaded:"onObjectLoaded"},decls:8,vars:3,consts:[[1,"previewCanvasContainer"],["previewCanvasContainer",""],["width","640","height","480"],["previewCanvas",""],["id","controls"],[4,"ngFor","ngForOf"],[4,"ngIf"],["mode","indeterminate",4,"ngIf"],["class","controls-list",4,"ngFor","ngForOf"],[1,"controls-list"],["style","width: 100%",4,"ngIf"],[3,"for"],[3,"id","type","checked","change"],[2,"width","100%"],["type","radio",3,"id","checked","change"],["matInput","",1,"hidden",3,"ngxMatColorPicker","colorChange"],["matSuffix","",3,"for"],["picker",""],["type","range",3,"id","min","max","step","value","change"],["type","checkbox",3,"id","checked","change"],["mode","indeterminate"]],template:function(e,n){1&e&&(W(0,"div",0,1),De(2,"canvas",2,3),W(4,"div",4),fe(5,Tpe,4,2,"ng-container",5),fe(6,Rpe,4,1,"ng-container",6),j(),fe(7,kpe,1,0,"mat-spinner",7),j()),2&e&&(G(5),U("ngForOf",n.customControls),G(1),U("ngIf",n.visibilityControls),G(1),U("ngIf",!n.entity))},dependencies:[So,vi,Xte,ic,Jb,jie,bC,LH],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%] > h4[_ngcontent-%COMP%]{margin:0}.previewCanvasContainer[_ngcontent-%COMP%] #controls[_ngcontent-%COMP%] .controls-list[_ngcontent-%COMP%]{width:100%;display:flex;-webkit-user-select:none;user-select:none;align-items:center}.previewCanvasContainer[_ngcontent-%COMP%] #controls[_ngcontent-%COMP%] .controls-list[_ngcontent-%COMP%] > span[_ngcontent-%COMP%]{flex-grow:1}.previewCanvasContainer[_ngcontent-%COMP%] #controls[_ngcontent-%COMP%] .controls-list[_ngcontent-%COMP%] > label[_ngcontent-%COMP%]{flex-grow:1}"],changeDetection:0}),i})();function Ppe(i,t){if(1&i&&(ki(),De(0,"circle",5),Ct(1,"async"),Ct(2,"async")),2&i){const e=he();let n,r;Dt("cx",(null==(n=Tt(1,3,e.mapPointer$))?null:n.x)||0)("cy",(null==(r=Tt(2,5,e.mapPointer$))?null:r.y)||0)("r",10)}}const Ope=function(){return{"stroke-width":3}};let f$=(()=>{class i{constructor(e){this.ref=e,this._roadSpline$=new gt([]),this._pointer$=new gt(null),this.splineClosed=!1,this.svgSize$=new gt({x:100,y:100}),this.scalingSquare$=new gt({x:0,y:0,width:100,height:100}),this.mapPolyline$=new gt(""),this.mapPointer$=new gt(null),this.destroyed$=new Re}set roadSpline(e){this._roadSpline$.next(e)}set pointer(e){this._pointer$.next(e)}get trackLength$(){return this._roadSpline$.pipe(et(e=>{let n=0;for(let r=1;r{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$),nu([this._roadSpline$,this.scalingSquare$,this.svgSize$]).pipe(He(this.destroyed$),et(([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$),nu([this._pointer$,this.scalingSquare$.asObservable(),this.svgSize$]).pipe(He(this.destroyed$),et(([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)(E(mt))},i.\u0275cmp=ot({type:i,selectors:[["app-tri-minimap"]],inputs:{roadSpline:"roadSpline",pointer:"pointer",splineClosed:"splineClosed"},decls:13,vars:16,consts:[[1,"container"],["shape-rendering","geometricPrecision"],[2,"fill","none","stroke","#333333",3,"ngStyle"],["fill","#e30","stroke","black","stroke-width","3",4,"ngIf"],[1,"info_div"],["fill","#e30","stroke","black","stroke-width","3"]],template:function(e,n){if(1&e&&(W(0,"div",0),ki(),W(1,"svg",1),Ct(2,"async"),Ct(3,"async"),De(4,"polyline",2),Ct(5,"async"),Ve(6," cars "),fe(7,Ppe,3,7,"circle",3),Ct(8,"async"),j(),ga(),W(9,"div",4)(10,"span"),Ve(11),Ct(12,"async"),j()()()),2&e){let r,s;G(1),Dt("viewBox","0 0 "+(null==(r=Tt(2,5,n.svgSize$))?null:r.x)+" "+(null==(r=Tt(3,7,n.svgSize$))?null:r.y)),G(3),U("ngStyle",so(15,Ope)),Dt("points",Tt(5,9,n.mapPolyline$)),G(3),U("ngIf",Tt(8,11,n.mapPointer$)),G(4),Qi("Track length (m): ",null==(s=Tt(12,13,n.trackLength$))?null:s.toFixed(2),"")}},dependencies:[vi,tM,pl],styles:["[_nghost-%COMP%]{overflow:auto}.container[_ngcontent-%COMP%]{position:relative;width:100%;height:100%}.container[_ngcontent-%COMP%] svg[_ngcontent-%COMP%]{position:absolute;width:100%;height:100%}.container[_ngcontent-%COMP%] .info_div[_ngcontent-%COMP%]{color:#838383}"],changeDetection:0}),i})();const Fpe=["previewCanvasContainer"],Lpe=["previewCanvas"];function Npe(i,t){if(1&i&&(W(0,"mat-option",19),Ve(1),j()),2&i){const e=t.$implicit;U("value",e),G(1),Qi(" ",e," ")}}function Bpe(i,t){if(1&i){const e=di();Gr(0),W(1,"mat-form-field",1)(2,"mat-label"),Ve(3,"Custom FAM path"),j(),De(4,"input",20,21),Ct(6,"async"),j(),W(7,"button",22),Ue("click",function(){an(e);const r=Zi(5);return zt(he().onFamSelected(r.value))}),Ve(8,"LOAD"),j(),$r()}if(2&i){const e=he();G(4),U("value",Tt(6,1,e.previewFamLocation$))}}function Upe(i,t){1&i&&De(0,"mat-spinner",23),2&i&&U("diameter",40)}function Vpe(i,t){1&i&&De(0,"mat-spinner",24)}const zpe=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 Af=(()=>{return(i=Af||(Af={})).ThreeModel="model",i.Bitmap="bitmap",i.TwoSidedBitmap="two_sided_bitmap",Af;var i})();class Hpe extends QH{constructor(t,e,n){super(t,{loadDepth:40,inertia:2}),this.mapGraph=t,this.famPath=e,this.hideUnknownEntities$=n,this.textureLoader=new Pu,this.terrainMaterials={},this.objLoader=new Qb,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(Zl(),He(this._onRemoved$)).subscribe(e=>{for(const n of this.unknownEntities)n.visible=!e})}getPlaceholderTexture(){var t=this;return tt(function*(){return t._placeholder?t._placeholder:(t._placeholderPromise||(t._placeholderPromise=t.textureLoader.loadAsync("assets/placeholder_texture.png")),t._placeholderPromise)})()}getPlaceholderTerrainTexture(){var t=this;return tt(function*(){return t._placeholderTerrain?t._placeholderTerrain:(t._placeholderTerrainPromise||(t._placeholderTerrainPromise=t.textureLoader.loadAsync("assets/placeholder_texture.png").then(e=>(e.wrapS=Pa,e.wrapT=Ii,ia(e),e.flipY=!0,e))),t._placeholderTerrainPromise)})()}loadChunk(t){var e=this;return tt(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 Mn&&(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:Pe.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:Yi.fromAngle(Pe.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 Zo({object3D:new na(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 qi({side:Ls,transparent:!0,visible:!1}),this.famPath?this.textureLoader.loadAsync(`${this.famPath}/background/${t}.png`).then(e=>{e.wrapS=Pa,e.wrapT=Ii,ia(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 tt(function*(){let n=!1;if(t.type==Af.ThreeModel){let r;try{if(!e.famPath)throw new Error;const o=new bO,a=new Qb,l=yield o.loadAsync(`${e.famPath}/props/${t.data.data.resource_id}/0/material.mtl`);l.preload(),a.setMaterials(l),r=new na(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 Mn){const a=o.material instanceof Array?o.material:[o.material];for(const l of a)l.transparent=!0,l.alphaTest=.5,l instanceof qi&&l.map&&(l.map.wrapS=Ii,l.map.wrapT=Ii,ia(l.map),l.map.needsUpdate=!0)}});const s=new Zo({object3D: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==Af.Bitmap||t.type==Af.TwoSidedBitmap){const r=(c,d)=>new Array(d).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 Fo,[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==Af.TwoSidedBitmap){const[c,d]=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 Zo({object3D:new na(s)});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 tt(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=>(ia(h),new qi({map:h,alphaTest:.5,transparent:!0,side:Ls}))),d=new Mn(new Iu(e.x,e.y),c[0]);if(d.rotateX(Math.PI/2),d.position.set(0,0,e.y/2),c.length>1){let h=-1;Ym(r.world).pipe(o4(n&&!isNaN(+n)?1e3*+n:250)).subscribe(()=>{h=(h+1)%c.length,d.material=c[h]})}return[d,a]})()}}let Gpe=(()=>{class i{constructor(e,n,r){this.eelDelegate=e,this.cdr=n,this.mainService=r,this._resource$=new gt(null),this.changed=new We,this.previewLoading$=new gt(!0),this.previewFamLocation$=new gt(null),this.previewFamLoading$=new gt(!1),this.pointer$=new gt(null),this.selectedSplineIndex$=new gt(0),this.selectedSplineItem$=new gt(null),this.selectedAiInfoItem$=new gt(null),this.selectedTerrainItem$=new gt(null),this.famPath=null,this.name="",this.renderer=null,this.map=null,this.isOpenedTrack=!0,this.roadPath=null,this.destroyed$=new Re}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 tt(function*(){var s;e.world=new sk(new vO,{init:(s=tt(function*(){}),function(){return s.apply(this,arguments)}),simulate:()=>{},loader:{loadFromGgGlb:function(){var s=tt(function*(...o){return[]});return function(){return s.apply(this,arguments)}}()}}),yield e.world.init(),e.skySphere=new Zo({object3D:e.world.visualScene.factory.createPrimitive({shape:"SPHERE",radius:1e3},{color:16777215})}),e.skySphere.object3D.nativeMesh.material.side=Ls,e.world.addEntity(e.skySphere),e.selectionSphere=new Zo({object3D: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 $S(16777215,2));let n=new gt({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=Yi.lookAt(e.renderer.camera.position,Pe.add(e.renderer.camera.position,Pe.Y),Pe.Z),Ym(e.world).pipe(He(e.destroyed$)).subscribe(()=>{e.renderer&&(e.skySphere.position=e.renderer.camera.position,e.pointer$.next(e.renderer.camera.position))}),e.controller=new n4(e.world.keyboardInput,e.renderer,{mouseOptions:{canvas:e.previewCanvas.nativeElement,pointerLock:!0},keymap:"wasd+arrows",cameraLinearSpeed:40,cameraBoostMultiplier:4,cameraMovementElasticity:100,cameraRotationElasticity:30,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(He(e.destroyed$)).subscribe(function(){var s=tt(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(He(e.destroyed$),gn(([s,o])=>!!e.resource&&s.startsWith(e.resource.id)),ml(3e3)).subscribe(tt(function*(){e.previewLoading$.next(!0),yield e.postTmpUpdates(e.resource?.id),yield e.loadPreview(),e.previewLoading$.next(!1)})),e.selectedSplineIndex$.pipe(He(e.destroyed$),ml(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=Pe.add(a,Pe.rotAround({x:10,y:-12,z:5},{x:0,y:0,z:1},-e.resource.data.road_spline[s].orientation)),e.renderer.rotation=Yi.lookAt(e.renderer.position,a,{x:0,y:0,z:1}),e.controller.reset())}e.selectedSplineItem$.next({id:rc(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:rc(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:rc(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 tt(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 Pu,o=r.find(a=>a.endsWith("spherical.png"));if(o){const a=yield s.loadAsync(o);a.colorSpace="srgb",a.mapping=lc,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 tt(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 tt(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=Km.fromMapArray(e.roadPath.map((r,s)=>({path:`${e.terrainChunksObjLocation}terrain_chunk_${s}`,position:r,loadOptions:{}}))||[],!e.isOpenedTrack);e.unloadPreview(),e.map=new Hpe(n,e.famPath&&"resources/"+e.famPath,e.mainService.hideHiddenFields$),e.map.resource=e.resource,e.map.isOpenedTrack=e.isOpenedTrack,Ym(e.world).pipe(He(e.destroyed$)).subscribe(()=>{e.map&&e.renderer&&e.map.loaderCursor$.next(e.renderer.position)}),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 tt(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)(E(Ql),E(Zn),E(ka))},i.\u0275cmp=ot({type:i,selectors:[["app-tri-map-block-ui"]],viewQuery:function(e,n){if(1&e&&(Wn(Fpe,5),Wn(Lpe,5)),2&e){let r;Et(r=At())&&(n.previewCanvasContainer=r.first),Et(r=At())&&(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&&(W(0,"div",0)(1,"h4"),Ve(2,"Preview *.FAM file"),j(),W(3,"mat-form-field",1)(4,"mat-label"),Ve(5,"Current preview FAM"),j(),W(6,"mat-select",2,3),Ue("valueChange",function(s){return n.onFamSelected(s)}),Ct(8,"async"),Ct(9,"async"),fe(10,Npe,2,2,"mat-option",4),W(11,"mat-option",5),Ve(12,"custom"),j()()(),fe(13,Bpe,9,3,"ng-container",6),fe(14,Upe,1,1,"mat-spinner",7),Ct(15,"async"),j(),W(16,"div",8)(17,"div",9,10),De(19,"canvas",11,12),fe(21,Vpe,1,0,"mat-spinner",13),Ct(22,"async"),j(),W(23,"div",14,10)(25,"mat-form-field",1)(26,"mat-label"),Ve(27,"Spline item"),j(),W(28,"input",15),Ue("ngModelChange",function(s){return n.selectedSplineIndex$.next(s)}),Ct(29,"async"),Ct(30,"async"),j()(),De(31,"app-tri-minimap",16),Ct(32,"async"),j()(),W(33,"h4"),Ve(34,"Road spline item"),j(),De(35,"app-compound-block-ui",17),Ct(36,"async"),W(37,"h4"),Ve(38,"AI info (block for 4 spline items)"),j(),De(39,"app-compound-block-ui",17),Ct(40,"async"),W(41,"h4"),Ve(42,"Terrain (block for 4 spline items)"),j(),De(43,"app-compound-block-ui",17),Ct(44,"async"),W(45,"h4"),Ve(46,"Common"),j(),De(47,"app-compound-block-ui",18),Ct(48,"async")),2&e){const r=Zi(7);let s;G(6),U("value",n.previewFamPossibleLocations.includes(Tt(8,20,n.previewFamLocation$))?Tt(9,22,n.previewFamLocation$):"custom"),G(4),U("ngForOf",n.previewFamPossibleLocations),G(3),U("ngIf","custom"==r.value),G(1),U("ngIf",Tt(15,24,n.previewFamLoading$)),G(7),U("ngIf",Tt(22,26,n.previewLoading$)),G(7),U("min",0)("max",4*(null==(s=Tt(29,28,n._resource$))?null:s.data.num_chunks)-1)("ngModel",Tt(30,30,n.selectedSplineIndex$)),G(3),U("roadSpline",n.roadSpline)("pointer",Tt(32,32,n.pointer$))("splineClosed",!n.isOpenedTrack),G(4),U("resource",Tt(36,34,n.selectedSplineItem$))("hideBlockActions",!0),G(4),U("resource",Tt(40,36,n.selectedAiInfoItem$))("hideBlockActions",!0),G(4),U("resource",Tt(44,38,n.selectedTerrainItem$))("hideBlockActions",!0),G(4),U("resource",Tt(48,40,n._resource$))("hideBlockActions",!0)("fieldWhitelist",so(42,zpe))}},dependencies:[So,vi,gl,mu,tc,_u,gu,Kc,vl,To,ic,ib,fb,Nm,Jb,Jl,f$,pl],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})();const p$=i=>new Promise(t=>setTimeout(t,i)),m$=(i,t,e=null)=>{const n=document.createElement("canvas"),r=n.getContext("2d",{willReadFrequently:!0}),s=i.width,o=i.height;n.width=s,n.height=o,r.drawImage(i,0,0,s,o);const a=r.getImageData(0,0,s,o);for(let l=0;l{if(!(o instanceof Mn))return;let a=-1;if(o.name.startsWith("lbl__rt_frnt")?a=0:o.name.startsWith("lbl__lt_frnt")?a=1:o.name.startsWith("lbl__rt_rear")?a=2:o.name.startsWith("lbl__lt_rear")&&(a=3),a>-1){this.wheels[a]=o,a<2&&(this.frontWheels[a]=o),o.geometry.boundingBox||o.geometry.computeBoundingBox();const l=Pe.avg(o.geometry.boundingBox.min,o.geometry.boundingBox.max);o.geometry.translate(...Pe.spr(Pe.neg(l))),o.position.set(...Pe.spr(l)),this.wheelIdlePositions[a]=l}(o.name.includes("rsid")||o.name.includes("lite"))&&(r.push(o),this.originalTexWithTailLights=o.material.map)}),!this.originalTexWithTailLights)throw new Error("Not a driveable NFS1 car");this.tailLightColors=n.includes("TRAFFC.CFM")?[9509903,16711680]:[3212546,16258068],this.texWithTailLightsImg=document.createElement("img"),this.texWithTailLights=new ko(this.texWithTailLightsImg),this.texWithTailLights.flipY=this.originalTexWithTailLights.flipY,ia(this.texWithTailLights),this.recolorTailLights(this.tailLightColors[0]).then();for(const o of r)o.material.map=this.texWithTailLights;const s=new Pu;this.tyreTextures=[1,2,3,4].map(o=>s.load(`${n}/tyr${o}.png`));for(const o of this.tyreTextures)ia(o);this.tyreMaterial=new qi({map:this.tyreTextures[0]}),this.tyreMaterial.transparent=!0,this.tyreMaterial.alphaTest=.5,this.tyreMaterial.map.wrapS=Ii,this.tyreMaterial.map.wrapT=Ii,this.tyreMaterial.polygonOffset=!0,this.tyreMaterial.polygonOffsetFactor=-4;for(const o of this.wheels)o.material=this.tyreMaterial}get tailLightsOn(){return this._tailLightsOn}set tailLightsOn(t){t!==this._tailLightsOn&&(this._tailLightsOn=t,this.recolorTailLights(this.tailLightColors[t?1:0]))}get speed(){return this._speed}set speed(t){if(t!==this._speed){switch(this._speed=t,this.tyreTextureUpdateTimer&&clearInterval(this.tyreTextureUpdateTimer),t){case"idle":this.tyreMaterial.map=this.tyreTextures[0];break;case"slow":let e=!0;this.tyreTextureUpdateTimer=setInterval(()=>{this.tyreMaterial.map=this.tyreTextures[e?1:2],this.tyreMaterial.needsUpdate=!0,e=!e},16);break;case"fast":this.tyreMaterial.map=this.tyreTextures[3]}this.tyreMaterial.needsUpdate=!0}}get steeringAngle(){return this._steeringAngle}set steeringAngle(t){if(t!==this._steeringAngle){this._steeringAngle=t;for(const e of this.frontWheels)e.rotation.set(0,0,t)}}recolorTailLights(t){var e=this;return tt(function*(){if(e.originalTexWithTailLights&&e.texWithTailLights&&e.texWithTailLightsImg){for(let n=100;n>0&&!e.originalTexWithTailLights.source.data;n--)yield p$(50);((i,t,e,n=null)=>{const[r,s,o]=[t>>16,t>>8&255,255&t],[a,l,c]=[e>>16,e>>8&255,255&e];m$(i,(d,h)=>{d[h]==r&&d[h+1]==s&&d[h+2]==o&&(d[h]=a,d[h+1]=l,d[h+2]=c)},n)})(e.originalTexWithTailLights.source.data,e.tailLightsTexColor,t,e.texWithTailLightsImg),e.texWithTailLights.needsUpdate=!0}})()}dispose(){this.texWithTailLightsImg&&(this.texWithTailLightsImg.remove(),this.texWithTailLightsImg=null),this.texWithTailLights&&(this.texWithTailLights.dispose(),this.texWithTailLights=null),this.tyreTextureUpdateTimer&&clearInterval(this.tyreTextureUpdateTimer),this.tyreMaterial&&(this.tyreMaterial.dispose(),this.tyreMaterial=null)}}let jpe=(()=>{class i{constructor(e,n,r){this.eelDelegate=e,this.mainService=n,this.cdr=r,this._resource$=new gt(null),this.changed=new We,this.previewPaths$=new gt(null),this.destroyed$=new Re,this.customControls=[],this.serializerSettings={geometry__save_obj:!0,geometry__save_blend:!1,geometry__export_to_gg_web_engine:!1}}get resource(){return this._resource$.getValue()}set resource(e){this._resource$.next(e)}ngAfterViewInit(){var e=this;return tt(function*(){e._resource$.pipe(He(e.destroyed$)).subscribe(function(){var n=tt(function*(r){e.previewPaths$.next(yield e.loadPreviewFilePaths(r?.id))});return function(r){return n.apply(this,arguments)}}()),e.mainService.dataBlockChange$.pipe(He(e.destroyed$),gn(([n,r])=>!!e.resource&&n.startsWith(e.resource.id)),ml(1500)).subscribe(tt(function*(){e.previewPaths$.next(null),e.previewPaths$.next(yield e.postTmpUpdates(e.resource?.id))}))})()}onObjectLoaded(e){var n=this;return tt(function*(){if((n._resource$.value?.id||"").includes(".CFM__"))try{const r=n.resource?.id.split("/");r.pop(),r[r.length-1]=""+(+r[r.length-1]+1);const s=yield n.eelDelegate.retrieveValue(r.join("/")+"/data"),o=s.children_aliases.findIndex(l=>"!PAL"===l);if(-1==o)throw new Error("Not a car");const a=new Wpe(e,s.children[o].data.colors[254]>>>8,n.previewPaths$.value[0].substring(0,n.previewPaths$.value[0].lastIndexOf("/"))+"/assets");n.customControls=[{title:"TNFS car features",controls:[{label:"Brake lights on",type:"checkbox",value:!1,change:l=>{a.tailLightsOn=l}},{label:"Car speed",type:"radio",options:["idle","slow","fast"],value:"idle",change:l=>{a.speed=l}},{label:"Steering angle",type:"slider",minValue:-.7,maxValue:.7,valueStep:.05,value:0,change:l=>{a.steeringAngle=l}}]}],n.cdr.markForCheck()}catch{}})()}postTmpUpdates(e){var n=this;return tt(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 tt(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)(E(Ql),E(ka),E(Zn))},i.\u0275cmp=ot({type:i,selectors:[["app-orip-geometry-block-ui"]],inputs:{resource:"resource"},outputs:{changed:"changed"},decls:4,vars:7,consts:[[3,"paths","customControls","onObjectLoaded"],[3,"resource"]],template:function(e,n){1&e&&(W(0,"app-obj-viewer",0),Ue("onObjectLoaded",function(s){return n.onObjectLoaded(s)}),Ct(1,"async"),j(),De(2,"app-compound-block-ui",1),Ct(3,"async")),2&e&&(U("paths",Tt(1,3,n.previewPaths$))("customControls",n.customControls),G(2),U("resource",Tt(3,5,n._resource$)))},dependencies:[Jl,h$,pl],changeDetection:0}),i})();const g$=i=>{let t=i.block_class_mro.split("__")[0];return"ArrayBlock"===t?g$(i.child_schema)+"[]":t},Ype=["class","block-ui"];function qpe(i,t){if(1&i&&(W(0,"mat-label",7),Ve(1),j()),2&i){const e=he(2);U("matTooltip",e.resourceDescription),G(1),Qi("",null==e.resource?null:e.resource.name," ")}}function Xpe(i,t){if(1&i&&(W(0,"mat-option",8),Ve(1),j()),2&i){const e=t.$implicit,n=t.index,r=he(2);U("value",n)("disabled",r.disabled),G(1),Qi(" ",r.blockClassStr(e)," ")}}function Kpe(i,t){if(1&i){const e=di();Gr(0),fe(1,qpe,2,2,"mat-label",1),Ct(2,"async"),W(3,"div",2)(4,"mat-label"),Ve(5,"Resource type:"),j(),W(6,"mat-select",3),Ue("selectionChange",function(r){return an(e),zt(he().setChoiceIndex(r.value))}),fe(7,Xpe,2,3,"mat-option",4),j(),De(8,"app-block-actions",5),j(),De(9,"app-editor",6),$r()}if(2&i){const e=he();let n;G(1),U("ngIf",(null==e.resource?null:e.resource.name)&&(null==e.resource?null:e.resource.name)!=(null==(n=Tt(2,8,e.main.resource$))?null:n.name)),G(5),U("value",e.resourceData.choice_index)("disabled",e.disabled),G(1),U("ngForOf",e.resource.schema.possible_resource_schemas),G(1),U("resource",e.childResource),G(1),U("resource",e.childResource)("hideBlockActions",!0)("disabled",e.disabled)}}let _$=(()=>{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 We,this.blockClassStr=g$}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:rc(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)(E(ka))},i.\u0275cmp=ot({type:i,selectors:[["app-delegate",8,"block-ui"]],inputs:{resource:"resource",resourceDescription:"resourceDescription",hideBlockActions:"hideBlockActions",disabled:"disabled"},outputs:{changed:"changed"},attrs:Ype,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"],[3,"resource","hideBlockActions","disabled"],["matTooltipPosition","above",3,"matTooltip"],[3,"value","disabled"]],template:function(e,n){1&e&&fe(0,Kpe,10,10,"ng-container",0),2&e&&U("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 Zpe=["class","block-ui"];function Qpe(i,t){if(1&i&&(W(0,"mat-label",7),Ve(1),j()),2&i){const e=he(2);U("matTooltip",e.resourceDescription),G(1),Qi(" ",e.resource.name," ")}}function Jpe(i,t){if(1&i){const e=di();Gr(0),fe(1,Qpe,2,2,"mat-label",1),W(2,"mat-selection-list",2),Ue("selectionChange",function(r){return an(e),zt(he().onSelection(r))}),W(3,"mat-list-option",3),Ve(4," Left "),j(),W(5,"mat-list-option",4),Ve(6," Right "),j()(),W(7,"mat-form-field",5)(8,"mat-label"),Ve(9,"Texture ID"),j(),W(10,"input",6),Ue("ngModelChange",function(r){return an(e),zt(he().resource.data.texture_id=r)})("change",function(){return an(e),zt(he().changed.emit())}),j()(),$r()}if(2&i){const e=he();G(1),U("ngIf",e.resource.name),G(2),U("selected",e.resource.data.has_left_fence),G(2),U("selected",e.resource.data.has_right_fence),G(5),U("max",63)("min",0)("step",1)("ngModel",e.resource.data.texture_id)}}let eme=(()=>{class i{constructor(){this.resource=null,this.resourceDescription="",this.changed=new We}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=ot({type:i,selectors:[["app-fence-type",8,"block-ui"]],inputs:{resource:"resource",resourceDescription:"resourceDescription"},outputs:{changed:"changed"},attrs:Zpe,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&&fe(0,Jpe,11,7,"ng-container",0),2&e&&U("ngIf",n.resource)},dependencies:[vi,gl,mu,tc,_u,gu,Kc,vl,To,ic,Os,MC,wC],changeDetection:0}),i})(),tme=(()=>{class i{constructor(){this._resource=null,this.resourceMap={},this.changed=new We}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]=["",_l.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)(E(nb),E(bte),E(oR))},i.\u0275cmp=ot({type:i,selectors:[["app-run-custom-action",8,"dialog"]],attrs:nme,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&&(W(0,"h1",0),Ve(1),j(),W(2,"div",1)(3,"p"),Ve(4),j()(),W(5,"form",2),fe(6,ime,4,4,"mat-form-field",3),j(),W(7,"div",4)(8,"button",5),Ue("click",function(){return n.dialogRef.close()}),Ve(9,"Cancel"),j(),W(10,"button",6),Ue("click",function(){return n.submit()}),Ve(11,"Run"),j()()),2&e&&(G(1),Qi('Run action "',n.data.title,'"'),G(3),_i(n.data.description),G(1),U("formGroup",n.argsForm),G(1),U("ngForOf",n.data.args),G(4),U("disabled",n.argsForm.invalid))},dependencies:[So,IR,gl,tc,bR,vl,To,ic,ib,fV,pV,mV,Gh,fC],styles:["form[_ngcontent-%COMP%]{padding:0 24px}"]}),i})();function v$(i,t){return t?e=>Sy(t.pipe(Oi(1),function sme(){return ti((i,t)=>{i.subscribe(Yn(t,ms))})}()),e.pipe(v$(i))):ir((e,n)=>wr(i(e,n)).pipe(Oi(1),YB(e)))}function y$(i,t=$y){const e=OI(i,t);return v$(()=>e)}const ome=["mat-menu-item",""];function ame(i,t){1&i&&(ki(),W(0,"svg",3),De(1,"polygon",4),j())}const lme=[[["mat-icon"],["","matMenuItemIcon",""]],"*"],cme=["mat-icon, [matMenuItemIcon]","*"];function dme(i,t){if(1&i){const e=di();W(0,"div",0),Ue("keydown",function(r){return an(e),zt(he()._handleKeydown(r))})("click",function(){return an(e),zt(he().closed.emit("click"))})("@transformMenu.start",function(r){return an(e),zt(he()._onAnimationStart(r))})("@transformMenu.done",function(r){return an(e),zt(he()._onAnimationDone(r))}),W(1,"div",1),Wt(2),j()()}if(2&i){const e=he();U("id",e.panelId)("ngClass",e._classList)("@transformMenu",e._panelAnimationState),Dt("aria-label",e.ariaLabel||null)("aria-labelledby",e.ariaLabelledby||null)("aria-describedby",e.ariaDescribedby||null)}}const ume=["*"],xO=new me("MAT_MENU_PANEL"),hme=YM(jM(class{}));let eE=(()=>{class i extends hme{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 Re,this._focused=new Re,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",jr("120ms cubic-bezier(0, 0, 0.2, 1)",si({opacity:1,transform:"scale(1)"}))),Pr("* => void",jr("100ms 25ms linear",si({opacity:0})))]),fadeInItems:Ra("fadeInItems",[Ps("showing",si({opacity:1})),Pr("void => *",[si({opacity:0}),jr("400ms 100ms cubic-bezier(0.55, 0, 0.55, 0.2)")])])};let pme=0;const b$=new me("mat-menu-default-options",{providedIn:"root",factory:function mme(){return{overlapTrigger:!1,xPosition:"after",yPosition:"below",backdropClass:"cdk-overlay-transparent-backdrop"}}});let e0=(()=>{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 om,this._classList={},this._panelAnimationState="void",this._animationDone=new Re,this.overlayPanelClass=this._defaultOptions.overlayPanelClass||"",this.backdropClass=this._defaultOptions.backdropClass,this._overlapTrigger=this._defaultOptions.overlapTrigger,this._hasBackdrop=this._defaultOptions.hasBackdrop,this.closed=new We,this.close=this.closed,this.panelId="mat-menu-panel-"+pme++}ngOnInit(){this.setPositionClasses()}ngAfterContentInit(){this._updateDirectDescendants(),this._keyManager=new RU(this._directDescendantItems).withWrap().withTypeAhead().withHomeAndEnd(),this._keyManager.tabOut.subscribe(()=>this.closed.emit("tab")),this._directDescendantItems.changes.pipe(Ao(this._directDescendantItems),Rs(e=>Mr(...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(Ao(this._directDescendantItems),Rs(n=>Mr(...n.map(r=>r._hovered))))}addItem(e){}removeItem(e){}_handleKeydown(e){const n=e.keyCode,r=this._keyManager;switch(n){case 27:Xo(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(Oi(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(Ao(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)(E(mt),E(ft),E(b$),E(Zn))},i.\u0275dir=ve({type:i,contentQueries:function(e,n,r){if(1&e&&(Wi(r,fme,5),Wi(r,eE,5),Wi(r,eE,4)),2&e){let s;Et(s=At())&&(n.lazyContent=s.first),Et(s=At())&&(n._allItems=s),Et(s=At())&&(n.items=s)}},viewQuery:function(e,n){if(1&e&&Wn(Mo,5),2&e){let r;Et(r=At())&&(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})(),gme=(()=>{class i extends e0{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)(E(mt),E(ft),E(b$),E(Zn))},i.\u0275cmp=ot({type:i,selectors:[["mat-menu"]],hostVars:3,hostBindings:function(e,n){2&e&&Dt("aria-label",null)("aria-labelledby",null)("aria-describedby",null)},exportAs:["matMenu"],features:[Dn([{provide:xO,useExisting:i}]),lt],ngContentSelectors:ume,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&&(sr(),fe(0,dme,3,6,"ng-template"))},dependencies:[hm],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:[tE.transformMenu,tE.fadeInItems]},changeDetection:0}),i})();const x$=new me("mat-menu-scroll-strategy"),vme={provide:x$,deps:[as],useFactory:function _me(i){return()=>i.scrollStrategies.reposition()}},w$=Oh({passive:!0});let yme=(()=>{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,d){this._overlay=e,this._element=n,this._viewContainerRef=r,this._menuItemInstance=a,this._dir=l,this._focusMonitor=c,this._ngZone=d,this._overlayRef=null,this._menuOpen=!1,this._closingActionsSubscription=Zt.EMPTY,this._hoverSubscription=Zt.EMPTY,this._menuCloseSubscription=Zt.EMPTY,this._changeDetectorRef=Ft(Zn),this._handleTouchStart=h=>{qI(h)||(this._openedBy="touch")},this._openedBy=void 0,this.restoreFocus=!0,this.menuOpened=new We,this.onMenuOpen=this.menuOpened,this.menuClosed=new We,this.onMenuClose=this.menuClosed,this._scrollStrategy=s,this._parentMaterialMenu=o instanceof e0?o:void 0,n.nativeElement.addEventListener("touchstart",this._handleTouchStart,w$)}ngAfterContentInit(){this._handleHover()}ngOnDestroy(){this._overlayRef&&(this._overlayRef.dispose(),this._overlayRef=null),this._element.nativeElement.removeEventListener("touchstart",this._handleTouchStart,w$),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 e0&&(e._startAnimation(),e._directDescendantItems.changes.pipe(He(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 e0?(n._resetAnimation(),n.lazyContent?n._animationDone.pipe(gn(r=>"void"===r.toState),Oi(1),He(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],[d,h]=[r,s],p=0;if(this.triggersSubmenu()){if(h=r="before"===e.xPosition?"start":"end",s=d="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:d,overlayY:o,offsetY:p},{originX:s,originY:l,overlayX:h,overlayY:o,offsetY:p},{originX:r,originY:c,overlayX:d,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 Mr(e,this._parentMaterialMenu?this._parentMaterialMenu.closed:ht(),this._parentMaterialMenu?this._parentMaterialMenu._hovered().pipe(gn(o=>o!==this._menuItemInstance),gn(()=>this._menuOpen)):ht(),n)}_handleMousedown(e){YI(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(gn(e=>e===this._menuItemInstance&&!e.disabled),y$(0,PI)).subscribe(()=>{this._openedBy="mouse",this.menu instanceof e0&&this.menu._isAnimating?this.menu._animationDone.pipe(Oi(1),y$(0,PI),He(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)(E(as),E(mt),E(Wr),E(x$),E(xO,8),E(eE,10),E(Ia,8),E(qc),E(ft))},i.\u0275dir=ve({type:i,hostVars:3,hostBindings:function(e,n){1&e&&Ue("click",function(s){return n._handleClick(s)})("mousedown",function(s){return n._handleMousedown(s)})("keydown",function(s){return n._handleKeydown(s)}),2&e&&Dt("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})(),bme=(()=>{class i extends yme{}return i.\u0275fac=function(){let t;return function(n){return(t||(t=ri(i)))(n||i)}}(),i.\u0275dir=ve({type:i,selectors:[["","mat-menu-trigger-for",""],["","matMenuTriggerFor",""]],hostAttrs:[1,"mat-mdc-menu-trigger"],exportAs:["matMenuTrigger"],features:[lt]}),i})(),xme=(()=>{class i{}return i.\u0275fac=function(e){return new(e||i)},i.\u0275mod=nn({type:i}),i.\u0275inj=Kt({providers:[vme],imports:[Eo,eb,Qn,Pm,Xy,Qn]}),i})();function wme(i,t){if(1&i){const e=di();W(0,"button",7),Ue("click",function(){return an(e),zt(he(2).deserialize())}),De(1,"mat-icon",8),j()}}function Mme(i,t){if(1&i){const e=di();Gr(0),fe(1,wme,2,0,"button",4),W(2,"button",5),Ue("click",function(){return an(e),zt(he().serializeBlockReversible())}),De(3,"mat-icon",6),j(),$r()}if(2&i){const e=he();G(1),U("ngIf",e.isInReversibleSerializationState),G(1),U("disabled",e.isInReversibleSerializationState)}}function Cme(i,t){1&i&&(W(0,"button",9),De(1,"mat-icon",10),j()),2&i&&(he(),U("matMenuTriggerFor",Zi(3)))}function Sme(i,t){if(1&i){const e=di();W(0,"button",11),Ue("click",function(){const s=an(e).$implicit;return zt(he().runCustomAction(s))}),W(1,"span"),Ve(2),j()()}if(2&i){const e=t.$implicit;G(2),_i(e.title)}}const Eme=function(){return[]};let nE=(()=>{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 tt(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)(E(ka),E(Ql),E(Zn),E(Bm),E(IV))},i.\u0275cmp=ot({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&&(fe(0,Mme,4,2,"ng-container",0),fe(1,Cme,2,1,"button",1),W(2,"mat-menu",null,2),fe(4,Sme,3,1,"button",3),j()),2&e&&(U("ngIf",null==n.resource||null==n.resource.schema?null:n.resource.schema.serializable_to_disc),G(1),U("ngIf",(null==n.resource||null==n.resource.schema.custom_actions?null:n.resource.schema.custom_actions.length)>0),G(3),U("ngForOf",(null==n.resource?null:n.resource.schema.custom_actions)||so(3,Eme)))},dependencies:[So,vi,Os,XM,gR,gme,eE,bme],styles:["[_nghost-%COMP%]{display:flex}"]}),i})();const Ame=["class","block-ui"];function Dme(i,t){if(1&i&&(W(0,"mat-label",7),Ve(1),j()),2&i){const e=he();U("matTooltip",e.resourceDescription),G(1),Qi("",null==e.resource?null:e.resource.name," ")}}function Tme(i,t){if(1&i&&(W(0,"audio",8),De(1,"source",9),Ct(2,"async"),Ve(3," Your browser does not support the audio element. "),j()),2&i){const e=he();G(1),U("src",Tt(2,1,e.audioUrl$),Lp)}}function Ime(i,t){1&i&&De(0,"mat-spinner",10)}function Rme(i,t){1&i&&De(0,"app-block-actions",11),2&i&&U("resource",he().resource)}const kme=function(){return["wave_data"]};let Pme=(()=>{class i{constructor(e,n){this.eelDelegate=e,this.main=n,this._resource$=new gt(null),this.audioUrl$=new gt(null),this.resourceDescription="",this.hideBlockActions=!1,this.destroyed$=new Re,this.changed=new We}set resource(e){this._resource$.next(e)}get resource(){return this._resource$.getValue()}ngAfterViewInit(){var e=this;return tt(function*(){e._resource$.pipe(He(e.destroyed$)).subscribe(function(){var n=tt(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)(E(Ql),E(ka))},i.\u0275cmp=ot({type:i,selectors:[["app-eacs-audio",8,"block-ui"]],inputs:{resource:"resource",resourceDescription:"resourceDescription",hideBlockActions:"hideBlockActions"},outputs:{changed:"changed"},attrs:Ame,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&&(W(0,"div",0),fe(1,Dme,2,2,"mat-label",1),Ct(2,"async"),fe(3,Tme,4,3,"audio",2),Ct(4,"async"),fe(5,Ime,1,0,"mat-spinner",3),Ct(6,"async"),De(7,"div",4),fe(8,Rme,1,1,"app-block-actions",5),j(),De(9,"app-compound-block-ui",6),Ct(10,"async")),2&e){let r;G(1),U("ngIf",(null==n.resource?null:n.resource.name)&&(null==n.resource?null:n.resource.name)!=(null==(r=Tt(2,7,n.main.resource$))?null:r.name)),G(2),U("ngIf",Tt(4,9,n.audioUrl$)),G(2),U("ngIf",n.resource&&!Tt(6,11,n.audioUrl$)),G(3),U("ngIf",!n.hideBlockActions),G(1),U("resource",Tt(10,13,n._resource$))("hideBlockActions",!0)("fieldBlacklist",so(15,kme))}},dependencies:[vi,To,Os,Jb,Jl,nE,pl],styles:["#header[_ngcontent-%COMP%]{display:flex}"]}),i})();class Ome{constructor(t,e){this.mesh=t,this.assetsPath=e,this.textures=[],this.tyreTextureUpdateTimer=void 0,this.tyreMaterial=null,this.tyreTextures=[],this._color=65280,this._speed="idle",this._steeringAngle=0,this.wheels=[],this.wheelIdlePositions=[],this.frontWheels=[];let n=new Set;if(t.traverse(r=>{if(!(r instanceof Mn))return;let s=-1;if(r.name.startsWith("part_hp_12")?s=0:r.name.startsWith("part_hp_14")?s=1:r.name.startsWith("part_hp_16")?s=2:r.name.startsWith("part_hp_18")&&(s=3),s>-1){r.geometry.boundingBox||r.geometry.computeBoundingBox();let a=Pe.avg(r.geometry.boundingBox.min,r.geometry.boundingBox.max);return(0==s||2==s)&&(a={x:a.x,y:a.y,z:a.z+1.5}),r.geometry.translate(...Pe.spr(Pe.neg(a))),r.position.set(...Pe.spr(a)),this.wheelIdlePositions[s]=a,this.wheels.push(r),void(s<2&&this.frontWheels.push(r))}const o=r.material.map;o&&n.add(o)}),this.textures=Array.from(n).map(r=>{const s=new ko(document.createElement("img"));return s.flipY=r.flipY,ia(s),[r,s]}),t.traverse(r=>{if(!(r instanceof Mn))return;const s=r.material.map;if(s){const o=this.textures.find(([a,l])=>a===s);o&&(r.material.map=o[1])}}),this.hasWheels){const r=new Pu;this.tyreTextures=[0,1,2,3].map(s=>r.load(`${e}/m${s}00.png`));for(const s of this.tyreTextures)ia(s);this.tyreMaterial=new qi({map:this.tyreTextures[0]}),this.tyreMaterial.transparent=!0,this.tyreMaterial.alphaTest=.5,this.tyreMaterial.map.wrapS=Ii,this.tyreMaterial.map.wrapT=Ii,this.tyreMaterial.polygonOffset=!0,this.tyreMaterial.polygonOffsetFactor=-4;for(const s of this.wheels)s.material=this.tyreMaterial}this.color=65280,this.recolorCar().then()}get color(){return this._color}set color(t){t!==this._color&&(this._color=t,this.recolorCar().then())}get speed(){return this._speed}set speed(t){if(t!==this._speed){switch(this._speed=t,this.tyreTextureUpdateTimer&&clearInterval(this.tyreTextureUpdateTimer),t){case"idle":this.tyreMaterial.map=this.tyreTextures[0];break;case"slow":let e=!0;this.tyreTextureUpdateTimer=setInterval(()=>{this.tyreMaterial.map=this.tyreTextures[e?1:2],this.tyreMaterial.needsUpdate=!0,e=!e},16);break;case"fast":this.tyreMaterial.map=this.tyreTextures[3]}this.tyreMaterial.needsUpdate=!0}}get steeringAngle(){return this._steeringAngle}set steeringAngle(t){if(t!==this._steeringAngle){this._steeringAngle=t;for(const e of this.frontWheels)e.rotation.set(0,0,t)}}get hasWheels(){return this.wheels.length>0}recolorCar(){var t=this;return tt(function*(){const[e,n,r]=[t.color>>16,t.color>>8&255,255&t.color];for(const[s,o]of t.textures){for(let a=100;a>0&&!s.source.data;a--)yield p$(50);m$(s.source.data,(a,l)=>{if(a[l]+a[l+2]{class i{constructor(e,n,r){this.eelDelegate=e,this.main=n,this.cdr=r,this._resource$=new gt(null),this.changed=new We,this.customControls=[],this.previewPaths$=new gt(null),this.destroyed$=new Re,this.serializerSettings={geometry__save_obj:!0,geometry__save_blend:!1,geometry__export_to_gg_web_engine:!1}}get resource(){return this._resource$.getValue()}set resource(e){this._resource$.next(e)}ngAfterViewInit(){var e=this;return tt(function*(){e._resource$.pipe(He(e.destroyed$)).subscribe(function(){var n=tt(function*(r){e.previewPaths$.next(yield e.loadPreviewFilePaths(r?.id))});return function(r){return n.apply(this,arguments)}}()),e.main.dataBlockChange$.pipe(He(e.destroyed$),gn(([n,r])=>!!e.resource&&n.startsWith(e.resource.id)),ml(1500)).subscribe(tt(function*(){e.previewPaths$.next(null),e.previewPaths$.next(yield e.postTmpUpdates(e.resource?.id))}))})()}onObjectLoaded(e){var n=this;return tt(function*(){try{const r=new Ome(e,n.previewPaths$.value[0].substring(0,n.previewPaths$.value[0].lastIndexOf("/"))+"/assets");let s=null;const o=a=>{s&&clearTimeout(s),s=setTimeout(()=>r.color=a,50)};n.customControls=[{title:"NFS2 car features",controls:[{label:"Car color",type:"color",value:65280,change:a=>o(a)}]}],r.hasWheels&&n.customControls[0].controls.push({label:"Car speed",type:"radio",options:["idle","slow","fast"],value:"idle",change:a=>{r.speed=a}},{label:"Steering angle",type:"slider",minValue:-.7,maxValue:.7,valueStep:.05,value:0,change:a=>{r.steeringAngle=a}}),n.cdr.markForCheck()}catch(r){console.error(r)}})()}postTmpUpdates(e){var n=this;return tt(function*(){if(e){const r=yield n.eelDelegate.serializeResourceTmp(e,Object.entries(n.main.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 tt(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)(E(Ql),E(ka),E(Zn))},i.\u0275cmp=ot({type:i,selectors:[["app-geo-geometry",8,"block-ui"]],inputs:{resource:"resource"},outputs:{changed:"changed"},attrs:Fme,decls:4,vars:8,consts:[[3,"paths","groupFunction","customControls","onObjectLoaded"],[3,"resource",4,"ngIf"],[3,"resource"]],template:function(e,n){1&e&&(W(0,"app-obj-viewer",0),Ue("onObjectLoaded",function(s){return n.onObjectLoaded(s)}),Ct(1,"async"),j(),fe(2,Lme,2,3,"app-compound-block-ui",1),Ct(3,"async")),2&e&&(U("paths",Tt(1,4,n.previewPaths$))("groupFunction",n.previewObjectGroupFunc)("customControls",n.customControls),G(2),U("ngIf",!Tt(3,6,n.main.hideHiddenFields$)))},dependencies:[vi,Jl,h$,pl],changeDetection:0}),i})();const Bme=function(){return["children","items_descr"]};let Ume=(()=>{class i{constructor(){this._resource=null,this.hideBlockActions=!1,this.resourceMap={},this.changed=new We}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:rc(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=ot({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&&De(0,"app-compound-block-ui",0)(1,"app-sidenav-res-list",1),2&e&&(U("resource",n.resource)("hideBlockActions",n.hideBlockActions)("fieldBlacklist",so(4,Bme)),G(1),U("resources",n.resourceMap))},dependencies:[Jl,xC],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})();const Vme=["previewCanvasContainer"],zme=["previewCanvas"];function Hme(i,t){1&i&&De(0,"mat-spinner",16),2&i&&U("diameter",40)}function Gme(i,t){1&i&&De(0,"mat-spinner",17)}var Df=(()=>{return(i=Df||(Df={})).ThreeModel="model",i.Bitmap="bitmap",i.TwoSidedBitmap="two_sided_bitmap",Df;var i})();class $me extends QH{constructor(t,e,n){super(t,{loadDepth:40,inertia:2}),this.mapGraph=t,this.qfsPath=e,this.hideUnknownEntities$=n,this.textureLoader=new Pu,this.terrainMaterials={},this.objLoader=new Qb,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(Zl(),He(this._onRemoved$)).subscribe(e=>{for(const n of this.unknownEntities)n.visible=!e})}getPlaceholderTexture(){var t=this;return tt(function*(){return t._placeholder?t._placeholder:(t._placeholderPromise||(t._placeholderPromise=t.textureLoader.loadAsync("assets/placeholder_texture.png")),t._placeholderPromise)})()}getPlaceholderTerrainTexture(){var t=this;return tt(function*(){return t._placeholderTerrain?t._placeholderTerrain:(t._placeholderTerrainPromise||(t._placeholderTerrainPromise=t.textureLoader.loadAsync("assets/placeholder_texture.png").then(e=>(e.wrapS=Pa,e.wrapT=Ii,ia(e),e.flipY=!0,e))),t._placeholderTerrainPromise)})()}loadChunk(t){var e=this;return tt(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 Mn&&(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:Pe.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:Yi.fromAngle(Pe.nZ,l.rotation)}));const o=(yield Promise.all(s.map(l=>e.loadPropInternal(l)))).filter(l=>!!l),a=new Zo({object3D:new na(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 qi({side:Ls,transparent:!0,visible:!1}),this.qfsPath?this.textureLoader.loadAsync(`${this.qfsPath}/${t}.png`).then(e=>{e.wrapS=Pa,e.wrapT=Ii,ia(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 tt(function*(){let n=!1;if(t.type==Df.ThreeModel){let r;try{if(!e.qfsPath)throw new Error;const o=new bO,a=new Qb,l=yield o.loadAsync(`${e.qfsPath}/props/${t.data.data.resource_id}/0/material.mtl`);l.preload(),a.setMaterials(l),r=new na(yield a.loadAsync(`${e.qfsPath}/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 Mn){const a=o.material instanceof Array?o.material:[o.material];for(const l of a)l.transparent=!0,l.alphaTest=.5,l instanceof qi&&l.map&&(l.map.wrapS=Ii,l.map.wrapT=Ii,ia(l.map),l.map.needsUpdate=!0)}});const s=new Zo({object3D: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,d)=>new Array(d).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 Fo,[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,d]=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 Zo({object3D:new na(s)});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 tt(function*(){const s=t.split(";"),o=yield r.getPlaceholderTexture();let a=!1,l=[];r.qfsPath?l=yield Promise.all(s.map(h=>r.textureLoader.loadAsync(`${r.qfsPath}/foreground/${h}.png`).catch(()=>(a=!0,o)))):(a=!0,l=s.map(()=>o));const c=l.map(h=>(ia(h),new qi({map:h,alphaTest:.5,transparent:!0,side:Ls}))),d=new Mn(new Iu(e.x,e.y),c[0]);if(d.rotateX(Math.PI/2),d.position.set(0,0,e.y/2),c.length>1){let h=-1;Ym(r.world).pipe(o4(n&&!isNaN(+n)?1e3*+n:250)).subscribe(()=>{h=(h+1)%c.length,d.material=c[h]})}return[d,a]})()}}let Wme=(()=>{class i{constructor(e,n,r){this.eelDelegate=e,this.cdr=n,this.mainService=r,this._resource$=new gt(null),this.changed=new We,this.previewLoading$=new gt(!0),this.previewQfsLocation$=new gt(null),this.previewQfsLoading$=new gt(!1),this.pointer$=new gt(null),this.selectedSplineIndex$=new gt(0),this.qfsPath=null,this.name="",this.renderer=null,this.map=null,this.roadPath=null,this.destroyed$=new Re}get resource(){return this._resource$.getValue()}set resource(e){this._resource$.next(e)}get roadSpline(){return this.resource?.data.block_positions||[]}ngAfterViewInit(){var e=this;return tt(function*(){var s;e.world=new sk(new vO,{init:(s=tt(function*(){}),function(){return s.apply(this,arguments)}),simulate:()=>{},loader:{loadFromGgGlb:function(){var s=tt(function*(...o){return[]});return function(){return s.apply(this,arguments)}}()}}),yield e.world.init(),e.skySphere=new Zo({object3D:e.world.visualScene.factory.createPrimitive({shape:"SPHERE",radius:1e3},{color:16777215})}),e.skySphere.object3D.nativeMesh.material.side=Ls,e.world.addEntity(e.skySphere),e.selectionSphere=new Zo({object3D: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 $S(16777215,2));let n=new gt({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=Yi.lookAt(e.renderer.camera.position,Pe.add(e.renderer.camera.position,Pe.Y),Pe.Z),Ym(e.world).pipe(He(e.destroyed$)).subscribe(()=>{e.renderer&&(e.skySphere.position=e.renderer.camera.position,e.pointer$.next(e.renderer.camera.position))}),e.controller=new n4(e.world.keyboardInput,e.renderer,{mouseOptions:{canvas:e.previewCanvas.nativeElement,pointerLock:!0},keymap:"wasd+arrows",cameraLinearSpeed:40,cameraBoostMultiplier:4,cameraMovementElasticity:100,cameraRotationElasticity:30,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(He(e.destroyed$)).subscribe(function(){var s=tt(function*(o){e.previewLoading$.next(!0),o?(e.previewQfsLocation$.next(o.id.substring(0,o.id.indexOf(".TRK"))+"0.QFS"),yield e.loadTerrainChunks(o.id),yield e.onQfsSelected(e.previewQfsLocation$.value)):(yield e.loadTerrainChunks(),yield e.loadPreview()),e.previewLoading$.next(!1)});return function(o){return s.apply(this,arguments)}}()),e.mainService.dataBlockChange$.pipe(He(e.destroyed$),gn(([s,o])=>!!e.resource&&s.startsWith(e.resource.id)),ml(3e3)).subscribe(tt(function*(){e.previewLoading$.next(!0),yield e.postTmpUpdates(e.resource?.id),yield e.loadPreview(),e.previewLoading$.next(!1)})),e.selectedSplineIndex$.pipe(He(e.destroyed$),ml(250)).subscribe(s=>{if(e.resource){let o=e.resource.data.block_positions[s];if(!o)return;o={x:o.x,y:o.z,z:o.y},e.selectionSphere.position=o,e.renderer&&(e.renderer.position=Pe.add(o,Pe.rotAround({x:10,y:-12,z:5},{x:0,y:0,z:1},-0)),e.renderer.rotation=Yi.lookAt(e.renderer.position,o,{x:0,y:0,z:1}),e.controller.reset())}})})()}onQfsSelected(e){var n=this;return tt(function*(){if(n.qfsPath!=e){n.previewQfsLoading$.next(!0);try{const r=yield n.eelDelegate.serializeResource(e),s=new Pu,o=r.find(a=>a.endsWith("spherical.png"));if(o){const a=yield s.loadAsync(o);a.colorSpace="srgb",a.mapping=lc,n.skySphere.object3D.nativeMesh.material.map=a}else n.skySphere.object3D.nativeMesh.material.map=null;n.skySphere.object3D.nativeMesh.material.needsUpdate=!0,n.qfsPath=e}catch{n.skySphere.object3D.nativeMesh.material.map=null,n.skySphere.object3D.nativeMesh.material.needsUpdate=!0,n.qfsPath=null}finally{n.previewQfsLoading$.next(!1)}yield n.loadPreview()}})()}loadTerrainChunks(e){var n=this;return tt(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 tt(function*(){if(e.roadPath=e.resource?.data.block_positions.map(r=>({x:r.x,y:r.z,z:r.y})),!e.terrainChunksObjLocation||!e.roadPath)return;const n=Km.fromMapArray(e.roadPath.map((r,s)=>({path:`${e.terrainChunksObjLocation}terrain_chunk_${s}`,position:r,loadOptions:{}}))||[],!0);e.unloadPreview(),e.map=new $me(n,e.qfsPath&&"resources/"+e.qfsPath,e.mainService.hideHiddenFields$),e.map.resource=e.resource,e.map.isOpenedTrack=!1,Ym(e.world).pipe(He(e.destroyed$)).subscribe(()=>{e.map&&e.renderer&&e.map.loaderCursor$.next(e.renderer.position)}),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 tt(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)(E(Ql),E(Zn),E(ka))},i.\u0275cmp=ot({type:i,selectors:[["app-trk-map-block-ui"]],viewQuery:function(e,n){if(1&e&&(Wn(Vme,5),Wn(zme,5)),2&e){let r;Et(r=At())&&(n.previewCanvasContainer=r.first),Et(r=At())&&(n.previewCanvas=r.first)}},inputs:{resource:"resource"},outputs:{changed:"changed"},decls:32,vars:24,consts:[[1,"qfsSelector"],["appearance","fill"],["matInput","","type","text",3,"value"],["customQfsInput",""],["mat-button","",3,"click"],["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"],["mode","indeterminate",3,"diameter"],["mode","indeterminate"]],template:function(e,n){if(1&e){const r=di();W(0,"div",0)(1,"h4"),Ve(2,"Preview QFS file"),j(),W(3,"mat-form-field",1)(4,"mat-label"),Ve(5,"Custom QFS path"),j(),De(6,"input",2,3),Ct(8,"async"),j(),W(9,"button",4),Ue("click",function(){an(r);const o=Zi(7);return zt(n.onQfsSelected(o.value))}),Ve(10,"LOAD"),j(),fe(11,Hme,1,1,"mat-spinner",5),Ct(12,"async"),j(),W(13,"div",6)(14,"div",7,8),De(16,"canvas",9,10),fe(18,Gme,1,0,"mat-spinner",11),Ct(19,"async"),j(),W(20,"div",12,8)(22,"mat-form-field",1)(23,"mat-label"),Ve(24,"Spline item"),j(),W(25,"input",13),Ue("ngModelChange",function(o){return n.selectedSplineIndex$.next(o)}),Ct(26,"async"),Ct(27,"async"),j()(),De(28,"app-tri-minimap",14),Ct(29,"async"),j()(),De(30,"app-compound-block-ui",15),Ct(31,"async")}if(2&e){let r;G(6),U("value",Tt(8,10,n.previewQfsLocation$)),G(5),U("ngIf",Tt(12,12,n.previewQfsLoading$)),G(7),U("ngIf",Tt(19,14,n.previewLoading$)),G(7),U("min",0)("max",4*(null==(r=Tt(26,16,n._resource$))?null:r.data.num_blocks)-1)("ngModel",Tt(27,18,n.selectedSplineIndex$)),G(3),U("roadSpline",n.roadSpline)("pointer",Tt(29,20,n.pointer$))("splineClosed",!0),G(2),U("resource",Tt(31,22,n._resource$))}},dependencies:[vi,gl,mu,tc,_u,gu,Kc,vl,To,ic,ib,Jb,Jl,f$,pl],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}.qfsSelector[_ngcontent-%COMP%]{display:flex;align-items:center;width:100%;column-gap:1rem}.qfsSelector[_ngcontent-%COMP%] h4[_ngcontent-%COMP%]{min-width:-moz-fit-content;min-width:fit-content}.qfsSelector[_ngcontent-%COMP%] mat-form-field[_ngcontent-%COMP%]{flex-grow:1}.qfsSelector[_ngcontent-%COMP%] mat-spinner[_ngcontent-%COMP%], .qfsSelector[_ngcontent-%COMP%] button[_ngcontent-%COMP%]{margin-bottom:1.34375em}"],changeDetection:0}),i})();function jme(i,t){if(1&i&&(W(0,"mat-error"),Ve(1),j()),2&i){const e=he(2);G(1),tm(" ",e.resourceError.data.error_class,": ",e.resourceError.data.error_text," ")}}function Yme(i,t){1&i&&De(0,"mat-spinner",5)}function qme(i,t){if(1&i&&(W(0,"div",2),fe(1,jme,2,2,"mat-error",3),fe(2,Yme,1,0,"mat-spinner",4),j()),2&i){const e=he();G(1),U("ngIf",e.resourceError),G(1),U("ngIf",!e.resourceError)}}function Xme(i,t){}let t0=(()=>{class i{constructor(e){this.mainService=e,this._component=null,this._componentChangedSub=null,this.destroyed$=new Re,this.resourceSet$=new Re,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(He(this.destroyed$),He(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 Kme(i,t){1&i&&De(0,"mat-icon",17)}function Zme(i,t){1&i&&De(0,"mat-icon",18)}let Qme=(()=>{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 tt(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 tt(function*(){if(e.mainService.hasUnsavedChanges){let n=e.dialog.open(CV,{data:{text:"There are unsaved changes, which will be lost. Are you sure you want to reload file?"}});if(!(yield lR(n.afterClosed())))return}yield e.mainService.reloadResource(),e.cdr.markForCheck()})()}}return i.\u0275fac=function(e){return new(e||i)(E(Ql),E(ka),E(Bm),E(IV),E(Zn))},i.\u0275cmp=ot({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&&(W(0,"mat-toolbar",0)(1,"span"),Ve(2),Ct(3,"async"),Ct(4,"async"),j(),De(5,"span",1),W(6,"button",2),Ue("click",function(){return n.toggleUnknownsVisibility()}),fe(7,Kme,1,0,"mat-icon",3),Ct(8,"async"),fe(9,Zme,1,0,"mat-icon",4),Ct(10,"async"),j(),De(11,"mat-divider",5)(12,"app-block-actions",6),Ct(13,"async"),W(14,"button",7),Ue("click",function(){return n.reloadResource()}),Ct(15,"async"),De(16,"mat-icon",8),j(),De(17,"mat-divider",5),W(18,"button",9),Ue("click",function(){return n.saveResource()}),Ct(19,"async"),Ct(20,"async"),De(21,"mat-icon",10),j()(),W(22,"div",11),De(23,"div",12)(24,"app-editor",13),Ct(25,"async"),Ct(26,"async"),Ct(27,"async"),W(28,"div",14)(29,"a",15),De(30,"img",16),j()(),De(31,"div",12),j()),2&e){let r;G(2),tm("",(null==(r=Tt(3,9,n.mainService.resource$))?null:r.name)||"...","",Tt(4,11,n.mainService.hasUnsavedChanges$)?"*":"",""),G(5),U("ngIf",Tt(8,13,n.mainService.hideHiddenFields$)),G(2),U("ngIf",!Tt(10,15,n.mainService.hideHiddenFields$)),G(3),U("resource",Tt(13,17,n.mainService.resource$)),G(2),U("disabled",!Tt(15,19,n.mainService.eelDelegate.openedResourcePath$)),G(4),U("disabled",!Tt(19,21,n.mainService.resource$)||!Tt(20,23,n.mainService.hasUnsavedChanges$)),G(6),U("resource",Tt(25,25,n.mainService.customActionRunning$)?null:Tt(26,27,n.mainService.resource$)||Tt(27,29,n.mainService.error$))("hideBlockActions",!0)}},dependencies:[vi,CJ,EJ,Os,XM,gR,t0,nE,pl],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 M$(i){return new pe(3e3,!1)}function Pge(){return typeof window<"u"&&typeof window.document<"u"}function wO(){return typeof process<"u"&&"[object process]"==={}.toString.call(process)}function Nu(i){switch(i.length){case 0:return new tb;case 1:return i[0];default:return new oV(i)}}function C$(i,t,e,n,r=new Map,s=new Map){const o=[],a=[];let l=-1,c=null;if(n.forEach(d=>{const h=d.get("offset"),p=h==l,m=p&&c||new Map;d.forEach((g,b)=>{let v=b,y=g;if("offset"!==b)switch(v=t.normalizePropertyName(v,o),y){case rR:y=r.get(b);break;case Xc: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 xge(i){return new pe(3502,!1)}();return a}function MO(i,t,e,n){switch(t){case"start":i.onStart(()=>n(e&&CO(e,"start",i)));break;case"done":i.onDone(()=>n(e&&CO(e,"done",i)));break;case"destroy":i.onDestroy(()=>n(e&&CO(e,"destroy",i)))}}function CO(i,t,e){const s=SO(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 SO(i,t,e,n,r="",s=0,o){return{element:i,triggerName:t,fromState:e,toState:n,phaseName:r,totalTime:s,disabled:!!o}}function ra(i,t,e){let n=i.get(t);return n||i.set(t,n=e),n}function S$(i){const t=i.indexOf(":");return[i.substring(1,t),i.slice(t+1)]}let EO=(i,t)=>!1,E$=(i,t,e)=>[],A$=null;function AO(i){const t=i.parentNode||i.host;return t===A$?null:t}(wO()||typeof Element<"u")&&(Pge()?(A$=(()=>document.documentElement)(),EO=(i,t)=>{for(;t;){if(t===i)return!0;t=AO(t)}return!1}):EO=(i,t)=>i.contains(t),E$=(i,t,e)=>{if(e)return Array.from(i.querySelectorAll(t));const n=i.querySelector(t);return n?[n]:[]});let Tf=null,D$=!1;const T$=EO,I$=E$;let R$=(()=>{class i{validateStyleProperty(e){return function Fge(i){Tf||(Tf=function Lge(){return typeof document<"u"?document.body:null}()||{},D$=!!Tf.style&&"WebkitAppearance"in Tf.style);let t=!0;return Tf.style&&!function Oge(i){return"ebkit"==i.substring(1,6)}(i)&&(t=i in Tf.style,!t&&D$&&(t="Webkit"+i.charAt(0).toUpperCase()+i.slice(1)in Tf.style)),t}(e)}matchesElement(e,n){return!1}containsElement(e,n){return T$(e,n)}getParentElement(e){return AO(e)}query(e,n,r){return I$(e,n,r)}computeStyle(e,n,r){return r||""}animate(e,n,r,s,o,a=[],l){return new tb(r,s)}}return i.\u0275fac=function(e){return new(e||i)},i.\u0275prov=ke({token:i,factory:i.\u0275fac}),i})(),DO=(()=>{class i{}return i.NOOP=new R$,i})();const Nge=1e3,TO="ng-enter",iE="ng-leave",rE="ng-trigger",sE=".ng-trigger",P$="ng-animating",IO=".ng-animating";function hd(i){if("number"==typeof i)return i;const t=i.match(/^(-?[\.\d]+)(m?s)/);return!t||t.length<2?0:RO(parseFloat(t[1]),t[2])}function RO(i,t){return"s"===t?i*Nge:i}function oE(i,t,e){return i.hasOwnProperty("duration")?i:function Uge(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(M$()),{duration:0,delay:0,easing:""};r=RO(parseFloat(a[1]),a[2]);const l=a[3];null!=l&&(s=RO(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 Jme(){return new pe(3100,!1)}()),a=!0),s<0&&(t.push(function ege(){return new pe(3101,!1)}()),a=!0),a&&t.splice(l,0,M$())}return{duration:r,delay:s,easing:o}}(i,t,e)}function n0(i,t={}){return Object.keys(i).forEach(e=>{t[e]=i[e]}),t}function O$(i){const t=new Map;return Object.keys(i).forEach(e=>{t.set(e,i[e])}),t}function Bu(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 L$(i,t,e){return e?t+":"+e+";":""}function N$(i){let t="";for(let e=0;e{const s=PO(r);e&&!e.has(r)&&e.set(r,i.style[s]),i.style[s]=n}),wO()&&N$(i))}function If(i,t){i.style&&(t.forEach((e,n)=>{const r=PO(n);i.style[r]=""}),wO()&&N$(i))}function r0(i){return Array.isArray(i)?1==i.length?i[0]:iV(i):i}const kO=new RegExp("{{\\s*(.+?)\\s*}}","g");function B$(i){let t=[];if("string"==typeof i){let e;for(;e=kO.exec(i);)t.push(e[1]);kO.lastIndex=0}return t}function s0(i,t,e){const n=i.toString(),r=n.replace(kO,(s,o)=>{let a=t[o];return null==a&&(e.push(function nge(i){return new pe(3003,!1)}()),a=""),a.toString()});return r==n?i:r}function aE(i){const t=[];let e=i.next();for(;!e.done;)t.push(e.value),e=i.next();return t}const Hge=/-+([a-z0-9])/g;function PO(i){return i.replace(Hge,(...t)=>t[1].toUpperCase())}function Gge(i){return i.replace(/([a-z])([A-Z])/g,"$1-$2").toLowerCase()}function sa(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 ige(i){return new pe(3004,!1)}()}}function U$(i,t){return window.getComputedStyle(i)[t]}const dE="*";function Xge(i,t){const e=[];return"string"==typeof i?i.split(/\s*,\s*/).forEach(n=>function Kge(i,t,e){if(":"==i[0]){const l=function Zge(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 gge(i){return new pe(3015,!1)}()),t;const r=n[1],s=n[2],o=n[3];t.push(V$(r,o));"<"==s[0]&&!(r==dE&&o==dE)&&t.push(V$(o,r))}(n,e,t)):e.push(i),e}const uE=new Set(["true","1"]),hE=new Set(["false","0"]);function V$(i,t){const e=uE.has(i)||hE.has(i),n=uE.has(t)||hE.has(t);return(r,s)=>{let o=i==dE||i==r,a=t==dE||t==s;return!o&&e&&"boolean"==typeof r&&(o=r?uE.has(i):hE.has(i)),!a&&n&&"boolean"==typeof s&&(a=s?uE.has(t):hE.has(t)),o&&a}}const Qge=new RegExp("s*:selfs*,?","g");function OO(i,t,e,n){return new Jge(i).build(t,e,n)}class Jge{constructor(t){this._driver=t}build(t,e,n){const r=new n_e(e);return this._resetContextStyleTimingState(r),sa(this,r0(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 sge(){return new pe(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(d=>{l.name=d,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 oge(){return new pe(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=>{B$(l).forEach(c=>{o.hasOwnProperty(c)||s.add(c)})})}),s.size&&(aE(s.values()),e.errors.push(function age(i,t){return new pe(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=sa(this,r0(t.animation),e);return{type:1,matchers:Xge(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=>sa(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=sa(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 r_e(i,t){if(i.hasOwnProperty("duration"))return i;if("number"==typeof i)return FO(oE(i,t).duration,0,"");const e=i;if(e.split(/\s+/).some(s=>"{"==s.charAt(0)&&"{"==s.charAt(1))){const s=FO(0,0,"");return s.dynamic=!0,s.strValue=e,s}const r=oE(e,t);return FO(r.duration,r.delay,r.easing)}(t.timings,e.errors);e.currentAnimateTimings=n;let r,s=t.styles?t.styles:si({});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=si(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===Xc?n.push(a):e.errors.push(new pe(3002,!1)):n.push(O$(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),d=c.get(l);let h=!0;d&&(s!=r&&s>=d.startTime&&r<=d.endTime&&(e.errors.push(function cge(i,t,e,n,r){return new pe(3010,!1)}()),h=!1),s=d.startTime),h&&c.set(l,{startTime:s,endTime:r}),e.options&&function zge(i,t,e){const n=t.params||{},r=B$(i);r.length&&r.forEach(s=>{n.hasOwnProperty(s)||e.push(function tge(i){return new pe(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 dge(){return new pe(3011,!1)}()),n;let s=0;const o=[];let a=!1,l=!1,c=0;const d=t.steps.map(y=>{const M=this._makeStyleAst(y,e);let x=null!=M.offset?M.offset:function i_e(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:sa(this,r0(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 e_e(i){const t=!!i.split(/\s*,\s*/).find(e=>":self"==e);return t&&(i=i.replace(Qge,"")),i=i.replace(/@\*/g,sE).replace(/@\w+/g,e=>sE+"-"+e.slice(1)).replace(/:animating/g,IO),[i,t]}(t.selector);e.currentQuerySelector=n.length?n+" "+s:s,ra(e.collectedStyles,e.currentQuerySelector,new Map);const a=sa(this,r0(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 pge(){return new pe(3013,!1)}());const n="full"===t.timings?{duration:0,delay:0,easing:"full"}:oE(t.timings,e.errors,!0);return{type:12,animation:sa(this,r0(t.animation),e),timings:n,options:null}}}class n_e{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=n0(i)).params&&(i.params=function t_e(i){return i?n0(i):null}(i.params)):i={},i}function FO(i,t,e){return{duration:i,delay:t,easing:e}}function LO(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 fE{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 a_e=new RegExp(":enter","g"),c_e=new RegExp(":leave","g");function NO(i,t,e,n,r,s=new Map,o=new Map,a,l,c=[]){return(new d_e).buildKeyframes(i,t,e,n,r,s,o,a,l,c)}class d_e{buildKeyframes(t,e,n,r,s,o,a,l,c,d=[]){c=c||new fE;const h=new BO(t,e,c,r,s,d,[]);h.options=l;const p=l.delay?hd(l.delay):0;h.currentTimeline.delayNextStep(p),h.currentTimeline.setStyles([o],null,h.errors,l),sa(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()):[LO(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:hd(s0(s,r?.params??{},e.errors));n.delayNextStep(o)}}}_visitSubInstructions(t,e,n){let s=e.currentTimeline.currentTime;const o=null!=n.duration?hd(n.duration):null,a=null!=n.delay?hd(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),sa(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=pE);const o=hd(s.delay);r.delayNextStep(o)}t.steps.length&&(t.steps.forEach(o=>sa(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?hd(t.options.delay):0;t.steps.forEach(o=>{const a=e.createSubContext(t.options);s&&a.delayNextStep(s),sa(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 oE(e.params?s0(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?hd(r.delay):0;s&&(6===e.previousNode.type||0==n&&e.currentTimeline.hasCurrentStyleProperties())&&(e.currentTimeline.snapshotCurrentStyles(),e.previousNode=pE);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,d)=>{e.currentQueryIndex=d;const h=e.createSubContext(t.options,c);s&&h.delayNextStep(s),c===e.element&&(l=h.currentTimeline),sa(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 d=e.currentTimeline;l&&d.delayNextStep(l);const h=d.currentTime;sa(this,t.animation,e),e.previousNode=t,n.currentStaggerTime=r.currentTime-h+(r.startTime-n.currentTimeline.startTime)}}const pE={};class BO{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=pE,this.subContextCount=0,this.options={},this.currentQueryIndex=0,this.currentQueryTotal=0,this.currentStaggerTime=0,this.currentTimeline=l||new mE(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=hd(n.duration)),null!=n.delay&&(r.delay=hd(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]=s0(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 BO(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=pE,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 u_e(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(a_e,"."+this._enterClassName)).replace(c_e,"."+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 mge(i){return new pe(3014,!1)}()),a}}class mE{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 mE(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||Xc),this._currentKeyframe.set(e,Xc);this._currentEmptyStepKeyframe=this._currentKeyframe}setStyles(t,e,n,r){e&&this._previousKeyframe.set("easing",e);const s=r&&r.params||{},o=function h_e(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,Xc)}else Bu(r,e)}),e}(t,this._globalTimelineStyles);for(let[a,l]of o){const c=s0(l,s,n);this._pendingStyles.set(a,c),this._localTimelineStyles.has(a)||this._backFill.set(a,this._globalTimelineStyles.get(a)??Xc),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=Bu(a,new Map,this._backFill);c.forEach((d,h)=>{d===rR?t.add(h):d===Xc&&e.add(h)}),n||c.set("offset",l/this.duration),r.push(c)});const s=t.size?aE(t.values()):[],o=e.size?aE(e.values()):[];if(n){const a=r[0],l=new Map(a);a.set("offset",0),l.set("offset",1),r=[a,l]}return LO(this.element,r,s,o,this.duration,this.startTime,this.easing,!1)}}class u_e extends mE{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=Bu(t[0]);l.set("offset",0),s.push(l);const c=Bu(t[0]);c.set("offset",G$(a)),s.push(c);const d=t.length-1;for(let h=1;h<=d;h++){let p=Bu(t[h]);const m=p.get("offset");p.set("offset",G$((e+m*n)/o)),s.push(p)}n=o,e=0,r="",t=s}return LO(this.element,t,this.preStyleProps,this.postStyleProps,n,e,r,!0)}}function G$(i,t=3){const e=Math.pow(10,t-1);return Math.round(i*e)/e}class UO{}const f_e=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 p_e extends UO{normalizePropertyName(t,e){return PO(t)}normalizeStyleValue(t,e,n,r){let s="";const o=n.toString().trim();if(f_e.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 rge(i,t){return new pe(3005,!1)}())}return o+s}}function $$(i,t,e,n,r,s,o,a,l,c,d,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:d,totalTime:h,errors:p}}const VO={};class W${constructor(t,e,n){this._triggerName=t,this.ast=e,this._stateStyles=n}match(t,e,n,r){return function m_e(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,d){const h=[],p=this.ast.options&&this.ast.options.params||VO,g=this.buildStyles(n,a&&a.params||VO,h),b=l&&l.params||VO,v=this.buildStyles(r,b,h),y=new Set,M=new Map,x=new Map,C="void"===r,F={params:g_e(b,p),delay:this.ast.options?.delay},D=d?[]:NO(t,e,this.ast.animation,s,o,g,v,F,c,h);let k=0;if(D.forEach(T=>{k=Math.max(T.duration+T.delay,k)}),h.length)return $$(e,this._triggerName,n,r,C,g,v,[],[],M,x,k,h);D.forEach(T=>{const A=T.element,$=ra(M,A,new Set);T.preStyleProps.forEach(ne=>$.add(ne));const ie=ra(x,A,new Set);T.postStyleProps.forEach(ne=>ie.add(ne)),A!==e&&y.add(A)});const B=aE(y.values());return $$(e,this._triggerName,n,r,C,g,v,D,B,M,x,k)}}function g_e(i,t){const e=n0(t);for(const n in i)i.hasOwnProperty(n)&&null!=i[n]&&(e[n]=i[n]);return e}class __e{constructor(t,e,n){this.styles=t,this.defaultParams=e,this.normalizer=n}buildStyles(t,e){const n=new Map,r=n0(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=s0(o,r,e));const l=this.normalizer.normalizePropertyName(a,e);o=this.normalizer.normalizeStyleValue(a,l,o,e),n.set(a,o)})}),n}}class y_e{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 __e(r.style,r.options&&r.options.params||{},n))}),j$(this.states,"true","1"),j$(this.states,"false","0"),e.transitions.forEach(r=>{this.transitionFactories.push(new W$(t,r,this.states))}),this.fallbackTransition=function b_e(i,t,e){return new W$(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 j$(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 x_e=new fE;class w_e{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=OO(this._driver,e,n,r);if(n.length)throw function wge(i){return new pe(3503,!1)}();this._animations.set(t,s)}_buildPlayer(t,e,n){const r=t.element,s=C$(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=NO(this._driver,e,s,TO,iE,new Map,new Map,n,x_e,r),o.forEach(d=>{const h=ra(a,d.element,new Map);d.postStyleProps.forEach(p=>h.set(p,null))})):(r.push(function Mge(){return new pe(3300,!1)}()),o=[]),r.length)throw function Cge(i){return new pe(3504,!1)}();a.forEach((d,h)=>{d.forEach((p,m)=>{d.set(m,this._driver.computeStyle(h,m,Xc))})});const c=Nu(o.map(d=>{const h=a.get(d.element);return this._buildPlayer(d,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 Sge(i){return new pe(3301,!1)}();return e}listen(t,e,n,r){const s=SO(e,"","","");return MO(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 Y$="ng-animate-queued",zO="ng-animate-disabled",A_e=[],q$={namespaceId:"",setForRemoval:!1,setForMove:!1,hasAnimation:!1,removedBeforeQueried:!1},D_e={namespaceId:"",setForMove:!1,setForRemoval:!1,hasAnimation:!1,removedBeforeQueried:!0},Ua="__ng_removed";class HO{get params(){return this.options.params}constructor(t,e=""){this.namespaceId=e;const n=t&&t.hasOwnProperty("value");if(this.value=function k_e(i){return i??null}(n?t.value:t),n){const s=n0(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 o0="void",GO=new HO(o0);class T_e{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,Va(e,this._hostClassName)}listen(t,e,n,r){if(!this._triggers.has(e))throw function Ege(i,t){return new pe(3302,!1)}();if(null==n||0==n.length)throw function Age(i){return new pe(3303,!1)}();if(!function P_e(i){return"start"==i||"done"==i}(n))throw function Dge(i,t){return new pe(3400,!1)}();const s=ra(this._elementListeners,t,[]),o={name:e,phase:n,callback:r};s.push(o);const a=ra(this._engine.statesByElement,t,new Map);return a.has(e)||(Va(t,rE),Va(t,rE+"-"+e),a.set(e,GO)),()=>{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 Tge(i){return new pe(3401,!1)}();return e}trigger(t,e,n,r=!0){const s=this._getTrigger(e),o=new $O(this.id,e,t);let a=this._engine.statesByElement.get(t);a||(Va(t,rE),Va(t,rE+"-"+e),this._engine.statesByElement.set(t,a=new Map));let l=a.get(e);const c=new HO(n,this.id);if(!(n&&n.hasOwnProperty("value"))&&l&&c.absorbOptions(l.options),a.set(e,c),l||(l=GO),c.value!==o0&&l.value===c.value){if(!function L_e(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),hc(t,y)})}return}const p=ra(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||(Va(t,Y$),o.onStart(()=>{Yg(t,Y$)})),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,sE,!0);n.forEach(r=>{if(r[Ua])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 d=this.trigger(t,c,o0,r);d&&a.push(d)}}),a.length)return this._engine.markElementAsRemoved(this.id,t,!0,e,o),n&&Nu(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)||GO,d=new HO(o0),h=new $O(this.id,o,t);this._engine.totalQueuedPlayers++,this._queue.push({element:t,triggerName:o,transition:l,fromState:c,toState:d,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[Ua];(!s||s===q$)&&(n.afterFlush(()=>this.clearElementCache(t)),n.destroyInnerAnimations(t),n._onRemovalComplete(t,e))}}insertNode(t,e){Va(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=SO(s,n.triggerName,n.fromState.value,n.toState.value);l._data=t,MO(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 I_e{_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 T_e(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(gE(e)){const s=this._fetchNamespace(t);if(s)return s.trigger(e,n,r),!0}return!1}insertNode(t,e,n,r){if(!gE(e))return;const s=e[Ua];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),Va(t,zO)):this.disabledNodes.has(t)&&(this.disabledNodes.delete(t),Yg(t,zO))}removeNode(t,e,n,r){if(gE(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[Ua]={namespaceId:t,setForRemoval:r,hasAnimation:n,removedBeforeQueried:!1,previousTriggersValues:s}}listen(t,e,n,r,s){return gE(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,sE,!0);e.forEach(n=>this.destroyActiveAnimationsForElement(n)),0!=this.playersByQueriedElement.size&&(e=this.driver.query(t,IO,!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 Nu(this.players).onDone(()=>t());t()})}processLeaveNode(t){const e=t[Ua];if(e&&e.setForRemoval){if(t[Ua]=q$,e.namespaceId){this.destroyInnerAnimations(t);const n=this._fetchNamespace(e.namespaceId);n&&n.clearElementCache(t)}this._onRemovalComplete(t,e.setForRemoval)}t.classList?.contains(zO)&&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?Nu(e).onDone(()=>{n.forEach(r=>r())}):n.forEach(r=>r())}}reportError(t){throw function Ige(i){return new pe(3402,!1)}()}_flushAnimations(t,e){const n=new fE,r=[],s=new Map,o=[],a=new Map,l=new Map,c=new Map,d=new Set;this.disabledNodes.forEach(q=>{d.add(q);const re=this.driver.query(q,".ng-animate-queued",!0);for(let J=0;J{const J=TO+b++;g.set(re,J),q.forEach(we=>Va(we,J))});const v=[],y=new Set,M=new Set;for(let q=0;qy.add(we)):M.add(re))}const x=new Map,C=Z$(p,Array.from(y));C.forEach((q,re)=>{const J=iE+b++;x.set(re,J),q.forEach(we=>Va(we,J))}),t.push(()=>{m.forEach((q,re)=>{const J=g.get(re);q.forEach(we=>Yg(we,J))}),C.forEach((q,re)=>{const J=x.get(re);q.forEach(we=>Yg(we,J))}),v.forEach(q=>{this.processLeaveNode(q)})});const F=[],D=[];for(let q=this._namespaceList.length-1;q>=0;q--)this._namespaceList[q].drainQueuedTransitions(e).forEach(J=>{const we=J.player,Ne=J.element;if(F.push(we),this.collectedEnterElements.length){const Fe=Ne[Ua];if(Fe&&Fe.setForMove){if(Fe.previousTriggersValues&&Fe.previousTriggersValues.has(J.triggerName)){const bt=Fe.previousTriggersValues.get(J.triggerName),St=this.statesByElement.get(J.element);if(St&&St.has(J.triggerName)){const Mt=St.get(J.triggerName);Mt.value=bt,St.set(J.triggerName,Mt)}}return void we.destroy()}}const Ye=!h||!this.driver.containsElement(h,Ne),It=x.get(Ne),en=g.get(Ne),ae=this._buildInstruction(J,n,en,It,Ye);if(ae.errors&&ae.errors.length)return void D.push(ae);if(Ye)return we.onStart(()=>If(Ne,ae.fromStyles)),we.onDestroy(()=>hc(Ne,ae.toStyles)),void r.push(we);if(J.isFallbackTransition)return we.onStart(()=>If(Ne,ae.fromStyles)),we.onDestroy(()=>hc(Ne,ae.toStyles)),void r.push(we);const Oe=[];ae.timelines.forEach(Fe=>{Fe.stretchStartingKeyframe=!0,this.disabledNodes.has(Fe.element)||Oe.push(Fe)}),ae.timelines=Oe,n.append(Ne,ae.timelines),o.push({instruction:ae,player:we,element:Ne}),ae.queriedElements.forEach(Fe=>ra(a,Fe,[]).push(we)),ae.preStyleProps.forEach((Fe,bt)=>{if(Fe.size){let St=l.get(bt);St||l.set(bt,St=new Set),Fe.forEach((Mt,Sn)=>St.add(Sn))}}),ae.postStyleProps.forEach((Fe,bt)=>{let St=c.get(bt);St||c.set(bt,St=new Set),Fe.forEach((Mt,Sn)=>St.add(Sn))})});if(D.length){const q=[];D.forEach(re=>{q.push(function Rge(i,t){return new pe(3505,!1)}())}),F.forEach(re=>re.destroy()),this.reportError(q)}const k=new Map,B=new Map;o.forEach(q=>{const re=q.element;n.has(re)&&(B.set(re,re),this._beforeAnimationBuild(q.player.namespaceId,q.instruction,k))}),r.forEach(q=>{const re=q.element;this._getPreviousPlayers(re,!1,q.namespaceId,q.triggerName,null).forEach(we=>{ra(k,re,[]).push(we),we.destroy()})});const T=v.filter(q=>J$(q,l,c)),A=new Map;K$(A,this.driver,M,c,Xc).forEach(q=>{J$(q,l,c)&&T.push(q)});const ie=new Map;m.forEach((q,re)=>{K$(ie,this.driver,new Set(q),l,rR)}),T.forEach(q=>{const re=A.get(q),J=ie.get(q);A.set(q,new Map([...Array.from(re?.entries()??[]),...Array.from(J?.entries()??[])]))});const ne=[],se=[],ge={};o.forEach(q=>{const{element:re,player:J,instruction:we}=q;if(n.has(re)){if(d.has(re))return J.onDestroy(()=>hc(re,we.toStyles)),J.disabled=!0,J.overrideTotalTime(we.totalTime),void r.push(J);let Ne=ge;if(B.size>1){let It=re;const en=[];for(;It=It.parentNode;){const ae=B.get(It);if(ae){Ne=ae;break}en.push(It)}en.forEach(ae=>B.set(ae,Ne))}const Ye=this._buildAnimation(J.namespaceId,we,k,s,ie,A);if(J.setRealPlayer(Ye),Ne===ge)ne.push(J);else{const It=this.playersByElement.get(Ne);It&&It.length&&(J.parentPlayer=Nu(It)),r.push(J)}}else If(re,we.fromStyles),J.onDestroy(()=>hc(re,we.toStyles)),se.push(J),d.has(re)&&r.push(J)}),se.forEach(q=>{const re=s.get(q.element);if(re&&re.length){const J=Nu(re);q.setRealPlayer(J)}}),r.forEach(q=>{q.parentPlayer?q.syncPlayerEvents(q.parentPlayer):q.destroy()});for(let q=0;q!Ye.destroyed);Ne.length?O_e(this,re,Ne):this.processLeaveNode(re)}return v.length=0,ne.forEach(q=>{this.players.push(q),q.onDone(()=>{q.destroy();const re=this.players.indexOf(q);this.players.splice(re,1)}),q.play()}),ne}elementContainsData(t,e){let n=!1;const r=e[Ua];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==o0;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,d=c!==s,h=ra(n,c,[]);this._getPreviousPlayers(c,d,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=[],d=new Set,h=new Set,p=e.timelines.map(g=>{const b=g.element;d.add(b);const v=b[Ua];if(v&&v.removedBeforeQueried)return new tb(g.duration,g.delay);const y=b!==l,M=function F_e(i){const t=[];return Q$(i,t),t}((n.get(b)||A_e).map(k=>k.getRealPlayer())).filter(k=>!!k.element&&k.element===b),x=s.get(b),C=o.get(b),F=C$(0,this._normalizer,0,g.keyframes,x,C),D=this._buildPlayer(g,F,M);if(g.subTimeline&&r&&h.add(b),y){const k=new $O(t,a,b);k.setRealPlayer(D),c.push(k)}return D});c.forEach(g=>{ra(this.playersByQueriedElement,g.element,[]).push(g),g.onDone(()=>function R_e(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))}),d.forEach(g=>Va(g,P$));const m=Nu(p);return m.onDestroy(()=>{d.forEach(g=>Yg(g,P$)),hc(l,e.toStyles)}),h.forEach(g=>{ra(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 tb(t.duration,t.delay)}}class $O{constructor(t,e,n){this.namespaceId=t,this.triggerName=e,this.element=n,this._player=new tb,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=>MO(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){ra(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 gE(i){return i&&1===i.nodeType}function X$(i,t){const e=i.style.display;return i.style.display=t??"none",e}function K$(i,t,e,n,r){const s=[];e.forEach(l=>s.push(X$(l)));const o=[];n.forEach((l,c)=>{const d=new Map;l.forEach(h=>{const p=t.computeStyle(c,h,r);d.set(h,p),(!p||0==p.length)&&(c[Ua]=D_e,o.push(c))}),i.set(c,d)});let a=0;return e.forEach(l=>X$(l,s[a++])),o}function Z$(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 Va(i,t){i.classList?.add(t)}function Yg(i,t){i.classList?.remove(t)}function O_e(i,t,e){Nu(e).onDone(()=>i.processLeaveNode(t))}function Q$(i,t){for(let e=0;er.add(s)):t.set(i,n),e.delete(i),!0}class _E{constructor(t,e,n){this.bodyNode=t,this._driver=e,this._normalizer=n,this._triggerCache={},this.onRemovalComplete=(r,s)=>{},this._transitionEngine=new I_e(t,e,n),this._timelineEngine=new w_e(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=[],d=OO(this._driver,s,l,c);if(l.length)throw function bge(i,t){return new pe(3404,!1)}();a=function v_e(i,t,e){return new y_e(i,t,e)}(r,d,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]=S$(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]=S$(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 B_e=(()=>{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&&hc(this._element,this._startStyles,this._initialStyles),this._state=1)}finish(){this.start(),this._state<2&&(hc(this._element,this._initialStyles),this._endStyles&&(hc(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),hc(this._element,this._initialStyles),this._state=3)}}return i.initialStylesByElement=new WeakMap,i})();function WO(i){let t=null;return i.forEach((e,n)=>{(function U_e(i){return"display"===i||"position"===i})(n)&&(t=t||new Map,t.set(n,e))}),t}class e8{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:U$(this.element,r))}),this.currentSnapshot=t}triggerCallback(t){const e="start"===t?this._onStartFns:this._onDoneFns;e.forEach(n=>n()),e.length=0}}class V_e{validateStyleProperty(t){return!0}validateAnimatableStyleProperty(t){return!0}matchesElement(t,e){return!1}containsElement(t,e){return T$(t,e)}getParentElement(t){return AO(t)}query(t,e,n){return I$(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,d=o.filter(m=>m instanceof e8);(function $ge(i,t){return 0===i||0===t})(n,r)&&d.forEach(m=>{m.currentSnapshot.forEach((g,b)=>c.set(b,g))});let h=function Vge(i){return i.length?i[0]instanceof Map?i:i.map(t=>O$(t)):[]}(e).map(m=>Bu(m));h=function Wge(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,U$(i,a)))}}return t}(t,h,c);const p=function N_e(i,t){let e=null,n=null;return Array.isArray(t)&&t.length?(e=WO(t[0]),t.length>1&&(n=WO(t[t.length-1]))):t instanceof Map&&(e=WO(t)),e||n?new B_e(i,e,n):null}(t,h);return new e8(t,h,l,p)}}let z_e=(()=>{class i extends tV{constructor(e,n){super(),this._nextAnimationId=0,this._renderer=e.createRenderer(n.body,{id:"0",encapsulation:qs.None,styles:[],data:{animation:[]}})}build(e){const n=this._nextAnimationId.toString();this._nextAnimationId++;const r=Array.isArray(e)?iV(e):e;return t8(this._renderer,null,n,"register",[r]),new H_e(n,this._renderer)}}return i.\u0275fac=function(e){return new(e||i)(ee(Gl),ee(jt))},i.\u0275prov=ke({token:i,factory:i.\u0275fac}),i})();class H_e extends LQ{constructor(t,e){super(),this._id=t,this._renderer=e}create(t,e){return new G_e(this._id,t,e||{},this._renderer)}}class G_e{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 t8(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 t8(i,t,e,n,r){return i.setProperty(t,`@@${e}:${n}`,r)}const n8="@.disabled";let $_e=(()=>{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 d=this._rendererCache.get(s);return d||(d=new i8("",s,this.engine,()=>this._rendererCache.delete(s)),this._rendererCache.set(s,d)),d}const o=n.id,a=n.id+"-"+this._currentId;this._currentId++,this.engine.register(a,e);const l=d=>{Array.isArray(d)?d.forEach(l):this.engine.registerTrigger(o,a,e,d.name,d)};return n.data.animation.forEach(l),new W_e(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)(ee(Gl),ee(_E),ee(ft))},i.\u0275prov=ke({token:i,factory:i.\u0275fac}),i})();class i8{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==n8?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 W_e extends i8{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==n8?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 j_e(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 Y_e(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 r8=[{provide:tV,useClass:z_e},{provide:UO,useFactory:function X_e(){return new p_e}},{provide:_E,useClass:(()=>{class i extends _E{constructor(e,n,r,s){super(e.body,n,r)}ngOnDestroy(){this.flush()}}return i.\u0275fac=function(e){return new(e||i)(ee(jt),ee(DO),ee(UO),ee(dm))},i.\u0275prov=ke({token:i,factory:i.\u0275fac}),i})()},{provide:Gl,useFactory:function K_e(i,t,e){return new $_e(i,t,e)},deps:[aM,_E,ft]}],jO=[{provide:DO,useFactory:()=>new V_e},{provide:Rr,useValue:"BrowserAnimations"},...r8],s8=[{provide:DO,useClass:R$},{provide:Rr,useValue:"NoopAnimations"},...r8];let Z_e=(()=>{class i{static withConfig(e){return{ngModule:i,providers:e.disableAnimations?s8:jO}}}return i.\u0275fac=function(e){return new(e||i)},i.\u0275mod=nn({type:i}),i.\u0275inj=Kt({providers:jO,imports:[FB]}),i})();const o8=new me("CdkAccordion");let Q_e=0,J_e=(()=>{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=Zt.EMPTY,this.closed=new We,this.opened=new We,this.destroyed=new We,this.expandedChange=new We,this.id="cdk-accordion-child-"+Q_e++,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)(E(o8,12),E(Zn),E(GR))},i.\u0275dir=ve({type:i,selectors:[["cdk-accordion-item"],["","cdkAccordionItem",""]],inputs:{expanded:"expanded",disabled:"disabled"},outputs:{closed:"closed",opened:"opened",destroyed:"destroyed",expandedChange:"expandedChange"},exportAs:["cdkAccordionItem"],features:[Dn([{provide:o8,useValue:void 0}])]}),i})(),eve=(()=>{class i{}return i.\u0275fac=function(e){return new(e||i)},i.\u0275mod=nn({type:i}),i.\u0275inj=Kt({}),i})();const tve=["body"];function nve(i,t){}const ive=[[["mat-expansion-panel-header"]],"*",[["mat-action-row"]]],rve=["mat-expansion-panel-header","*","mat-action-row"];function sve(i,t){1&i&&De(0,"span",2),2&i&&U("@indicatorRotate",he()._getExpandedState())}const ove=[[["mat-panel-title"]],[["mat-panel-description"]],"*"],ave=["mat-panel-title","mat-panel-description","*"],a8=new me("MAT_ACCORDION"),l8="225ms cubic-bezier(0.4,0.0,0.2,1)",c8={indicatorRotate:Ra("indicatorRotate",[Ps("collapsed, void",si({transform:"rotate(0deg)"})),Ps("expanded",si({transform:"rotate(180deg)"})),Pr("expanded <=> collapsed, void => collapsed",jr(l8))]),bodyExpansion:Ra("bodyExpansion",[Ps("collapsed, void",si({height:"0px",visibility:"hidden"})),Ps("expanded",si({height:"*",visibility:"visible"})),Pr("expanded <=> collapsed, void => collapsed",jr(l8))])},d8=new me("MAT_EXPANSION_PANEL");let lve=(()=>{class i{constructor(e,n){this._template=e,this._expansionPanel=n}}return i.\u0275fac=function(e){return new(e||i)(E(Mo),E(d8,8))},i.\u0275dir=ve({type:i,selectors:[["ng-template","matExpansionPanelContent",""]]}),i})(),cve=0;const u8=new me("MAT_EXPANSION_PANEL_DEFAULT_OPTIONS");let h8=(()=>{class i extends J_e{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 We,this.afterCollapse=new We,this._inputChanges=new Re,this._headerId="mat-expansion-panel-header-"+cve++,this._bodyAnimationDone=new Re,this.accordion=e,this._document=o,this._bodyAnimationDone.pipe(Zl((c,d)=>c.fromState===d.fromState&&c.toState===d.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(Ao(null),gn(()=>this.expanded&&!this._portal),Oi(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)(E(a8,12),E(Zn),E(GR),E(Wr),E(jt),E(Rr,8),E(u8,8))},i.\u0275cmp=ot({type:i,selectors:[["mat-expansion-panel"]],contentQueries:function(e,n,r){if(1&e&&Wi(r,lve,5),2&e){let s;Et(s=At())&&(n._lazyContent=s.first)}},viewQuery:function(e,n){if(1&e&&Wn(tve,5),2&e){let r;Et(r=At())&&(n._body=r.first)}},hostAttrs:[1,"mat-expansion-panel"],hostVars:6,hostBindings:function(e,n){2&e&&un("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:[Dn([{provide:a8,useValue:void 0},{provide:d8,useExisting:i}]),lt,bi],ngContentSelectors:rve,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&&(sr(ive),Wt(0),W(1,"div",0,1),Ue("@bodyExpansion.done",function(s){return n._bodyAnimationDone.next(s)}),W(3,"div",2),Wt(4,1),fe(5,nve,0,0,"ng-template",3),j(),Wt(6,2),j()),2&e&&(G(1),U("@bodyExpansion",n._getExpandedState())("id",n.id),Dt("aria-labelledby",n._headerId),G(4),U("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:[c8.bodyExpansion]},changeDetection:0}),i})();class dve{}const uve=JI(dve);let hve=(()=>{class i extends uve{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=Zt.EMPTY;const c=e.accordion?e.accordion._stateChanges.pipe(gn(d=>!(!d.hideToggle&&!d.togglePosition))):po;this.tabIndex=parseInt(l||"")||0,this._parentChangeSubscription=Mr(e.opened,e.closed,c,e._inputChanges.pipe(gn(d=>!!(d.hideToggle||d.disabled||d.togglePosition)))).subscribe(()=>this._changeDetectorRef.markForCheck()),e.closed.pipe(gn(()=>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:Xo(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)(E(h8,1),E(mt),E(qc),E(Zn),E(u8,8),E(Rr,8),ya("tabindex"))},i.\u0275cmp=ot({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&&Ue("click",function(){return n._toggle()})("keydown",function(s){return n._keydown(s)}),2&e&&(Dt("id",n.panel._headerId)("tabindex",n.tabIndex)("aria-controls",n._getPanelId())("aria-expanded",n._isExpanded())("aria-disabled",n.panel.disabled),jo("height",n._getHeaderHeight()),un("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:[lt],ngContentSelectors:ave,decls:5,vars:3,consts:[[1,"mat-content"],["class","mat-expansion-indicator",4,"ngIf"],[1,"mat-expansion-indicator"]],template:function(e,n){1&e&&(sr(ove),W(0,"span",0),Wt(1),Wt(2,1),Wt(3,2),j(),fe(4,sve,1,1,"span",1)),2&e&&(un("mat-content-hide-toggle",!n._showToggle()),G(4),U("ngIf",n._showToggle()))},dependencies:[vi],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:[c8.indicatorRotate]},changeDetection:0}),i})(),fve=(()=>{class i{}return i.\u0275fac=function(e){return new(e||i)},i.\u0275dir=ve({type:i,selectors:[["mat-panel-description"]],hostAttrs:[1,"mat-expansion-panel-header-description"]}),i})(),pve=(()=>{class i{}return i.\u0275fac=function(e){return new(e||i)},i.\u0275dir=ve({type:i,selectors:[["mat-panel-title"]],hostAttrs:[1,"mat-expansion-panel-header-title"]}),i})(),mve=(()=>{class i{}return i.\u0275fac=function(e){return new(e||i)},i.\u0275mod=nn({type:i}),i.\u0275inj=Kt({imports:[Eo,Qn,eve,Nh]}),i})();function gve(i,t){if(1&i&&(W(0,"mat-option",19),Ve(1),j()),2&i){const e=t.$implicit;U("value",e),G(1),Qi(" ",e," ")}}function _ve(i,t){if(1&i){const e=di();W(0,"mat-form-field",16)(1,"mat-select",17),Ue("selectionChange",function(r){return an(e),zt(he(2)._changePageSize(r.value))}),fe(2,gve,2,2,"mat-option",18),j()()}if(2&i){const e=he(2);U("appearance",e._formFieldAppearance)("color",e.color),G(1),U("value",e.pageSize)("disabled",e.disabled)("aria-labelledby",e._pageSizeLabelId)("panelClass",e.selectConfig.panelClass||"")("disableOptionCentering",e.selectConfig.disableOptionCentering),G(1),U("ngForOf",e._displayedPageSizeOptions)}}function vve(i,t){if(1&i&&(W(0,"div",20),Ve(1),j()),2&i){const e=he(2);G(1),_i(e.pageSize)}}function yve(i,t){if(1&i&&(W(0,"div",12)(1,"div",13),Ve(2),j(),fe(3,_ve,3,8,"mat-form-field",14),fe(4,vve,2,1,"div",15),j()),2&i){const e=he();G(1),B1("id",e._pageSizeLabelId),G(1),Qi(" ",e._intl.itemsPerPageLabel," "),G(1),U("ngIf",e._displayedPageSizeOptions.length>1),G(1),U("ngIf",e._displayedPageSizeOptions.length<=1)}}function bve(i,t){if(1&i){const e=di();W(0,"button",21),Ue("click",function(){return an(e),zt(he().firstPage())}),ki(),W(1,"svg",7),De(2,"path",22),j()()}if(2&i){const e=he();U("matTooltip",e._intl.firstPageLabel)("matTooltipDisabled",e._previousButtonsDisabled())("matTooltipPosition","above")("disabled",e._previousButtonsDisabled()),Dt("aria-label",e._intl.firstPageLabel)}}function xve(i,t){if(1&i){const e=di();ki(),ga(),W(0,"button",23),Ue("click",function(){return an(e),zt(he().lastPage())}),ki(),W(1,"svg",7),De(2,"path",24),j()()}if(2&i){const e=he();U("matTooltip",e._intl.lastPageLabel)("matTooltipDisabled",e._nextButtonsDisabled())("matTooltipPosition","above")("disabled",e._nextButtonsDisabled()),Dt("aria-label",e._intl.lastPageLabel)}}let yE=(()=>{class i{constructor(){this.changes=new Re,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=ke({token:i,factory:i.\u0275fac,providedIn:"root"}),i})();const Mve={provide:yE,deps:[[new Ss,new xa,yE]],useFactory:function wve(i){return i||new yE}},Sve=new me("MAT_PAGINATOR_DEFAULT_OPTIONS"),Eve=jM(CQ(class{}));let Ave=(()=>{class i extends Eve{get pageIndex(){return this._pageIndex}set pageIndex(e){this._pageIndex=Math.max(ks(e),0),this._changeDetectorRef.markForCheck()}get length(){return this._length}set length(e){this._length=ks(e),this._changeDetectorRef.markForCheck()}get pageSize(){return this._pageSize}set pageSize(e){this._pageSize=Math.max(ks(e),0),this._updateDisplayedPageSizeOptions()}get pageSizeOptions(){return this._pageSizeOptions}set pageSizeOptions(e){this._pageSizeOptions=(e||[]).map(n=>ks(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 We,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){xo()},i.\u0275dir=ve({type:i,inputs:{color:"color",pageIndex:"pageIndex",length:"length",pageSize:"pageSize",pageSizeOptions:"pageSizeOptions",hidePageSize:"hidePageSize",showFirstLastButtons:"showFirstLastButtons",selectConfig:"selectConfig"},outputs:{page:"page"},features:[lt]}),i})(),Dve=0,Tve=(()=>{class i extends Ave{constructor(e,n,r){super(e,n,r),this._pageSizeLabelId="mat-paginator-page-size-label-"+Dve++,this._formFieldAppearance=r?.formFieldAppearance||"outline"}}return i.\u0275fac=function(e){return new(e||i)(E(yE),E(Zn),E(Sve,8))},i.\u0275cmp=ot({type:i,selectors:[["mat-paginator"]],hostAttrs:["role","group",1,"mat-mdc-paginator"],inputs:{disabled:"disabled"},exportAs:["matPaginator"],features:[lt],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&&(W(0,"div",0)(1,"div",1),fe(2,yve,5,4,"div",2),W(3,"div",3)(4,"div",4),Ve(5),j(),fe(6,bve,3,5,"button",5),W(7,"button",6),Ue("click",function(){return n.previousPage()}),ki(),W(8,"svg",7),De(9,"path",8),j()(),ga(),W(10,"button",9),Ue("click",function(){return n.nextPage()}),ki(),W(11,"svg",7),De(12,"path",10),j()(),fe(13,xve,3,5,"button",11),j()()()),2&e&&(G(2),U("ngIf",!n.hidePageSize),G(3),Qi(" ",n._intl.getRangeLabel(n.pageIndex,n.pageSize,n.length)," "),G(1),U("ngIf",n.showFirstLastButtons),G(1),U("matTooltip",n._intl.previousPageLabel)("matTooltipDisabled",n._previousButtonsDisabled())("matTooltipPosition","above")("disabled",n._previousButtonsDisabled()),Dt("aria-label",n._intl.previousPageLabel),G(3),U("matTooltip",n._intl.nextPageLabel)("matTooltipDisabled",n._nextButtonsDisabled())("matTooltipPosition","above")("disabled",n._nextButtonsDisabled()),Dt("aria-label",n._intl.nextPageLabel),G(3),U("ngIf",n.showFirstLastButtons))},dependencies:[So,vi,XM,vl,fb,Nm,Os],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})(),Ive=(()=>{class i{}return i.\u0275fac=function(e){return new(e||i)},i.\u0275mod=nn({type:i}),i.\u0275inj=Kt({providers:[Mve],imports:[Eo,KM,VH,FV]}),i})(),Rve=(()=>{class i{}return i.\u0275fac=function(e){return new(e||i)},i.\u0275mod=nn({type:i,bootstrap:[Qme]}),i.\u0275inj=Kt({providers:[Ql,NH,{provide:PH,useValue:Vie}],imports:[FB,wK,Z_e,eH,SJ,gC,pH,mve,DV,RV,FV,KM,ez,Ive,sse,_H,VH,_V,bpe,xme,tH,tR,Yie]}),i})();th(Jl,[So,vi,Os,t0,nE],[pl]),th(zR,[hm,So,vi,xy,tc,Kc,vl,h8,hve,pve,fve,Os,Tve,fb,Nm,t0],[]),th(xC,[So,vi,MC,wC,gH,t0],[]),th(_$,[So,vi,To,Os,fb,Nm,t0,nE],[pl]),L7().bootstrapModule(Rve).catch(i=>console.error(i))},489:function(Lo,Hs,ps){var cn;Lo=ps.nmd(Lo),function(){var V,Kr=200,Un="Expected a function",Ha="__lodash_hash_undefined__",Mi="__lodash_placeholder__",Ci=1,ms=2,$s=4,Ws=1,No=2,On=1,dr=2,pc=4,la=8,Dl=16,ca=32,Tl=64,Ga=128,da=256,pd=512,ME=800,Kg=16,In=1/0,Wa=9007199254740991,SE=17976931348623157e292,Pf=NaN,ua=4294967295,Re=ua-1,l0=ua>>>1,c0=[["ary",Ga],["bind",On],["bindKey",dr],["curry",la],["curryRight",Dl],["flip",pd],["partial",ca],["partialRight",Tl],["rearg",da]],ti="[object Arguments]",Yn="[object Array]",EE="[object AsyncFunction]",et="[object Boolean]",mc="[object Date]",AE="[object DOMException]",md="[object Error]",Of="[object Function]",d0="[object GeneratorFunction]",Bo="[object Map]",Vu="[object Number]",DE="[object Null]",ja="[object Object]",u0="[object Promise]",TE="[object Proxy]",gd="[object RegExp]",Uo="[object Set]",gc="[object String]",Ff="[object Symbol]",Zg="[object Undefined]",_d="[object WeakMap]",zu="[object ArrayBuffer]",vd="[object DataView]",ha="[object Float32Array]",Lf="[object Float64Array]",Qg="[object Int8Array]",Nf="[object Int16Array]",Jg="[object Int32Array]",e_="[object Uint8Array]",Hu="[object Uint8ClampedArray]",t_="[object Uint16Array]",n_="[object Uint32Array]",RE=/\b__p \+= '';/g,kE=/\b(__p \+=) '' \+/g,PE=/(__e\(.*?\)|\b__t\)) \+\n'';/g,h0=/&(?:amp|lt|gt|quot|#39);/g,f0=/[&<>"']/g,OE=RegExp(h0.source),FE=RegExp(f0.source),ZO=/<%-([\s\S]+?)%>/g,i_=/<%([\s\S]+?)%>/g,r_=/<%=([\s\S]+?)%>/g,p0=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,m0=/^\w*$/,g0=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,s_=/[\\^$.*+?()[\]{}|]/g,_0=RegExp(s_.source),Bf=/^\s+/,v0=/\s/,y0=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,wr=/\{\n\/\* \[wrapped with (.+)\] \*/,LE=/,? & /,NE=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,BE=/[()=,{}\[\]\/\s]/,UE=/\\(\\)?/g,b0=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,x0=/\w*$/,VE=/^[-+]0x[0-9a-f]+$/i,Ya=/^0b[01]+$/i,zE=/^\[object .+?Constructor\]$/,ir=/^0o[0-7]+$/i,yd=/^(?:0|[1-9]\d*)$/,po=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,o_=/($^)/,HE=/['\n\r\u2028\u2029\\]/g,Gu="\\ud800-\\udfff",M0="\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff",l_="\\u2700-\\u27bf",c_="a-z\\xdf-\\xf6\\xf8-\\xff",d_="A-Z\\xc0-\\xd6\\xd8-\\xde",C0="\\ufe0e\\ufe0f",S0="\\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",Mr="["+Gu+"]",Uf="["+S0+"]",bd="["+M0+"]",li="\\d+",u_="["+l_+"]",pi="["+c_+"]",Vf="[^"+Gu+S0+li+l_+c_+d_+"]",h_="\\ud83c[\\udffb-\\udfff]",Pt="[^"+Gu+"]",Wu="(?:\\ud83c[\\udde6-\\uddff]){2}",ju="[\\ud800-\\udbff][\\udc00-\\udfff]",Yu="["+d_+"]",pe="(?:"+pi+"|"+Vf+")",zf="(?:"+Yu+"|"+Vf+")",Qt="(?:['\u2019](?:d|ll|m|re|s|t|ve))?",qn="(?:['\u2019](?:D|LL|M|RE|S|T|VE))?",E0="(?:"+bd+"|"+h_+")?",YE="["+C0+"]?",XE=YE+E0+"(?:\\u200d(?:"+[Pt,Wu,ju].join("|")+")"+YE+E0+")*",KE="(?:"+[u_,Wu,ju].join("|")+")"+XE,QO="(?:"+[Pt+bd+"?",bd,Wu,ju,Mr].join("|")+")",Il=RegExp("['\u2019]","g"),JO=RegExp(bd,"g"),A0=RegExp(h_+"(?="+h_+")|"+QO+XE,"g"),eF=RegExp([Yu+"?"+pi+"+"+Qt+"(?="+[Uf,Yu,"$"].join("|")+")",zf+"+"+qn+"(?="+[Uf,Yu+pe,"$"].join("|")+")",Yu+"?"+pe+"+"+Qt,Yu+"+"+qn,"\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])","\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",li,KE].join("|"),"g"),tF=RegExp("[\\u200d"+Gu+M0+C0+"]"),ZE=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,nF=["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"],QE=-1,Si={};Si[ha]=Si[Lf]=Si[Qg]=Si[Nf]=Si[Jg]=Si[e_]=Si[Hu]=Si[t_]=Si[n_]=!0,Si[ti]=Si[Yn]=Si[zu]=Si[et]=Si[vd]=Si[mc]=Si[md]=Si[Of]=Si[Bo]=Si[Vu]=Si[ja]=Si[gd]=Si[Uo]=Si[gc]=Si[_d]=!1;var En={};En[ti]=En[Yn]=En[zu]=En[vd]=En[et]=En[mc]=En[ha]=En[Lf]=En[Qg]=En[Nf]=En[Jg]=En[Bo]=En[Vu]=En[ja]=En[gd]=En[Uo]=En[gc]=En[Ff]=En[e_]=En[Hu]=En[t_]=En[n_]=!0,En[md]=En[Of]=En[_d]=!1;var sF={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},ke=parseFloat,oF=parseInt,Kt="object"==typeof global&&global&&global.Object===Object&&global,Gf="object"==typeof self&&self&&self.Object===Object&&self,Cr=Kt||Gf||Function("return this")(),f_=Hs&&!Hs.nodeType&&Hs,Xu=f_&&Lo&&!Lo.nodeType&&Lo,p_=Xu&&Xu.exports===f_,xd=p_&&Kt.process,gs=function(){try{return Xu&&Xu.require&&Xu.require("util").types||xd&&xd.binding&&xd.binding("util")}catch{}}(),m_=gs&&gs.isArrayBuffer,D0=gs&&gs.isDate,Ot=gs&&gs.isMap,$f=gs&&gs.isRegExp,T0=gs&&gs.isSet,Ys=gs&&gs.isTypedArray;function _s(X,ue,oe){switch(oe.length){case 0:return X.call(ue);case 1:return X.call(ue,oe[0]);case 2:return X.call(ue,oe[0],oe[1]);case 3:return X.call(ue,oe[0],oe[1],oe[2])}return X.apply(ue,oe)}function aF(X,ue,oe,Be){for(var $t=-1,Vn=null==X?0:X.length;++$t-1}function Ku(X,ue,oe){for(var Be=-1,$t=null==X?0:X.length;++Be<$t;)if(oe(ue,X[Be]))return!0;return!1}function mi(X,ue){for(var oe=-1,Be=null==X?0:X.length,$t=Array(Be);++oe-1;);return oe}function fa(X,ue){for(var oe=X.length;oe--&&Ft(ue,X[oe],0)>-1;);return oe}var nA=v_({\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"}),ot=v_({"&":"&","<":"<",">":">",'"':""","'":"'"});function th(X){return"\\"+sF[X]}function Cd(X){return tF.test(X)}function qf(X){var ue=-1,oe=Array(X.size);return X.forEach(function(Be,$t){oe[++ue]=[$t,Be]}),oe}function ve(X,ue){return function(oe){return X(ue(oe))}}function Gi(X,ue){for(var oe=-1,Be=X.length,$t=0,Vn=[];++oe",""":'"',"'":"'"}),ys=function X(ue){var u,oe=(ue=null==ue?Cr:ys.defaults(Cr.Object(),ue,ys.pick(Cr,nF))).Array,Be=ue.Date,$t=ue.Error,Vn=ue.Function,yt=ue.Math,oi=ue.Object,yc=ue.RegExp,R0=ue.String,Sr=ue.TypeError,rr=oe.prototype,Vo=oi.prototype,Xs=ue["__core-js_shared__"],Pl=Vn.prototype.toString,ii=Vo.hasOwnProperty,yi=0,sA=(u=/[^.]+$/.exec(Xs&&Xs.keys&&Xs.keys.IE_PROTO||""))?"Symbol(src)_1."+u:"",Ed=Vo.toString,k0=Pl.call(oi),Kf=Cr._,Zf=yc("^"+Pl.call(ii).replace(s_,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),Za=p_?ue.Buffer:V,Ui=ue.Symbol,x_=ue.Uint8Array,bs=Za?Za.allocUnsafe:V,xs=ve(oi.getPrototypeOf,oi),Qf=oi.create,Ad=Vo.propertyIsEnumerable,bc=rr.splice,_o=Ui?Ui.isConcatSpreadable:V,ih=Ui?Ui.iterator:V,Dd=Ui?Ui.toStringTag:V,Jf=function(){try{var u=Rc(oi,"defineProperty");return u({},"",{}),u}catch{}}(),oA=ue.clearTimeout!==Cr.clearTimeout&&ue.clearTimeout,cF=Be&&Be.now!==Cr.Date.now&&Be.now,dF=ue.setTimeout!==Cr.setTimeout&&ue.setTimeout,w_=yt.ceil,M_=yt.floor,P0=oi.getOwnPropertySymbols,uF=Za?Za.isBuffer:V,aA=ue.isFinite,hF=rr.join,fF=ve(oi.keys,oi),hr=yt.max,Zr=yt.min,pF=Be.now,O0=ue.parseInt,C_=yt.random,mF=rr.reverse,F0=Rc(ue,"DataView"),ep=Rc(ue,"Map"),Qa=Rc(ue,"Promise"),Td=Rc(ue,"Set"),bi=Rc(ue,"WeakMap"),Id=Rc(oi,"create"),tp=bi&&new bi,Rd={},L0=kc(F0),N0=kc(ep),lA=kc(Qa),S_=kc(Td),cA=kc(bi),Qr=Ui?Ui.prototype:V,kd=Qr?Qr.valueOf:V,E_=Qr?Qr.toString:V;function I(u){if(Pi(u)&&!rn(u)&&!(u instanceof kn)){if(u instanceof Ei)return u;if(ii.call(u,"__wrapped__"))return ns(u)}return new Ei(u)}var Pd=function(){function u(){}return function(f){if(!wi(f))return{};if(Qf)return Qf(f);u.prototype=f;var _=new u;return u.prototype=V,_}}();function xc(){}function Ei(u,f){this.__wrapped__=u,this.__actions__=[],this.__chain__=!!f,this.__index__=0,this.__values__=V}function kn(u){this.__wrapped__=u,this.__actions__=[],this.__dir__=1,this.__filtered__=!1,this.__iteratees__=[],this.__takeCount__=ua,this.__views__=[]}function wc(u){var f=-1,_=null==u?0:u.length;for(this.clear();++f<_;){var w=u[f];this.set(w[0],w[1])}}function kt(u){var f=-1,_=null==u?0:u.length;for(this.clear();++f<_;){var w=u[f];this.set(w[0],w[1])}}function pa(u){var f=-1,_=null==u?0:u.length;for(this.clear();++f<_;){var w=u[f];this.set(w[0],w[1])}}function zt(u){var f=-1,_=null==u?0:u.length;for(this.__data__=new pa;++f<_;)this.add(u[f])}function Jr(u){var f=this.__data__=new kt(u);this.size=f.size}function I_(u,f){var _=rn(u),w=!_&&Fc(u),S=!_&&!w&&rl(u),P=!_&&!w&&!S&&$o(u),H=_||w||S||P,Y=H?qs(u.length,R0):[],Q=Y.length;for(var _e in u)(f||ii.call(u,_e))&&(!H||!("length"==_e||S&&("offset"==_e||"parent"==_e)||P&&("buffer"==_e||"byteLength"==_e||"byteOffset"==_e)||il(_e,Q)))&&Y.push(_e);return Y}function Vr(u){var f=u.length;return f?u[lh(0,f-1)]:V}function Ja(u,f){return Sp(Qs(u),Ll(f,0,u.length))}function H0(u){return Sp(Qs(u))}function Fl(u,f,_){(_!==V&&!Go(u[f],_)||_===V&&!(f in u))&&zo(u,f,_)}function Ks(u,f,_){var w=u[f];(!ii.call(u,f)||!Go(w,_)||_===V&&!(f in u))&&zo(u,f,_)}function ip(u,f){for(var _=u.length;_--;)if(Go(u[_][0],f))return _;return-1}function G0(u,f,_,w){return el(u,function(S,P,H){f(w,S,_(S),H)}),w}function $0(u,f){return u&&ci(f,fr(f),u)}function zo(u,f,_){"__proto__"==f&&Jf?Jf(u,f,{configurable:!0,enumerable:!0,value:_,writable:!0}):u[f]=_}function rh(u,f){for(var _=-1,w=f.length,S=oe(w),P=null==u;++_=f?u:f)),u}function Ms(u,f,_,w,S,P){var H,Y=f&Ci,Q=f&ms,_e=f&$s;if(_&&(H=S?_(u,w,S,P):_(u)),H!==V)return H;if(!wi(u))return u;var ye=rn(u);if(ye){if(H=function hx(u){var f=u.length,_=new u.constructor(f);return f&&"string"==typeof u[0]&&ii.call(u,"index")&&(_.index=u.index,_.input=u.input),_}(u),!Y)return Qs(u,H)}else{var be=zr(u),Xe=be==Of||be==d0;if(rl(u))return me(u,Y);if(be==ja||be==ti||Xe&&!S){if(H=Q||Xe?{}:PA(u),!Y)return Q?function hh(u,f){return ci(u,cx(u),f)}(u,function _A(u,f){return u&&ci(f,Ds(f),u)}(H,u)):function H_(u,f){return ci(u,Z_(u),f)}(u,$0(H,u))}else{if(!En[be])return S?u:{};H=function fx(u,f,_){var w=u.constructor;switch(f){case zu:return rx(u);case et:case mc:return new w(+u);case vd:return function xF(u,f){var _=f?rx(u.buffer):u.buffer;return new u.constructor(_,u.byteOffset,u.byteLength)}(u,_);case ha:case Lf:case Qg:case Nf:case Jg:case e_:case Hu:case t_:case n_:return AA(u,_);case Bo:return new w;case Vu:case gc:return new w(u);case gd:return function wF(u){var f=new u.constructor(u.source,x0.exec(u));return f.lastIndex=u.lastIndex,f}(u);case Uo:return new w;case Ff:return function MF(u){return kd?oi(kd.call(u)):{}}(u)}}(u,be,Y)}}P||(P=new Jr);var vt=P.get(u);if(vt)return vt;P.set(u,H),nw(u)?u.forEach(function(Vt){H.add(Ms(Vt,f,_,Vt,u,P))}):Tv(u)&&u.forEach(function(Vt,An){H.set(An,Ms(Vt,f,_,An,u,P))});var mn=ye?V:(_e?Q?q_:yp:Q?Ds:fr)(u);return Rn(mn||u,function(Vt,An){mn&&(Vt=u[An=Vt]),Ks(H,An,Ms(Vt,f,_,An,u,P))}),H}function R_(u,f,_){var w=_.length;if(null==u)return!w;for(u=oi(u);w--;){var S=_[w],H=u[S];if(H===V&&!(S in u)||!(0,f[S])(H))return!1}return!0}function rp(u,f,_){if("function"!=typeof u)throw new Sr(Un);return gh(function(){u.apply(V,_)},f)}function Fd(u,f,_,w){var S=-1,P=Rl,H=!0,Y=u.length,Q=[],_e=f.length;if(!Y)return Q;_&&(f=mi(f,Br(_))),w?(P=Ku,H=!1):f.length>=Kr&&(P=vc,H=!1,f=new zt(f));e:for(;++S-1},kt.prototype.set=function fA(u,f){var _=this.__data__,w=ip(_,u);return w<0?(++this.size,_.push([u,f])):_[w][1]=f,this},pa.prototype.clear=function pA(){this.size=0,this.__data__={hash:new wc,map:new(ep||kt),string:new wc}},pa.prototype.delete=function mA(u){var f=K_(this,u).delete(u);return this.size-=f?1:0,f},pa.prototype.get=function Se(u){return K_(this,u).get(u)},pa.prototype.has=function zn(u){return K_(this,u).has(u)},pa.prototype.set=function an(u,f){var _=K_(this,u),w=_.size;return _.set(u,f),this.size+=_.size==w?0:1,this},zt.prototype.add=zt.prototype.push=function Er(u){return this.__data__.set(u,Ha),this},zt.prototype.has=function z0(u){return this.__data__.has(u)},Jr.prototype.clear=function ma(){this.__data__=new kt,this.size=0},Jr.prototype.delete=function D_(u){var f=this.__data__,_=f.delete(u);return this.size=f.size,_},Jr.prototype.get=function T_(u){return this.__data__.get(u)},Jr.prototype.has=function gA(u){return this.__data__.has(u)},Jr.prototype.set=function _F(u,f){var _=this.__data__;if(_ instanceof kt){var w=_.__data__;if(!ep||w.length0&&_(Y)?f>1?Xn(Y,f-1,_,w,S):kl(S,Y):w||(S[S.length]=Y)}return S}var tl=G_(),Ai=G_(!0);function ki(u,f){return u&&tl(u,f,fr)}function P_(u,f){return u&&Ai(u,f,fr)}function ga(u,f){return _c(f,function(_){return zl(u[_])})}function Mc(u,f){for(var _=0,w=(f=ba(f,u)).length;null!=u&&_f}function sp(u,f){return null!=u&&ii.call(u,f)}function op(u,f){return null!=u&&f in oi(u)}function ap(u,f,_){for(var w=_?Ku:Rl,S=u[0].length,P=u.length,H=P,Y=oe(P),Q=1/0,_e=[];H--;){var ye=u[H];H&&f&&(ye=mi(ye,Br(f))),Q=Zr(ye.length,Q),Y[H]=!_&&(f||S>=120&&ye.length>=120)?new zt(H&&ye):V}ye=u[0];var be=-1,Xe=Y[0];e:for(;++be=Y?Q:Q*("desc"==_[w]?-1:1)}return u.index-f.index}(P,H,_)})}function Q0(u,f,_){for(var w=-1,S=f.length,P={};++w-1;)Y!==u&&bc.call(Y,Q,1),bc.call(u,Q,1);return u}function ah(u,f){for(var _=u?f.length:0,w=_-1;_--;){var S=f[_];if(_==w||S!==P){var P=S;il(S)?bc.call(u,S,1):dh(u,S)}}return u}function lh(u,f){return u+M_(C_()*(f-u+1))}function ch(u,f){var _="";if(!u||f<1||f>Wa)return _;do{f%2&&(_+=u),(f=M_(f/2))&&(u+=u)}while(f);return _}function pn(u,f){return Mp(J_(u,f,is),u+"")}function SA(u){return Vr(Bc(u))}function ex(u,f){var _=Bc(u);return Sp(_,Ll(f,0,_.length))}function Vd(u,f,_,w){if(!wi(u))return u;for(var S=-1,P=(f=ba(f,u)).length,H=P-1,Y=u;null!=Y&&++SS?0:S+f),(_=_>S?S:_)<0&&(_+=S),S=f>_?0:_-f>>>0,f>>>=0;for(var P=oe(S);++w>>1,H=u[P];null!==H&&!As(H)&&(_?H<=f:H=Kr){var _e=f?null:j_(u);if(_e)return Hn(_e);H=!1,S=vc,Q=new zt}else Q=f?[]:Y;e:for(;++w=w?u:ts(u,f,_)}var ix=oA||function(u){return Cr.clearTimeout(u)};function me(u,f){if(f)return u.slice();var _=u.length,w=bs?bs(_):new u.constructor(_);return u.copy(w),w}function rx(u){var f=new u.constructor(u.byteLength);return new x_(f).set(new x_(u)),f}function AA(u,f){var _=f?rx(u.buffer):u.buffer;return new u.constructor(_,u.byteOffset,u.length)}function DA(u,f){if(u!==f){var _=u!==V,w=null===u,S=u==u,P=As(u),H=f!==V,Y=null===f,Q=f==f,_e=As(f);if(!Y&&!_e&&!P&&u>f||P&&H&&Q&&!Y&&!_e||w&&H&&Q||!_&&Q||!S)return 1;if(!w&&!P&&!_e&&u1?_[S-1]:V,H=S>2?_[2]:V;for(P=u.length>3&&"function"==typeof P?(S--,P):V,H&&Dr(_[0],_[1],H)&&(P=S<3?V:P,S=1),f=oi(f);++w-1?S[P?f[H]:H]:V}}function Cs(u){return yo(function(f){var _=f.length,w=_,S=Ei.prototype.thru;for(u&&f.reverse();w--;){var P=f[w];if("function"!=typeof P)throw new Sr(Un);if(S&&!H&&"wrapper"==nl(P))var H=new Ei([],!0)}for(w=H?w:_;++w<_;){var Y=nl(P=f[w]),Q="wrapper"==Y?X_(P):V;H=Q&&mh(Q[0])&&Q[1]==(Ga|la|ca|da)&&!Q[4].length&&1==Q[9]?H[nl(Q[0])].apply(H,Q[3]):1==P.length&&mh(P)?H[Y]():H.thru(P)}return function(){var _e=arguments,ye=_e[0];if(H&&1==_e.length&&rn(ye))return H.plant(ye).value();for(var be=0,Xe=_?f[be].apply(this,_e):ye;++be<_;)Xe=f[be].call(this,Xe);return Xe}})}function Wd(u,f,_,w,S,P,H,Y,Q,_e){var ye=f&Ga,be=f&On,Xe=f&dr,vt=f&(la|Dl),Ut=f&pd,mn=Xe?V:mp(u);return function Vt(){for(var An=arguments.length,Ln=oe(An),rs=An;rs--;)Ln[rs]=arguments[rs];if(vt)var ss=wa(Vt),io=function eh(X,ue){for(var oe=X.length,Be=0;oe--;)X[oe]===ue&&++Be;return Be}(Ln,ss);if(w&&(Ln=Hd(Ln,w,S,vt)),P&&(Ln=TA(Ln,P,H,vt)),An-=io,vt&&An<_e){var Di=Gi(Ln,ss);return ox(u,f,Wd,Vt.placeholder,_,Ln,Di,Y,Q,_e-An)}var Ts=be?_:this,wo=Xe?Ts[u]:u;return An=Ln.length,Y?Ln=function Es(u,f){for(var _=u.length,w=Zr(f.length,_),S=Qs(u);w--;){var P=f[w];u[w]=il(P,_)?S[P]:V}return u}(Ln,Y):Ut&&An>1&&Ln.reverse(),ye&&QY))return!1;var _e=P.get(u),ye=P.get(f);if(_e&&ye)return _e==f&&ye==u;var be=-1,Xe=!0,vt=_&No?new zt:V;for(P.set(u,f),P.set(f,u);++be-1&&u%1==0&&u1?"& ":"")+f[w],f=f.join(_>2?", ":" "),u.replace(y0,"{\n/* [wrapped with "+f+"] */\n")}(w,function BA(u,f){return Rn(c0,function(_){var w="_."+_[0];f&_[1]&&!Rl(u,w)&&u.push(w)}),u.sort()}(function dx(u){var f=u.match(wr);return f?f[1].split(LE):[]}(w),_)))}function vx(u){var f=0,_=0;return function(){var w=pF(),S=Kg-(w-_);if(_=w,S>0){if(++f>=ME)return arguments[0]}else f=0;return u.apply(V,arguments)}}function Sp(u,f){var _=-1,w=u.length,S=w-1;for(f=f===V?w:f;++_1?u[f-1]:V;return _="function"==typeof _?(u.pop(),_):V,yh(u,_)});function zx(u){var f=I(u);return f.__chain__=!0,f}function Ip(u,f){return f(u)}var Hx=yo(function(u){var f=u.length,_=f?u[0]:0,w=this.__wrapped__,S=function(P){return rh(P,u)};return!(f>1||this.__actions__.length)&&w instanceof kn&&il(_)?((w=w.slice(_,+_+(f?1:0))).__actions__.push({func:Ip,args:[S],thisArg:V}),new Ei(w,this.__chain__).thru(function(P){return f&&!P.length&&P.push(V),P})):this.thru(S)}),rD=fp(function(u,f,_){ii.call(u,_)?++u[_]:zo(u,_,1)}),$x=RA(Sx),kp=RA(rv);function bv(u,f){return(rn(u)?Rn:el)(u,Lt(f,3))}function Vl(u,f){return(rn(u)?lF:k_)(u,Lt(f,3))}var oD=fp(function(u,f,_){ii.call(u,_)?u[_].push(f):zo(u,_,[f])}),lD=pn(function(u,f,_){var w=-1,S="function"==typeof f,P=eo(u)?oe(u.length):[];return el(u,function(H){P[++w]=S?_s(f,H,_):_a(H,f,_)}),P}),cD=fp(function(u,f,_){zo(u,_,f)});function Pp(u,f){return(rn(u)?mi:sh)(u,Lt(f,3))}var Ma=fp(function(u,f,_){u[_?0:1].push(f)},function(){return[[],[]]}),_D=pn(function(u,f){if(null==u)return[];var _=f.length;return _>1&&Dr(u,f[0],f[1])?f=[]:_>2&&Dr(f[0],f[1],f[2])&&(f=[f[0]]),B_(u,Xn(f,1),[])}),Op=cF||function(){return Cr.Date.now()};function xh(u,f,_){return f=_?V:f,vo(u,Ga,V,V,V,V,f=u&&null==f?u.length:f)}function Ca(u,f){var _;if("function"!=typeof f)throw new Sr(Un);return u=dn(u),function(){return--u>0&&(_=f.apply(this,arguments)),u<=1&&(f=V),_}}var Oc=pn(function(u,f,_){var w=On;if(_.length){var S=Gi(_,wa(Oc));w|=ca}return vo(u,w,f,_,S)}),xv=pn(function(u,f,_){var w=On|dr;if(_.length){var S=Gi(_,wa(xv));w|=ca}return vo(f,w,u,_,S)});function yD(u,f,_){var w,S,P,H,Y,Q,_e=0,ye=!1,be=!1,Xe=!0;if("function"!=typeof u)throw new Sr(Un);function vt(Di){var Ts=w,wo=S;return w=S=V,_e=Di,H=u.apply(wo,Ts)}function Vt(Di){var Ts=Di-Q;return Q===V||Ts>=f||Ts<0||be&&Di-_e>=P}function An(){var Di=Op();if(Vt(Di))return Ln(Di);Y=gh(An,function mn(Di){var I1=f-(Di-Q);return be?Zr(I1,P-(Di-_e)):I1}(Di))}function Ln(Di){return Y=V,Xe&&w?vt(Di):(w=S=V,H)}function io(){var Di=Op(),Ts=Vt(Di);if(w=arguments,S=this,Q=Di,Ts){if(Y===V)return function Ut(Di){return _e=Di,Y=gh(An,f),ye?vt(Di):H}(Q);if(be)return ix(Y),Y=gh(An,f),vt(Q)}return Y===V&&(Y=gh(An,f)),H}return f=bo(f)||0,wi(_)&&(ye=!!_.leading,P=(be="maxWait"in _)?hr(bo(_.maxWait)||0,f):P,Xe="trailing"in _?!!_.trailing:Xe),io.cancel=function rs(){Y!==V&&ix(Y),_e=0,w=Q=S=Y=V},io.flush=function ss(){return Y===V?H:Ln(Op())},io}var kF=pn(function(u,f){return rp(u,1,f)}),PF=pn(function(u,f,_){return rp(u,bo(f)||0,_)});function Yd(u,f){if("function"!=typeof u||null!=f&&"function"!=typeof f)throw new Sr(Un);var _=function(){var w=arguments,S=f?f.apply(this,w):w[0],P=_.cache;if(P.has(S))return P.get(S);var H=u.apply(this,w);return _.cache=P.set(S,H)||P,H};return _.cache=new(Yd.Cache||pa),_}function Sv(u){if("function"!=typeof u)throw new Sr(Un);return function(){var f=arguments;switch(f.length){case 0:return!u.call(this);case 1:return!u.call(this,f[0]);case 2:return!u.call(this,f[0],f[1]);case 3:return!u.call(this,f[0],f[1],f[2])}return!u.apply(this,f)}}Yd.Cache=pa;var qx=zd(function(u,f){var _=(f=1==f.length&&rn(f[0])?mi(f[0],Br(Lt())):mi(Xn(f,1),Br(Lt()))).length;return pn(function(w){for(var S=-1,P=Zr(w.length,_);++S=f}),Fc=Bd(function(){return arguments}())?Bd:function(u){return Pi(u)&&ii.call(u,"callee")&&!Ad.call(u,"callee")},rn=oe.isArray,FF=m_?Br(m_):function xA(u){return Pi(u)&&es(u)==zu};function eo(u){return null!=u&&Vp(u.length)&&!zl(u)}function xi(u){return Pi(u)&&eo(u)}var rl=uF||Qd,Jx=D0?Br(D0):function vF(u){return Pi(u)&&es(u)==mc};function Bp(u){if(!Pi(u))return!1;var f=es(u);return f==md||f==AE||"string"==typeof u.message&&"string"==typeof u.name&&!to(u)}function zl(u){if(!wi(u))return!1;var f=es(u);return f==Of||f==d0||f==EE||f==TE}function Up(u){return"number"==typeof u&&u==dn(u)}function Vp(u){return"number"==typeof u&&u>-1&&u%1==0&&u<=Wa}function wi(u){var f=typeof u;return null!=u&&("object"==f||"function"==f)}function Pi(u){return null!=u&&"object"==typeof u}var Tv=Ot?Br(Ot):function wA(u){return Pi(u)&&zr(u)==Bo};function wh(u){return"number"==typeof u||Pi(u)&&es(u)==Vu}function to(u){if(!Pi(u)||es(u)!=ja)return!1;var f=xs(u);if(null===f)return!0;var _=ii.call(f,"constructor")&&f.constructor;return"function"==typeof _&&_ instanceof _&&Pl.call(_)==k0}var Hp=$f?Br($f):function bF(u){return Pi(u)&&es(u)==gd},nw=T0?Br(T0):function L_(u){return Pi(u)&&zr(u)==Uo};function Gp(u){return"string"==typeof u||!rn(u)&&Pi(u)&&es(u)==gc}function As(u){return"symbol"==typeof u||Pi(u)&&es(u)==Ff}var $o=Ys?Br(Ys):function q0(u){return Pi(u)&&Vp(u.length)&&!!Si[es(u)]},Pv=vp(lp),PD=vp(function(u,f){return u<=f});function Ov(u){if(!u)return[];if(eo(u))return Gp(u)?go(u):Qs(u);if(ih&&u[ih])return function rA(X){for(var ue,oe=[];!(ue=X.next()).done;)oe.push(ue.value);return oe}(u[ih]());var f=zr(u);return(f==Bo?qf:f==Uo?Hn:Bc)(u)}function sl(u){return u?(u=bo(u))===In||u===-In?(u<0?-1:1)*SE:u==u?u:0:0===u?u:0}function dn(u){var f=sl(u),_=f%1;return f==f?_?f-_:f:0}function OD(u){return u?Ll(dn(u),0,ua):0}function bo(u){if("number"==typeof u)return u;if(As(u))return Pf;if(wi(u)){var f="function"==typeof u.valueOf?u.valueOf():u;u=wi(f)?f+"":f}if("string"!=typeof u)return 0===u?u:+u;u=$n(u);var _=Ya.test(u);return _||ir.test(u)?oF(u.slice(2),_?2:8):VE.test(u)?Pf:+u}function Hl(u){return ci(u,Ds(u))}function Fn(u){return null==u?"":Zs(u)}var mt=Ar(function(u,f){if(wp(f)||eo(f))ci(f,fr(f),u);else for(var _ in f)ii.call(f,_)&&Ks(u,_,f[_])}),iw=Ar(function(u,f){ci(f,Ds(f),u)}),Gl=Ar(function(u,f,_,w){ci(f,Ds(f),u,w)}),ol=Ar(function(u,f,_,w){ci(f,fr(f),u,w)}),LD=yo(rh),Nc=pn(function(u,f){u=oi(u);var _=-1,w=f.length,S=w>2?f[2]:V;for(S&&Dr(f[0],f[1],S)&&(w=1);++_1),P}),ci(u,q_(u),_),w&&(_=Ms(_,Ci|ms|$s,xa));for(var S=f.length;S--;)dh(_,f[S]);return _}),jD=yo(function(u,f){return null==u?{}:function Z0(u,f){return Q0(u,f,function(_,w){return Uv(u,w)})}(u,f)});function Vv(u,f){if(null==u)return{};var _=mi(q_(u),function(w){return[w]});return f=Lt(f),Q0(u,_,function(w,S){return f(w,S[0])})}var aw=fh(fr),zv=fh(Ds);function Bc(u){return null==u?[]:Ju(u,fr(u))}var G=$d(function(u,f,_){return f=f.toLowerCase(),u+(_?Hv(f):f)});function Hv(u){return Kd(Fn(u).toLowerCase())}function Gv(u){return(u=Fn(u))&&u.replace(po,nA).replace(JO,"")}var s1=$d(function(u,f,_){return u+(_?"-":"")+f.toLowerCase()}),cw=$d(function(u,f,_){return u+(_?" ":"")+f.toLowerCase()}),o1=Gd("toLowerCase"),$v=$d(function(u,f,_){return u+(_?"_":"")+f.toLowerCase()}),c1=$d(function(u,f,_){return u+(_?" ":"")+Kd(f)}),fw=$d(function(u,f,_){return u+(_?" ":"")+f.toUpperCase()}),Kd=Gd("toUpperCase");function pw(u,f,_){return u=Fn(u),(f=_?V:f)===V?function nn(X){return ZE.test(X)}(u)?function fn(X){return X.match(eF)||[]}(u):function tA(X){return X.match(NE)||[]}(u):u.match(f)||[]}var jv=pn(function(u,f){try{return _s(u,V,f)}catch(_){return Bp(_)?_:new $t(_)}}),f1=yo(function(u,f){return Rn(f,function(_){_=Ho(_),zo(u,_,Oc(u[_],u))}),u});function Yv(u){return function(){return u}}var mw=Cs(),_1=Cs(!0);function is(u){return u}function $p(u){return N_("function"==typeof u?u:Ms(u,Ci))}var Xv=pn(function(u,f){return function(_){return _a(_,u,f)}}),v1=pn(function(u,f){return function(_){return _a(u,_,f)}});function gw(u,f,_){var w=fr(f),S=ga(f,w);null==_&&(!wi(f)||!S.length&&w.length)&&(_=f,f=u,u=this,S=ga(f,fr(f)));var P=!(wi(_)&&"chain"in _&&!_.chain),H=zl(u);return Rn(S,function(Y){var Q=f[Y];u[Y]=Q,H&&(u.prototype[Y]=function(){var _e=this.__chain__;if(P||_e){var ye=u(this.__wrapped__);return(ye.__actions__=Qs(this.__actions__)).push({func:Q,args:arguments,thisArg:u}),ye.__chain__=_e,ye}return Q.apply(u,kl([this.value()],arguments))})}),u}function xo(){}var _w=gp(mi),b1=gp(JE),x1=gp(Wf);function Mh(u){return px(u)?__(Ho(u)):function va(u){return function(f){return Mc(f,u)}}(u)}var Kv=sx(),Ch=sx(!0);function Sh(){return[]}function Qd(){return!1}var w1=$_(function(u,f){return u+f},0),M1=W_("ceil"),bw=$_(function(u,f){return u/f},1),C1=W_("floor"),D1=$_(function(u,f){return u*f},1),WF=W_("round"),ty=$_(function(u,f){return u-f},0);return I.after=function vD(u,f){if("function"!=typeof f)throw new Sr(Un);return u=dn(u),function(){if(--u<1)return f.apply(this,arguments)}},I.ary=xh,I.assign=mt,I.assignIn=iw,I.assignInWith=Gl,I.assignWith=ol,I.at=LD,I.before=Ca,I.bind=Oc,I.bindAll=f1,I.bindKey=xv,I.castArray=function wD(){if(!arguments.length)return[];var u=arguments[0];return rn(u)?u:[u]},I.chain=zx,I.chunk=function nv(u,f,_){f=(_?Dr(u,f,_):f===V)?1:hr(dn(f),0);var w=null==u?0:u.length;if(!w||f<1)return[];for(var S=0,P=0,H=oe(w_(w/f));SS?0:S+_),(w=w===V||w>S?S:dn(w))<0&&(w+=S),w=_>w?0:OD(w);_>>0)?(u=Fn(u))&&("string"==typeof f||null!=f&&!Hp(f))&&!(f=Zs(f))&&Cd(u)?Tc(go(u),0,_):u.split(f,_):[]},I.spread=function Kx(u,f){if("function"!=typeof u)throw new Sr(Un);return f=null==f?0:hr(dn(f),0),pn(function(_){var w=_[f],S=Tc(_,0,f);return w&&kl(S,w),_s(u,this,S)})},I.tail=function Pc(u){var f=null==u?0:u.length;return f?ts(u,1,f):[]},I.take=function Ox(u,f,_){return u&&u.length?ts(u,0,(f=_||f===V?1:dn(f))<0?0:f):[]},I.takeRight=function Fx(u,f,_){var w=null==u?0:u.length;return w?ts(u,(f=w-(f=_||f===V?1:dn(f)))<0?0:f,w):[]},I.takeRightWhile=function QA(u,f){return u&&u.length?uh(u,Lt(f,3),!1,!0):[]},I.takeWhile=function IF(u,f){return u&&u.length?uh(u,Lt(f,3)):[]},I.tap=function tD(u,f){return f(u),u},I.throttle=function Fp(u,f,_){var w=!0,S=!0;if("function"!=typeof u)throw new Sr(Un);return wi(_)&&(w="leading"in _?!!_.leading:w,S="trailing"in _?!!_.trailing:S),yD(u,f,{leading:w,maxWait:f,trailing:S})},I.thru=Ip,I.toArray=Ov,I.toPairs=aw,I.toPairsIn=zv,I.toPath=function yw(u){return rn(u)?mi(u,Ho):As(u)?[u]:Qs(yx(Fn(u)))},I.toPlainObject=Hl,I.transform=function XD(u,f,_){var w=rn(u),S=w||rl(u)||$o(u);if(f=Lt(f,4),null==_){var P=u&&u.constructor;_=S?w?new P:[]:wi(u)&&zl(P)?Pd(xs(u)):{}}return(S?Rn:ki)(u,function(H,Y,Q){return f(_,H,Y,Q)}),_},I.unary=function Zx(u){return xh(u,1)},I.union=Ap,I.unionBy=JA,I.unionWith=Lx,I.uniq=function Nx(u){return u&&u.length?ri(u):[]},I.uniqBy=function Bx(u,f){return u&&u.length?ri(u,Lt(f,2)):[]},I.uniqWith=function fv(u,f){return f="function"==typeof f?f:V,u&&u.length?ri(u,V,f):[]},I.unset=function KD(u,f){return null==u||dh(u,f)},I.unzip=Dp,I.unzipWith=yh,I.update=function ZD(u,f,_){return null==u?u:nx(u,f,hp(_))},I.updateWith=function QD(u,f,_,w){return w="function"==typeof w?w:V,null==u?u:nx(u,f,hp(_),w)},I.values=Bc,I.valuesIn=function JD(u){return null==u?[]:Ju(u,Ds(u))},I.without=Tp,I.words=pw,I.wrap=function Av(u,f){return Ev(hp(f),u)},I.xor=Ux,I.xorBy=pv,I.xorWith=mv,I.zip=gv,I.zipObject=function bh(u,f){return Dc(u||[],f||[],Ks)},I.zipObjectDeep=function eD(u,f){return Dc(u||[],f||[],Vd)},I.zipWith=Vx,I.entries=aw,I.entriesIn=zv,I.extend=iw,I.extendWith=Gl,gw(I,I),I.add=w1,I.attempt=jv,I.camelCase=G,I.capitalize=Hv,I.ceil=M1,I.clamp=function e1(u,f,_){return _===V&&(_=f,f=V),_!==V&&(_=(_=bo(_))==_?_:0),f!==V&&(f=(f=bo(f))==f?f:0),Ll(bo(u),f,_)},I.clone=function Kn(u){return Ms(u,$s)},I.cloneDeep=function CD(u){return Ms(u,Ci|$s)},I.cloneDeepWith=function Lp(u,f){return Ms(u,Ci|$s,f="function"==typeof f?f:V)},I.cloneWith=function MD(u,f){return Ms(u,$s,f="function"==typeof f?f:V)},I.conformsTo=function Qx(u,f){return null==f||R_(u,f,fr(f))},I.deburr=Gv,I.defaultTo=function g1(u,f){return null==u||u!=u?f:u},I.divide=bw,I.endsWith=function n1(u,f,_){u=Fn(u),f=Zs(f);var w=u.length,S=_=_===V?w:Ll(dn(_),0,w);return(_-=f.length)>=0&&u.slice(_,S)==f},I.eq=Go,I.escape=function r1(u){return(u=Fn(u))&&FE.test(u)?u.replace(f0,ot):u},I.escapeRegExp=function lw(u){return(u=Fn(u))&&_0.test(u)?u.replace(s_,"\\$&"):u},I.every=function vv(u,f,_){var w=rn(u)?JE:W0;return _&&Dr(u,f,_)&&(f=V),w(u,Lt(f,3))},I.find=$x,I.findIndex=Sx,I.findKey=function Fv(u,f){return ee(u,Lt(f,3),ki)},I.findLast=kp,I.findLastIndex=rv,I.findLastKey=function Lv(u,f){return ee(u,Lt(f,3),P_)},I.floor=C1,I.forEach=bv,I.forEachRight=Vl,I.forIn=function UD(u,f){return null==u?u:tl(u,Lt(f,3),Ds)},I.forInRight=function Nv(u,f){return null==u?u:Ai(u,Lt(f,3),Ds)},I.forOwn=function al(u,f){return u&&ki(u,Lt(f,3))},I.forOwnRight=function VD(u,f){return u&&P_(u,Lt(f,3))},I.get=Bv,I.gt=SD,I.gte=ED,I.has=function GD(u,f){return null!=u&&ux(u,f,sp)},I.hasIn=Uv,I.head=Ax,I.identity=is,I.includes=function aD(u,f,_,w){u=eo(u)?u:Bc(u),_=_&&!w?dn(_):0;var S=u.length;return _<0&&(_=hr(S+_,0)),Gp(u)?_<=S&&u.indexOf(f,_)>-1:!!S&&Ft(u,f,_)>-1},I.indexOf=function vh(u,f,_){var w=null==u?0:u.length;if(!w)return-1;var S=null==_?0:dn(_);return S<0&&(S=hr(w+S,0)),Ft(u,f,S)},I.inRange=function t1(u,f,_){return f=sl(f),_===V?(_=f,f=0):_=sl(_),function O_(u,f,_){return u>=Zr(f,_)&&u=-Wa&&u<=Wa},I.isSet=nw,I.isString=Gp,I.isSymbol=As,I.isTypedArray=$o,I.isUndefined=function ID(u){return u===V},I.isWeakMap=function RD(u){return Pi(u)&&zr(u)==_d},I.isWeakSet=function kD(u){return Pi(u)&&"[object WeakSet]"==es(u)},I.join=function Dx(u,f){return null==u?"":hF.call(u,f)},I.kebabCase=s1,I.last=Tr,I.lastIndexOf=function cv(u,f,_){var w=null==u?0:u.length;if(!w)return-1;var S=w;return _!==V&&(S=(S=dn(_))<0?hr(w+S,0):Zr(S,w-1)),f==f?function Sd(X,ue,oe){for(var Be=oe+1;Be--;)if(X[Be]===ue)return Be;return Be}(u,f,S):Qu(u,Yf,S,!0)},I.lowerCase=cw,I.lowerFirst=o1,I.lt=Pv,I.lte=PD,I.max=function xw(u){return u&&u.length?Ld(u,is,Nd):V},I.maxBy=function ww(u,f){return u&&u.length?Ld(u,Lt(f,2),Nd):V},I.mean=function S1(u){return Md(u,is)},I.meanBy=function E1(u,f){return Md(u,Lt(f,2))},I.min=function no(u){return u&&u.length?Ld(u,is,lp):V},I.minBy=function A1(u,f){return u&&u.length?Ld(u,Lt(f,2),lp):V},I.stubArray=Sh,I.stubFalse=Qd,I.stubObject=function vw(){return{}},I.stubString=function Zv(){return""},I.stubTrue=function Qv(){return!0},I.multiply=D1,I.nth=function Tx(u,f){return u&&u.length?CA(u,dn(f)):V},I.noConflict=function E(){return Cr._===this&&(Cr._=Kf),this},I.noop=xo,I.now=Op,I.pad=function a1(u,f,_){u=Fn(u);var w=(f=dn(f))?ur(u):0;if(!f||w>=f)return u;var S=(f-w)/2;return _p(M_(S),_)+u+_p(w_(S),_)},I.padEnd=function UF(u,f,_){u=Fn(u);var w=(f=dn(f))?ur(u):0;return f&&wf){var w=u;u=f,f=w}if(_||u%1||f%1){var S=C_();return Zr(u+S*(f-u+ke("1e-"+((S+"").length-1))),f)}return lh(u,f)},I.reduce=function dD(u,f,_){var w=rn(u)?g_:I0,S=arguments.length<3;return w(u,Lt(f,4),_,S,el)},I.reduceRight=function uD(u,f,_){var w=rn(u)?eA:I0,S=arguments.length<3;return w(u,Lt(f,4),_,S,k_)},I.repeat=function $i(u,f,_){return f=(_?Dr(u,f,_):f===V)?1:dn(f),ch(Fn(u),f)},I.replace=function l1(){var u=arguments,f=Fn(u[0]);return u.length<3?f:f.replace(u[1],u[2])},I.result=function YD(u,f,_){var w=-1,S=(f=ba(f,u)).length;for(S||(S=1,u=V);++wWa)return[];var _=ua,w=Zr(u,ua);f=Lt(f),u-=ua;for(var S=qs(w,f);++_=P)return u;var Y=_-ur(w);if(Y<1)return w;var Q=H?Tc(H,0,Y).join(""):u.slice(0,Y);if(S===V)return Q+w;if(H&&(Y+=Q.length-Y),Hp(S)){if(u.slice(Y).search(S)){var _e,ye=Q;for(S.global||(S=yc(S.source,Fn(x0.exec(S))+"g")),S.lastIndex=0;_e=S.exec(ye);)var be=_e.index;Q=Q.slice(0,be===V?Y:be)}}else if(u.indexOf(Zs(S),Y)!=Y){var Xe=Q.lastIndexOf(S);Xe>-1&&(Q=Q.slice(0,Xe))}return Q+w},I.unescape=function h1(u){return(u=Fn(u))&&OE.test(u)?u.replace(h0,Xf):u},I.uniqueId=function ey(u){var f=++yi;return Fn(u)+f},I.upperCase=fw,I.upperFirst=Kd,I.each=bv,I.eachRight=Vl,I.first=Ax,gw(I,function(){var u={};return ki(I,function(f,_){ii.call(I.prototype,_)||(u[_]=f)}),u}(),{chain:!1}),I.VERSION="4.17.21",Rn(["bind","bindKey","curry","curryRight","partial","partialRight"],function(u){I[u].placeholder=I}),Rn(["drop","take"],function(u,f){kn.prototype[u]=function(_){_=_===V?1:hr(dn(_),0);var w=this.__filtered__&&!f?new kn(this):this.clone();return w.__filtered__?w.__takeCount__=Zr(_,w.__takeCount__):w.__views__.push({size:Zr(_,ua),type:u+(w.__dir__<0?"Right":"")}),w},kn.prototype[u+"Right"]=function(_){return this.reverse()[u](_).reverse()}}),Rn(["filter","map","takeWhile"],function(u,f){var _=f+1,w=1==_||3==_;kn.prototype[u]=function(S){var P=this.clone();return P.__iteratees__.push({iteratee:Lt(S,3),type:_}),P.__filtered__=P.__filtered__||w,P}}),Rn(["head","last"],function(u,f){var _="take"+(f?"Right":"");kn.prototype[u]=function(){return this[_](1).value()[0]}}),Rn(["initial","tail"],function(u,f){var _="drop"+(f?"":"Right");kn.prototype[u]=function(){return this.__filtered__?new kn(this):this[_](1)}}),kn.prototype.compact=function(){return this.filter(is)},kn.prototype.find=function(u){return this.filter(u).head()},kn.prototype.findLast=function(u){return this.reverse().find(u)},kn.prototype.invokeMap=pn(function(u,f){return"function"==typeof u?new kn(this):this.map(function(_){return _a(_,u,f)})}),kn.prototype.reject=function(u){return this.filter(Sv(Lt(u)))},kn.prototype.slice=function(u,f){u=dn(u);var _=this;return _.__filtered__&&(u>0||f<0)?new kn(_):(u<0?_=_.takeRight(-u):u&&(_=_.drop(u)),f!==V&&(_=(f=dn(f))<0?_.dropRight(-f):_.take(f-u)),_)},kn.prototype.takeRightWhile=function(u){return this.reverse().takeWhile(u).reverse()},kn.prototype.toArray=function(){return this.take(ua)},ki(kn.prototype,function(u,f){var _=/^(?:filter|find|map|reject)|While$/.test(f),w=/^(?:head|last)$/.test(f),S=I[w?"take"+("last"==f?"Right":""):f],P=w||/^find/.test(f);S&&(I.prototype[f]=function(){var H=this.__wrapped__,Y=w?[1]:arguments,Q=H instanceof kn,_e=Y[0],ye=Q||rn(H),be=function(An){var Ln=S.apply(I,kl([An],Y));return w&&Xe?Ln[0]:Ln};ye&&_&&"function"==typeof _e&&1!=_e.length&&(Q=ye=!1);var Xe=this.__chain__,Ut=P&&!Xe,mn=Q&&!this.__actions__.length;if(!P&&ye){H=mn?H:new kn(this);var Vt=u.apply(H,Y);return Vt.__actions__.push({func:Ip,args:[be],thisArg:V}),new Ei(Vt,Xe)}return Ut&&mn?u.apply(this,Y):(Vt=this.thru(be),Ut?w?Vt.value()[0]:Vt.value():Vt)})}),Rn(["pop","push","shift","sort","splice","unshift"],function(u){var f=rr[u],_=/^(?:push|sort|unshift)$/.test(u)?"tap":"thru",w=/^(?:pop|shift)$/.test(u);I.prototype[u]=function(){var S=arguments;if(w&&!this.__chain__){var P=this.value();return f.apply(rn(P)?P:[],S)}return this[_](function(H){return f.apply(rn(H)?H:[],S)})}}),ki(kn.prototype,function(u,f){var _=I[f];if(_){var w=_.name+"";ii.call(Rd,w)||(Rd[w]=[]),Rd[w].push({name:f,func:_})}}),Rd[Wd(V,dr).name]=[{name:"wrapper",func:V}],kn.prototype.clone=function B0(){var u=new kn(this.__wrapped__);return u.__actions__=Qs(this.__actions__),u.__dir__=this.__dir__,u.__filtered__=this.__filtered__,u.__iteratees__=Qs(this.__iteratees__),u.__takeCount__=this.__takeCount__,u.__views__=Qs(this.__views__),u},kn.prototype.reverse=function Od(){if(this.__filtered__){var u=new kn(this);u.__dir__=-1,u.__filtered__=!0}else(u=this.clone()).__dir__*=-1;return u},kn.prototype.value=function ws(){var u=this.__wrapped__.value(),f=this.__dir__,_=rn(u),w=f<0,S=_?u.length:0,P=function xp(u,f,_){for(var w=-1,S=_.length;++w=this.__values__.length;return{done:u,value:u?V:this.__values__[this.__index__++]}},I.prototype.plant=function nD(u){for(var f,_=this;_ instanceof xc;){var w=ns(_);w.__index__=0,w.__values__=V,f?S.__wrapped__=w:f=w;var S=w;_=_.__wrapped__}return S.__wrapped__=u,f},I.prototype.reverse=function iD(){var u=this.__wrapped__;if(u instanceof kn){var f=u;return this.__actions__.length&&(f=new kn(this)),(f=f.reverse()).__actions__.push({func:Ip,args:[dv],thisArg:V}),new Ei(f,this.__chain__)}return this.thru(dv)},I.prototype.toJSON=I.prototype.valueOf=I.prototype.value=function RF(){return ya(this.__wrapped__,this.__actions__)},I.prototype.first=I.prototype.head,ih&&(I.prototype[ih]=function jd(){return this}),I}();Cr._=ys,(cn=function(){return ys}.call(Hs,ps,Hs,Lo))!==V&&(Lo.exports=cn)}.call(this)},738:function(Lo){var Hs;Lo.exports=((Hs=function(){function ps(Mi){return Nr.appendChild(Mi.dom),Mi}function cn(Mi){for(var Ci=0;CiZt+1e3&&(Al.update(1e3*Un/(Mi-Zt),100),Zt=Mi,Un=0,Gs)){var Ci=performance.memory;Gs.update(Ci.usedJSHeapSize/1048576,Ci.jsHeapSizeLimit/1048576)}return Mi},update:function(){Kr=this.end()},domElement:Nr,setMode:cn}}).Panel=function(ps,cn,V){var Nr=1/0,Kr=0,Zt=Math.round,Un=Zt(window.devicePixelRatio||1),Al=80*Un,Ha=48*Un,Gs=3*Un,Mi=2*Un,Ci=3*Un,ms=15*Un,$s=74*Un,Ws=30*Un,No=document.createElement("canvas");No.width=Al,No.height=Ha,No.style.cssText="width:80px;height:48px";var On=No.getContext("2d");return On.font="bold "+9*Un+"px Helvetica,Arial,sans-serif",On.textBaseline="top",On.fillStyle=V,On.fillRect(0,0,Al,Ha),On.fillStyle=cn,On.fillText(ps,Gs,Mi),On.fillRect(Ci,ms,$s,Ws),On.fillStyle=V,On.globalAlpha=.9,On.fillRect(Ci,ms,$s,Ws),{dom:No,update:function(dr,pc){Nr=Math.min(Nr,dr),Kr=Math.max(Kr,dr),On.fillStyle=V,On.globalAlpha=1,On.fillRect(0,0,Al,ms),On.fillStyle=cn,On.fillText(Zt(dr)+" "+ps+" ("+Zt(Nr)+"-"+Zt(Kr)+")",Gs,Mi),On.drawImage(No,Ci+Un,ms,$s-Un,Ws,Ci,ms,$s-Un,Ws),On.fillRect(Ci+$s-Un,ms,Un,Ws),On.fillStyle=V,On.globalAlpha=.9,On.fillRect(Ci+$s-Un,ms,Un,Zt((1-dr/pc)*Ws))}}},Hs)}},Lo=>{Lo(Lo.s=790)}]); \ No newline at end of file diff --git a/frontend/src/app/components/editor/library/delegate.block-ui/delegate.block-ui.component.html b/frontend/src/app/components/editor/library/delegate.block-ui/delegate.block-ui.component.html index 9780950..892cbbb 100644 --- a/frontend/src/app/components/editor/library/delegate.block-ui/delegate.block-ui.component.html +++ b/frontend/src/app/components/editor/library/delegate.block-ui/delegate.block-ui.component.html @@ -1,19 +1,19 @@ - - {{ resource?.name }} + + {{ resource?.name }} -
+
Resource type: - - - {{ schema.block_class_mro.split('__')[0] }} + + + {{ blockClassStr(schema) }} - +
- + diff --git a/frontend/src/app/components/editor/library/delegate.block-ui/delegate.block-ui.component.ts b/frontend/src/app/components/editor/library/delegate.block-ui/delegate.block-ui.component.ts index 2edd46d..b0d21ca 100644 --- a/frontend/src/app/components/editor/library/delegate.block-ui/delegate.block-ui.component.ts +++ b/frontend/src/app/components/editor/library/delegate.block-ui/delegate.block-ui.component.ts @@ -2,6 +2,7 @@ import { ChangeDetectionStrategy, Component, EventEmitter, Input, Output } from import { GuiComponentInterface } from '../../gui-component.interface'; import { joinId } from '../../../../utils/join-id'; import { MainService } from '../../../../services/main.service'; +import { blockClassStr } from '../../../../utils/block_class_str'; type DelegateBlockData = { choice_index: number; data: BlockData }; @@ -71,4 +72,5 @@ export class DelegateBlockUiComponent implements GuiComponentInterface { } @Output('changed') changed: EventEmitter = new EventEmitter(); + protected readonly blockClassStr = blockClassStr; } diff --git a/frontend/src/app/utils/block_class_str.ts b/frontend/src/app/utils/block_class_str.ts new file mode 100644 index 0000000..1345635 --- /dev/null +++ b/frontend/src/app/utils/block_class_str.ts @@ -0,0 +1,7 @@ +export const blockClassStr = (schema: BlockSchema): string => { + let finalClassName = schema.block_class_mro.split('__')[0]; + if (finalClassName === 'ArrayBlock') { + return blockClassStr(schema.child_schema) + '[]'; + } + return finalClassName; +}; diff --git a/library/loader.py b/library/loader.py index 45a365d..13f29d3 100644 --- a/library/loader.py +++ b/library/loader.py @@ -57,6 +57,9 @@ def _find_block_class(file_path: str, header_str: str, header_bytes: bytes): elif header_str == 'TRAC': from resources.eac.maps import TrkMap return TrkMap + elif header_str == 'COLL': + from resources.eac.maps import TrkMapCol + return TrkMapCol try: resource_id = header_bytes[0] if resource_id == 0x22: diff --git a/resources/NFS2.md b/resources/NFS2.md index a6b7f91..229ee8e 100644 --- a/resources/NFS2.md +++ b/resources/NFS2.md @@ -1,6 +1,6 @@ # **NFS2 file specs** # -*Last time updated: 2024-08-17 03:48:24.377814+00:00* +*Last time updated: 2024-12-19 01:27:46.630683+00:00* # **Info by file extensions** # @@ -15,6 +15,8 @@ **\*.QFS** image archive. [ShpiBlock](#shpiblock), **compressed** (compression algorithms not documented, can be found in resources/eac/compressions/) +**\*.TRK** main track file. [TrkMap](#trkmap) + **\*.UV** video, I just use ffmpeg to convert it **\*.VIV** archive with some data. [BigfBlock](#bigfblock) @@ -113,6 +115,58 @@ Did not find what you need or some given data is wrong? Please submit an | 1 | **unk0** | 3 | 3-bytes unsigned integer (little endian) | Unknown purpose | | 4 | **vertex_indices** | 4 | Array of `4` items
Item size: 1 byte
Item type: 1-byte unsigned integer | Indexes of vertices | | 8 | **texture_name** | 4 | UTF-8 string | ID of texture from neighbouring QFS file | +## **Maps** ## +### **TrkMap** ### +#### **Size**: 32..? bytes #### +#### **Description**: Main track file #### +| Offset | Name | Size (bytes) | Type | Description | +| --- | --- | --- | --- | --- | +| 0 | **resource_id** | 4 | UTF-8 string. Always == "TRAC" | Resource ID | +| 4 | **unk0** | 20 | Bytes | Unknown purpose | +| 24 | **num_superblocks** | 4 | 4-bytes unsigned integer (little endian) | Number of superblocks (nsblk) | +| 28 | **num_blocks** | 4 | 4-bytes unsigned integer (little endian) | Number of blocks (nblk) | +| 32 | **superblock_offsets** | num_superblocks\*4 | Array of `num_superblocks` items
Item size: 4 bytes
Item type: 4-bytes unsigned integer (little endian) | - | +| 32 + num_superblocks\*4 | **block_positions** | num_blocks\*12 | Array of `num_blocks` items
Item size: 12 bytes
Item type: Point in 3D space (x,y,z), where each coordinate is: 32-bit real number (little-endian, signed), where last 16 bits is a fractional part. The unit is meter | Coordinates of road spline points in 3D space | +| 32 + num_superblocks\*4 + num_blocks\*12 | **skip_bytes** | up to offset superblock_offsets[0] | Bytes | Useless padding | +| superblock_offsets[0] | **superblocks** | num_superblocks\*12..? | Array of `num_superblocks` items
Item type: [TrkSuperBlock](#trksuperblock) | Superblocks | +### **TrkSuperBlock** ### +#### **Size**: 12..? bytes #### +| Offset | Name | Size (bytes) | Type | Description | +| --- | --- | --- | --- | --- | +| 0 | **block_size** | 4 | 4-bytes unsigned integer (little endian) | Superblock size | +| 4 | **num_blocks** | 4 | 4-bytes unsigned integer (little endian) | Number of blocks in this superblock. Usually 8 or less in the last superblock | +| 8 | **unk** | 4 | 4-bytes unsigned integer (little endian) | Unknown purpose | +| 12 | **block_offsets** | num_blocks\*4 | Array of `num_blocks` items
Item size: 4 bytes
Item type: 4-bytes unsigned integer (little endian) | - | +| 12 + num_blocks\*4 | **blocks** | num_blocks\*88..? | Array of `num_blocks` items
Item type: [TrkBlock](#trkblock) | Blocks | +### **TrkBlock** ### +#### **Size**: 88..? bytes #### +| Offset | Name | Size (bytes) | Type | Description | +| --- | --- | --- | --- | --- | +| 0 | **block_size** | 4 | 4-bytes unsigned integer (little endian) | Block size | +| 4 | **block_size_2** | 4 | 4-bytes unsigned integer (little endian) | Block size (duplicated) | +| 8 | **num_extrablocks** | 2 | 2-bytes unsigned integer (little endian) | number of extrablocks | +| 10 | **unk0** | 2 | 2-bytes unsigned integer (little endian) | Unknown purpose | +| 12 | **block_idx** | 4 | 4-bytes unsigned integer (little endian) | Block index (serial number) | +| 16 | **bounds** | 48 | Array of `4` items
Item size: 12 bytes
Item type: Point in 3D space (x,y,z), where each coordinate is: 32-bit real number (little-endian, signed), where last 16 bits is a fractional part. The unit is meter | Block bounding rectangle | +| 64 | **extrablocks_offset** | 4 | 4-bytes unsigned integer (little endian) | | +| 68 | **nv8** | 2 | 2-bytes unsigned integer (little endian) | | +| 70 | **nv4** | 2 | 2-bytes unsigned integer (little endian) | | +| 72 | **nv2** | 2 | 2-bytes unsigned integer (little endian) | | +| 74 | **nv1** | 2 | 2-bytes unsigned integer (little endian) | | +| 76 | **np4** | 2 | 2-bytes unsigned integer (little endian) | | +| 78 | **np2** | 2 | 2-bytes unsigned integer (little endian) | | +| 80 | **np1** | 2 | 2-bytes unsigned integer (little endian) | | +| 82 | **unk1** | 6 | 6-bytes unsigned integer (little endian) | Unknown purpose | +| 88 | **vertices** | (nv8+nv1)\*6 | Array of `(nv8+nv1)` items
Item size: 6 bytes
Item type: Point in 3D space (x,y,z), where each coordinate is: 16-bit real number (little-endian, signed), where last 8 bits is a fractional part. The unit is meter | - | +| 88 + (nv8+nv1)\*6 | **polygons** | (np4+np2+np1)\*8 | Array of `(np4+np2+np1)` items
Item type: [TrkPolygon](#trkpolygon) | - | +| 88 + (nv8+nv1)\*6 + (np4+np2+np1)\*8 | **tmp** | custom_func | Bytes | - | +### **TrkPolygon** ### +#### **Size**: 8 bytes #### +| Offset | Name | Size (bytes) | Type | Description | +| --- | --- | --- | --- | --- | +| 0 | **texture** | 2 | 2-bytes unsigned integer (little endian) | Texture number | +| 2 | **texture2** | 2 | 2-bytes signed integer (little endian) | 255 (texture number for the other side == none ?) | +| 4 | **vertices** | 4 | Array of `4` items
Item size: 1 byte
Item type: 1-byte unsigned integer | - | ## **Bitmaps** ## ### **Bitmap4Bit** ### #### **Size**: 16..? bytes #### diff --git a/resources/eac/maps/__init__.py b/resources/eac/maps/__init__.py index 07eea33..8117239 100644 --- a/resources/eac/maps/__init__.py +++ b/resources/eac/maps/__init__.py @@ -1,7 +1,9 @@ from .nfs2 import (TrkMap, TrkSuperBlock, + TrkExtraBlock, TrkBlock, TrkPolygon, + TrkMapCol, ) from .tnfs import (RoadSplinePoint, ModelPropDescrData, diff --git a/resources/eac/maps/nfs2.py b/resources/eac/maps/nfs2.py index 9c3f78f..2376458 100644 --- a/resources/eac/maps/nfs2.py +++ b/resources/eac/maps/nfs2.py @@ -1,8 +1,11 @@ +from io import BufferedReader, BytesIO from typing import Dict +from library.context import ReadContext from library.read_blocks import (DeclarativeCompoundBlock, IntegerBlock, - UTF8Block, BytesBlock, ArrayBlock) + UTF8Block, BytesBlock, ArrayBlock, DataBlock, DelegateBlock) +from library.read_blocks.numbers import EnumByteBlock from resources.eac.fields.misc import Point3D_32, Point3D_16 @@ -15,6 +18,37 @@ class Fields(DeclarativeCompoundBlock.Fields): vertices = ArrayBlock(child=IntegerBlock(length=1, is_signed=False), length=4) +class TexturesMapExtraDataRecord(DeclarativeCompoundBlock): + class Fields(DeclarativeCompoundBlock.Fields): + texture_number = IntegerBlock(length=2, is_signed=False) + alignment_data = IntegerBlock(length=2, is_signed=False) + rgb0 = IntegerBlock(length=3, is_signed=False) + rgb1 = IntegerBlock(length=3, is_signed=False) + + +class TrkExtraBlock(DeclarativeCompoundBlock): + class Fields(DeclarativeCompoundBlock.Fields): + block_size = (IntegerBlock(length=4, is_signed=False), + {'description': 'Block size'}) + type = EnumByteBlock(enum_names=[(2, 'textures_map'), + (4, 'block_numbers'), + (5, 'polygon_modifier'), + (6, 'median_polygons'), + (7, 'objects_7'), + (8, '3d_structures'), + (9, 'lanes'), + (13, 'virtual'), + (15, 'positions'), + (18, 'objects_18'), + ]) + unk = IntegerBlock(length=1, required_value=0) + num_data_records = IntegerBlock(length=2) + data_records = DelegateBlock(possible_blocks=[ArrayBlock(child=TexturesMapExtraDataRecord(), length=lambda ctx: ctx.data('num_data_records')), + BytesBlock(length=lambda ctx: ctx.data('block_size') - 8)], + choice_index=lambda ctx, **_: 0 if ctx.data('type') == 'textures_map' else 1 + ) + + class TrkBlock(DeclarativeCompoundBlock): class Fields(DeclarativeCompoundBlock.Fields): block_size = (IntegerBlock(length=4, is_signed=False), @@ -48,12 +82,29 @@ class Fields(DeclarativeCompoundBlock.Fields): unk1 = (IntegerBlock(length=6), {'is_unknown': True}) vertices = ArrayBlock(child=Point3D_16(), - length=(lambda ctx: ctx.data('nv8') + ctx.data('nv1'), 'nv8+nv1')) + length=(lambda ctx: ctx.data('nv8') + ctx.data('nv1'), '(nv8+nv1)')) polygons = ArrayBlock(child=TrkPolygon(), - length=(lambda ctx: ctx.data('np4') + ctx.data('np2') + ctx.data('np1'), 'np4+np2+np1')) - tmp = BytesBlock( - length=lambda ctx: ctx.data('block_size') - 88 - 6 * (ctx.data('nv8') + ctx.data('nv1')) - 8 * ( - ctx.data('np4') + ctx.data('np2') + ctx.data('np1'))) + length=(lambda ctx: ctx.data('np4') + ctx.data('np2') + ctx.data('np1'), '(np4+np2+np1)')) + # extrablocks = ArrayBlock(child=TrkExtraBlock(), length=(lambda ctx: ctx.data('num_extrablocks'), 'num_extrablocks')) + unk2 = BytesBlock( + length=lambda ctx: 64 + ctx.data('extrablocks_offset') + ctx.read_start_offset - ctx.buffer.tell()) + extrablock_offsets = ArrayBlock(child=IntegerBlock(length=4, is_signed=False), + length=(lambda ctx: ctx.data('num_extrablocks'), 'num_extrablocks')) + extrablocks = ArrayBlock(length=(0, 'num_extrablocks'), child=TrkExtraBlock()) + + def read(self, buffer: [BufferedReader, BytesIO], ctx: ReadContext = DataBlock.root_read_ctx, name: str = '', + read_bytes_amount=None): + start_offset = buffer.tell() + data = super().read(buffer, ctx, name, read_bytes_amount) + extrablocks_offset = buffer.tell() - start_offset + extrablocks_buf = BytesIO(buffer.read(data['block_size'] - (buffer.tell() - start_offset))) + child_block = self.field_blocks_map.get('extrablocks').child + self_ctx = ReadContext(buffer=buffer, data=data, name=name, block=self, parent=ctx, + read_bytes_amount=read_bytes_amount) + for offset in data['extrablock_offsets']: + extrablocks_buf.seek(offset - extrablocks_offset) + data['extrablocks'].append(child_block.read(extrablocks_buf, self_ctx)) + return data class TrkSuperBlock(DeclarativeCompoundBlock): @@ -100,3 +151,32 @@ class Fields(DeclarativeCompoundBlock.Fields): length=(lambda ctx: ctx.data('num_superblocks'), 'num_superblocks')), {'description': 'Superblocks', 'custom_offset': 'superblock_offsets[0]'}) + + +class TrkMapCol(DeclarativeCompoundBlock): + class Fields(DeclarativeCompoundBlock.Fields): + resource_id = (UTF8Block(length=4, required_value='COLL'), + {'description': 'Resource ID'}) + unk = IntegerBlock(length=4, required_value=11) + block_size = (IntegerBlock(length=4, is_signed=False), + {'description': 'File size'}) + # TODO it is almost the same as we have in wwww. Share logic somehow? + num_extrablocks = (IntegerBlock(length=4, is_signed=False), + {'description': 'Number of extrablocks'}) + extrablock_offsets = ArrayBlock(child=IntegerBlock(length=4, is_signed=False), + length=(lambda ctx: ctx.data('num_extrablocks'), 'num_extrablocks')) + extrablocks = ArrayBlock(length=(0, 'num_extrablocks'), child=TrkExtraBlock()) + + def read(self, buffer: [BufferedReader, BytesIO], ctx: ReadContext = DataBlock.root_read_ctx, name: str = '', + read_bytes_amount=None): + start_offset = buffer.tell() + data = super().read(buffer, ctx, name, read_bytes_amount) + extrablocks_offset = 16 + extrablocks_buf = BytesIO(buffer.read(data['block_size'] - (buffer.tell() - start_offset))) + child_block = self.field_blocks_map.get('extrablocks').child + self_ctx = ReadContext(buffer=buffer, data=data, name=name, block=self, parent=ctx, + read_bytes_amount=read_bytes_amount) + for offset in data['extrablock_offsets']: + extrablocks_buf.seek(offset - extrablocks_offset) + data['extrablocks'].append(child_block.read(extrablocks_buf, self_ctx)) + return data diff --git a/serializers/maps.py b/serializers/maps.py index a7af2dc..1a2f13b 100644 --- a/serializers/maps.py +++ b/serializers/maps.py @@ -1,6 +1,7 @@ import json import math import os +import traceback from copy import deepcopy from string import Template from typing import List, Dict @@ -801,6 +802,19 @@ def __init__(self): def serialize(self, data: dict, path: str, id=None, block=None, **kwargs): super().serialize(data, path, id, block, **kwargs) + from library import require_resource + try: + (_, _, texture_map), _ = require_resource(id[:-3] + 'COL__extrablocks/0/data_records/data') + + def get_texture(tex): + return f"{texture_map[tex]['texture_number']:04}", texture_map[tex]['alignment_data'] + except Exception: + if self.settings.print_errors: + traceback.print_exc() + texture_map = [] + + def get_texture(tex): + return f"{tex:04}", 0 blocks = [] for sb in data['superblocks']: blocks += sb['blocks'] @@ -815,16 +829,21 @@ def serialize(self, data: dict, path: str, id=None, block=None, **kwargs): ] model.pivot_offset = (pivot['x'], pivot['y'], pivot['z']) model.vertices = [[v['x'], v['y'], v['z']] for v in block['vertices']] + model.vertex_uvs = [[0, 0] for _ in range(len(model.vertices))] for v in model.vertices[:block['nv8']]: v[0] += next_pivot['x'] - pivot['x'] v[1] += next_pivot['y'] - pivot['y'] v[2] += next_pivot['z'] - pivot['z'] for p in block['polygons'][(block['np4'] + block['np2']):]: + texture_name, _ = get_texture(p['texture']) model.polygons.append([p['vertices'][0], p['vertices'][1], p['vertices'][2]]) - model.texture_ids.append(f"{p['texture']:04}") + model.texture_ids.append(texture_name) model.polygons.append([p['vertices'][2], p['vertices'][0], p['vertices'][3]]) - model.texture_ids.append(f"{p['texture']:04}") - model.vertex_uvs = [[0 if i % 4 in [0, 3] else 1, 0 if i % 4 in [0, 1] else 1] for i, _ in enumerate(block['vertices'])] + model.texture_ids.append(texture_name) + model.vertex_uvs[p['vertices'][0]] = [0, 0] + model.vertex_uvs[p['vertices'][1]] = [0, 1] + model.vertex_uvs[p['vertices'][2]] = [1, 1] + model.vertex_uvs[p['vertices'][3]] = [1, 0] chunks.append(model) for mesh in chunks: From 1e1f45425f66b20f7f5066bc6bc6e04c23be8667 Mon Sep 17 00:00:00 2001 From: andy Date: Tue, 24 Dec 2024 03:17:27 +0200 Subject: [PATCH 06/36] new UV logic for trk map mesh --- frontend/dist/gui/index.html | 2 +- ...35154978ab.js => main.400d34314b7ff5b0.js} | 2 +- .../trk-map.block-ui.component.ts | 10 ++-- resources/eac/utils.py | 4 ++ serializers/maps.py | 52 ++++++++++++------- 5 files changed, 43 insertions(+), 27 deletions(-) rename frontend/dist/gui/{main.c299cf35154978ab.js => main.400d34314b7ff5b0.js} (86%) diff --git a/frontend/dist/gui/index.html b/frontend/dist/gui/index.html index 6cc4d82..04f52bb 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.c299cf35154978ab.js b/frontend/dist/gui/main.400d34314b7ff5b0.js similarity index 86% rename from frontend/dist/gui/main.c299cf35154978ab.js rename to frontend/dist/gui/main.400d34314b7ff5b0.js index 4462dcb..4404b44 100644 --- a/frontend/dist/gui/main.c299cf35154978ab.js +++ b/frontend/dist/gui/main.400d34314b7ff5b0.js @@ -1 +1 @@ -(self.webpackChunkgui=self.webpackChunkgui||[]).push([[179],{790:(Lo,Hs,ps)=>{"use strict";function cn(i){return"function"==typeof i}function V(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 Nr=V(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 Kr(i,t){if(i){const e=i.indexOf(t);0<=e&&i.splice(e,1)}}class Zt{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(cn(n))try{n()}catch(s){t=s instanceof Nr?s.errors:[s]}const{_finalizers:r}=this;if(r){this._finalizers=null;for(const s of r)try{Ha(s)}catch(o){t=t??[],o instanceof Nr?t=[...t,...o.errors]:t.push(o)}}if(t)throw new Nr(t)}}add(t){var e;if(t&&t!==this)if(this.closed)Ha(t);else{if(t instanceof Zt){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)&&Kr(e,t)}remove(t){const{_finalizers:e}=this;e&&Kr(e,t),t instanceof Zt&&t._removeParent(this)}}Zt.EMPTY=(()=>{const i=new Zt;return i.closed=!0,i})();const Un=Zt.EMPTY;function Al(i){return i instanceof Zt||i&&"closed"in i&&cn(i.remove)&&cn(i.add)&&cn(i.unsubscribe)}function Ha(i){cn(i)?i():i.unsubscribe()}const Gs={onUnhandledError:null,onStoppedNotification:null,Promise:void 0,useDeprecatedSynchronousErrorHandling:!1,useDeprecatedNextContext:!1},Mi={setTimeout(i,t,...e){const{delegate:n}=Mi;return n?.setTimeout?n.setTimeout(i,t,...e):setTimeout(i,t,...e)},clearTimeout(i){const{delegate:t}=Mi;return(t?.clearTimeout||clearTimeout)(i)},delegate:void 0};function Ci(i){Mi.setTimeout(()=>{const{onUnhandledError:t}=Gs;if(!t)throw i;t(i)})}function ms(){}const $s=On("C",void 0,void 0);function On(i,t,e){return{kind:i,value:t,error:e}}let dr=null;function pc(i){if(Gs.useDeprecatedSynchronousErrorHandling){const t=!dr;if(t&&(dr={errorThrown:!1,error:null}),i(),t){const{errorThrown:e,error:n}=dr;if(dr=null,e)throw n}}else i()}class Dl extends Zt{constructor(t){super(),this.isStopped=!1,t?(this.destination=t,Al(t)&&t.add(this)):this.destination=ME}static create(t,e,n){return new da(t,e,n)}next(t){this.isStopped?Xg(function No(i){return On("N",i,void 0)}(t),this):this._next(t)}error(t){this.isStopped?Xg(function Ws(i){return On("E",void 0,i)}(t),this):(this.isStopped=!0,this._error(t))}complete(){this.isStopped?Xg($s,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 ca=Function.prototype.bind;function Tl(i,t){return ca.call(i,t)}class Ga{constructor(t){this.partialObserver=t}next(t){const{partialObserver:e}=this;if(e.next)try{e.next(t)}catch(n){pd(n)}}error(t){const{partialObserver:e}=this;if(e.error)try{e.error(t)}catch(n){pd(n)}else pd(t)}complete(){const{partialObserver:t}=this;if(t.complete)try{t.complete()}catch(e){pd(e)}}}class da extends Dl{constructor(t,e,n){let r;if(super(),cn(t)||!t)r={next:t??void 0,error:e??void 0,complete:n??void 0};else{let s;this&&Gs.useDeprecatedNextContext?(s=Object.create(t),s.unsubscribe=()=>this.unsubscribe(),r={next:t.next&&Tl(t.next,s),error:t.error&&Tl(t.error,s),complete:t.complete&&Tl(t.complete,s)}):r=t}this.destination=new Ga(r)}}function pd(i){Gs.useDeprecatedSynchronousErrorHandling?function la(i){Gs.useDeprecatedSynchronousErrorHandling&&dr&&(dr.errorThrown=!0,dr.error=i)}(i):Ci(i)}function Xg(i,t){const{onStoppedNotification:e}=Gs;e&&Mi.setTimeout(()=>e(i,t))}const ME={closed:!0,next:ms,error:function wE(i){throw i},complete:ms},Kg="function"==typeof Symbol&&Symbol.observable||"@@observable";function $a(i){return i}function a0(i){return 0===i.length?$a:1===i.length?i[0]:function(e){return i.reduce((n,r)=>r(n),e)}}let In=(()=>{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 Pf(i){return i&&i instanceof Dl||function SE(i){return i&&cn(i.next)&&cn(i.error)&&cn(i.complete)}(i)&&Al(i)}(e)?e:new da(e,n,r);return pc(()=>{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=Wa(n))((r,s)=>{const o=new da({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)}[Kg](){return this}pipe(...e){return a0(e)(this)}toPromise(e){return new(e=Wa(e))((n,r)=>{let s;this.subscribe(o=>s=o,o=>r(o),()=>n(s))})}}return i.create=t=>new i(t),i})();function Wa(i){var t;return null!==(t=i??Gs.Promise)&&void 0!==t?t:Promise}const ua=V(i=>function(){i(this),this.name="ObjectUnsubscribedError",this.message="object unsubscribed"});let Re=(()=>{class i extends In{constructor(){super(),this.closed=!1,this.currentObservers=null,this.observers=[],this.isStopped=!1,this.hasError=!1,this.thrownError=null}lift(e){const n=new l0(this,this);return n.operator=e,n}_throwIfClosed(){if(this.closed)throw new ua}next(e){pc(()=>{if(this._throwIfClosed(),!this.isStopped){this.currentObservers||(this.currentObservers=Array.from(this.observers));for(const n of this.currentObservers)n.next(e)}})}error(e){pc(()=>{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(){pc(()=>{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?Un:(this.currentObservers=null,s.push(e),new Zt(()=>{this.currentObservers=null,Kr(s,e)}))}_checkFinalizedStatuses(e){const{hasError:n,thrownError:r,isStopped:s}=this;n?e.error(r):s&&e.complete()}asObservable(){const e=new In;return e.source=this,e}}return i.create=(t,e)=>new l0(t,e),i})();class l0 extends Re{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:Un}}function c0(i){return cn(i?.lift)}function ti(i){return t=>{if(c0(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 Yn(i,t,e,n,r){return new EE(i,t,e,n,r)}class EE extends Dl{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 et(i,t){return ti((e,n)=>{let r=0;e.subscribe(Yn(n,s=>{n.next(i.call(t,s,r++))}))})}function ha(i){return this instanceof ha?(this.v=i,this):new ha(i)}function Nf(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 Zg(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 i_=i=>i&&"number"==typeof i.length&&"function"!=typeof i;function r_(i){return cn(i?.then)}function p0(i){return cn(i[Kg])}function m0(i){return Symbol.asyncIterator&&cn(i?.[Symbol.asyncIterator])}function g0(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 _0=function s_(){return"function"==typeof Symbol&&Symbol.iterator?Symbol.iterator:"@@iterator"}();function Bf(i){return cn(i?.[_0])}function v0(i){return function Lf(i,t,e){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var r,n=e.apply(i,t||[]),s=[];return r=Object.create(("function"==typeof AsyncIterator?AsyncIterator:Object).prototype),a("next"),a("throw"),a("return",function o(m){return function(g){return Promise.resolve(g).then(m,h)}}),r[Symbol.asyncIterator]=function(){return this},r;function a(m,g){n[m]&&(r[m]=function(b){return new Promise(function(v,y){s.push([m,b,v,y])>1||l(m,b)})},g&&(r[m]=g(r[m])))}function l(m,g){try{!function c(m){m.value instanceof ha?Promise.resolve(m.value.v).then(d,h):p(s[0][2],m)}(n[m](g))}catch(b){p(s[0][3],b)}}function d(m){l("next",m)}function h(m){l("throw",m)}function p(m,g){m(g),s.shift(),s.length&&l(s[0][0],s[0][1])}}(this,arguments,function*(){const e=i.getReader();try{for(;;){const{value:n,done:r}=yield ha(e.read());if(r)return yield ha(void 0);yield yield ha(n)}}finally{e.releaseLock()}})}function y0(i){return cn(i?.getReader)}function wr(i){if(i instanceof In)return i;if(null!=i){if(p0(i))return function LE(i){return new In(t=>{const e=i[Kg]();if(cn(e.subscribe))return e.subscribe(t);throw new TypeError("Provided object does not correctly implement Symbol.observable")})}(i);if(i_(i))return function NE(i){return new In(t=>{for(let e=0;e{i.then(e=>{t.closed||(t.next(e),t.complete())},e=>t.error(e)).then(null,Ci)})}(i);if(m0(i))return b0(i);if(Bf(i))return function UE(i){return new In(t=>{for(const e of i)if(t.next(e),t.closed)return;t.complete()})}(i);if(y0(i))return function x0(i){return b0(v0(i))}(i)}throw g0(i)}function b0(i){return new In(t=>{(function VE(i,t){var e,n,r,s;return function gd(i,t,e,n){return new(e||(e=Promise))(function(s,o){function a(d){try{c(n.next(d))}catch(h){o(h)}}function l(d){try{c(n.throw(d))}catch(h){o(h)}}function c(d){d.done?s(d.value):function r(s){return s instanceof e?s:new e(function(o){o(s)})}(d.value).then(a,l)}c((n=n.apply(i,t||[])).next())})}(this,void 0,void 0,function*(){try{for(e=Nf(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 Ya(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 ir(i,t,e=1/0){return cn(t)?ir((n,r)=>et((s,o)=>t(n,s,r,o))(wr(i(n,r))),e):("number"==typeof t&&(e=t),ti((n,r)=>function zE(i,t,e,n,r,s,o,a){const l=[];let c=0,d=0,h=!1;const p=()=>{h&&!l.length&&!c&&t.complete()},m=b=>c{s&&t.next(b),c++;let v=!1;wr(e(b,d++)).subscribe(Yn(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(Yn(t,m,()=>{h=!0,p()})),()=>{a?.()}}(n,r,i,e)))}function yd(i=1/0){return ir($a,i)}const po=new In(i=>i.complete());function Gu(i){return i&&cn(i.schedule)}function a_(i){return i[i.length-1]}function w0(i){return cn(a_(i))?i.pop():void 0}function $u(i){return Gu(a_(i))?i.pop():void 0}function l_(i,t=0){return ti((e,n)=>{e.subscribe(Yn(n,r=>Ya(n,i,()=>n.next(r),t),()=>Ya(n,i,()=>n.complete(),t),r=>Ya(n,i,()=>n.error(r),t)))})}function c_(i,t=0){return ti((e,n)=>{n.add(i.schedule(()=>e.subscribe(n),t))})}function d_(i,t){if(!i)throw new Error("Iterable cannot be null");return new In(e=>{Ya(e,t,()=>{const n=i[Symbol.asyncIterator]();Ya(e,t,()=>{n.next().then(r=>{r.done?e.complete():e.next(r.value)})},0,!0)})})}function Ni(i,t){return t?function S0(i,t){if(null!=i){if(p0(i))return function GE(i,t){return wr(i).pipe(c_(t),l_(t))}(i,t);if(i_(i))return function WE(i,t){return new In(e=>{let n=0;return t.schedule(function(){n===i.length?e.complete():(e.next(i[n++]),e.closed||this.schedule())})})}(i,t);if(r_(i))return function $E(i,t){return wr(i).pipe(c_(t),l_(t))}(i,t);if(m0(i))return d_(i,t);if(Bf(i))return function jE(i,t){return new In(e=>{let n;return Ya(e,t,()=>{n=i[_0](),Ya(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)}),()=>cn(n?.return)&&n.return()})}(i,t);if(y0(i))return function C0(i,t){return d_(v0(i),t)}(i,t)}throw g0(i)}(i,t):wr(i)}function Mr(...i){const t=$u(i),e=function M0(i,t){return"number"==typeof a_(i)?i.pop():t}(i,1/0),n=i;return n.length?1===n.length?wr(n[0]):yd(e)(Ni(n,t)):po}function Uf(i={}){const{connector:t=(()=>new Re),resetOnError:e=!0,resetOnComplete:n=!0,resetOnRefCountZero:r=!0}=i;return s=>{let o,a,l,c=0,d=!1,h=!1;const p=()=>{a?.unsubscribe(),a=void 0},m=()=>{p(),o=l=void 0,d=h=!1},g=()=>{const b=o;m(),b?.unsubscribe()};return ti((b,v)=>{c++,!h&&!d&&p();const y=l=l??t();v.add(()=>{c--,0===c&&!h&&!d&&(a=bd(g,r))}),y.subscribe(v),!o&&c>0&&(o=new da({next:M=>y.next(M),error:M=>{h=!0,p(),a=bd(m,e,M),y.error(M)},complete:()=>{d=!0,p(),a=bd(m,n),y.complete()}}),wr(b).subscribe(o))})(s)}}function bd(i,t,...e){if(!0===t)return void i();if(!1===t)return;const n=new da({next:()=>{n.unsubscribe(),i()}});return wr(t(...e)).subscribe(n)}function li(i){for(let t in i)if(i[t]===li)return t;throw Error("Could not find renamed property on target object.")}function u_(i,t){for(const e in t)t.hasOwnProperty(e)&&!i.hasOwnProperty(e)&&(i[e]=t[e])}function pi(i){if("string"==typeof i)return i;if(Array.isArray(i))return"["+i.map(pi).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 Vf(i,t){return null==i||""===i?null===t?"":t:null==t||""===t?i:i+" "+t}const h_=li({__forward_ref__:li});function Gn(i){return i.__forward_ref__=Gn,i.toString=function(){return pi(this())},i}function Pt(i){return Wu(i)?i():i}function Wu(i){return"function"==typeof i&&i.hasOwnProperty(h_)&&i.__forward_ref__===Gn}function ju(i){return i&&!!i.\u0275providers}const qu="https://g.co/ng/security#xss";class pe extends Error{constructor(t,e){super(zf(t,e)),this.code=t}}function zf(i,t){return`NG0${Math.abs(i)}${t?": "+t.trim():""}`}function Qt(i){return"string"==typeof i?i:null==i?"":String(i)}function Hf(i,t){throw new pe(-201,!1)}function En(i,t){null==i&&function ni(i,t,e,n){throw new Error(`ASSERTION ERROR: ${i}`+(null==n?"":` [Expected=> ${e} ${n} ${t} <=Actual]`))}(t,i,null,"!=")}function ke(i){return{token:i.token,providedIn:i.providedIn||null,factory:i.factory,value:void 0}}function Kt(i){return{providers:i.providers||[],imports:i.imports||[]}}function Gf(i){return f_(i,xd)||f_(i,m_)}function f_(i,t){return i.hasOwnProperty(t)?i[t]:null}function p_(i){return i&&(i.hasOwnProperty(gs)||i.hasOwnProperty(D0))?i[gs]:null}const xd=li({\u0275prov:li}),gs=li({\u0275inj:li}),m_=li({ngInjectableDef:li}),D0=li({ngInjectorDef:li});var Ot=(()=>((Ot=Ot||{})[Ot.Default=0]="Default",Ot[Ot.Host=1]="Host",Ot[Ot.Self=2]="Self",Ot[Ot.SkipSelf=4]="SkipSelf",Ot[Ot.Optional=8]="Optional",Ot))();let $f;function Ys(i){const t=$f;return $f=i,t}function _s(i,t,e){const n=Gf(i);return n&&"root"==n.providedIn?void 0===n.value?n.value=n.factory():n.value:e&Ot.Optional?null:void 0!==t?t:void Hf(pi(i))}const Rn=(()=>typeof globalThis<"u"&&globalThis||typeof global<"u"&&global||typeof window<"u"&&window||typeof self<"u"&&typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&self)(),Rl={},Ku="__NG_DI_FLAG__",mi="ngTempTokenPath",kl="ngTokenPath",g_=/\n/gm,eA="\u0275",Wf="__source";let Zu;function wd(i){const t=Zu;return Zu=i,t}function tA(i,t=Ot.Default){if(void 0===Zu)throw new pe(-203,!1);return null===Zu?_s(i,void 0,t):Zu.get(i,t&Ot.Optional?null:void 0,t)}function ee(i,t=Ot.Default){return(function T0(){return $f}()||tA)(Pt(i),t)}function Ft(i,t=Ot.Default){return ee(i,jf(t))}function jf(i){return typeof i>"u"||"number"==typeof i?i:0|(i.optional&&8)|(i.host&&1)|(i.self&&2)|(i.skipSelf&&4)}function Yf(i){const t=[];for(let e=0;e((mo=mo||{})[mo.OnPush=0]="OnPush",mo[mo.Default=1]="Default",mo))(),qs=(()=>{return(i=qs||(qs={}))[i.Emulated=0]="Emulated",i[i.None=2]="None",i[i.ShadowDom=3]="ShadowDom",qs;var i})();const Xa={},$n=[],Br=li({\u0275cmp:li}),Ju=li({\u0275dir:li}),vc=li({\u0275pipe:li}),y_=li({\u0275mod:li}),fa=li({\u0275fac:li}),eh=li({__NG_ELEMENT_ID__:li});let nA=0;function ot(i){return qa(()=>{const t=go(i),e={...t,decls:i.decls,vars:i.vars,template:i.template,consts:i.consts||null,ngContentSelectors:i.ngContentSelectors,onPush:i.changeDetection===mo.OnPush,directiveDefs:null,pipeDefs:null,dependencies:t.standalone&&i.dependencies||null,getStandaloneInjector:null,data:i.data||{},encapsulation:i.encapsulation||qs.Emulated,id:"c"+nA++,styles:i.styles||$n,_:null,schemas:i.schemas||null,tView:null};b_(e);const n=i.dependencies;return e.directiveDefs=Xf(n,!1),e.pipeDefs=Xf(n,!0),e})}function th(i,t,e){const n=i.\u0275cmp;n.directiveDefs=Xf(t,!1),n.pipeDefs=Xf(e,!0)}function iA(i){return Hn(i)||Ur(i)}function Cd(i){return null!==i}function nn(i){return qa(()=>({type:i.type,bootstrap:i.bootstrap||$n,declarations:i.declarations||$n,imports:i.imports||$n,exports:i.exports||$n,transitiveCompileScopes:null,schemas:i.schemas||null,id:i.id||null}))}function qf(i,t){if(null==i)return Xa;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 ve(i){return qa(()=>{const t=go(i);return b_(t),t})}function Gi(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 Hn(i){return i[Br]||null}function Ur(i){return i[Ju]||null}function vs(i){return i[vc]||null}function ur(i,t){const e=i[y_]||null;if(!e&&!0===t)throw new Error(`Type ${pi(i)} does not have '\u0275mod' property.`);return e}function go(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||$n,viewQuery:i.viewQuery||null,features:i.features||null,setInput:null,findHostDirectiveDefs:null,hostDirectives:null,inputs:qf(i.inputs,t),outputs:qf(i.outputs)}}function b_(i){i.features?.forEach(t=>t(i))}function Xf(i,t){if(!i)return null;const e=t?vs:iA;return()=>("function"==typeof i?i():i).map(n=>e(n)).filter(Cd)}const Ka=0,at=1,fn=2,Bi=3,ys=4,X=5,ue=6,oe=7,Be=8,$t=9,Vn=10,yt=11,oi=12,yc=13,R0=14,Sr=15,rr=16,nh=17,Vo=18,Xs=19,Pl=20,ii=21,yi=22,Ed=1,k0=2,Kf=7,Zf=8,Za=9,Ui=10;function bs(i){return Array.isArray(i)&&"object"==typeof i[Ed]}function xs(i){return Array.isArray(i)&&!0===i[Ed]}function Qf(i){return 0!=(4&i.flags)}function Ad(i){return i.componentOffset>-1}function bc(i){return 1==(1&i.flags)}function _o(i){return!!i.template}function ih(i){return 0!=(256&i[fn])}function Qa(i,t){return i.hasOwnProperty(fa)?i[fa]:null}class Td{constructor(t,e,n){this.previousValue=t,this.currentValue=e,this.firstChange=n}isFirstChange(){return this.firstChange}}function bi(){return Id}function Id(i){return i.type.prototype.ngOnChanges&&(i.setInput=Rd),tp}function tp(){const i=N0(this),t=i?.current;if(t){const e=i.previous;if(e===Xa)i.previous=t;else for(let n in t)e[n]=t[n];i.current=null,this.ngOnChanges(t)}}function Rd(i,t,e,n){const r=this.declaredInputs[e],s=N0(i)||function lA(i,t){return i[L0]=t}(i,{previous:Xa,current:null}),o=s.current||(s.current={}),a=s.previous,l=a[r];o[r]=new Td(l&&l.currentValue,t,a===Xa),i[n]=t}bi.ngInherit=!0;const L0="__ngSimpleChanges__";function N0(i){return i[L0]||null}const Qr=function(i,t,e){},kd="svg";function I(i){for(;Array.isArray(i);)i=i[Ka];return i}function xc(i,t){return I(t[i])}function Ei(i,t){return I(t[i.index])}function B0(i,t){return i.data[t]}function Od(i,t){return i[t]}function ws(i,t){const e=t[i];return bs(e)?e:e[Ka]}function np(i){return 64==(64&i[fn])}function Ol(i,t){return null==t?null:i[t]}function U0(i){i[Vo]=0}function A_(i,t){i[X]+=t;let e=i,n=i[Bi];for(;null!==n&&(1===t&&1===e[X]||-1===t&&0===e[X]);)n[X]+=t,e=n,n=n[Bi]}const kt={lFrame:el(null),bindingsEnabled:!0};function pa(){return kt.bindingsEnabled}function Se(){return kt.lFrame.lView}function zn(){return kt.lFrame.tView}function an(i){return kt.lFrame.contextLView=i,i[Be]}function zt(i){return kt.lFrame.contextLView=null,i}function Er(){let i=z0();for(;null!==i&&64===i.type;)i=i.parent;return i}function z0(){return kt.lFrame.currentTNode}function ma(i,t){const e=kt.lFrame;e.currentTNode=i,e.isParent=t}function D_(){return kt.lFrame.isParent}function T_(){kt.lFrame.isParent=!1}function Vr(){const i=kt.lFrame;let t=i.bindingRootIndex;return-1===t&&(t=i.bindingRootIndex=i.tView.bindingStartIndex),t}function Fl(){return kt.lFrame.bindingIndex++}function Ks(i){const t=kt.lFrame,e=t.bindingIndex;return t.bindingIndex=t.bindingIndex+i,e}function $0(i,t){const e=kt.lFrame;e.bindingIndex=e.bindingRootIndex=i,zo(t)}function zo(i){kt.lFrame.currentDirectiveIndex=i}function rh(i){const t=kt.lFrame.currentDirectiveIndex;return-1===t?null:i[t]}function Ll(){return kt.lFrame.currentQueryIndex}function Ms(i){kt.lFrame.currentQueryIndex=i}function vA(i){const t=i[at];return 2===t.type?t.declTNode:1===t.type?i[ue]:null}function R_(i,t,e){if(e&Ot.SkipSelf){let r=t,s=i;for(;!(r=r.parent,null!==r||e&Ot.Host||(r=vA(s),null===r||(s=s[Sr],10&r.type))););if(null===r)return!1;t=r,i=s}const n=kt.lFrame=Fd();return n.currentTNode=t,n.lView=i,!0}function rp(i){const t=Fd(),e=i[at];kt.lFrame=t,t.currentTNode=e.firstChild,t.lView=i,t.tView=e,t.contextLView=i,t.bindingIndex=e.bindingStartIndex,t.inI18n=!1}function Fd(){const i=kt.lFrame,t=null===i?null:i.child;return null===t?el(i):t}function el(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 k_(){const i=kt.lFrame;return kt.lFrame=i.parent,i.currentTNode=null,i.lView=null,i}const W0=k_;function Ld(){const i=k_();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 Xn(){return kt.lFrame.selectedIndex}function tl(i){kt.lFrame.selectedIndex=i}function Ai(){const i=kt.lFrame;return B0(i.tView,i.selectedIndex)}function ki(){kt.lFrame.currentNamespace=kd}function ga(){!function Mc(){kt.lFrame.currentNamespace=null}()}function Nd(i,t){for(let e=t.directiveStart,n=t.directiveEnd;e=n)break}else t[l]<0&&(i[Vo]+=65536),(a>11>16&&(3&i[fn])===t){i[fn]+=2048,Qr(4,a,s);try{s.call(a)}finally{Qr(5,a,s)}}}else{Qr(4,a,s);try{s.call(a)}finally{Qr(5,a,s)}}}const _a=-1;class Bd{constructor(t,e,n){this.factory=t,this.resolving=!1,this.canSeeViewProviders=e,this.injectImpl=n}}function L_(i,t,e){let n=0;for(;nt){o=s-1;break}}}for(;s>16}(i),n=t;for(;e>0;)n=n[Sr],e--;return n}let Ud=!0;function cp(i){const t=Ud;return Ud=i,t}const B_=255,Z0=5;let Q0=0;const va={};function ah(i,t){const e=J0(i,t);if(-1!==e)return e;const n=t[at];n.firstCreatePass&&(i.injectorIndex=t.length,lh(n.data,i),lh(t,null),lh(n.blueprint,null));const r=ch(i,t),s=i.injectorIndex;if(lp(r)){const o=sh(r),a=oh(r,t),l=a[at].data;for(let c=0;c<8;c++)t[s+c]=a[o+c]|l[o+c]}return t[s+8]=r,s}function lh(i,t){i.push(0,0,0,0,0,0,0,0,t)}function J0(i,t){return-1===i.injectorIndex||i.parent&&i.parent.injectorIndex===i.injectorIndex||null===t[i.injectorIndex+8]?-1:i.injectorIndex}function ch(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=uh(r),null===n)return _a;if(e++,r=r[Sr],-1!==n.injectorIndex)return n.injectorIndex|e<<16}return _a}function pn(i,t,e){!function U_(i,t,e){let n;"string"==typeof e?n=e.charCodeAt(0)||0:e.hasOwnProperty(eh)&&(n=e[eh]),null==n&&(n=e[eh]=Q0++);const r=n&B_;t.data[i+(r>>Z0)]|=1<=0?t&B_:Zs:t}(e);if("function"==typeof s){if(!R_(t,i,n))return n&Ot.Host?ex(r,0,n):Vd(t,e,n,r);try{const o=s(n);if(null!=o||n&Ot.Optional)return o;Hf()}finally{W0()}}else if("number"==typeof s){let o=null,a=J0(i,t),l=_a,c=n&Ot.Host?t[rr][ue]:null;for((-1===a||n&Ot.SkipSelf)&&(l=-1===a?ch(i,t):t[a+8],l!==_a&&z_(n,!1)?(o=t[at],a=sh(l),t=oh(l,t)):a=-1);-1!==a;){const d=t[at];if(up(s,a,d.data)){const h=EA(a,t,e,o,n,c);if(h!==va)return h}l=t[a+8],l!==_a&&z_(n,t[at].data[a+8]===c)&&up(s,a,t)?(o=d,a=sh(l),t=oh(l,t)):a=-1}}return r}function EA(i,t,e,n,r,s){const o=t[at],a=o.data[i+8],d=ts(a,o,e,null==n?Ad(a)&&Ud:n!=o&&0!=(3&a.type),r&Ot.Host&&s===a);return null!==d?Ec(t,o,d,a):va}function ts(i,t,e,n,r){const s=i.providerIndexes,o=t.data,a=1048575&s,l=i.directiveStart,d=s>>20,p=r?a+d:i.directiveEnd;for(let m=n?a:a+d;m=l&&g.type===e)return m}if(r){const m=o[l];if(m&&_o(m)&&m.type===e)return l}return null}function Ec(i,t,e,n){let r=i[e];const s=t.data;if(function xA(i){return i instanceof Bd}(r)){const o=r;o.resolving&&function E0(i,t){const e=t?`. Dependency path: ${t.join(" > ")} > ${i}`:"";throw new pe(-200,`Circular dependency in DI detected for ${i}${e}`)}(function qn(i){return"function"==typeof i?i.name||i.toString():"object"==typeof i&&null!=i&&"function"==typeof i.type?i.type.name||i.type.toString():Qt(i)}(s[e]));const a=cp(o.canSeeViewProviders);o.resolving=!0;const l=o.injectImpl?Ys(o.injectImpl):null;R_(i,n,Ot.Default);try{r=i[e]=o.factory(void 0,s,i,n),t.firstCreatePass&&e>=n.directiveStart&&function es(i,t,e){const{ngOnChanges:n,ngOnInit:r,ngDoCheck:s}=t.type.prototype;if(n){const o=Id(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&&Ys(l),cp(a),o.resolving=!1,W0()}}return r}function up(i,t,e){return!!(e[t+(i>>Z0)]&1<{const t=i.prototype.constructor,e=t[fa]||dh(t),n=Object.prototype;let r=Object.getPrototypeOf(i.prototype).constructor;for(;r&&r!==n;){const s=r[fa]||dh(r);if(s&&s!==e)return s;r=Object.getPrototypeOf(r)}return s=>new s})}function dh(i){return Wu(i)?()=>{const t=dh(Pt(i));return t&&t()}:Qa(i)}function uh(i){const t=i[at],e=t.type;return 2===e?t.declTNode:1===e?i[ue]:null}function ya(i){return function SA(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 ba(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,d){const h=l.hasOwnProperty(Dc)?l[Dc]:Object.defineProperty(l,Dc,{value:[]})[Dc];for(;h.length<=d;)h.push(null);return(h[d]=h[d]||[]).push(o),l}}return e&&(r.prototype=Object.create(e.prototype)),r.prototype.ngMetadataName=i,r.annotationCls=r,r})}class me{constructor(t,e){this._desc=t,this.ngMetadataName="InjectionToken",this.\u0275prov=void 0,"number"==typeof e?this.__NG_ELEMENT_ID__=e:void 0!==e&&(this.\u0275prov=ke({token:this,providedIn:e.providedIn||"root",factory:e.factory}))}get multi(){return this}toString(){return`InjectionToken ${this._desc}`}}function Ul(i,t){i.forEach(e=>Array.isArray(e)?Ul(e,t):t(e))}function G_(i,t,e){t>=i.length?i.push(e):i.splice(t,0,e)}function pp(i,t){return t>=i.length-1?i.pop():i.splice(t,1)[0]}function Gd(i,t){const e=[];for(let n=0;n=0?i[1|n]=e:(n=~n,function IA(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 Wd(i,t){const e=Ic(i,t);if(e>=0)return i[1|e]}function Ic(i,t){return function gp(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),Ss=Md(zd("Optional"),8),xa=Md(zd("SkipSelf"),4);var Es=(()=>((Es=Es||{})[Es.Important=1]="Important",Es[Es.DashCase=2]="DashCase",Es))();const Cp=new Map;let vx=0;const iv="__ngContext__";function Hr(i,t){bs(t)?(i[iv]=t[Pl],function yx(i){Cp.set(i[Pl],i)}(t)):i[iv]=t}let sv;function ov(i,t){return sv(i,t)}function vh(i){const t=i[Bi];return xs(t)?t[Bi]:t}function av(i){return Dx(i[yc])}function lv(i){return Dx(i[ys])}function Dx(i){for(;null!==i&&!xs(i);)i=i[ys];return i}function Tr(i,t,e,n,r){if(null!=n){let s,o=!1;xs(n)?s=n:bs(n)&&(o=!0,n=n[Ka]);const a=I(n);0===i&&null!==e?null==r?Ox(t,e,a):Pc(t,e,a,r||null,!0):1===i&&null!==e?Pc(t,e,a,r||null,!0):2===i?function mv(i,t,e){const n=Ap(i,t);n&&function QA(i,t,e,n){i.removeChild(t,e,n)}(i,n,t,e)}(t,a,o):3===i&&t.destroyNode(a),null!=s&&function zx(i,t,e,n,r){const s=e[Kf];s!==I(e)&&Tr(t,i,n,s,r);for(let a=Ui;a0&&(i[e-1][ys]=n[ys]);const s=pp(i,Ui+t);!function WA(i,t){bh(i,t,t[yt],2,null,null),t[Ka]=null,t[ue]=null}(n[at],n);const o=s[Xs];null!==o&&o.detachView(s[at]),n[Bi]=null,n[ys]=null,n[fn]&=-65}return n}function Rx(i,t){if(!(128&t[fn])){const e=t[yt];e.destroyNode&&bh(i,t,e,3,null,null),function qA(i){let t=i[yc];if(!t)return hv(i[at],i);for(;t;){let e=null;if(bs(t))e=t[yc];else{const n=t[Ui];n&&(e=n)}if(!e){for(;t&&!t[ys]&&t!==i;)bs(t)&&hv(t[at],t),t=t[Bi];null===t&&(t=i),bs(t)&&hv(t[at],t),e=t&&t[ys]}t=e}}(t)}}function hv(i,t){if(!(128&t[fn])){t[fn]&=-65,t[fn]|=128,function ZA(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===qs.None||s===qs.Emulated)return null}return Ei(n,e)}}(i,t.parent,e)}function Pc(i,t,e,n,r){i.insertBefore(t,e,n,r)}function Ox(i,t,e){i.appendChild(t,e)}function Fx(i,t,e,n,r){null!==n?Pc(i,t,e,n,r):Ox(i,t,e)}function Ap(i,t){return i.parentNode(t)}function Lx(i,t,e){return Bx(i,t,e)}let fv,Rp,vv,Bx=function Nx(i,t,e){return 40&i.type?Ei(i,e):null};function yh(i,t,e,n){const r=kx(i,n,t),s=t[yt],a=Lx(n.parent||t[ue],n,t);if(null!=r)if(Array.isArray(e))for(let l=0;li,createScript:i=>i,createScriptURL:i=>i})}catch{}return Rp}()?.createHTML(i)||i}class Vl{constructor(t){this.changingThisBreaksApplicationSecurity=t}toString(){return`SafeValue must use [property]=binding: ${this.changingThisBreaksApplicationSecurity} (see ${qu})`}}class oD extends Vl{getTypeName(){return"HTML"}}class aD extends Vl{getTypeName(){return"Style"}}class lD extends Vl{getTypeName(){return"Script"}}class cD extends Vl{getTypeName(){return"URL"}}class Pp extends Vl{getTypeName(){return"ResourceURL"}}function Js(i){return i instanceof Vl?i.changingThisBreaksApplicationSecurity:i}function Ma(i,t){const e=function dD(i){return i instanceof Vl&&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 ${qu})`)}return e===t}class gD{constructor(t){this.inertDocumentHelper=t}getInertBodyElement(t){t=""+t;try{const e=(new window.DOMParser).parseFromString(jd(t),"text/html").body;return null===e?this.inertDocumentHelper.getInertBodyElement(t):(e.removeChild(e.firstChild),e)}catch{return null}}}class _D{constructor(t){this.defaultDoc=t,this.inertDocument=this.defaultDoc.implementation.createHTMLDocument("sanitization-inert")}getInertBodyElement(t){const e=this.inertDocument.createElement("template");return e.innerHTML=jd(t),e}}const vD=/^(?!javascript:)(?:[a-z0-9+.-]+:|[^&:\/?#]*(?:[\/?#]|$))/i;function xh(i){return(i=String(i)).match(vD)?i:"unsafe:"+i}function Ca(i){const t={};for(const e of i.split(","))t[e]=!0;return t}function Oc(...i){const t={};for(const e of i)for(const n in e)e.hasOwnProperty(n)&&(t[n]=!0);return t}const xv=Ca("area,br,col,hr,img,wbr"),wv=Ca("colgroup,dd,dt,li,p,tbody,td,tfoot,th,thead,tr"),Mv=Ca("rp,rt"),Cv=Oc(xv,Oc(wv,Ca("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")),Oc(Mv,Ca("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")),Oc(Mv,wv)),Yd=Ca("background,cite,href,itemtype,longdesc,poster,src,xlink:href"),qx=Oc(Yd,Ca("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"),Ca("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")),Ev=Ca("script,style,template");class Xx{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(!Cv.hasOwnProperty(e))return this.sanitizedSomething=!0,!Ev.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();Cv.hasOwnProperty(e)&&!xv.hasOwnProperty(e)&&(this.buf.push(""))}chars(t){this.buf.push(Kx(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 bD=/[\uD800-\uDBFF][\uDC00-\uDFFF]/g,xD=/([^\#-~ |!])/g;function Kx(i){return i.replace(/&/g,"&").replace(bD,function(t){return"&#"+(1024*(t.charCodeAt(0)-55296)+(t.charCodeAt(1)-56320)+65536)+";"}).replace(xD,function(t){return"&#"+t.charCodeAt(0)+";"}).replace(//g,">")}let Fp;function Zx(i,t){let e=null;try{Fp=Fp||function Yx(i){const t=new _D(i);return function Op(){try{return!!(new window.DOMParser).parseFromString(jd(""),"text/html")}catch{return!1}}()?new gD(t):t}(i);let n=t?String(t):"";e=Fp.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=Fp.getInertBodyElement(n)}while(n!==s);return jd((new Xx).sanitizeChildren(Av(e)||e))}finally{if(e){const n=Av(e)||e;for(;n.firstChild;)n.removeChild(n.firstChild)}}}function Av(i){return"content"in i&&function wD(i){return i.nodeType===Node.ELEMENT_NODE&&"TEMPLATE"===i.nodeName}(i)?i.content:null}var Kn=(()=>((Kn=Kn||{})[Kn.NONE=0]="NONE",Kn[Kn.HTML=1]="HTML",Kn[Kn.STYLE=2]="STYLE",Kn[Kn.SCRIPT=3]="SCRIPT",Kn[Kn.URL=4]="URL",Kn[Kn.RESOURCE_URL=5]="RESOURCE_URL",Kn))();function Lp(i){const t=function xi(){const i=Se();return i&&i[oi]}();return t?t.sanitize(Kn.URL,i)||"":Ma(i,"URL")?Js(i):xh(Qt(i))}const Np=new me("ENVIRONMENT_INITIALIZER"),rl=new me("INJECTOR",-1),Jx=new me("INJECTOR_DEF_TYPES");class ew{get(t,e=Rl){if(e===Rl){const n=new Error(`NullInjectorError: No provider for ${pi(t)}!`);throw n.name="NullInjectorError",n}return e}}function AD(...i){return{\u0275providers:tw(0,i),\u0275fromNgModule:!0}}function tw(i,...t){const e=[],n=new Set;let r;return Ul(t,s=>{const o=s;Dv(o,e,[],n)&&(r||(r=[]),r.push(o))}),void 0!==r&&Bp(r,e),e}function Bp(i,t){for(let e=0;e{t.push(s)})}}function Dv(i,t,e,n){if(!(i=Pt(i)))return!1;let r=null,s=p_(i);const o=!s&&Hn(i);if(s||o){if(o&&!o.standalone)return!1;r=i}else{const l=i.ngModule;if(s=p_(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)Dv(c,t,e,n)}}else{if(!s)return!1;{if(null!=s.imports&&!a){let c;n.add(r);try{Ul(s.imports,d=>{Dv(d,t,e,n)&&(c||(c=[]),c.push(d))})}finally{}void 0!==c&&Bp(c,t)}if(!a){const c=Qa(r)||(()=>new r);t.push({provide:r,useFactory:c,deps:$n},{provide:Jx,useValue:r,multi:!0},{provide:Np,useValue:()=>ee(r),multi:!0})}const l=s.providers;null==l||a||Up(l,d=>{t.push(d)})}}return r!==i&&void 0!==i.providers}function Up(i,t){for(let e of i)ju(e)&&(e=e.\u0275providers),Array.isArray(e)?Up(e,t):t(e)}const Vp=li({provide:String,useValue:li});function wi(i){return null!==i&&"object"==typeof i&&Vp in i}function Lc(i){return"function"==typeof i}const Iv=new me("Set Injector scope."),zp={},TD={};let Rv;function wh(){return void 0===Rv&&(Rv=new ew),Rv}class to{}class Hp extends to{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,Pv(t,o=>this.processProvider(o)),this.records.set(rl,$o(void 0,this)),r.has("environment")&&this.records.set(to,$o(void 0,this));const s=this.records.get(Iv);null!=s&&"string"==typeof s.value&&this.scopes.add(s.value),this.injectorDefTypes=new Set(this.get(Jx.multi,$n,Ot.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=wd(this),n=Ys(void 0);try{return t()}finally{wd(e),Ys(n)}}get(t,e=Rl,n=Ot.Default){this.assertNotDestroyed(),n=jf(n);const r=wd(this),s=Ys(void 0);try{if(!(n&Ot.SkipSelf)){let a=this.records.get(t);if(void 0===a){const l=function kD(i){return"function"==typeof i||"object"==typeof i&&i instanceof me}(t)&&Gf(t);a=l&&this.injectableDefInScope(l)?$o(kv(t),zp):null,this.records.set(t,a)}if(null!=a)return this.hydrate(t,a)}return(n&Ot.Self?wh():this.parent).get(t,e=n&Ot.Optional&&e===Rl?null:e)}catch(o){if("NullInjectorError"===o.name){if((o[mi]=o[mi]||[]).unshift(pi(t)),r)throw o;return function v_(i,t,e,n){const r=i[mi];throw t[Wf]&&r.unshift(t[Wf]),i.message=function I0(i,t,e,n=null){i=i&&"\n"===i.charAt(0)&&i.charAt(1)==eA?i.slice(2):i;let r=pi(t);if(Array.isArray(t))r=t.map(pi).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):pi(a)))}r=`{${s.join(", ")}}`}return`${e}${n?"("+n+")":""}[${r}]: ${i.replace(g_,"\n ")}`}("\n"+i.message,r,e,n),i[kl]=r,i[mi]=null,i}(o,t,"R3InjectorError",this.source)}throw o}finally{Ys(s),wd(r)}}resolveInjectorInitializers(){const t=wd(this),e=Ys(void 0);try{const n=this.get(Np.multi,$n,Ot.Self);for(const r of n)r()}finally{wd(t),Ys(e)}}toString(){const t=[],e=this.records;for(const n of e.keys())t.push(pi(n));return`R3Injector[${t.join(", ")}]`}assertNotDestroyed(){if(this._destroyed)throw new pe(205,!1)}processProvider(t){let e=Lc(t=Pt(t))?t:Pt(t&&t.provide);const n=function Gp(i){return wi(i)?$o(void 0,i.useValue):$o(As(i),zp)}(t);if(Lc(t)||!0!==t.multi)this.records.get(e);else{let r=this.records.get(e);r||(r=$o(void 0,zp,!0),r.factory=()=>Yf(r.multi),this.records.set(e,r)),e=t,r.multi.push(t)}this.records.set(e,n)}hydrate(t,e){return e.value===zp&&(e.value=TD,e.value=e.factory()),"object"==typeof e.value&&e.value&&function RD(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=Pt(t.providedIn);return"string"==typeof e?"any"===e||this.scopes.has(e):this.injectorDefTypes.has(e)}}function kv(i){const t=Gf(i),e=null!==t?t.factory:Qa(i);if(null!==e)return e;if(i instanceof me)throw new pe(204,!1);if(i instanceof Function)return function nw(i){const t=i.length;if(t>0)throw Gd(t,"?"),new pe(204,!1);const e=function Xu(i){return i&&(i[xd]||i[m_])||null}(i);return null!==e?()=>e.factory(i):()=>new i}(i);throw new pe(204,!1)}function As(i,t,e){let n;if(Lc(i)){const r=Pt(i);return Qa(r)||kv(r)}if(wi(i))n=()=>Pt(i.useValue);else if(function Tv(i){return!(!i||!i.useFactory)}(i))n=()=>i.useFactory(...Yf(i.deps||[]));else if(function Pi(i){return!(!i||!i.useExisting)}(i))n=()=>ee(Pt(i.useExisting));else{const r=Pt(i&&(i.useClass||i.provide));if(!function ID(i){return!!i.deps}(i))return Qa(r)||kv(r);n=()=>new r(...Yf(i.deps))}return n}function $o(i,t,e=!1){return{factory:i,value:t,multi:e?[]:void 0}}function Pv(i,t){for(const e of i)Array.isArray(e)?Pv(e,t):e&&ju(e)?Pv(e.\u0275providers,t):t(e)}class PD{}class Ov{}class bo{resolveComponentFactory(t){throw function sl(i){const t=Error(`No component factory found for ${pi(i)}. Did you add it to @NgModule.entryComponents?`);return t.ngComponent=i,t}(t)}}let Hl=(()=>{class i{}return i.NULL=new bo,i})();function FD(){return Fn(Er(),Se())}function Fn(i,t){return new mt(Ei(i,t))}let mt=(()=>{class i{constructor(e){this.nativeElement=e}}return i.__NG_ELEMENT_ID__=FD,i})();function iw(i){return i instanceof mt?i.nativeElement:i}class Gl{}let ol=(()=>{class i{}return i.__NG_ELEMENT_ID__=()=>function LD(){const i=Se(),e=ws(Er().index,i);return(bs(e)?e:i)[yt]}(),i})(),ND=(()=>{class i{}return i.\u0275prov=ke({token:i,providedIn:"root",factory:()=>null}),i})();class Nc{constructor(t){this.full=t,this.major=t.split(".")[0],this.minor=t.split(".")[1],this.patch=t.split(".").slice(2).join(".")}}const BD=new Nc("15.2.10"),Fv={},Lv="ngOriginalError";function Nv(i){return i[Lv]}class al{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&&Nv(t);for(;e&&Nv(e);)e=Nv(e);return e||null}}function ll(i){return i instanceof Function?i():i}function sw(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 ow="ng-template";function jD(i,t,e){let n=0,r=!0;for(;ns?"":r[h+1].toLowerCase();const m=8&n?p:null;if(m&&-1!==sw(m,c,0)||2&n&&c!==p){if(Wo(n))return!1;o=!0}}}}else{if(!o&&!Wo(n)&&!Wo(l))return!1;if(o&&Wo(l))continue;o=!1,n=l|1&n}}return Wo(n)||o}function Wo(i){return 0==(1&i)}function aw(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&&!Wo(o)&&(t+=Bc(s,r),r=""),n=o,s=s||!Wo(n);e++}return""!==r&&(t+=Bc(s,r)),t}const sn={};function G(i){Hv(zn(),Se(),Xn()+i,!1)}function Hv(i,t,e,n){if(!n)if(3==(3&t[fn])){const s=i.preOrderCheckHooks;null!==s&&sp(t,s,e)}else{const s=i.preOrderHooks;null!==s&&op(t,s,0,e)}tl(e)}function dw(i,t=null,e=null,n){const r=uw(i,t,e,n);return r.resolveInjectorInitializers(),r}function uw(i,t=null,e=null,n,r=new Set){const s=[e||$n,AD(i)];return n=n||("object"==typeof i?void 0:pi(i)),new Hp(s,t||wh(),n||null,r)}let $i=(()=>{class i{static create(e,n){if(Array.isArray(e))return dw({name:""},n,e,"");{const r=e.name??"";return dw({name:r},e.parent,e.providers,r)}}}return i.THROW_IF_NOT_FOUND=Rl,i.NULL=new ew,i.\u0275prov=ke({token:i,providedIn:"any",factory:()=>ee(rl)}),i.__NG_ELEMENT_ID__=-1,i})();function E(i,t=Ot.Default){const e=Se();return null===e?ee(i,t):V_(Er(),e,Pt(i),t)}function xo(){throw new Error("invalid")}function _w(i,t){const e=i.contentQueries;if(null!==e)for(let n=0;nyi&&Hv(i,t,yi,!1),Qr(o?2:0,r),e(n,r)}finally{tl(s),Qr(o?3:1,r)}}function Zv(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,Ch(i,e,r.hostVars,sn),r)}function be(i,t,e,n,r,s){const o=Ei(i,t);!function Xe(i,t,e,n,r,s,o){if(null==s)i.removeAttribute(t,r,e);else{const a=null==o?Qt(s):o(s,n||"",r);i.setAttribute(t,r,a,e)}}(t[yt],o,s,i.value,e,n,r)}function vt(i,t,e,n,r,s){const o=s[t];if(null!==o){const a=n.setInput;for(let l=0;l0&&rs(e)}}function rs(i){for(let n=av(i);null!==n;n=lv(n))for(let r=Ui;r0&&rs(s)}const e=i[at].components;if(null!==e)for(let n=0;n0&&rs(r)}}function ss(i,t){const e=ws(t,i),n=e[at];(function io(i,t){for(let e=t.length;e-1&&(uv(t,n),pp(e,n))}this._attachedToViewContainer=!1}Rx(this._lView[at],this._lView)}onDestroy(t){bw(this._lView[at],this._lView,null,t)}markForCheck(){Ts(this._cdRefInjectingView||this._lView)}detach(){this._lView[fn]&=-65}reattach(){this._lView[fn]|=64}detectChanges(){wo(this._lView[at],this._lView,this.context)}checkNoChanges(){}attachToViewContainerRef(){if(this._appRef)throw new pe(902,!1);this._attachedToViewContainer=!0}detachFromAppRef(){this._appRef=null,function YA(i,t){bh(i,t,t[yt],2,null,null)}(this._lView[at],this._lView)}attachToAppRef(t){if(this._attachedToViewContainer)throw new pe(902,!1);this._appRef=t}}class b8 extends ny{constructor(t){super(t),this._view=t}detectChanges(){const t=this._view;wo(t[at],t,t[Be],!1)}checkNoChanges(){}get context(){return null}}class KF extends Hl{constructor(t){super(),this.ngModule=t}resolveComponentFactory(t){const e=Hn(t);return new iy(e,this.ngModule)}}function ZF(i){const t=[];for(let e in i)i.hasOwnProperty(e)&&t.push({propName:i[e],templateName:e});return t}class w8{constructor(t,e){this.injector=t,this.parentInjector=e}get(t,e,n){n=jf(n);const r=this.injector.get(t,Fv,n);return r!==Fv||e===Fv?r:this.parentInjector.get(t,e,n)}}class iy extends Ov{get inputs(){return ZF(this.componentDef.inputs)}get outputs(){return ZF(this.componentDef.outputs)}constructor(t,e){super(),this.componentDef=t,this.ngModule=e,this.componentType=t.type,this.selector=function e1(i){return i.map(JD).join(",")}(t.selectors),this.ngContentSelectors=t.ngContentSelectors?t.ngContentSelectors:[],this.isBoundToModule=!!e}create(t,e,n,r){let s=(r=r||this.ngModule)instanceof to?r:r?.injector;s&&null!==this.componentDef.getStandaloneInjector&&(s=this.componentDef.getStandaloneInjector(s)||s);const o=s?new w8(t,s):t,a=o.get(Gl,null);if(null===a)throw new pe(407,!1);const l=o.get(ND,null),c=a.createRenderer(null,this.componentDef),d=this.componentDef.selectors[0][0]||"div",h=n?function M1(i,t,e){return i.selectRootElement(t,e===qs.ShadowDom)}(c,n,this.componentDef.encapsulation):Ep(c,d,function x8(i){const t=i.toLowerCase();return"svg"===t?kd:"math"===t?"math":null}(d)),p=this.componentDef.onPush?288:272,m=ey(0,null,null,1,0,null,null,null,null,null),g=Mh(null,m,null,p,null,null,a,c,l,o,null);let b,v;rp(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 C8(i,t){const e=i[at],n=yi;return i[n]=t,Zd(e,n,2,"#host",null)}(g,h),F=function S8(i,t,e,n,r,s,o,a){const l=r[at];!function E8(i,t,e,n){for(const r of i)t.mergedAttrs=Sc(t.mergedAttrs,r.hostAttrs);null!==t.mergedAttrs&&(Cw(t,t.mergedAttrs,!0),null!==e&&Gx(n,e,t))}(n,i,t,o);const c=s.createRenderer(t,e),d=Mh(r,yw(e),null,e.onPush?32:16,r[i.index],i,s,c,a||null,null,null);return l.firstCreatePass&&P(l,i,n.length-1),Di(r,d),r[i.index]=d}(C,h,y,M,g,a,c);v=B0(m,yi),h&&function D8(i,t,e,n){if(n)L_(i,e,["ng-version",BD.full]);else{const{attrs:r,classes:s}=function t1(i){const t=[],e=[];let n=1,r=2;for(;n0&&Hx(i,e,s.join(" "))}}(c,y,h,n),void 0!==e&&function T8(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=Sc(r.hostAttrs,e=Sc(e,r.hostAttrs))}}(n)}function P1(i){return i===Xa?{}:i===$n?[]:i}function k8(i,t){const e=i.viewQuery;i.viewQuery=e?(n,r)=>{t(n,r),e(n,r)}:t}function P8(i,t){const e=i.contentQueries;i.contentQueries=e?(n,r,s)=>{t(n,r,s),e(n,r,s)}:t}function O8(i,t){const e=i.hostBindings;i.hostBindings=e?(n,r)=>{t(n,r),e(n,r)}:t}function Ew(i){return!!O1(i)&&(Array.isArray(i)||!(i instanceof Map)&&Symbol.iterator in i)}function O1(i){return null!==i&&("function"==typeof i||"object"==typeof i)}function $l(i,t,e){return i[t]=e}function Is(i,t,e){return!Object.is(i[t],e)&&(i[t]=e,!0)}function Eh(i,t,e,n){const r=Is(i,t,e);return Is(i,t+1,n)||r}function Dt(i,t,e,n){const r=Se();return Is(r,Fl(),t)&&(zn(),be(Ai(),r,i,t,e,n)),Dt}function jp(i,t,e,n){return Is(i,Fl(),e)?t+Qt(e)+n:sn}function Yp(i,t,e,n,r,s){const a=Eh(i,function Ja(){return kt.lFrame.bindingIndex}(),e,r);return Ks(2),a?t+Qt(e)+n+Qt(r)+s:sn}function fe(i,t,e,n,r,s,o,a){const l=Se(),c=zn(),d=i+yi,h=c.firstCreatePass?function $8(i,t,e,n,r,s,o,a,l){const c=t.consts,d=Zd(t,i,4,o||null,Ol(c,a));ty(t,e,d,Ol(c,l)),Nd(t,d);const h=d.tView=ey(2,d,n,r,s,t.directiveRegistry,t.pipeRegistry,null,t.schemas,c);return null!==t.queries&&(t.queries.template(t,d),h.queries=t.queries.embeddedTView(d)),d}(d,c,l,t,e,n,r,s,o):c.data[d];ma(h,!1);const p=l[yt].createComment("");yh(c,l,p,h),Hr(p,l),Di(l,l[d]=mn(p,l,p,h)),bc(h)&&Qv(c,l,h),null!=o&&Jv(l,h,a)}function Zi(i){return Od(function gA(){return kt.lFrame.contextLView}(),yi+i)}function U(i,t,e){const n=Se();return Is(n,Fl(),t)&&no(zn(),Ai(),n,i,t,n[yt],e,!1),U}function F1(i,t,e,n,r){const o=r?"class":"style";k1(i,e,t.inputs[o],o,n)}function W(i,t,e,n){const r=Se(),s=zn(),o=yi+i,a=r[yt],l=s.firstCreatePass?function j8(i,t,e,n,r,s){const o=t.consts,l=Zd(t,i,2,n,Ol(o,r));return ty(t,e,l,Ol(o,s)),null!==l.attrs&&Cw(l,l.attrs,!1),null!==l.mergedAttrs&&Cw(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]=Ep(a,t,function Y0(){return kt.lFrame.currentNamespace}()),d=bc(l);return ma(l,!0),Gx(a,c,l),32!=(32&l.flags)&&yh(s,r,c,l),0===function uA(){return kt.lFrame.elementDepthCount}()&&Hr(c,r),function hA(){kt.lFrame.elementDepthCount++}(),d&&(Qv(s,r,l),Zv(s,l,r)),null!==n&&Jv(r,l),W}function j(){let i=Er();D_()?T_():(i=i.parent,ma(i,!1));const t=i;!function fA(){kt.lFrame.elementDepthCount--}();const e=zn();return e.firstCreatePass&&(Nd(e,i),Qf(i)&&e.queries.elementEnd(i)),null!=t.classesWithoutHost&&function wA(i){return 0!=(8&i.flags)}(t)&&F1(e,t,Se(),t.classesWithoutHost,!0),null!=t.stylesWithoutHost&&function F_(i){return 0!=(16&i.flags)}(t)&&F1(e,t,Se(),t.stylesWithoutHost,!1),j}function De(i,t,e,n){return W(i,t,e,n),j(),De}function Gr(i,t,e){const n=Se(),r=zn(),s=i+yi,o=r.firstCreatePass?function Y8(i,t,e,n,r){const s=t.consts,o=Ol(s,n),a=Zd(t,i,8,"ng-container",o);return null!==o&&Cw(a,o,!0),ty(t,e,a,Ol(s,r)),null!==t.queries&&t.queries.elementStart(t,a),a}(s,r,n,t,e):r.data[s];ma(o,!0);const a=n[s]=n[yt].createComment("");return yh(r,n,a,o),Hr(a,n),bc(o)&&(Qv(r,n,o),Zv(r,o,n)),null!=e&&Jv(n,o),Gr}function $r(){let i=Er();const t=zn();return D_()?T_():(i=i.parent,ma(i,!1)),t.firstCreatePass&&(Nd(t,i),Qf(i)&&t.queries.elementEnd(i)),$r}function sy(i,t,e){return Gr(i,t,e),$r(),sy}function di(){return Se()}function oy(i){return!!i&&"function"==typeof i.then}function uL(i){return!!i&&"function"==typeof i.subscribe}const L1=uL;function Ue(i,t,e,n){const r=Se(),s=zn(),o=Er();return hL(s,r,r[yt],o,i,t,n),Ue}function N1(i,t){const e=Er(),n=Se(),r=zn();return hL(r,n,qF(rh(r.data),e,n),e,i,t),N1}function hL(i,t,e,n,r,s,o){const a=bc(n),c=i.firstCreatePass&&YF(i),d=t[Be],h=jF(t);let p=!0;if(3&n.type||o){const b=Ei(n,t),v=o?o(b):b,y=h.length,M=o?C=>o(I(C[n.index])):n.index;let x=null;if(!o&&a&&(x=function q8(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=pL(n,t,d,s,!1);const C=e.listen(v,r,s);h.push(s,C),c&&c.push(r,M,y,y+1)}}else s=pL(n,t,d,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?ws(i.index,t):t);let l=fL(t,e,n,o),c=s.__ngNextListenerFn__;for(;c;)l=fL(t,e,c,o)&&l,c=c.__ngNextListenerFn__;return r&&!1===l&&(o.preventDefault(),o.returnValue=!1),l}}function he(i=1){return function yA(i){return(kt.lFrame.contextLView=function j0(i,t){for(;i>0;)t=t[Sr],i--;return t}(i,kt.lFrame.contextLView))[Be]}(i)}function X8(i,t){let e=null;const n=function XD(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 V1(i){return 2|i}function Ah(i){return(131068&i)>>2}function z1(i,t){return-131069&i|t<<2}function H1(i){return 1|i}function ML(i,t,e,n,r){const s=i[e+1],o=null===t;let a=n?Jd(s):Ah(s),l=!1;for(;0!==a&&(!1===l||o);){const d=i[a+1];tW(i[a],t)&&(l=!0,i[a+1]=n?H1(d):V1(d)),a=n?Jd(d):Ah(d)}l&&(i[e+1]=n?V1(s):H1(s))}function tW(i,t){return null===i||null==t||(Array.isArray(i)?i[1]:i)===t||!(!Array.isArray(i)||"string"!=typeof t)&&Ic(i,t)>=0}const Ir={textEnd:0,key:0,keyEnd:0,value:0,valueEnd:0};function CL(i){return i.substring(Ir.key,Ir.keyEnd)}function SL(i,t){const e=Ir.textEnd;return e===t?-1:(t=Ir.keyEnd=function sW(i,t,e){for(;t32;)t++;return t}(i,Ir.key=t,e),em(i,t,e))}function em(i,t,e){for(;t=0;e=SL(t,e))Cs(i,CL(t),!0)}function cl(i,t,e,n){const r=Se(),s=zn(),o=Ks(2);s.firstUpdatePass&&RL(s,i,o,n),t!==sn&&Is(r,o,t)&&PL(s,s.data[Xn()],r,r[yt],i,r[o+1]=function _W(i,t){return null==i||""===i||("string"==typeof t?i+=t:"object"==typeof i&&(i=pi(Js(i)))),i}(t,e),n,o)}function IL(i,t){return t>=i.expandoStartIndex}function RL(i,t,e,n){const r=i.data;if(null===r[e+1]){const s=r[Xn()],o=IL(i,e);FL(s,n)&&null===t&&!o&&(t=!1),t=function dW(i,t,e,n){const r=rh(i);let s=n?t.residualClasses:t.residualStyles;if(null===r)0===(n?t.classBindings:t.styleBindings)&&(e=ay(e=G1(null,i,t,e,n),t.attrs,n),s=null);else{const o=t.directiveStylingLast;if(-1===o||i[o]!==r)if(e=G1(r,i,t,e,n),null===s){let l=function uW(i,t,e){const n=e?t.classBindings:t.styleBindings;if(0!==Ah(n))return i[Jd(n)]}(i,t,n);void 0!==l&&Array.isArray(l)&&(l=G1(null,i,t,l[1],n),l=ay(l,t.attrs,n),function hW(i,t,e,n){i[Jd(e?t.classBindings:t.styleBindings)]=n}(i,t,n,l))}else s=function fW(i,t,e){let n;const r=t.directiveEnd;for(let s=1+t.directiveStylingLast;s0)&&(c=!0)):d=e,r)if(0!==l){const p=Jd(i[a+1]);i[n+1]=Dw(p,a),0!==p&&(i[p+1]=z1(i[p+1],n)),i[a+1]=function Z8(i,t){return 131071&i|t<<17}(i[a+1],n)}else i[n+1]=Dw(a,0),0!==a&&(i[a+1]=z1(i[a+1],n)),a=n;else i[n+1]=Dw(l,0),0===a?a=n:i[l+1]=z1(i[l+1],n),l=n;c&&(i[n+1]=V1(i[n+1])),ML(i,d,n,!0),ML(i,d,n,!1),function eW(i,t,e,n,r){const s=r?i.residualClasses:i.residualStyles;null!=s&&"string"==typeof t&&Ic(s,t)>=0&&(e[n+1]=H1(e[n+1]))}(t,d,i,n,s),o=Dw(a,l),s?t.classBindings=o:t.styleBindings=o}(r,s,t,e,o,n)}}function G1(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),d=c?l[1]:l,h=null===d;let p=e[r+1];p===sn&&(p=h?$n:void 0);let m=h?Wd(p,n):d===n?p:void 0;if(c&&!Tw(m)&&(m=Wd(l,n)),Tw(m)&&(a=m,o))return a;const g=i[r+1];r=o?Jd(g):Ah(g)}if(null!==t){let l=s?t.residualClasses:t.residualStyles;null!=l&&(a=Wd(l,n))}return a}function Tw(i){return void 0!==i}function FL(i,t){return 0!=(i.flags&(t?8:16))}function Ve(i,t=""){const e=Se(),n=zn(),r=i+yi,s=n.firstCreatePass?Zd(n,r,1,t,null):n.data[r],o=e[r]=function cv(i,t){return i.createText(t)}(e[yt],t);yh(n,e,o,s),ma(s,!1)}function _i(i){return Qi("",i,""),_i}function Qi(i,t,e){const n=Se(),r=jp(n,i,t,e);return r!==sn&&Uc(n,Xn(),r),Qi}function tm(i,t,e,n,r){const s=Se(),o=Yp(s,i,t,e,n,r);return o!==sn&&Uc(s,Xn(),o),tm}function GL(i,t,e){!function dl(i,t,e,n){const r=zn(),s=Ks(2);r.firstUpdatePass&&RL(r,null,s,n);const o=Se();if(e!==sn&&Is(o,s,e)){const a=r.data[Xn()];if(FL(a,n)&&!IL(r,s)){let l=n?a.classesWithoutHost:a.stylesWithoutHost;null!==l&&(e=Vf(l,e||"")),F1(r,a,o,e,n)}else!function gW(i,t,e,n,r,s,o,a){r===sn&&(r=$n);let l=0,c=0,d=0((rt=rt||{})[rt.LocaleId=0]="LocaleId",rt[rt.DayPeriodsFormat=1]="DayPeriodsFormat",rt[rt.DayPeriodsStandalone=2]="DayPeriodsStandalone",rt[rt.DaysFormat=3]="DaysFormat",rt[rt.DaysStandalone=4]="DaysStandalone",rt[rt.MonthsFormat=5]="MonthsFormat",rt[rt.MonthsStandalone=6]="MonthsStandalone",rt[rt.Eras=7]="Eras",rt[rt.FirstDayOfWeek=8]="FirstDayOfWeek",rt[rt.WeekendRange=9]="WeekendRange",rt[rt.DateFormat=10]="DateFormat",rt[rt.TimeFormat=11]="TimeFormat",rt[rt.DateTimeFormat=12]="DateTimeFormat",rt[rt.NumberSymbols=13]="NumberSymbols",rt[rt.NumberFormats=14]="NumberFormats",rt[rt.CurrencyCode=15]="CurrencyCode",rt[rt.CurrencySymbol=16]="CurrencySymbol",rt[rt.CurrencyName=17]="CurrencyName",rt[rt.Currencies=18]="Currencies",rt[rt.Directionality=19]="Directionality",rt[rt.PluralCase=20]="PluralCase",rt[rt.ExtraData=21]="ExtraData",rt))();const im="en-US";let t2=im;function j1(i,t,e,n,r){if(i=Pt(i),Array.isArray(i))for(let s=0;s>20;if(Lc(i)||!i.multi){const m=new Bd(l,r,E),g=q1(a,t,r?d:d+p,h);-1===g?(pn(ah(c,o),s,a),Y1(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=q1(a,t,d+p,h),g=q1(a,t,d,d+p),v=g>=0&&e[g];if(r&&!v||!r&&!(m>=0&&e[m])){pn(ah(c,o),s,a);const y=function Oj(i,t,e,n,r){const s=new Bd(i,e,E);return s.multi=[],s.index=t,s.componentProviders=0,A2(s,r,n&&!e),s}(r?Pj:kj,e.length,r,n,l);!r&&v&&(e[g].providerFactory=y),Y1(s,i,t.length,0),t.push(a),c.directiveStart++,c.directiveEnd++,r&&(c.providerIndexes+=1048576),e.push(y),o.push(y)}else Y1(s,i,m>-1?m:g,A2(e[r?g:m],l,!r&&n));!r&&n&&v&&e[g].componentProviders++}}}function Y1(i,t,e,n){const r=Lc(t),s=function DD(i){return!!i.useClass}(t);if(r||s){const l=(s?Pt(t.useClass):t).prototype.ngOnDestroy;if(l){const c=i.destroyHooks||(i.destroyHooks=[]);if(!r&&t.multi){const d=c.indexOf(e);-1===d?c.push(e,[n,l]):c[d+1].push(n,l)}else c.push(e,l)}}}function A2(i,t,e){return e&&i.componentProviders++,i.multi.push(t)-1}function q1(i,t,e,n){for(let r=e;r{e.providersResolver=(n,r)=>function Rj(i,t,e){const n=zn();if(n.firstCreatePass){const r=_o(i);j1(e,n.data,n.blueprint,r,!0),j1(t,n.data,n.blueprint,r,!1)}}(n,r?r(i):i,t)}}class rm{}class D2{}class T2 extends rm{constructor(t,e){super(),this._parent=e,this._bootstrapComponents=[],this.destroyCbs=[],this.componentFactoryResolver=new KF(this);const n=ur(t);this._bootstrapComponents=ll(n.bootstrap),this._r3Injector=uw(t,e,[{provide:rm,useValue:this},{provide:Hl,useValue:this.componentFactoryResolver}],pi(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 K1 extends D2{constructor(t){super(),this.moduleType=t}create(t){return new T2(this.moduleType,t)}}class Lj extends rm{constructor(t,e,n){super(),this.componentFactoryResolver=new KF(this),this.instance=null;const r=new Hp([...t,{provide:rm,useValue:this},{provide:Hl,useValue:this.componentFactoryResolver}],e||wh(),n,new Set(["environment"]));this.injector=r,r.resolveInjectorInitializers()}destroy(){this.injector.destroy()}onDestroy(t){this.injector.onDestroy(t)}}function Fw(i,t,e=null){return new Lj(i,t,e).injector}let Nj=(()=>{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=tw(0,e.type),r=n.length>0?Fw([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=ke({token:i,providedIn:"environment",factory:()=>new i(ee(to))}),i})();function Z1(i){i.getStandaloneInjector=t=>t.get(Nj).getOrCreateStandaloneInjector(i)}function so(i,t,e){const n=Vr()+i,r=Se();return r[n]===sn?$l(r,n,e?t.call(e):t()):function ry(i,t){return i[t]}(r,n)}function sm(i,t,e,n){return N2(Se(),Vr(),i,t,e,n)}function L2(i,t,e,n,r,s,o){return function V2(i,t,e,n,r,s,o,a,l){const c=t+e;return function Sa(i,t,e,n,r,s){const o=Eh(i,t,e,n);return Eh(i,t+2,r,s)||o}(i,c,r,s,o,a)?$l(i,c+4,l?n.call(l,r,s,o,a):n(r,s,o,a)):fy(i,c+4)}(Se(),Vr(),i,t,e,n,r,s,o)}function fy(i,t){const e=i[t];return e===sn?void 0:e}function N2(i,t,e,n,r,s){const o=t+e;return Is(i,o,r)?$l(i,o+1,s?n.call(s,r):n(r)):fy(i,o+1)}function Ct(i,t){const e=zn();let n;const r=i+yi;e.firstCreatePass?(n=function Jj(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=Qa(n.type)),o=Ys(E);try{const a=cp(!1),l=s();return cp(a),function W8(i,t,e,n){e>=i.data.length&&(i.data[e]=null,i.blueprint[e]=null),t[e]=n}(e,Se(),r,l),l}finally{Ys(o)}}function Tt(i,t,e){const n=i+yi,r=Se(),s=Od(r,n);return py(r,n)?N2(r,Vr(),t,s.transform,e,s):s.transform(e)}function J1(i,t,e,n){const r=i+yi,s=Se(),o=Od(s,r);return py(s,r)?function B2(i,t,e,n,r,s,o){const a=t+e;return Eh(i,a,r,s)?$l(i,a+2,o?n.call(o,r,s):n(r,s)):fy(i,a+2)}(s,Vr(),t,o.transform,e,n,o):o.transform(e,n)}function py(i,t){return i[at].data[t].pure}function eT(i){return t=>{setTimeout(i,void 0,t)}}const We=class r6 extends Re{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=eT(s),r&&(r=eT(r)),o&&(o=eT(o)));const a=super.subscribe({next:r,error:s,complete:o});return t instanceof Zt&&t.add(a),a}};function s6(){return this._results[Symbol.iterator]()}class om{get changes(){return this._changes||(this._changes=new We)}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=om.prototype;e[Symbol.iterator]||(e[Symbol.iterator]=s6)}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 Ar(i){return i.flat(Number.POSITIVE_INFINITY)}(t);(this._changesDetected=!function fp(i,t,e){if(i.length!==t.length)return!1;for(let n=0;n{class i{}return i.__NG_ELEMENT_ID__=l6,i})();const o6=Mo,a6=class extends o6{constructor(t,e,n){super(),this._declarationLView=t,this._declarationTContainer=e,this.elementRef=n}createEmbeddedView(t,e){const n=this._declarationTContainer.tView,r=Mh(this._declarationLView,n,t,16,null,n.declTNode,null,null,null,null,e||null);r[nh]=this._declarationLView[this._declarationTContainer.index];const o=this._declarationLView[Xs];return null!==o&&(r[Xs]=o.createEmbeddedView(n)),Sh(n,r,t),new ny(r)}};function l6(){return Lw(Er(),Se())}function Lw(i,t){return 4&i.type?new a6(t,i,Fn(i,t)):null}let Wr=(()=>{class i{}return i.__NG_ELEMENT_ID__=c6,i})();function c6(){return $2(Er(),Se())}const d6=Wr,H2=class extends d6{constructor(t,e,n){super(),this._lContainer=t,this._hostTNode=e,this._hostLView=n}get element(){return Fn(this._hostTNode,this._hostLView)}get injector(){return new Ac(this._hostTNode,this._hostLView)}get parentInjector(){const t=ch(this._hostTNode,this._hostLView);if(lp(t)){const e=oh(t,this._hostLView),n=sh(t);return new Ac(e[at].data[n+8],e)}return new Ac(null,this._hostLView)}clear(){for(;this.length>0;)this.remove(this.length-1)}get(t){const e=G2(this._lContainer);return null!==e&&e[t]||null}get length(){return this._lContainer.length-Ui}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 hh(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 iy(Hn(t)),c=n||this.parentInjector;if(!s&&null==l.ngModule){const p=(o?c:this.parentInjector).get(to,null);p&&(s=p)}const d=l.create(c,r,void 0,s);return this.insert(d.hostView,a),d}insert(t,e){const n=t._lView,r=n[at];if(function dA(i){return xs(i[Bi])}(n)){const d=this.indexOf(t);if(-1!==d)this.detach(d);else{const h=n[Bi],p=new H2(h,h[ue],h[Bi]);p.detach(p.indexOf(t))}}const s=this._adjustIndex(e),o=this._lContainer;!function dv(i,t,e,n){const r=Ui+n,s=e.length;n>0&&(e[r-1][ys]=t),n0)n.push(o[a/2]);else{const c=s[a+1],d=t[-l];for(let h=Ui;h{class i{constructor(e){this.appInits=e,this.resolve=Bw,this.reject=Bw,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)(ee(Uw,8))},i.\u0275prov=ke({token:i,factory:i.\u0275fac,providedIn:"root"}),i})();const cm=new me("AppId",{providedIn:"root",factory:function fN(){return`${hT()}${hT()}${hT()}`}});function hT(){return String.fromCharCode(97+Math.floor(25*Math.random()))}const pN=new me("Platform Initializer"),fT=new me("Platform ID",{providedIn:"platform",factory:()=>"unknown"}),Rr=new me("AnimationModuleType");let L6=(()=>{class i{log(e){console.log(e)}warn(e){console.warn(e)}}return i.\u0275fac=function(e){return new(e||i)},i.\u0275prov=ke({token:i,factory:i.\u0275fac,providedIn:"platform"}),i})();const ql=new me("LocaleId",{providedIn:"root",factory:()=>Ft(ql,Ot.Optional|Ot.SkipSelf)||function N6(){return typeof $localize<"u"&&$localize.locale||im}()});class U6{constructor(t,e){this.ngModuleFactory=t,this.componentFactories=e}}let mN=(()=>{class i{compileModuleSync(e){return new K1(e)}compileModuleAsync(e){return Promise.resolve(this.compileModuleSync(e))}compileModuleAndAllComponentsSync(e){const n=this.compileModuleSync(e),s=ll(ur(e).declarations).reduce((o,a)=>{const l=Hn(a);return l&&o.push(new iy(l)),o},[]);return new U6(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=ke({token:i,factory:i.\u0275fac,providedIn:"root"}),i})();const H6=(()=>Promise.resolve(0))();function pT(i){typeof Zone>"u"?H6.then(()=>{i&&i.apply(null,null)}):Zone.current.scheduleMicroTask("scheduleMicrotask",i)}class ft{constructor({enableLongStackTrace:t=!1,shouldCoalesceEventChangeDetection:e=!1,shouldCoalesceRunChangeDetection:n=!1}){if(this.hasPendingMacrotasks=!1,this.hasPendingMicrotasks=!1,this.isStable=!0,this.onUnstable=new We(!1),this.onMicrotaskEmpty=new We(!1),this.onStable=new We(!1),this.onError=new We(!1),typeof Zone>"u")throw new pe(908,!1);Zone.assertZonePatched();const r=this;r._nesting=0,r._outer=r._inner=Zone.current,Zone.TaskTrackingZoneSpec&&(r._inner=r._inner.fork(new Zone.TaskTrackingZoneSpec)),t&&Zone.longStackTraceZoneSpec&&(r._inner=r._inner.fork(Zone.longStackTraceZoneSpec)),r.shouldCoalesceEventChangeDetection=!n&&e,r.shouldCoalesceRunChangeDetection=n,r.lastRequestAnimationFrameId=-1,r.nativeRequestAnimationFrame=function G6(){let i=Rn.requestAnimationFrame,t=Rn.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 j6(i){const t=()=>{!function W6(i){i.isCheckStableRunning||-1!==i.lastRequestAnimationFrameId||(i.lastRequestAnimationFrameId=i.nativeRequestAnimationFrame.call(Rn,()=>{i.fakeTopEventTask||(i.fakeTopEventTask=Zone.root.scheduleEventTask("fakeTopEventTask",()=>{i.lastRequestAnimationFrameId=-1,gT(i),i.isCheckStableRunning=!0,mT(i),i.isCheckStableRunning=!1},void 0,()=>{},()=>{})),i.fakeTopEventTask.invoke()}),gT(i))}(i)};i._inner=i._inner.fork({name:"angular",properties:{isAngularZone:!0},onInvokeTask:(e,n,r,s,o,a)=>{try{return vN(i),e.invokeTask(r,s,o,a)}finally{(i.shouldCoalesceEventChangeDetection&&"eventTask"===s.type||i.shouldCoalesceRunChangeDetection)&&t(),yN(i)}},onInvoke:(e,n,r,s,o,a,l)=>{try{return vN(i),e.invoke(r,s,o,a,l)}finally{i.shouldCoalesceRunChangeDetection&&t(),yN(i)}},onHasTask:(e,n,r,s)=>{e.hasTask(r,s),n===r&&("microTask"==s.change?(i._hasPendingMicrotasks=s.microTask,gT(i),mT(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(!ft.isInAngularZone())throw new pe(909,!1)}static assertNotInAngularZone(){if(ft.isInAngularZone())throw new pe(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,$6,Bw,Bw);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 $6={};function mT(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 gT(i){i.hasPendingMicrotasks=!!(i._hasPendingMicrotasks||(i.shouldCoalesceEventChangeDetection||i.shouldCoalesceRunChangeDetection)&&-1!==i.lastRequestAnimationFrameId)}function vN(i){i._nesting++,i.isStable&&(i.isStable=!1,i.onUnstable.emit(null))}function yN(i){i._nesting--,mT(i)}class Y6{constructor(){this.hasPendingMicrotasks=!1,this.hasPendingMacrotasks=!1,this.isStable=!0,this.onUnstable=new We,this.onMicrotaskEmpty=new We,this.onStable=new We,this.onError=new We}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 bN=new me(""),zw=new me("");let yT,_T=(()=>{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,yT||(function q6(i){yT=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:()=>{ft.assertNotInAngularZone(),pT(()=>{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())pT(()=>{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)(ee(ft),ee(vT),ee(zw))},i.\u0275prov=ke({token:i,factory:i.\u0275fac}),i})(),vT=(()=>{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 yT?.findTestabilityInTree(this,e,n)??null}}return i.\u0275fac=function(e){return new(e||i)},i.\u0275prov=ke({token:i,factory:i.\u0275fac,providedIn:"platform"}),i})();const zc=!1;let eu=null;const xN=new me("AllowMultipleToken"),bT=new me("PlatformDestroyListeners"),wN=new me("appBootstrapListener");class MN{constructor(t,e){this.name=t,this.token=e}}function SN(i,t,e=[]){const n=`Platform: ${t}`,r=new me(n);return(s=[])=>{let o=xT();if(!o||o.injector.get(xN,!1)){const a=[...e,...s,{provide:r,useValue:!0}];i?i(a):function Z6(i){if(eu&&!eu.get(xN,!1))throw new pe(400,!1);eu=i;const t=i.get(AN);(function CN(i){const t=i.get(pN,null);t&&t.forEach(e=>e())})(i)}(function EN(i=[],t){return $i.create({name:t,providers:[{provide:Iv,useValue:"platform"},{provide:bT,useValue:new Set([()=>eu=null])},...i]})}(a,n))}return function J6(i){const t=xT();if(!t)throw new pe(401,!1);return t}()}}function xT(){return eu?.get(AN)??null}let AN=(()=>{class i{constructor(e){this._injector=e,this._modules=[],this._destroyListeners=[],this._destroyed=!1}bootstrapModuleFactory(e,n){const r=function TN(i,t){let e;return e="noop"===i?new Y6:("zone.js"===i?void 0:i)||new ft(t),e}(n?.ngZone,function DN(i){return{enableLongStackTrace:!1,shouldCoalesceEventChangeDetection:!(!i||!i.ngZoneEventCoalescing)||!1,shouldCoalesceRunChangeDetection:!(!i||!i.ngZoneRunCoalescing)||!1}}(n)),s=[{provide:ft,useValue:r}];return r.run(()=>{const o=$i.create({providers:s,parent:this.injector,name:e.moduleType.name}),a=e.create(o),l=a.injector.get(al,null);if(!l)throw new pe(402,!1);return r.runOutsideAngular(()=>{const c=r.onError.subscribe({next:d=>{l.handleError(d)}});a.onDestroy(()=>{Hw(this._modules,a),c.unsubscribe()})}),function IN(i,t,e){try{const n=e();return oy(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(Vw);return c.runInitializers(),c.donePromise.then(()=>(function n2(i){En(i,"Expected localeId to be defined"),"string"==typeof i&&(t2=i.toLowerCase().replace(/_/g,"-"))}(a.injector.get(ql,im)||im),this._moduleDoBootstrap(a),a))})})}bootstrapModule(e,n=[]){const r=RN({},n);return function X6(i,t,e){const n=new K1(e);return Promise.resolve(n)}(0,0,e).then(s=>this.bootstrapModuleFactory(s,r))}_moduleDoBootstrap(e){const n=e.injector.get(dm);if(e._bootstrapComponents.length>0)e._bootstrapComponents.forEach(r=>n.bootstrap(r));else{if(!e.instance.ngDoBootstrap)throw new pe(-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 pe(404,!1);this._modules.slice().forEach(n=>n.destroy()),this._destroyListeners.forEach(n=>n());const e=this._injector.get(bT,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)(ee($i))},i.\u0275prov=ke({token:i,factory:i.\u0275fac,providedIn:"platform"}),i})();function RN(i,t){return Array.isArray(t)?t.reduce(RN,i):{...i,...t}}let dm=(()=>{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 In(a=>{this._stable=this._zone.isStable&&!this._zone.hasPendingMacrotasks&&!this._zone.hasPendingMicrotasks,this._zone.runOutsideAngular(()=>{a.next(this._stable),a.complete()})}),o=new In(a=>{let l;this._zone.runOutsideAngular(()=>{l=this._zone.onStable.subscribe(()=>{ft.assertNotInAngularZone(),pT(()=>{!this._stable&&!this._zone.hasPendingMacrotasks&&!this._zone.hasPendingMicrotasks&&(this._stable=!0,a.next(!0))})})});const c=this._zone.onUnstable.subscribe(()=>{ft.assertInAngularZone(),this._stable&&(this._stable=!1,this._zone.runOutsideAngular(()=>{a.next(!1)}))});return()=>{l.unsubscribe(),c.unsubscribe()}});this.isStable=Mr(s,o.pipe(Uf()))}bootstrap(e,n){const r=e instanceof Ov;if(!this._injector.get(Vw).done){!r&&function Sd(i){const t=Hn(i)||Ur(i)||vs(i);return null!==t&&t.standalone}(e);throw new pe(405,zc)}let o;o=r?e:this._injector.get(Hl).resolveComponentFactory(e),this.componentTypes.push(o.componentType);const a=function K6(i){return i.isBoundToModule}(o)?void 0:this._injector.get(rm),c=o.create($i.NULL,[],n||o.selector,a),d=c.location.nativeElement,h=c.injector.get(bN,null);return h?.registerApplication(d),c.onDestroy(()=>{this.detachView(c.hostView),Hw(this.components,c),h?.unregisterApplication(d)}),this._loadComponent(c),c}tick(){if(this._runningTick)throw new pe(101,!1);try{this._runningTick=!0;for(let e of this._views)e.detectChanges()}catch(e){this._zone.runOutsideAngular(()=>this._exceptionHandler.handleError(e))}finally{this._runningTick=!1}}attachView(e){const n=e;this._views.push(n),n.attachToAppRef(this)}detachView(e){const n=e;Hw(this._views,n),n.detachFromAppRef()}_loadComponent(e){this.attachView(e.hostView),this.tick(),this.components.push(e);const n=this._injector.get(wN,[]);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),()=>Hw(this._destroyListeners,e)}destroy(){if(this._destroyed)throw new pe(406,!1);const e=this._injector;e.destroy&&!e.destroyed&&e.destroy()}get viewCount(){return this._views.length}warnIfDestroyed(){}}return i.\u0275fac=function(e){return new(e||i)(ee(ft),ee(to),ee(al))},i.\u0275prov=ke({token:i,factory:i.\u0275fac,providedIn:"root"}),i})();function Hw(i,t){const e=i.indexOf(t);e>-1&&i.splice(e,1)}let Zn=(()=>{class i{}return i.__NG_ELEMENT_ID__=t9,i})();function t9(i){return function n9(i,t,e){if(Ad(i)&&!e){const n=ws(i.index,t);return new ny(n,n)}return 47&i.type?new ny(t[rr],t):null}(Er(),Se(),16==(16&i))}class LN{constructor(){}supports(t){return Ew(t)}create(t){return new c9(t)}}const l9=(i,t)=>t;class c9{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||l9}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 d9(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 NN),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 NN),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 d9{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 u9{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 NN{constructor(){this.map=new Map}put(t){const e=t.trackById;let n=this.map.get(e);n||(n=new u9,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 BN(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 f9(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 f9{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 VN(){return new Ww([new LN])}let Ww=(()=>{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||VN()),deps:[[i,new xa,new Ss]]}}find(e){const n=this.factories.find(r=>r.supports(e));if(null!=n)return n;throw new pe(901,!1)}}return i.\u0275prov=ke({token:i,providedIn:"root",factory:VN}),i})();function zN(){return new gy([new UN])}let gy=(()=>{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||zN()),deps:[[i,new xa,new Ss]]}}find(e){const n=this.factories.find(r=>r.supports(e));if(n)return n;throw new pe(901,!1)}}return i.\u0275prov=ke({token:i,providedIn:"root",factory:zN}),i})();const g9=SN(null,"core",[]);let _9=(()=>{class i{constructor(e){}}return i.\u0275fac=function(e){return new(e||i)(ee(dm))},i.\u0275mod=nn({type:i}),i.\u0275inj=Kt({}),i})();let ET=null;function Hc(){return ET}class b9{}const jt=new me("DocumentToken");let AT=(()=>{class i{historyGo(e){throw new Error("Not implemented")}}return i.\u0275fac=function(e){return new(e||i)},i.\u0275prov=ke({token:i,factory:function(){return function x9(){return ee(HN)}()},providedIn:"platform"}),i})();const w9=new me("Location Initialized");let HN=(()=>{class i extends AT{constructor(e){super(),this._doc=e,this._location=window.location,this._history=window.history}getBaseHrefFromDOM(){return Hc().getBaseHref(this._doc)}onPopState(e){const n=Hc().getGlobalEventTarget(this._doc,"window");return n.addEventListener("popstate",e,!1),()=>n.removeEventListener("popstate",e)}onHashChange(e){const n=Hc().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){GN()?this._history.pushState(e,n,r):this._location.hash=r}replaceState(e,n,r){GN()?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)(ee(jt))},i.\u0275prov=ke({token:i,factory:function(){return function M9(){return new HN(ee(jt))}()},providedIn:"platform"}),i})();function GN(){return!!window.history.pushState}function DT(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 $N(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 Gc(i){return i&&"?"!==i[0]?"?"+i:i}let Ih=(()=>{class i{historyGo(e){throw new Error("Not implemented")}}return i.\u0275fac=function(e){return new(e||i)},i.\u0275prov=ke({token:i,factory:function(){return Ft(jN)},providedIn:"root"}),i})();const WN=new me("appBaseHref");let jN=(()=>{class i extends Ih{constructor(e,n){super(),this._platformLocation=e,this._removeListenerFns=[],this._baseHref=n??this._platformLocation.getBaseHrefFromDOM()??Ft(jt).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 DT(this._baseHref,e)}path(e=!1){const n=this._platformLocation.pathname+Gc(this._platformLocation.search),r=this._platformLocation.hash;return r&&e?`${n}${r}`:n}pushState(e,n,r,s){const o=this.prepareExternalUrl(r+Gc(s));this._platformLocation.pushState(e,n,o)}replaceState(e,n,r,s){const o=this.prepareExternalUrl(r+Gc(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)(ee(AT),ee(WN,8))},i.\u0275prov=ke({token:i,factory:i.\u0275fac,providedIn:"root"}),i})(),C9=(()=>{class i extends Ih{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=DT(this._baseHref,e);return n.length>0?"#"+n:n}pushState(e,n,r,s){let o=this.prepareExternalUrl(r+Gc(s));0==o.length&&(o=this._platformLocation.pathname),this._platformLocation.pushState(e,n,o)}replaceState(e,n,r,s){let o=this.prepareExternalUrl(r+Gc(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)(ee(AT),ee(WN,8))},i.\u0275prov=ke({token:i,factory:i.\u0275fac}),i})(),_y=(()=>{class i{constructor(e){this._subject=new We,this._urlChangeListeners=[],this._urlChangeSubscription=null,this._locationStrategy=e;const n=this._locationStrategy.getBaseHref();this._basePath=function A9(i){if(new RegExp("^(https?:)?//").test(i)){const[,e]=i.split(/\/\/[^\/]+/);return e}return i}($N(YN(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+Gc(n))}normalize(e){return i.stripTrailingSlash(function E9(i,t){if(!i||!t.startsWith(i))return t;const e=t.substring(i.length);return""===e||["/",";","?","#"].includes(e[0])?e:t}(this._basePath,YN(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+Gc(n)),r)}replaceState(e,n="",r=null){this._locationStrategy.replaceState(r,"",e,n),this._notifyUrlChangeListeners(this.prepareExternalUrl(e+Gc(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=Gc,i.joinWithSlash=DT,i.stripTrailingSlash=$N,i.\u0275fac=function(e){return new(e||i)(ee(Ih))},i.\u0275prov=ke({token:i,factory:function(){return function S9(){return new _y(ee(Ih))}()},providedIn:"root"}),i})();function YN(i){return i.replace(/\/index.html$/,"")}var Co=(()=>((Co=Co||{})[Co.Decimal=0]="Decimal",Co[Co.Percent=1]="Percent",Co[Co.Currency=2]="Currency",Co[Co.Scientific=3]="Scientific",Co))(),Ht=(()=>((Ht=Ht||{})[Ht.Decimal=0]="Decimal",Ht[Ht.Group=1]="Group",Ht[Ht.List=2]="List",Ht[Ht.PercentSign=3]="PercentSign",Ht[Ht.PlusSign=4]="PlusSign",Ht[Ht.MinusSign=5]="MinusSign",Ht[Ht.Exponential=6]="Exponential",Ht[Ht.SuperscriptingExponent=7]="SuperscriptingExponent",Ht[Ht.PerMille=8]="PerMille",Ht[Ht.Infinity=9]="Infinity",Ht[Ht.NaN=10]="NaN",Ht[Ht.TimeSeparator=11]="TimeSeparator",Ht[Ht.CurrencyDecimal=12]="CurrencyDecimal",Ht[Ht.CurrencyGroup=13]="CurrencyGroup",Ht))();function Ea(i,t){const e=ro(i),n=e[rt.NumberSymbols][t];if(typeof n>"u"){if(t===Ht.CurrencyDecimal)return e[rt.NumberSymbols][Ht.Decimal];if(t===Ht.CurrencyGroup)return e[rt.NumberSymbols][Ht.Group]}return n}const J9=/^(\d+)?\.((\d+)(-(\d+))?)?$/,JN=22,eM=".",yy="0",eY=";",tY=",",PT="#";function LT(i){const t=parseInt(i);if(isNaN(t))throw new Error("Invalid integer literal when parsing "+i);return t}const BT=/\s+/,nB=[];let hm=(()=>{class i{constructor(e,n,r,s){this._iterableDiffers=e,this._keyValueDiffers=n,this._ngEl=r,this._renderer=s,this.initialClasses=nB,this.stateMap=new Map}set klass(e){this.initialClasses=null!=e?e.trim().split(BT):nB}set ngClass(e){this.rawClass="string"==typeof e?e.trim().split(BT):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(BT).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)(E(Ww),E(gy),E(mt),E(ol))},i.\u0275dir=ve({type:i,selectors:[["","ngClass",""]],inputs:{klass:["class","klass"],ngClass:"ngClass"},standalone:!0}),i})();class hY{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 So=(()=>{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 hY(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),sB(a,r)}});for(let r=0,s=n.length;r{sB(n.get(r.currentIndex),r)})}static ngTemplateContextGuard(e,n){return!0}}return i.\u0275fac=function(e){return new(e||i)(E(Wr),E(Mo),E(Ww))},i.\u0275dir=ve({type:i,selectors:[["","ngFor","","ngForOf",""]],inputs:{ngForOf:"ngForOf",ngForTrackBy:"ngForTrackBy",ngForTemplate:"ngForTemplate"},standalone:!0}),i})();function sB(i,t){i.context.$implicit=t.item}let vi=(()=>{class i{constructor(e,n){this._viewContainer=e,this._context=new pY,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){oB("ngIfThen",e),this._thenTemplateRef=e,this._thenViewRef=null,this._updateView()}set ngIfElse(e){oB("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)(E(Wr),E(Mo))},i.\u0275dir=ve({type:i,selectors:[["","ngIf",""]],inputs:{ngIf:"ngIf",ngIfThen:"ngIfThen",ngIfElse:"ngIfElse"},standalone:!0}),i})();class pY{constructor(){this.$implicit=null,this.ngIf=null}}function oB(i,t){if(t&&!t.createEmbeddedView)throw new Error(`${i} must be a TemplateRef, but received '${pi(t)}'.`)}class UT{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 by=(()=>{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=ve({type:i,selectors:[["","ngSwitch",""]],inputs:{ngSwitch:"ngSwitch"},standalone:!0}),i})(),VT=(()=>{class i{constructor(e,n,r){this.ngSwitch=r,r._addCase(),this._view=new UT(e,n)}ngDoCheck(){this._view.enforceState(this.ngSwitch._matchCase(this.ngSwitchCase))}}return i.\u0275fac=function(e){return new(e||i)(E(Wr),E(Mo),E(by,9))},i.\u0275dir=ve({type:i,selectors:[["","ngSwitchCase",""]],inputs:{ngSwitchCase:"ngSwitchCase"},standalone:!0}),i})(),aB=(()=>{class i{constructor(e,n,r){r._addDefault(new UT(e,n))}}return i.\u0275fac=function(e){return new(e||i)(E(Wr),E(Mo),E(by,9))},i.\u0275dir=ve({type:i,selectors:[["","ngSwitchDefault",""]],standalone:!0}),i})(),tM=(()=>{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:Es.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)(E(mt),E(gy),E(ol))},i.\u0275dir=ve({type:i,selectors:[["","ngStyle",""]],inputs:{ngStyle:"ngStyle"},standalone:!0}),i})(),xy=(()=>{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)(E(Wr))},i.\u0275dir=ve({type:i,selectors:[["","ngTemplateOutlet",""]],inputs:{ngTemplateOutletContext:"ngTemplateOutletContext",ngTemplateOutlet:"ngTemplateOutlet",ngTemplateOutletInjector:"ngTemplateOutletInjector"},standalone:!0,features:[bi]}),i})();function fl(i,t){return new pe(2100,!1)}class gY{createSubscription(t,e){return t.subscribe({next:e,error:n=>{throw n}})}dispose(t){t.unsubscribe()}}class _Y{createSubscription(t,e){return t.then(e,n=>{throw n})}dispose(t){}}const vY=new _Y,yY=new gY;let pl=(()=>{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(oy(e))return vY;if(uL(e))return yY;throw fl()}_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)(E(Zn,16))},i.\u0275pipe=Gi({name:"async",type:i,pure:!1,standalone:!0}),i})(),cB=(()=>{class i{constructor(e){this.differs=e,this.keyValues=[],this.compareFn=dB}transform(e,n=dB){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 kY(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)(E(gy,16))},i.\u0275pipe=Gi({name:"keyvalue",type:i,pure:!1,standalone:!0}),i})();function dB(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 zT(i){return!(null==i||""===i||i!=i)}(e))return null;r=r||this._locale;try{return function sY(i,t,e){return function OT(i,t,e,n,r,s,o=!1){let a="",l=!1;if(isFinite(i)){let c=function aY(i){let n,r,s,o,a,t=Math.abs(i)+"",e=0;for((r=t.indexOf(eM))>-1&&(t=t.replace(eM,"")),(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)===yy;s++);if(s===(a=t.length))n=[0],r=1;else{for(a--;t.charAt(a)===yy;)a--;for(r-=s,n=[],o=0;s<=a;s++,o++)n[o]=Number(t.charAt(s))}return r>JN&&(n=n.splice(0,JN-1),e=r-1,r=1),{digits:n,exponent:e,integerLen:r}}(i);o&&(c=function oY(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 d=t.minInt,h=t.minFrac,p=t.maxFrac;if(s){const M=s.match(J9);if(null===M)throw new Error(`${s} is not a valid digit info`);const x=M[1],C=M[3],F=M[5];null!=x&&(d=LT(x)),null!=C&&(h=LT(C)),null!=F?p=LT(F):null!=C&&h>p&&(p=h)}!function lY(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);d&&(n.unshift(d),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(Ea(e,n)),v.length&&(a+=Ea(e,r)+v.join("")),b&&(a+=Ea(e,Ht.Exponential)+"+"+b)}else a=Ea(e,Ht.Infinity);return a=i<0&&!l?t.negPre+a+t.negSuf:t.posPre+a+t.posSuf,a}(i,function FT(i,t="-"){const e={minInt:1,minFrac:0,maxFrac:0,posPre:"",posSuf:"",negPre:"",negSuf:"",gSize:0,lgSize:0},n=i.split(eY),r=n[0],s=n[1],o=-1!==r.indexOf(eM)?r.split(eM):[r.substring(0,r.lastIndexOf(yy)+1),r.substring(r.lastIndexOf(yy)+1)],a=o[0],l=o[1]||"";e.posPre=a.substring(0,a.indexOf(PT));for(let d=0;d{class i{}return i.\u0275fac=function(e){return new(e||i)},i.\u0275mod=nn({type:i}),i.\u0275inj=Kt({}),i})();const hB="browser";let UY=(()=>{class i{}return i.\u0275prov=ke({token:i,providedIn:"root",factory:()=>new VY(ee(jt),window)}),i})();class VY{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 zY(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=fB(this.window.history)||fB(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 fB(i){return Object.getOwnPropertyDescriptor(i,"scrollRestoration")}class m7 extends b9{constructor(){super(...arguments),this.supportsDOMEvents=!0}}class WT extends m7{static makeCurrent(){!function y9(i){ET||(ET=i)}(new WT)}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 g7(){return My=My||document.querySelector("base"),My?My.getAttribute("href"):null}();return null==e?null:function _7(i){rM=rM||document.createElement("a"),rM.setAttribute("href",i);const t=rM.pathname;return"/"===t.charAt(0)?t:`/${t}`}(e)}resetBaseElement(){My=null}getUserAgent(){return window.navigator.userAgent}getCookie(t){return function dY(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 rM,My=null;const vB=new me("TRANSITION_ID"),y7=[{provide:Uw,useFactory:function v7(i,t,e){return()=>{e.get(Vw).donePromise.then(()=>{const n=Hc(),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=ke({token:i,factory:i.\u0275fac}),i})();const sM=new me("EventManagerPlugins");let oM=(()=>{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=ke({token:i,factory:i.\u0275fac}),i})(),Cy=(()=>{class i extends bB{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)(ee(jt))},i.\u0275prov=ke({token:i,factory:i.\u0275fac}),i})();const jT={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/"},YT=/%COMP%/g,MB=new me("RemoveStylesOnCompDestory",{providedIn:"root",factory:()=>!1});function CB(i,t){return t.flat(100).map(e=>e.replace(YT,i))}function SB(i){return t=>{if("__ngUnwrap__"===t)return i;!1===i(t)&&(t.preventDefault(),t.returnValue=!1)}}let aM=(()=>{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 qT(e)}createRenderer(e,n){if(!e||!n)return this.defaultRenderer;const r=this.getOrCreateRenderer(e,n);return r instanceof DB?r.applyToHost(e):r instanceof XT&&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 qs.Emulated:s=new DB(o,a,n,this.appId,l);break;case qs.ShadowDom:return new D7(o,a,e,n);default:s=new XT(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)(ee(oM),ee(Cy),ee(cm),ee(MB))},i.\u0275prov=ke({token:i,factory:i.\u0275fac}),i})();class qT{constructor(t){this.eventManager=t,this.data=Object.create(null),this.destroyNode=null}destroy(){}createElement(t,e){return e?document.createElementNS(jT[e]||e,t):document.createElement(t)}createComment(t){return document.createComment(t)}createText(t){return document.createTextNode(t)}appendChild(t,e){(AB(t)?t.content:t).appendChild(e)}insertBefore(t,e,n){t&&(AB(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=jT[r];s?t.setAttributeNS(s,e,n):t.setAttribute(e,n)}else t.setAttribute(e,n)}removeAttribute(t,e,n){if(n){const r=jT[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&(Es.DashCase|Es.Important)?t.style.setProperty(e,n,r&Es.Important?"important":""):t.style[e]=n}removeStyle(t,e,n){n&Es.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,SB(n)):this.eventManager.addEventListener(t,e,SB(n))}}function AB(i){return"TEMPLATE"===i.tagName&&void 0!==i.content}class D7 extends qT{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=CB(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 XT extends qT{constructor(t,e,n,r,s=n.id){super(t),this.sharedStylesHost=e,this.removeStylesOnCompDestory=r,this.rendererUsageCount=0,this.styles=CB(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 DB extends XT{constructor(t,e,n,r,s){const o=r+"-"+n.id;super(t,e,n,s,o),this.contentAttr=function S7(i){return"_ngcontent-%COMP%".replace(YT,i)}(o),this.hostAttr=function E7(i){return"_nghost-%COMP%".replace(YT,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 T7=(()=>{class i extends yB{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)(ee(jt))},i.\u0275prov=ke({token:i,factory:i.\u0275fac}),i})();const TB=["alt","control","meta","shift"],I7={"\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"},R7={alt:i=>i.altKey,control:i=>i.ctrlKey,meta:i=>i.metaKey,shift:i=>i.shiftKey};let k7=(()=>{class i extends yB{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(()=>Hc().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."),TB.forEach(c=>{const d=n.indexOf(c);d>-1&&(n.splice(d,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=I7[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"),TB.forEach(o=>{o!==r&&(0,R7[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)(ee(jt))},i.\u0275prov=ke({token:i,factory:i.\u0275fac}),i})();const L7=SN(g9,"browser",[{provide:fT,useValue:hB},{provide:pN,useValue:function P7(){WT.makeCurrent()},multi:!0},{provide:jt,useFactory:function F7(){return function sD(i){vv=i}(document),document},deps:[]}]),kB=new me(""),PB=[{provide:zw,useClass:class b7{addToWindow(t){Rn.getAngularTestability=(n,r=!0)=>{const s=t.findTestabilityInTree(n,r);if(null==s)throw new Error("Could not find testability for element.");return s},Rn.getAllAngularTestabilities=()=>t.getAllTestabilities(),Rn.getAllAngularRootElements=()=>t.getAllRootElements(),Rn.frameworkStabilizers||(Rn.frameworkStabilizers=[]),Rn.frameworkStabilizers.push(n=>{const r=Rn.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?Hc().isShadowRoot(e)?this.findTestabilityInTree(t,e.host,!0):this.findTestabilityInTree(t,e.parentElement,!0):null)}},deps:[]},{provide:bN,useClass:_T,deps:[ft,vT,zw]},{provide:_T,useClass:_T,deps:[ft,vT,zw]}],OB=[{provide:Iv,useValue:"root"},{provide:al,useFactory:function O7(){return new al},deps:[]},{provide:sM,useClass:T7,multi:!0,deps:[jt,ft,fT]},{provide:sM,useClass:k7,multi:!0,deps:[jt]},{provide:aM,useClass:aM,deps:[oM,Cy,cm,MB]},{provide:Gl,useExisting:aM},{provide:bB,useExisting:Cy},{provide:Cy,useClass:Cy,deps:[jt]},{provide:oM,useClass:oM,deps:[sM,ft]},{provide:class HY{},useClass:x7,deps:[]},[]];let FB=(()=>{class i{constructor(e){}static withServerTransition(e){return{ngModule:i,providers:[{provide:cm,useValue:e.appId},{provide:vB,useExisting:cm},y7]}}}return i.\u0275fac=function(e){return new(e||i)(ee(kB,12))},i.\u0275mod=nn({type:i}),i.\u0275inj=Kt({providers:[...OB,...PB],imports:[Eo,_9]}),i})(),LB=(()=>{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)(ee(jt))},i.\u0275prov=ke({token:i,factory:function(e){let n=null;return n=e?new e:function B7(){return new LB(ee(jt))}(),n},providedIn:"root"}),i})();typeof window<"u"&&window;let QT=(()=>{class i{}return i.\u0275fac=function(e){return new(e||i)},i.\u0275prov=ke({token:i,factory:function(e){let n=null;return n=e?new(e||i):ee(UB),n},providedIn:"root"}),i})(),UB=(()=>{class i extends QT{constructor(e){super(),this._doc=e}sanitize(e,n){if(null==n)return null;switch(e){case Kn.NONE:return n;case Kn.HTML:return Ma(n,"HTML")?Js(n):Zx(this._doc,String(n)).toString();case Kn.STYLE:return Ma(n,"Style")?Js(n):n;case Kn.SCRIPT:if(Ma(n,"Script"))return Js(n);throw new Error("unsafe value used in a script context");case Kn.URL:return Ma(n,"URL")?Js(n):xh(String(n));case Kn.RESOURCE_URL:if(Ma(n,"ResourceURL"))return Js(n);throw new Error(`unsafe value used in a resource URL context (see ${qu})`);default:throw new Error(`Unexpected SecurityContext ${e} (see ${qu})`)}}bypassSecurityTrustHtml(e){return function uD(i){return new oD(i)}(e)}bypassSecurityTrustStyle(e){return function hD(i){return new aD(i)}(e)}bypassSecurityTrustScript(e){return function fD(i){return new lD(i)}(e)}bypassSecurityTrustUrl(e){return function pD(i){return new cD(i)}(e)}bypassSecurityTrustResourceUrl(e){return function mD(i){return new Pp(i)}(e)}}return i.\u0275fac=function(e){return new(e||i)(ee(jt))},i.\u0275prov=ke({token:i,factory:function(e){let n=null;return n=e?new e:function G7(i){return new UB(i.get(jt))}(ee($i)),n},providedIn:"root"}),i})();function ht(...i){return Ni(i,$u(i))}class gt extends Re{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 fm=V(i=>function(){i(this),this.name="EmptyError",this.message="no elements in sequence"}),{isArray:$7}=Array,{getPrototypeOf:W7,prototype:j7,keys:Y7}=Object;function VB(i){if(1===i.length){const t=i[0];if($7(t))return{args:t,keys:null};if(function q7(i){return i&&"object"==typeof i&&W7(i)===j7}(t)){const e=Y7(t);return{args:e.map(n=>t[n]),keys:e}}}return{args:i,keys:null}}const{isArray:X7}=Array;function JT(i){return et(t=>function K7(i,t){return X7(t)?i(...t):i(t)}(i,t))}function zB(i,t){return i.reduce((e,n,r)=>(e[n]=t[r],e),{})}function nu(...i){const t=$u(i),e=w0(i),{args:n,keys:r}=VB(i);if(0===n.length)return Ni([],t);const s=new In(function Z7(i,t,e=$a){return n=>{HB(t,()=>{const{length:r}=i,s=new Array(r);let o=r,a=r;for(let l=0;l{const c=Ni(i[l],t);let d=!1;c.subscribe(Yn(n,h=>{s[l]=h,d||(d=!0,a--),a||n.next(e(s.slice()))},()=>{--o||n.complete()}))},n)},n)}}(n,t,r?o=>zB(r,o):$a));return e?s.pipe(JT(e)):s}function HB(i,t,e){i?Ya(e,i,t):t()}function Sy(...i){return function Q7(){return yd(1)}()(Ni(i,$u(i)))}function Ey(i){return new In(t=>{wr(i()).subscribe(t)})}function pm(i,t){const e=cn(i)?i:()=>i,n=r=>r.error(e());return new In(t?r=>t.schedule(n,0,r):n)}function eI(){return ti((i,t)=>{let e=null;i._refCount++;const n=Yn(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 GB extends In{constructor(t,e){super(),this.source=t,this.subjectFactory=e,this._subject=null,this._refCount=0,this._connection=null,c0(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 Zt;const e=this.getSubject();t.add(this.source.subscribe(Yn(e,void 0,()=>{this._teardown(),e.complete()},n=>{this._teardown(),e.error(n)},()=>this._teardown()))),t.closed&&(this._connection=null,t=Zt.EMPTY)}return t}refCount(){return eI()(this)}}function Rs(i,t){return ti((e,n)=>{let r=null,s=0,o=!1;const a=()=>o&&!r&&n.complete();e.subscribe(Yn(n,l=>{r?.unsubscribe();let c=0;const d=s++;wr(i(l,d)).subscribe(r=Yn(n,h=>n.next(t?t(l,h,d,c++):h),()=>{r=null,a()}))},()=>{o=!0,a()}))})}function Oi(i){return i<=0?()=>po:ti((t,e)=>{let n=0;t.subscribe(Yn(e,r=>{++n<=i&&(e.next(r),i<=n&&e.complete())}))})}function Ao(...i){const t=$u(i);return ti((e,n)=>{(t?Sy(i,e,t):Sy(i,e)).subscribe(n)})}function gn(i,t){return ti((e,n)=>{let r=0;e.subscribe(Yn(n,s=>i.call(t,s,r++)&&n.next(s)))})}function lM(i){return ti((t,e)=>{let n=!1;t.subscribe(Yn(e,r=>{n=!0,e.next(r)},()=>{n||e.next(i),e.complete()}))})}function $B(i=J7){return ti((t,e)=>{let n=!1;t.subscribe(Yn(e,r=>{n=!0,e.next(r)},()=>n?e.complete():e.error(i())))})}function J7(){return new fm}function iu(i,t){const e=arguments.length>=2;return n=>n.pipe(i?gn((r,s)=>i(r,s,n)):$a,Oi(1),e?lM(t):$B(()=>new fm))}function ru(i,t){return cn(t)?ir(i,t,1):ir(i,1)}function Vi(i,t,e){const n=cn(i)||t||e?{next:i,error:t,complete:e}:i;return n?ti((r,s)=>{var o;null===(o=n.subscribe)||void 0===o||o.call(n);let a=!0;r.subscribe(Yn(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)}))}):$a}function Wc(i){return ti((t,e)=>{let s,n=null,r=!1;n=t.subscribe(Yn(e,void 0,void 0,o=>{s=wr(i(o,Wc(i)(t))),n?(n.unsubscribe(),n=null,s.subscribe(e)):r=!0})),r&&(n.unsubscribe(),n=null,s.subscribe(e))})}function tI(i,t){return ti(function eq(i,t,e,n,r){return(s,o)=>{let a=e,l=t,c=0;s.subscribe(Yn(o,d=>{const h=c++;l=a?i(l,d,h):(a=!0,d),n&&o.next(l)},r&&(()=>{a&&o.next(l),o.complete()})))}}(i,t,arguments.length>=2,!0))}function nI(i){return i<=0?()=>po:ti((t,e)=>{let n=[];t.subscribe(Yn(e,r=>{n.push(r),i{for(const r of n)e.next(r);e.complete()},void 0,()=>{n=null}))})}function WB(i,t){const e=arguments.length>=2;return n=>n.pipe(i?gn((r,s)=>i(r,s,n)):$a,nI(1),e?lM(t):$B(()=>new fm))}function jB(i,t=!1){return ti((e,n)=>{let r=0;e.subscribe(Yn(n,s=>{const o=i(s,r++);(o||t)&&n.next(s),!o&&n.complete()}))})}function YB(i){return et(()=>i)}function su(i){return ti((t,e)=>{try{t.subscribe(e)}finally{e.add(i)}})}const _n="primary",Ay=Symbol("RouteTitle");class tq{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 tq(i)}function nq(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 XB(i){return Array.prototype.concat.apply([],i)}function KB(i){return i.length>0?i[i.length-1]:null}function os(i,t){for(const e in i)i.hasOwnProperty(e)&&t(i[e],e)}function ou(i){return L1(i)?i:oy(i)?Ni(Promise.resolve(i)):ht(i)}const cM=!1,rq={exact:function JB(i,t,e){if(!Rh(i.segments,t.segments)||!dM(i.segments,t.segments,e)||i.numberOfChildren!==t.numberOfChildren)return!1;for(const n in t.children)if(!i.children[n]||!JB(i.children[n],t.children[n],e))return!1;return!0},subset:e3},ZB={exact:function sq(i,t){return Xl(i,t)},subset:function oq(i,t){return Object.keys(t).length<=Object.keys(i).length&&Object.keys(t).every(e=>qB(i[e],t[e]))},ignored:()=>!0};function QB(i,t,e){return rq[e.paths](i.root,t.root,e.matrixParams)&&ZB[e.queryParams](i.queryParams,t.queryParams)&&!("exact"===e.fragment&&i.fragment!==t.fragment)}function e3(i,t,e){return t3(i,t,t.segments,e)}function t3(i,t,e,n){if(i.segments.length>e.length){const r=i.segments.slice(0,e.length);return!(!Rh(r,e)||t.hasChildren()||!dM(r,e,n))}if(i.segments.length===e.length){if(!Rh(i.segments,e)||!dM(i.segments,e,n))return!1;for(const r in t.children)if(!i.children[r]||!e3(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!!(Rh(i.segments,r)&&dM(i.segments,r,n)&&i.children[_n])&&t3(i.children[_n],t,s,n)}}function dM(i,t,e){return t.every((n,r)=>ZB[e](i[r].parameters,n.parameters))}class au{constructor(t=new Tn([],{}),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 cq.serialize(this)}}class Tn{constructor(t,e){this.segments=t,this.children=e,this.parent=null,os(e,(n,r)=>n.parent=this)}hasChildren(){return this.numberOfChildren>0}get numberOfChildren(){return Object.keys(this.children).length}toString(){return uM(this)}}class Dy{constructor(t,e){this.path=t,this.parameters=e}get parameterMap(){return this._parameterMap||(this._parameterMap=mm(this.parameters)),this._parameterMap}toString(){return s3(this)}}function Rh(i,t){return i.length===t.length&&i.every((e,n)=>e.path===t[n].path)}let Ty=(()=>{class i{}return i.\u0275fac=function(e){return new(e||i)},i.\u0275prov=ke({token:i,factory:function(){return new iI},providedIn:"root"}),i})();class iI{parse(t){const e=new vq(t);return new au(e.parseRootSegment(),e.parseQueryParams(),e.parseFragment())}serialize(t){const e=`/${Iy(t.root,!0)}`,n=function hq(i){const t=Object.keys(i).map(e=>{const n=i[e];return Array.isArray(n)?n.map(r=>`${hM(e)}=${hM(r)}`).join("&"):`${hM(e)}=${hM(n)}`}).filter(e=>!!e);return t.length?`?${t.join("&")}`:""}(t.queryParams);return`${e}${n}${"string"==typeof t.fragment?`#${function dq(i){return encodeURI(i)}(t.fragment)}`:""}`}}const cq=new iI;function uM(i){return i.segments.map(t=>s3(t)).join("/")}function Iy(i,t){if(!i.hasChildren())return uM(i);if(t){const e=i.children[_n]?Iy(i.children[_n],!1):"",n=[];return os(i.children,(r,s)=>{s!==_n&&n.push(`${s}:${Iy(r,!1)}`)}),n.length>0?`${e}(${n.join("//")})`:e}{const e=function lq(i,t){let e=[];return os(i.children,(n,r)=>{r===_n&&(e=e.concat(t(n,r)))}),os(i.children,(n,r)=>{r!==_n&&(e=e.concat(t(n,r)))}),e}(i,(n,r)=>r===_n?[Iy(i.children[_n],!1)]:[`${r}:${Iy(n,!1)}`]);return 1===Object.keys(i.children).length&&null!=i.children[_n]?`${uM(i)}/${e[0]}`:`${uM(i)}/(${e.join("//")})`}}function n3(i){return encodeURIComponent(i).replace(/%40/g,"@").replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",")}function hM(i){return n3(i).replace(/%3B/gi,";")}function rI(i){return n3(i).replace(/\(/g,"%28").replace(/\)/g,"%29").replace(/%26/gi,"&")}function fM(i){return decodeURIComponent(i)}function r3(i){return fM(i.replace(/\+/g,"%20"))}function s3(i){return`${rI(i.path)}${function uq(i){return Object.keys(i).map(t=>`;${rI(t)}=${rI(i[t])}`).join("")}(i.parameters)}`}const fq=/^[^\/()?;=#]+/;function pM(i){const t=i.match(fq);return t?t[0]:""}const pq=/^[^=?&#]+/,gq=/^[^&#]+/;class vq{constructor(t){this.url=t,this.remaining=t}parseRootSegment(){return this.consumeOptional("/"),""===this.remaining||this.peekStartsWith("?")||this.peekStartsWith("#")?new Tn([],{}):new Tn([],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[_n]=new Tn(t,e)),n}parseSegment(){const t=pM(this.remaining);if(""===t&&this.peekStartsWith(";"))throw new pe(4009,cM);return this.capture(t),new Dy(fM(t),this.parseMatrixParams())}parseMatrixParams(){const t={};for(;this.consumeOptional(";");)this.parseParam(t);return t}parseParam(t){const e=pM(this.remaining);if(!e)return;this.capture(e);let n="";if(this.consumeOptional("=")){const r=pM(this.remaining);r&&(n=r,this.capture(n))}t[fM(e)]=fM(n)}parseQueryParam(t){const e=function mq(i){const t=i.match(pq);return t?t[0]:""}(this.remaining);if(!e)return;this.capture(e);let n="";if(this.consumeOptional("=")){const o=function _q(i){const t=i.match(gq);return t?t[0]:""}(this.remaining);o&&(n=o,this.capture(n))}const r=r3(e),s=r3(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=pM(this.remaining),r=this.remaining[n.length];if("/"!==r&&")"!==r&&";"!==r)throw new pe(4010,cM);let s;n.indexOf(":")>-1?(s=n.slice(0,n.indexOf(":")),this.capture(s),this.capture(":")):t&&(s=_n);const o=this.parseChildren();e[s]=1===Object.keys(o).length?o[_n]:new Tn([],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 pe(4011,cM)}}function sI(i){return i.segments.length>0?new Tn([],{[_n]:i}):i}function mM(i){const t={};for(const n of Object.keys(i.children)){const s=mM(i.children[n]);(s.segments.length>0||s.hasChildren())&&(t[n]=s)}return function yq(i){if(1===i.numberOfChildren&&i.children[_n]){const t=i.children[_n];return new Tn(i.segments.concat(t.segments),t.children)}return i}(new Tn(i.segments,t))}function kh(i){return i instanceof au}const oI=!1;function bq(i,t,e,n,r){if(0===e.length)return gm(t.root,t.root,t.root,n,r);const s=function d3(i){if("string"==typeof i[0]&&1===i.length&&"/"===i[0])return new c3(!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 os(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 c3(e,t,n)}(e);return s.toRoot()?gm(t.root,t.root,new Tn([],{}),n,r):function o(l){const c=function wq(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 u3(i,t,e){let n=i,r=t,s=e;for(;s>r;){if(s-=r,n=n.parent,!n)throw new pe(4005,oI&&"Invalid number of '../'");r=n.segments.length}return new _m(n,!1,r-s)}(e,n+(Ry(i.commands[0])?0:1),i.numberOfDoubleDots)}(s,t,i.snapshot?._urlSegment,l),d=c.processChildren?vm(c.segmentGroup,c.index,s.commands):aI(c.segmentGroup,c.index,s.commands);return gm(t.root,c.segmentGroup,d,n,r)}(i.snapshot?._lastPathIndex)}function Ry(i){return"object"==typeof i&&null!=i&&!i.outlets&&!i.segmentPath}function ky(i){return"object"==typeof i&&null!=i&&i.outlets}function gm(i,t,e,n,r){let o,s={};n&&os(n,(l,c)=>{s[c]=Array.isArray(l)?l.map(d=>`${d}`):`${l}`}),o=i===t?e:l3(i,t,e);const a=sI(mM(o));return new au(a,s,r)}function l3(i,t,e){const n={};return os(i.children,(r,s)=>{n[s]=r===t?e:l3(r,t,e)}),new Tn(i.segments,n)}class c3{constructor(t,e,n){if(this.isAbsolute=t,this.numberOfDoubleDots=e,this.commands=n,t&&n.length>0&&Ry(n[0]))throw new pe(4003,oI&&"Root segment cannot have matrix parameters");const r=n.find(ky);if(r&&r!==KB(n))throw new pe(4004,oI&&"{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 aI(i,t,e){if(i||(i=new Tn([],{})),0===i.segments.length&&i.hasChildren())return vm(i,t,e);const n=function Cq(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(ky(a))break;const l=`${a}`,c=n0&&void 0===l)break;if(l&&c&&"object"==typeof c&&void 0===c.outlets){if(!f3(l,c,o))return s;n+=2}else{if(!f3(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]=aI(i.children[o],t,s))}),os(i.children,(s,o)=>{void 0===n[o]&&(r[o]=s)}),new Tn(i.segments,r)}}function lI(i,t,e){const n=i.segments.slice(0,t);let r=0;for(;r{"string"==typeof e&&(e=[e]),null!==e&&(t[n]=lI(new Tn([],{}),0,e))}),t}function h3(i){const t={};return os(i,(e,n)=>t[n]=`${e}`),t}function f3(i,t,e){return i==e.path&&Xl(t,e.parameters)}const Py="imperative";class Kl{constructor(t,e){this.id=t,this.url=e}}class cI extends Kl{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 Ph extends Kl{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 gM extends Kl{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 _M extends Kl{constructor(t,e,n,r){super(t,e),this.reason=n,this.code=r,this.type=16}}class dI extends Kl{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 Eq extends Kl{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 Aq extends Kl{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 Dq extends Kl{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 Tq extends Kl{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 Iq extends Kl{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 Rq{constructor(t){this.route=t,this.type=9}toString(){return`RouteConfigLoadStart(path: ${this.route.path})`}}class kq{constructor(t){this.route=t,this.type=10}toString(){return`RouteConfigLoadEnd(path: ${this.route.path})`}}class Pq{constructor(t){this.snapshot=t,this.type=11}toString(){return`ChildActivationStart(path: '${this.snapshot.routeConfig&&this.snapshot.routeConfig.path||""}')`}}class Oq{constructor(t){this.snapshot=t,this.type=12}toString(){return`ChildActivationEnd(path: '${this.snapshot.routeConfig&&this.snapshot.routeConfig.path||""}')`}}class Fq{constructor(t){this.snapshot=t,this.type=13}toString(){return`ActivationStart(path: '${this.snapshot.routeConfig&&this.snapshot.routeConfig.path||""}')`}}class Lq{constructor(t){this.snapshot=t,this.type=14}toString(){return`ActivationEnd(path: '${this.snapshot.routeConfig&&this.snapshot.routeConfig.path||""}')`}}class p3{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 Uq=(()=>{class i{createUrlTree(e,n,r,s,o,a){return bq(e||n.root,r,s,o,a)}}return i.\u0275fac=function(e){return new(e||i)},i.\u0275prov=ke({token:i,factory:i.\u0275fac}),i})(),zq=(()=>{class i{}return i.\u0275fac=function(e){return new(e||i)},i.\u0275prov=ke({token:i,factory:function(t){return Uq.\u0275fac(t)},providedIn:"root"}),i})();class m3{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=uI(t,this._root);return e?e.children.map(n=>n.value):[]}firstChild(t){const e=uI(t,this._root);return e&&e.children.length>0?e.children[0].value:null}siblings(t){const e=hI(t,this._root);return e.length<2?[]:e[e.length-2].children.map(r=>r.value).filter(r=>r!==t)}pathFromRoot(t){return hI(t,this._root).map(e=>e.value)}}function uI(i,t){if(i===t.value)return t;for(const e of t.children){const n=uI(i,e);if(n)return n}return null}function hI(i,t){if(i===t.value)return[t];for(const e of t.children){const n=hI(i,e);if(n.length)return n.unshift(t),n}return[]}class jc{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 g3 extends m3{constructor(t,e){super(t),this.snapshot=e,fI(this,t)}toString(){return this.snapshot.toString()}}function _3(i,t){const e=function Hq(i,t){const o=new vM([],{},{},"",{},_n,t,null,i.root,-1,{});return new y3("",new jc(o,[]))}(i,t),n=new gt([new Dy("",{})]),r=new gt({}),s=new gt({}),o=new gt({}),a=new gt(""),l=new bm(n,r,o,a,s,_n,t,e.root);return l.snapshot=e.root,new g3(new jc(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(et(c=>c[Ay]))??ht(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(et(t=>mm(t)))),this._paramMap}get queryParamMap(){return this._queryParamMap||(this._queryParamMap=this.queryParams.pipe(et(t=>mm(t)))),this._queryParamMap}toString(){return this.snapshot?this.snapshot.toString():`Future(${this._futureSnapshot})`}}function v3(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 Gq(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 vM{get title(){return this.data?.[Ay]}constructor(t,e,n,r,s,o,a,l,c,d,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=d,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 y3 extends m3{constructor(t,e){super(e),this.url=t,fI(this,e)}toString(){return b3(this._root)}}function fI(i,t){t.value._routerState=i,t.children.forEach(e=>fI(i,e))}function b3(i){const t=i.children.length>0?` { ${i.children.map(b3).join(", ")} } `:"";return`${i.value}${t}`}function pI(i){if(i.snapshot){const t=i.snapshot,e=i._futureSnapshot;i.snapshot=e,Xl(t.queryParams,e.queryParams)||i.queryParams.next(e.queryParams),t.fragment!==e.fragment&&i.fragment.next(e.fragment),Xl(t.params,e.params)||i.params.next(e.params),function iq(i,t){if(i.length!==t.length)return!1;for(let e=0;eXl(e.parameters,t[n].parameters))}(i.url,t.url);return e&&!(!i.parent!=!t.parent)&&(!i.parent||mI(i.parent,t.parent))}function Oy(i,t,e){if(e&&i.shouldReuseRoute(t.value,e.value.snapshot)){const n=e.value;n._futureSnapshot=t.value;const r=function Wq(i,t,e){return t.children.map(n=>{for(const r of e.children)if(i.shouldReuseRoute(n.value,r.value.snapshot))return Oy(i,n,r);return Oy(i,n)})}(i,t,e);return new jc(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=>Oy(i,a)),o}}const n=function jq(i){return new bm(new gt(i.url),new gt(i.params),new gt(i.queryParams),new gt(i.fragment),new gt(i.data),i.outlet,i.component,i)}(t.value),r=t.children.map(s=>Oy(i,s));return new jc(n,r)}}const gI="ngNavigationCancelingError";function x3(i,t){const{redirectTo:e,navigationBehaviorOptions:n}=kh(t)?{redirectTo:t,navigationBehaviorOptions:void 0}:t,r=w3(!1,0,t);return r.url=e,r.navigationBehaviorOptions=n,r}function w3(i,t,e){const n=new Error("NavigationCancelingError: "+(i||""));return n[gI]=!0,n.cancellationCode=t,e&&(n.url=e),n}function M3(i){return C3(i)&&kh(i.url)}function C3(i){return i&&i[gI]}class Yq{constructor(){this.outlet=null,this.route=null,this.resolver=null,this.injector=null,this.children=new Fy,this.attachRef=null}}let Fy=(()=>{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 Yq,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=ke({token:i,factory:i.\u0275fac,providedIn:"root"}),i})();const yM=!1;let S3=(()=>{class i{constructor(){this.activated=null,this._activatedRoute=null,this.name=_n,this.activateEvents=new We,this.deactivateEvents=new We,this.attachEvents=new We,this.detachEvents=new We,this.parentContexts=Ft(Fy),this.location=Ft(Wr),this.changeDetector=Ft(Zn),this.environmentInjector=Ft(to)}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 pe(4012,yM);return this.activated.instance}get activatedRoute(){if(!this.activated)throw new pe(4012,yM);return this._activatedRoute}get activatedRouteData(){return this._activatedRoute?this._activatedRoute.snapshot.data:{}}detach(){if(!this.activated)throw new pe(4012,yM);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 pe(4013,yM);this._activatedRoute=e;const r=this.location,o=e.snapshot.component,a=this.parentContexts.getOrCreateContext(this.name).children,l=new qq(e,a,r.injector);if(n&&function Xq(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=ve({type:i,selectors:[["router-outlet"]],inputs:{name:"name"},outputs:{activateEvents:"activate",deactivateEvents:"deactivate",attachEvents:"attach",detachEvents:"detach"},exportAs:["outlet"],standalone:!0,features:[bi]}),i})();class qq{constructor(t,e,n){this.route=t,this.childContexts=e,this.parent=n}get(t,e){return t===bm?this.route:t===Fy?this.childContexts:this.parent.get(t,e)}}let _I=(()=>{class i{}return i.\u0275fac=function(e){return new(e||i)},i.\u0275cmp=ot({type:i,selectors:[["ng-component"]],standalone:!0,features:[Z1],decls:1,vars:0,template:function(e,n){1&e&&De(0,"router-outlet")},dependencies:[S3],encapsulation:2}),i})();function E3(i,t){return i.providers&&!i._injector&&(i._injector=Fw(i.providers,t,`Route: ${i.path}`)),i._injector??t}function yI(i){const t=i.children&&i.children.map(yI),e=t?{...i,children:t}:{...i};return!e.component&&!e.loadComponent&&(t||e.loadChildren)&&e.outlet&&e.outlet!==_n&&(e.component=_I),e}function Da(i){return i.outlet||_n}function A3(i,t){const e=i.filter(n=>Da(n)===t);return e.push(...i.filter(n=>Da(n)!==t)),e}function Ly(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 eX{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),pI(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]}),os(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 Lq(s.value.snapshot))}),t.children.length&&this.forwardEvent(new Oq(t.value.snapshot))}activateRoutes(t,e,n){const r=t.value,s=e?e.value:null;if(pI(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),pI(a.route.value),this.activateChildRoutes(t,null,o.children)}else{const a=Ly(r.snapshot),l=a?.get(Hl)??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 D3{constructor(t){this.path=t,this.route=this.path[this.path.length-1]}}class bM{constructor(t,e){this.component=t,this.route=e}}function tX(i,t,e){const n=i._root;return Ny(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 Cr(i){return null!==Gf(i)}(i)?t.get(i):i:n}function Ny(i,t,e,n,r={canDeactivateChecks:[],canActivateChecks:[]}){const s=ym(t);return i.children.forEach(o=>{(function iX(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 rX(i,t,e){if("function"==typeof e)return e(i,t);switch(e){case"pathParamsChange":return!Rh(i.url,t.url);case"pathParamsOrQueryParamsChange":return!Rh(i.url,t.url)||!Xl(i.queryParams,t.queryParams);case"always":return!0;case"paramsOrQueryParamsChange":return!mI(i,t)||!Xl(i.queryParams,t.queryParams);default:return!mI(i,t)}}(o,s,s.routeConfig.runGuardsAndResolvers);l?r.canActivateChecks.push(new D3(n)):(s.data=o.data,s._resolvedData=o._resolvedData),Ny(i,t,s.component?a?a.children:null:e,n,r),l&&a&&a.outlet&&a.outlet.isActivated&&r.canDeactivateChecks.push(new bM(a.outlet.component,o))}else o&&By(t,a,r),r.canActivateChecks.push(new D3(n)),Ny(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]}),os(s,(o,a)=>By(o,e.getContext(a),r)),r}function By(i,t,e){const n=ym(i),r=i.value;os(n,(s,o)=>{By(s,r.component?t?t.children.getContext(o):null:t,e)}),e.canDeactivateChecks.push(new bM(r.component&&t&&t.outlet&&t.outlet.isActivated?t.outlet.component:null,r))}function Uy(i){return"function"==typeof i}function bI(i){return i instanceof fm||"EmptyError"===i?.name}const xM=Symbol("INITIAL_VALUE");function wm(){return Rs(i=>nu(i.map(t=>t.pipe(Oi(1),Ao(xM)))).pipe(et(t=>{for(const e of t)if(!0!==e){if(e===xM)return xM;if(!1===e||e instanceof au)return e}return!0}),gn(t=>t!==xM),Oi(1)))}function T3(i){return function CE(...i){return a0(i)}(Vi(t=>{if(kh(t))throw x3(0,t)}),et(t=>!0===t))}const xI={matched:!1,consumedSegments:[],remainingSegments:[],parameters:{},positionalParamSegments:{}};function I3(i,t,e,n,r){const s=wI(i,t,e);return s.matched?function xX(i,t,e,n){const r=t.canMatch;return r&&0!==r.length?ht(r.map(o=>{const a=xm(o,i);return ou(function dX(i){return i&&Uy(i.canMatch)}(a)?a.canMatch(t,e):i.runInContext(()=>a(t,e)))})).pipe(wm(),T3()):ht(!0)}(n=E3(t,n),t,e).pipe(et(o=>!0===o?s:{...xI})):ht(s)}function wI(i,t,e){if(""===t.path)return"full"===t.pathMatch&&(i.hasChildren()||e.length>0)?{...xI}:{matched:!0,consumedSegments:[],remainingSegments:e,parameters:{},positionalParamSegments:{}};const r=(t.matcher||nq)(e,i,t);if(!r)return{...xI};const s={};os(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 wM(i,t,e,n){if(e.length>0&&function CX(i,t,e){return e.some(n=>MM(i,t,n)&&Da(n)!==_n)}(i,e,n)){const s=new Tn(t,function MX(i,t,e,n){const r={};r[_n]=n,n._sourceSegment=i,n._segmentIndexShift=t.length;for(const s of e)if(""===s.path&&Da(s)!==_n){const o=new Tn([],{});o._sourceSegment=i,o._segmentIndexShift=t.length,r[Da(s)]=o}return r}(i,t,n,new Tn(e,i.children)));return s._sourceSegment=i,s._segmentIndexShift=t.length,{segmentGroup:s,slicedSegments:[]}}if(0===e.length&&function SX(i,t,e){return e.some(n=>MM(i,t,n))}(i,e,n)){const s=new Tn(i.segments,function wX(i,t,e,n,r){const s={};for(const o of n)if(MM(i,e,o)&&!r[Da(o)]){const a=new Tn([],{});a._sourceSegment=i,a._segmentIndexShift=t.length,s[Da(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 Tn(i.segments,i.children);return r._sourceSegment=i,r._segmentIndexShift=t.length,{segmentGroup:r,slicedSegments:e}}function MM(i,t,e){return(!(i.hasChildren()||t.length>0)||"full"!==e.pathMatch)&&""===e.path}function R3(i,t,e,n){return!!(Da(i)===n||n!==_n&&MM(t,e,i))&&("**"===i.path||wI(t,i,e).matched)}function k3(i,t,e){return 0===t.length&&!i.children[e]}const CM=!1;class SM{constructor(t){this.segmentGroup=t||null}}class P3{constructor(t){this.urlTree=t}}function Vy(i){return pm(new SM(i))}function O3(i){return pm(new P3(i))}class TX{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=wM(this.urlTree.root,[],[],this.config).segmentGroup,e=new Tn(t.segments,t.children);return this.expandSegmentGroup(this.injector,this.config,e,_n).pipe(et(s=>this.createUrlTree(mM(s),this.urlTree.queryParams,this.urlTree.fragment))).pipe(Wc(s=>{if(s instanceof P3)return this.allowRedirects=!1,this.match(s.urlTree);throw s instanceof SM?this.noMatchError(s):s}))}match(t){return this.expandSegmentGroup(this.injector,this.config,t.root,_n).pipe(et(r=>this.createUrlTree(mM(r),t.queryParams,t.fragment))).pipe(Wc(r=>{throw r instanceof SM?this.noMatchError(r):r}))}noMatchError(t){return new pe(4002,CM)}createUrlTree(t,e,n){const r=sI(t);return new au(r,e,n)}expandSegmentGroup(t,e,n,r){return 0===n.segments.length&&n.hasChildren()?this.expandChildren(t,e,n).pipe(et(s=>new Tn([],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 Ni(r).pipe(ru(s=>{const o=n.children[s],a=A3(e,s);return this.expandSegmentGroup(t,a,o,s).pipe(et(l=>({segment:l,outlet:s})))}),tI((s,o)=>(s[o.outlet]=o.segment,s),{}),WB())}expandSegment(t,e,n,r,s,o){return Ni(n).pipe(ru(a=>this.expandSegmentAgainstRoute(t,e,n,a,r,s,o).pipe(Wc(c=>{if(c instanceof SM)return ht(null);throw c}))),iu(a=>!!a),Wc((a,l)=>{if(bI(a))return k3(e,r,s)?ht(new Tn([],{})):Vy(e);throw a}))}expandSegmentAgainstRoute(t,e,n,r,s,o,a){return R3(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):Vy(e):Vy(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("/")?O3(s):this.lineralizeSegments(n,s).pipe(ir(o=>{const a=new Tn(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:d}=wI(e,r,s);if(!a)return Vy(e);const h=this.applyRedirectCommands(l,r.redirectTo,d);return r.redirectTo.startsWith("/")?O3(h):this.lineralizeSegments(r,h).pipe(ir(p=>this.expandSegment(t,e,n,p.concat(c),o,!1)))}matchSegmentAgainstRoute(t,e,n,r,s){return"**"===n.path?(t=E3(n,t),n.loadChildren?(n._loadedRoutes?ht({routes:n._loadedRoutes,injector:n._loadedInjector}):this.configLoader.loadChildren(t,n)).pipe(et(a=>(n._loadedRoutes=a.routes,n._loadedInjector=a.injector,new Tn(r,{})))):ht(new Tn(r,{}))):I3(e,n,r,t).pipe(Rs(({matched:o,consumedSegments:a,remainingSegments:l})=>o?this.getChildConfig(t=n._injector??t,n,r).pipe(ir(d=>{const h=d.injector??t,p=d.routes,{segmentGroup:m,slicedSegments:g}=wM(e,a,l,p),b=new Tn(m.segments,m.children);if(0===g.length&&b.hasChildren())return this.expandChildren(h,p,b).pipe(et(x=>new Tn(a,x)));if(0===p.length&&0===g.length)return ht(new Tn(a,{}));const v=Da(n)===s;return this.expandSegment(h,b,p,g,v?_n:s,!0).pipe(et(M=>new Tn(a.concat(M.segments),M.children)))})):Vy(e)))}getChildConfig(t,e,n){return e.children?ht({routes:e.children,injector:t}):e.loadChildren?void 0!==e._loadedRoutes?ht({routes:e._loadedRoutes,injector:e._loadedInjector}):function bX(i,t,e,n){const r=t.canLoad;return void 0===r||0===r.length?ht(!0):ht(r.map(o=>{const a=xm(o,i);return ou(function oX(i){return i&&Uy(i.canLoad)}(a)?a.canLoad(t,e):i.runInContext(()=>a(t,e)))})).pipe(wm(),T3())}(t,e,n).pipe(ir(r=>r?this.configLoader.loadChildren(t,e).pipe(Vi(s=>{e._loadedRoutes=s.routes,e._loadedInjector=s.injector})):function AX(i){return pm(w3(CM,3))}())):ht({routes:[],injector:t})}lineralizeSegments(t,e){let n=[],r=e.root;for(;;){if(n=n.concat(r.segments),0===r.numberOfChildren)return ht(n);if(r.numberOfChildren>1||!r.children[_n])return t.redirectTo,pm(new pe(4e3,CM));r=r.children[_n]}}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 au(s,this.createQueryParams(e.queryParams,this.urlTree.queryParams),e.fragment)}createQueryParams(t,e){const n={};return os(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 os(e.children,(a,l)=>{o[l]=this.createSegmentGroup(t,a,n,r)}),new Tn(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 pe(4001,CM);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 RX{}class OX{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=wM(this.urlTree.root,[],[],this.config.filter(e=>void 0===e.redirectTo)).segmentGroup;return this.processSegmentGroup(this.injector,this.config,t,_n).pipe(et(e=>{if(null===e)return null;const n=new vM([],Object.freeze({}),Object.freeze({...this.urlTree.queryParams}),this.urlTree.fragment,{},_n,this.rootComponentType,null,this.urlTree.root,-1,{}),r=new jc(n,e),s=new y3(this.url,r);return this.inheritParamsAndData(s._root),s}))}inheritParamsAndData(t){const e=t.value,n=v3(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 Ni(Object.keys(n.children)).pipe(ru(r=>{const s=n.children[r],o=A3(e,r);return this.processSegmentGroup(t,o,s,r)}),tI((r,s)=>r&&s?(r.push(...s),r):null),jB(r=>null!==r),lM(null),WB(),et(r=>{if(null===r)return null;const s=L3(r);return function FX(i){i.sort((t,e)=>t.value.outlet===_n?-1:e.value.outlet===_n?1:t.value.outlet.localeCompare(e.value.outlet))}(s),s}))}processSegment(t,e,n,r,s){return Ni(e).pipe(ru(o=>this.processSegmentAgainstRoute(o._injector??t,o,n,r,s)),iu(o=>!!o),Wc(o=>{if(bI(o))return k3(n,r,s)?ht([]):ht(null);throw o}))}processSegmentAgainstRoute(t,e,n,r,s){if(e.redirectTo||!R3(e,n,r,s))return ht(null);let o;if("**"===e.path){const a=r.length>0?KB(r).parameters:{},l=B3(n)+r.length;o=ht({snapshot:new vM(r,a,Object.freeze({...this.urlTree.queryParams}),this.urlTree.fragment,U3(e),Da(e),e.component??e._loadedComponent??null,e,N3(n),l,V3(e)),consumedSegments:[],remainingSegments:[]})}else o=I3(n,e,r,t).pipe(et(({matched:a,consumedSegments:l,remainingSegments:c,parameters:d})=>{if(!a)return null;const h=B3(n)+l.length;return{snapshot:new vM(l,d,Object.freeze({...this.urlTree.queryParams}),this.urlTree.fragment,U3(e),Da(e),e.component??e._loadedComponent??null,e,N3(n),h,V3(e)),consumedSegments:l,remainingSegments:c}}));return o.pipe(Rs(a=>{if(null===a)return ht(null);const{snapshot:l,consumedSegments:c,remainingSegments:d}=a;t=e._injector??t;const h=e._loadedInjector??t,p=function LX(i){return i.children?i.children:i.loadChildren?i._loadedRoutes:[]}(e),{segmentGroup:m,slicedSegments:g}=wM(n,c,d,p.filter(v=>void 0===v.redirectTo));if(0===g.length&&m.hasChildren())return this.processChildren(h,p,m).pipe(et(v=>null===v?null:[new jc(l,v)]));if(0===p.length&&0===g.length)return ht([new jc(l,[])]);const b=Da(e)===s;return this.processSegment(h,p,m,g,b?_n:s).pipe(et(v=>null===v?null:[new jc(l,v)]))}))}}function NX(i){const t=i.value.routeConfig;return t&&""===t.path&&void 0===t.redirectTo}function L3(i){const t=[],e=new Set;for(const n of i){if(!NX(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=L3(n.children);t.push(new jc(n.value,r))}return t.filter(n=>!e.has(n))}function N3(i){let t=i;for(;t._sourceSegment;)t=t._sourceSegment;return t}function B3(i){let t=i,e=t._segmentIndexShift??0;for(;t._sourceSegment;)t=t._sourceSegment,e+=t._segmentIndexShift??0;return e-1}function U3(i){return i.data||{}}function V3(i){return i.resolve||{}}function z3(i){return"string"==typeof i.title||null===i.title}function MI(i){return Rs(t=>{const e=i(t);return e?Ni(e).pipe(et(()=>t)):ht(t)})}const Mm=new me("ROUTES");let CI=(()=>{class i{constructor(){this.componentLoaders=new WeakMap,this.childrenLoaders=new WeakMap,this.compiler=Ft(mN)}loadComponent(e){if(this.componentLoaders.get(e))return this.componentLoaders.get(e);if(e._loadedComponent)return ht(e._loadedComponent);this.onLoadStartListener&&this.onLoadStartListener(e);const n=ou(e.loadComponent()).pipe(et(G3),Vi(s=>{this.onLoadEndListener&&this.onLoadEndListener(e),e._loadedComponent=s}),su(()=>{this.componentLoaders.delete(e)})),r=new GB(n,()=>new Re).pipe(eI());return this.componentLoaders.set(e,r),r}loadChildren(e,n){if(this.childrenLoaders.get(n))return this.childrenLoaders.get(n);if(n._loadedRoutes)return ht({routes:n._loadedRoutes,injector:n._loadedInjector});this.onLoadStartListener&&this.onLoadStartListener(n);const s=this.loadModuleFactoryOrRoutes(n.loadChildren).pipe(et(a=>{this.onLoadEndListener&&this.onLoadEndListener(n);let l,c,d=!1;Array.isArray(a)?c=a:(l=a.create(e).injector,c=XB(l.get(Mm,[],Ot.Self|Ot.Optional)));return{routes:c.map(yI),injector:l}}),su(()=>{this.childrenLoaders.delete(n)})),o=new GB(s,()=>new Re).pipe(eI());return this.childrenLoaders.set(n,o),o}loadModuleFactoryOrRoutes(e){return ou(e()).pipe(et(G3),ir(n=>n instanceof D2||Array.isArray(n)?ht(n):Ni(this.compiler.compileModuleAsync(n))))}}return i.\u0275fac=function(e){return new(e||i)},i.\u0275prov=ke({token:i,factory:i.\u0275fac,providedIn:"root"}),i})();function G3(i){return function WX(i){return i&&"object"==typeof i&&"default"in i}(i)?i.default:i}let AM=(()=>{class i{get hasRequestedNavigation(){return 0!==this.navigationId}constructor(){this.currentNavigation=null,this.lastSuccessfulNavigation=null,this.events=new Re,this.configLoader=Ft(CI),this.environmentInjector=Ft(to),this.urlSerializer=Ft(Ty),this.rootContexts=Ft(Fy),this.navigationId=0,this.afterPreactivation=()=>ht(void 0),this.rootComponentType=null,this.configLoader.onLoadEndListener=r=>this.events.next(new kq(r)),this.configLoader.onLoadStartListener=r=>this.events.next(new Rq(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 gt({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:Py,restoredState:null,currentSnapshot:e.routerState.snapshot,targetSnapshot:null,currentRouterState:e.routerState,targetRouterState:null,guards:{canActivateChecks:[],canDeactivateChecks:[]},guardsResult:null}),this.transitions.pipe(gn(n=>0!==n.id),et(n=>({...n,extractedUrl:e.urlHandlingStrategy.extract(n.rawUrl)})),Rs(n=>{let r=!1,s=!1;return ht(n).pipe(Vi(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}}),Rs(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 d="";return this.events.next(new _M(o.id,e.serializeUrl(n.rawUrl),d,0)),e.rawUrlTree=o.rawUrl,o.resolve(null),po}if(e.urlHandlingStrategy.shouldProcessUrl(o.rawUrl))return $3(o.source)&&(e.browserUrlTree=o.extractedUrl),ht(o).pipe(Rs(d=>{const h=this.transitions?.getValue();return this.events.next(new cI(d.id,this.urlSerializer.serialize(d.extractedUrl),d.source,d.restoredState)),h!==this.transitions?.getValue()?po:Promise.resolve(d)}),function IX(i,t,e,n){return Rs(r=>function DX(i,t,e,n,r){return new TX(i,t,e,n,r).apply()}(i,t,e,r.extractedUrl,n).pipe(et(s=>({...r,urlAfterRedirects:s}))))}(this.environmentInjector,this.configLoader,this.urlSerializer,e.config),Vi(d=>{this.currentNavigation={...this.currentNavigation,finalUrl:d.urlAfterRedirects},n.urlAfterRedirects=d.urlAfterRedirects}),function UX(i,t,e,n,r){return ir(s=>function PX(i,t,e,n,r,s,o="emptyOnly"){return new OX(i,t,e,n,r,o,s).recognize().pipe(Rs(a=>null===a?function kX(i){return new In(t=>t.error(i))}(new RX):ht(a)))}(i,t,e,s.urlAfterRedirects,n.serialize(s.urlAfterRedirects),n,r).pipe(et(o=>({...s,targetSnapshot:o}))))}(this.environmentInjector,this.rootComponentType,e.config,this.urlSerializer,e.paramsInheritanceStrategy),Vi(d=>{if(n.targetSnapshot=d.targetSnapshot,"eager"===e.urlUpdateStrategy){if(!d.extras.skipLocationChange){const p=e.urlHandlingStrategy.merge(d.urlAfterRedirects,d.rawUrl);e.setBrowserUrl(p,d)}e.browserUrlTree=d.urlAfterRedirects}const h=new Eq(d.id,this.urlSerializer.serialize(d.extractedUrl),this.urlSerializer.serialize(d.urlAfterRedirects),d.targetSnapshot);this.events.next(h)}));if(l&&e.urlHandlingStrategy.shouldProcessUrl(e.rawUrlTree)){const{id:d,extractedUrl:h,source:p,restoredState:m,extras:g}=o,b=new cI(d,this.urlSerializer.serialize(h),p,m);this.events.next(b);const v=_3(h,this.rootComponentType).snapshot;return ht(n={...o,targetSnapshot:v,urlAfterRedirects:h,extras:{...g,skipLocationChange:!1,replaceUrl:!1}})}{const d="";return this.events.next(new _M(o.id,e.serializeUrl(n.extractedUrl),d,1)),e.rawUrlTree=o.rawUrl,o.resolve(null),po}}),Vi(o=>{const a=new Aq(o.id,this.urlSerializer.serialize(o.extractedUrl),this.urlSerializer.serialize(o.urlAfterRedirects),o.targetSnapshot);this.events.next(a)}),et(o=>n={...o,guards:tX(o.targetSnapshot,o.currentSnapshot,this.rootContexts)}),function hX(i,t){return ir(e=>{const{targetSnapshot:n,currentSnapshot:r,guards:{canActivateChecks:s,canDeactivateChecks:o}}=e;return 0===o.length&&0===s.length?ht({...e,guardsResult:!0}):function fX(i,t,e,n){return Ni(i).pipe(ir(r=>function yX(i,t,e,n,r){const s=t&&t.routeConfig?t.routeConfig.canDeactivate:null;return s&&0!==s.length?ht(s.map(a=>{const l=Ly(t)??r,c=xm(a,l);return ou(function cX(i){return i&&Uy(i.canDeactivate)}(c)?c.canDeactivate(i,t,e,n):l.runInContext(()=>c(i,t,e,n))).pipe(iu())})).pipe(wm()):ht(!0)}(r.component,r.route,e,t,n)),iu(r=>!0!==r,!0))}(o,n,r,i).pipe(ir(a=>a&&function sX(i){return"boolean"==typeof i}(a)?function pX(i,t,e,n){return Ni(t).pipe(ru(r=>Sy(function gX(i,t){return null!==i&&t&&t(new Pq(i)),ht(!0)}(r.route.parent,n),function mX(i,t){return null!==i&&t&&t(new Fq(i)),ht(!0)}(r.route,n),function vX(i,t,e){const n=t[t.length-1],s=t.slice(0,t.length-1).reverse().map(o=>function nX(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=>Ey(()=>ht(o.guards.map(l=>{const c=Ly(o.node)??e,d=xm(l,c);return ou(function lX(i){return i&&Uy(i.canActivateChild)}(d)?d.canActivateChild(n,i):c.runInContext(()=>d(n,i))).pipe(iu())})).pipe(wm())));return ht(s).pipe(wm())}(i,r.path,e),function _X(i,t,e){const n=t.routeConfig?t.routeConfig.canActivate:null;if(!n||0===n.length)return ht(!0);const r=n.map(s=>Ey(()=>{const o=Ly(t)??e,a=xm(s,o);return ou(function aX(i){return i&&Uy(i.canActivate)}(a)?a.canActivate(t,i):o.runInContext(()=>a(t,i))).pipe(iu())}));return ht(r).pipe(wm())}(i,r.route,e))),iu(r=>!0!==r,!0))}(n,s,i,t):ht(a)),et(a=>({...e,guardsResult:a})))})}(this.environmentInjector,o=>this.events.next(o)),Vi(o=>{if(n.guardsResult=o.guardsResult,kh(o.guardsResult))throw x3(0,o.guardsResult);const a=new Dq(o.id,this.urlSerializer.serialize(o.extractedUrl),this.urlSerializer.serialize(o.urlAfterRedirects),o.targetSnapshot,!!o.guardsResult);this.events.next(a)}),gn(o=>!!o.guardsResult||(e.restoreHistory(o),this.cancelNavigationTransition(o,"",3),!1)),MI(o=>{if(o.guards.canActivateChecks.length)return ht(o).pipe(Vi(a=>{const l=new Tq(a.id,this.urlSerializer.serialize(a.extractedUrl),this.urlSerializer.serialize(a.urlAfterRedirects),a.targetSnapshot);this.events.next(l)}),Rs(a=>{let l=!1;return ht(a).pipe(function VX(i,t){return ir(e=>{const{targetSnapshot:n,guards:{canActivateChecks:r}}=e;if(!r.length)return ht(e);let s=0;return Ni(r).pipe(ru(o=>function zX(i,t,e,n){const r=i.routeConfig,s=i._resolve;return void 0!==r?.title&&!z3(r)&&(s[Ay]=r.title),function HX(i,t,e,n){const r=function GX(i){return[...Object.keys(i),...Object.getOwnPropertySymbols(i)]}(i);if(0===r.length)return ht({});const s={};return Ni(r).pipe(ir(o=>function $X(i,t,e,n){const r=Ly(t)??n,s=xm(i,r);return ou(s.resolve?s.resolve(t,e):r.runInContext(()=>s(t,e)))}(i[o],t,e,n).pipe(iu(),Vi(a=>{s[o]=a}))),nI(1),YB(s),Wc(o=>bI(o)?po:pm(o)))}(s,i,t,n).pipe(et(o=>(i._resolvedData=o,i.data=v3(i,e).resolve,r&&z3(r)&&(i.data[Ay]=r.title),null)))}(o.route,n,i,t)),Vi(()=>s++),nI(1),ir(o=>s===r.length?ht(e):po))})}(e.paramsInheritanceStrategy,this.environmentInjector),Vi({next:()=>l=!0,complete:()=>{l||(e.restoreHistory(a),this.cancelNavigationTransition(a,"",2))}}))}),Vi(a=>{const l=new Iq(a.id,this.urlSerializer.serialize(a.extractedUrl),this.urlSerializer.serialize(a.urlAfterRedirects),a.targetSnapshot);this.events.next(l)}))}),MI(o=>{const a=l=>{const c=[];l.routeConfig?.loadComponent&&!l.routeConfig._loadedComponent&&c.push(this.configLoader.loadComponent(l.routeConfig).pipe(Vi(d=>{l.component=d}),et(()=>{})));for(const d of l.children)c.push(...a(d));return c};return nu(a(o.targetSnapshot.root)).pipe(lM(),Oi(1))}),MI(()=>this.afterPreactivation()),et(o=>{const a=function $q(i,t,e){const n=Oy(i,t._root,e?e._root:void 0);return new g3(n,t)}(e.routeReuseStrategy,o.targetSnapshot,o.currentRouterState);return n={...o,targetRouterState:a}}),Vi(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)=>et(n=>(new eX(t,n.targetRouterState,n.currentRouterState,e).activate(i),n)))(this.rootContexts,e.routeReuseStrategy,o=>this.events.next(o)),Oi(1),Vi({next:o=>{r=!0,this.lastSuccessfulNavigation=this.currentNavigation,e.navigated=!0,this.events.next(new Ph(o.id,this.urlSerializer.serialize(o.extractedUrl),this.urlSerializer.serialize(e.currentUrlTree))),e.titleStrategy?.updateTitle(o.targetRouterState.snapshot),o.resolve(!0)},complete:()=>{r=!0}}),su(()=>{r||s||this.cancelNavigationTransition(n,"",1),this.currentNavigation?.id===n.id&&(this.currentNavigation=null)}),Wc(o=>{if(s=!0,C3(o)){M3(o)||(e.navigated=!0,e.restoreHistory(n,!0));const a=new gM(n.id,this.urlSerializer.serialize(n.extractedUrl),o.message,o.cancellationCode);if(this.events.next(a),M3(o)){const l=e.urlHandlingStrategy.merge(o.url,e.rawUrlTree),c={skipLocationChange:n.extras.skipLocationChange,replaceUrl:"eager"===e.urlUpdateStrategy||$3(n.source)};e.scheduleNavigation(l,Py,null,c,{resolve:n.resolve,reject:n.reject,promise:n.promise})}else n.resolve(!1)}else{e.restoreHistory(n,!0);const a=new dI(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 po}))}))}cancelNavigationTransition(e,n,r){const s=new gM(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=ke({token:i,factory:i.\u0275fac,providedIn:"root"}),i})();function $3(i){return i!==Py}let W3=(()=>{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===_n);return n}getResolvedTitleForRoute(e){return e.data[Ay]}}return i.\u0275fac=function(e){return new(e||i)},i.\u0275prov=ke({token:i,factory:function(){return Ft(jX)},providedIn:"root"}),i})(),jX=(()=>{class i extends W3{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)(ee(LB))},i.\u0275prov=ke({token:i,factory:i.\u0275fac,providedIn:"root"}),i})(),YX=(()=>{class i{}return i.\u0275fac=function(e){return new(e||i)},i.\u0275prov=ke({token:i,factory:function(){return Ft(XX)},providedIn:"root"}),i})();class qX{shouldDetach(t){return!1}store(t,e){}shouldAttach(t){return!1}retrieve(t){return null}shouldReuseRoute(t,e){return t.routeConfig===e.routeConfig}}let XX=(()=>{class i extends qX{}return i.\u0275fac=function(){let t;return function(n){return(t||(t=ri(i)))(n||i)}}(),i.\u0275prov=ke({token:i,factory:i.\u0275fac,providedIn:"root"}),i})();const DM=new me("",{providedIn:"root",factory:()=>({})});let ZX=(()=>{class i{}return i.\u0275fac=function(e){return new(e||i)},i.\u0275prov=ke({token:i,factory:function(){return Ft(QX)},providedIn:"root"}),i})(),QX=(()=>{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=ke({token:i,factory:i.\u0275fac,providedIn:"root"}),i})();function JX(i){throw i}function eK(i,t,e){return t.parse("/")}const tK={paths:"exact",fragment:"ignored",matrixParams:"ignored",queryParams:"exact"},nK={paths:"subset",fragment:"ignored",matrixParams:"ignored",queryParams:"subset"};let Yo=(()=>{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=Ft(L6),this.isNgZoneEnabled=!1,this.options=Ft(DM,{optional:!0})||{},this.errorHandler=this.options.errorHandler||JX,this.malformedUriErrorHandler=this.options.malformedUriErrorHandler||eK,this.navigated=!1,this.lastSuccessfulId=-1,this.urlHandlingStrategy=Ft(ZX),this.routeReuseStrategy=Ft(YX),this.urlCreationStrategy=Ft(zq),this.titleStrategy=Ft(W3),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=XB(Ft(Mm,{optional:!0})??[]),this.navigationTransitions=Ft(AM),this.urlSerializer=Ft(Ty),this.location=Ft(_y),this.isNgZoneEnabled=Ft(ft)instanceof ft&&ft.isInAngularZone(),this.resetConfig(this.config),this.currentUrlTree=new au,this.rawUrlTree=this.currentUrlTree,this.browserUrlTree=this.currentUrlTree,this.routerState=_3(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),Py,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(yI),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 d=null;switch(a){case"merge":d={...this.currentUrlTree.queryParams,...s};break;case"preserve":d=this.currentUrlTree.queryParams;break;default:d=s||null}return null!==d&&(d=this.removeEmptyProps(d)),this.urlCreationStrategy.createUrlTree(r,this.routerState,this.currentUrlTree,e,d,c??null)}navigateByUrl(e,n={skipLocationChange:!1}){const r=kh(e)?e:this.parseUrl(e),s=this.urlHandlingStrategy.merge(r,this.rawUrlTree);return this.scheduleNavigation(s,Py,null,n)}navigate(e,n={skipLocationChange:!1}){return function iK(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,d;return o?(a=o.resolve,l=o.reject,c=o.promise):c=new Promise((h,p)=>{a=h,l=p}),d="computed"===this.canceledNavigationResolution?r&&r.\u0275routerPageId?r.\u0275routerPageId:(this.browserPageId??0)+1:0,this.navigationTransitions.handleNavigationRequest({targetPageId:d,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=ke({token:i,factory:i.\u0275fac,providedIn:"root"}),i})();class j3{}let oK=(()=>{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(gn(e=>e instanceof Ph),ru(()=>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=Fw(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 Ni(r).pipe(yd())}preloadConfig(e,n){return this.preloadingStrategy.preload(n,()=>{let r;r=n.loadChildren&&void 0===n.canLoad?this.loader.loadChildren(e,n):ht(null);const s=r.pipe(ir(o=>null===o?ht(void 0):(n._loadedRoutes=o.routes,n._loadedInjector=o.injector,this.processRoutes(o.injector??e,o.routes))));return n.loadComponent&&!n._loadedComponent?Ni([s,this.loader.loadComponent(n)]).pipe(yd()):s})}}return i.\u0275fac=function(e){return new(e||i)(ee(Yo),ee(mN),ee(to),ee(j3),ee(CI))},i.\u0275prov=ke({token:i,factory:i.\u0275fac,providedIn:"root"}),i})();const AI=new me("");let Y3=(()=>{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 cI?(this.store[this.lastId]=this.viewportScroller.getScrollPosition(),this.lastSource=e.navigationTrigger,this.restoredId=e.restoredState?e.restoredState.navigationId:0):e instanceof Ph&&(this.lastId=e.id,this.scheduleScrollEvent(e,this.urlSerializer.parse(e.urlAfterRedirects).fragment))})}consumeScrollEvents(){return this.transitions.events.subscribe(e=>{e instanceof p3&&(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 p3(e,"popstate"===this.lastSource?this.store[this.restoredId]:null,n))})},0)})}ngOnDestroy(){this.routerEventsSubscription?.unsubscribe(),this.scrollEventsSubscription?.unsubscribe()}}return i.\u0275fac=function(e){xo()},i.\u0275prov=ke({token:i,factory:i.\u0275fac}),i})();var qo=(()=>((qo=qo||{})[qo.COMPLETE=0]="COMPLETE",qo[qo.FAILED=1]="FAILED",qo[qo.REDIRECTING=2]="REDIRECTING",qo))();const Cm=!1;function lu(i,t){return{\u0275kind:i,\u0275providers:t}}const DI=new me("",{providedIn:"root",factory:()=>!1});function X3(){const i=Ft($i);return t=>{const e=i.get(dm);if(t!==e.components[0])return;const n=i.get(Yo),r=i.get(K3);1===i.get(TI)&&n.initialNavigation(),i.get(Z3,null,Ot.Optional)?.setUpPreloading(),i.get(AI,null,Ot.Optional)?.init(),n.resetRootComponentType(e.componentTypes[0]),r.closed||(r.next(),r.complete(),r.unsubscribe())}}const K3=new me(Cm?"bootstrap done indicator":"",{factory:()=>new Re}),TI=new me(Cm?"initial navigation":"",{providedIn:"root",factory:()=>1});function uK(){let i=[];return i=Cm?[{provide:Np,multi:!0,useFactory:()=>{const t=Ft(Yo);return()=>t.events.subscribe(e=>{console.group?.(`Router Event: ${e.constructor.name}`),console.log(function Nq(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?.()})}}]:[],lu(1,i)}const Z3=new me(Cm?"router preloader":"");function hK(i){return lu(0,[{provide:Z3,useExisting:oK},{provide:j3,useExisting:i}])}const zy=!1,Q3=new me(zy?"router duplicate forRoot guard":"ROUTER_FORROOT_GUARD"),fK=[_y,{provide:Ty,useClass:iI},Yo,Fy,{provide:bm,useFactory:function q3(i){return i.routerState.root},deps:[Yo]},CI,zy?{provide:DI,useValue:!0}:[]];function pK(){return new MN("Router",Yo)}let J3=(()=>{class i{constructor(e){}static forRoot(e,n){return{ngModule:i,providers:[fK,zy&&n?.enableTracing?uK().\u0275providers:[],{provide:Mm,multi:!0,useValue:e},{provide:Q3,useFactory:vK,deps:[[Yo,new Ss,new xa]]},{provide:DM,useValue:n||{}},n?.useHash?{provide:Ih,useClass:C9}:{provide:Ih,useClass:jN},{provide:AI,useFactory:()=>{const i=Ft(UY),t=Ft(ft),e=Ft(DM),n=Ft(AM),r=Ft(Ty);return e.scrollOffset&&i.setOffset(e.scrollOffset),new Y3(r,n,i,t,e)}},n?.preloadingStrategy?hK(n.preloadingStrategy).\u0275providers:[],{provide:MN,multi:!0,useFactory:pK},n?.initialNavigation?yK(n):[],[{provide:eU,useFactory:X3},{provide:wN,multi:!0,useExisting:eU}]]}}static forChild(e){return{ngModule:i,providers:[{provide:Mm,multi:!0,useValue:e}]}}}return i.\u0275fac=function(e){return new(e||i)(ee(Q3,8))},i.\u0275mod=nn({type:i}),i.\u0275inj=Kt({imports:[_I]}),i})();function vK(i){if(zy&&i)throw new pe(4007,"The Router was provided more than once. This can happen if 'forRoot' is used outside of the root injector. Lazy loaded modules should use RouterModule.forChild() instead.");return"guarded"}function yK(i){return["disabled"===i.initialNavigation?lu(3,[{provide:Uw,multi:!0,useFactory:()=>{const t=Ft(Yo);return()=>{t.setUpLocationChangeListener()}}},{provide:TI,useValue:2}]).\u0275providers:[],"enabledBlocking"===i.initialNavigation?lu(2,[{provide:TI,useValue:0},{provide:Uw,multi:!0,deps:[$i],useFactory:t=>{const e=t.get(w9,Promise.resolve());return()=>e.then(()=>new Promise(n=>{const r=t.get(Yo),s=t.get(K3);(function aK(i,t){i.events.pipe(gn(e=>e instanceof Ph||e instanceof gM||e instanceof dI||e instanceof _M),et(e=>e instanceof Ph||e instanceof _M?qo.COMPLETE:e instanceof gM&&(0===e.code||1===e.code)?qo.REDIRECTING:qo.FAILED),gn(e=>e!==qo.REDIRECTING),Oi(1)).subscribe(()=>{t()})})(r,()=>{n(!0)}),t.get(AM).afterPreactivation=()=>(n(!0),s.closed?ht(void 0):s),r.initialNavigation()}))}}]).\u0275providers:[]]}const eU=new me(zy?"Router Initializer":""),xK=[];let wK=(()=>{class i{}return i.\u0275fac=function(e){return new(e||i)},i.\u0275mod=nn({type:i}),i.\u0275inj=Kt({imports:[J3.forRoot(xK),J3]}),i})();function tU(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 tt(i){return function(){var t=this,e=arguments;return new Promise(function(n,r){var s=i.apply(t,e);function o(l){tU(s,n,r,o,a,"next",l)}function a(l){tU(s,n,r,o,a,"throw",l)}o(void 0)})}}function Jt(i){return null!=i&&"false"!=`${i}`}function ks(i,t=0){return function MK(i){return!isNaN(parseFloat(i))&&!isNaN(Number(i))}(i)?Number(i):t}function TM(i){return Array.isArray(i)?i:[i]}function gr(i){return null==i?"":"string"==typeof i?i:`${i}px`}function Yc(i){return i instanceof mt?i.nativeElement:i}const CK=["addListener","removeListener"],SK=["addEventListener","removeEventListener"],EK=["on","off"];function Ta(i,t,e,n){if(cn(e)&&(n=e,e=void 0),n)return Ta(i,t,e).pipe(JT(n));const[r,s]=function TK(i){return cn(i.addEventListener)&&cn(i.removeEventListener)}(i)?SK.map(o=>a=>i[o](t,a,e)):function AK(i){return cn(i.addListener)&&cn(i.removeListener)}(i)?CK.map(nU(i,t)):function DK(i){return cn(i.on)&&cn(i.off)}(i)?EK.map(nU(i,t)):[];if(!r&&i_(i))return ir(o=>Ta(o,t,e))(wr(i));if(!r)throw new TypeError("Invalid event target");return new In(o=>{const a=(...l)=>o.next(1s(a)})}function nU(i,t){return e=>n=>i[e](t,n)}class IK extends Zt{constructor(t,e){super()}schedule(t,e=0){return this}}const IM={setInterval(i,t,...e){const{delegate:n}=IM;return n?.setInterval?n.setInterval(i,t,...e):setInterval(i,t,...e)},clearInterval(i){const{delegate:t}=IM;return(t?.clearInterval||clearInterval)(i)},delegate:void 0};class II extends IK{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 IM.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&&IM.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,Kr(n,this),null!=t&&(this.id=this.recycleAsyncId(e,t,null)),this.delay=null,super.unsubscribe()}}}const Hy={schedule(i){let t=requestAnimationFrame,e=cancelAnimationFrame;const{delegate:n}=Hy;n&&(t=n.requestAnimationFrame,e=n.cancelAnimationFrame);const r=t(s=>{e=void 0,i(s)});return new Zt(()=>e?.(r))},requestAnimationFrame(...i){const{delegate:t}=Hy;return(t?.requestAnimationFrame||requestAnimationFrame)(...i)},cancelAnimationFrame(...i){const{delegate:t}=Hy;return(t?.cancelAnimationFrame||cancelAnimationFrame)(...i)},delegate:void 0},iU={now:()=>(iU.delegate||Date).now(),delegate:void 0};class Gy{constructor(t,e=Gy.now){this.schedulerActionCtor=t,this.now=e}schedule(t,e=0,n){return new this.schedulerActionCtor(this,t).schedule(n,e)}}Gy.now=iU.now;class RI extends Gy{constructor(t,e=Gy.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 PK=new class kK extends RI{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 RK extends II{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=Hy.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&&(Hy.cancelAnimationFrame(e),t._scheduled=void 0)}});let kI,OK=1;const RM={};function rU(i){return i in RM&&(delete RM[i],!0)}const FK={setImmediate(i){const t=OK++;return RM[t]=!0,kI||(kI=Promise.resolve()),kI.then(()=>rU(t)&&i()),t},clearImmediate(i){rU(i)}},{setImmediate:LK,clearImmediate:NK}=FK,kM={setImmediate(...i){const{delegate:t}=kM;return(t?.setImmediate||LK)(...i)},clearImmediate(i){const{delegate:t}=kM;return(t?.clearImmediate||NK)(i)},delegate:void 0},PI=new class UK extends RI{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 BK extends II{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=kM.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&&(kM.clearImmediate(e),t._scheduled===e&&(t._scheduled=void 0))}}),$y=new RI(II),VK=$y;function OI(i=0,t,e=VK){let n=-1;return null!=t&&(Gu(t)?e=t:n=t),new In(r=>{let s=function HK(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 PM(i,t=$y){return function zK(i){return ti((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(Yn(e,c=>{n=!0,r=c,s||wr(i(c)).subscribe(s=Yn(e,a,l))},()=>{o=!0,(!n||!s||s.closed)&&e.complete()}))})}(()=>OI(i,t))}function He(i){return ti((t,e)=>{wr(i).subscribe(Yn(e,()=>e.complete(),ms)),!e.closed&&t.subscribe(e)})}let FI;try{FI=typeof Intl<"u"&&Intl.v8BreakIterator}catch{FI=!1}let Sm,zi=(()=>{class i{constructor(e){this._platformId=e,this.isBrowser=this._platformId?function BY(i){return i===hB}(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&&!FI)&&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)(ee(fT))},i.\u0275prov=ke({token:i,factory:i.\u0275fac,providedIn:"root"}),i})();const sU=["color","button","checkbox","date","datetime-local","email","file","hidden","image","month","number","password","radio","range","reset","search","submit","tel","text","time","url","week"];function oU(){if(Sm)return Sm;if("object"!=typeof document||!document)return Sm=new Set(sU),Sm;let i=document.createElement("input");return Sm=new Set(sU.filter(t=>(i.setAttribute("type",t),i.type===t))),Sm}let Wy,OM,Fh,LI;function Oh(i){return function GK(){if(null==Wy&&typeof window<"u")try{window.addEventListener("test",null,Object.defineProperty({},"passive",{get:()=>Wy=!0}))}finally{Wy=Wy||!1}return Wy}()?i:!!i.capture}function aU(){if(null==Fh){if("object"!=typeof document||!document||"function"!=typeof Element||!Element)return Fh=!1,Fh;if("scrollBehavior"in document.documentElement.style)Fh=!0;else{const i=Element.prototype.scrollTo;Fh=!!i&&!/\{\s*\[native code\]\s*\}/.test(i.toString())}}return Fh}function jy(){if("object"!=typeof document||!document)return 0;if(null==OM){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),OM=0,0===i.scrollLeft&&(i.scrollLeft=1,OM=0===i.scrollLeft?1:2),i.remove()}return OM}function FM(){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 cu(i){return i.composedPath?i.composedPath()[0]:i.target}function NI(){return typeof __karma__<"u"&&!!__karma__||typeof jasmine<"u"&&!!jasmine||typeof jest<"u"&&!!jest||typeof Mocha<"u"&&!!Mocha}const jK=new me("cdk-dir-doc",{providedIn:"root",factory:function YK(){return Ft(jt)}}),qK=/^(ar|ckb|dv|he|iw|fa|nqo|ps|sd|ug|ur|yi|.*[-_](Adlm|Arab|Hebr|Nkoo|Rohg|Thaa))(?!.*[-_](Latn|Cyrl)($|-|_))($|-|_)/i;let Ia=(()=>{class i{constructor(e){this.value="ltr",this.change=new We,e&&(this.value=function XK(i){const t=i?.toLowerCase()||"";return"auto"===t&&typeof navigator<"u"&&navigator?.language?qK.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)(ee(jK,8))},i.\u0275prov=ke({token:i,factory:i.\u0275fac,providedIn:"root"}),i})(),Yy=(()=>{class i{}return i.\u0275fac=function(e){return new(e||i)},i.\u0275mod=nn({type:i}),i.\u0275inj=Kt({}),i})();const KK=["contentWrapper"],ZK=["*"],QK=new me("VIRTUAL_SCROLL_STRATEGY");let qy=(()=>{class i{constructor(e,n,r){this._ngZone=e,this._platform=n,this._scrolled=new Re,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 In(n=>{this._globalSubscription||this._addGlobalListener();const r=e>0?this._scrolled.pipe(PM(e)).subscribe(n):this._scrolled.subscribe(n);return this._scrolledCount++,()=>{r.unsubscribe(),this._scrolledCount--,this._scrolledCount||this._removeGlobalListener()}}):ht()}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(gn(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=Yc(n),s=e.getElementRef().nativeElement;do{if(r==s)return!0}while(r=r.parentElement);return!1}_addGlobalListener(){this._globalSubscription=this._ngZone.runOutsideAngular(()=>Ta(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)(ee(ft),ee(zi),ee(jt,8))},i.\u0275prov=ke({token:i,factory:i.\u0275fac,providedIn:"root"}),i})(),lU=(()=>{class i{constructor(e,n,r,s){this.elementRef=e,this.scrollDispatcher=n,this.ngZone=r,this.dir=s,this._destroyed=new Re,this._elementScrolled=new In(o=>this.ngZone.runOutsideAngular(()=>Ta(this.elementRef.nativeElement,"scroll").pipe(He(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!=jy()?(null!=e.left&&(e.right=n.scrollWidth-n.clientWidth-e.left),2==jy()?e.left=e.right:1==jy()&&(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;aU()?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==jy()?e==n?s.scrollWidth-s.clientWidth-s.scrollLeft:s.scrollLeft:o&&1==jy()?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)(E(mt),E(qy),E(ft),E(Ia,8))},i.\u0275dir=ve({type:i,selectors:[["","cdk-scrollable",""],["","cdkScrollable",""]],standalone:!0}),i})(),LM=(()=>{class i{constructor(e,n,r){this._platform=e,this._change=new Re,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(PM(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)(ee(zi),ee(ft),ee(jt,8))},i.\u0275prov=ke({token:i,factory:i.\u0275fac,providedIn:"root"}),i})();const cU=new me("VIRTUAL_SCROLLABLE");let tZ=(()=>{class i extends lU{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)(E(mt),E(qy),E(ft),E(Ia,8))},i.\u0275dir=ve({type:i,features:[lt]}),i})();const iZ=typeof requestAnimationFrame<"u"?PK:PI;let rZ=(()=>{class i extends tZ{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=Ft(zi),this._detachedSubject=new Re,this._renderedRangeSubject=new Re,this._orientation="vertical",this._appendOnly=!1,this.scrolledIndexChange=new In(d=>this._scrollStrategy.scrolledIndexChange.subscribe(h=>Promise.resolve().then(()=>this.ngZone.run(()=>d.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=Zt.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(Ao(null),PM(0,iZ)).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(He(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 nZ(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)(E(mt),E(Zn),E(ft),E(QK,8),E(Ia,8),E(qy),E(LM),E(cU,8))},i.\u0275cmp=ot({type:i,selectors:[["cdk-virtual-scroll-viewport"]],viewQuery:function(e,n){if(1&e&&Wn(KK,7),2&e){let r;Et(r=At())&&(n._contentWrapper=r.first)}},hostAttrs:[1,"cdk-virtual-scroll-viewport"],hostVars:4,hostBindings:function(e,n){2&e&&un("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:[Dn([{provide:lU,useFactory:(t,e)=>t||e,deps:[[new Ss,new vo(cU)],i]}]),lt,Z1],ngContentSelectors:ZK,decls:4,vars:4,consts:[[1,"cdk-virtual-scroll-content-wrapper"],["contentWrapper",""],[1,"cdk-virtual-scroll-spacer"]],template:function(e,n){1&e&&(sr(),W(0,"div",0,1),Wt(2),j(),De(3,"div",2)),2&e&&(G(3),jo("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})(),Xy=(()=>{class i{}return i.\u0275fac=function(e){return new(e||i)},i.\u0275mod=nn({type:i}),i.\u0275inj=Kt({}),i})(),dU=(()=>{class i{}return i.\u0275fac=function(e){return new(e||i)},i.\u0275mod=nn({type:i}),i.\u0275inj=Kt({imports:[Yy,Xy,rZ,Yy,Xy]}),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 Lh 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 sZ extends BI{constructor(t){super(),this.element=t instanceof mt?t.nativeElement:t}}class NM{constructor(){this._isDisposed=!1,this.attachDomPortal=null}hasAttached(){return!!this._attachedPortal}attach(t){return t instanceof Lh?(this._attachedPortal=t,this.attachComponentPortal(t)):t instanceof Em?(this._attachedPortal=t,this.attachTemplatePortal(t)):this.attachDomPortal&&t instanceof sZ?(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 oZ extends NM{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||$i.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 NM{constructor(e,n,r){super(),this._componentFactoryResolver=e,this._viewContainerRef=n,this._isInitialized=!1,this.attached=new We,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)(E(Hl),E(Wr),E(jt))},i.\u0275dir=ve({type:i,selectors:[["","cdkPortalOutlet",""]],inputs:{portal:["cdkPortalOutlet","portal"]},outputs:{attached:"attached"},exportAs:["cdkPortalOutlet"],features:[lt]}),i})(),Nh=(()=>{class i{}return i.\u0275fac=function(e){return new(e||i)},i.\u0275mod=nn({type:i}),i.\u0275inj=Kt({}),i})();function Xo(i,...t){return t.length?t.some(e=>i[e]):i.altKey||i.shiftKey||i.ctrlKey||i.metaKey}const uU=aU();class bZ{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=gr(-this._previousScrollPosition.left),t.style.top=gr(-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"),uU&&(n.scrollBehavior=r.scrollBehavior="auto"),window.scroll(this._previousScrollPosition.left,this._previousScrollPosition.top),uU&&(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 xZ{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(gn(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 hU{enable(){}disable(){}attach(){}}function VI(i,t){return t.some(e=>i.bottome.bottom||i.righte.right)}function fU(i,t){return t.some(e=>i.tope.bottom||i.lefte.right)}class wZ{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();VI(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 MZ=(()=>{class i{constructor(e,n,r,s){this._scrollDispatcher=e,this._viewportRuler=n,this._ngZone=r,this.noop=()=>new hU,this.close=o=>new xZ(this._scrollDispatcher,this._ngZone,this._viewportRuler,o),this.block=()=>new bZ(this._viewportRuler,this._document),this.reposition=o=>new wZ(this._scrollDispatcher,this._viewportRuler,this._ngZone,o),this._document=s}}return i.\u0275fac=function(e){return new(e||i)(ee(qy),ee(LM),ee(ft),ee(jt))},i.\u0275prov=ke({token:i,factory:i.\u0275fac,providedIn:"root"}),i})();class km{constructor(t){if(this.scrollStrategy=new hU,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 CZ{constructor(t,e){this.connectionPair=t,this.scrollableViewProperties=e}}let pU=(()=>{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)(ee(jt))},i.\u0275prov=ke({token:i,factory:i.\u0275fac,providedIn:"root"}),i})(),SZ=(()=>{class i extends pU{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)(ee(jt),ee(ft,8))},i.\u0275prov=ke({token:i,factory:i.\u0275fac,providedIn:"root"}),i})(),EZ=(()=>{class i extends pU{constructor(e,n,r){super(e),this._platform=n,this._ngZone=r,this._cursorStyleIsSet=!1,this._pointerDownListener=s=>{this._pointerDownEventTarget=cu(s)},this._clickListener=s=>{const o=cu(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 d=l[c];if(d._outsidePointerEvents.observers.length<1||!d.hasAttached())continue;if(d.overlayElement.contains(o)||d.overlayElement.contains(a))break;const h=d._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)(ee(jt),ee(zi),ee(ft,8))},i.\u0275prov=ke({token:i,factory:i.\u0275fac,providedIn:"root"}),i})(),VM=(()=>{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||NI()){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 Re,this._outsidePointerEvents=new Re,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(Oi(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=gr(this._config.width),t.height=gr(this._config.height),t.minWidth=gr(this._config.minWidth),t.minHeight=gr(this._config.minHeight),t.maxWidth=gr(this._config.maxWidth),t.maxHeight=gr(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=TM(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(He(Mr(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 mU="cdk-overlay-connected-position-bounding-box",AZ=/([A-Za-z%]+)$/;class DZ{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 Re,this._resizeSubscription=Zt.EMPTY,this._offsetX=0,this._offsetY=0,this._appliedPanelClasses=[],this.positionChanges=this._positionChanges,this.setOrigin(t)}attach(t){this._validatePositions(),t.hostElement.classList.add(mU),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),d=this._getOverlayFit(c,e,n,a);if(d.isCompletelyWithinViewport)return this._isPushed=!1,void this._applyPosition(a,l);this._canFitWithFlexibleDimensions(d,c,n)?s.push({position:a,origin:l,overlayRect:e,boundingBoxRect:this._calculateBoundingBoxRect(l,a)}):(!o||o.overlayFit.visibleAreal&&(l=d,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&&Bh(this._boundingBox.style,{top:"",left:"",right:"",bottom:"",height:"",width:"",alignItems:"",justifyContent:""}),this._pane&&this._resetOverlayElementStyles(),this._overlayRef&&this._overlayRef.hostElement.classList.remove(mU),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=_U(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=gU(this._overlayRef.getConfig().minHeight),a=gU(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=_U(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 d=0,h=0;return d=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,d=t.x-this._viewportMargin;else if("start"===e.overlayX&&!r||"end"===e.overlayX&&r)h=t.x,d=n.right-t.x;else{const m=Math.min(n.right-t.x+n.left,t.x),g=this._lastBoundingBoxSize.width;d=2*m,h=t.x-m,d>g&&!this._isInitialRender&&!this._growAfterOpen&&(h=t.x-g/2)}return{top:o,left:h,bottom:a,right:p,width:d,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=gr(n.height),r.top=gr(n.top),r.bottom=gr(n.bottom),r.width=gr(n.width),r.left=gr(n.left),r.right=gr(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=gr(s)),o&&(r.maxWidth=gr(o))}this._lastBoundingBoxSize=n,Bh(this._boundingBox.style,r)}_resetBoundingBoxStyles(){Bh(this._boundingBox.style,{top:"0",left:"0",right:"0",bottom:"0",height:"",width:"",alignItems:"",justifyContent:""})}_resetOverlayElementStyles(){Bh(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 d=this._viewportRuler.getViewportScrollPosition();Bh(n,this._getExactOverlayY(e,t,d)),Bh(n,this._getExactOverlayX(e,t,d))}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=gr(o.maxHeight):s&&(n.maxHeight="")),o.maxWidth&&(r?n.maxWidth=gr(o.maxWidth):s&&(n.maxWidth="")),Bh(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=gr(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=gr(s.x),r}_getScrollVisibility(){const t=this._getOriginRect(),e=this._pane.getBoundingClientRect(),n=this._scrollables.map(r=>r.getElementRef().nativeElement.getBoundingClientRect());return{isOriginClipped:fU(t,n),isOriginOutsideView:VI(t,n),isOverlayClipped:fU(e,n),isOverlayOutsideView:VI(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&&TM(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 mt)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 Bh(i,t){for(let e in t)t.hasOwnProperty(e)&&(i[e]=t[e]);return i}function gU(i){if("number"!=typeof i&&null!=i){const[t,e]=i.split(AZ);return e&&"px"!==e?null:parseFloat(t)}return i||null}function _U(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 vU="cdk-global-overlay-wrapper";class yU{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(vU),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),d=this._xPosition,h=this._xOffset,p="rtl"===this._overlayRef.getConfig().direction;let m="",g="",b="";l?b="flex-start":"center"===d?(b="center",p?g=h:m=h):p?"left"===d||"end"===d?(b="flex-end",m=h):("right"===d||"start"===d)&&(b="flex-start",g=h):"left"===d||"start"===d?(b="flex-start",m=h):("right"===d||"end"===d)&&(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(vU),n.justifyContent=n.alignItems=t.marginTop=t.marginBottom=t.marginLeft=t.marginRight=t.position="",this._overlayRef=null,this._isDisposed=!0}}let TZ=(()=>{class i{constructor(e,n,r,s){this._viewportRuler=e,this._document=n,this._platform=r,this._overlayContainer=s}global(){return new yU}flexibleConnectedTo(e){return new DZ(e,this._viewportRuler,this._document,this._platform,this._overlayContainer)}}return i.\u0275fac=function(e){return new(e||i)(ee(LM),ee(jt),ee(zi),ee(VM))},i.\u0275prov=ke({token:i,factory:i.\u0275fac,providedIn:"root"}),i})(),IZ=0,as=(()=>{class i{constructor(e,n,r,s,o,a,l,c,d,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=d,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 Zy(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-"+IZ++,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(dm)),new oZ(e,this._componentFactoryResolver,this._appRef,this._injector,this._document)}}return i.\u0275fac=function(e){return new(e||i)(ee(MZ),ee(VM),ee(Hl),ee(TZ),ee(SZ),ee($i),ee(ft),ee(jt),ee(Ia),ee(_y),ee(EZ),ee(Rr,8))},i.\u0275prov=ke({token:i,factory:i.\u0275fac,providedIn:"root"}),i})();const RZ=[{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"}],bU=new me("cdk-connected-overlay-scroll-strategy");let zI=(()=>{class i{constructor(e){this.elementRef=e}}return i.\u0275fac=function(e){return new(e||i)(E(mt))},i.\u0275dir=ve({type:i,selectors:[["","cdk-overlay-origin",""],["","overlay-origin",""],["","cdkOverlayOrigin",""]],exportAs:["cdkOverlayOrigin"],standalone:!0}),i})(),xU=(()=>{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=Zt.EMPTY,this._attachSubscription=Zt.EMPTY,this._detachSubscription=Zt.EMPTY,this._positionSubscription=Zt.EMPTY,this.viewportMargin=0,this.open=!1,this.disableClose=!1,this.backdropClick=new We,this.positionChange=new We,this.attach=new We,this.detach=new We,this.overlayKeydown=new We,this.overlayOutsideClick=new We,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=RZ);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&&!Xo(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 zI?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(jB(()=>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)(E(as),E(Mo),E(Wr),E(bU),E(Ia,8))},i.\u0275dir=ve({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:[bi]}),i})();const PZ={provide:bU,deps:[as],useFactory:function kZ(i){return()=>i.scrollStrategies.reposition()}};let Pm=(()=>{class i{}return i.\u0275fac=function(e){return new(e||i)},i.\u0275mod=nn({type:i}),i.\u0275inj=Kt({providers:[as,PZ],imports:[Yy,Nh,dU,dU]}),i})();function ml(i,t=$y){return ti((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,d=t.now();if(d{s=c,o=t.now(),r||(r=t.schedule(l,i),n.add(r))},()=>{a(),n.complete()},void 0,()=>{s=r=null}))})}function wU(i){return gn((t,e)=>i<=e)}function Zl(i,t=$a){return i=i??OZ,ti((e,n)=>{let r,s=!0;e.subscribe(Yn(n,o=>{const a=t(o);(s||!i(r,a))&&(s=!1,r=a,n.next(o))}))})}function OZ(i,t){return i===t}let MU=(()=>{class i{create(e){return typeof MutationObserver>"u"?null:new MutationObserver(e)}}return i.\u0275fac=function(e){return new(e||i)},i.\u0275prov=ke({token:i,factory:i.\u0275fac,providedIn:"root"}),i})(),FZ=(()=>{class i{constructor(e){this._mutationObserverFactory=e,this._observedElements=new Map}ngOnDestroy(){this._observedElements.forEach((e,n)=>this._cleanupObserver(n))}observe(e){const n=Yc(e);return new In(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 Re,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)(ee(MU))},i.\u0275prov=ke({token:i,factory:i.\u0275fac,providedIn:"root"}),i})(),CU=(()=>{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=ks(e),this._subscribe()}constructor(e,n,r){this._contentObserver=e,this._elementRef=n,this._ngZone=r,this.event=new We,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(ml(this.debounce)):e).subscribe(this.event)})}_unsubscribe(){this._currentSubscription?.unsubscribe()}}return i.\u0275fac=function(e){return new(e||i)(E(FZ),E(mt),E(ft))},i.\u0275dir=ve({type:i,selectors:[["","cdkObserveContent",""]],inputs:{disabled:["cdkObserveContentDisabled","disabled"],debounce:"debounce"},outputs:{event:"cdkObserveContent"},exportAs:["cdkObserveContent"]}),i})(),HI=(()=>{class i{}return i.\u0275fac=function(e){return new(e||i)},i.\u0275mod=nn({type:i}),i.\u0275inj=Kt({providers:[MU]}),i})();const SU=new Set;let Om,LZ=(()=>{class i{constructor(e){this._platform=e,this._matchMedia=this._platform.isBrowser&&window.matchMedia?window.matchMedia.bind(window):BZ}matchMedia(e){return(this._platform.WEBKIT||this._platform.BLINK)&&function NZ(i){if(!SU.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),SU.add(i))}catch(t){console.error(t)}}(e),this._matchMedia(e)}}return i.\u0275fac=function(e){return new(e||i)(ee(zi))},i.\u0275prov=ke({token:i,factory:i.\u0275fac,providedIn:"root"}),i})();function BZ(i){return{matches:"all"===i||""===i,media:i,addListener:()=>{},removeListener:()=>{}}}let GI=(()=>{class i{constructor(e,n){this._mediaMatcher=e,this._zone=n,this._queries=new Map,this._destroySubject=new Re}ngOnDestroy(){this._destroySubject.next(),this._destroySubject.complete()}isMatched(e){return EU(TM(e)).some(r=>this._registerQuery(r).mql.matches)}observe(e){let s=nu(EU(TM(e)).map(o=>this._registerQuery(o).observable));return s=Sy(s.pipe(Oi(1)),s.pipe(wU(1),ml(0))),s.pipe(et(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 In(o=>{const a=l=>this._zone.run(()=>o.next(l));return n.addListener(a),()=>{n.removeListener(a)}}).pipe(Ao(n),et(({matches:o})=>({query:e,matches:o})),He(this._destroySubject)),mql:n};return this._queries.set(e,s),s}}return i.\u0275fac=function(e){return new(e||i)(ee(LZ),ee(ft))},i.\u0275prov=ke({token:i,factory:i.\u0275fac,providedIn:"root"}),i})();function EU(i){return i.map(t=>t.split(",")).reduce((t,e)=>t.concat(e)).map(t=>t.trim())}function zM(i,t){return(i.getAttribute(t)||"").match(/\S+/g)||[]}const DU="cdk-describedby-message",HM="cdk-describedby-host";let $I=0,HZ=(()=>{class i{constructor(e,n){this._platform=n,this._messageRegistry=new Map,this._messagesContainer=null,this._id=""+$I++,this._document=e,this._id=Ft(cm)+"-"+$I++}describe(e,n,r){if(!this._canBeDescribed(e,n))return;const s=WI(n,r);"string"!=typeof n?(TU(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=WI(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(`[${HM}="${this._id}"]`);for(let n=0;n0!=r.indexOf(DU));e.setAttribute("aria-describedby",n.join(" "))}_addMessageReference(e,n){const r=this._messageRegistry.get(n);(function VZ(i,t,e){const n=zM(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(HM,this._id),r.referenceCount++}_removeMessageReference(e,n){const r=this._messageRegistry.get(n);r.referenceCount--,function zZ(i,t,e){const r=zM(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(HM)}_isElementDescribedByMessage(e,n){const r=zM(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)(ee(jt),ee(zi))},i.\u0275prov=ke({token:i,factory:i.\u0275fac,providedIn:"root"}),i})();function WI(i,t){return"string"==typeof i?`${t||""}/${i}`:i}function TU(i,t){i.id||(i.id=`${DU}-${t}-${$I++}`)}class IU{constructor(t){this._items=t,this._activeItemIndex=-1,this._activeItem=null,this._wrap=!1,this._letterKeyStream=new Re,this._typeaheadSubscription=Zt.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 Re,this.change=new Re,t instanceof om&&(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(Vi(e=>this._pressedLetters.push(e)),ml(t),gn(()=>this._pressedLetters.length>0),et(()=>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 om?this._items.toArray():this._items}}class GZ extends IU{setActiveItem(t){this.activeItem&&this.activeItem.setInactiveStyles(),super.setActiveItem(t),this.activeItem&&this.activeItem.setActiveStyles()}}class RU extends IU{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 GM=(()=>{class i{constructor(e){this._platform=e}isDisabled(e){return e.hasAttribute("disabled")}isVisible(e){return function WZ(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 $Z(i){try{return i.frameElement}catch{return null}}(function JZ(i){return i.ownerDocument&&i.ownerDocument.defaultView||window}(e));if(n&&(-1===PU(n)||!this.isVisible(n)))return!1;let r=e.nodeName.toLowerCase(),s=PU(e);return e.hasAttribute("contenteditable")?-1!==s:!("iframe"===r||"object"===r||this._platform.WEBKIT&&this._platform.IOS&&!function ZZ(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 QZ(i){return!function YZ(i){return function XZ(i){return"input"==i.nodeName.toLowerCase()}(i)&&"hidden"==i.type}(i)&&(function jZ(i){let t=i.nodeName.toLowerCase();return"input"===t||"select"===t||"button"===t||"textarea"===t}(i)||function qZ(i){return function KZ(i){return"a"==i.nodeName.toLowerCase()}(i)&&i.hasAttribute("href")}(i)||i.hasAttribute("contenteditable")||kU(i))}(e)&&!this.isDisabled(e)&&(n?.ignoreVisibility||this.isVisible(e))}}return i.\u0275fac=function(e){return new(e||i)(ee(zi))},i.\u0275prov=ke({token:i,factory:i.\u0275fac,providedIn:"root"}),i})();function kU(i){if(!i.hasAttribute("tabindex")||void 0===i.tabIndex)return!1;let t=i.getAttribute("tabindex");return!(!t||isNaN(parseInt(t,10)))}function PU(i){if(!kU(i))return null;const t=parseInt(i.getAttribute("tabindex")||"",10);return isNaN(t)?-1:t}class eQ{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(Oi(1)).subscribe(t)}}let jI=(()=>{class i{constructor(e,n,r){this._checker=e,this._ngZone=n,this._document=r}create(e,n=!1){return new eQ(e,this._checker,this._ngZone,this._document,n)}}return i.\u0275fac=function(e){return new(e||i)(ee(GM),ee(ft),ee(jt))},i.\u0275prov=ke({token:i,factory:i.\u0275fac,providedIn:"root"}),i})();function YI(i){return 0===i.buttons||0===i.offsetX&&0===i.offsetY}function qI(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 tQ=new me("cdk-input-modality-detector-options"),nQ={ignoreKeys:[18,17,224,91,16]},Fm=Oh({passive:!0,capture:!0});let iQ=(()=>{class i{get mostRecentModality(){return this._modality.value}constructor(e,n,r,s){this._platform=e,this._mostRecentTarget=null,this._modality=new gt(null),this._lastTouchMs=0,this._onKeydown=o=>{this._options?.ignoreKeys?.some(a=>a===o.keyCode)||(this._modality.next("keyboard"),this._mostRecentTarget=cu(o))},this._onMousedown=o=>{Date.now()-this._lastTouchMs<650||(this._modality.next(YI(o)?"keyboard":"mouse"),this._mostRecentTarget=cu(o))},this._onTouchstart=o=>{qI(o)?this._modality.next("keyboard"):(this._lastTouchMs=Date.now(),this._modality.next("touch"),this._mostRecentTarget=cu(o))},this._options={...nQ,...s},this.modalityDetected=this._modality.pipe(wU(1)),this.modalityChanged=this.modalityDetected.pipe(Zl()),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)(ee(zi),ee(ft),ee(jt),ee(tQ,8))},i.\u0275prov=ke({token:i,factory:i.\u0275fac,providedIn:"root"}),i})();const rQ=new me("liveAnnouncerElement",{providedIn:"root",factory:function sQ(){return null}}),oQ=new me("LIVE_ANNOUNCER_DEFAULT_OPTIONS");let aQ=0,XI=(()=>{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 Re,this._rootNodeFocusAndBlurListener=a=>{for(let c=cu(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=Yc(e);if(!this._platform.isBrowser||1!==r.nodeType)return ht(null);const s=function WK(i){if(function $K(){if(null==LI){const i=typeof document<"u"?document.head:null;LI=!(!i||!i.createShadowRoot&&!i.attachShadow)}return LI}()){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 Re,rootNode:s};return this._elementInfo.set(r,a),this._registerGlobalListeners(a),a.subject}stopMonitoring(e){const n=Yc(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=Yc(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=cu(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,$M),n.addEventListener("blur",this._rootNodeFocusAndBlurListener,$M)}),this._rootNodeFocusListenerCount.set(n,r+1),1==++this._monitoredElementCount&&(this._ngZone.runOutsideAngular(()=>{this._getWindow().addEventListener("focus",this._windowFocusListener)}),this._inputModalityDetector.modalityDetected.pipe(He(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,$M),n.removeEventListener("blur",this._rootNodeFocusAndBlurListener,$M),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=Ft(GI).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,FU,LU),this._hasCheckedHighContrastMode=!0;const n=this.getHighContrastMode();1===n?e.add(KI,FU):2===n&&e.add(KI,LU)}}}return i.\u0275fac=function(e){return new(e||i)(ee(zi),ee(jt))},i.\u0275prov=ke({token:i,factory:i.\u0275fac,providedIn:"root"}),i})(),BU=(()=>{class i{constructor(e){e._applyBodyHighContrastModeCssClasses()}}return i.\u0275fac=function(e){return new(e||i)(ee(NU))},i.\u0275mod=nn({type:i}),i.\u0275inj=Kt({imports:[HI]}),i})();function cQ(i,t){}class WM{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 UU=(()=>{class i extends NM{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=d=>{this._portalOutlet.hasAttached();const h=this._portalOutlet.attachDomPortal(d);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=FM(),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=FM();return e===n||e.contains(n)}_initializeFocusTrap(){this._focusTrap=this._focusTrapFactory.create(this._elementRef.nativeElement),this._document&&(this._elementFocusedBeforeDialogWasOpened=FM())}_handleBackdropClicks(){this._overlayRef.backdropClick().subscribe(()=>{this._config.disableClose&&this._recaptureFocus()})}}return i.\u0275fac=function(e){return new(e||i)(E(mt),E(jI),E(jt,8),E(WM),E(GM),E(ft),E(Zy),E(qc))},i.\u0275cmp=ot({type:i,selectors:[["cdk-dialog-container"]],viewQuery:function(e,n){if(1&e&&Wn(Am,7),2&e){let r;Et(r=At())&&(n._portalOutlet=r.first)}},hostAttrs:["tabindex","-1",1,"cdk-dialog-container"],hostVars:6,hostBindings:function(e,n){2&e&&Dt("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:[lt],decls:1,vars:0,consts:[["cdkPortalOutlet",""]],template:function(e,n){1&e&&fe(0,cQ,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 ZI{constructor(t,e){this.overlayRef=t,this.config=e,this.closed=new Re,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&&!Xo(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 VU=new me("DialogScrollStrategy"),dQ=new me("DialogData"),uQ=new me("DefaultDialogConfig"),fQ={provide:VU,deps:[as],useFactory:function hQ(i){return()=>i.scrollStrategies.block()}};let pQ=0,zU=(()=>{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 Re,this._afterOpenedAtThisLevel=new Re,this._ariaHiddenElements=new Map,this.afterAllClosed=Ey(()=>this.openDialogs.length?this._getAfterAllClosed():this._getAfterAllClosed().pipe(Ao(void 0))),this._scrollStrategy=a}open(e,n){(n={...this._defaultOptions||new WM,...n}).id=n.id||"cdk-dialog-"+pQ++,n.id&&this.getDialogById(n.id);const s=this._getOverlayConfig(n),o=this._overlay.create(s),a=new ZI(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(){QI(this.openDialogs,e=>e.close())}getDialogById(e){return this.openDialogs.find(n=>n.id===e)}ngOnDestroy(){QI(this._openDialogsAtThisLevel,e=>{!1===e.config.closeOnDestroy&&this._removeOpenDialog(e,!1)}),QI(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:WM,useValue:r},{provide:ZI,useValue:n},{provide:Zy,useValue:e}];let a;r.container?"function"==typeof r.container?a=r.container:(a=r.container.type,o.push(...r.container.providers(r))):a=UU;const l=new Lh(a,r.viewContainerRef,$i.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 Lh(e,s.viewContainerRef,o,s.componentFactoryResolver));n.componentInstance=a.instance}}_createInjector(e,n,r,s){const o=e.injector||e.viewContainerRef?.injector,a=[{provide:dQ,useValue:e.data},{provide:ZI,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(Ia,null,{optional:!0}))&&a.push({provide:Ia,useValue:{value:e.direction,change:ht()}}),$i.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)(ee(as),ee($i),ee(uQ,8),ee(i,12),ee(VM),ee(VU))},i.\u0275prov=ke({token:i,factory:i.\u0275fac}),i})();function QI(i,t){let e=i.length;for(;e--;)t(i[e])}let mQ=(()=>{class i{}return i.\u0275fac=function(e){return new(e||i)},i.\u0275mod=nn({type:i}),i.\u0275inj=Kt({providers:[zU,fQ],imports:[Pm,Nh,BU,Nh]}),i})();const gQ=["text"];function _Q(i,t){if(1&i&&De(0,"mat-pseudo-checkbox",6),2&i){const e=he();U("state",e.selected?"checked":"unchecked")("disabled",e.disabled)}}function vQ(i,t){1&i&&De(0,"mat-pseudo-checkbox",7),2&i&&U("disabled",he().disabled)}function yQ(i,t){if(1&i&&(W(0,"span",8),Ve(1),j()),2&i){const e=he();G(1),Qi("(",e.group.label,")")}}const bQ=[[["mat-icon"]],"*"],xQ=["mat-icon","*"],MQ=new me("mat-sanity-checks",{providedIn:"root",factory:function wQ(){return!0}});let Qn=(()=>{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!NI()&&("boolean"==typeof this._sanityChecks?this._sanityChecks:!!this._sanityChecks[e])}}return i.\u0275fac=function(e){return new(e||i)(ee(NU),ee(MQ,8),ee(jt))},i.\u0275mod=nn({type:i}),i.\u0275inj=Kt({imports:[Yy,Yy]}),i})();function jM(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 Qy(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 YM(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 JI(i,t=0){return class extends i{get tabIndex(){return this.disabled?-1:this._tabIndex}set tabIndex(e){this._tabIndex=null!=e?ks(e):this.defaultTabIndex}constructor(...e){super(...e),this._tabIndex=t,this.defaultTabIndex=t}}}function $U(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 CQ(i){return class extends i{constructor(...t){super(...t),this._isInitialized=!1,this._pendingSubscribers=[],this.initialized=new In(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 jU=(()=>{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=ke({token:i,factory:i.\u0275fac,providedIn:"root"}),i})();class EQ{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 YU=Oh({passive:!0,capture:!0});class AQ{constructor(){this._events=new Map,this._delegateEventHandler=t=>{const e=cu(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,YU)})}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,YU)))}}const qU={enterDuration:225,exitDuration:150},XU=Oh({passive:!0,capture:!0}),KU=["mousedown","touchstart"],ZU=["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=Yc(n))}fadeInRipple(t,e,n={}){const r=this._containerRect=this._containerRect||this._containerElement.getBoundingClientRect(),s={...qU,...n.animation};n.centered&&(t=r.left+r.width/2,e=r.top+r.height/2);const o=n.radius||function TQ(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,d=document.createElement("div");d.classList.add("mat-ripple-element"),d.style.left=a-o+"px",d.style.top=l-o+"px",d.style.height=2*o+"px",d.style.width=2*o+"px",null!=n.color&&(d.style.backgroundColor=n.color),d.style.transitionDuration=`${c}ms`,this._containerElement.appendChild(d);const h=window.getComputedStyle(d),m=h.transitionDuration,g="none"===h.transitionProperty||"0s"===m||"0s, 0s"===m||0===r.width&&0===r.height,b=new EQ(this,d,n,g);d.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);d.addEventListener("transitionend",y),d.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={...qU,...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=Yc(t);!this._platform.isBrowser||!e||e===this._triggerElement||(this._removeTriggerEvents(),this._triggerElement=e,KU.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(()=>{ZU.forEach(e=>{this._triggerElement.addEventListener(e,this,XU)})}),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=YI(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&&(KU.forEach(e=>Lm._eventManager.removeHandler(e,t,this)),this._pointerUpEventsRegistered&&ZU.forEach(e=>t.removeEventListener(e,this,XU)))}}Lm._eventManager=new AQ;const eR=new me("mat-ripple-global-options");let Uh=(()=>{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)(E(mt),E(ft),E(zi),E(eR,8),E(Rr,8))},i.\u0275dir=ve({type:i,selectors:[["","mat-ripple",""],["","matRipple",""]],hostAttrs:[1,"mat-ripple"],hostVars:2,hostBindings:function(e,n){2&e&&un("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})(),eb=(()=>{class i{}return i.\u0275fac=function(e){return new(e||i)},i.\u0275mod=nn({type:i}),i.\u0275inj=Kt({imports:[Qn,Qn]}),i})(),IQ=(()=>{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)(E(Rr,8))},i.\u0275cmp=ot({type:i,selectors:[["mat-pseudo-checkbox"]],hostAttrs:[1,"mat-pseudo-checkbox"],hostVars:12,hostBindings:function(e,n){2&e&&un("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})(),QU=(()=>{class i{}return i.\u0275fac=function(e){return new(e||i)},i.\u0275mod=nn({type:i}),i.\u0275inj=Kt({imports:[Qn]}),i})();const JU=new me("MAT_OPTION_PARENT_COMPONENT"),eV=new me("MatOptgroup");let RQ=0;class kQ{constructor(t,e=!1){this.source=t,this.isUserInput=e}}let PQ=(()=>{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-"+RQ++,this.onSelectionChange=new We,this._stateChanges=new Re}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)&&!Xo(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 kQ(this,e))}}return i.\u0275fac=function(e){xo()},i.\u0275dir=ve({type:i,viewQuery:function(e,n){if(1&e&&Wn(gQ,7),2&e){let r;Et(r=At())&&(n._text=r.first)}},inputs:{value:"value",id:"id",disabled:"disabled"},outputs:{onSelectionChange:"onSelectionChange"}}),i})(),Nm=(()=>{class i extends PQ{constructor(e,n,r,s){super(e,n,r,s)}}return i.\u0275fac=function(e){return new(e||i)(E(mt),E(Zn),E(JU,8),E(eV,8))},i.\u0275cmp=ot({type:i,selectors:[["mat-option"]],hostAttrs:["role","option",1,"mat-mdc-option","mdc-list-item"],hostVars:11,hostBindings:function(e,n){1&e&&Ue("click",function(){return n._selectViaInteraction()})("keydown",function(s){return n._handleKeydown(s)}),2&e&&(Yl("id",n.id),Dt("aria-selected",n.selected)("aria-disabled",n.disabled.toString()),un("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:[lt],ngContentSelectors:xQ,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&&(sr(bQ),fe(0,_Q,1,2,"mat-pseudo-checkbox",0),Wt(1),W(2,"span",1,2),Wt(4,1),j(),fe(5,vQ,1,1,"mat-pseudo-checkbox",3),fe(6,yQ,2,1,"span",4),De(7,"div",5)),2&e&&(U("ngIf",n.multiple),G(5),U("ngIf",!n.multiple&&n.selected&&!n.hideSingleSelectionIndicator),G(1),U("ngIf",n.group&&n.group._inert),G(1),U("matRippleTrigger",n._getHostElement())("matRippleDisabled",n.disabled||n.disableRipple))},dependencies:[Uh,vi,IQ],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})(),tR=(()=>{class i{}return i.\u0275fac=function(e){return new(e||i)},i.\u0275mod=nn({type:i}),i.\u0275inj=Kt({imports:[eb,Eo,Qn,QU]}),i})();class tV{}class LQ{}const Xc="*";function Ra(i,t){return{type:7,name:i,definitions:t,options:{}}}function jr(i,t=null){return{type:4,styles:t,timings:i}}function iV(i,t=null){return{type:2,steps:i,options:t}}function si(i){return{type:6,styles:i,offset:null}}function Ps(i,t,e){return{type:0,name:i,styles:t,options:e}}function rV(i){return{type:5,steps:i}}function Pr(i,t,e=null){return{type:1,expr:i,animation:t,options:e}}function nR(i=null){return{type:9,options:i}}function iR(i,t,e=null){return{type:11,selector:i,animation:t,options:e}}function sV(i){Promise.resolve().then(i)}class tb{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(){sV(()=>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 oV{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?sV(()=>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 rR="!";function NQ(i,t){}class qM{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 sR="mdc-dialog--open",aV="mdc-dialog--opening",lV="mdc-dialog--closing";let VQ=(()=>{class i extends UU{constructor(e,n,r,s,o,a,l,c){super(e,n,r,s,o,a,l,c),this._animationStateChanged=new We}_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)(E(mt),E(jI),E(jt,8),E(qM),E(GM),E(ft),E(Zy),E(qc))},i.\u0275cmp=ot({type:i,selectors:[["ng-component"]],features:[lt],decls:0,vars:0,template:function(e,n){},encapsulation:2}),i})();const cV="--mat-dialog-transition-duration";function dV(i){return null==i?null:"number"==typeof i?i:i.endsWith("ms")?ks(i.substring(0,i.length-2)):i.endsWith("s")?1e3*ks(i.substring(0,i.length-1)):"0"===i?0:null}let zQ=(()=>{class i extends VQ{constructor(e,n,r,s,o,a,l,c,d){super(e,n,r,s,o,a,l,d),this._animationMode=c,this._animationsEnabled="NoopAnimations"!==this._animationMode,this._hostElement=this._elementRef.nativeElement,this._openAnimationDuration=this._animationsEnabled?dV(this._config.enterAnimationDuration)??150:0,this._closeAnimationDuration=this._animationsEnabled?dV(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(cV,`${this._openAnimationDuration}ms`),this._requestAnimationFrame(()=>this._hostElement.classList.add(aV,sR)),this._waitForAnimationToComplete(this._openAnimationDuration,this._finishDialogOpen)):(this._hostElement.classList.add(sR),Promise.resolve().then(()=>this._finishDialogOpen()))}_startExitAnimation(){this._animationStateChanged.emit({state:"closing",totalTime:this._closeAnimationDuration}),this._hostElement.classList.remove(sR),this._animationsEnabled?(this._hostElement.style.setProperty(cV,`${this._openAnimationDuration}ms`),this._requestAnimationFrame(()=>this._hostElement.classList.add(lV)),this._waitForAnimationToComplete(this._closeAnimationDuration,this._finishDialogClose)):Promise.resolve().then(()=>this._finishDialogClose())}_clearAnimationClasses(){this._hostElement.classList.remove(aV,lV)}_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)(E(mt),E(jI),E(jt,8),E(qM),E(GM),E(ft),E(Zy),E(Rr,8),E(qc))},i.\u0275cmp=ot({type:i,selectors:[["mat-dialog-container"]],hostAttrs:["tabindex","-1",1,"mat-mdc-dialog-container","mdc-dialog"],hostVars:8,hostBindings:function(e,n){2&e&&(Yl("id",n._config.id),Dt("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),un("_mat-animation-noopable",!n._animationsEnabled))},features:[lt],decls:3,vars:0,consts:[[1,"mdc-dialog__container"],[1,"mat-mdc-dialog-surface","mdc-dialog__surface"],["cdkPortalOutlet",""]],template:function(e,n){1&e&&(W(0,"div",0)(1,"div",1),fe(2,NQ,0,0,"ng-template",2),j()())},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 nb{constructor(t,e,n){this._ref=t,this._containerInstance=n,this._afterOpened=new Re,this._beforeClosed=new Re,this._state=0,this.disableClose=e.disableClose,this.id=t.id,n._animationStateChanged.pipe(gn(r=>"opened"===r.state),Oi(1)).subscribe(()=>{this._afterOpened.next(),this._afterOpened.complete()}),n._animationStateChanged.pipe(gn(r=>"closed"===r.state),Oi(1)).subscribe(()=>{clearTimeout(this._closeFallbackTimeout),this._finishDialogClose()}),t.overlayRef.detachments().subscribe(()=>{this._beforeClosed.next(this._result),this._beforeClosed.complete(),this._finishDialogClose()}),Mr(this.backdropClick(),this.keydownEvents().pipe(gn(r=>27===r.keyCode&&!this.disableClose&&!Xo(r)))).subscribe(r=>{this.disableClose||(r.preventDefault(),uV(this,"keydown"===r.type?"keyboard":"mouse"))})}close(t){this._result=t,this._containerInstance._animationStateChanged.pipe(gn(e=>"closing"===e.state),Oi(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 uV(i,t,e){return i._closeInteractionType=t,i.close(e)}const oR=new me("MatMdcDialogData"),HQ=new me("mat-mdc-dialog-default-options"),hV=new me("mat-mdc-dialog-scroll-strategy"),$Q={provide:hV,deps:[as],useFactory:function GQ(i){return()=>i.scrollStrategies.block()}};let WQ=0,jQ=(()=>{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,d,h){this._overlay=e,this._defaultOptions=r,this._parentDialog=s,this._dialogRefConstructor=l,this._dialogContainerType=c,this._dialogDataToken=d,this._openDialogsAtThisLevel=[],this._afterAllClosedAtThisLevel=new Re,this._afterOpenedAtThisLevel=new Re,this._idPrefix="mat-dialog-",this.dialogConfigClass=qM,this.afterAllClosed=Ey(()=>this.openDialogs.length?this._getAfterAllClosed():this._getAfterAllClosed().pipe(Ao(void 0))),this._scrollStrategy=a,this._dialog=n.get(zU)}open(e,n){let r;(n={...this._defaultOptions||new qM,...n}).id=n.id||`${this._idPrefix}${WQ++}`,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:WM,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){xo()},i.\u0275prov=ke({token:i,factory:i.\u0275fac}),i})(),Bm=(()=>{class i extends jQ{constructor(e,n,r,s,o,a,l,c){super(e,n,s,a,l,o,nb,zQ,oR,c),this._idPrefix="mat-mdc-dialog-"}}return i.\u0275fac=function(e){return new(e||i)(ee(as),ee($i),ee(_y,8),ee(HQ,8),ee(hV),ee(i,12),ee(VM),ee(Rr,8))},i.\u0275prov=ke({token:i,factory:i.\u0275fac}),i})(),YQ=0,qQ=(()=>{class i{constructor(e,n,r){this.dialogRef=e,this._elementRef=n,this._dialog=r,this.type="button"}ngOnInit(){this.dialogRef||(this.dialogRef=gV(this._elementRef,this._dialog.openDialogs))}ngOnChanges(e){const n=e._matDialogClose||e._matDialogCloseResult;n&&(this.dialogResult=n.currentValue)}_onButtonClick(e){uV(this.dialogRef,0===e.screenX&&0===e.screenY?"keyboard":"mouse",this.dialogResult)}}return i.\u0275fac=function(e){return new(e||i)(E(nb,8),E(mt),E(Bm))},i.\u0275dir=ve({type:i,selectors:[["","mat-dialog-close",""],["","matDialogClose",""]],hostVars:2,hostBindings:function(e,n){1&e&&Ue("click",function(s){return n._onButtonClick(s)}),2&e&&Dt("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:[bi]}),i})(),fV=(()=>{class i{constructor(e,n,r){this._dialogRef=e,this._elementRef=n,this._dialog=r,this.id="mat-mdc-dialog-title-"+YQ++}ngOnInit(){this._dialogRef||(this._dialogRef=gV(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)(E(nb,8),E(mt),E(Bm))},i.\u0275dir=ve({type:i,selectors:[["","mat-dialog-title",""],["","matDialogTitle",""]],hostAttrs:[1,"mat-mdc-dialog-title","mdc-dialog__title"],hostVars:1,hostBindings:function(e,n){2&e&&Yl("id",n.id)},inputs:{id:"id"},exportAs:["matDialogTitle"]}),i})(),pV=(()=>{class i{}return i.\u0275fac=function(e){return new(e||i)},i.\u0275dir=ve({type:i,selectors:[["","mat-dialog-content",""],["mat-dialog-content"],["","matDialogContent",""]],hostAttrs:[1,"mat-mdc-dialog-content","mdc-dialog__content"]}),i})(),mV=(()=>{class i{constructor(){this.align="start"}}return i.\u0275fac=function(e){return new(e||i)},i.\u0275dir=ve({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&&un("mat-mdc-dialog-actions-align-center","center"===n.align)("mat-mdc-dialog-actions-align-end","end"===n.align)},inputs:{align:"align"}}),i})();function gV(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 _V=(()=>{class i{}return i.\u0275fac=function(e){return new(e||i)},i.\u0275mod=nn({type:i}),i.\u0275inj=Kt({providers:[Bm,$Q],imports:[mQ,Pm,Nh,Qn,Qn]}),i})();const XQ=["mat-button",""],yV=[[["",8,"material-icons",3,"iconPositionEnd",""],["mat-icon",3,"iconPositionEnd",""],["","matButtonIcon","",3,"iconPositionEnd",""]],"*",[["","iconPositionEnd","",8,"material-icons"],["mat-icon","iconPositionEnd",""],["","matButtonIcon","","iconPositionEnd",""]]],bV=[".material-icons:not([iconPositionEnd]), mat-icon:not([iconPositionEnd]), [matButtonIcon]:not([iconPositionEnd])","*",".material-icons[iconPositionEnd], mat-icon[iconPositionEnd], [matButtonIcon][iconPositionEnd]"],ZQ=["mat-mini-fab",""],JQ=["mat-icon-button",""],eJ=["*"],tJ=[{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"]}],nJ=Qy(jM(YM(class{constructor(i){this._elementRef=i}})));let aR=(()=>{class i extends nJ{constructor(e,n,r,s){super(e),this._platform=n,this._ngZone=r,this._animationMode=s,this._focusMonitor=Ft(qc),this._isFab=!1;const o=e.nativeElement.classList;for(const a of tJ)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){xo()},i.\u0275dir=ve({type:i,viewQuery:function(e,n){if(1&e&&Wn(Uh,5),2&e){let r;Et(r=At())&&(n.ripple=r.first)}},features:[lt]}),i})(),ib=(()=>{class i extends aR{constructor(e,n,r,s){super(e,n,r,s)}}return i.\u0275fac=function(e){return new(e||i)(E(mt),E(zi),E(ft),E(Rr,8))},i.\u0275cmp=ot({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&&(Dt("disabled",n.disabled||null),un("_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:[lt],attrs:XQ,ngContentSelectors:bV,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&&(sr(yV),De(0,"span",0),Wt(1),W(2,"span",1),Wt(3,1),j(),Wt(4,2),De(5,"span",2)(6,"span",3)(7,"span",4)),2&e&&(un("mdc-button__ripple",!n._isFab)("mdc-fab__ripple",n._isFab),G(6),U("matRippleDisabled",n._isRippleDisabled())("matRippleTrigger",n._elementRef.nativeElement))},dependencies:[Uh],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 rJ=new me("mat-mdc-fab-default-options",{providedIn:"root",factory:xV});function xV(){return{color:"accent"}}const wV=xV();let MV=(()=>{class i extends aR{constructor(e,n,r,s,o){super(e,n,r,s),this._options=o,this._isFab=!0,this._options=this._options||wV,this.color=this.defaultColor=this._options.color||wV.color}}return i.\u0275fac=function(e){return new(e||i)(E(mt),E(zi),E(ft),E(Rr,8),E(rJ,8))},i.\u0275cmp=ot({type:i,selectors:[["button","mat-mini-fab",""]],hostVars:7,hostBindings:function(e,n){2&e&&(Dt("disabled",n.disabled||null),un("_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:[lt],attrs:ZQ,ngContentSelectors:bV,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&&(sr(yV),De(0,"span",0),Wt(1),W(2,"span",1),Wt(3,1),j(),Wt(4,2),De(5,"span",2)(6,"span",3)(7,"span",4)),2&e&&(un("mdc-button__ripple",!n._isFab)("mdc-fab__ripple",n._isFab),G(6),U("matRippleDisabled",n._isRippleDisabled())("matRippleTrigger",n._elementRef.nativeElement))},dependencies:[Uh],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})(),XM=(()=>{class i extends aR{constructor(e,n,r,s){super(e,n,r,s)}}return i.\u0275fac=function(e){return new(e||i)(E(mt),E(zi),E(ft),E(Rr,8))},i.\u0275cmp=ot({type:i,selectors:[["button","mat-icon-button",""]],hostVars:7,hostBindings:function(e,n){2&e&&(Dt("disabled",n.disabled||null),un("_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:[lt],attrs:JQ,ngContentSelectors:eJ,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&&(sr(),De(0,"span",0),Wt(1),De(2,"span",1)(3,"span",2)(4,"span",3)),2&e&&(G(3),U("matRippleDisabled",n._isRippleDisabled())("matRippleCentered",!0)("matRippleTrigger",n._elementRef.nativeElement))},dependencies:[Uh],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})(),KM=(()=>{class i{}return i.\u0275fac=function(e){return new(e||i)},i.\u0275mod=nn({type:i}),i.\u0275inj=Kt({imports:[Qn,eb,Qn]}),i})();const sJ=["class","dialog"];let CV=(()=>{class i{constructor(e,n){this.dialogRef=e,this.data=n}}return i.\u0275fac=function(e){return new(e||i)(E(nb),E(oR))},i.\u0275cmp=ot({type:i,selectors:[["app-confirm",8,"dialog"]],attrs:sJ,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&&(W(0,"h1",0),Ve(1,"Confirmation"),j(),W(2,"div",1)(3,"p"),Ve(4),j()(),W(5,"div",2)(6,"button",3),Ue("click",function(){return n.dialogRef.close()}),Ve(7,"Cancel"),j(),W(8,"button",4),Ve(9,"Yes"),j()()),2&e&&(G(4),_i(n.data.text),G(4),U("mat-dialog-close",!0))},dependencies:[ib,qQ,fV,pV,mV]}),i})();function lR(i,t){const e="object"==typeof t;return new Promise((n,r)=>{const s=new da({next:o=>{n(o),s.unsubscribe()},error:r,complete:()=>{e?n(t.defaultValue):r(new fm)}});i.subscribe(s)})}let Ql=(()=>{class i{constructor(e){this.ngZone=e,this.openedResource$=new gt(null),this.openedResourcePath$=new gt(null),eel.expose(this.wrapHandler(this.openFile),"open_file"),eel.on_angular_ready(),setTimeout(tt(function*(){for(;;){if(eel._websocket){eel._websocket.onclose=()=>window.close();break}yield new Promise(n=>setTimeout(n,0))}}),0)}wrapHandler(e){return(...n)=>{try{ft.assertInAngularZone(),e.bind(this)(...n)}catch{this.ngZone.run(e,this,n)}}}openFile(e,n=!1){var r=this;return tt(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 tt(function*(){yield eel.open_file_with_system_app(e)()})()}retrieveValue(e){return tt(function*(){return yield eel.retrieve_value(e)()})()}runCustomAction(e,n,r){return tt(function*(){return eel.run_custom_action(e,n,r)()})()}saveFile(e){var n=this;return tt(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 tt(function*(){return eel.serialize_resource(e,n)()})()}serializeResourceTmp(e,n,r={}){return tt(function*(){return eel.serialize_resource_tmp(e,n,r)()})()}serializeReversible(e,n){return tt(function*(){return eel.serialize_reversible(e,n)()})()}deserializeResource(e){return tt(function*(){return eel.deserialize_resource(e)()})()}}return i.\u0275fac=function(e){return new(e||i)(ee(ft))},i.\u0275prov=ke({token:i,factory:i.\u0275fac,providedIn:"root"}),i})();var cR=ps(489);const SV=i=>!(!i||"object"!=typeof i),EV=(i={},t,e,n=[])=>{const r=[];if(SV(i)){const s=Object.entries(i);for(let o=0;o{class i{constructor(e){var n=this;this.eelDelegate=e,this._hasUnsavedChanges$=new gt(!1),this.resource$=new gt(null),this.error$=new gt(null),this.customActionRunning$=new gt(!1),this.changedDataBlocks={},this.dataBlockChange$=new Re,this.hideHiddenFields$=new gt(!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=EV(r.schema,"is_recursive_ref",!0);for(const[o,a]of s){const l=o.block_class_mro;let c=r.schema,d=c.block_class_mro===l?c:void 0;for(const h of a.slice(0,a.length-1))!d&&c[h]?.block_class_mro===l&&(d=c[h]),c=c[h];c[a[a.length-1]]=d}this.resource$.next(r),this.error$.next(null)}else this.resource$.next(null),this.error$.next(null)}),this.dataBlockChange$.subscribe(function(){var r=tt(function*([s,o]){n.changedDataBlocks[s]=o,n.updateUnsavedChanges();const a=yield n.eelDelegate.retrieveValue(s);n.changedDataBlocks[s]==o&&((0,cR.isNumber)(o)?Math.abs(o-a)<1e-10:(0,cR.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 tt(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 tt(function*(){return s.processExternalChanges(e,()=>s.eelDelegate.runCustomAction(e,n,r))})()}deserializeResource(e){var n=this;return tt(function*(){return n.processExternalChanges(e,()=>n.eelDelegate.deserializeResource(e))})()}reloadResource(){var e=this;return tt(function*(){const n=e.eelDelegate.openedResourcePath$.getValue();n&&e.eelDelegate.openFile(n,!0).then()})()}saveResource(){var e=this;return tt(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)(ee(Ql))},i.\u0275prov=ke({token:i,factory:i.\u0275fac,providedIn:"root"}),i})();function oJ(i,t){if(1&i){const e=di();W(0,"div",2)(1,"button",3),Ue("click",function(){return an(e),zt(he().action())}),Ve(2),j()()}if(2&i){const e=he();G(2),Qi(" ",e.data.action," ")}}const aJ=["label"];function lJ(i,t){}const cJ=Math.pow(2,31)-1;class dR{constructor(t,e){this._overlayRef=e,this._afterDismissed=new Re,this._afterOpened=new Re,this._onAction=new Re,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,cJ))}_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 AV=new me("MatSnackBarData");class ZM{constructor(){this.politeness="assertive",this.announcementMessage="",this.duration=0,this.data=null,this.horizontalPosition="center",this.verticalPosition="bottom"}}let dJ=(()=>{class i{}return i.\u0275fac=function(e){return new(e||i)},i.\u0275dir=ve({type:i,selectors:[["","matSnackBarLabel",""]],hostAttrs:[1,"mat-mdc-snack-bar-label","mdc-snackbar__label"]}),i})(),uJ=(()=>{class i{}return i.\u0275fac=function(e){return new(e||i)},i.\u0275dir=ve({type:i,selectors:[["","matSnackBarActions",""]],hostAttrs:[1,"mat-mdc-snack-bar-actions","mdc-snackbar__actions"]}),i})(),hJ=(()=>{class i{}return i.\u0275fac=function(e){return new(e||i)},i.\u0275dir=ve({type:i,selectors:[["","matSnackBarAction",""]],hostAttrs:[1,"mat-mdc-snack-bar-action","mdc-snackbar__action"]}),i})(),fJ=(()=>{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)(E(dR),E(AV))},i.\u0275cmp=ot({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&&(W(0,"div",0),Ve(1),j(),fe(2,oJ,3,1,"div",1)),2&e&&(G(1),Qi(" ",n.data.message,"\n"),G(1),U("ngIf",n.hasAction))},dependencies:[vi,ib,dJ,uJ,hJ],styles:[".mat-mdc-simple-snack-bar{display:flex}"],encapsulation:2,changeDetection:0}),i})();const pJ={snackBarState:Ra("state",[Ps("void, hidden",si({transform:"scale(0.8)",opacity:0})),Ps("visible",si({transform:"scale(1)",opacity:1})),Pr("* => visible",jr("150ms cubic-bezier(0, 0, 0.2, 1)")),Pr("* => void, * => hidden",jr("75ms cubic-bezier(0.4, 0.0, 1, 1)",si({opacity:0})))])};let mJ=0,gJ=(()=>{class i extends NM{constructor(e,n,r,s,o){super(),this._ngZone=e,this._elementRef=n,this._changeDetectorRef=r,this._platform=s,this.snackBarConfig=o,this._document=Ft(jt),this._trackedModals=new Set,this._announceDelay=150,this._destroyed=!1,this._onAnnounce=new Re,this._onExit=new Re,this._onEnter=new Re,this._animationState="void",this._liveElementId="mat-snack-bar-container-live-"+mJ++,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(Oi(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)(E(ft),E(mt),E(Zn),E(zi),E(ZM))},i.\u0275dir=ve({type:i,viewQuery:function(e,n){if(1&e&&Wn(Am,7),2&e){let r;Et(r=At())&&(n._portalOutlet=r.first)}},features:[lt]}),i})(),_J=(()=>{class i extends gJ{_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=ri(i)))(n||i)}}(),i.\u0275cmp=ot({type:i,selectors:[["mat-snack-bar-container"]],viewQuery:function(e,n){if(1&e&&Wn(aJ,7),2&e){let r;Et(r=At())&&(n._label=r.first)}},hostAttrs:[1,"mdc-snackbar","mat-mdc-snack-bar-container","mdc-snackbar--open"],hostVars:1,hostBindings:function(e,n){1&e&&N1("@state.done",function(s){return n.onAnimationEnd(s)}),2&e&&Iw("@state",n._animationState)},features:[lt],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&&(W(0,"div",0)(1,"div",1,2)(3,"div",3),fe(4,lJ,0,0,"ng-template",4),j(),De(5,"div"),j()()),2&e&&(G(5),Dt("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:[pJ.snackBarState]}}),i})(),DV=(()=>{class i{}return i.\u0275fac=function(e){return new(e||i)},i.\u0275mod=nn({type:i}),i.\u0275inj=Kt({imports:[Pm,Nh,Eo,KM,Qn,Qn]}),i})();const TV=new me("mat-snack-bar-default-options",{providedIn:"root",factory:function vJ(){return new ZM}});let yJ=(()=>{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=$i.create({parent:n&&n.viewContainerRef&&n.viewContainerRef.injector||this._injector,providers:[{provide:ZM,useValue:n}]}),o=new Lh(this.snackBarContainerComponent,n.viewContainerRef,s),a=e.attach(o);return a.instance.snackBarConfig=n,a.instance}_attach(e,n){const r={...new ZM,...this._defaultConfig,...n},s=this._createOverlay(r),o=this._attachSnackBarContainer(s,r),a=new dR(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 Lh(e,void 0,l),d=o.attachComponentPortal(c);a.instance=d.instance}return this._breakpointObserver.observe("(max-width: 599.98px) and (orientation: portrait)").pipe(He(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 $i.create({parent:e&&e.viewContainerRef&&e.viewContainerRef.injector||this._injector,providers:[{provide:dR,useValue:n},{provide:AV,useValue:e.data}]})}}return i.\u0275fac=function(e){return new(e||i)(ee(as),ee(XI),ee($i),ee(GI),ee(i,12),ee(TV))},i.\u0275prov=ke({token:i,factory:i.\u0275fac}),i})(),IV=(()=>{class i extends yJ{constructor(e,n,r,s,o,a){super(e,n,r,s,o,a),this.simpleSnackBarComponent=fJ,this.snackBarContainerComponent=_J,this.handsetCssClass="mat-mdc-snack-bar-handset"}}return i.\u0275fac=function(e){return new(e||i)(ee(as),ee(XI),ee($i),ee(GI),ee(i,12),ee(TV))},i.\u0275prov=ke({token:i,factory:i.\u0275fac,providedIn:DV}),i})();const bJ=["*",[["mat-toolbar-row"]]],xJ=["*","mat-toolbar-row"],wJ=Qy(class{constructor(i){this._elementRef=i}});let MJ=(()=>{class i{}return i.\u0275fac=function(e){return new(e||i)},i.\u0275dir=ve({type:i,selectors:[["mat-toolbar-row"]],hostAttrs:[1,"mat-toolbar-row"],exportAs:["matToolbarRow"]}),i})(),CJ=(()=>{class i extends wJ{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)(E(mt),E(zi),E(jt))},i.\u0275cmp=ot({type:i,selectors:[["mat-toolbar"]],contentQueries:function(e,n,r){if(1&e&&Wi(r,MJ,5),2&e){let s;Et(s=At())&&(n._toolbarRows=s)}},hostAttrs:[1,"mat-toolbar"],hostVars:4,hostBindings:function(e,n){2&e&&un("mat-toolbar-multiple-rows",n._toolbarRows.length>0)("mat-toolbar-single-row",0===n._toolbarRows.length)},inputs:{color:"color"},exportAs:["matToolbar"],features:[lt],ngContentSelectors:xJ,decls:2,vars:0,template:function(e,n){1&e&&(sr(bJ),Wt(0),Wt(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})(),SJ=(()=>{class i{}return i.\u0275fac=function(e){return new(e||i)},i.\u0275mod=nn({type:i}),i.\u0275inj=Kt({imports:[Qn,Qn]}),i})(),EJ=(()=>{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=ot({type:i,selectors:[["mat-divider"]],hostAttrs:["role","separator",1,"mat-divider"],hostVars:7,hostBindings:function(e,n){2&e&&(Dt("aria-orientation",n.vertical?"vertical":"horizontal"),un("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})(),RV=(()=>{class i{}return i.\u0275fac=function(e){return new(e||i)},i.\u0275mod=nn({type:i}),i.\u0275inj=Kt({imports:[Qn,Qn]}),i})();const AJ=["tooltip"],kV=new me("mat-tooltip-scroll-strategy"),IJ={provide:kV,deps:[as],useFactory:function TJ(i){return()=>i.scrollStrategies.reposition({scrollThrottle:20})}},kJ=new me("mat-tooltip-default-options",{providedIn:"root",factory:function RJ(){return{showDelay:0,hideDelay:0,touchendHideDelay:1500}}}),PV="tooltip-panel",OV=Oh({passive:!0});let BJ=(()=>{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=ks(e)}get hideDelay(){return this._hideDelay}set hideDelay(e){this._hideDelay=ks(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,d,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 Re,this._scrollStrategy=d,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(He(this._destroyed)).subscribe(()=>{this._overlayRef&&this._updatePosition(this._overlayRef)})}ngAfterViewInit(){this._viewInitialized=!0,this._setupPointerEnterEventsIfNeeded(),this._focusMonitor.monitor(this._elementRef).pipe(He(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,OV)}),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 Lh(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(He(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 mt)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(He(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}-${PV}`,scrollStrategy:this._scrollStrategy()}),this._updatePosition(this._overlayRef),this._overlayRef.detachments().pipe(He(this._destroyed)).subscribe(()=>this._detach()),this._overlayRef.outsidePointerEvents().pipe(He(this._destroyed)).subscribe(()=>this._tooltipInstance?._handleBodyInteraction()),this._overlayRef.keydownEvents().pipe(He(this._destroyed)).subscribe(s=>{this._isTooltipVisible()&&27===s.keyCode&&!Xo(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(Oi(1),He(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}-${PV}-`;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,OV)})}_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){xo()},i.\u0275dir=ve({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})(),Os=(()=>{class i extends BJ{constructor(e,n,r,s,o,a,l,c,d,h,p,m){super(e,n,r,s,o,a,l,c,d,h,p,m),this._tooltipComponent=VJ,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)(E(as),E(mt),E(qy),E(Wr),E(ft),E(zi),E(HZ),E(qc),E(kV),E(Ia,8),E(kJ,8),E(jt))},i.\u0275dir=ve({type:i,selectors:[["","matTooltip",""]],hostAttrs:[1,"mat-mdc-tooltip-trigger"],exportAs:["matTooltip"],features:[lt]}),i})(),UJ=(()=>{class i{constructor(e,n){this._changeDetectorRef=e,this._closeOnInteraction=!1,this._isVisible=!1,this._onHide=new Re,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)(E(Zn),E(Rr,8))},i.\u0275dir=ve({type:i}),i})(),VJ=(()=>{class i extends UJ{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)(E(Zn),E(mt),E(Rr,8))},i.\u0275cmp=ot({type:i,selectors:[["mat-tooltip-component"]],viewQuery:function(e,n){if(1&e&&Wn(AJ,7),2&e){let r;Et(r=At())&&(n._tooltip=r.first)}},hostAttrs:["aria-hidden","true"],hostVars:2,hostBindings:function(e,n){1&e&&Ue("mouseleave",function(s){return n._handleMouseLeave(s)}),2&e&&jo("zoom",n.isVisible()?1:null)},features:[lt],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&&(W(0,"div",0,1),Ue("animationend",function(s){return n._handleAnimationEnd(s)}),W(2,"div",2),Ve(3),j()()),2&e&&(un("mdc-tooltip--multiline",n._isMultiline),U("ngClass",n.tooltipClass),G(3),_i(n.message))},dependencies:[hm],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})(),FV=(()=>{class i{}return i.\u0275fac=function(e){return new(e||i)},i.\u0275mod=nn({type:i}),i.\u0275inj=Kt({providers:[IJ],imports:[BU,Eo,Pm,Qn,Qn,Xy]}),i})();function LV(...i){const t=w0(i),{args:e,keys:n}=VB(i),r=new In(s=>{const{length:o}=e;if(!o)return void s.complete();const a=new Array(o);let l=o,c=o;for(let d=0;d{h||(h=!0,c--),a[d]=p},()=>l--,void 0,()=>{(!l||!h)&&(c||s.next(n?zB(n,a):a),s.complete())}))}});return t?r.pipe(JT(t)):r}class uR{}class uu{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 uu?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 uu;return e.lazyInit=this.lazyInit&&this.lazyInit instanceof uu?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 zJ{encodeKey(t){return BV(t)}encodeValue(t){return BV(t)}decodeKey(t){return decodeURIComponent(t)}decodeValue(t){return decodeURIComponent(t)}}const GJ=/%(\d[a-f0-9])/gi,$J={40:"@","3A":":",24:"$","2C":",","3B":";","3D":"=","3F":"?","2F":"/"};function BV(i){return encodeURIComponent(i).replace(GJ,(t,e)=>$J[e]??t)}function QM(i){return`${i}`}class hu{constructor(t={}){if(this.updates=null,this.cloneFrom=null,this.encoder=t.encoder||new zJ,t.fromString){if(t.fromObject)throw new Error("Cannot specify both fromString and fromObject.");this.map=function HJ(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 hu({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 WJ{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 UV(i){return typeof ArrayBuffer<"u"&&i instanceof ArrayBuffer}function VV(i){return typeof Blob<"u"&&i instanceof Blob}function zV(i){return typeof FormData<"u"&&i instanceof FormData}class rb{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 jJ(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 uu),this.context||(this.context=new WJ),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 rb(e,n,s,{params:c,headers:l,context:d,reportProgress:a,responseType:r,withCredentials:o})}}var ls=(()=>((ls=ls||{})[ls.Sent=0]="Sent",ls[ls.UploadProgress=1]="UploadProgress",ls[ls.ResponseHeader=2]="ResponseHeader",ls[ls.DownloadProgress=3]="DownloadProgress",ls[ls.Response=4]="Response",ls[ls.User=5]="User",ls))();class qJ{constructor(t,e=200,n="OK"){this.headers=t.headers||new uu,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 hR extends qJ{constructor(t={}){super(t),this.type=ls.Response,this.body=void 0!==t.body?t.body:null}clone(t={}){return new hR({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 fR(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 pR=(()=>{class i{constructor(e){this.handler=e}request(e,n,r={}){let s;if(e instanceof rb)s=e;else{let l,c;l=r.headers instanceof uu?r.headers:new uu(r.headers),r.params&&(c=r.params instanceof hu?r.params:new hu({fromObject:r.params})),s=new rb(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=ht(s).pipe(ru(l=>this.handler.handle(l)));if(e instanceof rb||"events"===r.observe)return o;const a=o.pipe(gn(l=>l instanceof hR));switch(r.observe||"body"){case"body":switch(s.responseType){case"arraybuffer":return a.pipe(et(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(et(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(et(l=>{if(null!==l.body&&"string"!=typeof l.body)throw new Error("Response is not a string.");return l.body}));default:return a.pipe(et(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 hu).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,fR(r,n))}post(e,n,r={}){return this.request("POST",e,fR(r,n))}put(e,n,r={}){return this.request("PUT",e,fR(r,n))}}return i.\u0275fac=function(e){return new(e||i)(ee(uR))},i.\u0275prov=ke({token:i,factory:i.\u0275fac}),i})();const aee=["*"];let eC;function sb(i){return function lee(){if(void 0===eC&&(eC=null,typeof window<"u")){const i=window;void 0!==i.trustedTypes&&(eC=i.trustedTypes.createPolicy("angular#components",{createHTML:t=>t}))}return eC}()?.createHTML(i)||i}function XV(i){return Error(`Unable to find icon with the name "${i}"`)}function KV(i){return Error(`The URL provided to MatIconRegistry was not trusted as a resource URL via Angular's DomSanitizer. Attempted URL was "${i}".`)}function ZV(i){return Error(`The literal provided to MatIconRegistry was not trusted as safe HTML by Angular's DomSanitizer. Attempted literal was "${i}".`)}class Vh{constructor(t,e,n){this.url=t,this.svgText=e,this.options=n}}let tC=(()=>{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 Vh(r,null,s))}addSvgIconResolver(e){return this._resolvers.push(e),this}addSvgIconLiteralInNamespace(e,n,r,s){const o=this._sanitizer.sanitize(Kn.HTML,r);if(!o)throw ZV(r);const a=sb(o);return this._addSvgIconConfig(e,n,new Vh("",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 Vh(n,null,r))}addSvgIconSetLiteralInNamespace(e,n,r){const s=this._sanitizer.sanitize(Kn.HTML,n);if(!s)throw ZV(n);const o=sb(s);return this._addSvgIconSetConfig(e,new Vh("",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(Kn.RESOURCE_URL,e);if(!n)throw KV(e);const r=this._cachedIconsByUrl.get(n);return r?ht(nC(r)):this._loadSvgIconFromConfig(new Vh(e,null)).pipe(Vi(s=>this._cachedIconsByUrl.set(n,s)),et(s=>nC(s)))}getNamedSvgIcon(e,n=""){const r=QV(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(XV(r))}ngOnDestroy(){this._resolvers=[],this._svgIconConfigs.clear(),this._iconSetConfigs.clear(),this._cachedIconsByUrl.clear()}_getSvgFromConfig(e){return e.svgText?ht(nC(this._svgElementFromConfig(e))):this._loadSvgIconFromConfig(e).pipe(et(n=>nC(n)))}_getSvgFromIconSetConfigs(e,n){const r=this._extractIconWithNameFromAnySet(e,n);return r?ht(r):LV(n.filter(o=>!o.svgText).map(o=>this._loadSvgIconSetFromConfig(o).pipe(Wc(a=>{const c=`Loading icon set URL: ${this._sanitizer.sanitize(Kn.RESOURCE_URL,o.url)} failed: ${a.message}`;return this._errorHandler.handleError(new Error(c)),ht(null)})))).pipe(et(()=>{const o=this._extractIconWithNameFromAnySet(e,n);if(!o)throw XV(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(Vi(n=>e.svgText=n),et(()=>this._svgElementFromConfig(e)))}_loadSvgIconSetFromConfig(e){return e.svgText?ht(null):this._fetchIcon(e).pipe(Vi(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(sb(""));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(sb("")),r=e.attributes;for(let s=0;ssb(c)),su(()=>this._inProgressUrlFetches.delete(o)),Uf());return this._inProgressUrlFetches.set(o,l),l}_addSvgIconConfig(e,n,r){return this._svgIconConfigs.set(QV(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:""}}}),JV=["clip-path","color-profile","src","cursor","fill","filter","marker","marker-start","marker-mid","marker-end","mask","stroke"],gee=JV.map(i=>`[${i}]`).join(", "),_ee=/^url\(['"]?#(.*?)['"]?\)$/;let gR=(()=>{class i extends hee{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=Zt.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(gee),r=this._elementsWithExternalReferences=this._elementsWithExternalReferences||new Map;for(let s=0;s{const a=n[s],l=a.getAttribute(o),c=l?l.match(_ee):null;if(c){let d=r.get(a);d||(d=[],r.set(a,d)),d.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(Oi(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)(E(mt),E(tC),ya("aria-hidden"),E(pee),E(al),E(fee,8))},i.\u0275cmp=ot({type:i,selectors:[["mat-icon"]],hostAttrs:["role","img",1,"mat-icon","notranslate"],hostVars:8,hostBindings:function(e,n){2&e&&(Dt("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),un("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:[lt],ngContentSelectors:aee,decls:1,vars:0,template:function(e,n){1&e&&(sr(),Wt(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})(),ez=(()=>{class i{}return i.\u0275fac=function(e){return new(e||i)},i.\u0275mod=nn({type:i}),i.\u0275inj=Kt({imports:[Qn,Qn]}),i})(),tz=(()=>{class i{constructor(e){this.viewContainerRef=e}}return i.\u0275fac=function(e){return new(e||i)(E(Wr))},i.\u0275dir=ve({type:i,selectors:[["","dataBlockUI",""]]}),i})(),vee=(()=>{class i{constructor(){this.resource=null,this.name="",this.resourceDescription="",this.changed=new We}}return i.\u0275fac=function(e){return new(e||i)},i.\u0275cmp=ot({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&&(W(0,"p",0),Ve(1),j()),2&e&&(U("matTooltip",n.resourceDescription),G(1),tm("",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:[Os],changeDetection:0}),i})();function yee(i,t){if(1&i&&(W(0,"h2",4),Ve(1),j()),2&i){const e=he();U("matTooltip",e.resourceDescription),G(1),_i(e.name)}}function bee(i,t){1&i&&De(0,"app-block-actions",5),2&i&&U("resource",he().resource)}const xee=function(i,t,e,n){return{id:i,name:t,data:e,schema:n}};function wee(i,t){if(1&i&&De(0,"app-editor",7),2&i){const e=he().$implicit,n=he();U("resource",L2(3,xee,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 Mee(i,t){if(1&i&&(Gr(0),fe(1,wee,1,8,"app-editor",6),Ct(2,"async"),$r()),2&i){const e=t.$implicit,n=he();G(1),U("ngIf",!(Tt(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 Jl=(()=>{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 We,this.destroyed$=new Re}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(He(this.destroyed$),gn(([n,r])=>!!this.resource&&n.startsWith(this.resource.id)&&!n.substring(this.resource.id.length+1).includes("/"))).subscribe(function(){var n=tt(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)(E(ka))},i.\u0275cmp=ot({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&&(fe(0,yee,2,2,"h2",0),Ct(1,"async"),fe(2,bee,1,1,"app-block-actions",1),W(3,"div",2),fe(4,Mee,3,3,"ng-container",3),j()),2&e){let r;U("ngIf",n.name&&n.name!=(null==(r=Tt(1,4,n.main.resource$))?null:r.name)),G(2),U("ngIf",!n.hideBlockActions),G(2),U("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})(),nz=(()=>{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)(E(ol),E(mt))},i.\u0275dir=ve({type:i}),i})(),zh=(()=>{class i extends nz{}return i.\u0275fac=function(){let t;return function(n){return(t||(t=ri(i)))(n||i)}}(),i.\u0275dir=ve({type:i,features:[lt]}),i})();const Do=new me("NgValueAccessor"),See={provide:Do,useExisting:Gn(()=>gl),multi:!0},Aee=new me("CompositionEventMode");let gl=(()=>{class i extends nz{constructor(e,n,r){super(e,n),this._compositionMode=r,this._composing=!1,null==this._compositionMode&&(this._compositionMode=!function Eee(){const i=Hc()?Hc().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)(E(ol),E(mt),E(Aee,8))},i.\u0275dir=ve({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&&Ue("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:[Dn([See]),lt]}),i})();const Dee=!1;function fu(i){return null==i||("string"==typeof i||Array.isArray(i))&&0===i.length}function rz(i){return null!=i&&"number"==typeof i.length}const Yr=new me("NgValidators"),pu=new me("NgAsyncValidators"),Tee=/^(?=.{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 _l{static min(t){return sz(t)}static max(t){return oz(t)}static required(t){return function az(i){return fu(i.value)?{required:!0}:null}(t)}static requiredTrue(t){return function lz(i){return!0===i.value?null:{required:!0}}(t)}static email(t){return function cz(i){return fu(i.value)||Tee.test(i.value)?null:{email:!0}}(t)}static minLength(t){return dz(t)}static maxLength(t){return uz(t)}static pattern(t){return function hz(i){if(!i)return iC;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(fu(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 vz(t)}static composeAsync(t){return yz(t)}}function sz(i){return t=>{if(fu(t.value)||fu(i))return null;const e=parseFloat(t.value);return!isNaN(e)&&e{if(fu(t.value)||fu(i))return null;const e=parseFloat(t.value);return!isNaN(e)&&e>i?{max:{max:i,actual:t.value}}:null}}function dz(i){return t=>fu(t.value)||!rz(t.value)?null:t.value.lengthrz(t.value)&&t.value.length>i?{maxlength:{requiredLength:i,actualLength:t.value.length}}:null}function iC(i){return null}function fz(i){return null!=i}function pz(i){const t=oy(i)?Ni(i):i;if(Dee&&!L1(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 pe(-1101,e)}return t}function mz(i){let t={};return i.forEach(e=>{t=null!=e?{...t,...e}:t}),0===Object.keys(t).length?null:t}function gz(i,t){return t.map(e=>e(i))}function _z(i){return i.map(t=>function Iee(i){return!i.validate}(t)?t:e=>t.validate(e))}function vz(i){if(!i)return null;const t=i.filter(fz);return 0==t.length?null:function(e){return mz(gz(e,t))}}function _R(i){return null!=i?vz(_z(i)):null}function yz(i){if(!i)return null;const t=i.filter(fz);return 0==t.length?null:function(e){return LV(gz(e,t).map(pz)).pipe(et(mz))}}function vR(i){return null!=i?yz(_z(i)):null}function bz(i,t){return null===i?[t]:Array.isArray(i)?[...i,t]:[i,t]}function xz(i){return i._rawValidators}function wz(i){return i._rawAsyncValidators}function yR(i){return i?Array.isArray(i)?i:[i]:[]}function rC(i,t){return Array.isArray(i)?i.includes(t):i===t}function Mz(i,t){const e=yR(t);return yR(i).forEach(r=>{rC(e,r)||e.push(r)}),e}function Cz(i,t){return yR(t).filter(e=>!rC(i,e))}class Sz{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=_R(this._rawValidators)}_setAsyncValidators(t){this._rawAsyncValidators=t||[],this._composedAsyncValidatorFn=vR(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 ao extends Sz{get formDirective(){return null}get path(){return null}}class ec extends Sz{constructor(){super(...arguments),this._parent=null,this.name=null,this.valueAccessor=null}}class Ez{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 tc=(()=>{class i extends Ez{constructor(e){super(e)}}return i.\u0275fac=function(e){return new(e||i)(E(ec,2))},i.\u0275dir=ve({type:i,selectors:[["","formControlName",""],["","ngModel",""],["","formControl",""]],hostVars:14,hostBindings:function(e,n){2&e&&un("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:[lt]}),i})(),bR=(()=>{class i extends Ez{constructor(e){super(e)}}return i.\u0275fac=function(e){return new(e||i)(E(ao,10))},i.\u0275dir=ve({type:i,selectors:[["","formGroupName",""],["","formArrayName",""],["","ngModelGroup",""],["","formGroup",""],["form",3,"ngNoForm",""],["","ngForm",""]],hostVars:16,hostBindings:function(e,n){2&e&&un("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:[lt]}),i})();function Az(i,t){return i?`with name: '${t}'`:`at index: ${t}`}const MR=!1,ob="VALID",oC="INVALID",zm="PENDING",ab="DISABLED";function CR(i){return(aC(i)?i.validators:i)||null}function SR(i,t){return(aC(t)?t.asyncValidators:i)||null}function aC(i){return null!=i&&!Array.isArray(i)&&"object"==typeof i}function Dz(i,t,e){const n=i.controls;if(!(t?Object.keys(n):n).length)throw new pe(1e3,MR?function Oee(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 pe(1001,MR?function Fee(i,t){return`Cannot find form control ${Az(i,t)}`}(t,e):"")}function Tz(i,t,e){i._forEachChild((n,r)=>{if(void 0===e[r])throw new pe(1002,MR?function Lee(i,t){return`Must supply a value for form control ${Az(i,t)}`}(t,r):"")})}class lC{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===ob}get invalid(){return this.status===oC}get pending(){return this.status==zm}get disabled(){return this.status===ab}get enabled(){return this.status!==ab}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(Mz(t,this._rawValidators))}addAsyncValidators(t){this.setAsyncValidators(Mz(t,this._rawAsyncValidators))}removeValidators(t){this.setValidators(Cz(t,this._rawValidators))}removeAsyncValidators(t){this.setAsyncValidators(Cz(t,this._rawAsyncValidators))}hasValidator(t){return rC(this._rawValidators,t)}hasAsyncValidator(t){return rC(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=ab,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=ob,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===ob||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()?ab:ob}_runValidator(){return this.validator?this.validator(this):null}_runAsyncValidator(t){if(this.asyncValidator){this.status=zm,this._hasOwnPendingAsyncValidator=!0;const e=pz(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 We,this.statusChanges=new We}_calculateStatus(){return this._allControlsDisabled()?ab:this.errors?oC:this._hasOwnPendingAsyncValidator||this._anyControlsHaveStatus(zm)?zm:this._anyControlsHaveStatus(oC)?oC:ob}_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){aC(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 Nee(i){return Array.isArray(i)?_R(i):i||null}(this._rawValidators)}_assignAsyncValidators(t){this._rawAsyncValidators=Array.isArray(t)?t.slice():t,this._composedAsyncValidatorFn=function Bee(i){return Array.isArray(i)?vR(i):i||null}(this._rawAsyncValidators)}}class Hm extends lC{constructor(t,e,n){super(CR(e),SR(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={}){Tz(this,!0,t),Object.keys(t).forEach(n=>{Dz(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 Iz extends Hm{}const Hh=new me("CallSetDisabledState",{providedIn:"root",factory:()=>lb}),lb="always";function cC(i,t){return[...t.path,i]}function cb(i,t,e=lb){ER(i,t),t.valueAccessor.writeValue(i.value),(i.disabled||"always"===e)&&t.valueAccessor.setDisabledState?.(i.disabled),function Vee(i,t){t.valueAccessor.registerOnChange(e=>{i._pendingValue=e,i._pendingChange=!0,i._pendingDirty=!0,"change"===i.updateOn&&Rz(i,t)})}(i,t),function Hee(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 zee(i,t){t.valueAccessor.registerOnTouched(()=>{i._pendingTouched=!0,"blur"===i.updateOn&&i._pendingChange&&Rz(i,t),"submit"!==i.updateOn&&i.markAsTouched()})}(i,t),function Uee(i,t){if(t.valueAccessor.setDisabledState){const e=n=>{t.valueAccessor.setDisabledState(n)};i.registerOnDisabledChange(e),t._registerOnDestroy(()=>{i._unregisterOnDisabledChange(e)})}}(i,t)}function dC(i,t,e=!0){const n=()=>{};t.valueAccessor&&(t.valueAccessor.registerOnChange(n),t.valueAccessor.registerOnTouched(n)),hC(i,t),i&&(t._invokeOnDestroyCallbacks(),i._registerOnCollectionChange(()=>{}))}function uC(i,t){i.forEach(e=>{e.registerOnValidatorChange&&e.registerOnValidatorChange(t)})}function ER(i,t){const e=xz(i);null!==t.validator?i.setValidators(bz(e,t.validator)):"function"==typeof e&&i.setValidators([e]);const n=wz(i);null!==t.asyncValidator?i.setAsyncValidators(bz(n,t.asyncValidator)):"function"==typeof n&&i.setAsyncValidators([n]);const r=()=>i.updateValueAndValidity();uC(t._rawValidators,r),uC(t._rawAsyncValidators,r)}function hC(i,t){let e=!1;if(null!==i){if(null!==t.validator){const r=xz(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=wz(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 uC(t._rawValidators,n),uC(t._rawAsyncValidators,n),e}function Rz(i,t){i._pendingDirty&&i.markAsDirty(),i.setValue(i._pendingValue,{emitModelToViewChange:!1}),t.viewToModelUpdate(i._pendingValue),i._pendingChange=!1}function kz(i,t){ER(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 Pz(i,t){i._syncPendingControls(),t.forEach(e=>{const n=e.control;"submit"===n.updateOn&&n._pendingChange&&(e.viewToModelUpdate(n._pendingValue),n._pendingChange=!1)})}function TR(i,t){if(!t)return null;let e,n,r;return Array.isArray(t),t.forEach(s=>{s.constructor===gl?e=s:function Wee(i){return Object.getPrototypeOf(i.constructor)===zh}(s)?n=s:r=s}),r||n||e||null}const Yee={provide:ao,useExisting:Gn(()=>ub)},db=(()=>Promise.resolve())();let ub=(()=>{class i extends ao{constructor(e,n,r){super(),this.callSetDisabledState=r,this.submitted=!1,this._directives=new Set,this.ngSubmit=new We,this.form=new Hm({},_R(e),vR(n))}ngAfterViewInit(){this._setUpdateStrategy()}get formDirective(){return this}get control(){return this.form}get path(){return[]}get controls(){return this.form.controls}addControl(e){db.then(()=>{const n=this._findContainer(e.path);e.control=n.registerControl(e.name,e.control),cb(e.control,e,this.callSetDisabledState),e.control.updateValueAndValidity({emitEvent:!1}),this._directives.add(e)})}getControl(e){return this.form.get(e.path)}removeControl(e){db.then(()=>{const n=this._findContainer(e.path);n&&n.removeControl(e.name),this._directives.delete(e)})}addFormGroup(e){db.then(()=>{const n=this._findContainer(e.path),r=new Hm({});kz(r,e),n.registerControl(e.name,r),r.updateValueAndValidity({emitEvent:!1})})}removeFormGroup(e){db.then(()=>{const n=this._findContainer(e.path);n&&n.removeControl(e.name)})}getFormGroup(e){return this.form.get(e.path)}updateModel(e,n){db.then(()=>{this.form.get(e.path).setValue(n)})}setValue(e){this.control.setValue(e)}onSubmit(e){return this.submitted=!0,Pz(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)(E(Yr,10),E(pu,10),E(Hh,8))},i.\u0275dir=ve({type:i,selectors:[["form",3,"ngNoForm","",3,"formGroup",""],["ng-form"],["","ngForm",""]],hostBindings:function(e,n){1&e&&Ue("submit",function(s){return n.onSubmit(s)})("reset",function(){return n.onReset()})},inputs:{options:["ngFormOptions","options"]},outputs:{ngSubmit:"ngSubmit"},exportAs:["ngForm"],features:[Dn([Yee]),lt]}),i})();function Oz(i,t){const e=i.indexOf(t);e>-1&&i.splice(e,1)}function Fz(i){return"object"==typeof i&&null!==i&&2===Object.keys(i).length&&"value"in i&&"disabled"in i}const nc=class extends lC{constructor(t=null,e,n){super(CR(e),SR(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}),aC(e)&&(e.nonNullable||e.initialValueIsDefault)&&(this.defaultValue=Fz(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){Oz(this._onChange,t)}registerOnDisabledChange(t){this._onDisabledChange.push(t)}_unregisterOnDisabledChange(t){Oz(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){Fz(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}},Kee={provide:ec,useExisting:Gn(()=>Kc)},Bz=(()=>Promise.resolve())();let Kc=(()=>{class i extends ec{constructor(e,n,r,s,o,a){super(),this._changeDetectorRef=o,this.callSetDisabledState=a,this.control=new nc,this._registered=!1,this.update=new We,this._parent=e,this._setValidators(n),this._setAsyncValidators(r),this.valueAccessor=TR(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(){cb(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){Bz.then(()=>{this.control.setValue(e,{emitViewToModelChange:!1}),this._changeDetectorRef?.markForCheck()})}_updateDisabled(e){const n=e.isDisabled.currentValue,r=0!==n&&function um(i){return"boolean"==typeof i?i:null!=i&&"false"!==i}(n);Bz.then(()=>{r&&!this.control.disabled?this.control.disable():!r&&this.control.disabled&&this.control.enable(),this._changeDetectorRef?.markForCheck()})}_getPath(e){return this._parent?cC(e,this._parent):[e]}}return i.\u0275fac=function(e){return new(e||i)(E(ao,9),E(Yr,10),E(pu,10),E(Do,10),E(Zn,8),E(Hh,8))},i.\u0275dir=ve({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:[Dn([Kee]),lt,bi]}),i})(),IR=(()=>{class i{}return i.\u0275fac=function(e){return new(e||i)},i.\u0275dir=ve({type:i,selectors:[["form",3,"ngNoForm","",3,"ngNativeValidate",""]],hostAttrs:["novalidate",""]}),i})();const Zee={provide:Do,useExisting:Gn(()=>mu),multi:!0};let mu=(()=>{class i extends zh{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=ri(i)))(n||i)}}(),i.\u0275dir=ve({type:i,selectors:[["input","type","number","formControlName",""],["input","type","number","formControl",""],["input","type","number","ngModel",""]],hostBindings:function(e,n){1&e&&Ue("input",function(s){return n.onChange(s.target.value)})("blur",function(){return n.onTouched()})},features:[Dn([Zee]),lt]}),i})(),Uz=(()=>{class i{}return i.\u0275fac=function(e){return new(e||i)},i.\u0275mod=nn({type:i}),i.\u0275inj=Kt({}),i})();const RR=new me("NgModelWithFormControlWarning"),nte={provide:ao,useExisting:Gn(()=>Gh)};let Gh=(()=>{class i extends ao{constructor(e,n,r){super(),this.callSetDisabledState=r,this.submitted=!1,this._onCollectionChange=()=>this._updateDomValue(),this.directives=[],this.form=null,this.ngSubmit=new We,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&&(hC(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 cb(n,e,this.callSetDisabledState),n.updateValueAndValidity({emitEvent:!1}),this.directives.push(e),n}getControl(e){return this.form.get(e.path)}removeControl(e){dC(e.control||null,e,!1),function jee(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,Pz(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&&(dC(n||null,e),(i=>i instanceof nc)(r)&&(cb(r,e,this.callSetDisabledState),e.control=r))}),this.form._updateTreeValidity({emitEvent:!1})}_setUpFormContainer(e){const n=this.form.get(e.path);kz(n,e),n.updateValueAndValidity({emitEvent:!1})}_cleanUpFormContainer(e){if(this.form){const n=this.form.get(e.path);n&&function Gee(i,t){return hC(i,t)}(n,e)&&n.updateValueAndValidity({emitEvent:!1})}}_updateRegistrations(){this.form._registerOnCollectionChange(this._onCollectionChange),this._oldForm&&this._oldForm._registerOnCollectionChange(()=>{})}_updateValidators(){ER(this.form,this),this._oldForm&&hC(this._oldForm,this)}_checkFormPresent(){}}return i.\u0275fac=function(e){return new(e||i)(E(Yr,10),E(pu,10),E(Hh,8))},i.\u0275dir=ve({type:i,selectors:[["","formGroup",""]],hostBindings:function(e,n){1&e&&Ue("submit",function(s){return n.onSubmit(s)})("reset",function(){return n.onReset()})},inputs:{form:["formGroup","form"]},outputs:{ngSubmit:"ngSubmit"},exportAs:["ngForm"],features:[Dn([nte]),lt,bi]}),i})();const ste={provide:ec,useExisting:Gn(()=>fC)};let fC=(()=>{class i extends ec{set isDisabled(e){}constructor(e,n,r,s,o){super(),this._ngModelWarningConfig=o,this._added=!1,this.update=new We,this._ngModelWarningSent=!1,this._parent=e,this._setValidators(n),this._setAsyncValidators(r),this.valueAccessor=TR(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 cC(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)(E(ao,13),E(Yr,10),E(pu,10),E(Do,10),E(RR,8))},i.\u0275dir=ve({type:i,selectors:[["","formControlName",""]],inputs:{name:["formControlName","name"],isDisabled:["disabled","isDisabled"],model:["ngModel","model"]},outputs:{update:"ngModelChange"},features:[Dn([ste]),lt,bi]}),i})();function jz(i){return"number"==typeof i?i:parseInt(i,10)}function Yz(i){return"number"==typeof i?i:parseFloat(i)}let $h=(()=>{class i{constructor(){this._validator=iC}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):iC,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=ve({type:i,features:[bi]}),i})();const hte={provide:Yr,useExisting:Gn(()=>gu),multi:!0};let gu=(()=>{class i extends $h{constructor(){super(...arguments),this.inputName="max",this.normalizeInput=e=>Yz(e),this.createValidator=e=>oz(e)}}return i.\u0275fac=function(){let t;return function(n){return(t||(t=ri(i)))(n||i)}}(),i.\u0275dir=ve({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&&Dt("max",n._enabled?n.max:null)},inputs:{max:"max"},features:[Dn([hte]),lt]}),i})();const fte={provide:Yr,useExisting:Gn(()=>_u),multi:!0};let _u=(()=>{class i extends $h{constructor(){super(...arguments),this.inputName="min",this.normalizeInput=e=>Yz(e),this.createValidator=e=>sz(e)}}return i.\u0275fac=function(){let t;return function(n){return(t||(t=ri(i)))(n||i)}}(),i.\u0275dir=ve({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&&Dt("min",n._enabled?n.min:null)},inputs:{min:"min"},features:[Dn([fte]),lt]}),i})();const _te={provide:Yr,useExisting:Gn(()=>NR),multi:!0};let NR=(()=>{class i extends $h{constructor(){super(...arguments),this.inputName="minlength",this.normalizeInput=e=>jz(e),this.createValidator=e=>dz(e)}}return i.\u0275fac=function(){let t;return function(n){return(t||(t=ri(i)))(n||i)}}(),i.\u0275dir=ve({type:i,selectors:[["","minlength","","formControlName",""],["","minlength","","formControl",""],["","minlength","","ngModel",""]],hostVars:1,hostBindings:function(e,n){2&e&&Dt("minlength",n._enabled?n.minlength:null)},inputs:{minlength:"minlength"},features:[Dn([_te]),lt]}),i})();const vte={provide:Yr,useExisting:Gn(()=>BR),multi:!0};let BR=(()=>{class i extends $h{constructor(){super(...arguments),this.inputName="maxlength",this.normalizeInput=e=>jz(e),this.createValidator=e=>uz(e)}}return i.\u0275fac=function(){let t;return function(n){return(t||(t=ri(i)))(n||i)}}(),i.\u0275dir=ve({type:i,selectors:[["","maxlength","","formControlName",""],["","maxlength","","formControl",""],["","maxlength","","ngModel",""]],hostVars:1,hostBindings:function(e,n){2&e&&Dt("maxlength",n._enabled?n.maxlength:null)},inputs:{maxlength:"maxlength"},features:[Dn([vte]),lt]}),i})(),Zz=(()=>{class i{}return i.\u0275fac=function(e){return new(e||i)},i.\u0275mod=nn({type:i}),i.\u0275inj=Kt({imports:[Uz]}),i})();class Qz extends lC{constructor(t,e,n){super(CR(e),SR(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={}){Tz(this,!1,t),t.forEach((n,r)=>{Dz(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 Jz(i){return!!i&&(void 0!==i.asyncValidators||void 0!==i.validators||void 0!==i.updateOn)}let bte=(()=>{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 Jz(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 Iz(r,n)}control(e,n,r){let s={};return this.useNonNullable?(Jz(n)?s=n:(s.validators=n,s.asyncValidators=r),new nc(e,{...s,nonNullable:!0})):new nc(e,n,r)}array(e,n,r){const s=e.map(o=>this._createControl(o));return new Qz(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 nc||e instanceof lC?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=ke({token:i,factory:i.\u0275fac,providedIn:"root"}),i})(),eH=(()=>{class i{static withConfig(e){return{ngModule:i,providers:[{provide:Hh,useValue:e.callSetDisabledState??lb}]}}}return i.\u0275fac=function(e){return new(e||i)},i.\u0275mod=nn({type:i}),i.\u0275inj=Kt({imports:[Zz]}),i})(),tH=(()=>{class i{static withConfig(e){return{ngModule:i,providers:[{provide:RR,useValue:e.warnOnNgModelWithFormControl??"always"},{provide:Hh,useValue:e.callSetDisabledState??lb}]}}}return i.\u0275fac=function(e){return new(e||i)},i.\u0275mod=nn({type:i}),i.\u0275inj=Kt({imports:[Zz]}),i})();const xte=["matFormFieldNotchedOutline",""],wte=["*"],Mte=["textField"],Cte=["iconPrefixContainer"],Ste=["textPrefixContainer"];function Ete(i,t){1&i&&De(0,"span",19)}function Ate(i,t){if(1&i){const e=di();W(0,"label",17),Ue("cdkObserveContent",function(){return an(e),zt(he(2)._refreshOutlineNotchWidth())}),Wt(1,1),fe(2,Ete,1,0,"span",18),j()}if(2&i){const e=he(2);U("floating",e._shouldLabelFloat())("cdkObserveContentDisabled",!e._hasOutline())("id",e._labelId),Dt("for",e._control.id)("aria-owns",e._control.id),G(2),U("ngIf",!e.hideRequiredMarker&&e._control.required)}}function Dte(i,t){1&i&&fe(0,Ate,3,6,"label",16),2&i&&U("ngIf",he()._hasFloatingLabel())}function Tte(i,t){1&i&&De(0,"div",20)}function Ite(i,t){}function Rte(i,t){1&i&&fe(0,Ite,0,0,"ng-template",22),2&i&&(he(2),U("ngTemplateOutlet",Zi(1)))}function kte(i,t){if(1&i&&(W(0,"div",21),fe(1,Rte,1,1,"ng-template",9),j()),2&i){const e=he();U("matFormFieldNotchedOutlineOpen",e._shouldLabelFloat())("matFormFieldNotchedOutlineLabelWidth",e._labelWidth),G(1),U("ngIf",!e._forceDisplayInfixLabel())}}function Pte(i,t){1&i&&(W(0,"div",23,24),Wt(2,2),j())}function Ote(i,t){1&i&&(W(0,"div",25,26),Wt(2,3),j())}function Fte(i,t){}function Lte(i,t){1&i&&fe(0,Fte,0,0,"ng-template",22),2&i&&(he(),U("ngTemplateOutlet",Zi(1)))}function Nte(i,t){1&i&&(W(0,"div",27),Wt(1,4),j())}function Bte(i,t){1&i&&(W(0,"div",28),Wt(1,5),j())}function Ute(i,t){1&i&&De(0,"div",29)}function Vte(i,t){1&i&&(W(0,"div",30),Wt(1,6),j()),2&i&&U("@transitionMessages",he()._subscriptAnimationState)}function zte(i,t){if(1&i&&(W(0,"mat-hint",34),Ve(1),j()),2&i){const e=he(2);U("id",e._hintLabelId),G(1),_i(e.hintLabel)}}function Hte(i,t){if(1&i&&(W(0,"div",31),fe(1,zte,2,2,"mat-hint",32),Wt(2,7),De(3,"div",33),Wt(4,8),j()),2&i){const e=he();U("@transitionMessages",e._subscriptAnimationState),G(1),U("ngIf",e.hintLabel)}}const Gte=["*",[["mat-label"]],[["","matPrefix",""],["","matIconPrefix",""]],[["","matTextPrefix",""]],[["","matTextSuffix",""]],[["","matSuffix",""],["","matIconSuffix",""]],[["mat-error"],["","matError",""]],[["mat-hint",3,"align","end"]],[["mat-hint","align","end"]]],$te=["*","mat-label","[matPrefix], [matIconPrefix]","[matTextPrefix]","[matTextSuffix]","[matSuffix], [matIconSuffix]","mat-error, [matError]","mat-hint:not([align='end'])","mat-hint[align='end']"];let To=(()=>{class i{}return i.\u0275fac=function(e){return new(e||i)},i.\u0275dir=ve({type:i,selectors:[["mat-label"]]}),i})(),Wte=0;const nH=new me("MatError");let jte=(()=>{class i{constructor(e,n){this.id="mat-mdc-error-"+Wte++,e||n.nativeElement.setAttribute("aria-live","polite")}}return i.\u0275fac=function(e){return new(e||i)(ya("aria-live"),E(mt))},i.\u0275dir=ve({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&&Yl("id",n.id)},inputs:{id:"id"},features:[Dn([{provide:nH,useExisting:i}])]}),i})(),Yte=0,iH=(()=>{class i{constructor(){this.align="start",this.id="mat-mdc-hint-"+Yte++}}return i.\u0275fac=function(e){return new(e||i)},i.\u0275dir=ve({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&&(Yl("id",n.id),Dt("align",null),un("mat-mdc-form-field-hint-end","end"===n.align))},inputs:{align:"align",id:"id"}}),i})();const rH=new me("MatPrefix");let qte=(()=>{class i{constructor(){this._isText=!1}set _isTextSelector(e){this._isText=!0}}return i.\u0275fac=function(e){return new(e||i)},i.\u0275dir=ve({type:i,selectors:[["","matPrefix",""],["","matIconPrefix",""],["","matTextPrefix",""]],inputs:{_isTextSelector:["matTextPrefix","_isTextSelector"]},features:[Dn([{provide:rH,useExisting:i}])]}),i})();const sH=new me("MatSuffix");let Xte=(()=>{class i{constructor(){this._isText=!1}set _isTextSelector(e){this._isText=!0}}return i.\u0275fac=function(e){return new(e||i)},i.\u0275dir=ve({type:i,selectors:[["","matSuffix",""],["","matIconSuffix",""],["","matTextSuffix",""]],inputs:{_isTextSelector:["matTextSuffix","_isTextSelector"]},features:[Dn([{provide:sH,useExisting:i}])]}),i})(),oH=(()=>{class i{constructor(e){this._elementRef=e,this.floating=!1}getWidth(){return function Kte(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)(E(mt))},i.\u0275dir=ve({type:i,selectors:[["label","matFormFieldFloatingLabel",""]],hostAttrs:[1,"mdc-floating-label","mat-mdc-floating-label"],hostVars:2,hostBindings:function(e,n){2&e&&un("mdc-floating-label--float-above",n.floating)},inputs:{floating:"floating"}}),i})();const aH="mdc-line-ripple--active",pC="mdc-line-ripple--deactivating";let lH=(()=>{class i{constructor(e,n){this._elementRef=e,this._handleTransitionEnd=r=>{const s=this._elementRef.nativeElement.classList,o=s.contains(pC);"opacity"===r.propertyName&&o&&s.remove(aH,pC)},n.runOutsideAngular(()=>{e.nativeElement.addEventListener("transitionend",this._handleTransitionEnd)})}activate(){const e=this._elementRef.nativeElement.classList;e.remove(pC),e.add(aH)}deactivate(){this._elementRef.nativeElement.classList.add(pC)}ngOnDestroy(){this._elementRef.nativeElement.removeEventListener("transitionend",this._handleTransitionEnd)}}return i.\u0275fac=function(e){return new(e||i)(E(mt),E(ft))},i.\u0275dir=ve({type:i,selectors:[["div","matFormFieldLineRipple",""]],hostAttrs:[1,"mdc-line-ripple"]}),i})(),cH=(()=>{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)(E(mt),E(ft))},i.\u0275cmp=ot({type:i,selectors:[["div","matFormFieldNotchedOutline",""]],hostAttrs:[1,"mdc-notched-outline"],hostVars:2,hostBindings:function(e,n){2&e&&un("mdc-notched-outline--notched",n.open)},inputs:{labelWidth:["matFormFieldNotchedOutlineLabelWidth","labelWidth"],open:["matFormFieldNotchedOutlineOpen","open"]},attrs:xte,ngContentSelectors:wte,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&&(sr(),De(0,"div",0),W(1,"div",1),Wt(2),j(),De(3,"div",2)),2&e&&(G(1),jo("width",n._getNotchWidth()))},encapsulation:2,changeDetection:0}),i})();const Zte={transitionMessages:Ra("transitionMessages",[Ps("enter",si({opacity:1,transform:"translateY(0%)"})),Pr("void => enter",[si({opacity:0,transform:"translateY(-5px)"}),jr("300ms cubic-bezier(0.55, 0, 0.55, 0.2)")])])};let UR=(()=>{class i{}return i.\u0275fac=function(e){return new(e||i)},i.\u0275dir=ve({type:i}),i})();const mC=new me("MatFormField"),Qte=new me("MAT_FORM_FIELD_DEFAULT_OPTIONS");let dH=0,vl=(()=>{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-"+dH++,this._hintLabelId="mat-mdc-hint-"+dH++,this._subscriptAnimationState="",this._labelWidth=0,this._destroyed=new Re,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(He(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(),Mr(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(He(this._destroyed)).subscribe(()=>{this._needsOutlineLabelOffsetUpdateOnStable&&(this._needsOutlineLabelOffsetUpdateOnStable=!1,this._updateOutlineLabelOffset())})}),this._dir.change.pipe(He(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)(E(mt),E(Zn),E(ft),E(Ia),E(zi),E(Qte,8),E(Rr,8),E(jt))},i.\u0275cmp=ot({type:i,selectors:[["mat-form-field"]],contentQueries:function(e,n,r){if(1&e&&(Wi(r,To,5),Wi(r,To,7),Wi(r,UR,5),Wi(r,rH,5),Wi(r,sH,5),Wi(r,nH,5),Wi(r,iH,5)),2&e){let s;Et(s=At())&&(n._labelChildNonStatic=s.first),Et(s=At())&&(n._labelChildStatic=s.first),Et(s=At())&&(n._formFieldControl=s.first),Et(s=At())&&(n._prefixChildren=s),Et(s=At())&&(n._suffixChildren=s),Et(s=At())&&(n._errorChildren=s),Et(s=At())&&(n._hintChildren=s)}},viewQuery:function(e,n){if(1&e&&(Wn(Mte,5),Wn(Cte,5),Wn(Ste,5),Wn(oH,5),Wn(cH,5),Wn(lH,5)),2&e){let r;Et(r=At())&&(n._textField=r.first),Et(r=At())&&(n._iconPrefixContainer=r.first),Et(r=At())&&(n._textPrefixContainer=r.first),Et(r=At())&&(n._floatingLabel=r.first),Et(r=At())&&(n._notchedOutline=r.first),Et(r=At())&&(n._lineRipple=r.first)}},hostAttrs:[1,"mat-mdc-form-field"],hostVars:42,hostBindings:function(e,n){2&e&&un("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:[Dn([{provide:mC,useExisting:i}])],ngContentSelectors:$te,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&&(sr(Gte),fe(0,Dte,1,1,"ng-template",null,0,Vc),W(2,"div",1,2),Ue("click",function(s){return n._control.onContainerClick&&n._control.onContainerClick(s)}),fe(4,Tte,1,0,"div",3),W(5,"div",4),fe(6,kte,2,3,"div",5),fe(7,Pte,3,0,"div",6),fe(8,Ote,3,0,"div",7),W(9,"div",8),fe(10,Lte,1,1,"ng-template",9),Wt(11),j(),fe(12,Nte,2,0,"div",10),fe(13,Bte,2,0,"div",11),j(),fe(14,Ute,1,0,"div",12),j(),W(15,"div",13),fe(16,Vte,2,1,"div",14),fe(17,Hte,5,2,"div",15),j()),2&e&&(G(2),un("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),G(2),U("ngIf",!n._hasOutline()&&!n._control.disabled),G(2),U("ngIf",n._hasOutline()),G(1),U("ngIf",n._hasIconPrefix),G(1),U("ngIf",n._hasTextPrefix),G(2),U("ngIf",!n._hasOutline()||n._forceDisplayInfixLabel()),G(2),U("ngIf",n._hasTextSuffix),G(1),U("ngIf",n._hasIconSuffix),G(1),U("ngIf",!n._hasOutline()),G(1),un("mat-mdc-form-field-subscript-dynamic-size","dynamic"===n.subscriptSizing),U("ngSwitch",n._getDisplayedMessages()),G(1),U("ngSwitchCase","error"),G(1),U("ngSwitchCase","hint"))},dependencies:[vi,xy,by,VT,CU,iH,oH,cH,lH],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:[Zte.transitionMessages]},changeDetection:0}),i})(),gC=(()=>{class i{}return i.\u0275fac=function(e){return new(e||i)},i.\u0275mod=nn({type:i}),i.\u0275inj=Kt({imports:[Qn,Eo,HI,Qn]}),i})();const fH=Oh({passive:!0});let tne=(()=>{class i{constructor(e,n){this._platform=e,this._ngZone=n,this._monitoredElements=new Map}monitor(e){if(!this._platform.isBrowser)return po;const n=Yc(e),r=this._monitoredElements.get(n);if(r)return r.subject;const s=new Re,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,fH),n.classList.add("cdk-text-field-autofill-monitored")}),this._monitoredElements.set(n,{subject:s,unlisten:()=>{n.removeEventListener("animationstart",a,fH)}}),s}stopMonitoring(e){const n=Yc(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)(ee(zi),ee(ft))},i.\u0275prov=ke({token:i,factory:i.\u0275fac,providedIn:"root"}),i})(),nne=(()=>{class i{}return i.\u0275fac=function(e){return new(e||i)},i.\u0275mod=nn({type:i}),i.\u0275inj=Kt({}),i})();const VR=new me("MAT_INPUT_VALUE_ACCESSOR"),ine=["button","checkbox","file","hidden","image","radio","range","reset","submit"];let rne=0;const sne=$U(class{constructor(i,t,e,n){this._defaultErrorStateMatcher=i,this._parentForm=t,this._parentFormGroup=e,this.ngControl=n,this.stateChanges=new Re}});let ic=(()=>{class i extends sne{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(_l.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&&oU().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,d,h){super(a,s,o,r),this._elementRef=e,this._platform=n,this._autofillMonitor=c,this._formField=h,this._uid="mat-input-"+rne++,this.focused=!1,this.stateChanges=new Re,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=>oU().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&&d.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(){ine.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)(E(mt),E(zi),E(ec,10),E(ub,8),E(Gh,8),E(jU),E(VR,10),E(tne),E(ft),E(mC,8))},i.\u0275dir=ve({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&&Ue("focus",function(){return n._focusChanged(!0)})("blur",function(){return n._focusChanged(!1)})("input",function(){return n._onInput()}),2&e&&(Yl("id",n.id)("disabled",n.disabled)("required",n.required),Dt("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),un("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:[Dn([{provide:UR,useExisting:i}]),lt,bi]}),i})(),pH=(()=>{class i{}return i.\u0275fac=function(e){return new(e||i)},i.\u0275mod=nn({type:i}),i.\u0275inj=Kt({imports:[Qn,gC,gC,nne,Qn]}),i})();function one(i,t){if(1&i&&(W(0,"mat-label"),Ve(1),j()),2&i){const e=he(2);G(1),_i(e.resource.name)}}function ane(i,t){if(1&i){const e=di();W(0,"mat-form-field",1),fe(1,one,2,1,"mat-label",2),W(2,"input",3),Ue("ngModelChange",function(r){return an(e),zt(he().resource.data=r)})("change",function(){return an(e),zt(he().changed.emit())}),j()()}if(2&i){const e=he();U("matTooltip",e.resourceDescription),G(1),U("ngIf",e.resource.name),G(1),U("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 lne=(()=>{class i{constructor(){this.resource=null,this.resourceDescription="",this.disabled=!1,this.changed=new We}}return i.\u0275fac=function(e){return new(e||i)},i.\u0275cmp=ot({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&&fe(0,ane,3,7,"mat-form-field",0),2&e&&U("ngIf",n.resource)},dependencies:[vi,gl,mu,tc,_u,gu,Kc,vl,To,ic,Os],changeDetection:0}),i})();function cne(i,t){if(1&i&&(W(0,"mat-label"),Ve(1),j()),2&i){const e=he(2);G(1),_i(e.resource.name)}}function dne(i,t){if(1&i){const e=di();W(0,"mat-form-field",1),fe(1,cne,2,1,"mat-label",2),W(2,"input",3),Ue("ngModelChange",function(r){return an(e),zt(he().resource.data=r)})("change",function(){return an(e),zt(he().changed.emit())}),j()()}if(2&i){const e=he();U("matTooltip",e.resourceDescription),G(1),U("ngIf",e.resource.name),G(1),U("disabled",e.disabled||void 0!==e.resource.schema.required_value)("maxlength",e.maxLength)("minlength",e.minLength)("ngModel",e.resource.data)}}let mH=(()=>{class i{constructor(){this._resource=null,this.resourceDescription="",this.disabled=!1,this.changed=new We,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=ot({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&&fe(0,dne,3,6,"mat-form-field",0),2&e&&U("ngIf",n.resource)},dependencies:[vi,gl,tc,NR,BR,Kc,vl,To,ic,Os],changeDetection:0}),i})();const rc=(i,t)=>i+(i.includes("__")?"/":"__")+t,Wh=function(){return[]};function une(i,t){if(1&i&&(W(0,"mat-panel-description"),Ve(1," Click to view items ("),W(2,"b"),Ve(3),j(),Ve(4,") "),j()),2&i){const e=he(2);G(3),_i((e.resourceData||so(1,Wh)).length)}}function hne(i,t){1&i&&(W(0,"mat-panel-description"),Ve(1," Empty array "),j())}function fne(i,t){}function pne(i,t){if(1&i){const e=di();W(0,"mat-expansion-panel",4),Ue("opened",function(){return an(e),zt(he().onContentsTrigger(!0))})("closed",function(){return an(e),zt(he().onContentsTrigger(!1))}),W(1,"mat-expansion-panel-header",5)(2,"mat-panel-title"),Ve(3),j(),fe(4,une,5,2,"mat-panel-description",1),fe(5,hne,2,0,"mat-panel-description",1),j(),fe(6,fne,0,0,"ng-template",6),j()}if(2&i){const e=he(),n=Zi(3);G(1),U("matTooltip",e.resourceDescription),G(2),Qi(" ",e.name," "),G(1),U("ngIf",(e.resourceData||so(5,Wh)).length>0),G(1),U("ngIf",0==(e.resourceData||so(6,Wh)).length),G(1),U("ngTemplateOutlet",n)}}function mne(i,t){}function gne(i,t){if(1&i&&(Gr(0),W(1,"h2",5),Ve(2),j(),W(3,"div",7),fe(4,mne,0,0,"ng-template",6),j(),$r()),2&i){const e=he(),n=Zi(3);G(1),U("matTooltip",e.resourceDescription),G(1),_i(e.name),G(2),U("ngTemplateOutlet",n)}}function _ne(i,t){}function vne(i,t){if(1&i&&De(0,"app-editor",10),2&i){const e=he().$implicit,n=he(3);U("resource",n.children[n.pageIndex*n.pageSize+e])("disabled",n.disabled)}}function yne(i,t){if(1&i&&(Gr(0),fe(1,vne,1,2,"app-editor",9),$r()),2&i){const e=t.$implicit,n=he(3);G(1),U("ngIf",n.pageIndex*n.pageSize+e0)}let zR=(()=>{class i{constructor(e,n){this.main=e,this.cdr=n,this._resource=null,this.resourceDescription="",this.disabled=!1,this.changed=new We,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 Re}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:rc(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(He(this.destroyed$),gn(([n,r])=>!!this.resource&&n.startsWith(this.resource.id)&&!n.substring(this.resource.id.length+1).includes("/"))).subscribe(function(){var n=tt(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 gt(null),this.imageUrl$=new gt(null),this.destroyed$=new Re,this.changed=new We}set resource(e){this._resource$.next(e)}get resource(){return this._resource$.getValue()}ngAfterViewInit(){var e=this;return tt(function*(){e._resource$.pipe(He(e.destroyed$)).subscribe(function(){var n=tt(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)(E(Ql),E(ka))},i.\u0275cmp=ot({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&&(De(0,"app-compound-block-ui",0),Ct(1,"async"),fe(2,Dne,2,3,"img",1),Ct(3,"async")),2&e&&(U("resource",Tt(1,3,n._resource$))("fieldBlacklist",so(7,Tne)),G(2),U("ngIf",Tt(3,5,n.imageUrl$)))},dependencies:[vi,Jl,pl],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 Rne=["*"],Lne=new me("MAT_CARD_CONFIG");let gH=(()=>{class i{constructor(e){this.appearance=e?.appearance||"raised"}}return i.\u0275fac=function(e){return new(e||i)(E(Lne,8))},i.\u0275cmp=ot({type:i,selectors:[["mat-card"]],hostAttrs:[1,"mat-mdc-card","mdc-card"],hostVars:4,hostBindings:function(e,n){2&e&&un("mat-mdc-card-outlined","outlined"===n.appearance)("mdc-card--outlined","outlined"===n.appearance)},inputs:{appearance:"appearance"},exportAs:["matCard"],ngContentSelectors:Rne,decls:1,vars:0,template:function(e,n){1&e&&(sr(),Wt(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})(),_H=(()=>{class i{}return i.\u0275fac=function(e){return new(e||i)},i.\u0275mod=nn({type:i}),i.\u0275inj=Kt({imports:[Qn,Eo,Qn]}),i})();class HR{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 Re,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 GR=(()=>{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=ke({token:i,factory:i.\u0275fac,providedIn:"root"}),i})(),aie=(()=>{class i{}return i.\u0275fac=function(e){return new(e||i)},i.\u0275mod=nn({type:i}),i.\u0275inj=Kt({imports:[Qn,Eo,eb,Qn]}),i})();const MH={transformPanel:Ra("transformPanel",[Pr("void => enter-dropdown",jr("120ms cubic-bezier(0, 0, 0.2, 1)",rV([si({opacity:0,transform:"scale(1, 0.8)"}),si({opacity:1,transform:"scale(1, 1)"})]))),Pr("void => enter-dialog",jr("150ms cubic-bezier(0, 0, 0.2, 1)",rV([si({opacity:0,transform:"scale(0.7)"}),si({transform:"none",opacity:1})]))),Pr("* => void",jr("100ms linear",si({opacity:0})))]),fadeInCalendar:Ra("fadeInCalendar",[Ps("void",si({opacity:0})),Ps("enter",si({opacity:1})),Pr("void => *",jr("120ms 100ms cubic-bezier(0.55, 0, 0.55, 0.2)"))])},EH=function(i){return{active:i}};function Sie(i,t){if(1&i){const e=di();W(0,"button",2),Ue("click",function(){const s=an(e).$implicit;return zt(he().select(s))}),j()}if(2&i){const e=t.$implicit,n=he();jo("background-color",e),U("ngClass",sm(3,EH,n.selectedColor===e))}}function Eie(i,t){if(1&i){const e=di();W(0,"button",2),Ue("click",function(){const s=an(e).$implicit;return zt(he().select(s))}),j()}if(2&i){const e=t.$implicit,n=he();jo("background-color",e),U("ngClass",sm(3,EH,n.selectedColor===e))}}const Aie=["button"],Die=/^\s+/,Tie=/\s+$/,$m=Math.round,Iie=(Math,Math,Math,/[^0-9]/g),AH=["#ffffff","#ffff00","#ff00ff","#ff0000","#c0c0c0","#808080","#808000","#800080","#800000","#00ffff","#00ff00","#008080","#008000","#0000ff","#000080","#000000"];function DH(i,t,e){const n=i.getImageData(t,e,1,1).data;return{r:n[0],g:n[1],b:n[2]}}function jh(i){return 1==i.length?"0"+i:""+i}function kie(i){return Math.round(255*parseFloat(i)).toString(16)}function TH(i){return Ko(i)/255}function Ko(i){return parseInt(i,16)}function IH(i,t,e,n){var r=[jh($m(i).toString(16)),jh($m(t).toString(16)),jh($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 vu="(?:[-\\+]?\\d*\\.\\d+%?)|(?:[-\\+]?\\d+%?)",jR="[\\s|\\(]+("+vu+")[,|\\s]+("+vu+")[,|\\s]+("+vu+")\\s*\\)?",YR="[\\s|\\(]+("+vu+")[,|\\s]+("+vu+")[,|\\s]+("+vu+")[,|\\s]+("+vu+")\\s*\\)?",Yh={CSS_UNIT:new RegExp(vu),rgb:new RegExp("rgb"+jR),rgba:new RegExp("rgba"+YR),hsl:new RegExp("hsl"+jR),hsla:new RegExp("hsla"+YR),hsv:new RegExp("hsv"+jR),hsva:new RegExp("hsva"+YR),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 qR(i){let t;return i=i.replace(Die,"").replace(Tie,"").toLowerCase(),(t=Yh.rgb.exec(i))?{r:t[1],g:t[2],b:t[3],a:1}:(t=Yh.rgba.exec(i))?{r:t[1],g:t[2],b:t[3],a:t[4]}:(t=Yh.hex8.exec(i))?{r:Ko(t[1]),g:Ko(t[2]),b:Ko(t[3]),a:TH(t[4])}:(t=Yh.hex6.exec(i))?{r:Ko(t[1]),g:Ko(t[2]),b:Ko(t[3]),a:1}:(t=Yh.hex4.exec(i))?{r:Ko(t[1]+""+t[1]),g:Ko(t[2]+""+t[2]),b:Ko(t[3]+""+t[3]),a:TH(t[4]+""+t[4])}:(t=Yh.hex3.exec(i))?{r:Ko(t[1]+""+t[1]),g:Ko(t[2]+""+t[2]),b:Ko(t[3]+""+t[3]),a:1}:null}class qh{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=IH(this.r,this.g,this.b),this.rgba=this.toRgba()}toHex(t){return IH(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 Rie(i,t,e,n,r){var s=[jh($m(i).toString(16)),jh($m(t).toString(16)),jh($m(e).toString(16)),jh(kie(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 RH=(()=>{class i{constructor(e,n){this.zone=e,this.colorChanged=new We,this.x=0,this.y=0,this.drag=!1,this._destroyed=new Re,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){xo()},i.\u0275dir=ve({type:i,inputs:{color:"color"},outputs:{colorChanged:"colorChanged"}}),i})(),Fie=(()=>{class i extends RH{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}=DH(this.ctx,e.offsetX,e.offsetY);this.emitChange(new qh(n,r,s))}}return i.\u0275fac=function(e){return new(e||i)(E(ft))},i.\u0275cmp=ot({type:i,selectors:[["ngx-mat-color-slider"]],features:[lt],decls:1,vars:0,consts:[["id","color-strip","width","15","height","234",1,"zone-strip",3,"mousedown","mouseup"]],template:function(e,n){1&e&&(W(0,"canvas",0),Ue("mousedown",function(s){return n.onMousedown(s)})("mouseup",function(s){return n.onMouseup(s)}),j())}}),i})(),Lie=(()=>{class i{constructor(){}onInput(e){this._formatInput(e.target)}_formatInput(e){let n=Number(e.value.replace(Iie,""));n=isNaN(n)?0:n,e.value=n}}return i.\u0275fac=function(e){return new(e||i)},i.\u0275dir=ve({type:i,selectors:[["","ngxMatNumericColorInput",""]],hostBindings:function(e,n){1&e&&Ue("input",function(s){return n.onInput(s)})}}),i})(),Bie=(()=>{class i extends RH{constructor(e){super(e,"color-block"),this.zone=e,this._resetBaseColor=!0,this.formGroup=new Hm({r:new nc(null,[_l.required]),g:new nc(null,[_l.required]),b:new nc(null,[_l.required]),a:new nc(null,[_l.required]),hex:new nc(null,[_l.required,_l.pattern(Yh.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(){Mr(this.rCtrl.valueChanges,this.gCtrl.valueChanges,this.bCtrl.valueChanges,this.aCtrl.valueChanges).pipe(He(this._destroyed),ml(400)).subscribe(r=>{const s=new qh(Number(this.rCtrl.value),Number(this.gCtrl.value),Number(this.bCtrl.value),Number(this.aCtrl.value));this.emitChange(s)}),this.hexCtrl.valueChanges.pipe(He(this._destroyed),ml(400),Zl()).subscribe(r=>{const s=qR(r);if(null!=s){const o=new qh(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}=DH(this.ctx,e.offsetX,e.offsetY);this.emitChange(new qh(n,r,s))}}return i.\u0275fac=function(e){return new(e||i)(E(ft))},i.\u0275cmp=ot({type:i,selectors:[["ngx-mat-color-canvas"]],hostAttrs:[1,"ngx-mat-color-canvas"],features:[lt,bi],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&&(W(0,"form",0)(1,"div",1)(2,"div",2)(3,"canvas",3),Ue("mousedown",function(s){return n.onMousedown(s)})("mouseup",function(s){return n.onMouseup(s)}),j(),W(4,"ngx-mat-color-slider",4),Ue("colorChanged",function(s){return n.onSliderColorChanged(s)}),j()(),W(5,"div",5)(6,"mat-form-field")(7,"mat-label"),Ve(8,"R"),j(),De(9,"input",6),j(),W(10,"mat-form-field")(11,"mat-label"),Ve(12,"G"),j(),De(13,"input",7),j(),W(14,"mat-form-field")(15,"mat-label"),Ve(16,"B"),j(),De(17,"input",8),j()()(),W(18,"div",1),De(19,"button",9),W(20,"mat-form-field")(21,"mat-label"),Ve(22,"HEX6"),j(),W(23,"mat-label",10),Ve(24,"#\xa0"),j(),De(25,"input",11),j(),W(26,"mat-form-field",12)(27,"mat-label"),Ve(28,"A"),j(),De(29,"input",13),j()()()),2&e&&(U("formGroup",n.formGroup),G(19),jo("background-color",(null==n.color?null:n.color.rgba)||"transparent"))},dependencies:[ic,vl,To,qte,MV,IR,gl,mu,tc,bR,_u,gu,Gh,fC,Fie,Lie],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})(),Uie=(()=>{class i{constructor(){this.colorChanged=new We,this.colors1=AH.slice(0,8),this.colors2=AH.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}=qR(e);this.colorChanged.emit(new qh(n,r,s,o))}}return i.\u0275fac=function(e){return new(e||i)},i.\u0275cmp=ot({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&&(W(0,"div",0),fe(1,Sie,1,5,"button",1),j(),W(2,"div",0),fe(3,Eie,1,5,"button",1),j()),2&e&&(G(1),U("ngForOf",n.colors1),G(2),U("ngForOf",n.colors2))},dependencies:[hm,So,MV],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})(),kH=(()=>{class i{constructor(){this.colorChanged=new We}ngOnInit(){}handleColorChanged(e){this.colorChanged.emit(e)}}return i.\u0275fac=function(e){return new(e||i)},i.\u0275cmp=ot({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&&(W(0,"ngx-mat-color-canvas",0),Ue("colorChanged",function(s){return n.handleColorChanged(s)}),j(),W(1,"ngx-mat-color-collection",0),Ue("colorChanged",function(s){return n.handleColorChanged(s)}),j()),2&e&&(U("color",n.color),G(1),U("color",n.color))},dependencies:[Bie,Uie],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})(),XR=(()=>{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=qR(e);return n?new qh(n.r,n.g,n.b,n.a):null}}return i.\u0275fac=function(e){return new(e||i)},i.\u0275prov=ke({token:i,factory:i.\u0275fac}),i})();const Vie={display:{colorInput:"hex"}},PH=new me("mat-color-formats"),OH=new me("ngx-mat-colorpicker-scroll-strategy"),Hie={provide:OH,deps:[as],useFactory:function zie(i){return()=>i.scrollStrategies.reposition()}},Gie=Qy(class{constructor(i){this._elementRef=i}});let FH=(()=>{class i extends Gie{constructor(e){super(e)}}return i.\u0275fac=function(e){return new(e||i)(E(mt))},i.\u0275cmp=ot({type:i,selectors:[["ngx-mat-color-picker-content"]],viewQuery:function(e,n){if(1&e&&Wn(kH,5),2&e){let r;Et(r=At())&&(n._palette=r.first)}},hostAttrs:[1,"ngx-mat-colorpicker-content"],hostVars:3,hostBindings:function(e,n){2&e&&(Iw("@transformPanel","enter"),un("ngx-mat-colorpicker-content-touch",n.picker.touchUi))},inputs:{color:"color"},exportAs:["ngxMatColorPickerContent"],features:[lt],decls:1,vars:1,consts:[[3,"color","colorChanged"]],template:function(e,n){1&e&&(W(0,"ngx-mat-color-palette",0),Ue("colorChanged",function(s){return n.picker.select(s)}),j()),2&e&&U("color",n.picker._selected)},dependencies:[kH],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:[MH.transformPanel,MH.fadeInCalendar]},changeDetection:0}),i})(),LH=(()=>{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 We,this.closedStream=new We,this._touchUi=!1,this._opened=!1,this._defaultColor="primary",this._validSelected=null,this._disabledChange=new Re,this._focusedElementBeforeOpen=null,this._inputSubscription=Zt.EMPTY,this._selectedChanged=new Re,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(FH,{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 Lh(FH,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(Oi(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"),Mr(this._popupRef.backdropClick(),this._popupRef.detachments(),this._popupRef.keydownEvents().pipe(gn(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)(E(Bm),E(as),E(ft),E(XR),E(Ia,8),E(OH),E(jt,8),E(Wr))},i.\u0275cmp=ot({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 yC{constructor(t,e){this.target=t,this.targetElement=e,this.value=this.target.value}}const $ie={provide:Do,useExisting:Gn(()=>bC),multi:!0},Wie={provide:Yr,useExisting:Gn(()=>bC),multi:!0};let bC=(()=>{class i{constructor(e,n,r,s){if(this._elementRef=e,this._formField=n,this._colorFormats=r,this._adapter=s,this.colorChange=new We,this.colorInput=new We,this._disabledChange=new We,this._valueChange=new We,this._onTouched=()=>{},this._cvaOnChange=()=>{},this._validatorOnChange=()=>{},this._pickerSubscription=Zt.EMPTY,this._validator=_l.compose([]),this._lastValueValid=!1,!this._colorFormats)throw function Oie(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 yC(this,this._elementRef.nativeElement)),this.colorChange.emit(new yC(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 yC(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 yC(this,this._elementRef.nativeElement)))}}return i.\u0275fac=function(e){return new(e||i)(E(mt),E(vl,8),E(PH,8),E(XR))},i.\u0275dir=ve({type:i,selectors:[["input","ngxMatColorPicker",""]],hostVars:3,hostBindings:function(e,n){1&e&&Ue("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&&(Yl("disabled",n.disabled),Dt("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:[Dn([$ie,Wie,{provide:VR,useExisting:i}])]}),i})(),jie=(()=>{class i{constructor(e){this._cd=e,this._stateChanges=Zt.EMPTY}get disabled(){if(null==this._disabled&&this.picker)return this.picker.disabled}set disabled(e){this._disabled=e}ngOnInit(){}ngOnChanges(e){e.picker&&this._watchStateChanges()}ngOnDestroy(){this._stateChanges.unsubscribe()}ngAfterContentInit(){this._watchStateChanges()}open(e){this.picker&&!this.disabled&&(this.picker.open(),e.stopPropagation())}_watchStateChanges(){const e=this.picker?this.picker._disabledChange:ht(),n=this.picker&&this.picker._pickerInput?this.picker._pickerInput._disabledChange:ht(),r=this.picker?Mr(this.picker.openedStream,this.picker.closedStream):ht();this._stateChanges.unsubscribe(),this._stateChanges=Mr(e,n,r).subscribe(()=>this._cd.markForCheck())}}return i.\u0275fac=function(e){return new(e||i)(E(Zn))},i.\u0275cmp=ot({type:i,selectors:[["ngx-mat-color-toggle"]],viewQuery:function(e,n){if(1&e&&Wn(Aie,5),2&e){let r;Et(r=At())&&(n._button=r.first)}},hostAttrs:[1,"ngx-mat-color-toggle"],hostVars:7,hostBindings:function(e,n){1&e&&Ue("focus",function(){return n._button.focus()}),2&e&&(Dt("tabindex",-1),un("ngx-mat-color-toggle-active",n.picker&&n.picker.opened)("mat-accent",n.picker&&"accent"===n.picker.color)("mat-warn",n.picker&&"warn"===n.picker.color))},inputs:{picker:["for","picker"],tabIndex:"tabIndex",disabled:"disabled"},exportAs:["ngxMatColorPickerToggle"],features:[bi],decls:4,vars:5,consts:[["mat-icon-button","","type","button",3,"disabled","click"],["button",""]],template:function(e,n){1&e&&(W(0,"button",0,1),Ue("click",function(s){return n.open(s)}),W(2,"mat-icon"),Ve(3,"palette"),j()()),2&e&&(U("disabled",n.disabled),Dt("aria-haspopup",n.picker?"dialog":null)("tabindex",n.disabled?-1:n.tabIndex),G(2),jo("color",null==n.picker||null==n.picker._selected?null:n.picker._selected.rgba))},dependencies:[XM,gR],styles:[".mat-form-field-appearance .mat-form-field-prefix .ngx-mat-color-toggle-default-icon,.mat-form-field-appearance .mat-form-field-suffix .ngx-mat-color-toggle-default-icon{width:1em}.mat-form-field:not(.mat-form-field-appearance) .mat-form-field-prefix .ngx-mat-color-toggle-default-icon,.mat-form-field:not(.mat-form-field-appearance) .mat-form-field-suffix .ngx-mat-color-toggle-default-icon{display:block;width:1.5em;height:1.5em}.mat-form-field:not(.mat-form-field-appearance) .mat-form-field-prefix .mat-icon-button .ngx-mat-color-toggle-default-icon,.mat-form-field:not(.mat-form-field-appearance) .mat-form-field-suffix .mat-icon-button .ngx-mat-color-toggle-default-icon{margin:auto}\n"],encapsulation:2}),i})(),Yie=(()=>{class i{}return i.\u0275fac=function(e){return new(e||i)},i.\u0275mod=nn({type:i}),i.\u0275inj=Kt({providers:[XR,Hie],imports:[Eo,pH,KM,_H,aie,eH,tH,_V,Nh,ez]}),i})();const qie=["picker"],Xie=function(i){return{"background-color":i}};function Kie(i,t){if(1&i){const e=di();W(0,"div",5),Ue("click",function(r){const o=an(e).index;return zt(he().onColorClicked(r.currentTarget,o))}),j()}if(2&i){const e=t.$implicit,n=t.index,r=he();U("ngStyle",sm(2,Xie,"#"+r.lpad(e.toString(16),"0",8)))("matTooltip",n+": #"+e.toString(16))}}const Zie=function(){return["colors"]};let Qie=(()=>{class i{constructor(){this.resource=null,this.changed=new We,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 yU;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=ot({type:i,selectors:[["app-palette-block-ui"]],viewQuery:function(e,n){if(1&e&&Wn(qie,5),2&e){let r;Et(r=At())&&(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&&(De(0,"app-compound-block-ui",0),W(1,"div",1),fe(2,Kie,1,4,"div",2),j(),W(3,"input",3),Ue("colorChange",function(s){return n.onColorChange(s.value)}),j(),De(4,"ngx-mat-color-picker",null,4)),2&e){const r=Zi(5);U("resource",n.resource)("fieldBlacklist",so(4,Zie)),G(2),U("ngForOf",null==n.resourceData?null:n.resourceData.colors),G(1),U("ngxMatColorPicker",r)}},dependencies:[So,tM,ic,Os,bC,LH,Jl],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 Jie=["editor"];let ere=(()=>{class i{constructor(e){this.cdr=e,this._resource=null,this.resourceDescription="",this.disabled=!1,this.changed=new We,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)(E(Zn))},i.\u0275cmp=ot({type:i,selectors:[["app-binary-block-ui"]],viewQuery:function(e,n){if(1&e&&Wn(Jie,5),2&e){let r;Et(r=At())&&(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&&(W(0,"h2",0),Ve(1),j(),De(2,"div",null,1)),2&e&&(U("matTooltip",n.resourceDescription),G(1),_i(null==n.resource?null:n.resource.name))},dependencies:[Os],changeDetection:0}),i})();const tre=["picker"];function nre(i,t){if(1&i&&(W(0,"mat-label",8),Ve(1),j()),2&i){const e=he();G(1),_i(null==e.resource?null:e.resource.name)}}const ire=function(i){return{transform:i}};let rre=(()=>{class i{constructor(e){this.cdr=e,this.resource=null,this.resourceDescription="",this.changed=new We,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)(E(Zn))},i.\u0275cmp=ot({type:i,selectors:[["app-angle-block-ui"]],viewQuery:function(e,n){if(1&e&&Wn(tre,5),2&e){let r;Et(r=At())&&(n.picker=r.first)}},hostBindings:function(e,n){1&e&&Ue("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&&(W(0,"div",0)(1,"div",1,2)(3,"div",3),De(4,"div",4)(5,"div",5),j()(),W(6,"div",6),fe(7,nre,2,1,"mat-label",7),W(8,"mat-label"),Ve(9),Ct(10,"number"),j(),W(11,"mat-label"),Ve(12),Ct(13,"number"),j()()()),2&e&&(U("matTooltip",n.resourceDescription),G(3),U("ngStyle",sm(11,ire,"rotate("+((null==n.resource?null:n.resource.data)||0)+"rad)")),G(4),U("ngIf",null==n.resource?null:n.resource.name),G(2),Qi("",J1(10,5,180*(null==n.resource?null:n.resource.data)/n.pi||0,"1.2-2")," deg"),G(3),Qi("",J1(13,8,(null==n.resource?null:n.resource.data)||0,"1.2-2")," rad"))},dependencies:[vi,tM,To,Os,uB],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 NH{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,d=new Set;for(const h of e)!0===Array.isArray(h)?a.add(h):"object"==typeof h?l.add(h):"function"==typeof h?d.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===d.size){h=!0;for(const p of o)if(!1===d.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 sre(i,t){if(1&i&&(W(0,"mat-list-option",3),Ve(1),j()),2&i){const e=t.$implicit,n=he();U("value",e)("selected",n.selectedValue==e),G(1),Qi(" ",e," ")}}function ore(i,t){if(1&i&&(W(0,"mat-card"),De(1,"app-editor",4),j()),2&i){const e=he();G(1),U("resource",e.resources[e.selectedValue])}}let xC=(()=>{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)(E(NH))},i.\u0275cmp=ot({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&&(W(0,"mat-selection-list",0),Ue("selectionChange",function(s){return n.selectedValue=s.source.selectedOptions.selected[0].value}),fe(1,sre,2,3,"mat-list-option",1),j(),fe(2,ore,2,1,"mat-card",2)),2&e&&(U("multiple",!1),G(1),U("ngForOf",n.keys),G(1),U("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})(),are=(()=>{class i{constructor(){this._resource=null,this.resourceMap={},this.changed=new We}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",iR("@transformPanel",[nR()],{optional:!0}))]),transformPanel:Ra("transformPanel",[Ps("void",si({opacity:0,transform:"scale(1, 0.8)"})),Pr("void => showing",jr("120ms cubic-bezier(0, 0, 0.2, 1)",si({opacity:1,transform:"scale(1, 1)"}))),Pr("* => void",jr("100ms linear",si({opacity:0})))])};let BH=0;const UH=new me("mat-select-scroll-strategy"),yre=new me("MAT_SELECT_CONFIG"),bre={provide:UH,deps:[as],useFactory:function vre(i){return()=>i.scrollStrategies.reposition()}},xre=new me("MatSelectTrigger");class wre{constructor(t,e){this.source=t,this.value=e}}const Mre=YM(JI(jM($U(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 Re}}))));let Cre=(()=>{class i extends Mre{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(_l.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=ks(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,d,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=d,this._liveAnnouncer=g,this._defaultOptions=b,this._panelOpen=!1,this._compareWith=(v,y)=>v===y,this._uid="mat-select-"+BH++,this._triggerAriaLabelledBy=null,this._destroy=new Re,this._onChange=()=>{},this._onTouched=()=>{},this._valueId="mat-select-value-"+BH++,this._panelDoneAnimatingStream=new Re,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=Ey(()=>{const v=this.options;return v?v.changes.pipe(Ao(v),Rs(()=>Mr(...v.map(y=>y.onSelectionChange)))):this._ngZone.onStable.pipe(Oi(1),Rs(()=>this.optionSelectionChanges))}),this.openedChange=new We,this._openedStream=this.openedChange.pipe(gn(v=>v),et(()=>{})),this._closedStream=this.openedChange.pipe(gn(v=>!v),et(()=>{})),this.selectionChange=new We,this.valueChange=new We,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 HR(this.multiple),this.stateChanges.next(),this._panelDoneAnimatingStream.pipe(Zl(),He(this._destroy)).subscribe(()=>this._panelDoneAnimating(this.panelOpen))}ngAfterContentInit(){this._initKeyManager(),this._selectionModel.changed.pipe(He(this._destroy)).subscribe(e=>{e.added.forEach(n=>n.select()),e.removed.forEach(n=>n.deselect())}),this.options.changes.pipe(Ao(null),He(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&&!Xo(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||Xo(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(Oi(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 GZ(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=Mr(this.options.changes,this._destroy);this.optionSelectionChanges.pipe(He(e)).subscribe(n=>{this._onSelect(n.source,n.isUserInput),n.isUserInput&&!this.multiple&&this._panelOpen&&(this.close(),this.focus())}),Mr(...this.options.map(n=>n._stateChanges)).pipe(He(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)(E(LM),E(Zn),E(ft),E(jU),E(mt),E(Ia,8),E(ub,8),E(Gh,8),E(mC,8),E(ec,10),ya("tabindex"),E(UH),E(XI),E(yre,8))},i.\u0275dir=ve({type:i,viewQuery:function(e,n){if(1&e&&(Wn(lre,5),Wn(cre,5),Wn(xU,5)),2&e){let r;Et(r=At())&&(n.trigger=r.first),Et(r=At())&&(n.panel=r.first),Et(r=At())&&(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:[lt,bi]}),i})(),fb=(()=>{class i extends Cre{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(He(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 OQ(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 wre(this,e)}_getOverlayWidth(){return(this._preferredOverlayOrigin instanceof zI?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=ri(i)))(n||i)}}(),i.\u0275cmp=ot({type:i,selectors:[["mat-select"]],contentQueries:function(e,n,r){if(1&e&&(Wi(r,xre,5),Wi(r,Nm,5),Wi(r,eV,5)),2&e){let s;Et(s=At())&&(n.customTrigger=s.first),Et(s=At())&&(n.options=s),Et(s=At())&&(n.optionGroups=s)}},hostAttrs:["role","combobox","aria-autocomplete","none","aria-haspopup","listbox",1,"mat-mdc-select"],hostVars:19,hostBindings:function(e,n){1&e&&Ue("keydown",function(s){return n._handleKeydown(s)})("focus",function(){return n._onFocus()})("blur",function(){return n._onBlur()}),2&e&&(Dt("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()),un("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:[Dn([{provide:UR,useExisting:i},{provide:JU,useExisting:i}]),lt],ngContentSelectors:gre,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&&(sr(mre),W(0,"div",0,1),Ue("click",function(){return n.toggle()}),W(3,"div",2),fe(4,dre,2,1,"span",3),fe(5,fre,3,2,"span",4),j(),W(6,"div",5)(7,"div",6),ki(),W(8,"svg",7),De(9,"path",8),j()()()(),fe(10,pre,3,9,"ng-template",9),Ue("backdropClick",function(){return n.close()})("attach",function(){return n._onAttached()})("detach",function(){return n.close()})),2&e){const r=Zi(1);Dt("aria-owns",n.panelOpen?n.id+"-panel":null),G(3),U("ngSwitch",n.empty),Dt("id",n._valueId),G(1),U("ngSwitchCase",!0),G(1),U("ngSwitchCase",!1),G(5),U("cdkConnectedOverlayPanelClass",n._overlayPanelClass)("cdkConnectedOverlayScrollStrategy",n._scrollStrategy)("cdkConnectedOverlayOrigin",n._preferredOverlayOrigin||r)("cdkConnectedOverlayOpen",n.panelOpen)("cdkConnectedOverlayPositions",n._positions)("cdkConnectedOverlayWidth",n._overlayWidth)}},dependencies:[hm,by,VT,aB,xU,zI],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:[_re.transformPanel]},changeDetection:0}),i})(),VH=(()=>{class i{}return i.\u0275fac=function(e){return new(e||i)},i.\u0275mod=nn({type:i}),i.\u0275inj=Kt({providers:[bre],imports:[Eo,Pm,tR,Qn,Xy,gC,tR,Qn]}),i})();function Sre(i,t){if(1&i&&(W(0,"mat-label"),Ve(1),j()),2&i){const e=he(3);G(1),_i(e.resource.name)}}function Ere(i,t){if(1&i&&(W(0,"mat-option",6),Ve(1),j()),2&i){const e=t.$implicit,n=he(3);U("value",e[1])("disabled",n.disabled),G(1),Qi(" ",e[1]," ")}}function Are(i,t){if(1&i){const e=di();W(0,"mat-form-field",3),fe(1,Sre,2,1,"mat-label",0),W(2,"mat-select",4),Ue("valueChange",function(r){return an(e),zt(he(2).resource.data=r)})("selectionChange",function(){return an(e),zt(he(2).changed.emit())}),fe(3,Ere,2,3,"mat-option",5),j()()}if(2&i){const e=he(2);U("matTooltip",e.resourceDescription),G(1),U("ngIf",e.resource.name),G(1),U("value",e.resource.data)("disabled",e.disabled),G(1),U("ngForOf",e.resource.schema.enum_names)}}function Dre(i,t){if(1&i&&(W(0,"mat-label"),Ve(1),j()),2&i){const e=he(3);G(1),_i(e.resource.name)}}function Tre(i,t){if(1&i){const e=di();W(0,"mat-form-field",3),fe(1,Dre,2,1,"mat-label",0),W(2,"input",7),Ue("ngModelChange",function(r){return an(e),zt(he(2).resource.data=r)})("change",function(){return an(e),zt(he(2).changed.emit())}),j()()}if(2&i){const e=he(2);U("matTooltip",e.resourceDescription),G(1),U("ngIf",e.resource.name),G(1),U("min",0)("max",256*(e.resource.schema.length||1)-1)("ngModel",e.resource.data)}}function Ire(i,t){if(1&i&&(Gr(0),fe(1,Are,4,5,"mat-form-field",1),fe(2,Tre,3,5,"ng-template",null,2,Vc),$r()),2&i){const e=Zi(3),n=he();G(1),U("ngIf",n.isKnownEnumValue(n.resource.data))("ngIfElse",e)}}let Rre=(()=>{class i{constructor(){this.resource=null,this.resourceDescription="",this.disabled=!1,this.changed=new We}isKnownEnumValue(e){return!!this.resource?.schema.enum_names.find(([n,r])=>r==e)}}return i.\u0275fac=function(e){return new(e||i)},i.\u0275cmp=ot({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&&fe(0,Ire,4,2,"ng-container",0),2&e&&U("ngIf",n.resource)},dependencies:[So,vi,gl,mu,tc,_u,gu,Kc,vl,To,ic,Os,fb,Nm],changeDetection:0}),i})();const kre=["*"],Ore=["unscopedContent"];function Fre(i,t){1&i&&Wt(0,4)}function Lre(i,t){if(1&i&&(W(0,"div",11),De(1,"input",12),W(2,"div",13),ki(),W(3,"svg",14),De(4,"path",15),j(),ga(),De(5,"div",16),j()()),2&i){const e=he();un("mdc-checkbox--disabled",e.disabled),G(1),U("checked",e.selected)("disabled",e.disabled)}}function Nre(i,t){if(1&i&&(W(0,"div",17),De(1,"input",18),W(2,"div",19),De(3,"div",20)(4,"div",21),j()()),2&i){const e=he();un("mdc-radio--disabled",e.disabled),G(1),U("checked",e.selected)("disabled",e.disabled)}}function Bre(i,t){}function Ure(i,t){if(1&i&&(W(0,"span",22),fe(1,Bre,0,0,"ng-template",23),j()),2&i){he();const e=Zi(3);G(1),U("ngTemplateOutlet",e)}}function Vre(i,t){}function zre(i,t){if(1&i&&(W(0,"span",24),fe(1,Vre,0,0,"ng-template",23),j()),2&i){he();const e=Zi(5);G(1),U("ngTemplateOutlet",e)}}function Hre(i,t){}function Gre(i,t){1&i&&fe(0,Hre,0,0,"ng-template",23),2&i&&(he(),U("ngTemplateOutlet",Zi(1)))}function $re(i,t){}function Wre(i,t){if(1&i&&(W(0,"span",25),fe(1,$re,0,0,"ng-template",23),j()),2&i){he();const e=Zi(3);G(1),U("ngTemplateOutlet",e)}}function jre(i,t){}function Yre(i,t){if(1&i&&(W(0,"span",25),fe(1,jre,0,0,"ng-template",23),j()),2&i){he();const e=Zi(5);G(1),U("ngTemplateOutlet",e)}}function qre(i,t){}function Xre(i,t){1&i&&fe(0,qre,0,0,"ng-template",23),2&i&&(he(),U("ngTemplateOutlet",Zi(1)))}const Kre=[[["","matListItemTitle",""]],[["","matListItemLine",""]],"*",[["mat-divider"]],[["","matListItemAvatar",""],["","matListItemIcon",""]]],Zre=["[matListItemTitle]","[matListItemLine]","*","mat-divider","[matListItemAvatar],[matListItemIcon]"],zH=new me("ListOption");let Qre=(()=>{class i{constructor(e){this._elementRef=e}}return i.\u0275fac=function(e){return new(e||i)(E(mt))},i.\u0275dir=ve({type:i,selectors:[["","matListItemTitle",""]],hostAttrs:[1,"mat-mdc-list-item-title","mdc-list-item__primary-text"]}),i})(),Jre=(()=>{class i{constructor(e){this._elementRef=e}}return i.\u0275fac=function(e){return new(e||i)(E(mt))},i.\u0275dir=ve({type:i,selectors:[["","matListItemLine",""]],hostAttrs:[1,"mat-mdc-list-item-line","mdc-list-item__secondary-text"]}),i})(),HH=(()=>{class i{constructor(e){this._listOption=e}_isAlignedAtStart(){return!this._listOption||"after"===this._listOption?._getTogglePosition()}}return i.\u0275fac=function(e){return new(e||i)(E(zH,8))},i.\u0275dir=ve({type:i,hostVars:4,hostBindings:function(e,n){2&e&&un("mdc-list-item__start",n._isAlignedAtStart())("mdc-list-item__end",!n._isAlignedAtStart())}}),i})(),ese=(()=>{class i extends HH{}return i.\u0275fac=function(){let t;return function(n){return(t||(t=ri(i)))(n||i)}}(),i.\u0275dir=ve({type:i,selectors:[["","matListItemAvatar",""]],hostAttrs:[1,"mat-mdc-list-item-avatar"],features:[lt]}),i})(),tse=(()=>{class i extends HH{}return i.\u0275fac=function(){let t;return function(n){return(t||(t=ri(i)))(n||i)}}(),i.\u0275dir=ve({type:i,selectors:[["","matListItemIcon",""]],hostAttrs:[1,"mat-mdc-list-item-icon"],features:[lt]}),i})();const nse=new me("MAT_LIST_CONFIG");let KR=(()=>{class i{constructor(){this._isNonInteractive=!0,this._disableRipple=!1,this._disabled=!1,this._defaultOptions=Ft(nse,{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=ve({type:i,hostVars:1,hostBindings:function(e,n){2&e&&Dt("aria-disabled",n.disabled)},inputs:{disableRipple:"disableRipple",disabled:"disabled"}}),i})(),GH=(()=>{class i{set lines(e){this._explicitLines=ks(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 Zt,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(Mr(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)(E(mt),E(ft),E(KR,8),E(zi),E(eR,8),E(Rr,8))},i.\u0275dir=ve({type:i,contentQueries:function(e,n,r){if(1&e&&(Wi(r,ese,4),Wi(r,tse,4)),2&e){let s;Et(s=At())&&(n._avatars=s),Et(s=At())&&(n._icons=s)}},hostVars:4,hostBindings:function(e,n){2&e&&(Dt("aria-disabled",n.disabled)("disabled",n._isButtonElement&&n.disabled||null),un("mdc-list-item--disabled",n.disabled))},inputs:{lines:"lines",disableRipple:"disableRipple",disabled:"disabled"}}),i})();const $H=new me("SelectionList");let wC=(()=>{class i extends GH{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 We,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)(E(mt),E(ft),E($H),E(zi),E(Zn),E(eR,8),E(Rr,8))},i.\u0275cmp=ot({type:i,selectors:[["mat-list-option"]],contentQueries:function(e,n,r){if(1&e&&(Wi(r,Jre,5),Wi(r,Qre,5)),2&e){let s;Et(s=At())&&(n._lines=s),Et(s=At())&&(n._titles=s)}},viewQuery:function(e,n){if(1&e&&Wn(Ore,5),2&e){let r;Et(r=At())&&(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&&Ue("blur",function(){return n._handleBlur()})("click",function(){return n._toggleOnInteraction()}),2&e&&(Dt("aria-selected",n.selected),un("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:[Dn([{provide:GH,useExisting:i},{provide:zH,useExisting:i}]),lt],ngContentSelectors:Zre,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&&(sr(Kre),fe(0,Fre,1,0,"ng-template",null,0,Vc),fe(2,Lre,6,4,"ng-template",null,1,Vc),fe(4,Nre,5,4,"ng-template",null,2,Vc),fe(6,Ure,2,1,"span",3),fe(7,zre,2,1,"span",4),fe(8,Gre,1,1,"ng-template",5),W(9,"span",6),Wt(10),Wt(11,1),W(12,"span",7,8),Ue("cdkObserveContent",function(){return n._updateItemLines(!0)}),Wt(14,2),j()(),fe(15,Wre,2,1,"span",9),fe(16,Yre,2,1,"span",9),fe(17,Xre,1,1,"ng-template",5),Wt(18,3),De(19,"div",10)),2&e&&(G(6),U("ngIf",n._hasCheckboxAt("before")),G(1),U("ngIf",n._hasRadioAt("before")),G(1),U("ngIf",n._hasIconsOrAvatarsAt("before")),G(7),U("ngIf",n._hasCheckboxAt("after")),G(1),U("ngIf",n._hasRadioAt("after")),G(1),U("ngIf",n._hasIconsOrAvatarsAt("after")))},dependencies:[CU,vi,xy],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 ise={provide:Do,useExisting:Gn(()=>MC),multi:!0};class rse{constructor(t,e){this.source=t,this.options=e}}let MC=(()=>{class i extends KR{get multiple(){return this._multiple}set multiple(e){const n=Jt(e);n!==this._multiple&&(this._multiple=n,this.selectedOptions=new HR(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 Re,this._onChange=r=>{},this.selectionChange=new We,this.color="accent",this.compareWith=(r,s)=>r===s,this._multiple=!0,this._hideSingleSelectionIndicator=this._defaultOptions?.hideSingleSelectionIndicator??!1,this.selectedOptions=new HR(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 rse(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(He(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()&&Xo(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 RU(this._items).withHomeAndEnd().withTypeAhead().withWrap().skipPredicate(()=>this.disabled),this._resetActiveOption(),this._keyManager.change.subscribe(e=>this._setActiveOption(e)),this._items.changes.pipe(He(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=FM();return e&&this._element.nativeElement.contains(e)}}return i.\u0275fac=function(e){return new(e||i)(E(mt),E(ft))},i.\u0275cmp=ot({type:i,selectors:[["mat-selection-list"]],contentQueries:function(e,n,r){if(1&e&&Wi(r,wC,5),2&e){let s;Et(s=At())&&(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&&Ue("keydown",function(s){return n._handleKeydown(s)}),2&e&&Dt("aria-multiselectable",n.multiple)},inputs:{color:"color",compareWith:"compareWith",multiple:"multiple",hideSingleSelectionIndicator:"hideSingleSelectionIndicator",disabled:"disabled"},outputs:{selectionChange:"selectionChange"},exportAs:["matSelectionList"],features:[Dn([ise,{provide:KR,useExisting:i},{provide:$H,useExisting:i}]),lt,bi],ngContentSelectors:kre,decls:1,vars:0,template:function(e,n){1&e&&(sr(),Wt(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})(),sse=(()=>{class i{}return i.\u0275fac=function(e){return new(e||i)},i.\u0275mod=nn({type:i}),i.\u0275inj=Kt({imports:[HI,Eo,Qn,eb,QU,RV]}),i})();function ose(i,t){if(1&i&&(W(0,"mat-label"),Ve(1),j()),2&i){const e=he(2);G(1),_i(e.resource.name)}}function ase(i,t){if(1&i&&(W(0,"mat-list-option",5),Ve(1),j()),2&i){const e=t.$implicit,n=he(2);U("value",e.key)("selected",n.resource.data[e.key])("disabled",n.disabled),G(1),Qi(" ",e.key," ")}}function lse(i,t){if(1&i){const e=di();Gr(0,1),fe(1,ose,2,1,"mat-label",2),W(2,"mat-selection-list",3),Ue("selectionChange",function(r){return an(e),zt(he().onSelection(r))}),fe(3,ase,2,4,"mat-list-option",4),Ct(4,"keyvalue"),j(),$r()}if(2&i){const e=he();U("matTooltip",e.resourceDescription),G(1),U("ngIf",e.resource.name),G(1),U("disabled",e.disabled),G(1),U("ngForOf",Tt(4,4,e.resource.data))}}let cse=(()=>{class i{constructor(){this.resource=null,this.resourceDescription="",this.disabled=!1,this.changed=new We}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=ot({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&&fe(0,lse,5,6,"ng-container",0),2&e&&U("ngIf",n.resource)},dependencies:[So,vi,To,Os,MC,wC,cB],styles:["[_nghost-%COMP%]{padding-bottom:1.34375em}"],changeDetection:0}),i})();class WH{get tick$(){return this._tick$.asObservable()}get children(){return[...this._children]}constructor(t){this.parent=t,this._tick$=new Re,this._children=[],t&&t.addChild(this)}addChild(t){if(t.parent!==this)throw new Error("Incorrect child clock");this._children.includes(t)||this._children.push(t)}removeChild(t){if(t.parent!==this)throw new Error("Incorrect child clock");this._children=this._children.filter(e=>e!==t)}dispose(){this.parent&&this.parent.removeChild(this);for(const t of this._children)t.dispose();this._tick$.complete()}}const use=typeof performance>"u"?()=>Date.now():()=>performance.now();class jm extends WH{static get instance(){return jm._instance||(jm._instance=new jm),jm._instance}get elapsedTime(){return use()}constructor(){super(null);let t=this.elapsedTime;const e=()=>{requestAnimationFrame(e);const n=t,r=this.elapsedTime;t=r,this._tick$.next([n,r-n])};requestAnimationFrame(e)}dispose(){throw new Error("Cannot dispose global clock")}}class jH extends WH{get isRunning(){return!!this.tickSub}get isPaused(){return-1!==this.pausedAt}get isStopped(){return-1===this.startedAt}get timeScale(){return this._timeScale}set timeScale(t){if(t!==this._timeScale||this.pausedByTimescale&&0!==t){if(0===t)return void(this.isPaused||(this.pause(),this.pausedByTimescale=!0));if(this.isPaused&&this.pausedByTimescale&&(this.resume(),this.pausedByTimescale=!1),!this.isStopped){const e=this.isPaused?this.pausedAt:this.parentClock.elapsedTime;this.startedAt=e-(e-this.startedAt)*this.timeScale/t}this._timeScale=t}}get elapsedTime(){return this.isStopped?this.lastStopElapsed:this.isPaused?this._timeScale*(this.pausedAt-this.startedAt):this._timeScale*(this.parentClock.elapsedTime-this.startedAt)}constructor(t=!1,e=jm.instance){super(e),this.parentClock=e,this.tickSub=null,this._internalTick$=new Re,this.tickRateLimit=0,this.paused$=new Re,this.startedAt=-1,this.oldRelativeTime=0,this.pausedAt=-1,this.lastStopElapsed=0,this._timeScale=1,this.pausedByTimescale=!1,this.lastFiredTickElapsed=0,t&&this.start(),this._internalTick$.pipe(et(([n,r])=>[r,r-this.lastFiredTickElapsed]),gn(([n])=>!this.tickRateLimit||Math.floor(this.lastFiredTickElapsed*this.tickRateLimit/1e3)this.lastFiredTickElapsed=n)).subscribe(this._tick$)}start(){this.isRunning||(this.oldRelativeTime=0,this.startedAt=this.parentClock.elapsedTime,this.startListeningTicks())}stop(){this.stopListeningTicks(),this.lastStopElapsed=this.elapsedTime,this.startedAt=this.pausedAt=-1}pause(){this.stopListeningTicks(),this.pausedAt=this.parentClock.elapsedTime,this.pausedByTimescale=!1,this.paused$.next(!0)}resume(){this.isRunning||-1==this.pausedAt||(this.startedAt+=this.parentClock.elapsedTime-this.pausedAt,this.pausedAt=-1,this.startListeningTicks(),this.paused$.next(!1))}startListeningTicks(){if(this.tickSub)throw new Error("Clock is already ticking!");this.tickSub=this.parentClock.tick$.pipe(et(([t,e])=>[this.oldRelativeTime,this.oldRelativeTime+e*this.timeScale]),Vi(([t,e])=>this.oldRelativeTime=e)).subscribe(this._internalTick$)}stopListeningTicks(){var t;null===(t=this.tickSub)||void 0===t||t.unsubscribe(),this.tickSub=null}dispose(){this.stopListeningTicks(),this._internalTick$.complete(),super.dispose()}}const hse={transparent:!1,background:0,size:"fullscreen",antialias:!0};class fse{constructor(t,e,n={}){this.scene=t,this.canvas=e,this.entity=null,this.rendererOptions=Object.assign(Object.assign({},hse),n||{})}}class pb{static fromArray(t,e=!1){const n=new pb(t[0]);let r=n;for(let s=1;sn.map(r=>new pb(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]}constructor(t){this.data=t,this.adjacent=new Set}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(d=>!e.has(d));for(const d of c)e.add(d),r.push([d,a-1])}}return n}nodes(){return Array.from(this.walkRead(-1))}}var sc=(()=>{return(i=sc||(sc={}))[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",sc;var i})();let Xh=(()=>{class i{constructor(){this.tick$=new Re,this._world=null,this._name="e0x"+(i.default_name_counter++).toString(16),this._selfActive=!0,this.parent=null,this._children=[],this._components=[],this._onSpawned$=new Re,this._onRemoved$=new Re}get world(){return this._world}get name(){return this._name}set name(e){this._name=e}get active(){return this._selfActive&&(!this.parent||this.parent.active)}set active(e){this._selfActive=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 pse extends Xh{constructor(t){super(),this.tickOrder=t}}function Ym(i,t=sc.CONTROLLERS,e){const n=new pse(t);return e&&(n.name=e),i.addEntity(n),n.tick$.pipe(su(()=>{i.removeEntity(n,!0)}))}class ZR extends Xh{get rendererSize$(){return this._rendererSize$.asObservable()}get rendererSize(){return this._rendererSize$.getValue()}get rendererOptions(){return this.renderer.rendererOptions}get physicsDebugViewActive(){return this.renderer.physicsDebugViewActive}set physicsDebugViewActive(t){this.renderer.physicsDebugViewActive=t}constructor(t){super(),this.renderer=t,this.tickOrder=sc.RENDERING,this._rendererSize$=new gt(null),this.addComponents(t),this.tick$.subscribe(()=>{this.renderer.render()})}onSpawned(t){this._rendererSize$.next(null),"fullscreen"==this.rendererOptions.size||"function"==typeof this.rendererOptions.size?(this.renderer.canvas&&(this.renderer.canvas.style.position="absolute"),Mr(Ta(window,"resize").pipe(PM(100)),Ta(window,"orientationchange")).pipe(He(this._onRemoved$),et(()=>({x:window.innerWidth,y:window.innerHeight})),Ao({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 In||void 0!==this.rendererOptions.size.subscribe&&void 0!==this.rendererOptions.size.pipe?this.rendererOptions.size.pipe(He(this._onRemoved$)).subscribe(e=>{this._rendererSize$.next(e)}):this._rendererSize$.next(this.rendererOptions.size),this._rendererSize$.pipe(He(this._onRemoved$),Zl((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 QR=i=>{i.updateVisibility?i.updateVisibility():YH(i)},YH=i=>{for(const t of i.children)QR(t)};class mse extends Xh{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(){YH(this)}addChildren(...t){super.addChildren(...t);for(const e of t)QR(e)}removeChildren(t,e=!1){if(super.removeChildren(t,e),!e)for(const n of t)QR(n)}}class JR{constructor(){this._running=!1,this.stop$=new Re}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 gse extends JR{get output$(){return this._output$.asObservable()}constructor(t,e){super(),this.keyboard=t,this.keymap=e,this._output$=new Re}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")),nu(t.map(e=>this.keyboard.bindMany(...e))).pipe(He(this.stop$),et(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 ek=new In(ms);class CC extends JR{constructor(){super(),this.bindings={},this.skipKeyDownsOnExternalFocus=!0,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 gt(!1);return this.bindings[t].push(e),e.pipe(Zl(),su(()=>{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"),ek;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 gt(!1);this.bindings[n].push(r),e.push(r)}return nu(e).pipe(su(()=>{for(let n=0;nn.includes(!0)),Zl())}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 CC.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)}}CC.externalFocusBlacklist=[HTMLInputElement,HTMLTextAreaElement,HTMLSelectElement,HTMLButtonElement];class qr{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 qr.len(qr.sub(t,e))}static norm(t){const e=qr.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 vse={pointerLock:!1};var Fs=(()=>{return(i=Fs||(Fs={}))[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",Fs;var i})();class qm extends JR{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$=Ta(this._element,"wheel",{passive:!1}).pipe(He(this.stopped$),su(()=>this._wheel$=null),Vi(t=>t.preventDefault()),et(t=>t.deltaY),Uf())),this._wheel$}get isPointerLocked(){return!!document.pointerLockElement}get isPointerLocked$(){return Ta(document,"pointerlockchange").pipe(et(()=>this.isPointerLocked))}get state(){return this._state$.getValue()}get state$(){return this._state$.asObservable()}get multiTouchPositions$(){return this._multiTouchPositions$.asObservable()}get twoTouchGestureDelta$(){return this.state$.pipe(Rs(t=>t==Fs.DRAG_TOUCH_TWO_FINGERS?this.multiTouchPositions$:ek),et(t=>t.map(e=>({x:e.x,y:e.y}))),function _se(){return ti((i,t)=>{let e,n=!1;i.subscribe(Yn(t,r=>{const s=e;e=r,n&&t.next([s,r]),n=!0}))})}(),gn(([t,e])=>t.length>1&&e.length>1),et(([t,e])=>({centerPointDelta:qr.sub(qr.scalarMult(e.reduce((n,r)=>qr.add(n,r),qr.O),1/e.length),qr.scalarMult(t.reduce((n,r)=>qr.add(n,r),qr.O),1/e.length)),angleDelta:qr.angle(e[1],e[0])-qr.angle(t[1],t[0]),distanceDelta:qr.dist(e[1],e[0])-qr.dist(t[1],t[0])})))}get _element(){return this.options.canvas||window}constructor(t={}){super(),this._wheel$=null,this._delta$=new Re,this._position$=new gt(qr.O),this._multiTouchPositions$=new gt([]),this.stopped$=new Re,this._state$=new gt(Fs.NONE),this.options=Object.assign(Object.assign({},vse),t),this.canvasClickListener=this.canvasClickListener.bind(this)}startInternal(){this.options.canvas&&(this.options.canvas.style.touchAction="none"),this._state$.next(Fs.NONE);const t=[Fs.DRAG,Fs.DRAG_MIDDLE_BUTTON,Fs.DRAG_RIGHT_BUTTON],e=[Fs.NONE,Fs.DRAG,Fs.DRAG_TOUCH_TWO_FINGERS],n=[],r={};Ta(this._element,"mousemove").pipe(He(this.stopped$)).subscribe(o=>{this._delta$.next({x:o.movementX,y:o.movementY})}),Ta(this._element,"pointermove").pipe(He(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})}),!qm.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{if(0===n.length)try{this.options.canvas&&this.options.canvas.setPointerCapture(o.pointerId),window.addEventListener("pointerup",s),this._element.addEventListener("pointercancel",s)}catch(a){console.error(a)}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]||Fs.NONE)}),Ta(this._element,"contextmenu").pipe(He(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 yse{static lookAt(t,e,n){let r=Pe.sub(t,e);r=0===Pe.lenSq(r)?Object.assign(Object.assign({},r),{z:1}):Pe.norm(r);let s=Pe.cross(n,r);0===Pe.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=Pe.norm(r),s=Pe.cross(n,r)),s=Pe.norm(s);let o=Pe.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 Yi{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,d=t.w*Math.sin((1-n)*s)/o+e.w*Math.sin(n*s)/o;return isNaN(a)||isNaN(l)||isNaN(c)||isNaN(d)?Yi.clone(t):{x:a,y:l,z:c,w:d}}static fromAngle(t,e){const n=e/2,r=Math.sin(n);return Object.assign(Object.assign({},Pe.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],d=t[10],h=e+o+d;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>d){const p=2*Math.sqrt(1+e-o-d);return{x:.25*p,y:(n+s)/p,z:(r+l)/p,w:(c-a)/p}}if(o>d){const p=2*Math.sqrt(1+o-e-d);return{x:(n+s)/p,y:.25*p,z:(a+c)/p,w:(r-l)/p}}{const p=2*Math.sqrt(1+d-e-o);return{x:(r+l)/p,y:(a+c)/p,z:.25*p,w:(s-n)/p}}}static fromMatrix3(t){const e=t[0][0]+t[1][1]+t[2][2];let n,r,s,o;if(e>0){const a=.5/Math.sqrt(e+1);n=.25/a,r=(t[2][1]-t[1][2])*a,s=(t[0][2]-t[2][0])*a,o=(t[1][0]-t[0][1])*a}else if(t[0][0]>t[1][1]&&t[0][0]>t[2][2]){const a=2*Math.sqrt(1+t[0][0]-t[1][1]-t[2][2]);n=(t[2][1]-t[1][2])/a,r=.25*a,s=(t[0][1]+t[1][0])/a,o=(t[0][2]+t[2][0])/a}else if(t[1][1]>t[2][2]){const a=2*Math.sqrt(1+t[1][1]-t[0][0]-t[2][2]);n=(t[0][2]-t[2][0])/a,r=(t[0][1]+t[1][0])/a,s=.25*a,o=(t[1][2]+t[2][1])/a}else{const a=2*Math.sqrt(1+t[2][2]-t[0][0]-t[1][1]);n=(t[1][0]-t[0][1])/a,r=(t[0][2]+t[2][0])/a,s=(t[1][2]+t[2][1])/a,o=.25*a}return{w:n,x:r,y:s,z:o}}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),d=Math.sin(.5*e);return{w:c*a*s+d*l*o,x:d*a*s-c*l*o,y:c*l*s+d*a*o,z:c*a*o-d*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=Pe.Z){return this.fromMatrix4(yse.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 Pe{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 Pe.len(Pe.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=Pe.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,Yi.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)}}}function tk(i,t,e,n){return r=>r.pipe(tI((s,o)=>{var a;return{targetValue:o,currentValue:null!==(a=s.currentValue)&&void 0!==a?a:o,hasReachedTarget:!1}},{targetValue:null,currentValue:null,hasReachedTarget:!1}),Rs(s=>i.pipe(et(([o,a])=>{if(null===s.targetValue||null===s.currentValue)return s.currentValue;if(s.hasReachedTarget)return;const l=1-Math.exp(-a/t),c=e(s.currentValue,s.targetValue,l);return s.currentValue=c,n(c,s.targetValue)?(s.hasReachedTarget=!0,s.targetValue):c}))),et(s=>void 0!==s?s:null),gn(s=>null!==s))}ps(738);class wse extends Xh{get avgReport(){return this._avgReport}get peakReport(){return this._peakReport}constructor(t=60,e=15){super(),this.maxSamples=t,this.maxRows=e,this.tickOrder=Number.MAX_SAFE_INTEGER,this.sampleIndex=0,this.collectedData=new Map,this._avgReport={totalTime:0,entries:[]},this._peakReport={totalTime:0,entries:[]}}onSpawned(t){super.onSpawned(t),this.sampleIndex=0;const e=()=>(typeof performance>"u"?Date:performance).now();this.world.tickForwardTo$.pipe(He(this.onRemoved$)).subscribe(n=>{n!==this&&(this.collectedData.has(n)?this.collectedData.get(n).push([this.sampleIndex,e(),0]):this.collectedData.set(n,[[this.sampleIndex,e(),0]]))}),this.world.tickForwardedTo$.pipe(He(this.onRemoved$)).subscribe(n=>{if(n===this)return;const r=this.collectedData.get(n);r[r.length-1][2]=e()}),this.tick$.pipe(He(this.onRemoved$)).subscribe(()=>{this.sampleIndex++;const n=Array.from(this.collectedData.entries());for(const[h,p]of n){for(;p.length>0&&p[0][0]h instanceof Xh?""===h.name?h.constructor.name:h.name:"PHYSICS_WORLD"===h?"Physics simulation":h,s=h=>{let p=0,m=0;for(;mh.length-m+1){m--;break}p+=h[h.length-m-1][1]}return m>1&&(h=h.slice(0,h.length-m)).push([`Rest (${m})`,p]),h};let o=0,a=Array.from(this.collectedData.entries()).map(([h,p])=>{const m=p.reduce((g,[b,v,y])=>g+y-v,0)/this.maxSamples;return o+=m,[r(h),m]}).sort((h,p)=>p[1]-h[1]);a=s(a),this._avgReport={totalTime:o,entries:a};let l=new Map,c=Array.from(this.collectedData.entries()).map(([h,p])=>{let m=0;for(const[g,b,v]of p){const y=v-b;m=Math.max(m,y),l.set(g,y+(l.get(g)||0))}return[r(h),m]}).sort((h,p)=>p[1]-h[1]);c=s(c);let d=Array.from(l.values()).reduce((h,p)=>Math.max(h,p),0);this._peakReport={totalTime:d,entries:c}})}onRemoved(){super.onRemoved(),this.collectedData=new Map,this._avgReport={totalTime:0,entries:[]},this._peakReport={totalTime:0,entries:[]}}}var Xm=function(i,t,e,n){return new(e||(e=Promise))(function(s,o){function a(d){try{c(n.next(d))}catch(h){o(h)}}function l(d){try{c(n.throw(d))}catch(h){o(h)}}function c(d){d.done?s(d.value):function r(s){return s instanceof e?s:new e(function(o){o(s)})}(d.value).then(a,l)}c((n=n.apply(i,t||[])).next())})};class yl{static get documentWorlds(){return[...yl._documentWorlds]}constructor(t,e){this.visualScene=t,this.physicsWorld=e,this.worldClock=new jH(!1),this.keyboardInput=new CC,this.name="w0x"+(yl.default_name_counter++).toString(16),this.children=[],this.tickListeners=[],this.tickStarted$=new Re,this.tickForwardTo$=new Re,this.tickForwardedTo$=new Re,this.paused$=new Re,this.disposed$=new Re,this.keyboardInput.start(),window.ggstatic?this.registerConsoleCommands(window.ggstatic):(this.onGgStaticInitialized=this.onGgStaticInitialized.bind(this),window.addEventListener("ggstatic_added",this.onGgStaticInitialized)),this.worldClock.paused$.subscribe(this.paused$),yl._documentWorlds.push(this),yl.worldCreated$.next(this)}init(){return Xm(this,void 0,void 0,function*(){yield Promise.all([this.physicsWorld.init(),this.visualScene.init()]);const t=(e,n,r)=>{e.active&&(this.tickForwardTo$.next(e),e.tick$.next([n,r]),this.tickForwardedTo$.next(e))};this.worldClock.tick$.subscribe(([e,n])=>{this.tickStarted$.next();let r=0;for(;r=sc.PHYSICS_SIMULATION);r++)t(this.tickListeners[r],e,n);for(this.tickForwardTo$.next("PHYSICS_WORLD"),this.physicsWorld.simulate(n),this.tickForwardedTo$.next("PHYSICS_WORLD");re.tickOrder-n.tickOrder),t.onSpawned(this))}removeEntity(t,e=!1){if(t.world){if(t.world!==this)throw new Error("Entity is not a part of this world");this.children.splice(this.children.findIndex(n=>n===t),1),this.tickListeners.splice(this.tickListeners.findIndex(n=>n===t),1),t.onRemoved()}e&&t.dispose()}onGgStaticInitialized(){window.removeEventListener("ggstatic_added",this.onGgStaticInitialized),this.registerConsoleCommands(window.ggstatic)}registerConsoleCommands(t){t.registerConsoleCommand(this,"timescale",(...e)=>Xm(this,void 0,void 0,function*(){return isNaN(+e[0])||(this.worldClock.timeScale=+e[0]),this.worldClock.timeScale.toString()}),"args: [ float? ]; Get current time scale of selected world clock or set it. Default value is 1.0 (no time scale applied)"),t.registerConsoleCommand(this,"fps_limit",(...e)=>Xm(this,void 0,void 0,function*(){return isNaN(+e[0])||(this.worldClock.tickRateLimit=+e[0]),this.worldClock.tickRateLimit.toString()}),"args: [ int? ]; Get current tick rate limit of selected world clock or set it. 0 means no limit applied"),t.registerConsoleCommand(this,"renderers",()=>Xm(this,void 0,void 0,function*(){return this.children.filter(e=>e instanceof ZR).map(e=>e.name).join("\n")}),"no args; Print all renderers in selected world"),t.registerConsoleCommand(this,"debug_view",(...e)=>Xm(this,void 0,void 0,function*(){let r,n="toggle";for(let o of e)["1","0"].includes(o)?n="1"===o:r=o;let s=this.children.find(o=>o instanceof ZR&&(!r||o.name===r));if(s)return s.physicsDebugViewActive="toggle"===n?!s.physicsDebugViewActive:n,s.physicsDebugViewActive?"1":"0";throw r?new Error(`Renderer with name "${r}" not found`):new Error("No renderer found")}),'args: [ 0|1?, string? ]; Turn on/off physics debug view, skip first argument to toggle value. Second argument expects renderer name, if not provided first renderer will be picked. Use "renderers" to get list of renderers in the world'),t.registerConsoleCommand(this,"performance",(...e)=>Xm(this,void 0,void 0,function*(){let n="avg",r=20;for(let d of e)["avg","peak"].includes(d)?n=d:isNaN(+d)||(r=+d);const s=new wse(r,250);this.addEntity(s),yield function bse(i,t){const e="object"==typeof t;return new Promise((n,r)=>{let o,s=!1;i.subscribe({next:a=>{o=a,s=!0},error:r,complete:()=>{s?n(o):e?n(t.defaultValue):r(new fm)}})})}(this.worldClock.tick$.pipe(Oi(r)));const o="avg"===n?s.avgReport:s.peakReport;this.removeEntity(s);const a=o.entries.map(([d,h])=>`${d}:`+new Array(Math.max(0,26-d.length)).join(" ")+`${h.toFixed(2)} ms`+("avg"===n?` (${(100*h/o.totalTime).toFixed(2)}%)`:""));let l="lightgreen";o.totalTime>12&&(l=o.totalTime<16?"yellow":"red");const c=("avg"===n?"Average":"Peak")+" Frame time";return a.unshift(c+":"+new Array(Math.max(0,26-c.length)).join(" ")+`${o.totalTime.toFixed(2)} ms`),a.unshift(`Performance report (${r} samples)`),a.join("\n")}),'args: [ int?, avg|peak? ]; Measure how much time was spent per entity in world. Arguments are samples amount (20 by default) and "peak" or "avg" choice, both arguments are optional. "avg" report sorts entities by average time consumed, "peak" records highest value for each entity')}}yl.default_name_counter=0,yl._documentWorlds=[],yl.worldCreated$=new Re;class Ese extends fse{}class XH extends mse{constructor(){super(...arguments),this._world=null}get world(){return this._world}}class Zo extends XH{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}constructor(t){super(),this.tickOrder=sc.OBJECTS_BINDING,this._position=Pe.O,this._rotation=Yi.O,this.object3D=null,this.objectBody=null,t.objectBody&&(this.objectBody=t.objectBody,this.name=this.objectBody.name,this.addComponents(this.objectBody)),t.object3D&&(this.object3D=t.object3D,t.objectBody||(this._position=this.object3D.position,this._rotation=this.object3D.rotation,this.name=this.object3D.name),this.addComponents(this.object3D)),this.objectBody&&(this.tick$.subscribe(()=>{this.runTransformBinding(this.objectBody,this.object3D)}),this.runTransformBinding(this.objectBody,this.object3D))}}class Km extends pb{static fromMapArray(t,e=!1){const n=new Km(t[0]);let r=n;for(let s=1;sn.map(r=>new Km(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));othis.mapGraph.getNearestDummy(this.mapGraphNodes,this.loaderCursor$.getValue())),Zl(),Vi(r=>this._nearestDummy$.next(r))).subscribe(r=>{let o,s=new Set;if(this.options.inertia>0){o=new Set;const a=r.walkReadPreserveDepth(this.options.loadDepth+this.options.inertia);for(let l=0;lo.add(c.data)),l<=this.options.loadDepth&&a[l].forEach(c=>s.add(c.data))}else r.walkRead(this.options.loadDepth).forEach(a=>s.add(a.data)),o=s;for(const a of this.loaded.keys())o.has(a)?s.delete(a):n.includes(a)||n.push(a);for(let a of Array.from(s.keys()))e.includes(a)||e.push(a)}),this.tick$.pipe(Ao(null),He(this._onRemoved$)).subscribe(()=>{if(n.length){for(const r of n)this.disposeChunk(r);n=[]}if(e.length)if(this._initialLoadComplete$.value&&e.length>this.options.maxNodesLoadingPerTick){let r=e.slice(0,this.options.maxNodesLoadingPerTick);e=e.slice(this.options.maxNodesLoadingPerTick),Promise.all(r.map(s=>this.loadChunk(s))).then()}else Promise.all(e.map(r=>this.loadChunk(r))).then(()=>{this._initialLoadComplete$.value||this._initialLoadComplete$.next(!0)}),e=[]})}onRemoved(){super.onRemoved(),this.loadClock&&(this.loadClock.stop(),this.loadClock=null),this.loaderCursor$.next(Pe.O)}loadChunk(t){return function(i,t,e,n){return new(e||(e=Promise))(function(s,o){function a(d){try{c(n.next(d))}catch(h){o(h)}}function l(d){try{c(n.throw(d))}catch(h){o(h)}}function c(d){d.done?s(d.value):function r(s){return s instanceof e?s:new e(function(o){o(s)})}(d.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||Yi.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||Yi.O}]),[n,e]})}disposeChunk(t){this.loaded.has(t)&&(this.removeChildren(this.loaded.get(t),!0),this.loaded.delete(t))}}class Tse extends ZR{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 e4=function(i,t,e,n){return new(e||(e=Promise))(function(s,o){function a(d){try{c(n.next(d))}catch(h){o(h)}}function l(d){try{c(n.throw(d))}catch(h){o(h)}}function c(d){d.done?s(d.value):function r(s){return s instanceof e?s:new e(function(o){o(s)})}(d.value).then(a,l)}c((n=n.apply(i,t||[])).next())})};const t4={keymap:"wasd",cameraLinearSpeed:20,cameraMovementElasticity:0,cameraBoostMultiplier:2.5,cameraRotationSensitivity:1,cameraRotationElasticity:0,mouseOptions:{},ignoreMouseUnlessPointerLocked:!1,ignoreKeyboardUnlessPointerLocked:!1};class n4 extends Xh{get active(){return super.active}set active(t){!super.active&&t&&this.reset(),super.active=t}get spherical(){return this._spherical}set spherical(t){this._spherical.phi=Math.max(1e-6,Math.min(Math.PI-1e-6,t.phi)),this._spherical.theta=t.theta,this.resetMotion$.next()}constructor(t,e,n={}){super(),this.keyboard=t,this.camera=e,this.tickOrder=sc.INPUT_CONTROLLERS,this._spherical={phi:0,radius:1,theta:0},this.resetMotion$=new Re,this.options=Object.assign(Object.assign({},t4),n),n.mouseOptions&&(this.options.mouseOptions=Object.assign(Object.assign({},t4.mouseOptions),n.mouseOptions)),this.mouseInput=new qm(this.options.mouseOptions),this.directionsInput=new gse(t,this.options.keymap)}reset(){this._spherical=Pe.toSpherical(Pe.rot({x:0,y:0,z:-1},this.camera.rotation)),this.resetMotion$.next()}onSpawned(t){const e=Object.create(null,{onSpawned:{get:()=>super.onSpawned}});return e4(this,void 0,void 0,function*(){yield e.onSpawned.call(this,t),this._spherical=Pe.toSpherical(Pe.rot({x:0,y:0,z:-1},this.camera.rotation));const n=["KeyE","KeyQ"];this.camera.camera.supportsFov&&n.push("KeyZ","KeyC"),n.push("ShiftLeft");let r=nu([this.directionsInput.output$,...n.map(c=>this.keyboard.bind(c))]).pipe(He(this._onRemoved$),et(([c,...d])=>{let h={direction:{},rest:[]};(!this.options.ignoreKeyboardUnlessPointerLocked||this.mouseInput.isPointerLocked)&&(h={direction:c,rest:d});let p=Object.assign({},Pe.O);const[m,g,b,v,y]=h.rest;void 0!==h.direction.upDown&&(p.z=h.direction.upDown?-1:1),void 0!==h.direction.leftRight&&(p.x=h.direction.leftRight?-1:1),m!=g&&(p.y=g?-1:1);let M=0;return b!=v&&(M=b?1:-1),p=Pe.norm(p),y&&(p=Pe.scalarMult(p,this.options.cameraBoostMultiplier)),[p,M]}));this.options.cameraMovementElasticity>0&&(r=r.pipe(tk(this.camera.tick$,this.options.cameraMovementElasticity,([c,d],[h,p],m)=>[Pe.lerp(c,h,m),p],([c,d],[h,p])=>d==p&&Pe.dist(c,h)<.001)));let s=Pe.O,o=0;r.subscribe(([c,d])=>{s=c,o=d});let a=qm.isTouchDevice(),l=this.mouseInput.delta$.pipe(He(this._onRemoved$),gn(()=>this.active&&(a||!this.options.ignoreMouseUnlessPointerLocked||this.mouseInput.isPointerLocked)));if(this.options.cameraRotationElasticity>0){const c=new gt(this._spherical);l.subscribe(h=>{const p=c.getValue();c.next({phi:Math.max(1e-6,Math.min(Math.PI-1e-6,p.phi+h.y*this.options.cameraRotationSensitivity/1e3)),theta:p.theta-h.x*this.options.cameraRotationSensitivity/1e3,radius:1})});const d=()=>{c.pipe(He(this._onRemoved$),tk(this.tick$,this.options.cameraRotationElasticity,(h,p,m)=>({phi:h.phi+m*(p.phi-h.phi),theta:h.theta+m*(p.theta-h.theta),radius:1}),(h,p)=>qr.dist({x:h.phi,y:h.theta},{x:p.phi,y:p.theta})<1e-4),He(this.resetMotion$)).subscribe(h=>{this._spherical.theta=h.theta,this._spherical.phi=h.phi})};this.resetMotion$.pipe(He(this._onRemoved$)).subscribe(()=>{c.next(this._spherical),d()}),d()}else l.subscribe(c=>{this._spherical.theta-=c.x*this.options.cameraRotationSensitivity/1e3,this._spherical.phi+=c.y*this.options.cameraRotationSensitivity/1e3,this._spherical.phi=Math.max(1e-6,Math.min(Math.PI-1e-6,this._spherical.phi))});this.camera.tick$.pipe(He(this._onRemoved$),gn(()=>this.active)).subscribe(([c,d])=>{this.camera.camera.fov+=o,this.camera.position=Pe.add(this.camera.position,Pe.rot(Pe.scalarMult(s,this.options.cameraLinearSpeed*d/1e3),this.camera.rotation)),this.camera.rotation=Yi.lookAt(this.camera.position,Pe.add(this.camera.position,Pe.fromSpherical(this._spherical)))}),this.mouseInput.start(),this.directionsInput.start()})}onRemoved(){const t=Object.create(null,{onRemoved:{get:()=>super.onRemoved}});return e4(this,void 0,void 0,function*(){yield t.onRemoved.call(this),yield this.mouseInput.stop(!0),yield this.directionsInput.stop()})}}var i4=function(i,t,e,n){return new(e||(e=Promise))(function(s,o){function a(d){try{c(n.next(d))}catch(h){o(h)}}function l(d){try{c(n.throw(d))}catch(h){o(h)}}function c(d){d.done?s(d.value):function r(s){return s instanceof e?s:new e(function(o){o(s)})}(d.value).then(a,l)}c((n=n.apply(i,t||[])).next())})};const Rse={mouseOptions:{},orbiting:{sensitivityX:1,sensitivityY:1},orbitingElasticity:0,zooming:{sensitivity:1},panning:{sensitivityX:1,sensitivityY:1},dollying:{sensitivity:1}};class kse extends Xh{get active(){return super.active}set active(t){!super.active&&t&&this.reset(),super.active=t}get spherical(){return this._spherical}set spherical(t){this._spherical.phi=Math.max(1e-6,Math.min(Math.PI-1e-6,t.phi)),this._spherical.theta=t.theta,this._spherical.radius=t.radius,this.resetMotion$.next()}constructor(t,e={}){super(),this.camera=t,this.tickOrder=sc.INPUT_CONTROLLERS,this._spherical={phi:0,radius:10,theta:0},this.target=Pe.O,this.resetMotion$=new Re,this.options=Object.assign(Object.assign({},Rse),e),this.mouseInput=new qm(this.options.mouseOptions)}reset(){let t=Pe.dist(this.target,this.camera.position);this.target=Pe.add(this.camera.position,Pe.rot({x:0,y:0,z:-t},this.camera.rotation)),this._spherical=Pe.toSpherical(Pe.sub(this.camera.position,this.target)),this.resetMotion$.next()}onSpawned(t){const e=Object.create(null,{onSpawned:{get:()=>super.onSpawned}});return i4(this,void 0,void 0,function*(){if(yield e.onSpawned.call(this,t),this._spherical=Pe.toSpherical(Pe.sub(this.camera.position,this.target)),this.options.orbiting){let r=this.mouseInput.delta$.pipe(He(this._onRemoved$),gn(()=>this.active&&this.mouseInput.state==Fs.DRAG));if(this.options.orbitingElasticity>0){const s=new gt(this._spherical);r.subscribe(a=>{const l=s.getValue();s.next({phi:Math.max(1e-6,Math.min(Math.PI-1e-6,l.phi-a.y*this.options.orbiting.sensitivityY/1e3)),theta:l.theta-a.x*this.options.orbiting.sensitivityX/1e3,radius:1})});const o=()=>{s.pipe(He(this._onRemoved$),tk(this.tick$,this.options.orbitingElasticity,(a,l,c)=>({phi:a.phi+c*(l.phi-a.phi),theta:a.theta+c*(l.theta-a.theta),radius:1}),(a,l)=>qr.dist({x:a.phi,y:a.theta},{x:l.phi,y:l.theta})<1e-4),He(this.resetMotion$)).subscribe(a=>{this._spherical.theta=a.theta,this._spherical.phi=a.phi})};this.resetMotion$.pipe(He(this._onRemoved$)).subscribe(()=>{s.next(this._spherical),o()}),o()}else r.subscribe(s=>{this._spherical.theta-=s.x*this.options.orbiting.sensitivityX/1e3,this._spherical.phi-=s.y*this.options.orbiting.sensitivityY/1e3,this._spherical.phi=Math.max(1e-6,Math.min(Math.PI-1e-6,this._spherical.phi))})}this.options.zooming&&this.mouseInput.wheel$.pipe(He(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=Pe.fromSpherical(this._spherical),o=Pe.rotAround(s,{x:-Math.sin(this._spherical.theta),y:Math.cos(this._spherical.theta),z:0},Math.PI/2),a=Pe.rotAround(s,Pe.norm(o),Math.PI/2);this.target=Pe.add(this.target,Pe.add(Pe.scalarMult(o,-this.options.panning.sensitivityY*r.y/1e3),Pe.scalarMult(a,this.options.panning.sensitivityX*r.x/1e3)))};this.options.panning&&this.mouseInput.delta$.pipe(He(this._onRemoved$),gn(()=>this.mouseInput.state==Fs.DRAG_RIGHT_BUTTON)).subscribe(r=>{n(r)}),this.options.dollying&&this.mouseInput.delta$.pipe(He(this._onRemoved$),gn(()=>this.mouseInput.state==Fs.DRAG_MIDDLE_BUTTON)).subscribe(r=>{this._spherical.radius*=Math.pow(.95,-this.options.dollying.sensitivity*r.y/10)}),qm.isTouchDevice()&&(this.options.dollying||this.options.panning)&&this.mouseInput.twoTouchGestureDelta$.pipe(He(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(He(this._onRemoved$),gn(()=>this.active),et(()=>this._spherical)).subscribe(r=>{this.camera.position=Pe.add(this.target,Pe.fromSpherical(r)),this.camera.rotation=Yi.lookAt(this.camera.position,this.target)}),yield this.mouseInput.start()})}onRemoved(){const t=Object.create(null,{onRemoved:{get:()=>super.onRemoved}});return i4(this,void 0,void 0,function*(){yield t.onRemoved.call(this),yield this.mouseInput.stop(!0)})}}class Ose{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 rk=function(i,t,e,n){return new(e||(e=Promise))(function(s,o){function a(d){try{c(n.next(d))}catch(h){o(h)}}function l(d){try{c(n.throw(d))}catch(h){o(h)}}function c(d){d.done?s(d.value):function r(s){return s instanceof e?s:new e(function(o){o(s)})}(d.value).then(a,l)}c((n=n.apply(i,t||[])).next())})},yu=(()=>{return(i=yu||(yu={}))[i.Nothing=0]="Nothing",i[i.Files=1]="Files",i[i.Entities=2]="Entities",yu;var i})();const r4={cachingStrategy:yu.Nothing,position:Pe.O,rotation:Yi.O,loadProps:!0},s4=i=>({meta:i.meta,resources:i.resources.map(({object3D:t,body:e})=>({object3D:t&&t.clone(),body:e&&e.clone()}))});class Fse{constructor(t){this.world=t,this.filesCache=new Map,this.loadResultCache=new Map}loadGgGlbFiles(t){return rk(this,arguments,void 0,function*(e,n=!1){if(n&&this.filesCache.has(e))return this.filesCache.get(e);const r=Promise.all([fetch(`${e}.glb`).then(o=>o.arrayBuffer()),fetch(`${e}.meta`).then(o=>o.text()).then(o=>JSON.parse(o))]);n&&this.filesCache.set(e,r);const s=yield r;return n&&this.filesCache.set(e,s),s})}loadGgGlbResources(t){return rk(this,arguments,void 0,function*(e,n=yu.Nothing){if(n==yu.Entities&&this.loadResultCache.has(e)){const c=this.loadResultCache.get(e),d=c instanceof Promise?yield c:c;return s4(d)}const[r,s]=yield this.loadGgGlbFiles(e,n==yu.Files);if(!r)throw new Error("GLB not found");const[o,a]=yield Promise.all([this.world.visualScene.loader.loadFromGgGlb(r,s),this.world.physicsWorld.loader.loadFromGgGlb(r,s)]),l={resources:[],meta:s};if(!o)return l;if(0==a.length)l.resources.push({object3D:o,body:null});else if(1==a.length)l.resources.push({object3D:o,body:a[0]});else{for(const c of a)l.resources.push({object3D:o.popChild(c.name),body:c});o.isEmpty()||l.resources.push({object3D:o,body:null})}return n==yu.Entities&&this.loadResultCache.set(e,s4(l)),l})}loadGgGlb(t){return rk(this,arguments,void 0,function*(e,n=r4){const r=Object.assign(Object.assign({},r4),n),{resources:s,meta:o}=yield this.loadGgGlbResources(e,r.cachingStrategy),a={entities:s.map(l=>new Zo({object3D:l.object3D,objectBody:l.body})),meta:o};return r.loadProps&&(a.props=yield Promise.all(o.dummies.filter(l=>l.is_prop||l.is_scene).map(l=>this.loadGgGlb(l.is_prop?(r.propsPath||e.substring(0,e.lastIndexOf("/")+1))+l.prop_id:l.scene_id,{loadProps:!!l.is_scene,position:Pe.add(Pe.rot(l.position,r.rotation),r.position),rotation:Yi.combineRotations(l.rotation,r.rotation)})))),a.entities.forEach(l=>{l.position=Pe.add(Pe.rot(Pe.clone(l.position),r.rotation),r.position),l.rotation=Yi.mult(Yi.clone(l.rotation),r.rotation)}),a})}}class sk extends yl{constructor(t,e){super(t,e),this.visualScene=t,this.physicsWorld=e,this.loader=new Fse(this)}addPrimitiveRigidBody(t,e=Pe.O,n=Yi.O,r={}){const s=new Zo({object3D:this.visualScene.factory.createPrimitive(t.shape,r),objectBody:this.physicsWorld.factory.createRigidBody(t)});return s.position=e,s.rotation=n,this.addEntity(s),s}addRenderer(t,e,n){const r=new Tse(this.visualScene.createRenderer(t,e,n));return this.addEntity(r),r}registerConsoleCommands(t){super.registerConsoleCommands(t),t.registerConsoleCommand(this,"gravity",(...e)=>function(i,t,e,n){return new(e||(e=Promise))(function(s,o){function a(d){try{c(n.next(d))}catch(h){o(h)}}function l(d){try{c(n.throw(d))}catch(h){o(h)}}function c(d){d.done?s(d.value):function r(s){return s instanceof e?s:new e(function(o){o(s)})}(d.value).then(a,l)}c((n=n.apply(i,t||[])).next())})}(this,void 0,void 0,function*(){if(1==e.length&&(e=["0","0",""+-+e[0]]),e.length>0){if(isNaN(+e[0])||isNaN(+e[1])||isNaN(+e[2]))throw new Error("Wrong arguments");this.physicsWorld.gravity={x:+e[0],y:+e[1],z:+e[2]}}return JSON.stringify(this.physicsWorld.gravity)}),'args: [ ?float, ?float, ?float ]; Get or set 3D world gravity vector. 1 argument sets vector {x: 0, y: 0, z: -value}, 3 arguments set the whole vector. Default value is "9.82" or "0 0 -9.82"')}}function o4(i,t=$y,e){const n=OI(i,t);return function Nse(i,t){return ti((e,n)=>{const{leading:r=!0,trailing:s=!1}=t??{};let o=!1,a=null,l=null,c=!1;const d=()=>{l?.unsubscribe(),l=null,s&&(m(),c&&n.complete())},h=()=>{l=null,c&&n.complete()},p=g=>l=wr(i(g)).subscribe(Yn(n,d,h)),m=()=>{if(o){o=!1;const g=a;a=null,n.next(g),!c&&p(g)}};e.subscribe(Yn(n,g=>{o=!0,a=g,(!l||l.closed)&&(r?m():p(g))},()=>{c=!0,(!(s&&o&&l)||l.closed)&&n.complete()}))})}(()=>n,e)}window.gg_version="0.0.56";const Bse=0,a4=1,Use=2,l4=1,c4=2,Zc=3,ac=0,Io=1,Ls=2,Qc=0,Zm=1,d4=2,u4=3,h4=4,Vse=5,Kh=100,zse=101,Hse=102,Gse=103,$se=104,Wse=200,jse=201,Yse=202,qse=203,ak=204,lk=205,Xse=206,Kse=207,Zse=208,Qse=209,Jse=210,eoe=211,toe=212,noe=213,ioe=214,roe=0,soe=1,ooe=2,SC=3,aoe=4,loe=5,coe=6,doe=7,EC=0,uoe=1,hoe=2,bu=0,foe=1,poe=2,moe=3,goe=4,_oe=5,voe=6,yoe=7,f4="attached",lc=301,Zh=302,AC=303,DC=304,mb=306,Pa=1e3,Ii=1001,gb=1002,_r=1003,dk=1004,Qm=1005,lr=1006,_b=1007,bl=1008,Jc=1009,p4=1010,m4=1011,vb=1012,uk=1013,xu=1014,Qo=1015,Jm=1016,hk=1017,fk=1018,eg=1020,g4=35902,_4=1021,v4=1022,Ro=1023,y4=1024,b4=1025,tg=1026,ng=1027,pk=1028,TC=1029,x4=1030,mk=1031,gk=1033,IC=33776,RC=33777,kC=33778,PC=33779,_k=35840,vk=35841,yk=35842,bk=35843,xk=36196,wk=37492,Mk=37496,Ck=37808,Sk=37809,Ek=37810,Ak=37811,Dk=37812,Tk=37813,Ik=37814,Rk=37815,kk=37816,Pk=37817,Ok=37818,Fk=37819,Lk=37820,Nk=37821,OC=36492,Bk=36494,Uk=36495,w4=36283,Vk=36284,zk=36285,Hk=36286,yb=2300,bb=2301,Coe=0,C4=1,Wk=2,Eoe=3201,Qh=0,Aoe=1,wu="",cs="srgb",ds="srgb-linear",jk="display-p3",LC="display-p3-linear",NC="linear",Fi="srgb",BC="rec709",UC="p3",sg=7680,Doe=512,Toe=513,Ioe=514,E4=515,Roe=516,koe=517,Poe=518,Ooe=519,A4="300 es",ed=2e3;class og{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]+Ns[i>>16&255]+Ns[i>>24&255]+"-"+Ns[255&t]+Ns[t>>8&255]+"-"+Ns[t>>16&15|64]+Ns[t>>24&255]+"-"+Ns[63&e|128]+Ns[e>>8&255]+"-"+Ns[e>>16&255]+Ns[e>>24&255]+Ns[255&n]+Ns[n>>8&255]+Ns[n>>16&255]+Ns[n>>24&255]).toLowerCase()}function er(i,t,e){return Math.max(t,Math.min(e,i))}function Yk(i,t){return(i%t+t)%t}function xb(i,t,e){return(1-e)*i+e*t}function lo(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 yn(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 Zoe_radToDeg=function joe(i){return i*ag};class xe{constructor(t=0,e=0){xe.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(er(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 wn{constructor(t,e,n,r,s,o,a,l,c){wn.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 d=this.elements;return d[0]=t,d[1]=r,d[2]=a,d[3]=e,d[4]=s,d[5]=l,d[6]=n,d[7]=o,d[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],d=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],F=r[2],D=r[5],k=r[8];return s[0]=o*b+a*M+l*F,s[3]=o*v+a*x+l*D,s[6]=o*y+a*C+l*k,s[1]=c*b+d*M+h*F,s[4]=c*v+d*x+h*D,s[7]=c*y+d*C+h*k,s[2]=p*b+m*M+g*F,s[5]=p*v+m*x+g*D,s[8]=p*y+m*C+g*k,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],d=t[8];return e*o*d-e*a*c-n*s*d+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],d=t[8],h=d*o-a*c,p=a*l-d*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-d*n)*b,t[2]=(a*n-r*o)*b,t[3]=p*b,t[4]=(d*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(qk.makeScale(t,e)),this}rotate(t){return this.premultiply(qk.makeRotation(-t)),this}translate(t,e){return this.premultiply(qk.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 qk=new wn;function T4(i){for(let t=i.length-1;t>=0;--t)if(i[t]>=65535)return!0;return!1}function wb(i){return document.createElementNS("http://www.w3.org/1999/xhtml",i)}function Joe(){const i=wb("canvas");return i.style.display="block",i}Int8Array,Uint8Array,Uint8ClampedArray,Int16Array,Uint16Array,Int32Array,Uint32Array,Float32Array,Float64Array;const I4={};function cg(i){i in I4||(I4[i]=!0,console.warn(i))}const R4=(new wn).set(.8224621,.177538,0,.0331941,.9668058,0,.0170827,.0723974,.9105199),k4=(new wn).set(1.2249401,-.2249404,0,-.0420569,1.0420571,0,-.0196376,-.0786361,1.0982735),Mb={[ds]:{transfer:NC,primaries:BC,luminanceCoefficients:[.2126,.7152,.0722],toReference:i=>i,fromReference:i=>i},[cs]:{transfer:Fi,primaries:BC,luminanceCoefficients:[.2126,.7152,.0722],toReference:i=>i.convertSRGBToLinear(),fromReference:i=>i.convertLinearToSRGB()},[LC]:{transfer:NC,primaries:UC,luminanceCoefficients:[.2289,.6917,.0793],toReference:i=>i.applyMatrix3(k4),fromReference:i=>i.applyMatrix3(R4)},[jk]:{transfer:Fi,primaries:UC,luminanceCoefficients:[.2289,.6917,.0793],toReference:i=>i.convertSRGBToLinear().applyMatrix3(k4),fromReference:i=>i.applyMatrix3(R4).convertLinearToSRGB()}},tae=new Set([ds,LC]),Jn={enabled:!0,_workingColorSpace:ds,get workingColorSpace(){return this._workingColorSpace},set workingColorSpace(i){if(!tae.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,Mb[e].fromReference)((0,Mb[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 Mb[i].primaries},getTransfer:function(i){return i===wu?NC:Mb[i].transfer},getLuminanceCoefficients:function(i,t=this._workingColorSpace){return i.fromArray(Mb[t].luminanceCoefficients)}};function dg(i){return i<.04045?.0773993808*i:Math.pow(.9478672986*i+.0521327014,2.4)}function Xk(i){return i<.0031308?12.92*i:1.055*Math.pow(i,.41666)-.055}let ug;class nae{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===ug&&(ug=wb("canvas")),ug.width=t.width,ug.height=t.height;const n=ug.getContext("2d");t instanceof ImageData?n.putImageData(t,0,0):n.drawImage(t,0,0,t.width,t.height),e=ug}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=wb("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 og{constructor(e=i.DEFAULT_IMAGE,n=i.DEFAULT_MAPPING,r=Ii,s=Ii,o=lr,a=bl,l=Ro,c=Jc,d=i.DEFAULT_ANISOTROPY,h=wu){super(),this.isTexture=!0,Object.defineProperty(this,"id",{value:rae++}),this.uuid=Jo(),this.name="",this.source=new hg(e),this.mipmaps=[],this.mapping=n,this.channel=0,this.wrapS=r,this.wrapT=s,this.magFilter=o,this.minFilter=a,this.anisotropy=d,this.format=l,this.internalFormat=null,this.type=c,this.offset=new xe(0,0),this.repeat=new xe(1,1),this.center=new xe(0,0),this.rotation=0,this.matrixAutoUpdate=!0,this.matrix=new wn,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 Pa:e.x=e.x-Math.floor(e.x);break;case Ii:e.x=e.x<0?0:1;break;case gb: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 Pa:e.y=e.y-Math.floor(e.y);break;case Ii:e.y=e.y<0?0:1;break;case gb: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 gi{constructor(t=0,e=0,n=0,r=1){gi.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],d=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(d-p)<.01&&Math.abs(h-b)<.01&&Math.abs(g-v)<.01){if(Math.abs(d+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,F=(y+1)/2,D=(d+p)/4,k=(h+b)/4,B=(g+v)/4;return x>C&&x>F?x<.01?(n=0,r=.707106781,s=.707106781):(n=Math.sqrt(x),r=D/n,s=k/n):C>F?C<.01?(n=.707106781,r=0,s=.707106781):(r=Math.sqrt(C),n=D/r,s=B/r):F<.01?(n=.707106781,r=.707106781,s=0):(s=Math.sqrt(F),n=k/s,r=B/s),this.set(n,r,s,e),this}let M=Math.sqrt((v-g)*(v-g)+(h-b)*(h-b)+(p-d)*(p-d));return Math.abs(M)<.001&&(M=1),this.x=(v-g)/M,this.y=(h-b)/M,this.z=(p-d)/M,this.w=Math.acos((c+m+y-1)/2),this}setFromMatrixPosition(t){const e=t.elements;return this.x=e[12],this.y=e[13],this.z=e[14],this.w=e[15],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 sae extends og{constructor(t=1,e=1,n={}){super(),this.isRenderTarget=!0,this.width=t,this.height=e,this.depth=1,this.scissor=new gi(0,0,t,e),this.scissorTest=!1,this.viewport=new gi(0,0,t,e);const r={width:t,height:e,depth:1};n=Object.assign({generateMipmaps:!1,internalFormat:null,minFilter:lr,depthBuffer:!0,stencilBuffer:!1,resolveDepthBuffer:!0,resolveStencilBuffer:!0,depthTexture:null,samples:0,count:1},n);const s=new ko(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 F=Math.sqrt(x),D=Math.atan2(F,y*M);v=Math.sin(v*D)/F,a=Math.sin(a*D)/F}const C=a*M;if(l=l*v+p*C,c=c*v+m*C,d=d*v+g*C,h=h*v+b*C,v===1-a){const F=1/Math.sqrt(l*l+c*c+d*d+h*h);l*=F,c*=F,d*=F,h*=F}}t[e]=l,t[e+1]=c,t[e+2]=d,t[e+3]=h}static multiplyQuaternionsFlat(t,e,n,r,s,o){const a=n[r],l=n[r+1],c=n[r+2],d=n[r+3],h=s[o],p=s[o+1],m=s[o+2],g=s[o+3];return t[e]=a*g+d*h+l*m-c*p,t[e+1]=l*g+d*p+c*h-a*m,t[e+2]=c*g+d*m+a*p-l*h,t[e+3]=d*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),d=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*d*h+c*m*g,this._y=c*m*h-p*d*g,this._z=c*d*g+p*m*h,this._w=c*d*h-p*m*g;break;case"YXZ":this._x=p*d*h+c*m*g,this._y=c*m*h-p*d*g,this._z=c*d*g-p*m*h,this._w=c*d*h+p*m*g;break;case"ZXY":this._x=p*d*h-c*m*g,this._y=c*m*h+p*d*g,this._z=c*d*g+p*m*h,this._w=c*d*h-p*m*g;break;case"ZYX":this._x=p*d*h-c*m*g,this._y=c*m*h+p*d*g,this._z=c*d*g-p*m*h,this._w=c*d*h+p*m*g;break;case"YZX":this._x=p*d*h+c*m*g,this._y=c*m*h+p*d*g,this._z=c*d*g-p*m*h,this._w=c*d*h-p*m*g;break;case"XZY":this._x=p*d*h-c*m*g,this._y=c*m*h-p*d*g,this._z=c*d*g+p*m*h,this._w=c*d*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],d=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=(d-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=(d-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+d)/m}else{const m=2*Math.sqrt(1+h-n-a);this._w=(o-r)/m,this._x=(s+c)/m,this._y=(l+d)/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(er(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,d=e._w;return this._x=n*d+o*a+r*c-s*l,this._y=r*d+o*l+s*a-n*c,this._z=s*d+o*c+n*l-r*a,this._w=o*d-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),d=Math.atan2(c,a),h=Math.sin((1-e)*d)/c,p=Math.sin(e*d)/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 O{constructor(t=0,e=0,n=0){O.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(O4.setFromEuler(t))}applyAxisAngle(t,e){return this.applyQuaternion(O4.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),d=2*(a*e-s*r),h=2*(s*n-o*e);return this.x=e+l*c+o*h-a*d,this.y=n+l*d+a*c-s*h,this.z=r+l*h+s*d-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 Qk.copy(this).projectOnVector(t),this.sub(Qk)}reflect(t){return this.sub(Qk.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(er(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 Qk=new O,O4=new co;class Bs{constructor(t=new O(1/0,1/0,1/0),e=new O(-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;e=this.min.x&&t.x<=this.max.x&&t.y>=this.min.y&&t.y<=this.max.y&&t.z>=this.min.z&&t.z<=this.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.x>=this.min.x&&t.min.x<=this.max.x&&t.max.y>=this.min.y&&t.min.y<=this.max.y&&t.max.z>=this.min.z&&t.min.z<=this.max.z}intersectsSphere(t){return this.clampPoint(t.center,xl),xl.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(Cb),GC.subVectors(this.max,Cb),fg.subVectors(t.a,Cb),pg.subVectors(t.b,Cb),mg.subVectors(t.c,Cb),Cu.subVectors(pg,fg),Su.subVectors(mg,pg),ef.subVectors(fg,mg);let e=[0,-Cu.z,Cu.y,0,-Su.z,Su.y,0,-ef.z,ef.y,Cu.z,0,-Cu.x,Su.z,0,-Su.x,ef.z,0,-ef.x,-Cu.y,Cu.x,0,-Su.y,Su.x,0,-ef.y,ef.x,0];return!(!Jk(e,fg,pg,mg,GC)||(e=[1,0,0,0,1,0,0,0,1],!Jk(e,fg,pg,mg,GC)))&&($C.crossVectors(Cu,Su),e=[$C.x,$C.y,$C.z],Jk(e,fg,pg,mg,GC))}clampPoint(t,e){return e.copy(t).clamp(this.min,this.max)}distanceToPoint(t){return this.clampPoint(t,xl).distanceTo(t)}getBoundingSphere(t){return this.isEmpty()?t.makeEmpty():(this.getCenter(t.center),t.radius=.5*this.getSize(xl).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()||(td[0].set(this.min.x,this.min.y,this.min.z).applyMatrix4(t),td[1].set(this.min.x,this.min.y,this.max.z).applyMatrix4(t),td[2].set(this.min.x,this.max.y,this.min.z).applyMatrix4(t),td[3].set(this.min.x,this.max.y,this.max.z).applyMatrix4(t),td[4].set(this.max.x,this.min.y,this.min.z).applyMatrix4(t),td[5].set(this.max.x,this.min.y,this.max.z).applyMatrix4(t),td[6].set(this.max.x,this.max.y,this.min.z).applyMatrix4(t),td[7].set(this.max.x,this.max.y,this.max.z).applyMatrix4(t),this.setFromPoints(td)),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 td=[new O,new O,new O,new O,new O,new O,new O,new O],xl=new O,HC=new Bs,fg=new O,pg=new O,mg=new O,Cu=new O,Su=new O,ef=new O,Cb=new O,GC=new O,$C=new O,tf=new O;function Jk(i,t,e,n,r){for(let s=0,o=i.length-3;s<=o;s+=3){tf.fromArray(i,s);const a=r.x*Math.abs(tf.x)+r.y*Math.abs(tf.y)+r.z*Math.abs(tf.z),l=t.dot(tf),c=e.dot(tf),d=n.dot(tf);if(Math.max(-Math.max(l,c,d),Math.min(l,c,d))>a)return!1}return!0}const oae=new Bs,Sb=new O,eP=new O;class Us{constructor(t=new O,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):oae.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;Sb.subVectors(t,this.center);const e=Sb.lengthSq();if(e>this.radius*this.radius){const n=Math.sqrt(e),r=.5*(n-this.radius);this.center.addScaledVector(Sb,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):(eP.subVectors(t.center,this.center).setLength(t.radius),this.expandByPoint(Sb.copy(t.center).add(eP)),this.expandByPoint(Sb.copy(t.center).sub(eP))),this)}equals(t){return t.center.equals(this.center)&&t.radius===this.radius}clone(){return(new this.constructor).copy(this)}}const nd=new O,tP=new O,WC=new O,Eu=new O,nP=new O,jC=new O,iP=new O;class Eb{constructor(t=new O,e=new O(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,nd)),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=nd.subVectors(t,this.origin).dot(this.direction);return e<0?this.origin.distanceToSquared(t):(nd.copy(this.origin).addScaledVector(this.direction,e),nd.distanceToSquared(t))}distanceSqToSegment(t,e,n,r){tP.copy(t).add(e).multiplyScalar(.5),WC.copy(e).sub(t).normalize(),Eu.copy(this.origin).sub(tP);const s=.5*t.distanceTo(e),o=-this.direction.dot(WC),a=Eu.dot(this.direction),l=-Eu.dot(WC),c=Eu.lengthSq(),d=Math.abs(1-o*o);let h,p,m,g;if(d>0)if(h=o*l-a,p=o*a-l,g=s*d,h>=0)if(p>=-g)if(p<=g){const b=1/d;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(tP).addScaledVector(WC,p),m}intersectSphere(t,e){nd.subVectors(t.center,this.origin);const n=nd.dot(this.direction),r=nd.dot(nd)-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,d=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),d>=0?(s=(t.min.y-p.y)*d,o=(t.max.y-p.y)*d):(s=(t.max.y-p.y)*d,o=(t.min.y-p.y)*d),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,nd)}intersectTriangle(t,e,n,r,s){nP.subVectors(e,t),jC.subVectors(n,t),iP.crossVectors(nP,jC);let a,o=this.direction.dot(iP);if(o>0){if(r)return null;a=1}else{if(!(o<0))return null;a=-1,o=-o}Eu.subVectors(this.origin,t);const l=a*this.direction.dot(jC.crossVectors(Eu,jC));if(l<0)return null;const c=a*this.direction.dot(nP.cross(Eu));if(c<0||l+c>o)return null;const d=-a*Eu.dot(iP);return d<0?null:this.at(d/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 Nt{constructor(t,e,n,r,s,o,a,l,c,d,h,p,m,g,b,v){Nt.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,d,h,p,m,g,b,v)}set(t,e,n,r,s,o,a,l,c,d,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]=d,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 Nt).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/gg.setFromMatrixColumn(t,0).length(),s=1/gg.setFromMatrixColumn(t,1).length(),o=1/gg.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),d=Math.cos(s),h=Math.sin(s);if("XYZ"===t.order){const p=o*d,m=o*h,g=a*d,b=a*h;e[0]=l*d,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*d,m=l*h,g=c*d,b=c*h;e[0]=p+b*a,e[4]=g*a-m,e[8]=o*c,e[1]=o*h,e[5]=o*d,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*d,m=l*h,g=c*d,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*d,e[9]=b-p*a,e[2]=-o*c,e[6]=a,e[10]=o*l}else if("ZYX"===t.order){const p=o*d,m=o*h,g=a*d,b=a*h;e[0]=l*d,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*d,e[4]=b-p*h,e[8]=g*h+m,e[1]=h,e[5]=o*d,e[9]=-a*d,e[2]=-c*d,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*d,e[4]=-h,e[8]=c*d,e[1]=p*h+b,e[5]=o*d,e[9]=m*h-g,e[2]=g*h-m,e[6]=a*d,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(aae,t,lae)}lookAt(t,e,n){const r=this.elements;return ea.subVectors(t,e),0===ea.lengthSq()&&(ea.z=1),ea.normalize(),Au.crossVectors(n,ea),0===Au.lengthSq()&&(1===Math.abs(n.z)?ea.x+=1e-4:ea.z+=1e-4,ea.normalize(),Au.crossVectors(n,ea)),Au.normalize(),YC.crossVectors(ea,Au),r[0]=Au.x,r[4]=YC.x,r[8]=ea.x,r[1]=Au.y,r[5]=YC.y,r[9]=ea.y,r[2]=Au.z,r[6]=YC.z,r[10]=ea.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],d=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],F=n[15],D=r[0],k=r[4],B=r[8],T=r[12],A=r[1],$=r[5],ie=r[9],ne=r[13],se=r[2],ge=r[6],q=r[10],re=r[14],J=r[3],we=r[7],Ne=r[11],Ye=r[15];return s[0]=o*D+a*A+l*se+c*J,s[4]=o*k+a*$+l*ge+c*we,s[8]=o*B+a*ie+l*q+c*Ne,s[12]=o*T+a*ne+l*re+c*Ye,s[1]=d*D+h*A+p*se+m*J,s[5]=d*k+h*$+p*ge+m*we,s[9]=d*B+h*ie+p*q+m*Ne,s[13]=d*T+h*ne+p*re+m*Ye,s[2]=g*D+b*A+v*se+y*J,s[6]=g*k+b*$+v*ge+y*we,s[10]=g*B+b*ie+v*q+y*Ne,s[14]=g*T+b*ne+v*re+y*Ye,s[3]=M*D+x*A+C*se+F*J,s[7]=M*k+x*$+C*ge+F*we,s[11]=M*B+x*ie+C*q+F*Ne,s[15]=M*T+x*ne+C*re+F*Ye,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],d=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*d-s*l*d)+t[11]*(+e*c*h-e*a*m-s*o*h+n*o*m+s*a*d-n*c*d)+t[15]*(-r*a*d-e*l*h+e*a*p+r*o*h-n*o*p+n*l*d)}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],d=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-d*v*c-g*l*m+o*v*m+d*l*y-o*p*y,C=d*b*c-g*h*c+g*a*m-o*b*m-d*a*y+o*h*y,F=g*h*l-d*b*l-g*a*p+o*b*p+d*a*v-o*h*v,D=e*M+n*x+r*C+s*F;if(0===D)return this.set(0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0);const k=1/D;return t[0]=M*k,t[1]=(b*p*s-h*v*s-b*r*m+n*v*m+h*r*y-n*p*y)*k,t[2]=(a*v*s-b*l*s+b*r*c-n*v*c-a*r*y+n*l*y)*k,t[3]=(h*l*s-a*p*s-h*r*c+n*p*c+a*r*m-n*l*m)*k,t[4]=x*k,t[5]=(d*v*s-g*p*s+g*r*m-e*v*m-d*r*y+e*p*y)*k,t[6]=(g*l*s-o*v*s-g*r*c+e*v*c+o*r*y-e*l*y)*k,t[7]=(o*p*s-d*l*s+d*r*c-e*p*c-o*r*m+e*l*m)*k,t[8]=C*k,t[9]=(g*h*s-d*b*s-g*n*m+e*b*m+d*n*y-e*h*y)*k,t[10]=(o*b*s-g*a*s+g*n*c-e*b*c-o*n*y+e*a*y)*k,t[11]=(d*a*s-o*h*s-d*n*c+e*h*c+o*n*m-e*a*m)*k,t[12]=F*k,t[13]=(d*b*r-g*h*r+g*n*p-e*b*p-d*n*v+e*h*v)*k,t[14]=(g*a*r-o*b*r-g*n*l+e*b*l+o*n*v-e*a*v)*k,t[15]=(o*h*r-d*a*r+d*n*l-e*h*l-o*n*p+e*a*p)*k,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,d=s*a;return this.set(c*o+n,c*a-r*l,c*l+r*a,0,c*a+r*l,d*a+n,d*l-r*o,0,c*l-r*a,d*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,d=o+o,h=a+a,p=s*c,m=s*d,g=s*h,b=o*d,v=o*h,y=a*h,M=l*c,x=l*d,C=l*h,F=n.x,D=n.y,k=n.z;return r[0]=(1-(b+y))*F,r[1]=(m+C)*F,r[2]=(g-x)*F,r[3]=0,r[4]=(m-C)*D,r[5]=(1-(p+y))*D,r[6]=(v+M)*D,r[7]=0,r[8]=(g+x)*k,r[9]=(v-M)*k,r[10]=(1-(p+b))*k,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=gg.set(r[0],r[1],r[2]).length();const o=gg.set(r[4],r[5],r[6]).length(),a=gg.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],wl.copy(this);const c=1/s,d=1/o,h=1/a;return wl.elements[0]*=c,wl.elements[1]*=c,wl.elements[2]*=c,wl.elements[4]*=d,wl.elements[5]*=d,wl.elements[6]*=d,wl.elements[8]*=h,wl.elements[9]*=h,wl.elements[10]*=h,e.setFromRotationMatrix(wl),n.x=s,n.y=o,n.z=a,this}makePerspective(t,e,n,r,s,o,a=ed){const l=this.elements,c=2*s/(e-t),d=2*s/(n-r),h=(e+t)/(e-t),p=(n+r)/(n-r);let m,g;if(a===ed)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]=d,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=ed){const l=this.elements,c=1/(e-t),d=1/(n-r),h=1/(o-s),p=(e+t)*c,m=(n+r)*d;let g,b;if(a===ed)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*d,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 gg=new O,wl=new Nt,aae=new O(0,0,0),lae=new O(1,1,1),Au=new O,YC=new O,ea=new O,F4=new Nt,L4=new co;let id=(()=>{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],d=s[5],h=s[9],p=s[2],m=s[6],g=s[10];switch(n){case"XYZ":this._y=Math.asin(er(l,-1,1)),Math.abs(l)<.9999999?(this._x=Math.atan2(-h,g),this._z=Math.atan2(-a,o)):(this._x=Math.atan2(m,d),this._z=0);break;case"YXZ":this._x=Math.asin(-er(h,-1,1)),Math.abs(h)<.9999999?(this._y=Math.atan2(l,g),this._z=Math.atan2(c,d)):(this._y=Math.atan2(-p,o),this._z=0);break;case"ZXY":this._x=Math.asin(er(m,-1,1)),Math.abs(m)<.9999999?(this._y=Math.atan2(-p,g),this._z=Math.atan2(-a,d)):(this._y=0,this._z=Math.atan2(c,o));break;case"ZYX":this._y=Math.asin(-er(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,d));break;case"YZX":this._z=Math.asin(er(c,-1,1)),Math.abs(c)<.9999999?(this._x=Math.atan2(-h,d),this._y=Math.atan2(-p,o)):(this._x=0,this._y=Math.atan2(l,g));break;case"XZY":this._z=Math.asin(-er(a,-1,1)),Math.abs(a)<.9999999?(this._x=Math.atan2(m,d),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 F4.makeRotationFromQuaternion(e),this.setFromRotationMatrix(F4,n,r)}setFromVector3(e,n=this._order){return this.set(e.x,e.y,e.z,n)}reorder(e){return L4.setFromEuler(this),this.setFromQuaternion(L4,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 rP{constructor(){this.mask=1}set(t){this.mask=(1<>>0}enable(t){this.mask|=1<{class i extends og{constructor(){super(),this.isObject3D=!0,Object.defineProperty(this,"id",{value:cae++}),this.uuid=Jo(),this.name="",this.type="Object3D",this.parent=null,this.children=[],this.up=i.DEFAULT_UP.clone();const e=new O,n=new id,r=new co,s=new O(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 Nt},normalMatrix:{value:new wn}}),this.matrix=new Nt,this.matrixWorld=new Nt,this.matrixAutoUpdate=i.DEFAULT_MATRIX_AUTO_UPDATE,this.matrixWorldAutoUpdate=i.DEFAULT_MATRIX_WORLD_AUTO_UPDATE,this.matrixWorldNeedsUpdate=!1,this.layers=new rP,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 _g.setFromAxisAngle(e,n),this.quaternion.multiply(_g),this}rotateOnWorldAxis(e,n){return _g.setFromAxisAngle(e,n),this.quaternion.premultiply(_g),this}rotateX(e){return this.rotateOnAxis(B4,e)}rotateY(e){return this.rotateOnAxis(U4,e)}rotateZ(e){return this.rotateOnAxis(V4,e)}translateOnAxis(e,n){return N4.copy(e).applyQuaternion(this.quaternion),this.position.add(N4.multiplyScalar(n)),this}translateX(e){return this.translateOnAxis(B4,e)}translateY(e){return this.translateOnAxis(U4,e)}translateZ(e){return this.translateOnAxis(V4,e)}localToWorld(e){return this.updateWorldMatrix(!0,!1),e.applyMatrix4(this.matrixWorld)}worldToLocal(e){return this.updateWorldMatrix(!0,!1),e.applyMatrix4(rd.copy(this.matrixWorld).invert())}lookAt(e,n,r){e.isVector3?qC.copy(e):qC.set(e,n,r);const s=this.parent;this.updateWorldMatrix(!0,!1),Ab.setFromMatrixPosition(this.matrixWorld),this.isCamera||this.isLight?rd.lookAt(Ab,qC,this.up):rd.lookAt(qC,Ab,this.up),this.quaternion.setFromRotationMatrix(rd),s&&(rd.extractRotation(s.matrixWorld),_g.setFromRotationMatrix(rd),this.quaternion.premultiply(_g.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.maxInstanceCount=this._maxInstanceCount,s.maxVertexCount=this._maxVertexCount,s.maxIndexCount=this._maxIndexCount,s.geometryInitialized=this._geometryInitialized,s.geometryCount=this._geometryCount,s.matricesTexture=this._matricesTexture.toJSON(e),null!==this._colorsTexture&&(s.colorsTexture=this._colorsTexture.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 d=0,h=c.length;d0){s.children=[];for(let l=0;l0){s.animations=[];for(let l=0;l0&&(r.geometries=l),c.length>0&&(r.materials=c),d.length>0&&(r.textures=d),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 d in l){const h=l[d];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){Ml.subVectors(r,e),sd.subVectors(n,e),oP.subVectors(t,e);const o=Ml.dot(Ml),a=Ml.dot(sd),l=Ml.dot(oP),c=sd.dot(sd),d=sd.dot(oP),h=o*c-a*a;if(0===h)return s.set(0,0,0),null;const p=1/h,m=(c*l-a*d)*p,g=(o*d-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,od)&&od.x>=0&&od.y>=0&&od.x+od.y<=1}static getInterpolation(t,e,n,r,s,o,a,l){return null===this.getBarycoord(t,e,n,r,od)?(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,od.x),l.addScaledVector(o,od.y),l.addScaledVector(a,od.z),l)}static isFrontFacing(t,e,n,r){return Ml.subVectors(n,e),sd.subVectors(t,e),Ml.cross(sd).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 Ml.subVectors(this.c,this.b),sd.subVectors(this.a,this.b),.5*Ml.cross(sd).length()}getMidpoint(t){return t.addVectors(this.a,this.b).add(this.c).multiplyScalar(1/3)}getNormal(t){return Oa.getNormal(this.a,this.b,this.c,t)}getPlane(t){return t.setFromCoplanarPoints(this.a,this.b,this.c)}getBarycoord(t,e){return Oa.getBarycoord(t,this.a,this.b,this.c,e)}getInterpolation(t,e,n,r,s){return Oa.getInterpolation(t,this.a,this.b,this.c,e,n,r,s)}containsPoint(t){return Oa.containsPoint(t,this.a,this.b,this.c)}isFrontFacing(t){return Oa.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;yg.subVectors(r,n),bg.subVectors(s,n),aP.subVectors(t,n);const l=yg.dot(aP),c=bg.dot(aP);if(l<=0&&c<=0)return e.copy(n);lP.subVectors(t,r);const d=yg.dot(lP),h=bg.dot(lP);if(d>=0&&h<=d)return e.copy(r);const p=l*h-d*c;if(p<=0&&l>=0&&d<=0)return o=l/(l-d),e.copy(n).addScaledVector(yg,o);cP.subVectors(t,s);const m=yg.dot(cP),g=bg.dot(cP);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(bg,a);const v=d*g-m*h;if(v<=0&&h-d>=0&&m-g>=0)return H4.subVectors(s,r),a=(h-d)/(h-d+(m-g)),e.copy(r).addScaledVector(H4,a);const y=1/(v+b+p);return o=b*y,a=p*y,e.copy(n).addScaledVector(yg,o).addScaledVector(bg,a)}equals(t){return t.a.equals(this.a)&&t.b.equals(this.b)&&t.c.equals(this.c)}}const G4={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},Du={h:0,s:0,l:0},XC={h:0,s:0,l:0};function dP(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 qe{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=cs){return t=Math.floor(t),this.r=(t>>16&255)/255,this.g=(t>>8&255)/255,this.b=(255&t)/255,Jn.toWorkingColorSpace(this,e),this}setRGB(t,e,n,r=Jn.workingColorSpace){return this.r=t,this.g=e,this.b=n,Jn.toWorkingColorSpace(this,r),this}setHSL(t,e,n,r=Jn.workingColorSpace){if(t=Yk(t,1),e=er(e,0,1),n=er(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=dP(o,s,t+1/3),this.g=dP(o,s,t),this.b=dP(o,s,t-1/3)}return Jn.toWorkingColorSpace(this,r),this}setStyle(t,e=cs){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=cs){const n=G4[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=dg(t.r),this.g=dg(t.g),this.b=dg(t.b),this}copyLinearToSRGB(t){return this.r=Xk(t.r),this.g=Xk(t.g),this.b=Xk(t.b),this}convertSRGBToLinear(){return this.copySRGBToLinear(this),this}convertLinearToSRGB(){return this.copyLinearToSRGB(this),this}getHex(t=cs){return Jn.fromWorkingColorSpace(Vs.copy(this),t),65536*Math.round(er(255*Vs.r,0,255))+256*Math.round(er(255*Vs.g,0,255))+Math.round(er(255*Vs.b,0,255))}getHexString(t=cs){return("000000"+this.getHex(t).toString(16)).slice(-6)}getHSL(t,e=Jn.workingColorSpace){Jn.fromWorkingColorSpace(Vs.copy(this),e);const n=Vs.r,r=Vs.g,s=Vs.b,o=Math.max(n,r,s),a=Math.min(n,r,s);let l,c;const d=(a+o)/2;if(a===o)l=0,c=0;else{const h=o-a;switch(c=d<=.5?h/(o+a):h/(2-o-a),o){case n:l=(r-s)/h+(r0!=t>0&&this.version++,this._alphaTest=t}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.dispersion&&(n.dispersion=this.dispersion),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!==Zm&&(n.blending=this.blending),this.side!==ac&&(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!==ak&&(n.blendSrc=this.blendSrc),this.blendDst!==lk&&(n.blendDst=this.blendDst),this.blendEquation!==Kh&&(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!==SC&&(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!==sg&&(n.stencilFail=this.stencilFail),this.stencilZFail!==sg&&(n.stencilZFail=this.stencilZFail),this.stencilZPass!==sg&&(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++}onBuild(){console.warn("Material: onBuild() has been removed.")}onBeforeRender(){console.warn("Material: onBeforeRender() has been removed.")}}class qi extends Po{constructor(t){super(),this.isMeshBasicMaterial=!0,this.type="MeshBasicMaterial",this.color=new qe(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 id,this.combine=EC,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 vr=new O,KC=new xe;class Hi{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=Qo,this.version=0}onUploadCallback(){}set needsUpdate(t){!0===t&&this.version++}get updateRange(){return cg("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],d=[];for(let h=0,p=c.length;h0&&(r[l]=d,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 d=[],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))&&(j4.copy(s).invert(),nf.copy(t.ray).applyMatrix4(j4),(null===n.boundingBox||!1!==nf.intersectsBox(n.boundingBox))&&this._computeIntersections(t,e,nf)))}_computeIntersections(t,e,n){let r;const s=this.geometry,o=this.material,a=s.index,l=s.attributes.position,c=s.attributes.uv,d=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:iS.clone(),object:i}}(i,t,e,n,wg,Mg,Cg,nS);if(d){r&&(JC.fromBufferAttribute(r,a),eS.fromBufferAttribute(r,l),tS.fromBufferAttribute(r,c),d.uv=Oa.getInterpolation(nS,wg,Mg,Cg,JC,eS,tS,new xe)),s&&(JC.fromBufferAttribute(s,a),eS.fromBufferAttribute(s,l),tS.fromBufferAttribute(s,c),d.uv1=Oa.getInterpolation(nS,wg,Mg,Cg,JC,eS,tS,new xe)),o&&(q4.fromBufferAttribute(o,a),X4.fromBufferAttribute(o,l),K4.fromBufferAttribute(o,c),d.normal=Oa.getInterpolation(nS,wg,Mg,Cg,q4,X4,K4,new O),d.normal.dot(n.direction)>0&&d.normal.multiplyScalar(-1));const h={a,b:l,c,normal:new O,materialIndex:0};Oa.getNormal(wg,Mg,Cg,h.normal),d.face=h}return d}class rf 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=[],d=[],h=[];let p=0,m=0;function g(b,v,y,M,x,C,F,D,k,B,T){const A=C/k,$=F/B,ie=C/2,ne=F/2,se=D/2,ge=k+1,q=B+1;let re=0,J=0;const we=new O;for(let Ne=0;Ne0?1:-1,d.push(we.x,we.y,we.z),h.push(It/k),h.push(1-Ne/B),re+=1}for(let Ne=0;Ne0&&(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 fP extends Or{constructor(){super(),this.isCamera=!0,this.type="Camera",this.matrixWorldInverse=new Nt,this.projectionMatrix=new Nt,this.projectionMatrixInverse=new Nt,this.coordinateSystem=ed}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 Tu=new O,J4=new xe,e5=new xe;class yr extends fP{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*ag*Math.atan(e),this.updateProjectionMatrix()}getFocalLength(){const t=Math.tan(.5*Jh*this.fov);return.5*this.getFilmHeight()/t}getEffectiveFOV(){return 2*ag*Math.atan(Math.tan(.5*Jh*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){Tu.set(-1,-1,.5).applyMatrix4(this.projectionMatrixInverse),e.set(Tu.x,Tu.y).multiplyScalar(-t/Tu.z),Tu.set(1,1,.5).applyMatrix4(this.projectionMatrixInverse),n.set(Tu.x,Tu.y).multiplyScalar(-t/Tu.z)}getViewSize(t,e){return this.getViewBounds(t,J4,e5),e.subVectors(e5,J4)}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*Jh*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 bae extends Or{constructor(t,e,n){super(),this.type="CubeCamera",this.renderTarget=n,this.coordinateSystem=null,this.activeMipmapLevel=0;const r=new yr(-90,1,t,e);r.layers=this.layers,this.add(r);const s=new yr(-90,1,t,e);s.layers=this.layers,this.add(s);const o=new yr(-90,1,t,e);o.layers=this.layers,this.add(o);const a=new yr(-90,1,t,e);a.layers=this.layers,this.add(a);const l=new yr(-90,1,t,e);l.layers=this.layers,this.add(l);const c=new yr(-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===ed)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,d]=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,d),t.setRenderTarget(h,p,m),t.xr.enabled=g,n.texture.needsPMREMUpdate=!0}}class sS extends ko{constructor(t,e,n,r,s,o,a,l,c,d){super(t=void 0!==t?t:[],e=void 0!==e?e:lc,n,r,s,o,a,l,c,d),this.isCubeTexture=!0,this.flipY=!1}get images(){return this.image}set images(t){this.image=t}}class xae extends Mu{constructor(t=1,e={}){super(t,t,e),this.isWebGLCubeRenderTarget=!0;const n={width:t,height:t,depth:1};this.texture=new sS([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:lr}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 rf(5,5,5),s=new Cl({name:"CubemapFromEquirect",uniforms:Sg(n_uniforms),vertexShader:n_vertexShader,fragmentShader:n_fragmentShader,side:Io,blending:Qc});s.uniforms.tEquirect.value=e;const o=new Mn(r,s),a=e.minFilter;return e.minFilter===bl&&(e.minFilter=lr),new bae(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 pP=new O,wae=new O,Mae=new wn;class sf{constructor(t=new O(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=pP.subVectors(n,e).cross(wae.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(pP),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||Mae.getNormalMatrix(t),r=this.coplanarPoint(pP).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 af=new Us,oS=new O;class aS{constructor(t=new sf,e=new sf,n=new sf,r=new sf,s=new sf,o=new sf){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=ed){const n=this.planes,r=t.elements,s=r[0],o=r[1],a=r[2],l=r[3],c=r[4],d=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+d,v+g,C+M).normalize(),n[3].setComponents(l-o,p-d,v-g,C-M).normalize(),n[4].setComponents(l-a,p-h,v-b,C-x).normalize(),e===ed)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(),af.copy(t.boundingSphere).applyMatrix4(t.matrixWorld);else{const e=t.geometry;null===e.boundingSphere&&e.computeBoundingSphere(),af.copy(e.boundingSphere).applyMatrix4(t.matrixWorld)}return this.intersectsSphere(af)}intersectsSprite(t){return af.center.set(0,0,0),af.radius=.7071067811865476,af.applyMatrix4(t.matrixWorld),this.intersectsSphere(af)}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,oS.y=r.normal.y>0?t.max.y:t.min.y,oS.z=r.normal.z>0?t.max.z:t.min.z,r.distanceToPoint(oS)<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 t5(){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 Cae(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.isInterleavedBufferAttribute&&(a=a.data),a.isGLBufferAttribute){const d=t.get(a);return void((!d||d.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 ) || defined( USE_BATCHING_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 ) || defined( USE_BATCHING_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\n#ifdef USE_BATCHING_COLOR\n\tvec3 batchingColor = getBatchingColor( getIndirectIndex( gl_DrawID ) );\n\tvColor.xyz *= batchingColor.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}\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}",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_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\tfloat distanceFalloff = 1.0 / max( pow( lightDistance, decayExponent ), 0.01 );\n\tif ( cutoffDistance > 0.0 ) {\n\t\tdistanceFalloff *= pow2( saturate( 1.0 - pow4( lightDistance / cutoffDistance ) ) );\n\t}\n\treturn distanceFalloff;\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_DISPERSION\n\tmaterial.dispersion = dispersion;\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\tfloat dispersion;\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.shadowIntensity, 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.shadowIntensity, 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.shadowIntensity, 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 )\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\tfor ( int i = 0; i < MORPHTARGETS_COUNT; i ++ ) {\n\t\tif ( morphTargetInfluences[ i ] != 0.0 ) objectNormal += getMorph( gl_VertexID, i, 1 ).xyz * morphTargetInfluences[ i ];\n\t}\n#endif",morphtarget_pars_vertex:"#ifdef USE_MORPHTARGETS\n\t#ifndef USE_INSTANCING_MORPH\n\t\tuniform float morphTargetBaseInfluence;\n\t\tuniform float morphTargetInfluences[ MORPHTARGETS_COUNT ];\n\t#endif\n\tuniform sampler2DArray morphTargetsTexture;\n\tuniform ivec2 morphTargetsTextureSize;\n\tvec4 getMorph( const in int vertexIndex, const in int morphTargetIndex, const in int offset ) {\n\t\tint texelIndex = vertexIndex * MORPHTARGETS_TEXTURE_STRIDE + offset;\n\t\tint y = texelIndex / morphTargetsTextureSize.x;\n\t\tint x = texelIndex - y * morphTargetsTextureSize.x;\n\t\tivec3 morphUV = ivec3( x, y, morphTargetIndex );\n\t\treturn texelFetch( morphTargetsTexture, morphUV, 0 );\n\t}\n#endif",morphtarget_vertex:"#ifdef USE_MORPHTARGETS\n\ttransformed *= morphTargetBaseInfluence;\n\tfor ( int i = 0; i < MORPHTARGETS_COUNT; i ++ ) {\n\t\tif ( morphTargetInfluences[ i ] != 0.0 ) transformed += getMorph( gl_VertexID, i, 0 ).xyz * morphTargetInfluences[ i ];\n\t}\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.;const float ShiftRight8 = 1. / 256.;\nconst float Inv255 = 1. / 255.;\nconst vec4 PackFactors = vec4( 1.0, 256.0, 256.0 * 256.0, 256.0 * 256.0 * 256.0 );\nconst vec2 UnpackFactors2 = vec2( UnpackDownscale, 1.0 / PackFactors.g );\nconst vec3 UnpackFactors3 = vec3( UnpackDownscale / PackFactors.rg, 1.0 / PackFactors.b );\nconst vec4 UnpackFactors4 = vec4( UnpackDownscale / PackFactors.rgb, 1.0 / PackFactors.a );\nvec4 packDepthToRGBA( const in float v ) {\n\tif( v <= 0.0 )\n\t\treturn vec4( 0., 0., 0., 0. );\n\tif( v >= 1.0 )\n\t\treturn vec4( 1., 1., 1., 1. );\n\tfloat vuf;\n\tfloat af = modf( v * PackFactors.a, vuf );\n\tfloat bf = modf( vuf * ShiftRight8, vuf );\n\tfloat gf = modf( vuf * ShiftRight8, vuf );\n\treturn vec4( vuf * Inv255, gf * PackUpscale, bf * PackUpscale, af );\n}\nvec3 packDepthToRGB( const in float v ) {\n\tif( v <= 0.0 )\n\t\treturn vec3( 0., 0., 0. );\n\tif( v >= 1.0 )\n\t\treturn vec3( 1., 1., 1. );\n\tfloat vuf;\n\tfloat bf = modf( v * PackFactors.b, vuf );\n\tfloat gf = modf( vuf * ShiftRight8, vuf );\n\treturn vec3( vuf * Inv255, gf * PackUpscale, bf );\n}\nvec2 packDepthToRG( const in float v ) {\n\tif( v <= 0.0 )\n\t\treturn vec2( 0., 0. );\n\tif( v >= 1.0 )\n\t\treturn vec2( 1., 1. );\n\tfloat vuf;\n\tfloat gf = modf( v * 256., vuf );\n\treturn vec2( vuf * Inv255, gf );\n}\nfloat unpackRGBAToDepth( const in vec4 v ) {\n\treturn dot( v, UnpackFactors4 );\n}\nfloat unpackRGBToDepth( const in vec3 v ) {\n\treturn dot( v, UnpackFactors3 );\n}\nfloat unpackRGToDepth( const in vec2 v ) {\n\treturn v.r * UnpackFactors2.r + v.g * UnpackFactors2.g;\n}\nvec4 pack2HalfToRGBA( const in 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( const in 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 shadowIntensity;\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 shadowIntensity;\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 shadowIntensity;\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 shadowIntensity, 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 mix( 1.0, shadow, shadowIntensity );\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 shadowIntensity, 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 mix( 1.0, shadow, shadowIntensity );\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 shadowIntensity;\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 shadowIntensity;\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 shadowIntensity;\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.shadowIntensity, 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.shadowIntensity, 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.shadowIntensity, 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\tconst float StartCompression = 0.8 - 0.04;\n\tconst float 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, vec3( newPeak ), 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.dispersion, 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 dispersion, const in float ior, const in float thickness,\n\t\tconst in vec3 attenuationColor, const in float attenuationDistance ) {\n\t\tvec4 transmittedLight;\n\t\tvec3 transmittance;\n\t\t#ifdef USE_DISPERSION\n\t\t\tfloat halfSpread = ( ior - 1.0 ) * 0.025 * dispersion;\n\t\t\tvec3 iors = vec3( ior - halfSpread, ior, ior + halfSpread );\n\t\t\tfor ( int i = 0; i < 3; i ++ ) {\n\t\t\t\tvec3 transmissionRay = getVolumeTransmissionRay( n, v, thickness, iors[ i ], modelMatrix );\n\t\t\t\tvec3 refractedRayExit = position + transmissionRay;\n\t\t\n\t\t\t\tvec4 ndcPos = projMatrix * viewMatrix * vec4( refractedRayExit, 1.0 );\n\t\t\t\tvec2 refractionCoords = ndcPos.xy / ndcPos.w;\n\t\t\t\trefractionCoords += 1.0;\n\t\t\t\trefractionCoords /= 2.0;\n\t\t\n\t\t\t\tvec4 transmissionSample = getTransmissionSample( refractionCoords, roughness, iors[ i ] );\n\t\t\t\ttransmittedLight[ i ] = transmissionSample[ i ];\n\t\t\t\ttransmittedLight.a += transmissionSample.a;\n\t\t\t\ttransmittance[ i ] = diffuseColor[ i ] * volumeAttenuation( length( transmissionRay ), attenuationColor, attenuationDistance )[ i ];\n\t\t\t}\n\t\t\ttransmittedLight.a /= 3.0;\n\t\t\n\t\t#else\n\t\t\n\t\t\tvec3 transmissionRay = getVolumeTransmissionRay( n, v, thickness, ior, modelMatrix );\n\t\t\tvec3 refractedRayExit = position + transmissionRay;\n\t\t\tvec4 ndcPos = projMatrix * viewMatrix * vec4( refractedRayExit, 1.0 );\n\t\t\tvec2 refractionCoords = ndcPos.xy / ndcPos.w;\n\t\t\trefractionCoords += 1.0;\n\t\t\trefractionCoords /= 2.0;\n\t\t\ttransmittedLight = getTransmissionSample( refractionCoords, roughness, ior );\n\t\t\ttransmittance = diffuseColor * volumeAttenuation( length( transmissionRay ), attenuationColor, attenuationDistance );\n\t\t\n\t\t#endif\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#elif DEPTH_PACKING == 3202\n\t\tgl_FragColor = vec4( packDepthToRGB( fragCoordZ ), 1.0 );\n\t#elif DEPTH_PACKING == 3203\n\t\tgl_FragColor = vec4( packDepthToRG( fragCoordZ ), 0.0, 1.0 );\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_DISPERSION\n\tuniform float dispersion;\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}"},Qe={common:{diffuse:{value:new qe(16777215)},opacity:{value:1},map:{value:null},mapTransform:{value:new wn},alphaMap:{value:null},alphaMapTransform:{value:new wn},alphaTest:{value:0}},specularmap:{specularMap:{value:null},specularMapTransform:{value:new wn}},envmap:{envMap:{value:null},envMapRotation:{value:new wn},flipEnvMap:{value:-1},reflectivity:{value:1},ior:{value:1.5},refractionRatio:{value:.98}},aomap:{aoMap:{value:null},aoMapIntensity:{value:1},aoMapTransform:{value:new wn}},lightmap:{lightMap:{value:null},lightMapIntensity:{value:1},lightMapTransform:{value:new wn}},bumpmap:{bumpMap:{value:null},bumpMapTransform:{value:new wn},bumpScale:{value:1}},normalmap:{normalMap:{value:null},normalMapTransform:{value:new wn},normalScale:{value:new xe(1,1)}},displacementmap:{displacementMap:{value:null},displacementMapTransform:{value:new wn},displacementScale:{value:1},displacementBias:{value:0}},emissivemap:{emissiveMap:{value:null},emissiveMapTransform:{value:new wn}},metalnessmap:{metalnessMap:{value:null},metalnessMapTransform:{value:new wn}},roughnessmap:{roughnessMap:{value:null},roughnessMapTransform:{value:new wn}},gradientmap:{gradientMap:{value:null}},fog:{fogDensity:{value:25e-5},fogNear:{value:1},fogFar:{value:2e3},fogColor:{value:new qe(16777215)}},lights:{ambientLightColor:{value:[]},lightProbe:{value:[]},directionalLights:{value:[],properties:{direction:{},color:{}}},directionalLightShadows:{value:[],properties:{shadowIntensity:1,shadowBias:{},shadowNormalBias:{},shadowRadius:{},shadowMapSize:{}}},directionalShadowMap:{value:[]},directionalShadowMatrix:{value:[]},spotLights:{value:[],properties:{color:{},position:{},direction:{},distance:{},coneCos:{},penumbraCos:{},decay:{}}},spotLightShadows:{value:[],properties:{shadowIntensity:1,shadowBias:{},shadowNormalBias:{},shadowRadius:{},shadowMapSize:{}}},spotLightMap:{value:[]},spotShadowMap:{value:[]},spotLightMatrix:{value:[]},pointLights:{value:[],properties:{color:{},position:{},decay:{},distance:{}}},pointLightShadows:{value:[],properties:{shadowIntensity:1,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 qe(16777215)},opacity:{value:1},size:{value:1},scale:{value:1},map:{value:null},alphaMap:{value:null},alphaMapTransform:{value:new wn},alphaTest:{value:0},uvTransform:{value:new wn}},sprite:{diffuse:{value:new qe(16777215)},opacity:{value:1},center:{value:new xe(.5,.5)},rotation:{value:0},map:{value:null},mapTransform:{value:new wn},alphaMap:{value:null},alphaMapTransform:{value:new wn},alphaTest:{value:0}}},cc={basic:{uniforms:uo([Qe.common,Qe.specularmap,Qe.envmap,Qe.aomap,Qe.lightmap,Qe.fog]),vertexShader:Cn.meshbasic_vert,fragmentShader:Cn.meshbasic_frag},lambert:{uniforms:uo([Qe.common,Qe.specularmap,Qe.envmap,Qe.aomap,Qe.lightmap,Qe.emissivemap,Qe.bumpmap,Qe.normalmap,Qe.displacementmap,Qe.fog,Qe.lights,{emissive:{value:new qe(0)}}]),vertexShader:Cn.meshlambert_vert,fragmentShader:Cn.meshlambert_frag},phong:{uniforms:uo([Qe.common,Qe.specularmap,Qe.envmap,Qe.aomap,Qe.lightmap,Qe.emissivemap,Qe.bumpmap,Qe.normalmap,Qe.displacementmap,Qe.fog,Qe.lights,{emissive:{value:new qe(0)},specular:{value:new qe(1118481)},shininess:{value:30}}]),vertexShader:Cn.meshphong_vert,fragmentShader:Cn.meshphong_frag},standard:{uniforms:uo([Qe.common,Qe.envmap,Qe.aomap,Qe.lightmap,Qe.emissivemap,Qe.bumpmap,Qe.normalmap,Qe.displacementmap,Qe.roughnessmap,Qe.metalnessmap,Qe.fog,Qe.lights,{emissive:{value:new qe(0)},roughness:{value:1},metalness:{value:0},envMapIntensity:{value:1}}]),vertexShader:Cn.meshphysical_vert,fragmentShader:Cn.meshphysical_frag},toon:{uniforms:uo([Qe.common,Qe.aomap,Qe.lightmap,Qe.emissivemap,Qe.bumpmap,Qe.normalmap,Qe.displacementmap,Qe.gradientmap,Qe.fog,Qe.lights,{emissive:{value:new qe(0)}}]),vertexShader:Cn.meshtoon_vert,fragmentShader:Cn.meshtoon_frag},matcap:{uniforms:uo([Qe.common,Qe.bumpmap,Qe.normalmap,Qe.displacementmap,Qe.fog,{matcap:{value:null}}]),vertexShader:Cn.meshmatcap_vert,fragmentShader:Cn.meshmatcap_frag},points:{uniforms:uo([Qe.points,Qe.fog]),vertexShader:Cn.points_vert,fragmentShader:Cn.points_frag},dashed:{uniforms:uo([Qe.common,Qe.fog,{scale:{value:1},dashSize:{value:1},totalSize:{value:2}}]),vertexShader:Cn.linedashed_vert,fragmentShader:Cn.linedashed_frag},depth:{uniforms:uo([Qe.common,Qe.displacementmap]),vertexShader:Cn.depth_vert,fragmentShader:Cn.depth_frag},normal:{uniforms:uo([Qe.common,Qe.bumpmap,Qe.normalmap,Qe.displacementmap,{opacity:{value:1}}]),vertexShader:Cn.meshnormal_vert,fragmentShader:Cn.meshnormal_frag},sprite:{uniforms:uo([Qe.sprite,Qe.fog]),vertexShader:Cn.sprite_vert,fragmentShader:Cn.sprite_frag},background:{uniforms:{uvTransform:{value:new wn},t2D:{value:null},backgroundIntensity:{value:1}},vertexShader:Cn.background_vert,fragmentShader:Cn.background_frag},backgroundCube:{uniforms:{envMap:{value:null},flipEnvMap:{value:-1},backgroundBlurriness:{value:0},backgroundIntensity:{value:1},backgroundRotation:{value:new wn}},vertexShader:Cn.backgroundCube_vert,fragmentShader:Cn.backgroundCube_frag},cube:{uniforms:{tCube:{value:null},tFlip:{value:-1},opacity:{value:1}},vertexShader:Cn.cube_vert,fragmentShader:Cn.cube_frag},equirect:{uniforms:{tEquirect:{value:null}},vertexShader:Cn.equirect_vert,fragmentShader:Cn.equirect_frag},distanceRGBA:{uniforms:uo([Qe.common,Qe.displacementmap,{referencePosition:{value:new O},nearDistance:{value:1},farDistance:{value:1e3}}]),vertexShader:Cn.distanceRGBA_vert,fragmentShader:Cn.distanceRGBA_frag},shadow:{uniforms:uo([Qe.lights,Qe.fog,{color:{value:new qe(0)},opacity:{value:1}}]),vertexShader:Cn.shadow_vert,fragmentShader:Cn.shadow_frag}};cc.physical={uniforms:uo([cc.standard.uniforms,{clearcoat:{value:0},clearcoatMap:{value:null},clearcoatMapTransform:{value:new wn},clearcoatNormalMap:{value:null},clearcoatNormalMapTransform:{value:new wn},clearcoatNormalScale:{value:new xe(1,1)},clearcoatRoughness:{value:0},clearcoatRoughnessMap:{value:null},clearcoatRoughnessMapTransform:{value:new wn},dispersion:{value:0},iridescence:{value:0},iridescenceMap:{value:null},iridescenceMapTransform:{value:new wn},iridescenceIOR:{value:1.3},iridescenceThicknessMinimum:{value:100},iridescenceThicknessMaximum:{value:400},iridescenceThicknessMap:{value:null},iridescenceThicknessMapTransform:{value:new wn},sheen:{value:0},sheenColor:{value:new qe(0)},sheenColorMap:{value:null},sheenColorMapTransform:{value:new wn},sheenRoughness:{value:1},sheenRoughnessMap:{value:null},sheenRoughnessMapTransform:{value:new wn},transmission:{value:0},transmissionMap:{value:null},transmissionMapTransform:{value:new wn},transmissionSamplerSize:{value:new xe},transmissionSamplerMap:{value:null},thickness:{value:0},thicknessMap:{value:null},thicknessMapTransform:{value:new wn},attenuationDistance:{value:0},attenuationColor:{value:new qe(0)},specularColor:{value:new qe(1,1,1)},specularColorMap:{value:null},specularColorMapTransform:{value:new wn},specularIntensity:{value:1},specularIntensityMap:{value:null},specularIntensityMapTransform:{value:new wn},anisotropyVector:{value:new xe},anisotropyMap:{value:null},anisotropyMapTransform:{value:new wn}}]),vertexShader:Cn.meshphysical_vert,fragmentShader:Cn.meshphysical_frag};const lS={r:0,b:0,g:0},lf=new id,Cce=new Nt;function Sce(i,t,e,n,r,s,o){const a=new qe(0);let c,d,l=!0===s?0:1,h=null,p=0,m=null;function g(M){let x=!0===M.isScene?M.background:null;return x&&x.isTexture&&(x=(M.backgroundBlurriness>0?e:t).get(x)),x}function y(M,x){M.getRGB(lS,Z4(i)),n.buffers.color.setClear(lS.r,lS.g,lS.b,x,o)}return{getClearColor:function(){return a},setClearColor:function(M,x=1){a.set(M),l=x,y(a,l)},getClearAlpha:function(){return l},setClearAlpha:function(M){l=M,y(a,l)},render:function b(M){let x=!1;const C=g(M);null===C?y(a,l):C&&C.isColor&&(y(C,1),x=!0);const F=i.xr.getEnvironmentBlendMode();"additive"===F?n.buffers.color.setClear(0,0,0,1,o):"alpha-blend"===F&&n.buffers.color.setClear(0,0,0,0,o),(i.autoClear||x)&&(n.buffers.depth.setTest(!0),n.buffers.depth.setMask(!0),n.buffers.color.setMask(!0),i.clear(i.autoClearColor,i.autoClearDepth,i.autoClearStencil))},addToRenderList:function v(M,x){const C=g(x);C&&(C.isCubeTexture||C.mapping===mb)?(void 0===d&&(d=new Mn(new rf(1,1,1),new Cl({name:"BackgroundCubeMaterial",uniforms:Sg(cc.backgroundCube.uniforms),vertexShader:cc.backgroundCube.vertexShader,fragmentShader:cc.backgroundCube.fragmentShader,side:Io,depthTest:!1,depthWrite:!1,fog:!1})),d.geometry.deleteAttribute("normal"),d.geometry.deleteAttribute("uv"),d.onBeforeRender=function(F,D,k){this.matrixWorld.copyPosition(k.matrixWorld)},Object.defineProperty(d.material,"envMap",{get:function(){return this.uniforms.envMap.value}}),r.update(d)),lf.copy(x.backgroundRotation),lf.x*=-1,lf.y*=-1,lf.z*=-1,C.isCubeTexture&&!1===C.isRenderTargetTexture&&(lf.y*=-1,lf.z*=-1),d.material.uniforms.envMap.value=C,d.material.uniforms.flipEnvMap.value=C.isCubeTexture&&!1===C.isRenderTargetTexture?-1:1,d.material.uniforms.backgroundBlurriness.value=x.backgroundBlurriness,d.material.uniforms.backgroundIntensity.value=x.backgroundIntensity,d.material.uniforms.backgroundRotation.value.setFromMatrix4(Cce.makeRotationFromEuler(lf)),d.material.toneMapped=Jn.getTransfer(C.colorSpace)!==Fi,(h!==C||p!==C.version||m!==i.toneMapping)&&(d.material.needsUpdate=!0,h=C,p=C.version,m=i.toneMapping),d.layers.enableAll(),M.unshift(d,d.geometry,d.material,0,0,null)):C&&C.isTexture&&(void 0===c&&(c=new Mn(new Iu(2,2),new Cl({name:"BackgroundMaterial",uniforms:Sg(cc.background.uniforms),vertexShader:cc.background.vertexShader,fragmentShader:cc.background.fragmentShader,side:ac,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=C,c.material.uniforms.backgroundIntensity.value=x.backgroundIntensity,c.material.toneMapped=Jn.getTransfer(C.colorSpace)!==Fi,!0===C.matrixAutoUpdate&&C.updateMatrix(),c.material.uniforms.uvTransform.value.copy(C.matrix),(h!==C||p!==C.version||m!==i.toneMapping)&&(c.material.needsUpdate=!0,h=C,p=C.version,m=i.toneMapping),c.layers.enableAll(),M.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(A){return i.bindVertexArray(A)}function d(A){return i.deleteVertexArray(A)}function p(A){const $=[],ie=[],ne=[];for(let se=0;se=0){const Ne=se[J];let Ye=ge[J];if(void 0===Ye&&("instanceMatrix"===J&&A.instanceMatrix&&(Ye=A.instanceMatrix),"instanceColor"===J&&A.instanceColor&&(Ye=A.instanceColor)),void 0===Ne||Ne.attribute!==Ye||Ye&&Ne.data!==Ye.data)return!0;q++}return s.attributesNum!==q||s.index!==ne}(A,ne,ie,se),ge&&function g(A,$,ie,ne){const se={},ge=$.attributes;let q=0;const re=ie.getAttributes();for(const J in re)if(re[J].location>=0){let Ne=ge[J];void 0===Ne&&("instanceMatrix"===J&&A.instanceMatrix&&(Ne=A.instanceMatrix),"instanceColor"===J&&A.instanceColor&&(Ne=A.instanceColor));const Ye={};Ye.attribute=Ne,Ne&&Ne.data&&(Ye.data=Ne.data),se[J]=Ye,q++}s.attributes=se,s.attributesNum=q,s.index=ne}(A,ne,ie,se),null!==se&&t.update(se,i.ELEMENT_ARRAY_BUFFER),(ge||o)&&(o=!1,function C(A,$,ie,ne){b();const se=ne.attributes,ge=ie.getAttributes(),q=$.defaultAttributeValues;for(const re in ge){const J=ge[re];if(J.location>=0){let we=se[re];if(void 0===we&&("instanceMatrix"===re&&A.instanceMatrix&&(we=A.instanceMatrix),"instanceColor"===re&&A.instanceColor&&(we=A.instanceColor)),void 0!==we){const Ne=we.normalized,Ye=we.itemSize,It=t.get(we);if(void 0===It)continue;const en=It.buffer,ae=It.type,Oe=It.bytesPerElement,Ze=ae===i.INT||ae===i.UNSIGNED_INT||we.gpuType===uk;if(we.isInterleavedBufferAttribute){const Fe=we.data,bt=Fe.stride,St=we.offset;if(Fe.isInstancedInterleavedBuffer){for(let Mt=0;Mt0&&i.getShaderPrecisionFormat(i.FRAGMENT_SHADER,i.HIGH_FLOAT).precision>0)return"highp";D="mediump"}return"mediump"===D&&i.getShaderPrecisionFormat(i.VERTEX_SHADER,i.MEDIUM_FLOAT).precision>0&&i.getShaderPrecisionFormat(i.FRAGMENT_SHADER,i.MEDIUM_FLOAT).precision>0?"mediump":"lowp"}let c=void 0!==e.precision?e.precision:"highp";const d=l(c);d!==c&&(console.warn("THREE.WebGLRenderer:",c,"not supported, using",d,"instead."),c=d);const h=!0===e.logarithmicDepthBuffer,p=i.getParameter(i.MAX_TEXTURE_IMAGE_UNITS),m=i.getParameter(i.MAX_VERTEX_TEXTURE_IMAGE_UNITS);return{isWebGL2:!0,getMaxAnisotropy:function s(){if(void 0!==r)return r;if(!0===t.has("EXT_texture_filter_anisotropic")){const D=t.get("EXT_texture_filter_anisotropic");r=i.getParameter(D.MAX_TEXTURE_MAX_ANISOTROPY_EXT)}else r=0;return r},getMaxPrecision:l,textureFormatReadable:function o(D){return!(D!==Ro&&n.convert(D)!==i.getParameter(i.IMPLEMENTATION_COLOR_READ_FORMAT))},textureTypeReadable:function a(D){const k=D===Jm&&(t.has("EXT_color_buffer_half_float")||t.has("EXT_color_buffer_float"));return!(D!==Jc&&n.convert(D)!==i.getParameter(i.IMPLEMENTATION_COLOR_READ_TYPE)&&D!==Qo&&!k)},precision:c,logarithmicDepthBuffer:h,maxTextures:p,maxVertexTextures:m,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:m>0,maxSamples:i.getParameter(i.MAX_SAMPLES)}}function Tce(i){const t=this;let e=null,n=0,r=!1,s=!1;const o=new sf,a=new wn,l={value:null,needsUpdate:!1};function d(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=d(g,p,x,m);for(let F=0;F!==x;++F)C[F]=e[F];y.clippingState=C,this.numIntersection=b?this.numPlanes:0,this.numPlanes+=M}}}function Ice(i){let t=new WeakMap;function e(o,a){return a===AC?o.mapping=lc:a===DC&&(o.mapping=Zh),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===AC||a===DC){if(t.has(o))return e(t.get(o).texture,o.mapping);{const l=o.image;if(l&&l.height>0){const c=new xae(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 Ib extends fP{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,d=(this.top-this.bottom)/this.view.fullHeight/this.zoom;s+=c*this.view.offsetX,o=s+c*this.view.width,a-=d*this.view.offsetY,l=a-d*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 n5=[.125,.215,.35,.446,.526,.582],mP=new Ib,r5=new qe;let gP=null,_P=0,vP=0,yP=!1;const df=(1+Math.sqrt(5))/2,Tg=1/df,s5=[new O(-df,Tg,0),new O(df,Tg,0),new O(-Tg,0,df),new O(Tg,0,df),new O(0,df,-Tg),new O(0,df,Tg),new O(-1,1,-1),new O(1,1,-1),new O(-1,1,1),new O(1,1,1)];class o5{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){gP=this._renderer.getRenderTarget(),_P=this._renderer.getActiveCubeFace(),vP=this._renderer.getActiveMipmapLevel(),yP=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=c5(),this._compileMaterial(this._cubemapMaterial))}compileEquirectangularShader(){null===this._equirectMaterial&&(this._equirectMaterial=l5(),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=n5[o-i+4-1]:0===o&&(l=0),n.push(l);const c=1/(a-2),d=-c,h=1+c,p=[d,d,h,d,h,h,d,d,h,h,d,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 D=0;D2?0:-1;M.set([k,B,0,k+2/3,B,0,k+2/3,B+1,0,k,B,0,k+2/3,B+1,0,k,B+1,0],b*g*D),x.set(p,v*g*D),C.set([D,D,D,D,D,D],y*g*D)}const F=new hn;F.setAttribute("position",new Hi(M,b)),F.setAttribute("uv",new Hi(x,v)),F.setAttribute("faceIndex",new Hi(C,y)),t.push(F),r>4&&r--}return{lodPlanes:t,sizeLods:e,sigmas:n}}(s)),this._blurMaterial=function kce(i,t,e){const n=new Float32Array(20),r=new O(0,1,0);return new Cl({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:Qc,depthTest:!1,depthWrite:!1})}(s,t,e)}return r}_compileMaterial(t){const e=new Mn(this._lodPlanes[0],t);this._renderer.compile(e,mP)}_sceneToCubeUV(t,e,n,r){const a=new yr(90,1,e,n),l=[1,-1,1,1,1,1],c=[1,1,1,-1,-1,-1],d=this._renderer,h=d.autoClear,p=d.toneMapping;d.getClearColor(r5),d.toneMapping=bu,d.autoClear=!1;const m=new qi({name:"PMREM.Background",side:Io,depthWrite:!1,depthTest:!1}),g=new Mn(new rf,m);let b=!1;const v=t.background;v?v.isColor&&(m.color.copy(v),t.background=null,b=!0):(m.color.copy(r5),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;cS(r,M*x,y>2?x:0,x,x),d.setRenderTarget(r),b&&d.render(g,a),d.render(t,a)}g.geometry.dispose(),g.material.dispose(),d.toneMapping=p,d.autoClear=h,t.background=v}_textureToCubeUV(t,e){const n=this._renderer,r=t.mapping===lc||t.mapping===Zh;r?(null===this._cubemapMaterial&&(this._cubemapMaterial=c5()),this._cubemapMaterial.uniforms.flipEnvMap.value=!1===t.isRenderTargetTexture?-1:1):null===this._equirectMaterial&&(this._equirectMaterial=l5());const s=r?this._cubemapMaterial:this._equirectMaterial,o=new Mn(this._lodPlanes[0],s);s.uniforms.envMap.value=t;const l=this._cubeSize;cS(e,0,0,3*l,2*l),n.setRenderTarget(e),n.render(o,mP)}_applyPMREM(t){const e=this._renderer,n=e.autoClear;e.autoClear=!1;const r=this._lodPlanes.length;for(let s=1;s20&&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 k=0;k<20;++k){const B=k/b,T=Math.exp(-B*B/2);y.push(T),0===k?M+=T:kx-4?r-x+4:0),4*(this._cubeSize-C),3*C,2*C),l.setRenderTarget(e),l.render(h,mP)}}function a5(i,t,e){const n=new Mu(i,t,e);return n.texture.mapping=mb,n.texture.name="PMREM.cubeUv",n.scissorTest=!0,n}function cS(i,t,e,n,r){i.viewport.set(t,e,n,r),i.scissor.set(t,e,n,r)}function l5(){return new Cl({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:Qc,depthTest:!1,depthWrite:!1})}function c5(){return new Cl({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:Qc,depthTest:!1,depthWrite:!1})}function Pce(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===AC||l===DC,d=l===lc||l===Zh;if(c||d){let h=t.get(a);if(a.isRenderTargetTexture&&a.pmremVersion!==(void 0!==h?h.texture.pmremVersion:0))return null===e&&(e=new o5(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||d&&m&&function r(a){let l=0;for(let d=0;d<6;d++)void 0!==a[d]&&l++;return 6===l}(m)?(null===e&&(e=new o5(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 Oce(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&&cg("THREE.WebGLRenderer: "+n+" extension not supported."),r}}}function Fce(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&&(F=Math.ceil(C/t.maxTextureSize),C=t.maxTextureSize);const D=new Float32Array(C*F*4*h),k=new Zk(D,C,F,h);k.type=Qo,k.needsUpdate=!0;const B=4*x;for(let A=0;A0)return i;const r=t*e;let s=g5[r];if(void 0===s&&(s=new Float32Array(r),g5[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 Fr(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 Ode(i,t){const e=function Pde(i){const t=Jn.getPrimaries(Jn.workingColorSpace),e=Jn.getPrimaries(i);let n;switch(t===e?n="":t===UC&&e===BC?n="LinearDisplayP3ToLinearSRGB":t===BC&&e===UC&&(n="LinearSRGBToLinearDisplayP3"),i){case ds:case LC:return[n,"LinearTransferOETF"];case cs:case jk: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 Fde(i,t){let e;switch(t){case foe:e="Linear";break;case poe:e="Reinhard";break;case moe:e="OptimizedCineon";break;case goe:e="ACESFilmic";break;case voe:e="AgX";break;case yoe:e="Neutral";break;case _oe:e="Custom";break;default:console.warn("THREE.WebGLProgram: Unsupported toneMapping:",t),e="Linear"}return"vec3 "+i+"( vec3 color ) { return "+e+"ToneMapping( color ); }"}const hS=new O;function Rb(i){return""!==i}function C5(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 S5(i,t){return i.replace(/NUM_CLIPPING_PLANES/g,t.numClippingPlanes).replace(/UNION_CLIPPING_PLANES/g,t.numClippingPlanes-t.numClipIntersection)}const Vde=/^[ \t]*#include +<([\w\d./]+)>/gm;function wP(i){return i.replace(Vde,Hde)}const zde=new Map;function Hde(i,t){let e=Cn[t];if(void 0===e){const n=zde.get(t);if(void 0===n)throw new Error("Can not resolve #include <"+t+">");e=Cn[n],console.warn('THREE.WebGLRenderer: Shader chunk "%s" has been deprecated. Use "%s" instead.',t,n)}return wP(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 E5(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(Rb).join("\n"),y.length>0&&(y+="\n")):(v=[A5(e),"#define SHADER_TYPE "+e.shaderType,"#define SHADER_NAME "+e.shaderName,g,e.extensionClipCullDistance?"#define USE_CLIP_DISTANCE":"",e.batching?"#define USE_BATCHING":"",e.batchingColor?"#define USE_BATCHING_COLOR":"",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 "+d:"",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_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.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","#ifdef USE_SKINNING","\tattribute vec4 skinIndex;","\tattribute vec4 skinWeight;","#endif","\n"].filter(Rb).join("\n"),y=[A5(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 "+d:"",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.dispersion?"#define USE_DISPERSION":"",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||e.batchingColor?"#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.decodeVideoTexture?"#define DECODE_VIDEO_TEXTURE":"",e.logarithmicDepthBuffer?"#define USE_LOGDEPTHBUF":"","uniform mat4 viewMatrix;","uniform vec3 cameraPosition;","uniform bool isOrthographic;",e.toneMapping!==bu?"#define TONE_MAPPING":"",e.toneMapping!==bu?Cn.tonemapping_pars_fragment:"",e.toneMapping!==bu?Fde("toneMapping",e.toneMapping):"",e.dithering?"#define DITHERING":"",e.opaque?"#define OPAQUE":"",Cn.colorspace_pars_fragment,Ode("linearToOutputTexel",e.outputColorSpace),(Jn.getLuminanceCoefficients(hS),["float luminance( const in vec3 rgb ) {",`\tconst vec3 weights = vec3( ${hS.x.toFixed(4)}, ${hS.y.toFixed(4)}, ${hS.z.toFixed(4)} );`,"\treturn dot( weights, rgb );","}"].join("\n")),e.useDepthPacking?"#define DEPTH_PACKING "+e.depthPacking:"","\n"].filter(Rb).join("\n")),o=wP(o),o=C5(o,e),o=S5(o,e),a=wP(a),a=C5(a,e),a=S5(a,e),o=E5(o),a=E5(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===A4?"":"layout(location = 0) out highp vec4 pc_fragColor;",e.glslVersion===A4?"":"#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,F=w5(r,r.VERTEX_SHADER,M+v+o),D=w5(r,r.FRAGMENT_SHADER,C);function k($){if(i.debug.checkShaderErrors){const ie=r.getProgramInfoLog(b).trim(),ne=r.getShaderInfoLog(F).trim(),se=r.getShaderInfoLog(D).trim();let ge=!0,q=!0;if(!1===r.getProgramParameter(b,r.LINK_STATUS))if(ge=!1,"function"==typeof i.debug.onShaderError)i.debug.onShaderError(r,b,F,D);else{const re=M5(r,F,"vertex"),J=M5(r,D,"fragment");console.error("THREE.WebGLProgram: Shader Error "+r.getError()+" - VALIDATE_STATUS "+r.getProgramParameter(b,r.VALIDATE_STATUS)+"\n\nMaterial Name: "+$.name+"\nMaterial Type: "+$.type+"\n\nProgram Info Log: "+ie+"\n"+re+"\n"+J)}else""!==ie?console.warn("THREE.WebGLProgram: Program Info Log:",ie):(""===ne||""===se)&&(q=!1);q&&($.diagnostics={runnable:ge,programLog:ie,vertexShader:{log:ne,prefix:v},fragmentShader:{log:se,prefix:y}})}r.deleteShader(F),r.deleteShader(D),B=new uS(r,b),T=function Ude(i,t){const e={},n=i.getProgramParameter(t,i.ACTIVE_ATTRIBUTES);for(let r=0;r0,ce=T.clearcoat>0,Te=T.iridescence>0,Ae=T.sheen>0,Bt=T.transmission>0,Je=R&&!!T.anisotropyMap,ut=ce&&!!T.clearcoatMap,bn=ce&&!!T.clearcoatNormalMap,ze=ce&&!!T.clearcoatRoughnessMap,dt=Te&&!!T.iridescenceMap,jn=Te&&!!T.iridescenceThicknessMap,ln=Ae&&!!T.sheenColorMap,_t=Ae&&!!T.sheenRoughnessMap,vn=!!T.specularMap,Pn=!!T.specularColorMap,Ki=!!T.specularIntensityMap,Z=Bt&&!!T.transmissionMap,$e=Bt&&!!T.thicknessMap,Ee=!!T.alphaMap,ei=!!T.extensions;let br=bu;T.toneMapped&&(null===Fe||!0===Fe.isXRRenderTarget)&&(br=i.toneMapping);const hs={shaderID:we,shaderType:T.type,shaderName:T.name,vertexShader:en,fragmentShader:ae,defines:T.defines,customVertexShaderID:Oe,customFragmentShaderID:Ze,isRawShaderMaterial:!0===T.isRawShaderMaterial,glslVersion:T.glslVersion,precision:m,batching:St,batchingColor:St&&null!==ne._colorsTexture,instancing:bt,instancingColor:bt&&null!==ne.instanceColor,instancingMorph:bt&&null!==ne.morphTexture,supportsVertexTextures:p,outputColorSpace:null===Fe?i.outputColorSpace:!0===Fe.isXRRenderTarget?Fe.texture.colorSpace:ds,alphaToCoverage:!!T.alphaToCoverage,map:Mt,matcap:!!T.matcap,envMap:N,envMapMode:N&&re.mapping,envMapCubeUVHeight:J,aoMap:Ge,lightMap:Le,bumpMap:nt,normalMap:Me,displacementMap:p&&Gt,emissiveMap:it,normalMapObjectSpace:Me&&T.normalMapType===Aoe,normalMapTangentSpace:Me&&T.normalMapType===Qh,metalnessMap:pt,roughnessMap:z,anisotropy:R,anisotropyMap:Je,clearcoat:ce,clearcoatMap:ut,clearcoatNormalMap:bn,clearcoatRoughnessMap:ze,dispersion:T.dispersion>0,iridescence:Te,iridescenceMap:dt,iridescenceThicknessMap:jn,sheen:Ae,sheenColorMap:ln,sheenRoughnessMap:_t,specularMap:vn,specularColorMap:Pn,specularIntensityMap:Ki,transmission:Bt,transmissionMap:Z,thicknessMap:$e,gradientMap:!!T.gradientMap,opaque:!1===T.transparent&&T.blending===Zm&&!1===T.alphaToCoverage,alphaMap:Ee,alphaTest:T.alphaTest>0,alphaHash:!!T.alphaHash,combine:T.combine,mapUv:Mt&&b(T.map.channel),aoMapUv:Ge&&b(T.aoMap.channel),lightMapUv:Le&&b(T.lightMap.channel),bumpMapUv:nt&&b(T.bumpMap.channel),normalMapUv:Me&&b(T.normalMap.channel),displacementMapUv:Gt&&b(T.displacementMap.channel),emissiveMapUv:it&&b(T.emissiveMap.channel),metalnessMapUv:pt&&b(T.metalnessMap.channel),roughnessMapUv:z&&b(T.roughnessMap.channel),anisotropyMapUv:Je&&b(T.anisotropyMap.channel),clearcoatMapUv:ut&&b(T.clearcoatMap.channel),clearcoatNormalMapUv:bn&&b(T.clearcoatNormalMap.channel),clearcoatRoughnessMapUv:ze&&b(T.clearcoatRoughnessMap.channel),iridescenceMapUv:dt&&b(T.iridescenceMap.channel),iridescenceThicknessMapUv:jn&&b(T.iridescenceThicknessMap.channel),sheenColorMapUv:ln&&b(T.sheenColorMap.channel),sheenRoughnessMapUv:_t&&b(T.sheenRoughnessMap.channel),specularMapUv:vn&&b(T.specularMap.channel),specularColorMapUv:Pn&&b(T.specularColorMap.channel),specularIntensityMapUv:Ki&&b(T.specularIntensityMap.channel),transmissionMapUv:Z&&b(T.transmissionMap.channel),thicknessMapUv:$e&&b(T.thicknessMap.channel),alphaMapUv:Ee&&b(T.alphaMap.channel),vertexTangents:!!ge.attributes.tangent&&(Me||R),vertexColors:T.vertexColors,vertexAlphas:!0===T.vertexColors&&!!ge.attributes.color&&4===ge.attributes.color.itemSize,pointsUvs:!0===ne.isPoints&&!!ge.attributes.uv&&(Mt||Ee),fog:!!se,useFog:!0===T.fog,fogExp2:!!se&&se.isFogExp2,flatShading:!0===T.flatShading,sizeAttenuation:!0===T.sizeAttenuation,logarithmicDepthBuffer:h,skinning:!0===ne.isSkinnedMesh,morphTargets:void 0!==ge.morphAttributes.position,morphNormals:void 0!==ge.morphAttributes.normal,morphColors:void 0!==ge.morphAttributes.color,morphTargetsCount:Ye,morphTextureStride:It,numDirLights:A.directional.length,numPointLights:A.point.length,numSpotLights:A.spot.length,numSpotLightMaps:A.spotLightMap.length,numRectAreaLights:A.rectArea.length,numHemiLights:A.hemi.length,numDirLightShadows:A.directionalShadowMap.length,numPointLightShadows:A.pointShadowMap.length,numSpotLightShadows:A.spotShadowMap.length,numSpotLightShadowsWithMaps:A.numSpotLightShadowsWithMaps,numLightProbes:A.numLightProbes,numClippingPlanes:o.numPlanes,numClipIntersection:o.numIntersection,dithering:T.dithering,shadowMapEnabled:i.shadowMap.enabled&&$.length>0,shadowMapType:i.shadowMap.type,toneMapping:br,decodeVideoTexture:Mt&&!0===T.map.isVideoTexture&&Jn.getTransfer(T.map.colorSpace)===Fi,premultipliedAlpha:T.premultipliedAlpha,doubleSided:T.side===Ls,flipSided:T.side===Io,useDepthPacking:T.depthPacking>=0,depthPacking:T.depthPacking||0,index0AttributeName:T.index0AttributeName,extensionClipCullDistance:ei&&!0===T.extensions.clipCullDistance&&n.has("WEBGL_clip_cull_distance"),extensionMultiDraw:(ei&&!0===T.extensions.multiDraw||St)&&n.has("WEBGL_multi_draw"),rendererExtensionParallelShaderCompile:n.has("KHR_parallel_shader_compile"),customProgramCacheKey:T.customProgramCacheKey()};return hs.vertexUv1s=c.has(1),hs.vertexUv2s=c.has(2),hs.vertexUv3s=c.has(3),c.clear(),hs},getProgramCacheKey:function y(T){const A=[];if(T.shaderID?A.push(T.shaderID):(A.push(T.customVertexShaderID),A.push(T.customFragmentShaderID)),void 0!==T.defines)for(const $ in T.defines)A.push($),A.push(T.defines[$]);return!1===T.isRawShaderMaterial&&(function M(T,A){T.push(A.precision),T.push(A.outputColorSpace),T.push(A.envMapMode),T.push(A.envMapCubeUVHeight),T.push(A.mapUv),T.push(A.alphaMapUv),T.push(A.lightMapUv),T.push(A.aoMapUv),T.push(A.bumpMapUv),T.push(A.normalMapUv),T.push(A.displacementMapUv),T.push(A.emissiveMapUv),T.push(A.metalnessMapUv),T.push(A.roughnessMapUv),T.push(A.anisotropyMapUv),T.push(A.clearcoatMapUv),T.push(A.clearcoatNormalMapUv),T.push(A.clearcoatRoughnessMapUv),T.push(A.iridescenceMapUv),T.push(A.iridescenceThicknessMapUv),T.push(A.sheenColorMapUv),T.push(A.sheenRoughnessMapUv),T.push(A.specularMapUv),T.push(A.specularColorMapUv),T.push(A.specularIntensityMapUv),T.push(A.transmissionMapUv),T.push(A.thicknessMapUv),T.push(A.combine),T.push(A.fogExp2),T.push(A.sizeAttenuation),T.push(A.morphTargetsCount),T.push(A.morphAttributeCount),T.push(A.numDirLights),T.push(A.numPointLights),T.push(A.numSpotLights),T.push(A.numSpotLightMaps),T.push(A.numHemiLights),T.push(A.numRectAreaLights),T.push(A.numDirLightShadows),T.push(A.numPointLightShadows),T.push(A.numSpotLightShadows),T.push(A.numSpotLightShadowsWithMaps),T.push(A.numLightProbes),T.push(A.shadowMapType),T.push(A.toneMapping),T.push(A.numClippingPlanes),T.push(A.numClipIntersection),T.push(A.depthPacking)}(A,T),function x(T,A){a.disableAll(),A.supportsVertexTextures&&a.enable(0),A.instancing&&a.enable(1),A.instancingColor&&a.enable(2),A.instancingMorph&&a.enable(3),A.matcap&&a.enable(4),A.envMap&&a.enable(5),A.normalMapObjectSpace&&a.enable(6),A.normalMapTangentSpace&&a.enable(7),A.clearcoat&&a.enable(8),A.iridescence&&a.enable(9),A.alphaTest&&a.enable(10),A.vertexColors&&a.enable(11),A.vertexAlphas&&a.enable(12),A.vertexUv1s&&a.enable(13),A.vertexUv2s&&a.enable(14),A.vertexUv3s&&a.enable(15),A.vertexTangents&&a.enable(16),A.anisotropy&&a.enable(17),A.alphaHash&&a.enable(18),A.batching&&a.enable(19),A.dispersion&&a.enable(20),A.batchingColor&&a.enable(21),T.push(a.mask),a.disableAll(),A.fog&&a.enable(0),A.useFog&&a.enable(1),A.flatShading&&a.enable(2),A.logarithmicDepthBuffer&&a.enable(3),A.skinning&&a.enable(4),A.morphTargets&&a.enable(5),A.morphNormals&&a.enable(6),A.morphColors&&a.enable(7),A.premultipliedAlpha&&a.enable(8),A.shadowMapEnabled&&a.enable(9),A.doubleSided&&a.enable(10),A.flipSided&&a.enable(11),A.useDepthPacking&&a.enable(12),A.dithering&&a.enable(13),A.transmission&&a.enable(14),A.sheen&&a.enable(15),A.opaque&&a.enable(16),A.pointsUvs&&a.enable(17),A.decodeVideoTexture&&a.enable(18),A.alphaToCoverage&&a.enable(19),T.push(a.mask)}(A,T),A.push(i.outputColorSpace)),A.push(T.customProgramCacheKey),A.join()},getUniforms:function C(T){const A=g[T.type];let $;return $=A?Q4.clone(cc[A].uniforms):T.uniforms,$},acquireProgram:function F(T,A){let $;for(let ie=0,ne=d.length;ie0?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 d(){for(let h=t,p=i.length;h1&&e.sort(h||nue),n.length>1&&n.sort(p||D5),r.length>1&&r.sort(p||D5)}}}function iue(){let i=new WeakMap;return{get:function t(n,r){const s=i.get(n);let o;return void 0===s?(o=new T5,i.set(n,[o])):r>=s.length?(o=new T5,s.push(o)):o=s[r],o},dispose:function e(){i=new WeakMap}}}function rue(){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 O,color:new qe};break;case"SpotLight":e={position:new O,direction:new O,color:new qe,distance:0,coneCos:0,penumbraCos:0,decay:0};break;case"PointLight":e={position:new O,color:new qe,distance:0,decay:0};break;case"HemisphereLight":e={direction:new O,skyColor:new qe,groundColor:new qe};break;case"RectAreaLight":e={color:new qe,position:new O,halfWidth:new O,halfHeight:new O}}return i[t.id]=e,e}}}let oue=0;function aue(i,t){return(t.castShadow?2:0)-(i.castShadow?2:0)+(t.map?1:0)-(i.map?1:0)}function lue(i){const t=new rue,e=function sue(){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={shadowIntensity:1,shadowBias:0,shadowNormalBias:0,shadowRadius:1,shadowMapSize:new xe};break;case"PointLight":e={shadowIntensity:1,shadowBias:0,shadowNormalBias:0,shadowRadius:1,shadowMapSize:new xe,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 O);const r=new O,s=new Nt,o=new Nt;return{setup:function a(c){let d=0,h=0,p=0;for(let T=0;T<9;T++)n.probe[T].set(0,0,0);let m=0,g=0,b=0,v=0,y=0,M=0,x=0,C=0,F=0,D=0,k=0;c.sort(aue);for(let T=0,A=c.length;T0&&(!0===i.has("OES_texture_float_linear")?(n.rectAreaLTC1=Qe.LTC_FLOAT_1,n.rectAreaLTC2=Qe.LTC_FLOAT_2):(n.rectAreaLTC1=Qe.LTC_HALF_1,n.rectAreaLTC2=Qe.LTC_HALF_2)),n.ambient[0]=d,n.ambient[1]=h,n.ambient[2]=p;const B=n.hash;(B.directionalLength!==m||B.pointLength!==g||B.spotLength!==b||B.rectAreaLength!==v||B.hemiLength!==y||B.numDirectionalShadows!==M||B.numPointShadows!==x||B.numSpotShadows!==C||B.numSpotMaps!==F||B.numLightProbes!==k)&&(n.directional.length=m,n.spot.length=b,n.rectArea.length=v,n.point.length=g,n.hemi.length=y,n.directionalShadow.length=M,n.directionalShadowMap.length=M,n.pointShadow.length=x,n.pointShadowMap.length=x,n.spotShadow.length=C,n.spotShadowMap.length=C,n.directionalShadowMatrix.length=M,n.pointShadowMatrix.length=x,n.spotLightMatrix.length=C+F-D,n.spotLightMap.length=F,n.numSpotLightShadowsWithMaps=D,n.numLightProbes=k,B.directionalLength=m,B.pointLength=g,B.spotLength=b,B.rectAreaLength=v,B.hemiLength=y,B.numDirectionalShadows=M,B.numPointShadows=x,B.numSpotShadows=C,B.numSpotMaps=F,B.numLightProbes=k,n.version=oue++)},setupView:function l(c,d){let h=0,p=0,m=0,g=0,b=0;const v=d.matrixWorldInverse;for(let y=0,M=c.length;y=o.length?(a=new I5(i),o.push(a)):a=o[s],a},dispose:function n(){t=new WeakMap}}}class R5 extends Po{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 k5 extends Po{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 due="void main() {\n\tgl_Position = vec4( position, 1.0 );\n}",uue="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 hue(i,t,e){let n=new aS;const r=new xe,s=new xe,o=new gi,a=new R5({depthPacking:Eoe}),l=new k5,c={},d=e.maxTextureSize,h={[ac]:Io,[Io]:ac,[Ls]:Ls},p=new Cl({defines:{VSM_SAMPLES:8},uniforms:{shadow_pass:{value:null},resolution:{value:new xe},radius:{value:4}},vertexShader:due,fragmentShader:uue}),m=p.clone();m.defines.HORIZONTAL_PASS=1;const g=new hn;g.setAttribute("position",new Hi(new Float32Array([-1,-1,.5,3,-1,.5,-1,3,.5]),3));const b=new Mn(g,p),v=this;this.enabled=!1,this.autoUpdate=!0,this.needsUpdate=!1,this.type=l4;let y=this.type;function M(D,k){const B=t.update(b);p.defines.VSM_SAMPLES!==D.blurSamples&&(p.defines.VSM_SAMPLES=D.blurSamples,m.defines.VSM_SAMPLES=D.blurSamples,p.needsUpdate=!0,m.needsUpdate=!0),null===D.mapPass&&(D.mapPass=new Mu(r.x,r.y)),p.uniforms.shadow_pass.value=D.map.texture,p.uniforms.resolution.value=D.mapSize,p.uniforms.radius.value=D.radius,i.setRenderTarget(D.mapPass),i.clear(),i.renderBufferDirect(k,null,B,p,b,null),m.uniforms.shadow_pass.value=D.mapPass.texture,m.uniforms.resolution.value=D.mapSize,m.uniforms.radius.value=D.radius,i.setRenderTarget(D.map),i.clear(),i.renderBufferDirect(k,null,B,m,b,null)}function x(D,k,B,T){let A=null;const $=!0===B.isPointLight?D.customDistanceMaterial:D.customDepthMaterial;if(void 0!==$)A=$;else if(A=!0===B.isPointLight?l:a,i.localClippingEnabled&&!0===k.clipShadows&&Array.isArray(k.clippingPlanes)&&0!==k.clippingPlanes.length||k.displacementMap&&0!==k.displacementScale||k.alphaMap&&k.alphaTest>0||k.map&&k.alphaTest>0){const ie=A.uuid,ne=k.uuid;let se=c[ie];void 0===se&&(se={},c[ie]=se);let ge=se[ne];void 0===ge&&(ge=A.clone(),se[ne]=ge,k.addEventListener("dispose",F)),A=ge}return A.visible=k.visible,A.wireframe=k.wireframe,A.side=T===Zc?null!==k.shadowSide?k.shadowSide:k.side:null!==k.shadowSide?k.shadowSide:h[k.side],A.alphaMap=k.alphaMap,A.alphaTest=k.alphaTest,A.map=k.map,A.clipShadows=k.clipShadows,A.clippingPlanes=k.clippingPlanes,A.clipIntersection=k.clipIntersection,A.displacementMap=k.displacementMap,A.displacementScale=k.displacementScale,A.displacementBias=k.displacementBias,A.wireframeLinewidth=k.wireframeLinewidth,A.linewidth=k.linewidth,!0===B.isPointLight&&!0===A.isMeshDistanceMaterial&&(i.properties.get(A).light=B),A}function C(D,k,B,T,A){if(!1===D.visible)return;if(D.layers.test(k.layers)&&(D.isMesh||D.isLine||D.isPoints)&&(D.castShadow||D.receiveShadow&&A===Zc)&&(!D.frustumCulled||n.intersectsObject(D))){D.modelViewMatrix.multiplyMatrices(B.matrixWorldInverse,D.matrixWorld);const ne=t.update(D),se=D.material;if(Array.isArray(se)){const ge=ne.groups;for(let q=0,re=ge.length;qd||r.y>d)&&(r.x>d&&(s.x=Math.floor(d/we.x),r.x=s.x*we.x,J.mapSize.x=s.x),r.y>d&&(s.y=Math.floor(d/we.y),r.y=s.y*we.y,J.mapSize.y=s.y)),null===J.map||!0===ne||!0===se){const Ye=this.type!==Zc?{minFilter:_r,magFilter:_r}:{};null!==J.map&&J.map.dispose(),J.map=new Mu(r.x,r.y,Ye),J.map.texture.name=re.name+".shadowMap",J.camera.updateProjectionMatrix()}i.setRenderTarget(J.map),i.clear();const Ne=J.getViewportCount();for(let Ye=0;Ye=1):-1!==re.indexOf("OpenGL ES")&&(q=parseFloat(/^OpenGL ES (\d)/.exec(re)[1]),ge=q>=2);let J=null,we={};const Ne=i.getParameter(i.SCISSOR_BOX),Ye=i.getParameter(i.VIEWPORT),It=(new gi).fromArray(Ne),en=(new gi).fromArray(Ye);function ae(Z,$e,Ce,Ee){const Ke=new Uint8Array(4),tn=i.createTexture();i.bindTexture(Z,tn),i.texParameteri(Z,i.TEXTURE_MIN_FILTER,i.NEAREST),i.texParameteri(Z,i.TEXTURE_MAG_FILTER,i.NEAREST);for(let ei=0;ei"u")&&/OculusBrowser/g.test(navigator.userAgent),c=new xe,d=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(z,R){return m?new OffscreenCanvas(z,R):wb("canvas")}function b(z,R,ce){let Ie=1;const Te=pt(z);if((Te.width>ce||Te.height>ce)&&(Ie=ce/Math.max(Te.width,Te.height)),Ie<1){if(typeof HTMLImageElement<"u"&&z instanceof HTMLImageElement||typeof HTMLCanvasElement<"u"&&z instanceof HTMLCanvasElement||typeof ImageBitmap<"u"&&z instanceof ImageBitmap||typeof VideoFrame<"u"&&z instanceof VideoFrame){const Ae=Math.floor(Ie*Te.width),Bt=Math.floor(Ie*Te.height);void 0===h&&(h=g(Ae,Bt));const Je=R?g(Ae,Bt):h;return Je.width=Ae,Je.height=Bt,Je.getContext("2d").drawImage(z,0,0,Ae,Bt),console.warn("THREE.WebGLRenderer: Texture has been resized from ("+Te.width+"x"+Te.height+") to ("+Ae+"x"+Bt+")."),Je}return"data"in z&&console.warn("THREE.WebGLRenderer: Image in DataTexture is too big ("+Te.width+"x"+Te.height+")."),z}return z}function v(z){return z.generateMipmaps&&z.minFilter!==_r&&z.minFilter!==lr}function y(z){i.generateMipmap(z)}function M(z,R,ce,Ie,Te=!1){if(null!==z){if(void 0!==i[z])return i[z];console.warn("THREE.WebGLRenderer: Attempt to use non-existing WebGL internal format '"+z+"'")}let Ae=R;if(R===i.RED&&(ce===i.FLOAT&&(Ae=i.R32F),ce===i.HALF_FLOAT&&(Ae=i.R16F),ce===i.UNSIGNED_BYTE&&(Ae=i.R8)),R===i.RED_INTEGER&&(ce===i.UNSIGNED_BYTE&&(Ae=i.R8UI),ce===i.UNSIGNED_SHORT&&(Ae=i.R16UI),ce===i.UNSIGNED_INT&&(Ae=i.R32UI),ce===i.BYTE&&(Ae=i.R8I),ce===i.SHORT&&(Ae=i.R16I),ce===i.INT&&(Ae=i.R32I)),R===i.RG&&(ce===i.FLOAT&&(Ae=i.RG32F),ce===i.HALF_FLOAT&&(Ae=i.RG16F),ce===i.UNSIGNED_BYTE&&(Ae=i.RG8)),R===i.RG_INTEGER&&(ce===i.UNSIGNED_BYTE&&(Ae=i.RG8UI),ce===i.UNSIGNED_SHORT&&(Ae=i.RG16UI),ce===i.UNSIGNED_INT&&(Ae=i.RG32UI),ce===i.BYTE&&(Ae=i.RG8I),ce===i.SHORT&&(Ae=i.RG16I),ce===i.INT&&(Ae=i.RG32I)),R===i.RGB&&ce===i.UNSIGNED_INT_5_9_9_9_REV&&(Ae=i.RGB9_E5),R===i.RGBA){const Bt=Te?NC:Jn.getTransfer(Ie);ce===i.FLOAT&&(Ae=i.RGBA32F),ce===i.HALF_FLOAT&&(Ae=i.RGBA16F),ce===i.UNSIGNED_BYTE&&(Ae=Bt===Fi?i.SRGB8_ALPHA8:i.RGBA8),ce===i.UNSIGNED_SHORT_4_4_4_4&&(Ae=i.RGBA4),ce===i.UNSIGNED_SHORT_5_5_5_1&&(Ae=i.RGB5_A1)}return(Ae===i.R16F||Ae===i.R32F||Ae===i.RG16F||Ae===i.RG32F||Ae===i.RGBA16F||Ae===i.RGBA32F)&&t.get("EXT_color_buffer_float"),Ae}function x(z,R){let ce;return z?null===R||R===xu||R===eg?ce=i.DEPTH24_STENCIL8:R===Qo?ce=i.DEPTH32F_STENCIL8:R===vb&&(ce=i.DEPTH24_STENCIL8,console.warn("DepthTexture: 16 bit depth attachment is not supported with stencil. Using 24-bit attachment.")):null===R||R===xu||R===eg?ce=i.DEPTH_COMPONENT24:R===Qo?ce=i.DEPTH_COMPONENT32F:R===vb&&(ce=i.DEPTH_COMPONENT16),ce}function C(z,R){return!0===v(z)||z.isFramebufferTexture&&z.minFilter!==_r&&z.minFilter!==lr?Math.log2(Math.max(R.width,R.height))+1:void 0!==z.mipmaps&&z.mipmaps.length>0?z.mipmaps.length:z.isCompressedTexture&&Array.isArray(z.image)?R.mipmaps.length:1}function F(z){const R=z.target;R.removeEventListener("dispose",F),function k(z){const R=n.get(z);if(void 0===R.__webglInit)return;const ce=z.source,Ie=p.get(ce);if(Ie){const Te=Ie[R.__cacheKey];Te.usedTimes--,0===Te.usedTimes&&B(z),0===Object.keys(Ie).length&&p.delete(ce)}n.remove(z)}(R),R.isVideoTexture&&d.delete(R)}function D(z){const R=z.target;R.removeEventListener("dispose",D),function T(z){const R=n.get(z);if(z.depthTexture&&z.depthTexture.dispose(),z.isWebGLCubeRenderTarget)for(let Ie=0;Ie<6;Ie++){if(Array.isArray(R.__webglFramebuffer[Ie]))for(let Te=0;Te0&&ce.__version!==z.version){const Ie=z.image;if(null===Ie)console.warn("THREE.WebGLRenderer: Texture marked for update but no image data found.");else{if(!1!==Ie.complete)return void en(ce,z,R);console.warn("THREE.WebGLRenderer: Texture marked for update but image is incomplete")}}e.bindTexture(i.TEXTURE_2D,ce.__webglTexture,i.TEXTURE0+R)}const J={[Pa]:i.REPEAT,[Ii]:i.CLAMP_TO_EDGE,[gb]:i.MIRRORED_REPEAT},we={[_r]:i.NEAREST,[dk]:i.NEAREST_MIPMAP_NEAREST,[Qm]:i.NEAREST_MIPMAP_LINEAR,[lr]:i.LINEAR,[_b]:i.LINEAR_MIPMAP_NEAREST,[bl]:i.LINEAR_MIPMAP_LINEAR},Ne={[Doe]:i.NEVER,[Ooe]:i.ALWAYS,[Toe]:i.LESS,[E4]:i.LEQUAL,[Ioe]:i.EQUAL,[Poe]:i.GEQUAL,[Roe]:i.GREATER,[koe]:i.NOTEQUAL};function Ye(z,R){if(R.type===Qo&&!1===t.has("OES_texture_float_linear")&&(R.magFilter===lr||R.magFilter===_b||R.magFilter===Qm||R.magFilter===bl||R.minFilter===lr||R.minFilter===_b||R.minFilter===Qm||R.minFilter===bl)&&console.warn("THREE.WebGLRenderer: Unable to use linear filtering with floating point textures. OES_texture_float_linear not supported on this device."),i.texParameteri(z,i.TEXTURE_WRAP_S,J[R.wrapS]),i.texParameteri(z,i.TEXTURE_WRAP_T,J[R.wrapT]),(z===i.TEXTURE_3D||z===i.TEXTURE_2D_ARRAY)&&i.texParameteri(z,i.TEXTURE_WRAP_R,J[R.wrapR]),i.texParameteri(z,i.TEXTURE_MAG_FILTER,we[R.magFilter]),i.texParameteri(z,i.TEXTURE_MIN_FILTER,we[R.minFilter]),R.compareFunction&&(i.texParameteri(z,i.TEXTURE_COMPARE_MODE,i.COMPARE_REF_TO_TEXTURE),i.texParameteri(z,i.TEXTURE_COMPARE_FUNC,Ne[R.compareFunction])),!0===t.has("EXT_texture_filter_anisotropic")){if(R.magFilter===_r||R.minFilter!==Qm&&R.minFilter!==bl||R.type===Qo&&!1===t.has("OES_texture_float_linear"))return;if(R.anisotropy>1||n.get(R).__currentAnisotropy){const ce=t.get("EXT_texture_filter_anisotropic");i.texParameterf(z,ce.TEXTURE_MAX_ANISOTROPY_EXT,Math.min(R.anisotropy,r.getMaxAnisotropy())),n.get(R).__currentAnisotropy=R.anisotropy}}}function It(z,R){let ce=!1;void 0===z.__webglInit&&(z.__webglInit=!0,R.addEventListener("dispose",F));const Ie=R.source;let Te=p.get(Ie);void 0===Te&&(Te={},p.set(Ie,Te));const Ae=function ne(z){const R=[];return R.push(z.wrapS),R.push(z.wrapT),R.push(z.wrapR||0),R.push(z.magFilter),R.push(z.minFilter),R.push(z.anisotropy),R.push(z.internalFormat),R.push(z.format),R.push(z.type),R.push(z.generateMipmaps),R.push(z.premultiplyAlpha),R.push(z.flipY),R.push(z.unpackAlignment),R.push(z.colorSpace),R.join()}(R);if(Ae!==z.__cacheKey){void 0===Te[Ae]&&(Te[Ae]={texture:i.createTexture(),usedTimes:0},o.memory.textures++,ce=!0),Te[Ae].usedTimes++;const Bt=Te[z.__cacheKey];void 0!==Bt&&(Te[z.__cacheKey].usedTimes--,0===Bt.usedTimes&&B(R)),z.__cacheKey=Ae,z.__webglTexture=Te[Ae].texture}return ce}function en(z,R,ce){let Ie=i.TEXTURE_2D;(R.isDataArrayTexture||R.isCompressedArrayTexture)&&(Ie=i.TEXTURE_2D_ARRAY),R.isData3DTexture&&(Ie=i.TEXTURE_3D);const Te=It(z,R),Ae=R.source;e.bindTexture(Ie,z.__webglTexture,i.TEXTURE0+ce);const Bt=n.get(Ae);if(Ae.version!==Bt.__version||!0===Te){e.activeTexture(i.TEXTURE0+ce);const Je=Jn.getPrimaries(Jn.workingColorSpace),ut=R.colorSpace===wu?null:Jn.getPrimaries(R.colorSpace),bn=R.colorSpace===wu||Je===ut?i.NONE:i.BROWSER_DEFAULT_WEBGL;i.pixelStorei(i.UNPACK_FLIP_Y_WEBGL,R.flipY),i.pixelStorei(i.UNPACK_PREMULTIPLY_ALPHA_WEBGL,R.premultiplyAlpha),i.pixelStorei(i.UNPACK_ALIGNMENT,R.unpackAlignment),i.pixelStorei(i.UNPACK_COLORSPACE_CONVERSION_WEBGL,bn);let ze=b(R.image,!1,r.maxTextureSize);ze=it(R,ze);const dt=s.convert(R.format,R.colorSpace),jn=s.convert(R.type);let _t,ln=M(R.internalFormat,dt,jn,R.colorSpace,R.isVideoTexture);Ye(Ie,R);const vn=R.mipmaps,Pn=!0!==R.isVideoTexture,Ki=void 0===Bt.__version||!0===Te,Z=Ae.dataReady,$e=C(R,ze);if(R.isDepthTexture)ln=x(R.format===ng,R.type),Ki&&(Pn?e.texStorage2D(i.TEXTURE_2D,1,ln,ze.width,ze.height):e.texImage2D(i.TEXTURE_2D,0,ln,ze.width,ze.height,0,dt,jn,null));else if(R.isDataTexture)if(vn.length>0){Pn&&Ki&&e.texStorage2D(i.TEXTURE_2D,$e,ln,vn[0].width,vn[0].height);for(let Ce=0,Ee=vn.length;Ce0){const Ke=MP(_t.width,_t.height,R.format,R.type);for(const tn of R.layerUpdates){const ei=_t.data.subarray(tn*Ke/_t.data.BYTES_PER_ELEMENT,(tn+1)*Ke/_t.data.BYTES_PER_ELEMENT);e.compressedTexSubImage3D(i.TEXTURE_2D_ARRAY,Ce,0,0,tn,_t.width,_t.height,1,dt,ei,0,0)}R.clearLayerUpdates()}else e.compressedTexSubImage3D(i.TEXTURE_2D_ARRAY,Ce,0,0,0,_t.width,_t.height,ze.depth,dt,_t.data,0,0)}else e.compressedTexImage3D(i.TEXTURE_2D_ARRAY,Ce,ln,_t.width,_t.height,ze.depth,0,_t.data,0,0);else console.warn("THREE.WebGLRenderer: Attempt to load unsupported compressed texture format in .uploadTexture()");else Pn?Z&&e.texSubImage3D(i.TEXTURE_2D_ARRAY,Ce,0,0,0,_t.width,_t.height,ze.depth,dt,jn,_t.data):e.texImage3D(i.TEXTURE_2D_ARRAY,Ce,ln,_t.width,_t.height,ze.depth,0,dt,jn,_t.data)}else{Pn&&Ki&&e.texStorage2D(i.TEXTURE_2D,$e,ln,vn[0].width,vn[0].height);for(let Ce=0,Ee=vn.length;Ce0){const Ce=MP(ze.width,ze.height,R.format,R.type);for(const Ee of R.layerUpdates){const Ke=ze.data.subarray(Ee*Ce/ze.data.BYTES_PER_ELEMENT,(Ee+1)*Ce/ze.data.BYTES_PER_ELEMENT);e.texSubImage3D(i.TEXTURE_2D_ARRAY,0,0,0,Ee,ze.width,ze.height,1,dt,jn,Ke)}R.clearLayerUpdates()}else e.texSubImage3D(i.TEXTURE_2D_ARRAY,0,0,0,0,ze.width,ze.height,ze.depth,dt,jn,ze.data)}else e.texImage3D(i.TEXTURE_2D_ARRAY,0,ln,ze.width,ze.height,ze.depth,0,dt,jn,ze.data);else if(R.isData3DTexture)Pn?(Ki&&e.texStorage3D(i.TEXTURE_3D,$e,ln,ze.width,ze.height,ze.depth),Z&&e.texSubImage3D(i.TEXTURE_3D,0,0,0,0,ze.width,ze.height,ze.depth,dt,jn,ze.data)):e.texImage3D(i.TEXTURE_3D,0,ln,ze.width,ze.height,ze.depth,0,dt,jn,ze.data);else if(R.isFramebufferTexture){if(Ki)if(Pn)e.texStorage2D(i.TEXTURE_2D,$e,ln,ze.width,ze.height);else{let Ce=ze.width,Ee=ze.height;for(let Ke=0;Ke<$e;Ke++)e.texImage2D(i.TEXTURE_2D,Ke,ln,Ce,Ee,0,dt,jn,null),Ce>>=1,Ee>>=1}}else if(vn.length>0){if(Pn&&Ki){const Ce=pt(vn[0]);e.texStorage2D(i.TEXTURE_2D,$e,ln,Ce.width,Ce.height)}for(let Ce=0,Ee=vn.length;Ce>Ae),dt=Math.max(1,R.height>>Ae);Te===i.TEXTURE_3D||Te===i.TEXTURE_2D_ARRAY?e.texImage3D(Te,Ae,ut,ze,dt,R.depth,0,Bt,Je,null):e.texImage2D(Te,Ae,ut,ze,dt,0,Bt,Je,null)}e.bindFramebuffer(i.FRAMEBUFFER,z),Me(R)?a.framebufferTexture2DMultisampleEXT(i.FRAMEBUFFER,Ie,Te,n.get(ce).__webglTexture,0,nt(R)):(Te===i.TEXTURE_2D||Te>=i.TEXTURE_CUBE_MAP_POSITIVE_X&&Te<=i.TEXTURE_CUBE_MAP_NEGATIVE_Z)&&i.framebufferTexture2D(i.FRAMEBUFFER,Ie,Te,n.get(ce).__webglTexture,Ae),e.bindFramebuffer(i.FRAMEBUFFER,null)}function Ze(z,R,ce){if(i.bindRenderbuffer(i.RENDERBUFFER,z),R.depthBuffer){const Ie=R.depthTexture,Ae=x(R.stencilBuffer,Ie&&Ie.isDepthTexture?Ie.type:null),Bt=R.stencilBuffer?i.DEPTH_STENCIL_ATTACHMENT:i.DEPTH_ATTACHMENT,Je=nt(R);Me(R)?a.renderbufferStorageMultisampleEXT(i.RENDERBUFFER,Je,Ae,R.width,R.height):ce?i.renderbufferStorageMultisample(i.RENDERBUFFER,Je,Ae,R.width,R.height):i.renderbufferStorage(i.RENDERBUFFER,Ae,R.width,R.height),i.framebufferRenderbuffer(i.FRAMEBUFFER,Bt,i.RENDERBUFFER,z)}else{const Ie=R.textures;for(let Te=0;Te0&&!0===t.has("WEBGL_multisampled_render_to_texture")&&!1!==R.__useRenderToTexture}function it(z,R){const ce=z.colorSpace,Ie=z.format,Te=z.type;return!0===z.isCompressedTexture||!0===z.isVideoTexture||ce!==ds&&ce!==wu&&(Jn.getTransfer(ce)===Fi?(Ie!==Ro||Te!==Jc)&&console.warn("THREE.WebGLTextures: sRGB encoded textures have to use RGBAFormat and UnsignedByteType."):console.error("THREE.WebGLTextures: Unsupported texture color space:",ce)),R}function pt(z){return typeof HTMLImageElement<"u"&&z instanceof HTMLImageElement?(c.width=z.naturalWidth||z.width,c.height=z.naturalHeight||z.height):typeof VideoFrame<"u"&&z instanceof VideoFrame?(c.width=z.displayWidth,c.height=z.displayHeight):(c.width=z.width,c.height=z.height),c}this.allocateTextureUnit=function ie(){const z=A;return z>=r.maxTextures&&console.warn("THREE.WebGLTextures: Trying to use "+z+" texture units while this GPU supports only "+r.maxTextures),A+=1,z},this.resetTextureUnits=function $(){A=0},this.setTexture2D=se,this.setTexture2DArray=function ge(z,R){const ce=n.get(z);z.version>0&&ce.__version!==z.version?en(ce,z,R):e.bindTexture(i.TEXTURE_2D_ARRAY,ce.__webglTexture,i.TEXTURE0+R)},this.setTexture3D=function q(z,R){const ce=n.get(z);z.version>0&&ce.__version!==z.version?en(ce,z,R):e.bindTexture(i.TEXTURE_3D,ce.__webglTexture,i.TEXTURE0+R)},this.setTextureCube=function re(z,R){const ce=n.get(z);z.version>0&&ce.__version!==z.version?function ae(z,R,ce){if(6!==R.image.length)return;const Ie=It(z,R),Te=R.source;e.bindTexture(i.TEXTURE_CUBE_MAP,z.__webglTexture,i.TEXTURE0+ce);const Ae=n.get(Te);if(Te.version!==Ae.__version||!0===Ie){e.activeTexture(i.TEXTURE0+ce);const Bt=Jn.getPrimaries(Jn.workingColorSpace),Je=R.colorSpace===wu?null:Jn.getPrimaries(R.colorSpace),ut=R.colorSpace===wu||Bt===Je?i.NONE:i.BROWSER_DEFAULT_WEBGL;i.pixelStorei(i.UNPACK_FLIP_Y_WEBGL,R.flipY),i.pixelStorei(i.UNPACK_PREMULTIPLY_ALPHA_WEBGL,R.premultiplyAlpha),i.pixelStorei(i.UNPACK_ALIGNMENT,R.unpackAlignment),i.pixelStorei(i.UNPACK_COLORSPACE_CONVERSION_WEBGL,ut);const bn=R.isCompressedTexture||R.image[0].isCompressedTexture,ze=R.image[0]&&R.image[0].isDataTexture,dt=[];for(let Ee=0;Ee<6;Ee++)dt[Ee]=bn||ze?ze?R.image[Ee].image:R.image[Ee]:b(R.image[Ee],!0,r.maxCubemapSize),dt[Ee]=it(R,dt[Ee]);const jn=dt[0],ln=s.convert(R.format,R.colorSpace),_t=s.convert(R.type),vn=M(R.internalFormat,ln,_t,R.colorSpace),Pn=!0!==R.isVideoTexture,Ki=void 0===Ae.__version||!0===Ie,Z=Te.dataReady;let Ce,$e=C(R,jn);if(Ye(i.TEXTURE_CUBE_MAP,R),bn){Pn&&Ki&&e.texStorage2D(i.TEXTURE_CUBE_MAP,$e,vn,jn.width,jn.height);for(let Ee=0;Ee<6;Ee++){Ce=dt[Ee].mipmaps;for(let Ke=0;Ke0&&$e++;const Ee=pt(dt[0]);e.texStorage2D(i.TEXTURE_CUBE_MAP,$e,vn,Ee.width,Ee.height)}for(let Ee=0;Ee<6;Ee++)if(ze){Pn?Z&&e.texSubImage2D(i.TEXTURE_CUBE_MAP_POSITIVE_X+Ee,0,0,0,dt[Ee].width,dt[Ee].height,ln,_t,dt[Ee].data):e.texImage2D(i.TEXTURE_CUBE_MAP_POSITIVE_X+Ee,0,vn,dt[Ee].width,dt[Ee].height,0,ln,_t,dt[Ee].data);for(let Ke=0;Ke1;if(Bt||(void 0===Ie.__webglTexture&&(Ie.__webglTexture=i.createTexture()),Ie.__version=R.version,o.memory.textures++),Ae){ce.__webglFramebuffer=[];for(let Je=0;Je<6;Je++)if(R.mipmaps&&R.mipmaps.length>0){ce.__webglFramebuffer[Je]=[];for(let ut=0;ut0){ce.__webglFramebuffer=[];for(let Je=0;Je0&&!1===Me(z)){ce.__webglMultisampledFramebuffer=i.createFramebuffer(),ce.__webglColorRenderbuffer=[],e.bindFramebuffer(i.FRAMEBUFFER,ce.__webglMultisampledFramebuffer);for(let Je=0;Je0)for(let ut=0;ut0)for(let ut=0;ut0)if(!1===Me(z)){const R=z.textures,ce=z.width,Ie=z.height;let Te=i.COLOR_BUFFER_BIT;const Ae=z.stencilBuffer?i.DEPTH_STENCIL_ATTACHMENT:i.DEPTH_ATTACHMENT,Bt=n.get(z),Je=R.length>1;if(Je)for(let ut=0;utm+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(xue)))}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 Fo;n.matrixAutoUpdate=!1,n.visible=!1,t.joints[e.jointName]=n,t.add(n)}return t.joints[e.jointName]}}class Cue{constructor(){this.texture=null,this.mesh=null,this.depthNear=0,this.depthFar=0}init(t,e,n){if(null===this.texture){const r=new ko;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}}getMesh(t){if(null!==this.texture&&null===this.mesh){const e=t.cameras[0].viewport,n=new Cl({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:e.z},depthHeight:{value:e.w}}});this.mesh=new Mn(new Iu(20,20),n)}return this.mesh}reset(){this.texture=null,this.mesh=null}getDepthTexture(){return this.texture}}class Sue extends og{constructor(t,e){super();const n=this;let r=null,s=1,o=null,a="local-floor",l=1,c=null,d=null,h=null,p=null,m=null,g=null;const b=new Cue,v=e.getContextAttributes();let y=null,M=null;const x=[],C=[],F=new xe;let D=null;const k=new yr;k.layers.enable(1),k.viewport=new gi;const B=new yr;B.layers.enable(2),B.viewport=new gi;const T=[k,B],A=new bue;A.layers.enable(1),A.layers.enable(2);let $=null,ie=null;function ne(ae){const Oe=C.indexOf(ae.inputSource);if(-1===Oe)return;const Ze=x[Oe];void 0!==Ze&&(Ze.update(ae.inputSource,ae.frame,c||o),Ze.dispatchEvent({type:ae.type,data:ae.inputSource}))}function se(){r.removeEventListener("select",ne),r.removeEventListener("selectstart",ne),r.removeEventListener("selectend",ne),r.removeEventListener("squeeze",ne),r.removeEventListener("squeezestart",ne),r.removeEventListener("squeezeend",ne),r.removeEventListener("end",se),r.removeEventListener("inputsourceschange",ge);for(let ae=0;ae=0&&(C[Fe]=null,x[Fe].disconnect(Ze))}for(let Oe=0;Oe=C.length){C.push(Ze),Fe=St;break}if(null===C[St]){C[St]=Ze,Fe=St;break}}if(-1===Fe)break}const bt=x[Fe];bt&&bt.connect(Ze)}}this.cameraAutoUpdate=!0,this.enabled=!1,this.isPresenting=!1,this.getController=function(ae){let Oe=x[ae];return void 0===Oe&&(Oe=new CP,x[ae]=Oe),Oe.getTargetRaySpace()},this.getControllerGrip=function(ae){let Oe=x[ae];return void 0===Oe&&(Oe=new CP,x[ae]=Oe),Oe.getGripSpace()},this.getHand=function(ae){let Oe=x[ae];return void 0===Oe&&(Oe=new CP,x[ae]=Oe),Oe.getHandSpace()},this.setFramebufferScaleFactor=function(ae){s=ae,!0===n.isPresenting&&console.warn("THREE.WebXRManager: Cannot change framebuffer scale while presenting.")},this.setReferenceSpaceType=function(ae){a=ae,!0===n.isPresenting&&console.warn("THREE.WebXRManager: Cannot change reference space type while presenting.")},this.getReferenceSpace=function(){return c||o},this.setReferenceSpace=function(ae){c=ae},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 ae=tt(function*(Oe){if(r=Oe,null!==r){if(y=t.getRenderTarget(),r.addEventListener("select",ne),r.addEventListener("selectstart",ne),r.addEventListener("selectend",ne),r.addEventListener("squeeze",ne),r.addEventListener("squeezestart",ne),r.addEventListener("squeezeend",ne),r.addEventListener("end",se),r.addEventListener("inputsourceschange",ge),!0!==v.xrCompatible&&(yield e.makeXRCompatible()),D=t.getPixelRatio(),t.getSize(F),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 Mu(m.framebufferWidth,m.framebufferHeight,{format:Ro,type:Jc,colorSpace:t.outputColorSpace,stencilBuffer:v.stencil});else{let Ze=null,Fe=null,bt=null;v.depth&&(bt=v.stencil?e.DEPTH24_STENCIL8:e.DEPTH_COMPONENT24,Ze=v.stencil?ng:tg,Fe=v.stencil?eg:xu);const St={colorFormat:e.RGBA8,depthFormat:bt,scaleFactor:s};h=new XRWebGLBinding(r,e),p=h.createProjectionLayer(St),r.updateRenderState({layers:[p]}),t.setPixelRatio(1),t.setSize(p.textureWidth,p.textureHeight,!1),M=new Mu(p.textureWidth,p.textureHeight,{format:Ro,type:Jc,depthTexture:new d5(p.textureWidth,p.textureHeight,Fe,void 0,void 0,void 0,void 0,void 0,void 0,Ze),stencilBuffer:v.stencil,colorSpace:t.outputColorSpace,samples:v.antialias?4:0,resolveDepthBuffer:!1===p.ignoreDepthValues})}M.isXRRenderTarget=!0,this.setFoveation(l),c=null,o=yield r.requestReferenceSpace(a),en.setContext(r),en.start(),n.isPresenting=!0,n.dispatchEvent({type:"sessionstart"})}});return function(Oe){return ae.apply(this,arguments)}}(),this.getEnvironmentBlendMode=function(){if(null!==r)return r.environmentBlendMode},this.getDepthTexture=function(){return b.getDepthTexture()};const q=new O,re=new O;function we(ae,Oe){null===Oe?ae.matrixWorld.copy(ae.matrix):ae.matrixWorld.multiplyMatrices(Oe.matrixWorld,ae.matrix),ae.matrixWorldInverse.copy(ae.matrixWorld).invert()}this.updateCamera=function(ae){if(null===r)return;null!==b.texture&&(ae.near=b.depthNear,ae.far=b.depthFar),A.near=B.near=k.near=ae.near,A.far=B.far=k.far=ae.far,($!==A.near||ie!==A.far)&&(r.updateRenderState({depthNear:A.near,depthFar:A.far}),$=A.near,ie=A.far,k.near=$,k.far=ie,B.near=$,B.far=ie,k.updateProjectionMatrix(),B.updateProjectionMatrix(),ae.updateProjectionMatrix());const Oe=ae.parent,Ze=A.cameras;we(A,Oe);for(let Fe=0;Fe0&&(v.alphaTest.value=y.alphaTest);const M=t.get(y),x=M.envMap,C=M.envMapRotation;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(Eue.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,v.lightMapIntensity.value=y.lightMapIntensity,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,Z4(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 d(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===Io&&v.clearcoatNormalScale.value.negate())),y.dispersion>0&&(v.dispersion.value=y.dispersion),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 Due(i,t,e,n){let r={},s={},o=[];const a=i.getParameter(i.MAX_UNIFORM_BUFFER_BINDINGS);function m(M,x,C,F){const D=M.value,k=x+"_"+C;if(void 0===F[k])return F[k]="number"==typeof D||"boolean"==typeof D?D:D.clone(),!0;{const B=F[k];if("number"==typeof D||"boolean"==typeof D){if(B!==D)return F[k]=D,!0}else if(!1===B.equals(D))return B.copy(D),!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 k=0,B=x.length;k0&&(C+=16-D),M.__size=C,M.__cache={}}(M),C=function d(M){const x=function h(){for(let M=0;M0),Xt=!!le.morphAttributes.position,ai=!!le.morphAttributes.normal,Li=!!le.morphAttributes.color;let nr=bu;de.toneMapped&&(null===k||!0===k.isXRRenderTarget)&&(nr=x.toneMapping);const oa=le.morphAttributes.position||le.morphAttributes.normal||le.morphAttributes.color,hi=void 0!==oa?oa.length:0,Rt=it.get(de),fs=v.state.lights;!0!==ae||!0!==Oe&&L===T||bn.setState(de,L,L===T&&de.id===B);let fi=!1;de.version===Rt.__version?(Rt.needsLights&&Rt.lightsStateVersion!==fs.state.version||Rt.outputColorSpace!==xt||te.isBatchedMesh&&!1===Rt.batching||!te.isBatchedMesh&&!0===Rt.batching||te.isBatchedMesh&&!0===Rt.batchingColor&&null===te.colorTexture||te.isBatchedMesh&&!1===Rt.batchingColor&&null!==te.colorTexture||te.isInstancedMesh&&!1===Rt.instancing||!te.isInstancedMesh&&!0===Rt.instancing||te.isSkinnedMesh&&!1===Rt.skinning||!te.isSkinnedMesh&&!0===Rt.skinning||te.isInstancedMesh&&!0===Rt.instancingColor&&null===te.instanceColor||te.isInstancedMesh&&!1===Rt.instancingColor&&null!==te.instanceColor||te.isInstancedMesh&&!0===Rt.instancingMorph&&null===te.morphTexture||te.isInstancedMesh&&!1===Rt.instancingMorph&&null!==te.morphTexture||Rt.envMap!==wt||!0===de.fog&&Rt.fog!==je||void 0!==Rt.numClippingPlanes&&(Rt.numClippingPlanes!==bn.numPlanes||Rt.numIntersection!==bn.numIntersection)||Rt.vertexAlphas!==qt||Rt.vertexTangents!==on||Rt.morphTargets!==Xt||Rt.morphNormals!==ai||Rt.morphColors!==Li||Rt.toneMapping!==nr||Rt.morphTargetsCount!==hi)&&(fi=!0):(fi=!0,Rt.__version=de.version);let El=Rt.currentProgram;!0===fi&&(El=xE(de,K,te));let qg=!1,aa=!1,qO=!1;const xr=El.getUniforms(),Uu=Rt.uniforms;if(Me.useProgram(El.program)&&(qg=!0,aa=!0,qO=!0),de.id!==B&&(B=de.id,aa=!0),qg||T!==L){xr.setValue(N,"projectionMatrix",L.projectionMatrix),xr.setValue(N,"viewMatrix",L.matrixWorldInverse);const za=xr.map.cameraPosition;void 0!==za&&za.setValue(N,Fe.setFromMatrixPosition(L.matrixWorld)),nt.logarithmicDepthBuffer&&xr.setValue(N,"logDepthBufFC",2/(Math.log(L.far+1)/Math.LN2)),(de.isMeshPhongMaterial||de.isMeshToonMaterial||de.isMeshLambertMaterial||de.isMeshBasicMaterial||de.isMeshStandardMaterial||de.isShaderMaterial)&&xr.setValue(N,"isOrthographic",!0===L.isOrthographicCamera),T!==L&&(T=L,aa=!0,qO=!0)}if(te.isSkinnedMesh){xr.setOptional(N,te,"bindMatrix"),xr.setOptional(N,te,"bindMatrixInverse");const za=te.skeleton;za&&(null===za.boneTexture&&za.computeBoneTexture(),xr.setValue(N,"boneTexture",za.boneTexture,pt))}te.isBatchedMesh&&(xr.setOptional(N,te,"batchingTexture"),xr.setValue(N,"batchingTexture",te._matricesTexture,pt),xr.setOptional(N,te,"batchingIdTexture"),xr.setValue(N,"batchingIdTexture",te._indirectTexture,pt),xr.setOptional(N,te,"batchingColorTexture"),null!==te._colorsTexture&&xr.setValue(N,"batchingColorTexture",te._colorsTexture,pt));const XO=le.morphAttributes;if((void 0!==XO.position||void 0!==XO.normal||void 0!==XO.color)&&jn.update(te,le,El),(aa||Rt.receiveShadow!==te.receiveShadow)&&(Rt.receiveShadow=te.receiveShadow,xr.setValue(N,"receiveShadow",te.receiveShadow)),de.isMeshGouraudMaterial&&null!==de.envMap&&(Uu.envMap.value=wt,Uu.flipEnvMap.value=wt.isCubeTexture&&!1===wt.isRenderTargetTexture?-1:1),de.isMeshStandardMaterial&&null===de.envMap&&null!==K.environment&&(Uu.envMapIntensity.value=K.environmentIntensity),aa&&(xr.setValue(N,"toneMappingExposure",x.toneMappingExposure),Rt.needsLights&&function Pve(L,K){L.ambientLightColor.needsUpdate=K,L.lightProbe.needsUpdate=K,L.directionalLights.needsUpdate=K,L.directionalLightShadows.needsUpdate=K,L.pointLights.needsUpdate=K,L.pointLightShadows.needsUpdate=K,L.spotLights.needsUpdate=K,L.spotLightShadows.needsUpdate=K,L.rectAreaLights.needsUpdate=K,L.hemisphereLights.needsUpdate=K}(Uu,qO),je&&!0===de.fog&&Bt.refreshFogUniforms(Uu,je),Bt.refreshMaterialUniforms(Uu,de,re,q,v.state.transmissionRenderTarget[L.id]),uS.upload(N,_8(Rt),Uu,pt)),de.isShaderMaterial&&!0===de.uniformsNeedUpdate&&(uS.upload(N,_8(Rt),Uu,pt),de.uniformsNeedUpdate=!1),de.isSpriteMaterial&&xr.setValue(N,"center",te.center),xr.setValue(N,"modelViewMatrix",te.modelViewMatrix),xr.setValue(N,"normalMatrix",te.normalMatrix),xr.setValue(N,"modelMatrix",te.matrixWorld),de.isShaderMaterial||de.isRawShaderMaterial){const za=de.uniformsGroups;for(let KO=0,Fve=za.length;KO{function je(){de.forEach(function(st){it.get(st).currentProgram.isReady()&&de.delete(st)}),0!==de.size?setTimeout(je,10):te(L)}null!==Le.get("KHR_parallel_shader_compile")?je():setTimeout(je,10)})};let ui=null;function fc(){kf.stop()}function f8(){kf.start()}const kf=new t5;function YO(L,K,le,de){if(!1===L.visible)return;if(L.layers.test(K.layers))if(L.isGroup)le=L.renderOrder;else if(L.isLOD)!0===L.autoUpdate&&L.update(K);else if(L.isLight)v.pushLight(L),L.castShadow&&v.pushShadow(L);else if(L.isSprite){if(!L.frustumCulled||en.intersectsSprite(L)){de&&bt.setFromMatrixPosition(L.matrixWorld).applyMatrix4(Ze);const st=Te.update(L),xt=L.material;xt.visible&&b.push(L,st,xt,le,bt.z,null)}}else if((L.isMesh||L.isLine||L.isPoints)&&(!L.frustumCulled||en.intersectsObject(L))){const st=Te.update(L),xt=L.material;if(de&&(void 0!==L.boundingSphere?(null===L.boundingSphere&&L.computeBoundingSphere(),bt.copy(L.boundingSphere.center)):(null===st.boundingSphere&&st.computeBoundingSphere(),bt.copy(st.boundingSphere.center)),bt.applyMatrix4(L.matrixWorld).applyMatrix4(Ze)),Array.isArray(xt)){const wt=st.groups;for(let qt=0,on=wt.length;qt0&&bE(te,K,le),je.length>0&&bE(je,K,le),st.length>0&&bE(st,K,le),Me.buffers.depth.setTest(!0),Me.buffers.depth.setMask(!0),Me.buffers.color.setMask(!0),Me.setPolygonOffset(!1)}function m8(L,K,le,de){if(null!==(!0===le.isScene?le.overrideMaterial:null))return;void 0===v.state.transmissionRenderTarget[de.id]&&(v.state.transmissionRenderTarget[de.id]=new Mu(1,1,{generateMipmaps:!0,type:Le.has("EXT_color_buffer_half_float")||Le.has("EXT_color_buffer_float")?Jm:Jc,minFilter:bl,samples:4,stencilBuffer:s,resolveDepthBuffer:!1,resolveStencilBuffer:!1,colorSpace:Jn.workingColorSpace}));const je=v.state.transmissionRenderTarget[de.id],st=de.viewport||A;je.setSize(st.z,st.w);const xt=x.getRenderTarget();x.setRenderTarget(je),x.getClearColor(ne),se=x.getClearAlpha(),se<1&&x.setClearColor(16777215,.5),x.clear(),Mt&&dt.render(le);const wt=x.toneMapping;x.toneMapping=bu;const qt=de.viewport;if(void 0!==de.viewport&&(de.viewport=void 0),v.setupLightsView(de),!0===ae&&bn.setGlobalState(x.clippingPlanes,de),bE(L,le,de),pt.updateMultisampleRenderTarget(je),pt.updateRenderTargetMipmap(je),!1===Le.has("WEBGL_multisampled_render_to_texture")){let on=!1;for(let Xt=0,ai=K.length;Xt0)for(let st=0,xt=je.length;st0&&m8(de,te,L,K),Mt&&dt.render(L),p8(b,L,K);null!==k&&(pt.updateMultisampleRenderTarget(k),pt.updateRenderTargetMipmap(k)),!0===L.isScene&&L.onAfterRender(x,L,K),Pn.resetDefaultState(),B=-1,T=null,M.pop(),M.length>0?(v=M[M.length-1],!0===ae&&bn.setGlobalState(x.clippingPlanes,v.state.camera)):v=null,y.pop(),b=y.length>0?y[y.length-1]:null},this.getActiveCubeFace=function(){return F},this.getActiveMipmapLevel=function(){return D},this.getRenderTarget=function(){return k},this.setRenderTargetTextures=function(L,K,le){it.get(L.texture).__webglTexture=K,it.get(L.depthTexture).__webglTexture=le;const de=it.get(L);de.__hasExternalTextures=!0,de.__autoAllocateDepthBuffer=void 0===le,de.__autoAllocateDepthBuffer||!0===Le.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(L,K){const le=it.get(L);le.__webglFramebuffer=K,le.__useDefaultFramebuffer=void 0===K},this.setRenderTarget=function(L,K=0,le=0){k=L,F=K,D=le;let de=!0,te=null,je=!1,st=!1;if(L){const wt=it.get(L);void 0!==wt.__useDefaultFramebuffer?(Me.bindFramebuffer(N.FRAMEBUFFER,null),de=!1):void 0===wt.__webglFramebuffer?pt.setupRenderTarget(L):wt.__hasExternalTextures&&pt.rebindTextures(L,it.get(L.texture).__webglTexture,it.get(L.depthTexture).__webglTexture);const qt=L.texture;(qt.isData3DTexture||qt.isDataArrayTexture||qt.isCompressedArrayTexture)&&(st=!0);const on=it.get(L).__webglFramebuffer;L.isWebGLCubeRenderTarget?(te=Array.isArray(on[K])?on[K][le]:on[K],je=!0):te=L.samples>0&&!1===pt.useMultisampledRTT(L)?it.get(L).__webglMultisampledFramebuffer:Array.isArray(on)?on[le]:on,A.copy(L.viewport),$.copy(L.scissor),ie=L.scissorTest}else A.copy(Ne).multiplyScalar(re).floor(),$.copy(Ye).multiplyScalar(re).floor(),ie=It;if(Me.bindFramebuffer(N.FRAMEBUFFER,te)&&de&&Me.drawBuffers(L,te),Me.viewport(A),Me.scissor($),Me.setScissorTest(ie),je){const wt=it.get(L.texture);N.framebufferTexture2D(N.FRAMEBUFFER,N.COLOR_ATTACHMENT0,N.TEXTURE_CUBE_MAP_POSITIVE_X+K,wt.__webglTexture,le)}else if(st){const wt=it.get(L.texture);N.framebufferTextureLayer(N.FRAMEBUFFER,N.COLOR_ATTACHMENT0,wt.__webglTexture,le||0,K||0)}B=-1},this.readRenderTargetPixels=function(L,K,le,de,te,je,st){if(!L||!L.isWebGLRenderTarget)return void console.error("THREE.WebGLRenderer.readRenderTargetPixels: renderTarget is not THREE.WebGLRenderTarget.");let xt=it.get(L).__webglFramebuffer;if(L.isWebGLCubeRenderTarget&&void 0!==st&&(xt=xt[st]),xt){Me.bindFramebuffer(N.FRAMEBUFFER,xt);try{const wt=L.texture,qt=wt.format,on=wt.type;if(!nt.textureFormatReadable(qt))return void console.error("THREE.WebGLRenderer.readRenderTargetPixels: renderTarget is not in RGBA or implementation defined format.");if(!nt.textureTypeReadable(on))return void console.error("THREE.WebGLRenderer.readRenderTargetPixels: renderTarget is not in UnsignedByteType or implementation defined type.");K>=0&&K<=L.width-de&&le>=0&&le<=L.height-te&&N.readPixels(K,le,de,te,vn.convert(qt),vn.convert(on),je)}finally{const wt=null!==k?it.get(k).__webglFramebuffer:null;Me.bindFramebuffer(N.FRAMEBUFFER,wt)}}},this.readRenderTargetPixelsAsync=function(){var L=tt(function*(K,le,de,te,je,st,xt){if(!K||!K.isWebGLRenderTarget)throw new Error("THREE.WebGLRenderer.readRenderTargetPixels: renderTarget is not THREE.WebGLRenderTarget.");let wt=it.get(K).__webglFramebuffer;if(K.isWebGLCubeRenderTarget&&void 0!==xt&&(wt=wt[xt]),wt){Me.bindFramebuffer(N.FRAMEBUFFER,wt);try{const qt=K.texture,on=qt.format,Xt=qt.type;if(!nt.textureFormatReadable(on))throw new Error("THREE.WebGLRenderer.readRenderTargetPixelsAsync: renderTarget is not in RGBA or implementation defined format.");if(!nt.textureTypeReadable(Xt))throw new Error("THREE.WebGLRenderer.readRenderTargetPixelsAsync: renderTarget is not in UnsignedByteType or implementation defined type.");if(le>=0&&le<=K.width-te&&de>=0&&de<=K.height-je){const ai=N.createBuffer();N.bindBuffer(N.PIXEL_PACK_BUFFER,ai),N.bufferData(N.PIXEL_PACK_BUFFER,st.byteLength,N.STREAM_READ),N.readPixels(le,de,te,je,vn.convert(on),vn.convert(Xt),0),N.flush();const Li=N.fenceSync(N.SYNC_GPU_COMMANDS_COMPLETE,0);yield function eae(i,t,e){return new Promise(function(n,r){setTimeout(function s(){switch(i.clientWaitSync(t,i.SYNC_FLUSH_COMMANDS_BIT,0)){case i.WAIT_FAILED:r();break;case i.TIMEOUT_EXPIRED:setTimeout(s,e);break;default:n()}},e)})}(N,Li,4);try{N.bindBuffer(N.PIXEL_PACK_BUFFER,ai),N.getBufferSubData(N.PIXEL_PACK_BUFFER,0,st)}finally{N.deleteBuffer(ai),N.deleteSync(Li)}return st}}finally{const qt=null!==k?it.get(k).__webglFramebuffer:null;Me.bindFramebuffer(N.FRAMEBUFFER,qt)}}});return function(K,le,de,te,je,st,xt){return L.apply(this,arguments)}}(),this.copyFramebufferToTexture=function(L,K=null,le=0){!0!==L.isTexture&&(cg("WebGLRenderer: copyFramebufferToTexture function signature has changed."),K=arguments[0]||null,L=arguments[1]);const de=Math.pow(2,-le),te=Math.floor(L.image.width*de),je=Math.floor(L.image.height*de),st=null!==K?K.x:0,xt=null!==K?K.y:0;pt.setTexture2D(L,0),N.copyTexSubImage2D(N.TEXTURE_2D,le,0,0,st,xt,te,je),Me.unbindTexture()},this.copyTextureToTexture=function(L,K,le=null,de=null,te=0){let je,st,xt,wt,qt,on;!0!==L.isTexture&&(cg("WebGLRenderer: copyTextureToTexture function signature has changed."),de=arguments[0]||null,L=arguments[1],K=arguments[2],te=arguments[3]||0,le=null),null!==le?(je=le.max.x-le.min.x,st=le.max.y-le.min.y,xt=le.min.x,wt=le.min.y):(je=L.image.width,st=L.image.height,xt=0,wt=0),null!==de?(qt=de.x,on=de.y):(qt=0,on=0);const Xt=vn.convert(K.format),ai=vn.convert(K.type);pt.setTexture2D(K,0),N.pixelStorei(N.UNPACK_FLIP_Y_WEBGL,K.flipY),N.pixelStorei(N.UNPACK_PREMULTIPLY_ALPHA_WEBGL,K.premultiplyAlpha),N.pixelStorei(N.UNPACK_ALIGNMENT,K.unpackAlignment);const Li=N.getParameter(N.UNPACK_ROW_LENGTH),nr=N.getParameter(N.UNPACK_IMAGE_HEIGHT),oa=N.getParameter(N.UNPACK_SKIP_PIXELS),hi=N.getParameter(N.UNPACK_SKIP_ROWS),Rt=N.getParameter(N.UNPACK_SKIP_IMAGES),fs=L.isCompressedTexture?L.mipmaps[te]:L.image;N.pixelStorei(N.UNPACK_ROW_LENGTH,fs.width),N.pixelStorei(N.UNPACK_IMAGE_HEIGHT,fs.height),N.pixelStorei(N.UNPACK_SKIP_PIXELS,xt),N.pixelStorei(N.UNPACK_SKIP_ROWS,wt),L.isDataTexture?N.texSubImage2D(N.TEXTURE_2D,te,qt,on,je,st,Xt,ai,fs.data):L.isCompressedTexture?N.compressedTexSubImage2D(N.TEXTURE_2D,te,qt,on,fs.width,fs.height,Xt,fs.data):N.texSubImage2D(N.TEXTURE_2D,te,qt,on,je,st,Xt,ai,fs),N.pixelStorei(N.UNPACK_ROW_LENGTH,Li),N.pixelStorei(N.UNPACK_IMAGE_HEIGHT,nr),N.pixelStorei(N.UNPACK_SKIP_PIXELS,oa),N.pixelStorei(N.UNPACK_SKIP_ROWS,hi),N.pixelStorei(N.UNPACK_SKIP_IMAGES,Rt),0===te&&K.generateMipmaps&&N.generateMipmap(N.TEXTURE_2D),Me.unbindTexture()},this.copyTextureToTexture3D=function(L,K,le=null,de=null,te=0){let je,st,xt,wt,qt,on,Xt,ai,Li;!0!==L.isTexture&&(cg("WebGLRenderer: copyTextureToTexture3D function signature has changed."),le=arguments[0]||null,de=arguments[1]||null,L=arguments[2],K=arguments[3],te=arguments[4]||0);const nr=L.isCompressedTexture?L.mipmaps[te]:L.image;null!==le?(je=le.max.x-le.min.x,st=le.max.y-le.min.y,xt=le.max.z-le.min.z,wt=le.min.x,qt=le.min.y,on=le.min.z):(je=nr.width,st=nr.height,xt=nr.depth,wt=0,qt=0,on=0),null!==de?(Xt=de.x,ai=de.y,Li=de.z):(Xt=0,ai=0,Li=0);const oa=vn.convert(K.format),hi=vn.convert(K.type);let Rt;if(K.isData3DTexture)pt.setTexture3D(K,0),Rt=N.TEXTURE_3D;else{if(!K.isDataArrayTexture&&!K.isCompressedArrayTexture)return void console.warn("THREE.WebGLRenderer.copyTextureToTexture3D: only supports THREE.DataTexture3D and THREE.DataTexture2DArray.");pt.setTexture2DArray(K,0),Rt=N.TEXTURE_2D_ARRAY}N.pixelStorei(N.UNPACK_FLIP_Y_WEBGL,K.flipY),N.pixelStorei(N.UNPACK_PREMULTIPLY_ALPHA_WEBGL,K.premultiplyAlpha),N.pixelStorei(N.UNPACK_ALIGNMENT,K.unpackAlignment);const fs=N.getParameter(N.UNPACK_ROW_LENGTH),fi=N.getParameter(N.UNPACK_IMAGE_HEIGHT),El=N.getParameter(N.UNPACK_SKIP_PIXELS),qg=N.getParameter(N.UNPACK_SKIP_ROWS),aa=N.getParameter(N.UNPACK_SKIP_IMAGES);N.pixelStorei(N.UNPACK_ROW_LENGTH,nr.width),N.pixelStorei(N.UNPACK_IMAGE_HEIGHT,nr.height),N.pixelStorei(N.UNPACK_SKIP_PIXELS,wt),N.pixelStorei(N.UNPACK_SKIP_ROWS,qt),N.pixelStorei(N.UNPACK_SKIP_IMAGES,on),L.isDataTexture||L.isData3DTexture?N.texSubImage3D(Rt,te,Xt,ai,Li,je,st,xt,oa,hi,nr.data):K.isCompressedArrayTexture?N.compressedTexSubImage3D(Rt,te,Xt,ai,Li,je,st,xt,oa,nr.data):N.texSubImage3D(Rt,te,Xt,ai,Li,je,st,xt,oa,hi,nr),N.pixelStorei(N.UNPACK_ROW_LENGTH,fs),N.pixelStorei(N.UNPACK_IMAGE_HEIGHT,fi),N.pixelStorei(N.UNPACK_SKIP_PIXELS,El),N.pixelStorei(N.UNPACK_SKIP_ROWS,qg),N.pixelStorei(N.UNPACK_SKIP_IMAGES,aa),0===te&&K.generateMipmaps&&N.generateMipmap(Rt),Me.unbindTexture()},this.initRenderTarget=function(L){void 0===it.get(L).__webglFramebuffer&&pt.setupRenderTarget(L)},this.initTexture=function(L){L.isCubeTexture?pt.setTextureCube(L,0):L.isData3DTexture?pt.setTexture3D(L,0):L.isDataArrayTexture||L.isCompressedArrayTexture?pt.setTexture2DArray(L,0):pt.setTexture2D(L,0),Me.unbindTexture()},this.resetState=function(){F=0,D=0,k=null,Me.reset(),Pn.reset()},typeof __THREE_DEVTOOLS__<"u"&&__THREE_DEVTOOLS__.dispatchEvent(new CustomEvent("observe",{detail:this}))}get coordinateSystem(){return ed}get outputColorSpace(){return this._outputColorSpace}set outputColorSpace(t){this._outputColorSpace=t;const e=this.getContext();e.drawingBufferColorSpace=t===jk?"display-p3":"srgb",e.unpackColorSpace=Jn.workingColorSpace===LC?"display-p3":"srgb"}}class kb extends Or{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 id,this.environmentIntensity=1,this.environmentRotation=new id,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 AP{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=Jo()}onUploadCallback(){}set needsUpdate(t){!0===t&&this.version++}get updateRange(){return cg("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;r0){const r=e[n[0]];if(void 0!==r){this.morphTargetInfluences=[],this.morphTargetDictionary={};for(let s=0,o=r.length;sn)return;FP.applyMatrix4(i.matrixWorld);const l=t.ray.origin.distanceTo(FP);return lt.far?void 0:{distance:l,point:Z5.clone().applyMatrix4(i.matrixWorld),index:r,face:null,faceIndex:null,object:i}}const Q5=new O,J5=new O;class Ng extends pf{constructor(t,e){super(t,e),this.isLineSegments=!0,this.type="LineSegments"}computeLineDistances(){const t=this.geometry;if(null===t.index){const e=t.attributes.position,n=[];for(let r=0,s=e.count;r0){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 dc{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 d=n[r];return(r+(o-d)/(n[r+1]-d))/(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 xe:new O);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 O,r=[],s=[],o=[],a=new O,l=new Nt;for(let m=0;m<=t;m++)r[m]=this.getTangentAt(m/t,new O);s[0]=new O,o[0]=new O;let c=Number.MAX_VALUE;const d=Math.abs(r[0].x),h=Math.abs(r[0].y),p=Math.abs(r[0].z);d<=c&&(c=d,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(er(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(er(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 NP extends dc{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 xe){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(iG(a,l.x,c.x,d.x,h.x),iG(a,l.y,c.y,d.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]:(DS.subVectors(r[0],r[1]).add(r[0]),c=DS);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 d=c.getPoint(1);return this.currentPoint.copy(d),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 RS extends hn{constructor(t=[new xe(0,-.5),new xe(.5,0),new xe(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=er(r,0,2*Math.PI);const s=[],o=[],a=[],l=[],c=[],d=1/e,h=new O,p=new xe,m=new O,g=new O,b=new O;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*d*r,C=Math.sin(x),F=Math.cos(x);for(let D=0;D<=t.length-1;D++)h.x=t[D].x*C,h.y=t[D].y,h.z=t[D].x*F,o.push(h.x,h.y,h.z),p.x=M/e,p.y=D/(t.length-1),a.push(p.x,p.y),c.push(l[3*D+0]*C,l[3*D+1],l[3*D+0]*F)}for(let M=0;M0&&x(!0),e>0&&x(!1)),this.setIndex(d),this.setAttribute("position",new ct(h,3)),this.setAttribute("normal",new ct(p,3)),this.setAttribute("uv",new ct(m,2))}copy(t){return super.copy(t),this.parameters=Object.assign({},t.parameters),this}static fromJSON(t){return new Bg(t.radiusTop,t.radiusBottom,t.height,t.radialSegments,t.heightSegments,t.openEnded,t.thetaStart,t.thetaLength)}}class PS extends Bg{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 PS(t.radius,t.height,t.radialSegments,t.heightSegments,t.openEnded,t.thetaStart,t.thetaLength)}}class jb 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 d=[],h=new O,p=new O,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 F=0;F<=e;F++){const D=F/e;h.x=-t*Math.cos(r+D*s)*Math.sin(o+x*a),h.y=t*Math.cos(o+x*a),h.z=t*Math.sin(r+D*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(D+C,1-x),M.push(c++)}d.push(M)}for(let y=0;y0)&&m.push(d[y][M+1],C,D),(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 dispersion(){return this._dispersion}set dispersion(t){this._dispersion>0!=t>0&&this.version++,this._dispersion=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.dispersion=t.dispersion,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 zS extends Po{constructor(t){super(),this.isMeshPhongMaterial=!0,this.type="MeshPhongMaterial",this.color=new qe(16777215),this.specular=new qe(1118481),this.shininess=30,this.map=null,this.lightMap=null,this.lightMapIntensity=1,this.aoMap=null,this.aoMapIntensity=1,this.emissive=new qe(0),this.emissiveIntensity=1,this.emissiveMap=null,this.bumpMap=null,this.bumpScale=1,this.normalMap=null,this.normalMapType=Qh,this.normalScale=new xe(1,1),this.displacementMap=null,this.displacementScale=1,this.displacementBias=0,this.specularMap=null,this.alphaMap=null,this.envMap=null,this.envMapRotation=new id,this.combine=EC,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 vf(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 vG(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 tO(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 nO(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 qb{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 _G(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}}uc.prototype.TimeBufferType=Float32Array,uc.prototype.ValueBufferType=Float32Array,uc.prototype.DefaultInterpolation=bb;class zg extends uc{constructor(t,e,n){super(t,e,n)}}zg.prototype.ValueTypeName="bool",zg.prototype.ValueBufferType=Array,zg.prototype.DefaultInterpolation=yb,zg.prototype.InterpolantFactoryMethodLinear=void 0,zg.prototype.InterpolantFactoryMethodSmooth=void 0;class bG extends uc{}bG.prototype.ValueTypeName="color";class Hg extends uc{}Hg.prototype.ValueTypeName="number";class Fhe extends qb{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 d=c+a;c!==d;c+=4)co.slerpFlat(s,0,o,c-a,o,c,l);return s}}class Gg extends uc{InterpolantFactoryMethodLinear(t){return new Fhe(this.times,this.values,this.getValueSize(),t)}}Gg.prototype.ValueTypeName="quaternion",Gg.prototype.InterpolantFactoryMethodSmooth=void 0;class $g extends uc{constructor(t,e,n){super(t,e,n)}}$g.prototype.ValueTypeName="string",$g.prototype.ValueBufferType=Array,$g.prototype.DefaultInterpolation=yb,$g.prototype.InterpolantFactoryMethodLinear=void 0,$g.prototype.InterpolantFactoryMethodSmooth=void 0;class Wg extends uc{}Wg.prototype.ValueTypeName="vector";class Xb{constructor(t="",e=-1,n=[],r=2500){this.name=t,this.tracks=n,this.duration=e,this.blendMode=r,this.uuid=Jo(),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(Nhe(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(uc.toJSON(n[s]));return r}static CreateFromMorphTargetSequence(t,e,n,r){const s=e.length,o=[];for(let a=0;a1){const h=d[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=[];nO(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:wG,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 dd={};class Bhe extends Error{constructor(t,e){super(t),this.response=e}}class La extends yf{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=ku.get(t);if(void 0!==s)return this.manager.itemStart(t),setTimeout(()=>{e&&e(s),this.manager.itemEnd(t)},0),s;if(void 0!==dd[t])return void dd[t].push({onLoad:e,onProgress:n,onError:r});dd[t]=[],dd[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 d=dd[t],h=c.body.getReader(),p=c.headers.get("X-File-Size")||c.headers.get("Content-Length"),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 F=new ProgressEvent("progress",{lengthComputable:g,loaded:b,total:m});for(let D=0,k=d.length;D{y.error(x)})}()}});return new Response(v)}throw new Bhe(`fetch for "${c.url}" responded with ${c.status}: ${c.statusText}`,c)}).then(c=>{switch(l){case"arraybuffer":return c.arrayBuffer();case"blob":return c.blob();case"document":return c.text().then(d=>(new DOMParser).parseFromString(d,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=>{ku.add(t,c);const d=dd[t];delete dd[t];for(let h=0,p=d.length;h{const d=dd[t];if(void 0===d)throw this.manager.itemError(t),c;delete dd[t];for(let h=0,p=d.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 HS extends yf{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=ku.get(t);if(void 0!==o)return s.manager.itemStart(t),setTimeout(function(){e&&e(o),s.manager.itemEnd(t)},0),o;const a=wb("img");function l(){d(),ku.add(t,this),e&&e(this),s.manager.itemEnd(t)}function c(h){d(),r&&r(h),s.manager.itemError(t),s.manager.itemEnd(t)}function d(){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 Pu extends yf{constructor(t){super(t)}load(t,e,n,r){const s=new ko,o=new HS(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 GS extends Or{constructor(t,e=1){super(),this.isLight=!0,this.type="Light",this.color=new qe(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()),void 0!==this.target&&(e.object.target=this.target.uuid),e}}const iO=new Nt,MG=new O,CG=new O;class rO{constructor(t){this.camera=t,this.intensity=1,this.bias=0,this.normalBias=0,this.radius=1,this.blurSamples=8,this.mapSize=new xe(512,512),this.map=null,this.mapPass=null,this.matrix=new Nt,this.autoUpdate=!0,this.needsUpdate=!1,this._frustum=new aS,this._frameExtents=new xe(1,1),this._viewportCount=1,this._viewports=[new gi(0,0,1,1)]}getViewportCount(){return this._viewportCount}getFrustum(){return this._frustum}updateMatrices(t){const e=this.camera,n=this.matrix;MG.setFromMatrixPosition(t.matrixWorld),e.position.copy(MG),CG.setFromMatrixPosition(t.target.matrixWorld),e.lookAt(CG),e.updateMatrixWorld(),iO.multiplyMatrices(e.projectionMatrix,e.matrixWorldInverse),this._frustum.setFromProjectionMatrix(iO),n.set(.5,0,0,.5,0,.5,0,.5,0,0,.5,.5,0,0,0,1),n.multiply(iO)}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.intensity=t.intensity,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 1!==this.intensity&&(t.intensity=this.intensity),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 Vhe extends rO{constructor(){super(new yr(50,1,.5,500)),this.isSpotLightShadow=!0,this.focus=1}updateMatrices(t){const e=this.camera,n=2*ag*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 SG extends GS{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(Or.DEFAULT_UP),this.updateMatrix(),this.target=new Or,this.distance=n,this.angle=r,this.penumbra=s,this.decay=o,this.map=null,this.shadow=new Vhe}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 EG=new Nt,Kb=new O,sO=new O;class zhe extends rO{constructor(){super(new yr(90,1,.5,500)),this.isPointLightShadow=!0,this._frameExtents=new xe(4,2),this._viewportCount=6,this._viewports=[new gi(2,1,1,1),new gi(0,1,1,1),new gi(3,1,1,1),new gi(1,1,1,1),new gi(3,0,1,1),new gi(1,0,1,1)],this._cubeDirections=[new O(1,0,0),new O(-1,0,0),new O(0,0,1),new O(0,0,-1),new O(0,1,0),new O(0,-1,0)],this._cubeUps=[new O(0,1,0),new O(0,1,0),new O(0,1,0),new O(0,1,0),new O(0,0,1),new O(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()),Kb.setFromMatrixPosition(t.matrixWorld),n.position.copy(Kb),sO.copy(n.position),sO.add(this._cubeDirections[e]),n.up.copy(this._cubeUps[e]),n.lookAt(sO),n.updateMatrixWorld(),r.makeTranslation(-Kb.x,-Kb.y,-Kb.z),EG.multiplyMatrices(n.projectionMatrix,n.matrixWorldInverse),this._frustum.setFromProjectionMatrix(EG)}}class AG extends GS{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 zhe}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 Hhe extends rO{constructor(){super(new Ib(-5,5,5,-5,.5,500)),this.isDirectionalLightShadow=!0}}class DG extends GS{constructor(t,e){super(t,e),this.isDirectionalLight=!0,this.type="DirectionalLight",this.position.copy(Or.DEFAULT_UP),this.updateMatrix(),this.target=new Or,this.shadow=new Hhe}dispose(){this.shadow.dispose()}copy(t){return super.copy(t),this.target=t.target.clone(),this.shadow=t.shadow.clone(),this}}class $S extends GS{constructor(t,e){super(t,e),this.isAmbientLight=!0,this.type="AmbientLight"}}class Ou{static decodeText(t){if(console.warn("THREE.LoaderUtils: decodeText() has been deprecated with r165 and will be removed with r175. Use TextDecoder instead."),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=ku.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 ku.add(t,c),e&&e(c),s.manager.itemEnd(t),c}).catch(function(c){r&&r(c),ku.remove(t),s.manager.itemError(t),s.manager.itemEnd(t)});ku.add(t,l),s.manager.itemStart(t)}}class OG{constructor(t=!0){this.autoStart=t,this.startTime=0,this.oldTime=0,this.elapsedTime=0,this.running=!1}start(){this.startTime=FG(),this.oldTime=this.startTime,this.elapsedTime=0,this.running=!0}stop(){this.getElapsedTime(),this.running=!1,this.autoStart=!1}getElapsedTime(){return this.getDelta(),this.elapsedTime}getDelta(){let t=0;if(this.autoStart&&!this.running)return this.start(),0;if(this.running){const e=FG();t=(e-this.oldTime)/1e3,this.oldTime=e,this.elapsedTime+=t}return t}}function FG(){return(typeof performance>"u"?Date:performance).now()}const aO="\\[\\]\\.:\\/",Jhe=new RegExp("["+aO+"]","g"),lO="[^"+aO+"]",efe="[^"+aO.replace("\\.","")+"]",sfe=new RegExp("^"+/((?:WC+[\/:])*)/.source.replace("WC",lO)+/(WCOD+)?/.source.replace("WCOD",efe)+/(?:\.(WC+)(?:\[(.+)\])?)?/.source.replace("WC",lO)+/\.(WC+)(?:\[(.+)\])?/.source.replace("WC",lO)+"$"),ofe=["material","materials","bones","map"];class afe{constructor(t,e,n){const r=n||Ri.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 Ri=(()=>{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(Jhe,"")}static parseTrackName(e){const n=sfe.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!==ofe.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;an.name===t||n.userData.name===t);return e?(e.removeFromParent(),new na(e)):null}getBoundings(){return(new Bs).setFromObject(this.nativeMesh)}clone(){return new na(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 Mn&&this.disposeMesh(t)}),this.nativeMesh instanceof Mn&&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 hfe extends na{get supportsFov(){return this.nativeCamera instanceof yr||"PerspectiveCamera"==this.nativeCamera.type}get fov(){return this.nativeCamera.fov||NaN}set fov(t){this.supportsFov&&(this.nativeCamera.fov=t,this.nativeCamera.updateProjectionMatrix())}constructor(t){super(t),this.nativeCamera=t}}class ffe extends Ose{createMaterial(t){let e={};t.color?e={color:t.color}:t.diffuse||(e={color:super.randomColor()});let n=t.shading||"unlit";switch(n){case"unlit":return new qi(Object.assign(Object.assign({},e),{map:t.diffuse||null}));case"standart":return new Yb(Object.assign(Object.assign({},e),{map:t.diffuse||null}));case"phong":return new zS(Object.assign(Object.assign({},e),{map:t.diffuse||null}));case"wireframe":return new qi(Object.assign(Object.assign({},e),{wireframe:!0}));default:throw new Error(`"${n}" shading not implemented for three.js`)}}transformPrimitiveZUp(t){t.geometry.rotateX(Math.PI/2)}createPrimitive(t,e={}){var n,r,s,o;let a=null,l=this.createMaterial(e);switch(t.shape){case"PLANE":a=new Mn(new Iu((null===(n=t.dimensions)||void 0===n?void 0:n.x)||1e4,(null===(r=t.dimensions)||void 0===r?void 0:r.y)||1e4,null===(s=t.segments)||void 0===s?void 0:s.x,null===(o=t.segments)||void 0===o?void 0:o.y),l);break;case"BOX":a=new Mn(new rf(...Pe.spr(t.dimensions),...t.segments?Pe.spr(t.segments):[]),l);break;case"CAPSULE":a=new Mn(new kS(t.radius,t.centersDistance,t.capSegments,t.radialSegments),l),this.transformPrimitiveZUp(a);break;case"CYLINDER":a=new Mn(new Bg(t.radius,t.radius,t.height,t.radialSegments,t.heightSegments),l),this.transformPrimitiveZUp(a);break;case"CONE":a=new Mn(new PS(t.radius,t.height,t.radialSegments,t.heightSegments),l),this.transformPrimitiveZUp(a);break;case"SPHERE":a=new Mn(new jb(t.radius,t.widthSegments,t.heightSegments),l),this.transformPrimitiveZUp(a);break;case"COMPOUND":a=new Fo;for(const{position:d,rotation:h,shape:p}of t.children){const m=this.createPrimitive(p,e).nativeMesh;d&&m.position.set(...Pe.spr(d)),h&&m.quaternion.set(...Yi.spr(h)),a.add(m)}break;case"MESH":const c=new hn;c.setFromPoints(t.vertices.map(d=>new O(...Pe.spr(d)))),c.setIndex(t.faces.reduce((d,h)=>(d.push(...h),d),[])),a=new Mn(c,l)}if(!a)throw new Error(`Primitive with shape "${t.shape}" not implemented`);return void 0!==e.castShadow&&(a.castShadow=e.castShadow),void 0!==e.receiveShadow&&(a.receiveShadow=e.receiveShadow),new na(a)}createPerspectiveCamera(t={}){return new hfe(new yr(t.fov||75,t.aspectRatio||1,t.frustrum?t.frustrum.near:1,t.frustrum?t.frustrum.far:1e4))}}function QG(i,t){if(t===Coe)return console.warn("THREE.BufferGeometryUtils.toTrianglesDrawMode(): Geometry already defined as triangles."),i;if(t===Wk||t===C4){let e=i.getIndex();if(null===e){const o=[],a=i.getAttribute("position");if(void 0===a)return console.error("THREE.BufferGeometryUtils.toTrianglesDrawMode(): Undefined position attribute. Processing not possible."),i;for(let l=0;l=2.0 are supported.")));const c=new Yfe(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 d=0;d=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 mfe(){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 Bn={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_DISPERSION:"KHR_materials_dispersion",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 gfe{constructor(t){this.parser=t,this.name=Bn.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 Ife{constructor(t){this.parser=t,this.name=Bn.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 Rfe{constructor(t){this.parser=t,this.name=Bn.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 kfe{constructor(t){this.name=Bn.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 d=r.count,h=r.byteStride,p=new Uint8Array(a,r.byteOffset||0,r.byteLength||0);return o.decodeGltfBufferAsync?o.decodeGltfBufferAsync(d,h,p,r.mode,r.filter).then(function(m){return m.buffer}):o.ready.then(function(){const m=new ArrayBuffer(d*h);return o.decodeGltfBuffer(new Uint8Array(m),d,h,p,r.mode,r.filter),m})})}return null}}class Pfe{constructor(t){this.name=Bn.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!==Na.TRIANGLES&&c.mode!==Na.TRIANGLE_STRIP&&c.mode!==Na.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(d=>(l[c]=d,l[c])));return a.length<1?null:(a.push(this.parser.createNodeMesh(t)),Promise.all(a).then(c=>{const d=c.pop(),h=d.isGroup?d.children:[d],p=c[0].count,m=[];for(const g of h){const b=new Nt,v=new O,y=new co,M=new O(1,1,1),x=new Y5(g.geometry,g.material,p);for(let C=0;C-1,o=s?a.match(/Firefox\/([0-9]+)\./)[1]:-1}this.textureLoader=typeof createImageBitmap>"u"||n&&r<17||s&&o<98?new Pu(this.options.manager):new Xhe(this.options.manager),this.textureLoader.setCrossOrigin(this.options.crossOrigin),this.textureLoader.setRequestHeader(this.options.requestHeader),this.fileLoader=new La(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 Sf(s,a,r),ud(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,d]of o.children.entries())s(d,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(T,D[k*l+1]),l>=3&&v.setZ(T,D[k*l+2]),l>=4&&v.setW(T,D[k*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(d){d.flipY=!1,d.name=o.name||a.name||"",""===d.name&&"string"==typeof a.uri&&!1===a.uri.startsWith("data:image/")&&(d.name=a.uri);const p=(s.samplers||{})[o.sampler]||{};return d.magFilter=n$[p.magFilter]||lr,d.minFilter=n$[p.minFilter]||bl,d.wrapS=i$[p.wrapS]||Pa,d.wrapT=i$[p.wrapT]||Pa,r.associations.set(d,{textures:t}),d}).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 d=Promise.resolve(l).then(function(h){return new Promise(function(p,m){let g=p;!0===e.isImageBitmapLoader&&(g=function(b){const v=new ko(b);v.needsUpdate=!0,p(v)}),e.load(Ou.resolveURL(h,s.path),g,void 0,m)})}).then(function(h){return!0===c&&a.revokeObjectURL(l),ud(h,o),h.userData.mimeType=o.mimeType||function Wfe(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]=d,d}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[Bn.KHR_TEXTURE_TRANSFORM]){const a=void 0!==n.extensions?n.extensions[Bn.KHR_TEXTURE_TRANSFORM]:void 0;if(a){const l=s.associations.get(o);o=s.extensions[Bn.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 mf,Po.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 us,Po.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 Yb}loadMaterial(t){const e=this,r=this.extensions,s=this.json.materials[t];let o;const a={},c=[];if((s.extensions||{})[Bn.KHR_MATERIALS_UNLIT]){const h=r[Bn.KHR_MATERIALS_UNLIT];o=h.getMaterialType(),c.push(h.extendParams(a,s,e))}else{const h=s.pbrMetallicRoughness||{};if(a.color=new qe(1,1,1),a.opacity=1,Array.isArray(h.baseColorFactor)){const p=h.baseColorFactor;a.color.setRGB(p[0],p[1],p[2],ds),a.opacity=p[3]}void 0!==h.baseColorTexture&&c.push(e.assignTexture(a,"map",h.baseColorTexture,cs)),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=Ls);const d=s.alphaMode||"OPAQUE";if("BLEND"===d?(a.transparent=!0,a.depthWrite=!1):(a.transparent=!1,"MASK"===d&&(a.alphaTest=void 0!==s.alphaCutoff?s.alphaCutoff:.5)),void 0!==s.normalTexture&&o!==qi&&(c.push(e.assignTexture(a,"normalMap",s.normalTexture)),a.normalScale=new xe(1,1),void 0!==s.normalTexture.scale)){const h=s.normalTexture.scale;a.normalScale.set(h,h)}if(void 0!==s.occlusionTexture&&o!==qi&&(c.push(e.assignTexture(a,"aoMap",s.occlusionTexture)),void 0!==s.occlusionTexture.strength&&(a.aoMapIntensity=s.occlusionTexture.strength)),void 0!==s.emissiveFactor&&o!==qi){const h=s.emissiveFactor;a.emissive=(new qe).setRGB(h[0],h[1],h[2],ds)}return void 0!==s.emissiveTexture&&o!==qi&&c.push(e.assignTexture(a,"emissiveMap",s.emissiveTexture,cs)),Promise.all(c).then(function(){const h=new o(a);return s.name&&(h.name=s.name),ud(h,s),e.associations.set(h,{materials:t}),s.extensions&&Sf(r,h,s),h})}createUniqueName(t){const e=Ri.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[Bn.KHR_DRACO_MESH_COMPRESSION].decodePrimitive(a,e).then(function(l){return r$(l,a,e)})}const o=[];for(let a=0,l=t.length;a0&&Gfe(y,s),y.name=e.createUniqueName(s.name||"mesh_"+t),ud(y,s),v.extensions&&Sf(r,y,v),e.assignFinalMaterial(y),h.push(y)}for(let m=0,g=h.length;m1?new Fo:1===c.length?c[0]:new Or,d!==c[0])for(let h=0,p=c.length;h{const h=new Map;for(const[p,m]of r.associations)(p instanceof Po||p instanceof ko)&&h.set(p,m);return d.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(Lu[s.path]===Lu.weights?t.traverse(function(p){p.morphTargetInfluences&&l.push(p.name?p.name:p.uuid)}):l.push(a),Lu[s.path]){case Lu.weights:c=Hg;break;case Lu.rotation:c=Gg;break;case Lu.position:case Lu.scale:c=Wg;break;default:c=1===n.itemSize?Hg:Wg}const d=void 0!==r.interpolation?Vfe[r.interpolation]:bb,h=this._getArrayFromAccessor(n);for(let p=0,m=l.length;p{r.type.endsWith("Light")&&(console.warn("WORKAROUND: light intensity from GLB divided by 200."),r.intensity*=.005)}),new na(n.scene)})}}const fo=(i,t)=>Array(i).fill(null).map((e,n)=>t(n));class Ef{static startDebugView(t,e){let n=this.activeDebugViews.get(t);return n?n.renderers.includes(e)||n.renderers.push(e):(n={view:new Ef(t),renderers:[e]},this.activeDebugViews.set(t,n)),n.view}static stopDebugView(t,e){const n=t.world,r=this.activeDebugViews.get(n);r&&(r.renderers=r.renderers.filter(s=>s!==e),0===r.renderers.length&&(r.view.dispose(),this.activeDebugViews.delete(n)))}constructor(t){this.world=t,this.debugScene=null,this.aSub=null,this.rSub=null,this.syncMap=new Map,this.debugScene=new kb;const e=n=>{var r,s;const o=n.debugBodySettings;let c,l=this.lineSegmentPointsForShape(o.shape);c=l?new Ng((new hn).setFromPoints(l)):null===(r=this.world)||void 0===r?void 0:r.visualScene.factory.createPrimitive(o.shape,{shading:"wireframe",color:0}).nativeMesh,this.syncMap.set(n,c),null===(s=this.debugScene)||void 0===s||s.add(c)};for(const n of this.world.physicsWorld.children)e(n);this.aSub=this.world.physicsWorld.added$.subscribe(n=>e(n)),this.rSub=this.world.physicsWorld.removed$.subscribe(n=>{var r;const s=this.syncMap.get(n);s&&(this.syncMap.delete(n),null===(r=this.debugScene)||void 0===r||r.remove(s))})}get scene(){return this.debugScene}render(t,e){for(const[r,s]of this.syncMap.entries()){const o=r.debugBodySettings;if(o.ignoreTransform||(s.position.set(...Pe.spr(r.position)),s.quaternion.set(...Yi.spr(r.rotation))),s.material){let a=16777215;switch(o.type){case"RIGID_DYNAMIC":a=o.sleeping?255:16711680;break;case"RIGID_STATIC":a=65280;break;case"TRIGGER":a=16776960}s.material.color.set(a),s.material.needsUpdate=!0}}const n=t.autoClearColor;n&&(t.autoClearColor=!1),t.render(this.debugScene,e),n&&(t.autoClearColor=!0)}lineSegmentPointsForShape(t){if("BOX"===t.shape){const e=Pe.scalarMult(t.dimensions,.5);return[...fo(8,n=>new O(n<4?e.x:-e.x,n%4<2?e.y:-e.y,n%2?e.z:-e.z)),...fo(8,n=>new O(n%2?e.x:-e.x,n<4?e.y:-e.y,n%4<2?e.z:-e.z)),...fo(8,n=>new O(n%4<2?e.x:-e.x,n%2?e.y:-e.y,n<4?e.z:-e.z))]}if("CYLINDER"===t.shape)return[...fo(32,e=>new O(t.radius*Math.sin(Math.floor((e+1)/2)*Math.PI/8),t.radius*Math.cos(Math.floor((e+1)/2)*Math.PI/8),-t.height/2)),...fo(32,e=>new O(t.radius*Math.sin(Math.floor((e+1)/2)*Math.PI/8),t.radius*Math.cos(Math.floor((e+1)/2)*Math.PI/8),t.height/2)),...fo(8,e=>new O(Math.floor(e/2)%2?0:e<4?t.radius:-t.radius,Math.floor(e/2)%2?e<4?t.radius:-t.radius:0,e%2?t.height/2:-t.height/2)),new O(0,0,-t.height/2),new O(0,0,t.height/2)];if("CONE"===t.shape)return[...fo(32,e=>new O(t.radius*Math.sin(Math.floor((e+1)/2)*Math.PI/8),t.radius*Math.cos(Math.floor((e+1)/2)*Math.PI/8),-t.height/2)),...fo(8,e=>new O(e%2||Math.floor(e/2)%2?0:e<4?t.radius:-t.radius,e%2?0:Math.floor(e/2)%2?e<4?t.radius:-t.radius:0,e%2?t.height/2:-t.height/2)),new O(0,0,-t.height/2),new O(0,0,t.height/2)];if("SPHERE"===t.shape)return[...fo(32,e=>new O(t.radius*Math.sin(Math.floor((e+1)/2)*Math.PI/8),t.radius*Math.cos(Math.floor((e+1)/2)*Math.PI/8),0)),...fo(32,e=>new O(t.radius*Math.sin(Math.floor((e+1)/2)*Math.PI/8),0,t.radius*Math.cos(Math.floor((e+1)/2)*Math.PI/8))),...fo(32,e=>new O(0,t.radius*Math.sin(Math.floor((e+1)/2)*Math.PI/8),t.radius*Math.cos(Math.floor((e+1)/2)*Math.PI/8)))];if("CAPSULE"===t.shape)return[...this.lineSegmentPointsForShape({shape:"CYLINDER",radius:t.radius,height:t.centersDistance}),...fo(16,e=>new O(t.radius*Math.cos(Math.floor((e+1)/2)*Math.PI/8),0,t.radius*Math.sin(Math.floor((e+1)/2)*Math.PI/8)+t.centersDistance/2)),...fo(16,e=>new O(t.radius*Math.cos(Math.floor((e+1)/2)*Math.PI/8),0,-t.radius*Math.sin(Math.floor((e+1)/2)*Math.PI/8)-t.centersDistance/2)),...fo(16,e=>new O(0,t.radius*Math.cos(Math.floor((e+1)/2)*Math.PI/8),t.radius*Math.sin(Math.floor((e+1)/2)*Math.PI/8)+t.centersDistance/2)),...fo(16,e=>new O(0,t.radius*Math.cos(Math.floor((e+1)/2)*Math.PI/8),-t.radius*Math.sin(Math.floor((e+1)/2)*Math.PI/8)-t.centersDistance/2))];if("CONVEX_HULL"===t.shape)return[...t.vertices.map(n=>[new O(n.x-.05,n.y,n.z),new O(n.x+.05,n.y,n.z),new O(n.x,n.y-.05,n.z),new O(n.x,n.y+.05,n.z),new O(n.x,n.y,n.z-.05),new O(n.x,n.y,n.z+.05)]).reduce((n,r)=>(n.push(...r),n),[])];if("COMPOUND"===t.shape){const e=[];for(const{position:n,shape:r,rotation:s}of t.children){let o=this.lineSegmentPointsForShape(r);if(!o)return null;e.push(...o.map(a=>new O(...Pe.spr(Pe.add(n||Pe.O,Pe.rot(a,s||Yi.O))))))}return e}return null}dispose(){var t,e;this.debugScene=null,null===(t=this.aSub)||void 0===t||t.unsubscribe(),null===(e=this.rSub)||void 0===e||e.unsubscribe(),this.syncMap=new Map}}Ef.activeDebugViews=new Map;class s$ extends Ese{get physicsDebugViewActive(){return this._physicsDebugViewActive}set physicsDebugViewActive(t){this._physicsDebugViewActive!=t&&(this._physicsDebugViewActive=t,this.world&&(t?this.debugView=Ef.startDebugView(this.world,this):(Ef.stopDebugView(this.debugView,this),this.debugView=null)))}constructor(t,e,n,r={}){super(t,n,r),this.scene=t,this.camera=e,this.canvas=n,this.world=null,this.debugView=null,this._physicsDebugViewActive=!1,this.nativeRenderer=new Tue(Object.assign({canvas:n,alpha:this.rendererOptions.transparent},this.rendererOptions)),this.nativeRenderer.shadowMap.enabled=!0,this.nativeRenderer.setClearColor(this.rendererOptions.background),this.nativeRenderer.shadowMap.type=c4,this.nativeRenderer.setPixelRatio(this.rendererOptions.forceResolution||devicePixelRatio)}addToWorld(t){this.world=t,this.physicsDebugViewActive&&(this.debugView=Ef.startDebugView(this.world,this))}removeFromWorld(t){this.physicsDebugViewActive&&(Ef.stopDebugView(this.debugView,this),this.debugView=null),this.world=null}resizeRenderer(t){this.nativeRenderer.setSize(t.x,t.y),(this.camera.nativeCamera instanceof yr||"PerspectiveCamera"==this.camera.nativeCamera.type)&&Math.abs(this.camera.nativeCamera.aspect-t.x/t.y)>.01&&(this.camera.nativeCamera.aspect=t.x/t.y,this.camera.nativeCamera.updateProjectionMatrix())}render(){this.nativeRenderer.render(this.scene.nativeScene,this.camera.nativeCamera),this.physicsDebugViewActive&&this.debugView.render(this.nativeRenderer,this.camera.nativeCamera)}dispose(){this.camera.dispose(),this.nativeRenderer.clear(),this.nativeRenderer.dispose(),this.nativeRenderer.domElement=null}}const Zfe={name:"CopyShader",uniforms:{tDiffuse:{value:null},opacity:{value:1}},vertexShader:"\n\n\t\tvarying vec2 vUv;\n\n\t\tvoid main() {\n\n\t\t\tvUv = uv;\n\t\t\tgl_Position = projectionMatrix * modelViewMatrix * vec4( position, 1.0 );\n\n\t\t}",fragmentShader:"\n\n\t\tuniform float opacity;\n\n\t\tuniform sampler2D tDiffuse;\n\n\t\tvarying vec2 vUv;\n\n\t\tvoid main() {\n\n\t\t\tvec4 texel = texture2D( tDiffuse, vUv );\n\t\t\tgl_FragColor = opacity * texel;\n\n\n\t\t}"};class QS{constructor(){this.isPass=!0,this.enabled=!0,this.needsSwap=!0,this.clear=!1,this.renderToScreen=!1}setSize(){}render(){console.error("THREE.Pass: .render() must be implemented in derived pass.")}dispose(){}}const Qfe=new Ib(-1,1,1,-1,0,1),epe=new class Jfe extends hn{constructor(){super(),this.setAttribute("position",new ct([-1,3,0,-1,-1,0,3,-1,0],3)),this.setAttribute("uv",new ct([0,2,0,0,2,0],2))}};class tpe{constructor(t){this._mesh=new Mn(epe,t)}dispose(){this._mesh.geometry.dispose()}render(t){t.render(this._mesh,Qfe)}get material(){return this._mesh.material}set material(t){this._mesh.material=t}}class npe extends QS{constructor(t,e){super(),this.textureID=void 0!==e?e:"tDiffuse",t instanceof Cl?(this.uniforms=t.uniforms,this.material=t):t&&(this.uniforms=Q4.clone(t.uniforms),this.material=new Cl({name:void 0!==t.name?t.name:"unspecified",defines:Object.assign({},t.defines),uniforms:this.uniforms,vertexShader:t.vertexShader,fragmentShader:t.fragmentShader})),this.fsQuad=new tpe(this.material)}render(t,e,n){this.uniforms[this.textureID]&&(this.uniforms[this.textureID].value=n.texture),this.fsQuad.material=this.material,this.renderToScreen?(t.setRenderTarget(null),this.fsQuad.render(t)):(t.setRenderTarget(e),this.clear&&t.clear(t.autoClearColor,t.autoClearDepth,t.autoClearStencil),this.fsQuad.render(t))}dispose(){this.material.dispose(),this.fsQuad.dispose()}}class o$ extends QS{constructor(t,e){super(),this.scene=t,this.camera=e,this.clear=!0,this.needsSwap=!1,this.inverse=!1}render(t,e,n){const r=t.getContext(),s=t.state;let o,a;s.buffers.color.setMask(!1),s.buffers.depth.setMask(!1),s.buffers.color.setLocked(!0),s.buffers.depth.setLocked(!0),this.inverse?(o=0,a=1):(o=1,a=0),s.buffers.stencil.setTest(!0),s.buffers.stencil.setOp(r.REPLACE,r.REPLACE,r.REPLACE),s.buffers.stencil.setFunc(r.ALWAYS,o,4294967295),s.buffers.stencil.setClear(a),s.buffers.stencil.setLocked(!0),t.setRenderTarget(n),this.clear&&t.clear(),t.render(this.scene,this.camera),t.setRenderTarget(e),this.clear&&t.clear(),t.render(this.scene,this.camera),s.buffers.color.setLocked(!1),s.buffers.depth.setLocked(!1),s.buffers.color.setMask(!0),s.buffers.depth.setMask(!0),s.buffers.stencil.setLocked(!1),s.buffers.stencil.setFunc(r.EQUAL,1,4294967295),s.buffers.stencil.setOp(r.KEEP,r.KEEP,r.KEEP),s.buffers.stencil.setLocked(!0)}}class ipe extends QS{constructor(){super(),this.needsSwap=!1}render(t){t.state.buffers.stencil.setLocked(!1),t.state.buffers.stencil.setTest(!1)}}class rpe{constructor(t,e){if(this.renderer=t,this._pixelRatio=t.getPixelRatio(),void 0===e){const n=t.getSize(new xe);this._width=n.width,this._height=n.height,(e=new Mu(this._width*this._pixelRatio,this._height*this._pixelRatio,{type:Jm})).texture.name="EffectComposer.rt1"}else this._width=e.width,this._height=e.height;this.renderTarget1=e,this.renderTarget2=e.clone(),this.renderTarget2.texture.name="EffectComposer.rt2",this.writeBuffer=this.renderTarget1,this.readBuffer=this.renderTarget2,this.renderToScreen=!0,this.passes=[],this.copyPass=new npe(Zfe),this.copyPass.material.blending=Qc,this.clock=new OG}swapBuffers(){const t=this.readBuffer;this.readBuffer=this.writeBuffer,this.writeBuffer=t}addPass(t){this.passes.push(t),t.setSize(this._width*this._pixelRatio,this._height*this._pixelRatio)}insertPass(t,e){this.passes.splice(e,0,t),t.setSize(this._width*this._pixelRatio,this._height*this._pixelRatio)}removePass(t){const e=this.passes.indexOf(t);-1!==e&&this.passes.splice(e,1)}isLastEnabledPass(t){for(let e=t+1;e0?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;l$.fromArray(r,t),yO.fromArray(r,e),c$.fromArray(r,n),Ba.subVectors(c$,yO),d$.subVectors(l$,yO),Ba.cross(d$),Ba.normalize(),s.push(Ba.x,Ba.y,Ba.z),s.push(Ba.x,Ba.y,Ba.z),s.push(Ba.x,Ba.y,Ba.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 d=this.vertices.length;let h=this.parseVertexIndex(t,d),p=this.parseVertexIndex(e,d),m=this.parseVertexIndex(n,d);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?(JS.setRGB(parseFloat(h[4]),parseFloat(h[5]),parseFloat(h[6])).convertSRGBToLinear(),e.colors.push(JS.r,JS.g,JS.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"===d){const p=c.slice(1).trim().split(a$),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 Fo;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 ct(d.normals,3)),d.colors.length>0&&(g=!0,b.setAttribute("color",new ct(d.colors,3))),!0===d.hasUVIndices&&b.setAttribute("uv",new ct(d.uvs,2));const v=[];for(let M=0,x=h.length;M1){for(let M=0,x=h.length;M0){const a=new mf({size:1,sizeAttenuation:!1}),l=new hn;l.setAttribute("position",new ct(e.vertices,3)),e.colors.length>0&&void 0!==e.colors[0]&&(l.setAttribute("color",new ct(e.colors,3)),a.vertexColors=!0);const c=new Vb(l,a);s.add(c)}return s}}class bO extends yf{constructor(t){super(t)}load(t,e,n,r){const s=this,o=""===this.path?Ou.extractUrlBase(t):this.path,a=new La(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,d):c;h=h.toLowerCase();let p=d>=0?c.substring(d+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 fpe(this.resourcePath||e,this.materialOptions);return a.setCrossOrigin(this.crossOrigin),a.setManager(this.manager),a.setMaterials(o),a}}class fpe{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:ac,this.wrap=void 0!==this.options.wrap?this.options.wrap:Pa}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),d=e.loadTexture(function s(a,l){return"string"!=typeof l||""===l?"":/^https?:\/\//i.test(l)?l:a+l}(e.baseUrl,c.url));d.repeat.copy(c.scale),d.offset.copy(c.offset),d.wrapS=e.wrap,d.wrapT=e.wrap,("map"===a||"emissiveMap"===a)&&(d.colorSpace=cs),r[a]=d}for(const a in n){const l=n[a];let c;if(""!==l)switch(a.toLowerCase()){case"kd":r.color=(new qe).fromArray(l).convertSRGBToLinear();break;case"ks":r.specular=(new qe).fromArray(l).convertSRGBToLinear();break;case"ke":r.emissive=(new qe).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 zS(r),this.materials[t]}getTextureParams(t,e){const n={scale:new xe(1,1),offset:new xe(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:wG;let a=o.getHandler(t);null===a&&(a=new Pu(o)),a.setCrossOrigin&&a.setCrossOrigin(this.crossOrigin);const l=a.load(t,n,r,s);return void 0!==e&&(l.mapping=e),l}}const ppe=["determinateSpinner"];function mpe(i,t){if(1&i&&(ki(),W(0,"svg",11),De(1,"circle",12),j()),2&i){const e=he();Dt("viewBox",e._viewBox()),G(1),jo("stroke-dasharray",e._strokeCircumference(),"px")("stroke-dashoffset",e._strokeCircumference()/2,"px")("stroke-width",e._circleStrokeWidth(),"%"),Dt("r",e._circleRadius())}}const gpe=Qy(class{constructor(i){this._elementRef=i}},"primary"),_pe=new me("mat-progress-spinner-default-options",{providedIn:"root",factory:function vpe(){return{diameter:u$}}}),u$=100;let Jb=(()=>{class i extends gpe{constructor(e,n,r){super(e),this.mode="mat-spinner"===this._elementRef.nativeElement.nodeName.toLowerCase()?"indeterminate":"determinate",this._value=0,this._diameter=u$,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,ks(e)))}get diameter(){return this._diameter}set diameter(e){this._diameter=ks(e)}get strokeWidth(){return this._strokeWidth??this.diameter/10}set strokeWidth(e){this._strokeWidth=ks(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)(E(mt),E(Rr,8),E(_pe))},i.\u0275cmp=ot({type:i,selectors:[["mat-progress-spinner"],["mat-spinner"]],viewQuery:function(e,n){if(1&e&&Wn(ppe,5),2&e){let r;Et(r=At())&&(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&&(Dt("aria-valuemin",0)("aria-valuemax",100)("aria-valuenow","determinate"===n.mode?n.value:null)("mode",n.mode),jo("width",n.diameter,"px")("height",n.diameter,"px"),un("_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:[lt],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&&(fe(0,mpe,2,8,"ng-template",null,0,Vc),W(2,"div",1,2),ki(),W(4,"svg",3),De(5,"circle",4),j()(),ga(),W(6,"div",5)(7,"div",6)(8,"div",7),sy(9,8),j(),W(10,"div",9),sy(11,8),j(),W(12,"div",10),sy(13,8),j()()()),2&e){const r=Zi(1);G(4),Dt("viewBox",n._viewBox()),G(1),jo("stroke-dasharray",n._strokeCircumference(),"px")("stroke-dashoffset",n._strokeDashOffset(),"px")("stroke-width",n._circleStrokeWidth(),"%"),Dt("r",n._circleRadius()),G(4),U("ngTemplateOutlet",r),G(2),U("ngTemplateOutlet",r),G(2),U("ngTemplateOutlet",r)}},dependencies:[xy],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})(),bpe=(()=>{class i{}return i.\u0275fac=function(e){return new(e||i)},i.\u0275mod=nn({type:i}),i.\u0275inj=Kt({imports:[Eo,Qn]}),i})();const xpe=["previewCanvasContainer"],wpe=["previewCanvas"];function Mpe(i,t){if(1&i){const e=di();Gr(0),W(1,"label",11),Ve(2),j(),W(3,"input",12),Ue("change",function(r){an(e);const s=he().$implicit;return s.value=r.currentTarget.checked,zt(s.change(s.value))}),j(),$r()}if(2&i){const e=he(),n=e.index,r=e.$implicit,s=he().index;G(1),U("for","custom_control_"+s+"_"+n),G(1),_i(r.label),G(1),U("id","custom_control_"+s+"_"+n)("type",r.type)("checked",r.value)}}function Cpe(i,t){if(1&i){const e=di();W(0,"div",9)(1,"label",11),Ve(2),j(),W(3,"input",14),Ue("change",function(){const s=an(e).$implicit,o=he(2).$implicit;return o.value=s,zt(o.change(o.value))}),j()()}if(2&i){const e=t.$implicit,n=he(2),r=n.index,s=n.$implicit,o=he().index;G(1),U("for","custom_control_"+o+"_"+r+"_"+e),G(1),_i(e),G(1),U("id","custom_control_"+o+"_"+r+"_"+e)("checked",s.value===e)}}function Spe(i,t){if(1&i&&(W(0,"div",13)(1,"label"),Ve(2),j(),fe(3,Cpe,4,4,"div",8),j()),2&i){const e=he().$implicit;G(2),_i(e.label),G(1),U("ngForOf",e.options)}}function Epe(i,t){if(1&i){const e=di();Gr(0),W(1,"label",11),Ve(2),j(),W(3,"input",15),Ue("colorChange",function(r){an(e);const s=he().$implicit,o=he(2);return s.value=o.toRGB(r.value),zt(s.change(s.value))}),j(),De(4,"ngx-mat-color-toggle",16)(5,"ngx-mat-color-picker",null,17),$r()}if(2&i){const e=Zi(6),n=he(),r=n.index,s=n.$implicit,o=he().index;G(1),U("for","custom_control_"+o+"_"+r),G(1),_i(s.label),G(1),U("ngxMatColorPicker",e),G(1),U("for",e)}}function Ape(i,t){if(1&i){const e=di();Gr(0),W(1,"label",11),Ve(2),j(),W(3,"input",18),Ue("change",function(r){an(e);const s=he().$implicit;return s.value=r.currentTarget.value,zt(s.change(s.value))}),j(),$r()}if(2&i){const e=he(),n=e.index,r=e.$implicit,s=he().index;G(1),U("for","custom_control_"+s+"_"+n),G(1),_i(r.label),G(1),U("id","custom_control_"+s+"_"+n)("min",r.minValue)("max",r.maxValue)("step",r.valueStep)("value",r.value)}}function Dpe(i,t){if(1&i&&(W(0,"div",9),fe(1,Mpe,4,5,"ng-container",6),fe(2,Spe,4,2,"div",10),fe(3,Epe,7,4,"ng-container",6),fe(4,Ape,4,7,"ng-container",6),j()),2&i){const e=t.$implicit;G(1),U("ngIf","checkbox"===e.type),G(1),U("ngIf","radio"===e.type),G(1),U("ngIf","color"===e.type),G(1),U("ngIf","slider"===e.type)}}function Tpe(i,t){if(1&i&&(Gr(0),W(1,"h4"),Ve(2),j(),fe(3,Dpe,5,4,"div",8),$r()),2&i){const e=t.$implicit;G(2),_i(e.title),G(1),U("ngForOf",e.controls)}}function Ipe(i,t){if(1&i){const e=di();W(0,"div",9)(1,"label",11),Ve(2),j(),W(3,"input",19),Ue("change",function(r){return zt(an(e).$implicit.visible=r.currentTarget.checked)}),j()()}if(2&i){const e=t.$implicit;G(1),U("for","visibility_"+e.name),G(1),_i(e.name),G(1),U("id","visibility_"+e.name)("checked",e.visible)}}function Rpe(i,t){if(1&i&&(Gr(0),W(1,"h4"),Ve(2,"Objects visibility"),j(),fe(3,Ipe,4,4,"div",8),$r()),2&i){const e=he();G(3),U("ngForOf",e.meshes)}}function kpe(i,t){1&i&&De(0,"mat-spinner",20)}const ia=i=>{i.colorSpace="srgb",i.anisotropy=8,i.magFilter=_r,i.minFilter=_r};let h$=(()=>{class i{constructor(e){this.cdr=e,this.visibilityControls=!0,this.groupFunction=null,this.customControls=[],this.onObjectLoaded=new We,this._paths$=new gt(null),this.destroyed$=new Re,this.entity=null,this.meshes=[]}get paths(){return this._paths$.getValue()}set paths(e){this._paths$.next(e)}ngAfterViewInit(){var e=this;return tt(function*(){var s;e.world=new sk(new vO,{init:(s=tt(function*(){}),function(){return s.apply(this,arguments)}),simulate:()=>{}}),yield e.world.init(),e.world.visualScene.nativeScene.add(new $S(16777215,2));let n=new gt({x:1,y:1});e.renderer=e.world.addRenderer(e.world.visualScene.factory.createPerspectiveCamera({frustrum:{near:.01,far:1e4}}),e.previewCanvas.nativeElement,{size:n.asObservable(),background:11184810}),e.controller=new kse(e.renderer,{mouseOptions:{canvas:e.previewCanvas.nativeElement},orbiting:{sensitivityX:2,sensitivityY:2},orbitingElasticity:30}),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(He(e.destroyed$)).subscribe(function(){var s=tt(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 Qb,h=yield(new bO).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 Fo;y.add(...b[v]),y.name=v,p.remove(...b[v]),p.add(y)}}e.meshes=p.children,e.meshes.sort((b,v)=>b.name>v.name?1:-1),p.traverse(b=>{if(b instanceof Mn){const v=b.material instanceof Array?b.material:[b.material];for(const y of v)y.transparent=!0,y.alphaTest=.5,y instanceof qi&&y.map&&(y.map.wrapS=Ii,y.map.wrapT=Ii,ia(y.map),y.map.needsUpdate=!0)}}),e.onObjectLoaded.next(p),e.entity=new Zo({object3D:new na(p)}),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=Pe.scalarMult(Pe.add(m.min,m.max),.5),e.controller.spherical={phi:1.22,theta:-1.32,radius:Pe.dist(m.min,m.max)},e.cdr.markForCheck()}});return function(o){return s.apply(this,arguments)}}())})()}toRGB(e){return(e?.r||0)<<16|(e?.g||0)<<8|(e?.b||0)}ngOnDestroy(){this.destroyed$.next(),this.destroyed$.complete()}}return i.\u0275fac=function(e){return new(e||i)(E(Zn))},i.\u0275cmp=ot({type:i,selectors:[["app-obj-viewer"]],viewQuery:function(e,n){if(1&e&&(Wn(xpe,5),Wn(wpe,5)),2&e){let r;Et(r=At())&&(n.previewCanvasContainer=r.first),Et(r=At())&&(n.previewCanvas=r.first)}},inputs:{paths:"paths",visibilityControls:"visibilityControls",groupFunction:"groupFunction",customControls:"customControls"},outputs:{onObjectLoaded:"onObjectLoaded"},decls:8,vars:3,consts:[[1,"previewCanvasContainer"],["previewCanvasContainer",""],["width","640","height","480"],["previewCanvas",""],["id","controls"],[4,"ngFor","ngForOf"],[4,"ngIf"],["mode","indeterminate",4,"ngIf"],["class","controls-list",4,"ngFor","ngForOf"],[1,"controls-list"],["style","width: 100%",4,"ngIf"],[3,"for"],[3,"id","type","checked","change"],[2,"width","100%"],["type","radio",3,"id","checked","change"],["matInput","",1,"hidden",3,"ngxMatColorPicker","colorChange"],["matSuffix","",3,"for"],["picker",""],["type","range",3,"id","min","max","step","value","change"],["type","checkbox",3,"id","checked","change"],["mode","indeterminate"]],template:function(e,n){1&e&&(W(0,"div",0,1),De(2,"canvas",2,3),W(4,"div",4),fe(5,Tpe,4,2,"ng-container",5),fe(6,Rpe,4,1,"ng-container",6),j(),fe(7,kpe,1,0,"mat-spinner",7),j()),2&e&&(G(5),U("ngForOf",n.customControls),G(1),U("ngIf",n.visibilityControls),G(1),U("ngIf",!n.entity))},dependencies:[So,vi,Xte,ic,Jb,jie,bC,LH],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%] > h4[_ngcontent-%COMP%]{margin:0}.previewCanvasContainer[_ngcontent-%COMP%] #controls[_ngcontent-%COMP%] .controls-list[_ngcontent-%COMP%]{width:100%;display:flex;-webkit-user-select:none;user-select:none;align-items:center}.previewCanvasContainer[_ngcontent-%COMP%] #controls[_ngcontent-%COMP%] .controls-list[_ngcontent-%COMP%] > span[_ngcontent-%COMP%]{flex-grow:1}.previewCanvasContainer[_ngcontent-%COMP%] #controls[_ngcontent-%COMP%] .controls-list[_ngcontent-%COMP%] > label[_ngcontent-%COMP%]{flex-grow:1}"],changeDetection:0}),i})();function Ppe(i,t){if(1&i&&(ki(),De(0,"circle",5),Ct(1,"async"),Ct(2,"async")),2&i){const e=he();let n,r;Dt("cx",(null==(n=Tt(1,3,e.mapPointer$))?null:n.x)||0)("cy",(null==(r=Tt(2,5,e.mapPointer$))?null:r.y)||0)("r",10)}}const Ope=function(){return{"stroke-width":3}};let f$=(()=>{class i{constructor(e){this.ref=e,this._roadSpline$=new gt([]),this._pointer$=new gt(null),this.splineClosed=!1,this.svgSize$=new gt({x:100,y:100}),this.scalingSquare$=new gt({x:0,y:0,width:100,height:100}),this.mapPolyline$=new gt(""),this.mapPointer$=new gt(null),this.destroyed$=new Re}set roadSpline(e){this._roadSpline$.next(e)}set pointer(e){this._pointer$.next(e)}get trackLength$(){return this._roadSpline$.pipe(et(e=>{let n=0;for(let r=1;r{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$),nu([this._roadSpline$,this.scalingSquare$,this.svgSize$]).pipe(He(this.destroyed$),et(([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$),nu([this._pointer$,this.scalingSquare$.asObservable(),this.svgSize$]).pipe(He(this.destroyed$),et(([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)(E(mt))},i.\u0275cmp=ot({type:i,selectors:[["app-tri-minimap"]],inputs:{roadSpline:"roadSpline",pointer:"pointer",splineClosed:"splineClosed"},decls:13,vars:16,consts:[[1,"container"],["shape-rendering","geometricPrecision"],[2,"fill","none","stroke","#333333",3,"ngStyle"],["fill","#e30","stroke","black","stroke-width","3",4,"ngIf"],[1,"info_div"],["fill","#e30","stroke","black","stroke-width","3"]],template:function(e,n){if(1&e&&(W(0,"div",0),ki(),W(1,"svg",1),Ct(2,"async"),Ct(3,"async"),De(4,"polyline",2),Ct(5,"async"),Ve(6," cars "),fe(7,Ppe,3,7,"circle",3),Ct(8,"async"),j(),ga(),W(9,"div",4)(10,"span"),Ve(11),Ct(12,"async"),j()()()),2&e){let r,s;G(1),Dt("viewBox","0 0 "+(null==(r=Tt(2,5,n.svgSize$))?null:r.x)+" "+(null==(r=Tt(3,7,n.svgSize$))?null:r.y)),G(3),U("ngStyle",so(15,Ope)),Dt("points",Tt(5,9,n.mapPolyline$)),G(3),U("ngIf",Tt(8,11,n.mapPointer$)),G(4),Qi("Track length (m): ",null==(s=Tt(12,13,n.trackLength$))?null:s.toFixed(2),"")}},dependencies:[vi,tM,pl],styles:["[_nghost-%COMP%]{overflow:auto}.container[_ngcontent-%COMP%]{position:relative;width:100%;height:100%}.container[_ngcontent-%COMP%] svg[_ngcontent-%COMP%]{position:absolute;width:100%;height:100%}.container[_ngcontent-%COMP%] .info_div[_ngcontent-%COMP%]{color:#838383}"],changeDetection:0}),i})();const Fpe=["previewCanvasContainer"],Lpe=["previewCanvas"];function Npe(i,t){if(1&i&&(W(0,"mat-option",19),Ve(1),j()),2&i){const e=t.$implicit;U("value",e),G(1),Qi(" ",e," ")}}function Bpe(i,t){if(1&i){const e=di();Gr(0),W(1,"mat-form-field",1)(2,"mat-label"),Ve(3,"Custom FAM path"),j(),De(4,"input",20,21),Ct(6,"async"),j(),W(7,"button",22),Ue("click",function(){an(e);const r=Zi(5);return zt(he().onFamSelected(r.value))}),Ve(8,"LOAD"),j(),$r()}if(2&i){const e=he();G(4),U("value",Tt(6,1,e.previewFamLocation$))}}function Upe(i,t){1&i&&De(0,"mat-spinner",23),2&i&&U("diameter",40)}function Vpe(i,t){1&i&&De(0,"mat-spinner",24)}const zpe=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 Af=(()=>{return(i=Af||(Af={})).ThreeModel="model",i.Bitmap="bitmap",i.TwoSidedBitmap="two_sided_bitmap",Af;var i})();class Hpe extends QH{constructor(t,e,n){super(t,{loadDepth:40,inertia:2}),this.mapGraph=t,this.famPath=e,this.hideUnknownEntities$=n,this.textureLoader=new Pu,this.terrainMaterials={},this.objLoader=new Qb,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(Zl(),He(this._onRemoved$)).subscribe(e=>{for(const n of this.unknownEntities)n.visible=!e})}getPlaceholderTexture(){var t=this;return tt(function*(){return t._placeholder?t._placeholder:(t._placeholderPromise||(t._placeholderPromise=t.textureLoader.loadAsync("assets/placeholder_texture.png")),t._placeholderPromise)})()}getPlaceholderTerrainTexture(){var t=this;return tt(function*(){return t._placeholderTerrain?t._placeholderTerrain:(t._placeholderTerrainPromise||(t._placeholderTerrainPromise=t.textureLoader.loadAsync("assets/placeholder_texture.png").then(e=>(e.wrapS=Pa,e.wrapT=Ii,ia(e),e.flipY=!0,e))),t._placeholderTerrainPromise)})()}loadChunk(t){var e=this;return tt(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 Mn&&(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:Pe.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:Yi.fromAngle(Pe.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 Zo({object3D:new na(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 qi({side:Ls,transparent:!0,visible:!1}),this.famPath?this.textureLoader.loadAsync(`${this.famPath}/background/${t}.png`).then(e=>{e.wrapS=Pa,e.wrapT=Ii,ia(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 tt(function*(){let n=!1;if(t.type==Af.ThreeModel){let r;try{if(!e.famPath)throw new Error;const o=new bO,a=new Qb,l=yield o.loadAsync(`${e.famPath}/props/${t.data.data.resource_id}/0/material.mtl`);l.preload(),a.setMaterials(l),r=new na(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 Mn){const a=o.material instanceof Array?o.material:[o.material];for(const l of a)l.transparent=!0,l.alphaTest=.5,l instanceof qi&&l.map&&(l.map.wrapS=Ii,l.map.wrapT=Ii,ia(l.map),l.map.needsUpdate=!0)}});const s=new Zo({object3D: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==Af.Bitmap||t.type==Af.TwoSidedBitmap){const r=(c,d)=>new Array(d).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 Fo,[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==Af.TwoSidedBitmap){const[c,d]=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 Zo({object3D:new na(s)});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 tt(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=>(ia(h),new qi({map:h,alphaTest:.5,transparent:!0,side:Ls}))),d=new Mn(new Iu(e.x,e.y),c[0]);if(d.rotateX(Math.PI/2),d.position.set(0,0,e.y/2),c.length>1){let h=-1;Ym(r.world).pipe(o4(n&&!isNaN(+n)?1e3*+n:250)).subscribe(()=>{h=(h+1)%c.length,d.material=c[h]})}return[d,a]})()}}let Gpe=(()=>{class i{constructor(e,n,r){this.eelDelegate=e,this.cdr=n,this.mainService=r,this._resource$=new gt(null),this.changed=new We,this.previewLoading$=new gt(!0),this.previewFamLocation$=new gt(null),this.previewFamLoading$=new gt(!1),this.pointer$=new gt(null),this.selectedSplineIndex$=new gt(0),this.selectedSplineItem$=new gt(null),this.selectedAiInfoItem$=new gt(null),this.selectedTerrainItem$=new gt(null),this.famPath=null,this.name="",this.renderer=null,this.map=null,this.isOpenedTrack=!0,this.roadPath=null,this.destroyed$=new Re}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 tt(function*(){var s;e.world=new sk(new vO,{init:(s=tt(function*(){}),function(){return s.apply(this,arguments)}),simulate:()=>{},loader:{loadFromGgGlb:function(){var s=tt(function*(...o){return[]});return function(){return s.apply(this,arguments)}}()}}),yield e.world.init(),e.skySphere=new Zo({object3D:e.world.visualScene.factory.createPrimitive({shape:"SPHERE",radius:1e3},{color:16777215})}),e.skySphere.object3D.nativeMesh.material.side=Ls,e.world.addEntity(e.skySphere),e.selectionSphere=new Zo({object3D: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 $S(16777215,2));let n=new gt({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=Yi.lookAt(e.renderer.camera.position,Pe.add(e.renderer.camera.position,Pe.Y),Pe.Z),Ym(e.world).pipe(He(e.destroyed$)).subscribe(()=>{e.renderer&&(e.skySphere.position=e.renderer.camera.position,e.pointer$.next(e.renderer.camera.position))}),e.controller=new n4(e.world.keyboardInput,e.renderer,{mouseOptions:{canvas:e.previewCanvas.nativeElement,pointerLock:!0},keymap:"wasd+arrows",cameraLinearSpeed:40,cameraBoostMultiplier:4,cameraMovementElasticity:100,cameraRotationElasticity:30,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(He(e.destroyed$)).subscribe(function(){var s=tt(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(He(e.destroyed$),gn(([s,o])=>!!e.resource&&s.startsWith(e.resource.id)),ml(3e3)).subscribe(tt(function*(){e.previewLoading$.next(!0),yield e.postTmpUpdates(e.resource?.id),yield e.loadPreview(),e.previewLoading$.next(!1)})),e.selectedSplineIndex$.pipe(He(e.destroyed$),ml(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=Pe.add(a,Pe.rotAround({x:10,y:-12,z:5},{x:0,y:0,z:1},-e.resource.data.road_spline[s].orientation)),e.renderer.rotation=Yi.lookAt(e.renderer.position,a,{x:0,y:0,z:1}),e.controller.reset())}e.selectedSplineItem$.next({id:rc(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:rc(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:rc(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 tt(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 Pu,o=r.find(a=>a.endsWith("spherical.png"));if(o){const a=yield s.loadAsync(o);a.colorSpace="srgb",a.mapping=lc,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 tt(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 tt(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=Km.fromMapArray(e.roadPath.map((r,s)=>({path:`${e.terrainChunksObjLocation}terrain_chunk_${s}`,position:r,loadOptions:{}}))||[],!e.isOpenedTrack);e.unloadPreview(),e.map=new Hpe(n,e.famPath&&"resources/"+e.famPath,e.mainService.hideHiddenFields$),e.map.resource=e.resource,e.map.isOpenedTrack=e.isOpenedTrack,Ym(e.world).pipe(He(e.destroyed$)).subscribe(()=>{e.map&&e.renderer&&e.map.loaderCursor$.next(e.renderer.position)}),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 tt(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)(E(Ql),E(Zn),E(ka))},i.\u0275cmp=ot({type:i,selectors:[["app-tri-map-block-ui"]],viewQuery:function(e,n){if(1&e&&(Wn(Fpe,5),Wn(Lpe,5)),2&e){let r;Et(r=At())&&(n.previewCanvasContainer=r.first),Et(r=At())&&(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&&(W(0,"div",0)(1,"h4"),Ve(2,"Preview *.FAM file"),j(),W(3,"mat-form-field",1)(4,"mat-label"),Ve(5,"Current preview FAM"),j(),W(6,"mat-select",2,3),Ue("valueChange",function(s){return n.onFamSelected(s)}),Ct(8,"async"),Ct(9,"async"),fe(10,Npe,2,2,"mat-option",4),W(11,"mat-option",5),Ve(12,"custom"),j()()(),fe(13,Bpe,9,3,"ng-container",6),fe(14,Upe,1,1,"mat-spinner",7),Ct(15,"async"),j(),W(16,"div",8)(17,"div",9,10),De(19,"canvas",11,12),fe(21,Vpe,1,0,"mat-spinner",13),Ct(22,"async"),j(),W(23,"div",14,10)(25,"mat-form-field",1)(26,"mat-label"),Ve(27,"Spline item"),j(),W(28,"input",15),Ue("ngModelChange",function(s){return n.selectedSplineIndex$.next(s)}),Ct(29,"async"),Ct(30,"async"),j()(),De(31,"app-tri-minimap",16),Ct(32,"async"),j()(),W(33,"h4"),Ve(34,"Road spline item"),j(),De(35,"app-compound-block-ui",17),Ct(36,"async"),W(37,"h4"),Ve(38,"AI info (block for 4 spline items)"),j(),De(39,"app-compound-block-ui",17),Ct(40,"async"),W(41,"h4"),Ve(42,"Terrain (block for 4 spline items)"),j(),De(43,"app-compound-block-ui",17),Ct(44,"async"),W(45,"h4"),Ve(46,"Common"),j(),De(47,"app-compound-block-ui",18),Ct(48,"async")),2&e){const r=Zi(7);let s;G(6),U("value",n.previewFamPossibleLocations.includes(Tt(8,20,n.previewFamLocation$))?Tt(9,22,n.previewFamLocation$):"custom"),G(4),U("ngForOf",n.previewFamPossibleLocations),G(3),U("ngIf","custom"==r.value),G(1),U("ngIf",Tt(15,24,n.previewFamLoading$)),G(7),U("ngIf",Tt(22,26,n.previewLoading$)),G(7),U("min",0)("max",4*(null==(s=Tt(29,28,n._resource$))?null:s.data.num_chunks)-1)("ngModel",Tt(30,30,n.selectedSplineIndex$)),G(3),U("roadSpline",n.roadSpline)("pointer",Tt(32,32,n.pointer$))("splineClosed",!n.isOpenedTrack),G(4),U("resource",Tt(36,34,n.selectedSplineItem$))("hideBlockActions",!0),G(4),U("resource",Tt(40,36,n.selectedAiInfoItem$))("hideBlockActions",!0),G(4),U("resource",Tt(44,38,n.selectedTerrainItem$))("hideBlockActions",!0),G(4),U("resource",Tt(48,40,n._resource$))("hideBlockActions",!0)("fieldWhitelist",so(42,zpe))}},dependencies:[So,vi,gl,mu,tc,_u,gu,Kc,vl,To,ic,ib,fb,Nm,Jb,Jl,f$,pl],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})();const p$=i=>new Promise(t=>setTimeout(t,i)),m$=(i,t,e=null)=>{const n=document.createElement("canvas"),r=n.getContext("2d",{willReadFrequently:!0}),s=i.width,o=i.height;n.width=s,n.height=o,r.drawImage(i,0,0,s,o);const a=r.getImageData(0,0,s,o);for(let l=0;l{if(!(o instanceof Mn))return;let a=-1;if(o.name.startsWith("lbl__rt_frnt")?a=0:o.name.startsWith("lbl__lt_frnt")?a=1:o.name.startsWith("lbl__rt_rear")?a=2:o.name.startsWith("lbl__lt_rear")&&(a=3),a>-1){this.wheels[a]=o,a<2&&(this.frontWheels[a]=o),o.geometry.boundingBox||o.geometry.computeBoundingBox();const l=Pe.avg(o.geometry.boundingBox.min,o.geometry.boundingBox.max);o.geometry.translate(...Pe.spr(Pe.neg(l))),o.position.set(...Pe.spr(l)),this.wheelIdlePositions[a]=l}(o.name.includes("rsid")||o.name.includes("lite"))&&(r.push(o),this.originalTexWithTailLights=o.material.map)}),!this.originalTexWithTailLights)throw new Error("Not a driveable NFS1 car");this.tailLightColors=n.includes("TRAFFC.CFM")?[9509903,16711680]:[3212546,16258068],this.texWithTailLightsImg=document.createElement("img"),this.texWithTailLights=new ko(this.texWithTailLightsImg),this.texWithTailLights.flipY=this.originalTexWithTailLights.flipY,ia(this.texWithTailLights),this.recolorTailLights(this.tailLightColors[0]).then();for(const o of r)o.material.map=this.texWithTailLights;const s=new Pu;this.tyreTextures=[1,2,3,4].map(o=>s.load(`${n}/tyr${o}.png`));for(const o of this.tyreTextures)ia(o);this.tyreMaterial=new qi({map:this.tyreTextures[0]}),this.tyreMaterial.transparent=!0,this.tyreMaterial.alphaTest=.5,this.tyreMaterial.map.wrapS=Ii,this.tyreMaterial.map.wrapT=Ii,this.tyreMaterial.polygonOffset=!0,this.tyreMaterial.polygonOffsetFactor=-4;for(const o of this.wheels)o.material=this.tyreMaterial}get tailLightsOn(){return this._tailLightsOn}set tailLightsOn(t){t!==this._tailLightsOn&&(this._tailLightsOn=t,this.recolorTailLights(this.tailLightColors[t?1:0]))}get speed(){return this._speed}set speed(t){if(t!==this._speed){switch(this._speed=t,this.tyreTextureUpdateTimer&&clearInterval(this.tyreTextureUpdateTimer),t){case"idle":this.tyreMaterial.map=this.tyreTextures[0];break;case"slow":let e=!0;this.tyreTextureUpdateTimer=setInterval(()=>{this.tyreMaterial.map=this.tyreTextures[e?1:2],this.tyreMaterial.needsUpdate=!0,e=!e},16);break;case"fast":this.tyreMaterial.map=this.tyreTextures[3]}this.tyreMaterial.needsUpdate=!0}}get steeringAngle(){return this._steeringAngle}set steeringAngle(t){if(t!==this._steeringAngle){this._steeringAngle=t;for(const e of this.frontWheels)e.rotation.set(0,0,t)}}recolorTailLights(t){var e=this;return tt(function*(){if(e.originalTexWithTailLights&&e.texWithTailLights&&e.texWithTailLightsImg){for(let n=100;n>0&&!e.originalTexWithTailLights.source.data;n--)yield p$(50);((i,t,e,n=null)=>{const[r,s,o]=[t>>16,t>>8&255,255&t],[a,l,c]=[e>>16,e>>8&255,255&e];m$(i,(d,h)=>{d[h]==r&&d[h+1]==s&&d[h+2]==o&&(d[h]=a,d[h+1]=l,d[h+2]=c)},n)})(e.originalTexWithTailLights.source.data,e.tailLightsTexColor,t,e.texWithTailLightsImg),e.texWithTailLights.needsUpdate=!0}})()}dispose(){this.texWithTailLightsImg&&(this.texWithTailLightsImg.remove(),this.texWithTailLightsImg=null),this.texWithTailLights&&(this.texWithTailLights.dispose(),this.texWithTailLights=null),this.tyreTextureUpdateTimer&&clearInterval(this.tyreTextureUpdateTimer),this.tyreMaterial&&(this.tyreMaterial.dispose(),this.tyreMaterial=null)}}let jpe=(()=>{class i{constructor(e,n,r){this.eelDelegate=e,this.mainService=n,this.cdr=r,this._resource$=new gt(null),this.changed=new We,this.previewPaths$=new gt(null),this.destroyed$=new Re,this.customControls=[],this.serializerSettings={geometry__save_obj:!0,geometry__save_blend:!1,geometry__export_to_gg_web_engine:!1}}get resource(){return this._resource$.getValue()}set resource(e){this._resource$.next(e)}ngAfterViewInit(){var e=this;return tt(function*(){e._resource$.pipe(He(e.destroyed$)).subscribe(function(){var n=tt(function*(r){e.previewPaths$.next(yield e.loadPreviewFilePaths(r?.id))});return function(r){return n.apply(this,arguments)}}()),e.mainService.dataBlockChange$.pipe(He(e.destroyed$),gn(([n,r])=>!!e.resource&&n.startsWith(e.resource.id)),ml(1500)).subscribe(tt(function*(){e.previewPaths$.next(null),e.previewPaths$.next(yield e.postTmpUpdates(e.resource?.id))}))})()}onObjectLoaded(e){var n=this;return tt(function*(){if((n._resource$.value?.id||"").includes(".CFM__"))try{const r=n.resource?.id.split("/");r.pop(),r[r.length-1]=""+(+r[r.length-1]+1);const s=yield n.eelDelegate.retrieveValue(r.join("/")+"/data"),o=s.children_aliases.findIndex(l=>"!PAL"===l);if(-1==o)throw new Error("Not a car");const a=new Wpe(e,s.children[o].data.colors[254]>>>8,n.previewPaths$.value[0].substring(0,n.previewPaths$.value[0].lastIndexOf("/"))+"/assets");n.customControls=[{title:"TNFS car features",controls:[{label:"Brake lights on",type:"checkbox",value:!1,change:l=>{a.tailLightsOn=l}},{label:"Car speed",type:"radio",options:["idle","slow","fast"],value:"idle",change:l=>{a.speed=l}},{label:"Steering angle",type:"slider",minValue:-.7,maxValue:.7,valueStep:.05,value:0,change:l=>{a.steeringAngle=l}}]}],n.cdr.markForCheck()}catch{}})()}postTmpUpdates(e){var n=this;return tt(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 tt(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)(E(Ql),E(ka),E(Zn))},i.\u0275cmp=ot({type:i,selectors:[["app-orip-geometry-block-ui"]],inputs:{resource:"resource"},outputs:{changed:"changed"},decls:4,vars:7,consts:[[3,"paths","customControls","onObjectLoaded"],[3,"resource"]],template:function(e,n){1&e&&(W(0,"app-obj-viewer",0),Ue("onObjectLoaded",function(s){return n.onObjectLoaded(s)}),Ct(1,"async"),j(),De(2,"app-compound-block-ui",1),Ct(3,"async")),2&e&&(U("paths",Tt(1,3,n.previewPaths$))("customControls",n.customControls),G(2),U("resource",Tt(3,5,n._resource$)))},dependencies:[Jl,h$,pl],changeDetection:0}),i})();const g$=i=>{let t=i.block_class_mro.split("__")[0];return"ArrayBlock"===t?g$(i.child_schema)+"[]":t},Ype=["class","block-ui"];function qpe(i,t){if(1&i&&(W(0,"mat-label",7),Ve(1),j()),2&i){const e=he(2);U("matTooltip",e.resourceDescription),G(1),Qi("",null==e.resource?null:e.resource.name," ")}}function Xpe(i,t){if(1&i&&(W(0,"mat-option",8),Ve(1),j()),2&i){const e=t.$implicit,n=t.index,r=he(2);U("value",n)("disabled",r.disabled),G(1),Qi(" ",r.blockClassStr(e)," ")}}function Kpe(i,t){if(1&i){const e=di();Gr(0),fe(1,qpe,2,2,"mat-label",1),Ct(2,"async"),W(3,"div",2)(4,"mat-label"),Ve(5,"Resource type:"),j(),W(6,"mat-select",3),Ue("selectionChange",function(r){return an(e),zt(he().setChoiceIndex(r.value))}),fe(7,Xpe,2,3,"mat-option",4),j(),De(8,"app-block-actions",5),j(),De(9,"app-editor",6),$r()}if(2&i){const e=he();let n;G(1),U("ngIf",(null==e.resource?null:e.resource.name)&&(null==e.resource?null:e.resource.name)!=(null==(n=Tt(2,8,e.main.resource$))?null:n.name)),G(5),U("value",e.resourceData.choice_index)("disabled",e.disabled),G(1),U("ngForOf",e.resource.schema.possible_resource_schemas),G(1),U("resource",e.childResource),G(1),U("resource",e.childResource)("hideBlockActions",!0)("disabled",e.disabled)}}let _$=(()=>{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 We,this.blockClassStr=g$}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:rc(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)(E(ka))},i.\u0275cmp=ot({type:i,selectors:[["app-delegate",8,"block-ui"]],inputs:{resource:"resource",resourceDescription:"resourceDescription",hideBlockActions:"hideBlockActions",disabled:"disabled"},outputs:{changed:"changed"},attrs:Ype,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"],[3,"resource","hideBlockActions","disabled"],["matTooltipPosition","above",3,"matTooltip"],[3,"value","disabled"]],template:function(e,n){1&e&&fe(0,Kpe,10,10,"ng-container",0),2&e&&U("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 Zpe=["class","block-ui"];function Qpe(i,t){if(1&i&&(W(0,"mat-label",7),Ve(1),j()),2&i){const e=he(2);U("matTooltip",e.resourceDescription),G(1),Qi(" ",e.resource.name," ")}}function Jpe(i,t){if(1&i){const e=di();Gr(0),fe(1,Qpe,2,2,"mat-label",1),W(2,"mat-selection-list",2),Ue("selectionChange",function(r){return an(e),zt(he().onSelection(r))}),W(3,"mat-list-option",3),Ve(4," Left "),j(),W(5,"mat-list-option",4),Ve(6," Right "),j()(),W(7,"mat-form-field",5)(8,"mat-label"),Ve(9,"Texture ID"),j(),W(10,"input",6),Ue("ngModelChange",function(r){return an(e),zt(he().resource.data.texture_id=r)})("change",function(){return an(e),zt(he().changed.emit())}),j()(),$r()}if(2&i){const e=he();G(1),U("ngIf",e.resource.name),G(2),U("selected",e.resource.data.has_left_fence),G(2),U("selected",e.resource.data.has_right_fence),G(5),U("max",63)("min",0)("step",1)("ngModel",e.resource.data.texture_id)}}let eme=(()=>{class i{constructor(){this.resource=null,this.resourceDescription="",this.changed=new We}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=ot({type:i,selectors:[["app-fence-type",8,"block-ui"]],inputs:{resource:"resource",resourceDescription:"resourceDescription"},outputs:{changed:"changed"},attrs:Zpe,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&&fe(0,Jpe,11,7,"ng-container",0),2&e&&U("ngIf",n.resource)},dependencies:[vi,gl,mu,tc,_u,gu,Kc,vl,To,ic,Os,MC,wC],changeDetection:0}),i})(),tme=(()=>{class i{constructor(){this._resource=null,this.resourceMap={},this.changed=new We}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]=["",_l.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)(E(nb),E(bte),E(oR))},i.\u0275cmp=ot({type:i,selectors:[["app-run-custom-action",8,"dialog"]],attrs:nme,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&&(W(0,"h1",0),Ve(1),j(),W(2,"div",1)(3,"p"),Ve(4),j()(),W(5,"form",2),fe(6,ime,4,4,"mat-form-field",3),j(),W(7,"div",4)(8,"button",5),Ue("click",function(){return n.dialogRef.close()}),Ve(9,"Cancel"),j(),W(10,"button",6),Ue("click",function(){return n.submit()}),Ve(11,"Run"),j()()),2&e&&(G(1),Qi('Run action "',n.data.title,'"'),G(3),_i(n.data.description),G(1),U("formGroup",n.argsForm),G(1),U("ngForOf",n.data.args),G(4),U("disabled",n.argsForm.invalid))},dependencies:[So,IR,gl,tc,bR,vl,To,ic,ib,fV,pV,mV,Gh,fC],styles:["form[_ngcontent-%COMP%]{padding:0 24px}"]}),i})();function v$(i,t){return t?e=>Sy(t.pipe(Oi(1),function sme(){return ti((i,t)=>{i.subscribe(Yn(t,ms))})}()),e.pipe(v$(i))):ir((e,n)=>wr(i(e,n)).pipe(Oi(1),YB(e)))}function y$(i,t=$y){const e=OI(i,t);return v$(()=>e)}const ome=["mat-menu-item",""];function ame(i,t){1&i&&(ki(),W(0,"svg",3),De(1,"polygon",4),j())}const lme=[[["mat-icon"],["","matMenuItemIcon",""]],"*"],cme=["mat-icon, [matMenuItemIcon]","*"];function dme(i,t){if(1&i){const e=di();W(0,"div",0),Ue("keydown",function(r){return an(e),zt(he()._handleKeydown(r))})("click",function(){return an(e),zt(he().closed.emit("click"))})("@transformMenu.start",function(r){return an(e),zt(he()._onAnimationStart(r))})("@transformMenu.done",function(r){return an(e),zt(he()._onAnimationDone(r))}),W(1,"div",1),Wt(2),j()()}if(2&i){const e=he();U("id",e.panelId)("ngClass",e._classList)("@transformMenu",e._panelAnimationState),Dt("aria-label",e.ariaLabel||null)("aria-labelledby",e.ariaLabelledby||null)("aria-describedby",e.ariaDescribedby||null)}}const ume=["*"],xO=new me("MAT_MENU_PANEL"),hme=YM(jM(class{}));let eE=(()=>{class i extends hme{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 Re,this._focused=new Re,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",jr("120ms cubic-bezier(0, 0, 0.2, 1)",si({opacity:1,transform:"scale(1)"}))),Pr("* => void",jr("100ms 25ms linear",si({opacity:0})))]),fadeInItems:Ra("fadeInItems",[Ps("showing",si({opacity:1})),Pr("void => *",[si({opacity:0}),jr("400ms 100ms cubic-bezier(0.55, 0, 0.55, 0.2)")])])};let pme=0;const b$=new me("mat-menu-default-options",{providedIn:"root",factory:function mme(){return{overlapTrigger:!1,xPosition:"after",yPosition:"below",backdropClass:"cdk-overlay-transparent-backdrop"}}});let e0=(()=>{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 om,this._classList={},this._panelAnimationState="void",this._animationDone=new Re,this.overlayPanelClass=this._defaultOptions.overlayPanelClass||"",this.backdropClass=this._defaultOptions.backdropClass,this._overlapTrigger=this._defaultOptions.overlapTrigger,this._hasBackdrop=this._defaultOptions.hasBackdrop,this.closed=new We,this.close=this.closed,this.panelId="mat-menu-panel-"+pme++}ngOnInit(){this.setPositionClasses()}ngAfterContentInit(){this._updateDirectDescendants(),this._keyManager=new RU(this._directDescendantItems).withWrap().withTypeAhead().withHomeAndEnd(),this._keyManager.tabOut.subscribe(()=>this.closed.emit("tab")),this._directDescendantItems.changes.pipe(Ao(this._directDescendantItems),Rs(e=>Mr(...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(Ao(this._directDescendantItems),Rs(n=>Mr(...n.map(r=>r._hovered))))}addItem(e){}removeItem(e){}_handleKeydown(e){const n=e.keyCode,r=this._keyManager;switch(n){case 27:Xo(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(Oi(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(Ao(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)(E(mt),E(ft),E(b$),E(Zn))},i.\u0275dir=ve({type:i,contentQueries:function(e,n,r){if(1&e&&(Wi(r,fme,5),Wi(r,eE,5),Wi(r,eE,4)),2&e){let s;Et(s=At())&&(n.lazyContent=s.first),Et(s=At())&&(n._allItems=s),Et(s=At())&&(n.items=s)}},viewQuery:function(e,n){if(1&e&&Wn(Mo,5),2&e){let r;Et(r=At())&&(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})(),gme=(()=>{class i extends e0{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)(E(mt),E(ft),E(b$),E(Zn))},i.\u0275cmp=ot({type:i,selectors:[["mat-menu"]],hostVars:3,hostBindings:function(e,n){2&e&&Dt("aria-label",null)("aria-labelledby",null)("aria-describedby",null)},exportAs:["matMenu"],features:[Dn([{provide:xO,useExisting:i}]),lt],ngContentSelectors:ume,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&&(sr(),fe(0,dme,3,6,"ng-template"))},dependencies:[hm],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:[tE.transformMenu,tE.fadeInItems]},changeDetection:0}),i})();const x$=new me("mat-menu-scroll-strategy"),vme={provide:x$,deps:[as],useFactory:function _me(i){return()=>i.scrollStrategies.reposition()}},w$=Oh({passive:!0});let yme=(()=>{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,d){this._overlay=e,this._element=n,this._viewContainerRef=r,this._menuItemInstance=a,this._dir=l,this._focusMonitor=c,this._ngZone=d,this._overlayRef=null,this._menuOpen=!1,this._closingActionsSubscription=Zt.EMPTY,this._hoverSubscription=Zt.EMPTY,this._menuCloseSubscription=Zt.EMPTY,this._changeDetectorRef=Ft(Zn),this._handleTouchStart=h=>{qI(h)||(this._openedBy="touch")},this._openedBy=void 0,this.restoreFocus=!0,this.menuOpened=new We,this.onMenuOpen=this.menuOpened,this.menuClosed=new We,this.onMenuClose=this.menuClosed,this._scrollStrategy=s,this._parentMaterialMenu=o instanceof e0?o:void 0,n.nativeElement.addEventListener("touchstart",this._handleTouchStart,w$)}ngAfterContentInit(){this._handleHover()}ngOnDestroy(){this._overlayRef&&(this._overlayRef.dispose(),this._overlayRef=null),this._element.nativeElement.removeEventListener("touchstart",this._handleTouchStart,w$),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 e0&&(e._startAnimation(),e._directDescendantItems.changes.pipe(He(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 e0?(n._resetAnimation(),n.lazyContent?n._animationDone.pipe(gn(r=>"void"===r.toState),Oi(1),He(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],[d,h]=[r,s],p=0;if(this.triggersSubmenu()){if(h=r="before"===e.xPosition?"start":"end",s=d="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:d,overlayY:o,offsetY:p},{originX:s,originY:l,overlayX:h,overlayY:o,offsetY:p},{originX:r,originY:c,overlayX:d,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 Mr(e,this._parentMaterialMenu?this._parentMaterialMenu.closed:ht(),this._parentMaterialMenu?this._parentMaterialMenu._hovered().pipe(gn(o=>o!==this._menuItemInstance),gn(()=>this._menuOpen)):ht(),n)}_handleMousedown(e){YI(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(gn(e=>e===this._menuItemInstance&&!e.disabled),y$(0,PI)).subscribe(()=>{this._openedBy="mouse",this.menu instanceof e0&&this.menu._isAnimating?this.menu._animationDone.pipe(Oi(1),y$(0,PI),He(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)(E(as),E(mt),E(Wr),E(x$),E(xO,8),E(eE,10),E(Ia,8),E(qc),E(ft))},i.\u0275dir=ve({type:i,hostVars:3,hostBindings:function(e,n){1&e&&Ue("click",function(s){return n._handleClick(s)})("mousedown",function(s){return n._handleMousedown(s)})("keydown",function(s){return n._handleKeydown(s)}),2&e&&Dt("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})(),bme=(()=>{class i extends yme{}return i.\u0275fac=function(){let t;return function(n){return(t||(t=ri(i)))(n||i)}}(),i.\u0275dir=ve({type:i,selectors:[["","mat-menu-trigger-for",""],["","matMenuTriggerFor",""]],hostAttrs:[1,"mat-mdc-menu-trigger"],exportAs:["matMenuTrigger"],features:[lt]}),i})(),xme=(()=>{class i{}return i.\u0275fac=function(e){return new(e||i)},i.\u0275mod=nn({type:i}),i.\u0275inj=Kt({providers:[vme],imports:[Eo,eb,Qn,Pm,Xy,Qn]}),i})();function wme(i,t){if(1&i){const e=di();W(0,"button",7),Ue("click",function(){return an(e),zt(he(2).deserialize())}),De(1,"mat-icon",8),j()}}function Mme(i,t){if(1&i){const e=di();Gr(0),fe(1,wme,2,0,"button",4),W(2,"button",5),Ue("click",function(){return an(e),zt(he().serializeBlockReversible())}),De(3,"mat-icon",6),j(),$r()}if(2&i){const e=he();G(1),U("ngIf",e.isInReversibleSerializationState),G(1),U("disabled",e.isInReversibleSerializationState)}}function Cme(i,t){1&i&&(W(0,"button",9),De(1,"mat-icon",10),j()),2&i&&(he(),U("matMenuTriggerFor",Zi(3)))}function Sme(i,t){if(1&i){const e=di();W(0,"button",11),Ue("click",function(){const s=an(e).$implicit;return zt(he().runCustomAction(s))}),W(1,"span"),Ve(2),j()()}if(2&i){const e=t.$implicit;G(2),_i(e.title)}}const Eme=function(){return[]};let nE=(()=>{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 tt(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)(E(ka),E(Ql),E(Zn),E(Bm),E(IV))},i.\u0275cmp=ot({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&&(fe(0,Mme,4,2,"ng-container",0),fe(1,Cme,2,1,"button",1),W(2,"mat-menu",null,2),fe(4,Sme,3,1,"button",3),j()),2&e&&(U("ngIf",null==n.resource||null==n.resource.schema?null:n.resource.schema.serializable_to_disc),G(1),U("ngIf",(null==n.resource||null==n.resource.schema.custom_actions?null:n.resource.schema.custom_actions.length)>0),G(3),U("ngForOf",(null==n.resource?null:n.resource.schema.custom_actions)||so(3,Eme)))},dependencies:[So,vi,Os,XM,gR,gme,eE,bme],styles:["[_nghost-%COMP%]{display:flex}"]}),i})();const Ame=["class","block-ui"];function Dme(i,t){if(1&i&&(W(0,"mat-label",7),Ve(1),j()),2&i){const e=he();U("matTooltip",e.resourceDescription),G(1),Qi("",null==e.resource?null:e.resource.name," ")}}function Tme(i,t){if(1&i&&(W(0,"audio",8),De(1,"source",9),Ct(2,"async"),Ve(3," Your browser does not support the audio element. "),j()),2&i){const e=he();G(1),U("src",Tt(2,1,e.audioUrl$),Lp)}}function Ime(i,t){1&i&&De(0,"mat-spinner",10)}function Rme(i,t){1&i&&De(0,"app-block-actions",11),2&i&&U("resource",he().resource)}const kme=function(){return["wave_data"]};let Pme=(()=>{class i{constructor(e,n){this.eelDelegate=e,this.main=n,this._resource$=new gt(null),this.audioUrl$=new gt(null),this.resourceDescription="",this.hideBlockActions=!1,this.destroyed$=new Re,this.changed=new We}set resource(e){this._resource$.next(e)}get resource(){return this._resource$.getValue()}ngAfterViewInit(){var e=this;return tt(function*(){e._resource$.pipe(He(e.destroyed$)).subscribe(function(){var n=tt(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)(E(Ql),E(ka))},i.\u0275cmp=ot({type:i,selectors:[["app-eacs-audio",8,"block-ui"]],inputs:{resource:"resource",resourceDescription:"resourceDescription",hideBlockActions:"hideBlockActions"},outputs:{changed:"changed"},attrs:Ame,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&&(W(0,"div",0),fe(1,Dme,2,2,"mat-label",1),Ct(2,"async"),fe(3,Tme,4,3,"audio",2),Ct(4,"async"),fe(5,Ime,1,0,"mat-spinner",3),Ct(6,"async"),De(7,"div",4),fe(8,Rme,1,1,"app-block-actions",5),j(),De(9,"app-compound-block-ui",6),Ct(10,"async")),2&e){let r;G(1),U("ngIf",(null==n.resource?null:n.resource.name)&&(null==n.resource?null:n.resource.name)!=(null==(r=Tt(2,7,n.main.resource$))?null:r.name)),G(2),U("ngIf",Tt(4,9,n.audioUrl$)),G(2),U("ngIf",n.resource&&!Tt(6,11,n.audioUrl$)),G(3),U("ngIf",!n.hideBlockActions),G(1),U("resource",Tt(10,13,n._resource$))("hideBlockActions",!0)("fieldBlacklist",so(15,kme))}},dependencies:[vi,To,Os,Jb,Jl,nE,pl],styles:["#header[_ngcontent-%COMP%]{display:flex}"]}),i})();class Ome{constructor(t,e){this.mesh=t,this.assetsPath=e,this.textures=[],this.tyreTextureUpdateTimer=void 0,this.tyreMaterial=null,this.tyreTextures=[],this._color=65280,this._speed="idle",this._steeringAngle=0,this.wheels=[],this.wheelIdlePositions=[],this.frontWheels=[];let n=new Set;if(t.traverse(r=>{if(!(r instanceof Mn))return;let s=-1;if(r.name.startsWith("part_hp_12")?s=0:r.name.startsWith("part_hp_14")?s=1:r.name.startsWith("part_hp_16")?s=2:r.name.startsWith("part_hp_18")&&(s=3),s>-1){r.geometry.boundingBox||r.geometry.computeBoundingBox();let a=Pe.avg(r.geometry.boundingBox.min,r.geometry.boundingBox.max);return(0==s||2==s)&&(a={x:a.x,y:a.y,z:a.z+1.5}),r.geometry.translate(...Pe.spr(Pe.neg(a))),r.position.set(...Pe.spr(a)),this.wheelIdlePositions[s]=a,this.wheels.push(r),void(s<2&&this.frontWheels.push(r))}const o=r.material.map;o&&n.add(o)}),this.textures=Array.from(n).map(r=>{const s=new ko(document.createElement("img"));return s.flipY=r.flipY,ia(s),[r,s]}),t.traverse(r=>{if(!(r instanceof Mn))return;const s=r.material.map;if(s){const o=this.textures.find(([a,l])=>a===s);o&&(r.material.map=o[1])}}),this.hasWheels){const r=new Pu;this.tyreTextures=[0,1,2,3].map(s=>r.load(`${e}/m${s}00.png`));for(const s of this.tyreTextures)ia(s);this.tyreMaterial=new qi({map:this.tyreTextures[0]}),this.tyreMaterial.transparent=!0,this.tyreMaterial.alphaTest=.5,this.tyreMaterial.map.wrapS=Ii,this.tyreMaterial.map.wrapT=Ii,this.tyreMaterial.polygonOffset=!0,this.tyreMaterial.polygonOffsetFactor=-4;for(const s of this.wheels)s.material=this.tyreMaterial}this.color=65280,this.recolorCar().then()}get color(){return this._color}set color(t){t!==this._color&&(this._color=t,this.recolorCar().then())}get speed(){return this._speed}set speed(t){if(t!==this._speed){switch(this._speed=t,this.tyreTextureUpdateTimer&&clearInterval(this.tyreTextureUpdateTimer),t){case"idle":this.tyreMaterial.map=this.tyreTextures[0];break;case"slow":let e=!0;this.tyreTextureUpdateTimer=setInterval(()=>{this.tyreMaterial.map=this.tyreTextures[e?1:2],this.tyreMaterial.needsUpdate=!0,e=!e},16);break;case"fast":this.tyreMaterial.map=this.tyreTextures[3]}this.tyreMaterial.needsUpdate=!0}}get steeringAngle(){return this._steeringAngle}set steeringAngle(t){if(t!==this._steeringAngle){this._steeringAngle=t;for(const e of this.frontWheels)e.rotation.set(0,0,t)}}get hasWheels(){return this.wheels.length>0}recolorCar(){var t=this;return tt(function*(){const[e,n,r]=[t.color>>16,t.color>>8&255,255&t.color];for(const[s,o]of t.textures){for(let a=100;a>0&&!s.source.data;a--)yield p$(50);m$(s.source.data,(a,l)=>{if(a[l]+a[l+2]{class i{constructor(e,n,r){this.eelDelegate=e,this.main=n,this.cdr=r,this._resource$=new gt(null),this.changed=new We,this.customControls=[],this.previewPaths$=new gt(null),this.destroyed$=new Re,this.serializerSettings={geometry__save_obj:!0,geometry__save_blend:!1,geometry__export_to_gg_web_engine:!1}}get resource(){return this._resource$.getValue()}set resource(e){this._resource$.next(e)}ngAfterViewInit(){var e=this;return tt(function*(){e._resource$.pipe(He(e.destroyed$)).subscribe(function(){var n=tt(function*(r){e.previewPaths$.next(yield e.loadPreviewFilePaths(r?.id))});return function(r){return n.apply(this,arguments)}}()),e.main.dataBlockChange$.pipe(He(e.destroyed$),gn(([n,r])=>!!e.resource&&n.startsWith(e.resource.id)),ml(1500)).subscribe(tt(function*(){e.previewPaths$.next(null),e.previewPaths$.next(yield e.postTmpUpdates(e.resource?.id))}))})()}onObjectLoaded(e){var n=this;return tt(function*(){try{const r=new Ome(e,n.previewPaths$.value[0].substring(0,n.previewPaths$.value[0].lastIndexOf("/"))+"/assets");let s=null;const o=a=>{s&&clearTimeout(s),s=setTimeout(()=>r.color=a,50)};n.customControls=[{title:"NFS2 car features",controls:[{label:"Car color",type:"color",value:65280,change:a=>o(a)}]}],r.hasWheels&&n.customControls[0].controls.push({label:"Car speed",type:"radio",options:["idle","slow","fast"],value:"idle",change:a=>{r.speed=a}},{label:"Steering angle",type:"slider",minValue:-.7,maxValue:.7,valueStep:.05,value:0,change:a=>{r.steeringAngle=a}}),n.cdr.markForCheck()}catch(r){console.error(r)}})()}postTmpUpdates(e){var n=this;return tt(function*(){if(e){const r=yield n.eelDelegate.serializeResourceTmp(e,Object.entries(n.main.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 tt(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)(E(Ql),E(ka),E(Zn))},i.\u0275cmp=ot({type:i,selectors:[["app-geo-geometry",8,"block-ui"]],inputs:{resource:"resource"},outputs:{changed:"changed"},attrs:Fme,decls:4,vars:8,consts:[[3,"paths","groupFunction","customControls","onObjectLoaded"],[3,"resource",4,"ngIf"],[3,"resource"]],template:function(e,n){1&e&&(W(0,"app-obj-viewer",0),Ue("onObjectLoaded",function(s){return n.onObjectLoaded(s)}),Ct(1,"async"),j(),fe(2,Lme,2,3,"app-compound-block-ui",1),Ct(3,"async")),2&e&&(U("paths",Tt(1,4,n.previewPaths$))("groupFunction",n.previewObjectGroupFunc)("customControls",n.customControls),G(2),U("ngIf",!Tt(3,6,n.main.hideHiddenFields$)))},dependencies:[vi,Jl,h$,pl],changeDetection:0}),i})();const Bme=function(){return["children","items_descr"]};let Ume=(()=>{class i{constructor(){this._resource=null,this.hideBlockActions=!1,this.resourceMap={},this.changed=new We}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:rc(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=ot({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&&De(0,"app-compound-block-ui",0)(1,"app-sidenav-res-list",1),2&e&&(U("resource",n.resource)("hideBlockActions",n.hideBlockActions)("fieldBlacklist",so(4,Bme)),G(1),U("resources",n.resourceMap))},dependencies:[Jl,xC],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})();const Vme=["previewCanvasContainer"],zme=["previewCanvas"];function Hme(i,t){1&i&&De(0,"mat-spinner",16),2&i&&U("diameter",40)}function Gme(i,t){1&i&&De(0,"mat-spinner",17)}var Df=(()=>{return(i=Df||(Df={})).ThreeModel="model",i.Bitmap="bitmap",i.TwoSidedBitmap="two_sided_bitmap",Df;var i})();class $me extends QH{constructor(t,e,n){super(t,{loadDepth:40,inertia:2}),this.mapGraph=t,this.qfsPath=e,this.hideUnknownEntities$=n,this.textureLoader=new Pu,this.terrainMaterials={},this.objLoader=new Qb,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(Zl(),He(this._onRemoved$)).subscribe(e=>{for(const n of this.unknownEntities)n.visible=!e})}getPlaceholderTexture(){var t=this;return tt(function*(){return t._placeholder?t._placeholder:(t._placeholderPromise||(t._placeholderPromise=t.textureLoader.loadAsync("assets/placeholder_texture.png")),t._placeholderPromise)})()}getPlaceholderTerrainTexture(){var t=this;return tt(function*(){return t._placeholderTerrain?t._placeholderTerrain:(t._placeholderTerrainPromise||(t._placeholderTerrainPromise=t.textureLoader.loadAsync("assets/placeholder_texture.png").then(e=>(e.wrapS=Pa,e.wrapT=Ii,ia(e),e.flipY=!0,e))),t._placeholderTerrainPromise)})()}loadChunk(t){var e=this;return tt(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 Mn&&(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:Pe.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:Yi.fromAngle(Pe.nZ,l.rotation)}));const o=(yield Promise.all(s.map(l=>e.loadPropInternal(l)))).filter(l=>!!l),a=new Zo({object3D:new na(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 qi({side:Ls,transparent:!0,visible:!1}),this.qfsPath?this.textureLoader.loadAsync(`${this.qfsPath}/${t}.png`).then(e=>{e.wrapS=Pa,e.wrapT=Ii,ia(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 tt(function*(){let n=!1;if(t.type==Df.ThreeModel){let r;try{if(!e.qfsPath)throw new Error;const o=new bO,a=new Qb,l=yield o.loadAsync(`${e.qfsPath}/props/${t.data.data.resource_id}/0/material.mtl`);l.preload(),a.setMaterials(l),r=new na(yield a.loadAsync(`${e.qfsPath}/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 Mn){const a=o.material instanceof Array?o.material:[o.material];for(const l of a)l.transparent=!0,l.alphaTest=.5,l instanceof qi&&l.map&&(l.map.wrapS=Ii,l.map.wrapT=Ii,ia(l.map),l.map.needsUpdate=!0)}});const s=new Zo({object3D: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,d)=>new Array(d).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 Fo,[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,d]=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 Zo({object3D:new na(s)});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 tt(function*(){const s=t.split(";"),o=yield r.getPlaceholderTexture();let a=!1,l=[];r.qfsPath?l=yield Promise.all(s.map(h=>r.textureLoader.loadAsync(`${r.qfsPath}/foreground/${h}.png`).catch(()=>(a=!0,o)))):(a=!0,l=s.map(()=>o));const c=l.map(h=>(ia(h),new qi({map:h,alphaTest:.5,transparent:!0,side:Ls}))),d=new Mn(new Iu(e.x,e.y),c[0]);if(d.rotateX(Math.PI/2),d.position.set(0,0,e.y/2),c.length>1){let h=-1;Ym(r.world).pipe(o4(n&&!isNaN(+n)?1e3*+n:250)).subscribe(()=>{h=(h+1)%c.length,d.material=c[h]})}return[d,a]})()}}let Wme=(()=>{class i{constructor(e,n,r){this.eelDelegate=e,this.cdr=n,this.mainService=r,this._resource$=new gt(null),this.changed=new We,this.previewLoading$=new gt(!0),this.previewQfsLocation$=new gt(null),this.previewQfsLoading$=new gt(!1),this.pointer$=new gt(null),this.selectedSplineIndex$=new gt(0),this.qfsPath=null,this.name="",this.renderer=null,this.map=null,this.roadPath=null,this.destroyed$=new Re}get resource(){return this._resource$.getValue()}set resource(e){this._resource$.next(e)}get roadSpline(){return this.resource?.data.block_positions||[]}ngAfterViewInit(){var e=this;return tt(function*(){var s;e.world=new sk(new vO,{init:(s=tt(function*(){}),function(){return s.apply(this,arguments)}),simulate:()=>{},loader:{loadFromGgGlb:function(){var s=tt(function*(...o){return[]});return function(){return s.apply(this,arguments)}}()}}),yield e.world.init(),e.skySphere=new Zo({object3D:e.world.visualScene.factory.createPrimitive({shape:"SPHERE",radius:1e3},{color:16777215})}),e.skySphere.object3D.nativeMesh.material.side=Ls,e.world.addEntity(e.skySphere),e.selectionSphere=new Zo({object3D: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 $S(16777215,2));let n=new gt({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=Yi.lookAt(e.renderer.camera.position,Pe.add(e.renderer.camera.position,Pe.Y),Pe.Z),Ym(e.world).pipe(He(e.destroyed$)).subscribe(()=>{e.renderer&&(e.skySphere.position=e.renderer.camera.position,e.pointer$.next(e.renderer.camera.position))}),e.controller=new n4(e.world.keyboardInput,e.renderer,{mouseOptions:{canvas:e.previewCanvas.nativeElement,pointerLock:!0},keymap:"wasd+arrows",cameraLinearSpeed:40,cameraBoostMultiplier:4,cameraMovementElasticity:100,cameraRotationElasticity:30,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(He(e.destroyed$)).subscribe(function(){var s=tt(function*(o){e.previewLoading$.next(!0),o?(e.previewQfsLocation$.next(o.id.substring(0,o.id.indexOf(".TRK"))+"0.QFS"),yield e.loadTerrainChunks(o.id),yield e.onQfsSelected(e.previewQfsLocation$.value)):(yield e.loadTerrainChunks(),yield e.loadPreview()),e.previewLoading$.next(!1)});return function(o){return s.apply(this,arguments)}}()),e.mainService.dataBlockChange$.pipe(He(e.destroyed$),gn(([s,o])=>!!e.resource&&s.startsWith(e.resource.id)),ml(3e3)).subscribe(tt(function*(){e.previewLoading$.next(!0),yield e.postTmpUpdates(e.resource?.id),yield e.loadPreview(),e.previewLoading$.next(!1)})),e.selectedSplineIndex$.pipe(He(e.destroyed$),ml(250)).subscribe(s=>{if(e.resource){let o=e.resource.data.block_positions[s];if(!o)return;o={x:o.x,y:o.z,z:o.y},e.selectionSphere.position=o,e.renderer&&(e.renderer.position=Pe.add(o,Pe.rotAround({x:10,y:-12,z:5},{x:0,y:0,z:1},-0)),e.renderer.rotation=Yi.lookAt(e.renderer.position,o,{x:0,y:0,z:1}),e.controller.reset())}})})()}onQfsSelected(e){var n=this;return tt(function*(){if(n.qfsPath!=e){n.previewQfsLoading$.next(!0);try{const r=yield n.eelDelegate.serializeResource(e),s=new Pu,o=r.find(a=>a.endsWith("spherical.png"));if(o){const a=yield s.loadAsync(o);a.colorSpace="srgb",a.mapping=lc,n.skySphere.object3D.nativeMesh.material.map=a}else n.skySphere.object3D.nativeMesh.material.map=null;n.skySphere.object3D.nativeMesh.material.needsUpdate=!0,n.qfsPath=e}catch{n.skySphere.object3D.nativeMesh.material.map=null,n.skySphere.object3D.nativeMesh.material.needsUpdate=!0,n.qfsPath=null}finally{n.previewQfsLoading$.next(!1)}yield n.loadPreview()}})()}loadTerrainChunks(e){var n=this;return tt(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 tt(function*(){if(e.roadPath=e.resource?.data.block_positions.map(r=>({x:r.x,y:r.z,z:r.y})),!e.terrainChunksObjLocation||!e.roadPath)return;const n=Km.fromMapArray(e.roadPath.map((r,s)=>({path:`${e.terrainChunksObjLocation}terrain_chunk_${s}`,position:r,loadOptions:{}}))||[],!0);e.unloadPreview(),e.map=new $me(n,e.qfsPath&&"resources/"+e.qfsPath,e.mainService.hideHiddenFields$),e.map.resource=e.resource,e.map.isOpenedTrack=!1,Ym(e.world).pipe(He(e.destroyed$)).subscribe(()=>{e.map&&e.renderer&&e.map.loaderCursor$.next(e.renderer.position)}),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 tt(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)(E(Ql),E(Zn),E(ka))},i.\u0275cmp=ot({type:i,selectors:[["app-trk-map-block-ui"]],viewQuery:function(e,n){if(1&e&&(Wn(Vme,5),Wn(zme,5)),2&e){let r;Et(r=At())&&(n.previewCanvasContainer=r.first),Et(r=At())&&(n.previewCanvas=r.first)}},inputs:{resource:"resource"},outputs:{changed:"changed"},decls:32,vars:24,consts:[[1,"qfsSelector"],["appearance","fill"],["matInput","","type","text",3,"value"],["customQfsInput",""],["mat-button","",3,"click"],["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"],["mode","indeterminate",3,"diameter"],["mode","indeterminate"]],template:function(e,n){if(1&e){const r=di();W(0,"div",0)(1,"h4"),Ve(2,"Preview QFS file"),j(),W(3,"mat-form-field",1)(4,"mat-label"),Ve(5,"Custom QFS path"),j(),De(6,"input",2,3),Ct(8,"async"),j(),W(9,"button",4),Ue("click",function(){an(r);const o=Zi(7);return zt(n.onQfsSelected(o.value))}),Ve(10,"LOAD"),j(),fe(11,Hme,1,1,"mat-spinner",5),Ct(12,"async"),j(),W(13,"div",6)(14,"div",7,8),De(16,"canvas",9,10),fe(18,Gme,1,0,"mat-spinner",11),Ct(19,"async"),j(),W(20,"div",12,8)(22,"mat-form-field",1)(23,"mat-label"),Ve(24,"Spline item"),j(),W(25,"input",13),Ue("ngModelChange",function(o){return n.selectedSplineIndex$.next(o)}),Ct(26,"async"),Ct(27,"async"),j()(),De(28,"app-tri-minimap",14),Ct(29,"async"),j()(),De(30,"app-compound-block-ui",15),Ct(31,"async")}if(2&e){let r;G(6),U("value",Tt(8,10,n.previewQfsLocation$)),G(5),U("ngIf",Tt(12,12,n.previewQfsLoading$)),G(7),U("ngIf",Tt(19,14,n.previewLoading$)),G(7),U("min",0)("max",4*(null==(r=Tt(26,16,n._resource$))?null:r.data.num_blocks)-1)("ngModel",Tt(27,18,n.selectedSplineIndex$)),G(3),U("roadSpline",n.roadSpline)("pointer",Tt(29,20,n.pointer$))("splineClosed",!0),G(2),U("resource",Tt(31,22,n._resource$))}},dependencies:[vi,gl,mu,tc,_u,gu,Kc,vl,To,ic,ib,Jb,Jl,f$,pl],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}.qfsSelector[_ngcontent-%COMP%]{display:flex;align-items:center;width:100%;column-gap:1rem}.qfsSelector[_ngcontent-%COMP%] h4[_ngcontent-%COMP%]{min-width:-moz-fit-content;min-width:fit-content}.qfsSelector[_ngcontent-%COMP%] mat-form-field[_ngcontent-%COMP%]{flex-grow:1}.qfsSelector[_ngcontent-%COMP%] mat-spinner[_ngcontent-%COMP%], .qfsSelector[_ngcontent-%COMP%] button[_ngcontent-%COMP%]{margin-bottom:1.34375em}"],changeDetection:0}),i})();function jme(i,t){if(1&i&&(W(0,"mat-error"),Ve(1),j()),2&i){const e=he(2);G(1),tm(" ",e.resourceError.data.error_class,": ",e.resourceError.data.error_text," ")}}function Yme(i,t){1&i&&De(0,"mat-spinner",5)}function qme(i,t){if(1&i&&(W(0,"div",2),fe(1,jme,2,2,"mat-error",3),fe(2,Yme,1,0,"mat-spinner",4),j()),2&i){const e=he();G(1),U("ngIf",e.resourceError),G(1),U("ngIf",!e.resourceError)}}function Xme(i,t){}let t0=(()=>{class i{constructor(e){this.mainService=e,this._component=null,this._componentChangedSub=null,this.destroyed$=new Re,this.resourceSet$=new Re,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(He(this.destroyed$),He(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 Kme(i,t){1&i&&De(0,"mat-icon",17)}function Zme(i,t){1&i&&De(0,"mat-icon",18)}let Qme=(()=>{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 tt(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 tt(function*(){if(e.mainService.hasUnsavedChanges){let n=e.dialog.open(CV,{data:{text:"There are unsaved changes, which will be lost. Are you sure you want to reload file?"}});if(!(yield lR(n.afterClosed())))return}yield e.mainService.reloadResource(),e.cdr.markForCheck()})()}}return i.\u0275fac=function(e){return new(e||i)(E(Ql),E(ka),E(Bm),E(IV),E(Zn))},i.\u0275cmp=ot({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&&(W(0,"mat-toolbar",0)(1,"span"),Ve(2),Ct(3,"async"),Ct(4,"async"),j(),De(5,"span",1),W(6,"button",2),Ue("click",function(){return n.toggleUnknownsVisibility()}),fe(7,Kme,1,0,"mat-icon",3),Ct(8,"async"),fe(9,Zme,1,0,"mat-icon",4),Ct(10,"async"),j(),De(11,"mat-divider",5)(12,"app-block-actions",6),Ct(13,"async"),W(14,"button",7),Ue("click",function(){return n.reloadResource()}),Ct(15,"async"),De(16,"mat-icon",8),j(),De(17,"mat-divider",5),W(18,"button",9),Ue("click",function(){return n.saveResource()}),Ct(19,"async"),Ct(20,"async"),De(21,"mat-icon",10),j()(),W(22,"div",11),De(23,"div",12)(24,"app-editor",13),Ct(25,"async"),Ct(26,"async"),Ct(27,"async"),W(28,"div",14)(29,"a",15),De(30,"img",16),j()(),De(31,"div",12),j()),2&e){let r;G(2),tm("",(null==(r=Tt(3,9,n.mainService.resource$))?null:r.name)||"...","",Tt(4,11,n.mainService.hasUnsavedChanges$)?"*":"",""),G(5),U("ngIf",Tt(8,13,n.mainService.hideHiddenFields$)),G(2),U("ngIf",!Tt(10,15,n.mainService.hideHiddenFields$)),G(3),U("resource",Tt(13,17,n.mainService.resource$)),G(2),U("disabled",!Tt(15,19,n.mainService.eelDelegate.openedResourcePath$)),G(4),U("disabled",!Tt(19,21,n.mainService.resource$)||!Tt(20,23,n.mainService.hasUnsavedChanges$)),G(6),U("resource",Tt(25,25,n.mainService.customActionRunning$)?null:Tt(26,27,n.mainService.resource$)||Tt(27,29,n.mainService.error$))("hideBlockActions",!0)}},dependencies:[vi,CJ,EJ,Os,XM,gR,t0,nE,pl],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 M$(i){return new pe(3e3,!1)}function Pge(){return typeof window<"u"&&typeof window.document<"u"}function wO(){return typeof process<"u"&&"[object process]"==={}.toString.call(process)}function Nu(i){switch(i.length){case 0:return new tb;case 1:return i[0];default:return new oV(i)}}function C$(i,t,e,n,r=new Map,s=new Map){const o=[],a=[];let l=-1,c=null;if(n.forEach(d=>{const h=d.get("offset"),p=h==l,m=p&&c||new Map;d.forEach((g,b)=>{let v=b,y=g;if("offset"!==b)switch(v=t.normalizePropertyName(v,o),y){case rR:y=r.get(b);break;case Xc: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 xge(i){return new pe(3502,!1)}();return a}function MO(i,t,e,n){switch(t){case"start":i.onStart(()=>n(e&&CO(e,"start",i)));break;case"done":i.onDone(()=>n(e&&CO(e,"done",i)));break;case"destroy":i.onDestroy(()=>n(e&&CO(e,"destroy",i)))}}function CO(i,t,e){const s=SO(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 SO(i,t,e,n,r="",s=0,o){return{element:i,triggerName:t,fromState:e,toState:n,phaseName:r,totalTime:s,disabled:!!o}}function ra(i,t,e){let n=i.get(t);return n||i.set(t,n=e),n}function S$(i){const t=i.indexOf(":");return[i.substring(1,t),i.slice(t+1)]}let EO=(i,t)=>!1,E$=(i,t,e)=>[],A$=null;function AO(i){const t=i.parentNode||i.host;return t===A$?null:t}(wO()||typeof Element<"u")&&(Pge()?(A$=(()=>document.documentElement)(),EO=(i,t)=>{for(;t;){if(t===i)return!0;t=AO(t)}return!1}):EO=(i,t)=>i.contains(t),E$=(i,t,e)=>{if(e)return Array.from(i.querySelectorAll(t));const n=i.querySelector(t);return n?[n]:[]});let Tf=null,D$=!1;const T$=EO,I$=E$;let R$=(()=>{class i{validateStyleProperty(e){return function Fge(i){Tf||(Tf=function Lge(){return typeof document<"u"?document.body:null}()||{},D$=!!Tf.style&&"WebkitAppearance"in Tf.style);let t=!0;return Tf.style&&!function Oge(i){return"ebkit"==i.substring(1,6)}(i)&&(t=i in Tf.style,!t&&D$&&(t="Webkit"+i.charAt(0).toUpperCase()+i.slice(1)in Tf.style)),t}(e)}matchesElement(e,n){return!1}containsElement(e,n){return T$(e,n)}getParentElement(e){return AO(e)}query(e,n,r){return I$(e,n,r)}computeStyle(e,n,r){return r||""}animate(e,n,r,s,o,a=[],l){return new tb(r,s)}}return i.\u0275fac=function(e){return new(e||i)},i.\u0275prov=ke({token:i,factory:i.\u0275fac}),i})(),DO=(()=>{class i{}return i.NOOP=new R$,i})();const Nge=1e3,TO="ng-enter",iE="ng-leave",rE="ng-trigger",sE=".ng-trigger",P$="ng-animating",IO=".ng-animating";function hd(i){if("number"==typeof i)return i;const t=i.match(/^(-?[\.\d]+)(m?s)/);return!t||t.length<2?0:RO(parseFloat(t[1]),t[2])}function RO(i,t){return"s"===t?i*Nge:i}function oE(i,t,e){return i.hasOwnProperty("duration")?i:function Uge(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(M$()),{duration:0,delay:0,easing:""};r=RO(parseFloat(a[1]),a[2]);const l=a[3];null!=l&&(s=RO(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 Jme(){return new pe(3100,!1)}()),a=!0),s<0&&(t.push(function ege(){return new pe(3101,!1)}()),a=!0),a&&t.splice(l,0,M$())}return{duration:r,delay:s,easing:o}}(i,t,e)}function n0(i,t={}){return Object.keys(i).forEach(e=>{t[e]=i[e]}),t}function O$(i){const t=new Map;return Object.keys(i).forEach(e=>{t.set(e,i[e])}),t}function Bu(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 L$(i,t,e){return e?t+":"+e+";":""}function N$(i){let t="";for(let e=0;e{const s=PO(r);e&&!e.has(r)&&e.set(r,i.style[s]),i.style[s]=n}),wO()&&N$(i))}function If(i,t){i.style&&(t.forEach((e,n)=>{const r=PO(n);i.style[r]=""}),wO()&&N$(i))}function r0(i){return Array.isArray(i)?1==i.length?i[0]:iV(i):i}const kO=new RegExp("{{\\s*(.+?)\\s*}}","g");function B$(i){let t=[];if("string"==typeof i){let e;for(;e=kO.exec(i);)t.push(e[1]);kO.lastIndex=0}return t}function s0(i,t,e){const n=i.toString(),r=n.replace(kO,(s,o)=>{let a=t[o];return null==a&&(e.push(function nge(i){return new pe(3003,!1)}()),a=""),a.toString()});return r==n?i:r}function aE(i){const t=[];let e=i.next();for(;!e.done;)t.push(e.value),e=i.next();return t}const Hge=/-+([a-z0-9])/g;function PO(i){return i.replace(Hge,(...t)=>t[1].toUpperCase())}function Gge(i){return i.replace(/([a-z])([A-Z])/g,"$1-$2").toLowerCase()}function sa(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 ige(i){return new pe(3004,!1)}()}}function U$(i,t){return window.getComputedStyle(i)[t]}const dE="*";function Xge(i,t){const e=[];return"string"==typeof i?i.split(/\s*,\s*/).forEach(n=>function Kge(i,t,e){if(":"==i[0]){const l=function Zge(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 gge(i){return new pe(3015,!1)}()),t;const r=n[1],s=n[2],o=n[3];t.push(V$(r,o));"<"==s[0]&&!(r==dE&&o==dE)&&t.push(V$(o,r))}(n,e,t)):e.push(i),e}const uE=new Set(["true","1"]),hE=new Set(["false","0"]);function V$(i,t){const e=uE.has(i)||hE.has(i),n=uE.has(t)||hE.has(t);return(r,s)=>{let o=i==dE||i==r,a=t==dE||t==s;return!o&&e&&"boolean"==typeof r&&(o=r?uE.has(i):hE.has(i)),!a&&n&&"boolean"==typeof s&&(a=s?uE.has(t):hE.has(t)),o&&a}}const Qge=new RegExp("s*:selfs*,?","g");function OO(i,t,e,n){return new Jge(i).build(t,e,n)}class Jge{constructor(t){this._driver=t}build(t,e,n){const r=new n_e(e);return this._resetContextStyleTimingState(r),sa(this,r0(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 sge(){return new pe(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(d=>{l.name=d,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 oge(){return new pe(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=>{B$(l).forEach(c=>{o.hasOwnProperty(c)||s.add(c)})})}),s.size&&(aE(s.values()),e.errors.push(function age(i,t){return new pe(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=sa(this,r0(t.animation),e);return{type:1,matchers:Xge(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=>sa(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=sa(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 r_e(i,t){if(i.hasOwnProperty("duration"))return i;if("number"==typeof i)return FO(oE(i,t).duration,0,"");const e=i;if(e.split(/\s+/).some(s=>"{"==s.charAt(0)&&"{"==s.charAt(1))){const s=FO(0,0,"");return s.dynamic=!0,s.strValue=e,s}const r=oE(e,t);return FO(r.duration,r.delay,r.easing)}(t.timings,e.errors);e.currentAnimateTimings=n;let r,s=t.styles?t.styles:si({});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=si(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===Xc?n.push(a):e.errors.push(new pe(3002,!1)):n.push(O$(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),d=c.get(l);let h=!0;d&&(s!=r&&s>=d.startTime&&r<=d.endTime&&(e.errors.push(function cge(i,t,e,n,r){return new pe(3010,!1)}()),h=!1),s=d.startTime),h&&c.set(l,{startTime:s,endTime:r}),e.options&&function zge(i,t,e){const n=t.params||{},r=B$(i);r.length&&r.forEach(s=>{n.hasOwnProperty(s)||e.push(function tge(i){return new pe(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 dge(){return new pe(3011,!1)}()),n;let s=0;const o=[];let a=!1,l=!1,c=0;const d=t.steps.map(y=>{const M=this._makeStyleAst(y,e);let x=null!=M.offset?M.offset:function i_e(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:sa(this,r0(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 e_e(i){const t=!!i.split(/\s*,\s*/).find(e=>":self"==e);return t&&(i=i.replace(Qge,"")),i=i.replace(/@\*/g,sE).replace(/@\w+/g,e=>sE+"-"+e.slice(1)).replace(/:animating/g,IO),[i,t]}(t.selector);e.currentQuerySelector=n.length?n+" "+s:s,ra(e.collectedStyles,e.currentQuerySelector,new Map);const a=sa(this,r0(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 pge(){return new pe(3013,!1)}());const n="full"===t.timings?{duration:0,delay:0,easing:"full"}:oE(t.timings,e.errors,!0);return{type:12,animation:sa(this,r0(t.animation),e),timings:n,options:null}}}class n_e{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=n0(i)).params&&(i.params=function t_e(i){return i?n0(i):null}(i.params)):i={},i}function FO(i,t,e){return{duration:i,delay:t,easing:e}}function LO(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 fE{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 a_e=new RegExp(":enter","g"),c_e=new RegExp(":leave","g");function NO(i,t,e,n,r,s=new Map,o=new Map,a,l,c=[]){return(new d_e).buildKeyframes(i,t,e,n,r,s,o,a,l,c)}class d_e{buildKeyframes(t,e,n,r,s,o,a,l,c,d=[]){c=c||new fE;const h=new BO(t,e,c,r,s,d,[]);h.options=l;const p=l.delay?hd(l.delay):0;h.currentTimeline.delayNextStep(p),h.currentTimeline.setStyles([o],null,h.errors,l),sa(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()):[LO(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:hd(s0(s,r?.params??{},e.errors));n.delayNextStep(o)}}}_visitSubInstructions(t,e,n){let s=e.currentTimeline.currentTime;const o=null!=n.duration?hd(n.duration):null,a=null!=n.delay?hd(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),sa(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=pE);const o=hd(s.delay);r.delayNextStep(o)}t.steps.length&&(t.steps.forEach(o=>sa(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?hd(t.options.delay):0;t.steps.forEach(o=>{const a=e.createSubContext(t.options);s&&a.delayNextStep(s),sa(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 oE(e.params?s0(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?hd(r.delay):0;s&&(6===e.previousNode.type||0==n&&e.currentTimeline.hasCurrentStyleProperties())&&(e.currentTimeline.snapshotCurrentStyles(),e.previousNode=pE);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,d)=>{e.currentQueryIndex=d;const h=e.createSubContext(t.options,c);s&&h.delayNextStep(s),c===e.element&&(l=h.currentTimeline),sa(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 d=e.currentTimeline;l&&d.delayNextStep(l);const h=d.currentTime;sa(this,t.animation,e),e.previousNode=t,n.currentStaggerTime=r.currentTime-h+(r.startTime-n.currentTimeline.startTime)}}const pE={};class BO{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=pE,this.subContextCount=0,this.options={},this.currentQueryIndex=0,this.currentQueryTotal=0,this.currentStaggerTime=0,this.currentTimeline=l||new mE(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=hd(n.duration)),null!=n.delay&&(r.delay=hd(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]=s0(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 BO(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=pE,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 u_e(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(a_e,"."+this._enterClassName)).replace(c_e,"."+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 mge(i){return new pe(3014,!1)}()),a}}class mE{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 mE(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||Xc),this._currentKeyframe.set(e,Xc);this._currentEmptyStepKeyframe=this._currentKeyframe}setStyles(t,e,n,r){e&&this._previousKeyframe.set("easing",e);const s=r&&r.params||{},o=function h_e(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,Xc)}else Bu(r,e)}),e}(t,this._globalTimelineStyles);for(let[a,l]of o){const c=s0(l,s,n);this._pendingStyles.set(a,c),this._localTimelineStyles.has(a)||this._backFill.set(a,this._globalTimelineStyles.get(a)??Xc),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=Bu(a,new Map,this._backFill);c.forEach((d,h)=>{d===rR?t.add(h):d===Xc&&e.add(h)}),n||c.set("offset",l/this.duration),r.push(c)});const s=t.size?aE(t.values()):[],o=e.size?aE(e.values()):[];if(n){const a=r[0],l=new Map(a);a.set("offset",0),l.set("offset",1),r=[a,l]}return LO(this.element,r,s,o,this.duration,this.startTime,this.easing,!1)}}class u_e extends mE{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=Bu(t[0]);l.set("offset",0),s.push(l);const c=Bu(t[0]);c.set("offset",G$(a)),s.push(c);const d=t.length-1;for(let h=1;h<=d;h++){let p=Bu(t[h]);const m=p.get("offset");p.set("offset",G$((e+m*n)/o)),s.push(p)}n=o,e=0,r="",t=s}return LO(this.element,t,this.preStyleProps,this.postStyleProps,n,e,r,!0)}}function G$(i,t=3){const e=Math.pow(10,t-1);return Math.round(i*e)/e}class UO{}const f_e=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 p_e extends UO{normalizePropertyName(t,e){return PO(t)}normalizeStyleValue(t,e,n,r){let s="";const o=n.toString().trim();if(f_e.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 rge(i,t){return new pe(3005,!1)}())}return o+s}}function $$(i,t,e,n,r,s,o,a,l,c,d,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:d,totalTime:h,errors:p}}const VO={};class W${constructor(t,e,n){this._triggerName=t,this.ast=e,this._stateStyles=n}match(t,e,n,r){return function m_e(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,d){const h=[],p=this.ast.options&&this.ast.options.params||VO,g=this.buildStyles(n,a&&a.params||VO,h),b=l&&l.params||VO,v=this.buildStyles(r,b,h),y=new Set,M=new Map,x=new Map,C="void"===r,F={params:g_e(b,p),delay:this.ast.options?.delay},D=d?[]:NO(t,e,this.ast.animation,s,o,g,v,F,c,h);let k=0;if(D.forEach(T=>{k=Math.max(T.duration+T.delay,k)}),h.length)return $$(e,this._triggerName,n,r,C,g,v,[],[],M,x,k,h);D.forEach(T=>{const A=T.element,$=ra(M,A,new Set);T.preStyleProps.forEach(ne=>$.add(ne));const ie=ra(x,A,new Set);T.postStyleProps.forEach(ne=>ie.add(ne)),A!==e&&y.add(A)});const B=aE(y.values());return $$(e,this._triggerName,n,r,C,g,v,D,B,M,x,k)}}function g_e(i,t){const e=n0(t);for(const n in i)i.hasOwnProperty(n)&&null!=i[n]&&(e[n]=i[n]);return e}class __e{constructor(t,e,n){this.styles=t,this.defaultParams=e,this.normalizer=n}buildStyles(t,e){const n=new Map,r=n0(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=s0(o,r,e));const l=this.normalizer.normalizePropertyName(a,e);o=this.normalizer.normalizeStyleValue(a,l,o,e),n.set(a,o)})}),n}}class y_e{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 __e(r.style,r.options&&r.options.params||{},n))}),j$(this.states,"true","1"),j$(this.states,"false","0"),e.transitions.forEach(r=>{this.transitionFactories.push(new W$(t,r,this.states))}),this.fallbackTransition=function b_e(i,t,e){return new W$(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 j$(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 x_e=new fE;class w_e{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=OO(this._driver,e,n,r);if(n.length)throw function wge(i){return new pe(3503,!1)}();this._animations.set(t,s)}_buildPlayer(t,e,n){const r=t.element,s=C$(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=NO(this._driver,e,s,TO,iE,new Map,new Map,n,x_e,r),o.forEach(d=>{const h=ra(a,d.element,new Map);d.postStyleProps.forEach(p=>h.set(p,null))})):(r.push(function Mge(){return new pe(3300,!1)}()),o=[]),r.length)throw function Cge(i){return new pe(3504,!1)}();a.forEach((d,h)=>{d.forEach((p,m)=>{d.set(m,this._driver.computeStyle(h,m,Xc))})});const c=Nu(o.map(d=>{const h=a.get(d.element);return this._buildPlayer(d,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 Sge(i){return new pe(3301,!1)}();return e}listen(t,e,n,r){const s=SO(e,"","","");return MO(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 Y$="ng-animate-queued",zO="ng-animate-disabled",A_e=[],q$={namespaceId:"",setForRemoval:!1,setForMove:!1,hasAnimation:!1,removedBeforeQueried:!1},D_e={namespaceId:"",setForMove:!1,setForRemoval:!1,hasAnimation:!1,removedBeforeQueried:!0},Ua="__ng_removed";class HO{get params(){return this.options.params}constructor(t,e=""){this.namespaceId=e;const n=t&&t.hasOwnProperty("value");if(this.value=function k_e(i){return i??null}(n?t.value:t),n){const s=n0(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 o0="void",GO=new HO(o0);class T_e{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,Va(e,this._hostClassName)}listen(t,e,n,r){if(!this._triggers.has(e))throw function Ege(i,t){return new pe(3302,!1)}();if(null==n||0==n.length)throw function Age(i){return new pe(3303,!1)}();if(!function P_e(i){return"start"==i||"done"==i}(n))throw function Dge(i,t){return new pe(3400,!1)}();const s=ra(this._elementListeners,t,[]),o={name:e,phase:n,callback:r};s.push(o);const a=ra(this._engine.statesByElement,t,new Map);return a.has(e)||(Va(t,rE),Va(t,rE+"-"+e),a.set(e,GO)),()=>{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 Tge(i){return new pe(3401,!1)}();return e}trigger(t,e,n,r=!0){const s=this._getTrigger(e),o=new $O(this.id,e,t);let a=this._engine.statesByElement.get(t);a||(Va(t,rE),Va(t,rE+"-"+e),this._engine.statesByElement.set(t,a=new Map));let l=a.get(e);const c=new HO(n,this.id);if(!(n&&n.hasOwnProperty("value"))&&l&&c.absorbOptions(l.options),a.set(e,c),l||(l=GO),c.value!==o0&&l.value===c.value){if(!function L_e(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),hc(t,y)})}return}const p=ra(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||(Va(t,Y$),o.onStart(()=>{Yg(t,Y$)})),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,sE,!0);n.forEach(r=>{if(r[Ua])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 d=this.trigger(t,c,o0,r);d&&a.push(d)}}),a.length)return this._engine.markElementAsRemoved(this.id,t,!0,e,o),n&&Nu(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)||GO,d=new HO(o0),h=new $O(this.id,o,t);this._engine.totalQueuedPlayers++,this._queue.push({element:t,triggerName:o,transition:l,fromState:c,toState:d,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[Ua];(!s||s===q$)&&(n.afterFlush(()=>this.clearElementCache(t)),n.destroyInnerAnimations(t),n._onRemovalComplete(t,e))}}insertNode(t,e){Va(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=SO(s,n.triggerName,n.fromState.value,n.toState.value);l._data=t,MO(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 I_e{_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 T_e(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(gE(e)){const s=this._fetchNamespace(t);if(s)return s.trigger(e,n,r),!0}return!1}insertNode(t,e,n,r){if(!gE(e))return;const s=e[Ua];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),Va(t,zO)):this.disabledNodes.has(t)&&(this.disabledNodes.delete(t),Yg(t,zO))}removeNode(t,e,n,r){if(gE(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[Ua]={namespaceId:t,setForRemoval:r,hasAnimation:n,removedBeforeQueried:!1,previousTriggersValues:s}}listen(t,e,n,r,s){return gE(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,sE,!0);e.forEach(n=>this.destroyActiveAnimationsForElement(n)),0!=this.playersByQueriedElement.size&&(e=this.driver.query(t,IO,!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 Nu(this.players).onDone(()=>t());t()})}processLeaveNode(t){const e=t[Ua];if(e&&e.setForRemoval){if(t[Ua]=q$,e.namespaceId){this.destroyInnerAnimations(t);const n=this._fetchNamespace(e.namespaceId);n&&n.clearElementCache(t)}this._onRemovalComplete(t,e.setForRemoval)}t.classList?.contains(zO)&&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?Nu(e).onDone(()=>{n.forEach(r=>r())}):n.forEach(r=>r())}}reportError(t){throw function Ige(i){return new pe(3402,!1)}()}_flushAnimations(t,e){const n=new fE,r=[],s=new Map,o=[],a=new Map,l=new Map,c=new Map,d=new Set;this.disabledNodes.forEach(q=>{d.add(q);const re=this.driver.query(q,".ng-animate-queued",!0);for(let J=0;J{const J=TO+b++;g.set(re,J),q.forEach(we=>Va(we,J))});const v=[],y=new Set,M=new Set;for(let q=0;qy.add(we)):M.add(re))}const x=new Map,C=Z$(p,Array.from(y));C.forEach((q,re)=>{const J=iE+b++;x.set(re,J),q.forEach(we=>Va(we,J))}),t.push(()=>{m.forEach((q,re)=>{const J=g.get(re);q.forEach(we=>Yg(we,J))}),C.forEach((q,re)=>{const J=x.get(re);q.forEach(we=>Yg(we,J))}),v.forEach(q=>{this.processLeaveNode(q)})});const F=[],D=[];for(let q=this._namespaceList.length-1;q>=0;q--)this._namespaceList[q].drainQueuedTransitions(e).forEach(J=>{const we=J.player,Ne=J.element;if(F.push(we),this.collectedEnterElements.length){const Fe=Ne[Ua];if(Fe&&Fe.setForMove){if(Fe.previousTriggersValues&&Fe.previousTriggersValues.has(J.triggerName)){const bt=Fe.previousTriggersValues.get(J.triggerName),St=this.statesByElement.get(J.element);if(St&&St.has(J.triggerName)){const Mt=St.get(J.triggerName);Mt.value=bt,St.set(J.triggerName,Mt)}}return void we.destroy()}}const Ye=!h||!this.driver.containsElement(h,Ne),It=x.get(Ne),en=g.get(Ne),ae=this._buildInstruction(J,n,en,It,Ye);if(ae.errors&&ae.errors.length)return void D.push(ae);if(Ye)return we.onStart(()=>If(Ne,ae.fromStyles)),we.onDestroy(()=>hc(Ne,ae.toStyles)),void r.push(we);if(J.isFallbackTransition)return we.onStart(()=>If(Ne,ae.fromStyles)),we.onDestroy(()=>hc(Ne,ae.toStyles)),void r.push(we);const Oe=[];ae.timelines.forEach(Fe=>{Fe.stretchStartingKeyframe=!0,this.disabledNodes.has(Fe.element)||Oe.push(Fe)}),ae.timelines=Oe,n.append(Ne,ae.timelines),o.push({instruction:ae,player:we,element:Ne}),ae.queriedElements.forEach(Fe=>ra(a,Fe,[]).push(we)),ae.preStyleProps.forEach((Fe,bt)=>{if(Fe.size){let St=l.get(bt);St||l.set(bt,St=new Set),Fe.forEach((Mt,Sn)=>St.add(Sn))}}),ae.postStyleProps.forEach((Fe,bt)=>{let St=c.get(bt);St||c.set(bt,St=new Set),Fe.forEach((Mt,Sn)=>St.add(Sn))})});if(D.length){const q=[];D.forEach(re=>{q.push(function Rge(i,t){return new pe(3505,!1)}())}),F.forEach(re=>re.destroy()),this.reportError(q)}const k=new Map,B=new Map;o.forEach(q=>{const re=q.element;n.has(re)&&(B.set(re,re),this._beforeAnimationBuild(q.player.namespaceId,q.instruction,k))}),r.forEach(q=>{const re=q.element;this._getPreviousPlayers(re,!1,q.namespaceId,q.triggerName,null).forEach(we=>{ra(k,re,[]).push(we),we.destroy()})});const T=v.filter(q=>J$(q,l,c)),A=new Map;K$(A,this.driver,M,c,Xc).forEach(q=>{J$(q,l,c)&&T.push(q)});const ie=new Map;m.forEach((q,re)=>{K$(ie,this.driver,new Set(q),l,rR)}),T.forEach(q=>{const re=A.get(q),J=ie.get(q);A.set(q,new Map([...Array.from(re?.entries()??[]),...Array.from(J?.entries()??[])]))});const ne=[],se=[],ge={};o.forEach(q=>{const{element:re,player:J,instruction:we}=q;if(n.has(re)){if(d.has(re))return J.onDestroy(()=>hc(re,we.toStyles)),J.disabled=!0,J.overrideTotalTime(we.totalTime),void r.push(J);let Ne=ge;if(B.size>1){let It=re;const en=[];for(;It=It.parentNode;){const ae=B.get(It);if(ae){Ne=ae;break}en.push(It)}en.forEach(ae=>B.set(ae,Ne))}const Ye=this._buildAnimation(J.namespaceId,we,k,s,ie,A);if(J.setRealPlayer(Ye),Ne===ge)ne.push(J);else{const It=this.playersByElement.get(Ne);It&&It.length&&(J.parentPlayer=Nu(It)),r.push(J)}}else If(re,we.fromStyles),J.onDestroy(()=>hc(re,we.toStyles)),se.push(J),d.has(re)&&r.push(J)}),se.forEach(q=>{const re=s.get(q.element);if(re&&re.length){const J=Nu(re);q.setRealPlayer(J)}}),r.forEach(q=>{q.parentPlayer?q.syncPlayerEvents(q.parentPlayer):q.destroy()});for(let q=0;q!Ye.destroyed);Ne.length?O_e(this,re,Ne):this.processLeaveNode(re)}return v.length=0,ne.forEach(q=>{this.players.push(q),q.onDone(()=>{q.destroy();const re=this.players.indexOf(q);this.players.splice(re,1)}),q.play()}),ne}elementContainsData(t,e){let n=!1;const r=e[Ua];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==o0;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,d=c!==s,h=ra(n,c,[]);this._getPreviousPlayers(c,d,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=[],d=new Set,h=new Set,p=e.timelines.map(g=>{const b=g.element;d.add(b);const v=b[Ua];if(v&&v.removedBeforeQueried)return new tb(g.duration,g.delay);const y=b!==l,M=function F_e(i){const t=[];return Q$(i,t),t}((n.get(b)||A_e).map(k=>k.getRealPlayer())).filter(k=>!!k.element&&k.element===b),x=s.get(b),C=o.get(b),F=C$(0,this._normalizer,0,g.keyframes,x,C),D=this._buildPlayer(g,F,M);if(g.subTimeline&&r&&h.add(b),y){const k=new $O(t,a,b);k.setRealPlayer(D),c.push(k)}return D});c.forEach(g=>{ra(this.playersByQueriedElement,g.element,[]).push(g),g.onDone(()=>function R_e(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))}),d.forEach(g=>Va(g,P$));const m=Nu(p);return m.onDestroy(()=>{d.forEach(g=>Yg(g,P$)),hc(l,e.toStyles)}),h.forEach(g=>{ra(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 tb(t.duration,t.delay)}}class $O{constructor(t,e,n){this.namespaceId=t,this.triggerName=e,this.element=n,this._player=new tb,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=>MO(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){ra(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 gE(i){return i&&1===i.nodeType}function X$(i,t){const e=i.style.display;return i.style.display=t??"none",e}function K$(i,t,e,n,r){const s=[];e.forEach(l=>s.push(X$(l)));const o=[];n.forEach((l,c)=>{const d=new Map;l.forEach(h=>{const p=t.computeStyle(c,h,r);d.set(h,p),(!p||0==p.length)&&(c[Ua]=D_e,o.push(c))}),i.set(c,d)});let a=0;return e.forEach(l=>X$(l,s[a++])),o}function Z$(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 Va(i,t){i.classList?.add(t)}function Yg(i,t){i.classList?.remove(t)}function O_e(i,t,e){Nu(e).onDone(()=>i.processLeaveNode(t))}function Q$(i,t){for(let e=0;er.add(s)):t.set(i,n),e.delete(i),!0}class _E{constructor(t,e,n){this.bodyNode=t,this._driver=e,this._normalizer=n,this._triggerCache={},this.onRemovalComplete=(r,s)=>{},this._transitionEngine=new I_e(t,e,n),this._timelineEngine=new w_e(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=[],d=OO(this._driver,s,l,c);if(l.length)throw function bge(i,t){return new pe(3404,!1)}();a=function v_e(i,t,e){return new y_e(i,t,e)}(r,d,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]=S$(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]=S$(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 B_e=(()=>{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&&hc(this._element,this._startStyles,this._initialStyles),this._state=1)}finish(){this.start(),this._state<2&&(hc(this._element,this._initialStyles),this._endStyles&&(hc(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),hc(this._element,this._initialStyles),this._state=3)}}return i.initialStylesByElement=new WeakMap,i})();function WO(i){let t=null;return i.forEach((e,n)=>{(function U_e(i){return"display"===i||"position"===i})(n)&&(t=t||new Map,t.set(n,e))}),t}class e8{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:U$(this.element,r))}),this.currentSnapshot=t}triggerCallback(t){const e="start"===t?this._onStartFns:this._onDoneFns;e.forEach(n=>n()),e.length=0}}class V_e{validateStyleProperty(t){return!0}validateAnimatableStyleProperty(t){return!0}matchesElement(t,e){return!1}containsElement(t,e){return T$(t,e)}getParentElement(t){return AO(t)}query(t,e,n){return I$(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,d=o.filter(m=>m instanceof e8);(function $ge(i,t){return 0===i||0===t})(n,r)&&d.forEach(m=>{m.currentSnapshot.forEach((g,b)=>c.set(b,g))});let h=function Vge(i){return i.length?i[0]instanceof Map?i:i.map(t=>O$(t)):[]}(e).map(m=>Bu(m));h=function Wge(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,U$(i,a)))}}return t}(t,h,c);const p=function N_e(i,t){let e=null,n=null;return Array.isArray(t)&&t.length?(e=WO(t[0]),t.length>1&&(n=WO(t[t.length-1]))):t instanceof Map&&(e=WO(t)),e||n?new B_e(i,e,n):null}(t,h);return new e8(t,h,l,p)}}let z_e=(()=>{class i extends tV{constructor(e,n){super(),this._nextAnimationId=0,this._renderer=e.createRenderer(n.body,{id:"0",encapsulation:qs.None,styles:[],data:{animation:[]}})}build(e){const n=this._nextAnimationId.toString();this._nextAnimationId++;const r=Array.isArray(e)?iV(e):e;return t8(this._renderer,null,n,"register",[r]),new H_e(n,this._renderer)}}return i.\u0275fac=function(e){return new(e||i)(ee(Gl),ee(jt))},i.\u0275prov=ke({token:i,factory:i.\u0275fac}),i})();class H_e extends LQ{constructor(t,e){super(),this._id=t,this._renderer=e}create(t,e){return new G_e(this._id,t,e||{},this._renderer)}}class G_e{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 t8(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 t8(i,t,e,n,r){return i.setProperty(t,`@@${e}:${n}`,r)}const n8="@.disabled";let $_e=(()=>{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 d=this._rendererCache.get(s);return d||(d=new i8("",s,this.engine,()=>this._rendererCache.delete(s)),this._rendererCache.set(s,d)),d}const o=n.id,a=n.id+"-"+this._currentId;this._currentId++,this.engine.register(a,e);const l=d=>{Array.isArray(d)?d.forEach(l):this.engine.registerTrigger(o,a,e,d.name,d)};return n.data.animation.forEach(l),new W_e(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)(ee(Gl),ee(_E),ee(ft))},i.\u0275prov=ke({token:i,factory:i.\u0275fac}),i})();class i8{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==n8?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 W_e extends i8{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==n8?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 j_e(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 Y_e(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 r8=[{provide:tV,useClass:z_e},{provide:UO,useFactory:function X_e(){return new p_e}},{provide:_E,useClass:(()=>{class i extends _E{constructor(e,n,r,s){super(e.body,n,r)}ngOnDestroy(){this.flush()}}return i.\u0275fac=function(e){return new(e||i)(ee(jt),ee(DO),ee(UO),ee(dm))},i.\u0275prov=ke({token:i,factory:i.\u0275fac}),i})()},{provide:Gl,useFactory:function K_e(i,t,e){return new $_e(i,t,e)},deps:[aM,_E,ft]}],jO=[{provide:DO,useFactory:()=>new V_e},{provide:Rr,useValue:"BrowserAnimations"},...r8],s8=[{provide:DO,useClass:R$},{provide:Rr,useValue:"NoopAnimations"},...r8];let Z_e=(()=>{class i{static withConfig(e){return{ngModule:i,providers:e.disableAnimations?s8:jO}}}return i.\u0275fac=function(e){return new(e||i)},i.\u0275mod=nn({type:i}),i.\u0275inj=Kt({providers:jO,imports:[FB]}),i})();const o8=new me("CdkAccordion");let Q_e=0,J_e=(()=>{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=Zt.EMPTY,this.closed=new We,this.opened=new We,this.destroyed=new We,this.expandedChange=new We,this.id="cdk-accordion-child-"+Q_e++,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)(E(o8,12),E(Zn),E(GR))},i.\u0275dir=ve({type:i,selectors:[["cdk-accordion-item"],["","cdkAccordionItem",""]],inputs:{expanded:"expanded",disabled:"disabled"},outputs:{closed:"closed",opened:"opened",destroyed:"destroyed",expandedChange:"expandedChange"},exportAs:["cdkAccordionItem"],features:[Dn([{provide:o8,useValue:void 0}])]}),i})(),eve=(()=>{class i{}return i.\u0275fac=function(e){return new(e||i)},i.\u0275mod=nn({type:i}),i.\u0275inj=Kt({}),i})();const tve=["body"];function nve(i,t){}const ive=[[["mat-expansion-panel-header"]],"*",[["mat-action-row"]]],rve=["mat-expansion-panel-header","*","mat-action-row"];function sve(i,t){1&i&&De(0,"span",2),2&i&&U("@indicatorRotate",he()._getExpandedState())}const ove=[[["mat-panel-title"]],[["mat-panel-description"]],"*"],ave=["mat-panel-title","mat-panel-description","*"],a8=new me("MAT_ACCORDION"),l8="225ms cubic-bezier(0.4,0.0,0.2,1)",c8={indicatorRotate:Ra("indicatorRotate",[Ps("collapsed, void",si({transform:"rotate(0deg)"})),Ps("expanded",si({transform:"rotate(180deg)"})),Pr("expanded <=> collapsed, void => collapsed",jr(l8))]),bodyExpansion:Ra("bodyExpansion",[Ps("collapsed, void",si({height:"0px",visibility:"hidden"})),Ps("expanded",si({height:"*",visibility:"visible"})),Pr("expanded <=> collapsed, void => collapsed",jr(l8))])},d8=new me("MAT_EXPANSION_PANEL");let lve=(()=>{class i{constructor(e,n){this._template=e,this._expansionPanel=n}}return i.\u0275fac=function(e){return new(e||i)(E(Mo),E(d8,8))},i.\u0275dir=ve({type:i,selectors:[["ng-template","matExpansionPanelContent",""]]}),i})(),cve=0;const u8=new me("MAT_EXPANSION_PANEL_DEFAULT_OPTIONS");let h8=(()=>{class i extends J_e{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 We,this.afterCollapse=new We,this._inputChanges=new Re,this._headerId="mat-expansion-panel-header-"+cve++,this._bodyAnimationDone=new Re,this.accordion=e,this._document=o,this._bodyAnimationDone.pipe(Zl((c,d)=>c.fromState===d.fromState&&c.toState===d.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(Ao(null),gn(()=>this.expanded&&!this._portal),Oi(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)(E(a8,12),E(Zn),E(GR),E(Wr),E(jt),E(Rr,8),E(u8,8))},i.\u0275cmp=ot({type:i,selectors:[["mat-expansion-panel"]],contentQueries:function(e,n,r){if(1&e&&Wi(r,lve,5),2&e){let s;Et(s=At())&&(n._lazyContent=s.first)}},viewQuery:function(e,n){if(1&e&&Wn(tve,5),2&e){let r;Et(r=At())&&(n._body=r.first)}},hostAttrs:[1,"mat-expansion-panel"],hostVars:6,hostBindings:function(e,n){2&e&&un("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:[Dn([{provide:a8,useValue:void 0},{provide:d8,useExisting:i}]),lt,bi],ngContentSelectors:rve,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&&(sr(ive),Wt(0),W(1,"div",0,1),Ue("@bodyExpansion.done",function(s){return n._bodyAnimationDone.next(s)}),W(3,"div",2),Wt(4,1),fe(5,nve,0,0,"ng-template",3),j(),Wt(6,2),j()),2&e&&(G(1),U("@bodyExpansion",n._getExpandedState())("id",n.id),Dt("aria-labelledby",n._headerId),G(4),U("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:[c8.bodyExpansion]},changeDetection:0}),i})();class dve{}const uve=JI(dve);let hve=(()=>{class i extends uve{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=Zt.EMPTY;const c=e.accordion?e.accordion._stateChanges.pipe(gn(d=>!(!d.hideToggle&&!d.togglePosition))):po;this.tabIndex=parseInt(l||"")||0,this._parentChangeSubscription=Mr(e.opened,e.closed,c,e._inputChanges.pipe(gn(d=>!!(d.hideToggle||d.disabled||d.togglePosition)))).subscribe(()=>this._changeDetectorRef.markForCheck()),e.closed.pipe(gn(()=>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:Xo(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)(E(h8,1),E(mt),E(qc),E(Zn),E(u8,8),E(Rr,8),ya("tabindex"))},i.\u0275cmp=ot({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&&Ue("click",function(){return n._toggle()})("keydown",function(s){return n._keydown(s)}),2&e&&(Dt("id",n.panel._headerId)("tabindex",n.tabIndex)("aria-controls",n._getPanelId())("aria-expanded",n._isExpanded())("aria-disabled",n.panel.disabled),jo("height",n._getHeaderHeight()),un("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:[lt],ngContentSelectors:ave,decls:5,vars:3,consts:[[1,"mat-content"],["class","mat-expansion-indicator",4,"ngIf"],[1,"mat-expansion-indicator"]],template:function(e,n){1&e&&(sr(ove),W(0,"span",0),Wt(1),Wt(2,1),Wt(3,2),j(),fe(4,sve,1,1,"span",1)),2&e&&(un("mat-content-hide-toggle",!n._showToggle()),G(4),U("ngIf",n._showToggle()))},dependencies:[vi],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:[c8.indicatorRotate]},changeDetection:0}),i})(),fve=(()=>{class i{}return i.\u0275fac=function(e){return new(e||i)},i.\u0275dir=ve({type:i,selectors:[["mat-panel-description"]],hostAttrs:[1,"mat-expansion-panel-header-description"]}),i})(),pve=(()=>{class i{}return i.\u0275fac=function(e){return new(e||i)},i.\u0275dir=ve({type:i,selectors:[["mat-panel-title"]],hostAttrs:[1,"mat-expansion-panel-header-title"]}),i})(),mve=(()=>{class i{}return i.\u0275fac=function(e){return new(e||i)},i.\u0275mod=nn({type:i}),i.\u0275inj=Kt({imports:[Eo,Qn,eve,Nh]}),i})();function gve(i,t){if(1&i&&(W(0,"mat-option",19),Ve(1),j()),2&i){const e=t.$implicit;U("value",e),G(1),Qi(" ",e," ")}}function _ve(i,t){if(1&i){const e=di();W(0,"mat-form-field",16)(1,"mat-select",17),Ue("selectionChange",function(r){return an(e),zt(he(2)._changePageSize(r.value))}),fe(2,gve,2,2,"mat-option",18),j()()}if(2&i){const e=he(2);U("appearance",e._formFieldAppearance)("color",e.color),G(1),U("value",e.pageSize)("disabled",e.disabled)("aria-labelledby",e._pageSizeLabelId)("panelClass",e.selectConfig.panelClass||"")("disableOptionCentering",e.selectConfig.disableOptionCentering),G(1),U("ngForOf",e._displayedPageSizeOptions)}}function vve(i,t){if(1&i&&(W(0,"div",20),Ve(1),j()),2&i){const e=he(2);G(1),_i(e.pageSize)}}function yve(i,t){if(1&i&&(W(0,"div",12)(1,"div",13),Ve(2),j(),fe(3,_ve,3,8,"mat-form-field",14),fe(4,vve,2,1,"div",15),j()),2&i){const e=he();G(1),B1("id",e._pageSizeLabelId),G(1),Qi(" ",e._intl.itemsPerPageLabel," "),G(1),U("ngIf",e._displayedPageSizeOptions.length>1),G(1),U("ngIf",e._displayedPageSizeOptions.length<=1)}}function bve(i,t){if(1&i){const e=di();W(0,"button",21),Ue("click",function(){return an(e),zt(he().firstPage())}),ki(),W(1,"svg",7),De(2,"path",22),j()()}if(2&i){const e=he();U("matTooltip",e._intl.firstPageLabel)("matTooltipDisabled",e._previousButtonsDisabled())("matTooltipPosition","above")("disabled",e._previousButtonsDisabled()),Dt("aria-label",e._intl.firstPageLabel)}}function xve(i,t){if(1&i){const e=di();ki(),ga(),W(0,"button",23),Ue("click",function(){return an(e),zt(he().lastPage())}),ki(),W(1,"svg",7),De(2,"path",24),j()()}if(2&i){const e=he();U("matTooltip",e._intl.lastPageLabel)("matTooltipDisabled",e._nextButtonsDisabled())("matTooltipPosition","above")("disabled",e._nextButtonsDisabled()),Dt("aria-label",e._intl.lastPageLabel)}}let yE=(()=>{class i{constructor(){this.changes=new Re,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=ke({token:i,factory:i.\u0275fac,providedIn:"root"}),i})();const Mve={provide:yE,deps:[[new Ss,new xa,yE]],useFactory:function wve(i){return i||new yE}},Sve=new me("MAT_PAGINATOR_DEFAULT_OPTIONS"),Eve=jM(CQ(class{}));let Ave=(()=>{class i extends Eve{get pageIndex(){return this._pageIndex}set pageIndex(e){this._pageIndex=Math.max(ks(e),0),this._changeDetectorRef.markForCheck()}get length(){return this._length}set length(e){this._length=ks(e),this._changeDetectorRef.markForCheck()}get pageSize(){return this._pageSize}set pageSize(e){this._pageSize=Math.max(ks(e),0),this._updateDisplayedPageSizeOptions()}get pageSizeOptions(){return this._pageSizeOptions}set pageSizeOptions(e){this._pageSizeOptions=(e||[]).map(n=>ks(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 We,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){xo()},i.\u0275dir=ve({type:i,inputs:{color:"color",pageIndex:"pageIndex",length:"length",pageSize:"pageSize",pageSizeOptions:"pageSizeOptions",hidePageSize:"hidePageSize",showFirstLastButtons:"showFirstLastButtons",selectConfig:"selectConfig"},outputs:{page:"page"},features:[lt]}),i})(),Dve=0,Tve=(()=>{class i extends Ave{constructor(e,n,r){super(e,n,r),this._pageSizeLabelId="mat-paginator-page-size-label-"+Dve++,this._formFieldAppearance=r?.formFieldAppearance||"outline"}}return i.\u0275fac=function(e){return new(e||i)(E(yE),E(Zn),E(Sve,8))},i.\u0275cmp=ot({type:i,selectors:[["mat-paginator"]],hostAttrs:["role","group",1,"mat-mdc-paginator"],inputs:{disabled:"disabled"},exportAs:["matPaginator"],features:[lt],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&&(W(0,"div",0)(1,"div",1),fe(2,yve,5,4,"div",2),W(3,"div",3)(4,"div",4),Ve(5),j(),fe(6,bve,3,5,"button",5),W(7,"button",6),Ue("click",function(){return n.previousPage()}),ki(),W(8,"svg",7),De(9,"path",8),j()(),ga(),W(10,"button",9),Ue("click",function(){return n.nextPage()}),ki(),W(11,"svg",7),De(12,"path",10),j()(),fe(13,xve,3,5,"button",11),j()()()),2&e&&(G(2),U("ngIf",!n.hidePageSize),G(3),Qi(" ",n._intl.getRangeLabel(n.pageIndex,n.pageSize,n.length)," "),G(1),U("ngIf",n.showFirstLastButtons),G(1),U("matTooltip",n._intl.previousPageLabel)("matTooltipDisabled",n._previousButtonsDisabled())("matTooltipPosition","above")("disabled",n._previousButtonsDisabled()),Dt("aria-label",n._intl.previousPageLabel),G(3),U("matTooltip",n._intl.nextPageLabel)("matTooltipDisabled",n._nextButtonsDisabled())("matTooltipPosition","above")("disabled",n._nextButtonsDisabled()),Dt("aria-label",n._intl.nextPageLabel),G(3),U("ngIf",n.showFirstLastButtons))},dependencies:[So,vi,XM,vl,fb,Nm,Os],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})(),Ive=(()=>{class i{}return i.\u0275fac=function(e){return new(e||i)},i.\u0275mod=nn({type:i}),i.\u0275inj=Kt({providers:[Mve],imports:[Eo,KM,VH,FV]}),i})(),Rve=(()=>{class i{}return i.\u0275fac=function(e){return new(e||i)},i.\u0275mod=nn({type:i,bootstrap:[Qme]}),i.\u0275inj=Kt({providers:[Ql,NH,{provide:PH,useValue:Vie}],imports:[FB,wK,Z_e,eH,SJ,gC,pH,mve,DV,RV,FV,KM,ez,Ive,sse,_H,VH,_V,bpe,xme,tH,tR,Yie]}),i})();th(Jl,[So,vi,Os,t0,nE],[pl]),th(zR,[hm,So,vi,xy,tc,Kc,vl,h8,hve,pve,fve,Os,Tve,fb,Nm,t0],[]),th(xC,[So,vi,MC,wC,gH,t0],[]),th(_$,[So,vi,To,Os,fb,Nm,t0,nE],[pl]),L7().bootstrapModule(Rve).catch(i=>console.error(i))},489:function(Lo,Hs,ps){var cn;Lo=ps.nmd(Lo),function(){var V,Kr=200,Un="Expected a function",Ha="__lodash_hash_undefined__",Mi="__lodash_placeholder__",Ci=1,ms=2,$s=4,Ws=1,No=2,On=1,dr=2,pc=4,la=8,Dl=16,ca=32,Tl=64,Ga=128,da=256,pd=512,ME=800,Kg=16,In=1/0,Wa=9007199254740991,SE=17976931348623157e292,Pf=NaN,ua=4294967295,Re=ua-1,l0=ua>>>1,c0=[["ary",Ga],["bind",On],["bindKey",dr],["curry",la],["curryRight",Dl],["flip",pd],["partial",ca],["partialRight",Tl],["rearg",da]],ti="[object Arguments]",Yn="[object Array]",EE="[object AsyncFunction]",et="[object Boolean]",mc="[object Date]",AE="[object DOMException]",md="[object Error]",Of="[object Function]",d0="[object GeneratorFunction]",Bo="[object Map]",Vu="[object Number]",DE="[object Null]",ja="[object Object]",u0="[object Promise]",TE="[object Proxy]",gd="[object RegExp]",Uo="[object Set]",gc="[object String]",Ff="[object Symbol]",Zg="[object Undefined]",_d="[object WeakMap]",zu="[object ArrayBuffer]",vd="[object DataView]",ha="[object Float32Array]",Lf="[object Float64Array]",Qg="[object Int8Array]",Nf="[object Int16Array]",Jg="[object Int32Array]",e_="[object Uint8Array]",Hu="[object Uint8ClampedArray]",t_="[object Uint16Array]",n_="[object Uint32Array]",RE=/\b__p \+= '';/g,kE=/\b(__p \+=) '' \+/g,PE=/(__e\(.*?\)|\b__t\)) \+\n'';/g,h0=/&(?:amp|lt|gt|quot|#39);/g,f0=/[&<>"']/g,OE=RegExp(h0.source),FE=RegExp(f0.source),ZO=/<%-([\s\S]+?)%>/g,i_=/<%([\s\S]+?)%>/g,r_=/<%=([\s\S]+?)%>/g,p0=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,m0=/^\w*$/,g0=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,s_=/[\\^$.*+?()[\]{}|]/g,_0=RegExp(s_.source),Bf=/^\s+/,v0=/\s/,y0=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,wr=/\{\n\/\* \[wrapped with (.+)\] \*/,LE=/,? & /,NE=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,BE=/[()=,{}\[\]\/\s]/,UE=/\\(\\)?/g,b0=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,x0=/\w*$/,VE=/^[-+]0x[0-9a-f]+$/i,Ya=/^0b[01]+$/i,zE=/^\[object .+?Constructor\]$/,ir=/^0o[0-7]+$/i,yd=/^(?:0|[1-9]\d*)$/,po=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,o_=/($^)/,HE=/['\n\r\u2028\u2029\\]/g,Gu="\\ud800-\\udfff",M0="\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff",l_="\\u2700-\\u27bf",c_="a-z\\xdf-\\xf6\\xf8-\\xff",d_="A-Z\\xc0-\\xd6\\xd8-\\xde",C0="\\ufe0e\\ufe0f",S0="\\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",Mr="["+Gu+"]",Uf="["+S0+"]",bd="["+M0+"]",li="\\d+",u_="["+l_+"]",pi="["+c_+"]",Vf="[^"+Gu+S0+li+l_+c_+d_+"]",h_="\\ud83c[\\udffb-\\udfff]",Pt="[^"+Gu+"]",Wu="(?:\\ud83c[\\udde6-\\uddff]){2}",ju="[\\ud800-\\udbff][\\udc00-\\udfff]",Yu="["+d_+"]",pe="(?:"+pi+"|"+Vf+")",zf="(?:"+Yu+"|"+Vf+")",Qt="(?:['\u2019](?:d|ll|m|re|s|t|ve))?",qn="(?:['\u2019](?:D|LL|M|RE|S|T|VE))?",E0="(?:"+bd+"|"+h_+")?",YE="["+C0+"]?",XE=YE+E0+"(?:\\u200d(?:"+[Pt,Wu,ju].join("|")+")"+YE+E0+")*",KE="(?:"+[u_,Wu,ju].join("|")+")"+XE,QO="(?:"+[Pt+bd+"?",bd,Wu,ju,Mr].join("|")+")",Il=RegExp("['\u2019]","g"),JO=RegExp(bd,"g"),A0=RegExp(h_+"(?="+h_+")|"+QO+XE,"g"),eF=RegExp([Yu+"?"+pi+"+"+Qt+"(?="+[Uf,Yu,"$"].join("|")+")",zf+"+"+qn+"(?="+[Uf,Yu+pe,"$"].join("|")+")",Yu+"?"+pe+"+"+Qt,Yu+"+"+qn,"\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])","\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",li,KE].join("|"),"g"),tF=RegExp("[\\u200d"+Gu+M0+C0+"]"),ZE=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,nF=["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"],QE=-1,Si={};Si[ha]=Si[Lf]=Si[Qg]=Si[Nf]=Si[Jg]=Si[e_]=Si[Hu]=Si[t_]=Si[n_]=!0,Si[ti]=Si[Yn]=Si[zu]=Si[et]=Si[vd]=Si[mc]=Si[md]=Si[Of]=Si[Bo]=Si[Vu]=Si[ja]=Si[gd]=Si[Uo]=Si[gc]=Si[_d]=!1;var En={};En[ti]=En[Yn]=En[zu]=En[vd]=En[et]=En[mc]=En[ha]=En[Lf]=En[Qg]=En[Nf]=En[Jg]=En[Bo]=En[Vu]=En[ja]=En[gd]=En[Uo]=En[gc]=En[Ff]=En[e_]=En[Hu]=En[t_]=En[n_]=!0,En[md]=En[Of]=En[_d]=!1;var sF={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},ke=parseFloat,oF=parseInt,Kt="object"==typeof global&&global&&global.Object===Object&&global,Gf="object"==typeof self&&self&&self.Object===Object&&self,Cr=Kt||Gf||Function("return this")(),f_=Hs&&!Hs.nodeType&&Hs,Xu=f_&&Lo&&!Lo.nodeType&&Lo,p_=Xu&&Xu.exports===f_,xd=p_&&Kt.process,gs=function(){try{return Xu&&Xu.require&&Xu.require("util").types||xd&&xd.binding&&xd.binding("util")}catch{}}(),m_=gs&&gs.isArrayBuffer,D0=gs&&gs.isDate,Ot=gs&&gs.isMap,$f=gs&&gs.isRegExp,T0=gs&&gs.isSet,Ys=gs&&gs.isTypedArray;function _s(X,ue,oe){switch(oe.length){case 0:return X.call(ue);case 1:return X.call(ue,oe[0]);case 2:return X.call(ue,oe[0],oe[1]);case 3:return X.call(ue,oe[0],oe[1],oe[2])}return X.apply(ue,oe)}function aF(X,ue,oe,Be){for(var $t=-1,Vn=null==X?0:X.length;++$t-1}function Ku(X,ue,oe){for(var Be=-1,$t=null==X?0:X.length;++Be<$t;)if(oe(ue,X[Be]))return!0;return!1}function mi(X,ue){for(var oe=-1,Be=null==X?0:X.length,$t=Array(Be);++oe-1;);return oe}function fa(X,ue){for(var oe=X.length;oe--&&Ft(ue,X[oe],0)>-1;);return oe}var nA=v_({\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"}),ot=v_({"&":"&","<":"<",">":">",'"':""","'":"'"});function th(X){return"\\"+sF[X]}function Cd(X){return tF.test(X)}function qf(X){var ue=-1,oe=Array(X.size);return X.forEach(function(Be,$t){oe[++ue]=[$t,Be]}),oe}function ve(X,ue){return function(oe){return X(ue(oe))}}function Gi(X,ue){for(var oe=-1,Be=X.length,$t=0,Vn=[];++oe",""":'"',"'":"'"}),ys=function X(ue){var u,oe=(ue=null==ue?Cr:ys.defaults(Cr.Object(),ue,ys.pick(Cr,nF))).Array,Be=ue.Date,$t=ue.Error,Vn=ue.Function,yt=ue.Math,oi=ue.Object,yc=ue.RegExp,R0=ue.String,Sr=ue.TypeError,rr=oe.prototype,Vo=oi.prototype,Xs=ue["__core-js_shared__"],Pl=Vn.prototype.toString,ii=Vo.hasOwnProperty,yi=0,sA=(u=/[^.]+$/.exec(Xs&&Xs.keys&&Xs.keys.IE_PROTO||""))?"Symbol(src)_1."+u:"",Ed=Vo.toString,k0=Pl.call(oi),Kf=Cr._,Zf=yc("^"+Pl.call(ii).replace(s_,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),Za=p_?ue.Buffer:V,Ui=ue.Symbol,x_=ue.Uint8Array,bs=Za?Za.allocUnsafe:V,xs=ve(oi.getPrototypeOf,oi),Qf=oi.create,Ad=Vo.propertyIsEnumerable,bc=rr.splice,_o=Ui?Ui.isConcatSpreadable:V,ih=Ui?Ui.iterator:V,Dd=Ui?Ui.toStringTag:V,Jf=function(){try{var u=Rc(oi,"defineProperty");return u({},"",{}),u}catch{}}(),oA=ue.clearTimeout!==Cr.clearTimeout&&ue.clearTimeout,cF=Be&&Be.now!==Cr.Date.now&&Be.now,dF=ue.setTimeout!==Cr.setTimeout&&ue.setTimeout,w_=yt.ceil,M_=yt.floor,P0=oi.getOwnPropertySymbols,uF=Za?Za.isBuffer:V,aA=ue.isFinite,hF=rr.join,fF=ve(oi.keys,oi),hr=yt.max,Zr=yt.min,pF=Be.now,O0=ue.parseInt,C_=yt.random,mF=rr.reverse,F0=Rc(ue,"DataView"),ep=Rc(ue,"Map"),Qa=Rc(ue,"Promise"),Td=Rc(ue,"Set"),bi=Rc(ue,"WeakMap"),Id=Rc(oi,"create"),tp=bi&&new bi,Rd={},L0=kc(F0),N0=kc(ep),lA=kc(Qa),S_=kc(Td),cA=kc(bi),Qr=Ui?Ui.prototype:V,kd=Qr?Qr.valueOf:V,E_=Qr?Qr.toString:V;function I(u){if(Pi(u)&&!rn(u)&&!(u instanceof kn)){if(u instanceof Ei)return u;if(ii.call(u,"__wrapped__"))return ns(u)}return new Ei(u)}var Pd=function(){function u(){}return function(f){if(!wi(f))return{};if(Qf)return Qf(f);u.prototype=f;var _=new u;return u.prototype=V,_}}();function xc(){}function Ei(u,f){this.__wrapped__=u,this.__actions__=[],this.__chain__=!!f,this.__index__=0,this.__values__=V}function kn(u){this.__wrapped__=u,this.__actions__=[],this.__dir__=1,this.__filtered__=!1,this.__iteratees__=[],this.__takeCount__=ua,this.__views__=[]}function wc(u){var f=-1,_=null==u?0:u.length;for(this.clear();++f<_;){var w=u[f];this.set(w[0],w[1])}}function kt(u){var f=-1,_=null==u?0:u.length;for(this.clear();++f<_;){var w=u[f];this.set(w[0],w[1])}}function pa(u){var f=-1,_=null==u?0:u.length;for(this.clear();++f<_;){var w=u[f];this.set(w[0],w[1])}}function zt(u){var f=-1,_=null==u?0:u.length;for(this.__data__=new pa;++f<_;)this.add(u[f])}function Jr(u){var f=this.__data__=new kt(u);this.size=f.size}function I_(u,f){var _=rn(u),w=!_&&Fc(u),S=!_&&!w&&rl(u),P=!_&&!w&&!S&&$o(u),H=_||w||S||P,Y=H?qs(u.length,R0):[],Q=Y.length;for(var _e in u)(f||ii.call(u,_e))&&(!H||!("length"==_e||S&&("offset"==_e||"parent"==_e)||P&&("buffer"==_e||"byteLength"==_e||"byteOffset"==_e)||il(_e,Q)))&&Y.push(_e);return Y}function Vr(u){var f=u.length;return f?u[lh(0,f-1)]:V}function Ja(u,f){return Sp(Qs(u),Ll(f,0,u.length))}function H0(u){return Sp(Qs(u))}function Fl(u,f,_){(_!==V&&!Go(u[f],_)||_===V&&!(f in u))&&zo(u,f,_)}function Ks(u,f,_){var w=u[f];(!ii.call(u,f)||!Go(w,_)||_===V&&!(f in u))&&zo(u,f,_)}function ip(u,f){for(var _=u.length;_--;)if(Go(u[_][0],f))return _;return-1}function G0(u,f,_,w){return el(u,function(S,P,H){f(w,S,_(S),H)}),w}function $0(u,f){return u&&ci(f,fr(f),u)}function zo(u,f,_){"__proto__"==f&&Jf?Jf(u,f,{configurable:!0,enumerable:!0,value:_,writable:!0}):u[f]=_}function rh(u,f){for(var _=-1,w=f.length,S=oe(w),P=null==u;++_=f?u:f)),u}function Ms(u,f,_,w,S,P){var H,Y=f&Ci,Q=f&ms,_e=f&$s;if(_&&(H=S?_(u,w,S,P):_(u)),H!==V)return H;if(!wi(u))return u;var ye=rn(u);if(ye){if(H=function hx(u){var f=u.length,_=new u.constructor(f);return f&&"string"==typeof u[0]&&ii.call(u,"index")&&(_.index=u.index,_.input=u.input),_}(u),!Y)return Qs(u,H)}else{var be=zr(u),Xe=be==Of||be==d0;if(rl(u))return me(u,Y);if(be==ja||be==ti||Xe&&!S){if(H=Q||Xe?{}:PA(u),!Y)return Q?function hh(u,f){return ci(u,cx(u),f)}(u,function _A(u,f){return u&&ci(f,Ds(f),u)}(H,u)):function H_(u,f){return ci(u,Z_(u),f)}(u,$0(H,u))}else{if(!En[be])return S?u:{};H=function fx(u,f,_){var w=u.constructor;switch(f){case zu:return rx(u);case et:case mc:return new w(+u);case vd:return function xF(u,f){var _=f?rx(u.buffer):u.buffer;return new u.constructor(_,u.byteOffset,u.byteLength)}(u,_);case ha:case Lf:case Qg:case Nf:case Jg:case e_:case Hu:case t_:case n_:return AA(u,_);case Bo:return new w;case Vu:case gc:return new w(u);case gd:return function wF(u){var f=new u.constructor(u.source,x0.exec(u));return f.lastIndex=u.lastIndex,f}(u);case Uo:return new w;case Ff:return function MF(u){return kd?oi(kd.call(u)):{}}(u)}}(u,be,Y)}}P||(P=new Jr);var vt=P.get(u);if(vt)return vt;P.set(u,H),nw(u)?u.forEach(function(Vt){H.add(Ms(Vt,f,_,Vt,u,P))}):Tv(u)&&u.forEach(function(Vt,An){H.set(An,Ms(Vt,f,_,An,u,P))});var mn=ye?V:(_e?Q?q_:yp:Q?Ds:fr)(u);return Rn(mn||u,function(Vt,An){mn&&(Vt=u[An=Vt]),Ks(H,An,Ms(Vt,f,_,An,u,P))}),H}function R_(u,f,_){var w=_.length;if(null==u)return!w;for(u=oi(u);w--;){var S=_[w],H=u[S];if(H===V&&!(S in u)||!(0,f[S])(H))return!1}return!0}function rp(u,f,_){if("function"!=typeof u)throw new Sr(Un);return gh(function(){u.apply(V,_)},f)}function Fd(u,f,_,w){var S=-1,P=Rl,H=!0,Y=u.length,Q=[],_e=f.length;if(!Y)return Q;_&&(f=mi(f,Br(_))),w?(P=Ku,H=!1):f.length>=Kr&&(P=vc,H=!1,f=new zt(f));e:for(;++S-1},kt.prototype.set=function fA(u,f){var _=this.__data__,w=ip(_,u);return w<0?(++this.size,_.push([u,f])):_[w][1]=f,this},pa.prototype.clear=function pA(){this.size=0,this.__data__={hash:new wc,map:new(ep||kt),string:new wc}},pa.prototype.delete=function mA(u){var f=K_(this,u).delete(u);return this.size-=f?1:0,f},pa.prototype.get=function Se(u){return K_(this,u).get(u)},pa.prototype.has=function zn(u){return K_(this,u).has(u)},pa.prototype.set=function an(u,f){var _=K_(this,u),w=_.size;return _.set(u,f),this.size+=_.size==w?0:1,this},zt.prototype.add=zt.prototype.push=function Er(u){return this.__data__.set(u,Ha),this},zt.prototype.has=function z0(u){return this.__data__.has(u)},Jr.prototype.clear=function ma(){this.__data__=new kt,this.size=0},Jr.prototype.delete=function D_(u){var f=this.__data__,_=f.delete(u);return this.size=f.size,_},Jr.prototype.get=function T_(u){return this.__data__.get(u)},Jr.prototype.has=function gA(u){return this.__data__.has(u)},Jr.prototype.set=function _F(u,f){var _=this.__data__;if(_ instanceof kt){var w=_.__data__;if(!ep||w.length0&&_(Y)?f>1?Xn(Y,f-1,_,w,S):kl(S,Y):w||(S[S.length]=Y)}return S}var tl=G_(),Ai=G_(!0);function ki(u,f){return u&&tl(u,f,fr)}function P_(u,f){return u&&Ai(u,f,fr)}function ga(u,f){return _c(f,function(_){return zl(u[_])})}function Mc(u,f){for(var _=0,w=(f=ba(f,u)).length;null!=u&&_f}function sp(u,f){return null!=u&&ii.call(u,f)}function op(u,f){return null!=u&&f in oi(u)}function ap(u,f,_){for(var w=_?Ku:Rl,S=u[0].length,P=u.length,H=P,Y=oe(P),Q=1/0,_e=[];H--;){var ye=u[H];H&&f&&(ye=mi(ye,Br(f))),Q=Zr(ye.length,Q),Y[H]=!_&&(f||S>=120&&ye.length>=120)?new zt(H&&ye):V}ye=u[0];var be=-1,Xe=Y[0];e:for(;++be=Y?Q:Q*("desc"==_[w]?-1:1)}return u.index-f.index}(P,H,_)})}function Q0(u,f,_){for(var w=-1,S=f.length,P={};++w-1;)Y!==u&&bc.call(Y,Q,1),bc.call(u,Q,1);return u}function ah(u,f){for(var _=u?f.length:0,w=_-1;_--;){var S=f[_];if(_==w||S!==P){var P=S;il(S)?bc.call(u,S,1):dh(u,S)}}return u}function lh(u,f){return u+M_(C_()*(f-u+1))}function ch(u,f){var _="";if(!u||f<1||f>Wa)return _;do{f%2&&(_+=u),(f=M_(f/2))&&(u+=u)}while(f);return _}function pn(u,f){return Mp(J_(u,f,is),u+"")}function SA(u){return Vr(Bc(u))}function ex(u,f){var _=Bc(u);return Sp(_,Ll(f,0,_.length))}function Vd(u,f,_,w){if(!wi(u))return u;for(var S=-1,P=(f=ba(f,u)).length,H=P-1,Y=u;null!=Y&&++SS?0:S+f),(_=_>S?S:_)<0&&(_+=S),S=f>_?0:_-f>>>0,f>>>=0;for(var P=oe(S);++w>>1,H=u[P];null!==H&&!As(H)&&(_?H<=f:H=Kr){var _e=f?null:j_(u);if(_e)return Hn(_e);H=!1,S=vc,Q=new zt}else Q=f?[]:Y;e:for(;++w=w?u:ts(u,f,_)}var ix=oA||function(u){return Cr.clearTimeout(u)};function me(u,f){if(f)return u.slice();var _=u.length,w=bs?bs(_):new u.constructor(_);return u.copy(w),w}function rx(u){var f=new u.constructor(u.byteLength);return new x_(f).set(new x_(u)),f}function AA(u,f){var _=f?rx(u.buffer):u.buffer;return new u.constructor(_,u.byteOffset,u.length)}function DA(u,f){if(u!==f){var _=u!==V,w=null===u,S=u==u,P=As(u),H=f!==V,Y=null===f,Q=f==f,_e=As(f);if(!Y&&!_e&&!P&&u>f||P&&H&&Q&&!Y&&!_e||w&&H&&Q||!_&&Q||!S)return 1;if(!w&&!P&&!_e&&u1?_[S-1]:V,H=S>2?_[2]:V;for(P=u.length>3&&"function"==typeof P?(S--,P):V,H&&Dr(_[0],_[1],H)&&(P=S<3?V:P,S=1),f=oi(f);++w-1?S[P?f[H]:H]:V}}function Cs(u){return yo(function(f){var _=f.length,w=_,S=Ei.prototype.thru;for(u&&f.reverse();w--;){var P=f[w];if("function"!=typeof P)throw new Sr(Un);if(S&&!H&&"wrapper"==nl(P))var H=new Ei([],!0)}for(w=H?w:_;++w<_;){var Y=nl(P=f[w]),Q="wrapper"==Y?X_(P):V;H=Q&&mh(Q[0])&&Q[1]==(Ga|la|ca|da)&&!Q[4].length&&1==Q[9]?H[nl(Q[0])].apply(H,Q[3]):1==P.length&&mh(P)?H[Y]():H.thru(P)}return function(){var _e=arguments,ye=_e[0];if(H&&1==_e.length&&rn(ye))return H.plant(ye).value();for(var be=0,Xe=_?f[be].apply(this,_e):ye;++be<_;)Xe=f[be].call(this,Xe);return Xe}})}function Wd(u,f,_,w,S,P,H,Y,Q,_e){var ye=f&Ga,be=f&On,Xe=f&dr,vt=f&(la|Dl),Ut=f&pd,mn=Xe?V:mp(u);return function Vt(){for(var An=arguments.length,Ln=oe(An),rs=An;rs--;)Ln[rs]=arguments[rs];if(vt)var ss=wa(Vt),io=function eh(X,ue){for(var oe=X.length,Be=0;oe--;)X[oe]===ue&&++Be;return Be}(Ln,ss);if(w&&(Ln=Hd(Ln,w,S,vt)),P&&(Ln=TA(Ln,P,H,vt)),An-=io,vt&&An<_e){var Di=Gi(Ln,ss);return ox(u,f,Wd,Vt.placeholder,_,Ln,Di,Y,Q,_e-An)}var Ts=be?_:this,wo=Xe?Ts[u]:u;return An=Ln.length,Y?Ln=function Es(u,f){for(var _=u.length,w=Zr(f.length,_),S=Qs(u);w--;){var P=f[w];u[w]=il(P,_)?S[P]:V}return u}(Ln,Y):Ut&&An>1&&Ln.reverse(),ye&&QY))return!1;var _e=P.get(u),ye=P.get(f);if(_e&&ye)return _e==f&&ye==u;var be=-1,Xe=!0,vt=_&No?new zt:V;for(P.set(u,f),P.set(f,u);++be-1&&u%1==0&&u1?"& ":"")+f[w],f=f.join(_>2?", ":" "),u.replace(y0,"{\n/* [wrapped with "+f+"] */\n")}(w,function BA(u,f){return Rn(c0,function(_){var w="_."+_[0];f&_[1]&&!Rl(u,w)&&u.push(w)}),u.sort()}(function dx(u){var f=u.match(wr);return f?f[1].split(LE):[]}(w),_)))}function vx(u){var f=0,_=0;return function(){var w=pF(),S=Kg-(w-_);if(_=w,S>0){if(++f>=ME)return arguments[0]}else f=0;return u.apply(V,arguments)}}function Sp(u,f){var _=-1,w=u.length,S=w-1;for(f=f===V?w:f;++_1?u[f-1]:V;return _="function"==typeof _?(u.pop(),_):V,yh(u,_)});function zx(u){var f=I(u);return f.__chain__=!0,f}function Ip(u,f){return f(u)}var Hx=yo(function(u){var f=u.length,_=f?u[0]:0,w=this.__wrapped__,S=function(P){return rh(P,u)};return!(f>1||this.__actions__.length)&&w instanceof kn&&il(_)?((w=w.slice(_,+_+(f?1:0))).__actions__.push({func:Ip,args:[S],thisArg:V}),new Ei(w,this.__chain__).thru(function(P){return f&&!P.length&&P.push(V),P})):this.thru(S)}),rD=fp(function(u,f,_){ii.call(u,_)?++u[_]:zo(u,_,1)}),$x=RA(Sx),kp=RA(rv);function bv(u,f){return(rn(u)?Rn:el)(u,Lt(f,3))}function Vl(u,f){return(rn(u)?lF:k_)(u,Lt(f,3))}var oD=fp(function(u,f,_){ii.call(u,_)?u[_].push(f):zo(u,_,[f])}),lD=pn(function(u,f,_){var w=-1,S="function"==typeof f,P=eo(u)?oe(u.length):[];return el(u,function(H){P[++w]=S?_s(f,H,_):_a(H,f,_)}),P}),cD=fp(function(u,f,_){zo(u,_,f)});function Pp(u,f){return(rn(u)?mi:sh)(u,Lt(f,3))}var Ma=fp(function(u,f,_){u[_?0:1].push(f)},function(){return[[],[]]}),_D=pn(function(u,f){if(null==u)return[];var _=f.length;return _>1&&Dr(u,f[0],f[1])?f=[]:_>2&&Dr(f[0],f[1],f[2])&&(f=[f[0]]),B_(u,Xn(f,1),[])}),Op=cF||function(){return Cr.Date.now()};function xh(u,f,_){return f=_?V:f,vo(u,Ga,V,V,V,V,f=u&&null==f?u.length:f)}function Ca(u,f){var _;if("function"!=typeof f)throw new Sr(Un);return u=dn(u),function(){return--u>0&&(_=f.apply(this,arguments)),u<=1&&(f=V),_}}var Oc=pn(function(u,f,_){var w=On;if(_.length){var S=Gi(_,wa(Oc));w|=ca}return vo(u,w,f,_,S)}),xv=pn(function(u,f,_){var w=On|dr;if(_.length){var S=Gi(_,wa(xv));w|=ca}return vo(f,w,u,_,S)});function yD(u,f,_){var w,S,P,H,Y,Q,_e=0,ye=!1,be=!1,Xe=!0;if("function"!=typeof u)throw new Sr(Un);function vt(Di){var Ts=w,wo=S;return w=S=V,_e=Di,H=u.apply(wo,Ts)}function Vt(Di){var Ts=Di-Q;return Q===V||Ts>=f||Ts<0||be&&Di-_e>=P}function An(){var Di=Op();if(Vt(Di))return Ln(Di);Y=gh(An,function mn(Di){var I1=f-(Di-Q);return be?Zr(I1,P-(Di-_e)):I1}(Di))}function Ln(Di){return Y=V,Xe&&w?vt(Di):(w=S=V,H)}function io(){var Di=Op(),Ts=Vt(Di);if(w=arguments,S=this,Q=Di,Ts){if(Y===V)return function Ut(Di){return _e=Di,Y=gh(An,f),ye?vt(Di):H}(Q);if(be)return ix(Y),Y=gh(An,f),vt(Q)}return Y===V&&(Y=gh(An,f)),H}return f=bo(f)||0,wi(_)&&(ye=!!_.leading,P=(be="maxWait"in _)?hr(bo(_.maxWait)||0,f):P,Xe="trailing"in _?!!_.trailing:Xe),io.cancel=function rs(){Y!==V&&ix(Y),_e=0,w=Q=S=Y=V},io.flush=function ss(){return Y===V?H:Ln(Op())},io}var kF=pn(function(u,f){return rp(u,1,f)}),PF=pn(function(u,f,_){return rp(u,bo(f)||0,_)});function Yd(u,f){if("function"!=typeof u||null!=f&&"function"!=typeof f)throw new Sr(Un);var _=function(){var w=arguments,S=f?f.apply(this,w):w[0],P=_.cache;if(P.has(S))return P.get(S);var H=u.apply(this,w);return _.cache=P.set(S,H)||P,H};return _.cache=new(Yd.Cache||pa),_}function Sv(u){if("function"!=typeof u)throw new Sr(Un);return function(){var f=arguments;switch(f.length){case 0:return!u.call(this);case 1:return!u.call(this,f[0]);case 2:return!u.call(this,f[0],f[1]);case 3:return!u.call(this,f[0],f[1],f[2])}return!u.apply(this,f)}}Yd.Cache=pa;var qx=zd(function(u,f){var _=(f=1==f.length&&rn(f[0])?mi(f[0],Br(Lt())):mi(Xn(f,1),Br(Lt()))).length;return pn(function(w){for(var S=-1,P=Zr(w.length,_);++S=f}),Fc=Bd(function(){return arguments}())?Bd:function(u){return Pi(u)&&ii.call(u,"callee")&&!Ad.call(u,"callee")},rn=oe.isArray,FF=m_?Br(m_):function xA(u){return Pi(u)&&es(u)==zu};function eo(u){return null!=u&&Vp(u.length)&&!zl(u)}function xi(u){return Pi(u)&&eo(u)}var rl=uF||Qd,Jx=D0?Br(D0):function vF(u){return Pi(u)&&es(u)==mc};function Bp(u){if(!Pi(u))return!1;var f=es(u);return f==md||f==AE||"string"==typeof u.message&&"string"==typeof u.name&&!to(u)}function zl(u){if(!wi(u))return!1;var f=es(u);return f==Of||f==d0||f==EE||f==TE}function Up(u){return"number"==typeof u&&u==dn(u)}function Vp(u){return"number"==typeof u&&u>-1&&u%1==0&&u<=Wa}function wi(u){var f=typeof u;return null!=u&&("object"==f||"function"==f)}function Pi(u){return null!=u&&"object"==typeof u}var Tv=Ot?Br(Ot):function wA(u){return Pi(u)&&zr(u)==Bo};function wh(u){return"number"==typeof u||Pi(u)&&es(u)==Vu}function to(u){if(!Pi(u)||es(u)!=ja)return!1;var f=xs(u);if(null===f)return!0;var _=ii.call(f,"constructor")&&f.constructor;return"function"==typeof _&&_ instanceof _&&Pl.call(_)==k0}var Hp=$f?Br($f):function bF(u){return Pi(u)&&es(u)==gd},nw=T0?Br(T0):function L_(u){return Pi(u)&&zr(u)==Uo};function Gp(u){return"string"==typeof u||!rn(u)&&Pi(u)&&es(u)==gc}function As(u){return"symbol"==typeof u||Pi(u)&&es(u)==Ff}var $o=Ys?Br(Ys):function q0(u){return Pi(u)&&Vp(u.length)&&!!Si[es(u)]},Pv=vp(lp),PD=vp(function(u,f){return u<=f});function Ov(u){if(!u)return[];if(eo(u))return Gp(u)?go(u):Qs(u);if(ih&&u[ih])return function rA(X){for(var ue,oe=[];!(ue=X.next()).done;)oe.push(ue.value);return oe}(u[ih]());var f=zr(u);return(f==Bo?qf:f==Uo?Hn:Bc)(u)}function sl(u){return u?(u=bo(u))===In||u===-In?(u<0?-1:1)*SE:u==u?u:0:0===u?u:0}function dn(u){var f=sl(u),_=f%1;return f==f?_?f-_:f:0}function OD(u){return u?Ll(dn(u),0,ua):0}function bo(u){if("number"==typeof u)return u;if(As(u))return Pf;if(wi(u)){var f="function"==typeof u.valueOf?u.valueOf():u;u=wi(f)?f+"":f}if("string"!=typeof u)return 0===u?u:+u;u=$n(u);var _=Ya.test(u);return _||ir.test(u)?oF(u.slice(2),_?2:8):VE.test(u)?Pf:+u}function Hl(u){return ci(u,Ds(u))}function Fn(u){return null==u?"":Zs(u)}var mt=Ar(function(u,f){if(wp(f)||eo(f))ci(f,fr(f),u);else for(var _ in f)ii.call(f,_)&&Ks(u,_,f[_])}),iw=Ar(function(u,f){ci(f,Ds(f),u)}),Gl=Ar(function(u,f,_,w){ci(f,Ds(f),u,w)}),ol=Ar(function(u,f,_,w){ci(f,fr(f),u,w)}),LD=yo(rh),Nc=pn(function(u,f){u=oi(u);var _=-1,w=f.length,S=w>2?f[2]:V;for(S&&Dr(f[0],f[1],S)&&(w=1);++_1),P}),ci(u,q_(u),_),w&&(_=Ms(_,Ci|ms|$s,xa));for(var S=f.length;S--;)dh(_,f[S]);return _}),jD=yo(function(u,f){return null==u?{}:function Z0(u,f){return Q0(u,f,function(_,w){return Uv(u,w)})}(u,f)});function Vv(u,f){if(null==u)return{};var _=mi(q_(u),function(w){return[w]});return f=Lt(f),Q0(u,_,function(w,S){return f(w,S[0])})}var aw=fh(fr),zv=fh(Ds);function Bc(u){return null==u?[]:Ju(u,fr(u))}var G=$d(function(u,f,_){return f=f.toLowerCase(),u+(_?Hv(f):f)});function Hv(u){return Kd(Fn(u).toLowerCase())}function Gv(u){return(u=Fn(u))&&u.replace(po,nA).replace(JO,"")}var s1=$d(function(u,f,_){return u+(_?"-":"")+f.toLowerCase()}),cw=$d(function(u,f,_){return u+(_?" ":"")+f.toLowerCase()}),o1=Gd("toLowerCase"),$v=$d(function(u,f,_){return u+(_?"_":"")+f.toLowerCase()}),c1=$d(function(u,f,_){return u+(_?" ":"")+Kd(f)}),fw=$d(function(u,f,_){return u+(_?" ":"")+f.toUpperCase()}),Kd=Gd("toUpperCase");function pw(u,f,_){return u=Fn(u),(f=_?V:f)===V?function nn(X){return ZE.test(X)}(u)?function fn(X){return X.match(eF)||[]}(u):function tA(X){return X.match(NE)||[]}(u):u.match(f)||[]}var jv=pn(function(u,f){try{return _s(u,V,f)}catch(_){return Bp(_)?_:new $t(_)}}),f1=yo(function(u,f){return Rn(f,function(_){_=Ho(_),zo(u,_,Oc(u[_],u))}),u});function Yv(u){return function(){return u}}var mw=Cs(),_1=Cs(!0);function is(u){return u}function $p(u){return N_("function"==typeof u?u:Ms(u,Ci))}var Xv=pn(function(u,f){return function(_){return _a(_,u,f)}}),v1=pn(function(u,f){return function(_){return _a(u,_,f)}});function gw(u,f,_){var w=fr(f),S=ga(f,w);null==_&&(!wi(f)||!S.length&&w.length)&&(_=f,f=u,u=this,S=ga(f,fr(f)));var P=!(wi(_)&&"chain"in _&&!_.chain),H=zl(u);return Rn(S,function(Y){var Q=f[Y];u[Y]=Q,H&&(u.prototype[Y]=function(){var _e=this.__chain__;if(P||_e){var ye=u(this.__wrapped__);return(ye.__actions__=Qs(this.__actions__)).push({func:Q,args:arguments,thisArg:u}),ye.__chain__=_e,ye}return Q.apply(u,kl([this.value()],arguments))})}),u}function xo(){}var _w=gp(mi),b1=gp(JE),x1=gp(Wf);function Mh(u){return px(u)?__(Ho(u)):function va(u){return function(f){return Mc(f,u)}}(u)}var Kv=sx(),Ch=sx(!0);function Sh(){return[]}function Qd(){return!1}var w1=$_(function(u,f){return u+f},0),M1=W_("ceil"),bw=$_(function(u,f){return u/f},1),C1=W_("floor"),D1=$_(function(u,f){return u*f},1),WF=W_("round"),ty=$_(function(u,f){return u-f},0);return I.after=function vD(u,f){if("function"!=typeof f)throw new Sr(Un);return u=dn(u),function(){if(--u<1)return f.apply(this,arguments)}},I.ary=xh,I.assign=mt,I.assignIn=iw,I.assignInWith=Gl,I.assignWith=ol,I.at=LD,I.before=Ca,I.bind=Oc,I.bindAll=f1,I.bindKey=xv,I.castArray=function wD(){if(!arguments.length)return[];var u=arguments[0];return rn(u)?u:[u]},I.chain=zx,I.chunk=function nv(u,f,_){f=(_?Dr(u,f,_):f===V)?1:hr(dn(f),0);var w=null==u?0:u.length;if(!w||f<1)return[];for(var S=0,P=0,H=oe(w_(w/f));SS?0:S+_),(w=w===V||w>S?S:dn(w))<0&&(w+=S),w=_>w?0:OD(w);_>>0)?(u=Fn(u))&&("string"==typeof f||null!=f&&!Hp(f))&&!(f=Zs(f))&&Cd(u)?Tc(go(u),0,_):u.split(f,_):[]},I.spread=function Kx(u,f){if("function"!=typeof u)throw new Sr(Un);return f=null==f?0:hr(dn(f),0),pn(function(_){var w=_[f],S=Tc(_,0,f);return w&&kl(S,w),_s(u,this,S)})},I.tail=function Pc(u){var f=null==u?0:u.length;return f?ts(u,1,f):[]},I.take=function Ox(u,f,_){return u&&u.length?ts(u,0,(f=_||f===V?1:dn(f))<0?0:f):[]},I.takeRight=function Fx(u,f,_){var w=null==u?0:u.length;return w?ts(u,(f=w-(f=_||f===V?1:dn(f)))<0?0:f,w):[]},I.takeRightWhile=function QA(u,f){return u&&u.length?uh(u,Lt(f,3),!1,!0):[]},I.takeWhile=function IF(u,f){return u&&u.length?uh(u,Lt(f,3)):[]},I.tap=function tD(u,f){return f(u),u},I.throttle=function Fp(u,f,_){var w=!0,S=!0;if("function"!=typeof u)throw new Sr(Un);return wi(_)&&(w="leading"in _?!!_.leading:w,S="trailing"in _?!!_.trailing:S),yD(u,f,{leading:w,maxWait:f,trailing:S})},I.thru=Ip,I.toArray=Ov,I.toPairs=aw,I.toPairsIn=zv,I.toPath=function yw(u){return rn(u)?mi(u,Ho):As(u)?[u]:Qs(yx(Fn(u)))},I.toPlainObject=Hl,I.transform=function XD(u,f,_){var w=rn(u),S=w||rl(u)||$o(u);if(f=Lt(f,4),null==_){var P=u&&u.constructor;_=S?w?new P:[]:wi(u)&&zl(P)?Pd(xs(u)):{}}return(S?Rn:ki)(u,function(H,Y,Q){return f(_,H,Y,Q)}),_},I.unary=function Zx(u){return xh(u,1)},I.union=Ap,I.unionBy=JA,I.unionWith=Lx,I.uniq=function Nx(u){return u&&u.length?ri(u):[]},I.uniqBy=function Bx(u,f){return u&&u.length?ri(u,Lt(f,2)):[]},I.uniqWith=function fv(u,f){return f="function"==typeof f?f:V,u&&u.length?ri(u,V,f):[]},I.unset=function KD(u,f){return null==u||dh(u,f)},I.unzip=Dp,I.unzipWith=yh,I.update=function ZD(u,f,_){return null==u?u:nx(u,f,hp(_))},I.updateWith=function QD(u,f,_,w){return w="function"==typeof w?w:V,null==u?u:nx(u,f,hp(_),w)},I.values=Bc,I.valuesIn=function JD(u){return null==u?[]:Ju(u,Ds(u))},I.without=Tp,I.words=pw,I.wrap=function Av(u,f){return Ev(hp(f),u)},I.xor=Ux,I.xorBy=pv,I.xorWith=mv,I.zip=gv,I.zipObject=function bh(u,f){return Dc(u||[],f||[],Ks)},I.zipObjectDeep=function eD(u,f){return Dc(u||[],f||[],Vd)},I.zipWith=Vx,I.entries=aw,I.entriesIn=zv,I.extend=iw,I.extendWith=Gl,gw(I,I),I.add=w1,I.attempt=jv,I.camelCase=G,I.capitalize=Hv,I.ceil=M1,I.clamp=function e1(u,f,_){return _===V&&(_=f,f=V),_!==V&&(_=(_=bo(_))==_?_:0),f!==V&&(f=(f=bo(f))==f?f:0),Ll(bo(u),f,_)},I.clone=function Kn(u){return Ms(u,$s)},I.cloneDeep=function CD(u){return Ms(u,Ci|$s)},I.cloneDeepWith=function Lp(u,f){return Ms(u,Ci|$s,f="function"==typeof f?f:V)},I.cloneWith=function MD(u,f){return Ms(u,$s,f="function"==typeof f?f:V)},I.conformsTo=function Qx(u,f){return null==f||R_(u,f,fr(f))},I.deburr=Gv,I.defaultTo=function g1(u,f){return null==u||u!=u?f:u},I.divide=bw,I.endsWith=function n1(u,f,_){u=Fn(u),f=Zs(f);var w=u.length,S=_=_===V?w:Ll(dn(_),0,w);return(_-=f.length)>=0&&u.slice(_,S)==f},I.eq=Go,I.escape=function r1(u){return(u=Fn(u))&&FE.test(u)?u.replace(f0,ot):u},I.escapeRegExp=function lw(u){return(u=Fn(u))&&_0.test(u)?u.replace(s_,"\\$&"):u},I.every=function vv(u,f,_){var w=rn(u)?JE:W0;return _&&Dr(u,f,_)&&(f=V),w(u,Lt(f,3))},I.find=$x,I.findIndex=Sx,I.findKey=function Fv(u,f){return ee(u,Lt(f,3),ki)},I.findLast=kp,I.findLastIndex=rv,I.findLastKey=function Lv(u,f){return ee(u,Lt(f,3),P_)},I.floor=C1,I.forEach=bv,I.forEachRight=Vl,I.forIn=function UD(u,f){return null==u?u:tl(u,Lt(f,3),Ds)},I.forInRight=function Nv(u,f){return null==u?u:Ai(u,Lt(f,3),Ds)},I.forOwn=function al(u,f){return u&&ki(u,Lt(f,3))},I.forOwnRight=function VD(u,f){return u&&P_(u,Lt(f,3))},I.get=Bv,I.gt=SD,I.gte=ED,I.has=function GD(u,f){return null!=u&&ux(u,f,sp)},I.hasIn=Uv,I.head=Ax,I.identity=is,I.includes=function aD(u,f,_,w){u=eo(u)?u:Bc(u),_=_&&!w?dn(_):0;var S=u.length;return _<0&&(_=hr(S+_,0)),Gp(u)?_<=S&&u.indexOf(f,_)>-1:!!S&&Ft(u,f,_)>-1},I.indexOf=function vh(u,f,_){var w=null==u?0:u.length;if(!w)return-1;var S=null==_?0:dn(_);return S<0&&(S=hr(w+S,0)),Ft(u,f,S)},I.inRange=function t1(u,f,_){return f=sl(f),_===V?(_=f,f=0):_=sl(_),function O_(u,f,_){return u>=Zr(f,_)&&u=-Wa&&u<=Wa},I.isSet=nw,I.isString=Gp,I.isSymbol=As,I.isTypedArray=$o,I.isUndefined=function ID(u){return u===V},I.isWeakMap=function RD(u){return Pi(u)&&zr(u)==_d},I.isWeakSet=function kD(u){return Pi(u)&&"[object WeakSet]"==es(u)},I.join=function Dx(u,f){return null==u?"":hF.call(u,f)},I.kebabCase=s1,I.last=Tr,I.lastIndexOf=function cv(u,f,_){var w=null==u?0:u.length;if(!w)return-1;var S=w;return _!==V&&(S=(S=dn(_))<0?hr(w+S,0):Zr(S,w-1)),f==f?function Sd(X,ue,oe){for(var Be=oe+1;Be--;)if(X[Be]===ue)return Be;return Be}(u,f,S):Qu(u,Yf,S,!0)},I.lowerCase=cw,I.lowerFirst=o1,I.lt=Pv,I.lte=PD,I.max=function xw(u){return u&&u.length?Ld(u,is,Nd):V},I.maxBy=function ww(u,f){return u&&u.length?Ld(u,Lt(f,2),Nd):V},I.mean=function S1(u){return Md(u,is)},I.meanBy=function E1(u,f){return Md(u,Lt(f,2))},I.min=function no(u){return u&&u.length?Ld(u,is,lp):V},I.minBy=function A1(u,f){return u&&u.length?Ld(u,Lt(f,2),lp):V},I.stubArray=Sh,I.stubFalse=Qd,I.stubObject=function vw(){return{}},I.stubString=function Zv(){return""},I.stubTrue=function Qv(){return!0},I.multiply=D1,I.nth=function Tx(u,f){return u&&u.length?CA(u,dn(f)):V},I.noConflict=function E(){return Cr._===this&&(Cr._=Kf),this},I.noop=xo,I.now=Op,I.pad=function a1(u,f,_){u=Fn(u);var w=(f=dn(f))?ur(u):0;if(!f||w>=f)return u;var S=(f-w)/2;return _p(M_(S),_)+u+_p(w_(S),_)},I.padEnd=function UF(u,f,_){u=Fn(u);var w=(f=dn(f))?ur(u):0;return f&&wf){var w=u;u=f,f=w}if(_||u%1||f%1){var S=C_();return Zr(u+S*(f-u+ke("1e-"+((S+"").length-1))),f)}return lh(u,f)},I.reduce=function dD(u,f,_){var w=rn(u)?g_:I0,S=arguments.length<3;return w(u,Lt(f,4),_,S,el)},I.reduceRight=function uD(u,f,_){var w=rn(u)?eA:I0,S=arguments.length<3;return w(u,Lt(f,4),_,S,k_)},I.repeat=function $i(u,f,_){return f=(_?Dr(u,f,_):f===V)?1:dn(f),ch(Fn(u),f)},I.replace=function l1(){var u=arguments,f=Fn(u[0]);return u.length<3?f:f.replace(u[1],u[2])},I.result=function YD(u,f,_){var w=-1,S=(f=ba(f,u)).length;for(S||(S=1,u=V);++wWa)return[];var _=ua,w=Zr(u,ua);f=Lt(f),u-=ua;for(var S=qs(w,f);++_=P)return u;var Y=_-ur(w);if(Y<1)return w;var Q=H?Tc(H,0,Y).join(""):u.slice(0,Y);if(S===V)return Q+w;if(H&&(Y+=Q.length-Y),Hp(S)){if(u.slice(Y).search(S)){var _e,ye=Q;for(S.global||(S=yc(S.source,Fn(x0.exec(S))+"g")),S.lastIndex=0;_e=S.exec(ye);)var be=_e.index;Q=Q.slice(0,be===V?Y:be)}}else if(u.indexOf(Zs(S),Y)!=Y){var Xe=Q.lastIndexOf(S);Xe>-1&&(Q=Q.slice(0,Xe))}return Q+w},I.unescape=function h1(u){return(u=Fn(u))&&OE.test(u)?u.replace(h0,Xf):u},I.uniqueId=function ey(u){var f=++yi;return Fn(u)+f},I.upperCase=fw,I.upperFirst=Kd,I.each=bv,I.eachRight=Vl,I.first=Ax,gw(I,function(){var u={};return ki(I,function(f,_){ii.call(I.prototype,_)||(u[_]=f)}),u}(),{chain:!1}),I.VERSION="4.17.21",Rn(["bind","bindKey","curry","curryRight","partial","partialRight"],function(u){I[u].placeholder=I}),Rn(["drop","take"],function(u,f){kn.prototype[u]=function(_){_=_===V?1:hr(dn(_),0);var w=this.__filtered__&&!f?new kn(this):this.clone();return w.__filtered__?w.__takeCount__=Zr(_,w.__takeCount__):w.__views__.push({size:Zr(_,ua),type:u+(w.__dir__<0?"Right":"")}),w},kn.prototype[u+"Right"]=function(_){return this.reverse()[u](_).reverse()}}),Rn(["filter","map","takeWhile"],function(u,f){var _=f+1,w=1==_||3==_;kn.prototype[u]=function(S){var P=this.clone();return P.__iteratees__.push({iteratee:Lt(S,3),type:_}),P.__filtered__=P.__filtered__||w,P}}),Rn(["head","last"],function(u,f){var _="take"+(f?"Right":"");kn.prototype[u]=function(){return this[_](1).value()[0]}}),Rn(["initial","tail"],function(u,f){var _="drop"+(f?"":"Right");kn.prototype[u]=function(){return this.__filtered__?new kn(this):this[_](1)}}),kn.prototype.compact=function(){return this.filter(is)},kn.prototype.find=function(u){return this.filter(u).head()},kn.prototype.findLast=function(u){return this.reverse().find(u)},kn.prototype.invokeMap=pn(function(u,f){return"function"==typeof u?new kn(this):this.map(function(_){return _a(_,u,f)})}),kn.prototype.reject=function(u){return this.filter(Sv(Lt(u)))},kn.prototype.slice=function(u,f){u=dn(u);var _=this;return _.__filtered__&&(u>0||f<0)?new kn(_):(u<0?_=_.takeRight(-u):u&&(_=_.drop(u)),f!==V&&(_=(f=dn(f))<0?_.dropRight(-f):_.take(f-u)),_)},kn.prototype.takeRightWhile=function(u){return this.reverse().takeWhile(u).reverse()},kn.prototype.toArray=function(){return this.take(ua)},ki(kn.prototype,function(u,f){var _=/^(?:filter|find|map|reject)|While$/.test(f),w=/^(?:head|last)$/.test(f),S=I[w?"take"+("last"==f?"Right":""):f],P=w||/^find/.test(f);S&&(I.prototype[f]=function(){var H=this.__wrapped__,Y=w?[1]:arguments,Q=H instanceof kn,_e=Y[0],ye=Q||rn(H),be=function(An){var Ln=S.apply(I,kl([An],Y));return w&&Xe?Ln[0]:Ln};ye&&_&&"function"==typeof _e&&1!=_e.length&&(Q=ye=!1);var Xe=this.__chain__,Ut=P&&!Xe,mn=Q&&!this.__actions__.length;if(!P&&ye){H=mn?H:new kn(this);var Vt=u.apply(H,Y);return Vt.__actions__.push({func:Ip,args:[be],thisArg:V}),new Ei(Vt,Xe)}return Ut&&mn?u.apply(this,Y):(Vt=this.thru(be),Ut?w?Vt.value()[0]:Vt.value():Vt)})}),Rn(["pop","push","shift","sort","splice","unshift"],function(u){var f=rr[u],_=/^(?:push|sort|unshift)$/.test(u)?"tap":"thru",w=/^(?:pop|shift)$/.test(u);I.prototype[u]=function(){var S=arguments;if(w&&!this.__chain__){var P=this.value();return f.apply(rn(P)?P:[],S)}return this[_](function(H){return f.apply(rn(H)?H:[],S)})}}),ki(kn.prototype,function(u,f){var _=I[f];if(_){var w=_.name+"";ii.call(Rd,w)||(Rd[w]=[]),Rd[w].push({name:f,func:_})}}),Rd[Wd(V,dr).name]=[{name:"wrapper",func:V}],kn.prototype.clone=function B0(){var u=new kn(this.__wrapped__);return u.__actions__=Qs(this.__actions__),u.__dir__=this.__dir__,u.__filtered__=this.__filtered__,u.__iteratees__=Qs(this.__iteratees__),u.__takeCount__=this.__takeCount__,u.__views__=Qs(this.__views__),u},kn.prototype.reverse=function Od(){if(this.__filtered__){var u=new kn(this);u.__dir__=-1,u.__filtered__=!0}else(u=this.clone()).__dir__*=-1;return u},kn.prototype.value=function ws(){var u=this.__wrapped__.value(),f=this.__dir__,_=rn(u),w=f<0,S=_?u.length:0,P=function xp(u,f,_){for(var w=-1,S=_.length;++w=this.__values__.length;return{done:u,value:u?V:this.__values__[this.__index__++]}},I.prototype.plant=function nD(u){for(var f,_=this;_ instanceof xc;){var w=ns(_);w.__index__=0,w.__values__=V,f?S.__wrapped__=w:f=w;var S=w;_=_.__wrapped__}return S.__wrapped__=u,f},I.prototype.reverse=function iD(){var u=this.__wrapped__;if(u instanceof kn){var f=u;return this.__actions__.length&&(f=new kn(this)),(f=f.reverse()).__actions__.push({func:Ip,args:[dv],thisArg:V}),new Ei(f,this.__chain__)}return this.thru(dv)},I.prototype.toJSON=I.prototype.valueOf=I.prototype.value=function RF(){return ya(this.__wrapped__,this.__actions__)},I.prototype.first=I.prototype.head,ih&&(I.prototype[ih]=function jd(){return this}),I}();Cr._=ys,(cn=function(){return ys}.call(Hs,ps,Hs,Lo))!==V&&(Lo.exports=cn)}.call(this)},738:function(Lo){var Hs;Lo.exports=((Hs=function(){function ps(Mi){return Nr.appendChild(Mi.dom),Mi}function cn(Mi){for(var Ci=0;CiZt+1e3&&(Al.update(1e3*Un/(Mi-Zt),100),Zt=Mi,Un=0,Gs)){var Ci=performance.memory;Gs.update(Ci.usedJSHeapSize/1048576,Ci.jsHeapSizeLimit/1048576)}return Mi},update:function(){Kr=this.end()},domElement:Nr,setMode:cn}}).Panel=function(ps,cn,V){var Nr=1/0,Kr=0,Zt=Math.round,Un=Zt(window.devicePixelRatio||1),Al=80*Un,Ha=48*Un,Gs=3*Un,Mi=2*Un,Ci=3*Un,ms=15*Un,$s=74*Un,Ws=30*Un,No=document.createElement("canvas");No.width=Al,No.height=Ha,No.style.cssText="width:80px;height:48px";var On=No.getContext("2d");return On.font="bold "+9*Un+"px Helvetica,Arial,sans-serif",On.textBaseline="top",On.fillStyle=V,On.fillRect(0,0,Al,Ha),On.fillStyle=cn,On.fillText(ps,Gs,Mi),On.fillRect(Ci,ms,$s,Ws),On.fillStyle=V,On.globalAlpha=.9,On.fillRect(Ci,ms,$s,Ws),{dom:No,update:function(dr,pc){Nr=Math.min(Nr,dr),Kr=Math.max(Kr,dr),On.fillStyle=V,On.globalAlpha=1,On.fillRect(0,0,Al,ms),On.fillStyle=cn,On.fillText(Zt(dr)+" "+ps+" ("+Zt(Nr)+"-"+Zt(Kr)+")",Gs,Mi),On.drawImage(No,Ci+Un,ms,$s-Un,Ws,Ci,ms,$s-Un,Ws),On.fillRect(Ci+$s-Un,ms,Un,Ws),On.fillStyle=V,On.globalAlpha=.9,On.fillRect(Ci+$s-Un,ms,Un,Zt((1-dr/pc)*Ws))}}},Hs)}},Lo=>{Lo(Lo.s=790)}]); \ No newline at end of file +(self.webpackChunkgui=self.webpackChunkgui||[]).push([[179],{790:(No,Gs,ps)=>{"use strict";function cn(i){return"function"==typeof i}function V(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 Nr=V(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 Kr(i,t){if(i){const e=i.indexOf(t);0<=e&&i.splice(e,1)}}class Zt{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(cn(n))try{n()}catch(s){t=s instanceof Nr?s.errors:[s]}const{_finalizers:r}=this;if(r){this._finalizers=null;for(const s of r)try{Ha(s)}catch(o){t=t??[],o instanceof Nr?t=[...t,...o.errors]:t.push(o)}}if(t)throw new Nr(t)}}add(t){var e;if(t&&t!==this)if(this.closed)Ha(t);else{if(t instanceof Zt){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)&&Kr(e,t)}remove(t){const{_finalizers:e}=this;e&&Kr(e,t),t instanceof Zt&&t._removeParent(this)}}Zt.EMPTY=(()=>{const i=new Zt;return i.closed=!0,i})();const Un=Zt.EMPTY;function Al(i){return i instanceof Zt||i&&"closed"in i&&cn(i.remove)&&cn(i.add)&&cn(i.unsubscribe)}function Ha(i){cn(i)?i():i.unsubscribe()}const $s={onUnhandledError:null,onStoppedNotification:null,Promise:void 0,useDeprecatedSynchronousErrorHandling:!1,useDeprecatedNextContext:!1},Mi={setTimeout(i,t,...e){const{delegate:n}=Mi;return n?.setTimeout?n.setTimeout(i,t,...e):setTimeout(i,t,...e)},clearTimeout(i){const{delegate:t}=Mi;return(t?.clearTimeout||clearTimeout)(i)},delegate:void 0};function Ci(i){Mi.setTimeout(()=>{const{onUnhandledError:t}=$s;if(!t)throw i;t(i)})}function ms(){}const Ws=On("C",void 0,void 0);function On(i,t,e){return{kind:i,value:t,error:e}}let dr=null;function pc(i){if($s.useDeprecatedSynchronousErrorHandling){const t=!dr;if(t&&(dr={errorThrown:!1,error:null}),i(),t){const{errorThrown:e,error:n}=dr;if(dr=null,e)throw n}}else i()}class Dl extends Zt{constructor(t){super(),this.isStopped=!1,t?(this.destination=t,Al(t)&&t.add(this)):this.destination=ME}static create(t,e,n){return new ua(t,e,n)}next(t){this.isStopped?Xg(function Bo(i){return On("N",i,void 0)}(t),this):this._next(t)}error(t){this.isStopped?Xg(function js(i){return On("E",void 0,i)}(t),this):(this.isStopped=!0,this._error(t))}complete(){this.isStopped?Xg(Ws,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 da=Function.prototype.bind;function Tl(i,t){return da.call(i,t)}class Ga{constructor(t){this.partialObserver=t}next(t){const{partialObserver:e}=this;if(e.next)try{e.next(t)}catch(n){pd(n)}}error(t){const{partialObserver:e}=this;if(e.error)try{e.error(t)}catch(n){pd(n)}else pd(t)}complete(){const{partialObserver:t}=this;if(t.complete)try{t.complete()}catch(e){pd(e)}}}class ua extends Dl{constructor(t,e,n){let r;if(super(),cn(t)||!t)r={next:t??void 0,error:e??void 0,complete:n??void 0};else{let s;this&&$s.useDeprecatedNextContext?(s=Object.create(t),s.unsubscribe=()=>this.unsubscribe(),r={next:t.next&&Tl(t.next,s),error:t.error&&Tl(t.error,s),complete:t.complete&&Tl(t.complete,s)}):r=t}this.destination=new Ga(r)}}function pd(i){$s.useDeprecatedSynchronousErrorHandling?function ca(i){$s.useDeprecatedSynchronousErrorHandling&&dr&&(dr.errorThrown=!0,dr.error=i)}(i):Ci(i)}function Xg(i,t){const{onStoppedNotification:e}=$s;e&&Mi.setTimeout(()=>e(i,t))}const ME={closed:!0,next:ms,error:function wE(i){throw i},complete:ms},Kg="function"==typeof Symbol&&Symbol.observable||"@@observable";function $a(i){return i}function a0(i){return 0===i.length?$a:1===i.length?i[0]:function(e){return i.reduce((n,r)=>r(n),e)}}let In=(()=>{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 Pf(i){return i&&i instanceof Dl||function SE(i){return i&&cn(i.next)&&cn(i.error)&&cn(i.complete)}(i)&&Al(i)}(e)?e:new ua(e,n,r);return pc(()=>{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=Wa(n))((r,s)=>{const o=new ua({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)}[Kg](){return this}pipe(...e){return a0(e)(this)}toPromise(e){return new(e=Wa(e))((n,r)=>{let s;this.subscribe(o=>s=o,o=>r(o),()=>n(s))})}}return i.create=t=>new i(t),i})();function Wa(i){var t;return null!==(t=i??$s.Promise)&&void 0!==t?t:Promise}const ha=V(i=>function(){i(this),this.name="ObjectUnsubscribedError",this.message="object unsubscribed"});let Re=(()=>{class i extends In{constructor(){super(),this.closed=!1,this.currentObservers=null,this.observers=[],this.isStopped=!1,this.hasError=!1,this.thrownError=null}lift(e){const n=new l0(this,this);return n.operator=e,n}_throwIfClosed(){if(this.closed)throw new ha}next(e){pc(()=>{if(this._throwIfClosed(),!this.isStopped){this.currentObservers||(this.currentObservers=Array.from(this.observers));for(const n of this.currentObservers)n.next(e)}})}error(e){pc(()=>{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(){pc(()=>{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?Un:(this.currentObservers=null,s.push(e),new Zt(()=>{this.currentObservers=null,Kr(s,e)}))}_checkFinalizedStatuses(e){const{hasError:n,thrownError:r,isStopped:s}=this;n?e.error(r):s&&e.complete()}asObservable(){const e=new In;return e.source=this,e}}return i.create=(t,e)=>new l0(t,e),i})();class l0 extends Re{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:Un}}function c0(i){return cn(i?.lift)}function ti(i){return t=>{if(c0(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 Yn(i,t,e,n,r){return new EE(i,t,e,n,r)}class EE extends Dl{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 et(i,t){return ti((e,n)=>{let r=0;e.subscribe(Yn(n,s=>{n.next(i.call(t,s,r++))}))})}function fa(i){return this instanceof fa?(this.v=i,this):new fa(i)}function Nf(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 Zg(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 i_=i=>i&&"number"==typeof i.length&&"function"!=typeof i;function r_(i){return cn(i?.then)}function p0(i){return cn(i[Kg])}function m0(i){return Symbol.asyncIterator&&cn(i?.[Symbol.asyncIterator])}function g0(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 _0=function s_(){return"function"==typeof Symbol&&Symbol.iterator?Symbol.iterator:"@@iterator"}();function Bf(i){return cn(i?.[_0])}function v0(i){return function Lf(i,t,e){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var r,n=e.apply(i,t||[]),s=[];return r=Object.create(("function"==typeof AsyncIterator?AsyncIterator:Object).prototype),a("next"),a("throw"),a("return",function o(m){return function(g){return Promise.resolve(g).then(m,h)}}),r[Symbol.asyncIterator]=function(){return this},r;function a(m,g){n[m]&&(r[m]=function(b){return new Promise(function(v,y){s.push([m,b,v,y])>1||l(m,b)})},g&&(r[m]=g(r[m])))}function l(m,g){try{!function c(m){m.value instanceof fa?Promise.resolve(m.value.v).then(d,h):p(s[0][2],m)}(n[m](g))}catch(b){p(s[0][3],b)}}function d(m){l("next",m)}function h(m){l("throw",m)}function p(m,g){m(g),s.shift(),s.length&&l(s[0][0],s[0][1])}}(this,arguments,function*(){const e=i.getReader();try{for(;;){const{value:n,done:r}=yield fa(e.read());if(r)return yield fa(void 0);yield yield fa(n)}}finally{e.releaseLock()}})}function y0(i){return cn(i?.getReader)}function wr(i){if(i instanceof In)return i;if(null!=i){if(p0(i))return function LE(i){return new In(t=>{const e=i[Kg]();if(cn(e.subscribe))return e.subscribe(t);throw new TypeError("Provided object does not correctly implement Symbol.observable")})}(i);if(i_(i))return function NE(i){return new In(t=>{for(let e=0;e{i.then(e=>{t.closed||(t.next(e),t.complete())},e=>t.error(e)).then(null,Ci)})}(i);if(m0(i))return b0(i);if(Bf(i))return function UE(i){return new In(t=>{for(const e of i)if(t.next(e),t.closed)return;t.complete()})}(i);if(y0(i))return function x0(i){return b0(v0(i))}(i)}throw g0(i)}function b0(i){return new In(t=>{(function VE(i,t){var e,n,r,s;return function gd(i,t,e,n){return new(e||(e=Promise))(function(s,o){function a(d){try{c(n.next(d))}catch(h){o(h)}}function l(d){try{c(n.throw(d))}catch(h){o(h)}}function c(d){d.done?s(d.value):function r(s){return s instanceof e?s:new e(function(o){o(s)})}(d.value).then(a,l)}c((n=n.apply(i,t||[])).next())})}(this,void 0,void 0,function*(){try{for(e=Nf(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 Ya(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 ir(i,t,e=1/0){return cn(t)?ir((n,r)=>et((s,o)=>t(n,s,r,o))(wr(i(n,r))),e):("number"==typeof t&&(e=t),ti((n,r)=>function zE(i,t,e,n,r,s,o,a){const l=[];let c=0,d=0,h=!1;const p=()=>{h&&!l.length&&!c&&t.complete()},m=b=>c{s&&t.next(b),c++;let v=!1;wr(e(b,d++)).subscribe(Yn(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(Yn(t,m,()=>{h=!0,p()})),()=>{a?.()}}(n,r,i,e)))}function yd(i=1/0){return ir($a,i)}const mo=new In(i=>i.complete());function Gu(i){return i&&cn(i.schedule)}function a_(i){return i[i.length-1]}function w0(i){return cn(a_(i))?i.pop():void 0}function $u(i){return Gu(a_(i))?i.pop():void 0}function l_(i,t=0){return ti((e,n)=>{e.subscribe(Yn(n,r=>Ya(n,i,()=>n.next(r),t),()=>Ya(n,i,()=>n.complete(),t),r=>Ya(n,i,()=>n.error(r),t)))})}function c_(i,t=0){return ti((e,n)=>{n.add(i.schedule(()=>e.subscribe(n),t))})}function d_(i,t){if(!i)throw new Error("Iterable cannot be null");return new In(e=>{Ya(e,t,()=>{const n=i[Symbol.asyncIterator]();Ya(e,t,()=>{n.next().then(r=>{r.done?e.complete():e.next(r.value)})},0,!0)})})}function Li(i,t){return t?function S0(i,t){if(null!=i){if(p0(i))return function GE(i,t){return wr(i).pipe(c_(t),l_(t))}(i,t);if(i_(i))return function WE(i,t){return new In(e=>{let n=0;return t.schedule(function(){n===i.length?e.complete():(e.next(i[n++]),e.closed||this.schedule())})})}(i,t);if(r_(i))return function $E(i,t){return wr(i).pipe(c_(t),l_(t))}(i,t);if(m0(i))return d_(i,t);if(Bf(i))return function jE(i,t){return new In(e=>{let n;return Ya(e,t,()=>{n=i[_0](),Ya(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)}),()=>cn(n?.return)&&n.return()})}(i,t);if(y0(i))return function C0(i,t){return d_(v0(i),t)}(i,t)}throw g0(i)}(i,t):wr(i)}function Mr(...i){const t=$u(i),e=function M0(i,t){return"number"==typeof a_(i)?i.pop():t}(i,1/0),n=i;return n.length?1===n.length?wr(n[0]):yd(e)(Li(n,t)):mo}function Uf(i={}){const{connector:t=(()=>new Re),resetOnError:e=!0,resetOnComplete:n=!0,resetOnRefCountZero:r=!0}=i;return s=>{let o,a,l,c=0,d=!1,h=!1;const p=()=>{a?.unsubscribe(),a=void 0},m=()=>{p(),o=l=void 0,d=h=!1},g=()=>{const b=o;m(),b?.unsubscribe()};return ti((b,v)=>{c++,!h&&!d&&p();const y=l=l??t();v.add(()=>{c--,0===c&&!h&&!d&&(a=bd(g,r))}),y.subscribe(v),!o&&c>0&&(o=new ua({next:M=>y.next(M),error:M=>{h=!0,p(),a=bd(m,e,M),y.error(M)},complete:()=>{d=!0,p(),a=bd(m,n),y.complete()}}),wr(b).subscribe(o))})(s)}}function bd(i,t,...e){if(!0===t)return void i();if(!1===t)return;const n=new ua({next:()=>{n.unsubscribe(),i()}});return wr(t(...e)).subscribe(n)}function li(i){for(let t in i)if(i[t]===li)return t;throw Error("Could not find renamed property on target object.")}function u_(i,t){for(const e in t)t.hasOwnProperty(e)&&!i.hasOwnProperty(e)&&(i[e]=t[e])}function pi(i){if("string"==typeof i)return i;if(Array.isArray(i))return"["+i.map(pi).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 Vf(i,t){return null==i||""===i?null===t?"":t:null==t||""===t?i:i+" "+t}const h_=li({__forward_ref__:li});function Gn(i){return i.__forward_ref__=Gn,i.toString=function(){return pi(this())},i}function Pt(i){return Wu(i)?i():i}function Wu(i){return"function"==typeof i&&i.hasOwnProperty(h_)&&i.__forward_ref__===Gn}function ju(i){return i&&!!i.\u0275providers}const qu="https://g.co/ng/security#xss";class pe extends Error{constructor(t,e){super(zf(t,e)),this.code=t}}function zf(i,t){return`NG0${Math.abs(i)}${t?": "+t.trim():""}`}function Qt(i){return"string"==typeof i?i:null==i?"":String(i)}function Hf(i,t){throw new pe(-201,!1)}function En(i,t){null==i&&function ni(i,t,e,n){throw new Error(`ASSERTION ERROR: ${i}`+(null==n?"":` [Expected=> ${e} ${n} ${t} <=Actual]`))}(t,i,null,"!=")}function ke(i){return{token:i.token,providedIn:i.providedIn||null,factory:i.factory,value:void 0}}function Kt(i){return{providers:i.providers||[],imports:i.imports||[]}}function Gf(i){return f_(i,xd)||f_(i,m_)}function f_(i,t){return i.hasOwnProperty(t)?i[t]:null}function p_(i){return i&&(i.hasOwnProperty(gs)||i.hasOwnProperty(D0))?i[gs]:null}const xd=li({\u0275prov:li}),gs=li({\u0275inj:li}),m_=li({ngInjectableDef:li}),D0=li({ngInjectorDef:li});var Ot=(()=>((Ot=Ot||{})[Ot.Default=0]="Default",Ot[Ot.Host=1]="Host",Ot[Ot.Self=2]="Self",Ot[Ot.SkipSelf=4]="SkipSelf",Ot[Ot.Optional=8]="Optional",Ot))();let $f;function qs(i){const t=$f;return $f=i,t}function _s(i,t,e){const n=Gf(i);return n&&"root"==n.providedIn?void 0===n.value?n.value=n.factory():n.value:e&Ot.Optional?null:void 0!==t?t:void Hf(pi(i))}const Rn=(()=>typeof globalThis<"u"&&globalThis||typeof global<"u"&&global||typeof window<"u"&&window||typeof self<"u"&&typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&self)(),Rl={},Ku="__NG_DI_FLAG__",mi="ngTempTokenPath",kl="ngTokenPath",g_=/\n/gm,eA="\u0275",Wf="__source";let Zu;function wd(i){const t=Zu;return Zu=i,t}function tA(i,t=Ot.Default){if(void 0===Zu)throw new pe(-203,!1);return null===Zu?_s(i,void 0,t):Zu.get(i,t&Ot.Optional?null:void 0,t)}function ee(i,t=Ot.Default){return(function T0(){return $f}()||tA)(Pt(i),t)}function Ft(i,t=Ot.Default){return ee(i,jf(t))}function jf(i){return typeof i>"u"||"number"==typeof i?i:0|(i.optional&&8)|(i.host&&1)|(i.self&&2)|(i.skipSelf&&4)}function Yf(i){const t=[];for(let e=0;e((go=go||{})[go.OnPush=0]="OnPush",go[go.Default=1]="Default",go))(),Xs=(()=>{return(i=Xs||(Xs={}))[i.Emulated=0]="Emulated",i[i.None=2]="None",i[i.ShadowDom=3]="ShadowDom",Xs;var i})();const Xa={},$n=[],Br=li({\u0275cmp:li}),Ju=li({\u0275dir:li}),vc=li({\u0275pipe:li}),y_=li({\u0275mod:li}),pa=li({\u0275fac:li}),eh=li({__NG_ELEMENT_ID__:li});let nA=0;function ot(i){return qa(()=>{const t=_o(i),e={...t,decls:i.decls,vars:i.vars,template:i.template,consts:i.consts||null,ngContentSelectors:i.ngContentSelectors,onPush:i.changeDetection===go.OnPush,directiveDefs:null,pipeDefs:null,dependencies:t.standalone&&i.dependencies||null,getStandaloneInjector:null,data:i.data||{},encapsulation:i.encapsulation||Xs.Emulated,id:"c"+nA++,styles:i.styles||$n,_:null,schemas:i.schemas||null,tView:null};b_(e);const n=i.dependencies;return e.directiveDefs=Xf(n,!1),e.pipeDefs=Xf(n,!0),e})}function th(i,t,e){const n=i.\u0275cmp;n.directiveDefs=Xf(t,!1),n.pipeDefs=Xf(e,!0)}function iA(i){return Hn(i)||Ur(i)}function Cd(i){return null!==i}function nn(i){return qa(()=>({type:i.type,bootstrap:i.bootstrap||$n,declarations:i.declarations||$n,imports:i.imports||$n,exports:i.exports||$n,transitiveCompileScopes:null,schemas:i.schemas||null,id:i.id||null}))}function qf(i,t){if(null==i)return Xa;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 ve(i){return qa(()=>{const t=_o(i);return b_(t),t})}function Hi(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 Hn(i){return i[Br]||null}function Ur(i){return i[Ju]||null}function vs(i){return i[vc]||null}function ur(i,t){const e=i[y_]||null;if(!e&&!0===t)throw new Error(`Type ${pi(i)} does not have '\u0275mod' property.`);return e}function _o(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||$n,viewQuery:i.viewQuery||null,features:i.features||null,setInput:null,findHostDirectiveDefs:null,hostDirectives:null,inputs:qf(i.inputs,t),outputs:qf(i.outputs)}}function b_(i){i.features?.forEach(t=>t(i))}function Xf(i,t){if(!i)return null;const e=t?vs:iA;return()=>("function"==typeof i?i():i).map(n=>e(n)).filter(Cd)}const Ka=0,at=1,fn=2,Ni=3,ys=4,X=5,ue=6,oe=7,Be=8,$t=9,Vn=10,yt=11,oi=12,yc=13,R0=14,Sr=15,rr=16,nh=17,zo=18,Ks=19,Pl=20,ii=21,yi=22,Ed=1,k0=2,Kf=7,Zf=8,Za=9,Bi=10;function bs(i){return Array.isArray(i)&&"object"==typeof i[Ed]}function xs(i){return Array.isArray(i)&&!0===i[Ed]}function Qf(i){return 0!=(4&i.flags)}function Ad(i){return i.componentOffset>-1}function bc(i){return 1==(1&i.flags)}function vo(i){return!!i.template}function ih(i){return 0!=(256&i[fn])}function Qa(i,t){return i.hasOwnProperty(pa)?i[pa]:null}class Td{constructor(t,e,n){this.previousValue=t,this.currentValue=e,this.firstChange=n}isFirstChange(){return this.firstChange}}function bi(){return Id}function Id(i){return i.type.prototype.ngOnChanges&&(i.setInput=Rd),tp}function tp(){const i=N0(this),t=i?.current;if(t){const e=i.previous;if(e===Xa)i.previous=t;else for(let n in t)e[n]=t[n];i.current=null,this.ngOnChanges(t)}}function Rd(i,t,e,n){const r=this.declaredInputs[e],s=N0(i)||function lA(i,t){return i[L0]=t}(i,{previous:Xa,current:null}),o=s.current||(s.current={}),a=s.previous,l=a[r];o[r]=new Td(l&&l.currentValue,t,a===Xa),i[n]=t}bi.ngInherit=!0;const L0="__ngSimpleChanges__";function N0(i){return i[L0]||null}const Qr=function(i,t,e){},kd="svg";function I(i){for(;Array.isArray(i);)i=i[Ka];return i}function xc(i,t){return I(t[i])}function Ei(i,t){return I(t[i.index])}function B0(i,t){return i.data[t]}function Od(i,t){return i[t]}function ws(i,t){const e=t[i];return bs(e)?e:e[Ka]}function np(i){return 64==(64&i[fn])}function Ol(i,t){return null==t?null:i[t]}function U0(i){i[zo]=0}function A_(i,t){i[X]+=t;let e=i,n=i[Ni];for(;null!==n&&(1===t&&1===e[X]||-1===t&&0===e[X]);)n[X]+=t,e=n,n=n[Ni]}const kt={lFrame:el(null),bindingsEnabled:!0};function ma(){return kt.bindingsEnabled}function Se(){return kt.lFrame.lView}function zn(){return kt.lFrame.tView}function an(i){return kt.lFrame.contextLView=i,i[Be]}function zt(i){return kt.lFrame.contextLView=null,i}function Er(){let i=z0();for(;null!==i&&64===i.type;)i=i.parent;return i}function z0(){return kt.lFrame.currentTNode}function ga(i,t){const e=kt.lFrame;e.currentTNode=i,e.isParent=t}function D_(){return kt.lFrame.isParent}function T_(){kt.lFrame.isParent=!1}function Vr(){const i=kt.lFrame;let t=i.bindingRootIndex;return-1===t&&(t=i.bindingRootIndex=i.tView.bindingStartIndex),t}function Fl(){return kt.lFrame.bindingIndex++}function Zs(i){const t=kt.lFrame,e=t.bindingIndex;return t.bindingIndex=t.bindingIndex+i,e}function $0(i,t){const e=kt.lFrame;e.bindingIndex=e.bindingRootIndex=i,Ho(t)}function Ho(i){kt.lFrame.currentDirectiveIndex=i}function rh(i){const t=kt.lFrame.currentDirectiveIndex;return-1===t?null:i[t]}function Ll(){return kt.lFrame.currentQueryIndex}function Ms(i){kt.lFrame.currentQueryIndex=i}function vA(i){const t=i[at];return 2===t.type?t.declTNode:1===t.type?i[ue]:null}function R_(i,t,e){if(e&Ot.SkipSelf){let r=t,s=i;for(;!(r=r.parent,null!==r||e&Ot.Host||(r=vA(s),null===r||(s=s[Sr],10&r.type))););if(null===r)return!1;t=r,i=s}const n=kt.lFrame=Fd();return n.currentTNode=t,n.lView=i,!0}function rp(i){const t=Fd(),e=i[at];kt.lFrame=t,t.currentTNode=e.firstChild,t.lView=i,t.tView=e,t.contextLView=i,t.bindingIndex=e.bindingStartIndex,t.inI18n=!1}function Fd(){const i=kt.lFrame,t=null===i?null:i.child;return null===t?el(i):t}function el(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 k_(){const i=kt.lFrame;return kt.lFrame=i.parent,i.currentTNode=null,i.lView=null,i}const W0=k_;function Ld(){const i=k_();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 Xn(){return kt.lFrame.selectedIndex}function tl(i){kt.lFrame.selectedIndex=i}function Ai(){const i=kt.lFrame;return B0(i.tView,i.selectedIndex)}function Ri(){kt.lFrame.currentNamespace=kd}function _a(){!function Mc(){kt.lFrame.currentNamespace=null}()}function Nd(i,t){for(let e=t.directiveStart,n=t.directiveEnd;e=n)break}else t[l]<0&&(i[zo]+=65536),(a>11>16&&(3&i[fn])===t){i[fn]+=2048,Qr(4,a,s);try{s.call(a)}finally{Qr(5,a,s)}}}else{Qr(4,a,s);try{s.call(a)}finally{Qr(5,a,s)}}}const va=-1;class Bd{constructor(t,e,n){this.factory=t,this.resolving=!1,this.canSeeViewProviders=e,this.injectImpl=n}}function L_(i,t,e){let n=0;for(;nt){o=s-1;break}}}for(;s>16}(i),n=t;for(;e>0;)n=n[Sr],e--;return n}let Ud=!0;function cp(i){const t=Ud;return Ud=i,t}const B_=255,Z0=5;let Q0=0;const ya={};function ah(i,t){const e=J0(i,t);if(-1!==e)return e;const n=t[at];n.firstCreatePass&&(i.injectorIndex=t.length,lh(n.data,i),lh(t,null),lh(n.blueprint,null));const r=ch(i,t),s=i.injectorIndex;if(lp(r)){const o=sh(r),a=oh(r,t),l=a[at].data;for(let c=0;c<8;c++)t[s+c]=a[o+c]|l[o+c]}return t[s+8]=r,s}function lh(i,t){i.push(0,0,0,0,0,0,0,0,t)}function J0(i,t){return-1===i.injectorIndex||i.parent&&i.parent.injectorIndex===i.injectorIndex||null===t[i.injectorIndex+8]?-1:i.injectorIndex}function ch(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=uh(r),null===n)return va;if(e++,r=r[Sr],-1!==n.injectorIndex)return n.injectorIndex|e<<16}return va}function pn(i,t,e){!function U_(i,t,e){let n;"string"==typeof e?n=e.charCodeAt(0)||0:e.hasOwnProperty(eh)&&(n=e[eh]),null==n&&(n=e[eh]=Q0++);const r=n&B_;t.data[i+(r>>Z0)]|=1<=0?t&B_:Qs:t}(e);if("function"==typeof s){if(!R_(t,i,n))return n&Ot.Host?ex(r,0,n):Vd(t,e,n,r);try{const o=s(n);if(null!=o||n&Ot.Optional)return o;Hf()}finally{W0()}}else if("number"==typeof s){let o=null,a=J0(i,t),l=va,c=n&Ot.Host?t[rr][ue]:null;for((-1===a||n&Ot.SkipSelf)&&(l=-1===a?ch(i,t):t[a+8],l!==va&&z_(n,!1)?(o=t[at],a=sh(l),t=oh(l,t)):a=-1);-1!==a;){const d=t[at];if(up(s,a,d.data)){const h=EA(a,t,e,o,n,c);if(h!==ya)return h}l=t[a+8],l!==va&&z_(n,t[at].data[a+8]===c)&&up(s,a,t)?(o=d,a=sh(l),t=oh(l,t)):a=-1}}return r}function EA(i,t,e,n,r,s){const o=t[at],a=o.data[i+8],d=ts(a,o,e,null==n?Ad(a)&&Ud:n!=o&&0!=(3&a.type),r&Ot.Host&&s===a);return null!==d?Ec(t,o,d,a):ya}function ts(i,t,e,n,r){const s=i.providerIndexes,o=t.data,a=1048575&s,l=i.directiveStart,d=s>>20,p=r?a+d:i.directiveEnd;for(let m=n?a:a+d;m=l&&g.type===e)return m}if(r){const m=o[l];if(m&&vo(m)&&m.type===e)return l}return null}function Ec(i,t,e,n){let r=i[e];const s=t.data;if(function xA(i){return i instanceof Bd}(r)){const o=r;o.resolving&&function E0(i,t){const e=t?`. Dependency path: ${t.join(" > ")} > ${i}`:"";throw new pe(-200,`Circular dependency in DI detected for ${i}${e}`)}(function qn(i){return"function"==typeof i?i.name||i.toString():"object"==typeof i&&null!=i&&"function"==typeof i.type?i.type.name||i.type.toString():Qt(i)}(s[e]));const a=cp(o.canSeeViewProviders);o.resolving=!0;const l=o.injectImpl?qs(o.injectImpl):null;R_(i,n,Ot.Default);try{r=i[e]=o.factory(void 0,s,i,n),t.firstCreatePass&&e>=n.directiveStart&&function es(i,t,e){const{ngOnChanges:n,ngOnInit:r,ngDoCheck:s}=t.type.prototype;if(n){const o=Id(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&&qs(l),cp(a),o.resolving=!1,W0()}}return r}function up(i,t,e){return!!(e[t+(i>>Z0)]&1<{const t=i.prototype.constructor,e=t[pa]||dh(t),n=Object.prototype;let r=Object.getPrototypeOf(i.prototype).constructor;for(;r&&r!==n;){const s=r[pa]||dh(r);if(s&&s!==e)return s;r=Object.getPrototypeOf(r)}return s=>new s})}function dh(i){return Wu(i)?()=>{const t=dh(Pt(i));return t&&t()}:Qa(i)}function uh(i){const t=i[at],e=t.type;return 2===e?t.declTNode:1===e?i[ue]:null}function ba(i){return function SA(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 xa(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,d){const h=l.hasOwnProperty(Dc)?l[Dc]:Object.defineProperty(l,Dc,{value:[]})[Dc];for(;h.length<=d;)h.push(null);return(h[d]=h[d]||[]).push(o),l}}return e&&(r.prototype=Object.create(e.prototype)),r.prototype.ngMetadataName=i,r.annotationCls=r,r})}class me{constructor(t,e){this._desc=t,this.ngMetadataName="InjectionToken",this.\u0275prov=void 0,"number"==typeof e?this.__NG_ELEMENT_ID__=e:void 0!==e&&(this.\u0275prov=ke({token:this,providedIn:e.providedIn||"root",factory:e.factory}))}get multi(){return this}toString(){return`InjectionToken ${this._desc}`}}function Ul(i,t){i.forEach(e=>Array.isArray(e)?Ul(e,t):t(e))}function G_(i,t,e){t>=i.length?i.push(e):i.splice(t,0,e)}function pp(i,t){return t>=i.length-1?i.pop():i.splice(t,1)[0]}function Gd(i,t){const e=[];for(let n=0;n=0?i[1|n]=e:(n=~n,function IA(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 Wd(i,t){const e=Ic(i,t);if(e>=0)return i[1|e]}function Ic(i,t){return function gp(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),Ss=Md(zd("Optional"),8),wa=Md(zd("SkipSelf"),4);var Es=(()=>((Es=Es||{})[Es.Important=1]="Important",Es[Es.DashCase=2]="DashCase",Es))();const Cp=new Map;let vx=0;const iv="__ngContext__";function Hr(i,t){bs(t)?(i[iv]=t[Pl],function yx(i){Cp.set(i[Pl],i)}(t)):i[iv]=t}let sv;function ov(i,t){return sv(i,t)}function vh(i){const t=i[Ni];return xs(t)?t[Ni]:t}function av(i){return Dx(i[yc])}function lv(i){return Dx(i[ys])}function Dx(i){for(;null!==i&&!xs(i);)i=i[ys];return i}function Tr(i,t,e,n,r){if(null!=n){let s,o=!1;xs(n)?s=n:bs(n)&&(o=!0,n=n[Ka]);const a=I(n);0===i&&null!==e?null==r?Ox(t,e,a):Pc(t,e,a,r||null,!0):1===i&&null!==e?Pc(t,e,a,r||null,!0):2===i?function mv(i,t,e){const n=Ap(i,t);n&&function QA(i,t,e,n){i.removeChild(t,e,n)}(i,n,t,e)}(t,a,o):3===i&&t.destroyNode(a),null!=s&&function zx(i,t,e,n,r){const s=e[Kf];s!==I(e)&&Tr(t,i,n,s,r);for(let a=Bi;a0&&(i[e-1][ys]=n[ys]);const s=pp(i,Bi+t);!function WA(i,t){bh(i,t,t[yt],2,null,null),t[Ka]=null,t[ue]=null}(n[at],n);const o=s[Ks];null!==o&&o.detachView(s[at]),n[Ni]=null,n[ys]=null,n[fn]&=-65}return n}function Rx(i,t){if(!(128&t[fn])){const e=t[yt];e.destroyNode&&bh(i,t,e,3,null,null),function qA(i){let t=i[yc];if(!t)return hv(i[at],i);for(;t;){let e=null;if(bs(t))e=t[yc];else{const n=t[Bi];n&&(e=n)}if(!e){for(;t&&!t[ys]&&t!==i;)bs(t)&&hv(t[at],t),t=t[Ni];null===t&&(t=i),bs(t)&&hv(t[at],t),e=t&&t[ys]}t=e}}(t)}}function hv(i,t){if(!(128&t[fn])){t[fn]&=-65,t[fn]|=128,function ZA(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===Xs.None||s===Xs.Emulated)return null}return Ei(n,e)}}(i,t.parent,e)}function Pc(i,t,e,n,r){i.insertBefore(t,e,n,r)}function Ox(i,t,e){i.appendChild(t,e)}function Fx(i,t,e,n,r){null!==n?Pc(i,t,e,n,r):Ox(i,t,e)}function Ap(i,t){return i.parentNode(t)}function Lx(i,t,e){return Bx(i,t,e)}let fv,Rp,vv,Bx=function Nx(i,t,e){return 40&i.type?Ei(i,e):null};function yh(i,t,e,n){const r=kx(i,n,t),s=t[yt],a=Lx(n.parent||t[ue],n,t);if(null!=r)if(Array.isArray(e))for(let l=0;li,createScript:i=>i,createScriptURL:i=>i})}catch{}return Rp}()?.createHTML(i)||i}class Vl{constructor(t){this.changingThisBreaksApplicationSecurity=t}toString(){return`SafeValue must use [property]=binding: ${this.changingThisBreaksApplicationSecurity} (see ${qu})`}}class oD extends Vl{getTypeName(){return"HTML"}}class aD extends Vl{getTypeName(){return"Style"}}class lD extends Vl{getTypeName(){return"Script"}}class cD extends Vl{getTypeName(){return"URL"}}class Pp extends Vl{getTypeName(){return"ResourceURL"}}function eo(i){return i instanceof Vl?i.changingThisBreaksApplicationSecurity:i}function Ca(i,t){const e=function dD(i){return i instanceof Vl&&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 ${qu})`)}return e===t}class gD{constructor(t){this.inertDocumentHelper=t}getInertBodyElement(t){t=""+t;try{const e=(new window.DOMParser).parseFromString(jd(t),"text/html").body;return null===e?this.inertDocumentHelper.getInertBodyElement(t):(e.removeChild(e.firstChild),e)}catch{return null}}}class _D{constructor(t){this.defaultDoc=t,this.inertDocument=this.defaultDoc.implementation.createHTMLDocument("sanitization-inert")}getInertBodyElement(t){const e=this.inertDocument.createElement("template");return e.innerHTML=jd(t),e}}const vD=/^(?!javascript:)(?:[a-z0-9+.-]+:|[^&:\/?#]*(?:[\/?#]|$))/i;function xh(i){return(i=String(i)).match(vD)?i:"unsafe:"+i}function Sa(i){const t={};for(const e of i.split(","))t[e]=!0;return t}function Oc(...i){const t={};for(const e of i)for(const n in e)e.hasOwnProperty(n)&&(t[n]=!0);return t}const xv=Sa("area,br,col,hr,img,wbr"),wv=Sa("colgroup,dd,dt,li,p,tbody,td,tfoot,th,thead,tr"),Mv=Sa("rp,rt"),Cv=Oc(xv,Oc(wv,Sa("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")),Oc(Mv,Sa("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")),Oc(Mv,wv)),Yd=Sa("background,cite,href,itemtype,longdesc,poster,src,xlink:href"),qx=Oc(Yd,Sa("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"),Sa("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")),Ev=Sa("script,style,template");class Xx{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(!Cv.hasOwnProperty(e))return this.sanitizedSomething=!0,!Ev.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();Cv.hasOwnProperty(e)&&!xv.hasOwnProperty(e)&&(this.buf.push(""))}chars(t){this.buf.push(Kx(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 bD=/[\uD800-\uDBFF][\uDC00-\uDFFF]/g,xD=/([^\#-~ |!])/g;function Kx(i){return i.replace(/&/g,"&").replace(bD,function(t){return"&#"+(1024*(t.charCodeAt(0)-55296)+(t.charCodeAt(1)-56320)+65536)+";"}).replace(xD,function(t){return"&#"+t.charCodeAt(0)+";"}).replace(//g,">")}let Fp;function Zx(i,t){let e=null;try{Fp=Fp||function Yx(i){const t=new _D(i);return function Op(){try{return!!(new window.DOMParser).parseFromString(jd(""),"text/html")}catch{return!1}}()?new gD(t):t}(i);let n=t?String(t):"";e=Fp.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=Fp.getInertBodyElement(n)}while(n!==s);return jd((new Xx).sanitizeChildren(Av(e)||e))}finally{if(e){const n=Av(e)||e;for(;n.firstChild;)n.removeChild(n.firstChild)}}}function Av(i){return"content"in i&&function wD(i){return i.nodeType===Node.ELEMENT_NODE&&"TEMPLATE"===i.nodeName}(i)?i.content:null}var Kn=(()=>((Kn=Kn||{})[Kn.NONE=0]="NONE",Kn[Kn.HTML=1]="HTML",Kn[Kn.STYLE=2]="STYLE",Kn[Kn.SCRIPT=3]="SCRIPT",Kn[Kn.URL=4]="URL",Kn[Kn.RESOURCE_URL=5]="RESOURCE_URL",Kn))();function Lp(i){const t=function xi(){const i=Se();return i&&i[oi]}();return t?t.sanitize(Kn.URL,i)||"":Ca(i,"URL")?eo(i):xh(Qt(i))}const Np=new me("ENVIRONMENT_INITIALIZER"),rl=new me("INJECTOR",-1),Jx=new me("INJECTOR_DEF_TYPES");class ew{get(t,e=Rl){if(e===Rl){const n=new Error(`NullInjectorError: No provider for ${pi(t)}!`);throw n.name="NullInjectorError",n}return e}}function AD(...i){return{\u0275providers:tw(0,i),\u0275fromNgModule:!0}}function tw(i,...t){const e=[],n=new Set;let r;return Ul(t,s=>{const o=s;Dv(o,e,[],n)&&(r||(r=[]),r.push(o))}),void 0!==r&&Bp(r,e),e}function Bp(i,t){for(let e=0;e{t.push(s)})}}function Dv(i,t,e,n){if(!(i=Pt(i)))return!1;let r=null,s=p_(i);const o=!s&&Hn(i);if(s||o){if(o&&!o.standalone)return!1;r=i}else{const l=i.ngModule;if(s=p_(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)Dv(c,t,e,n)}}else{if(!s)return!1;{if(null!=s.imports&&!a){let c;n.add(r);try{Ul(s.imports,d=>{Dv(d,t,e,n)&&(c||(c=[]),c.push(d))})}finally{}void 0!==c&&Bp(c,t)}if(!a){const c=Qa(r)||(()=>new r);t.push({provide:r,useFactory:c,deps:$n},{provide:Jx,useValue:r,multi:!0},{provide:Np,useValue:()=>ee(r),multi:!0})}const l=s.providers;null==l||a||Up(l,d=>{t.push(d)})}}return r!==i&&void 0!==i.providers}function Up(i,t){for(let e of i)ju(e)&&(e=e.\u0275providers),Array.isArray(e)?Up(e,t):t(e)}const Vp=li({provide:String,useValue:li});function wi(i){return null!==i&&"object"==typeof i&&Vp in i}function Lc(i){return"function"==typeof i}const Iv=new me("Set Injector scope."),zp={},TD={};let Rv;function wh(){return void 0===Rv&&(Rv=new ew),Rv}class no{}class Hp extends no{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,Pv(t,o=>this.processProvider(o)),this.records.set(rl,Wo(void 0,this)),r.has("environment")&&this.records.set(no,Wo(void 0,this));const s=this.records.get(Iv);null!=s&&"string"==typeof s.value&&this.scopes.add(s.value),this.injectorDefTypes=new Set(this.get(Jx.multi,$n,Ot.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=wd(this),n=qs(void 0);try{return t()}finally{wd(e),qs(n)}}get(t,e=Rl,n=Ot.Default){this.assertNotDestroyed(),n=jf(n);const r=wd(this),s=qs(void 0);try{if(!(n&Ot.SkipSelf)){let a=this.records.get(t);if(void 0===a){const l=function kD(i){return"function"==typeof i||"object"==typeof i&&i instanceof me}(t)&&Gf(t);a=l&&this.injectableDefInScope(l)?Wo(kv(t),zp):null,this.records.set(t,a)}if(null!=a)return this.hydrate(t,a)}return(n&Ot.Self?wh():this.parent).get(t,e=n&Ot.Optional&&e===Rl?null:e)}catch(o){if("NullInjectorError"===o.name){if((o[mi]=o[mi]||[]).unshift(pi(t)),r)throw o;return function v_(i,t,e,n){const r=i[mi];throw t[Wf]&&r.unshift(t[Wf]),i.message=function I0(i,t,e,n=null){i=i&&"\n"===i.charAt(0)&&i.charAt(1)==eA?i.slice(2):i;let r=pi(t);if(Array.isArray(t))r=t.map(pi).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):pi(a)))}r=`{${s.join(", ")}}`}return`${e}${n?"("+n+")":""}[${r}]: ${i.replace(g_,"\n ")}`}("\n"+i.message,r,e,n),i[kl]=r,i[mi]=null,i}(o,t,"R3InjectorError",this.source)}throw o}finally{qs(s),wd(r)}}resolveInjectorInitializers(){const t=wd(this),e=qs(void 0);try{const n=this.get(Np.multi,$n,Ot.Self);for(const r of n)r()}finally{wd(t),qs(e)}}toString(){const t=[],e=this.records;for(const n of e.keys())t.push(pi(n));return`R3Injector[${t.join(", ")}]`}assertNotDestroyed(){if(this._destroyed)throw new pe(205,!1)}processProvider(t){let e=Lc(t=Pt(t))?t:Pt(t&&t.provide);const n=function Gp(i){return wi(i)?Wo(void 0,i.useValue):Wo(As(i),zp)}(t);if(Lc(t)||!0!==t.multi)this.records.get(e);else{let r=this.records.get(e);r||(r=Wo(void 0,zp,!0),r.factory=()=>Yf(r.multi),this.records.set(e,r)),e=t,r.multi.push(t)}this.records.set(e,n)}hydrate(t,e){return e.value===zp&&(e.value=TD,e.value=e.factory()),"object"==typeof e.value&&e.value&&function RD(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=Pt(t.providedIn);return"string"==typeof e?"any"===e||this.scopes.has(e):this.injectorDefTypes.has(e)}}function kv(i){const t=Gf(i),e=null!==t?t.factory:Qa(i);if(null!==e)return e;if(i instanceof me)throw new pe(204,!1);if(i instanceof Function)return function nw(i){const t=i.length;if(t>0)throw Gd(t,"?"),new pe(204,!1);const e=function Xu(i){return i&&(i[xd]||i[m_])||null}(i);return null!==e?()=>e.factory(i):()=>new i}(i);throw new pe(204,!1)}function As(i,t,e){let n;if(Lc(i)){const r=Pt(i);return Qa(r)||kv(r)}if(wi(i))n=()=>Pt(i.useValue);else if(function Tv(i){return!(!i||!i.useFactory)}(i))n=()=>i.useFactory(...Yf(i.deps||[]));else if(function ki(i){return!(!i||!i.useExisting)}(i))n=()=>ee(Pt(i.useExisting));else{const r=Pt(i&&(i.useClass||i.provide));if(!function ID(i){return!!i.deps}(i))return Qa(r)||kv(r);n=()=>new r(...Yf(i.deps))}return n}function Wo(i,t,e=!1){return{factory:i,value:t,multi:e?[]:void 0}}function Pv(i,t){for(const e of i)Array.isArray(e)?Pv(e,t):e&&ju(e)?Pv(e.\u0275providers,t):t(e)}class PD{}class Ov{}class xo{resolveComponentFactory(t){throw function sl(i){const t=Error(`No component factory found for ${pi(i)}. Did you add it to @NgModule.entryComponents?`);return t.ngComponent=i,t}(t)}}let Hl=(()=>{class i{}return i.NULL=new xo,i})();function FD(){return Fn(Er(),Se())}function Fn(i,t){return new mt(Ei(i,t))}let mt=(()=>{class i{constructor(e){this.nativeElement=e}}return i.__NG_ELEMENT_ID__=FD,i})();function iw(i){return i instanceof mt?i.nativeElement:i}class Gl{}let ol=(()=>{class i{}return i.__NG_ELEMENT_ID__=()=>function LD(){const i=Se(),e=ws(Er().index,i);return(bs(e)?e:i)[yt]}(),i})(),ND=(()=>{class i{}return i.\u0275prov=ke({token:i,providedIn:"root",factory:()=>null}),i})();class Nc{constructor(t){this.full=t,this.major=t.split(".")[0],this.minor=t.split(".")[1],this.patch=t.split(".").slice(2).join(".")}}const BD=new Nc("15.2.10"),Fv={},Lv="ngOriginalError";function Nv(i){return i[Lv]}class al{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&&Nv(t);for(;e&&Nv(e);)e=Nv(e);return e||null}}function ll(i){return i instanceof Function?i():i}function sw(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 ow="ng-template";function jD(i,t,e){let n=0,r=!0;for(;ns?"":r[h+1].toLowerCase();const m=8&n?p:null;if(m&&-1!==sw(m,c,0)||2&n&&c!==p){if(jo(n))return!1;o=!0}}}}else{if(!o&&!jo(n)&&!jo(l))return!1;if(o&&jo(l))continue;o=!1,n=l|1&n}}return jo(n)||o}function jo(i){return 0==(1&i)}function aw(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&&!jo(o)&&(t+=Bc(s,r),r=""),n=o,s=s||!jo(n);e++}return""!==r&&(t+=Bc(s,r)),t}const sn={};function G(i){Hv(zn(),Se(),Xn()+i,!1)}function Hv(i,t,e,n){if(!n)if(3==(3&t[fn])){const s=i.preOrderCheckHooks;null!==s&&sp(t,s,e)}else{const s=i.preOrderHooks;null!==s&&op(t,s,0,e)}tl(e)}function dw(i,t=null,e=null,n){const r=uw(i,t,e,n);return r.resolveInjectorInitializers(),r}function uw(i,t=null,e=null,n,r=new Set){const s=[e||$n,AD(i)];return n=n||("object"==typeof i?void 0:pi(i)),new Hp(s,t||wh(),n||null,r)}let Gi=(()=>{class i{static create(e,n){if(Array.isArray(e))return dw({name:""},n,e,"");{const r=e.name??"";return dw({name:r},e.parent,e.providers,r)}}}return i.THROW_IF_NOT_FOUND=Rl,i.NULL=new ew,i.\u0275prov=ke({token:i,providedIn:"any",factory:()=>ee(rl)}),i.__NG_ELEMENT_ID__=-1,i})();function E(i,t=Ot.Default){const e=Se();return null===e?ee(i,t):V_(Er(),e,Pt(i),t)}function wo(){throw new Error("invalid")}function _w(i,t){const e=i.contentQueries;if(null!==e)for(let n=0;nyi&&Hv(i,t,yi,!1),Qr(o?2:0,r),e(n,r)}finally{tl(s),Qr(o?3:1,r)}}function Zv(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,Ch(i,e,r.hostVars,sn),r)}function be(i,t,e,n,r,s){const o=Ei(i,t);!function Xe(i,t,e,n,r,s,o){if(null==s)i.removeAttribute(t,r,e);else{const a=null==o?Qt(s):o(s,n||"",r);i.setAttribute(t,r,a,e)}}(t[yt],o,s,i.value,e,n,r)}function vt(i,t,e,n,r,s){const o=s[t];if(null!==o){const a=n.setInput;for(let l=0;l0&&rs(e)}}function rs(i){for(let n=av(i);null!==n;n=lv(n))for(let r=Bi;r0&&rs(s)}const e=i[at].components;if(null!==e)for(let n=0;n0&&rs(r)}}function ss(i,t){const e=ws(t,i),n=e[at];(function ro(i,t){for(let e=t.length;e-1&&(uv(t,n),pp(e,n))}this._attachedToViewContainer=!1}Rx(this._lView[at],this._lView)}onDestroy(t){bw(this._lView[at],this._lView,null,t)}markForCheck(){Ts(this._cdRefInjectingView||this._lView)}detach(){this._lView[fn]&=-65}reattach(){this._lView[fn]|=64}detectChanges(){Mo(this._lView[at],this._lView,this.context)}checkNoChanges(){}attachToViewContainerRef(){if(this._appRef)throw new pe(902,!1);this._attachedToViewContainer=!0}detachFromAppRef(){this._appRef=null,function YA(i,t){bh(i,t,t[yt],2,null,null)}(this._lView[at],this._lView)}attachToAppRef(t){if(this._attachedToViewContainer)throw new pe(902,!1);this._appRef=t}}class b8 extends ny{constructor(t){super(t),this._view=t}detectChanges(){const t=this._view;Mo(t[at],t,t[Be],!1)}checkNoChanges(){}get context(){return null}}class KF extends Hl{constructor(t){super(),this.ngModule=t}resolveComponentFactory(t){const e=Hn(t);return new iy(e,this.ngModule)}}function ZF(i){const t=[];for(let e in i)i.hasOwnProperty(e)&&t.push({propName:i[e],templateName:e});return t}class w8{constructor(t,e){this.injector=t,this.parentInjector=e}get(t,e,n){n=jf(n);const r=this.injector.get(t,Fv,n);return r!==Fv||e===Fv?r:this.parentInjector.get(t,e,n)}}class iy extends Ov{get inputs(){return ZF(this.componentDef.inputs)}get outputs(){return ZF(this.componentDef.outputs)}constructor(t,e){super(),this.componentDef=t,this.ngModule=e,this.componentType=t.type,this.selector=function e1(i){return i.map(JD).join(",")}(t.selectors),this.ngContentSelectors=t.ngContentSelectors?t.ngContentSelectors:[],this.isBoundToModule=!!e}create(t,e,n,r){let s=(r=r||this.ngModule)instanceof no?r:r?.injector;s&&null!==this.componentDef.getStandaloneInjector&&(s=this.componentDef.getStandaloneInjector(s)||s);const o=s?new w8(t,s):t,a=o.get(Gl,null);if(null===a)throw new pe(407,!1);const l=o.get(ND,null),c=a.createRenderer(null,this.componentDef),d=this.componentDef.selectors[0][0]||"div",h=n?function M1(i,t,e){return i.selectRootElement(t,e===Xs.ShadowDom)}(c,n,this.componentDef.encapsulation):Ep(c,d,function x8(i){const t=i.toLowerCase();return"svg"===t?kd:"math"===t?"math":null}(d)),p=this.componentDef.onPush?288:272,m=ey(0,null,null,1,0,null,null,null,null,null),g=Mh(null,m,null,p,null,null,a,c,l,o,null);let b,v;rp(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 C8(i,t){const e=i[at],n=yi;return i[n]=t,Zd(e,n,2,"#host",null)}(g,h),F=function S8(i,t,e,n,r,s,o,a){const l=r[at];!function E8(i,t,e,n){for(const r of i)t.mergedAttrs=Sc(t.mergedAttrs,r.hostAttrs);null!==t.mergedAttrs&&(Cw(t,t.mergedAttrs,!0),null!==e&&Gx(n,e,t))}(n,i,t,o);const c=s.createRenderer(t,e),d=Mh(r,yw(e),null,e.onPush?32:16,r[i.index],i,s,c,a||null,null,null);return l.firstCreatePass&&P(l,i,n.length-1),Di(r,d),r[i.index]=d}(C,h,y,M,g,a,c);v=B0(m,yi),h&&function D8(i,t,e,n){if(n)L_(i,e,["ng-version",BD.full]);else{const{attrs:r,classes:s}=function t1(i){const t=[],e=[];let n=1,r=2;for(;n0&&Hx(i,e,s.join(" "))}}(c,y,h,n),void 0!==e&&function T8(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=Sc(r.hostAttrs,e=Sc(e,r.hostAttrs))}}(n)}function P1(i){return i===Xa?{}:i===$n?[]:i}function k8(i,t){const e=i.viewQuery;i.viewQuery=e?(n,r)=>{t(n,r),e(n,r)}:t}function P8(i,t){const e=i.contentQueries;i.contentQueries=e?(n,r,s)=>{t(n,r,s),e(n,r,s)}:t}function O8(i,t){const e=i.hostBindings;i.hostBindings=e?(n,r)=>{t(n,r),e(n,r)}:t}function Ew(i){return!!O1(i)&&(Array.isArray(i)||!(i instanceof Map)&&Symbol.iterator in i)}function O1(i){return null!==i&&("function"==typeof i||"object"==typeof i)}function $l(i,t,e){return i[t]=e}function Is(i,t,e){return!Object.is(i[t],e)&&(i[t]=e,!0)}function Eh(i,t,e,n){const r=Is(i,t,e);return Is(i,t+1,n)||r}function Dt(i,t,e,n){const r=Se();return Is(r,Fl(),t)&&(zn(),be(Ai(),r,i,t,e,n)),Dt}function jp(i,t,e,n){return Is(i,Fl(),e)?t+Qt(e)+n:sn}function Yp(i,t,e,n,r,s){const a=Eh(i,function Ja(){return kt.lFrame.bindingIndex}(),e,r);return Zs(2),a?t+Qt(e)+n+Qt(r)+s:sn}function fe(i,t,e,n,r,s,o,a){const l=Se(),c=zn(),d=i+yi,h=c.firstCreatePass?function $8(i,t,e,n,r,s,o,a,l){const c=t.consts,d=Zd(t,i,4,o||null,Ol(c,a));ty(t,e,d,Ol(c,l)),Nd(t,d);const h=d.tView=ey(2,d,n,r,s,t.directiveRegistry,t.pipeRegistry,null,t.schemas,c);return null!==t.queries&&(t.queries.template(t,d),h.queries=t.queries.embeddedTView(d)),d}(d,c,l,t,e,n,r,s,o):c.data[d];ga(h,!1);const p=l[yt].createComment("");yh(c,l,p,h),Hr(p,l),Di(l,l[d]=mn(p,l,p,h)),bc(h)&&Qv(c,l,h),null!=o&&Jv(l,h,a)}function Ki(i){return Od(function gA(){return kt.lFrame.contextLView}(),yi+i)}function U(i,t,e){const n=Se();return Is(n,Fl(),t)&&io(zn(),Ai(),n,i,t,n[yt],e,!1),U}function F1(i,t,e,n,r){const o=r?"class":"style";k1(i,e,t.inputs[o],o,n)}function W(i,t,e,n){const r=Se(),s=zn(),o=yi+i,a=r[yt],l=s.firstCreatePass?function j8(i,t,e,n,r,s){const o=t.consts,l=Zd(t,i,2,n,Ol(o,r));return ty(t,e,l,Ol(o,s)),null!==l.attrs&&Cw(l,l.attrs,!1),null!==l.mergedAttrs&&Cw(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]=Ep(a,t,function Y0(){return kt.lFrame.currentNamespace}()),d=bc(l);return ga(l,!0),Gx(a,c,l),32!=(32&l.flags)&&yh(s,r,c,l),0===function uA(){return kt.lFrame.elementDepthCount}()&&Hr(c,r),function hA(){kt.lFrame.elementDepthCount++}(),d&&(Qv(s,r,l),Zv(s,l,r)),null!==n&&Jv(r,l),W}function j(){let i=Er();D_()?T_():(i=i.parent,ga(i,!1));const t=i;!function fA(){kt.lFrame.elementDepthCount--}();const e=zn();return e.firstCreatePass&&(Nd(e,i),Qf(i)&&e.queries.elementEnd(i)),null!=t.classesWithoutHost&&function wA(i){return 0!=(8&i.flags)}(t)&&F1(e,t,Se(),t.classesWithoutHost,!0),null!=t.stylesWithoutHost&&function F_(i){return 0!=(16&i.flags)}(t)&&F1(e,t,Se(),t.stylesWithoutHost,!1),j}function De(i,t,e,n){return W(i,t,e,n),j(),De}function Gr(i,t,e){const n=Se(),r=zn(),s=i+yi,o=r.firstCreatePass?function Y8(i,t,e,n,r){const s=t.consts,o=Ol(s,n),a=Zd(t,i,8,"ng-container",o);return null!==o&&Cw(a,o,!0),ty(t,e,a,Ol(s,r)),null!==t.queries&&t.queries.elementStart(t,a),a}(s,r,n,t,e):r.data[s];ga(o,!0);const a=n[s]=n[yt].createComment("");return yh(r,n,a,o),Hr(a,n),bc(o)&&(Qv(r,n,o),Zv(r,o,n)),null!=e&&Jv(n,o),Gr}function $r(){let i=Er();const t=zn();return D_()?T_():(i=i.parent,ga(i,!1)),t.firstCreatePass&&(Nd(t,i),Qf(i)&&t.queries.elementEnd(i)),$r}function sy(i,t,e){return Gr(i,t,e),$r(),sy}function di(){return Se()}function oy(i){return!!i&&"function"==typeof i.then}function uL(i){return!!i&&"function"==typeof i.subscribe}const L1=uL;function Ue(i,t,e,n){const r=Se(),s=zn(),o=Er();return hL(s,r,r[yt],o,i,t,n),Ue}function N1(i,t){const e=Er(),n=Se(),r=zn();return hL(r,n,qF(rh(r.data),e,n),e,i,t),N1}function hL(i,t,e,n,r,s,o){const a=bc(n),c=i.firstCreatePass&&YF(i),d=t[Be],h=jF(t);let p=!0;if(3&n.type||o){const b=Ei(n,t),v=o?o(b):b,y=h.length,M=o?C=>o(I(C[n.index])):n.index;let x=null;if(!o&&a&&(x=function q8(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=pL(n,t,d,s,!1);const C=e.listen(v,r,s);h.push(s,C),c&&c.push(r,M,y,y+1)}}else s=pL(n,t,d,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?ws(i.index,t):t);let l=fL(t,e,n,o),c=s.__ngNextListenerFn__;for(;c;)l=fL(t,e,c,o)&&l,c=c.__ngNextListenerFn__;return r&&!1===l&&(o.preventDefault(),o.returnValue=!1),l}}function he(i=1){return function yA(i){return(kt.lFrame.contextLView=function j0(i,t){for(;i>0;)t=t[Sr],i--;return t}(i,kt.lFrame.contextLView))[Be]}(i)}function X8(i,t){let e=null;const n=function XD(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 V1(i){return 2|i}function Ah(i){return(131068&i)>>2}function z1(i,t){return-131069&i|t<<2}function H1(i){return 1|i}function ML(i,t,e,n,r){const s=i[e+1],o=null===t;let a=n?Jd(s):Ah(s),l=!1;for(;0!==a&&(!1===l||o);){const d=i[a+1];tW(i[a],t)&&(l=!0,i[a+1]=n?H1(d):V1(d)),a=n?Jd(d):Ah(d)}l&&(i[e+1]=n?V1(s):H1(s))}function tW(i,t){return null===i||null==t||(Array.isArray(i)?i[1]:i)===t||!(!Array.isArray(i)||"string"!=typeof t)&&Ic(i,t)>=0}const Ir={textEnd:0,key:0,keyEnd:0,value:0,valueEnd:0};function CL(i){return i.substring(Ir.key,Ir.keyEnd)}function SL(i,t){const e=Ir.textEnd;return e===t?-1:(t=Ir.keyEnd=function sW(i,t,e){for(;t32;)t++;return t}(i,Ir.key=t,e),em(i,t,e))}function em(i,t,e){for(;t=0;e=SL(t,e))Cs(i,CL(t),!0)}function cl(i,t,e,n){const r=Se(),s=zn(),o=Zs(2);s.firstUpdatePass&&RL(s,i,o,n),t!==sn&&Is(r,o,t)&&PL(s,s.data[Xn()],r,r[yt],i,r[o+1]=function _W(i,t){return null==i||""===i||("string"==typeof t?i+=t:"object"==typeof i&&(i=pi(eo(i)))),i}(t,e),n,o)}function IL(i,t){return t>=i.expandoStartIndex}function RL(i,t,e,n){const r=i.data;if(null===r[e+1]){const s=r[Xn()],o=IL(i,e);FL(s,n)&&null===t&&!o&&(t=!1),t=function dW(i,t,e,n){const r=rh(i);let s=n?t.residualClasses:t.residualStyles;if(null===r)0===(n?t.classBindings:t.styleBindings)&&(e=ay(e=G1(null,i,t,e,n),t.attrs,n),s=null);else{const o=t.directiveStylingLast;if(-1===o||i[o]!==r)if(e=G1(r,i,t,e,n),null===s){let l=function uW(i,t,e){const n=e?t.classBindings:t.styleBindings;if(0!==Ah(n))return i[Jd(n)]}(i,t,n);void 0!==l&&Array.isArray(l)&&(l=G1(null,i,t,l[1],n),l=ay(l,t.attrs,n),function hW(i,t,e,n){i[Jd(e?t.classBindings:t.styleBindings)]=n}(i,t,n,l))}else s=function fW(i,t,e){let n;const r=t.directiveEnd;for(let s=1+t.directiveStylingLast;s0)&&(c=!0)):d=e,r)if(0!==l){const p=Jd(i[a+1]);i[n+1]=Dw(p,a),0!==p&&(i[p+1]=z1(i[p+1],n)),i[a+1]=function Z8(i,t){return 131071&i|t<<17}(i[a+1],n)}else i[n+1]=Dw(a,0),0!==a&&(i[a+1]=z1(i[a+1],n)),a=n;else i[n+1]=Dw(l,0),0===a?a=n:i[l+1]=z1(i[l+1],n),l=n;c&&(i[n+1]=V1(i[n+1])),ML(i,d,n,!0),ML(i,d,n,!1),function eW(i,t,e,n,r){const s=r?i.residualClasses:i.residualStyles;null!=s&&"string"==typeof t&&Ic(s,t)>=0&&(e[n+1]=H1(e[n+1]))}(t,d,i,n,s),o=Dw(a,l),s?t.classBindings=o:t.styleBindings=o}(r,s,t,e,o,n)}}function G1(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),d=c?l[1]:l,h=null===d;let p=e[r+1];p===sn&&(p=h?$n:void 0);let m=h?Wd(p,n):d===n?p:void 0;if(c&&!Tw(m)&&(m=Wd(l,n)),Tw(m)&&(a=m,o))return a;const g=i[r+1];r=o?Jd(g):Ah(g)}if(null!==t){let l=s?t.residualClasses:t.residualStyles;null!=l&&(a=Wd(l,n))}return a}function Tw(i){return void 0!==i}function FL(i,t){return 0!=(i.flags&(t?8:16))}function Ve(i,t=""){const e=Se(),n=zn(),r=i+yi,s=n.firstCreatePass?Zd(n,r,1,t,null):n.data[r],o=e[r]=function cv(i,t){return i.createText(t)}(e[yt],t);yh(n,e,o,s),ga(s,!1)}function _i(i){return Zi("",i,""),_i}function Zi(i,t,e){const n=Se(),r=jp(n,i,t,e);return r!==sn&&Uc(n,Xn(),r),Zi}function tm(i,t,e,n,r){const s=Se(),o=Yp(s,i,t,e,n,r);return o!==sn&&Uc(s,Xn(),o),tm}function GL(i,t,e){!function dl(i,t,e,n){const r=zn(),s=Zs(2);r.firstUpdatePass&&RL(r,null,s,n);const o=Se();if(e!==sn&&Is(o,s,e)){const a=r.data[Xn()];if(FL(a,n)&&!IL(r,s)){let l=n?a.classesWithoutHost:a.stylesWithoutHost;null!==l&&(e=Vf(l,e||"")),F1(r,a,o,e,n)}else!function gW(i,t,e,n,r,s,o,a){r===sn&&(r=$n);let l=0,c=0,d=0((rt=rt||{})[rt.LocaleId=0]="LocaleId",rt[rt.DayPeriodsFormat=1]="DayPeriodsFormat",rt[rt.DayPeriodsStandalone=2]="DayPeriodsStandalone",rt[rt.DaysFormat=3]="DaysFormat",rt[rt.DaysStandalone=4]="DaysStandalone",rt[rt.MonthsFormat=5]="MonthsFormat",rt[rt.MonthsStandalone=6]="MonthsStandalone",rt[rt.Eras=7]="Eras",rt[rt.FirstDayOfWeek=8]="FirstDayOfWeek",rt[rt.WeekendRange=9]="WeekendRange",rt[rt.DateFormat=10]="DateFormat",rt[rt.TimeFormat=11]="TimeFormat",rt[rt.DateTimeFormat=12]="DateTimeFormat",rt[rt.NumberSymbols=13]="NumberSymbols",rt[rt.NumberFormats=14]="NumberFormats",rt[rt.CurrencyCode=15]="CurrencyCode",rt[rt.CurrencySymbol=16]="CurrencySymbol",rt[rt.CurrencyName=17]="CurrencyName",rt[rt.Currencies=18]="Currencies",rt[rt.Directionality=19]="Directionality",rt[rt.PluralCase=20]="PluralCase",rt[rt.ExtraData=21]="ExtraData",rt))();const im="en-US";let t2=im;function j1(i,t,e,n,r){if(i=Pt(i),Array.isArray(i))for(let s=0;s>20;if(Lc(i)||!i.multi){const m=new Bd(l,r,E),g=q1(a,t,r?d:d+p,h);-1===g?(pn(ah(c,o),s,a),Y1(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=q1(a,t,d+p,h),g=q1(a,t,d,d+p),v=g>=0&&e[g];if(r&&!v||!r&&!(m>=0&&e[m])){pn(ah(c,o),s,a);const y=function Oj(i,t,e,n,r){const s=new Bd(i,e,E);return s.multi=[],s.index=t,s.componentProviders=0,A2(s,r,n&&!e),s}(r?Pj:kj,e.length,r,n,l);!r&&v&&(e[g].providerFactory=y),Y1(s,i,t.length,0),t.push(a),c.directiveStart++,c.directiveEnd++,r&&(c.providerIndexes+=1048576),e.push(y),o.push(y)}else Y1(s,i,m>-1?m:g,A2(e[r?g:m],l,!r&&n));!r&&n&&v&&e[g].componentProviders++}}}function Y1(i,t,e,n){const r=Lc(t),s=function DD(i){return!!i.useClass}(t);if(r||s){const l=(s?Pt(t.useClass):t).prototype.ngOnDestroy;if(l){const c=i.destroyHooks||(i.destroyHooks=[]);if(!r&&t.multi){const d=c.indexOf(e);-1===d?c.push(e,[n,l]):c[d+1].push(n,l)}else c.push(e,l)}}}function A2(i,t,e){return e&&i.componentProviders++,i.multi.push(t)-1}function q1(i,t,e,n){for(let r=e;r{e.providersResolver=(n,r)=>function Rj(i,t,e){const n=zn();if(n.firstCreatePass){const r=vo(i);j1(e,n.data,n.blueprint,r,!0),j1(t,n.data,n.blueprint,r,!1)}}(n,r?r(i):i,t)}}class rm{}class D2{}class T2 extends rm{constructor(t,e){super(),this._parent=e,this._bootstrapComponents=[],this.destroyCbs=[],this.componentFactoryResolver=new KF(this);const n=ur(t);this._bootstrapComponents=ll(n.bootstrap),this._r3Injector=uw(t,e,[{provide:rm,useValue:this},{provide:Hl,useValue:this.componentFactoryResolver}],pi(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 K1 extends D2{constructor(t){super(),this.moduleType=t}create(t){return new T2(this.moduleType,t)}}class Lj extends rm{constructor(t,e,n){super(),this.componentFactoryResolver=new KF(this),this.instance=null;const r=new Hp([...t,{provide:rm,useValue:this},{provide:Hl,useValue:this.componentFactoryResolver}],e||wh(),n,new Set(["environment"]));this.injector=r,r.resolveInjectorInitializers()}destroy(){this.injector.destroy()}onDestroy(t){this.injector.onDestroy(t)}}function Fw(i,t,e=null){return new Lj(i,t,e).injector}let Nj=(()=>{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=tw(0,e.type),r=n.length>0?Fw([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=ke({token:i,providedIn:"environment",factory:()=>new i(ee(no))}),i})();function Z1(i){i.getStandaloneInjector=t=>t.get(Nj).getOrCreateStandaloneInjector(i)}function oo(i,t,e){const n=Vr()+i,r=Se();return r[n]===sn?$l(r,n,e?t.call(e):t()):function ry(i,t){return i[t]}(r,n)}function sm(i,t,e,n){return N2(Se(),Vr(),i,t,e,n)}function L2(i,t,e,n,r,s,o){return function V2(i,t,e,n,r,s,o,a,l){const c=t+e;return function Ea(i,t,e,n,r,s){const o=Eh(i,t,e,n);return Eh(i,t+2,r,s)||o}(i,c,r,s,o,a)?$l(i,c+4,l?n.call(l,r,s,o,a):n(r,s,o,a)):fy(i,c+4)}(Se(),Vr(),i,t,e,n,r,s,o)}function fy(i,t){const e=i[t];return e===sn?void 0:e}function N2(i,t,e,n,r,s){const o=t+e;return Is(i,o,r)?$l(i,o+1,s?n.call(s,r):n(r)):fy(i,o+1)}function Ct(i,t){const e=zn();let n;const r=i+yi;e.firstCreatePass?(n=function Jj(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=Qa(n.type)),o=qs(E);try{const a=cp(!1),l=s();return cp(a),function W8(i,t,e,n){e>=i.data.length&&(i.data[e]=null,i.blueprint[e]=null),t[e]=n}(e,Se(),r,l),l}finally{qs(o)}}function Tt(i,t,e){const n=i+yi,r=Se(),s=Od(r,n);return py(r,n)?N2(r,Vr(),t,s.transform,e,s):s.transform(e)}function J1(i,t,e,n){const r=i+yi,s=Se(),o=Od(s,r);return py(s,r)?function B2(i,t,e,n,r,s,o){const a=t+e;return Eh(i,a,r,s)?$l(i,a+2,o?n.call(o,r,s):n(r,s)):fy(i,a+2)}(s,Vr(),t,o.transform,e,n,o):o.transform(e,n)}function py(i,t){return i[at].data[t].pure}function eT(i){return t=>{setTimeout(i,void 0,t)}}const We=class r6 extends Re{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=eT(s),r&&(r=eT(r)),o&&(o=eT(o)));const a=super.subscribe({next:r,error:s,complete:o});return t instanceof Zt&&t.add(a),a}};function s6(){return this._results[Symbol.iterator]()}class om{get changes(){return this._changes||(this._changes=new We)}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=om.prototype;e[Symbol.iterator]||(e[Symbol.iterator]=s6)}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 Ar(i){return i.flat(Number.POSITIVE_INFINITY)}(t);(this._changesDetected=!function fp(i,t,e){if(i.length!==t.length)return!1;for(let n=0;n{class i{}return i.__NG_ELEMENT_ID__=l6,i})();const o6=Co,a6=class extends o6{constructor(t,e,n){super(),this._declarationLView=t,this._declarationTContainer=e,this.elementRef=n}createEmbeddedView(t,e){const n=this._declarationTContainer.tView,r=Mh(this._declarationLView,n,t,16,null,n.declTNode,null,null,null,null,e||null);r[nh]=this._declarationLView[this._declarationTContainer.index];const o=this._declarationLView[Ks];return null!==o&&(r[Ks]=o.createEmbeddedView(n)),Sh(n,r,t),new ny(r)}};function l6(){return Lw(Er(),Se())}function Lw(i,t){return 4&i.type?new a6(t,i,Fn(i,t)):null}let Wr=(()=>{class i{}return i.__NG_ELEMENT_ID__=c6,i})();function c6(){return $2(Er(),Se())}const d6=Wr,H2=class extends d6{constructor(t,e,n){super(),this._lContainer=t,this._hostTNode=e,this._hostLView=n}get element(){return Fn(this._hostTNode,this._hostLView)}get injector(){return new Ac(this._hostTNode,this._hostLView)}get parentInjector(){const t=ch(this._hostTNode,this._hostLView);if(lp(t)){const e=oh(t,this._hostLView),n=sh(t);return new Ac(e[at].data[n+8],e)}return new Ac(null,this._hostLView)}clear(){for(;this.length>0;)this.remove(this.length-1)}get(t){const e=G2(this._lContainer);return null!==e&&e[t]||null}get length(){return this._lContainer.length-Bi}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 hh(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 iy(Hn(t)),c=n||this.parentInjector;if(!s&&null==l.ngModule){const p=(o?c:this.parentInjector).get(no,null);p&&(s=p)}const d=l.create(c,r,void 0,s);return this.insert(d.hostView,a),d}insert(t,e){const n=t._lView,r=n[at];if(function dA(i){return xs(i[Ni])}(n)){const d=this.indexOf(t);if(-1!==d)this.detach(d);else{const h=n[Ni],p=new H2(h,h[ue],h[Ni]);p.detach(p.indexOf(t))}}const s=this._adjustIndex(e),o=this._lContainer;!function dv(i,t,e,n){const r=Bi+n,s=e.length;n>0&&(e[r-1][ys]=t),n0)n.push(o[a/2]);else{const c=s[a+1],d=t[-l];for(let h=Bi;h{class i{constructor(e){this.appInits=e,this.resolve=Bw,this.reject=Bw,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)(ee(Uw,8))},i.\u0275prov=ke({token:i,factory:i.\u0275fac,providedIn:"root"}),i})();const cm=new me("AppId",{providedIn:"root",factory:function fN(){return`${hT()}${hT()}${hT()}`}});function hT(){return String.fromCharCode(97+Math.floor(25*Math.random()))}const pN=new me("Platform Initializer"),fT=new me("Platform ID",{providedIn:"platform",factory:()=>"unknown"}),Rr=new me("AnimationModuleType");let L6=(()=>{class i{log(e){console.log(e)}warn(e){console.warn(e)}}return i.\u0275fac=function(e){return new(e||i)},i.\u0275prov=ke({token:i,factory:i.\u0275fac,providedIn:"platform"}),i})();const ql=new me("LocaleId",{providedIn:"root",factory:()=>Ft(ql,Ot.Optional|Ot.SkipSelf)||function N6(){return typeof $localize<"u"&&$localize.locale||im}()});class U6{constructor(t,e){this.ngModuleFactory=t,this.componentFactories=e}}let mN=(()=>{class i{compileModuleSync(e){return new K1(e)}compileModuleAsync(e){return Promise.resolve(this.compileModuleSync(e))}compileModuleAndAllComponentsSync(e){const n=this.compileModuleSync(e),s=ll(ur(e).declarations).reduce((o,a)=>{const l=Hn(a);return l&&o.push(new iy(l)),o},[]);return new U6(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=ke({token:i,factory:i.\u0275fac,providedIn:"root"}),i})();const H6=(()=>Promise.resolve(0))();function pT(i){typeof Zone>"u"?H6.then(()=>{i&&i.apply(null,null)}):Zone.current.scheduleMicroTask("scheduleMicrotask",i)}class ft{constructor({enableLongStackTrace:t=!1,shouldCoalesceEventChangeDetection:e=!1,shouldCoalesceRunChangeDetection:n=!1}){if(this.hasPendingMacrotasks=!1,this.hasPendingMicrotasks=!1,this.isStable=!0,this.onUnstable=new We(!1),this.onMicrotaskEmpty=new We(!1),this.onStable=new We(!1),this.onError=new We(!1),typeof Zone>"u")throw new pe(908,!1);Zone.assertZonePatched();const r=this;r._nesting=0,r._outer=r._inner=Zone.current,Zone.TaskTrackingZoneSpec&&(r._inner=r._inner.fork(new Zone.TaskTrackingZoneSpec)),t&&Zone.longStackTraceZoneSpec&&(r._inner=r._inner.fork(Zone.longStackTraceZoneSpec)),r.shouldCoalesceEventChangeDetection=!n&&e,r.shouldCoalesceRunChangeDetection=n,r.lastRequestAnimationFrameId=-1,r.nativeRequestAnimationFrame=function G6(){let i=Rn.requestAnimationFrame,t=Rn.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 j6(i){const t=()=>{!function W6(i){i.isCheckStableRunning||-1!==i.lastRequestAnimationFrameId||(i.lastRequestAnimationFrameId=i.nativeRequestAnimationFrame.call(Rn,()=>{i.fakeTopEventTask||(i.fakeTopEventTask=Zone.root.scheduleEventTask("fakeTopEventTask",()=>{i.lastRequestAnimationFrameId=-1,gT(i),i.isCheckStableRunning=!0,mT(i),i.isCheckStableRunning=!1},void 0,()=>{},()=>{})),i.fakeTopEventTask.invoke()}),gT(i))}(i)};i._inner=i._inner.fork({name:"angular",properties:{isAngularZone:!0},onInvokeTask:(e,n,r,s,o,a)=>{try{return vN(i),e.invokeTask(r,s,o,a)}finally{(i.shouldCoalesceEventChangeDetection&&"eventTask"===s.type||i.shouldCoalesceRunChangeDetection)&&t(),yN(i)}},onInvoke:(e,n,r,s,o,a,l)=>{try{return vN(i),e.invoke(r,s,o,a,l)}finally{i.shouldCoalesceRunChangeDetection&&t(),yN(i)}},onHasTask:(e,n,r,s)=>{e.hasTask(r,s),n===r&&("microTask"==s.change?(i._hasPendingMicrotasks=s.microTask,gT(i),mT(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(!ft.isInAngularZone())throw new pe(909,!1)}static assertNotInAngularZone(){if(ft.isInAngularZone())throw new pe(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,$6,Bw,Bw);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 $6={};function mT(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 gT(i){i.hasPendingMicrotasks=!!(i._hasPendingMicrotasks||(i.shouldCoalesceEventChangeDetection||i.shouldCoalesceRunChangeDetection)&&-1!==i.lastRequestAnimationFrameId)}function vN(i){i._nesting++,i.isStable&&(i.isStable=!1,i.onUnstable.emit(null))}function yN(i){i._nesting--,mT(i)}class Y6{constructor(){this.hasPendingMicrotasks=!1,this.hasPendingMacrotasks=!1,this.isStable=!0,this.onUnstable=new We,this.onMicrotaskEmpty=new We,this.onStable=new We,this.onError=new We}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 bN=new me(""),zw=new me("");let yT,_T=(()=>{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,yT||(function q6(i){yT=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:()=>{ft.assertNotInAngularZone(),pT(()=>{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())pT(()=>{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)(ee(ft),ee(vT),ee(zw))},i.\u0275prov=ke({token:i,factory:i.\u0275fac}),i})(),vT=(()=>{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 yT?.findTestabilityInTree(this,e,n)??null}}return i.\u0275fac=function(e){return new(e||i)},i.\u0275prov=ke({token:i,factory:i.\u0275fac,providedIn:"platform"}),i})();const zc=!1;let eu=null;const xN=new me("AllowMultipleToken"),bT=new me("PlatformDestroyListeners"),wN=new me("appBootstrapListener");class MN{constructor(t,e){this.name=t,this.token=e}}function SN(i,t,e=[]){const n=`Platform: ${t}`,r=new me(n);return(s=[])=>{let o=xT();if(!o||o.injector.get(xN,!1)){const a=[...e,...s,{provide:r,useValue:!0}];i?i(a):function Z6(i){if(eu&&!eu.get(xN,!1))throw new pe(400,!1);eu=i;const t=i.get(AN);(function CN(i){const t=i.get(pN,null);t&&t.forEach(e=>e())})(i)}(function EN(i=[],t){return Gi.create({name:t,providers:[{provide:Iv,useValue:"platform"},{provide:bT,useValue:new Set([()=>eu=null])},...i]})}(a,n))}return function J6(i){const t=xT();if(!t)throw new pe(401,!1);return t}()}}function xT(){return eu?.get(AN)??null}let AN=(()=>{class i{constructor(e){this._injector=e,this._modules=[],this._destroyListeners=[],this._destroyed=!1}bootstrapModuleFactory(e,n){const r=function TN(i,t){let e;return e="noop"===i?new Y6:("zone.js"===i?void 0:i)||new ft(t),e}(n?.ngZone,function DN(i){return{enableLongStackTrace:!1,shouldCoalesceEventChangeDetection:!(!i||!i.ngZoneEventCoalescing)||!1,shouldCoalesceRunChangeDetection:!(!i||!i.ngZoneRunCoalescing)||!1}}(n)),s=[{provide:ft,useValue:r}];return r.run(()=>{const o=Gi.create({providers:s,parent:this.injector,name:e.moduleType.name}),a=e.create(o),l=a.injector.get(al,null);if(!l)throw new pe(402,!1);return r.runOutsideAngular(()=>{const c=r.onError.subscribe({next:d=>{l.handleError(d)}});a.onDestroy(()=>{Hw(this._modules,a),c.unsubscribe()})}),function IN(i,t,e){try{const n=e();return oy(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(Vw);return c.runInitializers(),c.donePromise.then(()=>(function n2(i){En(i,"Expected localeId to be defined"),"string"==typeof i&&(t2=i.toLowerCase().replace(/_/g,"-"))}(a.injector.get(ql,im)||im),this._moduleDoBootstrap(a),a))})})}bootstrapModule(e,n=[]){const r=RN({},n);return function X6(i,t,e){const n=new K1(e);return Promise.resolve(n)}(0,0,e).then(s=>this.bootstrapModuleFactory(s,r))}_moduleDoBootstrap(e){const n=e.injector.get(dm);if(e._bootstrapComponents.length>0)e._bootstrapComponents.forEach(r=>n.bootstrap(r));else{if(!e.instance.ngDoBootstrap)throw new pe(-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 pe(404,!1);this._modules.slice().forEach(n=>n.destroy()),this._destroyListeners.forEach(n=>n());const e=this._injector.get(bT,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)(ee(Gi))},i.\u0275prov=ke({token:i,factory:i.\u0275fac,providedIn:"platform"}),i})();function RN(i,t){return Array.isArray(t)?t.reduce(RN,i):{...i,...t}}let dm=(()=>{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 In(a=>{this._stable=this._zone.isStable&&!this._zone.hasPendingMacrotasks&&!this._zone.hasPendingMicrotasks,this._zone.runOutsideAngular(()=>{a.next(this._stable),a.complete()})}),o=new In(a=>{let l;this._zone.runOutsideAngular(()=>{l=this._zone.onStable.subscribe(()=>{ft.assertNotInAngularZone(),pT(()=>{!this._stable&&!this._zone.hasPendingMacrotasks&&!this._zone.hasPendingMicrotasks&&(this._stable=!0,a.next(!0))})})});const c=this._zone.onUnstable.subscribe(()=>{ft.assertInAngularZone(),this._stable&&(this._stable=!1,this._zone.runOutsideAngular(()=>{a.next(!1)}))});return()=>{l.unsubscribe(),c.unsubscribe()}});this.isStable=Mr(s,o.pipe(Uf()))}bootstrap(e,n){const r=e instanceof Ov;if(!this._injector.get(Vw).done){!r&&function Sd(i){const t=Hn(i)||Ur(i)||vs(i);return null!==t&&t.standalone}(e);throw new pe(405,zc)}let o;o=r?e:this._injector.get(Hl).resolveComponentFactory(e),this.componentTypes.push(o.componentType);const a=function K6(i){return i.isBoundToModule}(o)?void 0:this._injector.get(rm),c=o.create(Gi.NULL,[],n||o.selector,a),d=c.location.nativeElement,h=c.injector.get(bN,null);return h?.registerApplication(d),c.onDestroy(()=>{this.detachView(c.hostView),Hw(this.components,c),h?.unregisterApplication(d)}),this._loadComponent(c),c}tick(){if(this._runningTick)throw new pe(101,!1);try{this._runningTick=!0;for(let e of this._views)e.detectChanges()}catch(e){this._zone.runOutsideAngular(()=>this._exceptionHandler.handleError(e))}finally{this._runningTick=!1}}attachView(e){const n=e;this._views.push(n),n.attachToAppRef(this)}detachView(e){const n=e;Hw(this._views,n),n.detachFromAppRef()}_loadComponent(e){this.attachView(e.hostView),this.tick(),this.components.push(e);const n=this._injector.get(wN,[]);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),()=>Hw(this._destroyListeners,e)}destroy(){if(this._destroyed)throw new pe(406,!1);const e=this._injector;e.destroy&&!e.destroyed&&e.destroy()}get viewCount(){return this._views.length}warnIfDestroyed(){}}return i.\u0275fac=function(e){return new(e||i)(ee(ft),ee(no),ee(al))},i.\u0275prov=ke({token:i,factory:i.\u0275fac,providedIn:"root"}),i})();function Hw(i,t){const e=i.indexOf(t);e>-1&&i.splice(e,1)}let Zn=(()=>{class i{}return i.__NG_ELEMENT_ID__=t9,i})();function t9(i){return function n9(i,t,e){if(Ad(i)&&!e){const n=ws(i.index,t);return new ny(n,n)}return 47&i.type?new ny(t[rr],t):null}(Er(),Se(),16==(16&i))}class LN{constructor(){}supports(t){return Ew(t)}create(t){return new c9(t)}}const l9=(i,t)=>t;class c9{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||l9}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 d9(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 NN),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 NN),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 d9{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 u9{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 NN{constructor(){this.map=new Map}put(t){const e=t.trackById;let n=this.map.get(e);n||(n=new u9,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 BN(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 f9(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 f9{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 VN(){return new Ww([new LN])}let Ww=(()=>{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||VN()),deps:[[i,new wa,new Ss]]}}find(e){const n=this.factories.find(r=>r.supports(e));if(null!=n)return n;throw new pe(901,!1)}}return i.\u0275prov=ke({token:i,providedIn:"root",factory:VN}),i})();function zN(){return new gy([new UN])}let gy=(()=>{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||zN()),deps:[[i,new wa,new Ss]]}}find(e){const n=this.factories.find(r=>r.supports(e));if(n)return n;throw new pe(901,!1)}}return i.\u0275prov=ke({token:i,providedIn:"root",factory:zN}),i})();const g9=SN(null,"core",[]);let _9=(()=>{class i{constructor(e){}}return i.\u0275fac=function(e){return new(e||i)(ee(dm))},i.\u0275mod=nn({type:i}),i.\u0275inj=Kt({}),i})();let ET=null;function Hc(){return ET}class b9{}const jt=new me("DocumentToken");let AT=(()=>{class i{historyGo(e){throw new Error("Not implemented")}}return i.\u0275fac=function(e){return new(e||i)},i.\u0275prov=ke({token:i,factory:function(){return function x9(){return ee(HN)}()},providedIn:"platform"}),i})();const w9=new me("Location Initialized");let HN=(()=>{class i extends AT{constructor(e){super(),this._doc=e,this._location=window.location,this._history=window.history}getBaseHrefFromDOM(){return Hc().getBaseHref(this._doc)}onPopState(e){const n=Hc().getGlobalEventTarget(this._doc,"window");return n.addEventListener("popstate",e,!1),()=>n.removeEventListener("popstate",e)}onHashChange(e){const n=Hc().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){GN()?this._history.pushState(e,n,r):this._location.hash=r}replaceState(e,n,r){GN()?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)(ee(jt))},i.\u0275prov=ke({token:i,factory:function(){return function M9(){return new HN(ee(jt))}()},providedIn:"platform"}),i})();function GN(){return!!window.history.pushState}function DT(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 $N(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 Gc(i){return i&&"?"!==i[0]?"?"+i:i}let Ih=(()=>{class i{historyGo(e){throw new Error("Not implemented")}}return i.\u0275fac=function(e){return new(e||i)},i.\u0275prov=ke({token:i,factory:function(){return Ft(jN)},providedIn:"root"}),i})();const WN=new me("appBaseHref");let jN=(()=>{class i extends Ih{constructor(e,n){super(),this._platformLocation=e,this._removeListenerFns=[],this._baseHref=n??this._platformLocation.getBaseHrefFromDOM()??Ft(jt).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 DT(this._baseHref,e)}path(e=!1){const n=this._platformLocation.pathname+Gc(this._platformLocation.search),r=this._platformLocation.hash;return r&&e?`${n}${r}`:n}pushState(e,n,r,s){const o=this.prepareExternalUrl(r+Gc(s));this._platformLocation.pushState(e,n,o)}replaceState(e,n,r,s){const o=this.prepareExternalUrl(r+Gc(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)(ee(AT),ee(WN,8))},i.\u0275prov=ke({token:i,factory:i.\u0275fac,providedIn:"root"}),i})(),C9=(()=>{class i extends Ih{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=DT(this._baseHref,e);return n.length>0?"#"+n:n}pushState(e,n,r,s){let o=this.prepareExternalUrl(r+Gc(s));0==o.length&&(o=this._platformLocation.pathname),this._platformLocation.pushState(e,n,o)}replaceState(e,n,r,s){let o=this.prepareExternalUrl(r+Gc(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)(ee(AT),ee(WN,8))},i.\u0275prov=ke({token:i,factory:i.\u0275fac}),i})(),_y=(()=>{class i{constructor(e){this._subject=new We,this._urlChangeListeners=[],this._urlChangeSubscription=null,this._locationStrategy=e;const n=this._locationStrategy.getBaseHref();this._basePath=function A9(i){if(new RegExp("^(https?:)?//").test(i)){const[,e]=i.split(/\/\/[^\/]+/);return e}return i}($N(YN(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+Gc(n))}normalize(e){return i.stripTrailingSlash(function E9(i,t){if(!i||!t.startsWith(i))return t;const e=t.substring(i.length);return""===e||["/",";","?","#"].includes(e[0])?e:t}(this._basePath,YN(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+Gc(n)),r)}replaceState(e,n="",r=null){this._locationStrategy.replaceState(r,"",e,n),this._notifyUrlChangeListeners(this.prepareExternalUrl(e+Gc(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=Gc,i.joinWithSlash=DT,i.stripTrailingSlash=$N,i.\u0275fac=function(e){return new(e||i)(ee(Ih))},i.\u0275prov=ke({token:i,factory:function(){return function S9(){return new _y(ee(Ih))}()},providedIn:"root"}),i})();function YN(i){return i.replace(/\/index.html$/,"")}var So=(()=>((So=So||{})[So.Decimal=0]="Decimal",So[So.Percent=1]="Percent",So[So.Currency=2]="Currency",So[So.Scientific=3]="Scientific",So))(),Ht=(()=>((Ht=Ht||{})[Ht.Decimal=0]="Decimal",Ht[Ht.Group=1]="Group",Ht[Ht.List=2]="List",Ht[Ht.PercentSign=3]="PercentSign",Ht[Ht.PlusSign=4]="PlusSign",Ht[Ht.MinusSign=5]="MinusSign",Ht[Ht.Exponential=6]="Exponential",Ht[Ht.SuperscriptingExponent=7]="SuperscriptingExponent",Ht[Ht.PerMille=8]="PerMille",Ht[Ht.Infinity=9]="Infinity",Ht[Ht.NaN=10]="NaN",Ht[Ht.TimeSeparator=11]="TimeSeparator",Ht[Ht.CurrencyDecimal=12]="CurrencyDecimal",Ht[Ht.CurrencyGroup=13]="CurrencyGroup",Ht))();function Aa(i,t){const e=so(i),n=e[rt.NumberSymbols][t];if(typeof n>"u"){if(t===Ht.CurrencyDecimal)return e[rt.NumberSymbols][Ht.Decimal];if(t===Ht.CurrencyGroup)return e[rt.NumberSymbols][Ht.Group]}return n}const J9=/^(\d+)?\.((\d+)(-(\d+))?)?$/,JN=22,eM=".",yy="0",eY=";",tY=",",PT="#";function LT(i){const t=parseInt(i);if(isNaN(t))throw new Error("Invalid integer literal when parsing "+i);return t}const BT=/\s+/,nB=[];let hm=(()=>{class i{constructor(e,n,r,s){this._iterableDiffers=e,this._keyValueDiffers=n,this._ngEl=r,this._renderer=s,this.initialClasses=nB,this.stateMap=new Map}set klass(e){this.initialClasses=null!=e?e.trim().split(BT):nB}set ngClass(e){this.rawClass="string"==typeof e?e.trim().split(BT):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(BT).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)(E(Ww),E(gy),E(mt),E(ol))},i.\u0275dir=ve({type:i,selectors:[["","ngClass",""]],inputs:{klass:["class","klass"],ngClass:"ngClass"},standalone:!0}),i})();class hY{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 Eo=(()=>{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 hY(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),sB(a,r)}});for(let r=0,s=n.length;r{sB(n.get(r.currentIndex),r)})}static ngTemplateContextGuard(e,n){return!0}}return i.\u0275fac=function(e){return new(e||i)(E(Wr),E(Co),E(Ww))},i.\u0275dir=ve({type:i,selectors:[["","ngFor","","ngForOf",""]],inputs:{ngForOf:"ngForOf",ngForTrackBy:"ngForTrackBy",ngForTemplate:"ngForTemplate"},standalone:!0}),i})();function sB(i,t){i.context.$implicit=t.item}let vi=(()=>{class i{constructor(e,n){this._viewContainer=e,this._context=new pY,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){oB("ngIfThen",e),this._thenTemplateRef=e,this._thenViewRef=null,this._updateView()}set ngIfElse(e){oB("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)(E(Wr),E(Co))},i.\u0275dir=ve({type:i,selectors:[["","ngIf",""]],inputs:{ngIf:"ngIf",ngIfThen:"ngIfThen",ngIfElse:"ngIfElse"},standalone:!0}),i})();class pY{constructor(){this.$implicit=null,this.ngIf=null}}function oB(i,t){if(t&&!t.createEmbeddedView)throw new Error(`${i} must be a TemplateRef, but received '${pi(t)}'.`)}class UT{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 by=(()=>{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=ve({type:i,selectors:[["","ngSwitch",""]],inputs:{ngSwitch:"ngSwitch"},standalone:!0}),i})(),VT=(()=>{class i{constructor(e,n,r){this.ngSwitch=r,r._addCase(),this._view=new UT(e,n)}ngDoCheck(){this._view.enforceState(this.ngSwitch._matchCase(this.ngSwitchCase))}}return i.\u0275fac=function(e){return new(e||i)(E(Wr),E(Co),E(by,9))},i.\u0275dir=ve({type:i,selectors:[["","ngSwitchCase",""]],inputs:{ngSwitchCase:"ngSwitchCase"},standalone:!0}),i})(),aB=(()=>{class i{constructor(e,n,r){r._addDefault(new UT(e,n))}}return i.\u0275fac=function(e){return new(e||i)(E(Wr),E(Co),E(by,9))},i.\u0275dir=ve({type:i,selectors:[["","ngSwitchDefault",""]],standalone:!0}),i})(),tM=(()=>{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:Es.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)(E(mt),E(gy),E(ol))},i.\u0275dir=ve({type:i,selectors:[["","ngStyle",""]],inputs:{ngStyle:"ngStyle"},standalone:!0}),i})(),xy=(()=>{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)(E(Wr))},i.\u0275dir=ve({type:i,selectors:[["","ngTemplateOutlet",""]],inputs:{ngTemplateOutletContext:"ngTemplateOutletContext",ngTemplateOutlet:"ngTemplateOutlet",ngTemplateOutletInjector:"ngTemplateOutletInjector"},standalone:!0,features:[bi]}),i})();function fl(i,t){return new pe(2100,!1)}class gY{createSubscription(t,e){return t.subscribe({next:e,error:n=>{throw n}})}dispose(t){t.unsubscribe()}}class _Y{createSubscription(t,e){return t.then(e,n=>{throw n})}dispose(t){}}const vY=new _Y,yY=new gY;let pl=(()=>{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(oy(e))return vY;if(uL(e))return yY;throw fl()}_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)(E(Zn,16))},i.\u0275pipe=Hi({name:"async",type:i,pure:!1,standalone:!0}),i})(),cB=(()=>{class i{constructor(e){this.differs=e,this.keyValues=[],this.compareFn=dB}transform(e,n=dB){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 kY(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)(E(gy,16))},i.\u0275pipe=Hi({name:"keyvalue",type:i,pure:!1,standalone:!0}),i})();function dB(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 zT(i){return!(null==i||""===i||i!=i)}(e))return null;r=r||this._locale;try{return function sY(i,t,e){return function OT(i,t,e,n,r,s,o=!1){let a="",l=!1;if(isFinite(i)){let c=function aY(i){let n,r,s,o,a,t=Math.abs(i)+"",e=0;for((r=t.indexOf(eM))>-1&&(t=t.replace(eM,"")),(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)===yy;s++);if(s===(a=t.length))n=[0],r=1;else{for(a--;t.charAt(a)===yy;)a--;for(r-=s,n=[],o=0;s<=a;s++,o++)n[o]=Number(t.charAt(s))}return r>JN&&(n=n.splice(0,JN-1),e=r-1,r=1),{digits:n,exponent:e,integerLen:r}}(i);o&&(c=function oY(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 d=t.minInt,h=t.minFrac,p=t.maxFrac;if(s){const M=s.match(J9);if(null===M)throw new Error(`${s} is not a valid digit info`);const x=M[1],C=M[3],F=M[5];null!=x&&(d=LT(x)),null!=C&&(h=LT(C)),null!=F?p=LT(F):null!=C&&h>p&&(p=h)}!function lY(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);d&&(n.unshift(d),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(Aa(e,n)),v.length&&(a+=Aa(e,r)+v.join("")),b&&(a+=Aa(e,Ht.Exponential)+"+"+b)}else a=Aa(e,Ht.Infinity);return a=i<0&&!l?t.negPre+a+t.negSuf:t.posPre+a+t.posSuf,a}(i,function FT(i,t="-"){const e={minInt:1,minFrac:0,maxFrac:0,posPre:"",posSuf:"",negPre:"",negSuf:"",gSize:0,lgSize:0},n=i.split(eY),r=n[0],s=n[1],o=-1!==r.indexOf(eM)?r.split(eM):[r.substring(0,r.lastIndexOf(yy)+1),r.substring(r.lastIndexOf(yy)+1)],a=o[0],l=o[1]||"";e.posPre=a.substring(0,a.indexOf(PT));for(let d=0;d{class i{}return i.\u0275fac=function(e){return new(e||i)},i.\u0275mod=nn({type:i}),i.\u0275inj=Kt({}),i})();const hB="browser";let UY=(()=>{class i{}return i.\u0275prov=ke({token:i,providedIn:"root",factory:()=>new VY(ee(jt),window)}),i})();class VY{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 zY(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=fB(this.window.history)||fB(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 fB(i){return Object.getOwnPropertyDescriptor(i,"scrollRestoration")}class m7 extends b9{constructor(){super(...arguments),this.supportsDOMEvents=!0}}class WT extends m7{static makeCurrent(){!function y9(i){ET||(ET=i)}(new WT)}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 g7(){return My=My||document.querySelector("base"),My?My.getAttribute("href"):null}();return null==e?null:function _7(i){rM=rM||document.createElement("a"),rM.setAttribute("href",i);const t=rM.pathname;return"/"===t.charAt(0)?t:`/${t}`}(e)}resetBaseElement(){My=null}getUserAgent(){return window.navigator.userAgent}getCookie(t){return function dY(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 rM,My=null;const vB=new me("TRANSITION_ID"),y7=[{provide:Uw,useFactory:function v7(i,t,e){return()=>{e.get(Vw).donePromise.then(()=>{const n=Hc(),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=ke({token:i,factory:i.\u0275fac}),i})();const sM=new me("EventManagerPlugins");let oM=(()=>{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=ke({token:i,factory:i.\u0275fac}),i})(),Cy=(()=>{class i extends bB{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)(ee(jt))},i.\u0275prov=ke({token:i,factory:i.\u0275fac}),i})();const jT={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/"},YT=/%COMP%/g,MB=new me("RemoveStylesOnCompDestory",{providedIn:"root",factory:()=>!1});function CB(i,t){return t.flat(100).map(e=>e.replace(YT,i))}function SB(i){return t=>{if("__ngUnwrap__"===t)return i;!1===i(t)&&(t.preventDefault(),t.returnValue=!1)}}let aM=(()=>{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 qT(e)}createRenderer(e,n){if(!e||!n)return this.defaultRenderer;const r=this.getOrCreateRenderer(e,n);return r instanceof DB?r.applyToHost(e):r instanceof XT&&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 Xs.Emulated:s=new DB(o,a,n,this.appId,l);break;case Xs.ShadowDom:return new D7(o,a,e,n);default:s=new XT(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)(ee(oM),ee(Cy),ee(cm),ee(MB))},i.\u0275prov=ke({token:i,factory:i.\u0275fac}),i})();class qT{constructor(t){this.eventManager=t,this.data=Object.create(null),this.destroyNode=null}destroy(){}createElement(t,e){return e?document.createElementNS(jT[e]||e,t):document.createElement(t)}createComment(t){return document.createComment(t)}createText(t){return document.createTextNode(t)}appendChild(t,e){(AB(t)?t.content:t).appendChild(e)}insertBefore(t,e,n){t&&(AB(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=jT[r];s?t.setAttributeNS(s,e,n):t.setAttribute(e,n)}else t.setAttribute(e,n)}removeAttribute(t,e,n){if(n){const r=jT[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&(Es.DashCase|Es.Important)?t.style.setProperty(e,n,r&Es.Important?"important":""):t.style[e]=n}removeStyle(t,e,n){n&Es.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,SB(n)):this.eventManager.addEventListener(t,e,SB(n))}}function AB(i){return"TEMPLATE"===i.tagName&&void 0!==i.content}class D7 extends qT{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=CB(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 XT extends qT{constructor(t,e,n,r,s=n.id){super(t),this.sharedStylesHost=e,this.removeStylesOnCompDestory=r,this.rendererUsageCount=0,this.styles=CB(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 DB extends XT{constructor(t,e,n,r,s){const o=r+"-"+n.id;super(t,e,n,s,o),this.contentAttr=function S7(i){return"_ngcontent-%COMP%".replace(YT,i)}(o),this.hostAttr=function E7(i){return"_nghost-%COMP%".replace(YT,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 T7=(()=>{class i extends yB{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)(ee(jt))},i.\u0275prov=ke({token:i,factory:i.\u0275fac}),i})();const TB=["alt","control","meta","shift"],I7={"\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"},R7={alt:i=>i.altKey,control:i=>i.ctrlKey,meta:i=>i.metaKey,shift:i=>i.shiftKey};let k7=(()=>{class i extends yB{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(()=>Hc().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."),TB.forEach(c=>{const d=n.indexOf(c);d>-1&&(n.splice(d,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=I7[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"),TB.forEach(o=>{o!==r&&(0,R7[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)(ee(jt))},i.\u0275prov=ke({token:i,factory:i.\u0275fac}),i})();const L7=SN(g9,"browser",[{provide:fT,useValue:hB},{provide:pN,useValue:function P7(){WT.makeCurrent()},multi:!0},{provide:jt,useFactory:function F7(){return function sD(i){vv=i}(document),document},deps:[]}]),kB=new me(""),PB=[{provide:zw,useClass:class b7{addToWindow(t){Rn.getAngularTestability=(n,r=!0)=>{const s=t.findTestabilityInTree(n,r);if(null==s)throw new Error("Could not find testability for element.");return s},Rn.getAllAngularTestabilities=()=>t.getAllTestabilities(),Rn.getAllAngularRootElements=()=>t.getAllRootElements(),Rn.frameworkStabilizers||(Rn.frameworkStabilizers=[]),Rn.frameworkStabilizers.push(n=>{const r=Rn.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?Hc().isShadowRoot(e)?this.findTestabilityInTree(t,e.host,!0):this.findTestabilityInTree(t,e.parentElement,!0):null)}},deps:[]},{provide:bN,useClass:_T,deps:[ft,vT,zw]},{provide:_T,useClass:_T,deps:[ft,vT,zw]}],OB=[{provide:Iv,useValue:"root"},{provide:al,useFactory:function O7(){return new al},deps:[]},{provide:sM,useClass:T7,multi:!0,deps:[jt,ft,fT]},{provide:sM,useClass:k7,multi:!0,deps:[jt]},{provide:aM,useClass:aM,deps:[oM,Cy,cm,MB]},{provide:Gl,useExisting:aM},{provide:bB,useExisting:Cy},{provide:Cy,useClass:Cy,deps:[jt]},{provide:oM,useClass:oM,deps:[sM,ft]},{provide:class HY{},useClass:x7,deps:[]},[]];let FB=(()=>{class i{constructor(e){}static withServerTransition(e){return{ngModule:i,providers:[{provide:cm,useValue:e.appId},{provide:vB,useExisting:cm},y7]}}}return i.\u0275fac=function(e){return new(e||i)(ee(kB,12))},i.\u0275mod=nn({type:i}),i.\u0275inj=Kt({providers:[...OB,...PB],imports:[Ao,_9]}),i})(),LB=(()=>{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)(ee(jt))},i.\u0275prov=ke({token:i,factory:function(e){let n=null;return n=e?new e:function B7(){return new LB(ee(jt))}(),n},providedIn:"root"}),i})();typeof window<"u"&&window;let QT=(()=>{class i{}return i.\u0275fac=function(e){return new(e||i)},i.\u0275prov=ke({token:i,factory:function(e){let n=null;return n=e?new(e||i):ee(UB),n},providedIn:"root"}),i})(),UB=(()=>{class i extends QT{constructor(e){super(),this._doc=e}sanitize(e,n){if(null==n)return null;switch(e){case Kn.NONE:return n;case Kn.HTML:return Ca(n,"HTML")?eo(n):Zx(this._doc,String(n)).toString();case Kn.STYLE:return Ca(n,"Style")?eo(n):n;case Kn.SCRIPT:if(Ca(n,"Script"))return eo(n);throw new Error("unsafe value used in a script context");case Kn.URL:return Ca(n,"URL")?eo(n):xh(String(n));case Kn.RESOURCE_URL:if(Ca(n,"ResourceURL"))return eo(n);throw new Error(`unsafe value used in a resource URL context (see ${qu})`);default:throw new Error(`Unexpected SecurityContext ${e} (see ${qu})`)}}bypassSecurityTrustHtml(e){return function uD(i){return new oD(i)}(e)}bypassSecurityTrustStyle(e){return function hD(i){return new aD(i)}(e)}bypassSecurityTrustScript(e){return function fD(i){return new lD(i)}(e)}bypassSecurityTrustUrl(e){return function pD(i){return new cD(i)}(e)}bypassSecurityTrustResourceUrl(e){return function mD(i){return new Pp(i)}(e)}}return i.\u0275fac=function(e){return new(e||i)(ee(jt))},i.\u0275prov=ke({token:i,factory:function(e){let n=null;return n=e?new e:function G7(i){return new UB(i.get(jt))}(ee(Gi)),n},providedIn:"root"}),i})();function ht(...i){return Li(i,$u(i))}class gt extends Re{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 fm=V(i=>function(){i(this),this.name="EmptyError",this.message="no elements in sequence"}),{isArray:$7}=Array,{getPrototypeOf:W7,prototype:j7,keys:Y7}=Object;function VB(i){if(1===i.length){const t=i[0];if($7(t))return{args:t,keys:null};if(function q7(i){return i&&"object"==typeof i&&W7(i)===j7}(t)){const e=Y7(t);return{args:e.map(n=>t[n]),keys:e}}}return{args:i,keys:null}}const{isArray:X7}=Array;function JT(i){return et(t=>function K7(i,t){return X7(t)?i(...t):i(t)}(i,t))}function zB(i,t){return i.reduce((e,n,r)=>(e[n]=t[r],e),{})}function nu(...i){const t=$u(i),e=w0(i),{args:n,keys:r}=VB(i);if(0===n.length)return Li([],t);const s=new In(function Z7(i,t,e=$a){return n=>{HB(t,()=>{const{length:r}=i,s=new Array(r);let o=r,a=r;for(let l=0;l{const c=Li(i[l],t);let d=!1;c.subscribe(Yn(n,h=>{s[l]=h,d||(d=!0,a--),a||n.next(e(s.slice()))},()=>{--o||n.complete()}))},n)},n)}}(n,t,r?o=>zB(r,o):$a));return e?s.pipe(JT(e)):s}function HB(i,t,e){i?Ya(e,i,t):t()}function Sy(...i){return function Q7(){return yd(1)}()(Li(i,$u(i)))}function Ey(i){return new In(t=>{wr(i()).subscribe(t)})}function pm(i,t){const e=cn(i)?i:()=>i,n=r=>r.error(e());return new In(t?r=>t.schedule(n,0,r):n)}function eI(){return ti((i,t)=>{let e=null;i._refCount++;const n=Yn(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 GB extends In{constructor(t,e){super(),this.source=t,this.subjectFactory=e,this._subject=null,this._refCount=0,this._connection=null,c0(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 Zt;const e=this.getSubject();t.add(this.source.subscribe(Yn(e,void 0,()=>{this._teardown(),e.complete()},n=>{this._teardown(),e.error(n)},()=>this._teardown()))),t.closed&&(this._connection=null,t=Zt.EMPTY)}return t}refCount(){return eI()(this)}}function Rs(i,t){return ti((e,n)=>{let r=null,s=0,o=!1;const a=()=>o&&!r&&n.complete();e.subscribe(Yn(n,l=>{r?.unsubscribe();let c=0;const d=s++;wr(i(l,d)).subscribe(r=Yn(n,h=>n.next(t?t(l,h,d,c++):h),()=>{r=null,a()}))},()=>{o=!0,a()}))})}function Pi(i){return i<=0?()=>mo:ti((t,e)=>{let n=0;t.subscribe(Yn(e,r=>{++n<=i&&(e.next(r),i<=n&&e.complete())}))})}function Do(...i){const t=$u(i);return ti((e,n)=>{(t?Sy(i,e,t):Sy(i,e)).subscribe(n)})}function gn(i,t){return ti((e,n)=>{let r=0;e.subscribe(Yn(n,s=>i.call(t,s,r++)&&n.next(s)))})}function lM(i){return ti((t,e)=>{let n=!1;t.subscribe(Yn(e,r=>{n=!0,e.next(r)},()=>{n||e.next(i),e.complete()}))})}function $B(i=J7){return ti((t,e)=>{let n=!1;t.subscribe(Yn(e,r=>{n=!0,e.next(r)},()=>n?e.complete():e.error(i())))})}function J7(){return new fm}function iu(i,t){const e=arguments.length>=2;return n=>n.pipe(i?gn((r,s)=>i(r,s,n)):$a,Pi(1),e?lM(t):$B(()=>new fm))}function ru(i,t){return cn(t)?ir(i,t,1):ir(i,1)}function Ui(i,t,e){const n=cn(i)||t||e?{next:i,error:t,complete:e}:i;return n?ti((r,s)=>{var o;null===(o=n.subscribe)||void 0===o||o.call(n);let a=!0;r.subscribe(Yn(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)}))}):$a}function Wc(i){return ti((t,e)=>{let s,n=null,r=!1;n=t.subscribe(Yn(e,void 0,void 0,o=>{s=wr(i(o,Wc(i)(t))),n?(n.unsubscribe(),n=null,s.subscribe(e)):r=!0})),r&&(n.unsubscribe(),n=null,s.subscribe(e))})}function tI(i,t){return ti(function eq(i,t,e,n,r){return(s,o)=>{let a=e,l=t,c=0;s.subscribe(Yn(o,d=>{const h=c++;l=a?i(l,d,h):(a=!0,d),n&&o.next(l)},r&&(()=>{a&&o.next(l),o.complete()})))}}(i,t,arguments.length>=2,!0))}function nI(i){return i<=0?()=>mo:ti((t,e)=>{let n=[];t.subscribe(Yn(e,r=>{n.push(r),i{for(const r of n)e.next(r);e.complete()},void 0,()=>{n=null}))})}function WB(i,t){const e=arguments.length>=2;return n=>n.pipe(i?gn((r,s)=>i(r,s,n)):$a,nI(1),e?lM(t):$B(()=>new fm))}function jB(i,t=!1){return ti((e,n)=>{let r=0;e.subscribe(Yn(n,s=>{const o=i(s,r++);(o||t)&&n.next(s),!o&&n.complete()}))})}function YB(i){return et(()=>i)}function su(i){return ti((t,e)=>{try{t.subscribe(e)}finally{e.add(i)}})}const _n="primary",Ay=Symbol("RouteTitle");class tq{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 tq(i)}function nq(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 XB(i){return Array.prototype.concat.apply([],i)}function KB(i){return i.length>0?i[i.length-1]:null}function os(i,t){for(const e in i)i.hasOwnProperty(e)&&t(i[e],e)}function ou(i){return L1(i)?i:oy(i)?Li(Promise.resolve(i)):ht(i)}const cM=!1,rq={exact:function JB(i,t,e){if(!Rh(i.segments,t.segments)||!dM(i.segments,t.segments,e)||i.numberOfChildren!==t.numberOfChildren)return!1;for(const n in t.children)if(!i.children[n]||!JB(i.children[n],t.children[n],e))return!1;return!0},subset:e3},ZB={exact:function sq(i,t){return Xl(i,t)},subset:function oq(i,t){return Object.keys(t).length<=Object.keys(i).length&&Object.keys(t).every(e=>qB(i[e],t[e]))},ignored:()=>!0};function QB(i,t,e){return rq[e.paths](i.root,t.root,e.matrixParams)&&ZB[e.queryParams](i.queryParams,t.queryParams)&&!("exact"===e.fragment&&i.fragment!==t.fragment)}function e3(i,t,e){return t3(i,t,t.segments,e)}function t3(i,t,e,n){if(i.segments.length>e.length){const r=i.segments.slice(0,e.length);return!(!Rh(r,e)||t.hasChildren()||!dM(r,e,n))}if(i.segments.length===e.length){if(!Rh(i.segments,e)||!dM(i.segments,e,n))return!1;for(const r in t.children)if(!i.children[r]||!e3(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!!(Rh(i.segments,r)&&dM(i.segments,r,n)&&i.children[_n])&&t3(i.children[_n],t,s,n)}}function dM(i,t,e){return t.every((n,r)=>ZB[e](i[r].parameters,n.parameters))}class au{constructor(t=new Tn([],{}),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 cq.serialize(this)}}class Tn{constructor(t,e){this.segments=t,this.children=e,this.parent=null,os(e,(n,r)=>n.parent=this)}hasChildren(){return this.numberOfChildren>0}get numberOfChildren(){return Object.keys(this.children).length}toString(){return uM(this)}}class Dy{constructor(t,e){this.path=t,this.parameters=e}get parameterMap(){return this._parameterMap||(this._parameterMap=mm(this.parameters)),this._parameterMap}toString(){return s3(this)}}function Rh(i,t){return i.length===t.length&&i.every((e,n)=>e.path===t[n].path)}let Ty=(()=>{class i{}return i.\u0275fac=function(e){return new(e||i)},i.\u0275prov=ke({token:i,factory:function(){return new iI},providedIn:"root"}),i})();class iI{parse(t){const e=new vq(t);return new au(e.parseRootSegment(),e.parseQueryParams(),e.parseFragment())}serialize(t){const e=`/${Iy(t.root,!0)}`,n=function hq(i){const t=Object.keys(i).map(e=>{const n=i[e];return Array.isArray(n)?n.map(r=>`${hM(e)}=${hM(r)}`).join("&"):`${hM(e)}=${hM(n)}`}).filter(e=>!!e);return t.length?`?${t.join("&")}`:""}(t.queryParams);return`${e}${n}${"string"==typeof t.fragment?`#${function dq(i){return encodeURI(i)}(t.fragment)}`:""}`}}const cq=new iI;function uM(i){return i.segments.map(t=>s3(t)).join("/")}function Iy(i,t){if(!i.hasChildren())return uM(i);if(t){const e=i.children[_n]?Iy(i.children[_n],!1):"",n=[];return os(i.children,(r,s)=>{s!==_n&&n.push(`${s}:${Iy(r,!1)}`)}),n.length>0?`${e}(${n.join("//")})`:e}{const e=function lq(i,t){let e=[];return os(i.children,(n,r)=>{r===_n&&(e=e.concat(t(n,r)))}),os(i.children,(n,r)=>{r!==_n&&(e=e.concat(t(n,r)))}),e}(i,(n,r)=>r===_n?[Iy(i.children[_n],!1)]:[`${r}:${Iy(n,!1)}`]);return 1===Object.keys(i.children).length&&null!=i.children[_n]?`${uM(i)}/${e[0]}`:`${uM(i)}/(${e.join("//")})`}}function n3(i){return encodeURIComponent(i).replace(/%40/g,"@").replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",")}function hM(i){return n3(i).replace(/%3B/gi,";")}function rI(i){return n3(i).replace(/\(/g,"%28").replace(/\)/g,"%29").replace(/%26/gi,"&")}function fM(i){return decodeURIComponent(i)}function r3(i){return fM(i.replace(/\+/g,"%20"))}function s3(i){return`${rI(i.path)}${function uq(i){return Object.keys(i).map(t=>`;${rI(t)}=${rI(i[t])}`).join("")}(i.parameters)}`}const fq=/^[^\/()?;=#]+/;function pM(i){const t=i.match(fq);return t?t[0]:""}const pq=/^[^=?&#]+/,gq=/^[^&#]+/;class vq{constructor(t){this.url=t,this.remaining=t}parseRootSegment(){return this.consumeOptional("/"),""===this.remaining||this.peekStartsWith("?")||this.peekStartsWith("#")?new Tn([],{}):new Tn([],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[_n]=new Tn(t,e)),n}parseSegment(){const t=pM(this.remaining);if(""===t&&this.peekStartsWith(";"))throw new pe(4009,cM);return this.capture(t),new Dy(fM(t),this.parseMatrixParams())}parseMatrixParams(){const t={};for(;this.consumeOptional(";");)this.parseParam(t);return t}parseParam(t){const e=pM(this.remaining);if(!e)return;this.capture(e);let n="";if(this.consumeOptional("=")){const r=pM(this.remaining);r&&(n=r,this.capture(n))}t[fM(e)]=fM(n)}parseQueryParam(t){const e=function mq(i){const t=i.match(pq);return t?t[0]:""}(this.remaining);if(!e)return;this.capture(e);let n="";if(this.consumeOptional("=")){const o=function _q(i){const t=i.match(gq);return t?t[0]:""}(this.remaining);o&&(n=o,this.capture(n))}const r=r3(e),s=r3(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=pM(this.remaining),r=this.remaining[n.length];if("/"!==r&&")"!==r&&";"!==r)throw new pe(4010,cM);let s;n.indexOf(":")>-1?(s=n.slice(0,n.indexOf(":")),this.capture(s),this.capture(":")):t&&(s=_n);const o=this.parseChildren();e[s]=1===Object.keys(o).length?o[_n]:new Tn([],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 pe(4011,cM)}}function sI(i){return i.segments.length>0?new Tn([],{[_n]:i}):i}function mM(i){const t={};for(const n of Object.keys(i.children)){const s=mM(i.children[n]);(s.segments.length>0||s.hasChildren())&&(t[n]=s)}return function yq(i){if(1===i.numberOfChildren&&i.children[_n]){const t=i.children[_n];return new Tn(i.segments.concat(t.segments),t.children)}return i}(new Tn(i.segments,t))}function kh(i){return i instanceof au}const oI=!1;function bq(i,t,e,n,r){if(0===e.length)return gm(t.root,t.root,t.root,n,r);const s=function d3(i){if("string"==typeof i[0]&&1===i.length&&"/"===i[0])return new c3(!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 os(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 c3(e,t,n)}(e);return s.toRoot()?gm(t.root,t.root,new Tn([],{}),n,r):function o(l){const c=function wq(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 u3(i,t,e){let n=i,r=t,s=e;for(;s>r;){if(s-=r,n=n.parent,!n)throw new pe(4005,oI&&"Invalid number of '../'");r=n.segments.length}return new _m(n,!1,r-s)}(e,n+(Ry(i.commands[0])?0:1),i.numberOfDoubleDots)}(s,t,i.snapshot?._urlSegment,l),d=c.processChildren?vm(c.segmentGroup,c.index,s.commands):aI(c.segmentGroup,c.index,s.commands);return gm(t.root,c.segmentGroup,d,n,r)}(i.snapshot?._lastPathIndex)}function Ry(i){return"object"==typeof i&&null!=i&&!i.outlets&&!i.segmentPath}function ky(i){return"object"==typeof i&&null!=i&&i.outlets}function gm(i,t,e,n,r){let o,s={};n&&os(n,(l,c)=>{s[c]=Array.isArray(l)?l.map(d=>`${d}`):`${l}`}),o=i===t?e:l3(i,t,e);const a=sI(mM(o));return new au(a,s,r)}function l3(i,t,e){const n={};return os(i.children,(r,s)=>{n[s]=r===t?e:l3(r,t,e)}),new Tn(i.segments,n)}class c3{constructor(t,e,n){if(this.isAbsolute=t,this.numberOfDoubleDots=e,this.commands=n,t&&n.length>0&&Ry(n[0]))throw new pe(4003,oI&&"Root segment cannot have matrix parameters");const r=n.find(ky);if(r&&r!==KB(n))throw new pe(4004,oI&&"{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 aI(i,t,e){if(i||(i=new Tn([],{})),0===i.segments.length&&i.hasChildren())return vm(i,t,e);const n=function Cq(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(ky(a))break;const l=`${a}`,c=n0&&void 0===l)break;if(l&&c&&"object"==typeof c&&void 0===c.outlets){if(!f3(l,c,o))return s;n+=2}else{if(!f3(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]=aI(i.children[o],t,s))}),os(i.children,(s,o)=>{void 0===n[o]&&(r[o]=s)}),new Tn(i.segments,r)}}function lI(i,t,e){const n=i.segments.slice(0,t);let r=0;for(;r{"string"==typeof e&&(e=[e]),null!==e&&(t[n]=lI(new Tn([],{}),0,e))}),t}function h3(i){const t={};return os(i,(e,n)=>t[n]=`${e}`),t}function f3(i,t,e){return i==e.path&&Xl(t,e.parameters)}const Py="imperative";class Kl{constructor(t,e){this.id=t,this.url=e}}class cI extends Kl{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 Ph extends Kl{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 gM extends Kl{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 _M extends Kl{constructor(t,e,n,r){super(t,e),this.reason=n,this.code=r,this.type=16}}class dI extends Kl{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 Eq extends Kl{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 Aq extends Kl{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 Dq extends Kl{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 Tq extends Kl{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 Iq extends Kl{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 Rq{constructor(t){this.route=t,this.type=9}toString(){return`RouteConfigLoadStart(path: ${this.route.path})`}}class kq{constructor(t){this.route=t,this.type=10}toString(){return`RouteConfigLoadEnd(path: ${this.route.path})`}}class Pq{constructor(t){this.snapshot=t,this.type=11}toString(){return`ChildActivationStart(path: '${this.snapshot.routeConfig&&this.snapshot.routeConfig.path||""}')`}}class Oq{constructor(t){this.snapshot=t,this.type=12}toString(){return`ChildActivationEnd(path: '${this.snapshot.routeConfig&&this.snapshot.routeConfig.path||""}')`}}class Fq{constructor(t){this.snapshot=t,this.type=13}toString(){return`ActivationStart(path: '${this.snapshot.routeConfig&&this.snapshot.routeConfig.path||""}')`}}class Lq{constructor(t){this.snapshot=t,this.type=14}toString(){return`ActivationEnd(path: '${this.snapshot.routeConfig&&this.snapshot.routeConfig.path||""}')`}}class p3{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 Uq=(()=>{class i{createUrlTree(e,n,r,s,o,a){return bq(e||n.root,r,s,o,a)}}return i.\u0275fac=function(e){return new(e||i)},i.\u0275prov=ke({token:i,factory:i.\u0275fac}),i})(),zq=(()=>{class i{}return i.\u0275fac=function(e){return new(e||i)},i.\u0275prov=ke({token:i,factory:function(t){return Uq.\u0275fac(t)},providedIn:"root"}),i})();class m3{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=uI(t,this._root);return e?e.children.map(n=>n.value):[]}firstChild(t){const e=uI(t,this._root);return e&&e.children.length>0?e.children[0].value:null}siblings(t){const e=hI(t,this._root);return e.length<2?[]:e[e.length-2].children.map(r=>r.value).filter(r=>r!==t)}pathFromRoot(t){return hI(t,this._root).map(e=>e.value)}}function uI(i,t){if(i===t.value)return t;for(const e of t.children){const n=uI(i,e);if(n)return n}return null}function hI(i,t){if(i===t.value)return[t];for(const e of t.children){const n=hI(i,e);if(n.length)return n.unshift(t),n}return[]}class jc{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 g3 extends m3{constructor(t,e){super(t),this.snapshot=e,fI(this,t)}toString(){return this.snapshot.toString()}}function _3(i,t){const e=function Hq(i,t){const o=new vM([],{},{},"",{},_n,t,null,i.root,-1,{});return new y3("",new jc(o,[]))}(i,t),n=new gt([new Dy("",{})]),r=new gt({}),s=new gt({}),o=new gt({}),a=new gt(""),l=new bm(n,r,o,a,s,_n,t,e.root);return l.snapshot=e.root,new g3(new jc(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(et(c=>c[Ay]))??ht(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(et(t=>mm(t)))),this._paramMap}get queryParamMap(){return this._queryParamMap||(this._queryParamMap=this.queryParams.pipe(et(t=>mm(t)))),this._queryParamMap}toString(){return this.snapshot?this.snapshot.toString():`Future(${this._futureSnapshot})`}}function v3(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 Gq(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 vM{get title(){return this.data?.[Ay]}constructor(t,e,n,r,s,o,a,l,c,d,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=d,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 y3 extends m3{constructor(t,e){super(e),this.url=t,fI(this,e)}toString(){return b3(this._root)}}function fI(i,t){t.value._routerState=i,t.children.forEach(e=>fI(i,e))}function b3(i){const t=i.children.length>0?` { ${i.children.map(b3).join(", ")} } `:"";return`${i.value}${t}`}function pI(i){if(i.snapshot){const t=i.snapshot,e=i._futureSnapshot;i.snapshot=e,Xl(t.queryParams,e.queryParams)||i.queryParams.next(e.queryParams),t.fragment!==e.fragment&&i.fragment.next(e.fragment),Xl(t.params,e.params)||i.params.next(e.params),function iq(i,t){if(i.length!==t.length)return!1;for(let e=0;eXl(e.parameters,t[n].parameters))}(i.url,t.url);return e&&!(!i.parent!=!t.parent)&&(!i.parent||mI(i.parent,t.parent))}function Oy(i,t,e){if(e&&i.shouldReuseRoute(t.value,e.value.snapshot)){const n=e.value;n._futureSnapshot=t.value;const r=function Wq(i,t,e){return t.children.map(n=>{for(const r of e.children)if(i.shouldReuseRoute(n.value,r.value.snapshot))return Oy(i,n,r);return Oy(i,n)})}(i,t,e);return new jc(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=>Oy(i,a)),o}}const n=function jq(i){return new bm(new gt(i.url),new gt(i.params),new gt(i.queryParams),new gt(i.fragment),new gt(i.data),i.outlet,i.component,i)}(t.value),r=t.children.map(s=>Oy(i,s));return new jc(n,r)}}const gI="ngNavigationCancelingError";function x3(i,t){const{redirectTo:e,navigationBehaviorOptions:n}=kh(t)?{redirectTo:t,navigationBehaviorOptions:void 0}:t,r=w3(!1,0,t);return r.url=e,r.navigationBehaviorOptions=n,r}function w3(i,t,e){const n=new Error("NavigationCancelingError: "+(i||""));return n[gI]=!0,n.cancellationCode=t,e&&(n.url=e),n}function M3(i){return C3(i)&&kh(i.url)}function C3(i){return i&&i[gI]}class Yq{constructor(){this.outlet=null,this.route=null,this.resolver=null,this.injector=null,this.children=new Fy,this.attachRef=null}}let Fy=(()=>{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 Yq,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=ke({token:i,factory:i.\u0275fac,providedIn:"root"}),i})();const yM=!1;let S3=(()=>{class i{constructor(){this.activated=null,this._activatedRoute=null,this.name=_n,this.activateEvents=new We,this.deactivateEvents=new We,this.attachEvents=new We,this.detachEvents=new We,this.parentContexts=Ft(Fy),this.location=Ft(Wr),this.changeDetector=Ft(Zn),this.environmentInjector=Ft(no)}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 pe(4012,yM);return this.activated.instance}get activatedRoute(){if(!this.activated)throw new pe(4012,yM);return this._activatedRoute}get activatedRouteData(){return this._activatedRoute?this._activatedRoute.snapshot.data:{}}detach(){if(!this.activated)throw new pe(4012,yM);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 pe(4013,yM);this._activatedRoute=e;const r=this.location,o=e.snapshot.component,a=this.parentContexts.getOrCreateContext(this.name).children,l=new qq(e,a,r.injector);if(n&&function Xq(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=ve({type:i,selectors:[["router-outlet"]],inputs:{name:"name"},outputs:{activateEvents:"activate",deactivateEvents:"deactivate",attachEvents:"attach",detachEvents:"detach"},exportAs:["outlet"],standalone:!0,features:[bi]}),i})();class qq{constructor(t,e,n){this.route=t,this.childContexts=e,this.parent=n}get(t,e){return t===bm?this.route:t===Fy?this.childContexts:this.parent.get(t,e)}}let _I=(()=>{class i{}return i.\u0275fac=function(e){return new(e||i)},i.\u0275cmp=ot({type:i,selectors:[["ng-component"]],standalone:!0,features:[Z1],decls:1,vars:0,template:function(e,n){1&e&&De(0,"router-outlet")},dependencies:[S3],encapsulation:2}),i})();function E3(i,t){return i.providers&&!i._injector&&(i._injector=Fw(i.providers,t,`Route: ${i.path}`)),i._injector??t}function yI(i){const t=i.children&&i.children.map(yI),e=t?{...i,children:t}:{...i};return!e.component&&!e.loadComponent&&(t||e.loadChildren)&&e.outlet&&e.outlet!==_n&&(e.component=_I),e}function Ta(i){return i.outlet||_n}function A3(i,t){const e=i.filter(n=>Ta(n)===t);return e.push(...i.filter(n=>Ta(n)!==t)),e}function Ly(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 eX{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),pI(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]}),os(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 Lq(s.value.snapshot))}),t.children.length&&this.forwardEvent(new Oq(t.value.snapshot))}activateRoutes(t,e,n){const r=t.value,s=e?e.value:null;if(pI(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),pI(a.route.value),this.activateChildRoutes(t,null,o.children)}else{const a=Ly(r.snapshot),l=a?.get(Hl)??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 D3{constructor(t){this.path=t,this.route=this.path[this.path.length-1]}}class bM{constructor(t,e){this.component=t,this.route=e}}function tX(i,t,e){const n=i._root;return Ny(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 Cr(i){return null!==Gf(i)}(i)?t.get(i):i:n}function Ny(i,t,e,n,r={canDeactivateChecks:[],canActivateChecks:[]}){const s=ym(t);return i.children.forEach(o=>{(function iX(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 rX(i,t,e){if("function"==typeof e)return e(i,t);switch(e){case"pathParamsChange":return!Rh(i.url,t.url);case"pathParamsOrQueryParamsChange":return!Rh(i.url,t.url)||!Xl(i.queryParams,t.queryParams);case"always":return!0;case"paramsOrQueryParamsChange":return!mI(i,t)||!Xl(i.queryParams,t.queryParams);default:return!mI(i,t)}}(o,s,s.routeConfig.runGuardsAndResolvers);l?r.canActivateChecks.push(new D3(n)):(s.data=o.data,s._resolvedData=o._resolvedData),Ny(i,t,s.component?a?a.children:null:e,n,r),l&&a&&a.outlet&&a.outlet.isActivated&&r.canDeactivateChecks.push(new bM(a.outlet.component,o))}else o&&By(t,a,r),r.canActivateChecks.push(new D3(n)),Ny(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]}),os(s,(o,a)=>By(o,e.getContext(a),r)),r}function By(i,t,e){const n=ym(i),r=i.value;os(n,(s,o)=>{By(s,r.component?t?t.children.getContext(o):null:t,e)}),e.canDeactivateChecks.push(new bM(r.component&&t&&t.outlet&&t.outlet.isActivated?t.outlet.component:null,r))}function Uy(i){return"function"==typeof i}function bI(i){return i instanceof fm||"EmptyError"===i?.name}const xM=Symbol("INITIAL_VALUE");function wm(){return Rs(i=>nu(i.map(t=>t.pipe(Pi(1),Do(xM)))).pipe(et(t=>{for(const e of t)if(!0!==e){if(e===xM)return xM;if(!1===e||e instanceof au)return e}return!0}),gn(t=>t!==xM),Pi(1)))}function T3(i){return function CE(...i){return a0(i)}(Ui(t=>{if(kh(t))throw x3(0,t)}),et(t=>!0===t))}const xI={matched:!1,consumedSegments:[],remainingSegments:[],parameters:{},positionalParamSegments:{}};function I3(i,t,e,n,r){const s=wI(i,t,e);return s.matched?function xX(i,t,e,n){const r=t.canMatch;return r&&0!==r.length?ht(r.map(o=>{const a=xm(o,i);return ou(function dX(i){return i&&Uy(i.canMatch)}(a)?a.canMatch(t,e):i.runInContext(()=>a(t,e)))})).pipe(wm(),T3()):ht(!0)}(n=E3(t,n),t,e).pipe(et(o=>!0===o?s:{...xI})):ht(s)}function wI(i,t,e){if(""===t.path)return"full"===t.pathMatch&&(i.hasChildren()||e.length>0)?{...xI}:{matched:!0,consumedSegments:[],remainingSegments:e,parameters:{},positionalParamSegments:{}};const r=(t.matcher||nq)(e,i,t);if(!r)return{...xI};const s={};os(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 wM(i,t,e,n){if(e.length>0&&function CX(i,t,e){return e.some(n=>MM(i,t,n)&&Ta(n)!==_n)}(i,e,n)){const s=new Tn(t,function MX(i,t,e,n){const r={};r[_n]=n,n._sourceSegment=i,n._segmentIndexShift=t.length;for(const s of e)if(""===s.path&&Ta(s)!==_n){const o=new Tn([],{});o._sourceSegment=i,o._segmentIndexShift=t.length,r[Ta(s)]=o}return r}(i,t,n,new Tn(e,i.children)));return s._sourceSegment=i,s._segmentIndexShift=t.length,{segmentGroup:s,slicedSegments:[]}}if(0===e.length&&function SX(i,t,e){return e.some(n=>MM(i,t,n))}(i,e,n)){const s=new Tn(i.segments,function wX(i,t,e,n,r){const s={};for(const o of n)if(MM(i,e,o)&&!r[Ta(o)]){const a=new Tn([],{});a._sourceSegment=i,a._segmentIndexShift=t.length,s[Ta(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 Tn(i.segments,i.children);return r._sourceSegment=i,r._segmentIndexShift=t.length,{segmentGroup:r,slicedSegments:e}}function MM(i,t,e){return(!(i.hasChildren()||t.length>0)||"full"!==e.pathMatch)&&""===e.path}function R3(i,t,e,n){return!!(Ta(i)===n||n!==_n&&MM(t,e,i))&&("**"===i.path||wI(t,i,e).matched)}function k3(i,t,e){return 0===t.length&&!i.children[e]}const CM=!1;class SM{constructor(t){this.segmentGroup=t||null}}class P3{constructor(t){this.urlTree=t}}function Vy(i){return pm(new SM(i))}function O3(i){return pm(new P3(i))}class TX{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=wM(this.urlTree.root,[],[],this.config).segmentGroup,e=new Tn(t.segments,t.children);return this.expandSegmentGroup(this.injector,this.config,e,_n).pipe(et(s=>this.createUrlTree(mM(s),this.urlTree.queryParams,this.urlTree.fragment))).pipe(Wc(s=>{if(s instanceof P3)return this.allowRedirects=!1,this.match(s.urlTree);throw s instanceof SM?this.noMatchError(s):s}))}match(t){return this.expandSegmentGroup(this.injector,this.config,t.root,_n).pipe(et(r=>this.createUrlTree(mM(r),t.queryParams,t.fragment))).pipe(Wc(r=>{throw r instanceof SM?this.noMatchError(r):r}))}noMatchError(t){return new pe(4002,CM)}createUrlTree(t,e,n){const r=sI(t);return new au(r,e,n)}expandSegmentGroup(t,e,n,r){return 0===n.segments.length&&n.hasChildren()?this.expandChildren(t,e,n).pipe(et(s=>new Tn([],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 Li(r).pipe(ru(s=>{const o=n.children[s],a=A3(e,s);return this.expandSegmentGroup(t,a,o,s).pipe(et(l=>({segment:l,outlet:s})))}),tI((s,o)=>(s[o.outlet]=o.segment,s),{}),WB())}expandSegment(t,e,n,r,s,o){return Li(n).pipe(ru(a=>this.expandSegmentAgainstRoute(t,e,n,a,r,s,o).pipe(Wc(c=>{if(c instanceof SM)return ht(null);throw c}))),iu(a=>!!a),Wc((a,l)=>{if(bI(a))return k3(e,r,s)?ht(new Tn([],{})):Vy(e);throw a}))}expandSegmentAgainstRoute(t,e,n,r,s,o,a){return R3(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):Vy(e):Vy(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("/")?O3(s):this.lineralizeSegments(n,s).pipe(ir(o=>{const a=new Tn(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:d}=wI(e,r,s);if(!a)return Vy(e);const h=this.applyRedirectCommands(l,r.redirectTo,d);return r.redirectTo.startsWith("/")?O3(h):this.lineralizeSegments(r,h).pipe(ir(p=>this.expandSegment(t,e,n,p.concat(c),o,!1)))}matchSegmentAgainstRoute(t,e,n,r,s){return"**"===n.path?(t=E3(n,t),n.loadChildren?(n._loadedRoutes?ht({routes:n._loadedRoutes,injector:n._loadedInjector}):this.configLoader.loadChildren(t,n)).pipe(et(a=>(n._loadedRoutes=a.routes,n._loadedInjector=a.injector,new Tn(r,{})))):ht(new Tn(r,{}))):I3(e,n,r,t).pipe(Rs(({matched:o,consumedSegments:a,remainingSegments:l})=>o?this.getChildConfig(t=n._injector??t,n,r).pipe(ir(d=>{const h=d.injector??t,p=d.routes,{segmentGroup:m,slicedSegments:g}=wM(e,a,l,p),b=new Tn(m.segments,m.children);if(0===g.length&&b.hasChildren())return this.expandChildren(h,p,b).pipe(et(x=>new Tn(a,x)));if(0===p.length&&0===g.length)return ht(new Tn(a,{}));const v=Ta(n)===s;return this.expandSegment(h,b,p,g,v?_n:s,!0).pipe(et(M=>new Tn(a.concat(M.segments),M.children)))})):Vy(e)))}getChildConfig(t,e,n){return e.children?ht({routes:e.children,injector:t}):e.loadChildren?void 0!==e._loadedRoutes?ht({routes:e._loadedRoutes,injector:e._loadedInjector}):function bX(i,t,e,n){const r=t.canLoad;return void 0===r||0===r.length?ht(!0):ht(r.map(o=>{const a=xm(o,i);return ou(function oX(i){return i&&Uy(i.canLoad)}(a)?a.canLoad(t,e):i.runInContext(()=>a(t,e)))})).pipe(wm(),T3())}(t,e,n).pipe(ir(r=>r?this.configLoader.loadChildren(t,e).pipe(Ui(s=>{e._loadedRoutes=s.routes,e._loadedInjector=s.injector})):function AX(i){return pm(w3(CM,3))}())):ht({routes:[],injector:t})}lineralizeSegments(t,e){let n=[],r=e.root;for(;;){if(n=n.concat(r.segments),0===r.numberOfChildren)return ht(n);if(r.numberOfChildren>1||!r.children[_n])return t.redirectTo,pm(new pe(4e3,CM));r=r.children[_n]}}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 au(s,this.createQueryParams(e.queryParams,this.urlTree.queryParams),e.fragment)}createQueryParams(t,e){const n={};return os(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 os(e.children,(a,l)=>{o[l]=this.createSegmentGroup(t,a,n,r)}),new Tn(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 pe(4001,CM);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 RX{}class OX{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=wM(this.urlTree.root,[],[],this.config.filter(e=>void 0===e.redirectTo)).segmentGroup;return this.processSegmentGroup(this.injector,this.config,t,_n).pipe(et(e=>{if(null===e)return null;const n=new vM([],Object.freeze({}),Object.freeze({...this.urlTree.queryParams}),this.urlTree.fragment,{},_n,this.rootComponentType,null,this.urlTree.root,-1,{}),r=new jc(n,e),s=new y3(this.url,r);return this.inheritParamsAndData(s._root),s}))}inheritParamsAndData(t){const e=t.value,n=v3(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 Li(Object.keys(n.children)).pipe(ru(r=>{const s=n.children[r],o=A3(e,r);return this.processSegmentGroup(t,o,s,r)}),tI((r,s)=>r&&s?(r.push(...s),r):null),jB(r=>null!==r),lM(null),WB(),et(r=>{if(null===r)return null;const s=L3(r);return function FX(i){i.sort((t,e)=>t.value.outlet===_n?-1:e.value.outlet===_n?1:t.value.outlet.localeCompare(e.value.outlet))}(s),s}))}processSegment(t,e,n,r,s){return Li(e).pipe(ru(o=>this.processSegmentAgainstRoute(o._injector??t,o,n,r,s)),iu(o=>!!o),Wc(o=>{if(bI(o))return k3(n,r,s)?ht([]):ht(null);throw o}))}processSegmentAgainstRoute(t,e,n,r,s){if(e.redirectTo||!R3(e,n,r,s))return ht(null);let o;if("**"===e.path){const a=r.length>0?KB(r).parameters:{},l=B3(n)+r.length;o=ht({snapshot:new vM(r,a,Object.freeze({...this.urlTree.queryParams}),this.urlTree.fragment,U3(e),Ta(e),e.component??e._loadedComponent??null,e,N3(n),l,V3(e)),consumedSegments:[],remainingSegments:[]})}else o=I3(n,e,r,t).pipe(et(({matched:a,consumedSegments:l,remainingSegments:c,parameters:d})=>{if(!a)return null;const h=B3(n)+l.length;return{snapshot:new vM(l,d,Object.freeze({...this.urlTree.queryParams}),this.urlTree.fragment,U3(e),Ta(e),e.component??e._loadedComponent??null,e,N3(n),h,V3(e)),consumedSegments:l,remainingSegments:c}}));return o.pipe(Rs(a=>{if(null===a)return ht(null);const{snapshot:l,consumedSegments:c,remainingSegments:d}=a;t=e._injector??t;const h=e._loadedInjector??t,p=function LX(i){return i.children?i.children:i.loadChildren?i._loadedRoutes:[]}(e),{segmentGroup:m,slicedSegments:g}=wM(n,c,d,p.filter(v=>void 0===v.redirectTo));if(0===g.length&&m.hasChildren())return this.processChildren(h,p,m).pipe(et(v=>null===v?null:[new jc(l,v)]));if(0===p.length&&0===g.length)return ht([new jc(l,[])]);const b=Ta(e)===s;return this.processSegment(h,p,m,g,b?_n:s).pipe(et(v=>null===v?null:[new jc(l,v)]))}))}}function NX(i){const t=i.value.routeConfig;return t&&""===t.path&&void 0===t.redirectTo}function L3(i){const t=[],e=new Set;for(const n of i){if(!NX(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=L3(n.children);t.push(new jc(n.value,r))}return t.filter(n=>!e.has(n))}function N3(i){let t=i;for(;t._sourceSegment;)t=t._sourceSegment;return t}function B3(i){let t=i,e=t._segmentIndexShift??0;for(;t._sourceSegment;)t=t._sourceSegment,e+=t._segmentIndexShift??0;return e-1}function U3(i){return i.data||{}}function V3(i){return i.resolve||{}}function z3(i){return"string"==typeof i.title||null===i.title}function MI(i){return Rs(t=>{const e=i(t);return e?Li(e).pipe(et(()=>t)):ht(t)})}const Mm=new me("ROUTES");let CI=(()=>{class i{constructor(){this.componentLoaders=new WeakMap,this.childrenLoaders=new WeakMap,this.compiler=Ft(mN)}loadComponent(e){if(this.componentLoaders.get(e))return this.componentLoaders.get(e);if(e._loadedComponent)return ht(e._loadedComponent);this.onLoadStartListener&&this.onLoadStartListener(e);const n=ou(e.loadComponent()).pipe(et(G3),Ui(s=>{this.onLoadEndListener&&this.onLoadEndListener(e),e._loadedComponent=s}),su(()=>{this.componentLoaders.delete(e)})),r=new GB(n,()=>new Re).pipe(eI());return this.componentLoaders.set(e,r),r}loadChildren(e,n){if(this.childrenLoaders.get(n))return this.childrenLoaders.get(n);if(n._loadedRoutes)return ht({routes:n._loadedRoutes,injector:n._loadedInjector});this.onLoadStartListener&&this.onLoadStartListener(n);const s=this.loadModuleFactoryOrRoutes(n.loadChildren).pipe(et(a=>{this.onLoadEndListener&&this.onLoadEndListener(n);let l,c,d=!1;Array.isArray(a)?c=a:(l=a.create(e).injector,c=XB(l.get(Mm,[],Ot.Self|Ot.Optional)));return{routes:c.map(yI),injector:l}}),su(()=>{this.childrenLoaders.delete(n)})),o=new GB(s,()=>new Re).pipe(eI());return this.childrenLoaders.set(n,o),o}loadModuleFactoryOrRoutes(e){return ou(e()).pipe(et(G3),ir(n=>n instanceof D2||Array.isArray(n)?ht(n):Li(this.compiler.compileModuleAsync(n))))}}return i.\u0275fac=function(e){return new(e||i)},i.\u0275prov=ke({token:i,factory:i.\u0275fac,providedIn:"root"}),i})();function G3(i){return function WX(i){return i&&"object"==typeof i&&"default"in i}(i)?i.default:i}let AM=(()=>{class i{get hasRequestedNavigation(){return 0!==this.navigationId}constructor(){this.currentNavigation=null,this.lastSuccessfulNavigation=null,this.events=new Re,this.configLoader=Ft(CI),this.environmentInjector=Ft(no),this.urlSerializer=Ft(Ty),this.rootContexts=Ft(Fy),this.navigationId=0,this.afterPreactivation=()=>ht(void 0),this.rootComponentType=null,this.configLoader.onLoadEndListener=r=>this.events.next(new kq(r)),this.configLoader.onLoadStartListener=r=>this.events.next(new Rq(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 gt({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:Py,restoredState:null,currentSnapshot:e.routerState.snapshot,targetSnapshot:null,currentRouterState:e.routerState,targetRouterState:null,guards:{canActivateChecks:[],canDeactivateChecks:[]},guardsResult:null}),this.transitions.pipe(gn(n=>0!==n.id),et(n=>({...n,extractedUrl:e.urlHandlingStrategy.extract(n.rawUrl)})),Rs(n=>{let r=!1,s=!1;return ht(n).pipe(Ui(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}}),Rs(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 d="";return this.events.next(new _M(o.id,e.serializeUrl(n.rawUrl),d,0)),e.rawUrlTree=o.rawUrl,o.resolve(null),mo}if(e.urlHandlingStrategy.shouldProcessUrl(o.rawUrl))return $3(o.source)&&(e.browserUrlTree=o.extractedUrl),ht(o).pipe(Rs(d=>{const h=this.transitions?.getValue();return this.events.next(new cI(d.id,this.urlSerializer.serialize(d.extractedUrl),d.source,d.restoredState)),h!==this.transitions?.getValue()?mo:Promise.resolve(d)}),function IX(i,t,e,n){return Rs(r=>function DX(i,t,e,n,r){return new TX(i,t,e,n,r).apply()}(i,t,e,r.extractedUrl,n).pipe(et(s=>({...r,urlAfterRedirects:s}))))}(this.environmentInjector,this.configLoader,this.urlSerializer,e.config),Ui(d=>{this.currentNavigation={...this.currentNavigation,finalUrl:d.urlAfterRedirects},n.urlAfterRedirects=d.urlAfterRedirects}),function UX(i,t,e,n,r){return ir(s=>function PX(i,t,e,n,r,s,o="emptyOnly"){return new OX(i,t,e,n,r,o,s).recognize().pipe(Rs(a=>null===a?function kX(i){return new In(t=>t.error(i))}(new RX):ht(a)))}(i,t,e,s.urlAfterRedirects,n.serialize(s.urlAfterRedirects),n,r).pipe(et(o=>({...s,targetSnapshot:o}))))}(this.environmentInjector,this.rootComponentType,e.config,this.urlSerializer,e.paramsInheritanceStrategy),Ui(d=>{if(n.targetSnapshot=d.targetSnapshot,"eager"===e.urlUpdateStrategy){if(!d.extras.skipLocationChange){const p=e.urlHandlingStrategy.merge(d.urlAfterRedirects,d.rawUrl);e.setBrowserUrl(p,d)}e.browserUrlTree=d.urlAfterRedirects}const h=new Eq(d.id,this.urlSerializer.serialize(d.extractedUrl),this.urlSerializer.serialize(d.urlAfterRedirects),d.targetSnapshot);this.events.next(h)}));if(l&&e.urlHandlingStrategy.shouldProcessUrl(e.rawUrlTree)){const{id:d,extractedUrl:h,source:p,restoredState:m,extras:g}=o,b=new cI(d,this.urlSerializer.serialize(h),p,m);this.events.next(b);const v=_3(h,this.rootComponentType).snapshot;return ht(n={...o,targetSnapshot:v,urlAfterRedirects:h,extras:{...g,skipLocationChange:!1,replaceUrl:!1}})}{const d="";return this.events.next(new _M(o.id,e.serializeUrl(n.extractedUrl),d,1)),e.rawUrlTree=o.rawUrl,o.resolve(null),mo}}),Ui(o=>{const a=new Aq(o.id,this.urlSerializer.serialize(o.extractedUrl),this.urlSerializer.serialize(o.urlAfterRedirects),o.targetSnapshot);this.events.next(a)}),et(o=>n={...o,guards:tX(o.targetSnapshot,o.currentSnapshot,this.rootContexts)}),function hX(i,t){return ir(e=>{const{targetSnapshot:n,currentSnapshot:r,guards:{canActivateChecks:s,canDeactivateChecks:o}}=e;return 0===o.length&&0===s.length?ht({...e,guardsResult:!0}):function fX(i,t,e,n){return Li(i).pipe(ir(r=>function yX(i,t,e,n,r){const s=t&&t.routeConfig?t.routeConfig.canDeactivate:null;return s&&0!==s.length?ht(s.map(a=>{const l=Ly(t)??r,c=xm(a,l);return ou(function cX(i){return i&&Uy(i.canDeactivate)}(c)?c.canDeactivate(i,t,e,n):l.runInContext(()=>c(i,t,e,n))).pipe(iu())})).pipe(wm()):ht(!0)}(r.component,r.route,e,t,n)),iu(r=>!0!==r,!0))}(o,n,r,i).pipe(ir(a=>a&&function sX(i){return"boolean"==typeof i}(a)?function pX(i,t,e,n){return Li(t).pipe(ru(r=>Sy(function gX(i,t){return null!==i&&t&&t(new Pq(i)),ht(!0)}(r.route.parent,n),function mX(i,t){return null!==i&&t&&t(new Fq(i)),ht(!0)}(r.route,n),function vX(i,t,e){const n=t[t.length-1],s=t.slice(0,t.length-1).reverse().map(o=>function nX(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=>Ey(()=>ht(o.guards.map(l=>{const c=Ly(o.node)??e,d=xm(l,c);return ou(function lX(i){return i&&Uy(i.canActivateChild)}(d)?d.canActivateChild(n,i):c.runInContext(()=>d(n,i))).pipe(iu())})).pipe(wm())));return ht(s).pipe(wm())}(i,r.path,e),function _X(i,t,e){const n=t.routeConfig?t.routeConfig.canActivate:null;if(!n||0===n.length)return ht(!0);const r=n.map(s=>Ey(()=>{const o=Ly(t)??e,a=xm(s,o);return ou(function aX(i){return i&&Uy(i.canActivate)}(a)?a.canActivate(t,i):o.runInContext(()=>a(t,i))).pipe(iu())}));return ht(r).pipe(wm())}(i,r.route,e))),iu(r=>!0!==r,!0))}(n,s,i,t):ht(a)),et(a=>({...e,guardsResult:a})))})}(this.environmentInjector,o=>this.events.next(o)),Ui(o=>{if(n.guardsResult=o.guardsResult,kh(o.guardsResult))throw x3(0,o.guardsResult);const a=new Dq(o.id,this.urlSerializer.serialize(o.extractedUrl),this.urlSerializer.serialize(o.urlAfterRedirects),o.targetSnapshot,!!o.guardsResult);this.events.next(a)}),gn(o=>!!o.guardsResult||(e.restoreHistory(o),this.cancelNavigationTransition(o,"",3),!1)),MI(o=>{if(o.guards.canActivateChecks.length)return ht(o).pipe(Ui(a=>{const l=new Tq(a.id,this.urlSerializer.serialize(a.extractedUrl),this.urlSerializer.serialize(a.urlAfterRedirects),a.targetSnapshot);this.events.next(l)}),Rs(a=>{let l=!1;return ht(a).pipe(function VX(i,t){return ir(e=>{const{targetSnapshot:n,guards:{canActivateChecks:r}}=e;if(!r.length)return ht(e);let s=0;return Li(r).pipe(ru(o=>function zX(i,t,e,n){const r=i.routeConfig,s=i._resolve;return void 0!==r?.title&&!z3(r)&&(s[Ay]=r.title),function HX(i,t,e,n){const r=function GX(i){return[...Object.keys(i),...Object.getOwnPropertySymbols(i)]}(i);if(0===r.length)return ht({});const s={};return Li(r).pipe(ir(o=>function $X(i,t,e,n){const r=Ly(t)??n,s=xm(i,r);return ou(s.resolve?s.resolve(t,e):r.runInContext(()=>s(t,e)))}(i[o],t,e,n).pipe(iu(),Ui(a=>{s[o]=a}))),nI(1),YB(s),Wc(o=>bI(o)?mo:pm(o)))}(s,i,t,n).pipe(et(o=>(i._resolvedData=o,i.data=v3(i,e).resolve,r&&z3(r)&&(i.data[Ay]=r.title),null)))}(o.route,n,i,t)),Ui(()=>s++),nI(1),ir(o=>s===r.length?ht(e):mo))})}(e.paramsInheritanceStrategy,this.environmentInjector),Ui({next:()=>l=!0,complete:()=>{l||(e.restoreHistory(a),this.cancelNavigationTransition(a,"",2))}}))}),Ui(a=>{const l=new Iq(a.id,this.urlSerializer.serialize(a.extractedUrl),this.urlSerializer.serialize(a.urlAfterRedirects),a.targetSnapshot);this.events.next(l)}))}),MI(o=>{const a=l=>{const c=[];l.routeConfig?.loadComponent&&!l.routeConfig._loadedComponent&&c.push(this.configLoader.loadComponent(l.routeConfig).pipe(Ui(d=>{l.component=d}),et(()=>{})));for(const d of l.children)c.push(...a(d));return c};return nu(a(o.targetSnapshot.root)).pipe(lM(),Pi(1))}),MI(()=>this.afterPreactivation()),et(o=>{const a=function $q(i,t,e){const n=Oy(i,t._root,e?e._root:void 0);return new g3(n,t)}(e.routeReuseStrategy,o.targetSnapshot,o.currentRouterState);return n={...o,targetRouterState:a}}),Ui(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)=>et(n=>(new eX(t,n.targetRouterState,n.currentRouterState,e).activate(i),n)))(this.rootContexts,e.routeReuseStrategy,o=>this.events.next(o)),Pi(1),Ui({next:o=>{r=!0,this.lastSuccessfulNavigation=this.currentNavigation,e.navigated=!0,this.events.next(new Ph(o.id,this.urlSerializer.serialize(o.extractedUrl),this.urlSerializer.serialize(e.currentUrlTree))),e.titleStrategy?.updateTitle(o.targetRouterState.snapshot),o.resolve(!0)},complete:()=>{r=!0}}),su(()=>{r||s||this.cancelNavigationTransition(n,"",1),this.currentNavigation?.id===n.id&&(this.currentNavigation=null)}),Wc(o=>{if(s=!0,C3(o)){M3(o)||(e.navigated=!0,e.restoreHistory(n,!0));const a=new gM(n.id,this.urlSerializer.serialize(n.extractedUrl),o.message,o.cancellationCode);if(this.events.next(a),M3(o)){const l=e.urlHandlingStrategy.merge(o.url,e.rawUrlTree),c={skipLocationChange:n.extras.skipLocationChange,replaceUrl:"eager"===e.urlUpdateStrategy||$3(n.source)};e.scheduleNavigation(l,Py,null,c,{resolve:n.resolve,reject:n.reject,promise:n.promise})}else n.resolve(!1)}else{e.restoreHistory(n,!0);const a=new dI(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 mo}))}))}cancelNavigationTransition(e,n,r){const s=new gM(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=ke({token:i,factory:i.\u0275fac,providedIn:"root"}),i})();function $3(i){return i!==Py}let W3=(()=>{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===_n);return n}getResolvedTitleForRoute(e){return e.data[Ay]}}return i.\u0275fac=function(e){return new(e||i)},i.\u0275prov=ke({token:i,factory:function(){return Ft(jX)},providedIn:"root"}),i})(),jX=(()=>{class i extends W3{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)(ee(LB))},i.\u0275prov=ke({token:i,factory:i.\u0275fac,providedIn:"root"}),i})(),YX=(()=>{class i{}return i.\u0275fac=function(e){return new(e||i)},i.\u0275prov=ke({token:i,factory:function(){return Ft(XX)},providedIn:"root"}),i})();class qX{shouldDetach(t){return!1}store(t,e){}shouldAttach(t){return!1}retrieve(t){return null}shouldReuseRoute(t,e){return t.routeConfig===e.routeConfig}}let XX=(()=>{class i extends qX{}return i.\u0275fac=function(){let t;return function(n){return(t||(t=ri(i)))(n||i)}}(),i.\u0275prov=ke({token:i,factory:i.\u0275fac,providedIn:"root"}),i})();const DM=new me("",{providedIn:"root",factory:()=>({})});let ZX=(()=>{class i{}return i.\u0275fac=function(e){return new(e||i)},i.\u0275prov=ke({token:i,factory:function(){return Ft(QX)},providedIn:"root"}),i})(),QX=(()=>{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=ke({token:i,factory:i.\u0275fac,providedIn:"root"}),i})();function JX(i){throw i}function eK(i,t,e){return t.parse("/")}const tK={paths:"exact",fragment:"ignored",matrixParams:"ignored",queryParams:"exact"},nK={paths:"subset",fragment:"ignored",matrixParams:"ignored",queryParams:"subset"};let qo=(()=>{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=Ft(L6),this.isNgZoneEnabled=!1,this.options=Ft(DM,{optional:!0})||{},this.errorHandler=this.options.errorHandler||JX,this.malformedUriErrorHandler=this.options.malformedUriErrorHandler||eK,this.navigated=!1,this.lastSuccessfulId=-1,this.urlHandlingStrategy=Ft(ZX),this.routeReuseStrategy=Ft(YX),this.urlCreationStrategy=Ft(zq),this.titleStrategy=Ft(W3),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=XB(Ft(Mm,{optional:!0})??[]),this.navigationTransitions=Ft(AM),this.urlSerializer=Ft(Ty),this.location=Ft(_y),this.isNgZoneEnabled=Ft(ft)instanceof ft&&ft.isInAngularZone(),this.resetConfig(this.config),this.currentUrlTree=new au,this.rawUrlTree=this.currentUrlTree,this.browserUrlTree=this.currentUrlTree,this.routerState=_3(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),Py,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(yI),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 d=null;switch(a){case"merge":d={...this.currentUrlTree.queryParams,...s};break;case"preserve":d=this.currentUrlTree.queryParams;break;default:d=s||null}return null!==d&&(d=this.removeEmptyProps(d)),this.urlCreationStrategy.createUrlTree(r,this.routerState,this.currentUrlTree,e,d,c??null)}navigateByUrl(e,n={skipLocationChange:!1}){const r=kh(e)?e:this.parseUrl(e),s=this.urlHandlingStrategy.merge(r,this.rawUrlTree);return this.scheduleNavigation(s,Py,null,n)}navigate(e,n={skipLocationChange:!1}){return function iK(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,d;return o?(a=o.resolve,l=o.reject,c=o.promise):c=new Promise((h,p)=>{a=h,l=p}),d="computed"===this.canceledNavigationResolution?r&&r.\u0275routerPageId?r.\u0275routerPageId:(this.browserPageId??0)+1:0,this.navigationTransitions.handleNavigationRequest({targetPageId:d,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=ke({token:i,factory:i.\u0275fac,providedIn:"root"}),i})();class j3{}let oK=(()=>{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(gn(e=>e instanceof Ph),ru(()=>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=Fw(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 Li(r).pipe(yd())}preloadConfig(e,n){return this.preloadingStrategy.preload(n,()=>{let r;r=n.loadChildren&&void 0===n.canLoad?this.loader.loadChildren(e,n):ht(null);const s=r.pipe(ir(o=>null===o?ht(void 0):(n._loadedRoutes=o.routes,n._loadedInjector=o.injector,this.processRoutes(o.injector??e,o.routes))));return n.loadComponent&&!n._loadedComponent?Li([s,this.loader.loadComponent(n)]).pipe(yd()):s})}}return i.\u0275fac=function(e){return new(e||i)(ee(qo),ee(mN),ee(no),ee(j3),ee(CI))},i.\u0275prov=ke({token:i,factory:i.\u0275fac,providedIn:"root"}),i})();const AI=new me("");let Y3=(()=>{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 cI?(this.store[this.lastId]=this.viewportScroller.getScrollPosition(),this.lastSource=e.navigationTrigger,this.restoredId=e.restoredState?e.restoredState.navigationId:0):e instanceof Ph&&(this.lastId=e.id,this.scheduleScrollEvent(e,this.urlSerializer.parse(e.urlAfterRedirects).fragment))})}consumeScrollEvents(){return this.transitions.events.subscribe(e=>{e instanceof p3&&(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 p3(e,"popstate"===this.lastSource?this.store[this.restoredId]:null,n))})},0)})}ngOnDestroy(){this.routerEventsSubscription?.unsubscribe(),this.scrollEventsSubscription?.unsubscribe()}}return i.\u0275fac=function(e){wo()},i.\u0275prov=ke({token:i,factory:i.\u0275fac}),i})();var Xo=(()=>((Xo=Xo||{})[Xo.COMPLETE=0]="COMPLETE",Xo[Xo.FAILED=1]="FAILED",Xo[Xo.REDIRECTING=2]="REDIRECTING",Xo))();const Cm=!1;function lu(i,t){return{\u0275kind:i,\u0275providers:t}}const DI=new me("",{providedIn:"root",factory:()=>!1});function X3(){const i=Ft(Gi);return t=>{const e=i.get(dm);if(t!==e.components[0])return;const n=i.get(qo),r=i.get(K3);1===i.get(TI)&&n.initialNavigation(),i.get(Z3,null,Ot.Optional)?.setUpPreloading(),i.get(AI,null,Ot.Optional)?.init(),n.resetRootComponentType(e.componentTypes[0]),r.closed||(r.next(),r.complete(),r.unsubscribe())}}const K3=new me(Cm?"bootstrap done indicator":"",{factory:()=>new Re}),TI=new me(Cm?"initial navigation":"",{providedIn:"root",factory:()=>1});function uK(){let i=[];return i=Cm?[{provide:Np,multi:!0,useFactory:()=>{const t=Ft(qo);return()=>t.events.subscribe(e=>{console.group?.(`Router Event: ${e.constructor.name}`),console.log(function Nq(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?.()})}}]:[],lu(1,i)}const Z3=new me(Cm?"router preloader":"");function hK(i){return lu(0,[{provide:Z3,useExisting:oK},{provide:j3,useExisting:i}])}const zy=!1,Q3=new me(zy?"router duplicate forRoot guard":"ROUTER_FORROOT_GUARD"),fK=[_y,{provide:Ty,useClass:iI},qo,Fy,{provide:bm,useFactory:function q3(i){return i.routerState.root},deps:[qo]},CI,zy?{provide:DI,useValue:!0}:[]];function pK(){return new MN("Router",qo)}let J3=(()=>{class i{constructor(e){}static forRoot(e,n){return{ngModule:i,providers:[fK,zy&&n?.enableTracing?uK().\u0275providers:[],{provide:Mm,multi:!0,useValue:e},{provide:Q3,useFactory:vK,deps:[[qo,new Ss,new wa]]},{provide:DM,useValue:n||{}},n?.useHash?{provide:Ih,useClass:C9}:{provide:Ih,useClass:jN},{provide:AI,useFactory:()=>{const i=Ft(UY),t=Ft(ft),e=Ft(DM),n=Ft(AM),r=Ft(Ty);return e.scrollOffset&&i.setOffset(e.scrollOffset),new Y3(r,n,i,t,e)}},n?.preloadingStrategy?hK(n.preloadingStrategy).\u0275providers:[],{provide:MN,multi:!0,useFactory:pK},n?.initialNavigation?yK(n):[],[{provide:eU,useFactory:X3},{provide:wN,multi:!0,useExisting:eU}]]}}static forChild(e){return{ngModule:i,providers:[{provide:Mm,multi:!0,useValue:e}]}}}return i.\u0275fac=function(e){return new(e||i)(ee(Q3,8))},i.\u0275mod=nn({type:i}),i.\u0275inj=Kt({imports:[_I]}),i})();function vK(i){if(zy&&i)throw new pe(4007,"The Router was provided more than once. This can happen if 'forRoot' is used outside of the root injector. Lazy loaded modules should use RouterModule.forChild() instead.");return"guarded"}function yK(i){return["disabled"===i.initialNavigation?lu(3,[{provide:Uw,multi:!0,useFactory:()=>{const t=Ft(qo);return()=>{t.setUpLocationChangeListener()}}},{provide:TI,useValue:2}]).\u0275providers:[],"enabledBlocking"===i.initialNavigation?lu(2,[{provide:TI,useValue:0},{provide:Uw,multi:!0,deps:[Gi],useFactory:t=>{const e=t.get(w9,Promise.resolve());return()=>e.then(()=>new Promise(n=>{const r=t.get(qo),s=t.get(K3);(function aK(i,t){i.events.pipe(gn(e=>e instanceof Ph||e instanceof gM||e instanceof dI||e instanceof _M),et(e=>e instanceof Ph||e instanceof _M?Xo.COMPLETE:e instanceof gM&&(0===e.code||1===e.code)?Xo.REDIRECTING:Xo.FAILED),gn(e=>e!==Xo.REDIRECTING),Pi(1)).subscribe(()=>{t()})})(r,()=>{n(!0)}),t.get(AM).afterPreactivation=()=>(n(!0),s.closed?ht(void 0):s),r.initialNavigation()}))}}]).\u0275providers:[]]}const eU=new me(zy?"Router Initializer":""),xK=[];let wK=(()=>{class i{}return i.\u0275fac=function(e){return new(e||i)},i.\u0275mod=nn({type:i}),i.\u0275inj=Kt({imports:[J3.forRoot(xK),J3]}),i})();function tU(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 tt(i){return function(){var t=this,e=arguments;return new Promise(function(n,r){var s=i.apply(t,e);function o(l){tU(s,n,r,o,a,"next",l)}function a(l){tU(s,n,r,o,a,"throw",l)}o(void 0)})}}function Jt(i){return null!=i&&"false"!=`${i}`}function ks(i,t=0){return function MK(i){return!isNaN(parseFloat(i))&&!isNaN(Number(i))}(i)?Number(i):t}function TM(i){return Array.isArray(i)?i:[i]}function gr(i){return null==i?"":"string"==typeof i?i:`${i}px`}function Yc(i){return i instanceof mt?i.nativeElement:i}const CK=["addListener","removeListener"],SK=["addEventListener","removeEventListener"],EK=["on","off"];function Ia(i,t,e,n){if(cn(e)&&(n=e,e=void 0),n)return Ia(i,t,e).pipe(JT(n));const[r,s]=function TK(i){return cn(i.addEventListener)&&cn(i.removeEventListener)}(i)?SK.map(o=>a=>i[o](t,a,e)):function AK(i){return cn(i.addListener)&&cn(i.removeListener)}(i)?CK.map(nU(i,t)):function DK(i){return cn(i.on)&&cn(i.off)}(i)?EK.map(nU(i,t)):[];if(!r&&i_(i))return ir(o=>Ia(o,t,e))(wr(i));if(!r)throw new TypeError("Invalid event target");return new In(o=>{const a=(...l)=>o.next(1s(a)})}function nU(i,t){return e=>n=>i[e](t,n)}class IK extends Zt{constructor(t,e){super()}schedule(t,e=0){return this}}const IM={setInterval(i,t,...e){const{delegate:n}=IM;return n?.setInterval?n.setInterval(i,t,...e):setInterval(i,t,...e)},clearInterval(i){const{delegate:t}=IM;return(t?.clearInterval||clearInterval)(i)},delegate:void 0};class II extends IK{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 IM.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&&IM.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,Kr(n,this),null!=t&&(this.id=this.recycleAsyncId(e,t,null)),this.delay=null,super.unsubscribe()}}}const Hy={schedule(i){let t=requestAnimationFrame,e=cancelAnimationFrame;const{delegate:n}=Hy;n&&(t=n.requestAnimationFrame,e=n.cancelAnimationFrame);const r=t(s=>{e=void 0,i(s)});return new Zt(()=>e?.(r))},requestAnimationFrame(...i){const{delegate:t}=Hy;return(t?.requestAnimationFrame||requestAnimationFrame)(...i)},cancelAnimationFrame(...i){const{delegate:t}=Hy;return(t?.cancelAnimationFrame||cancelAnimationFrame)(...i)},delegate:void 0},iU={now:()=>(iU.delegate||Date).now(),delegate:void 0};class Gy{constructor(t,e=Gy.now){this.schedulerActionCtor=t,this.now=e}schedule(t,e=0,n){return new this.schedulerActionCtor(this,t).schedule(n,e)}}Gy.now=iU.now;class RI extends Gy{constructor(t,e=Gy.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 PK=new class kK extends RI{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 RK extends II{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=Hy.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&&(Hy.cancelAnimationFrame(e),t._scheduled=void 0)}});let kI,OK=1;const RM={};function rU(i){return i in RM&&(delete RM[i],!0)}const FK={setImmediate(i){const t=OK++;return RM[t]=!0,kI||(kI=Promise.resolve()),kI.then(()=>rU(t)&&i()),t},clearImmediate(i){rU(i)}},{setImmediate:LK,clearImmediate:NK}=FK,kM={setImmediate(...i){const{delegate:t}=kM;return(t?.setImmediate||LK)(...i)},clearImmediate(i){const{delegate:t}=kM;return(t?.clearImmediate||NK)(i)},delegate:void 0},PI=new class UK extends RI{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 BK extends II{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=kM.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&&(kM.clearImmediate(e),t._scheduled===e&&(t._scheduled=void 0))}}),$y=new RI(II),VK=$y;function OI(i=0,t,e=VK){let n=-1;return null!=t&&(Gu(t)?e=t:n=t),new In(r=>{let s=function HK(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 PM(i,t=$y){return function zK(i){return ti((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(Yn(e,c=>{n=!0,r=c,s||wr(i(c)).subscribe(s=Yn(e,a,l))},()=>{o=!0,(!n||!s||s.closed)&&e.complete()}))})}(()=>OI(i,t))}function He(i){return ti((t,e)=>{wr(i).subscribe(Yn(e,()=>e.complete(),ms)),!e.closed&&t.subscribe(e)})}let FI;try{FI=typeof Intl<"u"&&Intl.v8BreakIterator}catch{FI=!1}let Sm,Vi=(()=>{class i{constructor(e){this._platformId=e,this.isBrowser=this._platformId?function BY(i){return i===hB}(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&&!FI)&&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)(ee(fT))},i.\u0275prov=ke({token:i,factory:i.\u0275fac,providedIn:"root"}),i})();const sU=["color","button","checkbox","date","datetime-local","email","file","hidden","image","month","number","password","radio","range","reset","search","submit","tel","text","time","url","week"];function oU(){if(Sm)return Sm;if("object"!=typeof document||!document)return Sm=new Set(sU),Sm;let i=document.createElement("input");return Sm=new Set(sU.filter(t=>(i.setAttribute("type",t),i.type===t))),Sm}let Wy,OM,Fh,LI;function Oh(i){return function GK(){if(null==Wy&&typeof window<"u")try{window.addEventListener("test",null,Object.defineProperty({},"passive",{get:()=>Wy=!0}))}finally{Wy=Wy||!1}return Wy}()?i:!!i.capture}function aU(){if(null==Fh){if("object"!=typeof document||!document||"function"!=typeof Element||!Element)return Fh=!1,Fh;if("scrollBehavior"in document.documentElement.style)Fh=!0;else{const i=Element.prototype.scrollTo;Fh=!!i&&!/\{\s*\[native code\]\s*\}/.test(i.toString())}}return Fh}function jy(){if("object"!=typeof document||!document)return 0;if(null==OM){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),OM=0,0===i.scrollLeft&&(i.scrollLeft=1,OM=0===i.scrollLeft?1:2),i.remove()}return OM}function FM(){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 cu(i){return i.composedPath?i.composedPath()[0]:i.target}function NI(){return typeof __karma__<"u"&&!!__karma__||typeof jasmine<"u"&&!!jasmine||typeof jest<"u"&&!!jest||typeof Mocha<"u"&&!!Mocha}const jK=new me("cdk-dir-doc",{providedIn:"root",factory:function YK(){return Ft(jt)}}),qK=/^(ar|ckb|dv|he|iw|fa|nqo|ps|sd|ug|ur|yi|.*[-_](Adlm|Arab|Hebr|Nkoo|Rohg|Thaa))(?!.*[-_](Latn|Cyrl)($|-|_))($|-|_)/i;let Ra=(()=>{class i{constructor(e){this.value="ltr",this.change=new We,e&&(this.value=function XK(i){const t=i?.toLowerCase()||"";return"auto"===t&&typeof navigator<"u"&&navigator?.language?qK.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)(ee(jK,8))},i.\u0275prov=ke({token:i,factory:i.\u0275fac,providedIn:"root"}),i})(),Yy=(()=>{class i{}return i.\u0275fac=function(e){return new(e||i)},i.\u0275mod=nn({type:i}),i.\u0275inj=Kt({}),i})();const KK=["contentWrapper"],ZK=["*"],QK=new me("VIRTUAL_SCROLL_STRATEGY");let qy=(()=>{class i{constructor(e,n,r){this._ngZone=e,this._platform=n,this._scrolled=new Re,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 In(n=>{this._globalSubscription||this._addGlobalListener();const r=e>0?this._scrolled.pipe(PM(e)).subscribe(n):this._scrolled.subscribe(n);return this._scrolledCount++,()=>{r.unsubscribe(),this._scrolledCount--,this._scrolledCount||this._removeGlobalListener()}}):ht()}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(gn(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=Yc(n),s=e.getElementRef().nativeElement;do{if(r==s)return!0}while(r=r.parentElement);return!1}_addGlobalListener(){this._globalSubscription=this._ngZone.runOutsideAngular(()=>Ia(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)(ee(ft),ee(Vi),ee(jt,8))},i.\u0275prov=ke({token:i,factory:i.\u0275fac,providedIn:"root"}),i})(),lU=(()=>{class i{constructor(e,n,r,s){this.elementRef=e,this.scrollDispatcher=n,this.ngZone=r,this.dir=s,this._destroyed=new Re,this._elementScrolled=new In(o=>this.ngZone.runOutsideAngular(()=>Ia(this.elementRef.nativeElement,"scroll").pipe(He(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!=jy()?(null!=e.left&&(e.right=n.scrollWidth-n.clientWidth-e.left),2==jy()?e.left=e.right:1==jy()&&(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;aU()?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==jy()?e==n?s.scrollWidth-s.clientWidth-s.scrollLeft:s.scrollLeft:o&&1==jy()?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)(E(mt),E(qy),E(ft),E(Ra,8))},i.\u0275dir=ve({type:i,selectors:[["","cdk-scrollable",""],["","cdkScrollable",""]],standalone:!0}),i})(),LM=(()=>{class i{constructor(e,n,r){this._platform=e,this._change=new Re,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(PM(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)(ee(Vi),ee(ft),ee(jt,8))},i.\u0275prov=ke({token:i,factory:i.\u0275fac,providedIn:"root"}),i})();const cU=new me("VIRTUAL_SCROLLABLE");let tZ=(()=>{class i extends lU{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)(E(mt),E(qy),E(ft),E(Ra,8))},i.\u0275dir=ve({type:i,features:[lt]}),i})();const iZ=typeof requestAnimationFrame<"u"?PK:PI;let rZ=(()=>{class i extends tZ{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=Ft(Vi),this._detachedSubject=new Re,this._renderedRangeSubject=new Re,this._orientation="vertical",this._appendOnly=!1,this.scrolledIndexChange=new In(d=>this._scrollStrategy.scrolledIndexChange.subscribe(h=>Promise.resolve().then(()=>this.ngZone.run(()=>d.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=Zt.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(Do(null),PM(0,iZ)).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(He(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 nZ(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)(E(mt),E(Zn),E(ft),E(QK,8),E(Ra,8),E(qy),E(LM),E(cU,8))},i.\u0275cmp=ot({type:i,selectors:[["cdk-virtual-scroll-viewport"]],viewQuery:function(e,n){if(1&e&&Wn(KK,7),2&e){let r;Et(r=At())&&(n._contentWrapper=r.first)}},hostAttrs:[1,"cdk-virtual-scroll-viewport"],hostVars:4,hostBindings:function(e,n){2&e&&un("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:[Dn([{provide:lU,useFactory:(t,e)=>t||e,deps:[[new Ss,new yo(cU)],i]}]),lt,Z1],ngContentSelectors:ZK,decls:4,vars:4,consts:[[1,"cdk-virtual-scroll-content-wrapper"],["contentWrapper",""],[1,"cdk-virtual-scroll-spacer"]],template:function(e,n){1&e&&(sr(),W(0,"div",0,1),Wt(2),j(),De(3,"div",2)),2&e&&(G(3),Yo("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})(),Xy=(()=>{class i{}return i.\u0275fac=function(e){return new(e||i)},i.\u0275mod=nn({type:i}),i.\u0275inj=Kt({}),i})(),dU=(()=>{class i{}return i.\u0275fac=function(e){return new(e||i)},i.\u0275mod=nn({type:i}),i.\u0275inj=Kt({imports:[Yy,Xy,rZ,Yy,Xy]}),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 Lh 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 sZ extends BI{constructor(t){super(),this.element=t instanceof mt?t.nativeElement:t}}class NM{constructor(){this._isDisposed=!1,this.attachDomPortal=null}hasAttached(){return!!this._attachedPortal}attach(t){return t instanceof Lh?(this._attachedPortal=t,this.attachComponentPortal(t)):t instanceof Em?(this._attachedPortal=t,this.attachTemplatePortal(t)):this.attachDomPortal&&t instanceof sZ?(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 oZ extends NM{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||Gi.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 NM{constructor(e,n,r){super(),this._componentFactoryResolver=e,this._viewContainerRef=n,this._isInitialized=!1,this.attached=new We,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)(E(Hl),E(Wr),E(jt))},i.\u0275dir=ve({type:i,selectors:[["","cdkPortalOutlet",""]],inputs:{portal:["cdkPortalOutlet","portal"]},outputs:{attached:"attached"},exportAs:["cdkPortalOutlet"],features:[lt]}),i})(),Nh=(()=>{class i{}return i.\u0275fac=function(e){return new(e||i)},i.\u0275mod=nn({type:i}),i.\u0275inj=Kt({}),i})();function Ko(i,...t){return t.length?t.some(e=>i[e]):i.altKey||i.shiftKey||i.ctrlKey||i.metaKey}const uU=aU();class bZ{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=gr(-this._previousScrollPosition.left),t.style.top=gr(-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"),uU&&(n.scrollBehavior=r.scrollBehavior="auto"),window.scroll(this._previousScrollPosition.left,this._previousScrollPosition.top),uU&&(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 xZ{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(gn(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 hU{enable(){}disable(){}attach(){}}function VI(i,t){return t.some(e=>i.bottome.bottom||i.righte.right)}function fU(i,t){return t.some(e=>i.tope.bottom||i.lefte.right)}class wZ{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();VI(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 MZ=(()=>{class i{constructor(e,n,r,s){this._scrollDispatcher=e,this._viewportRuler=n,this._ngZone=r,this.noop=()=>new hU,this.close=o=>new xZ(this._scrollDispatcher,this._ngZone,this._viewportRuler,o),this.block=()=>new bZ(this._viewportRuler,this._document),this.reposition=o=>new wZ(this._scrollDispatcher,this._viewportRuler,this._ngZone,o),this._document=s}}return i.\u0275fac=function(e){return new(e||i)(ee(qy),ee(LM),ee(ft),ee(jt))},i.\u0275prov=ke({token:i,factory:i.\u0275fac,providedIn:"root"}),i})();class km{constructor(t){if(this.scrollStrategy=new hU,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 CZ{constructor(t,e){this.connectionPair=t,this.scrollableViewProperties=e}}let pU=(()=>{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)(ee(jt))},i.\u0275prov=ke({token:i,factory:i.\u0275fac,providedIn:"root"}),i})(),SZ=(()=>{class i extends pU{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)(ee(jt),ee(ft,8))},i.\u0275prov=ke({token:i,factory:i.\u0275fac,providedIn:"root"}),i})(),EZ=(()=>{class i extends pU{constructor(e,n,r){super(e),this._platform=n,this._ngZone=r,this._cursorStyleIsSet=!1,this._pointerDownListener=s=>{this._pointerDownEventTarget=cu(s)},this._clickListener=s=>{const o=cu(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 d=l[c];if(d._outsidePointerEvents.observers.length<1||!d.hasAttached())continue;if(d.overlayElement.contains(o)||d.overlayElement.contains(a))break;const h=d._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)(ee(jt),ee(Vi),ee(ft,8))},i.\u0275prov=ke({token:i,factory:i.\u0275fac,providedIn:"root"}),i})(),VM=(()=>{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||NI()){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 Re,this._outsidePointerEvents=new Re,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(Pi(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=gr(this._config.width),t.height=gr(this._config.height),t.minWidth=gr(this._config.minWidth),t.minHeight=gr(this._config.minHeight),t.maxWidth=gr(this._config.maxWidth),t.maxHeight=gr(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=TM(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(He(Mr(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 mU="cdk-overlay-connected-position-bounding-box",AZ=/([A-Za-z%]+)$/;class DZ{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 Re,this._resizeSubscription=Zt.EMPTY,this._offsetX=0,this._offsetY=0,this._appliedPanelClasses=[],this.positionChanges=this._positionChanges,this.setOrigin(t)}attach(t){this._validatePositions(),t.hostElement.classList.add(mU),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),d=this._getOverlayFit(c,e,n,a);if(d.isCompletelyWithinViewport)return this._isPushed=!1,void this._applyPosition(a,l);this._canFitWithFlexibleDimensions(d,c,n)?s.push({position:a,origin:l,overlayRect:e,boundingBoxRect:this._calculateBoundingBoxRect(l,a)}):(!o||o.overlayFit.visibleAreal&&(l=d,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&&Bh(this._boundingBox.style,{top:"",left:"",right:"",bottom:"",height:"",width:"",alignItems:"",justifyContent:""}),this._pane&&this._resetOverlayElementStyles(),this._overlayRef&&this._overlayRef.hostElement.classList.remove(mU),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=_U(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=gU(this._overlayRef.getConfig().minHeight),a=gU(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=_U(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 d=0,h=0;return d=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,d=t.x-this._viewportMargin;else if("start"===e.overlayX&&!r||"end"===e.overlayX&&r)h=t.x,d=n.right-t.x;else{const m=Math.min(n.right-t.x+n.left,t.x),g=this._lastBoundingBoxSize.width;d=2*m,h=t.x-m,d>g&&!this._isInitialRender&&!this._growAfterOpen&&(h=t.x-g/2)}return{top:o,left:h,bottom:a,right:p,width:d,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=gr(n.height),r.top=gr(n.top),r.bottom=gr(n.bottom),r.width=gr(n.width),r.left=gr(n.left),r.right=gr(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=gr(s)),o&&(r.maxWidth=gr(o))}this._lastBoundingBoxSize=n,Bh(this._boundingBox.style,r)}_resetBoundingBoxStyles(){Bh(this._boundingBox.style,{top:"0",left:"0",right:"0",bottom:"0",height:"",width:"",alignItems:"",justifyContent:""})}_resetOverlayElementStyles(){Bh(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 d=this._viewportRuler.getViewportScrollPosition();Bh(n,this._getExactOverlayY(e,t,d)),Bh(n,this._getExactOverlayX(e,t,d))}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=gr(o.maxHeight):s&&(n.maxHeight="")),o.maxWidth&&(r?n.maxWidth=gr(o.maxWidth):s&&(n.maxWidth="")),Bh(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=gr(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=gr(s.x),r}_getScrollVisibility(){const t=this._getOriginRect(),e=this._pane.getBoundingClientRect(),n=this._scrollables.map(r=>r.getElementRef().nativeElement.getBoundingClientRect());return{isOriginClipped:fU(t,n),isOriginOutsideView:VI(t,n),isOverlayClipped:fU(e,n),isOverlayOutsideView:VI(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&&TM(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 mt)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 Bh(i,t){for(let e in t)t.hasOwnProperty(e)&&(i[e]=t[e]);return i}function gU(i){if("number"!=typeof i&&null!=i){const[t,e]=i.split(AZ);return e&&"px"!==e?null:parseFloat(t)}return i||null}function _U(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 vU="cdk-global-overlay-wrapper";class yU{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(vU),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),d=this._xPosition,h=this._xOffset,p="rtl"===this._overlayRef.getConfig().direction;let m="",g="",b="";l?b="flex-start":"center"===d?(b="center",p?g=h:m=h):p?"left"===d||"end"===d?(b="flex-end",m=h):("right"===d||"start"===d)&&(b="flex-start",g=h):"left"===d||"start"===d?(b="flex-start",m=h):("right"===d||"end"===d)&&(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(vU),n.justifyContent=n.alignItems=t.marginTop=t.marginBottom=t.marginLeft=t.marginRight=t.position="",this._overlayRef=null,this._isDisposed=!0}}let TZ=(()=>{class i{constructor(e,n,r,s){this._viewportRuler=e,this._document=n,this._platform=r,this._overlayContainer=s}global(){return new yU}flexibleConnectedTo(e){return new DZ(e,this._viewportRuler,this._document,this._platform,this._overlayContainer)}}return i.\u0275fac=function(e){return new(e||i)(ee(LM),ee(jt),ee(Vi),ee(VM))},i.\u0275prov=ke({token:i,factory:i.\u0275fac,providedIn:"root"}),i})(),IZ=0,as=(()=>{class i{constructor(e,n,r,s,o,a,l,c,d,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=d,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 Zy(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-"+IZ++,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(dm)),new oZ(e,this._componentFactoryResolver,this._appRef,this._injector,this._document)}}return i.\u0275fac=function(e){return new(e||i)(ee(MZ),ee(VM),ee(Hl),ee(TZ),ee(SZ),ee(Gi),ee(ft),ee(jt),ee(Ra),ee(_y),ee(EZ),ee(Rr,8))},i.\u0275prov=ke({token:i,factory:i.\u0275fac,providedIn:"root"}),i})();const RZ=[{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"}],bU=new me("cdk-connected-overlay-scroll-strategy");let zI=(()=>{class i{constructor(e){this.elementRef=e}}return i.\u0275fac=function(e){return new(e||i)(E(mt))},i.\u0275dir=ve({type:i,selectors:[["","cdk-overlay-origin",""],["","overlay-origin",""],["","cdkOverlayOrigin",""]],exportAs:["cdkOverlayOrigin"],standalone:!0}),i})(),xU=(()=>{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=Zt.EMPTY,this._attachSubscription=Zt.EMPTY,this._detachSubscription=Zt.EMPTY,this._positionSubscription=Zt.EMPTY,this.viewportMargin=0,this.open=!1,this.disableClose=!1,this.backdropClick=new We,this.positionChange=new We,this.attach=new We,this.detach=new We,this.overlayKeydown=new We,this.overlayOutsideClick=new We,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=RZ);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&&!Ko(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 zI?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(jB(()=>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)(E(as),E(Co),E(Wr),E(bU),E(Ra,8))},i.\u0275dir=ve({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:[bi]}),i})();const PZ={provide:bU,deps:[as],useFactory:function kZ(i){return()=>i.scrollStrategies.reposition()}};let Pm=(()=>{class i{}return i.\u0275fac=function(e){return new(e||i)},i.\u0275mod=nn({type:i}),i.\u0275inj=Kt({providers:[as,PZ],imports:[Yy,Nh,dU,dU]}),i})();function ml(i,t=$y){return ti((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,d=t.now();if(d{s=c,o=t.now(),r||(r=t.schedule(l,i),n.add(r))},()=>{a(),n.complete()},void 0,()=>{s=r=null}))})}function wU(i){return gn((t,e)=>i<=e)}function Zl(i,t=$a){return i=i??OZ,ti((e,n)=>{let r,s=!0;e.subscribe(Yn(n,o=>{const a=t(o);(s||!i(r,a))&&(s=!1,r=a,n.next(o))}))})}function OZ(i,t){return i===t}let MU=(()=>{class i{create(e){return typeof MutationObserver>"u"?null:new MutationObserver(e)}}return i.\u0275fac=function(e){return new(e||i)},i.\u0275prov=ke({token:i,factory:i.\u0275fac,providedIn:"root"}),i})(),FZ=(()=>{class i{constructor(e){this._mutationObserverFactory=e,this._observedElements=new Map}ngOnDestroy(){this._observedElements.forEach((e,n)=>this._cleanupObserver(n))}observe(e){const n=Yc(e);return new In(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 Re,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)(ee(MU))},i.\u0275prov=ke({token:i,factory:i.\u0275fac,providedIn:"root"}),i})(),CU=(()=>{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=ks(e),this._subscribe()}constructor(e,n,r){this._contentObserver=e,this._elementRef=n,this._ngZone=r,this.event=new We,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(ml(this.debounce)):e).subscribe(this.event)})}_unsubscribe(){this._currentSubscription?.unsubscribe()}}return i.\u0275fac=function(e){return new(e||i)(E(FZ),E(mt),E(ft))},i.\u0275dir=ve({type:i,selectors:[["","cdkObserveContent",""]],inputs:{disabled:["cdkObserveContentDisabled","disabled"],debounce:"debounce"},outputs:{event:"cdkObserveContent"},exportAs:["cdkObserveContent"]}),i})(),HI=(()=>{class i{}return i.\u0275fac=function(e){return new(e||i)},i.\u0275mod=nn({type:i}),i.\u0275inj=Kt({providers:[MU]}),i})();const SU=new Set;let Om,LZ=(()=>{class i{constructor(e){this._platform=e,this._matchMedia=this._platform.isBrowser&&window.matchMedia?window.matchMedia.bind(window):BZ}matchMedia(e){return(this._platform.WEBKIT||this._platform.BLINK)&&function NZ(i){if(!SU.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),SU.add(i))}catch(t){console.error(t)}}(e),this._matchMedia(e)}}return i.\u0275fac=function(e){return new(e||i)(ee(Vi))},i.\u0275prov=ke({token:i,factory:i.\u0275fac,providedIn:"root"}),i})();function BZ(i){return{matches:"all"===i||""===i,media:i,addListener:()=>{},removeListener:()=>{}}}let GI=(()=>{class i{constructor(e,n){this._mediaMatcher=e,this._zone=n,this._queries=new Map,this._destroySubject=new Re}ngOnDestroy(){this._destroySubject.next(),this._destroySubject.complete()}isMatched(e){return EU(TM(e)).some(r=>this._registerQuery(r).mql.matches)}observe(e){let s=nu(EU(TM(e)).map(o=>this._registerQuery(o).observable));return s=Sy(s.pipe(Pi(1)),s.pipe(wU(1),ml(0))),s.pipe(et(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 In(o=>{const a=l=>this._zone.run(()=>o.next(l));return n.addListener(a),()=>{n.removeListener(a)}}).pipe(Do(n),et(({matches:o})=>({query:e,matches:o})),He(this._destroySubject)),mql:n};return this._queries.set(e,s),s}}return i.\u0275fac=function(e){return new(e||i)(ee(LZ),ee(ft))},i.\u0275prov=ke({token:i,factory:i.\u0275fac,providedIn:"root"}),i})();function EU(i){return i.map(t=>t.split(",")).reduce((t,e)=>t.concat(e)).map(t=>t.trim())}function zM(i,t){return(i.getAttribute(t)||"").match(/\S+/g)||[]}const DU="cdk-describedby-message",HM="cdk-describedby-host";let $I=0,HZ=(()=>{class i{constructor(e,n){this._platform=n,this._messageRegistry=new Map,this._messagesContainer=null,this._id=""+$I++,this._document=e,this._id=Ft(cm)+"-"+$I++}describe(e,n,r){if(!this._canBeDescribed(e,n))return;const s=WI(n,r);"string"!=typeof n?(TU(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=WI(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(`[${HM}="${this._id}"]`);for(let n=0;n0!=r.indexOf(DU));e.setAttribute("aria-describedby",n.join(" "))}_addMessageReference(e,n){const r=this._messageRegistry.get(n);(function VZ(i,t,e){const n=zM(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(HM,this._id),r.referenceCount++}_removeMessageReference(e,n){const r=this._messageRegistry.get(n);r.referenceCount--,function zZ(i,t,e){const r=zM(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(HM)}_isElementDescribedByMessage(e,n){const r=zM(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)(ee(jt),ee(Vi))},i.\u0275prov=ke({token:i,factory:i.\u0275fac,providedIn:"root"}),i})();function WI(i,t){return"string"==typeof i?`${t||""}/${i}`:i}function TU(i,t){i.id||(i.id=`${DU}-${t}-${$I++}`)}class IU{constructor(t){this._items=t,this._activeItemIndex=-1,this._activeItem=null,this._wrap=!1,this._letterKeyStream=new Re,this._typeaheadSubscription=Zt.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 Re,this.change=new Re,t instanceof om&&(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(Ui(e=>this._pressedLetters.push(e)),ml(t),gn(()=>this._pressedLetters.length>0),et(()=>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 om?this._items.toArray():this._items}}class GZ extends IU{setActiveItem(t){this.activeItem&&this.activeItem.setInactiveStyles(),super.setActiveItem(t),this.activeItem&&this.activeItem.setActiveStyles()}}class RU extends IU{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 GM=(()=>{class i{constructor(e){this._platform=e}isDisabled(e){return e.hasAttribute("disabled")}isVisible(e){return function WZ(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 $Z(i){try{return i.frameElement}catch{return null}}(function JZ(i){return i.ownerDocument&&i.ownerDocument.defaultView||window}(e));if(n&&(-1===PU(n)||!this.isVisible(n)))return!1;let r=e.nodeName.toLowerCase(),s=PU(e);return e.hasAttribute("contenteditable")?-1!==s:!("iframe"===r||"object"===r||this._platform.WEBKIT&&this._platform.IOS&&!function ZZ(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 QZ(i){return!function YZ(i){return function XZ(i){return"input"==i.nodeName.toLowerCase()}(i)&&"hidden"==i.type}(i)&&(function jZ(i){let t=i.nodeName.toLowerCase();return"input"===t||"select"===t||"button"===t||"textarea"===t}(i)||function qZ(i){return function KZ(i){return"a"==i.nodeName.toLowerCase()}(i)&&i.hasAttribute("href")}(i)||i.hasAttribute("contenteditable")||kU(i))}(e)&&!this.isDisabled(e)&&(n?.ignoreVisibility||this.isVisible(e))}}return i.\u0275fac=function(e){return new(e||i)(ee(Vi))},i.\u0275prov=ke({token:i,factory:i.\u0275fac,providedIn:"root"}),i})();function kU(i){if(!i.hasAttribute("tabindex")||void 0===i.tabIndex)return!1;let t=i.getAttribute("tabindex");return!(!t||isNaN(parseInt(t,10)))}function PU(i){if(!kU(i))return null;const t=parseInt(i.getAttribute("tabindex")||"",10);return isNaN(t)?-1:t}class eQ{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(Pi(1)).subscribe(t)}}let jI=(()=>{class i{constructor(e,n,r){this._checker=e,this._ngZone=n,this._document=r}create(e,n=!1){return new eQ(e,this._checker,this._ngZone,this._document,n)}}return i.\u0275fac=function(e){return new(e||i)(ee(GM),ee(ft),ee(jt))},i.\u0275prov=ke({token:i,factory:i.\u0275fac,providedIn:"root"}),i})();function YI(i){return 0===i.buttons||0===i.offsetX&&0===i.offsetY}function qI(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 tQ=new me("cdk-input-modality-detector-options"),nQ={ignoreKeys:[18,17,224,91,16]},Fm=Oh({passive:!0,capture:!0});let iQ=(()=>{class i{get mostRecentModality(){return this._modality.value}constructor(e,n,r,s){this._platform=e,this._mostRecentTarget=null,this._modality=new gt(null),this._lastTouchMs=0,this._onKeydown=o=>{this._options?.ignoreKeys?.some(a=>a===o.keyCode)||(this._modality.next("keyboard"),this._mostRecentTarget=cu(o))},this._onMousedown=o=>{Date.now()-this._lastTouchMs<650||(this._modality.next(YI(o)?"keyboard":"mouse"),this._mostRecentTarget=cu(o))},this._onTouchstart=o=>{qI(o)?this._modality.next("keyboard"):(this._lastTouchMs=Date.now(),this._modality.next("touch"),this._mostRecentTarget=cu(o))},this._options={...nQ,...s},this.modalityDetected=this._modality.pipe(wU(1)),this.modalityChanged=this.modalityDetected.pipe(Zl()),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)(ee(Vi),ee(ft),ee(jt),ee(tQ,8))},i.\u0275prov=ke({token:i,factory:i.\u0275fac,providedIn:"root"}),i})();const rQ=new me("liveAnnouncerElement",{providedIn:"root",factory:function sQ(){return null}}),oQ=new me("LIVE_ANNOUNCER_DEFAULT_OPTIONS");let aQ=0,XI=(()=>{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 Re,this._rootNodeFocusAndBlurListener=a=>{for(let c=cu(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=Yc(e);if(!this._platform.isBrowser||1!==r.nodeType)return ht(null);const s=function WK(i){if(function $K(){if(null==LI){const i=typeof document<"u"?document.head:null;LI=!(!i||!i.createShadowRoot&&!i.attachShadow)}return LI}()){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 Re,rootNode:s};return this._elementInfo.set(r,a),this._registerGlobalListeners(a),a.subject}stopMonitoring(e){const n=Yc(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=Yc(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=cu(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,$M),n.addEventListener("blur",this._rootNodeFocusAndBlurListener,$M)}),this._rootNodeFocusListenerCount.set(n,r+1),1==++this._monitoredElementCount&&(this._ngZone.runOutsideAngular(()=>{this._getWindow().addEventListener("focus",this._windowFocusListener)}),this._inputModalityDetector.modalityDetected.pipe(He(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,$M),n.removeEventListener("blur",this._rootNodeFocusAndBlurListener,$M),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=Ft(GI).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,FU,LU),this._hasCheckedHighContrastMode=!0;const n=this.getHighContrastMode();1===n?e.add(KI,FU):2===n&&e.add(KI,LU)}}}return i.\u0275fac=function(e){return new(e||i)(ee(Vi),ee(jt))},i.\u0275prov=ke({token:i,factory:i.\u0275fac,providedIn:"root"}),i})(),BU=(()=>{class i{constructor(e){e._applyBodyHighContrastModeCssClasses()}}return i.\u0275fac=function(e){return new(e||i)(ee(NU))},i.\u0275mod=nn({type:i}),i.\u0275inj=Kt({imports:[HI]}),i})();function cQ(i,t){}class WM{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 UU=(()=>{class i extends NM{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=d=>{this._portalOutlet.hasAttached();const h=this._portalOutlet.attachDomPortal(d);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=FM(),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=FM();return e===n||e.contains(n)}_initializeFocusTrap(){this._focusTrap=this._focusTrapFactory.create(this._elementRef.nativeElement),this._document&&(this._elementFocusedBeforeDialogWasOpened=FM())}_handleBackdropClicks(){this._overlayRef.backdropClick().subscribe(()=>{this._config.disableClose&&this._recaptureFocus()})}}return i.\u0275fac=function(e){return new(e||i)(E(mt),E(jI),E(jt,8),E(WM),E(GM),E(ft),E(Zy),E(qc))},i.\u0275cmp=ot({type:i,selectors:[["cdk-dialog-container"]],viewQuery:function(e,n){if(1&e&&Wn(Am,7),2&e){let r;Et(r=At())&&(n._portalOutlet=r.first)}},hostAttrs:["tabindex","-1",1,"cdk-dialog-container"],hostVars:6,hostBindings:function(e,n){2&e&&Dt("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:[lt],decls:1,vars:0,consts:[["cdkPortalOutlet",""]],template:function(e,n){1&e&&fe(0,cQ,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 ZI{constructor(t,e){this.overlayRef=t,this.config=e,this.closed=new Re,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&&!Ko(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 VU=new me("DialogScrollStrategy"),dQ=new me("DialogData"),uQ=new me("DefaultDialogConfig"),fQ={provide:VU,deps:[as],useFactory:function hQ(i){return()=>i.scrollStrategies.block()}};let pQ=0,zU=(()=>{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 Re,this._afterOpenedAtThisLevel=new Re,this._ariaHiddenElements=new Map,this.afterAllClosed=Ey(()=>this.openDialogs.length?this._getAfterAllClosed():this._getAfterAllClosed().pipe(Do(void 0))),this._scrollStrategy=a}open(e,n){(n={...this._defaultOptions||new WM,...n}).id=n.id||"cdk-dialog-"+pQ++,n.id&&this.getDialogById(n.id);const s=this._getOverlayConfig(n),o=this._overlay.create(s),a=new ZI(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(){QI(this.openDialogs,e=>e.close())}getDialogById(e){return this.openDialogs.find(n=>n.id===e)}ngOnDestroy(){QI(this._openDialogsAtThisLevel,e=>{!1===e.config.closeOnDestroy&&this._removeOpenDialog(e,!1)}),QI(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:WM,useValue:r},{provide:ZI,useValue:n},{provide:Zy,useValue:e}];let a;r.container?"function"==typeof r.container?a=r.container:(a=r.container.type,o.push(...r.container.providers(r))):a=UU;const l=new Lh(a,r.viewContainerRef,Gi.create({parent:s||this._injector,providers:o}),r.componentFactoryResolver);return e.attach(l).instance}_attachDialogContent(e,n,r,s){if(e instanceof Co){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 Lh(e,s.viewContainerRef,o,s.componentFactoryResolver));n.componentInstance=a.instance}}_createInjector(e,n,r,s){const o=e.injector||e.viewContainerRef?.injector,a=[{provide:dQ,useValue:e.data},{provide:ZI,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(Ra,null,{optional:!0}))&&a.push({provide:Ra,useValue:{value:e.direction,change:ht()}}),Gi.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)(ee(as),ee(Gi),ee(uQ,8),ee(i,12),ee(VM),ee(VU))},i.\u0275prov=ke({token:i,factory:i.\u0275fac}),i})();function QI(i,t){let e=i.length;for(;e--;)t(i[e])}let mQ=(()=>{class i{}return i.\u0275fac=function(e){return new(e||i)},i.\u0275mod=nn({type:i}),i.\u0275inj=Kt({providers:[zU,fQ],imports:[Pm,Nh,BU,Nh]}),i})();const gQ=["text"];function _Q(i,t){if(1&i&&De(0,"mat-pseudo-checkbox",6),2&i){const e=he();U("state",e.selected?"checked":"unchecked")("disabled",e.disabled)}}function vQ(i,t){1&i&&De(0,"mat-pseudo-checkbox",7),2&i&&U("disabled",he().disabled)}function yQ(i,t){if(1&i&&(W(0,"span",8),Ve(1),j()),2&i){const e=he();G(1),Zi("(",e.group.label,")")}}const bQ=[[["mat-icon"]],"*"],xQ=["mat-icon","*"],MQ=new me("mat-sanity-checks",{providedIn:"root",factory:function wQ(){return!0}});let Qn=(()=>{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!NI()&&("boolean"==typeof this._sanityChecks?this._sanityChecks:!!this._sanityChecks[e])}}return i.\u0275fac=function(e){return new(e||i)(ee(NU),ee(MQ,8),ee(jt))},i.\u0275mod=nn({type:i}),i.\u0275inj=Kt({imports:[Yy,Yy]}),i})();function jM(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 Qy(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 YM(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 JI(i,t=0){return class extends i{get tabIndex(){return this.disabled?-1:this._tabIndex}set tabIndex(e){this._tabIndex=null!=e?ks(e):this.defaultTabIndex}constructor(...e){super(...e),this._tabIndex=t,this.defaultTabIndex=t}}}function $U(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 CQ(i){return class extends i{constructor(...t){super(...t),this._isInitialized=!1,this._pendingSubscribers=[],this.initialized=new In(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 jU=(()=>{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=ke({token:i,factory:i.\u0275fac,providedIn:"root"}),i})();class EQ{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 YU=Oh({passive:!0,capture:!0});class AQ{constructor(){this._events=new Map,this._delegateEventHandler=t=>{const e=cu(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,YU)})}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,YU)))}}const qU={enterDuration:225,exitDuration:150},XU=Oh({passive:!0,capture:!0}),KU=["mousedown","touchstart"],ZU=["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=Yc(n))}fadeInRipple(t,e,n={}){const r=this._containerRect=this._containerRect||this._containerElement.getBoundingClientRect(),s={...qU,...n.animation};n.centered&&(t=r.left+r.width/2,e=r.top+r.height/2);const o=n.radius||function TQ(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,d=document.createElement("div");d.classList.add("mat-ripple-element"),d.style.left=a-o+"px",d.style.top=l-o+"px",d.style.height=2*o+"px",d.style.width=2*o+"px",null!=n.color&&(d.style.backgroundColor=n.color),d.style.transitionDuration=`${c}ms`,this._containerElement.appendChild(d);const h=window.getComputedStyle(d),m=h.transitionDuration,g="none"===h.transitionProperty||"0s"===m||"0s, 0s"===m||0===r.width&&0===r.height,b=new EQ(this,d,n,g);d.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);d.addEventListener("transitionend",y),d.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={...qU,...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=Yc(t);!this._platform.isBrowser||!e||e===this._triggerElement||(this._removeTriggerEvents(),this._triggerElement=e,KU.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(()=>{ZU.forEach(e=>{this._triggerElement.addEventListener(e,this,XU)})}),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=YI(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&&(KU.forEach(e=>Lm._eventManager.removeHandler(e,t,this)),this._pointerUpEventsRegistered&&ZU.forEach(e=>t.removeEventListener(e,this,XU)))}}Lm._eventManager=new AQ;const eR=new me("mat-ripple-global-options");let Uh=(()=>{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)(E(mt),E(ft),E(Vi),E(eR,8),E(Rr,8))},i.\u0275dir=ve({type:i,selectors:[["","mat-ripple",""],["","matRipple",""]],hostAttrs:[1,"mat-ripple"],hostVars:2,hostBindings:function(e,n){2&e&&un("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})(),eb=(()=>{class i{}return i.\u0275fac=function(e){return new(e||i)},i.\u0275mod=nn({type:i}),i.\u0275inj=Kt({imports:[Qn,Qn]}),i})(),IQ=(()=>{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)(E(Rr,8))},i.\u0275cmp=ot({type:i,selectors:[["mat-pseudo-checkbox"]],hostAttrs:[1,"mat-pseudo-checkbox"],hostVars:12,hostBindings:function(e,n){2&e&&un("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})(),QU=(()=>{class i{}return i.\u0275fac=function(e){return new(e||i)},i.\u0275mod=nn({type:i}),i.\u0275inj=Kt({imports:[Qn]}),i})();const JU=new me("MAT_OPTION_PARENT_COMPONENT"),eV=new me("MatOptgroup");let RQ=0;class kQ{constructor(t,e=!1){this.source=t,this.isUserInput=e}}let PQ=(()=>{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-"+RQ++,this.onSelectionChange=new We,this._stateChanges=new Re}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)&&!Ko(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 kQ(this,e))}}return i.\u0275fac=function(e){wo()},i.\u0275dir=ve({type:i,viewQuery:function(e,n){if(1&e&&Wn(gQ,7),2&e){let r;Et(r=At())&&(n._text=r.first)}},inputs:{value:"value",id:"id",disabled:"disabled"},outputs:{onSelectionChange:"onSelectionChange"}}),i})(),Nm=(()=>{class i extends PQ{constructor(e,n,r,s){super(e,n,r,s)}}return i.\u0275fac=function(e){return new(e||i)(E(mt),E(Zn),E(JU,8),E(eV,8))},i.\u0275cmp=ot({type:i,selectors:[["mat-option"]],hostAttrs:["role","option",1,"mat-mdc-option","mdc-list-item"],hostVars:11,hostBindings:function(e,n){1&e&&Ue("click",function(){return n._selectViaInteraction()})("keydown",function(s){return n._handleKeydown(s)}),2&e&&(Yl("id",n.id),Dt("aria-selected",n.selected)("aria-disabled",n.disabled.toString()),un("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:[lt],ngContentSelectors:xQ,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&&(sr(bQ),fe(0,_Q,1,2,"mat-pseudo-checkbox",0),Wt(1),W(2,"span",1,2),Wt(4,1),j(),fe(5,vQ,1,1,"mat-pseudo-checkbox",3),fe(6,yQ,2,1,"span",4),De(7,"div",5)),2&e&&(U("ngIf",n.multiple),G(5),U("ngIf",!n.multiple&&n.selected&&!n.hideSingleSelectionIndicator),G(1),U("ngIf",n.group&&n.group._inert),G(1),U("matRippleTrigger",n._getHostElement())("matRippleDisabled",n.disabled||n.disableRipple))},dependencies:[Uh,vi,IQ],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})(),tR=(()=>{class i{}return i.\u0275fac=function(e){return new(e||i)},i.\u0275mod=nn({type:i}),i.\u0275inj=Kt({imports:[eb,Ao,Qn,QU]}),i})();class tV{}class LQ{}const Xc="*";function ka(i,t){return{type:7,name:i,definitions:t,options:{}}}function jr(i,t=null){return{type:4,styles:t,timings:i}}function iV(i,t=null){return{type:2,steps:i,options:t}}function si(i){return{type:6,styles:i,offset:null}}function Ps(i,t,e){return{type:0,name:i,styles:t,options:e}}function rV(i){return{type:5,steps:i}}function Pr(i,t,e=null){return{type:1,expr:i,animation:t,options:e}}function nR(i=null){return{type:9,options:i}}function iR(i,t,e=null){return{type:11,selector:i,animation:t,options:e}}function sV(i){Promise.resolve().then(i)}class tb{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(){sV(()=>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 oV{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?sV(()=>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 rR="!";function NQ(i,t){}class qM{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 sR="mdc-dialog--open",aV="mdc-dialog--opening",lV="mdc-dialog--closing";let VQ=(()=>{class i extends UU{constructor(e,n,r,s,o,a,l,c){super(e,n,r,s,o,a,l,c),this._animationStateChanged=new We}_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)(E(mt),E(jI),E(jt,8),E(qM),E(GM),E(ft),E(Zy),E(qc))},i.\u0275cmp=ot({type:i,selectors:[["ng-component"]],features:[lt],decls:0,vars:0,template:function(e,n){},encapsulation:2}),i})();const cV="--mat-dialog-transition-duration";function dV(i){return null==i?null:"number"==typeof i?i:i.endsWith("ms")?ks(i.substring(0,i.length-2)):i.endsWith("s")?1e3*ks(i.substring(0,i.length-1)):"0"===i?0:null}let zQ=(()=>{class i extends VQ{constructor(e,n,r,s,o,a,l,c,d){super(e,n,r,s,o,a,l,d),this._animationMode=c,this._animationsEnabled="NoopAnimations"!==this._animationMode,this._hostElement=this._elementRef.nativeElement,this._openAnimationDuration=this._animationsEnabled?dV(this._config.enterAnimationDuration)??150:0,this._closeAnimationDuration=this._animationsEnabled?dV(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(cV,`${this._openAnimationDuration}ms`),this._requestAnimationFrame(()=>this._hostElement.classList.add(aV,sR)),this._waitForAnimationToComplete(this._openAnimationDuration,this._finishDialogOpen)):(this._hostElement.classList.add(sR),Promise.resolve().then(()=>this._finishDialogOpen()))}_startExitAnimation(){this._animationStateChanged.emit({state:"closing",totalTime:this._closeAnimationDuration}),this._hostElement.classList.remove(sR),this._animationsEnabled?(this._hostElement.style.setProperty(cV,`${this._openAnimationDuration}ms`),this._requestAnimationFrame(()=>this._hostElement.classList.add(lV)),this._waitForAnimationToComplete(this._closeAnimationDuration,this._finishDialogClose)):Promise.resolve().then(()=>this._finishDialogClose())}_clearAnimationClasses(){this._hostElement.classList.remove(aV,lV)}_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)(E(mt),E(jI),E(jt,8),E(qM),E(GM),E(ft),E(Zy),E(Rr,8),E(qc))},i.\u0275cmp=ot({type:i,selectors:[["mat-dialog-container"]],hostAttrs:["tabindex","-1",1,"mat-mdc-dialog-container","mdc-dialog"],hostVars:8,hostBindings:function(e,n){2&e&&(Yl("id",n._config.id),Dt("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),un("_mat-animation-noopable",!n._animationsEnabled))},features:[lt],decls:3,vars:0,consts:[[1,"mdc-dialog__container"],[1,"mat-mdc-dialog-surface","mdc-dialog__surface"],["cdkPortalOutlet",""]],template:function(e,n){1&e&&(W(0,"div",0)(1,"div",1),fe(2,NQ,0,0,"ng-template",2),j()())},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 nb{constructor(t,e,n){this._ref=t,this._containerInstance=n,this._afterOpened=new Re,this._beforeClosed=new Re,this._state=0,this.disableClose=e.disableClose,this.id=t.id,n._animationStateChanged.pipe(gn(r=>"opened"===r.state),Pi(1)).subscribe(()=>{this._afterOpened.next(),this._afterOpened.complete()}),n._animationStateChanged.pipe(gn(r=>"closed"===r.state),Pi(1)).subscribe(()=>{clearTimeout(this._closeFallbackTimeout),this._finishDialogClose()}),t.overlayRef.detachments().subscribe(()=>{this._beforeClosed.next(this._result),this._beforeClosed.complete(),this._finishDialogClose()}),Mr(this.backdropClick(),this.keydownEvents().pipe(gn(r=>27===r.keyCode&&!this.disableClose&&!Ko(r)))).subscribe(r=>{this.disableClose||(r.preventDefault(),uV(this,"keydown"===r.type?"keyboard":"mouse"))})}close(t){this._result=t,this._containerInstance._animationStateChanged.pipe(gn(e=>"closing"===e.state),Pi(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 uV(i,t,e){return i._closeInteractionType=t,i.close(e)}const oR=new me("MatMdcDialogData"),HQ=new me("mat-mdc-dialog-default-options"),hV=new me("mat-mdc-dialog-scroll-strategy"),$Q={provide:hV,deps:[as],useFactory:function GQ(i){return()=>i.scrollStrategies.block()}};let WQ=0,jQ=(()=>{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,d,h){this._overlay=e,this._defaultOptions=r,this._parentDialog=s,this._dialogRefConstructor=l,this._dialogContainerType=c,this._dialogDataToken=d,this._openDialogsAtThisLevel=[],this._afterAllClosedAtThisLevel=new Re,this._afterOpenedAtThisLevel=new Re,this._idPrefix="mat-dialog-",this.dialogConfigClass=qM,this.afterAllClosed=Ey(()=>this.openDialogs.length?this._getAfterAllClosed():this._getAfterAllClosed().pipe(Do(void 0))),this._scrollStrategy=a,this._dialog=n.get(zU)}open(e,n){let r;(n={...this._defaultOptions||new qM,...n}).id=n.id||`${this._idPrefix}${WQ++}`,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:WM,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){wo()},i.\u0275prov=ke({token:i,factory:i.\u0275fac}),i})(),Bm=(()=>{class i extends jQ{constructor(e,n,r,s,o,a,l,c){super(e,n,s,a,l,o,nb,zQ,oR,c),this._idPrefix="mat-mdc-dialog-"}}return i.\u0275fac=function(e){return new(e||i)(ee(as),ee(Gi),ee(_y,8),ee(HQ,8),ee(hV),ee(i,12),ee(VM),ee(Rr,8))},i.\u0275prov=ke({token:i,factory:i.\u0275fac}),i})(),YQ=0,qQ=(()=>{class i{constructor(e,n,r){this.dialogRef=e,this._elementRef=n,this._dialog=r,this.type="button"}ngOnInit(){this.dialogRef||(this.dialogRef=gV(this._elementRef,this._dialog.openDialogs))}ngOnChanges(e){const n=e._matDialogClose||e._matDialogCloseResult;n&&(this.dialogResult=n.currentValue)}_onButtonClick(e){uV(this.dialogRef,0===e.screenX&&0===e.screenY?"keyboard":"mouse",this.dialogResult)}}return i.\u0275fac=function(e){return new(e||i)(E(nb,8),E(mt),E(Bm))},i.\u0275dir=ve({type:i,selectors:[["","mat-dialog-close",""],["","matDialogClose",""]],hostVars:2,hostBindings:function(e,n){1&e&&Ue("click",function(s){return n._onButtonClick(s)}),2&e&&Dt("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:[bi]}),i})(),fV=(()=>{class i{constructor(e,n,r){this._dialogRef=e,this._elementRef=n,this._dialog=r,this.id="mat-mdc-dialog-title-"+YQ++}ngOnInit(){this._dialogRef||(this._dialogRef=gV(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)(E(nb,8),E(mt),E(Bm))},i.\u0275dir=ve({type:i,selectors:[["","mat-dialog-title",""],["","matDialogTitle",""]],hostAttrs:[1,"mat-mdc-dialog-title","mdc-dialog__title"],hostVars:1,hostBindings:function(e,n){2&e&&Yl("id",n.id)},inputs:{id:"id"},exportAs:["matDialogTitle"]}),i})(),pV=(()=>{class i{}return i.\u0275fac=function(e){return new(e||i)},i.\u0275dir=ve({type:i,selectors:[["","mat-dialog-content",""],["mat-dialog-content"],["","matDialogContent",""]],hostAttrs:[1,"mat-mdc-dialog-content","mdc-dialog__content"]}),i})(),mV=(()=>{class i{constructor(){this.align="start"}}return i.\u0275fac=function(e){return new(e||i)},i.\u0275dir=ve({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&&un("mat-mdc-dialog-actions-align-center","center"===n.align)("mat-mdc-dialog-actions-align-end","end"===n.align)},inputs:{align:"align"}}),i})();function gV(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 _V=(()=>{class i{}return i.\u0275fac=function(e){return new(e||i)},i.\u0275mod=nn({type:i}),i.\u0275inj=Kt({providers:[Bm,$Q],imports:[mQ,Pm,Nh,Qn,Qn]}),i})();const XQ=["mat-button",""],yV=[[["",8,"material-icons",3,"iconPositionEnd",""],["mat-icon",3,"iconPositionEnd",""],["","matButtonIcon","",3,"iconPositionEnd",""]],"*",[["","iconPositionEnd","",8,"material-icons"],["mat-icon","iconPositionEnd",""],["","matButtonIcon","","iconPositionEnd",""]]],bV=[".material-icons:not([iconPositionEnd]), mat-icon:not([iconPositionEnd]), [matButtonIcon]:not([iconPositionEnd])","*",".material-icons[iconPositionEnd], mat-icon[iconPositionEnd], [matButtonIcon][iconPositionEnd]"],ZQ=["mat-mini-fab",""],JQ=["mat-icon-button",""],eJ=["*"],tJ=[{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"]}],nJ=Qy(jM(YM(class{constructor(i){this._elementRef=i}})));let aR=(()=>{class i extends nJ{constructor(e,n,r,s){super(e),this._platform=n,this._ngZone=r,this._animationMode=s,this._focusMonitor=Ft(qc),this._isFab=!1;const o=e.nativeElement.classList;for(const a of tJ)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){wo()},i.\u0275dir=ve({type:i,viewQuery:function(e,n){if(1&e&&Wn(Uh,5),2&e){let r;Et(r=At())&&(n.ripple=r.first)}},features:[lt]}),i})(),ib=(()=>{class i extends aR{constructor(e,n,r,s){super(e,n,r,s)}}return i.\u0275fac=function(e){return new(e||i)(E(mt),E(Vi),E(ft),E(Rr,8))},i.\u0275cmp=ot({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&&(Dt("disabled",n.disabled||null),un("_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:[lt],attrs:XQ,ngContentSelectors:bV,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&&(sr(yV),De(0,"span",0),Wt(1),W(2,"span",1),Wt(3,1),j(),Wt(4,2),De(5,"span",2)(6,"span",3)(7,"span",4)),2&e&&(un("mdc-button__ripple",!n._isFab)("mdc-fab__ripple",n._isFab),G(6),U("matRippleDisabled",n._isRippleDisabled())("matRippleTrigger",n._elementRef.nativeElement))},dependencies:[Uh],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 rJ=new me("mat-mdc-fab-default-options",{providedIn:"root",factory:xV});function xV(){return{color:"accent"}}const wV=xV();let MV=(()=>{class i extends aR{constructor(e,n,r,s,o){super(e,n,r,s),this._options=o,this._isFab=!0,this._options=this._options||wV,this.color=this.defaultColor=this._options.color||wV.color}}return i.\u0275fac=function(e){return new(e||i)(E(mt),E(Vi),E(ft),E(Rr,8),E(rJ,8))},i.\u0275cmp=ot({type:i,selectors:[["button","mat-mini-fab",""]],hostVars:7,hostBindings:function(e,n){2&e&&(Dt("disabled",n.disabled||null),un("_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:[lt],attrs:ZQ,ngContentSelectors:bV,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&&(sr(yV),De(0,"span",0),Wt(1),W(2,"span",1),Wt(3,1),j(),Wt(4,2),De(5,"span",2)(6,"span",3)(7,"span",4)),2&e&&(un("mdc-button__ripple",!n._isFab)("mdc-fab__ripple",n._isFab),G(6),U("matRippleDisabled",n._isRippleDisabled())("matRippleTrigger",n._elementRef.nativeElement))},dependencies:[Uh],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})(),XM=(()=>{class i extends aR{constructor(e,n,r,s){super(e,n,r,s)}}return i.\u0275fac=function(e){return new(e||i)(E(mt),E(Vi),E(ft),E(Rr,8))},i.\u0275cmp=ot({type:i,selectors:[["button","mat-icon-button",""]],hostVars:7,hostBindings:function(e,n){2&e&&(Dt("disabled",n.disabled||null),un("_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:[lt],attrs:JQ,ngContentSelectors:eJ,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&&(sr(),De(0,"span",0),Wt(1),De(2,"span",1)(3,"span",2)(4,"span",3)),2&e&&(G(3),U("matRippleDisabled",n._isRippleDisabled())("matRippleCentered",!0)("matRippleTrigger",n._elementRef.nativeElement))},dependencies:[Uh],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})(),KM=(()=>{class i{}return i.\u0275fac=function(e){return new(e||i)},i.\u0275mod=nn({type:i}),i.\u0275inj=Kt({imports:[Qn,eb,Qn]}),i})();const sJ=["class","dialog"];let CV=(()=>{class i{constructor(e,n){this.dialogRef=e,this.data=n}}return i.\u0275fac=function(e){return new(e||i)(E(nb),E(oR))},i.\u0275cmp=ot({type:i,selectors:[["app-confirm",8,"dialog"]],attrs:sJ,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&&(W(0,"h1",0),Ve(1,"Confirmation"),j(),W(2,"div",1)(3,"p"),Ve(4),j()(),W(5,"div",2)(6,"button",3),Ue("click",function(){return n.dialogRef.close()}),Ve(7,"Cancel"),j(),W(8,"button",4),Ve(9,"Yes"),j()()),2&e&&(G(4),_i(n.data.text),G(4),U("mat-dialog-close",!0))},dependencies:[ib,qQ,fV,pV,mV]}),i})();function lR(i,t){const e="object"==typeof t;return new Promise((n,r)=>{const s=new ua({next:o=>{n(o),s.unsubscribe()},error:r,complete:()=>{e?n(t.defaultValue):r(new fm)}});i.subscribe(s)})}let Ql=(()=>{class i{constructor(e){this.ngZone=e,this.openedResource$=new gt(null),this.openedResourcePath$=new gt(null),eel.expose(this.wrapHandler(this.openFile),"open_file"),eel.on_angular_ready(),setTimeout(tt(function*(){for(;;){if(eel._websocket){eel._websocket.onclose=()=>window.close();break}yield new Promise(n=>setTimeout(n,0))}}),0)}wrapHandler(e){return(...n)=>{try{ft.assertInAngularZone(),e.bind(this)(...n)}catch{this.ngZone.run(e,this,n)}}}openFile(e,n=!1){var r=this;return tt(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 tt(function*(){yield eel.open_file_with_system_app(e)()})()}retrieveValue(e){return tt(function*(){return yield eel.retrieve_value(e)()})()}runCustomAction(e,n,r){return tt(function*(){return eel.run_custom_action(e,n,r)()})()}saveFile(e){var n=this;return tt(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 tt(function*(){return eel.serialize_resource(e,n)()})()}serializeResourceTmp(e,n,r={}){return tt(function*(){return eel.serialize_resource_tmp(e,n,r)()})()}serializeReversible(e,n){return tt(function*(){return eel.serialize_reversible(e,n)()})()}deserializeResource(e){return tt(function*(){return eel.deserialize_resource(e)()})()}}return i.\u0275fac=function(e){return new(e||i)(ee(ft))},i.\u0275prov=ke({token:i,factory:i.\u0275fac,providedIn:"root"}),i})();var cR=ps(489);const SV=i=>!(!i||"object"!=typeof i),EV=(i={},t,e,n=[])=>{const r=[];if(SV(i)){const s=Object.entries(i);for(let o=0;o{class i{constructor(e){var n=this;this.eelDelegate=e,this._hasUnsavedChanges$=new gt(!1),this.resource$=new gt(null),this.error$=new gt(null),this.customActionRunning$=new gt(!1),this.changedDataBlocks={},this.dataBlockChange$=new Re,this.hideHiddenFields$=new gt(!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=EV(r.schema,"is_recursive_ref",!0);for(const[o,a]of s){const l=o.block_class_mro;let c=r.schema,d=c.block_class_mro===l?c:void 0;for(const h of a.slice(0,a.length-1))!d&&c[h]?.block_class_mro===l&&(d=c[h]),c=c[h];c[a[a.length-1]]=d}this.resource$.next(r),this.error$.next(null)}else this.resource$.next(null),this.error$.next(null)}),this.dataBlockChange$.subscribe(function(){var r=tt(function*([s,o]){n.changedDataBlocks[s]=o,n.updateUnsavedChanges();const a=yield n.eelDelegate.retrieveValue(s);n.changedDataBlocks[s]==o&&((0,cR.isNumber)(o)?Math.abs(o-a)<1e-10:(0,cR.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 tt(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 tt(function*(){return s.processExternalChanges(e,()=>s.eelDelegate.runCustomAction(e,n,r))})()}deserializeResource(e){var n=this;return tt(function*(){return n.processExternalChanges(e,()=>n.eelDelegate.deserializeResource(e))})()}reloadResource(){var e=this;return tt(function*(){const n=e.eelDelegate.openedResourcePath$.getValue();n&&e.eelDelegate.openFile(n,!0).then()})()}saveResource(){var e=this;return tt(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)(ee(Ql))},i.\u0275prov=ke({token:i,factory:i.\u0275fac,providedIn:"root"}),i})();function oJ(i,t){if(1&i){const e=di();W(0,"div",2)(1,"button",3),Ue("click",function(){return an(e),zt(he().action())}),Ve(2),j()()}if(2&i){const e=he();G(2),Zi(" ",e.data.action," ")}}const aJ=["label"];function lJ(i,t){}const cJ=Math.pow(2,31)-1;class dR{constructor(t,e){this._overlayRef=e,this._afterDismissed=new Re,this._afterOpened=new Re,this._onAction=new Re,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,cJ))}_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 AV=new me("MatSnackBarData");class ZM{constructor(){this.politeness="assertive",this.announcementMessage="",this.duration=0,this.data=null,this.horizontalPosition="center",this.verticalPosition="bottom"}}let dJ=(()=>{class i{}return i.\u0275fac=function(e){return new(e||i)},i.\u0275dir=ve({type:i,selectors:[["","matSnackBarLabel",""]],hostAttrs:[1,"mat-mdc-snack-bar-label","mdc-snackbar__label"]}),i})(),uJ=(()=>{class i{}return i.\u0275fac=function(e){return new(e||i)},i.\u0275dir=ve({type:i,selectors:[["","matSnackBarActions",""]],hostAttrs:[1,"mat-mdc-snack-bar-actions","mdc-snackbar__actions"]}),i})(),hJ=(()=>{class i{}return i.\u0275fac=function(e){return new(e||i)},i.\u0275dir=ve({type:i,selectors:[["","matSnackBarAction",""]],hostAttrs:[1,"mat-mdc-snack-bar-action","mdc-snackbar__action"]}),i})(),fJ=(()=>{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)(E(dR),E(AV))},i.\u0275cmp=ot({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&&(W(0,"div",0),Ve(1),j(),fe(2,oJ,3,1,"div",1)),2&e&&(G(1),Zi(" ",n.data.message,"\n"),G(1),U("ngIf",n.hasAction))},dependencies:[vi,ib,dJ,uJ,hJ],styles:[".mat-mdc-simple-snack-bar{display:flex}"],encapsulation:2,changeDetection:0}),i})();const pJ={snackBarState:ka("state",[Ps("void, hidden",si({transform:"scale(0.8)",opacity:0})),Ps("visible",si({transform:"scale(1)",opacity:1})),Pr("* => visible",jr("150ms cubic-bezier(0, 0, 0.2, 1)")),Pr("* => void, * => hidden",jr("75ms cubic-bezier(0.4, 0.0, 1, 1)",si({opacity:0})))])};let mJ=0,gJ=(()=>{class i extends NM{constructor(e,n,r,s,o){super(),this._ngZone=e,this._elementRef=n,this._changeDetectorRef=r,this._platform=s,this.snackBarConfig=o,this._document=Ft(jt),this._trackedModals=new Set,this._announceDelay=150,this._destroyed=!1,this._onAnnounce=new Re,this._onExit=new Re,this._onEnter=new Re,this._animationState="void",this._liveElementId="mat-snack-bar-container-live-"+mJ++,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(Pi(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)(E(ft),E(mt),E(Zn),E(Vi),E(ZM))},i.\u0275dir=ve({type:i,viewQuery:function(e,n){if(1&e&&Wn(Am,7),2&e){let r;Et(r=At())&&(n._portalOutlet=r.first)}},features:[lt]}),i})(),_J=(()=>{class i extends gJ{_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=ri(i)))(n||i)}}(),i.\u0275cmp=ot({type:i,selectors:[["mat-snack-bar-container"]],viewQuery:function(e,n){if(1&e&&Wn(aJ,7),2&e){let r;Et(r=At())&&(n._label=r.first)}},hostAttrs:[1,"mdc-snackbar","mat-mdc-snack-bar-container","mdc-snackbar--open"],hostVars:1,hostBindings:function(e,n){1&e&&N1("@state.done",function(s){return n.onAnimationEnd(s)}),2&e&&Iw("@state",n._animationState)},features:[lt],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&&(W(0,"div",0)(1,"div",1,2)(3,"div",3),fe(4,lJ,0,0,"ng-template",4),j(),De(5,"div"),j()()),2&e&&(G(5),Dt("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:[pJ.snackBarState]}}),i})(),DV=(()=>{class i{}return i.\u0275fac=function(e){return new(e||i)},i.\u0275mod=nn({type:i}),i.\u0275inj=Kt({imports:[Pm,Nh,Ao,KM,Qn,Qn]}),i})();const TV=new me("mat-snack-bar-default-options",{providedIn:"root",factory:function vJ(){return new ZM}});let yJ=(()=>{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=Gi.create({parent:n&&n.viewContainerRef&&n.viewContainerRef.injector||this._injector,providers:[{provide:ZM,useValue:n}]}),o=new Lh(this.snackBarContainerComponent,n.viewContainerRef,s),a=e.attach(o);return a.instance.snackBarConfig=n,a.instance}_attach(e,n){const r={...new ZM,...this._defaultConfig,...n},s=this._createOverlay(r),o=this._attachSnackBarContainer(s,r),a=new dR(o,s);if(e instanceof Co){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 Lh(e,void 0,l),d=o.attachComponentPortal(c);a.instance=d.instance}return this._breakpointObserver.observe("(max-width: 599.98px) and (orientation: portrait)").pipe(He(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 Gi.create({parent:e&&e.viewContainerRef&&e.viewContainerRef.injector||this._injector,providers:[{provide:dR,useValue:n},{provide:AV,useValue:e.data}]})}}return i.\u0275fac=function(e){return new(e||i)(ee(as),ee(XI),ee(Gi),ee(GI),ee(i,12),ee(TV))},i.\u0275prov=ke({token:i,factory:i.\u0275fac}),i})(),IV=(()=>{class i extends yJ{constructor(e,n,r,s,o,a){super(e,n,r,s,o,a),this.simpleSnackBarComponent=fJ,this.snackBarContainerComponent=_J,this.handsetCssClass="mat-mdc-snack-bar-handset"}}return i.\u0275fac=function(e){return new(e||i)(ee(as),ee(XI),ee(Gi),ee(GI),ee(i,12),ee(TV))},i.\u0275prov=ke({token:i,factory:i.\u0275fac,providedIn:DV}),i})();const bJ=["*",[["mat-toolbar-row"]]],xJ=["*","mat-toolbar-row"],wJ=Qy(class{constructor(i){this._elementRef=i}});let MJ=(()=>{class i{}return i.\u0275fac=function(e){return new(e||i)},i.\u0275dir=ve({type:i,selectors:[["mat-toolbar-row"]],hostAttrs:[1,"mat-toolbar-row"],exportAs:["matToolbarRow"]}),i})(),CJ=(()=>{class i extends wJ{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)(E(mt),E(Vi),E(jt))},i.\u0275cmp=ot({type:i,selectors:[["mat-toolbar"]],contentQueries:function(e,n,r){if(1&e&&$i(r,MJ,5),2&e){let s;Et(s=At())&&(n._toolbarRows=s)}},hostAttrs:[1,"mat-toolbar"],hostVars:4,hostBindings:function(e,n){2&e&&un("mat-toolbar-multiple-rows",n._toolbarRows.length>0)("mat-toolbar-single-row",0===n._toolbarRows.length)},inputs:{color:"color"},exportAs:["matToolbar"],features:[lt],ngContentSelectors:xJ,decls:2,vars:0,template:function(e,n){1&e&&(sr(bJ),Wt(0),Wt(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})(),SJ=(()=>{class i{}return i.\u0275fac=function(e){return new(e||i)},i.\u0275mod=nn({type:i}),i.\u0275inj=Kt({imports:[Qn,Qn]}),i})(),EJ=(()=>{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=ot({type:i,selectors:[["mat-divider"]],hostAttrs:["role","separator",1,"mat-divider"],hostVars:7,hostBindings:function(e,n){2&e&&(Dt("aria-orientation",n.vertical?"vertical":"horizontal"),un("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})(),RV=(()=>{class i{}return i.\u0275fac=function(e){return new(e||i)},i.\u0275mod=nn({type:i}),i.\u0275inj=Kt({imports:[Qn,Qn]}),i})();const AJ=["tooltip"],kV=new me("mat-tooltip-scroll-strategy"),IJ={provide:kV,deps:[as],useFactory:function TJ(i){return()=>i.scrollStrategies.reposition({scrollThrottle:20})}},kJ=new me("mat-tooltip-default-options",{providedIn:"root",factory:function RJ(){return{showDelay:0,hideDelay:0,touchendHideDelay:1500}}}),PV="tooltip-panel",OV=Oh({passive:!0});let BJ=(()=>{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=ks(e)}get hideDelay(){return this._hideDelay}set hideDelay(e){this._hideDelay=ks(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,d,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 Re,this._scrollStrategy=d,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(He(this._destroyed)).subscribe(()=>{this._overlayRef&&this._updatePosition(this._overlayRef)})}ngAfterViewInit(){this._viewInitialized=!0,this._setupPointerEnterEventsIfNeeded(),this._focusMonitor.monitor(this._elementRef).pipe(He(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,OV)}),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 Lh(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(He(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 mt)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(He(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}-${PV}`,scrollStrategy:this._scrollStrategy()}),this._updatePosition(this._overlayRef),this._overlayRef.detachments().pipe(He(this._destroyed)).subscribe(()=>this._detach()),this._overlayRef.outsidePointerEvents().pipe(He(this._destroyed)).subscribe(()=>this._tooltipInstance?._handleBodyInteraction()),this._overlayRef.keydownEvents().pipe(He(this._destroyed)).subscribe(s=>{this._isTooltipVisible()&&27===s.keyCode&&!Ko(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(Pi(1),He(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}-${PV}-`;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,OV)})}_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){wo()},i.\u0275dir=ve({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})(),Os=(()=>{class i extends BJ{constructor(e,n,r,s,o,a,l,c,d,h,p,m){super(e,n,r,s,o,a,l,c,d,h,p,m),this._tooltipComponent=VJ,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)(E(as),E(mt),E(qy),E(Wr),E(ft),E(Vi),E(HZ),E(qc),E(kV),E(Ra,8),E(kJ,8),E(jt))},i.\u0275dir=ve({type:i,selectors:[["","matTooltip",""]],hostAttrs:[1,"mat-mdc-tooltip-trigger"],exportAs:["matTooltip"],features:[lt]}),i})(),UJ=(()=>{class i{constructor(e,n){this._changeDetectorRef=e,this._closeOnInteraction=!1,this._isVisible=!1,this._onHide=new Re,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)(E(Zn),E(Rr,8))},i.\u0275dir=ve({type:i}),i})(),VJ=(()=>{class i extends UJ{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)(E(Zn),E(mt),E(Rr,8))},i.\u0275cmp=ot({type:i,selectors:[["mat-tooltip-component"]],viewQuery:function(e,n){if(1&e&&Wn(AJ,7),2&e){let r;Et(r=At())&&(n._tooltip=r.first)}},hostAttrs:["aria-hidden","true"],hostVars:2,hostBindings:function(e,n){1&e&&Ue("mouseleave",function(s){return n._handleMouseLeave(s)}),2&e&&Yo("zoom",n.isVisible()?1:null)},features:[lt],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&&(W(0,"div",0,1),Ue("animationend",function(s){return n._handleAnimationEnd(s)}),W(2,"div",2),Ve(3),j()()),2&e&&(un("mdc-tooltip--multiline",n._isMultiline),U("ngClass",n.tooltipClass),G(3),_i(n.message))},dependencies:[hm],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})(),FV=(()=>{class i{}return i.\u0275fac=function(e){return new(e||i)},i.\u0275mod=nn({type:i}),i.\u0275inj=Kt({providers:[IJ],imports:[BU,Ao,Pm,Qn,Qn,Xy]}),i})();function LV(...i){const t=w0(i),{args:e,keys:n}=VB(i),r=new In(s=>{const{length:o}=e;if(!o)return void s.complete();const a=new Array(o);let l=o,c=o;for(let d=0;d{h||(h=!0,c--),a[d]=p},()=>l--,void 0,()=>{(!l||!h)&&(c||s.next(n?zB(n,a):a),s.complete())}))}});return t?r.pipe(JT(t)):r}class uR{}class uu{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 uu?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 uu;return e.lazyInit=this.lazyInit&&this.lazyInit instanceof uu?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 zJ{encodeKey(t){return BV(t)}encodeValue(t){return BV(t)}decodeKey(t){return decodeURIComponent(t)}decodeValue(t){return decodeURIComponent(t)}}const GJ=/%(\d[a-f0-9])/gi,$J={40:"@","3A":":",24:"$","2C":",","3B":";","3D":"=","3F":"?","2F":"/"};function BV(i){return encodeURIComponent(i).replace(GJ,(t,e)=>$J[e]??t)}function QM(i){return`${i}`}class hu{constructor(t={}){if(this.updates=null,this.cloneFrom=null,this.encoder=t.encoder||new zJ,t.fromString){if(t.fromObject)throw new Error("Cannot specify both fromString and fromObject.");this.map=function HJ(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 hu({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 WJ{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 UV(i){return typeof ArrayBuffer<"u"&&i instanceof ArrayBuffer}function VV(i){return typeof Blob<"u"&&i instanceof Blob}function zV(i){return typeof FormData<"u"&&i instanceof FormData}class rb{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 jJ(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 uu),this.context||(this.context=new WJ),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 rb(e,n,s,{params:c,headers:l,context:d,reportProgress:a,responseType:r,withCredentials:o})}}var ls=(()=>((ls=ls||{})[ls.Sent=0]="Sent",ls[ls.UploadProgress=1]="UploadProgress",ls[ls.ResponseHeader=2]="ResponseHeader",ls[ls.DownloadProgress=3]="DownloadProgress",ls[ls.Response=4]="Response",ls[ls.User=5]="User",ls))();class qJ{constructor(t,e=200,n="OK"){this.headers=t.headers||new uu,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 hR extends qJ{constructor(t={}){super(t),this.type=ls.Response,this.body=void 0!==t.body?t.body:null}clone(t={}){return new hR({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 fR(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 pR=(()=>{class i{constructor(e){this.handler=e}request(e,n,r={}){let s;if(e instanceof rb)s=e;else{let l,c;l=r.headers instanceof uu?r.headers:new uu(r.headers),r.params&&(c=r.params instanceof hu?r.params:new hu({fromObject:r.params})),s=new rb(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=ht(s).pipe(ru(l=>this.handler.handle(l)));if(e instanceof rb||"events"===r.observe)return o;const a=o.pipe(gn(l=>l instanceof hR));switch(r.observe||"body"){case"body":switch(s.responseType){case"arraybuffer":return a.pipe(et(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(et(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(et(l=>{if(null!==l.body&&"string"!=typeof l.body)throw new Error("Response is not a string.");return l.body}));default:return a.pipe(et(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 hu).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,fR(r,n))}post(e,n,r={}){return this.request("POST",e,fR(r,n))}put(e,n,r={}){return this.request("PUT",e,fR(r,n))}}return i.\u0275fac=function(e){return new(e||i)(ee(uR))},i.\u0275prov=ke({token:i,factory:i.\u0275fac}),i})();const aee=["*"];let eC;function sb(i){return function lee(){if(void 0===eC&&(eC=null,typeof window<"u")){const i=window;void 0!==i.trustedTypes&&(eC=i.trustedTypes.createPolicy("angular#components",{createHTML:t=>t}))}return eC}()?.createHTML(i)||i}function XV(i){return Error(`Unable to find icon with the name "${i}"`)}function KV(i){return Error(`The URL provided to MatIconRegistry was not trusted as a resource URL via Angular's DomSanitizer. Attempted URL was "${i}".`)}function ZV(i){return Error(`The literal provided to MatIconRegistry was not trusted as safe HTML by Angular's DomSanitizer. Attempted literal was "${i}".`)}class Vh{constructor(t,e,n){this.url=t,this.svgText=e,this.options=n}}let tC=(()=>{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 Vh(r,null,s))}addSvgIconResolver(e){return this._resolvers.push(e),this}addSvgIconLiteralInNamespace(e,n,r,s){const o=this._sanitizer.sanitize(Kn.HTML,r);if(!o)throw ZV(r);const a=sb(o);return this._addSvgIconConfig(e,n,new Vh("",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 Vh(n,null,r))}addSvgIconSetLiteralInNamespace(e,n,r){const s=this._sanitizer.sanitize(Kn.HTML,n);if(!s)throw ZV(n);const o=sb(s);return this._addSvgIconSetConfig(e,new Vh("",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(Kn.RESOURCE_URL,e);if(!n)throw KV(e);const r=this._cachedIconsByUrl.get(n);return r?ht(nC(r)):this._loadSvgIconFromConfig(new Vh(e,null)).pipe(Ui(s=>this._cachedIconsByUrl.set(n,s)),et(s=>nC(s)))}getNamedSvgIcon(e,n=""){const r=QV(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(XV(r))}ngOnDestroy(){this._resolvers=[],this._svgIconConfigs.clear(),this._iconSetConfigs.clear(),this._cachedIconsByUrl.clear()}_getSvgFromConfig(e){return e.svgText?ht(nC(this._svgElementFromConfig(e))):this._loadSvgIconFromConfig(e).pipe(et(n=>nC(n)))}_getSvgFromIconSetConfigs(e,n){const r=this._extractIconWithNameFromAnySet(e,n);return r?ht(r):LV(n.filter(o=>!o.svgText).map(o=>this._loadSvgIconSetFromConfig(o).pipe(Wc(a=>{const c=`Loading icon set URL: ${this._sanitizer.sanitize(Kn.RESOURCE_URL,o.url)} failed: ${a.message}`;return this._errorHandler.handleError(new Error(c)),ht(null)})))).pipe(et(()=>{const o=this._extractIconWithNameFromAnySet(e,n);if(!o)throw XV(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(Ui(n=>e.svgText=n),et(()=>this._svgElementFromConfig(e)))}_loadSvgIconSetFromConfig(e){return e.svgText?ht(null):this._fetchIcon(e).pipe(Ui(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(sb(""));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(sb("")),r=e.attributes;for(let s=0;ssb(c)),su(()=>this._inProgressUrlFetches.delete(o)),Uf());return this._inProgressUrlFetches.set(o,l),l}_addSvgIconConfig(e,n,r){return this._svgIconConfigs.set(QV(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:""}}}),JV=["clip-path","color-profile","src","cursor","fill","filter","marker","marker-start","marker-mid","marker-end","mask","stroke"],gee=JV.map(i=>`[${i}]`).join(", "),_ee=/^url\(['"]?#(.*?)['"]?\)$/;let gR=(()=>{class i extends hee{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=Zt.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(gee),r=this._elementsWithExternalReferences=this._elementsWithExternalReferences||new Map;for(let s=0;s{const a=n[s],l=a.getAttribute(o),c=l?l.match(_ee):null;if(c){let d=r.get(a);d||(d=[],r.set(a,d)),d.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(Pi(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)(E(mt),E(tC),ba("aria-hidden"),E(pee),E(al),E(fee,8))},i.\u0275cmp=ot({type:i,selectors:[["mat-icon"]],hostAttrs:["role","img",1,"mat-icon","notranslate"],hostVars:8,hostBindings:function(e,n){2&e&&(Dt("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),un("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:[lt],ngContentSelectors:aee,decls:1,vars:0,template:function(e,n){1&e&&(sr(),Wt(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})(),ez=(()=>{class i{}return i.\u0275fac=function(e){return new(e||i)},i.\u0275mod=nn({type:i}),i.\u0275inj=Kt({imports:[Qn,Qn]}),i})(),tz=(()=>{class i{constructor(e){this.viewContainerRef=e}}return i.\u0275fac=function(e){return new(e||i)(E(Wr))},i.\u0275dir=ve({type:i,selectors:[["","dataBlockUI",""]]}),i})(),vee=(()=>{class i{constructor(){this.resource=null,this.name="",this.resourceDescription="",this.changed=new We}}return i.\u0275fac=function(e){return new(e||i)},i.\u0275cmp=ot({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&&(W(0,"p",0),Ve(1),j()),2&e&&(U("matTooltip",n.resourceDescription),G(1),tm("",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:[Os],changeDetection:0}),i})();function yee(i,t){if(1&i&&(W(0,"h2",4),Ve(1),j()),2&i){const e=he();U("matTooltip",e.resourceDescription),G(1),_i(e.name)}}function bee(i,t){1&i&&De(0,"app-block-actions",5),2&i&&U("resource",he().resource)}const xee=function(i,t,e,n){return{id:i,name:t,data:e,schema:n}};function wee(i,t){if(1&i&&De(0,"app-editor",7),2&i){const e=he().$implicit,n=he();U("resource",L2(3,xee,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 Mee(i,t){if(1&i&&(Gr(0),fe(1,wee,1,8,"app-editor",6),Ct(2,"async"),$r()),2&i){const e=t.$implicit,n=he();G(1),U("ngIf",!(Tt(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 Jl=(()=>{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 We,this.destroyed$=new Re}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(He(this.destroyed$),gn(([n,r])=>!!this.resource&&n.startsWith(this.resource.id)&&!n.substring(this.resource.id.length+1).includes("/"))).subscribe(function(){var n=tt(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)(E(Pa))},i.\u0275cmp=ot({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&&(fe(0,yee,2,2,"h2",0),Ct(1,"async"),fe(2,bee,1,1,"app-block-actions",1),W(3,"div",2),fe(4,Mee,3,3,"ng-container",3),j()),2&e){let r;U("ngIf",n.name&&n.name!=(null==(r=Tt(1,4,n.main.resource$))?null:r.name)),G(2),U("ngIf",!n.hideBlockActions),G(2),U("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})(),nz=(()=>{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)(E(ol),E(mt))},i.\u0275dir=ve({type:i}),i})(),zh=(()=>{class i extends nz{}return i.\u0275fac=function(){let t;return function(n){return(t||(t=ri(i)))(n||i)}}(),i.\u0275dir=ve({type:i,features:[lt]}),i})();const To=new me("NgValueAccessor"),See={provide:To,useExisting:Gn(()=>gl),multi:!0},Aee=new me("CompositionEventMode");let gl=(()=>{class i extends nz{constructor(e,n,r){super(e,n),this._compositionMode=r,this._composing=!1,null==this._compositionMode&&(this._compositionMode=!function Eee(){const i=Hc()?Hc().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)(E(ol),E(mt),E(Aee,8))},i.\u0275dir=ve({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&&Ue("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:[Dn([See]),lt]}),i})();const Dee=!1;function fu(i){return null==i||("string"==typeof i||Array.isArray(i))&&0===i.length}function rz(i){return null!=i&&"number"==typeof i.length}const Yr=new me("NgValidators"),pu=new me("NgAsyncValidators"),Tee=/^(?=.{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 _l{static min(t){return sz(t)}static max(t){return oz(t)}static required(t){return function az(i){return fu(i.value)?{required:!0}:null}(t)}static requiredTrue(t){return function lz(i){return!0===i.value?null:{required:!0}}(t)}static email(t){return function cz(i){return fu(i.value)||Tee.test(i.value)?null:{email:!0}}(t)}static minLength(t){return dz(t)}static maxLength(t){return uz(t)}static pattern(t){return function hz(i){if(!i)return iC;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(fu(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 vz(t)}static composeAsync(t){return yz(t)}}function sz(i){return t=>{if(fu(t.value)||fu(i))return null;const e=parseFloat(t.value);return!isNaN(e)&&e{if(fu(t.value)||fu(i))return null;const e=parseFloat(t.value);return!isNaN(e)&&e>i?{max:{max:i,actual:t.value}}:null}}function dz(i){return t=>fu(t.value)||!rz(t.value)?null:t.value.lengthrz(t.value)&&t.value.length>i?{maxlength:{requiredLength:i,actualLength:t.value.length}}:null}function iC(i){return null}function fz(i){return null!=i}function pz(i){const t=oy(i)?Li(i):i;if(Dee&&!L1(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 pe(-1101,e)}return t}function mz(i){let t={};return i.forEach(e=>{t=null!=e?{...t,...e}:t}),0===Object.keys(t).length?null:t}function gz(i,t){return t.map(e=>e(i))}function _z(i){return i.map(t=>function Iee(i){return!i.validate}(t)?t:e=>t.validate(e))}function vz(i){if(!i)return null;const t=i.filter(fz);return 0==t.length?null:function(e){return mz(gz(e,t))}}function _R(i){return null!=i?vz(_z(i)):null}function yz(i){if(!i)return null;const t=i.filter(fz);return 0==t.length?null:function(e){return LV(gz(e,t).map(pz)).pipe(et(mz))}}function vR(i){return null!=i?yz(_z(i)):null}function bz(i,t){return null===i?[t]:Array.isArray(i)?[...i,t]:[i,t]}function xz(i){return i._rawValidators}function wz(i){return i._rawAsyncValidators}function yR(i){return i?Array.isArray(i)?i:[i]:[]}function rC(i,t){return Array.isArray(i)?i.includes(t):i===t}function Mz(i,t){const e=yR(t);return yR(i).forEach(r=>{rC(e,r)||e.push(r)}),e}function Cz(i,t){return yR(t).filter(e=>!rC(i,e))}class Sz{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=_R(this._rawValidators)}_setAsyncValidators(t){this._rawAsyncValidators=t||[],this._composedAsyncValidatorFn=vR(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 lo extends Sz{get formDirective(){return null}get path(){return null}}class ec extends Sz{constructor(){super(...arguments),this._parent=null,this.name=null,this.valueAccessor=null}}class Ez{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 tc=(()=>{class i extends Ez{constructor(e){super(e)}}return i.\u0275fac=function(e){return new(e||i)(E(ec,2))},i.\u0275dir=ve({type:i,selectors:[["","formControlName",""],["","ngModel",""],["","formControl",""]],hostVars:14,hostBindings:function(e,n){2&e&&un("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:[lt]}),i})(),bR=(()=>{class i extends Ez{constructor(e){super(e)}}return i.\u0275fac=function(e){return new(e||i)(E(lo,10))},i.\u0275dir=ve({type:i,selectors:[["","formGroupName",""],["","formArrayName",""],["","ngModelGroup",""],["","formGroup",""],["form",3,"ngNoForm",""],["","ngForm",""]],hostVars:16,hostBindings:function(e,n){2&e&&un("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:[lt]}),i})();function Az(i,t){return i?`with name: '${t}'`:`at index: ${t}`}const MR=!1,ob="VALID",oC="INVALID",zm="PENDING",ab="DISABLED";function CR(i){return(aC(i)?i.validators:i)||null}function SR(i,t){return(aC(t)?t.asyncValidators:i)||null}function aC(i){return null!=i&&!Array.isArray(i)&&"object"==typeof i}function Dz(i,t,e){const n=i.controls;if(!(t?Object.keys(n):n).length)throw new pe(1e3,MR?function Oee(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 pe(1001,MR?function Fee(i,t){return`Cannot find form control ${Az(i,t)}`}(t,e):"")}function Tz(i,t,e){i._forEachChild((n,r)=>{if(void 0===e[r])throw new pe(1002,MR?function Lee(i,t){return`Must supply a value for form control ${Az(i,t)}`}(t,r):"")})}class lC{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===ob}get invalid(){return this.status===oC}get pending(){return this.status==zm}get disabled(){return this.status===ab}get enabled(){return this.status!==ab}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(Mz(t,this._rawValidators))}addAsyncValidators(t){this.setAsyncValidators(Mz(t,this._rawAsyncValidators))}removeValidators(t){this.setValidators(Cz(t,this._rawValidators))}removeAsyncValidators(t){this.setAsyncValidators(Cz(t,this._rawAsyncValidators))}hasValidator(t){return rC(this._rawValidators,t)}hasAsyncValidator(t){return rC(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=ab,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=ob,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===ob||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()?ab:ob}_runValidator(){return this.validator?this.validator(this):null}_runAsyncValidator(t){if(this.asyncValidator){this.status=zm,this._hasOwnPendingAsyncValidator=!0;const e=pz(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 We,this.statusChanges=new We}_calculateStatus(){return this._allControlsDisabled()?ab:this.errors?oC:this._hasOwnPendingAsyncValidator||this._anyControlsHaveStatus(zm)?zm:this._anyControlsHaveStatus(oC)?oC:ob}_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){aC(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 Nee(i){return Array.isArray(i)?_R(i):i||null}(this._rawValidators)}_assignAsyncValidators(t){this._rawAsyncValidators=Array.isArray(t)?t.slice():t,this._composedAsyncValidatorFn=function Bee(i){return Array.isArray(i)?vR(i):i||null}(this._rawAsyncValidators)}}class Hm extends lC{constructor(t,e,n){super(CR(e),SR(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={}){Tz(this,!0,t),Object.keys(t).forEach(n=>{Dz(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 Iz extends Hm{}const Hh=new me("CallSetDisabledState",{providedIn:"root",factory:()=>lb}),lb="always";function cC(i,t){return[...t.path,i]}function cb(i,t,e=lb){ER(i,t),t.valueAccessor.writeValue(i.value),(i.disabled||"always"===e)&&t.valueAccessor.setDisabledState?.(i.disabled),function Vee(i,t){t.valueAccessor.registerOnChange(e=>{i._pendingValue=e,i._pendingChange=!0,i._pendingDirty=!0,"change"===i.updateOn&&Rz(i,t)})}(i,t),function Hee(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 zee(i,t){t.valueAccessor.registerOnTouched(()=>{i._pendingTouched=!0,"blur"===i.updateOn&&i._pendingChange&&Rz(i,t),"submit"!==i.updateOn&&i.markAsTouched()})}(i,t),function Uee(i,t){if(t.valueAccessor.setDisabledState){const e=n=>{t.valueAccessor.setDisabledState(n)};i.registerOnDisabledChange(e),t._registerOnDestroy(()=>{i._unregisterOnDisabledChange(e)})}}(i,t)}function dC(i,t,e=!0){const n=()=>{};t.valueAccessor&&(t.valueAccessor.registerOnChange(n),t.valueAccessor.registerOnTouched(n)),hC(i,t),i&&(t._invokeOnDestroyCallbacks(),i._registerOnCollectionChange(()=>{}))}function uC(i,t){i.forEach(e=>{e.registerOnValidatorChange&&e.registerOnValidatorChange(t)})}function ER(i,t){const e=xz(i);null!==t.validator?i.setValidators(bz(e,t.validator)):"function"==typeof e&&i.setValidators([e]);const n=wz(i);null!==t.asyncValidator?i.setAsyncValidators(bz(n,t.asyncValidator)):"function"==typeof n&&i.setAsyncValidators([n]);const r=()=>i.updateValueAndValidity();uC(t._rawValidators,r),uC(t._rawAsyncValidators,r)}function hC(i,t){let e=!1;if(null!==i){if(null!==t.validator){const r=xz(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=wz(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 uC(t._rawValidators,n),uC(t._rawAsyncValidators,n),e}function Rz(i,t){i._pendingDirty&&i.markAsDirty(),i.setValue(i._pendingValue,{emitModelToViewChange:!1}),t.viewToModelUpdate(i._pendingValue),i._pendingChange=!1}function kz(i,t){ER(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 Pz(i,t){i._syncPendingControls(),t.forEach(e=>{const n=e.control;"submit"===n.updateOn&&n._pendingChange&&(e.viewToModelUpdate(n._pendingValue),n._pendingChange=!1)})}function TR(i,t){if(!t)return null;let e,n,r;return Array.isArray(t),t.forEach(s=>{s.constructor===gl?e=s:function Wee(i){return Object.getPrototypeOf(i.constructor)===zh}(s)?n=s:r=s}),r||n||e||null}const Yee={provide:lo,useExisting:Gn(()=>ub)},db=(()=>Promise.resolve())();let ub=(()=>{class i extends lo{constructor(e,n,r){super(),this.callSetDisabledState=r,this.submitted=!1,this._directives=new Set,this.ngSubmit=new We,this.form=new Hm({},_R(e),vR(n))}ngAfterViewInit(){this._setUpdateStrategy()}get formDirective(){return this}get control(){return this.form}get path(){return[]}get controls(){return this.form.controls}addControl(e){db.then(()=>{const n=this._findContainer(e.path);e.control=n.registerControl(e.name,e.control),cb(e.control,e,this.callSetDisabledState),e.control.updateValueAndValidity({emitEvent:!1}),this._directives.add(e)})}getControl(e){return this.form.get(e.path)}removeControl(e){db.then(()=>{const n=this._findContainer(e.path);n&&n.removeControl(e.name),this._directives.delete(e)})}addFormGroup(e){db.then(()=>{const n=this._findContainer(e.path),r=new Hm({});kz(r,e),n.registerControl(e.name,r),r.updateValueAndValidity({emitEvent:!1})})}removeFormGroup(e){db.then(()=>{const n=this._findContainer(e.path);n&&n.removeControl(e.name)})}getFormGroup(e){return this.form.get(e.path)}updateModel(e,n){db.then(()=>{this.form.get(e.path).setValue(n)})}setValue(e){this.control.setValue(e)}onSubmit(e){return this.submitted=!0,Pz(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)(E(Yr,10),E(pu,10),E(Hh,8))},i.\u0275dir=ve({type:i,selectors:[["form",3,"ngNoForm","",3,"formGroup",""],["ng-form"],["","ngForm",""]],hostBindings:function(e,n){1&e&&Ue("submit",function(s){return n.onSubmit(s)})("reset",function(){return n.onReset()})},inputs:{options:["ngFormOptions","options"]},outputs:{ngSubmit:"ngSubmit"},exportAs:["ngForm"],features:[Dn([Yee]),lt]}),i})();function Oz(i,t){const e=i.indexOf(t);e>-1&&i.splice(e,1)}function Fz(i){return"object"==typeof i&&null!==i&&2===Object.keys(i).length&&"value"in i&&"disabled"in i}const nc=class extends lC{constructor(t=null,e,n){super(CR(e),SR(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}),aC(e)&&(e.nonNullable||e.initialValueIsDefault)&&(this.defaultValue=Fz(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){Oz(this._onChange,t)}registerOnDisabledChange(t){this._onDisabledChange.push(t)}_unregisterOnDisabledChange(t){Oz(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){Fz(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}},Kee={provide:ec,useExisting:Gn(()=>Kc)},Bz=(()=>Promise.resolve())();let Kc=(()=>{class i extends ec{constructor(e,n,r,s,o,a){super(),this._changeDetectorRef=o,this.callSetDisabledState=a,this.control=new nc,this._registered=!1,this.update=new We,this._parent=e,this._setValidators(n),this._setAsyncValidators(r),this.valueAccessor=TR(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(){cb(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){Bz.then(()=>{this.control.setValue(e,{emitViewToModelChange:!1}),this._changeDetectorRef?.markForCheck()})}_updateDisabled(e){const n=e.isDisabled.currentValue,r=0!==n&&function um(i){return"boolean"==typeof i?i:null!=i&&"false"!==i}(n);Bz.then(()=>{r&&!this.control.disabled?this.control.disable():!r&&this.control.disabled&&this.control.enable(),this._changeDetectorRef?.markForCheck()})}_getPath(e){return this._parent?cC(e,this._parent):[e]}}return i.\u0275fac=function(e){return new(e||i)(E(lo,9),E(Yr,10),E(pu,10),E(To,10),E(Zn,8),E(Hh,8))},i.\u0275dir=ve({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:[Dn([Kee]),lt,bi]}),i})(),IR=(()=>{class i{}return i.\u0275fac=function(e){return new(e||i)},i.\u0275dir=ve({type:i,selectors:[["form",3,"ngNoForm","",3,"ngNativeValidate",""]],hostAttrs:["novalidate",""]}),i})();const Zee={provide:To,useExisting:Gn(()=>mu),multi:!0};let mu=(()=>{class i extends zh{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=ri(i)))(n||i)}}(),i.\u0275dir=ve({type:i,selectors:[["input","type","number","formControlName",""],["input","type","number","formControl",""],["input","type","number","ngModel",""]],hostBindings:function(e,n){1&e&&Ue("input",function(s){return n.onChange(s.target.value)})("blur",function(){return n.onTouched()})},features:[Dn([Zee]),lt]}),i})(),Uz=(()=>{class i{}return i.\u0275fac=function(e){return new(e||i)},i.\u0275mod=nn({type:i}),i.\u0275inj=Kt({}),i})();const RR=new me("NgModelWithFormControlWarning"),nte={provide:lo,useExisting:Gn(()=>Gh)};let Gh=(()=>{class i extends lo{constructor(e,n,r){super(),this.callSetDisabledState=r,this.submitted=!1,this._onCollectionChange=()=>this._updateDomValue(),this.directives=[],this.form=null,this.ngSubmit=new We,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&&(hC(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 cb(n,e,this.callSetDisabledState),n.updateValueAndValidity({emitEvent:!1}),this.directives.push(e),n}getControl(e){return this.form.get(e.path)}removeControl(e){dC(e.control||null,e,!1),function jee(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,Pz(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&&(dC(n||null,e),(i=>i instanceof nc)(r)&&(cb(r,e,this.callSetDisabledState),e.control=r))}),this.form._updateTreeValidity({emitEvent:!1})}_setUpFormContainer(e){const n=this.form.get(e.path);kz(n,e),n.updateValueAndValidity({emitEvent:!1})}_cleanUpFormContainer(e){if(this.form){const n=this.form.get(e.path);n&&function Gee(i,t){return hC(i,t)}(n,e)&&n.updateValueAndValidity({emitEvent:!1})}}_updateRegistrations(){this.form._registerOnCollectionChange(this._onCollectionChange),this._oldForm&&this._oldForm._registerOnCollectionChange(()=>{})}_updateValidators(){ER(this.form,this),this._oldForm&&hC(this._oldForm,this)}_checkFormPresent(){}}return i.\u0275fac=function(e){return new(e||i)(E(Yr,10),E(pu,10),E(Hh,8))},i.\u0275dir=ve({type:i,selectors:[["","formGroup",""]],hostBindings:function(e,n){1&e&&Ue("submit",function(s){return n.onSubmit(s)})("reset",function(){return n.onReset()})},inputs:{form:["formGroup","form"]},outputs:{ngSubmit:"ngSubmit"},exportAs:["ngForm"],features:[Dn([nte]),lt,bi]}),i})();const ste={provide:ec,useExisting:Gn(()=>fC)};let fC=(()=>{class i extends ec{set isDisabled(e){}constructor(e,n,r,s,o){super(),this._ngModelWarningConfig=o,this._added=!1,this.update=new We,this._ngModelWarningSent=!1,this._parent=e,this._setValidators(n),this._setAsyncValidators(r),this.valueAccessor=TR(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 cC(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)(E(lo,13),E(Yr,10),E(pu,10),E(To,10),E(RR,8))},i.\u0275dir=ve({type:i,selectors:[["","formControlName",""]],inputs:{name:["formControlName","name"],isDisabled:["disabled","isDisabled"],model:["ngModel","model"]},outputs:{update:"ngModelChange"},features:[Dn([ste]),lt,bi]}),i})();function jz(i){return"number"==typeof i?i:parseInt(i,10)}function Yz(i){return"number"==typeof i?i:parseFloat(i)}let $h=(()=>{class i{constructor(){this._validator=iC}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):iC,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=ve({type:i,features:[bi]}),i})();const hte={provide:Yr,useExisting:Gn(()=>gu),multi:!0};let gu=(()=>{class i extends $h{constructor(){super(...arguments),this.inputName="max",this.normalizeInput=e=>Yz(e),this.createValidator=e=>oz(e)}}return i.\u0275fac=function(){let t;return function(n){return(t||(t=ri(i)))(n||i)}}(),i.\u0275dir=ve({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&&Dt("max",n._enabled?n.max:null)},inputs:{max:"max"},features:[Dn([hte]),lt]}),i})();const fte={provide:Yr,useExisting:Gn(()=>_u),multi:!0};let _u=(()=>{class i extends $h{constructor(){super(...arguments),this.inputName="min",this.normalizeInput=e=>Yz(e),this.createValidator=e=>sz(e)}}return i.\u0275fac=function(){let t;return function(n){return(t||(t=ri(i)))(n||i)}}(),i.\u0275dir=ve({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&&Dt("min",n._enabled?n.min:null)},inputs:{min:"min"},features:[Dn([fte]),lt]}),i})();const _te={provide:Yr,useExisting:Gn(()=>NR),multi:!0};let NR=(()=>{class i extends $h{constructor(){super(...arguments),this.inputName="minlength",this.normalizeInput=e=>jz(e),this.createValidator=e=>dz(e)}}return i.\u0275fac=function(){let t;return function(n){return(t||(t=ri(i)))(n||i)}}(),i.\u0275dir=ve({type:i,selectors:[["","minlength","","formControlName",""],["","minlength","","formControl",""],["","minlength","","ngModel",""]],hostVars:1,hostBindings:function(e,n){2&e&&Dt("minlength",n._enabled?n.minlength:null)},inputs:{minlength:"minlength"},features:[Dn([_te]),lt]}),i})();const vte={provide:Yr,useExisting:Gn(()=>BR),multi:!0};let BR=(()=>{class i extends $h{constructor(){super(...arguments),this.inputName="maxlength",this.normalizeInput=e=>jz(e),this.createValidator=e=>uz(e)}}return i.\u0275fac=function(){let t;return function(n){return(t||(t=ri(i)))(n||i)}}(),i.\u0275dir=ve({type:i,selectors:[["","maxlength","","formControlName",""],["","maxlength","","formControl",""],["","maxlength","","ngModel",""]],hostVars:1,hostBindings:function(e,n){2&e&&Dt("maxlength",n._enabled?n.maxlength:null)},inputs:{maxlength:"maxlength"},features:[Dn([vte]),lt]}),i})(),Zz=(()=>{class i{}return i.\u0275fac=function(e){return new(e||i)},i.\u0275mod=nn({type:i}),i.\u0275inj=Kt({imports:[Uz]}),i})();class Qz extends lC{constructor(t,e,n){super(CR(e),SR(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={}){Tz(this,!1,t),t.forEach((n,r)=>{Dz(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 Jz(i){return!!i&&(void 0!==i.asyncValidators||void 0!==i.validators||void 0!==i.updateOn)}let bte=(()=>{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 Jz(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 Iz(r,n)}control(e,n,r){let s={};return this.useNonNullable?(Jz(n)?s=n:(s.validators=n,s.asyncValidators=r),new nc(e,{...s,nonNullable:!0})):new nc(e,n,r)}array(e,n,r){const s=e.map(o=>this._createControl(o));return new Qz(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 nc||e instanceof lC?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=ke({token:i,factory:i.\u0275fac,providedIn:"root"}),i})(),eH=(()=>{class i{static withConfig(e){return{ngModule:i,providers:[{provide:Hh,useValue:e.callSetDisabledState??lb}]}}}return i.\u0275fac=function(e){return new(e||i)},i.\u0275mod=nn({type:i}),i.\u0275inj=Kt({imports:[Zz]}),i})(),tH=(()=>{class i{static withConfig(e){return{ngModule:i,providers:[{provide:RR,useValue:e.warnOnNgModelWithFormControl??"always"},{provide:Hh,useValue:e.callSetDisabledState??lb}]}}}return i.\u0275fac=function(e){return new(e||i)},i.\u0275mod=nn({type:i}),i.\u0275inj=Kt({imports:[Zz]}),i})();const xte=["matFormFieldNotchedOutline",""],wte=["*"],Mte=["textField"],Cte=["iconPrefixContainer"],Ste=["textPrefixContainer"];function Ete(i,t){1&i&&De(0,"span",19)}function Ate(i,t){if(1&i){const e=di();W(0,"label",17),Ue("cdkObserveContent",function(){return an(e),zt(he(2)._refreshOutlineNotchWidth())}),Wt(1,1),fe(2,Ete,1,0,"span",18),j()}if(2&i){const e=he(2);U("floating",e._shouldLabelFloat())("cdkObserveContentDisabled",!e._hasOutline())("id",e._labelId),Dt("for",e._control.id)("aria-owns",e._control.id),G(2),U("ngIf",!e.hideRequiredMarker&&e._control.required)}}function Dte(i,t){1&i&&fe(0,Ate,3,6,"label",16),2&i&&U("ngIf",he()._hasFloatingLabel())}function Tte(i,t){1&i&&De(0,"div",20)}function Ite(i,t){}function Rte(i,t){1&i&&fe(0,Ite,0,0,"ng-template",22),2&i&&(he(2),U("ngTemplateOutlet",Ki(1)))}function kte(i,t){if(1&i&&(W(0,"div",21),fe(1,Rte,1,1,"ng-template",9),j()),2&i){const e=he();U("matFormFieldNotchedOutlineOpen",e._shouldLabelFloat())("matFormFieldNotchedOutlineLabelWidth",e._labelWidth),G(1),U("ngIf",!e._forceDisplayInfixLabel())}}function Pte(i,t){1&i&&(W(0,"div",23,24),Wt(2,2),j())}function Ote(i,t){1&i&&(W(0,"div",25,26),Wt(2,3),j())}function Fte(i,t){}function Lte(i,t){1&i&&fe(0,Fte,0,0,"ng-template",22),2&i&&(he(),U("ngTemplateOutlet",Ki(1)))}function Nte(i,t){1&i&&(W(0,"div",27),Wt(1,4),j())}function Bte(i,t){1&i&&(W(0,"div",28),Wt(1,5),j())}function Ute(i,t){1&i&&De(0,"div",29)}function Vte(i,t){1&i&&(W(0,"div",30),Wt(1,6),j()),2&i&&U("@transitionMessages",he()._subscriptAnimationState)}function zte(i,t){if(1&i&&(W(0,"mat-hint",34),Ve(1),j()),2&i){const e=he(2);U("id",e._hintLabelId),G(1),_i(e.hintLabel)}}function Hte(i,t){if(1&i&&(W(0,"div",31),fe(1,zte,2,2,"mat-hint",32),Wt(2,7),De(3,"div",33),Wt(4,8),j()),2&i){const e=he();U("@transitionMessages",e._subscriptAnimationState),G(1),U("ngIf",e.hintLabel)}}const Gte=["*",[["mat-label"]],[["","matPrefix",""],["","matIconPrefix",""]],[["","matTextPrefix",""]],[["","matTextSuffix",""]],[["","matSuffix",""],["","matIconSuffix",""]],[["mat-error"],["","matError",""]],[["mat-hint",3,"align","end"]],[["mat-hint","align","end"]]],$te=["*","mat-label","[matPrefix], [matIconPrefix]","[matTextPrefix]","[matTextSuffix]","[matSuffix], [matIconSuffix]","mat-error, [matError]","mat-hint:not([align='end'])","mat-hint[align='end']"];let Io=(()=>{class i{}return i.\u0275fac=function(e){return new(e||i)},i.\u0275dir=ve({type:i,selectors:[["mat-label"]]}),i})(),Wte=0;const nH=new me("MatError");let jte=(()=>{class i{constructor(e,n){this.id="mat-mdc-error-"+Wte++,e||n.nativeElement.setAttribute("aria-live","polite")}}return i.\u0275fac=function(e){return new(e||i)(ba("aria-live"),E(mt))},i.\u0275dir=ve({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&&Yl("id",n.id)},inputs:{id:"id"},features:[Dn([{provide:nH,useExisting:i}])]}),i})(),Yte=0,iH=(()=>{class i{constructor(){this.align="start",this.id="mat-mdc-hint-"+Yte++}}return i.\u0275fac=function(e){return new(e||i)},i.\u0275dir=ve({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&&(Yl("id",n.id),Dt("align",null),un("mat-mdc-form-field-hint-end","end"===n.align))},inputs:{align:"align",id:"id"}}),i})();const rH=new me("MatPrefix");let qte=(()=>{class i{constructor(){this._isText=!1}set _isTextSelector(e){this._isText=!0}}return i.\u0275fac=function(e){return new(e||i)},i.\u0275dir=ve({type:i,selectors:[["","matPrefix",""],["","matIconPrefix",""],["","matTextPrefix",""]],inputs:{_isTextSelector:["matTextPrefix","_isTextSelector"]},features:[Dn([{provide:rH,useExisting:i}])]}),i})();const sH=new me("MatSuffix");let Xte=(()=>{class i{constructor(){this._isText=!1}set _isTextSelector(e){this._isText=!0}}return i.\u0275fac=function(e){return new(e||i)},i.\u0275dir=ve({type:i,selectors:[["","matSuffix",""],["","matIconSuffix",""],["","matTextSuffix",""]],inputs:{_isTextSelector:["matTextSuffix","_isTextSelector"]},features:[Dn([{provide:sH,useExisting:i}])]}),i})(),oH=(()=>{class i{constructor(e){this._elementRef=e,this.floating=!1}getWidth(){return function Kte(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)(E(mt))},i.\u0275dir=ve({type:i,selectors:[["label","matFormFieldFloatingLabel",""]],hostAttrs:[1,"mdc-floating-label","mat-mdc-floating-label"],hostVars:2,hostBindings:function(e,n){2&e&&un("mdc-floating-label--float-above",n.floating)},inputs:{floating:"floating"}}),i})();const aH="mdc-line-ripple--active",pC="mdc-line-ripple--deactivating";let lH=(()=>{class i{constructor(e,n){this._elementRef=e,this._handleTransitionEnd=r=>{const s=this._elementRef.nativeElement.classList,o=s.contains(pC);"opacity"===r.propertyName&&o&&s.remove(aH,pC)},n.runOutsideAngular(()=>{e.nativeElement.addEventListener("transitionend",this._handleTransitionEnd)})}activate(){const e=this._elementRef.nativeElement.classList;e.remove(pC),e.add(aH)}deactivate(){this._elementRef.nativeElement.classList.add(pC)}ngOnDestroy(){this._elementRef.nativeElement.removeEventListener("transitionend",this._handleTransitionEnd)}}return i.\u0275fac=function(e){return new(e||i)(E(mt),E(ft))},i.\u0275dir=ve({type:i,selectors:[["div","matFormFieldLineRipple",""]],hostAttrs:[1,"mdc-line-ripple"]}),i})(),cH=(()=>{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)(E(mt),E(ft))},i.\u0275cmp=ot({type:i,selectors:[["div","matFormFieldNotchedOutline",""]],hostAttrs:[1,"mdc-notched-outline"],hostVars:2,hostBindings:function(e,n){2&e&&un("mdc-notched-outline--notched",n.open)},inputs:{labelWidth:["matFormFieldNotchedOutlineLabelWidth","labelWidth"],open:["matFormFieldNotchedOutlineOpen","open"]},attrs:xte,ngContentSelectors:wte,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&&(sr(),De(0,"div",0),W(1,"div",1),Wt(2),j(),De(3,"div",2)),2&e&&(G(1),Yo("width",n._getNotchWidth()))},encapsulation:2,changeDetection:0}),i})();const Zte={transitionMessages:ka("transitionMessages",[Ps("enter",si({opacity:1,transform:"translateY(0%)"})),Pr("void => enter",[si({opacity:0,transform:"translateY(-5px)"}),jr("300ms cubic-bezier(0.55, 0, 0.55, 0.2)")])])};let UR=(()=>{class i{}return i.\u0275fac=function(e){return new(e||i)},i.\u0275dir=ve({type:i}),i})();const mC=new me("MatFormField"),Qte=new me("MAT_FORM_FIELD_DEFAULT_OPTIONS");let dH=0,vl=(()=>{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-"+dH++,this._hintLabelId="mat-mdc-hint-"+dH++,this._subscriptAnimationState="",this._labelWidth=0,this._destroyed=new Re,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(He(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(),Mr(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(He(this._destroyed)).subscribe(()=>{this._needsOutlineLabelOffsetUpdateOnStable&&(this._needsOutlineLabelOffsetUpdateOnStable=!1,this._updateOutlineLabelOffset())})}),this._dir.change.pipe(He(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)(E(mt),E(Zn),E(ft),E(Ra),E(Vi),E(Qte,8),E(Rr,8),E(jt))},i.\u0275cmp=ot({type:i,selectors:[["mat-form-field"]],contentQueries:function(e,n,r){if(1&e&&($i(r,Io,5),$i(r,Io,7),$i(r,UR,5),$i(r,rH,5),$i(r,sH,5),$i(r,nH,5),$i(r,iH,5)),2&e){let s;Et(s=At())&&(n._labelChildNonStatic=s.first),Et(s=At())&&(n._labelChildStatic=s.first),Et(s=At())&&(n._formFieldControl=s.first),Et(s=At())&&(n._prefixChildren=s),Et(s=At())&&(n._suffixChildren=s),Et(s=At())&&(n._errorChildren=s),Et(s=At())&&(n._hintChildren=s)}},viewQuery:function(e,n){if(1&e&&(Wn(Mte,5),Wn(Cte,5),Wn(Ste,5),Wn(oH,5),Wn(cH,5),Wn(lH,5)),2&e){let r;Et(r=At())&&(n._textField=r.first),Et(r=At())&&(n._iconPrefixContainer=r.first),Et(r=At())&&(n._textPrefixContainer=r.first),Et(r=At())&&(n._floatingLabel=r.first),Et(r=At())&&(n._notchedOutline=r.first),Et(r=At())&&(n._lineRipple=r.first)}},hostAttrs:[1,"mat-mdc-form-field"],hostVars:42,hostBindings:function(e,n){2&e&&un("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:[Dn([{provide:mC,useExisting:i}])],ngContentSelectors:$te,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&&(sr(Gte),fe(0,Dte,1,1,"ng-template",null,0,Vc),W(2,"div",1,2),Ue("click",function(s){return n._control.onContainerClick&&n._control.onContainerClick(s)}),fe(4,Tte,1,0,"div",3),W(5,"div",4),fe(6,kte,2,3,"div",5),fe(7,Pte,3,0,"div",6),fe(8,Ote,3,0,"div",7),W(9,"div",8),fe(10,Lte,1,1,"ng-template",9),Wt(11),j(),fe(12,Nte,2,0,"div",10),fe(13,Bte,2,0,"div",11),j(),fe(14,Ute,1,0,"div",12),j(),W(15,"div",13),fe(16,Vte,2,1,"div",14),fe(17,Hte,5,2,"div",15),j()),2&e&&(G(2),un("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),G(2),U("ngIf",!n._hasOutline()&&!n._control.disabled),G(2),U("ngIf",n._hasOutline()),G(1),U("ngIf",n._hasIconPrefix),G(1),U("ngIf",n._hasTextPrefix),G(2),U("ngIf",!n._hasOutline()||n._forceDisplayInfixLabel()),G(2),U("ngIf",n._hasTextSuffix),G(1),U("ngIf",n._hasIconSuffix),G(1),U("ngIf",!n._hasOutline()),G(1),un("mat-mdc-form-field-subscript-dynamic-size","dynamic"===n.subscriptSizing),U("ngSwitch",n._getDisplayedMessages()),G(1),U("ngSwitchCase","error"),G(1),U("ngSwitchCase","hint"))},dependencies:[vi,xy,by,VT,CU,iH,oH,cH,lH],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:[Zte.transitionMessages]},changeDetection:0}),i})(),gC=(()=>{class i{}return i.\u0275fac=function(e){return new(e||i)},i.\u0275mod=nn({type:i}),i.\u0275inj=Kt({imports:[Qn,Ao,HI,Qn]}),i})();const fH=Oh({passive:!0});let tne=(()=>{class i{constructor(e,n){this._platform=e,this._ngZone=n,this._monitoredElements=new Map}monitor(e){if(!this._platform.isBrowser)return mo;const n=Yc(e),r=this._monitoredElements.get(n);if(r)return r.subject;const s=new Re,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,fH),n.classList.add("cdk-text-field-autofill-monitored")}),this._monitoredElements.set(n,{subject:s,unlisten:()=>{n.removeEventListener("animationstart",a,fH)}}),s}stopMonitoring(e){const n=Yc(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)(ee(Vi),ee(ft))},i.\u0275prov=ke({token:i,factory:i.\u0275fac,providedIn:"root"}),i})(),nne=(()=>{class i{}return i.\u0275fac=function(e){return new(e||i)},i.\u0275mod=nn({type:i}),i.\u0275inj=Kt({}),i})();const VR=new me("MAT_INPUT_VALUE_ACCESSOR"),ine=["button","checkbox","file","hidden","image","radio","range","reset","submit"];let rne=0;const sne=$U(class{constructor(i,t,e,n){this._defaultErrorStateMatcher=i,this._parentForm=t,this._parentFormGroup=e,this.ngControl=n,this.stateChanges=new Re}});let ic=(()=>{class i extends sne{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(_l.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&&oU().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,d,h){super(a,s,o,r),this._elementRef=e,this._platform=n,this._autofillMonitor=c,this._formField=h,this._uid="mat-input-"+rne++,this.focused=!1,this.stateChanges=new Re,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=>oU().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&&d.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(){ine.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)(E(mt),E(Vi),E(ec,10),E(ub,8),E(Gh,8),E(jU),E(VR,10),E(tne),E(ft),E(mC,8))},i.\u0275dir=ve({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&&Ue("focus",function(){return n._focusChanged(!0)})("blur",function(){return n._focusChanged(!1)})("input",function(){return n._onInput()}),2&e&&(Yl("id",n.id)("disabled",n.disabled)("required",n.required),Dt("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),un("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:[Dn([{provide:UR,useExisting:i}]),lt,bi]}),i})(),pH=(()=>{class i{}return i.\u0275fac=function(e){return new(e||i)},i.\u0275mod=nn({type:i}),i.\u0275inj=Kt({imports:[Qn,gC,gC,nne,Qn]}),i})();function one(i,t){if(1&i&&(W(0,"mat-label"),Ve(1),j()),2&i){const e=he(2);G(1),_i(e.resource.name)}}function ane(i,t){if(1&i){const e=di();W(0,"mat-form-field",1),fe(1,one,2,1,"mat-label",2),W(2,"input",3),Ue("ngModelChange",function(r){return an(e),zt(he().resource.data=r)})("change",function(){return an(e),zt(he().changed.emit())}),j()()}if(2&i){const e=he();U("matTooltip",e.resourceDescription),G(1),U("ngIf",e.resource.name),G(1),U("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 lne=(()=>{class i{constructor(){this.resource=null,this.resourceDescription="",this.disabled=!1,this.changed=new We}}return i.\u0275fac=function(e){return new(e||i)},i.\u0275cmp=ot({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&&fe(0,ane,3,7,"mat-form-field",0),2&e&&U("ngIf",n.resource)},dependencies:[vi,gl,mu,tc,_u,gu,Kc,vl,Io,ic,Os],changeDetection:0}),i})();function cne(i,t){if(1&i&&(W(0,"mat-label"),Ve(1),j()),2&i){const e=he(2);G(1),_i(e.resource.name)}}function dne(i,t){if(1&i){const e=di();W(0,"mat-form-field",1),fe(1,cne,2,1,"mat-label",2),W(2,"input",3),Ue("ngModelChange",function(r){return an(e),zt(he().resource.data=r)})("change",function(){return an(e),zt(he().changed.emit())}),j()()}if(2&i){const e=he();U("matTooltip",e.resourceDescription),G(1),U("ngIf",e.resource.name),G(1),U("disabled",e.disabled||void 0!==e.resource.schema.required_value)("maxlength",e.maxLength)("minlength",e.minLength)("ngModel",e.resource.data)}}let mH=(()=>{class i{constructor(){this._resource=null,this.resourceDescription="",this.disabled=!1,this.changed=new We,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=ot({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&&fe(0,dne,3,6,"mat-form-field",0),2&e&&U("ngIf",n.resource)},dependencies:[vi,gl,tc,NR,BR,Kc,vl,Io,ic,Os],changeDetection:0}),i})();const rc=(i,t)=>i+(i.includes("__")?"/":"__")+t,Wh=function(){return[]};function une(i,t){if(1&i&&(W(0,"mat-panel-description"),Ve(1," Click to view items ("),W(2,"b"),Ve(3),j(),Ve(4,") "),j()),2&i){const e=he(2);G(3),_i((e.resourceData||oo(1,Wh)).length)}}function hne(i,t){1&i&&(W(0,"mat-panel-description"),Ve(1," Empty array "),j())}function fne(i,t){}function pne(i,t){if(1&i){const e=di();W(0,"mat-expansion-panel",4),Ue("opened",function(){return an(e),zt(he().onContentsTrigger(!0))})("closed",function(){return an(e),zt(he().onContentsTrigger(!1))}),W(1,"mat-expansion-panel-header",5)(2,"mat-panel-title"),Ve(3),j(),fe(4,une,5,2,"mat-panel-description",1),fe(5,hne,2,0,"mat-panel-description",1),j(),fe(6,fne,0,0,"ng-template",6),j()}if(2&i){const e=he(),n=Ki(3);G(1),U("matTooltip",e.resourceDescription),G(2),Zi(" ",e.name," "),G(1),U("ngIf",(e.resourceData||oo(5,Wh)).length>0),G(1),U("ngIf",0==(e.resourceData||oo(6,Wh)).length),G(1),U("ngTemplateOutlet",n)}}function mne(i,t){}function gne(i,t){if(1&i&&(Gr(0),W(1,"h2",5),Ve(2),j(),W(3,"div",7),fe(4,mne,0,0,"ng-template",6),j(),$r()),2&i){const e=he(),n=Ki(3);G(1),U("matTooltip",e.resourceDescription),G(1),_i(e.name),G(2),U("ngTemplateOutlet",n)}}function _ne(i,t){}function vne(i,t){if(1&i&&De(0,"app-editor",10),2&i){const e=he().$implicit,n=he(3);U("resource",n.children[n.pageIndex*n.pageSize+e])("disabled",n.disabled)}}function yne(i,t){if(1&i&&(Gr(0),fe(1,vne,1,2,"app-editor",9),$r()),2&i){const e=t.$implicit,n=he(3);G(1),U("ngIf",n.pageIndex*n.pageSize+e0)}let zR=(()=>{class i{constructor(e,n){this.main=e,this.cdr=n,this._resource=null,this.resourceDescription="",this.disabled=!1,this.changed=new We,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 Re}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:rc(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(He(this.destroyed$),gn(([n,r])=>!!this.resource&&n.startsWith(this.resource.id)&&!n.substring(this.resource.id.length+1).includes("/"))).subscribe(function(){var n=tt(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 gt(null),this.imageUrl$=new gt(null),this.destroyed$=new Re,this.changed=new We}set resource(e){this._resource$.next(e)}get resource(){return this._resource$.getValue()}ngAfterViewInit(){var e=this;return tt(function*(){e._resource$.pipe(He(e.destroyed$)).subscribe(function(){var n=tt(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)(E(Ql),E(Pa))},i.\u0275cmp=ot({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&&(De(0,"app-compound-block-ui",0),Ct(1,"async"),fe(2,Dne,2,3,"img",1),Ct(3,"async")),2&e&&(U("resource",Tt(1,3,n._resource$))("fieldBlacklist",oo(7,Tne)),G(2),U("ngIf",Tt(3,5,n.imageUrl$)))},dependencies:[vi,Jl,pl],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 Rne=["*"],Lne=new me("MAT_CARD_CONFIG");let gH=(()=>{class i{constructor(e){this.appearance=e?.appearance||"raised"}}return i.\u0275fac=function(e){return new(e||i)(E(Lne,8))},i.\u0275cmp=ot({type:i,selectors:[["mat-card"]],hostAttrs:[1,"mat-mdc-card","mdc-card"],hostVars:4,hostBindings:function(e,n){2&e&&un("mat-mdc-card-outlined","outlined"===n.appearance)("mdc-card--outlined","outlined"===n.appearance)},inputs:{appearance:"appearance"},exportAs:["matCard"],ngContentSelectors:Rne,decls:1,vars:0,template:function(e,n){1&e&&(sr(),Wt(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})(),_H=(()=>{class i{}return i.\u0275fac=function(e){return new(e||i)},i.\u0275mod=nn({type:i}),i.\u0275inj=Kt({imports:[Qn,Ao,Qn]}),i})();class HR{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 Re,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 GR=(()=>{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=ke({token:i,factory:i.\u0275fac,providedIn:"root"}),i})(),aie=(()=>{class i{}return i.\u0275fac=function(e){return new(e||i)},i.\u0275mod=nn({type:i}),i.\u0275inj=Kt({imports:[Qn,Ao,eb,Qn]}),i})();const MH={transformPanel:ka("transformPanel",[Pr("void => enter-dropdown",jr("120ms cubic-bezier(0, 0, 0.2, 1)",rV([si({opacity:0,transform:"scale(1, 0.8)"}),si({opacity:1,transform:"scale(1, 1)"})]))),Pr("void => enter-dialog",jr("150ms cubic-bezier(0, 0, 0.2, 1)",rV([si({opacity:0,transform:"scale(0.7)"}),si({transform:"none",opacity:1})]))),Pr("* => void",jr("100ms linear",si({opacity:0})))]),fadeInCalendar:ka("fadeInCalendar",[Ps("void",si({opacity:0})),Ps("enter",si({opacity:1})),Pr("void => *",jr("120ms 100ms cubic-bezier(0.55, 0, 0.55, 0.2)"))])},EH=function(i){return{active:i}};function Sie(i,t){if(1&i){const e=di();W(0,"button",2),Ue("click",function(){const s=an(e).$implicit;return zt(he().select(s))}),j()}if(2&i){const e=t.$implicit,n=he();Yo("background-color",e),U("ngClass",sm(3,EH,n.selectedColor===e))}}function Eie(i,t){if(1&i){const e=di();W(0,"button",2),Ue("click",function(){const s=an(e).$implicit;return zt(he().select(s))}),j()}if(2&i){const e=t.$implicit,n=he();Yo("background-color",e),U("ngClass",sm(3,EH,n.selectedColor===e))}}const Aie=["button"],Die=/^\s+/,Tie=/\s+$/,$m=Math.round,Iie=(Math,Math,Math,/[^0-9]/g),AH=["#ffffff","#ffff00","#ff00ff","#ff0000","#c0c0c0","#808080","#808000","#800080","#800000","#00ffff","#00ff00","#008080","#008000","#0000ff","#000080","#000000"];function DH(i,t,e){const n=i.getImageData(t,e,1,1).data;return{r:n[0],g:n[1],b:n[2]}}function jh(i){return 1==i.length?"0"+i:""+i}function kie(i){return Math.round(255*parseFloat(i)).toString(16)}function TH(i){return Zo(i)/255}function Zo(i){return parseInt(i,16)}function IH(i,t,e,n){var r=[jh($m(i).toString(16)),jh($m(t).toString(16)),jh($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 vu="(?:[-\\+]?\\d*\\.\\d+%?)|(?:[-\\+]?\\d+%?)",jR="[\\s|\\(]+("+vu+")[,|\\s]+("+vu+")[,|\\s]+("+vu+")\\s*\\)?",YR="[\\s|\\(]+("+vu+")[,|\\s]+("+vu+")[,|\\s]+("+vu+")[,|\\s]+("+vu+")\\s*\\)?",Yh={CSS_UNIT:new RegExp(vu),rgb:new RegExp("rgb"+jR),rgba:new RegExp("rgba"+YR),hsl:new RegExp("hsl"+jR),hsla:new RegExp("hsla"+YR),hsv:new RegExp("hsv"+jR),hsva:new RegExp("hsva"+YR),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 qR(i){let t;return i=i.replace(Die,"").replace(Tie,"").toLowerCase(),(t=Yh.rgb.exec(i))?{r:t[1],g:t[2],b:t[3],a:1}:(t=Yh.rgba.exec(i))?{r:t[1],g:t[2],b:t[3],a:t[4]}:(t=Yh.hex8.exec(i))?{r:Zo(t[1]),g:Zo(t[2]),b:Zo(t[3]),a:TH(t[4])}:(t=Yh.hex6.exec(i))?{r:Zo(t[1]),g:Zo(t[2]),b:Zo(t[3]),a:1}:(t=Yh.hex4.exec(i))?{r:Zo(t[1]+""+t[1]),g:Zo(t[2]+""+t[2]),b:Zo(t[3]+""+t[3]),a:TH(t[4]+""+t[4])}:(t=Yh.hex3.exec(i))?{r:Zo(t[1]+""+t[1]),g:Zo(t[2]+""+t[2]),b:Zo(t[3]+""+t[3]),a:1}:null}class qh{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=IH(this.r,this.g,this.b),this.rgba=this.toRgba()}toHex(t){return IH(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 Rie(i,t,e,n,r){var s=[jh($m(i).toString(16)),jh($m(t).toString(16)),jh($m(e).toString(16)),jh(kie(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 RH=(()=>{class i{constructor(e,n){this.zone=e,this.colorChanged=new We,this.x=0,this.y=0,this.drag=!1,this._destroyed=new Re,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){wo()},i.\u0275dir=ve({type:i,inputs:{color:"color"},outputs:{colorChanged:"colorChanged"}}),i})(),Fie=(()=>{class i extends RH{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}=DH(this.ctx,e.offsetX,e.offsetY);this.emitChange(new qh(n,r,s))}}return i.\u0275fac=function(e){return new(e||i)(E(ft))},i.\u0275cmp=ot({type:i,selectors:[["ngx-mat-color-slider"]],features:[lt],decls:1,vars:0,consts:[["id","color-strip","width","15","height","234",1,"zone-strip",3,"mousedown","mouseup"]],template:function(e,n){1&e&&(W(0,"canvas",0),Ue("mousedown",function(s){return n.onMousedown(s)})("mouseup",function(s){return n.onMouseup(s)}),j())}}),i})(),Lie=(()=>{class i{constructor(){}onInput(e){this._formatInput(e.target)}_formatInput(e){let n=Number(e.value.replace(Iie,""));n=isNaN(n)?0:n,e.value=n}}return i.\u0275fac=function(e){return new(e||i)},i.\u0275dir=ve({type:i,selectors:[["","ngxMatNumericColorInput",""]],hostBindings:function(e,n){1&e&&Ue("input",function(s){return n.onInput(s)})}}),i})(),Bie=(()=>{class i extends RH{constructor(e){super(e,"color-block"),this.zone=e,this._resetBaseColor=!0,this.formGroup=new Hm({r:new nc(null,[_l.required]),g:new nc(null,[_l.required]),b:new nc(null,[_l.required]),a:new nc(null,[_l.required]),hex:new nc(null,[_l.required,_l.pattern(Yh.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(){Mr(this.rCtrl.valueChanges,this.gCtrl.valueChanges,this.bCtrl.valueChanges,this.aCtrl.valueChanges).pipe(He(this._destroyed),ml(400)).subscribe(r=>{const s=new qh(Number(this.rCtrl.value),Number(this.gCtrl.value),Number(this.bCtrl.value),Number(this.aCtrl.value));this.emitChange(s)}),this.hexCtrl.valueChanges.pipe(He(this._destroyed),ml(400),Zl()).subscribe(r=>{const s=qR(r);if(null!=s){const o=new qh(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}=DH(this.ctx,e.offsetX,e.offsetY);this.emitChange(new qh(n,r,s))}}return i.\u0275fac=function(e){return new(e||i)(E(ft))},i.\u0275cmp=ot({type:i,selectors:[["ngx-mat-color-canvas"]],hostAttrs:[1,"ngx-mat-color-canvas"],features:[lt,bi],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&&(W(0,"form",0)(1,"div",1)(2,"div",2)(3,"canvas",3),Ue("mousedown",function(s){return n.onMousedown(s)})("mouseup",function(s){return n.onMouseup(s)}),j(),W(4,"ngx-mat-color-slider",4),Ue("colorChanged",function(s){return n.onSliderColorChanged(s)}),j()(),W(5,"div",5)(6,"mat-form-field")(7,"mat-label"),Ve(8,"R"),j(),De(9,"input",6),j(),W(10,"mat-form-field")(11,"mat-label"),Ve(12,"G"),j(),De(13,"input",7),j(),W(14,"mat-form-field")(15,"mat-label"),Ve(16,"B"),j(),De(17,"input",8),j()()(),W(18,"div",1),De(19,"button",9),W(20,"mat-form-field")(21,"mat-label"),Ve(22,"HEX6"),j(),W(23,"mat-label",10),Ve(24,"#\xa0"),j(),De(25,"input",11),j(),W(26,"mat-form-field",12)(27,"mat-label"),Ve(28,"A"),j(),De(29,"input",13),j()()()),2&e&&(U("formGroup",n.formGroup),G(19),Yo("background-color",(null==n.color?null:n.color.rgba)||"transparent"))},dependencies:[ic,vl,Io,qte,MV,IR,gl,mu,tc,bR,_u,gu,Gh,fC,Fie,Lie],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})(),Uie=(()=>{class i{constructor(){this.colorChanged=new We,this.colors1=AH.slice(0,8),this.colors2=AH.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}=qR(e);this.colorChanged.emit(new qh(n,r,s,o))}}return i.\u0275fac=function(e){return new(e||i)},i.\u0275cmp=ot({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&&(W(0,"div",0),fe(1,Sie,1,5,"button",1),j(),W(2,"div",0),fe(3,Eie,1,5,"button",1),j()),2&e&&(G(1),U("ngForOf",n.colors1),G(2),U("ngForOf",n.colors2))},dependencies:[hm,Eo,MV],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})(),kH=(()=>{class i{constructor(){this.colorChanged=new We}ngOnInit(){}handleColorChanged(e){this.colorChanged.emit(e)}}return i.\u0275fac=function(e){return new(e||i)},i.\u0275cmp=ot({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&&(W(0,"ngx-mat-color-canvas",0),Ue("colorChanged",function(s){return n.handleColorChanged(s)}),j(),W(1,"ngx-mat-color-collection",0),Ue("colorChanged",function(s){return n.handleColorChanged(s)}),j()),2&e&&(U("color",n.color),G(1),U("color",n.color))},dependencies:[Bie,Uie],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})(),XR=(()=>{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=qR(e);return n?new qh(n.r,n.g,n.b,n.a):null}}return i.\u0275fac=function(e){return new(e||i)},i.\u0275prov=ke({token:i,factory:i.\u0275fac}),i})();const Vie={display:{colorInput:"hex"}},PH=new me("mat-color-formats"),OH=new me("ngx-mat-colorpicker-scroll-strategy"),Hie={provide:OH,deps:[as],useFactory:function zie(i){return()=>i.scrollStrategies.reposition()}},Gie=Qy(class{constructor(i){this._elementRef=i}});let FH=(()=>{class i extends Gie{constructor(e){super(e)}}return i.\u0275fac=function(e){return new(e||i)(E(mt))},i.\u0275cmp=ot({type:i,selectors:[["ngx-mat-color-picker-content"]],viewQuery:function(e,n){if(1&e&&Wn(kH,5),2&e){let r;Et(r=At())&&(n._palette=r.first)}},hostAttrs:[1,"ngx-mat-colorpicker-content"],hostVars:3,hostBindings:function(e,n){2&e&&(Iw("@transformPanel","enter"),un("ngx-mat-colorpicker-content-touch",n.picker.touchUi))},inputs:{color:"color"},exportAs:["ngxMatColorPickerContent"],features:[lt],decls:1,vars:1,consts:[[3,"color","colorChanged"]],template:function(e,n){1&e&&(W(0,"ngx-mat-color-palette",0),Ue("colorChanged",function(s){return n.picker.select(s)}),j()),2&e&&U("color",n.picker._selected)},dependencies:[kH],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:[MH.transformPanel,MH.fadeInCalendar]},changeDetection:0}),i})(),LH=(()=>{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 We,this.closedStream=new We,this._touchUi=!1,this._opened=!1,this._defaultColor="primary",this._validSelected=null,this._disabledChange=new Re,this._focusedElementBeforeOpen=null,this._inputSubscription=Zt.EMPTY,this._selectedChanged=new Re,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(FH,{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 Lh(FH,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(Pi(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"),Mr(this._popupRef.backdropClick(),this._popupRef.detachments(),this._popupRef.keydownEvents().pipe(gn(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)(E(Bm),E(as),E(ft),E(XR),E(Ra,8),E(OH),E(jt,8),E(Wr))},i.\u0275cmp=ot({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 yC{constructor(t,e){this.target=t,this.targetElement=e,this.value=this.target.value}}const $ie={provide:To,useExisting:Gn(()=>bC),multi:!0},Wie={provide:Yr,useExisting:Gn(()=>bC),multi:!0};let bC=(()=>{class i{constructor(e,n,r,s){if(this._elementRef=e,this._formField=n,this._colorFormats=r,this._adapter=s,this.colorChange=new We,this.colorInput=new We,this._disabledChange=new We,this._valueChange=new We,this._onTouched=()=>{},this._cvaOnChange=()=>{},this._validatorOnChange=()=>{},this._pickerSubscription=Zt.EMPTY,this._validator=_l.compose([]),this._lastValueValid=!1,!this._colorFormats)throw function Oie(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 yC(this,this._elementRef.nativeElement)),this.colorChange.emit(new yC(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 yC(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 yC(this,this._elementRef.nativeElement)))}}return i.\u0275fac=function(e){return new(e||i)(E(mt),E(vl,8),E(PH,8),E(XR))},i.\u0275dir=ve({type:i,selectors:[["input","ngxMatColorPicker",""]],hostVars:3,hostBindings:function(e,n){1&e&&Ue("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&&(Yl("disabled",n.disabled),Dt("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:[Dn([$ie,Wie,{provide:VR,useExisting:i}])]}),i})(),jie=(()=>{class i{constructor(e){this._cd=e,this._stateChanges=Zt.EMPTY}get disabled(){if(null==this._disabled&&this.picker)return this.picker.disabled}set disabled(e){this._disabled=e}ngOnInit(){}ngOnChanges(e){e.picker&&this._watchStateChanges()}ngOnDestroy(){this._stateChanges.unsubscribe()}ngAfterContentInit(){this._watchStateChanges()}open(e){this.picker&&!this.disabled&&(this.picker.open(),e.stopPropagation())}_watchStateChanges(){const e=this.picker?this.picker._disabledChange:ht(),n=this.picker&&this.picker._pickerInput?this.picker._pickerInput._disabledChange:ht(),r=this.picker?Mr(this.picker.openedStream,this.picker.closedStream):ht();this._stateChanges.unsubscribe(),this._stateChanges=Mr(e,n,r).subscribe(()=>this._cd.markForCheck())}}return i.\u0275fac=function(e){return new(e||i)(E(Zn))},i.\u0275cmp=ot({type:i,selectors:[["ngx-mat-color-toggle"]],viewQuery:function(e,n){if(1&e&&Wn(Aie,5),2&e){let r;Et(r=At())&&(n._button=r.first)}},hostAttrs:[1,"ngx-mat-color-toggle"],hostVars:7,hostBindings:function(e,n){1&e&&Ue("focus",function(){return n._button.focus()}),2&e&&(Dt("tabindex",-1),un("ngx-mat-color-toggle-active",n.picker&&n.picker.opened)("mat-accent",n.picker&&"accent"===n.picker.color)("mat-warn",n.picker&&"warn"===n.picker.color))},inputs:{picker:["for","picker"],tabIndex:"tabIndex",disabled:"disabled"},exportAs:["ngxMatColorPickerToggle"],features:[bi],decls:4,vars:5,consts:[["mat-icon-button","","type","button",3,"disabled","click"],["button",""]],template:function(e,n){1&e&&(W(0,"button",0,1),Ue("click",function(s){return n.open(s)}),W(2,"mat-icon"),Ve(3,"palette"),j()()),2&e&&(U("disabled",n.disabled),Dt("aria-haspopup",n.picker?"dialog":null)("tabindex",n.disabled?-1:n.tabIndex),G(2),Yo("color",null==n.picker||null==n.picker._selected?null:n.picker._selected.rgba))},dependencies:[XM,gR],styles:[".mat-form-field-appearance .mat-form-field-prefix .ngx-mat-color-toggle-default-icon,.mat-form-field-appearance .mat-form-field-suffix .ngx-mat-color-toggle-default-icon{width:1em}.mat-form-field:not(.mat-form-field-appearance) .mat-form-field-prefix .ngx-mat-color-toggle-default-icon,.mat-form-field:not(.mat-form-field-appearance) .mat-form-field-suffix .ngx-mat-color-toggle-default-icon{display:block;width:1.5em;height:1.5em}.mat-form-field:not(.mat-form-field-appearance) .mat-form-field-prefix .mat-icon-button .ngx-mat-color-toggle-default-icon,.mat-form-field:not(.mat-form-field-appearance) .mat-form-field-suffix .mat-icon-button .ngx-mat-color-toggle-default-icon{margin:auto}\n"],encapsulation:2}),i})(),Yie=(()=>{class i{}return i.\u0275fac=function(e){return new(e||i)},i.\u0275mod=nn({type:i}),i.\u0275inj=Kt({providers:[XR,Hie],imports:[Ao,pH,KM,_H,aie,eH,tH,_V,Nh,ez]}),i})();const qie=["picker"],Xie=function(i){return{"background-color":i}};function Kie(i,t){if(1&i){const e=di();W(0,"div",5),Ue("click",function(r){const o=an(e).index;return zt(he().onColorClicked(r.currentTarget,o))}),j()}if(2&i){const e=t.$implicit,n=t.index,r=he();U("ngStyle",sm(2,Xie,"#"+r.lpad(e.toString(16),"0",8)))("matTooltip",n+": #"+e.toString(16))}}const Zie=function(){return["colors"]};let Qie=(()=>{class i{constructor(){this.resource=null,this.changed=new We,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 yU;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=ot({type:i,selectors:[["app-palette-block-ui"]],viewQuery:function(e,n){if(1&e&&Wn(qie,5),2&e){let r;Et(r=At())&&(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&&(De(0,"app-compound-block-ui",0),W(1,"div",1),fe(2,Kie,1,4,"div",2),j(),W(3,"input",3),Ue("colorChange",function(s){return n.onColorChange(s.value)}),j(),De(4,"ngx-mat-color-picker",null,4)),2&e){const r=Ki(5);U("resource",n.resource)("fieldBlacklist",oo(4,Zie)),G(2),U("ngForOf",null==n.resourceData?null:n.resourceData.colors),G(1),U("ngxMatColorPicker",r)}},dependencies:[Eo,tM,ic,Os,bC,LH,Jl],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 Jie=["editor"];let ere=(()=>{class i{constructor(e){this.cdr=e,this._resource=null,this.resourceDescription="",this.disabled=!1,this.changed=new We,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)(E(Zn))},i.\u0275cmp=ot({type:i,selectors:[["app-binary-block-ui"]],viewQuery:function(e,n){if(1&e&&Wn(Jie,5),2&e){let r;Et(r=At())&&(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&&(W(0,"h2",0),Ve(1),j(),De(2,"div",null,1)),2&e&&(U("matTooltip",n.resourceDescription),G(1),_i(null==n.resource?null:n.resource.name))},dependencies:[Os],changeDetection:0}),i})();const tre=["picker"];function nre(i,t){if(1&i&&(W(0,"mat-label",8),Ve(1),j()),2&i){const e=he();G(1),_i(null==e.resource?null:e.resource.name)}}const ire=function(i){return{transform:i}};let rre=(()=>{class i{constructor(e){this.cdr=e,this.resource=null,this.resourceDescription="",this.changed=new We,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)(E(Zn))},i.\u0275cmp=ot({type:i,selectors:[["app-angle-block-ui"]],viewQuery:function(e,n){if(1&e&&Wn(tre,5),2&e){let r;Et(r=At())&&(n.picker=r.first)}},hostBindings:function(e,n){1&e&&Ue("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&&(W(0,"div",0)(1,"div",1,2)(3,"div",3),De(4,"div",4)(5,"div",5),j()(),W(6,"div",6),fe(7,nre,2,1,"mat-label",7),W(8,"mat-label"),Ve(9),Ct(10,"number"),j(),W(11,"mat-label"),Ve(12),Ct(13,"number"),j()()()),2&e&&(U("matTooltip",n.resourceDescription),G(3),U("ngStyle",sm(11,ire,"rotate("+((null==n.resource?null:n.resource.data)||0)+"rad)")),G(4),U("ngIf",null==n.resource?null:n.resource.name),G(2),Zi("",J1(10,5,180*(null==n.resource?null:n.resource.data)/n.pi||0,"1.2-2")," deg"),G(3),Zi("",J1(13,8,(null==n.resource?null:n.resource.data)||0,"1.2-2")," rad"))},dependencies:[vi,tM,Io,Os,uB],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 NH{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,d=new Set;for(const h of e)!0===Array.isArray(h)?a.add(h):"object"==typeof h?l.add(h):"function"==typeof h?d.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===d.size){h=!0;for(const p of o)if(!1===d.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 sre(i,t){if(1&i&&(W(0,"mat-list-option",3),Ve(1),j()),2&i){const e=t.$implicit,n=he();U("value",e)("selected",n.selectedValue==e),G(1),Zi(" ",e," ")}}function ore(i,t){if(1&i&&(W(0,"mat-card"),De(1,"app-editor",4),j()),2&i){const e=he();G(1),U("resource",e.resources[e.selectedValue])}}let xC=(()=>{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)(E(NH))},i.\u0275cmp=ot({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&&(W(0,"mat-selection-list",0),Ue("selectionChange",function(s){return n.selectedValue=s.source.selectedOptions.selected[0].value}),fe(1,sre,2,3,"mat-list-option",1),j(),fe(2,ore,2,1,"mat-card",2)),2&e&&(U("multiple",!1),G(1),U("ngForOf",n.keys),G(1),U("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})(),are=(()=>{class i{constructor(){this._resource=null,this.resourceMap={},this.changed=new We}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",iR("@transformPanel",[nR()],{optional:!0}))]),transformPanel:ka("transformPanel",[Ps("void",si({opacity:0,transform:"scale(1, 0.8)"})),Pr("void => showing",jr("120ms cubic-bezier(0, 0, 0.2, 1)",si({opacity:1,transform:"scale(1, 1)"}))),Pr("* => void",jr("100ms linear",si({opacity:0})))])};let BH=0;const UH=new me("mat-select-scroll-strategy"),yre=new me("MAT_SELECT_CONFIG"),bre={provide:UH,deps:[as],useFactory:function vre(i){return()=>i.scrollStrategies.reposition()}},xre=new me("MatSelectTrigger");class wre{constructor(t,e){this.source=t,this.value=e}}const Mre=YM(JI(jM($U(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 Re}}))));let Cre=(()=>{class i extends Mre{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(_l.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=ks(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,d,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=d,this._liveAnnouncer=g,this._defaultOptions=b,this._panelOpen=!1,this._compareWith=(v,y)=>v===y,this._uid="mat-select-"+BH++,this._triggerAriaLabelledBy=null,this._destroy=new Re,this._onChange=()=>{},this._onTouched=()=>{},this._valueId="mat-select-value-"+BH++,this._panelDoneAnimatingStream=new Re,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=Ey(()=>{const v=this.options;return v?v.changes.pipe(Do(v),Rs(()=>Mr(...v.map(y=>y.onSelectionChange)))):this._ngZone.onStable.pipe(Pi(1),Rs(()=>this.optionSelectionChanges))}),this.openedChange=new We,this._openedStream=this.openedChange.pipe(gn(v=>v),et(()=>{})),this._closedStream=this.openedChange.pipe(gn(v=>!v),et(()=>{})),this.selectionChange=new We,this.valueChange=new We,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 HR(this.multiple),this.stateChanges.next(),this._panelDoneAnimatingStream.pipe(Zl(),He(this._destroy)).subscribe(()=>this._panelDoneAnimating(this.panelOpen))}ngAfterContentInit(){this._initKeyManager(),this._selectionModel.changed.pipe(He(this._destroy)).subscribe(e=>{e.added.forEach(n=>n.select()),e.removed.forEach(n=>n.deselect())}),this.options.changes.pipe(Do(null),He(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&&!Ko(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||Ko(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(Pi(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 GZ(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=Mr(this.options.changes,this._destroy);this.optionSelectionChanges.pipe(He(e)).subscribe(n=>{this._onSelect(n.source,n.isUserInput),n.isUserInput&&!this.multiple&&this._panelOpen&&(this.close(),this.focus())}),Mr(...this.options.map(n=>n._stateChanges)).pipe(He(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)(E(LM),E(Zn),E(ft),E(jU),E(mt),E(Ra,8),E(ub,8),E(Gh,8),E(mC,8),E(ec,10),ba("tabindex"),E(UH),E(XI),E(yre,8))},i.\u0275dir=ve({type:i,viewQuery:function(e,n){if(1&e&&(Wn(lre,5),Wn(cre,5),Wn(xU,5)),2&e){let r;Et(r=At())&&(n.trigger=r.first),Et(r=At())&&(n.panel=r.first),Et(r=At())&&(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:[lt,bi]}),i})(),fb=(()=>{class i extends Cre{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(He(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 OQ(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 wre(this,e)}_getOverlayWidth(){return(this._preferredOverlayOrigin instanceof zI?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=ri(i)))(n||i)}}(),i.\u0275cmp=ot({type:i,selectors:[["mat-select"]],contentQueries:function(e,n,r){if(1&e&&($i(r,xre,5),$i(r,Nm,5),$i(r,eV,5)),2&e){let s;Et(s=At())&&(n.customTrigger=s.first),Et(s=At())&&(n.options=s),Et(s=At())&&(n.optionGroups=s)}},hostAttrs:["role","combobox","aria-autocomplete","none","aria-haspopup","listbox",1,"mat-mdc-select"],hostVars:19,hostBindings:function(e,n){1&e&&Ue("keydown",function(s){return n._handleKeydown(s)})("focus",function(){return n._onFocus()})("blur",function(){return n._onBlur()}),2&e&&(Dt("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()),un("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:[Dn([{provide:UR,useExisting:i},{provide:JU,useExisting:i}]),lt],ngContentSelectors:gre,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&&(sr(mre),W(0,"div",0,1),Ue("click",function(){return n.toggle()}),W(3,"div",2),fe(4,dre,2,1,"span",3),fe(5,fre,3,2,"span",4),j(),W(6,"div",5)(7,"div",6),Ri(),W(8,"svg",7),De(9,"path",8),j()()()(),fe(10,pre,3,9,"ng-template",9),Ue("backdropClick",function(){return n.close()})("attach",function(){return n._onAttached()})("detach",function(){return n.close()})),2&e){const r=Ki(1);Dt("aria-owns",n.panelOpen?n.id+"-panel":null),G(3),U("ngSwitch",n.empty),Dt("id",n._valueId),G(1),U("ngSwitchCase",!0),G(1),U("ngSwitchCase",!1),G(5),U("cdkConnectedOverlayPanelClass",n._overlayPanelClass)("cdkConnectedOverlayScrollStrategy",n._scrollStrategy)("cdkConnectedOverlayOrigin",n._preferredOverlayOrigin||r)("cdkConnectedOverlayOpen",n.panelOpen)("cdkConnectedOverlayPositions",n._positions)("cdkConnectedOverlayWidth",n._overlayWidth)}},dependencies:[hm,by,VT,aB,xU,zI],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:[_re.transformPanel]},changeDetection:0}),i})(),VH=(()=>{class i{}return i.\u0275fac=function(e){return new(e||i)},i.\u0275mod=nn({type:i}),i.\u0275inj=Kt({providers:[bre],imports:[Ao,Pm,tR,Qn,Xy,gC,tR,Qn]}),i})();function Sre(i,t){if(1&i&&(W(0,"mat-label"),Ve(1),j()),2&i){const e=he(3);G(1),_i(e.resource.name)}}function Ere(i,t){if(1&i&&(W(0,"mat-option",6),Ve(1),j()),2&i){const e=t.$implicit,n=he(3);U("value",e[1])("disabled",n.disabled),G(1),Zi(" ",e[1]," ")}}function Are(i,t){if(1&i){const e=di();W(0,"mat-form-field",3),fe(1,Sre,2,1,"mat-label",0),W(2,"mat-select",4),Ue("valueChange",function(r){return an(e),zt(he(2).resource.data=r)})("selectionChange",function(){return an(e),zt(he(2).changed.emit())}),fe(3,Ere,2,3,"mat-option",5),j()()}if(2&i){const e=he(2);U("matTooltip",e.resourceDescription),G(1),U("ngIf",e.resource.name),G(1),U("value",e.resource.data)("disabled",e.disabled),G(1),U("ngForOf",e.resource.schema.enum_names)}}function Dre(i,t){if(1&i&&(W(0,"mat-label"),Ve(1),j()),2&i){const e=he(3);G(1),_i(e.resource.name)}}function Tre(i,t){if(1&i){const e=di();W(0,"mat-form-field",3),fe(1,Dre,2,1,"mat-label",0),W(2,"input",7),Ue("ngModelChange",function(r){return an(e),zt(he(2).resource.data=r)})("change",function(){return an(e),zt(he(2).changed.emit())}),j()()}if(2&i){const e=he(2);U("matTooltip",e.resourceDescription),G(1),U("ngIf",e.resource.name),G(1),U("min",0)("max",256*(e.resource.schema.length||1)-1)("ngModel",e.resource.data)}}function Ire(i,t){if(1&i&&(Gr(0),fe(1,Are,4,5,"mat-form-field",1),fe(2,Tre,3,5,"ng-template",null,2,Vc),$r()),2&i){const e=Ki(3),n=he();G(1),U("ngIf",n.isKnownEnumValue(n.resource.data))("ngIfElse",e)}}let Rre=(()=>{class i{constructor(){this.resource=null,this.resourceDescription="",this.disabled=!1,this.changed=new We}isKnownEnumValue(e){return!!this.resource?.schema.enum_names.find(([n,r])=>r==e)}}return i.\u0275fac=function(e){return new(e||i)},i.\u0275cmp=ot({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&&fe(0,Ire,4,2,"ng-container",0),2&e&&U("ngIf",n.resource)},dependencies:[Eo,vi,gl,mu,tc,_u,gu,Kc,vl,Io,ic,Os,fb,Nm],changeDetection:0}),i})();const kre=["*"],Ore=["unscopedContent"];function Fre(i,t){1&i&&Wt(0,4)}function Lre(i,t){if(1&i&&(W(0,"div",11),De(1,"input",12),W(2,"div",13),Ri(),W(3,"svg",14),De(4,"path",15),j(),_a(),De(5,"div",16),j()()),2&i){const e=he();un("mdc-checkbox--disabled",e.disabled),G(1),U("checked",e.selected)("disabled",e.disabled)}}function Nre(i,t){if(1&i&&(W(0,"div",17),De(1,"input",18),W(2,"div",19),De(3,"div",20)(4,"div",21),j()()),2&i){const e=he();un("mdc-radio--disabled",e.disabled),G(1),U("checked",e.selected)("disabled",e.disabled)}}function Bre(i,t){}function Ure(i,t){if(1&i&&(W(0,"span",22),fe(1,Bre,0,0,"ng-template",23),j()),2&i){he();const e=Ki(3);G(1),U("ngTemplateOutlet",e)}}function Vre(i,t){}function zre(i,t){if(1&i&&(W(0,"span",24),fe(1,Vre,0,0,"ng-template",23),j()),2&i){he();const e=Ki(5);G(1),U("ngTemplateOutlet",e)}}function Hre(i,t){}function Gre(i,t){1&i&&fe(0,Hre,0,0,"ng-template",23),2&i&&(he(),U("ngTemplateOutlet",Ki(1)))}function $re(i,t){}function Wre(i,t){if(1&i&&(W(0,"span",25),fe(1,$re,0,0,"ng-template",23),j()),2&i){he();const e=Ki(3);G(1),U("ngTemplateOutlet",e)}}function jre(i,t){}function Yre(i,t){if(1&i&&(W(0,"span",25),fe(1,jre,0,0,"ng-template",23),j()),2&i){he();const e=Ki(5);G(1),U("ngTemplateOutlet",e)}}function qre(i,t){}function Xre(i,t){1&i&&fe(0,qre,0,0,"ng-template",23),2&i&&(he(),U("ngTemplateOutlet",Ki(1)))}const Kre=[[["","matListItemTitle",""]],[["","matListItemLine",""]],"*",[["mat-divider"]],[["","matListItemAvatar",""],["","matListItemIcon",""]]],Zre=["[matListItemTitle]","[matListItemLine]","*","mat-divider","[matListItemAvatar],[matListItemIcon]"],zH=new me("ListOption");let Qre=(()=>{class i{constructor(e){this._elementRef=e}}return i.\u0275fac=function(e){return new(e||i)(E(mt))},i.\u0275dir=ve({type:i,selectors:[["","matListItemTitle",""]],hostAttrs:[1,"mat-mdc-list-item-title","mdc-list-item__primary-text"]}),i})(),Jre=(()=>{class i{constructor(e){this._elementRef=e}}return i.\u0275fac=function(e){return new(e||i)(E(mt))},i.\u0275dir=ve({type:i,selectors:[["","matListItemLine",""]],hostAttrs:[1,"mat-mdc-list-item-line","mdc-list-item__secondary-text"]}),i})(),HH=(()=>{class i{constructor(e){this._listOption=e}_isAlignedAtStart(){return!this._listOption||"after"===this._listOption?._getTogglePosition()}}return i.\u0275fac=function(e){return new(e||i)(E(zH,8))},i.\u0275dir=ve({type:i,hostVars:4,hostBindings:function(e,n){2&e&&un("mdc-list-item__start",n._isAlignedAtStart())("mdc-list-item__end",!n._isAlignedAtStart())}}),i})(),ese=(()=>{class i extends HH{}return i.\u0275fac=function(){let t;return function(n){return(t||(t=ri(i)))(n||i)}}(),i.\u0275dir=ve({type:i,selectors:[["","matListItemAvatar",""]],hostAttrs:[1,"mat-mdc-list-item-avatar"],features:[lt]}),i})(),tse=(()=>{class i extends HH{}return i.\u0275fac=function(){let t;return function(n){return(t||(t=ri(i)))(n||i)}}(),i.\u0275dir=ve({type:i,selectors:[["","matListItemIcon",""]],hostAttrs:[1,"mat-mdc-list-item-icon"],features:[lt]}),i})();const nse=new me("MAT_LIST_CONFIG");let KR=(()=>{class i{constructor(){this._isNonInteractive=!0,this._disableRipple=!1,this._disabled=!1,this._defaultOptions=Ft(nse,{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=ve({type:i,hostVars:1,hostBindings:function(e,n){2&e&&Dt("aria-disabled",n.disabled)},inputs:{disableRipple:"disableRipple",disabled:"disabled"}}),i})(),GH=(()=>{class i{set lines(e){this._explicitLines=ks(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 Zt,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(Mr(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)(E(mt),E(ft),E(KR,8),E(Vi),E(eR,8),E(Rr,8))},i.\u0275dir=ve({type:i,contentQueries:function(e,n,r){if(1&e&&($i(r,ese,4),$i(r,tse,4)),2&e){let s;Et(s=At())&&(n._avatars=s),Et(s=At())&&(n._icons=s)}},hostVars:4,hostBindings:function(e,n){2&e&&(Dt("aria-disabled",n.disabled)("disabled",n._isButtonElement&&n.disabled||null),un("mdc-list-item--disabled",n.disabled))},inputs:{lines:"lines",disableRipple:"disableRipple",disabled:"disabled"}}),i})();const $H=new me("SelectionList");let wC=(()=>{class i extends GH{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 We,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)(E(mt),E(ft),E($H),E(Vi),E(Zn),E(eR,8),E(Rr,8))},i.\u0275cmp=ot({type:i,selectors:[["mat-list-option"]],contentQueries:function(e,n,r){if(1&e&&($i(r,Jre,5),$i(r,Qre,5)),2&e){let s;Et(s=At())&&(n._lines=s),Et(s=At())&&(n._titles=s)}},viewQuery:function(e,n){if(1&e&&Wn(Ore,5),2&e){let r;Et(r=At())&&(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&&Ue("blur",function(){return n._handleBlur()})("click",function(){return n._toggleOnInteraction()}),2&e&&(Dt("aria-selected",n.selected),un("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:[Dn([{provide:GH,useExisting:i},{provide:zH,useExisting:i}]),lt],ngContentSelectors:Zre,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&&(sr(Kre),fe(0,Fre,1,0,"ng-template",null,0,Vc),fe(2,Lre,6,4,"ng-template",null,1,Vc),fe(4,Nre,5,4,"ng-template",null,2,Vc),fe(6,Ure,2,1,"span",3),fe(7,zre,2,1,"span",4),fe(8,Gre,1,1,"ng-template",5),W(9,"span",6),Wt(10),Wt(11,1),W(12,"span",7,8),Ue("cdkObserveContent",function(){return n._updateItemLines(!0)}),Wt(14,2),j()(),fe(15,Wre,2,1,"span",9),fe(16,Yre,2,1,"span",9),fe(17,Xre,1,1,"ng-template",5),Wt(18,3),De(19,"div",10)),2&e&&(G(6),U("ngIf",n._hasCheckboxAt("before")),G(1),U("ngIf",n._hasRadioAt("before")),G(1),U("ngIf",n._hasIconsOrAvatarsAt("before")),G(7),U("ngIf",n._hasCheckboxAt("after")),G(1),U("ngIf",n._hasRadioAt("after")),G(1),U("ngIf",n._hasIconsOrAvatarsAt("after")))},dependencies:[CU,vi,xy],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 ise={provide:To,useExisting:Gn(()=>MC),multi:!0};class rse{constructor(t,e){this.source=t,this.options=e}}let MC=(()=>{class i extends KR{get multiple(){return this._multiple}set multiple(e){const n=Jt(e);n!==this._multiple&&(this._multiple=n,this.selectedOptions=new HR(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 Re,this._onChange=r=>{},this.selectionChange=new We,this.color="accent",this.compareWith=(r,s)=>r===s,this._multiple=!0,this._hideSingleSelectionIndicator=this._defaultOptions?.hideSingleSelectionIndicator??!1,this.selectedOptions=new HR(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 rse(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(He(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()&&Ko(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 RU(this._items).withHomeAndEnd().withTypeAhead().withWrap().skipPredicate(()=>this.disabled),this._resetActiveOption(),this._keyManager.change.subscribe(e=>this._setActiveOption(e)),this._items.changes.pipe(He(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=FM();return e&&this._element.nativeElement.contains(e)}}return i.\u0275fac=function(e){return new(e||i)(E(mt),E(ft))},i.\u0275cmp=ot({type:i,selectors:[["mat-selection-list"]],contentQueries:function(e,n,r){if(1&e&&$i(r,wC,5),2&e){let s;Et(s=At())&&(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&&Ue("keydown",function(s){return n._handleKeydown(s)}),2&e&&Dt("aria-multiselectable",n.multiple)},inputs:{color:"color",compareWith:"compareWith",multiple:"multiple",hideSingleSelectionIndicator:"hideSingleSelectionIndicator",disabled:"disabled"},outputs:{selectionChange:"selectionChange"},exportAs:["matSelectionList"],features:[Dn([ise,{provide:KR,useExisting:i},{provide:$H,useExisting:i}]),lt,bi],ngContentSelectors:kre,decls:1,vars:0,template:function(e,n){1&e&&(sr(),Wt(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})(),sse=(()=>{class i{}return i.\u0275fac=function(e){return new(e||i)},i.\u0275mod=nn({type:i}),i.\u0275inj=Kt({imports:[HI,Ao,Qn,eb,QU,RV]}),i})();function ose(i,t){if(1&i&&(W(0,"mat-label"),Ve(1),j()),2&i){const e=he(2);G(1),_i(e.resource.name)}}function ase(i,t){if(1&i&&(W(0,"mat-list-option",5),Ve(1),j()),2&i){const e=t.$implicit,n=he(2);U("value",e.key)("selected",n.resource.data[e.key])("disabled",n.disabled),G(1),Zi(" ",e.key," ")}}function lse(i,t){if(1&i){const e=di();Gr(0,1),fe(1,ose,2,1,"mat-label",2),W(2,"mat-selection-list",3),Ue("selectionChange",function(r){return an(e),zt(he().onSelection(r))}),fe(3,ase,2,4,"mat-list-option",4),Ct(4,"keyvalue"),j(),$r()}if(2&i){const e=he();U("matTooltip",e.resourceDescription),G(1),U("ngIf",e.resource.name),G(1),U("disabled",e.disabled),G(1),U("ngForOf",Tt(4,4,e.resource.data))}}let cse=(()=>{class i{constructor(){this.resource=null,this.resourceDescription="",this.disabled=!1,this.changed=new We}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=ot({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&&fe(0,lse,5,6,"ng-container",0),2&e&&U("ngIf",n.resource)},dependencies:[Eo,vi,Io,Os,MC,wC,cB],styles:["[_nghost-%COMP%]{padding-bottom:1.34375em}"],changeDetection:0}),i})();class WH{get tick$(){return this._tick$.asObservable()}get children(){return[...this._children]}constructor(t){this.parent=t,this._tick$=new Re,this._children=[],t&&t.addChild(this)}addChild(t){if(t.parent!==this)throw new Error("Incorrect child clock");this._children.includes(t)||this._children.push(t)}removeChild(t){if(t.parent!==this)throw new Error("Incorrect child clock");this._children=this._children.filter(e=>e!==t)}dispose(){this.parent&&this.parent.removeChild(this);for(const t of this._children)t.dispose();this._tick$.complete()}}const use=typeof performance>"u"?()=>Date.now():()=>performance.now();class jm extends WH{static get instance(){return jm._instance||(jm._instance=new jm),jm._instance}get elapsedTime(){return use()}constructor(){super(null);let t=this.elapsedTime;const e=()=>{requestAnimationFrame(e);const n=t,r=this.elapsedTime;t=r,this._tick$.next([n,r-n])};requestAnimationFrame(e)}dispose(){throw new Error("Cannot dispose global clock")}}class jH extends WH{get isRunning(){return!!this.tickSub}get isPaused(){return-1!==this.pausedAt}get isStopped(){return-1===this.startedAt}get timeScale(){return this._timeScale}set timeScale(t){if(t!==this._timeScale||this.pausedByTimescale&&0!==t){if(0===t)return void(this.isPaused||(this.pause(),this.pausedByTimescale=!0));if(this.isPaused&&this.pausedByTimescale&&(this.resume(),this.pausedByTimescale=!1),!this.isStopped){const e=this.isPaused?this.pausedAt:this.parentClock.elapsedTime;this.startedAt=e-(e-this.startedAt)*this.timeScale/t}this._timeScale=t}}get elapsedTime(){return this.isStopped?this.lastStopElapsed:this.isPaused?this._timeScale*(this.pausedAt-this.startedAt):this._timeScale*(this.parentClock.elapsedTime-this.startedAt)}constructor(t=!1,e=jm.instance){super(e),this.parentClock=e,this.tickSub=null,this._internalTick$=new Re,this.tickRateLimit=0,this.paused$=new Re,this.startedAt=-1,this.oldRelativeTime=0,this.pausedAt=-1,this.lastStopElapsed=0,this._timeScale=1,this.pausedByTimescale=!1,this.lastFiredTickElapsed=0,t&&this.start(),this._internalTick$.pipe(et(([n,r])=>[r,r-this.lastFiredTickElapsed]),gn(([n])=>!this.tickRateLimit||Math.floor(this.lastFiredTickElapsed*this.tickRateLimit/1e3)this.lastFiredTickElapsed=n)).subscribe(this._tick$)}start(){this.isRunning||(this.oldRelativeTime=0,this.startedAt=this.parentClock.elapsedTime,this.startListeningTicks())}stop(){this.stopListeningTicks(),this.lastStopElapsed=this.elapsedTime,this.startedAt=this.pausedAt=-1}pause(){this.stopListeningTicks(),this.pausedAt=this.parentClock.elapsedTime,this.pausedByTimescale=!1,this.paused$.next(!0)}resume(){this.isRunning||-1==this.pausedAt||(this.startedAt+=this.parentClock.elapsedTime-this.pausedAt,this.pausedAt=-1,this.startListeningTicks(),this.paused$.next(!1))}startListeningTicks(){if(this.tickSub)throw new Error("Clock is already ticking!");this.tickSub=this.parentClock.tick$.pipe(et(([t,e])=>[this.oldRelativeTime,this.oldRelativeTime+e*this.timeScale]),Ui(([t,e])=>this.oldRelativeTime=e)).subscribe(this._internalTick$)}stopListeningTicks(){var t;null===(t=this.tickSub)||void 0===t||t.unsubscribe(),this.tickSub=null}dispose(){this.stopListeningTicks(),this._internalTick$.complete(),super.dispose()}}const hse={transparent:!1,background:0,size:"fullscreen",antialias:!0};class fse{constructor(t,e,n={}){this.scene=t,this.canvas=e,this.entity=null,this.rendererOptions=Object.assign(Object.assign({},hse),n||{})}}class pb{static fromArray(t,e=!1){const n=new pb(t[0]);let r=n;for(let s=1;sn.map(r=>new pb(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]}constructor(t){this.data=t,this.adjacent=new Set}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(d=>!e.has(d));for(const d of c)e.add(d),r.push([d,a-1])}}return n}nodes(){return Array.from(this.walkRead(-1))}}var sc=(()=>{return(i=sc||(sc={}))[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",sc;var i})();let Xh=(()=>{class i{constructor(){this.tick$=new Re,this._world=null,this._name="e0x"+(i.default_name_counter++).toString(16),this._selfActive=!0,this.parent=null,this._children=[],this._components=[],this._onSpawned$=new Re,this._onRemoved$=new Re}get world(){return this._world}get name(){return this._name}set name(e){this._name=e}get active(){return this._selfActive&&(!this.parent||this.parent.active)}set active(e){this._selfActive=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 pse extends Xh{constructor(t){super(),this.tickOrder=t}}function Ym(i,t=sc.CONTROLLERS,e){const n=new pse(t);return e&&(n.name=e),i.addEntity(n),n.tick$.pipe(su(()=>{i.removeEntity(n,!0)}))}class ZR extends Xh{get rendererSize$(){return this._rendererSize$.asObservable()}get rendererSize(){return this._rendererSize$.getValue()}get rendererOptions(){return this.renderer.rendererOptions}get physicsDebugViewActive(){return this.renderer.physicsDebugViewActive}set physicsDebugViewActive(t){this.renderer.physicsDebugViewActive=t}constructor(t){super(),this.renderer=t,this.tickOrder=sc.RENDERING,this._rendererSize$=new gt(null),this.addComponents(t),this.tick$.subscribe(()=>{this.renderer.render()})}onSpawned(t){this._rendererSize$.next(null),"fullscreen"==this.rendererOptions.size||"function"==typeof this.rendererOptions.size?(this.renderer.canvas&&(this.renderer.canvas.style.position="absolute"),Mr(Ia(window,"resize").pipe(PM(100)),Ia(window,"orientationchange")).pipe(He(this._onRemoved$),et(()=>({x:window.innerWidth,y:window.innerHeight})),Do({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 In||void 0!==this.rendererOptions.size.subscribe&&void 0!==this.rendererOptions.size.pipe?this.rendererOptions.size.pipe(He(this._onRemoved$)).subscribe(e=>{this._rendererSize$.next(e)}):this._rendererSize$.next(this.rendererOptions.size),this._rendererSize$.pipe(He(this._onRemoved$),Zl((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 QR=i=>{i.updateVisibility?i.updateVisibility():YH(i)},YH=i=>{for(const t of i.children)QR(t)};class mse extends Xh{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(){YH(this)}addChildren(...t){super.addChildren(...t);for(const e of t)QR(e)}removeChildren(t,e=!1){if(super.removeChildren(t,e),!e)for(const n of t)QR(n)}}class JR{constructor(){this._running=!1,this.stop$=new Re}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 gse extends JR{get output$(){return this._output$.asObservable()}constructor(t,e){super(),this.keyboard=t,this.keymap=e,this._output$=new Re}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")),nu(t.map(e=>this.keyboard.bindMany(...e))).pipe(He(this.stop$),et(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 ek=new In(ms);class CC extends JR{constructor(){super(),this.bindings={},this.skipKeyDownsOnExternalFocus=!0,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 gt(!1);return this.bindings[t].push(e),e.pipe(Zl(),su(()=>{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"),ek;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 gt(!1);this.bindings[n].push(r),e.push(r)}return nu(e).pipe(su(()=>{for(let n=0;nn.includes(!0)),Zl())}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 CC.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)}}CC.externalFocusBlacklist=[HTMLInputElement,HTMLTextAreaElement,HTMLSelectElement,HTMLButtonElement];class qr{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 qr.len(qr.sub(t,e))}static norm(t){const e=qr.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 vse={pointerLock:!1};var Fs=(()=>{return(i=Fs||(Fs={}))[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",Fs;var i})();class qm extends JR{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$=Ia(this._element,"wheel",{passive:!1}).pipe(He(this.stopped$),su(()=>this._wheel$=null),Ui(t=>t.preventDefault()),et(t=>t.deltaY),Uf())),this._wheel$}get isPointerLocked(){return!!document.pointerLockElement}get isPointerLocked$(){return Ia(document,"pointerlockchange").pipe(et(()=>this.isPointerLocked))}get state(){return this._state$.getValue()}get state$(){return this._state$.asObservable()}get multiTouchPositions$(){return this._multiTouchPositions$.asObservable()}get twoTouchGestureDelta$(){return this.state$.pipe(Rs(t=>t==Fs.DRAG_TOUCH_TWO_FINGERS?this.multiTouchPositions$:ek),et(t=>t.map(e=>({x:e.x,y:e.y}))),function _se(){return ti((i,t)=>{let e,n=!1;i.subscribe(Yn(t,r=>{const s=e;e=r,n&&t.next([s,r]),n=!0}))})}(),gn(([t,e])=>t.length>1&&e.length>1),et(([t,e])=>({centerPointDelta:qr.sub(qr.scalarMult(e.reduce((n,r)=>qr.add(n,r),qr.O),1/e.length),qr.scalarMult(t.reduce((n,r)=>qr.add(n,r),qr.O),1/e.length)),angleDelta:qr.angle(e[1],e[0])-qr.angle(t[1],t[0]),distanceDelta:qr.dist(e[1],e[0])-qr.dist(t[1],t[0])})))}get _element(){return this.options.canvas||window}constructor(t={}){super(),this._wheel$=null,this._delta$=new Re,this._position$=new gt(qr.O),this._multiTouchPositions$=new gt([]),this.stopped$=new Re,this._state$=new gt(Fs.NONE),this.options=Object.assign(Object.assign({},vse),t),this.canvasClickListener=this.canvasClickListener.bind(this)}startInternal(){this.options.canvas&&(this.options.canvas.style.touchAction="none"),this._state$.next(Fs.NONE);const t=[Fs.DRAG,Fs.DRAG_MIDDLE_BUTTON,Fs.DRAG_RIGHT_BUTTON],e=[Fs.NONE,Fs.DRAG,Fs.DRAG_TOUCH_TWO_FINGERS],n=[],r={};Ia(this._element,"mousemove").pipe(He(this.stopped$)).subscribe(o=>{this._delta$.next({x:o.movementX,y:o.movementY})}),Ia(this._element,"pointermove").pipe(He(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})}),!qm.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{if(0===n.length)try{this.options.canvas&&this.options.canvas.setPointerCapture(o.pointerId),window.addEventListener("pointerup",s),this._element.addEventListener("pointercancel",s)}catch(a){console.error(a)}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]||Fs.NONE)}),Ia(this._element,"contextmenu").pipe(He(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 yse{static lookAt(t,e,n){let r=Pe.sub(t,e);r=0===Pe.lenSq(r)?Object.assign(Object.assign({},r),{z:1}):Pe.norm(r);let s=Pe.cross(n,r);0===Pe.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=Pe.norm(r),s=Pe.cross(n,r)),s=Pe.norm(s);let o=Pe.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 ji{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,d=t.w*Math.sin((1-n)*s)/o+e.w*Math.sin(n*s)/o;return isNaN(a)||isNaN(l)||isNaN(c)||isNaN(d)?ji.clone(t):{x:a,y:l,z:c,w:d}}static fromAngle(t,e){const n=e/2,r=Math.sin(n);return Object.assign(Object.assign({},Pe.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],d=t[10],h=e+o+d;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>d){const p=2*Math.sqrt(1+e-o-d);return{x:.25*p,y:(n+s)/p,z:(r+l)/p,w:(c-a)/p}}if(o>d){const p=2*Math.sqrt(1+o-e-d);return{x:(n+s)/p,y:.25*p,z:(a+c)/p,w:(r-l)/p}}{const p=2*Math.sqrt(1+d-e-o);return{x:(r+l)/p,y:(a+c)/p,z:.25*p,w:(s-n)/p}}}static fromMatrix3(t){const e=t[0][0]+t[1][1]+t[2][2];let n,r,s,o;if(e>0){const a=.5/Math.sqrt(e+1);n=.25/a,r=(t[2][1]-t[1][2])*a,s=(t[0][2]-t[2][0])*a,o=(t[1][0]-t[0][1])*a}else if(t[0][0]>t[1][1]&&t[0][0]>t[2][2]){const a=2*Math.sqrt(1+t[0][0]-t[1][1]-t[2][2]);n=(t[2][1]-t[1][2])/a,r=.25*a,s=(t[0][1]+t[1][0])/a,o=(t[0][2]+t[2][0])/a}else if(t[1][1]>t[2][2]){const a=2*Math.sqrt(1+t[1][1]-t[0][0]-t[2][2]);n=(t[0][2]-t[2][0])/a,r=(t[0][1]+t[1][0])/a,s=.25*a,o=(t[1][2]+t[2][1])/a}else{const a=2*Math.sqrt(1+t[2][2]-t[0][0]-t[1][1]);n=(t[1][0]-t[0][1])/a,r=(t[0][2]+t[2][0])/a,s=(t[1][2]+t[2][1])/a,o=.25*a}return{w:n,x:r,y:s,z:o}}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),d=Math.sin(.5*e);return{w:c*a*s+d*l*o,x:d*a*s-c*l*o,y:c*l*s+d*a*o,z:c*a*o-d*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=Pe.Z){return this.fromMatrix4(yse.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 Pe{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 Pe.len(Pe.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=Pe.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,ji.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)}}}function tk(i,t,e,n){return r=>r.pipe(tI((s,o)=>{var a;return{targetValue:o,currentValue:null!==(a=s.currentValue)&&void 0!==a?a:o,hasReachedTarget:!1}},{targetValue:null,currentValue:null,hasReachedTarget:!1}),Rs(s=>i.pipe(et(([o,a])=>{if(null===s.targetValue||null===s.currentValue)return s.currentValue;if(s.hasReachedTarget)return;const l=1-Math.exp(-a/t),c=e(s.currentValue,s.targetValue,l);return s.currentValue=c,n(c,s.targetValue)?(s.hasReachedTarget=!0,s.targetValue):c}))),et(s=>void 0!==s?s:null),gn(s=>null!==s))}ps(738);class wse extends Xh{get avgReport(){return this._avgReport}get peakReport(){return this._peakReport}constructor(t=60,e=15){super(),this.maxSamples=t,this.maxRows=e,this.tickOrder=Number.MAX_SAFE_INTEGER,this.sampleIndex=0,this.collectedData=new Map,this._avgReport={totalTime:0,entries:[]},this._peakReport={totalTime:0,entries:[]}}onSpawned(t){super.onSpawned(t),this.sampleIndex=0;const e=()=>(typeof performance>"u"?Date:performance).now();this.world.tickForwardTo$.pipe(He(this.onRemoved$)).subscribe(n=>{n!==this&&(this.collectedData.has(n)?this.collectedData.get(n).push([this.sampleIndex,e(),0]):this.collectedData.set(n,[[this.sampleIndex,e(),0]]))}),this.world.tickForwardedTo$.pipe(He(this.onRemoved$)).subscribe(n=>{if(n===this)return;const r=this.collectedData.get(n);r[r.length-1][2]=e()}),this.tick$.pipe(He(this.onRemoved$)).subscribe(()=>{this.sampleIndex++;const n=Array.from(this.collectedData.entries());for(const[h,p]of n){for(;p.length>0&&p[0][0]h instanceof Xh?""===h.name?h.constructor.name:h.name:"PHYSICS_WORLD"===h?"Physics simulation":h,s=h=>{let p=0,m=0;for(;mh.length-m+1){m--;break}p+=h[h.length-m-1][1]}return m>1&&(h=h.slice(0,h.length-m)).push([`Rest (${m})`,p]),h};let o=0,a=Array.from(this.collectedData.entries()).map(([h,p])=>{const m=p.reduce((g,[b,v,y])=>g+y-v,0)/this.maxSamples;return o+=m,[r(h),m]}).sort((h,p)=>p[1]-h[1]);a=s(a),this._avgReport={totalTime:o,entries:a};let l=new Map,c=Array.from(this.collectedData.entries()).map(([h,p])=>{let m=0;for(const[g,b,v]of p){const y=v-b;m=Math.max(m,y),l.set(g,y+(l.get(g)||0))}return[r(h),m]}).sort((h,p)=>p[1]-h[1]);c=s(c);let d=Array.from(l.values()).reduce((h,p)=>Math.max(h,p),0);this._peakReport={totalTime:d,entries:c}})}onRemoved(){super.onRemoved(),this.collectedData=new Map,this._avgReport={totalTime:0,entries:[]},this._peakReport={totalTime:0,entries:[]}}}var Xm=function(i,t,e,n){return new(e||(e=Promise))(function(s,o){function a(d){try{c(n.next(d))}catch(h){o(h)}}function l(d){try{c(n.throw(d))}catch(h){o(h)}}function c(d){d.done?s(d.value):function r(s){return s instanceof e?s:new e(function(o){o(s)})}(d.value).then(a,l)}c((n=n.apply(i,t||[])).next())})};class yl{static get documentWorlds(){return[...yl._documentWorlds]}constructor(t,e){this.visualScene=t,this.physicsWorld=e,this.worldClock=new jH(!1),this.keyboardInput=new CC,this.name="w0x"+(yl.default_name_counter++).toString(16),this.children=[],this.tickListeners=[],this.tickStarted$=new Re,this.tickForwardTo$=new Re,this.tickForwardedTo$=new Re,this.paused$=new Re,this.disposed$=new Re,this.keyboardInput.start(),window.ggstatic?this.registerConsoleCommands(window.ggstatic):(this.onGgStaticInitialized=this.onGgStaticInitialized.bind(this),window.addEventListener("ggstatic_added",this.onGgStaticInitialized)),this.worldClock.paused$.subscribe(this.paused$),yl._documentWorlds.push(this),yl.worldCreated$.next(this)}init(){return Xm(this,void 0,void 0,function*(){yield Promise.all([this.physicsWorld.init(),this.visualScene.init()]);const t=(e,n,r)=>{e.active&&(this.tickForwardTo$.next(e),e.tick$.next([n,r]),this.tickForwardedTo$.next(e))};this.worldClock.tick$.subscribe(([e,n])=>{this.tickStarted$.next();let r=0;for(;r=sc.PHYSICS_SIMULATION);r++)t(this.tickListeners[r],e,n);for(this.tickForwardTo$.next("PHYSICS_WORLD"),this.physicsWorld.simulate(n),this.tickForwardedTo$.next("PHYSICS_WORLD");re.tickOrder-n.tickOrder),t.onSpawned(this))}removeEntity(t,e=!1){if(t.world){if(t.world!==this)throw new Error("Entity is not a part of this world");this.children.splice(this.children.findIndex(n=>n===t),1),this.tickListeners.splice(this.tickListeners.findIndex(n=>n===t),1),t.onRemoved()}e&&t.dispose()}onGgStaticInitialized(){window.removeEventListener("ggstatic_added",this.onGgStaticInitialized),this.registerConsoleCommands(window.ggstatic)}registerConsoleCommands(t){t.registerConsoleCommand(this,"timescale",(...e)=>Xm(this,void 0,void 0,function*(){return isNaN(+e[0])||(this.worldClock.timeScale=+e[0]),this.worldClock.timeScale.toString()}),"args: [ float? ]; Get current time scale of selected world clock or set it. Default value is 1.0 (no time scale applied)"),t.registerConsoleCommand(this,"fps_limit",(...e)=>Xm(this,void 0,void 0,function*(){return isNaN(+e[0])||(this.worldClock.tickRateLimit=+e[0]),this.worldClock.tickRateLimit.toString()}),"args: [ int? ]; Get current tick rate limit of selected world clock or set it. 0 means no limit applied"),t.registerConsoleCommand(this,"renderers",()=>Xm(this,void 0,void 0,function*(){return this.children.filter(e=>e instanceof ZR).map(e=>e.name).join("\n")}),"no args; Print all renderers in selected world"),t.registerConsoleCommand(this,"debug_view",(...e)=>Xm(this,void 0,void 0,function*(){let r,n="toggle";for(let o of e)["1","0"].includes(o)?n="1"===o:r=o;let s=this.children.find(o=>o instanceof ZR&&(!r||o.name===r));if(s)return s.physicsDebugViewActive="toggle"===n?!s.physicsDebugViewActive:n,s.physicsDebugViewActive?"1":"0";throw r?new Error(`Renderer with name "${r}" not found`):new Error("No renderer found")}),'args: [ 0|1?, string? ]; Turn on/off physics debug view, skip first argument to toggle value. Second argument expects renderer name, if not provided first renderer will be picked. Use "renderers" to get list of renderers in the world'),t.registerConsoleCommand(this,"performance",(...e)=>Xm(this,void 0,void 0,function*(){let n="avg",r=20;for(let d of e)["avg","peak"].includes(d)?n=d:isNaN(+d)||(r=+d);const s=new wse(r,250);this.addEntity(s),yield function bse(i,t){const e="object"==typeof t;return new Promise((n,r)=>{let o,s=!1;i.subscribe({next:a=>{o=a,s=!0},error:r,complete:()=>{s?n(o):e?n(t.defaultValue):r(new fm)}})})}(this.worldClock.tick$.pipe(Pi(r)));const o="avg"===n?s.avgReport:s.peakReport;this.removeEntity(s);const a=o.entries.map(([d,h])=>`${d}:`+new Array(Math.max(0,26-d.length)).join(" ")+`${h.toFixed(2)} ms`+("avg"===n?` (${(100*h/o.totalTime).toFixed(2)}%)`:""));let l="lightgreen";o.totalTime>12&&(l=o.totalTime<16?"yellow":"red");const c=("avg"===n?"Average":"Peak")+" Frame time";return a.unshift(c+":"+new Array(Math.max(0,26-c.length)).join(" ")+`${o.totalTime.toFixed(2)} ms`),a.unshift(`Performance report (${r} samples)`),a.join("\n")}),'args: [ int?, avg|peak? ]; Measure how much time was spent per entity in world. Arguments are samples amount (20 by default) and "peak" or "avg" choice, both arguments are optional. "avg" report sorts entities by average time consumed, "peak" records highest value for each entity')}}yl.default_name_counter=0,yl._documentWorlds=[],yl.worldCreated$=new Re;class Ese extends fse{}class XH extends mse{constructor(){super(...arguments),this._world=null}get world(){return this._world}}class Qo extends XH{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}constructor(t){super(),this.tickOrder=sc.OBJECTS_BINDING,this._position=Pe.O,this._rotation=ji.O,this.object3D=null,this.objectBody=null,t.objectBody&&(this.objectBody=t.objectBody,this.name=this.objectBody.name,this.addComponents(this.objectBody)),t.object3D&&(this.object3D=t.object3D,t.objectBody||(this._position=this.object3D.position,this._rotation=this.object3D.rotation,this.name=this.object3D.name),this.addComponents(this.object3D)),this.objectBody&&(this.tick$.subscribe(()=>{this.runTransformBinding(this.objectBody,this.object3D)}),this.runTransformBinding(this.objectBody,this.object3D))}}class Km extends pb{static fromMapArray(t,e=!1){const n=new Km(t[0]);let r=n;for(let s=1;sn.map(r=>new Km(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));othis.mapGraph.getNearestDummy(this.mapGraphNodes,this.loaderCursor$.getValue())),Zl(),Ui(r=>this._nearestDummy$.next(r))).subscribe(r=>{let o,s=new Set;if(this.options.inertia>0){o=new Set;const a=r.walkReadPreserveDepth(this.options.loadDepth+this.options.inertia);for(let l=0;lo.add(c.data)),l<=this.options.loadDepth&&a[l].forEach(c=>s.add(c.data))}else r.walkRead(this.options.loadDepth).forEach(a=>s.add(a.data)),o=s;for(const a of this.loaded.keys())o.has(a)?s.delete(a):n.includes(a)||n.push(a);for(let a of Array.from(s.keys()))e.includes(a)||e.push(a)}),this.tick$.pipe(Do(null),He(this._onRemoved$)).subscribe(()=>{if(n.length){for(const r of n)this.disposeChunk(r);n=[]}if(e.length)if(this._initialLoadComplete$.value&&e.length>this.options.maxNodesLoadingPerTick){let r=e.slice(0,this.options.maxNodesLoadingPerTick);e=e.slice(this.options.maxNodesLoadingPerTick),Promise.all(r.map(s=>this.loadChunk(s))).then()}else Promise.all(e.map(r=>this.loadChunk(r))).then(()=>{this._initialLoadComplete$.value||this._initialLoadComplete$.next(!0)}),e=[]})}onRemoved(){super.onRemoved(),this.loadClock&&(this.loadClock.stop(),this.loadClock=null),this.loaderCursor$.next(Pe.O)}loadChunk(t){return function(i,t,e,n){return new(e||(e=Promise))(function(s,o){function a(d){try{c(n.next(d))}catch(h){o(h)}}function l(d){try{c(n.throw(d))}catch(h){o(h)}}function c(d){d.done?s(d.value):function r(s){return s instanceof e?s:new e(function(o){o(s)})}(d.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||ji.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||ji.O}]),[n,e]})}disposeChunk(t){this.loaded.has(t)&&(this.removeChildren(this.loaded.get(t),!0),this.loaded.delete(t))}}class Tse extends ZR{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 e4=function(i,t,e,n){return new(e||(e=Promise))(function(s,o){function a(d){try{c(n.next(d))}catch(h){o(h)}}function l(d){try{c(n.throw(d))}catch(h){o(h)}}function c(d){d.done?s(d.value):function r(s){return s instanceof e?s:new e(function(o){o(s)})}(d.value).then(a,l)}c((n=n.apply(i,t||[])).next())})};const t4={keymap:"wasd",cameraLinearSpeed:20,cameraMovementElasticity:0,cameraBoostMultiplier:2.5,cameraRotationSensitivity:1,cameraRotationElasticity:0,mouseOptions:{},ignoreMouseUnlessPointerLocked:!1,ignoreKeyboardUnlessPointerLocked:!1};class n4 extends Xh{get active(){return super.active}set active(t){!super.active&&t&&this.reset(),super.active=t}get spherical(){return this._spherical}set spherical(t){this._spherical.phi=Math.max(1e-6,Math.min(Math.PI-1e-6,t.phi)),this._spherical.theta=t.theta,this.resetMotion$.next()}constructor(t,e,n={}){super(),this.keyboard=t,this.camera=e,this.tickOrder=sc.INPUT_CONTROLLERS,this._spherical={phi:0,radius:1,theta:0},this.resetMotion$=new Re,this.options=Object.assign(Object.assign({},t4),n),n.mouseOptions&&(this.options.mouseOptions=Object.assign(Object.assign({},t4.mouseOptions),n.mouseOptions)),this.mouseInput=new qm(this.options.mouseOptions),this.directionsInput=new gse(t,this.options.keymap)}reset(){this._spherical=Pe.toSpherical(Pe.rot({x:0,y:0,z:-1},this.camera.rotation)),this.resetMotion$.next()}onSpawned(t){const e=Object.create(null,{onSpawned:{get:()=>super.onSpawned}});return e4(this,void 0,void 0,function*(){yield e.onSpawned.call(this,t),this._spherical=Pe.toSpherical(Pe.rot({x:0,y:0,z:-1},this.camera.rotation));const n=["KeyE","KeyQ"];this.camera.camera.supportsFov&&n.push("KeyZ","KeyC"),n.push("ShiftLeft");let r=nu([this.directionsInput.output$,...n.map(c=>this.keyboard.bind(c))]).pipe(He(this._onRemoved$),et(([c,...d])=>{let h={direction:{},rest:[]};(!this.options.ignoreKeyboardUnlessPointerLocked||this.mouseInput.isPointerLocked)&&(h={direction:c,rest:d});let p=Object.assign({},Pe.O);const[m,g,b,v,y]=h.rest;void 0!==h.direction.upDown&&(p.z=h.direction.upDown?-1:1),void 0!==h.direction.leftRight&&(p.x=h.direction.leftRight?-1:1),m!=g&&(p.y=g?-1:1);let M=0;return b!=v&&(M=b?1:-1),p=Pe.norm(p),y&&(p=Pe.scalarMult(p,this.options.cameraBoostMultiplier)),[p,M]}));this.options.cameraMovementElasticity>0&&(r=r.pipe(tk(this.camera.tick$,this.options.cameraMovementElasticity,([c,d],[h,p],m)=>[Pe.lerp(c,h,m),p],([c,d],[h,p])=>d==p&&Pe.dist(c,h)<.001)));let s=Pe.O,o=0;r.subscribe(([c,d])=>{s=c,o=d});let a=qm.isTouchDevice(),l=this.mouseInput.delta$.pipe(He(this._onRemoved$),gn(()=>this.active&&(a||!this.options.ignoreMouseUnlessPointerLocked||this.mouseInput.isPointerLocked)));if(this.options.cameraRotationElasticity>0){const c=new gt(this._spherical);l.subscribe(h=>{const p=c.getValue();c.next({phi:Math.max(1e-6,Math.min(Math.PI-1e-6,p.phi+h.y*this.options.cameraRotationSensitivity/1e3)),theta:p.theta-h.x*this.options.cameraRotationSensitivity/1e3,radius:1})});const d=()=>{c.pipe(He(this._onRemoved$),tk(this.tick$,this.options.cameraRotationElasticity,(h,p,m)=>({phi:h.phi+m*(p.phi-h.phi),theta:h.theta+m*(p.theta-h.theta),radius:1}),(h,p)=>qr.dist({x:h.phi,y:h.theta},{x:p.phi,y:p.theta})<1e-4),He(this.resetMotion$)).subscribe(h=>{this._spherical.theta=h.theta,this._spherical.phi=h.phi})};this.resetMotion$.pipe(He(this._onRemoved$)).subscribe(()=>{c.next(this._spherical),d()}),d()}else l.subscribe(c=>{this._spherical.theta-=c.x*this.options.cameraRotationSensitivity/1e3,this._spherical.phi+=c.y*this.options.cameraRotationSensitivity/1e3,this._spherical.phi=Math.max(1e-6,Math.min(Math.PI-1e-6,this._spherical.phi))});this.camera.tick$.pipe(He(this._onRemoved$),gn(()=>this.active)).subscribe(([c,d])=>{this.camera.camera.fov+=o,this.camera.position=Pe.add(this.camera.position,Pe.rot(Pe.scalarMult(s,this.options.cameraLinearSpeed*d/1e3),this.camera.rotation)),this.camera.rotation=ji.lookAt(this.camera.position,Pe.add(this.camera.position,Pe.fromSpherical(this._spherical)))}),this.mouseInput.start(),this.directionsInput.start()})}onRemoved(){const t=Object.create(null,{onRemoved:{get:()=>super.onRemoved}});return e4(this,void 0,void 0,function*(){yield t.onRemoved.call(this),yield this.mouseInput.stop(!0),yield this.directionsInput.stop()})}}var i4=function(i,t,e,n){return new(e||(e=Promise))(function(s,o){function a(d){try{c(n.next(d))}catch(h){o(h)}}function l(d){try{c(n.throw(d))}catch(h){o(h)}}function c(d){d.done?s(d.value):function r(s){return s instanceof e?s:new e(function(o){o(s)})}(d.value).then(a,l)}c((n=n.apply(i,t||[])).next())})};const Rse={mouseOptions:{},orbiting:{sensitivityX:1,sensitivityY:1},orbitingElasticity:0,zooming:{sensitivity:1},panning:{sensitivityX:1,sensitivityY:1},dollying:{sensitivity:1}};class kse extends Xh{get active(){return super.active}set active(t){!super.active&&t&&this.reset(),super.active=t}get spherical(){return this._spherical}set spherical(t){this._spherical.phi=Math.max(1e-6,Math.min(Math.PI-1e-6,t.phi)),this._spherical.theta=t.theta,this._spherical.radius=t.radius,this.resetMotion$.next()}constructor(t,e={}){super(),this.camera=t,this.tickOrder=sc.INPUT_CONTROLLERS,this._spherical={phi:0,radius:10,theta:0},this.target=Pe.O,this.resetMotion$=new Re,this.options=Object.assign(Object.assign({},Rse),e),this.mouseInput=new qm(this.options.mouseOptions)}reset(){let t=Pe.dist(this.target,this.camera.position);this.target=Pe.add(this.camera.position,Pe.rot({x:0,y:0,z:-t},this.camera.rotation)),this._spherical=Pe.toSpherical(Pe.sub(this.camera.position,this.target)),this.resetMotion$.next()}onSpawned(t){const e=Object.create(null,{onSpawned:{get:()=>super.onSpawned}});return i4(this,void 0,void 0,function*(){if(yield e.onSpawned.call(this,t),this._spherical=Pe.toSpherical(Pe.sub(this.camera.position,this.target)),this.options.orbiting){let r=this.mouseInput.delta$.pipe(He(this._onRemoved$),gn(()=>this.active&&this.mouseInput.state==Fs.DRAG));if(this.options.orbitingElasticity>0){const s=new gt(this._spherical);r.subscribe(a=>{const l=s.getValue();s.next({phi:Math.max(1e-6,Math.min(Math.PI-1e-6,l.phi-a.y*this.options.orbiting.sensitivityY/1e3)),theta:l.theta-a.x*this.options.orbiting.sensitivityX/1e3,radius:1})});const o=()=>{s.pipe(He(this._onRemoved$),tk(this.tick$,this.options.orbitingElasticity,(a,l,c)=>({phi:a.phi+c*(l.phi-a.phi),theta:a.theta+c*(l.theta-a.theta),radius:1}),(a,l)=>qr.dist({x:a.phi,y:a.theta},{x:l.phi,y:l.theta})<1e-4),He(this.resetMotion$)).subscribe(a=>{this._spherical.theta=a.theta,this._spherical.phi=a.phi})};this.resetMotion$.pipe(He(this._onRemoved$)).subscribe(()=>{s.next(this._spherical),o()}),o()}else r.subscribe(s=>{this._spherical.theta-=s.x*this.options.orbiting.sensitivityX/1e3,this._spherical.phi-=s.y*this.options.orbiting.sensitivityY/1e3,this._spherical.phi=Math.max(1e-6,Math.min(Math.PI-1e-6,this._spherical.phi))})}this.options.zooming&&this.mouseInput.wheel$.pipe(He(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=Pe.fromSpherical(this._spherical),o=Pe.rotAround(s,{x:-Math.sin(this._spherical.theta),y:Math.cos(this._spherical.theta),z:0},Math.PI/2),a=Pe.rotAround(s,Pe.norm(o),Math.PI/2);this.target=Pe.add(this.target,Pe.add(Pe.scalarMult(o,-this.options.panning.sensitivityY*r.y/1e3),Pe.scalarMult(a,this.options.panning.sensitivityX*r.x/1e3)))};this.options.panning&&this.mouseInput.delta$.pipe(He(this._onRemoved$),gn(()=>this.mouseInput.state==Fs.DRAG_RIGHT_BUTTON)).subscribe(r=>{n(r)}),this.options.dollying&&this.mouseInput.delta$.pipe(He(this._onRemoved$),gn(()=>this.mouseInput.state==Fs.DRAG_MIDDLE_BUTTON)).subscribe(r=>{this._spherical.radius*=Math.pow(.95,-this.options.dollying.sensitivity*r.y/10)}),qm.isTouchDevice()&&(this.options.dollying||this.options.panning)&&this.mouseInput.twoTouchGestureDelta$.pipe(He(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(He(this._onRemoved$),gn(()=>this.active),et(()=>this._spherical)).subscribe(r=>{this.camera.position=Pe.add(this.target,Pe.fromSpherical(r)),this.camera.rotation=ji.lookAt(this.camera.position,this.target)}),yield this.mouseInput.start()})}onRemoved(){const t=Object.create(null,{onRemoved:{get:()=>super.onRemoved}});return i4(this,void 0,void 0,function*(){yield t.onRemoved.call(this),yield this.mouseInput.stop(!0)})}}class Ose{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 rk=function(i,t,e,n){return new(e||(e=Promise))(function(s,o){function a(d){try{c(n.next(d))}catch(h){o(h)}}function l(d){try{c(n.throw(d))}catch(h){o(h)}}function c(d){d.done?s(d.value):function r(s){return s instanceof e?s:new e(function(o){o(s)})}(d.value).then(a,l)}c((n=n.apply(i,t||[])).next())})},yu=(()=>{return(i=yu||(yu={}))[i.Nothing=0]="Nothing",i[i.Files=1]="Files",i[i.Entities=2]="Entities",yu;var i})();const r4={cachingStrategy:yu.Nothing,position:Pe.O,rotation:ji.O,loadProps:!0},s4=i=>({meta:i.meta,resources:i.resources.map(({object3D:t,body:e})=>({object3D:t&&t.clone(),body:e&&e.clone()}))});class Fse{constructor(t){this.world=t,this.filesCache=new Map,this.loadResultCache=new Map}loadGgGlbFiles(t){return rk(this,arguments,void 0,function*(e,n=!1){if(n&&this.filesCache.has(e))return this.filesCache.get(e);const r=Promise.all([fetch(`${e}.glb`).then(o=>o.arrayBuffer()),fetch(`${e}.meta`).then(o=>o.text()).then(o=>JSON.parse(o))]);n&&this.filesCache.set(e,r);const s=yield r;return n&&this.filesCache.set(e,s),s})}loadGgGlbResources(t){return rk(this,arguments,void 0,function*(e,n=yu.Nothing){if(n==yu.Entities&&this.loadResultCache.has(e)){const c=this.loadResultCache.get(e),d=c instanceof Promise?yield c:c;return s4(d)}const[r,s]=yield this.loadGgGlbFiles(e,n==yu.Files);if(!r)throw new Error("GLB not found");const[o,a]=yield Promise.all([this.world.visualScene.loader.loadFromGgGlb(r,s),this.world.physicsWorld.loader.loadFromGgGlb(r,s)]),l={resources:[],meta:s};if(!o)return l;if(0==a.length)l.resources.push({object3D:o,body:null});else if(1==a.length)l.resources.push({object3D:o,body:a[0]});else{for(const c of a)l.resources.push({object3D:o.popChild(c.name),body:c});o.isEmpty()||l.resources.push({object3D:o,body:null})}return n==yu.Entities&&this.loadResultCache.set(e,s4(l)),l})}loadGgGlb(t){return rk(this,arguments,void 0,function*(e,n=r4){const r=Object.assign(Object.assign({},r4),n),{resources:s,meta:o}=yield this.loadGgGlbResources(e,r.cachingStrategy),a={entities:s.map(l=>new Qo({object3D:l.object3D,objectBody:l.body})),meta:o};return r.loadProps&&(a.props=yield Promise.all(o.dummies.filter(l=>l.is_prop||l.is_scene).map(l=>this.loadGgGlb(l.is_prop?(r.propsPath||e.substring(0,e.lastIndexOf("/")+1))+l.prop_id:l.scene_id,{loadProps:!!l.is_scene,position:Pe.add(Pe.rot(l.position,r.rotation),r.position),rotation:ji.combineRotations(l.rotation,r.rotation)})))),a.entities.forEach(l=>{l.position=Pe.add(Pe.rot(Pe.clone(l.position),r.rotation),r.position),l.rotation=ji.mult(ji.clone(l.rotation),r.rotation)}),a})}}class sk extends yl{constructor(t,e){super(t,e),this.visualScene=t,this.physicsWorld=e,this.loader=new Fse(this)}addPrimitiveRigidBody(t,e=Pe.O,n=ji.O,r={}){const s=new Qo({object3D:this.visualScene.factory.createPrimitive(t.shape,r),objectBody:this.physicsWorld.factory.createRigidBody(t)});return s.position=e,s.rotation=n,this.addEntity(s),s}addRenderer(t,e,n){const r=new Tse(this.visualScene.createRenderer(t,e,n));return this.addEntity(r),r}registerConsoleCommands(t){super.registerConsoleCommands(t),t.registerConsoleCommand(this,"gravity",(...e)=>function(i,t,e,n){return new(e||(e=Promise))(function(s,o){function a(d){try{c(n.next(d))}catch(h){o(h)}}function l(d){try{c(n.throw(d))}catch(h){o(h)}}function c(d){d.done?s(d.value):function r(s){return s instanceof e?s:new e(function(o){o(s)})}(d.value).then(a,l)}c((n=n.apply(i,t||[])).next())})}(this,void 0,void 0,function*(){if(1==e.length&&(e=["0","0",""+-+e[0]]),e.length>0){if(isNaN(+e[0])||isNaN(+e[1])||isNaN(+e[2]))throw new Error("Wrong arguments");this.physicsWorld.gravity={x:+e[0],y:+e[1],z:+e[2]}}return JSON.stringify(this.physicsWorld.gravity)}),'args: [ ?float, ?float, ?float ]; Get or set 3D world gravity vector. 1 argument sets vector {x: 0, y: 0, z: -value}, 3 arguments set the whole vector. Default value is "9.82" or "0 0 -9.82"')}}function o4(i,t=$y,e){const n=OI(i,t);return function Nse(i,t){return ti((e,n)=>{const{leading:r=!0,trailing:s=!1}=t??{};let o=!1,a=null,l=null,c=!1;const d=()=>{l?.unsubscribe(),l=null,s&&(m(),c&&n.complete())},h=()=>{l=null,c&&n.complete()},p=g=>l=wr(i(g)).subscribe(Yn(n,d,h)),m=()=>{if(o){o=!1;const g=a;a=null,n.next(g),!c&&p(g)}};e.subscribe(Yn(n,g=>{o=!0,a=g,(!l||l.closed)&&(r?m():p(g))},()=>{c=!0,(!(s&&o&&l)||l.closed)&&n.complete()}))})}(()=>n,e)}window.gg_version="0.0.56";const Bse=0,a4=1,Use=2,l4=1,c4=2,Zc=3,ac=0,Ro=1,Ls=2,Qc=0,Zm=1,d4=2,u4=3,h4=4,Vse=5,Kh=100,zse=101,Hse=102,Gse=103,$se=104,Wse=200,jse=201,Yse=202,qse=203,ak=204,lk=205,Xse=206,Kse=207,Zse=208,Qse=209,Jse=210,eoe=211,toe=212,noe=213,ioe=214,roe=0,soe=1,ooe=2,SC=3,aoe=4,loe=5,coe=6,doe=7,EC=0,uoe=1,hoe=2,bu=0,foe=1,poe=2,moe=3,goe=4,_oe=5,voe=6,yoe=7,f4="attached",lc=301,Zh=302,AC=303,DC=304,mb=306,Ns=1e3,Ji=1001,gb=1002,_r=1003,dk=1004,Qm=1005,lr=1006,_b=1007,bl=1008,Jc=1009,p4=1010,m4=1011,vb=1012,uk=1013,xu=1014,Jo=1015,Jm=1016,hk=1017,fk=1018,eg=1020,g4=35902,_4=1021,v4=1022,ko=1023,y4=1024,b4=1025,tg=1026,ng=1027,pk=1028,TC=1029,x4=1030,mk=1031,gk=1033,IC=33776,RC=33777,kC=33778,PC=33779,_k=35840,vk=35841,yk=35842,bk=35843,xk=36196,wk=37492,Mk=37496,Ck=37808,Sk=37809,Ek=37810,Ak=37811,Dk=37812,Tk=37813,Ik=37814,Rk=37815,kk=37816,Pk=37817,Ok=37818,Fk=37819,Lk=37820,Nk=37821,OC=36492,Bk=36494,Uk=36495,w4=36283,Vk=36284,zk=36285,Hk=36286,yb=2300,bb=2301,Coe=0,C4=1,Wk=2,Eoe=3201,Qh=0,Aoe=1,wu="",cs="srgb",ds="srgb-linear",jk="display-p3",LC="display-p3-linear",NC="linear",Oi="srgb",BC="rec709",UC="p3",sg=7680,Doe=512,Toe=513,Ioe=514,E4=515,Roe=516,koe=517,Poe=518,Ooe=519,A4="300 es",ed=2e3;class og{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]+Bs[i>>16&255]+Bs[i>>24&255]+"-"+Bs[255&t]+Bs[t>>8&255]+"-"+Bs[t>>16&15|64]+Bs[t>>24&255]+"-"+Bs[63&e|128]+Bs[e>>8&255]+"-"+Bs[e>>16&255]+Bs[e>>24&255]+Bs[255&n]+Bs[n>>8&255]+Bs[n>>16&255]+Bs[n>>24&255]).toLowerCase()}function er(i,t,e){return Math.max(t,Math.min(e,i))}function Yk(i,t){return(i%t+t)%t}function xb(i,t,e){return(1-e)*i+e*t}function co(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 yn(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 Zoe_radToDeg=function joe(i){return i*ag};class xe{constructor(t=0,e=0){xe.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(er(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 wn{constructor(t,e,n,r,s,o,a,l,c){wn.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 d=this.elements;return d[0]=t,d[1]=r,d[2]=a,d[3]=e,d[4]=s,d[5]=l,d[6]=n,d[7]=o,d[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],d=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],F=r[2],D=r[5],k=r[8];return s[0]=o*b+a*M+l*F,s[3]=o*v+a*x+l*D,s[6]=o*y+a*C+l*k,s[1]=c*b+d*M+h*F,s[4]=c*v+d*x+h*D,s[7]=c*y+d*C+h*k,s[2]=p*b+m*M+g*F,s[5]=p*v+m*x+g*D,s[8]=p*y+m*C+g*k,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],d=t[8];return e*o*d-e*a*c-n*s*d+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],d=t[8],h=d*o-a*c,p=a*l-d*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-d*n)*b,t[2]=(a*n-r*o)*b,t[3]=p*b,t[4]=(d*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(qk.makeScale(t,e)),this}rotate(t){return this.premultiply(qk.makeRotation(-t)),this}translate(t,e){return this.premultiply(qk.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 qk=new wn;function T4(i){for(let t=i.length-1;t>=0;--t)if(i[t]>=65535)return!0;return!1}function wb(i){return document.createElementNS("http://www.w3.org/1999/xhtml",i)}function Joe(){const i=wb("canvas");return i.style.display="block",i}Int8Array,Uint8Array,Uint8ClampedArray,Int16Array,Uint16Array,Int32Array,Uint32Array,Float32Array,Float64Array;const I4={};function cg(i){i in I4||(I4[i]=!0,console.warn(i))}const R4=(new wn).set(.8224621,.177538,0,.0331941,.9668058,0,.0170827,.0723974,.9105199),k4=(new wn).set(1.2249401,-.2249404,0,-.0420569,1.0420571,0,-.0196376,-.0786361,1.0982735),Mb={[ds]:{transfer:NC,primaries:BC,luminanceCoefficients:[.2126,.7152,.0722],toReference:i=>i,fromReference:i=>i},[cs]:{transfer:Oi,primaries:BC,luminanceCoefficients:[.2126,.7152,.0722],toReference:i=>i.convertSRGBToLinear(),fromReference:i=>i.convertLinearToSRGB()},[LC]:{transfer:NC,primaries:UC,luminanceCoefficients:[.2289,.6917,.0793],toReference:i=>i.applyMatrix3(k4),fromReference:i=>i.applyMatrix3(R4)},[jk]:{transfer:Oi,primaries:UC,luminanceCoefficients:[.2289,.6917,.0793],toReference:i=>i.convertSRGBToLinear().applyMatrix3(k4),fromReference:i=>i.applyMatrix3(R4).convertLinearToSRGB()}},tae=new Set([ds,LC]),Jn={enabled:!0,_workingColorSpace:ds,get workingColorSpace(){return this._workingColorSpace},set workingColorSpace(i){if(!tae.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,Mb[e].fromReference)((0,Mb[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 Mb[i].primaries},getTransfer:function(i){return i===wu?NC:Mb[i].transfer},getLuminanceCoefficients:function(i,t=this._workingColorSpace){return i.fromArray(Mb[t].luminanceCoefficients)}};function dg(i){return i<.04045?.0773993808*i:Math.pow(.9478672986*i+.0521327014,2.4)}function Xk(i){return i<.0031308?12.92*i:1.055*Math.pow(i,.41666)-.055}let ug;class nae{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===ug&&(ug=wb("canvas")),ug.width=t.width,ug.height=t.height;const n=ug.getContext("2d");t instanceof ImageData?n.putImageData(t,0,0):n.drawImage(t,0,0,t.width,t.height),e=ug}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=wb("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 og{constructor(e=i.DEFAULT_IMAGE,n=i.DEFAULT_MAPPING,r=Ji,s=Ji,o=lr,a=bl,l=ko,c=Jc,d=i.DEFAULT_ANISOTROPY,h=wu){super(),this.isTexture=!0,Object.defineProperty(this,"id",{value:rae++}),this.uuid=ea(),this.name="",this.source=new hg(e),this.mipmaps=[],this.mapping=n,this.channel=0,this.wrapS=r,this.wrapT=s,this.magFilter=o,this.minFilter=a,this.anisotropy=d,this.format=l,this.internalFormat=null,this.type=c,this.offset=new xe(0,0),this.repeat=new xe(1,1),this.center=new xe(0,0),this.rotation=0,this.matrixAutoUpdate=!0,this.matrix=new wn,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 Ns:e.x=e.x-Math.floor(e.x);break;case Ji:e.x=e.x<0?0:1;break;case gb: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 Ns:e.y=e.y-Math.floor(e.y);break;case Ji:e.y=e.y<0?0:1;break;case gb: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 gi{constructor(t=0,e=0,n=0,r=1){gi.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],d=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(d-p)<.01&&Math.abs(h-b)<.01&&Math.abs(g-v)<.01){if(Math.abs(d+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,F=(y+1)/2,D=(d+p)/4,k=(h+b)/4,B=(g+v)/4;return x>C&&x>F?x<.01?(n=0,r=.707106781,s=.707106781):(n=Math.sqrt(x),r=D/n,s=k/n):C>F?C<.01?(n=.707106781,r=0,s=.707106781):(r=Math.sqrt(C),n=D/r,s=B/r):F<.01?(n=.707106781,r=.707106781,s=0):(s=Math.sqrt(F),n=k/s,r=B/s),this.set(n,r,s,e),this}let M=Math.sqrt((v-g)*(v-g)+(h-b)*(h-b)+(p-d)*(p-d));return Math.abs(M)<.001&&(M=1),this.x=(v-g)/M,this.y=(h-b)/M,this.z=(p-d)/M,this.w=Math.acos((c+m+y-1)/2),this}setFromMatrixPosition(t){const e=t.elements;return this.x=e[12],this.y=e[13],this.z=e[14],this.w=e[15],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 sae extends og{constructor(t=1,e=1,n={}){super(),this.isRenderTarget=!0,this.width=t,this.height=e,this.depth=1,this.scissor=new gi(0,0,t,e),this.scissorTest=!1,this.viewport=new gi(0,0,t,e);const r={width:t,height:e,depth:1};n=Object.assign({generateMipmaps:!1,internalFormat:null,minFilter:lr,depthBuffer:!0,stencilBuffer:!1,resolveDepthBuffer:!0,resolveStencilBuffer:!0,depthTexture:null,samples:0,count:1},n);const s=new Po(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 F=Math.sqrt(x),D=Math.atan2(F,y*M);v=Math.sin(v*D)/F,a=Math.sin(a*D)/F}const C=a*M;if(l=l*v+p*C,c=c*v+m*C,d=d*v+g*C,h=h*v+b*C,v===1-a){const F=1/Math.sqrt(l*l+c*c+d*d+h*h);l*=F,c*=F,d*=F,h*=F}}t[e]=l,t[e+1]=c,t[e+2]=d,t[e+3]=h}static multiplyQuaternionsFlat(t,e,n,r,s,o){const a=n[r],l=n[r+1],c=n[r+2],d=n[r+3],h=s[o],p=s[o+1],m=s[o+2],g=s[o+3];return t[e]=a*g+d*h+l*m-c*p,t[e+1]=l*g+d*p+c*h-a*m,t[e+2]=c*g+d*m+a*p-l*h,t[e+3]=d*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),d=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*d*h+c*m*g,this._y=c*m*h-p*d*g,this._z=c*d*g+p*m*h,this._w=c*d*h-p*m*g;break;case"YXZ":this._x=p*d*h+c*m*g,this._y=c*m*h-p*d*g,this._z=c*d*g-p*m*h,this._w=c*d*h+p*m*g;break;case"ZXY":this._x=p*d*h-c*m*g,this._y=c*m*h+p*d*g,this._z=c*d*g+p*m*h,this._w=c*d*h-p*m*g;break;case"ZYX":this._x=p*d*h-c*m*g,this._y=c*m*h+p*d*g,this._z=c*d*g-p*m*h,this._w=c*d*h+p*m*g;break;case"YZX":this._x=p*d*h+c*m*g,this._y=c*m*h+p*d*g,this._z=c*d*g-p*m*h,this._w=c*d*h-p*m*g;break;case"XZY":this._x=p*d*h-c*m*g,this._y=c*m*h-p*d*g,this._z=c*d*g+p*m*h,this._w=c*d*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],d=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=(d-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=(d-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+d)/m}else{const m=2*Math.sqrt(1+h-n-a);this._w=(o-r)/m,this._x=(s+c)/m,this._y=(l+d)/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(er(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,d=e._w;return this._x=n*d+o*a+r*c-s*l,this._y=r*d+o*l+s*a-n*c,this._z=s*d+o*c+n*l-r*a,this._w=o*d-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),d=Math.atan2(c,a),h=Math.sin((1-e)*d)/c,p=Math.sin(e*d)/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 O{constructor(t=0,e=0,n=0){O.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(O4.setFromEuler(t))}applyAxisAngle(t,e){return this.applyQuaternion(O4.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),d=2*(a*e-s*r),h=2*(s*n-o*e);return this.x=e+l*c+o*h-a*d,this.y=n+l*d+a*c-s*h,this.z=r+l*h+s*d-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 Qk.copy(this).projectOnVector(t),this.sub(Qk)}reflect(t){return this.sub(Qk.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(er(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 Qk=new O,O4=new uo;class Us{constructor(t=new O(1/0,1/0,1/0),e=new O(-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;e=this.min.x&&t.x<=this.max.x&&t.y>=this.min.y&&t.y<=this.max.y&&t.z>=this.min.z&&t.z<=this.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.x>=this.min.x&&t.min.x<=this.max.x&&t.max.y>=this.min.y&&t.min.y<=this.max.y&&t.max.z>=this.min.z&&t.min.z<=this.max.z}intersectsSphere(t){return this.clampPoint(t.center,xl),xl.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(Cb),GC.subVectors(this.max,Cb),fg.subVectors(t.a,Cb),pg.subVectors(t.b,Cb),mg.subVectors(t.c,Cb),Cu.subVectors(pg,fg),Su.subVectors(mg,pg),ef.subVectors(fg,mg);let e=[0,-Cu.z,Cu.y,0,-Su.z,Su.y,0,-ef.z,ef.y,Cu.z,0,-Cu.x,Su.z,0,-Su.x,ef.z,0,-ef.x,-Cu.y,Cu.x,0,-Su.y,Su.x,0,-ef.y,ef.x,0];return!(!Jk(e,fg,pg,mg,GC)||(e=[1,0,0,0,1,0,0,0,1],!Jk(e,fg,pg,mg,GC)))&&($C.crossVectors(Cu,Su),e=[$C.x,$C.y,$C.z],Jk(e,fg,pg,mg,GC))}clampPoint(t,e){return e.copy(t).clamp(this.min,this.max)}distanceToPoint(t){return this.clampPoint(t,xl).distanceTo(t)}getBoundingSphere(t){return this.isEmpty()?t.makeEmpty():(this.getCenter(t.center),t.radius=.5*this.getSize(xl).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()||(td[0].set(this.min.x,this.min.y,this.min.z).applyMatrix4(t),td[1].set(this.min.x,this.min.y,this.max.z).applyMatrix4(t),td[2].set(this.min.x,this.max.y,this.min.z).applyMatrix4(t),td[3].set(this.min.x,this.max.y,this.max.z).applyMatrix4(t),td[4].set(this.max.x,this.min.y,this.min.z).applyMatrix4(t),td[5].set(this.max.x,this.min.y,this.max.z).applyMatrix4(t),td[6].set(this.max.x,this.max.y,this.min.z).applyMatrix4(t),td[7].set(this.max.x,this.max.y,this.max.z).applyMatrix4(t),this.setFromPoints(td)),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 td=[new O,new O,new O,new O,new O,new O,new O,new O],xl=new O,HC=new Us,fg=new O,pg=new O,mg=new O,Cu=new O,Su=new O,ef=new O,Cb=new O,GC=new O,$C=new O,tf=new O;function Jk(i,t,e,n,r){for(let s=0,o=i.length-3;s<=o;s+=3){tf.fromArray(i,s);const a=r.x*Math.abs(tf.x)+r.y*Math.abs(tf.y)+r.z*Math.abs(tf.z),l=t.dot(tf),c=e.dot(tf),d=n.dot(tf);if(Math.max(-Math.max(l,c,d),Math.min(l,c,d))>a)return!1}return!0}const oae=new Us,Sb=new O,eP=new O;class Vs{constructor(t=new O,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):oae.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;Sb.subVectors(t,this.center);const e=Sb.lengthSq();if(e>this.radius*this.radius){const n=Math.sqrt(e),r=.5*(n-this.radius);this.center.addScaledVector(Sb,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):(eP.subVectors(t.center,this.center).setLength(t.radius),this.expandByPoint(Sb.copy(t.center).add(eP)),this.expandByPoint(Sb.copy(t.center).sub(eP))),this)}equals(t){return t.center.equals(this.center)&&t.radius===this.radius}clone(){return(new this.constructor).copy(this)}}const nd=new O,tP=new O,WC=new O,Eu=new O,nP=new O,jC=new O,iP=new O;class Eb{constructor(t=new O,e=new O(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,nd)),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=nd.subVectors(t,this.origin).dot(this.direction);return e<0?this.origin.distanceToSquared(t):(nd.copy(this.origin).addScaledVector(this.direction,e),nd.distanceToSquared(t))}distanceSqToSegment(t,e,n,r){tP.copy(t).add(e).multiplyScalar(.5),WC.copy(e).sub(t).normalize(),Eu.copy(this.origin).sub(tP);const s=.5*t.distanceTo(e),o=-this.direction.dot(WC),a=Eu.dot(this.direction),l=-Eu.dot(WC),c=Eu.lengthSq(),d=Math.abs(1-o*o);let h,p,m,g;if(d>0)if(h=o*l-a,p=o*a-l,g=s*d,h>=0)if(p>=-g)if(p<=g){const b=1/d;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(tP).addScaledVector(WC,p),m}intersectSphere(t,e){nd.subVectors(t.center,this.origin);const n=nd.dot(this.direction),r=nd.dot(nd)-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,d=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),d>=0?(s=(t.min.y-p.y)*d,o=(t.max.y-p.y)*d):(s=(t.max.y-p.y)*d,o=(t.min.y-p.y)*d),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,nd)}intersectTriangle(t,e,n,r,s){nP.subVectors(e,t),jC.subVectors(n,t),iP.crossVectors(nP,jC);let a,o=this.direction.dot(iP);if(o>0){if(r)return null;a=1}else{if(!(o<0))return null;a=-1,o=-o}Eu.subVectors(this.origin,t);const l=a*this.direction.dot(jC.crossVectors(Eu,jC));if(l<0)return null;const c=a*this.direction.dot(nP.cross(Eu));if(c<0||l+c>o)return null;const d=-a*Eu.dot(iP);return d<0?null:this.at(d/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 Nt{constructor(t,e,n,r,s,o,a,l,c,d,h,p,m,g,b,v){Nt.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,d,h,p,m,g,b,v)}set(t,e,n,r,s,o,a,l,c,d,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]=d,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 Nt).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/gg.setFromMatrixColumn(t,0).length(),s=1/gg.setFromMatrixColumn(t,1).length(),o=1/gg.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),d=Math.cos(s),h=Math.sin(s);if("XYZ"===t.order){const p=o*d,m=o*h,g=a*d,b=a*h;e[0]=l*d,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*d,m=l*h,g=c*d,b=c*h;e[0]=p+b*a,e[4]=g*a-m,e[8]=o*c,e[1]=o*h,e[5]=o*d,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*d,m=l*h,g=c*d,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*d,e[9]=b-p*a,e[2]=-o*c,e[6]=a,e[10]=o*l}else if("ZYX"===t.order){const p=o*d,m=o*h,g=a*d,b=a*h;e[0]=l*d,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*d,e[4]=b-p*h,e[8]=g*h+m,e[1]=h,e[5]=o*d,e[9]=-a*d,e[2]=-c*d,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*d,e[4]=-h,e[8]=c*d,e[1]=p*h+b,e[5]=o*d,e[9]=m*h-g,e[2]=g*h-m,e[6]=a*d,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(aae,t,lae)}lookAt(t,e,n){const r=this.elements;return ta.subVectors(t,e),0===ta.lengthSq()&&(ta.z=1),ta.normalize(),Au.crossVectors(n,ta),0===Au.lengthSq()&&(1===Math.abs(n.z)?ta.x+=1e-4:ta.z+=1e-4,ta.normalize(),Au.crossVectors(n,ta)),Au.normalize(),YC.crossVectors(ta,Au),r[0]=Au.x,r[4]=YC.x,r[8]=ta.x,r[1]=Au.y,r[5]=YC.y,r[9]=ta.y,r[2]=Au.z,r[6]=YC.z,r[10]=ta.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],d=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],F=n[15],D=r[0],k=r[4],B=r[8],T=r[12],A=r[1],$=r[5],ie=r[9],ne=r[13],se=r[2],ge=r[6],q=r[10],re=r[14],J=r[3],we=r[7],Ne=r[11],Ye=r[15];return s[0]=o*D+a*A+l*se+c*J,s[4]=o*k+a*$+l*ge+c*we,s[8]=o*B+a*ie+l*q+c*Ne,s[12]=o*T+a*ne+l*re+c*Ye,s[1]=d*D+h*A+p*se+m*J,s[5]=d*k+h*$+p*ge+m*we,s[9]=d*B+h*ie+p*q+m*Ne,s[13]=d*T+h*ne+p*re+m*Ye,s[2]=g*D+b*A+v*se+y*J,s[6]=g*k+b*$+v*ge+y*we,s[10]=g*B+b*ie+v*q+y*Ne,s[14]=g*T+b*ne+v*re+y*Ye,s[3]=M*D+x*A+C*se+F*J,s[7]=M*k+x*$+C*ge+F*we,s[11]=M*B+x*ie+C*q+F*Ne,s[15]=M*T+x*ne+C*re+F*Ye,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],d=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*d-s*l*d)+t[11]*(+e*c*h-e*a*m-s*o*h+n*o*m+s*a*d-n*c*d)+t[15]*(-r*a*d-e*l*h+e*a*p+r*o*h-n*o*p+n*l*d)}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],d=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-d*v*c-g*l*m+o*v*m+d*l*y-o*p*y,C=d*b*c-g*h*c+g*a*m-o*b*m-d*a*y+o*h*y,F=g*h*l-d*b*l-g*a*p+o*b*p+d*a*v-o*h*v,D=e*M+n*x+r*C+s*F;if(0===D)return this.set(0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0);const k=1/D;return t[0]=M*k,t[1]=(b*p*s-h*v*s-b*r*m+n*v*m+h*r*y-n*p*y)*k,t[2]=(a*v*s-b*l*s+b*r*c-n*v*c-a*r*y+n*l*y)*k,t[3]=(h*l*s-a*p*s-h*r*c+n*p*c+a*r*m-n*l*m)*k,t[4]=x*k,t[5]=(d*v*s-g*p*s+g*r*m-e*v*m-d*r*y+e*p*y)*k,t[6]=(g*l*s-o*v*s-g*r*c+e*v*c+o*r*y-e*l*y)*k,t[7]=(o*p*s-d*l*s+d*r*c-e*p*c-o*r*m+e*l*m)*k,t[8]=C*k,t[9]=(g*h*s-d*b*s-g*n*m+e*b*m+d*n*y-e*h*y)*k,t[10]=(o*b*s-g*a*s+g*n*c-e*b*c-o*n*y+e*a*y)*k,t[11]=(d*a*s-o*h*s-d*n*c+e*h*c+o*n*m-e*a*m)*k,t[12]=F*k,t[13]=(d*b*r-g*h*r+g*n*p-e*b*p-d*n*v+e*h*v)*k,t[14]=(g*a*r-o*b*r-g*n*l+e*b*l+o*n*v-e*a*v)*k,t[15]=(o*h*r-d*a*r+d*n*l-e*h*l-o*n*p+e*a*p)*k,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,d=s*a;return this.set(c*o+n,c*a-r*l,c*l+r*a,0,c*a+r*l,d*a+n,d*l-r*o,0,c*l-r*a,d*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,d=o+o,h=a+a,p=s*c,m=s*d,g=s*h,b=o*d,v=o*h,y=a*h,M=l*c,x=l*d,C=l*h,F=n.x,D=n.y,k=n.z;return r[0]=(1-(b+y))*F,r[1]=(m+C)*F,r[2]=(g-x)*F,r[3]=0,r[4]=(m-C)*D,r[5]=(1-(p+y))*D,r[6]=(v+M)*D,r[7]=0,r[8]=(g+x)*k,r[9]=(v-M)*k,r[10]=(1-(p+b))*k,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=gg.set(r[0],r[1],r[2]).length();const o=gg.set(r[4],r[5],r[6]).length(),a=gg.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],wl.copy(this);const c=1/s,d=1/o,h=1/a;return wl.elements[0]*=c,wl.elements[1]*=c,wl.elements[2]*=c,wl.elements[4]*=d,wl.elements[5]*=d,wl.elements[6]*=d,wl.elements[8]*=h,wl.elements[9]*=h,wl.elements[10]*=h,e.setFromRotationMatrix(wl),n.x=s,n.y=o,n.z=a,this}makePerspective(t,e,n,r,s,o,a=ed){const l=this.elements,c=2*s/(e-t),d=2*s/(n-r),h=(e+t)/(e-t),p=(n+r)/(n-r);let m,g;if(a===ed)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]=d,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=ed){const l=this.elements,c=1/(e-t),d=1/(n-r),h=1/(o-s),p=(e+t)*c,m=(n+r)*d;let g,b;if(a===ed)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*d,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 gg=new O,wl=new Nt,aae=new O(0,0,0),lae=new O(1,1,1),Au=new O,YC=new O,ta=new O,F4=new Nt,L4=new uo;let id=(()=>{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],d=s[5],h=s[9],p=s[2],m=s[6],g=s[10];switch(n){case"XYZ":this._y=Math.asin(er(l,-1,1)),Math.abs(l)<.9999999?(this._x=Math.atan2(-h,g),this._z=Math.atan2(-a,o)):(this._x=Math.atan2(m,d),this._z=0);break;case"YXZ":this._x=Math.asin(-er(h,-1,1)),Math.abs(h)<.9999999?(this._y=Math.atan2(l,g),this._z=Math.atan2(c,d)):(this._y=Math.atan2(-p,o),this._z=0);break;case"ZXY":this._x=Math.asin(er(m,-1,1)),Math.abs(m)<.9999999?(this._y=Math.atan2(-p,g),this._z=Math.atan2(-a,d)):(this._y=0,this._z=Math.atan2(c,o));break;case"ZYX":this._y=Math.asin(-er(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,d));break;case"YZX":this._z=Math.asin(er(c,-1,1)),Math.abs(c)<.9999999?(this._x=Math.atan2(-h,d),this._y=Math.atan2(-p,o)):(this._x=0,this._y=Math.atan2(l,g));break;case"XZY":this._z=Math.asin(-er(a,-1,1)),Math.abs(a)<.9999999?(this._x=Math.atan2(m,d),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 F4.makeRotationFromQuaternion(e),this.setFromRotationMatrix(F4,n,r)}setFromVector3(e,n=this._order){return this.set(e.x,e.y,e.z,n)}reorder(e){return L4.setFromEuler(this),this.setFromQuaternion(L4,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 rP{constructor(){this.mask=1}set(t){this.mask=(1<>>0}enable(t){this.mask|=1<{class i extends og{constructor(){super(),this.isObject3D=!0,Object.defineProperty(this,"id",{value:cae++}),this.uuid=ea(),this.name="",this.type="Object3D",this.parent=null,this.children=[],this.up=i.DEFAULT_UP.clone();const e=new O,n=new id,r=new uo,s=new O(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 Nt},normalMatrix:{value:new wn}}),this.matrix=new Nt,this.matrixWorld=new Nt,this.matrixAutoUpdate=i.DEFAULT_MATRIX_AUTO_UPDATE,this.matrixWorldAutoUpdate=i.DEFAULT_MATRIX_WORLD_AUTO_UPDATE,this.matrixWorldNeedsUpdate=!1,this.layers=new rP,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 _g.setFromAxisAngle(e,n),this.quaternion.multiply(_g),this}rotateOnWorldAxis(e,n){return _g.setFromAxisAngle(e,n),this.quaternion.premultiply(_g),this}rotateX(e){return this.rotateOnAxis(B4,e)}rotateY(e){return this.rotateOnAxis(U4,e)}rotateZ(e){return this.rotateOnAxis(V4,e)}translateOnAxis(e,n){return N4.copy(e).applyQuaternion(this.quaternion),this.position.add(N4.multiplyScalar(n)),this}translateX(e){return this.translateOnAxis(B4,e)}translateY(e){return this.translateOnAxis(U4,e)}translateZ(e){return this.translateOnAxis(V4,e)}localToWorld(e){return this.updateWorldMatrix(!0,!1),e.applyMatrix4(this.matrixWorld)}worldToLocal(e){return this.updateWorldMatrix(!0,!1),e.applyMatrix4(rd.copy(this.matrixWorld).invert())}lookAt(e,n,r){e.isVector3?qC.copy(e):qC.set(e,n,r);const s=this.parent;this.updateWorldMatrix(!0,!1),Ab.setFromMatrixPosition(this.matrixWorld),this.isCamera||this.isLight?rd.lookAt(Ab,qC,this.up):rd.lookAt(qC,Ab,this.up),this.quaternion.setFromRotationMatrix(rd),s&&(rd.extractRotation(s.matrixWorld),_g.setFromRotationMatrix(rd),this.quaternion.premultiply(_g.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.maxInstanceCount=this._maxInstanceCount,s.maxVertexCount=this._maxVertexCount,s.maxIndexCount=this._maxIndexCount,s.geometryInitialized=this._geometryInitialized,s.geometryCount=this._geometryCount,s.matricesTexture=this._matricesTexture.toJSON(e),null!==this._colorsTexture&&(s.colorsTexture=this._colorsTexture.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 d=0,h=c.length;d0){s.children=[];for(let l=0;l0){s.animations=[];for(let l=0;l0&&(r.geometries=l),c.length>0&&(r.materials=c),d.length>0&&(r.textures=d),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 d in l){const h=l[d];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){Ml.subVectors(r,e),sd.subVectors(n,e),oP.subVectors(t,e);const o=Ml.dot(Ml),a=Ml.dot(sd),l=Ml.dot(oP),c=sd.dot(sd),d=sd.dot(oP),h=o*c-a*a;if(0===h)return s.set(0,0,0),null;const p=1/h,m=(c*l-a*d)*p,g=(o*d-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,od)&&od.x>=0&&od.y>=0&&od.x+od.y<=1}static getInterpolation(t,e,n,r,s,o,a,l){return null===this.getBarycoord(t,e,n,r,od)?(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,od.x),l.addScaledVector(o,od.y),l.addScaledVector(a,od.z),l)}static isFrontFacing(t,e,n,r){return Ml.subVectors(n,e),sd.subVectors(t,e),Ml.cross(sd).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 Ml.subVectors(this.c,this.b),sd.subVectors(this.a,this.b),.5*Ml.cross(sd).length()}getMidpoint(t){return t.addVectors(this.a,this.b).add(this.c).multiplyScalar(1/3)}getNormal(t){return Oa.getNormal(this.a,this.b,this.c,t)}getPlane(t){return t.setFromCoplanarPoints(this.a,this.b,this.c)}getBarycoord(t,e){return Oa.getBarycoord(t,this.a,this.b,this.c,e)}getInterpolation(t,e,n,r,s){return Oa.getInterpolation(t,this.a,this.b,this.c,e,n,r,s)}containsPoint(t){return Oa.containsPoint(t,this.a,this.b,this.c)}isFrontFacing(t){return Oa.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;yg.subVectors(r,n),bg.subVectors(s,n),aP.subVectors(t,n);const l=yg.dot(aP),c=bg.dot(aP);if(l<=0&&c<=0)return e.copy(n);lP.subVectors(t,r);const d=yg.dot(lP),h=bg.dot(lP);if(d>=0&&h<=d)return e.copy(r);const p=l*h-d*c;if(p<=0&&l>=0&&d<=0)return o=l/(l-d),e.copy(n).addScaledVector(yg,o);cP.subVectors(t,s);const m=yg.dot(cP),g=bg.dot(cP);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(bg,a);const v=d*g-m*h;if(v<=0&&h-d>=0&&m-g>=0)return H4.subVectors(s,r),a=(h-d)/(h-d+(m-g)),e.copy(r).addScaledVector(H4,a);const y=1/(v+b+p);return o=b*y,a=p*y,e.copy(n).addScaledVector(yg,o).addScaledVector(bg,a)}equals(t){return t.a.equals(this.a)&&t.b.equals(this.b)&&t.c.equals(this.c)}}const G4={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},Du={h:0,s:0,l:0},XC={h:0,s:0,l:0};function dP(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 qe{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=cs){return t=Math.floor(t),this.r=(t>>16&255)/255,this.g=(t>>8&255)/255,this.b=(255&t)/255,Jn.toWorkingColorSpace(this,e),this}setRGB(t,e,n,r=Jn.workingColorSpace){return this.r=t,this.g=e,this.b=n,Jn.toWorkingColorSpace(this,r),this}setHSL(t,e,n,r=Jn.workingColorSpace){if(t=Yk(t,1),e=er(e,0,1),n=er(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=dP(o,s,t+1/3),this.g=dP(o,s,t),this.b=dP(o,s,t-1/3)}return Jn.toWorkingColorSpace(this,r),this}setStyle(t,e=cs){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=cs){const n=G4[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=dg(t.r),this.g=dg(t.g),this.b=dg(t.b),this}copyLinearToSRGB(t){return this.r=Xk(t.r),this.g=Xk(t.g),this.b=Xk(t.b),this}convertSRGBToLinear(){return this.copySRGBToLinear(this),this}convertLinearToSRGB(){return this.copyLinearToSRGB(this),this}getHex(t=cs){return Jn.fromWorkingColorSpace(zs.copy(this),t),65536*Math.round(er(255*zs.r,0,255))+256*Math.round(er(255*zs.g,0,255))+Math.round(er(255*zs.b,0,255))}getHexString(t=cs){return("000000"+this.getHex(t).toString(16)).slice(-6)}getHSL(t,e=Jn.workingColorSpace){Jn.fromWorkingColorSpace(zs.copy(this),e);const n=zs.r,r=zs.g,s=zs.b,o=Math.max(n,r,s),a=Math.min(n,r,s);let l,c;const d=(a+o)/2;if(a===o)l=0,c=0;else{const h=o-a;switch(c=d<=.5?h/(o+a):h/(2-o-a),o){case n:l=(r-s)/h+(r0!=t>0&&this.version++,this._alphaTest=t}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.dispersion&&(n.dispersion=this.dispersion),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!==Zm&&(n.blending=this.blending),this.side!==ac&&(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!==ak&&(n.blendSrc=this.blendSrc),this.blendDst!==lk&&(n.blendDst=this.blendDst),this.blendEquation!==Kh&&(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!==SC&&(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!==sg&&(n.stencilFail=this.stencilFail),this.stencilZFail!==sg&&(n.stencilZFail=this.stencilZFail),this.stencilZPass!==sg&&(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++}onBuild(){console.warn("Material: onBuild() has been removed.")}onBeforeRender(){console.warn("Material: onBeforeRender() has been removed.")}}class Yi extends Oo{constructor(t){super(),this.isMeshBasicMaterial=!0,this.type="MeshBasicMaterial",this.color=new qe(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 id,this.combine=EC,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 vr=new O,KC=new xe;class zi{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=Jo,this.version=0}onUploadCallback(){}set needsUpdate(t){!0===t&&this.version++}get updateRange(){return cg("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],d=[];for(let h=0,p=c.length;h0&&(r[l]=d,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 d=[],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))&&(j4.copy(s).invert(),nf.copy(t.ray).applyMatrix4(j4),(null===n.boundingBox||!1!==nf.intersectsBox(n.boundingBox))&&this._computeIntersections(t,e,nf)))}_computeIntersections(t,e,n){let r;const s=this.geometry,o=this.material,a=s.index,l=s.attributes.position,c=s.attributes.uv,d=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:iS.clone(),object:i}}(i,t,e,n,wg,Mg,Cg,nS);if(d){r&&(JC.fromBufferAttribute(r,a),eS.fromBufferAttribute(r,l),tS.fromBufferAttribute(r,c),d.uv=Oa.getInterpolation(nS,wg,Mg,Cg,JC,eS,tS,new xe)),s&&(JC.fromBufferAttribute(s,a),eS.fromBufferAttribute(s,l),tS.fromBufferAttribute(s,c),d.uv1=Oa.getInterpolation(nS,wg,Mg,Cg,JC,eS,tS,new xe)),o&&(q4.fromBufferAttribute(o,a),X4.fromBufferAttribute(o,l),K4.fromBufferAttribute(o,c),d.normal=Oa.getInterpolation(nS,wg,Mg,Cg,q4,X4,K4,new O),d.normal.dot(n.direction)>0&&d.normal.multiplyScalar(-1));const h={a,b:l,c,normal:new O,materialIndex:0};Oa.getNormal(wg,Mg,Cg,h.normal),d.face=h}return d}class rf 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=[],d=[],h=[];let p=0,m=0;function g(b,v,y,M,x,C,F,D,k,B,T){const A=C/k,$=F/B,ie=C/2,ne=F/2,se=D/2,ge=k+1,q=B+1;let re=0,J=0;const we=new O;for(let Ne=0;Ne0?1:-1,d.push(we.x,we.y,we.z),h.push(It/k),h.push(1-Ne/B),re+=1}for(let Ne=0;Ne0&&(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 fP extends Or{constructor(){super(),this.isCamera=!0,this.type="Camera",this.matrixWorldInverse=new Nt,this.projectionMatrix=new Nt,this.projectionMatrixInverse=new Nt,this.coordinateSystem=ed}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 Tu=new O,J4=new xe,e5=new xe;class yr extends fP{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*ag*Math.atan(e),this.updateProjectionMatrix()}getFocalLength(){const t=Math.tan(.5*Jh*this.fov);return.5*this.getFilmHeight()/t}getEffectiveFOV(){return 2*ag*Math.atan(Math.tan(.5*Jh*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){Tu.set(-1,-1,.5).applyMatrix4(this.projectionMatrixInverse),e.set(Tu.x,Tu.y).multiplyScalar(-t/Tu.z),Tu.set(1,1,.5).applyMatrix4(this.projectionMatrixInverse),n.set(Tu.x,Tu.y).multiplyScalar(-t/Tu.z)}getViewSize(t,e){return this.getViewBounds(t,J4,e5),e.subVectors(e5,J4)}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*Jh*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 bae extends Or{constructor(t,e,n){super(),this.type="CubeCamera",this.renderTarget=n,this.coordinateSystem=null,this.activeMipmapLevel=0;const r=new yr(-90,1,t,e);r.layers=this.layers,this.add(r);const s=new yr(-90,1,t,e);s.layers=this.layers,this.add(s);const o=new yr(-90,1,t,e);o.layers=this.layers,this.add(o);const a=new yr(-90,1,t,e);a.layers=this.layers,this.add(a);const l=new yr(-90,1,t,e);l.layers=this.layers,this.add(l);const c=new yr(-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===ed)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,d]=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,d),t.setRenderTarget(h,p,m),t.xr.enabled=g,n.texture.needsPMREMUpdate=!0}}class sS extends Po{constructor(t,e,n,r,s,o,a,l,c,d){super(t=void 0!==t?t:[],e=void 0!==e?e:lc,n,r,s,o,a,l,c,d),this.isCubeTexture=!0,this.flipY=!1}get images(){return this.image}set images(t){this.image=t}}class xae extends Mu{constructor(t=1,e={}){super(t,t,e),this.isWebGLCubeRenderTarget=!0;const n={width:t,height:t,depth:1};this.texture=new sS([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:lr}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 rf(5,5,5),s=new Cl({name:"CubemapFromEquirect",uniforms:Sg(n_uniforms),vertexShader:n_vertexShader,fragmentShader:n_fragmentShader,side:Ro,blending:Qc});s.uniforms.tEquirect.value=e;const o=new Mn(r,s),a=e.minFilter;return e.minFilter===bl&&(e.minFilter=lr),new bae(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 pP=new O,wae=new O,Mae=new wn;class sf{constructor(t=new O(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=pP.subVectors(n,e).cross(wae.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(pP),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||Mae.getNormalMatrix(t),r=this.coplanarPoint(pP).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 af=new Vs,oS=new O;class aS{constructor(t=new sf,e=new sf,n=new sf,r=new sf,s=new sf,o=new sf){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=ed){const n=this.planes,r=t.elements,s=r[0],o=r[1],a=r[2],l=r[3],c=r[4],d=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+d,v+g,C+M).normalize(),n[3].setComponents(l-o,p-d,v-g,C-M).normalize(),n[4].setComponents(l-a,p-h,v-b,C-x).normalize(),e===ed)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(),af.copy(t.boundingSphere).applyMatrix4(t.matrixWorld);else{const e=t.geometry;null===e.boundingSphere&&e.computeBoundingSphere(),af.copy(e.boundingSphere).applyMatrix4(t.matrixWorld)}return this.intersectsSphere(af)}intersectsSprite(t){return af.center.set(0,0,0),af.radius=.7071067811865476,af.applyMatrix4(t.matrixWorld),this.intersectsSphere(af)}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,oS.y=r.normal.y>0?t.max.y:t.min.y,oS.z=r.normal.z>0?t.max.z:t.min.z,r.distanceToPoint(oS)<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 t5(){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 Cae(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.isInterleavedBufferAttribute&&(a=a.data),a.isGLBufferAttribute){const d=t.get(a);return void((!d||d.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 ) || defined( USE_BATCHING_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 ) || defined( USE_BATCHING_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\n#ifdef USE_BATCHING_COLOR\n\tvec3 batchingColor = getBatchingColor( getIndirectIndex( gl_DrawID ) );\n\tvColor.xyz *= batchingColor.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}\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}",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_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\tfloat distanceFalloff = 1.0 / max( pow( lightDistance, decayExponent ), 0.01 );\n\tif ( cutoffDistance > 0.0 ) {\n\t\tdistanceFalloff *= pow2( saturate( 1.0 - pow4( lightDistance / cutoffDistance ) ) );\n\t}\n\treturn distanceFalloff;\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_DISPERSION\n\tmaterial.dispersion = dispersion;\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\tfloat dispersion;\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.shadowIntensity, 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.shadowIntensity, 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.shadowIntensity, 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 )\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\tfor ( int i = 0; i < MORPHTARGETS_COUNT; i ++ ) {\n\t\tif ( morphTargetInfluences[ i ] != 0.0 ) objectNormal += getMorph( gl_VertexID, i, 1 ).xyz * morphTargetInfluences[ i ];\n\t}\n#endif",morphtarget_pars_vertex:"#ifdef USE_MORPHTARGETS\n\t#ifndef USE_INSTANCING_MORPH\n\t\tuniform float morphTargetBaseInfluence;\n\t\tuniform float morphTargetInfluences[ MORPHTARGETS_COUNT ];\n\t#endif\n\tuniform sampler2DArray morphTargetsTexture;\n\tuniform ivec2 morphTargetsTextureSize;\n\tvec4 getMorph( const in int vertexIndex, const in int morphTargetIndex, const in int offset ) {\n\t\tint texelIndex = vertexIndex * MORPHTARGETS_TEXTURE_STRIDE + offset;\n\t\tint y = texelIndex / morphTargetsTextureSize.x;\n\t\tint x = texelIndex - y * morphTargetsTextureSize.x;\n\t\tivec3 morphUV = ivec3( x, y, morphTargetIndex );\n\t\treturn texelFetch( morphTargetsTexture, morphUV, 0 );\n\t}\n#endif",morphtarget_vertex:"#ifdef USE_MORPHTARGETS\n\ttransformed *= morphTargetBaseInfluence;\n\tfor ( int i = 0; i < MORPHTARGETS_COUNT; i ++ ) {\n\t\tif ( morphTargetInfluences[ i ] != 0.0 ) transformed += getMorph( gl_VertexID, i, 0 ).xyz * morphTargetInfluences[ i ];\n\t}\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.;const float ShiftRight8 = 1. / 256.;\nconst float Inv255 = 1. / 255.;\nconst vec4 PackFactors = vec4( 1.0, 256.0, 256.0 * 256.0, 256.0 * 256.0 * 256.0 );\nconst vec2 UnpackFactors2 = vec2( UnpackDownscale, 1.0 / PackFactors.g );\nconst vec3 UnpackFactors3 = vec3( UnpackDownscale / PackFactors.rg, 1.0 / PackFactors.b );\nconst vec4 UnpackFactors4 = vec4( UnpackDownscale / PackFactors.rgb, 1.0 / PackFactors.a );\nvec4 packDepthToRGBA( const in float v ) {\n\tif( v <= 0.0 )\n\t\treturn vec4( 0., 0., 0., 0. );\n\tif( v >= 1.0 )\n\t\treturn vec4( 1., 1., 1., 1. );\n\tfloat vuf;\n\tfloat af = modf( v * PackFactors.a, vuf );\n\tfloat bf = modf( vuf * ShiftRight8, vuf );\n\tfloat gf = modf( vuf * ShiftRight8, vuf );\n\treturn vec4( vuf * Inv255, gf * PackUpscale, bf * PackUpscale, af );\n}\nvec3 packDepthToRGB( const in float v ) {\n\tif( v <= 0.0 )\n\t\treturn vec3( 0., 0., 0. );\n\tif( v >= 1.0 )\n\t\treturn vec3( 1., 1., 1. );\n\tfloat vuf;\n\tfloat bf = modf( v * PackFactors.b, vuf );\n\tfloat gf = modf( vuf * ShiftRight8, vuf );\n\treturn vec3( vuf * Inv255, gf * PackUpscale, bf );\n}\nvec2 packDepthToRG( const in float v ) {\n\tif( v <= 0.0 )\n\t\treturn vec2( 0., 0. );\n\tif( v >= 1.0 )\n\t\treturn vec2( 1., 1. );\n\tfloat vuf;\n\tfloat gf = modf( v * 256., vuf );\n\treturn vec2( vuf * Inv255, gf );\n}\nfloat unpackRGBAToDepth( const in vec4 v ) {\n\treturn dot( v, UnpackFactors4 );\n}\nfloat unpackRGBToDepth( const in vec3 v ) {\n\treturn dot( v, UnpackFactors3 );\n}\nfloat unpackRGToDepth( const in vec2 v ) {\n\treturn v.r * UnpackFactors2.r + v.g * UnpackFactors2.g;\n}\nvec4 pack2HalfToRGBA( const in 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( const in 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 shadowIntensity;\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 shadowIntensity;\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 shadowIntensity;\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 shadowIntensity, 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 mix( 1.0, shadow, shadowIntensity );\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 shadowIntensity, 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 mix( 1.0, shadow, shadowIntensity );\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 shadowIntensity;\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 shadowIntensity;\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 shadowIntensity;\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.shadowIntensity, 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.shadowIntensity, 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.shadowIntensity, 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\tconst float StartCompression = 0.8 - 0.04;\n\tconst float 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, vec3( newPeak ), 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.dispersion, 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 dispersion, const in float ior, const in float thickness,\n\t\tconst in vec3 attenuationColor, const in float attenuationDistance ) {\n\t\tvec4 transmittedLight;\n\t\tvec3 transmittance;\n\t\t#ifdef USE_DISPERSION\n\t\t\tfloat halfSpread = ( ior - 1.0 ) * 0.025 * dispersion;\n\t\t\tvec3 iors = vec3( ior - halfSpread, ior, ior + halfSpread );\n\t\t\tfor ( int i = 0; i < 3; i ++ ) {\n\t\t\t\tvec3 transmissionRay = getVolumeTransmissionRay( n, v, thickness, iors[ i ], modelMatrix );\n\t\t\t\tvec3 refractedRayExit = position + transmissionRay;\n\t\t\n\t\t\t\tvec4 ndcPos = projMatrix * viewMatrix * vec4( refractedRayExit, 1.0 );\n\t\t\t\tvec2 refractionCoords = ndcPos.xy / ndcPos.w;\n\t\t\t\trefractionCoords += 1.0;\n\t\t\t\trefractionCoords /= 2.0;\n\t\t\n\t\t\t\tvec4 transmissionSample = getTransmissionSample( refractionCoords, roughness, iors[ i ] );\n\t\t\t\ttransmittedLight[ i ] = transmissionSample[ i ];\n\t\t\t\ttransmittedLight.a += transmissionSample.a;\n\t\t\t\ttransmittance[ i ] = diffuseColor[ i ] * volumeAttenuation( length( transmissionRay ), attenuationColor, attenuationDistance )[ i ];\n\t\t\t}\n\t\t\ttransmittedLight.a /= 3.0;\n\t\t\n\t\t#else\n\t\t\n\t\t\tvec3 transmissionRay = getVolumeTransmissionRay( n, v, thickness, ior, modelMatrix );\n\t\t\tvec3 refractedRayExit = position + transmissionRay;\n\t\t\tvec4 ndcPos = projMatrix * viewMatrix * vec4( refractedRayExit, 1.0 );\n\t\t\tvec2 refractionCoords = ndcPos.xy / ndcPos.w;\n\t\t\trefractionCoords += 1.0;\n\t\t\trefractionCoords /= 2.0;\n\t\t\ttransmittedLight = getTransmissionSample( refractionCoords, roughness, ior );\n\t\t\ttransmittance = diffuseColor * volumeAttenuation( length( transmissionRay ), attenuationColor, attenuationDistance );\n\t\t\n\t\t#endif\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#elif DEPTH_PACKING == 3202\n\t\tgl_FragColor = vec4( packDepthToRGB( fragCoordZ ), 1.0 );\n\t#elif DEPTH_PACKING == 3203\n\t\tgl_FragColor = vec4( packDepthToRG( fragCoordZ ), 0.0, 1.0 );\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_DISPERSION\n\tuniform float dispersion;\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}"},Qe={common:{diffuse:{value:new qe(16777215)},opacity:{value:1},map:{value:null},mapTransform:{value:new wn},alphaMap:{value:null},alphaMapTransform:{value:new wn},alphaTest:{value:0}},specularmap:{specularMap:{value:null},specularMapTransform:{value:new wn}},envmap:{envMap:{value:null},envMapRotation:{value:new wn},flipEnvMap:{value:-1},reflectivity:{value:1},ior:{value:1.5},refractionRatio:{value:.98}},aomap:{aoMap:{value:null},aoMapIntensity:{value:1},aoMapTransform:{value:new wn}},lightmap:{lightMap:{value:null},lightMapIntensity:{value:1},lightMapTransform:{value:new wn}},bumpmap:{bumpMap:{value:null},bumpMapTransform:{value:new wn},bumpScale:{value:1}},normalmap:{normalMap:{value:null},normalMapTransform:{value:new wn},normalScale:{value:new xe(1,1)}},displacementmap:{displacementMap:{value:null},displacementMapTransform:{value:new wn},displacementScale:{value:1},displacementBias:{value:0}},emissivemap:{emissiveMap:{value:null},emissiveMapTransform:{value:new wn}},metalnessmap:{metalnessMap:{value:null},metalnessMapTransform:{value:new wn}},roughnessmap:{roughnessMap:{value:null},roughnessMapTransform:{value:new wn}},gradientmap:{gradientMap:{value:null}},fog:{fogDensity:{value:25e-5},fogNear:{value:1},fogFar:{value:2e3},fogColor:{value:new qe(16777215)}},lights:{ambientLightColor:{value:[]},lightProbe:{value:[]},directionalLights:{value:[],properties:{direction:{},color:{}}},directionalLightShadows:{value:[],properties:{shadowIntensity:1,shadowBias:{},shadowNormalBias:{},shadowRadius:{},shadowMapSize:{}}},directionalShadowMap:{value:[]},directionalShadowMatrix:{value:[]},spotLights:{value:[],properties:{color:{},position:{},direction:{},distance:{},coneCos:{},penumbraCos:{},decay:{}}},spotLightShadows:{value:[],properties:{shadowIntensity:1,shadowBias:{},shadowNormalBias:{},shadowRadius:{},shadowMapSize:{}}},spotLightMap:{value:[]},spotShadowMap:{value:[]},spotLightMatrix:{value:[]},pointLights:{value:[],properties:{color:{},position:{},decay:{},distance:{}}},pointLightShadows:{value:[],properties:{shadowIntensity:1,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 qe(16777215)},opacity:{value:1},size:{value:1},scale:{value:1},map:{value:null},alphaMap:{value:null},alphaMapTransform:{value:new wn},alphaTest:{value:0},uvTransform:{value:new wn}},sprite:{diffuse:{value:new qe(16777215)},opacity:{value:1},center:{value:new xe(.5,.5)},rotation:{value:0},map:{value:null},mapTransform:{value:new wn},alphaMap:{value:null},alphaMapTransform:{value:new wn},alphaTest:{value:0}}},cc={basic:{uniforms:ho([Qe.common,Qe.specularmap,Qe.envmap,Qe.aomap,Qe.lightmap,Qe.fog]),vertexShader:Cn.meshbasic_vert,fragmentShader:Cn.meshbasic_frag},lambert:{uniforms:ho([Qe.common,Qe.specularmap,Qe.envmap,Qe.aomap,Qe.lightmap,Qe.emissivemap,Qe.bumpmap,Qe.normalmap,Qe.displacementmap,Qe.fog,Qe.lights,{emissive:{value:new qe(0)}}]),vertexShader:Cn.meshlambert_vert,fragmentShader:Cn.meshlambert_frag},phong:{uniforms:ho([Qe.common,Qe.specularmap,Qe.envmap,Qe.aomap,Qe.lightmap,Qe.emissivemap,Qe.bumpmap,Qe.normalmap,Qe.displacementmap,Qe.fog,Qe.lights,{emissive:{value:new qe(0)},specular:{value:new qe(1118481)},shininess:{value:30}}]),vertexShader:Cn.meshphong_vert,fragmentShader:Cn.meshphong_frag},standard:{uniforms:ho([Qe.common,Qe.envmap,Qe.aomap,Qe.lightmap,Qe.emissivemap,Qe.bumpmap,Qe.normalmap,Qe.displacementmap,Qe.roughnessmap,Qe.metalnessmap,Qe.fog,Qe.lights,{emissive:{value:new qe(0)},roughness:{value:1},metalness:{value:0},envMapIntensity:{value:1}}]),vertexShader:Cn.meshphysical_vert,fragmentShader:Cn.meshphysical_frag},toon:{uniforms:ho([Qe.common,Qe.aomap,Qe.lightmap,Qe.emissivemap,Qe.bumpmap,Qe.normalmap,Qe.displacementmap,Qe.gradientmap,Qe.fog,Qe.lights,{emissive:{value:new qe(0)}}]),vertexShader:Cn.meshtoon_vert,fragmentShader:Cn.meshtoon_frag},matcap:{uniforms:ho([Qe.common,Qe.bumpmap,Qe.normalmap,Qe.displacementmap,Qe.fog,{matcap:{value:null}}]),vertexShader:Cn.meshmatcap_vert,fragmentShader:Cn.meshmatcap_frag},points:{uniforms:ho([Qe.points,Qe.fog]),vertexShader:Cn.points_vert,fragmentShader:Cn.points_frag},dashed:{uniforms:ho([Qe.common,Qe.fog,{scale:{value:1},dashSize:{value:1},totalSize:{value:2}}]),vertexShader:Cn.linedashed_vert,fragmentShader:Cn.linedashed_frag},depth:{uniforms:ho([Qe.common,Qe.displacementmap]),vertexShader:Cn.depth_vert,fragmentShader:Cn.depth_frag},normal:{uniforms:ho([Qe.common,Qe.bumpmap,Qe.normalmap,Qe.displacementmap,{opacity:{value:1}}]),vertexShader:Cn.meshnormal_vert,fragmentShader:Cn.meshnormal_frag},sprite:{uniforms:ho([Qe.sprite,Qe.fog]),vertexShader:Cn.sprite_vert,fragmentShader:Cn.sprite_frag},background:{uniforms:{uvTransform:{value:new wn},t2D:{value:null},backgroundIntensity:{value:1}},vertexShader:Cn.background_vert,fragmentShader:Cn.background_frag},backgroundCube:{uniforms:{envMap:{value:null},flipEnvMap:{value:-1},backgroundBlurriness:{value:0},backgroundIntensity:{value:1},backgroundRotation:{value:new wn}},vertexShader:Cn.backgroundCube_vert,fragmentShader:Cn.backgroundCube_frag},cube:{uniforms:{tCube:{value:null},tFlip:{value:-1},opacity:{value:1}},vertexShader:Cn.cube_vert,fragmentShader:Cn.cube_frag},equirect:{uniforms:{tEquirect:{value:null}},vertexShader:Cn.equirect_vert,fragmentShader:Cn.equirect_frag},distanceRGBA:{uniforms:ho([Qe.common,Qe.displacementmap,{referencePosition:{value:new O},nearDistance:{value:1},farDistance:{value:1e3}}]),vertexShader:Cn.distanceRGBA_vert,fragmentShader:Cn.distanceRGBA_frag},shadow:{uniforms:ho([Qe.lights,Qe.fog,{color:{value:new qe(0)},opacity:{value:1}}]),vertexShader:Cn.shadow_vert,fragmentShader:Cn.shadow_frag}};cc.physical={uniforms:ho([cc.standard.uniforms,{clearcoat:{value:0},clearcoatMap:{value:null},clearcoatMapTransform:{value:new wn},clearcoatNormalMap:{value:null},clearcoatNormalMapTransform:{value:new wn},clearcoatNormalScale:{value:new xe(1,1)},clearcoatRoughness:{value:0},clearcoatRoughnessMap:{value:null},clearcoatRoughnessMapTransform:{value:new wn},dispersion:{value:0},iridescence:{value:0},iridescenceMap:{value:null},iridescenceMapTransform:{value:new wn},iridescenceIOR:{value:1.3},iridescenceThicknessMinimum:{value:100},iridescenceThicknessMaximum:{value:400},iridescenceThicknessMap:{value:null},iridescenceThicknessMapTransform:{value:new wn},sheen:{value:0},sheenColor:{value:new qe(0)},sheenColorMap:{value:null},sheenColorMapTransform:{value:new wn},sheenRoughness:{value:1},sheenRoughnessMap:{value:null},sheenRoughnessMapTransform:{value:new wn},transmission:{value:0},transmissionMap:{value:null},transmissionMapTransform:{value:new wn},transmissionSamplerSize:{value:new xe},transmissionSamplerMap:{value:null},thickness:{value:0},thicknessMap:{value:null},thicknessMapTransform:{value:new wn},attenuationDistance:{value:0},attenuationColor:{value:new qe(0)},specularColor:{value:new qe(1,1,1)},specularColorMap:{value:null},specularColorMapTransform:{value:new wn},specularIntensity:{value:1},specularIntensityMap:{value:null},specularIntensityMapTransform:{value:new wn},anisotropyVector:{value:new xe},anisotropyMap:{value:null},anisotropyMapTransform:{value:new wn}}]),vertexShader:Cn.meshphysical_vert,fragmentShader:Cn.meshphysical_frag};const lS={r:0,b:0,g:0},lf=new id,Cce=new Nt;function Sce(i,t,e,n,r,s,o){const a=new qe(0);let c,d,l=!0===s?0:1,h=null,p=0,m=null;function g(M){let x=!0===M.isScene?M.background:null;return x&&x.isTexture&&(x=(M.backgroundBlurriness>0?e:t).get(x)),x}function y(M,x){M.getRGB(lS,Z4(i)),n.buffers.color.setClear(lS.r,lS.g,lS.b,x,o)}return{getClearColor:function(){return a},setClearColor:function(M,x=1){a.set(M),l=x,y(a,l)},getClearAlpha:function(){return l},setClearAlpha:function(M){l=M,y(a,l)},render:function b(M){let x=!1;const C=g(M);null===C?y(a,l):C&&C.isColor&&(y(C,1),x=!0);const F=i.xr.getEnvironmentBlendMode();"additive"===F?n.buffers.color.setClear(0,0,0,1,o):"alpha-blend"===F&&n.buffers.color.setClear(0,0,0,0,o),(i.autoClear||x)&&(n.buffers.depth.setTest(!0),n.buffers.depth.setMask(!0),n.buffers.color.setMask(!0),i.clear(i.autoClearColor,i.autoClearDepth,i.autoClearStencil))},addToRenderList:function v(M,x){const C=g(x);C&&(C.isCubeTexture||C.mapping===mb)?(void 0===d&&(d=new Mn(new rf(1,1,1),new Cl({name:"BackgroundCubeMaterial",uniforms:Sg(cc.backgroundCube.uniforms),vertexShader:cc.backgroundCube.vertexShader,fragmentShader:cc.backgroundCube.fragmentShader,side:Ro,depthTest:!1,depthWrite:!1,fog:!1})),d.geometry.deleteAttribute("normal"),d.geometry.deleteAttribute("uv"),d.onBeforeRender=function(F,D,k){this.matrixWorld.copyPosition(k.matrixWorld)},Object.defineProperty(d.material,"envMap",{get:function(){return this.uniforms.envMap.value}}),r.update(d)),lf.copy(x.backgroundRotation),lf.x*=-1,lf.y*=-1,lf.z*=-1,C.isCubeTexture&&!1===C.isRenderTargetTexture&&(lf.y*=-1,lf.z*=-1),d.material.uniforms.envMap.value=C,d.material.uniforms.flipEnvMap.value=C.isCubeTexture&&!1===C.isRenderTargetTexture?-1:1,d.material.uniforms.backgroundBlurriness.value=x.backgroundBlurriness,d.material.uniforms.backgroundIntensity.value=x.backgroundIntensity,d.material.uniforms.backgroundRotation.value.setFromMatrix4(Cce.makeRotationFromEuler(lf)),d.material.toneMapped=Jn.getTransfer(C.colorSpace)!==Oi,(h!==C||p!==C.version||m!==i.toneMapping)&&(d.material.needsUpdate=!0,h=C,p=C.version,m=i.toneMapping),d.layers.enableAll(),M.unshift(d,d.geometry,d.material,0,0,null)):C&&C.isTexture&&(void 0===c&&(c=new Mn(new Iu(2,2),new Cl({name:"BackgroundMaterial",uniforms:Sg(cc.background.uniforms),vertexShader:cc.background.vertexShader,fragmentShader:cc.background.fragmentShader,side:ac,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=C,c.material.uniforms.backgroundIntensity.value=x.backgroundIntensity,c.material.toneMapped=Jn.getTransfer(C.colorSpace)!==Oi,!0===C.matrixAutoUpdate&&C.updateMatrix(),c.material.uniforms.uvTransform.value.copy(C.matrix),(h!==C||p!==C.version||m!==i.toneMapping)&&(c.material.needsUpdate=!0,h=C,p=C.version,m=i.toneMapping),c.layers.enableAll(),M.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(A){return i.bindVertexArray(A)}function d(A){return i.deleteVertexArray(A)}function p(A){const $=[],ie=[],ne=[];for(let se=0;se=0){const Ne=se[J];let Ye=ge[J];if(void 0===Ye&&("instanceMatrix"===J&&A.instanceMatrix&&(Ye=A.instanceMatrix),"instanceColor"===J&&A.instanceColor&&(Ye=A.instanceColor)),void 0===Ne||Ne.attribute!==Ye||Ye&&Ne.data!==Ye.data)return!0;q++}return s.attributesNum!==q||s.index!==ne}(A,ne,ie,se),ge&&function g(A,$,ie,ne){const se={},ge=$.attributes;let q=0;const re=ie.getAttributes();for(const J in re)if(re[J].location>=0){let Ne=ge[J];void 0===Ne&&("instanceMatrix"===J&&A.instanceMatrix&&(Ne=A.instanceMatrix),"instanceColor"===J&&A.instanceColor&&(Ne=A.instanceColor));const Ye={};Ye.attribute=Ne,Ne&&Ne.data&&(Ye.data=Ne.data),se[J]=Ye,q++}s.attributes=se,s.attributesNum=q,s.index=ne}(A,ne,ie,se),null!==se&&t.update(se,i.ELEMENT_ARRAY_BUFFER),(ge||o)&&(o=!1,function C(A,$,ie,ne){b();const se=ne.attributes,ge=ie.getAttributes(),q=$.defaultAttributeValues;for(const re in ge){const J=ge[re];if(J.location>=0){let we=se[re];if(void 0===we&&("instanceMatrix"===re&&A.instanceMatrix&&(we=A.instanceMatrix),"instanceColor"===re&&A.instanceColor&&(we=A.instanceColor)),void 0!==we){const Ne=we.normalized,Ye=we.itemSize,It=t.get(we);if(void 0===It)continue;const en=It.buffer,ae=It.type,Oe=It.bytesPerElement,Ze=ae===i.INT||ae===i.UNSIGNED_INT||we.gpuType===uk;if(we.isInterleavedBufferAttribute){const Fe=we.data,bt=Fe.stride,St=we.offset;if(Fe.isInstancedInterleavedBuffer){for(let Mt=0;Mt0&&i.getShaderPrecisionFormat(i.FRAGMENT_SHADER,i.HIGH_FLOAT).precision>0)return"highp";D="mediump"}return"mediump"===D&&i.getShaderPrecisionFormat(i.VERTEX_SHADER,i.MEDIUM_FLOAT).precision>0&&i.getShaderPrecisionFormat(i.FRAGMENT_SHADER,i.MEDIUM_FLOAT).precision>0?"mediump":"lowp"}let c=void 0!==e.precision?e.precision:"highp";const d=l(c);d!==c&&(console.warn("THREE.WebGLRenderer:",c,"not supported, using",d,"instead."),c=d);const h=!0===e.logarithmicDepthBuffer,p=i.getParameter(i.MAX_TEXTURE_IMAGE_UNITS),m=i.getParameter(i.MAX_VERTEX_TEXTURE_IMAGE_UNITS);return{isWebGL2:!0,getMaxAnisotropy:function s(){if(void 0!==r)return r;if(!0===t.has("EXT_texture_filter_anisotropic")){const D=t.get("EXT_texture_filter_anisotropic");r=i.getParameter(D.MAX_TEXTURE_MAX_ANISOTROPY_EXT)}else r=0;return r},getMaxPrecision:l,textureFormatReadable:function o(D){return!(D!==ko&&n.convert(D)!==i.getParameter(i.IMPLEMENTATION_COLOR_READ_FORMAT))},textureTypeReadable:function a(D){const k=D===Jm&&(t.has("EXT_color_buffer_half_float")||t.has("EXT_color_buffer_float"));return!(D!==Jc&&n.convert(D)!==i.getParameter(i.IMPLEMENTATION_COLOR_READ_TYPE)&&D!==Jo&&!k)},precision:c,logarithmicDepthBuffer:h,maxTextures:p,maxVertexTextures:m,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:m>0,maxSamples:i.getParameter(i.MAX_SAMPLES)}}function Tce(i){const t=this;let e=null,n=0,r=!1,s=!1;const o=new sf,a=new wn,l={value:null,needsUpdate:!1};function d(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=d(g,p,x,m);for(let F=0;F!==x;++F)C[F]=e[F];y.clippingState=C,this.numIntersection=b?this.numPlanes:0,this.numPlanes+=M}}}function Ice(i){let t=new WeakMap;function e(o,a){return a===AC?o.mapping=lc:a===DC&&(o.mapping=Zh),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===AC||a===DC){if(t.has(o))return e(t.get(o).texture,o.mapping);{const l=o.image;if(l&&l.height>0){const c=new xae(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 Ib extends fP{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,d=(this.top-this.bottom)/this.view.fullHeight/this.zoom;s+=c*this.view.offsetX,o=s+c*this.view.width,a-=d*this.view.offsetY,l=a-d*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 n5=[.125,.215,.35,.446,.526,.582],mP=new Ib,r5=new qe;let gP=null,_P=0,vP=0,yP=!1;const df=(1+Math.sqrt(5))/2,Tg=1/df,s5=[new O(-df,Tg,0),new O(df,Tg,0),new O(-Tg,0,df),new O(Tg,0,df),new O(0,df,-Tg),new O(0,df,Tg),new O(-1,1,-1),new O(1,1,-1),new O(-1,1,1),new O(1,1,1)];class o5{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){gP=this._renderer.getRenderTarget(),_P=this._renderer.getActiveCubeFace(),vP=this._renderer.getActiveMipmapLevel(),yP=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=c5(),this._compileMaterial(this._cubemapMaterial))}compileEquirectangularShader(){null===this._equirectMaterial&&(this._equirectMaterial=l5(),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=n5[o-i+4-1]:0===o&&(l=0),n.push(l);const c=1/(a-2),d=-c,h=1+c,p=[d,d,h,d,h,h,d,d,h,h,d,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 D=0;D2?0:-1;M.set([k,B,0,k+2/3,B,0,k+2/3,B+1,0,k,B,0,k+2/3,B+1,0,k,B+1,0],b*g*D),x.set(p,v*g*D),C.set([D,D,D,D,D,D],y*g*D)}const F=new hn;F.setAttribute("position",new zi(M,b)),F.setAttribute("uv",new zi(x,v)),F.setAttribute("faceIndex",new zi(C,y)),t.push(F),r>4&&r--}return{lodPlanes:t,sizeLods:e,sigmas:n}}(s)),this._blurMaterial=function kce(i,t,e){const n=new Float32Array(20),r=new O(0,1,0);return new Cl({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:Qc,depthTest:!1,depthWrite:!1})}(s,t,e)}return r}_compileMaterial(t){const e=new Mn(this._lodPlanes[0],t);this._renderer.compile(e,mP)}_sceneToCubeUV(t,e,n,r){const a=new yr(90,1,e,n),l=[1,-1,1,1,1,1],c=[1,1,1,-1,-1,-1],d=this._renderer,h=d.autoClear,p=d.toneMapping;d.getClearColor(r5),d.toneMapping=bu,d.autoClear=!1;const m=new Yi({name:"PMREM.Background",side:Ro,depthWrite:!1,depthTest:!1}),g=new Mn(new rf,m);let b=!1;const v=t.background;v?v.isColor&&(m.color.copy(v),t.background=null,b=!0):(m.color.copy(r5),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;cS(r,M*x,y>2?x:0,x,x),d.setRenderTarget(r),b&&d.render(g,a),d.render(t,a)}g.geometry.dispose(),g.material.dispose(),d.toneMapping=p,d.autoClear=h,t.background=v}_textureToCubeUV(t,e){const n=this._renderer,r=t.mapping===lc||t.mapping===Zh;r?(null===this._cubemapMaterial&&(this._cubemapMaterial=c5()),this._cubemapMaterial.uniforms.flipEnvMap.value=!1===t.isRenderTargetTexture?-1:1):null===this._equirectMaterial&&(this._equirectMaterial=l5());const s=r?this._cubemapMaterial:this._equirectMaterial,o=new Mn(this._lodPlanes[0],s);s.uniforms.envMap.value=t;const l=this._cubeSize;cS(e,0,0,3*l,2*l),n.setRenderTarget(e),n.render(o,mP)}_applyPMREM(t){const e=this._renderer,n=e.autoClear;e.autoClear=!1;const r=this._lodPlanes.length;for(let s=1;s20&&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 k=0;k<20;++k){const B=k/b,T=Math.exp(-B*B/2);y.push(T),0===k?M+=T:kx-4?r-x+4:0),4*(this._cubeSize-C),3*C,2*C),l.setRenderTarget(e),l.render(h,mP)}}function a5(i,t,e){const n=new Mu(i,t,e);return n.texture.mapping=mb,n.texture.name="PMREM.cubeUv",n.scissorTest=!0,n}function cS(i,t,e,n,r){i.viewport.set(t,e,n,r),i.scissor.set(t,e,n,r)}function l5(){return new Cl({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:Qc,depthTest:!1,depthWrite:!1})}function c5(){return new Cl({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:Qc,depthTest:!1,depthWrite:!1})}function Pce(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===AC||l===DC,d=l===lc||l===Zh;if(c||d){let h=t.get(a);if(a.isRenderTargetTexture&&a.pmremVersion!==(void 0!==h?h.texture.pmremVersion:0))return null===e&&(e=new o5(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||d&&m&&function r(a){let l=0;for(let d=0;d<6;d++)void 0!==a[d]&&l++;return 6===l}(m)?(null===e&&(e=new o5(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 Oce(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&&cg("THREE.WebGLRenderer: "+n+" extension not supported."),r}}}function Fce(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&&(F=Math.ceil(C/t.maxTextureSize),C=t.maxTextureSize);const D=new Float32Array(C*F*4*h),k=new Zk(D,C,F,h);k.type=Jo,k.needsUpdate=!0;const B=4*x;for(let A=0;A0)return i;const r=t*e;let s=g5[r];if(void 0===s&&(s=new Float32Array(r),g5[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 Fr(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 Ode(i,t){const e=function Pde(i){const t=Jn.getPrimaries(Jn.workingColorSpace),e=Jn.getPrimaries(i);let n;switch(t===e?n="":t===UC&&e===BC?n="LinearDisplayP3ToLinearSRGB":t===BC&&e===UC&&(n="LinearSRGBToLinearDisplayP3"),i){case ds:case LC:return[n,"LinearTransferOETF"];case cs:case jk: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 Fde(i,t){let e;switch(t){case foe:e="Linear";break;case poe:e="Reinhard";break;case moe:e="OptimizedCineon";break;case goe:e="ACESFilmic";break;case voe:e="AgX";break;case yoe:e="Neutral";break;case _oe:e="Custom";break;default:console.warn("THREE.WebGLProgram: Unsupported toneMapping:",t),e="Linear"}return"vec3 "+i+"( vec3 color ) { return "+e+"ToneMapping( color ); }"}const hS=new O;function Rb(i){return""!==i}function C5(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 S5(i,t){return i.replace(/NUM_CLIPPING_PLANES/g,t.numClippingPlanes).replace(/UNION_CLIPPING_PLANES/g,t.numClippingPlanes-t.numClipIntersection)}const Vde=/^[ \t]*#include +<([\w\d./]+)>/gm;function wP(i){return i.replace(Vde,Hde)}const zde=new Map;function Hde(i,t){let e=Cn[t];if(void 0===e){const n=zde.get(t);if(void 0===n)throw new Error("Can not resolve #include <"+t+">");e=Cn[n],console.warn('THREE.WebGLRenderer: Shader chunk "%s" has been deprecated. Use "%s" instead.',t,n)}return wP(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 E5(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(Rb).join("\n"),y.length>0&&(y+="\n")):(v=[A5(e),"#define SHADER_TYPE "+e.shaderType,"#define SHADER_NAME "+e.shaderName,g,e.extensionClipCullDistance?"#define USE_CLIP_DISTANCE":"",e.batching?"#define USE_BATCHING":"",e.batchingColor?"#define USE_BATCHING_COLOR":"",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 "+d:"",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_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.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","#ifdef USE_SKINNING","\tattribute vec4 skinIndex;","\tattribute vec4 skinWeight;","#endif","\n"].filter(Rb).join("\n"),y=[A5(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 "+d:"",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.dispersion?"#define USE_DISPERSION":"",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||e.batchingColor?"#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.decodeVideoTexture?"#define DECODE_VIDEO_TEXTURE":"",e.logarithmicDepthBuffer?"#define USE_LOGDEPTHBUF":"","uniform mat4 viewMatrix;","uniform vec3 cameraPosition;","uniform bool isOrthographic;",e.toneMapping!==bu?"#define TONE_MAPPING":"",e.toneMapping!==bu?Cn.tonemapping_pars_fragment:"",e.toneMapping!==bu?Fde("toneMapping",e.toneMapping):"",e.dithering?"#define DITHERING":"",e.opaque?"#define OPAQUE":"",Cn.colorspace_pars_fragment,Ode("linearToOutputTexel",e.outputColorSpace),(Jn.getLuminanceCoefficients(hS),["float luminance( const in vec3 rgb ) {",`\tconst vec3 weights = vec3( ${hS.x.toFixed(4)}, ${hS.y.toFixed(4)}, ${hS.z.toFixed(4)} );`,"\treturn dot( weights, rgb );","}"].join("\n")),e.useDepthPacking?"#define DEPTH_PACKING "+e.depthPacking:"","\n"].filter(Rb).join("\n")),o=wP(o),o=C5(o,e),o=S5(o,e),a=wP(a),a=C5(a,e),a=S5(a,e),o=E5(o),a=E5(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===A4?"":"layout(location = 0) out highp vec4 pc_fragColor;",e.glslVersion===A4?"":"#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,F=w5(r,r.VERTEX_SHADER,M+v+o),D=w5(r,r.FRAGMENT_SHADER,C);function k($){if(i.debug.checkShaderErrors){const ie=r.getProgramInfoLog(b).trim(),ne=r.getShaderInfoLog(F).trim(),se=r.getShaderInfoLog(D).trim();let ge=!0,q=!0;if(!1===r.getProgramParameter(b,r.LINK_STATUS))if(ge=!1,"function"==typeof i.debug.onShaderError)i.debug.onShaderError(r,b,F,D);else{const re=M5(r,F,"vertex"),J=M5(r,D,"fragment");console.error("THREE.WebGLProgram: Shader Error "+r.getError()+" - VALIDATE_STATUS "+r.getProgramParameter(b,r.VALIDATE_STATUS)+"\n\nMaterial Name: "+$.name+"\nMaterial Type: "+$.type+"\n\nProgram Info Log: "+ie+"\n"+re+"\n"+J)}else""!==ie?console.warn("THREE.WebGLProgram: Program Info Log:",ie):(""===ne||""===se)&&(q=!1);q&&($.diagnostics={runnable:ge,programLog:ie,vertexShader:{log:ne,prefix:v},fragmentShader:{log:se,prefix:y}})}r.deleteShader(F),r.deleteShader(D),B=new uS(r,b),T=function Ude(i,t){const e={},n=i.getProgramParameter(t,i.ACTIVE_ATTRIBUTES);for(let r=0;r0,ce=T.clearcoat>0,Te=T.iridescence>0,Ae=T.sheen>0,Bt=T.transmission>0,Je=R&&!!T.anisotropyMap,ut=ce&&!!T.clearcoatMap,bn=ce&&!!T.clearcoatNormalMap,ze=ce&&!!T.clearcoatRoughnessMap,dt=Te&&!!T.iridescenceMap,jn=Te&&!!T.iridescenceThicknessMap,ln=Ae&&!!T.sheenColorMap,_t=Ae&&!!T.sheenRoughnessMap,vn=!!T.specularMap,Pn=!!T.specularColorMap,Xi=!!T.specularIntensityMap,Z=Bt&&!!T.transmissionMap,$e=Bt&&!!T.thicknessMap,Ee=!!T.alphaMap,ei=!!T.extensions;let br=bu;T.toneMapped&&(null===Fe||!0===Fe.isXRRenderTarget)&&(br=i.toneMapping);const hs={shaderID:we,shaderType:T.type,shaderName:T.name,vertexShader:en,fragmentShader:ae,defines:T.defines,customVertexShaderID:Oe,customFragmentShaderID:Ze,isRawShaderMaterial:!0===T.isRawShaderMaterial,glslVersion:T.glslVersion,precision:m,batching:St,batchingColor:St&&null!==ne._colorsTexture,instancing:bt,instancingColor:bt&&null!==ne.instanceColor,instancingMorph:bt&&null!==ne.morphTexture,supportsVertexTextures:p,outputColorSpace:null===Fe?i.outputColorSpace:!0===Fe.isXRRenderTarget?Fe.texture.colorSpace:ds,alphaToCoverage:!!T.alphaToCoverage,map:Mt,matcap:!!T.matcap,envMap:N,envMapMode:N&&re.mapping,envMapCubeUVHeight:J,aoMap:Ge,lightMap:Le,bumpMap:nt,normalMap:Me,displacementMap:p&&Gt,emissiveMap:it,normalMapObjectSpace:Me&&T.normalMapType===Aoe,normalMapTangentSpace:Me&&T.normalMapType===Qh,metalnessMap:pt,roughnessMap:z,anisotropy:R,anisotropyMap:Je,clearcoat:ce,clearcoatMap:ut,clearcoatNormalMap:bn,clearcoatRoughnessMap:ze,dispersion:T.dispersion>0,iridescence:Te,iridescenceMap:dt,iridescenceThicknessMap:jn,sheen:Ae,sheenColorMap:ln,sheenRoughnessMap:_t,specularMap:vn,specularColorMap:Pn,specularIntensityMap:Xi,transmission:Bt,transmissionMap:Z,thicknessMap:$e,gradientMap:!!T.gradientMap,opaque:!1===T.transparent&&T.blending===Zm&&!1===T.alphaToCoverage,alphaMap:Ee,alphaTest:T.alphaTest>0,alphaHash:!!T.alphaHash,combine:T.combine,mapUv:Mt&&b(T.map.channel),aoMapUv:Ge&&b(T.aoMap.channel),lightMapUv:Le&&b(T.lightMap.channel),bumpMapUv:nt&&b(T.bumpMap.channel),normalMapUv:Me&&b(T.normalMap.channel),displacementMapUv:Gt&&b(T.displacementMap.channel),emissiveMapUv:it&&b(T.emissiveMap.channel),metalnessMapUv:pt&&b(T.metalnessMap.channel),roughnessMapUv:z&&b(T.roughnessMap.channel),anisotropyMapUv:Je&&b(T.anisotropyMap.channel),clearcoatMapUv:ut&&b(T.clearcoatMap.channel),clearcoatNormalMapUv:bn&&b(T.clearcoatNormalMap.channel),clearcoatRoughnessMapUv:ze&&b(T.clearcoatRoughnessMap.channel),iridescenceMapUv:dt&&b(T.iridescenceMap.channel),iridescenceThicknessMapUv:jn&&b(T.iridescenceThicknessMap.channel),sheenColorMapUv:ln&&b(T.sheenColorMap.channel),sheenRoughnessMapUv:_t&&b(T.sheenRoughnessMap.channel),specularMapUv:vn&&b(T.specularMap.channel),specularColorMapUv:Pn&&b(T.specularColorMap.channel),specularIntensityMapUv:Xi&&b(T.specularIntensityMap.channel),transmissionMapUv:Z&&b(T.transmissionMap.channel),thicknessMapUv:$e&&b(T.thicknessMap.channel),alphaMapUv:Ee&&b(T.alphaMap.channel),vertexTangents:!!ge.attributes.tangent&&(Me||R),vertexColors:T.vertexColors,vertexAlphas:!0===T.vertexColors&&!!ge.attributes.color&&4===ge.attributes.color.itemSize,pointsUvs:!0===ne.isPoints&&!!ge.attributes.uv&&(Mt||Ee),fog:!!se,useFog:!0===T.fog,fogExp2:!!se&&se.isFogExp2,flatShading:!0===T.flatShading,sizeAttenuation:!0===T.sizeAttenuation,logarithmicDepthBuffer:h,skinning:!0===ne.isSkinnedMesh,morphTargets:void 0!==ge.morphAttributes.position,morphNormals:void 0!==ge.morphAttributes.normal,morphColors:void 0!==ge.morphAttributes.color,morphTargetsCount:Ye,morphTextureStride:It,numDirLights:A.directional.length,numPointLights:A.point.length,numSpotLights:A.spot.length,numSpotLightMaps:A.spotLightMap.length,numRectAreaLights:A.rectArea.length,numHemiLights:A.hemi.length,numDirLightShadows:A.directionalShadowMap.length,numPointLightShadows:A.pointShadowMap.length,numSpotLightShadows:A.spotShadowMap.length,numSpotLightShadowsWithMaps:A.numSpotLightShadowsWithMaps,numLightProbes:A.numLightProbes,numClippingPlanes:o.numPlanes,numClipIntersection:o.numIntersection,dithering:T.dithering,shadowMapEnabled:i.shadowMap.enabled&&$.length>0,shadowMapType:i.shadowMap.type,toneMapping:br,decodeVideoTexture:Mt&&!0===T.map.isVideoTexture&&Jn.getTransfer(T.map.colorSpace)===Oi,premultipliedAlpha:T.premultipliedAlpha,doubleSided:T.side===Ls,flipSided:T.side===Ro,useDepthPacking:T.depthPacking>=0,depthPacking:T.depthPacking||0,index0AttributeName:T.index0AttributeName,extensionClipCullDistance:ei&&!0===T.extensions.clipCullDistance&&n.has("WEBGL_clip_cull_distance"),extensionMultiDraw:(ei&&!0===T.extensions.multiDraw||St)&&n.has("WEBGL_multi_draw"),rendererExtensionParallelShaderCompile:n.has("KHR_parallel_shader_compile"),customProgramCacheKey:T.customProgramCacheKey()};return hs.vertexUv1s=c.has(1),hs.vertexUv2s=c.has(2),hs.vertexUv3s=c.has(3),c.clear(),hs},getProgramCacheKey:function y(T){const A=[];if(T.shaderID?A.push(T.shaderID):(A.push(T.customVertexShaderID),A.push(T.customFragmentShaderID)),void 0!==T.defines)for(const $ in T.defines)A.push($),A.push(T.defines[$]);return!1===T.isRawShaderMaterial&&(function M(T,A){T.push(A.precision),T.push(A.outputColorSpace),T.push(A.envMapMode),T.push(A.envMapCubeUVHeight),T.push(A.mapUv),T.push(A.alphaMapUv),T.push(A.lightMapUv),T.push(A.aoMapUv),T.push(A.bumpMapUv),T.push(A.normalMapUv),T.push(A.displacementMapUv),T.push(A.emissiveMapUv),T.push(A.metalnessMapUv),T.push(A.roughnessMapUv),T.push(A.anisotropyMapUv),T.push(A.clearcoatMapUv),T.push(A.clearcoatNormalMapUv),T.push(A.clearcoatRoughnessMapUv),T.push(A.iridescenceMapUv),T.push(A.iridescenceThicknessMapUv),T.push(A.sheenColorMapUv),T.push(A.sheenRoughnessMapUv),T.push(A.specularMapUv),T.push(A.specularColorMapUv),T.push(A.specularIntensityMapUv),T.push(A.transmissionMapUv),T.push(A.thicknessMapUv),T.push(A.combine),T.push(A.fogExp2),T.push(A.sizeAttenuation),T.push(A.morphTargetsCount),T.push(A.morphAttributeCount),T.push(A.numDirLights),T.push(A.numPointLights),T.push(A.numSpotLights),T.push(A.numSpotLightMaps),T.push(A.numHemiLights),T.push(A.numRectAreaLights),T.push(A.numDirLightShadows),T.push(A.numPointLightShadows),T.push(A.numSpotLightShadows),T.push(A.numSpotLightShadowsWithMaps),T.push(A.numLightProbes),T.push(A.shadowMapType),T.push(A.toneMapping),T.push(A.numClippingPlanes),T.push(A.numClipIntersection),T.push(A.depthPacking)}(A,T),function x(T,A){a.disableAll(),A.supportsVertexTextures&&a.enable(0),A.instancing&&a.enable(1),A.instancingColor&&a.enable(2),A.instancingMorph&&a.enable(3),A.matcap&&a.enable(4),A.envMap&&a.enable(5),A.normalMapObjectSpace&&a.enable(6),A.normalMapTangentSpace&&a.enable(7),A.clearcoat&&a.enable(8),A.iridescence&&a.enable(9),A.alphaTest&&a.enable(10),A.vertexColors&&a.enable(11),A.vertexAlphas&&a.enable(12),A.vertexUv1s&&a.enable(13),A.vertexUv2s&&a.enable(14),A.vertexUv3s&&a.enable(15),A.vertexTangents&&a.enable(16),A.anisotropy&&a.enable(17),A.alphaHash&&a.enable(18),A.batching&&a.enable(19),A.dispersion&&a.enable(20),A.batchingColor&&a.enable(21),T.push(a.mask),a.disableAll(),A.fog&&a.enable(0),A.useFog&&a.enable(1),A.flatShading&&a.enable(2),A.logarithmicDepthBuffer&&a.enable(3),A.skinning&&a.enable(4),A.morphTargets&&a.enable(5),A.morphNormals&&a.enable(6),A.morphColors&&a.enable(7),A.premultipliedAlpha&&a.enable(8),A.shadowMapEnabled&&a.enable(9),A.doubleSided&&a.enable(10),A.flipSided&&a.enable(11),A.useDepthPacking&&a.enable(12),A.dithering&&a.enable(13),A.transmission&&a.enable(14),A.sheen&&a.enable(15),A.opaque&&a.enable(16),A.pointsUvs&&a.enable(17),A.decodeVideoTexture&&a.enable(18),A.alphaToCoverage&&a.enable(19),T.push(a.mask)}(A,T),A.push(i.outputColorSpace)),A.push(T.customProgramCacheKey),A.join()},getUniforms:function C(T){const A=g[T.type];let $;return $=A?Q4.clone(cc[A].uniforms):T.uniforms,$},acquireProgram:function F(T,A){let $;for(let ie=0,ne=d.length;ie0?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 d(){for(let h=t,p=i.length;h1&&e.sort(h||nue),n.length>1&&n.sort(p||D5),r.length>1&&r.sort(p||D5)}}}function iue(){let i=new WeakMap;return{get:function t(n,r){const s=i.get(n);let o;return void 0===s?(o=new T5,i.set(n,[o])):r>=s.length?(o=new T5,s.push(o)):o=s[r],o},dispose:function e(){i=new WeakMap}}}function rue(){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 O,color:new qe};break;case"SpotLight":e={position:new O,direction:new O,color:new qe,distance:0,coneCos:0,penumbraCos:0,decay:0};break;case"PointLight":e={position:new O,color:new qe,distance:0,decay:0};break;case"HemisphereLight":e={direction:new O,skyColor:new qe,groundColor:new qe};break;case"RectAreaLight":e={color:new qe,position:new O,halfWidth:new O,halfHeight:new O}}return i[t.id]=e,e}}}let oue=0;function aue(i,t){return(t.castShadow?2:0)-(i.castShadow?2:0)+(t.map?1:0)-(i.map?1:0)}function lue(i){const t=new rue,e=function sue(){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={shadowIntensity:1,shadowBias:0,shadowNormalBias:0,shadowRadius:1,shadowMapSize:new xe};break;case"PointLight":e={shadowIntensity:1,shadowBias:0,shadowNormalBias:0,shadowRadius:1,shadowMapSize:new xe,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 O);const r=new O,s=new Nt,o=new Nt;return{setup:function a(c){let d=0,h=0,p=0;for(let T=0;T<9;T++)n.probe[T].set(0,0,0);let m=0,g=0,b=0,v=0,y=0,M=0,x=0,C=0,F=0,D=0,k=0;c.sort(aue);for(let T=0,A=c.length;T0&&(!0===i.has("OES_texture_float_linear")?(n.rectAreaLTC1=Qe.LTC_FLOAT_1,n.rectAreaLTC2=Qe.LTC_FLOAT_2):(n.rectAreaLTC1=Qe.LTC_HALF_1,n.rectAreaLTC2=Qe.LTC_HALF_2)),n.ambient[0]=d,n.ambient[1]=h,n.ambient[2]=p;const B=n.hash;(B.directionalLength!==m||B.pointLength!==g||B.spotLength!==b||B.rectAreaLength!==v||B.hemiLength!==y||B.numDirectionalShadows!==M||B.numPointShadows!==x||B.numSpotShadows!==C||B.numSpotMaps!==F||B.numLightProbes!==k)&&(n.directional.length=m,n.spot.length=b,n.rectArea.length=v,n.point.length=g,n.hemi.length=y,n.directionalShadow.length=M,n.directionalShadowMap.length=M,n.pointShadow.length=x,n.pointShadowMap.length=x,n.spotShadow.length=C,n.spotShadowMap.length=C,n.directionalShadowMatrix.length=M,n.pointShadowMatrix.length=x,n.spotLightMatrix.length=C+F-D,n.spotLightMap.length=F,n.numSpotLightShadowsWithMaps=D,n.numLightProbes=k,B.directionalLength=m,B.pointLength=g,B.spotLength=b,B.rectAreaLength=v,B.hemiLength=y,B.numDirectionalShadows=M,B.numPointShadows=x,B.numSpotShadows=C,B.numSpotMaps=F,B.numLightProbes=k,n.version=oue++)},setupView:function l(c,d){let h=0,p=0,m=0,g=0,b=0;const v=d.matrixWorldInverse;for(let y=0,M=c.length;y=o.length?(a=new I5(i),o.push(a)):a=o[s],a},dispose:function n(){t=new WeakMap}}}class R5 extends Oo{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 k5 extends Oo{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 due="void main() {\n\tgl_Position = vec4( position, 1.0 );\n}",uue="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 hue(i,t,e){let n=new aS;const r=new xe,s=new xe,o=new gi,a=new R5({depthPacking:Eoe}),l=new k5,c={},d=e.maxTextureSize,h={[ac]:Ro,[Ro]:ac,[Ls]:Ls},p=new Cl({defines:{VSM_SAMPLES:8},uniforms:{shadow_pass:{value:null},resolution:{value:new xe},radius:{value:4}},vertexShader:due,fragmentShader:uue}),m=p.clone();m.defines.HORIZONTAL_PASS=1;const g=new hn;g.setAttribute("position",new zi(new Float32Array([-1,-1,.5,3,-1,.5,-1,3,.5]),3));const b=new Mn(g,p),v=this;this.enabled=!1,this.autoUpdate=!0,this.needsUpdate=!1,this.type=l4;let y=this.type;function M(D,k){const B=t.update(b);p.defines.VSM_SAMPLES!==D.blurSamples&&(p.defines.VSM_SAMPLES=D.blurSamples,m.defines.VSM_SAMPLES=D.blurSamples,p.needsUpdate=!0,m.needsUpdate=!0),null===D.mapPass&&(D.mapPass=new Mu(r.x,r.y)),p.uniforms.shadow_pass.value=D.map.texture,p.uniforms.resolution.value=D.mapSize,p.uniforms.radius.value=D.radius,i.setRenderTarget(D.mapPass),i.clear(),i.renderBufferDirect(k,null,B,p,b,null),m.uniforms.shadow_pass.value=D.mapPass.texture,m.uniforms.resolution.value=D.mapSize,m.uniforms.radius.value=D.radius,i.setRenderTarget(D.map),i.clear(),i.renderBufferDirect(k,null,B,m,b,null)}function x(D,k,B,T){let A=null;const $=!0===B.isPointLight?D.customDistanceMaterial:D.customDepthMaterial;if(void 0!==$)A=$;else if(A=!0===B.isPointLight?l:a,i.localClippingEnabled&&!0===k.clipShadows&&Array.isArray(k.clippingPlanes)&&0!==k.clippingPlanes.length||k.displacementMap&&0!==k.displacementScale||k.alphaMap&&k.alphaTest>0||k.map&&k.alphaTest>0){const ie=A.uuid,ne=k.uuid;let se=c[ie];void 0===se&&(se={},c[ie]=se);let ge=se[ne];void 0===ge&&(ge=A.clone(),se[ne]=ge,k.addEventListener("dispose",F)),A=ge}return A.visible=k.visible,A.wireframe=k.wireframe,A.side=T===Zc?null!==k.shadowSide?k.shadowSide:k.side:null!==k.shadowSide?k.shadowSide:h[k.side],A.alphaMap=k.alphaMap,A.alphaTest=k.alphaTest,A.map=k.map,A.clipShadows=k.clipShadows,A.clippingPlanes=k.clippingPlanes,A.clipIntersection=k.clipIntersection,A.displacementMap=k.displacementMap,A.displacementScale=k.displacementScale,A.displacementBias=k.displacementBias,A.wireframeLinewidth=k.wireframeLinewidth,A.linewidth=k.linewidth,!0===B.isPointLight&&!0===A.isMeshDistanceMaterial&&(i.properties.get(A).light=B),A}function C(D,k,B,T,A){if(!1===D.visible)return;if(D.layers.test(k.layers)&&(D.isMesh||D.isLine||D.isPoints)&&(D.castShadow||D.receiveShadow&&A===Zc)&&(!D.frustumCulled||n.intersectsObject(D))){D.modelViewMatrix.multiplyMatrices(B.matrixWorldInverse,D.matrixWorld);const ne=t.update(D),se=D.material;if(Array.isArray(se)){const ge=ne.groups;for(let q=0,re=ge.length;qd||r.y>d)&&(r.x>d&&(s.x=Math.floor(d/we.x),r.x=s.x*we.x,J.mapSize.x=s.x),r.y>d&&(s.y=Math.floor(d/we.y),r.y=s.y*we.y,J.mapSize.y=s.y)),null===J.map||!0===ne||!0===se){const Ye=this.type!==Zc?{minFilter:_r,magFilter:_r}:{};null!==J.map&&J.map.dispose(),J.map=new Mu(r.x,r.y,Ye),J.map.texture.name=re.name+".shadowMap",J.camera.updateProjectionMatrix()}i.setRenderTarget(J.map),i.clear();const Ne=J.getViewportCount();for(let Ye=0;Ye=1):-1!==re.indexOf("OpenGL ES")&&(q=parseFloat(/^OpenGL ES (\d)/.exec(re)[1]),ge=q>=2);let J=null,we={};const Ne=i.getParameter(i.SCISSOR_BOX),Ye=i.getParameter(i.VIEWPORT),It=(new gi).fromArray(Ne),en=(new gi).fromArray(Ye);function ae(Z,$e,Ce,Ee){const Ke=new Uint8Array(4),tn=i.createTexture();i.bindTexture(Z,tn),i.texParameteri(Z,i.TEXTURE_MIN_FILTER,i.NEAREST),i.texParameteri(Z,i.TEXTURE_MAG_FILTER,i.NEAREST);for(let ei=0;ei"u")&&/OculusBrowser/g.test(navigator.userAgent),c=new xe,d=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(z,R){return m?new OffscreenCanvas(z,R):wb("canvas")}function b(z,R,ce){let Ie=1;const Te=pt(z);if((Te.width>ce||Te.height>ce)&&(Ie=ce/Math.max(Te.width,Te.height)),Ie<1){if(typeof HTMLImageElement<"u"&&z instanceof HTMLImageElement||typeof HTMLCanvasElement<"u"&&z instanceof HTMLCanvasElement||typeof ImageBitmap<"u"&&z instanceof ImageBitmap||typeof VideoFrame<"u"&&z instanceof VideoFrame){const Ae=Math.floor(Ie*Te.width),Bt=Math.floor(Ie*Te.height);void 0===h&&(h=g(Ae,Bt));const Je=R?g(Ae,Bt):h;return Je.width=Ae,Je.height=Bt,Je.getContext("2d").drawImage(z,0,0,Ae,Bt),console.warn("THREE.WebGLRenderer: Texture has been resized from ("+Te.width+"x"+Te.height+") to ("+Ae+"x"+Bt+")."),Je}return"data"in z&&console.warn("THREE.WebGLRenderer: Image in DataTexture is too big ("+Te.width+"x"+Te.height+")."),z}return z}function v(z){return z.generateMipmaps&&z.minFilter!==_r&&z.minFilter!==lr}function y(z){i.generateMipmap(z)}function M(z,R,ce,Ie,Te=!1){if(null!==z){if(void 0!==i[z])return i[z];console.warn("THREE.WebGLRenderer: Attempt to use non-existing WebGL internal format '"+z+"'")}let Ae=R;if(R===i.RED&&(ce===i.FLOAT&&(Ae=i.R32F),ce===i.HALF_FLOAT&&(Ae=i.R16F),ce===i.UNSIGNED_BYTE&&(Ae=i.R8)),R===i.RED_INTEGER&&(ce===i.UNSIGNED_BYTE&&(Ae=i.R8UI),ce===i.UNSIGNED_SHORT&&(Ae=i.R16UI),ce===i.UNSIGNED_INT&&(Ae=i.R32UI),ce===i.BYTE&&(Ae=i.R8I),ce===i.SHORT&&(Ae=i.R16I),ce===i.INT&&(Ae=i.R32I)),R===i.RG&&(ce===i.FLOAT&&(Ae=i.RG32F),ce===i.HALF_FLOAT&&(Ae=i.RG16F),ce===i.UNSIGNED_BYTE&&(Ae=i.RG8)),R===i.RG_INTEGER&&(ce===i.UNSIGNED_BYTE&&(Ae=i.RG8UI),ce===i.UNSIGNED_SHORT&&(Ae=i.RG16UI),ce===i.UNSIGNED_INT&&(Ae=i.RG32UI),ce===i.BYTE&&(Ae=i.RG8I),ce===i.SHORT&&(Ae=i.RG16I),ce===i.INT&&(Ae=i.RG32I)),R===i.RGB&&ce===i.UNSIGNED_INT_5_9_9_9_REV&&(Ae=i.RGB9_E5),R===i.RGBA){const Bt=Te?NC:Jn.getTransfer(Ie);ce===i.FLOAT&&(Ae=i.RGBA32F),ce===i.HALF_FLOAT&&(Ae=i.RGBA16F),ce===i.UNSIGNED_BYTE&&(Ae=Bt===Oi?i.SRGB8_ALPHA8:i.RGBA8),ce===i.UNSIGNED_SHORT_4_4_4_4&&(Ae=i.RGBA4),ce===i.UNSIGNED_SHORT_5_5_5_1&&(Ae=i.RGB5_A1)}return(Ae===i.R16F||Ae===i.R32F||Ae===i.RG16F||Ae===i.RG32F||Ae===i.RGBA16F||Ae===i.RGBA32F)&&t.get("EXT_color_buffer_float"),Ae}function x(z,R){let ce;return z?null===R||R===xu||R===eg?ce=i.DEPTH24_STENCIL8:R===Jo?ce=i.DEPTH32F_STENCIL8:R===vb&&(ce=i.DEPTH24_STENCIL8,console.warn("DepthTexture: 16 bit depth attachment is not supported with stencil. Using 24-bit attachment.")):null===R||R===xu||R===eg?ce=i.DEPTH_COMPONENT24:R===Jo?ce=i.DEPTH_COMPONENT32F:R===vb&&(ce=i.DEPTH_COMPONENT16),ce}function C(z,R){return!0===v(z)||z.isFramebufferTexture&&z.minFilter!==_r&&z.minFilter!==lr?Math.log2(Math.max(R.width,R.height))+1:void 0!==z.mipmaps&&z.mipmaps.length>0?z.mipmaps.length:z.isCompressedTexture&&Array.isArray(z.image)?R.mipmaps.length:1}function F(z){const R=z.target;R.removeEventListener("dispose",F),function k(z){const R=n.get(z);if(void 0===R.__webglInit)return;const ce=z.source,Ie=p.get(ce);if(Ie){const Te=Ie[R.__cacheKey];Te.usedTimes--,0===Te.usedTimes&&B(z),0===Object.keys(Ie).length&&p.delete(ce)}n.remove(z)}(R),R.isVideoTexture&&d.delete(R)}function D(z){const R=z.target;R.removeEventListener("dispose",D),function T(z){const R=n.get(z);if(z.depthTexture&&z.depthTexture.dispose(),z.isWebGLCubeRenderTarget)for(let Ie=0;Ie<6;Ie++){if(Array.isArray(R.__webglFramebuffer[Ie]))for(let Te=0;Te0&&ce.__version!==z.version){const Ie=z.image;if(null===Ie)console.warn("THREE.WebGLRenderer: Texture marked for update but no image data found.");else{if(!1!==Ie.complete)return void en(ce,z,R);console.warn("THREE.WebGLRenderer: Texture marked for update but image is incomplete")}}e.bindTexture(i.TEXTURE_2D,ce.__webglTexture,i.TEXTURE0+R)}const J={[Ns]:i.REPEAT,[Ji]:i.CLAMP_TO_EDGE,[gb]:i.MIRRORED_REPEAT},we={[_r]:i.NEAREST,[dk]:i.NEAREST_MIPMAP_NEAREST,[Qm]:i.NEAREST_MIPMAP_LINEAR,[lr]:i.LINEAR,[_b]:i.LINEAR_MIPMAP_NEAREST,[bl]:i.LINEAR_MIPMAP_LINEAR},Ne={[Doe]:i.NEVER,[Ooe]:i.ALWAYS,[Toe]:i.LESS,[E4]:i.LEQUAL,[Ioe]:i.EQUAL,[Poe]:i.GEQUAL,[Roe]:i.GREATER,[koe]:i.NOTEQUAL};function Ye(z,R){if(R.type===Jo&&!1===t.has("OES_texture_float_linear")&&(R.magFilter===lr||R.magFilter===_b||R.magFilter===Qm||R.magFilter===bl||R.minFilter===lr||R.minFilter===_b||R.minFilter===Qm||R.minFilter===bl)&&console.warn("THREE.WebGLRenderer: Unable to use linear filtering with floating point textures. OES_texture_float_linear not supported on this device."),i.texParameteri(z,i.TEXTURE_WRAP_S,J[R.wrapS]),i.texParameteri(z,i.TEXTURE_WRAP_T,J[R.wrapT]),(z===i.TEXTURE_3D||z===i.TEXTURE_2D_ARRAY)&&i.texParameteri(z,i.TEXTURE_WRAP_R,J[R.wrapR]),i.texParameteri(z,i.TEXTURE_MAG_FILTER,we[R.magFilter]),i.texParameteri(z,i.TEXTURE_MIN_FILTER,we[R.minFilter]),R.compareFunction&&(i.texParameteri(z,i.TEXTURE_COMPARE_MODE,i.COMPARE_REF_TO_TEXTURE),i.texParameteri(z,i.TEXTURE_COMPARE_FUNC,Ne[R.compareFunction])),!0===t.has("EXT_texture_filter_anisotropic")){if(R.magFilter===_r||R.minFilter!==Qm&&R.minFilter!==bl||R.type===Jo&&!1===t.has("OES_texture_float_linear"))return;if(R.anisotropy>1||n.get(R).__currentAnisotropy){const ce=t.get("EXT_texture_filter_anisotropic");i.texParameterf(z,ce.TEXTURE_MAX_ANISOTROPY_EXT,Math.min(R.anisotropy,r.getMaxAnisotropy())),n.get(R).__currentAnisotropy=R.anisotropy}}}function It(z,R){let ce=!1;void 0===z.__webglInit&&(z.__webglInit=!0,R.addEventListener("dispose",F));const Ie=R.source;let Te=p.get(Ie);void 0===Te&&(Te={},p.set(Ie,Te));const Ae=function ne(z){const R=[];return R.push(z.wrapS),R.push(z.wrapT),R.push(z.wrapR||0),R.push(z.magFilter),R.push(z.minFilter),R.push(z.anisotropy),R.push(z.internalFormat),R.push(z.format),R.push(z.type),R.push(z.generateMipmaps),R.push(z.premultiplyAlpha),R.push(z.flipY),R.push(z.unpackAlignment),R.push(z.colorSpace),R.join()}(R);if(Ae!==z.__cacheKey){void 0===Te[Ae]&&(Te[Ae]={texture:i.createTexture(),usedTimes:0},o.memory.textures++,ce=!0),Te[Ae].usedTimes++;const Bt=Te[z.__cacheKey];void 0!==Bt&&(Te[z.__cacheKey].usedTimes--,0===Bt.usedTimes&&B(R)),z.__cacheKey=Ae,z.__webglTexture=Te[Ae].texture}return ce}function en(z,R,ce){let Ie=i.TEXTURE_2D;(R.isDataArrayTexture||R.isCompressedArrayTexture)&&(Ie=i.TEXTURE_2D_ARRAY),R.isData3DTexture&&(Ie=i.TEXTURE_3D);const Te=It(z,R),Ae=R.source;e.bindTexture(Ie,z.__webglTexture,i.TEXTURE0+ce);const Bt=n.get(Ae);if(Ae.version!==Bt.__version||!0===Te){e.activeTexture(i.TEXTURE0+ce);const Je=Jn.getPrimaries(Jn.workingColorSpace),ut=R.colorSpace===wu?null:Jn.getPrimaries(R.colorSpace),bn=R.colorSpace===wu||Je===ut?i.NONE:i.BROWSER_DEFAULT_WEBGL;i.pixelStorei(i.UNPACK_FLIP_Y_WEBGL,R.flipY),i.pixelStorei(i.UNPACK_PREMULTIPLY_ALPHA_WEBGL,R.premultiplyAlpha),i.pixelStorei(i.UNPACK_ALIGNMENT,R.unpackAlignment),i.pixelStorei(i.UNPACK_COLORSPACE_CONVERSION_WEBGL,bn);let ze=b(R.image,!1,r.maxTextureSize);ze=it(R,ze);const dt=s.convert(R.format,R.colorSpace),jn=s.convert(R.type);let _t,ln=M(R.internalFormat,dt,jn,R.colorSpace,R.isVideoTexture);Ye(Ie,R);const vn=R.mipmaps,Pn=!0!==R.isVideoTexture,Xi=void 0===Bt.__version||!0===Te,Z=Ae.dataReady,$e=C(R,ze);if(R.isDepthTexture)ln=x(R.format===ng,R.type),Xi&&(Pn?e.texStorage2D(i.TEXTURE_2D,1,ln,ze.width,ze.height):e.texImage2D(i.TEXTURE_2D,0,ln,ze.width,ze.height,0,dt,jn,null));else if(R.isDataTexture)if(vn.length>0){Pn&&Xi&&e.texStorage2D(i.TEXTURE_2D,$e,ln,vn[0].width,vn[0].height);for(let Ce=0,Ee=vn.length;Ce0){const Ke=MP(_t.width,_t.height,R.format,R.type);for(const tn of R.layerUpdates){const ei=_t.data.subarray(tn*Ke/_t.data.BYTES_PER_ELEMENT,(tn+1)*Ke/_t.data.BYTES_PER_ELEMENT);e.compressedTexSubImage3D(i.TEXTURE_2D_ARRAY,Ce,0,0,tn,_t.width,_t.height,1,dt,ei,0,0)}R.clearLayerUpdates()}else e.compressedTexSubImage3D(i.TEXTURE_2D_ARRAY,Ce,0,0,0,_t.width,_t.height,ze.depth,dt,_t.data,0,0)}else e.compressedTexImage3D(i.TEXTURE_2D_ARRAY,Ce,ln,_t.width,_t.height,ze.depth,0,_t.data,0,0);else console.warn("THREE.WebGLRenderer: Attempt to load unsupported compressed texture format in .uploadTexture()");else Pn?Z&&e.texSubImage3D(i.TEXTURE_2D_ARRAY,Ce,0,0,0,_t.width,_t.height,ze.depth,dt,jn,_t.data):e.texImage3D(i.TEXTURE_2D_ARRAY,Ce,ln,_t.width,_t.height,ze.depth,0,dt,jn,_t.data)}else{Pn&&Xi&&e.texStorage2D(i.TEXTURE_2D,$e,ln,vn[0].width,vn[0].height);for(let Ce=0,Ee=vn.length;Ce0){const Ce=MP(ze.width,ze.height,R.format,R.type);for(const Ee of R.layerUpdates){const Ke=ze.data.subarray(Ee*Ce/ze.data.BYTES_PER_ELEMENT,(Ee+1)*Ce/ze.data.BYTES_PER_ELEMENT);e.texSubImage3D(i.TEXTURE_2D_ARRAY,0,0,0,Ee,ze.width,ze.height,1,dt,jn,Ke)}R.clearLayerUpdates()}else e.texSubImage3D(i.TEXTURE_2D_ARRAY,0,0,0,0,ze.width,ze.height,ze.depth,dt,jn,ze.data)}else e.texImage3D(i.TEXTURE_2D_ARRAY,0,ln,ze.width,ze.height,ze.depth,0,dt,jn,ze.data);else if(R.isData3DTexture)Pn?(Xi&&e.texStorage3D(i.TEXTURE_3D,$e,ln,ze.width,ze.height,ze.depth),Z&&e.texSubImage3D(i.TEXTURE_3D,0,0,0,0,ze.width,ze.height,ze.depth,dt,jn,ze.data)):e.texImage3D(i.TEXTURE_3D,0,ln,ze.width,ze.height,ze.depth,0,dt,jn,ze.data);else if(R.isFramebufferTexture){if(Xi)if(Pn)e.texStorage2D(i.TEXTURE_2D,$e,ln,ze.width,ze.height);else{let Ce=ze.width,Ee=ze.height;for(let Ke=0;Ke<$e;Ke++)e.texImage2D(i.TEXTURE_2D,Ke,ln,Ce,Ee,0,dt,jn,null),Ce>>=1,Ee>>=1}}else if(vn.length>0){if(Pn&&Xi){const Ce=pt(vn[0]);e.texStorage2D(i.TEXTURE_2D,$e,ln,Ce.width,Ce.height)}for(let Ce=0,Ee=vn.length;Ce>Ae),dt=Math.max(1,R.height>>Ae);Te===i.TEXTURE_3D||Te===i.TEXTURE_2D_ARRAY?e.texImage3D(Te,Ae,ut,ze,dt,R.depth,0,Bt,Je,null):e.texImage2D(Te,Ae,ut,ze,dt,0,Bt,Je,null)}e.bindFramebuffer(i.FRAMEBUFFER,z),Me(R)?a.framebufferTexture2DMultisampleEXT(i.FRAMEBUFFER,Ie,Te,n.get(ce).__webglTexture,0,nt(R)):(Te===i.TEXTURE_2D||Te>=i.TEXTURE_CUBE_MAP_POSITIVE_X&&Te<=i.TEXTURE_CUBE_MAP_NEGATIVE_Z)&&i.framebufferTexture2D(i.FRAMEBUFFER,Ie,Te,n.get(ce).__webglTexture,Ae),e.bindFramebuffer(i.FRAMEBUFFER,null)}function Ze(z,R,ce){if(i.bindRenderbuffer(i.RENDERBUFFER,z),R.depthBuffer){const Ie=R.depthTexture,Ae=x(R.stencilBuffer,Ie&&Ie.isDepthTexture?Ie.type:null),Bt=R.stencilBuffer?i.DEPTH_STENCIL_ATTACHMENT:i.DEPTH_ATTACHMENT,Je=nt(R);Me(R)?a.renderbufferStorageMultisampleEXT(i.RENDERBUFFER,Je,Ae,R.width,R.height):ce?i.renderbufferStorageMultisample(i.RENDERBUFFER,Je,Ae,R.width,R.height):i.renderbufferStorage(i.RENDERBUFFER,Ae,R.width,R.height),i.framebufferRenderbuffer(i.FRAMEBUFFER,Bt,i.RENDERBUFFER,z)}else{const Ie=R.textures;for(let Te=0;Te0&&!0===t.has("WEBGL_multisampled_render_to_texture")&&!1!==R.__useRenderToTexture}function it(z,R){const ce=z.colorSpace,Ie=z.format,Te=z.type;return!0===z.isCompressedTexture||!0===z.isVideoTexture||ce!==ds&&ce!==wu&&(Jn.getTransfer(ce)===Oi?(Ie!==ko||Te!==Jc)&&console.warn("THREE.WebGLTextures: sRGB encoded textures have to use RGBAFormat and UnsignedByteType."):console.error("THREE.WebGLTextures: Unsupported texture color space:",ce)),R}function pt(z){return typeof HTMLImageElement<"u"&&z instanceof HTMLImageElement?(c.width=z.naturalWidth||z.width,c.height=z.naturalHeight||z.height):typeof VideoFrame<"u"&&z instanceof VideoFrame?(c.width=z.displayWidth,c.height=z.displayHeight):(c.width=z.width,c.height=z.height),c}this.allocateTextureUnit=function ie(){const z=A;return z>=r.maxTextures&&console.warn("THREE.WebGLTextures: Trying to use "+z+" texture units while this GPU supports only "+r.maxTextures),A+=1,z},this.resetTextureUnits=function $(){A=0},this.setTexture2D=se,this.setTexture2DArray=function ge(z,R){const ce=n.get(z);z.version>0&&ce.__version!==z.version?en(ce,z,R):e.bindTexture(i.TEXTURE_2D_ARRAY,ce.__webglTexture,i.TEXTURE0+R)},this.setTexture3D=function q(z,R){const ce=n.get(z);z.version>0&&ce.__version!==z.version?en(ce,z,R):e.bindTexture(i.TEXTURE_3D,ce.__webglTexture,i.TEXTURE0+R)},this.setTextureCube=function re(z,R){const ce=n.get(z);z.version>0&&ce.__version!==z.version?function ae(z,R,ce){if(6!==R.image.length)return;const Ie=It(z,R),Te=R.source;e.bindTexture(i.TEXTURE_CUBE_MAP,z.__webglTexture,i.TEXTURE0+ce);const Ae=n.get(Te);if(Te.version!==Ae.__version||!0===Ie){e.activeTexture(i.TEXTURE0+ce);const Bt=Jn.getPrimaries(Jn.workingColorSpace),Je=R.colorSpace===wu?null:Jn.getPrimaries(R.colorSpace),ut=R.colorSpace===wu||Bt===Je?i.NONE:i.BROWSER_DEFAULT_WEBGL;i.pixelStorei(i.UNPACK_FLIP_Y_WEBGL,R.flipY),i.pixelStorei(i.UNPACK_PREMULTIPLY_ALPHA_WEBGL,R.premultiplyAlpha),i.pixelStorei(i.UNPACK_ALIGNMENT,R.unpackAlignment),i.pixelStorei(i.UNPACK_COLORSPACE_CONVERSION_WEBGL,ut);const bn=R.isCompressedTexture||R.image[0].isCompressedTexture,ze=R.image[0]&&R.image[0].isDataTexture,dt=[];for(let Ee=0;Ee<6;Ee++)dt[Ee]=bn||ze?ze?R.image[Ee].image:R.image[Ee]:b(R.image[Ee],!0,r.maxCubemapSize),dt[Ee]=it(R,dt[Ee]);const jn=dt[0],ln=s.convert(R.format,R.colorSpace),_t=s.convert(R.type),vn=M(R.internalFormat,ln,_t,R.colorSpace),Pn=!0!==R.isVideoTexture,Xi=void 0===Ae.__version||!0===Ie,Z=Te.dataReady;let Ce,$e=C(R,jn);if(Ye(i.TEXTURE_CUBE_MAP,R),bn){Pn&&Xi&&e.texStorage2D(i.TEXTURE_CUBE_MAP,$e,vn,jn.width,jn.height);for(let Ee=0;Ee<6;Ee++){Ce=dt[Ee].mipmaps;for(let Ke=0;Ke0&&$e++;const Ee=pt(dt[0]);e.texStorage2D(i.TEXTURE_CUBE_MAP,$e,vn,Ee.width,Ee.height)}for(let Ee=0;Ee<6;Ee++)if(ze){Pn?Z&&e.texSubImage2D(i.TEXTURE_CUBE_MAP_POSITIVE_X+Ee,0,0,0,dt[Ee].width,dt[Ee].height,ln,_t,dt[Ee].data):e.texImage2D(i.TEXTURE_CUBE_MAP_POSITIVE_X+Ee,0,vn,dt[Ee].width,dt[Ee].height,0,ln,_t,dt[Ee].data);for(let Ke=0;Ke1;if(Bt||(void 0===Ie.__webglTexture&&(Ie.__webglTexture=i.createTexture()),Ie.__version=R.version,o.memory.textures++),Ae){ce.__webglFramebuffer=[];for(let Je=0;Je<6;Je++)if(R.mipmaps&&R.mipmaps.length>0){ce.__webglFramebuffer[Je]=[];for(let ut=0;ut0){ce.__webglFramebuffer=[];for(let Je=0;Je0&&!1===Me(z)){ce.__webglMultisampledFramebuffer=i.createFramebuffer(),ce.__webglColorRenderbuffer=[],e.bindFramebuffer(i.FRAMEBUFFER,ce.__webglMultisampledFramebuffer);for(let Je=0;Je0)for(let ut=0;ut0)for(let ut=0;ut0)if(!1===Me(z)){const R=z.textures,ce=z.width,Ie=z.height;let Te=i.COLOR_BUFFER_BIT;const Ae=z.stencilBuffer?i.DEPTH_STENCIL_ATTACHMENT:i.DEPTH_ATTACHMENT,Bt=n.get(z),Je=R.length>1;if(Je)for(let ut=0;utm+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(xue)))}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 Lo;n.matrixAutoUpdate=!1,n.visible=!1,t.joints[e.jointName]=n,t.add(n)}return t.joints[e.jointName]}}class Cue{constructor(){this.texture=null,this.mesh=null,this.depthNear=0,this.depthFar=0}init(t,e,n){if(null===this.texture){const r=new Po;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}}getMesh(t){if(null!==this.texture&&null===this.mesh){const e=t.cameras[0].viewport,n=new Cl({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:e.z},depthHeight:{value:e.w}}});this.mesh=new Mn(new Iu(20,20),n)}return this.mesh}reset(){this.texture=null,this.mesh=null}getDepthTexture(){return this.texture}}class Sue extends og{constructor(t,e){super();const n=this;let r=null,s=1,o=null,a="local-floor",l=1,c=null,d=null,h=null,p=null,m=null,g=null;const b=new Cue,v=e.getContextAttributes();let y=null,M=null;const x=[],C=[],F=new xe;let D=null;const k=new yr;k.layers.enable(1),k.viewport=new gi;const B=new yr;B.layers.enable(2),B.viewport=new gi;const T=[k,B],A=new bue;A.layers.enable(1),A.layers.enable(2);let $=null,ie=null;function ne(ae){const Oe=C.indexOf(ae.inputSource);if(-1===Oe)return;const Ze=x[Oe];void 0!==Ze&&(Ze.update(ae.inputSource,ae.frame,c||o),Ze.dispatchEvent({type:ae.type,data:ae.inputSource}))}function se(){r.removeEventListener("select",ne),r.removeEventListener("selectstart",ne),r.removeEventListener("selectend",ne),r.removeEventListener("squeeze",ne),r.removeEventListener("squeezestart",ne),r.removeEventListener("squeezeend",ne),r.removeEventListener("end",se),r.removeEventListener("inputsourceschange",ge);for(let ae=0;ae=0&&(C[Fe]=null,x[Fe].disconnect(Ze))}for(let Oe=0;Oe=C.length){C.push(Ze),Fe=St;break}if(null===C[St]){C[St]=Ze,Fe=St;break}}if(-1===Fe)break}const bt=x[Fe];bt&&bt.connect(Ze)}}this.cameraAutoUpdate=!0,this.enabled=!1,this.isPresenting=!1,this.getController=function(ae){let Oe=x[ae];return void 0===Oe&&(Oe=new CP,x[ae]=Oe),Oe.getTargetRaySpace()},this.getControllerGrip=function(ae){let Oe=x[ae];return void 0===Oe&&(Oe=new CP,x[ae]=Oe),Oe.getGripSpace()},this.getHand=function(ae){let Oe=x[ae];return void 0===Oe&&(Oe=new CP,x[ae]=Oe),Oe.getHandSpace()},this.setFramebufferScaleFactor=function(ae){s=ae,!0===n.isPresenting&&console.warn("THREE.WebXRManager: Cannot change framebuffer scale while presenting.")},this.setReferenceSpaceType=function(ae){a=ae,!0===n.isPresenting&&console.warn("THREE.WebXRManager: Cannot change reference space type while presenting.")},this.getReferenceSpace=function(){return c||o},this.setReferenceSpace=function(ae){c=ae},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 ae=tt(function*(Oe){if(r=Oe,null!==r){if(y=t.getRenderTarget(),r.addEventListener("select",ne),r.addEventListener("selectstart",ne),r.addEventListener("selectend",ne),r.addEventListener("squeeze",ne),r.addEventListener("squeezestart",ne),r.addEventListener("squeezeend",ne),r.addEventListener("end",se),r.addEventListener("inputsourceschange",ge),!0!==v.xrCompatible&&(yield e.makeXRCompatible()),D=t.getPixelRatio(),t.getSize(F),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 Mu(m.framebufferWidth,m.framebufferHeight,{format:ko,type:Jc,colorSpace:t.outputColorSpace,stencilBuffer:v.stencil});else{let Ze=null,Fe=null,bt=null;v.depth&&(bt=v.stencil?e.DEPTH24_STENCIL8:e.DEPTH_COMPONENT24,Ze=v.stencil?ng:tg,Fe=v.stencil?eg:xu);const St={colorFormat:e.RGBA8,depthFormat:bt,scaleFactor:s};h=new XRWebGLBinding(r,e),p=h.createProjectionLayer(St),r.updateRenderState({layers:[p]}),t.setPixelRatio(1),t.setSize(p.textureWidth,p.textureHeight,!1),M=new Mu(p.textureWidth,p.textureHeight,{format:ko,type:Jc,depthTexture:new d5(p.textureWidth,p.textureHeight,Fe,void 0,void 0,void 0,void 0,void 0,void 0,Ze),stencilBuffer:v.stencil,colorSpace:t.outputColorSpace,samples:v.antialias?4:0,resolveDepthBuffer:!1===p.ignoreDepthValues})}M.isXRRenderTarget=!0,this.setFoveation(l),c=null,o=yield r.requestReferenceSpace(a),en.setContext(r),en.start(),n.isPresenting=!0,n.dispatchEvent({type:"sessionstart"})}});return function(Oe){return ae.apply(this,arguments)}}(),this.getEnvironmentBlendMode=function(){if(null!==r)return r.environmentBlendMode},this.getDepthTexture=function(){return b.getDepthTexture()};const q=new O,re=new O;function we(ae,Oe){null===Oe?ae.matrixWorld.copy(ae.matrix):ae.matrixWorld.multiplyMatrices(Oe.matrixWorld,ae.matrix),ae.matrixWorldInverse.copy(ae.matrixWorld).invert()}this.updateCamera=function(ae){if(null===r)return;null!==b.texture&&(ae.near=b.depthNear,ae.far=b.depthFar),A.near=B.near=k.near=ae.near,A.far=B.far=k.far=ae.far,($!==A.near||ie!==A.far)&&(r.updateRenderState({depthNear:A.near,depthFar:A.far}),$=A.near,ie=A.far,k.near=$,k.far=ie,B.near=$,B.far=ie,k.updateProjectionMatrix(),B.updateProjectionMatrix(),ae.updateProjectionMatrix());const Oe=ae.parent,Ze=A.cameras;we(A,Oe);for(let Fe=0;Fe0&&(v.alphaTest.value=y.alphaTest);const M=t.get(y),x=M.envMap,C=M.envMapRotation;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(Eue.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,v.lightMapIntensity.value=y.lightMapIntensity,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,Z4(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 d(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===Ro&&v.clearcoatNormalScale.value.negate())),y.dispersion>0&&(v.dispersion.value=y.dispersion),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 Due(i,t,e,n){let r={},s={},o=[];const a=i.getParameter(i.MAX_UNIFORM_BUFFER_BINDINGS);function m(M,x,C,F){const D=M.value,k=x+"_"+C;if(void 0===F[k])return F[k]="number"==typeof D||"boolean"==typeof D?D:D.clone(),!0;{const B=F[k];if("number"==typeof D||"boolean"==typeof D){if(B!==D)return F[k]=D,!0}else if(!1===B.equals(D))return B.copy(D),!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 k=0,B=x.length;k0&&(C+=16-D),M.__size=C,M.__cache={}}(M),C=function d(M){const x=function h(){for(let M=0;M0),Xt=!!le.morphAttributes.position,ai=!!le.morphAttributes.normal,Fi=!!le.morphAttributes.color;let nr=bu;de.toneMapped&&(null===k||!0===k.isXRRenderTarget)&&(nr=x.toneMapping);const aa=le.morphAttributes.position||le.morphAttributes.normal||le.morphAttributes.color,hi=void 0!==aa?aa.length:0,Rt=it.get(de),fs=v.state.lights;!0!==ae||!0!==Oe&&L===T||bn.setState(de,L,L===T&&de.id===B);let fi=!1;de.version===Rt.__version?(Rt.needsLights&&Rt.lightsStateVersion!==fs.state.version||Rt.outputColorSpace!==xt||te.isBatchedMesh&&!1===Rt.batching||!te.isBatchedMesh&&!0===Rt.batching||te.isBatchedMesh&&!0===Rt.batchingColor&&null===te.colorTexture||te.isBatchedMesh&&!1===Rt.batchingColor&&null!==te.colorTexture||te.isInstancedMesh&&!1===Rt.instancing||!te.isInstancedMesh&&!0===Rt.instancing||te.isSkinnedMesh&&!1===Rt.skinning||!te.isSkinnedMesh&&!0===Rt.skinning||te.isInstancedMesh&&!0===Rt.instancingColor&&null===te.instanceColor||te.isInstancedMesh&&!1===Rt.instancingColor&&null!==te.instanceColor||te.isInstancedMesh&&!0===Rt.instancingMorph&&null===te.morphTexture||te.isInstancedMesh&&!1===Rt.instancingMorph&&null!==te.morphTexture||Rt.envMap!==wt||!0===de.fog&&Rt.fog!==je||void 0!==Rt.numClippingPlanes&&(Rt.numClippingPlanes!==bn.numPlanes||Rt.numIntersection!==bn.numIntersection)||Rt.vertexAlphas!==qt||Rt.vertexTangents!==on||Rt.morphTargets!==Xt||Rt.morphNormals!==ai||Rt.morphColors!==Fi||Rt.toneMapping!==nr||Rt.morphTargetsCount!==hi)&&(fi=!0):(fi=!0,Rt.__version=de.version);let El=Rt.currentProgram;!0===fi&&(El=xE(de,K,te));let qg=!1,la=!1,qO=!1;const xr=El.getUniforms(),Uu=Rt.uniforms;if(Me.useProgram(El.program)&&(qg=!0,la=!0,qO=!0),de.id!==B&&(B=de.id,la=!0),qg||T!==L){xr.setValue(N,"projectionMatrix",L.projectionMatrix),xr.setValue(N,"viewMatrix",L.matrixWorldInverse);const za=xr.map.cameraPosition;void 0!==za&&za.setValue(N,Fe.setFromMatrixPosition(L.matrixWorld)),nt.logarithmicDepthBuffer&&xr.setValue(N,"logDepthBufFC",2/(Math.log(L.far+1)/Math.LN2)),(de.isMeshPhongMaterial||de.isMeshToonMaterial||de.isMeshLambertMaterial||de.isMeshBasicMaterial||de.isMeshStandardMaterial||de.isShaderMaterial)&&xr.setValue(N,"isOrthographic",!0===L.isOrthographicCamera),T!==L&&(T=L,la=!0,qO=!0)}if(te.isSkinnedMesh){xr.setOptional(N,te,"bindMatrix"),xr.setOptional(N,te,"bindMatrixInverse");const za=te.skeleton;za&&(null===za.boneTexture&&za.computeBoneTexture(),xr.setValue(N,"boneTexture",za.boneTexture,pt))}te.isBatchedMesh&&(xr.setOptional(N,te,"batchingTexture"),xr.setValue(N,"batchingTexture",te._matricesTexture,pt),xr.setOptional(N,te,"batchingIdTexture"),xr.setValue(N,"batchingIdTexture",te._indirectTexture,pt),xr.setOptional(N,te,"batchingColorTexture"),null!==te._colorsTexture&&xr.setValue(N,"batchingColorTexture",te._colorsTexture,pt));const XO=le.morphAttributes;if((void 0!==XO.position||void 0!==XO.normal||void 0!==XO.color)&&jn.update(te,le,El),(la||Rt.receiveShadow!==te.receiveShadow)&&(Rt.receiveShadow=te.receiveShadow,xr.setValue(N,"receiveShadow",te.receiveShadow)),de.isMeshGouraudMaterial&&null!==de.envMap&&(Uu.envMap.value=wt,Uu.flipEnvMap.value=wt.isCubeTexture&&!1===wt.isRenderTargetTexture?-1:1),de.isMeshStandardMaterial&&null===de.envMap&&null!==K.environment&&(Uu.envMapIntensity.value=K.environmentIntensity),la&&(xr.setValue(N,"toneMappingExposure",x.toneMappingExposure),Rt.needsLights&&function Pve(L,K){L.ambientLightColor.needsUpdate=K,L.lightProbe.needsUpdate=K,L.directionalLights.needsUpdate=K,L.directionalLightShadows.needsUpdate=K,L.pointLights.needsUpdate=K,L.pointLightShadows.needsUpdate=K,L.spotLights.needsUpdate=K,L.spotLightShadows.needsUpdate=K,L.rectAreaLights.needsUpdate=K,L.hemisphereLights.needsUpdate=K}(Uu,qO),je&&!0===de.fog&&Bt.refreshFogUniforms(Uu,je),Bt.refreshMaterialUniforms(Uu,de,re,q,v.state.transmissionRenderTarget[L.id]),uS.upload(N,_8(Rt),Uu,pt)),de.isShaderMaterial&&!0===de.uniformsNeedUpdate&&(uS.upload(N,_8(Rt),Uu,pt),de.uniformsNeedUpdate=!1),de.isSpriteMaterial&&xr.setValue(N,"center",te.center),xr.setValue(N,"modelViewMatrix",te.modelViewMatrix),xr.setValue(N,"normalMatrix",te.normalMatrix),xr.setValue(N,"modelMatrix",te.matrixWorld),de.isShaderMaterial||de.isRawShaderMaterial){const za=de.uniformsGroups;for(let KO=0,Fve=za.length;KO{function je(){de.forEach(function(st){it.get(st).currentProgram.isReady()&&de.delete(st)}),0!==de.size?setTimeout(je,10):te(L)}null!==Le.get("KHR_parallel_shader_compile")?je():setTimeout(je,10)})};let ui=null;function fc(){kf.stop()}function f8(){kf.start()}const kf=new t5;function YO(L,K,le,de){if(!1===L.visible)return;if(L.layers.test(K.layers))if(L.isGroup)le=L.renderOrder;else if(L.isLOD)!0===L.autoUpdate&&L.update(K);else if(L.isLight)v.pushLight(L),L.castShadow&&v.pushShadow(L);else if(L.isSprite){if(!L.frustumCulled||en.intersectsSprite(L)){de&&bt.setFromMatrixPosition(L.matrixWorld).applyMatrix4(Ze);const st=Te.update(L),xt=L.material;xt.visible&&b.push(L,st,xt,le,bt.z,null)}}else if((L.isMesh||L.isLine||L.isPoints)&&(!L.frustumCulled||en.intersectsObject(L))){const st=Te.update(L),xt=L.material;if(de&&(void 0!==L.boundingSphere?(null===L.boundingSphere&&L.computeBoundingSphere(),bt.copy(L.boundingSphere.center)):(null===st.boundingSphere&&st.computeBoundingSphere(),bt.copy(st.boundingSphere.center)),bt.applyMatrix4(L.matrixWorld).applyMatrix4(Ze)),Array.isArray(xt)){const wt=st.groups;for(let qt=0,on=wt.length;qt0&&bE(te,K,le),je.length>0&&bE(je,K,le),st.length>0&&bE(st,K,le),Me.buffers.depth.setTest(!0),Me.buffers.depth.setMask(!0),Me.buffers.color.setMask(!0),Me.setPolygonOffset(!1)}function m8(L,K,le,de){if(null!==(!0===le.isScene?le.overrideMaterial:null))return;void 0===v.state.transmissionRenderTarget[de.id]&&(v.state.transmissionRenderTarget[de.id]=new Mu(1,1,{generateMipmaps:!0,type:Le.has("EXT_color_buffer_half_float")||Le.has("EXT_color_buffer_float")?Jm:Jc,minFilter:bl,samples:4,stencilBuffer:s,resolveDepthBuffer:!1,resolveStencilBuffer:!1,colorSpace:Jn.workingColorSpace}));const je=v.state.transmissionRenderTarget[de.id],st=de.viewport||A;je.setSize(st.z,st.w);const xt=x.getRenderTarget();x.setRenderTarget(je),x.getClearColor(ne),se=x.getClearAlpha(),se<1&&x.setClearColor(16777215,.5),x.clear(),Mt&&dt.render(le);const wt=x.toneMapping;x.toneMapping=bu;const qt=de.viewport;if(void 0!==de.viewport&&(de.viewport=void 0),v.setupLightsView(de),!0===ae&&bn.setGlobalState(x.clippingPlanes,de),bE(L,le,de),pt.updateMultisampleRenderTarget(je),pt.updateRenderTargetMipmap(je),!1===Le.has("WEBGL_multisampled_render_to_texture")){let on=!1;for(let Xt=0,ai=K.length;Xt0)for(let st=0,xt=je.length;st0&&m8(de,te,L,K),Mt&&dt.render(L),p8(b,L,K);null!==k&&(pt.updateMultisampleRenderTarget(k),pt.updateRenderTargetMipmap(k)),!0===L.isScene&&L.onAfterRender(x,L,K),Pn.resetDefaultState(),B=-1,T=null,M.pop(),M.length>0?(v=M[M.length-1],!0===ae&&bn.setGlobalState(x.clippingPlanes,v.state.camera)):v=null,y.pop(),b=y.length>0?y[y.length-1]:null},this.getActiveCubeFace=function(){return F},this.getActiveMipmapLevel=function(){return D},this.getRenderTarget=function(){return k},this.setRenderTargetTextures=function(L,K,le){it.get(L.texture).__webglTexture=K,it.get(L.depthTexture).__webglTexture=le;const de=it.get(L);de.__hasExternalTextures=!0,de.__autoAllocateDepthBuffer=void 0===le,de.__autoAllocateDepthBuffer||!0===Le.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(L,K){const le=it.get(L);le.__webglFramebuffer=K,le.__useDefaultFramebuffer=void 0===K},this.setRenderTarget=function(L,K=0,le=0){k=L,F=K,D=le;let de=!0,te=null,je=!1,st=!1;if(L){const wt=it.get(L);void 0!==wt.__useDefaultFramebuffer?(Me.bindFramebuffer(N.FRAMEBUFFER,null),de=!1):void 0===wt.__webglFramebuffer?pt.setupRenderTarget(L):wt.__hasExternalTextures&&pt.rebindTextures(L,it.get(L.texture).__webglTexture,it.get(L.depthTexture).__webglTexture);const qt=L.texture;(qt.isData3DTexture||qt.isDataArrayTexture||qt.isCompressedArrayTexture)&&(st=!0);const on=it.get(L).__webglFramebuffer;L.isWebGLCubeRenderTarget?(te=Array.isArray(on[K])?on[K][le]:on[K],je=!0):te=L.samples>0&&!1===pt.useMultisampledRTT(L)?it.get(L).__webglMultisampledFramebuffer:Array.isArray(on)?on[le]:on,A.copy(L.viewport),$.copy(L.scissor),ie=L.scissorTest}else A.copy(Ne).multiplyScalar(re).floor(),$.copy(Ye).multiplyScalar(re).floor(),ie=It;if(Me.bindFramebuffer(N.FRAMEBUFFER,te)&&de&&Me.drawBuffers(L,te),Me.viewport(A),Me.scissor($),Me.setScissorTest(ie),je){const wt=it.get(L.texture);N.framebufferTexture2D(N.FRAMEBUFFER,N.COLOR_ATTACHMENT0,N.TEXTURE_CUBE_MAP_POSITIVE_X+K,wt.__webglTexture,le)}else if(st){const wt=it.get(L.texture);N.framebufferTextureLayer(N.FRAMEBUFFER,N.COLOR_ATTACHMENT0,wt.__webglTexture,le||0,K||0)}B=-1},this.readRenderTargetPixels=function(L,K,le,de,te,je,st){if(!L||!L.isWebGLRenderTarget)return void console.error("THREE.WebGLRenderer.readRenderTargetPixels: renderTarget is not THREE.WebGLRenderTarget.");let xt=it.get(L).__webglFramebuffer;if(L.isWebGLCubeRenderTarget&&void 0!==st&&(xt=xt[st]),xt){Me.bindFramebuffer(N.FRAMEBUFFER,xt);try{const wt=L.texture,qt=wt.format,on=wt.type;if(!nt.textureFormatReadable(qt))return void console.error("THREE.WebGLRenderer.readRenderTargetPixels: renderTarget is not in RGBA or implementation defined format.");if(!nt.textureTypeReadable(on))return void console.error("THREE.WebGLRenderer.readRenderTargetPixels: renderTarget is not in UnsignedByteType or implementation defined type.");K>=0&&K<=L.width-de&&le>=0&&le<=L.height-te&&N.readPixels(K,le,de,te,vn.convert(qt),vn.convert(on),je)}finally{const wt=null!==k?it.get(k).__webglFramebuffer:null;Me.bindFramebuffer(N.FRAMEBUFFER,wt)}}},this.readRenderTargetPixelsAsync=function(){var L=tt(function*(K,le,de,te,je,st,xt){if(!K||!K.isWebGLRenderTarget)throw new Error("THREE.WebGLRenderer.readRenderTargetPixels: renderTarget is not THREE.WebGLRenderTarget.");let wt=it.get(K).__webglFramebuffer;if(K.isWebGLCubeRenderTarget&&void 0!==xt&&(wt=wt[xt]),wt){Me.bindFramebuffer(N.FRAMEBUFFER,wt);try{const qt=K.texture,on=qt.format,Xt=qt.type;if(!nt.textureFormatReadable(on))throw new Error("THREE.WebGLRenderer.readRenderTargetPixelsAsync: renderTarget is not in RGBA or implementation defined format.");if(!nt.textureTypeReadable(Xt))throw new Error("THREE.WebGLRenderer.readRenderTargetPixelsAsync: renderTarget is not in UnsignedByteType or implementation defined type.");if(le>=0&&le<=K.width-te&&de>=0&&de<=K.height-je){const ai=N.createBuffer();N.bindBuffer(N.PIXEL_PACK_BUFFER,ai),N.bufferData(N.PIXEL_PACK_BUFFER,st.byteLength,N.STREAM_READ),N.readPixels(le,de,te,je,vn.convert(on),vn.convert(Xt),0),N.flush();const Fi=N.fenceSync(N.SYNC_GPU_COMMANDS_COMPLETE,0);yield function eae(i,t,e){return new Promise(function(n,r){setTimeout(function s(){switch(i.clientWaitSync(t,i.SYNC_FLUSH_COMMANDS_BIT,0)){case i.WAIT_FAILED:r();break;case i.TIMEOUT_EXPIRED:setTimeout(s,e);break;default:n()}},e)})}(N,Fi,4);try{N.bindBuffer(N.PIXEL_PACK_BUFFER,ai),N.getBufferSubData(N.PIXEL_PACK_BUFFER,0,st)}finally{N.deleteBuffer(ai),N.deleteSync(Fi)}return st}}finally{const qt=null!==k?it.get(k).__webglFramebuffer:null;Me.bindFramebuffer(N.FRAMEBUFFER,qt)}}});return function(K,le,de,te,je,st,xt){return L.apply(this,arguments)}}(),this.copyFramebufferToTexture=function(L,K=null,le=0){!0!==L.isTexture&&(cg("WebGLRenderer: copyFramebufferToTexture function signature has changed."),K=arguments[0]||null,L=arguments[1]);const de=Math.pow(2,-le),te=Math.floor(L.image.width*de),je=Math.floor(L.image.height*de),st=null!==K?K.x:0,xt=null!==K?K.y:0;pt.setTexture2D(L,0),N.copyTexSubImage2D(N.TEXTURE_2D,le,0,0,st,xt,te,je),Me.unbindTexture()},this.copyTextureToTexture=function(L,K,le=null,de=null,te=0){let je,st,xt,wt,qt,on;!0!==L.isTexture&&(cg("WebGLRenderer: copyTextureToTexture function signature has changed."),de=arguments[0]||null,L=arguments[1],K=arguments[2],te=arguments[3]||0,le=null),null!==le?(je=le.max.x-le.min.x,st=le.max.y-le.min.y,xt=le.min.x,wt=le.min.y):(je=L.image.width,st=L.image.height,xt=0,wt=0),null!==de?(qt=de.x,on=de.y):(qt=0,on=0);const Xt=vn.convert(K.format),ai=vn.convert(K.type);pt.setTexture2D(K,0),N.pixelStorei(N.UNPACK_FLIP_Y_WEBGL,K.flipY),N.pixelStorei(N.UNPACK_PREMULTIPLY_ALPHA_WEBGL,K.premultiplyAlpha),N.pixelStorei(N.UNPACK_ALIGNMENT,K.unpackAlignment);const Fi=N.getParameter(N.UNPACK_ROW_LENGTH),nr=N.getParameter(N.UNPACK_IMAGE_HEIGHT),aa=N.getParameter(N.UNPACK_SKIP_PIXELS),hi=N.getParameter(N.UNPACK_SKIP_ROWS),Rt=N.getParameter(N.UNPACK_SKIP_IMAGES),fs=L.isCompressedTexture?L.mipmaps[te]:L.image;N.pixelStorei(N.UNPACK_ROW_LENGTH,fs.width),N.pixelStorei(N.UNPACK_IMAGE_HEIGHT,fs.height),N.pixelStorei(N.UNPACK_SKIP_PIXELS,xt),N.pixelStorei(N.UNPACK_SKIP_ROWS,wt),L.isDataTexture?N.texSubImage2D(N.TEXTURE_2D,te,qt,on,je,st,Xt,ai,fs.data):L.isCompressedTexture?N.compressedTexSubImage2D(N.TEXTURE_2D,te,qt,on,fs.width,fs.height,Xt,fs.data):N.texSubImage2D(N.TEXTURE_2D,te,qt,on,je,st,Xt,ai,fs),N.pixelStorei(N.UNPACK_ROW_LENGTH,Fi),N.pixelStorei(N.UNPACK_IMAGE_HEIGHT,nr),N.pixelStorei(N.UNPACK_SKIP_PIXELS,aa),N.pixelStorei(N.UNPACK_SKIP_ROWS,hi),N.pixelStorei(N.UNPACK_SKIP_IMAGES,Rt),0===te&&K.generateMipmaps&&N.generateMipmap(N.TEXTURE_2D),Me.unbindTexture()},this.copyTextureToTexture3D=function(L,K,le=null,de=null,te=0){let je,st,xt,wt,qt,on,Xt,ai,Fi;!0!==L.isTexture&&(cg("WebGLRenderer: copyTextureToTexture3D function signature has changed."),le=arguments[0]||null,de=arguments[1]||null,L=arguments[2],K=arguments[3],te=arguments[4]||0);const nr=L.isCompressedTexture?L.mipmaps[te]:L.image;null!==le?(je=le.max.x-le.min.x,st=le.max.y-le.min.y,xt=le.max.z-le.min.z,wt=le.min.x,qt=le.min.y,on=le.min.z):(je=nr.width,st=nr.height,xt=nr.depth,wt=0,qt=0,on=0),null!==de?(Xt=de.x,ai=de.y,Fi=de.z):(Xt=0,ai=0,Fi=0);const aa=vn.convert(K.format),hi=vn.convert(K.type);let Rt;if(K.isData3DTexture)pt.setTexture3D(K,0),Rt=N.TEXTURE_3D;else{if(!K.isDataArrayTexture&&!K.isCompressedArrayTexture)return void console.warn("THREE.WebGLRenderer.copyTextureToTexture3D: only supports THREE.DataTexture3D and THREE.DataTexture2DArray.");pt.setTexture2DArray(K,0),Rt=N.TEXTURE_2D_ARRAY}N.pixelStorei(N.UNPACK_FLIP_Y_WEBGL,K.flipY),N.pixelStorei(N.UNPACK_PREMULTIPLY_ALPHA_WEBGL,K.premultiplyAlpha),N.pixelStorei(N.UNPACK_ALIGNMENT,K.unpackAlignment);const fs=N.getParameter(N.UNPACK_ROW_LENGTH),fi=N.getParameter(N.UNPACK_IMAGE_HEIGHT),El=N.getParameter(N.UNPACK_SKIP_PIXELS),qg=N.getParameter(N.UNPACK_SKIP_ROWS),la=N.getParameter(N.UNPACK_SKIP_IMAGES);N.pixelStorei(N.UNPACK_ROW_LENGTH,nr.width),N.pixelStorei(N.UNPACK_IMAGE_HEIGHT,nr.height),N.pixelStorei(N.UNPACK_SKIP_PIXELS,wt),N.pixelStorei(N.UNPACK_SKIP_ROWS,qt),N.pixelStorei(N.UNPACK_SKIP_IMAGES,on),L.isDataTexture||L.isData3DTexture?N.texSubImage3D(Rt,te,Xt,ai,Fi,je,st,xt,aa,hi,nr.data):K.isCompressedArrayTexture?N.compressedTexSubImage3D(Rt,te,Xt,ai,Fi,je,st,xt,aa,nr.data):N.texSubImage3D(Rt,te,Xt,ai,Fi,je,st,xt,aa,hi,nr),N.pixelStorei(N.UNPACK_ROW_LENGTH,fs),N.pixelStorei(N.UNPACK_IMAGE_HEIGHT,fi),N.pixelStorei(N.UNPACK_SKIP_PIXELS,El),N.pixelStorei(N.UNPACK_SKIP_ROWS,qg),N.pixelStorei(N.UNPACK_SKIP_IMAGES,la),0===te&&K.generateMipmaps&&N.generateMipmap(Rt),Me.unbindTexture()},this.initRenderTarget=function(L){void 0===it.get(L).__webglFramebuffer&&pt.setupRenderTarget(L)},this.initTexture=function(L){L.isCubeTexture?pt.setTextureCube(L,0):L.isData3DTexture?pt.setTexture3D(L,0):L.isDataArrayTexture||L.isCompressedArrayTexture?pt.setTexture2DArray(L,0):pt.setTexture2D(L,0),Me.unbindTexture()},this.resetState=function(){F=0,D=0,k=null,Me.reset(),Pn.reset()},typeof __THREE_DEVTOOLS__<"u"&&__THREE_DEVTOOLS__.dispatchEvent(new CustomEvent("observe",{detail:this}))}get coordinateSystem(){return ed}get outputColorSpace(){return this._outputColorSpace}set outputColorSpace(t){this._outputColorSpace=t;const e=this.getContext();e.drawingBufferColorSpace=t===jk?"display-p3":"srgb",e.unpackColorSpace=Jn.workingColorSpace===LC?"display-p3":"srgb"}}class kb extends Or{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 id,this.environmentIntensity=1,this.environmentRotation=new id,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 AP{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=ea()}onUploadCallback(){}set needsUpdate(t){!0===t&&this.version++}get updateRange(){return cg("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;r0){const r=e[n[0]];if(void 0!==r){this.morphTargetInfluences=[],this.morphTargetDictionary={};for(let s=0,o=r.length;sn)return;FP.applyMatrix4(i.matrixWorld);const l=t.ray.origin.distanceTo(FP);return lt.far?void 0:{distance:l,point:Z5.clone().applyMatrix4(i.matrixWorld),index:r,face:null,faceIndex:null,object:i}}const Q5=new O,J5=new O;class Ng extends pf{constructor(t,e){super(t,e),this.isLineSegments=!0,this.type="LineSegments"}computeLineDistances(){const t=this.geometry;if(null===t.index){const e=t.attributes.position,n=[];for(let r=0,s=e.count;r0){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 dc{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 d=n[r];return(r+(o-d)/(n[r+1]-d))/(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 xe:new O);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 O,r=[],s=[],o=[],a=new O,l=new Nt;for(let m=0;m<=t;m++)r[m]=this.getTangentAt(m/t,new O);s[0]=new O,o[0]=new O;let c=Number.MAX_VALUE;const d=Math.abs(r[0].x),h=Math.abs(r[0].y),p=Math.abs(r[0].z);d<=c&&(c=d,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(er(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(er(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 NP extends dc{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 xe){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(iG(a,l.x,c.x,d.x,h.x),iG(a,l.y,c.y,d.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]:(DS.subVectors(r[0],r[1]).add(r[0]),c=DS);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 d=c.getPoint(1);return this.currentPoint.copy(d),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 RS extends hn{constructor(t=[new xe(0,-.5),new xe(.5,0),new xe(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=er(r,0,2*Math.PI);const s=[],o=[],a=[],l=[],c=[],d=1/e,h=new O,p=new xe,m=new O,g=new O,b=new O;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*d*r,C=Math.sin(x),F=Math.cos(x);for(let D=0;D<=t.length-1;D++)h.x=t[D].x*C,h.y=t[D].y,h.z=t[D].x*F,o.push(h.x,h.y,h.z),p.x=M/e,p.y=D/(t.length-1),a.push(p.x,p.y),c.push(l[3*D+0]*C,l[3*D+1],l[3*D+0]*F)}for(let M=0;M0&&x(!0),e>0&&x(!1)),this.setIndex(d),this.setAttribute("position",new ct(h,3)),this.setAttribute("normal",new ct(p,3)),this.setAttribute("uv",new ct(m,2))}copy(t){return super.copy(t),this.parameters=Object.assign({},t.parameters),this}static fromJSON(t){return new Bg(t.radiusTop,t.radiusBottom,t.height,t.radialSegments,t.heightSegments,t.openEnded,t.thetaStart,t.thetaLength)}}class PS extends Bg{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 PS(t.radius,t.height,t.radialSegments,t.heightSegments,t.openEnded,t.thetaStart,t.thetaLength)}}class jb 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 d=[],h=new O,p=new O,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 F=0;F<=e;F++){const D=F/e;h.x=-t*Math.cos(r+D*s)*Math.sin(o+x*a),h.y=t*Math.cos(o+x*a),h.z=t*Math.sin(r+D*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(D+C,1-x),M.push(c++)}d.push(M)}for(let y=0;y0)&&m.push(d[y][M+1],C,D),(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 dispersion(){return this._dispersion}set dispersion(t){this._dispersion>0!=t>0&&this.version++,this._dispersion=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.dispersion=t.dispersion,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 zS extends Oo{constructor(t){super(),this.isMeshPhongMaterial=!0,this.type="MeshPhongMaterial",this.color=new qe(16777215),this.specular=new qe(1118481),this.shininess=30,this.map=null,this.lightMap=null,this.lightMapIntensity=1,this.aoMap=null,this.aoMapIntensity=1,this.emissive=new qe(0),this.emissiveIntensity=1,this.emissiveMap=null,this.bumpMap=null,this.bumpScale=1,this.normalMap=null,this.normalMapType=Qh,this.normalScale=new xe(1,1),this.displacementMap=null,this.displacementScale=1,this.displacementBias=0,this.specularMap=null,this.alphaMap=null,this.envMap=null,this.envMapRotation=new id,this.combine=EC,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 vf(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 vG(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 tO(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 nO(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 qb{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 _G(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}}uc.prototype.TimeBufferType=Float32Array,uc.prototype.ValueBufferType=Float32Array,uc.prototype.DefaultInterpolation=bb;class zg extends uc{constructor(t,e,n){super(t,e,n)}}zg.prototype.ValueTypeName="bool",zg.prototype.ValueBufferType=Array,zg.prototype.DefaultInterpolation=yb,zg.prototype.InterpolantFactoryMethodLinear=void 0,zg.prototype.InterpolantFactoryMethodSmooth=void 0;class bG extends uc{}bG.prototype.ValueTypeName="color";class Hg extends uc{}Hg.prototype.ValueTypeName="number";class Fhe extends qb{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 d=c+a;c!==d;c+=4)uo.slerpFlat(s,0,o,c-a,o,c,l);return s}}class Gg extends uc{InterpolantFactoryMethodLinear(t){return new Fhe(this.times,this.values,this.getValueSize(),t)}}Gg.prototype.ValueTypeName="quaternion",Gg.prototype.InterpolantFactoryMethodSmooth=void 0;class $g extends uc{constructor(t,e,n){super(t,e,n)}}$g.prototype.ValueTypeName="string",$g.prototype.ValueBufferType=Array,$g.prototype.DefaultInterpolation=yb,$g.prototype.InterpolantFactoryMethodLinear=void 0,$g.prototype.InterpolantFactoryMethodSmooth=void 0;class Wg extends uc{}Wg.prototype.ValueTypeName="vector";class Xb{constructor(t="",e=-1,n=[],r=2500){this.name=t,this.tracks=n,this.duration=e,this.blendMode=r,this.uuid=ea(),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(Nhe(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(uc.toJSON(n[s]));return r}static CreateFromMorphTargetSequence(t,e,n,r){const s=e.length,o=[];for(let a=0;a1){const h=d[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=[];nO(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:wG,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 dd={};class Bhe extends Error{constructor(t,e){super(t),this.response=e}}class La extends yf{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=ku.get(t);if(void 0!==s)return this.manager.itemStart(t),setTimeout(()=>{e&&e(s),this.manager.itemEnd(t)},0),s;if(void 0!==dd[t])return void dd[t].push({onLoad:e,onProgress:n,onError:r});dd[t]=[],dd[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 d=dd[t],h=c.body.getReader(),p=c.headers.get("X-File-Size")||c.headers.get("Content-Length"),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 F=new ProgressEvent("progress",{lengthComputable:g,loaded:b,total:m});for(let D=0,k=d.length;D{y.error(x)})}()}});return new Response(v)}throw new Bhe(`fetch for "${c.url}" responded with ${c.status}: ${c.statusText}`,c)}).then(c=>{switch(l){case"arraybuffer":return c.arrayBuffer();case"blob":return c.blob();case"document":return c.text().then(d=>(new DOMParser).parseFromString(d,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=>{ku.add(t,c);const d=dd[t];delete dd[t];for(let h=0,p=d.length;h{const d=dd[t];if(void 0===d)throw this.manager.itemError(t),c;delete dd[t];for(let h=0,p=d.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 HS extends yf{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=ku.get(t);if(void 0!==o)return s.manager.itemStart(t),setTimeout(function(){e&&e(o),s.manager.itemEnd(t)},0),o;const a=wb("img");function l(){d(),ku.add(t,this),e&&e(this),s.manager.itemEnd(t)}function c(h){d(),r&&r(h),s.manager.itemError(t),s.manager.itemEnd(t)}function d(){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 Pu extends yf{constructor(t){super(t)}load(t,e,n,r){const s=new Po,o=new HS(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 GS extends Or{constructor(t,e=1){super(),this.isLight=!0,this.type="Light",this.color=new qe(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()),void 0!==this.target&&(e.object.target=this.target.uuid),e}}const iO=new Nt,MG=new O,CG=new O;class rO{constructor(t){this.camera=t,this.intensity=1,this.bias=0,this.normalBias=0,this.radius=1,this.blurSamples=8,this.mapSize=new xe(512,512),this.map=null,this.mapPass=null,this.matrix=new Nt,this.autoUpdate=!0,this.needsUpdate=!1,this._frustum=new aS,this._frameExtents=new xe(1,1),this._viewportCount=1,this._viewports=[new gi(0,0,1,1)]}getViewportCount(){return this._viewportCount}getFrustum(){return this._frustum}updateMatrices(t){const e=this.camera,n=this.matrix;MG.setFromMatrixPosition(t.matrixWorld),e.position.copy(MG),CG.setFromMatrixPosition(t.target.matrixWorld),e.lookAt(CG),e.updateMatrixWorld(),iO.multiplyMatrices(e.projectionMatrix,e.matrixWorldInverse),this._frustum.setFromProjectionMatrix(iO),n.set(.5,0,0,.5,0,.5,0,.5,0,0,.5,.5,0,0,0,1),n.multiply(iO)}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.intensity=t.intensity,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 1!==this.intensity&&(t.intensity=this.intensity),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 Vhe extends rO{constructor(){super(new yr(50,1,.5,500)),this.isSpotLightShadow=!0,this.focus=1}updateMatrices(t){const e=this.camera,n=2*ag*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 SG extends GS{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(Or.DEFAULT_UP),this.updateMatrix(),this.target=new Or,this.distance=n,this.angle=r,this.penumbra=s,this.decay=o,this.map=null,this.shadow=new Vhe}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 EG=new Nt,Kb=new O,sO=new O;class zhe extends rO{constructor(){super(new yr(90,1,.5,500)),this.isPointLightShadow=!0,this._frameExtents=new xe(4,2),this._viewportCount=6,this._viewports=[new gi(2,1,1,1),new gi(0,1,1,1),new gi(3,1,1,1),new gi(1,1,1,1),new gi(3,0,1,1),new gi(1,0,1,1)],this._cubeDirections=[new O(1,0,0),new O(-1,0,0),new O(0,0,1),new O(0,0,-1),new O(0,1,0),new O(0,-1,0)],this._cubeUps=[new O(0,1,0),new O(0,1,0),new O(0,1,0),new O(0,1,0),new O(0,0,1),new O(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()),Kb.setFromMatrixPosition(t.matrixWorld),n.position.copy(Kb),sO.copy(n.position),sO.add(this._cubeDirections[e]),n.up.copy(this._cubeUps[e]),n.lookAt(sO),n.updateMatrixWorld(),r.makeTranslation(-Kb.x,-Kb.y,-Kb.z),EG.multiplyMatrices(n.projectionMatrix,n.matrixWorldInverse),this._frustum.setFromProjectionMatrix(EG)}}class AG extends GS{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 zhe}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 Hhe extends rO{constructor(){super(new Ib(-5,5,5,-5,.5,500)),this.isDirectionalLightShadow=!0}}class DG extends GS{constructor(t,e){super(t,e),this.isDirectionalLight=!0,this.type="DirectionalLight",this.position.copy(Or.DEFAULT_UP),this.updateMatrix(),this.target=new Or,this.shadow=new Hhe}dispose(){this.shadow.dispose()}copy(t){return super.copy(t),this.target=t.target.clone(),this.shadow=t.shadow.clone(),this}}class $S extends GS{constructor(t,e){super(t,e),this.isAmbientLight=!0,this.type="AmbientLight"}}class Ou{static decodeText(t){if(console.warn("THREE.LoaderUtils: decodeText() has been deprecated with r165 and will be removed with r175. Use TextDecoder instead."),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=ku.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 ku.add(t,c),e&&e(c),s.manager.itemEnd(t),c}).catch(function(c){r&&r(c),ku.remove(t),s.manager.itemError(t),s.manager.itemEnd(t)});ku.add(t,l),s.manager.itemStart(t)}}class OG{constructor(t=!0){this.autoStart=t,this.startTime=0,this.oldTime=0,this.elapsedTime=0,this.running=!1}start(){this.startTime=FG(),this.oldTime=this.startTime,this.elapsedTime=0,this.running=!0}stop(){this.getElapsedTime(),this.running=!1,this.autoStart=!1}getElapsedTime(){return this.getDelta(),this.elapsedTime}getDelta(){let t=0;if(this.autoStart&&!this.running)return this.start(),0;if(this.running){const e=FG();t=(e-this.oldTime)/1e3,this.oldTime=e,this.elapsedTime+=t}return t}}function FG(){return(typeof performance>"u"?Date:performance).now()}const aO="\\[\\]\\.:\\/",Jhe=new RegExp("["+aO+"]","g"),lO="[^"+aO+"]",efe="[^"+aO.replace("\\.","")+"]",sfe=new RegExp("^"+/((?:WC+[\/:])*)/.source.replace("WC",lO)+/(WCOD+)?/.source.replace("WCOD",efe)+/(?:\.(WC+)(?:\[(.+)\])?)?/.source.replace("WC",lO)+/\.(WC+)(?:\[(.+)\])?/.source.replace("WC",lO)+"$"),ofe=["material","materials","bones","map"];class afe{constructor(t,e,n){const r=n||Ii.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 Ii=(()=>{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(Jhe,"")}static parseTrackName(e){const n=sfe.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!==ofe.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;an.name===t||n.userData.name===t);return e?(e.removeFromParent(),new ia(e)):null}getBoundings(){return(new Us).setFromObject(this.nativeMesh)}clone(){return new ia(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 Mn&&this.disposeMesh(t)}),this.nativeMesh instanceof Mn&&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 hfe extends ia{get supportsFov(){return this.nativeCamera instanceof yr||"PerspectiveCamera"==this.nativeCamera.type}get fov(){return this.nativeCamera.fov||NaN}set fov(t){this.supportsFov&&(this.nativeCamera.fov=t,this.nativeCamera.updateProjectionMatrix())}constructor(t){super(t),this.nativeCamera=t}}class ffe extends Ose{createMaterial(t){let e={};t.color?e={color:t.color}:t.diffuse||(e={color:super.randomColor()});let n=t.shading||"unlit";switch(n){case"unlit":return new Yi(Object.assign(Object.assign({},e),{map:t.diffuse||null}));case"standart":return new Yb(Object.assign(Object.assign({},e),{map:t.diffuse||null}));case"phong":return new zS(Object.assign(Object.assign({},e),{map:t.diffuse||null}));case"wireframe":return new Yi(Object.assign(Object.assign({},e),{wireframe:!0}));default:throw new Error(`"${n}" shading not implemented for three.js`)}}transformPrimitiveZUp(t){t.geometry.rotateX(Math.PI/2)}createPrimitive(t,e={}){var n,r,s,o;let a=null,l=this.createMaterial(e);switch(t.shape){case"PLANE":a=new Mn(new Iu((null===(n=t.dimensions)||void 0===n?void 0:n.x)||1e4,(null===(r=t.dimensions)||void 0===r?void 0:r.y)||1e4,null===(s=t.segments)||void 0===s?void 0:s.x,null===(o=t.segments)||void 0===o?void 0:o.y),l);break;case"BOX":a=new Mn(new rf(...Pe.spr(t.dimensions),...t.segments?Pe.spr(t.segments):[]),l);break;case"CAPSULE":a=new Mn(new kS(t.radius,t.centersDistance,t.capSegments,t.radialSegments),l),this.transformPrimitiveZUp(a);break;case"CYLINDER":a=new Mn(new Bg(t.radius,t.radius,t.height,t.radialSegments,t.heightSegments),l),this.transformPrimitiveZUp(a);break;case"CONE":a=new Mn(new PS(t.radius,t.height,t.radialSegments,t.heightSegments),l),this.transformPrimitiveZUp(a);break;case"SPHERE":a=new Mn(new jb(t.radius,t.widthSegments,t.heightSegments),l),this.transformPrimitiveZUp(a);break;case"COMPOUND":a=new Lo;for(const{position:d,rotation:h,shape:p}of t.children){const m=this.createPrimitive(p,e).nativeMesh;d&&m.position.set(...Pe.spr(d)),h&&m.quaternion.set(...ji.spr(h)),a.add(m)}break;case"MESH":const c=new hn;c.setFromPoints(t.vertices.map(d=>new O(...Pe.spr(d)))),c.setIndex(t.faces.reduce((d,h)=>(d.push(...h),d),[])),a=new Mn(c,l)}if(!a)throw new Error(`Primitive with shape "${t.shape}" not implemented`);return void 0!==e.castShadow&&(a.castShadow=e.castShadow),void 0!==e.receiveShadow&&(a.receiveShadow=e.receiveShadow),new ia(a)}createPerspectiveCamera(t={}){return new hfe(new yr(t.fov||75,t.aspectRatio||1,t.frustrum?t.frustrum.near:1,t.frustrum?t.frustrum.far:1e4))}}function QG(i,t){if(t===Coe)return console.warn("THREE.BufferGeometryUtils.toTrianglesDrawMode(): Geometry already defined as triangles."),i;if(t===Wk||t===C4){let e=i.getIndex();if(null===e){const o=[],a=i.getAttribute("position");if(void 0===a)return console.error("THREE.BufferGeometryUtils.toTrianglesDrawMode(): Undefined position attribute. Processing not possible."),i;for(let l=0;l=2.0 are supported.")));const c=new Yfe(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 d=0;d=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 mfe(){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 Bn={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_DISPERSION:"KHR_materials_dispersion",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 gfe{constructor(t){this.parser=t,this.name=Bn.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 Ife{constructor(t){this.parser=t,this.name=Bn.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 Rfe{constructor(t){this.parser=t,this.name=Bn.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 kfe{constructor(t){this.name=Bn.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 d=r.count,h=r.byteStride,p=new Uint8Array(a,r.byteOffset||0,r.byteLength||0);return o.decodeGltfBufferAsync?o.decodeGltfBufferAsync(d,h,p,r.mode,r.filter).then(function(m){return m.buffer}):o.ready.then(function(){const m=new ArrayBuffer(d*h);return o.decodeGltfBuffer(new Uint8Array(m),d,h,p,r.mode,r.filter),m})})}return null}}class Pfe{constructor(t){this.name=Bn.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!==Na.TRIANGLES&&c.mode!==Na.TRIANGLE_STRIP&&c.mode!==Na.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(d=>(l[c]=d,l[c])));return a.length<1?null:(a.push(this.parser.createNodeMesh(t)),Promise.all(a).then(c=>{const d=c.pop(),h=d.isGroup?d.children:[d],p=c[0].count,m=[];for(const g of h){const b=new Nt,v=new O,y=new uo,M=new O(1,1,1),x=new Y5(g.geometry,g.material,p);for(let C=0;C-1,o=s?a.match(/Firefox\/([0-9]+)\./)[1]:-1}this.textureLoader=typeof createImageBitmap>"u"||n&&r<17||s&&o<98?new Pu(this.options.manager):new Xhe(this.options.manager),this.textureLoader.setCrossOrigin(this.options.crossOrigin),this.textureLoader.setRequestHeader(this.options.requestHeader),this.fileLoader=new La(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 Sf(s,a,r),ud(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,d]of o.children.entries())s(d,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(T,D[k*l+1]),l>=3&&v.setZ(T,D[k*l+2]),l>=4&&v.setW(T,D[k*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(d){d.flipY=!1,d.name=o.name||a.name||"",""===d.name&&"string"==typeof a.uri&&!1===a.uri.startsWith("data:image/")&&(d.name=a.uri);const p=(s.samplers||{})[o.sampler]||{};return d.magFilter=n$[p.magFilter]||lr,d.minFilter=n$[p.minFilter]||bl,d.wrapS=i$[p.wrapS]||Ns,d.wrapT=i$[p.wrapT]||Ns,r.associations.set(d,{textures:t}),d}).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 d=Promise.resolve(l).then(function(h){return new Promise(function(p,m){let g=p;!0===e.isImageBitmapLoader&&(g=function(b){const v=new Po(b);v.needsUpdate=!0,p(v)}),e.load(Ou.resolveURL(h,s.path),g,void 0,m)})}).then(function(h){return!0===c&&a.revokeObjectURL(l),ud(h,o),h.userData.mimeType=o.mimeType||function Wfe(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]=d,d}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[Bn.KHR_TEXTURE_TRANSFORM]){const a=void 0!==n.extensions?n.extensions[Bn.KHR_TEXTURE_TRANSFORM]:void 0;if(a){const l=s.associations.get(o);o=s.extensions[Bn.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 mf,Oo.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 us,Oo.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 Yb}loadMaterial(t){const e=this,r=this.extensions,s=this.json.materials[t];let o;const a={},c=[];if((s.extensions||{})[Bn.KHR_MATERIALS_UNLIT]){const h=r[Bn.KHR_MATERIALS_UNLIT];o=h.getMaterialType(),c.push(h.extendParams(a,s,e))}else{const h=s.pbrMetallicRoughness||{};if(a.color=new qe(1,1,1),a.opacity=1,Array.isArray(h.baseColorFactor)){const p=h.baseColorFactor;a.color.setRGB(p[0],p[1],p[2],ds),a.opacity=p[3]}void 0!==h.baseColorTexture&&c.push(e.assignTexture(a,"map",h.baseColorTexture,cs)),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=Ls);const d=s.alphaMode||"OPAQUE";if("BLEND"===d?(a.transparent=!0,a.depthWrite=!1):(a.transparent=!1,"MASK"===d&&(a.alphaTest=void 0!==s.alphaCutoff?s.alphaCutoff:.5)),void 0!==s.normalTexture&&o!==Yi&&(c.push(e.assignTexture(a,"normalMap",s.normalTexture)),a.normalScale=new xe(1,1),void 0!==s.normalTexture.scale)){const h=s.normalTexture.scale;a.normalScale.set(h,h)}if(void 0!==s.occlusionTexture&&o!==Yi&&(c.push(e.assignTexture(a,"aoMap",s.occlusionTexture)),void 0!==s.occlusionTexture.strength&&(a.aoMapIntensity=s.occlusionTexture.strength)),void 0!==s.emissiveFactor&&o!==Yi){const h=s.emissiveFactor;a.emissive=(new qe).setRGB(h[0],h[1],h[2],ds)}return void 0!==s.emissiveTexture&&o!==Yi&&c.push(e.assignTexture(a,"emissiveMap",s.emissiveTexture,cs)),Promise.all(c).then(function(){const h=new o(a);return s.name&&(h.name=s.name),ud(h,s),e.associations.set(h,{materials:t}),s.extensions&&Sf(r,h,s),h})}createUniqueName(t){const e=Ii.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[Bn.KHR_DRACO_MESH_COMPRESSION].decodePrimitive(a,e).then(function(l){return r$(l,a,e)})}const o=[];for(let a=0,l=t.length;a0&&Gfe(y,s),y.name=e.createUniqueName(s.name||"mesh_"+t),ud(y,s),v.extensions&&Sf(r,y,v),e.assignFinalMaterial(y),h.push(y)}for(let m=0,g=h.length;m1?new Lo:1===c.length?c[0]:new Or,d!==c[0])for(let h=0,p=c.length;h{const h=new Map;for(const[p,m]of r.associations)(p instanceof Oo||p instanceof Po)&&h.set(p,m);return d.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(Lu[s.path]===Lu.weights?t.traverse(function(p){p.morphTargetInfluences&&l.push(p.name?p.name:p.uuid)}):l.push(a),Lu[s.path]){case Lu.weights:c=Hg;break;case Lu.rotation:c=Gg;break;case Lu.position:case Lu.scale:c=Wg;break;default:c=1===n.itemSize?Hg:Wg}const d=void 0!==r.interpolation?Vfe[r.interpolation]:bb,h=this._getArrayFromAccessor(n);for(let p=0,m=l.length;p{r.type.endsWith("Light")&&(console.warn("WORKAROUND: light intensity from GLB divided by 200."),r.intensity*=.005)}),new ia(n.scene)})}}const po=(i,t)=>Array(i).fill(null).map((e,n)=>t(n));class Ef{static startDebugView(t,e){let n=this.activeDebugViews.get(t);return n?n.renderers.includes(e)||n.renderers.push(e):(n={view:new Ef(t),renderers:[e]},this.activeDebugViews.set(t,n)),n.view}static stopDebugView(t,e){const n=t.world,r=this.activeDebugViews.get(n);r&&(r.renderers=r.renderers.filter(s=>s!==e),0===r.renderers.length&&(r.view.dispose(),this.activeDebugViews.delete(n)))}constructor(t){this.world=t,this.debugScene=null,this.aSub=null,this.rSub=null,this.syncMap=new Map,this.debugScene=new kb;const e=n=>{var r,s;const o=n.debugBodySettings;let c,l=this.lineSegmentPointsForShape(o.shape);c=l?new Ng((new hn).setFromPoints(l)):null===(r=this.world)||void 0===r?void 0:r.visualScene.factory.createPrimitive(o.shape,{shading:"wireframe",color:0}).nativeMesh,this.syncMap.set(n,c),null===(s=this.debugScene)||void 0===s||s.add(c)};for(const n of this.world.physicsWorld.children)e(n);this.aSub=this.world.physicsWorld.added$.subscribe(n=>e(n)),this.rSub=this.world.physicsWorld.removed$.subscribe(n=>{var r;const s=this.syncMap.get(n);s&&(this.syncMap.delete(n),null===(r=this.debugScene)||void 0===r||r.remove(s))})}get scene(){return this.debugScene}render(t,e){for(const[r,s]of this.syncMap.entries()){const o=r.debugBodySettings;if(o.ignoreTransform||(s.position.set(...Pe.spr(r.position)),s.quaternion.set(...ji.spr(r.rotation))),s.material){let a=16777215;switch(o.type){case"RIGID_DYNAMIC":a=o.sleeping?255:16711680;break;case"RIGID_STATIC":a=65280;break;case"TRIGGER":a=16776960}s.material.color.set(a),s.material.needsUpdate=!0}}const n=t.autoClearColor;n&&(t.autoClearColor=!1),t.render(this.debugScene,e),n&&(t.autoClearColor=!0)}lineSegmentPointsForShape(t){if("BOX"===t.shape){const e=Pe.scalarMult(t.dimensions,.5);return[...po(8,n=>new O(n<4?e.x:-e.x,n%4<2?e.y:-e.y,n%2?e.z:-e.z)),...po(8,n=>new O(n%2?e.x:-e.x,n<4?e.y:-e.y,n%4<2?e.z:-e.z)),...po(8,n=>new O(n%4<2?e.x:-e.x,n%2?e.y:-e.y,n<4?e.z:-e.z))]}if("CYLINDER"===t.shape)return[...po(32,e=>new O(t.radius*Math.sin(Math.floor((e+1)/2)*Math.PI/8),t.radius*Math.cos(Math.floor((e+1)/2)*Math.PI/8),-t.height/2)),...po(32,e=>new O(t.radius*Math.sin(Math.floor((e+1)/2)*Math.PI/8),t.radius*Math.cos(Math.floor((e+1)/2)*Math.PI/8),t.height/2)),...po(8,e=>new O(Math.floor(e/2)%2?0:e<4?t.radius:-t.radius,Math.floor(e/2)%2?e<4?t.radius:-t.radius:0,e%2?t.height/2:-t.height/2)),new O(0,0,-t.height/2),new O(0,0,t.height/2)];if("CONE"===t.shape)return[...po(32,e=>new O(t.radius*Math.sin(Math.floor((e+1)/2)*Math.PI/8),t.radius*Math.cos(Math.floor((e+1)/2)*Math.PI/8),-t.height/2)),...po(8,e=>new O(e%2||Math.floor(e/2)%2?0:e<4?t.radius:-t.radius,e%2?0:Math.floor(e/2)%2?e<4?t.radius:-t.radius:0,e%2?t.height/2:-t.height/2)),new O(0,0,-t.height/2),new O(0,0,t.height/2)];if("SPHERE"===t.shape)return[...po(32,e=>new O(t.radius*Math.sin(Math.floor((e+1)/2)*Math.PI/8),t.radius*Math.cos(Math.floor((e+1)/2)*Math.PI/8),0)),...po(32,e=>new O(t.radius*Math.sin(Math.floor((e+1)/2)*Math.PI/8),0,t.radius*Math.cos(Math.floor((e+1)/2)*Math.PI/8))),...po(32,e=>new O(0,t.radius*Math.sin(Math.floor((e+1)/2)*Math.PI/8),t.radius*Math.cos(Math.floor((e+1)/2)*Math.PI/8)))];if("CAPSULE"===t.shape)return[...this.lineSegmentPointsForShape({shape:"CYLINDER",radius:t.radius,height:t.centersDistance}),...po(16,e=>new O(t.radius*Math.cos(Math.floor((e+1)/2)*Math.PI/8),0,t.radius*Math.sin(Math.floor((e+1)/2)*Math.PI/8)+t.centersDistance/2)),...po(16,e=>new O(t.radius*Math.cos(Math.floor((e+1)/2)*Math.PI/8),0,-t.radius*Math.sin(Math.floor((e+1)/2)*Math.PI/8)-t.centersDistance/2)),...po(16,e=>new O(0,t.radius*Math.cos(Math.floor((e+1)/2)*Math.PI/8),t.radius*Math.sin(Math.floor((e+1)/2)*Math.PI/8)+t.centersDistance/2)),...po(16,e=>new O(0,t.radius*Math.cos(Math.floor((e+1)/2)*Math.PI/8),-t.radius*Math.sin(Math.floor((e+1)/2)*Math.PI/8)-t.centersDistance/2))];if("CONVEX_HULL"===t.shape)return[...t.vertices.map(n=>[new O(n.x-.05,n.y,n.z),new O(n.x+.05,n.y,n.z),new O(n.x,n.y-.05,n.z),new O(n.x,n.y+.05,n.z),new O(n.x,n.y,n.z-.05),new O(n.x,n.y,n.z+.05)]).reduce((n,r)=>(n.push(...r),n),[])];if("COMPOUND"===t.shape){const e=[];for(const{position:n,shape:r,rotation:s}of t.children){let o=this.lineSegmentPointsForShape(r);if(!o)return null;e.push(...o.map(a=>new O(...Pe.spr(Pe.add(n||Pe.O,Pe.rot(a,s||ji.O))))))}return e}return null}dispose(){var t,e;this.debugScene=null,null===(t=this.aSub)||void 0===t||t.unsubscribe(),null===(e=this.rSub)||void 0===e||e.unsubscribe(),this.syncMap=new Map}}Ef.activeDebugViews=new Map;class s$ extends Ese{get physicsDebugViewActive(){return this._physicsDebugViewActive}set physicsDebugViewActive(t){this._physicsDebugViewActive!=t&&(this._physicsDebugViewActive=t,this.world&&(t?this.debugView=Ef.startDebugView(this.world,this):(Ef.stopDebugView(this.debugView,this),this.debugView=null)))}constructor(t,e,n,r={}){super(t,n,r),this.scene=t,this.camera=e,this.canvas=n,this.world=null,this.debugView=null,this._physicsDebugViewActive=!1,this.nativeRenderer=new Tue(Object.assign({canvas:n,alpha:this.rendererOptions.transparent},this.rendererOptions)),this.nativeRenderer.shadowMap.enabled=!0,this.nativeRenderer.setClearColor(this.rendererOptions.background),this.nativeRenderer.shadowMap.type=c4,this.nativeRenderer.setPixelRatio(this.rendererOptions.forceResolution||devicePixelRatio)}addToWorld(t){this.world=t,this.physicsDebugViewActive&&(this.debugView=Ef.startDebugView(this.world,this))}removeFromWorld(t){this.physicsDebugViewActive&&(Ef.stopDebugView(this.debugView,this),this.debugView=null),this.world=null}resizeRenderer(t){this.nativeRenderer.setSize(t.x,t.y),(this.camera.nativeCamera instanceof yr||"PerspectiveCamera"==this.camera.nativeCamera.type)&&Math.abs(this.camera.nativeCamera.aspect-t.x/t.y)>.01&&(this.camera.nativeCamera.aspect=t.x/t.y,this.camera.nativeCamera.updateProjectionMatrix())}render(){this.nativeRenderer.render(this.scene.nativeScene,this.camera.nativeCamera),this.physicsDebugViewActive&&this.debugView.render(this.nativeRenderer,this.camera.nativeCamera)}dispose(){this.camera.dispose(),this.nativeRenderer.clear(),this.nativeRenderer.dispose(),this.nativeRenderer.domElement=null}}const Zfe={name:"CopyShader",uniforms:{tDiffuse:{value:null},opacity:{value:1}},vertexShader:"\n\n\t\tvarying vec2 vUv;\n\n\t\tvoid main() {\n\n\t\t\tvUv = uv;\n\t\t\tgl_Position = projectionMatrix * modelViewMatrix * vec4( position, 1.0 );\n\n\t\t}",fragmentShader:"\n\n\t\tuniform float opacity;\n\n\t\tuniform sampler2D tDiffuse;\n\n\t\tvarying vec2 vUv;\n\n\t\tvoid main() {\n\n\t\t\tvec4 texel = texture2D( tDiffuse, vUv );\n\t\t\tgl_FragColor = opacity * texel;\n\n\n\t\t}"};class QS{constructor(){this.isPass=!0,this.enabled=!0,this.needsSwap=!0,this.clear=!1,this.renderToScreen=!1}setSize(){}render(){console.error("THREE.Pass: .render() must be implemented in derived pass.")}dispose(){}}const Qfe=new Ib(-1,1,1,-1,0,1),epe=new class Jfe extends hn{constructor(){super(),this.setAttribute("position",new ct([-1,3,0,-1,-1,0,3,-1,0],3)),this.setAttribute("uv",new ct([0,2,0,0,2,0],2))}};class tpe{constructor(t){this._mesh=new Mn(epe,t)}dispose(){this._mesh.geometry.dispose()}render(t){t.render(this._mesh,Qfe)}get material(){return this._mesh.material}set material(t){this._mesh.material=t}}class npe extends QS{constructor(t,e){super(),this.textureID=void 0!==e?e:"tDiffuse",t instanceof Cl?(this.uniforms=t.uniforms,this.material=t):t&&(this.uniforms=Q4.clone(t.uniforms),this.material=new Cl({name:void 0!==t.name?t.name:"unspecified",defines:Object.assign({},t.defines),uniforms:this.uniforms,vertexShader:t.vertexShader,fragmentShader:t.fragmentShader})),this.fsQuad=new tpe(this.material)}render(t,e,n){this.uniforms[this.textureID]&&(this.uniforms[this.textureID].value=n.texture),this.fsQuad.material=this.material,this.renderToScreen?(t.setRenderTarget(null),this.fsQuad.render(t)):(t.setRenderTarget(e),this.clear&&t.clear(t.autoClearColor,t.autoClearDepth,t.autoClearStencil),this.fsQuad.render(t))}dispose(){this.material.dispose(),this.fsQuad.dispose()}}class o$ extends QS{constructor(t,e){super(),this.scene=t,this.camera=e,this.clear=!0,this.needsSwap=!1,this.inverse=!1}render(t,e,n){const r=t.getContext(),s=t.state;let o,a;s.buffers.color.setMask(!1),s.buffers.depth.setMask(!1),s.buffers.color.setLocked(!0),s.buffers.depth.setLocked(!0),this.inverse?(o=0,a=1):(o=1,a=0),s.buffers.stencil.setTest(!0),s.buffers.stencil.setOp(r.REPLACE,r.REPLACE,r.REPLACE),s.buffers.stencil.setFunc(r.ALWAYS,o,4294967295),s.buffers.stencil.setClear(a),s.buffers.stencil.setLocked(!0),t.setRenderTarget(n),this.clear&&t.clear(),t.render(this.scene,this.camera),t.setRenderTarget(e),this.clear&&t.clear(),t.render(this.scene,this.camera),s.buffers.color.setLocked(!1),s.buffers.depth.setLocked(!1),s.buffers.color.setMask(!0),s.buffers.depth.setMask(!0),s.buffers.stencil.setLocked(!1),s.buffers.stencil.setFunc(r.EQUAL,1,4294967295),s.buffers.stencil.setOp(r.KEEP,r.KEEP,r.KEEP),s.buffers.stencil.setLocked(!0)}}class ipe extends QS{constructor(){super(),this.needsSwap=!1}render(t){t.state.buffers.stencil.setLocked(!1),t.state.buffers.stencil.setTest(!1)}}class rpe{constructor(t,e){if(this.renderer=t,this._pixelRatio=t.getPixelRatio(),void 0===e){const n=t.getSize(new xe);this._width=n.width,this._height=n.height,(e=new Mu(this._width*this._pixelRatio,this._height*this._pixelRatio,{type:Jm})).texture.name="EffectComposer.rt1"}else this._width=e.width,this._height=e.height;this.renderTarget1=e,this.renderTarget2=e.clone(),this.renderTarget2.texture.name="EffectComposer.rt2",this.writeBuffer=this.renderTarget1,this.readBuffer=this.renderTarget2,this.renderToScreen=!0,this.passes=[],this.copyPass=new npe(Zfe),this.copyPass.material.blending=Qc,this.clock=new OG}swapBuffers(){const t=this.readBuffer;this.readBuffer=this.writeBuffer,this.writeBuffer=t}addPass(t){this.passes.push(t),t.setSize(this._width*this._pixelRatio,this._height*this._pixelRatio)}insertPass(t,e){this.passes.splice(e,0,t),t.setSize(this._width*this._pixelRatio,this._height*this._pixelRatio)}removePass(t){const e=this.passes.indexOf(t);-1!==e&&this.passes.splice(e,1)}isLastEnabledPass(t){for(let e=t+1;e0?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;l$.fromArray(r,t),yO.fromArray(r,e),c$.fromArray(r,n),Ba.subVectors(c$,yO),d$.subVectors(l$,yO),Ba.cross(d$),Ba.normalize(),s.push(Ba.x,Ba.y,Ba.z),s.push(Ba.x,Ba.y,Ba.z),s.push(Ba.x,Ba.y,Ba.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 d=this.vertices.length;let h=this.parseVertexIndex(t,d),p=this.parseVertexIndex(e,d),m=this.parseVertexIndex(n,d);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?(JS.setRGB(parseFloat(h[4]),parseFloat(h[5]),parseFloat(h[6])).convertSRGBToLinear(),e.colors.push(JS.r,JS.g,JS.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"===d){const p=c.slice(1).trim().split(a$),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 Lo;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 ct(d.normals,3)),d.colors.length>0&&(g=!0,b.setAttribute("color",new ct(d.colors,3))),!0===d.hasUVIndices&&b.setAttribute("uv",new ct(d.uvs,2));const v=[];for(let M=0,x=h.length;M1){for(let M=0,x=h.length;M0){const a=new mf({size:1,sizeAttenuation:!1}),l=new hn;l.setAttribute("position",new ct(e.vertices,3)),e.colors.length>0&&void 0!==e.colors[0]&&(l.setAttribute("color",new ct(e.colors,3)),a.vertexColors=!0);const c=new Vb(l,a);s.add(c)}return s}}class bO extends yf{constructor(t){super(t)}load(t,e,n,r){const s=this,o=""===this.path?Ou.extractUrlBase(t):this.path,a=new La(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,d):c;h=h.toLowerCase();let p=d>=0?c.substring(d+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 fpe(this.resourcePath||e,this.materialOptions);return a.setCrossOrigin(this.crossOrigin),a.setManager(this.manager),a.setMaterials(o),a}}class fpe{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:ac,this.wrap=void 0!==this.options.wrap?this.options.wrap:Ns}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),d=e.loadTexture(function s(a,l){return"string"!=typeof l||""===l?"":/^https?:\/\//i.test(l)?l:a+l}(e.baseUrl,c.url));d.repeat.copy(c.scale),d.offset.copy(c.offset),d.wrapS=e.wrap,d.wrapT=e.wrap,("map"===a||"emissiveMap"===a)&&(d.colorSpace=cs),r[a]=d}for(const a in n){const l=n[a];let c;if(""!==l)switch(a.toLowerCase()){case"kd":r.color=(new qe).fromArray(l).convertSRGBToLinear();break;case"ks":r.specular=(new qe).fromArray(l).convertSRGBToLinear();break;case"ke":r.emissive=(new qe).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 zS(r),this.materials[t]}getTextureParams(t,e){const n={scale:new xe(1,1),offset:new xe(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:wG;let a=o.getHandler(t);null===a&&(a=new Pu(o)),a.setCrossOrigin&&a.setCrossOrigin(this.crossOrigin);const l=a.load(t,n,r,s);return void 0!==e&&(l.mapping=e),l}}const ppe=["determinateSpinner"];function mpe(i,t){if(1&i&&(Ri(),W(0,"svg",11),De(1,"circle",12),j()),2&i){const e=he();Dt("viewBox",e._viewBox()),G(1),Yo("stroke-dasharray",e._strokeCircumference(),"px")("stroke-dashoffset",e._strokeCircumference()/2,"px")("stroke-width",e._circleStrokeWidth(),"%"),Dt("r",e._circleRadius())}}const gpe=Qy(class{constructor(i){this._elementRef=i}},"primary"),_pe=new me("mat-progress-spinner-default-options",{providedIn:"root",factory:function vpe(){return{diameter:u$}}}),u$=100;let Jb=(()=>{class i extends gpe{constructor(e,n,r){super(e),this.mode="mat-spinner"===this._elementRef.nativeElement.nodeName.toLowerCase()?"indeterminate":"determinate",this._value=0,this._diameter=u$,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,ks(e)))}get diameter(){return this._diameter}set diameter(e){this._diameter=ks(e)}get strokeWidth(){return this._strokeWidth??this.diameter/10}set strokeWidth(e){this._strokeWidth=ks(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)(E(mt),E(Rr,8),E(_pe))},i.\u0275cmp=ot({type:i,selectors:[["mat-progress-spinner"],["mat-spinner"]],viewQuery:function(e,n){if(1&e&&Wn(ppe,5),2&e){let r;Et(r=At())&&(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&&(Dt("aria-valuemin",0)("aria-valuemax",100)("aria-valuenow","determinate"===n.mode?n.value:null)("mode",n.mode),Yo("width",n.diameter,"px")("height",n.diameter,"px"),un("_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:[lt],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&&(fe(0,mpe,2,8,"ng-template",null,0,Vc),W(2,"div",1,2),Ri(),W(4,"svg",3),De(5,"circle",4),j()(),_a(),W(6,"div",5)(7,"div",6)(8,"div",7),sy(9,8),j(),W(10,"div",9),sy(11,8),j(),W(12,"div",10),sy(13,8),j()()()),2&e){const r=Ki(1);G(4),Dt("viewBox",n._viewBox()),G(1),Yo("stroke-dasharray",n._strokeCircumference(),"px")("stroke-dashoffset",n._strokeDashOffset(),"px")("stroke-width",n._circleStrokeWidth(),"%"),Dt("r",n._circleRadius()),G(4),U("ngTemplateOutlet",r),G(2),U("ngTemplateOutlet",r),G(2),U("ngTemplateOutlet",r)}},dependencies:[xy],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})(),bpe=(()=>{class i{}return i.\u0275fac=function(e){return new(e||i)},i.\u0275mod=nn({type:i}),i.\u0275inj=Kt({imports:[Ao,Qn]}),i})();const xpe=["previewCanvasContainer"],wpe=["previewCanvas"];function Mpe(i,t){if(1&i){const e=di();Gr(0),W(1,"label",11),Ve(2),j(),W(3,"input",12),Ue("change",function(r){an(e);const s=he().$implicit;return s.value=r.currentTarget.checked,zt(s.change(s.value))}),j(),$r()}if(2&i){const e=he(),n=e.index,r=e.$implicit,s=he().index;G(1),U("for","custom_control_"+s+"_"+n),G(1),_i(r.label),G(1),U("id","custom_control_"+s+"_"+n)("type",r.type)("checked",r.value)}}function Cpe(i,t){if(1&i){const e=di();W(0,"div",9)(1,"label",11),Ve(2),j(),W(3,"input",14),Ue("change",function(){const s=an(e).$implicit,o=he(2).$implicit;return o.value=s,zt(o.change(o.value))}),j()()}if(2&i){const e=t.$implicit,n=he(2),r=n.index,s=n.$implicit,o=he().index;G(1),U("for","custom_control_"+o+"_"+r+"_"+e),G(1),_i(e),G(1),U("id","custom_control_"+o+"_"+r+"_"+e)("checked",s.value===e)}}function Spe(i,t){if(1&i&&(W(0,"div",13)(1,"label"),Ve(2),j(),fe(3,Cpe,4,4,"div",8),j()),2&i){const e=he().$implicit;G(2),_i(e.label),G(1),U("ngForOf",e.options)}}function Epe(i,t){if(1&i){const e=di();Gr(0),W(1,"label",11),Ve(2),j(),W(3,"input",15),Ue("colorChange",function(r){an(e);const s=he().$implicit,o=he(2);return s.value=o.toRGB(r.value),zt(s.change(s.value))}),j(),De(4,"ngx-mat-color-toggle",16)(5,"ngx-mat-color-picker",null,17),$r()}if(2&i){const e=Ki(6),n=he(),r=n.index,s=n.$implicit,o=he().index;G(1),U("for","custom_control_"+o+"_"+r),G(1),_i(s.label),G(1),U("ngxMatColorPicker",e),G(1),U("for",e)}}function Ape(i,t){if(1&i){const e=di();Gr(0),W(1,"label",11),Ve(2),j(),W(3,"input",18),Ue("change",function(r){an(e);const s=he().$implicit;return s.value=r.currentTarget.value,zt(s.change(s.value))}),j(),$r()}if(2&i){const e=he(),n=e.index,r=e.$implicit,s=he().index;G(1),U("for","custom_control_"+s+"_"+n),G(1),_i(r.label),G(1),U("id","custom_control_"+s+"_"+n)("min",r.minValue)("max",r.maxValue)("step",r.valueStep)("value",r.value)}}function Dpe(i,t){if(1&i&&(W(0,"div",9),fe(1,Mpe,4,5,"ng-container",6),fe(2,Spe,4,2,"div",10),fe(3,Epe,7,4,"ng-container",6),fe(4,Ape,4,7,"ng-container",6),j()),2&i){const e=t.$implicit;G(1),U("ngIf","checkbox"===e.type),G(1),U("ngIf","radio"===e.type),G(1),U("ngIf","color"===e.type),G(1),U("ngIf","slider"===e.type)}}function Tpe(i,t){if(1&i&&(Gr(0),W(1,"h4"),Ve(2),j(),fe(3,Dpe,5,4,"div",8),$r()),2&i){const e=t.$implicit;G(2),_i(e.title),G(1),U("ngForOf",e.controls)}}function Ipe(i,t){if(1&i){const e=di();W(0,"div",9)(1,"label",11),Ve(2),j(),W(3,"input",19),Ue("change",function(r){return zt(an(e).$implicit.visible=r.currentTarget.checked)}),j()()}if(2&i){const e=t.$implicit;G(1),U("for","visibility_"+e.name),G(1),_i(e.name),G(1),U("id","visibility_"+e.name)("checked",e.visible)}}function Rpe(i,t){if(1&i&&(Gr(0),W(1,"h4"),Ve(2,"Objects visibility"),j(),fe(3,Ipe,4,4,"div",8),$r()),2&i){const e=he();G(3),U("ngForOf",e.meshes)}}function kpe(i,t){1&i&&De(0,"mat-spinner",20)}const ra=i=>{i.colorSpace="srgb",i.anisotropy=8,i.magFilter=_r,i.minFilter=_r};let h$=(()=>{class i{constructor(e){this.cdr=e,this.visibilityControls=!0,this.groupFunction=null,this.customControls=[],this.onObjectLoaded=new We,this._paths$=new gt(null),this.destroyed$=new Re,this.entity=null,this.meshes=[]}get paths(){return this._paths$.getValue()}set paths(e){this._paths$.next(e)}ngAfterViewInit(){var e=this;return tt(function*(){var s;e.world=new sk(new vO,{init:(s=tt(function*(){}),function(){return s.apply(this,arguments)}),simulate:()=>{}}),yield e.world.init(),e.world.visualScene.nativeScene.add(new $S(16777215,2));let n=new gt({x:1,y:1});e.renderer=e.world.addRenderer(e.world.visualScene.factory.createPerspectiveCamera({frustrum:{near:.01,far:1e4}}),e.previewCanvas.nativeElement,{size:n.asObservable(),background:11184810}),e.controller=new kse(e.renderer,{mouseOptions:{canvas:e.previewCanvas.nativeElement},orbiting:{sensitivityX:2,sensitivityY:2},orbitingElasticity:30}),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(He(e.destroyed$)).subscribe(function(){var s=tt(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 Qb,h=yield(new bO).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 Lo;y.add(...b[v]),y.name=v,p.remove(...b[v]),p.add(y)}}e.meshes=p.children,e.meshes.sort((b,v)=>b.name>v.name?1:-1),p.traverse(b=>{if(b instanceof Mn){const v=b.material instanceof Array?b.material:[b.material];for(const y of v)y.transparent=!0,y.alphaTest=.5,y instanceof Yi&&y.map&&(y.map.wrapS=Ji,y.map.wrapT=Ji,ra(y.map),y.map.needsUpdate=!0)}}),e.onObjectLoaded.next(p),e.entity=new Qo({object3D:new ia(p)}),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=Pe.scalarMult(Pe.add(m.min,m.max),.5),e.controller.spherical={phi:1.22,theta:-1.32,radius:Pe.dist(m.min,m.max)},e.cdr.markForCheck()}});return function(o){return s.apply(this,arguments)}}())})()}toRGB(e){return(e?.r||0)<<16|(e?.g||0)<<8|(e?.b||0)}ngOnDestroy(){this.destroyed$.next(),this.destroyed$.complete()}}return i.\u0275fac=function(e){return new(e||i)(E(Zn))},i.\u0275cmp=ot({type:i,selectors:[["app-obj-viewer"]],viewQuery:function(e,n){if(1&e&&(Wn(xpe,5),Wn(wpe,5)),2&e){let r;Et(r=At())&&(n.previewCanvasContainer=r.first),Et(r=At())&&(n.previewCanvas=r.first)}},inputs:{paths:"paths",visibilityControls:"visibilityControls",groupFunction:"groupFunction",customControls:"customControls"},outputs:{onObjectLoaded:"onObjectLoaded"},decls:8,vars:3,consts:[[1,"previewCanvasContainer"],["previewCanvasContainer",""],["width","640","height","480"],["previewCanvas",""],["id","controls"],[4,"ngFor","ngForOf"],[4,"ngIf"],["mode","indeterminate",4,"ngIf"],["class","controls-list",4,"ngFor","ngForOf"],[1,"controls-list"],["style","width: 100%",4,"ngIf"],[3,"for"],[3,"id","type","checked","change"],[2,"width","100%"],["type","radio",3,"id","checked","change"],["matInput","",1,"hidden",3,"ngxMatColorPicker","colorChange"],["matSuffix","",3,"for"],["picker",""],["type","range",3,"id","min","max","step","value","change"],["type","checkbox",3,"id","checked","change"],["mode","indeterminate"]],template:function(e,n){1&e&&(W(0,"div",0,1),De(2,"canvas",2,3),W(4,"div",4),fe(5,Tpe,4,2,"ng-container",5),fe(6,Rpe,4,1,"ng-container",6),j(),fe(7,kpe,1,0,"mat-spinner",7),j()),2&e&&(G(5),U("ngForOf",n.customControls),G(1),U("ngIf",n.visibilityControls),G(1),U("ngIf",!n.entity))},dependencies:[Eo,vi,Xte,ic,Jb,jie,bC,LH],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%] > h4[_ngcontent-%COMP%]{margin:0}.previewCanvasContainer[_ngcontent-%COMP%] #controls[_ngcontent-%COMP%] .controls-list[_ngcontent-%COMP%]{width:100%;display:flex;-webkit-user-select:none;user-select:none;align-items:center}.previewCanvasContainer[_ngcontent-%COMP%] #controls[_ngcontent-%COMP%] .controls-list[_ngcontent-%COMP%] > span[_ngcontent-%COMP%]{flex-grow:1}.previewCanvasContainer[_ngcontent-%COMP%] #controls[_ngcontent-%COMP%] .controls-list[_ngcontent-%COMP%] > label[_ngcontent-%COMP%]{flex-grow:1}"],changeDetection:0}),i})();function Ppe(i,t){if(1&i&&(Ri(),De(0,"circle",5),Ct(1,"async"),Ct(2,"async")),2&i){const e=he();let n,r;Dt("cx",(null==(n=Tt(1,3,e.mapPointer$))?null:n.x)||0)("cy",(null==(r=Tt(2,5,e.mapPointer$))?null:r.y)||0)("r",10)}}const Ope=function(){return{"stroke-width":3}};let f$=(()=>{class i{constructor(e){this.ref=e,this._roadSpline$=new gt([]),this._pointer$=new gt(null),this.splineClosed=!1,this.svgSize$=new gt({x:100,y:100}),this.scalingSquare$=new gt({x:0,y:0,width:100,height:100}),this.mapPolyline$=new gt(""),this.mapPointer$=new gt(null),this.destroyed$=new Re}set roadSpline(e){this._roadSpline$.next(e)}set pointer(e){this._pointer$.next(e)}get trackLength$(){return this._roadSpline$.pipe(et(e=>{let n=0;for(let r=1;r{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$),nu([this._roadSpline$,this.scalingSquare$,this.svgSize$]).pipe(He(this.destroyed$),et(([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$),nu([this._pointer$,this.scalingSquare$.asObservable(),this.svgSize$]).pipe(He(this.destroyed$),et(([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)(E(mt))},i.\u0275cmp=ot({type:i,selectors:[["app-tri-minimap"]],inputs:{roadSpline:"roadSpline",pointer:"pointer",splineClosed:"splineClosed"},decls:13,vars:16,consts:[[1,"container"],["shape-rendering","geometricPrecision"],[2,"fill","none","stroke","#333333",3,"ngStyle"],["fill","#e30","stroke","black","stroke-width","3",4,"ngIf"],[1,"info_div"],["fill","#e30","stroke","black","stroke-width","3"]],template:function(e,n){if(1&e&&(W(0,"div",0),Ri(),W(1,"svg",1),Ct(2,"async"),Ct(3,"async"),De(4,"polyline",2),Ct(5,"async"),Ve(6," cars "),fe(7,Ppe,3,7,"circle",3),Ct(8,"async"),j(),_a(),W(9,"div",4)(10,"span"),Ve(11),Ct(12,"async"),j()()()),2&e){let r,s;G(1),Dt("viewBox","0 0 "+(null==(r=Tt(2,5,n.svgSize$))?null:r.x)+" "+(null==(r=Tt(3,7,n.svgSize$))?null:r.y)),G(3),U("ngStyle",oo(15,Ope)),Dt("points",Tt(5,9,n.mapPolyline$)),G(3),U("ngIf",Tt(8,11,n.mapPointer$)),G(4),Zi("Track length (m): ",null==(s=Tt(12,13,n.trackLength$))?null:s.toFixed(2),"")}},dependencies:[vi,tM,pl],styles:["[_nghost-%COMP%]{overflow:auto}.container[_ngcontent-%COMP%]{position:relative;width:100%;height:100%}.container[_ngcontent-%COMP%] svg[_ngcontent-%COMP%]{position:absolute;width:100%;height:100%}.container[_ngcontent-%COMP%] .info_div[_ngcontent-%COMP%]{color:#838383}"],changeDetection:0}),i})();const Fpe=["previewCanvasContainer"],Lpe=["previewCanvas"];function Npe(i,t){if(1&i&&(W(0,"mat-option",19),Ve(1),j()),2&i){const e=t.$implicit;U("value",e),G(1),Zi(" ",e," ")}}function Bpe(i,t){if(1&i){const e=di();Gr(0),W(1,"mat-form-field",1)(2,"mat-label"),Ve(3,"Custom FAM path"),j(),De(4,"input",20,21),Ct(6,"async"),j(),W(7,"button",22),Ue("click",function(){an(e);const r=Ki(5);return zt(he().onFamSelected(r.value))}),Ve(8,"LOAD"),j(),$r()}if(2&i){const e=he();G(4),U("value",Tt(6,1,e.previewFamLocation$))}}function Upe(i,t){1&i&&De(0,"mat-spinner",23),2&i&&U("diameter",40)}function Vpe(i,t){1&i&&De(0,"mat-spinner",24)}const zpe=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 Af=(()=>{return(i=Af||(Af={})).ThreeModel="model",i.Bitmap="bitmap",i.TwoSidedBitmap="two_sided_bitmap",Af;var i})();class Hpe extends QH{constructor(t,e,n){super(t,{loadDepth:40,inertia:2}),this.mapGraph=t,this.famPath=e,this.hideUnknownEntities$=n,this.textureLoader=new Pu,this.terrainMaterials={},this.objLoader=new Qb,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(Zl(),He(this._onRemoved$)).subscribe(e=>{for(const n of this.unknownEntities)n.visible=!e})}getPlaceholderTexture(){var t=this;return tt(function*(){return t._placeholder?t._placeholder:(t._placeholderPromise||(t._placeholderPromise=t.textureLoader.loadAsync("assets/placeholder_texture.png")),t._placeholderPromise)})()}getPlaceholderTerrainTexture(){var t=this;return tt(function*(){return t._placeholderTerrain?t._placeholderTerrain:(t._placeholderTerrainPromise||(t._placeholderTerrainPromise=t.textureLoader.loadAsync("assets/placeholder_texture.png").then(e=>(e.wrapS=Ns,e.wrapT=Ji,ra(e),e.flipY=!0,e))),t._placeholderTerrainPromise)})()}loadChunk(t){var e=this;return tt(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 Mn&&(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:Pe.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:ji.fromAngle(Pe.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 Qo({object3D:new ia(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 Yi({side:Ls,transparent:!0,visible:!1}),this.famPath?this.textureLoader.loadAsync(`${this.famPath}/background/${t}.png`).then(e=>{e.wrapS=Ns,e.wrapT=Ji,ra(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 tt(function*(){let n=!1;if(t.type==Af.ThreeModel){let r;try{if(!e.famPath)throw new Error;const o=new bO,a=new Qb,l=yield o.loadAsync(`${e.famPath}/props/${t.data.data.resource_id}/0/material.mtl`);l.preload(),a.setMaterials(l),r=new ia(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 Mn){const a=o.material instanceof Array?o.material:[o.material];for(const l of a)l.transparent=!0,l.alphaTest=.5,l instanceof Yi&&l.map&&(l.map.wrapS=Ji,l.map.wrapT=Ji,ra(l.map),l.map.needsUpdate=!0)}});const s=new Qo({object3D: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==Af.Bitmap||t.type==Af.TwoSidedBitmap){const r=(c,d)=>new Array(d).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 Lo,[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==Af.TwoSidedBitmap){const[c,d]=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 Qo({object3D:new ia(s)});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 tt(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=>(ra(h),new Yi({map:h,alphaTest:.5,transparent:!0,side:Ls}))),d=new Mn(new Iu(e.x,e.y),c[0]);if(d.rotateX(Math.PI/2),d.position.set(0,0,e.y/2),c.length>1){let h=-1;Ym(r.world).pipe(o4(n&&!isNaN(+n)?1e3*+n:250)).subscribe(()=>{h=(h+1)%c.length,d.material=c[h]})}return[d,a]})()}}let Gpe=(()=>{class i{constructor(e,n,r){this.eelDelegate=e,this.cdr=n,this.mainService=r,this._resource$=new gt(null),this.changed=new We,this.previewLoading$=new gt(!0),this.previewFamLocation$=new gt(null),this.previewFamLoading$=new gt(!1),this.pointer$=new gt(null),this.selectedSplineIndex$=new gt(0),this.selectedSplineItem$=new gt(null),this.selectedAiInfoItem$=new gt(null),this.selectedTerrainItem$=new gt(null),this.famPath=null,this.name="",this.renderer=null,this.map=null,this.isOpenedTrack=!0,this.roadPath=null,this.destroyed$=new Re}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 tt(function*(){var s;e.world=new sk(new vO,{init:(s=tt(function*(){}),function(){return s.apply(this,arguments)}),simulate:()=>{},loader:{loadFromGgGlb:function(){var s=tt(function*(...o){return[]});return function(){return s.apply(this,arguments)}}()}}),yield e.world.init(),e.skySphere=new Qo({object3D:e.world.visualScene.factory.createPrimitive({shape:"SPHERE",radius:1e3},{color:16777215})}),e.skySphere.object3D.nativeMesh.material.side=Ls,e.world.addEntity(e.skySphere),e.selectionSphere=new Qo({object3D: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 $S(16777215,2));let n=new gt({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=ji.lookAt(e.renderer.camera.position,Pe.add(e.renderer.camera.position,Pe.Y),Pe.Z),Ym(e.world).pipe(He(e.destroyed$)).subscribe(()=>{e.renderer&&(e.skySphere.position=e.renderer.camera.position,e.pointer$.next(e.renderer.camera.position))}),e.controller=new n4(e.world.keyboardInput,e.renderer,{mouseOptions:{canvas:e.previewCanvas.nativeElement,pointerLock:!0},keymap:"wasd+arrows",cameraLinearSpeed:40,cameraBoostMultiplier:4,cameraMovementElasticity:100,cameraRotationElasticity:30,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(He(e.destroyed$)).subscribe(function(){var s=tt(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(He(e.destroyed$),gn(([s,o])=>!!e.resource&&s.startsWith(e.resource.id)),ml(3e3)).subscribe(tt(function*(){e.previewLoading$.next(!0),yield e.postTmpUpdates(e.resource?.id),yield e.loadPreview(),e.previewLoading$.next(!1)})),e.selectedSplineIndex$.pipe(He(e.destroyed$),ml(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=Pe.add(a,Pe.rotAround({x:10,y:-12,z:5},{x:0,y:0,z:1},-e.resource.data.road_spline[s].orientation)),e.renderer.rotation=ji.lookAt(e.renderer.position,a,{x:0,y:0,z:1}),e.controller.reset())}e.selectedSplineItem$.next({id:rc(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:rc(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:rc(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 tt(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 Pu,o=r.find(a=>a.endsWith("spherical.png"));if(o){const a=yield s.loadAsync(o);a.colorSpace="srgb",a.mapping=lc,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 tt(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 tt(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=Km.fromMapArray(e.roadPath.map((r,s)=>({path:`${e.terrainChunksObjLocation}terrain_chunk_${s}`,position:r,loadOptions:{}}))||[],!e.isOpenedTrack);e.unloadPreview(),e.map=new Hpe(n,e.famPath&&"resources/"+e.famPath,e.mainService.hideHiddenFields$),e.map.resource=e.resource,e.map.isOpenedTrack=e.isOpenedTrack,Ym(e.world).pipe(He(e.destroyed$)).subscribe(()=>{e.map&&e.renderer&&e.map.loaderCursor$.next(e.renderer.position)}),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 tt(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)(E(Ql),E(Zn),E(Pa))},i.\u0275cmp=ot({type:i,selectors:[["app-tri-map-block-ui"]],viewQuery:function(e,n){if(1&e&&(Wn(Fpe,5),Wn(Lpe,5)),2&e){let r;Et(r=At())&&(n.previewCanvasContainer=r.first),Et(r=At())&&(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&&(W(0,"div",0)(1,"h4"),Ve(2,"Preview *.FAM file"),j(),W(3,"mat-form-field",1)(4,"mat-label"),Ve(5,"Current preview FAM"),j(),W(6,"mat-select",2,3),Ue("valueChange",function(s){return n.onFamSelected(s)}),Ct(8,"async"),Ct(9,"async"),fe(10,Npe,2,2,"mat-option",4),W(11,"mat-option",5),Ve(12,"custom"),j()()(),fe(13,Bpe,9,3,"ng-container",6),fe(14,Upe,1,1,"mat-spinner",7),Ct(15,"async"),j(),W(16,"div",8)(17,"div",9,10),De(19,"canvas",11,12),fe(21,Vpe,1,0,"mat-spinner",13),Ct(22,"async"),j(),W(23,"div",14,10)(25,"mat-form-field",1)(26,"mat-label"),Ve(27,"Spline item"),j(),W(28,"input",15),Ue("ngModelChange",function(s){return n.selectedSplineIndex$.next(s)}),Ct(29,"async"),Ct(30,"async"),j()(),De(31,"app-tri-minimap",16),Ct(32,"async"),j()(),W(33,"h4"),Ve(34,"Road spline item"),j(),De(35,"app-compound-block-ui",17),Ct(36,"async"),W(37,"h4"),Ve(38,"AI info (block for 4 spline items)"),j(),De(39,"app-compound-block-ui",17),Ct(40,"async"),W(41,"h4"),Ve(42,"Terrain (block for 4 spline items)"),j(),De(43,"app-compound-block-ui",17),Ct(44,"async"),W(45,"h4"),Ve(46,"Common"),j(),De(47,"app-compound-block-ui",18),Ct(48,"async")),2&e){const r=Ki(7);let s;G(6),U("value",n.previewFamPossibleLocations.includes(Tt(8,20,n.previewFamLocation$))?Tt(9,22,n.previewFamLocation$):"custom"),G(4),U("ngForOf",n.previewFamPossibleLocations),G(3),U("ngIf","custom"==r.value),G(1),U("ngIf",Tt(15,24,n.previewFamLoading$)),G(7),U("ngIf",Tt(22,26,n.previewLoading$)),G(7),U("min",0)("max",4*(null==(s=Tt(29,28,n._resource$))?null:s.data.num_chunks)-1)("ngModel",Tt(30,30,n.selectedSplineIndex$)),G(3),U("roadSpline",n.roadSpline)("pointer",Tt(32,32,n.pointer$))("splineClosed",!n.isOpenedTrack),G(4),U("resource",Tt(36,34,n.selectedSplineItem$))("hideBlockActions",!0),G(4),U("resource",Tt(40,36,n.selectedAiInfoItem$))("hideBlockActions",!0),G(4),U("resource",Tt(44,38,n.selectedTerrainItem$))("hideBlockActions",!0),G(4),U("resource",Tt(48,40,n._resource$))("hideBlockActions",!0)("fieldWhitelist",oo(42,zpe))}},dependencies:[Eo,vi,gl,mu,tc,_u,gu,Kc,vl,Io,ic,ib,fb,Nm,Jb,Jl,f$,pl],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})();const p$=i=>new Promise(t=>setTimeout(t,i)),m$=(i,t,e=null)=>{const n=document.createElement("canvas"),r=n.getContext("2d",{willReadFrequently:!0}),s=i.width,o=i.height;n.width=s,n.height=o,r.drawImage(i,0,0,s,o);const a=r.getImageData(0,0,s,o);for(let l=0;l{if(!(o instanceof Mn))return;let a=-1;if(o.name.startsWith("lbl__rt_frnt")?a=0:o.name.startsWith("lbl__lt_frnt")?a=1:o.name.startsWith("lbl__rt_rear")?a=2:o.name.startsWith("lbl__lt_rear")&&(a=3),a>-1){this.wheels[a]=o,a<2&&(this.frontWheels[a]=o),o.geometry.boundingBox||o.geometry.computeBoundingBox();const l=Pe.avg(o.geometry.boundingBox.min,o.geometry.boundingBox.max);o.geometry.translate(...Pe.spr(Pe.neg(l))),o.position.set(...Pe.spr(l)),this.wheelIdlePositions[a]=l}(o.name.includes("rsid")||o.name.includes("lite"))&&(r.push(o),this.originalTexWithTailLights=o.material.map)}),!this.originalTexWithTailLights)throw new Error("Not a driveable NFS1 car");this.tailLightColors=n.includes("TRAFFC.CFM")?[9509903,16711680]:[3212546,16258068],this.texWithTailLightsImg=document.createElement("img"),this.texWithTailLights=new Po(this.texWithTailLightsImg),this.texWithTailLights.flipY=this.originalTexWithTailLights.flipY,ra(this.texWithTailLights),this.recolorTailLights(this.tailLightColors[0]).then();for(const o of r)o.material.map=this.texWithTailLights;const s=new Pu;this.tyreTextures=[1,2,3,4].map(o=>s.load(`${n}/tyr${o}.png`));for(const o of this.tyreTextures)ra(o);this.tyreMaterial=new Yi({map:this.tyreTextures[0]}),this.tyreMaterial.transparent=!0,this.tyreMaterial.alphaTest=.5,this.tyreMaterial.map.wrapS=Ji,this.tyreMaterial.map.wrapT=Ji,this.tyreMaterial.polygonOffset=!0,this.tyreMaterial.polygonOffsetFactor=-4;for(const o of this.wheels)o.material=this.tyreMaterial}get tailLightsOn(){return this._tailLightsOn}set tailLightsOn(t){t!==this._tailLightsOn&&(this._tailLightsOn=t,this.recolorTailLights(this.tailLightColors[t?1:0]))}get speed(){return this._speed}set speed(t){if(t!==this._speed){switch(this._speed=t,this.tyreTextureUpdateTimer&&clearInterval(this.tyreTextureUpdateTimer),t){case"idle":this.tyreMaterial.map=this.tyreTextures[0];break;case"slow":let e=!0;this.tyreTextureUpdateTimer=setInterval(()=>{this.tyreMaterial.map=this.tyreTextures[e?1:2],this.tyreMaterial.needsUpdate=!0,e=!e},16);break;case"fast":this.tyreMaterial.map=this.tyreTextures[3]}this.tyreMaterial.needsUpdate=!0}}get steeringAngle(){return this._steeringAngle}set steeringAngle(t){if(t!==this._steeringAngle){this._steeringAngle=t;for(const e of this.frontWheels)e.rotation.set(0,0,t)}}recolorTailLights(t){var e=this;return tt(function*(){if(e.originalTexWithTailLights&&e.texWithTailLights&&e.texWithTailLightsImg){for(let n=100;n>0&&!e.originalTexWithTailLights.source.data;n--)yield p$(50);((i,t,e,n=null)=>{const[r,s,o]=[t>>16,t>>8&255,255&t],[a,l,c]=[e>>16,e>>8&255,255&e];m$(i,(d,h)=>{d[h]==r&&d[h+1]==s&&d[h+2]==o&&(d[h]=a,d[h+1]=l,d[h+2]=c)},n)})(e.originalTexWithTailLights.source.data,e.tailLightsTexColor,t,e.texWithTailLightsImg),e.texWithTailLights.needsUpdate=!0}})()}dispose(){this.texWithTailLightsImg&&(this.texWithTailLightsImg.remove(),this.texWithTailLightsImg=null),this.texWithTailLights&&(this.texWithTailLights.dispose(),this.texWithTailLights=null),this.tyreTextureUpdateTimer&&clearInterval(this.tyreTextureUpdateTimer),this.tyreMaterial&&(this.tyreMaterial.dispose(),this.tyreMaterial=null)}}let jpe=(()=>{class i{constructor(e,n,r){this.eelDelegate=e,this.mainService=n,this.cdr=r,this._resource$=new gt(null),this.changed=new We,this.previewPaths$=new gt(null),this.destroyed$=new Re,this.customControls=[],this.serializerSettings={geometry__save_obj:!0,geometry__save_blend:!1,geometry__export_to_gg_web_engine:!1}}get resource(){return this._resource$.getValue()}set resource(e){this._resource$.next(e)}ngAfterViewInit(){var e=this;return tt(function*(){e._resource$.pipe(He(e.destroyed$)).subscribe(function(){var n=tt(function*(r){e.previewPaths$.next(yield e.loadPreviewFilePaths(r?.id))});return function(r){return n.apply(this,arguments)}}()),e.mainService.dataBlockChange$.pipe(He(e.destroyed$),gn(([n,r])=>!!e.resource&&n.startsWith(e.resource.id)),ml(1500)).subscribe(tt(function*(){e.previewPaths$.next(null),e.previewPaths$.next(yield e.postTmpUpdates(e.resource?.id))}))})()}onObjectLoaded(e){var n=this;return tt(function*(){if((n._resource$.value?.id||"").includes(".CFM__"))try{const r=n.resource?.id.split("/");r.pop(),r[r.length-1]=""+(+r[r.length-1]+1);const s=yield n.eelDelegate.retrieveValue(r.join("/")+"/data"),o=s.children_aliases.findIndex(l=>"!PAL"===l);if(-1==o)throw new Error("Not a car");const a=new Wpe(e,s.children[o].data.colors[254]>>>8,n.previewPaths$.value[0].substring(0,n.previewPaths$.value[0].lastIndexOf("/"))+"/assets");n.customControls=[{title:"TNFS car features",controls:[{label:"Brake lights on",type:"checkbox",value:!1,change:l=>{a.tailLightsOn=l}},{label:"Car speed",type:"radio",options:["idle","slow","fast"],value:"idle",change:l=>{a.speed=l}},{label:"Steering angle",type:"slider",minValue:-.7,maxValue:.7,valueStep:.05,value:0,change:l=>{a.steeringAngle=l}}]}],n.cdr.markForCheck()}catch{}})()}postTmpUpdates(e){var n=this;return tt(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 tt(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)(E(Ql),E(Pa),E(Zn))},i.\u0275cmp=ot({type:i,selectors:[["app-orip-geometry-block-ui"]],inputs:{resource:"resource"},outputs:{changed:"changed"},decls:4,vars:7,consts:[[3,"paths","customControls","onObjectLoaded"],[3,"resource"]],template:function(e,n){1&e&&(W(0,"app-obj-viewer",0),Ue("onObjectLoaded",function(s){return n.onObjectLoaded(s)}),Ct(1,"async"),j(),De(2,"app-compound-block-ui",1),Ct(3,"async")),2&e&&(U("paths",Tt(1,3,n.previewPaths$))("customControls",n.customControls),G(2),U("resource",Tt(3,5,n._resource$)))},dependencies:[Jl,h$,pl],changeDetection:0}),i})();const g$=i=>{let t=i.block_class_mro.split("__")[0];return"ArrayBlock"===t?g$(i.child_schema)+"[]":t},Ype=["class","block-ui"];function qpe(i,t){if(1&i&&(W(0,"mat-label",7),Ve(1),j()),2&i){const e=he(2);U("matTooltip",e.resourceDescription),G(1),Zi("",null==e.resource?null:e.resource.name," ")}}function Xpe(i,t){if(1&i&&(W(0,"mat-option",8),Ve(1),j()),2&i){const e=t.$implicit,n=t.index,r=he(2);U("value",n)("disabled",r.disabled),G(1),Zi(" ",r.blockClassStr(e)," ")}}function Kpe(i,t){if(1&i){const e=di();Gr(0),fe(1,qpe,2,2,"mat-label",1),Ct(2,"async"),W(3,"div",2)(4,"mat-label"),Ve(5,"Resource type:"),j(),W(6,"mat-select",3),Ue("selectionChange",function(r){return an(e),zt(he().setChoiceIndex(r.value))}),fe(7,Xpe,2,3,"mat-option",4),j(),De(8,"app-block-actions",5),j(),De(9,"app-editor",6),$r()}if(2&i){const e=he();let n;G(1),U("ngIf",(null==e.resource?null:e.resource.name)&&(null==e.resource?null:e.resource.name)!=(null==(n=Tt(2,8,e.main.resource$))?null:n.name)),G(5),U("value",e.resourceData.choice_index)("disabled",e.disabled),G(1),U("ngForOf",e.resource.schema.possible_resource_schemas),G(1),U("resource",e.childResource),G(1),U("resource",e.childResource)("hideBlockActions",!0)("disabled",e.disabled)}}let _$=(()=>{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 We,this.blockClassStr=g$}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:rc(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)(E(Pa))},i.\u0275cmp=ot({type:i,selectors:[["app-delegate",8,"block-ui"]],inputs:{resource:"resource",resourceDescription:"resourceDescription",hideBlockActions:"hideBlockActions",disabled:"disabled"},outputs:{changed:"changed"},attrs:Ype,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"],[3,"resource","hideBlockActions","disabled"],["matTooltipPosition","above",3,"matTooltip"],[3,"value","disabled"]],template:function(e,n){1&e&&fe(0,Kpe,10,10,"ng-container",0),2&e&&U("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 Zpe=["class","block-ui"];function Qpe(i,t){if(1&i&&(W(0,"mat-label",7),Ve(1),j()),2&i){const e=he(2);U("matTooltip",e.resourceDescription),G(1),Zi(" ",e.resource.name," ")}}function Jpe(i,t){if(1&i){const e=di();Gr(0),fe(1,Qpe,2,2,"mat-label",1),W(2,"mat-selection-list",2),Ue("selectionChange",function(r){return an(e),zt(he().onSelection(r))}),W(3,"mat-list-option",3),Ve(4," Left "),j(),W(5,"mat-list-option",4),Ve(6," Right "),j()(),W(7,"mat-form-field",5)(8,"mat-label"),Ve(9,"Texture ID"),j(),W(10,"input",6),Ue("ngModelChange",function(r){return an(e),zt(he().resource.data.texture_id=r)})("change",function(){return an(e),zt(he().changed.emit())}),j()(),$r()}if(2&i){const e=he();G(1),U("ngIf",e.resource.name),G(2),U("selected",e.resource.data.has_left_fence),G(2),U("selected",e.resource.data.has_right_fence),G(5),U("max",63)("min",0)("step",1)("ngModel",e.resource.data.texture_id)}}let eme=(()=>{class i{constructor(){this.resource=null,this.resourceDescription="",this.changed=new We}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=ot({type:i,selectors:[["app-fence-type",8,"block-ui"]],inputs:{resource:"resource",resourceDescription:"resourceDescription"},outputs:{changed:"changed"},attrs:Zpe,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&&fe(0,Jpe,11,7,"ng-container",0),2&e&&U("ngIf",n.resource)},dependencies:[vi,gl,mu,tc,_u,gu,Kc,vl,Io,ic,Os,MC,wC],changeDetection:0}),i})(),tme=(()=>{class i{constructor(){this._resource=null,this.resourceMap={},this.changed=new We}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]=["",_l.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)(E(nb),E(bte),E(oR))},i.\u0275cmp=ot({type:i,selectors:[["app-run-custom-action",8,"dialog"]],attrs:nme,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&&(W(0,"h1",0),Ve(1),j(),W(2,"div",1)(3,"p"),Ve(4),j()(),W(5,"form",2),fe(6,ime,4,4,"mat-form-field",3),j(),W(7,"div",4)(8,"button",5),Ue("click",function(){return n.dialogRef.close()}),Ve(9,"Cancel"),j(),W(10,"button",6),Ue("click",function(){return n.submit()}),Ve(11,"Run"),j()()),2&e&&(G(1),Zi('Run action "',n.data.title,'"'),G(3),_i(n.data.description),G(1),U("formGroup",n.argsForm),G(1),U("ngForOf",n.data.args),G(4),U("disabled",n.argsForm.invalid))},dependencies:[Eo,IR,gl,tc,bR,vl,Io,ic,ib,fV,pV,mV,Gh,fC],styles:["form[_ngcontent-%COMP%]{padding:0 24px}"]}),i})();function v$(i,t){return t?e=>Sy(t.pipe(Pi(1),function sme(){return ti((i,t)=>{i.subscribe(Yn(t,ms))})}()),e.pipe(v$(i))):ir((e,n)=>wr(i(e,n)).pipe(Pi(1),YB(e)))}function y$(i,t=$y){const e=OI(i,t);return v$(()=>e)}const ome=["mat-menu-item",""];function ame(i,t){1&i&&(Ri(),W(0,"svg",3),De(1,"polygon",4),j())}const lme=[[["mat-icon"],["","matMenuItemIcon",""]],"*"],cme=["mat-icon, [matMenuItemIcon]","*"];function dme(i,t){if(1&i){const e=di();W(0,"div",0),Ue("keydown",function(r){return an(e),zt(he()._handleKeydown(r))})("click",function(){return an(e),zt(he().closed.emit("click"))})("@transformMenu.start",function(r){return an(e),zt(he()._onAnimationStart(r))})("@transformMenu.done",function(r){return an(e),zt(he()._onAnimationDone(r))}),W(1,"div",1),Wt(2),j()()}if(2&i){const e=he();U("id",e.panelId)("ngClass",e._classList)("@transformMenu",e._panelAnimationState),Dt("aria-label",e.ariaLabel||null)("aria-labelledby",e.ariaLabelledby||null)("aria-describedby",e.ariaDescribedby||null)}}const ume=["*"],xO=new me("MAT_MENU_PANEL"),hme=YM(jM(class{}));let eE=(()=>{class i extends hme{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 Re,this._focused=new Re,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",jr("120ms cubic-bezier(0, 0, 0.2, 1)",si({opacity:1,transform:"scale(1)"}))),Pr("* => void",jr("100ms 25ms linear",si({opacity:0})))]),fadeInItems:ka("fadeInItems",[Ps("showing",si({opacity:1})),Pr("void => *",[si({opacity:0}),jr("400ms 100ms cubic-bezier(0.55, 0, 0.55, 0.2)")])])};let pme=0;const b$=new me("mat-menu-default-options",{providedIn:"root",factory:function mme(){return{overlapTrigger:!1,xPosition:"after",yPosition:"below",backdropClass:"cdk-overlay-transparent-backdrop"}}});let e0=(()=>{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 om,this._classList={},this._panelAnimationState="void",this._animationDone=new Re,this.overlayPanelClass=this._defaultOptions.overlayPanelClass||"",this.backdropClass=this._defaultOptions.backdropClass,this._overlapTrigger=this._defaultOptions.overlapTrigger,this._hasBackdrop=this._defaultOptions.hasBackdrop,this.closed=new We,this.close=this.closed,this.panelId="mat-menu-panel-"+pme++}ngOnInit(){this.setPositionClasses()}ngAfterContentInit(){this._updateDirectDescendants(),this._keyManager=new RU(this._directDescendantItems).withWrap().withTypeAhead().withHomeAndEnd(),this._keyManager.tabOut.subscribe(()=>this.closed.emit("tab")),this._directDescendantItems.changes.pipe(Do(this._directDescendantItems),Rs(e=>Mr(...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(Do(this._directDescendantItems),Rs(n=>Mr(...n.map(r=>r._hovered))))}addItem(e){}removeItem(e){}_handleKeydown(e){const n=e.keyCode,r=this._keyManager;switch(n){case 27:Ko(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(Pi(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(Do(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)(E(mt),E(ft),E(b$),E(Zn))},i.\u0275dir=ve({type:i,contentQueries:function(e,n,r){if(1&e&&($i(r,fme,5),$i(r,eE,5),$i(r,eE,4)),2&e){let s;Et(s=At())&&(n.lazyContent=s.first),Et(s=At())&&(n._allItems=s),Et(s=At())&&(n.items=s)}},viewQuery:function(e,n){if(1&e&&Wn(Co,5),2&e){let r;Et(r=At())&&(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})(),gme=(()=>{class i extends e0{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)(E(mt),E(ft),E(b$),E(Zn))},i.\u0275cmp=ot({type:i,selectors:[["mat-menu"]],hostVars:3,hostBindings:function(e,n){2&e&&Dt("aria-label",null)("aria-labelledby",null)("aria-describedby",null)},exportAs:["matMenu"],features:[Dn([{provide:xO,useExisting:i}]),lt],ngContentSelectors:ume,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&&(sr(),fe(0,dme,3,6,"ng-template"))},dependencies:[hm],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:[tE.transformMenu,tE.fadeInItems]},changeDetection:0}),i})();const x$=new me("mat-menu-scroll-strategy"),vme={provide:x$,deps:[as],useFactory:function _me(i){return()=>i.scrollStrategies.reposition()}},w$=Oh({passive:!0});let yme=(()=>{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,d){this._overlay=e,this._element=n,this._viewContainerRef=r,this._menuItemInstance=a,this._dir=l,this._focusMonitor=c,this._ngZone=d,this._overlayRef=null,this._menuOpen=!1,this._closingActionsSubscription=Zt.EMPTY,this._hoverSubscription=Zt.EMPTY,this._menuCloseSubscription=Zt.EMPTY,this._changeDetectorRef=Ft(Zn),this._handleTouchStart=h=>{qI(h)||(this._openedBy="touch")},this._openedBy=void 0,this.restoreFocus=!0,this.menuOpened=new We,this.onMenuOpen=this.menuOpened,this.menuClosed=new We,this.onMenuClose=this.menuClosed,this._scrollStrategy=s,this._parentMaterialMenu=o instanceof e0?o:void 0,n.nativeElement.addEventListener("touchstart",this._handleTouchStart,w$)}ngAfterContentInit(){this._handleHover()}ngOnDestroy(){this._overlayRef&&(this._overlayRef.dispose(),this._overlayRef=null),this._element.nativeElement.removeEventListener("touchstart",this._handleTouchStart,w$),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 e0&&(e._startAnimation(),e._directDescendantItems.changes.pipe(He(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 e0?(n._resetAnimation(),n.lazyContent?n._animationDone.pipe(gn(r=>"void"===r.toState),Pi(1),He(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],[d,h]=[r,s],p=0;if(this.triggersSubmenu()){if(h=r="before"===e.xPosition?"start":"end",s=d="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:d,overlayY:o,offsetY:p},{originX:s,originY:l,overlayX:h,overlayY:o,offsetY:p},{originX:r,originY:c,overlayX:d,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 Mr(e,this._parentMaterialMenu?this._parentMaterialMenu.closed:ht(),this._parentMaterialMenu?this._parentMaterialMenu._hovered().pipe(gn(o=>o!==this._menuItemInstance),gn(()=>this._menuOpen)):ht(),n)}_handleMousedown(e){YI(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(gn(e=>e===this._menuItemInstance&&!e.disabled),y$(0,PI)).subscribe(()=>{this._openedBy="mouse",this.menu instanceof e0&&this.menu._isAnimating?this.menu._animationDone.pipe(Pi(1),y$(0,PI),He(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)(E(as),E(mt),E(Wr),E(x$),E(xO,8),E(eE,10),E(Ra,8),E(qc),E(ft))},i.\u0275dir=ve({type:i,hostVars:3,hostBindings:function(e,n){1&e&&Ue("click",function(s){return n._handleClick(s)})("mousedown",function(s){return n._handleMousedown(s)})("keydown",function(s){return n._handleKeydown(s)}),2&e&&Dt("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})(),bme=(()=>{class i extends yme{}return i.\u0275fac=function(){let t;return function(n){return(t||(t=ri(i)))(n||i)}}(),i.\u0275dir=ve({type:i,selectors:[["","mat-menu-trigger-for",""],["","matMenuTriggerFor",""]],hostAttrs:[1,"mat-mdc-menu-trigger"],exportAs:["matMenuTrigger"],features:[lt]}),i})(),xme=(()=>{class i{}return i.\u0275fac=function(e){return new(e||i)},i.\u0275mod=nn({type:i}),i.\u0275inj=Kt({providers:[vme],imports:[Ao,eb,Qn,Pm,Xy,Qn]}),i})();function wme(i,t){if(1&i){const e=di();W(0,"button",7),Ue("click",function(){return an(e),zt(he(2).deserialize())}),De(1,"mat-icon",8),j()}}function Mme(i,t){if(1&i){const e=di();Gr(0),fe(1,wme,2,0,"button",4),W(2,"button",5),Ue("click",function(){return an(e),zt(he().serializeBlockReversible())}),De(3,"mat-icon",6),j(),$r()}if(2&i){const e=he();G(1),U("ngIf",e.isInReversibleSerializationState),G(1),U("disabled",e.isInReversibleSerializationState)}}function Cme(i,t){1&i&&(W(0,"button",9),De(1,"mat-icon",10),j()),2&i&&(he(),U("matMenuTriggerFor",Ki(3)))}function Sme(i,t){if(1&i){const e=di();W(0,"button",11),Ue("click",function(){const s=an(e).$implicit;return zt(he().runCustomAction(s))}),W(1,"span"),Ve(2),j()()}if(2&i){const e=t.$implicit;G(2),_i(e.title)}}const Eme=function(){return[]};let nE=(()=>{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 tt(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)(E(Pa),E(Ql),E(Zn),E(Bm),E(IV))},i.\u0275cmp=ot({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&&(fe(0,Mme,4,2,"ng-container",0),fe(1,Cme,2,1,"button",1),W(2,"mat-menu",null,2),fe(4,Sme,3,1,"button",3),j()),2&e&&(U("ngIf",null==n.resource||null==n.resource.schema?null:n.resource.schema.serializable_to_disc),G(1),U("ngIf",(null==n.resource||null==n.resource.schema.custom_actions?null:n.resource.schema.custom_actions.length)>0),G(3),U("ngForOf",(null==n.resource?null:n.resource.schema.custom_actions)||oo(3,Eme)))},dependencies:[Eo,vi,Os,XM,gR,gme,eE,bme],styles:["[_nghost-%COMP%]{display:flex}"]}),i})();const Ame=["class","block-ui"];function Dme(i,t){if(1&i&&(W(0,"mat-label",7),Ve(1),j()),2&i){const e=he();U("matTooltip",e.resourceDescription),G(1),Zi("",null==e.resource?null:e.resource.name," ")}}function Tme(i,t){if(1&i&&(W(0,"audio",8),De(1,"source",9),Ct(2,"async"),Ve(3," Your browser does not support the audio element. "),j()),2&i){const e=he();G(1),U("src",Tt(2,1,e.audioUrl$),Lp)}}function Ime(i,t){1&i&&De(0,"mat-spinner",10)}function Rme(i,t){1&i&&De(0,"app-block-actions",11),2&i&&U("resource",he().resource)}const kme=function(){return["wave_data"]};let Pme=(()=>{class i{constructor(e,n){this.eelDelegate=e,this.main=n,this._resource$=new gt(null),this.audioUrl$=new gt(null),this.resourceDescription="",this.hideBlockActions=!1,this.destroyed$=new Re,this.changed=new We}set resource(e){this._resource$.next(e)}get resource(){return this._resource$.getValue()}ngAfterViewInit(){var e=this;return tt(function*(){e._resource$.pipe(He(e.destroyed$)).subscribe(function(){var n=tt(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)(E(Ql),E(Pa))},i.\u0275cmp=ot({type:i,selectors:[["app-eacs-audio",8,"block-ui"]],inputs:{resource:"resource",resourceDescription:"resourceDescription",hideBlockActions:"hideBlockActions"},outputs:{changed:"changed"},attrs:Ame,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&&(W(0,"div",0),fe(1,Dme,2,2,"mat-label",1),Ct(2,"async"),fe(3,Tme,4,3,"audio",2),Ct(4,"async"),fe(5,Ime,1,0,"mat-spinner",3),Ct(6,"async"),De(7,"div",4),fe(8,Rme,1,1,"app-block-actions",5),j(),De(9,"app-compound-block-ui",6),Ct(10,"async")),2&e){let r;G(1),U("ngIf",(null==n.resource?null:n.resource.name)&&(null==n.resource?null:n.resource.name)!=(null==(r=Tt(2,7,n.main.resource$))?null:r.name)),G(2),U("ngIf",Tt(4,9,n.audioUrl$)),G(2),U("ngIf",n.resource&&!Tt(6,11,n.audioUrl$)),G(3),U("ngIf",!n.hideBlockActions),G(1),U("resource",Tt(10,13,n._resource$))("hideBlockActions",!0)("fieldBlacklist",oo(15,kme))}},dependencies:[vi,Io,Os,Jb,Jl,nE,pl],styles:["#header[_ngcontent-%COMP%]{display:flex}"]}),i})();class Ome{constructor(t,e){this.mesh=t,this.assetsPath=e,this.textures=[],this.tyreTextureUpdateTimer=void 0,this.tyreMaterial=null,this.tyreTextures=[],this._color=65280,this._speed="idle",this._steeringAngle=0,this.wheels=[],this.wheelIdlePositions=[],this.frontWheels=[];let n=new Set;if(t.traverse(r=>{if(!(r instanceof Mn))return;let s=-1;if(r.name.startsWith("part_hp_12")?s=0:r.name.startsWith("part_hp_14")?s=1:r.name.startsWith("part_hp_16")?s=2:r.name.startsWith("part_hp_18")&&(s=3),s>-1){r.geometry.boundingBox||r.geometry.computeBoundingBox();let a=Pe.avg(r.geometry.boundingBox.min,r.geometry.boundingBox.max);return(0==s||2==s)&&(a={x:a.x,y:a.y,z:a.z+1.5}),r.geometry.translate(...Pe.spr(Pe.neg(a))),r.position.set(...Pe.spr(a)),this.wheelIdlePositions[s]=a,this.wheels.push(r),void(s<2&&this.frontWheels.push(r))}const o=r.material.map;o&&n.add(o)}),this.textures=Array.from(n).map(r=>{const s=new Po(document.createElement("img"));return s.flipY=r.flipY,ra(s),[r,s]}),t.traverse(r=>{if(!(r instanceof Mn))return;const s=r.material.map;if(s){const o=this.textures.find(([a,l])=>a===s);o&&(r.material.map=o[1])}}),this.hasWheels){const r=new Pu;this.tyreTextures=[0,1,2,3].map(s=>r.load(`${e}/m${s}00.png`));for(const s of this.tyreTextures)ra(s);this.tyreMaterial=new Yi({map:this.tyreTextures[0]}),this.tyreMaterial.transparent=!0,this.tyreMaterial.alphaTest=.5,this.tyreMaterial.map.wrapS=Ji,this.tyreMaterial.map.wrapT=Ji,this.tyreMaterial.polygonOffset=!0,this.tyreMaterial.polygonOffsetFactor=-4;for(const s of this.wheels)s.material=this.tyreMaterial}this.color=65280,this.recolorCar().then()}get color(){return this._color}set color(t){t!==this._color&&(this._color=t,this.recolorCar().then())}get speed(){return this._speed}set speed(t){if(t!==this._speed){switch(this._speed=t,this.tyreTextureUpdateTimer&&clearInterval(this.tyreTextureUpdateTimer),t){case"idle":this.tyreMaterial.map=this.tyreTextures[0];break;case"slow":let e=!0;this.tyreTextureUpdateTimer=setInterval(()=>{this.tyreMaterial.map=this.tyreTextures[e?1:2],this.tyreMaterial.needsUpdate=!0,e=!e},16);break;case"fast":this.tyreMaterial.map=this.tyreTextures[3]}this.tyreMaterial.needsUpdate=!0}}get steeringAngle(){return this._steeringAngle}set steeringAngle(t){if(t!==this._steeringAngle){this._steeringAngle=t;for(const e of this.frontWheels)e.rotation.set(0,0,t)}}get hasWheels(){return this.wheels.length>0}recolorCar(){var t=this;return tt(function*(){const[e,n,r]=[t.color>>16,t.color>>8&255,255&t.color];for(const[s,o]of t.textures){for(let a=100;a>0&&!s.source.data;a--)yield p$(50);m$(s.source.data,(a,l)=>{if(a[l]+a[l+2]{class i{constructor(e,n,r){this.eelDelegate=e,this.main=n,this.cdr=r,this._resource$=new gt(null),this.changed=new We,this.customControls=[],this.previewPaths$=new gt(null),this.destroyed$=new Re,this.serializerSettings={geometry__save_obj:!0,geometry__save_blend:!1,geometry__export_to_gg_web_engine:!1}}get resource(){return this._resource$.getValue()}set resource(e){this._resource$.next(e)}ngAfterViewInit(){var e=this;return tt(function*(){e._resource$.pipe(He(e.destroyed$)).subscribe(function(){var n=tt(function*(r){e.previewPaths$.next(yield e.loadPreviewFilePaths(r?.id))});return function(r){return n.apply(this,arguments)}}()),e.main.dataBlockChange$.pipe(He(e.destroyed$),gn(([n,r])=>!!e.resource&&n.startsWith(e.resource.id)),ml(1500)).subscribe(tt(function*(){e.previewPaths$.next(null),e.previewPaths$.next(yield e.postTmpUpdates(e.resource?.id))}))})()}onObjectLoaded(e){var n=this;return tt(function*(){try{const r=new Ome(e,n.previewPaths$.value[0].substring(0,n.previewPaths$.value[0].lastIndexOf("/"))+"/assets");let s=null;const o=a=>{s&&clearTimeout(s),s=setTimeout(()=>r.color=a,50)};n.customControls=[{title:"NFS2 car features",controls:[{label:"Car color",type:"color",value:65280,change:a=>o(a)}]}],r.hasWheels&&n.customControls[0].controls.push({label:"Car speed",type:"radio",options:["idle","slow","fast"],value:"idle",change:a=>{r.speed=a}},{label:"Steering angle",type:"slider",minValue:-.7,maxValue:.7,valueStep:.05,value:0,change:a=>{r.steeringAngle=a}}),n.cdr.markForCheck()}catch(r){console.error(r)}})()}postTmpUpdates(e){var n=this;return tt(function*(){if(e){const r=yield n.eelDelegate.serializeResourceTmp(e,Object.entries(n.main.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 tt(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)(E(Ql),E(Pa),E(Zn))},i.\u0275cmp=ot({type:i,selectors:[["app-geo-geometry",8,"block-ui"]],inputs:{resource:"resource"},outputs:{changed:"changed"},attrs:Fme,decls:4,vars:8,consts:[[3,"paths","groupFunction","customControls","onObjectLoaded"],[3,"resource",4,"ngIf"],[3,"resource"]],template:function(e,n){1&e&&(W(0,"app-obj-viewer",0),Ue("onObjectLoaded",function(s){return n.onObjectLoaded(s)}),Ct(1,"async"),j(),fe(2,Lme,2,3,"app-compound-block-ui",1),Ct(3,"async")),2&e&&(U("paths",Tt(1,4,n.previewPaths$))("groupFunction",n.previewObjectGroupFunc)("customControls",n.customControls),G(2),U("ngIf",!Tt(3,6,n.main.hideHiddenFields$)))},dependencies:[vi,Jl,h$,pl],changeDetection:0}),i})();const Bme=function(){return["children","items_descr"]};let Ume=(()=>{class i{constructor(){this._resource=null,this.hideBlockActions=!1,this.resourceMap={},this.changed=new We}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:rc(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=ot({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&&De(0,"app-compound-block-ui",0)(1,"app-sidenav-res-list",1),2&e&&(U("resource",n.resource)("hideBlockActions",n.hideBlockActions)("fieldBlacklist",oo(4,Bme)),G(1),U("resources",n.resourceMap))},dependencies:[Jl,xC],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})();const Vme=["previewCanvasContainer"],zme=["previewCanvas"];function Hme(i,t){1&i&&De(0,"mat-spinner",16),2&i&&U("diameter",40)}function Gme(i,t){1&i&&De(0,"mat-spinner",17)}var Df=(()=>{return(i=Df||(Df={})).ThreeModel="model",i.Bitmap="bitmap",i.TwoSidedBitmap="two_sided_bitmap",Df;var i})();class $me extends QH{constructor(t,e,n){super(t,{loadDepth:40,inertia:2}),this.mapGraph=t,this.qfsPath=e,this.hideUnknownEntities$=n,this.textureLoader=new Pu,this.terrainMaterials={},this.objLoader=new Qb,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(Zl(),He(this._onRemoved$)).subscribe(e=>{for(const n of this.unknownEntities)n.visible=!e})}getPlaceholderTexture(){var t=this;return tt(function*(){return t._placeholder?t._placeholder:(t._placeholderPromise||(t._placeholderPromise=t.textureLoader.loadAsync("assets/placeholder_texture.png")),t._placeholderPromise)})()}getPlaceholderTerrainTexture(){var t=this;return tt(function*(){return t._placeholderTerrain?t._placeholderTerrain:(t._placeholderTerrainPromise||(t._placeholderTerrainPromise=t.textureLoader.loadAsync("assets/placeholder_texture.png").then(e=>(e.wrapS=Ns,e.wrapT=Ns,ra(e),e))),t._placeholderTerrainPromise)})()}loadChunk(t){var e=this;return tt(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 Mn&&(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:Pe.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:ji.fromAngle(Pe.nZ,l.rotation)}));const o=(yield Promise.all(s.map(l=>e.loadPropInternal(l)))).filter(l=>!!l),a=new Qo({object3D:new ia(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 Yi({side:Ls,transparent:!0,visible:!1}),this.qfsPath?this.textureLoader.loadAsync(`${this.qfsPath}/${t}.png`).then(e=>{e.wrapS=Ns,e.wrapT=Ns,ra(e),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 tt(function*(){let n=!1;if(t.type==Df.ThreeModel){let r;try{if(!e.qfsPath)throw new Error;const o=new bO,a=new Qb,l=yield o.loadAsync(`${e.qfsPath}/props/${t.data.data.resource_id}/0/material.mtl`);l.preload(),a.setMaterials(l),r=new ia(yield a.loadAsync(`${e.qfsPath}/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 Mn){const a=o.material instanceof Array?o.material:[o.material];for(const l of a)l.transparent=!0,l.alphaTest=.5,l instanceof Yi&&l.map&&(l.map.wrapS=Ns,l.map.wrapT=Ns,ra(l.map),l.map.needsUpdate=!0)}});const s=new Qo({object3D: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,d)=>new Array(d).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 Lo,[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,d]=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 Qo({object3D:new ia(s)});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 tt(function*(){const s=t.split(";"),o=yield r.getPlaceholderTexture();let a=!1,l=[];r.qfsPath?l=yield Promise.all(s.map(h=>r.textureLoader.loadAsync(`${r.qfsPath}/foreground/${h}.png`).catch(()=>(a=!0,o)))):(a=!0,l=s.map(()=>o));const c=l.map(h=>(ra(h),new Yi({map:h,alphaTest:.5,transparent:!0,side:Ls}))),d=new Mn(new Iu(e.x,e.y),c[0]);if(d.rotateX(Math.PI/2),d.position.set(0,0,e.y/2),c.length>1){let h=-1;Ym(r.world).pipe(o4(n&&!isNaN(+n)?1e3*+n:250)).subscribe(()=>{h=(h+1)%c.length,d.material=c[h]})}return[d,a]})()}}let Wme=(()=>{class i{constructor(e,n,r){this.eelDelegate=e,this.cdr=n,this.mainService=r,this._resource$=new gt(null),this.changed=new We,this.previewLoading$=new gt(!0),this.previewQfsLocation$=new gt(null),this.previewQfsLoading$=new gt(!1),this.pointer$=new gt(null),this.selectedSplineIndex$=new gt(0),this.qfsPath=null,this.name="",this.renderer=null,this.map=null,this.roadPath=null,this.destroyed$=new Re}get resource(){return this._resource$.getValue()}set resource(e){this._resource$.next(e)}get roadSpline(){return this.resource?.data.block_positions||[]}ngAfterViewInit(){var e=this;return tt(function*(){var s;e.world=new sk(new vO,{init:(s=tt(function*(){}),function(){return s.apply(this,arguments)}),simulate:()=>{},loader:{loadFromGgGlb:function(){var s=tt(function*(...o){return[]});return function(){return s.apply(this,arguments)}}()}}),yield e.world.init(),e.skySphere=new Qo({object3D:e.world.visualScene.factory.createPrimitive({shape:"SPHERE",radius:1e3},{color:16777215})}),e.skySphere.object3D.nativeMesh.material.side=Ls,e.world.addEntity(e.skySphere),e.selectionSphere=new Qo({object3D: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 $S(16777215,2));let n=new gt({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=ji.lookAt(e.renderer.camera.position,Pe.add(e.renderer.camera.position,Pe.Y),Pe.Z),Ym(e.world).pipe(He(e.destroyed$)).subscribe(()=>{e.renderer&&(e.skySphere.position=e.renderer.camera.position,e.pointer$.next(e.renderer.camera.position))}),e.controller=new n4(e.world.keyboardInput,e.renderer,{mouseOptions:{canvas:e.previewCanvas.nativeElement,pointerLock:!0},keymap:"wasd+arrows",cameraLinearSpeed:40,cameraBoostMultiplier:4,cameraMovementElasticity:100,cameraRotationElasticity:30,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(He(e.destroyed$)).subscribe(function(){var s=tt(function*(o){e.previewLoading$.next(!0),o?(e.previewQfsLocation$.next(o.id.substring(0,o.id.indexOf(".TRK"))+"0.QFS"),yield e.loadTerrainChunks(o.id),yield e.onQfsSelected(e.previewQfsLocation$.value)):(yield e.loadTerrainChunks(),yield e.loadPreview()),e.previewLoading$.next(!1)});return function(o){return s.apply(this,arguments)}}()),e.mainService.dataBlockChange$.pipe(He(e.destroyed$),gn(([s,o])=>!!e.resource&&s.startsWith(e.resource.id)),ml(3e3)).subscribe(tt(function*(){e.previewLoading$.next(!0),yield e.postTmpUpdates(e.resource?.id),yield e.loadPreview(),e.previewLoading$.next(!1)})),e.selectedSplineIndex$.pipe(He(e.destroyed$),ml(250)).subscribe(s=>{if(e.resource){let o=e.resource.data.block_positions[s];if(!o)return;o={x:o.x,y:o.z,z:o.y},e.selectionSphere.position=o,e.renderer&&(e.renderer.position=Pe.add(o,Pe.rotAround({x:10,y:-12,z:5},{x:0,y:0,z:1},-0)),e.renderer.rotation=ji.lookAt(e.renderer.position,o,{x:0,y:0,z:1}),e.controller.reset())}})})()}onQfsSelected(e){var n=this;return tt(function*(){if(n.qfsPath!=e){n.previewQfsLoading$.next(!0);try{const r=yield n.eelDelegate.serializeResource(e),s=new Pu,o=r.find(a=>a.endsWith("spherical.png"));if(o){const a=yield s.loadAsync(o);a.colorSpace="srgb",a.mapping=lc,n.skySphere.object3D.nativeMesh.material.map=a}else n.skySphere.object3D.nativeMesh.material.map=null;n.skySphere.object3D.nativeMesh.material.needsUpdate=!0,n.qfsPath=e}catch{n.skySphere.object3D.nativeMesh.material.map=null,n.skySphere.object3D.nativeMesh.material.needsUpdate=!0,n.qfsPath=null}finally{n.previewQfsLoading$.next(!1)}yield n.loadPreview()}})()}loadTerrainChunks(e){var n=this;return tt(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 tt(function*(){if(e.roadPath=e.resource?.data.block_positions.map(r=>({x:r.x,y:r.z,z:r.y})),!e.terrainChunksObjLocation||!e.roadPath)return;const n=Km.fromMapArray(e.roadPath.map((r,s)=>({path:`${e.terrainChunksObjLocation}terrain_chunk_${s}`,position:r,loadOptions:{}}))||[],!0);e.unloadPreview(),e.map=new $me(n,e.qfsPath&&"resources/"+e.qfsPath,e.mainService.hideHiddenFields$),e.map.resource=e.resource,e.map.isOpenedTrack=!1,Ym(e.world).pipe(He(e.destroyed$)).subscribe(()=>{e.map&&e.renderer&&e.map.loaderCursor$.next(e.renderer.position)}),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 tt(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)(E(Ql),E(Zn),E(Pa))},i.\u0275cmp=ot({type:i,selectors:[["app-trk-map-block-ui"]],viewQuery:function(e,n){if(1&e&&(Wn(Vme,5),Wn(zme,5)),2&e){let r;Et(r=At())&&(n.previewCanvasContainer=r.first),Et(r=At())&&(n.previewCanvas=r.first)}},inputs:{resource:"resource"},outputs:{changed:"changed"},decls:32,vars:24,consts:[[1,"qfsSelector"],["appearance","fill"],["matInput","","type","text",3,"value"],["customQfsInput",""],["mat-button","",3,"click"],["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"],["mode","indeterminate",3,"diameter"],["mode","indeterminate"]],template:function(e,n){if(1&e){const r=di();W(0,"div",0)(1,"h4"),Ve(2,"Preview QFS file"),j(),W(3,"mat-form-field",1)(4,"mat-label"),Ve(5,"Custom QFS path"),j(),De(6,"input",2,3),Ct(8,"async"),j(),W(9,"button",4),Ue("click",function(){an(r);const o=Ki(7);return zt(n.onQfsSelected(o.value))}),Ve(10,"LOAD"),j(),fe(11,Hme,1,1,"mat-spinner",5),Ct(12,"async"),j(),W(13,"div",6)(14,"div",7,8),De(16,"canvas",9,10),fe(18,Gme,1,0,"mat-spinner",11),Ct(19,"async"),j(),W(20,"div",12,8)(22,"mat-form-field",1)(23,"mat-label"),Ve(24,"Spline item"),j(),W(25,"input",13),Ue("ngModelChange",function(o){return n.selectedSplineIndex$.next(o)}),Ct(26,"async"),Ct(27,"async"),j()(),De(28,"app-tri-minimap",14),Ct(29,"async"),j()(),De(30,"app-compound-block-ui",15),Ct(31,"async")}if(2&e){let r;G(6),U("value",Tt(8,10,n.previewQfsLocation$)),G(5),U("ngIf",Tt(12,12,n.previewQfsLoading$)),G(7),U("ngIf",Tt(19,14,n.previewLoading$)),G(7),U("min",0)("max",4*(null==(r=Tt(26,16,n._resource$))?null:r.data.num_blocks)-1)("ngModel",Tt(27,18,n.selectedSplineIndex$)),G(3),U("roadSpline",n.roadSpline)("pointer",Tt(29,20,n.pointer$))("splineClosed",!0),G(2),U("resource",Tt(31,22,n._resource$))}},dependencies:[vi,gl,mu,tc,_u,gu,Kc,vl,Io,ic,ib,Jb,Jl,f$,pl],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}.qfsSelector[_ngcontent-%COMP%]{display:flex;align-items:center;width:100%;column-gap:1rem}.qfsSelector[_ngcontent-%COMP%] h4[_ngcontent-%COMP%]{min-width:-moz-fit-content;min-width:fit-content}.qfsSelector[_ngcontent-%COMP%] mat-form-field[_ngcontent-%COMP%]{flex-grow:1}.qfsSelector[_ngcontent-%COMP%] mat-spinner[_ngcontent-%COMP%], .qfsSelector[_ngcontent-%COMP%] button[_ngcontent-%COMP%]{margin-bottom:1.34375em}"],changeDetection:0}),i})();function jme(i,t){if(1&i&&(W(0,"mat-error"),Ve(1),j()),2&i){const e=he(2);G(1),tm(" ",e.resourceError.data.error_class,": ",e.resourceError.data.error_text," ")}}function Yme(i,t){1&i&&De(0,"mat-spinner",5)}function qme(i,t){if(1&i&&(W(0,"div",2),fe(1,jme,2,2,"mat-error",3),fe(2,Yme,1,0,"mat-spinner",4),j()),2&i){const e=he();G(1),U("ngIf",e.resourceError),G(1),U("ngIf",!e.resourceError)}}function Xme(i,t){}let t0=(()=>{class i{constructor(e){this.mainService=e,this._component=null,this._componentChangedSub=null,this.destroyed$=new Re,this.resourceSet$=new Re,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(He(this.destroyed$),He(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 Kme(i,t){1&i&&De(0,"mat-icon",17)}function Zme(i,t){1&i&&De(0,"mat-icon",18)}let Qme=(()=>{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 tt(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 tt(function*(){if(e.mainService.hasUnsavedChanges){let n=e.dialog.open(CV,{data:{text:"There are unsaved changes, which will be lost. Are you sure you want to reload file?"}});if(!(yield lR(n.afterClosed())))return}yield e.mainService.reloadResource(),e.cdr.markForCheck()})()}}return i.\u0275fac=function(e){return new(e||i)(E(Ql),E(Pa),E(Bm),E(IV),E(Zn))},i.\u0275cmp=ot({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&&(W(0,"mat-toolbar",0)(1,"span"),Ve(2),Ct(3,"async"),Ct(4,"async"),j(),De(5,"span",1),W(6,"button",2),Ue("click",function(){return n.toggleUnknownsVisibility()}),fe(7,Kme,1,0,"mat-icon",3),Ct(8,"async"),fe(9,Zme,1,0,"mat-icon",4),Ct(10,"async"),j(),De(11,"mat-divider",5)(12,"app-block-actions",6),Ct(13,"async"),W(14,"button",7),Ue("click",function(){return n.reloadResource()}),Ct(15,"async"),De(16,"mat-icon",8),j(),De(17,"mat-divider",5),W(18,"button",9),Ue("click",function(){return n.saveResource()}),Ct(19,"async"),Ct(20,"async"),De(21,"mat-icon",10),j()(),W(22,"div",11),De(23,"div",12)(24,"app-editor",13),Ct(25,"async"),Ct(26,"async"),Ct(27,"async"),W(28,"div",14)(29,"a",15),De(30,"img",16),j()(),De(31,"div",12),j()),2&e){let r;G(2),tm("",(null==(r=Tt(3,9,n.mainService.resource$))?null:r.name)||"...","",Tt(4,11,n.mainService.hasUnsavedChanges$)?"*":"",""),G(5),U("ngIf",Tt(8,13,n.mainService.hideHiddenFields$)),G(2),U("ngIf",!Tt(10,15,n.mainService.hideHiddenFields$)),G(3),U("resource",Tt(13,17,n.mainService.resource$)),G(2),U("disabled",!Tt(15,19,n.mainService.eelDelegate.openedResourcePath$)),G(4),U("disabled",!Tt(19,21,n.mainService.resource$)||!Tt(20,23,n.mainService.hasUnsavedChanges$)),G(6),U("resource",Tt(25,25,n.mainService.customActionRunning$)?null:Tt(26,27,n.mainService.resource$)||Tt(27,29,n.mainService.error$))("hideBlockActions",!0)}},dependencies:[vi,CJ,EJ,Os,XM,gR,t0,nE,pl],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 M$(i){return new pe(3e3,!1)}function Pge(){return typeof window<"u"&&typeof window.document<"u"}function wO(){return typeof process<"u"&&"[object process]"==={}.toString.call(process)}function Nu(i){switch(i.length){case 0:return new tb;case 1:return i[0];default:return new oV(i)}}function C$(i,t,e,n,r=new Map,s=new Map){const o=[],a=[];let l=-1,c=null;if(n.forEach(d=>{const h=d.get("offset"),p=h==l,m=p&&c||new Map;d.forEach((g,b)=>{let v=b,y=g;if("offset"!==b)switch(v=t.normalizePropertyName(v,o),y){case rR:y=r.get(b);break;case Xc: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 xge(i){return new pe(3502,!1)}();return a}function MO(i,t,e,n){switch(t){case"start":i.onStart(()=>n(e&&CO(e,"start",i)));break;case"done":i.onDone(()=>n(e&&CO(e,"done",i)));break;case"destroy":i.onDestroy(()=>n(e&&CO(e,"destroy",i)))}}function CO(i,t,e){const s=SO(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 SO(i,t,e,n,r="",s=0,o){return{element:i,triggerName:t,fromState:e,toState:n,phaseName:r,totalTime:s,disabled:!!o}}function sa(i,t,e){let n=i.get(t);return n||i.set(t,n=e),n}function S$(i){const t=i.indexOf(":");return[i.substring(1,t),i.slice(t+1)]}let EO=(i,t)=>!1,E$=(i,t,e)=>[],A$=null;function AO(i){const t=i.parentNode||i.host;return t===A$?null:t}(wO()||typeof Element<"u")&&(Pge()?(A$=(()=>document.documentElement)(),EO=(i,t)=>{for(;t;){if(t===i)return!0;t=AO(t)}return!1}):EO=(i,t)=>i.contains(t),E$=(i,t,e)=>{if(e)return Array.from(i.querySelectorAll(t));const n=i.querySelector(t);return n?[n]:[]});let Tf=null,D$=!1;const T$=EO,I$=E$;let R$=(()=>{class i{validateStyleProperty(e){return function Fge(i){Tf||(Tf=function Lge(){return typeof document<"u"?document.body:null}()||{},D$=!!Tf.style&&"WebkitAppearance"in Tf.style);let t=!0;return Tf.style&&!function Oge(i){return"ebkit"==i.substring(1,6)}(i)&&(t=i in Tf.style,!t&&D$&&(t="Webkit"+i.charAt(0).toUpperCase()+i.slice(1)in Tf.style)),t}(e)}matchesElement(e,n){return!1}containsElement(e,n){return T$(e,n)}getParentElement(e){return AO(e)}query(e,n,r){return I$(e,n,r)}computeStyle(e,n,r){return r||""}animate(e,n,r,s,o,a=[],l){return new tb(r,s)}}return i.\u0275fac=function(e){return new(e||i)},i.\u0275prov=ke({token:i,factory:i.\u0275fac}),i})(),DO=(()=>{class i{}return i.NOOP=new R$,i})();const Nge=1e3,TO="ng-enter",iE="ng-leave",rE="ng-trigger",sE=".ng-trigger",P$="ng-animating",IO=".ng-animating";function hd(i){if("number"==typeof i)return i;const t=i.match(/^(-?[\.\d]+)(m?s)/);return!t||t.length<2?0:RO(parseFloat(t[1]),t[2])}function RO(i,t){return"s"===t?i*Nge:i}function oE(i,t,e){return i.hasOwnProperty("duration")?i:function Uge(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(M$()),{duration:0,delay:0,easing:""};r=RO(parseFloat(a[1]),a[2]);const l=a[3];null!=l&&(s=RO(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 Jme(){return new pe(3100,!1)}()),a=!0),s<0&&(t.push(function ege(){return new pe(3101,!1)}()),a=!0),a&&t.splice(l,0,M$())}return{duration:r,delay:s,easing:o}}(i,t,e)}function n0(i,t={}){return Object.keys(i).forEach(e=>{t[e]=i[e]}),t}function O$(i){const t=new Map;return Object.keys(i).forEach(e=>{t.set(e,i[e])}),t}function Bu(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 L$(i,t,e){return e?t+":"+e+";":""}function N$(i){let t="";for(let e=0;e{const s=PO(r);e&&!e.has(r)&&e.set(r,i.style[s]),i.style[s]=n}),wO()&&N$(i))}function If(i,t){i.style&&(t.forEach((e,n)=>{const r=PO(n);i.style[r]=""}),wO()&&N$(i))}function r0(i){return Array.isArray(i)?1==i.length?i[0]:iV(i):i}const kO=new RegExp("{{\\s*(.+?)\\s*}}","g");function B$(i){let t=[];if("string"==typeof i){let e;for(;e=kO.exec(i);)t.push(e[1]);kO.lastIndex=0}return t}function s0(i,t,e){const n=i.toString(),r=n.replace(kO,(s,o)=>{let a=t[o];return null==a&&(e.push(function nge(i){return new pe(3003,!1)}()),a=""),a.toString()});return r==n?i:r}function aE(i){const t=[];let e=i.next();for(;!e.done;)t.push(e.value),e=i.next();return t}const Hge=/-+([a-z0-9])/g;function PO(i){return i.replace(Hge,(...t)=>t[1].toUpperCase())}function Gge(i){return i.replace(/([a-z])([A-Z])/g,"$1-$2").toLowerCase()}function oa(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 ige(i){return new pe(3004,!1)}()}}function U$(i,t){return window.getComputedStyle(i)[t]}const dE="*";function Xge(i,t){const e=[];return"string"==typeof i?i.split(/\s*,\s*/).forEach(n=>function Kge(i,t,e){if(":"==i[0]){const l=function Zge(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 gge(i){return new pe(3015,!1)}()),t;const r=n[1],s=n[2],o=n[3];t.push(V$(r,o));"<"==s[0]&&!(r==dE&&o==dE)&&t.push(V$(o,r))}(n,e,t)):e.push(i),e}const uE=new Set(["true","1"]),hE=new Set(["false","0"]);function V$(i,t){const e=uE.has(i)||hE.has(i),n=uE.has(t)||hE.has(t);return(r,s)=>{let o=i==dE||i==r,a=t==dE||t==s;return!o&&e&&"boolean"==typeof r&&(o=r?uE.has(i):hE.has(i)),!a&&n&&"boolean"==typeof s&&(a=s?uE.has(t):hE.has(t)),o&&a}}const Qge=new RegExp("s*:selfs*,?","g");function OO(i,t,e,n){return new Jge(i).build(t,e,n)}class Jge{constructor(t){this._driver=t}build(t,e,n){const r=new n_e(e);return this._resetContextStyleTimingState(r),oa(this,r0(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 sge(){return new pe(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(d=>{l.name=d,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 oge(){return new pe(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=>{B$(l).forEach(c=>{o.hasOwnProperty(c)||s.add(c)})})}),s.size&&(aE(s.values()),e.errors.push(function age(i,t){return new pe(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=oa(this,r0(t.animation),e);return{type:1,matchers:Xge(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=>oa(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=oa(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 r_e(i,t){if(i.hasOwnProperty("duration"))return i;if("number"==typeof i)return FO(oE(i,t).duration,0,"");const e=i;if(e.split(/\s+/).some(s=>"{"==s.charAt(0)&&"{"==s.charAt(1))){const s=FO(0,0,"");return s.dynamic=!0,s.strValue=e,s}const r=oE(e,t);return FO(r.duration,r.delay,r.easing)}(t.timings,e.errors);e.currentAnimateTimings=n;let r,s=t.styles?t.styles:si({});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=si(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===Xc?n.push(a):e.errors.push(new pe(3002,!1)):n.push(O$(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),d=c.get(l);let h=!0;d&&(s!=r&&s>=d.startTime&&r<=d.endTime&&(e.errors.push(function cge(i,t,e,n,r){return new pe(3010,!1)}()),h=!1),s=d.startTime),h&&c.set(l,{startTime:s,endTime:r}),e.options&&function zge(i,t,e){const n=t.params||{},r=B$(i);r.length&&r.forEach(s=>{n.hasOwnProperty(s)||e.push(function tge(i){return new pe(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 dge(){return new pe(3011,!1)}()),n;let s=0;const o=[];let a=!1,l=!1,c=0;const d=t.steps.map(y=>{const M=this._makeStyleAst(y,e);let x=null!=M.offset?M.offset:function i_e(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:oa(this,r0(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 e_e(i){const t=!!i.split(/\s*,\s*/).find(e=>":self"==e);return t&&(i=i.replace(Qge,"")),i=i.replace(/@\*/g,sE).replace(/@\w+/g,e=>sE+"-"+e.slice(1)).replace(/:animating/g,IO),[i,t]}(t.selector);e.currentQuerySelector=n.length?n+" "+s:s,sa(e.collectedStyles,e.currentQuerySelector,new Map);const a=oa(this,r0(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 pge(){return new pe(3013,!1)}());const n="full"===t.timings?{duration:0,delay:0,easing:"full"}:oE(t.timings,e.errors,!0);return{type:12,animation:oa(this,r0(t.animation),e),timings:n,options:null}}}class n_e{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=n0(i)).params&&(i.params=function t_e(i){return i?n0(i):null}(i.params)):i={},i}function FO(i,t,e){return{duration:i,delay:t,easing:e}}function LO(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 fE{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 a_e=new RegExp(":enter","g"),c_e=new RegExp(":leave","g");function NO(i,t,e,n,r,s=new Map,o=new Map,a,l,c=[]){return(new d_e).buildKeyframes(i,t,e,n,r,s,o,a,l,c)}class d_e{buildKeyframes(t,e,n,r,s,o,a,l,c,d=[]){c=c||new fE;const h=new BO(t,e,c,r,s,d,[]);h.options=l;const p=l.delay?hd(l.delay):0;h.currentTimeline.delayNextStep(p),h.currentTimeline.setStyles([o],null,h.errors,l),oa(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()):[LO(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:hd(s0(s,r?.params??{},e.errors));n.delayNextStep(o)}}}_visitSubInstructions(t,e,n){let s=e.currentTimeline.currentTime;const o=null!=n.duration?hd(n.duration):null,a=null!=n.delay?hd(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),oa(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=pE);const o=hd(s.delay);r.delayNextStep(o)}t.steps.length&&(t.steps.forEach(o=>oa(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?hd(t.options.delay):0;t.steps.forEach(o=>{const a=e.createSubContext(t.options);s&&a.delayNextStep(s),oa(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 oE(e.params?s0(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?hd(r.delay):0;s&&(6===e.previousNode.type||0==n&&e.currentTimeline.hasCurrentStyleProperties())&&(e.currentTimeline.snapshotCurrentStyles(),e.previousNode=pE);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,d)=>{e.currentQueryIndex=d;const h=e.createSubContext(t.options,c);s&&h.delayNextStep(s),c===e.element&&(l=h.currentTimeline),oa(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 d=e.currentTimeline;l&&d.delayNextStep(l);const h=d.currentTime;oa(this,t.animation,e),e.previousNode=t,n.currentStaggerTime=r.currentTime-h+(r.startTime-n.currentTimeline.startTime)}}const pE={};class BO{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=pE,this.subContextCount=0,this.options={},this.currentQueryIndex=0,this.currentQueryTotal=0,this.currentStaggerTime=0,this.currentTimeline=l||new mE(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=hd(n.duration)),null!=n.delay&&(r.delay=hd(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]=s0(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 BO(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=pE,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 u_e(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(a_e,"."+this._enterClassName)).replace(c_e,"."+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 mge(i){return new pe(3014,!1)}()),a}}class mE{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 mE(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||Xc),this._currentKeyframe.set(e,Xc);this._currentEmptyStepKeyframe=this._currentKeyframe}setStyles(t,e,n,r){e&&this._previousKeyframe.set("easing",e);const s=r&&r.params||{},o=function h_e(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,Xc)}else Bu(r,e)}),e}(t,this._globalTimelineStyles);for(let[a,l]of o){const c=s0(l,s,n);this._pendingStyles.set(a,c),this._localTimelineStyles.has(a)||this._backFill.set(a,this._globalTimelineStyles.get(a)??Xc),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=Bu(a,new Map,this._backFill);c.forEach((d,h)=>{d===rR?t.add(h):d===Xc&&e.add(h)}),n||c.set("offset",l/this.duration),r.push(c)});const s=t.size?aE(t.values()):[],o=e.size?aE(e.values()):[];if(n){const a=r[0],l=new Map(a);a.set("offset",0),l.set("offset",1),r=[a,l]}return LO(this.element,r,s,o,this.duration,this.startTime,this.easing,!1)}}class u_e extends mE{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=Bu(t[0]);l.set("offset",0),s.push(l);const c=Bu(t[0]);c.set("offset",G$(a)),s.push(c);const d=t.length-1;for(let h=1;h<=d;h++){let p=Bu(t[h]);const m=p.get("offset");p.set("offset",G$((e+m*n)/o)),s.push(p)}n=o,e=0,r="",t=s}return LO(this.element,t,this.preStyleProps,this.postStyleProps,n,e,r,!0)}}function G$(i,t=3){const e=Math.pow(10,t-1);return Math.round(i*e)/e}class UO{}const f_e=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 p_e extends UO{normalizePropertyName(t,e){return PO(t)}normalizeStyleValue(t,e,n,r){let s="";const o=n.toString().trim();if(f_e.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 rge(i,t){return new pe(3005,!1)}())}return o+s}}function $$(i,t,e,n,r,s,o,a,l,c,d,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:d,totalTime:h,errors:p}}const VO={};class W${constructor(t,e,n){this._triggerName=t,this.ast=e,this._stateStyles=n}match(t,e,n,r){return function m_e(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,d){const h=[],p=this.ast.options&&this.ast.options.params||VO,g=this.buildStyles(n,a&&a.params||VO,h),b=l&&l.params||VO,v=this.buildStyles(r,b,h),y=new Set,M=new Map,x=new Map,C="void"===r,F={params:g_e(b,p),delay:this.ast.options?.delay},D=d?[]:NO(t,e,this.ast.animation,s,o,g,v,F,c,h);let k=0;if(D.forEach(T=>{k=Math.max(T.duration+T.delay,k)}),h.length)return $$(e,this._triggerName,n,r,C,g,v,[],[],M,x,k,h);D.forEach(T=>{const A=T.element,$=sa(M,A,new Set);T.preStyleProps.forEach(ne=>$.add(ne));const ie=sa(x,A,new Set);T.postStyleProps.forEach(ne=>ie.add(ne)),A!==e&&y.add(A)});const B=aE(y.values());return $$(e,this._triggerName,n,r,C,g,v,D,B,M,x,k)}}function g_e(i,t){const e=n0(t);for(const n in i)i.hasOwnProperty(n)&&null!=i[n]&&(e[n]=i[n]);return e}class __e{constructor(t,e,n){this.styles=t,this.defaultParams=e,this.normalizer=n}buildStyles(t,e){const n=new Map,r=n0(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=s0(o,r,e));const l=this.normalizer.normalizePropertyName(a,e);o=this.normalizer.normalizeStyleValue(a,l,o,e),n.set(a,o)})}),n}}class y_e{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 __e(r.style,r.options&&r.options.params||{},n))}),j$(this.states,"true","1"),j$(this.states,"false","0"),e.transitions.forEach(r=>{this.transitionFactories.push(new W$(t,r,this.states))}),this.fallbackTransition=function b_e(i,t,e){return new W$(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 j$(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 x_e=new fE;class w_e{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=OO(this._driver,e,n,r);if(n.length)throw function wge(i){return new pe(3503,!1)}();this._animations.set(t,s)}_buildPlayer(t,e,n){const r=t.element,s=C$(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=NO(this._driver,e,s,TO,iE,new Map,new Map,n,x_e,r),o.forEach(d=>{const h=sa(a,d.element,new Map);d.postStyleProps.forEach(p=>h.set(p,null))})):(r.push(function Mge(){return new pe(3300,!1)}()),o=[]),r.length)throw function Cge(i){return new pe(3504,!1)}();a.forEach((d,h)=>{d.forEach((p,m)=>{d.set(m,this._driver.computeStyle(h,m,Xc))})});const c=Nu(o.map(d=>{const h=a.get(d.element);return this._buildPlayer(d,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 Sge(i){return new pe(3301,!1)}();return e}listen(t,e,n,r){const s=SO(e,"","","");return MO(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 Y$="ng-animate-queued",zO="ng-animate-disabled",A_e=[],q$={namespaceId:"",setForRemoval:!1,setForMove:!1,hasAnimation:!1,removedBeforeQueried:!1},D_e={namespaceId:"",setForMove:!1,setForRemoval:!1,hasAnimation:!1,removedBeforeQueried:!0},Ua="__ng_removed";class HO{get params(){return this.options.params}constructor(t,e=""){this.namespaceId=e;const n=t&&t.hasOwnProperty("value");if(this.value=function k_e(i){return i??null}(n?t.value:t),n){const s=n0(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 o0="void",GO=new HO(o0);class T_e{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,Va(e,this._hostClassName)}listen(t,e,n,r){if(!this._triggers.has(e))throw function Ege(i,t){return new pe(3302,!1)}();if(null==n||0==n.length)throw function Age(i){return new pe(3303,!1)}();if(!function P_e(i){return"start"==i||"done"==i}(n))throw function Dge(i,t){return new pe(3400,!1)}();const s=sa(this._elementListeners,t,[]),o={name:e,phase:n,callback:r};s.push(o);const a=sa(this._engine.statesByElement,t,new Map);return a.has(e)||(Va(t,rE),Va(t,rE+"-"+e),a.set(e,GO)),()=>{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 Tge(i){return new pe(3401,!1)}();return e}trigger(t,e,n,r=!0){const s=this._getTrigger(e),o=new $O(this.id,e,t);let a=this._engine.statesByElement.get(t);a||(Va(t,rE),Va(t,rE+"-"+e),this._engine.statesByElement.set(t,a=new Map));let l=a.get(e);const c=new HO(n,this.id);if(!(n&&n.hasOwnProperty("value"))&&l&&c.absorbOptions(l.options),a.set(e,c),l||(l=GO),c.value!==o0&&l.value===c.value){if(!function L_e(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),hc(t,y)})}return}const p=sa(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||(Va(t,Y$),o.onStart(()=>{Yg(t,Y$)})),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,sE,!0);n.forEach(r=>{if(r[Ua])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 d=this.trigger(t,c,o0,r);d&&a.push(d)}}),a.length)return this._engine.markElementAsRemoved(this.id,t,!0,e,o),n&&Nu(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)||GO,d=new HO(o0),h=new $O(this.id,o,t);this._engine.totalQueuedPlayers++,this._queue.push({element:t,triggerName:o,transition:l,fromState:c,toState:d,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[Ua];(!s||s===q$)&&(n.afterFlush(()=>this.clearElementCache(t)),n.destroyInnerAnimations(t),n._onRemovalComplete(t,e))}}insertNode(t,e){Va(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=SO(s,n.triggerName,n.fromState.value,n.toState.value);l._data=t,MO(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 I_e{_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 T_e(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(gE(e)){const s=this._fetchNamespace(t);if(s)return s.trigger(e,n,r),!0}return!1}insertNode(t,e,n,r){if(!gE(e))return;const s=e[Ua];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),Va(t,zO)):this.disabledNodes.has(t)&&(this.disabledNodes.delete(t),Yg(t,zO))}removeNode(t,e,n,r){if(gE(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[Ua]={namespaceId:t,setForRemoval:r,hasAnimation:n,removedBeforeQueried:!1,previousTriggersValues:s}}listen(t,e,n,r,s){return gE(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,sE,!0);e.forEach(n=>this.destroyActiveAnimationsForElement(n)),0!=this.playersByQueriedElement.size&&(e=this.driver.query(t,IO,!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 Nu(this.players).onDone(()=>t());t()})}processLeaveNode(t){const e=t[Ua];if(e&&e.setForRemoval){if(t[Ua]=q$,e.namespaceId){this.destroyInnerAnimations(t);const n=this._fetchNamespace(e.namespaceId);n&&n.clearElementCache(t)}this._onRemovalComplete(t,e.setForRemoval)}t.classList?.contains(zO)&&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?Nu(e).onDone(()=>{n.forEach(r=>r())}):n.forEach(r=>r())}}reportError(t){throw function Ige(i){return new pe(3402,!1)}()}_flushAnimations(t,e){const n=new fE,r=[],s=new Map,o=[],a=new Map,l=new Map,c=new Map,d=new Set;this.disabledNodes.forEach(q=>{d.add(q);const re=this.driver.query(q,".ng-animate-queued",!0);for(let J=0;J{const J=TO+b++;g.set(re,J),q.forEach(we=>Va(we,J))});const v=[],y=new Set,M=new Set;for(let q=0;qy.add(we)):M.add(re))}const x=new Map,C=Z$(p,Array.from(y));C.forEach((q,re)=>{const J=iE+b++;x.set(re,J),q.forEach(we=>Va(we,J))}),t.push(()=>{m.forEach((q,re)=>{const J=g.get(re);q.forEach(we=>Yg(we,J))}),C.forEach((q,re)=>{const J=x.get(re);q.forEach(we=>Yg(we,J))}),v.forEach(q=>{this.processLeaveNode(q)})});const F=[],D=[];for(let q=this._namespaceList.length-1;q>=0;q--)this._namespaceList[q].drainQueuedTransitions(e).forEach(J=>{const we=J.player,Ne=J.element;if(F.push(we),this.collectedEnterElements.length){const Fe=Ne[Ua];if(Fe&&Fe.setForMove){if(Fe.previousTriggersValues&&Fe.previousTriggersValues.has(J.triggerName)){const bt=Fe.previousTriggersValues.get(J.triggerName),St=this.statesByElement.get(J.element);if(St&&St.has(J.triggerName)){const Mt=St.get(J.triggerName);Mt.value=bt,St.set(J.triggerName,Mt)}}return void we.destroy()}}const Ye=!h||!this.driver.containsElement(h,Ne),It=x.get(Ne),en=g.get(Ne),ae=this._buildInstruction(J,n,en,It,Ye);if(ae.errors&&ae.errors.length)return void D.push(ae);if(Ye)return we.onStart(()=>If(Ne,ae.fromStyles)),we.onDestroy(()=>hc(Ne,ae.toStyles)),void r.push(we);if(J.isFallbackTransition)return we.onStart(()=>If(Ne,ae.fromStyles)),we.onDestroy(()=>hc(Ne,ae.toStyles)),void r.push(we);const Oe=[];ae.timelines.forEach(Fe=>{Fe.stretchStartingKeyframe=!0,this.disabledNodes.has(Fe.element)||Oe.push(Fe)}),ae.timelines=Oe,n.append(Ne,ae.timelines),o.push({instruction:ae,player:we,element:Ne}),ae.queriedElements.forEach(Fe=>sa(a,Fe,[]).push(we)),ae.preStyleProps.forEach((Fe,bt)=>{if(Fe.size){let St=l.get(bt);St||l.set(bt,St=new Set),Fe.forEach((Mt,Sn)=>St.add(Sn))}}),ae.postStyleProps.forEach((Fe,bt)=>{let St=c.get(bt);St||c.set(bt,St=new Set),Fe.forEach((Mt,Sn)=>St.add(Sn))})});if(D.length){const q=[];D.forEach(re=>{q.push(function Rge(i,t){return new pe(3505,!1)}())}),F.forEach(re=>re.destroy()),this.reportError(q)}const k=new Map,B=new Map;o.forEach(q=>{const re=q.element;n.has(re)&&(B.set(re,re),this._beforeAnimationBuild(q.player.namespaceId,q.instruction,k))}),r.forEach(q=>{const re=q.element;this._getPreviousPlayers(re,!1,q.namespaceId,q.triggerName,null).forEach(we=>{sa(k,re,[]).push(we),we.destroy()})});const T=v.filter(q=>J$(q,l,c)),A=new Map;K$(A,this.driver,M,c,Xc).forEach(q=>{J$(q,l,c)&&T.push(q)});const ie=new Map;m.forEach((q,re)=>{K$(ie,this.driver,new Set(q),l,rR)}),T.forEach(q=>{const re=A.get(q),J=ie.get(q);A.set(q,new Map([...Array.from(re?.entries()??[]),...Array.from(J?.entries()??[])]))});const ne=[],se=[],ge={};o.forEach(q=>{const{element:re,player:J,instruction:we}=q;if(n.has(re)){if(d.has(re))return J.onDestroy(()=>hc(re,we.toStyles)),J.disabled=!0,J.overrideTotalTime(we.totalTime),void r.push(J);let Ne=ge;if(B.size>1){let It=re;const en=[];for(;It=It.parentNode;){const ae=B.get(It);if(ae){Ne=ae;break}en.push(It)}en.forEach(ae=>B.set(ae,Ne))}const Ye=this._buildAnimation(J.namespaceId,we,k,s,ie,A);if(J.setRealPlayer(Ye),Ne===ge)ne.push(J);else{const It=this.playersByElement.get(Ne);It&&It.length&&(J.parentPlayer=Nu(It)),r.push(J)}}else If(re,we.fromStyles),J.onDestroy(()=>hc(re,we.toStyles)),se.push(J),d.has(re)&&r.push(J)}),se.forEach(q=>{const re=s.get(q.element);if(re&&re.length){const J=Nu(re);q.setRealPlayer(J)}}),r.forEach(q=>{q.parentPlayer?q.syncPlayerEvents(q.parentPlayer):q.destroy()});for(let q=0;q!Ye.destroyed);Ne.length?O_e(this,re,Ne):this.processLeaveNode(re)}return v.length=0,ne.forEach(q=>{this.players.push(q),q.onDone(()=>{q.destroy();const re=this.players.indexOf(q);this.players.splice(re,1)}),q.play()}),ne}elementContainsData(t,e){let n=!1;const r=e[Ua];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==o0;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,d=c!==s,h=sa(n,c,[]);this._getPreviousPlayers(c,d,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=[],d=new Set,h=new Set,p=e.timelines.map(g=>{const b=g.element;d.add(b);const v=b[Ua];if(v&&v.removedBeforeQueried)return new tb(g.duration,g.delay);const y=b!==l,M=function F_e(i){const t=[];return Q$(i,t),t}((n.get(b)||A_e).map(k=>k.getRealPlayer())).filter(k=>!!k.element&&k.element===b),x=s.get(b),C=o.get(b),F=C$(0,this._normalizer,0,g.keyframes,x,C),D=this._buildPlayer(g,F,M);if(g.subTimeline&&r&&h.add(b),y){const k=new $O(t,a,b);k.setRealPlayer(D),c.push(k)}return D});c.forEach(g=>{sa(this.playersByQueriedElement,g.element,[]).push(g),g.onDone(()=>function R_e(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))}),d.forEach(g=>Va(g,P$));const m=Nu(p);return m.onDestroy(()=>{d.forEach(g=>Yg(g,P$)),hc(l,e.toStyles)}),h.forEach(g=>{sa(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 tb(t.duration,t.delay)}}class $O{constructor(t,e,n){this.namespaceId=t,this.triggerName=e,this.element=n,this._player=new tb,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=>MO(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){sa(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 gE(i){return i&&1===i.nodeType}function X$(i,t){const e=i.style.display;return i.style.display=t??"none",e}function K$(i,t,e,n,r){const s=[];e.forEach(l=>s.push(X$(l)));const o=[];n.forEach((l,c)=>{const d=new Map;l.forEach(h=>{const p=t.computeStyle(c,h,r);d.set(h,p),(!p||0==p.length)&&(c[Ua]=D_e,o.push(c))}),i.set(c,d)});let a=0;return e.forEach(l=>X$(l,s[a++])),o}function Z$(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 Va(i,t){i.classList?.add(t)}function Yg(i,t){i.classList?.remove(t)}function O_e(i,t,e){Nu(e).onDone(()=>i.processLeaveNode(t))}function Q$(i,t){for(let e=0;er.add(s)):t.set(i,n),e.delete(i),!0}class _E{constructor(t,e,n){this.bodyNode=t,this._driver=e,this._normalizer=n,this._triggerCache={},this.onRemovalComplete=(r,s)=>{},this._transitionEngine=new I_e(t,e,n),this._timelineEngine=new w_e(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=[],d=OO(this._driver,s,l,c);if(l.length)throw function bge(i,t){return new pe(3404,!1)}();a=function v_e(i,t,e){return new y_e(i,t,e)}(r,d,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]=S$(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]=S$(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 B_e=(()=>{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&&hc(this._element,this._startStyles,this._initialStyles),this._state=1)}finish(){this.start(),this._state<2&&(hc(this._element,this._initialStyles),this._endStyles&&(hc(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),hc(this._element,this._initialStyles),this._state=3)}}return i.initialStylesByElement=new WeakMap,i})();function WO(i){let t=null;return i.forEach((e,n)=>{(function U_e(i){return"display"===i||"position"===i})(n)&&(t=t||new Map,t.set(n,e))}),t}class e8{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:U$(this.element,r))}),this.currentSnapshot=t}triggerCallback(t){const e="start"===t?this._onStartFns:this._onDoneFns;e.forEach(n=>n()),e.length=0}}class V_e{validateStyleProperty(t){return!0}validateAnimatableStyleProperty(t){return!0}matchesElement(t,e){return!1}containsElement(t,e){return T$(t,e)}getParentElement(t){return AO(t)}query(t,e,n){return I$(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,d=o.filter(m=>m instanceof e8);(function $ge(i,t){return 0===i||0===t})(n,r)&&d.forEach(m=>{m.currentSnapshot.forEach((g,b)=>c.set(b,g))});let h=function Vge(i){return i.length?i[0]instanceof Map?i:i.map(t=>O$(t)):[]}(e).map(m=>Bu(m));h=function Wge(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,U$(i,a)))}}return t}(t,h,c);const p=function N_e(i,t){let e=null,n=null;return Array.isArray(t)&&t.length?(e=WO(t[0]),t.length>1&&(n=WO(t[t.length-1]))):t instanceof Map&&(e=WO(t)),e||n?new B_e(i,e,n):null}(t,h);return new e8(t,h,l,p)}}let z_e=(()=>{class i extends tV{constructor(e,n){super(),this._nextAnimationId=0,this._renderer=e.createRenderer(n.body,{id:"0",encapsulation:Xs.None,styles:[],data:{animation:[]}})}build(e){const n=this._nextAnimationId.toString();this._nextAnimationId++;const r=Array.isArray(e)?iV(e):e;return t8(this._renderer,null,n,"register",[r]),new H_e(n,this._renderer)}}return i.\u0275fac=function(e){return new(e||i)(ee(Gl),ee(jt))},i.\u0275prov=ke({token:i,factory:i.\u0275fac}),i})();class H_e extends LQ{constructor(t,e){super(),this._id=t,this._renderer=e}create(t,e){return new G_e(this._id,t,e||{},this._renderer)}}class G_e{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 t8(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 t8(i,t,e,n,r){return i.setProperty(t,`@@${e}:${n}`,r)}const n8="@.disabled";let $_e=(()=>{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 d=this._rendererCache.get(s);return d||(d=new i8("",s,this.engine,()=>this._rendererCache.delete(s)),this._rendererCache.set(s,d)),d}const o=n.id,a=n.id+"-"+this._currentId;this._currentId++,this.engine.register(a,e);const l=d=>{Array.isArray(d)?d.forEach(l):this.engine.registerTrigger(o,a,e,d.name,d)};return n.data.animation.forEach(l),new W_e(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)(ee(Gl),ee(_E),ee(ft))},i.\u0275prov=ke({token:i,factory:i.\u0275fac}),i})();class i8{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==n8?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 W_e extends i8{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==n8?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 j_e(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 Y_e(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 r8=[{provide:tV,useClass:z_e},{provide:UO,useFactory:function X_e(){return new p_e}},{provide:_E,useClass:(()=>{class i extends _E{constructor(e,n,r,s){super(e.body,n,r)}ngOnDestroy(){this.flush()}}return i.\u0275fac=function(e){return new(e||i)(ee(jt),ee(DO),ee(UO),ee(dm))},i.\u0275prov=ke({token:i,factory:i.\u0275fac}),i})()},{provide:Gl,useFactory:function K_e(i,t,e){return new $_e(i,t,e)},deps:[aM,_E,ft]}],jO=[{provide:DO,useFactory:()=>new V_e},{provide:Rr,useValue:"BrowserAnimations"},...r8],s8=[{provide:DO,useClass:R$},{provide:Rr,useValue:"NoopAnimations"},...r8];let Z_e=(()=>{class i{static withConfig(e){return{ngModule:i,providers:e.disableAnimations?s8:jO}}}return i.\u0275fac=function(e){return new(e||i)},i.\u0275mod=nn({type:i}),i.\u0275inj=Kt({providers:jO,imports:[FB]}),i})();const o8=new me("CdkAccordion");let Q_e=0,J_e=(()=>{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=Zt.EMPTY,this.closed=new We,this.opened=new We,this.destroyed=new We,this.expandedChange=new We,this.id="cdk-accordion-child-"+Q_e++,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)(E(o8,12),E(Zn),E(GR))},i.\u0275dir=ve({type:i,selectors:[["cdk-accordion-item"],["","cdkAccordionItem",""]],inputs:{expanded:"expanded",disabled:"disabled"},outputs:{closed:"closed",opened:"opened",destroyed:"destroyed",expandedChange:"expandedChange"},exportAs:["cdkAccordionItem"],features:[Dn([{provide:o8,useValue:void 0}])]}),i})(),eve=(()=>{class i{}return i.\u0275fac=function(e){return new(e||i)},i.\u0275mod=nn({type:i}),i.\u0275inj=Kt({}),i})();const tve=["body"];function nve(i,t){}const ive=[[["mat-expansion-panel-header"]],"*",[["mat-action-row"]]],rve=["mat-expansion-panel-header","*","mat-action-row"];function sve(i,t){1&i&&De(0,"span",2),2&i&&U("@indicatorRotate",he()._getExpandedState())}const ove=[[["mat-panel-title"]],[["mat-panel-description"]],"*"],ave=["mat-panel-title","mat-panel-description","*"],a8=new me("MAT_ACCORDION"),l8="225ms cubic-bezier(0.4,0.0,0.2,1)",c8={indicatorRotate:ka("indicatorRotate",[Ps("collapsed, void",si({transform:"rotate(0deg)"})),Ps("expanded",si({transform:"rotate(180deg)"})),Pr("expanded <=> collapsed, void => collapsed",jr(l8))]),bodyExpansion:ka("bodyExpansion",[Ps("collapsed, void",si({height:"0px",visibility:"hidden"})),Ps("expanded",si({height:"*",visibility:"visible"})),Pr("expanded <=> collapsed, void => collapsed",jr(l8))])},d8=new me("MAT_EXPANSION_PANEL");let lve=(()=>{class i{constructor(e,n){this._template=e,this._expansionPanel=n}}return i.\u0275fac=function(e){return new(e||i)(E(Co),E(d8,8))},i.\u0275dir=ve({type:i,selectors:[["ng-template","matExpansionPanelContent",""]]}),i})(),cve=0;const u8=new me("MAT_EXPANSION_PANEL_DEFAULT_OPTIONS");let h8=(()=>{class i extends J_e{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 We,this.afterCollapse=new We,this._inputChanges=new Re,this._headerId="mat-expansion-panel-header-"+cve++,this._bodyAnimationDone=new Re,this.accordion=e,this._document=o,this._bodyAnimationDone.pipe(Zl((c,d)=>c.fromState===d.fromState&&c.toState===d.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(Do(null),gn(()=>this.expanded&&!this._portal),Pi(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)(E(a8,12),E(Zn),E(GR),E(Wr),E(jt),E(Rr,8),E(u8,8))},i.\u0275cmp=ot({type:i,selectors:[["mat-expansion-panel"]],contentQueries:function(e,n,r){if(1&e&&$i(r,lve,5),2&e){let s;Et(s=At())&&(n._lazyContent=s.first)}},viewQuery:function(e,n){if(1&e&&Wn(tve,5),2&e){let r;Et(r=At())&&(n._body=r.first)}},hostAttrs:[1,"mat-expansion-panel"],hostVars:6,hostBindings:function(e,n){2&e&&un("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:[Dn([{provide:a8,useValue:void 0},{provide:d8,useExisting:i}]),lt,bi],ngContentSelectors:rve,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&&(sr(ive),Wt(0),W(1,"div",0,1),Ue("@bodyExpansion.done",function(s){return n._bodyAnimationDone.next(s)}),W(3,"div",2),Wt(4,1),fe(5,nve,0,0,"ng-template",3),j(),Wt(6,2),j()),2&e&&(G(1),U("@bodyExpansion",n._getExpandedState())("id",n.id),Dt("aria-labelledby",n._headerId),G(4),U("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:[c8.bodyExpansion]},changeDetection:0}),i})();class dve{}const uve=JI(dve);let hve=(()=>{class i extends uve{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=Zt.EMPTY;const c=e.accordion?e.accordion._stateChanges.pipe(gn(d=>!(!d.hideToggle&&!d.togglePosition))):mo;this.tabIndex=parseInt(l||"")||0,this._parentChangeSubscription=Mr(e.opened,e.closed,c,e._inputChanges.pipe(gn(d=>!!(d.hideToggle||d.disabled||d.togglePosition)))).subscribe(()=>this._changeDetectorRef.markForCheck()),e.closed.pipe(gn(()=>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:Ko(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)(E(h8,1),E(mt),E(qc),E(Zn),E(u8,8),E(Rr,8),ba("tabindex"))},i.\u0275cmp=ot({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&&Ue("click",function(){return n._toggle()})("keydown",function(s){return n._keydown(s)}),2&e&&(Dt("id",n.panel._headerId)("tabindex",n.tabIndex)("aria-controls",n._getPanelId())("aria-expanded",n._isExpanded())("aria-disabled",n.panel.disabled),Yo("height",n._getHeaderHeight()),un("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:[lt],ngContentSelectors:ave,decls:5,vars:3,consts:[[1,"mat-content"],["class","mat-expansion-indicator",4,"ngIf"],[1,"mat-expansion-indicator"]],template:function(e,n){1&e&&(sr(ove),W(0,"span",0),Wt(1),Wt(2,1),Wt(3,2),j(),fe(4,sve,1,1,"span",1)),2&e&&(un("mat-content-hide-toggle",!n._showToggle()),G(4),U("ngIf",n._showToggle()))},dependencies:[vi],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:[c8.indicatorRotate]},changeDetection:0}),i})(),fve=(()=>{class i{}return i.\u0275fac=function(e){return new(e||i)},i.\u0275dir=ve({type:i,selectors:[["mat-panel-description"]],hostAttrs:[1,"mat-expansion-panel-header-description"]}),i})(),pve=(()=>{class i{}return i.\u0275fac=function(e){return new(e||i)},i.\u0275dir=ve({type:i,selectors:[["mat-panel-title"]],hostAttrs:[1,"mat-expansion-panel-header-title"]}),i})(),mve=(()=>{class i{}return i.\u0275fac=function(e){return new(e||i)},i.\u0275mod=nn({type:i}),i.\u0275inj=Kt({imports:[Ao,Qn,eve,Nh]}),i})();function gve(i,t){if(1&i&&(W(0,"mat-option",19),Ve(1),j()),2&i){const e=t.$implicit;U("value",e),G(1),Zi(" ",e," ")}}function _ve(i,t){if(1&i){const e=di();W(0,"mat-form-field",16)(1,"mat-select",17),Ue("selectionChange",function(r){return an(e),zt(he(2)._changePageSize(r.value))}),fe(2,gve,2,2,"mat-option",18),j()()}if(2&i){const e=he(2);U("appearance",e._formFieldAppearance)("color",e.color),G(1),U("value",e.pageSize)("disabled",e.disabled)("aria-labelledby",e._pageSizeLabelId)("panelClass",e.selectConfig.panelClass||"")("disableOptionCentering",e.selectConfig.disableOptionCentering),G(1),U("ngForOf",e._displayedPageSizeOptions)}}function vve(i,t){if(1&i&&(W(0,"div",20),Ve(1),j()),2&i){const e=he(2);G(1),_i(e.pageSize)}}function yve(i,t){if(1&i&&(W(0,"div",12)(1,"div",13),Ve(2),j(),fe(3,_ve,3,8,"mat-form-field",14),fe(4,vve,2,1,"div",15),j()),2&i){const e=he();G(1),B1("id",e._pageSizeLabelId),G(1),Zi(" ",e._intl.itemsPerPageLabel," "),G(1),U("ngIf",e._displayedPageSizeOptions.length>1),G(1),U("ngIf",e._displayedPageSizeOptions.length<=1)}}function bve(i,t){if(1&i){const e=di();W(0,"button",21),Ue("click",function(){return an(e),zt(he().firstPage())}),Ri(),W(1,"svg",7),De(2,"path",22),j()()}if(2&i){const e=he();U("matTooltip",e._intl.firstPageLabel)("matTooltipDisabled",e._previousButtonsDisabled())("matTooltipPosition","above")("disabled",e._previousButtonsDisabled()),Dt("aria-label",e._intl.firstPageLabel)}}function xve(i,t){if(1&i){const e=di();Ri(),_a(),W(0,"button",23),Ue("click",function(){return an(e),zt(he().lastPage())}),Ri(),W(1,"svg",7),De(2,"path",24),j()()}if(2&i){const e=he();U("matTooltip",e._intl.lastPageLabel)("matTooltipDisabled",e._nextButtonsDisabled())("matTooltipPosition","above")("disabled",e._nextButtonsDisabled()),Dt("aria-label",e._intl.lastPageLabel)}}let yE=(()=>{class i{constructor(){this.changes=new Re,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=ke({token:i,factory:i.\u0275fac,providedIn:"root"}),i})();const Mve={provide:yE,deps:[[new Ss,new wa,yE]],useFactory:function wve(i){return i||new yE}},Sve=new me("MAT_PAGINATOR_DEFAULT_OPTIONS"),Eve=jM(CQ(class{}));let Ave=(()=>{class i extends Eve{get pageIndex(){return this._pageIndex}set pageIndex(e){this._pageIndex=Math.max(ks(e),0),this._changeDetectorRef.markForCheck()}get length(){return this._length}set length(e){this._length=ks(e),this._changeDetectorRef.markForCheck()}get pageSize(){return this._pageSize}set pageSize(e){this._pageSize=Math.max(ks(e),0),this._updateDisplayedPageSizeOptions()}get pageSizeOptions(){return this._pageSizeOptions}set pageSizeOptions(e){this._pageSizeOptions=(e||[]).map(n=>ks(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 We,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){wo()},i.\u0275dir=ve({type:i,inputs:{color:"color",pageIndex:"pageIndex",length:"length",pageSize:"pageSize",pageSizeOptions:"pageSizeOptions",hidePageSize:"hidePageSize",showFirstLastButtons:"showFirstLastButtons",selectConfig:"selectConfig"},outputs:{page:"page"},features:[lt]}),i})(),Dve=0,Tve=(()=>{class i extends Ave{constructor(e,n,r){super(e,n,r),this._pageSizeLabelId="mat-paginator-page-size-label-"+Dve++,this._formFieldAppearance=r?.formFieldAppearance||"outline"}}return i.\u0275fac=function(e){return new(e||i)(E(yE),E(Zn),E(Sve,8))},i.\u0275cmp=ot({type:i,selectors:[["mat-paginator"]],hostAttrs:["role","group",1,"mat-mdc-paginator"],inputs:{disabled:"disabled"},exportAs:["matPaginator"],features:[lt],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&&(W(0,"div",0)(1,"div",1),fe(2,yve,5,4,"div",2),W(3,"div",3)(4,"div",4),Ve(5),j(),fe(6,bve,3,5,"button",5),W(7,"button",6),Ue("click",function(){return n.previousPage()}),Ri(),W(8,"svg",7),De(9,"path",8),j()(),_a(),W(10,"button",9),Ue("click",function(){return n.nextPage()}),Ri(),W(11,"svg",7),De(12,"path",10),j()(),fe(13,xve,3,5,"button",11),j()()()),2&e&&(G(2),U("ngIf",!n.hidePageSize),G(3),Zi(" ",n._intl.getRangeLabel(n.pageIndex,n.pageSize,n.length)," "),G(1),U("ngIf",n.showFirstLastButtons),G(1),U("matTooltip",n._intl.previousPageLabel)("matTooltipDisabled",n._previousButtonsDisabled())("matTooltipPosition","above")("disabled",n._previousButtonsDisabled()),Dt("aria-label",n._intl.previousPageLabel),G(3),U("matTooltip",n._intl.nextPageLabel)("matTooltipDisabled",n._nextButtonsDisabled())("matTooltipPosition","above")("disabled",n._nextButtonsDisabled()),Dt("aria-label",n._intl.nextPageLabel),G(3),U("ngIf",n.showFirstLastButtons))},dependencies:[Eo,vi,XM,vl,fb,Nm,Os],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})(),Ive=(()=>{class i{}return i.\u0275fac=function(e){return new(e||i)},i.\u0275mod=nn({type:i}),i.\u0275inj=Kt({providers:[Mve],imports:[Ao,KM,VH,FV]}),i})(),Rve=(()=>{class i{}return i.\u0275fac=function(e){return new(e||i)},i.\u0275mod=nn({type:i,bootstrap:[Qme]}),i.\u0275inj=Kt({providers:[Ql,NH,{provide:PH,useValue:Vie}],imports:[FB,wK,Z_e,eH,SJ,gC,pH,mve,DV,RV,FV,KM,ez,Ive,sse,_H,VH,_V,bpe,xme,tH,tR,Yie]}),i})();th(Jl,[Eo,vi,Os,t0,nE],[pl]),th(zR,[hm,Eo,vi,xy,tc,Kc,vl,h8,hve,pve,fve,Os,Tve,fb,Nm,t0],[]),th(xC,[Eo,vi,MC,wC,gH,t0],[]),th(_$,[Eo,vi,Io,Os,fb,Nm,t0,nE],[pl]),L7().bootstrapModule(Rve).catch(i=>console.error(i))},489:function(No,Gs,ps){var cn;No=ps.nmd(No),function(){var V,Kr=200,Un="Expected a function",Ha="__lodash_hash_undefined__",Mi="__lodash_placeholder__",Ci=1,ms=2,Ws=4,js=1,Bo=2,On=1,dr=2,pc=4,ca=8,Dl=16,da=32,Tl=64,Ga=128,ua=256,pd=512,ME=800,Kg=16,In=1/0,Wa=9007199254740991,SE=17976931348623157e292,Pf=NaN,ha=4294967295,Re=ha-1,l0=ha>>>1,c0=[["ary",Ga],["bind",On],["bindKey",dr],["curry",ca],["curryRight",Dl],["flip",pd],["partial",da],["partialRight",Tl],["rearg",ua]],ti="[object Arguments]",Yn="[object Array]",EE="[object AsyncFunction]",et="[object Boolean]",mc="[object Date]",AE="[object DOMException]",md="[object Error]",Of="[object Function]",d0="[object GeneratorFunction]",Uo="[object Map]",Vu="[object Number]",DE="[object Null]",ja="[object Object]",u0="[object Promise]",TE="[object Proxy]",gd="[object RegExp]",Vo="[object Set]",gc="[object String]",Ff="[object Symbol]",Zg="[object Undefined]",_d="[object WeakMap]",zu="[object ArrayBuffer]",vd="[object DataView]",fa="[object Float32Array]",Lf="[object Float64Array]",Qg="[object Int8Array]",Nf="[object Int16Array]",Jg="[object Int32Array]",e_="[object Uint8Array]",Hu="[object Uint8ClampedArray]",t_="[object Uint16Array]",n_="[object Uint32Array]",RE=/\b__p \+= '';/g,kE=/\b(__p \+=) '' \+/g,PE=/(__e\(.*?\)|\b__t\)) \+\n'';/g,h0=/&(?:amp|lt|gt|quot|#39);/g,f0=/[&<>"']/g,OE=RegExp(h0.source),FE=RegExp(f0.source),ZO=/<%-([\s\S]+?)%>/g,i_=/<%([\s\S]+?)%>/g,r_=/<%=([\s\S]+?)%>/g,p0=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,m0=/^\w*$/,g0=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,s_=/[\\^$.*+?()[\]{}|]/g,_0=RegExp(s_.source),Bf=/^\s+/,v0=/\s/,y0=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,wr=/\{\n\/\* \[wrapped with (.+)\] \*/,LE=/,? & /,NE=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,BE=/[()=,{}\[\]\/\s]/,UE=/\\(\\)?/g,b0=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,x0=/\w*$/,VE=/^[-+]0x[0-9a-f]+$/i,Ya=/^0b[01]+$/i,zE=/^\[object .+?Constructor\]$/,ir=/^0o[0-7]+$/i,yd=/^(?:0|[1-9]\d*)$/,mo=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,o_=/($^)/,HE=/['\n\r\u2028\u2029\\]/g,Gu="\\ud800-\\udfff",M0="\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff",l_="\\u2700-\\u27bf",c_="a-z\\xdf-\\xf6\\xf8-\\xff",d_="A-Z\\xc0-\\xd6\\xd8-\\xde",C0="\\ufe0e\\ufe0f",S0="\\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",Mr="["+Gu+"]",Uf="["+S0+"]",bd="["+M0+"]",li="\\d+",u_="["+l_+"]",pi="["+c_+"]",Vf="[^"+Gu+S0+li+l_+c_+d_+"]",h_="\\ud83c[\\udffb-\\udfff]",Pt="[^"+Gu+"]",Wu="(?:\\ud83c[\\udde6-\\uddff]){2}",ju="[\\ud800-\\udbff][\\udc00-\\udfff]",Yu="["+d_+"]",pe="(?:"+pi+"|"+Vf+")",zf="(?:"+Yu+"|"+Vf+")",Qt="(?:['\u2019](?:d|ll|m|re|s|t|ve))?",qn="(?:['\u2019](?:D|LL|M|RE|S|T|VE))?",E0="(?:"+bd+"|"+h_+")?",YE="["+C0+"]?",XE=YE+E0+"(?:\\u200d(?:"+[Pt,Wu,ju].join("|")+")"+YE+E0+")*",KE="(?:"+[u_,Wu,ju].join("|")+")"+XE,QO="(?:"+[Pt+bd+"?",bd,Wu,ju,Mr].join("|")+")",Il=RegExp("['\u2019]","g"),JO=RegExp(bd,"g"),A0=RegExp(h_+"(?="+h_+")|"+QO+XE,"g"),eF=RegExp([Yu+"?"+pi+"+"+Qt+"(?="+[Uf,Yu,"$"].join("|")+")",zf+"+"+qn+"(?="+[Uf,Yu+pe,"$"].join("|")+")",Yu+"?"+pe+"+"+Qt,Yu+"+"+qn,"\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])","\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",li,KE].join("|"),"g"),tF=RegExp("[\\u200d"+Gu+M0+C0+"]"),ZE=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,nF=["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"],QE=-1,Si={};Si[fa]=Si[Lf]=Si[Qg]=Si[Nf]=Si[Jg]=Si[e_]=Si[Hu]=Si[t_]=Si[n_]=!0,Si[ti]=Si[Yn]=Si[zu]=Si[et]=Si[vd]=Si[mc]=Si[md]=Si[Of]=Si[Uo]=Si[Vu]=Si[ja]=Si[gd]=Si[Vo]=Si[gc]=Si[_d]=!1;var En={};En[ti]=En[Yn]=En[zu]=En[vd]=En[et]=En[mc]=En[fa]=En[Lf]=En[Qg]=En[Nf]=En[Jg]=En[Uo]=En[Vu]=En[ja]=En[gd]=En[Vo]=En[gc]=En[Ff]=En[e_]=En[Hu]=En[t_]=En[n_]=!0,En[md]=En[Of]=En[_d]=!1;var sF={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},ke=parseFloat,oF=parseInt,Kt="object"==typeof global&&global&&global.Object===Object&&global,Gf="object"==typeof self&&self&&self.Object===Object&&self,Cr=Kt||Gf||Function("return this")(),f_=Gs&&!Gs.nodeType&&Gs,Xu=f_&&No&&!No.nodeType&&No,p_=Xu&&Xu.exports===f_,xd=p_&&Kt.process,gs=function(){try{return Xu&&Xu.require&&Xu.require("util").types||xd&&xd.binding&&xd.binding("util")}catch{}}(),m_=gs&&gs.isArrayBuffer,D0=gs&&gs.isDate,Ot=gs&&gs.isMap,$f=gs&&gs.isRegExp,T0=gs&&gs.isSet,qs=gs&&gs.isTypedArray;function _s(X,ue,oe){switch(oe.length){case 0:return X.call(ue);case 1:return X.call(ue,oe[0]);case 2:return X.call(ue,oe[0],oe[1]);case 3:return X.call(ue,oe[0],oe[1],oe[2])}return X.apply(ue,oe)}function aF(X,ue,oe,Be){for(var $t=-1,Vn=null==X?0:X.length;++$t-1}function Ku(X,ue,oe){for(var Be=-1,$t=null==X?0:X.length;++Be<$t;)if(oe(ue,X[Be]))return!0;return!1}function mi(X,ue){for(var oe=-1,Be=null==X?0:X.length,$t=Array(Be);++oe-1;);return oe}function pa(X,ue){for(var oe=X.length;oe--&&Ft(ue,X[oe],0)>-1;);return oe}var nA=v_({\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"}),ot=v_({"&":"&","<":"<",">":">",'"':""","'":"'"});function th(X){return"\\"+sF[X]}function Cd(X){return tF.test(X)}function qf(X){var ue=-1,oe=Array(X.size);return X.forEach(function(Be,$t){oe[++ue]=[$t,Be]}),oe}function ve(X,ue){return function(oe){return X(ue(oe))}}function Hi(X,ue){for(var oe=-1,Be=X.length,$t=0,Vn=[];++oe",""":'"',"'":"'"}),ys=function X(ue){var u,oe=(ue=null==ue?Cr:ys.defaults(Cr.Object(),ue,ys.pick(Cr,nF))).Array,Be=ue.Date,$t=ue.Error,Vn=ue.Function,yt=ue.Math,oi=ue.Object,yc=ue.RegExp,R0=ue.String,Sr=ue.TypeError,rr=oe.prototype,zo=oi.prototype,Ks=ue["__core-js_shared__"],Pl=Vn.prototype.toString,ii=zo.hasOwnProperty,yi=0,sA=(u=/[^.]+$/.exec(Ks&&Ks.keys&&Ks.keys.IE_PROTO||""))?"Symbol(src)_1."+u:"",Ed=zo.toString,k0=Pl.call(oi),Kf=Cr._,Zf=yc("^"+Pl.call(ii).replace(s_,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),Za=p_?ue.Buffer:V,Bi=ue.Symbol,x_=ue.Uint8Array,bs=Za?Za.allocUnsafe:V,xs=ve(oi.getPrototypeOf,oi),Qf=oi.create,Ad=zo.propertyIsEnumerable,bc=rr.splice,vo=Bi?Bi.isConcatSpreadable:V,ih=Bi?Bi.iterator:V,Dd=Bi?Bi.toStringTag:V,Jf=function(){try{var u=Rc(oi,"defineProperty");return u({},"",{}),u}catch{}}(),oA=ue.clearTimeout!==Cr.clearTimeout&&ue.clearTimeout,cF=Be&&Be.now!==Cr.Date.now&&Be.now,dF=ue.setTimeout!==Cr.setTimeout&&ue.setTimeout,w_=yt.ceil,M_=yt.floor,P0=oi.getOwnPropertySymbols,uF=Za?Za.isBuffer:V,aA=ue.isFinite,hF=rr.join,fF=ve(oi.keys,oi),hr=yt.max,Zr=yt.min,pF=Be.now,O0=ue.parseInt,C_=yt.random,mF=rr.reverse,F0=Rc(ue,"DataView"),ep=Rc(ue,"Map"),Qa=Rc(ue,"Promise"),Td=Rc(ue,"Set"),bi=Rc(ue,"WeakMap"),Id=Rc(oi,"create"),tp=bi&&new bi,Rd={},L0=kc(F0),N0=kc(ep),lA=kc(Qa),S_=kc(Td),cA=kc(bi),Qr=Bi?Bi.prototype:V,kd=Qr?Qr.valueOf:V,E_=Qr?Qr.toString:V;function I(u){if(ki(u)&&!rn(u)&&!(u instanceof kn)){if(u instanceof Ei)return u;if(ii.call(u,"__wrapped__"))return ns(u)}return new Ei(u)}var Pd=function(){function u(){}return function(f){if(!wi(f))return{};if(Qf)return Qf(f);u.prototype=f;var _=new u;return u.prototype=V,_}}();function xc(){}function Ei(u,f){this.__wrapped__=u,this.__actions__=[],this.__chain__=!!f,this.__index__=0,this.__values__=V}function kn(u){this.__wrapped__=u,this.__actions__=[],this.__dir__=1,this.__filtered__=!1,this.__iteratees__=[],this.__takeCount__=ha,this.__views__=[]}function wc(u){var f=-1,_=null==u?0:u.length;for(this.clear();++f<_;){var w=u[f];this.set(w[0],w[1])}}function kt(u){var f=-1,_=null==u?0:u.length;for(this.clear();++f<_;){var w=u[f];this.set(w[0],w[1])}}function ma(u){var f=-1,_=null==u?0:u.length;for(this.clear();++f<_;){var w=u[f];this.set(w[0],w[1])}}function zt(u){var f=-1,_=null==u?0:u.length;for(this.__data__=new ma;++f<_;)this.add(u[f])}function Jr(u){var f=this.__data__=new kt(u);this.size=f.size}function I_(u,f){var _=rn(u),w=!_&&Fc(u),S=!_&&!w&&rl(u),P=!_&&!w&&!S&&Wo(u),H=_||w||S||P,Y=H?Xs(u.length,R0):[],Q=Y.length;for(var _e in u)(f||ii.call(u,_e))&&(!H||!("length"==_e||S&&("offset"==_e||"parent"==_e)||P&&("buffer"==_e||"byteLength"==_e||"byteOffset"==_e)||il(_e,Q)))&&Y.push(_e);return Y}function Vr(u){var f=u.length;return f?u[lh(0,f-1)]:V}function Ja(u,f){return Sp(Js(u),Ll(f,0,u.length))}function H0(u){return Sp(Js(u))}function Fl(u,f,_){(_!==V&&!$o(u[f],_)||_===V&&!(f in u))&&Ho(u,f,_)}function Zs(u,f,_){var w=u[f];(!ii.call(u,f)||!$o(w,_)||_===V&&!(f in u))&&Ho(u,f,_)}function ip(u,f){for(var _=u.length;_--;)if($o(u[_][0],f))return _;return-1}function G0(u,f,_,w){return el(u,function(S,P,H){f(w,S,_(S),H)}),w}function $0(u,f){return u&&ci(f,fr(f),u)}function Ho(u,f,_){"__proto__"==f&&Jf?Jf(u,f,{configurable:!0,enumerable:!0,value:_,writable:!0}):u[f]=_}function rh(u,f){for(var _=-1,w=f.length,S=oe(w),P=null==u;++_=f?u:f)),u}function Ms(u,f,_,w,S,P){var H,Y=f&Ci,Q=f&ms,_e=f&Ws;if(_&&(H=S?_(u,w,S,P):_(u)),H!==V)return H;if(!wi(u))return u;var ye=rn(u);if(ye){if(H=function hx(u){var f=u.length,_=new u.constructor(f);return f&&"string"==typeof u[0]&&ii.call(u,"index")&&(_.index=u.index,_.input=u.input),_}(u),!Y)return Js(u,H)}else{var be=zr(u),Xe=be==Of||be==d0;if(rl(u))return me(u,Y);if(be==ja||be==ti||Xe&&!S){if(H=Q||Xe?{}:PA(u),!Y)return Q?function hh(u,f){return ci(u,cx(u),f)}(u,function _A(u,f){return u&&ci(f,Ds(f),u)}(H,u)):function H_(u,f){return ci(u,Z_(u),f)}(u,$0(H,u))}else{if(!En[be])return S?u:{};H=function fx(u,f,_){var w=u.constructor;switch(f){case zu:return rx(u);case et:case mc:return new w(+u);case vd:return function xF(u,f){var _=f?rx(u.buffer):u.buffer;return new u.constructor(_,u.byteOffset,u.byteLength)}(u,_);case fa:case Lf:case Qg:case Nf:case Jg:case e_:case Hu:case t_:case n_:return AA(u,_);case Uo:return new w;case Vu:case gc:return new w(u);case gd:return function wF(u){var f=new u.constructor(u.source,x0.exec(u));return f.lastIndex=u.lastIndex,f}(u);case Vo:return new w;case Ff:return function MF(u){return kd?oi(kd.call(u)):{}}(u)}}(u,be,Y)}}P||(P=new Jr);var vt=P.get(u);if(vt)return vt;P.set(u,H),nw(u)?u.forEach(function(Vt){H.add(Ms(Vt,f,_,Vt,u,P))}):Tv(u)&&u.forEach(function(Vt,An){H.set(An,Ms(Vt,f,_,An,u,P))});var mn=ye?V:(_e?Q?q_:yp:Q?Ds:fr)(u);return Rn(mn||u,function(Vt,An){mn&&(Vt=u[An=Vt]),Zs(H,An,Ms(Vt,f,_,An,u,P))}),H}function R_(u,f,_){var w=_.length;if(null==u)return!w;for(u=oi(u);w--;){var S=_[w],H=u[S];if(H===V&&!(S in u)||!(0,f[S])(H))return!1}return!0}function rp(u,f,_){if("function"!=typeof u)throw new Sr(Un);return gh(function(){u.apply(V,_)},f)}function Fd(u,f,_,w){var S=-1,P=Rl,H=!0,Y=u.length,Q=[],_e=f.length;if(!Y)return Q;_&&(f=mi(f,Br(_))),w?(P=Ku,H=!1):f.length>=Kr&&(P=vc,H=!1,f=new zt(f));e:for(;++S-1},kt.prototype.set=function fA(u,f){var _=this.__data__,w=ip(_,u);return w<0?(++this.size,_.push([u,f])):_[w][1]=f,this},ma.prototype.clear=function pA(){this.size=0,this.__data__={hash:new wc,map:new(ep||kt),string:new wc}},ma.prototype.delete=function mA(u){var f=K_(this,u).delete(u);return this.size-=f?1:0,f},ma.prototype.get=function Se(u){return K_(this,u).get(u)},ma.prototype.has=function zn(u){return K_(this,u).has(u)},ma.prototype.set=function an(u,f){var _=K_(this,u),w=_.size;return _.set(u,f),this.size+=_.size==w?0:1,this},zt.prototype.add=zt.prototype.push=function Er(u){return this.__data__.set(u,Ha),this},zt.prototype.has=function z0(u){return this.__data__.has(u)},Jr.prototype.clear=function ga(){this.__data__=new kt,this.size=0},Jr.prototype.delete=function D_(u){var f=this.__data__,_=f.delete(u);return this.size=f.size,_},Jr.prototype.get=function T_(u){return this.__data__.get(u)},Jr.prototype.has=function gA(u){return this.__data__.has(u)},Jr.prototype.set=function _F(u,f){var _=this.__data__;if(_ instanceof kt){var w=_.__data__;if(!ep||w.length0&&_(Y)?f>1?Xn(Y,f-1,_,w,S):kl(S,Y):w||(S[S.length]=Y)}return S}var tl=G_(),Ai=G_(!0);function Ri(u,f){return u&&tl(u,f,fr)}function P_(u,f){return u&&Ai(u,f,fr)}function _a(u,f){return _c(f,function(_){return zl(u[_])})}function Mc(u,f){for(var _=0,w=(f=xa(f,u)).length;null!=u&&_f}function sp(u,f){return null!=u&&ii.call(u,f)}function op(u,f){return null!=u&&f in oi(u)}function ap(u,f,_){for(var w=_?Ku:Rl,S=u[0].length,P=u.length,H=P,Y=oe(P),Q=1/0,_e=[];H--;){var ye=u[H];H&&f&&(ye=mi(ye,Br(f))),Q=Zr(ye.length,Q),Y[H]=!_&&(f||S>=120&&ye.length>=120)?new zt(H&&ye):V}ye=u[0];var be=-1,Xe=Y[0];e:for(;++be=Y?Q:Q*("desc"==_[w]?-1:1)}return u.index-f.index}(P,H,_)})}function Q0(u,f,_){for(var w=-1,S=f.length,P={};++w-1;)Y!==u&&bc.call(Y,Q,1),bc.call(u,Q,1);return u}function ah(u,f){for(var _=u?f.length:0,w=_-1;_--;){var S=f[_];if(_==w||S!==P){var P=S;il(S)?bc.call(u,S,1):dh(u,S)}}return u}function lh(u,f){return u+M_(C_()*(f-u+1))}function ch(u,f){var _="";if(!u||f<1||f>Wa)return _;do{f%2&&(_+=u),(f=M_(f/2))&&(u+=u)}while(f);return _}function pn(u,f){return Mp(J_(u,f,is),u+"")}function SA(u){return Vr(Bc(u))}function ex(u,f){var _=Bc(u);return Sp(_,Ll(f,0,_.length))}function Vd(u,f,_,w){if(!wi(u))return u;for(var S=-1,P=(f=xa(f,u)).length,H=P-1,Y=u;null!=Y&&++SS?0:S+f),(_=_>S?S:_)<0&&(_+=S),S=f>_?0:_-f>>>0,f>>>=0;for(var P=oe(S);++w>>1,H=u[P];null!==H&&!As(H)&&(_?H<=f:H=Kr){var _e=f?null:j_(u);if(_e)return Hn(_e);H=!1,S=vc,Q=new zt}else Q=f?[]:Y;e:for(;++w=w?u:ts(u,f,_)}var ix=oA||function(u){return Cr.clearTimeout(u)};function me(u,f){if(f)return u.slice();var _=u.length,w=bs?bs(_):new u.constructor(_);return u.copy(w),w}function rx(u){var f=new u.constructor(u.byteLength);return new x_(f).set(new x_(u)),f}function AA(u,f){var _=f?rx(u.buffer):u.buffer;return new u.constructor(_,u.byteOffset,u.length)}function DA(u,f){if(u!==f){var _=u!==V,w=null===u,S=u==u,P=As(u),H=f!==V,Y=null===f,Q=f==f,_e=As(f);if(!Y&&!_e&&!P&&u>f||P&&H&&Q&&!Y&&!_e||w&&H&&Q||!_&&Q||!S)return 1;if(!w&&!P&&!_e&&u1?_[S-1]:V,H=S>2?_[2]:V;for(P=u.length>3&&"function"==typeof P?(S--,P):V,H&&Dr(_[0],_[1],H)&&(P=S<3?V:P,S=1),f=oi(f);++w-1?S[P?f[H]:H]:V}}function Cs(u){return bo(function(f){var _=f.length,w=_,S=Ei.prototype.thru;for(u&&f.reverse();w--;){var P=f[w];if("function"!=typeof P)throw new Sr(Un);if(S&&!H&&"wrapper"==nl(P))var H=new Ei([],!0)}for(w=H?w:_;++w<_;){var Y=nl(P=f[w]),Q="wrapper"==Y?X_(P):V;H=Q&&mh(Q[0])&&Q[1]==(Ga|ca|da|ua)&&!Q[4].length&&1==Q[9]?H[nl(Q[0])].apply(H,Q[3]):1==P.length&&mh(P)?H[Y]():H.thru(P)}return function(){var _e=arguments,ye=_e[0];if(H&&1==_e.length&&rn(ye))return H.plant(ye).value();for(var be=0,Xe=_?f[be].apply(this,_e):ye;++be<_;)Xe=f[be].call(this,Xe);return Xe}})}function Wd(u,f,_,w,S,P,H,Y,Q,_e){var ye=f&Ga,be=f&On,Xe=f&dr,vt=f&(ca|Dl),Ut=f&pd,mn=Xe?V:mp(u);return function Vt(){for(var An=arguments.length,Ln=oe(An),rs=An;rs--;)Ln[rs]=arguments[rs];if(vt)var ss=Ma(Vt),ro=function eh(X,ue){for(var oe=X.length,Be=0;oe--;)X[oe]===ue&&++Be;return Be}(Ln,ss);if(w&&(Ln=Hd(Ln,w,S,vt)),P&&(Ln=TA(Ln,P,H,vt)),An-=ro,vt&&An<_e){var Di=Hi(Ln,ss);return ox(u,f,Wd,Vt.placeholder,_,Ln,Di,Y,Q,_e-An)}var Ts=be?_:this,Mo=Xe?Ts[u]:u;return An=Ln.length,Y?Ln=function Es(u,f){for(var _=u.length,w=Zr(f.length,_),S=Js(u);w--;){var P=f[w];u[w]=il(P,_)?S[P]:V}return u}(Ln,Y):Ut&&An>1&&Ln.reverse(),ye&&QY))return!1;var _e=P.get(u),ye=P.get(f);if(_e&&ye)return _e==f&&ye==u;var be=-1,Xe=!0,vt=_&Bo?new zt:V;for(P.set(u,f),P.set(f,u);++be-1&&u%1==0&&u1?"& ":"")+f[w],f=f.join(_>2?", ":" "),u.replace(y0,"{\n/* [wrapped with "+f+"] */\n")}(w,function BA(u,f){return Rn(c0,function(_){var w="_."+_[0];f&_[1]&&!Rl(u,w)&&u.push(w)}),u.sort()}(function dx(u){var f=u.match(wr);return f?f[1].split(LE):[]}(w),_)))}function vx(u){var f=0,_=0;return function(){var w=pF(),S=Kg-(w-_);if(_=w,S>0){if(++f>=ME)return arguments[0]}else f=0;return u.apply(V,arguments)}}function Sp(u,f){var _=-1,w=u.length,S=w-1;for(f=f===V?w:f;++_1?u[f-1]:V;return _="function"==typeof _?(u.pop(),_):V,yh(u,_)});function zx(u){var f=I(u);return f.__chain__=!0,f}function Ip(u,f){return f(u)}var Hx=bo(function(u){var f=u.length,_=f?u[0]:0,w=this.__wrapped__,S=function(P){return rh(P,u)};return!(f>1||this.__actions__.length)&&w instanceof kn&&il(_)?((w=w.slice(_,+_+(f?1:0))).__actions__.push({func:Ip,args:[S],thisArg:V}),new Ei(w,this.__chain__).thru(function(P){return f&&!P.length&&P.push(V),P})):this.thru(S)}),rD=fp(function(u,f,_){ii.call(u,_)?++u[_]:Ho(u,_,1)}),$x=RA(Sx),kp=RA(rv);function bv(u,f){return(rn(u)?Rn:el)(u,Lt(f,3))}function Vl(u,f){return(rn(u)?lF:k_)(u,Lt(f,3))}var oD=fp(function(u,f,_){ii.call(u,_)?u[_].push(f):Ho(u,_,[f])}),lD=pn(function(u,f,_){var w=-1,S="function"==typeof f,P=to(u)?oe(u.length):[];return el(u,function(H){P[++w]=S?_s(f,H,_):va(H,f,_)}),P}),cD=fp(function(u,f,_){Ho(u,_,f)});function Pp(u,f){return(rn(u)?mi:sh)(u,Lt(f,3))}var Ca=fp(function(u,f,_){u[_?0:1].push(f)},function(){return[[],[]]}),_D=pn(function(u,f){if(null==u)return[];var _=f.length;return _>1&&Dr(u,f[0],f[1])?f=[]:_>2&&Dr(f[0],f[1],f[2])&&(f=[f[0]]),B_(u,Xn(f,1),[])}),Op=cF||function(){return Cr.Date.now()};function xh(u,f,_){return f=_?V:f,yo(u,Ga,V,V,V,V,f=u&&null==f?u.length:f)}function Sa(u,f){var _;if("function"!=typeof f)throw new Sr(Un);return u=dn(u),function(){return--u>0&&(_=f.apply(this,arguments)),u<=1&&(f=V),_}}var Oc=pn(function(u,f,_){var w=On;if(_.length){var S=Hi(_,Ma(Oc));w|=da}return yo(u,w,f,_,S)}),xv=pn(function(u,f,_){var w=On|dr;if(_.length){var S=Hi(_,Ma(xv));w|=da}return yo(f,w,u,_,S)});function yD(u,f,_){var w,S,P,H,Y,Q,_e=0,ye=!1,be=!1,Xe=!0;if("function"!=typeof u)throw new Sr(Un);function vt(Di){var Ts=w,Mo=S;return w=S=V,_e=Di,H=u.apply(Mo,Ts)}function Vt(Di){var Ts=Di-Q;return Q===V||Ts>=f||Ts<0||be&&Di-_e>=P}function An(){var Di=Op();if(Vt(Di))return Ln(Di);Y=gh(An,function mn(Di){var I1=f-(Di-Q);return be?Zr(I1,P-(Di-_e)):I1}(Di))}function Ln(Di){return Y=V,Xe&&w?vt(Di):(w=S=V,H)}function ro(){var Di=Op(),Ts=Vt(Di);if(w=arguments,S=this,Q=Di,Ts){if(Y===V)return function Ut(Di){return _e=Di,Y=gh(An,f),ye?vt(Di):H}(Q);if(be)return ix(Y),Y=gh(An,f),vt(Q)}return Y===V&&(Y=gh(An,f)),H}return f=xo(f)||0,wi(_)&&(ye=!!_.leading,P=(be="maxWait"in _)?hr(xo(_.maxWait)||0,f):P,Xe="trailing"in _?!!_.trailing:Xe),ro.cancel=function rs(){Y!==V&&ix(Y),_e=0,w=Q=S=Y=V},ro.flush=function ss(){return Y===V?H:Ln(Op())},ro}var kF=pn(function(u,f){return rp(u,1,f)}),PF=pn(function(u,f,_){return rp(u,xo(f)||0,_)});function Yd(u,f){if("function"!=typeof u||null!=f&&"function"!=typeof f)throw new Sr(Un);var _=function(){var w=arguments,S=f?f.apply(this,w):w[0],P=_.cache;if(P.has(S))return P.get(S);var H=u.apply(this,w);return _.cache=P.set(S,H)||P,H};return _.cache=new(Yd.Cache||ma),_}function Sv(u){if("function"!=typeof u)throw new Sr(Un);return function(){var f=arguments;switch(f.length){case 0:return!u.call(this);case 1:return!u.call(this,f[0]);case 2:return!u.call(this,f[0],f[1]);case 3:return!u.call(this,f[0],f[1],f[2])}return!u.apply(this,f)}}Yd.Cache=ma;var qx=zd(function(u,f){var _=(f=1==f.length&&rn(f[0])?mi(f[0],Br(Lt())):mi(Xn(f,1),Br(Lt()))).length;return pn(function(w){for(var S=-1,P=Zr(w.length,_);++S=f}),Fc=Bd(function(){return arguments}())?Bd:function(u){return ki(u)&&ii.call(u,"callee")&&!Ad.call(u,"callee")},rn=oe.isArray,FF=m_?Br(m_):function xA(u){return ki(u)&&es(u)==zu};function to(u){return null!=u&&Vp(u.length)&&!zl(u)}function xi(u){return ki(u)&&to(u)}var rl=uF||Qd,Jx=D0?Br(D0):function vF(u){return ki(u)&&es(u)==mc};function Bp(u){if(!ki(u))return!1;var f=es(u);return f==md||f==AE||"string"==typeof u.message&&"string"==typeof u.name&&!no(u)}function zl(u){if(!wi(u))return!1;var f=es(u);return f==Of||f==d0||f==EE||f==TE}function Up(u){return"number"==typeof u&&u==dn(u)}function Vp(u){return"number"==typeof u&&u>-1&&u%1==0&&u<=Wa}function wi(u){var f=typeof u;return null!=u&&("object"==f||"function"==f)}function ki(u){return null!=u&&"object"==typeof u}var Tv=Ot?Br(Ot):function wA(u){return ki(u)&&zr(u)==Uo};function wh(u){return"number"==typeof u||ki(u)&&es(u)==Vu}function no(u){if(!ki(u)||es(u)!=ja)return!1;var f=xs(u);if(null===f)return!0;var _=ii.call(f,"constructor")&&f.constructor;return"function"==typeof _&&_ instanceof _&&Pl.call(_)==k0}var Hp=$f?Br($f):function bF(u){return ki(u)&&es(u)==gd},nw=T0?Br(T0):function L_(u){return ki(u)&&zr(u)==Vo};function Gp(u){return"string"==typeof u||!rn(u)&&ki(u)&&es(u)==gc}function As(u){return"symbol"==typeof u||ki(u)&&es(u)==Ff}var Wo=qs?Br(qs):function q0(u){return ki(u)&&Vp(u.length)&&!!Si[es(u)]},Pv=vp(lp),PD=vp(function(u,f){return u<=f});function Ov(u){if(!u)return[];if(to(u))return Gp(u)?_o(u):Js(u);if(ih&&u[ih])return function rA(X){for(var ue,oe=[];!(ue=X.next()).done;)oe.push(ue.value);return oe}(u[ih]());var f=zr(u);return(f==Uo?qf:f==Vo?Hn:Bc)(u)}function sl(u){return u?(u=xo(u))===In||u===-In?(u<0?-1:1)*SE:u==u?u:0:0===u?u:0}function dn(u){var f=sl(u),_=f%1;return f==f?_?f-_:f:0}function OD(u){return u?Ll(dn(u),0,ha):0}function xo(u){if("number"==typeof u)return u;if(As(u))return Pf;if(wi(u)){var f="function"==typeof u.valueOf?u.valueOf():u;u=wi(f)?f+"":f}if("string"!=typeof u)return 0===u?u:+u;u=$n(u);var _=Ya.test(u);return _||ir.test(u)?oF(u.slice(2),_?2:8):VE.test(u)?Pf:+u}function Hl(u){return ci(u,Ds(u))}function Fn(u){return null==u?"":Qs(u)}var mt=Ar(function(u,f){if(wp(f)||to(f))ci(f,fr(f),u);else for(var _ in f)ii.call(f,_)&&Zs(u,_,f[_])}),iw=Ar(function(u,f){ci(f,Ds(f),u)}),Gl=Ar(function(u,f,_,w){ci(f,Ds(f),u,w)}),ol=Ar(function(u,f,_,w){ci(f,fr(f),u,w)}),LD=bo(rh),Nc=pn(function(u,f){u=oi(u);var _=-1,w=f.length,S=w>2?f[2]:V;for(S&&Dr(f[0],f[1],S)&&(w=1);++_1),P}),ci(u,q_(u),_),w&&(_=Ms(_,Ci|ms|Ws,wa));for(var S=f.length;S--;)dh(_,f[S]);return _}),jD=bo(function(u,f){return null==u?{}:function Z0(u,f){return Q0(u,f,function(_,w){return Uv(u,w)})}(u,f)});function Vv(u,f){if(null==u)return{};var _=mi(q_(u),function(w){return[w]});return f=Lt(f),Q0(u,_,function(w,S){return f(w,S[0])})}var aw=fh(fr),zv=fh(Ds);function Bc(u){return null==u?[]:Ju(u,fr(u))}var G=$d(function(u,f,_){return f=f.toLowerCase(),u+(_?Hv(f):f)});function Hv(u){return Kd(Fn(u).toLowerCase())}function Gv(u){return(u=Fn(u))&&u.replace(mo,nA).replace(JO,"")}var s1=$d(function(u,f,_){return u+(_?"-":"")+f.toLowerCase()}),cw=$d(function(u,f,_){return u+(_?" ":"")+f.toLowerCase()}),o1=Gd("toLowerCase"),$v=$d(function(u,f,_){return u+(_?"_":"")+f.toLowerCase()}),c1=$d(function(u,f,_){return u+(_?" ":"")+Kd(f)}),fw=$d(function(u,f,_){return u+(_?" ":"")+f.toUpperCase()}),Kd=Gd("toUpperCase");function pw(u,f,_){return u=Fn(u),(f=_?V:f)===V?function nn(X){return ZE.test(X)}(u)?function fn(X){return X.match(eF)||[]}(u):function tA(X){return X.match(NE)||[]}(u):u.match(f)||[]}var jv=pn(function(u,f){try{return _s(u,V,f)}catch(_){return Bp(_)?_:new $t(_)}}),f1=bo(function(u,f){return Rn(f,function(_){_=Go(_),Ho(u,_,Oc(u[_],u))}),u});function Yv(u){return function(){return u}}var mw=Cs(),_1=Cs(!0);function is(u){return u}function $p(u){return N_("function"==typeof u?u:Ms(u,Ci))}var Xv=pn(function(u,f){return function(_){return va(_,u,f)}}),v1=pn(function(u,f){return function(_){return va(u,_,f)}});function gw(u,f,_){var w=fr(f),S=_a(f,w);null==_&&(!wi(f)||!S.length&&w.length)&&(_=f,f=u,u=this,S=_a(f,fr(f)));var P=!(wi(_)&&"chain"in _&&!_.chain),H=zl(u);return Rn(S,function(Y){var Q=f[Y];u[Y]=Q,H&&(u.prototype[Y]=function(){var _e=this.__chain__;if(P||_e){var ye=u(this.__wrapped__);return(ye.__actions__=Js(this.__actions__)).push({func:Q,args:arguments,thisArg:u}),ye.__chain__=_e,ye}return Q.apply(u,kl([this.value()],arguments))})}),u}function wo(){}var _w=gp(mi),b1=gp(JE),x1=gp(Wf);function Mh(u){return px(u)?__(Go(u)):function ya(u){return function(f){return Mc(f,u)}}(u)}var Kv=sx(),Ch=sx(!0);function Sh(){return[]}function Qd(){return!1}var w1=$_(function(u,f){return u+f},0),M1=W_("ceil"),bw=$_(function(u,f){return u/f},1),C1=W_("floor"),D1=$_(function(u,f){return u*f},1),WF=W_("round"),ty=$_(function(u,f){return u-f},0);return I.after=function vD(u,f){if("function"!=typeof f)throw new Sr(Un);return u=dn(u),function(){if(--u<1)return f.apply(this,arguments)}},I.ary=xh,I.assign=mt,I.assignIn=iw,I.assignInWith=Gl,I.assignWith=ol,I.at=LD,I.before=Sa,I.bind=Oc,I.bindAll=f1,I.bindKey=xv,I.castArray=function wD(){if(!arguments.length)return[];var u=arguments[0];return rn(u)?u:[u]},I.chain=zx,I.chunk=function nv(u,f,_){f=(_?Dr(u,f,_):f===V)?1:hr(dn(f),0);var w=null==u?0:u.length;if(!w||f<1)return[];for(var S=0,P=0,H=oe(w_(w/f));SS?0:S+_),(w=w===V||w>S?S:dn(w))<0&&(w+=S),w=_>w?0:OD(w);_>>0)?(u=Fn(u))&&("string"==typeof f||null!=f&&!Hp(f))&&!(f=Qs(f))&&Cd(u)?Tc(_o(u),0,_):u.split(f,_):[]},I.spread=function Kx(u,f){if("function"!=typeof u)throw new Sr(Un);return f=null==f?0:hr(dn(f),0),pn(function(_){var w=_[f],S=Tc(_,0,f);return w&&kl(S,w),_s(u,this,S)})},I.tail=function Pc(u){var f=null==u?0:u.length;return f?ts(u,1,f):[]},I.take=function Ox(u,f,_){return u&&u.length?ts(u,0,(f=_||f===V?1:dn(f))<0?0:f):[]},I.takeRight=function Fx(u,f,_){var w=null==u?0:u.length;return w?ts(u,(f=w-(f=_||f===V?1:dn(f)))<0?0:f,w):[]},I.takeRightWhile=function QA(u,f){return u&&u.length?uh(u,Lt(f,3),!1,!0):[]},I.takeWhile=function IF(u,f){return u&&u.length?uh(u,Lt(f,3)):[]},I.tap=function tD(u,f){return f(u),u},I.throttle=function Fp(u,f,_){var w=!0,S=!0;if("function"!=typeof u)throw new Sr(Un);return wi(_)&&(w="leading"in _?!!_.leading:w,S="trailing"in _?!!_.trailing:S),yD(u,f,{leading:w,maxWait:f,trailing:S})},I.thru=Ip,I.toArray=Ov,I.toPairs=aw,I.toPairsIn=zv,I.toPath=function yw(u){return rn(u)?mi(u,Go):As(u)?[u]:Js(yx(Fn(u)))},I.toPlainObject=Hl,I.transform=function XD(u,f,_){var w=rn(u),S=w||rl(u)||Wo(u);if(f=Lt(f,4),null==_){var P=u&&u.constructor;_=S?w?new P:[]:wi(u)&&zl(P)?Pd(xs(u)):{}}return(S?Rn:Ri)(u,function(H,Y,Q){return f(_,H,Y,Q)}),_},I.unary=function Zx(u){return xh(u,1)},I.union=Ap,I.unionBy=JA,I.unionWith=Lx,I.uniq=function Nx(u){return u&&u.length?ri(u):[]},I.uniqBy=function Bx(u,f){return u&&u.length?ri(u,Lt(f,2)):[]},I.uniqWith=function fv(u,f){return f="function"==typeof f?f:V,u&&u.length?ri(u,V,f):[]},I.unset=function KD(u,f){return null==u||dh(u,f)},I.unzip=Dp,I.unzipWith=yh,I.update=function ZD(u,f,_){return null==u?u:nx(u,f,hp(_))},I.updateWith=function QD(u,f,_,w){return w="function"==typeof w?w:V,null==u?u:nx(u,f,hp(_),w)},I.values=Bc,I.valuesIn=function JD(u){return null==u?[]:Ju(u,Ds(u))},I.without=Tp,I.words=pw,I.wrap=function Av(u,f){return Ev(hp(f),u)},I.xor=Ux,I.xorBy=pv,I.xorWith=mv,I.zip=gv,I.zipObject=function bh(u,f){return Dc(u||[],f||[],Zs)},I.zipObjectDeep=function eD(u,f){return Dc(u||[],f||[],Vd)},I.zipWith=Vx,I.entries=aw,I.entriesIn=zv,I.extend=iw,I.extendWith=Gl,gw(I,I),I.add=w1,I.attempt=jv,I.camelCase=G,I.capitalize=Hv,I.ceil=M1,I.clamp=function e1(u,f,_){return _===V&&(_=f,f=V),_!==V&&(_=(_=xo(_))==_?_:0),f!==V&&(f=(f=xo(f))==f?f:0),Ll(xo(u),f,_)},I.clone=function Kn(u){return Ms(u,Ws)},I.cloneDeep=function CD(u){return Ms(u,Ci|Ws)},I.cloneDeepWith=function Lp(u,f){return Ms(u,Ci|Ws,f="function"==typeof f?f:V)},I.cloneWith=function MD(u,f){return Ms(u,Ws,f="function"==typeof f?f:V)},I.conformsTo=function Qx(u,f){return null==f||R_(u,f,fr(f))},I.deburr=Gv,I.defaultTo=function g1(u,f){return null==u||u!=u?f:u},I.divide=bw,I.endsWith=function n1(u,f,_){u=Fn(u),f=Qs(f);var w=u.length,S=_=_===V?w:Ll(dn(_),0,w);return(_-=f.length)>=0&&u.slice(_,S)==f},I.eq=$o,I.escape=function r1(u){return(u=Fn(u))&&FE.test(u)?u.replace(f0,ot):u},I.escapeRegExp=function lw(u){return(u=Fn(u))&&_0.test(u)?u.replace(s_,"\\$&"):u},I.every=function vv(u,f,_){var w=rn(u)?JE:W0;return _&&Dr(u,f,_)&&(f=V),w(u,Lt(f,3))},I.find=$x,I.findIndex=Sx,I.findKey=function Fv(u,f){return ee(u,Lt(f,3),Ri)},I.findLast=kp,I.findLastIndex=rv,I.findLastKey=function Lv(u,f){return ee(u,Lt(f,3),P_)},I.floor=C1,I.forEach=bv,I.forEachRight=Vl,I.forIn=function UD(u,f){return null==u?u:tl(u,Lt(f,3),Ds)},I.forInRight=function Nv(u,f){return null==u?u:Ai(u,Lt(f,3),Ds)},I.forOwn=function al(u,f){return u&&Ri(u,Lt(f,3))},I.forOwnRight=function VD(u,f){return u&&P_(u,Lt(f,3))},I.get=Bv,I.gt=SD,I.gte=ED,I.has=function GD(u,f){return null!=u&&ux(u,f,sp)},I.hasIn=Uv,I.head=Ax,I.identity=is,I.includes=function aD(u,f,_,w){u=to(u)?u:Bc(u),_=_&&!w?dn(_):0;var S=u.length;return _<0&&(_=hr(S+_,0)),Gp(u)?_<=S&&u.indexOf(f,_)>-1:!!S&&Ft(u,f,_)>-1},I.indexOf=function vh(u,f,_){var w=null==u?0:u.length;if(!w)return-1;var S=null==_?0:dn(_);return S<0&&(S=hr(w+S,0)),Ft(u,f,S)},I.inRange=function t1(u,f,_){return f=sl(f),_===V?(_=f,f=0):_=sl(_),function O_(u,f,_){return u>=Zr(f,_)&&u=-Wa&&u<=Wa},I.isSet=nw,I.isString=Gp,I.isSymbol=As,I.isTypedArray=Wo,I.isUndefined=function ID(u){return u===V},I.isWeakMap=function RD(u){return ki(u)&&zr(u)==_d},I.isWeakSet=function kD(u){return ki(u)&&"[object WeakSet]"==es(u)},I.join=function Dx(u,f){return null==u?"":hF.call(u,f)},I.kebabCase=s1,I.last=Tr,I.lastIndexOf=function cv(u,f,_){var w=null==u?0:u.length;if(!w)return-1;var S=w;return _!==V&&(S=(S=dn(_))<0?hr(w+S,0):Zr(S,w-1)),f==f?function Sd(X,ue,oe){for(var Be=oe+1;Be--;)if(X[Be]===ue)return Be;return Be}(u,f,S):Qu(u,Yf,S,!0)},I.lowerCase=cw,I.lowerFirst=o1,I.lt=Pv,I.lte=PD,I.max=function xw(u){return u&&u.length?Ld(u,is,Nd):V},I.maxBy=function ww(u,f){return u&&u.length?Ld(u,Lt(f,2),Nd):V},I.mean=function S1(u){return Md(u,is)},I.meanBy=function E1(u,f){return Md(u,Lt(f,2))},I.min=function io(u){return u&&u.length?Ld(u,is,lp):V},I.minBy=function A1(u,f){return u&&u.length?Ld(u,Lt(f,2),lp):V},I.stubArray=Sh,I.stubFalse=Qd,I.stubObject=function vw(){return{}},I.stubString=function Zv(){return""},I.stubTrue=function Qv(){return!0},I.multiply=D1,I.nth=function Tx(u,f){return u&&u.length?CA(u,dn(f)):V},I.noConflict=function E(){return Cr._===this&&(Cr._=Kf),this},I.noop=wo,I.now=Op,I.pad=function a1(u,f,_){u=Fn(u);var w=(f=dn(f))?ur(u):0;if(!f||w>=f)return u;var S=(f-w)/2;return _p(M_(S),_)+u+_p(w_(S),_)},I.padEnd=function UF(u,f,_){u=Fn(u);var w=(f=dn(f))?ur(u):0;return f&&wf){var w=u;u=f,f=w}if(_||u%1||f%1){var S=C_();return Zr(u+S*(f-u+ke("1e-"+((S+"").length-1))),f)}return lh(u,f)},I.reduce=function dD(u,f,_){var w=rn(u)?g_:I0,S=arguments.length<3;return w(u,Lt(f,4),_,S,el)},I.reduceRight=function uD(u,f,_){var w=rn(u)?eA:I0,S=arguments.length<3;return w(u,Lt(f,4),_,S,k_)},I.repeat=function Gi(u,f,_){return f=(_?Dr(u,f,_):f===V)?1:dn(f),ch(Fn(u),f)},I.replace=function l1(){var u=arguments,f=Fn(u[0]);return u.length<3?f:f.replace(u[1],u[2])},I.result=function YD(u,f,_){var w=-1,S=(f=xa(f,u)).length;for(S||(S=1,u=V);++wWa)return[];var _=ha,w=Zr(u,ha);f=Lt(f),u-=ha;for(var S=Xs(w,f);++_=P)return u;var Y=_-ur(w);if(Y<1)return w;var Q=H?Tc(H,0,Y).join(""):u.slice(0,Y);if(S===V)return Q+w;if(H&&(Y+=Q.length-Y),Hp(S)){if(u.slice(Y).search(S)){var _e,ye=Q;for(S.global||(S=yc(S.source,Fn(x0.exec(S))+"g")),S.lastIndex=0;_e=S.exec(ye);)var be=_e.index;Q=Q.slice(0,be===V?Y:be)}}else if(u.indexOf(Qs(S),Y)!=Y){var Xe=Q.lastIndexOf(S);Xe>-1&&(Q=Q.slice(0,Xe))}return Q+w},I.unescape=function h1(u){return(u=Fn(u))&&OE.test(u)?u.replace(h0,Xf):u},I.uniqueId=function ey(u){var f=++yi;return Fn(u)+f},I.upperCase=fw,I.upperFirst=Kd,I.each=bv,I.eachRight=Vl,I.first=Ax,gw(I,function(){var u={};return Ri(I,function(f,_){ii.call(I.prototype,_)||(u[_]=f)}),u}(),{chain:!1}),I.VERSION="4.17.21",Rn(["bind","bindKey","curry","curryRight","partial","partialRight"],function(u){I[u].placeholder=I}),Rn(["drop","take"],function(u,f){kn.prototype[u]=function(_){_=_===V?1:hr(dn(_),0);var w=this.__filtered__&&!f?new kn(this):this.clone();return w.__filtered__?w.__takeCount__=Zr(_,w.__takeCount__):w.__views__.push({size:Zr(_,ha),type:u+(w.__dir__<0?"Right":"")}),w},kn.prototype[u+"Right"]=function(_){return this.reverse()[u](_).reverse()}}),Rn(["filter","map","takeWhile"],function(u,f){var _=f+1,w=1==_||3==_;kn.prototype[u]=function(S){var P=this.clone();return P.__iteratees__.push({iteratee:Lt(S,3),type:_}),P.__filtered__=P.__filtered__||w,P}}),Rn(["head","last"],function(u,f){var _="take"+(f?"Right":"");kn.prototype[u]=function(){return this[_](1).value()[0]}}),Rn(["initial","tail"],function(u,f){var _="drop"+(f?"":"Right");kn.prototype[u]=function(){return this.__filtered__?new kn(this):this[_](1)}}),kn.prototype.compact=function(){return this.filter(is)},kn.prototype.find=function(u){return this.filter(u).head()},kn.prototype.findLast=function(u){return this.reverse().find(u)},kn.prototype.invokeMap=pn(function(u,f){return"function"==typeof u?new kn(this):this.map(function(_){return va(_,u,f)})}),kn.prototype.reject=function(u){return this.filter(Sv(Lt(u)))},kn.prototype.slice=function(u,f){u=dn(u);var _=this;return _.__filtered__&&(u>0||f<0)?new kn(_):(u<0?_=_.takeRight(-u):u&&(_=_.drop(u)),f!==V&&(_=(f=dn(f))<0?_.dropRight(-f):_.take(f-u)),_)},kn.prototype.takeRightWhile=function(u){return this.reverse().takeWhile(u).reverse()},kn.prototype.toArray=function(){return this.take(ha)},Ri(kn.prototype,function(u,f){var _=/^(?:filter|find|map|reject)|While$/.test(f),w=/^(?:head|last)$/.test(f),S=I[w?"take"+("last"==f?"Right":""):f],P=w||/^find/.test(f);S&&(I.prototype[f]=function(){var H=this.__wrapped__,Y=w?[1]:arguments,Q=H instanceof kn,_e=Y[0],ye=Q||rn(H),be=function(An){var Ln=S.apply(I,kl([An],Y));return w&&Xe?Ln[0]:Ln};ye&&_&&"function"==typeof _e&&1!=_e.length&&(Q=ye=!1);var Xe=this.__chain__,Ut=P&&!Xe,mn=Q&&!this.__actions__.length;if(!P&&ye){H=mn?H:new kn(this);var Vt=u.apply(H,Y);return Vt.__actions__.push({func:Ip,args:[be],thisArg:V}),new Ei(Vt,Xe)}return Ut&&mn?u.apply(this,Y):(Vt=this.thru(be),Ut?w?Vt.value()[0]:Vt.value():Vt)})}),Rn(["pop","push","shift","sort","splice","unshift"],function(u){var f=rr[u],_=/^(?:push|sort|unshift)$/.test(u)?"tap":"thru",w=/^(?:pop|shift)$/.test(u);I.prototype[u]=function(){var S=arguments;if(w&&!this.__chain__){var P=this.value();return f.apply(rn(P)?P:[],S)}return this[_](function(H){return f.apply(rn(H)?H:[],S)})}}),Ri(kn.prototype,function(u,f){var _=I[f];if(_){var w=_.name+"";ii.call(Rd,w)||(Rd[w]=[]),Rd[w].push({name:f,func:_})}}),Rd[Wd(V,dr).name]=[{name:"wrapper",func:V}],kn.prototype.clone=function B0(){var u=new kn(this.__wrapped__);return u.__actions__=Js(this.__actions__),u.__dir__=this.__dir__,u.__filtered__=this.__filtered__,u.__iteratees__=Js(this.__iteratees__),u.__takeCount__=this.__takeCount__,u.__views__=Js(this.__views__),u},kn.prototype.reverse=function Od(){if(this.__filtered__){var u=new kn(this);u.__dir__=-1,u.__filtered__=!0}else(u=this.clone()).__dir__*=-1;return u},kn.prototype.value=function ws(){var u=this.__wrapped__.value(),f=this.__dir__,_=rn(u),w=f<0,S=_?u.length:0,P=function xp(u,f,_){for(var w=-1,S=_.length;++w=this.__values__.length;return{done:u,value:u?V:this.__values__[this.__index__++]}},I.prototype.plant=function nD(u){for(var f,_=this;_ instanceof xc;){var w=ns(_);w.__index__=0,w.__values__=V,f?S.__wrapped__=w:f=w;var S=w;_=_.__wrapped__}return S.__wrapped__=u,f},I.prototype.reverse=function iD(){var u=this.__wrapped__;if(u instanceof kn){var f=u;return this.__actions__.length&&(f=new kn(this)),(f=f.reverse()).__actions__.push({func:Ip,args:[dv],thisArg:V}),new Ei(f,this.__chain__)}return this.thru(dv)},I.prototype.toJSON=I.prototype.valueOf=I.prototype.value=function RF(){return ba(this.__wrapped__,this.__actions__)},I.prototype.first=I.prototype.head,ih&&(I.prototype[ih]=function jd(){return this}),I}();Cr._=ys,(cn=function(){return ys}.call(Gs,ps,Gs,No))!==V&&(No.exports=cn)}.call(this)},738:function(No){var Gs;No.exports=((Gs=function(){function ps(Mi){return Nr.appendChild(Mi.dom),Mi}function cn(Mi){for(var Ci=0;CiZt+1e3&&(Al.update(1e3*Un/(Mi-Zt),100),Zt=Mi,Un=0,$s)){var Ci=performance.memory;$s.update(Ci.usedJSHeapSize/1048576,Ci.jsHeapSizeLimit/1048576)}return Mi},update:function(){Kr=this.end()},domElement:Nr,setMode:cn}}).Panel=function(ps,cn,V){var Nr=1/0,Kr=0,Zt=Math.round,Un=Zt(window.devicePixelRatio||1),Al=80*Un,Ha=48*Un,$s=3*Un,Mi=2*Un,Ci=3*Un,ms=15*Un,Ws=74*Un,js=30*Un,Bo=document.createElement("canvas");Bo.width=Al,Bo.height=Ha,Bo.style.cssText="width:80px;height:48px";var On=Bo.getContext("2d");return On.font="bold "+9*Un+"px Helvetica,Arial,sans-serif",On.textBaseline="top",On.fillStyle=V,On.fillRect(0,0,Al,Ha),On.fillStyle=cn,On.fillText(ps,$s,Mi),On.fillRect(Ci,ms,Ws,js),On.fillStyle=V,On.globalAlpha=.9,On.fillRect(Ci,ms,Ws,js),{dom:Bo,update:function(dr,pc){Nr=Math.min(Nr,dr),Kr=Math.max(Kr,dr),On.fillStyle=V,On.globalAlpha=1,On.fillRect(0,0,Al,ms),On.fillStyle=cn,On.fillText(Zt(dr)+" "+ps+" ("+Zt(Nr)+"-"+Zt(Kr)+")",$s,Mi),On.drawImage(Bo,Ci+Un,ms,Ws-Un,js,Ci,ms,Ws-Un,js),On.fillRect(Ci+Ws-Un,ms,Un,js),On.fillStyle=V,On.globalAlpha=.9,On.fillRect(Ci+Ws-Un,ms,Un,Zt((1-dr/pc)*js))}}},Gs)}},No=>{No(No.s=790)}]); \ No newline at end of file diff --git a/frontend/src/app/components/editor/eac/trk-map.block-ui/trk-map.block-ui.component.ts b/frontend/src/app/components/editor/eac/trk-map.block-ui/trk-map.block-ui.component.ts index bca1447..3c26d37 100644 --- a/frontend/src/app/components/editor/eac/trk-map.block-ui/trk-map.block-ui.component.ts +++ b/frontend/src/app/components/editor/eac/trk-map.block-ui/trk-map.block-ui.component.ts @@ -101,9 +101,8 @@ export class Nfs2MapWorldEntity extends MapGraph3dEntity { texture.wrapS = RepeatWrapping; - texture.wrapT = ClampToEdgeWrapping; + texture.wrapT = RepeatWrapping; setupNfs1Texture(texture); - texture.flipY = true; return texture; }); } @@ -166,9 +165,8 @@ export class Nfs2MapWorldEntity extends MapGraph3dEntity { texture.wrapS = RepeatWrapping; - texture.wrapT = ClampToEdgeWrapping; + texture.wrapT = RepeatWrapping; setupNfs1Texture(texture); - texture.flipY = true; this.terrainMaterials[matId].map = texture; this.terrainMaterials[matId].needsUpdate = true; this.terrainMaterials[matId].visible = true; @@ -221,8 +219,8 @@ export class Nfs2MapWorldEntity extends MapGraph3dEntity> 9) & 1 + n_rotate = ((alignment >> 11) & 3) - rotate_i + uvs = rotate_list(uvs, n_rotate) + if i % 2: + uvs = uvs[::-1] # flip + for i, vi in enumerate(polygon): + submesh.vertex_uvs[vi] = uvs[i] + chunks.append([m for m, _, _ in sub_meshes]) + for meshes in chunks: + for mesh in meshes: + mesh.pivot_offset = (mesh.pivot_offset[0], mesh.pivot_offset[2], mesh.pivot_offset[1]) + mesh.change_axes(new_z='y', new_y='z') if self.settings.maps__save_as_chunked: for i, chunk in enumerate(chunks): with open(os.path.join(path, f'terrain_chunk_{i}.obj'), 'w') as f: - chunk.pivot_offset = (0, 0, 0) - obj, fii = chunk.to_obj(1) - f.write(obj) + face_index_increment = 1 + for mesh in chunk: + mesh.pivot_offset = (0, 0, 0) + obj, fii = mesh.to_obj(face_index_increment) + f.write(obj) + face_index_increment += fii # TODO export to gg here if not self.settings.geometry__save_obj: if self.settings.maps__save_as_chunked: @@ -867,7 +880,8 @@ def get_texture(tex): with open(os.path.join(path, 'terrain.obj'), 'w') as f: face_index_increment = 1 for chunk in chunks: - obj, fii = chunk.to_obj(face_index_increment) - f.write(obj) - face_index_increment += fii + for mesh in chunk: + obj, fii = mesh.to_obj(face_index_increment) + f.write(obj) + face_index_increment += fii ObjExporter().handle_obj(settings=self.settings, path=path, obj_name='terrain.obj') From d45dd89715aa1d1331789861a81d85da6b0ca880 Mon Sep 17 00:00:00 2001 From: andy Date: Thu, 2 Jan 2025 01:00:41 +0200 Subject: [PATCH 07/36] broken TRK props --- library/exceptions.py | 6 +- library/read_blocks/basic.py | 4 +- library/read_blocks/compound.py | 2 +- resources/eac/fields/misc.py | 29 +++++++++ resources/eac/maps/nfs2.py | 101 ++++++++++++++++++++++++++++---- resources/eac/videos.py | 2 +- serializers/maps.py | 38 +++++++++++- 7 files changed, 164 insertions(+), 18 deletions(-) diff --git a/library/exceptions.py b/library/exceptions.py index 97a68d0..c8c8d5b 100644 --- a/library/exceptions.py +++ b/library/exceptions.py @@ -9,7 +9,11 @@ def __init__(self, message='Data integrity exception'): class BlockDefinitionException(Exception): - pass + def __init__(self, ctx, message): + if ctx is not None: + super().__init__(ctx.ctx_path + ': ' + message) + else: + super().__init__(message) class SerializationException(Exception): diff --git a/library/read_blocks/basic.py b/library/read_blocks/basic.py index 4fafbaf..eb06bb6 100644 --- a/library/read_blocks/basic.py +++ b/library/read_blocks/basic.py @@ -41,7 +41,7 @@ def read(self, buffer: [BufferedReader, BytesIO], ctx: ReadContext = root_read_c pass def estimate_packed_size(self, data, ctx: WriteContext = None): - raise BlockDefinitionException('Cannot estimate packed size of data block ' + + raise BlockDefinitionException(ctx, 'Cannot estimate packed size of data block ' + "__".join([x.__name__ for x in self.__class__.mro() if x.__name__ not in ["object", "ABC"]])) @@ -138,7 +138,7 @@ def read(self, buffer: [BufferedReader, BytesIO], ctx: ReadContext = DataBlock.r if self.allow_negative_length: buffer.seek(self_len, SEEK_CUR) return b'' - raise BlockDefinitionException('Cannot read bytes block with negative length') + raise BlockDefinitionException(ctx, 'Cannot read bytes block with negative length') res = buffer.read(self_len) if len(res) < self_len: raise EndOfBufferException() diff --git a/library/read_blocks/compound.py b/library/read_blocks/compound.py index 90b76d2..9d83fd6 100644 --- a/library/read_blocks/compound.py +++ b/library/read_blocks/compound.py @@ -44,7 +44,7 @@ def schema(self) -> Dict: def get_child_block_with_data(self, unpacked_data: dict, name: str) -> Tuple['DataBlock', Any]: field = self.field_blocks_map.get(name) if field is None: - raise BlockDefinitionException(f'Cannot find field {name}') + raise BlockDefinitionException(None, f'Cannot find field {name}') return field, unpacked_data.get(name) # For auto-generated documentation only diff --git a/resources/eac/fields/misc.py b/resources/eac/fields/misc.py index a8024ce..d370309 100644 --- a/resources/eac/fields/misc.py +++ b/resources/eac/fields/misc.py @@ -1,3 +1,4 @@ +import math from io import BufferedReader, BytesIO from typing import Dict @@ -40,6 +41,34 @@ class Fields(DeclarativeCompoundBlock.Fields): z = RationalNumber(length=2, fraction_bits=7, is_signed=True) +class Point3D_16_15_Normalized(DeclarativeCompoundBlock): + + @property + def schema(self) -> Dict: + return { + **super().schema, + 'block_description': 'Point in 3D space (x,y,z), where each coordinate is: ' + + RationalNumber(length=2, fraction_bits=15, is_signed=True).schema['block_description'] + + ', normalized. The unit is meter', + 'inline_description': True, + } + + class Fields(DeclarativeCompoundBlock.Fields): + x = RationalNumber(length=2, fraction_bits=15, is_signed=True) + y = RationalNumber(length=2, fraction_bits=15, is_signed=True) + z = RationalNumber(length=2, fraction_bits=15, is_signed=True) + + def write(self, data, ctx: WriteContext = None, name: str = '') -> bytes: + length = math.sqrt(data['x']**2 + data['y']**2 + data['z']**2) + if length == 0: + data['z'] = 1.0 + elif length != 1: + data['x'] /= length + data['y'] /= length + data['z'] /= length + return super().write(data, ctx, name) + + class Point3D_32(DeclarativeCompoundBlock): @property def schema(self) -> Dict: diff --git a/resources/eac/maps/nfs2.py b/resources/eac/maps/nfs2.py index 2376458..44b355b 100644 --- a/resources/eac/maps/nfs2.py +++ b/resources/eac/maps/nfs2.py @@ -4,9 +4,9 @@ from library.context import ReadContext from library.read_blocks import (DeclarativeCompoundBlock, IntegerBlock, - UTF8Block, BytesBlock, ArrayBlock, DataBlock, DelegateBlock) + UTF8Block, BytesBlock, ArrayBlock, DataBlock, DelegateBlock, CompoundBlock) from library.read_blocks.numbers import EnumByteBlock -from resources.eac.fields.misc import Point3D_32, Point3D_16 +from resources.eac.fields.misc import Point3D_32, Point3D_16, Point3D_16_15_Normalized class TrkPolygon(DeclarativeCompoundBlock): @@ -26,27 +26,105 @@ class Fields(DeclarativeCompoundBlock.Fields): rgb1 = IntegerBlock(length=3, is_signed=False) +class PolygonMapExtraDataRecord(DeclarativeCompoundBlock): + class Fields(DeclarativeCompoundBlock.Fields): + vectors_idx = IntegerBlock(length=1, is_signed=False) + car_behavior = EnumByteBlock(enum_names=[(0, 'unk0'), + (1, 'unk1'), + ]) + + +class PropExtraDataRecord(DeclarativeCompoundBlock): + class Fields(DeclarativeCompoundBlock.Fields): + block_size = (IntegerBlock(length=2, is_signed=False), + {'description': 'Block size'}) + type = EnumByteBlock(enum_names=[(1, 'static_prop'), + (3, 'animated_prop'), + ]) + prop_descr_idx = IntegerBlock(length=1, is_signed=False) + position = DelegateBlock(possible_blocks=[ + Point3D_32(), + CompoundBlock(fields=[('num_frames', IntegerBlock(length=2, is_signed=False), {}), + ('unk', IntegerBlock(length=2), {'is_unknown': True}), + ('frames', ArrayBlock(length=lambda ctx: ctx.data('num_frames'), + child=CompoundBlock(fields=[('position', Point3D_32(), {}), + ('unk0', IntegerBlock(length=2), + {'is_unknown': True}), + ('unk1', IntegerBlock(length=2), + {'is_unknown': True}), + ('unk2', IntegerBlock(length=2), + {'is_unknown': True}), + ('unk3', IntegerBlock(length=2), + {'is_unknown': True})])), {})]), + BytesBlock(length=lambda ctx: ctx.data('block_size') - 4)], + choice_index=lambda ctx, **_: (0 if ctx.data('type') == 'static_prop' else + 1 if ctx.data('type') == 'animated_prop' else 2) + ) + + +class PropDescriptionExtraDataRecord(DeclarativeCompoundBlock): + class Fields(DeclarativeCompoundBlock.Fields): + block_size = (IntegerBlock(length=4, is_signed=False), + {'description': 'Block size'}) + num_vertices = (IntegerBlock(length=2, is_signed=False), + {'description': '', + 'programmatic_value': lambda ctx: len(ctx.data('vertices'))}) + num_polygons = (IntegerBlock(length=2, is_signed=False), + {'description': '', + 'programmatic_value': lambda ctx: len(ctx.data('polygons'))}) + vertices = ArrayBlock(child=Point3D_16(), + length=(lambda ctx: ctx.data('num_vertices'), 'num_vertices')) + polygons = ArrayBlock(child=TrkPolygon(), + length=(lambda ctx: ctx.data('num_polygons'), 'num_polygons')) + padding = BytesBlock(length=lambda ctx: ctx.data('block_size') - ctx.buffer.tell() + ctx.read_start_offset) + + +class RoadVectorsExtraDataRecord(DeclarativeCompoundBlock): + class Fields(DeclarativeCompoundBlock.Fields): + normal = Point3D_16_15_Normalized() + forward = Point3D_16_15_Normalized() + + class TrkExtraBlock(DeclarativeCompoundBlock): class Fields(DeclarativeCompoundBlock.Fields): block_size = (IntegerBlock(length=4, is_signed=False), {'description': 'Block size'}) type = EnumByteBlock(enum_names=[(2, 'textures_map'), (4, 'block_numbers'), - (5, 'polygon_modifier'), + (5, 'polygon_map'), (6, 'median_polygons'), - (7, 'objects_7'), - (8, '3d_structures'), + (7, 'props_7'), + (8, 'prop_descriptions'), (9, 'lanes'), - (13, 'virtual'), + (13, 'road_vectors'), (15, 'positions'), - (18, 'objects_18'), + (18, 'props_18'), ]) unk = IntegerBlock(length=1, required_value=0) num_data_records = IntegerBlock(length=2) - data_records = DelegateBlock(possible_blocks=[ArrayBlock(child=TexturesMapExtraDataRecord(), length=lambda ctx: ctx.data('num_data_records')), - BytesBlock(length=lambda ctx: ctx.data('block_size') - 8)], - choice_index=lambda ctx, **_: 0 if ctx.data('type') == 'textures_map' else 1 - ) + data_records = DelegateBlock(possible_blocks=[ + ArrayBlock(child=TexturesMapExtraDataRecord(), length=lambda ctx: ctx.data('num_data_records')), + ArrayBlock(child=IntegerBlock(length=2, is_signed=False), length=lambda ctx: ctx.data('num_data_records')), + ArrayBlock(child=PolygonMapExtraDataRecord(), length=lambda ctx: ctx.data('num_data_records')), + BytesBlock(length=lambda ctx: ctx.data('block_size') - 8), + ArrayBlock(child=PropExtraDataRecord(), length=lambda ctx: ctx.data('num_data_records')), + ArrayBlock(child=PropDescriptionExtraDataRecord(), length=lambda ctx: ctx.data('num_data_records')), + BytesBlock(length=lambda ctx: ctx.data('block_size') - 8), + ArrayBlock(child=RoadVectorsExtraDataRecord(), length=lambda ctx: ctx.data('num_data_records')), + BytesBlock(length=lambda ctx: ctx.data('block_size') - 8), + ArrayBlock(child=PropExtraDataRecord(), length=lambda ctx: ctx.data('num_data_records')), + BytesBlock(length=lambda ctx: ctx.data('block_size') - 8)], + choice_index=lambda ctx, **_: (0 if ctx.data('type') == 'textures_map' else + 1 if ctx.data('type') == 'block_numbers' else + 2 if ctx.data('type') == 'polygon_map' else + 3 if ctx.data('type') == 'median_polygons' else + 4 if ctx.data('type') == 'props_7' else + 5 if ctx.data('type') == 'prop_descriptions' else + 6 if ctx.data('type') == 'lanes' else + 7 if ctx.data('type') == 'road_vectors' else + 8 if ctx.data('type') == 'positions' else + 9 if ctx.data('type') == 'props_18' else 10) + ) class TrkBlock(DeclarativeCompoundBlock): @@ -85,7 +163,6 @@ class Fields(DeclarativeCompoundBlock.Fields): length=(lambda ctx: ctx.data('nv8') + ctx.data('nv1'), '(nv8+nv1)')) polygons = ArrayBlock(child=TrkPolygon(), length=(lambda ctx: ctx.data('np4') + ctx.data('np2') + ctx.data('np1'), '(np4+np2+np1)')) - # extrablocks = ArrayBlock(child=TrkExtraBlock(), length=(lambda ctx: ctx.data('num_extrablocks'), 'num_extrablocks')) unk2 = BytesBlock( length=lambda ctx: 64 + ctx.data('extrablocks_offset') + ctx.read_start_offset - ctx.buffer.tell()) extrablock_offsets = ArrayBlock(child=IntegerBlock(length=4, is_signed=False), diff --git a/resources/eac/videos.py b/resources/eac/videos.py index f3e0c10..9e02bba 100644 --- a/resources/eac/videos.py +++ b/resources/eac/videos.py @@ -18,4 +18,4 @@ def read(self, buffer: [BufferedReader, BytesIO], ctx: ReadContext = DataBlock.r return name def write(self, data, ctx: WriteContext = None, name: str = '') -> bytes: - raise BlockDefinitionException('Ffmpeg video cannot be written as data block') + raise BlockDefinitionException(ctx, 'Ffmpeg video cannot be written as data block') diff --git a/serializers/maps.py b/serializers/maps.py index 938b227..9ef1a32 100644 --- a/serializers/maps.py +++ b/serializers/maps.py @@ -851,9 +851,45 @@ def get_texture(tex): n_rotate = ((alignment >> 11) & 3) - rotate_i uvs = rotate_list(uvs, n_rotate) if i % 2: - uvs = uvs[::-1] # flip + uvs = uvs[::-1] # flip for i, vi in enumerate(polygon): submesh.vertex_uvs[vi] = uvs[i] + # TODO use dummies (proxy objects) generic logic here, export props separately + proxies = [item for sublist in (eb['data_records']['data'] + for eb in block['extrablocks'] + if eb['type'] in ['props_7', 'props_18']) + for item in sublist] + if len(proxies) > 0: + proxy_descr_extrablock = next(eb['data_records']['data'] for eb in block['extrablocks'] if eb['type'] == 'prop_descriptions') + for proxy in proxies: + if proxy['type'] not in ['static_prop', 'animated_prop']: + continue + object = proxy_descr_extrablock[proxy['prop_descr_idx']] + position = proxy['position']['data'] if proxy['type'] == 'static_prop' else proxy['position']['data']['frames'][0]['position'] + model = Mesh() + model.pivot_offset = (position['x'], position['y'], position['z']) + model.vertices = [[v['x'], v['y'], v['z']] for v in object['vertices']] + model.vertex_uvs = [[0, 0] for _ in range(len(model.vertices))] + texture_alignments = [] + for p in object['polygons']: + texture_name, texture_alignment = get_texture(p['texture']) + model.polygons.append([p['vertices'][0], p['vertices'][1], p['vertices'][2], p['vertices'][3]]) + model.texture_ids.append(texture_name) + texture_alignments.append(texture_alignment) + prop_sub_meshes = model.split_by_texture_ids() + # TODO UV-s are completely wrong + for submesh, _, polygon_idx_map in prop_sub_meshes: + for i, polygon in enumerate(submesh.polygons): + uvs = [[0, 1], [1, 1], [1, 0], [0, 0]] + alignment = texture_alignments[polygon_idx_map[i]] + rotate_i = (alignment >> 9) & 1 + n_rotate = ((alignment >> 11) & 3) - rotate_i + uvs = rotate_list(uvs, n_rotate) + if i % 2: + uvs = uvs[::-1] # flip + for i, vi in enumerate(polygon): + submesh.vertex_uvs[vi] = uvs[i] + sub_meshes.extend(prop_sub_meshes) chunks.append([m for m, _, _ in sub_meshes]) for meshes in chunks: for mesh in meshes: From f6f2274bbc243271857595130825ffda1e931eb2 Mon Sep 17 00:00:00 2001 From: andy Date: Thu, 2 Jan 2025 02:20:05 +0200 Subject: [PATCH 08/36] documentation --- generate_resource_doc.py | 11 +++++- library/read_blocks/array.py | 4 ++ resources/NFS2.md | 69 ++++++++++++++++++++++++++++++++-- resources/TNFS_SE.md | 2 +- resources/eac/archives.py | 2 +- resources/eac/maps/__init__.py | 5 +++ resources/eac/maps/nfs2.py | 22 +++++------ 7 files changed, 97 insertions(+), 18 deletions(-) diff --git a/generate_resource_doc.py b/generate_resource_doc.py index a3d4bb3..fa0a629 100644 --- a/generate_resource_doc.py +++ b/generate_resource_doc.py @@ -134,7 +134,9 @@ def render_type(instance: DataBlock, possible_blocks_filter=None) -> str: 'nfs2': { 'file_name': 'NFS2.md', 'title': 'NFS2 file specs', - 'file_list': f"""**\*.GEO** car 3D model. {render_type(geometries.GeoGeometry())} + 'file_list': f"""**\*.COL** track additional data. {render_type(maps.TrkMapCol())} + +**\*.GEO** car 3D model. {render_type(geometries.GeoGeometry())} **\*.FFN** bitmap font. {render_type(fonts.FfnFont())} @@ -160,9 +162,16 @@ def render_type(instance: DataBlock, possible_blocks_filter=None) -> str: geometries.GeoPolygon(), ], 'Maps': [ + maps.TrkMapCol(), maps.TrkMap(), maps.TrkSuperBlock(), maps.TrkBlock(), + maps.TrkExtraBlock(), + maps.TexturesMapExtraDataRecord(), + maps.PolygonMapExtraDataRecord(), + maps.PropExtraDataRecord(), + maps.PropDescriptionExtraDataRecord(), + maps.RoadVectorsExtraDataRecord(), maps.TrkPolygon(), ], # 'Physics': [ diff --git a/library/read_blocks/array.py b/library/read_blocks/array.py index 51e3bf2..f7242cb 100644 --- a/library/read_blocks/array.py +++ b/library/read_blocks/array.py @@ -55,6 +55,10 @@ def _multiply_docs(len_doc, size_doc): [mnsd, mxsd] = size_doc.split('..') if ('..' in size_doc) else [size_doc, size_doc] return f'{_multiply_docs(mnld, mnsd)}..{_multiply_docs(mxld, mxsd)}' else: + if '+' in str(len_doc) or '-' in str(len_doc): + len_doc = f'({len_doc})' + if '+' in str(size_doc) or '-' in str(size_doc): + size_doc = f'({size_doc})' return f'{len_doc}*{size_doc}' if self._length == 0: diff --git a/resources/NFS2.md b/resources/NFS2.md index 5f11c74..67dad5c 100644 --- a/resources/NFS2.md +++ b/resources/NFS2.md @@ -1,10 +1,12 @@ # **NFS2 file specs** # -*Last time updated: 2024-12-19 01:27:46.630683+00:00* +*Last time updated: 2025-01-02 00:18:29.011197+00:00* # **Info by file extensions** # +**\*.COL** track additional data. [TrkMapCol](#trkmapcol) + **\*.GEO** car 3D model. [GeoGeometry](#geogeometry) **\*.FFN** bitmap font. [FfnFont](#ffnfont) @@ -116,6 +118,16 @@ Did not find what you need or some given data is wrong? Please submit an | 4 | **vertex_indices** | 4 | Array of `4` items
Item size: 1 byte
Item type: 1-byte unsigned integer | Indexes of vertices | | 8 | **texture_name** | 4 | UTF-8 string | ID of texture from neighbouring QFS file | ## **Maps** ## +### **TrkMapCol** ### +#### **Size**: 16..? bytes #### +| Offset | Name | Size (bytes) | Type | Description | +| --- | --- | --- | --- | --- | +| 0 | **resource_id** | 4 | UTF-8 string. Always == "COLL" | Resource ID | +| 4 | **unk** | 4 | 4-bytes unsigned integer (little endian). Always == 0xb | - | +| 8 | **block_size** | 4 | 4-bytes unsigned integer (little endian) | File size | +| 12 | **num_extrablocks** | 4 | 4-bytes unsigned integer (little endian) | Number of extrablocks | +| 16 | **extrablock_offsets** | num_extrablocks\*4 | Array of `num_extrablocks` items
Item size: 4 bytes
Item type: 4-bytes unsigned integer (little endian) | - | +| 16 + num_extrablocks\*4 | **extrablocks** | ? | Array of `num_extrablocks` items
Item type: [TrkExtraBlock](#trkextrablock) | - | ### **TrkMap** ### #### **Size**: 32..? bytes #### #### **Description**: Main track file #### @@ -157,9 +169,58 @@ Did not find what you need or some given data is wrong? Please submit an | 78 | **np2** | 2 | 2-bytes unsigned integer (little endian) | | | 80 | **np1** | 2 | 2-bytes unsigned integer (little endian) | | | 82 | **unk1** | 6 | 6-bytes unsigned integer (little endian) | Unknown purpose | -| 88 | **vertices** | (nv8+nv1)\*6 | Array of `(nv8+nv1)` items
Item size: 6 bytes
Item type: Point in 3D space (x,y,z), where each coordinate is: 16-bit real number (little-endian, signed), where last 8 bits is a fractional part. The unit is meter | - | -| 88 + (nv8+nv1)\*6 | **polygons** | (np4+np2+np1)\*8 | Array of `(np4+np2+np1)` items
Item type: [TrkPolygon](#trkpolygon) | - | -| 88 + (nv8+nv1)\*6 + (np4+np2+np1)\*8 | **tmp** | custom_func | Bytes | - | +| 88 | **vertices** | (nv8+nv1)\*6 | Array of `nv8+nv1` items
Item size: 6 bytes
Item type: Point in 3D space (x,y,z), where each coordinate is: 16-bit real number (little-endian, signed), where last 8 bits is a fractional part. The unit is meter | - | +| 88 + (nv8+nv1)\*6 | **polygons** | (np4+np2+np1)\*8 | Array of `np4+np2+np1` items
Item type: [TrkPolygon](#trkpolygon) | - | +| 88 + (nv8+nv1)\*6 + (np4+np2+np1)\*8 | **unk2** | custom_func | Bytes | - | +| 88 + (nv8+nv1)\*6 + (np4+np2+np1)\*8 + custom_func | **extrablock_offsets** | num_extrablocks\*4 | Array of `num_extrablocks` items
Item size: 4 bytes
Item type: 4-bytes unsigned integer (little endian) | - | +| 88 + (nv8+nv1)\*6 + (np4+np2+np1)\*8 + custom_func + num_extrablocks\*4 | **extrablocks** | ? | Array of `num_extrablocks` items
Item type: [TrkExtraBlock](#trkextrablock) | - | +### **TrkExtraBlock** ### +#### **Size**: 8..? bytes #### +| Offset | Name | Size (bytes) | Type | Description | +| --- | --- | --- | --- | --- | +| 0 | **block_size** | 4 | 4-bytes unsigned integer (little endian) | Block size | +| 4 | **type** | 1 | Enum of 256 possible values
Value names:2: textures_map
4: block_numbers
5: polygon_map
6: median_polygons
7: props_7
8: prop_descriptions
9: lanes
13: road_vectors
15: positions
18: props_18
| - | +| 5 | **unk** | 1 | 1-byte unsigned integer. Always == 0x0 | - | +| 6 | **num_data_records** | 2 | 2-bytes unsigned integer (little endian) | - | +| 8 | **data_records** | ? | One of types:
- Array of `num_data_records` items
Item type: [TexturesMapExtraDataRecord](#texturesmapextradatarecord)
- Array of `num_data_records` items
Item size: 2 bytes
Item type: 2-bytes unsigned integer (little endian)
- Array of `num_data_records` items
Item type: [PolygonMapExtraDataRecord](#polygonmapextradatarecord)
- Bytes
- Array of `num_data_records` items
Item type: [PropExtraDataRecord](#propextradatarecord)
- Array of `num_data_records` items
Item type: [PropDescriptionExtraDataRecord](#propdescriptionextradatarecord)
- Bytes
- Array of `num_data_records` items
Item type: [RoadVectorsExtraDataRecord](#roadvectorsextradatarecord)
- Bytes
- Array of `num_data_records` items
Item type: [PropExtraDataRecord](#propextradatarecord)
- Bytes | - | +### **TexturesMapExtraDataRecord** ### +#### **Size**: 10 bytes #### +| Offset | Name | Size (bytes) | Type | Description | +| --- | --- | --- | --- | --- | +| 0 | **texture_number** | 2 | 2-bytes unsigned integer (little endian) | - | +| 2 | **alignment_data** | 2 | 2-bytes unsigned integer (little endian) | - | +| 4 | **rgb0** | 3 | 3-bytes unsigned integer (little endian) | - | +| 7 | **rgb1** | 3 | 3-bytes unsigned integer (little endian) | - | +### **PolygonMapExtraDataRecord** ### +#### **Size**: 2 bytes #### +| Offset | Name | Size (bytes) | Type | Description | +| --- | --- | --- | --- | --- | +| 0 | **vectors_idx** | 1 | 1-byte unsigned integer | - | +| 1 | **car_behavior** | 1 | Enum of 256 possible values
Value names:0: unk0
1: unk1
| - | +### **PropExtraDataRecord** ### +#### **Size**: 4..? bytes #### +| Offset | Name | Size (bytes) | Type | Description | +| --- | --- | --- | --- | --- | +| 0 | **block_size** | 2 | 2-bytes unsigned integer (little endian) | Block size | +| 2 | **type** | 1 | Enum of 256 possible values
Value names:1: static_prop
3: animated_prop
| - | +| 3 | **prop_descr_idx** | 1 | 1-byte unsigned integer | - | +| 4 | **position** | ? | One of types:
- Point in 3D space (x,y,z), where each coordinate is: 32-bit real number (little-endian, signed), where last 16 bits is a fractional part. The unit is meter
- Bytes | - | +### **PropDescriptionExtraDataRecord** ### +#### **Size**: 8..? bytes #### +| Offset | Name | Size (bytes) | Type | Description | +| --- | --- | --- | --- | --- | +| 0 | **block_size** | 4 | 4-bytes unsigned integer (little endian) | Block size | +| 4 | **num_vertices** | 2 | 2-bytes unsigned integer (little endian) | | +| 6 | **num_polygons** | 2 | 2-bytes unsigned integer (little endian) | | +| 8 | **vertices** | num_vertices\*6 | Array of `num_vertices` items
Item size: 6 bytes
Item type: Point in 3D space (x,y,z), where each coordinate is: 16-bit real number (little-endian, signed), where last 8 bits is a fractional part. The unit is meter | - | +| 8 + num_vertices\*6 | **polygons** | num_polygons\*8 | Array of `num_polygons` items
Item type: [TrkPolygon](#trkpolygon) | - | +| 8 + num_vertices\*6 + num_polygons\*8 | **padding** | custom_func | Bytes | - | +### **RoadVectorsExtraDataRecord** ### +#### **Size**: 12 bytes #### +| Offset | Name | Size (bytes) | Type | Description | +| --- | --- | --- | --- | --- | +| 0 | **normal** | 6 | Point in 3D space (x,y,z), where each coordinate is: 16-bit real number (little-endian, signed), where last 15 bits is a fractional part, normalized. The unit is meter | - | +| 6 | **forward** | 6 | Point in 3D space (x,y,z), where each coordinate is: 16-bit real number (little-endian, signed), where last 15 bits is a fractional part, normalized. The unit is meter | - | ### **TrkPolygon** ### #### **Size**: 8 bytes #### | Offset | Name | Size (bytes) | Type | Description | diff --git a/resources/TNFS_SE.md b/resources/TNFS_SE.md index c9bcef2..fe48d1b 100644 --- a/resources/TNFS_SE.md +++ b/resources/TNFS_SE.md @@ -71,7 +71,7 @@ Did not find what you need or some given data is wrong? Please submit an | Offset | Name | Size (bytes) | Type | Description | | --- | --- | --- | --- | --- | | 0 | **items_descr** | 512 | Array of `128` items
Item size: 4 bytes
Item type: 4-bytes unsigned integer (little endian) | An array of offsets to items data in file. Zero values ignored | -| 512 | **items** | (amount of non-zero elements in items_descr)\*72 | Array of `(amount of non-zero elements in items_descr)` items
Item type: [SoundBankHeaderEntry](#soundbankheaderentry) | EACS audio headers. Separate audios can be read easily using these because it contains file-wide offset to wave data, so it does not care wave data located, right after EACS header, or somewhere else like it is here in sound bank file | +| 512 | **items** | (amount of non-zero elements in items_descr)\*72 | Array of `amount of non-zero elements in items_descr` items
Item type: [SoundBankHeaderEntry](#soundbankheaderentry) | EACS audio headers. Separate audios can be read easily using these because it contains file-wide offset to wave data, so it does not care wave data located, right after EACS header, or somewhere else like it is here in sound bank file | | 512 + (amount of non-zero elements in items_descr)\*72 | **wave_data** | up to end of file | Bytes | Raw byte data, which is sliced according to provided offsets and used as wave data | | N/A | **children** | 0 | Array of `0` items
Item type: [EacsAudioFile](#eacsaudiofile) | Disregard this field, it is generated by parser from the data from previous fields for convenience: essentially this file is a set of EACS audio-s, but their structure is dispersed across the file | ## **Geometries** ## diff --git a/resources/eac/archives.py b/resources/eac/archives.py index d72aff0..15a7426 100644 --- a/resources/eac/archives.py +++ b/resources/eac/archives.py @@ -401,7 +401,7 @@ class Fields(DeclarativeCompoundBlock.Fields): {'description': 'An array of offsets to items data in file. Zero values ignored'}) items = (ArrayBlock(child=SoundBankHeaderEntry(), length=(lambda ctx: len([x for x in ctx.data('items_descr') if x > 0]), - '(amount of non-zero elements in items_descr)')), + 'amount of non-zero elements in items_descr')), {'description': 'EACS audio headers. Separate audios can be read easily using these because ' 'it contains file-wide offset to wave data, so it does not care wave data located, ' 'right after EACS header, or somewhere else like it is here in sound bank file'}) diff --git a/resources/eac/maps/__init__.py b/resources/eac/maps/__init__.py index 8117239..2e36eb6 100644 --- a/resources/eac/maps/__init__.py +++ b/resources/eac/maps/__init__.py @@ -4,6 +4,11 @@ TrkBlock, TrkPolygon, TrkMapCol, + TexturesMapExtraDataRecord, + PolygonMapExtraDataRecord, + PropExtraDataRecord, + PropDescriptionExtraDataRecord, + RoadVectorsExtraDataRecord, ) from .tnfs import (RoadSplinePoint, ModelPropDescrData, diff --git a/resources/eac/maps/nfs2.py b/resources/eac/maps/nfs2.py index 44b355b..999e8f0 100644 --- a/resources/eac/maps/nfs2.py +++ b/resources/eac/maps/nfs2.py @@ -73,9 +73,9 @@ class Fields(DeclarativeCompoundBlock.Fields): {'description': '', 'programmatic_value': lambda ctx: len(ctx.data('polygons'))}) vertices = ArrayBlock(child=Point3D_16(), - length=(lambda ctx: ctx.data('num_vertices'), 'num_vertices')) + length=lambda ctx: ctx.data('num_vertices')) polygons = ArrayBlock(child=TrkPolygon(), - length=(lambda ctx: ctx.data('num_polygons'), 'num_polygons')) + length=lambda ctx: ctx.data('num_polygons')) padding = BytesBlock(length=lambda ctx: ctx.data('block_size') - ctx.buffer.tell() + ctx.read_start_offset) @@ -160,13 +160,13 @@ class Fields(DeclarativeCompoundBlock.Fields): unk1 = (IntegerBlock(length=6), {'is_unknown': True}) vertices = ArrayBlock(child=Point3D_16(), - length=(lambda ctx: ctx.data('nv8') + ctx.data('nv1'), '(nv8+nv1)')) + length=lambda ctx: ctx.data('nv8') + ctx.data('nv1')) polygons = ArrayBlock(child=TrkPolygon(), - length=(lambda ctx: ctx.data('np4') + ctx.data('np2') + ctx.data('np1'), '(np4+np2+np1)')) + length=lambda ctx: ctx.data('np4') + ctx.data('np2') + ctx.data('np1')) unk2 = BytesBlock( length=lambda ctx: 64 + ctx.data('extrablocks_offset') + ctx.read_start_offset - ctx.buffer.tell()) extrablock_offsets = ArrayBlock(child=IntegerBlock(length=4, is_signed=False), - length=(lambda ctx: ctx.data('num_extrablocks'), 'num_extrablocks')) + length=lambda ctx: ctx.data('num_extrablocks')) extrablocks = ArrayBlock(length=(0, 'num_extrablocks'), child=TrkExtraBlock()) def read(self, buffer: [BufferedReader, BytesIO], ctx: ReadContext = DataBlock.root_read_ctx, name: str = '', @@ -193,9 +193,9 @@ class Fields(DeclarativeCompoundBlock.Fields): unk = (IntegerBlock(length=4), {'is_unknown': True}) block_offsets = ArrayBlock(child=IntegerBlock(length=4, is_signed=False), - length=(lambda ctx: ctx.data('num_blocks'), 'num_blocks')) + length=lambda ctx: ctx.data('num_blocks')) blocks = (ArrayBlock(child=TrkBlock(), - length=(lambda ctx: ctx.data('num_blocks'), 'num_blocks')), + length=lambda ctx: ctx.data('num_blocks')), {'description': 'Blocks'}) @@ -217,15 +217,15 @@ class Fields(DeclarativeCompoundBlock.Fields): num_blocks = (IntegerBlock(length=4, is_signed=False), {'description': 'Number of blocks (nblk)'}) superblock_offsets = ArrayBlock(child=IntegerBlock(length=4, is_signed=False), - length=(lambda ctx: ctx.data('num_superblocks'), 'num_superblocks')) + length=lambda ctx: ctx.data('num_superblocks')) block_positions = (ArrayBlock(child=Point3D_32(), - length=(lambda ctx: ctx.data('num_blocks'), 'num_blocks')), + length=lambda ctx: ctx.data('num_blocks')), {'description': 'Coordinates of road spline points in 3D space'}) skip_bytes = (BytesBlock(length=(lambda ctx: ctx.data('superblock_offsets/0') - ctx.buffer.tell(), 'up to offset superblock_offsets[0]')), {'description': 'Useless padding'}) superblocks = (ArrayBlock(child=TrkSuperBlock(), - length=(lambda ctx: ctx.data('num_superblocks'), 'num_superblocks')), + length=lambda ctx: ctx.data('num_superblocks')), {'description': 'Superblocks', 'custom_offset': 'superblock_offsets[0]'}) @@ -241,7 +241,7 @@ class Fields(DeclarativeCompoundBlock.Fields): num_extrablocks = (IntegerBlock(length=4, is_signed=False), {'description': 'Number of extrablocks'}) extrablock_offsets = ArrayBlock(child=IntegerBlock(length=4, is_signed=False), - length=(lambda ctx: ctx.data('num_extrablocks'), 'num_extrablocks')) + length=lambda ctx: ctx.data('num_extrablocks')) extrablocks = ArrayBlock(length=(0, 'num_extrablocks'), child=TrkExtraBlock()) def read(self, buffer: [BufferedReader, BytesIO], ctx: ReadContext = DataBlock.root_read_ctx, name: str = '', From bbeb1f2a977179cdcc7a22a6e37a590362b8c4db Mon Sep 17 00:00:00 2001 From: andy Date: Thu, 2 Jan 2025 03:08:46 +0200 Subject: [PATCH 09/36] code adjustments --- resources/NFS2.md | 117 ++++++++++++++++++++++++++++++++++- resources/eac/fields/misc.py | 42 +++++-------- resources/eac/maps/nfs2.py | 35 ++++++----- 3 files changed, 149 insertions(+), 45 deletions(-) diff --git a/resources/NFS2.md b/resources/NFS2.md index ab05db6..45537e0 100644 --- a/resources/NFS2.md +++ b/resources/NFS2.md @@ -1,10 +1,12 @@ # **NFS2 file specs** # -*Last time updated: 2025-01-02 00:50:58.022535+00:00* +*Last time updated: 2025-01-02 01:05:35.351955+00:00* # **Info by file extensions** # +**\*.COL** track additional data. [TrkMapCol](#trkmapcol) + **\*.GEO** car 3D model. [GeoGeometry](#geogeometry) **\*.FFN** bitmap font. [FfnFont](#ffnfont) @@ -15,6 +17,8 @@ **\*.QFS** image archive. [ShpiBlock](#shpiblock), **compressed** (compression algorithms not documented, can be found in resources/eac/compressions/) +**\*.TRK** main track file. [TrkMap](#trkmap) + **\*.UV** video, I just use ffmpeg to convert it **\*.VIV** archive with some data. [BigfBlock](#bigfblock) @@ -113,6 +117,117 @@ Did not find what you need or some given data is wrong? Please submit an | 1 | **unk0** | 3 | 3-bytes unsigned integer (little endian) | Unknown purpose | | 4 | **vertex_indices** | 4 | Array of `4` items
Item size: 1 byte
Item type: 1-byte unsigned integer | Indexes of vertices | | 8 | **texture_name** | 4 | UTF-8 string | ID of texture from neighbouring QFS file | +## **Maps** ## +### **TrkMapCol** ### +#### **Size**: 16..? bytes #### +| Offset | Name | Size (bytes) | Type | Description | +| --- | --- | --- | --- | --- | +| 0 | **resource_id** | 4 | UTF-8 string. Always == "COLL" | Resource ID | +| 4 | **unk** | 4 | 4-bytes unsigned integer (little endian). Always == 0xb | - | +| 8 | **block_size** | 4 | 4-bytes unsigned integer (little endian) | File size | +| 12 | **num_extrablocks** | 4 | 4-bytes unsigned integer (little endian) | Number of extrablocks | +| 16 | **extrablock_offsets** | num_extrablocks\*4 | Array of `num_extrablocks` items
Item size: 4 bytes
Item type: 4-bytes unsigned integer (little endian) | - | +| 16 + num_extrablocks\*4 | **extrablocks** | ? | Array of `num_extrablocks` items
Item type: [TrkExtraBlock](#trkextrablock) | - | +### **TrkMap** ### +#### **Size**: 32..? bytes #### +#### **Description**: Main track file #### +| Offset | Name | Size (bytes) | Type | Description | +| --- | --- | --- | --- | --- | +| 0 | **resource_id** | 4 | UTF-8 string. Always == "TRAC" | Resource ID | +| 4 | **unk0** | 20 | Bytes | Unknown purpose | +| 24 | **num_superblocks** | 4 | 4-bytes unsigned integer (little endian) | Number of superblocks (nsblk) | +| 28 | **num_blocks** | 4 | 4-bytes unsigned integer (little endian) | Number of blocks (nblk) | +| 32 | **superblock_offsets** | num_superblocks\*4 | Array of `num_superblocks` items
Item size: 4 bytes
Item type: 4-bytes unsigned integer (little endian) | - | +| 32 + num_superblocks\*4 | **block_positions** | num_blocks\*12 | Array of `num_blocks` items
Item size: 12 bytes
Item type: Point in 3D space (x,y,z), where each coordinate is: 32-bit real number (little-endian, signed), where last 16 bits is a fractional part | Coordinates of road spline points in 3D space | +| 32 + num_superblocks\*4 + num_blocks\*12 | **skip_bytes** | up to offset superblock_offsets[0] | Bytes | Useless padding | +| superblock_offsets[0] | **superblocks** | num_superblocks\*12..? | Array of `num_superblocks` items
Item type: [TrkSuperBlock](#trksuperblock) | Superblocks | +### **TrkSuperBlock** ### +#### **Size**: 12..? bytes #### +| Offset | Name | Size (bytes) | Type | Description | +| --- | --- | --- | --- | --- | +| 0 | **block_size** | 4 | 4-bytes unsigned integer (little endian) | Superblock size | +| 4 | **num_blocks** | 4 | 4-bytes unsigned integer (little endian) | Number of blocks in this superblock. Usually 8 or less in the last superblock | +| 8 | **unk** | 4 | 4-bytes unsigned integer (little endian) | Unknown purpose | +| 12 | **block_offsets** | num_blocks\*4 | Array of `num_blocks` items
Item size: 4 bytes
Item type: 4-bytes unsigned integer (little endian) | - | +| 12 + num_blocks\*4 | **blocks** | num_blocks\*88..? | Array of `num_blocks` items
Item type: [TrkBlock](#trkblock) | Blocks | +### **TrkBlock** ### +#### **Size**: 88..? bytes #### +| Offset | Name | Size (bytes) | Type | Description | +| --- | --- | --- | --- | --- | +| 0 | **block_size** | 4 | 4-bytes unsigned integer (little endian) | Block size | +| 4 | **block_size_2** | 4 | 4-bytes unsigned integer (little endian) | Block size (duplicated) | +| 8 | **num_extrablocks** | 2 | 2-bytes unsigned integer (little endian) | number of extrablocks | +| 10 | **unk0** | 2 | 2-bytes unsigned integer (little endian) | Unknown purpose | +| 12 | **block_idx** | 4 | 4-bytes unsigned integer (little endian) | Block index (serial number) | +| 16 | **bounds** | 48 | Array of `4` items
Item size: 12 bytes
Item type: Point in 3D space (x,y,z), where each coordinate is: 32-bit real number (little-endian, signed), where last 16 bits is a fractional part | Block bounding rectangle | +| 64 | **extrablocks_offset** | 4 | 4-bytes unsigned integer (little endian) | | +| 68 | **nv8** | 2 | 2-bytes unsigned integer (little endian) | | +| 70 | **nv4** | 2 | 2-bytes unsigned integer (little endian) | | +| 72 | **nv2** | 2 | 2-bytes unsigned integer (little endian) | | +| 74 | **nv1** | 2 | 2-bytes unsigned integer (little endian) | | +| 76 | **np4** | 2 | 2-bytes unsigned integer (little endian) | | +| 78 | **np2** | 2 | 2-bytes unsigned integer (little endian) | | +| 80 | **np1** | 2 | 2-bytes unsigned integer (little endian) | | +| 82 | **unk1** | 6 | 6-bytes unsigned integer (little endian) | Unknown purpose | +| 88 | **vertices** | (nv8+nv1)\*6 | Array of `nv8+nv1` items
Item size: 6 bytes
Item type: Point in 3D space (x,y,z), where each coordinate is: 16-bit real number (little-endian, signed), where last 8 bits is a fractional part | - | +| 88 + (nv8+nv1)\*6 | **polygons** | (np4+np2+np1)\*8 | Array of `np4+np2+np1` items
Item type: [TrkPolygon](#trkpolygon) | - | +| 88 + (nv8+nv1)\*6 + (np4+np2+np1)\*8 | **unk2** | custom_func | Bytes | - | +| 88 + (nv8+nv1)\*6 + (np4+np2+np1)\*8 + custom_func | **extrablock_offsets** | num_extrablocks\*4 | Array of `num_extrablocks` items
Item size: 4 bytes
Item type: 4-bytes unsigned integer (little endian) | - | +| 88 + (nv8+nv1)\*6 + (np4+np2+np1)\*8 + custom_func + num_extrablocks\*4 | **extrablocks** | ? | Array of `num_extrablocks` items
Item type: [TrkExtraBlock](#trkextrablock) | - | +### **TrkExtraBlock** ### +#### **Size**: 8..? bytes #### +| Offset | Name | Size (bytes) | Type | Description | +| --- | --- | --- | --- | --- | +| 0 | **block_size** | 4 | 4-bytes unsigned integer (little endian) | Block size | +| 4 | **type** | 1 | Enum of 256 possible values
Value names:2: textures_map
4: block_numbers
5: polygon_map
6: median_polygons
7: props_7
8: prop_descriptions
9: lanes
13: road_vectors
15: positions
18: props_18
| - | +| 5 | **unk** | 1 | 1-byte unsigned integer. Always == 0x0 | - | +| 6 | **num_data_records** | 2 | 2-bytes unsigned integer (little endian) | - | +| 8 | **data_records** | ? | One of types:
- Array of `num_data_records` items
Item type: [TexturesMapExtraDataRecord](#texturesmapextradatarecord)
- Array of `num_data_records` items
Item size: 2 bytes
Item type: 2-bytes unsigned integer (little endian)
- Array of `num_data_records` items
Item type: [PolygonMapExtraDataRecord](#polygonmapextradatarecord)
- Bytes
- Array of `num_data_records` items
Item type: [PropExtraDataRecord](#propextradatarecord)
- Array of `num_data_records` items
Item type: [PropDescriptionExtraDataRecord](#propdescriptionextradatarecord)
- Bytes
- Array of `num_data_records` items
Item type: [RoadVectorsExtraDataRecord](#roadvectorsextradatarecord)
- Bytes
- Array of `num_data_records` items
Item type: [PropExtraDataRecord](#propextradatarecord)
- Bytes | - | +### **TexturesMapExtraDataRecord** ### +#### **Size**: 10 bytes #### +| Offset | Name | Size (bytes) | Type | Description | +| --- | --- | --- | --- | --- | +| 0 | **texture_number** | 2 | 2-bytes unsigned integer (little endian) | - | +| 2 | **alignment_data** | 2 | 2-bytes unsigned integer (little endian) | - | +| 4 | **rgb0** | 3 | 3-bytes unsigned integer (little endian) | - | +| 7 | **rgb1** | 3 | 3-bytes unsigned integer (little endian) | - | +### **PolygonMapExtraDataRecord** ### +#### **Size**: 2 bytes #### +| Offset | Name | Size (bytes) | Type | Description | +| --- | --- | --- | --- | --- | +| 0 | **vectors_idx** | 1 | 1-byte unsigned integer | - | +| 1 | **car_behavior** | 1 | Enum of 256 possible values
Value names:0: unk0
1: unk1
| - | +### **PropExtraDataRecord** ### +#### **Size**: 4..? bytes #### +| Offset | Name | Size (bytes) | Type | Description | +| --- | --- | --- | --- | --- | +| 0 | **block_size** | 2 | 2-bytes unsigned integer (little endian) | Block size | +| 2 | **type** | 1 | Enum of 256 possible values
Value names:1: static_prop
3: animated_prop
| - | +| 3 | **prop_descr_idx** | 1 | 1-byte unsigned integer | - | +| 4 | **position** | ? | One of types:
- Point in 3D space (x,y,z), where each coordinate is: 32-bit real number (little-endian, signed), where last 16 bits is a fractional part
- Bytes | - | +### **PropDescriptionExtraDataRecord** ### +#### **Size**: 8..? bytes #### +| Offset | Name | Size (bytes) | Type | Description | +| --- | --- | --- | --- | --- | +| 0 | **block_size** | 4 | 4-bytes unsigned integer (little endian) | Block size | +| 4 | **num_vertices** | 2 | 2-bytes unsigned integer (little endian) | | +| 6 | **num_polygons** | 2 | 2-bytes unsigned integer (little endian) | | +| 8 | **vertices** | num_vertices\*6 | Array of `num_vertices` items
Item size: 6 bytes
Item type: Point in 3D space (x,y,z), where each coordinate is: 16-bit real number (little-endian, signed), where last 8 bits is a fractional part | - | +| 8 + num_vertices\*6 | **polygons** | num_polygons\*8 | Array of `num_polygons` items
Item type: [TrkPolygon](#trkpolygon) | - | +| 8 + num_vertices\*6 + num_polygons\*8 | **padding** | custom_func | Bytes | - | +### **RoadVectorsExtraDataRecord** ### +#### **Size**: 12 bytes #### +| Offset | Name | Size (bytes) | Type | Description | +| --- | --- | --- | --- | --- | +| 0 | **normal** | 6 | Point in 3D space (x,y,z), where each coordinate is: 16-bit real number (little-endian, signed), where last 15 bits is a fractional part, normalized | - | +| 6 | **forward** | 6 | Point in 3D space (x,y,z), where each coordinate is: 16-bit real number (little-endian, signed), where last 15 bits is a fractional part, normalized | - | +### **TrkPolygon** ### +#### **Size**: 8 bytes #### +| Offset | Name | Size (bytes) | Type | Description | +| --- | --- | --- | --- | --- | +| 0 | **texture** | 2 | 2-bytes unsigned integer (little endian) | Texture number | +| 2 | **texture2** | 2 | 2-bytes signed integer (little endian) | 255 (texture number for the other side == none ?) | +| 4 | **vertices** | 4 | Array of `4` items
Item size: 1 byte
Item type: 1-byte unsigned integer | - | ## **Bitmaps** ## ### **Bitmap4Bit** ### #### **Size**: 16..? bytes #### diff --git a/resources/eac/fields/misc.py b/resources/eac/fields/misc.py index 54d0a69..3bfce07 100644 --- a/resources/eac/fields/misc.py +++ b/resources/eac/fields/misc.py @@ -3,7 +3,7 @@ from typing import Dict from library.context import WriteContext, ReadContext -from library.read_blocks import DeclarativeCompoundBlock, IntegerBlock, DataBlock, CompoundBlock +from library.read_blocks import IntegerBlock, DataBlock, CompoundBlock from resources.eac.fields.numbers import RationalNumber @@ -15,43 +15,31 @@ def schema(self) -> Dict: return { **super().schema, 'block_description': 'Point in 3D space (x,y,z), where each coordinate is: ' - + schema['fields'][0]['schema']['block_description'], + + schema['fields'][0]['schema']['block_description'] + ( + ', normalized' if self.normalized else '' + ), 'inline_description': True, } - def __init__(self, child_length, fraction_bits=0, is_signed=True, **kwargs): + def __init__(self, child_length, fraction_bits=0, is_signed=True, normalized=False, **kwargs): child = RationalNumber(length=child_length, fraction_bits=fraction_bits, is_signed=is_signed) + self.normalized = normalized super().__init__(fields=[('x', child, {}), ('y', child, {}), ('z', child, {})], **kwargs) -class Point3D_16_15_Normalized(DeclarativeCompoundBlock): - - @property - def schema(self) -> Dict: - return { - **super().schema, - 'block_description': 'Point in 3D space (x,y,z), where each coordinate is: ' - + RationalNumber(length=2, fraction_bits=15, is_signed=True).schema['block_description'] - + ', normalized. The unit is meter', - 'inline_description': True, - } - - class Fields(DeclarativeCompoundBlock.Fields): - x = RationalNumber(length=2, fraction_bits=15, is_signed=True) - y = RationalNumber(length=2, fraction_bits=15, is_signed=True) - z = RationalNumber(length=2, fraction_bits=15, is_signed=True) - def write(self, data, ctx: WriteContext = None, name: str = '') -> bytes: - length = math.sqrt(data['x']**2 + data['y']**2 + data['z']**2) - if length == 0: - data['z'] = 1.0 - elif length != 1: - data['x'] /= length - data['y'] /= length - data['z'] /= length + if self.normalized: + length = math.sqrt(data['x'] ** 2 + data['y'] ** 2 + data['z'] ** 2) + if length == 0: + data['z'] = 1.0 + elif length != 1: + data['x'] /= length + data['y'] /= length + data['z'] /= length return super().write(data, ctx, name) + class FenceType(IntegerBlock): @property def schema(self) -> Dict: diff --git a/resources/eac/maps/nfs2.py b/resources/eac/maps/nfs2.py index 999e8f0..87fcc8c 100644 --- a/resources/eac/maps/nfs2.py +++ b/resources/eac/maps/nfs2.py @@ -6,7 +6,7 @@ IntegerBlock, UTF8Block, BytesBlock, ArrayBlock, DataBlock, DelegateBlock, CompoundBlock) from library.read_blocks.numbers import EnumByteBlock -from resources.eac.fields.misc import Point3D_32, Point3D_16, Point3D_16_15_Normalized +from resources.eac.fields.misc import Point3D class TrkPolygon(DeclarativeCompoundBlock): @@ -43,19 +43,20 @@ class Fields(DeclarativeCompoundBlock.Fields): ]) prop_descr_idx = IntegerBlock(length=1, is_signed=False) position = DelegateBlock(possible_blocks=[ - Point3D_32(), + Point3D(child_length=4, fraction_bits=16), CompoundBlock(fields=[('num_frames', IntegerBlock(length=2, is_signed=False), {}), ('unk', IntegerBlock(length=2), {'is_unknown': True}), ('frames', ArrayBlock(length=lambda ctx: ctx.data('num_frames'), - child=CompoundBlock(fields=[('position', Point3D_32(), {}), - ('unk0', IntegerBlock(length=2), - {'is_unknown': True}), - ('unk1', IntegerBlock(length=2), - {'is_unknown': True}), - ('unk2', IntegerBlock(length=2), - {'is_unknown': True}), - ('unk3', IntegerBlock(length=2), - {'is_unknown': True})])), {})]), + child=CompoundBlock(fields=[ + ('position', Point3D(child_length=4, fraction_bits=16), {}), + ('unk0', IntegerBlock(length=2), + {'is_unknown': True}), + ('unk1', IntegerBlock(length=2), + {'is_unknown': True}), + ('unk2', IntegerBlock(length=2), + {'is_unknown': True}), + ('unk3', IntegerBlock(length=2), + {'is_unknown': True})])), {})]), BytesBlock(length=lambda ctx: ctx.data('block_size') - 4)], choice_index=lambda ctx, **_: (0 if ctx.data('type') == 'static_prop' else 1 if ctx.data('type') == 'animated_prop' else 2) @@ -72,7 +73,7 @@ class Fields(DeclarativeCompoundBlock.Fields): num_polygons = (IntegerBlock(length=2, is_signed=False), {'description': '', 'programmatic_value': lambda ctx: len(ctx.data('polygons'))}) - vertices = ArrayBlock(child=Point3D_16(), + vertices = ArrayBlock(child=Point3D(child_length=2, fraction_bits=8), length=lambda ctx: ctx.data('num_vertices')) polygons = ArrayBlock(child=TrkPolygon(), length=lambda ctx: ctx.data('num_polygons')) @@ -81,8 +82,8 @@ class Fields(DeclarativeCompoundBlock.Fields): class RoadVectorsExtraDataRecord(DeclarativeCompoundBlock): class Fields(DeclarativeCompoundBlock.Fields): - normal = Point3D_16_15_Normalized() - forward = Point3D_16_15_Normalized() + normal = Point3D(child_length=2, fraction_bits=15, normalized=True) + forward = Point3D(child_length=2, fraction_bits=15, normalized=True) class TrkExtraBlock(DeclarativeCompoundBlock): @@ -139,7 +140,7 @@ class Fields(DeclarativeCompoundBlock.Fields): {'is_unknown': True}) block_idx = (IntegerBlock(length=4, is_signed=False), {'description': 'Block index (serial number)'}) - bounds = (ArrayBlock(child=Point3D_32(), length=4), + bounds = (ArrayBlock(child=Point3D(child_length=4, fraction_bits=16), length=4), {'description': 'Block bounding rectangle'}) extrablocks_offset = (IntegerBlock(length=4, is_signed=False), {'description': ''}) @@ -159,7 +160,7 @@ class Fields(DeclarativeCompoundBlock.Fields): {'description': ''}) unk1 = (IntegerBlock(length=6), {'is_unknown': True}) - vertices = ArrayBlock(child=Point3D_16(), + vertices = ArrayBlock(child=Point3D(child_length=2, fraction_bits=8), length=lambda ctx: ctx.data('nv8') + ctx.data('nv1')) polygons = ArrayBlock(child=TrkPolygon(), length=lambda ctx: ctx.data('np4') + ctx.data('np2') + ctx.data('np1')) @@ -218,7 +219,7 @@ class Fields(DeclarativeCompoundBlock.Fields): {'description': 'Number of blocks (nblk)'}) superblock_offsets = ArrayBlock(child=IntegerBlock(length=4, is_signed=False), length=lambda ctx: ctx.data('num_superblocks')) - block_positions = (ArrayBlock(child=Point3D_32(), + block_positions = (ArrayBlock(child=Point3D(child_length=4, fraction_bits=16), length=lambda ctx: ctx.data('num_blocks')), {'description': 'Coordinates of road spline points in 3D space'}) skip_bytes = (BytesBlock(length=(lambda ctx: ctx.data('superblock_offsets/0') - ctx.buffer.tell(), From fe5e1675a3ae4e6ad9cfc9de66d5438ca4081d96 Mon Sep 17 00:00:00 2001 From: andy Date: Thu, 2 Jan 2025 15:44:15 +0200 Subject: [PATCH 10/36] merged frontend changes --- frontend/dist/gui/index.html | 2 +- frontend/dist/gui/main.928a3d541cec2813.js | 1 - ...314b7ff5b0.js => main.93e6f667a9a3161b.js} | 2 +- .../common/minimap/minimap.component.html | 30 ++ .../common/minimap/minimap.component.ts | 289 ++++++++++++++++++ .../trk-map.block-ui.component.html | 8 +- .../trk-map.block-ui.component.scss | 2 +- .../trk-map.block-ui.component.ts | 29 +- 8 files changed, 345 insertions(+), 18 deletions(-) delete mode 100644 frontend/dist/gui/main.928a3d541cec2813.js rename frontend/dist/gui/{main.400d34314b7ff5b0.js => main.93e6f667a9a3161b.js} (77%) create mode 100644 frontend/src/app/components/editor/common/minimap/minimap.component.html create mode 100644 frontend/src/app/components/editor/common/minimap/minimap.component.ts diff --git a/frontend/dist/gui/index.html b/frontend/dist/gui/index.html index c12b9d5..f051a0e 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.928a3d541cec2813.js b/frontend/dist/gui/main.928a3d541cec2813.js deleted file mode 100644 index 436b982..0000000 --- a/frontend/dist/gui/main.928a3d541cec2813.js +++ /dev/null @@ -1 +0,0 @@ -(self.webpackChunkgui=self.webpackChunkgui||[]).push([[179],{805:(Oo,zs,ps)=>{"use strict";function cn(i){return"function"==typeof i}function V(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 Br=V(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 Kr(i,t){if(i){const e=i.indexOf(t);0<=e&&i.splice(e,1)}}class Zt{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(cn(n))try{n()}catch(s){t=s instanceof Br?s.errors:[s]}const{_finalizers:r}=this;if(r){this._finalizers=null;for(const s of r)try{Na(s)}catch(o){t=t??[],o instanceof Br?t=[...t,...o.errors]:t.push(o)}}if(t)throw new Br(t)}}add(t){var e;if(t&&t!==this)if(this.closed)Na(t);else{if(t instanceof Zt){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)&&Kr(e,t)}remove(t){const{_finalizers:e}=this;e&&Kr(e,t),t instanceof Zt&&t._removeParent(this)}}Zt.EMPTY=(()=>{const i=new Zt;return i.closed=!0,i})();const Un=Zt.EMPTY;function yl(i){return i instanceof Zt||i&&"closed"in i&&cn(i.remove)&&cn(i.add)&&cn(i.unsubscribe)}function Na(i){cn(i)?i():i.unsubscribe()}const Hs={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 Si(i){Ci.setTimeout(()=>{const{onUnhandledError:t}=Hs;if(!t)throw i;t(i)})}function ms(){}const Gs=Pn("C",void 0,void 0);function Pn(i,t,e){return{kind:i,value:t,error:e}}let cr=null;function oc(i){if(Hs.useDeprecatedSynchronousErrorHandling){const t=!cr;if(t&&(cr={errorThrown:!1,error:null}),i(),t){const{errorThrown:e,error:n}=cr;if(cr=null,e)throw n}}else i()}class bl extends Zt{constructor(t){super(),this.isStopped=!1,t?(this.destination=t,yl(t)&&t.add(this)):this.destination=yE}static create(t,e,n){return new la(t,e,n)}next(t){this.isStopped?jg(function Fo(i){return Pn("N",i,void 0)}(t),this):this._next(t)}error(t){this.isStopped?jg(function $s(i){return Pn("E",void 0,i)}(t),this):(this.isStopped=!0,this._error(t))}complete(){this.isStopped?jg(Gs,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 aa=Function.prototype.bind;function xl(i,t){return aa.call(i,t)}class Ba{constructor(t){this.partialObserver=t}next(t){const{partialObserver:e}=this;if(e.next)try{e.next(t)}catch(n){fd(n)}}error(t){const{partialObserver:e}=this;if(e.error)try{e.error(t)}catch(n){fd(n)}else fd(t)}complete(){const{partialObserver:t}=this;if(t.complete)try{t.complete()}catch(e){fd(e)}}}class la extends bl{constructor(t,e,n){let r;if(super(),cn(t)||!t)r={next:t??void 0,error:e??void 0,complete:n??void 0};else{let s;this&&Hs.useDeprecatedNextContext?(s=Object.create(t),s.unsubscribe=()=>this.unsubscribe(),r={next:t.next&&xl(t.next,s),error:t.error&&xl(t.error,s),complete:t.complete&&xl(t.complete,s)}):r=t}this.destination=new Ba(r)}}function fd(i){Hs.useDeprecatedSynchronousErrorHandling?function oa(i){Hs.useDeprecatedSynchronousErrorHandling&&cr&&(cr.errorThrown=!0,cr.error=i)}(i):Si(i)}function jg(i,t){const{onStoppedNotification:e}=Hs;e&&Ci.setTimeout(()=>e(i,t))}const yE={closed:!0,next:ms,error:function vE(i){throw i},complete:ms},Yg="function"==typeof Symbol&&Symbol.observable||"@@observable";function Ua(i){return i}function t0(i){return 0===i.length?Ua:1===i.length?i[0]:function(e){return i.reduce((n,r)=>r(n),e)}}let Tn=(()=>{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 Rf(i){return i&&i instanceof bl||function xE(i){return i&&cn(i.next)&&cn(i.error)&&cn(i.complete)}(i)&&yl(i)}(e)?e:new la(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=Va(n))((r,s)=>{const o=new la({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)}[Yg](){return this}pipe(...e){return t0(e)(this)}toPromise(e){return new(e=Va(e))((n,r)=>{let s;this.subscribe(o=>s=o,o=>r(o),()=>n(s))})}}return i.create=t=>new i(t),i})();function Va(i){var t;return null!==(t=i??Hs.Promise)&&void 0!==t?t:Promise}const ca=V(i=>function(){i(this),this.name="ObjectUnsubscribedError",this.message="object unsubscribed"});let Re=(()=>{class i extends Tn{constructor(){super(),this.closed=!1,this.currentObservers=null,this.observers=[],this.isStopped=!1,this.hasError=!1,this.thrownError=null}lift(e){const n=new n0(this,this);return n.operator=e,n}_throwIfClosed(){if(this.closed)throw new ca}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?Un:(this.currentObservers=null,s.push(e),new Zt(()=>{this.currentObservers=null,Kr(s,e)}))}_checkFinalizedStatuses(e){const{hasError:n,thrownError:r,isStopped:s}=this;n?e.error(r):s&&e.complete()}asObservable(){const e=new Tn;return e.source=this,e}}return i.create=(t,e)=>new n0(t,e),i})();class n0 extends Re{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:Un}}function r0(i){return cn(i?.lift)}function Jn(i){return t=>{if(r0(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 jn(i,t,e,n,r){return new wE(i,t,e,n,r)}class wE extends bl{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 et(i,t){return Jn((e,n)=>{let r=0;e.subscribe(jn(n,s=>{n.next(i.call(t,s,r++))}))})}function da(i){return this instanceof da?(this.v=i,this):new da(i)}function Ff(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 qg(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 e_=i=>i&&"number"==typeof i.length&&"function"!=typeof i;function t_(i){return cn(i?.then)}function c0(i){return cn(i[Yg])}function d0(i){return Symbol.asyncIterator&&cn(i?.[Symbol.asyncIterator])}function u0(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 h0=function n_(){return"function"==typeof Symbol&&Symbol.iterator?Symbol.iterator:"@@iterator"}();function Lf(i){return cn(i?.[h0])}function f0(i){return function Of(i,t,e){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var r,n=e.apply(i,t||[]),s=[];return r=Object.create(("function"==typeof AsyncIterator?AsyncIterator:Object).prototype),a("next"),a("throw"),a("return",function o(m){return function(g){return Promise.resolve(g).then(m,h)}}),r[Symbol.asyncIterator]=function(){return this},r;function a(m,g){n[m]&&(r[m]=function(b){return new Promise(function(v,y){s.push([m,b,v,y])>1||l(m,b)})},g&&(r[m]=g(r[m])))}function l(m,g){try{!function c(m){m.value instanceof da?Promise.resolve(m.value.v).then(d,h):p(s[0][2],m)}(n[m](g))}catch(b){p(s[0][3],b)}}function d(m){l("next",m)}function h(m){l("throw",m)}function p(m,g){m(g),s.shift(),s.length&&l(s[0][0],s[0][1])}}(this,arguments,function*(){const e=i.getReader();try{for(;;){const{value:n,done:r}=yield da(e.read());if(r)return yield da(void 0);yield yield da(n)}}finally{e.releaseLock()}})}function p0(i){return cn(i?.getReader)}function Mr(i){if(i instanceof Tn)return i;if(null!=i){if(c0(i))return function kE(i){return new Tn(t=>{const e=i[Yg]();if(cn(e.subscribe))return e.subscribe(t);throw new TypeError("Provided object does not correctly implement Symbol.observable")})}(i);if(e_(i))return function PE(i){return new Tn(t=>{for(let e=0;e{i.then(e=>{t.closed||(t.next(e),t.complete())},e=>t.error(e)).then(null,Si)})}(i);if(d0(i))return m0(i);if(Lf(i))return function FE(i){return new Tn(t=>{for(const e of i)if(t.next(e),t.closed)return;t.complete()})}(i);if(p0(i))return function g0(i){return m0(f0(i))}(i)}throw u0(i)}function m0(i){return new Tn(t=>{(function LE(i,t){var e,n,r,s;return function md(i,t,e,n){return new(e||(e=Promise))(function(s,o){function a(d){try{c(n.next(d))}catch(h){o(h)}}function l(d){try{c(n.throw(d))}catch(h){o(h)}}function c(d){d.done?s(d.value):function r(s){return s instanceof e?s:new e(function(o){o(s)})}(d.value).then(a,l)}c((n=n.apply(i,t||[])).next())})}(this,void 0,void 0,function*(){try{for(e=Ff(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 Ha(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 tr(i,t,e=1/0){return cn(t)?tr((n,r)=>et((s,o)=>t(n,s,r,o))(Mr(i(n,r))),e):("number"==typeof t&&(e=t),Jn((n,r)=>function NE(i,t,e,n,r,s,o,a){const l=[];let c=0,d=0,h=!1;const p=()=>{h&&!l.length&&!c&&t.complete()},m=b=>c{s&&t.next(b),c++;let v=!1;Mr(e(b,d++)).subscribe(jn(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(jn(t,m,()=>{h=!0,p()})),()=>{a?.()}}(n,r,i,e)))}function vd(i=1/0){return tr(Ua,i)}const fo=new Tn(i=>i.complete());function Bu(i){return i&&cn(i.schedule)}function r_(i){return i[i.length-1]}function _0(i){return cn(r_(i))?i.pop():void 0}function Uu(i){return Bu(r_(i))?i.pop():void 0}function s_(i,t=0){return Jn((e,n)=>{e.subscribe(jn(n,r=>Ha(n,i,()=>n.next(r),t),()=>Ha(n,i,()=>n.complete(),t),r=>Ha(n,i,()=>n.error(r),t)))})}function o_(i,t=0){return Jn((e,n)=>{n.add(i.schedule(()=>e.subscribe(n),t))})}function a_(i,t){if(!i)throw new Error("Iterable cannot be null");return new Tn(e=>{Ha(e,t,()=>{const n=i[Symbol.asyncIterator]();Ha(e,t,()=>{n.next().then(r=>{r.done?e.complete():e.next(r.value)})},0,!0)})})}function Ni(i,t){return t?function b0(i,t){if(null!=i){if(c0(i))return function UE(i,t){return Mr(i).pipe(o_(t),s_(t))}(i,t);if(e_(i))return function zE(i,t){return new Tn(e=>{let n=0;return t.schedule(function(){n===i.length?e.complete():(e.next(i[n++]),e.closed||this.schedule())})})}(i,t);if(t_(i))return function VE(i,t){return Mr(i).pipe(o_(t),s_(t))}(i,t);if(d0(i))return a_(i,t);if(Lf(i))return function HE(i,t){return new Tn(e=>{let n;return Ha(e,t,()=>{n=i[h0](),Ha(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)}),()=>cn(n?.return)&&n.return()})}(i,t);if(p0(i))return function y0(i,t){return a_(f0(i),t)}(i,t)}throw u0(i)}(i,t):Mr(i)}function Cr(...i){const t=Uu(i),e=function v0(i,t){return"number"==typeof r_(i)?i.pop():t}(i,1/0),n=i;return n.length?1===n.length?Mr(n[0]):vd(e)(Ni(n,t)):fo}function Nf(i={}){const{connector:t=(()=>new Re),resetOnError:e=!0,resetOnComplete:n=!0,resetOnRefCountZero:r=!0}=i;return s=>{let o,a,l,c=0,d=!1,h=!1;const p=()=>{a?.unsubscribe(),a=void 0},m=()=>{p(),o=l=void 0,d=h=!1},g=()=>{const b=o;m(),b?.unsubscribe()};return Jn((b,v)=>{c++,!h&&!d&&p();const y=l=l??t();v.add(()=>{c--,0===c&&!h&&!d&&(a=yd(g,r))}),y.subscribe(v),!o&&c>0&&(o=new la({next:M=>y.next(M),error:M=>{h=!0,p(),a=yd(m,e,M),y.error(M)},complete:()=>{d=!0,p(),a=yd(m,n),y.complete()}}),Mr(b).subscribe(o))})(s)}}function yd(i,t,...e){if(!0===t)return void i();if(!1===t)return;const n=new la({next:()=>{n.unsubscribe(),i()}});return Mr(t(...e)).subscribe(n)}function li(i){for(let t in i)if(i[t]===li)return t;throw Error("Could not find renamed property on target object.")}function l_(i,t){for(const e in t)t.hasOwnProperty(e)&&!i.hasOwnProperty(e)&&(i[e]=t[e])}function pi(i){if("string"==typeof i)return i;if(Array.isArray(i))return"["+i.map(pi).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 Bf(i,t){return null==i||""===i?null===t?"":t:null==t||""===t?i:i+" "+t}const c_=li({__forward_ref__:li});function Gn(i){return i.__forward_ref__=Gn,i.toString=function(){return pi(this())},i}function Rt(i){return Vu(i)?i():i}function Vu(i){return"function"==typeof i&&i.hasOwnProperty(c_)&&i.__forward_ref__===Gn}function zu(i){return i&&!!i.\u0275providers}const Gu="https://g.co/ng/security#xss";class pe extends Error{constructor(t,e){super(Uf(t,e)),this.code=t}}function Uf(i,t){return`NG0${Math.abs(i)}${t?": "+t.trim():""}`}function Qt(i){return"string"==typeof i?i:null==i?"":String(i)}function Vf(i,t){throw new pe(-201,!1)}function Sn(i,t){null==i&&function ei(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 Xt(i){return{providers:i.providers||[],imports:i.imports||[]}}function zf(i){return d_(i,bd)||d_(i,h_)}function d_(i,t){return i.hasOwnProperty(t)?i[t]:null}function u_(i){return i&&(i.hasOwnProperty(gs)||i.hasOwnProperty(M0))?i[gs]:null}const bd=li({\u0275prov:li}),gs=li({\u0275inj:li}),h_=li({ngInjectableDef:li}),M0=li({ngInjectorDef:li});var kt=(()=>((kt=kt||{})[kt.Default=0]="Default",kt[kt.Host=1]="Host",kt[kt.Self=2]="Self",kt[kt.SkipSelf=4]="SkipSelf",kt[kt.Optional=8]="Optional",kt))();let Hf;function js(i){const t=Hf;return Hf=i,t}function _s(i,t,e){const n=zf(i);return n&&"root"==n.providedIn?void 0===n.value?n.value=n.factory():n.value:e&kt.Optional?null:void 0!==t?t:void Vf(pi(i))}const In=(()=>typeof globalThis<"u"&&globalThis||typeof global<"u"&&global||typeof window<"u"&&window||typeof self<"u"&&typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&self)(),Ml={},Wu="__NG_DI_FLAG__",mi="ngTempTokenPath",Cl="ngTokenPath",f_=/\n/gm,KE="\u0275",Gf="__source";let ju;function xd(i){const t=ju;return ju=i,t}function ZE(i,t=kt.Default){if(void 0===ju)throw new pe(-203,!1);return null===ju?_s(i,void 0,t):ju.get(i,t&kt.Optional?null:void 0,t)}function ee(i,t=kt.Default){return(function C0(){return Hf}()||ZE)(Rt(i),t)}function Pt(i,t=kt.Default){return ee(i,$f(t))}function $f(i){return typeof i>"u"||"number"==typeof i?i:0|(i.optional&&8)|(i.host&&1)|(i.self&&2)|(i.skipSelf&&4)}function Wf(i){const t=[];for(let e=0;e((po=po||{})[po.OnPush=0]="OnPush",po[po.Default=1]="Default",po))(),Ys=(()=>{return(i=Ys||(Ys={}))[i.Emulated=0]="Emulated",i[i.None=2]="None",i[i.ShadowDom=3]="ShadowDom",Ys;var i})();const $a={},$n=[],Ur=li({\u0275cmp:li}),qu=li({\u0275dir:li}),dc=li({\u0275pipe:li}),g_=li({\u0275mod:li}),ua=li({\u0275fac:li}),Xu=li({__NG_ELEMENT_ID__:li});let QE=0;function ot(i){return Ga(()=>{const t=mo(i),e={...t,decls:i.decls,vars:i.vars,template:i.template,consts:i.consts||null,ngContentSelectors:i.ngContentSelectors,onPush:i.changeDetection===po.OnPush,directiveDefs:null,pipeDefs:null,dependencies:t.standalone&&i.dependencies||null,getStandaloneInjector:null,data:i.data||{},encapsulation:i.encapsulation||Ys.Emulated,id:"c"+QE++,styles:i.styles||$n,_:null,schemas:i.schemas||null,tView:null};__(e);const n=i.dependencies;return e.directiveDefs=Yf(n,!1),e.pipeDefs=Yf(n,!0),e})}function Ku(i,t,e){const n=i.\u0275cmp;n.directiveDefs=Yf(t,!1),n.pipeDefs=Yf(e,!0)}function JE(i){return Hn(i)||Vr(i)}function Md(i){return null!==i}function nn(i){return Ga(()=>({type:i.type,bootstrap:i.bootstrap||$n,declarations:i.declarations||$n,imports:i.imports||$n,exports:i.exports||$n,transitiveCompileScopes:null,schemas:i.schemas||null,id:i.id||null}))}function jf(i,t){if(null==i)return $a;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 ve(i){return Ga(()=>{const t=mo(i);return __(t),t})}function Gi(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 Hn(i){return i[Ur]||null}function Vr(i){return i[qu]||null}function vs(i){return i[dc]||null}function dr(i,t){const e=i[g_]||null;if(!e&&!0===t)throw new Error(`Type ${pi(i)} does not have '\u0275mod' property.`);return e}function mo(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||$n,viewQuery:i.viewQuery||null,features:i.features||null,setInput:null,findHostDirectiveDefs:null,hostDirectives:null,inputs:jf(i.inputs,t),outputs:jf(i.outputs)}}function __(i){i.features?.forEach(t=>t(i))}function Yf(i,t){if(!i)return null;const e=t?vs:JE;return()=>("function"==typeof i?i():i).map(n=>e(n)).filter(Md)}const Wa=0,st=1,fn=2,Bi=3,ys=4,X=5,ue=6,oe=7,Ue=8,Gt=9,Vn=10,_t=11,oi=12,uc=13,E0=14,Er=15,nr=16,Zu=17,Bo=18,qs=19,Sl=20,ti=21,yi=22,Sd=1,A0=2,qf=7,Xf=8,ja=9,Ui=10;function bs(i){return Array.isArray(i)&&"object"==typeof i[Sd]}function xs(i){return Array.isArray(i)&&!0===i[Sd]}function Kf(i){return 0!=(4&i.flags)}function Ed(i){return i.componentOffset>-1}function hc(i){return 1==(1&i.flags)}function go(i){return!!i.template}function Qu(i){return 0!=(256&i[fn])}function Ya(i,t){return i.hasOwnProperty(ua)?i[ua]:null}class Dd{constructor(t,e,n){this.previousValue=t,this.currentValue=e,this.firstChange=n}isFirstChange(){return this.firstChange}}function bi(){return Td}function Td(i){return i.type.prototype.ngOnChanges&&(i.setInput=Id),Jf}function Jf(){const i=k0(this),t=i?.current;if(t){const e=i.previous;if(e===$a)i.previous=t;else for(let n in t)e[n]=t[n];i.current=null,this.ngOnChanges(t)}}function Id(i,t,e,n){const r=this.declaredInputs[e],s=k0(i)||function rA(i,t){return i[R0]=t}(i,{previous:$a,current:null}),o=s.current||(s.current={}),a=s.previous,l=a[r];o[r]=new Dd(l&&l.currentValue,t,a===$a),i[n]=t}bi.ngInherit=!0;const R0="__ngSimpleChanges__";function k0(i){return i[R0]||null}const Qr=function(i,t,e){},Rd="svg";function I(i){for(;Array.isArray(i);)i=i[Wa];return i}function fc(i,t){return I(t[i])}function Ai(i,t){return I(t[i.index])}function P0(i,t){return i.data[t]}function Pd(i,t){return i[t]}function ws(i,t){const e=t[i];return bs(e)?e:e[Wa]}function ep(i){return 64==(64&i[fn])}function El(i,t){return null==t?null:i[t]}function O0(i){i[Bo]=0}function C_(i,t){i[X]+=t;let e=i,n=i[Bi];for(;null!==n&&(1===t&&1===e[X]||-1===t&&0===e[X]);)n[X]+=t,e=n,n=n[Bi]}const Dt={lFrame:Xa(null),bindingsEnabled:!0};function ha(){return Dt.bindingsEnabled}function Se(){return Dt.lFrame.lView}function zn(){return Dt.lFrame.tView}function an(i){return Dt.lFrame.contextLView=i,i[Ue]}function Ut(i){return Dt.lFrame.contextLView=null,i}function Ar(){let i=L0();for(;null!==i&&64===i.type;)i=i.parent;return i}function L0(){return Dt.lFrame.currentTNode}function fa(i,t){const e=Dt.lFrame;e.currentTNode=i,e.isParent=t}function S_(){return Dt.lFrame.isParent}function E_(){Dt.lFrame.isParent=!1}function zr(){const i=Dt.lFrame;let t=i.bindingRootIndex;return-1===t&&(t=i.bindingRootIndex=i.tView.bindingStartIndex),t}function Al(){return Dt.lFrame.bindingIndex++}function Xs(i){const t=Dt.lFrame,e=t.bindingIndex;return t.bindingIndex=t.bindingIndex+i,e}function U0(i,t){const e=Dt.lFrame;e.bindingIndex=e.bindingRootIndex=i,Uo(t)}function Uo(i){Dt.lFrame.currentDirectiveIndex=i}function Ju(i){const t=Dt.lFrame.currentDirectiveIndex;return-1===t?null:i[t]}function Dl(){return Dt.lFrame.currentQueryIndex}function Ms(i){Dt.lFrame.currentQueryIndex=i}function pA(i){const t=i[st];return 2===t.type?t.declTNode:1===t.type?i[ue]:null}function D_(i,t,e){if(e&kt.SkipSelf){let r=t,s=i;for(;!(r=r.parent,null!==r||e&kt.Host||(r=pA(s),null===r||(s=s[Er],10&r.type))););if(null===r)return!1;t=r,i=s}const n=Dt.lFrame=Od();return n.currentTNode=t,n.lView=i,!0}function np(i){const t=Od(),e=i[st];Dt.lFrame=t,t.currentTNode=e.firstChild,t.lView=i,t.tView=e,t.contextLView=i,t.bindingIndex=e.bindingStartIndex,t.inI18n=!1}function Od(){const i=Dt.lFrame,t=null===i?null:i.child;return null===t?Xa(i):t}function Xa(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 T_(){const i=Dt.lFrame;return Dt.lFrame=i.parent,i.currentTNode=null,i.lView=null,i}const V0=T_;function Fd(){const i=T_();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 qn(){return Dt.lFrame.selectedIndex}function Ka(i){Dt.lFrame.selectedIndex=i}function Di(){const i=Dt.lFrame;return P0(i.tView,i.selectedIndex)}function ki(){Dt.lFrame.currentNamespace=Rd}function pa(){!function mc(){Dt.lFrame.currentNamespace=null}()}function Ld(i,t){for(let e=t.directiveStart,n=t.directiveEnd;e=n)break}else t[l]<0&&(i[Bo]+=65536),(a>11>16&&(3&i[fn])===t){i[fn]+=2048,Qr(4,a,s);try{s.call(a)}finally{Qr(5,a,s)}}}else{Qr(4,a,s);try{s.call(a)}finally{Qr(5,a,s)}}}const ma=-1;class Nd{constructor(t,e,n){this.factory=t,this.resolving=!1,this.canSeeViewProviders=e,this.injectImpl=n}}function P_(i,t,e){let n=0;for(;nt){o=s-1;break}}}for(;s>16}(i),n=t;for(;e>0;)n=n[Er],e--;return n}let Bd=!0;function ap(i){const t=Bd;return Bd=i,t}const F_=255,j0=5;let Y0=0;const ga={};function nh(i,t){const e=q0(i,t);if(-1!==e)return e;const n=t[st];n.firstCreatePass&&(i.injectorIndex=t.length,ih(n.data,i),ih(t,null),ih(n.blueprint,null));const r=rh(i,t),s=i.injectorIndex;if(op(r)){const o=eh(r),a=th(r,t),l=a[st].data;for(let c=0;c<8;c++)t[s+c]=a[o+c]|l[o+c]}return t[s+8]=r,s}function ih(i,t){i.push(0,0,0,0,0,0,0,0,t)}function q0(i,t){return-1===i.injectorIndex||i.parent&&i.parent.injectorIndex===i.injectorIndex||null===t[i.injectorIndex+8]?-1:i.injectorIndex}function rh(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=oh(r),null===n)return ma;if(e++,r=r[Er],-1!==n.injectorIndex)return n.injectorIndex|e<<16}return ma}function pn(i,t,e){!function L_(i,t,e){let n;"string"==typeof e?n=e.charCodeAt(0)||0:e.hasOwnProperty(Xu)&&(n=e[Xu]),null==n&&(n=e[Xu]=Y0++);const r=n&F_;t.data[i+(r>>j0)]|=1<=0?t&F_:Ks:t}(e);if("function"==typeof s){if(!D_(t,i,n))return n&kt.Host?X0(r,0,n):Ud(t,e,n,r);try{const o=s(n);if(null!=o||n&kt.Optional)return o;Vf()}finally{V0()}}else if("number"==typeof s){let o=null,a=q0(i,t),l=ma,c=n&kt.Host?t[nr][ue]:null;for((-1===a||n&kt.SkipSelf)&&(l=-1===a?rh(i,t):t[a+8],l!==ma&&B_(n,!1)?(o=t[st],a=eh(l),t=th(l,t)):a=-1);-1!==a;){const d=t[st];if(cp(s,a,d.data)){const h=wA(a,t,e,o,n,c);if(h!==ga)return h}l=t[a+8],l!==ma&&B_(n,t[st].data[a+8]===c)&&cp(s,a,t)?(o=d,a=eh(l),t=th(l,t)):a=-1}}return r}function wA(i,t,e,n,r,s){const o=t[st],a=o.data[i+8],d=ts(a,o,e,null==n?Ed(a)&&Bd:n!=o&&0!=(3&a.type),r&kt.Host&&s===a);return null!==d?vc(t,o,d,a):ga}function ts(i,t,e,n,r){const s=i.providerIndexes,o=t.data,a=1048575&s,l=i.directiveStart,d=s>>20,p=r?a+d:i.directiveEnd;for(let m=n?a:a+d;m=l&&g.type===e)return m}if(r){const m=o[l];if(m&&go(m)&&m.type===e)return l}return null}function vc(i,t,e,n){let r=i[e];const s=t.data;if(function _A(i){return i instanceof Nd}(r)){const o=r;o.resolving&&function x0(i,t){const e=t?`. Dependency path: ${t.join(" > ")} > ${i}`:"";throw new pe(-200,`Circular dependency in DI detected for ${i}${e}`)}(function Yn(i){return"function"==typeof i?i.name||i.toString():"object"==typeof i&&null!=i&&"function"==typeof i.type?i.type.name||i.type.toString():Qt(i)}(s[e]));const a=ap(o.canSeeViewProviders);o.resolving=!0;const l=o.injectImpl?js(o.injectImpl):null;D_(i,n,kt.Default);try{r=i[e]=o.factory(void 0,s,i,n),t.firstCreatePass&&e>=n.directiveStart&&function es(i,t,e){const{ngOnChanges:n,ngOnInit:r,ngDoCheck:s}=t.type.prototype;if(n){const o=Td(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&&js(l),ap(a),o.resolving=!1,V0()}}return r}function cp(i,t,e){return!!(e[t+(i>>j0)]&1<{const t=i.prototype.constructor,e=t[ua]||sh(t),n=Object.prototype;let r=Object.getPrototypeOf(i.prototype).constructor;for(;r&&r!==n;){const s=r[ua]||sh(r);if(s&&s!==e)return s;r=Object.getPrototypeOf(r)}return s=>new s})}function sh(i){return Vu(i)?()=>{const t=sh(Rt(i));return t&&t()}:Ya(i)}function oh(i){const t=i[st],e=t.type;return 2===e?t.declTNode:1===e?i[ue]:null}function _a(i){return function xA(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 va(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,d){const h=l.hasOwnProperty(bc)?l[bc]:Object.defineProperty(l,bc,{value:[]})[bc];for(;h.length<=d;)h.push(null);return(h[d]=h[d]||[]).push(o),l}}return e&&(r.prototype=Object.create(e.prototype)),r.prototype.ngMetadataName=i,r.annotationCls=r,r})}class me{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 Rl(i,t){i.forEach(e=>Array.isArray(e)?Rl(e,t):t(e))}function V_(i,t,e){t>=i.length?i.push(e):i.splice(t,0,e)}function hp(i,t){return t>=i.length-1?i.pop():i.splice(t,1)[0]}function Hd(i,t){const e=[];for(let n=0;n=0?i[1|n]=e:(n=~n,function EA(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 $d(i,t){const e=wc(i,t);if(e>=0)return i[1|e]}function wc(i,t){return function pp(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),Ss=wd(Vd("Optional"),8),ya=wd(Vd("SkipSelf"),4);var Es=(()=>((Es=Es||{})[Es.Important=1]="Important",Es[Es.DashCase=2]="DashCase",Es))();const wp=new Map;let fx=0;const ev="__ngContext__";function Gr(i,t){bs(t)?(i[ev]=t[Sl],function px(i){wp.set(i[Sl],i)}(t)):i[ev]=t}let nv;function iv(i,t){return nv(i,t)}function fh(i){const t=i[Bi];return xs(t)?t[Bi]:t}function rv(i){return Mx(i[uc])}function sv(i){return Mx(i[ys])}function Mx(i){for(;null!==i&&!xs(i);)i=i[ys];return i}function Ir(i,t,e,n,r){if(null!=n){let s,o=!1;xs(n)?s=n:bs(n)&&(o=!0,n=n[Wa]);const a=I(n);0===i&&null!==e?null==r?Tx(t,e,a):Sc(t,e,a,r||null,!0):1===i&&null!==e?Sc(t,e,a,r||null,!0):2===i?function hv(i,t,e){const n=Sp(i,t);n&&function qA(i,t,e,n){i.removeChild(t,e,n)}(i,n,t,e)}(t,a,o):3===i&&t.destroyNode(a),null!=s&&function Lx(i,t,e,n,r){const s=e[qf];s!==I(e)&&Ir(t,i,n,s,r);for(let a=Ui;a0&&(i[e-1][ys]=n[ys]);const s=hp(i,Ui+t);!function zA(i,t){mh(i,t,t[_t],2,null,null),t[Wa]=null,t[ue]=null}(n[st],n);const o=s[qs];null!==o&&o.detachView(s[st]),n[Bi]=null,n[ys]=null,n[fn]&=-65}return n}function Ex(i,t){if(!(128&t[fn])){const e=t[_t];e.destroyNode&&mh(i,t,e,3,null,null),function $A(i){let t=i[uc];if(!t)return cv(i[st],i);for(;t;){let e=null;if(bs(t))e=t[uc];else{const n=t[Ui];n&&(e=n)}if(!e){for(;t&&!t[ys]&&t!==i;)bs(t)&&cv(t[st],t),t=t[Bi];null===t&&(t=i),bs(t)&&cv(t[st],t),e=t&&t[ys]}t=e}}(t)}}function cv(i,t){if(!(128&t[fn])){t[fn]&=-65,t[fn]|=128,function YA(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===Ys.None||s===Ys.Emulated)return null}return Ai(n,e)}}(i,t.parent,e)}function Sc(i,t,e,n,r){i.insertBefore(t,e,n,r)}function Tx(i,t,e){i.appendChild(t,e)}function Ix(i,t,e,n,r){null!==n?Sc(i,t,e,n,r):Tx(i,t,e)}function Sp(i,t){return i.parentNode(t)}function Rx(i,t,e){return Px(i,t,e)}let dv,Tp,mv,Px=function kx(i,t,e){return 40&i.type?Ai(i,e):null};function ph(i,t,e,n){const r=Ax(i,n,t),s=t[_t],a=Rx(n.parent||t[ue],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 kl{constructor(t){this.changingThisBreaksApplicationSecurity=t}toString(){return`SafeValue must use [property]=binding: ${this.changingThisBreaksApplicationSecurity} (see ${Gu})`}}class nD extends kl{getTypeName(){return"HTML"}}class iD extends kl{getTypeName(){return"Style"}}class rD extends kl{getTypeName(){return"Script"}}class sD extends kl{getTypeName(){return"URL"}}class Rp extends kl{getTypeName(){return"ResourceURL"}}function Qs(i){return i instanceof kl?i.changingThisBreaksApplicationSecurity:i}function xa(i,t){const e=function oD(i){return i instanceof kl&&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 ${Gu})`)}return e===t}class hD{constructor(t){this.inertDocumentHelper=t}getInertBodyElement(t){t=""+t;try{const e=(new window.DOMParser).parseFromString(Wd(t),"text/html").body;return null===e?this.inertDocumentHelper.getInertBodyElement(t):(e.removeChild(e.firstChild),e)}catch{return null}}}class fD{constructor(t){this.defaultDoc=t,this.inertDocument=this.defaultDoc.implementation.createHTMLDocument("sanitization-inert")}getInertBodyElement(t){const e=this.inertDocument.createElement("template");return e.innerHTML=Wd(t),e}}const pD=/^(?!javascript:)(?:[a-z0-9+.-]+:|[^&:\/?#]*(?:[\/?#]|$))/i;function gh(i){return(i=String(i)).match(pD)?i:"unsafe:"+i}function wa(i){const t={};for(const e of i.split(","))t[e]=!0;return t}function Ec(...i){const t={};for(const e of i)for(const n in e)e.hasOwnProperty(n)&&(t[n]=!0);return t}const vv=wa("area,br,col,hr,img,wbr"),yv=wa("colgroup,dd,dt,li,p,tbody,td,tfoot,th,thead,tr"),bv=wa("rp,rt"),xv=Ec(vv,Ec(yv,wa("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")),Ec(bv,wa("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")),Ec(bv,yv)),jd=wa("background,cite,href,itemtype,longdesc,poster,src,xlink:href"),Gx=Ec(jd,wa("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"),wa("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")),Mv=wa("script,style,template");class $x{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(!xv.hasOwnProperty(e))return this.sanitizedSomething=!0,!Mv.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();xv.hasOwnProperty(e)&&!vv.hasOwnProperty(e)&&(this.buf.push(""))}chars(t){this.buf.push(Wx(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 gD=/[\uD800-\uDBFF][\uDC00-\uDFFF]/g,_D=/([^\#-~ |!])/g;function Wx(i){return i.replace(/&/g,"&").replace(gD,function(t){return"&#"+(1024*(t.charCodeAt(0)-55296)+(t.charCodeAt(1)-56320)+65536)+";"}).replace(_D,function(t){return"&#"+t.charCodeAt(0)+";"}).replace(//g,">")}let Pp;function jx(i,t){let e=null;try{Pp=Pp||function Hx(i){const t=new fD(i);return function kp(){try{return!!(new window.DOMParser).parseFromString(Wd(""),"text/html")}catch{return!1}}()?new hD(t):t}(i);let n=t?String(t):"";e=Pp.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=Pp.getInertBodyElement(n)}while(n!==s);return Wd((new $x).sanitizeChildren(Cv(e)||e))}finally{if(e){const n=Cv(e)||e;for(;n.firstChild;)n.removeChild(n.firstChild)}}}function Cv(i){return"content"in i&&function vD(i){return i.nodeType===Node.ELEMENT_NODE&&"TEMPLATE"===i.nodeName}(i)?i.content:null}var Xn=(()=>((Xn=Xn||{})[Xn.NONE=0]="NONE",Xn[Xn.HTML=1]="HTML",Xn[Xn.STYLE=2]="STYLE",Xn[Xn.SCRIPT=3]="SCRIPT",Xn[Xn.URL=4]="URL",Xn[Xn.RESOURCE_URL=5]="RESOURCE_URL",Xn))();function Op(i){const t=function xi(){const i=Se();return i&&i[oi]}();return t?t.sanitize(Xn.URL,i)||"":xa(i,"URL")?Qs(i):gh(Qt(i))}const Fp=new me("ENVIRONMENT_INITIALIZER"),Ja=new me("INJECTOR",-1),qx=new me("INJECTOR_DEF_TYPES");class Xx{get(t,e=Ml){if(e===Ml){const n=new Error(`NullInjectorError: No provider for ${pi(t)}!`);throw n.name="NullInjectorError",n}return e}}function MD(...i){return{\u0275providers:Kx(0,i),\u0275fromNgModule:!0}}function Kx(i,...t){const e=[],n=new Set;let r;return Rl(t,s=>{const o=s;Sv(o,e,[],n)&&(r||(r=[]),r.push(o))}),void 0!==r&&Lp(r,e),e}function Lp(i,t){for(let e=0;e{t.push(s)})}}function Sv(i,t,e,n){if(!(i=Rt(i)))return!1;let r=null,s=u_(i);const o=!s&&Hn(i);if(s||o){if(o&&!o.standalone)return!1;r=i}else{const l=i.ngModule;if(s=u_(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)Sv(c,t,e,n)}}else{if(!s)return!1;{if(null!=s.imports&&!a){let c;n.add(r);try{Rl(s.imports,d=>{Sv(d,t,e,n)&&(c||(c=[]),c.push(d))})}finally{}void 0!==c&&Lp(c,t)}if(!a){const c=Ya(r)||(()=>new r);t.push({provide:r,useFactory:c,deps:$n},{provide:qx,useValue:r,multi:!0},{provide:Fp,useValue:()=>ee(r),multi:!0})}const l=s.providers;null==l||a||Np(l,d=>{t.push(d)})}}return r!==i&&void 0!==i.providers}function Np(i,t){for(let e of i)zu(e)&&(e=e.\u0275providers),Array.isArray(e)?Np(e,t):t(e)}const Bp=li({provide:String,useValue:li});function wi(i){return null!==i&&"object"==typeof i&&Bp in i}function Dc(i){return"function"==typeof i}const Av=new me("Set Injector scope."),Up={},SD={};let Dv;function _h(){return void 0===Dv&&(Dv=new Xx),Dv}class eo{}class Vp extends eo{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,Iv(t,o=>this.processProvider(o)),this.records.set(Ja,Ho(void 0,this)),r.has("environment")&&this.records.set(eo,Ho(void 0,this));const s=this.records.get(Av);null!=s&&"string"==typeof s.value&&this.scopes.add(s.value),this.injectorDefTypes=new Set(this.get(qx.multi,$n,kt.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=xd(this),n=js(void 0);try{return t()}finally{xd(e),js(n)}}get(t,e=Ml,n=kt.Default){this.assertNotDestroyed(),n=$f(n);const r=xd(this),s=js(void 0);try{if(!(n&kt.SkipSelf)){let a=this.records.get(t);if(void 0===a){const l=function DD(i){return"function"==typeof i||"object"==typeof i&&i instanceof me}(t)&&zf(t);a=l&&this.injectableDefInScope(l)?Ho(Tv(t),Up):null,this.records.set(t,a)}if(null!=a)return this.hydrate(t,a)}return(n&kt.Self?_h():this.parent).get(t,e=n&kt.Optional&&e===Ml?null:e)}catch(o){if("NullInjectorError"===o.name){if((o[mi]=o[mi]||[]).unshift(pi(t)),r)throw o;return function m_(i,t,e,n){const r=i[mi];throw t[Gf]&&r.unshift(t[Gf]),i.message=function S0(i,t,e,n=null){i=i&&"\n"===i.charAt(0)&&i.charAt(1)==KE?i.slice(2):i;let r=pi(t);if(Array.isArray(t))r=t.map(pi).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):pi(a)))}r=`{${s.join(", ")}}`}return`${e}${n?"("+n+")":""}[${r}]: ${i.replace(f_,"\n ")}`}("\n"+i.message,r,e,n),i[Cl]=r,i[mi]=null,i}(o,t,"R3InjectorError",this.source)}throw o}finally{js(s),xd(r)}}resolveInjectorInitializers(){const t=xd(this),e=js(void 0);try{const n=this.get(Fp.multi,$n,kt.Self);for(const r of n)r()}finally{xd(t),js(e)}}toString(){const t=[],e=this.records;for(const n of e.keys())t.push(pi(n));return`R3Injector[${t.join(", ")}]`}assertNotDestroyed(){if(this._destroyed)throw new pe(205,!1)}processProvider(t){let e=Dc(t=Rt(t))?t:Rt(t&&t.provide);const n=function zp(i){return wi(i)?Ho(void 0,i.useValue):Ho(As(i),Up)}(t);if(Dc(t)||!0!==t.multi)this.records.get(e);else{let r=this.records.get(e);r||(r=Ho(void 0,Up,!0),r.factory=()=>Wf(r.multi),this.records.set(e,r)),e=t,r.multi.push(t)}this.records.set(e,n)}hydrate(t,e){return e.value===Up&&(e.value=SD,e.value=e.factory()),"object"==typeof e.value&&e.value&&function AD(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=Rt(t.providedIn);return"string"==typeof e?"any"===e||this.scopes.has(e):this.injectorDefTypes.has(e)}}function Tv(i){const t=zf(i),e=null!==t?t.factory:Ya(i);if(null!==e)return e;if(i instanceof me)throw new pe(204,!1);if(i instanceof Function)return function Zx(i){const t=i.length;if(t>0)throw Hd(t,"?"),new pe(204,!1);const e=function $u(i){return i&&(i[bd]||i[h_])||null}(i);return null!==e?()=>e.factory(i):()=>new i}(i);throw new pe(204,!1)}function As(i,t,e){let n;if(Dc(i)){const r=Rt(i);return Ya(r)||Tv(r)}if(wi(i))n=()=>Rt(i.useValue);else if(function Ev(i){return!(!i||!i.useFactory)}(i))n=()=>i.useFactory(...Wf(i.deps||[]));else if(function Pi(i){return!(!i||!i.useExisting)}(i))n=()=>ee(Rt(i.useExisting));else{const r=Rt(i&&(i.useClass||i.provide));if(!function ED(i){return!!i.deps}(i))return Ya(r)||Tv(r);n=()=>new r(...Wf(i.deps))}return n}function Ho(i,t,e=!1){return{factory:i,value:t,multi:e?[]:void 0}}function Iv(i,t){for(const e of i)Array.isArray(e)?Iv(e,t):e&&zu(e)?Iv(e.\u0275providers,t):t(e)}class TD{}class Rv{}class yo{resolveComponentFactory(t){throw function el(i){const t=Error(`No component factory found for ${pi(i)}. Did you add it to @NgModule.entryComponents?`);return t.ngComponent=i,t}(t)}}let Ol=(()=>{class i{}return i.NULL=new yo,i})();function RD(){return On(Ar(),Se())}function On(i,t){return new pt(Ai(i,t))}let pt=(()=>{class i{constructor(e){this.nativeElement=e}}return i.__NG_ELEMENT_ID__=RD,i})();function Qx(i){return i instanceof pt?i.nativeElement:i}class Fl{}let tl=(()=>{class i{}return i.__NG_ELEMENT_ID__=()=>function kD(){const i=Se(),e=ws(Ar().index,i);return(bs(e)?e:i)[_t]}(),i})(),PD=(()=>{class i{}return i.\u0275prov=Ie({token:i,providedIn:"root",factory:()=>null}),i})();class Tc{constructor(t){this.full=t,this.major=t.split(".")[0],this.minor=t.split(".")[1],this.patch=t.split(".").slice(2).join(".")}}const OD=new Tc("15.2.10"),kv={},Pv="ngOriginalError";function Ov(i){return i[Pv]}class nl{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&&Ov(t);for(;e&&Ov(e);)e=Ov(e);return e||null}}function il(i){return i instanceof Function?i():i}function ew(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 tw="ng-template";function HD(i,t,e){let n=0,r=!0;for(;ns?"":r[h+1].toLowerCase();const m=8&n?p:null;if(m&&-1!==ew(m,c,0)||2&n&&c!==p){if(Go(n))return!1;o=!0}}}}else{if(!o&&!Go(n)&&!Go(l))return!1;if(o&&Go(l))continue;o=!1,n=l|1&n}}return Go(n)||o}function Go(i){return 0==(1&i)}function nw(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&&!Go(o)&&(t+=Ic(s,r),r=""),n=o,s=s||!Go(n);e++}return""!==r&&(t+=Ic(s,r)),t}const sn={};function G(i){Uv(zn(),Se(),qn()+i,!1)}function Uv(i,t,e,n){if(!n)if(3==(3&t[fn])){const s=i.preOrderCheckHooks;null!==s&&ip(t,s,e)}else{const s=i.preOrderHooks;null!==s&&rp(t,s,0,e)}Ka(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||$n,MD(i)];return n=n||("object"==typeof i?void 0:pi(i)),new Vp(s,t||_h(),n||null,r)}let $i=(()=>{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=Ml,i.NULL=new Xx,i.\u0275prov=Ie({token:i,providedIn:"any",factory:()=>ee(Ja)}),i.__NG_ELEMENT_ID__=-1,i})();function E(i,t=kt.Default){const e=Se();return null===e?ee(i,t):N_(Ar(),e,Rt(i),t)}function bo(){throw new Error("invalid")}function hw(i,t){const e=i.contentQueries;if(null!==e)for(let n=0;nyi&&Uv(i,t,yi,!1),Qr(o?2:0,r),e(n,r)}finally{Ka(s),Qr(o?3:1,r)}}function qv(i,t,e){if(Kf(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,sn),r)}function be(i,t,e,n,r,s){const o=Ai(i,t);!function Xe(i,t,e,n,r,s,o){if(null==s)i.removeAttribute(t,r,e);else{const a=null==o?Qt(s):o(s,n||"",r);i.setAttribute(t,r,a,e)}}(t[_t],o,s,i.value,e,n,r)}function gt(i,t,e,n,r,s){const o=s[t];if(null!==o){const a=n.setInput;for(let l=0;l0&&rs(e)}}function rs(i){for(let n=rv(i);null!==n;n=sv(n))for(let r=Ui;r0&&rs(s)}const e=i[st].components;if(null!==e)for(let n=0;n0&&rs(r)}}function ss(i,t){const e=ws(t,i),n=e[st];(function no(i,t){for(let e=t.length;e-1&&(lv(t,n),hp(e,n))}this._attachedToViewContainer=!1}Ex(this._lView[st],this._lView)}onDestroy(t){mw(this._lView[st],this._lView,null,t)}markForCheck(){Ts(this._cdRefInjectingView||this._lView)}detach(){this._lView[fn]&=-65}reattach(){this._lView[fn]|=64}detectChanges(){xo(this._lView[st],this._lView,this.context)}checkNoChanges(){}attachToViewContainerRef(){if(this._appRef)throw new pe(902,!1);this._attachedToViewContainer=!0}detachFromAppRef(){this._appRef=null,function GA(i,t){mh(i,t,t[_t],2,null,null)}(this._lView[st],this._lView)}attachToAppRef(t){if(this._attachedToViewContainer)throw new pe(902,!1);this._appRef=t}}class m$ extends Jv{constructor(t){super(t),this._view=t}detectChanges(){const t=this._view;xo(t[st],t,t[Ue],!1)}checkNoChanges(){}get context(){return null}}class jF extends Ol{constructor(t){super(),this.ngModule=t}resolveComponentFactory(t){const e=Hn(t);return new ey(e,this.ngModule)}}function YF(i){const t=[];for(let e in i)i.hasOwnProperty(e)&&t.push({propName:i[e],templateName:e});return t}class _${constructor(t,e){this.injector=t,this.parentInjector=e}get(t,e,n){n=$f(n);const r=this.injector.get(t,kv,n);return r!==kv||e===kv?r:this.parentInjector.get(t,e,n)}}class ey extends Rv{get inputs(){return YF(this.componentDef.inputs)}get outputs(){return YF(this.componentDef.outputs)}constructor(t,e){super(),this.componentDef=t,this.ngModule=e,this.componentType=t.type,this.selector=function KD(i){return i.map(XD).join(",")}(t.selectors),this.ngContentSelectors=t.ngContentSelectors?t.ngContentSelectors:[],this.isBoundToModule=!!e}create(t,e,n,r){let s=(r=r||this.ngModule)instanceof eo?r:r?.injector;s&&null!==this.componentDef.getStandaloneInjector&&(s=this.componentDef.getStandaloneInjector(s)||s);const o=s?new _$(t,s):t,a=o.get(Fl,null);if(null===a)throw new pe(407,!1);const l=o.get(PD,null),c=a.createRenderer(null,this.componentDef),d=this.componentDef.selectors[0][0]||"div",h=n?function y1(i,t,e){return i.selectRootElement(t,e===Ys.ShadowDom)}(c,n,this.componentDef.encapsulation):Cp(c,d,function g$(i){const t=i.toLowerCase();return"svg"===t?Rd:"math"===t?"math":null}(d)),p=this.componentDef.onPush?288:272,m=Zv(0,null,null,1,0,null,null,null,null,null),g=vh(null,m,null,p,null,null,a,c,l,o,null);let b,v;np(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 y$(i,t){const e=i[st],n=yi;return i[n]=t,Kd(e,n,2,"#host",null)}(g,h),F=function b$(i,t,e,n,r,s,o,a){const l=r[st];!function x$(i,t,e,n){for(const r of i)t.mergedAttrs=_c(t.mergedAttrs,r.hostAttrs);null!==t.mergedAttrs&&(yw(t,t.mergedAttrs,!0),null!==e&&Bx(n,e,t))}(n,i,t,o);const c=s.createRenderer(t,e),d=vh(r,pw(e),null,e.onPush?32:16,r[i.index],i,s,c,a||null,null,null);return l.firstCreatePass&&P(l,i,n.length-1),Ti(r,d),r[i.index]=d}(C,h,y,M,g,a,c);v=P0(m,yi),h&&function M$(i,t,e,n){if(n)P_(i,e,["ng-version",OD.full]);else{const{attrs:r,classes:s}=function ZD(i){const t=[],e=[];let n=1,r=2;for(;n0&&Nx(i,e,s.join(" "))}}(c,y,h,n),void 0!==e&&function C$(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=_c(r.hostAttrs,e=_c(e,r.hostAttrs))}}(n)}function T1(i){return i===$a?{}:i===$n?[]:i}function A$(i,t){const e=i.viewQuery;i.viewQuery=e?(n,r)=>{t(n,r),e(n,r)}:t}function D$(i,t){const e=i.contentQueries;i.contentQueries=e?(n,r,s)=>{t(n,r,s),e(n,r,s)}:t}function T$(i,t){const e=i.hostBindings;i.hostBindings=e?(n,r)=>{t(n,r),e(n,r)}:t}function xw(i){return!!I1(i)&&(Array.isArray(i)||!(i instanceof Map)&&Symbol.iterator in i)}function I1(i){return null!==i&&("function"==typeof i||"object"==typeof i)}function Ll(i,t,e){return i[t]=e}function Is(i,t,e){return!Object.is(i[t],e)&&(i[t]=e,!0)}function xh(i,t,e,n){const r=Is(i,t,e);return Is(i,t+1,n)||r}function St(i,t,e,n){const r=Se();return Is(r,Al(),t)&&(zn(),be(Di(),r,i,t,e,n)),St}function $p(i,t,e,n){return Is(i,Al(),e)?t+Qt(e)+n:sn}function Wp(i,t,e,n,r,s){const a=xh(i,function qa(){return Dt.lFrame.bindingIndex}(),e,r);return Xs(2),a?t+Qt(e)+n+Qt(r)+s:sn}function fe(i,t,e,n,r,s,o,a){const l=Se(),c=zn(),d=i+yi,h=c.firstCreatePass?function U$(i,t,e,n,r,s,o,a,l){const c=t.consts,d=Kd(t,i,4,o||null,El(c,a));Qv(t,e,d,El(c,l)),Ld(t,d);const h=d.tView=Zv(2,d,n,r,s,t.directiveRegistry,t.pipeRegistry,null,t.schemas,c);return null!==t.queries&&(t.queries.template(t,d),h.queries=t.queries.embeddedTView(d)),d}(d,c,l,t,e,n,r,s,o):c.data[d];fa(h,!1);const p=l[_t].createComment("");ph(c,l,p,h),Gr(p,l),Ti(l,l[d]=mn(p,l,p,h)),hc(h)&&Xv(c,l,h),null!=o&&Kv(l,h,a)}function ir(i){return Pd(function hA(){return Dt.lFrame.contextLView}(),yi+i)}function U(i,t,e){const n=Se();return Is(n,Al(),t)&&to(zn(),Di(),n,i,t,n[_t],e,!1),U}function R1(i,t,e,n,r){const o=r?"class":"style";D1(i,e,t.inputs[o],o,n)}function W(i,t,e,n){const r=Se(),s=zn(),o=yi+i,a=r[_t],l=s.firstCreatePass?function z$(i,t,e,n,r,s){const o=t.consts,l=Kd(t,i,2,n,El(o,r));return Qv(t,e,l,El(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]=Cp(a,t,function H0(){return Dt.lFrame.currentNamespace}()),d=hc(l);return fa(l,!0),Bx(a,c,l),32!=(32&l.flags)&&ph(s,r,c,l),0===function aA(){return Dt.lFrame.elementDepthCount}()&&Gr(c,r),function lA(){Dt.lFrame.elementDepthCount++}(),d&&(Xv(s,r,l),qv(s,l,r)),null!==n&&Kv(r,l),W}function Y(){let i=Ar();S_()?E_():(i=i.parent,fa(i,!1));const t=i;!function cA(){Dt.lFrame.elementDepthCount--}();const e=zn();return e.firstCreatePass&&(Ld(e,i),Kf(i)&&e.queries.elementEnd(i)),null!=t.classesWithoutHost&&function vA(i){return 0!=(8&i.flags)}(t)&&R1(e,t,Se(),t.classesWithoutHost,!0),null!=t.stylesWithoutHost&&function k_(i){return 0!=(16&i.flags)}(t)&&R1(e,t,Se(),t.stylesWithoutHost,!1),Y}function Oe(i,t,e,n){return W(i,t,e,n),Y(),Oe}function $r(i,t,e){const n=Se(),r=zn(),s=i+yi,o=r.firstCreatePass?function H$(i,t,e,n,r){const s=t.consts,o=El(s,n),a=Kd(t,i,8,"ng-container",o);return null!==o&&yw(a,o,!0),Qv(t,e,a,El(s,r)),null!==t.queries&&t.queries.elementStart(t,a),a}(s,r,n,t,e):r.data[s];fa(o,!0);const a=n[s]=n[_t].createComment("");return ph(r,n,a,o),Gr(a,n),hc(o)&&(Xv(r,n,o),qv(r,o,n)),null!=e&&Kv(n,o),$r}function Wr(){let i=Ar();const t=zn();return S_()?E_():(i=i.parent,fa(i,!1)),t.firstCreatePass&&(Ld(t,i),Kf(i)&&t.queries.elementEnd(i)),Wr}function ny(i,t,e){return $r(i,t,e),Wr(),ny}function di(){return Se()}function iy(i){return!!i&&"function"==typeof i.then}function aL(i){return!!i&&"function"==typeof i.subscribe}const k1=aL;function Ne(i,t,e,n){const r=Se(),s=zn(),o=Ar();return lL(s,r,r[_t],o,i,t,n),Ne}function P1(i,t){const e=Ar(),n=Se(),r=zn();return lL(r,n,$F(Ju(r.data),e,n),e,i,t),P1}function lL(i,t,e,n,r,s,o){const a=hc(n),c=i.firstCreatePass&&GF(i),d=t[Ue],h=HF(t);let p=!0;if(3&n.type||o){const b=Ai(n,t),v=o?o(b):b,y=h.length,M=o?C=>o(I(C[n.index])):n.index;let x=null;if(!o&&a&&(x=function G$(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=dL(n,t,d,s,!1);const C=e.listen(v,r,s);h.push(s,C),c&&c.push(r,M,y,y+1)}}else s=dL(n,t,d,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?ws(i.index,t):t);let l=cL(t,e,n,o),c=s.__ngNextListenerFn__;for(;c;)l=cL(t,e,c,o)&&l,c=c.__ngNextListenerFn__;return r&&!1===l&&(o.preventDefault(),o.returnValue=!1),l}}function he(i=1){return function mA(i){return(Dt.lFrame.contextLView=function z0(i,t){for(;i>0;)t=t[Er],i--;return t}(i,Dt.lFrame.contextLView))[Ue]}(i)}function $$(i,t){let e=null;const n=function WD(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 L1(i){return 2|i}function wh(i){return(131068&i)>>2}function N1(i,t){return-131069&i|t<<2}function B1(i){return 1|i}function yL(i,t,e,n,r){const s=i[e+1],o=null===t;let a=n?Qd(s):wh(s),l=!1;for(;0!==a&&(!1===l||o);){const d=i[a+1];K$(i[a],t)&&(l=!0,i[a+1]=n?B1(d):L1(d)),a=n?Qd(d):wh(d)}l&&(i[e+1]=n?L1(s):B1(s))}function K$(i,t){return null===i||null==t||(Array.isArray(i)?i[1]:i)===t||!(!Array.isArray(i)||"string"!=typeof t)&&wc(i,t)>=0}const Rr={textEnd:0,key:0,keyEnd:0,value:0,valueEnd:0};function bL(i){return i.substring(Rr.key,Rr.keyEnd)}function xL(i,t){const e=Rr.textEnd;return e===t?-1:(t=Rr.keyEnd=function eW(i,t,e){for(;t32;)t++;return t}(i,Rr.key=t,e),Qp(i,t,e))}function Qp(i,t,e){for(;t=0;e=xL(t,e))Cs(i,bL(t),!0)}function rl(i,t,e,n){const r=Se(),s=zn(),o=Xs(2);s.firstUpdatePass&&AL(s,i,o,n),t!==sn&&Is(r,o,t)&&TL(s,s.data[qn()],r,r[_t],i,r[o+1]=function hW(i,t){return null==i||""===i||("string"==typeof t?i+=t:"object"==typeof i&&(i=pi(Qs(i)))),i}(t,e),n,o)}function EL(i,t){return t>=i.expandoStartIndex}function AL(i,t,e,n){const r=i.data;if(null===r[e+1]){const s=r[qn()],o=EL(i,e);RL(s,n)&&null===t&&!o&&(t=!1),t=function sW(i,t,e,n){const r=Ju(i);let s=n?t.residualClasses:t.residualStyles;if(null===r)0===(n?t.classBindings:t.styleBindings)&&(e=ry(e=U1(null,i,t,e,n),t.attrs,n),s=null);else{const o=t.directiveStylingLast;if(-1===o||i[o]!==r)if(e=U1(r,i,t,e,n),null===s){let l=function oW(i,t,e){const n=e?t.classBindings:t.styleBindings;if(0!==wh(n))return i[Qd(n)]}(i,t,n);void 0!==l&&Array.isArray(l)&&(l=U1(null,i,t,l[1],n),l=ry(l,t.attrs,n),function aW(i,t,e,n){i[Qd(e?t.classBindings:t.styleBindings)]=n}(i,t,n,l))}else s=function lW(i,t,e){let n;const r=t.directiveEnd;for(let s=1+t.directiveStylingLast;s0)&&(c=!0)):d=e,r)if(0!==l){const p=Qd(i[a+1]);i[n+1]=Mw(p,a),0!==p&&(i[p+1]=N1(i[p+1],n)),i[a+1]=function j$(i,t){return 131071&i|t<<17}(i[a+1],n)}else i[n+1]=Mw(a,0),0!==a&&(i[a+1]=N1(i[a+1],n)),a=n;else i[n+1]=Mw(l,0),0===a?a=n:i[l+1]=N1(i[l+1],n),l=n;c&&(i[n+1]=L1(i[n+1])),yL(i,d,n,!0),yL(i,d,n,!1),function X$(i,t,e,n,r){const s=r?i.residualClasses:i.residualStyles;null!=s&&"string"==typeof t&&wc(s,t)>=0&&(e[n+1]=B1(e[n+1]))}(t,d,i,n,s),o=Mw(a,l),s?t.classBindings=o:t.styleBindings=o}(r,s,t,e,o,n)}}function U1(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),d=c?l[1]:l,h=null===d;let p=e[r+1];p===sn&&(p=h?$n:void 0);let m=h?$d(p,n):d===n?p:void 0;if(c&&!Cw(m)&&(m=$d(l,n)),Cw(m)&&(a=m,o))return a;const g=i[r+1];r=o?Qd(g):wh(g)}if(null!==t){let l=s?t.residualClasses:t.residualStyles;null!=l&&(a=$d(l,n))}return a}function Cw(i){return void 0!==i}function RL(i,t){return 0!=(i.flags&(t?8:16))}function Ge(i,t=""){const e=Se(),n=zn(),r=i+yi,s=n.firstCreatePass?Kd(n,r,1,t,null):n.data[r],o=e[r]=function ov(i,t){return i.createText(t)}(e[_t],t);ph(n,e,o,s),fa(s,!1)}function _i(i){return Xi("",i,""),_i}function Xi(i,t,e){const n=Se(),r=$p(n,i,t,e);return r!==sn&&Rc(n,qn(),r),Xi}function Jp(i,t,e,n,r){const s=Se(),o=Wp(s,i,t,e,n,r);return o!==sn&&Rc(s,qn(),o),Jp}function UL(i,t,e){!function sl(i,t,e,n){const r=zn(),s=Xs(2);r.firstUpdatePass&&AL(r,null,s,n);const o=Se();if(e!==sn&&Is(o,s,e)){const a=r.data[qn()];if(RL(a,n)&&!EL(r,s)){let l=n?a.classesWithoutHost:a.stylesWithoutHost;null!==l&&(e=Bf(l,e||"")),R1(r,a,o,e,n)}else!function uW(i,t,e,n,r,s,o,a){r===sn&&(r=$n);let l=0,c=0,d=0((it=it||{})[it.LocaleId=0]="LocaleId",it[it.DayPeriodsFormat=1]="DayPeriodsFormat",it[it.DayPeriodsStandalone=2]="DayPeriodsStandalone",it[it.DaysFormat=3]="DaysFormat",it[it.DaysStandalone=4]="DaysStandalone",it[it.MonthsFormat=5]="MonthsFormat",it[it.MonthsStandalone=6]="MonthsStandalone",it[it.Eras=7]="Eras",it[it.FirstDayOfWeek=8]="FirstDayOfWeek",it[it.WeekendRange=9]="WeekendRange",it[it.DateFormat=10]="DateFormat",it[it.TimeFormat=11]="TimeFormat",it[it.DateTimeFormat=12]="DateTimeFormat",it[it.NumberSymbols=13]="NumberSymbols",it[it.NumberFormats=14]="NumberFormats",it[it.CurrencyCode=15]="CurrencyCode",it[it.CurrencySymbol=16]="CurrencySymbol",it[it.CurrencyName=17]="CurrencyName",it[it.Currencies=18]="Currencies",it[it.Directionality=19]="Directionality",it[it.PluralCase=20]="PluralCase",it[it.ExtraData=21]="ExtraData",it))();const tm="en-US";let ZL=tm;function H1(i,t,e,n,r){if(i=Rt(i),Array.isArray(i))for(let s=0;s>20;if(Dc(i)||!i.multi){const m=new Nd(l,r,E),g=$1(a,t,r?d:d+p,h);-1===g?(pn(nh(c,o),s,a),G1(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=$1(a,t,d+p,h),g=$1(a,t,d,d+p),v=g>=0&&e[g];if(r&&!v||!r&&!(m>=0&&e[m])){pn(nh(c,o),s,a);const y=function Tj(i,t,e,n,r){const s=new Nd(i,e,E);return s.multi=[],s.index=t,s.componentProviders=0,M2(s,r,n&&!e),s}(r?Dj:Aj,e.length,r,n,l);!r&&v&&(e[g].providerFactory=y),G1(s,i,t.length,0),t.push(a),c.directiveStart++,c.directiveEnd++,r&&(c.providerIndexes+=1048576),e.push(y),o.push(y)}else G1(s,i,m>-1?m:g,M2(e[r?g:m],l,!r&&n));!r&&n&&v&&e[g].componentProviders++}}}function G1(i,t,e,n){const r=Dc(t),s=function CD(i){return!!i.useClass}(t);if(r||s){const l=(s?Rt(t.useClass):t).prototype.ngOnDestroy;if(l){const c=i.destroyHooks||(i.destroyHooks=[]);if(!r&&t.multi){const d=c.indexOf(e);-1===d?c.push(e,[n,l]):c[d+1].push(n,l)}else c.push(e,l)}}}function M2(i,t,e){return e&&i.componentProviders++,i.multi.push(t)-1}function $1(i,t,e,n){for(let r=e;r{e.providersResolver=(n,r)=>function Ej(i,t,e){const n=zn();if(n.firstCreatePass){const r=go(i);H1(e,n.data,n.blueprint,r,!0),H1(t,n.data,n.blueprint,r,!1)}}(n,r?r(i):i,t)}}class nm{}class C2{}class S2 extends nm{constructor(t,e){super(),this._parent=e,this._bootstrapComponents=[],this.destroyCbs=[],this.componentFactoryResolver=new jF(this);const n=dr(t);this._bootstrapComponents=il(n.bootstrap),this._r3Injector=ow(t,e,[{provide:nm,useValue:this},{provide:Ol,useValue:this.componentFactoryResolver}],pi(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 j1 extends C2{constructor(t){super(),this.moduleType=t}create(t){return new S2(this.moduleType,t)}}class Rj extends nm{constructor(t,e,n){super(),this.componentFactoryResolver=new jF(this),this.instance=null;const r=new Vp([...t,{provide:nm,useValue:this},{provide:Ol,useValue:this.componentFactoryResolver}],e||_h(),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 Rj(i,t,e).injector}let kj=(()=>{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=Kx(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(ee(eo))}),i})();function Y1(i){i.getStandaloneInjector=t=>t.get(kj).getOrCreateStandaloneInjector(i)}function ro(i,t,e){const n=zr()+i,r=Se();return r[n]===sn?Ll(r,n,e?t.call(e):t()):function ty(i,t){return i[t]}(r,n)}function im(i,t,e,n){return P2(Se(),zr(),i,t,e,n)}function k2(i,t,e,n,r,s,o){return function L2(i,t,e,n,r,s,o,a,l){const c=t+e;return function Ma(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)?Ll(i,c+4,l?n.call(l,r,s,o,a):n(r,s,o,a)):dy(i,c+4)}(Se(),zr(),i,t,e,n,r,s,o)}function dy(i,t){const e=i[t];return e===sn?void 0:e}function P2(i,t,e,n,r,s){const o=t+e;return Is(i,o,r)?Ll(i,o+1,s?n.call(s,r):n(r)):dy(i,o+1)}function Ht(i,t){const e=zn();let n;const r=i+yi;e.firstCreatePass?(n=function qj(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=Ya(n.type)),o=js(E);try{const a=ap(!1),l=s();return ap(a),function V$(i,t,e,n){e>=i.data.length&&(i.data[e]=null,i.blueprint[e]=null),t[e]=n}(e,Se(),r,l),l}finally{js(o)}}function Kt(i,t,e){const n=i+yi,r=Se(),s=Pd(r,n);return uy(r,n)?P2(r,zr(),t,s.transform,e,s):s.transform(e)}function X1(i,t,e,n){const r=i+yi,s=Se(),o=Pd(s,r);return uy(s,r)?function O2(i,t,e,n,r,s,o){const a=t+e;return xh(i,a,r,s)?Ll(i,a+2,o?n.call(o,r,s):n(r,s)):dy(i,a+2)}(s,zr(),t,o.transform,e,n,o):o.transform(e,n)}function uy(i,t){return i[st].data[t].pure}function K1(i){return t=>{setTimeout(i,void 0,t)}}const $e=class Qj extends Re{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=K1(s),r&&(r=K1(r)),o&&(o=K1(o)));const a=super.subscribe({next:r,error:s,complete:o});return t instanceof Zt&&t.add(a),a}};function Jj(){return this._results[Symbol.iterator]()}class rm{get changes(){return this._changes||(this._changes=new $e)}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=rm.prototype;e[Symbol.iterator]||(e[Symbol.iterator]=Jj)}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 Dr(i){return i.flat(Number.POSITIVE_INFINITY)}(t);(this._changesDetected=!function up(i,t,e){if(i.length!==t.length)return!1;for(let n=0;n{class i{}return i.__NG_ELEMENT_ID__=n6,i})();const e6=wo,t6=class extends e6{constructor(t,e,n){super(),this._declarationLView=t,this._declarationTContainer=e,this.elementRef=n}createEmbeddedView(t,e){const n=this._declarationTContainer.tView,r=vh(this._declarationLView,n,t,16,null,n.declTNode,null,null,null,null,e||null);r[Zu]=this._declarationLView[this._declarationTContainer.index];const o=this._declarationLView[qs];return null!==o&&(r[qs]=o.createEmbeddedView(n)),bh(n,r,t),new Jv(r)}};function n6(){return Rw(Ar(),Se())}function Rw(i,t){return 4&i.type?new t6(t,i,On(i,t)):null}let jr=(()=>{class i{}return i.__NG_ELEMENT_ID__=r6,i})();function r6(){return V2(Ar(),Se())}const s6=jr,B2=class extends s6{constructor(t,e,n){super(),this._lContainer=t,this._hostTNode=e,this._hostLView=n}get element(){return On(this._hostTNode,this._hostLView)}get injector(){return new yc(this._hostTNode,this._hostLView)}get parentInjector(){const t=rh(this._hostTNode,this._hostLView);if(op(t)){const e=th(t,this._hostLView),n=eh(t);return new yc(e[st].data[n+8],e)}return new yc(null,this._hostLView)}clear(){for(;this.length>0;)this.remove(this.length-1)}get(t){const e=U2(this._lContainer);return null!==e&&e[t]||null}get length(){return this._lContainer.length-Ui}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 ah(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 ey(Hn(t)),c=n||this.parentInjector;if(!s&&null==l.ngModule){const p=(o?c:this.parentInjector).get(eo,null);p&&(s=p)}const d=l.create(c,r,void 0,s);return this.insert(d.hostView,a),d}insert(t,e){const n=t._lView,r=n[st];if(function oA(i){return xs(i[Bi])}(n)){const d=this.indexOf(t);if(-1!==d)this.detach(d);else{const h=n[Bi],p=new B2(h,h[ue],h[Bi]);p.detach(p.indexOf(t))}}const s=this._adjustIndex(e),o=this._lContainer;!function av(i,t,e,n){const r=Ui+n,s=e.length;n>0&&(e[r-1][ys]=t),n0)n.push(o[a/2]);else{const c=s[a+1],d=t[-l];for(let h=Ui;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)(ee(Ow,8))},i.\u0275prov=Ie({token:i,factory:i.\u0275fac,providedIn:"root"}),i})();const am=new me("AppId",{providedIn:"root",factory:function cN(){return`${lT()}${lT()}${lT()}`}});function lT(){return String.fromCharCode(97+Math.floor(25*Math.random()))}const dN=new me("Platform Initializer"),cT=new me("Platform ID",{providedIn:"platform",factory:()=>"unknown"}),kr=new me("AnimationModuleType");let R6=(()=>{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 Vl=new me("LocaleId",{providedIn:"root",factory:()=>Pt(Vl,kt.Optional|kt.SkipSelf)||function k6(){return typeof $localize<"u"&&$localize.locale||tm}()});class O6{constructor(t,e){this.ngModuleFactory=t,this.componentFactories=e}}let uN=(()=>{class i{compileModuleSync(e){return new j1(e)}compileModuleAsync(e){return Promise.resolve(this.compileModuleSync(e))}compileModuleAndAllComponentsSync(e){const n=this.compileModuleSync(e),s=il(dr(e).declarations).reduce((o,a)=>{const l=Hn(a);return l&&o.push(new ey(l)),o},[]);return new O6(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 N6=(()=>Promise.resolve(0))();function dT(i){typeof Zone>"u"?N6.then(()=>{i&&i.apply(null,null)}):Zone.current.scheduleMicroTask("scheduleMicrotask",i)}class ht{constructor({enableLongStackTrace:t=!1,shouldCoalesceEventChangeDetection:e=!1,shouldCoalesceRunChangeDetection:n=!1}){if(this.hasPendingMacrotasks=!1,this.hasPendingMicrotasks=!1,this.isStable=!0,this.onUnstable=new $e(!1),this.onMicrotaskEmpty=new $e(!1),this.onStable=new $e(!1),this.onError=new $e(!1),typeof Zone>"u")throw new pe(908,!1);Zone.assertZonePatched();const r=this;r._nesting=0,r._outer=r._inner=Zone.current,Zone.TaskTrackingZoneSpec&&(r._inner=r._inner.fork(new Zone.TaskTrackingZoneSpec)),t&&Zone.longStackTraceZoneSpec&&(r._inner=r._inner.fork(Zone.longStackTraceZoneSpec)),r.shouldCoalesceEventChangeDetection=!n&&e,r.shouldCoalesceRunChangeDetection=n,r.lastRequestAnimationFrameId=-1,r.nativeRequestAnimationFrame=function B6(){let i=In.requestAnimationFrame,t=In.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 z6(i){const t=()=>{!function V6(i){i.isCheckStableRunning||-1!==i.lastRequestAnimationFrameId||(i.lastRequestAnimationFrameId=i.nativeRequestAnimationFrame.call(In,()=>{i.fakeTopEventTask||(i.fakeTopEventTask=Zone.root.scheduleEventTask("fakeTopEventTask",()=>{i.lastRequestAnimationFrameId=-1,hT(i),i.isCheckStableRunning=!0,uT(i),i.isCheckStableRunning=!1},void 0,()=>{},()=>{})),i.fakeTopEventTask.invoke()}),hT(i))}(i)};i._inner=i._inner.fork({name:"angular",properties:{isAngularZone:!0},onInvokeTask:(e,n,r,s,o,a)=>{try{return pN(i),e.invokeTask(r,s,o,a)}finally{(i.shouldCoalesceEventChangeDetection&&"eventTask"===s.type||i.shouldCoalesceRunChangeDetection)&&t(),mN(i)}},onInvoke:(e,n,r,s,o,a,l)=>{try{return pN(i),e.invoke(r,s,o,a,l)}finally{i.shouldCoalesceRunChangeDetection&&t(),mN(i)}},onHasTask:(e,n,r,s)=>{e.hasTask(r,s),n===r&&("microTask"==s.change?(i._hasPendingMicrotasks=s.microTask,hT(i),uT(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(!ht.isInAngularZone())throw new pe(909,!1)}static assertNotInAngularZone(){if(ht.isInAngularZone())throw new pe(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,U6,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 U6={};function uT(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 hT(i){i.hasPendingMicrotasks=!!(i._hasPendingMicrotasks||(i.shouldCoalesceEventChangeDetection||i.shouldCoalesceRunChangeDetection)&&-1!==i.lastRequestAnimationFrameId)}function pN(i){i._nesting++,i.isStable&&(i.isStable=!1,i.onUnstable.emit(null))}function mN(i){i._nesting--,uT(i)}class H6{constructor(){this.hasPendingMicrotasks=!1,this.hasPendingMacrotasks=!1,this.isStable=!0,this.onUnstable=new $e,this.onMicrotaskEmpty=new $e,this.onStable=new $e,this.onError=new $e}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 gN=new me(""),Lw=new me("");let mT,fT=(()=>{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,mT||(function G6(i){mT=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:()=>{ht.assertNotInAngularZone(),dT(()=>{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())dT(()=>{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)(ee(ht),ee(pT),ee(Lw))},i.\u0275prov=Ie({token:i,factory:i.\u0275fac}),i})(),pT=(()=>{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 mT?.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 Pc=!1;let Jd=null;const _N=new me("AllowMultipleToken"),gT=new me("PlatformDestroyListeners"),vN=new me("appBootstrapListener");class yN{constructor(t,e){this.name=t,this.token=e}}function xN(i,t,e=[]){const n=`Platform: ${t}`,r=new me(n);return(s=[])=>{let o=_T();if(!o||o.injector.get(_N,!1)){const a=[...e,...s,{provide:r,useValue:!0}];i?i(a):function j6(i){if(Jd&&!Jd.get(_N,!1))throw new pe(400,!1);Jd=i;const t=i.get(MN);(function bN(i){const t=i.get(dN,null);t&&t.forEach(e=>e())})(i)}(function wN(i=[],t){return $i.create({name:t,providers:[{provide:Av,useValue:"platform"},{provide:gT,useValue:new Set([()=>Jd=null])},...i]})}(a,n))}return function q6(i){const t=_T();if(!t)throw new pe(401,!1);return t}()}}function _T(){return Jd?.get(MN)??null}let MN=(()=>{class i{constructor(e){this._injector=e,this._modules=[],this._destroyListeners=[],this._destroyed=!1}bootstrapModuleFactory(e,n){const r=function SN(i,t){let e;return e="noop"===i?new H6:("zone.js"===i?void 0:i)||new ht(t),e}(n?.ngZone,function CN(i){return{enableLongStackTrace:!1,shouldCoalesceEventChangeDetection:!(!i||!i.ngZoneEventCoalescing)||!1,shouldCoalesceRunChangeDetection:!(!i||!i.ngZoneRunCoalescing)||!1}}(n)),s=[{provide:ht,useValue:r}];return r.run(()=>{const o=$i.create({providers:s,parent:this.injector,name:e.moduleType.name}),a=e.create(o),l=a.injector.get(nl,null);if(!l)throw new pe(402,!1);return r.runOutsideAngular(()=>{const c=r.onError.subscribe({next:d=>{l.handleError(d)}});a.onDestroy(()=>{Nw(this._modules,a),c.unsubscribe()})}),function EN(i,t,e){try{const n=e();return iy(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 QL(i){Sn(i,"Expected localeId to be defined"),"string"==typeof i&&(ZL=i.toLowerCase().replace(/_/g,"-"))}(a.injector.get(Vl,tm)||tm),this._moduleDoBootstrap(a),a))})})}bootstrapModule(e,n=[]){const r=AN({},n);return function $6(i,t,e){const n=new j1(e);return Promise.resolve(n)}(0,0,e).then(s=>this.bootstrapModuleFactory(s,r))}_moduleDoBootstrap(e){const n=e.injector.get(lm);if(e._bootstrapComponents.length>0)e._bootstrapComponents.forEach(r=>n.bootstrap(r));else{if(!e.instance.ngDoBootstrap)throw new pe(-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 pe(404,!1);this._modules.slice().forEach(n=>n.destroy()),this._destroyListeners.forEach(n=>n());const e=this._injector.get(gT,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)(ee($i))},i.\u0275prov=Ie({token:i,factory:i.\u0275fac,providedIn:"platform"}),i})();function AN(i,t){return Array.isArray(t)?t.reduce(AN,i):{...i,...t}}let lm=(()=>{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 Tn(a=>{this._stable=this._zone.isStable&&!this._zone.hasPendingMacrotasks&&!this._zone.hasPendingMicrotasks,this._zone.runOutsideAngular(()=>{a.next(this._stable),a.complete()})}),o=new Tn(a=>{let l;this._zone.runOutsideAngular(()=>{l=this._zone.onStable.subscribe(()=>{ht.assertNotInAngularZone(),dT(()=>{!this._stable&&!this._zone.hasPendingMacrotasks&&!this._zone.hasPendingMicrotasks&&(this._stable=!0,a.next(!0))})})});const c=this._zone.onUnstable.subscribe(()=>{ht.assertInAngularZone(),this._stable&&(this._stable=!1,this._zone.runOutsideAngular(()=>{a.next(!1)}))});return()=>{l.unsubscribe(),c.unsubscribe()}});this.isStable=Cr(s,o.pipe(Nf()))}bootstrap(e,n){const r=e instanceof Rv;if(!this._injector.get(Fw).done){!r&&function Cd(i){const t=Hn(i)||Vr(i)||vs(i);return null!==t&&t.standalone}(e);throw new pe(405,Pc)}let o;o=r?e:this._injector.get(Ol).resolveComponentFactory(e),this.componentTypes.push(o.componentType);const a=function W6(i){return i.isBoundToModule}(o)?void 0:this._injector.get(nm),c=o.create($i.NULL,[],n||o.selector,a),d=c.location.nativeElement,h=c.injector.get(gN,null);return h?.registerApplication(d),c.onDestroy(()=>{this.detachView(c.hostView),Nw(this.components,c),h?.unregisterApplication(d)}),this._loadComponent(c),c}tick(){if(this._runningTick)throw new pe(101,!1);try{this._runningTick=!0;for(let e of this._views)e.detectChanges()}catch(e){this._zone.runOutsideAngular(()=>this._exceptionHandler.handleError(e))}finally{this._runningTick=!1}}attachView(e){const 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(vN,[]);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 pe(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)(ee(ht),ee(eo),ee(nl))},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__=K6,i})();function K6(i){return function Z6(i,t,e){if(Ed(i)&&!e){const n=ws(i.index,t);return new Jv(n,n)}return 47&i.type?new Jv(t[nr],t):null}(Ar(),Se(),16==(16&i))}class kN{constructor(){}supports(t){return xw(t)}create(t){return new r9(t)}}const n9=(i,t)=>t;class r9{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||n9}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 s9(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 PN),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 PN),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 s9{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 o9{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 PN{constructor(){this.map=new Map}put(t){const e=t.trackById;let n=this.map.get(e);n||(n=new o9,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 ON(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 l9(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 l9{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 LN(){return new Vw([new kN])}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||LN()),deps:[[i,new ya,new Ss]]}}find(e){const n=this.factories.find(r=>r.supports(e));if(null!=n)return n;throw new pe(901,!1)}}return i.\u0275prov=Ie({token:i,providedIn:"root",factory:LN}),i})();function NN(){return new fy([new FN])}let fy=(()=>{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||NN()),deps:[[i,new ya,new Ss]]}}find(e){const n=this.factories.find(r=>r.supports(e));if(n)return n;throw new pe(901,!1)}}return i.\u0275prov=Ie({token:i,providedIn:"root",factory:NN}),i})();const u9=xN(null,"core",[]);let h9=(()=>{class i{constructor(e){}}return i.\u0275fac=function(e){return new(e||i)(ee(lm))},i.\u0275mod=nn({type:i}),i.\u0275inj=Xt({}),i})();let wT=null;function Oc(){return wT}class m9{}const Wt=new me("DocumentToken");let MT=(()=>{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 g9(){return ee(BN)}()},providedIn:"platform"}),i})();const _9=new me("Location Initialized");let BN=(()=>{class i extends MT{constructor(e){super(),this._doc=e,this._location=window.location,this._history=window.history}getBaseHrefFromDOM(){return Oc().getBaseHref(this._doc)}onPopState(e){const n=Oc().getGlobalEventTarget(this._doc,"window");return n.addEventListener("popstate",e,!1),()=>n.removeEventListener("popstate",e)}onHashChange(e){const n=Oc().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){UN()?this._history.pushState(e,n,r):this._location.hash=r}replaceState(e,n,r){UN()?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)(ee(Wt))},i.\u0275prov=Ie({token:i,factory:function(){return function v9(){return new BN(ee(Wt))}()},providedIn:"platform"}),i})();function UN(){return!!window.history.pushState}function CT(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 VN(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 Fc(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 Pt(HN)},providedIn:"root"}),i})();const zN=new me("appBaseHref");let HN=(()=>{class i extends Sh{constructor(e,n){super(),this._platformLocation=e,this._removeListenerFns=[],this._baseHref=n??this._platformLocation.getBaseHrefFromDOM()??Pt(Wt).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 CT(this._baseHref,e)}path(e=!1){const n=this._platformLocation.pathname+Fc(this._platformLocation.search),r=this._platformLocation.hash;return r&&e?`${n}${r}`:n}pushState(e,n,r,s){const o=this.prepareExternalUrl(r+Fc(s));this._platformLocation.pushState(e,n,o)}replaceState(e,n,r,s){const o=this.prepareExternalUrl(r+Fc(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)(ee(MT),ee(zN,8))},i.\u0275prov=Ie({token:i,factory:i.\u0275fac,providedIn:"root"}),i})(),y9=(()=>{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=CT(this._baseHref,e);return n.length>0?"#"+n:n}pushState(e,n,r,s){let o=this.prepareExternalUrl(r+Fc(s));0==o.length&&(o=this._platformLocation.pathname),this._platformLocation.pushState(e,n,o)}replaceState(e,n,r,s){let o=this.prepareExternalUrl(r+Fc(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)(ee(MT),ee(zN,8))},i.\u0275prov=Ie({token:i,factory:i.\u0275fac}),i})(),py=(()=>{class i{constructor(e){this._subject=new $e,this._urlChangeListeners=[],this._urlChangeSubscription=null,this._locationStrategy=e;const n=this._locationStrategy.getBaseHref();this._basePath=function w9(i){if(new RegExp("^(https?:)?//").test(i)){const[,e]=i.split(/\/\/[^\/]+/);return e}return i}(VN(GN(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+Fc(n))}normalize(e){return i.stripTrailingSlash(function x9(i,t){if(!i||!t.startsWith(i))return t;const e=t.substring(i.length);return""===e||["/",";","?","#"].includes(e[0])?e:t}(this._basePath,GN(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+Fc(n)),r)}replaceState(e,n="",r=null){this._locationStrategy.replaceState(r,"",e,n),this._notifyUrlChangeListeners(this.prepareExternalUrl(e+Fc(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=Fc,i.joinWithSlash=CT,i.stripTrailingSlash=VN,i.\u0275fac=function(e){return new(e||i)(ee(Sh))},i.\u0275prov=Ie({token:i,factory:function(){return function b9(){return new py(ee(Sh))}()},providedIn:"root"}),i})();function GN(i){return i.replace(/\/index.html$/,"")}var Mo=(()=>((Mo=Mo||{})[Mo.Decimal=0]="Decimal",Mo[Mo.Percent=1]="Percent",Mo[Mo.Currency=2]="Currency",Mo[Mo.Scientific=3]="Scientific",Mo))(),Vt=(()=>((Vt=Vt||{})[Vt.Decimal=0]="Decimal",Vt[Vt.Group=1]="Group",Vt[Vt.List=2]="List",Vt[Vt.PercentSign=3]="PercentSign",Vt[Vt.PlusSign=4]="PlusSign",Vt[Vt.MinusSign=5]="MinusSign",Vt[Vt.Exponential=6]="Exponential",Vt[Vt.SuperscriptingExponent=7]="SuperscriptingExponent",Vt[Vt.PerMille=8]="PerMille",Vt[Vt.Infinity=9]="Infinity",Vt[Vt.NaN=10]="NaN",Vt[Vt.TimeSeparator=11]="TimeSeparator",Vt[Vt.CurrencyDecimal=12]="CurrencyDecimal",Vt[Vt.CurrencyGroup=13]="CurrencyGroup",Vt))();function Ca(i,t){const e=io(i),n=e[it.NumberSymbols][t];if(typeof n>"u"){if(t===Vt.CurrencyDecimal)return e[it.NumberSymbols][Vt.Decimal];if(t===Vt.CurrencyGroup)return e[it.NumberSymbols][Vt.Group]}return n}const q9=/^(\d+)?\.((\d+)(-(\d+))?)?$/,XN=22,Xw=".",gy="0",X9=";",K9=",",TT="#";function kT(i){const t=parseInt(i);if(isNaN(t))throw new Error("Invalid integer literal when parsing "+i);return t}const OT=/\s+/,QN=[];let dm=(()=>{class i{constructor(e,n,r,s){this._iterableDiffers=e,this._keyValueDiffers=n,this._ngEl=r,this._renderer=s,this.initialClasses=QN,this.stateMap=new Map}set klass(e){this.initialClasses=null!=e?e.trim().split(OT):QN}set ngClass(e){this.rawClass="string"==typeof e?e.trim().split(OT):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(OT).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)(E(Vw),E(fy),E(pt),E(tl))},i.\u0275dir=ve({type:i,selectors:[["","ngClass",""]],inputs:{klass:["class","klass"],ngClass:"ngClass"},standalone:!0}),i})();class aY{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 Co=(()=>{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 aY(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),tB(a,r)}});for(let r=0,s=n.length;r{tB(n.get(r.currentIndex),r)})}static ngTemplateContextGuard(e,n){return!0}}return i.\u0275fac=function(e){return new(e||i)(E(jr),E(wo),E(Vw))},i.\u0275dir=ve({type:i,selectors:[["","ngFor","","ngForOf",""]],inputs:{ngForOf:"ngForOf",ngForTrackBy:"ngForTrackBy",ngForTemplate:"ngForTemplate"},standalone:!0}),i})();function tB(i,t){i.context.$implicit=t.item}let Mi=(()=>{class i{constructor(e,n){this._viewContainer=e,this._context=new cY,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){nB("ngIfThen",e),this._thenTemplateRef=e,this._thenViewRef=null,this._updateView()}set ngIfElse(e){nB("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)(E(jr),E(wo))},i.\u0275dir=ve({type:i,selectors:[["","ngIf",""]],inputs:{ngIf:"ngIf",ngIfThen:"ngIfThen",ngIfElse:"ngIfElse"},standalone:!0}),i})();class cY{constructor(){this.$implicit=null,this.ngIf=null}}function nB(i,t){if(t&&!t.createEmbeddedView)throw new Error(`${i} must be a TemplateRef, but received '${pi(t)}'.`)}class FT{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 _y=(()=>{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=ve({type:i,selectors:[["","ngSwitch",""]],inputs:{ngSwitch:"ngSwitch"},standalone:!0}),i})(),LT=(()=>{class i{constructor(e,n,r){this.ngSwitch=r,r._addCase(),this._view=new FT(e,n)}ngDoCheck(){this._view.enforceState(this.ngSwitch._matchCase(this.ngSwitchCase))}}return i.\u0275fac=function(e){return new(e||i)(E(jr),E(wo),E(_y,9))},i.\u0275dir=ve({type:i,selectors:[["","ngSwitchCase",""]],inputs:{ngSwitchCase:"ngSwitchCase"},standalone:!0}),i})(),iB=(()=>{class i{constructor(e,n,r){r._addDefault(new FT(e,n))}}return i.\u0275fac=function(e){return new(e||i)(E(jr),E(wo),E(_y,9))},i.\u0275dir=ve({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:Es.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)(E(pt),E(fy),E(tl))},i.\u0275dir=ve({type:i,selectors:[["","ngStyle",""]],inputs:{ngStyle:"ngStyle"},standalone:!0}),i})(),vy=(()=>{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)(E(jr))},i.\u0275dir=ve({type:i,selectors:[["","ngTemplateOutlet",""]],inputs:{ngTemplateOutletContext:"ngTemplateOutletContext",ngTemplateOutlet:"ngTemplateOutlet",ngTemplateOutletInjector:"ngTemplateOutletInjector"},standalone:!0,features:[bi]}),i})();function ll(i,t){return new pe(2100,!1)}class uY{createSubscription(t,e){return t.subscribe({next:e,error:n=>{throw n}})}dispose(t){t.unsubscribe()}}class hY{createSubscription(t,e){return t.then(e,n=>{throw n})}dispose(t){}}const fY=new hY,pY=new uY;let zl=(()=>{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(iy(e))return fY;if(aL(e))return pY;throw ll()}_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)(E(ri,16))},i.\u0275pipe=Gi({name:"async",type:i,pure:!1,standalone:!0}),i})(),sB=(()=>{class i{constructor(e){this.differs=e,this.keyValues=[],this.compareFn=oB}transform(e,n=oB){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 AY(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)(E(fy,16))},i.\u0275pipe=Gi({name:"keyvalue",type:i,pure:!1,standalone:!0}),i})();function oB(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 NT(i){return!(null==i||""===i||i!=i)}(e))return null;r=r||this._locale;try{return function eY(i,t,e){return function IT(i,t,e,n,r,s,o=!1){let a="",l=!1;if(isFinite(i)){let c=function nY(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)===gy;s++);if(s===(a=t.length))n=[0],r=1;else{for(a--;t.charAt(a)===gy;)a--;for(r-=s,n=[],o=0;s<=a;s++,o++)n[o]=Number(t.charAt(s))}return r>XN&&(n=n.splice(0,XN-1),e=r-1,r=1),{digits:n,exponent:e,integerLen:r}}(i);o&&(c=function tY(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 d=t.minInt,h=t.minFrac,p=t.maxFrac;if(s){const M=s.match(q9);if(null===M)throw new Error(`${s} is not a valid digit info`);const x=M[1],C=M[3],F=M[5];null!=x&&(d=kT(x)),null!=C&&(h=kT(C)),null!=F?p=kT(F):null!=C&&h>p&&(p=h)}!function iY(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);d&&(n.unshift(d),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(Ca(e,n)),v.length&&(a+=Ca(e,r)+v.join("")),b&&(a+=Ca(e,Vt.Exponential)+"+"+b)}else a=Ca(e,Vt.Infinity);return a=i<0&&!l?t.negPre+a+t.negSuf:t.posPre+a+t.posSuf,a}(i,function RT(i,t="-"){const e={minInt:1,minFrac:0,maxFrac:0,posPre:"",posSuf:"",negPre:"",negSuf:"",gSize:0,lgSize:0},n=i.split(X9),r=n[0],s=n[1],o=-1!==r.indexOf(Xw)?r.split(Xw):[r.substring(0,r.lastIndexOf(gy)+1),r.substring(r.lastIndexOf(gy)+1)],a=o[0],l=o[1]||"";e.posPre=a.substring(0,a.indexOf(TT));for(let d=0;d{class i{}return i.\u0275fac=function(e){return new(e||i)},i.\u0275mod=nn({type:i}),i.\u0275inj=Xt({}),i})();const lB="browser";let OY=(()=>{class i{}return i.\u0275prov=Ie({token:i,providedIn:"root",factory:()=>new FY(ee(Wt),window)}),i})();class FY{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 LY(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=cB(this.window.history)||cB(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 cB(i){return Object.getOwnPropertyDescriptor(i,"scrollRestoration")}class d7 extends m9{constructor(){super(...arguments),this.supportsDOMEvents=!0}}class zT extends d7{static makeCurrent(){!function p9(i){wT||(wT=i)}(new zT)}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 u7(){return by=by||document.querySelector("base"),by?by.getAttribute("href"):null}();return null==e?null:function h7(i){Jw=Jw||document.createElement("a"),Jw.setAttribute("href",i);const t=Jw.pathname;return"/"===t.charAt(0)?t:`/${t}`}(e)}resetBaseElement(){by=null}getUserAgent(){return window.navigator.userAgent}getCookie(t){return function sY(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,by=null;const pB=new me("TRANSITION_ID"),p7=[{provide:Ow,useFactory:function f7(i,t,e){return()=>{e.get(Fw).donePromise.then(()=>{const n=Oc(),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 me("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})(),xy=(()=>{class i extends gB{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)(ee(Wt))},i.\u0275prov=Ie({token:i,factory:i.\u0275fac}),i})();const HT={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/"},GT=/%COMP%/g,yB=new me("RemoveStylesOnCompDestory",{providedIn:"root",factory:()=>!1});function bB(i,t){return t.flat(100).map(e=>e.replace(GT,i))}function xB(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 $T(e)}createRenderer(e,n){if(!e||!n)return this.defaultRenderer;const r=this.getOrCreateRenderer(e,n);return r instanceof CB?r.applyToHost(e):r instanceof WT&&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 Ys.Emulated:s=new CB(o,a,n,this.appId,l);break;case Ys.ShadowDom:return new M7(o,a,e,n);default:s=new WT(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)(ee(tM),ee(xy),ee(am),ee(yB))},i.\u0275prov=Ie({token:i,factory:i.\u0275fac}),i})();class $T{constructor(t){this.eventManager=t,this.data=Object.create(null),this.destroyNode=null}destroy(){}createElement(t,e){return e?document.createElementNS(HT[e]||e,t):document.createElement(t)}createComment(t){return document.createComment(t)}createText(t){return document.createTextNode(t)}appendChild(t,e){(MB(t)?t.content:t).appendChild(e)}insertBefore(t,e,n){t&&(MB(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=HT[r];s?t.setAttributeNS(s,e,n):t.setAttribute(e,n)}else t.setAttribute(e,n)}removeAttribute(t,e,n){if(n){const r=HT[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&(Es.DashCase|Es.Important)?t.style.setProperty(e,n,r&Es.Important?"important":""):t.style[e]=n}removeStyle(t,e,n){n&Es.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,xB(n)):this.eventManager.addEventListener(t,e,xB(n))}}function MB(i){return"TEMPLATE"===i.tagName&&void 0!==i.content}class M7 extends $T{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=bB(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 WT extends $T{constructor(t,e,n,r,s=n.id){super(t),this.sharedStylesHost=e,this.removeStylesOnCompDestory=r,this.rendererUsageCount=0,this.styles=bB(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 CB extends WT{constructor(t,e,n,r,s){const o=r+"-"+n.id;super(t,e,n,s,o),this.contentAttr=function b7(i){return"_ngcontent-%COMP%".replace(GT,i)}(o),this.hostAttr=function x7(i){return"_nghost-%COMP%".replace(GT,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 C7=(()=>{class i extends mB{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)(ee(Wt))},i.\u0275prov=Ie({token:i,factory:i.\u0275fac}),i})();const SB=["alt","control","meta","shift"],S7={"\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"},E7={alt:i=>i.altKey,control:i=>i.ctrlKey,meta:i=>i.metaKey,shift:i=>i.shiftKey};let A7=(()=>{class i extends mB{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(()=>Oc().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."),SB.forEach(c=>{const d=n.indexOf(c);d>-1&&(n.splice(d,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=S7[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"),SB.forEach(o=>{o!==r&&(0,E7[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)(ee(Wt))},i.\u0275prov=Ie({token:i,factory:i.\u0275fac}),i})();const R7=xN(u9,"browser",[{provide:cT,useValue:lB},{provide:dN,useValue:function D7(){zT.makeCurrent()},multi:!0},{provide:Wt,useFactory:function I7(){return function tD(i){mv=i}(document),document},deps:[]}]),DB=new me(""),TB=[{provide:Lw,useClass:class m7{addToWindow(t){In.getAngularTestability=(n,r=!0)=>{const s=t.findTestabilityInTree(n,r);if(null==s)throw new Error("Could not find testability for element.");return s},In.getAllAngularTestabilities=()=>t.getAllTestabilities(),In.getAllAngularRootElements=()=>t.getAllRootElements(),In.frameworkStabilizers||(In.frameworkStabilizers=[]),In.frameworkStabilizers.push(n=>{const r=In.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?Oc().isShadowRoot(e)?this.findTestabilityInTree(t,e.host,!0):this.findTestabilityInTree(t,e.parentElement,!0):null)}},deps:[]},{provide:gN,useClass:fT,deps:[ht,pT,Lw]},{provide:fT,useClass:fT,deps:[ht,pT,Lw]}],IB=[{provide:Av,useValue:"root"},{provide:nl,useFactory:function T7(){return new nl},deps:[]},{provide:eM,useClass:C7,multi:!0,deps:[Wt,ht,cT]},{provide:eM,useClass:A7,multi:!0,deps:[Wt]},{provide:nM,useClass:nM,deps:[tM,xy,am,yB]},{provide:Fl,useExisting:nM},{provide:gB,useExisting:xy},{provide:xy,useClass:xy,deps:[Wt]},{provide:tM,useClass:tM,deps:[eM,ht]},{provide:class NY{},useClass:g7,deps:[]},[]];let RB=(()=>{class i{constructor(e){}static withServerTransition(e){return{ngModule:i,providers:[{provide:am,useValue:e.appId},{provide:pB,useExisting:am},p7]}}}return i.\u0275fac=function(e){return new(e||i)(ee(DB,12))},i.\u0275mod=nn({type:i}),i.\u0275inj=Xt({providers:[...IB,...TB],imports:[So,h9]}),i})(),kB=(()=>{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)(ee(Wt))},i.\u0275prov=Ie({token:i,factory:function(e){let n=null;return n=e?new e:function P7(){return new kB(ee(Wt))}(),n},providedIn:"root"}),i})();typeof window<"u"&&window;let qT=(()=>{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):ee(FB),n},providedIn:"root"}),i})(),FB=(()=>{class i extends qT{constructor(e){super(),this._doc=e}sanitize(e,n){if(null==n)return null;switch(e){case Xn.NONE:return n;case Xn.HTML:return xa(n,"HTML")?Qs(n):jx(this._doc,String(n)).toString();case Xn.STYLE:return xa(n,"Style")?Qs(n):n;case Xn.SCRIPT:if(xa(n,"Script"))return Qs(n);throw new Error("unsafe value used in a script context");case Xn.URL:return xa(n,"URL")?Qs(n):gh(String(n));case Xn.RESOURCE_URL:if(xa(n,"ResourceURL"))return Qs(n);throw new Error(`unsafe value used in a resource URL context (see ${Gu})`);default:throw new Error(`Unexpected SecurityContext ${e} (see ${Gu})`)}}bypassSecurityTrustHtml(e){return function aD(i){return new nD(i)}(e)}bypassSecurityTrustStyle(e){return function lD(i){return new iD(i)}(e)}bypassSecurityTrustScript(e){return function cD(i){return new rD(i)}(e)}bypassSecurityTrustUrl(e){return function dD(i){return new sD(i)}(e)}bypassSecurityTrustResourceUrl(e){return function uD(i){return new Rp(i)}(e)}}return i.\u0275fac=function(e){return new(e||i)(ee(Wt))},i.\u0275prov=Ie({token:i,factory:function(e){let n=null;return n=e?new e:function B7(i){return new FB(i.get(Wt))}(ee($i)),n},providedIn:"root"}),i})();function ut(...i){return Ni(i,Uu(i))}class wt extends Re{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 um=V(i=>function(){i(this),this.name="EmptyError",this.message="no elements in sequence"}),{isArray:U7}=Array,{getPrototypeOf:V7,prototype:z7,keys:H7}=Object;function LB(i){if(1===i.length){const t=i[0];if(U7(t))return{args:t,keys:null};if(function G7(i){return i&&"object"==typeof i&&V7(i)===z7}(t)){const e=H7(t);return{args:e.map(n=>t[n]),keys:e}}}return{args:i,keys:null}}const{isArray:$7}=Array;function XT(i){return et(t=>function W7(i,t){return $7(t)?i(...t):i(t)}(i,t))}function NB(i,t){return i.reduce((e,n,r)=>(e[n]=t[r],e),{})}function Hl(...i){const t=Uu(i),e=_0(i),{args:n,keys:r}=LB(i);if(0===n.length)return Ni([],t);const s=new Tn(function j7(i,t,e=Ua){return n=>{BB(t,()=>{const{length:r}=i,s=new Array(r);let o=r,a=r;for(let l=0;l{const c=Ni(i[l],t);let d=!1;c.subscribe(jn(n,h=>{s[l]=h,d||(d=!0,a--),a||n.next(e(s.slice()))},()=>{--o||n.complete()}))},n)},n)}}(n,t,r?o=>NB(r,o):Ua));return e?s.pipe(XT(e)):s}function BB(i,t,e){i?Ha(e,i,t):t()}function wy(...i){return function Y7(){return vd(1)}()(Ni(i,Uu(i)))}function My(i){return new Tn(t=>{Mr(i()).subscribe(t)})}function hm(i,t){const e=cn(i)?i:()=>i,n=r=>r.error(e());return new Tn(t?r=>t.schedule(n,0,r):n)}function KT(){return Jn((i,t)=>{let e=null;i._refCount++;const n=jn(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 UB extends Tn{constructor(t,e){super(),this.source=t,this.subjectFactory=e,this._subject=null,this._refCount=0,this._connection=null,r0(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 Zt;const e=this.getSubject();t.add(this.source.subscribe(jn(e,void 0,()=>{this._teardown(),e.complete()},n=>{this._teardown(),e.error(n)},()=>this._teardown()))),t.closed&&(this._connection=null,t=Zt.EMPTY)}return t}refCount(){return KT()(this)}}function Rs(i,t){return Jn((e,n)=>{let r=null,s=0,o=!1;const a=()=>o&&!r&&n.complete();e.subscribe(jn(n,l=>{r?.unsubscribe();let c=0;const d=s++;Mr(i(l,d)).subscribe(r=jn(n,h=>n.next(t?t(l,h,d,c++):h),()=>{r=null,a()}))},()=>{o=!0,a()}))})}function Oi(i){return i<=0?()=>fo:Jn((t,e)=>{let n=0;t.subscribe(jn(e,r=>{++n<=i&&(e.next(r),i<=n&&e.complete())}))})}function Eo(...i){const t=Uu(i);return Jn((e,n)=>{(t?wy(i,e,t):wy(i,e)).subscribe(n)})}function vn(i,t){return Jn((e,n)=>{let r=0;e.subscribe(jn(n,s=>i.call(t,s,r++)&&n.next(s)))})}function iM(i){return Jn((t,e)=>{let n=!1;t.subscribe(jn(e,r=>{n=!0,e.next(r)},()=>{n||e.next(i),e.complete()}))})}function VB(i=q7){return Jn((t,e)=>{let n=!1;t.subscribe(jn(e,r=>{n=!0,e.next(r)},()=>n?e.complete():e.error(i())))})}function q7(){return new um}function tu(i,t){const e=arguments.length>=2;return n=>n.pipe(i?vn((r,s)=>i(r,s,n)):Ua,Oi(1),e?iM(t):VB(()=>new um))}function nu(i,t){return cn(t)?tr(i,t,1):tr(i,1)}function Vi(i,t,e){const n=cn(i)||t||e?{next:i,error:t,complete:e}:i;return n?Jn((r,s)=>{var o;null===(o=n.subscribe)||void 0===o||o.call(n);let a=!0;r.subscribe(jn(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)}))}):Ua}function Nc(i){return Jn((t,e)=>{let s,n=null,r=!1;n=t.subscribe(jn(e,void 0,void 0,o=>{s=Mr(i(o,Nc(i)(t))),n?(n.unsubscribe(),n=null,s.subscribe(e)):r=!0})),r&&(n.unsubscribe(),n=null,s.subscribe(e))})}function ZT(i,t){return Jn(function X7(i,t,e,n,r){return(s,o)=>{let a=e,l=t,c=0;s.subscribe(jn(o,d=>{const h=c++;l=a?i(l,d,h):(a=!0,d),n&&o.next(l)},r&&(()=>{a&&o.next(l),o.complete()})))}}(i,t,arguments.length>=2,!0))}function QT(i){return i<=0?()=>fo:Jn((t,e)=>{let n=[];t.subscribe(jn(e,r=>{n.push(r),i{for(const r of n)e.next(r);e.complete()},void 0,()=>{n=null}))})}function zB(i,t){const e=arguments.length>=2;return n=>n.pipe(i?vn((r,s)=>i(r,s,n)):Ua,QT(1),e?iM(t):VB(()=>new um))}function HB(i,t=!1){return Jn((e,n)=>{let r=0;e.subscribe(jn(n,s=>{const o=i(s,r++);(o||t)&&n.next(s),!o&&n.complete()}))})}function GB(i){return et(()=>i)}function iu(i){return Jn((t,e)=>{try{t.subscribe(e)}finally{e.add(i)}})}const gn="primary",Cy=Symbol("RouteTitle");class K7{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 fm(i){return new K7(i)}function Z7(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 WB(i){return Array.prototype.concat.apply([],i)}function jB(i){return i.length>0?i[i.length-1]:null}function os(i,t){for(const e in i)i.hasOwnProperty(e)&&t(i[e],e)}function ru(i){return k1(i)?i:iy(i)?Ni(Promise.resolve(i)):ut(i)}const rM=!1,J7={exact:function XB(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]||!XB(i.children[n],t.children[n],e))return!1;return!0},subset:KB},YB={exact:function eq(i,t){return Gl(i,t)},subset:function tq(i,t){return Object.keys(t).length<=Object.keys(i).length&&Object.keys(t).every(e=>$B(i[e],t[e]))},ignored:()=>!0};function qB(i,t,e){return J7[e.paths](i.root,t.root,e.matrixParams)&&YB[e.queryParams](i.queryParams,t.queryParams)&&!("exact"===e.fragment&&i.fragment!==t.fragment)}function KB(i,t,e){return ZB(i,t,t.segments,e)}function ZB(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]||!KB(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[gn])&&ZB(i.children[gn],t,s,n)}}function sM(i,t,e){return t.every((n,r)=>YB[e](i[r].parameters,n.parameters))}class su{constructor(t=new Dn([],{}),e={},n=null){this.root=t,this.queryParams=e,this.fragment=n}get queryParamMap(){return this._queryParamMap||(this._queryParamMap=fm(this.queryParams)),this._queryParamMap}toString(){return rq.serialize(this)}}class Dn{constructor(t,e){this.segments=t,this.children=e,this.parent=null,os(e,(n,r)=>n.parent=this)}hasChildren(){return this.numberOfChildren>0}get numberOfChildren(){return Object.keys(this.children).length}toString(){return oM(this)}}class Sy{constructor(t,e){this.path=t,this.parameters=e}get parameterMap(){return this._parameterMap||(this._parameterMap=fm(this.parameters)),this._parameterMap}toString(){return e3(this)}}function Eh(i,t){return i.length===t.length&&i.every((e,n)=>e.path===t[n].path)}let Ey=(()=>{class i{}return i.\u0275fac=function(e){return new(e||i)},i.\u0275prov=Ie({token:i,factory:function(){return new JT},providedIn:"root"}),i})();class JT{parse(t){const e=new fq(t);return new su(e.parseRootSegment(),e.parseQueryParams(),e.parseFragment())}serialize(t){const e=`/${Ay(t.root,!0)}`,n=function aq(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 sq(i){return encodeURI(i)}(t.fragment)}`:""}`}}const rq=new JT;function oM(i){return i.segments.map(t=>e3(t)).join("/")}function Ay(i,t){if(!i.hasChildren())return oM(i);if(t){const e=i.children[gn]?Ay(i.children[gn],!1):"",n=[];return os(i.children,(r,s)=>{s!==gn&&n.push(`${s}:${Ay(r,!1)}`)}),n.length>0?`${e}(${n.join("//")})`:e}{const e=function iq(i,t){let e=[];return os(i.children,(n,r)=>{r===gn&&(e=e.concat(t(n,r)))}),os(i.children,(n,r)=>{r!==gn&&(e=e.concat(t(n,r)))}),e}(i,(n,r)=>r===gn?[Ay(i.children[gn],!1)]:[`${r}:${Ay(n,!1)}`]);return 1===Object.keys(i.children).length&&null!=i.children[gn]?`${oM(i)}/${e[0]}`:`${oM(i)}/(${e.join("//")})`}}function QB(i){return encodeURIComponent(i).replace(/%40/g,"@").replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",")}function aM(i){return QB(i).replace(/%3B/gi,";")}function eI(i){return QB(i).replace(/\(/g,"%28").replace(/\)/g,"%29").replace(/%26/gi,"&")}function lM(i){return decodeURIComponent(i)}function JB(i){return lM(i.replace(/\+/g,"%20"))}function e3(i){return`${eI(i.path)}${function oq(i){return Object.keys(i).map(t=>`;${eI(t)}=${eI(i[t])}`).join("")}(i.parameters)}`}const lq=/^[^\/()?;=#]+/;function cM(i){const t=i.match(lq);return t?t[0]:""}const cq=/^[^=?&#]+/,uq=/^[^&#]+/;class fq{constructor(t){this.url=t,this.remaining=t}parseRootSegment(){return this.consumeOptional("/"),""===this.remaining||this.peekStartsWith("?")||this.peekStartsWith("#")?new Dn([],{}):new Dn([],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[gn]=new Dn(t,e)),n}parseSegment(){const t=cM(this.remaining);if(""===t&&this.peekStartsWith(";"))throw new pe(4009,rM);return this.capture(t),new Sy(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 dq(i){const t=i.match(cq);return t?t[0]:""}(this.remaining);if(!e)return;this.capture(e);let n="";if(this.consumeOptional("=")){const o=function hq(i){const t=i.match(uq);return t?t[0]:""}(this.remaining);o&&(n=o,this.capture(n))}const r=JB(e),s=JB(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 pe(4010,rM);let s;n.indexOf(":")>-1?(s=n.slice(0,n.indexOf(":")),this.capture(s),this.capture(":")):t&&(s=gn);const o=this.parseChildren();e[s]=1===Object.keys(o).length?o[gn]:new Dn([],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 pe(4011,rM)}}function tI(i){return i.segments.length>0?new Dn([],{[gn]: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 pq(i){if(1===i.numberOfChildren&&i.children[gn]){const t=i.children[gn];return new Dn(i.segments.concat(t.segments),t.children)}return i}(new Dn(i.segments,t))}function Ah(i){return i instanceof su}const nI=!1;function mq(i,t,e,n,r){if(0===e.length)return pm(t.root,t.root,t.root,n,r);const s=function o3(i){if("string"==typeof i[0]&&1===i.length&&"/"===i[0])return new s3(!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 os(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 s3(e,t,n)}(e);return s.toRoot()?pm(t.root,t.root,new Dn([],{}),n,r):function o(l){const c=function _q(i,t,e,n){if(i.isAbsolute)return new mm(t.root,!0,0);if(-1===n)return new mm(e,e===t.root,0);return function a3(i,t,e){let n=i,r=t,s=e;for(;s>r;){if(s-=r,n=n.parent,!n)throw new pe(4005,nI&&"Invalid number of '../'");r=n.segments.length}return new mm(n,!1,r-s)}(e,n+(Dy(i.commands[0])?0:1),i.numberOfDoubleDots)}(s,t,i.snapshot?._urlSegment,l),d=c.processChildren?gm(c.segmentGroup,c.index,s.commands):iI(c.segmentGroup,c.index,s.commands);return pm(t.root,c.segmentGroup,d,n,r)}(i.snapshot?._lastPathIndex)}function Dy(i){return"object"==typeof i&&null!=i&&!i.outlets&&!i.segmentPath}function Ty(i){return"object"==typeof i&&null!=i&&i.outlets}function pm(i,t,e,n,r){let o,s={};n&&os(n,(l,c)=>{s[c]=Array.isArray(l)?l.map(d=>`${d}`):`${l}`}),o=i===t?e:r3(i,t,e);const a=tI(dM(o));return new su(a,s,r)}function r3(i,t,e){const n={};return os(i.children,(r,s)=>{n[s]=r===t?e:r3(r,t,e)}),new Dn(i.segments,n)}class s3{constructor(t,e,n){if(this.isAbsolute=t,this.numberOfDoubleDots=e,this.commands=n,t&&n.length>0&&Dy(n[0]))throw new pe(4003,nI&&"Root segment cannot have matrix parameters");const r=n.find(Ty);if(r&&r!==jB(n))throw new pe(4004,nI&&"{outlets:{}} has to be the last command")}toRoot(){return this.isAbsolute&&1===this.commands.length&&"/"==this.commands[0]}}class mm{constructor(t,e,n){this.segmentGroup=t,this.processChildren=e,this.index=n}}function iI(i,t,e){if(i||(i=new Dn([],{})),0===i.segments.length&&i.hasChildren())return gm(i,t,e);const n=function yq(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(Ty(a))break;const l=`${a}`,c=n0&&void 0===l)break;if(l&&c&&"object"==typeof c&&void 0===c.outlets){if(!c3(l,c,o))return s;n+=2}else{if(!c3(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]=iI(i.children[o],t,s))}),os(i.children,(s,o)=>{void 0===n[o]&&(r[o]=s)}),new Dn(i.segments,r)}}function rI(i,t,e){const n=i.segments.slice(0,t);let r=0;for(;r{"string"==typeof e&&(e=[e]),null!==e&&(t[n]=rI(new Dn([],{}),0,e))}),t}function l3(i){const t={};return os(i,(e,n)=>t[n]=`${e}`),t}function c3(i,t,e){return i==e.path&&Gl(t,e.parameters)}const Iy="imperative";class $l{constructor(t,e){this.id=t,this.url=e}}class sI 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 oI 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 xq 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 wq 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 Mq 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 Cq 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 Sq 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 Eq{constructor(t){this.route=t,this.type=9}toString(){return`RouteConfigLoadStart(path: ${this.route.path})`}}class Aq{constructor(t){this.route=t,this.type=10}toString(){return`RouteConfigLoadEnd(path: ${this.route.path})`}}class Dq{constructor(t){this.snapshot=t,this.type=11}toString(){return`ChildActivationStart(path: '${this.snapshot.routeConfig&&this.snapshot.routeConfig.path||""}')`}}class Tq{constructor(t){this.snapshot=t,this.type=12}toString(){return`ChildActivationEnd(path: '${this.snapshot.routeConfig&&this.snapshot.routeConfig.path||""}')`}}class Iq{constructor(t){this.snapshot=t,this.type=13}toString(){return`ActivationStart(path: '${this.snapshot.routeConfig&&this.snapshot.routeConfig.path||""}')`}}class Rq{constructor(t){this.snapshot=t,this.type=14}toString(){return`ActivationEnd(path: '${this.snapshot.routeConfig&&this.snapshot.routeConfig.path||""}')`}}class d3{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 Oq=(()=>{class i{createUrlTree(e,n,r,s,o,a){return mq(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})(),Lq=(()=>{class i{}return i.\u0275fac=function(e){return new(e||i)},i.\u0275prov=Ie({token:i,factory:function(t){return Oq.\u0275fac(t)},providedIn:"root"}),i})();class u3{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=aI(t,this._root);return e?e.children.map(n=>n.value):[]}firstChild(t){const e=aI(t,this._root);return e&&e.children.length>0?e.children[0].value:null}siblings(t){const e=lI(t,this._root);return e.length<2?[]:e[e.length-2].children.map(r=>r.value).filter(r=>r!==t)}pathFromRoot(t){return lI(t,this._root).map(e=>e.value)}}function aI(i,t){if(i===t.value)return t;for(const e of t.children){const n=aI(i,e);if(n)return n}return null}function lI(i,t){if(i===t.value)return[t];for(const e of t.children){const n=lI(i,e);if(n.length)return n.unshift(t),n}return[]}class Bc{constructor(t,e){this.value=t,this.children=e}toString(){return`TreeNode(${this.value})`}}function _m(i){const t={};return i&&i.children.forEach(e=>t[e.value.outlet]=e),t}class h3 extends u3{constructor(t,e){super(t),this.snapshot=e,cI(this,t)}toString(){return this.snapshot.toString()}}function f3(i,t){const e=function Nq(i,t){const o=new fM([],{},{},"",{},gn,t,null,i.root,-1,{});return new m3("",new Bc(o,[]))}(i,t),n=new wt([new Sy("",{})]),r=new wt({}),s=new wt({}),o=new wt({}),a=new wt(""),l=new vm(n,r,o,a,s,gn,t,e.root);return l.snapshot=e.root,new h3(new Bc(l,[]),e)}class vm{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(et(c=>c[Cy]))??ut(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(et(t=>fm(t)))),this._paramMap}get queryParamMap(){return this._queryParamMap||(this._queryParamMap=this.queryParams.pipe(et(t=>fm(t)))),this._queryParamMap}toString(){return this.snapshot?this.snapshot.toString():`Future(${this._futureSnapshot})`}}function p3(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 Bq(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?.[Cy]}constructor(t,e,n,r,s,o,a,l,c,d,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=d,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=fm(this.params)),this._paramMap}get queryParamMap(){return this._queryParamMap||(this._queryParamMap=fm(this.queryParams)),this._queryParamMap}toString(){return`Route(url:'${this.url.map(n=>n.toString()).join("/")}', path:'${this.routeConfig?this.routeConfig.path:""}')`}}class m3 extends u3{constructor(t,e){super(e),this.url=t,cI(this,e)}toString(){return g3(this._root)}}function cI(i,t){t.value._routerState=i,t.children.forEach(e=>cI(i,e))}function g3(i){const t=i.children.length>0?` { ${i.children.map(g3).join(", ")} } `:"";return`${i.value}${t}`}function dI(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 Q7(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||uI(i.parent,t.parent))}function Ry(i,t,e){if(e&&i.shouldReuseRoute(t.value,e.value.snapshot)){const n=e.value;n._futureSnapshot=t.value;const r=function Vq(i,t,e){return t.children.map(n=>{for(const r of e.children)if(i.shouldReuseRoute(n.value,r.value.snapshot))return Ry(i,n,r);return Ry(i,n)})}(i,t,e);return new Bc(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=>Ry(i,a)),o}}const n=function zq(i){return new vm(new wt(i.url),new wt(i.params),new wt(i.queryParams),new wt(i.fragment),new wt(i.data),i.outlet,i.component,i)}(t.value),r=t.children.map(s=>Ry(i,s));return new Bc(n,r)}}const hI="ngNavigationCancelingError";function _3(i,t){const{redirectTo:e,navigationBehaviorOptions:n}=Ah(t)?{redirectTo:t,navigationBehaviorOptions:void 0}:t,r=v3(!1,0,t);return r.url=e,r.navigationBehaviorOptions=n,r}function v3(i,t,e){const n=new Error("NavigationCancelingError: "+(i||""));return n[hI]=!0,n.cancellationCode=t,e&&(n.url=e),n}function y3(i){return b3(i)&&Ah(i.url)}function b3(i){return i&&i[hI]}class Hq{constructor(){this.outlet=null,this.route=null,this.resolver=null,this.injector=null,this.children=new ky,this.attachRef=null}}let ky=(()=>{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 Hq,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 x3=(()=>{class i{constructor(){this.activated=null,this._activatedRoute=null,this.name=gn,this.activateEvents=new $e,this.deactivateEvents=new $e,this.attachEvents=new $e,this.detachEvents=new $e,this.parentContexts=Pt(ky),this.location=Pt(jr),this.changeDetector=Pt(ri),this.environmentInjector=Pt(eo)}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 pe(4012,pM);return this.activated.instance}get activatedRoute(){if(!this.activated)throw new pe(4012,pM);return this._activatedRoute}get activatedRouteData(){return this._activatedRoute?this._activatedRoute.snapshot.data:{}}detach(){if(!this.activated)throw new pe(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 pe(4013,pM);this._activatedRoute=e;const r=this.location,o=e.snapshot.component,a=this.parentContexts.getOrCreateContext(this.name).children,l=new Gq(e,a,r.injector);if(n&&function $q(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=ve({type:i,selectors:[["router-outlet"]],inputs:{name:"name"},outputs:{activateEvents:"activate",deactivateEvents:"deactivate",attachEvents:"attach",detachEvents:"detach"},exportAs:["outlet"],standalone:!0,features:[bi]}),i})();class Gq{constructor(t,e,n){this.route=t,this.childContexts=e,this.parent=n}get(t,e){return t===vm?this.route:t===ky?this.childContexts:this.parent.get(t,e)}}let fI=(()=>{class i{}return i.\u0275fac=function(e){return new(e||i)},i.\u0275cmp=ot({type:i,selectors:[["ng-component"]],standalone:!0,features:[Y1],decls:1,vars:0,template:function(e,n){1&e&&Oe(0,"router-outlet")},dependencies:[x3],encapsulation:2}),i})();function w3(i,t){return i.providers&&!i._injector&&(i._injector=Iw(i.providers,t,`Route: ${i.path}`)),i._injector??t}function mI(i){const t=i.children&&i.children.map(mI),e=t?{...i,children:t}:{...i};return!e.component&&!e.loadComponent&&(t||e.loadChildren)&&e.outlet&&e.outlet!==gn&&(e.component=fI),e}function Ea(i){return i.outlet||gn}function M3(i,t){const e=i.filter(n=>Ea(n)===t);return e.push(...i.filter(n=>Ea(n)!==t)),e}function Py(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 Xq{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),dI(this.futureState.root),this.activateChildRoutes(e,n,t)}deactivateChildRoutes(t,e,n){const r=_m(e);t.children.forEach(s=>{const o=s.value.outlet;this.deactivateRoutes(s,r[o],n),delete r[o]}),os(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=_m(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=_m(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=_m(e);t.children.forEach(s=>{this.activateRoutes(s,r[s.value.outlet],n),this.forwardEvent(new Rq(s.value.snapshot))}),t.children.length&&this.forwardEvent(new Tq(t.value.snapshot))}activateRoutes(t,e,n){const r=t.value,s=e?e.value:null;if(dI(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),dI(a.route.value),this.activateChildRoutes(t,null,o.children)}else{const a=Py(r.snapshot),l=a?.get(Ol)??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 C3{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 Kq(i,t,e){const n=i._root;return Oy(n,t?t._root:null,e,[n.value])}function ym(i,t){const e=Symbol(),n=t.get(i,e);return n===e?"function"!=typeof i||function Sr(i){return null!==zf(i)}(i)?t.get(i):i:n}function Oy(i,t,e,n,r={canDeactivateChecks:[],canActivateChecks:[]}){const s=_m(t);return i.children.forEach(o=>{(function Qq(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 Jq(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!uI(i,t)||!Gl(i.queryParams,t.queryParams);default:return!uI(i,t)}}(o,s,s.routeConfig.runGuardsAndResolvers);l?r.canActivateChecks.push(new C3(n)):(s.data=o.data,s._resolvedData=o._resolvedData),Oy(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&&Fy(t,a,r),r.canActivateChecks.push(new C3(n)),Oy(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]}),os(s,(o,a)=>Fy(o,e.getContext(a),r)),r}function Fy(i,t,e){const n=_m(i),r=i.value;os(n,(s,o)=>{Fy(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 Ly(i){return"function"==typeof i}function gI(i){return i instanceof um||"EmptyError"===i?.name}const gM=Symbol("INITIAL_VALUE");function bm(){return Rs(i=>Hl(i.map(t=>t.pipe(Oi(1),Eo(gM)))).pipe(et(t=>{for(const e of t)if(!0!==e){if(e===gM)return gM;if(!1===e||e instanceof su)return e}return!0}),vn(t=>t!==gM),Oi(1)))}function S3(i){return function bE(...i){return t0(i)}(Vi(t=>{if(Ah(t))throw _3(0,t)}),et(t=>!0===t))}const _I={matched:!1,consumedSegments:[],remainingSegments:[],parameters:{},positionalParamSegments:{}};function E3(i,t,e,n,r){const s=vI(i,t,e);return s.matched?function gX(i,t,e,n){const r=t.canMatch;return r&&0!==r.length?ut(r.map(o=>{const a=ym(o,i);return ru(function sX(i){return i&&Ly(i.canMatch)}(a)?a.canMatch(t,e):i.runInContext(()=>a(t,e)))})).pipe(bm(),S3()):ut(!0)}(n=w3(t,n),t,e).pipe(et(o=>!0===o?s:{..._I})):ut(s)}function vI(i,t,e){if(""===t.path)return"full"===t.pathMatch&&(i.hasChildren()||e.length>0)?{..._I}:{matched:!0,consumedSegments:[],remainingSegments:e,parameters:{},positionalParamSegments:{}};const r=(t.matcher||Z7)(e,i,t);if(!r)return{..._I};const s={};os(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 yX(i,t,e){return e.some(n=>vM(i,t,n)&&Ea(n)!==gn)}(i,e,n)){const s=new Dn(t,function vX(i,t,e,n){const r={};r[gn]=n,n._sourceSegment=i,n._segmentIndexShift=t.length;for(const s of e)if(""===s.path&&Ea(s)!==gn){const o=new Dn([],{});o._sourceSegment=i,o._segmentIndexShift=t.length,r[Ea(s)]=o}return r}(i,t,n,new Dn(e,i.children)));return s._sourceSegment=i,s._segmentIndexShift=t.length,{segmentGroup:s,slicedSegments:[]}}if(0===e.length&&function bX(i,t,e){return e.some(n=>vM(i,t,n))}(i,e,n)){const s=new Dn(i.segments,function _X(i,t,e,n,r){const s={};for(const o of n)if(vM(i,e,o)&&!r[Ea(o)]){const a=new Dn([],{});a._sourceSegment=i,a._segmentIndexShift=t.length,s[Ea(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 Dn(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 A3(i,t,e,n){return!!(Ea(i)===n||n!==gn&&vM(t,e,i))&&("**"===i.path||vI(t,i,e).matched)}function D3(i,t,e){return 0===t.length&&!i.children[e]}const yM=!1;class bM{constructor(t){this.segmentGroup=t||null}}class T3{constructor(t){this.urlTree=t}}function Ny(i){return hm(new bM(i))}function I3(i){return hm(new T3(i))}class CX{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 Dn(t.segments,t.children);return this.expandSegmentGroup(this.injector,this.config,e,gn).pipe(et(s=>this.createUrlTree(dM(s),this.urlTree.queryParams,this.urlTree.fragment))).pipe(Nc(s=>{if(s instanceof T3)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,gn).pipe(et(r=>this.createUrlTree(dM(r),t.queryParams,t.fragment))).pipe(Nc(r=>{throw r instanceof bM?this.noMatchError(r):r}))}noMatchError(t){return new pe(4002,yM)}createUrlTree(t,e,n){const r=tI(t);return new su(r,e,n)}expandSegmentGroup(t,e,n,r){return 0===n.segments.length&&n.hasChildren()?this.expandChildren(t,e,n).pipe(et(s=>new Dn([],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 Ni(r).pipe(nu(s=>{const o=n.children[s],a=M3(e,s);return this.expandSegmentGroup(t,a,o,s).pipe(et(l=>({segment:l,outlet:s})))}),ZT((s,o)=>(s[o.outlet]=o.segment,s),{}),zB())}expandSegment(t,e,n,r,s,o){return Ni(n).pipe(nu(a=>this.expandSegmentAgainstRoute(t,e,n,a,r,s,o).pipe(Nc(c=>{if(c instanceof bM)return ut(null);throw c}))),tu(a=>!!a),Nc((a,l)=>{if(gI(a))return D3(e,r,s)?ut(new Dn([],{})):Ny(e);throw a}))}expandSegmentAgainstRoute(t,e,n,r,s,o,a){return A3(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):Ny(e):Ny(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("/")?I3(s):this.lineralizeSegments(n,s).pipe(tr(o=>{const a=new Dn(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:d}=vI(e,r,s);if(!a)return Ny(e);const h=this.applyRedirectCommands(l,r.redirectTo,d);return r.redirectTo.startsWith("/")?I3(h):this.lineralizeSegments(r,h).pipe(tr(p=>this.expandSegment(t,e,n,p.concat(c),o,!1)))}matchSegmentAgainstRoute(t,e,n,r,s){return"**"===n.path?(t=w3(n,t),n.loadChildren?(n._loadedRoutes?ut({routes:n._loadedRoutes,injector:n._loadedInjector}):this.configLoader.loadChildren(t,n)).pipe(et(a=>(n._loadedRoutes=a.routes,n._loadedInjector=a.injector,new Dn(r,{})))):ut(new Dn(r,{}))):E3(e,n,r,t).pipe(Rs(({matched:o,consumedSegments:a,remainingSegments:l})=>o?this.getChildConfig(t=n._injector??t,n,r).pipe(tr(d=>{const h=d.injector??t,p=d.routes,{segmentGroup:m,slicedSegments:g}=_M(e,a,l,p),b=new Dn(m.segments,m.children);if(0===g.length&&b.hasChildren())return this.expandChildren(h,p,b).pipe(et(x=>new Dn(a,x)));if(0===p.length&&0===g.length)return ut(new Dn(a,{}));const v=Ea(n)===s;return this.expandSegment(h,b,p,g,v?gn:s,!0).pipe(et(M=>new Dn(a.concat(M.segments),M.children)))})):Ny(e)))}getChildConfig(t,e,n){return e.children?ut({routes:e.children,injector:t}):e.loadChildren?void 0!==e._loadedRoutes?ut({routes:e._loadedRoutes,injector:e._loadedInjector}):function mX(i,t,e,n){const r=t.canLoad;return void 0===r||0===r.length?ut(!0):ut(r.map(o=>{const a=ym(o,i);return ru(function tX(i){return i&&Ly(i.canLoad)}(a)?a.canLoad(t,e):i.runInContext(()=>a(t,e)))})).pipe(bm(),S3())}(t,e,n).pipe(tr(r=>r?this.configLoader.loadChildren(t,e).pipe(Vi(s=>{e._loadedRoutes=s.routes,e._loadedInjector=s.injector})):function wX(i){return hm(v3(yM,3))}())):ut({routes:[],injector:t})}lineralizeSegments(t,e){let n=[],r=e.root;for(;;){if(n=n.concat(r.segments),0===r.numberOfChildren)return ut(n);if(r.numberOfChildren>1||!r.children[gn])return t.redirectTo,hm(new pe(4e3,yM));r=r.children[gn]}}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 su(s,this.createQueryParams(e.queryParams,this.urlTree.queryParams),e.fragment)}createQueryParams(t,e){const n={};return os(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 os(e.children,(a,l)=>{o[l]=this.createSegmentGroup(t,a,n,r)}),new Dn(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 pe(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 EX{}class TX{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,gn).pipe(et(e=>{if(null===e)return null;const n=new fM([],Object.freeze({}),Object.freeze({...this.urlTree.queryParams}),this.urlTree.fragment,{},gn,this.rootComponentType,null,this.urlTree.root,-1,{}),r=new Bc(n,e),s=new m3(this.url,r);return this.inheritParamsAndData(s._root),s}))}inheritParamsAndData(t){const e=t.value,n=p3(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 Ni(Object.keys(n.children)).pipe(nu(r=>{const s=n.children[r],o=M3(e,r);return this.processSegmentGroup(t,o,s,r)}),ZT((r,s)=>r&&s?(r.push(...s),r):null),HB(r=>null!==r),iM(null),zB(),et(r=>{if(null===r)return null;const s=k3(r);return function IX(i){i.sort((t,e)=>t.value.outlet===gn?-1:e.value.outlet===gn?1:t.value.outlet.localeCompare(e.value.outlet))}(s),s}))}processSegment(t,e,n,r,s){return Ni(e).pipe(nu(o=>this.processSegmentAgainstRoute(o._injector??t,o,n,r,s)),tu(o=>!!o),Nc(o=>{if(gI(o))return D3(n,r,s)?ut([]):ut(null);throw o}))}processSegmentAgainstRoute(t,e,n,r,s){if(e.redirectTo||!A3(e,n,r,s))return ut(null);let o;if("**"===e.path){const a=r.length>0?jB(r).parameters:{},l=O3(n)+r.length;o=ut({snapshot:new fM(r,a,Object.freeze({...this.urlTree.queryParams}),this.urlTree.fragment,F3(e),Ea(e),e.component??e._loadedComponent??null,e,P3(n),l,L3(e)),consumedSegments:[],remainingSegments:[]})}else o=E3(n,e,r,t).pipe(et(({matched:a,consumedSegments:l,remainingSegments:c,parameters:d})=>{if(!a)return null;const h=O3(n)+l.length;return{snapshot:new fM(l,d,Object.freeze({...this.urlTree.queryParams}),this.urlTree.fragment,F3(e),Ea(e),e.component??e._loadedComponent??null,e,P3(n),h,L3(e)),consumedSegments:l,remainingSegments:c}}));return o.pipe(Rs(a=>{if(null===a)return ut(null);const{snapshot:l,consumedSegments:c,remainingSegments:d}=a;t=e._injector??t;const h=e._loadedInjector??t,p=function RX(i){return i.children?i.children:i.loadChildren?i._loadedRoutes:[]}(e),{segmentGroup:m,slicedSegments:g}=_M(n,c,d,p.filter(v=>void 0===v.redirectTo));if(0===g.length&&m.hasChildren())return this.processChildren(h,p,m).pipe(et(v=>null===v?null:[new Bc(l,v)]));if(0===p.length&&0===g.length)return ut([new Bc(l,[])]);const b=Ea(e)===s;return this.processSegment(h,p,m,g,b?gn:s).pipe(et(v=>null===v?null:[new Bc(l,v)]))}))}}function kX(i){const t=i.value.routeConfig;return t&&""===t.path&&void 0===t.redirectTo}function k3(i){const t=[],e=new Set;for(const n of i){if(!kX(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=k3(n.children);t.push(new Bc(n.value,r))}return t.filter(n=>!e.has(n))}function P3(i){let t=i;for(;t._sourceSegment;)t=t._sourceSegment;return t}function O3(i){let t=i,e=t._segmentIndexShift??0;for(;t._sourceSegment;)t=t._sourceSegment,e+=t._segmentIndexShift??0;return e-1}function F3(i){return i.data||{}}function L3(i){return i.resolve||{}}function N3(i){return"string"==typeof i.title||null===i.title}function yI(i){return Rs(t=>{const e=i(t);return e?Ni(e).pipe(et(()=>t)):ut(t)})}const xm=new me("ROUTES");let bI=(()=>{class i{constructor(){this.componentLoaders=new WeakMap,this.childrenLoaders=new WeakMap,this.compiler=Pt(uN)}loadComponent(e){if(this.componentLoaders.get(e))return this.componentLoaders.get(e);if(e._loadedComponent)return ut(e._loadedComponent);this.onLoadStartListener&&this.onLoadStartListener(e);const n=ru(e.loadComponent()).pipe(et(U3),Vi(s=>{this.onLoadEndListener&&this.onLoadEndListener(e),e._loadedComponent=s}),iu(()=>{this.componentLoaders.delete(e)})),r=new UB(n,()=>new Re).pipe(KT());return this.componentLoaders.set(e,r),r}loadChildren(e,n){if(this.childrenLoaders.get(n))return this.childrenLoaders.get(n);if(n._loadedRoutes)return ut({routes:n._loadedRoutes,injector:n._loadedInjector});this.onLoadStartListener&&this.onLoadStartListener(n);const s=this.loadModuleFactoryOrRoutes(n.loadChildren).pipe(et(a=>{this.onLoadEndListener&&this.onLoadEndListener(n);let l,c,d=!1;Array.isArray(a)?c=a:(l=a.create(e).injector,c=WB(l.get(xm,[],kt.Self|kt.Optional)));return{routes:c.map(mI),injector:l}}),iu(()=>{this.childrenLoaders.delete(n)})),o=new UB(s,()=>new Re).pipe(KT());return this.childrenLoaders.set(n,o),o}loadModuleFactoryOrRoutes(e){return ru(e()).pipe(et(U3),tr(n=>n instanceof C2||Array.isArray(n)?ut(n):Ni(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 U3(i){return function VX(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 Re,this.configLoader=Pt(bI),this.environmentInjector=Pt(eo),this.urlSerializer=Pt(Ey),this.rootContexts=Pt(ky),this.navigationId=0,this.afterPreactivation=()=>ut(void 0),this.rootComponentType=null,this.configLoader.onLoadEndListener=r=>this.events.next(new Aq(r)),this.configLoader.onLoadStartListener=r=>this.events.next(new Eq(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 wt({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:Iy,restoredState:null,currentSnapshot:e.routerState.snapshot,targetSnapshot:null,currentRouterState:e.routerState,targetRouterState:null,guards:{canActivateChecks:[],canDeactivateChecks:[]},guardsResult:null}),this.transitions.pipe(vn(n=>0!==n.id),et(n=>({...n,extractedUrl:e.urlHandlingStrategy.extract(n.rawUrl)})),Rs(n=>{let r=!1,s=!1;return ut(n).pipe(Vi(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}}),Rs(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 d="";return this.events.next(new hM(o.id,e.serializeUrl(n.rawUrl),d,0)),e.rawUrlTree=o.rawUrl,o.resolve(null),fo}if(e.urlHandlingStrategy.shouldProcessUrl(o.rawUrl))return V3(o.source)&&(e.browserUrlTree=o.extractedUrl),ut(o).pipe(Rs(d=>{const h=this.transitions?.getValue();return this.events.next(new sI(d.id,this.urlSerializer.serialize(d.extractedUrl),d.source,d.restoredState)),h!==this.transitions?.getValue()?fo:Promise.resolve(d)}),function SX(i,t,e,n){return Rs(r=>function MX(i,t,e,n,r){return new CX(i,t,e,n,r).apply()}(i,t,e,r.extractedUrl,n).pipe(et(s=>({...r,urlAfterRedirects:s}))))}(this.environmentInjector,this.configLoader,this.urlSerializer,e.config),Vi(d=>{this.currentNavigation={...this.currentNavigation,finalUrl:d.urlAfterRedirects},n.urlAfterRedirects=d.urlAfterRedirects}),function OX(i,t,e,n,r){return tr(s=>function DX(i,t,e,n,r,s,o="emptyOnly"){return new TX(i,t,e,n,r,o,s).recognize().pipe(Rs(a=>null===a?function AX(i){return new Tn(t=>t.error(i))}(new EX):ut(a)))}(i,t,e,s.urlAfterRedirects,n.serialize(s.urlAfterRedirects),n,r).pipe(et(o=>({...s,targetSnapshot:o}))))}(this.environmentInjector,this.rootComponentType,e.config,this.urlSerializer,e.paramsInheritanceStrategy),Vi(d=>{if(n.targetSnapshot=d.targetSnapshot,"eager"===e.urlUpdateStrategy){if(!d.extras.skipLocationChange){const p=e.urlHandlingStrategy.merge(d.urlAfterRedirects,d.rawUrl);e.setBrowserUrl(p,d)}e.browserUrlTree=d.urlAfterRedirects}const h=new xq(d.id,this.urlSerializer.serialize(d.extractedUrl),this.urlSerializer.serialize(d.urlAfterRedirects),d.targetSnapshot);this.events.next(h)}));if(l&&e.urlHandlingStrategy.shouldProcessUrl(e.rawUrlTree)){const{id:d,extractedUrl:h,source:p,restoredState:m,extras:g}=o,b=new sI(d,this.urlSerializer.serialize(h),p,m);this.events.next(b);const v=f3(h,this.rootComponentType).snapshot;return ut(n={...o,targetSnapshot:v,urlAfterRedirects:h,extras:{...g,skipLocationChange:!1,replaceUrl:!1}})}{const d="";return this.events.next(new hM(o.id,e.serializeUrl(n.extractedUrl),d,1)),e.rawUrlTree=o.rawUrl,o.resolve(null),fo}}),Vi(o=>{const a=new wq(o.id,this.urlSerializer.serialize(o.extractedUrl),this.urlSerializer.serialize(o.urlAfterRedirects),o.targetSnapshot);this.events.next(a)}),et(o=>n={...o,guards:Kq(o.targetSnapshot,o.currentSnapshot,this.rootContexts)}),function aX(i,t){return tr(e=>{const{targetSnapshot:n,currentSnapshot:r,guards:{canActivateChecks:s,canDeactivateChecks:o}}=e;return 0===o.length&&0===s.length?ut({...e,guardsResult:!0}):function lX(i,t,e,n){return Ni(i).pipe(tr(r=>function pX(i,t,e,n,r){const s=t&&t.routeConfig?t.routeConfig.canDeactivate:null;return s&&0!==s.length?ut(s.map(a=>{const l=Py(t)??r,c=ym(a,l);return ru(function rX(i){return i&&Ly(i.canDeactivate)}(c)?c.canDeactivate(i,t,e,n):l.runInContext(()=>c(i,t,e,n))).pipe(tu())})).pipe(bm()):ut(!0)}(r.component,r.route,e,t,n)),tu(r=>!0!==r,!0))}(o,n,r,i).pipe(tr(a=>a&&function eX(i){return"boolean"==typeof i}(a)?function cX(i,t,e,n){return Ni(t).pipe(nu(r=>wy(function uX(i,t){return null!==i&&t&&t(new Dq(i)),ut(!0)}(r.route.parent,n),function dX(i,t){return null!==i&&t&&t(new Iq(i)),ut(!0)}(r.route,n),function fX(i,t,e){const n=t[t.length-1],s=t.slice(0,t.length-1).reverse().map(o=>function Zq(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=>My(()=>ut(o.guards.map(l=>{const c=Py(o.node)??e,d=ym(l,c);return ru(function iX(i){return i&&Ly(i.canActivateChild)}(d)?d.canActivateChild(n,i):c.runInContext(()=>d(n,i))).pipe(tu())})).pipe(bm())));return ut(s).pipe(bm())}(i,r.path,e),function hX(i,t,e){const n=t.routeConfig?t.routeConfig.canActivate:null;if(!n||0===n.length)return ut(!0);const r=n.map(s=>My(()=>{const o=Py(t)??e,a=ym(s,o);return ru(function nX(i){return i&&Ly(i.canActivate)}(a)?a.canActivate(t,i):o.runInContext(()=>a(t,i))).pipe(tu())}));return ut(r).pipe(bm())}(i,r.route,e))),tu(r=>!0!==r,!0))}(n,s,i,t):ut(a)),et(a=>({...e,guardsResult:a})))})}(this.environmentInjector,o=>this.events.next(o)),Vi(o=>{if(n.guardsResult=o.guardsResult,Ah(o.guardsResult))throw _3(0,o.guardsResult);const a=new Mq(o.id,this.urlSerializer.serialize(o.extractedUrl),this.urlSerializer.serialize(o.urlAfterRedirects),o.targetSnapshot,!!o.guardsResult);this.events.next(a)}),vn(o=>!!o.guardsResult||(e.restoreHistory(o),this.cancelNavigationTransition(o,"",3),!1)),yI(o=>{if(o.guards.canActivateChecks.length)return ut(o).pipe(Vi(a=>{const l=new Cq(a.id,this.urlSerializer.serialize(a.extractedUrl),this.urlSerializer.serialize(a.urlAfterRedirects),a.targetSnapshot);this.events.next(l)}),Rs(a=>{let l=!1;return ut(a).pipe(function FX(i,t){return tr(e=>{const{targetSnapshot:n,guards:{canActivateChecks:r}}=e;if(!r.length)return ut(e);let s=0;return Ni(r).pipe(nu(o=>function LX(i,t,e,n){const r=i.routeConfig,s=i._resolve;return void 0!==r?.title&&!N3(r)&&(s[Cy]=r.title),function NX(i,t,e,n){const r=function BX(i){return[...Object.keys(i),...Object.getOwnPropertySymbols(i)]}(i);if(0===r.length)return ut({});const s={};return Ni(r).pipe(tr(o=>function UX(i,t,e,n){const r=Py(t)??n,s=ym(i,r);return ru(s.resolve?s.resolve(t,e):r.runInContext(()=>s(t,e)))}(i[o],t,e,n).pipe(tu(),Vi(a=>{s[o]=a}))),QT(1),GB(s),Nc(o=>gI(o)?fo:hm(o)))}(s,i,t,n).pipe(et(o=>(i._resolvedData=o,i.data=p3(i,e).resolve,r&&N3(r)&&(i.data[Cy]=r.title),null)))}(o.route,n,i,t)),Vi(()=>s++),QT(1),tr(o=>s===r.length?ut(e):fo))})}(e.paramsInheritanceStrategy,this.environmentInjector),Vi({next:()=>l=!0,complete:()=>{l||(e.restoreHistory(a),this.cancelNavigationTransition(a,"",2))}}))}),Vi(a=>{const l=new Sq(a.id,this.urlSerializer.serialize(a.extractedUrl),this.urlSerializer.serialize(a.urlAfterRedirects),a.targetSnapshot);this.events.next(l)}))}),yI(o=>{const a=l=>{const c=[];l.routeConfig?.loadComponent&&!l.routeConfig._loadedComponent&&c.push(this.configLoader.loadComponent(l.routeConfig).pipe(Vi(d=>{l.component=d}),et(()=>{})));for(const d of l.children)c.push(...a(d));return c};return Hl(a(o.targetSnapshot.root)).pipe(iM(),Oi(1))}),yI(()=>this.afterPreactivation()),et(o=>{const a=function Uq(i,t,e){const n=Ry(i,t._root,e?e._root:void 0);return new h3(n,t)}(e.routeReuseStrategy,o.targetSnapshot,o.currentRouterState);return n={...o,targetRouterState:a}}),Vi(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)=>et(n=>(new Xq(t,n.targetRouterState,n.currentRouterState,e).activate(i),n)))(this.rootContexts,e.routeReuseStrategy,o=>this.events.next(o)),Oi(1),Vi({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}}),iu(()=>{r||s||this.cancelNavigationTransition(n,"",1),this.currentNavigation?.id===n.id&&(this.currentNavigation=null)}),Nc(o=>{if(s=!0,b3(o)){y3(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),y3(o)){const l=e.urlHandlingStrategy.merge(o.url,e.rawUrlTree),c={skipLocationChange:n.extras.skipLocationChange,replaceUrl:"eager"===e.urlUpdateStrategy||V3(n.source)};e.scheduleNavigation(l,Iy,null,c,{resolve:n.resolve,reject:n.reject,promise:n.promise})}else n.resolve(!1)}else{e.restoreHistory(n,!0);const a=new oI(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 fo}))}))}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 V3(i){return i!==Iy}let z3=(()=>{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===gn);return n}getResolvedTitleForRoute(e){return e.data[Cy]}}return i.\u0275fac=function(e){return new(e||i)},i.\u0275prov=Ie({token:i,factory:function(){return Pt(zX)},providedIn:"root"}),i})(),zX=(()=>{class i extends z3{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)(ee(kB))},i.\u0275prov=Ie({token:i,factory:i.\u0275fac,providedIn:"root"}),i})(),HX=(()=>{class i{}return i.\u0275fac=function(e){return new(e||i)},i.\u0275prov=Ie({token:i,factory:function(){return Pt($X)},providedIn:"root"}),i})();class GX{shouldDetach(t){return!1}store(t,e){}shouldAttach(t){return!1}retrieve(t){return null}shouldReuseRoute(t,e){return t.routeConfig===e.routeConfig}}let $X=(()=>{class i extends GX{}return i.\u0275fac=function(){let t;return function(n){return(t||(t=ni(i)))(n||i)}}(),i.\u0275prov=Ie({token:i,factory:i.\u0275fac,providedIn:"root"}),i})();const MM=new me("",{providedIn:"root",factory:()=>({})});let jX=(()=>{class i{}return i.\u0275fac=function(e){return new(e||i)},i.\u0275prov=Ie({token:i,factory:function(){return Pt(YX)},providedIn:"root"}),i})(),YX=(()=>{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 qX(i){throw i}function XX(i,t,e){return t.parse("/")}const KX={paths:"exact",fragment:"ignored",matrixParams:"ignored",queryParams:"exact"},ZX={paths:"subset",fragment:"ignored",matrixParams:"ignored",queryParams:"subset"};let Wo=(()=>{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=Pt(R6),this.isNgZoneEnabled=!1,this.options=Pt(MM,{optional:!0})||{},this.errorHandler=this.options.errorHandler||qX,this.malformedUriErrorHandler=this.options.malformedUriErrorHandler||XX,this.navigated=!1,this.lastSuccessfulId=-1,this.urlHandlingStrategy=Pt(jX),this.routeReuseStrategy=Pt(HX),this.urlCreationStrategy=Pt(Lq),this.titleStrategy=Pt(z3),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=WB(Pt(xm,{optional:!0})??[]),this.navigationTransitions=Pt(wM),this.urlSerializer=Pt(Ey),this.location=Pt(py),this.isNgZoneEnabled=Pt(ht)instanceof ht&&ht.isInAngularZone(),this.resetConfig(this.config),this.currentUrlTree=new su,this.rawUrlTree=this.currentUrlTree,this.browserUrlTree=this.currentUrlTree,this.routerState=f3(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),Iy,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(mI),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 d=null;switch(a){case"merge":d={...this.currentUrlTree.queryParams,...s};break;case"preserve":d=this.currentUrlTree.queryParams;break;default:d=s||null}return null!==d&&(d=this.removeEmptyProps(d)),this.urlCreationStrategy.createUrlTree(r,this.routerState,this.currentUrlTree,e,d,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,Iy,null,n)}navigate(e,n={skipLocationChange:!1}){return function QX(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,d;return o?(a=o.resolve,l=o.reject,c=o.promise):c=new Promise((h,p)=>{a=h,l=p}),d="computed"===this.canceledNavigationResolution?r&&r.\u0275routerPageId?r.\u0275routerPageId:(this.browserPageId??0)+1:0,this.navigationTransitions.handleNavigationRequest({targetPageId:d,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 H3{}let tK=(()=>{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(vn(e=>e instanceof Dh),nu(()=>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 Ni(r).pipe(vd())}preloadConfig(e,n){return this.preloadingStrategy.preload(n,()=>{let r;r=n.loadChildren&&void 0===n.canLoad?this.loader.loadChildren(e,n):ut(null);const s=r.pipe(tr(o=>null===o?ut(void 0):(n._loadedRoutes=o.routes,n._loadedInjector=o.injector,this.processRoutes(o.injector??e,o.routes))));return n.loadComponent&&!n._loadedComponent?Ni([s,this.loader.loadComponent(n)]).pipe(vd()):s})}}return i.\u0275fac=function(e){return new(e||i)(ee(Wo),ee(uN),ee(eo),ee(H3),ee(bI))},i.\u0275prov=Ie({token:i,factory:i.\u0275fac,providedIn:"root"}),i})();const MI=new me("");let G3=(()=>{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 sI?(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 d3&&(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 d3(e,"popstate"===this.lastSource?this.store[this.restoredId]:null,n))})},0)})}ngOnDestroy(){this.routerEventsSubscription?.unsubscribe(),this.scrollEventsSubscription?.unsubscribe()}}return i.\u0275fac=function(e){bo()},i.\u0275prov=Ie({token:i,factory:i.\u0275fac}),i})();var jo=(()=>((jo=jo||{})[jo.COMPLETE=0]="COMPLETE",jo[jo.FAILED=1]="FAILED",jo[jo.REDIRECTING=2]="REDIRECTING",jo))();const wm=!1;function ou(i,t){return{\u0275kind:i,\u0275providers:t}}const CI=new me("",{providedIn:"root",factory:()=>!1});function W3(){const i=Pt($i);return t=>{const e=i.get(lm);if(t!==e.components[0])return;const n=i.get(Wo),r=i.get(j3);1===i.get(SI)&&n.initialNavigation(),i.get(Y3,null,kt.Optional)?.setUpPreloading(),i.get(MI,null,kt.Optional)?.init(),n.resetRootComponentType(e.componentTypes[0]),r.closed||(r.next(),r.complete(),r.unsubscribe())}}const j3=new me(wm?"bootstrap done indicator":"",{factory:()=>new Re}),SI=new me(wm?"initial navigation":"",{providedIn:"root",factory:()=>1});function oK(){let i=[];return i=wm?[{provide:Fp,multi:!0,useFactory:()=>{const t=Pt(Wo);return()=>t.events.subscribe(e=>{console.group?.(`Router Event: ${e.constructor.name}`),console.log(function kq(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?.()})}}]:[],ou(1,i)}const Y3=new me(wm?"router preloader":"");function aK(i){return ou(0,[{provide:Y3,useExisting:tK},{provide:H3,useExisting:i}])}const By=!1,q3=new me(By?"router duplicate forRoot guard":"ROUTER_FORROOT_GUARD"),lK=[py,{provide:Ey,useClass:JT},Wo,ky,{provide:vm,useFactory:function $3(i){return i.routerState.root},deps:[Wo]},bI,By?{provide:CI,useValue:!0}:[]];function cK(){return new yN("Router",Wo)}let X3=(()=>{class i{constructor(e){}static forRoot(e,n){return{ngModule:i,providers:[lK,By&&n?.enableTracing?oK().\u0275providers:[],{provide:xm,multi:!0,useValue:e},{provide:q3,useFactory:fK,deps:[[Wo,new Ss,new ya]]},{provide:MM,useValue:n||{}},n?.useHash?{provide:Sh,useClass:y9}:{provide:Sh,useClass:HN},{provide:MI,useFactory:()=>{const i=Pt(OY),t=Pt(ht),e=Pt(MM),n=Pt(wM),r=Pt(Ey);return e.scrollOffset&&i.setOffset(e.scrollOffset),new G3(r,n,i,t,e)}},n?.preloadingStrategy?aK(n.preloadingStrategy).\u0275providers:[],{provide:yN,multi:!0,useFactory:cK},n?.initialNavigation?pK(n):[],[{provide:K3,useFactory:W3},{provide:vN,multi:!0,useExisting:K3}]]}}static forChild(e){return{ngModule:i,providers:[{provide:xm,multi:!0,useValue:e}]}}}return i.\u0275fac=function(e){return new(e||i)(ee(q3,8))},i.\u0275mod=nn({type:i}),i.\u0275inj=Xt({imports:[fI]}),i})();function fK(i){if(By&&i)throw new pe(4007,"The Router was provided more than once. This can happen if 'forRoot' is used outside of the root injector. Lazy loaded modules should use RouterModule.forChild() instead.");return"guarded"}function pK(i){return["disabled"===i.initialNavigation?ou(3,[{provide:Ow,multi:!0,useFactory:()=>{const t=Pt(Wo);return()=>{t.setUpLocationChangeListener()}}},{provide:SI,useValue:2}]).\u0275providers:[],"enabledBlocking"===i.initialNavigation?ou(2,[{provide:SI,useValue:0},{provide:Ow,multi:!0,deps:[$i],useFactory:t=>{const e=t.get(_9,Promise.resolve());return()=>e.then(()=>new Promise(n=>{const r=t.get(Wo),s=t.get(j3);(function nK(i,t){i.events.pipe(vn(e=>e instanceof Dh||e instanceof uM||e instanceof oI||e instanceof hM),et(e=>e instanceof Dh||e instanceof hM?jo.COMPLETE:e instanceof uM&&(0===e.code||1===e.code)?jo.REDIRECTING:jo.FAILED),vn(e=>e!==jo.REDIRECTING),Oi(1)).subscribe(()=>{t()})})(r,()=>{n(!0)}),t.get(wM).afterPreactivation=()=>(n(!0),s.closed?ut(void 0):s),r.initialNavigation()}))}}]).\u0275providers:[]]}const K3=new me(By?"Router Initializer":""),gK=[];let _K=(()=>{class i{}return i.\u0275fac=function(e){return new(e||i)},i.\u0275mod=nn({type:i}),i.\u0275inj=Xt({imports:[X3.forRoot(gK),X3]}),i})();function Z3(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){Z3(s,n,r,o,a,"next",l)}function a(l){Z3(s,n,r,o,a,"throw",l)}o(void 0)})}}function Jt(i){return null!=i&&"false"!=`${i}`}function ks(i,t=0){return function vK(i){return!isNaN(parseFloat(i))&&!isNaN(Number(i))}(i)?Number(i):t}function CM(i){return Array.isArray(i)?i:[i]}function mr(i){return null==i?"":"string"==typeof i?i:`${i}px`}function Uc(i){return i instanceof pt?i.nativeElement:i}const yK=["addListener","removeListener"],bK=["addEventListener","removeEventListener"],xK=["on","off"];function Ao(i,t,e,n){if(cn(e)&&(n=e,e=void 0),n)return Ao(i,t,e).pipe(XT(n));const[r,s]=function CK(i){return cn(i.addEventListener)&&cn(i.removeEventListener)}(i)?bK.map(o=>a=>i[o](t,a,e)):function wK(i){return cn(i.addListener)&&cn(i.removeListener)}(i)?yK.map(Q3(i,t)):function MK(i){return cn(i.on)&&cn(i.off)}(i)?xK.map(Q3(i,t)):[];if(!r&&e_(i))return tr(o=>Ao(o,t,e))(Mr(i));if(!r)throw new TypeError("Invalid event target");return new Tn(o=>{const a=(...l)=>o.next(1s(a)})}function Q3(i,t){return e=>n=>i[e](t,n)}class SK extends Zt{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 EI extends SK{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,Kr(n,this),null!=t&&(this.id=this.recycleAsyncId(e,t,null)),this.delay=null,super.unsubscribe()}}}const Uy={schedule(i){let t=requestAnimationFrame,e=cancelAnimationFrame;const{delegate:n}=Uy;n&&(t=n.requestAnimationFrame,e=n.cancelAnimationFrame);const r=t(s=>{e=void 0,i(s)});return new Zt(()=>e?.(r))},requestAnimationFrame(...i){const{delegate:t}=Uy;return(t?.requestAnimationFrame||requestAnimationFrame)(...i)},cancelAnimationFrame(...i){const{delegate:t}=Uy;return(t?.cancelAnimationFrame||cancelAnimationFrame)(...i)},delegate:void 0},J3={now:()=>(J3.delegate||Date).now(),delegate:void 0};class Vy{constructor(t,e=Vy.now){this.schedulerActionCtor=t,this.now=e}schedule(t,e=0,n){return new this.schedulerActionCtor(this,t).schedule(n,e)}}Vy.now=J3.now;class AI extends Vy{constructor(t,e=Vy.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 DK=new class AK extends AI{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 EK extends EI{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=Uy.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&&(Uy.cancelAnimationFrame(e),t._scheduled=void 0)}});let DI,TK=1;const EM={};function eU(i){return i in EM&&(delete EM[i],!0)}const IK={setImmediate(i){const t=TK++;return EM[t]=!0,DI||(DI=Promise.resolve()),DI.then(()=>eU(t)&&i()),t},clearImmediate(i){eU(i)}},{setImmediate:RK,clearImmediate:kK}=IK,AM={setImmediate(...i){const{delegate:t}=AM;return(t?.setImmediate||RK)(...i)},clearImmediate(i){const{delegate:t}=AM;return(t?.clearImmediate||kK)(i)},delegate:void 0},TI=new class OK extends AI{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 PK extends EI{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))}}),zy=new AI(EI),FK=zy;function II(i=0,t,e=FK){let n=-1;return null!=t&&(Bu(t)?e=t:n=t),new Tn(r=>{let s=function NK(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 DM(i,t=zy){return function LK(i){return Jn((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(jn(e,c=>{n=!0,r=c,s||Mr(i(c)).subscribe(s=jn(e,a,l))},()=>{o=!0,(!n||!s||s.closed)&&e.complete()}))})}(()=>II(i,t))}function We(i){return Jn((t,e)=>{Mr(i).subscribe(jn(e,()=>e.complete(),ms)),!e.closed&&t.subscribe(e)})}let RI;try{RI=typeof Intl<"u"&&Intl.v8BreakIterator}catch{RI=!1}let Mm,zi=(()=>{class i{constructor(e){this._platformId=e,this.isBrowser=this._platformId?function PY(i){return i===lB}(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&&!RI)&&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)(ee(cT))},i.\u0275prov=Ie({token:i,factory:i.\u0275fac,providedIn:"root"}),i})();const tU=["color","button","checkbox","date","datetime-local","email","file","hidden","image","month","number","password","radio","range","reset","search","submit","tel","text","time","url","week"];function nU(){if(Mm)return Mm;if("object"!=typeof document||!document)return Mm=new Set(tU),Mm;let i=document.createElement("input");return Mm=new Set(tU.filter(t=>(i.setAttribute("type",t),i.type===t))),Mm}let Hy,TM,Ih,kI;function Th(i){return function BK(){if(null==Hy&&typeof window<"u")try{window.addEventListener("test",null,Object.defineProperty({},"passive",{get:()=>Hy=!0}))}finally{Hy=Hy||!1}return Hy}()?i:!!i.capture}function iU(){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 Gy(){if("object"!=typeof document||!document)return 0;if(null==TM){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),TM=0,0===i.scrollLeft&&(i.scrollLeft=1,TM=0===i.scrollLeft?1:2),i.remove()}return TM}function IM(){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 au(i){return i.composedPath?i.composedPath()[0]:i.target}function PI(){return typeof __karma__<"u"&&!!__karma__||typeof jasmine<"u"&&!!jasmine||typeof jest<"u"&&!!jest||typeof Mocha<"u"&&!!Mocha}const zK=new me("cdk-dir-doc",{providedIn:"root",factory:function HK(){return Pt(Wt)}}),GK=/^(ar|ckb|dv|he|iw|fa|nqo|ps|sd|ug|ur|yi|.*[-_](Adlm|Arab|Hebr|Nkoo|Rohg|Thaa))(?!.*[-_](Latn|Cyrl)($|-|_))($|-|_)/i;let Aa=(()=>{class i{constructor(e){this.value="ltr",this.change=new $e,e&&(this.value=function $K(i){const t=i?.toLowerCase()||"";return"auto"===t&&typeof navigator<"u"&&navigator?.language?GK.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)(ee(zK,8))},i.\u0275prov=Ie({token:i,factory:i.\u0275fac,providedIn:"root"}),i})(),$y=(()=>{class i{}return i.\u0275fac=function(e){return new(e||i)},i.\u0275mod=nn({type:i}),i.\u0275inj=Xt({}),i})();const WK=["contentWrapper"],jK=["*"],YK=new me("VIRTUAL_SCROLL_STRATEGY");let Wy=(()=>{class i{constructor(e,n,r){this._ngZone=e,this._platform=n,this._scrolled=new Re,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 Tn(n=>{this._globalSubscription||this._addGlobalListener();const r=e>0?this._scrolled.pipe(DM(e)).subscribe(n):this._scrolled.subscribe(n);return this._scrolledCount++,()=>{r.unsubscribe(),this._scrolledCount--,this._scrolledCount||this._removeGlobalListener()}}):ut()}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(vn(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=Uc(n),s=e.getElementRef().nativeElement;do{if(r==s)return!0}while(r=r.parentElement);return!1}_addGlobalListener(){this._globalSubscription=this._ngZone.runOutsideAngular(()=>Ao(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)(ee(ht),ee(zi),ee(Wt,8))},i.\u0275prov=Ie({token:i,factory:i.\u0275fac,providedIn:"root"}),i})(),rU=(()=>{class i{constructor(e,n,r,s){this.elementRef=e,this.scrollDispatcher=n,this.ngZone=r,this.dir=s,this._destroyed=new Re,this._elementScrolled=new Tn(o=>this.ngZone.runOutsideAngular(()=>Ao(this.elementRef.nativeElement,"scroll").pipe(We(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!=Gy()?(null!=e.left&&(e.right=n.scrollWidth-n.clientWidth-e.left),2==Gy()?e.left=e.right:1==Gy()&&(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;iU()?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==Gy()?e==n?s.scrollWidth-s.clientWidth-s.scrollLeft:s.scrollLeft:o&&1==Gy()?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)(E(pt),E(Wy),E(ht),E(Aa,8))},i.\u0275dir=ve({type:i,selectors:[["","cdk-scrollable",""],["","cdkScrollable",""]],standalone:!0}),i})(),RM=(()=>{class i{constructor(e,n,r){this._platform=e,this._change=new Re,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(DM(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)(ee(zi),ee(ht),ee(Wt,8))},i.\u0275prov=Ie({token:i,factory:i.\u0275fac,providedIn:"root"}),i})();const sU=new me("VIRTUAL_SCROLLABLE");let KK=(()=>{class i extends rU{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)(E(pt),E(Wy),E(ht),E(Aa,8))},i.\u0275dir=ve({type:i,features:[at]}),i})();const QK=typeof requestAnimationFrame<"u"?DK:TI;let JK=(()=>{class i extends KK{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=Pt(zi),this._detachedSubject=new Re,this._renderedRangeSubject=new Re,this._orientation="vertical",this._appendOnly=!1,this.scrolledIndexChange=new Tn(d=>this._scrollStrategy.scrolledIndexChange.subscribe(h=>Promise.resolve().then(()=>this.ngZone.run(()=>d.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=Zt.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(Eo(null),DM(0,QK)).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(We(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 ZK(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)(E(pt),E(ri),E(ht),E(YK,8),E(Aa,8),E(Wy),E(RM),E(sU,8))},i.\u0275cmp=ot({type:i,selectors:[["cdk-virtual-scroll-viewport"]],viewQuery:function(e,n){if(1&e&&ii(WK,7),2&e){let r;Tt(r=It())&&(n._contentWrapper=r.first)}},hostAttrs:[1,"cdk-virtual-scroll-viewport"],hostVars:4,hostBindings:function(e,n){2&e&&un("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:rU,useFactory:(t,e)=>t||e,deps:[[new Ss,new _o(sU)],i]}]),at,Y1],ngContentSelectors:jK,decls:4,vars:4,consts:[[1,"cdk-virtual-scroll-content-wrapper"],["contentWrapper",""],[1,"cdk-virtual-scroll-spacer"]],template:function(e,n){1&e&&(rr(),W(0,"div",0,1),$t(2),Y(),Oe(3,"div",2)),2&e&&(G(3),$o("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})(),jy=(()=>{class i{}return i.\u0275fac=function(e){return new(e||i)},i.\u0275mod=nn({type:i}),i.\u0275inj=Xt({}),i})(),oU=(()=>{class i{}return i.\u0275fac=function(e){return new(e||i)},i.\u0275mod=nn({type:i}),i.\u0275inj=Xt({imports:[$y,jy,JK,$y,jy]}),i})();class OI{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 OI{constructor(t,e,n,r,s){super(),this.component=t,this.viewContainerRef=e,this.injector=n,this.componentFactoryResolver=r,this.projectableNodes=s}}class Cm extends OI{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 eZ extends OI{constructor(t){super(),this.element=t instanceof pt?t.nativeElement:t}}class kM{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 Cm?(this._attachedPortal=t,this.attachTemplatePortal(t)):this.attachDomPortal&&t instanceof eZ?(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 tZ extends kM{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||$i.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 Sm=(()=>{class i extends kM{constructor(e,n,r){super(),this._componentFactoryResolver=e,this._viewContainerRef=n,this._isInitialized=!1,this.attached=new $e,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)(E(Ol),E(jr),E(Wt))},i.\u0275dir=ve({type:i,selectors:[["","cdkPortalOutlet",""]],inputs:{portal:["cdkPortalOutlet","portal"]},outputs:{attached:"attached"},exportAs:["cdkPortalOutlet"],features:[at]}),i})(),kh=(()=>{class i{}return i.\u0275fac=function(e){return new(e||i)},i.\u0275mod=nn({type:i}),i.\u0275inj=Xt({}),i})();function Yo(i,...t){return t.length?t.some(e=>i[e]):i.altKey||i.shiftKey||i.ctrlKey||i.metaKey}const aU=iU();class mZ{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=mr(-this._previousScrollPosition.left),t.style.top=mr(-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"),aU&&(n.scrollBehavior=r.scrollBehavior="auto"),window.scroll(this._previousScrollPosition.left,this._previousScrollPosition.top),aU&&(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 gZ{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(vn(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 lU{enable(){}disable(){}attach(){}}function LI(i,t){return t.some(e=>i.bottome.bottom||i.righte.right)}function cU(i,t){return t.some(e=>i.tope.bottom||i.lefte.right)}class _Z{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();LI(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 vZ=(()=>{class i{constructor(e,n,r,s){this._scrollDispatcher=e,this._viewportRuler=n,this._ngZone=r,this.noop=()=>new lU,this.close=o=>new gZ(this._scrollDispatcher,this._ngZone,this._viewportRuler,o),this.block=()=>new mZ(this._viewportRuler,this._document),this.reposition=o=>new _Z(this._scrollDispatcher,this._viewportRuler,this._ngZone,o),this._document=s}}return i.\u0275fac=function(e){return new(e||i)(ee(Wy),ee(RM),ee(ht),ee(Wt))},i.\u0275prov=Ie({token:i,factory:i.\u0275fac,providedIn:"root"}),i})();class Im{constructor(t){if(this.scrollStrategy=new lU,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 yZ{constructor(t,e){this.connectionPair=t,this.scrollableViewProperties=e}}let dU=(()=>{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)(ee(Wt))},i.\u0275prov=Ie({token:i,factory:i.\u0275fac,providedIn:"root"}),i})(),bZ=(()=>{class i extends dU{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)(ee(Wt),ee(ht,8))},i.\u0275prov=Ie({token:i,factory:i.\u0275fac,providedIn:"root"}),i})(),xZ=(()=>{class i extends dU{constructor(e,n,r){super(e),this._platform=n,this._ngZone=r,this._cursorStyleIsSet=!1,this._pointerDownListener=s=>{this._pointerDownEventTarget=au(s)},this._clickListener=s=>{const o=au(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 d=l[c];if(d._outsidePointerEvents.observers.length<1||!d.hasAttached())continue;if(d.overlayElement.contains(o)||d.overlayElement.contains(a))break;const h=d._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)(ee(Wt),ee(zi),ee(ht,8))},i.\u0275prov=Ie({token:i,factory:i.\u0275fac,providedIn:"root"}),i})(),FM=(()=>{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||PI()){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 Re,this._outsidePointerEvents=new Re,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(Oi(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=mr(this._config.width),t.height=mr(this._config.height),t.minWidth=mr(this._config.minWidth),t.minHeight=mr(this._config.minHeight),t.maxWidth=mr(this._config.maxWidth),t.maxHeight=mr(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(We(Cr(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 uU="cdk-overlay-connected-position-bounding-box",wZ=/([A-Za-z%]+)$/;class MZ{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 Re,this._resizeSubscription=Zt.EMPTY,this._offsetX=0,this._offsetY=0,this._appliedPanelClasses=[],this.positionChanges=this._positionChanges,this.setOrigin(t)}attach(t){this._validatePositions(),t.hostElement.classList.add(uU),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),d=this._getOverlayFit(c,e,n,a);if(d.isCompletelyWithinViewport)return this._isPushed=!1,void this._applyPosition(a,l);this._canFitWithFlexibleDimensions(d,c,n)?s.push({position:a,origin:l,overlayRect:e,boundingBoxRect:this._calculateBoundingBoxRect(l,a)}):(!o||o.overlayFit.visibleAreal&&(l=d,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(uU),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=fU(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=hU(this._overlayRef.getConfig().minHeight),a=hU(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=fU(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 d=0,h=0;return d=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,d=t.x-this._viewportMargin;else if("start"===e.overlayX&&!r||"end"===e.overlayX&&r)h=t.x,d=n.right-t.x;else{const m=Math.min(n.right-t.x+n.left,t.x),g=this._lastBoundingBoxSize.width;d=2*m,h=t.x-m,d>g&&!this._isInitialRender&&!this._growAfterOpen&&(h=t.x-g/2)}return{top:o,left:h,bottom:a,right:p,width:d,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=mr(n.height),r.top=mr(n.top),r.bottom=mr(n.bottom),r.width=mr(n.width),r.left=mr(n.left),r.right=mr(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=mr(s)),o&&(r.maxWidth=mr(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 d=this._viewportRuler.getViewportScrollPosition();Ph(n,this._getExactOverlayY(e,t,d)),Ph(n,this._getExactOverlayX(e,t,d))}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=mr(o.maxHeight):s&&(n.maxHeight="")),o.maxWidth&&(r?n.maxWidth=mr(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=mr(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=mr(s.x),r}_getScrollVisibility(){const t=this._getOriginRect(),e=this._pane.getBoundingClientRect(),n=this._scrollables.map(r=>r.getElementRef().nativeElement.getBoundingClientRect());return{isOriginClipped:cU(t,n),isOriginOutsideView:LI(t,n),isOverlayClipped:cU(e,n),isOverlayOutsideView:LI(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 pt)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 hU(i){if("number"!=typeof i&&null!=i){const[t,e]=i.split(wZ);return e&&"px"!==e?null:parseFloat(t)}return i||null}function fU(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 pU="cdk-global-overlay-wrapper";class mU{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(pU),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),d=this._xPosition,h=this._xOffset,p="rtl"===this._overlayRef.getConfig().direction;let m="",g="",b="";l?b="flex-start":"center"===d?(b="center",p?g=h:m=h):p?"left"===d||"end"===d?(b="flex-end",m=h):("right"===d||"start"===d)&&(b="flex-start",g=h):"left"===d||"start"===d?(b="flex-start",m=h):("right"===d||"end"===d)&&(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(pU),n.justifyContent=n.alignItems=t.marginTop=t.marginBottom=t.marginLeft=t.marginRight=t.position="",this._overlayRef=null,this._isDisposed=!0}}let CZ=(()=>{class i{constructor(e,n,r,s){this._viewportRuler=e,this._document=n,this._platform=r,this._overlayContainer=s}global(){return new mU}flexibleConnectedTo(e){return new MZ(e,this._viewportRuler,this._document,this._platform,this._overlayContainer)}}return i.\u0275fac=function(e){return new(e||i)(ee(RM),ee(Wt),ee(zi),ee(FM))},i.\u0275prov=Ie({token:i,factory:i.\u0275fac,providedIn:"root"}),i})(),SZ=0,as=(()=>{class i{constructor(e,n,r,s,o,a,l,c,d,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=d,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 Im(e);return o.direction=o.direction||this._directionality.value,new qy(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-"+SZ++,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(lm)),new tZ(e,this._componentFactoryResolver,this._appRef,this._injector,this._document)}}return i.\u0275fac=function(e){return new(e||i)(ee(vZ),ee(FM),ee(Ol),ee(CZ),ee(bZ),ee($i),ee(ht),ee(Wt),ee(Aa),ee(py),ee(xZ),ee(kr,8))},i.\u0275prov=Ie({token:i,factory:i.\u0275fac,providedIn:"root"}),i})();const EZ=[{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"}],gU=new me("cdk-connected-overlay-scroll-strategy");let NI=(()=>{class i{constructor(e){this.elementRef=e}}return i.\u0275fac=function(e){return new(e||i)(E(pt))},i.\u0275dir=ve({type:i,selectors:[["","cdk-overlay-origin",""],["","overlay-origin",""],["","cdkOverlayOrigin",""]],exportAs:["cdkOverlayOrigin"],standalone:!0}),i})(),_U=(()=>{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=Zt.EMPTY,this._attachSubscription=Zt.EMPTY,this._detachSubscription=Zt.EMPTY,this._positionSubscription=Zt.EMPTY,this.viewportMargin=0,this.open=!1,this.disableClose=!1,this.backdropClick=new $e,this.positionChange=new $e,this.attach=new $e,this.detach=new $e,this.overlayKeydown=new $e,this.overlayOutsideClick=new $e,this._templatePortal=new Cm(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=EZ);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&&!Yo(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 Im({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 NI?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(HB(()=>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)(E(as),E(wo),E(jr),E(gU),E(Aa,8))},i.\u0275dir=ve({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:[bi]}),i})();const DZ={provide:gU,deps:[as],useFactory:function AZ(i){return()=>i.scrollStrategies.reposition()}};let Rm=(()=>{class i{}return i.\u0275fac=function(e){return new(e||i)},i.\u0275mod=nn({type:i}),i.\u0275inj=Xt({providers:[as,DZ],imports:[$y,kh,oU,oU]}),i})();function Vc(i,t=zy){return Jn((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,d=t.now();if(d{s=c,o=t.now(),r||(r=t.schedule(l,i),n.add(r))},()=>{a(),n.complete()},void 0,()=>{s=r=null}))})}function vU(i){return vn((t,e)=>i<=e)}function zc(i,t=Ua){return i=i??TZ,Jn((e,n)=>{let r,s=!0;e.subscribe(jn(n,o=>{const a=t(o);(s||!i(r,a))&&(s=!1,r=a,n.next(o))}))})}function TZ(i,t){return i===t}let yU=(()=>{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})(),IZ=(()=>{class i{constructor(e){this._mutationObserverFactory=e,this._observedElements=new Map}ngOnDestroy(){this._observedElements.forEach((e,n)=>this._cleanupObserver(n))}observe(e){const n=Uc(e);return new Tn(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 Re,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)(ee(yU))},i.\u0275prov=Ie({token:i,factory:i.\u0275fac,providedIn:"root"}),i})(),bU=(()=>{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=ks(e),this._subscribe()}constructor(e,n,r){this._contentObserver=e,this._elementRef=n,this._ngZone=r,this.event=new $e,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(Vc(this.debounce)):e).subscribe(this.event)})}_unsubscribe(){this._currentSubscription?.unsubscribe()}}return i.\u0275fac=function(e){return new(e||i)(E(IZ),E(pt),E(ht))},i.\u0275dir=ve({type:i,selectors:[["","cdkObserveContent",""]],inputs:{disabled:["cdkObserveContentDisabled","disabled"],debounce:"debounce"},outputs:{event:"cdkObserveContent"},exportAs:["cdkObserveContent"]}),i})(),BI=(()=>{class i{}return i.\u0275fac=function(e){return new(e||i)},i.\u0275mod=nn({type:i}),i.\u0275inj=Xt({providers:[yU]}),i})();const xU=new Set;let km,RZ=(()=>{class i{constructor(e){this._platform=e,this._matchMedia=this._platform.isBrowser&&window.matchMedia?window.matchMedia.bind(window):PZ}matchMedia(e){return(this._platform.WEBKIT||this._platform.BLINK)&&function kZ(i){if(!xU.has(i))try{km||(km=document.createElement("style"),km.setAttribute("type","text/css"),document.head.appendChild(km)),km.sheet&&(km.sheet.insertRule(`@media ${i} {body{ }}`,0),xU.add(i))}catch(t){console.error(t)}}(e),this._matchMedia(e)}}return i.\u0275fac=function(e){return new(e||i)(ee(zi))},i.\u0275prov=Ie({token:i,factory:i.\u0275fac,providedIn:"root"}),i})();function PZ(i){return{matches:"all"===i||""===i,media:i,addListener:()=>{},removeListener:()=>{}}}let UI=(()=>{class i{constructor(e,n){this._mediaMatcher=e,this._zone=n,this._queries=new Map,this._destroySubject=new Re}ngOnDestroy(){this._destroySubject.next(),this._destroySubject.complete()}isMatched(e){return wU(CM(e)).some(r=>this._registerQuery(r).mql.matches)}observe(e){let s=Hl(wU(CM(e)).map(o=>this._registerQuery(o).observable));return s=wy(s.pipe(Oi(1)),s.pipe(vU(1),Vc(0))),s.pipe(et(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 Tn(o=>{const a=l=>this._zone.run(()=>o.next(l));return n.addListener(a),()=>{n.removeListener(a)}}).pipe(Eo(n),et(({matches:o})=>({query:e,matches:o})),We(this._destroySubject)),mql:n};return this._queries.set(e,s),s}}return i.\u0275fac=function(e){return new(e||i)(ee(RZ),ee(ht))},i.\u0275prov=Ie({token:i,factory:i.\u0275fac,providedIn:"root"}),i})();function wU(i){return i.map(t=>t.split(",")).reduce((t,e)=>t.concat(e)).map(t=>t.trim())}function LM(i,t){return(i.getAttribute(t)||"").match(/\S+/g)||[]}const CU="cdk-describedby-message",NM="cdk-describedby-host";let VI=0,NZ=(()=>{class i{constructor(e,n){this._platform=n,this._messageRegistry=new Map,this._messagesContainer=null,this._id=""+VI++,this._document=e,this._id=Pt(am)+"-"+VI++}describe(e,n,r){if(!this._canBeDescribed(e,n))return;const s=zI(n,r);"string"!=typeof n?(SU(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=zI(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(`[${NM}="${this._id}"]`);for(let n=0;n0!=r.indexOf(CU));e.setAttribute("aria-describedby",n.join(" "))}_addMessageReference(e,n){const r=this._messageRegistry.get(n);(function FZ(i,t,e){const n=LM(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(NM,this._id),r.referenceCount++}_removeMessageReference(e,n){const r=this._messageRegistry.get(n);r.referenceCount--,function LZ(i,t,e){const r=LM(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(NM)}_isElementDescribedByMessage(e,n){const r=LM(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)(ee(Wt),ee(zi))},i.\u0275prov=Ie({token:i,factory:i.\u0275fac,providedIn:"root"}),i})();function zI(i,t){return"string"==typeof i?`${t||""}/${i}`:i}function SU(i,t){i.id||(i.id=`${CU}-${t}-${VI++}`)}class EU{constructor(t){this._items=t,this._activeItemIndex=-1,this._activeItem=null,this._wrap=!1,this._letterKeyStream=new Re,this._typeaheadSubscription=Zt.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 Re,this.change=new Re,t instanceof rm&&(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(Vi(e=>this._pressedLetters.push(e)),Vc(t),vn(()=>this._pressedLetters.length>0),et(()=>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 rm?this._items.toArray():this._items}}class BZ extends EU{setActiveItem(t){this.activeItem&&this.activeItem.setInactiveStyles(),super.setActiveItem(t),this.activeItem&&this.activeItem.setActiveStyles()}}class AU extends EU{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 BM=(()=>{class i{constructor(e){this._platform=e}isDisabled(e){return e.hasAttribute("disabled")}isVisible(e){return function VZ(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 UZ(i){try{return i.frameElement}catch{return null}}(function qZ(i){return i.ownerDocument&&i.ownerDocument.defaultView||window}(e));if(n&&(-1===TU(n)||!this.isVisible(n)))return!1;let r=e.nodeName.toLowerCase(),s=TU(e);return e.hasAttribute("contenteditable")?-1!==s:!("iframe"===r||"object"===r||this._platform.WEBKIT&&this._platform.IOS&&!function jZ(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 YZ(i){return!function HZ(i){return function $Z(i){return"input"==i.nodeName.toLowerCase()}(i)&&"hidden"==i.type}(i)&&(function zZ(i){let t=i.nodeName.toLowerCase();return"input"===t||"select"===t||"button"===t||"textarea"===t}(i)||function GZ(i){return function WZ(i){return"a"==i.nodeName.toLowerCase()}(i)&&i.hasAttribute("href")}(i)||i.hasAttribute("contenteditable")||DU(i))}(e)&&!this.isDisabled(e)&&(n?.ignoreVisibility||this.isVisible(e))}}return i.\u0275fac=function(e){return new(e||i)(ee(zi))},i.\u0275prov=Ie({token:i,factory:i.\u0275fac,providedIn:"root"}),i})();function DU(i){if(!i.hasAttribute("tabindex")||void 0===i.tabIndex)return!1;let t=i.getAttribute("tabindex");return!(!t||isNaN(parseInt(t,10)))}function TU(i){if(!DU(i))return null;const t=parseInt(i.getAttribute("tabindex")||"",10);return isNaN(t)?-1:t}class XZ{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(Oi(1)).subscribe(t)}}let HI=(()=>{class i{constructor(e,n,r){this._checker=e,this._ngZone=n,this._document=r}create(e,n=!1){return new XZ(e,this._checker,this._ngZone,this._document,n)}}return i.\u0275fac=function(e){return new(e||i)(ee(BM),ee(ht),ee(Wt))},i.\u0275prov=Ie({token:i,factory:i.\u0275fac,providedIn:"root"}),i})();function GI(i){return 0===i.buttons||0===i.offsetX&&0===i.offsetY}function $I(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 KZ=new me("cdk-input-modality-detector-options"),ZZ={ignoreKeys:[18,17,224,91,16]},Pm=Th({passive:!0,capture:!0});let QZ=(()=>{class i{get mostRecentModality(){return this._modality.value}constructor(e,n,r,s){this._platform=e,this._mostRecentTarget=null,this._modality=new wt(null),this._lastTouchMs=0,this._onKeydown=o=>{this._options?.ignoreKeys?.some(a=>a===o.keyCode)||(this._modality.next("keyboard"),this._mostRecentTarget=au(o))},this._onMousedown=o=>{Date.now()-this._lastTouchMs<650||(this._modality.next(GI(o)?"keyboard":"mouse"),this._mostRecentTarget=au(o))},this._onTouchstart=o=>{$I(o)?this._modality.next("keyboard"):(this._lastTouchMs=Date.now(),this._modality.next("touch"),this._mostRecentTarget=au(o))},this._options={...ZZ,...s},this.modalityDetected=this._modality.pipe(vU(1)),this.modalityChanged=this.modalityDetected.pipe(zc()),e.isBrowser&&n.runOutsideAngular(()=>{r.addEventListener("keydown",this._onKeydown,Pm),r.addEventListener("mousedown",this._onMousedown,Pm),r.addEventListener("touchstart",this._onTouchstart,Pm)})}ngOnDestroy(){this._modality.complete(),this._platform.isBrowser&&(document.removeEventListener("keydown",this._onKeydown,Pm),document.removeEventListener("mousedown",this._onMousedown,Pm),document.removeEventListener("touchstart",this._onTouchstart,Pm))}}return i.\u0275fac=function(e){return new(e||i)(ee(zi),ee(ht),ee(Wt),ee(KZ,8))},i.\u0275prov=Ie({token:i,factory:i.\u0275fac,providedIn:"root"}),i})();const JZ=new me("liveAnnouncerElement",{providedIn:"root",factory:function eQ(){return null}}),tQ=new me("LIVE_ANNOUNCER_DEFAULT_OPTIONS");let nQ=0,WI=(()=>{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 Re,this._rootNodeFocusAndBlurListener=a=>{for(let c=au(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=Uc(e);if(!this._platform.isBrowser||1!==r.nodeType)return ut(null);const s=function VK(i){if(function UK(){if(null==kI){const i=typeof document<"u"?document.head:null;kI=!(!i||!i.createShadowRoot&&!i.attachShadow)}return kI}()){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 Re,rootNode:s};return this._elementInfo.set(r,a),this._registerGlobalListeners(a),a.subject}stopMonitoring(e){const n=Uc(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=Uc(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=au(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,UM),n.addEventListener("blur",this._rootNodeFocusAndBlurListener,UM)}),this._rootNodeFocusListenerCount.set(n,r+1),1==++this._monitoredElementCount&&(this._ngZone.runOutsideAngular(()=>{this._getWindow().addEventListener("focus",this._windowFocusListener)}),this._inputModalityDetector.modalityDetected.pipe(We(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,UM),n.removeEventListener("blur",this._rootNodeFocusAndBlurListener,UM),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=Pt(UI).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(jI,RU,kU),this._hasCheckedHighContrastMode=!0;const n=this.getHighContrastMode();1===n?e.add(jI,RU):2===n&&e.add(jI,kU)}}}return i.\u0275fac=function(e){return new(e||i)(ee(zi),ee(Wt))},i.\u0275prov=Ie({token:i,factory:i.\u0275fac,providedIn:"root"}),i})(),OU=(()=>{class i{constructor(e){e._applyBodyHighContrastModeCssClasses()}}return i.\u0275fac=function(e){return new(e||i)(ee(PU))},i.\u0275mod=nn({type:i}),i.\u0275inj=Xt({imports:[BI]}),i})();function rQ(i,t){}class VM{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 FU=(()=>{class i extends kM{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=d=>{this._portalOutlet.hasAttached();const h=this._portalOutlet.attachDomPortal(d);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=IM(),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=IM();return e===n||e.contains(n)}_initializeFocusTrap(){this._focusTrap=this._focusTrapFactory.create(this._elementRef.nativeElement),this._document&&(this._elementFocusedBeforeDialogWasOpened=IM())}_handleBackdropClicks(){this._overlayRef.backdropClick().subscribe(()=>{this._config.disableClose&&this._recaptureFocus()})}}return i.\u0275fac=function(e){return new(e||i)(E(pt),E(HI),E(Wt,8),E(VM),E(BM),E(ht),E(qy),E(Hc))},i.\u0275cmp=ot({type:i,selectors:[["cdk-dialog-container"]],viewQuery:function(e,n){if(1&e&&ii(Sm,7),2&e){let r;Tt(r=It())&&(n._portalOutlet=r.first)}},hostAttrs:["tabindex","-1",1,"cdk-dialog-container"],hostVars:6,hostBindings:function(e,n){2&e&&St("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:[at],decls:1,vars:0,consts:[["cdkPortalOutlet",""]],template:function(e,n){1&e&&fe(0,rQ,0,0,"ng-template",0)},dependencies:[Sm],styles:[".cdk-dialog-container{display:block;width:100%;height:100%;min-height:inherit;max-height:inherit}"],encapsulation:2}),i})();class YI{constructor(t,e){this.overlayRef=t,this.config=e,this.closed=new Re,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&&!Yo(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 LU=new me("DialogScrollStrategy"),sQ=new me("DialogData"),oQ=new me("DefaultDialogConfig"),lQ={provide:LU,deps:[as],useFactory:function aQ(i){return()=>i.scrollStrategies.block()}};let cQ=0,NU=(()=>{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 Re,this._afterOpenedAtThisLevel=new Re,this._ariaHiddenElements=new Map,this.afterAllClosed=My(()=>this.openDialogs.length?this._getAfterAllClosed():this._getAfterAllClosed().pipe(Eo(void 0))),this._scrollStrategy=a}open(e,n){(n={...this._defaultOptions||new VM,...n}).id=n.id||"cdk-dialog-"+cQ++,n.id&&this.getDialogById(n.id);const s=this._getOverlayConfig(n),o=this._overlay.create(s),a=new YI(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(){qI(this.openDialogs,e=>e.close())}getDialogById(e){return this.openDialogs.find(n=>n.id===e)}ngOnDestroy(){qI(this._openDialogsAtThisLevel,e=>{!1===e.config.closeOnDestroy&&this._removeOpenDialog(e,!1)}),qI(this._openDialogsAtThisLevel,e=>e.close()),this._afterAllClosedAtThisLevel.complete(),this._afterOpenedAtThisLevel.complete(),this._openDialogsAtThisLevel=[]}_getOverlayConfig(e){const n=new Im({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:VM,useValue:r},{provide:YI,useValue:n},{provide:qy,useValue:e}];let a;r.container?"function"==typeof r.container?a=r.container:(a=r.container.type,o.push(...r.container.providers(r))):a=FU;const l=new Rh(a,r.viewContainerRef,$i.create({parent:s||this._injector,providers:o}),r.componentFactoryResolver);return e.attach(l).instance}_attachDialogContent(e,n,r,s){if(e instanceof wo){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 Cm(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:sQ,useValue:e.data},{provide:YI,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(Aa,null,{optional:!0}))&&a.push({provide:Aa,useValue:{value:e.direction,change:ut()}}),$i.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)(ee(as),ee($i),ee(oQ,8),ee(i,12),ee(FM),ee(LU))},i.\u0275prov=Ie({token:i,factory:i.\u0275fac}),i})();function qI(i,t){let e=i.length;for(;e--;)t(i[e])}let dQ=(()=>{class i{}return i.\u0275fac=function(e){return new(e||i)},i.\u0275mod=nn({type:i}),i.\u0275inj=Xt({providers:[NU,lQ],imports:[Rm,kh,OU,kh]}),i})();const uQ=["text"];function hQ(i,t){if(1&i&&Oe(0,"mat-pseudo-checkbox",6),2&i){const e=he();U("state",e.selected?"checked":"unchecked")("disabled",e.disabled)}}function fQ(i,t){1&i&&Oe(0,"mat-pseudo-checkbox",7),2&i&&U("disabled",he().disabled)}function pQ(i,t){if(1&i&&(W(0,"span",8),Ge(1),Y()),2&i){const e=he();G(1),Xi("(",e.group.label,")")}}const mQ=[[["mat-icon"]],"*"],gQ=["mat-icon","*"],vQ=new me("mat-sanity-checks",{providedIn:"root",factory:function _Q(){return!0}});let Kn=(()=>{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!PI()&&("boolean"==typeof this._sanityChecks?this._sanityChecks:!!this._sanityChecks[e])}}return i.\u0275fac=function(e){return new(e||i)(ee(PU),ee(vQ,8),ee(Wt))},i.\u0275mod=nn({type:i}),i.\u0275inj=Xt({imports:[$y,$y]}),i})();function zM(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 Xy(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 HM(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 XI(i,t=0){return class extends i{get tabIndex(){return this.disabled?-1:this._tabIndex}set tabIndex(e){this._tabIndex=null!=e?ks(e):this.defaultTabIndex}constructor(...e){super(...e),this._tabIndex=t,this.defaultTabIndex=t}}}function VU(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 yQ(i){return class extends i{constructor(...t){super(...t),this._isInitialized=!1,this._pendingSubscribers=[],this.initialized=new Tn(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 HU=(()=>{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 xQ{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 GU=Th({passive:!0,capture:!0});class wQ{constructor(){this._events=new Map,this._delegateEventHandler=t=>{const e=au(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,GU)})}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,GU)))}}const $U={enterDuration:225,exitDuration:150},WU=Th({passive:!0,capture:!0}),jU=["mousedown","touchstart"],YU=["mouseup","mouseleave","touchend","touchcancel"];class Om{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=Uc(n))}fadeInRipple(t,e,n={}){const r=this._containerRect=this._containerRect||this._containerElement.getBoundingClientRect(),s={...$U,...n.animation};n.centered&&(t=r.left+r.width/2,e=r.top+r.height/2);const o=n.radius||function CQ(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,d=document.createElement("div");d.classList.add("mat-ripple-element"),d.style.left=a-o+"px",d.style.top=l-o+"px",d.style.height=2*o+"px",d.style.width=2*o+"px",null!=n.color&&(d.style.backgroundColor=n.color),d.style.transitionDuration=`${c}ms`,this._containerElement.appendChild(d);const h=window.getComputedStyle(d),m=h.transitionDuration,g="none"===h.transitionProperty||"0s"===m||"0s, 0s"===m||0===r.width&&0===r.height,b=new xQ(this,d,n,g);d.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);d.addEventListener("transitionend",y),d.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={...$U,...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=Uc(t);!this._platform.isBrowser||!e||e===this._triggerElement||(this._removeTriggerEvents(),this._triggerElement=e,jU.forEach(n=>{Om._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(()=>{YU.forEach(e=>{this._triggerElement.addEventListener(e,this,WU)})}),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=GI(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&&(jU.forEach(e=>Om._eventManager.removeHandler(e,t,this)),this._pointerUpEventsRegistered&&YU.forEach(e=>t.removeEventListener(e,this,WU)))}}Om._eventManager=new wQ;const KI=new me("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 Om(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)(E(pt),E(ht),E(zi),E(KI,8),E(kr,8))},i.\u0275dir=ve({type:i,selectors:[["","mat-ripple",""],["","matRipple",""]],hostAttrs:[1,"mat-ripple"],hostVars:2,hostBindings:function(e,n){2&e&&un("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})(),Zy=(()=>{class i{}return i.\u0275fac=function(e){return new(e||i)},i.\u0275mod=nn({type:i}),i.\u0275inj=Xt({imports:[Kn,Kn]}),i})(),SQ=(()=>{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)(E(kr,8))},i.\u0275cmp=ot({type:i,selectors:[["mat-pseudo-checkbox"]],hostAttrs:[1,"mat-pseudo-checkbox"],hostVars:12,hostBindings:function(e,n){2&e&&un("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})(),qU=(()=>{class i{}return i.\u0275fac=function(e){return new(e||i)},i.\u0275mod=nn({type:i}),i.\u0275inj=Xt({imports:[Kn]}),i})();const XU=new me("MAT_OPTION_PARENT_COMPONENT"),KU=new me("MatOptgroup");let EQ=0;class AQ{constructor(t,e=!1){this.source=t,this.isUserInput=e}}let DQ=(()=>{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-"+EQ++,this.onSelectionChange=new $e,this._stateChanges=new Re}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)&&!Yo(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 AQ(this,e))}}return i.\u0275fac=function(e){bo()},i.\u0275dir=ve({type:i,viewQuery:function(e,n){if(1&e&&ii(uQ,7),2&e){let r;Tt(r=It())&&(n._text=r.first)}},inputs:{value:"value",id:"id",disabled:"disabled"},outputs:{onSelectionChange:"onSelectionChange"}}),i})(),Fm=(()=>{class i extends DQ{constructor(e,n,r,s){super(e,n,r,s)}}return i.\u0275fac=function(e){return new(e||i)(E(pt),E(ri),E(XU,8),E(KU,8))},i.\u0275cmp=ot({type:i,selectors:[["mat-option"]],hostAttrs:["role","option",1,"mat-mdc-option","mdc-list-item"],hostVars:11,hostBindings:function(e,n){1&e&&Ne("click",function(){return n._selectViaInteraction()})("keydown",function(s){return n._handleKeydown(s)}),2&e&&(Ul("id",n.id),St("aria-selected",n.selected)("aria-disabled",n.disabled.toString()),un("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:[at],ngContentSelectors:gQ,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&&(rr(mQ),fe(0,hQ,1,2,"mat-pseudo-checkbox",0),$t(1),W(2,"span",1,2),$t(4,1),Y(),fe(5,fQ,1,1,"mat-pseudo-checkbox",3),fe(6,pQ,2,1,"span",4),Oe(7,"div",5)),2&e&&(U("ngIf",n.multiple),G(5),U("ngIf",!n.multiple&&n.selected&&!n.hideSingleSelectionIndicator),G(1),U("ngIf",n.group&&n.group._inert),G(1),U("matRippleTrigger",n._getHostElement())("matRippleDisabled",n.disabled||n.disableRipple))},dependencies:[Oh,Mi,SQ],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})(),ZI=(()=>{class i{}return i.\u0275fac=function(e){return new(e||i)},i.\u0275mod=nn({type:i}),i.\u0275inj=Xt({imports:[Zy,So,Kn,qU]}),i})();class ZU{}class RQ{}const Gc="*";function Da(i,t){return{type:7,name:i,definitions:t,options:{}}}function Yr(i,t=null){return{type:4,styles:t,timings:i}}function JU(i,t=null){return{type:2,steps:i,options:t}}function si(i){return{type:6,styles:i,offset:null}}function Ps(i,t,e){return{type:0,name:i,styles:t,options:e}}function eV(i){return{type:5,steps:i}}function Or(i,t,e=null){return{type:1,expr:i,animation:t,options:e}}function QI(i=null){return{type:9,options:i}}function JI(i,t,e=null){return{type:11,selector:i,animation:t,options:e}}function tV(i){Promise.resolve().then(i)}class Qy{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(){tV(()=>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 nV{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?tV(()=>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 eR="!";function kQ(i,t){}class GM{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 tR="mdc-dialog--open",iV="mdc-dialog--opening",rV="mdc-dialog--closing";let FQ=(()=>{class i extends FU{constructor(e,n,r,s,o,a,l,c){super(e,n,r,s,o,a,l,c),this._animationStateChanged=new $e}_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)(E(pt),E(HI),E(Wt,8),E(GM),E(BM),E(ht),E(qy),E(Hc))},i.\u0275cmp=ot({type:i,selectors:[["ng-component"]],features:[at],decls:0,vars:0,template:function(e,n){},encapsulation:2}),i})();const sV="--mat-dialog-transition-duration";function oV(i){return null==i?null:"number"==typeof i?i:i.endsWith("ms")?ks(i.substring(0,i.length-2)):i.endsWith("s")?1e3*ks(i.substring(0,i.length-1)):"0"===i?0:null}let LQ=(()=>{class i extends FQ{constructor(e,n,r,s,o,a,l,c,d){super(e,n,r,s,o,a,l,d),this._animationMode=c,this._animationsEnabled="NoopAnimations"!==this._animationMode,this._hostElement=this._elementRef.nativeElement,this._openAnimationDuration=this._animationsEnabled?oV(this._config.enterAnimationDuration)??150:0,this._closeAnimationDuration=this._animationsEnabled?oV(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(sV,`${this._openAnimationDuration}ms`),this._requestAnimationFrame(()=>this._hostElement.classList.add(iV,tR)),this._waitForAnimationToComplete(this._openAnimationDuration,this._finishDialogOpen)):(this._hostElement.classList.add(tR),Promise.resolve().then(()=>this._finishDialogOpen()))}_startExitAnimation(){this._animationStateChanged.emit({state:"closing",totalTime:this._closeAnimationDuration}),this._hostElement.classList.remove(tR),this._animationsEnabled?(this._hostElement.style.setProperty(sV,`${this._openAnimationDuration}ms`),this._requestAnimationFrame(()=>this._hostElement.classList.add(rV)),this._waitForAnimationToComplete(this._closeAnimationDuration,this._finishDialogClose)):Promise.resolve().then(()=>this._finishDialogClose())}_clearAnimationClasses(){this._hostElement.classList.remove(iV,rV)}_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)(E(pt),E(HI),E(Wt,8),E(GM),E(BM),E(ht),E(qy),E(kr,8),E(Hc))},i.\u0275cmp=ot({type:i,selectors:[["mat-dialog-container"]],hostAttrs:["tabindex","-1",1,"mat-mdc-dialog-container","mdc-dialog"],hostVars:8,hostBindings:function(e,n){2&e&&(Ul("id",n._config.id),St("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),un("_mat-animation-noopable",!n._animationsEnabled))},features:[at],decls:3,vars:0,consts:[[1,"mdc-dialog__container"],[1,"mat-mdc-dialog-surface","mdc-dialog__surface"],["cdkPortalOutlet",""]],template:function(e,n){1&e&&(W(0,"div",0)(1,"div",1),fe(2,kQ,0,0,"ng-template",2),Y()())},dependencies:[Sm],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 Jy{constructor(t,e,n){this._ref=t,this._containerInstance=n,this._afterOpened=new Re,this._beforeClosed=new Re,this._state=0,this.disableClose=e.disableClose,this.id=t.id,n._animationStateChanged.pipe(vn(r=>"opened"===r.state),Oi(1)).subscribe(()=>{this._afterOpened.next(),this._afterOpened.complete()}),n._animationStateChanged.pipe(vn(r=>"closed"===r.state),Oi(1)).subscribe(()=>{clearTimeout(this._closeFallbackTimeout),this._finishDialogClose()}),t.overlayRef.detachments().subscribe(()=>{this._beforeClosed.next(this._result),this._beforeClosed.complete(),this._finishDialogClose()}),Cr(this.backdropClick(),this.keydownEvents().pipe(vn(r=>27===r.keyCode&&!this.disableClose&&!Yo(r)))).subscribe(r=>{this.disableClose||(r.preventDefault(),aV(this,"keydown"===r.type?"keyboard":"mouse"))})}close(t){this._result=t,this._containerInstance._animationStateChanged.pipe(vn(e=>"closing"===e.state),Oi(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 aV(i,t,e){return i._closeInteractionType=t,i.close(e)}const nR=new me("MatMdcDialogData"),NQ=new me("mat-mdc-dialog-default-options"),lV=new me("mat-mdc-dialog-scroll-strategy"),UQ={provide:lV,deps:[as],useFactory:function BQ(i){return()=>i.scrollStrategies.block()}};let VQ=0,zQ=(()=>{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,d,h){this._overlay=e,this._defaultOptions=r,this._parentDialog=s,this._dialogRefConstructor=l,this._dialogContainerType=c,this._dialogDataToken=d,this._openDialogsAtThisLevel=[],this._afterAllClosedAtThisLevel=new Re,this._afterOpenedAtThisLevel=new Re,this._idPrefix="mat-dialog-",this.dialogConfigClass=GM,this.afterAllClosed=My(()=>this.openDialogs.length?this._getAfterAllClosed():this._getAfterAllClosed().pipe(Eo(void 0))),this._scrollStrategy=a,this._dialog=n.get(NU)}open(e,n){let r;(n={...this._defaultOptions||new GM,...n}).id=n.id||`${this._idPrefix}${VQ++}`,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:VM,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){bo()},i.\u0275prov=Ie({token:i,factory:i.\u0275fac}),i})(),Lm=(()=>{class i extends zQ{constructor(e,n,r,s,o,a,l,c){super(e,n,s,a,l,o,Jy,LQ,nR,c),this._idPrefix="mat-mdc-dialog-"}}return i.\u0275fac=function(e){return new(e||i)(ee(as),ee($i),ee(py,8),ee(NQ,8),ee(lV),ee(i,12),ee(FM),ee(kr,8))},i.\u0275prov=Ie({token:i,factory:i.\u0275fac}),i})(),HQ=0,GQ=(()=>{class i{constructor(e,n,r){this.dialogRef=e,this._elementRef=n,this._dialog=r,this.type="button"}ngOnInit(){this.dialogRef||(this.dialogRef=hV(this._elementRef,this._dialog.openDialogs))}ngOnChanges(e){const n=e._matDialogClose||e._matDialogCloseResult;n&&(this.dialogResult=n.currentValue)}_onButtonClick(e){aV(this.dialogRef,0===e.screenX&&0===e.screenY?"keyboard":"mouse",this.dialogResult)}}return i.\u0275fac=function(e){return new(e||i)(E(Jy,8),E(pt),E(Lm))},i.\u0275dir=ve({type:i,selectors:[["","mat-dialog-close",""],["","matDialogClose",""]],hostVars:2,hostBindings:function(e,n){1&e&&Ne("click",function(s){return n._onButtonClick(s)}),2&e&&St("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:[bi]}),i})(),cV=(()=>{class i{constructor(e,n,r){this._dialogRef=e,this._elementRef=n,this._dialog=r,this.id="mat-mdc-dialog-title-"+HQ++}ngOnInit(){this._dialogRef||(this._dialogRef=hV(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)(E(Jy,8),E(pt),E(Lm))},i.\u0275dir=ve({type:i,selectors:[["","mat-dialog-title",""],["","matDialogTitle",""]],hostAttrs:[1,"mat-mdc-dialog-title","mdc-dialog__title"],hostVars:1,hostBindings:function(e,n){2&e&&Ul("id",n.id)},inputs:{id:"id"},exportAs:["matDialogTitle"]}),i})(),dV=(()=>{class i{}return i.\u0275fac=function(e){return new(e||i)},i.\u0275dir=ve({type:i,selectors:[["","mat-dialog-content",""],["mat-dialog-content"],["","matDialogContent",""]],hostAttrs:[1,"mat-mdc-dialog-content","mdc-dialog__content"]}),i})(),uV=(()=>{class i{constructor(){this.align="start"}}return i.\u0275fac=function(e){return new(e||i)},i.\u0275dir=ve({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&&un("mat-mdc-dialog-actions-align-center","center"===n.align)("mat-mdc-dialog-actions-align-end","end"===n.align)},inputs:{align:"align"}}),i})();function hV(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 fV=(()=>{class i{}return i.\u0275fac=function(e){return new(e||i)},i.\u0275mod=nn({type:i}),i.\u0275inj=Xt({providers:[Lm,UQ],imports:[dQ,Rm,kh,Kn,Kn]}),i})();const $Q=["mat-button",""],mV=[[["",8,"material-icons",3,"iconPositionEnd",""],["mat-icon",3,"iconPositionEnd",""],["","matButtonIcon","",3,"iconPositionEnd",""]],"*",[["","iconPositionEnd","",8,"material-icons"],["mat-icon","iconPositionEnd",""],["","matButtonIcon","","iconPositionEnd",""]]],gV=[".material-icons:not([iconPositionEnd]), mat-icon:not([iconPositionEnd]), [matButtonIcon]:not([iconPositionEnd])","*",".material-icons[iconPositionEnd], mat-icon[iconPositionEnd], [matButtonIcon][iconPositionEnd]"],jQ=["mat-mini-fab",""],qQ=["mat-icon-button",""],XQ=["*"],KQ=[{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"]}],ZQ=Xy(zM(HM(class{constructor(i){this._elementRef=i}})));let iR=(()=>{class i extends ZQ{constructor(e,n,r,s){super(e),this._platform=n,this._ngZone=r,this._animationMode=s,this._focusMonitor=Pt(Hc),this._isFab=!1;const o=e.nativeElement.classList;for(const a of KQ)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){bo()},i.\u0275dir=ve({type:i,viewQuery:function(e,n){if(1&e&&ii(Oh,5),2&e){let r;Tt(r=It())&&(n.ripple=r.first)}},features:[at]}),i})(),$M=(()=>{class i extends iR{constructor(e,n,r,s){super(e,n,r,s)}}return i.\u0275fac=function(e){return new(e||i)(E(pt),E(zi),E(ht),E(kr,8))},i.\u0275cmp=ot({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&&(St("disabled",n.disabled||null),un("_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:[at],attrs:$Q,ngContentSelectors:gV,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&&(rr(mV),Oe(0,"span",0),$t(1),W(2,"span",1),$t(3,1),Y(),$t(4,2),Oe(5,"span",2)(6,"span",3)(7,"span",4)),2&e&&(un("mdc-button__ripple",!n._isFab)("mdc-fab__ripple",n._isFab),G(6),U("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 JQ=new me("mat-mdc-fab-default-options",{providedIn:"root",factory:_V});function _V(){return{color:"accent"}}const vV=_V();let yV=(()=>{class i extends iR{constructor(e,n,r,s,o){super(e,n,r,s),this._options=o,this._isFab=!0,this._options=this._options||vV,this.color=this.defaultColor=this._options.color||vV.color}}return i.\u0275fac=function(e){return new(e||i)(E(pt),E(zi),E(ht),E(kr,8),E(JQ,8))},i.\u0275cmp=ot({type:i,selectors:[["button","mat-mini-fab",""]],hostVars:7,hostBindings:function(e,n){2&e&&(St("disabled",n.disabled||null),un("_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:[at],attrs:jQ,ngContentSelectors:gV,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&&(rr(mV),Oe(0,"span",0),$t(1),W(2,"span",1),$t(3,1),Y(),$t(4,2),Oe(5,"span",2)(6,"span",3)(7,"span",4)),2&e&&(un("mdc-button__ripple",!n._isFab)("mdc-fab__ripple",n._isFab),G(6),U("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})(),WM=(()=>{class i extends iR{constructor(e,n,r,s){super(e,n,r,s)}}return i.\u0275fac=function(e){return new(e||i)(E(pt),E(zi),E(ht),E(kr,8))},i.\u0275cmp=ot({type:i,selectors:[["button","mat-icon-button",""]],hostVars:7,hostBindings:function(e,n){2&e&&(St("disabled",n.disabled||null),un("_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:[at],attrs:qQ,ngContentSelectors:XQ,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&&(rr(),Oe(0,"span",0),$t(1),Oe(2,"span",1)(3,"span",2)(4,"span",3)),2&e&&(G(3),U("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=nn({type:i}),i.\u0275inj=Xt({imports:[Kn,Zy,Kn]}),i})();const eJ=["class","dialog"];let bV=(()=>{class i{constructor(e,n){this.dialogRef=e,this.data=n}}return i.\u0275fac=function(e){return new(e||i)(E(Jy),E(nR))},i.\u0275cmp=ot({type:i,selectors:[["app-confirm",8,"dialog"]],attrs:eJ,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&&(W(0,"h1",0),Ge(1,"Confirmation"),Y(),W(2,"div",1)(3,"p"),Ge(4),Y()(),W(5,"div",2)(6,"button",3),Ne("click",function(){return n.dialogRef.close()}),Ge(7,"Cancel"),Y(),W(8,"button",4),Ge(9,"Yes"),Y()()),2&e&&(G(4),_i(n.data.text),G(4),U("mat-dialog-close",!0))},dependencies:[$M,GQ,cV,dV,uV]}),i})();function rR(i,t){const e="object"==typeof t;return new Promise((n,r)=>{const s=new la({next:o=>{n(o),s.unsubscribe()},error:r,complete:()=>{e?n(t.defaultValue):r(new um)}});i.subscribe(s)})}let $c=(()=>{class i{constructor(e){this.ngZone=e,this.openedResource$=new wt(null),this.openedResourcePath$=new wt(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{ht.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)(ee(ht))},i.\u0275prov=Ie({token:i,factory:i.\u0275fac,providedIn:"root"}),i})();var sR=ps(489);const xV=i=>!(!i||"object"!=typeof i),wV=(i={},t,e,n=[])=>{const r=[];if(xV(i)){const s=Object.entries(i);for(let o=0;o{class i{constructor(e){var n=this;this.eelDelegate=e,this._hasUnsavedChanges$=new wt(!1),this.resource$=new wt(null),this.error$=new wt(null),this.customActionRunning$=new wt(!1),this.changedDataBlocks={},this.dataBlockChange$=new Re,this.hideHiddenFields$=new wt(!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=wV(r.schema,"is_recursive_ref",!0);for(const[o,a]of s){const l=o.block_class_mro;let c=r.schema,d=c.block_class_mro===l?c:void 0;for(const h of a.slice(0,a.length-1))!d&&c[h]?.block_class_mro===l&&(d=c[h]),c=c[h];c[a[a.length-1]]=d}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,sR.isNumber)(o)?Math.abs(o-a)<1e-10:(0,sR.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)(ee($c))},i.\u0275prov=Ie({token:i,factory:i.\u0275fac,providedIn:"root"}),i})();function tJ(i,t){if(1&i){const e=di();W(0,"div",2)(1,"button",3),Ne("click",function(){return an(e),Ut(he().action())}),Ge(2),Y()()}if(2&i){const e=he();G(2),Xi(" ",e.data.action," ")}}const nJ=["label"];function iJ(i,t){}const rJ=Math.pow(2,31)-1;class oR{constructor(t,e){this._overlayRef=e,this._afterDismissed=new Re,this._afterOpened=new Re,this._onAction=new Re,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,rJ))}_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 MV=new me("MatSnackBarData");class YM{constructor(){this.politeness="assertive",this.announcementMessage="",this.duration=0,this.data=null,this.horizontalPosition="center",this.verticalPosition="bottom"}}let sJ=(()=>{class i{}return i.\u0275fac=function(e){return new(e||i)},i.\u0275dir=ve({type:i,selectors:[["","matSnackBarLabel",""]],hostAttrs:[1,"mat-mdc-snack-bar-label","mdc-snackbar__label"]}),i})(),oJ=(()=>{class i{}return i.\u0275fac=function(e){return new(e||i)},i.\u0275dir=ve({type:i,selectors:[["","matSnackBarActions",""]],hostAttrs:[1,"mat-mdc-snack-bar-actions","mdc-snackbar__actions"]}),i})(),aJ=(()=>{class i{}return i.\u0275fac=function(e){return new(e||i)},i.\u0275dir=ve({type:i,selectors:[["","matSnackBarAction",""]],hostAttrs:[1,"mat-mdc-snack-bar-action","mdc-snackbar__action"]}),i})(),lJ=(()=>{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)(E(oR),E(MV))},i.\u0275cmp=ot({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&&(W(0,"div",0),Ge(1),Y(),fe(2,tJ,3,1,"div",1)),2&e&&(G(1),Xi(" ",n.data.message,"\n"),G(1),U("ngIf",n.hasAction))},dependencies:[Mi,$M,sJ,oJ,aJ],styles:[".mat-mdc-simple-snack-bar{display:flex}"],encapsulation:2,changeDetection:0}),i})();const cJ={snackBarState:Da("state",[Ps("void, hidden",si({transform:"scale(0.8)",opacity:0})),Ps("visible",si({transform:"scale(1)",opacity:1})),Or("* => visible",Yr("150ms cubic-bezier(0, 0, 0.2, 1)")),Or("* => void, * => hidden",Yr("75ms cubic-bezier(0.4, 0.0, 1, 1)",si({opacity:0})))])};let dJ=0,uJ=(()=>{class i extends kM{constructor(e,n,r,s,o){super(),this._ngZone=e,this._elementRef=n,this._changeDetectorRef=r,this._platform=s,this.snackBarConfig=o,this._document=Pt(Wt),this._trackedModals=new Set,this._announceDelay=150,this._destroyed=!1,this._onAnnounce=new Re,this._onExit=new Re,this._onEnter=new Re,this._animationState="void",this._liveElementId="mat-snack-bar-container-live-"+dJ++,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(Oi(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)(E(ht),E(pt),E(ri),E(zi),E(YM))},i.\u0275dir=ve({type:i,viewQuery:function(e,n){if(1&e&&ii(Sm,7),2&e){let r;Tt(r=It())&&(n._portalOutlet=r.first)}},features:[at]}),i})(),hJ=(()=>{class i extends uJ{_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=ni(i)))(n||i)}}(),i.\u0275cmp=ot({type:i,selectors:[["mat-snack-bar-container"]],viewQuery:function(e,n){if(1&e&&ii(nJ,7),2&e){let r;Tt(r=It())&&(n._label=r.first)}},hostAttrs:[1,"mdc-snackbar","mat-mdc-snack-bar-container","mdc-snackbar--open"],hostVars:1,hostBindings:function(e,n){1&e&&P1("@state.done",function(s){return n.onAnimationEnd(s)}),2&e&&Sw("@state",n._animationState)},features:[at],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&&(W(0,"div",0)(1,"div",1,2)(3,"div",3),fe(4,iJ,0,0,"ng-template",4),Y(),Oe(5,"div"),Y()()),2&e&&(G(5),St("aria-live",n._live)("role",n._role)("id",n._liveElementId))},dependencies:[Sm],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:[cJ.snackBarState]}}),i})(),CV=(()=>{class i{}return i.\u0275fac=function(e){return new(e||i)},i.\u0275mod=nn({type:i}),i.\u0275inj=Xt({imports:[Rm,kh,So,jM,Kn,Kn]}),i})();const SV=new me("mat-snack-bar-default-options",{providedIn:"root",factory:function fJ(){return new YM}});let pJ=(()=>{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=$i.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 oR(o,s);if(e instanceof wo){const l=new Cm(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),d=o.attachComponentPortal(c);a.instance=d.instance}return this._breakpointObserver.observe("(max-width: 599.98px) and (orientation: portrait)").pipe(We(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 Im;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 $i.create({parent:e&&e.viewContainerRef&&e.viewContainerRef.injector||this._injector,providers:[{provide:oR,useValue:n},{provide:MV,useValue:e.data}]})}}return i.\u0275fac=function(e){return new(e||i)(ee(as),ee(WI),ee($i),ee(UI),ee(i,12),ee(SV))},i.\u0275prov=Ie({token:i,factory:i.\u0275fac}),i})(),EV=(()=>{class i extends pJ{constructor(e,n,r,s,o,a){super(e,n,r,s,o,a),this.simpleSnackBarComponent=lJ,this.snackBarContainerComponent=hJ,this.handsetCssClass="mat-mdc-snack-bar-handset"}}return i.\u0275fac=function(e){return new(e||i)(ee(as),ee(WI),ee($i),ee(UI),ee(i,12),ee(SV))},i.\u0275prov=Ie({token:i,factory:i.\u0275fac,providedIn:CV}),i})();const mJ=["*",[["mat-toolbar-row"]]],gJ=["*","mat-toolbar-row"],_J=Xy(class{constructor(i){this._elementRef=i}});let vJ=(()=>{class i{}return i.\u0275fac=function(e){return new(e||i)},i.\u0275dir=ve({type:i,selectors:[["mat-toolbar-row"]],hostAttrs:[1,"mat-toolbar-row"],exportAs:["matToolbarRow"]}),i})(),yJ=(()=>{class i extends _J{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)(E(pt),E(zi),E(Wt))},i.\u0275cmp=ot({type:i,selectors:[["mat-toolbar"]],contentQueries:function(e,n,r){if(1&e&&Wi(r,vJ,5),2&e){let s;Tt(s=It())&&(n._toolbarRows=s)}},hostAttrs:[1,"mat-toolbar"],hostVars:4,hostBindings:function(e,n){2&e&&un("mat-toolbar-multiple-rows",n._toolbarRows.length>0)("mat-toolbar-single-row",0===n._toolbarRows.length)},inputs:{color:"color"},exportAs:["matToolbar"],features:[at],ngContentSelectors:gJ,decls:2,vars:0,template:function(e,n){1&e&&(rr(mJ),$t(0),$t(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})(),bJ=(()=>{class i{}return i.\u0275fac=function(e){return new(e||i)},i.\u0275mod=nn({type:i}),i.\u0275inj=Xt({imports:[Kn,Kn]}),i})(),xJ=(()=>{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=ot({type:i,selectors:[["mat-divider"]],hostAttrs:["role","separator",1,"mat-divider"],hostVars:7,hostBindings:function(e,n){2&e&&(St("aria-orientation",n.vertical?"vertical":"horizontal"),un("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})(),AV=(()=>{class i{}return i.\u0275fac=function(e){return new(e||i)},i.\u0275mod=nn({type:i}),i.\u0275inj=Xt({imports:[Kn,Kn]}),i})();const wJ=["tooltip"],DV=new me("mat-tooltip-scroll-strategy"),SJ={provide:DV,deps:[as],useFactory:function CJ(i){return()=>i.scrollStrategies.reposition({scrollThrottle:20})}},AJ=new me("mat-tooltip-default-options",{providedIn:"root",factory:function EJ(){return{showDelay:0,hideDelay:0,touchendHideDelay:1500}}}),TV="tooltip-panel",IV=Th({passive:!0});let PJ=(()=>{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=ks(e)}get hideDelay(){return this._hideDelay}set hideDelay(e){this._hideDelay=ks(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,d,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 Re,this._scrollStrategy=d,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(We(this._destroyed)).subscribe(()=>{this._overlayRef&&this._updatePosition(this._overlayRef)})}ngAfterViewInit(){this._viewInitialized=!0,this._setupPointerEnterEventsIfNeeded(),this._focusMonitor.monitor(this._elementRef).pipe(We(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,IV)}),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(We(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 pt)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(We(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}-${TV}`,scrollStrategy:this._scrollStrategy()}),this._updatePosition(this._overlayRef),this._overlayRef.detachments().pipe(We(this._destroyed)).subscribe(()=>this._detach()),this._overlayRef.outsidePointerEvents().pipe(We(this._destroyed)).subscribe(()=>this._tooltipInstance?._handleBodyInteraction()),this._overlayRef.keydownEvents().pipe(We(this._destroyed)).subscribe(s=>{this._isTooltipVisible()&&27===s.keyCode&&!Yo(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(Oi(1),We(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}-${TV}-`;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,IV)})}_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){bo()},i.\u0275dir=ve({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})(),Os=(()=>{class i extends PJ{constructor(e,n,r,s,o,a,l,c,d,h,p,m){super(e,n,r,s,o,a,l,c,d,h,p,m),this._tooltipComponent=FJ,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)(E(as),E(pt),E(Wy),E(jr),E(ht),E(zi),E(NZ),E(Hc),E(DV),E(Aa,8),E(AJ,8),E(Wt))},i.\u0275dir=ve({type:i,selectors:[["","matTooltip",""]],hostAttrs:[1,"mat-mdc-tooltip-trigger"],exportAs:["matTooltip"],features:[at]}),i})(),OJ=(()=>{class i{constructor(e,n){this._changeDetectorRef=e,this._closeOnInteraction=!1,this._isVisible=!1,this._onHide=new Re,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)(E(ri),E(kr,8))},i.\u0275dir=ve({type:i}),i})(),FJ=(()=>{class i extends OJ{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)(E(ri),E(pt),E(kr,8))},i.\u0275cmp=ot({type:i,selectors:[["mat-tooltip-component"]],viewQuery:function(e,n){if(1&e&&ii(wJ,7),2&e){let r;Tt(r=It())&&(n._tooltip=r.first)}},hostAttrs:["aria-hidden","true"],hostVars:2,hostBindings:function(e,n){1&e&&Ne("mouseleave",function(s){return n._handleMouseLeave(s)}),2&e&&$o("zoom",n.isVisible()?1:null)},features:[at],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&&(W(0,"div",0,1),Ne("animationend",function(s){return n._handleAnimationEnd(s)}),W(2,"div",2),Ge(3),Y()()),2&e&&(un("mdc-tooltip--multiline",n._isMultiline),U("ngClass",n.tooltipClass),G(3),_i(n.message))},dependencies:[dm],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})(),RV=(()=>{class i{}return i.\u0275fac=function(e){return new(e||i)},i.\u0275mod=nn({type:i}),i.\u0275inj=Xt({providers:[SJ],imports:[OU,So,Rm,Kn,Kn,jy]}),i})();function kV(...i){const t=_0(i),{args:e,keys:n}=LB(i),r=new Tn(s=>{const{length:o}=e;if(!o)return void s.complete();const a=new Array(o);let l=o,c=o;for(let d=0;d{h||(h=!0,c--),a[d]=p},()=>l--,void 0,()=>{(!l||!h)&&(c||s.next(n?NB(n,a):a),s.complete())}))}});return t?r.pipe(XT(t)):r}class aR{}class cu{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 cu?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 cu;return e.lazyInit=this.lazyInit&&this.lazyInit instanceof cu?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 LJ{encodeKey(t){return OV(t)}encodeValue(t){return OV(t)}decodeKey(t){return decodeURIComponent(t)}decodeValue(t){return decodeURIComponent(t)}}const BJ=/%(\d[a-f0-9])/gi,UJ={40:"@","3A":":",24:"$","2C":",","3B":";","3D":"=","3F":"?","2F":"/"};function OV(i){return encodeURIComponent(i).replace(BJ,(t,e)=>UJ[e]??t)}function qM(i){return`${i}`}class du{constructor(t={}){if(this.updates=null,this.cloneFrom=null,this.encoder=t.encoder||new LJ,t.fromString){if(t.fromObject)throw new Error("Cannot specify both fromString and fromObject.");this.map=function NJ(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 du({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 VJ{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 FV(i){return typeof ArrayBuffer<"u"&&i instanceof ArrayBuffer}function LV(i){return typeof Blob<"u"&&i instanceof Blob}function NV(i){return typeof FormData<"u"&&i instanceof FormData}class eb{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 zJ(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 cu),this.context||(this.context=new VJ),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 eb(e,n,s,{params:c,headers:l,context:d,reportProgress:a,responseType:r,withCredentials:o})}}var ls=(()=>((ls=ls||{})[ls.Sent=0]="Sent",ls[ls.UploadProgress=1]="UploadProgress",ls[ls.ResponseHeader=2]="ResponseHeader",ls[ls.DownloadProgress=3]="DownloadProgress",ls[ls.Response=4]="Response",ls[ls.User=5]="User",ls))();class GJ{constructor(t,e=200,n="OK"){this.headers=t.headers||new cu,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 lR extends GJ{constructor(t={}){super(t),this.type=ls.Response,this.body=void 0!==t.body?t.body:null}clone(t={}){return new lR({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 cR(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 dR=(()=>{class i{constructor(e){this.handler=e}request(e,n,r={}){let s;if(e instanceof eb)s=e;else{let l,c;l=r.headers instanceof cu?r.headers:new cu(r.headers),r.params&&(c=r.params instanceof du?r.params:new du({fromObject:r.params})),s=new eb(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=ut(s).pipe(nu(l=>this.handler.handle(l)));if(e instanceof eb||"events"===r.observe)return o;const a=o.pipe(vn(l=>l instanceof lR));switch(r.observe||"body"){case"body":switch(s.responseType){case"arraybuffer":return a.pipe(et(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(et(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(et(l=>{if(null!==l.body&&"string"!=typeof l.body)throw new Error("Response is not a string.");return l.body}));default:return a.pipe(et(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 du).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,cR(r,n))}post(e,n,r={}){return this.request("POST",e,cR(r,n))}put(e,n,r={}){return this.request("PUT",e,cR(r,n))}}return i.\u0275fac=function(e){return new(e||i)(ee(aR))},i.\u0275prov=Ie({token:i,factory:i.\u0275fac}),i})();const nee=["*"];let KM;function tb(i){return function iee(){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 WV(i){return Error(`Unable to find icon with the name "${i}"`)}function jV(i){return Error(`The URL provided to MatIconRegistry was not trusted as a resource URL via Angular's DomSanitizer. Attempted URL was "${i}".`)}function YV(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(Xn.HTML,r);if(!o)throw YV(r);const a=tb(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(Xn.HTML,n);if(!s)throw YV(n);const o=tb(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(Xn.RESOURCE_URL,e);if(!n)throw jV(e);const r=this._cachedIconsByUrl.get(n);return r?ut(QM(r)):this._loadSvgIconFromConfig(new Fh(e,null)).pipe(Vi(s=>this._cachedIconsByUrl.set(n,s)),et(s=>QM(s)))}getNamedSvgIcon(e,n=""){const r=qV(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):hm(WV(r))}ngOnDestroy(){this._resolvers=[],this._svgIconConfigs.clear(),this._iconSetConfigs.clear(),this._cachedIconsByUrl.clear()}_getSvgFromConfig(e){return e.svgText?ut(QM(this._svgElementFromConfig(e))):this._loadSvgIconFromConfig(e).pipe(et(n=>QM(n)))}_getSvgFromIconSetConfigs(e,n){const r=this._extractIconWithNameFromAnySet(e,n);return r?ut(r):kV(n.filter(o=>!o.svgText).map(o=>this._loadSvgIconSetFromConfig(o).pipe(Nc(a=>{const c=`Loading icon set URL: ${this._sanitizer.sanitize(Xn.RESOURCE_URL,o.url)} failed: ${a.message}`;return this._errorHandler.handleError(new Error(c)),ut(null)})))).pipe(et(()=>{const o=this._extractIconWithNameFromAnySet(e,n);if(!o)throw WV(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(Vi(n=>e.svgText=n),et(()=>this._svgElementFromConfig(e)))}_loadSvgIconSetFromConfig(e){return e.svgText?ut(null):this._fetchIcon(e).pipe(Vi(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(tb(""));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(tb("")),r=e.attributes;for(let s=0;stb(c)),iu(()=>this._inProgressUrlFetches.delete(o)),Nf());return this._inProgressUrlFetches.set(o,l),l}_addSvgIconConfig(e,n,r){return this._svgIconConfigs.set(qV(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:""}}}),XV=["clip-path","color-profile","src","cursor","fill","filter","marker","marker-start","marker-mid","marker-end","mask","stroke"],uee=XV.map(i=>`[${i}]`).join(", "),hee=/^url\(['"]?#(.*?)['"]?\)$/;let hR=(()=>{class i extends aee{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=Zt.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(uee),r=this._elementsWithExternalReferences=this._elementsWithExternalReferences||new Map;for(let s=0;s{const a=n[s],l=a.getAttribute(o),c=l?l.match(hee):null;if(c){let d=r.get(a);d||(d=[],r.set(a,d)),d.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(Oi(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)(E(pt),E(ZM),_a("aria-hidden"),E(cee),E(nl),E(lee,8))},i.\u0275cmp=ot({type:i,selectors:[["mat-icon"]],hostAttrs:["role","img",1,"mat-icon","notranslate"],hostVars:8,hostBindings:function(e,n){2&e&&(St("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),un("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:[at],ngContentSelectors:nee,decls:1,vars:0,template:function(e,n){1&e&&(rr(),$t(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})(),KV=(()=>{class i{}return i.\u0275fac=function(e){return new(e||i)},i.\u0275mod=nn({type:i}),i.\u0275inj=Xt({imports:[Kn,Kn]}),i})(),ZV=(()=>{class i{constructor(e){this.viewContainerRef=e}}return i.\u0275fac=function(e){return new(e||i)(E(jr))},i.\u0275dir=ve({type:i,selectors:[["","dataBlockUI",""]]}),i})(),fee=(()=>{class i{constructor(){this.resource=null,this.name="",this.resourceDescription="",this.changed=new $e}}return i.\u0275fac=function(e){return new(e||i)},i.\u0275cmp=ot({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&&(W(0,"p",0),Ge(1),Y()),2&e&&(U("matTooltip",n.resourceDescription),G(1),Jp("",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:[Os],changeDetection:0}),i})();function pee(i,t){if(1&i&&(W(0,"h2",4),Ge(1),Y()),2&i){const e=he();U("matTooltip",e.resourceDescription),G(1),_i(e.name)}}function mee(i,t){1&i&&Oe(0,"app-block-actions",5),2&i&&U("resource",he().resource)}const gee=function(i,t,e,n){return{id:i,name:t,data:e,schema:n}};function _ee(i,t){if(1&i&&Oe(0,"app-editor",7),2&i){const e=he().$implicit,n=he();U("resource",k2(3,gee,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 vee(i,t){if(1&i&&($r(0),fe(1,_ee,1,8,"app-editor",6),Ht(2,"async"),Wr()),2&i){const e=t.$implicit,n=he();G(1),U("ngIf",!(Kt(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 Wc=(()=>{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 $e,this.destroyed$=new Re}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(We(this.destroyed$),vn(([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)(E(cl))},i.\u0275cmp=ot({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&&(fe(0,pee,2,2,"h2",0),Ht(1,"async"),fe(2,mee,1,1,"app-block-actions",1),W(3,"div",2),fe(4,vee,3,3,"ng-container",3),Y()),2&e){let r;U("ngIf",n.name&&n.name!=(null==(r=Kt(1,4,n.main.resource$))?null:r.name)),G(2),U("ngIf",!n.hideBlockActions),G(2),U("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})(),QV=(()=>{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)(E(tl),E(pt))},i.\u0275dir=ve({type:i}),i})(),Lh=(()=>{class i extends QV{}return i.\u0275fac=function(){let t;return function(n){return(t||(t=ni(i)))(n||i)}}(),i.\u0275dir=ve({type:i,features:[at]}),i})();const Do=new me("NgValueAccessor"),bee={provide:Do,useExisting:Gn(()=>Wl),multi:!0},wee=new me("CompositionEventMode");let Wl=(()=>{class i extends QV{constructor(e,n,r){super(e,n),this._compositionMode=r,this._composing=!1,null==this._compositionMode&&(this._compositionMode=!function xee(){const i=Oc()?Oc().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)(E(tl),E(pt),E(wee,8))},i.\u0275dir=ve({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&&Ne("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([bee]),at]}),i})();const Mee=!1;function uu(i){return null==i||("string"==typeof i||Array.isArray(i))&&0===i.length}function ez(i){return null!=i&&"number"==typeof i.length}const qr=new me("NgValidators"),hu=new me("NgAsyncValidators"),Cee=/^(?=.{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 dl{static min(t){return tz(t)}static max(t){return nz(t)}static required(t){return function iz(i){return uu(i.value)?{required:!0}:null}(t)}static requiredTrue(t){return function rz(i){return!0===i.value?null:{required:!0}}(t)}static email(t){return function sz(i){return uu(i.value)||Cee.test(i.value)?null:{email:!0}}(t)}static minLength(t){return oz(t)}static maxLength(t){return az(t)}static pattern(t){return function lz(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(uu(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 pz(t)}static composeAsync(t){return mz(t)}}function tz(i){return t=>{if(uu(t.value)||uu(i))return null;const e=parseFloat(t.value);return!isNaN(e)&&e{if(uu(t.value)||uu(i))return null;const e=parseFloat(t.value);return!isNaN(e)&&e>i?{max:{max:i,actual:t.value}}:null}}function oz(i){return t=>uu(t.value)||!ez(t.value)?null:t.value.lengthez(t.value)&&t.value.length>i?{maxlength:{requiredLength:i,actualLength:t.value.length}}:null}function JM(i){return null}function cz(i){return null!=i}function dz(i){const t=iy(i)?Ni(i):i;if(Mee&&!k1(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 pe(-1101,e)}return t}function uz(i){let t={};return i.forEach(e=>{t=null!=e?{...t,...e}:t}),0===Object.keys(t).length?null:t}function hz(i,t){return t.map(e=>e(i))}function fz(i){return i.map(t=>function See(i){return!i.validate}(t)?t:e=>t.validate(e))}function pz(i){if(!i)return null;const t=i.filter(cz);return 0==t.length?null:function(e){return uz(hz(e,t))}}function fR(i){return null!=i?pz(fz(i)):null}function mz(i){if(!i)return null;const t=i.filter(cz);return 0==t.length?null:function(e){return kV(hz(e,t).map(dz)).pipe(et(uz))}}function pR(i){return null!=i?mz(fz(i)):null}function gz(i,t){return null===i?[t]:Array.isArray(i)?[...i,t]:[i,t]}function _z(i){return i._rawValidators}function vz(i){return i._rawAsyncValidators}function mR(i){return i?Array.isArray(i)?i:[i]:[]}function eC(i,t){return Array.isArray(i)?i.includes(t):i===t}function yz(i,t){const e=mR(t);return mR(i).forEach(r=>{eC(e,r)||e.push(r)}),e}function bz(i,t){return mR(t).filter(e=>!eC(i,e))}class xz{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=fR(this._rawValidators)}_setAsyncValidators(t){this._rawAsyncValidators=t||[],this._composedAsyncValidatorFn=pR(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 oo extends xz{get formDirective(){return null}get path(){return null}}class jl extends xz{constructor(){super(...arguments),this._parent=null,this.name=null,this.valueAccessor=null}}class wz{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 jc=(()=>{class i extends wz{constructor(e){super(e)}}return i.\u0275fac=function(e){return new(e||i)(E(jl,2))},i.\u0275dir=ve({type:i,selectors:[["","formControlName",""],["","ngModel",""],["","formControl",""]],hostVars:14,hostBindings:function(e,n){2&e&&un("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:[at]}),i})(),gR=(()=>{class i extends wz{constructor(e){super(e)}}return i.\u0275fac=function(e){return new(e||i)(E(oo,10))},i.\u0275dir=ve({type:i,selectors:[["","formGroupName",""],["","formArrayName",""],["","ngModelGroup",""],["","formGroup",""],["form",3,"ngNoForm",""],["","ngForm",""]],hostVars:16,hostBindings:function(e,n){2&e&&un("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:[at]}),i})();function Mz(i,t){return i?`with name: '${t}'`:`at index: ${t}`}const yR=!1,nb="VALID",nC="INVALID",Um="PENDING",ib="DISABLED";function bR(i){return(iC(i)?i.validators:i)||null}function xR(i,t){return(iC(t)?t.asyncValidators:i)||null}function iC(i){return null!=i&&!Array.isArray(i)&&"object"==typeof i}function Cz(i,t,e){const n=i.controls;if(!(t?Object.keys(n):n).length)throw new pe(1e3,yR?function Tee(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 pe(1001,yR?function Iee(i,t){return`Cannot find form control ${Mz(i,t)}`}(t,e):"")}function Sz(i,t,e){i._forEachChild((n,r)=>{if(void 0===e[r])throw new pe(1002,yR?function Ree(i,t){return`Must supply a value for form control ${Mz(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===nb}get invalid(){return this.status===nC}get pending(){return this.status==Um}get disabled(){return this.status===ib}get enabled(){return this.status!==ib}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(yz(t,this._rawValidators))}addAsyncValidators(t){this.setAsyncValidators(yz(t,this._rawAsyncValidators))}removeValidators(t){this.setValidators(bz(t,this._rawValidators))}removeAsyncValidators(t){this.setAsyncValidators(bz(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=Um,!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=ib,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=nb,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===nb||this.status===Um)&&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()?ib:nb}_runValidator(){return this.validator?this.validator(this):null}_runAsyncValidator(t){if(this.asyncValidator){this.status=Um,this._hasOwnPendingAsyncValidator=!0;const e=dz(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 $e,this.statusChanges=new $e}_calculateStatus(){return this._allControlsDisabled()?ib:this.errors?nC:this._hasOwnPendingAsyncValidator||this._anyControlsHaveStatus(Um)?Um:this._anyControlsHaveStatus(nC)?nC:nb}_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 kee(i){return Array.isArray(i)?fR(i):i||null}(this._rawValidators)}_assignAsyncValidators(t){this._rawAsyncValidators=Array.isArray(t)?t.slice():t,this._composedAsyncValidatorFn=function Pee(i){return Array.isArray(i)?pR(i):i||null}(this._rawAsyncValidators)}}class Vm extends rC{constructor(t,e,n){super(bR(e),xR(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={}){Sz(this,!0,t),Object.keys(t).forEach(n=>{Cz(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 Ez extends Vm{}const Nh=new me("CallSetDisabledState",{providedIn:"root",factory:()=>rb}),rb="always";function sC(i,t){return[...t.path,i]}function sb(i,t,e=rb){wR(i,t),t.valueAccessor.writeValue(i.value),(i.disabled||"always"===e)&&t.valueAccessor.setDisabledState?.(i.disabled),function Fee(i,t){t.valueAccessor.registerOnChange(e=>{i._pendingValue=e,i._pendingChange=!0,i._pendingDirty=!0,"change"===i.updateOn&&Az(i,t)})}(i,t),function Nee(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 Lee(i,t){t.valueAccessor.registerOnTouched(()=>{i._pendingTouched=!0,"blur"===i.updateOn&&i._pendingChange&&Az(i,t),"submit"!==i.updateOn&&i.markAsTouched()})}(i,t),function Oee(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 wR(i,t){const e=_z(i);null!==t.validator?i.setValidators(gz(e,t.validator)):"function"==typeof e&&i.setValidators([e]);const n=vz(i);null!==t.asyncValidator?i.setAsyncValidators(gz(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=_z(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=vz(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 Az(i,t){i._pendingDirty&&i.markAsDirty(),i.setValue(i._pendingValue,{emitModelToViewChange:!1}),t.viewToModelUpdate(i._pendingValue),i._pendingChange=!1}function Dz(i,t){wR(i,t)}function CR(i,t){if(!i.hasOwnProperty("model"))return!1;const e=i.model;return!!e.isFirstChange()||!Object.is(t,e.currentValue)}function Tz(i,t){i._syncPendingControls(),t.forEach(e=>{const n=e.control;"submit"===n.updateOn&&n._pendingChange&&(e.viewToModelUpdate(n._pendingValue),n._pendingChange=!1)})}function SR(i,t){if(!t)return null;let e,n,r;return Array.isArray(t),t.forEach(s=>{s.constructor===Wl?e=s:function Vee(i){return Object.getPrototypeOf(i.constructor)===Lh}(s)?n=s:r=s}),r||n||e||null}const Hee={provide:oo,useExisting:Gn(()=>ab)},ob=(()=>Promise.resolve())();let ab=(()=>{class i extends oo{constructor(e,n,r){super(),this.callSetDisabledState=r,this.submitted=!1,this._directives=new Set,this.ngSubmit=new $e,this.form=new Vm({},fR(e),pR(n))}ngAfterViewInit(){this._setUpdateStrategy()}get formDirective(){return this}get control(){return this.form}get path(){return[]}get controls(){return this.form.controls}addControl(e){ob.then(()=>{const n=this._findContainer(e.path);e.control=n.registerControl(e.name,e.control),sb(e.control,e,this.callSetDisabledState),e.control.updateValueAndValidity({emitEvent:!1}),this._directives.add(e)})}getControl(e){return this.form.get(e.path)}removeControl(e){ob.then(()=>{const n=this._findContainer(e.path);n&&n.removeControl(e.name),this._directives.delete(e)})}addFormGroup(e){ob.then(()=>{const n=this._findContainer(e.path),r=new Vm({});Dz(r,e),n.registerControl(e.name,r),r.updateValueAndValidity({emitEvent:!1})})}removeFormGroup(e){ob.then(()=>{const n=this._findContainer(e.path);n&&n.removeControl(e.name)})}getFormGroup(e){return this.form.get(e.path)}updateModel(e,n){ob.then(()=>{this.form.get(e.path).setValue(n)})}setValue(e){this.control.setValue(e)}onSubmit(e){return this.submitted=!0,Tz(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)(E(qr,10),E(hu,10),E(Nh,8))},i.\u0275dir=ve({type:i,selectors:[["form",3,"ngNoForm","",3,"formGroup",""],["ng-form"],["","ngForm",""]],hostBindings:function(e,n){1&e&&Ne("submit",function(s){return n.onSubmit(s)})("reset",function(){return n.onReset()})},inputs:{options:["ngFormOptions","options"]},outputs:{ngSubmit:"ngSubmit"},exportAs:["ngForm"],features:[An([Hee]),at]}),i})();function Iz(i,t){const e=i.indexOf(t);e>-1&&i.splice(e,1)}function Rz(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(bR(e),xR(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=Rz(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){Iz(this._onChange,t)}registerOnDisabledChange(t){this._onDisabledChange.push(t)}_unregisterOnDisabledChange(t){Iz(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){Rz(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}},Wee={provide:jl,useExisting:Gn(()=>fu)},Oz=(()=>Promise.resolve())();let fu=(()=>{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 $e,this._parent=e,this._setValidators(n),this._setAsyncValidators(r),this.valueAccessor=SR(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),CR(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(){sb(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){Oz.then(()=>{this.control.setValue(e,{emitViewToModelChange:!1}),this._changeDetectorRef?.markForCheck()})}_updateDisabled(e){const n=e.isDisabled.currentValue,r=0!==n&&function cm(i){return"boolean"==typeof i?i:null!=i&&"false"!==i}(n);Oz.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)(E(oo,9),E(qr,10),E(hu,10),E(Do,10),E(ri,8),E(Nh,8))},i.\u0275dir=ve({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([Wee]),at,bi]}),i})(),ER=(()=>{class i{}return i.\u0275fac=function(e){return new(e||i)},i.\u0275dir=ve({type:i,selectors:[["form",3,"ngNoForm","",3,"ngNativeValidate",""]],hostAttrs:["novalidate",""]}),i})();const jee={provide:Do,useExisting:Gn(()=>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=ni(i)))(n||i)}}(),i.\u0275dir=ve({type:i,selectors:[["input","type","number","formControlName",""],["input","type","number","formControl",""],["input","type","number","ngModel",""]],hostBindings:function(e,n){1&e&&Ne("input",function(s){return n.onChange(s.target.value)})("blur",function(){return n.onTouched()})},features:[An([jee]),at]}),i})(),Fz=(()=>{class i{}return i.\u0275fac=function(e){return new(e||i)},i.\u0275mod=nn({type:i}),i.\u0275inj=Xt({}),i})();const AR=new me("NgModelWithFormControlWarning"),Zee={provide:oo,useExisting:Gn(()=>Uh)};let Uh=(()=>{class i extends oo{constructor(e,n,r){super(),this.callSetDisabledState=r,this.submitted=!1,this._onCollectionChange=()=>this._updateDomValue(),this.directives=[],this.form=null,this.ngSubmit=new $e,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 sb(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 zee(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,Tz(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)&&(sb(r,e,this.callSetDisabledState),e.control=r))}),this.form._updateTreeValidity({emitEvent:!1})}_setUpFormContainer(e){const n=this.form.get(e.path);Dz(n,e),n.updateValueAndValidity({emitEvent:!1})}_cleanUpFormContainer(e){if(this.form){const n=this.form.get(e.path);n&&function Bee(i,t){return lC(i,t)}(n,e)&&n.updateValueAndValidity({emitEvent:!1})}}_updateRegistrations(){this.form._registerOnCollectionChange(this._onCollectionChange),this._oldForm&&this._oldForm._registerOnCollectionChange(()=>{})}_updateValidators(){wR(this.form,this),this._oldForm&&lC(this._oldForm,this)}_checkFormPresent(){}}return i.\u0275fac=function(e){return new(e||i)(E(qr,10),E(hu,10),E(Nh,8))},i.\u0275dir=ve({type:i,selectors:[["","formGroup",""]],hostBindings:function(e,n){1&e&&Ne("submit",function(s){return n.onSubmit(s)})("reset",function(){return n.onReset()})},inputs:{form:["formGroup","form"]},outputs:{ngSubmit:"ngSubmit"},exportAs:["ngForm"],features:[An([Zee]),at,bi]}),i})();const ete={provide:jl,useExisting:Gn(()=>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 $e,this._ngModelWarningSent=!1,this._parent=e,this._setValidators(n),this._setAsyncValidators(r),this.valueAccessor=SR(0,s)}ngOnChanges(e){this._added||this._setUpControl(),CR(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)(E(oo,13),E(qr,10),E(hu,10),E(Do,10),E(AR,8))},i.\u0275dir=ve({type:i,selectors:[["","formControlName",""]],inputs:{name:["formControlName","name"],isDisabled:["disabled","isDisabled"],model:["ngModel","model"]},outputs:{update:"ngModelChange"},features:[An([ete]),at,bi]}),i})();function Hz(i){return"number"==typeof i?i:parseInt(i,10)}function Gz(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=ve({type:i,features:[bi]}),i})();const ate={provide:qr,useExisting:Gn(()=>zh),multi:!0};let zh=(()=>{class i extends Vh{constructor(){super(...arguments),this.inputName="max",this.normalizeInput=e=>Gz(e),this.createValidator=e=>nz(e)}}return i.\u0275fac=function(){let t;return function(n){return(t||(t=ni(i)))(n||i)}}(),i.\u0275dir=ve({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&&St("max",n._enabled?n.max:null)},inputs:{max:"max"},features:[An([ate]),at]}),i})();const lte={provide:qr,useExisting:Gn(()=>Hh),multi:!0};let Hh=(()=>{class i extends Vh{constructor(){super(...arguments),this.inputName="min",this.normalizeInput=e=>Gz(e),this.createValidator=e=>tz(e)}}return i.\u0275fac=function(){let t;return function(n){return(t||(t=ni(i)))(n||i)}}(),i.\u0275dir=ve({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&&St("min",n._enabled?n.min:null)},inputs:{min:"min"},features:[An([lte]),at]}),i})();const hte={provide:qr,useExisting:Gn(()=>PR),multi:!0};let PR=(()=>{class i extends Vh{constructor(){super(...arguments),this.inputName="minlength",this.normalizeInput=e=>Hz(e),this.createValidator=e=>oz(e)}}return i.\u0275fac=function(){let t;return function(n){return(t||(t=ni(i)))(n||i)}}(),i.\u0275dir=ve({type:i,selectors:[["","minlength","","formControlName",""],["","minlength","","formControl",""],["","minlength","","ngModel",""]],hostVars:1,hostBindings:function(e,n){2&e&&St("minlength",n._enabled?n.minlength:null)},inputs:{minlength:"minlength"},features:[An([hte]),at]}),i})();const fte={provide:qr,useExisting:Gn(()=>OR),multi:!0};let OR=(()=>{class i extends Vh{constructor(){super(...arguments),this.inputName="maxlength",this.normalizeInput=e=>Hz(e),this.createValidator=e=>az(e)}}return i.\u0275fac=function(){let t;return function(n){return(t||(t=ni(i)))(n||i)}}(),i.\u0275dir=ve({type:i,selectors:[["","maxlength","","formControlName",""],["","maxlength","","formControl",""],["","maxlength","","ngModel",""]],hostVars:1,hostBindings:function(e,n){2&e&&St("maxlength",n._enabled?n.maxlength:null)},inputs:{maxlength:"maxlength"},features:[An([fte]),at]}),i})(),Yz=(()=>{class i{}return i.\u0275fac=function(e){return new(e||i)},i.\u0275mod=nn({type:i}),i.\u0275inj=Xt({imports:[Fz]}),i})();class qz extends rC{constructor(t,e,n){super(bR(e),xR(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={}){Sz(this,!1,t),t.forEach((n,r)=>{Cz(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 Xz(i){return!!i&&(void 0!==i.asyncValidators||void 0!==i.validators||void 0!==i.updateOn)}let mte=(()=>{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 Xz(n)?s=n:null!==n&&(s.validators=n.validator,s.asyncValidators=n.asyncValidator),new Vm(r,s)}record(e,n=null){const r=this._reduceControls(e);return new Ez(r,n)}control(e,n,r){let s={};return this.useNonNullable?(Xz(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 qz(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})(),Kz=(()=>{class i{static withConfig(e){return{ngModule:i,providers:[{provide:Nh,useValue:e.callSetDisabledState??rb}]}}}return i.\u0275fac=function(e){return new(e||i)},i.\u0275mod=nn({type:i}),i.\u0275inj=Xt({imports:[Yz]}),i})(),Zz=(()=>{class i{static withConfig(e){return{ngModule:i,providers:[{provide:AR,useValue:e.warnOnNgModelWithFormControl??"always"},{provide:Nh,useValue:e.callSetDisabledState??rb}]}}}return i.\u0275fac=function(e){return new(e||i)},i.\u0275mod=nn({type:i}),i.\u0275inj=Xt({imports:[Yz]}),i})();const gte=["matFormFieldNotchedOutline",""],_te=["*"],vte=["textField"],yte=["iconPrefixContainer"],bte=["textPrefixContainer"];function xte(i,t){1&i&&Oe(0,"span",19)}function wte(i,t){if(1&i){const e=di();W(0,"label",17),Ne("cdkObserveContent",function(){return an(e),Ut(he(2)._refreshOutlineNotchWidth())}),$t(1,1),fe(2,xte,1,0,"span",18),Y()}if(2&i){const e=he(2);U("floating",e._shouldLabelFloat())("cdkObserveContentDisabled",!e._hasOutline())("id",e._labelId),St("for",e._control.id)("aria-owns",e._control.id),G(2),U("ngIf",!e.hideRequiredMarker&&e._control.required)}}function Mte(i,t){1&i&&fe(0,wte,3,6,"label",16),2&i&&U("ngIf",he()._hasFloatingLabel())}function Cte(i,t){1&i&&Oe(0,"div",20)}function Ste(i,t){}function Ete(i,t){1&i&&fe(0,Ste,0,0,"ng-template",22),2&i&&(he(2),U("ngTemplateOutlet",ir(1)))}function Ate(i,t){if(1&i&&(W(0,"div",21),fe(1,Ete,1,1,"ng-template",9),Y()),2&i){const e=he();U("matFormFieldNotchedOutlineOpen",e._shouldLabelFloat())("matFormFieldNotchedOutlineLabelWidth",e._labelWidth),G(1),U("ngIf",!e._forceDisplayInfixLabel())}}function Dte(i,t){1&i&&(W(0,"div",23,24),$t(2,2),Y())}function Tte(i,t){1&i&&(W(0,"div",25,26),$t(2,3),Y())}function Ite(i,t){}function Rte(i,t){1&i&&fe(0,Ite,0,0,"ng-template",22),2&i&&(he(),U("ngTemplateOutlet",ir(1)))}function kte(i,t){1&i&&(W(0,"div",27),$t(1,4),Y())}function Pte(i,t){1&i&&(W(0,"div",28),$t(1,5),Y())}function Ote(i,t){1&i&&Oe(0,"div",29)}function Fte(i,t){1&i&&(W(0,"div",30),$t(1,6),Y()),2&i&&U("@transitionMessages",he()._subscriptAnimationState)}function Lte(i,t){if(1&i&&(W(0,"mat-hint",34),Ge(1),Y()),2&i){const e=he(2);U("id",e._hintLabelId),G(1),_i(e.hintLabel)}}function Nte(i,t){if(1&i&&(W(0,"div",31),fe(1,Lte,2,2,"mat-hint",32),$t(2,7),Oe(3,"div",33),$t(4,8),Y()),2&i){const e=he();U("@transitionMessages",e._subscriptAnimationState),G(1),U("ngIf",e.hintLabel)}}const Bte=["*",[["mat-label"]],[["","matPrefix",""],["","matIconPrefix",""]],[["","matTextPrefix",""]],[["","matTextSuffix",""]],[["","matSuffix",""],["","matIconSuffix",""]],[["mat-error"],["","matError",""]],[["mat-hint",3,"align","end"]],[["mat-hint","align","end"]]],Ute=["*","mat-label","[matPrefix], [matIconPrefix]","[matTextPrefix]","[matTextSuffix]","[matSuffix], [matIconSuffix]","mat-error, [matError]","mat-hint:not([align='end'])","mat-hint[align='end']"];let qo=(()=>{class i{}return i.\u0275fac=function(e){return new(e||i)},i.\u0275dir=ve({type:i,selectors:[["mat-label"]]}),i})(),Vte=0;const Qz=new me("MatError");let zte=(()=>{class i{constructor(e,n){this.id="mat-mdc-error-"+Vte++,e||n.nativeElement.setAttribute("aria-live","polite")}}return i.\u0275fac=function(e){return new(e||i)(_a("aria-live"),E(pt))},i.\u0275dir=ve({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&&Ul("id",n.id)},inputs:{id:"id"},features:[An([{provide:Qz,useExisting:i}])]}),i})(),Hte=0,Jz=(()=>{class i{constructor(){this.align="start",this.id="mat-mdc-hint-"+Hte++}}return i.\u0275fac=function(e){return new(e||i)},i.\u0275dir=ve({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&&(Ul("id",n.id),St("align",null),un("mat-mdc-form-field-hint-end","end"===n.align))},inputs:{align:"align",id:"id"}}),i})();const eH=new me("MatPrefix");let Gte=(()=>{class i{constructor(){this._isText=!1}set _isTextSelector(e){this._isText=!0}}return i.\u0275fac=function(e){return new(e||i)},i.\u0275dir=ve({type:i,selectors:[["","matPrefix",""],["","matIconPrefix",""],["","matTextPrefix",""]],inputs:{_isTextSelector:["matTextPrefix","_isTextSelector"]},features:[An([{provide:eH,useExisting:i}])]}),i})();const tH=new me("MatSuffix");let $te=(()=>{class i{constructor(){this._isText=!1}set _isTextSelector(e){this._isText=!0}}return i.\u0275fac=function(e){return new(e||i)},i.\u0275dir=ve({type:i,selectors:[["","matSuffix",""],["","matIconSuffix",""],["","matTextSuffix",""]],inputs:{_isTextSelector:["matTextSuffix","_isTextSelector"]},features:[An([{provide:tH,useExisting:i}])]}),i})(),nH=(()=>{class i{constructor(e){this._elementRef=e,this.floating=!1}getWidth(){return function Wte(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)(E(pt))},i.\u0275dir=ve({type:i,selectors:[["label","matFormFieldFloatingLabel",""]],hostAttrs:[1,"mdc-floating-label","mat-mdc-floating-label"],hostVars:2,hostBindings:function(e,n){2&e&&un("mdc-floating-label--float-above",n.floating)},inputs:{floating:"floating"}}),i})();const iH="mdc-line-ripple--active",dC="mdc-line-ripple--deactivating";let rH=(()=>{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(iH,dC)},n.runOutsideAngular(()=>{e.nativeElement.addEventListener("transitionend",this._handleTransitionEnd)})}activate(){const e=this._elementRef.nativeElement.classList;e.remove(dC),e.add(iH)}deactivate(){this._elementRef.nativeElement.classList.add(dC)}ngOnDestroy(){this._elementRef.nativeElement.removeEventListener("transitionend",this._handleTransitionEnd)}}return i.\u0275fac=function(e){return new(e||i)(E(pt),E(ht))},i.\u0275dir=ve({type:i,selectors:[["div","matFormFieldLineRipple",""]],hostAttrs:[1,"mdc-line-ripple"]}),i})(),sH=(()=>{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)(E(pt),E(ht))},i.\u0275cmp=ot({type:i,selectors:[["div","matFormFieldNotchedOutline",""]],hostAttrs:[1,"mdc-notched-outline"],hostVars:2,hostBindings:function(e,n){2&e&&un("mdc-notched-outline--notched",n.open)},inputs:{labelWidth:["matFormFieldNotchedOutlineLabelWidth","labelWidth"],open:["matFormFieldNotchedOutlineOpen","open"]},attrs:gte,ngContentSelectors:_te,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&&(rr(),Oe(0,"div",0),W(1,"div",1),$t(2),Y(),Oe(3,"div",2)),2&e&&(G(1),$o("width",n._getNotchWidth()))},encapsulation:2,changeDetection:0}),i})();const jte={transitionMessages:Da("transitionMessages",[Ps("enter",si({opacity:1,transform:"translateY(0%)"})),Or("void => enter",[si({opacity:0,transform:"translateY(-5px)"}),Yr("300ms cubic-bezier(0.55, 0, 0.55, 0.2)")])])};let FR=(()=>{class i{}return i.\u0275fac=function(e){return new(e||i)},i.\u0275dir=ve({type:i}),i})();const uC=new me("MatFormField"),Yte=new me("MAT_FORM_FIELD_DEFAULT_OPTIONS");let oH=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-"+oH++,this._hintLabelId="mat-mdc-hint-"+oH++,this._subscriptAnimationState="",this._labelWidth=0,this._destroyed=new Re,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(We(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(),Cr(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(We(this._destroyed)).subscribe(()=>{this._needsOutlineLabelOffsetUpdateOnStable&&(this._needsOutlineLabelOffsetUpdateOnStable=!1,this._updateOutlineLabelOffset())})}),this._dir.change.pipe(We(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)(E(pt),E(ri),E(ht),E(Aa),E(zi),E(Yte,8),E(kr,8),E(Wt))},i.\u0275cmp=ot({type:i,selectors:[["mat-form-field"]],contentQueries:function(e,n,r){if(1&e&&(Wi(r,qo,5),Wi(r,qo,7),Wi(r,FR,5),Wi(r,eH,5),Wi(r,tH,5),Wi(r,Qz,5),Wi(r,Jz,5)),2&e){let s;Tt(s=It())&&(n._labelChildNonStatic=s.first),Tt(s=It())&&(n._labelChildStatic=s.first),Tt(s=It())&&(n._formFieldControl=s.first),Tt(s=It())&&(n._prefixChildren=s),Tt(s=It())&&(n._suffixChildren=s),Tt(s=It())&&(n._errorChildren=s),Tt(s=It())&&(n._hintChildren=s)}},viewQuery:function(e,n){if(1&e&&(ii(vte,5),ii(yte,5),ii(bte,5),ii(nH,5),ii(sH,5),ii(rH,5)),2&e){let r;Tt(r=It())&&(n._textField=r.first),Tt(r=It())&&(n._iconPrefixContainer=r.first),Tt(r=It())&&(n._textPrefixContainer=r.first),Tt(r=It())&&(n._floatingLabel=r.first),Tt(r=It())&&(n._notchedOutline=r.first),Tt(r=It())&&(n._lineRipple=r.first)}},hostAttrs:[1,"mat-mdc-form-field"],hostVars:42,hostBindings:function(e,n){2&e&&un("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:Ute,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&&(rr(Bte),fe(0,Mte,1,1,"ng-template",null,0,kc),W(2,"div",1,2),Ne("click",function(s){return n._control.onContainerClick&&n._control.onContainerClick(s)}),fe(4,Cte,1,0,"div",3),W(5,"div",4),fe(6,Ate,2,3,"div",5),fe(7,Dte,3,0,"div",6),fe(8,Tte,3,0,"div",7),W(9,"div",8),fe(10,Rte,1,1,"ng-template",9),$t(11),Y(),fe(12,kte,2,0,"div",10),fe(13,Pte,2,0,"div",11),Y(),fe(14,Ote,1,0,"div",12),Y(),W(15,"div",13),fe(16,Fte,2,1,"div",14),fe(17,Nte,5,2,"div",15),Y()),2&e&&(G(2),un("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),G(2),U("ngIf",!n._hasOutline()&&!n._control.disabled),G(2),U("ngIf",n._hasOutline()),G(1),U("ngIf",n._hasIconPrefix),G(1),U("ngIf",n._hasTextPrefix),G(2),U("ngIf",!n._hasOutline()||n._forceDisplayInfixLabel()),G(2),U("ngIf",n._hasTextSuffix),G(1),U("ngIf",n._hasIconSuffix),G(1),U("ngIf",!n._hasOutline()),G(1),un("mat-mdc-form-field-subscript-dynamic-size","dynamic"===n.subscriptSizing),U("ngSwitch",n._getDisplayedMessages()),G(1),U("ngSwitchCase","error"),G(1),U("ngSwitchCase","hint"))},dependencies:[Mi,vy,_y,LT,bU,Jz,nH,sH,rH],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:[jte.transitionMessages]},changeDetection:0}),i})(),hC=(()=>{class i{}return i.\u0275fac=function(e){return new(e||i)},i.\u0275mod=nn({type:i}),i.\u0275inj=Xt({imports:[Kn,So,BI,Kn]}),i})();const cH=Th({passive:!0});let Kte=(()=>{class i{constructor(e,n){this._platform=e,this._ngZone=n,this._monitoredElements=new Map}monitor(e){if(!this._platform.isBrowser)return fo;const n=Uc(e),r=this._monitoredElements.get(n);if(r)return r.subject;const s=new Re,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,cH),n.classList.add("cdk-text-field-autofill-monitored")}),this._monitoredElements.set(n,{subject:s,unlisten:()=>{n.removeEventListener("animationstart",a,cH)}}),s}stopMonitoring(e){const n=Uc(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)(ee(zi),ee(ht))},i.\u0275prov=Ie({token:i,factory:i.\u0275fac,providedIn:"root"}),i})(),Zte=(()=>{class i{}return i.\u0275fac=function(e){return new(e||i)},i.\u0275mod=nn({type:i}),i.\u0275inj=Xt({}),i})();const LR=new me("MAT_INPUT_VALUE_ACCESSOR"),Qte=["button","checkbox","file","hidden","image","radio","range","reset","submit"];let Jte=0;const ene=VU(class{constructor(i,t,e,n){this._defaultErrorStateMatcher=i,this._parentForm=t,this._parentFormGroup=e,this.ngControl=n,this.stateChanges=new Re}});let Yc=(()=>{class i extends ene{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(dl.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&&nU().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,d,h){super(a,s,o,r),this._elementRef=e,this._platform=n,this._autofillMonitor=c,this._formField=h,this._uid="mat-input-"+Jte++,this.focused=!1,this.stateChanges=new Re,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=>nU().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&&d.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(){Qte.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)(E(pt),E(zi),E(jl,10),E(ab,8),E(Uh,8),E(HU),E(LR,10),E(Kte),E(ht),E(uC,8))},i.\u0275dir=ve({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&&Ne("focus",function(){return n._focusChanged(!0)})("blur",function(){return n._focusChanged(!1)})("input",function(){return n._onInput()}),2&e&&(Ul("id",n.id)("disabled",n.disabled)("required",n.required),St("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),un("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:FR,useExisting:i}]),at,bi]}),i})(),dH=(()=>{class i{}return i.\u0275fac=function(e){return new(e||i)},i.\u0275mod=nn({type:i}),i.\u0275inj=Xt({imports:[Kn,hC,hC,Zte,Kn]}),i})();function tne(i,t){if(1&i&&(W(0,"mat-label"),Ge(1),Y()),2&i){const e=he(2);G(1),_i(e.resource.name)}}function nne(i,t){if(1&i){const e=di();W(0,"mat-form-field",1),fe(1,tne,2,1,"mat-label",2),W(2,"input",3),Ne("ngModelChange",function(r){return an(e),Ut(he().resource.data=r)})("change",function(){return an(e),Ut(he().changed.emit())}),Y()()}if(2&i){const e=he();U("matTooltip",e.resourceDescription),G(1),U("ngIf",e.resource.name),G(1),U("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 ine=(()=>{class i{constructor(){this.resource=null,this.resourceDescription="",this.disabled=!1,this.changed=new $e}}return i.\u0275fac=function(e){return new(e||i)},i.\u0275cmp=ot({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&&fe(0,nne,3,7,"mat-form-field",0),2&e&&U("ngIf",n.resource)},dependencies:[Mi,Wl,Bh,jc,Hh,zh,fu,ql,qo,Yc,Os],changeDetection:0}),i})();function rne(i,t){if(1&i&&(W(0,"mat-label"),Ge(1),Y()),2&i){const e=he(2);G(1),_i(e.resource.name)}}function sne(i,t){if(1&i){const e=di();W(0,"mat-form-field",1),fe(1,rne,2,1,"mat-label",2),W(2,"input",3),Ne("ngModelChange",function(r){return an(e),Ut(he().resource.data=r)})("change",function(){return an(e),Ut(he().changed.emit())}),Y()()}if(2&i){const e=he();U("matTooltip",e.resourceDescription),G(1),U("ngIf",e.resource.name),G(1),U("disabled",e.disabled||void 0!==e.resource.schema.required_value)("maxlength",e.maxLength)("minlength",e.minLength)("ngModel",e.resource.data)}}let uH=(()=>{class i{constructor(){this._resource=null,this.resourceDescription="",this.disabled=!1,this.changed=new $e,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=ot({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&&fe(0,sne,3,6,"mat-form-field",0),2&e&&U("ngIf",n.resource)},dependencies:[Mi,Wl,jc,PR,OR,fu,ql,qo,Yc,Os],changeDetection:0}),i})();const Xl=(i,t)=>i+(i.includes("__")?"/":"__")+t,Gh=function(){return[]};function one(i,t){if(1&i&&(W(0,"mat-panel-description"),Ge(1," Click to view items ("),W(2,"b"),Ge(3),Y(),Ge(4,") "),Y()),2&i){const e=he(2);G(3),_i((e.resourceData||ro(1,Gh)).length)}}function ane(i,t){1&i&&(W(0,"mat-panel-description"),Ge(1," Empty array "),Y())}function lne(i,t){}function cne(i,t){if(1&i){const e=di();W(0,"mat-expansion-panel",4),Ne("opened",function(){return an(e),Ut(he().onContentsTrigger(!0))})("closed",function(){return an(e),Ut(he().onContentsTrigger(!1))}),W(1,"mat-expansion-panel-header",5)(2,"mat-panel-title"),Ge(3),Y(),fe(4,one,5,2,"mat-panel-description",1),fe(5,ane,2,0,"mat-panel-description",1),Y(),fe(6,lne,0,0,"ng-template",6),Y()}if(2&i){const e=he(),n=ir(3);G(1),U("matTooltip",e.resourceDescription),G(2),Xi(" ",e.name," "),G(1),U("ngIf",(e.resourceData||ro(5,Gh)).length>0),G(1),U("ngIf",0==(e.resourceData||ro(6,Gh)).length),G(1),U("ngTemplateOutlet",n)}}function dne(i,t){}function une(i,t){if(1&i&&($r(0),W(1,"h2",5),Ge(2),Y(),W(3,"div",7),fe(4,dne,0,0,"ng-template",6),Y(),Wr()),2&i){const e=he(),n=ir(3);G(1),U("matTooltip",e.resourceDescription),G(1),_i(e.name),G(2),U("ngTemplateOutlet",n)}}function hne(i,t){}function fne(i,t){if(1&i&&Oe(0,"app-editor",10),2&i){const e=he().$implicit,n=he(3);U("resource",n.children[n.pageIndex*n.pageSize+e])("disabled",n.disabled)}}function pne(i,t){if(1&i&&($r(0),fe(1,fne,1,2,"app-editor",9),Wr()),2&i){const e=t.$implicit,n=he(3);G(1),U("ngIf",n.pageIndex*n.pageSize+e0)}let NR=(()=>{class i{constructor(e,n){this.main=e,this.cdr=n,this._resource=null,this.resourceDescription="",this.disabled=!1,this.changed=new $e,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 Re}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(We(this.destroyed$),vn(([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 wt(null),this.imageUrl$=new wt(null),this.destroyed$=new Re,this.changed=new $e}set resource(e){this._resource$.next(e)}get resource(){return this._resource$.getValue()}ngAfterViewInit(){var e=this;return vt(function*(){e._resource$.pipe(We(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)(E($c),E(cl))},i.\u0275cmp=ot({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&&(Oe(0,"app-compound-block-ui",0),Ht(1,"async"),fe(2,Mne,2,3,"img",1),Ht(3,"async")),2&e&&(U("resource",Kt(1,3,n._resource$))("fieldBlacklist",ro(7,Cne)),G(2),U("ngIf",Kt(3,5,n.imageUrl$)))},dependencies:[Mi,Wc,zl],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 Ene=["*"],Rne=new me("MAT_CARD_CONFIG");let hH=(()=>{class i{constructor(e){this.appearance=e?.appearance||"raised"}}return i.\u0275fac=function(e){return new(e||i)(E(Rne,8))},i.\u0275cmp=ot({type:i,selectors:[["mat-card"]],hostAttrs:[1,"mat-mdc-card","mdc-card"],hostVars:4,hostBindings:function(e,n){2&e&&un("mat-mdc-card-outlined","outlined"===n.appearance)("mdc-card--outlined","outlined"===n.appearance)},inputs:{appearance:"appearance"},exportAs:["matCard"],ngContentSelectors:Ene,decls:1,vars:0,template:function(e,n){1&e&&(rr(),$t(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})(),fH=(()=>{class i{}return i.\u0275fac=function(e){return new(e||i)},i.\u0275mod=nn({type:i}),i.\u0275inj=Xt({imports:[Kn,So,Kn]}),i})();class BR{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 Re,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 UR=(()=>{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})(),nie=(()=>{class i{}return i.\u0275fac=function(e){return new(e||i)},i.\u0275mod=nn({type:i}),i.\u0275inj=Xt({imports:[Kn,So,Zy,Kn]}),i})();const yH={transformPanel:Da("transformPanel",[Or("void => enter-dropdown",Yr("120ms cubic-bezier(0, 0, 0.2, 1)",eV([si({opacity:0,transform:"scale(1, 0.8)"}),si({opacity:1,transform:"scale(1, 1)"})]))),Or("void => enter-dialog",Yr("150ms cubic-bezier(0, 0, 0.2, 1)",eV([si({opacity:0,transform:"scale(0.7)"}),si({transform:"none",opacity:1})]))),Or("* => void",Yr("100ms linear",si({opacity:0})))]),fadeInCalendar:Da("fadeInCalendar",[Ps("void",si({opacity:0})),Ps("enter",si({opacity:1})),Or("void => *",Yr("120ms 100ms cubic-bezier(0.55, 0, 0.55, 0.2)"))])},wH=function(i){return{active:i}};function bie(i,t){if(1&i){const e=di();W(0,"button",2),Ne("click",function(){const s=an(e).$implicit;return Ut(he().select(s))}),Y()}if(2&i){const e=t.$implicit,n=he();$o("background-color",e),U("ngClass",im(3,wH,n.selectedColor===e))}}function xie(i,t){if(1&i){const e=di();W(0,"button",2),Ne("click",function(){const s=an(e).$implicit;return Ut(he().select(s))}),Y()}if(2&i){const e=t.$implicit,n=he();$o("background-color",e),U("ngClass",im(3,wH,n.selectedColor===e))}}const wie=["button"],Mie=/^\s+/,Cie=/\s+$/,Hm=Math.round,Sie=(Math,Math,Math,/[^0-9]/g),MH=["#ffffff","#ffff00","#ff00ff","#ff0000","#c0c0c0","#808080","#808000","#800080","#800000","#00ffff","#00ff00","#008080","#008000","#0000ff","#000080","#000000"];function CH(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 Aie(i){return Math.round(255*parseFloat(i)).toString(16)}function SH(i){return Xo(i)/255}function Xo(i){return parseInt(i,16)}function EH(i,t,e,n){var r=[$h(Hm(i).toString(16)),$h(Hm(t).toString(16)),$h(Hm(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 pu="(?:[-\\+]?\\d*\\.\\d+%?)|(?:[-\\+]?\\d+%?)",HR="[\\s|\\(]+("+pu+")[,|\\s]+("+pu+")[,|\\s]+("+pu+")\\s*\\)?",GR="[\\s|\\(]+("+pu+")[,|\\s]+("+pu+")[,|\\s]+("+pu+")[,|\\s]+("+pu+")\\s*\\)?",Wh={CSS_UNIT:new RegExp(pu),rgb:new RegExp("rgb"+HR),rgba:new RegExp("rgba"+GR),hsl:new RegExp("hsl"+HR),hsla:new RegExp("hsla"+GR),hsv:new RegExp("hsv"+HR),hsva:new RegExp("hsva"+GR),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 $R(i){let t;return i=i.replace(Mie,"").replace(Cie,"").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:Xo(t[1]),g:Xo(t[2]),b:Xo(t[3]),a:SH(t[4])}:(t=Wh.hex6.exec(i))?{r:Xo(t[1]),g:Xo(t[2]),b:Xo(t[3]),a:1}:(t=Wh.hex4.exec(i))?{r:Xo(t[1]+""+t[1]),g:Xo(t[2]+""+t[2]),b:Xo(t[3]+""+t[3]),a:SH(t[4]+""+t[4])}:(t=Wh.hex3.exec(i))?{r:Xo(t[1]+""+t[1]),g:Xo(t[2]+""+t[2]),b:Xo(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=EH(this.r,this.g,this.b),this.rgba=this.toRgba()}toHex(t){return EH(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 Eie(i,t,e,n,r){var s=[$h(Hm(i).toString(16)),$h(Hm(t).toString(16)),$h(Hm(e).toString(16)),$h(Aie(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 AH=(()=>{class i{constructor(e,n){this.zone=e,this.colorChanged=new $e,this.x=0,this.y=0,this.drag=!1,this._destroyed=new Re,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){bo()},i.\u0275dir=ve({type:i,inputs:{color:"color"},outputs:{colorChanged:"colorChanged"}}),i})(),Iie=(()=>{class i extends AH{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}=CH(this.ctx,e.offsetX,e.offsetY);this.emitChange(new jh(n,r,s))}}return i.\u0275fac=function(e){return new(e||i)(E(ht))},i.\u0275cmp=ot({type:i,selectors:[["ngx-mat-color-slider"]],features:[at],decls:1,vars:0,consts:[["id","color-strip","width","15","height","234",1,"zone-strip",3,"mousedown","mouseup"]],template:function(e,n){1&e&&(W(0,"canvas",0),Ne("mousedown",function(s){return n.onMousedown(s)})("mouseup",function(s){return n.onMouseup(s)}),Y())}}),i})(),Rie=(()=>{class i{constructor(){}onInput(e){this._formatInput(e.target)}_formatInput(e){let n=Number(e.value.replace(Sie,""));n=isNaN(n)?0:n,e.value=n}}return i.\u0275fac=function(e){return new(e||i)},i.\u0275dir=ve({type:i,selectors:[["","ngxMatNumericColorInput",""]],hostBindings:function(e,n){1&e&&Ne("input",function(s){return n.onInput(s)})}}),i})(),Pie=(()=>{class i extends AH{constructor(e){super(e,"color-block"),this.zone=e,this._resetBaseColor=!0,this.formGroup=new Vm({r:new Yl(null,[dl.required]),g:new Yl(null,[dl.required]),b:new Yl(null,[dl.required]),a:new Yl(null,[dl.required]),hex:new Yl(null,[dl.required,dl.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(){Cr(this.rCtrl.valueChanges,this.gCtrl.valueChanges,this.bCtrl.valueChanges,this.aCtrl.valueChanges).pipe(We(this._destroyed),Vc(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(We(this._destroyed),Vc(400),zc()).subscribe(r=>{const s=$R(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}=CH(this.ctx,e.offsetX,e.offsetY);this.emitChange(new jh(n,r,s))}}return i.\u0275fac=function(e){return new(e||i)(E(ht))},i.\u0275cmp=ot({type:i,selectors:[["ngx-mat-color-canvas"]],hostAttrs:[1,"ngx-mat-color-canvas"],features:[at,bi],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&&(W(0,"form",0)(1,"div",1)(2,"div",2)(3,"canvas",3),Ne("mousedown",function(s){return n.onMousedown(s)})("mouseup",function(s){return n.onMouseup(s)}),Y(),W(4,"ngx-mat-color-slider",4),Ne("colorChanged",function(s){return n.onSliderColorChanged(s)}),Y()(),W(5,"div",5)(6,"mat-form-field")(7,"mat-label"),Ge(8,"R"),Y(),Oe(9,"input",6),Y(),W(10,"mat-form-field")(11,"mat-label"),Ge(12,"G"),Y(),Oe(13,"input",7),Y(),W(14,"mat-form-field")(15,"mat-label"),Ge(16,"B"),Y(),Oe(17,"input",8),Y()()(),W(18,"div",1),Oe(19,"button",9),W(20,"mat-form-field")(21,"mat-label"),Ge(22,"HEX6"),Y(),W(23,"mat-label",10),Ge(24,"#\xa0"),Y(),Oe(25,"input",11),Y(),W(26,"mat-form-field",12)(27,"mat-label"),Ge(28,"A"),Y(),Oe(29,"input",13),Y()()()),2&e&&(U("formGroup",n.formGroup),G(19),$o("background-color",(null==n.color?null:n.color.rgba)||"transparent"))},dependencies:[Yc,ql,qo,Gte,yV,ER,Wl,Bh,jc,gR,Hh,zh,Uh,cC,Iie,Rie],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})(),Oie=(()=>{class i{constructor(){this.colorChanged=new $e,this.colors1=MH.slice(0,8),this.colors2=MH.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}=$R(e);this.colorChanged.emit(new jh(n,r,s,o))}}return i.\u0275fac=function(e){return new(e||i)},i.\u0275cmp=ot({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&&(W(0,"div",0),fe(1,bie,1,5,"button",1),Y(),W(2,"div",0),fe(3,xie,1,5,"button",1),Y()),2&e&&(G(1),U("ngForOf",n.colors1),G(2),U("ngForOf",n.colors2))},dependencies:[dm,Co,yV],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})(),DH=(()=>{class i{constructor(){this.colorChanged=new $e}ngOnInit(){}handleColorChanged(e){this.colorChanged.emit(e)}}return i.\u0275fac=function(e){return new(e||i)},i.\u0275cmp=ot({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&&(W(0,"ngx-mat-color-canvas",0),Ne("colorChanged",function(s){return n.handleColorChanged(s)}),Y(),W(1,"ngx-mat-color-collection",0),Ne("colorChanged",function(s){return n.handleColorChanged(s)}),Y()),2&e&&(U("color",n.color),G(1),U("color",n.color))},dependencies:[Pie,Oie],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})(),WR=(()=>{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=$R(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 Fie={display:{colorInput:"hex"}},TH=new me("mat-color-formats"),IH=new me("ngx-mat-colorpicker-scroll-strategy"),Nie={provide:IH,deps:[as],useFactory:function Lie(i){return()=>i.scrollStrategies.reposition()}},Bie=Xy(class{constructor(i){this._elementRef=i}});let RH=(()=>{class i extends Bie{constructor(e){super(e)}}return i.\u0275fac=function(e){return new(e||i)(E(pt))},i.\u0275cmp=ot({type:i,selectors:[["ngx-mat-color-picker-content"]],viewQuery:function(e,n){if(1&e&&ii(DH,5),2&e){let r;Tt(r=It())&&(n._palette=r.first)}},hostAttrs:[1,"ngx-mat-colorpicker-content"],hostVars:3,hostBindings:function(e,n){2&e&&(Sw("@transformPanel","enter"),un("ngx-mat-colorpicker-content-touch",n.picker.touchUi))},inputs:{color:"color"},exportAs:["ngxMatColorPickerContent"],features:[at],decls:1,vars:1,consts:[[3,"color","colorChanged"]],template:function(e,n){1&e&&(W(0,"ngx-mat-color-palette",0),Ne("colorChanged",function(s){return n.picker.select(s)}),Y()),2&e&&U("color",n.picker._selected)},dependencies:[DH],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:[yH.transformPanel,yH.fadeInCalendar]},changeDetection:0}),i})(),kH=(()=>{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 $e,this.closedStream=new $e,this._touchUi=!1,this._opened=!1,this._defaultColor="primary",this._validSelected=null,this._disabledChange=new Re,this._focusedElementBeforeOpen=null,this._inputSubscription=Zt.EMPTY,this._selectedChanged=new Re,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(RH,{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(RH,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(Oi(1)).subscribe(()=>{this._popupRef.updatePosition()}))}_createPopup(){const e=new Im({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"),Cr(this._popupRef.backdropClick(),this._popupRef.detachments(),this._popupRef.keydownEvents().pipe(vn(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)(E(Lm),E(as),E(ht),E(WR),E(Aa,8),E(IH),E(Wt,8),E(jr))},i.\u0275cmp=ot({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 Uie={provide:Do,useExisting:Gn(()=>gC),multi:!0},Vie={provide:qr,useExisting:Gn(()=>gC),multi:!0};let gC=(()=>{class i{constructor(e,n,r,s){if(this._elementRef=e,this._formField=n,this._colorFormats=r,this._adapter=s,this.colorChange=new $e,this.colorInput=new $e,this._disabledChange=new $e,this._valueChange=new $e,this._onTouched=()=>{},this._cvaOnChange=()=>{},this._validatorOnChange=()=>{},this._pickerSubscription=Zt.EMPTY,this._validator=dl.compose([]),this._lastValueValid=!1,!this._colorFormats)throw function Tie(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)(E(pt),E(ql,8),E(TH,8),E(WR))},i.\u0275dir=ve({type:i,selectors:[["input","ngxMatColorPicker",""]],hostVars:3,hostBindings:function(e,n){1&e&&Ne("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&&(Ul("disabled",n.disabled),St("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([Uie,Vie,{provide:LR,useExisting:i}])]}),i})(),zie=(()=>{class i{constructor(e){this._cd=e,this._stateChanges=Zt.EMPTY}get disabled(){if(null==this._disabled&&this.picker)return this.picker.disabled}set disabled(e){this._disabled=e}ngOnInit(){}ngOnChanges(e){e.picker&&this._watchStateChanges()}ngOnDestroy(){this._stateChanges.unsubscribe()}ngAfterContentInit(){this._watchStateChanges()}open(e){this.picker&&!this.disabled&&(this.picker.open(),e.stopPropagation())}_watchStateChanges(){const e=this.picker?this.picker._disabledChange:ut(),n=this.picker&&this.picker._pickerInput?this.picker._pickerInput._disabledChange:ut(),r=this.picker?Cr(this.picker.openedStream,this.picker.closedStream):ut();this._stateChanges.unsubscribe(),this._stateChanges=Cr(e,n,r).subscribe(()=>this._cd.markForCheck())}}return i.\u0275fac=function(e){return new(e||i)(E(ri))},i.\u0275cmp=ot({type:i,selectors:[["ngx-mat-color-toggle"]],viewQuery:function(e,n){if(1&e&&ii(wie,5),2&e){let r;Tt(r=It())&&(n._button=r.first)}},hostAttrs:[1,"ngx-mat-color-toggle"],hostVars:7,hostBindings:function(e,n){1&e&&Ne("focus",function(){return n._button.focus()}),2&e&&(St("tabindex",-1),un("ngx-mat-color-toggle-active",n.picker&&n.picker.opened)("mat-accent",n.picker&&"accent"===n.picker.color)("mat-warn",n.picker&&"warn"===n.picker.color))},inputs:{picker:["for","picker"],tabIndex:"tabIndex",disabled:"disabled"},exportAs:["ngxMatColorPickerToggle"],features:[bi],decls:4,vars:5,consts:[["mat-icon-button","","type","button",3,"disabled","click"],["button",""]],template:function(e,n){1&e&&(W(0,"button",0,1),Ne("click",function(s){return n.open(s)}),W(2,"mat-icon"),Ge(3,"palette"),Y()()),2&e&&(U("disabled",n.disabled),St("aria-haspopup",n.picker?"dialog":null)("tabindex",n.disabled?-1:n.tabIndex),G(2),$o("color",null==n.picker||null==n.picker._selected?null:n.picker._selected.rgba))},dependencies:[WM,hR],styles:[".mat-form-field-appearance .mat-form-field-prefix .ngx-mat-color-toggle-default-icon,.mat-form-field-appearance .mat-form-field-suffix .ngx-mat-color-toggle-default-icon{width:1em}.mat-form-field:not(.mat-form-field-appearance) .mat-form-field-prefix .ngx-mat-color-toggle-default-icon,.mat-form-field:not(.mat-form-field-appearance) .mat-form-field-suffix .ngx-mat-color-toggle-default-icon{display:block;width:1.5em;height:1.5em}.mat-form-field:not(.mat-form-field-appearance) .mat-form-field-prefix .mat-icon-button .ngx-mat-color-toggle-default-icon,.mat-form-field:not(.mat-form-field-appearance) .mat-form-field-suffix .mat-icon-button .ngx-mat-color-toggle-default-icon{margin:auto}\n"],encapsulation:2}),i})(),Hie=(()=>{class i{}return i.\u0275fac=function(e){return new(e||i)},i.\u0275mod=nn({type:i}),i.\u0275inj=Xt({providers:[WR,Nie],imports:[So,dH,jM,fH,nie,Kz,Zz,fV,kh,KV]}),i})();const Gie=["picker"],$ie=function(i){return{"background-color":i}};function Wie(i,t){if(1&i){const e=di();W(0,"div",5),Ne("click",function(r){const o=an(e).index;return Ut(he().onColorClicked(r.currentTarget,o))}),Y()}if(2&i){const e=t.$implicit,n=t.index,r=he();U("ngStyle",im(2,$ie,"#"+r.lpad(e.toString(16),"0",8)))("matTooltip",n+": #"+e.toString(16))}}const jie=function(){return["colors"]};let Yie=(()=>{class i{constructor(){this.resource=null,this.changed=new $e,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 mU;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=ot({type:i,selectors:[["app-palette-block-ui"]],viewQuery:function(e,n){if(1&e&&ii(Gie,5),2&e){let r;Tt(r=It())&&(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&&(Oe(0,"app-compound-block-ui",0),W(1,"div",1),fe(2,Wie,1,4,"div",2),Y(),W(3,"input",3),Ne("colorChange",function(s){return n.onColorChange(s.value)}),Y(),Oe(4,"ngx-mat-color-picker",null,4)),2&e){const r=ir(5);U("resource",n.resource)("fieldBlacklist",ro(4,jie)),G(2),U("ngForOf",null==n.resourceData?null:n.resourceData.colors),G(1),U("ngxMatColorPicker",r)}},dependencies:[Co,Kw,Yc,Os,gC,kH,Wc],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 qie=["editor"];let Xie=(()=>{class i{constructor(e){this.cdr=e,this._resource=null,this.resourceDescription="",this.disabled=!1,this.changed=new $e,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)(E(ri))},i.\u0275cmp=ot({type:i,selectors:[["app-binary-block-ui"]],viewQuery:function(e,n){if(1&e&&ii(qie,5),2&e){let r;Tt(r=It())&&(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&&(W(0,"h2",0),Ge(1),Y(),Oe(2,"div",null,1)),2&e&&(U("matTooltip",n.resourceDescription),G(1),_i(null==n.resource?null:n.resource.name))},dependencies:[Os],changeDetection:0}),i})();const Kie=["picker"];function Zie(i,t){if(1&i&&(W(0,"mat-label",8),Ge(1),Y()),2&i){const e=he();G(1),_i(null==e.resource?null:e.resource.name)}}const Qie=function(i){return{transform:i}};let Jie=(()=>{class i{constructor(e){this.cdr=e,this.resource=null,this.resourceDescription="",this.changed=new $e,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)(E(ri))},i.\u0275cmp=ot({type:i,selectors:[["app-angle-block-ui"]],viewQuery:function(e,n){if(1&e&&ii(Kie,5),2&e){let r;Tt(r=It())&&(n.picker=r.first)}},hostBindings:function(e,n){1&e&&Ne("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&&(W(0,"div",0)(1,"div",1,2)(3,"div",3),Oe(4,"div",4)(5,"div",5),Y()(),W(6,"div",6),fe(7,Zie,2,1,"mat-label",7),W(8,"mat-label"),Ge(9),Ht(10,"number"),Y(),W(11,"mat-label"),Ge(12),Ht(13,"number"),Y()()()),2&e&&(U("matTooltip",n.resourceDescription),G(3),U("ngStyle",im(11,Qie,"rotate("+((null==n.resource?null:n.resource.data)||0)+"rad)")),G(4),U("ngIf",null==n.resource?null:n.resource.name),G(2),Xi("",X1(10,5,180*(null==n.resource?null:n.resource.data)/n.pi||0,"1.2-2")," deg"),G(3),Xi("",X1(13,8,(null==n.resource?null:n.resource.data)||0,"1.2-2")," rad"))},dependencies:[Mi,Kw,qo,Os,aB],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 PH{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,d=new Set;for(const h of e)!0===Array.isArray(h)?a.add(h):"object"==typeof h?l.add(h):"function"==typeof h?d.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===d.size){h=!0;for(const p of o)if(!1===d.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 ere(i,t){if(1&i&&(W(0,"mat-list-option",3),Ge(1),Y()),2&i){const e=t.$implicit,n=he();U("value",e)("selected",n.selectedValue==e),G(1),Xi(" ",e," ")}}function tre(i,t){if(1&i&&(W(0,"mat-card"),Oe(1,"app-editor",4),Y()),2&i){const e=he();G(1),U("resource",e.resources[e.selectedValue])}}let _C=(()=>{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)(E(PH))},i.\u0275cmp=ot({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&&(W(0,"mat-selection-list",0),Ne("selectionChange",function(s){return n.selectedValue=s.source.selectedOptions.selected[0].value}),fe(1,ere,2,3,"mat-list-option",1),Y(),fe(2,tre,2,1,"mat-card",2)),2&e&&(U("multiple",!1),G(1),U("ngForOf",n.keys),G(1),U("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})(),nre=(()=>{class i{constructor(){this._resource=null,this.resourceMap={},this.changed=new $e}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",JI("@transformPanel",[QI()],{optional:!0}))]),transformPanel:Da("transformPanel",[Ps("void",si({opacity:0,transform:"scale(1, 0.8)"})),Or("void => showing",Yr("120ms cubic-bezier(0, 0, 0.2, 1)",si({opacity:1,transform:"scale(1, 1)"}))),Or("* => void",Yr("100ms linear",si({opacity:0})))])};let OH=0;const FH=new me("mat-select-scroll-strategy"),pre=new me("MAT_SELECT_CONFIG"),mre={provide:FH,deps:[as],useFactory:function fre(i){return()=>i.scrollStrategies.reposition()}},gre=new me("MatSelectTrigger");class _re{constructor(t,e){this.source=t,this.value=e}}const vre=HM(XI(zM(VU(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 Re}}))));let yre=(()=>{class i extends vre{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(dl.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=ks(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,d,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=d,this._liveAnnouncer=g,this._defaultOptions=b,this._panelOpen=!1,this._compareWith=(v,y)=>v===y,this._uid="mat-select-"+OH++,this._triggerAriaLabelledBy=null,this._destroy=new Re,this._onChange=()=>{},this._onTouched=()=>{},this._valueId="mat-select-value-"+OH++,this._panelDoneAnimatingStream=new Re,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=My(()=>{const v=this.options;return v?v.changes.pipe(Eo(v),Rs(()=>Cr(...v.map(y=>y.onSelectionChange)))):this._ngZone.onStable.pipe(Oi(1),Rs(()=>this.optionSelectionChanges))}),this.openedChange=new $e,this._openedStream=this.openedChange.pipe(vn(v=>v),et(()=>{})),this._closedStream=this.openedChange.pipe(vn(v=>!v),et(()=>{})),this.selectionChange=new $e,this.valueChange=new $e,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 BR(this.multiple),this.stateChanges.next(),this._panelDoneAnimatingStream.pipe(zc(),We(this._destroy)).subscribe(()=>this._panelDoneAnimating(this.panelOpen))}ngAfterContentInit(){this._initKeyManager(),this._selectionModel.changed.pipe(We(this._destroy)).subscribe(e=>{e.added.forEach(n=>n.select()),e.removed.forEach(n=>n.deselect())}),this.options.changes.pipe(Eo(null),We(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&&!Yo(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||Yo(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(Oi(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 BZ(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=Cr(this.options.changes,this._destroy);this.optionSelectionChanges.pipe(We(e)).subscribe(n=>{this._onSelect(n.source,n.isUserInput),n.isUserInput&&!this.multiple&&this._panelOpen&&(this.close(),this.focus())}),Cr(...this.options.map(n=>n._stateChanges)).pipe(We(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)(E(RM),E(ri),E(ht),E(HU),E(pt),E(Aa,8),E(ab,8),E(Uh,8),E(uC,8),E(jl,10),_a("tabindex"),E(FH),E(WI),E(pre,8))},i.\u0275dir=ve({type:i,viewQuery:function(e,n){if(1&e&&(ii(ire,5),ii(rre,5),ii(_U,5)),2&e){let r;Tt(r=It())&&(n.trigger=r.first),Tt(r=It())&&(n.panel=r.first),Tt(r=It())&&(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:[at,bi]}),i})(),cb=(()=>{class i extends yre{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(We(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 TQ(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 _re(this,e)}_getOverlayWidth(){return(this._preferredOverlayOrigin instanceof NI?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=ni(i)))(n||i)}}(),i.\u0275cmp=ot({type:i,selectors:[["mat-select"]],contentQueries:function(e,n,r){if(1&e&&(Wi(r,gre,5),Wi(r,Fm,5),Wi(r,KU,5)),2&e){let s;Tt(s=It())&&(n.customTrigger=s.first),Tt(s=It())&&(n.options=s),Tt(s=It())&&(n.optionGroups=s)}},hostAttrs:["role","combobox","aria-autocomplete","none","aria-haspopup","listbox",1,"mat-mdc-select"],hostVars:19,hostBindings:function(e,n){1&e&&Ne("keydown",function(s){return n._handleKeydown(s)})("focus",function(){return n._onFocus()})("blur",function(){return n._onBlur()}),2&e&&(St("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()),un("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:FR,useExisting:i},{provide:XU,useExisting:i}]),at],ngContentSelectors:ure,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&&(rr(dre),W(0,"div",0,1),Ne("click",function(){return n.toggle()}),W(3,"div",2),fe(4,sre,2,1,"span",3),fe(5,lre,3,2,"span",4),Y(),W(6,"div",5)(7,"div",6),ki(),W(8,"svg",7),Oe(9,"path",8),Y()()()(),fe(10,cre,3,9,"ng-template",9),Ne("backdropClick",function(){return n.close()})("attach",function(){return n._onAttached()})("detach",function(){return n.close()})),2&e){const r=ir(1);St("aria-owns",n.panelOpen?n.id+"-panel":null),G(3),U("ngSwitch",n.empty),St("id",n._valueId),G(1),U("ngSwitchCase",!0),G(1),U("ngSwitchCase",!1),G(5),U("cdkConnectedOverlayPanelClass",n._overlayPanelClass)("cdkConnectedOverlayScrollStrategy",n._scrollStrategy)("cdkConnectedOverlayOrigin",n._preferredOverlayOrigin||r)("cdkConnectedOverlayOpen",n.panelOpen)("cdkConnectedOverlayPositions",n._positions)("cdkConnectedOverlayWidth",n._overlayWidth)}},dependencies:[dm,_y,LT,iB,_U,NI],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:[hre.transformPanel]},changeDetection:0}),i})(),LH=(()=>{class i{}return i.\u0275fac=function(e){return new(e||i)},i.\u0275mod=nn({type:i}),i.\u0275inj=Xt({providers:[mre],imports:[So,Rm,ZI,Kn,jy,hC,ZI,Kn]}),i})();function bre(i,t){if(1&i&&(W(0,"mat-label"),Ge(1),Y()),2&i){const e=he(3);G(1),_i(e.resource.name)}}function xre(i,t){if(1&i&&(W(0,"mat-option",6),Ge(1),Y()),2&i){const e=t.$implicit,n=he(3);U("value",e[1])("disabled",n.disabled),G(1),Xi(" ",e[1]," ")}}function wre(i,t){if(1&i){const e=di();W(0,"mat-form-field",3),fe(1,bre,2,1,"mat-label",0),W(2,"mat-select",4),Ne("valueChange",function(r){return an(e),Ut(he(2).resource.data=r)})("selectionChange",function(){return an(e),Ut(he(2).changed.emit())}),fe(3,xre,2,3,"mat-option",5),Y()()}if(2&i){const e=he(2);U("matTooltip",e.resourceDescription),G(1),U("ngIf",e.resource.name),G(1),U("value",e.resource.data)("disabled",e.disabled),G(1),U("ngForOf",e.resource.schema.enum_names)}}function Mre(i,t){if(1&i&&(W(0,"mat-label"),Ge(1),Y()),2&i){const e=he(3);G(1),_i(e.resource.name)}}function Cre(i,t){if(1&i){const e=di();W(0,"mat-form-field",3),fe(1,Mre,2,1,"mat-label",0),W(2,"input",7),Ne("ngModelChange",function(r){return an(e),Ut(he(2).resource.data=r)})("change",function(){return an(e),Ut(he(2).changed.emit())}),Y()()}if(2&i){const e=he(2);U("matTooltip",e.resourceDescription),G(1),U("ngIf",e.resource.name),G(1),U("min",0)("max",256*(e.resource.schema.length||1)-1)("ngModel",e.resource.data)}}function Sre(i,t){if(1&i&&($r(0),fe(1,wre,4,5,"mat-form-field",1),fe(2,Cre,3,5,"ng-template",null,2,kc),Wr()),2&i){const e=ir(3),n=he();G(1),U("ngIf",n.isKnownEnumValue(n.resource.data))("ngIfElse",e)}}let Ere=(()=>{class i{constructor(){this.resource=null,this.resourceDescription="",this.disabled=!1,this.changed=new $e}isKnownEnumValue(e){return!!this.resource?.schema.enum_names.find(([n,r])=>r==e)}}return i.\u0275fac=function(e){return new(e||i)},i.\u0275cmp=ot({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&&fe(0,Sre,4,2,"ng-container",0),2&e&&U("ngIf",n.resource)},dependencies:[Co,Mi,Wl,Bh,jc,Hh,zh,fu,ql,qo,Yc,Os,cb,Fm],changeDetection:0}),i})();const Are=["*"],Tre=["unscopedContent"];function Ire(i,t){1&i&&$t(0,4)}function Rre(i,t){if(1&i&&(W(0,"div",11),Oe(1,"input",12),W(2,"div",13),ki(),W(3,"svg",14),Oe(4,"path",15),Y(),pa(),Oe(5,"div",16),Y()()),2&i){const e=he();un("mdc-checkbox--disabled",e.disabled),G(1),U("checked",e.selected)("disabled",e.disabled)}}function kre(i,t){if(1&i&&(W(0,"div",17),Oe(1,"input",18),W(2,"div",19),Oe(3,"div",20)(4,"div",21),Y()()),2&i){const e=he();un("mdc-radio--disabled",e.disabled),G(1),U("checked",e.selected)("disabled",e.disabled)}}function Pre(i,t){}function Ore(i,t){if(1&i&&(W(0,"span",22),fe(1,Pre,0,0,"ng-template",23),Y()),2&i){he();const e=ir(3);G(1),U("ngTemplateOutlet",e)}}function Fre(i,t){}function Lre(i,t){if(1&i&&(W(0,"span",24),fe(1,Fre,0,0,"ng-template",23),Y()),2&i){he();const e=ir(5);G(1),U("ngTemplateOutlet",e)}}function Nre(i,t){}function Bre(i,t){1&i&&fe(0,Nre,0,0,"ng-template",23),2&i&&(he(),U("ngTemplateOutlet",ir(1)))}function Ure(i,t){}function Vre(i,t){if(1&i&&(W(0,"span",25),fe(1,Ure,0,0,"ng-template",23),Y()),2&i){he();const e=ir(3);G(1),U("ngTemplateOutlet",e)}}function zre(i,t){}function Hre(i,t){if(1&i&&(W(0,"span",25),fe(1,zre,0,0,"ng-template",23),Y()),2&i){he();const e=ir(5);G(1),U("ngTemplateOutlet",e)}}function Gre(i,t){}function $re(i,t){1&i&&fe(0,Gre,0,0,"ng-template",23),2&i&&(he(),U("ngTemplateOutlet",ir(1)))}const Wre=[[["","matListItemTitle",""]],[["","matListItemLine",""]],"*",[["mat-divider"]],[["","matListItemAvatar",""],["","matListItemIcon",""]]],jre=["[matListItemTitle]","[matListItemLine]","*","mat-divider","[matListItemAvatar],[matListItemIcon]"],NH=new me("ListOption");let Yre=(()=>{class i{constructor(e){this._elementRef=e}}return i.\u0275fac=function(e){return new(e||i)(E(pt))},i.\u0275dir=ve({type:i,selectors:[["","matListItemTitle",""]],hostAttrs:[1,"mat-mdc-list-item-title","mdc-list-item__primary-text"]}),i})(),qre=(()=>{class i{constructor(e){this._elementRef=e}}return i.\u0275fac=function(e){return new(e||i)(E(pt))},i.\u0275dir=ve({type:i,selectors:[["","matListItemLine",""]],hostAttrs:[1,"mat-mdc-list-item-line","mdc-list-item__secondary-text"]}),i})(),BH=(()=>{class i{constructor(e){this._listOption=e}_isAlignedAtStart(){return!this._listOption||"after"===this._listOption?._getTogglePosition()}}return i.\u0275fac=function(e){return new(e||i)(E(NH,8))},i.\u0275dir=ve({type:i,hostVars:4,hostBindings:function(e,n){2&e&&un("mdc-list-item__start",n._isAlignedAtStart())("mdc-list-item__end",!n._isAlignedAtStart())}}),i})(),Xre=(()=>{class i extends BH{}return i.\u0275fac=function(){let t;return function(n){return(t||(t=ni(i)))(n||i)}}(),i.\u0275dir=ve({type:i,selectors:[["","matListItemAvatar",""]],hostAttrs:[1,"mat-mdc-list-item-avatar"],features:[at]}),i})(),Kre=(()=>{class i extends BH{}return i.\u0275fac=function(){let t;return function(n){return(t||(t=ni(i)))(n||i)}}(),i.\u0275dir=ve({type:i,selectors:[["","matListItemIcon",""]],hostAttrs:[1,"mat-mdc-list-item-icon"],features:[at]}),i})();const Zre=new me("MAT_LIST_CONFIG");let jR=(()=>{class i{constructor(){this._isNonInteractive=!0,this._disableRipple=!1,this._disabled=!1,this._defaultOptions=Pt(Zre,{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=ve({type:i,hostVars:1,hostBindings:function(e,n){2&e&&St("aria-disabled",n.disabled)},inputs:{disableRipple:"disableRipple",disabled:"disabled"}}),i})(),UH=(()=>{class i{set lines(e){this._explicitLines=ks(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 Zt,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 Om(this,this._ngZone,this._hostElement,this._platform),this._rippleRenderer.setupTriggerEvents(this._hostElement)}_monitorProjectedLinesAndTitle(){this._ngZone.runOutsideAngular(()=>{this._subscriptions.add(Cr(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)(E(pt),E(ht),E(jR,8),E(zi),E(KI,8),E(kr,8))},i.\u0275dir=ve({type:i,contentQueries:function(e,n,r){if(1&e&&(Wi(r,Xre,4),Wi(r,Kre,4)),2&e){let s;Tt(s=It())&&(n._avatars=s),Tt(s=It())&&(n._icons=s)}},hostVars:4,hostBindings:function(e,n){2&e&&(St("aria-disabled",n.disabled)("disabled",n._isButtonElement&&n.disabled||null),un("mdc-list-item--disabled",n.disabled))},inputs:{lines:"lines",disableRipple:"disableRipple",disabled:"disabled"}}),i})();const VH=new me("SelectionList");let vC=(()=>{class i extends UH{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 $e,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)(E(pt),E(ht),E(VH),E(zi),E(ri),E(KI,8),E(kr,8))},i.\u0275cmp=ot({type:i,selectors:[["mat-list-option"]],contentQueries:function(e,n,r){if(1&e&&(Wi(r,qre,5),Wi(r,Yre,5)),2&e){let s;Tt(s=It())&&(n._lines=s),Tt(s=It())&&(n._titles=s)}},viewQuery:function(e,n){if(1&e&&ii(Tre,5),2&e){let r;Tt(r=It())&&(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&&Ne("blur",function(){return n._handleBlur()})("click",function(){return n._toggleOnInteraction()}),2&e&&(St("aria-selected",n.selected),un("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:UH,useExisting:i},{provide:NH,useExisting:i}]),at],ngContentSelectors:jre,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&&(rr(Wre),fe(0,Ire,1,0,"ng-template",null,0,kc),fe(2,Rre,6,4,"ng-template",null,1,kc),fe(4,kre,5,4,"ng-template",null,2,kc),fe(6,Ore,2,1,"span",3),fe(7,Lre,2,1,"span",4),fe(8,Bre,1,1,"ng-template",5),W(9,"span",6),$t(10),$t(11,1),W(12,"span",7,8),Ne("cdkObserveContent",function(){return n._updateItemLines(!0)}),$t(14,2),Y()(),fe(15,Vre,2,1,"span",9),fe(16,Hre,2,1,"span",9),fe(17,$re,1,1,"ng-template",5),$t(18,3),Oe(19,"div",10)),2&e&&(G(6),U("ngIf",n._hasCheckboxAt("before")),G(1),U("ngIf",n._hasRadioAt("before")),G(1),U("ngIf",n._hasIconsOrAvatarsAt("before")),G(7),U("ngIf",n._hasCheckboxAt("after")),G(1),U("ngIf",n._hasRadioAt("after")),G(1),U("ngIf",n._hasIconsOrAvatarsAt("after")))},dependencies:[bU,Mi,vy],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 Qre={provide:Do,useExisting:Gn(()=>yC),multi:!0};class Jre{constructor(t,e){this.source=t,this.options=e}}let yC=(()=>{class i extends jR{get multiple(){return this._multiple}set multiple(e){const n=Jt(e);n!==this._multiple&&(this._multiple=n,this.selectedOptions=new BR(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 Re,this._onChange=r=>{},this.selectionChange=new $e,this.color="accent",this.compareWith=(r,s)=>r===s,this._multiple=!0,this._hideSingleSelectionIndicator=this._defaultOptions?.hideSingleSelectionIndicator??!1,this.selectedOptions=new BR(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 Jre(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(We(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()&&Yo(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 AU(this._items).withHomeAndEnd().withTypeAhead().withWrap().skipPredicate(()=>this.disabled),this._resetActiveOption(),this._keyManager.change.subscribe(e=>this._setActiveOption(e)),this._items.changes.pipe(We(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=IM();return e&&this._element.nativeElement.contains(e)}}return i.\u0275fac=function(e){return new(e||i)(E(pt),E(ht))},i.\u0275cmp=ot({type:i,selectors:[["mat-selection-list"]],contentQueries:function(e,n,r){if(1&e&&Wi(r,vC,5),2&e){let s;Tt(s=It())&&(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&&Ne("keydown",function(s){return n._handleKeydown(s)}),2&e&&St("aria-multiselectable",n.multiple)},inputs:{color:"color",compareWith:"compareWith",multiple:"multiple",hideSingleSelectionIndicator:"hideSingleSelectionIndicator",disabled:"disabled"},outputs:{selectionChange:"selectionChange"},exportAs:["matSelectionList"],features:[An([Qre,{provide:jR,useExisting:i},{provide:VH,useExisting:i}]),at,bi],ngContentSelectors:Are,decls:1,vars:0,template:function(e,n){1&e&&(rr(),$t(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})(),ese=(()=>{class i{}return i.\u0275fac=function(e){return new(e||i)},i.\u0275mod=nn({type:i}),i.\u0275inj=Xt({imports:[BI,So,Kn,Zy,qU,AV]}),i})();function tse(i,t){if(1&i&&(W(0,"mat-label"),Ge(1),Y()),2&i){const e=he(2);G(1),_i(e.resource.name)}}function nse(i,t){if(1&i&&(W(0,"mat-list-option",5),Ge(1),Y()),2&i){const e=t.$implicit,n=he(2);U("value",e.key)("selected",n.resource.data[e.key])("disabled",n.disabled),G(1),Xi(" ",e.key," ")}}function ise(i,t){if(1&i){const e=di();$r(0,1),fe(1,tse,2,1,"mat-label",2),W(2,"mat-selection-list",3),Ne("selectionChange",function(r){return an(e),Ut(he().onSelection(r))}),fe(3,nse,2,4,"mat-list-option",4),Ht(4,"keyvalue"),Y(),Wr()}if(2&i){const e=he();U("matTooltip",e.resourceDescription),G(1),U("ngIf",e.resource.name),G(1),U("disabled",e.disabled),G(1),U("ngForOf",Kt(4,4,e.resource.data))}}let rse=(()=>{class i{constructor(){this.resource=null,this.resourceDescription="",this.disabled=!1,this.changed=new $e}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=ot({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&&fe(0,ise,5,6,"ng-container",0),2&e&&U("ngIf",n.resource)},dependencies:[Co,Mi,qo,Os,yC,vC,sB],styles:["[_nghost-%COMP%]{padding-bottom:1.34375em}"],changeDetection:0}),i})();class zH{get tick$(){return this._tick$.asObservable()}get children(){return[...this._children]}constructor(t){this.parent=t,this._tick$=new Re,this._children=[],t&&t.addChild(this)}addChild(t){if(t.parent!==this)throw new Error("Incorrect child clock");this._children.includes(t)||this._children.push(t)}removeChild(t){if(t.parent!==this)throw new Error("Incorrect child clock");this._children=this._children.filter(e=>e!==t)}dispose(){this.parent&&this.parent.removeChild(this);for(const t of this._children)t.dispose();this._tick$.complete()}}const ose=typeof performance>"u"?()=>Date.now():()=>performance.now();class $m extends zH{static get instance(){return $m._instance||($m._instance=new $m),$m._instance}get elapsedTime(){return ose()}constructor(){super(null);let t=this.elapsedTime;const e=()=>{requestAnimationFrame(e);const n=t,r=this.elapsedTime;t=r,this._tick$.next([n,r-n])};requestAnimationFrame(e)}dispose(){throw new Error("Cannot dispose global clock")}}class HH extends zH{get isRunning(){return!!this.tickSub}get isPaused(){return-1!==this.pausedAt}get isStopped(){return-1===this.startedAt}get timeScale(){return this._timeScale}set timeScale(t){if(t!==this._timeScale||this.pausedByTimescale&&0!==t){if(0===t)return void(this.isPaused||(this.pause(),this.pausedByTimescale=!0));if(this.isPaused&&this.pausedByTimescale&&(this.resume(),this.pausedByTimescale=!1),!this.isStopped){const e=this.isPaused?this.pausedAt:this.parentClock.elapsedTime;this.startedAt=e-(e-this.startedAt)*this.timeScale/t}this._timeScale=t}}get elapsedTime(){return this.isStopped?this.lastStopElapsed:this.isPaused?this._timeScale*(this.pausedAt-this.startedAt):this._timeScale*(this.parentClock.elapsedTime-this.startedAt)}constructor(t=!1,e=$m.instance){super(e),this.parentClock=e,this.tickSub=null,this._internalTick$=new Re,this.tickRateLimit=0,this.paused$=new Re,this.startedAt=-1,this.oldRelativeTime=0,this.pausedAt=-1,this.lastStopElapsed=0,this._timeScale=1,this.pausedByTimescale=!1,this.lastFiredTickElapsed=0,t&&this.start(),this._internalTick$.pipe(et(([n,r])=>[r,r-this.lastFiredTickElapsed]),vn(([n])=>!this.tickRateLimit||Math.floor(this.lastFiredTickElapsed*this.tickRateLimit/1e3)this.lastFiredTickElapsed=n)).subscribe(this._tick$)}start(){this.isRunning||(this.oldRelativeTime=0,this.startedAt=this.parentClock.elapsedTime,this.startListeningTicks())}stop(){this.stopListeningTicks(),this.lastStopElapsed=this.elapsedTime,this.startedAt=this.pausedAt=-1}pause(){this.stopListeningTicks(),this.pausedAt=this.parentClock.elapsedTime,this.pausedByTimescale=!1,this.paused$.next(!0)}resume(){this.isRunning||-1==this.pausedAt||(this.startedAt+=this.parentClock.elapsedTime-this.pausedAt,this.pausedAt=-1,this.startListeningTicks(),this.paused$.next(!1))}startListeningTicks(){if(this.tickSub)throw new Error("Clock is already ticking!");this.tickSub=this.parentClock.tick$.pipe(et(([t,e])=>[this.oldRelativeTime,this.oldRelativeTime+e*this.timeScale]),Vi(([t,e])=>this.oldRelativeTime=e)).subscribe(this._internalTick$)}stopListeningTicks(){var t;null===(t=this.tickSub)||void 0===t||t.unsubscribe(),this.tickSub=null}dispose(){this.stopListeningTicks(),this._internalTick$.complete(),super.dispose()}}const ase={transparent:!1,background:0,size:"fullscreen",antialias:!0};class lse{constructor(t,e,n={}){this.scene=t,this.canvas=e,this.entity=null,this.rendererOptions=Object.assign(Object.assign({},ase),n||{})}}class db{static fromArray(t,e=!1){const n=new db(t[0]);let r=n;for(let s=1;sn.map(r=>new db(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]}constructor(t){this.data=t,this.adjacent=new Set}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(d=>!e.has(d));for(const d of c)e.add(d),r.push([d,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 Yh=(()=>{class i{constructor(){this.tick$=new Re,this._world=null,this._name="e0x"+(i.default_name_counter++).toString(16),this._selfActive=!0,this.parent=null,this._children=[],this._components=[],this._onSpawned$=new Re,this._onRemoved$=new Re}get world(){return this._world}get name(){return this._name}set name(e){this._name=e}get active(){return this._selfActive&&(!this.parent||this.parent.active)}set active(e){this._selfActive=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 cse extends Yh{constructor(t){super(),this.tickOrder=t}}function YR(i,t=Kl.CONTROLLERS,e){const n=new cse(t);return e&&(n.name=e),i.addEntity(n),n.tick$.pipe(iu(()=>{i.removeEntity(n,!0)}))}class qR extends Yh{get rendererSize$(){return this._rendererSize$.asObservable()}get rendererSize(){return this._rendererSize$.getValue()}get rendererOptions(){return this.renderer.rendererOptions}get physicsDebugViewActive(){return this.renderer.physicsDebugViewActive}set physicsDebugViewActive(t){this.renderer.physicsDebugViewActive=t}constructor(t){super(),this.renderer=t,this.tickOrder=Kl.RENDERING,this._rendererSize$=new wt(null),this.addComponents(t),this.tick$.subscribe(()=>{this.renderer.render()})}onSpawned(t){this._rendererSize$.next(null),"fullscreen"==this.rendererOptions.size||"function"==typeof this.rendererOptions.size?(this.renderer.canvas&&(this.renderer.canvas.style.position="absolute"),Cr(Ao(window,"resize").pipe(DM(100)),Ao(window,"orientationchange")).pipe(We(this._onRemoved$),et(()=>({x:window.innerWidth,y:window.innerHeight})),Eo({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 Tn||void 0!==this.rendererOptions.size.subscribe&&void 0!==this.rendererOptions.size.pipe?this.rendererOptions.size.pipe(We(this._onRemoved$)).subscribe(e=>{this._rendererSize$.next(e)}):this._rendererSize$.next(this.rendererOptions.size),this._rendererSize$.pipe(We(this._onRemoved$),zc((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 XR=i=>{i.updateVisibility?i.updateVisibility():GH(i)},GH=i=>{for(const t of i.children)XR(t)};class dse extends Yh{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(){GH(this)}addChildren(...t){super.addChildren(...t);for(const e of t)XR(e)}removeChildren(t,e=!1){if(super.removeChildren(t,e),!e)for(const n of t)XR(n)}}class KR{constructor(){this._running=!1,this.stop$=new Re}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 use extends KR{get output$(){return this._output$.asObservable()}constructor(t,e){super(),this.keyboard=t,this.keymap=e,this._output$=new Re}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")),Hl(t.map(e=>this.keyboard.bindMany(...e))).pipe(We(this.stop$),et(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 ZR=new Tn(ms);class bC extends KR{constructor(){super(),this.bindings={},this.skipKeyDownsOnExternalFocus=!0,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 wt(!1);return this.bindings[t].push(e),e.pipe(zc(),iu(()=>{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"),ZR;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 wt(!1);this.bindings[n].push(r),e.push(r)}return Hl(e).pipe(iu(()=>{for(let n=0;nn.includes(!0)),zc())}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 bC.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)}}bC.externalFocusBlacklist=[HTMLInputElement,HTMLTextAreaElement,HTMLSelectElement,HTMLButtonElement];class vi{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 vi.len(vi.sub(t,e))}static norm(t){const e=vi.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 fse={pointerLock:!1};var Fs=(()=>{return(i=Fs||(Fs={}))[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",Fs;var i})();class Wm extends KR{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$=Ao(this._element,"wheel",{passive:!1}).pipe(We(this.stopped$),iu(()=>this._wheel$=null),Vi(t=>t.preventDefault()),et(t=>t.deltaY),Nf())),this._wheel$}get isPointerLocked(){return!!document.pointerLockElement}get isPointerLocked$(){return Ao(document,"pointerlockchange").pipe(et(()=>this.isPointerLocked))}get state(){return this._state$.getValue()}get state$(){return this._state$.asObservable()}get multiTouchPositions$(){return this._multiTouchPositions$.asObservable()}get twoTouchGestureDelta$(){return this.state$.pipe(Rs(t=>t==Fs.DRAG_TOUCH_TWO_FINGERS?this.multiTouchPositions$:ZR),et(t=>t.map(e=>({x:e.x,y:e.y}))),function hse(){return Jn((i,t)=>{let e,n=!1;i.subscribe(jn(t,r=>{const s=e;e=r,n&&t.next([s,r]),n=!0}))})}(),vn(([t,e])=>t.length>1&&e.length>1),et(([t,e])=>({centerPointDelta:vi.sub(vi.scalarMult(e.reduce((n,r)=>vi.add(n,r),vi.O),1/e.length),vi.scalarMult(t.reduce((n,r)=>vi.add(n,r),vi.O),1/e.length)),angleDelta:vi.angle(e[1],e[0])-vi.angle(t[1],t[0]),distanceDelta:vi.dist(e[1],e[0])-vi.dist(t[1],t[0])})))}get _element(){return this.options.canvas||window}constructor(t={}){super(),this._wheel$=null,this._delta$=new Re,this._position$=new wt(vi.O),this._multiTouchPositions$=new wt([]),this.stopped$=new Re,this._state$=new wt(Fs.NONE),this.options=Object.assign(Object.assign({},fse),t),this.canvasClickListener=this.canvasClickListener.bind(this)}startInternal(){this.options.canvas&&(this.options.canvas.style.touchAction="none"),this._state$.next(Fs.NONE);const t=[Fs.DRAG,Fs.DRAG_MIDDLE_BUTTON,Fs.DRAG_RIGHT_BUTTON],e=[Fs.NONE,Fs.DRAG,Fs.DRAG_TOUCH_TWO_FINGERS],n=[],r={};Ao(this._element,"mousemove").pipe(We(this.stopped$)).subscribe(o=>{this._delta$.next({x:o.movementX,y:o.movementY})}),Ao(this._element,"pointermove").pipe(We(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})}),!Wm.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{if(0===n.length)try{this.options.canvas&&this.options.canvas.setPointerCapture(o.pointerId),window.addEventListener("pointerup",s),this._element.addEventListener("pointercancel",s)}catch(a){console.error(a)}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]||Fs.NONE)}),Ao(this._element,"contextmenu").pipe(We(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 pse{static lookAt(t,e,n){let r=Le.sub(t,e);r=0===Le.lenSq(r)?Object.assign(Object.assign({},r),{z:1}):Le.norm(r);let s=Le.cross(n,r);0===Le.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=Le.norm(r),s=Le.cross(n,r)),s=Le.norm(s);let o=Le.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,d=t.w*Math.sin((1-n)*s)/o+e.w*Math.sin(n*s)/o;return isNaN(a)||isNaN(l)||isNaN(c)||isNaN(d)?gr.clone(t):{x:a,y:l,z:c,w:d}}static fromAngle(t,e){const n=e/2,r=Math.sin(n);return Object.assign(Object.assign({},Le.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],d=t[10],h=e+o+d;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>d){const p=2*Math.sqrt(1+e-o-d);return{x:.25*p,y:(n+s)/p,z:(r+l)/p,w:(c-a)/p}}if(o>d){const p=2*Math.sqrt(1+o-e-d);return{x:(n+s)/p,y:.25*p,z:(a+c)/p,w:(r-l)/p}}{const p=2*Math.sqrt(1+d-e-o);return{x:(r+l)/p,y:(a+c)/p,z:.25*p,w:(s-n)/p}}}static fromMatrix3(t){const e=t[0][0]+t[1][1]+t[2][2];let n,r,s,o;if(e>0){const a=.5/Math.sqrt(e+1);n=.25/a,r=(t[2][1]-t[1][2])*a,s=(t[0][2]-t[2][0])*a,o=(t[1][0]-t[0][1])*a}else if(t[0][0]>t[1][1]&&t[0][0]>t[2][2]){const a=2*Math.sqrt(1+t[0][0]-t[1][1]-t[2][2]);n=(t[2][1]-t[1][2])/a,r=.25*a,s=(t[0][1]+t[1][0])/a,o=(t[0][2]+t[2][0])/a}else if(t[1][1]>t[2][2]){const a=2*Math.sqrt(1+t[1][1]-t[0][0]-t[2][2]);n=(t[0][2]-t[2][0])/a,r=(t[0][1]+t[1][0])/a,s=.25*a,o=(t[1][2]+t[2][1])/a}else{const a=2*Math.sqrt(1+t[2][2]-t[0][0]-t[1][1]);n=(t[1][0]-t[0][1])/a,r=(t[0][2]+t[2][0])/a,s=(t[1][2]+t[2][1])/a,o=.25*a}return{w:n,x:r,y:s,z:o}}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),d=Math.sin(.5*e);return{w:c*a*s+d*l*o,x:d*a*s-c*l*o,y:c*l*s+d*a*o,z:c*a*o-d*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=Le.Z){return this.fromMatrix4(pse.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 Le{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 Le.len(Le.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=Le.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)}}}function QR(i,t,e,n){return r=>r.pipe(ZT((s,o)=>{var a;return{targetValue:o,currentValue:null!==(a=s.currentValue)&&void 0!==a?a:o,hasReachedTarget:!1}},{targetValue:null,currentValue:null,hasReachedTarget:!1}),Rs(s=>i.pipe(et(([o,a])=>{if(null===s.targetValue||null===s.currentValue)return s.currentValue;if(s.hasReachedTarget)return;const l=1-Math.exp(-a/t),c=e(s.currentValue,s.targetValue,l);return s.currentValue=c,n(c,s.targetValue)?(s.hasReachedTarget=!0,s.targetValue):c}))),et(s=>void 0!==s?s:null),vn(s=>null!==s))}ps(738);class _se extends Yh{get avgReport(){return this._avgReport}get peakReport(){return this._peakReport}constructor(t=60,e=15){super(),this.maxSamples=t,this.maxRows=e,this.tickOrder=Number.MAX_SAFE_INTEGER,this.sampleIndex=0,this.collectedData=new Map,this._avgReport={totalTime:0,entries:[]},this._peakReport={totalTime:0,entries:[]}}onSpawned(t){super.onSpawned(t),this.sampleIndex=0;const e=()=>(typeof performance>"u"?Date:performance).now();this.world.tickForwardTo$.pipe(We(this.onRemoved$)).subscribe(n=>{n!==this&&(this.collectedData.has(n)?this.collectedData.get(n).push([this.sampleIndex,e(),0]):this.collectedData.set(n,[[this.sampleIndex,e(),0]]))}),this.world.tickForwardedTo$.pipe(We(this.onRemoved$)).subscribe(n=>{if(n===this)return;const r=this.collectedData.get(n);r[r.length-1][2]=e()}),this.tick$.pipe(We(this.onRemoved$)).subscribe(()=>{this.sampleIndex++;const n=Array.from(this.collectedData.entries());for(const[h,p]of n){for(;p.length>0&&p[0][0]h instanceof Yh?""===h.name?h.constructor.name:h.name:"PHYSICS_WORLD"===h?"Physics simulation":h,s=h=>{let p=0,m=0;for(;mh.length-m+1){m--;break}p+=h[h.length-m-1][1]}return m>1&&(h=h.slice(0,h.length-m)).push([`Rest (${m})`,p]),h};let o=0,a=Array.from(this.collectedData.entries()).map(([h,p])=>{const m=p.reduce((g,[b,v,y])=>g+y-v,0)/this.maxSamples;return o+=m,[r(h),m]}).sort((h,p)=>p[1]-h[1]);a=s(a),this._avgReport={totalTime:o,entries:a};let l=new Map,c=Array.from(this.collectedData.entries()).map(([h,p])=>{let m=0;for(const[g,b,v]of p){const y=v-b;m=Math.max(m,y),l.set(g,y+(l.get(g)||0))}return[r(h),m]}).sort((h,p)=>p[1]-h[1]);c=s(c);let d=Array.from(l.values()).reduce((h,p)=>Math.max(h,p),0);this._peakReport={totalTime:d,entries:c}})}onRemoved(){super.onRemoved(),this.collectedData=new Map,this._avgReport={totalTime:0,entries:[]},this._peakReport={totalTime:0,entries:[]}}}var jm=function(i,t,e,n){return new(e||(e=Promise))(function(s,o){function a(d){try{c(n.next(d))}catch(h){o(h)}}function l(d){try{c(n.throw(d))}catch(h){o(h)}}function c(d){d.done?s(d.value):function r(s){return s instanceof e?s:new e(function(o){o(s)})}(d.value).then(a,l)}c((n=n.apply(i,t||[])).next())})};class ul{static get documentWorlds(){return[...ul._documentWorlds]}constructor(t,e){this.visualScene=t,this.physicsWorld=e,this.worldClock=new HH(!1),this.keyboardInput=new bC,this.name="w0x"+(ul.default_name_counter++).toString(16),this.children=[],this.tickListeners=[],this.tickStarted$=new Re,this.tickForwardTo$=new Re,this.tickForwardedTo$=new Re,this.paused$=new Re,this.disposed$=new Re,this.keyboardInput.start(),window.ggstatic?this.registerConsoleCommands(window.ggstatic):(this.onGgStaticInitialized=this.onGgStaticInitialized.bind(this),window.addEventListener("ggstatic_added",this.onGgStaticInitialized)),this.worldClock.paused$.subscribe(this.paused$),ul._documentWorlds.push(this),ul.worldCreated$.next(this)}init(){return jm(this,void 0,void 0,function*(){yield Promise.all([this.physicsWorld.init(),this.visualScene.init()]);const t=(e,n,r)=>{e.active&&(this.tickForwardTo$.next(e),e.tick$.next([n,r]),this.tickForwardedTo$.next(e))};this.worldClock.tick$.subscribe(([e,n])=>{this.tickStarted$.next();let r=0;for(;r=Kl.PHYSICS_SIMULATION);r++)t(this.tickListeners[r],e,n);for(this.tickForwardTo$.next("PHYSICS_WORLD"),this.physicsWorld.simulate(n),this.tickForwardedTo$.next("PHYSICS_WORLD");re.tickOrder-n.tickOrder),t.onSpawned(this))}removeEntity(t,e=!1){if(t.world){if(t.world!==this)throw new Error("Entity is not a part of this world");this.children.splice(this.children.findIndex(n=>n===t),1),this.tickListeners.splice(this.tickListeners.findIndex(n=>n===t),1),t.onRemoved()}e&&t.dispose()}onGgStaticInitialized(){window.removeEventListener("ggstatic_added",this.onGgStaticInitialized),this.registerConsoleCommands(window.ggstatic)}registerConsoleCommands(t){t.registerConsoleCommand(this,"timescale",(...e)=>jm(this,void 0,void 0,function*(){return isNaN(+e[0])||(this.worldClock.timeScale=+e[0]),this.worldClock.timeScale.toString()}),"args: [ float? ]; Get current time scale of selected world clock or set it. Default value is 1.0 (no time scale applied)"),t.registerConsoleCommand(this,"fps_limit",(...e)=>jm(this,void 0,void 0,function*(){return isNaN(+e[0])||(this.worldClock.tickRateLimit=+e[0]),this.worldClock.tickRateLimit.toString()}),"args: [ int? ]; Get current tick rate limit of selected world clock or set it. 0 means no limit applied"),t.registerConsoleCommand(this,"renderers",()=>jm(this,void 0,void 0,function*(){return this.children.filter(e=>e instanceof qR).map(e=>e.name).join("\n")}),"no args; Print all renderers in selected world"),t.registerConsoleCommand(this,"debug_view",(...e)=>jm(this,void 0,void 0,function*(){let r,n="toggle";for(let o of e)["1","0"].includes(o)?n="1"===o:r=o;let s=this.children.find(o=>o instanceof qR&&(!r||o.name===r));if(s)return s.physicsDebugViewActive="toggle"===n?!s.physicsDebugViewActive:n,s.physicsDebugViewActive?"1":"0";throw r?new Error(`Renderer with name "${r}" not found`):new Error("No renderer found")}),'args: [ 0|1?, string? ]; Turn on/off physics debug view, skip first argument to toggle value. Second argument expects renderer name, if not provided first renderer will be picked. Use "renderers" to get list of renderers in the world'),t.registerConsoleCommand(this,"performance",(...e)=>jm(this,void 0,void 0,function*(){let n="avg",r=20;for(let d of e)["avg","peak"].includes(d)?n=d:isNaN(+d)||(r=+d);const s=new _se(r,250);this.addEntity(s),yield function mse(i,t){const e="object"==typeof t;return new Promise((n,r)=>{let o,s=!1;i.subscribe({next:a=>{o=a,s=!0},error:r,complete:()=>{s?n(o):e?n(t.defaultValue):r(new um)}})})}(this.worldClock.tick$.pipe(Oi(r)));const o="avg"===n?s.avgReport:s.peakReport;this.removeEntity(s);const a=o.entries.map(([d,h])=>`${d}:`+new Array(Math.max(0,26-d.length)).join(" ")+`${h.toFixed(2)} ms`+("avg"===n?` (${(100*h/o.totalTime).toFixed(2)}%)`:""));let l="lightgreen";o.totalTime>12&&(l=o.totalTime<16?"yellow":"red");const c=("avg"===n?"Average":"Peak")+" Frame time";return a.unshift(c+":"+new Array(Math.max(0,26-c.length)).join(" ")+`${o.totalTime.toFixed(2)} ms`),a.unshift(`Performance report (${r} samples)`),a.join("\n")}),'args: [ int?, avg|peak? ]; Measure how much time was spent per entity in world. Arguments are samples amount (20 by default) and "peak" or "avg" choice, both arguments are optional. "avg" report sorts entities by average time consumed, "peak" records highest value for each entity')}}ul.default_name_counter=0,ul._documentWorlds=[],ul.worldCreated$=new Re;class xse extends lse{}class WH extends dse{constructor(){super(...arguments),this._world=null}get world(){return this._world}}class mu extends WH{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}constructor(t){super(),this.tickOrder=Kl.OBJECTS_BINDING,this._position=Le.O,this._rotation=gr.O,this.object3D=null,this.objectBody=null,t.objectBody&&(this.objectBody=t.objectBody,this.name=this.objectBody.name,this.addComponents(this.objectBody)),t.object3D&&(this.object3D=t.object3D,t.objectBody||(this._position=this.object3D.position,this._rotation=this.object3D.rotation,this.name=this.object3D.name),this.addComponents(this.object3D)),this.objectBody&&(this.tick$.subscribe(()=>{this.runTransformBinding(this.objectBody,this.object3D)}),this.runTransformBinding(this.objectBody,this.object3D))}}class ub extends db{static fromMapArray(t,e=!1){const n=new ub(t[0]);let r=n;for(let s=1;sn.map(r=>new ub(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));othis.mapGraph.getNearestDummy(this.mapGraphNodes,this.loaderCursor$.getValue())),zc(),Vi(r=>this._nearestDummy$.next(r))).subscribe(r=>{let o,s=new Set;if(this.options.inertia>0){o=new Set;const a=r.walkReadPreserveDepth(this.options.loadDepth+this.options.inertia);for(let l=0;lo.add(c.data)),l<=this.options.loadDepth&&a[l].forEach(c=>s.add(c.data))}else r.walkRead(this.options.loadDepth).forEach(a=>s.add(a.data)),o=s;for(const a of this.loaded.keys())o.has(a)?s.delete(a):n.includes(a)||n.push(a);for(let a of Array.from(s.keys()))e.includes(a)||e.push(a)}),this.tick$.pipe(Eo(null),We(this._onRemoved$)).subscribe(()=>{if(n.length){for(const r of n)this.disposeChunk(r);n=[]}if(e.length)if(this._initialLoadComplete$.value&&e.length>this.options.maxNodesLoadingPerTick){let r=e.slice(0,this.options.maxNodesLoadingPerTick);e=e.slice(this.options.maxNodesLoadingPerTick),Promise.all(r.map(s=>this.loadChunk(s))).then()}else Promise.all(e.map(r=>this.loadChunk(r))).then(()=>{this._initialLoadComplete$.value||this._initialLoadComplete$.next(!0)}),e=[]})}onRemoved(){super.onRemoved(),this.loadClock&&(this.loadClock.stop(),this.loadClock=null),this.loaderCursor$.next(Le.O)}loadChunk(t){return function(i,t,e,n){return new(e||(e=Promise))(function(s,o){function a(d){try{c(n.next(d))}catch(h){o(h)}}function l(d){try{c(n.throw(d))}catch(h){o(h)}}function c(d){d.done?s(d.value):function r(s){return s instanceof e?s:new e(function(o){o(s)})}(d.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 Sse extends qR{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 XH=function(i,t,e,n){return new(e||(e=Promise))(function(s,o){function a(d){try{c(n.next(d))}catch(h){o(h)}}function l(d){try{c(n.throw(d))}catch(h){o(h)}}function c(d){d.done?s(d.value):function r(s){return s instanceof e?s:new e(function(o){o(s)})}(d.value).then(a,l)}c((n=n.apply(i,t||[])).next())})};const KH={keymap:"wasd",cameraLinearSpeed:20,cameraMovementElasticity:0,cameraBoostMultiplier:2.5,cameraRotationSensitivity:1,cameraRotationElasticity:0,mouseOptions:{},ignoreMouseUnlessPointerLocked:!1,ignoreKeyboardUnlessPointerLocked:!1};class Ase extends Yh{get active(){return super.active}set active(t){!super.active&&t&&this.reset(),super.active=t}get spherical(){return this._spherical}set spherical(t){this._spherical.phi=Math.max(1e-6,Math.min(Math.PI-1e-6,t.phi)),this._spherical.theta=t.theta,this.resetMotion$.next()}constructor(t,e,n={}){super(),this.keyboard=t,this.camera=e,this.tickOrder=Kl.INPUT_CONTROLLERS,this._spherical={phi:0,radius:1,theta:0},this.resetMotion$=new Re,this.options=Object.assign(Object.assign({},KH),n),n.mouseOptions&&(this.options.mouseOptions=Object.assign(Object.assign({},KH.mouseOptions),n.mouseOptions)),this.mouseInput=new Wm(this.options.mouseOptions),this.directionsInput=new use(t,this.options.keymap)}reset(){this._spherical=Le.toSpherical(Le.rot({x:0,y:0,z:-1},this.camera.rotation)),this.resetMotion$.next()}onSpawned(t){const e=Object.create(null,{onSpawned:{get:()=>super.onSpawned}});return XH(this,void 0,void 0,function*(){yield e.onSpawned.call(this,t),this._spherical=Le.toSpherical(Le.rot({x:0,y:0,z:-1},this.camera.rotation));const n=["KeyE","KeyQ"];this.camera.camera.supportsFov&&n.push("KeyZ","KeyC"),n.push("ShiftLeft");let r=Hl([this.directionsInput.output$,...n.map(c=>this.keyboard.bind(c))]).pipe(We(this._onRemoved$),et(([c,...d])=>{let h={direction:{},rest:[]};(!this.options.ignoreKeyboardUnlessPointerLocked||this.mouseInput.isPointerLocked)&&(h={direction:c,rest:d});let p=Object.assign({},Le.O);const[m,g,b,v,y]=h.rest;void 0!==h.direction.upDown&&(p.z=h.direction.upDown?-1:1),void 0!==h.direction.leftRight&&(p.x=h.direction.leftRight?-1:1),m!=g&&(p.y=g?-1:1);let M=0;return b!=v&&(M=b?1:-1),p=Le.norm(p),y&&(p=Le.scalarMult(p,this.options.cameraBoostMultiplier)),[p,M]}));this.options.cameraMovementElasticity>0&&(r=r.pipe(QR(this.camera.tick$,this.options.cameraMovementElasticity,([c,d],[h,p],m)=>[Le.lerp(c,h,m),p],([c,d],[h,p])=>d==p&&Le.dist(c,h)<.001)));let s=Le.O,o=0;r.subscribe(([c,d])=>{s=c,o=d});let a=Wm.isTouchDevice(),l=this.mouseInput.delta$.pipe(We(this._onRemoved$),vn(()=>this.active&&(a||!this.options.ignoreMouseUnlessPointerLocked||this.mouseInput.isPointerLocked)));if(this.options.cameraRotationElasticity>0){const c=new wt(this._spherical);l.subscribe(h=>{const p=c.getValue();c.next({phi:Math.max(1e-6,Math.min(Math.PI-1e-6,p.phi+h.y*this.options.cameraRotationSensitivity/1e3)),theta:p.theta-h.x*this.options.cameraRotationSensitivity/1e3,radius:1})});const d=()=>{c.pipe(We(this._onRemoved$),QR(this.tick$,this.options.cameraRotationElasticity,(h,p,m)=>({phi:h.phi+m*(p.phi-h.phi),theta:h.theta+m*(p.theta-h.theta),radius:1}),(h,p)=>vi.dist({x:h.phi,y:h.theta},{x:p.phi,y:p.theta})<1e-4),We(this.resetMotion$)).subscribe(h=>{this._spherical.theta=h.theta,this._spherical.phi=h.phi})};this.resetMotion$.pipe(We(this._onRemoved$)).subscribe(()=>{c.next(this._spherical),d()}),d()}else l.subscribe(c=>{this._spherical.theta-=c.x*this.options.cameraRotationSensitivity/1e3,this._spherical.phi+=c.y*this.options.cameraRotationSensitivity/1e3,this._spherical.phi=Math.max(1e-6,Math.min(Math.PI-1e-6,this._spherical.phi))});this.camera.tick$.pipe(We(this._onRemoved$),vn(()=>this.active)).subscribe(([c,d])=>{this.camera.camera.fov+=o,this.camera.position=Le.add(this.camera.position,Le.rot(Le.scalarMult(s,this.options.cameraLinearSpeed*d/1e3),this.camera.rotation)),this.camera.rotation=gr.lookAt(this.camera.position,Le.add(this.camera.position,Le.fromSpherical(this._spherical)))}),this.mouseInput.start(),this.directionsInput.start()})}onRemoved(){const t=Object.create(null,{onRemoved:{get:()=>super.onRemoved}});return XH(this,void 0,void 0,function*(){yield t.onRemoved.call(this),yield this.mouseInput.stop(!0),yield this.directionsInput.stop()})}}var ZH=function(i,t,e,n){return new(e||(e=Promise))(function(s,o){function a(d){try{c(n.next(d))}catch(h){o(h)}}function l(d){try{c(n.throw(d))}catch(h){o(h)}}function c(d){d.done?s(d.value):function r(s){return s instanceof e?s:new e(function(o){o(s)})}(d.value).then(a,l)}c((n=n.apply(i,t||[])).next())})};const Dse={mouseOptions:{},orbiting:{sensitivityX:1,sensitivityY:1},orbitingElasticity:0,zooming:{sensitivity:1},panning:{sensitivityX:1,sensitivityY:1},dollying:{sensitivity:1}};class Tse extends Yh{get active(){return super.active}set active(t){!super.active&&t&&this.reset(),super.active=t}get spherical(){return this._spherical}set spherical(t){this._spherical.phi=Math.max(1e-6,Math.min(Math.PI-1e-6,t.phi)),this._spherical.theta=t.theta,this._spherical.radius=t.radius,this.resetMotion$.next()}constructor(t,e={}){super(),this.camera=t,this.tickOrder=Kl.INPUT_CONTROLLERS,this._spherical={phi:0,radius:10,theta:0},this.target=Le.O,this.resetMotion$=new Re,this.options=Object.assign(Object.assign({},Dse),e),this.mouseInput=new Wm(this.options.mouseOptions)}reset(){let t=Le.dist(this.target,this.camera.position);this.target=Le.add(this.camera.position,Le.rot({x:0,y:0,z:-t},this.camera.rotation)),this._spherical=Le.toSpherical(Le.sub(this.camera.position,this.target)),this.resetMotion$.next()}onSpawned(t){const e=Object.create(null,{onSpawned:{get:()=>super.onSpawned}});return ZH(this,void 0,void 0,function*(){if(yield e.onSpawned.call(this,t),this._spherical=Le.toSpherical(Le.sub(this.camera.position,this.target)),this.options.orbiting){let r=this.mouseInput.delta$.pipe(We(this._onRemoved$),vn(()=>this.active&&this.mouseInput.state==Fs.DRAG));if(this.options.orbitingElasticity>0){const s=new wt(this._spherical);r.subscribe(a=>{const l=s.getValue();s.next({phi:Math.max(1e-6,Math.min(Math.PI-1e-6,l.phi-a.y*this.options.orbiting.sensitivityY/1e3)),theta:l.theta-a.x*this.options.orbiting.sensitivityX/1e3,radius:1})});const o=()=>{s.pipe(We(this._onRemoved$),QR(this.tick$,this.options.orbitingElasticity,(a,l,c)=>({phi:a.phi+c*(l.phi-a.phi),theta:a.theta+c*(l.theta-a.theta),radius:1}),(a,l)=>vi.dist({x:a.phi,y:a.theta},{x:l.phi,y:l.theta})<1e-4),We(this.resetMotion$)).subscribe(a=>{this._spherical.theta=a.theta,this._spherical.phi=a.phi})};this.resetMotion$.pipe(We(this._onRemoved$)).subscribe(()=>{s.next(this._spherical),o()}),o()}else r.subscribe(s=>{this._spherical.theta-=s.x*this.options.orbiting.sensitivityX/1e3,this._spherical.phi-=s.y*this.options.orbiting.sensitivityY/1e3,this._spherical.phi=Math.max(1e-6,Math.min(Math.PI-1e-6,this._spherical.phi))})}this.options.zooming&&this.mouseInput.wheel$.pipe(We(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=Le.fromSpherical(this._spherical),o=Le.rotAround(s,{x:-Math.sin(this._spherical.theta),y:Math.cos(this._spherical.theta),z:0},Math.PI/2),a=Le.rotAround(s,Le.norm(o),Math.PI/2);this.target=Le.add(this.target,Le.add(Le.scalarMult(o,-this.options.panning.sensitivityY*r.y/1e3),Le.scalarMult(a,this.options.panning.sensitivityX*r.x/1e3)))};this.options.panning&&this.mouseInput.delta$.pipe(We(this._onRemoved$),vn(()=>this.mouseInput.state==Fs.DRAG_RIGHT_BUTTON)).subscribe(r=>{n(r)}),this.options.dollying&&this.mouseInput.delta$.pipe(We(this._onRemoved$),vn(()=>this.mouseInput.state==Fs.DRAG_MIDDLE_BUTTON)).subscribe(r=>{this._spherical.radius*=Math.pow(.95,-this.options.dollying.sensitivity*r.y/10)}),Wm.isTouchDevice()&&(this.options.dollying||this.options.panning)&&this.mouseInput.twoTouchGestureDelta$.pipe(We(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(We(this._onRemoved$),vn(()=>this.active),et(()=>this._spherical)).subscribe(r=>{this.camera.position=Le.add(this.target,Le.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 ZH(this,void 0,void 0,function*(){yield t.onRemoved.call(this),yield this.mouseInput.stop(!0)})}}class Rse{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 tk=function(i,t,e,n){return new(e||(e=Promise))(function(s,o){function a(d){try{c(n.next(d))}catch(h){o(h)}}function l(d){try{c(n.throw(d))}catch(h){o(h)}}function c(d){d.done?s(d.value):function r(s){return s instanceof e?s:new e(function(o){o(s)})}(d.value).then(a,l)}c((n=n.apply(i,t||[])).next())})},gu=(()=>{return(i=gu||(gu={}))[i.Nothing=0]="Nothing",i[i.Files=1]="Files",i[i.Entities=2]="Entities",gu;var i})();const QH={cachingStrategy:gu.Nothing,position:Le.O,rotation:gr.O,loadProps:!0},JH=i=>({meta:i.meta,resources:i.resources.map(({object3D:t,body:e})=>({object3D:t&&t.clone(),body:e&&e.clone()}))});class kse{constructor(t){this.world=t,this.filesCache=new Map,this.loadResultCache=new Map}loadGgGlbFiles(t){return tk(this,arguments,void 0,function*(e,n=!1){if(n&&this.filesCache.has(e))return this.filesCache.get(e);const r=Promise.all([fetch(`${e}.glb`).then(o=>o.arrayBuffer()),fetch(`${e}.meta`).then(o=>o.text()).then(o=>JSON.parse(o))]);n&&this.filesCache.set(e,r);const s=yield r;return n&&this.filesCache.set(e,s),s})}loadGgGlbResources(t){return tk(this,arguments,void 0,function*(e,n=gu.Nothing){if(n==gu.Entities&&this.loadResultCache.has(e)){const c=this.loadResultCache.get(e),d=c instanceof Promise?yield c:c;return JH(d)}const[r,s]=yield this.loadGgGlbFiles(e,n==gu.Files);if(!r)throw new Error("GLB not found");const[o,a]=yield Promise.all([this.world.visualScene.loader.loadFromGgGlb(r,s),this.world.physicsWorld.loader.loadFromGgGlb(r,s)]),l={resources:[],meta:s};if(!o)return l;if(0==a.length)l.resources.push({object3D:o,body:null});else if(1==a.length)l.resources.push({object3D:o,body:a[0]});else{for(const c of a)l.resources.push({object3D:o.popChild(c.name),body:c});o.isEmpty()||l.resources.push({object3D:o,body:null})}return n==gu.Entities&&this.loadResultCache.set(e,JH(l)),l})}loadGgGlb(t){return tk(this,arguments,void 0,function*(e,n=QH){const r=Object.assign(Object.assign({},QH),n),{resources:s,meta:o}=yield this.loadGgGlbResources(e,r.cachingStrategy),a={entities:s.map(l=>new mu({object3D:l.object3D,objectBody:l.body})),meta:o};return r.loadProps&&(a.props=yield Promise.all(o.dummies.filter(l=>l.is_prop||l.is_scene).map(l=>this.loadGgGlb(l.is_prop?(r.propsPath||e.substring(0,e.lastIndexOf("/")+1))+l.prop_id:l.scene_id,{loadProps:!!l.is_scene,position:Le.add(Le.rot(l.position,r.rotation),r.position),rotation:gr.combineRotations(l.rotation,r.rotation)})))),a.entities.forEach(l=>{l.position=Le.add(Le.rot(Le.clone(l.position),r.rotation),r.position),l.rotation=gr.mult(gr.clone(l.rotation),r.rotation)}),a})}}class e4 extends ul{constructor(t,e){super(t,e),this.visualScene=t,this.physicsWorld=e,this.loader=new kse(this)}addPrimitiveRigidBody(t,e=Le.O,n=gr.O,r={}){const s=new mu({object3D:this.visualScene.factory.createPrimitive(t.shape,r),objectBody:this.physicsWorld.factory.createRigidBody(t)});return s.position=e,s.rotation=n,this.addEntity(s),s}addRenderer(t,e,n){const r=new Sse(this.visualScene.createRenderer(t,e,n));return this.addEntity(r),r}registerConsoleCommands(t){super.registerConsoleCommands(t),t.registerConsoleCommand(this,"gravity",(...e)=>function(i,t,e,n){return new(e||(e=Promise))(function(s,o){function a(d){try{c(n.next(d))}catch(h){o(h)}}function l(d){try{c(n.throw(d))}catch(h){o(h)}}function c(d){d.done?s(d.value):function r(s){return s instanceof e?s:new e(function(o){o(s)})}(d.value).then(a,l)}c((n=n.apply(i,t||[])).next())})}(this,void 0,void 0,function*(){if(1==e.length&&(e=["0","0",""+-+e[0]]),e.length>0){if(isNaN(+e[0])||isNaN(+e[1])||isNaN(+e[2]))throw new Error("Wrong arguments");this.physicsWorld.gravity={x:+e[0],y:+e[1],z:+e[2]}}return JSON.stringify(this.physicsWorld.gravity)}),'args: [ ?float, ?float, ?float ]; Get or set 3D world gravity vector. 1 argument sets vector {x: 0, y: 0, z: -value}, 3 arguments set the whole vector. Default value is "9.82" or "0 0 -9.82"')}}window.gg_version="0.0.56";const Lse=0,t4=1,Nse=2,n4=1,i4=2,qc=3,Ql=0,To=1,Ko=2,Xc=0,Ym=1,r4=2,s4=3,o4=4,Bse=5,qh=100,Use=101,Vse=102,zse=103,Hse=104,Gse=200,$se=201,Wse=202,jse=203,ik=204,rk=205,Yse=206,qse=207,Xse=208,Kse=209,Zse=210,Qse=211,Jse=212,eoe=213,toe=214,noe=0,ioe=1,roe=2,xC=3,soe=4,ooe=5,aoe=6,loe=7,wC=0,coe=1,doe=2,_u=0,uoe=1,hoe=2,foe=3,poe=4,moe=5,goe=6,_oe=7,a4="attached",Kc=301,Xh=302,MC=303,CC=304,hb=306,Jl=1e3,Zi=1001,fb=1002,_r=1003,ok=1004,qm=1005,ar=1006,pb=1007,hl=1008,Zc=1009,l4=1010,c4=1011,mb=1012,ak=1013,vu=1014,Zo=1015,Xm=1016,lk=1017,ck=1018,Km=1020,d4=35902,u4=1021,h4=1022,Io=1023,f4=1024,p4=1025,Zm=1026,Qm=1027,dk=1028,SC=1029,m4=1030,uk=1031,hk=1033,EC=33776,AC=33777,DC=33778,TC=33779,fk=35840,pk=35841,mk=35842,gk=35843,_k=36196,vk=37492,yk=37496,bk=37808,xk=37809,wk=37810,Mk=37811,Ck=37812,Sk=37813,Ek=37814,Ak=37815,Dk=37816,Tk=37817,Ik=37818,Rk=37819,kk=37820,Pk=37821,IC=36492,Ok=36494,Fk=36495,g4=36283,Lk=36284,Nk=36285,Bk=36286,gb=2300,_b=2301,woe=0,v4=1,zk=2,Coe=3201,Kh=0,Soe=1,yu="",cs="srgb",ds="srgb-linear",Hk="display-p3",kC="display-p3-linear",PC="linear",Fi="srgb",OC="rec709",FC="p3",tg=7680,Eoe=512,Aoe=513,Doe=514,b4=515,Toe=516,Ioe=517,Roe=518,koe=519,x4="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]+Ls[i>>16&255]+Ls[i>>24&255]+"-"+Ls[255&t]+Ls[t>>8&255]+"-"+Ls[t>>16&15|64]+Ls[t>>24&255]+"-"+Ls[63&e|128]+Ls[e>>8&255]+"-"+Ls[e>>16&255]+Ls[e>>24&255]+Ls[255&n]+Ls[n>>8&255]+Ls[n>>16&255]+Ls[n>>24&255]).toLowerCase()}function Qi(i,t,e){return Math.max(t,Math.min(e,i))}function Gk(i,t){return(i%t+t)%t}function vb(i,t,e){return(1-e)*i+e*t}function ao(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 yn(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 Xoe_radToDeg=function $oe(i){return i*ig};class xe{constructor(t=0,e=0){xe.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(Qi(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 wn{constructor(t,e,n,r,s,o,a,l,c){wn.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 d=this.elements;return d[0]=t,d[1]=r,d[2]=a,d[3]=e,d[4]=s,d[5]=l,d[6]=n,d[7]=o,d[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],d=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],F=r[2],D=r[5],k=r[8];return s[0]=o*b+a*M+l*F,s[3]=o*v+a*x+l*D,s[6]=o*y+a*C+l*k,s[1]=c*b+d*M+h*F,s[4]=c*v+d*x+h*D,s[7]=c*y+d*C+h*k,s[2]=p*b+m*M+g*F,s[5]=p*v+m*x+g*D,s[8]=p*y+m*C+g*k,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],d=t[8];return e*o*d-e*a*c-n*s*d+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],d=t[8],h=d*o-a*c,p=a*l-d*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-d*n)*b,t[2]=(a*n-r*o)*b,t[3]=p*b,t[4]=(d*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($k.makeScale(t,e)),this}rotate(t){return this.premultiply($k.makeRotation(-t)),this}translate(t,e){return this.premultiply($k.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 $k=new wn;function M4(i){for(let t=i.length-1;t>=0;--t)if(i[t]>=65535)return!0;return!1}function yb(i){return document.createElementNS("http://www.w3.org/1999/xhtml",i)}function Zoe(){const i=yb("canvas");return i.style.display="block",i}Int8Array,Uint8Array,Uint8ClampedArray,Int16Array,Uint16Array,Int32Array,Uint32Array,Float32Array,Float64Array;const C4={};function sg(i){i in C4||(C4[i]=!0,console.warn(i))}const S4=(new wn).set(.8224621,.177538,0,.0331941,.9668058,0,.0170827,.0723974,.9105199),E4=(new wn).set(1.2249401,-.2249404,0,-.0420569,1.0420571,0,-.0196376,-.0786361,1.0982735),bb={[ds]:{transfer:PC,primaries:OC,luminanceCoefficients:[.2126,.7152,.0722],toReference:i=>i,fromReference:i=>i},[cs]:{transfer:Fi,primaries:OC,luminanceCoefficients:[.2126,.7152,.0722],toReference:i=>i.convertSRGBToLinear(),fromReference:i=>i.convertLinearToSRGB()},[kC]:{transfer:PC,primaries:FC,luminanceCoefficients:[.2289,.6917,.0793],toReference:i=>i.applyMatrix3(E4),fromReference:i=>i.applyMatrix3(S4)},[Hk]:{transfer:Fi,primaries:FC,luminanceCoefficients:[.2289,.6917,.0793],toReference:i=>i.convertSRGBToLinear().applyMatrix3(E4),fromReference:i=>i.applyMatrix3(S4).convertLinearToSRGB()}},Joe=new Set([ds,kC]),Zn={enabled:!0,_workingColorSpace:ds,get workingColorSpace(){return this._workingColorSpace},set workingColorSpace(i){if(!Joe.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,bb[e].fromReference)((0,bb[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 bb[i].primaries},getTransfer:function(i){return i===yu?PC:bb[i].transfer},getLuminanceCoefficients:function(i,t=this._workingColorSpace){return i.fromArray(bb[t].luminanceCoefficients)}};function og(i){return i<.04045?.0773993808*i:Math.pow(.9478672986*i+.0521327014,2.4)}function Wk(i){return i<.0031308?12.92*i:1.055*Math.pow(i,.41666)-.055}let ag;class eae{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===ag&&(ag=yb("canvas")),ag.width=t.width,ag.height=t.height;const n=ag.getContext("2d");t instanceof ImageData?n.putImageData(t,0,0):n.drawImage(t,0,0,t.width,t.height),e=ag}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=yb("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=Zi,s=Zi,o=ar,a=hl,l=Io,c=Zc,d=i.DEFAULT_ANISOTROPY,h=yu){super(),this.isTexture=!0,Object.defineProperty(this,"id",{value:nae++}),this.uuid=Qo(),this.name="",this.source=new lg(e),this.mipmaps=[],this.mapping=n,this.channel=0,this.wrapS=r,this.wrapT=s,this.magFilter=o,this.minFilter=a,this.anisotropy=d,this.format=l,this.internalFormat=null,this.type=c,this.offset=new xe(0,0),this.repeat=new xe(1,1),this.center=new xe(0,0),this.rotation=0,this.matrixAutoUpdate=!0,this.matrix=new wn,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 Jl:e.x=e.x-Math.floor(e.x);break;case Zi:e.x=e.x<0?0:1;break;case fb: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 Jl:e.y=e.y-Math.floor(e.y);break;case Zi:e.y=e.y<0?0:1;break;case fb: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 gi{constructor(t=0,e=0,n=0,r=1){gi.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],d=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(d-p)<.01&&Math.abs(h-b)<.01&&Math.abs(g-v)<.01){if(Math.abs(d+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,F=(y+1)/2,D=(d+p)/4,k=(h+b)/4,B=(g+v)/4;return x>C&&x>F?x<.01?(n=0,r=.707106781,s=.707106781):(n=Math.sqrt(x),r=D/n,s=k/n):C>F?C<.01?(n=.707106781,r=0,s=.707106781):(r=Math.sqrt(C),n=D/r,s=B/r):F<.01?(n=.707106781,r=.707106781,s=0):(s=Math.sqrt(F),n=k/s,r=B/s),this.set(n,r,s,e),this}let M=Math.sqrt((v-g)*(v-g)+(h-b)*(h-b)+(p-d)*(p-d));return Math.abs(M)<.001&&(M=1),this.x=(v-g)/M,this.y=(h-b)/M,this.z=(p-d)/M,this.w=Math.acos((c+m+y-1)/2),this}setFromMatrixPosition(t){const e=t.elements;return this.x=e[12],this.y=e[13],this.z=e[14],this.w=e[15],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 iae extends ng{constructor(t=1,e=1,n={}){super(),this.isRenderTarget=!0,this.width=t,this.height=e,this.depth=1,this.scissor=new gi(0,0,t,e),this.scissorTest=!1,this.viewport=new gi(0,0,t,e);const r={width:t,height:e,depth:1};n=Object.assign({generateMipmaps:!1,internalFormat:null,minFilter:ar,depthBuffer:!0,stencilBuffer:!1,resolveDepthBuffer:!0,resolveStencilBuffer:!0,depthTexture:null,samples:0,count:1},n);const s=new Ro(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 F=Math.sqrt(x),D=Math.atan2(F,y*M);v=Math.sin(v*D)/F,a=Math.sin(a*D)/F}const C=a*M;if(l=l*v+p*C,c=c*v+m*C,d=d*v+g*C,h=h*v+b*C,v===1-a){const F=1/Math.sqrt(l*l+c*c+d*d+h*h);l*=F,c*=F,d*=F,h*=F}}t[e]=l,t[e+1]=c,t[e+2]=d,t[e+3]=h}static multiplyQuaternionsFlat(t,e,n,r,s,o){const a=n[r],l=n[r+1],c=n[r+2],d=n[r+3],h=s[o],p=s[o+1],m=s[o+2],g=s[o+3];return t[e]=a*g+d*h+l*m-c*p,t[e+1]=l*g+d*p+c*h-a*m,t[e+2]=c*g+d*m+a*p-l*h,t[e+3]=d*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),d=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*d*h+c*m*g,this._y=c*m*h-p*d*g,this._z=c*d*g+p*m*h,this._w=c*d*h-p*m*g;break;case"YXZ":this._x=p*d*h+c*m*g,this._y=c*m*h-p*d*g,this._z=c*d*g-p*m*h,this._w=c*d*h+p*m*g;break;case"ZXY":this._x=p*d*h-c*m*g,this._y=c*m*h+p*d*g,this._z=c*d*g+p*m*h,this._w=c*d*h-p*m*g;break;case"ZYX":this._x=p*d*h-c*m*g,this._y=c*m*h+p*d*g,this._z=c*d*g-p*m*h,this._w=c*d*h+p*m*g;break;case"YZX":this._x=p*d*h+c*m*g,this._y=c*m*h+p*d*g,this._z=c*d*g-p*m*h,this._w=c*d*h-p*m*g;break;case"XZY":this._x=p*d*h-c*m*g,this._y=c*m*h-p*d*g,this._z=c*d*g+p*m*h,this._w=c*d*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],d=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=(d-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=(d-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+d)/m}else{const m=2*Math.sqrt(1+h-n-a);this._w=(o-r)/m,this._x=(s+c)/m,this._y=(l+d)/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(Qi(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,d=e._w;return this._x=n*d+o*a+r*c-s*l,this._y=r*d+o*l+s*a-n*c,this._z=s*d+o*c+n*l-r*a,this._w=o*d-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),d=Math.atan2(c,a),h=Math.sin((1-e)*d)/c,p=Math.sin(e*d)/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 O{constructor(t=0,e=0,n=0){O.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(D4.setFromEuler(t))}applyAxisAngle(t,e){return this.applyQuaternion(D4.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),d=2*(a*e-s*r),h=2*(s*n-o*e);return this.x=e+l*c+o*h-a*d,this.y=n+l*d+a*c-s*h,this.z=r+l*h+s*d-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 qk.copy(this).projectOnVector(t),this.sub(qk)}reflect(t){return this.sub(qk.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(Qi(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 qk=new O,D4=new lo;class Ns{constructor(t=new O(1/0,1/0,1/0),e=new O(-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;e=this.min.x&&t.x<=this.max.x&&t.y>=this.min.y&&t.y<=this.max.y&&t.z>=this.min.z&&t.z<=this.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.x>=this.min.x&&t.min.x<=this.max.x&&t.max.y>=this.min.y&&t.min.y<=this.max.y&&t.max.z>=this.min.z&&t.min.z<=this.max.z}intersectsSphere(t){return this.clampPoint(t.center,fl),fl.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(xb),UC.subVectors(this.max,xb),cg.subVectors(t.a,xb),dg.subVectors(t.b,xb),ug.subVectors(t.c,xb),xu.subVectors(dg,cg),wu.subVectors(ug,dg),Qh.subVectors(cg,ug);let e=[0,-xu.z,xu.y,0,-wu.z,wu.y,0,-Qh.z,Qh.y,xu.z,0,-xu.x,wu.z,0,-wu.x,Qh.z,0,-Qh.x,-xu.y,xu.x,0,-wu.y,wu.x,0,-Qh.y,Qh.x,0];return!(!Xk(e,cg,dg,ug,UC)||(e=[1,0,0,0,1,0,0,0,1],!Xk(e,cg,dg,ug,UC)))&&(VC.crossVectors(xu,wu),e=[VC.x,VC.y,VC.z],Xk(e,cg,dg,ug,UC))}clampPoint(t,e){return e.copy(t).clamp(this.min,this.max)}distanceToPoint(t){return this.clampPoint(t,fl).distanceTo(t)}getBoundingSphere(t){return this.isEmpty()?t.makeEmpty():(this.getCenter(t.center),t.radius=.5*this.getSize(fl).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 O,new O,new O,new O,new O,new O,new O,new O],fl=new O,BC=new Ns,cg=new O,dg=new O,ug=new O,xu=new O,wu=new O,Qh=new O,xb=new O,UC=new O,VC=new O,Jh=new O;function Xk(i,t,e,n,r){for(let s=0,o=i.length-3;s<=o;s+=3){Jh.fromArray(i,s);const a=r.x*Math.abs(Jh.x)+r.y*Math.abs(Jh.y)+r.z*Math.abs(Jh.z),l=t.dot(Jh),c=e.dot(Jh),d=n.dot(Jh);if(Math.max(-Math.max(l,c,d),Math.min(l,c,d))>a)return!1}return!0}const rae=new Ns,wb=new O,Kk=new O;class Bs{constructor(t=new O,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):rae.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;wb.subVectors(t,this.center);const e=wb.lengthSq();if(e>this.radius*this.radius){const n=Math.sqrt(e),r=.5*(n-this.radius);this.center.addScaledVector(wb,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):(Kk.subVectors(t.center,this.center).setLength(t.radius),this.expandByPoint(wb.copy(t.center).add(Kk)),this.expandByPoint(wb.copy(t.center).sub(Kk))),this)}equals(t){return t.center.equals(this.center)&&t.radius===this.radius}clone(){return(new this.constructor).copy(this)}}const ed=new O,Zk=new O,zC=new O,Mu=new O,Qk=new O,HC=new O,Jk=new O;class Mb{constructor(t=new O,e=new O(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){Zk.copy(t).add(e).multiplyScalar(.5),zC.copy(e).sub(t).normalize(),Mu.copy(this.origin).sub(Zk);const s=.5*t.distanceTo(e),o=-this.direction.dot(zC),a=Mu.dot(this.direction),l=-Mu.dot(zC),c=Mu.lengthSq(),d=Math.abs(1-o*o);let h,p,m,g;if(d>0)if(h=o*l-a,p=o*a-l,g=s*d,h>=0)if(p>=-g)if(p<=g){const b=1/d;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(Zk).addScaledVector(zC,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,d=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),d>=0?(s=(t.min.y-p.y)*d,o=(t.max.y-p.y)*d):(s=(t.max.y-p.y)*d,o=(t.min.y-p.y)*d),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){Qk.subVectors(e,t),HC.subVectors(n,t),Jk.crossVectors(Qk,HC);let a,o=this.direction.dot(Jk);if(o>0){if(r)return null;a=1}else{if(!(o<0))return null;a=-1,o=-o}Mu.subVectors(this.origin,t);const l=a*this.direction.dot(HC.crossVectors(Mu,HC));if(l<0)return null;const c=a*this.direction.dot(Qk.cross(Mu));if(c<0||l+c>o)return null;const d=-a*Mu.dot(Jk);return d<0?null:this.at(d/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 Ft{constructor(t,e,n,r,s,o,a,l,c,d,h,p,m,g,b,v){Ft.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,d,h,p,m,g,b,v)}set(t,e,n,r,s,o,a,l,c,d,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]=d,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 Ft).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/hg.setFromMatrixColumn(t,0).length(),s=1/hg.setFromMatrixColumn(t,1).length(),o=1/hg.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),d=Math.cos(s),h=Math.sin(s);if("XYZ"===t.order){const p=o*d,m=o*h,g=a*d,b=a*h;e[0]=l*d,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*d,m=l*h,g=c*d,b=c*h;e[0]=p+b*a,e[4]=g*a-m,e[8]=o*c,e[1]=o*h,e[5]=o*d,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*d,m=l*h,g=c*d,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*d,e[9]=b-p*a,e[2]=-o*c,e[6]=a,e[10]=o*l}else if("ZYX"===t.order){const p=o*d,m=o*h,g=a*d,b=a*h;e[0]=l*d,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*d,e[4]=b-p*h,e[8]=g*h+m,e[1]=h,e[5]=o*d,e[9]=-a*d,e[2]=-c*d,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*d,e[4]=-h,e[8]=c*d,e[1]=p*h+b,e[5]=o*d,e[9]=m*h-g,e[2]=g*h-m,e[6]=a*d,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(sae,t,oae)}lookAt(t,e,n){const r=this.elements;return Jo.subVectors(t,e),0===Jo.lengthSq()&&(Jo.z=1),Jo.normalize(),Cu.crossVectors(n,Jo),0===Cu.lengthSq()&&(1===Math.abs(n.z)?Jo.x+=1e-4:Jo.z+=1e-4,Jo.normalize(),Cu.crossVectors(n,Jo)),Cu.normalize(),GC.crossVectors(Jo,Cu),r[0]=Cu.x,r[4]=GC.x,r[8]=Jo.x,r[1]=Cu.y,r[5]=GC.y,r[9]=Jo.y,r[2]=Cu.z,r[6]=GC.z,r[10]=Jo.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],d=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],F=n[15],D=r[0],k=r[4],B=r[8],T=r[12],A=r[1],$=r[5],ie=r[9],ne=r[13],se=r[2],ge=r[6],q=r[10],re=r[14],J=r[3],we=r[7],Be=r[11],Ye=r[15];return s[0]=o*D+a*A+l*se+c*J,s[4]=o*k+a*$+l*ge+c*we,s[8]=o*B+a*ie+l*q+c*Be,s[12]=o*T+a*ne+l*re+c*Ye,s[1]=d*D+h*A+p*se+m*J,s[5]=d*k+h*$+p*ge+m*we,s[9]=d*B+h*ie+p*q+m*Be,s[13]=d*T+h*ne+p*re+m*Ye,s[2]=g*D+b*A+v*se+y*J,s[6]=g*k+b*$+v*ge+y*we,s[10]=g*B+b*ie+v*q+y*Be,s[14]=g*T+b*ne+v*re+y*Ye,s[3]=M*D+x*A+C*se+F*J,s[7]=M*k+x*$+C*ge+F*we,s[11]=M*B+x*ie+C*q+F*Be,s[15]=M*T+x*ne+C*re+F*Ye,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],d=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*d-s*l*d)+t[11]*(+e*c*h-e*a*m-s*o*h+n*o*m+s*a*d-n*c*d)+t[15]*(-r*a*d-e*l*h+e*a*p+r*o*h-n*o*p+n*l*d)}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],d=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-d*v*c-g*l*m+o*v*m+d*l*y-o*p*y,C=d*b*c-g*h*c+g*a*m-o*b*m-d*a*y+o*h*y,F=g*h*l-d*b*l-g*a*p+o*b*p+d*a*v-o*h*v,D=e*M+n*x+r*C+s*F;if(0===D)return this.set(0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0);const k=1/D;return t[0]=M*k,t[1]=(b*p*s-h*v*s-b*r*m+n*v*m+h*r*y-n*p*y)*k,t[2]=(a*v*s-b*l*s+b*r*c-n*v*c-a*r*y+n*l*y)*k,t[3]=(h*l*s-a*p*s-h*r*c+n*p*c+a*r*m-n*l*m)*k,t[4]=x*k,t[5]=(d*v*s-g*p*s+g*r*m-e*v*m-d*r*y+e*p*y)*k,t[6]=(g*l*s-o*v*s-g*r*c+e*v*c+o*r*y-e*l*y)*k,t[7]=(o*p*s-d*l*s+d*r*c-e*p*c-o*r*m+e*l*m)*k,t[8]=C*k,t[9]=(g*h*s-d*b*s-g*n*m+e*b*m+d*n*y-e*h*y)*k,t[10]=(o*b*s-g*a*s+g*n*c-e*b*c-o*n*y+e*a*y)*k,t[11]=(d*a*s-o*h*s-d*n*c+e*h*c+o*n*m-e*a*m)*k,t[12]=F*k,t[13]=(d*b*r-g*h*r+g*n*p-e*b*p-d*n*v+e*h*v)*k,t[14]=(g*a*r-o*b*r-g*n*l+e*b*l+o*n*v-e*a*v)*k,t[15]=(o*h*r-d*a*r+d*n*l-e*h*l-o*n*p+e*a*p)*k,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,d=s*a;return this.set(c*o+n,c*a-r*l,c*l+r*a,0,c*a+r*l,d*a+n,d*l-r*o,0,c*l-r*a,d*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,d=o+o,h=a+a,p=s*c,m=s*d,g=s*h,b=o*d,v=o*h,y=a*h,M=l*c,x=l*d,C=l*h,F=n.x,D=n.y,k=n.z;return r[0]=(1-(b+y))*F,r[1]=(m+C)*F,r[2]=(g-x)*F,r[3]=0,r[4]=(m-C)*D,r[5]=(1-(p+y))*D,r[6]=(v+M)*D,r[7]=0,r[8]=(g+x)*k,r[9]=(v-M)*k,r[10]=(1-(p+b))*k,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=hg.set(r[0],r[1],r[2]).length();const o=hg.set(r[4],r[5],r[6]).length(),a=hg.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],pl.copy(this);const c=1/s,d=1/o,h=1/a;return pl.elements[0]*=c,pl.elements[1]*=c,pl.elements[2]*=c,pl.elements[4]*=d,pl.elements[5]*=d,pl.elements[6]*=d,pl.elements[8]*=h,pl.elements[9]*=h,pl.elements[10]*=h,e.setFromRotationMatrix(pl),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),d=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]=d,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),d=1/(n-r),h=1/(o-s),p=(e+t)*c,m=(n+r)*d;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*d,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 hg=new O,pl=new Ft,sae=new O(0,0,0),oae=new O(1,1,1),Cu=new O,GC=new O,Jo=new O,T4=new Ft,I4=new lo;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],d=s[5],h=s[9],p=s[2],m=s[6],g=s[10];switch(n){case"XYZ":this._y=Math.asin(Qi(l,-1,1)),Math.abs(l)<.9999999?(this._x=Math.atan2(-h,g),this._z=Math.atan2(-a,o)):(this._x=Math.atan2(m,d),this._z=0);break;case"YXZ":this._x=Math.asin(-Qi(h,-1,1)),Math.abs(h)<.9999999?(this._y=Math.atan2(l,g),this._z=Math.atan2(c,d)):(this._y=Math.atan2(-p,o),this._z=0);break;case"ZXY":this._x=Math.asin(Qi(m,-1,1)),Math.abs(m)<.9999999?(this._y=Math.atan2(-p,g),this._z=Math.atan2(-a,d)):(this._y=0,this._z=Math.atan2(c,o));break;case"ZYX":this._y=Math.asin(-Qi(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,d));break;case"YZX":this._z=Math.asin(Qi(c,-1,1)),Math.abs(c)<.9999999?(this._x=Math.atan2(-h,d),this._y=Math.atan2(-p,o)):(this._x=0,this._y=Math.atan2(l,g));break;case"XZY":this._z=Math.asin(-Qi(a,-1,1)),Math.abs(a)<.9999999?(this._x=Math.atan2(m,d),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 T4.makeRotationFromQuaternion(e),this.setFromRotationMatrix(T4,n,r)}setFromVector3(e,n=this._order){return this.set(e.x,e.y,e.z,n)}reorder(e){return I4.setFromEuler(this),this.setFromQuaternion(I4,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 eP{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:aae++}),this.uuid=Qo(),this.name="",this.type="Object3D",this.parent=null,this.children=[],this.up=i.DEFAULT_UP.clone();const e=new O,n=new td,r=new lo,s=new O(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 Ft},normalMatrix:{value:new wn}}),this.matrix=new Ft,this.matrixWorld=new Ft,this.matrixAutoUpdate=i.DEFAULT_MATRIX_AUTO_UPDATE,this.matrixWorldAutoUpdate=i.DEFAULT_MATRIX_WORLD_AUTO_UPDATE,this.matrixWorldNeedsUpdate=!1,this.layers=new eP,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 fg.setFromAxisAngle(e,n),this.quaternion.multiply(fg),this}rotateOnWorldAxis(e,n){return fg.setFromAxisAngle(e,n),this.quaternion.premultiply(fg),this}rotateX(e){return this.rotateOnAxis(k4,e)}rotateY(e){return this.rotateOnAxis(P4,e)}rotateZ(e){return this.rotateOnAxis(O4,e)}translateOnAxis(e,n){return R4.copy(e).applyQuaternion(this.quaternion),this.position.add(R4.multiplyScalar(n)),this}translateX(e){return this.translateOnAxis(k4,e)}translateY(e){return this.translateOnAxis(P4,e)}translateZ(e){return this.translateOnAxis(O4,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?$C.copy(e):$C.set(e,n,r);const s=this.parent;this.updateWorldMatrix(!0,!1),Cb.setFromMatrixPosition(this.matrixWorld),this.isCamera||this.isLight?nd.lookAt(Cb,$C,this.up):nd.lookAt($C,Cb,this.up),this.quaternion.setFromRotationMatrix(nd),s&&(nd.extractRotation(s.matrixWorld),fg.setFromRotationMatrix(nd),this.quaternion.premultiply(fg.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.maxInstanceCount=this._maxInstanceCount,s.maxVertexCount=this._maxVertexCount,s.maxIndexCount=this._maxIndexCount,s.geometryInitialized=this._geometryInitialized,s.geometryCount=this._geometryCount,s.matricesTexture=this._matricesTexture.toJSON(e),null!==this._colorsTexture&&(s.colorsTexture=this._colorsTexture.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 d=0,h=c.length;d0){s.children=[];for(let l=0;l0){s.animations=[];for(let l=0;l0&&(r.geometries=l),c.length>0&&(r.materials=c),d.length>0&&(r.textures=d),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 d in l){const h=l[d];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){ml.subVectors(r,e),id.subVectors(n,e),nP.subVectors(t,e);const o=ml.dot(ml),a=ml.dot(id),l=ml.dot(nP),c=id.dot(id),d=id.dot(nP),h=o*c-a*a;if(0===h)return s.set(0,0,0),null;const p=1/h,m=(c*l-a*d)*p,g=(o*d-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 ml.subVectors(n,e),id.subVectors(t,e),ml.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 ml.subVectors(this.c,this.b),id.subVectors(this.a,this.b),.5*ml.cross(id).length()}getMidpoint(t){return t.addVectors(this.a,this.b).add(this.c).multiplyScalar(1/3)}getNormal(t){return Ta.getNormal(this.a,this.b,this.c,t)}getPlane(t){return t.setFromCoplanarPoints(this.a,this.b,this.c)}getBarycoord(t,e){return Ta.getBarycoord(t,this.a,this.b,this.c,e)}getInterpolation(t,e,n,r,s){return Ta.getInterpolation(t,this.a,this.b,this.c,e,n,r,s)}containsPoint(t){return Ta.containsPoint(t,this.a,this.b,this.c)}isFrontFacing(t){return Ta.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;mg.subVectors(r,n),gg.subVectors(s,n),iP.subVectors(t,n);const l=mg.dot(iP),c=gg.dot(iP);if(l<=0&&c<=0)return e.copy(n);rP.subVectors(t,r);const d=mg.dot(rP),h=gg.dot(rP);if(d>=0&&h<=d)return e.copy(r);const p=l*h-d*c;if(p<=0&&l>=0&&d<=0)return o=l/(l-d),e.copy(n).addScaledVector(mg,o);sP.subVectors(t,s);const m=mg.dot(sP),g=gg.dot(sP);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(gg,a);const v=d*g-m*h;if(v<=0&&h-d>=0&&m-g>=0)return L4.subVectors(s,r),a=(h-d)/(h-d+(m-g)),e.copy(r).addScaledVector(L4,a);const y=1/(v+b+p);return o=b*y,a=p*y,e.copy(n).addScaledVector(mg,o).addScaledVector(gg,a)}equals(t){return t.a.equals(this.a)&&t.b.equals(this.b)&&t.c.equals(this.c)}}const N4={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},Su={h:0,s:0,l:0},WC={h:0,s:0,l:0};function oP(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 qe{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=cs){return t=Math.floor(t),this.r=(t>>16&255)/255,this.g=(t>>8&255)/255,this.b=(255&t)/255,Zn.toWorkingColorSpace(this,e),this}setRGB(t,e,n,r=Zn.workingColorSpace){return this.r=t,this.g=e,this.b=n,Zn.toWorkingColorSpace(this,r),this}setHSL(t,e,n,r=Zn.workingColorSpace){if(t=Gk(t,1),e=Qi(e,0,1),n=Qi(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=oP(o,s,t+1/3),this.g=oP(o,s,t),this.b=oP(o,s,t-1/3)}return Zn.toWorkingColorSpace(this,r),this}setStyle(t,e=cs){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=cs){const n=N4[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=og(t.r),this.g=og(t.g),this.b=og(t.b),this}copyLinearToSRGB(t){return this.r=Wk(t.r),this.g=Wk(t.g),this.b=Wk(t.b),this}convertSRGBToLinear(){return this.copySRGBToLinear(this),this}convertLinearToSRGB(){return this.copyLinearToSRGB(this),this}getHex(t=cs){return Zn.fromWorkingColorSpace(Us.copy(this),t),65536*Math.round(Qi(255*Us.r,0,255))+256*Math.round(Qi(255*Us.g,0,255))+Math.round(Qi(255*Us.b,0,255))}getHexString(t=cs){return("000000"+this.getHex(t).toString(16)).slice(-6)}getHSL(t,e=Zn.workingColorSpace){Zn.fromWorkingColorSpace(Us.copy(this),e);const n=Us.r,r=Us.g,s=Us.b,o=Math.max(n,r,s),a=Math.min(n,r,s);let l,c;const d=(a+o)/2;if(a===o)l=0,c=0;else{const h=o-a;switch(c=d<=.5?h/(o+a):h/(2-o-a),o){case n:l=(r-s)/h+(r0!=t>0&&this.version++,this._alphaTest=t}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.dispersion&&(n.dispersion=this.dispersion),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!==Ym&&(n.blending=this.blending),this.side!==Ql&&(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!==ik&&(n.blendSrc=this.blendSrc),this.blendDst!==rk&&(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!==xC&&(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++}onBuild(){console.warn("Material: onBuild() has been removed.")}onBeforeRender(){console.warn("Material: onBeforeRender() has been removed.")}}class vr extends ko{constructor(t){super(),this.isMeshBasicMaterial=!0,this.type="MeshBasicMaterial",this.color=new qe(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=wC,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 yr=new O,jC=new xe;class Hi{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=Zo,this.version=0}onUploadCallback(){}set needsUpdate(t){!0===t&&this.version++}get updateRange(){return sg("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],d=[];for(let h=0,p=c.length;h0&&(r[l]=d,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 d=[],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))&&(V4.copy(s).invert(),ef.copy(t.ray).applyMatrix4(V4),(null===n.boundingBox||!1!==ef.intersectsBox(n.boundingBox))&&this._computeIntersections(t,e,ef)))}_computeIntersections(t,e,n){let r;const s=this.geometry,o=this.material,a=s.index,l=s.attributes.position,c=s.attributes.uv,d=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:JC.clone(),object:i}}(i,t,e,n,vg,yg,bg,QC);if(d){r&&(XC.fromBufferAttribute(r,a),KC.fromBufferAttribute(r,l),ZC.fromBufferAttribute(r,c),d.uv=Ta.getInterpolation(QC,vg,yg,bg,XC,KC,ZC,new xe)),s&&(XC.fromBufferAttribute(s,a),KC.fromBufferAttribute(s,l),ZC.fromBufferAttribute(s,c),d.uv1=Ta.getInterpolation(QC,vg,yg,bg,XC,KC,ZC,new xe)),o&&(H4.fromBufferAttribute(o,a),G4.fromBufferAttribute(o,l),$4.fromBufferAttribute(o,c),d.normal=Ta.getInterpolation(QC,vg,yg,bg,H4,G4,$4,new O),d.normal.dot(n.direction)>0&&d.normal.multiplyScalar(-1));const h={a,b:l,c,normal:new O,materialIndex:0};Ta.getNormal(vg,yg,bg,h.normal),d.face=h}return d}class tf 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=[],d=[],h=[];let p=0,m=0;function g(b,v,y,M,x,C,F,D,k,B,T){const A=C/k,$=F/B,ie=C/2,ne=F/2,se=D/2,ge=k+1,q=B+1;let re=0,J=0;const we=new O;for(let Be=0;Be0?1:-1,d.push(we.x,we.y,we.z),h.push(Et/k),h.push(1-Be/B),re+=1}for(let Be=0;Be0&&(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 cP extends Fr{constructor(){super(),this.isCamera=!0,this.type="Camera",this.matrixWorldInverse=new Ft,this.projectionMatrix=new Ft,this.projectionMatrixInverse=new Ft,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 Eu=new O,Y4=new xe,q4=new xe;class br extends cP{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){Eu.set(-1,-1,.5).applyMatrix4(this.projectionMatrixInverse),e.set(Eu.x,Eu.y).multiplyScalar(-t/Eu.z),Eu.set(1,1,.5).applyMatrix4(this.projectionMatrixInverse),n.set(Eu.x,Eu.y).multiplyScalar(-t/Eu.z)}getViewSize(t,e){return this.getViewBounds(t,Y4,q4),e.subVectors(q4,Y4)}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 vae extends Fr{constructor(t,e,n){super(),this.type="CubeCamera",this.renderTarget=n,this.coordinateSystem=null,this.activeMipmapLevel=0;const r=new br(-90,1,t,e);r.layers=this.layers,this.add(r);const s=new br(-90,1,t,e);s.layers=this.layers,this.add(s);const o=new br(-90,1,t,e);o.layers=this.layers,this.add(o);const a=new br(-90,1,t,e);a.layers=this.layers,this.add(a);const l=new br(-90,1,t,e);l.layers=this.layers,this.add(l);const c=new br(-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,d]=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,d),t.setRenderTarget(h,p,m),t.xr.enabled=g,n.texture.needsPMREMUpdate=!0}}class tS extends Ro{constructor(t,e,n,r,s,o,a,l,c,d){super(t=void 0!==t?t:[],e=void 0!==e?e:Kc,n,r,s,o,a,l,c,d),this.isCubeTexture=!0,this.flipY=!1}get images(){return this.image}set images(t){this.image=t}}class yae extends bu{constructor(t=1,e={}){super(t,t,e),this.isWebGLCubeRenderTarget=!0;const n={width:t,height:t,depth:1};this.texture=new tS([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:ar}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 tf(5,5,5),s=new gl({name:"CubemapFromEquirect",uniforms:xg(n_uniforms),vertexShader:n_vertexShader,fragmentShader:n_fragmentShader,side:To,blending:Xc});s.uniforms.tEquirect.value=e;const o=new Nn(r,s),a=e.minFilter;return e.minFilter===hl&&(e.minFilter=ar),new vae(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 dP=new O,bae=new O,xae=new wn;class nf{constructor(t=new O(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=dP.subVectors(n,e).cross(bae.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(dP),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||xae.getNormalMatrix(t),r=this.coplanarPoint(dP).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 rf=new Bs,nS=new O;class iS{constructor(t=new nf,e=new nf,n=new nf,r=new nf,s=new nf,o=new nf){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],d=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+d,v+g,C+M).normalize(),n[3].setComponents(l-o,p-d,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(),rf.copy(t.boundingSphere).applyMatrix4(t.matrixWorld);else{const e=t.geometry;null===e.boundingSphere&&e.computeBoundingSphere(),rf.copy(e.boundingSphere).applyMatrix4(t.matrixWorld)}return this.intersectsSphere(rf)}intersectsSprite(t){return rf.center.set(0,0,0),rf.radius=.7071067811865476,rf.applyMatrix4(t.matrixWorld),this.intersectsSphere(rf)}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,nS.y=r.normal.y>0?t.max.y:t.min.y,nS.z=r.normal.z>0?t.max.z:t.min.z,r.distanceToPoint(nS)<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 X4(){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 wae(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.isInterleavedBufferAttribute&&(a=a.data),a.isGLBufferAttribute){const d=t.get(a);return void((!d||d.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 ) || defined( USE_BATCHING_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 ) || defined( USE_BATCHING_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\n#ifdef USE_BATCHING_COLOR\n\tvec3 batchingColor = getBatchingColor( getIndirectIndex( gl_DrawID ) );\n\tvColor.xyz *= batchingColor.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}\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}",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_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\tfloat distanceFalloff = 1.0 / max( pow( lightDistance, decayExponent ), 0.01 );\n\tif ( cutoffDistance > 0.0 ) {\n\t\tdistanceFalloff *= pow2( saturate( 1.0 - pow4( lightDistance / cutoffDistance ) ) );\n\t}\n\treturn distanceFalloff;\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_DISPERSION\n\tmaterial.dispersion = dispersion;\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\tfloat dispersion;\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.shadowIntensity, 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.shadowIntensity, 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.shadowIntensity, 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 )\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\tfor ( int i = 0; i < MORPHTARGETS_COUNT; i ++ ) {\n\t\tif ( morphTargetInfluences[ i ] != 0.0 ) objectNormal += getMorph( gl_VertexID, i, 1 ).xyz * morphTargetInfluences[ i ];\n\t}\n#endif",morphtarget_pars_vertex:"#ifdef USE_MORPHTARGETS\n\t#ifndef USE_INSTANCING_MORPH\n\t\tuniform float morphTargetBaseInfluence;\n\t\tuniform float morphTargetInfluences[ MORPHTARGETS_COUNT ];\n\t#endif\n\tuniform sampler2DArray morphTargetsTexture;\n\tuniform ivec2 morphTargetsTextureSize;\n\tvec4 getMorph( const in int vertexIndex, const in int morphTargetIndex, const in int offset ) {\n\t\tint texelIndex = vertexIndex * MORPHTARGETS_TEXTURE_STRIDE + offset;\n\t\tint y = texelIndex / morphTargetsTextureSize.x;\n\t\tint x = texelIndex - y * morphTargetsTextureSize.x;\n\t\tivec3 morphUV = ivec3( x, y, morphTargetIndex );\n\t\treturn texelFetch( morphTargetsTexture, morphUV, 0 );\n\t}\n#endif",morphtarget_vertex:"#ifdef USE_MORPHTARGETS\n\ttransformed *= morphTargetBaseInfluence;\n\tfor ( int i = 0; i < MORPHTARGETS_COUNT; i ++ ) {\n\t\tif ( morphTargetInfluences[ i ] != 0.0 ) transformed += getMorph( gl_VertexID, i, 0 ).xyz * morphTargetInfluences[ i ];\n\t}\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.;const float ShiftRight8 = 1. / 256.;\nconst float Inv255 = 1. / 255.;\nconst vec4 PackFactors = vec4( 1.0, 256.0, 256.0 * 256.0, 256.0 * 256.0 * 256.0 );\nconst vec2 UnpackFactors2 = vec2( UnpackDownscale, 1.0 / PackFactors.g );\nconst vec3 UnpackFactors3 = vec3( UnpackDownscale / PackFactors.rg, 1.0 / PackFactors.b );\nconst vec4 UnpackFactors4 = vec4( UnpackDownscale / PackFactors.rgb, 1.0 / PackFactors.a );\nvec4 packDepthToRGBA( const in float v ) {\n\tif( v <= 0.0 )\n\t\treturn vec4( 0., 0., 0., 0. );\n\tif( v >= 1.0 )\n\t\treturn vec4( 1., 1., 1., 1. );\n\tfloat vuf;\n\tfloat af = modf( v * PackFactors.a, vuf );\n\tfloat bf = modf( vuf * ShiftRight8, vuf );\n\tfloat gf = modf( vuf * ShiftRight8, vuf );\n\treturn vec4( vuf * Inv255, gf * PackUpscale, bf * PackUpscale, af );\n}\nvec3 packDepthToRGB( const in float v ) {\n\tif( v <= 0.0 )\n\t\treturn vec3( 0., 0., 0. );\n\tif( v >= 1.0 )\n\t\treturn vec3( 1., 1., 1. );\n\tfloat vuf;\n\tfloat bf = modf( v * PackFactors.b, vuf );\n\tfloat gf = modf( vuf * ShiftRight8, vuf );\n\treturn vec3( vuf * Inv255, gf * PackUpscale, bf );\n}\nvec2 packDepthToRG( const in float v ) {\n\tif( v <= 0.0 )\n\t\treturn vec2( 0., 0. );\n\tif( v >= 1.0 )\n\t\treturn vec2( 1., 1. );\n\tfloat vuf;\n\tfloat gf = modf( v * 256., vuf );\n\treturn vec2( vuf * Inv255, gf );\n}\nfloat unpackRGBAToDepth( const in vec4 v ) {\n\treturn dot( v, UnpackFactors4 );\n}\nfloat unpackRGBToDepth( const in vec3 v ) {\n\treturn dot( v, UnpackFactors3 );\n}\nfloat unpackRGToDepth( const in vec2 v ) {\n\treturn v.r * UnpackFactors2.r + v.g * UnpackFactors2.g;\n}\nvec4 pack2HalfToRGBA( const in 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( const in 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 shadowIntensity;\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 shadowIntensity;\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 shadowIntensity;\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 shadowIntensity, 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 mix( 1.0, shadow, shadowIntensity );\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 shadowIntensity, 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 mix( 1.0, shadow, shadowIntensity );\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 shadowIntensity;\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 shadowIntensity;\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 shadowIntensity;\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.shadowIntensity, 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.shadowIntensity, 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.shadowIntensity, 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\tconst float StartCompression = 0.8 - 0.04;\n\tconst float 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, vec3( newPeak ), 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.dispersion, 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 dispersion, const in float ior, const in float thickness,\n\t\tconst in vec3 attenuationColor, const in float attenuationDistance ) {\n\t\tvec4 transmittedLight;\n\t\tvec3 transmittance;\n\t\t#ifdef USE_DISPERSION\n\t\t\tfloat halfSpread = ( ior - 1.0 ) * 0.025 * dispersion;\n\t\t\tvec3 iors = vec3( ior - halfSpread, ior, ior + halfSpread );\n\t\t\tfor ( int i = 0; i < 3; i ++ ) {\n\t\t\t\tvec3 transmissionRay = getVolumeTransmissionRay( n, v, thickness, iors[ i ], modelMatrix );\n\t\t\t\tvec3 refractedRayExit = position + transmissionRay;\n\t\t\n\t\t\t\tvec4 ndcPos = projMatrix * viewMatrix * vec4( refractedRayExit, 1.0 );\n\t\t\t\tvec2 refractionCoords = ndcPos.xy / ndcPos.w;\n\t\t\t\trefractionCoords += 1.0;\n\t\t\t\trefractionCoords /= 2.0;\n\t\t\n\t\t\t\tvec4 transmissionSample = getTransmissionSample( refractionCoords, roughness, iors[ i ] );\n\t\t\t\ttransmittedLight[ i ] = transmissionSample[ i ];\n\t\t\t\ttransmittedLight.a += transmissionSample.a;\n\t\t\t\ttransmittance[ i ] = diffuseColor[ i ] * volumeAttenuation( length( transmissionRay ), attenuationColor, attenuationDistance )[ i ];\n\t\t\t}\n\t\t\ttransmittedLight.a /= 3.0;\n\t\t\n\t\t#else\n\t\t\n\t\t\tvec3 transmissionRay = getVolumeTransmissionRay( n, v, thickness, ior, modelMatrix );\n\t\t\tvec3 refractedRayExit = position + transmissionRay;\n\t\t\tvec4 ndcPos = projMatrix * viewMatrix * vec4( refractedRayExit, 1.0 );\n\t\t\tvec2 refractionCoords = ndcPos.xy / ndcPos.w;\n\t\t\trefractionCoords += 1.0;\n\t\t\trefractionCoords /= 2.0;\n\t\t\ttransmittedLight = getTransmissionSample( refractionCoords, roughness, ior );\n\t\t\ttransmittance = diffuseColor * volumeAttenuation( length( transmissionRay ), attenuationColor, attenuationDistance );\n\t\t\n\t\t#endif\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#elif DEPTH_PACKING == 3202\n\t\tgl_FragColor = vec4( packDepthToRGB( fragCoordZ ), 1.0 );\n\t#elif DEPTH_PACKING == 3203\n\t\tgl_FragColor = vec4( packDepthToRG( fragCoordZ ), 0.0, 1.0 );\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_DISPERSION\n\tuniform float dispersion;\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}"},Qe={common:{diffuse:{value:new qe(16777215)},opacity:{value:1},map:{value:null},mapTransform:{value:new wn},alphaMap:{value:null},alphaMapTransform:{value:new wn},alphaTest:{value:0}},specularmap:{specularMap:{value:null},specularMapTransform:{value:new wn}},envmap:{envMap:{value:null},envMapRotation:{value:new wn},flipEnvMap:{value:-1},reflectivity:{value:1},ior:{value:1.5},refractionRatio:{value:.98}},aomap:{aoMap:{value:null},aoMapIntensity:{value:1},aoMapTransform:{value:new wn}},lightmap:{lightMap:{value:null},lightMapIntensity:{value:1},lightMapTransform:{value:new wn}},bumpmap:{bumpMap:{value:null},bumpMapTransform:{value:new wn},bumpScale:{value:1}},normalmap:{normalMap:{value:null},normalMapTransform:{value:new wn},normalScale:{value:new xe(1,1)}},displacementmap:{displacementMap:{value:null},displacementMapTransform:{value:new wn},displacementScale:{value:1},displacementBias:{value:0}},emissivemap:{emissiveMap:{value:null},emissiveMapTransform:{value:new wn}},metalnessmap:{metalnessMap:{value:null},metalnessMapTransform:{value:new wn}},roughnessmap:{roughnessMap:{value:null},roughnessMapTransform:{value:new wn}},gradientmap:{gradientMap:{value:null}},fog:{fogDensity:{value:25e-5},fogNear:{value:1},fogFar:{value:2e3},fogColor:{value:new qe(16777215)}},lights:{ambientLightColor:{value:[]},lightProbe:{value:[]},directionalLights:{value:[],properties:{direction:{},color:{}}},directionalLightShadows:{value:[],properties:{shadowIntensity:1,shadowBias:{},shadowNormalBias:{},shadowRadius:{},shadowMapSize:{}}},directionalShadowMap:{value:[]},directionalShadowMatrix:{value:[]},spotLights:{value:[],properties:{color:{},position:{},direction:{},distance:{},coneCos:{},penumbraCos:{},decay:{}}},spotLightShadows:{value:[],properties:{shadowIntensity:1,shadowBias:{},shadowNormalBias:{},shadowRadius:{},shadowMapSize:{}}},spotLightMap:{value:[]},spotShadowMap:{value:[]},spotLightMatrix:{value:[]},pointLights:{value:[],properties:{color:{},position:{},decay:{},distance:{}}},pointLightShadows:{value:[],properties:{shadowIntensity:1,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 qe(16777215)},opacity:{value:1},size:{value:1},scale:{value:1},map:{value:null},alphaMap:{value:null},alphaMapTransform:{value:new wn},alphaTest:{value:0},uvTransform:{value:new wn}},sprite:{diffuse:{value:new qe(16777215)},opacity:{value:1},center:{value:new xe(.5,.5)},rotation:{value:0},map:{value:null},mapTransform:{value:new wn},alphaMap:{value:null},alphaMapTransform:{value:new wn},alphaTest:{value:0}}},ec={basic:{uniforms:co([Qe.common,Qe.specularmap,Qe.envmap,Qe.aomap,Qe.lightmap,Qe.fog]),vertexShader:Mn.meshbasic_vert,fragmentShader:Mn.meshbasic_frag},lambert:{uniforms:co([Qe.common,Qe.specularmap,Qe.envmap,Qe.aomap,Qe.lightmap,Qe.emissivemap,Qe.bumpmap,Qe.normalmap,Qe.displacementmap,Qe.fog,Qe.lights,{emissive:{value:new qe(0)}}]),vertexShader:Mn.meshlambert_vert,fragmentShader:Mn.meshlambert_frag},phong:{uniforms:co([Qe.common,Qe.specularmap,Qe.envmap,Qe.aomap,Qe.lightmap,Qe.emissivemap,Qe.bumpmap,Qe.normalmap,Qe.displacementmap,Qe.fog,Qe.lights,{emissive:{value:new qe(0)},specular:{value:new qe(1118481)},shininess:{value:30}}]),vertexShader:Mn.meshphong_vert,fragmentShader:Mn.meshphong_frag},standard:{uniforms:co([Qe.common,Qe.envmap,Qe.aomap,Qe.lightmap,Qe.emissivemap,Qe.bumpmap,Qe.normalmap,Qe.displacementmap,Qe.roughnessmap,Qe.metalnessmap,Qe.fog,Qe.lights,{emissive:{value:new qe(0)},roughness:{value:1},metalness:{value:0},envMapIntensity:{value:1}}]),vertexShader:Mn.meshphysical_vert,fragmentShader:Mn.meshphysical_frag},toon:{uniforms:co([Qe.common,Qe.aomap,Qe.lightmap,Qe.emissivemap,Qe.bumpmap,Qe.normalmap,Qe.displacementmap,Qe.gradientmap,Qe.fog,Qe.lights,{emissive:{value:new qe(0)}}]),vertexShader:Mn.meshtoon_vert,fragmentShader:Mn.meshtoon_frag},matcap:{uniforms:co([Qe.common,Qe.bumpmap,Qe.normalmap,Qe.displacementmap,Qe.fog,{matcap:{value:null}}]),vertexShader:Mn.meshmatcap_vert,fragmentShader:Mn.meshmatcap_frag},points:{uniforms:co([Qe.points,Qe.fog]),vertexShader:Mn.points_vert,fragmentShader:Mn.points_frag},dashed:{uniforms:co([Qe.common,Qe.fog,{scale:{value:1},dashSize:{value:1},totalSize:{value:2}}]),vertexShader:Mn.linedashed_vert,fragmentShader:Mn.linedashed_frag},depth:{uniforms:co([Qe.common,Qe.displacementmap]),vertexShader:Mn.depth_vert,fragmentShader:Mn.depth_frag},normal:{uniforms:co([Qe.common,Qe.bumpmap,Qe.normalmap,Qe.displacementmap,{opacity:{value:1}}]),vertexShader:Mn.meshnormal_vert,fragmentShader:Mn.meshnormal_frag},sprite:{uniforms:co([Qe.sprite,Qe.fog]),vertexShader:Mn.sprite_vert,fragmentShader:Mn.sprite_frag},background:{uniforms:{uvTransform:{value:new wn},t2D:{value:null},backgroundIntensity:{value:1}},vertexShader:Mn.background_vert,fragmentShader:Mn.background_frag},backgroundCube:{uniforms:{envMap:{value:null},flipEnvMap:{value:-1},backgroundBlurriness:{value:0},backgroundIntensity:{value:1},backgroundRotation:{value:new wn}},vertexShader:Mn.backgroundCube_vert,fragmentShader:Mn.backgroundCube_frag},cube:{uniforms:{tCube:{value:null},tFlip:{value:-1},opacity:{value:1}},vertexShader:Mn.cube_vert,fragmentShader:Mn.cube_frag},equirect:{uniforms:{tEquirect:{value:null}},vertexShader:Mn.equirect_vert,fragmentShader:Mn.equirect_frag},distanceRGBA:{uniforms:co([Qe.common,Qe.displacementmap,{referencePosition:{value:new O},nearDistance:{value:1},farDistance:{value:1e3}}]),vertexShader:Mn.distanceRGBA_vert,fragmentShader:Mn.distanceRGBA_frag},shadow:{uniforms:co([Qe.lights,Qe.fog,{color:{value:new qe(0)},opacity:{value:1}}]),vertexShader:Mn.shadow_vert,fragmentShader:Mn.shadow_frag}};ec.physical={uniforms:co([ec.standard.uniforms,{clearcoat:{value:0},clearcoatMap:{value:null},clearcoatMapTransform:{value:new wn},clearcoatNormalMap:{value:null},clearcoatNormalMapTransform:{value:new wn},clearcoatNormalScale:{value:new xe(1,1)},clearcoatRoughness:{value:0},clearcoatRoughnessMap:{value:null},clearcoatRoughnessMapTransform:{value:new wn},dispersion:{value:0},iridescence:{value:0},iridescenceMap:{value:null},iridescenceMapTransform:{value:new wn},iridescenceIOR:{value:1.3},iridescenceThicknessMinimum:{value:100},iridescenceThicknessMaximum:{value:400},iridescenceThicknessMap:{value:null},iridescenceThicknessMapTransform:{value:new wn},sheen:{value:0},sheenColor:{value:new qe(0)},sheenColorMap:{value:null},sheenColorMapTransform:{value:new wn},sheenRoughness:{value:1},sheenRoughnessMap:{value:null},sheenRoughnessMapTransform:{value:new wn},transmission:{value:0},transmissionMap:{value:null},transmissionMapTransform:{value:new wn},transmissionSamplerSize:{value:new xe},transmissionSamplerMap:{value:null},thickness:{value:0},thicknessMap:{value:null},thicknessMapTransform:{value:new wn},attenuationDistance:{value:0},attenuationColor:{value:new qe(0)},specularColor:{value:new qe(1,1,1)},specularColorMap:{value:null},specularColorMapTransform:{value:new wn},specularIntensity:{value:1},specularIntensityMap:{value:null},specularIntensityMapTransform:{value:new wn},anisotropyVector:{value:new xe},anisotropyMap:{value:null},anisotropyMapTransform:{value:new wn}}]),vertexShader:Mn.meshphysical_vert,fragmentShader:Mn.meshphysical_frag};const rS={r:0,b:0,g:0},af=new td,wce=new Ft;function Mce(i,t,e,n,r,s,o){const a=new qe(0);let c,d,l=!0===s?0:1,h=null,p=0,m=null;function g(M){let x=!0===M.isScene?M.background:null;return x&&x.isTexture&&(x=(M.backgroundBlurriness>0?e:t).get(x)),x}function y(M,x){M.getRGB(rS,W4(i)),n.buffers.color.setClear(rS.r,rS.g,rS.b,x,o)}return{getClearColor:function(){return a},setClearColor:function(M,x=1){a.set(M),l=x,y(a,l)},getClearAlpha:function(){return l},setClearAlpha:function(M){l=M,y(a,l)},render:function b(M){let x=!1;const C=g(M);null===C?y(a,l):C&&C.isColor&&(y(C,1),x=!0);const F=i.xr.getEnvironmentBlendMode();"additive"===F?n.buffers.color.setClear(0,0,0,1,o):"alpha-blend"===F&&n.buffers.color.setClear(0,0,0,0,o),(i.autoClear||x)&&(n.buffers.depth.setTest(!0),n.buffers.depth.setMask(!0),n.buffers.color.setMask(!0),i.clear(i.autoClearColor,i.autoClearDepth,i.autoClearStencil))},addToRenderList:function v(M,x){const C=g(x);C&&(C.isCubeTexture||C.mapping===hb)?(void 0===d&&(d=new Nn(new tf(1,1,1),new gl({name:"BackgroundCubeMaterial",uniforms:xg(ec.backgroundCube.uniforms),vertexShader:ec.backgroundCube.vertexShader,fragmentShader:ec.backgroundCube.fragmentShader,side:To,depthTest:!1,depthWrite:!1,fog:!1})),d.geometry.deleteAttribute("normal"),d.geometry.deleteAttribute("uv"),d.onBeforeRender=function(F,D,k){this.matrixWorld.copyPosition(k.matrixWorld)},Object.defineProperty(d.material,"envMap",{get:function(){return this.uniforms.envMap.value}}),r.update(d)),af.copy(x.backgroundRotation),af.x*=-1,af.y*=-1,af.z*=-1,C.isCubeTexture&&!1===C.isRenderTargetTexture&&(af.y*=-1,af.z*=-1),d.material.uniforms.envMap.value=C,d.material.uniforms.flipEnvMap.value=C.isCubeTexture&&!1===C.isRenderTargetTexture?-1:1,d.material.uniforms.backgroundBlurriness.value=x.backgroundBlurriness,d.material.uniforms.backgroundIntensity.value=x.backgroundIntensity,d.material.uniforms.backgroundRotation.value.setFromMatrix4(wce.makeRotationFromEuler(af)),d.material.toneMapped=Zn.getTransfer(C.colorSpace)!==Fi,(h!==C||p!==C.version||m!==i.toneMapping)&&(d.material.needsUpdate=!0,h=C,p=C.version,m=i.toneMapping),d.layers.enableAll(),M.unshift(d,d.geometry,d.material,0,0,null)):C&&C.isTexture&&(void 0===c&&(c=new Nn(new sf(2,2),new gl({name:"BackgroundMaterial",uniforms:xg(ec.background.uniforms),vertexShader:ec.background.vertexShader,fragmentShader:ec.background.fragmentShader,side:Ql,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=C,c.material.uniforms.backgroundIntensity.value=x.backgroundIntensity,c.material.toneMapped=Zn.getTransfer(C.colorSpace)!==Fi,!0===C.matrixAutoUpdate&&C.updateMatrix(),c.material.uniforms.uvTransform.value.copy(C.matrix),(h!==C||p!==C.version||m!==i.toneMapping)&&(c.material.needsUpdate=!0,h=C,p=C.version,m=i.toneMapping),c.layers.enableAll(),M.unshift(c,c.geometry,c.material,0,0,null))}}}function Cce(i,t){const e=i.getParameter(i.MAX_VERTEX_ATTRIBS),n={},r=p(null);let s=r,o=!1;function c(A){return i.bindVertexArray(A)}function d(A){return i.deleteVertexArray(A)}function p(A){const $=[],ie=[],ne=[];for(let se=0;se=0){const Be=se[J];let Ye=ge[J];if(void 0===Ye&&("instanceMatrix"===J&&A.instanceMatrix&&(Ye=A.instanceMatrix),"instanceColor"===J&&A.instanceColor&&(Ye=A.instanceColor)),void 0===Be||Be.attribute!==Ye||Ye&&Be.data!==Ye.data)return!0;q++}return s.attributesNum!==q||s.index!==ne}(A,ne,ie,se),ge&&function g(A,$,ie,ne){const se={},ge=$.attributes;let q=0;const re=ie.getAttributes();for(const J in re)if(re[J].location>=0){let Be=ge[J];void 0===Be&&("instanceMatrix"===J&&A.instanceMatrix&&(Be=A.instanceMatrix),"instanceColor"===J&&A.instanceColor&&(Be=A.instanceColor));const Ye={};Ye.attribute=Be,Be&&Be.data&&(Ye.data=Be.data),se[J]=Ye,q++}s.attributes=se,s.attributesNum=q,s.index=ne}(A,ne,ie,se),null!==se&&t.update(se,i.ELEMENT_ARRAY_BUFFER),(ge||o)&&(o=!1,function C(A,$,ie,ne){b();const se=ne.attributes,ge=ie.getAttributes(),q=$.defaultAttributeValues;for(const re in ge){const J=ge[re];if(J.location>=0){let we=se[re];if(void 0===we&&("instanceMatrix"===re&&A.instanceMatrix&&(we=A.instanceMatrix),"instanceColor"===re&&A.instanceColor&&(we=A.instanceColor)),void 0!==we){const Be=we.normalized,Ye=we.itemSize,Et=t.get(we);if(void 0===Et)continue;const en=Et.buffer,ae=Et.type,ke=Et.bytesPerElement,Ze=ae===i.INT||ae===i.UNSIGNED_INT||we.gpuType===ak;if(we.isInterleavedBufferAttribute){const Pe=we.data,yt=Pe.stride,Ct=we.offset;if(Pe.isInstancedInterleavedBuffer){for(let Mt=0;Mt0&&i.getShaderPrecisionFormat(i.FRAGMENT_SHADER,i.HIGH_FLOAT).precision>0)return"highp";D="mediump"}return"mediump"===D&&i.getShaderPrecisionFormat(i.VERTEX_SHADER,i.MEDIUM_FLOAT).precision>0&&i.getShaderPrecisionFormat(i.FRAGMENT_SHADER,i.MEDIUM_FLOAT).precision>0?"mediump":"lowp"}let c=void 0!==e.precision?e.precision:"highp";const d=l(c);d!==c&&(console.warn("THREE.WebGLRenderer:",c,"not supported, using",d,"instead."),c=d);const h=!0===e.logarithmicDepthBuffer,p=i.getParameter(i.MAX_TEXTURE_IMAGE_UNITS),m=i.getParameter(i.MAX_VERTEX_TEXTURE_IMAGE_UNITS);return{isWebGL2:!0,getMaxAnisotropy:function s(){if(void 0!==r)return r;if(!0===t.has("EXT_texture_filter_anisotropic")){const D=t.get("EXT_texture_filter_anisotropic");r=i.getParameter(D.MAX_TEXTURE_MAX_ANISOTROPY_EXT)}else r=0;return r},getMaxPrecision:l,textureFormatReadable:function o(D){return!(D!==Io&&n.convert(D)!==i.getParameter(i.IMPLEMENTATION_COLOR_READ_FORMAT))},textureTypeReadable:function a(D){const k=D===Xm&&(t.has("EXT_color_buffer_half_float")||t.has("EXT_color_buffer_float"));return!(D!==Zc&&n.convert(D)!==i.getParameter(i.IMPLEMENTATION_COLOR_READ_TYPE)&&D!==Zo&&!k)},precision:c,logarithmicDepthBuffer:h,maxTextures:p,maxVertexTextures:m,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:m>0,maxSamples:i.getParameter(i.MAX_SAMPLES)}}function Ace(i){const t=this;let e=null,n=0,r=!1,s=!1;const o=new nf,a=new wn,l={value:null,needsUpdate:!1};function d(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=d(g,p,x,m);for(let F=0;F!==x;++F)C[F]=e[F];y.clippingState=C,this.numIntersection=b?this.numPlanes:0,this.numPlanes+=M}}}function Dce(i){let t=new WeakMap;function e(o,a){return a===MC?o.mapping=Kc:a===CC&&(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===MC||a===CC){if(t.has(o))return e(t.get(o).texture,o.mapping);{const l=o.image;if(l&&l.height>0){const c=new yae(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 Ab extends cP{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,d=(this.top-this.bottom)/this.view.fullHeight/this.zoom;s+=c*this.view.offsetX,o=s+c*this.view.width,a-=d*this.view.offsetY,l=a-d*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 K4=[.125,.215,.35,.446,.526,.582],uP=new Ab,Z4=new qe;let hP=null,fP=0,pP=0,mP=!1;const cf=(1+Math.sqrt(5))/2,Sg=1/cf,Q4=[new O(-cf,Sg,0),new O(cf,Sg,0),new O(-Sg,0,cf),new O(Sg,0,cf),new O(0,cf,-Sg),new O(0,cf,Sg),new O(-1,1,-1),new O(1,1,-1),new O(-1,1,1),new O(1,1,1)];class J4{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){hP=this._renderer.getRenderTarget(),fP=this._renderer.getActiveCubeFace(),pP=this._renderer.getActiveMipmapLevel(),mP=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=n5(),this._compileMaterial(this._cubemapMaterial))}compileEquirectangularShader(){null===this._equirectMaterial&&(this._equirectMaterial=t5(),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=K4[o-i+4-1]:0===o&&(l=0),n.push(l);const c=1/(a-2),d=-c,h=1+c,p=[d,d,h,d,h,h,d,d,h,h,d,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 D=0;D2?0:-1;M.set([k,B,0,k+2/3,B,0,k+2/3,B+1,0,k,B,0,k+2/3,B+1,0,k,B+1,0],b*g*D),x.set(p,v*g*D),C.set([D,D,D,D,D,D],y*g*D)}const F=new hn;F.setAttribute("position",new Hi(M,b)),F.setAttribute("uv",new Hi(x,v)),F.setAttribute("faceIndex",new Hi(C,y)),t.push(F),r>4&&r--}return{lodPlanes:t,sizeLods:e,sigmas:n}}(s)),this._blurMaterial=function Ice(i,t,e){const n=new Float32Array(20),r=new O(0,1,0);return new gl({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:Xc,depthTest:!1,depthWrite:!1})}(s,t,e)}return r}_compileMaterial(t){const e=new Nn(this._lodPlanes[0],t);this._renderer.compile(e,uP)}_sceneToCubeUV(t,e,n,r){const a=new br(90,1,e,n),l=[1,-1,1,1,1,1],c=[1,1,1,-1,-1,-1],d=this._renderer,h=d.autoClear,p=d.toneMapping;d.getClearColor(Z4),d.toneMapping=_u,d.autoClear=!1;const m=new vr({name:"PMREM.Background",side:To,depthWrite:!1,depthTest:!1}),g=new Nn(new tf,m);let b=!1;const v=t.background;v?v.isColor&&(m.color.copy(v),t.background=null,b=!0):(m.color.copy(Z4),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;sS(r,M*x,y>2?x:0,x,x),d.setRenderTarget(r),b&&d.render(g,a),d.render(t,a)}g.geometry.dispose(),g.material.dispose(),d.toneMapping=p,d.autoClear=h,t.background=v}_textureToCubeUV(t,e){const n=this._renderer,r=t.mapping===Kc||t.mapping===Xh;r?(null===this._cubemapMaterial&&(this._cubemapMaterial=n5()),this._cubemapMaterial.uniforms.flipEnvMap.value=!1===t.isRenderTargetTexture?-1:1):null===this._equirectMaterial&&(this._equirectMaterial=t5());const s=r?this._cubemapMaterial:this._equirectMaterial,o=new Nn(this._lodPlanes[0],s);s.uniforms.envMap.value=t;const l=this._cubeSize;sS(e,0,0,3*l,2*l),n.setRenderTarget(e),n.render(o,uP)}_applyPMREM(t){const e=this._renderer,n=e.autoClear;e.autoClear=!1;const r=this._lodPlanes.length;for(let s=1;s20&&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 k=0;k<20;++k){const B=k/b,T=Math.exp(-B*B/2);y.push(T),0===k?M+=T:kx-4?r-x+4:0),4*(this._cubeSize-C),3*C,2*C),l.setRenderTarget(e),l.render(h,uP)}}function e5(i,t,e){const n=new bu(i,t,e);return n.texture.mapping=hb,n.texture.name="PMREM.cubeUv",n.scissorTest=!0,n}function sS(i,t,e,n,r){i.viewport.set(t,e,n,r),i.scissor.set(t,e,n,r)}function t5(){return new gl({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:Xc,depthTest:!1,depthWrite:!1})}function n5(){return new gl({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:Xc,depthTest:!1,depthWrite:!1})}function Rce(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===MC||l===CC,d=l===Kc||l===Xh;if(c||d){let h=t.get(a);if(a.isRenderTargetTexture&&a.pmremVersion!==(void 0!==h?h.texture.pmremVersion:0))return null===e&&(e=new J4(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||d&&m&&function r(a){let l=0;for(let d=0;d<6;d++)void 0!==a[d]&&l++;return 6===l}(m)?(null===e&&(e=new J4(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 kce(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&&sg("THREE.WebGLRenderer: "+n+" extension not supported."),r}}}function Pce(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&&(F=Math.ceil(C/t.maxTextureSize),C=t.maxTextureSize);const D=new Float32Array(C*F*4*h),k=new Yk(D,C,F,h);k.type=Zo,k.needsUpdate=!0;const B=4*x;for(let A=0;A0)return i;const r=t*e;let s=d5[r];if(void 0===s&&(s=new Float32Array(r),d5[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 Lr(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 kde(i,t){const e=function Rde(i){const t=Zn.getPrimaries(Zn.workingColorSpace),e=Zn.getPrimaries(i);let n;switch(t===e?n="":t===FC&&e===OC?n="LinearDisplayP3ToLinearSRGB":t===OC&&e===FC&&(n="LinearSRGBToLinearDisplayP3"),i){case ds:case kC:return[n,"LinearTransferOETF"];case cs:case Hk: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 Pde(i,t){let e;switch(t){case uoe:e="Linear";break;case hoe:e="Reinhard";break;case foe:e="OptimizedCineon";break;case poe:e="ACESFilmic";break;case goe:e="AgX";break;case _oe:e="Neutral";break;case moe:e="Custom";break;default:console.warn("THREE.WebGLProgram: Unsupported toneMapping:",t),e="Linear"}return"vec3 "+i+"( vec3 color ) { return "+e+"ToneMapping( color ); }"}const lS=new O;function Db(i){return""!==i}function v5(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 y5(i,t){return i.replace(/NUM_CLIPPING_PLANES/g,t.numClippingPlanes).replace(/UNION_CLIPPING_PLANES/g,t.numClippingPlanes-t.numClipIntersection)}const Bde=/^[ \t]*#include +<([\w\d./]+)>/gm;function vP(i){return i.replace(Bde,Vde)}const Ude=new Map;function Vde(i,t){let e=Mn[t];if(void 0===e){const n=Ude.get(t);if(void 0===n)throw new Error("Can not resolve #include <"+t+">");e=Mn[n],console.warn('THREE.WebGLRenderer: Shader chunk "%s" has been deprecated. Use "%s" instead.',t,n)}return vP(e)}const zde=/#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 b5(i){return i.replace(zde,Hde)}function Hde(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(Db).join("\n"),y.length>0&&(y+="\n")):(v=[x5(e),"#define SHADER_TYPE "+e.shaderType,"#define SHADER_NAME "+e.shaderName,g,e.extensionClipCullDistance?"#define USE_CLIP_DISTANCE":"",e.batching?"#define USE_BATCHING":"",e.batchingColor?"#define USE_BATCHING_COLOR":"",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 "+d:"",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_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.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","#ifdef USE_SKINNING","\tattribute vec4 skinIndex;","\tattribute vec4 skinWeight;","#endif","\n"].filter(Db).join("\n"),y=[x5(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 "+d:"",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.dispersion?"#define USE_DISPERSION":"",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||e.batchingColor?"#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.decodeVideoTexture?"#define DECODE_VIDEO_TEXTURE":"",e.logarithmicDepthBuffer?"#define USE_LOGDEPTHBUF":"","uniform mat4 viewMatrix;","uniform vec3 cameraPosition;","uniform bool isOrthographic;",e.toneMapping!==_u?"#define TONE_MAPPING":"",e.toneMapping!==_u?Mn.tonemapping_pars_fragment:"",e.toneMapping!==_u?Pde("toneMapping",e.toneMapping):"",e.dithering?"#define DITHERING":"",e.opaque?"#define OPAQUE":"",Mn.colorspace_pars_fragment,kde("linearToOutputTexel",e.outputColorSpace),(Zn.getLuminanceCoefficients(lS),["float luminance( const in vec3 rgb ) {",`\tconst vec3 weights = vec3( ${lS.x.toFixed(4)}, ${lS.y.toFixed(4)}, ${lS.z.toFixed(4)} );`,"\treturn dot( weights, rgb );","}"].join("\n")),e.useDepthPacking?"#define DEPTH_PACKING "+e.depthPacking:"","\n"].filter(Db).join("\n")),o=vP(o),o=v5(o,e),o=y5(o,e),a=vP(a),a=v5(a,e),a=y5(a,e),o=b5(o),a=b5(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===x4?"":"layout(location = 0) out highp vec4 pc_fragColor;",e.glslVersion===x4?"":"#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,F=g5(r,r.VERTEX_SHADER,M+v+o),D=g5(r,r.FRAGMENT_SHADER,C);function k($){if(i.debug.checkShaderErrors){const ie=r.getProgramInfoLog(b).trim(),ne=r.getShaderInfoLog(F).trim(),se=r.getShaderInfoLog(D).trim();let ge=!0,q=!0;if(!1===r.getProgramParameter(b,r.LINK_STATUS))if(ge=!1,"function"==typeof i.debug.onShaderError)i.debug.onShaderError(r,b,F,D);else{const re=_5(r,F,"vertex"),J=_5(r,D,"fragment");console.error("THREE.WebGLProgram: Shader Error "+r.getError()+" - VALIDATE_STATUS "+r.getProgramParameter(b,r.VALIDATE_STATUS)+"\n\nMaterial Name: "+$.name+"\nMaterial Type: "+$.type+"\n\nProgram Info Log: "+ie+"\n"+re+"\n"+J)}else""!==ie?console.warn("THREE.WebGLProgram: Program Info Log:",ie):(""===ne||""===se)&&(q=!1);q&&($.diagnostics={runnable:ge,programLog:ie,vertexShader:{log:ne,prefix:v},fragmentShader:{log:se,prefix:y}})}r.deleteShader(F),r.deleteShader(D),B=new aS(r,b),T=function Nde(i,t){const e={},n=i.getProgramParameter(t,i.ACTIVE_ATTRIBUTES);for(let r=0;r0,ce=T.clearcoat>0,De=T.iridescence>0,Ae=T.sheen>0,Lt=T.transmission>0,Je=R&&!!T.anisotropyMap,dt=ce&&!!T.clearcoatMap,bn=ce&&!!T.clearcoatNormalMap,Ve=ce&&!!T.clearcoatRoughnessMap,ct=De&&!!T.iridescenceMap,Wn=De&&!!T.iridescenceThicknessMap,ln=Ae&&!!T.sheenColorMap,mt=Ae&&!!T.sheenRoughnessMap,_n=!!T.specularMap,kn=!!T.specularColorMap,qi=!!T.specularIntensityMap,Z=Lt&&!!T.transmissionMap,He=Lt&&!!T.thicknessMap,Ee=!!T.alphaMap,Qn=!!T.extensions;let xr=_u;T.toneMapped&&(null===Pe||!0===Pe.isXRRenderTarget)&&(xr=i.toneMapping);const hs={shaderID:we,shaderType:T.type,shaderName:T.name,vertexShader:en,fragmentShader:ae,defines:T.defines,customVertexShaderID:ke,customFragmentShaderID:Ze,isRawShaderMaterial:!0===T.isRawShaderMaterial,glslVersion:T.glslVersion,precision:m,batching:Ct,batchingColor:Ct&&null!==ne._colorsTexture,instancing:yt,instancingColor:yt&&null!==ne.instanceColor,instancingMorph:yt&&null!==ne.morphTexture,supportsVertexTextures:p,outputColorSpace:null===Pe?i.outputColorSpace:!0===Pe.isXRRenderTarget?Pe.texture.colorSpace:ds,alphaToCoverage:!!T.alphaToCoverage,map:Mt,matcap:!!T.matcap,envMap:N,envMapMode:N&&re.mapping,envMapCubeUVHeight:J,aoMap:ze,lightMap:Fe,bumpMap:tt,normalMap:Me,displacementMap:p&&zt,emissiveMap:nt,normalMapObjectSpace:Me&&T.normalMapType===Soe,normalMapTangentSpace:Me&&T.normalMapType===Kh,metalnessMap:ft,roughnessMap:z,anisotropy:R,anisotropyMap:Je,clearcoat:ce,clearcoatMap:dt,clearcoatNormalMap:bn,clearcoatRoughnessMap:Ve,dispersion:T.dispersion>0,iridescence:De,iridescenceMap:ct,iridescenceThicknessMap:Wn,sheen:Ae,sheenColorMap:ln,sheenRoughnessMap:mt,specularMap:_n,specularColorMap:kn,specularIntensityMap:qi,transmission:Lt,transmissionMap:Z,thicknessMap:He,gradientMap:!!T.gradientMap,opaque:!1===T.transparent&&T.blending===Ym&&!1===T.alphaToCoverage,alphaMap:Ee,alphaTest:T.alphaTest>0,alphaHash:!!T.alphaHash,combine:T.combine,mapUv:Mt&&b(T.map.channel),aoMapUv:ze&&b(T.aoMap.channel),lightMapUv:Fe&&b(T.lightMap.channel),bumpMapUv:tt&&b(T.bumpMap.channel),normalMapUv:Me&&b(T.normalMap.channel),displacementMapUv:zt&&b(T.displacementMap.channel),emissiveMapUv:nt&&b(T.emissiveMap.channel),metalnessMapUv:ft&&b(T.metalnessMap.channel),roughnessMapUv:z&&b(T.roughnessMap.channel),anisotropyMapUv:Je&&b(T.anisotropyMap.channel),clearcoatMapUv:dt&&b(T.clearcoatMap.channel),clearcoatNormalMapUv:bn&&b(T.clearcoatNormalMap.channel),clearcoatRoughnessMapUv:Ve&&b(T.clearcoatRoughnessMap.channel),iridescenceMapUv:ct&&b(T.iridescenceMap.channel),iridescenceThicknessMapUv:Wn&&b(T.iridescenceThicknessMap.channel),sheenColorMapUv:ln&&b(T.sheenColorMap.channel),sheenRoughnessMapUv:mt&&b(T.sheenRoughnessMap.channel),specularMapUv:_n&&b(T.specularMap.channel),specularColorMapUv:kn&&b(T.specularColorMap.channel),specularIntensityMapUv:qi&&b(T.specularIntensityMap.channel),transmissionMapUv:Z&&b(T.transmissionMap.channel),thicknessMapUv:He&&b(T.thicknessMap.channel),alphaMapUv:Ee&&b(T.alphaMap.channel),vertexTangents:!!ge.attributes.tangent&&(Me||R),vertexColors:T.vertexColors,vertexAlphas:!0===T.vertexColors&&!!ge.attributes.color&&4===ge.attributes.color.itemSize,pointsUvs:!0===ne.isPoints&&!!ge.attributes.uv&&(Mt||Ee),fog:!!se,useFog:!0===T.fog,fogExp2:!!se&&se.isFogExp2,flatShading:!0===T.flatShading,sizeAttenuation:!0===T.sizeAttenuation,logarithmicDepthBuffer:h,skinning:!0===ne.isSkinnedMesh,morphTargets:void 0!==ge.morphAttributes.position,morphNormals:void 0!==ge.morphAttributes.normal,morphColors:void 0!==ge.morphAttributes.color,morphTargetsCount:Ye,morphTextureStride:Et,numDirLights:A.directional.length,numPointLights:A.point.length,numSpotLights:A.spot.length,numSpotLightMaps:A.spotLightMap.length,numRectAreaLights:A.rectArea.length,numHemiLights:A.hemi.length,numDirLightShadows:A.directionalShadowMap.length,numPointLightShadows:A.pointShadowMap.length,numSpotLightShadows:A.spotShadowMap.length,numSpotLightShadowsWithMaps:A.numSpotLightShadowsWithMaps,numLightProbes:A.numLightProbes,numClippingPlanes:o.numPlanes,numClipIntersection:o.numIntersection,dithering:T.dithering,shadowMapEnabled:i.shadowMap.enabled&&$.length>0,shadowMapType:i.shadowMap.type,toneMapping:xr,decodeVideoTexture:Mt&&!0===T.map.isVideoTexture&&Zn.getTransfer(T.map.colorSpace)===Fi,premultipliedAlpha:T.premultipliedAlpha,doubleSided:T.side===Ko,flipSided:T.side===To,useDepthPacking:T.depthPacking>=0,depthPacking:T.depthPacking||0,index0AttributeName:T.index0AttributeName,extensionClipCullDistance:Qn&&!0===T.extensions.clipCullDistance&&n.has("WEBGL_clip_cull_distance"),extensionMultiDraw:(Qn&&!0===T.extensions.multiDraw||Ct)&&n.has("WEBGL_multi_draw"),rendererExtensionParallelShaderCompile:n.has("KHR_parallel_shader_compile"),customProgramCacheKey:T.customProgramCacheKey()};return hs.vertexUv1s=c.has(1),hs.vertexUv2s=c.has(2),hs.vertexUv3s=c.has(3),c.clear(),hs},getProgramCacheKey:function y(T){const A=[];if(T.shaderID?A.push(T.shaderID):(A.push(T.customVertexShaderID),A.push(T.customFragmentShaderID)),void 0!==T.defines)for(const $ in T.defines)A.push($),A.push(T.defines[$]);return!1===T.isRawShaderMaterial&&(function M(T,A){T.push(A.precision),T.push(A.outputColorSpace),T.push(A.envMapMode),T.push(A.envMapCubeUVHeight),T.push(A.mapUv),T.push(A.alphaMapUv),T.push(A.lightMapUv),T.push(A.aoMapUv),T.push(A.bumpMapUv),T.push(A.normalMapUv),T.push(A.displacementMapUv),T.push(A.emissiveMapUv),T.push(A.metalnessMapUv),T.push(A.roughnessMapUv),T.push(A.anisotropyMapUv),T.push(A.clearcoatMapUv),T.push(A.clearcoatNormalMapUv),T.push(A.clearcoatRoughnessMapUv),T.push(A.iridescenceMapUv),T.push(A.iridescenceThicknessMapUv),T.push(A.sheenColorMapUv),T.push(A.sheenRoughnessMapUv),T.push(A.specularMapUv),T.push(A.specularColorMapUv),T.push(A.specularIntensityMapUv),T.push(A.transmissionMapUv),T.push(A.thicknessMapUv),T.push(A.combine),T.push(A.fogExp2),T.push(A.sizeAttenuation),T.push(A.morphTargetsCount),T.push(A.morphAttributeCount),T.push(A.numDirLights),T.push(A.numPointLights),T.push(A.numSpotLights),T.push(A.numSpotLightMaps),T.push(A.numHemiLights),T.push(A.numRectAreaLights),T.push(A.numDirLightShadows),T.push(A.numPointLightShadows),T.push(A.numSpotLightShadows),T.push(A.numSpotLightShadowsWithMaps),T.push(A.numLightProbes),T.push(A.shadowMapType),T.push(A.toneMapping),T.push(A.numClippingPlanes),T.push(A.numClipIntersection),T.push(A.depthPacking)}(A,T),function x(T,A){a.disableAll(),A.supportsVertexTextures&&a.enable(0),A.instancing&&a.enable(1),A.instancingColor&&a.enable(2),A.instancingMorph&&a.enable(3),A.matcap&&a.enable(4),A.envMap&&a.enable(5),A.normalMapObjectSpace&&a.enable(6),A.normalMapTangentSpace&&a.enable(7),A.clearcoat&&a.enable(8),A.iridescence&&a.enable(9),A.alphaTest&&a.enable(10),A.vertexColors&&a.enable(11),A.vertexAlphas&&a.enable(12),A.vertexUv1s&&a.enable(13),A.vertexUv2s&&a.enable(14),A.vertexUv3s&&a.enable(15),A.vertexTangents&&a.enable(16),A.anisotropy&&a.enable(17),A.alphaHash&&a.enable(18),A.batching&&a.enable(19),A.dispersion&&a.enable(20),A.batchingColor&&a.enable(21),T.push(a.mask),a.disableAll(),A.fog&&a.enable(0),A.useFog&&a.enable(1),A.flatShading&&a.enable(2),A.logarithmicDepthBuffer&&a.enable(3),A.skinning&&a.enable(4),A.morphTargets&&a.enable(5),A.morphNormals&&a.enable(6),A.morphColors&&a.enable(7),A.premultipliedAlpha&&a.enable(8),A.shadowMapEnabled&&a.enable(9),A.doubleSided&&a.enable(10),A.flipSided&&a.enable(11),A.useDepthPacking&&a.enable(12),A.dithering&&a.enable(13),A.transmission&&a.enable(14),A.sheen&&a.enable(15),A.opaque&&a.enable(16),A.pointsUvs&&a.enable(17),A.decodeVideoTexture&&a.enable(18),A.alphaToCoverage&&a.enable(19),T.push(a.mask)}(A,T),A.push(i.outputColorSpace)),A.push(T.customProgramCacheKey),A.join()},getUniforms:function C(T){const A=g[T.type];let $;return $=A?j4.clone(ec[A].uniforms):T.uniforms,$},acquireProgram:function F(T,A){let $;for(let ie=0,ne=d.length;ie0?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 d(){for(let h=t,p=i.length;h1&&e.sort(h||eue),n.length>1&&n.sort(p||w5),r.length>1&&r.sort(p||w5)}}}function tue(){let i=new WeakMap;return{get:function t(n,r){const s=i.get(n);let o;return void 0===s?(o=new M5,i.set(n,[o])):r>=s.length?(o=new M5,s.push(o)):o=s[r],o},dispose:function e(){i=new WeakMap}}}function nue(){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 O,color:new qe};break;case"SpotLight":e={position:new O,direction:new O,color:new qe,distance:0,coneCos:0,penumbraCos:0,decay:0};break;case"PointLight":e={position:new O,color:new qe,distance:0,decay:0};break;case"HemisphereLight":e={direction:new O,skyColor:new qe,groundColor:new qe};break;case"RectAreaLight":e={color:new qe,position:new O,halfWidth:new O,halfHeight:new O}}return i[t.id]=e,e}}}let rue=0;function sue(i,t){return(t.castShadow?2:0)-(i.castShadow?2:0)+(t.map?1:0)-(i.map?1:0)}function oue(i){const t=new nue,e=function iue(){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={shadowIntensity:1,shadowBias:0,shadowNormalBias:0,shadowRadius:1,shadowMapSize:new xe};break;case"PointLight":e={shadowIntensity:1,shadowBias:0,shadowNormalBias:0,shadowRadius:1,shadowMapSize:new xe,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 O);const r=new O,s=new Ft,o=new Ft;return{setup:function a(c){let d=0,h=0,p=0;for(let T=0;T<9;T++)n.probe[T].set(0,0,0);let m=0,g=0,b=0,v=0,y=0,M=0,x=0,C=0,F=0,D=0,k=0;c.sort(sue);for(let T=0,A=c.length;T0&&(!0===i.has("OES_texture_float_linear")?(n.rectAreaLTC1=Qe.LTC_FLOAT_1,n.rectAreaLTC2=Qe.LTC_FLOAT_2):(n.rectAreaLTC1=Qe.LTC_HALF_1,n.rectAreaLTC2=Qe.LTC_HALF_2)),n.ambient[0]=d,n.ambient[1]=h,n.ambient[2]=p;const B=n.hash;(B.directionalLength!==m||B.pointLength!==g||B.spotLength!==b||B.rectAreaLength!==v||B.hemiLength!==y||B.numDirectionalShadows!==M||B.numPointShadows!==x||B.numSpotShadows!==C||B.numSpotMaps!==F||B.numLightProbes!==k)&&(n.directional.length=m,n.spot.length=b,n.rectArea.length=v,n.point.length=g,n.hemi.length=y,n.directionalShadow.length=M,n.directionalShadowMap.length=M,n.pointShadow.length=x,n.pointShadowMap.length=x,n.spotShadow.length=C,n.spotShadowMap.length=C,n.directionalShadowMatrix.length=M,n.pointShadowMatrix.length=x,n.spotLightMatrix.length=C+F-D,n.spotLightMap.length=F,n.numSpotLightShadowsWithMaps=D,n.numLightProbes=k,B.directionalLength=m,B.pointLength=g,B.spotLength=b,B.rectAreaLength=v,B.hemiLength=y,B.numDirectionalShadows=M,B.numPointShadows=x,B.numSpotShadows=C,B.numSpotMaps=F,B.numLightProbes=k,n.version=rue++)},setupView:function l(c,d){let h=0,p=0,m=0,g=0,b=0;const v=d.matrixWorldInverse;for(let y=0,M=c.length;y=o.length?(a=new C5(i),o.push(a)):a=o[s],a},dispose:function n(){t=new WeakMap}}}class S5 extends ko{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 E5 extends ko{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 lue="void main() {\n\tgl_Position = vec4( position, 1.0 );\n}",cue="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 due(i,t,e){let n=new iS;const r=new xe,s=new xe,o=new gi,a=new S5({depthPacking:Coe}),l=new E5,c={},d=e.maxTextureSize,h={[Ql]:To,[To]:Ql,[Ko]:Ko},p=new gl({defines:{VSM_SAMPLES:8},uniforms:{shadow_pass:{value:null},resolution:{value:new xe},radius:{value:4}},vertexShader:lue,fragmentShader:cue}),m=p.clone();m.defines.HORIZONTAL_PASS=1;const g=new hn;g.setAttribute("position",new Hi(new Float32Array([-1,-1,.5,3,-1,.5,-1,3,.5]),3));const b=new Nn(g,p),v=this;this.enabled=!1,this.autoUpdate=!0,this.needsUpdate=!1,this.type=n4;let y=this.type;function M(D,k){const B=t.update(b);p.defines.VSM_SAMPLES!==D.blurSamples&&(p.defines.VSM_SAMPLES=D.blurSamples,m.defines.VSM_SAMPLES=D.blurSamples,p.needsUpdate=!0,m.needsUpdate=!0),null===D.mapPass&&(D.mapPass=new bu(r.x,r.y)),p.uniforms.shadow_pass.value=D.map.texture,p.uniforms.resolution.value=D.mapSize,p.uniforms.radius.value=D.radius,i.setRenderTarget(D.mapPass),i.clear(),i.renderBufferDirect(k,null,B,p,b,null),m.uniforms.shadow_pass.value=D.mapPass.texture,m.uniforms.resolution.value=D.mapSize,m.uniforms.radius.value=D.radius,i.setRenderTarget(D.map),i.clear(),i.renderBufferDirect(k,null,B,m,b,null)}function x(D,k,B,T){let A=null;const $=!0===B.isPointLight?D.customDistanceMaterial:D.customDepthMaterial;if(void 0!==$)A=$;else if(A=!0===B.isPointLight?l:a,i.localClippingEnabled&&!0===k.clipShadows&&Array.isArray(k.clippingPlanes)&&0!==k.clippingPlanes.length||k.displacementMap&&0!==k.displacementScale||k.alphaMap&&k.alphaTest>0||k.map&&k.alphaTest>0){const ie=A.uuid,ne=k.uuid;let se=c[ie];void 0===se&&(se={},c[ie]=se);let ge=se[ne];void 0===ge&&(ge=A.clone(),se[ne]=ge,k.addEventListener("dispose",F)),A=ge}return A.visible=k.visible,A.wireframe=k.wireframe,A.side=T===qc?null!==k.shadowSide?k.shadowSide:k.side:null!==k.shadowSide?k.shadowSide:h[k.side],A.alphaMap=k.alphaMap,A.alphaTest=k.alphaTest,A.map=k.map,A.clipShadows=k.clipShadows,A.clippingPlanes=k.clippingPlanes,A.clipIntersection=k.clipIntersection,A.displacementMap=k.displacementMap,A.displacementScale=k.displacementScale,A.displacementBias=k.displacementBias,A.wireframeLinewidth=k.wireframeLinewidth,A.linewidth=k.linewidth,!0===B.isPointLight&&!0===A.isMeshDistanceMaterial&&(i.properties.get(A).light=B),A}function C(D,k,B,T,A){if(!1===D.visible)return;if(D.layers.test(k.layers)&&(D.isMesh||D.isLine||D.isPoints)&&(D.castShadow||D.receiveShadow&&A===qc)&&(!D.frustumCulled||n.intersectsObject(D))){D.modelViewMatrix.multiplyMatrices(B.matrixWorldInverse,D.matrixWorld);const ne=t.update(D),se=D.material;if(Array.isArray(se)){const ge=ne.groups;for(let q=0,re=ge.length;qd||r.y>d)&&(r.x>d&&(s.x=Math.floor(d/we.x),r.x=s.x*we.x,J.mapSize.x=s.x),r.y>d&&(s.y=Math.floor(d/we.y),r.y=s.y*we.y,J.mapSize.y=s.y)),null===J.map||!0===ne||!0===se){const Ye=this.type!==qc?{minFilter:_r,magFilter:_r}:{};null!==J.map&&J.map.dispose(),J.map=new bu(r.x,r.y,Ye),J.map.texture.name=re.name+".shadowMap",J.camera.updateProjectionMatrix()}i.setRenderTarget(J.map),i.clear();const Be=J.getViewportCount();for(let Ye=0;Ye=1):-1!==re.indexOf("OpenGL ES")&&(q=parseFloat(/^OpenGL ES (\d)/.exec(re)[1]),ge=q>=2);let J=null,we={};const Be=i.getParameter(i.SCISSOR_BOX),Ye=i.getParameter(i.VIEWPORT),Et=(new gi).fromArray(Be),en=(new gi).fromArray(Ye);function ae(Z,He,Ce,Ee){const Ke=new Uint8Array(4),tn=i.createTexture();i.bindTexture(Z,tn),i.texParameteri(Z,i.TEXTURE_MIN_FILTER,i.NEAREST),i.texParameteri(Z,i.TEXTURE_MAG_FILTER,i.NEAREST);for(let Qn=0;Qn"u")&&/OculusBrowser/g.test(navigator.userAgent),c=new xe,d=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(z,R){return m?new OffscreenCanvas(z,R):yb("canvas")}function b(z,R,ce){let Te=1;const De=ft(z);if((De.width>ce||De.height>ce)&&(Te=ce/Math.max(De.width,De.height)),Te<1){if(typeof HTMLImageElement<"u"&&z instanceof HTMLImageElement||typeof HTMLCanvasElement<"u"&&z instanceof HTMLCanvasElement||typeof ImageBitmap<"u"&&z instanceof ImageBitmap||typeof VideoFrame<"u"&&z instanceof VideoFrame){const Ae=Math.floor(Te*De.width),Lt=Math.floor(Te*De.height);void 0===h&&(h=g(Ae,Lt));const Je=R?g(Ae,Lt):h;return Je.width=Ae,Je.height=Lt,Je.getContext("2d").drawImage(z,0,0,Ae,Lt),console.warn("THREE.WebGLRenderer: Texture has been resized from ("+De.width+"x"+De.height+") to ("+Ae+"x"+Lt+")."),Je}return"data"in z&&console.warn("THREE.WebGLRenderer: Image in DataTexture is too big ("+De.width+"x"+De.height+")."),z}return z}function v(z){return z.generateMipmaps&&z.minFilter!==_r&&z.minFilter!==ar}function y(z){i.generateMipmap(z)}function M(z,R,ce,Te,De=!1){if(null!==z){if(void 0!==i[z])return i[z];console.warn("THREE.WebGLRenderer: Attempt to use non-existing WebGL internal format '"+z+"'")}let Ae=R;if(R===i.RED&&(ce===i.FLOAT&&(Ae=i.R32F),ce===i.HALF_FLOAT&&(Ae=i.R16F),ce===i.UNSIGNED_BYTE&&(Ae=i.R8)),R===i.RED_INTEGER&&(ce===i.UNSIGNED_BYTE&&(Ae=i.R8UI),ce===i.UNSIGNED_SHORT&&(Ae=i.R16UI),ce===i.UNSIGNED_INT&&(Ae=i.R32UI),ce===i.BYTE&&(Ae=i.R8I),ce===i.SHORT&&(Ae=i.R16I),ce===i.INT&&(Ae=i.R32I)),R===i.RG&&(ce===i.FLOAT&&(Ae=i.RG32F),ce===i.HALF_FLOAT&&(Ae=i.RG16F),ce===i.UNSIGNED_BYTE&&(Ae=i.RG8)),R===i.RG_INTEGER&&(ce===i.UNSIGNED_BYTE&&(Ae=i.RG8UI),ce===i.UNSIGNED_SHORT&&(Ae=i.RG16UI),ce===i.UNSIGNED_INT&&(Ae=i.RG32UI),ce===i.BYTE&&(Ae=i.RG8I),ce===i.SHORT&&(Ae=i.RG16I),ce===i.INT&&(Ae=i.RG32I)),R===i.RGB&&ce===i.UNSIGNED_INT_5_9_9_9_REV&&(Ae=i.RGB9_E5),R===i.RGBA){const Lt=De?PC:Zn.getTransfer(Te);ce===i.FLOAT&&(Ae=i.RGBA32F),ce===i.HALF_FLOAT&&(Ae=i.RGBA16F),ce===i.UNSIGNED_BYTE&&(Ae=Lt===Fi?i.SRGB8_ALPHA8:i.RGBA8),ce===i.UNSIGNED_SHORT_4_4_4_4&&(Ae=i.RGBA4),ce===i.UNSIGNED_SHORT_5_5_5_1&&(Ae=i.RGB5_A1)}return(Ae===i.R16F||Ae===i.R32F||Ae===i.RG16F||Ae===i.RG32F||Ae===i.RGBA16F||Ae===i.RGBA32F)&&t.get("EXT_color_buffer_float"),Ae}function x(z,R){let ce;return z?null===R||R===vu||R===Km?ce=i.DEPTH24_STENCIL8:R===Zo?ce=i.DEPTH32F_STENCIL8:R===mb&&(ce=i.DEPTH24_STENCIL8,console.warn("DepthTexture: 16 bit depth attachment is not supported with stencil. Using 24-bit attachment.")):null===R||R===vu||R===Km?ce=i.DEPTH_COMPONENT24:R===Zo?ce=i.DEPTH_COMPONENT32F:R===mb&&(ce=i.DEPTH_COMPONENT16),ce}function C(z,R){return!0===v(z)||z.isFramebufferTexture&&z.minFilter!==_r&&z.minFilter!==ar?Math.log2(Math.max(R.width,R.height))+1:void 0!==z.mipmaps&&z.mipmaps.length>0?z.mipmaps.length:z.isCompressedTexture&&Array.isArray(z.image)?R.mipmaps.length:1}function F(z){const R=z.target;R.removeEventListener("dispose",F),function k(z){const R=n.get(z);if(void 0===R.__webglInit)return;const ce=z.source,Te=p.get(ce);if(Te){const De=Te[R.__cacheKey];De.usedTimes--,0===De.usedTimes&&B(z),0===Object.keys(Te).length&&p.delete(ce)}n.remove(z)}(R),R.isVideoTexture&&d.delete(R)}function D(z){const R=z.target;R.removeEventListener("dispose",D),function T(z){const R=n.get(z);if(z.depthTexture&&z.depthTexture.dispose(),z.isWebGLCubeRenderTarget)for(let Te=0;Te<6;Te++){if(Array.isArray(R.__webglFramebuffer[Te]))for(let De=0;De0&&ce.__version!==z.version){const Te=z.image;if(null===Te)console.warn("THREE.WebGLRenderer: Texture marked for update but no image data found.");else{if(!1!==Te.complete)return void en(ce,z,R);console.warn("THREE.WebGLRenderer: Texture marked for update but image is incomplete")}}e.bindTexture(i.TEXTURE_2D,ce.__webglTexture,i.TEXTURE0+R)}const J={[Jl]:i.REPEAT,[Zi]:i.CLAMP_TO_EDGE,[fb]:i.MIRRORED_REPEAT},we={[_r]:i.NEAREST,[ok]:i.NEAREST_MIPMAP_NEAREST,[qm]:i.NEAREST_MIPMAP_LINEAR,[ar]:i.LINEAR,[pb]:i.LINEAR_MIPMAP_NEAREST,[hl]:i.LINEAR_MIPMAP_LINEAR},Be={[Eoe]:i.NEVER,[koe]:i.ALWAYS,[Aoe]:i.LESS,[b4]:i.LEQUAL,[Doe]:i.EQUAL,[Roe]:i.GEQUAL,[Toe]:i.GREATER,[Ioe]:i.NOTEQUAL};function Ye(z,R){if(R.type===Zo&&!1===t.has("OES_texture_float_linear")&&(R.magFilter===ar||R.magFilter===pb||R.magFilter===qm||R.magFilter===hl||R.minFilter===ar||R.minFilter===pb||R.minFilter===qm||R.minFilter===hl)&&console.warn("THREE.WebGLRenderer: Unable to use linear filtering with floating point textures. OES_texture_float_linear not supported on this device."),i.texParameteri(z,i.TEXTURE_WRAP_S,J[R.wrapS]),i.texParameteri(z,i.TEXTURE_WRAP_T,J[R.wrapT]),(z===i.TEXTURE_3D||z===i.TEXTURE_2D_ARRAY)&&i.texParameteri(z,i.TEXTURE_WRAP_R,J[R.wrapR]),i.texParameteri(z,i.TEXTURE_MAG_FILTER,we[R.magFilter]),i.texParameteri(z,i.TEXTURE_MIN_FILTER,we[R.minFilter]),R.compareFunction&&(i.texParameteri(z,i.TEXTURE_COMPARE_MODE,i.COMPARE_REF_TO_TEXTURE),i.texParameteri(z,i.TEXTURE_COMPARE_FUNC,Be[R.compareFunction])),!0===t.has("EXT_texture_filter_anisotropic")){if(R.magFilter===_r||R.minFilter!==qm&&R.minFilter!==hl||R.type===Zo&&!1===t.has("OES_texture_float_linear"))return;if(R.anisotropy>1||n.get(R).__currentAnisotropy){const ce=t.get("EXT_texture_filter_anisotropic");i.texParameterf(z,ce.TEXTURE_MAX_ANISOTROPY_EXT,Math.min(R.anisotropy,r.getMaxAnisotropy())),n.get(R).__currentAnisotropy=R.anisotropy}}}function Et(z,R){let ce=!1;void 0===z.__webglInit&&(z.__webglInit=!0,R.addEventListener("dispose",F));const Te=R.source;let De=p.get(Te);void 0===De&&(De={},p.set(Te,De));const Ae=function ne(z){const R=[];return R.push(z.wrapS),R.push(z.wrapT),R.push(z.wrapR||0),R.push(z.magFilter),R.push(z.minFilter),R.push(z.anisotropy),R.push(z.internalFormat),R.push(z.format),R.push(z.type),R.push(z.generateMipmaps),R.push(z.premultiplyAlpha),R.push(z.flipY),R.push(z.unpackAlignment),R.push(z.colorSpace),R.join()}(R);if(Ae!==z.__cacheKey){void 0===De[Ae]&&(De[Ae]={texture:i.createTexture(),usedTimes:0},o.memory.textures++,ce=!0),De[Ae].usedTimes++;const Lt=De[z.__cacheKey];void 0!==Lt&&(De[z.__cacheKey].usedTimes--,0===Lt.usedTimes&&B(R)),z.__cacheKey=Ae,z.__webglTexture=De[Ae].texture}return ce}function en(z,R,ce){let Te=i.TEXTURE_2D;(R.isDataArrayTexture||R.isCompressedArrayTexture)&&(Te=i.TEXTURE_2D_ARRAY),R.isData3DTexture&&(Te=i.TEXTURE_3D);const De=Et(z,R),Ae=R.source;e.bindTexture(Te,z.__webglTexture,i.TEXTURE0+ce);const Lt=n.get(Ae);if(Ae.version!==Lt.__version||!0===De){e.activeTexture(i.TEXTURE0+ce);const Je=Zn.getPrimaries(Zn.workingColorSpace),dt=R.colorSpace===yu?null:Zn.getPrimaries(R.colorSpace),bn=R.colorSpace===yu||Je===dt?i.NONE:i.BROWSER_DEFAULT_WEBGL;i.pixelStorei(i.UNPACK_FLIP_Y_WEBGL,R.flipY),i.pixelStorei(i.UNPACK_PREMULTIPLY_ALPHA_WEBGL,R.premultiplyAlpha),i.pixelStorei(i.UNPACK_ALIGNMENT,R.unpackAlignment),i.pixelStorei(i.UNPACK_COLORSPACE_CONVERSION_WEBGL,bn);let Ve=b(R.image,!1,r.maxTextureSize);Ve=nt(R,Ve);const ct=s.convert(R.format,R.colorSpace),Wn=s.convert(R.type);let mt,ln=M(R.internalFormat,ct,Wn,R.colorSpace,R.isVideoTexture);Ye(Te,R);const _n=R.mipmaps,kn=!0!==R.isVideoTexture,qi=void 0===Lt.__version||!0===De,Z=Ae.dataReady,He=C(R,Ve);if(R.isDepthTexture)ln=x(R.format===Qm,R.type),qi&&(kn?e.texStorage2D(i.TEXTURE_2D,1,ln,Ve.width,Ve.height):e.texImage2D(i.TEXTURE_2D,0,ln,Ve.width,Ve.height,0,ct,Wn,null));else if(R.isDataTexture)if(_n.length>0){kn&&qi&&e.texStorage2D(i.TEXTURE_2D,He,ln,_n[0].width,_n[0].height);for(let Ce=0,Ee=_n.length;Ce0){const Ke=yP(mt.width,mt.height,R.format,R.type);for(const tn of R.layerUpdates){const Qn=mt.data.subarray(tn*Ke/mt.data.BYTES_PER_ELEMENT,(tn+1)*Ke/mt.data.BYTES_PER_ELEMENT);e.compressedTexSubImage3D(i.TEXTURE_2D_ARRAY,Ce,0,0,tn,mt.width,mt.height,1,ct,Qn,0,0)}R.clearLayerUpdates()}else e.compressedTexSubImage3D(i.TEXTURE_2D_ARRAY,Ce,0,0,0,mt.width,mt.height,Ve.depth,ct,mt.data,0,0)}else e.compressedTexImage3D(i.TEXTURE_2D_ARRAY,Ce,ln,mt.width,mt.height,Ve.depth,0,mt.data,0,0);else console.warn("THREE.WebGLRenderer: Attempt to load unsupported compressed texture format in .uploadTexture()");else kn?Z&&e.texSubImage3D(i.TEXTURE_2D_ARRAY,Ce,0,0,0,mt.width,mt.height,Ve.depth,ct,Wn,mt.data):e.texImage3D(i.TEXTURE_2D_ARRAY,Ce,ln,mt.width,mt.height,Ve.depth,0,ct,Wn,mt.data)}else{kn&&qi&&e.texStorage2D(i.TEXTURE_2D,He,ln,_n[0].width,_n[0].height);for(let Ce=0,Ee=_n.length;Ce0){const Ce=yP(Ve.width,Ve.height,R.format,R.type);for(const Ee of R.layerUpdates){const Ke=Ve.data.subarray(Ee*Ce/Ve.data.BYTES_PER_ELEMENT,(Ee+1)*Ce/Ve.data.BYTES_PER_ELEMENT);e.texSubImage3D(i.TEXTURE_2D_ARRAY,0,0,0,Ee,Ve.width,Ve.height,1,ct,Wn,Ke)}R.clearLayerUpdates()}else e.texSubImage3D(i.TEXTURE_2D_ARRAY,0,0,0,0,Ve.width,Ve.height,Ve.depth,ct,Wn,Ve.data)}else e.texImage3D(i.TEXTURE_2D_ARRAY,0,ln,Ve.width,Ve.height,Ve.depth,0,ct,Wn,Ve.data);else if(R.isData3DTexture)kn?(qi&&e.texStorage3D(i.TEXTURE_3D,He,ln,Ve.width,Ve.height,Ve.depth),Z&&e.texSubImage3D(i.TEXTURE_3D,0,0,0,0,Ve.width,Ve.height,Ve.depth,ct,Wn,Ve.data)):e.texImage3D(i.TEXTURE_3D,0,ln,Ve.width,Ve.height,Ve.depth,0,ct,Wn,Ve.data);else if(R.isFramebufferTexture){if(qi)if(kn)e.texStorage2D(i.TEXTURE_2D,He,ln,Ve.width,Ve.height);else{let Ce=Ve.width,Ee=Ve.height;for(let Ke=0;Ke>=1,Ee>>=1}}else if(_n.length>0){if(kn&&qi){const Ce=ft(_n[0]);e.texStorage2D(i.TEXTURE_2D,He,ln,Ce.width,Ce.height)}for(let Ce=0,Ee=_n.length;Ce>Ae),ct=Math.max(1,R.height>>Ae);De===i.TEXTURE_3D||De===i.TEXTURE_2D_ARRAY?e.texImage3D(De,Ae,dt,Ve,ct,R.depth,0,Lt,Je,null):e.texImage2D(De,Ae,dt,Ve,ct,0,Lt,Je,null)}e.bindFramebuffer(i.FRAMEBUFFER,z),Me(R)?a.framebufferTexture2DMultisampleEXT(i.FRAMEBUFFER,Te,De,n.get(ce).__webglTexture,0,tt(R)):(De===i.TEXTURE_2D||De>=i.TEXTURE_CUBE_MAP_POSITIVE_X&&De<=i.TEXTURE_CUBE_MAP_NEGATIVE_Z)&&i.framebufferTexture2D(i.FRAMEBUFFER,Te,De,n.get(ce).__webglTexture,Ae),e.bindFramebuffer(i.FRAMEBUFFER,null)}function Ze(z,R,ce){if(i.bindRenderbuffer(i.RENDERBUFFER,z),R.depthBuffer){const Te=R.depthTexture,Ae=x(R.stencilBuffer,Te&&Te.isDepthTexture?Te.type:null),Lt=R.stencilBuffer?i.DEPTH_STENCIL_ATTACHMENT:i.DEPTH_ATTACHMENT,Je=tt(R);Me(R)?a.renderbufferStorageMultisampleEXT(i.RENDERBUFFER,Je,Ae,R.width,R.height):ce?i.renderbufferStorageMultisample(i.RENDERBUFFER,Je,Ae,R.width,R.height):i.renderbufferStorage(i.RENDERBUFFER,Ae,R.width,R.height),i.framebufferRenderbuffer(i.FRAMEBUFFER,Lt,i.RENDERBUFFER,z)}else{const Te=R.textures;for(let De=0;De0&&!0===t.has("WEBGL_multisampled_render_to_texture")&&!1!==R.__useRenderToTexture}function nt(z,R){const ce=z.colorSpace,Te=z.format,De=z.type;return!0===z.isCompressedTexture||!0===z.isVideoTexture||ce!==ds&&ce!==yu&&(Zn.getTransfer(ce)===Fi?(Te!==Io||De!==Zc)&&console.warn("THREE.WebGLTextures: sRGB encoded textures have to use RGBAFormat and UnsignedByteType."):console.error("THREE.WebGLTextures: Unsupported texture color space:",ce)),R}function ft(z){return typeof HTMLImageElement<"u"&&z instanceof HTMLImageElement?(c.width=z.naturalWidth||z.width,c.height=z.naturalHeight||z.height):typeof VideoFrame<"u"&&z instanceof VideoFrame?(c.width=z.displayWidth,c.height=z.displayHeight):(c.width=z.width,c.height=z.height),c}this.allocateTextureUnit=function ie(){const z=A;return z>=r.maxTextures&&console.warn("THREE.WebGLTextures: Trying to use "+z+" texture units while this GPU supports only "+r.maxTextures),A+=1,z},this.resetTextureUnits=function $(){A=0},this.setTexture2D=se,this.setTexture2DArray=function ge(z,R){const ce=n.get(z);z.version>0&&ce.__version!==z.version?en(ce,z,R):e.bindTexture(i.TEXTURE_2D_ARRAY,ce.__webglTexture,i.TEXTURE0+R)},this.setTexture3D=function q(z,R){const ce=n.get(z);z.version>0&&ce.__version!==z.version?en(ce,z,R):e.bindTexture(i.TEXTURE_3D,ce.__webglTexture,i.TEXTURE0+R)},this.setTextureCube=function re(z,R){const ce=n.get(z);z.version>0&&ce.__version!==z.version?function ae(z,R,ce){if(6!==R.image.length)return;const Te=Et(z,R),De=R.source;e.bindTexture(i.TEXTURE_CUBE_MAP,z.__webglTexture,i.TEXTURE0+ce);const Ae=n.get(De);if(De.version!==Ae.__version||!0===Te){e.activeTexture(i.TEXTURE0+ce);const Lt=Zn.getPrimaries(Zn.workingColorSpace),Je=R.colorSpace===yu?null:Zn.getPrimaries(R.colorSpace),dt=R.colorSpace===yu||Lt===Je?i.NONE:i.BROWSER_DEFAULT_WEBGL;i.pixelStorei(i.UNPACK_FLIP_Y_WEBGL,R.flipY),i.pixelStorei(i.UNPACK_PREMULTIPLY_ALPHA_WEBGL,R.premultiplyAlpha),i.pixelStorei(i.UNPACK_ALIGNMENT,R.unpackAlignment),i.pixelStorei(i.UNPACK_COLORSPACE_CONVERSION_WEBGL,dt);const bn=R.isCompressedTexture||R.image[0].isCompressedTexture,Ve=R.image[0]&&R.image[0].isDataTexture,ct=[];for(let Ee=0;Ee<6;Ee++)ct[Ee]=bn||Ve?Ve?R.image[Ee].image:R.image[Ee]:b(R.image[Ee],!0,r.maxCubemapSize),ct[Ee]=nt(R,ct[Ee]);const Wn=ct[0],ln=s.convert(R.format,R.colorSpace),mt=s.convert(R.type),_n=M(R.internalFormat,ln,mt,R.colorSpace),kn=!0!==R.isVideoTexture,qi=void 0===Ae.__version||!0===Te,Z=De.dataReady;let Ce,He=C(R,Wn);if(Ye(i.TEXTURE_CUBE_MAP,R),bn){kn&&qi&&e.texStorage2D(i.TEXTURE_CUBE_MAP,He,_n,Wn.width,Wn.height);for(let Ee=0;Ee<6;Ee++){Ce=ct[Ee].mipmaps;for(let Ke=0;Ke0&&He++;const Ee=ft(ct[0]);e.texStorage2D(i.TEXTURE_CUBE_MAP,He,_n,Ee.width,Ee.height)}for(let Ee=0;Ee<6;Ee++)if(Ve){kn?Z&&e.texSubImage2D(i.TEXTURE_CUBE_MAP_POSITIVE_X+Ee,0,0,0,ct[Ee].width,ct[Ee].height,ln,mt,ct[Ee].data):e.texImage2D(i.TEXTURE_CUBE_MAP_POSITIVE_X+Ee,0,_n,ct[Ee].width,ct[Ee].height,0,ln,mt,ct[Ee].data);for(let Ke=0;Ke1;if(Lt||(void 0===Te.__webglTexture&&(Te.__webglTexture=i.createTexture()),Te.__version=R.version,o.memory.textures++),Ae){ce.__webglFramebuffer=[];for(let Je=0;Je<6;Je++)if(R.mipmaps&&R.mipmaps.length>0){ce.__webglFramebuffer[Je]=[];for(let dt=0;dt0){ce.__webglFramebuffer=[];for(let Je=0;Je0&&!1===Me(z)){ce.__webglMultisampledFramebuffer=i.createFramebuffer(),ce.__webglColorRenderbuffer=[],e.bindFramebuffer(i.FRAMEBUFFER,ce.__webglMultisampledFramebuffer);for(let Je=0;Je0)for(let dt=0;dt0)for(let dt=0;dt0)if(!1===Me(z)){const R=z.textures,ce=z.width,Te=z.height;let De=i.COLOR_BUFFER_BIT;const Ae=z.stencilBuffer?i.DEPTH_STENCIL_ATTACHMENT:i.DEPTH_ATTACHMENT,Lt=n.get(z),Je=R.length>1;if(Je)for(let dt=0;dtm+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(yue)))}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 ta;n.matrixAutoUpdate=!1,n.visible=!1,t.joints[e.jointName]=n,t.add(n)}return t.joints[e.jointName]}}class wue{constructor(){this.texture=null,this.mesh=null,this.depthNear=0,this.depthFar=0}init(t,e,n){if(null===this.texture){const r=new Ro;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}}getMesh(t){if(null!==this.texture&&null===this.mesh){const e=t.cameras[0].viewport,n=new gl({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:e.z},depthHeight:{value:e.w}}});this.mesh=new Nn(new sf(20,20),n)}return this.mesh}reset(){this.texture=null,this.mesh=null}getDepthTexture(){return this.texture}}class Mue extends ng{constructor(t,e){super();const n=this;let r=null,s=1,o=null,a="local-floor",l=1,c=null,d=null,h=null,p=null,m=null,g=null;const b=new wue,v=e.getContextAttributes();let y=null,M=null;const x=[],C=[],F=new xe;let D=null;const k=new br;k.layers.enable(1),k.viewport=new gi;const B=new br;B.layers.enable(2),B.viewport=new gi;const T=[k,B],A=new vue;A.layers.enable(1),A.layers.enable(2);let $=null,ie=null;function ne(ae){const ke=C.indexOf(ae.inputSource);if(-1===ke)return;const Ze=x[ke];void 0!==Ze&&(Ze.update(ae.inputSource,ae.frame,c||o),Ze.dispatchEvent({type:ae.type,data:ae.inputSource}))}function se(){r.removeEventListener("select",ne),r.removeEventListener("selectstart",ne),r.removeEventListener("selectend",ne),r.removeEventListener("squeeze",ne),r.removeEventListener("squeezestart",ne),r.removeEventListener("squeezeend",ne),r.removeEventListener("end",se),r.removeEventListener("inputsourceschange",ge);for(let ae=0;ae=0&&(C[Pe]=null,x[Pe].disconnect(Ze))}for(let ke=0;ke=C.length){C.push(Ze),Pe=Ct;break}if(null===C[Ct]){C[Ct]=Ze,Pe=Ct;break}}if(-1===Pe)break}const yt=x[Pe];yt&&yt.connect(Ze)}}this.cameraAutoUpdate=!0,this.enabled=!1,this.isPresenting=!1,this.getController=function(ae){let ke=x[ae];return void 0===ke&&(ke=new bP,x[ae]=ke),ke.getTargetRaySpace()},this.getControllerGrip=function(ae){let ke=x[ae];return void 0===ke&&(ke=new bP,x[ae]=ke),ke.getGripSpace()},this.getHand=function(ae){let ke=x[ae];return void 0===ke&&(ke=new bP,x[ae]=ke),ke.getHandSpace()},this.setFramebufferScaleFactor=function(ae){s=ae,!0===n.isPresenting&&console.warn("THREE.WebXRManager: Cannot change framebuffer scale while presenting.")},this.setReferenceSpaceType=function(ae){a=ae,!0===n.isPresenting&&console.warn("THREE.WebXRManager: Cannot change reference space type while presenting.")},this.getReferenceSpace=function(){return c||o},this.setReferenceSpace=function(ae){c=ae},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 ae=vt(function*(ke){if(r=ke,null!==r){if(y=t.getRenderTarget(),r.addEventListener("select",ne),r.addEventListener("selectstart",ne),r.addEventListener("selectend",ne),r.addEventListener("squeeze",ne),r.addEventListener("squeezestart",ne),r.addEventListener("squeezeend",ne),r.addEventListener("end",se),r.addEventListener("inputsourceschange",ge),!0!==v.xrCompatible&&(yield e.makeXRCompatible()),D=t.getPixelRatio(),t.getSize(F),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 bu(m.framebufferWidth,m.framebufferHeight,{format:Io,type:Zc,colorSpace:t.outputColorSpace,stencilBuffer:v.stencil});else{let Ze=null,Pe=null,yt=null;v.depth&&(yt=v.stencil?e.DEPTH24_STENCIL8:e.DEPTH_COMPONENT24,Ze=v.stencil?Qm:Zm,Pe=v.stencil?Km:vu);const Ct={colorFormat:e.RGBA8,depthFormat:yt,scaleFactor:s};h=new XRWebGLBinding(r,e),p=h.createProjectionLayer(Ct),r.updateRenderState({layers:[p]}),t.setPixelRatio(1),t.setSize(p.textureWidth,p.textureHeight,!1),M=new bu(p.textureWidth,p.textureHeight,{format:Io,type:Zc,depthTexture:new r5(p.textureWidth,p.textureHeight,Pe,void 0,void 0,void 0,void 0,void 0,void 0,Ze),stencilBuffer:v.stencil,colorSpace:t.outputColorSpace,samples:v.antialias?4:0,resolveDepthBuffer:!1===p.ignoreDepthValues})}M.isXRRenderTarget=!0,this.setFoveation(l),c=null,o=yield r.requestReferenceSpace(a),en.setContext(r),en.start(),n.isPresenting=!0,n.dispatchEvent({type:"sessionstart"})}});return function(ke){return ae.apply(this,arguments)}}(),this.getEnvironmentBlendMode=function(){if(null!==r)return r.environmentBlendMode},this.getDepthTexture=function(){return b.getDepthTexture()};const q=new O,re=new O;function we(ae,ke){null===ke?ae.matrixWorld.copy(ae.matrix):ae.matrixWorld.multiplyMatrices(ke.matrixWorld,ae.matrix),ae.matrixWorldInverse.copy(ae.matrixWorld).invert()}this.updateCamera=function(ae){if(null===r)return;null!==b.texture&&(ae.near=b.depthNear,ae.far=b.depthFar),A.near=B.near=k.near=ae.near,A.far=B.far=k.far=ae.far,($!==A.near||ie!==A.far)&&(r.updateRenderState({depthNear:A.near,depthFar:A.far}),$=A.near,ie=A.far,k.near=$,k.far=ie,B.near=$,B.far=ie,k.updateProjectionMatrix(),B.updateProjectionMatrix(),ae.updateProjectionMatrix());const ke=ae.parent,Ze=A.cameras;we(A,ke);for(let Pe=0;Pe0&&(v.alphaTest.value=y.alphaTest);const M=t.get(y),x=M.envMap,C=M.envMapRotation;x&&(v.envMap.value=x,df.copy(C),df.x*=-1,df.y*=-1,df.z*=-1,x.isCubeTexture&&!1===x.isRenderTargetTexture&&(df.y*=-1,df.z*=-1),v.envMapRotation.value.setFromMatrix4(Cue.makeRotationFromEuler(df)),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,v.lightMapIntensity.value=y.lightMapIntensity,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,W4(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 d(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===To&&v.clearcoatNormalScale.value.negate())),y.dispersion>0&&(v.dispersion.value=y.dispersion),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 Eue(i,t,e,n){let r={},s={},o=[];const a=i.getParameter(i.MAX_UNIFORM_BUFFER_BINDINGS);function m(M,x,C,F){const D=M.value,k=x+"_"+C;if(void 0===F[k])return F[k]="number"==typeof D||"boolean"==typeof D?D:D.clone(),!0;{const B=F[k];if("number"==typeof D||"boolean"==typeof D){if(B!==D)return F[k]=D,!0}else if(!1===B.equals(D))return B.copy(D),!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 k=0,B=x.length;k0&&(C+=16-D),M.__size=C,M.__cache={}}(M),C=function d(M){const x=function h(){for(let M=0;M0),qt=!!le.morphAttributes.position,ai=!!le.morphAttributes.normal,Li=!!le.morphAttributes.color;let er=_u;de.toneMapped&&(null===k||!0===k.isXRRenderTarget)&&(er=x.toneMapping);const ra=le.morphAttributes.position||le.morphAttributes.normal||le.morphAttributes.color,hi=void 0!==ra?ra.length:0,At=nt.get(de),fs=v.state.lights;!0!==ae||!0!==ke&&L===T||bn.setState(de,L,L===T&&de.id===B);let fi=!1;de.version===At.__version?(At.needsLights&&At.lightsStateVersion!==fs.state.version||At.outputColorSpace!==bt||te.isBatchedMesh&&!1===At.batching||!te.isBatchedMesh&&!0===At.batching||te.isBatchedMesh&&!0===At.batchingColor&&null===te.colorTexture||te.isBatchedMesh&&!1===At.batchingColor&&null!==te.colorTexture||te.isInstancedMesh&&!1===At.instancing||!te.isInstancedMesh&&!0===At.instancing||te.isSkinnedMesh&&!1===At.skinning||!te.isSkinnedMesh&&!0===At.skinning||te.isInstancedMesh&&!0===At.instancingColor&&null===te.instanceColor||te.isInstancedMesh&&!1===At.instancingColor&&null!==te.instanceColor||te.isInstancedMesh&&!0===At.instancingMorph&&null===te.morphTexture||te.isInstancedMesh&&!1===At.instancingMorph&&null!==te.morphTexture||At.envMap!==xt||!0===de.fog&&At.fog!==je||void 0!==At.numClippingPlanes&&(At.numClippingPlanes!==bn.numPlanes||At.numIntersection!==bn.numIntersection)||At.vertexAlphas!==Yt||At.vertexTangents!==on||At.morphTargets!==qt||At.morphNormals!==ai||At.morphColors!==Li||At.toneMapping!==er||At.morphTargetsCount!==hi)&&(fi=!0):(fi=!0,At.__version=de.version);let vl=At.currentProgram;!0===fi&&(vl=_E(de,K,te));let Wg=!1,sa=!1,$O=!1;const wr=vl.getUniforms(),Ou=At.uniforms;if(Me.useProgram(vl.program)&&(Wg=!0,sa=!0,$O=!0),de.id!==B&&(B=de.id,sa=!0),Wg||T!==L){wr.setValue(N,"projectionMatrix",L.projectionMatrix),wr.setValue(N,"viewMatrix",L.matrixWorldInverse);const La=wr.map.cameraPosition;void 0!==La&&La.setValue(N,Pe.setFromMatrixPosition(L.matrixWorld)),tt.logarithmicDepthBuffer&&wr.setValue(N,"logDepthBufFC",2/(Math.log(L.far+1)/Math.LN2)),(de.isMeshPhongMaterial||de.isMeshToonMaterial||de.isMeshLambertMaterial||de.isMeshBasicMaterial||de.isMeshStandardMaterial||de.isShaderMaterial)&&wr.setValue(N,"isOrthographic",!0===L.isOrthographicCamera),T!==L&&(T=L,sa=!0,$O=!0)}if(te.isSkinnedMesh){wr.setOptional(N,te,"bindMatrix"),wr.setOptional(N,te,"bindMatrixInverse");const La=te.skeleton;La&&(null===La.boneTexture&&La.computeBoneTexture(),wr.setValue(N,"boneTexture",La.boneTexture,ft))}te.isBatchedMesh&&(wr.setOptional(N,te,"batchingTexture"),wr.setValue(N,"batchingTexture",te._matricesTexture,ft),wr.setOptional(N,te,"batchingIdTexture"),wr.setValue(N,"batchingIdTexture",te._indirectTexture,ft),wr.setOptional(N,te,"batchingColorTexture"),null!==te._colorsTexture&&wr.setValue(N,"batchingColorTexture",te._colorsTexture,ft));const WO=le.morphAttributes;if((void 0!==WO.position||void 0!==WO.normal||void 0!==WO.color)&&Wn.update(te,le,vl),(sa||At.receiveShadow!==te.receiveShadow)&&(At.receiveShadow=te.receiveShadow,wr.setValue(N,"receiveShadow",te.receiveShadow)),de.isMeshGouraudMaterial&&null!==de.envMap&&(Ou.envMap.value=xt,Ou.flipEnvMap.value=xt.isCubeTexture&&!1===xt.isRenderTargetTexture?-1:1),de.isMeshStandardMaterial&&null===de.envMap&&null!==K.environment&&(Ou.envMapIntensity.value=K.environmentIntensity),sa&&(wr.setValue(N,"toneMappingExposure",x.toneMappingExposure),At.needsLights&&function Eve(L,K){L.ambientLightColor.needsUpdate=K,L.lightProbe.needsUpdate=K,L.directionalLights.needsUpdate=K,L.directionalLightShadows.needsUpdate=K,L.pointLights.needsUpdate=K,L.pointLightShadows.needsUpdate=K,L.spotLights.needsUpdate=K,L.spotLightShadows.needsUpdate=K,L.rectAreaLights.needsUpdate=K,L.hemisphereLights.needsUpdate=K}(Ou,$O),je&&!0===de.fog&&Lt.refreshFogUniforms(Ou,je),Lt.refreshMaterialUniforms(Ou,de,re,q,v.state.transmissionRenderTarget[L.id]),aS.upload(N,h$(At),Ou,ft)),de.isShaderMaterial&&!0===de.uniformsNeedUpdate&&(aS.upload(N,h$(At),Ou,ft),de.uniformsNeedUpdate=!1),de.isSpriteMaterial&&wr.setValue(N,"center",te.center),wr.setValue(N,"modelViewMatrix",te.modelViewMatrix),wr.setValue(N,"normalMatrix",te.normalMatrix),wr.setValue(N,"modelMatrix",te.matrixWorld),de.isShaderMaterial||de.isRawShaderMaterial){const La=de.uniformsGroups;for(let jO=0,Dve=La.length;jO{function je(){de.forEach(function(rt){nt.get(rt).currentProgram.isReady()&&de.delete(rt)}),0!==de.size?setTimeout(je,10):te(L)}null!==Fe.get("KHR_parallel_shader_compile")?je():setTimeout(je,10)})};let ui=null;function sc(){If.stop()}function l$(){If.start()}const If=new X4;function GO(L,K,le,de){if(!1===L.visible)return;if(L.layers.test(K.layers))if(L.isGroup)le=L.renderOrder;else if(L.isLOD)!0===L.autoUpdate&&L.update(K);else if(L.isLight)v.pushLight(L),L.castShadow&&v.pushShadow(L);else if(L.isSprite){if(!L.frustumCulled||en.intersectsSprite(L)){de&&yt.setFromMatrixPosition(L.matrixWorld).applyMatrix4(Ze);const rt=De.update(L),bt=L.material;bt.visible&&b.push(L,rt,bt,le,yt.z,null)}}else if((L.isMesh||L.isLine||L.isPoints)&&(!L.frustumCulled||en.intersectsObject(L))){const rt=De.update(L),bt=L.material;if(de&&(void 0!==L.boundingSphere?(null===L.boundingSphere&&L.computeBoundingSphere(),yt.copy(L.boundingSphere.center)):(null===rt.boundingSphere&&rt.computeBoundingSphere(),yt.copy(rt.boundingSphere.center)),yt.applyMatrix4(L.matrixWorld).applyMatrix4(Ze)),Array.isArray(bt)){const xt=rt.groups;for(let Yt=0,on=xt.length;Yt0&&gE(te,K,le),je.length>0&&gE(je,K,le),rt.length>0&&gE(rt,K,le),Me.buffers.depth.setTest(!0),Me.buffers.depth.setMask(!0),Me.buffers.color.setMask(!0),Me.setPolygonOffset(!1)}function d$(L,K,le,de){if(null!==(!0===le.isScene?le.overrideMaterial:null))return;void 0===v.state.transmissionRenderTarget[de.id]&&(v.state.transmissionRenderTarget[de.id]=new bu(1,1,{generateMipmaps:!0,type:Fe.has("EXT_color_buffer_half_float")||Fe.has("EXT_color_buffer_float")?Xm:Zc,minFilter:hl,samples:4,stencilBuffer:s,resolveDepthBuffer:!1,resolveStencilBuffer:!1,colorSpace:Zn.workingColorSpace}));const je=v.state.transmissionRenderTarget[de.id],rt=de.viewport||A;je.setSize(rt.z,rt.w);const bt=x.getRenderTarget();x.setRenderTarget(je),x.getClearColor(ne),se=x.getClearAlpha(),se<1&&x.setClearColor(16777215,.5),x.clear(),Mt&&ct.render(le);const xt=x.toneMapping;x.toneMapping=_u;const Yt=de.viewport;if(void 0!==de.viewport&&(de.viewport=void 0),v.setupLightsView(de),!0===ae&&bn.setGlobalState(x.clippingPlanes,de),gE(L,le,de),ft.updateMultisampleRenderTarget(je),ft.updateRenderTargetMipmap(je),!1===Fe.has("WEBGL_multisampled_render_to_texture")){let on=!1;for(let qt=0,ai=K.length;qt0)for(let rt=0,bt=je.length;rt0&&d$(de,te,L,K),Mt&&ct.render(L),c$(b,L,K);null!==k&&(ft.updateMultisampleRenderTarget(k),ft.updateRenderTargetMipmap(k)),!0===L.isScene&&L.onAfterRender(x,L,K),kn.resetDefaultState(),B=-1,T=null,M.pop(),M.length>0?(v=M[M.length-1],!0===ae&&bn.setGlobalState(x.clippingPlanes,v.state.camera)):v=null,y.pop(),b=y.length>0?y[y.length-1]:null},this.getActiveCubeFace=function(){return F},this.getActiveMipmapLevel=function(){return D},this.getRenderTarget=function(){return k},this.setRenderTargetTextures=function(L,K,le){nt.get(L.texture).__webglTexture=K,nt.get(L.depthTexture).__webglTexture=le;const de=nt.get(L);de.__hasExternalTextures=!0,de.__autoAllocateDepthBuffer=void 0===le,de.__autoAllocateDepthBuffer||!0===Fe.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(L,K){const le=nt.get(L);le.__webglFramebuffer=K,le.__useDefaultFramebuffer=void 0===K},this.setRenderTarget=function(L,K=0,le=0){k=L,F=K,D=le;let de=!0,te=null,je=!1,rt=!1;if(L){const xt=nt.get(L);void 0!==xt.__useDefaultFramebuffer?(Me.bindFramebuffer(N.FRAMEBUFFER,null),de=!1):void 0===xt.__webglFramebuffer?ft.setupRenderTarget(L):xt.__hasExternalTextures&&ft.rebindTextures(L,nt.get(L.texture).__webglTexture,nt.get(L.depthTexture).__webglTexture);const Yt=L.texture;(Yt.isData3DTexture||Yt.isDataArrayTexture||Yt.isCompressedArrayTexture)&&(rt=!0);const on=nt.get(L).__webglFramebuffer;L.isWebGLCubeRenderTarget?(te=Array.isArray(on[K])?on[K][le]:on[K],je=!0):te=L.samples>0&&!1===ft.useMultisampledRTT(L)?nt.get(L).__webglMultisampledFramebuffer:Array.isArray(on)?on[le]:on,A.copy(L.viewport),$.copy(L.scissor),ie=L.scissorTest}else A.copy(Be).multiplyScalar(re).floor(),$.copy(Ye).multiplyScalar(re).floor(),ie=Et;if(Me.bindFramebuffer(N.FRAMEBUFFER,te)&&de&&Me.drawBuffers(L,te),Me.viewport(A),Me.scissor($),Me.setScissorTest(ie),je){const xt=nt.get(L.texture);N.framebufferTexture2D(N.FRAMEBUFFER,N.COLOR_ATTACHMENT0,N.TEXTURE_CUBE_MAP_POSITIVE_X+K,xt.__webglTexture,le)}else if(rt){const xt=nt.get(L.texture);N.framebufferTextureLayer(N.FRAMEBUFFER,N.COLOR_ATTACHMENT0,xt.__webglTexture,le||0,K||0)}B=-1},this.readRenderTargetPixels=function(L,K,le,de,te,je,rt){if(!L||!L.isWebGLRenderTarget)return void console.error("THREE.WebGLRenderer.readRenderTargetPixels: renderTarget is not THREE.WebGLRenderTarget.");let bt=nt.get(L).__webglFramebuffer;if(L.isWebGLCubeRenderTarget&&void 0!==rt&&(bt=bt[rt]),bt){Me.bindFramebuffer(N.FRAMEBUFFER,bt);try{const xt=L.texture,Yt=xt.format,on=xt.type;if(!tt.textureFormatReadable(Yt))return void console.error("THREE.WebGLRenderer.readRenderTargetPixels: renderTarget is not in RGBA or implementation defined format.");if(!tt.textureTypeReadable(on))return void console.error("THREE.WebGLRenderer.readRenderTargetPixels: renderTarget is not in UnsignedByteType or implementation defined type.");K>=0&&K<=L.width-de&&le>=0&&le<=L.height-te&&N.readPixels(K,le,de,te,_n.convert(Yt),_n.convert(on),je)}finally{const xt=null!==k?nt.get(k).__webglFramebuffer:null;Me.bindFramebuffer(N.FRAMEBUFFER,xt)}}},this.readRenderTargetPixelsAsync=function(){var L=vt(function*(K,le,de,te,je,rt,bt){if(!K||!K.isWebGLRenderTarget)throw new Error("THREE.WebGLRenderer.readRenderTargetPixels: renderTarget is not THREE.WebGLRenderTarget.");let xt=nt.get(K).__webglFramebuffer;if(K.isWebGLCubeRenderTarget&&void 0!==bt&&(xt=xt[bt]),xt){Me.bindFramebuffer(N.FRAMEBUFFER,xt);try{const Yt=K.texture,on=Yt.format,qt=Yt.type;if(!tt.textureFormatReadable(on))throw new Error("THREE.WebGLRenderer.readRenderTargetPixelsAsync: renderTarget is not in RGBA or implementation defined format.");if(!tt.textureTypeReadable(qt))throw new Error("THREE.WebGLRenderer.readRenderTargetPixelsAsync: renderTarget is not in UnsignedByteType or implementation defined type.");if(le>=0&&le<=K.width-te&&de>=0&&de<=K.height-je){const ai=N.createBuffer();N.bindBuffer(N.PIXEL_PACK_BUFFER,ai),N.bufferData(N.PIXEL_PACK_BUFFER,rt.byteLength,N.STREAM_READ),N.readPixels(le,de,te,je,_n.convert(on),_n.convert(qt),0),N.flush();const Li=N.fenceSync(N.SYNC_GPU_COMMANDS_COMPLETE,0);yield function Qoe(i,t,e){return new Promise(function(n,r){setTimeout(function s(){switch(i.clientWaitSync(t,i.SYNC_FLUSH_COMMANDS_BIT,0)){case i.WAIT_FAILED:r();break;case i.TIMEOUT_EXPIRED:setTimeout(s,e);break;default:n()}},e)})}(N,Li,4);try{N.bindBuffer(N.PIXEL_PACK_BUFFER,ai),N.getBufferSubData(N.PIXEL_PACK_BUFFER,0,rt)}finally{N.deleteBuffer(ai),N.deleteSync(Li)}return rt}}finally{const Yt=null!==k?nt.get(k).__webglFramebuffer:null;Me.bindFramebuffer(N.FRAMEBUFFER,Yt)}}});return function(K,le,de,te,je,rt,bt){return L.apply(this,arguments)}}(),this.copyFramebufferToTexture=function(L,K=null,le=0){!0!==L.isTexture&&(sg("WebGLRenderer: copyFramebufferToTexture function signature has changed."),K=arguments[0]||null,L=arguments[1]);const de=Math.pow(2,-le),te=Math.floor(L.image.width*de),je=Math.floor(L.image.height*de),rt=null!==K?K.x:0,bt=null!==K?K.y:0;ft.setTexture2D(L,0),N.copyTexSubImage2D(N.TEXTURE_2D,le,0,0,rt,bt,te,je),Me.unbindTexture()},this.copyTextureToTexture=function(L,K,le=null,de=null,te=0){let je,rt,bt,xt,Yt,on;!0!==L.isTexture&&(sg("WebGLRenderer: copyTextureToTexture function signature has changed."),de=arguments[0]||null,L=arguments[1],K=arguments[2],te=arguments[3]||0,le=null),null!==le?(je=le.max.x-le.min.x,rt=le.max.y-le.min.y,bt=le.min.x,xt=le.min.y):(je=L.image.width,rt=L.image.height,bt=0,xt=0),null!==de?(Yt=de.x,on=de.y):(Yt=0,on=0);const qt=_n.convert(K.format),ai=_n.convert(K.type);ft.setTexture2D(K,0),N.pixelStorei(N.UNPACK_FLIP_Y_WEBGL,K.flipY),N.pixelStorei(N.UNPACK_PREMULTIPLY_ALPHA_WEBGL,K.premultiplyAlpha),N.pixelStorei(N.UNPACK_ALIGNMENT,K.unpackAlignment);const Li=N.getParameter(N.UNPACK_ROW_LENGTH),er=N.getParameter(N.UNPACK_IMAGE_HEIGHT),ra=N.getParameter(N.UNPACK_SKIP_PIXELS),hi=N.getParameter(N.UNPACK_SKIP_ROWS),At=N.getParameter(N.UNPACK_SKIP_IMAGES),fs=L.isCompressedTexture?L.mipmaps[te]:L.image;N.pixelStorei(N.UNPACK_ROW_LENGTH,fs.width),N.pixelStorei(N.UNPACK_IMAGE_HEIGHT,fs.height),N.pixelStorei(N.UNPACK_SKIP_PIXELS,bt),N.pixelStorei(N.UNPACK_SKIP_ROWS,xt),L.isDataTexture?N.texSubImage2D(N.TEXTURE_2D,te,Yt,on,je,rt,qt,ai,fs.data):L.isCompressedTexture?N.compressedTexSubImage2D(N.TEXTURE_2D,te,Yt,on,fs.width,fs.height,qt,fs.data):N.texSubImage2D(N.TEXTURE_2D,te,Yt,on,je,rt,qt,ai,fs),N.pixelStorei(N.UNPACK_ROW_LENGTH,Li),N.pixelStorei(N.UNPACK_IMAGE_HEIGHT,er),N.pixelStorei(N.UNPACK_SKIP_PIXELS,ra),N.pixelStorei(N.UNPACK_SKIP_ROWS,hi),N.pixelStorei(N.UNPACK_SKIP_IMAGES,At),0===te&&K.generateMipmaps&&N.generateMipmap(N.TEXTURE_2D),Me.unbindTexture()},this.copyTextureToTexture3D=function(L,K,le=null,de=null,te=0){let je,rt,bt,xt,Yt,on,qt,ai,Li;!0!==L.isTexture&&(sg("WebGLRenderer: copyTextureToTexture3D function signature has changed."),le=arguments[0]||null,de=arguments[1]||null,L=arguments[2],K=arguments[3],te=arguments[4]||0);const er=L.isCompressedTexture?L.mipmaps[te]:L.image;null!==le?(je=le.max.x-le.min.x,rt=le.max.y-le.min.y,bt=le.max.z-le.min.z,xt=le.min.x,Yt=le.min.y,on=le.min.z):(je=er.width,rt=er.height,bt=er.depth,xt=0,Yt=0,on=0),null!==de?(qt=de.x,ai=de.y,Li=de.z):(qt=0,ai=0,Li=0);const ra=_n.convert(K.format),hi=_n.convert(K.type);let At;if(K.isData3DTexture)ft.setTexture3D(K,0),At=N.TEXTURE_3D;else{if(!K.isDataArrayTexture&&!K.isCompressedArrayTexture)return void console.warn("THREE.WebGLRenderer.copyTextureToTexture3D: only supports THREE.DataTexture3D and THREE.DataTexture2DArray.");ft.setTexture2DArray(K,0),At=N.TEXTURE_2D_ARRAY}N.pixelStorei(N.UNPACK_FLIP_Y_WEBGL,K.flipY),N.pixelStorei(N.UNPACK_PREMULTIPLY_ALPHA_WEBGL,K.premultiplyAlpha),N.pixelStorei(N.UNPACK_ALIGNMENT,K.unpackAlignment);const fs=N.getParameter(N.UNPACK_ROW_LENGTH),fi=N.getParameter(N.UNPACK_IMAGE_HEIGHT),vl=N.getParameter(N.UNPACK_SKIP_PIXELS),Wg=N.getParameter(N.UNPACK_SKIP_ROWS),sa=N.getParameter(N.UNPACK_SKIP_IMAGES);N.pixelStorei(N.UNPACK_ROW_LENGTH,er.width),N.pixelStorei(N.UNPACK_IMAGE_HEIGHT,er.height),N.pixelStorei(N.UNPACK_SKIP_PIXELS,xt),N.pixelStorei(N.UNPACK_SKIP_ROWS,Yt),N.pixelStorei(N.UNPACK_SKIP_IMAGES,on),L.isDataTexture||L.isData3DTexture?N.texSubImage3D(At,te,qt,ai,Li,je,rt,bt,ra,hi,er.data):K.isCompressedArrayTexture?N.compressedTexSubImage3D(At,te,qt,ai,Li,je,rt,bt,ra,er.data):N.texSubImage3D(At,te,qt,ai,Li,je,rt,bt,ra,hi,er),N.pixelStorei(N.UNPACK_ROW_LENGTH,fs),N.pixelStorei(N.UNPACK_IMAGE_HEIGHT,fi),N.pixelStorei(N.UNPACK_SKIP_PIXELS,vl),N.pixelStorei(N.UNPACK_SKIP_ROWS,Wg),N.pixelStorei(N.UNPACK_SKIP_IMAGES,sa),0===te&&K.generateMipmaps&&N.generateMipmap(At),Me.unbindTexture()},this.initRenderTarget=function(L){void 0===nt.get(L).__webglFramebuffer&&ft.setupRenderTarget(L)},this.initTexture=function(L){L.isCubeTexture?ft.setTextureCube(L,0):L.isData3DTexture?ft.setTexture3D(L,0):L.isDataArrayTexture||L.isCompressedArrayTexture?ft.setTexture2DArray(L,0):ft.setTexture2D(L,0),Me.unbindTexture()},this.resetState=function(){F=0,D=0,k=null,Me.reset(),kn.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===Hk?"display-p3":"srgb",e.unpackColorSpace=Zn.workingColorSpace===kC?"display-p3":"srgb"}}class Tb extends Fr{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 MP{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=Qo()}onUploadCallback(){}set needsUpdate(t){!0===t&&this.version++}get updateRange(){return sg("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;r0){const r=e[n[0]];if(void 0!==r){this.morphTargetInfluences=[],this.morphTargetDictionary={};for(let s=0,o=r.length;sn)return;RP.applyMatrix4(i.matrixWorld);const l=t.ray.origin.distanceTo(RP);return lt.far?void 0:{distance:l,point:W5.clone().applyMatrix4(i.matrixWorld),index:r,face:null,faceIndex:null,object:i}}const j5=new O,Y5=new O;class Pg extends ff{constructor(t,e){super(t,e),this.isLineSegments=!0,this.type="LineSegments"}computeLineDistances(){const t=this.geometry;if(null===t.index){const e=t.attributes.position,n=[];for(let r=0,s=e.count;r0){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 tc{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 d=n[r];return(r+(o-d)/(n[r+1]-d))/(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 xe:new O);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 O,r=[],s=[],o=[],a=new O,l=new Ft;for(let m=0;m<=t;m++)r[m]=this.getTangentAt(m/t,new O);s[0]=new O,o[0]=new O;let c=Number.MAX_VALUE;const d=Math.abs(r[0].x),h=Math.abs(r[0].y),p=Math.abs(r[0].z);d<=c&&(c=d,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(Qi(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(Qi(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 PP extends tc{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 xe){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(Z5(a,l.x,c.x,d.x,h.x),Z5(a,l.y,c.y,d.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]:(CS.subVectors(r[0],r[1]).add(r[0]),c=CS);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 d=c.getPoint(1);return this.currentPoint.copy(d),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 AS extends hn{constructor(t=[new xe(0,-.5),new xe(.5,0),new xe(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=Qi(r,0,2*Math.PI);const s=[],o=[],a=[],l=[],c=[],d=1/e,h=new O,p=new xe,m=new O,g=new O,b=new O;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*d*r,C=Math.sin(x),F=Math.cos(x);for(let D=0;D<=t.length-1;D++)h.x=t[D].x*C,h.y=t[D].y,h.z=t[D].x*F,o.push(h.x,h.y,h.z),p.x=M/e,p.y=D/(t.length-1),a.push(p.x,p.y),c.push(l[3*D+0]*C,l[3*D+1],l[3*D+0]*F)}for(let M=0;M0&&x(!0),e>0&&x(!1)),this.setIndex(d),this.setAttribute("position",new lt(h,3)),this.setAttribute("normal",new lt(p,3)),this.setAttribute("uv",new lt(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 TS 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 TS(t.radius,t.height,t.radialSegments,t.heightSegments,t.openEnded,t.thetaStart,t.thetaLength)}}class Gb 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 d=[],h=new O,p=new O,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 F=0;F<=e;F++){const D=F/e;h.x=-t*Math.cos(r+D*s)*Math.sin(o+x*a),h.y=t*Math.cos(o+x*a),h.z=t*Math.sin(r+D*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(D+C,1-x),M.push(c++)}d.push(M)}for(let y=0;y0)&&m.push(d[y][M+1],C,D),(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 dispersion(){return this._dispersion}set dispersion(t){this._dispersion>0!=t>0&&this.version++,this._dispersion=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.dispersion=t.dispersion,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 NS extends ko{constructor(t){super(),this.isMeshPhongMaterial=!0,this.type="MeshPhongMaterial",this.color=new qe(16777215),this.specular=new qe(1118481),this.shininess=30,this.map=null,this.lightMap=null,this.lightMapIntensity=1,this.aoMap=null,this.aoMapIntensity=1,this.emissive=new qe(0),this.emissiveIntensity=1,this.emissiveMap=null,this.bumpMap=null,this.bumpScale=1,this.normalMap=null,this.normalMapType=Kh,this.normalScale=new xe(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=wC,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 _f(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 hG(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 ZP(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 QP(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 Wb{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 uG(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=_b;class Ng extends nc{constructor(t,e,n){super(t,e,n)}}Ng.prototype.ValueTypeName="bool",Ng.prototype.ValueBufferType=Array,Ng.prototype.DefaultInterpolation=gb,Ng.prototype.InterpolantFactoryMethodLinear=void 0,Ng.prototype.InterpolantFactoryMethodSmooth=void 0;class pG extends nc{}pG.prototype.ValueTypeName="color";class Bg extends nc{}Bg.prototype.ValueTypeName="number";class Phe extends Wb{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 d=c+a;c!==d;c+=4)lo.slerpFlat(s,0,o,c-a,o,c,l);return s}}class Ug extends nc{InterpolantFactoryMethodLinear(t){return new Phe(this.times,this.values,this.getValueSize(),t)}}Ug.prototype.ValueTypeName="quaternion",Ug.prototype.InterpolantFactoryMethodSmooth=void 0;class Vg extends nc{constructor(t,e,n){super(t,e,n)}}Vg.prototype.ValueTypeName="string",Vg.prototype.ValueBufferType=Array,Vg.prototype.DefaultInterpolation=gb,Vg.prototype.InterpolantFactoryMethodLinear=void 0,Vg.prototype.InterpolantFactoryMethodSmooth=void 0;class zg extends nc{}zg.prototype.ValueTypeName="vector";class jb{constructor(t="",e=-1,n=[],r=2500){this.name=t,this.tracks=n,this.duration=e,this.blendMode=r,this.uuid=Qo(),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(Fhe(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=d[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=[];QP(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:gG,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 Lhe extends Error{constructor(t,e){super(t),this.response=e}}class Ra extends vf{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=Du.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 d=ld[t],h=c.body.getReader(),p=c.headers.get("X-File-Size")||c.headers.get("Content-Length"),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 F=new ProgressEvent("progress",{lengthComputable:g,loaded:b,total:m});for(let D=0,k=d.length;D{y.error(x)})}()}});return new Response(v)}throw new Lhe(`fetch for "${c.url}" responded with ${c.status}: ${c.statusText}`,c)}).then(c=>{switch(l){case"arraybuffer":return c.arrayBuffer();case"blob":return c.blob();case"document":return c.text().then(d=>(new DOMParser).parseFromString(d,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=>{Du.add(t,c);const d=ld[t];delete ld[t];for(let h=0,p=d.length;h{const d=ld[t];if(void 0===d)throw this.manager.itemError(t),c;delete ld[t];for(let h=0,p=d.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 BS extends vf{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=Du.get(t);if(void 0!==o)return s.manager.itemStart(t),setTimeout(function(){e&&e(o),s.manager.itemEnd(t)},0),o;const a=yb("img");function l(){d(),Du.add(t,this),e&&e(this),s.manager.itemEnd(t)}function c(h){d(),r&&r(h),s.manager.itemError(t),s.manager.itemEnd(t)}function d(){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 Hg extends vf{constructor(t){super(t)}load(t,e,n,r){const s=new Ro,o=new BS(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 US extends Fr{constructor(t,e=1){super(),this.isLight=!0,this.type="Light",this.color=new qe(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()),void 0!==this.target&&(e.object.target=this.target.uuid),e}}const JP=new Ft,_G=new O,vG=new O;class eO{constructor(t){this.camera=t,this.intensity=1,this.bias=0,this.normalBias=0,this.radius=1,this.blurSamples=8,this.mapSize=new xe(512,512),this.map=null,this.mapPass=null,this.matrix=new Ft,this.autoUpdate=!0,this.needsUpdate=!1,this._frustum=new iS,this._frameExtents=new xe(1,1),this._viewportCount=1,this._viewports=[new gi(0,0,1,1)]}getViewportCount(){return this._viewportCount}getFrustum(){return this._frustum}updateMatrices(t){const e=this.camera,n=this.matrix;_G.setFromMatrixPosition(t.matrixWorld),e.position.copy(_G),vG.setFromMatrixPosition(t.target.matrixWorld),e.lookAt(vG),e.updateMatrixWorld(),JP.multiplyMatrices(e.projectionMatrix,e.matrixWorldInverse),this._frustum.setFromProjectionMatrix(JP),n.set(.5,0,0,.5,0,.5,0,.5,0,0,.5,.5,0,0,0,1),n.multiply(JP)}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.intensity=t.intensity,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 1!==this.intensity&&(t.intensity=this.intensity),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 Bhe extends eO{constructor(){super(new br(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 yG extends US{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(Fr.DEFAULT_UP),this.updateMatrix(),this.target=new Fr,this.distance=n,this.angle=r,this.penumbra=s,this.decay=o,this.map=null,this.shadow=new Bhe}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 bG=new Ft,Yb=new O,tO=new O;class Uhe extends eO{constructor(){super(new br(90,1,.5,500)),this.isPointLightShadow=!0,this._frameExtents=new xe(4,2),this._viewportCount=6,this._viewports=[new gi(2,1,1,1),new gi(0,1,1,1),new gi(3,1,1,1),new gi(1,1,1,1),new gi(3,0,1,1),new gi(1,0,1,1)],this._cubeDirections=[new O(1,0,0),new O(-1,0,0),new O(0,0,1),new O(0,0,-1),new O(0,1,0),new O(0,-1,0)],this._cubeUps=[new O(0,1,0),new O(0,1,0),new O(0,1,0),new O(0,1,0),new O(0,0,1),new O(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()),Yb.setFromMatrixPosition(t.matrixWorld),n.position.copy(Yb),tO.copy(n.position),tO.add(this._cubeDirections[e]),n.up.copy(this._cubeUps[e]),n.lookAt(tO),n.updateMatrixWorld(),r.makeTranslation(-Yb.x,-Yb.y,-Yb.z),bG.multiplyMatrices(n.projectionMatrix,n.matrixWorldInverse),this._frustum.setFromProjectionMatrix(bG)}}class xG extends US{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 Uhe}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 Vhe extends eO{constructor(){super(new Ab(-5,5,5,-5,.5,500)),this.isDirectionalLightShadow=!0}}class wG extends US{constructor(t,e){super(t,e),this.isDirectionalLight=!0,this.type="DirectionalLight",this.position.copy(Fr.DEFAULT_UP),this.updateMatrix(),this.target=new Fr,this.shadow=new Vhe}dispose(){this.shadow.dispose()}copy(t){return super.copy(t),this.target=t.target.clone(),this.shadow=t.shadow.clone(),this}}class nO extends US{constructor(t,e){super(t,e),this.isAmbientLight=!0,this.type="AmbientLight"}}class Tu{static decodeText(t){if(console.warn("THREE.LoaderUtils: decodeText() has been deprecated with r165 and will be removed with r175. Use TextDecoder instead."),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=Du.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 Du.add(t,c),e&&e(c),s.manager.itemEnd(t),c}).catch(function(c){r&&r(c),Du.remove(t),s.manager.itemError(t),s.manager.itemEnd(t)});Du.add(t,l),s.manager.itemStart(t)}}class DG{constructor(t=!0){this.autoStart=t,this.startTime=0,this.oldTime=0,this.elapsedTime=0,this.running=!1}start(){this.startTime=TG(),this.oldTime=this.startTime,this.elapsedTime=0,this.running=!0}stop(){this.getElapsedTime(),this.running=!1,this.autoStart=!1}getElapsedTime(){return this.getDelta(),this.elapsedTime}getDelta(){let t=0;if(this.autoStart&&!this.running)return this.start(),0;if(this.running){const e=TG();t=(e-this.oldTime)/1e3,this.oldTime=e,this.elapsedTime+=t}return t}}function TG(){return(typeof performance>"u"?Date:performance).now()}const rO="\\[\\]\\.:\\/",Zhe=new RegExp("["+rO+"]","g"),sO="[^"+rO+"]",Qhe="[^"+rO.replace("\\.","")+"]",ife=new RegExp("^"+/((?:WC+[\/:])*)/.source.replace("WC",sO)+/(WCOD+)?/.source.replace("WCOD",Qhe)+/(?:\.(WC+)(?:\[(.+)\])?)?/.source.replace("WC",sO)+/\.(WC+)(?:\[(.+)\])?/.source.replace("WC",sO)+"$"),rfe=["material","materials","bones","map"];class sfe{constructor(t,e,n){const r=n||Ri.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 Ri=(()=>{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(Zhe,"")}static parseTrackName(e){const n=ife.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!==rfe.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;an.name===t||n.userData.name===t);return e?(e.removeFromParent(),new ic(e)):null}getBoundings(){return(new Ns).setFromObject(this.nativeMesh)}clone(){return new ic(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 Nn&&this.disposeMesh(t)}),this.nativeMesh instanceof Nn&&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 dfe extends ic{get supportsFov(){return this.nativeCamera instanceof br||"PerspectiveCamera"==this.nativeCamera.type}get fov(){return this.nativeCamera.fov||NaN}set fov(t){this.supportsFov&&(this.nativeCamera.fov=t,this.nativeCamera.updateProjectionMatrix())}constructor(t){super(t),this.nativeCamera=t}}class ufe extends Rse{createMaterial(t){let e={};t.color?e={color:t.color}:t.diffuse||(e={color:super.randomColor()});let n=t.shading||"unlit";switch(n){case"unlit":return new vr(Object.assign(Object.assign({},e),{map:t.diffuse||null}));case"standart":return new $b(Object.assign(Object.assign({},e),{map:t.diffuse||null}));case"phong":return new NS(Object.assign(Object.assign({},e),{map:t.diffuse||null}));case"wireframe":return new vr(Object.assign(Object.assign({},e),{wireframe:!0}));default:throw new Error(`"${n}" shading not implemented for three.js`)}}transformPrimitiveZUp(t){t.geometry.rotateX(Math.PI/2)}createPrimitive(t,e={}){var n,r,s,o;let a=null,l=this.createMaterial(e);switch(t.shape){case"PLANE":a=new Nn(new sf((null===(n=t.dimensions)||void 0===n?void 0:n.x)||1e4,(null===(r=t.dimensions)||void 0===r?void 0:r.y)||1e4,null===(s=t.segments)||void 0===s?void 0:s.x,null===(o=t.segments)||void 0===o?void 0:o.y),l);break;case"BOX":a=new Nn(new tf(...Le.spr(t.dimensions),...t.segments?Le.spr(t.segments):[]),l);break;case"CAPSULE":a=new Nn(new DS(t.radius,t.centersDistance,t.capSegments,t.radialSegments),l),this.transformPrimitiveZUp(a);break;case"CYLINDER":a=new Nn(new Og(t.radius,t.radius,t.height,t.radialSegments,t.heightSegments),l),this.transformPrimitiveZUp(a);break;case"CONE":a=new Nn(new TS(t.radius,t.height,t.radialSegments,t.heightSegments),l),this.transformPrimitiveZUp(a);break;case"SPHERE":a=new Nn(new Gb(t.radius,t.widthSegments,t.heightSegments),l),this.transformPrimitiveZUp(a);break;case"COMPOUND":a=new ta;for(const{position:d,rotation:h,shape:p}of t.children){const m=this.createPrimitive(p,e).nativeMesh;d&&m.position.set(...Le.spr(d)),h&&m.quaternion.set(...gr.spr(h)),a.add(m)}break;case"MESH":const c=new hn;c.setFromPoints(t.vertices.map(d=>new O(...Le.spr(d)))),c.setIndex(t.faces.reduce((d,h)=>(d.push(...h),d),[])),a=new Nn(c,l)}if(!a)throw new Error(`Primitive with shape "${t.shape}" not implemented`);return void 0!==e.castShadow&&(a.castShadow=e.castShadow),void 0!==e.receiveShadow&&(a.receiveShadow=e.receiveShadow),new ic(a)}createPerspectiveCamera(t={}){return new dfe(new br(t.fov||75,t.aspectRatio||1,t.frustrum?t.frustrum.near:1,t.frustrum?t.frustrum.far:1e4))}}function jG(i,t){if(t===woe)return console.warn("THREE.BufferGeometryUtils.toTrianglesDrawMode(): Geometry already defined as triangles."),i;if(t===zk||t===v4){let e=i.getIndex();if(null===e){const o=[],a=i.getAttribute("position");if(void 0===a)return console.error("THREE.BufferGeometryUtils.toTrianglesDrawMode(): Undefined position attribute. Processing not possible."),i;for(let l=0;l=2.0 are supported.")));const c=new Wfe(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 d=0;d=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 ffe(){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 Bn={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_DISPERSION:"KHR_materials_dispersion",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 pfe{constructor(t){this.parser=t,this.name=Bn.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 Dfe{constructor(t){this.parser=t,this.name=Bn.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 Tfe{constructor(t){this.parser=t,this.name=Bn.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 Ife{constructor(t){this.name=Bn.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 d=r.count,h=r.byteStride,p=new Uint8Array(a,r.byteOffset||0,r.byteLength||0);return o.decodeGltfBufferAsync?o.decodeGltfBufferAsync(d,h,p,r.mode,r.filter).then(function(m){return m.buffer}):o.ready.then(function(){const m=new ArrayBuffer(d*h);return o.decodeGltfBuffer(new Uint8Array(m),d,h,p,r.mode,r.filter),m})})}return null}}class Rfe{constructor(t){this.name=Bn.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!==ka.TRIANGLES&&c.mode!==ka.TRIANGLE_STRIP&&c.mode!==ka.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(d=>(l[c]=d,l[c])));return a.length<1?null:(a.push(this.parser.createNodeMesh(t)),Promise.all(a).then(c=>{const d=c.pop(),h=d.isGroup?d.children:[d],p=c[0].count,m=[];for(const g of h){const b=new Ft,v=new O,y=new lo,M=new O(1,1,1),x=new z5(g.geometry,g.material,p);for(let C=0;C-1,o=s?a.match(/Firefox\/([0-9]+)\./)[1]:-1}this.textureLoader=typeof createImageBitmap>"u"||n&&r<17||s&&o<98?new Hg(this.options.manager):new Yhe(this.options.manager),this.textureLoader.setCrossOrigin(this.options.crossOrigin),this.textureLoader.setRequestHeader(this.options.requestHeader),this.fileLoader=new Ra(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 Cf(s,a,r),cd(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,d]of o.children.entries())s(d,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(T,D[k*l+1]),l>=3&&v.setZ(T,D[k*l+2]),l>=4&&v.setW(T,D[k*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(d){d.flipY=!1,d.name=o.name||a.name||"",""===d.name&&"string"==typeof a.uri&&!1===a.uri.startsWith("data:image/")&&(d.name=a.uri);const p=(s.samplers||{})[o.sampler]||{};return d.magFilter=KG[p.magFilter]||ar,d.minFilter=KG[p.minFilter]||hl,d.wrapS=ZG[p.wrapS]||Jl,d.wrapT=ZG[p.wrapT]||Jl,r.associations.set(d,{textures:t}),d}).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 d=Promise.resolve(l).then(function(h){return new Promise(function(p,m){let g=p;!0===e.isImageBitmapLoader&&(g=function(b){const v=new Ro(b);v.needsUpdate=!0,p(v)}),e.load(Tu.resolveURL(h,s.path),g,void 0,m)})}).then(function(h){return!0===c&&a.revokeObjectURL(l),cd(h,o),h.userData.mimeType=o.mimeType||function Gfe(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]=d,d}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[Bn.KHR_TEXTURE_TRANSFORM]){const a=void 0!==n.extensions?n.extensions[Bn.KHR_TEXTURE_TRANSFORM]:void 0;if(a){const l=s.associations.get(o);o=s.extensions[Bn.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 pf,ko.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 us,ko.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 $b}loadMaterial(t){const e=this,r=this.extensions,s=this.json.materials[t];let o;const a={},c=[];if((s.extensions||{})[Bn.KHR_MATERIALS_UNLIT]){const h=r[Bn.KHR_MATERIALS_UNLIT];o=h.getMaterialType(),c.push(h.extendParams(a,s,e))}else{const h=s.pbrMetallicRoughness||{};if(a.color=new qe(1,1,1),a.opacity=1,Array.isArray(h.baseColorFactor)){const p=h.baseColorFactor;a.color.setRGB(p[0],p[1],p[2],ds),a.opacity=p[3]}void 0!==h.baseColorTexture&&c.push(e.assignTexture(a,"map",h.baseColorTexture,cs)),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=Ko);const d=s.alphaMode||"OPAQUE";if("BLEND"===d?(a.transparent=!0,a.depthWrite=!1):(a.transparent=!1,"MASK"===d&&(a.alphaTest=void 0!==s.alphaCutoff?s.alphaCutoff:.5)),void 0!==s.normalTexture&&o!==vr&&(c.push(e.assignTexture(a,"normalMap",s.normalTexture)),a.normalScale=new xe(1,1),void 0!==s.normalTexture.scale)){const h=s.normalTexture.scale;a.normalScale.set(h,h)}if(void 0!==s.occlusionTexture&&o!==vr&&(c.push(e.assignTexture(a,"aoMap",s.occlusionTexture)),void 0!==s.occlusionTexture.strength&&(a.aoMapIntensity=s.occlusionTexture.strength)),void 0!==s.emissiveFactor&&o!==vr){const h=s.emissiveFactor;a.emissive=(new qe).setRGB(h[0],h[1],h[2],ds)}return void 0!==s.emissiveTexture&&o!==vr&&c.push(e.assignTexture(a,"emissiveMap",s.emissiveTexture,cs)),Promise.all(c).then(function(){const h=new o(a);return s.name&&(h.name=s.name),cd(h,s),e.associations.set(h,{materials:t}),s.extensions&&Cf(r,h,s),h})}createUniqueName(t){const e=Ri.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[Bn.KHR_DRACO_MESH_COMPRESSION].decodePrimitive(a,e).then(function(l){return QG(l,a,e)})}const o=[];for(let a=0,l=t.length;a0&&zfe(y,s),y.name=e.createUniqueName(s.name||"mesh_"+t),cd(y,s),v.extensions&&Cf(r,y,v),e.assignFinalMaterial(y),h.push(y)}for(let m=0,g=h.length;m1?new ta:1===c.length?c[0]:new Fr,d!==c[0])for(let h=0,p=c.length;h{const h=new Map;for(const[p,m]of r.associations)(p instanceof ko||p instanceof Ro)&&h.set(p,m);return d.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(Ru[s.path]===Ru.weights?t.traverse(function(p){p.morphTargetInfluences&&l.push(p.name?p.name:p.uuid)}):l.push(a),Ru[s.path]){case Ru.weights:c=Bg;break;case Ru.rotation:c=Ug;break;case Ru.position:case Ru.scale:c=zg;break;default:c=1===n.itemSize?Bg:zg}const d=void 0!==r.interpolation?Bfe[r.interpolation]:_b,h=this._getArrayFromAccessor(n);for(let p=0,m=l.length;p{r.type.endsWith("Light")&&(console.warn("WORKAROUND: light intensity from GLB divided by 200."),r.intensity*=.005)}),new ic(n.scene)})}}const ho=(i,t)=>Array(i).fill(null).map((e,n)=>t(n));class Sf{static startDebugView(t,e){let n=this.activeDebugViews.get(t);return n?n.renderers.includes(e)||n.renderers.push(e):(n={view:new Sf(t),renderers:[e]},this.activeDebugViews.set(t,n)),n.view}static stopDebugView(t,e){const n=t.world,r=this.activeDebugViews.get(n);r&&(r.renderers=r.renderers.filter(s=>s!==e),0===r.renderers.length&&(r.view.dispose(),this.activeDebugViews.delete(n)))}constructor(t){this.world=t,this.debugScene=null,this.aSub=null,this.rSub=null,this.syncMap=new Map,this.debugScene=new Tb;const e=n=>{var r,s;const o=n.debugBodySettings;let c,l=this.lineSegmentPointsForShape(o.shape);c=l?new Pg((new hn).setFromPoints(l)):null===(r=this.world)||void 0===r?void 0:r.visualScene.factory.createPrimitive(o.shape,{shading:"wireframe",color:0}).nativeMesh,this.syncMap.set(n,c),null===(s=this.debugScene)||void 0===s||s.add(c)};for(const n of this.world.physicsWorld.children)e(n);this.aSub=this.world.physicsWorld.added$.subscribe(n=>e(n)),this.rSub=this.world.physicsWorld.removed$.subscribe(n=>{var r;const s=this.syncMap.get(n);s&&(this.syncMap.delete(n),null===(r=this.debugScene)||void 0===r||r.remove(s))})}get scene(){return this.debugScene}render(t,e){for(const[r,s]of this.syncMap.entries()){const o=r.debugBodySettings;if(o.ignoreTransform||(s.position.set(...Le.spr(r.position)),s.quaternion.set(...gr.spr(r.rotation))),s.material){let a=16777215;switch(o.type){case"RIGID_DYNAMIC":a=o.sleeping?255:16711680;break;case"RIGID_STATIC":a=65280;break;case"TRIGGER":a=16776960}s.material.color.set(a),s.material.needsUpdate=!0}}const n=t.autoClearColor;n&&(t.autoClearColor=!1),t.render(this.debugScene,e),n&&(t.autoClearColor=!0)}lineSegmentPointsForShape(t){if("BOX"===t.shape){const e=Le.scalarMult(t.dimensions,.5);return[...ho(8,n=>new O(n<4?e.x:-e.x,n%4<2?e.y:-e.y,n%2?e.z:-e.z)),...ho(8,n=>new O(n%2?e.x:-e.x,n<4?e.y:-e.y,n%4<2?e.z:-e.z)),...ho(8,n=>new O(n%4<2?e.x:-e.x,n%2?e.y:-e.y,n<4?e.z:-e.z))]}if("CYLINDER"===t.shape)return[...ho(32,e=>new O(t.radius*Math.sin(Math.floor((e+1)/2)*Math.PI/8),t.radius*Math.cos(Math.floor((e+1)/2)*Math.PI/8),-t.height/2)),...ho(32,e=>new O(t.radius*Math.sin(Math.floor((e+1)/2)*Math.PI/8),t.radius*Math.cos(Math.floor((e+1)/2)*Math.PI/8),t.height/2)),...ho(8,e=>new O(Math.floor(e/2)%2?0:e<4?t.radius:-t.radius,Math.floor(e/2)%2?e<4?t.radius:-t.radius:0,e%2?t.height/2:-t.height/2)),new O(0,0,-t.height/2),new O(0,0,t.height/2)];if("CONE"===t.shape)return[...ho(32,e=>new O(t.radius*Math.sin(Math.floor((e+1)/2)*Math.PI/8),t.radius*Math.cos(Math.floor((e+1)/2)*Math.PI/8),-t.height/2)),...ho(8,e=>new O(e%2||Math.floor(e/2)%2?0:e<4?t.radius:-t.radius,e%2?0:Math.floor(e/2)%2?e<4?t.radius:-t.radius:0,e%2?t.height/2:-t.height/2)),new O(0,0,-t.height/2),new O(0,0,t.height/2)];if("SPHERE"===t.shape)return[...ho(32,e=>new O(t.radius*Math.sin(Math.floor((e+1)/2)*Math.PI/8),t.radius*Math.cos(Math.floor((e+1)/2)*Math.PI/8),0)),...ho(32,e=>new O(t.radius*Math.sin(Math.floor((e+1)/2)*Math.PI/8),0,t.radius*Math.cos(Math.floor((e+1)/2)*Math.PI/8))),...ho(32,e=>new O(0,t.radius*Math.sin(Math.floor((e+1)/2)*Math.PI/8),t.radius*Math.cos(Math.floor((e+1)/2)*Math.PI/8)))];if("CAPSULE"===t.shape)return[...this.lineSegmentPointsForShape({shape:"CYLINDER",radius:t.radius,height:t.centersDistance}),...ho(16,e=>new O(t.radius*Math.cos(Math.floor((e+1)/2)*Math.PI/8),0,t.radius*Math.sin(Math.floor((e+1)/2)*Math.PI/8)+t.centersDistance/2)),...ho(16,e=>new O(t.radius*Math.cos(Math.floor((e+1)/2)*Math.PI/8),0,-t.radius*Math.sin(Math.floor((e+1)/2)*Math.PI/8)-t.centersDistance/2)),...ho(16,e=>new O(0,t.radius*Math.cos(Math.floor((e+1)/2)*Math.PI/8),t.radius*Math.sin(Math.floor((e+1)/2)*Math.PI/8)+t.centersDistance/2)),...ho(16,e=>new O(0,t.radius*Math.cos(Math.floor((e+1)/2)*Math.PI/8),-t.radius*Math.sin(Math.floor((e+1)/2)*Math.PI/8)-t.centersDistance/2))];if("CONVEX_HULL"===t.shape)return[...t.vertices.map(n=>[new O(n.x-.05,n.y,n.z),new O(n.x+.05,n.y,n.z),new O(n.x,n.y-.05,n.z),new O(n.x,n.y+.05,n.z),new O(n.x,n.y,n.z-.05),new O(n.x,n.y,n.z+.05)]).reduce((n,r)=>(n.push(...r),n),[])];if("COMPOUND"===t.shape){const e=[];for(const{position:n,shape:r,rotation:s}of t.children){let o=this.lineSegmentPointsForShape(r);if(!o)return null;e.push(...o.map(a=>new O(...Le.spr(Le.add(n||Le.O,Le.rot(a,s||gr.O))))))}return e}return null}dispose(){var t,e;this.debugScene=null,null===(t=this.aSub)||void 0===t||t.unsubscribe(),null===(e=this.rSub)||void 0===e||e.unsubscribe(),this.syncMap=new Map}}Sf.activeDebugViews=new Map;class JG extends xse{get physicsDebugViewActive(){return this._physicsDebugViewActive}set physicsDebugViewActive(t){this._physicsDebugViewActive!=t&&(this._physicsDebugViewActive=t,this.world&&(t?this.debugView=Sf.startDebugView(this.world,this):(Sf.stopDebugView(this.debugView,this),this.debugView=null)))}constructor(t,e,n,r={}){super(t,n,r),this.scene=t,this.camera=e,this.canvas=n,this.world=null,this.debugView=null,this._physicsDebugViewActive=!1,this.nativeRenderer=new Aue(Object.assign({canvas:n,alpha:this.rendererOptions.transparent},this.rendererOptions)),this.nativeRenderer.shadowMap.enabled=!0,this.nativeRenderer.setClearColor(this.rendererOptions.background),this.nativeRenderer.shadowMap.type=i4,this.nativeRenderer.setPixelRatio(this.rendererOptions.forceResolution||devicePixelRatio)}addToWorld(t){this.world=t,this.physicsDebugViewActive&&(this.debugView=Sf.startDebugView(this.world,this))}removeFromWorld(t){this.physicsDebugViewActive&&(Sf.stopDebugView(this.debugView,this),this.debugView=null),this.world=null}resizeRenderer(t){this.nativeRenderer.setSize(t.x,t.y),(this.camera.nativeCamera instanceof br||"PerspectiveCamera"==this.camera.nativeCamera.type)&&Math.abs(this.camera.nativeCamera.aspect-t.x/t.y)>.01&&(this.camera.nativeCamera.aspect=t.x/t.y,this.camera.nativeCamera.updateProjectionMatrix())}render(){this.nativeRenderer.render(this.scene.nativeScene,this.camera.nativeCamera),this.physicsDebugViewActive&&this.debugView.render(this.nativeRenderer,this.camera.nativeCamera)}dispose(){this.camera.dispose(),this.nativeRenderer.clear(),this.nativeRenderer.dispose(),this.nativeRenderer.domElement=null}}const Xfe={name:"CopyShader",uniforms:{tDiffuse:{value:null},opacity:{value:1}},vertexShader:"\n\n\t\tvarying vec2 vUv;\n\n\t\tvoid main() {\n\n\t\t\tvUv = uv;\n\t\t\tgl_Position = projectionMatrix * modelViewMatrix * vec4( position, 1.0 );\n\n\t\t}",fragmentShader:"\n\n\t\tuniform float opacity;\n\n\t\tuniform sampler2D tDiffuse;\n\n\t\tvarying vec2 vUv;\n\n\t\tvoid main() {\n\n\t\t\tvec4 texel = texture2D( tDiffuse, vUv );\n\t\t\tgl_FragColor = opacity * texel;\n\n\n\t\t}"};class YS{constructor(){this.isPass=!0,this.enabled=!0,this.needsSwap=!0,this.clear=!1,this.renderToScreen=!1}setSize(){}render(){console.error("THREE.Pass: .render() must be implemented in derived pass.")}dispose(){}}const Kfe=new Ab(-1,1,1,-1,0,1),Qfe=new class Zfe extends hn{constructor(){super(),this.setAttribute("position",new lt([-1,3,0,-1,-1,0,3,-1,0],3)),this.setAttribute("uv",new lt([0,2,0,0,2,0],2))}};class Jfe{constructor(t){this._mesh=new Nn(Qfe,t)}dispose(){this._mesh.geometry.dispose()}render(t){t.render(this._mesh,Kfe)}get material(){return this._mesh.material}set material(t){this._mesh.material=t}}class epe extends YS{constructor(t,e){super(),this.textureID=void 0!==e?e:"tDiffuse",t instanceof gl?(this.uniforms=t.uniforms,this.material=t):t&&(this.uniforms=j4.clone(t.uniforms),this.material=new gl({name:void 0!==t.name?t.name:"unspecified",defines:Object.assign({},t.defines),uniforms:this.uniforms,vertexShader:t.vertexShader,fragmentShader:t.fragmentShader})),this.fsQuad=new Jfe(this.material)}render(t,e,n){this.uniforms[this.textureID]&&(this.uniforms[this.textureID].value=n.texture),this.fsQuad.material=this.material,this.renderToScreen?(t.setRenderTarget(null),this.fsQuad.render(t)):(t.setRenderTarget(e),this.clear&&t.clear(t.autoClearColor,t.autoClearDepth,t.autoClearStencil),this.fsQuad.render(t))}dispose(){this.material.dispose(),this.fsQuad.dispose()}}class e8 extends YS{constructor(t,e){super(),this.scene=t,this.camera=e,this.clear=!0,this.needsSwap=!1,this.inverse=!1}render(t,e,n){const r=t.getContext(),s=t.state;let o,a;s.buffers.color.setMask(!1),s.buffers.depth.setMask(!1),s.buffers.color.setLocked(!0),s.buffers.depth.setLocked(!0),this.inverse?(o=0,a=1):(o=1,a=0),s.buffers.stencil.setTest(!0),s.buffers.stencil.setOp(r.REPLACE,r.REPLACE,r.REPLACE),s.buffers.stencil.setFunc(r.ALWAYS,o,4294967295),s.buffers.stencil.setClear(a),s.buffers.stencil.setLocked(!0),t.setRenderTarget(n),this.clear&&t.clear(),t.render(this.scene,this.camera),t.setRenderTarget(e),this.clear&&t.clear(),t.render(this.scene,this.camera),s.buffers.color.setLocked(!1),s.buffers.depth.setLocked(!1),s.buffers.color.setMask(!0),s.buffers.depth.setMask(!0),s.buffers.stencil.setLocked(!1),s.buffers.stencil.setFunc(r.EQUAL,1,4294967295),s.buffers.stencil.setOp(r.KEEP,r.KEEP,r.KEEP),s.buffers.stencil.setLocked(!0)}}class tpe extends YS{constructor(){super(),this.needsSwap=!1}render(t){t.state.buffers.stencil.setLocked(!1),t.state.buffers.stencil.setTest(!1)}}class npe{constructor(t,e){if(this.renderer=t,this._pixelRatio=t.getPixelRatio(),void 0===e){const n=t.getSize(new xe);this._width=n.width,this._height=n.height,(e=new bu(this._width*this._pixelRatio,this._height*this._pixelRatio,{type:Xm})).texture.name="EffectComposer.rt1"}else this._width=e.width,this._height=e.height;this.renderTarget1=e,this.renderTarget2=e.clone(),this.renderTarget2.texture.name="EffectComposer.rt2",this.writeBuffer=this.renderTarget1,this.readBuffer=this.renderTarget2,this.renderToScreen=!0,this.passes=[],this.copyPass=new epe(Xfe),this.copyPass.material.blending=Xc,this.clock=new DG}swapBuffers(){const t=this.readBuffer;this.readBuffer=this.writeBuffer,this.writeBuffer=t}addPass(t){this.passes.push(t),t.setSize(this._width*this._pixelRatio,this._height*this._pixelRatio)}insertPass(t,e){this.passes.splice(e,0,t),t.setSize(this._width*this._pixelRatio,this._height*this._pixelRatio)}removePass(t){const e=this.passes.indexOf(t);-1!==e&&this.passes.splice(e,1)}isLastEnabledPass(t){for(let e=t+1;e0?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;i8.fromArray(r,t),mO.fromArray(r,e),r8.fromArray(r,n),Pa.subVectors(r8,mO),s8.subVectors(i8,mO),Pa.cross(s8),Pa.normalize(),s.push(Pa.x,Pa.y,Pa.z),s.push(Pa.x,Pa.y,Pa.z),s.push(Pa.x,Pa.y,Pa.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 d=this.vertices.length;let h=this.parseVertexIndex(t,d),p=this.parseVertexIndex(e,d),m=this.parseVertexIndex(n,d);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?(qS.setRGB(parseFloat(h[4]),parseFloat(h[5]),parseFloat(h[6])).convertSRGBToLinear(),e.colors.push(qS.r,qS.g,qS.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"===d){const p=c.slice(1).trim().split(n8),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 ta;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 lt(d.normals,3)),d.colors.length>0&&(g=!0,b.setAttribute("color",new lt(d.colors,3))),!0===d.hasUVIndices&&b.setAttribute("uv",new lt(d.uvs,2));const v=[];for(let M=0,x=h.length;M1){for(let M=0,x=h.length;M0){const a=new pf({size:1,sizeAttenuation:!1}),l=new hn;l.setAttribute("position",new lt(e.vertices,3)),e.colors.length>0&&void 0!==e.colors[0]&&(l.setAttribute("color",new lt(e.colors,3)),a.vertexColors=!0);const c=new Nb(l,a);s.add(c)}return s}}class o8 extends vf{constructor(t){super(t)}load(t,e,n,r){const s=this,o=""===this.path?Tu.extractUrlBase(t):this.path,a=new Ra(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,d):c;h=h.toLowerCase();let p=d>=0?c.substring(d+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 upe(this.resourcePath||e,this.materialOptions);return a.setCrossOrigin(this.crossOrigin),a.setManager(this.manager),a.setMaterials(o),a}}class upe{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:Ql,this.wrap=void 0!==this.options.wrap?this.options.wrap:Jl}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),d=e.loadTexture(function s(a,l){return"string"!=typeof l||""===l?"":/^https?:\/\//i.test(l)?l:a+l}(e.baseUrl,c.url));d.repeat.copy(c.scale),d.offset.copy(c.offset),d.wrapS=e.wrap,d.wrapT=e.wrap,("map"===a||"emissiveMap"===a)&&(d.colorSpace=cs),r[a]=d}for(const a in n){const l=n[a];let c;if(""!==l)switch(a.toLowerCase()){case"kd":r.color=(new qe).fromArray(l).convertSRGBToLinear();break;case"ks":r.specular=(new qe).fromArray(l).convertSRGBToLinear();break;case"ke":r.emissive=(new qe).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 NS(r),this.materials[t]}getTextureParams(t,e){const n={scale:new xe(1,1),offset:new xe(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:gG;let a=o.getHandler(t);null===a&&(a=new Hg(o)),a.setCrossOrigin&&a.setCrossOrigin(this.crossOrigin);const l=a.load(t,n,r,s);return void 0!==e&&(l.mapping=e),l}}const hpe=["determinateSpinner"];function fpe(i,t){if(1&i&&(ki(),W(0,"svg",11),Oe(1,"circle",12),Y()),2&i){const e=he();St("viewBox",e._viewBox()),G(1),$o("stroke-dasharray",e._strokeCircumference(),"px")("stroke-dashoffset",e._strokeCircumference()/2,"px")("stroke-width",e._circleStrokeWidth(),"%"),St("r",e._circleRadius())}}const ppe=Xy(class{constructor(i){this._elementRef=i}},"primary"),mpe=new me("mat-progress-spinner-default-options",{providedIn:"root",factory:function gpe(){return{diameter:a8}}}),a8=100;let XS=(()=>{class i extends ppe{constructor(e,n,r){super(e),this.mode="mat-spinner"===this._elementRef.nativeElement.nodeName.toLowerCase()?"indeterminate":"determinate",this._value=0,this._diameter=a8,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,ks(e)))}get diameter(){return this._diameter}set diameter(e){this._diameter=ks(e)}get strokeWidth(){return this._strokeWidth??this.diameter/10}set strokeWidth(e){this._strokeWidth=ks(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)(E(pt),E(kr,8),E(mpe))},i.\u0275cmp=ot({type:i,selectors:[["mat-progress-spinner"],["mat-spinner"]],viewQuery:function(e,n){if(1&e&&ii(hpe,5),2&e){let r;Tt(r=It())&&(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&&(St("aria-valuemin",0)("aria-valuemax",100)("aria-valuenow","determinate"===n.mode?n.value:null)("mode",n.mode),$o("width",n.diameter,"px")("height",n.diameter,"px"),un("_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:[at],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&&(fe(0,fpe,2,8,"ng-template",null,0,kc),W(2,"div",1,2),ki(),W(4,"svg",3),Oe(5,"circle",4),Y()(),pa(),W(6,"div",5)(7,"div",6)(8,"div",7),ny(9,8),Y(),W(10,"div",9),ny(11,8),Y(),W(12,"div",10),ny(13,8),Y()()()),2&e){const r=ir(1);G(4),St("viewBox",n._viewBox()),G(1),$o("stroke-dasharray",n._strokeCircumference(),"px")("stroke-dashoffset",n._strokeDashOffset(),"px")("stroke-width",n._circleStrokeWidth(),"%"),St("r",n._circleRadius()),G(4),U("ngTemplateOutlet",r),G(2),U("ngTemplateOutlet",r),G(2),U("ngTemplateOutlet",r)}},dependencies:[vy],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})(),vpe=(()=>{class i{}return i.\u0275fac=function(e){return new(e||i)},i.\u0275mod=nn({type:i}),i.\u0275inj=Xt({imports:[So,Kn]}),i})();const ype=["previewCanvasContainer"],bpe=["previewCanvas"];function xpe(i,t){if(1&i){const e=di();$r(0),W(1,"label",11),Ge(2),Y(),W(3,"input",12),Ne("change",function(r){an(e);const s=he().$implicit;return s.value=r.currentTarget.checked,Ut(s.change(s.value))}),Y(),Wr()}if(2&i){const e=he(),n=e.index,r=e.$implicit,s=he().index;G(1),U("for","custom_control_"+s+"_"+n),G(1),_i(r.label),G(1),U("id","custom_control_"+s+"_"+n)("type",r.type)("checked",r.value)}}function wpe(i,t){if(1&i){const e=di();W(0,"div",9)(1,"label",11),Ge(2),Y(),W(3,"input",14),Ne("change",function(){const s=an(e).$implicit,o=he(2).$implicit;return o.value=s,Ut(o.change(o.value))}),Y()()}if(2&i){const e=t.$implicit,n=he(2),r=n.index,s=n.$implicit,o=he().index;G(1),U("for","custom_control_"+o+"_"+r+"_"+e),G(1),_i(e),G(1),U("id","custom_control_"+o+"_"+r+"_"+e)("checked",s.value===e)}}function Mpe(i,t){if(1&i&&(W(0,"div",13)(1,"label"),Ge(2),Y(),fe(3,wpe,4,4,"div",8),Y()),2&i){const e=he().$implicit;G(2),_i(e.label),G(1),U("ngForOf",e.options)}}function Cpe(i,t){if(1&i){const e=di();$r(0),W(1,"label",11),Ge(2),Y(),W(3,"input",15),Ne("colorChange",function(r){an(e);const s=he().$implicit,o=he(2);return s.value=o.toRGB(r.value),Ut(s.change(s.value))}),Y(),Oe(4,"ngx-mat-color-toggle",16)(5,"ngx-mat-color-picker",null,17),Wr()}if(2&i){const e=ir(6),n=he(),r=n.index,s=n.$implicit,o=he().index;G(1),U("for","custom_control_"+o+"_"+r),G(1),_i(s.label),G(1),U("ngxMatColorPicker",e),G(1),U("for",e)}}function Spe(i,t){if(1&i){const e=di();$r(0),W(1,"label",11),Ge(2),Y(),W(3,"input",18),Ne("change",function(r){an(e);const s=he().$implicit;return s.value=r.currentTarget.value,Ut(s.change(s.value))}),Y(),Wr()}if(2&i){const e=he(),n=e.index,r=e.$implicit,s=he().index;G(1),U("for","custom_control_"+s+"_"+n),G(1),_i(r.label),G(1),U("id","custom_control_"+s+"_"+n)("min",r.minValue)("max",r.maxValue)("step",r.valueStep)("value",r.value)}}function Epe(i,t){if(1&i&&(W(0,"div",9),fe(1,xpe,4,5,"ng-container",6),fe(2,Mpe,4,2,"div",10),fe(3,Cpe,7,4,"ng-container",6),fe(4,Spe,4,7,"ng-container",6),Y()),2&i){const e=t.$implicit;G(1),U("ngIf","checkbox"===e.type),G(1),U("ngIf","radio"===e.type),G(1),U("ngIf","color"===e.type),G(1),U("ngIf","slider"===e.type)}}function Ape(i,t){if(1&i&&($r(0),W(1,"h4"),Ge(2),Y(),fe(3,Epe,5,4,"div",8),Wr()),2&i){const e=t.$implicit;G(2),_i(e.title),G(1),U("ngForOf",e.controls)}}function Dpe(i,t){if(1&i){const e=di();W(0,"div",9)(1,"label",11),Ge(2),Y(),W(3,"input",19),Ne("change",function(r){return Ut(an(e).$implicit.visible=r.currentTarget.checked)}),Y()()}if(2&i){const e=t.$implicit;G(1),U("for","visibility_"+e.name),G(1),_i(e.name),G(1),U("id","visibility_"+e.name)("checked",e.visible)}}function Tpe(i,t){if(1&i&&($r(0),W(1,"h4"),Ge(2,"Objects visibility"),Y(),fe(3,Dpe,4,4,"div",8),Wr()),2&i){const e=he();G(3),U("ngForOf",e.meshes)}}function Ipe(i,t){1&i&&Oe(0,"mat-spinner",20)}const dd=i=>{i.colorSpace="srgb",i.anisotropy=8,i.magFilter=_r,i.minFilter=_r};let l8=(()=>{class i{constructor(e){this.cdr=e,this.visibilityControls=!0,this.groupFunction=null,this.customControls=[],this.onObjectLoaded=new $e,this._paths$=new wt(null),this.destroyed$=new Re,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 e4(new t8,{init:(s=vt(function*(){}),function(){return s.apply(this,arguments)}),simulate:()=>{}}),yield e.world.init(),e.world.visualScene.nativeScene.add(new nO(16777215,2));let n=new wt({x:1,y:1});e.renderer=e.world.addRenderer(e.world.visualScene.factory.createPerspectiveCamera({frustrum:{near:.01,far:1e4}}),e.previewCanvas.nativeElement,{size:n.asObservable(),background:11184810}),e.controller=new Tse(e.renderer,{mouseOptions:{canvas:e.previewCanvas.nativeElement},orbiting:{sensitivityX:2,sensitivityY:2},orbitingElasticity:30}),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(We(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 gO,h=yield(new o8).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 ta;y.add(...b[v]),y.name=v,p.remove(...b[v]),p.add(y)}}e.meshes=p.children,e.meshes.sort((b,v)=>b.name>v.name?1:-1),p.traverse(b=>{if(b instanceof Nn){const v=b.material instanceof Array?b.material:[b.material];for(const y of v)y.transparent=!0,y.alphaTest=.5,y instanceof vr&&y.map&&(y.map.wrapS=Zi,y.map.wrapT=Zi,dd(y.map),y.map.needsUpdate=!0)}}),e.onObjectLoaded.next(p),e.entity=new mu({object3D:new ic(p)}),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=Le.scalarMult(Le.add(m.min,m.max),.5),e.controller.spherical={phi:1.22,theta:-1.32,radius:Le.dist(m.min,m.max)},e.cdr.markForCheck()}});return function(o){return s.apply(this,arguments)}}())})()}toRGB(e){return(e?.r||0)<<16|(e?.g||0)<<8|(e?.b||0)}ngOnDestroy(){this.destroyed$.next(),this.destroyed$.complete()}}return i.\u0275fac=function(e){return new(e||i)(E(ri))},i.\u0275cmp=ot({type:i,selectors:[["app-obj-viewer"]],viewQuery:function(e,n){if(1&e&&(ii(ype,5),ii(bpe,5)),2&e){let r;Tt(r=It())&&(n.previewCanvasContainer=r.first),Tt(r=It())&&(n.previewCanvas=r.first)}},inputs:{paths:"paths",visibilityControls:"visibilityControls",groupFunction:"groupFunction",customControls:"customControls"},outputs:{onObjectLoaded:"onObjectLoaded"},decls:8,vars:3,consts:[[1,"previewCanvasContainer"],["previewCanvasContainer",""],["width","640","height","480"],["previewCanvas",""],["id","controls"],[4,"ngFor","ngForOf"],[4,"ngIf"],["mode","indeterminate",4,"ngIf"],["class","controls-list",4,"ngFor","ngForOf"],[1,"controls-list"],["style","width: 100%",4,"ngIf"],[3,"for"],[3,"id","type","checked","change"],[2,"width","100%"],["type","radio",3,"id","checked","change"],["matInput","",1,"hidden",3,"ngxMatColorPicker","colorChange"],["matSuffix","",3,"for"],["picker",""],["type","range",3,"id","min","max","step","value","change"],["type","checkbox",3,"id","checked","change"],["mode","indeterminate"]],template:function(e,n){1&e&&(W(0,"div",0,1),Oe(2,"canvas",2,3),W(4,"div",4),fe(5,Ape,4,2,"ng-container",5),fe(6,Tpe,4,1,"ng-container",6),Y(),fe(7,Ipe,1,0,"mat-spinner",7),Y()),2&e&&(G(5),U("ngForOf",n.customControls),G(1),U("ngIf",n.visibilityControls),G(1),U("ngIf",!n.entity))},dependencies:[Co,Mi,$te,Yc,XS,zie,gC,kH],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%] > h4[_ngcontent-%COMP%]{margin:0}.previewCanvasContainer[_ngcontent-%COMP%] #controls[_ngcontent-%COMP%] .controls-list[_ngcontent-%COMP%]{width:100%;display:flex;-webkit-user-select:none;user-select:none;align-items:center}.previewCanvasContainer[_ngcontent-%COMP%] #controls[_ngcontent-%COMP%] .controls-list[_ngcontent-%COMP%] > span[_ngcontent-%COMP%]{flex-grow:1}.previewCanvasContainer[_ngcontent-%COMP%] #controls[_ngcontent-%COMP%] .controls-list[_ngcontent-%COMP%] > label[_ngcontent-%COMP%]{flex-grow:1}"],changeDetection:0}),i})();function Rpe(i,t){if(1&i){const e=di();ki(),W(0,"circle",5),Ne("mousedown",function(r){return an(e),Ut(he().startDrag(r))}),Ht(1,"async"),Ht(2,"async"),Y()}if(2&i){const e=he();let n,r;St("cx",(null==(n=Kt(1,3,e.mapPointer$))?null:n.x)||0)("cy",(null==(r=Kt(2,5,e.mapPointer$))?null:r.y)||0)("r",10)}}const kpe=function(){return{"stroke-width":3}};let Ppe=(()=>{class i{constructor(e){this.ref=e,this._roadSpline$=new wt([]),this._pointer$=new wt(null),this._projection$=new wt("nz"),this._roadSplineProjected$=new wt([]),this._pointerProjected$=new wt(vi.O),this.splineClosed=!1,this.pointerChange=new $e,this.svgSize$=new wt({x:100,y:100}),this.scalingSquare$=new wt({x:0,y:0,width:100,height:100}),this.mapPolyline$=new wt(""),this.mapPointer$=new wt(null),this.isShiftPressed=!1,this.destroyed$=new Re,this.isDragging=!1}set roadSpline(e){this._roadSpline$.next(e)}set pointer(e){this._pointer$.next(e)}set projection(e){this._projection$.next(e)}get trackLength$(){return this._roadSpline$.pipe(et(e=>{let n=0;for(let r=1;r{"Shift"===n.key&&(this.isShiftPressed=!0)}),Ao(window,"keyup").pipe(We(this.destroyed$)).subscribe(n=>{"Shift"===n.key&&(this.isShiftPressed=!1)}),Hl([this._roadSpline$,this._projection$]).pipe(We(this.destroyed$)).subscribe(([n,r])=>{this._roadSplineProjected$.next(n.map(s=>this.project(s)))}),Hl([this._pointer$,this._projection$]).pipe(We(this.destroyed$)).subscribe(([n,r])=>{this._pointerProjected$.next(this.project(n||Le.O))}),this._roadSplineProjected$.pipe(We(this.destroyed$),et(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.y)},s={x:Math.max(s.x,a.x),y:Math.max(s.y,a.y)}});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$),Hl([this._roadSplineProjected$,this.scalingSquare$,this.svgSize$]).pipe(We(this.destroyed$),et(([n,r,s])=>{const o=n.map(a=>({x:(a.x-r.x)*s.x/r.width,y:(r.y-a.y)*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$),Hl([this._pointerProjected$,this.scalingSquare$.asObservable(),this.svgSize$]).pipe(We(this.destroyed$),et(([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()}startDrag(e){this.isDragging=!0,this.updatePointer(e)}drag(e){this.isDragging&&this.updatePointer(e)}endDrag(){this.isDragging=!1}getClosestProjectedLineIndex(e){const n=this._roadSplineProjected$.getValue();let r=0,s=Number.MAX_SAFE_INTEGER;for(let d=1;d{return(i=Ef||(Ef={})).ThreeModel="model",i.Bitmap="bitmap",i.TwoSidedBitmap="two_sided_bitmap",Ef;var i})();class zpe extends Cse{constructor(t,e,n){super(t,{loadDepth:40,inertia:2}),this.mapGraph=t,this.famPath=e,this.hideUnknownEntities$=n,this.textureLoader=new Hg,this.terrainMaterials={},this.objLoader=new gO,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(zc(),We(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=Jl,e.wrapT=Zi,dd(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 Nn&&(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:Le.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(Le.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 mu({object3D:new ic(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 vr({side:Ko,transparent:!0,visible:!1}),this.famPath?this.textureLoader.loadAsync(`${this.famPath}/background/${t}.png`).then(e=>{e.wrapS=Jl,e.wrapT=Zi,dd(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==Ef.ThreeModel){let r;try{if(!e.famPath)throw new Error;const o=new o8,a=new gO,l=yield o.loadAsync(`${e.famPath}/props/${t.data.data.resource_id}/0/material.mtl`);l.preload(),a.setMaterials(l),r=new ic(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 Nn){const a=o.material instanceof Array?o.material:[o.material];for(const l of a)l.transparent=!0,l.alphaTest=.5,l instanceof vr&&l.map&&(l.map.wrapS=Zi,l.map.wrapT=Zi,dd(l.map),l.map.needsUpdate=!0)}});const s=new mu({object3D: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==Ef.Bitmap||t.type==Ef.TwoSidedBitmap){const r=(c,d)=>new Array(d).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 ta,[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==Ef.TwoSidedBitmap){const[c,d]=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 mu({object3D:new ic(s)});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=>(dd(h),new vr({map:h,alphaTest:.5,transparent:!0,side:Ko}))),d=new Nn(new sf(e.x,e.y),c[0]);if(d.rotateX(Math.PI/2),d.position.set(0,0,e.y/2),c.length>1){let h=-1;YR(r.world).pipe(function Fse(i,t=zy,e){const n=II(i,t);return function Ose(i,t){return Jn((e,n)=>{const{leading:r=!0,trailing:s=!1}=t??{};let o=!1,a=null,l=null,c=!1;const d=()=>{l?.unsubscribe(),l=null,s&&(m(),c&&n.complete())},h=()=>{l=null,c&&n.complete()},p=g=>l=Mr(i(g)).subscribe(jn(n,d,h)),m=()=>{if(o){o=!1;const g=a;a=null,n.next(g),!c&&p(g)}};e.subscribe(jn(n,g=>{o=!0,a=g,(!l||l.closed)&&(r?m():p(g))},()=>{c=!0,(!(s&&o&&l)||l.closed)&&n.complete()}))})}(()=>n,e)}(n&&!isNaN(+n)?1e3*+n:250)).subscribe(()=>{h=(h+1)%c.length,d.material=c[h]})}return[d,a]})()}}let Hpe=(()=>{class i{constructor(e,n,r){this.eelDelegate=e,this.cdr=n,this.mainService=r,this._resource$=new wt(null),this.changed=new $e,this.previewLoading$=new wt(!0),this.previewFamLocation$=new wt(null),this.previewFamLoading$=new wt(!1),this.pointer$=new wt(null),this.selectedSplineIndex$=new wt(0),this.selectedSplineItem$=new wt(null),this.selectedAiInfoItem$=new wt(null),this.selectedTerrainItem$=new wt(null),this.famPath=null,this.name="",this.renderer=null,this.map=null,this.isOpenedTrack=!0,this.roadPath=null,this.destroyed$=new Re}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=>({x:e.position.x,y:e.position.z,z:e.position.y}))||[]}ngAfterViewInit(){var e=this;return vt(function*(){var s;e.world=new e4(new t8,{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 mu({object3D:e.world.visualScene.factory.createPrimitive({shape:"SPHERE",radius:1e3},{color:16777215})}),e.skySphere.object3D.nativeMesh.material.side=Ko,e.world.addEntity(e.skySphere),e.selectionSphere=new mu({object3D: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 nO(16777215,2));let n=new wt({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,Le.add(e.renderer.camera.position,Le.Y),Le.Z),YR(e.world).pipe(We(e.destroyed$)).subscribe(()=>{e.renderer&&(e.skySphere.position=e.renderer.camera.position,e.pointer$.next(e.renderer.camera.position))}),e.controller=new Ase(e.world.keyboardInput,e.renderer,{mouseOptions:{canvas:e.previewCanvas.nativeElement,pointerLock:!0},keymap:"wasd+arrows",cameraLinearSpeed:40,cameraBoostMultiplier:4,cameraMovementElasticity:100,cameraRotationElasticity:30,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(We(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(We(e.destroyed$),vn(([s,o])=>!!e.resource&&s.startsWith(e.resource.id)),Vc(3e3)).subscribe(vt(function*(){e.previewLoading$.next(!0),yield e.postTmpUpdates(e.resource?.id),yield e.loadPreview(),e.previewLoading$.next(!1)})),e.selectedSplineIndex$.pipe(We(e.destroyed$),Vc(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=Le.add(a,Le.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.controller.reset())}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 Hg,o=r.find(a=>a.endsWith("spherical.png"));if(o){const a=yield s.loadAsync(o);a.colorSpace="srgb",a.mapping=Kc,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})()}onPointerChange(e){this.renderer&&(this.renderer.position=e)}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=ub.fromMapArray(e.roadPath.map((r,s)=>({path:`${e.terrainChunksObjLocation}terrain_chunk_${s}`,position:r,loadOptions:{}}))||[],!e.isOpenedTrack);e.unloadPreview(),e.map=new zpe(n,e.famPath&&"resources/"+e.famPath,e.mainService.hideHiddenFields$),e.map.resource=e.resource,e.map.isOpenedTrack=e.isOpenedTrack,YR(e.world).pipe(We(e.destroyed$)).subscribe(()=>{e.map&&e.renderer&&e.map.loaderCursor$.next(e.renderer.position)}),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)(E($c),E(ri),E(cl))},i.\u0275cmp=ot({type:i,selectors:[["app-tri-map-block-ui"]],viewQuery:function(e,n){if(1&e&&(ii(Ope,5),ii(Fpe,5)),2&e){let r;Tt(r=It())&&(n.previewCanvasContainer=r.first),Tt(r=It())&&(n.previewCanvas=r.first)}},inputs:{resource:"resource"},outputs:{changed:"changed"},decls:49,vars:44,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","projection","pointerChange"],[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&&(W(0,"div",0)(1,"h4"),Ge(2,"Preview *.FAM file"),Y(),W(3,"mat-form-field",1)(4,"mat-label"),Ge(5,"Current preview FAM"),Y(),W(6,"mat-select",2,3),Ne("valueChange",function(s){return n.onFamSelected(s)}),Ht(8,"async"),Ht(9,"async"),fe(10,Lpe,2,2,"mat-option",4),W(11,"mat-option",5),Ge(12,"custom"),Y()()(),fe(13,Npe,9,3,"ng-container",6),fe(14,Bpe,1,1,"mat-spinner",7),Ht(15,"async"),Y(),W(16,"div",8)(17,"div",9,10),Oe(19,"canvas",11,12),fe(21,Upe,1,0,"mat-spinner",13),Ht(22,"async"),Y(),W(23,"div",14,10)(25,"mat-form-field",1)(26,"mat-label"),Ge(27,"Spline item"),Y(),W(28,"input",15),Ne("ngModelChange",function(s){return n.selectedSplineIndex$.next(s)}),Ht(29,"async"),Ht(30,"async"),Y()(),W(31,"app-minimap",16),Ne("pointerChange",function(s){return n.onPointerChange(s)}),Ht(32,"async"),Y()()(),W(33,"h4"),Ge(34,"Road spline item"),Y(),Oe(35,"app-compound-block-ui",17),Ht(36,"async"),W(37,"h4"),Ge(38,"AI info (block for 4 spline items)"),Y(),Oe(39,"app-compound-block-ui",17),Ht(40,"async"),W(41,"h4"),Ge(42,"Terrain (block for 4 spline items)"),Y(),Oe(43,"app-compound-block-ui",17),Ht(44,"async"),W(45,"h4"),Ge(46,"Common"),Y(),Oe(47,"app-compound-block-ui",18),Ht(48,"async")),2&e){const r=ir(7);let s;G(6),U("value",n.previewFamPossibleLocations.includes(Kt(8,21,n.previewFamLocation$))?Kt(9,23,n.previewFamLocation$):"custom"),G(4),U("ngForOf",n.previewFamPossibleLocations),G(3),U("ngIf","custom"==r.value),G(1),U("ngIf",Kt(15,25,n.previewFamLoading$)),G(7),U("ngIf",Kt(22,27,n.previewLoading$)),G(7),U("min",0)("max",4*(null==(s=Kt(29,29,n._resource$))?null:s.data.num_chunks)-1)("ngModel",Kt(30,31,n.selectedSplineIndex$)),G(3),U("roadSpline",n.roadSpline)("pointer",Kt(32,33,n.pointer$))("splineClosed",!n.isOpenedTrack)("projection","nz"),G(4),U("resource",Kt(36,35,n.selectedSplineItem$))("hideBlockActions",!0),G(4),U("resource",Kt(40,37,n.selectedAiInfoItem$))("hideBlockActions",!0),G(4),U("resource",Kt(44,39,n.selectedTerrainItem$))("hideBlockActions",!0),G(4),U("resource",Kt(48,41,n._resource$))("hideBlockActions",!0)("fieldWhitelist",ro(43,Vpe))}},dependencies:[Co,Mi,Wl,Bh,jc,Hh,zh,fu,ql,qo,Yc,$M,cb,Fm,XS,Wc,Ppe,zl],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-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})();const c8=i=>new Promise(t=>setTimeout(t,i)),d8=(i,t,e=null)=>{const n=document.createElement("canvas"),r=n.getContext("2d",{willReadFrequently:!0}),s=i.width,o=i.height;n.width=s,n.height=o,r.drawImage(i,0,0,s,o);const a=r.getImageData(0,0,s,o);for(let l=0;l{if(!(o instanceof Nn))return;let a=-1;if(o.name.startsWith("lbl__rt_frnt")?a=0:o.name.startsWith("lbl__lt_frnt")?a=1:o.name.startsWith("lbl__rt_rear")?a=2:o.name.startsWith("lbl__lt_rear")&&(a=3),a>-1){this.wheels[a]=o,a<2&&(this.frontWheels[a]=o),o.geometry.boundingBox||o.geometry.computeBoundingBox();const l=Le.avg(o.geometry.boundingBox.min,o.geometry.boundingBox.max);o.geometry.translate(...Le.spr(Le.neg(l))),o.position.set(...Le.spr(l)),this.wheelIdlePositions[a]=l}(o.name.includes("rsid")||o.name.includes("lite"))&&(r.push(o),this.originalTexWithTailLights=o.material.map)}),!this.originalTexWithTailLights)throw new Error("Not a driveable NFS1 car");this.tailLightColors=n.includes("TRAFFC.CFM")?[9509903,16711680]:[3212546,16258068],this.texWithTailLightsImg=document.createElement("img"),this.texWithTailLights=new Ro(this.texWithTailLightsImg),this.texWithTailLights.flipY=this.originalTexWithTailLights.flipY,dd(this.texWithTailLights),this.recolorTailLights(this.tailLightColors[0]).then();for(const o of r)o.material.map=this.texWithTailLights;const s=new Hg;this.tyreTextures=[1,2,3,4].map(o=>s.load(`${n}/tyr${o}.png`));for(const o of this.tyreTextures)dd(o);this.tyreMaterial=new vr({map:this.tyreTextures[0]}),this.tyreMaterial.transparent=!0,this.tyreMaterial.alphaTest=.5,this.tyreMaterial.map.wrapS=Zi,this.tyreMaterial.map.wrapT=Zi,this.tyreMaterial.polygonOffset=!0,this.tyreMaterial.polygonOffsetFactor=-4;for(const o of this.wheels)o.material=this.tyreMaterial}get tailLightsOn(){return this._tailLightsOn}set tailLightsOn(t){t!==this._tailLightsOn&&(this._tailLightsOn=t,this.recolorTailLights(this.tailLightColors[t?1:0]))}get speed(){return this._speed}set speed(t){if(t!==this._speed){switch(this._speed=t,this.tyreTextureUpdateTimer&&clearInterval(this.tyreTextureUpdateTimer),t){case"idle":this.tyreMaterial.map=this.tyreTextures[0];break;case"slow":let e=!0;this.tyreTextureUpdateTimer=setInterval(()=>{this.tyreMaterial.map=this.tyreTextures[e?1:2],this.tyreMaterial.needsUpdate=!0,e=!e},16);break;case"fast":this.tyreMaterial.map=this.tyreTextures[3]}this.tyreMaterial.needsUpdate=!0}}get steeringAngle(){return this._steeringAngle}set steeringAngle(t){if(t!==this._steeringAngle){this._steeringAngle=t;for(const e of this.frontWheels)e.rotation.set(0,0,t)}}recolorTailLights(t){var e=this;return vt(function*(){if(e.originalTexWithTailLights&&e.texWithTailLights&&e.texWithTailLightsImg){for(let n=100;n>0&&!e.originalTexWithTailLights.source.data;n--)yield c8(50);((i,t,e,n=null)=>{const[r,s,o]=[t>>16,t>>8&255,255&t],[a,l,c]=[e>>16,e>>8&255,255&e];d8(i,(d,h)=>{d[h]==r&&d[h+1]==s&&d[h+2]==o&&(d[h]=a,d[h+1]=l,d[h+2]=c)},n)})(e.originalTexWithTailLights.source.data,e.tailLightsTexColor,t,e.texWithTailLightsImg),e.texWithTailLights.needsUpdate=!0}})()}dispose(){this.texWithTailLightsImg&&(this.texWithTailLightsImg.remove(),this.texWithTailLightsImg=null),this.texWithTailLights&&(this.texWithTailLights.dispose(),this.texWithTailLights=null),this.tyreTextureUpdateTimer&&clearInterval(this.tyreTextureUpdateTimer),this.tyreMaterial&&(this.tyreMaterial.dispose(),this.tyreMaterial=null)}}let Wpe=(()=>{class i{constructor(e,n,r){this.eelDelegate=e,this.mainService=n,this.cdr=r,this._resource$=new wt(null),this.changed=new $e,this.previewPaths$=new wt(null),this.destroyed$=new Re,this.customControls=[],this.serializerSettings={geometry__save_obj:!0,geometry__save_blend:!1,geometry__export_to_gg_web_engine:!1}}get resource(){return this._resource$.getValue()}set resource(e){this._resource$.next(e)}ngAfterViewInit(){var e=this;return vt(function*(){e._resource$.pipe(We(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(We(e.destroyed$),vn(([n,r])=>!!e.resource&&n.startsWith(e.resource.id)),Vc(1500)).subscribe(vt(function*(){e.previewPaths$.next(null),e.previewPaths$.next(yield e.postTmpUpdates(e.resource?.id))}))})()}onObjectLoaded(e){var n=this;return vt(function*(){if((n._resource$.value?.id||"").includes(".CFM__"))try{const r=n.resource?.id.split("/");r.pop(),r[r.length-1]=""+(+r[r.length-1]+1);const s=yield n.eelDelegate.retrieveValue(r.join("/")+"/data"),o=s.children_aliases.findIndex(l=>"!PAL"===l);if(-1==o)throw new Error("Not a car");const a=new $pe(e,s.children[o].data.colors[254]>>>8,n.previewPaths$.value[0].substring(0,n.previewPaths$.value[0].lastIndexOf("/"))+"/assets");n.customControls=[{title:"TNFS car features",controls:[{label:"Brake lights on",type:"checkbox",value:!1,change:l=>{a.tailLightsOn=l}},{label:"Car speed",type:"radio",options:["idle","slow","fast"],value:"idle",change:l=>{a.speed=l}},{label:"Steering angle",type:"slider",minValue:-.7,maxValue:.7,valueStep:.05,value:0,change:l=>{a.steeringAngle=l}}]}],n.cdr.markForCheck()}catch{}})()}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)(E($c),E(cl),E(ri))},i.\u0275cmp=ot({type:i,selectors:[["app-orip-geometry-block-ui"]],inputs:{resource:"resource"},outputs:{changed:"changed"},decls:4,vars:7,consts:[[3,"paths","customControls","onObjectLoaded"],[3,"resource"]],template:function(e,n){1&e&&(W(0,"app-obj-viewer",0),Ne("onObjectLoaded",function(s){return n.onObjectLoaded(s)}),Ht(1,"async"),Y(),Oe(2,"app-compound-block-ui",1),Ht(3,"async")),2&e&&(U("paths",Kt(1,3,n.previewPaths$))("customControls",n.customControls),G(2),U("resource",Kt(3,5,n._resource$)))},dependencies:[Wc,l8,zl],changeDetection:0}),i})();const u8=i=>{let t=i.block_class_mro.split("__")[0];return"ArrayBlock"===t?u8(i.child_schema)+"[]":t},jpe=["class","block-ui"];function Ype(i,t){if(1&i&&(W(0,"mat-label",7),Ge(1),Y()),2&i){const e=he(2);U("matTooltip",e.resourceDescription),G(1),Xi("",null==e.resource?null:e.resource.name," ")}}function qpe(i,t){if(1&i&&(W(0,"mat-option",8),Ge(1),Y()),2&i){const e=t.$implicit,n=t.index,r=he(2);U("value",n)("disabled",r.disabled),G(1),Xi(" ",r.blockClassStr(e)," ")}}function Xpe(i,t){if(1&i){const e=di();$r(0),fe(1,Ype,2,2,"mat-label",1),Ht(2,"async"),W(3,"div",2)(4,"mat-label"),Ge(5,"Resource type:"),Y(),W(6,"mat-select",3),Ne("selectionChange",function(r){return an(e),Ut(he().setChoiceIndex(r.value))}),fe(7,qpe,2,3,"mat-option",4),Y(),Oe(8,"app-block-actions",5),Y(),Oe(9,"app-editor",6),Wr()}if(2&i){const e=he();let n;G(1),U("ngIf",(null==e.resource?null:e.resource.name)&&(null==e.resource?null:e.resource.name)!=(null==(n=Kt(2,8,e.main.resource$))?null:n.name)),G(5),U("value",e.resourceData.choice_index)("disabled",e.disabled),G(1),U("ngForOf",e.resource.schema.possible_resource_schemas),G(1),U("resource",e.childResource),G(1),U("resource",e.childResource)("hideBlockActions",!0)("disabled",e.disabled)}}let h8=(()=>{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 $e,this.blockClassStr=u8}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)(E(cl))},i.\u0275cmp=ot({type:i,selectors:[["app-delegate",8,"block-ui"]],inputs:{resource:"resource",resourceDescription:"resourceDescription",hideBlockActions:"hideBlockActions",disabled:"disabled"},outputs:{changed:"changed"},attrs:jpe,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"],[3,"resource","hideBlockActions","disabled"],["matTooltipPosition","above",3,"matTooltip"],[3,"value","disabled"]],template:function(e,n){1&e&&fe(0,Xpe,10,10,"ng-container",0),2&e&&U("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 Kpe=["class","block-ui"];function Zpe(i,t){if(1&i&&(W(0,"mat-label",7),Ge(1),Y()),2&i){const e=he(2);U("matTooltip",e.resourceDescription),G(1),Xi(" ",e.resource.name," ")}}function Qpe(i,t){if(1&i){const e=di();$r(0),fe(1,Zpe,2,2,"mat-label",1),W(2,"mat-selection-list",2),Ne("selectionChange",function(r){return an(e),Ut(he().onSelection(r))}),W(3,"mat-list-option",3),Ge(4," Left "),Y(),W(5,"mat-list-option",4),Ge(6," Right "),Y()(),W(7,"mat-form-field",5)(8,"mat-label"),Ge(9,"Texture ID"),Y(),W(10,"input",6),Ne("ngModelChange",function(r){return an(e),Ut(he().resource.data.texture_id=r)})("change",function(){return an(e),Ut(he().changed.emit())}),Y()(),Wr()}if(2&i){const e=he();G(1),U("ngIf",e.resource.name),G(2),U("selected",e.resource.data.has_left_fence),G(2),U("selected",e.resource.data.has_right_fence),G(5),U("max",63)("min",0)("step",1)("ngModel",e.resource.data.texture_id)}}let Jpe=(()=>{class i{constructor(){this.resource=null,this.resourceDescription="",this.changed=new $e}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=ot({type:i,selectors:[["app-fence-type",8,"block-ui"]],inputs:{resource:"resource",resourceDescription:"resourceDescription"},outputs:{changed:"changed"},attrs:Kpe,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&&fe(0,Qpe,11,7,"ng-container",0),2&e&&U("ngIf",n.resource)},dependencies:[Mi,Wl,Bh,jc,Hh,zh,fu,ql,qo,Yc,Os,yC,vC],changeDetection:0}),i})(),eme=(()=>{class i{constructor(){this._resource=null,this.resourceMap={},this.changed=new $e}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]=["",dl.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)(E(Jy),E(mte),E(nR))},i.\u0275cmp=ot({type:i,selectors:[["app-run-custom-action",8,"dialog"]],attrs:tme,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&&(W(0,"h1",0),Ge(1),Y(),W(2,"div",1)(3,"p"),Ge(4),Y()(),W(5,"form",2),fe(6,nme,4,4,"mat-form-field",3),Y(),W(7,"div",4)(8,"button",5),Ne("click",function(){return n.dialogRef.close()}),Ge(9,"Cancel"),Y(),W(10,"button",6),Ne("click",function(){return n.submit()}),Ge(11,"Run"),Y()()),2&e&&(G(1),Xi('Run action "',n.data.title,'"'),G(3),_i(n.data.description),G(1),U("formGroup",n.argsForm),G(1),U("ngForOf",n.data.args),G(4),U("disabled",n.argsForm.invalid))},dependencies:[Co,ER,Wl,jc,gR,ql,qo,Yc,$M,cV,dV,uV,Uh,cC],styles:["form[_ngcontent-%COMP%]{padding:0 24px}"]}),i})();function f8(i,t){return t?e=>wy(t.pipe(Oi(1),function rme(){return Jn((i,t)=>{i.subscribe(jn(t,ms))})}()),e.pipe(f8(i))):tr((e,n)=>Mr(i(e,n)).pipe(Oi(1),GB(e)))}function p8(i,t=zy){const e=II(i,t);return f8(()=>e)}const sme=["mat-menu-item",""];function ome(i,t){1&i&&(ki(),W(0,"svg",3),Oe(1,"polygon",4),Y())}const ame=[[["mat-icon"],["","matMenuItemIcon",""]],"*"],lme=["mat-icon, [matMenuItemIcon]","*"];function cme(i,t){if(1&i){const e=di();W(0,"div",0),Ne("keydown",function(r){return an(e),Ut(he()._handleKeydown(r))})("click",function(){return an(e),Ut(he().closed.emit("click"))})("@transformMenu.start",function(r){return an(e),Ut(he()._onAnimationStart(r))})("@transformMenu.done",function(r){return an(e),Ut(he()._onAnimationDone(r))}),W(1,"div",1),$t(2),Y()()}if(2&i){const e=he();U("id",e.panelId)("ngClass",e._classList)("@transformMenu",e._panelAnimationState),St("aria-label",e.ariaLabel||null)("aria-labelledby",e.ariaLabelledby||null)("aria-describedby",e.ariaDescribedby||null)}}const dme=["*"],_O=new me("MAT_MENU_PANEL"),ume=HM(zM(class{}));let KS=(()=>{class i extends ume{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 Re,this._focused=new Re,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",Yr("120ms cubic-bezier(0, 0, 0.2, 1)",si({opacity:1,transform:"scale(1)"}))),Or("* => void",Yr("100ms 25ms linear",si({opacity:0})))]),fadeInItems:Da("fadeInItems",[Ps("showing",si({opacity:1})),Or("void => *",[si({opacity:0}),Yr("400ms 100ms cubic-bezier(0.55, 0, 0.55, 0.2)")])])};let fme=0;const m8=new me("mat-menu-default-options",{providedIn:"root",factory:function pme(){return{overlapTrigger:!1,xPosition:"after",yPosition:"below",backdropClass:"cdk-overlay-transparent-backdrop"}}});let Xb=(()=>{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 rm,this._classList={},this._panelAnimationState="void",this._animationDone=new Re,this.overlayPanelClass=this._defaultOptions.overlayPanelClass||"",this.backdropClass=this._defaultOptions.backdropClass,this._overlapTrigger=this._defaultOptions.overlapTrigger,this._hasBackdrop=this._defaultOptions.hasBackdrop,this.closed=new $e,this.close=this.closed,this.panelId="mat-menu-panel-"+fme++}ngOnInit(){this.setPositionClasses()}ngAfterContentInit(){this._updateDirectDescendants(),this._keyManager=new AU(this._directDescendantItems).withWrap().withTypeAhead().withHomeAndEnd(),this._keyManager.tabOut.subscribe(()=>this.closed.emit("tab")),this._directDescendantItems.changes.pipe(Eo(this._directDescendantItems),Rs(e=>Cr(...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(Eo(this._directDescendantItems),Rs(n=>Cr(...n.map(r=>r._hovered))))}addItem(e){}removeItem(e){}_handleKeydown(e){const n=e.keyCode,r=this._keyManager;switch(n){case 27:Yo(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(Oi(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(Eo(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)(E(pt),E(ht),E(m8),E(ri))},i.\u0275dir=ve({type:i,contentQueries:function(e,n,r){if(1&e&&(Wi(r,hme,5),Wi(r,KS,5),Wi(r,KS,4)),2&e){let s;Tt(s=It())&&(n.lazyContent=s.first),Tt(s=It())&&(n._allItems=s),Tt(s=It())&&(n.items=s)}},viewQuery:function(e,n){if(1&e&&ii(wo,5),2&e){let r;Tt(r=It())&&(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})(),mme=(()=>{class i extends Xb{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)(E(pt),E(ht),E(m8),E(ri))},i.\u0275cmp=ot({type:i,selectors:[["mat-menu"]],hostVars:3,hostBindings:function(e,n){2&e&&St("aria-label",null)("aria-labelledby",null)("aria-describedby",null)},exportAs:["matMenu"],features:[An([{provide:_O,useExisting:i}]),at],ngContentSelectors:dme,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&&(rr(),fe(0,cme,3,6,"ng-template"))},dependencies:[dm],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:[ZS.transformMenu,ZS.fadeInItems]},changeDetection:0}),i})();const g8=new me("mat-menu-scroll-strategy"),_me={provide:g8,deps:[as],useFactory:function gme(i){return()=>i.scrollStrategies.reposition()}},_8=Th({passive:!0});let vme=(()=>{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,d){this._overlay=e,this._element=n,this._viewContainerRef=r,this._menuItemInstance=a,this._dir=l,this._focusMonitor=c,this._ngZone=d,this._overlayRef=null,this._menuOpen=!1,this._closingActionsSubscription=Zt.EMPTY,this._hoverSubscription=Zt.EMPTY,this._menuCloseSubscription=Zt.EMPTY,this._changeDetectorRef=Pt(ri),this._handleTouchStart=h=>{$I(h)||(this._openedBy="touch")},this._openedBy=void 0,this.restoreFocus=!0,this.menuOpened=new $e,this.onMenuOpen=this.menuOpened,this.menuClosed=new $e,this.onMenuClose=this.menuClosed,this._scrollStrategy=s,this._parentMaterialMenu=o instanceof Xb?o:void 0,n.nativeElement.addEventListener("touchstart",this._handleTouchStart,_8)}ngAfterContentInit(){this._handleHover()}ngOnDestroy(){this._overlayRef&&(this._overlayRef.dispose(),this._overlayRef=null),this._element.nativeElement.removeEventListener("touchstart",this._handleTouchStart,_8),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 Xb&&(e._startAnimation(),e._directDescendantItems.changes.pipe(We(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 Xb?(n._resetAnimation(),n.lazyContent?n._animationDone.pipe(vn(r=>"void"===r.toState),Oi(1),We(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 Im({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],[d,h]=[r,s],p=0;if(this.triggersSubmenu()){if(h=r="before"===e.xPosition?"start":"end",s=d="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:d,overlayY:o,offsetY:p},{originX:s,originY:l,overlayX:h,overlayY:o,offsetY:p},{originX:r,originY:c,overlayX:d,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 Cr(e,this._parentMaterialMenu?this._parentMaterialMenu.closed:ut(),this._parentMaterialMenu?this._parentMaterialMenu._hovered().pipe(vn(o=>o!==this._menuItemInstance),vn(()=>this._menuOpen)):ut(),n)}_handleMousedown(e){GI(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(vn(e=>e===this._menuItemInstance&&!e.disabled),p8(0,TI)).subscribe(()=>{this._openedBy="mouse",this.menu instanceof Xb&&this.menu._isAnimating?this.menu._animationDone.pipe(Oi(1),p8(0,TI),We(this._parentMaterialMenu._hovered())).subscribe(()=>this.openMenu()):this.openMenu()}))}_getPortal(e){return(!this._portal||this._portal.templateRef!==e.templateRef)&&(this._portal=new Cm(e.templateRef,this._viewContainerRef)),this._portal}}return i.\u0275fac=function(e){return new(e||i)(E(as),E(pt),E(jr),E(g8),E(_O,8),E(KS,10),E(Aa,8),E(Hc),E(ht))},i.\u0275dir=ve({type:i,hostVars:3,hostBindings:function(e,n){1&e&&Ne("click",function(s){return n._handleClick(s)})("mousedown",function(s){return n._handleMousedown(s)})("keydown",function(s){return n._handleKeydown(s)}),2&e&&St("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})(),yme=(()=>{class i extends vme{}return i.\u0275fac=function(){let t;return function(n){return(t||(t=ni(i)))(n||i)}}(),i.\u0275dir=ve({type:i,selectors:[["","mat-menu-trigger-for",""],["","matMenuTriggerFor",""]],hostAttrs:[1,"mat-mdc-menu-trigger"],exportAs:["matMenuTrigger"],features:[at]}),i})(),bme=(()=>{class i{}return i.\u0275fac=function(e){return new(e||i)},i.\u0275mod=nn({type:i}),i.\u0275inj=Xt({providers:[_me],imports:[So,Zy,Kn,Rm,jy,Kn]}),i})();function xme(i,t){if(1&i){const e=di();W(0,"button",7),Ne("click",function(){return an(e),Ut(he(2).deserialize())}),Oe(1,"mat-icon",8),Y()}}function wme(i,t){if(1&i){const e=di();$r(0),fe(1,xme,2,0,"button",4),W(2,"button",5),Ne("click",function(){return an(e),Ut(he().serializeBlockReversible())}),Oe(3,"mat-icon",6),Y(),Wr()}if(2&i){const e=he();G(1),U("ngIf",e.isInReversibleSerializationState),G(1),U("disabled",e.isInReversibleSerializationState)}}function Mme(i,t){1&i&&(W(0,"button",9),Oe(1,"mat-icon",10),Y()),2&i&&(he(),U("matMenuTriggerFor",ir(3)))}function Cme(i,t){if(1&i){const e=di();W(0,"button",11),Ne("click",function(){const s=an(e).$implicit;return Ut(he().runCustomAction(s))}),W(1,"span"),Ge(2),Y()()}if(2&i){const e=t.$implicit;G(2),_i(e.title)}}const Sme=function(){return[]};let QS=(()=>{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)(E(cl),E($c),E(ri),E(Lm),E(EV))},i.\u0275cmp=ot({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&&(fe(0,wme,4,2,"ng-container",0),fe(1,Mme,2,1,"button",1),W(2,"mat-menu",null,2),fe(4,Cme,3,1,"button",3),Y()),2&e&&(U("ngIf",null==n.resource||null==n.resource.schema?null:n.resource.schema.serializable_to_disc),G(1),U("ngIf",(null==n.resource||null==n.resource.schema.custom_actions?null:n.resource.schema.custom_actions.length)>0),G(3),U("ngForOf",(null==n.resource?null:n.resource.schema.custom_actions)||ro(3,Sme)))},dependencies:[Co,Mi,Os,WM,hR,mme,KS,yme],styles:["[_nghost-%COMP%]{display:flex}"]}),i})();const Eme=["class","block-ui"];function Ame(i,t){if(1&i&&(W(0,"mat-label",7),Ge(1),Y()),2&i){const e=he();U("matTooltip",e.resourceDescription),G(1),Xi("",null==e.resource?null:e.resource.name," ")}}function Dme(i,t){if(1&i&&(W(0,"audio",8),Oe(1,"source",9),Ht(2,"async"),Ge(3," Your browser does not support the audio element. "),Y()),2&i){const e=he();G(1),U("src",Kt(2,1,e.audioUrl$),Op)}}function Tme(i,t){1&i&&Oe(0,"mat-spinner",10)}function Ime(i,t){1&i&&Oe(0,"app-block-actions",11),2&i&&U("resource",he().resource)}const Rme=function(){return["wave_data"]};let kme=(()=>{class i{constructor(e,n){this.eelDelegate=e,this.main=n,this._resource$=new wt(null),this.audioUrl$=new wt(null),this.resourceDescription="",this.hideBlockActions=!1,this.destroyed$=new Re,this.changed=new $e}set resource(e){this._resource$.next(e)}get resource(){return this._resource$.getValue()}ngAfterViewInit(){var e=this;return vt(function*(){e._resource$.pipe(We(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)(E($c),E(cl))},i.\u0275cmp=ot({type:i,selectors:[["app-eacs-audio",8,"block-ui"]],inputs:{resource:"resource",resourceDescription:"resourceDescription",hideBlockActions:"hideBlockActions"},outputs:{changed:"changed"},attrs:Eme,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&&(W(0,"div",0),fe(1,Ame,2,2,"mat-label",1),Ht(2,"async"),fe(3,Dme,4,3,"audio",2),Ht(4,"async"),fe(5,Tme,1,0,"mat-spinner",3),Ht(6,"async"),Oe(7,"div",4),fe(8,Ime,1,1,"app-block-actions",5),Y(),Oe(9,"app-compound-block-ui",6),Ht(10,"async")),2&e){let r;G(1),U("ngIf",(null==n.resource?null:n.resource.name)&&(null==n.resource?null:n.resource.name)!=(null==(r=Kt(2,7,n.main.resource$))?null:r.name)),G(2),U("ngIf",Kt(4,9,n.audioUrl$)),G(2),U("ngIf",n.resource&&!Kt(6,11,n.audioUrl$)),G(3),U("ngIf",!n.hideBlockActions),G(1),U("resource",Kt(10,13,n._resource$))("hideBlockActions",!0)("fieldBlacklist",ro(15,Rme))}},dependencies:[Mi,qo,Os,XS,Wc,QS,zl],styles:["#header[_ngcontent-%COMP%]{display:flex}"]}),i})();class Pme{constructor(t,e){this.mesh=t,this.assetsPath=e,this.textures=[],this.tyreTextureUpdateTimer=void 0,this.tyreMaterial=null,this.tyreTextures=[],this._color=65280,this._speed="idle",this._steeringAngle=0,this.wheels=[],this.wheelIdlePositions=[],this.frontWheels=[];let n=new Set;if(t.traverse(r=>{if(!(r instanceof Nn))return;let s=-1;if(r.name.startsWith("part_hp_12")?s=0:r.name.startsWith("part_hp_14")?s=1:r.name.startsWith("part_hp_16")?s=2:r.name.startsWith("part_hp_18")&&(s=3),s>-1){r.geometry.boundingBox||r.geometry.computeBoundingBox();let a=Le.avg(r.geometry.boundingBox.min,r.geometry.boundingBox.max);return(0==s||2==s)&&(a={x:a.x,y:a.y,z:a.z+1.5}),r.geometry.translate(...Le.spr(Le.neg(a))),r.position.set(...Le.spr(a)),this.wheelIdlePositions[s]=a,this.wheels.push(r),void(s<2&&this.frontWheels.push(r))}const o=r.material.map;o&&n.add(o)}),this.textures=Array.from(n).map(r=>{const s=new Ro(document.createElement("img"));return s.flipY=r.flipY,dd(s),[r,s]}),t.traverse(r=>{if(!(r instanceof Nn))return;const s=r.material.map;if(s){const o=this.textures.find(([a,l])=>a===s);o&&(r.material.map=o[1])}}),this.hasWheels){const r=new Hg;this.tyreTextures=[0,1,2,3].map(s=>r.load(`${e}/m${s}00.png`));for(const s of this.tyreTextures)dd(s);this.tyreMaterial=new vr({map:this.tyreTextures[0]}),this.tyreMaterial.transparent=!0,this.tyreMaterial.alphaTest=.5,this.tyreMaterial.map.wrapS=Zi,this.tyreMaterial.map.wrapT=Zi,this.tyreMaterial.polygonOffset=!0,this.tyreMaterial.polygonOffsetFactor=-4;for(const s of this.wheels)s.material=this.tyreMaterial}this.color=65280,this.recolorCar().then()}get color(){return this._color}set color(t){t!==this._color&&(this._color=t,this.recolorCar().then())}get speed(){return this._speed}set speed(t){if(t!==this._speed){switch(this._speed=t,this.tyreTextureUpdateTimer&&clearInterval(this.tyreTextureUpdateTimer),t){case"idle":this.tyreMaterial.map=this.tyreTextures[0];break;case"slow":let e=!0;this.tyreTextureUpdateTimer=setInterval(()=>{this.tyreMaterial.map=this.tyreTextures[e?1:2],this.tyreMaterial.needsUpdate=!0,e=!e},16);break;case"fast":this.tyreMaterial.map=this.tyreTextures[3]}this.tyreMaterial.needsUpdate=!0}}get steeringAngle(){return this._steeringAngle}set steeringAngle(t){if(t!==this._steeringAngle){this._steeringAngle=t;for(const e of this.frontWheels)e.rotation.set(0,0,t)}}get hasWheels(){return this.wheels.length>0}recolorCar(){var t=this;return vt(function*(){const[e,n,r]=[t.color>>16,t.color>>8&255,255&t.color];for(const[s,o]of t.textures){for(let a=100;a>0&&!s.source.data;a--)yield c8(50);d8(s.source.data,(a,l)=>{if(a[l]+a[l+2]{class i{constructor(e,n,r){this.eelDelegate=e,this.main=n,this.cdr=r,this._resource$=new wt(null),this.changed=new $e,this.customControls=[],this.previewPaths$=new wt(null),this.destroyed$=new Re,this.serializerSettings={geometry__save_obj:!0,geometry__save_blend:!1,geometry__export_to_gg_web_engine:!1}}get resource(){return this._resource$.getValue()}set resource(e){this._resource$.next(e)}ngAfterViewInit(){var e=this;return vt(function*(){e._resource$.pipe(We(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.main.dataBlockChange$.pipe(We(e.destroyed$),vn(([n,r])=>!!e.resource&&n.startsWith(e.resource.id)),Vc(1500)).subscribe(vt(function*(){e.previewPaths$.next(null),e.previewPaths$.next(yield e.postTmpUpdates(e.resource?.id))}))})()}onObjectLoaded(e){var n=this;return vt(function*(){try{const r=new Pme(e,n.previewPaths$.value[0].substring(0,n.previewPaths$.value[0].lastIndexOf("/"))+"/assets");let s=null;const o=a=>{s&&clearTimeout(s),s=setTimeout(()=>r.color=a,50)};n.customControls=[{title:"NFS2 car features",controls:[{label:"Car color",type:"color",value:65280,change:a=>o(a)}]}],r.hasWheels&&n.customControls[0].controls.push({label:"Car speed",type:"radio",options:["idle","slow","fast"],value:"idle",change:a=>{r.speed=a}},{label:"Steering angle",type:"slider",minValue:-.7,maxValue:.7,valueStep:.05,value:0,change:a=>{r.steeringAngle=a}}),n.cdr.markForCheck()}catch(r){console.error(r)}})()}postTmpUpdates(e){var n=this;return vt(function*(){if(e){const r=yield n.eelDelegate.serializeResourceTmp(e,Object.entries(n.main.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)(E($c),E(cl),E(ri))},i.\u0275cmp=ot({type:i,selectors:[["app-geo-geometry",8,"block-ui"]],inputs:{resource:"resource"},outputs:{changed:"changed"},attrs:Ome,decls:4,vars:8,consts:[[3,"paths","groupFunction","customControls","onObjectLoaded"],[3,"resource",4,"ngIf"],[3,"resource"]],template:function(e,n){1&e&&(W(0,"app-obj-viewer",0),Ne("onObjectLoaded",function(s){return n.onObjectLoaded(s)}),Ht(1,"async"),Y(),fe(2,Fme,2,3,"app-compound-block-ui",1),Ht(3,"async")),2&e&&(U("paths",Kt(1,4,n.previewPaths$))("groupFunction",n.previewObjectGroupFunc)("customControls",n.customControls),G(2),U("ngIf",!Kt(3,6,n.main.hideHiddenFields$)))},dependencies:[Mi,Wc,l8,zl],changeDetection:0}),i})();const Nme=function(){return["children","items_descr"]};let Bme=(()=>{class i{constructor(){this._resource=null,this.hideBlockActions=!1,this.resourceMap={},this.changed=new $e}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=ot({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&&Oe(0,"app-compound-block-ui",0)(1,"app-sidenav-res-list",1),2&e&&(U("resource",n.resource)("hideBlockActions",n.hideBlockActions)("fieldBlacklist",ro(4,Nme)),G(1),U("resources",n.resourceMap))},dependencies:[Wc,_C],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 Ume(i,t){if(1&i&&(W(0,"mat-error"),Ge(1),Y()),2&i){const e=he(2);G(1),Jp(" ",e.resourceError.data.error_class,": ",e.resourceError.data.error_text," ")}}function Vme(i,t){1&i&&Oe(0,"mat-spinner",5)}function zme(i,t){if(1&i&&(W(0,"div",2),fe(1,Ume,2,2,"mat-error",3),fe(2,Vme,1,0,"mat-spinner",4),Y()),2&i){const e=he();G(1),U("ngIf",e.resourceError),G(1),U("ngIf",!e.resourceError)}}function Hme(i,t){}let Kb=(()=>{class i{constructor(e){this.mainService=e,this._component=null,this._componentChangedSub=null,this.destroyed$=new Re,this.resourceSet$=new Re,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(We(this.destroyed$),We(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 Gme(i,t){1&i&&Oe(0,"mat-icon",17)}function $me(i,t){1&i&&Oe(0,"mat-icon",18)}let Wme=(()=>{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(bV,{data:{text:"There are unsaved changes, which will be lost. Are you sure you want to reload file?"}});if(!(yield rR(n.afterClosed())))return}yield e.mainService.reloadResource(),e.cdr.markForCheck()})()}}return i.\u0275fac=function(e){return new(e||i)(E($c),E(cl),E(Lm),E(EV),E(ri))},i.\u0275cmp=ot({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&&(W(0,"mat-toolbar",0)(1,"span"),Ge(2),Ht(3,"async"),Ht(4,"async"),Y(),Oe(5,"span",1),W(6,"button",2),Ne("click",function(){return n.toggleUnknownsVisibility()}),fe(7,Gme,1,0,"mat-icon",3),Ht(8,"async"),fe(9,$me,1,0,"mat-icon",4),Ht(10,"async"),Y(),Oe(11,"mat-divider",5)(12,"app-block-actions",6),Ht(13,"async"),W(14,"button",7),Ne("click",function(){return n.reloadResource()}),Ht(15,"async"),Oe(16,"mat-icon",8),Y(),Oe(17,"mat-divider",5),W(18,"button",9),Ne("click",function(){return n.saveResource()}),Ht(19,"async"),Ht(20,"async"),Oe(21,"mat-icon",10),Y()(),W(22,"div",11),Oe(23,"div",12)(24,"app-editor",13),Ht(25,"async"),Ht(26,"async"),Ht(27,"async"),W(28,"div",14)(29,"a",15),Oe(30,"img",16),Y()(),Oe(31,"div",12),Y()),2&e){let r;G(2),Jp("",(null==(r=Kt(3,9,n.mainService.resource$))?null:r.name)||"...","",Kt(4,11,n.mainService.hasUnsavedChanges$)?"*":"",""),G(5),U("ngIf",Kt(8,13,n.mainService.hideHiddenFields$)),G(2),U("ngIf",!Kt(10,15,n.mainService.hideHiddenFields$)),G(3),U("resource",Kt(13,17,n.mainService.resource$)),G(2),U("disabled",!Kt(15,19,n.mainService.eelDelegate.openedResourcePath$)),G(4),U("disabled",!Kt(19,21,n.mainService.resource$)||!Kt(20,23,n.mainService.hasUnsavedChanges$)),G(6),U("resource",Kt(25,25,n.mainService.customActionRunning$)?null:Kt(26,27,n.mainService.resource$)||Kt(27,29,n.mainService.error$))("hideBlockActions",!0)}},dependencies:[Mi,yJ,xJ,Os,WM,hR,Kb,QS,zl],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 v8(i){return new pe(3e3,!1)}function Ege(){return typeof window<"u"&&typeof window.document<"u"}function vO(){return typeof process<"u"&&"[object process]"==={}.toString.call(process)}function ku(i){switch(i.length){case 0:return new Qy;case 1:return i[0];default:return new nV(i)}}function y8(i,t,e,n,r=new Map,s=new Map){const o=[],a=[];let l=-1,c=null;if(n.forEach(d=>{const h=d.get("offset"),p=h==l,m=p&&c||new Map;d.forEach((g,b)=>{let v=b,y=g;if("offset"!==b)switch(v=t.normalizePropertyName(v,o),y){case eR:y=r.get(b);break;case Gc: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 pge(i){return new pe(3502,!1)}();return a}function yO(i,t,e,n){switch(t){case"start":i.onStart(()=>n(e&&bO(e,"start",i)));break;case"done":i.onDone(()=>n(e&&bO(e,"done",i)));break;case"destroy":i.onDestroy(()=>n(e&&bO(e,"destroy",i)))}}function bO(i,t,e){const s=xO(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 xO(i,t,e,n,r="",s=0,o){return{element:i,triggerName:t,fromState:e,toState:n,phaseName:r,totalTime:s,disabled:!!o}}function na(i,t,e){let n=i.get(t);return n||i.set(t,n=e),n}function b8(i){const t=i.indexOf(":");return[i.substring(1,t),i.slice(t+1)]}let wO=(i,t)=>!1,x8=(i,t,e)=>[],w8=null;function MO(i){const t=i.parentNode||i.host;return t===w8?null:t}(vO()||typeof Element<"u")&&(Ege()?(w8=(()=>document.documentElement)(),wO=(i,t)=>{for(;t;){if(t===i)return!0;t=MO(t)}return!1}):wO=(i,t)=>i.contains(t),x8=(i,t,e)=>{if(e)return Array.from(i.querySelectorAll(t));const n=i.querySelector(t);return n?[n]:[]});let Af=null,M8=!1;const C8=wO,S8=x8;let E8=(()=>{class i{validateStyleProperty(e){return function Dge(i){Af||(Af=function Tge(){return typeof document<"u"?document.body:null}()||{},M8=!!Af.style&&"WebkitAppearance"in Af.style);let t=!0;return Af.style&&!function Age(i){return"ebkit"==i.substring(1,6)}(i)&&(t=i in Af.style,!t&&M8&&(t="Webkit"+i.charAt(0).toUpperCase()+i.slice(1)in Af.style)),t}(e)}matchesElement(e,n){return!1}containsElement(e,n){return C8(e,n)}getParentElement(e){return MO(e)}query(e,n,r){return S8(e,n,r)}computeStyle(e,n,r){return r||""}animate(e,n,r,s,o,a=[],l){return new Qy(r,s)}}return i.\u0275fac=function(e){return new(e||i)},i.\u0275prov=Ie({token:i,factory:i.\u0275fac}),i})(),CO=(()=>{class i{}return i.NOOP=new E8,i})();const Ige=1e3,SO="ng-enter",JS="ng-leave",eE="ng-trigger",tE=".ng-trigger",D8="ng-animating",EO=".ng-animating";function ud(i){if("number"==typeof i)return i;const t=i.match(/^(-?[\.\d]+)(m?s)/);return!t||t.length<2?0:AO(parseFloat(t[1]),t[2])}function AO(i,t){return"s"===t?i*Ige:i}function nE(i,t,e){return i.hasOwnProperty("duration")?i:function kge(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(v8()),{duration:0,delay:0,easing:""};r=AO(parseFloat(a[1]),a[2]);const l=a[3];null!=l&&(s=AO(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 jme(){return new pe(3100,!1)}()),a=!0),s<0&&(t.push(function Yme(){return new pe(3101,!1)}()),a=!0),a&&t.splice(l,0,v8())}return{duration:r,delay:s,easing:o}}(i,t,e)}function Zb(i,t={}){return Object.keys(i).forEach(e=>{t[e]=i[e]}),t}function T8(i){const t=new Map;return Object.keys(i).forEach(e=>{t.set(e,i[e])}),t}function Pu(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 R8(i,t,e){return e?t+":"+e+";":""}function k8(i){let t="";for(let e=0;e{const s=TO(r);e&&!e.has(r)&&e.set(r,i.style[s]),i.style[s]=n}),vO()&&k8(i))}function Df(i,t){i.style&&(t.forEach((e,n)=>{const r=TO(n);i.style[r]=""}),vO()&&k8(i))}function Qb(i){return Array.isArray(i)?1==i.length?i[0]:JU(i):i}const DO=new RegExp("{{\\s*(.+?)\\s*}}","g");function P8(i){let t=[];if("string"==typeof i){let e;for(;e=DO.exec(i);)t.push(e[1]);DO.lastIndex=0}return t}function Jb(i,t,e){const n=i.toString(),r=n.replace(DO,(s,o)=>{let a=t[o];return null==a&&(e.push(function Xme(i){return new pe(3003,!1)}()),a=""),a.toString()});return r==n?i:r}function iE(i){const t=[];let e=i.next();for(;!e.done;)t.push(e.value),e=i.next();return t}const Fge=/-+([a-z0-9])/g;function TO(i){return i.replace(Fge,(...t)=>t[1].toUpperCase())}function Lge(i){return i.replace(/([a-z])([A-Z])/g,"$1-$2").toLowerCase()}function ia(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 Kme(i){return new pe(3004,!1)}()}}function O8(i,t){return window.getComputedStyle(i)[t]}const oE="*";function Hge(i,t){const e=[];return"string"==typeof i?i.split(/\s*,\s*/).forEach(n=>function Gge(i,t,e){if(":"==i[0]){const l=function $ge(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 cge(i){return new pe(3015,!1)}()),t;const r=n[1],s=n[2],o=n[3];t.push(F8(r,o));"<"==s[0]&&!(r==oE&&o==oE)&&t.push(F8(o,r))}(n,e,t)):e.push(i),e}const aE=new Set(["true","1"]),lE=new Set(["false","0"]);function F8(i,t){const e=aE.has(i)||lE.has(i),n=aE.has(t)||lE.has(t);return(r,s)=>{let o=i==oE||i==r,a=t==oE||t==s;return!o&&e&&"boolean"==typeof r&&(o=r?aE.has(i):lE.has(i)),!a&&n&&"boolean"==typeof s&&(a=s?aE.has(t):lE.has(t)),o&&a}}const Wge=new RegExp("s*:selfs*,?","g");function IO(i,t,e,n){return new jge(i).build(t,e,n)}class jge{constructor(t){this._driver=t}build(t,e,n){const r=new Xge(e);return this._resetContextStyleTimingState(r),ia(this,Qb(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 Qme(){return new pe(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(d=>{l.name=d,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 Jme(){return new pe(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=>{P8(l).forEach(c=>{o.hasOwnProperty(c)||s.add(c)})})}),s.size&&(iE(s.values()),e.errors.push(function ege(i,t){return new pe(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=ia(this,Qb(t.animation),e);return{type:1,matchers:Hge(t.expr,e.errors),animation:n,queryCount:e.queryCount,depCount:e.depCount,options:Tf(t.options)}}visitSequence(t,e){return{type:2,steps:t.steps.map(n=>ia(this,n,e)),options:Tf(t.options)}}visitGroup(t,e){const n=e.currentTime;let r=0;const s=t.steps.map(o=>{e.currentTime=n;const a=ia(this,o,e);return r=Math.max(r,e.currentTime),a});return e.currentTime=r,{type:3,steps:s,options:Tf(t.options)}}visitAnimate(t,e){const n=function Zge(i,t){if(i.hasOwnProperty("duration"))return i;if("number"==typeof i)return RO(nE(i,t).duration,0,"");const e=i;if(e.split(/\s+/).some(s=>"{"==s.charAt(0)&&"{"==s.charAt(1))){const s=RO(0,0,"");return s.dynamic=!0,s.strValue=e,s}const r=nE(e,t);return RO(r.duration,r.delay,r.easing)}(t.timings,e.errors);e.currentAnimateTimings=n;let r,s=t.styles?t.styles:si({});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=si(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===Gc?n.push(a):e.errors.push(new pe(3002,!1)):n.push(T8(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),d=c.get(l);let h=!0;d&&(s!=r&&s>=d.startTime&&r<=d.endTime&&(e.errors.push(function nge(i,t,e,n,r){return new pe(3010,!1)}()),h=!1),s=d.startTime),h&&c.set(l,{startTime:s,endTime:r}),e.options&&function Oge(i,t,e){const n=t.params||{},r=P8(i);r.length&&r.forEach(s=>{n.hasOwnProperty(s)||e.push(function qme(i){return new pe(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 ige(){return new pe(3011,!1)}()),n;let s=0;const o=[];let a=!1,l=!1,c=0;const d=t.steps.map(y=>{const M=this._makeStyleAst(y,e);let x=null!=M.offset?M.offset:function Kge(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:ia(this,Qb(t.animation),e),options:Tf(t.options)}}visitAnimateChild(t,e){return e.depCount++,{type:9,options:Tf(t.options)}}visitAnimateRef(t,e){return{type:10,animation:this.visitReference(t.animation,e),options:Tf(t.options)}}visitQuery(t,e){const n=e.currentQuerySelector,r=t.options||{};e.queryCount++,e.currentQuery=t;const[s,o]=function Yge(i){const t=!!i.split(/\s*,\s*/).find(e=>":self"==e);return t&&(i=i.replace(Wge,"")),i=i.replace(/@\*/g,tE).replace(/@\w+/g,e=>tE+"-"+e.slice(1)).replace(/:animating/g,EO),[i,t]}(t.selector);e.currentQuerySelector=n.length?n+" "+s:s,na(e.collectedStyles,e.currentQuerySelector,new Map);const a=ia(this,Qb(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:Tf(t.options)}}visitStagger(t,e){e.currentQuery||e.errors.push(function age(){return new pe(3013,!1)}());const n="full"===t.timings?{duration:0,delay:0,easing:"full"}:nE(t.timings,e.errors,!0);return{type:12,animation:ia(this,Qb(t.animation),e),timings:n,options:null}}}class Xge{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 Tf(i){return i?(i=Zb(i)).params&&(i.params=function qge(i){return i?Zb(i):null}(i.params)):i={},i}function RO(i,t,e){return{duration:i,delay:t,easing:e}}function kO(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 cE{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 e_e=new RegExp(":enter","g"),n_e=new RegExp(":leave","g");function PO(i,t,e,n,r,s=new Map,o=new Map,a,l,c=[]){return(new i_e).buildKeyframes(i,t,e,n,r,s,o,a,l,c)}class i_e{buildKeyframes(t,e,n,r,s,o,a,l,c,d=[]){c=c||new cE;const h=new OO(t,e,c,r,s,d,[]);h.options=l;const p=l.delay?ud(l.delay):0;h.currentTimeline.delayNextStep(p),h.currentTimeline.setStyles([o],null,h.errors,l),ia(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()):[kO(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:ud(Jb(s,r?.params??{},e.errors));n.delayNextStep(o)}}}_visitSubInstructions(t,e,n){let s=e.currentTimeline.currentTime;const o=null!=n.duration?ud(n.duration):null,a=null!=n.delay?ud(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),ia(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=dE);const o=ud(s.delay);r.delayNextStep(o)}t.steps.length&&(t.steps.forEach(o=>ia(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?ud(t.options.delay):0;t.steps.forEach(o=>{const a=e.createSubContext(t.options);s&&a.delayNextStep(s),ia(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 nE(e.params?Jb(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?ud(r.delay):0;s&&(6===e.previousNode.type||0==n&&e.currentTimeline.hasCurrentStyleProperties())&&(e.currentTimeline.snapshotCurrentStyles(),e.previousNode=dE);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,d)=>{e.currentQueryIndex=d;const h=e.createSubContext(t.options,c);s&&h.delayNextStep(s),c===e.element&&(l=h.currentTimeline),ia(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 d=e.currentTimeline;l&&d.delayNextStep(l);const h=d.currentTime;ia(this,t.animation,e),e.previousNode=t,n.currentStaggerTime=r.currentTime-h+(r.startTime-n.currentTimeline.startTime)}}const dE={};class OO{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=dE,this.subContextCount=0,this.options={},this.currentQueryIndex=0,this.currentQueryTotal=0,this.currentStaggerTime=0,this.currentTimeline=l||new uE(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=ud(n.duration)),null!=n.delay&&(r.delay=ud(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]=Jb(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 OO(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=dE,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 r_e(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(e_e,"."+this._enterClassName)).replace(n_e,"."+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 lge(i){return new pe(3014,!1)}()),a}}class uE{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 uE(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||Gc),this._currentKeyframe.set(e,Gc);this._currentEmptyStepKeyframe=this._currentKeyframe}setStyles(t,e,n,r){e&&this._previousKeyframe.set("easing",e);const s=r&&r.params||{},o=function s_e(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,Gc)}else Pu(r,e)}),e}(t,this._globalTimelineStyles);for(let[a,l]of o){const c=Jb(l,s,n);this._pendingStyles.set(a,c),this._localTimelineStyles.has(a)||this._backFill.set(a,this._globalTimelineStyles.get(a)??Gc),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=Pu(a,new Map,this._backFill);c.forEach((d,h)=>{d===eR?t.add(h):d===Gc&&e.add(h)}),n||c.set("offset",l/this.duration),r.push(c)});const s=t.size?iE(t.values()):[],o=e.size?iE(e.values()):[];if(n){const a=r[0],l=new Map(a);a.set("offset",0),l.set("offset",1),r=[a,l]}return kO(this.element,r,s,o,this.duration,this.startTime,this.easing,!1)}}class r_e extends uE{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=Pu(t[0]);l.set("offset",0),s.push(l);const c=Pu(t[0]);c.set("offset",B8(a)),s.push(c);const d=t.length-1;for(let h=1;h<=d;h++){let p=Pu(t[h]);const m=p.get("offset");p.set("offset",B8((e+m*n)/o)),s.push(p)}n=o,e=0,r="",t=s}return kO(this.element,t,this.preStyleProps,this.postStyleProps,n,e,r,!0)}}function B8(i,t=3){const e=Math.pow(10,t-1);return Math.round(i*e)/e}class FO{}const o_e=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 a_e extends FO{normalizePropertyName(t,e){return TO(t)}normalizeStyleValue(t,e,n,r){let s="";const o=n.toString().trim();if(o_e.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 Zme(i,t){return new pe(3005,!1)}())}return o+s}}function U8(i,t,e,n,r,s,o,a,l,c,d,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:d,totalTime:h,errors:p}}const LO={};class V8{constructor(t,e,n){this._triggerName=t,this.ast=e,this._stateStyles=n}match(t,e,n,r){return function l_e(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,d){const h=[],p=this.ast.options&&this.ast.options.params||LO,g=this.buildStyles(n,a&&a.params||LO,h),b=l&&l.params||LO,v=this.buildStyles(r,b,h),y=new Set,M=new Map,x=new Map,C="void"===r,F={params:c_e(b,p),delay:this.ast.options?.delay},D=d?[]:PO(t,e,this.ast.animation,s,o,g,v,F,c,h);let k=0;if(D.forEach(T=>{k=Math.max(T.duration+T.delay,k)}),h.length)return U8(e,this._triggerName,n,r,C,g,v,[],[],M,x,k,h);D.forEach(T=>{const A=T.element,$=na(M,A,new Set);T.preStyleProps.forEach(ne=>$.add(ne));const ie=na(x,A,new Set);T.postStyleProps.forEach(ne=>ie.add(ne)),A!==e&&y.add(A)});const B=iE(y.values());return U8(e,this._triggerName,n,r,C,g,v,D,B,M,x,k)}}function c_e(i,t){const e=Zb(t);for(const n in i)i.hasOwnProperty(n)&&null!=i[n]&&(e[n]=i[n]);return e}class d_e{constructor(t,e,n){this.styles=t,this.defaultParams=e,this.normalizer=n}buildStyles(t,e){const n=new Map,r=Zb(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=Jb(o,r,e));const l=this.normalizer.normalizePropertyName(a,e);o=this.normalizer.normalizeStyleValue(a,l,o,e),n.set(a,o)})}),n}}class h_e{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 d_e(r.style,r.options&&r.options.params||{},n))}),z8(this.states,"true","1"),z8(this.states,"false","0"),e.transitions.forEach(r=>{this.transitionFactories.push(new V8(t,r,this.states))}),this.fallbackTransition=function f_e(i,t,e){return new V8(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 z8(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 p_e=new cE;class m_e{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=IO(this._driver,e,n,r);if(n.length)throw function mge(i){return new pe(3503,!1)}();this._animations.set(t,s)}_buildPlayer(t,e,n){const r=t.element,s=y8(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=PO(this._driver,e,s,SO,JS,new Map,new Map,n,p_e,r),o.forEach(d=>{const h=na(a,d.element,new Map);d.postStyleProps.forEach(p=>h.set(p,null))})):(r.push(function gge(){return new pe(3300,!1)}()),o=[]),r.length)throw function _ge(i){return new pe(3504,!1)}();a.forEach((d,h)=>{d.forEach((p,m)=>{d.set(m,this._driver.computeStyle(h,m,Gc))})});const c=ku(o.map(d=>{const h=a.get(d.element);return this._buildPlayer(d,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 vge(i){return new pe(3301,!1)}();return e}listen(t,e,n,r){const s=xO(e,"","","");return yO(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 H8="ng-animate-queued",NO="ng-animate-disabled",b_e=[],G8={namespaceId:"",setForRemoval:!1,setForMove:!1,hasAnimation:!1,removedBeforeQueried:!1},x_e={namespaceId:"",setForMove:!1,setForRemoval:!1,hasAnimation:!1,removedBeforeQueried:!0},Oa="__ng_removed";class BO{get params(){return this.options.params}constructor(t,e=""){this.namespaceId=e;const n=t&&t.hasOwnProperty("value");if(this.value=function S_e(i){return i??null}(n?t.value:t),n){const s=Zb(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 e0="void",UO=new BO(e0);class w_e{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,Fa(e,this._hostClassName)}listen(t,e,n,r){if(!this._triggers.has(e))throw function yge(i,t){return new pe(3302,!1)}();if(null==n||0==n.length)throw function bge(i){return new pe(3303,!1)}();if(!function E_e(i){return"start"==i||"done"==i}(n))throw function xge(i,t){return new pe(3400,!1)}();const s=na(this._elementListeners,t,[]),o={name:e,phase:n,callback:r};s.push(o);const a=na(this._engine.statesByElement,t,new Map);return a.has(e)||(Fa(t,eE),Fa(t,eE+"-"+e),a.set(e,UO)),()=>{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 wge(i){return new pe(3401,!1)}();return e}trigger(t,e,n,r=!0){const s=this._getTrigger(e),o=new VO(this.id,e,t);let a=this._engine.statesByElement.get(t);a||(Fa(t,eE),Fa(t,eE+"-"+e),this._engine.statesByElement.set(t,a=new Map));let l=a.get(e);const c=new BO(n,this.id);if(!(n&&n.hasOwnProperty("value"))&&l&&c.absorbOptions(l.options),a.set(e,c),l||(l=UO),c.value!==e0&&l.value===c.value){if(!function T_e(i,t){const e=Object.keys(i),n=Object.keys(t);if(e.length!=n.length)return!1;for(let r=0;r{Df(t,v),rc(t,y)})}return}const p=na(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||(Fa(t,H8),o.onStart(()=>{$g(t,H8)})),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,tE,!0);n.forEach(r=>{if(r[Oa])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 d=this.trigger(t,c,e0,r);d&&a.push(d)}}),a.length)return this._engine.markElementAsRemoved(this.id,t,!0,e,o),n&&ku(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)||UO,d=new BO(e0),h=new VO(this.id,o,t);this._engine.totalQueuedPlayers++,this._queue.push({element:t,triggerName:o,transition:l,fromState:c,toState:d,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[Oa];(!s||s===G8)&&(n.afterFlush(()=>this.clearElementCache(t)),n.destroyInnerAnimations(t),n._onRemovalComplete(t,e))}}insertNode(t,e){Fa(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=xO(s,n.triggerName,n.fromState.value,n.toState.value);l._data=t,yO(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 M_e{_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 w_e(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(hE(e)){const s=this._fetchNamespace(t);if(s)return s.trigger(e,n,r),!0}return!1}insertNode(t,e,n,r){if(!hE(e))return;const s=e[Oa];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),Fa(t,NO)):this.disabledNodes.has(t)&&(this.disabledNodes.delete(t),$g(t,NO))}removeNode(t,e,n,r){if(hE(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[Oa]={namespaceId:t,setForRemoval:r,hasAnimation:n,removedBeforeQueried:!1,previousTriggersValues:s}}listen(t,e,n,r,s){return hE(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,tE,!0);e.forEach(n=>this.destroyActiveAnimationsForElement(n)),0!=this.playersByQueriedElement.size&&(e=this.driver.query(t,EO,!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 ku(this.players).onDone(()=>t());t()})}processLeaveNode(t){const e=t[Oa];if(e&&e.setForRemoval){if(t[Oa]=G8,e.namespaceId){this.destroyInnerAnimations(t);const n=this._fetchNamespace(e.namespaceId);n&&n.clearElementCache(t)}this._onRemovalComplete(t,e.setForRemoval)}t.classList?.contains(NO)&&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?ku(e).onDone(()=>{n.forEach(r=>r())}):n.forEach(r=>r())}}reportError(t){throw function Mge(i){return new pe(3402,!1)}()}_flushAnimations(t,e){const n=new cE,r=[],s=new Map,o=[],a=new Map,l=new Map,c=new Map,d=new Set;this.disabledNodes.forEach(q=>{d.add(q);const re=this.driver.query(q,".ng-animate-queued",!0);for(let J=0;J{const J=SO+b++;g.set(re,J),q.forEach(we=>Fa(we,J))});const v=[],y=new Set,M=new Set;for(let q=0;qy.add(we)):M.add(re))}const x=new Map,C=j8(p,Array.from(y));C.forEach((q,re)=>{const J=JS+b++;x.set(re,J),q.forEach(we=>Fa(we,J))}),t.push(()=>{m.forEach((q,re)=>{const J=g.get(re);q.forEach(we=>$g(we,J))}),C.forEach((q,re)=>{const J=x.get(re);q.forEach(we=>$g(we,J))}),v.forEach(q=>{this.processLeaveNode(q)})});const F=[],D=[];for(let q=this._namespaceList.length-1;q>=0;q--)this._namespaceList[q].drainQueuedTransitions(e).forEach(J=>{const we=J.player,Be=J.element;if(F.push(we),this.collectedEnterElements.length){const Pe=Be[Oa];if(Pe&&Pe.setForMove){if(Pe.previousTriggersValues&&Pe.previousTriggersValues.has(J.triggerName)){const yt=Pe.previousTriggersValues.get(J.triggerName),Ct=this.statesByElement.get(J.element);if(Ct&&Ct.has(J.triggerName)){const Mt=Ct.get(J.triggerName);Mt.value=yt,Ct.set(J.triggerName,Mt)}}return void we.destroy()}}const Ye=!h||!this.driver.containsElement(h,Be),Et=x.get(Be),en=g.get(Be),ae=this._buildInstruction(J,n,en,Et,Ye);if(ae.errors&&ae.errors.length)return void D.push(ae);if(Ye)return we.onStart(()=>Df(Be,ae.fromStyles)),we.onDestroy(()=>rc(Be,ae.toStyles)),void r.push(we);if(J.isFallbackTransition)return we.onStart(()=>Df(Be,ae.fromStyles)),we.onDestroy(()=>rc(Be,ae.toStyles)),void r.push(we);const ke=[];ae.timelines.forEach(Pe=>{Pe.stretchStartingKeyframe=!0,this.disabledNodes.has(Pe.element)||ke.push(Pe)}),ae.timelines=ke,n.append(Be,ae.timelines),o.push({instruction:ae,player:we,element:Be}),ae.queriedElements.forEach(Pe=>na(a,Pe,[]).push(we)),ae.preStyleProps.forEach((Pe,yt)=>{if(Pe.size){let Ct=l.get(yt);Ct||l.set(yt,Ct=new Set),Pe.forEach((Mt,Cn)=>Ct.add(Cn))}}),ae.postStyleProps.forEach((Pe,yt)=>{let Ct=c.get(yt);Ct||c.set(yt,Ct=new Set),Pe.forEach((Mt,Cn)=>Ct.add(Cn))})});if(D.length){const q=[];D.forEach(re=>{q.push(function Cge(i,t){return new pe(3505,!1)}())}),F.forEach(re=>re.destroy()),this.reportError(q)}const k=new Map,B=new Map;o.forEach(q=>{const re=q.element;n.has(re)&&(B.set(re,re),this._beforeAnimationBuild(q.player.namespaceId,q.instruction,k))}),r.forEach(q=>{const re=q.element;this._getPreviousPlayers(re,!1,q.namespaceId,q.triggerName,null).forEach(we=>{na(k,re,[]).push(we),we.destroy()})});const T=v.filter(q=>q8(q,l,c)),A=new Map;W8(A,this.driver,M,c,Gc).forEach(q=>{q8(q,l,c)&&T.push(q)});const ie=new Map;m.forEach((q,re)=>{W8(ie,this.driver,new Set(q),l,eR)}),T.forEach(q=>{const re=A.get(q),J=ie.get(q);A.set(q,new Map([...Array.from(re?.entries()??[]),...Array.from(J?.entries()??[])]))});const ne=[],se=[],ge={};o.forEach(q=>{const{element:re,player:J,instruction:we}=q;if(n.has(re)){if(d.has(re))return J.onDestroy(()=>rc(re,we.toStyles)),J.disabled=!0,J.overrideTotalTime(we.totalTime),void r.push(J);let Be=ge;if(B.size>1){let Et=re;const en=[];for(;Et=Et.parentNode;){const ae=B.get(Et);if(ae){Be=ae;break}en.push(Et)}en.forEach(ae=>B.set(ae,Be))}const Ye=this._buildAnimation(J.namespaceId,we,k,s,ie,A);if(J.setRealPlayer(Ye),Be===ge)ne.push(J);else{const Et=this.playersByElement.get(Be);Et&&Et.length&&(J.parentPlayer=ku(Et)),r.push(J)}}else Df(re,we.fromStyles),J.onDestroy(()=>rc(re,we.toStyles)),se.push(J),d.has(re)&&r.push(J)}),se.forEach(q=>{const re=s.get(q.element);if(re&&re.length){const J=ku(re);q.setRealPlayer(J)}}),r.forEach(q=>{q.parentPlayer?q.syncPlayerEvents(q.parentPlayer):q.destroy()});for(let q=0;q!Ye.destroyed);Be.length?A_e(this,re,Be):this.processLeaveNode(re)}return v.length=0,ne.forEach(q=>{this.players.push(q),q.onDone(()=>{q.destroy();const re=this.players.indexOf(q);this.players.splice(re,1)}),q.play()}),ne}elementContainsData(t,e){let n=!1;const r=e[Oa];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==e0;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,d=c!==s,h=na(n,c,[]);this._getPreviousPlayers(c,d,o,a,e.toState).forEach(m=>{const g=m.getRealPlayer();g.beforeDestroy&&g.beforeDestroy(),m.destroy(),h.push(m)})}Df(s,e.fromStyles)}_buildAnimation(t,e,n,r,s,o){const a=e.triggerName,l=e.element,c=[],d=new Set,h=new Set,p=e.timelines.map(g=>{const b=g.element;d.add(b);const v=b[Oa];if(v&&v.removedBeforeQueried)return new Qy(g.duration,g.delay);const y=b!==l,M=function D_e(i){const t=[];return Y8(i,t),t}((n.get(b)||b_e).map(k=>k.getRealPlayer())).filter(k=>!!k.element&&k.element===b),x=s.get(b),C=o.get(b),F=y8(0,this._normalizer,0,g.keyframes,x,C),D=this._buildPlayer(g,F,M);if(g.subTimeline&&r&&h.add(b),y){const k=new VO(t,a,b);k.setRealPlayer(D),c.push(k)}return D});c.forEach(g=>{na(this.playersByQueriedElement,g.element,[]).push(g),g.onDone(()=>function C_e(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))}),d.forEach(g=>Fa(g,D8));const m=ku(p);return m.onDestroy(()=>{d.forEach(g=>$g(g,D8)),rc(l,e.toStyles)}),h.forEach(g=>{na(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 Qy(t.duration,t.delay)}}class VO{constructor(t,e,n){this.namespaceId=t,this.triggerName=e,this.element=n,this._player=new Qy,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=>yO(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){na(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 hE(i){return i&&1===i.nodeType}function $8(i,t){const e=i.style.display;return i.style.display=t??"none",e}function W8(i,t,e,n,r){const s=[];e.forEach(l=>s.push($8(l)));const o=[];n.forEach((l,c)=>{const d=new Map;l.forEach(h=>{const p=t.computeStyle(c,h,r);d.set(h,p),(!p||0==p.length)&&(c[Oa]=x_e,o.push(c))}),i.set(c,d)});let a=0;return e.forEach(l=>$8(l,s[a++])),o}function j8(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 Fa(i,t){i.classList?.add(t)}function $g(i,t){i.classList?.remove(t)}function A_e(i,t,e){ku(e).onDone(()=>i.processLeaveNode(t))}function Y8(i,t){for(let e=0;er.add(s)):t.set(i,n),e.delete(i),!0}class fE{constructor(t,e,n){this.bodyNode=t,this._driver=e,this._normalizer=n,this._triggerCache={},this.onRemovalComplete=(r,s)=>{},this._transitionEngine=new M_e(t,e,n),this._timelineEngine=new m_e(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=[],d=IO(this._driver,s,l,c);if(l.length)throw function fge(i,t){return new pe(3404,!1)}();a=function u_e(i,t,e){return new h_e(i,t,e)}(r,d,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]=b8(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]=b8(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 R_e=(()=>{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&&rc(this._element,this._startStyles,this._initialStyles),this._state=1)}finish(){this.start(),this._state<2&&(rc(this._element,this._initialStyles),this._endStyles&&(rc(this._element,this._endStyles),this._endStyles=null),this._state=1)}destroy(){this.finish(),this._state<3&&(i.initialStylesByElement.delete(this._element),this._startStyles&&(Df(this._element,this._startStyles),this._endStyles=null),this._endStyles&&(Df(this._element,this._endStyles),this._endStyles=null),rc(this._element,this._initialStyles),this._state=3)}}return i.initialStylesByElement=new WeakMap,i})();function zO(i){let t=null;return i.forEach((e,n)=>{(function k_e(i){return"display"===i||"position"===i})(n)&&(t=t||new Map,t.set(n,e))}),t}class X8{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:O8(this.element,r))}),this.currentSnapshot=t}triggerCallback(t){const e="start"===t?this._onStartFns:this._onDoneFns;e.forEach(n=>n()),e.length=0}}class P_e{validateStyleProperty(t){return!0}validateAnimatableStyleProperty(t){return!0}matchesElement(t,e){return!1}containsElement(t,e){return C8(t,e)}getParentElement(t){return MO(t)}query(t,e,n){return S8(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,d=o.filter(m=>m instanceof X8);(function Nge(i,t){return 0===i||0===t})(n,r)&&d.forEach(m=>{m.currentSnapshot.forEach((g,b)=>c.set(b,g))});let h=function Pge(i){return i.length?i[0]instanceof Map?i:i.map(t=>T8(t)):[]}(e).map(m=>Pu(m));h=function Bge(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,O8(i,a)))}}return t}(t,h,c);const p=function I_e(i,t){let e=null,n=null;return Array.isArray(t)&&t.length?(e=zO(t[0]),t.length>1&&(n=zO(t[t.length-1]))):t instanceof Map&&(e=zO(t)),e||n?new R_e(i,e,n):null}(t,h);return new X8(t,h,l,p)}}let O_e=(()=>{class i extends ZU{constructor(e,n){super(),this._nextAnimationId=0,this._renderer=e.createRenderer(n.body,{id:"0",encapsulation:Ys.None,styles:[],data:{animation:[]}})}build(e){const n=this._nextAnimationId.toString();this._nextAnimationId++;const r=Array.isArray(e)?JU(e):e;return K8(this._renderer,null,n,"register",[r]),new F_e(n,this._renderer)}}return i.\u0275fac=function(e){return new(e||i)(ee(Fl),ee(Wt))},i.\u0275prov=Ie({token:i,factory:i.\u0275fac}),i})();class F_e extends RQ{constructor(t,e){super(),this._id=t,this._renderer=e}create(t,e){return new L_e(this._id,t,e||{},this._renderer)}}class L_e{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 K8(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 K8(i,t,e,n,r){return i.setProperty(t,`@@${e}:${n}`,r)}const Z8="@.disabled";let N_e=(()=>{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 d=this._rendererCache.get(s);return d||(d=new Q8("",s,this.engine,()=>this._rendererCache.delete(s)),this._rendererCache.set(s,d)),d}const o=n.id,a=n.id+"-"+this._currentId;this._currentId++,this.engine.register(a,e);const l=d=>{Array.isArray(d)?d.forEach(l):this.engine.registerTrigger(o,a,e,d.name,d)};return n.data.animation.forEach(l),new B_e(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)(ee(Fl),ee(fE),ee(ht))},i.\u0275prov=Ie({token:i,factory:i.\u0275fac}),i})();class Q8{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==Z8?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 B_e extends Q8{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==Z8?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 U_e(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 V_e(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 J8=[{provide:ZU,useClass:O_e},{provide:FO,useFactory:function H_e(){return new a_e}},{provide:fE,useClass:(()=>{class i extends fE{constructor(e,n,r,s){super(e.body,n,r)}ngOnDestroy(){this.flush()}}return i.\u0275fac=function(e){return new(e||i)(ee(Wt),ee(CO),ee(FO),ee(lm))},i.\u0275prov=Ie({token:i,factory:i.\u0275fac}),i})()},{provide:Fl,useFactory:function G_e(i,t,e){return new N_e(i,t,e)},deps:[nM,fE,ht]}],HO=[{provide:CO,useFactory:()=>new P_e},{provide:kr,useValue:"BrowserAnimations"},...J8],e$=[{provide:CO,useClass:E8},{provide:kr,useValue:"NoopAnimations"},...J8];let $_e=(()=>{class i{static withConfig(e){return{ngModule:i,providers:e.disableAnimations?e$:HO}}}return i.\u0275fac=function(e){return new(e||i)},i.\u0275mod=nn({type:i}),i.\u0275inj=Xt({providers:HO,imports:[RB]}),i})();const t$=new me("CdkAccordion");let W_e=0,j_e=(()=>{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=Zt.EMPTY,this.closed=new $e,this.opened=new $e,this.destroyed=new $e,this.expandedChange=new $e,this.id="cdk-accordion-child-"+W_e++,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)(E(t$,12),E(ri),E(UR))},i.\u0275dir=ve({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:t$,useValue:void 0}])]}),i})(),Y_e=(()=>{class i{}return i.\u0275fac=function(e){return new(e||i)},i.\u0275mod=nn({type:i}),i.\u0275inj=Xt({}),i})();const q_e=["body"];function X_e(i,t){}const K_e=[[["mat-expansion-panel-header"]],"*",[["mat-action-row"]]],Z_e=["mat-expansion-panel-header","*","mat-action-row"];function Q_e(i,t){1&i&&Oe(0,"span",2),2&i&&U("@indicatorRotate",he()._getExpandedState())}const J_e=[[["mat-panel-title"]],[["mat-panel-description"]],"*"],eve=["mat-panel-title","mat-panel-description","*"],n$=new me("MAT_ACCORDION"),i$="225ms cubic-bezier(0.4,0.0,0.2,1)",r$={indicatorRotate:Da("indicatorRotate",[Ps("collapsed, void",si({transform:"rotate(0deg)"})),Ps("expanded",si({transform:"rotate(180deg)"})),Or("expanded <=> collapsed, void => collapsed",Yr(i$))]),bodyExpansion:Da("bodyExpansion",[Ps("collapsed, void",si({height:"0px",visibility:"hidden"})),Ps("expanded",si({height:"*",visibility:"visible"})),Or("expanded <=> collapsed, void => collapsed",Yr(i$))])},s$=new me("MAT_EXPANSION_PANEL");let tve=(()=>{class i{constructor(e,n){this._template=e,this._expansionPanel=n}}return i.\u0275fac=function(e){return new(e||i)(E(wo),E(s$,8))},i.\u0275dir=ve({type:i,selectors:[["ng-template","matExpansionPanelContent",""]]}),i})(),nve=0;const o$=new me("MAT_EXPANSION_PANEL_DEFAULT_OPTIONS");let a$=(()=>{class i extends j_e{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 $e,this.afterCollapse=new $e,this._inputChanges=new Re,this._headerId="mat-expansion-panel-header-"+nve++,this._bodyAnimationDone=new Re,this.accordion=e,this._document=o,this._bodyAnimationDone.pipe(zc((c,d)=>c.fromState===d.fromState&&c.toState===d.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(Eo(null),vn(()=>this.expanded&&!this._portal),Oi(1)).subscribe(()=>{this._portal=new Cm(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)(E(n$,12),E(ri),E(UR),E(jr),E(Wt),E(kr,8),E(o$,8))},i.\u0275cmp=ot({type:i,selectors:[["mat-expansion-panel"]],contentQueries:function(e,n,r){if(1&e&&Wi(r,tve,5),2&e){let s;Tt(s=It())&&(n._lazyContent=s.first)}},viewQuery:function(e,n){if(1&e&&ii(q_e,5),2&e){let r;Tt(r=It())&&(n._body=r.first)}},hostAttrs:[1,"mat-expansion-panel"],hostVars:6,hostBindings:function(e,n){2&e&&un("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:n$,useValue:void 0},{provide:s$,useExisting:i}]),at,bi],ngContentSelectors:Z_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&&(rr(K_e),$t(0),W(1,"div",0,1),Ne("@bodyExpansion.done",function(s){return n._bodyAnimationDone.next(s)}),W(3,"div",2),$t(4,1),fe(5,X_e,0,0,"ng-template",3),Y(),$t(6,2),Y()),2&e&&(G(1),U("@bodyExpansion",n._getExpandedState())("id",n.id),St("aria-labelledby",n._headerId),G(4),U("cdkPortalOutlet",n._portal))},dependencies:[Sm],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:[r$.bodyExpansion]},changeDetection:0}),i})();class ive{}const rve=XI(ive);let sve=(()=>{class i extends rve{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=Zt.EMPTY;const c=e.accordion?e.accordion._stateChanges.pipe(vn(d=>!(!d.hideToggle&&!d.togglePosition))):fo;this.tabIndex=parseInt(l||"")||0,this._parentChangeSubscription=Cr(e.opened,e.closed,c,e._inputChanges.pipe(vn(d=>!!(d.hideToggle||d.disabled||d.togglePosition)))).subscribe(()=>this._changeDetectorRef.markForCheck()),e.closed.pipe(vn(()=>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:Yo(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)(E(a$,1),E(pt),E(Hc),E(ri),E(o$,8),E(kr,8),_a("tabindex"))},i.\u0275cmp=ot({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&&Ne("click",function(){return n._toggle()})("keydown",function(s){return n._keydown(s)}),2&e&&(St("id",n.panel._headerId)("tabindex",n.tabIndex)("aria-controls",n._getPanelId())("aria-expanded",n._isExpanded())("aria-disabled",n.panel.disabled),$o("height",n._getHeaderHeight()),un("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:[at],ngContentSelectors:eve,decls:5,vars:3,consts:[[1,"mat-content"],["class","mat-expansion-indicator",4,"ngIf"],[1,"mat-expansion-indicator"]],template:function(e,n){1&e&&(rr(J_e),W(0,"span",0),$t(1),$t(2,1),$t(3,2),Y(),fe(4,Q_e,1,1,"span",1)),2&e&&(un("mat-content-hide-toggle",!n._showToggle()),G(4),U("ngIf",n._showToggle()))},dependencies:[Mi],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:[r$.indicatorRotate]},changeDetection:0}),i})(),ove=(()=>{class i{}return i.\u0275fac=function(e){return new(e||i)},i.\u0275dir=ve({type:i,selectors:[["mat-panel-description"]],hostAttrs:[1,"mat-expansion-panel-header-description"]}),i})(),ave=(()=>{class i{}return i.\u0275fac=function(e){return new(e||i)},i.\u0275dir=ve({type:i,selectors:[["mat-panel-title"]],hostAttrs:[1,"mat-expansion-panel-header-title"]}),i})(),lve=(()=>{class i{}return i.\u0275fac=function(e){return new(e||i)},i.\u0275mod=nn({type:i}),i.\u0275inj=Xt({imports:[So,Kn,Y_e,kh]}),i})();function cve(i,t){if(1&i&&(W(0,"mat-option",19),Ge(1),Y()),2&i){const e=t.$implicit;U("value",e),G(1),Xi(" ",e," ")}}function dve(i,t){if(1&i){const e=di();W(0,"mat-form-field",16)(1,"mat-select",17),Ne("selectionChange",function(r){return an(e),Ut(he(2)._changePageSize(r.value))}),fe(2,cve,2,2,"mat-option",18),Y()()}if(2&i){const e=he(2);U("appearance",e._formFieldAppearance)("color",e.color),G(1),U("value",e.pageSize)("disabled",e.disabled)("aria-labelledby",e._pageSizeLabelId)("panelClass",e.selectConfig.panelClass||"")("disableOptionCentering",e.selectConfig.disableOptionCentering),G(1),U("ngForOf",e._displayedPageSizeOptions)}}function uve(i,t){if(1&i&&(W(0,"div",20),Ge(1),Y()),2&i){const e=he(2);G(1),_i(e.pageSize)}}function hve(i,t){if(1&i&&(W(0,"div",12)(1,"div",13),Ge(2),Y(),fe(3,dve,3,8,"mat-form-field",14),fe(4,uve,2,1,"div",15),Y()),2&i){const e=he();G(1),O1("id",e._pageSizeLabelId),G(1),Xi(" ",e._intl.itemsPerPageLabel," "),G(1),U("ngIf",e._displayedPageSizeOptions.length>1),G(1),U("ngIf",e._displayedPageSizeOptions.length<=1)}}function fve(i,t){if(1&i){const e=di();W(0,"button",21),Ne("click",function(){return an(e),Ut(he().firstPage())}),ki(),W(1,"svg",7),Oe(2,"path",22),Y()()}if(2&i){const e=he();U("matTooltip",e._intl.firstPageLabel)("matTooltipDisabled",e._previousButtonsDisabled())("matTooltipPosition","above")("disabled",e._previousButtonsDisabled()),St("aria-label",e._intl.firstPageLabel)}}function pve(i,t){if(1&i){const e=di();ki(),pa(),W(0,"button",23),Ne("click",function(){return an(e),Ut(he().lastPage())}),ki(),W(1,"svg",7),Oe(2,"path",24),Y()()}if(2&i){const e=he();U("matTooltip",e._intl.lastPageLabel)("matTooltipDisabled",e._nextButtonsDisabled())("matTooltipPosition","above")("disabled",e._nextButtonsDisabled()),St("aria-label",e._intl.lastPageLabel)}}let mE=(()=>{class i{constructor(){this.changes=new Re,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 gve={provide:mE,deps:[[new Ss,new ya,mE]],useFactory:function mve(i){return i||new mE}},vve=new me("MAT_PAGINATOR_DEFAULT_OPTIONS"),yve=zM(yQ(class{}));let bve=(()=>{class i extends yve{get pageIndex(){return this._pageIndex}set pageIndex(e){this._pageIndex=Math.max(ks(e),0),this._changeDetectorRef.markForCheck()}get length(){return this._length}set length(e){this._length=ks(e),this._changeDetectorRef.markForCheck()}get pageSize(){return this._pageSize}set pageSize(e){this._pageSize=Math.max(ks(e),0),this._updateDisplayedPageSizeOptions()}get pageSizeOptions(){return this._pageSizeOptions}set pageSizeOptions(e){this._pageSizeOptions=(e||[]).map(n=>ks(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 $e,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){bo()},i.\u0275dir=ve({type:i,inputs:{color:"color",pageIndex:"pageIndex",length:"length",pageSize:"pageSize",pageSizeOptions:"pageSizeOptions",hidePageSize:"hidePageSize",showFirstLastButtons:"showFirstLastButtons",selectConfig:"selectConfig"},outputs:{page:"page"},features:[at]}),i})(),xve=0,wve=(()=>{class i extends bve{constructor(e,n,r){super(e,n,r),this._pageSizeLabelId="mat-paginator-page-size-label-"+xve++,this._formFieldAppearance=r?.formFieldAppearance||"outline"}}return i.\u0275fac=function(e){return new(e||i)(E(mE),E(ri),E(vve,8))},i.\u0275cmp=ot({type:i,selectors:[["mat-paginator"]],hostAttrs:["role","group",1,"mat-mdc-paginator"],inputs:{disabled:"disabled"},exportAs:["matPaginator"],features:[at],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&&(W(0,"div",0)(1,"div",1),fe(2,hve,5,4,"div",2),W(3,"div",3)(4,"div",4),Ge(5),Y(),fe(6,fve,3,5,"button",5),W(7,"button",6),Ne("click",function(){return n.previousPage()}),ki(),W(8,"svg",7),Oe(9,"path",8),Y()(),pa(),W(10,"button",9),Ne("click",function(){return n.nextPage()}),ki(),W(11,"svg",7),Oe(12,"path",10),Y()(),fe(13,pve,3,5,"button",11),Y()()()),2&e&&(G(2),U("ngIf",!n.hidePageSize),G(3),Xi(" ",n._intl.getRangeLabel(n.pageIndex,n.pageSize,n.length)," "),G(1),U("ngIf",n.showFirstLastButtons),G(1),U("matTooltip",n._intl.previousPageLabel)("matTooltipDisabled",n._previousButtonsDisabled())("matTooltipPosition","above")("disabled",n._previousButtonsDisabled()),St("aria-label",n._intl.previousPageLabel),G(3),U("matTooltip",n._intl.nextPageLabel)("matTooltipDisabled",n._nextButtonsDisabled())("matTooltipPosition","above")("disabled",n._nextButtonsDisabled()),St("aria-label",n._intl.nextPageLabel),G(3),U("ngIf",n.showFirstLastButtons))},dependencies:[Co,Mi,WM,ql,cb,Fm,Os],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})(),Mve=(()=>{class i{}return i.\u0275fac=function(e){return new(e||i)},i.\u0275mod=nn({type:i}),i.\u0275inj=Xt({providers:[gve],imports:[So,jM,LH,RV]}),i})(),Cve=(()=>{class i{}return i.\u0275fac=function(e){return new(e||i)},i.\u0275mod=nn({type:i,bootstrap:[Wme]}),i.\u0275inj=Xt({providers:[$c,PH,{provide:TH,useValue:Fie}],imports:[RB,_K,$_e,Kz,bJ,hC,dH,lve,CV,AV,RV,jM,KV,Mve,ese,fH,LH,fV,vpe,bme,Zz,ZI,Hie]}),i})();Ku(Wc,[Co,Mi,Os,Kb,QS],[zl]),Ku(NR,[dm,Co,Mi,vy,jc,fu,ql,a$,sve,ave,ove,Os,wve,cb,Fm,Kb],[]),Ku(_C,[Co,Mi,yC,vC,hH,Kb],[]),Ku(h8,[Co,Mi,qo,Os,cb,Fm,Kb,QS],[zl]),R7().bootstrapModule(Cve).catch(i=>console.error(i))},489:function(Oo,zs,ps){var cn;Oo=ps.nmd(Oo),function(){var V,Kr=200,Un="Expected a function",Na="__lodash_hash_undefined__",Ci="__lodash_placeholder__",Si=1,ms=2,Gs=4,$s=1,Fo=2,Pn=1,cr=2,oc=4,oa=8,bl=16,aa=32,xl=64,Ba=128,la=256,fd=512,yE=800,Yg=16,Tn=1/0,Va=9007199254740991,xE=17976931348623157e292,Rf=NaN,ca=4294967295,Re=ca-1,n0=ca>>>1,r0=[["ary",Ba],["bind",Pn],["bindKey",cr],["curry",oa],["curryRight",bl],["flip",fd],["partial",aa],["partialRight",xl],["rearg",la]],Jn="[object Arguments]",jn="[object Array]",wE="[object AsyncFunction]",et="[object Boolean]",ac="[object Date]",ME="[object DOMException]",pd="[object Error]",kf="[object Function]",s0="[object GeneratorFunction]",Lo="[object Map]",Fu="[object Number]",CE="[object Null]",za="[object Object]",o0="[object Promise]",SE="[object Proxy]",md="[object RegExp]",No="[object Set]",lc="[object String]",Pf="[object Symbol]",qg="[object Undefined]",gd="[object WeakMap]",Lu="[object ArrayBuffer]",_d="[object DataView]",da="[object Float32Array]",Of="[object Float64Array]",Xg="[object Int8Array]",Ff="[object Int16Array]",Kg="[object Int32Array]",Zg="[object Uint8Array]",Nu="[object Uint8ClampedArray]",Qg="[object Uint16Array]",Jg="[object Uint32Array]",AE=/\b__p \+= '';/g,DE=/\b(__p \+=) '' \+/g,TE=/(__e\(.*?\)|\b__t\)) \+\n'';/g,a0=/&(?:amp|lt|gt|quot|#39);/g,l0=/[&<>"']/g,IE=RegExp(a0.source),RE=RegExp(l0.source),YO=/<%-([\s\S]+?)%>/g,e_=/<%([\s\S]+?)%>/g,t_=/<%=([\s\S]+?)%>/g,c0=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,d0=/^\w*$/,u0=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,n_=/[\\^$.*+?()[\]{}|]/g,h0=RegExp(n_.source),Lf=/^\s+/,f0=/\s/,p0=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,Mr=/\{\n\/\* \[wrapped with (.+)\] \*/,kE=/,? & /,PE=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,OE=/[()=,{}\[\]\/\s]/,FE=/\\(\\)?/g,m0=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,g0=/\w*$/,LE=/^[-+]0x[0-9a-f]+$/i,Ha=/^0b[01]+$/i,NE=/^\[object .+?Constructor\]$/,tr=/^0o[0-7]+$/i,vd=/^(?:0|[1-9]\d*)$/,fo=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,i_=/($^)/,BE=/['\n\r\u2028\u2029\\]/g,Bu="\\ud800-\\udfff",v0="\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff",s_="\\u2700-\\u27bf",o_="a-z\\xdf-\\xf6\\xf8-\\xff",a_="A-Z\\xc0-\\xd6\\xd8-\\xde",y0="\\ufe0e\\ufe0f",b0="\\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",Cr="["+Bu+"]",Nf="["+b0+"]",yd="["+v0+"]",li="\\d+",l_="["+s_+"]",pi="["+o_+"]",Bf="[^"+Bu+b0+li+s_+o_+a_+"]",c_="\\ud83c[\\udffb-\\udfff]",Rt="[^"+Bu+"]",Vu="(?:\\ud83c[\\udde6-\\uddff]){2}",zu="[\\ud800-\\udbff][\\udc00-\\udfff]",Hu="["+a_+"]",pe="(?:"+pi+"|"+Bf+")",Uf="(?:"+Hu+"|"+Bf+")",Qt="(?:['\u2019](?:d|ll|m|re|s|t|ve))?",Yn="(?:['\u2019](?:D|LL|M|RE|S|T|VE))?",x0="(?:"+yd+"|"+c_+")?",GE="["+y0+"]?",WE=GE+x0+"(?:\\u200d(?:"+[Rt,Vu,zu].join("|")+")"+GE+x0+")*",jE="(?:"+[l_,Vu,zu].join("|")+")"+WE,qO="(?:"+[Rt+yd+"?",yd,Vu,zu,Cr].join("|")+")",wl=RegExp("['\u2019]","g"),XO=RegExp(yd,"g"),w0=RegExp(c_+"(?="+c_+")|"+qO+WE,"g"),KO=RegExp([Hu+"?"+pi+"+"+Qt+"(?="+[Nf,Hu,"$"].join("|")+")",Uf+"+"+Yn+"(?="+[Nf,Hu+pe,"$"].join("|")+")",Hu+"?"+pe+"+"+Qt,Hu+"+"+Yn,"\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])","\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",li,jE].join("|"),"g"),ZO=RegExp("[\\u200d"+Bu+v0+y0+"]"),YE=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,QO=["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"],qE=-1,Ei={};Ei[da]=Ei[Of]=Ei[Xg]=Ei[Ff]=Ei[Kg]=Ei[Zg]=Ei[Nu]=Ei[Qg]=Ei[Jg]=!0,Ei[Jn]=Ei[jn]=Ei[Lu]=Ei[et]=Ei[_d]=Ei[ac]=Ei[pd]=Ei[kf]=Ei[Lo]=Ei[Fu]=Ei[za]=Ei[md]=Ei[No]=Ei[lc]=Ei[gd]=!1;var Sn={};Sn[Jn]=Sn[jn]=Sn[Lu]=Sn[_d]=Sn[et]=Sn[ac]=Sn[da]=Sn[Of]=Sn[Xg]=Sn[Ff]=Sn[Kg]=Sn[Lo]=Sn[Fu]=Sn[za]=Sn[md]=Sn[No]=Sn[lc]=Sn[Pf]=Sn[Zg]=Sn[Nu]=Sn[Qg]=Sn[Jg]=!0,Sn[pd]=Sn[kf]=Sn[gd]=!1;var tF={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},Ie=parseFloat,nF=parseInt,Xt="object"==typeof global&&global&&global.Object===Object&&global,zf="object"==typeof self&&self&&self.Object===Object&&self,Sr=Xt||zf||Function("return this")(),d_=zs&&!zs.nodeType&&zs,$u=d_&&Oo&&!Oo.nodeType&&Oo,u_=$u&&$u.exports===d_,bd=u_&&Xt.process,gs=function(){try{return $u&&$u.require&&$u.require("util").types||bd&&bd.binding&&bd.binding("util")}catch{}}(),h_=gs&&gs.isArrayBuffer,M0=gs&&gs.isDate,kt=gs&&gs.isMap,Hf=gs&&gs.isRegExp,C0=gs&&gs.isSet,js=gs&&gs.isTypedArray;function _s(X,ue,oe){switch(oe.length){case 0:return X.call(ue);case 1:return X.call(ue,oe[0]);case 2:return X.call(ue,oe[0],oe[1]);case 3:return X.call(ue,oe[0],oe[1],oe[2])}return X.apply(ue,oe)}function iF(X,ue,oe,Ue){for(var Gt=-1,Vn=null==X?0:X.length;++Gt-1}function Wu(X,ue,oe){for(var Ue=-1,Gt=null==X?0:X.length;++Ue-1;);return oe}function ua(X,ue){for(var oe=X.length;oe--&&Pt(ue,X[oe],0)>-1;);return oe}var QE=m_({\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"}),ot=m_({"&":"&","<":"<",">":">",'"':""","'":"'"});function Ku(X){return"\\"+tF[X]}function Md(X){return ZO.test(X)}function jf(X){var ue=-1,oe=Array(X.size);return X.forEach(function(Ue,Gt){oe[++ue]=[Gt,Ue]}),oe}function ve(X,ue){return function(oe){return X(ue(oe))}}function Gi(X,ue){for(var oe=-1,Ue=X.length,Gt=0,Vn=[];++oe",""":'"',"'":"'"}),ys=function X(ue){var u,oe=(ue=null==ue?Sr:ys.defaults(Sr.Object(),ue,ys.pick(Sr,QO))).Array,Ue=ue.Date,Gt=ue.Error,Vn=ue.Function,_t=ue.Math,oi=ue.Object,uc=ue.RegExp,E0=ue.String,Er=ue.TypeError,nr=oe.prototype,Bo=oi.prototype,qs=ue["__core-js_shared__"],Sl=Vn.prototype.toString,ti=Bo.hasOwnProperty,yi=0,tA=(u=/[^.]+$/.exec(qs&&qs.keys&&qs.keys.IE_PROTO||""))?"Symbol(src)_1."+u:"",Sd=Bo.toString,A0=Sl.call(oi),qf=Sr._,Xf=uc("^"+Sl.call(ti).replace(n_,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),ja=u_?ue.Buffer:V,Ui=ue.Symbol,v_=ue.Uint8Array,bs=ja?ja.allocUnsafe:V,xs=ve(oi.getPrototypeOf,oi),Kf=oi.create,Ed=Bo.propertyIsEnumerable,hc=nr.splice,go=Ui?Ui.isConcatSpreadable:V,Qu=Ui?Ui.iterator:V,Ad=Ui?Ui.toStringTag:V,Zf=function(){try{var u=Mc(oi,"defineProperty");return u({},"",{}),u}catch{}}(),nA=ue.clearTimeout!==Sr.clearTimeout&&ue.clearTimeout,sF=Ue&&Ue.now!==Sr.Date.now&&Ue.now,oF=ue.setTimeout!==Sr.setTimeout&&ue.setTimeout,y_=_t.ceil,b_=_t.floor,D0=oi.getOwnPropertySymbols,aF=ja?ja.isBuffer:V,iA=ue.isFinite,lF=nr.join,cF=ve(oi.keys,oi),ur=_t.max,Zr=_t.min,dF=Ue.now,T0=ue.parseInt,x_=_t.random,uF=nr.reverse,I0=Mc(ue,"DataView"),Qf=Mc(ue,"Map"),Ya=Mc(ue,"Promise"),Dd=Mc(ue,"Set"),bi=Mc(ue,"WeakMap"),Td=Mc(oi,"create"),Jf=bi&&new bi,Id={},R0=Cc(I0),k0=Cc(Qf),rA=Cc(Ya),w_=Cc(Dd),sA=Cc(bi),Qr=Ui?Ui.prototype:V,Rd=Qr?Qr.valueOf:V,M_=Qr?Qr.toString:V;function I(u){if(Pi(u)&&!rn(u)&&!(u instanceof Rn)){if(u instanceof Ai)return u;if(ti.call(u,"__wrapped__"))return ns(u)}return new Ai(u)}var kd=function(){function u(){}return function(f){if(!wi(f))return{};if(Kf)return Kf(f);u.prototype=f;var _=new u;return u.prototype=V,_}}();function fc(){}function Ai(u,f){this.__wrapped__=u,this.__actions__=[],this.__chain__=!!f,this.__index__=0,this.__values__=V}function Rn(u){this.__wrapped__=u,this.__actions__=[],this.__dir__=1,this.__filtered__=!1,this.__iteratees__=[],this.__takeCount__=ca,this.__views__=[]}function pc(u){var f=-1,_=null==u?0:u.length;for(this.clear();++f<_;){var w=u[f];this.set(w[0],w[1])}}function Dt(u){var f=-1,_=null==u?0:u.length;for(this.clear();++f<_;){var w=u[f];this.set(w[0],w[1])}}function ha(u){var f=-1,_=null==u?0:u.length;for(this.clear();++f<_;){var w=u[f];this.set(w[0],w[1])}}function Ut(u){var f=-1,_=null==u?0:u.length;for(this.__data__=new ha;++f<_;)this.add(u[f])}function Jr(u){var f=this.__data__=new Dt(u);this.size=f.size}function A_(u,f){var _=rn(u),w=!_&&Ac(u),S=!_&&!w&&Ja(u),P=!_&&!w&&!S&&Ho(u),H=_||w||S||P,j=H?Ys(u.length,E0):[],Q=j.length;for(var _e in u)(f||ti.call(u,_e))&&(!H||!("length"==_e||S&&("offset"==_e||"parent"==_e)||P&&("buffer"==_e||"byteLength"==_e||"byteOffset"==_e)||Qa(_e,Q)))&&j.push(_e);return j}function zr(u){var f=u.length;return f?u[ih(0,f-1)]:V}function qa(u,f){return Mp(Zs(u),Dl(f,0,u.length))}function N0(u){return Mp(Zs(u))}function Al(u,f,_){(_!==V&&!zo(u[f],_)||_===V&&!(f in u))&&Uo(u,f,_)}function Xs(u,f,_){var w=u[f];(!ti.call(u,f)||!zo(w,_)||_===V&&!(f in u))&&Uo(u,f,_)}function tp(u,f){for(var _=u.length;_--;)if(zo(u[_][0],f))return _;return-1}function B0(u,f,_,w){return Xa(u,function(S,P,H){f(w,S,_(S),H)}),w}function U0(u,f){return u&&ci(f,hr(f),u)}function Uo(u,f,_){"__proto__"==f&&Zf?Zf(u,f,{configurable:!0,enumerable:!0,value:_,writable:!0}):u[f]=_}function Ju(u,f){for(var _=-1,w=f.length,S=oe(w),P=null==u;++_=f?u:f)),u}function Ms(u,f,_,w,S,P){var H,j=f&Si,Q=f&ms,_e=f&Gs;if(_&&(H=S?_(u,w,S,P):_(u)),H!==V)return H;if(!wi(u))return u;var ye=rn(u);if(ye){if(H=function ax(u){var f=u.length,_=new u.constructor(f);return f&&"string"==typeof u[0]&&ti.call(u,"index")&&(_.index=u.index,_.input=u.input),_}(u),!j)return Zs(u,H)}else{var be=Hr(u),Xe=be==kf||be==s0;if(Ja(u))return me(u,j);if(be==za||be==Jn||Xe&&!S){if(H=Q||Xe?{}:TA(u),!j)return Q?function ah(u,f){return ci(u,rx(u),f)}(u,function fA(u,f){return u&&ci(f,Ds(f),u)}(H,u)):function U_(u,f){return ci(u,q_(u),f)}(u,U0(H,u))}else{if(!Sn[be])return S?u:{};H=function lx(u,f,_){var w=u.constructor;switch(f){case Lu:return J0(u);case et:case ac:return new w(+u);case _d:return function _F(u,f){var _=f?J0(u.buffer):u.buffer;return new u.constructor(_,u.byteOffset,u.byteLength)}(u,_);case da:case Of:case Xg:case Ff:case Kg:case Zg:case Nu:case Qg:case Jg:return MA(u,_);case Lo:return new w;case Fu:case lc:return new w(u);case md:return function vF(u){var f=new u.constructor(u.source,g0.exec(u));return f.lastIndex=u.lastIndex,f}(u);case No:return new w;case Pf:return function yF(u){return Rd?oi(Rd.call(u)):{}}(u)}}(u,be,j)}}P||(P=new Jr);var gt=P.get(u);if(gt)return gt;P.set(u,H),Zx(u)?u.forEach(function(Bt){H.add(Ms(Bt,f,_,Bt,u,P))}):Ev(u)&&u.forEach(function(Bt,En){H.set(En,Ms(Bt,f,_,En,u,P))});var mn=ye?V:(_e?Q?W_:_p:Q?Ds:hr)(u);return In(mn||u,function(Bt,En){mn&&(Bt=u[En=Bt]),Xs(H,En,Ms(Bt,f,_,En,u,P))}),H}function D_(u,f,_){var w=_.length;if(null==u)return!w;for(u=oi(u);w--;){var S=_[w],H=u[S];if(H===V&&!(S in u)||!(0,f[S])(H))return!1}return!0}function np(u,f,_){if("function"!=typeof u)throw new Er(Un);return uh(function(){u.apply(V,_)},f)}function Od(u,f,_,w){var S=-1,P=Ml,H=!0,j=u.length,Q=[],_e=f.length;if(!j)return Q;_&&(f=mi(f,Ur(_))),w?(P=Wu,H=!1):f.length>=Kr&&(P=dc,H=!1,f=new Ut(f));e:for(;++S-1},Dt.prototype.set=function cA(u,f){var _=this.__data__,w=tp(_,u);return w<0?(++this.size,_.push([u,f])):_[w][1]=f,this},ha.prototype.clear=function dA(){this.size=0,this.__data__={hash:new pc,map:new(Qf||Dt),string:new pc}},ha.prototype.delete=function uA(u){var f=Y_(this,u).delete(u);return this.size-=f?1:0,f},ha.prototype.get=function Se(u){return Y_(this,u).get(u)},ha.prototype.has=function zn(u){return Y_(this,u).has(u)},ha.prototype.set=function an(u,f){var _=Y_(this,u),w=_.size;return _.set(u,f),this.size+=_.size==w?0:1,this},Ut.prototype.add=Ut.prototype.push=function Ar(u){return this.__data__.set(u,Na),this},Ut.prototype.has=function L0(u){return this.__data__.has(u)},Jr.prototype.clear=function fa(){this.__data__=new Dt,this.size=0},Jr.prototype.delete=function S_(u){var f=this.__data__,_=f.delete(u);return this.size=f.size,_},Jr.prototype.get=function E_(u){return this.__data__.get(u)},Jr.prototype.has=function hA(u){return this.__data__.has(u)},Jr.prototype.set=function fF(u,f){var _=this.__data__;if(_ instanceof Dt){var w=_.__data__;if(!Qf||w.length0&&_(j)?f>1?qn(j,f-1,_,w,S):Cl(S,j):w||(S[S.length]=j)}return S}var Ka=V_(),Di=V_(!0);function ki(u,f){return u&&Ka(u,f,hr)}function I_(u,f){return u&&Di(u,f,hr)}function pa(u,f){return cc(f,function(_){return Pl(u[_])})}function mc(u,f){for(var _=0,w=(f=va(f,u)).length;null!=u&&_f}function ip(u,f){return null!=u&&ti.call(u,f)}function rp(u,f){return null!=u&&f in oi(u)}function sp(u,f,_){for(var w=_?Wu:Ml,S=u[0].length,P=u.length,H=P,j=oe(P),Q=1/0,_e=[];H--;){var ye=u[H];H&&f&&(ye=mi(ye,Ur(f))),Q=Zr(ye.length,Q),j[H]=!_&&(f||S>=120&&ye.length>=120)?new Ut(H&&ye):V}ye=u[0];var be=-1,Xe=j[0];e:for(;++be=j?Q:Q*("desc"==_[w]?-1:1)}return u.index-f.index}(P,H,_)})}function Y0(u,f,_){for(var w=-1,S=f.length,P={};++w-1;)j!==u&&hc.call(j,Q,1),hc.call(u,Q,1);return u}function nh(u,f){for(var _=u?f.length:0,w=_-1;_--;){var S=f[_];if(_==w||S!==P){var P=S;Qa(S)?hc.call(u,S,1):sh(u,S)}}return u}function ih(u,f){return u+b_(x_()*(f-u+1))}function rh(u,f){var _="";if(!u||f<1||f>Va)return _;do{f%2&&(_+=u),(f=b_(f/2))&&(u+=u)}while(f);return _}function pn(u,f){return xp(K_(u,f,is),u+"")}function xA(u){return zr(Ic(u))}function X0(u,f){var _=Ic(u);return Mp(_,Dl(f,0,_.length))}function Ud(u,f,_,w){if(!wi(u))return u;for(var S=-1,P=(f=va(f,u)).length,H=P-1,j=u;null!=j&&++SS?0:S+f),(_=_>S?S:_)<0&&(_+=S),S=f>_?0:_-f>>>0,f>>>=0;for(var P=oe(S);++w>>1,H=u[P];null!==H&&!As(H)&&(_?H<=f:H=Kr){var _e=f?null:G_(u);if(_e)return Hn(_e);H=!1,S=dc,Q=new Ut}else Q=f?[]:j;e:for(;++w=w?u:ts(u,f,_)}var Q0=nA||function(u){return Sr.clearTimeout(u)};function me(u,f){if(f)return u.slice();var _=u.length,w=bs?bs(_):new u.constructor(_);return u.copy(w),w}function J0(u){var f=new u.constructor(u.byteLength);return new v_(f).set(new v_(u)),f}function MA(u,f){var _=f?J0(u.buffer):u.buffer;return new u.constructor(_,u.byteOffset,u.length)}function CA(u,f){if(u!==f){var _=u!==V,w=null===u,S=u==u,P=As(u),H=f!==V,j=null===f,Q=f==f,_e=As(f);if(!j&&!_e&&!P&&u>f||P&&H&&Q&&!j&&!_e||w&&H&&Q||!_&&Q||!S)return 1;if(!w&&!P&&!_e&&u1?_[S-1]:V,H=S>2?_[2]:V;for(P=u.length>3&&"function"==typeof P?(S--,P):V,H&&Tr(_[0],_[1],H)&&(P=S<3?V:P,S=1),f=oi(f);++w-1?S[P?f[H]:H]:V}}function Cs(u){return vo(function(f){var _=f.length,w=_,S=Ai.prototype.thru;for(u&&f.reverse();w--;){var P=f[w];if("function"!=typeof P)throw new Er(Un);if(S&&!H&&"wrapper"==Za(P))var H=new Ai([],!0)}for(w=H?w:_;++w<_;){var j=Za(P=f[w]),Q="wrapper"==j?j_(P):V;H=Q&&dh(Q[0])&&Q[1]==(Ba|oa|aa|la)&&!Q[4].length&&1==Q[9]?H[Za(Q[0])].apply(H,Q[3]):1==P.length&&dh(P)?H[j]():H.thru(P)}return function(){var _e=arguments,ye=_e[0];if(H&&1==_e.length&&rn(ye))return H.plant(ye).value();for(var be=0,Xe=_?f[be].apply(this,_e):ye;++be<_;)Xe=f[be].call(this,Xe);return Xe}})}function $d(u,f,_,w,S,P,H,j,Q,_e){var ye=f&Ba,be=f&Pn,Xe=f&cr,gt=f&(oa|bl),Nt=f&fd,mn=Xe?V:fp(u);return function Bt(){for(var En=arguments.length,Fn=oe(En),rs=En;rs--;)Fn[rs]=arguments[rs];if(gt)var ss=ba(Bt),no=function Xu(X,ue){for(var oe=X.length,Ue=0;oe--;)X[oe]===ue&&++Ue;return Ue}(Fn,ss);if(w&&(Fn=zd(Fn,w,S,gt)),P&&(Fn=SA(Fn,P,H,gt)),En-=no,gt&&En<_e){var Ti=Gi(Fn,ss);return tx(u,f,$d,Bt.placeholder,_,Fn,Ti,j,Q,_e-En)}var Ts=be?_:this,xo=Xe?Ts[u]:u;return En=Fn.length,j?Fn=function Es(u,f){for(var _=u.length,w=Zr(f.length,_),S=Zs(u);w--;){var P=f[w];u[w]=Qa(P,_)?S[P]:V}return u}(Fn,j):Nt&&En>1&&Fn.reverse(),ye&&Qj))return!1;var _e=P.get(u),ye=P.get(f);if(_e&&ye)return _e==f&&ye==u;var be=-1,Xe=!0,gt=_&Fo?new Ut:V;for(P.set(u,f),P.set(f,u);++be-1&&u%1==0&&u1?"& ":"")+f[w],f=f.join(_>2?", ":" "),u.replace(p0,"{\n/* [wrapped with "+f+"] */\n")}(w,function OA(u,f){return In(r0,function(_){var w="_."+_[0];f&_[1]&&!Ml(u,w)&&u.push(w)}),u.sort()}(function sx(u){var f=u.match(Mr);return f?f[1].split(kE):[]}(w),_)))}function fx(u){var f=0,_=0;return function(){var w=dF(),S=Yg-(w-_);if(_=w,S>0){if(++f>=yE)return arguments[0]}else f=0;return u.apply(V,arguments)}}function Mp(u,f){var _=-1,w=u.length,S=w-1;for(f=f===V?w:f;++_1?u[f-1]:V;return _="function"==typeof _?(u.pop(),_):V,ph(u,_)});function Lx(u){var f=I(u);return f.__chain__=!0,f}function Dp(u,f){return f(u)}var Nx=vo(function(u){var f=u.length,_=f?u[0]:0,w=this.__wrapped__,S=function(P){return Ju(P,u)};return!(f>1||this.__actions__.length)&&w instanceof Rn&&Qa(_)?((w=w.slice(_,+_+(f?1:0))).__actions__.push({func:Dp,args:[S],thisArg:V}),new Ai(w,this.__chain__).thru(function(P){return f&&!P.length&&P.push(V),P})):this.thru(S)}),eD=up(function(u,f,_){ti.call(u,_)?++u[_]:Uo(u,_,1)}),Ux=AA(bx),Ip=AA(tv);function _v(u,f){return(rn(u)?In:Xa)(u,Ot(f,3))}function kl(u,f){return(rn(u)?rF:T_)(u,Ot(f,3))}var nD=up(function(u,f,_){ti.call(u,_)?u[_].push(f):Uo(u,_,[f])}),rD=pn(function(u,f,_){var w=-1,S="function"==typeof f,P=Js(u)?oe(u.length):[];return Xa(u,function(H){P[++w]=S?_s(f,H,_):ma(H,f,_)}),P}),sD=up(function(u,f,_){Uo(u,_,f)});function Rp(u,f){return(rn(u)?mi:eh)(u,Ot(f,3))}var xa=up(function(u,f,_){u[_?0:1].push(f)},function(){return[[],[]]}),fD=pn(function(u,f){if(null==u)return[];var _=f.length;return _>1&&Tr(u,f[0],f[1])?f=[]:_>2&&Tr(f[0],f[1],f[2])&&(f=[f[0]]),F_(u,qn(f,1),[])}),kp=sF||function(){return Sr.Date.now()};function gh(u,f,_){return f=_?V:f,_o(u,Ba,V,V,V,V,f=u&&null==f?u.length:f)}function wa(u,f){var _;if("function"!=typeof f)throw new Er(Un);return u=dn(u),function(){return--u>0&&(_=f.apply(this,arguments)),u<=1&&(f=V),_}}var Ec=pn(function(u,f,_){var w=Pn;if(_.length){var S=Gi(_,ba(Ec));w|=aa}return _o(u,w,f,_,S)}),vv=pn(function(u,f,_){var w=Pn|cr;if(_.length){var S=Gi(_,ba(vv));w|=aa}return _o(f,w,u,_,S)});function mD(u,f,_){var w,S,P,H,j,Q,_e=0,ye=!1,be=!1,Xe=!0;if("function"!=typeof u)throw new Er(Un);function gt(Ti){var Ts=w,xo=S;return w=S=V,_e=Ti,H=u.apply(xo,Ts)}function Bt(Ti){var Ts=Ti-Q;return Q===V||Ts>=f||Ts<0||be&&Ti-_e>=P}function En(){var Ti=kp();if(Bt(Ti))return Fn(Ti);j=uh(En,function mn(Ti){var E1=f-(Ti-Q);return be?Zr(E1,P-(Ti-_e)):E1}(Ti))}function Fn(Ti){return j=V,Xe&&w?gt(Ti):(w=S=V,H)}function no(){var Ti=kp(),Ts=Bt(Ti);if(w=arguments,S=this,Q=Ti,Ts){if(j===V)return function Nt(Ti){return _e=Ti,j=uh(En,f),ye?gt(Ti):H}(Q);if(be)return Q0(j),j=uh(En,f),gt(Q)}return j===V&&(j=uh(En,f)),H}return f=yo(f)||0,wi(_)&&(ye=!!_.leading,P=(be="maxWait"in _)?ur(yo(_.maxWait)||0,f):P,Xe="trailing"in _?!!_.trailing:Xe),no.cancel=function rs(){j!==V&&Q0(j),_e=0,w=Q=S=j=V},no.flush=function ss(){return j===V?H:Fn(kp())},no}var DF=pn(function(u,f){return np(u,1,f)}),TF=pn(function(u,f,_){return np(u,yo(f)||0,_)});function jd(u,f){if("function"!=typeof u||null!=f&&"function"!=typeof f)throw new Er(Un);var _=function(){var w=arguments,S=f?f.apply(this,w):w[0],P=_.cache;if(P.has(S))return P.get(S);var H=u.apply(this,w);return _.cache=P.set(S,H)||P,H};return _.cache=new(jd.Cache||ha),_}function wv(u){if("function"!=typeof u)throw new Er(Un);return function(){var f=arguments;switch(f.length){case 0:return!u.call(this);case 1:return!u.call(this,f[0]);case 2:return!u.call(this,f[0],f[1]);case 3:return!u.call(this,f[0],f[1],f[2])}return!u.apply(this,f)}}jd.Cache=ha;var Gx=Vd(function(u,f){var _=(f=1==f.length&&rn(f[0])?mi(f[0],Ur(Ot())):mi(qn(f,1),Ur(Ot()))).length;return pn(function(w){for(var S=-1,P=Zr(w.length,_);++S=f}),Ac=Nd(function(){return arguments}())?Nd:function(u){return Pi(u)&&ti.call(u,"callee")&&!Ed.call(u,"callee")},rn=oe.isArray,RF=h_?Ur(h_):function _A(u){return Pi(u)&&es(u)==Lu};function Js(u){return null!=u&&Bp(u.length)&&!Pl(u)}function xi(u){return Pi(u)&&Js(u)}var Ja=aF||Zd,qx=M0?Ur(M0):function pF(u){return Pi(u)&&es(u)==ac};function Lp(u){if(!Pi(u))return!1;var f=es(u);return f==pd||f==ME||"string"==typeof u.message&&"string"==typeof u.name&&!eo(u)}function Pl(u){if(!wi(u))return!1;var f=es(u);return f==kf||f==s0||f==wE||f==SE}function Np(u){return"number"==typeof u&&u==dn(u)}function Bp(u){return"number"==typeof u&&u>-1&&u%1==0&&u<=Va}function wi(u){var f=typeof u;return null!=u&&("object"==f||"function"==f)}function Pi(u){return null!=u&&"object"==typeof u}var Ev=kt?Ur(kt):function vA(u){return Pi(u)&&Hr(u)==Lo};function _h(u){return"number"==typeof u||Pi(u)&&es(u)==Fu}function eo(u){if(!Pi(u)||es(u)!=za)return!1;var f=xs(u);if(null===f)return!0;var _=ti.call(f,"constructor")&&f.constructor;return"function"==typeof _&&_ instanceof _&&Sl.call(_)==A0}var Vp=Hf?Ur(Hf):function gF(u){return Pi(u)&&es(u)==md},Zx=C0?Ur(C0):function P_(u){return Pi(u)&&Hr(u)==No};function zp(u){return"string"==typeof u||!rn(u)&&Pi(u)&&es(u)==lc}function As(u){return"symbol"==typeof u||Pi(u)&&es(u)==Pf}var Ho=js?Ur(js):function G0(u){return Pi(u)&&Bp(u.length)&&!!Ei[es(u)]},Iv=gp(op),TD=gp(function(u,f){return u<=f});function Rv(u){if(!u)return[];if(Js(u))return zp(u)?mo(u):Zs(u);if(Qu&&u[Qu])return function eA(X){for(var ue,oe=[];!(ue=X.next()).done;)oe.push(ue.value);return oe}(u[Qu]());var f=Hr(u);return(f==Lo?jf:f==No?Hn:Ic)(u)}function el(u){return u?(u=yo(u))===Tn||u===-Tn?(u<0?-1:1)*xE:u==u?u:0:0===u?u:0}function dn(u){var f=el(u),_=f%1;return f==f?_?f-_:f:0}function ID(u){return u?Dl(dn(u),0,ca):0}function yo(u){if("number"==typeof u)return u;if(As(u))return Rf;if(wi(u)){var f="function"==typeof u.valueOf?u.valueOf():u;u=wi(f)?f+"":f}if("string"!=typeof u)return 0===u?u:+u;u=$n(u);var _=Ha.test(u);return _||tr.test(u)?nF(u.slice(2),_?2:8):LE.test(u)?Rf:+u}function Ol(u){return ci(u,Ds(u))}function On(u){return null==u?"":Ks(u)}var pt=Dr(function(u,f){if(bp(f)||Js(f))ci(f,hr(f),u);else for(var _ in f)ti.call(f,_)&&Xs(u,_,f[_])}),Qx=Dr(function(u,f){ci(f,Ds(f),u)}),Fl=Dr(function(u,f,_,w){ci(f,Ds(f),u,w)}),tl=Dr(function(u,f,_,w){ci(f,hr(f),u,w)}),kD=vo(Ju),Tc=pn(function(u,f){u=oi(u);var _=-1,w=f.length,S=w>2?f[2]:V;for(S&&Tr(f[0],f[1],S)&&(w=1);++_1),P}),ci(u,W_(u),_),w&&(_=Ms(_,Si|ms|Gs,ya));for(var S=f.length;S--;)sh(_,f[S]);return _}),HD=vo(function(u,f){return null==u?{}:function j0(u,f){return Y0(u,f,function(_,w){return Lv(u,w)})}(u,f)});function Nv(u,f){if(null==u)return{};var _=mi(W_(u),function(w){return[w]});return f=Ot(f),Y0(u,_,function(w,S){return f(w,S[0])})}var nw=lh(hr),Bv=lh(Ds);function Ic(u){return null==u?[]:qu(u,hr(u))}var G=Gd(function(u,f,_){return f=f.toLowerCase(),u+(_?Uv(f):f)});function Uv(u){return Xd(On(u).toLowerCase())}function Vv(u){return(u=On(u))&&u.replace(fo,QE).replace(XO,"")}var e1=Gd(function(u,f,_){return u+(_?"-":"")+f.toLowerCase()}),rw=Gd(function(u,f,_){return u+(_?" ":"")+f.toLowerCase()}),t1=Hd("toLowerCase"),zv=Gd(function(u,f,_){return u+(_?"_":"")+f.toLowerCase()}),s1=Gd(function(u,f,_){return u+(_?" ":"")+Xd(f)}),lw=Gd(function(u,f,_){return u+(_?" ":"")+f.toUpperCase()}),Xd=Hd("toUpperCase");function cw(u,f,_){return u=On(u),(f=_?V:f)===V?function nn(X){return YE.test(X)}(u)?function fn(X){return X.match(KO)||[]}(u):function ZE(X){return X.match(PE)||[]}(u):u.match(f)||[]}var Gv=pn(function(u,f){try{return _s(u,V,f)}catch(_){return Lp(_)?_:new Gt(_)}}),c1=vo(function(u,f){return In(f,function(_){_=Vo(_),Uo(u,_,Ec(u[_],u))}),u});function $v(u){return function(){return u}}var dw=Cs(),f1=Cs(!0);function is(u){return u}function Hp(u){return O_("function"==typeof u?u:Ms(u,Si))}var jv=pn(function(u,f){return function(_){return ma(_,u,f)}}),p1=pn(function(u,f){return function(_){return ma(u,_,f)}});function uw(u,f,_){var w=hr(f),S=pa(f,w);null==_&&(!wi(f)||!S.length&&w.length)&&(_=f,f=u,u=this,S=pa(f,hr(f)));var P=!(wi(_)&&"chain"in _&&!_.chain),H=Pl(u);return In(S,function(j){var Q=f[j];u[j]=Q,H&&(u.prototype[j]=function(){var _e=this.__chain__;if(P||_e){var ye=u(this.__wrapped__);return(ye.__actions__=Zs(this.__actions__)).push({func:Q,args:arguments,thisArg:u}),ye.__chain__=_e,ye}return Q.apply(u,Cl([this.value()],arguments))})}),u}function bo(){}var hw=pp(mi),g1=pp(XE),_1=pp(Gf);function vh(u){return cx(u)?p_(Vo(u)):function ga(u){return function(f){return mc(f,u)}}(u)}var Yv=ex(),yh=ex(!0);function bh(){return[]}function Zd(){return!1}var v1=z_(function(u,f){return u+f},0),y1=H_("ceil"),mw=z_(function(u,f){return u/f},1),b1=H_("floor"),C1=z_(function(u,f){return u*f},1),zF=H_("round"),Qv=z_(function(u,f){return u-f},0);return I.after=function pD(u,f){if("function"!=typeof f)throw new Er(Un);return u=dn(u),function(){if(--u<1)return f.apply(this,arguments)}},I.ary=gh,I.assign=pt,I.assignIn=Qx,I.assignInWith=Fl,I.assignWith=tl,I.at=kD,I.before=wa,I.bind=Ec,I.bindAll=c1,I.bindKey=vv,I.castArray=function vD(){if(!arguments.length)return[];var u=arguments[0];return rn(u)?u:[u]},I.chain=Lx,I.chunk=function J_(u,f,_){f=(_?Tr(u,f,_):f===V)?1:ur(dn(f),0);var w=null==u?0:u.length;if(!w||f<1)return[];for(var S=0,P=0,H=oe(y_(w/f));SS?0:S+_),(w=w===V||w>S?S:dn(w))<0&&(w+=S),w=_>w?0:ID(w);_>>0)?(u=On(u))&&("string"==typeof f||null!=f&&!Vp(f))&&!(f=Ks(f))&&Md(u)?xc(mo(u),0,_):u.split(f,_):[]},I.spread=function Wx(u,f){if("function"!=typeof u)throw new Er(Un);return f=null==f?0:ur(dn(f),0),pn(function(_){var w=_[f],S=xc(_,0,f);return w&&Cl(S,w),_s(u,this,S)})},I.tail=function Sc(u){var f=null==u?0:u.length;return f?ts(u,1,f):[]},I.take=function Tx(u,f,_){return u&&u.length?ts(u,0,(f=_||f===V?1:dn(f))<0?0:f):[]},I.takeRight=function Ix(u,f,_){var w=null==u?0:u.length;return w?ts(u,(f=w-(f=_||f===V?1:dn(f)))<0?0:f,w):[]},I.takeRightWhile=function qA(u,f){return u&&u.length?oh(u,Ot(f,3),!1,!0):[]},I.takeWhile=function EF(u,f){return u&&u.length?oh(u,Ot(f,3)):[]},I.tap=function ZA(u,f){return f(u),u},I.throttle=function Pp(u,f,_){var w=!0,S=!0;if("function"!=typeof u)throw new Er(Un);return wi(_)&&(w="leading"in _?!!_.leading:w,S="trailing"in _?!!_.trailing:S),mD(u,f,{leading:w,maxWait:f,trailing:S})},I.thru=Dp,I.toArray=Rv,I.toPairs=nw,I.toPairsIn=Bv,I.toPath=function pw(u){return rn(u)?mi(u,Vo):As(u)?[u]:Zs(px(On(u)))},I.toPlainObject=Ol,I.transform=function WD(u,f,_){var w=rn(u),S=w||Ja(u)||Ho(u);if(f=Ot(f,4),null==_){var P=u&&u.constructor;_=S?w?new P:[]:wi(u)&&Pl(P)?kd(xs(u)):{}}return(S?In:ki)(u,function(H,j,Q){return f(_,H,j,Q)}),_},I.unary=function jx(u){return gh(u,1)},I.union=Sp,I.unionBy=XA,I.unionWith=Rx,I.uniq=function kx(u){return u&&u.length?ni(u):[]},I.uniqBy=function Px(u,f){return u&&u.length?ni(u,Ot(f,2)):[]},I.uniqWith=function dv(u,f){return f="function"==typeof f?f:V,u&&u.length?ni(u,V,f):[]},I.unset=function jD(u,f){return null==u||sh(u,f)},I.unzip=Ep,I.unzipWith=ph,I.update=function YD(u,f,_){return null==u?u:Z0(u,f,dp(_))},I.updateWith=function qD(u,f,_,w){return w="function"==typeof w?w:V,null==u?u:Z0(u,f,dp(_),w)},I.values=Ic,I.valuesIn=function XD(u){return null==u?[]:qu(u,Ds(u))},I.without=Ap,I.words=cw,I.wrap=function Cv(u,f){return Mv(dp(f),u)},I.xor=Ox,I.xorBy=uv,I.xorWith=hv,I.zip=fv,I.zipObject=function mh(u,f){return bc(u||[],f||[],Xs)},I.zipObjectDeep=function KA(u,f){return bc(u||[],f||[],Ud)},I.zipWith=Fx,I.entries=nw,I.entriesIn=Bv,I.extend=Qx,I.extendWith=Fl,uw(I,I),I.add=v1,I.attempt=Gv,I.camelCase=G,I.capitalize=Uv,I.ceil=y1,I.clamp=function KD(u,f,_){return _===V&&(_=f,f=V),_!==V&&(_=(_=yo(_))==_?_:0),f!==V&&(f=(f=yo(f))==f?f:0),Dl(yo(u),f,_)},I.clone=function Xn(u){return Ms(u,Gs)},I.cloneDeep=function bD(u){return Ms(u,Si|Gs)},I.cloneDeepWith=function Op(u,f){return Ms(u,Si|Gs,f="function"==typeof f?f:V)},I.cloneWith=function yD(u,f){return Ms(u,Gs,f="function"==typeof f?f:V)},I.conformsTo=function Yx(u,f){return null==f||D_(u,f,hr(f))},I.deburr=Vv,I.defaultTo=function h1(u,f){return null==u||u!=u?f:u},I.divide=mw,I.endsWith=function QD(u,f,_){u=On(u),f=Ks(f);var w=u.length,S=_=_===V?w:Dl(dn(_),0,w);return(_-=f.length)>=0&&u.slice(_,S)==f},I.eq=zo,I.escape=function JD(u){return(u=On(u))&&RE.test(u)?u.replace(l0,ot):u},I.escapeRegExp=function iw(u){return(u=On(u))&&h0.test(u)?u.replace(n_,"\\$&"):u},I.every=function mv(u,f,_){var w=rn(u)?XE:V0;return _&&Tr(u,f,_)&&(f=V),w(u,Ot(f,3))},I.find=Ux,I.findIndex=bx,I.findKey=function kv(u,f){return ee(u,Ot(f,3),ki)},I.findLast=Ip,I.findLastIndex=tv,I.findLastKey=function Pv(u,f){return ee(u,Ot(f,3),I_)},I.floor=b1,I.forEach=_v,I.forEachRight=kl,I.forIn=function FD(u,f){return null==u?u:Ka(u,Ot(f,3),Ds)},I.forInRight=function Ov(u,f){return null==u?u:Di(u,Ot(f,3),Ds)},I.forOwn=function nl(u,f){return u&&ki(u,Ot(f,3))},I.forOwnRight=function LD(u,f){return u&&I_(u,Ot(f,3))},I.get=Fv,I.gt=xD,I.gte=wD,I.has=function UD(u,f){return null!=u&&ox(u,f,ip)},I.hasIn=Lv,I.head=wx,I.identity=is,I.includes=function iD(u,f,_,w){u=Js(u)?u:Ic(u),_=_&&!w?dn(_):0;var S=u.length;return _<0&&(_=ur(S+_,0)),zp(u)?_<=S&&u.indexOf(f,_)>-1:!!S&&Pt(u,f,_)>-1},I.indexOf=function fh(u,f,_){var w=null==u?0:u.length;if(!w)return-1;var S=null==_?0:dn(_);return S<0&&(S=ur(w+S,0)),Pt(u,f,S)},I.inRange=function ZD(u,f,_){return f=el(f),_===V?(_=f,f=0):_=el(_),function R_(u,f,_){return u>=Zr(f,_)&&u=-Va&&u<=Va},I.isSet=Zx,I.isString=zp,I.isSymbol=As,I.isTypedArray=Ho,I.isUndefined=function ED(u){return u===V},I.isWeakMap=function AD(u){return Pi(u)&&Hr(u)==gd},I.isWeakSet=function DD(u){return Pi(u)&&"[object WeakSet]"==es(u)},I.join=function Mx(u,f){return null==u?"":lF.call(u,f)},I.kebabCase=e1,I.last=Ir,I.lastIndexOf=function ov(u,f,_){var w=null==u?0:u.length;if(!w)return-1;var S=w;return _!==V&&(S=(S=dn(_))<0?ur(w+S,0):Zr(S,w-1)),f==f?function Cd(X,ue,oe){for(var Ue=oe+1;Ue--;)if(X[Ue]===ue)return Ue;return Ue}(u,f,S):Yu(u,Wf,S,!0)},I.lowerCase=rw,I.lowerFirst=t1,I.lt=Iv,I.lte=TD,I.max=function gw(u){return u&&u.length?Fd(u,is,Ld):V},I.maxBy=function _w(u,f){return u&&u.length?Fd(u,Ot(f,2),Ld):V},I.mean=function x1(u){return wd(u,is)},I.meanBy=function w1(u,f){return wd(u,Ot(f,2))},I.min=function to(u){return u&&u.length?Fd(u,is,op):V},I.minBy=function M1(u,f){return u&&u.length?Fd(u,Ot(f,2),op):V},I.stubArray=bh,I.stubFalse=Zd,I.stubObject=function fw(){return{}},I.stubString=function qv(){return""},I.stubTrue=function Xv(){return!0},I.multiply=C1,I.nth=function Cx(u,f){return u&&u.length?bA(u,dn(f)):V},I.noConflict=function E(){return Sr._===this&&(Sr._=qf),this},I.noop=bo,I.now=kp,I.pad=function n1(u,f,_){u=On(u);var w=(f=dn(f))?dr(u):0;if(!f||w>=f)return u;var S=(f-w)/2;return mp(b_(S),_)+u+mp(y_(S),_)},I.padEnd=function FF(u,f,_){u=On(u);var w=(f=dn(f))?dr(u):0;return f&&wf){var w=u;u=f,f=w}if(_||u%1||f%1){var S=x_();return Zr(u+S*(f-u+Ie("1e-"+((S+"").length-1))),f)}return ih(u,f)},I.reduce=function oD(u,f,_){var w=rn(u)?f_:S0,S=arguments.length<3;return w(u,Ot(f,4),_,S,Xa)},I.reduceRight=function aD(u,f,_){var w=rn(u)?KE:S0,S=arguments.length<3;return w(u,Ot(f,4),_,S,T_)},I.repeat=function $i(u,f,_){return f=(_?Tr(u,f,_):f===V)?1:dn(f),rh(On(u),f)},I.replace=function r1(){var u=arguments,f=On(u[0]);return u.length<3?f:f.replace(u[1],u[2])},I.result=function GD(u,f,_){var w=-1,S=(f=va(f,u)).length;for(S||(S=1,u=V);++wVa)return[];var _=ca,w=Zr(u,ca);f=Ot(f),u-=ca;for(var S=Ys(w,f);++_=P)return u;var j=_-dr(w);if(j<1)return w;var Q=H?xc(H,0,j).join(""):u.slice(0,j);if(S===V)return Q+w;if(H&&(j+=Q.length-j),Vp(S)){if(u.slice(j).search(S)){var _e,ye=Q;for(S.global||(S=uc(S.source,On(g0.exec(S))+"g")),S.lastIndex=0;_e=S.exec(ye);)var be=_e.index;Q=Q.slice(0,be===V?j:be)}}else if(u.indexOf(Ks(S),j)!=j){var Xe=Q.lastIndexOf(S);Xe>-1&&(Q=Q.slice(0,Xe))}return Q+w},I.unescape=function l1(u){return(u=On(u))&&IE.test(u)?u.replace(a0,Yf):u},I.uniqueId=function Zv(u){var f=++yi;return On(u)+f},I.upperCase=lw,I.upperFirst=Xd,I.each=_v,I.eachRight=kl,I.first=wx,uw(I,function(){var u={};return ki(I,function(f,_){ti.call(I.prototype,_)||(u[_]=f)}),u}(),{chain:!1}),I.VERSION="4.17.21",In(["bind","bindKey","curry","curryRight","partial","partialRight"],function(u){I[u].placeholder=I}),In(["drop","take"],function(u,f){Rn.prototype[u]=function(_){_=_===V?1:ur(dn(_),0);var w=this.__filtered__&&!f?new Rn(this):this.clone();return w.__filtered__?w.__takeCount__=Zr(_,w.__takeCount__):w.__views__.push({size:Zr(_,ca),type:u+(w.__dir__<0?"Right":"")}),w},Rn.prototype[u+"Right"]=function(_){return this.reverse()[u](_).reverse()}}),In(["filter","map","takeWhile"],function(u,f){var _=f+1,w=1==_||3==_;Rn.prototype[u]=function(S){var P=this.clone();return P.__iteratees__.push({iteratee:Ot(S,3),type:_}),P.__filtered__=P.__filtered__||w,P}}),In(["head","last"],function(u,f){var _="take"+(f?"Right":"");Rn.prototype[u]=function(){return this[_](1).value()[0]}}),In(["initial","tail"],function(u,f){var _="drop"+(f?"":"Right");Rn.prototype[u]=function(){return this.__filtered__?new Rn(this):this[_](1)}}),Rn.prototype.compact=function(){return this.filter(is)},Rn.prototype.find=function(u){return this.filter(u).head()},Rn.prototype.findLast=function(u){return this.reverse().find(u)},Rn.prototype.invokeMap=pn(function(u,f){return"function"==typeof u?new Rn(this):this.map(function(_){return ma(_,u,f)})}),Rn.prototype.reject=function(u){return this.filter(wv(Ot(u)))},Rn.prototype.slice=function(u,f){u=dn(u);var _=this;return _.__filtered__&&(u>0||f<0)?new Rn(_):(u<0?_=_.takeRight(-u):u&&(_=_.drop(u)),f!==V&&(_=(f=dn(f))<0?_.dropRight(-f):_.take(f-u)),_)},Rn.prototype.takeRightWhile=function(u){return this.reverse().takeWhile(u).reverse()},Rn.prototype.toArray=function(){return this.take(ca)},ki(Rn.prototype,function(u,f){var _=/^(?:filter|find|map|reject)|While$/.test(f),w=/^(?:head|last)$/.test(f),S=I[w?"take"+("last"==f?"Right":""):f],P=w||/^find/.test(f);S&&(I.prototype[f]=function(){var H=this.__wrapped__,j=w?[1]:arguments,Q=H instanceof Rn,_e=j[0],ye=Q||rn(H),be=function(En){var Fn=S.apply(I,Cl([En],j));return w&&Xe?Fn[0]:Fn};ye&&_&&"function"==typeof _e&&1!=_e.length&&(Q=ye=!1);var Xe=this.__chain__,Nt=P&&!Xe,mn=Q&&!this.__actions__.length;if(!P&&ye){H=mn?H:new Rn(this);var Bt=u.apply(H,j);return Bt.__actions__.push({func:Dp,args:[be],thisArg:V}),new Ai(Bt,Xe)}return Nt&&mn?u.apply(this,j):(Bt=this.thru(be),Nt?w?Bt.value()[0]:Bt.value():Bt)})}),In(["pop","push","shift","sort","splice","unshift"],function(u){var f=nr[u],_=/^(?:push|sort|unshift)$/.test(u)?"tap":"thru",w=/^(?:pop|shift)$/.test(u);I.prototype[u]=function(){var S=arguments;if(w&&!this.__chain__){var P=this.value();return f.apply(rn(P)?P:[],S)}return this[_](function(H){return f.apply(rn(H)?H:[],S)})}}),ki(Rn.prototype,function(u,f){var _=I[f];if(_){var w=_.name+"";ti.call(Id,w)||(Id[w]=[]),Id[w].push({name:f,func:_})}}),Id[$d(V,cr).name]=[{name:"wrapper",func:V}],Rn.prototype.clone=function P0(){var u=new Rn(this.__wrapped__);return u.__actions__=Zs(this.__actions__),u.__dir__=this.__dir__,u.__filtered__=this.__filtered__,u.__iteratees__=Zs(this.__iteratees__),u.__takeCount__=this.__takeCount__,u.__views__=Zs(this.__views__),u},Rn.prototype.reverse=function Pd(){if(this.__filtered__){var u=new Rn(this);u.__dir__=-1,u.__filtered__=!0}else(u=this.clone()).__dir__*=-1;return u},Rn.prototype.value=function ws(){var u=this.__wrapped__.value(),f=this.__dir__,_=rn(u),w=f<0,S=_?u.length:0,P=function yp(u,f,_){for(var w=-1,S=_.length;++w=this.__values__.length;return{done:u,value:u?V:this.__values__[this.__index__++]}},I.prototype.plant=function QA(u){for(var f,_=this;_ instanceof fc;){var w=ns(_);w.__index__=0,w.__values__=V,f?S.__wrapped__=w:f=w;var S=w;_=_.__wrapped__}return S.__wrapped__=u,f},I.prototype.reverse=function JA(){var u=this.__wrapped__;if(u instanceof Rn){var f=u;return this.__actions__.length&&(f=new Rn(this)),(f=f.reverse()).__actions__.push({func:Dp,args:[av],thisArg:V}),new Ai(f,this.__chain__)}return this.thru(av)},I.prototype.toJSON=I.prototype.valueOf=I.prototype.value=function AF(){return _a(this.__wrapped__,this.__actions__)},I.prototype.first=I.prototype.head,Qu&&(I.prototype[Qu]=function Wd(){return this}),I}();Sr._=ys,(cn=function(){return ys}.call(zs,ps,zs,Oo))!==V&&(Oo.exports=cn)}.call(this)},738:function(Oo){var zs;Oo.exports=((zs=function(){function ps(Ci){return Br.appendChild(Ci.dom),Ci}function cn(Ci){for(var Si=0;SiZt+1e3&&(yl.update(1e3*Un/(Ci-Zt),100),Zt=Ci,Un=0,Hs)){var Si=performance.memory;Hs.update(Si.usedJSHeapSize/1048576,Si.jsHeapSizeLimit/1048576)}return Ci},update:function(){Kr=this.end()},domElement:Br,setMode:cn}}).Panel=function(ps,cn,V){var Br=1/0,Kr=0,Zt=Math.round,Un=Zt(window.devicePixelRatio||1),yl=80*Un,Na=48*Un,Hs=3*Un,Ci=2*Un,Si=3*Un,ms=15*Un,Gs=74*Un,$s=30*Un,Fo=document.createElement("canvas");Fo.width=yl,Fo.height=Na,Fo.style.cssText="width:80px;height:48px";var Pn=Fo.getContext("2d");return Pn.font="bold "+9*Un+"px Helvetica,Arial,sans-serif",Pn.textBaseline="top",Pn.fillStyle=V,Pn.fillRect(0,0,yl,Na),Pn.fillStyle=cn,Pn.fillText(ps,Hs,Ci),Pn.fillRect(Si,ms,Gs,$s),Pn.fillStyle=V,Pn.globalAlpha=.9,Pn.fillRect(Si,ms,Gs,$s),{dom:Fo,update:function(cr,oc){Br=Math.min(Br,cr),Kr=Math.max(Kr,cr),Pn.fillStyle=V,Pn.globalAlpha=1,Pn.fillRect(0,0,yl,ms),Pn.fillStyle=cn,Pn.fillText(Zt(cr)+" "+ps+" ("+Zt(Br)+"-"+Zt(Kr)+")",Hs,Ci),Pn.drawImage(Fo,Si+Un,ms,Gs-Un,$s,Si,ms,Gs-Un,$s),Pn.fillRect(Si+Gs-Un,ms,Un,$s),Pn.fillStyle=V,Pn.globalAlpha=.9,Pn.fillRect(Si+Gs-Un,ms,Un,Zt((1-cr/oc)*$s))}}},zs)}},Oo=>{Oo(Oo.s=805)}]); \ No newline at end of file diff --git a/frontend/dist/gui/main.400d34314b7ff5b0.js b/frontend/dist/gui/main.93e6f667a9a3161b.js similarity index 77% rename from frontend/dist/gui/main.400d34314b7ff5b0.js rename to frontend/dist/gui/main.93e6f667a9a3161b.js index 4404b44..33dba36 100644 --- a/frontend/dist/gui/main.400d34314b7ff5b0.js +++ b/frontend/dist/gui/main.93e6f667a9a3161b.js @@ -1 +1 @@ -(self.webpackChunkgui=self.webpackChunkgui||[]).push([[179],{790:(No,Gs,ps)=>{"use strict";function cn(i){return"function"==typeof i}function V(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 Nr=V(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 Kr(i,t){if(i){const e=i.indexOf(t);0<=e&&i.splice(e,1)}}class Zt{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(cn(n))try{n()}catch(s){t=s instanceof Nr?s.errors:[s]}const{_finalizers:r}=this;if(r){this._finalizers=null;for(const s of r)try{Ha(s)}catch(o){t=t??[],o instanceof Nr?t=[...t,...o.errors]:t.push(o)}}if(t)throw new Nr(t)}}add(t){var e;if(t&&t!==this)if(this.closed)Ha(t);else{if(t instanceof Zt){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)&&Kr(e,t)}remove(t){const{_finalizers:e}=this;e&&Kr(e,t),t instanceof Zt&&t._removeParent(this)}}Zt.EMPTY=(()=>{const i=new Zt;return i.closed=!0,i})();const Un=Zt.EMPTY;function Al(i){return i instanceof Zt||i&&"closed"in i&&cn(i.remove)&&cn(i.add)&&cn(i.unsubscribe)}function Ha(i){cn(i)?i():i.unsubscribe()}const $s={onUnhandledError:null,onStoppedNotification:null,Promise:void 0,useDeprecatedSynchronousErrorHandling:!1,useDeprecatedNextContext:!1},Mi={setTimeout(i,t,...e){const{delegate:n}=Mi;return n?.setTimeout?n.setTimeout(i,t,...e):setTimeout(i,t,...e)},clearTimeout(i){const{delegate:t}=Mi;return(t?.clearTimeout||clearTimeout)(i)},delegate:void 0};function Ci(i){Mi.setTimeout(()=>{const{onUnhandledError:t}=$s;if(!t)throw i;t(i)})}function ms(){}const Ws=On("C",void 0,void 0);function On(i,t,e){return{kind:i,value:t,error:e}}let dr=null;function pc(i){if($s.useDeprecatedSynchronousErrorHandling){const t=!dr;if(t&&(dr={errorThrown:!1,error:null}),i(),t){const{errorThrown:e,error:n}=dr;if(dr=null,e)throw n}}else i()}class Dl extends Zt{constructor(t){super(),this.isStopped=!1,t?(this.destination=t,Al(t)&&t.add(this)):this.destination=ME}static create(t,e,n){return new ua(t,e,n)}next(t){this.isStopped?Xg(function Bo(i){return On("N",i,void 0)}(t),this):this._next(t)}error(t){this.isStopped?Xg(function js(i){return On("E",void 0,i)}(t),this):(this.isStopped=!0,this._error(t))}complete(){this.isStopped?Xg(Ws,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 da=Function.prototype.bind;function Tl(i,t){return da.call(i,t)}class Ga{constructor(t){this.partialObserver=t}next(t){const{partialObserver:e}=this;if(e.next)try{e.next(t)}catch(n){pd(n)}}error(t){const{partialObserver:e}=this;if(e.error)try{e.error(t)}catch(n){pd(n)}else pd(t)}complete(){const{partialObserver:t}=this;if(t.complete)try{t.complete()}catch(e){pd(e)}}}class ua extends Dl{constructor(t,e,n){let r;if(super(),cn(t)||!t)r={next:t??void 0,error:e??void 0,complete:n??void 0};else{let s;this&&$s.useDeprecatedNextContext?(s=Object.create(t),s.unsubscribe=()=>this.unsubscribe(),r={next:t.next&&Tl(t.next,s),error:t.error&&Tl(t.error,s),complete:t.complete&&Tl(t.complete,s)}):r=t}this.destination=new Ga(r)}}function pd(i){$s.useDeprecatedSynchronousErrorHandling?function ca(i){$s.useDeprecatedSynchronousErrorHandling&&dr&&(dr.errorThrown=!0,dr.error=i)}(i):Ci(i)}function Xg(i,t){const{onStoppedNotification:e}=$s;e&&Mi.setTimeout(()=>e(i,t))}const ME={closed:!0,next:ms,error:function wE(i){throw i},complete:ms},Kg="function"==typeof Symbol&&Symbol.observable||"@@observable";function $a(i){return i}function a0(i){return 0===i.length?$a:1===i.length?i[0]:function(e){return i.reduce((n,r)=>r(n),e)}}let In=(()=>{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 Pf(i){return i&&i instanceof Dl||function SE(i){return i&&cn(i.next)&&cn(i.error)&&cn(i.complete)}(i)&&Al(i)}(e)?e:new ua(e,n,r);return pc(()=>{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=Wa(n))((r,s)=>{const o=new ua({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)}[Kg](){return this}pipe(...e){return a0(e)(this)}toPromise(e){return new(e=Wa(e))((n,r)=>{let s;this.subscribe(o=>s=o,o=>r(o),()=>n(s))})}}return i.create=t=>new i(t),i})();function Wa(i){var t;return null!==(t=i??$s.Promise)&&void 0!==t?t:Promise}const ha=V(i=>function(){i(this),this.name="ObjectUnsubscribedError",this.message="object unsubscribed"});let Re=(()=>{class i extends In{constructor(){super(),this.closed=!1,this.currentObservers=null,this.observers=[],this.isStopped=!1,this.hasError=!1,this.thrownError=null}lift(e){const n=new l0(this,this);return n.operator=e,n}_throwIfClosed(){if(this.closed)throw new ha}next(e){pc(()=>{if(this._throwIfClosed(),!this.isStopped){this.currentObservers||(this.currentObservers=Array.from(this.observers));for(const n of this.currentObservers)n.next(e)}})}error(e){pc(()=>{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(){pc(()=>{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?Un:(this.currentObservers=null,s.push(e),new Zt(()=>{this.currentObservers=null,Kr(s,e)}))}_checkFinalizedStatuses(e){const{hasError:n,thrownError:r,isStopped:s}=this;n?e.error(r):s&&e.complete()}asObservable(){const e=new In;return e.source=this,e}}return i.create=(t,e)=>new l0(t,e),i})();class l0 extends Re{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:Un}}function c0(i){return cn(i?.lift)}function ti(i){return t=>{if(c0(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 Yn(i,t,e,n,r){return new EE(i,t,e,n,r)}class EE extends Dl{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 et(i,t){return ti((e,n)=>{let r=0;e.subscribe(Yn(n,s=>{n.next(i.call(t,s,r++))}))})}function fa(i){return this instanceof fa?(this.v=i,this):new fa(i)}function Nf(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 Zg(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 i_=i=>i&&"number"==typeof i.length&&"function"!=typeof i;function r_(i){return cn(i?.then)}function p0(i){return cn(i[Kg])}function m0(i){return Symbol.asyncIterator&&cn(i?.[Symbol.asyncIterator])}function g0(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 _0=function s_(){return"function"==typeof Symbol&&Symbol.iterator?Symbol.iterator:"@@iterator"}();function Bf(i){return cn(i?.[_0])}function v0(i){return function Lf(i,t,e){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var r,n=e.apply(i,t||[]),s=[];return r=Object.create(("function"==typeof AsyncIterator?AsyncIterator:Object).prototype),a("next"),a("throw"),a("return",function o(m){return function(g){return Promise.resolve(g).then(m,h)}}),r[Symbol.asyncIterator]=function(){return this},r;function a(m,g){n[m]&&(r[m]=function(b){return new Promise(function(v,y){s.push([m,b,v,y])>1||l(m,b)})},g&&(r[m]=g(r[m])))}function l(m,g){try{!function c(m){m.value instanceof fa?Promise.resolve(m.value.v).then(d,h):p(s[0][2],m)}(n[m](g))}catch(b){p(s[0][3],b)}}function d(m){l("next",m)}function h(m){l("throw",m)}function p(m,g){m(g),s.shift(),s.length&&l(s[0][0],s[0][1])}}(this,arguments,function*(){const e=i.getReader();try{for(;;){const{value:n,done:r}=yield fa(e.read());if(r)return yield fa(void 0);yield yield fa(n)}}finally{e.releaseLock()}})}function y0(i){return cn(i?.getReader)}function wr(i){if(i instanceof In)return i;if(null!=i){if(p0(i))return function LE(i){return new In(t=>{const e=i[Kg]();if(cn(e.subscribe))return e.subscribe(t);throw new TypeError("Provided object does not correctly implement Symbol.observable")})}(i);if(i_(i))return function NE(i){return new In(t=>{for(let e=0;e{i.then(e=>{t.closed||(t.next(e),t.complete())},e=>t.error(e)).then(null,Ci)})}(i);if(m0(i))return b0(i);if(Bf(i))return function UE(i){return new In(t=>{for(const e of i)if(t.next(e),t.closed)return;t.complete()})}(i);if(y0(i))return function x0(i){return b0(v0(i))}(i)}throw g0(i)}function b0(i){return new In(t=>{(function VE(i,t){var e,n,r,s;return function gd(i,t,e,n){return new(e||(e=Promise))(function(s,o){function a(d){try{c(n.next(d))}catch(h){o(h)}}function l(d){try{c(n.throw(d))}catch(h){o(h)}}function c(d){d.done?s(d.value):function r(s){return s instanceof e?s:new e(function(o){o(s)})}(d.value).then(a,l)}c((n=n.apply(i,t||[])).next())})}(this,void 0,void 0,function*(){try{for(e=Nf(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 Ya(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 ir(i,t,e=1/0){return cn(t)?ir((n,r)=>et((s,o)=>t(n,s,r,o))(wr(i(n,r))),e):("number"==typeof t&&(e=t),ti((n,r)=>function zE(i,t,e,n,r,s,o,a){const l=[];let c=0,d=0,h=!1;const p=()=>{h&&!l.length&&!c&&t.complete()},m=b=>c{s&&t.next(b),c++;let v=!1;wr(e(b,d++)).subscribe(Yn(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(Yn(t,m,()=>{h=!0,p()})),()=>{a?.()}}(n,r,i,e)))}function yd(i=1/0){return ir($a,i)}const mo=new In(i=>i.complete());function Gu(i){return i&&cn(i.schedule)}function a_(i){return i[i.length-1]}function w0(i){return cn(a_(i))?i.pop():void 0}function $u(i){return Gu(a_(i))?i.pop():void 0}function l_(i,t=0){return ti((e,n)=>{e.subscribe(Yn(n,r=>Ya(n,i,()=>n.next(r),t),()=>Ya(n,i,()=>n.complete(),t),r=>Ya(n,i,()=>n.error(r),t)))})}function c_(i,t=0){return ti((e,n)=>{n.add(i.schedule(()=>e.subscribe(n),t))})}function d_(i,t){if(!i)throw new Error("Iterable cannot be null");return new In(e=>{Ya(e,t,()=>{const n=i[Symbol.asyncIterator]();Ya(e,t,()=>{n.next().then(r=>{r.done?e.complete():e.next(r.value)})},0,!0)})})}function Li(i,t){return t?function S0(i,t){if(null!=i){if(p0(i))return function GE(i,t){return wr(i).pipe(c_(t),l_(t))}(i,t);if(i_(i))return function WE(i,t){return new In(e=>{let n=0;return t.schedule(function(){n===i.length?e.complete():(e.next(i[n++]),e.closed||this.schedule())})})}(i,t);if(r_(i))return function $E(i,t){return wr(i).pipe(c_(t),l_(t))}(i,t);if(m0(i))return d_(i,t);if(Bf(i))return function jE(i,t){return new In(e=>{let n;return Ya(e,t,()=>{n=i[_0](),Ya(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)}),()=>cn(n?.return)&&n.return()})}(i,t);if(y0(i))return function C0(i,t){return d_(v0(i),t)}(i,t)}throw g0(i)}(i,t):wr(i)}function Mr(...i){const t=$u(i),e=function M0(i,t){return"number"==typeof a_(i)?i.pop():t}(i,1/0),n=i;return n.length?1===n.length?wr(n[0]):yd(e)(Li(n,t)):mo}function Uf(i={}){const{connector:t=(()=>new Re),resetOnError:e=!0,resetOnComplete:n=!0,resetOnRefCountZero:r=!0}=i;return s=>{let o,a,l,c=0,d=!1,h=!1;const p=()=>{a?.unsubscribe(),a=void 0},m=()=>{p(),o=l=void 0,d=h=!1},g=()=>{const b=o;m(),b?.unsubscribe()};return ti((b,v)=>{c++,!h&&!d&&p();const y=l=l??t();v.add(()=>{c--,0===c&&!h&&!d&&(a=bd(g,r))}),y.subscribe(v),!o&&c>0&&(o=new ua({next:M=>y.next(M),error:M=>{h=!0,p(),a=bd(m,e,M),y.error(M)},complete:()=>{d=!0,p(),a=bd(m,n),y.complete()}}),wr(b).subscribe(o))})(s)}}function bd(i,t,...e){if(!0===t)return void i();if(!1===t)return;const n=new ua({next:()=>{n.unsubscribe(),i()}});return wr(t(...e)).subscribe(n)}function li(i){for(let t in i)if(i[t]===li)return t;throw Error("Could not find renamed property on target object.")}function u_(i,t){for(const e in t)t.hasOwnProperty(e)&&!i.hasOwnProperty(e)&&(i[e]=t[e])}function pi(i){if("string"==typeof i)return i;if(Array.isArray(i))return"["+i.map(pi).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 Vf(i,t){return null==i||""===i?null===t?"":t:null==t||""===t?i:i+" "+t}const h_=li({__forward_ref__:li});function Gn(i){return i.__forward_ref__=Gn,i.toString=function(){return pi(this())},i}function Pt(i){return Wu(i)?i():i}function Wu(i){return"function"==typeof i&&i.hasOwnProperty(h_)&&i.__forward_ref__===Gn}function ju(i){return i&&!!i.\u0275providers}const qu="https://g.co/ng/security#xss";class pe extends Error{constructor(t,e){super(zf(t,e)),this.code=t}}function zf(i,t){return`NG0${Math.abs(i)}${t?": "+t.trim():""}`}function Qt(i){return"string"==typeof i?i:null==i?"":String(i)}function Hf(i,t){throw new pe(-201,!1)}function En(i,t){null==i&&function ni(i,t,e,n){throw new Error(`ASSERTION ERROR: ${i}`+(null==n?"":` [Expected=> ${e} ${n} ${t} <=Actual]`))}(t,i,null,"!=")}function ke(i){return{token:i.token,providedIn:i.providedIn||null,factory:i.factory,value:void 0}}function Kt(i){return{providers:i.providers||[],imports:i.imports||[]}}function Gf(i){return f_(i,xd)||f_(i,m_)}function f_(i,t){return i.hasOwnProperty(t)?i[t]:null}function p_(i){return i&&(i.hasOwnProperty(gs)||i.hasOwnProperty(D0))?i[gs]:null}const xd=li({\u0275prov:li}),gs=li({\u0275inj:li}),m_=li({ngInjectableDef:li}),D0=li({ngInjectorDef:li});var Ot=(()=>((Ot=Ot||{})[Ot.Default=0]="Default",Ot[Ot.Host=1]="Host",Ot[Ot.Self=2]="Self",Ot[Ot.SkipSelf=4]="SkipSelf",Ot[Ot.Optional=8]="Optional",Ot))();let $f;function qs(i){const t=$f;return $f=i,t}function _s(i,t,e){const n=Gf(i);return n&&"root"==n.providedIn?void 0===n.value?n.value=n.factory():n.value:e&Ot.Optional?null:void 0!==t?t:void Hf(pi(i))}const Rn=(()=>typeof globalThis<"u"&&globalThis||typeof global<"u"&&global||typeof window<"u"&&window||typeof self<"u"&&typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&self)(),Rl={},Ku="__NG_DI_FLAG__",mi="ngTempTokenPath",kl="ngTokenPath",g_=/\n/gm,eA="\u0275",Wf="__source";let Zu;function wd(i){const t=Zu;return Zu=i,t}function tA(i,t=Ot.Default){if(void 0===Zu)throw new pe(-203,!1);return null===Zu?_s(i,void 0,t):Zu.get(i,t&Ot.Optional?null:void 0,t)}function ee(i,t=Ot.Default){return(function T0(){return $f}()||tA)(Pt(i),t)}function Ft(i,t=Ot.Default){return ee(i,jf(t))}function jf(i){return typeof i>"u"||"number"==typeof i?i:0|(i.optional&&8)|(i.host&&1)|(i.self&&2)|(i.skipSelf&&4)}function Yf(i){const t=[];for(let e=0;e((go=go||{})[go.OnPush=0]="OnPush",go[go.Default=1]="Default",go))(),Xs=(()=>{return(i=Xs||(Xs={}))[i.Emulated=0]="Emulated",i[i.None=2]="None",i[i.ShadowDom=3]="ShadowDom",Xs;var i})();const Xa={},$n=[],Br=li({\u0275cmp:li}),Ju=li({\u0275dir:li}),vc=li({\u0275pipe:li}),y_=li({\u0275mod:li}),pa=li({\u0275fac:li}),eh=li({__NG_ELEMENT_ID__:li});let nA=0;function ot(i){return qa(()=>{const t=_o(i),e={...t,decls:i.decls,vars:i.vars,template:i.template,consts:i.consts||null,ngContentSelectors:i.ngContentSelectors,onPush:i.changeDetection===go.OnPush,directiveDefs:null,pipeDefs:null,dependencies:t.standalone&&i.dependencies||null,getStandaloneInjector:null,data:i.data||{},encapsulation:i.encapsulation||Xs.Emulated,id:"c"+nA++,styles:i.styles||$n,_:null,schemas:i.schemas||null,tView:null};b_(e);const n=i.dependencies;return e.directiveDefs=Xf(n,!1),e.pipeDefs=Xf(n,!0),e})}function th(i,t,e){const n=i.\u0275cmp;n.directiveDefs=Xf(t,!1),n.pipeDefs=Xf(e,!0)}function iA(i){return Hn(i)||Ur(i)}function Cd(i){return null!==i}function nn(i){return qa(()=>({type:i.type,bootstrap:i.bootstrap||$n,declarations:i.declarations||$n,imports:i.imports||$n,exports:i.exports||$n,transitiveCompileScopes:null,schemas:i.schemas||null,id:i.id||null}))}function qf(i,t){if(null==i)return Xa;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 ve(i){return qa(()=>{const t=_o(i);return b_(t),t})}function Hi(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 Hn(i){return i[Br]||null}function Ur(i){return i[Ju]||null}function vs(i){return i[vc]||null}function ur(i,t){const e=i[y_]||null;if(!e&&!0===t)throw new Error(`Type ${pi(i)} does not have '\u0275mod' property.`);return e}function _o(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||$n,viewQuery:i.viewQuery||null,features:i.features||null,setInput:null,findHostDirectiveDefs:null,hostDirectives:null,inputs:qf(i.inputs,t),outputs:qf(i.outputs)}}function b_(i){i.features?.forEach(t=>t(i))}function Xf(i,t){if(!i)return null;const e=t?vs:iA;return()=>("function"==typeof i?i():i).map(n=>e(n)).filter(Cd)}const Ka=0,at=1,fn=2,Ni=3,ys=4,X=5,ue=6,oe=7,Be=8,$t=9,Vn=10,yt=11,oi=12,yc=13,R0=14,Sr=15,rr=16,nh=17,zo=18,Ks=19,Pl=20,ii=21,yi=22,Ed=1,k0=2,Kf=7,Zf=8,Za=9,Bi=10;function bs(i){return Array.isArray(i)&&"object"==typeof i[Ed]}function xs(i){return Array.isArray(i)&&!0===i[Ed]}function Qf(i){return 0!=(4&i.flags)}function Ad(i){return i.componentOffset>-1}function bc(i){return 1==(1&i.flags)}function vo(i){return!!i.template}function ih(i){return 0!=(256&i[fn])}function Qa(i,t){return i.hasOwnProperty(pa)?i[pa]:null}class Td{constructor(t,e,n){this.previousValue=t,this.currentValue=e,this.firstChange=n}isFirstChange(){return this.firstChange}}function bi(){return Id}function Id(i){return i.type.prototype.ngOnChanges&&(i.setInput=Rd),tp}function tp(){const i=N0(this),t=i?.current;if(t){const e=i.previous;if(e===Xa)i.previous=t;else for(let n in t)e[n]=t[n];i.current=null,this.ngOnChanges(t)}}function Rd(i,t,e,n){const r=this.declaredInputs[e],s=N0(i)||function lA(i,t){return i[L0]=t}(i,{previous:Xa,current:null}),o=s.current||(s.current={}),a=s.previous,l=a[r];o[r]=new Td(l&&l.currentValue,t,a===Xa),i[n]=t}bi.ngInherit=!0;const L0="__ngSimpleChanges__";function N0(i){return i[L0]||null}const Qr=function(i,t,e){},kd="svg";function I(i){for(;Array.isArray(i);)i=i[Ka];return i}function xc(i,t){return I(t[i])}function Ei(i,t){return I(t[i.index])}function B0(i,t){return i.data[t]}function Od(i,t){return i[t]}function ws(i,t){const e=t[i];return bs(e)?e:e[Ka]}function np(i){return 64==(64&i[fn])}function Ol(i,t){return null==t?null:i[t]}function U0(i){i[zo]=0}function A_(i,t){i[X]+=t;let e=i,n=i[Ni];for(;null!==n&&(1===t&&1===e[X]||-1===t&&0===e[X]);)n[X]+=t,e=n,n=n[Ni]}const kt={lFrame:el(null),bindingsEnabled:!0};function ma(){return kt.bindingsEnabled}function Se(){return kt.lFrame.lView}function zn(){return kt.lFrame.tView}function an(i){return kt.lFrame.contextLView=i,i[Be]}function zt(i){return kt.lFrame.contextLView=null,i}function Er(){let i=z0();for(;null!==i&&64===i.type;)i=i.parent;return i}function z0(){return kt.lFrame.currentTNode}function ga(i,t){const e=kt.lFrame;e.currentTNode=i,e.isParent=t}function D_(){return kt.lFrame.isParent}function T_(){kt.lFrame.isParent=!1}function Vr(){const i=kt.lFrame;let t=i.bindingRootIndex;return-1===t&&(t=i.bindingRootIndex=i.tView.bindingStartIndex),t}function Fl(){return kt.lFrame.bindingIndex++}function Zs(i){const t=kt.lFrame,e=t.bindingIndex;return t.bindingIndex=t.bindingIndex+i,e}function $0(i,t){const e=kt.lFrame;e.bindingIndex=e.bindingRootIndex=i,Ho(t)}function Ho(i){kt.lFrame.currentDirectiveIndex=i}function rh(i){const t=kt.lFrame.currentDirectiveIndex;return-1===t?null:i[t]}function Ll(){return kt.lFrame.currentQueryIndex}function Ms(i){kt.lFrame.currentQueryIndex=i}function vA(i){const t=i[at];return 2===t.type?t.declTNode:1===t.type?i[ue]:null}function R_(i,t,e){if(e&Ot.SkipSelf){let r=t,s=i;for(;!(r=r.parent,null!==r||e&Ot.Host||(r=vA(s),null===r||(s=s[Sr],10&r.type))););if(null===r)return!1;t=r,i=s}const n=kt.lFrame=Fd();return n.currentTNode=t,n.lView=i,!0}function rp(i){const t=Fd(),e=i[at];kt.lFrame=t,t.currentTNode=e.firstChild,t.lView=i,t.tView=e,t.contextLView=i,t.bindingIndex=e.bindingStartIndex,t.inI18n=!1}function Fd(){const i=kt.lFrame,t=null===i?null:i.child;return null===t?el(i):t}function el(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 k_(){const i=kt.lFrame;return kt.lFrame=i.parent,i.currentTNode=null,i.lView=null,i}const W0=k_;function Ld(){const i=k_();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 Xn(){return kt.lFrame.selectedIndex}function tl(i){kt.lFrame.selectedIndex=i}function Ai(){const i=kt.lFrame;return B0(i.tView,i.selectedIndex)}function Ri(){kt.lFrame.currentNamespace=kd}function _a(){!function Mc(){kt.lFrame.currentNamespace=null}()}function Nd(i,t){for(let e=t.directiveStart,n=t.directiveEnd;e=n)break}else t[l]<0&&(i[zo]+=65536),(a>11>16&&(3&i[fn])===t){i[fn]+=2048,Qr(4,a,s);try{s.call(a)}finally{Qr(5,a,s)}}}else{Qr(4,a,s);try{s.call(a)}finally{Qr(5,a,s)}}}const va=-1;class Bd{constructor(t,e,n){this.factory=t,this.resolving=!1,this.canSeeViewProviders=e,this.injectImpl=n}}function L_(i,t,e){let n=0;for(;nt){o=s-1;break}}}for(;s>16}(i),n=t;for(;e>0;)n=n[Sr],e--;return n}let Ud=!0;function cp(i){const t=Ud;return Ud=i,t}const B_=255,Z0=5;let Q0=0;const ya={};function ah(i,t){const e=J0(i,t);if(-1!==e)return e;const n=t[at];n.firstCreatePass&&(i.injectorIndex=t.length,lh(n.data,i),lh(t,null),lh(n.blueprint,null));const r=ch(i,t),s=i.injectorIndex;if(lp(r)){const o=sh(r),a=oh(r,t),l=a[at].data;for(let c=0;c<8;c++)t[s+c]=a[o+c]|l[o+c]}return t[s+8]=r,s}function lh(i,t){i.push(0,0,0,0,0,0,0,0,t)}function J0(i,t){return-1===i.injectorIndex||i.parent&&i.parent.injectorIndex===i.injectorIndex||null===t[i.injectorIndex+8]?-1:i.injectorIndex}function ch(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=uh(r),null===n)return va;if(e++,r=r[Sr],-1!==n.injectorIndex)return n.injectorIndex|e<<16}return va}function pn(i,t,e){!function U_(i,t,e){let n;"string"==typeof e?n=e.charCodeAt(0)||0:e.hasOwnProperty(eh)&&(n=e[eh]),null==n&&(n=e[eh]=Q0++);const r=n&B_;t.data[i+(r>>Z0)]|=1<=0?t&B_:Qs:t}(e);if("function"==typeof s){if(!R_(t,i,n))return n&Ot.Host?ex(r,0,n):Vd(t,e,n,r);try{const o=s(n);if(null!=o||n&Ot.Optional)return o;Hf()}finally{W0()}}else if("number"==typeof s){let o=null,a=J0(i,t),l=va,c=n&Ot.Host?t[rr][ue]:null;for((-1===a||n&Ot.SkipSelf)&&(l=-1===a?ch(i,t):t[a+8],l!==va&&z_(n,!1)?(o=t[at],a=sh(l),t=oh(l,t)):a=-1);-1!==a;){const d=t[at];if(up(s,a,d.data)){const h=EA(a,t,e,o,n,c);if(h!==ya)return h}l=t[a+8],l!==va&&z_(n,t[at].data[a+8]===c)&&up(s,a,t)?(o=d,a=sh(l),t=oh(l,t)):a=-1}}return r}function EA(i,t,e,n,r,s){const o=t[at],a=o.data[i+8],d=ts(a,o,e,null==n?Ad(a)&&Ud:n!=o&&0!=(3&a.type),r&Ot.Host&&s===a);return null!==d?Ec(t,o,d,a):ya}function ts(i,t,e,n,r){const s=i.providerIndexes,o=t.data,a=1048575&s,l=i.directiveStart,d=s>>20,p=r?a+d:i.directiveEnd;for(let m=n?a:a+d;m=l&&g.type===e)return m}if(r){const m=o[l];if(m&&vo(m)&&m.type===e)return l}return null}function Ec(i,t,e,n){let r=i[e];const s=t.data;if(function xA(i){return i instanceof Bd}(r)){const o=r;o.resolving&&function E0(i,t){const e=t?`. Dependency path: ${t.join(" > ")} > ${i}`:"";throw new pe(-200,`Circular dependency in DI detected for ${i}${e}`)}(function qn(i){return"function"==typeof i?i.name||i.toString():"object"==typeof i&&null!=i&&"function"==typeof i.type?i.type.name||i.type.toString():Qt(i)}(s[e]));const a=cp(o.canSeeViewProviders);o.resolving=!0;const l=o.injectImpl?qs(o.injectImpl):null;R_(i,n,Ot.Default);try{r=i[e]=o.factory(void 0,s,i,n),t.firstCreatePass&&e>=n.directiveStart&&function es(i,t,e){const{ngOnChanges:n,ngOnInit:r,ngDoCheck:s}=t.type.prototype;if(n){const o=Id(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&&qs(l),cp(a),o.resolving=!1,W0()}}return r}function up(i,t,e){return!!(e[t+(i>>Z0)]&1<{const t=i.prototype.constructor,e=t[pa]||dh(t),n=Object.prototype;let r=Object.getPrototypeOf(i.prototype).constructor;for(;r&&r!==n;){const s=r[pa]||dh(r);if(s&&s!==e)return s;r=Object.getPrototypeOf(r)}return s=>new s})}function dh(i){return Wu(i)?()=>{const t=dh(Pt(i));return t&&t()}:Qa(i)}function uh(i){const t=i[at],e=t.type;return 2===e?t.declTNode:1===e?i[ue]:null}function ba(i){return function SA(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 xa(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,d){const h=l.hasOwnProperty(Dc)?l[Dc]:Object.defineProperty(l,Dc,{value:[]})[Dc];for(;h.length<=d;)h.push(null);return(h[d]=h[d]||[]).push(o),l}}return e&&(r.prototype=Object.create(e.prototype)),r.prototype.ngMetadataName=i,r.annotationCls=r,r})}class me{constructor(t,e){this._desc=t,this.ngMetadataName="InjectionToken",this.\u0275prov=void 0,"number"==typeof e?this.__NG_ELEMENT_ID__=e:void 0!==e&&(this.\u0275prov=ke({token:this,providedIn:e.providedIn||"root",factory:e.factory}))}get multi(){return this}toString(){return`InjectionToken ${this._desc}`}}function Ul(i,t){i.forEach(e=>Array.isArray(e)?Ul(e,t):t(e))}function G_(i,t,e){t>=i.length?i.push(e):i.splice(t,0,e)}function pp(i,t){return t>=i.length-1?i.pop():i.splice(t,1)[0]}function Gd(i,t){const e=[];for(let n=0;n=0?i[1|n]=e:(n=~n,function IA(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 Wd(i,t){const e=Ic(i,t);if(e>=0)return i[1|e]}function Ic(i,t){return function gp(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),Ss=Md(zd("Optional"),8),wa=Md(zd("SkipSelf"),4);var Es=(()=>((Es=Es||{})[Es.Important=1]="Important",Es[Es.DashCase=2]="DashCase",Es))();const Cp=new Map;let vx=0;const iv="__ngContext__";function Hr(i,t){bs(t)?(i[iv]=t[Pl],function yx(i){Cp.set(i[Pl],i)}(t)):i[iv]=t}let sv;function ov(i,t){return sv(i,t)}function vh(i){const t=i[Ni];return xs(t)?t[Ni]:t}function av(i){return Dx(i[yc])}function lv(i){return Dx(i[ys])}function Dx(i){for(;null!==i&&!xs(i);)i=i[ys];return i}function Tr(i,t,e,n,r){if(null!=n){let s,o=!1;xs(n)?s=n:bs(n)&&(o=!0,n=n[Ka]);const a=I(n);0===i&&null!==e?null==r?Ox(t,e,a):Pc(t,e,a,r||null,!0):1===i&&null!==e?Pc(t,e,a,r||null,!0):2===i?function mv(i,t,e){const n=Ap(i,t);n&&function QA(i,t,e,n){i.removeChild(t,e,n)}(i,n,t,e)}(t,a,o):3===i&&t.destroyNode(a),null!=s&&function zx(i,t,e,n,r){const s=e[Kf];s!==I(e)&&Tr(t,i,n,s,r);for(let a=Bi;a0&&(i[e-1][ys]=n[ys]);const s=pp(i,Bi+t);!function WA(i,t){bh(i,t,t[yt],2,null,null),t[Ka]=null,t[ue]=null}(n[at],n);const o=s[Ks];null!==o&&o.detachView(s[at]),n[Ni]=null,n[ys]=null,n[fn]&=-65}return n}function Rx(i,t){if(!(128&t[fn])){const e=t[yt];e.destroyNode&&bh(i,t,e,3,null,null),function qA(i){let t=i[yc];if(!t)return hv(i[at],i);for(;t;){let e=null;if(bs(t))e=t[yc];else{const n=t[Bi];n&&(e=n)}if(!e){for(;t&&!t[ys]&&t!==i;)bs(t)&&hv(t[at],t),t=t[Ni];null===t&&(t=i),bs(t)&&hv(t[at],t),e=t&&t[ys]}t=e}}(t)}}function hv(i,t){if(!(128&t[fn])){t[fn]&=-65,t[fn]|=128,function ZA(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===Xs.None||s===Xs.Emulated)return null}return Ei(n,e)}}(i,t.parent,e)}function Pc(i,t,e,n,r){i.insertBefore(t,e,n,r)}function Ox(i,t,e){i.appendChild(t,e)}function Fx(i,t,e,n,r){null!==n?Pc(i,t,e,n,r):Ox(i,t,e)}function Ap(i,t){return i.parentNode(t)}function Lx(i,t,e){return Bx(i,t,e)}let fv,Rp,vv,Bx=function Nx(i,t,e){return 40&i.type?Ei(i,e):null};function yh(i,t,e,n){const r=kx(i,n,t),s=t[yt],a=Lx(n.parent||t[ue],n,t);if(null!=r)if(Array.isArray(e))for(let l=0;li,createScript:i=>i,createScriptURL:i=>i})}catch{}return Rp}()?.createHTML(i)||i}class Vl{constructor(t){this.changingThisBreaksApplicationSecurity=t}toString(){return`SafeValue must use [property]=binding: ${this.changingThisBreaksApplicationSecurity} (see ${qu})`}}class oD extends Vl{getTypeName(){return"HTML"}}class aD extends Vl{getTypeName(){return"Style"}}class lD extends Vl{getTypeName(){return"Script"}}class cD extends Vl{getTypeName(){return"URL"}}class Pp extends Vl{getTypeName(){return"ResourceURL"}}function eo(i){return i instanceof Vl?i.changingThisBreaksApplicationSecurity:i}function Ca(i,t){const e=function dD(i){return i instanceof Vl&&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 ${qu})`)}return e===t}class gD{constructor(t){this.inertDocumentHelper=t}getInertBodyElement(t){t=""+t;try{const e=(new window.DOMParser).parseFromString(jd(t),"text/html").body;return null===e?this.inertDocumentHelper.getInertBodyElement(t):(e.removeChild(e.firstChild),e)}catch{return null}}}class _D{constructor(t){this.defaultDoc=t,this.inertDocument=this.defaultDoc.implementation.createHTMLDocument("sanitization-inert")}getInertBodyElement(t){const e=this.inertDocument.createElement("template");return e.innerHTML=jd(t),e}}const vD=/^(?!javascript:)(?:[a-z0-9+.-]+:|[^&:\/?#]*(?:[\/?#]|$))/i;function xh(i){return(i=String(i)).match(vD)?i:"unsafe:"+i}function Sa(i){const t={};for(const e of i.split(","))t[e]=!0;return t}function Oc(...i){const t={};for(const e of i)for(const n in e)e.hasOwnProperty(n)&&(t[n]=!0);return t}const xv=Sa("area,br,col,hr,img,wbr"),wv=Sa("colgroup,dd,dt,li,p,tbody,td,tfoot,th,thead,tr"),Mv=Sa("rp,rt"),Cv=Oc(xv,Oc(wv,Sa("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")),Oc(Mv,Sa("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")),Oc(Mv,wv)),Yd=Sa("background,cite,href,itemtype,longdesc,poster,src,xlink:href"),qx=Oc(Yd,Sa("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"),Sa("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")),Ev=Sa("script,style,template");class Xx{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(!Cv.hasOwnProperty(e))return this.sanitizedSomething=!0,!Ev.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();Cv.hasOwnProperty(e)&&!xv.hasOwnProperty(e)&&(this.buf.push(""))}chars(t){this.buf.push(Kx(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 bD=/[\uD800-\uDBFF][\uDC00-\uDFFF]/g,xD=/([^\#-~ |!])/g;function Kx(i){return i.replace(/&/g,"&").replace(bD,function(t){return"&#"+(1024*(t.charCodeAt(0)-55296)+(t.charCodeAt(1)-56320)+65536)+";"}).replace(xD,function(t){return"&#"+t.charCodeAt(0)+";"}).replace(//g,">")}let Fp;function Zx(i,t){let e=null;try{Fp=Fp||function Yx(i){const t=new _D(i);return function Op(){try{return!!(new window.DOMParser).parseFromString(jd(""),"text/html")}catch{return!1}}()?new gD(t):t}(i);let n=t?String(t):"";e=Fp.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=Fp.getInertBodyElement(n)}while(n!==s);return jd((new Xx).sanitizeChildren(Av(e)||e))}finally{if(e){const n=Av(e)||e;for(;n.firstChild;)n.removeChild(n.firstChild)}}}function Av(i){return"content"in i&&function wD(i){return i.nodeType===Node.ELEMENT_NODE&&"TEMPLATE"===i.nodeName}(i)?i.content:null}var Kn=(()=>((Kn=Kn||{})[Kn.NONE=0]="NONE",Kn[Kn.HTML=1]="HTML",Kn[Kn.STYLE=2]="STYLE",Kn[Kn.SCRIPT=3]="SCRIPT",Kn[Kn.URL=4]="URL",Kn[Kn.RESOURCE_URL=5]="RESOURCE_URL",Kn))();function Lp(i){const t=function xi(){const i=Se();return i&&i[oi]}();return t?t.sanitize(Kn.URL,i)||"":Ca(i,"URL")?eo(i):xh(Qt(i))}const Np=new me("ENVIRONMENT_INITIALIZER"),rl=new me("INJECTOR",-1),Jx=new me("INJECTOR_DEF_TYPES");class ew{get(t,e=Rl){if(e===Rl){const n=new Error(`NullInjectorError: No provider for ${pi(t)}!`);throw n.name="NullInjectorError",n}return e}}function AD(...i){return{\u0275providers:tw(0,i),\u0275fromNgModule:!0}}function tw(i,...t){const e=[],n=new Set;let r;return Ul(t,s=>{const o=s;Dv(o,e,[],n)&&(r||(r=[]),r.push(o))}),void 0!==r&&Bp(r,e),e}function Bp(i,t){for(let e=0;e{t.push(s)})}}function Dv(i,t,e,n){if(!(i=Pt(i)))return!1;let r=null,s=p_(i);const o=!s&&Hn(i);if(s||o){if(o&&!o.standalone)return!1;r=i}else{const l=i.ngModule;if(s=p_(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)Dv(c,t,e,n)}}else{if(!s)return!1;{if(null!=s.imports&&!a){let c;n.add(r);try{Ul(s.imports,d=>{Dv(d,t,e,n)&&(c||(c=[]),c.push(d))})}finally{}void 0!==c&&Bp(c,t)}if(!a){const c=Qa(r)||(()=>new r);t.push({provide:r,useFactory:c,deps:$n},{provide:Jx,useValue:r,multi:!0},{provide:Np,useValue:()=>ee(r),multi:!0})}const l=s.providers;null==l||a||Up(l,d=>{t.push(d)})}}return r!==i&&void 0!==i.providers}function Up(i,t){for(let e of i)ju(e)&&(e=e.\u0275providers),Array.isArray(e)?Up(e,t):t(e)}const Vp=li({provide:String,useValue:li});function wi(i){return null!==i&&"object"==typeof i&&Vp in i}function Lc(i){return"function"==typeof i}const Iv=new me("Set Injector scope."),zp={},TD={};let Rv;function wh(){return void 0===Rv&&(Rv=new ew),Rv}class no{}class Hp extends no{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,Pv(t,o=>this.processProvider(o)),this.records.set(rl,Wo(void 0,this)),r.has("environment")&&this.records.set(no,Wo(void 0,this));const s=this.records.get(Iv);null!=s&&"string"==typeof s.value&&this.scopes.add(s.value),this.injectorDefTypes=new Set(this.get(Jx.multi,$n,Ot.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=wd(this),n=qs(void 0);try{return t()}finally{wd(e),qs(n)}}get(t,e=Rl,n=Ot.Default){this.assertNotDestroyed(),n=jf(n);const r=wd(this),s=qs(void 0);try{if(!(n&Ot.SkipSelf)){let a=this.records.get(t);if(void 0===a){const l=function kD(i){return"function"==typeof i||"object"==typeof i&&i instanceof me}(t)&&Gf(t);a=l&&this.injectableDefInScope(l)?Wo(kv(t),zp):null,this.records.set(t,a)}if(null!=a)return this.hydrate(t,a)}return(n&Ot.Self?wh():this.parent).get(t,e=n&Ot.Optional&&e===Rl?null:e)}catch(o){if("NullInjectorError"===o.name){if((o[mi]=o[mi]||[]).unshift(pi(t)),r)throw o;return function v_(i,t,e,n){const r=i[mi];throw t[Wf]&&r.unshift(t[Wf]),i.message=function I0(i,t,e,n=null){i=i&&"\n"===i.charAt(0)&&i.charAt(1)==eA?i.slice(2):i;let r=pi(t);if(Array.isArray(t))r=t.map(pi).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):pi(a)))}r=`{${s.join(", ")}}`}return`${e}${n?"("+n+")":""}[${r}]: ${i.replace(g_,"\n ")}`}("\n"+i.message,r,e,n),i[kl]=r,i[mi]=null,i}(o,t,"R3InjectorError",this.source)}throw o}finally{qs(s),wd(r)}}resolveInjectorInitializers(){const t=wd(this),e=qs(void 0);try{const n=this.get(Np.multi,$n,Ot.Self);for(const r of n)r()}finally{wd(t),qs(e)}}toString(){const t=[],e=this.records;for(const n of e.keys())t.push(pi(n));return`R3Injector[${t.join(", ")}]`}assertNotDestroyed(){if(this._destroyed)throw new pe(205,!1)}processProvider(t){let e=Lc(t=Pt(t))?t:Pt(t&&t.provide);const n=function Gp(i){return wi(i)?Wo(void 0,i.useValue):Wo(As(i),zp)}(t);if(Lc(t)||!0!==t.multi)this.records.get(e);else{let r=this.records.get(e);r||(r=Wo(void 0,zp,!0),r.factory=()=>Yf(r.multi),this.records.set(e,r)),e=t,r.multi.push(t)}this.records.set(e,n)}hydrate(t,e){return e.value===zp&&(e.value=TD,e.value=e.factory()),"object"==typeof e.value&&e.value&&function RD(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=Pt(t.providedIn);return"string"==typeof e?"any"===e||this.scopes.has(e):this.injectorDefTypes.has(e)}}function kv(i){const t=Gf(i),e=null!==t?t.factory:Qa(i);if(null!==e)return e;if(i instanceof me)throw new pe(204,!1);if(i instanceof Function)return function nw(i){const t=i.length;if(t>0)throw Gd(t,"?"),new pe(204,!1);const e=function Xu(i){return i&&(i[xd]||i[m_])||null}(i);return null!==e?()=>e.factory(i):()=>new i}(i);throw new pe(204,!1)}function As(i,t,e){let n;if(Lc(i)){const r=Pt(i);return Qa(r)||kv(r)}if(wi(i))n=()=>Pt(i.useValue);else if(function Tv(i){return!(!i||!i.useFactory)}(i))n=()=>i.useFactory(...Yf(i.deps||[]));else if(function ki(i){return!(!i||!i.useExisting)}(i))n=()=>ee(Pt(i.useExisting));else{const r=Pt(i&&(i.useClass||i.provide));if(!function ID(i){return!!i.deps}(i))return Qa(r)||kv(r);n=()=>new r(...Yf(i.deps))}return n}function Wo(i,t,e=!1){return{factory:i,value:t,multi:e?[]:void 0}}function Pv(i,t){for(const e of i)Array.isArray(e)?Pv(e,t):e&&ju(e)?Pv(e.\u0275providers,t):t(e)}class PD{}class Ov{}class xo{resolveComponentFactory(t){throw function sl(i){const t=Error(`No component factory found for ${pi(i)}. Did you add it to @NgModule.entryComponents?`);return t.ngComponent=i,t}(t)}}let Hl=(()=>{class i{}return i.NULL=new xo,i})();function FD(){return Fn(Er(),Se())}function Fn(i,t){return new mt(Ei(i,t))}let mt=(()=>{class i{constructor(e){this.nativeElement=e}}return i.__NG_ELEMENT_ID__=FD,i})();function iw(i){return i instanceof mt?i.nativeElement:i}class Gl{}let ol=(()=>{class i{}return i.__NG_ELEMENT_ID__=()=>function LD(){const i=Se(),e=ws(Er().index,i);return(bs(e)?e:i)[yt]}(),i})(),ND=(()=>{class i{}return i.\u0275prov=ke({token:i,providedIn:"root",factory:()=>null}),i})();class Nc{constructor(t){this.full=t,this.major=t.split(".")[0],this.minor=t.split(".")[1],this.patch=t.split(".").slice(2).join(".")}}const BD=new Nc("15.2.10"),Fv={},Lv="ngOriginalError";function Nv(i){return i[Lv]}class al{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&&Nv(t);for(;e&&Nv(e);)e=Nv(e);return e||null}}function ll(i){return i instanceof Function?i():i}function sw(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 ow="ng-template";function jD(i,t,e){let n=0,r=!0;for(;ns?"":r[h+1].toLowerCase();const m=8&n?p:null;if(m&&-1!==sw(m,c,0)||2&n&&c!==p){if(jo(n))return!1;o=!0}}}}else{if(!o&&!jo(n)&&!jo(l))return!1;if(o&&jo(l))continue;o=!1,n=l|1&n}}return jo(n)||o}function jo(i){return 0==(1&i)}function aw(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&&!jo(o)&&(t+=Bc(s,r),r=""),n=o,s=s||!jo(n);e++}return""!==r&&(t+=Bc(s,r)),t}const sn={};function G(i){Hv(zn(),Se(),Xn()+i,!1)}function Hv(i,t,e,n){if(!n)if(3==(3&t[fn])){const s=i.preOrderCheckHooks;null!==s&&sp(t,s,e)}else{const s=i.preOrderHooks;null!==s&&op(t,s,0,e)}tl(e)}function dw(i,t=null,e=null,n){const r=uw(i,t,e,n);return r.resolveInjectorInitializers(),r}function uw(i,t=null,e=null,n,r=new Set){const s=[e||$n,AD(i)];return n=n||("object"==typeof i?void 0:pi(i)),new Hp(s,t||wh(),n||null,r)}let Gi=(()=>{class i{static create(e,n){if(Array.isArray(e))return dw({name:""},n,e,"");{const r=e.name??"";return dw({name:r},e.parent,e.providers,r)}}}return i.THROW_IF_NOT_FOUND=Rl,i.NULL=new ew,i.\u0275prov=ke({token:i,providedIn:"any",factory:()=>ee(rl)}),i.__NG_ELEMENT_ID__=-1,i})();function E(i,t=Ot.Default){const e=Se();return null===e?ee(i,t):V_(Er(),e,Pt(i),t)}function wo(){throw new Error("invalid")}function _w(i,t){const e=i.contentQueries;if(null!==e)for(let n=0;nyi&&Hv(i,t,yi,!1),Qr(o?2:0,r),e(n,r)}finally{tl(s),Qr(o?3:1,r)}}function Zv(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,Ch(i,e,r.hostVars,sn),r)}function be(i,t,e,n,r,s){const o=Ei(i,t);!function Xe(i,t,e,n,r,s,o){if(null==s)i.removeAttribute(t,r,e);else{const a=null==o?Qt(s):o(s,n||"",r);i.setAttribute(t,r,a,e)}}(t[yt],o,s,i.value,e,n,r)}function vt(i,t,e,n,r,s){const o=s[t];if(null!==o){const a=n.setInput;for(let l=0;l0&&rs(e)}}function rs(i){for(let n=av(i);null!==n;n=lv(n))for(let r=Bi;r0&&rs(s)}const e=i[at].components;if(null!==e)for(let n=0;n0&&rs(r)}}function ss(i,t){const e=ws(t,i),n=e[at];(function ro(i,t){for(let e=t.length;e-1&&(uv(t,n),pp(e,n))}this._attachedToViewContainer=!1}Rx(this._lView[at],this._lView)}onDestroy(t){bw(this._lView[at],this._lView,null,t)}markForCheck(){Ts(this._cdRefInjectingView||this._lView)}detach(){this._lView[fn]&=-65}reattach(){this._lView[fn]|=64}detectChanges(){Mo(this._lView[at],this._lView,this.context)}checkNoChanges(){}attachToViewContainerRef(){if(this._appRef)throw new pe(902,!1);this._attachedToViewContainer=!0}detachFromAppRef(){this._appRef=null,function YA(i,t){bh(i,t,t[yt],2,null,null)}(this._lView[at],this._lView)}attachToAppRef(t){if(this._attachedToViewContainer)throw new pe(902,!1);this._appRef=t}}class b8 extends ny{constructor(t){super(t),this._view=t}detectChanges(){const t=this._view;Mo(t[at],t,t[Be],!1)}checkNoChanges(){}get context(){return null}}class KF extends Hl{constructor(t){super(),this.ngModule=t}resolveComponentFactory(t){const e=Hn(t);return new iy(e,this.ngModule)}}function ZF(i){const t=[];for(let e in i)i.hasOwnProperty(e)&&t.push({propName:i[e],templateName:e});return t}class w8{constructor(t,e){this.injector=t,this.parentInjector=e}get(t,e,n){n=jf(n);const r=this.injector.get(t,Fv,n);return r!==Fv||e===Fv?r:this.parentInjector.get(t,e,n)}}class iy extends Ov{get inputs(){return ZF(this.componentDef.inputs)}get outputs(){return ZF(this.componentDef.outputs)}constructor(t,e){super(),this.componentDef=t,this.ngModule=e,this.componentType=t.type,this.selector=function e1(i){return i.map(JD).join(",")}(t.selectors),this.ngContentSelectors=t.ngContentSelectors?t.ngContentSelectors:[],this.isBoundToModule=!!e}create(t,e,n,r){let s=(r=r||this.ngModule)instanceof no?r:r?.injector;s&&null!==this.componentDef.getStandaloneInjector&&(s=this.componentDef.getStandaloneInjector(s)||s);const o=s?new w8(t,s):t,a=o.get(Gl,null);if(null===a)throw new pe(407,!1);const l=o.get(ND,null),c=a.createRenderer(null,this.componentDef),d=this.componentDef.selectors[0][0]||"div",h=n?function M1(i,t,e){return i.selectRootElement(t,e===Xs.ShadowDom)}(c,n,this.componentDef.encapsulation):Ep(c,d,function x8(i){const t=i.toLowerCase();return"svg"===t?kd:"math"===t?"math":null}(d)),p=this.componentDef.onPush?288:272,m=ey(0,null,null,1,0,null,null,null,null,null),g=Mh(null,m,null,p,null,null,a,c,l,o,null);let b,v;rp(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 C8(i,t){const e=i[at],n=yi;return i[n]=t,Zd(e,n,2,"#host",null)}(g,h),F=function S8(i,t,e,n,r,s,o,a){const l=r[at];!function E8(i,t,e,n){for(const r of i)t.mergedAttrs=Sc(t.mergedAttrs,r.hostAttrs);null!==t.mergedAttrs&&(Cw(t,t.mergedAttrs,!0),null!==e&&Gx(n,e,t))}(n,i,t,o);const c=s.createRenderer(t,e),d=Mh(r,yw(e),null,e.onPush?32:16,r[i.index],i,s,c,a||null,null,null);return l.firstCreatePass&&P(l,i,n.length-1),Di(r,d),r[i.index]=d}(C,h,y,M,g,a,c);v=B0(m,yi),h&&function D8(i,t,e,n){if(n)L_(i,e,["ng-version",BD.full]);else{const{attrs:r,classes:s}=function t1(i){const t=[],e=[];let n=1,r=2;for(;n0&&Hx(i,e,s.join(" "))}}(c,y,h,n),void 0!==e&&function T8(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=Sc(r.hostAttrs,e=Sc(e,r.hostAttrs))}}(n)}function P1(i){return i===Xa?{}:i===$n?[]:i}function k8(i,t){const e=i.viewQuery;i.viewQuery=e?(n,r)=>{t(n,r),e(n,r)}:t}function P8(i,t){const e=i.contentQueries;i.contentQueries=e?(n,r,s)=>{t(n,r,s),e(n,r,s)}:t}function O8(i,t){const e=i.hostBindings;i.hostBindings=e?(n,r)=>{t(n,r),e(n,r)}:t}function Ew(i){return!!O1(i)&&(Array.isArray(i)||!(i instanceof Map)&&Symbol.iterator in i)}function O1(i){return null!==i&&("function"==typeof i||"object"==typeof i)}function $l(i,t,e){return i[t]=e}function Is(i,t,e){return!Object.is(i[t],e)&&(i[t]=e,!0)}function Eh(i,t,e,n){const r=Is(i,t,e);return Is(i,t+1,n)||r}function Dt(i,t,e,n){const r=Se();return Is(r,Fl(),t)&&(zn(),be(Ai(),r,i,t,e,n)),Dt}function jp(i,t,e,n){return Is(i,Fl(),e)?t+Qt(e)+n:sn}function Yp(i,t,e,n,r,s){const a=Eh(i,function Ja(){return kt.lFrame.bindingIndex}(),e,r);return Zs(2),a?t+Qt(e)+n+Qt(r)+s:sn}function fe(i,t,e,n,r,s,o,a){const l=Se(),c=zn(),d=i+yi,h=c.firstCreatePass?function $8(i,t,e,n,r,s,o,a,l){const c=t.consts,d=Zd(t,i,4,o||null,Ol(c,a));ty(t,e,d,Ol(c,l)),Nd(t,d);const h=d.tView=ey(2,d,n,r,s,t.directiveRegistry,t.pipeRegistry,null,t.schemas,c);return null!==t.queries&&(t.queries.template(t,d),h.queries=t.queries.embeddedTView(d)),d}(d,c,l,t,e,n,r,s,o):c.data[d];ga(h,!1);const p=l[yt].createComment("");yh(c,l,p,h),Hr(p,l),Di(l,l[d]=mn(p,l,p,h)),bc(h)&&Qv(c,l,h),null!=o&&Jv(l,h,a)}function Ki(i){return Od(function gA(){return kt.lFrame.contextLView}(),yi+i)}function U(i,t,e){const n=Se();return Is(n,Fl(),t)&&io(zn(),Ai(),n,i,t,n[yt],e,!1),U}function F1(i,t,e,n,r){const o=r?"class":"style";k1(i,e,t.inputs[o],o,n)}function W(i,t,e,n){const r=Se(),s=zn(),o=yi+i,a=r[yt],l=s.firstCreatePass?function j8(i,t,e,n,r,s){const o=t.consts,l=Zd(t,i,2,n,Ol(o,r));return ty(t,e,l,Ol(o,s)),null!==l.attrs&&Cw(l,l.attrs,!1),null!==l.mergedAttrs&&Cw(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]=Ep(a,t,function Y0(){return kt.lFrame.currentNamespace}()),d=bc(l);return ga(l,!0),Gx(a,c,l),32!=(32&l.flags)&&yh(s,r,c,l),0===function uA(){return kt.lFrame.elementDepthCount}()&&Hr(c,r),function hA(){kt.lFrame.elementDepthCount++}(),d&&(Qv(s,r,l),Zv(s,l,r)),null!==n&&Jv(r,l),W}function j(){let i=Er();D_()?T_():(i=i.parent,ga(i,!1));const t=i;!function fA(){kt.lFrame.elementDepthCount--}();const e=zn();return e.firstCreatePass&&(Nd(e,i),Qf(i)&&e.queries.elementEnd(i)),null!=t.classesWithoutHost&&function wA(i){return 0!=(8&i.flags)}(t)&&F1(e,t,Se(),t.classesWithoutHost,!0),null!=t.stylesWithoutHost&&function F_(i){return 0!=(16&i.flags)}(t)&&F1(e,t,Se(),t.stylesWithoutHost,!1),j}function De(i,t,e,n){return W(i,t,e,n),j(),De}function Gr(i,t,e){const n=Se(),r=zn(),s=i+yi,o=r.firstCreatePass?function Y8(i,t,e,n,r){const s=t.consts,o=Ol(s,n),a=Zd(t,i,8,"ng-container",o);return null!==o&&Cw(a,o,!0),ty(t,e,a,Ol(s,r)),null!==t.queries&&t.queries.elementStart(t,a),a}(s,r,n,t,e):r.data[s];ga(o,!0);const a=n[s]=n[yt].createComment("");return yh(r,n,a,o),Hr(a,n),bc(o)&&(Qv(r,n,o),Zv(r,o,n)),null!=e&&Jv(n,o),Gr}function $r(){let i=Er();const t=zn();return D_()?T_():(i=i.parent,ga(i,!1)),t.firstCreatePass&&(Nd(t,i),Qf(i)&&t.queries.elementEnd(i)),$r}function sy(i,t,e){return Gr(i,t,e),$r(),sy}function di(){return Se()}function oy(i){return!!i&&"function"==typeof i.then}function uL(i){return!!i&&"function"==typeof i.subscribe}const L1=uL;function Ue(i,t,e,n){const r=Se(),s=zn(),o=Er();return hL(s,r,r[yt],o,i,t,n),Ue}function N1(i,t){const e=Er(),n=Se(),r=zn();return hL(r,n,qF(rh(r.data),e,n),e,i,t),N1}function hL(i,t,e,n,r,s,o){const a=bc(n),c=i.firstCreatePass&&YF(i),d=t[Be],h=jF(t);let p=!0;if(3&n.type||o){const b=Ei(n,t),v=o?o(b):b,y=h.length,M=o?C=>o(I(C[n.index])):n.index;let x=null;if(!o&&a&&(x=function q8(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=pL(n,t,d,s,!1);const C=e.listen(v,r,s);h.push(s,C),c&&c.push(r,M,y,y+1)}}else s=pL(n,t,d,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?ws(i.index,t):t);let l=fL(t,e,n,o),c=s.__ngNextListenerFn__;for(;c;)l=fL(t,e,c,o)&&l,c=c.__ngNextListenerFn__;return r&&!1===l&&(o.preventDefault(),o.returnValue=!1),l}}function he(i=1){return function yA(i){return(kt.lFrame.contextLView=function j0(i,t){for(;i>0;)t=t[Sr],i--;return t}(i,kt.lFrame.contextLView))[Be]}(i)}function X8(i,t){let e=null;const n=function XD(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 V1(i){return 2|i}function Ah(i){return(131068&i)>>2}function z1(i,t){return-131069&i|t<<2}function H1(i){return 1|i}function ML(i,t,e,n,r){const s=i[e+1],o=null===t;let a=n?Jd(s):Ah(s),l=!1;for(;0!==a&&(!1===l||o);){const d=i[a+1];tW(i[a],t)&&(l=!0,i[a+1]=n?H1(d):V1(d)),a=n?Jd(d):Ah(d)}l&&(i[e+1]=n?V1(s):H1(s))}function tW(i,t){return null===i||null==t||(Array.isArray(i)?i[1]:i)===t||!(!Array.isArray(i)||"string"!=typeof t)&&Ic(i,t)>=0}const Ir={textEnd:0,key:0,keyEnd:0,value:0,valueEnd:0};function CL(i){return i.substring(Ir.key,Ir.keyEnd)}function SL(i,t){const e=Ir.textEnd;return e===t?-1:(t=Ir.keyEnd=function sW(i,t,e){for(;t32;)t++;return t}(i,Ir.key=t,e),em(i,t,e))}function em(i,t,e){for(;t=0;e=SL(t,e))Cs(i,CL(t),!0)}function cl(i,t,e,n){const r=Se(),s=zn(),o=Zs(2);s.firstUpdatePass&&RL(s,i,o,n),t!==sn&&Is(r,o,t)&&PL(s,s.data[Xn()],r,r[yt],i,r[o+1]=function _W(i,t){return null==i||""===i||("string"==typeof t?i+=t:"object"==typeof i&&(i=pi(eo(i)))),i}(t,e),n,o)}function IL(i,t){return t>=i.expandoStartIndex}function RL(i,t,e,n){const r=i.data;if(null===r[e+1]){const s=r[Xn()],o=IL(i,e);FL(s,n)&&null===t&&!o&&(t=!1),t=function dW(i,t,e,n){const r=rh(i);let s=n?t.residualClasses:t.residualStyles;if(null===r)0===(n?t.classBindings:t.styleBindings)&&(e=ay(e=G1(null,i,t,e,n),t.attrs,n),s=null);else{const o=t.directiveStylingLast;if(-1===o||i[o]!==r)if(e=G1(r,i,t,e,n),null===s){let l=function uW(i,t,e){const n=e?t.classBindings:t.styleBindings;if(0!==Ah(n))return i[Jd(n)]}(i,t,n);void 0!==l&&Array.isArray(l)&&(l=G1(null,i,t,l[1],n),l=ay(l,t.attrs,n),function hW(i,t,e,n){i[Jd(e?t.classBindings:t.styleBindings)]=n}(i,t,n,l))}else s=function fW(i,t,e){let n;const r=t.directiveEnd;for(let s=1+t.directiveStylingLast;s0)&&(c=!0)):d=e,r)if(0!==l){const p=Jd(i[a+1]);i[n+1]=Dw(p,a),0!==p&&(i[p+1]=z1(i[p+1],n)),i[a+1]=function Z8(i,t){return 131071&i|t<<17}(i[a+1],n)}else i[n+1]=Dw(a,0),0!==a&&(i[a+1]=z1(i[a+1],n)),a=n;else i[n+1]=Dw(l,0),0===a?a=n:i[l+1]=z1(i[l+1],n),l=n;c&&(i[n+1]=V1(i[n+1])),ML(i,d,n,!0),ML(i,d,n,!1),function eW(i,t,e,n,r){const s=r?i.residualClasses:i.residualStyles;null!=s&&"string"==typeof t&&Ic(s,t)>=0&&(e[n+1]=H1(e[n+1]))}(t,d,i,n,s),o=Dw(a,l),s?t.classBindings=o:t.styleBindings=o}(r,s,t,e,o,n)}}function G1(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),d=c?l[1]:l,h=null===d;let p=e[r+1];p===sn&&(p=h?$n:void 0);let m=h?Wd(p,n):d===n?p:void 0;if(c&&!Tw(m)&&(m=Wd(l,n)),Tw(m)&&(a=m,o))return a;const g=i[r+1];r=o?Jd(g):Ah(g)}if(null!==t){let l=s?t.residualClasses:t.residualStyles;null!=l&&(a=Wd(l,n))}return a}function Tw(i){return void 0!==i}function FL(i,t){return 0!=(i.flags&(t?8:16))}function Ve(i,t=""){const e=Se(),n=zn(),r=i+yi,s=n.firstCreatePass?Zd(n,r,1,t,null):n.data[r],o=e[r]=function cv(i,t){return i.createText(t)}(e[yt],t);yh(n,e,o,s),ga(s,!1)}function _i(i){return Zi("",i,""),_i}function Zi(i,t,e){const n=Se(),r=jp(n,i,t,e);return r!==sn&&Uc(n,Xn(),r),Zi}function tm(i,t,e,n,r){const s=Se(),o=Yp(s,i,t,e,n,r);return o!==sn&&Uc(s,Xn(),o),tm}function GL(i,t,e){!function dl(i,t,e,n){const r=zn(),s=Zs(2);r.firstUpdatePass&&RL(r,null,s,n);const o=Se();if(e!==sn&&Is(o,s,e)){const a=r.data[Xn()];if(FL(a,n)&&!IL(r,s)){let l=n?a.classesWithoutHost:a.stylesWithoutHost;null!==l&&(e=Vf(l,e||"")),F1(r,a,o,e,n)}else!function gW(i,t,e,n,r,s,o,a){r===sn&&(r=$n);let l=0,c=0,d=0((rt=rt||{})[rt.LocaleId=0]="LocaleId",rt[rt.DayPeriodsFormat=1]="DayPeriodsFormat",rt[rt.DayPeriodsStandalone=2]="DayPeriodsStandalone",rt[rt.DaysFormat=3]="DaysFormat",rt[rt.DaysStandalone=4]="DaysStandalone",rt[rt.MonthsFormat=5]="MonthsFormat",rt[rt.MonthsStandalone=6]="MonthsStandalone",rt[rt.Eras=7]="Eras",rt[rt.FirstDayOfWeek=8]="FirstDayOfWeek",rt[rt.WeekendRange=9]="WeekendRange",rt[rt.DateFormat=10]="DateFormat",rt[rt.TimeFormat=11]="TimeFormat",rt[rt.DateTimeFormat=12]="DateTimeFormat",rt[rt.NumberSymbols=13]="NumberSymbols",rt[rt.NumberFormats=14]="NumberFormats",rt[rt.CurrencyCode=15]="CurrencyCode",rt[rt.CurrencySymbol=16]="CurrencySymbol",rt[rt.CurrencyName=17]="CurrencyName",rt[rt.Currencies=18]="Currencies",rt[rt.Directionality=19]="Directionality",rt[rt.PluralCase=20]="PluralCase",rt[rt.ExtraData=21]="ExtraData",rt))();const im="en-US";let t2=im;function j1(i,t,e,n,r){if(i=Pt(i),Array.isArray(i))for(let s=0;s>20;if(Lc(i)||!i.multi){const m=new Bd(l,r,E),g=q1(a,t,r?d:d+p,h);-1===g?(pn(ah(c,o),s,a),Y1(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=q1(a,t,d+p,h),g=q1(a,t,d,d+p),v=g>=0&&e[g];if(r&&!v||!r&&!(m>=0&&e[m])){pn(ah(c,o),s,a);const y=function Oj(i,t,e,n,r){const s=new Bd(i,e,E);return s.multi=[],s.index=t,s.componentProviders=0,A2(s,r,n&&!e),s}(r?Pj:kj,e.length,r,n,l);!r&&v&&(e[g].providerFactory=y),Y1(s,i,t.length,0),t.push(a),c.directiveStart++,c.directiveEnd++,r&&(c.providerIndexes+=1048576),e.push(y),o.push(y)}else Y1(s,i,m>-1?m:g,A2(e[r?g:m],l,!r&&n));!r&&n&&v&&e[g].componentProviders++}}}function Y1(i,t,e,n){const r=Lc(t),s=function DD(i){return!!i.useClass}(t);if(r||s){const l=(s?Pt(t.useClass):t).prototype.ngOnDestroy;if(l){const c=i.destroyHooks||(i.destroyHooks=[]);if(!r&&t.multi){const d=c.indexOf(e);-1===d?c.push(e,[n,l]):c[d+1].push(n,l)}else c.push(e,l)}}}function A2(i,t,e){return e&&i.componentProviders++,i.multi.push(t)-1}function q1(i,t,e,n){for(let r=e;r{e.providersResolver=(n,r)=>function Rj(i,t,e){const n=zn();if(n.firstCreatePass){const r=vo(i);j1(e,n.data,n.blueprint,r,!0),j1(t,n.data,n.blueprint,r,!1)}}(n,r?r(i):i,t)}}class rm{}class D2{}class T2 extends rm{constructor(t,e){super(),this._parent=e,this._bootstrapComponents=[],this.destroyCbs=[],this.componentFactoryResolver=new KF(this);const n=ur(t);this._bootstrapComponents=ll(n.bootstrap),this._r3Injector=uw(t,e,[{provide:rm,useValue:this},{provide:Hl,useValue:this.componentFactoryResolver}],pi(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 K1 extends D2{constructor(t){super(),this.moduleType=t}create(t){return new T2(this.moduleType,t)}}class Lj extends rm{constructor(t,e,n){super(),this.componentFactoryResolver=new KF(this),this.instance=null;const r=new Hp([...t,{provide:rm,useValue:this},{provide:Hl,useValue:this.componentFactoryResolver}],e||wh(),n,new Set(["environment"]));this.injector=r,r.resolveInjectorInitializers()}destroy(){this.injector.destroy()}onDestroy(t){this.injector.onDestroy(t)}}function Fw(i,t,e=null){return new Lj(i,t,e).injector}let Nj=(()=>{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=tw(0,e.type),r=n.length>0?Fw([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=ke({token:i,providedIn:"environment",factory:()=>new i(ee(no))}),i})();function Z1(i){i.getStandaloneInjector=t=>t.get(Nj).getOrCreateStandaloneInjector(i)}function oo(i,t,e){const n=Vr()+i,r=Se();return r[n]===sn?$l(r,n,e?t.call(e):t()):function ry(i,t){return i[t]}(r,n)}function sm(i,t,e,n){return N2(Se(),Vr(),i,t,e,n)}function L2(i,t,e,n,r,s,o){return function V2(i,t,e,n,r,s,o,a,l){const c=t+e;return function Ea(i,t,e,n,r,s){const o=Eh(i,t,e,n);return Eh(i,t+2,r,s)||o}(i,c,r,s,o,a)?$l(i,c+4,l?n.call(l,r,s,o,a):n(r,s,o,a)):fy(i,c+4)}(Se(),Vr(),i,t,e,n,r,s,o)}function fy(i,t){const e=i[t];return e===sn?void 0:e}function N2(i,t,e,n,r,s){const o=t+e;return Is(i,o,r)?$l(i,o+1,s?n.call(s,r):n(r)):fy(i,o+1)}function Ct(i,t){const e=zn();let n;const r=i+yi;e.firstCreatePass?(n=function Jj(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=Qa(n.type)),o=qs(E);try{const a=cp(!1),l=s();return cp(a),function W8(i,t,e,n){e>=i.data.length&&(i.data[e]=null,i.blueprint[e]=null),t[e]=n}(e,Se(),r,l),l}finally{qs(o)}}function Tt(i,t,e){const n=i+yi,r=Se(),s=Od(r,n);return py(r,n)?N2(r,Vr(),t,s.transform,e,s):s.transform(e)}function J1(i,t,e,n){const r=i+yi,s=Se(),o=Od(s,r);return py(s,r)?function B2(i,t,e,n,r,s,o){const a=t+e;return Eh(i,a,r,s)?$l(i,a+2,o?n.call(o,r,s):n(r,s)):fy(i,a+2)}(s,Vr(),t,o.transform,e,n,o):o.transform(e,n)}function py(i,t){return i[at].data[t].pure}function eT(i){return t=>{setTimeout(i,void 0,t)}}const We=class r6 extends Re{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=eT(s),r&&(r=eT(r)),o&&(o=eT(o)));const a=super.subscribe({next:r,error:s,complete:o});return t instanceof Zt&&t.add(a),a}};function s6(){return this._results[Symbol.iterator]()}class om{get changes(){return this._changes||(this._changes=new We)}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=om.prototype;e[Symbol.iterator]||(e[Symbol.iterator]=s6)}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 Ar(i){return i.flat(Number.POSITIVE_INFINITY)}(t);(this._changesDetected=!function fp(i,t,e){if(i.length!==t.length)return!1;for(let n=0;n{class i{}return i.__NG_ELEMENT_ID__=l6,i})();const o6=Co,a6=class extends o6{constructor(t,e,n){super(),this._declarationLView=t,this._declarationTContainer=e,this.elementRef=n}createEmbeddedView(t,e){const n=this._declarationTContainer.tView,r=Mh(this._declarationLView,n,t,16,null,n.declTNode,null,null,null,null,e||null);r[nh]=this._declarationLView[this._declarationTContainer.index];const o=this._declarationLView[Ks];return null!==o&&(r[Ks]=o.createEmbeddedView(n)),Sh(n,r,t),new ny(r)}};function l6(){return Lw(Er(),Se())}function Lw(i,t){return 4&i.type?new a6(t,i,Fn(i,t)):null}let Wr=(()=>{class i{}return i.__NG_ELEMENT_ID__=c6,i})();function c6(){return $2(Er(),Se())}const d6=Wr,H2=class extends d6{constructor(t,e,n){super(),this._lContainer=t,this._hostTNode=e,this._hostLView=n}get element(){return Fn(this._hostTNode,this._hostLView)}get injector(){return new Ac(this._hostTNode,this._hostLView)}get parentInjector(){const t=ch(this._hostTNode,this._hostLView);if(lp(t)){const e=oh(t,this._hostLView),n=sh(t);return new Ac(e[at].data[n+8],e)}return new Ac(null,this._hostLView)}clear(){for(;this.length>0;)this.remove(this.length-1)}get(t){const e=G2(this._lContainer);return null!==e&&e[t]||null}get length(){return this._lContainer.length-Bi}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 hh(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 iy(Hn(t)),c=n||this.parentInjector;if(!s&&null==l.ngModule){const p=(o?c:this.parentInjector).get(no,null);p&&(s=p)}const d=l.create(c,r,void 0,s);return this.insert(d.hostView,a),d}insert(t,e){const n=t._lView,r=n[at];if(function dA(i){return xs(i[Ni])}(n)){const d=this.indexOf(t);if(-1!==d)this.detach(d);else{const h=n[Ni],p=new H2(h,h[ue],h[Ni]);p.detach(p.indexOf(t))}}const s=this._adjustIndex(e),o=this._lContainer;!function dv(i,t,e,n){const r=Bi+n,s=e.length;n>0&&(e[r-1][ys]=t),n0)n.push(o[a/2]);else{const c=s[a+1],d=t[-l];for(let h=Bi;h{class i{constructor(e){this.appInits=e,this.resolve=Bw,this.reject=Bw,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)(ee(Uw,8))},i.\u0275prov=ke({token:i,factory:i.\u0275fac,providedIn:"root"}),i})();const cm=new me("AppId",{providedIn:"root",factory:function fN(){return`${hT()}${hT()}${hT()}`}});function hT(){return String.fromCharCode(97+Math.floor(25*Math.random()))}const pN=new me("Platform Initializer"),fT=new me("Platform ID",{providedIn:"platform",factory:()=>"unknown"}),Rr=new me("AnimationModuleType");let L6=(()=>{class i{log(e){console.log(e)}warn(e){console.warn(e)}}return i.\u0275fac=function(e){return new(e||i)},i.\u0275prov=ke({token:i,factory:i.\u0275fac,providedIn:"platform"}),i})();const ql=new me("LocaleId",{providedIn:"root",factory:()=>Ft(ql,Ot.Optional|Ot.SkipSelf)||function N6(){return typeof $localize<"u"&&$localize.locale||im}()});class U6{constructor(t,e){this.ngModuleFactory=t,this.componentFactories=e}}let mN=(()=>{class i{compileModuleSync(e){return new K1(e)}compileModuleAsync(e){return Promise.resolve(this.compileModuleSync(e))}compileModuleAndAllComponentsSync(e){const n=this.compileModuleSync(e),s=ll(ur(e).declarations).reduce((o,a)=>{const l=Hn(a);return l&&o.push(new iy(l)),o},[]);return new U6(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=ke({token:i,factory:i.\u0275fac,providedIn:"root"}),i})();const H6=(()=>Promise.resolve(0))();function pT(i){typeof Zone>"u"?H6.then(()=>{i&&i.apply(null,null)}):Zone.current.scheduleMicroTask("scheduleMicrotask",i)}class ft{constructor({enableLongStackTrace:t=!1,shouldCoalesceEventChangeDetection:e=!1,shouldCoalesceRunChangeDetection:n=!1}){if(this.hasPendingMacrotasks=!1,this.hasPendingMicrotasks=!1,this.isStable=!0,this.onUnstable=new We(!1),this.onMicrotaskEmpty=new We(!1),this.onStable=new We(!1),this.onError=new We(!1),typeof Zone>"u")throw new pe(908,!1);Zone.assertZonePatched();const r=this;r._nesting=0,r._outer=r._inner=Zone.current,Zone.TaskTrackingZoneSpec&&(r._inner=r._inner.fork(new Zone.TaskTrackingZoneSpec)),t&&Zone.longStackTraceZoneSpec&&(r._inner=r._inner.fork(Zone.longStackTraceZoneSpec)),r.shouldCoalesceEventChangeDetection=!n&&e,r.shouldCoalesceRunChangeDetection=n,r.lastRequestAnimationFrameId=-1,r.nativeRequestAnimationFrame=function G6(){let i=Rn.requestAnimationFrame,t=Rn.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 j6(i){const t=()=>{!function W6(i){i.isCheckStableRunning||-1!==i.lastRequestAnimationFrameId||(i.lastRequestAnimationFrameId=i.nativeRequestAnimationFrame.call(Rn,()=>{i.fakeTopEventTask||(i.fakeTopEventTask=Zone.root.scheduleEventTask("fakeTopEventTask",()=>{i.lastRequestAnimationFrameId=-1,gT(i),i.isCheckStableRunning=!0,mT(i),i.isCheckStableRunning=!1},void 0,()=>{},()=>{})),i.fakeTopEventTask.invoke()}),gT(i))}(i)};i._inner=i._inner.fork({name:"angular",properties:{isAngularZone:!0},onInvokeTask:(e,n,r,s,o,a)=>{try{return vN(i),e.invokeTask(r,s,o,a)}finally{(i.shouldCoalesceEventChangeDetection&&"eventTask"===s.type||i.shouldCoalesceRunChangeDetection)&&t(),yN(i)}},onInvoke:(e,n,r,s,o,a,l)=>{try{return vN(i),e.invoke(r,s,o,a,l)}finally{i.shouldCoalesceRunChangeDetection&&t(),yN(i)}},onHasTask:(e,n,r,s)=>{e.hasTask(r,s),n===r&&("microTask"==s.change?(i._hasPendingMicrotasks=s.microTask,gT(i),mT(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(!ft.isInAngularZone())throw new pe(909,!1)}static assertNotInAngularZone(){if(ft.isInAngularZone())throw new pe(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,$6,Bw,Bw);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 $6={};function mT(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 gT(i){i.hasPendingMicrotasks=!!(i._hasPendingMicrotasks||(i.shouldCoalesceEventChangeDetection||i.shouldCoalesceRunChangeDetection)&&-1!==i.lastRequestAnimationFrameId)}function vN(i){i._nesting++,i.isStable&&(i.isStable=!1,i.onUnstable.emit(null))}function yN(i){i._nesting--,mT(i)}class Y6{constructor(){this.hasPendingMicrotasks=!1,this.hasPendingMacrotasks=!1,this.isStable=!0,this.onUnstable=new We,this.onMicrotaskEmpty=new We,this.onStable=new We,this.onError=new We}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 bN=new me(""),zw=new me("");let yT,_T=(()=>{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,yT||(function q6(i){yT=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:()=>{ft.assertNotInAngularZone(),pT(()=>{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())pT(()=>{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)(ee(ft),ee(vT),ee(zw))},i.\u0275prov=ke({token:i,factory:i.\u0275fac}),i})(),vT=(()=>{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 yT?.findTestabilityInTree(this,e,n)??null}}return i.\u0275fac=function(e){return new(e||i)},i.\u0275prov=ke({token:i,factory:i.\u0275fac,providedIn:"platform"}),i})();const zc=!1;let eu=null;const xN=new me("AllowMultipleToken"),bT=new me("PlatformDestroyListeners"),wN=new me("appBootstrapListener");class MN{constructor(t,e){this.name=t,this.token=e}}function SN(i,t,e=[]){const n=`Platform: ${t}`,r=new me(n);return(s=[])=>{let o=xT();if(!o||o.injector.get(xN,!1)){const a=[...e,...s,{provide:r,useValue:!0}];i?i(a):function Z6(i){if(eu&&!eu.get(xN,!1))throw new pe(400,!1);eu=i;const t=i.get(AN);(function CN(i){const t=i.get(pN,null);t&&t.forEach(e=>e())})(i)}(function EN(i=[],t){return Gi.create({name:t,providers:[{provide:Iv,useValue:"platform"},{provide:bT,useValue:new Set([()=>eu=null])},...i]})}(a,n))}return function J6(i){const t=xT();if(!t)throw new pe(401,!1);return t}()}}function xT(){return eu?.get(AN)??null}let AN=(()=>{class i{constructor(e){this._injector=e,this._modules=[],this._destroyListeners=[],this._destroyed=!1}bootstrapModuleFactory(e,n){const r=function TN(i,t){let e;return e="noop"===i?new Y6:("zone.js"===i?void 0:i)||new ft(t),e}(n?.ngZone,function DN(i){return{enableLongStackTrace:!1,shouldCoalesceEventChangeDetection:!(!i||!i.ngZoneEventCoalescing)||!1,shouldCoalesceRunChangeDetection:!(!i||!i.ngZoneRunCoalescing)||!1}}(n)),s=[{provide:ft,useValue:r}];return r.run(()=>{const o=Gi.create({providers:s,parent:this.injector,name:e.moduleType.name}),a=e.create(o),l=a.injector.get(al,null);if(!l)throw new pe(402,!1);return r.runOutsideAngular(()=>{const c=r.onError.subscribe({next:d=>{l.handleError(d)}});a.onDestroy(()=>{Hw(this._modules,a),c.unsubscribe()})}),function IN(i,t,e){try{const n=e();return oy(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(Vw);return c.runInitializers(),c.donePromise.then(()=>(function n2(i){En(i,"Expected localeId to be defined"),"string"==typeof i&&(t2=i.toLowerCase().replace(/_/g,"-"))}(a.injector.get(ql,im)||im),this._moduleDoBootstrap(a),a))})})}bootstrapModule(e,n=[]){const r=RN({},n);return function X6(i,t,e){const n=new K1(e);return Promise.resolve(n)}(0,0,e).then(s=>this.bootstrapModuleFactory(s,r))}_moduleDoBootstrap(e){const n=e.injector.get(dm);if(e._bootstrapComponents.length>0)e._bootstrapComponents.forEach(r=>n.bootstrap(r));else{if(!e.instance.ngDoBootstrap)throw new pe(-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 pe(404,!1);this._modules.slice().forEach(n=>n.destroy()),this._destroyListeners.forEach(n=>n());const e=this._injector.get(bT,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)(ee(Gi))},i.\u0275prov=ke({token:i,factory:i.\u0275fac,providedIn:"platform"}),i})();function RN(i,t){return Array.isArray(t)?t.reduce(RN,i):{...i,...t}}let dm=(()=>{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 In(a=>{this._stable=this._zone.isStable&&!this._zone.hasPendingMacrotasks&&!this._zone.hasPendingMicrotasks,this._zone.runOutsideAngular(()=>{a.next(this._stable),a.complete()})}),o=new In(a=>{let l;this._zone.runOutsideAngular(()=>{l=this._zone.onStable.subscribe(()=>{ft.assertNotInAngularZone(),pT(()=>{!this._stable&&!this._zone.hasPendingMacrotasks&&!this._zone.hasPendingMicrotasks&&(this._stable=!0,a.next(!0))})})});const c=this._zone.onUnstable.subscribe(()=>{ft.assertInAngularZone(),this._stable&&(this._stable=!1,this._zone.runOutsideAngular(()=>{a.next(!1)}))});return()=>{l.unsubscribe(),c.unsubscribe()}});this.isStable=Mr(s,o.pipe(Uf()))}bootstrap(e,n){const r=e instanceof Ov;if(!this._injector.get(Vw).done){!r&&function Sd(i){const t=Hn(i)||Ur(i)||vs(i);return null!==t&&t.standalone}(e);throw new pe(405,zc)}let o;o=r?e:this._injector.get(Hl).resolveComponentFactory(e),this.componentTypes.push(o.componentType);const a=function K6(i){return i.isBoundToModule}(o)?void 0:this._injector.get(rm),c=o.create(Gi.NULL,[],n||o.selector,a),d=c.location.nativeElement,h=c.injector.get(bN,null);return h?.registerApplication(d),c.onDestroy(()=>{this.detachView(c.hostView),Hw(this.components,c),h?.unregisterApplication(d)}),this._loadComponent(c),c}tick(){if(this._runningTick)throw new pe(101,!1);try{this._runningTick=!0;for(let e of this._views)e.detectChanges()}catch(e){this._zone.runOutsideAngular(()=>this._exceptionHandler.handleError(e))}finally{this._runningTick=!1}}attachView(e){const n=e;this._views.push(n),n.attachToAppRef(this)}detachView(e){const n=e;Hw(this._views,n),n.detachFromAppRef()}_loadComponent(e){this.attachView(e.hostView),this.tick(),this.components.push(e);const n=this._injector.get(wN,[]);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),()=>Hw(this._destroyListeners,e)}destroy(){if(this._destroyed)throw new pe(406,!1);const e=this._injector;e.destroy&&!e.destroyed&&e.destroy()}get viewCount(){return this._views.length}warnIfDestroyed(){}}return i.\u0275fac=function(e){return new(e||i)(ee(ft),ee(no),ee(al))},i.\u0275prov=ke({token:i,factory:i.\u0275fac,providedIn:"root"}),i})();function Hw(i,t){const e=i.indexOf(t);e>-1&&i.splice(e,1)}let Zn=(()=>{class i{}return i.__NG_ELEMENT_ID__=t9,i})();function t9(i){return function n9(i,t,e){if(Ad(i)&&!e){const n=ws(i.index,t);return new ny(n,n)}return 47&i.type?new ny(t[rr],t):null}(Er(),Se(),16==(16&i))}class LN{constructor(){}supports(t){return Ew(t)}create(t){return new c9(t)}}const l9=(i,t)=>t;class c9{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||l9}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 d9(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 NN),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 NN),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 d9{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 u9{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 NN{constructor(){this.map=new Map}put(t){const e=t.trackById;let n=this.map.get(e);n||(n=new u9,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 BN(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 f9(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 f9{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 VN(){return new Ww([new LN])}let Ww=(()=>{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||VN()),deps:[[i,new wa,new Ss]]}}find(e){const n=this.factories.find(r=>r.supports(e));if(null!=n)return n;throw new pe(901,!1)}}return i.\u0275prov=ke({token:i,providedIn:"root",factory:VN}),i})();function zN(){return new gy([new UN])}let gy=(()=>{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||zN()),deps:[[i,new wa,new Ss]]}}find(e){const n=this.factories.find(r=>r.supports(e));if(n)return n;throw new pe(901,!1)}}return i.\u0275prov=ke({token:i,providedIn:"root",factory:zN}),i})();const g9=SN(null,"core",[]);let _9=(()=>{class i{constructor(e){}}return i.\u0275fac=function(e){return new(e||i)(ee(dm))},i.\u0275mod=nn({type:i}),i.\u0275inj=Kt({}),i})();let ET=null;function Hc(){return ET}class b9{}const jt=new me("DocumentToken");let AT=(()=>{class i{historyGo(e){throw new Error("Not implemented")}}return i.\u0275fac=function(e){return new(e||i)},i.\u0275prov=ke({token:i,factory:function(){return function x9(){return ee(HN)}()},providedIn:"platform"}),i})();const w9=new me("Location Initialized");let HN=(()=>{class i extends AT{constructor(e){super(),this._doc=e,this._location=window.location,this._history=window.history}getBaseHrefFromDOM(){return Hc().getBaseHref(this._doc)}onPopState(e){const n=Hc().getGlobalEventTarget(this._doc,"window");return n.addEventListener("popstate",e,!1),()=>n.removeEventListener("popstate",e)}onHashChange(e){const n=Hc().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){GN()?this._history.pushState(e,n,r):this._location.hash=r}replaceState(e,n,r){GN()?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)(ee(jt))},i.\u0275prov=ke({token:i,factory:function(){return function M9(){return new HN(ee(jt))}()},providedIn:"platform"}),i})();function GN(){return!!window.history.pushState}function DT(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 $N(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 Gc(i){return i&&"?"!==i[0]?"?"+i:i}let Ih=(()=>{class i{historyGo(e){throw new Error("Not implemented")}}return i.\u0275fac=function(e){return new(e||i)},i.\u0275prov=ke({token:i,factory:function(){return Ft(jN)},providedIn:"root"}),i})();const WN=new me("appBaseHref");let jN=(()=>{class i extends Ih{constructor(e,n){super(),this._platformLocation=e,this._removeListenerFns=[],this._baseHref=n??this._platformLocation.getBaseHrefFromDOM()??Ft(jt).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 DT(this._baseHref,e)}path(e=!1){const n=this._platformLocation.pathname+Gc(this._platformLocation.search),r=this._platformLocation.hash;return r&&e?`${n}${r}`:n}pushState(e,n,r,s){const o=this.prepareExternalUrl(r+Gc(s));this._platformLocation.pushState(e,n,o)}replaceState(e,n,r,s){const o=this.prepareExternalUrl(r+Gc(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)(ee(AT),ee(WN,8))},i.\u0275prov=ke({token:i,factory:i.\u0275fac,providedIn:"root"}),i})(),C9=(()=>{class i extends Ih{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=DT(this._baseHref,e);return n.length>0?"#"+n:n}pushState(e,n,r,s){let o=this.prepareExternalUrl(r+Gc(s));0==o.length&&(o=this._platformLocation.pathname),this._platformLocation.pushState(e,n,o)}replaceState(e,n,r,s){let o=this.prepareExternalUrl(r+Gc(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)(ee(AT),ee(WN,8))},i.\u0275prov=ke({token:i,factory:i.\u0275fac}),i})(),_y=(()=>{class i{constructor(e){this._subject=new We,this._urlChangeListeners=[],this._urlChangeSubscription=null,this._locationStrategy=e;const n=this._locationStrategy.getBaseHref();this._basePath=function A9(i){if(new RegExp("^(https?:)?//").test(i)){const[,e]=i.split(/\/\/[^\/]+/);return e}return i}($N(YN(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+Gc(n))}normalize(e){return i.stripTrailingSlash(function E9(i,t){if(!i||!t.startsWith(i))return t;const e=t.substring(i.length);return""===e||["/",";","?","#"].includes(e[0])?e:t}(this._basePath,YN(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+Gc(n)),r)}replaceState(e,n="",r=null){this._locationStrategy.replaceState(r,"",e,n),this._notifyUrlChangeListeners(this.prepareExternalUrl(e+Gc(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=Gc,i.joinWithSlash=DT,i.stripTrailingSlash=$N,i.\u0275fac=function(e){return new(e||i)(ee(Ih))},i.\u0275prov=ke({token:i,factory:function(){return function S9(){return new _y(ee(Ih))}()},providedIn:"root"}),i})();function YN(i){return i.replace(/\/index.html$/,"")}var So=(()=>((So=So||{})[So.Decimal=0]="Decimal",So[So.Percent=1]="Percent",So[So.Currency=2]="Currency",So[So.Scientific=3]="Scientific",So))(),Ht=(()=>((Ht=Ht||{})[Ht.Decimal=0]="Decimal",Ht[Ht.Group=1]="Group",Ht[Ht.List=2]="List",Ht[Ht.PercentSign=3]="PercentSign",Ht[Ht.PlusSign=4]="PlusSign",Ht[Ht.MinusSign=5]="MinusSign",Ht[Ht.Exponential=6]="Exponential",Ht[Ht.SuperscriptingExponent=7]="SuperscriptingExponent",Ht[Ht.PerMille=8]="PerMille",Ht[Ht.Infinity=9]="Infinity",Ht[Ht.NaN=10]="NaN",Ht[Ht.TimeSeparator=11]="TimeSeparator",Ht[Ht.CurrencyDecimal=12]="CurrencyDecimal",Ht[Ht.CurrencyGroup=13]="CurrencyGroup",Ht))();function Aa(i,t){const e=so(i),n=e[rt.NumberSymbols][t];if(typeof n>"u"){if(t===Ht.CurrencyDecimal)return e[rt.NumberSymbols][Ht.Decimal];if(t===Ht.CurrencyGroup)return e[rt.NumberSymbols][Ht.Group]}return n}const J9=/^(\d+)?\.((\d+)(-(\d+))?)?$/,JN=22,eM=".",yy="0",eY=";",tY=",",PT="#";function LT(i){const t=parseInt(i);if(isNaN(t))throw new Error("Invalid integer literal when parsing "+i);return t}const BT=/\s+/,nB=[];let hm=(()=>{class i{constructor(e,n,r,s){this._iterableDiffers=e,this._keyValueDiffers=n,this._ngEl=r,this._renderer=s,this.initialClasses=nB,this.stateMap=new Map}set klass(e){this.initialClasses=null!=e?e.trim().split(BT):nB}set ngClass(e){this.rawClass="string"==typeof e?e.trim().split(BT):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(BT).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)(E(Ww),E(gy),E(mt),E(ol))},i.\u0275dir=ve({type:i,selectors:[["","ngClass",""]],inputs:{klass:["class","klass"],ngClass:"ngClass"},standalone:!0}),i})();class hY{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 Eo=(()=>{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 hY(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),sB(a,r)}});for(let r=0,s=n.length;r{sB(n.get(r.currentIndex),r)})}static ngTemplateContextGuard(e,n){return!0}}return i.\u0275fac=function(e){return new(e||i)(E(Wr),E(Co),E(Ww))},i.\u0275dir=ve({type:i,selectors:[["","ngFor","","ngForOf",""]],inputs:{ngForOf:"ngForOf",ngForTrackBy:"ngForTrackBy",ngForTemplate:"ngForTemplate"},standalone:!0}),i})();function sB(i,t){i.context.$implicit=t.item}let vi=(()=>{class i{constructor(e,n){this._viewContainer=e,this._context=new pY,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){oB("ngIfThen",e),this._thenTemplateRef=e,this._thenViewRef=null,this._updateView()}set ngIfElse(e){oB("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)(E(Wr),E(Co))},i.\u0275dir=ve({type:i,selectors:[["","ngIf",""]],inputs:{ngIf:"ngIf",ngIfThen:"ngIfThen",ngIfElse:"ngIfElse"},standalone:!0}),i})();class pY{constructor(){this.$implicit=null,this.ngIf=null}}function oB(i,t){if(t&&!t.createEmbeddedView)throw new Error(`${i} must be a TemplateRef, but received '${pi(t)}'.`)}class UT{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 by=(()=>{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=ve({type:i,selectors:[["","ngSwitch",""]],inputs:{ngSwitch:"ngSwitch"},standalone:!0}),i})(),VT=(()=>{class i{constructor(e,n,r){this.ngSwitch=r,r._addCase(),this._view=new UT(e,n)}ngDoCheck(){this._view.enforceState(this.ngSwitch._matchCase(this.ngSwitchCase))}}return i.\u0275fac=function(e){return new(e||i)(E(Wr),E(Co),E(by,9))},i.\u0275dir=ve({type:i,selectors:[["","ngSwitchCase",""]],inputs:{ngSwitchCase:"ngSwitchCase"},standalone:!0}),i})(),aB=(()=>{class i{constructor(e,n,r){r._addDefault(new UT(e,n))}}return i.\u0275fac=function(e){return new(e||i)(E(Wr),E(Co),E(by,9))},i.\u0275dir=ve({type:i,selectors:[["","ngSwitchDefault",""]],standalone:!0}),i})(),tM=(()=>{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:Es.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)(E(mt),E(gy),E(ol))},i.\u0275dir=ve({type:i,selectors:[["","ngStyle",""]],inputs:{ngStyle:"ngStyle"},standalone:!0}),i})(),xy=(()=>{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)(E(Wr))},i.\u0275dir=ve({type:i,selectors:[["","ngTemplateOutlet",""]],inputs:{ngTemplateOutletContext:"ngTemplateOutletContext",ngTemplateOutlet:"ngTemplateOutlet",ngTemplateOutletInjector:"ngTemplateOutletInjector"},standalone:!0,features:[bi]}),i})();function fl(i,t){return new pe(2100,!1)}class gY{createSubscription(t,e){return t.subscribe({next:e,error:n=>{throw n}})}dispose(t){t.unsubscribe()}}class _Y{createSubscription(t,e){return t.then(e,n=>{throw n})}dispose(t){}}const vY=new _Y,yY=new gY;let pl=(()=>{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(oy(e))return vY;if(uL(e))return yY;throw fl()}_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)(E(Zn,16))},i.\u0275pipe=Hi({name:"async",type:i,pure:!1,standalone:!0}),i})(),cB=(()=>{class i{constructor(e){this.differs=e,this.keyValues=[],this.compareFn=dB}transform(e,n=dB){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 kY(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)(E(gy,16))},i.\u0275pipe=Hi({name:"keyvalue",type:i,pure:!1,standalone:!0}),i})();function dB(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 zT(i){return!(null==i||""===i||i!=i)}(e))return null;r=r||this._locale;try{return function sY(i,t,e){return function OT(i,t,e,n,r,s,o=!1){let a="",l=!1;if(isFinite(i)){let c=function aY(i){let n,r,s,o,a,t=Math.abs(i)+"",e=0;for((r=t.indexOf(eM))>-1&&(t=t.replace(eM,"")),(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)===yy;s++);if(s===(a=t.length))n=[0],r=1;else{for(a--;t.charAt(a)===yy;)a--;for(r-=s,n=[],o=0;s<=a;s++,o++)n[o]=Number(t.charAt(s))}return r>JN&&(n=n.splice(0,JN-1),e=r-1,r=1),{digits:n,exponent:e,integerLen:r}}(i);o&&(c=function oY(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 d=t.minInt,h=t.minFrac,p=t.maxFrac;if(s){const M=s.match(J9);if(null===M)throw new Error(`${s} is not a valid digit info`);const x=M[1],C=M[3],F=M[5];null!=x&&(d=LT(x)),null!=C&&(h=LT(C)),null!=F?p=LT(F):null!=C&&h>p&&(p=h)}!function lY(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);d&&(n.unshift(d),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(Aa(e,n)),v.length&&(a+=Aa(e,r)+v.join("")),b&&(a+=Aa(e,Ht.Exponential)+"+"+b)}else a=Aa(e,Ht.Infinity);return a=i<0&&!l?t.negPre+a+t.negSuf:t.posPre+a+t.posSuf,a}(i,function FT(i,t="-"){const e={minInt:1,minFrac:0,maxFrac:0,posPre:"",posSuf:"",negPre:"",negSuf:"",gSize:0,lgSize:0},n=i.split(eY),r=n[0],s=n[1],o=-1!==r.indexOf(eM)?r.split(eM):[r.substring(0,r.lastIndexOf(yy)+1),r.substring(r.lastIndexOf(yy)+1)],a=o[0],l=o[1]||"";e.posPre=a.substring(0,a.indexOf(PT));for(let d=0;d{class i{}return i.\u0275fac=function(e){return new(e||i)},i.\u0275mod=nn({type:i}),i.\u0275inj=Kt({}),i})();const hB="browser";let UY=(()=>{class i{}return i.\u0275prov=ke({token:i,providedIn:"root",factory:()=>new VY(ee(jt),window)}),i})();class VY{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 zY(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=fB(this.window.history)||fB(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 fB(i){return Object.getOwnPropertyDescriptor(i,"scrollRestoration")}class m7 extends b9{constructor(){super(...arguments),this.supportsDOMEvents=!0}}class WT extends m7{static makeCurrent(){!function y9(i){ET||(ET=i)}(new WT)}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 g7(){return My=My||document.querySelector("base"),My?My.getAttribute("href"):null}();return null==e?null:function _7(i){rM=rM||document.createElement("a"),rM.setAttribute("href",i);const t=rM.pathname;return"/"===t.charAt(0)?t:`/${t}`}(e)}resetBaseElement(){My=null}getUserAgent(){return window.navigator.userAgent}getCookie(t){return function dY(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 rM,My=null;const vB=new me("TRANSITION_ID"),y7=[{provide:Uw,useFactory:function v7(i,t,e){return()=>{e.get(Vw).donePromise.then(()=>{const n=Hc(),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=ke({token:i,factory:i.\u0275fac}),i})();const sM=new me("EventManagerPlugins");let oM=(()=>{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=ke({token:i,factory:i.\u0275fac}),i})(),Cy=(()=>{class i extends bB{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)(ee(jt))},i.\u0275prov=ke({token:i,factory:i.\u0275fac}),i})();const jT={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/"},YT=/%COMP%/g,MB=new me("RemoveStylesOnCompDestory",{providedIn:"root",factory:()=>!1});function CB(i,t){return t.flat(100).map(e=>e.replace(YT,i))}function SB(i){return t=>{if("__ngUnwrap__"===t)return i;!1===i(t)&&(t.preventDefault(),t.returnValue=!1)}}let aM=(()=>{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 qT(e)}createRenderer(e,n){if(!e||!n)return this.defaultRenderer;const r=this.getOrCreateRenderer(e,n);return r instanceof DB?r.applyToHost(e):r instanceof XT&&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 Xs.Emulated:s=new DB(o,a,n,this.appId,l);break;case Xs.ShadowDom:return new D7(o,a,e,n);default:s=new XT(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)(ee(oM),ee(Cy),ee(cm),ee(MB))},i.\u0275prov=ke({token:i,factory:i.\u0275fac}),i})();class qT{constructor(t){this.eventManager=t,this.data=Object.create(null),this.destroyNode=null}destroy(){}createElement(t,e){return e?document.createElementNS(jT[e]||e,t):document.createElement(t)}createComment(t){return document.createComment(t)}createText(t){return document.createTextNode(t)}appendChild(t,e){(AB(t)?t.content:t).appendChild(e)}insertBefore(t,e,n){t&&(AB(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=jT[r];s?t.setAttributeNS(s,e,n):t.setAttribute(e,n)}else t.setAttribute(e,n)}removeAttribute(t,e,n){if(n){const r=jT[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&(Es.DashCase|Es.Important)?t.style.setProperty(e,n,r&Es.Important?"important":""):t.style[e]=n}removeStyle(t,e,n){n&Es.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,SB(n)):this.eventManager.addEventListener(t,e,SB(n))}}function AB(i){return"TEMPLATE"===i.tagName&&void 0!==i.content}class D7 extends qT{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=CB(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 XT extends qT{constructor(t,e,n,r,s=n.id){super(t),this.sharedStylesHost=e,this.removeStylesOnCompDestory=r,this.rendererUsageCount=0,this.styles=CB(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 DB extends XT{constructor(t,e,n,r,s){const o=r+"-"+n.id;super(t,e,n,s,o),this.contentAttr=function S7(i){return"_ngcontent-%COMP%".replace(YT,i)}(o),this.hostAttr=function E7(i){return"_nghost-%COMP%".replace(YT,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 T7=(()=>{class i extends yB{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)(ee(jt))},i.\u0275prov=ke({token:i,factory:i.\u0275fac}),i})();const TB=["alt","control","meta","shift"],I7={"\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"},R7={alt:i=>i.altKey,control:i=>i.ctrlKey,meta:i=>i.metaKey,shift:i=>i.shiftKey};let k7=(()=>{class i extends yB{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(()=>Hc().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."),TB.forEach(c=>{const d=n.indexOf(c);d>-1&&(n.splice(d,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=I7[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"),TB.forEach(o=>{o!==r&&(0,R7[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)(ee(jt))},i.\u0275prov=ke({token:i,factory:i.\u0275fac}),i})();const L7=SN(g9,"browser",[{provide:fT,useValue:hB},{provide:pN,useValue:function P7(){WT.makeCurrent()},multi:!0},{provide:jt,useFactory:function F7(){return function sD(i){vv=i}(document),document},deps:[]}]),kB=new me(""),PB=[{provide:zw,useClass:class b7{addToWindow(t){Rn.getAngularTestability=(n,r=!0)=>{const s=t.findTestabilityInTree(n,r);if(null==s)throw new Error("Could not find testability for element.");return s},Rn.getAllAngularTestabilities=()=>t.getAllTestabilities(),Rn.getAllAngularRootElements=()=>t.getAllRootElements(),Rn.frameworkStabilizers||(Rn.frameworkStabilizers=[]),Rn.frameworkStabilizers.push(n=>{const r=Rn.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?Hc().isShadowRoot(e)?this.findTestabilityInTree(t,e.host,!0):this.findTestabilityInTree(t,e.parentElement,!0):null)}},deps:[]},{provide:bN,useClass:_T,deps:[ft,vT,zw]},{provide:_T,useClass:_T,deps:[ft,vT,zw]}],OB=[{provide:Iv,useValue:"root"},{provide:al,useFactory:function O7(){return new al},deps:[]},{provide:sM,useClass:T7,multi:!0,deps:[jt,ft,fT]},{provide:sM,useClass:k7,multi:!0,deps:[jt]},{provide:aM,useClass:aM,deps:[oM,Cy,cm,MB]},{provide:Gl,useExisting:aM},{provide:bB,useExisting:Cy},{provide:Cy,useClass:Cy,deps:[jt]},{provide:oM,useClass:oM,deps:[sM,ft]},{provide:class HY{},useClass:x7,deps:[]},[]];let FB=(()=>{class i{constructor(e){}static withServerTransition(e){return{ngModule:i,providers:[{provide:cm,useValue:e.appId},{provide:vB,useExisting:cm},y7]}}}return i.\u0275fac=function(e){return new(e||i)(ee(kB,12))},i.\u0275mod=nn({type:i}),i.\u0275inj=Kt({providers:[...OB,...PB],imports:[Ao,_9]}),i})(),LB=(()=>{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)(ee(jt))},i.\u0275prov=ke({token:i,factory:function(e){let n=null;return n=e?new e:function B7(){return new LB(ee(jt))}(),n},providedIn:"root"}),i})();typeof window<"u"&&window;let QT=(()=>{class i{}return i.\u0275fac=function(e){return new(e||i)},i.\u0275prov=ke({token:i,factory:function(e){let n=null;return n=e?new(e||i):ee(UB),n},providedIn:"root"}),i})(),UB=(()=>{class i extends QT{constructor(e){super(),this._doc=e}sanitize(e,n){if(null==n)return null;switch(e){case Kn.NONE:return n;case Kn.HTML:return Ca(n,"HTML")?eo(n):Zx(this._doc,String(n)).toString();case Kn.STYLE:return Ca(n,"Style")?eo(n):n;case Kn.SCRIPT:if(Ca(n,"Script"))return eo(n);throw new Error("unsafe value used in a script context");case Kn.URL:return Ca(n,"URL")?eo(n):xh(String(n));case Kn.RESOURCE_URL:if(Ca(n,"ResourceURL"))return eo(n);throw new Error(`unsafe value used in a resource URL context (see ${qu})`);default:throw new Error(`Unexpected SecurityContext ${e} (see ${qu})`)}}bypassSecurityTrustHtml(e){return function uD(i){return new oD(i)}(e)}bypassSecurityTrustStyle(e){return function hD(i){return new aD(i)}(e)}bypassSecurityTrustScript(e){return function fD(i){return new lD(i)}(e)}bypassSecurityTrustUrl(e){return function pD(i){return new cD(i)}(e)}bypassSecurityTrustResourceUrl(e){return function mD(i){return new Pp(i)}(e)}}return i.\u0275fac=function(e){return new(e||i)(ee(jt))},i.\u0275prov=ke({token:i,factory:function(e){let n=null;return n=e?new e:function G7(i){return new UB(i.get(jt))}(ee(Gi)),n},providedIn:"root"}),i})();function ht(...i){return Li(i,$u(i))}class gt extends Re{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 fm=V(i=>function(){i(this),this.name="EmptyError",this.message="no elements in sequence"}),{isArray:$7}=Array,{getPrototypeOf:W7,prototype:j7,keys:Y7}=Object;function VB(i){if(1===i.length){const t=i[0];if($7(t))return{args:t,keys:null};if(function q7(i){return i&&"object"==typeof i&&W7(i)===j7}(t)){const e=Y7(t);return{args:e.map(n=>t[n]),keys:e}}}return{args:i,keys:null}}const{isArray:X7}=Array;function JT(i){return et(t=>function K7(i,t){return X7(t)?i(...t):i(t)}(i,t))}function zB(i,t){return i.reduce((e,n,r)=>(e[n]=t[r],e),{})}function nu(...i){const t=$u(i),e=w0(i),{args:n,keys:r}=VB(i);if(0===n.length)return Li([],t);const s=new In(function Z7(i,t,e=$a){return n=>{HB(t,()=>{const{length:r}=i,s=new Array(r);let o=r,a=r;for(let l=0;l{const c=Li(i[l],t);let d=!1;c.subscribe(Yn(n,h=>{s[l]=h,d||(d=!0,a--),a||n.next(e(s.slice()))},()=>{--o||n.complete()}))},n)},n)}}(n,t,r?o=>zB(r,o):$a));return e?s.pipe(JT(e)):s}function HB(i,t,e){i?Ya(e,i,t):t()}function Sy(...i){return function Q7(){return yd(1)}()(Li(i,$u(i)))}function Ey(i){return new In(t=>{wr(i()).subscribe(t)})}function pm(i,t){const e=cn(i)?i:()=>i,n=r=>r.error(e());return new In(t?r=>t.schedule(n,0,r):n)}function eI(){return ti((i,t)=>{let e=null;i._refCount++;const n=Yn(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 GB extends In{constructor(t,e){super(),this.source=t,this.subjectFactory=e,this._subject=null,this._refCount=0,this._connection=null,c0(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 Zt;const e=this.getSubject();t.add(this.source.subscribe(Yn(e,void 0,()=>{this._teardown(),e.complete()},n=>{this._teardown(),e.error(n)},()=>this._teardown()))),t.closed&&(this._connection=null,t=Zt.EMPTY)}return t}refCount(){return eI()(this)}}function Rs(i,t){return ti((e,n)=>{let r=null,s=0,o=!1;const a=()=>o&&!r&&n.complete();e.subscribe(Yn(n,l=>{r?.unsubscribe();let c=0;const d=s++;wr(i(l,d)).subscribe(r=Yn(n,h=>n.next(t?t(l,h,d,c++):h),()=>{r=null,a()}))},()=>{o=!0,a()}))})}function Pi(i){return i<=0?()=>mo:ti((t,e)=>{let n=0;t.subscribe(Yn(e,r=>{++n<=i&&(e.next(r),i<=n&&e.complete())}))})}function Do(...i){const t=$u(i);return ti((e,n)=>{(t?Sy(i,e,t):Sy(i,e)).subscribe(n)})}function gn(i,t){return ti((e,n)=>{let r=0;e.subscribe(Yn(n,s=>i.call(t,s,r++)&&n.next(s)))})}function lM(i){return ti((t,e)=>{let n=!1;t.subscribe(Yn(e,r=>{n=!0,e.next(r)},()=>{n||e.next(i),e.complete()}))})}function $B(i=J7){return ti((t,e)=>{let n=!1;t.subscribe(Yn(e,r=>{n=!0,e.next(r)},()=>n?e.complete():e.error(i())))})}function J7(){return new fm}function iu(i,t){const e=arguments.length>=2;return n=>n.pipe(i?gn((r,s)=>i(r,s,n)):$a,Pi(1),e?lM(t):$B(()=>new fm))}function ru(i,t){return cn(t)?ir(i,t,1):ir(i,1)}function Ui(i,t,e){const n=cn(i)||t||e?{next:i,error:t,complete:e}:i;return n?ti((r,s)=>{var o;null===(o=n.subscribe)||void 0===o||o.call(n);let a=!0;r.subscribe(Yn(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)}))}):$a}function Wc(i){return ti((t,e)=>{let s,n=null,r=!1;n=t.subscribe(Yn(e,void 0,void 0,o=>{s=wr(i(o,Wc(i)(t))),n?(n.unsubscribe(),n=null,s.subscribe(e)):r=!0})),r&&(n.unsubscribe(),n=null,s.subscribe(e))})}function tI(i,t){return ti(function eq(i,t,e,n,r){return(s,o)=>{let a=e,l=t,c=0;s.subscribe(Yn(o,d=>{const h=c++;l=a?i(l,d,h):(a=!0,d),n&&o.next(l)},r&&(()=>{a&&o.next(l),o.complete()})))}}(i,t,arguments.length>=2,!0))}function nI(i){return i<=0?()=>mo:ti((t,e)=>{let n=[];t.subscribe(Yn(e,r=>{n.push(r),i{for(const r of n)e.next(r);e.complete()},void 0,()=>{n=null}))})}function WB(i,t){const e=arguments.length>=2;return n=>n.pipe(i?gn((r,s)=>i(r,s,n)):$a,nI(1),e?lM(t):$B(()=>new fm))}function jB(i,t=!1){return ti((e,n)=>{let r=0;e.subscribe(Yn(n,s=>{const o=i(s,r++);(o||t)&&n.next(s),!o&&n.complete()}))})}function YB(i){return et(()=>i)}function su(i){return ti((t,e)=>{try{t.subscribe(e)}finally{e.add(i)}})}const _n="primary",Ay=Symbol("RouteTitle");class tq{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 tq(i)}function nq(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 XB(i){return Array.prototype.concat.apply([],i)}function KB(i){return i.length>0?i[i.length-1]:null}function os(i,t){for(const e in i)i.hasOwnProperty(e)&&t(i[e],e)}function ou(i){return L1(i)?i:oy(i)?Li(Promise.resolve(i)):ht(i)}const cM=!1,rq={exact:function JB(i,t,e){if(!Rh(i.segments,t.segments)||!dM(i.segments,t.segments,e)||i.numberOfChildren!==t.numberOfChildren)return!1;for(const n in t.children)if(!i.children[n]||!JB(i.children[n],t.children[n],e))return!1;return!0},subset:e3},ZB={exact:function sq(i,t){return Xl(i,t)},subset:function oq(i,t){return Object.keys(t).length<=Object.keys(i).length&&Object.keys(t).every(e=>qB(i[e],t[e]))},ignored:()=>!0};function QB(i,t,e){return rq[e.paths](i.root,t.root,e.matrixParams)&&ZB[e.queryParams](i.queryParams,t.queryParams)&&!("exact"===e.fragment&&i.fragment!==t.fragment)}function e3(i,t,e){return t3(i,t,t.segments,e)}function t3(i,t,e,n){if(i.segments.length>e.length){const r=i.segments.slice(0,e.length);return!(!Rh(r,e)||t.hasChildren()||!dM(r,e,n))}if(i.segments.length===e.length){if(!Rh(i.segments,e)||!dM(i.segments,e,n))return!1;for(const r in t.children)if(!i.children[r]||!e3(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!!(Rh(i.segments,r)&&dM(i.segments,r,n)&&i.children[_n])&&t3(i.children[_n],t,s,n)}}function dM(i,t,e){return t.every((n,r)=>ZB[e](i[r].parameters,n.parameters))}class au{constructor(t=new Tn([],{}),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 cq.serialize(this)}}class Tn{constructor(t,e){this.segments=t,this.children=e,this.parent=null,os(e,(n,r)=>n.parent=this)}hasChildren(){return this.numberOfChildren>0}get numberOfChildren(){return Object.keys(this.children).length}toString(){return uM(this)}}class Dy{constructor(t,e){this.path=t,this.parameters=e}get parameterMap(){return this._parameterMap||(this._parameterMap=mm(this.parameters)),this._parameterMap}toString(){return s3(this)}}function Rh(i,t){return i.length===t.length&&i.every((e,n)=>e.path===t[n].path)}let Ty=(()=>{class i{}return i.\u0275fac=function(e){return new(e||i)},i.\u0275prov=ke({token:i,factory:function(){return new iI},providedIn:"root"}),i})();class iI{parse(t){const e=new vq(t);return new au(e.parseRootSegment(),e.parseQueryParams(),e.parseFragment())}serialize(t){const e=`/${Iy(t.root,!0)}`,n=function hq(i){const t=Object.keys(i).map(e=>{const n=i[e];return Array.isArray(n)?n.map(r=>`${hM(e)}=${hM(r)}`).join("&"):`${hM(e)}=${hM(n)}`}).filter(e=>!!e);return t.length?`?${t.join("&")}`:""}(t.queryParams);return`${e}${n}${"string"==typeof t.fragment?`#${function dq(i){return encodeURI(i)}(t.fragment)}`:""}`}}const cq=new iI;function uM(i){return i.segments.map(t=>s3(t)).join("/")}function Iy(i,t){if(!i.hasChildren())return uM(i);if(t){const e=i.children[_n]?Iy(i.children[_n],!1):"",n=[];return os(i.children,(r,s)=>{s!==_n&&n.push(`${s}:${Iy(r,!1)}`)}),n.length>0?`${e}(${n.join("//")})`:e}{const e=function lq(i,t){let e=[];return os(i.children,(n,r)=>{r===_n&&(e=e.concat(t(n,r)))}),os(i.children,(n,r)=>{r!==_n&&(e=e.concat(t(n,r)))}),e}(i,(n,r)=>r===_n?[Iy(i.children[_n],!1)]:[`${r}:${Iy(n,!1)}`]);return 1===Object.keys(i.children).length&&null!=i.children[_n]?`${uM(i)}/${e[0]}`:`${uM(i)}/(${e.join("//")})`}}function n3(i){return encodeURIComponent(i).replace(/%40/g,"@").replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",")}function hM(i){return n3(i).replace(/%3B/gi,";")}function rI(i){return n3(i).replace(/\(/g,"%28").replace(/\)/g,"%29").replace(/%26/gi,"&")}function fM(i){return decodeURIComponent(i)}function r3(i){return fM(i.replace(/\+/g,"%20"))}function s3(i){return`${rI(i.path)}${function uq(i){return Object.keys(i).map(t=>`;${rI(t)}=${rI(i[t])}`).join("")}(i.parameters)}`}const fq=/^[^\/()?;=#]+/;function pM(i){const t=i.match(fq);return t?t[0]:""}const pq=/^[^=?&#]+/,gq=/^[^&#]+/;class vq{constructor(t){this.url=t,this.remaining=t}parseRootSegment(){return this.consumeOptional("/"),""===this.remaining||this.peekStartsWith("?")||this.peekStartsWith("#")?new Tn([],{}):new Tn([],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[_n]=new Tn(t,e)),n}parseSegment(){const t=pM(this.remaining);if(""===t&&this.peekStartsWith(";"))throw new pe(4009,cM);return this.capture(t),new Dy(fM(t),this.parseMatrixParams())}parseMatrixParams(){const t={};for(;this.consumeOptional(";");)this.parseParam(t);return t}parseParam(t){const e=pM(this.remaining);if(!e)return;this.capture(e);let n="";if(this.consumeOptional("=")){const r=pM(this.remaining);r&&(n=r,this.capture(n))}t[fM(e)]=fM(n)}parseQueryParam(t){const e=function mq(i){const t=i.match(pq);return t?t[0]:""}(this.remaining);if(!e)return;this.capture(e);let n="";if(this.consumeOptional("=")){const o=function _q(i){const t=i.match(gq);return t?t[0]:""}(this.remaining);o&&(n=o,this.capture(n))}const r=r3(e),s=r3(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=pM(this.remaining),r=this.remaining[n.length];if("/"!==r&&")"!==r&&";"!==r)throw new pe(4010,cM);let s;n.indexOf(":")>-1?(s=n.slice(0,n.indexOf(":")),this.capture(s),this.capture(":")):t&&(s=_n);const o=this.parseChildren();e[s]=1===Object.keys(o).length?o[_n]:new Tn([],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 pe(4011,cM)}}function sI(i){return i.segments.length>0?new Tn([],{[_n]:i}):i}function mM(i){const t={};for(const n of Object.keys(i.children)){const s=mM(i.children[n]);(s.segments.length>0||s.hasChildren())&&(t[n]=s)}return function yq(i){if(1===i.numberOfChildren&&i.children[_n]){const t=i.children[_n];return new Tn(i.segments.concat(t.segments),t.children)}return i}(new Tn(i.segments,t))}function kh(i){return i instanceof au}const oI=!1;function bq(i,t,e,n,r){if(0===e.length)return gm(t.root,t.root,t.root,n,r);const s=function d3(i){if("string"==typeof i[0]&&1===i.length&&"/"===i[0])return new c3(!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 os(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 c3(e,t,n)}(e);return s.toRoot()?gm(t.root,t.root,new Tn([],{}),n,r):function o(l){const c=function wq(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 u3(i,t,e){let n=i,r=t,s=e;for(;s>r;){if(s-=r,n=n.parent,!n)throw new pe(4005,oI&&"Invalid number of '../'");r=n.segments.length}return new _m(n,!1,r-s)}(e,n+(Ry(i.commands[0])?0:1),i.numberOfDoubleDots)}(s,t,i.snapshot?._urlSegment,l),d=c.processChildren?vm(c.segmentGroup,c.index,s.commands):aI(c.segmentGroup,c.index,s.commands);return gm(t.root,c.segmentGroup,d,n,r)}(i.snapshot?._lastPathIndex)}function Ry(i){return"object"==typeof i&&null!=i&&!i.outlets&&!i.segmentPath}function ky(i){return"object"==typeof i&&null!=i&&i.outlets}function gm(i,t,e,n,r){let o,s={};n&&os(n,(l,c)=>{s[c]=Array.isArray(l)?l.map(d=>`${d}`):`${l}`}),o=i===t?e:l3(i,t,e);const a=sI(mM(o));return new au(a,s,r)}function l3(i,t,e){const n={};return os(i.children,(r,s)=>{n[s]=r===t?e:l3(r,t,e)}),new Tn(i.segments,n)}class c3{constructor(t,e,n){if(this.isAbsolute=t,this.numberOfDoubleDots=e,this.commands=n,t&&n.length>0&&Ry(n[0]))throw new pe(4003,oI&&"Root segment cannot have matrix parameters");const r=n.find(ky);if(r&&r!==KB(n))throw new pe(4004,oI&&"{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 aI(i,t,e){if(i||(i=new Tn([],{})),0===i.segments.length&&i.hasChildren())return vm(i,t,e);const n=function Cq(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(ky(a))break;const l=`${a}`,c=n0&&void 0===l)break;if(l&&c&&"object"==typeof c&&void 0===c.outlets){if(!f3(l,c,o))return s;n+=2}else{if(!f3(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]=aI(i.children[o],t,s))}),os(i.children,(s,o)=>{void 0===n[o]&&(r[o]=s)}),new Tn(i.segments,r)}}function lI(i,t,e){const n=i.segments.slice(0,t);let r=0;for(;r{"string"==typeof e&&(e=[e]),null!==e&&(t[n]=lI(new Tn([],{}),0,e))}),t}function h3(i){const t={};return os(i,(e,n)=>t[n]=`${e}`),t}function f3(i,t,e){return i==e.path&&Xl(t,e.parameters)}const Py="imperative";class Kl{constructor(t,e){this.id=t,this.url=e}}class cI extends Kl{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 Ph extends Kl{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 gM extends Kl{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 _M extends Kl{constructor(t,e,n,r){super(t,e),this.reason=n,this.code=r,this.type=16}}class dI extends Kl{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 Eq extends Kl{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 Aq extends Kl{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 Dq extends Kl{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 Tq extends Kl{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 Iq extends Kl{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 Rq{constructor(t){this.route=t,this.type=9}toString(){return`RouteConfigLoadStart(path: ${this.route.path})`}}class kq{constructor(t){this.route=t,this.type=10}toString(){return`RouteConfigLoadEnd(path: ${this.route.path})`}}class Pq{constructor(t){this.snapshot=t,this.type=11}toString(){return`ChildActivationStart(path: '${this.snapshot.routeConfig&&this.snapshot.routeConfig.path||""}')`}}class Oq{constructor(t){this.snapshot=t,this.type=12}toString(){return`ChildActivationEnd(path: '${this.snapshot.routeConfig&&this.snapshot.routeConfig.path||""}')`}}class Fq{constructor(t){this.snapshot=t,this.type=13}toString(){return`ActivationStart(path: '${this.snapshot.routeConfig&&this.snapshot.routeConfig.path||""}')`}}class Lq{constructor(t){this.snapshot=t,this.type=14}toString(){return`ActivationEnd(path: '${this.snapshot.routeConfig&&this.snapshot.routeConfig.path||""}')`}}class p3{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 Uq=(()=>{class i{createUrlTree(e,n,r,s,o,a){return bq(e||n.root,r,s,o,a)}}return i.\u0275fac=function(e){return new(e||i)},i.\u0275prov=ke({token:i,factory:i.\u0275fac}),i})(),zq=(()=>{class i{}return i.\u0275fac=function(e){return new(e||i)},i.\u0275prov=ke({token:i,factory:function(t){return Uq.\u0275fac(t)},providedIn:"root"}),i})();class m3{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=uI(t,this._root);return e?e.children.map(n=>n.value):[]}firstChild(t){const e=uI(t,this._root);return e&&e.children.length>0?e.children[0].value:null}siblings(t){const e=hI(t,this._root);return e.length<2?[]:e[e.length-2].children.map(r=>r.value).filter(r=>r!==t)}pathFromRoot(t){return hI(t,this._root).map(e=>e.value)}}function uI(i,t){if(i===t.value)return t;for(const e of t.children){const n=uI(i,e);if(n)return n}return null}function hI(i,t){if(i===t.value)return[t];for(const e of t.children){const n=hI(i,e);if(n.length)return n.unshift(t),n}return[]}class jc{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 g3 extends m3{constructor(t,e){super(t),this.snapshot=e,fI(this,t)}toString(){return this.snapshot.toString()}}function _3(i,t){const e=function Hq(i,t){const o=new vM([],{},{},"",{},_n,t,null,i.root,-1,{});return new y3("",new jc(o,[]))}(i,t),n=new gt([new Dy("",{})]),r=new gt({}),s=new gt({}),o=new gt({}),a=new gt(""),l=new bm(n,r,o,a,s,_n,t,e.root);return l.snapshot=e.root,new g3(new jc(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(et(c=>c[Ay]))??ht(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(et(t=>mm(t)))),this._paramMap}get queryParamMap(){return this._queryParamMap||(this._queryParamMap=this.queryParams.pipe(et(t=>mm(t)))),this._queryParamMap}toString(){return this.snapshot?this.snapshot.toString():`Future(${this._futureSnapshot})`}}function v3(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 Gq(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 vM{get title(){return this.data?.[Ay]}constructor(t,e,n,r,s,o,a,l,c,d,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=d,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 y3 extends m3{constructor(t,e){super(e),this.url=t,fI(this,e)}toString(){return b3(this._root)}}function fI(i,t){t.value._routerState=i,t.children.forEach(e=>fI(i,e))}function b3(i){const t=i.children.length>0?` { ${i.children.map(b3).join(", ")} } `:"";return`${i.value}${t}`}function pI(i){if(i.snapshot){const t=i.snapshot,e=i._futureSnapshot;i.snapshot=e,Xl(t.queryParams,e.queryParams)||i.queryParams.next(e.queryParams),t.fragment!==e.fragment&&i.fragment.next(e.fragment),Xl(t.params,e.params)||i.params.next(e.params),function iq(i,t){if(i.length!==t.length)return!1;for(let e=0;eXl(e.parameters,t[n].parameters))}(i.url,t.url);return e&&!(!i.parent!=!t.parent)&&(!i.parent||mI(i.parent,t.parent))}function Oy(i,t,e){if(e&&i.shouldReuseRoute(t.value,e.value.snapshot)){const n=e.value;n._futureSnapshot=t.value;const r=function Wq(i,t,e){return t.children.map(n=>{for(const r of e.children)if(i.shouldReuseRoute(n.value,r.value.snapshot))return Oy(i,n,r);return Oy(i,n)})}(i,t,e);return new jc(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=>Oy(i,a)),o}}const n=function jq(i){return new bm(new gt(i.url),new gt(i.params),new gt(i.queryParams),new gt(i.fragment),new gt(i.data),i.outlet,i.component,i)}(t.value),r=t.children.map(s=>Oy(i,s));return new jc(n,r)}}const gI="ngNavigationCancelingError";function x3(i,t){const{redirectTo:e,navigationBehaviorOptions:n}=kh(t)?{redirectTo:t,navigationBehaviorOptions:void 0}:t,r=w3(!1,0,t);return r.url=e,r.navigationBehaviorOptions=n,r}function w3(i,t,e){const n=new Error("NavigationCancelingError: "+(i||""));return n[gI]=!0,n.cancellationCode=t,e&&(n.url=e),n}function M3(i){return C3(i)&&kh(i.url)}function C3(i){return i&&i[gI]}class Yq{constructor(){this.outlet=null,this.route=null,this.resolver=null,this.injector=null,this.children=new Fy,this.attachRef=null}}let Fy=(()=>{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 Yq,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=ke({token:i,factory:i.\u0275fac,providedIn:"root"}),i})();const yM=!1;let S3=(()=>{class i{constructor(){this.activated=null,this._activatedRoute=null,this.name=_n,this.activateEvents=new We,this.deactivateEvents=new We,this.attachEvents=new We,this.detachEvents=new We,this.parentContexts=Ft(Fy),this.location=Ft(Wr),this.changeDetector=Ft(Zn),this.environmentInjector=Ft(no)}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 pe(4012,yM);return this.activated.instance}get activatedRoute(){if(!this.activated)throw new pe(4012,yM);return this._activatedRoute}get activatedRouteData(){return this._activatedRoute?this._activatedRoute.snapshot.data:{}}detach(){if(!this.activated)throw new pe(4012,yM);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 pe(4013,yM);this._activatedRoute=e;const r=this.location,o=e.snapshot.component,a=this.parentContexts.getOrCreateContext(this.name).children,l=new qq(e,a,r.injector);if(n&&function Xq(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=ve({type:i,selectors:[["router-outlet"]],inputs:{name:"name"},outputs:{activateEvents:"activate",deactivateEvents:"deactivate",attachEvents:"attach",detachEvents:"detach"},exportAs:["outlet"],standalone:!0,features:[bi]}),i})();class qq{constructor(t,e,n){this.route=t,this.childContexts=e,this.parent=n}get(t,e){return t===bm?this.route:t===Fy?this.childContexts:this.parent.get(t,e)}}let _I=(()=>{class i{}return i.\u0275fac=function(e){return new(e||i)},i.\u0275cmp=ot({type:i,selectors:[["ng-component"]],standalone:!0,features:[Z1],decls:1,vars:0,template:function(e,n){1&e&&De(0,"router-outlet")},dependencies:[S3],encapsulation:2}),i})();function E3(i,t){return i.providers&&!i._injector&&(i._injector=Fw(i.providers,t,`Route: ${i.path}`)),i._injector??t}function yI(i){const t=i.children&&i.children.map(yI),e=t?{...i,children:t}:{...i};return!e.component&&!e.loadComponent&&(t||e.loadChildren)&&e.outlet&&e.outlet!==_n&&(e.component=_I),e}function Ta(i){return i.outlet||_n}function A3(i,t){const e=i.filter(n=>Ta(n)===t);return e.push(...i.filter(n=>Ta(n)!==t)),e}function Ly(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 eX{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),pI(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]}),os(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 Lq(s.value.snapshot))}),t.children.length&&this.forwardEvent(new Oq(t.value.snapshot))}activateRoutes(t,e,n){const r=t.value,s=e?e.value:null;if(pI(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),pI(a.route.value),this.activateChildRoutes(t,null,o.children)}else{const a=Ly(r.snapshot),l=a?.get(Hl)??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 D3{constructor(t){this.path=t,this.route=this.path[this.path.length-1]}}class bM{constructor(t,e){this.component=t,this.route=e}}function tX(i,t,e){const n=i._root;return Ny(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 Cr(i){return null!==Gf(i)}(i)?t.get(i):i:n}function Ny(i,t,e,n,r={canDeactivateChecks:[],canActivateChecks:[]}){const s=ym(t);return i.children.forEach(o=>{(function iX(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 rX(i,t,e){if("function"==typeof e)return e(i,t);switch(e){case"pathParamsChange":return!Rh(i.url,t.url);case"pathParamsOrQueryParamsChange":return!Rh(i.url,t.url)||!Xl(i.queryParams,t.queryParams);case"always":return!0;case"paramsOrQueryParamsChange":return!mI(i,t)||!Xl(i.queryParams,t.queryParams);default:return!mI(i,t)}}(o,s,s.routeConfig.runGuardsAndResolvers);l?r.canActivateChecks.push(new D3(n)):(s.data=o.data,s._resolvedData=o._resolvedData),Ny(i,t,s.component?a?a.children:null:e,n,r),l&&a&&a.outlet&&a.outlet.isActivated&&r.canDeactivateChecks.push(new bM(a.outlet.component,o))}else o&&By(t,a,r),r.canActivateChecks.push(new D3(n)),Ny(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]}),os(s,(o,a)=>By(o,e.getContext(a),r)),r}function By(i,t,e){const n=ym(i),r=i.value;os(n,(s,o)=>{By(s,r.component?t?t.children.getContext(o):null:t,e)}),e.canDeactivateChecks.push(new bM(r.component&&t&&t.outlet&&t.outlet.isActivated?t.outlet.component:null,r))}function Uy(i){return"function"==typeof i}function bI(i){return i instanceof fm||"EmptyError"===i?.name}const xM=Symbol("INITIAL_VALUE");function wm(){return Rs(i=>nu(i.map(t=>t.pipe(Pi(1),Do(xM)))).pipe(et(t=>{for(const e of t)if(!0!==e){if(e===xM)return xM;if(!1===e||e instanceof au)return e}return!0}),gn(t=>t!==xM),Pi(1)))}function T3(i){return function CE(...i){return a0(i)}(Ui(t=>{if(kh(t))throw x3(0,t)}),et(t=>!0===t))}const xI={matched:!1,consumedSegments:[],remainingSegments:[],parameters:{},positionalParamSegments:{}};function I3(i,t,e,n,r){const s=wI(i,t,e);return s.matched?function xX(i,t,e,n){const r=t.canMatch;return r&&0!==r.length?ht(r.map(o=>{const a=xm(o,i);return ou(function dX(i){return i&&Uy(i.canMatch)}(a)?a.canMatch(t,e):i.runInContext(()=>a(t,e)))})).pipe(wm(),T3()):ht(!0)}(n=E3(t,n),t,e).pipe(et(o=>!0===o?s:{...xI})):ht(s)}function wI(i,t,e){if(""===t.path)return"full"===t.pathMatch&&(i.hasChildren()||e.length>0)?{...xI}:{matched:!0,consumedSegments:[],remainingSegments:e,parameters:{},positionalParamSegments:{}};const r=(t.matcher||nq)(e,i,t);if(!r)return{...xI};const s={};os(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 wM(i,t,e,n){if(e.length>0&&function CX(i,t,e){return e.some(n=>MM(i,t,n)&&Ta(n)!==_n)}(i,e,n)){const s=new Tn(t,function MX(i,t,e,n){const r={};r[_n]=n,n._sourceSegment=i,n._segmentIndexShift=t.length;for(const s of e)if(""===s.path&&Ta(s)!==_n){const o=new Tn([],{});o._sourceSegment=i,o._segmentIndexShift=t.length,r[Ta(s)]=o}return r}(i,t,n,new Tn(e,i.children)));return s._sourceSegment=i,s._segmentIndexShift=t.length,{segmentGroup:s,slicedSegments:[]}}if(0===e.length&&function SX(i,t,e){return e.some(n=>MM(i,t,n))}(i,e,n)){const s=new Tn(i.segments,function wX(i,t,e,n,r){const s={};for(const o of n)if(MM(i,e,o)&&!r[Ta(o)]){const a=new Tn([],{});a._sourceSegment=i,a._segmentIndexShift=t.length,s[Ta(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 Tn(i.segments,i.children);return r._sourceSegment=i,r._segmentIndexShift=t.length,{segmentGroup:r,slicedSegments:e}}function MM(i,t,e){return(!(i.hasChildren()||t.length>0)||"full"!==e.pathMatch)&&""===e.path}function R3(i,t,e,n){return!!(Ta(i)===n||n!==_n&&MM(t,e,i))&&("**"===i.path||wI(t,i,e).matched)}function k3(i,t,e){return 0===t.length&&!i.children[e]}const CM=!1;class SM{constructor(t){this.segmentGroup=t||null}}class P3{constructor(t){this.urlTree=t}}function Vy(i){return pm(new SM(i))}function O3(i){return pm(new P3(i))}class TX{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=wM(this.urlTree.root,[],[],this.config).segmentGroup,e=new Tn(t.segments,t.children);return this.expandSegmentGroup(this.injector,this.config,e,_n).pipe(et(s=>this.createUrlTree(mM(s),this.urlTree.queryParams,this.urlTree.fragment))).pipe(Wc(s=>{if(s instanceof P3)return this.allowRedirects=!1,this.match(s.urlTree);throw s instanceof SM?this.noMatchError(s):s}))}match(t){return this.expandSegmentGroup(this.injector,this.config,t.root,_n).pipe(et(r=>this.createUrlTree(mM(r),t.queryParams,t.fragment))).pipe(Wc(r=>{throw r instanceof SM?this.noMatchError(r):r}))}noMatchError(t){return new pe(4002,CM)}createUrlTree(t,e,n){const r=sI(t);return new au(r,e,n)}expandSegmentGroup(t,e,n,r){return 0===n.segments.length&&n.hasChildren()?this.expandChildren(t,e,n).pipe(et(s=>new Tn([],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 Li(r).pipe(ru(s=>{const o=n.children[s],a=A3(e,s);return this.expandSegmentGroup(t,a,o,s).pipe(et(l=>({segment:l,outlet:s})))}),tI((s,o)=>(s[o.outlet]=o.segment,s),{}),WB())}expandSegment(t,e,n,r,s,o){return Li(n).pipe(ru(a=>this.expandSegmentAgainstRoute(t,e,n,a,r,s,o).pipe(Wc(c=>{if(c instanceof SM)return ht(null);throw c}))),iu(a=>!!a),Wc((a,l)=>{if(bI(a))return k3(e,r,s)?ht(new Tn([],{})):Vy(e);throw a}))}expandSegmentAgainstRoute(t,e,n,r,s,o,a){return R3(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):Vy(e):Vy(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("/")?O3(s):this.lineralizeSegments(n,s).pipe(ir(o=>{const a=new Tn(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:d}=wI(e,r,s);if(!a)return Vy(e);const h=this.applyRedirectCommands(l,r.redirectTo,d);return r.redirectTo.startsWith("/")?O3(h):this.lineralizeSegments(r,h).pipe(ir(p=>this.expandSegment(t,e,n,p.concat(c),o,!1)))}matchSegmentAgainstRoute(t,e,n,r,s){return"**"===n.path?(t=E3(n,t),n.loadChildren?(n._loadedRoutes?ht({routes:n._loadedRoutes,injector:n._loadedInjector}):this.configLoader.loadChildren(t,n)).pipe(et(a=>(n._loadedRoutes=a.routes,n._loadedInjector=a.injector,new Tn(r,{})))):ht(new Tn(r,{}))):I3(e,n,r,t).pipe(Rs(({matched:o,consumedSegments:a,remainingSegments:l})=>o?this.getChildConfig(t=n._injector??t,n,r).pipe(ir(d=>{const h=d.injector??t,p=d.routes,{segmentGroup:m,slicedSegments:g}=wM(e,a,l,p),b=new Tn(m.segments,m.children);if(0===g.length&&b.hasChildren())return this.expandChildren(h,p,b).pipe(et(x=>new Tn(a,x)));if(0===p.length&&0===g.length)return ht(new Tn(a,{}));const v=Ta(n)===s;return this.expandSegment(h,b,p,g,v?_n:s,!0).pipe(et(M=>new Tn(a.concat(M.segments),M.children)))})):Vy(e)))}getChildConfig(t,e,n){return e.children?ht({routes:e.children,injector:t}):e.loadChildren?void 0!==e._loadedRoutes?ht({routes:e._loadedRoutes,injector:e._loadedInjector}):function bX(i,t,e,n){const r=t.canLoad;return void 0===r||0===r.length?ht(!0):ht(r.map(o=>{const a=xm(o,i);return ou(function oX(i){return i&&Uy(i.canLoad)}(a)?a.canLoad(t,e):i.runInContext(()=>a(t,e)))})).pipe(wm(),T3())}(t,e,n).pipe(ir(r=>r?this.configLoader.loadChildren(t,e).pipe(Ui(s=>{e._loadedRoutes=s.routes,e._loadedInjector=s.injector})):function AX(i){return pm(w3(CM,3))}())):ht({routes:[],injector:t})}lineralizeSegments(t,e){let n=[],r=e.root;for(;;){if(n=n.concat(r.segments),0===r.numberOfChildren)return ht(n);if(r.numberOfChildren>1||!r.children[_n])return t.redirectTo,pm(new pe(4e3,CM));r=r.children[_n]}}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 au(s,this.createQueryParams(e.queryParams,this.urlTree.queryParams),e.fragment)}createQueryParams(t,e){const n={};return os(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 os(e.children,(a,l)=>{o[l]=this.createSegmentGroup(t,a,n,r)}),new Tn(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 pe(4001,CM);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 RX{}class OX{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=wM(this.urlTree.root,[],[],this.config.filter(e=>void 0===e.redirectTo)).segmentGroup;return this.processSegmentGroup(this.injector,this.config,t,_n).pipe(et(e=>{if(null===e)return null;const n=new vM([],Object.freeze({}),Object.freeze({...this.urlTree.queryParams}),this.urlTree.fragment,{},_n,this.rootComponentType,null,this.urlTree.root,-1,{}),r=new jc(n,e),s=new y3(this.url,r);return this.inheritParamsAndData(s._root),s}))}inheritParamsAndData(t){const e=t.value,n=v3(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 Li(Object.keys(n.children)).pipe(ru(r=>{const s=n.children[r],o=A3(e,r);return this.processSegmentGroup(t,o,s,r)}),tI((r,s)=>r&&s?(r.push(...s),r):null),jB(r=>null!==r),lM(null),WB(),et(r=>{if(null===r)return null;const s=L3(r);return function FX(i){i.sort((t,e)=>t.value.outlet===_n?-1:e.value.outlet===_n?1:t.value.outlet.localeCompare(e.value.outlet))}(s),s}))}processSegment(t,e,n,r,s){return Li(e).pipe(ru(o=>this.processSegmentAgainstRoute(o._injector??t,o,n,r,s)),iu(o=>!!o),Wc(o=>{if(bI(o))return k3(n,r,s)?ht([]):ht(null);throw o}))}processSegmentAgainstRoute(t,e,n,r,s){if(e.redirectTo||!R3(e,n,r,s))return ht(null);let o;if("**"===e.path){const a=r.length>0?KB(r).parameters:{},l=B3(n)+r.length;o=ht({snapshot:new vM(r,a,Object.freeze({...this.urlTree.queryParams}),this.urlTree.fragment,U3(e),Ta(e),e.component??e._loadedComponent??null,e,N3(n),l,V3(e)),consumedSegments:[],remainingSegments:[]})}else o=I3(n,e,r,t).pipe(et(({matched:a,consumedSegments:l,remainingSegments:c,parameters:d})=>{if(!a)return null;const h=B3(n)+l.length;return{snapshot:new vM(l,d,Object.freeze({...this.urlTree.queryParams}),this.urlTree.fragment,U3(e),Ta(e),e.component??e._loadedComponent??null,e,N3(n),h,V3(e)),consumedSegments:l,remainingSegments:c}}));return o.pipe(Rs(a=>{if(null===a)return ht(null);const{snapshot:l,consumedSegments:c,remainingSegments:d}=a;t=e._injector??t;const h=e._loadedInjector??t,p=function LX(i){return i.children?i.children:i.loadChildren?i._loadedRoutes:[]}(e),{segmentGroup:m,slicedSegments:g}=wM(n,c,d,p.filter(v=>void 0===v.redirectTo));if(0===g.length&&m.hasChildren())return this.processChildren(h,p,m).pipe(et(v=>null===v?null:[new jc(l,v)]));if(0===p.length&&0===g.length)return ht([new jc(l,[])]);const b=Ta(e)===s;return this.processSegment(h,p,m,g,b?_n:s).pipe(et(v=>null===v?null:[new jc(l,v)]))}))}}function NX(i){const t=i.value.routeConfig;return t&&""===t.path&&void 0===t.redirectTo}function L3(i){const t=[],e=new Set;for(const n of i){if(!NX(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=L3(n.children);t.push(new jc(n.value,r))}return t.filter(n=>!e.has(n))}function N3(i){let t=i;for(;t._sourceSegment;)t=t._sourceSegment;return t}function B3(i){let t=i,e=t._segmentIndexShift??0;for(;t._sourceSegment;)t=t._sourceSegment,e+=t._segmentIndexShift??0;return e-1}function U3(i){return i.data||{}}function V3(i){return i.resolve||{}}function z3(i){return"string"==typeof i.title||null===i.title}function MI(i){return Rs(t=>{const e=i(t);return e?Li(e).pipe(et(()=>t)):ht(t)})}const Mm=new me("ROUTES");let CI=(()=>{class i{constructor(){this.componentLoaders=new WeakMap,this.childrenLoaders=new WeakMap,this.compiler=Ft(mN)}loadComponent(e){if(this.componentLoaders.get(e))return this.componentLoaders.get(e);if(e._loadedComponent)return ht(e._loadedComponent);this.onLoadStartListener&&this.onLoadStartListener(e);const n=ou(e.loadComponent()).pipe(et(G3),Ui(s=>{this.onLoadEndListener&&this.onLoadEndListener(e),e._loadedComponent=s}),su(()=>{this.componentLoaders.delete(e)})),r=new GB(n,()=>new Re).pipe(eI());return this.componentLoaders.set(e,r),r}loadChildren(e,n){if(this.childrenLoaders.get(n))return this.childrenLoaders.get(n);if(n._loadedRoutes)return ht({routes:n._loadedRoutes,injector:n._loadedInjector});this.onLoadStartListener&&this.onLoadStartListener(n);const s=this.loadModuleFactoryOrRoutes(n.loadChildren).pipe(et(a=>{this.onLoadEndListener&&this.onLoadEndListener(n);let l,c,d=!1;Array.isArray(a)?c=a:(l=a.create(e).injector,c=XB(l.get(Mm,[],Ot.Self|Ot.Optional)));return{routes:c.map(yI),injector:l}}),su(()=>{this.childrenLoaders.delete(n)})),o=new GB(s,()=>new Re).pipe(eI());return this.childrenLoaders.set(n,o),o}loadModuleFactoryOrRoutes(e){return ou(e()).pipe(et(G3),ir(n=>n instanceof D2||Array.isArray(n)?ht(n):Li(this.compiler.compileModuleAsync(n))))}}return i.\u0275fac=function(e){return new(e||i)},i.\u0275prov=ke({token:i,factory:i.\u0275fac,providedIn:"root"}),i})();function G3(i){return function WX(i){return i&&"object"==typeof i&&"default"in i}(i)?i.default:i}let AM=(()=>{class i{get hasRequestedNavigation(){return 0!==this.navigationId}constructor(){this.currentNavigation=null,this.lastSuccessfulNavigation=null,this.events=new Re,this.configLoader=Ft(CI),this.environmentInjector=Ft(no),this.urlSerializer=Ft(Ty),this.rootContexts=Ft(Fy),this.navigationId=0,this.afterPreactivation=()=>ht(void 0),this.rootComponentType=null,this.configLoader.onLoadEndListener=r=>this.events.next(new kq(r)),this.configLoader.onLoadStartListener=r=>this.events.next(new Rq(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 gt({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:Py,restoredState:null,currentSnapshot:e.routerState.snapshot,targetSnapshot:null,currentRouterState:e.routerState,targetRouterState:null,guards:{canActivateChecks:[],canDeactivateChecks:[]},guardsResult:null}),this.transitions.pipe(gn(n=>0!==n.id),et(n=>({...n,extractedUrl:e.urlHandlingStrategy.extract(n.rawUrl)})),Rs(n=>{let r=!1,s=!1;return ht(n).pipe(Ui(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}}),Rs(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 d="";return this.events.next(new _M(o.id,e.serializeUrl(n.rawUrl),d,0)),e.rawUrlTree=o.rawUrl,o.resolve(null),mo}if(e.urlHandlingStrategy.shouldProcessUrl(o.rawUrl))return $3(o.source)&&(e.browserUrlTree=o.extractedUrl),ht(o).pipe(Rs(d=>{const h=this.transitions?.getValue();return this.events.next(new cI(d.id,this.urlSerializer.serialize(d.extractedUrl),d.source,d.restoredState)),h!==this.transitions?.getValue()?mo:Promise.resolve(d)}),function IX(i,t,e,n){return Rs(r=>function DX(i,t,e,n,r){return new TX(i,t,e,n,r).apply()}(i,t,e,r.extractedUrl,n).pipe(et(s=>({...r,urlAfterRedirects:s}))))}(this.environmentInjector,this.configLoader,this.urlSerializer,e.config),Ui(d=>{this.currentNavigation={...this.currentNavigation,finalUrl:d.urlAfterRedirects},n.urlAfterRedirects=d.urlAfterRedirects}),function UX(i,t,e,n,r){return ir(s=>function PX(i,t,e,n,r,s,o="emptyOnly"){return new OX(i,t,e,n,r,o,s).recognize().pipe(Rs(a=>null===a?function kX(i){return new In(t=>t.error(i))}(new RX):ht(a)))}(i,t,e,s.urlAfterRedirects,n.serialize(s.urlAfterRedirects),n,r).pipe(et(o=>({...s,targetSnapshot:o}))))}(this.environmentInjector,this.rootComponentType,e.config,this.urlSerializer,e.paramsInheritanceStrategy),Ui(d=>{if(n.targetSnapshot=d.targetSnapshot,"eager"===e.urlUpdateStrategy){if(!d.extras.skipLocationChange){const p=e.urlHandlingStrategy.merge(d.urlAfterRedirects,d.rawUrl);e.setBrowserUrl(p,d)}e.browserUrlTree=d.urlAfterRedirects}const h=new Eq(d.id,this.urlSerializer.serialize(d.extractedUrl),this.urlSerializer.serialize(d.urlAfterRedirects),d.targetSnapshot);this.events.next(h)}));if(l&&e.urlHandlingStrategy.shouldProcessUrl(e.rawUrlTree)){const{id:d,extractedUrl:h,source:p,restoredState:m,extras:g}=o,b=new cI(d,this.urlSerializer.serialize(h),p,m);this.events.next(b);const v=_3(h,this.rootComponentType).snapshot;return ht(n={...o,targetSnapshot:v,urlAfterRedirects:h,extras:{...g,skipLocationChange:!1,replaceUrl:!1}})}{const d="";return this.events.next(new _M(o.id,e.serializeUrl(n.extractedUrl),d,1)),e.rawUrlTree=o.rawUrl,o.resolve(null),mo}}),Ui(o=>{const a=new Aq(o.id,this.urlSerializer.serialize(o.extractedUrl),this.urlSerializer.serialize(o.urlAfterRedirects),o.targetSnapshot);this.events.next(a)}),et(o=>n={...o,guards:tX(o.targetSnapshot,o.currentSnapshot,this.rootContexts)}),function hX(i,t){return ir(e=>{const{targetSnapshot:n,currentSnapshot:r,guards:{canActivateChecks:s,canDeactivateChecks:o}}=e;return 0===o.length&&0===s.length?ht({...e,guardsResult:!0}):function fX(i,t,e,n){return Li(i).pipe(ir(r=>function yX(i,t,e,n,r){const s=t&&t.routeConfig?t.routeConfig.canDeactivate:null;return s&&0!==s.length?ht(s.map(a=>{const l=Ly(t)??r,c=xm(a,l);return ou(function cX(i){return i&&Uy(i.canDeactivate)}(c)?c.canDeactivate(i,t,e,n):l.runInContext(()=>c(i,t,e,n))).pipe(iu())})).pipe(wm()):ht(!0)}(r.component,r.route,e,t,n)),iu(r=>!0!==r,!0))}(o,n,r,i).pipe(ir(a=>a&&function sX(i){return"boolean"==typeof i}(a)?function pX(i,t,e,n){return Li(t).pipe(ru(r=>Sy(function gX(i,t){return null!==i&&t&&t(new Pq(i)),ht(!0)}(r.route.parent,n),function mX(i,t){return null!==i&&t&&t(new Fq(i)),ht(!0)}(r.route,n),function vX(i,t,e){const n=t[t.length-1],s=t.slice(0,t.length-1).reverse().map(o=>function nX(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=>Ey(()=>ht(o.guards.map(l=>{const c=Ly(o.node)??e,d=xm(l,c);return ou(function lX(i){return i&&Uy(i.canActivateChild)}(d)?d.canActivateChild(n,i):c.runInContext(()=>d(n,i))).pipe(iu())})).pipe(wm())));return ht(s).pipe(wm())}(i,r.path,e),function _X(i,t,e){const n=t.routeConfig?t.routeConfig.canActivate:null;if(!n||0===n.length)return ht(!0);const r=n.map(s=>Ey(()=>{const o=Ly(t)??e,a=xm(s,o);return ou(function aX(i){return i&&Uy(i.canActivate)}(a)?a.canActivate(t,i):o.runInContext(()=>a(t,i))).pipe(iu())}));return ht(r).pipe(wm())}(i,r.route,e))),iu(r=>!0!==r,!0))}(n,s,i,t):ht(a)),et(a=>({...e,guardsResult:a})))})}(this.environmentInjector,o=>this.events.next(o)),Ui(o=>{if(n.guardsResult=o.guardsResult,kh(o.guardsResult))throw x3(0,o.guardsResult);const a=new Dq(o.id,this.urlSerializer.serialize(o.extractedUrl),this.urlSerializer.serialize(o.urlAfterRedirects),o.targetSnapshot,!!o.guardsResult);this.events.next(a)}),gn(o=>!!o.guardsResult||(e.restoreHistory(o),this.cancelNavigationTransition(o,"",3),!1)),MI(o=>{if(o.guards.canActivateChecks.length)return ht(o).pipe(Ui(a=>{const l=new Tq(a.id,this.urlSerializer.serialize(a.extractedUrl),this.urlSerializer.serialize(a.urlAfterRedirects),a.targetSnapshot);this.events.next(l)}),Rs(a=>{let l=!1;return ht(a).pipe(function VX(i,t){return ir(e=>{const{targetSnapshot:n,guards:{canActivateChecks:r}}=e;if(!r.length)return ht(e);let s=0;return Li(r).pipe(ru(o=>function zX(i,t,e,n){const r=i.routeConfig,s=i._resolve;return void 0!==r?.title&&!z3(r)&&(s[Ay]=r.title),function HX(i,t,e,n){const r=function GX(i){return[...Object.keys(i),...Object.getOwnPropertySymbols(i)]}(i);if(0===r.length)return ht({});const s={};return Li(r).pipe(ir(o=>function $X(i,t,e,n){const r=Ly(t)??n,s=xm(i,r);return ou(s.resolve?s.resolve(t,e):r.runInContext(()=>s(t,e)))}(i[o],t,e,n).pipe(iu(),Ui(a=>{s[o]=a}))),nI(1),YB(s),Wc(o=>bI(o)?mo:pm(o)))}(s,i,t,n).pipe(et(o=>(i._resolvedData=o,i.data=v3(i,e).resolve,r&&z3(r)&&(i.data[Ay]=r.title),null)))}(o.route,n,i,t)),Ui(()=>s++),nI(1),ir(o=>s===r.length?ht(e):mo))})}(e.paramsInheritanceStrategy,this.environmentInjector),Ui({next:()=>l=!0,complete:()=>{l||(e.restoreHistory(a),this.cancelNavigationTransition(a,"",2))}}))}),Ui(a=>{const l=new Iq(a.id,this.urlSerializer.serialize(a.extractedUrl),this.urlSerializer.serialize(a.urlAfterRedirects),a.targetSnapshot);this.events.next(l)}))}),MI(o=>{const a=l=>{const c=[];l.routeConfig?.loadComponent&&!l.routeConfig._loadedComponent&&c.push(this.configLoader.loadComponent(l.routeConfig).pipe(Ui(d=>{l.component=d}),et(()=>{})));for(const d of l.children)c.push(...a(d));return c};return nu(a(o.targetSnapshot.root)).pipe(lM(),Pi(1))}),MI(()=>this.afterPreactivation()),et(o=>{const a=function $q(i,t,e){const n=Oy(i,t._root,e?e._root:void 0);return new g3(n,t)}(e.routeReuseStrategy,o.targetSnapshot,o.currentRouterState);return n={...o,targetRouterState:a}}),Ui(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)=>et(n=>(new eX(t,n.targetRouterState,n.currentRouterState,e).activate(i),n)))(this.rootContexts,e.routeReuseStrategy,o=>this.events.next(o)),Pi(1),Ui({next:o=>{r=!0,this.lastSuccessfulNavigation=this.currentNavigation,e.navigated=!0,this.events.next(new Ph(o.id,this.urlSerializer.serialize(o.extractedUrl),this.urlSerializer.serialize(e.currentUrlTree))),e.titleStrategy?.updateTitle(o.targetRouterState.snapshot),o.resolve(!0)},complete:()=>{r=!0}}),su(()=>{r||s||this.cancelNavigationTransition(n,"",1),this.currentNavigation?.id===n.id&&(this.currentNavigation=null)}),Wc(o=>{if(s=!0,C3(o)){M3(o)||(e.navigated=!0,e.restoreHistory(n,!0));const a=new gM(n.id,this.urlSerializer.serialize(n.extractedUrl),o.message,o.cancellationCode);if(this.events.next(a),M3(o)){const l=e.urlHandlingStrategy.merge(o.url,e.rawUrlTree),c={skipLocationChange:n.extras.skipLocationChange,replaceUrl:"eager"===e.urlUpdateStrategy||$3(n.source)};e.scheduleNavigation(l,Py,null,c,{resolve:n.resolve,reject:n.reject,promise:n.promise})}else n.resolve(!1)}else{e.restoreHistory(n,!0);const a=new dI(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 mo}))}))}cancelNavigationTransition(e,n,r){const s=new gM(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=ke({token:i,factory:i.\u0275fac,providedIn:"root"}),i})();function $3(i){return i!==Py}let W3=(()=>{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===_n);return n}getResolvedTitleForRoute(e){return e.data[Ay]}}return i.\u0275fac=function(e){return new(e||i)},i.\u0275prov=ke({token:i,factory:function(){return Ft(jX)},providedIn:"root"}),i})(),jX=(()=>{class i extends W3{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)(ee(LB))},i.\u0275prov=ke({token:i,factory:i.\u0275fac,providedIn:"root"}),i})(),YX=(()=>{class i{}return i.\u0275fac=function(e){return new(e||i)},i.\u0275prov=ke({token:i,factory:function(){return Ft(XX)},providedIn:"root"}),i})();class qX{shouldDetach(t){return!1}store(t,e){}shouldAttach(t){return!1}retrieve(t){return null}shouldReuseRoute(t,e){return t.routeConfig===e.routeConfig}}let XX=(()=>{class i extends qX{}return i.\u0275fac=function(){let t;return function(n){return(t||(t=ri(i)))(n||i)}}(),i.\u0275prov=ke({token:i,factory:i.\u0275fac,providedIn:"root"}),i})();const DM=new me("",{providedIn:"root",factory:()=>({})});let ZX=(()=>{class i{}return i.\u0275fac=function(e){return new(e||i)},i.\u0275prov=ke({token:i,factory:function(){return Ft(QX)},providedIn:"root"}),i})(),QX=(()=>{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=ke({token:i,factory:i.\u0275fac,providedIn:"root"}),i})();function JX(i){throw i}function eK(i,t,e){return t.parse("/")}const tK={paths:"exact",fragment:"ignored",matrixParams:"ignored",queryParams:"exact"},nK={paths:"subset",fragment:"ignored",matrixParams:"ignored",queryParams:"subset"};let qo=(()=>{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=Ft(L6),this.isNgZoneEnabled=!1,this.options=Ft(DM,{optional:!0})||{},this.errorHandler=this.options.errorHandler||JX,this.malformedUriErrorHandler=this.options.malformedUriErrorHandler||eK,this.navigated=!1,this.lastSuccessfulId=-1,this.urlHandlingStrategy=Ft(ZX),this.routeReuseStrategy=Ft(YX),this.urlCreationStrategy=Ft(zq),this.titleStrategy=Ft(W3),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=XB(Ft(Mm,{optional:!0})??[]),this.navigationTransitions=Ft(AM),this.urlSerializer=Ft(Ty),this.location=Ft(_y),this.isNgZoneEnabled=Ft(ft)instanceof ft&&ft.isInAngularZone(),this.resetConfig(this.config),this.currentUrlTree=new au,this.rawUrlTree=this.currentUrlTree,this.browserUrlTree=this.currentUrlTree,this.routerState=_3(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),Py,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(yI),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 d=null;switch(a){case"merge":d={...this.currentUrlTree.queryParams,...s};break;case"preserve":d=this.currentUrlTree.queryParams;break;default:d=s||null}return null!==d&&(d=this.removeEmptyProps(d)),this.urlCreationStrategy.createUrlTree(r,this.routerState,this.currentUrlTree,e,d,c??null)}navigateByUrl(e,n={skipLocationChange:!1}){const r=kh(e)?e:this.parseUrl(e),s=this.urlHandlingStrategy.merge(r,this.rawUrlTree);return this.scheduleNavigation(s,Py,null,n)}navigate(e,n={skipLocationChange:!1}){return function iK(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,d;return o?(a=o.resolve,l=o.reject,c=o.promise):c=new Promise((h,p)=>{a=h,l=p}),d="computed"===this.canceledNavigationResolution?r&&r.\u0275routerPageId?r.\u0275routerPageId:(this.browserPageId??0)+1:0,this.navigationTransitions.handleNavigationRequest({targetPageId:d,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=ke({token:i,factory:i.\u0275fac,providedIn:"root"}),i})();class j3{}let oK=(()=>{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(gn(e=>e instanceof Ph),ru(()=>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=Fw(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 Li(r).pipe(yd())}preloadConfig(e,n){return this.preloadingStrategy.preload(n,()=>{let r;r=n.loadChildren&&void 0===n.canLoad?this.loader.loadChildren(e,n):ht(null);const s=r.pipe(ir(o=>null===o?ht(void 0):(n._loadedRoutes=o.routes,n._loadedInjector=o.injector,this.processRoutes(o.injector??e,o.routes))));return n.loadComponent&&!n._loadedComponent?Li([s,this.loader.loadComponent(n)]).pipe(yd()):s})}}return i.\u0275fac=function(e){return new(e||i)(ee(qo),ee(mN),ee(no),ee(j3),ee(CI))},i.\u0275prov=ke({token:i,factory:i.\u0275fac,providedIn:"root"}),i})();const AI=new me("");let Y3=(()=>{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 cI?(this.store[this.lastId]=this.viewportScroller.getScrollPosition(),this.lastSource=e.navigationTrigger,this.restoredId=e.restoredState?e.restoredState.navigationId:0):e instanceof Ph&&(this.lastId=e.id,this.scheduleScrollEvent(e,this.urlSerializer.parse(e.urlAfterRedirects).fragment))})}consumeScrollEvents(){return this.transitions.events.subscribe(e=>{e instanceof p3&&(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 p3(e,"popstate"===this.lastSource?this.store[this.restoredId]:null,n))})},0)})}ngOnDestroy(){this.routerEventsSubscription?.unsubscribe(),this.scrollEventsSubscription?.unsubscribe()}}return i.\u0275fac=function(e){wo()},i.\u0275prov=ke({token:i,factory:i.\u0275fac}),i})();var Xo=(()=>((Xo=Xo||{})[Xo.COMPLETE=0]="COMPLETE",Xo[Xo.FAILED=1]="FAILED",Xo[Xo.REDIRECTING=2]="REDIRECTING",Xo))();const Cm=!1;function lu(i,t){return{\u0275kind:i,\u0275providers:t}}const DI=new me("",{providedIn:"root",factory:()=>!1});function X3(){const i=Ft(Gi);return t=>{const e=i.get(dm);if(t!==e.components[0])return;const n=i.get(qo),r=i.get(K3);1===i.get(TI)&&n.initialNavigation(),i.get(Z3,null,Ot.Optional)?.setUpPreloading(),i.get(AI,null,Ot.Optional)?.init(),n.resetRootComponentType(e.componentTypes[0]),r.closed||(r.next(),r.complete(),r.unsubscribe())}}const K3=new me(Cm?"bootstrap done indicator":"",{factory:()=>new Re}),TI=new me(Cm?"initial navigation":"",{providedIn:"root",factory:()=>1});function uK(){let i=[];return i=Cm?[{provide:Np,multi:!0,useFactory:()=>{const t=Ft(qo);return()=>t.events.subscribe(e=>{console.group?.(`Router Event: ${e.constructor.name}`),console.log(function Nq(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?.()})}}]:[],lu(1,i)}const Z3=new me(Cm?"router preloader":"");function hK(i){return lu(0,[{provide:Z3,useExisting:oK},{provide:j3,useExisting:i}])}const zy=!1,Q3=new me(zy?"router duplicate forRoot guard":"ROUTER_FORROOT_GUARD"),fK=[_y,{provide:Ty,useClass:iI},qo,Fy,{provide:bm,useFactory:function q3(i){return i.routerState.root},deps:[qo]},CI,zy?{provide:DI,useValue:!0}:[]];function pK(){return new MN("Router",qo)}let J3=(()=>{class i{constructor(e){}static forRoot(e,n){return{ngModule:i,providers:[fK,zy&&n?.enableTracing?uK().\u0275providers:[],{provide:Mm,multi:!0,useValue:e},{provide:Q3,useFactory:vK,deps:[[qo,new Ss,new wa]]},{provide:DM,useValue:n||{}},n?.useHash?{provide:Ih,useClass:C9}:{provide:Ih,useClass:jN},{provide:AI,useFactory:()=>{const i=Ft(UY),t=Ft(ft),e=Ft(DM),n=Ft(AM),r=Ft(Ty);return e.scrollOffset&&i.setOffset(e.scrollOffset),new Y3(r,n,i,t,e)}},n?.preloadingStrategy?hK(n.preloadingStrategy).\u0275providers:[],{provide:MN,multi:!0,useFactory:pK},n?.initialNavigation?yK(n):[],[{provide:eU,useFactory:X3},{provide:wN,multi:!0,useExisting:eU}]]}}static forChild(e){return{ngModule:i,providers:[{provide:Mm,multi:!0,useValue:e}]}}}return i.\u0275fac=function(e){return new(e||i)(ee(Q3,8))},i.\u0275mod=nn({type:i}),i.\u0275inj=Kt({imports:[_I]}),i})();function vK(i){if(zy&&i)throw new pe(4007,"The Router was provided more than once. This can happen if 'forRoot' is used outside of the root injector. Lazy loaded modules should use RouterModule.forChild() instead.");return"guarded"}function yK(i){return["disabled"===i.initialNavigation?lu(3,[{provide:Uw,multi:!0,useFactory:()=>{const t=Ft(qo);return()=>{t.setUpLocationChangeListener()}}},{provide:TI,useValue:2}]).\u0275providers:[],"enabledBlocking"===i.initialNavigation?lu(2,[{provide:TI,useValue:0},{provide:Uw,multi:!0,deps:[Gi],useFactory:t=>{const e=t.get(w9,Promise.resolve());return()=>e.then(()=>new Promise(n=>{const r=t.get(qo),s=t.get(K3);(function aK(i,t){i.events.pipe(gn(e=>e instanceof Ph||e instanceof gM||e instanceof dI||e instanceof _M),et(e=>e instanceof Ph||e instanceof _M?Xo.COMPLETE:e instanceof gM&&(0===e.code||1===e.code)?Xo.REDIRECTING:Xo.FAILED),gn(e=>e!==Xo.REDIRECTING),Pi(1)).subscribe(()=>{t()})})(r,()=>{n(!0)}),t.get(AM).afterPreactivation=()=>(n(!0),s.closed?ht(void 0):s),r.initialNavigation()}))}}]).\u0275providers:[]]}const eU=new me(zy?"Router Initializer":""),xK=[];let wK=(()=>{class i{}return i.\u0275fac=function(e){return new(e||i)},i.\u0275mod=nn({type:i}),i.\u0275inj=Kt({imports:[J3.forRoot(xK),J3]}),i})();function tU(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 tt(i){return function(){var t=this,e=arguments;return new Promise(function(n,r){var s=i.apply(t,e);function o(l){tU(s,n,r,o,a,"next",l)}function a(l){tU(s,n,r,o,a,"throw",l)}o(void 0)})}}function Jt(i){return null!=i&&"false"!=`${i}`}function ks(i,t=0){return function MK(i){return!isNaN(parseFloat(i))&&!isNaN(Number(i))}(i)?Number(i):t}function TM(i){return Array.isArray(i)?i:[i]}function gr(i){return null==i?"":"string"==typeof i?i:`${i}px`}function Yc(i){return i instanceof mt?i.nativeElement:i}const CK=["addListener","removeListener"],SK=["addEventListener","removeEventListener"],EK=["on","off"];function Ia(i,t,e,n){if(cn(e)&&(n=e,e=void 0),n)return Ia(i,t,e).pipe(JT(n));const[r,s]=function TK(i){return cn(i.addEventListener)&&cn(i.removeEventListener)}(i)?SK.map(o=>a=>i[o](t,a,e)):function AK(i){return cn(i.addListener)&&cn(i.removeListener)}(i)?CK.map(nU(i,t)):function DK(i){return cn(i.on)&&cn(i.off)}(i)?EK.map(nU(i,t)):[];if(!r&&i_(i))return ir(o=>Ia(o,t,e))(wr(i));if(!r)throw new TypeError("Invalid event target");return new In(o=>{const a=(...l)=>o.next(1s(a)})}function nU(i,t){return e=>n=>i[e](t,n)}class IK extends Zt{constructor(t,e){super()}schedule(t,e=0){return this}}const IM={setInterval(i,t,...e){const{delegate:n}=IM;return n?.setInterval?n.setInterval(i,t,...e):setInterval(i,t,...e)},clearInterval(i){const{delegate:t}=IM;return(t?.clearInterval||clearInterval)(i)},delegate:void 0};class II extends IK{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 IM.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&&IM.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,Kr(n,this),null!=t&&(this.id=this.recycleAsyncId(e,t,null)),this.delay=null,super.unsubscribe()}}}const Hy={schedule(i){let t=requestAnimationFrame,e=cancelAnimationFrame;const{delegate:n}=Hy;n&&(t=n.requestAnimationFrame,e=n.cancelAnimationFrame);const r=t(s=>{e=void 0,i(s)});return new Zt(()=>e?.(r))},requestAnimationFrame(...i){const{delegate:t}=Hy;return(t?.requestAnimationFrame||requestAnimationFrame)(...i)},cancelAnimationFrame(...i){const{delegate:t}=Hy;return(t?.cancelAnimationFrame||cancelAnimationFrame)(...i)},delegate:void 0},iU={now:()=>(iU.delegate||Date).now(),delegate:void 0};class Gy{constructor(t,e=Gy.now){this.schedulerActionCtor=t,this.now=e}schedule(t,e=0,n){return new this.schedulerActionCtor(this,t).schedule(n,e)}}Gy.now=iU.now;class RI extends Gy{constructor(t,e=Gy.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 PK=new class kK extends RI{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 RK extends II{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=Hy.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&&(Hy.cancelAnimationFrame(e),t._scheduled=void 0)}});let kI,OK=1;const RM={};function rU(i){return i in RM&&(delete RM[i],!0)}const FK={setImmediate(i){const t=OK++;return RM[t]=!0,kI||(kI=Promise.resolve()),kI.then(()=>rU(t)&&i()),t},clearImmediate(i){rU(i)}},{setImmediate:LK,clearImmediate:NK}=FK,kM={setImmediate(...i){const{delegate:t}=kM;return(t?.setImmediate||LK)(...i)},clearImmediate(i){const{delegate:t}=kM;return(t?.clearImmediate||NK)(i)},delegate:void 0},PI=new class UK extends RI{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 BK extends II{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=kM.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&&(kM.clearImmediate(e),t._scheduled===e&&(t._scheduled=void 0))}}),$y=new RI(II),VK=$y;function OI(i=0,t,e=VK){let n=-1;return null!=t&&(Gu(t)?e=t:n=t),new In(r=>{let s=function HK(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 PM(i,t=$y){return function zK(i){return ti((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(Yn(e,c=>{n=!0,r=c,s||wr(i(c)).subscribe(s=Yn(e,a,l))},()=>{o=!0,(!n||!s||s.closed)&&e.complete()}))})}(()=>OI(i,t))}function He(i){return ti((t,e)=>{wr(i).subscribe(Yn(e,()=>e.complete(),ms)),!e.closed&&t.subscribe(e)})}let FI;try{FI=typeof Intl<"u"&&Intl.v8BreakIterator}catch{FI=!1}let Sm,Vi=(()=>{class i{constructor(e){this._platformId=e,this.isBrowser=this._platformId?function BY(i){return i===hB}(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&&!FI)&&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)(ee(fT))},i.\u0275prov=ke({token:i,factory:i.\u0275fac,providedIn:"root"}),i})();const sU=["color","button","checkbox","date","datetime-local","email","file","hidden","image","month","number","password","radio","range","reset","search","submit","tel","text","time","url","week"];function oU(){if(Sm)return Sm;if("object"!=typeof document||!document)return Sm=new Set(sU),Sm;let i=document.createElement("input");return Sm=new Set(sU.filter(t=>(i.setAttribute("type",t),i.type===t))),Sm}let Wy,OM,Fh,LI;function Oh(i){return function GK(){if(null==Wy&&typeof window<"u")try{window.addEventListener("test",null,Object.defineProperty({},"passive",{get:()=>Wy=!0}))}finally{Wy=Wy||!1}return Wy}()?i:!!i.capture}function aU(){if(null==Fh){if("object"!=typeof document||!document||"function"!=typeof Element||!Element)return Fh=!1,Fh;if("scrollBehavior"in document.documentElement.style)Fh=!0;else{const i=Element.prototype.scrollTo;Fh=!!i&&!/\{\s*\[native code\]\s*\}/.test(i.toString())}}return Fh}function jy(){if("object"!=typeof document||!document)return 0;if(null==OM){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),OM=0,0===i.scrollLeft&&(i.scrollLeft=1,OM=0===i.scrollLeft?1:2),i.remove()}return OM}function FM(){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 cu(i){return i.composedPath?i.composedPath()[0]:i.target}function NI(){return typeof __karma__<"u"&&!!__karma__||typeof jasmine<"u"&&!!jasmine||typeof jest<"u"&&!!jest||typeof Mocha<"u"&&!!Mocha}const jK=new me("cdk-dir-doc",{providedIn:"root",factory:function YK(){return Ft(jt)}}),qK=/^(ar|ckb|dv|he|iw|fa|nqo|ps|sd|ug|ur|yi|.*[-_](Adlm|Arab|Hebr|Nkoo|Rohg|Thaa))(?!.*[-_](Latn|Cyrl)($|-|_))($|-|_)/i;let Ra=(()=>{class i{constructor(e){this.value="ltr",this.change=new We,e&&(this.value=function XK(i){const t=i?.toLowerCase()||"";return"auto"===t&&typeof navigator<"u"&&navigator?.language?qK.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)(ee(jK,8))},i.\u0275prov=ke({token:i,factory:i.\u0275fac,providedIn:"root"}),i})(),Yy=(()=>{class i{}return i.\u0275fac=function(e){return new(e||i)},i.\u0275mod=nn({type:i}),i.\u0275inj=Kt({}),i})();const KK=["contentWrapper"],ZK=["*"],QK=new me("VIRTUAL_SCROLL_STRATEGY");let qy=(()=>{class i{constructor(e,n,r){this._ngZone=e,this._platform=n,this._scrolled=new Re,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 In(n=>{this._globalSubscription||this._addGlobalListener();const r=e>0?this._scrolled.pipe(PM(e)).subscribe(n):this._scrolled.subscribe(n);return this._scrolledCount++,()=>{r.unsubscribe(),this._scrolledCount--,this._scrolledCount||this._removeGlobalListener()}}):ht()}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(gn(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=Yc(n),s=e.getElementRef().nativeElement;do{if(r==s)return!0}while(r=r.parentElement);return!1}_addGlobalListener(){this._globalSubscription=this._ngZone.runOutsideAngular(()=>Ia(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)(ee(ft),ee(Vi),ee(jt,8))},i.\u0275prov=ke({token:i,factory:i.\u0275fac,providedIn:"root"}),i})(),lU=(()=>{class i{constructor(e,n,r,s){this.elementRef=e,this.scrollDispatcher=n,this.ngZone=r,this.dir=s,this._destroyed=new Re,this._elementScrolled=new In(o=>this.ngZone.runOutsideAngular(()=>Ia(this.elementRef.nativeElement,"scroll").pipe(He(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!=jy()?(null!=e.left&&(e.right=n.scrollWidth-n.clientWidth-e.left),2==jy()?e.left=e.right:1==jy()&&(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;aU()?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==jy()?e==n?s.scrollWidth-s.clientWidth-s.scrollLeft:s.scrollLeft:o&&1==jy()?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)(E(mt),E(qy),E(ft),E(Ra,8))},i.\u0275dir=ve({type:i,selectors:[["","cdk-scrollable",""],["","cdkScrollable",""]],standalone:!0}),i})(),LM=(()=>{class i{constructor(e,n,r){this._platform=e,this._change=new Re,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(PM(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)(ee(Vi),ee(ft),ee(jt,8))},i.\u0275prov=ke({token:i,factory:i.\u0275fac,providedIn:"root"}),i})();const cU=new me("VIRTUAL_SCROLLABLE");let tZ=(()=>{class i extends lU{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)(E(mt),E(qy),E(ft),E(Ra,8))},i.\u0275dir=ve({type:i,features:[lt]}),i})();const iZ=typeof requestAnimationFrame<"u"?PK:PI;let rZ=(()=>{class i extends tZ{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=Ft(Vi),this._detachedSubject=new Re,this._renderedRangeSubject=new Re,this._orientation="vertical",this._appendOnly=!1,this.scrolledIndexChange=new In(d=>this._scrollStrategy.scrolledIndexChange.subscribe(h=>Promise.resolve().then(()=>this.ngZone.run(()=>d.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=Zt.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(Do(null),PM(0,iZ)).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(He(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 nZ(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)(E(mt),E(Zn),E(ft),E(QK,8),E(Ra,8),E(qy),E(LM),E(cU,8))},i.\u0275cmp=ot({type:i,selectors:[["cdk-virtual-scroll-viewport"]],viewQuery:function(e,n){if(1&e&&Wn(KK,7),2&e){let r;Et(r=At())&&(n._contentWrapper=r.first)}},hostAttrs:[1,"cdk-virtual-scroll-viewport"],hostVars:4,hostBindings:function(e,n){2&e&&un("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:[Dn([{provide:lU,useFactory:(t,e)=>t||e,deps:[[new Ss,new yo(cU)],i]}]),lt,Z1],ngContentSelectors:ZK,decls:4,vars:4,consts:[[1,"cdk-virtual-scroll-content-wrapper"],["contentWrapper",""],[1,"cdk-virtual-scroll-spacer"]],template:function(e,n){1&e&&(sr(),W(0,"div",0,1),Wt(2),j(),De(3,"div",2)),2&e&&(G(3),Yo("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})(),Xy=(()=>{class i{}return i.\u0275fac=function(e){return new(e||i)},i.\u0275mod=nn({type:i}),i.\u0275inj=Kt({}),i})(),dU=(()=>{class i{}return i.\u0275fac=function(e){return new(e||i)},i.\u0275mod=nn({type:i}),i.\u0275inj=Kt({imports:[Yy,Xy,rZ,Yy,Xy]}),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 Lh 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 sZ extends BI{constructor(t){super(),this.element=t instanceof mt?t.nativeElement:t}}class NM{constructor(){this._isDisposed=!1,this.attachDomPortal=null}hasAttached(){return!!this._attachedPortal}attach(t){return t instanceof Lh?(this._attachedPortal=t,this.attachComponentPortal(t)):t instanceof Em?(this._attachedPortal=t,this.attachTemplatePortal(t)):this.attachDomPortal&&t instanceof sZ?(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 oZ extends NM{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||Gi.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 NM{constructor(e,n,r){super(),this._componentFactoryResolver=e,this._viewContainerRef=n,this._isInitialized=!1,this.attached=new We,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)(E(Hl),E(Wr),E(jt))},i.\u0275dir=ve({type:i,selectors:[["","cdkPortalOutlet",""]],inputs:{portal:["cdkPortalOutlet","portal"]},outputs:{attached:"attached"},exportAs:["cdkPortalOutlet"],features:[lt]}),i})(),Nh=(()=>{class i{}return i.\u0275fac=function(e){return new(e||i)},i.\u0275mod=nn({type:i}),i.\u0275inj=Kt({}),i})();function Ko(i,...t){return t.length?t.some(e=>i[e]):i.altKey||i.shiftKey||i.ctrlKey||i.metaKey}const uU=aU();class bZ{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=gr(-this._previousScrollPosition.left),t.style.top=gr(-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"),uU&&(n.scrollBehavior=r.scrollBehavior="auto"),window.scroll(this._previousScrollPosition.left,this._previousScrollPosition.top),uU&&(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 xZ{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(gn(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 hU{enable(){}disable(){}attach(){}}function VI(i,t){return t.some(e=>i.bottome.bottom||i.righte.right)}function fU(i,t){return t.some(e=>i.tope.bottom||i.lefte.right)}class wZ{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();VI(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 MZ=(()=>{class i{constructor(e,n,r,s){this._scrollDispatcher=e,this._viewportRuler=n,this._ngZone=r,this.noop=()=>new hU,this.close=o=>new xZ(this._scrollDispatcher,this._ngZone,this._viewportRuler,o),this.block=()=>new bZ(this._viewportRuler,this._document),this.reposition=o=>new wZ(this._scrollDispatcher,this._viewportRuler,this._ngZone,o),this._document=s}}return i.\u0275fac=function(e){return new(e||i)(ee(qy),ee(LM),ee(ft),ee(jt))},i.\u0275prov=ke({token:i,factory:i.\u0275fac,providedIn:"root"}),i})();class km{constructor(t){if(this.scrollStrategy=new hU,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 CZ{constructor(t,e){this.connectionPair=t,this.scrollableViewProperties=e}}let pU=(()=>{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)(ee(jt))},i.\u0275prov=ke({token:i,factory:i.\u0275fac,providedIn:"root"}),i})(),SZ=(()=>{class i extends pU{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)(ee(jt),ee(ft,8))},i.\u0275prov=ke({token:i,factory:i.\u0275fac,providedIn:"root"}),i})(),EZ=(()=>{class i extends pU{constructor(e,n,r){super(e),this._platform=n,this._ngZone=r,this._cursorStyleIsSet=!1,this._pointerDownListener=s=>{this._pointerDownEventTarget=cu(s)},this._clickListener=s=>{const o=cu(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 d=l[c];if(d._outsidePointerEvents.observers.length<1||!d.hasAttached())continue;if(d.overlayElement.contains(o)||d.overlayElement.contains(a))break;const h=d._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)(ee(jt),ee(Vi),ee(ft,8))},i.\u0275prov=ke({token:i,factory:i.\u0275fac,providedIn:"root"}),i})(),VM=(()=>{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||NI()){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 Re,this._outsidePointerEvents=new Re,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(Pi(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=gr(this._config.width),t.height=gr(this._config.height),t.minWidth=gr(this._config.minWidth),t.minHeight=gr(this._config.minHeight),t.maxWidth=gr(this._config.maxWidth),t.maxHeight=gr(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=TM(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(He(Mr(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 mU="cdk-overlay-connected-position-bounding-box",AZ=/([A-Za-z%]+)$/;class DZ{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 Re,this._resizeSubscription=Zt.EMPTY,this._offsetX=0,this._offsetY=0,this._appliedPanelClasses=[],this.positionChanges=this._positionChanges,this.setOrigin(t)}attach(t){this._validatePositions(),t.hostElement.classList.add(mU),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),d=this._getOverlayFit(c,e,n,a);if(d.isCompletelyWithinViewport)return this._isPushed=!1,void this._applyPosition(a,l);this._canFitWithFlexibleDimensions(d,c,n)?s.push({position:a,origin:l,overlayRect:e,boundingBoxRect:this._calculateBoundingBoxRect(l,a)}):(!o||o.overlayFit.visibleAreal&&(l=d,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&&Bh(this._boundingBox.style,{top:"",left:"",right:"",bottom:"",height:"",width:"",alignItems:"",justifyContent:""}),this._pane&&this._resetOverlayElementStyles(),this._overlayRef&&this._overlayRef.hostElement.classList.remove(mU),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=_U(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=gU(this._overlayRef.getConfig().minHeight),a=gU(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=_U(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 d=0,h=0;return d=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,d=t.x-this._viewportMargin;else if("start"===e.overlayX&&!r||"end"===e.overlayX&&r)h=t.x,d=n.right-t.x;else{const m=Math.min(n.right-t.x+n.left,t.x),g=this._lastBoundingBoxSize.width;d=2*m,h=t.x-m,d>g&&!this._isInitialRender&&!this._growAfterOpen&&(h=t.x-g/2)}return{top:o,left:h,bottom:a,right:p,width:d,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=gr(n.height),r.top=gr(n.top),r.bottom=gr(n.bottom),r.width=gr(n.width),r.left=gr(n.left),r.right=gr(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=gr(s)),o&&(r.maxWidth=gr(o))}this._lastBoundingBoxSize=n,Bh(this._boundingBox.style,r)}_resetBoundingBoxStyles(){Bh(this._boundingBox.style,{top:"0",left:"0",right:"0",bottom:"0",height:"",width:"",alignItems:"",justifyContent:""})}_resetOverlayElementStyles(){Bh(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 d=this._viewportRuler.getViewportScrollPosition();Bh(n,this._getExactOverlayY(e,t,d)),Bh(n,this._getExactOverlayX(e,t,d))}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=gr(o.maxHeight):s&&(n.maxHeight="")),o.maxWidth&&(r?n.maxWidth=gr(o.maxWidth):s&&(n.maxWidth="")),Bh(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=gr(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=gr(s.x),r}_getScrollVisibility(){const t=this._getOriginRect(),e=this._pane.getBoundingClientRect(),n=this._scrollables.map(r=>r.getElementRef().nativeElement.getBoundingClientRect());return{isOriginClipped:fU(t,n),isOriginOutsideView:VI(t,n),isOverlayClipped:fU(e,n),isOverlayOutsideView:VI(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&&TM(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 mt)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 Bh(i,t){for(let e in t)t.hasOwnProperty(e)&&(i[e]=t[e]);return i}function gU(i){if("number"!=typeof i&&null!=i){const[t,e]=i.split(AZ);return e&&"px"!==e?null:parseFloat(t)}return i||null}function _U(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 vU="cdk-global-overlay-wrapper";class yU{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(vU),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),d=this._xPosition,h=this._xOffset,p="rtl"===this._overlayRef.getConfig().direction;let m="",g="",b="";l?b="flex-start":"center"===d?(b="center",p?g=h:m=h):p?"left"===d||"end"===d?(b="flex-end",m=h):("right"===d||"start"===d)&&(b="flex-start",g=h):"left"===d||"start"===d?(b="flex-start",m=h):("right"===d||"end"===d)&&(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(vU),n.justifyContent=n.alignItems=t.marginTop=t.marginBottom=t.marginLeft=t.marginRight=t.position="",this._overlayRef=null,this._isDisposed=!0}}let TZ=(()=>{class i{constructor(e,n,r,s){this._viewportRuler=e,this._document=n,this._platform=r,this._overlayContainer=s}global(){return new yU}flexibleConnectedTo(e){return new DZ(e,this._viewportRuler,this._document,this._platform,this._overlayContainer)}}return i.\u0275fac=function(e){return new(e||i)(ee(LM),ee(jt),ee(Vi),ee(VM))},i.\u0275prov=ke({token:i,factory:i.\u0275fac,providedIn:"root"}),i})(),IZ=0,as=(()=>{class i{constructor(e,n,r,s,o,a,l,c,d,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=d,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 Zy(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-"+IZ++,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(dm)),new oZ(e,this._componentFactoryResolver,this._appRef,this._injector,this._document)}}return i.\u0275fac=function(e){return new(e||i)(ee(MZ),ee(VM),ee(Hl),ee(TZ),ee(SZ),ee(Gi),ee(ft),ee(jt),ee(Ra),ee(_y),ee(EZ),ee(Rr,8))},i.\u0275prov=ke({token:i,factory:i.\u0275fac,providedIn:"root"}),i})();const RZ=[{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"}],bU=new me("cdk-connected-overlay-scroll-strategy");let zI=(()=>{class i{constructor(e){this.elementRef=e}}return i.\u0275fac=function(e){return new(e||i)(E(mt))},i.\u0275dir=ve({type:i,selectors:[["","cdk-overlay-origin",""],["","overlay-origin",""],["","cdkOverlayOrigin",""]],exportAs:["cdkOverlayOrigin"],standalone:!0}),i})(),xU=(()=>{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=Zt.EMPTY,this._attachSubscription=Zt.EMPTY,this._detachSubscription=Zt.EMPTY,this._positionSubscription=Zt.EMPTY,this.viewportMargin=0,this.open=!1,this.disableClose=!1,this.backdropClick=new We,this.positionChange=new We,this.attach=new We,this.detach=new We,this.overlayKeydown=new We,this.overlayOutsideClick=new We,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=RZ);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&&!Ko(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 zI?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(jB(()=>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)(E(as),E(Co),E(Wr),E(bU),E(Ra,8))},i.\u0275dir=ve({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:[bi]}),i})();const PZ={provide:bU,deps:[as],useFactory:function kZ(i){return()=>i.scrollStrategies.reposition()}};let Pm=(()=>{class i{}return i.\u0275fac=function(e){return new(e||i)},i.\u0275mod=nn({type:i}),i.\u0275inj=Kt({providers:[as,PZ],imports:[Yy,Nh,dU,dU]}),i})();function ml(i,t=$y){return ti((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,d=t.now();if(d{s=c,o=t.now(),r||(r=t.schedule(l,i),n.add(r))},()=>{a(),n.complete()},void 0,()=>{s=r=null}))})}function wU(i){return gn((t,e)=>i<=e)}function Zl(i,t=$a){return i=i??OZ,ti((e,n)=>{let r,s=!0;e.subscribe(Yn(n,o=>{const a=t(o);(s||!i(r,a))&&(s=!1,r=a,n.next(o))}))})}function OZ(i,t){return i===t}let MU=(()=>{class i{create(e){return typeof MutationObserver>"u"?null:new MutationObserver(e)}}return i.\u0275fac=function(e){return new(e||i)},i.\u0275prov=ke({token:i,factory:i.\u0275fac,providedIn:"root"}),i})(),FZ=(()=>{class i{constructor(e){this._mutationObserverFactory=e,this._observedElements=new Map}ngOnDestroy(){this._observedElements.forEach((e,n)=>this._cleanupObserver(n))}observe(e){const n=Yc(e);return new In(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 Re,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)(ee(MU))},i.\u0275prov=ke({token:i,factory:i.\u0275fac,providedIn:"root"}),i})(),CU=(()=>{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=ks(e),this._subscribe()}constructor(e,n,r){this._contentObserver=e,this._elementRef=n,this._ngZone=r,this.event=new We,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(ml(this.debounce)):e).subscribe(this.event)})}_unsubscribe(){this._currentSubscription?.unsubscribe()}}return i.\u0275fac=function(e){return new(e||i)(E(FZ),E(mt),E(ft))},i.\u0275dir=ve({type:i,selectors:[["","cdkObserveContent",""]],inputs:{disabled:["cdkObserveContentDisabled","disabled"],debounce:"debounce"},outputs:{event:"cdkObserveContent"},exportAs:["cdkObserveContent"]}),i})(),HI=(()=>{class i{}return i.\u0275fac=function(e){return new(e||i)},i.\u0275mod=nn({type:i}),i.\u0275inj=Kt({providers:[MU]}),i})();const SU=new Set;let Om,LZ=(()=>{class i{constructor(e){this._platform=e,this._matchMedia=this._platform.isBrowser&&window.matchMedia?window.matchMedia.bind(window):BZ}matchMedia(e){return(this._platform.WEBKIT||this._platform.BLINK)&&function NZ(i){if(!SU.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),SU.add(i))}catch(t){console.error(t)}}(e),this._matchMedia(e)}}return i.\u0275fac=function(e){return new(e||i)(ee(Vi))},i.\u0275prov=ke({token:i,factory:i.\u0275fac,providedIn:"root"}),i})();function BZ(i){return{matches:"all"===i||""===i,media:i,addListener:()=>{},removeListener:()=>{}}}let GI=(()=>{class i{constructor(e,n){this._mediaMatcher=e,this._zone=n,this._queries=new Map,this._destroySubject=new Re}ngOnDestroy(){this._destroySubject.next(),this._destroySubject.complete()}isMatched(e){return EU(TM(e)).some(r=>this._registerQuery(r).mql.matches)}observe(e){let s=nu(EU(TM(e)).map(o=>this._registerQuery(o).observable));return s=Sy(s.pipe(Pi(1)),s.pipe(wU(1),ml(0))),s.pipe(et(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 In(o=>{const a=l=>this._zone.run(()=>o.next(l));return n.addListener(a),()=>{n.removeListener(a)}}).pipe(Do(n),et(({matches:o})=>({query:e,matches:o})),He(this._destroySubject)),mql:n};return this._queries.set(e,s),s}}return i.\u0275fac=function(e){return new(e||i)(ee(LZ),ee(ft))},i.\u0275prov=ke({token:i,factory:i.\u0275fac,providedIn:"root"}),i})();function EU(i){return i.map(t=>t.split(",")).reduce((t,e)=>t.concat(e)).map(t=>t.trim())}function zM(i,t){return(i.getAttribute(t)||"").match(/\S+/g)||[]}const DU="cdk-describedby-message",HM="cdk-describedby-host";let $I=0,HZ=(()=>{class i{constructor(e,n){this._platform=n,this._messageRegistry=new Map,this._messagesContainer=null,this._id=""+$I++,this._document=e,this._id=Ft(cm)+"-"+$I++}describe(e,n,r){if(!this._canBeDescribed(e,n))return;const s=WI(n,r);"string"!=typeof n?(TU(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=WI(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(`[${HM}="${this._id}"]`);for(let n=0;n0!=r.indexOf(DU));e.setAttribute("aria-describedby",n.join(" "))}_addMessageReference(e,n){const r=this._messageRegistry.get(n);(function VZ(i,t,e){const n=zM(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(HM,this._id),r.referenceCount++}_removeMessageReference(e,n){const r=this._messageRegistry.get(n);r.referenceCount--,function zZ(i,t,e){const r=zM(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(HM)}_isElementDescribedByMessage(e,n){const r=zM(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)(ee(jt),ee(Vi))},i.\u0275prov=ke({token:i,factory:i.\u0275fac,providedIn:"root"}),i})();function WI(i,t){return"string"==typeof i?`${t||""}/${i}`:i}function TU(i,t){i.id||(i.id=`${DU}-${t}-${$I++}`)}class IU{constructor(t){this._items=t,this._activeItemIndex=-1,this._activeItem=null,this._wrap=!1,this._letterKeyStream=new Re,this._typeaheadSubscription=Zt.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 Re,this.change=new Re,t instanceof om&&(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(Ui(e=>this._pressedLetters.push(e)),ml(t),gn(()=>this._pressedLetters.length>0),et(()=>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 om?this._items.toArray():this._items}}class GZ extends IU{setActiveItem(t){this.activeItem&&this.activeItem.setInactiveStyles(),super.setActiveItem(t),this.activeItem&&this.activeItem.setActiveStyles()}}class RU extends IU{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 GM=(()=>{class i{constructor(e){this._platform=e}isDisabled(e){return e.hasAttribute("disabled")}isVisible(e){return function WZ(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 $Z(i){try{return i.frameElement}catch{return null}}(function JZ(i){return i.ownerDocument&&i.ownerDocument.defaultView||window}(e));if(n&&(-1===PU(n)||!this.isVisible(n)))return!1;let r=e.nodeName.toLowerCase(),s=PU(e);return e.hasAttribute("contenteditable")?-1!==s:!("iframe"===r||"object"===r||this._platform.WEBKIT&&this._platform.IOS&&!function ZZ(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 QZ(i){return!function YZ(i){return function XZ(i){return"input"==i.nodeName.toLowerCase()}(i)&&"hidden"==i.type}(i)&&(function jZ(i){let t=i.nodeName.toLowerCase();return"input"===t||"select"===t||"button"===t||"textarea"===t}(i)||function qZ(i){return function KZ(i){return"a"==i.nodeName.toLowerCase()}(i)&&i.hasAttribute("href")}(i)||i.hasAttribute("contenteditable")||kU(i))}(e)&&!this.isDisabled(e)&&(n?.ignoreVisibility||this.isVisible(e))}}return i.\u0275fac=function(e){return new(e||i)(ee(Vi))},i.\u0275prov=ke({token:i,factory:i.\u0275fac,providedIn:"root"}),i})();function kU(i){if(!i.hasAttribute("tabindex")||void 0===i.tabIndex)return!1;let t=i.getAttribute("tabindex");return!(!t||isNaN(parseInt(t,10)))}function PU(i){if(!kU(i))return null;const t=parseInt(i.getAttribute("tabindex")||"",10);return isNaN(t)?-1:t}class eQ{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(Pi(1)).subscribe(t)}}let jI=(()=>{class i{constructor(e,n,r){this._checker=e,this._ngZone=n,this._document=r}create(e,n=!1){return new eQ(e,this._checker,this._ngZone,this._document,n)}}return i.\u0275fac=function(e){return new(e||i)(ee(GM),ee(ft),ee(jt))},i.\u0275prov=ke({token:i,factory:i.\u0275fac,providedIn:"root"}),i})();function YI(i){return 0===i.buttons||0===i.offsetX&&0===i.offsetY}function qI(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 tQ=new me("cdk-input-modality-detector-options"),nQ={ignoreKeys:[18,17,224,91,16]},Fm=Oh({passive:!0,capture:!0});let iQ=(()=>{class i{get mostRecentModality(){return this._modality.value}constructor(e,n,r,s){this._platform=e,this._mostRecentTarget=null,this._modality=new gt(null),this._lastTouchMs=0,this._onKeydown=o=>{this._options?.ignoreKeys?.some(a=>a===o.keyCode)||(this._modality.next("keyboard"),this._mostRecentTarget=cu(o))},this._onMousedown=o=>{Date.now()-this._lastTouchMs<650||(this._modality.next(YI(o)?"keyboard":"mouse"),this._mostRecentTarget=cu(o))},this._onTouchstart=o=>{qI(o)?this._modality.next("keyboard"):(this._lastTouchMs=Date.now(),this._modality.next("touch"),this._mostRecentTarget=cu(o))},this._options={...nQ,...s},this.modalityDetected=this._modality.pipe(wU(1)),this.modalityChanged=this.modalityDetected.pipe(Zl()),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)(ee(Vi),ee(ft),ee(jt),ee(tQ,8))},i.\u0275prov=ke({token:i,factory:i.\u0275fac,providedIn:"root"}),i})();const rQ=new me("liveAnnouncerElement",{providedIn:"root",factory:function sQ(){return null}}),oQ=new me("LIVE_ANNOUNCER_DEFAULT_OPTIONS");let aQ=0,XI=(()=>{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 Re,this._rootNodeFocusAndBlurListener=a=>{for(let c=cu(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=Yc(e);if(!this._platform.isBrowser||1!==r.nodeType)return ht(null);const s=function WK(i){if(function $K(){if(null==LI){const i=typeof document<"u"?document.head:null;LI=!(!i||!i.createShadowRoot&&!i.attachShadow)}return LI}()){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 Re,rootNode:s};return this._elementInfo.set(r,a),this._registerGlobalListeners(a),a.subject}stopMonitoring(e){const n=Yc(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=Yc(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=cu(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,$M),n.addEventListener("blur",this._rootNodeFocusAndBlurListener,$M)}),this._rootNodeFocusListenerCount.set(n,r+1),1==++this._monitoredElementCount&&(this._ngZone.runOutsideAngular(()=>{this._getWindow().addEventListener("focus",this._windowFocusListener)}),this._inputModalityDetector.modalityDetected.pipe(He(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,$M),n.removeEventListener("blur",this._rootNodeFocusAndBlurListener,$M),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=Ft(GI).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,FU,LU),this._hasCheckedHighContrastMode=!0;const n=this.getHighContrastMode();1===n?e.add(KI,FU):2===n&&e.add(KI,LU)}}}return i.\u0275fac=function(e){return new(e||i)(ee(Vi),ee(jt))},i.\u0275prov=ke({token:i,factory:i.\u0275fac,providedIn:"root"}),i})(),BU=(()=>{class i{constructor(e){e._applyBodyHighContrastModeCssClasses()}}return i.\u0275fac=function(e){return new(e||i)(ee(NU))},i.\u0275mod=nn({type:i}),i.\u0275inj=Kt({imports:[HI]}),i})();function cQ(i,t){}class WM{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 UU=(()=>{class i extends NM{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=d=>{this._portalOutlet.hasAttached();const h=this._portalOutlet.attachDomPortal(d);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=FM(),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=FM();return e===n||e.contains(n)}_initializeFocusTrap(){this._focusTrap=this._focusTrapFactory.create(this._elementRef.nativeElement),this._document&&(this._elementFocusedBeforeDialogWasOpened=FM())}_handleBackdropClicks(){this._overlayRef.backdropClick().subscribe(()=>{this._config.disableClose&&this._recaptureFocus()})}}return i.\u0275fac=function(e){return new(e||i)(E(mt),E(jI),E(jt,8),E(WM),E(GM),E(ft),E(Zy),E(qc))},i.\u0275cmp=ot({type:i,selectors:[["cdk-dialog-container"]],viewQuery:function(e,n){if(1&e&&Wn(Am,7),2&e){let r;Et(r=At())&&(n._portalOutlet=r.first)}},hostAttrs:["tabindex","-1",1,"cdk-dialog-container"],hostVars:6,hostBindings:function(e,n){2&e&&Dt("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:[lt],decls:1,vars:0,consts:[["cdkPortalOutlet",""]],template:function(e,n){1&e&&fe(0,cQ,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 ZI{constructor(t,e){this.overlayRef=t,this.config=e,this.closed=new Re,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&&!Ko(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 VU=new me("DialogScrollStrategy"),dQ=new me("DialogData"),uQ=new me("DefaultDialogConfig"),fQ={provide:VU,deps:[as],useFactory:function hQ(i){return()=>i.scrollStrategies.block()}};let pQ=0,zU=(()=>{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 Re,this._afterOpenedAtThisLevel=new Re,this._ariaHiddenElements=new Map,this.afterAllClosed=Ey(()=>this.openDialogs.length?this._getAfterAllClosed():this._getAfterAllClosed().pipe(Do(void 0))),this._scrollStrategy=a}open(e,n){(n={...this._defaultOptions||new WM,...n}).id=n.id||"cdk-dialog-"+pQ++,n.id&&this.getDialogById(n.id);const s=this._getOverlayConfig(n),o=this._overlay.create(s),a=new ZI(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(){QI(this.openDialogs,e=>e.close())}getDialogById(e){return this.openDialogs.find(n=>n.id===e)}ngOnDestroy(){QI(this._openDialogsAtThisLevel,e=>{!1===e.config.closeOnDestroy&&this._removeOpenDialog(e,!1)}),QI(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:WM,useValue:r},{provide:ZI,useValue:n},{provide:Zy,useValue:e}];let a;r.container?"function"==typeof r.container?a=r.container:(a=r.container.type,o.push(...r.container.providers(r))):a=UU;const l=new Lh(a,r.viewContainerRef,Gi.create({parent:s||this._injector,providers:o}),r.componentFactoryResolver);return e.attach(l).instance}_attachDialogContent(e,n,r,s){if(e instanceof Co){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 Lh(e,s.viewContainerRef,o,s.componentFactoryResolver));n.componentInstance=a.instance}}_createInjector(e,n,r,s){const o=e.injector||e.viewContainerRef?.injector,a=[{provide:dQ,useValue:e.data},{provide:ZI,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(Ra,null,{optional:!0}))&&a.push({provide:Ra,useValue:{value:e.direction,change:ht()}}),Gi.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)(ee(as),ee(Gi),ee(uQ,8),ee(i,12),ee(VM),ee(VU))},i.\u0275prov=ke({token:i,factory:i.\u0275fac}),i})();function QI(i,t){let e=i.length;for(;e--;)t(i[e])}let mQ=(()=>{class i{}return i.\u0275fac=function(e){return new(e||i)},i.\u0275mod=nn({type:i}),i.\u0275inj=Kt({providers:[zU,fQ],imports:[Pm,Nh,BU,Nh]}),i})();const gQ=["text"];function _Q(i,t){if(1&i&&De(0,"mat-pseudo-checkbox",6),2&i){const e=he();U("state",e.selected?"checked":"unchecked")("disabled",e.disabled)}}function vQ(i,t){1&i&&De(0,"mat-pseudo-checkbox",7),2&i&&U("disabled",he().disabled)}function yQ(i,t){if(1&i&&(W(0,"span",8),Ve(1),j()),2&i){const e=he();G(1),Zi("(",e.group.label,")")}}const bQ=[[["mat-icon"]],"*"],xQ=["mat-icon","*"],MQ=new me("mat-sanity-checks",{providedIn:"root",factory:function wQ(){return!0}});let Qn=(()=>{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!NI()&&("boolean"==typeof this._sanityChecks?this._sanityChecks:!!this._sanityChecks[e])}}return i.\u0275fac=function(e){return new(e||i)(ee(NU),ee(MQ,8),ee(jt))},i.\u0275mod=nn({type:i}),i.\u0275inj=Kt({imports:[Yy,Yy]}),i})();function jM(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 Qy(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 YM(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 JI(i,t=0){return class extends i{get tabIndex(){return this.disabled?-1:this._tabIndex}set tabIndex(e){this._tabIndex=null!=e?ks(e):this.defaultTabIndex}constructor(...e){super(...e),this._tabIndex=t,this.defaultTabIndex=t}}}function $U(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 CQ(i){return class extends i{constructor(...t){super(...t),this._isInitialized=!1,this._pendingSubscribers=[],this.initialized=new In(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 jU=(()=>{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=ke({token:i,factory:i.\u0275fac,providedIn:"root"}),i})();class EQ{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 YU=Oh({passive:!0,capture:!0});class AQ{constructor(){this._events=new Map,this._delegateEventHandler=t=>{const e=cu(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,YU)})}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,YU)))}}const qU={enterDuration:225,exitDuration:150},XU=Oh({passive:!0,capture:!0}),KU=["mousedown","touchstart"],ZU=["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=Yc(n))}fadeInRipple(t,e,n={}){const r=this._containerRect=this._containerRect||this._containerElement.getBoundingClientRect(),s={...qU,...n.animation};n.centered&&(t=r.left+r.width/2,e=r.top+r.height/2);const o=n.radius||function TQ(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,d=document.createElement("div");d.classList.add("mat-ripple-element"),d.style.left=a-o+"px",d.style.top=l-o+"px",d.style.height=2*o+"px",d.style.width=2*o+"px",null!=n.color&&(d.style.backgroundColor=n.color),d.style.transitionDuration=`${c}ms`,this._containerElement.appendChild(d);const h=window.getComputedStyle(d),m=h.transitionDuration,g="none"===h.transitionProperty||"0s"===m||"0s, 0s"===m||0===r.width&&0===r.height,b=new EQ(this,d,n,g);d.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);d.addEventListener("transitionend",y),d.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={...qU,...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=Yc(t);!this._platform.isBrowser||!e||e===this._triggerElement||(this._removeTriggerEvents(),this._triggerElement=e,KU.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(()=>{ZU.forEach(e=>{this._triggerElement.addEventListener(e,this,XU)})}),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=YI(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&&(KU.forEach(e=>Lm._eventManager.removeHandler(e,t,this)),this._pointerUpEventsRegistered&&ZU.forEach(e=>t.removeEventListener(e,this,XU)))}}Lm._eventManager=new AQ;const eR=new me("mat-ripple-global-options");let Uh=(()=>{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)(E(mt),E(ft),E(Vi),E(eR,8),E(Rr,8))},i.\u0275dir=ve({type:i,selectors:[["","mat-ripple",""],["","matRipple",""]],hostAttrs:[1,"mat-ripple"],hostVars:2,hostBindings:function(e,n){2&e&&un("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})(),eb=(()=>{class i{}return i.\u0275fac=function(e){return new(e||i)},i.\u0275mod=nn({type:i}),i.\u0275inj=Kt({imports:[Qn,Qn]}),i})(),IQ=(()=>{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)(E(Rr,8))},i.\u0275cmp=ot({type:i,selectors:[["mat-pseudo-checkbox"]],hostAttrs:[1,"mat-pseudo-checkbox"],hostVars:12,hostBindings:function(e,n){2&e&&un("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})(),QU=(()=>{class i{}return i.\u0275fac=function(e){return new(e||i)},i.\u0275mod=nn({type:i}),i.\u0275inj=Kt({imports:[Qn]}),i})();const JU=new me("MAT_OPTION_PARENT_COMPONENT"),eV=new me("MatOptgroup");let RQ=0;class kQ{constructor(t,e=!1){this.source=t,this.isUserInput=e}}let PQ=(()=>{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-"+RQ++,this.onSelectionChange=new We,this._stateChanges=new Re}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)&&!Ko(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 kQ(this,e))}}return i.\u0275fac=function(e){wo()},i.\u0275dir=ve({type:i,viewQuery:function(e,n){if(1&e&&Wn(gQ,7),2&e){let r;Et(r=At())&&(n._text=r.first)}},inputs:{value:"value",id:"id",disabled:"disabled"},outputs:{onSelectionChange:"onSelectionChange"}}),i})(),Nm=(()=>{class i extends PQ{constructor(e,n,r,s){super(e,n,r,s)}}return i.\u0275fac=function(e){return new(e||i)(E(mt),E(Zn),E(JU,8),E(eV,8))},i.\u0275cmp=ot({type:i,selectors:[["mat-option"]],hostAttrs:["role","option",1,"mat-mdc-option","mdc-list-item"],hostVars:11,hostBindings:function(e,n){1&e&&Ue("click",function(){return n._selectViaInteraction()})("keydown",function(s){return n._handleKeydown(s)}),2&e&&(Yl("id",n.id),Dt("aria-selected",n.selected)("aria-disabled",n.disabled.toString()),un("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:[lt],ngContentSelectors:xQ,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&&(sr(bQ),fe(0,_Q,1,2,"mat-pseudo-checkbox",0),Wt(1),W(2,"span",1,2),Wt(4,1),j(),fe(5,vQ,1,1,"mat-pseudo-checkbox",3),fe(6,yQ,2,1,"span",4),De(7,"div",5)),2&e&&(U("ngIf",n.multiple),G(5),U("ngIf",!n.multiple&&n.selected&&!n.hideSingleSelectionIndicator),G(1),U("ngIf",n.group&&n.group._inert),G(1),U("matRippleTrigger",n._getHostElement())("matRippleDisabled",n.disabled||n.disableRipple))},dependencies:[Uh,vi,IQ],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})(),tR=(()=>{class i{}return i.\u0275fac=function(e){return new(e||i)},i.\u0275mod=nn({type:i}),i.\u0275inj=Kt({imports:[eb,Ao,Qn,QU]}),i})();class tV{}class LQ{}const Xc="*";function ka(i,t){return{type:7,name:i,definitions:t,options:{}}}function jr(i,t=null){return{type:4,styles:t,timings:i}}function iV(i,t=null){return{type:2,steps:i,options:t}}function si(i){return{type:6,styles:i,offset:null}}function Ps(i,t,e){return{type:0,name:i,styles:t,options:e}}function rV(i){return{type:5,steps:i}}function Pr(i,t,e=null){return{type:1,expr:i,animation:t,options:e}}function nR(i=null){return{type:9,options:i}}function iR(i,t,e=null){return{type:11,selector:i,animation:t,options:e}}function sV(i){Promise.resolve().then(i)}class tb{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(){sV(()=>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 oV{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?sV(()=>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 rR="!";function NQ(i,t){}class qM{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 sR="mdc-dialog--open",aV="mdc-dialog--opening",lV="mdc-dialog--closing";let VQ=(()=>{class i extends UU{constructor(e,n,r,s,o,a,l,c){super(e,n,r,s,o,a,l,c),this._animationStateChanged=new We}_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)(E(mt),E(jI),E(jt,8),E(qM),E(GM),E(ft),E(Zy),E(qc))},i.\u0275cmp=ot({type:i,selectors:[["ng-component"]],features:[lt],decls:0,vars:0,template:function(e,n){},encapsulation:2}),i})();const cV="--mat-dialog-transition-duration";function dV(i){return null==i?null:"number"==typeof i?i:i.endsWith("ms")?ks(i.substring(0,i.length-2)):i.endsWith("s")?1e3*ks(i.substring(0,i.length-1)):"0"===i?0:null}let zQ=(()=>{class i extends VQ{constructor(e,n,r,s,o,a,l,c,d){super(e,n,r,s,o,a,l,d),this._animationMode=c,this._animationsEnabled="NoopAnimations"!==this._animationMode,this._hostElement=this._elementRef.nativeElement,this._openAnimationDuration=this._animationsEnabled?dV(this._config.enterAnimationDuration)??150:0,this._closeAnimationDuration=this._animationsEnabled?dV(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(cV,`${this._openAnimationDuration}ms`),this._requestAnimationFrame(()=>this._hostElement.classList.add(aV,sR)),this._waitForAnimationToComplete(this._openAnimationDuration,this._finishDialogOpen)):(this._hostElement.classList.add(sR),Promise.resolve().then(()=>this._finishDialogOpen()))}_startExitAnimation(){this._animationStateChanged.emit({state:"closing",totalTime:this._closeAnimationDuration}),this._hostElement.classList.remove(sR),this._animationsEnabled?(this._hostElement.style.setProperty(cV,`${this._openAnimationDuration}ms`),this._requestAnimationFrame(()=>this._hostElement.classList.add(lV)),this._waitForAnimationToComplete(this._closeAnimationDuration,this._finishDialogClose)):Promise.resolve().then(()=>this._finishDialogClose())}_clearAnimationClasses(){this._hostElement.classList.remove(aV,lV)}_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)(E(mt),E(jI),E(jt,8),E(qM),E(GM),E(ft),E(Zy),E(Rr,8),E(qc))},i.\u0275cmp=ot({type:i,selectors:[["mat-dialog-container"]],hostAttrs:["tabindex","-1",1,"mat-mdc-dialog-container","mdc-dialog"],hostVars:8,hostBindings:function(e,n){2&e&&(Yl("id",n._config.id),Dt("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),un("_mat-animation-noopable",!n._animationsEnabled))},features:[lt],decls:3,vars:0,consts:[[1,"mdc-dialog__container"],[1,"mat-mdc-dialog-surface","mdc-dialog__surface"],["cdkPortalOutlet",""]],template:function(e,n){1&e&&(W(0,"div",0)(1,"div",1),fe(2,NQ,0,0,"ng-template",2),j()())},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 nb{constructor(t,e,n){this._ref=t,this._containerInstance=n,this._afterOpened=new Re,this._beforeClosed=new Re,this._state=0,this.disableClose=e.disableClose,this.id=t.id,n._animationStateChanged.pipe(gn(r=>"opened"===r.state),Pi(1)).subscribe(()=>{this._afterOpened.next(),this._afterOpened.complete()}),n._animationStateChanged.pipe(gn(r=>"closed"===r.state),Pi(1)).subscribe(()=>{clearTimeout(this._closeFallbackTimeout),this._finishDialogClose()}),t.overlayRef.detachments().subscribe(()=>{this._beforeClosed.next(this._result),this._beforeClosed.complete(),this._finishDialogClose()}),Mr(this.backdropClick(),this.keydownEvents().pipe(gn(r=>27===r.keyCode&&!this.disableClose&&!Ko(r)))).subscribe(r=>{this.disableClose||(r.preventDefault(),uV(this,"keydown"===r.type?"keyboard":"mouse"))})}close(t){this._result=t,this._containerInstance._animationStateChanged.pipe(gn(e=>"closing"===e.state),Pi(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 uV(i,t,e){return i._closeInteractionType=t,i.close(e)}const oR=new me("MatMdcDialogData"),HQ=new me("mat-mdc-dialog-default-options"),hV=new me("mat-mdc-dialog-scroll-strategy"),$Q={provide:hV,deps:[as],useFactory:function GQ(i){return()=>i.scrollStrategies.block()}};let WQ=0,jQ=(()=>{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,d,h){this._overlay=e,this._defaultOptions=r,this._parentDialog=s,this._dialogRefConstructor=l,this._dialogContainerType=c,this._dialogDataToken=d,this._openDialogsAtThisLevel=[],this._afterAllClosedAtThisLevel=new Re,this._afterOpenedAtThisLevel=new Re,this._idPrefix="mat-dialog-",this.dialogConfigClass=qM,this.afterAllClosed=Ey(()=>this.openDialogs.length?this._getAfterAllClosed():this._getAfterAllClosed().pipe(Do(void 0))),this._scrollStrategy=a,this._dialog=n.get(zU)}open(e,n){let r;(n={...this._defaultOptions||new qM,...n}).id=n.id||`${this._idPrefix}${WQ++}`,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:WM,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){wo()},i.\u0275prov=ke({token:i,factory:i.\u0275fac}),i})(),Bm=(()=>{class i extends jQ{constructor(e,n,r,s,o,a,l,c){super(e,n,s,a,l,o,nb,zQ,oR,c),this._idPrefix="mat-mdc-dialog-"}}return i.\u0275fac=function(e){return new(e||i)(ee(as),ee(Gi),ee(_y,8),ee(HQ,8),ee(hV),ee(i,12),ee(VM),ee(Rr,8))},i.\u0275prov=ke({token:i,factory:i.\u0275fac}),i})(),YQ=0,qQ=(()=>{class i{constructor(e,n,r){this.dialogRef=e,this._elementRef=n,this._dialog=r,this.type="button"}ngOnInit(){this.dialogRef||(this.dialogRef=gV(this._elementRef,this._dialog.openDialogs))}ngOnChanges(e){const n=e._matDialogClose||e._matDialogCloseResult;n&&(this.dialogResult=n.currentValue)}_onButtonClick(e){uV(this.dialogRef,0===e.screenX&&0===e.screenY?"keyboard":"mouse",this.dialogResult)}}return i.\u0275fac=function(e){return new(e||i)(E(nb,8),E(mt),E(Bm))},i.\u0275dir=ve({type:i,selectors:[["","mat-dialog-close",""],["","matDialogClose",""]],hostVars:2,hostBindings:function(e,n){1&e&&Ue("click",function(s){return n._onButtonClick(s)}),2&e&&Dt("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:[bi]}),i})(),fV=(()=>{class i{constructor(e,n,r){this._dialogRef=e,this._elementRef=n,this._dialog=r,this.id="mat-mdc-dialog-title-"+YQ++}ngOnInit(){this._dialogRef||(this._dialogRef=gV(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)(E(nb,8),E(mt),E(Bm))},i.\u0275dir=ve({type:i,selectors:[["","mat-dialog-title",""],["","matDialogTitle",""]],hostAttrs:[1,"mat-mdc-dialog-title","mdc-dialog__title"],hostVars:1,hostBindings:function(e,n){2&e&&Yl("id",n.id)},inputs:{id:"id"},exportAs:["matDialogTitle"]}),i})(),pV=(()=>{class i{}return i.\u0275fac=function(e){return new(e||i)},i.\u0275dir=ve({type:i,selectors:[["","mat-dialog-content",""],["mat-dialog-content"],["","matDialogContent",""]],hostAttrs:[1,"mat-mdc-dialog-content","mdc-dialog__content"]}),i})(),mV=(()=>{class i{constructor(){this.align="start"}}return i.\u0275fac=function(e){return new(e||i)},i.\u0275dir=ve({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&&un("mat-mdc-dialog-actions-align-center","center"===n.align)("mat-mdc-dialog-actions-align-end","end"===n.align)},inputs:{align:"align"}}),i})();function gV(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 _V=(()=>{class i{}return i.\u0275fac=function(e){return new(e||i)},i.\u0275mod=nn({type:i}),i.\u0275inj=Kt({providers:[Bm,$Q],imports:[mQ,Pm,Nh,Qn,Qn]}),i})();const XQ=["mat-button",""],yV=[[["",8,"material-icons",3,"iconPositionEnd",""],["mat-icon",3,"iconPositionEnd",""],["","matButtonIcon","",3,"iconPositionEnd",""]],"*",[["","iconPositionEnd","",8,"material-icons"],["mat-icon","iconPositionEnd",""],["","matButtonIcon","","iconPositionEnd",""]]],bV=[".material-icons:not([iconPositionEnd]), mat-icon:not([iconPositionEnd]), [matButtonIcon]:not([iconPositionEnd])","*",".material-icons[iconPositionEnd], mat-icon[iconPositionEnd], [matButtonIcon][iconPositionEnd]"],ZQ=["mat-mini-fab",""],JQ=["mat-icon-button",""],eJ=["*"],tJ=[{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"]}],nJ=Qy(jM(YM(class{constructor(i){this._elementRef=i}})));let aR=(()=>{class i extends nJ{constructor(e,n,r,s){super(e),this._platform=n,this._ngZone=r,this._animationMode=s,this._focusMonitor=Ft(qc),this._isFab=!1;const o=e.nativeElement.classList;for(const a of tJ)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){wo()},i.\u0275dir=ve({type:i,viewQuery:function(e,n){if(1&e&&Wn(Uh,5),2&e){let r;Et(r=At())&&(n.ripple=r.first)}},features:[lt]}),i})(),ib=(()=>{class i extends aR{constructor(e,n,r,s){super(e,n,r,s)}}return i.\u0275fac=function(e){return new(e||i)(E(mt),E(Vi),E(ft),E(Rr,8))},i.\u0275cmp=ot({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&&(Dt("disabled",n.disabled||null),un("_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:[lt],attrs:XQ,ngContentSelectors:bV,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&&(sr(yV),De(0,"span",0),Wt(1),W(2,"span",1),Wt(3,1),j(),Wt(4,2),De(5,"span",2)(6,"span",3)(7,"span",4)),2&e&&(un("mdc-button__ripple",!n._isFab)("mdc-fab__ripple",n._isFab),G(6),U("matRippleDisabled",n._isRippleDisabled())("matRippleTrigger",n._elementRef.nativeElement))},dependencies:[Uh],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 rJ=new me("mat-mdc-fab-default-options",{providedIn:"root",factory:xV});function xV(){return{color:"accent"}}const wV=xV();let MV=(()=>{class i extends aR{constructor(e,n,r,s,o){super(e,n,r,s),this._options=o,this._isFab=!0,this._options=this._options||wV,this.color=this.defaultColor=this._options.color||wV.color}}return i.\u0275fac=function(e){return new(e||i)(E(mt),E(Vi),E(ft),E(Rr,8),E(rJ,8))},i.\u0275cmp=ot({type:i,selectors:[["button","mat-mini-fab",""]],hostVars:7,hostBindings:function(e,n){2&e&&(Dt("disabled",n.disabled||null),un("_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:[lt],attrs:ZQ,ngContentSelectors:bV,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&&(sr(yV),De(0,"span",0),Wt(1),W(2,"span",1),Wt(3,1),j(),Wt(4,2),De(5,"span",2)(6,"span",3)(7,"span",4)),2&e&&(un("mdc-button__ripple",!n._isFab)("mdc-fab__ripple",n._isFab),G(6),U("matRippleDisabled",n._isRippleDisabled())("matRippleTrigger",n._elementRef.nativeElement))},dependencies:[Uh],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})(),XM=(()=>{class i extends aR{constructor(e,n,r,s){super(e,n,r,s)}}return i.\u0275fac=function(e){return new(e||i)(E(mt),E(Vi),E(ft),E(Rr,8))},i.\u0275cmp=ot({type:i,selectors:[["button","mat-icon-button",""]],hostVars:7,hostBindings:function(e,n){2&e&&(Dt("disabled",n.disabled||null),un("_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:[lt],attrs:JQ,ngContentSelectors:eJ,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&&(sr(),De(0,"span",0),Wt(1),De(2,"span",1)(3,"span",2)(4,"span",3)),2&e&&(G(3),U("matRippleDisabled",n._isRippleDisabled())("matRippleCentered",!0)("matRippleTrigger",n._elementRef.nativeElement))},dependencies:[Uh],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})(),KM=(()=>{class i{}return i.\u0275fac=function(e){return new(e||i)},i.\u0275mod=nn({type:i}),i.\u0275inj=Kt({imports:[Qn,eb,Qn]}),i})();const sJ=["class","dialog"];let CV=(()=>{class i{constructor(e,n){this.dialogRef=e,this.data=n}}return i.\u0275fac=function(e){return new(e||i)(E(nb),E(oR))},i.\u0275cmp=ot({type:i,selectors:[["app-confirm",8,"dialog"]],attrs:sJ,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&&(W(0,"h1",0),Ve(1,"Confirmation"),j(),W(2,"div",1)(3,"p"),Ve(4),j()(),W(5,"div",2)(6,"button",3),Ue("click",function(){return n.dialogRef.close()}),Ve(7,"Cancel"),j(),W(8,"button",4),Ve(9,"Yes"),j()()),2&e&&(G(4),_i(n.data.text),G(4),U("mat-dialog-close",!0))},dependencies:[ib,qQ,fV,pV,mV]}),i})();function lR(i,t){const e="object"==typeof t;return new Promise((n,r)=>{const s=new ua({next:o=>{n(o),s.unsubscribe()},error:r,complete:()=>{e?n(t.defaultValue):r(new fm)}});i.subscribe(s)})}let Ql=(()=>{class i{constructor(e){this.ngZone=e,this.openedResource$=new gt(null),this.openedResourcePath$=new gt(null),eel.expose(this.wrapHandler(this.openFile),"open_file"),eel.on_angular_ready(),setTimeout(tt(function*(){for(;;){if(eel._websocket){eel._websocket.onclose=()=>window.close();break}yield new Promise(n=>setTimeout(n,0))}}),0)}wrapHandler(e){return(...n)=>{try{ft.assertInAngularZone(),e.bind(this)(...n)}catch{this.ngZone.run(e,this,n)}}}openFile(e,n=!1){var r=this;return tt(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 tt(function*(){yield eel.open_file_with_system_app(e)()})()}retrieveValue(e){return tt(function*(){return yield eel.retrieve_value(e)()})()}runCustomAction(e,n,r){return tt(function*(){return eel.run_custom_action(e,n,r)()})()}saveFile(e){var n=this;return tt(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 tt(function*(){return eel.serialize_resource(e,n)()})()}serializeResourceTmp(e,n,r={}){return tt(function*(){return eel.serialize_resource_tmp(e,n,r)()})()}serializeReversible(e,n){return tt(function*(){return eel.serialize_reversible(e,n)()})()}deserializeResource(e){return tt(function*(){return eel.deserialize_resource(e)()})()}}return i.\u0275fac=function(e){return new(e||i)(ee(ft))},i.\u0275prov=ke({token:i,factory:i.\u0275fac,providedIn:"root"}),i})();var cR=ps(489);const SV=i=>!(!i||"object"!=typeof i),EV=(i={},t,e,n=[])=>{const r=[];if(SV(i)){const s=Object.entries(i);for(let o=0;o{class i{constructor(e){var n=this;this.eelDelegate=e,this._hasUnsavedChanges$=new gt(!1),this.resource$=new gt(null),this.error$=new gt(null),this.customActionRunning$=new gt(!1),this.changedDataBlocks={},this.dataBlockChange$=new Re,this.hideHiddenFields$=new gt(!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=EV(r.schema,"is_recursive_ref",!0);for(const[o,a]of s){const l=o.block_class_mro;let c=r.schema,d=c.block_class_mro===l?c:void 0;for(const h of a.slice(0,a.length-1))!d&&c[h]?.block_class_mro===l&&(d=c[h]),c=c[h];c[a[a.length-1]]=d}this.resource$.next(r),this.error$.next(null)}else this.resource$.next(null),this.error$.next(null)}),this.dataBlockChange$.subscribe(function(){var r=tt(function*([s,o]){n.changedDataBlocks[s]=o,n.updateUnsavedChanges();const a=yield n.eelDelegate.retrieveValue(s);n.changedDataBlocks[s]==o&&((0,cR.isNumber)(o)?Math.abs(o-a)<1e-10:(0,cR.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 tt(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 tt(function*(){return s.processExternalChanges(e,()=>s.eelDelegate.runCustomAction(e,n,r))})()}deserializeResource(e){var n=this;return tt(function*(){return n.processExternalChanges(e,()=>n.eelDelegate.deserializeResource(e))})()}reloadResource(){var e=this;return tt(function*(){const n=e.eelDelegate.openedResourcePath$.getValue();n&&e.eelDelegate.openFile(n,!0).then()})()}saveResource(){var e=this;return tt(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)(ee(Ql))},i.\u0275prov=ke({token:i,factory:i.\u0275fac,providedIn:"root"}),i})();function oJ(i,t){if(1&i){const e=di();W(0,"div",2)(1,"button",3),Ue("click",function(){return an(e),zt(he().action())}),Ve(2),j()()}if(2&i){const e=he();G(2),Zi(" ",e.data.action," ")}}const aJ=["label"];function lJ(i,t){}const cJ=Math.pow(2,31)-1;class dR{constructor(t,e){this._overlayRef=e,this._afterDismissed=new Re,this._afterOpened=new Re,this._onAction=new Re,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,cJ))}_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 AV=new me("MatSnackBarData");class ZM{constructor(){this.politeness="assertive",this.announcementMessage="",this.duration=0,this.data=null,this.horizontalPosition="center",this.verticalPosition="bottom"}}let dJ=(()=>{class i{}return i.\u0275fac=function(e){return new(e||i)},i.\u0275dir=ve({type:i,selectors:[["","matSnackBarLabel",""]],hostAttrs:[1,"mat-mdc-snack-bar-label","mdc-snackbar__label"]}),i})(),uJ=(()=>{class i{}return i.\u0275fac=function(e){return new(e||i)},i.\u0275dir=ve({type:i,selectors:[["","matSnackBarActions",""]],hostAttrs:[1,"mat-mdc-snack-bar-actions","mdc-snackbar__actions"]}),i})(),hJ=(()=>{class i{}return i.\u0275fac=function(e){return new(e||i)},i.\u0275dir=ve({type:i,selectors:[["","matSnackBarAction",""]],hostAttrs:[1,"mat-mdc-snack-bar-action","mdc-snackbar__action"]}),i})(),fJ=(()=>{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)(E(dR),E(AV))},i.\u0275cmp=ot({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&&(W(0,"div",0),Ve(1),j(),fe(2,oJ,3,1,"div",1)),2&e&&(G(1),Zi(" ",n.data.message,"\n"),G(1),U("ngIf",n.hasAction))},dependencies:[vi,ib,dJ,uJ,hJ],styles:[".mat-mdc-simple-snack-bar{display:flex}"],encapsulation:2,changeDetection:0}),i})();const pJ={snackBarState:ka("state",[Ps("void, hidden",si({transform:"scale(0.8)",opacity:0})),Ps("visible",si({transform:"scale(1)",opacity:1})),Pr("* => visible",jr("150ms cubic-bezier(0, 0, 0.2, 1)")),Pr("* => void, * => hidden",jr("75ms cubic-bezier(0.4, 0.0, 1, 1)",si({opacity:0})))])};let mJ=0,gJ=(()=>{class i extends NM{constructor(e,n,r,s,o){super(),this._ngZone=e,this._elementRef=n,this._changeDetectorRef=r,this._platform=s,this.snackBarConfig=o,this._document=Ft(jt),this._trackedModals=new Set,this._announceDelay=150,this._destroyed=!1,this._onAnnounce=new Re,this._onExit=new Re,this._onEnter=new Re,this._animationState="void",this._liveElementId="mat-snack-bar-container-live-"+mJ++,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(Pi(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)(E(ft),E(mt),E(Zn),E(Vi),E(ZM))},i.\u0275dir=ve({type:i,viewQuery:function(e,n){if(1&e&&Wn(Am,7),2&e){let r;Et(r=At())&&(n._portalOutlet=r.first)}},features:[lt]}),i})(),_J=(()=>{class i extends gJ{_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=ri(i)))(n||i)}}(),i.\u0275cmp=ot({type:i,selectors:[["mat-snack-bar-container"]],viewQuery:function(e,n){if(1&e&&Wn(aJ,7),2&e){let r;Et(r=At())&&(n._label=r.first)}},hostAttrs:[1,"mdc-snackbar","mat-mdc-snack-bar-container","mdc-snackbar--open"],hostVars:1,hostBindings:function(e,n){1&e&&N1("@state.done",function(s){return n.onAnimationEnd(s)}),2&e&&Iw("@state",n._animationState)},features:[lt],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&&(W(0,"div",0)(1,"div",1,2)(3,"div",3),fe(4,lJ,0,0,"ng-template",4),j(),De(5,"div"),j()()),2&e&&(G(5),Dt("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:[pJ.snackBarState]}}),i})(),DV=(()=>{class i{}return i.\u0275fac=function(e){return new(e||i)},i.\u0275mod=nn({type:i}),i.\u0275inj=Kt({imports:[Pm,Nh,Ao,KM,Qn,Qn]}),i})();const TV=new me("mat-snack-bar-default-options",{providedIn:"root",factory:function vJ(){return new ZM}});let yJ=(()=>{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=Gi.create({parent:n&&n.viewContainerRef&&n.viewContainerRef.injector||this._injector,providers:[{provide:ZM,useValue:n}]}),o=new Lh(this.snackBarContainerComponent,n.viewContainerRef,s),a=e.attach(o);return a.instance.snackBarConfig=n,a.instance}_attach(e,n){const r={...new ZM,...this._defaultConfig,...n},s=this._createOverlay(r),o=this._attachSnackBarContainer(s,r),a=new dR(o,s);if(e instanceof Co){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 Lh(e,void 0,l),d=o.attachComponentPortal(c);a.instance=d.instance}return this._breakpointObserver.observe("(max-width: 599.98px) and (orientation: portrait)").pipe(He(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 Gi.create({parent:e&&e.viewContainerRef&&e.viewContainerRef.injector||this._injector,providers:[{provide:dR,useValue:n},{provide:AV,useValue:e.data}]})}}return i.\u0275fac=function(e){return new(e||i)(ee(as),ee(XI),ee(Gi),ee(GI),ee(i,12),ee(TV))},i.\u0275prov=ke({token:i,factory:i.\u0275fac}),i})(),IV=(()=>{class i extends yJ{constructor(e,n,r,s,o,a){super(e,n,r,s,o,a),this.simpleSnackBarComponent=fJ,this.snackBarContainerComponent=_J,this.handsetCssClass="mat-mdc-snack-bar-handset"}}return i.\u0275fac=function(e){return new(e||i)(ee(as),ee(XI),ee(Gi),ee(GI),ee(i,12),ee(TV))},i.\u0275prov=ke({token:i,factory:i.\u0275fac,providedIn:DV}),i})();const bJ=["*",[["mat-toolbar-row"]]],xJ=["*","mat-toolbar-row"],wJ=Qy(class{constructor(i){this._elementRef=i}});let MJ=(()=>{class i{}return i.\u0275fac=function(e){return new(e||i)},i.\u0275dir=ve({type:i,selectors:[["mat-toolbar-row"]],hostAttrs:[1,"mat-toolbar-row"],exportAs:["matToolbarRow"]}),i})(),CJ=(()=>{class i extends wJ{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)(E(mt),E(Vi),E(jt))},i.\u0275cmp=ot({type:i,selectors:[["mat-toolbar"]],contentQueries:function(e,n,r){if(1&e&&$i(r,MJ,5),2&e){let s;Et(s=At())&&(n._toolbarRows=s)}},hostAttrs:[1,"mat-toolbar"],hostVars:4,hostBindings:function(e,n){2&e&&un("mat-toolbar-multiple-rows",n._toolbarRows.length>0)("mat-toolbar-single-row",0===n._toolbarRows.length)},inputs:{color:"color"},exportAs:["matToolbar"],features:[lt],ngContentSelectors:xJ,decls:2,vars:0,template:function(e,n){1&e&&(sr(bJ),Wt(0),Wt(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})(),SJ=(()=>{class i{}return i.\u0275fac=function(e){return new(e||i)},i.\u0275mod=nn({type:i}),i.\u0275inj=Kt({imports:[Qn,Qn]}),i})(),EJ=(()=>{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=ot({type:i,selectors:[["mat-divider"]],hostAttrs:["role","separator",1,"mat-divider"],hostVars:7,hostBindings:function(e,n){2&e&&(Dt("aria-orientation",n.vertical?"vertical":"horizontal"),un("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})(),RV=(()=>{class i{}return i.\u0275fac=function(e){return new(e||i)},i.\u0275mod=nn({type:i}),i.\u0275inj=Kt({imports:[Qn,Qn]}),i})();const AJ=["tooltip"],kV=new me("mat-tooltip-scroll-strategy"),IJ={provide:kV,deps:[as],useFactory:function TJ(i){return()=>i.scrollStrategies.reposition({scrollThrottle:20})}},kJ=new me("mat-tooltip-default-options",{providedIn:"root",factory:function RJ(){return{showDelay:0,hideDelay:0,touchendHideDelay:1500}}}),PV="tooltip-panel",OV=Oh({passive:!0});let BJ=(()=>{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=ks(e)}get hideDelay(){return this._hideDelay}set hideDelay(e){this._hideDelay=ks(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,d,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 Re,this._scrollStrategy=d,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(He(this._destroyed)).subscribe(()=>{this._overlayRef&&this._updatePosition(this._overlayRef)})}ngAfterViewInit(){this._viewInitialized=!0,this._setupPointerEnterEventsIfNeeded(),this._focusMonitor.monitor(this._elementRef).pipe(He(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,OV)}),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 Lh(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(He(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 mt)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(He(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}-${PV}`,scrollStrategy:this._scrollStrategy()}),this._updatePosition(this._overlayRef),this._overlayRef.detachments().pipe(He(this._destroyed)).subscribe(()=>this._detach()),this._overlayRef.outsidePointerEvents().pipe(He(this._destroyed)).subscribe(()=>this._tooltipInstance?._handleBodyInteraction()),this._overlayRef.keydownEvents().pipe(He(this._destroyed)).subscribe(s=>{this._isTooltipVisible()&&27===s.keyCode&&!Ko(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(Pi(1),He(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}-${PV}-`;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,OV)})}_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){wo()},i.\u0275dir=ve({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})(),Os=(()=>{class i extends BJ{constructor(e,n,r,s,o,a,l,c,d,h,p,m){super(e,n,r,s,o,a,l,c,d,h,p,m),this._tooltipComponent=VJ,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)(E(as),E(mt),E(qy),E(Wr),E(ft),E(Vi),E(HZ),E(qc),E(kV),E(Ra,8),E(kJ,8),E(jt))},i.\u0275dir=ve({type:i,selectors:[["","matTooltip",""]],hostAttrs:[1,"mat-mdc-tooltip-trigger"],exportAs:["matTooltip"],features:[lt]}),i})(),UJ=(()=>{class i{constructor(e,n){this._changeDetectorRef=e,this._closeOnInteraction=!1,this._isVisible=!1,this._onHide=new Re,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)(E(Zn),E(Rr,8))},i.\u0275dir=ve({type:i}),i})(),VJ=(()=>{class i extends UJ{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)(E(Zn),E(mt),E(Rr,8))},i.\u0275cmp=ot({type:i,selectors:[["mat-tooltip-component"]],viewQuery:function(e,n){if(1&e&&Wn(AJ,7),2&e){let r;Et(r=At())&&(n._tooltip=r.first)}},hostAttrs:["aria-hidden","true"],hostVars:2,hostBindings:function(e,n){1&e&&Ue("mouseleave",function(s){return n._handleMouseLeave(s)}),2&e&&Yo("zoom",n.isVisible()?1:null)},features:[lt],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&&(W(0,"div",0,1),Ue("animationend",function(s){return n._handleAnimationEnd(s)}),W(2,"div",2),Ve(3),j()()),2&e&&(un("mdc-tooltip--multiline",n._isMultiline),U("ngClass",n.tooltipClass),G(3),_i(n.message))},dependencies:[hm],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})(),FV=(()=>{class i{}return i.\u0275fac=function(e){return new(e||i)},i.\u0275mod=nn({type:i}),i.\u0275inj=Kt({providers:[IJ],imports:[BU,Ao,Pm,Qn,Qn,Xy]}),i})();function LV(...i){const t=w0(i),{args:e,keys:n}=VB(i),r=new In(s=>{const{length:o}=e;if(!o)return void s.complete();const a=new Array(o);let l=o,c=o;for(let d=0;d{h||(h=!0,c--),a[d]=p},()=>l--,void 0,()=>{(!l||!h)&&(c||s.next(n?zB(n,a):a),s.complete())}))}});return t?r.pipe(JT(t)):r}class uR{}class uu{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 uu?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 uu;return e.lazyInit=this.lazyInit&&this.lazyInit instanceof uu?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 zJ{encodeKey(t){return BV(t)}encodeValue(t){return BV(t)}decodeKey(t){return decodeURIComponent(t)}decodeValue(t){return decodeURIComponent(t)}}const GJ=/%(\d[a-f0-9])/gi,$J={40:"@","3A":":",24:"$","2C":",","3B":";","3D":"=","3F":"?","2F":"/"};function BV(i){return encodeURIComponent(i).replace(GJ,(t,e)=>$J[e]??t)}function QM(i){return`${i}`}class hu{constructor(t={}){if(this.updates=null,this.cloneFrom=null,this.encoder=t.encoder||new zJ,t.fromString){if(t.fromObject)throw new Error("Cannot specify both fromString and fromObject.");this.map=function HJ(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 hu({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 WJ{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 UV(i){return typeof ArrayBuffer<"u"&&i instanceof ArrayBuffer}function VV(i){return typeof Blob<"u"&&i instanceof Blob}function zV(i){return typeof FormData<"u"&&i instanceof FormData}class rb{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 jJ(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 uu),this.context||(this.context=new WJ),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 rb(e,n,s,{params:c,headers:l,context:d,reportProgress:a,responseType:r,withCredentials:o})}}var ls=(()=>((ls=ls||{})[ls.Sent=0]="Sent",ls[ls.UploadProgress=1]="UploadProgress",ls[ls.ResponseHeader=2]="ResponseHeader",ls[ls.DownloadProgress=3]="DownloadProgress",ls[ls.Response=4]="Response",ls[ls.User=5]="User",ls))();class qJ{constructor(t,e=200,n="OK"){this.headers=t.headers||new uu,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 hR extends qJ{constructor(t={}){super(t),this.type=ls.Response,this.body=void 0!==t.body?t.body:null}clone(t={}){return new hR({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 fR(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 pR=(()=>{class i{constructor(e){this.handler=e}request(e,n,r={}){let s;if(e instanceof rb)s=e;else{let l,c;l=r.headers instanceof uu?r.headers:new uu(r.headers),r.params&&(c=r.params instanceof hu?r.params:new hu({fromObject:r.params})),s=new rb(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=ht(s).pipe(ru(l=>this.handler.handle(l)));if(e instanceof rb||"events"===r.observe)return o;const a=o.pipe(gn(l=>l instanceof hR));switch(r.observe||"body"){case"body":switch(s.responseType){case"arraybuffer":return a.pipe(et(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(et(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(et(l=>{if(null!==l.body&&"string"!=typeof l.body)throw new Error("Response is not a string.");return l.body}));default:return a.pipe(et(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 hu).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,fR(r,n))}post(e,n,r={}){return this.request("POST",e,fR(r,n))}put(e,n,r={}){return this.request("PUT",e,fR(r,n))}}return i.\u0275fac=function(e){return new(e||i)(ee(uR))},i.\u0275prov=ke({token:i,factory:i.\u0275fac}),i})();const aee=["*"];let eC;function sb(i){return function lee(){if(void 0===eC&&(eC=null,typeof window<"u")){const i=window;void 0!==i.trustedTypes&&(eC=i.trustedTypes.createPolicy("angular#components",{createHTML:t=>t}))}return eC}()?.createHTML(i)||i}function XV(i){return Error(`Unable to find icon with the name "${i}"`)}function KV(i){return Error(`The URL provided to MatIconRegistry was not trusted as a resource URL via Angular's DomSanitizer. Attempted URL was "${i}".`)}function ZV(i){return Error(`The literal provided to MatIconRegistry was not trusted as safe HTML by Angular's DomSanitizer. Attempted literal was "${i}".`)}class Vh{constructor(t,e,n){this.url=t,this.svgText=e,this.options=n}}let tC=(()=>{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 Vh(r,null,s))}addSvgIconResolver(e){return this._resolvers.push(e),this}addSvgIconLiteralInNamespace(e,n,r,s){const o=this._sanitizer.sanitize(Kn.HTML,r);if(!o)throw ZV(r);const a=sb(o);return this._addSvgIconConfig(e,n,new Vh("",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 Vh(n,null,r))}addSvgIconSetLiteralInNamespace(e,n,r){const s=this._sanitizer.sanitize(Kn.HTML,n);if(!s)throw ZV(n);const o=sb(s);return this._addSvgIconSetConfig(e,new Vh("",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(Kn.RESOURCE_URL,e);if(!n)throw KV(e);const r=this._cachedIconsByUrl.get(n);return r?ht(nC(r)):this._loadSvgIconFromConfig(new Vh(e,null)).pipe(Ui(s=>this._cachedIconsByUrl.set(n,s)),et(s=>nC(s)))}getNamedSvgIcon(e,n=""){const r=QV(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(XV(r))}ngOnDestroy(){this._resolvers=[],this._svgIconConfigs.clear(),this._iconSetConfigs.clear(),this._cachedIconsByUrl.clear()}_getSvgFromConfig(e){return e.svgText?ht(nC(this._svgElementFromConfig(e))):this._loadSvgIconFromConfig(e).pipe(et(n=>nC(n)))}_getSvgFromIconSetConfigs(e,n){const r=this._extractIconWithNameFromAnySet(e,n);return r?ht(r):LV(n.filter(o=>!o.svgText).map(o=>this._loadSvgIconSetFromConfig(o).pipe(Wc(a=>{const c=`Loading icon set URL: ${this._sanitizer.sanitize(Kn.RESOURCE_URL,o.url)} failed: ${a.message}`;return this._errorHandler.handleError(new Error(c)),ht(null)})))).pipe(et(()=>{const o=this._extractIconWithNameFromAnySet(e,n);if(!o)throw XV(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(Ui(n=>e.svgText=n),et(()=>this._svgElementFromConfig(e)))}_loadSvgIconSetFromConfig(e){return e.svgText?ht(null):this._fetchIcon(e).pipe(Ui(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(sb(""));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(sb("")),r=e.attributes;for(let s=0;ssb(c)),su(()=>this._inProgressUrlFetches.delete(o)),Uf());return this._inProgressUrlFetches.set(o,l),l}_addSvgIconConfig(e,n,r){return this._svgIconConfigs.set(QV(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:""}}}),JV=["clip-path","color-profile","src","cursor","fill","filter","marker","marker-start","marker-mid","marker-end","mask","stroke"],gee=JV.map(i=>`[${i}]`).join(", "),_ee=/^url\(['"]?#(.*?)['"]?\)$/;let gR=(()=>{class i extends hee{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=Zt.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(gee),r=this._elementsWithExternalReferences=this._elementsWithExternalReferences||new Map;for(let s=0;s{const a=n[s],l=a.getAttribute(o),c=l?l.match(_ee):null;if(c){let d=r.get(a);d||(d=[],r.set(a,d)),d.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(Pi(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)(E(mt),E(tC),ba("aria-hidden"),E(pee),E(al),E(fee,8))},i.\u0275cmp=ot({type:i,selectors:[["mat-icon"]],hostAttrs:["role","img",1,"mat-icon","notranslate"],hostVars:8,hostBindings:function(e,n){2&e&&(Dt("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),un("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:[lt],ngContentSelectors:aee,decls:1,vars:0,template:function(e,n){1&e&&(sr(),Wt(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})(),ez=(()=>{class i{}return i.\u0275fac=function(e){return new(e||i)},i.\u0275mod=nn({type:i}),i.\u0275inj=Kt({imports:[Qn,Qn]}),i})(),tz=(()=>{class i{constructor(e){this.viewContainerRef=e}}return i.\u0275fac=function(e){return new(e||i)(E(Wr))},i.\u0275dir=ve({type:i,selectors:[["","dataBlockUI",""]]}),i})(),vee=(()=>{class i{constructor(){this.resource=null,this.name="",this.resourceDescription="",this.changed=new We}}return i.\u0275fac=function(e){return new(e||i)},i.\u0275cmp=ot({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&&(W(0,"p",0),Ve(1),j()),2&e&&(U("matTooltip",n.resourceDescription),G(1),tm("",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:[Os],changeDetection:0}),i})();function yee(i,t){if(1&i&&(W(0,"h2",4),Ve(1),j()),2&i){const e=he();U("matTooltip",e.resourceDescription),G(1),_i(e.name)}}function bee(i,t){1&i&&De(0,"app-block-actions",5),2&i&&U("resource",he().resource)}const xee=function(i,t,e,n){return{id:i,name:t,data:e,schema:n}};function wee(i,t){if(1&i&&De(0,"app-editor",7),2&i){const e=he().$implicit,n=he();U("resource",L2(3,xee,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 Mee(i,t){if(1&i&&(Gr(0),fe(1,wee,1,8,"app-editor",6),Ct(2,"async"),$r()),2&i){const e=t.$implicit,n=he();G(1),U("ngIf",!(Tt(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 Jl=(()=>{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 We,this.destroyed$=new Re}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(He(this.destroyed$),gn(([n,r])=>!!this.resource&&n.startsWith(this.resource.id)&&!n.substring(this.resource.id.length+1).includes("/"))).subscribe(function(){var n=tt(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)(E(Pa))},i.\u0275cmp=ot({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&&(fe(0,yee,2,2,"h2",0),Ct(1,"async"),fe(2,bee,1,1,"app-block-actions",1),W(3,"div",2),fe(4,Mee,3,3,"ng-container",3),j()),2&e){let r;U("ngIf",n.name&&n.name!=(null==(r=Tt(1,4,n.main.resource$))?null:r.name)),G(2),U("ngIf",!n.hideBlockActions),G(2),U("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})(),nz=(()=>{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)(E(ol),E(mt))},i.\u0275dir=ve({type:i}),i})(),zh=(()=>{class i extends nz{}return i.\u0275fac=function(){let t;return function(n){return(t||(t=ri(i)))(n||i)}}(),i.\u0275dir=ve({type:i,features:[lt]}),i})();const To=new me("NgValueAccessor"),See={provide:To,useExisting:Gn(()=>gl),multi:!0},Aee=new me("CompositionEventMode");let gl=(()=>{class i extends nz{constructor(e,n,r){super(e,n),this._compositionMode=r,this._composing=!1,null==this._compositionMode&&(this._compositionMode=!function Eee(){const i=Hc()?Hc().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)(E(ol),E(mt),E(Aee,8))},i.\u0275dir=ve({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&&Ue("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:[Dn([See]),lt]}),i})();const Dee=!1;function fu(i){return null==i||("string"==typeof i||Array.isArray(i))&&0===i.length}function rz(i){return null!=i&&"number"==typeof i.length}const Yr=new me("NgValidators"),pu=new me("NgAsyncValidators"),Tee=/^(?=.{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 _l{static min(t){return sz(t)}static max(t){return oz(t)}static required(t){return function az(i){return fu(i.value)?{required:!0}:null}(t)}static requiredTrue(t){return function lz(i){return!0===i.value?null:{required:!0}}(t)}static email(t){return function cz(i){return fu(i.value)||Tee.test(i.value)?null:{email:!0}}(t)}static minLength(t){return dz(t)}static maxLength(t){return uz(t)}static pattern(t){return function hz(i){if(!i)return iC;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(fu(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 vz(t)}static composeAsync(t){return yz(t)}}function sz(i){return t=>{if(fu(t.value)||fu(i))return null;const e=parseFloat(t.value);return!isNaN(e)&&e{if(fu(t.value)||fu(i))return null;const e=parseFloat(t.value);return!isNaN(e)&&e>i?{max:{max:i,actual:t.value}}:null}}function dz(i){return t=>fu(t.value)||!rz(t.value)?null:t.value.lengthrz(t.value)&&t.value.length>i?{maxlength:{requiredLength:i,actualLength:t.value.length}}:null}function iC(i){return null}function fz(i){return null!=i}function pz(i){const t=oy(i)?Li(i):i;if(Dee&&!L1(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 pe(-1101,e)}return t}function mz(i){let t={};return i.forEach(e=>{t=null!=e?{...t,...e}:t}),0===Object.keys(t).length?null:t}function gz(i,t){return t.map(e=>e(i))}function _z(i){return i.map(t=>function Iee(i){return!i.validate}(t)?t:e=>t.validate(e))}function vz(i){if(!i)return null;const t=i.filter(fz);return 0==t.length?null:function(e){return mz(gz(e,t))}}function _R(i){return null!=i?vz(_z(i)):null}function yz(i){if(!i)return null;const t=i.filter(fz);return 0==t.length?null:function(e){return LV(gz(e,t).map(pz)).pipe(et(mz))}}function vR(i){return null!=i?yz(_z(i)):null}function bz(i,t){return null===i?[t]:Array.isArray(i)?[...i,t]:[i,t]}function xz(i){return i._rawValidators}function wz(i){return i._rawAsyncValidators}function yR(i){return i?Array.isArray(i)?i:[i]:[]}function rC(i,t){return Array.isArray(i)?i.includes(t):i===t}function Mz(i,t){const e=yR(t);return yR(i).forEach(r=>{rC(e,r)||e.push(r)}),e}function Cz(i,t){return yR(t).filter(e=>!rC(i,e))}class Sz{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=_R(this._rawValidators)}_setAsyncValidators(t){this._rawAsyncValidators=t||[],this._composedAsyncValidatorFn=vR(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 lo extends Sz{get formDirective(){return null}get path(){return null}}class ec extends Sz{constructor(){super(...arguments),this._parent=null,this.name=null,this.valueAccessor=null}}class Ez{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 tc=(()=>{class i extends Ez{constructor(e){super(e)}}return i.\u0275fac=function(e){return new(e||i)(E(ec,2))},i.\u0275dir=ve({type:i,selectors:[["","formControlName",""],["","ngModel",""],["","formControl",""]],hostVars:14,hostBindings:function(e,n){2&e&&un("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:[lt]}),i})(),bR=(()=>{class i extends Ez{constructor(e){super(e)}}return i.\u0275fac=function(e){return new(e||i)(E(lo,10))},i.\u0275dir=ve({type:i,selectors:[["","formGroupName",""],["","formArrayName",""],["","ngModelGroup",""],["","formGroup",""],["form",3,"ngNoForm",""],["","ngForm",""]],hostVars:16,hostBindings:function(e,n){2&e&&un("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:[lt]}),i})();function Az(i,t){return i?`with name: '${t}'`:`at index: ${t}`}const MR=!1,ob="VALID",oC="INVALID",zm="PENDING",ab="DISABLED";function CR(i){return(aC(i)?i.validators:i)||null}function SR(i,t){return(aC(t)?t.asyncValidators:i)||null}function aC(i){return null!=i&&!Array.isArray(i)&&"object"==typeof i}function Dz(i,t,e){const n=i.controls;if(!(t?Object.keys(n):n).length)throw new pe(1e3,MR?function Oee(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 pe(1001,MR?function Fee(i,t){return`Cannot find form control ${Az(i,t)}`}(t,e):"")}function Tz(i,t,e){i._forEachChild((n,r)=>{if(void 0===e[r])throw new pe(1002,MR?function Lee(i,t){return`Must supply a value for form control ${Az(i,t)}`}(t,r):"")})}class lC{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===ob}get invalid(){return this.status===oC}get pending(){return this.status==zm}get disabled(){return this.status===ab}get enabled(){return this.status!==ab}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(Mz(t,this._rawValidators))}addAsyncValidators(t){this.setAsyncValidators(Mz(t,this._rawAsyncValidators))}removeValidators(t){this.setValidators(Cz(t,this._rawValidators))}removeAsyncValidators(t){this.setAsyncValidators(Cz(t,this._rawAsyncValidators))}hasValidator(t){return rC(this._rawValidators,t)}hasAsyncValidator(t){return rC(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=ab,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=ob,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===ob||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()?ab:ob}_runValidator(){return this.validator?this.validator(this):null}_runAsyncValidator(t){if(this.asyncValidator){this.status=zm,this._hasOwnPendingAsyncValidator=!0;const e=pz(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 We,this.statusChanges=new We}_calculateStatus(){return this._allControlsDisabled()?ab:this.errors?oC:this._hasOwnPendingAsyncValidator||this._anyControlsHaveStatus(zm)?zm:this._anyControlsHaveStatus(oC)?oC:ob}_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){aC(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 Nee(i){return Array.isArray(i)?_R(i):i||null}(this._rawValidators)}_assignAsyncValidators(t){this._rawAsyncValidators=Array.isArray(t)?t.slice():t,this._composedAsyncValidatorFn=function Bee(i){return Array.isArray(i)?vR(i):i||null}(this._rawAsyncValidators)}}class Hm extends lC{constructor(t,e,n){super(CR(e),SR(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={}){Tz(this,!0,t),Object.keys(t).forEach(n=>{Dz(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 Iz extends Hm{}const Hh=new me("CallSetDisabledState",{providedIn:"root",factory:()=>lb}),lb="always";function cC(i,t){return[...t.path,i]}function cb(i,t,e=lb){ER(i,t),t.valueAccessor.writeValue(i.value),(i.disabled||"always"===e)&&t.valueAccessor.setDisabledState?.(i.disabled),function Vee(i,t){t.valueAccessor.registerOnChange(e=>{i._pendingValue=e,i._pendingChange=!0,i._pendingDirty=!0,"change"===i.updateOn&&Rz(i,t)})}(i,t),function Hee(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 zee(i,t){t.valueAccessor.registerOnTouched(()=>{i._pendingTouched=!0,"blur"===i.updateOn&&i._pendingChange&&Rz(i,t),"submit"!==i.updateOn&&i.markAsTouched()})}(i,t),function Uee(i,t){if(t.valueAccessor.setDisabledState){const e=n=>{t.valueAccessor.setDisabledState(n)};i.registerOnDisabledChange(e),t._registerOnDestroy(()=>{i._unregisterOnDisabledChange(e)})}}(i,t)}function dC(i,t,e=!0){const n=()=>{};t.valueAccessor&&(t.valueAccessor.registerOnChange(n),t.valueAccessor.registerOnTouched(n)),hC(i,t),i&&(t._invokeOnDestroyCallbacks(),i._registerOnCollectionChange(()=>{}))}function uC(i,t){i.forEach(e=>{e.registerOnValidatorChange&&e.registerOnValidatorChange(t)})}function ER(i,t){const e=xz(i);null!==t.validator?i.setValidators(bz(e,t.validator)):"function"==typeof e&&i.setValidators([e]);const n=wz(i);null!==t.asyncValidator?i.setAsyncValidators(bz(n,t.asyncValidator)):"function"==typeof n&&i.setAsyncValidators([n]);const r=()=>i.updateValueAndValidity();uC(t._rawValidators,r),uC(t._rawAsyncValidators,r)}function hC(i,t){let e=!1;if(null!==i){if(null!==t.validator){const r=xz(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=wz(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 uC(t._rawValidators,n),uC(t._rawAsyncValidators,n),e}function Rz(i,t){i._pendingDirty&&i.markAsDirty(),i.setValue(i._pendingValue,{emitModelToViewChange:!1}),t.viewToModelUpdate(i._pendingValue),i._pendingChange=!1}function kz(i,t){ER(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 Pz(i,t){i._syncPendingControls(),t.forEach(e=>{const n=e.control;"submit"===n.updateOn&&n._pendingChange&&(e.viewToModelUpdate(n._pendingValue),n._pendingChange=!1)})}function TR(i,t){if(!t)return null;let e,n,r;return Array.isArray(t),t.forEach(s=>{s.constructor===gl?e=s:function Wee(i){return Object.getPrototypeOf(i.constructor)===zh}(s)?n=s:r=s}),r||n||e||null}const Yee={provide:lo,useExisting:Gn(()=>ub)},db=(()=>Promise.resolve())();let ub=(()=>{class i extends lo{constructor(e,n,r){super(),this.callSetDisabledState=r,this.submitted=!1,this._directives=new Set,this.ngSubmit=new We,this.form=new Hm({},_R(e),vR(n))}ngAfterViewInit(){this._setUpdateStrategy()}get formDirective(){return this}get control(){return this.form}get path(){return[]}get controls(){return this.form.controls}addControl(e){db.then(()=>{const n=this._findContainer(e.path);e.control=n.registerControl(e.name,e.control),cb(e.control,e,this.callSetDisabledState),e.control.updateValueAndValidity({emitEvent:!1}),this._directives.add(e)})}getControl(e){return this.form.get(e.path)}removeControl(e){db.then(()=>{const n=this._findContainer(e.path);n&&n.removeControl(e.name),this._directives.delete(e)})}addFormGroup(e){db.then(()=>{const n=this._findContainer(e.path),r=new Hm({});kz(r,e),n.registerControl(e.name,r),r.updateValueAndValidity({emitEvent:!1})})}removeFormGroup(e){db.then(()=>{const n=this._findContainer(e.path);n&&n.removeControl(e.name)})}getFormGroup(e){return this.form.get(e.path)}updateModel(e,n){db.then(()=>{this.form.get(e.path).setValue(n)})}setValue(e){this.control.setValue(e)}onSubmit(e){return this.submitted=!0,Pz(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)(E(Yr,10),E(pu,10),E(Hh,8))},i.\u0275dir=ve({type:i,selectors:[["form",3,"ngNoForm","",3,"formGroup",""],["ng-form"],["","ngForm",""]],hostBindings:function(e,n){1&e&&Ue("submit",function(s){return n.onSubmit(s)})("reset",function(){return n.onReset()})},inputs:{options:["ngFormOptions","options"]},outputs:{ngSubmit:"ngSubmit"},exportAs:["ngForm"],features:[Dn([Yee]),lt]}),i})();function Oz(i,t){const e=i.indexOf(t);e>-1&&i.splice(e,1)}function Fz(i){return"object"==typeof i&&null!==i&&2===Object.keys(i).length&&"value"in i&&"disabled"in i}const nc=class extends lC{constructor(t=null,e,n){super(CR(e),SR(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}),aC(e)&&(e.nonNullable||e.initialValueIsDefault)&&(this.defaultValue=Fz(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){Oz(this._onChange,t)}registerOnDisabledChange(t){this._onDisabledChange.push(t)}_unregisterOnDisabledChange(t){Oz(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){Fz(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}},Kee={provide:ec,useExisting:Gn(()=>Kc)},Bz=(()=>Promise.resolve())();let Kc=(()=>{class i extends ec{constructor(e,n,r,s,o,a){super(),this._changeDetectorRef=o,this.callSetDisabledState=a,this.control=new nc,this._registered=!1,this.update=new We,this._parent=e,this._setValidators(n),this._setAsyncValidators(r),this.valueAccessor=TR(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(){cb(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){Bz.then(()=>{this.control.setValue(e,{emitViewToModelChange:!1}),this._changeDetectorRef?.markForCheck()})}_updateDisabled(e){const n=e.isDisabled.currentValue,r=0!==n&&function um(i){return"boolean"==typeof i?i:null!=i&&"false"!==i}(n);Bz.then(()=>{r&&!this.control.disabled?this.control.disable():!r&&this.control.disabled&&this.control.enable(),this._changeDetectorRef?.markForCheck()})}_getPath(e){return this._parent?cC(e,this._parent):[e]}}return i.\u0275fac=function(e){return new(e||i)(E(lo,9),E(Yr,10),E(pu,10),E(To,10),E(Zn,8),E(Hh,8))},i.\u0275dir=ve({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:[Dn([Kee]),lt,bi]}),i})(),IR=(()=>{class i{}return i.\u0275fac=function(e){return new(e||i)},i.\u0275dir=ve({type:i,selectors:[["form",3,"ngNoForm","",3,"ngNativeValidate",""]],hostAttrs:["novalidate",""]}),i})();const Zee={provide:To,useExisting:Gn(()=>mu),multi:!0};let mu=(()=>{class i extends zh{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=ri(i)))(n||i)}}(),i.\u0275dir=ve({type:i,selectors:[["input","type","number","formControlName",""],["input","type","number","formControl",""],["input","type","number","ngModel",""]],hostBindings:function(e,n){1&e&&Ue("input",function(s){return n.onChange(s.target.value)})("blur",function(){return n.onTouched()})},features:[Dn([Zee]),lt]}),i})(),Uz=(()=>{class i{}return i.\u0275fac=function(e){return new(e||i)},i.\u0275mod=nn({type:i}),i.\u0275inj=Kt({}),i})();const RR=new me("NgModelWithFormControlWarning"),nte={provide:lo,useExisting:Gn(()=>Gh)};let Gh=(()=>{class i extends lo{constructor(e,n,r){super(),this.callSetDisabledState=r,this.submitted=!1,this._onCollectionChange=()=>this._updateDomValue(),this.directives=[],this.form=null,this.ngSubmit=new We,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&&(hC(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 cb(n,e,this.callSetDisabledState),n.updateValueAndValidity({emitEvent:!1}),this.directives.push(e),n}getControl(e){return this.form.get(e.path)}removeControl(e){dC(e.control||null,e,!1),function jee(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,Pz(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&&(dC(n||null,e),(i=>i instanceof nc)(r)&&(cb(r,e,this.callSetDisabledState),e.control=r))}),this.form._updateTreeValidity({emitEvent:!1})}_setUpFormContainer(e){const n=this.form.get(e.path);kz(n,e),n.updateValueAndValidity({emitEvent:!1})}_cleanUpFormContainer(e){if(this.form){const n=this.form.get(e.path);n&&function Gee(i,t){return hC(i,t)}(n,e)&&n.updateValueAndValidity({emitEvent:!1})}}_updateRegistrations(){this.form._registerOnCollectionChange(this._onCollectionChange),this._oldForm&&this._oldForm._registerOnCollectionChange(()=>{})}_updateValidators(){ER(this.form,this),this._oldForm&&hC(this._oldForm,this)}_checkFormPresent(){}}return i.\u0275fac=function(e){return new(e||i)(E(Yr,10),E(pu,10),E(Hh,8))},i.\u0275dir=ve({type:i,selectors:[["","formGroup",""]],hostBindings:function(e,n){1&e&&Ue("submit",function(s){return n.onSubmit(s)})("reset",function(){return n.onReset()})},inputs:{form:["formGroup","form"]},outputs:{ngSubmit:"ngSubmit"},exportAs:["ngForm"],features:[Dn([nte]),lt,bi]}),i})();const ste={provide:ec,useExisting:Gn(()=>fC)};let fC=(()=>{class i extends ec{set isDisabled(e){}constructor(e,n,r,s,o){super(),this._ngModelWarningConfig=o,this._added=!1,this.update=new We,this._ngModelWarningSent=!1,this._parent=e,this._setValidators(n),this._setAsyncValidators(r),this.valueAccessor=TR(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 cC(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)(E(lo,13),E(Yr,10),E(pu,10),E(To,10),E(RR,8))},i.\u0275dir=ve({type:i,selectors:[["","formControlName",""]],inputs:{name:["formControlName","name"],isDisabled:["disabled","isDisabled"],model:["ngModel","model"]},outputs:{update:"ngModelChange"},features:[Dn([ste]),lt,bi]}),i})();function jz(i){return"number"==typeof i?i:parseInt(i,10)}function Yz(i){return"number"==typeof i?i:parseFloat(i)}let $h=(()=>{class i{constructor(){this._validator=iC}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):iC,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=ve({type:i,features:[bi]}),i})();const hte={provide:Yr,useExisting:Gn(()=>gu),multi:!0};let gu=(()=>{class i extends $h{constructor(){super(...arguments),this.inputName="max",this.normalizeInput=e=>Yz(e),this.createValidator=e=>oz(e)}}return i.\u0275fac=function(){let t;return function(n){return(t||(t=ri(i)))(n||i)}}(),i.\u0275dir=ve({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&&Dt("max",n._enabled?n.max:null)},inputs:{max:"max"},features:[Dn([hte]),lt]}),i})();const fte={provide:Yr,useExisting:Gn(()=>_u),multi:!0};let _u=(()=>{class i extends $h{constructor(){super(...arguments),this.inputName="min",this.normalizeInput=e=>Yz(e),this.createValidator=e=>sz(e)}}return i.\u0275fac=function(){let t;return function(n){return(t||(t=ri(i)))(n||i)}}(),i.\u0275dir=ve({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&&Dt("min",n._enabled?n.min:null)},inputs:{min:"min"},features:[Dn([fte]),lt]}),i})();const _te={provide:Yr,useExisting:Gn(()=>NR),multi:!0};let NR=(()=>{class i extends $h{constructor(){super(...arguments),this.inputName="minlength",this.normalizeInput=e=>jz(e),this.createValidator=e=>dz(e)}}return i.\u0275fac=function(){let t;return function(n){return(t||(t=ri(i)))(n||i)}}(),i.\u0275dir=ve({type:i,selectors:[["","minlength","","formControlName",""],["","minlength","","formControl",""],["","minlength","","ngModel",""]],hostVars:1,hostBindings:function(e,n){2&e&&Dt("minlength",n._enabled?n.minlength:null)},inputs:{minlength:"minlength"},features:[Dn([_te]),lt]}),i})();const vte={provide:Yr,useExisting:Gn(()=>BR),multi:!0};let BR=(()=>{class i extends $h{constructor(){super(...arguments),this.inputName="maxlength",this.normalizeInput=e=>jz(e),this.createValidator=e=>uz(e)}}return i.\u0275fac=function(){let t;return function(n){return(t||(t=ri(i)))(n||i)}}(),i.\u0275dir=ve({type:i,selectors:[["","maxlength","","formControlName",""],["","maxlength","","formControl",""],["","maxlength","","ngModel",""]],hostVars:1,hostBindings:function(e,n){2&e&&Dt("maxlength",n._enabled?n.maxlength:null)},inputs:{maxlength:"maxlength"},features:[Dn([vte]),lt]}),i})(),Zz=(()=>{class i{}return i.\u0275fac=function(e){return new(e||i)},i.\u0275mod=nn({type:i}),i.\u0275inj=Kt({imports:[Uz]}),i})();class Qz extends lC{constructor(t,e,n){super(CR(e),SR(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={}){Tz(this,!1,t),t.forEach((n,r)=>{Dz(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 Jz(i){return!!i&&(void 0!==i.asyncValidators||void 0!==i.validators||void 0!==i.updateOn)}let bte=(()=>{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 Jz(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 Iz(r,n)}control(e,n,r){let s={};return this.useNonNullable?(Jz(n)?s=n:(s.validators=n,s.asyncValidators=r),new nc(e,{...s,nonNullable:!0})):new nc(e,n,r)}array(e,n,r){const s=e.map(o=>this._createControl(o));return new Qz(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 nc||e instanceof lC?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=ke({token:i,factory:i.\u0275fac,providedIn:"root"}),i})(),eH=(()=>{class i{static withConfig(e){return{ngModule:i,providers:[{provide:Hh,useValue:e.callSetDisabledState??lb}]}}}return i.\u0275fac=function(e){return new(e||i)},i.\u0275mod=nn({type:i}),i.\u0275inj=Kt({imports:[Zz]}),i})(),tH=(()=>{class i{static withConfig(e){return{ngModule:i,providers:[{provide:RR,useValue:e.warnOnNgModelWithFormControl??"always"},{provide:Hh,useValue:e.callSetDisabledState??lb}]}}}return i.\u0275fac=function(e){return new(e||i)},i.\u0275mod=nn({type:i}),i.\u0275inj=Kt({imports:[Zz]}),i})();const xte=["matFormFieldNotchedOutline",""],wte=["*"],Mte=["textField"],Cte=["iconPrefixContainer"],Ste=["textPrefixContainer"];function Ete(i,t){1&i&&De(0,"span",19)}function Ate(i,t){if(1&i){const e=di();W(0,"label",17),Ue("cdkObserveContent",function(){return an(e),zt(he(2)._refreshOutlineNotchWidth())}),Wt(1,1),fe(2,Ete,1,0,"span",18),j()}if(2&i){const e=he(2);U("floating",e._shouldLabelFloat())("cdkObserveContentDisabled",!e._hasOutline())("id",e._labelId),Dt("for",e._control.id)("aria-owns",e._control.id),G(2),U("ngIf",!e.hideRequiredMarker&&e._control.required)}}function Dte(i,t){1&i&&fe(0,Ate,3,6,"label",16),2&i&&U("ngIf",he()._hasFloatingLabel())}function Tte(i,t){1&i&&De(0,"div",20)}function Ite(i,t){}function Rte(i,t){1&i&&fe(0,Ite,0,0,"ng-template",22),2&i&&(he(2),U("ngTemplateOutlet",Ki(1)))}function kte(i,t){if(1&i&&(W(0,"div",21),fe(1,Rte,1,1,"ng-template",9),j()),2&i){const e=he();U("matFormFieldNotchedOutlineOpen",e._shouldLabelFloat())("matFormFieldNotchedOutlineLabelWidth",e._labelWidth),G(1),U("ngIf",!e._forceDisplayInfixLabel())}}function Pte(i,t){1&i&&(W(0,"div",23,24),Wt(2,2),j())}function Ote(i,t){1&i&&(W(0,"div",25,26),Wt(2,3),j())}function Fte(i,t){}function Lte(i,t){1&i&&fe(0,Fte,0,0,"ng-template",22),2&i&&(he(),U("ngTemplateOutlet",Ki(1)))}function Nte(i,t){1&i&&(W(0,"div",27),Wt(1,4),j())}function Bte(i,t){1&i&&(W(0,"div",28),Wt(1,5),j())}function Ute(i,t){1&i&&De(0,"div",29)}function Vte(i,t){1&i&&(W(0,"div",30),Wt(1,6),j()),2&i&&U("@transitionMessages",he()._subscriptAnimationState)}function zte(i,t){if(1&i&&(W(0,"mat-hint",34),Ve(1),j()),2&i){const e=he(2);U("id",e._hintLabelId),G(1),_i(e.hintLabel)}}function Hte(i,t){if(1&i&&(W(0,"div",31),fe(1,zte,2,2,"mat-hint",32),Wt(2,7),De(3,"div",33),Wt(4,8),j()),2&i){const e=he();U("@transitionMessages",e._subscriptAnimationState),G(1),U("ngIf",e.hintLabel)}}const Gte=["*",[["mat-label"]],[["","matPrefix",""],["","matIconPrefix",""]],[["","matTextPrefix",""]],[["","matTextSuffix",""]],[["","matSuffix",""],["","matIconSuffix",""]],[["mat-error"],["","matError",""]],[["mat-hint",3,"align","end"]],[["mat-hint","align","end"]]],$te=["*","mat-label","[matPrefix], [matIconPrefix]","[matTextPrefix]","[matTextSuffix]","[matSuffix], [matIconSuffix]","mat-error, [matError]","mat-hint:not([align='end'])","mat-hint[align='end']"];let Io=(()=>{class i{}return i.\u0275fac=function(e){return new(e||i)},i.\u0275dir=ve({type:i,selectors:[["mat-label"]]}),i})(),Wte=0;const nH=new me("MatError");let jte=(()=>{class i{constructor(e,n){this.id="mat-mdc-error-"+Wte++,e||n.nativeElement.setAttribute("aria-live","polite")}}return i.\u0275fac=function(e){return new(e||i)(ba("aria-live"),E(mt))},i.\u0275dir=ve({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&&Yl("id",n.id)},inputs:{id:"id"},features:[Dn([{provide:nH,useExisting:i}])]}),i})(),Yte=0,iH=(()=>{class i{constructor(){this.align="start",this.id="mat-mdc-hint-"+Yte++}}return i.\u0275fac=function(e){return new(e||i)},i.\u0275dir=ve({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&&(Yl("id",n.id),Dt("align",null),un("mat-mdc-form-field-hint-end","end"===n.align))},inputs:{align:"align",id:"id"}}),i})();const rH=new me("MatPrefix");let qte=(()=>{class i{constructor(){this._isText=!1}set _isTextSelector(e){this._isText=!0}}return i.\u0275fac=function(e){return new(e||i)},i.\u0275dir=ve({type:i,selectors:[["","matPrefix",""],["","matIconPrefix",""],["","matTextPrefix",""]],inputs:{_isTextSelector:["matTextPrefix","_isTextSelector"]},features:[Dn([{provide:rH,useExisting:i}])]}),i})();const sH=new me("MatSuffix");let Xte=(()=>{class i{constructor(){this._isText=!1}set _isTextSelector(e){this._isText=!0}}return i.\u0275fac=function(e){return new(e||i)},i.\u0275dir=ve({type:i,selectors:[["","matSuffix",""],["","matIconSuffix",""],["","matTextSuffix",""]],inputs:{_isTextSelector:["matTextSuffix","_isTextSelector"]},features:[Dn([{provide:sH,useExisting:i}])]}),i})(),oH=(()=>{class i{constructor(e){this._elementRef=e,this.floating=!1}getWidth(){return function Kte(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)(E(mt))},i.\u0275dir=ve({type:i,selectors:[["label","matFormFieldFloatingLabel",""]],hostAttrs:[1,"mdc-floating-label","mat-mdc-floating-label"],hostVars:2,hostBindings:function(e,n){2&e&&un("mdc-floating-label--float-above",n.floating)},inputs:{floating:"floating"}}),i})();const aH="mdc-line-ripple--active",pC="mdc-line-ripple--deactivating";let lH=(()=>{class i{constructor(e,n){this._elementRef=e,this._handleTransitionEnd=r=>{const s=this._elementRef.nativeElement.classList,o=s.contains(pC);"opacity"===r.propertyName&&o&&s.remove(aH,pC)},n.runOutsideAngular(()=>{e.nativeElement.addEventListener("transitionend",this._handleTransitionEnd)})}activate(){const e=this._elementRef.nativeElement.classList;e.remove(pC),e.add(aH)}deactivate(){this._elementRef.nativeElement.classList.add(pC)}ngOnDestroy(){this._elementRef.nativeElement.removeEventListener("transitionend",this._handleTransitionEnd)}}return i.\u0275fac=function(e){return new(e||i)(E(mt),E(ft))},i.\u0275dir=ve({type:i,selectors:[["div","matFormFieldLineRipple",""]],hostAttrs:[1,"mdc-line-ripple"]}),i})(),cH=(()=>{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)(E(mt),E(ft))},i.\u0275cmp=ot({type:i,selectors:[["div","matFormFieldNotchedOutline",""]],hostAttrs:[1,"mdc-notched-outline"],hostVars:2,hostBindings:function(e,n){2&e&&un("mdc-notched-outline--notched",n.open)},inputs:{labelWidth:["matFormFieldNotchedOutlineLabelWidth","labelWidth"],open:["matFormFieldNotchedOutlineOpen","open"]},attrs:xte,ngContentSelectors:wte,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&&(sr(),De(0,"div",0),W(1,"div",1),Wt(2),j(),De(3,"div",2)),2&e&&(G(1),Yo("width",n._getNotchWidth()))},encapsulation:2,changeDetection:0}),i})();const Zte={transitionMessages:ka("transitionMessages",[Ps("enter",si({opacity:1,transform:"translateY(0%)"})),Pr("void => enter",[si({opacity:0,transform:"translateY(-5px)"}),jr("300ms cubic-bezier(0.55, 0, 0.55, 0.2)")])])};let UR=(()=>{class i{}return i.\u0275fac=function(e){return new(e||i)},i.\u0275dir=ve({type:i}),i})();const mC=new me("MatFormField"),Qte=new me("MAT_FORM_FIELD_DEFAULT_OPTIONS");let dH=0,vl=(()=>{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-"+dH++,this._hintLabelId="mat-mdc-hint-"+dH++,this._subscriptAnimationState="",this._labelWidth=0,this._destroyed=new Re,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(He(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(),Mr(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(He(this._destroyed)).subscribe(()=>{this._needsOutlineLabelOffsetUpdateOnStable&&(this._needsOutlineLabelOffsetUpdateOnStable=!1,this._updateOutlineLabelOffset())})}),this._dir.change.pipe(He(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)(E(mt),E(Zn),E(ft),E(Ra),E(Vi),E(Qte,8),E(Rr,8),E(jt))},i.\u0275cmp=ot({type:i,selectors:[["mat-form-field"]],contentQueries:function(e,n,r){if(1&e&&($i(r,Io,5),$i(r,Io,7),$i(r,UR,5),$i(r,rH,5),$i(r,sH,5),$i(r,nH,5),$i(r,iH,5)),2&e){let s;Et(s=At())&&(n._labelChildNonStatic=s.first),Et(s=At())&&(n._labelChildStatic=s.first),Et(s=At())&&(n._formFieldControl=s.first),Et(s=At())&&(n._prefixChildren=s),Et(s=At())&&(n._suffixChildren=s),Et(s=At())&&(n._errorChildren=s),Et(s=At())&&(n._hintChildren=s)}},viewQuery:function(e,n){if(1&e&&(Wn(Mte,5),Wn(Cte,5),Wn(Ste,5),Wn(oH,5),Wn(cH,5),Wn(lH,5)),2&e){let r;Et(r=At())&&(n._textField=r.first),Et(r=At())&&(n._iconPrefixContainer=r.first),Et(r=At())&&(n._textPrefixContainer=r.first),Et(r=At())&&(n._floatingLabel=r.first),Et(r=At())&&(n._notchedOutline=r.first),Et(r=At())&&(n._lineRipple=r.first)}},hostAttrs:[1,"mat-mdc-form-field"],hostVars:42,hostBindings:function(e,n){2&e&&un("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:[Dn([{provide:mC,useExisting:i}])],ngContentSelectors:$te,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&&(sr(Gte),fe(0,Dte,1,1,"ng-template",null,0,Vc),W(2,"div",1,2),Ue("click",function(s){return n._control.onContainerClick&&n._control.onContainerClick(s)}),fe(4,Tte,1,0,"div",3),W(5,"div",4),fe(6,kte,2,3,"div",5),fe(7,Pte,3,0,"div",6),fe(8,Ote,3,0,"div",7),W(9,"div",8),fe(10,Lte,1,1,"ng-template",9),Wt(11),j(),fe(12,Nte,2,0,"div",10),fe(13,Bte,2,0,"div",11),j(),fe(14,Ute,1,0,"div",12),j(),W(15,"div",13),fe(16,Vte,2,1,"div",14),fe(17,Hte,5,2,"div",15),j()),2&e&&(G(2),un("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),G(2),U("ngIf",!n._hasOutline()&&!n._control.disabled),G(2),U("ngIf",n._hasOutline()),G(1),U("ngIf",n._hasIconPrefix),G(1),U("ngIf",n._hasTextPrefix),G(2),U("ngIf",!n._hasOutline()||n._forceDisplayInfixLabel()),G(2),U("ngIf",n._hasTextSuffix),G(1),U("ngIf",n._hasIconSuffix),G(1),U("ngIf",!n._hasOutline()),G(1),un("mat-mdc-form-field-subscript-dynamic-size","dynamic"===n.subscriptSizing),U("ngSwitch",n._getDisplayedMessages()),G(1),U("ngSwitchCase","error"),G(1),U("ngSwitchCase","hint"))},dependencies:[vi,xy,by,VT,CU,iH,oH,cH,lH],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:[Zte.transitionMessages]},changeDetection:0}),i})(),gC=(()=>{class i{}return i.\u0275fac=function(e){return new(e||i)},i.\u0275mod=nn({type:i}),i.\u0275inj=Kt({imports:[Qn,Ao,HI,Qn]}),i})();const fH=Oh({passive:!0});let tne=(()=>{class i{constructor(e,n){this._platform=e,this._ngZone=n,this._monitoredElements=new Map}monitor(e){if(!this._platform.isBrowser)return mo;const n=Yc(e),r=this._monitoredElements.get(n);if(r)return r.subject;const s=new Re,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,fH),n.classList.add("cdk-text-field-autofill-monitored")}),this._monitoredElements.set(n,{subject:s,unlisten:()=>{n.removeEventListener("animationstart",a,fH)}}),s}stopMonitoring(e){const n=Yc(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)(ee(Vi),ee(ft))},i.\u0275prov=ke({token:i,factory:i.\u0275fac,providedIn:"root"}),i})(),nne=(()=>{class i{}return i.\u0275fac=function(e){return new(e||i)},i.\u0275mod=nn({type:i}),i.\u0275inj=Kt({}),i})();const VR=new me("MAT_INPUT_VALUE_ACCESSOR"),ine=["button","checkbox","file","hidden","image","radio","range","reset","submit"];let rne=0;const sne=$U(class{constructor(i,t,e,n){this._defaultErrorStateMatcher=i,this._parentForm=t,this._parentFormGroup=e,this.ngControl=n,this.stateChanges=new Re}});let ic=(()=>{class i extends sne{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(_l.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&&oU().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,d,h){super(a,s,o,r),this._elementRef=e,this._platform=n,this._autofillMonitor=c,this._formField=h,this._uid="mat-input-"+rne++,this.focused=!1,this.stateChanges=new Re,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=>oU().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&&d.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(){ine.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)(E(mt),E(Vi),E(ec,10),E(ub,8),E(Gh,8),E(jU),E(VR,10),E(tne),E(ft),E(mC,8))},i.\u0275dir=ve({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&&Ue("focus",function(){return n._focusChanged(!0)})("blur",function(){return n._focusChanged(!1)})("input",function(){return n._onInput()}),2&e&&(Yl("id",n.id)("disabled",n.disabled)("required",n.required),Dt("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),un("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:[Dn([{provide:UR,useExisting:i}]),lt,bi]}),i})(),pH=(()=>{class i{}return i.\u0275fac=function(e){return new(e||i)},i.\u0275mod=nn({type:i}),i.\u0275inj=Kt({imports:[Qn,gC,gC,nne,Qn]}),i})();function one(i,t){if(1&i&&(W(0,"mat-label"),Ve(1),j()),2&i){const e=he(2);G(1),_i(e.resource.name)}}function ane(i,t){if(1&i){const e=di();W(0,"mat-form-field",1),fe(1,one,2,1,"mat-label",2),W(2,"input",3),Ue("ngModelChange",function(r){return an(e),zt(he().resource.data=r)})("change",function(){return an(e),zt(he().changed.emit())}),j()()}if(2&i){const e=he();U("matTooltip",e.resourceDescription),G(1),U("ngIf",e.resource.name),G(1),U("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 lne=(()=>{class i{constructor(){this.resource=null,this.resourceDescription="",this.disabled=!1,this.changed=new We}}return i.\u0275fac=function(e){return new(e||i)},i.\u0275cmp=ot({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&&fe(0,ane,3,7,"mat-form-field",0),2&e&&U("ngIf",n.resource)},dependencies:[vi,gl,mu,tc,_u,gu,Kc,vl,Io,ic,Os],changeDetection:0}),i})();function cne(i,t){if(1&i&&(W(0,"mat-label"),Ve(1),j()),2&i){const e=he(2);G(1),_i(e.resource.name)}}function dne(i,t){if(1&i){const e=di();W(0,"mat-form-field",1),fe(1,cne,2,1,"mat-label",2),W(2,"input",3),Ue("ngModelChange",function(r){return an(e),zt(he().resource.data=r)})("change",function(){return an(e),zt(he().changed.emit())}),j()()}if(2&i){const e=he();U("matTooltip",e.resourceDescription),G(1),U("ngIf",e.resource.name),G(1),U("disabled",e.disabled||void 0!==e.resource.schema.required_value)("maxlength",e.maxLength)("minlength",e.minLength)("ngModel",e.resource.data)}}let mH=(()=>{class i{constructor(){this._resource=null,this.resourceDescription="",this.disabled=!1,this.changed=new We,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=ot({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&&fe(0,dne,3,6,"mat-form-field",0),2&e&&U("ngIf",n.resource)},dependencies:[vi,gl,tc,NR,BR,Kc,vl,Io,ic,Os],changeDetection:0}),i})();const rc=(i,t)=>i+(i.includes("__")?"/":"__")+t,Wh=function(){return[]};function une(i,t){if(1&i&&(W(0,"mat-panel-description"),Ve(1," Click to view items ("),W(2,"b"),Ve(3),j(),Ve(4,") "),j()),2&i){const e=he(2);G(3),_i((e.resourceData||oo(1,Wh)).length)}}function hne(i,t){1&i&&(W(0,"mat-panel-description"),Ve(1," Empty array "),j())}function fne(i,t){}function pne(i,t){if(1&i){const e=di();W(0,"mat-expansion-panel",4),Ue("opened",function(){return an(e),zt(he().onContentsTrigger(!0))})("closed",function(){return an(e),zt(he().onContentsTrigger(!1))}),W(1,"mat-expansion-panel-header",5)(2,"mat-panel-title"),Ve(3),j(),fe(4,une,5,2,"mat-panel-description",1),fe(5,hne,2,0,"mat-panel-description",1),j(),fe(6,fne,0,0,"ng-template",6),j()}if(2&i){const e=he(),n=Ki(3);G(1),U("matTooltip",e.resourceDescription),G(2),Zi(" ",e.name," "),G(1),U("ngIf",(e.resourceData||oo(5,Wh)).length>0),G(1),U("ngIf",0==(e.resourceData||oo(6,Wh)).length),G(1),U("ngTemplateOutlet",n)}}function mne(i,t){}function gne(i,t){if(1&i&&(Gr(0),W(1,"h2",5),Ve(2),j(),W(3,"div",7),fe(4,mne,0,0,"ng-template",6),j(),$r()),2&i){const e=he(),n=Ki(3);G(1),U("matTooltip",e.resourceDescription),G(1),_i(e.name),G(2),U("ngTemplateOutlet",n)}}function _ne(i,t){}function vne(i,t){if(1&i&&De(0,"app-editor",10),2&i){const e=he().$implicit,n=he(3);U("resource",n.children[n.pageIndex*n.pageSize+e])("disabled",n.disabled)}}function yne(i,t){if(1&i&&(Gr(0),fe(1,vne,1,2,"app-editor",9),$r()),2&i){const e=t.$implicit,n=he(3);G(1),U("ngIf",n.pageIndex*n.pageSize+e0)}let zR=(()=>{class i{constructor(e,n){this.main=e,this.cdr=n,this._resource=null,this.resourceDescription="",this.disabled=!1,this.changed=new We,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 Re}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:rc(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(He(this.destroyed$),gn(([n,r])=>!!this.resource&&n.startsWith(this.resource.id)&&!n.substring(this.resource.id.length+1).includes("/"))).subscribe(function(){var n=tt(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 gt(null),this.imageUrl$=new gt(null),this.destroyed$=new Re,this.changed=new We}set resource(e){this._resource$.next(e)}get resource(){return this._resource$.getValue()}ngAfterViewInit(){var e=this;return tt(function*(){e._resource$.pipe(He(e.destroyed$)).subscribe(function(){var n=tt(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)(E(Ql),E(Pa))},i.\u0275cmp=ot({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&&(De(0,"app-compound-block-ui",0),Ct(1,"async"),fe(2,Dne,2,3,"img",1),Ct(3,"async")),2&e&&(U("resource",Tt(1,3,n._resource$))("fieldBlacklist",oo(7,Tne)),G(2),U("ngIf",Tt(3,5,n.imageUrl$)))},dependencies:[vi,Jl,pl],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 Rne=["*"],Lne=new me("MAT_CARD_CONFIG");let gH=(()=>{class i{constructor(e){this.appearance=e?.appearance||"raised"}}return i.\u0275fac=function(e){return new(e||i)(E(Lne,8))},i.\u0275cmp=ot({type:i,selectors:[["mat-card"]],hostAttrs:[1,"mat-mdc-card","mdc-card"],hostVars:4,hostBindings:function(e,n){2&e&&un("mat-mdc-card-outlined","outlined"===n.appearance)("mdc-card--outlined","outlined"===n.appearance)},inputs:{appearance:"appearance"},exportAs:["matCard"],ngContentSelectors:Rne,decls:1,vars:0,template:function(e,n){1&e&&(sr(),Wt(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})(),_H=(()=>{class i{}return i.\u0275fac=function(e){return new(e||i)},i.\u0275mod=nn({type:i}),i.\u0275inj=Kt({imports:[Qn,Ao,Qn]}),i})();class HR{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 Re,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 GR=(()=>{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=ke({token:i,factory:i.\u0275fac,providedIn:"root"}),i})(),aie=(()=>{class i{}return i.\u0275fac=function(e){return new(e||i)},i.\u0275mod=nn({type:i}),i.\u0275inj=Kt({imports:[Qn,Ao,eb,Qn]}),i})();const MH={transformPanel:ka("transformPanel",[Pr("void => enter-dropdown",jr("120ms cubic-bezier(0, 0, 0.2, 1)",rV([si({opacity:0,transform:"scale(1, 0.8)"}),si({opacity:1,transform:"scale(1, 1)"})]))),Pr("void => enter-dialog",jr("150ms cubic-bezier(0, 0, 0.2, 1)",rV([si({opacity:0,transform:"scale(0.7)"}),si({transform:"none",opacity:1})]))),Pr("* => void",jr("100ms linear",si({opacity:0})))]),fadeInCalendar:ka("fadeInCalendar",[Ps("void",si({opacity:0})),Ps("enter",si({opacity:1})),Pr("void => *",jr("120ms 100ms cubic-bezier(0.55, 0, 0.55, 0.2)"))])},EH=function(i){return{active:i}};function Sie(i,t){if(1&i){const e=di();W(0,"button",2),Ue("click",function(){const s=an(e).$implicit;return zt(he().select(s))}),j()}if(2&i){const e=t.$implicit,n=he();Yo("background-color",e),U("ngClass",sm(3,EH,n.selectedColor===e))}}function Eie(i,t){if(1&i){const e=di();W(0,"button",2),Ue("click",function(){const s=an(e).$implicit;return zt(he().select(s))}),j()}if(2&i){const e=t.$implicit,n=he();Yo("background-color",e),U("ngClass",sm(3,EH,n.selectedColor===e))}}const Aie=["button"],Die=/^\s+/,Tie=/\s+$/,$m=Math.round,Iie=(Math,Math,Math,/[^0-9]/g),AH=["#ffffff","#ffff00","#ff00ff","#ff0000","#c0c0c0","#808080","#808000","#800080","#800000","#00ffff","#00ff00","#008080","#008000","#0000ff","#000080","#000000"];function DH(i,t,e){const n=i.getImageData(t,e,1,1).data;return{r:n[0],g:n[1],b:n[2]}}function jh(i){return 1==i.length?"0"+i:""+i}function kie(i){return Math.round(255*parseFloat(i)).toString(16)}function TH(i){return Zo(i)/255}function Zo(i){return parseInt(i,16)}function IH(i,t,e,n){var r=[jh($m(i).toString(16)),jh($m(t).toString(16)),jh($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 vu="(?:[-\\+]?\\d*\\.\\d+%?)|(?:[-\\+]?\\d+%?)",jR="[\\s|\\(]+("+vu+")[,|\\s]+("+vu+")[,|\\s]+("+vu+")\\s*\\)?",YR="[\\s|\\(]+("+vu+")[,|\\s]+("+vu+")[,|\\s]+("+vu+")[,|\\s]+("+vu+")\\s*\\)?",Yh={CSS_UNIT:new RegExp(vu),rgb:new RegExp("rgb"+jR),rgba:new RegExp("rgba"+YR),hsl:new RegExp("hsl"+jR),hsla:new RegExp("hsla"+YR),hsv:new RegExp("hsv"+jR),hsva:new RegExp("hsva"+YR),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 qR(i){let t;return i=i.replace(Die,"").replace(Tie,"").toLowerCase(),(t=Yh.rgb.exec(i))?{r:t[1],g:t[2],b:t[3],a:1}:(t=Yh.rgba.exec(i))?{r:t[1],g:t[2],b:t[3],a:t[4]}:(t=Yh.hex8.exec(i))?{r:Zo(t[1]),g:Zo(t[2]),b:Zo(t[3]),a:TH(t[4])}:(t=Yh.hex6.exec(i))?{r:Zo(t[1]),g:Zo(t[2]),b:Zo(t[3]),a:1}:(t=Yh.hex4.exec(i))?{r:Zo(t[1]+""+t[1]),g:Zo(t[2]+""+t[2]),b:Zo(t[3]+""+t[3]),a:TH(t[4]+""+t[4])}:(t=Yh.hex3.exec(i))?{r:Zo(t[1]+""+t[1]),g:Zo(t[2]+""+t[2]),b:Zo(t[3]+""+t[3]),a:1}:null}class qh{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=IH(this.r,this.g,this.b),this.rgba=this.toRgba()}toHex(t){return IH(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 Rie(i,t,e,n,r){var s=[jh($m(i).toString(16)),jh($m(t).toString(16)),jh($m(e).toString(16)),jh(kie(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 RH=(()=>{class i{constructor(e,n){this.zone=e,this.colorChanged=new We,this.x=0,this.y=0,this.drag=!1,this._destroyed=new Re,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){wo()},i.\u0275dir=ve({type:i,inputs:{color:"color"},outputs:{colorChanged:"colorChanged"}}),i})(),Fie=(()=>{class i extends RH{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}=DH(this.ctx,e.offsetX,e.offsetY);this.emitChange(new qh(n,r,s))}}return i.\u0275fac=function(e){return new(e||i)(E(ft))},i.\u0275cmp=ot({type:i,selectors:[["ngx-mat-color-slider"]],features:[lt],decls:1,vars:0,consts:[["id","color-strip","width","15","height","234",1,"zone-strip",3,"mousedown","mouseup"]],template:function(e,n){1&e&&(W(0,"canvas",0),Ue("mousedown",function(s){return n.onMousedown(s)})("mouseup",function(s){return n.onMouseup(s)}),j())}}),i})(),Lie=(()=>{class i{constructor(){}onInput(e){this._formatInput(e.target)}_formatInput(e){let n=Number(e.value.replace(Iie,""));n=isNaN(n)?0:n,e.value=n}}return i.\u0275fac=function(e){return new(e||i)},i.\u0275dir=ve({type:i,selectors:[["","ngxMatNumericColorInput",""]],hostBindings:function(e,n){1&e&&Ue("input",function(s){return n.onInput(s)})}}),i})(),Bie=(()=>{class i extends RH{constructor(e){super(e,"color-block"),this.zone=e,this._resetBaseColor=!0,this.formGroup=new Hm({r:new nc(null,[_l.required]),g:new nc(null,[_l.required]),b:new nc(null,[_l.required]),a:new nc(null,[_l.required]),hex:new nc(null,[_l.required,_l.pattern(Yh.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(){Mr(this.rCtrl.valueChanges,this.gCtrl.valueChanges,this.bCtrl.valueChanges,this.aCtrl.valueChanges).pipe(He(this._destroyed),ml(400)).subscribe(r=>{const s=new qh(Number(this.rCtrl.value),Number(this.gCtrl.value),Number(this.bCtrl.value),Number(this.aCtrl.value));this.emitChange(s)}),this.hexCtrl.valueChanges.pipe(He(this._destroyed),ml(400),Zl()).subscribe(r=>{const s=qR(r);if(null!=s){const o=new qh(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}=DH(this.ctx,e.offsetX,e.offsetY);this.emitChange(new qh(n,r,s))}}return i.\u0275fac=function(e){return new(e||i)(E(ft))},i.\u0275cmp=ot({type:i,selectors:[["ngx-mat-color-canvas"]],hostAttrs:[1,"ngx-mat-color-canvas"],features:[lt,bi],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&&(W(0,"form",0)(1,"div",1)(2,"div",2)(3,"canvas",3),Ue("mousedown",function(s){return n.onMousedown(s)})("mouseup",function(s){return n.onMouseup(s)}),j(),W(4,"ngx-mat-color-slider",4),Ue("colorChanged",function(s){return n.onSliderColorChanged(s)}),j()(),W(5,"div",5)(6,"mat-form-field")(7,"mat-label"),Ve(8,"R"),j(),De(9,"input",6),j(),W(10,"mat-form-field")(11,"mat-label"),Ve(12,"G"),j(),De(13,"input",7),j(),W(14,"mat-form-field")(15,"mat-label"),Ve(16,"B"),j(),De(17,"input",8),j()()(),W(18,"div",1),De(19,"button",9),W(20,"mat-form-field")(21,"mat-label"),Ve(22,"HEX6"),j(),W(23,"mat-label",10),Ve(24,"#\xa0"),j(),De(25,"input",11),j(),W(26,"mat-form-field",12)(27,"mat-label"),Ve(28,"A"),j(),De(29,"input",13),j()()()),2&e&&(U("formGroup",n.formGroup),G(19),Yo("background-color",(null==n.color?null:n.color.rgba)||"transparent"))},dependencies:[ic,vl,Io,qte,MV,IR,gl,mu,tc,bR,_u,gu,Gh,fC,Fie,Lie],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})(),Uie=(()=>{class i{constructor(){this.colorChanged=new We,this.colors1=AH.slice(0,8),this.colors2=AH.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}=qR(e);this.colorChanged.emit(new qh(n,r,s,o))}}return i.\u0275fac=function(e){return new(e||i)},i.\u0275cmp=ot({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&&(W(0,"div",0),fe(1,Sie,1,5,"button",1),j(),W(2,"div",0),fe(3,Eie,1,5,"button",1),j()),2&e&&(G(1),U("ngForOf",n.colors1),G(2),U("ngForOf",n.colors2))},dependencies:[hm,Eo,MV],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})(),kH=(()=>{class i{constructor(){this.colorChanged=new We}ngOnInit(){}handleColorChanged(e){this.colorChanged.emit(e)}}return i.\u0275fac=function(e){return new(e||i)},i.\u0275cmp=ot({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&&(W(0,"ngx-mat-color-canvas",0),Ue("colorChanged",function(s){return n.handleColorChanged(s)}),j(),W(1,"ngx-mat-color-collection",0),Ue("colorChanged",function(s){return n.handleColorChanged(s)}),j()),2&e&&(U("color",n.color),G(1),U("color",n.color))},dependencies:[Bie,Uie],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})(),XR=(()=>{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=qR(e);return n?new qh(n.r,n.g,n.b,n.a):null}}return i.\u0275fac=function(e){return new(e||i)},i.\u0275prov=ke({token:i,factory:i.\u0275fac}),i})();const Vie={display:{colorInput:"hex"}},PH=new me("mat-color-formats"),OH=new me("ngx-mat-colorpicker-scroll-strategy"),Hie={provide:OH,deps:[as],useFactory:function zie(i){return()=>i.scrollStrategies.reposition()}},Gie=Qy(class{constructor(i){this._elementRef=i}});let FH=(()=>{class i extends Gie{constructor(e){super(e)}}return i.\u0275fac=function(e){return new(e||i)(E(mt))},i.\u0275cmp=ot({type:i,selectors:[["ngx-mat-color-picker-content"]],viewQuery:function(e,n){if(1&e&&Wn(kH,5),2&e){let r;Et(r=At())&&(n._palette=r.first)}},hostAttrs:[1,"ngx-mat-colorpicker-content"],hostVars:3,hostBindings:function(e,n){2&e&&(Iw("@transformPanel","enter"),un("ngx-mat-colorpicker-content-touch",n.picker.touchUi))},inputs:{color:"color"},exportAs:["ngxMatColorPickerContent"],features:[lt],decls:1,vars:1,consts:[[3,"color","colorChanged"]],template:function(e,n){1&e&&(W(0,"ngx-mat-color-palette",0),Ue("colorChanged",function(s){return n.picker.select(s)}),j()),2&e&&U("color",n.picker._selected)},dependencies:[kH],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:[MH.transformPanel,MH.fadeInCalendar]},changeDetection:0}),i})(),LH=(()=>{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 We,this.closedStream=new We,this._touchUi=!1,this._opened=!1,this._defaultColor="primary",this._validSelected=null,this._disabledChange=new Re,this._focusedElementBeforeOpen=null,this._inputSubscription=Zt.EMPTY,this._selectedChanged=new Re,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(FH,{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 Lh(FH,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(Pi(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"),Mr(this._popupRef.backdropClick(),this._popupRef.detachments(),this._popupRef.keydownEvents().pipe(gn(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)(E(Bm),E(as),E(ft),E(XR),E(Ra,8),E(OH),E(jt,8),E(Wr))},i.\u0275cmp=ot({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 yC{constructor(t,e){this.target=t,this.targetElement=e,this.value=this.target.value}}const $ie={provide:To,useExisting:Gn(()=>bC),multi:!0},Wie={provide:Yr,useExisting:Gn(()=>bC),multi:!0};let bC=(()=>{class i{constructor(e,n,r,s){if(this._elementRef=e,this._formField=n,this._colorFormats=r,this._adapter=s,this.colorChange=new We,this.colorInput=new We,this._disabledChange=new We,this._valueChange=new We,this._onTouched=()=>{},this._cvaOnChange=()=>{},this._validatorOnChange=()=>{},this._pickerSubscription=Zt.EMPTY,this._validator=_l.compose([]),this._lastValueValid=!1,!this._colorFormats)throw function Oie(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 yC(this,this._elementRef.nativeElement)),this.colorChange.emit(new yC(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 yC(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 yC(this,this._elementRef.nativeElement)))}}return i.\u0275fac=function(e){return new(e||i)(E(mt),E(vl,8),E(PH,8),E(XR))},i.\u0275dir=ve({type:i,selectors:[["input","ngxMatColorPicker",""]],hostVars:3,hostBindings:function(e,n){1&e&&Ue("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&&(Yl("disabled",n.disabled),Dt("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:[Dn([$ie,Wie,{provide:VR,useExisting:i}])]}),i})(),jie=(()=>{class i{constructor(e){this._cd=e,this._stateChanges=Zt.EMPTY}get disabled(){if(null==this._disabled&&this.picker)return this.picker.disabled}set disabled(e){this._disabled=e}ngOnInit(){}ngOnChanges(e){e.picker&&this._watchStateChanges()}ngOnDestroy(){this._stateChanges.unsubscribe()}ngAfterContentInit(){this._watchStateChanges()}open(e){this.picker&&!this.disabled&&(this.picker.open(),e.stopPropagation())}_watchStateChanges(){const e=this.picker?this.picker._disabledChange:ht(),n=this.picker&&this.picker._pickerInput?this.picker._pickerInput._disabledChange:ht(),r=this.picker?Mr(this.picker.openedStream,this.picker.closedStream):ht();this._stateChanges.unsubscribe(),this._stateChanges=Mr(e,n,r).subscribe(()=>this._cd.markForCheck())}}return i.\u0275fac=function(e){return new(e||i)(E(Zn))},i.\u0275cmp=ot({type:i,selectors:[["ngx-mat-color-toggle"]],viewQuery:function(e,n){if(1&e&&Wn(Aie,5),2&e){let r;Et(r=At())&&(n._button=r.first)}},hostAttrs:[1,"ngx-mat-color-toggle"],hostVars:7,hostBindings:function(e,n){1&e&&Ue("focus",function(){return n._button.focus()}),2&e&&(Dt("tabindex",-1),un("ngx-mat-color-toggle-active",n.picker&&n.picker.opened)("mat-accent",n.picker&&"accent"===n.picker.color)("mat-warn",n.picker&&"warn"===n.picker.color))},inputs:{picker:["for","picker"],tabIndex:"tabIndex",disabled:"disabled"},exportAs:["ngxMatColorPickerToggle"],features:[bi],decls:4,vars:5,consts:[["mat-icon-button","","type","button",3,"disabled","click"],["button",""]],template:function(e,n){1&e&&(W(0,"button",0,1),Ue("click",function(s){return n.open(s)}),W(2,"mat-icon"),Ve(3,"palette"),j()()),2&e&&(U("disabled",n.disabled),Dt("aria-haspopup",n.picker?"dialog":null)("tabindex",n.disabled?-1:n.tabIndex),G(2),Yo("color",null==n.picker||null==n.picker._selected?null:n.picker._selected.rgba))},dependencies:[XM,gR],styles:[".mat-form-field-appearance .mat-form-field-prefix .ngx-mat-color-toggle-default-icon,.mat-form-field-appearance .mat-form-field-suffix .ngx-mat-color-toggle-default-icon{width:1em}.mat-form-field:not(.mat-form-field-appearance) .mat-form-field-prefix .ngx-mat-color-toggle-default-icon,.mat-form-field:not(.mat-form-field-appearance) .mat-form-field-suffix .ngx-mat-color-toggle-default-icon{display:block;width:1.5em;height:1.5em}.mat-form-field:not(.mat-form-field-appearance) .mat-form-field-prefix .mat-icon-button .ngx-mat-color-toggle-default-icon,.mat-form-field:not(.mat-form-field-appearance) .mat-form-field-suffix .mat-icon-button .ngx-mat-color-toggle-default-icon{margin:auto}\n"],encapsulation:2}),i})(),Yie=(()=>{class i{}return i.\u0275fac=function(e){return new(e||i)},i.\u0275mod=nn({type:i}),i.\u0275inj=Kt({providers:[XR,Hie],imports:[Ao,pH,KM,_H,aie,eH,tH,_V,Nh,ez]}),i})();const qie=["picker"],Xie=function(i){return{"background-color":i}};function Kie(i,t){if(1&i){const e=di();W(0,"div",5),Ue("click",function(r){const o=an(e).index;return zt(he().onColorClicked(r.currentTarget,o))}),j()}if(2&i){const e=t.$implicit,n=t.index,r=he();U("ngStyle",sm(2,Xie,"#"+r.lpad(e.toString(16),"0",8)))("matTooltip",n+": #"+e.toString(16))}}const Zie=function(){return["colors"]};let Qie=(()=>{class i{constructor(){this.resource=null,this.changed=new We,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 yU;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=ot({type:i,selectors:[["app-palette-block-ui"]],viewQuery:function(e,n){if(1&e&&Wn(qie,5),2&e){let r;Et(r=At())&&(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&&(De(0,"app-compound-block-ui",0),W(1,"div",1),fe(2,Kie,1,4,"div",2),j(),W(3,"input",3),Ue("colorChange",function(s){return n.onColorChange(s.value)}),j(),De(4,"ngx-mat-color-picker",null,4)),2&e){const r=Ki(5);U("resource",n.resource)("fieldBlacklist",oo(4,Zie)),G(2),U("ngForOf",null==n.resourceData?null:n.resourceData.colors),G(1),U("ngxMatColorPicker",r)}},dependencies:[Eo,tM,ic,Os,bC,LH,Jl],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 Jie=["editor"];let ere=(()=>{class i{constructor(e){this.cdr=e,this._resource=null,this.resourceDescription="",this.disabled=!1,this.changed=new We,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)(E(Zn))},i.\u0275cmp=ot({type:i,selectors:[["app-binary-block-ui"]],viewQuery:function(e,n){if(1&e&&Wn(Jie,5),2&e){let r;Et(r=At())&&(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&&(W(0,"h2",0),Ve(1),j(),De(2,"div",null,1)),2&e&&(U("matTooltip",n.resourceDescription),G(1),_i(null==n.resource?null:n.resource.name))},dependencies:[Os],changeDetection:0}),i})();const tre=["picker"];function nre(i,t){if(1&i&&(W(0,"mat-label",8),Ve(1),j()),2&i){const e=he();G(1),_i(null==e.resource?null:e.resource.name)}}const ire=function(i){return{transform:i}};let rre=(()=>{class i{constructor(e){this.cdr=e,this.resource=null,this.resourceDescription="",this.changed=new We,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)(E(Zn))},i.\u0275cmp=ot({type:i,selectors:[["app-angle-block-ui"]],viewQuery:function(e,n){if(1&e&&Wn(tre,5),2&e){let r;Et(r=At())&&(n.picker=r.first)}},hostBindings:function(e,n){1&e&&Ue("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&&(W(0,"div",0)(1,"div",1,2)(3,"div",3),De(4,"div",4)(5,"div",5),j()(),W(6,"div",6),fe(7,nre,2,1,"mat-label",7),W(8,"mat-label"),Ve(9),Ct(10,"number"),j(),W(11,"mat-label"),Ve(12),Ct(13,"number"),j()()()),2&e&&(U("matTooltip",n.resourceDescription),G(3),U("ngStyle",sm(11,ire,"rotate("+((null==n.resource?null:n.resource.data)||0)+"rad)")),G(4),U("ngIf",null==n.resource?null:n.resource.name),G(2),Zi("",J1(10,5,180*(null==n.resource?null:n.resource.data)/n.pi||0,"1.2-2")," deg"),G(3),Zi("",J1(13,8,(null==n.resource?null:n.resource.data)||0,"1.2-2")," rad"))},dependencies:[vi,tM,Io,Os,uB],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 NH{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,d=new Set;for(const h of e)!0===Array.isArray(h)?a.add(h):"object"==typeof h?l.add(h):"function"==typeof h?d.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===d.size){h=!0;for(const p of o)if(!1===d.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 sre(i,t){if(1&i&&(W(0,"mat-list-option",3),Ve(1),j()),2&i){const e=t.$implicit,n=he();U("value",e)("selected",n.selectedValue==e),G(1),Zi(" ",e," ")}}function ore(i,t){if(1&i&&(W(0,"mat-card"),De(1,"app-editor",4),j()),2&i){const e=he();G(1),U("resource",e.resources[e.selectedValue])}}let xC=(()=>{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)(E(NH))},i.\u0275cmp=ot({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&&(W(0,"mat-selection-list",0),Ue("selectionChange",function(s){return n.selectedValue=s.source.selectedOptions.selected[0].value}),fe(1,sre,2,3,"mat-list-option",1),j(),fe(2,ore,2,1,"mat-card",2)),2&e&&(U("multiple",!1),G(1),U("ngForOf",n.keys),G(1),U("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})(),are=(()=>{class i{constructor(){this._resource=null,this.resourceMap={},this.changed=new We}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",iR("@transformPanel",[nR()],{optional:!0}))]),transformPanel:ka("transformPanel",[Ps("void",si({opacity:0,transform:"scale(1, 0.8)"})),Pr("void => showing",jr("120ms cubic-bezier(0, 0, 0.2, 1)",si({opacity:1,transform:"scale(1, 1)"}))),Pr("* => void",jr("100ms linear",si({opacity:0})))])};let BH=0;const UH=new me("mat-select-scroll-strategy"),yre=new me("MAT_SELECT_CONFIG"),bre={provide:UH,deps:[as],useFactory:function vre(i){return()=>i.scrollStrategies.reposition()}},xre=new me("MatSelectTrigger");class wre{constructor(t,e){this.source=t,this.value=e}}const Mre=YM(JI(jM($U(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 Re}}))));let Cre=(()=>{class i extends Mre{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(_l.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=ks(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,d,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=d,this._liveAnnouncer=g,this._defaultOptions=b,this._panelOpen=!1,this._compareWith=(v,y)=>v===y,this._uid="mat-select-"+BH++,this._triggerAriaLabelledBy=null,this._destroy=new Re,this._onChange=()=>{},this._onTouched=()=>{},this._valueId="mat-select-value-"+BH++,this._panelDoneAnimatingStream=new Re,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=Ey(()=>{const v=this.options;return v?v.changes.pipe(Do(v),Rs(()=>Mr(...v.map(y=>y.onSelectionChange)))):this._ngZone.onStable.pipe(Pi(1),Rs(()=>this.optionSelectionChanges))}),this.openedChange=new We,this._openedStream=this.openedChange.pipe(gn(v=>v),et(()=>{})),this._closedStream=this.openedChange.pipe(gn(v=>!v),et(()=>{})),this.selectionChange=new We,this.valueChange=new We,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 HR(this.multiple),this.stateChanges.next(),this._panelDoneAnimatingStream.pipe(Zl(),He(this._destroy)).subscribe(()=>this._panelDoneAnimating(this.panelOpen))}ngAfterContentInit(){this._initKeyManager(),this._selectionModel.changed.pipe(He(this._destroy)).subscribe(e=>{e.added.forEach(n=>n.select()),e.removed.forEach(n=>n.deselect())}),this.options.changes.pipe(Do(null),He(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&&!Ko(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||Ko(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(Pi(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 GZ(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=Mr(this.options.changes,this._destroy);this.optionSelectionChanges.pipe(He(e)).subscribe(n=>{this._onSelect(n.source,n.isUserInput),n.isUserInput&&!this.multiple&&this._panelOpen&&(this.close(),this.focus())}),Mr(...this.options.map(n=>n._stateChanges)).pipe(He(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)(E(LM),E(Zn),E(ft),E(jU),E(mt),E(Ra,8),E(ub,8),E(Gh,8),E(mC,8),E(ec,10),ba("tabindex"),E(UH),E(XI),E(yre,8))},i.\u0275dir=ve({type:i,viewQuery:function(e,n){if(1&e&&(Wn(lre,5),Wn(cre,5),Wn(xU,5)),2&e){let r;Et(r=At())&&(n.trigger=r.first),Et(r=At())&&(n.panel=r.first),Et(r=At())&&(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:[lt,bi]}),i})(),fb=(()=>{class i extends Cre{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(He(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 OQ(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 wre(this,e)}_getOverlayWidth(){return(this._preferredOverlayOrigin instanceof zI?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=ri(i)))(n||i)}}(),i.\u0275cmp=ot({type:i,selectors:[["mat-select"]],contentQueries:function(e,n,r){if(1&e&&($i(r,xre,5),$i(r,Nm,5),$i(r,eV,5)),2&e){let s;Et(s=At())&&(n.customTrigger=s.first),Et(s=At())&&(n.options=s),Et(s=At())&&(n.optionGroups=s)}},hostAttrs:["role","combobox","aria-autocomplete","none","aria-haspopup","listbox",1,"mat-mdc-select"],hostVars:19,hostBindings:function(e,n){1&e&&Ue("keydown",function(s){return n._handleKeydown(s)})("focus",function(){return n._onFocus()})("blur",function(){return n._onBlur()}),2&e&&(Dt("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()),un("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:[Dn([{provide:UR,useExisting:i},{provide:JU,useExisting:i}]),lt],ngContentSelectors:gre,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&&(sr(mre),W(0,"div",0,1),Ue("click",function(){return n.toggle()}),W(3,"div",2),fe(4,dre,2,1,"span",3),fe(5,fre,3,2,"span",4),j(),W(6,"div",5)(7,"div",6),Ri(),W(8,"svg",7),De(9,"path",8),j()()()(),fe(10,pre,3,9,"ng-template",9),Ue("backdropClick",function(){return n.close()})("attach",function(){return n._onAttached()})("detach",function(){return n.close()})),2&e){const r=Ki(1);Dt("aria-owns",n.panelOpen?n.id+"-panel":null),G(3),U("ngSwitch",n.empty),Dt("id",n._valueId),G(1),U("ngSwitchCase",!0),G(1),U("ngSwitchCase",!1),G(5),U("cdkConnectedOverlayPanelClass",n._overlayPanelClass)("cdkConnectedOverlayScrollStrategy",n._scrollStrategy)("cdkConnectedOverlayOrigin",n._preferredOverlayOrigin||r)("cdkConnectedOverlayOpen",n.panelOpen)("cdkConnectedOverlayPositions",n._positions)("cdkConnectedOverlayWidth",n._overlayWidth)}},dependencies:[hm,by,VT,aB,xU,zI],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:[_re.transformPanel]},changeDetection:0}),i})(),VH=(()=>{class i{}return i.\u0275fac=function(e){return new(e||i)},i.\u0275mod=nn({type:i}),i.\u0275inj=Kt({providers:[bre],imports:[Ao,Pm,tR,Qn,Xy,gC,tR,Qn]}),i})();function Sre(i,t){if(1&i&&(W(0,"mat-label"),Ve(1),j()),2&i){const e=he(3);G(1),_i(e.resource.name)}}function Ere(i,t){if(1&i&&(W(0,"mat-option",6),Ve(1),j()),2&i){const e=t.$implicit,n=he(3);U("value",e[1])("disabled",n.disabled),G(1),Zi(" ",e[1]," ")}}function Are(i,t){if(1&i){const e=di();W(0,"mat-form-field",3),fe(1,Sre,2,1,"mat-label",0),W(2,"mat-select",4),Ue("valueChange",function(r){return an(e),zt(he(2).resource.data=r)})("selectionChange",function(){return an(e),zt(he(2).changed.emit())}),fe(3,Ere,2,3,"mat-option",5),j()()}if(2&i){const e=he(2);U("matTooltip",e.resourceDescription),G(1),U("ngIf",e.resource.name),G(1),U("value",e.resource.data)("disabled",e.disabled),G(1),U("ngForOf",e.resource.schema.enum_names)}}function Dre(i,t){if(1&i&&(W(0,"mat-label"),Ve(1),j()),2&i){const e=he(3);G(1),_i(e.resource.name)}}function Tre(i,t){if(1&i){const e=di();W(0,"mat-form-field",3),fe(1,Dre,2,1,"mat-label",0),W(2,"input",7),Ue("ngModelChange",function(r){return an(e),zt(he(2).resource.data=r)})("change",function(){return an(e),zt(he(2).changed.emit())}),j()()}if(2&i){const e=he(2);U("matTooltip",e.resourceDescription),G(1),U("ngIf",e.resource.name),G(1),U("min",0)("max",256*(e.resource.schema.length||1)-1)("ngModel",e.resource.data)}}function Ire(i,t){if(1&i&&(Gr(0),fe(1,Are,4,5,"mat-form-field",1),fe(2,Tre,3,5,"ng-template",null,2,Vc),$r()),2&i){const e=Ki(3),n=he();G(1),U("ngIf",n.isKnownEnumValue(n.resource.data))("ngIfElse",e)}}let Rre=(()=>{class i{constructor(){this.resource=null,this.resourceDescription="",this.disabled=!1,this.changed=new We}isKnownEnumValue(e){return!!this.resource?.schema.enum_names.find(([n,r])=>r==e)}}return i.\u0275fac=function(e){return new(e||i)},i.\u0275cmp=ot({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&&fe(0,Ire,4,2,"ng-container",0),2&e&&U("ngIf",n.resource)},dependencies:[Eo,vi,gl,mu,tc,_u,gu,Kc,vl,Io,ic,Os,fb,Nm],changeDetection:0}),i})();const kre=["*"],Ore=["unscopedContent"];function Fre(i,t){1&i&&Wt(0,4)}function Lre(i,t){if(1&i&&(W(0,"div",11),De(1,"input",12),W(2,"div",13),Ri(),W(3,"svg",14),De(4,"path",15),j(),_a(),De(5,"div",16),j()()),2&i){const e=he();un("mdc-checkbox--disabled",e.disabled),G(1),U("checked",e.selected)("disabled",e.disabled)}}function Nre(i,t){if(1&i&&(W(0,"div",17),De(1,"input",18),W(2,"div",19),De(3,"div",20)(4,"div",21),j()()),2&i){const e=he();un("mdc-radio--disabled",e.disabled),G(1),U("checked",e.selected)("disabled",e.disabled)}}function Bre(i,t){}function Ure(i,t){if(1&i&&(W(0,"span",22),fe(1,Bre,0,0,"ng-template",23),j()),2&i){he();const e=Ki(3);G(1),U("ngTemplateOutlet",e)}}function Vre(i,t){}function zre(i,t){if(1&i&&(W(0,"span",24),fe(1,Vre,0,0,"ng-template",23),j()),2&i){he();const e=Ki(5);G(1),U("ngTemplateOutlet",e)}}function Hre(i,t){}function Gre(i,t){1&i&&fe(0,Hre,0,0,"ng-template",23),2&i&&(he(),U("ngTemplateOutlet",Ki(1)))}function $re(i,t){}function Wre(i,t){if(1&i&&(W(0,"span",25),fe(1,$re,0,0,"ng-template",23),j()),2&i){he();const e=Ki(3);G(1),U("ngTemplateOutlet",e)}}function jre(i,t){}function Yre(i,t){if(1&i&&(W(0,"span",25),fe(1,jre,0,0,"ng-template",23),j()),2&i){he();const e=Ki(5);G(1),U("ngTemplateOutlet",e)}}function qre(i,t){}function Xre(i,t){1&i&&fe(0,qre,0,0,"ng-template",23),2&i&&(he(),U("ngTemplateOutlet",Ki(1)))}const Kre=[[["","matListItemTitle",""]],[["","matListItemLine",""]],"*",[["mat-divider"]],[["","matListItemAvatar",""],["","matListItemIcon",""]]],Zre=["[matListItemTitle]","[matListItemLine]","*","mat-divider","[matListItemAvatar],[matListItemIcon]"],zH=new me("ListOption");let Qre=(()=>{class i{constructor(e){this._elementRef=e}}return i.\u0275fac=function(e){return new(e||i)(E(mt))},i.\u0275dir=ve({type:i,selectors:[["","matListItemTitle",""]],hostAttrs:[1,"mat-mdc-list-item-title","mdc-list-item__primary-text"]}),i})(),Jre=(()=>{class i{constructor(e){this._elementRef=e}}return i.\u0275fac=function(e){return new(e||i)(E(mt))},i.\u0275dir=ve({type:i,selectors:[["","matListItemLine",""]],hostAttrs:[1,"mat-mdc-list-item-line","mdc-list-item__secondary-text"]}),i})(),HH=(()=>{class i{constructor(e){this._listOption=e}_isAlignedAtStart(){return!this._listOption||"after"===this._listOption?._getTogglePosition()}}return i.\u0275fac=function(e){return new(e||i)(E(zH,8))},i.\u0275dir=ve({type:i,hostVars:4,hostBindings:function(e,n){2&e&&un("mdc-list-item__start",n._isAlignedAtStart())("mdc-list-item__end",!n._isAlignedAtStart())}}),i})(),ese=(()=>{class i extends HH{}return i.\u0275fac=function(){let t;return function(n){return(t||(t=ri(i)))(n||i)}}(),i.\u0275dir=ve({type:i,selectors:[["","matListItemAvatar",""]],hostAttrs:[1,"mat-mdc-list-item-avatar"],features:[lt]}),i})(),tse=(()=>{class i extends HH{}return i.\u0275fac=function(){let t;return function(n){return(t||(t=ri(i)))(n||i)}}(),i.\u0275dir=ve({type:i,selectors:[["","matListItemIcon",""]],hostAttrs:[1,"mat-mdc-list-item-icon"],features:[lt]}),i})();const nse=new me("MAT_LIST_CONFIG");let KR=(()=>{class i{constructor(){this._isNonInteractive=!0,this._disableRipple=!1,this._disabled=!1,this._defaultOptions=Ft(nse,{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=ve({type:i,hostVars:1,hostBindings:function(e,n){2&e&&Dt("aria-disabled",n.disabled)},inputs:{disableRipple:"disableRipple",disabled:"disabled"}}),i})(),GH=(()=>{class i{set lines(e){this._explicitLines=ks(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 Zt,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(Mr(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)(E(mt),E(ft),E(KR,8),E(Vi),E(eR,8),E(Rr,8))},i.\u0275dir=ve({type:i,contentQueries:function(e,n,r){if(1&e&&($i(r,ese,4),$i(r,tse,4)),2&e){let s;Et(s=At())&&(n._avatars=s),Et(s=At())&&(n._icons=s)}},hostVars:4,hostBindings:function(e,n){2&e&&(Dt("aria-disabled",n.disabled)("disabled",n._isButtonElement&&n.disabled||null),un("mdc-list-item--disabled",n.disabled))},inputs:{lines:"lines",disableRipple:"disableRipple",disabled:"disabled"}}),i})();const $H=new me("SelectionList");let wC=(()=>{class i extends GH{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 We,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)(E(mt),E(ft),E($H),E(Vi),E(Zn),E(eR,8),E(Rr,8))},i.\u0275cmp=ot({type:i,selectors:[["mat-list-option"]],contentQueries:function(e,n,r){if(1&e&&($i(r,Jre,5),$i(r,Qre,5)),2&e){let s;Et(s=At())&&(n._lines=s),Et(s=At())&&(n._titles=s)}},viewQuery:function(e,n){if(1&e&&Wn(Ore,5),2&e){let r;Et(r=At())&&(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&&Ue("blur",function(){return n._handleBlur()})("click",function(){return n._toggleOnInteraction()}),2&e&&(Dt("aria-selected",n.selected),un("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:[Dn([{provide:GH,useExisting:i},{provide:zH,useExisting:i}]),lt],ngContentSelectors:Zre,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&&(sr(Kre),fe(0,Fre,1,0,"ng-template",null,0,Vc),fe(2,Lre,6,4,"ng-template",null,1,Vc),fe(4,Nre,5,4,"ng-template",null,2,Vc),fe(6,Ure,2,1,"span",3),fe(7,zre,2,1,"span",4),fe(8,Gre,1,1,"ng-template",5),W(9,"span",6),Wt(10),Wt(11,1),W(12,"span",7,8),Ue("cdkObserveContent",function(){return n._updateItemLines(!0)}),Wt(14,2),j()(),fe(15,Wre,2,1,"span",9),fe(16,Yre,2,1,"span",9),fe(17,Xre,1,1,"ng-template",5),Wt(18,3),De(19,"div",10)),2&e&&(G(6),U("ngIf",n._hasCheckboxAt("before")),G(1),U("ngIf",n._hasRadioAt("before")),G(1),U("ngIf",n._hasIconsOrAvatarsAt("before")),G(7),U("ngIf",n._hasCheckboxAt("after")),G(1),U("ngIf",n._hasRadioAt("after")),G(1),U("ngIf",n._hasIconsOrAvatarsAt("after")))},dependencies:[CU,vi,xy],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 ise={provide:To,useExisting:Gn(()=>MC),multi:!0};class rse{constructor(t,e){this.source=t,this.options=e}}let MC=(()=>{class i extends KR{get multiple(){return this._multiple}set multiple(e){const n=Jt(e);n!==this._multiple&&(this._multiple=n,this.selectedOptions=new HR(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 Re,this._onChange=r=>{},this.selectionChange=new We,this.color="accent",this.compareWith=(r,s)=>r===s,this._multiple=!0,this._hideSingleSelectionIndicator=this._defaultOptions?.hideSingleSelectionIndicator??!1,this.selectedOptions=new HR(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 rse(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(He(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()&&Ko(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 RU(this._items).withHomeAndEnd().withTypeAhead().withWrap().skipPredicate(()=>this.disabled),this._resetActiveOption(),this._keyManager.change.subscribe(e=>this._setActiveOption(e)),this._items.changes.pipe(He(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=FM();return e&&this._element.nativeElement.contains(e)}}return i.\u0275fac=function(e){return new(e||i)(E(mt),E(ft))},i.\u0275cmp=ot({type:i,selectors:[["mat-selection-list"]],contentQueries:function(e,n,r){if(1&e&&$i(r,wC,5),2&e){let s;Et(s=At())&&(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&&Ue("keydown",function(s){return n._handleKeydown(s)}),2&e&&Dt("aria-multiselectable",n.multiple)},inputs:{color:"color",compareWith:"compareWith",multiple:"multiple",hideSingleSelectionIndicator:"hideSingleSelectionIndicator",disabled:"disabled"},outputs:{selectionChange:"selectionChange"},exportAs:["matSelectionList"],features:[Dn([ise,{provide:KR,useExisting:i},{provide:$H,useExisting:i}]),lt,bi],ngContentSelectors:kre,decls:1,vars:0,template:function(e,n){1&e&&(sr(),Wt(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})(),sse=(()=>{class i{}return i.\u0275fac=function(e){return new(e||i)},i.\u0275mod=nn({type:i}),i.\u0275inj=Kt({imports:[HI,Ao,Qn,eb,QU,RV]}),i})();function ose(i,t){if(1&i&&(W(0,"mat-label"),Ve(1),j()),2&i){const e=he(2);G(1),_i(e.resource.name)}}function ase(i,t){if(1&i&&(W(0,"mat-list-option",5),Ve(1),j()),2&i){const e=t.$implicit,n=he(2);U("value",e.key)("selected",n.resource.data[e.key])("disabled",n.disabled),G(1),Zi(" ",e.key," ")}}function lse(i,t){if(1&i){const e=di();Gr(0,1),fe(1,ose,2,1,"mat-label",2),W(2,"mat-selection-list",3),Ue("selectionChange",function(r){return an(e),zt(he().onSelection(r))}),fe(3,ase,2,4,"mat-list-option",4),Ct(4,"keyvalue"),j(),$r()}if(2&i){const e=he();U("matTooltip",e.resourceDescription),G(1),U("ngIf",e.resource.name),G(1),U("disabled",e.disabled),G(1),U("ngForOf",Tt(4,4,e.resource.data))}}let cse=(()=>{class i{constructor(){this.resource=null,this.resourceDescription="",this.disabled=!1,this.changed=new We}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=ot({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&&fe(0,lse,5,6,"ng-container",0),2&e&&U("ngIf",n.resource)},dependencies:[Eo,vi,Io,Os,MC,wC,cB],styles:["[_nghost-%COMP%]{padding-bottom:1.34375em}"],changeDetection:0}),i})();class WH{get tick$(){return this._tick$.asObservable()}get children(){return[...this._children]}constructor(t){this.parent=t,this._tick$=new Re,this._children=[],t&&t.addChild(this)}addChild(t){if(t.parent!==this)throw new Error("Incorrect child clock");this._children.includes(t)||this._children.push(t)}removeChild(t){if(t.parent!==this)throw new Error("Incorrect child clock");this._children=this._children.filter(e=>e!==t)}dispose(){this.parent&&this.parent.removeChild(this);for(const t of this._children)t.dispose();this._tick$.complete()}}const use=typeof performance>"u"?()=>Date.now():()=>performance.now();class jm extends WH{static get instance(){return jm._instance||(jm._instance=new jm),jm._instance}get elapsedTime(){return use()}constructor(){super(null);let t=this.elapsedTime;const e=()=>{requestAnimationFrame(e);const n=t,r=this.elapsedTime;t=r,this._tick$.next([n,r-n])};requestAnimationFrame(e)}dispose(){throw new Error("Cannot dispose global clock")}}class jH extends WH{get isRunning(){return!!this.tickSub}get isPaused(){return-1!==this.pausedAt}get isStopped(){return-1===this.startedAt}get timeScale(){return this._timeScale}set timeScale(t){if(t!==this._timeScale||this.pausedByTimescale&&0!==t){if(0===t)return void(this.isPaused||(this.pause(),this.pausedByTimescale=!0));if(this.isPaused&&this.pausedByTimescale&&(this.resume(),this.pausedByTimescale=!1),!this.isStopped){const e=this.isPaused?this.pausedAt:this.parentClock.elapsedTime;this.startedAt=e-(e-this.startedAt)*this.timeScale/t}this._timeScale=t}}get elapsedTime(){return this.isStopped?this.lastStopElapsed:this.isPaused?this._timeScale*(this.pausedAt-this.startedAt):this._timeScale*(this.parentClock.elapsedTime-this.startedAt)}constructor(t=!1,e=jm.instance){super(e),this.parentClock=e,this.tickSub=null,this._internalTick$=new Re,this.tickRateLimit=0,this.paused$=new Re,this.startedAt=-1,this.oldRelativeTime=0,this.pausedAt=-1,this.lastStopElapsed=0,this._timeScale=1,this.pausedByTimescale=!1,this.lastFiredTickElapsed=0,t&&this.start(),this._internalTick$.pipe(et(([n,r])=>[r,r-this.lastFiredTickElapsed]),gn(([n])=>!this.tickRateLimit||Math.floor(this.lastFiredTickElapsed*this.tickRateLimit/1e3)this.lastFiredTickElapsed=n)).subscribe(this._tick$)}start(){this.isRunning||(this.oldRelativeTime=0,this.startedAt=this.parentClock.elapsedTime,this.startListeningTicks())}stop(){this.stopListeningTicks(),this.lastStopElapsed=this.elapsedTime,this.startedAt=this.pausedAt=-1}pause(){this.stopListeningTicks(),this.pausedAt=this.parentClock.elapsedTime,this.pausedByTimescale=!1,this.paused$.next(!0)}resume(){this.isRunning||-1==this.pausedAt||(this.startedAt+=this.parentClock.elapsedTime-this.pausedAt,this.pausedAt=-1,this.startListeningTicks(),this.paused$.next(!1))}startListeningTicks(){if(this.tickSub)throw new Error("Clock is already ticking!");this.tickSub=this.parentClock.tick$.pipe(et(([t,e])=>[this.oldRelativeTime,this.oldRelativeTime+e*this.timeScale]),Ui(([t,e])=>this.oldRelativeTime=e)).subscribe(this._internalTick$)}stopListeningTicks(){var t;null===(t=this.tickSub)||void 0===t||t.unsubscribe(),this.tickSub=null}dispose(){this.stopListeningTicks(),this._internalTick$.complete(),super.dispose()}}const hse={transparent:!1,background:0,size:"fullscreen",antialias:!0};class fse{constructor(t,e,n={}){this.scene=t,this.canvas=e,this.entity=null,this.rendererOptions=Object.assign(Object.assign({},hse),n||{})}}class pb{static fromArray(t,e=!1){const n=new pb(t[0]);let r=n;for(let s=1;sn.map(r=>new pb(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]}constructor(t){this.data=t,this.adjacent=new Set}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(d=>!e.has(d));for(const d of c)e.add(d),r.push([d,a-1])}}return n}nodes(){return Array.from(this.walkRead(-1))}}var sc=(()=>{return(i=sc||(sc={}))[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",sc;var i})();let Xh=(()=>{class i{constructor(){this.tick$=new Re,this._world=null,this._name="e0x"+(i.default_name_counter++).toString(16),this._selfActive=!0,this.parent=null,this._children=[],this._components=[],this._onSpawned$=new Re,this._onRemoved$=new Re}get world(){return this._world}get name(){return this._name}set name(e){this._name=e}get active(){return this._selfActive&&(!this.parent||this.parent.active)}set active(e){this._selfActive=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 pse extends Xh{constructor(t){super(),this.tickOrder=t}}function Ym(i,t=sc.CONTROLLERS,e){const n=new pse(t);return e&&(n.name=e),i.addEntity(n),n.tick$.pipe(su(()=>{i.removeEntity(n,!0)}))}class ZR extends Xh{get rendererSize$(){return this._rendererSize$.asObservable()}get rendererSize(){return this._rendererSize$.getValue()}get rendererOptions(){return this.renderer.rendererOptions}get physicsDebugViewActive(){return this.renderer.physicsDebugViewActive}set physicsDebugViewActive(t){this.renderer.physicsDebugViewActive=t}constructor(t){super(),this.renderer=t,this.tickOrder=sc.RENDERING,this._rendererSize$=new gt(null),this.addComponents(t),this.tick$.subscribe(()=>{this.renderer.render()})}onSpawned(t){this._rendererSize$.next(null),"fullscreen"==this.rendererOptions.size||"function"==typeof this.rendererOptions.size?(this.renderer.canvas&&(this.renderer.canvas.style.position="absolute"),Mr(Ia(window,"resize").pipe(PM(100)),Ia(window,"orientationchange")).pipe(He(this._onRemoved$),et(()=>({x:window.innerWidth,y:window.innerHeight})),Do({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 In||void 0!==this.rendererOptions.size.subscribe&&void 0!==this.rendererOptions.size.pipe?this.rendererOptions.size.pipe(He(this._onRemoved$)).subscribe(e=>{this._rendererSize$.next(e)}):this._rendererSize$.next(this.rendererOptions.size),this._rendererSize$.pipe(He(this._onRemoved$),Zl((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 QR=i=>{i.updateVisibility?i.updateVisibility():YH(i)},YH=i=>{for(const t of i.children)QR(t)};class mse extends Xh{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(){YH(this)}addChildren(...t){super.addChildren(...t);for(const e of t)QR(e)}removeChildren(t,e=!1){if(super.removeChildren(t,e),!e)for(const n of t)QR(n)}}class JR{constructor(){this._running=!1,this.stop$=new Re}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 gse extends JR{get output$(){return this._output$.asObservable()}constructor(t,e){super(),this.keyboard=t,this.keymap=e,this._output$=new Re}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")),nu(t.map(e=>this.keyboard.bindMany(...e))).pipe(He(this.stop$),et(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 ek=new In(ms);class CC extends JR{constructor(){super(),this.bindings={},this.skipKeyDownsOnExternalFocus=!0,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 gt(!1);return this.bindings[t].push(e),e.pipe(Zl(),su(()=>{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"),ek;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 gt(!1);this.bindings[n].push(r),e.push(r)}return nu(e).pipe(su(()=>{for(let n=0;nn.includes(!0)),Zl())}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 CC.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)}}CC.externalFocusBlacklist=[HTMLInputElement,HTMLTextAreaElement,HTMLSelectElement,HTMLButtonElement];class qr{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 qr.len(qr.sub(t,e))}static norm(t){const e=qr.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 vse={pointerLock:!1};var Fs=(()=>{return(i=Fs||(Fs={}))[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",Fs;var i})();class qm extends JR{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$=Ia(this._element,"wheel",{passive:!1}).pipe(He(this.stopped$),su(()=>this._wheel$=null),Ui(t=>t.preventDefault()),et(t=>t.deltaY),Uf())),this._wheel$}get isPointerLocked(){return!!document.pointerLockElement}get isPointerLocked$(){return Ia(document,"pointerlockchange").pipe(et(()=>this.isPointerLocked))}get state(){return this._state$.getValue()}get state$(){return this._state$.asObservable()}get multiTouchPositions$(){return this._multiTouchPositions$.asObservable()}get twoTouchGestureDelta$(){return this.state$.pipe(Rs(t=>t==Fs.DRAG_TOUCH_TWO_FINGERS?this.multiTouchPositions$:ek),et(t=>t.map(e=>({x:e.x,y:e.y}))),function _se(){return ti((i,t)=>{let e,n=!1;i.subscribe(Yn(t,r=>{const s=e;e=r,n&&t.next([s,r]),n=!0}))})}(),gn(([t,e])=>t.length>1&&e.length>1),et(([t,e])=>({centerPointDelta:qr.sub(qr.scalarMult(e.reduce((n,r)=>qr.add(n,r),qr.O),1/e.length),qr.scalarMult(t.reduce((n,r)=>qr.add(n,r),qr.O),1/e.length)),angleDelta:qr.angle(e[1],e[0])-qr.angle(t[1],t[0]),distanceDelta:qr.dist(e[1],e[0])-qr.dist(t[1],t[0])})))}get _element(){return this.options.canvas||window}constructor(t={}){super(),this._wheel$=null,this._delta$=new Re,this._position$=new gt(qr.O),this._multiTouchPositions$=new gt([]),this.stopped$=new Re,this._state$=new gt(Fs.NONE),this.options=Object.assign(Object.assign({},vse),t),this.canvasClickListener=this.canvasClickListener.bind(this)}startInternal(){this.options.canvas&&(this.options.canvas.style.touchAction="none"),this._state$.next(Fs.NONE);const t=[Fs.DRAG,Fs.DRAG_MIDDLE_BUTTON,Fs.DRAG_RIGHT_BUTTON],e=[Fs.NONE,Fs.DRAG,Fs.DRAG_TOUCH_TWO_FINGERS],n=[],r={};Ia(this._element,"mousemove").pipe(He(this.stopped$)).subscribe(o=>{this._delta$.next({x:o.movementX,y:o.movementY})}),Ia(this._element,"pointermove").pipe(He(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})}),!qm.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{if(0===n.length)try{this.options.canvas&&this.options.canvas.setPointerCapture(o.pointerId),window.addEventListener("pointerup",s),this._element.addEventListener("pointercancel",s)}catch(a){console.error(a)}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]||Fs.NONE)}),Ia(this._element,"contextmenu").pipe(He(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 yse{static lookAt(t,e,n){let r=Pe.sub(t,e);r=0===Pe.lenSq(r)?Object.assign(Object.assign({},r),{z:1}):Pe.norm(r);let s=Pe.cross(n,r);0===Pe.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=Pe.norm(r),s=Pe.cross(n,r)),s=Pe.norm(s);let o=Pe.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 ji{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,d=t.w*Math.sin((1-n)*s)/o+e.w*Math.sin(n*s)/o;return isNaN(a)||isNaN(l)||isNaN(c)||isNaN(d)?ji.clone(t):{x:a,y:l,z:c,w:d}}static fromAngle(t,e){const n=e/2,r=Math.sin(n);return Object.assign(Object.assign({},Pe.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],d=t[10],h=e+o+d;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>d){const p=2*Math.sqrt(1+e-o-d);return{x:.25*p,y:(n+s)/p,z:(r+l)/p,w:(c-a)/p}}if(o>d){const p=2*Math.sqrt(1+o-e-d);return{x:(n+s)/p,y:.25*p,z:(a+c)/p,w:(r-l)/p}}{const p=2*Math.sqrt(1+d-e-o);return{x:(r+l)/p,y:(a+c)/p,z:.25*p,w:(s-n)/p}}}static fromMatrix3(t){const e=t[0][0]+t[1][1]+t[2][2];let n,r,s,o;if(e>0){const a=.5/Math.sqrt(e+1);n=.25/a,r=(t[2][1]-t[1][2])*a,s=(t[0][2]-t[2][0])*a,o=(t[1][0]-t[0][1])*a}else if(t[0][0]>t[1][1]&&t[0][0]>t[2][2]){const a=2*Math.sqrt(1+t[0][0]-t[1][1]-t[2][2]);n=(t[2][1]-t[1][2])/a,r=.25*a,s=(t[0][1]+t[1][0])/a,o=(t[0][2]+t[2][0])/a}else if(t[1][1]>t[2][2]){const a=2*Math.sqrt(1+t[1][1]-t[0][0]-t[2][2]);n=(t[0][2]-t[2][0])/a,r=(t[0][1]+t[1][0])/a,s=.25*a,o=(t[1][2]+t[2][1])/a}else{const a=2*Math.sqrt(1+t[2][2]-t[0][0]-t[1][1]);n=(t[1][0]-t[0][1])/a,r=(t[0][2]+t[2][0])/a,s=(t[1][2]+t[2][1])/a,o=.25*a}return{w:n,x:r,y:s,z:o}}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),d=Math.sin(.5*e);return{w:c*a*s+d*l*o,x:d*a*s-c*l*o,y:c*l*s+d*a*o,z:c*a*o-d*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=Pe.Z){return this.fromMatrix4(yse.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 Pe{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 Pe.len(Pe.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=Pe.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,ji.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)}}}function tk(i,t,e,n){return r=>r.pipe(tI((s,o)=>{var a;return{targetValue:o,currentValue:null!==(a=s.currentValue)&&void 0!==a?a:o,hasReachedTarget:!1}},{targetValue:null,currentValue:null,hasReachedTarget:!1}),Rs(s=>i.pipe(et(([o,a])=>{if(null===s.targetValue||null===s.currentValue)return s.currentValue;if(s.hasReachedTarget)return;const l=1-Math.exp(-a/t),c=e(s.currentValue,s.targetValue,l);return s.currentValue=c,n(c,s.targetValue)?(s.hasReachedTarget=!0,s.targetValue):c}))),et(s=>void 0!==s?s:null),gn(s=>null!==s))}ps(738);class wse extends Xh{get avgReport(){return this._avgReport}get peakReport(){return this._peakReport}constructor(t=60,e=15){super(),this.maxSamples=t,this.maxRows=e,this.tickOrder=Number.MAX_SAFE_INTEGER,this.sampleIndex=0,this.collectedData=new Map,this._avgReport={totalTime:0,entries:[]},this._peakReport={totalTime:0,entries:[]}}onSpawned(t){super.onSpawned(t),this.sampleIndex=0;const e=()=>(typeof performance>"u"?Date:performance).now();this.world.tickForwardTo$.pipe(He(this.onRemoved$)).subscribe(n=>{n!==this&&(this.collectedData.has(n)?this.collectedData.get(n).push([this.sampleIndex,e(),0]):this.collectedData.set(n,[[this.sampleIndex,e(),0]]))}),this.world.tickForwardedTo$.pipe(He(this.onRemoved$)).subscribe(n=>{if(n===this)return;const r=this.collectedData.get(n);r[r.length-1][2]=e()}),this.tick$.pipe(He(this.onRemoved$)).subscribe(()=>{this.sampleIndex++;const n=Array.from(this.collectedData.entries());for(const[h,p]of n){for(;p.length>0&&p[0][0]h instanceof Xh?""===h.name?h.constructor.name:h.name:"PHYSICS_WORLD"===h?"Physics simulation":h,s=h=>{let p=0,m=0;for(;mh.length-m+1){m--;break}p+=h[h.length-m-1][1]}return m>1&&(h=h.slice(0,h.length-m)).push([`Rest (${m})`,p]),h};let o=0,a=Array.from(this.collectedData.entries()).map(([h,p])=>{const m=p.reduce((g,[b,v,y])=>g+y-v,0)/this.maxSamples;return o+=m,[r(h),m]}).sort((h,p)=>p[1]-h[1]);a=s(a),this._avgReport={totalTime:o,entries:a};let l=new Map,c=Array.from(this.collectedData.entries()).map(([h,p])=>{let m=0;for(const[g,b,v]of p){const y=v-b;m=Math.max(m,y),l.set(g,y+(l.get(g)||0))}return[r(h),m]}).sort((h,p)=>p[1]-h[1]);c=s(c);let d=Array.from(l.values()).reduce((h,p)=>Math.max(h,p),0);this._peakReport={totalTime:d,entries:c}})}onRemoved(){super.onRemoved(),this.collectedData=new Map,this._avgReport={totalTime:0,entries:[]},this._peakReport={totalTime:0,entries:[]}}}var Xm=function(i,t,e,n){return new(e||(e=Promise))(function(s,o){function a(d){try{c(n.next(d))}catch(h){o(h)}}function l(d){try{c(n.throw(d))}catch(h){o(h)}}function c(d){d.done?s(d.value):function r(s){return s instanceof e?s:new e(function(o){o(s)})}(d.value).then(a,l)}c((n=n.apply(i,t||[])).next())})};class yl{static get documentWorlds(){return[...yl._documentWorlds]}constructor(t,e){this.visualScene=t,this.physicsWorld=e,this.worldClock=new jH(!1),this.keyboardInput=new CC,this.name="w0x"+(yl.default_name_counter++).toString(16),this.children=[],this.tickListeners=[],this.tickStarted$=new Re,this.tickForwardTo$=new Re,this.tickForwardedTo$=new Re,this.paused$=new Re,this.disposed$=new Re,this.keyboardInput.start(),window.ggstatic?this.registerConsoleCommands(window.ggstatic):(this.onGgStaticInitialized=this.onGgStaticInitialized.bind(this),window.addEventListener("ggstatic_added",this.onGgStaticInitialized)),this.worldClock.paused$.subscribe(this.paused$),yl._documentWorlds.push(this),yl.worldCreated$.next(this)}init(){return Xm(this,void 0,void 0,function*(){yield Promise.all([this.physicsWorld.init(),this.visualScene.init()]);const t=(e,n,r)=>{e.active&&(this.tickForwardTo$.next(e),e.tick$.next([n,r]),this.tickForwardedTo$.next(e))};this.worldClock.tick$.subscribe(([e,n])=>{this.tickStarted$.next();let r=0;for(;r=sc.PHYSICS_SIMULATION);r++)t(this.tickListeners[r],e,n);for(this.tickForwardTo$.next("PHYSICS_WORLD"),this.physicsWorld.simulate(n),this.tickForwardedTo$.next("PHYSICS_WORLD");re.tickOrder-n.tickOrder),t.onSpawned(this))}removeEntity(t,e=!1){if(t.world){if(t.world!==this)throw new Error("Entity is not a part of this world");this.children.splice(this.children.findIndex(n=>n===t),1),this.tickListeners.splice(this.tickListeners.findIndex(n=>n===t),1),t.onRemoved()}e&&t.dispose()}onGgStaticInitialized(){window.removeEventListener("ggstatic_added",this.onGgStaticInitialized),this.registerConsoleCommands(window.ggstatic)}registerConsoleCommands(t){t.registerConsoleCommand(this,"timescale",(...e)=>Xm(this,void 0,void 0,function*(){return isNaN(+e[0])||(this.worldClock.timeScale=+e[0]),this.worldClock.timeScale.toString()}),"args: [ float? ]; Get current time scale of selected world clock or set it. Default value is 1.0 (no time scale applied)"),t.registerConsoleCommand(this,"fps_limit",(...e)=>Xm(this,void 0,void 0,function*(){return isNaN(+e[0])||(this.worldClock.tickRateLimit=+e[0]),this.worldClock.tickRateLimit.toString()}),"args: [ int? ]; Get current tick rate limit of selected world clock or set it. 0 means no limit applied"),t.registerConsoleCommand(this,"renderers",()=>Xm(this,void 0,void 0,function*(){return this.children.filter(e=>e instanceof ZR).map(e=>e.name).join("\n")}),"no args; Print all renderers in selected world"),t.registerConsoleCommand(this,"debug_view",(...e)=>Xm(this,void 0,void 0,function*(){let r,n="toggle";for(let o of e)["1","0"].includes(o)?n="1"===o:r=o;let s=this.children.find(o=>o instanceof ZR&&(!r||o.name===r));if(s)return s.physicsDebugViewActive="toggle"===n?!s.physicsDebugViewActive:n,s.physicsDebugViewActive?"1":"0";throw r?new Error(`Renderer with name "${r}" not found`):new Error("No renderer found")}),'args: [ 0|1?, string? ]; Turn on/off physics debug view, skip first argument to toggle value. Second argument expects renderer name, if not provided first renderer will be picked. Use "renderers" to get list of renderers in the world'),t.registerConsoleCommand(this,"performance",(...e)=>Xm(this,void 0,void 0,function*(){let n="avg",r=20;for(let d of e)["avg","peak"].includes(d)?n=d:isNaN(+d)||(r=+d);const s=new wse(r,250);this.addEntity(s),yield function bse(i,t){const e="object"==typeof t;return new Promise((n,r)=>{let o,s=!1;i.subscribe({next:a=>{o=a,s=!0},error:r,complete:()=>{s?n(o):e?n(t.defaultValue):r(new fm)}})})}(this.worldClock.tick$.pipe(Pi(r)));const o="avg"===n?s.avgReport:s.peakReport;this.removeEntity(s);const a=o.entries.map(([d,h])=>`${d}:`+new Array(Math.max(0,26-d.length)).join(" ")+`${h.toFixed(2)} ms`+("avg"===n?` (${(100*h/o.totalTime).toFixed(2)}%)`:""));let l="lightgreen";o.totalTime>12&&(l=o.totalTime<16?"yellow":"red");const c=("avg"===n?"Average":"Peak")+" Frame time";return a.unshift(c+":"+new Array(Math.max(0,26-c.length)).join(" ")+`${o.totalTime.toFixed(2)} ms`),a.unshift(`Performance report (${r} samples)`),a.join("\n")}),'args: [ int?, avg|peak? ]; Measure how much time was spent per entity in world. Arguments are samples amount (20 by default) and "peak" or "avg" choice, both arguments are optional. "avg" report sorts entities by average time consumed, "peak" records highest value for each entity')}}yl.default_name_counter=0,yl._documentWorlds=[],yl.worldCreated$=new Re;class Ese extends fse{}class XH extends mse{constructor(){super(...arguments),this._world=null}get world(){return this._world}}class Qo extends XH{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}constructor(t){super(),this.tickOrder=sc.OBJECTS_BINDING,this._position=Pe.O,this._rotation=ji.O,this.object3D=null,this.objectBody=null,t.objectBody&&(this.objectBody=t.objectBody,this.name=this.objectBody.name,this.addComponents(this.objectBody)),t.object3D&&(this.object3D=t.object3D,t.objectBody||(this._position=this.object3D.position,this._rotation=this.object3D.rotation,this.name=this.object3D.name),this.addComponents(this.object3D)),this.objectBody&&(this.tick$.subscribe(()=>{this.runTransformBinding(this.objectBody,this.object3D)}),this.runTransformBinding(this.objectBody,this.object3D))}}class Km extends pb{static fromMapArray(t,e=!1){const n=new Km(t[0]);let r=n;for(let s=1;sn.map(r=>new Km(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));othis.mapGraph.getNearestDummy(this.mapGraphNodes,this.loaderCursor$.getValue())),Zl(),Ui(r=>this._nearestDummy$.next(r))).subscribe(r=>{let o,s=new Set;if(this.options.inertia>0){o=new Set;const a=r.walkReadPreserveDepth(this.options.loadDepth+this.options.inertia);for(let l=0;lo.add(c.data)),l<=this.options.loadDepth&&a[l].forEach(c=>s.add(c.data))}else r.walkRead(this.options.loadDepth).forEach(a=>s.add(a.data)),o=s;for(const a of this.loaded.keys())o.has(a)?s.delete(a):n.includes(a)||n.push(a);for(let a of Array.from(s.keys()))e.includes(a)||e.push(a)}),this.tick$.pipe(Do(null),He(this._onRemoved$)).subscribe(()=>{if(n.length){for(const r of n)this.disposeChunk(r);n=[]}if(e.length)if(this._initialLoadComplete$.value&&e.length>this.options.maxNodesLoadingPerTick){let r=e.slice(0,this.options.maxNodesLoadingPerTick);e=e.slice(this.options.maxNodesLoadingPerTick),Promise.all(r.map(s=>this.loadChunk(s))).then()}else Promise.all(e.map(r=>this.loadChunk(r))).then(()=>{this._initialLoadComplete$.value||this._initialLoadComplete$.next(!0)}),e=[]})}onRemoved(){super.onRemoved(),this.loadClock&&(this.loadClock.stop(),this.loadClock=null),this.loaderCursor$.next(Pe.O)}loadChunk(t){return function(i,t,e,n){return new(e||(e=Promise))(function(s,o){function a(d){try{c(n.next(d))}catch(h){o(h)}}function l(d){try{c(n.throw(d))}catch(h){o(h)}}function c(d){d.done?s(d.value):function r(s){return s instanceof e?s:new e(function(o){o(s)})}(d.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||ji.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||ji.O}]),[n,e]})}disposeChunk(t){this.loaded.has(t)&&(this.removeChildren(this.loaded.get(t),!0),this.loaded.delete(t))}}class Tse extends ZR{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 e4=function(i,t,e,n){return new(e||(e=Promise))(function(s,o){function a(d){try{c(n.next(d))}catch(h){o(h)}}function l(d){try{c(n.throw(d))}catch(h){o(h)}}function c(d){d.done?s(d.value):function r(s){return s instanceof e?s:new e(function(o){o(s)})}(d.value).then(a,l)}c((n=n.apply(i,t||[])).next())})};const t4={keymap:"wasd",cameraLinearSpeed:20,cameraMovementElasticity:0,cameraBoostMultiplier:2.5,cameraRotationSensitivity:1,cameraRotationElasticity:0,mouseOptions:{},ignoreMouseUnlessPointerLocked:!1,ignoreKeyboardUnlessPointerLocked:!1};class n4 extends Xh{get active(){return super.active}set active(t){!super.active&&t&&this.reset(),super.active=t}get spherical(){return this._spherical}set spherical(t){this._spherical.phi=Math.max(1e-6,Math.min(Math.PI-1e-6,t.phi)),this._spherical.theta=t.theta,this.resetMotion$.next()}constructor(t,e,n={}){super(),this.keyboard=t,this.camera=e,this.tickOrder=sc.INPUT_CONTROLLERS,this._spherical={phi:0,radius:1,theta:0},this.resetMotion$=new Re,this.options=Object.assign(Object.assign({},t4),n),n.mouseOptions&&(this.options.mouseOptions=Object.assign(Object.assign({},t4.mouseOptions),n.mouseOptions)),this.mouseInput=new qm(this.options.mouseOptions),this.directionsInput=new gse(t,this.options.keymap)}reset(){this._spherical=Pe.toSpherical(Pe.rot({x:0,y:0,z:-1},this.camera.rotation)),this.resetMotion$.next()}onSpawned(t){const e=Object.create(null,{onSpawned:{get:()=>super.onSpawned}});return e4(this,void 0,void 0,function*(){yield e.onSpawned.call(this,t),this._spherical=Pe.toSpherical(Pe.rot({x:0,y:0,z:-1},this.camera.rotation));const n=["KeyE","KeyQ"];this.camera.camera.supportsFov&&n.push("KeyZ","KeyC"),n.push("ShiftLeft");let r=nu([this.directionsInput.output$,...n.map(c=>this.keyboard.bind(c))]).pipe(He(this._onRemoved$),et(([c,...d])=>{let h={direction:{},rest:[]};(!this.options.ignoreKeyboardUnlessPointerLocked||this.mouseInput.isPointerLocked)&&(h={direction:c,rest:d});let p=Object.assign({},Pe.O);const[m,g,b,v,y]=h.rest;void 0!==h.direction.upDown&&(p.z=h.direction.upDown?-1:1),void 0!==h.direction.leftRight&&(p.x=h.direction.leftRight?-1:1),m!=g&&(p.y=g?-1:1);let M=0;return b!=v&&(M=b?1:-1),p=Pe.norm(p),y&&(p=Pe.scalarMult(p,this.options.cameraBoostMultiplier)),[p,M]}));this.options.cameraMovementElasticity>0&&(r=r.pipe(tk(this.camera.tick$,this.options.cameraMovementElasticity,([c,d],[h,p],m)=>[Pe.lerp(c,h,m),p],([c,d],[h,p])=>d==p&&Pe.dist(c,h)<.001)));let s=Pe.O,o=0;r.subscribe(([c,d])=>{s=c,o=d});let a=qm.isTouchDevice(),l=this.mouseInput.delta$.pipe(He(this._onRemoved$),gn(()=>this.active&&(a||!this.options.ignoreMouseUnlessPointerLocked||this.mouseInput.isPointerLocked)));if(this.options.cameraRotationElasticity>0){const c=new gt(this._spherical);l.subscribe(h=>{const p=c.getValue();c.next({phi:Math.max(1e-6,Math.min(Math.PI-1e-6,p.phi+h.y*this.options.cameraRotationSensitivity/1e3)),theta:p.theta-h.x*this.options.cameraRotationSensitivity/1e3,radius:1})});const d=()=>{c.pipe(He(this._onRemoved$),tk(this.tick$,this.options.cameraRotationElasticity,(h,p,m)=>({phi:h.phi+m*(p.phi-h.phi),theta:h.theta+m*(p.theta-h.theta),radius:1}),(h,p)=>qr.dist({x:h.phi,y:h.theta},{x:p.phi,y:p.theta})<1e-4),He(this.resetMotion$)).subscribe(h=>{this._spherical.theta=h.theta,this._spherical.phi=h.phi})};this.resetMotion$.pipe(He(this._onRemoved$)).subscribe(()=>{c.next(this._spherical),d()}),d()}else l.subscribe(c=>{this._spherical.theta-=c.x*this.options.cameraRotationSensitivity/1e3,this._spherical.phi+=c.y*this.options.cameraRotationSensitivity/1e3,this._spherical.phi=Math.max(1e-6,Math.min(Math.PI-1e-6,this._spherical.phi))});this.camera.tick$.pipe(He(this._onRemoved$),gn(()=>this.active)).subscribe(([c,d])=>{this.camera.camera.fov+=o,this.camera.position=Pe.add(this.camera.position,Pe.rot(Pe.scalarMult(s,this.options.cameraLinearSpeed*d/1e3),this.camera.rotation)),this.camera.rotation=ji.lookAt(this.camera.position,Pe.add(this.camera.position,Pe.fromSpherical(this._spherical)))}),this.mouseInput.start(),this.directionsInput.start()})}onRemoved(){const t=Object.create(null,{onRemoved:{get:()=>super.onRemoved}});return e4(this,void 0,void 0,function*(){yield t.onRemoved.call(this),yield this.mouseInput.stop(!0),yield this.directionsInput.stop()})}}var i4=function(i,t,e,n){return new(e||(e=Promise))(function(s,o){function a(d){try{c(n.next(d))}catch(h){o(h)}}function l(d){try{c(n.throw(d))}catch(h){o(h)}}function c(d){d.done?s(d.value):function r(s){return s instanceof e?s:new e(function(o){o(s)})}(d.value).then(a,l)}c((n=n.apply(i,t||[])).next())})};const Rse={mouseOptions:{},orbiting:{sensitivityX:1,sensitivityY:1},orbitingElasticity:0,zooming:{sensitivity:1},panning:{sensitivityX:1,sensitivityY:1},dollying:{sensitivity:1}};class kse extends Xh{get active(){return super.active}set active(t){!super.active&&t&&this.reset(),super.active=t}get spherical(){return this._spherical}set spherical(t){this._spherical.phi=Math.max(1e-6,Math.min(Math.PI-1e-6,t.phi)),this._spherical.theta=t.theta,this._spherical.radius=t.radius,this.resetMotion$.next()}constructor(t,e={}){super(),this.camera=t,this.tickOrder=sc.INPUT_CONTROLLERS,this._spherical={phi:0,radius:10,theta:0},this.target=Pe.O,this.resetMotion$=new Re,this.options=Object.assign(Object.assign({},Rse),e),this.mouseInput=new qm(this.options.mouseOptions)}reset(){let t=Pe.dist(this.target,this.camera.position);this.target=Pe.add(this.camera.position,Pe.rot({x:0,y:0,z:-t},this.camera.rotation)),this._spherical=Pe.toSpherical(Pe.sub(this.camera.position,this.target)),this.resetMotion$.next()}onSpawned(t){const e=Object.create(null,{onSpawned:{get:()=>super.onSpawned}});return i4(this,void 0,void 0,function*(){if(yield e.onSpawned.call(this,t),this._spherical=Pe.toSpherical(Pe.sub(this.camera.position,this.target)),this.options.orbiting){let r=this.mouseInput.delta$.pipe(He(this._onRemoved$),gn(()=>this.active&&this.mouseInput.state==Fs.DRAG));if(this.options.orbitingElasticity>0){const s=new gt(this._spherical);r.subscribe(a=>{const l=s.getValue();s.next({phi:Math.max(1e-6,Math.min(Math.PI-1e-6,l.phi-a.y*this.options.orbiting.sensitivityY/1e3)),theta:l.theta-a.x*this.options.orbiting.sensitivityX/1e3,radius:1})});const o=()=>{s.pipe(He(this._onRemoved$),tk(this.tick$,this.options.orbitingElasticity,(a,l,c)=>({phi:a.phi+c*(l.phi-a.phi),theta:a.theta+c*(l.theta-a.theta),radius:1}),(a,l)=>qr.dist({x:a.phi,y:a.theta},{x:l.phi,y:l.theta})<1e-4),He(this.resetMotion$)).subscribe(a=>{this._spherical.theta=a.theta,this._spherical.phi=a.phi})};this.resetMotion$.pipe(He(this._onRemoved$)).subscribe(()=>{s.next(this._spherical),o()}),o()}else r.subscribe(s=>{this._spherical.theta-=s.x*this.options.orbiting.sensitivityX/1e3,this._spherical.phi-=s.y*this.options.orbiting.sensitivityY/1e3,this._spherical.phi=Math.max(1e-6,Math.min(Math.PI-1e-6,this._spherical.phi))})}this.options.zooming&&this.mouseInput.wheel$.pipe(He(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=Pe.fromSpherical(this._spherical),o=Pe.rotAround(s,{x:-Math.sin(this._spherical.theta),y:Math.cos(this._spherical.theta),z:0},Math.PI/2),a=Pe.rotAround(s,Pe.norm(o),Math.PI/2);this.target=Pe.add(this.target,Pe.add(Pe.scalarMult(o,-this.options.panning.sensitivityY*r.y/1e3),Pe.scalarMult(a,this.options.panning.sensitivityX*r.x/1e3)))};this.options.panning&&this.mouseInput.delta$.pipe(He(this._onRemoved$),gn(()=>this.mouseInput.state==Fs.DRAG_RIGHT_BUTTON)).subscribe(r=>{n(r)}),this.options.dollying&&this.mouseInput.delta$.pipe(He(this._onRemoved$),gn(()=>this.mouseInput.state==Fs.DRAG_MIDDLE_BUTTON)).subscribe(r=>{this._spherical.radius*=Math.pow(.95,-this.options.dollying.sensitivity*r.y/10)}),qm.isTouchDevice()&&(this.options.dollying||this.options.panning)&&this.mouseInput.twoTouchGestureDelta$.pipe(He(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(He(this._onRemoved$),gn(()=>this.active),et(()=>this._spherical)).subscribe(r=>{this.camera.position=Pe.add(this.target,Pe.fromSpherical(r)),this.camera.rotation=ji.lookAt(this.camera.position,this.target)}),yield this.mouseInput.start()})}onRemoved(){const t=Object.create(null,{onRemoved:{get:()=>super.onRemoved}});return i4(this,void 0,void 0,function*(){yield t.onRemoved.call(this),yield this.mouseInput.stop(!0)})}}class Ose{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 rk=function(i,t,e,n){return new(e||(e=Promise))(function(s,o){function a(d){try{c(n.next(d))}catch(h){o(h)}}function l(d){try{c(n.throw(d))}catch(h){o(h)}}function c(d){d.done?s(d.value):function r(s){return s instanceof e?s:new e(function(o){o(s)})}(d.value).then(a,l)}c((n=n.apply(i,t||[])).next())})},yu=(()=>{return(i=yu||(yu={}))[i.Nothing=0]="Nothing",i[i.Files=1]="Files",i[i.Entities=2]="Entities",yu;var i})();const r4={cachingStrategy:yu.Nothing,position:Pe.O,rotation:ji.O,loadProps:!0},s4=i=>({meta:i.meta,resources:i.resources.map(({object3D:t,body:e})=>({object3D:t&&t.clone(),body:e&&e.clone()}))});class Fse{constructor(t){this.world=t,this.filesCache=new Map,this.loadResultCache=new Map}loadGgGlbFiles(t){return rk(this,arguments,void 0,function*(e,n=!1){if(n&&this.filesCache.has(e))return this.filesCache.get(e);const r=Promise.all([fetch(`${e}.glb`).then(o=>o.arrayBuffer()),fetch(`${e}.meta`).then(o=>o.text()).then(o=>JSON.parse(o))]);n&&this.filesCache.set(e,r);const s=yield r;return n&&this.filesCache.set(e,s),s})}loadGgGlbResources(t){return rk(this,arguments,void 0,function*(e,n=yu.Nothing){if(n==yu.Entities&&this.loadResultCache.has(e)){const c=this.loadResultCache.get(e),d=c instanceof Promise?yield c:c;return s4(d)}const[r,s]=yield this.loadGgGlbFiles(e,n==yu.Files);if(!r)throw new Error("GLB not found");const[o,a]=yield Promise.all([this.world.visualScene.loader.loadFromGgGlb(r,s),this.world.physicsWorld.loader.loadFromGgGlb(r,s)]),l={resources:[],meta:s};if(!o)return l;if(0==a.length)l.resources.push({object3D:o,body:null});else if(1==a.length)l.resources.push({object3D:o,body:a[0]});else{for(const c of a)l.resources.push({object3D:o.popChild(c.name),body:c});o.isEmpty()||l.resources.push({object3D:o,body:null})}return n==yu.Entities&&this.loadResultCache.set(e,s4(l)),l})}loadGgGlb(t){return rk(this,arguments,void 0,function*(e,n=r4){const r=Object.assign(Object.assign({},r4),n),{resources:s,meta:o}=yield this.loadGgGlbResources(e,r.cachingStrategy),a={entities:s.map(l=>new Qo({object3D:l.object3D,objectBody:l.body})),meta:o};return r.loadProps&&(a.props=yield Promise.all(o.dummies.filter(l=>l.is_prop||l.is_scene).map(l=>this.loadGgGlb(l.is_prop?(r.propsPath||e.substring(0,e.lastIndexOf("/")+1))+l.prop_id:l.scene_id,{loadProps:!!l.is_scene,position:Pe.add(Pe.rot(l.position,r.rotation),r.position),rotation:ji.combineRotations(l.rotation,r.rotation)})))),a.entities.forEach(l=>{l.position=Pe.add(Pe.rot(Pe.clone(l.position),r.rotation),r.position),l.rotation=ji.mult(ji.clone(l.rotation),r.rotation)}),a})}}class sk extends yl{constructor(t,e){super(t,e),this.visualScene=t,this.physicsWorld=e,this.loader=new Fse(this)}addPrimitiveRigidBody(t,e=Pe.O,n=ji.O,r={}){const s=new Qo({object3D:this.visualScene.factory.createPrimitive(t.shape,r),objectBody:this.physicsWorld.factory.createRigidBody(t)});return s.position=e,s.rotation=n,this.addEntity(s),s}addRenderer(t,e,n){const r=new Tse(this.visualScene.createRenderer(t,e,n));return this.addEntity(r),r}registerConsoleCommands(t){super.registerConsoleCommands(t),t.registerConsoleCommand(this,"gravity",(...e)=>function(i,t,e,n){return new(e||(e=Promise))(function(s,o){function a(d){try{c(n.next(d))}catch(h){o(h)}}function l(d){try{c(n.throw(d))}catch(h){o(h)}}function c(d){d.done?s(d.value):function r(s){return s instanceof e?s:new e(function(o){o(s)})}(d.value).then(a,l)}c((n=n.apply(i,t||[])).next())})}(this,void 0,void 0,function*(){if(1==e.length&&(e=["0","0",""+-+e[0]]),e.length>0){if(isNaN(+e[0])||isNaN(+e[1])||isNaN(+e[2]))throw new Error("Wrong arguments");this.physicsWorld.gravity={x:+e[0],y:+e[1],z:+e[2]}}return JSON.stringify(this.physicsWorld.gravity)}),'args: [ ?float, ?float, ?float ]; Get or set 3D world gravity vector. 1 argument sets vector {x: 0, y: 0, z: -value}, 3 arguments set the whole vector. Default value is "9.82" or "0 0 -9.82"')}}function o4(i,t=$y,e){const n=OI(i,t);return function Nse(i,t){return ti((e,n)=>{const{leading:r=!0,trailing:s=!1}=t??{};let o=!1,a=null,l=null,c=!1;const d=()=>{l?.unsubscribe(),l=null,s&&(m(),c&&n.complete())},h=()=>{l=null,c&&n.complete()},p=g=>l=wr(i(g)).subscribe(Yn(n,d,h)),m=()=>{if(o){o=!1;const g=a;a=null,n.next(g),!c&&p(g)}};e.subscribe(Yn(n,g=>{o=!0,a=g,(!l||l.closed)&&(r?m():p(g))},()=>{c=!0,(!(s&&o&&l)||l.closed)&&n.complete()}))})}(()=>n,e)}window.gg_version="0.0.56";const Bse=0,a4=1,Use=2,l4=1,c4=2,Zc=3,ac=0,Ro=1,Ls=2,Qc=0,Zm=1,d4=2,u4=3,h4=4,Vse=5,Kh=100,zse=101,Hse=102,Gse=103,$se=104,Wse=200,jse=201,Yse=202,qse=203,ak=204,lk=205,Xse=206,Kse=207,Zse=208,Qse=209,Jse=210,eoe=211,toe=212,noe=213,ioe=214,roe=0,soe=1,ooe=2,SC=3,aoe=4,loe=5,coe=6,doe=7,EC=0,uoe=1,hoe=2,bu=0,foe=1,poe=2,moe=3,goe=4,_oe=5,voe=6,yoe=7,f4="attached",lc=301,Zh=302,AC=303,DC=304,mb=306,Ns=1e3,Ji=1001,gb=1002,_r=1003,dk=1004,Qm=1005,lr=1006,_b=1007,bl=1008,Jc=1009,p4=1010,m4=1011,vb=1012,uk=1013,xu=1014,Jo=1015,Jm=1016,hk=1017,fk=1018,eg=1020,g4=35902,_4=1021,v4=1022,ko=1023,y4=1024,b4=1025,tg=1026,ng=1027,pk=1028,TC=1029,x4=1030,mk=1031,gk=1033,IC=33776,RC=33777,kC=33778,PC=33779,_k=35840,vk=35841,yk=35842,bk=35843,xk=36196,wk=37492,Mk=37496,Ck=37808,Sk=37809,Ek=37810,Ak=37811,Dk=37812,Tk=37813,Ik=37814,Rk=37815,kk=37816,Pk=37817,Ok=37818,Fk=37819,Lk=37820,Nk=37821,OC=36492,Bk=36494,Uk=36495,w4=36283,Vk=36284,zk=36285,Hk=36286,yb=2300,bb=2301,Coe=0,C4=1,Wk=2,Eoe=3201,Qh=0,Aoe=1,wu="",cs="srgb",ds="srgb-linear",jk="display-p3",LC="display-p3-linear",NC="linear",Oi="srgb",BC="rec709",UC="p3",sg=7680,Doe=512,Toe=513,Ioe=514,E4=515,Roe=516,koe=517,Poe=518,Ooe=519,A4="300 es",ed=2e3;class og{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]+Bs[i>>16&255]+Bs[i>>24&255]+"-"+Bs[255&t]+Bs[t>>8&255]+"-"+Bs[t>>16&15|64]+Bs[t>>24&255]+"-"+Bs[63&e|128]+Bs[e>>8&255]+"-"+Bs[e>>16&255]+Bs[e>>24&255]+Bs[255&n]+Bs[n>>8&255]+Bs[n>>16&255]+Bs[n>>24&255]).toLowerCase()}function er(i,t,e){return Math.max(t,Math.min(e,i))}function Yk(i,t){return(i%t+t)%t}function xb(i,t,e){return(1-e)*i+e*t}function co(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 yn(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 Zoe_radToDeg=function joe(i){return i*ag};class xe{constructor(t=0,e=0){xe.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(er(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 wn{constructor(t,e,n,r,s,o,a,l,c){wn.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 d=this.elements;return d[0]=t,d[1]=r,d[2]=a,d[3]=e,d[4]=s,d[5]=l,d[6]=n,d[7]=o,d[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],d=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],F=r[2],D=r[5],k=r[8];return s[0]=o*b+a*M+l*F,s[3]=o*v+a*x+l*D,s[6]=o*y+a*C+l*k,s[1]=c*b+d*M+h*F,s[4]=c*v+d*x+h*D,s[7]=c*y+d*C+h*k,s[2]=p*b+m*M+g*F,s[5]=p*v+m*x+g*D,s[8]=p*y+m*C+g*k,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],d=t[8];return e*o*d-e*a*c-n*s*d+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],d=t[8],h=d*o-a*c,p=a*l-d*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-d*n)*b,t[2]=(a*n-r*o)*b,t[3]=p*b,t[4]=(d*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(qk.makeScale(t,e)),this}rotate(t){return this.premultiply(qk.makeRotation(-t)),this}translate(t,e){return this.premultiply(qk.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 qk=new wn;function T4(i){for(let t=i.length-1;t>=0;--t)if(i[t]>=65535)return!0;return!1}function wb(i){return document.createElementNS("http://www.w3.org/1999/xhtml",i)}function Joe(){const i=wb("canvas");return i.style.display="block",i}Int8Array,Uint8Array,Uint8ClampedArray,Int16Array,Uint16Array,Int32Array,Uint32Array,Float32Array,Float64Array;const I4={};function cg(i){i in I4||(I4[i]=!0,console.warn(i))}const R4=(new wn).set(.8224621,.177538,0,.0331941,.9668058,0,.0170827,.0723974,.9105199),k4=(new wn).set(1.2249401,-.2249404,0,-.0420569,1.0420571,0,-.0196376,-.0786361,1.0982735),Mb={[ds]:{transfer:NC,primaries:BC,luminanceCoefficients:[.2126,.7152,.0722],toReference:i=>i,fromReference:i=>i},[cs]:{transfer:Oi,primaries:BC,luminanceCoefficients:[.2126,.7152,.0722],toReference:i=>i.convertSRGBToLinear(),fromReference:i=>i.convertLinearToSRGB()},[LC]:{transfer:NC,primaries:UC,luminanceCoefficients:[.2289,.6917,.0793],toReference:i=>i.applyMatrix3(k4),fromReference:i=>i.applyMatrix3(R4)},[jk]:{transfer:Oi,primaries:UC,luminanceCoefficients:[.2289,.6917,.0793],toReference:i=>i.convertSRGBToLinear().applyMatrix3(k4),fromReference:i=>i.applyMatrix3(R4).convertLinearToSRGB()}},tae=new Set([ds,LC]),Jn={enabled:!0,_workingColorSpace:ds,get workingColorSpace(){return this._workingColorSpace},set workingColorSpace(i){if(!tae.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,Mb[e].fromReference)((0,Mb[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 Mb[i].primaries},getTransfer:function(i){return i===wu?NC:Mb[i].transfer},getLuminanceCoefficients:function(i,t=this._workingColorSpace){return i.fromArray(Mb[t].luminanceCoefficients)}};function dg(i){return i<.04045?.0773993808*i:Math.pow(.9478672986*i+.0521327014,2.4)}function Xk(i){return i<.0031308?12.92*i:1.055*Math.pow(i,.41666)-.055}let ug;class nae{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===ug&&(ug=wb("canvas")),ug.width=t.width,ug.height=t.height;const n=ug.getContext("2d");t instanceof ImageData?n.putImageData(t,0,0):n.drawImage(t,0,0,t.width,t.height),e=ug}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=wb("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 og{constructor(e=i.DEFAULT_IMAGE,n=i.DEFAULT_MAPPING,r=Ji,s=Ji,o=lr,a=bl,l=ko,c=Jc,d=i.DEFAULT_ANISOTROPY,h=wu){super(),this.isTexture=!0,Object.defineProperty(this,"id",{value:rae++}),this.uuid=ea(),this.name="",this.source=new hg(e),this.mipmaps=[],this.mapping=n,this.channel=0,this.wrapS=r,this.wrapT=s,this.magFilter=o,this.minFilter=a,this.anisotropy=d,this.format=l,this.internalFormat=null,this.type=c,this.offset=new xe(0,0),this.repeat=new xe(1,1),this.center=new xe(0,0),this.rotation=0,this.matrixAutoUpdate=!0,this.matrix=new wn,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 Ns:e.x=e.x-Math.floor(e.x);break;case Ji:e.x=e.x<0?0:1;break;case gb: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 Ns:e.y=e.y-Math.floor(e.y);break;case Ji:e.y=e.y<0?0:1;break;case gb: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 gi{constructor(t=0,e=0,n=0,r=1){gi.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],d=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(d-p)<.01&&Math.abs(h-b)<.01&&Math.abs(g-v)<.01){if(Math.abs(d+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,F=(y+1)/2,D=(d+p)/4,k=(h+b)/4,B=(g+v)/4;return x>C&&x>F?x<.01?(n=0,r=.707106781,s=.707106781):(n=Math.sqrt(x),r=D/n,s=k/n):C>F?C<.01?(n=.707106781,r=0,s=.707106781):(r=Math.sqrt(C),n=D/r,s=B/r):F<.01?(n=.707106781,r=.707106781,s=0):(s=Math.sqrt(F),n=k/s,r=B/s),this.set(n,r,s,e),this}let M=Math.sqrt((v-g)*(v-g)+(h-b)*(h-b)+(p-d)*(p-d));return Math.abs(M)<.001&&(M=1),this.x=(v-g)/M,this.y=(h-b)/M,this.z=(p-d)/M,this.w=Math.acos((c+m+y-1)/2),this}setFromMatrixPosition(t){const e=t.elements;return this.x=e[12],this.y=e[13],this.z=e[14],this.w=e[15],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 sae extends og{constructor(t=1,e=1,n={}){super(),this.isRenderTarget=!0,this.width=t,this.height=e,this.depth=1,this.scissor=new gi(0,0,t,e),this.scissorTest=!1,this.viewport=new gi(0,0,t,e);const r={width:t,height:e,depth:1};n=Object.assign({generateMipmaps:!1,internalFormat:null,minFilter:lr,depthBuffer:!0,stencilBuffer:!1,resolveDepthBuffer:!0,resolveStencilBuffer:!0,depthTexture:null,samples:0,count:1},n);const s=new Po(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 F=Math.sqrt(x),D=Math.atan2(F,y*M);v=Math.sin(v*D)/F,a=Math.sin(a*D)/F}const C=a*M;if(l=l*v+p*C,c=c*v+m*C,d=d*v+g*C,h=h*v+b*C,v===1-a){const F=1/Math.sqrt(l*l+c*c+d*d+h*h);l*=F,c*=F,d*=F,h*=F}}t[e]=l,t[e+1]=c,t[e+2]=d,t[e+3]=h}static multiplyQuaternionsFlat(t,e,n,r,s,o){const a=n[r],l=n[r+1],c=n[r+2],d=n[r+3],h=s[o],p=s[o+1],m=s[o+2],g=s[o+3];return t[e]=a*g+d*h+l*m-c*p,t[e+1]=l*g+d*p+c*h-a*m,t[e+2]=c*g+d*m+a*p-l*h,t[e+3]=d*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),d=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*d*h+c*m*g,this._y=c*m*h-p*d*g,this._z=c*d*g+p*m*h,this._w=c*d*h-p*m*g;break;case"YXZ":this._x=p*d*h+c*m*g,this._y=c*m*h-p*d*g,this._z=c*d*g-p*m*h,this._w=c*d*h+p*m*g;break;case"ZXY":this._x=p*d*h-c*m*g,this._y=c*m*h+p*d*g,this._z=c*d*g+p*m*h,this._w=c*d*h-p*m*g;break;case"ZYX":this._x=p*d*h-c*m*g,this._y=c*m*h+p*d*g,this._z=c*d*g-p*m*h,this._w=c*d*h+p*m*g;break;case"YZX":this._x=p*d*h+c*m*g,this._y=c*m*h+p*d*g,this._z=c*d*g-p*m*h,this._w=c*d*h-p*m*g;break;case"XZY":this._x=p*d*h-c*m*g,this._y=c*m*h-p*d*g,this._z=c*d*g+p*m*h,this._w=c*d*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],d=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=(d-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=(d-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+d)/m}else{const m=2*Math.sqrt(1+h-n-a);this._w=(o-r)/m,this._x=(s+c)/m,this._y=(l+d)/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(er(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,d=e._w;return this._x=n*d+o*a+r*c-s*l,this._y=r*d+o*l+s*a-n*c,this._z=s*d+o*c+n*l-r*a,this._w=o*d-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),d=Math.atan2(c,a),h=Math.sin((1-e)*d)/c,p=Math.sin(e*d)/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 O{constructor(t=0,e=0,n=0){O.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(O4.setFromEuler(t))}applyAxisAngle(t,e){return this.applyQuaternion(O4.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),d=2*(a*e-s*r),h=2*(s*n-o*e);return this.x=e+l*c+o*h-a*d,this.y=n+l*d+a*c-s*h,this.z=r+l*h+s*d-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 Qk.copy(this).projectOnVector(t),this.sub(Qk)}reflect(t){return this.sub(Qk.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(er(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 Qk=new O,O4=new uo;class Us{constructor(t=new O(1/0,1/0,1/0),e=new O(-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;e=this.min.x&&t.x<=this.max.x&&t.y>=this.min.y&&t.y<=this.max.y&&t.z>=this.min.z&&t.z<=this.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.x>=this.min.x&&t.min.x<=this.max.x&&t.max.y>=this.min.y&&t.min.y<=this.max.y&&t.max.z>=this.min.z&&t.min.z<=this.max.z}intersectsSphere(t){return this.clampPoint(t.center,xl),xl.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(Cb),GC.subVectors(this.max,Cb),fg.subVectors(t.a,Cb),pg.subVectors(t.b,Cb),mg.subVectors(t.c,Cb),Cu.subVectors(pg,fg),Su.subVectors(mg,pg),ef.subVectors(fg,mg);let e=[0,-Cu.z,Cu.y,0,-Su.z,Su.y,0,-ef.z,ef.y,Cu.z,0,-Cu.x,Su.z,0,-Su.x,ef.z,0,-ef.x,-Cu.y,Cu.x,0,-Su.y,Su.x,0,-ef.y,ef.x,0];return!(!Jk(e,fg,pg,mg,GC)||(e=[1,0,0,0,1,0,0,0,1],!Jk(e,fg,pg,mg,GC)))&&($C.crossVectors(Cu,Su),e=[$C.x,$C.y,$C.z],Jk(e,fg,pg,mg,GC))}clampPoint(t,e){return e.copy(t).clamp(this.min,this.max)}distanceToPoint(t){return this.clampPoint(t,xl).distanceTo(t)}getBoundingSphere(t){return this.isEmpty()?t.makeEmpty():(this.getCenter(t.center),t.radius=.5*this.getSize(xl).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()||(td[0].set(this.min.x,this.min.y,this.min.z).applyMatrix4(t),td[1].set(this.min.x,this.min.y,this.max.z).applyMatrix4(t),td[2].set(this.min.x,this.max.y,this.min.z).applyMatrix4(t),td[3].set(this.min.x,this.max.y,this.max.z).applyMatrix4(t),td[4].set(this.max.x,this.min.y,this.min.z).applyMatrix4(t),td[5].set(this.max.x,this.min.y,this.max.z).applyMatrix4(t),td[6].set(this.max.x,this.max.y,this.min.z).applyMatrix4(t),td[7].set(this.max.x,this.max.y,this.max.z).applyMatrix4(t),this.setFromPoints(td)),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 td=[new O,new O,new O,new O,new O,new O,new O,new O],xl=new O,HC=new Us,fg=new O,pg=new O,mg=new O,Cu=new O,Su=new O,ef=new O,Cb=new O,GC=new O,$C=new O,tf=new O;function Jk(i,t,e,n,r){for(let s=0,o=i.length-3;s<=o;s+=3){tf.fromArray(i,s);const a=r.x*Math.abs(tf.x)+r.y*Math.abs(tf.y)+r.z*Math.abs(tf.z),l=t.dot(tf),c=e.dot(tf),d=n.dot(tf);if(Math.max(-Math.max(l,c,d),Math.min(l,c,d))>a)return!1}return!0}const oae=new Us,Sb=new O,eP=new O;class Vs{constructor(t=new O,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):oae.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;Sb.subVectors(t,this.center);const e=Sb.lengthSq();if(e>this.radius*this.radius){const n=Math.sqrt(e),r=.5*(n-this.radius);this.center.addScaledVector(Sb,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):(eP.subVectors(t.center,this.center).setLength(t.radius),this.expandByPoint(Sb.copy(t.center).add(eP)),this.expandByPoint(Sb.copy(t.center).sub(eP))),this)}equals(t){return t.center.equals(this.center)&&t.radius===this.radius}clone(){return(new this.constructor).copy(this)}}const nd=new O,tP=new O,WC=new O,Eu=new O,nP=new O,jC=new O,iP=new O;class Eb{constructor(t=new O,e=new O(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,nd)),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=nd.subVectors(t,this.origin).dot(this.direction);return e<0?this.origin.distanceToSquared(t):(nd.copy(this.origin).addScaledVector(this.direction,e),nd.distanceToSquared(t))}distanceSqToSegment(t,e,n,r){tP.copy(t).add(e).multiplyScalar(.5),WC.copy(e).sub(t).normalize(),Eu.copy(this.origin).sub(tP);const s=.5*t.distanceTo(e),o=-this.direction.dot(WC),a=Eu.dot(this.direction),l=-Eu.dot(WC),c=Eu.lengthSq(),d=Math.abs(1-o*o);let h,p,m,g;if(d>0)if(h=o*l-a,p=o*a-l,g=s*d,h>=0)if(p>=-g)if(p<=g){const b=1/d;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(tP).addScaledVector(WC,p),m}intersectSphere(t,e){nd.subVectors(t.center,this.origin);const n=nd.dot(this.direction),r=nd.dot(nd)-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,d=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),d>=0?(s=(t.min.y-p.y)*d,o=(t.max.y-p.y)*d):(s=(t.max.y-p.y)*d,o=(t.min.y-p.y)*d),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,nd)}intersectTriangle(t,e,n,r,s){nP.subVectors(e,t),jC.subVectors(n,t),iP.crossVectors(nP,jC);let a,o=this.direction.dot(iP);if(o>0){if(r)return null;a=1}else{if(!(o<0))return null;a=-1,o=-o}Eu.subVectors(this.origin,t);const l=a*this.direction.dot(jC.crossVectors(Eu,jC));if(l<0)return null;const c=a*this.direction.dot(nP.cross(Eu));if(c<0||l+c>o)return null;const d=-a*Eu.dot(iP);return d<0?null:this.at(d/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 Nt{constructor(t,e,n,r,s,o,a,l,c,d,h,p,m,g,b,v){Nt.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,d,h,p,m,g,b,v)}set(t,e,n,r,s,o,a,l,c,d,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]=d,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 Nt).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/gg.setFromMatrixColumn(t,0).length(),s=1/gg.setFromMatrixColumn(t,1).length(),o=1/gg.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),d=Math.cos(s),h=Math.sin(s);if("XYZ"===t.order){const p=o*d,m=o*h,g=a*d,b=a*h;e[0]=l*d,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*d,m=l*h,g=c*d,b=c*h;e[0]=p+b*a,e[4]=g*a-m,e[8]=o*c,e[1]=o*h,e[5]=o*d,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*d,m=l*h,g=c*d,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*d,e[9]=b-p*a,e[2]=-o*c,e[6]=a,e[10]=o*l}else if("ZYX"===t.order){const p=o*d,m=o*h,g=a*d,b=a*h;e[0]=l*d,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*d,e[4]=b-p*h,e[8]=g*h+m,e[1]=h,e[5]=o*d,e[9]=-a*d,e[2]=-c*d,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*d,e[4]=-h,e[8]=c*d,e[1]=p*h+b,e[5]=o*d,e[9]=m*h-g,e[2]=g*h-m,e[6]=a*d,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(aae,t,lae)}lookAt(t,e,n){const r=this.elements;return ta.subVectors(t,e),0===ta.lengthSq()&&(ta.z=1),ta.normalize(),Au.crossVectors(n,ta),0===Au.lengthSq()&&(1===Math.abs(n.z)?ta.x+=1e-4:ta.z+=1e-4,ta.normalize(),Au.crossVectors(n,ta)),Au.normalize(),YC.crossVectors(ta,Au),r[0]=Au.x,r[4]=YC.x,r[8]=ta.x,r[1]=Au.y,r[5]=YC.y,r[9]=ta.y,r[2]=Au.z,r[6]=YC.z,r[10]=ta.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],d=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],F=n[15],D=r[0],k=r[4],B=r[8],T=r[12],A=r[1],$=r[5],ie=r[9],ne=r[13],se=r[2],ge=r[6],q=r[10],re=r[14],J=r[3],we=r[7],Ne=r[11],Ye=r[15];return s[0]=o*D+a*A+l*se+c*J,s[4]=o*k+a*$+l*ge+c*we,s[8]=o*B+a*ie+l*q+c*Ne,s[12]=o*T+a*ne+l*re+c*Ye,s[1]=d*D+h*A+p*se+m*J,s[5]=d*k+h*$+p*ge+m*we,s[9]=d*B+h*ie+p*q+m*Ne,s[13]=d*T+h*ne+p*re+m*Ye,s[2]=g*D+b*A+v*se+y*J,s[6]=g*k+b*$+v*ge+y*we,s[10]=g*B+b*ie+v*q+y*Ne,s[14]=g*T+b*ne+v*re+y*Ye,s[3]=M*D+x*A+C*se+F*J,s[7]=M*k+x*$+C*ge+F*we,s[11]=M*B+x*ie+C*q+F*Ne,s[15]=M*T+x*ne+C*re+F*Ye,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],d=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*d-s*l*d)+t[11]*(+e*c*h-e*a*m-s*o*h+n*o*m+s*a*d-n*c*d)+t[15]*(-r*a*d-e*l*h+e*a*p+r*o*h-n*o*p+n*l*d)}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],d=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-d*v*c-g*l*m+o*v*m+d*l*y-o*p*y,C=d*b*c-g*h*c+g*a*m-o*b*m-d*a*y+o*h*y,F=g*h*l-d*b*l-g*a*p+o*b*p+d*a*v-o*h*v,D=e*M+n*x+r*C+s*F;if(0===D)return this.set(0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0);const k=1/D;return t[0]=M*k,t[1]=(b*p*s-h*v*s-b*r*m+n*v*m+h*r*y-n*p*y)*k,t[2]=(a*v*s-b*l*s+b*r*c-n*v*c-a*r*y+n*l*y)*k,t[3]=(h*l*s-a*p*s-h*r*c+n*p*c+a*r*m-n*l*m)*k,t[4]=x*k,t[5]=(d*v*s-g*p*s+g*r*m-e*v*m-d*r*y+e*p*y)*k,t[6]=(g*l*s-o*v*s-g*r*c+e*v*c+o*r*y-e*l*y)*k,t[7]=(o*p*s-d*l*s+d*r*c-e*p*c-o*r*m+e*l*m)*k,t[8]=C*k,t[9]=(g*h*s-d*b*s-g*n*m+e*b*m+d*n*y-e*h*y)*k,t[10]=(o*b*s-g*a*s+g*n*c-e*b*c-o*n*y+e*a*y)*k,t[11]=(d*a*s-o*h*s-d*n*c+e*h*c+o*n*m-e*a*m)*k,t[12]=F*k,t[13]=(d*b*r-g*h*r+g*n*p-e*b*p-d*n*v+e*h*v)*k,t[14]=(g*a*r-o*b*r-g*n*l+e*b*l+o*n*v-e*a*v)*k,t[15]=(o*h*r-d*a*r+d*n*l-e*h*l-o*n*p+e*a*p)*k,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,d=s*a;return this.set(c*o+n,c*a-r*l,c*l+r*a,0,c*a+r*l,d*a+n,d*l-r*o,0,c*l-r*a,d*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,d=o+o,h=a+a,p=s*c,m=s*d,g=s*h,b=o*d,v=o*h,y=a*h,M=l*c,x=l*d,C=l*h,F=n.x,D=n.y,k=n.z;return r[0]=(1-(b+y))*F,r[1]=(m+C)*F,r[2]=(g-x)*F,r[3]=0,r[4]=(m-C)*D,r[5]=(1-(p+y))*D,r[6]=(v+M)*D,r[7]=0,r[8]=(g+x)*k,r[9]=(v-M)*k,r[10]=(1-(p+b))*k,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=gg.set(r[0],r[1],r[2]).length();const o=gg.set(r[4],r[5],r[6]).length(),a=gg.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],wl.copy(this);const c=1/s,d=1/o,h=1/a;return wl.elements[0]*=c,wl.elements[1]*=c,wl.elements[2]*=c,wl.elements[4]*=d,wl.elements[5]*=d,wl.elements[6]*=d,wl.elements[8]*=h,wl.elements[9]*=h,wl.elements[10]*=h,e.setFromRotationMatrix(wl),n.x=s,n.y=o,n.z=a,this}makePerspective(t,e,n,r,s,o,a=ed){const l=this.elements,c=2*s/(e-t),d=2*s/(n-r),h=(e+t)/(e-t),p=(n+r)/(n-r);let m,g;if(a===ed)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]=d,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=ed){const l=this.elements,c=1/(e-t),d=1/(n-r),h=1/(o-s),p=(e+t)*c,m=(n+r)*d;let g,b;if(a===ed)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*d,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 gg=new O,wl=new Nt,aae=new O(0,0,0),lae=new O(1,1,1),Au=new O,YC=new O,ta=new O,F4=new Nt,L4=new uo;let id=(()=>{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],d=s[5],h=s[9],p=s[2],m=s[6],g=s[10];switch(n){case"XYZ":this._y=Math.asin(er(l,-1,1)),Math.abs(l)<.9999999?(this._x=Math.atan2(-h,g),this._z=Math.atan2(-a,o)):(this._x=Math.atan2(m,d),this._z=0);break;case"YXZ":this._x=Math.asin(-er(h,-1,1)),Math.abs(h)<.9999999?(this._y=Math.atan2(l,g),this._z=Math.atan2(c,d)):(this._y=Math.atan2(-p,o),this._z=0);break;case"ZXY":this._x=Math.asin(er(m,-1,1)),Math.abs(m)<.9999999?(this._y=Math.atan2(-p,g),this._z=Math.atan2(-a,d)):(this._y=0,this._z=Math.atan2(c,o));break;case"ZYX":this._y=Math.asin(-er(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,d));break;case"YZX":this._z=Math.asin(er(c,-1,1)),Math.abs(c)<.9999999?(this._x=Math.atan2(-h,d),this._y=Math.atan2(-p,o)):(this._x=0,this._y=Math.atan2(l,g));break;case"XZY":this._z=Math.asin(-er(a,-1,1)),Math.abs(a)<.9999999?(this._x=Math.atan2(m,d),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 F4.makeRotationFromQuaternion(e),this.setFromRotationMatrix(F4,n,r)}setFromVector3(e,n=this._order){return this.set(e.x,e.y,e.z,n)}reorder(e){return L4.setFromEuler(this),this.setFromQuaternion(L4,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 rP{constructor(){this.mask=1}set(t){this.mask=(1<>>0}enable(t){this.mask|=1<{class i extends og{constructor(){super(),this.isObject3D=!0,Object.defineProperty(this,"id",{value:cae++}),this.uuid=ea(),this.name="",this.type="Object3D",this.parent=null,this.children=[],this.up=i.DEFAULT_UP.clone();const e=new O,n=new id,r=new uo,s=new O(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 Nt},normalMatrix:{value:new wn}}),this.matrix=new Nt,this.matrixWorld=new Nt,this.matrixAutoUpdate=i.DEFAULT_MATRIX_AUTO_UPDATE,this.matrixWorldAutoUpdate=i.DEFAULT_MATRIX_WORLD_AUTO_UPDATE,this.matrixWorldNeedsUpdate=!1,this.layers=new rP,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 _g.setFromAxisAngle(e,n),this.quaternion.multiply(_g),this}rotateOnWorldAxis(e,n){return _g.setFromAxisAngle(e,n),this.quaternion.premultiply(_g),this}rotateX(e){return this.rotateOnAxis(B4,e)}rotateY(e){return this.rotateOnAxis(U4,e)}rotateZ(e){return this.rotateOnAxis(V4,e)}translateOnAxis(e,n){return N4.copy(e).applyQuaternion(this.quaternion),this.position.add(N4.multiplyScalar(n)),this}translateX(e){return this.translateOnAxis(B4,e)}translateY(e){return this.translateOnAxis(U4,e)}translateZ(e){return this.translateOnAxis(V4,e)}localToWorld(e){return this.updateWorldMatrix(!0,!1),e.applyMatrix4(this.matrixWorld)}worldToLocal(e){return this.updateWorldMatrix(!0,!1),e.applyMatrix4(rd.copy(this.matrixWorld).invert())}lookAt(e,n,r){e.isVector3?qC.copy(e):qC.set(e,n,r);const s=this.parent;this.updateWorldMatrix(!0,!1),Ab.setFromMatrixPosition(this.matrixWorld),this.isCamera||this.isLight?rd.lookAt(Ab,qC,this.up):rd.lookAt(qC,Ab,this.up),this.quaternion.setFromRotationMatrix(rd),s&&(rd.extractRotation(s.matrixWorld),_g.setFromRotationMatrix(rd),this.quaternion.premultiply(_g.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.maxInstanceCount=this._maxInstanceCount,s.maxVertexCount=this._maxVertexCount,s.maxIndexCount=this._maxIndexCount,s.geometryInitialized=this._geometryInitialized,s.geometryCount=this._geometryCount,s.matricesTexture=this._matricesTexture.toJSON(e),null!==this._colorsTexture&&(s.colorsTexture=this._colorsTexture.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 d=0,h=c.length;d0){s.children=[];for(let l=0;l0){s.animations=[];for(let l=0;l0&&(r.geometries=l),c.length>0&&(r.materials=c),d.length>0&&(r.textures=d),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 d in l){const h=l[d];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){Ml.subVectors(r,e),sd.subVectors(n,e),oP.subVectors(t,e);const o=Ml.dot(Ml),a=Ml.dot(sd),l=Ml.dot(oP),c=sd.dot(sd),d=sd.dot(oP),h=o*c-a*a;if(0===h)return s.set(0,0,0),null;const p=1/h,m=(c*l-a*d)*p,g=(o*d-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,od)&&od.x>=0&&od.y>=0&&od.x+od.y<=1}static getInterpolation(t,e,n,r,s,o,a,l){return null===this.getBarycoord(t,e,n,r,od)?(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,od.x),l.addScaledVector(o,od.y),l.addScaledVector(a,od.z),l)}static isFrontFacing(t,e,n,r){return Ml.subVectors(n,e),sd.subVectors(t,e),Ml.cross(sd).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 Ml.subVectors(this.c,this.b),sd.subVectors(this.a,this.b),.5*Ml.cross(sd).length()}getMidpoint(t){return t.addVectors(this.a,this.b).add(this.c).multiplyScalar(1/3)}getNormal(t){return Oa.getNormal(this.a,this.b,this.c,t)}getPlane(t){return t.setFromCoplanarPoints(this.a,this.b,this.c)}getBarycoord(t,e){return Oa.getBarycoord(t,this.a,this.b,this.c,e)}getInterpolation(t,e,n,r,s){return Oa.getInterpolation(t,this.a,this.b,this.c,e,n,r,s)}containsPoint(t){return Oa.containsPoint(t,this.a,this.b,this.c)}isFrontFacing(t){return Oa.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;yg.subVectors(r,n),bg.subVectors(s,n),aP.subVectors(t,n);const l=yg.dot(aP),c=bg.dot(aP);if(l<=0&&c<=0)return e.copy(n);lP.subVectors(t,r);const d=yg.dot(lP),h=bg.dot(lP);if(d>=0&&h<=d)return e.copy(r);const p=l*h-d*c;if(p<=0&&l>=0&&d<=0)return o=l/(l-d),e.copy(n).addScaledVector(yg,o);cP.subVectors(t,s);const m=yg.dot(cP),g=bg.dot(cP);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(bg,a);const v=d*g-m*h;if(v<=0&&h-d>=0&&m-g>=0)return H4.subVectors(s,r),a=(h-d)/(h-d+(m-g)),e.copy(r).addScaledVector(H4,a);const y=1/(v+b+p);return o=b*y,a=p*y,e.copy(n).addScaledVector(yg,o).addScaledVector(bg,a)}equals(t){return t.a.equals(this.a)&&t.b.equals(this.b)&&t.c.equals(this.c)}}const G4={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},Du={h:0,s:0,l:0},XC={h:0,s:0,l:0};function dP(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 qe{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=cs){return t=Math.floor(t),this.r=(t>>16&255)/255,this.g=(t>>8&255)/255,this.b=(255&t)/255,Jn.toWorkingColorSpace(this,e),this}setRGB(t,e,n,r=Jn.workingColorSpace){return this.r=t,this.g=e,this.b=n,Jn.toWorkingColorSpace(this,r),this}setHSL(t,e,n,r=Jn.workingColorSpace){if(t=Yk(t,1),e=er(e,0,1),n=er(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=dP(o,s,t+1/3),this.g=dP(o,s,t),this.b=dP(o,s,t-1/3)}return Jn.toWorkingColorSpace(this,r),this}setStyle(t,e=cs){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=cs){const n=G4[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=dg(t.r),this.g=dg(t.g),this.b=dg(t.b),this}copyLinearToSRGB(t){return this.r=Xk(t.r),this.g=Xk(t.g),this.b=Xk(t.b),this}convertSRGBToLinear(){return this.copySRGBToLinear(this),this}convertLinearToSRGB(){return this.copyLinearToSRGB(this),this}getHex(t=cs){return Jn.fromWorkingColorSpace(zs.copy(this),t),65536*Math.round(er(255*zs.r,0,255))+256*Math.round(er(255*zs.g,0,255))+Math.round(er(255*zs.b,0,255))}getHexString(t=cs){return("000000"+this.getHex(t).toString(16)).slice(-6)}getHSL(t,e=Jn.workingColorSpace){Jn.fromWorkingColorSpace(zs.copy(this),e);const n=zs.r,r=zs.g,s=zs.b,o=Math.max(n,r,s),a=Math.min(n,r,s);let l,c;const d=(a+o)/2;if(a===o)l=0,c=0;else{const h=o-a;switch(c=d<=.5?h/(o+a):h/(2-o-a),o){case n:l=(r-s)/h+(r0!=t>0&&this.version++,this._alphaTest=t}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.dispersion&&(n.dispersion=this.dispersion),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!==Zm&&(n.blending=this.blending),this.side!==ac&&(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!==ak&&(n.blendSrc=this.blendSrc),this.blendDst!==lk&&(n.blendDst=this.blendDst),this.blendEquation!==Kh&&(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!==SC&&(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!==sg&&(n.stencilFail=this.stencilFail),this.stencilZFail!==sg&&(n.stencilZFail=this.stencilZFail),this.stencilZPass!==sg&&(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++}onBuild(){console.warn("Material: onBuild() has been removed.")}onBeforeRender(){console.warn("Material: onBeforeRender() has been removed.")}}class Yi extends Oo{constructor(t){super(),this.isMeshBasicMaterial=!0,this.type="MeshBasicMaterial",this.color=new qe(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 id,this.combine=EC,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 vr=new O,KC=new xe;class zi{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=Jo,this.version=0}onUploadCallback(){}set needsUpdate(t){!0===t&&this.version++}get updateRange(){return cg("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],d=[];for(let h=0,p=c.length;h0&&(r[l]=d,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 d=[],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))&&(j4.copy(s).invert(),nf.copy(t.ray).applyMatrix4(j4),(null===n.boundingBox||!1!==nf.intersectsBox(n.boundingBox))&&this._computeIntersections(t,e,nf)))}_computeIntersections(t,e,n){let r;const s=this.geometry,o=this.material,a=s.index,l=s.attributes.position,c=s.attributes.uv,d=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:iS.clone(),object:i}}(i,t,e,n,wg,Mg,Cg,nS);if(d){r&&(JC.fromBufferAttribute(r,a),eS.fromBufferAttribute(r,l),tS.fromBufferAttribute(r,c),d.uv=Oa.getInterpolation(nS,wg,Mg,Cg,JC,eS,tS,new xe)),s&&(JC.fromBufferAttribute(s,a),eS.fromBufferAttribute(s,l),tS.fromBufferAttribute(s,c),d.uv1=Oa.getInterpolation(nS,wg,Mg,Cg,JC,eS,tS,new xe)),o&&(q4.fromBufferAttribute(o,a),X4.fromBufferAttribute(o,l),K4.fromBufferAttribute(o,c),d.normal=Oa.getInterpolation(nS,wg,Mg,Cg,q4,X4,K4,new O),d.normal.dot(n.direction)>0&&d.normal.multiplyScalar(-1));const h={a,b:l,c,normal:new O,materialIndex:0};Oa.getNormal(wg,Mg,Cg,h.normal),d.face=h}return d}class rf 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=[],d=[],h=[];let p=0,m=0;function g(b,v,y,M,x,C,F,D,k,B,T){const A=C/k,$=F/B,ie=C/2,ne=F/2,se=D/2,ge=k+1,q=B+1;let re=0,J=0;const we=new O;for(let Ne=0;Ne0?1:-1,d.push(we.x,we.y,we.z),h.push(It/k),h.push(1-Ne/B),re+=1}for(let Ne=0;Ne0&&(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 fP extends Or{constructor(){super(),this.isCamera=!0,this.type="Camera",this.matrixWorldInverse=new Nt,this.projectionMatrix=new Nt,this.projectionMatrixInverse=new Nt,this.coordinateSystem=ed}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 Tu=new O,J4=new xe,e5=new xe;class yr extends fP{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*ag*Math.atan(e),this.updateProjectionMatrix()}getFocalLength(){const t=Math.tan(.5*Jh*this.fov);return.5*this.getFilmHeight()/t}getEffectiveFOV(){return 2*ag*Math.atan(Math.tan(.5*Jh*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){Tu.set(-1,-1,.5).applyMatrix4(this.projectionMatrixInverse),e.set(Tu.x,Tu.y).multiplyScalar(-t/Tu.z),Tu.set(1,1,.5).applyMatrix4(this.projectionMatrixInverse),n.set(Tu.x,Tu.y).multiplyScalar(-t/Tu.z)}getViewSize(t,e){return this.getViewBounds(t,J4,e5),e.subVectors(e5,J4)}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*Jh*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 bae extends Or{constructor(t,e,n){super(),this.type="CubeCamera",this.renderTarget=n,this.coordinateSystem=null,this.activeMipmapLevel=0;const r=new yr(-90,1,t,e);r.layers=this.layers,this.add(r);const s=new yr(-90,1,t,e);s.layers=this.layers,this.add(s);const o=new yr(-90,1,t,e);o.layers=this.layers,this.add(o);const a=new yr(-90,1,t,e);a.layers=this.layers,this.add(a);const l=new yr(-90,1,t,e);l.layers=this.layers,this.add(l);const c=new yr(-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===ed)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,d]=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,d),t.setRenderTarget(h,p,m),t.xr.enabled=g,n.texture.needsPMREMUpdate=!0}}class sS extends Po{constructor(t,e,n,r,s,o,a,l,c,d){super(t=void 0!==t?t:[],e=void 0!==e?e:lc,n,r,s,o,a,l,c,d),this.isCubeTexture=!0,this.flipY=!1}get images(){return this.image}set images(t){this.image=t}}class xae extends Mu{constructor(t=1,e={}){super(t,t,e),this.isWebGLCubeRenderTarget=!0;const n={width:t,height:t,depth:1};this.texture=new sS([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:lr}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 rf(5,5,5),s=new Cl({name:"CubemapFromEquirect",uniforms:Sg(n_uniforms),vertexShader:n_vertexShader,fragmentShader:n_fragmentShader,side:Ro,blending:Qc});s.uniforms.tEquirect.value=e;const o=new Mn(r,s),a=e.minFilter;return e.minFilter===bl&&(e.minFilter=lr),new bae(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 pP=new O,wae=new O,Mae=new wn;class sf{constructor(t=new O(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=pP.subVectors(n,e).cross(wae.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(pP),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||Mae.getNormalMatrix(t),r=this.coplanarPoint(pP).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 af=new Vs,oS=new O;class aS{constructor(t=new sf,e=new sf,n=new sf,r=new sf,s=new sf,o=new sf){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=ed){const n=this.planes,r=t.elements,s=r[0],o=r[1],a=r[2],l=r[3],c=r[4],d=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+d,v+g,C+M).normalize(),n[3].setComponents(l-o,p-d,v-g,C-M).normalize(),n[4].setComponents(l-a,p-h,v-b,C-x).normalize(),e===ed)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(),af.copy(t.boundingSphere).applyMatrix4(t.matrixWorld);else{const e=t.geometry;null===e.boundingSphere&&e.computeBoundingSphere(),af.copy(e.boundingSphere).applyMatrix4(t.matrixWorld)}return this.intersectsSphere(af)}intersectsSprite(t){return af.center.set(0,0,0),af.radius=.7071067811865476,af.applyMatrix4(t.matrixWorld),this.intersectsSphere(af)}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,oS.y=r.normal.y>0?t.max.y:t.min.y,oS.z=r.normal.z>0?t.max.z:t.min.z,r.distanceToPoint(oS)<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 t5(){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 Cae(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.isInterleavedBufferAttribute&&(a=a.data),a.isGLBufferAttribute){const d=t.get(a);return void((!d||d.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 ) || defined( USE_BATCHING_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 ) || defined( USE_BATCHING_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\n#ifdef USE_BATCHING_COLOR\n\tvec3 batchingColor = getBatchingColor( getIndirectIndex( gl_DrawID ) );\n\tvColor.xyz *= batchingColor.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}\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}",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_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\tfloat distanceFalloff = 1.0 / max( pow( lightDistance, decayExponent ), 0.01 );\n\tif ( cutoffDistance > 0.0 ) {\n\t\tdistanceFalloff *= pow2( saturate( 1.0 - pow4( lightDistance / cutoffDistance ) ) );\n\t}\n\treturn distanceFalloff;\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_DISPERSION\n\tmaterial.dispersion = dispersion;\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\tfloat dispersion;\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.shadowIntensity, 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.shadowIntensity, 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.shadowIntensity, 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 )\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\tfor ( int i = 0; i < MORPHTARGETS_COUNT; i ++ ) {\n\t\tif ( morphTargetInfluences[ i ] != 0.0 ) objectNormal += getMorph( gl_VertexID, i, 1 ).xyz * morphTargetInfluences[ i ];\n\t}\n#endif",morphtarget_pars_vertex:"#ifdef USE_MORPHTARGETS\n\t#ifndef USE_INSTANCING_MORPH\n\t\tuniform float morphTargetBaseInfluence;\n\t\tuniform float morphTargetInfluences[ MORPHTARGETS_COUNT ];\n\t#endif\n\tuniform sampler2DArray morphTargetsTexture;\n\tuniform ivec2 morphTargetsTextureSize;\n\tvec4 getMorph( const in int vertexIndex, const in int morphTargetIndex, const in int offset ) {\n\t\tint texelIndex = vertexIndex * MORPHTARGETS_TEXTURE_STRIDE + offset;\n\t\tint y = texelIndex / morphTargetsTextureSize.x;\n\t\tint x = texelIndex - y * morphTargetsTextureSize.x;\n\t\tivec3 morphUV = ivec3( x, y, morphTargetIndex );\n\t\treturn texelFetch( morphTargetsTexture, morphUV, 0 );\n\t}\n#endif",morphtarget_vertex:"#ifdef USE_MORPHTARGETS\n\ttransformed *= morphTargetBaseInfluence;\n\tfor ( int i = 0; i < MORPHTARGETS_COUNT; i ++ ) {\n\t\tif ( morphTargetInfluences[ i ] != 0.0 ) transformed += getMorph( gl_VertexID, i, 0 ).xyz * morphTargetInfluences[ i ];\n\t}\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.;const float ShiftRight8 = 1. / 256.;\nconst float Inv255 = 1. / 255.;\nconst vec4 PackFactors = vec4( 1.0, 256.0, 256.0 * 256.0, 256.0 * 256.0 * 256.0 );\nconst vec2 UnpackFactors2 = vec2( UnpackDownscale, 1.0 / PackFactors.g );\nconst vec3 UnpackFactors3 = vec3( UnpackDownscale / PackFactors.rg, 1.0 / PackFactors.b );\nconst vec4 UnpackFactors4 = vec4( UnpackDownscale / PackFactors.rgb, 1.0 / PackFactors.a );\nvec4 packDepthToRGBA( const in float v ) {\n\tif( v <= 0.0 )\n\t\treturn vec4( 0., 0., 0., 0. );\n\tif( v >= 1.0 )\n\t\treturn vec4( 1., 1., 1., 1. );\n\tfloat vuf;\n\tfloat af = modf( v * PackFactors.a, vuf );\n\tfloat bf = modf( vuf * ShiftRight8, vuf );\n\tfloat gf = modf( vuf * ShiftRight8, vuf );\n\treturn vec4( vuf * Inv255, gf * PackUpscale, bf * PackUpscale, af );\n}\nvec3 packDepthToRGB( const in float v ) {\n\tif( v <= 0.0 )\n\t\treturn vec3( 0., 0., 0. );\n\tif( v >= 1.0 )\n\t\treturn vec3( 1., 1., 1. );\n\tfloat vuf;\n\tfloat bf = modf( v * PackFactors.b, vuf );\n\tfloat gf = modf( vuf * ShiftRight8, vuf );\n\treturn vec3( vuf * Inv255, gf * PackUpscale, bf );\n}\nvec2 packDepthToRG( const in float v ) {\n\tif( v <= 0.0 )\n\t\treturn vec2( 0., 0. );\n\tif( v >= 1.0 )\n\t\treturn vec2( 1., 1. );\n\tfloat vuf;\n\tfloat gf = modf( v * 256., vuf );\n\treturn vec2( vuf * Inv255, gf );\n}\nfloat unpackRGBAToDepth( const in vec4 v ) {\n\treturn dot( v, UnpackFactors4 );\n}\nfloat unpackRGBToDepth( const in vec3 v ) {\n\treturn dot( v, UnpackFactors3 );\n}\nfloat unpackRGToDepth( const in vec2 v ) {\n\treturn v.r * UnpackFactors2.r + v.g * UnpackFactors2.g;\n}\nvec4 pack2HalfToRGBA( const in 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( const in 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 shadowIntensity;\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 shadowIntensity;\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 shadowIntensity;\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 shadowIntensity, 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 mix( 1.0, shadow, shadowIntensity );\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 shadowIntensity, 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 mix( 1.0, shadow, shadowIntensity );\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 shadowIntensity;\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 shadowIntensity;\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 shadowIntensity;\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.shadowIntensity, 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.shadowIntensity, 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.shadowIntensity, 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\tconst float StartCompression = 0.8 - 0.04;\n\tconst float 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, vec3( newPeak ), 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.dispersion, 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 dispersion, const in float ior, const in float thickness,\n\t\tconst in vec3 attenuationColor, const in float attenuationDistance ) {\n\t\tvec4 transmittedLight;\n\t\tvec3 transmittance;\n\t\t#ifdef USE_DISPERSION\n\t\t\tfloat halfSpread = ( ior - 1.0 ) * 0.025 * dispersion;\n\t\t\tvec3 iors = vec3( ior - halfSpread, ior, ior + halfSpread );\n\t\t\tfor ( int i = 0; i < 3; i ++ ) {\n\t\t\t\tvec3 transmissionRay = getVolumeTransmissionRay( n, v, thickness, iors[ i ], modelMatrix );\n\t\t\t\tvec3 refractedRayExit = position + transmissionRay;\n\t\t\n\t\t\t\tvec4 ndcPos = projMatrix * viewMatrix * vec4( refractedRayExit, 1.0 );\n\t\t\t\tvec2 refractionCoords = ndcPos.xy / ndcPos.w;\n\t\t\t\trefractionCoords += 1.0;\n\t\t\t\trefractionCoords /= 2.0;\n\t\t\n\t\t\t\tvec4 transmissionSample = getTransmissionSample( refractionCoords, roughness, iors[ i ] );\n\t\t\t\ttransmittedLight[ i ] = transmissionSample[ i ];\n\t\t\t\ttransmittedLight.a += transmissionSample.a;\n\t\t\t\ttransmittance[ i ] = diffuseColor[ i ] * volumeAttenuation( length( transmissionRay ), attenuationColor, attenuationDistance )[ i ];\n\t\t\t}\n\t\t\ttransmittedLight.a /= 3.0;\n\t\t\n\t\t#else\n\t\t\n\t\t\tvec3 transmissionRay = getVolumeTransmissionRay( n, v, thickness, ior, modelMatrix );\n\t\t\tvec3 refractedRayExit = position + transmissionRay;\n\t\t\tvec4 ndcPos = projMatrix * viewMatrix * vec4( refractedRayExit, 1.0 );\n\t\t\tvec2 refractionCoords = ndcPos.xy / ndcPos.w;\n\t\t\trefractionCoords += 1.0;\n\t\t\trefractionCoords /= 2.0;\n\t\t\ttransmittedLight = getTransmissionSample( refractionCoords, roughness, ior );\n\t\t\ttransmittance = diffuseColor * volumeAttenuation( length( transmissionRay ), attenuationColor, attenuationDistance );\n\t\t\n\t\t#endif\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#elif DEPTH_PACKING == 3202\n\t\tgl_FragColor = vec4( packDepthToRGB( fragCoordZ ), 1.0 );\n\t#elif DEPTH_PACKING == 3203\n\t\tgl_FragColor = vec4( packDepthToRG( fragCoordZ ), 0.0, 1.0 );\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_DISPERSION\n\tuniform float dispersion;\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}"},Qe={common:{diffuse:{value:new qe(16777215)},opacity:{value:1},map:{value:null},mapTransform:{value:new wn},alphaMap:{value:null},alphaMapTransform:{value:new wn},alphaTest:{value:0}},specularmap:{specularMap:{value:null},specularMapTransform:{value:new wn}},envmap:{envMap:{value:null},envMapRotation:{value:new wn},flipEnvMap:{value:-1},reflectivity:{value:1},ior:{value:1.5},refractionRatio:{value:.98}},aomap:{aoMap:{value:null},aoMapIntensity:{value:1},aoMapTransform:{value:new wn}},lightmap:{lightMap:{value:null},lightMapIntensity:{value:1},lightMapTransform:{value:new wn}},bumpmap:{bumpMap:{value:null},bumpMapTransform:{value:new wn},bumpScale:{value:1}},normalmap:{normalMap:{value:null},normalMapTransform:{value:new wn},normalScale:{value:new xe(1,1)}},displacementmap:{displacementMap:{value:null},displacementMapTransform:{value:new wn},displacementScale:{value:1},displacementBias:{value:0}},emissivemap:{emissiveMap:{value:null},emissiveMapTransform:{value:new wn}},metalnessmap:{metalnessMap:{value:null},metalnessMapTransform:{value:new wn}},roughnessmap:{roughnessMap:{value:null},roughnessMapTransform:{value:new wn}},gradientmap:{gradientMap:{value:null}},fog:{fogDensity:{value:25e-5},fogNear:{value:1},fogFar:{value:2e3},fogColor:{value:new qe(16777215)}},lights:{ambientLightColor:{value:[]},lightProbe:{value:[]},directionalLights:{value:[],properties:{direction:{},color:{}}},directionalLightShadows:{value:[],properties:{shadowIntensity:1,shadowBias:{},shadowNormalBias:{},shadowRadius:{},shadowMapSize:{}}},directionalShadowMap:{value:[]},directionalShadowMatrix:{value:[]},spotLights:{value:[],properties:{color:{},position:{},direction:{},distance:{},coneCos:{},penumbraCos:{},decay:{}}},spotLightShadows:{value:[],properties:{shadowIntensity:1,shadowBias:{},shadowNormalBias:{},shadowRadius:{},shadowMapSize:{}}},spotLightMap:{value:[]},spotShadowMap:{value:[]},spotLightMatrix:{value:[]},pointLights:{value:[],properties:{color:{},position:{},decay:{},distance:{}}},pointLightShadows:{value:[],properties:{shadowIntensity:1,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 qe(16777215)},opacity:{value:1},size:{value:1},scale:{value:1},map:{value:null},alphaMap:{value:null},alphaMapTransform:{value:new wn},alphaTest:{value:0},uvTransform:{value:new wn}},sprite:{diffuse:{value:new qe(16777215)},opacity:{value:1},center:{value:new xe(.5,.5)},rotation:{value:0},map:{value:null},mapTransform:{value:new wn},alphaMap:{value:null},alphaMapTransform:{value:new wn},alphaTest:{value:0}}},cc={basic:{uniforms:ho([Qe.common,Qe.specularmap,Qe.envmap,Qe.aomap,Qe.lightmap,Qe.fog]),vertexShader:Cn.meshbasic_vert,fragmentShader:Cn.meshbasic_frag},lambert:{uniforms:ho([Qe.common,Qe.specularmap,Qe.envmap,Qe.aomap,Qe.lightmap,Qe.emissivemap,Qe.bumpmap,Qe.normalmap,Qe.displacementmap,Qe.fog,Qe.lights,{emissive:{value:new qe(0)}}]),vertexShader:Cn.meshlambert_vert,fragmentShader:Cn.meshlambert_frag},phong:{uniforms:ho([Qe.common,Qe.specularmap,Qe.envmap,Qe.aomap,Qe.lightmap,Qe.emissivemap,Qe.bumpmap,Qe.normalmap,Qe.displacementmap,Qe.fog,Qe.lights,{emissive:{value:new qe(0)},specular:{value:new qe(1118481)},shininess:{value:30}}]),vertexShader:Cn.meshphong_vert,fragmentShader:Cn.meshphong_frag},standard:{uniforms:ho([Qe.common,Qe.envmap,Qe.aomap,Qe.lightmap,Qe.emissivemap,Qe.bumpmap,Qe.normalmap,Qe.displacementmap,Qe.roughnessmap,Qe.metalnessmap,Qe.fog,Qe.lights,{emissive:{value:new qe(0)},roughness:{value:1},metalness:{value:0},envMapIntensity:{value:1}}]),vertexShader:Cn.meshphysical_vert,fragmentShader:Cn.meshphysical_frag},toon:{uniforms:ho([Qe.common,Qe.aomap,Qe.lightmap,Qe.emissivemap,Qe.bumpmap,Qe.normalmap,Qe.displacementmap,Qe.gradientmap,Qe.fog,Qe.lights,{emissive:{value:new qe(0)}}]),vertexShader:Cn.meshtoon_vert,fragmentShader:Cn.meshtoon_frag},matcap:{uniforms:ho([Qe.common,Qe.bumpmap,Qe.normalmap,Qe.displacementmap,Qe.fog,{matcap:{value:null}}]),vertexShader:Cn.meshmatcap_vert,fragmentShader:Cn.meshmatcap_frag},points:{uniforms:ho([Qe.points,Qe.fog]),vertexShader:Cn.points_vert,fragmentShader:Cn.points_frag},dashed:{uniforms:ho([Qe.common,Qe.fog,{scale:{value:1},dashSize:{value:1},totalSize:{value:2}}]),vertexShader:Cn.linedashed_vert,fragmentShader:Cn.linedashed_frag},depth:{uniforms:ho([Qe.common,Qe.displacementmap]),vertexShader:Cn.depth_vert,fragmentShader:Cn.depth_frag},normal:{uniforms:ho([Qe.common,Qe.bumpmap,Qe.normalmap,Qe.displacementmap,{opacity:{value:1}}]),vertexShader:Cn.meshnormal_vert,fragmentShader:Cn.meshnormal_frag},sprite:{uniforms:ho([Qe.sprite,Qe.fog]),vertexShader:Cn.sprite_vert,fragmentShader:Cn.sprite_frag},background:{uniforms:{uvTransform:{value:new wn},t2D:{value:null},backgroundIntensity:{value:1}},vertexShader:Cn.background_vert,fragmentShader:Cn.background_frag},backgroundCube:{uniforms:{envMap:{value:null},flipEnvMap:{value:-1},backgroundBlurriness:{value:0},backgroundIntensity:{value:1},backgroundRotation:{value:new wn}},vertexShader:Cn.backgroundCube_vert,fragmentShader:Cn.backgroundCube_frag},cube:{uniforms:{tCube:{value:null},tFlip:{value:-1},opacity:{value:1}},vertexShader:Cn.cube_vert,fragmentShader:Cn.cube_frag},equirect:{uniforms:{tEquirect:{value:null}},vertexShader:Cn.equirect_vert,fragmentShader:Cn.equirect_frag},distanceRGBA:{uniforms:ho([Qe.common,Qe.displacementmap,{referencePosition:{value:new O},nearDistance:{value:1},farDistance:{value:1e3}}]),vertexShader:Cn.distanceRGBA_vert,fragmentShader:Cn.distanceRGBA_frag},shadow:{uniforms:ho([Qe.lights,Qe.fog,{color:{value:new qe(0)},opacity:{value:1}}]),vertexShader:Cn.shadow_vert,fragmentShader:Cn.shadow_frag}};cc.physical={uniforms:ho([cc.standard.uniforms,{clearcoat:{value:0},clearcoatMap:{value:null},clearcoatMapTransform:{value:new wn},clearcoatNormalMap:{value:null},clearcoatNormalMapTransform:{value:new wn},clearcoatNormalScale:{value:new xe(1,1)},clearcoatRoughness:{value:0},clearcoatRoughnessMap:{value:null},clearcoatRoughnessMapTransform:{value:new wn},dispersion:{value:0},iridescence:{value:0},iridescenceMap:{value:null},iridescenceMapTransform:{value:new wn},iridescenceIOR:{value:1.3},iridescenceThicknessMinimum:{value:100},iridescenceThicknessMaximum:{value:400},iridescenceThicknessMap:{value:null},iridescenceThicknessMapTransform:{value:new wn},sheen:{value:0},sheenColor:{value:new qe(0)},sheenColorMap:{value:null},sheenColorMapTransform:{value:new wn},sheenRoughness:{value:1},sheenRoughnessMap:{value:null},sheenRoughnessMapTransform:{value:new wn},transmission:{value:0},transmissionMap:{value:null},transmissionMapTransform:{value:new wn},transmissionSamplerSize:{value:new xe},transmissionSamplerMap:{value:null},thickness:{value:0},thicknessMap:{value:null},thicknessMapTransform:{value:new wn},attenuationDistance:{value:0},attenuationColor:{value:new qe(0)},specularColor:{value:new qe(1,1,1)},specularColorMap:{value:null},specularColorMapTransform:{value:new wn},specularIntensity:{value:1},specularIntensityMap:{value:null},specularIntensityMapTransform:{value:new wn},anisotropyVector:{value:new xe},anisotropyMap:{value:null},anisotropyMapTransform:{value:new wn}}]),vertexShader:Cn.meshphysical_vert,fragmentShader:Cn.meshphysical_frag};const lS={r:0,b:0,g:0},lf=new id,Cce=new Nt;function Sce(i,t,e,n,r,s,o){const a=new qe(0);let c,d,l=!0===s?0:1,h=null,p=0,m=null;function g(M){let x=!0===M.isScene?M.background:null;return x&&x.isTexture&&(x=(M.backgroundBlurriness>0?e:t).get(x)),x}function y(M,x){M.getRGB(lS,Z4(i)),n.buffers.color.setClear(lS.r,lS.g,lS.b,x,o)}return{getClearColor:function(){return a},setClearColor:function(M,x=1){a.set(M),l=x,y(a,l)},getClearAlpha:function(){return l},setClearAlpha:function(M){l=M,y(a,l)},render:function b(M){let x=!1;const C=g(M);null===C?y(a,l):C&&C.isColor&&(y(C,1),x=!0);const F=i.xr.getEnvironmentBlendMode();"additive"===F?n.buffers.color.setClear(0,0,0,1,o):"alpha-blend"===F&&n.buffers.color.setClear(0,0,0,0,o),(i.autoClear||x)&&(n.buffers.depth.setTest(!0),n.buffers.depth.setMask(!0),n.buffers.color.setMask(!0),i.clear(i.autoClearColor,i.autoClearDepth,i.autoClearStencil))},addToRenderList:function v(M,x){const C=g(x);C&&(C.isCubeTexture||C.mapping===mb)?(void 0===d&&(d=new Mn(new rf(1,1,1),new Cl({name:"BackgroundCubeMaterial",uniforms:Sg(cc.backgroundCube.uniforms),vertexShader:cc.backgroundCube.vertexShader,fragmentShader:cc.backgroundCube.fragmentShader,side:Ro,depthTest:!1,depthWrite:!1,fog:!1})),d.geometry.deleteAttribute("normal"),d.geometry.deleteAttribute("uv"),d.onBeforeRender=function(F,D,k){this.matrixWorld.copyPosition(k.matrixWorld)},Object.defineProperty(d.material,"envMap",{get:function(){return this.uniforms.envMap.value}}),r.update(d)),lf.copy(x.backgroundRotation),lf.x*=-1,lf.y*=-1,lf.z*=-1,C.isCubeTexture&&!1===C.isRenderTargetTexture&&(lf.y*=-1,lf.z*=-1),d.material.uniforms.envMap.value=C,d.material.uniforms.flipEnvMap.value=C.isCubeTexture&&!1===C.isRenderTargetTexture?-1:1,d.material.uniforms.backgroundBlurriness.value=x.backgroundBlurriness,d.material.uniforms.backgroundIntensity.value=x.backgroundIntensity,d.material.uniforms.backgroundRotation.value.setFromMatrix4(Cce.makeRotationFromEuler(lf)),d.material.toneMapped=Jn.getTransfer(C.colorSpace)!==Oi,(h!==C||p!==C.version||m!==i.toneMapping)&&(d.material.needsUpdate=!0,h=C,p=C.version,m=i.toneMapping),d.layers.enableAll(),M.unshift(d,d.geometry,d.material,0,0,null)):C&&C.isTexture&&(void 0===c&&(c=new Mn(new Iu(2,2),new Cl({name:"BackgroundMaterial",uniforms:Sg(cc.background.uniforms),vertexShader:cc.background.vertexShader,fragmentShader:cc.background.fragmentShader,side:ac,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=C,c.material.uniforms.backgroundIntensity.value=x.backgroundIntensity,c.material.toneMapped=Jn.getTransfer(C.colorSpace)!==Oi,!0===C.matrixAutoUpdate&&C.updateMatrix(),c.material.uniforms.uvTransform.value.copy(C.matrix),(h!==C||p!==C.version||m!==i.toneMapping)&&(c.material.needsUpdate=!0,h=C,p=C.version,m=i.toneMapping),c.layers.enableAll(),M.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(A){return i.bindVertexArray(A)}function d(A){return i.deleteVertexArray(A)}function p(A){const $=[],ie=[],ne=[];for(let se=0;se=0){const Ne=se[J];let Ye=ge[J];if(void 0===Ye&&("instanceMatrix"===J&&A.instanceMatrix&&(Ye=A.instanceMatrix),"instanceColor"===J&&A.instanceColor&&(Ye=A.instanceColor)),void 0===Ne||Ne.attribute!==Ye||Ye&&Ne.data!==Ye.data)return!0;q++}return s.attributesNum!==q||s.index!==ne}(A,ne,ie,se),ge&&function g(A,$,ie,ne){const se={},ge=$.attributes;let q=0;const re=ie.getAttributes();for(const J in re)if(re[J].location>=0){let Ne=ge[J];void 0===Ne&&("instanceMatrix"===J&&A.instanceMatrix&&(Ne=A.instanceMatrix),"instanceColor"===J&&A.instanceColor&&(Ne=A.instanceColor));const Ye={};Ye.attribute=Ne,Ne&&Ne.data&&(Ye.data=Ne.data),se[J]=Ye,q++}s.attributes=se,s.attributesNum=q,s.index=ne}(A,ne,ie,se),null!==se&&t.update(se,i.ELEMENT_ARRAY_BUFFER),(ge||o)&&(o=!1,function C(A,$,ie,ne){b();const se=ne.attributes,ge=ie.getAttributes(),q=$.defaultAttributeValues;for(const re in ge){const J=ge[re];if(J.location>=0){let we=se[re];if(void 0===we&&("instanceMatrix"===re&&A.instanceMatrix&&(we=A.instanceMatrix),"instanceColor"===re&&A.instanceColor&&(we=A.instanceColor)),void 0!==we){const Ne=we.normalized,Ye=we.itemSize,It=t.get(we);if(void 0===It)continue;const en=It.buffer,ae=It.type,Oe=It.bytesPerElement,Ze=ae===i.INT||ae===i.UNSIGNED_INT||we.gpuType===uk;if(we.isInterleavedBufferAttribute){const Fe=we.data,bt=Fe.stride,St=we.offset;if(Fe.isInstancedInterleavedBuffer){for(let Mt=0;Mt0&&i.getShaderPrecisionFormat(i.FRAGMENT_SHADER,i.HIGH_FLOAT).precision>0)return"highp";D="mediump"}return"mediump"===D&&i.getShaderPrecisionFormat(i.VERTEX_SHADER,i.MEDIUM_FLOAT).precision>0&&i.getShaderPrecisionFormat(i.FRAGMENT_SHADER,i.MEDIUM_FLOAT).precision>0?"mediump":"lowp"}let c=void 0!==e.precision?e.precision:"highp";const d=l(c);d!==c&&(console.warn("THREE.WebGLRenderer:",c,"not supported, using",d,"instead."),c=d);const h=!0===e.logarithmicDepthBuffer,p=i.getParameter(i.MAX_TEXTURE_IMAGE_UNITS),m=i.getParameter(i.MAX_VERTEX_TEXTURE_IMAGE_UNITS);return{isWebGL2:!0,getMaxAnisotropy:function s(){if(void 0!==r)return r;if(!0===t.has("EXT_texture_filter_anisotropic")){const D=t.get("EXT_texture_filter_anisotropic");r=i.getParameter(D.MAX_TEXTURE_MAX_ANISOTROPY_EXT)}else r=0;return r},getMaxPrecision:l,textureFormatReadable:function o(D){return!(D!==ko&&n.convert(D)!==i.getParameter(i.IMPLEMENTATION_COLOR_READ_FORMAT))},textureTypeReadable:function a(D){const k=D===Jm&&(t.has("EXT_color_buffer_half_float")||t.has("EXT_color_buffer_float"));return!(D!==Jc&&n.convert(D)!==i.getParameter(i.IMPLEMENTATION_COLOR_READ_TYPE)&&D!==Jo&&!k)},precision:c,logarithmicDepthBuffer:h,maxTextures:p,maxVertexTextures:m,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:m>0,maxSamples:i.getParameter(i.MAX_SAMPLES)}}function Tce(i){const t=this;let e=null,n=0,r=!1,s=!1;const o=new sf,a=new wn,l={value:null,needsUpdate:!1};function d(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=d(g,p,x,m);for(let F=0;F!==x;++F)C[F]=e[F];y.clippingState=C,this.numIntersection=b?this.numPlanes:0,this.numPlanes+=M}}}function Ice(i){let t=new WeakMap;function e(o,a){return a===AC?o.mapping=lc:a===DC&&(o.mapping=Zh),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===AC||a===DC){if(t.has(o))return e(t.get(o).texture,o.mapping);{const l=o.image;if(l&&l.height>0){const c=new xae(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 Ib extends fP{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,d=(this.top-this.bottom)/this.view.fullHeight/this.zoom;s+=c*this.view.offsetX,o=s+c*this.view.width,a-=d*this.view.offsetY,l=a-d*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 n5=[.125,.215,.35,.446,.526,.582],mP=new Ib,r5=new qe;let gP=null,_P=0,vP=0,yP=!1;const df=(1+Math.sqrt(5))/2,Tg=1/df,s5=[new O(-df,Tg,0),new O(df,Tg,0),new O(-Tg,0,df),new O(Tg,0,df),new O(0,df,-Tg),new O(0,df,Tg),new O(-1,1,-1),new O(1,1,-1),new O(-1,1,1),new O(1,1,1)];class o5{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){gP=this._renderer.getRenderTarget(),_P=this._renderer.getActiveCubeFace(),vP=this._renderer.getActiveMipmapLevel(),yP=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=c5(),this._compileMaterial(this._cubemapMaterial))}compileEquirectangularShader(){null===this._equirectMaterial&&(this._equirectMaterial=l5(),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=n5[o-i+4-1]:0===o&&(l=0),n.push(l);const c=1/(a-2),d=-c,h=1+c,p=[d,d,h,d,h,h,d,d,h,h,d,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 D=0;D2?0:-1;M.set([k,B,0,k+2/3,B,0,k+2/3,B+1,0,k,B,0,k+2/3,B+1,0,k,B+1,0],b*g*D),x.set(p,v*g*D),C.set([D,D,D,D,D,D],y*g*D)}const F=new hn;F.setAttribute("position",new zi(M,b)),F.setAttribute("uv",new zi(x,v)),F.setAttribute("faceIndex",new zi(C,y)),t.push(F),r>4&&r--}return{lodPlanes:t,sizeLods:e,sigmas:n}}(s)),this._blurMaterial=function kce(i,t,e){const n=new Float32Array(20),r=new O(0,1,0);return new Cl({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:Qc,depthTest:!1,depthWrite:!1})}(s,t,e)}return r}_compileMaterial(t){const e=new Mn(this._lodPlanes[0],t);this._renderer.compile(e,mP)}_sceneToCubeUV(t,e,n,r){const a=new yr(90,1,e,n),l=[1,-1,1,1,1,1],c=[1,1,1,-1,-1,-1],d=this._renderer,h=d.autoClear,p=d.toneMapping;d.getClearColor(r5),d.toneMapping=bu,d.autoClear=!1;const m=new Yi({name:"PMREM.Background",side:Ro,depthWrite:!1,depthTest:!1}),g=new Mn(new rf,m);let b=!1;const v=t.background;v?v.isColor&&(m.color.copy(v),t.background=null,b=!0):(m.color.copy(r5),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;cS(r,M*x,y>2?x:0,x,x),d.setRenderTarget(r),b&&d.render(g,a),d.render(t,a)}g.geometry.dispose(),g.material.dispose(),d.toneMapping=p,d.autoClear=h,t.background=v}_textureToCubeUV(t,e){const n=this._renderer,r=t.mapping===lc||t.mapping===Zh;r?(null===this._cubemapMaterial&&(this._cubemapMaterial=c5()),this._cubemapMaterial.uniforms.flipEnvMap.value=!1===t.isRenderTargetTexture?-1:1):null===this._equirectMaterial&&(this._equirectMaterial=l5());const s=r?this._cubemapMaterial:this._equirectMaterial,o=new Mn(this._lodPlanes[0],s);s.uniforms.envMap.value=t;const l=this._cubeSize;cS(e,0,0,3*l,2*l),n.setRenderTarget(e),n.render(o,mP)}_applyPMREM(t){const e=this._renderer,n=e.autoClear;e.autoClear=!1;const r=this._lodPlanes.length;for(let s=1;s20&&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 k=0;k<20;++k){const B=k/b,T=Math.exp(-B*B/2);y.push(T),0===k?M+=T:kx-4?r-x+4:0),4*(this._cubeSize-C),3*C,2*C),l.setRenderTarget(e),l.render(h,mP)}}function a5(i,t,e){const n=new Mu(i,t,e);return n.texture.mapping=mb,n.texture.name="PMREM.cubeUv",n.scissorTest=!0,n}function cS(i,t,e,n,r){i.viewport.set(t,e,n,r),i.scissor.set(t,e,n,r)}function l5(){return new Cl({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:Qc,depthTest:!1,depthWrite:!1})}function c5(){return new Cl({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:Qc,depthTest:!1,depthWrite:!1})}function Pce(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===AC||l===DC,d=l===lc||l===Zh;if(c||d){let h=t.get(a);if(a.isRenderTargetTexture&&a.pmremVersion!==(void 0!==h?h.texture.pmremVersion:0))return null===e&&(e=new o5(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||d&&m&&function r(a){let l=0;for(let d=0;d<6;d++)void 0!==a[d]&&l++;return 6===l}(m)?(null===e&&(e=new o5(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 Oce(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&&cg("THREE.WebGLRenderer: "+n+" extension not supported."),r}}}function Fce(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&&(F=Math.ceil(C/t.maxTextureSize),C=t.maxTextureSize);const D=new Float32Array(C*F*4*h),k=new Zk(D,C,F,h);k.type=Jo,k.needsUpdate=!0;const B=4*x;for(let A=0;A0)return i;const r=t*e;let s=g5[r];if(void 0===s&&(s=new Float32Array(r),g5[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 Fr(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 Ode(i,t){const e=function Pde(i){const t=Jn.getPrimaries(Jn.workingColorSpace),e=Jn.getPrimaries(i);let n;switch(t===e?n="":t===UC&&e===BC?n="LinearDisplayP3ToLinearSRGB":t===BC&&e===UC&&(n="LinearSRGBToLinearDisplayP3"),i){case ds:case LC:return[n,"LinearTransferOETF"];case cs:case jk: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 Fde(i,t){let e;switch(t){case foe:e="Linear";break;case poe:e="Reinhard";break;case moe:e="OptimizedCineon";break;case goe:e="ACESFilmic";break;case voe:e="AgX";break;case yoe:e="Neutral";break;case _oe:e="Custom";break;default:console.warn("THREE.WebGLProgram: Unsupported toneMapping:",t),e="Linear"}return"vec3 "+i+"( vec3 color ) { return "+e+"ToneMapping( color ); }"}const hS=new O;function Rb(i){return""!==i}function C5(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 S5(i,t){return i.replace(/NUM_CLIPPING_PLANES/g,t.numClippingPlanes).replace(/UNION_CLIPPING_PLANES/g,t.numClippingPlanes-t.numClipIntersection)}const Vde=/^[ \t]*#include +<([\w\d./]+)>/gm;function wP(i){return i.replace(Vde,Hde)}const zde=new Map;function Hde(i,t){let e=Cn[t];if(void 0===e){const n=zde.get(t);if(void 0===n)throw new Error("Can not resolve #include <"+t+">");e=Cn[n],console.warn('THREE.WebGLRenderer: Shader chunk "%s" has been deprecated. Use "%s" instead.',t,n)}return wP(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 E5(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(Rb).join("\n"),y.length>0&&(y+="\n")):(v=[A5(e),"#define SHADER_TYPE "+e.shaderType,"#define SHADER_NAME "+e.shaderName,g,e.extensionClipCullDistance?"#define USE_CLIP_DISTANCE":"",e.batching?"#define USE_BATCHING":"",e.batchingColor?"#define USE_BATCHING_COLOR":"",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 "+d:"",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_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.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","#ifdef USE_SKINNING","\tattribute vec4 skinIndex;","\tattribute vec4 skinWeight;","#endif","\n"].filter(Rb).join("\n"),y=[A5(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 "+d:"",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.dispersion?"#define USE_DISPERSION":"",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||e.batchingColor?"#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.decodeVideoTexture?"#define DECODE_VIDEO_TEXTURE":"",e.logarithmicDepthBuffer?"#define USE_LOGDEPTHBUF":"","uniform mat4 viewMatrix;","uniform vec3 cameraPosition;","uniform bool isOrthographic;",e.toneMapping!==bu?"#define TONE_MAPPING":"",e.toneMapping!==bu?Cn.tonemapping_pars_fragment:"",e.toneMapping!==bu?Fde("toneMapping",e.toneMapping):"",e.dithering?"#define DITHERING":"",e.opaque?"#define OPAQUE":"",Cn.colorspace_pars_fragment,Ode("linearToOutputTexel",e.outputColorSpace),(Jn.getLuminanceCoefficients(hS),["float luminance( const in vec3 rgb ) {",`\tconst vec3 weights = vec3( ${hS.x.toFixed(4)}, ${hS.y.toFixed(4)}, ${hS.z.toFixed(4)} );`,"\treturn dot( weights, rgb );","}"].join("\n")),e.useDepthPacking?"#define DEPTH_PACKING "+e.depthPacking:"","\n"].filter(Rb).join("\n")),o=wP(o),o=C5(o,e),o=S5(o,e),a=wP(a),a=C5(a,e),a=S5(a,e),o=E5(o),a=E5(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===A4?"":"layout(location = 0) out highp vec4 pc_fragColor;",e.glslVersion===A4?"":"#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,F=w5(r,r.VERTEX_SHADER,M+v+o),D=w5(r,r.FRAGMENT_SHADER,C);function k($){if(i.debug.checkShaderErrors){const ie=r.getProgramInfoLog(b).trim(),ne=r.getShaderInfoLog(F).trim(),se=r.getShaderInfoLog(D).trim();let ge=!0,q=!0;if(!1===r.getProgramParameter(b,r.LINK_STATUS))if(ge=!1,"function"==typeof i.debug.onShaderError)i.debug.onShaderError(r,b,F,D);else{const re=M5(r,F,"vertex"),J=M5(r,D,"fragment");console.error("THREE.WebGLProgram: Shader Error "+r.getError()+" - VALIDATE_STATUS "+r.getProgramParameter(b,r.VALIDATE_STATUS)+"\n\nMaterial Name: "+$.name+"\nMaterial Type: "+$.type+"\n\nProgram Info Log: "+ie+"\n"+re+"\n"+J)}else""!==ie?console.warn("THREE.WebGLProgram: Program Info Log:",ie):(""===ne||""===se)&&(q=!1);q&&($.diagnostics={runnable:ge,programLog:ie,vertexShader:{log:ne,prefix:v},fragmentShader:{log:se,prefix:y}})}r.deleteShader(F),r.deleteShader(D),B=new uS(r,b),T=function Ude(i,t){const e={},n=i.getProgramParameter(t,i.ACTIVE_ATTRIBUTES);for(let r=0;r0,ce=T.clearcoat>0,Te=T.iridescence>0,Ae=T.sheen>0,Bt=T.transmission>0,Je=R&&!!T.anisotropyMap,ut=ce&&!!T.clearcoatMap,bn=ce&&!!T.clearcoatNormalMap,ze=ce&&!!T.clearcoatRoughnessMap,dt=Te&&!!T.iridescenceMap,jn=Te&&!!T.iridescenceThicknessMap,ln=Ae&&!!T.sheenColorMap,_t=Ae&&!!T.sheenRoughnessMap,vn=!!T.specularMap,Pn=!!T.specularColorMap,Xi=!!T.specularIntensityMap,Z=Bt&&!!T.transmissionMap,$e=Bt&&!!T.thicknessMap,Ee=!!T.alphaMap,ei=!!T.extensions;let br=bu;T.toneMapped&&(null===Fe||!0===Fe.isXRRenderTarget)&&(br=i.toneMapping);const hs={shaderID:we,shaderType:T.type,shaderName:T.name,vertexShader:en,fragmentShader:ae,defines:T.defines,customVertexShaderID:Oe,customFragmentShaderID:Ze,isRawShaderMaterial:!0===T.isRawShaderMaterial,glslVersion:T.glslVersion,precision:m,batching:St,batchingColor:St&&null!==ne._colorsTexture,instancing:bt,instancingColor:bt&&null!==ne.instanceColor,instancingMorph:bt&&null!==ne.morphTexture,supportsVertexTextures:p,outputColorSpace:null===Fe?i.outputColorSpace:!0===Fe.isXRRenderTarget?Fe.texture.colorSpace:ds,alphaToCoverage:!!T.alphaToCoverage,map:Mt,matcap:!!T.matcap,envMap:N,envMapMode:N&&re.mapping,envMapCubeUVHeight:J,aoMap:Ge,lightMap:Le,bumpMap:nt,normalMap:Me,displacementMap:p&&Gt,emissiveMap:it,normalMapObjectSpace:Me&&T.normalMapType===Aoe,normalMapTangentSpace:Me&&T.normalMapType===Qh,metalnessMap:pt,roughnessMap:z,anisotropy:R,anisotropyMap:Je,clearcoat:ce,clearcoatMap:ut,clearcoatNormalMap:bn,clearcoatRoughnessMap:ze,dispersion:T.dispersion>0,iridescence:Te,iridescenceMap:dt,iridescenceThicknessMap:jn,sheen:Ae,sheenColorMap:ln,sheenRoughnessMap:_t,specularMap:vn,specularColorMap:Pn,specularIntensityMap:Xi,transmission:Bt,transmissionMap:Z,thicknessMap:$e,gradientMap:!!T.gradientMap,opaque:!1===T.transparent&&T.blending===Zm&&!1===T.alphaToCoverage,alphaMap:Ee,alphaTest:T.alphaTest>0,alphaHash:!!T.alphaHash,combine:T.combine,mapUv:Mt&&b(T.map.channel),aoMapUv:Ge&&b(T.aoMap.channel),lightMapUv:Le&&b(T.lightMap.channel),bumpMapUv:nt&&b(T.bumpMap.channel),normalMapUv:Me&&b(T.normalMap.channel),displacementMapUv:Gt&&b(T.displacementMap.channel),emissiveMapUv:it&&b(T.emissiveMap.channel),metalnessMapUv:pt&&b(T.metalnessMap.channel),roughnessMapUv:z&&b(T.roughnessMap.channel),anisotropyMapUv:Je&&b(T.anisotropyMap.channel),clearcoatMapUv:ut&&b(T.clearcoatMap.channel),clearcoatNormalMapUv:bn&&b(T.clearcoatNormalMap.channel),clearcoatRoughnessMapUv:ze&&b(T.clearcoatRoughnessMap.channel),iridescenceMapUv:dt&&b(T.iridescenceMap.channel),iridescenceThicknessMapUv:jn&&b(T.iridescenceThicknessMap.channel),sheenColorMapUv:ln&&b(T.sheenColorMap.channel),sheenRoughnessMapUv:_t&&b(T.sheenRoughnessMap.channel),specularMapUv:vn&&b(T.specularMap.channel),specularColorMapUv:Pn&&b(T.specularColorMap.channel),specularIntensityMapUv:Xi&&b(T.specularIntensityMap.channel),transmissionMapUv:Z&&b(T.transmissionMap.channel),thicknessMapUv:$e&&b(T.thicknessMap.channel),alphaMapUv:Ee&&b(T.alphaMap.channel),vertexTangents:!!ge.attributes.tangent&&(Me||R),vertexColors:T.vertexColors,vertexAlphas:!0===T.vertexColors&&!!ge.attributes.color&&4===ge.attributes.color.itemSize,pointsUvs:!0===ne.isPoints&&!!ge.attributes.uv&&(Mt||Ee),fog:!!se,useFog:!0===T.fog,fogExp2:!!se&&se.isFogExp2,flatShading:!0===T.flatShading,sizeAttenuation:!0===T.sizeAttenuation,logarithmicDepthBuffer:h,skinning:!0===ne.isSkinnedMesh,morphTargets:void 0!==ge.morphAttributes.position,morphNormals:void 0!==ge.morphAttributes.normal,morphColors:void 0!==ge.morphAttributes.color,morphTargetsCount:Ye,morphTextureStride:It,numDirLights:A.directional.length,numPointLights:A.point.length,numSpotLights:A.spot.length,numSpotLightMaps:A.spotLightMap.length,numRectAreaLights:A.rectArea.length,numHemiLights:A.hemi.length,numDirLightShadows:A.directionalShadowMap.length,numPointLightShadows:A.pointShadowMap.length,numSpotLightShadows:A.spotShadowMap.length,numSpotLightShadowsWithMaps:A.numSpotLightShadowsWithMaps,numLightProbes:A.numLightProbes,numClippingPlanes:o.numPlanes,numClipIntersection:o.numIntersection,dithering:T.dithering,shadowMapEnabled:i.shadowMap.enabled&&$.length>0,shadowMapType:i.shadowMap.type,toneMapping:br,decodeVideoTexture:Mt&&!0===T.map.isVideoTexture&&Jn.getTransfer(T.map.colorSpace)===Oi,premultipliedAlpha:T.premultipliedAlpha,doubleSided:T.side===Ls,flipSided:T.side===Ro,useDepthPacking:T.depthPacking>=0,depthPacking:T.depthPacking||0,index0AttributeName:T.index0AttributeName,extensionClipCullDistance:ei&&!0===T.extensions.clipCullDistance&&n.has("WEBGL_clip_cull_distance"),extensionMultiDraw:(ei&&!0===T.extensions.multiDraw||St)&&n.has("WEBGL_multi_draw"),rendererExtensionParallelShaderCompile:n.has("KHR_parallel_shader_compile"),customProgramCacheKey:T.customProgramCacheKey()};return hs.vertexUv1s=c.has(1),hs.vertexUv2s=c.has(2),hs.vertexUv3s=c.has(3),c.clear(),hs},getProgramCacheKey:function y(T){const A=[];if(T.shaderID?A.push(T.shaderID):(A.push(T.customVertexShaderID),A.push(T.customFragmentShaderID)),void 0!==T.defines)for(const $ in T.defines)A.push($),A.push(T.defines[$]);return!1===T.isRawShaderMaterial&&(function M(T,A){T.push(A.precision),T.push(A.outputColorSpace),T.push(A.envMapMode),T.push(A.envMapCubeUVHeight),T.push(A.mapUv),T.push(A.alphaMapUv),T.push(A.lightMapUv),T.push(A.aoMapUv),T.push(A.bumpMapUv),T.push(A.normalMapUv),T.push(A.displacementMapUv),T.push(A.emissiveMapUv),T.push(A.metalnessMapUv),T.push(A.roughnessMapUv),T.push(A.anisotropyMapUv),T.push(A.clearcoatMapUv),T.push(A.clearcoatNormalMapUv),T.push(A.clearcoatRoughnessMapUv),T.push(A.iridescenceMapUv),T.push(A.iridescenceThicknessMapUv),T.push(A.sheenColorMapUv),T.push(A.sheenRoughnessMapUv),T.push(A.specularMapUv),T.push(A.specularColorMapUv),T.push(A.specularIntensityMapUv),T.push(A.transmissionMapUv),T.push(A.thicknessMapUv),T.push(A.combine),T.push(A.fogExp2),T.push(A.sizeAttenuation),T.push(A.morphTargetsCount),T.push(A.morphAttributeCount),T.push(A.numDirLights),T.push(A.numPointLights),T.push(A.numSpotLights),T.push(A.numSpotLightMaps),T.push(A.numHemiLights),T.push(A.numRectAreaLights),T.push(A.numDirLightShadows),T.push(A.numPointLightShadows),T.push(A.numSpotLightShadows),T.push(A.numSpotLightShadowsWithMaps),T.push(A.numLightProbes),T.push(A.shadowMapType),T.push(A.toneMapping),T.push(A.numClippingPlanes),T.push(A.numClipIntersection),T.push(A.depthPacking)}(A,T),function x(T,A){a.disableAll(),A.supportsVertexTextures&&a.enable(0),A.instancing&&a.enable(1),A.instancingColor&&a.enable(2),A.instancingMorph&&a.enable(3),A.matcap&&a.enable(4),A.envMap&&a.enable(5),A.normalMapObjectSpace&&a.enable(6),A.normalMapTangentSpace&&a.enable(7),A.clearcoat&&a.enable(8),A.iridescence&&a.enable(9),A.alphaTest&&a.enable(10),A.vertexColors&&a.enable(11),A.vertexAlphas&&a.enable(12),A.vertexUv1s&&a.enable(13),A.vertexUv2s&&a.enable(14),A.vertexUv3s&&a.enable(15),A.vertexTangents&&a.enable(16),A.anisotropy&&a.enable(17),A.alphaHash&&a.enable(18),A.batching&&a.enable(19),A.dispersion&&a.enable(20),A.batchingColor&&a.enable(21),T.push(a.mask),a.disableAll(),A.fog&&a.enable(0),A.useFog&&a.enable(1),A.flatShading&&a.enable(2),A.logarithmicDepthBuffer&&a.enable(3),A.skinning&&a.enable(4),A.morphTargets&&a.enable(5),A.morphNormals&&a.enable(6),A.morphColors&&a.enable(7),A.premultipliedAlpha&&a.enable(8),A.shadowMapEnabled&&a.enable(9),A.doubleSided&&a.enable(10),A.flipSided&&a.enable(11),A.useDepthPacking&&a.enable(12),A.dithering&&a.enable(13),A.transmission&&a.enable(14),A.sheen&&a.enable(15),A.opaque&&a.enable(16),A.pointsUvs&&a.enable(17),A.decodeVideoTexture&&a.enable(18),A.alphaToCoverage&&a.enable(19),T.push(a.mask)}(A,T),A.push(i.outputColorSpace)),A.push(T.customProgramCacheKey),A.join()},getUniforms:function C(T){const A=g[T.type];let $;return $=A?Q4.clone(cc[A].uniforms):T.uniforms,$},acquireProgram:function F(T,A){let $;for(let ie=0,ne=d.length;ie0?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 d(){for(let h=t,p=i.length;h1&&e.sort(h||nue),n.length>1&&n.sort(p||D5),r.length>1&&r.sort(p||D5)}}}function iue(){let i=new WeakMap;return{get:function t(n,r){const s=i.get(n);let o;return void 0===s?(o=new T5,i.set(n,[o])):r>=s.length?(o=new T5,s.push(o)):o=s[r],o},dispose:function e(){i=new WeakMap}}}function rue(){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 O,color:new qe};break;case"SpotLight":e={position:new O,direction:new O,color:new qe,distance:0,coneCos:0,penumbraCos:0,decay:0};break;case"PointLight":e={position:new O,color:new qe,distance:0,decay:0};break;case"HemisphereLight":e={direction:new O,skyColor:new qe,groundColor:new qe};break;case"RectAreaLight":e={color:new qe,position:new O,halfWidth:new O,halfHeight:new O}}return i[t.id]=e,e}}}let oue=0;function aue(i,t){return(t.castShadow?2:0)-(i.castShadow?2:0)+(t.map?1:0)-(i.map?1:0)}function lue(i){const t=new rue,e=function sue(){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={shadowIntensity:1,shadowBias:0,shadowNormalBias:0,shadowRadius:1,shadowMapSize:new xe};break;case"PointLight":e={shadowIntensity:1,shadowBias:0,shadowNormalBias:0,shadowRadius:1,shadowMapSize:new xe,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 O);const r=new O,s=new Nt,o=new Nt;return{setup:function a(c){let d=0,h=0,p=0;for(let T=0;T<9;T++)n.probe[T].set(0,0,0);let m=0,g=0,b=0,v=0,y=0,M=0,x=0,C=0,F=0,D=0,k=0;c.sort(aue);for(let T=0,A=c.length;T0&&(!0===i.has("OES_texture_float_linear")?(n.rectAreaLTC1=Qe.LTC_FLOAT_1,n.rectAreaLTC2=Qe.LTC_FLOAT_2):(n.rectAreaLTC1=Qe.LTC_HALF_1,n.rectAreaLTC2=Qe.LTC_HALF_2)),n.ambient[0]=d,n.ambient[1]=h,n.ambient[2]=p;const B=n.hash;(B.directionalLength!==m||B.pointLength!==g||B.spotLength!==b||B.rectAreaLength!==v||B.hemiLength!==y||B.numDirectionalShadows!==M||B.numPointShadows!==x||B.numSpotShadows!==C||B.numSpotMaps!==F||B.numLightProbes!==k)&&(n.directional.length=m,n.spot.length=b,n.rectArea.length=v,n.point.length=g,n.hemi.length=y,n.directionalShadow.length=M,n.directionalShadowMap.length=M,n.pointShadow.length=x,n.pointShadowMap.length=x,n.spotShadow.length=C,n.spotShadowMap.length=C,n.directionalShadowMatrix.length=M,n.pointShadowMatrix.length=x,n.spotLightMatrix.length=C+F-D,n.spotLightMap.length=F,n.numSpotLightShadowsWithMaps=D,n.numLightProbes=k,B.directionalLength=m,B.pointLength=g,B.spotLength=b,B.rectAreaLength=v,B.hemiLength=y,B.numDirectionalShadows=M,B.numPointShadows=x,B.numSpotShadows=C,B.numSpotMaps=F,B.numLightProbes=k,n.version=oue++)},setupView:function l(c,d){let h=0,p=0,m=0,g=0,b=0;const v=d.matrixWorldInverse;for(let y=0,M=c.length;y=o.length?(a=new I5(i),o.push(a)):a=o[s],a},dispose:function n(){t=new WeakMap}}}class R5 extends Oo{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 k5 extends Oo{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 due="void main() {\n\tgl_Position = vec4( position, 1.0 );\n}",uue="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 hue(i,t,e){let n=new aS;const r=new xe,s=new xe,o=new gi,a=new R5({depthPacking:Eoe}),l=new k5,c={},d=e.maxTextureSize,h={[ac]:Ro,[Ro]:ac,[Ls]:Ls},p=new Cl({defines:{VSM_SAMPLES:8},uniforms:{shadow_pass:{value:null},resolution:{value:new xe},radius:{value:4}},vertexShader:due,fragmentShader:uue}),m=p.clone();m.defines.HORIZONTAL_PASS=1;const g=new hn;g.setAttribute("position",new zi(new Float32Array([-1,-1,.5,3,-1,.5,-1,3,.5]),3));const b=new Mn(g,p),v=this;this.enabled=!1,this.autoUpdate=!0,this.needsUpdate=!1,this.type=l4;let y=this.type;function M(D,k){const B=t.update(b);p.defines.VSM_SAMPLES!==D.blurSamples&&(p.defines.VSM_SAMPLES=D.blurSamples,m.defines.VSM_SAMPLES=D.blurSamples,p.needsUpdate=!0,m.needsUpdate=!0),null===D.mapPass&&(D.mapPass=new Mu(r.x,r.y)),p.uniforms.shadow_pass.value=D.map.texture,p.uniforms.resolution.value=D.mapSize,p.uniforms.radius.value=D.radius,i.setRenderTarget(D.mapPass),i.clear(),i.renderBufferDirect(k,null,B,p,b,null),m.uniforms.shadow_pass.value=D.mapPass.texture,m.uniforms.resolution.value=D.mapSize,m.uniforms.radius.value=D.radius,i.setRenderTarget(D.map),i.clear(),i.renderBufferDirect(k,null,B,m,b,null)}function x(D,k,B,T){let A=null;const $=!0===B.isPointLight?D.customDistanceMaterial:D.customDepthMaterial;if(void 0!==$)A=$;else if(A=!0===B.isPointLight?l:a,i.localClippingEnabled&&!0===k.clipShadows&&Array.isArray(k.clippingPlanes)&&0!==k.clippingPlanes.length||k.displacementMap&&0!==k.displacementScale||k.alphaMap&&k.alphaTest>0||k.map&&k.alphaTest>0){const ie=A.uuid,ne=k.uuid;let se=c[ie];void 0===se&&(se={},c[ie]=se);let ge=se[ne];void 0===ge&&(ge=A.clone(),se[ne]=ge,k.addEventListener("dispose",F)),A=ge}return A.visible=k.visible,A.wireframe=k.wireframe,A.side=T===Zc?null!==k.shadowSide?k.shadowSide:k.side:null!==k.shadowSide?k.shadowSide:h[k.side],A.alphaMap=k.alphaMap,A.alphaTest=k.alphaTest,A.map=k.map,A.clipShadows=k.clipShadows,A.clippingPlanes=k.clippingPlanes,A.clipIntersection=k.clipIntersection,A.displacementMap=k.displacementMap,A.displacementScale=k.displacementScale,A.displacementBias=k.displacementBias,A.wireframeLinewidth=k.wireframeLinewidth,A.linewidth=k.linewidth,!0===B.isPointLight&&!0===A.isMeshDistanceMaterial&&(i.properties.get(A).light=B),A}function C(D,k,B,T,A){if(!1===D.visible)return;if(D.layers.test(k.layers)&&(D.isMesh||D.isLine||D.isPoints)&&(D.castShadow||D.receiveShadow&&A===Zc)&&(!D.frustumCulled||n.intersectsObject(D))){D.modelViewMatrix.multiplyMatrices(B.matrixWorldInverse,D.matrixWorld);const ne=t.update(D),se=D.material;if(Array.isArray(se)){const ge=ne.groups;for(let q=0,re=ge.length;qd||r.y>d)&&(r.x>d&&(s.x=Math.floor(d/we.x),r.x=s.x*we.x,J.mapSize.x=s.x),r.y>d&&(s.y=Math.floor(d/we.y),r.y=s.y*we.y,J.mapSize.y=s.y)),null===J.map||!0===ne||!0===se){const Ye=this.type!==Zc?{minFilter:_r,magFilter:_r}:{};null!==J.map&&J.map.dispose(),J.map=new Mu(r.x,r.y,Ye),J.map.texture.name=re.name+".shadowMap",J.camera.updateProjectionMatrix()}i.setRenderTarget(J.map),i.clear();const Ne=J.getViewportCount();for(let Ye=0;Ye=1):-1!==re.indexOf("OpenGL ES")&&(q=parseFloat(/^OpenGL ES (\d)/.exec(re)[1]),ge=q>=2);let J=null,we={};const Ne=i.getParameter(i.SCISSOR_BOX),Ye=i.getParameter(i.VIEWPORT),It=(new gi).fromArray(Ne),en=(new gi).fromArray(Ye);function ae(Z,$e,Ce,Ee){const Ke=new Uint8Array(4),tn=i.createTexture();i.bindTexture(Z,tn),i.texParameteri(Z,i.TEXTURE_MIN_FILTER,i.NEAREST),i.texParameteri(Z,i.TEXTURE_MAG_FILTER,i.NEAREST);for(let ei=0;ei"u")&&/OculusBrowser/g.test(navigator.userAgent),c=new xe,d=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(z,R){return m?new OffscreenCanvas(z,R):wb("canvas")}function b(z,R,ce){let Ie=1;const Te=pt(z);if((Te.width>ce||Te.height>ce)&&(Ie=ce/Math.max(Te.width,Te.height)),Ie<1){if(typeof HTMLImageElement<"u"&&z instanceof HTMLImageElement||typeof HTMLCanvasElement<"u"&&z instanceof HTMLCanvasElement||typeof ImageBitmap<"u"&&z instanceof ImageBitmap||typeof VideoFrame<"u"&&z instanceof VideoFrame){const Ae=Math.floor(Ie*Te.width),Bt=Math.floor(Ie*Te.height);void 0===h&&(h=g(Ae,Bt));const Je=R?g(Ae,Bt):h;return Je.width=Ae,Je.height=Bt,Je.getContext("2d").drawImage(z,0,0,Ae,Bt),console.warn("THREE.WebGLRenderer: Texture has been resized from ("+Te.width+"x"+Te.height+") to ("+Ae+"x"+Bt+")."),Je}return"data"in z&&console.warn("THREE.WebGLRenderer: Image in DataTexture is too big ("+Te.width+"x"+Te.height+")."),z}return z}function v(z){return z.generateMipmaps&&z.minFilter!==_r&&z.minFilter!==lr}function y(z){i.generateMipmap(z)}function M(z,R,ce,Ie,Te=!1){if(null!==z){if(void 0!==i[z])return i[z];console.warn("THREE.WebGLRenderer: Attempt to use non-existing WebGL internal format '"+z+"'")}let Ae=R;if(R===i.RED&&(ce===i.FLOAT&&(Ae=i.R32F),ce===i.HALF_FLOAT&&(Ae=i.R16F),ce===i.UNSIGNED_BYTE&&(Ae=i.R8)),R===i.RED_INTEGER&&(ce===i.UNSIGNED_BYTE&&(Ae=i.R8UI),ce===i.UNSIGNED_SHORT&&(Ae=i.R16UI),ce===i.UNSIGNED_INT&&(Ae=i.R32UI),ce===i.BYTE&&(Ae=i.R8I),ce===i.SHORT&&(Ae=i.R16I),ce===i.INT&&(Ae=i.R32I)),R===i.RG&&(ce===i.FLOAT&&(Ae=i.RG32F),ce===i.HALF_FLOAT&&(Ae=i.RG16F),ce===i.UNSIGNED_BYTE&&(Ae=i.RG8)),R===i.RG_INTEGER&&(ce===i.UNSIGNED_BYTE&&(Ae=i.RG8UI),ce===i.UNSIGNED_SHORT&&(Ae=i.RG16UI),ce===i.UNSIGNED_INT&&(Ae=i.RG32UI),ce===i.BYTE&&(Ae=i.RG8I),ce===i.SHORT&&(Ae=i.RG16I),ce===i.INT&&(Ae=i.RG32I)),R===i.RGB&&ce===i.UNSIGNED_INT_5_9_9_9_REV&&(Ae=i.RGB9_E5),R===i.RGBA){const Bt=Te?NC:Jn.getTransfer(Ie);ce===i.FLOAT&&(Ae=i.RGBA32F),ce===i.HALF_FLOAT&&(Ae=i.RGBA16F),ce===i.UNSIGNED_BYTE&&(Ae=Bt===Oi?i.SRGB8_ALPHA8:i.RGBA8),ce===i.UNSIGNED_SHORT_4_4_4_4&&(Ae=i.RGBA4),ce===i.UNSIGNED_SHORT_5_5_5_1&&(Ae=i.RGB5_A1)}return(Ae===i.R16F||Ae===i.R32F||Ae===i.RG16F||Ae===i.RG32F||Ae===i.RGBA16F||Ae===i.RGBA32F)&&t.get("EXT_color_buffer_float"),Ae}function x(z,R){let ce;return z?null===R||R===xu||R===eg?ce=i.DEPTH24_STENCIL8:R===Jo?ce=i.DEPTH32F_STENCIL8:R===vb&&(ce=i.DEPTH24_STENCIL8,console.warn("DepthTexture: 16 bit depth attachment is not supported with stencil. Using 24-bit attachment.")):null===R||R===xu||R===eg?ce=i.DEPTH_COMPONENT24:R===Jo?ce=i.DEPTH_COMPONENT32F:R===vb&&(ce=i.DEPTH_COMPONENT16),ce}function C(z,R){return!0===v(z)||z.isFramebufferTexture&&z.minFilter!==_r&&z.minFilter!==lr?Math.log2(Math.max(R.width,R.height))+1:void 0!==z.mipmaps&&z.mipmaps.length>0?z.mipmaps.length:z.isCompressedTexture&&Array.isArray(z.image)?R.mipmaps.length:1}function F(z){const R=z.target;R.removeEventListener("dispose",F),function k(z){const R=n.get(z);if(void 0===R.__webglInit)return;const ce=z.source,Ie=p.get(ce);if(Ie){const Te=Ie[R.__cacheKey];Te.usedTimes--,0===Te.usedTimes&&B(z),0===Object.keys(Ie).length&&p.delete(ce)}n.remove(z)}(R),R.isVideoTexture&&d.delete(R)}function D(z){const R=z.target;R.removeEventListener("dispose",D),function T(z){const R=n.get(z);if(z.depthTexture&&z.depthTexture.dispose(),z.isWebGLCubeRenderTarget)for(let Ie=0;Ie<6;Ie++){if(Array.isArray(R.__webglFramebuffer[Ie]))for(let Te=0;Te0&&ce.__version!==z.version){const Ie=z.image;if(null===Ie)console.warn("THREE.WebGLRenderer: Texture marked for update but no image data found.");else{if(!1!==Ie.complete)return void en(ce,z,R);console.warn("THREE.WebGLRenderer: Texture marked for update but image is incomplete")}}e.bindTexture(i.TEXTURE_2D,ce.__webglTexture,i.TEXTURE0+R)}const J={[Ns]:i.REPEAT,[Ji]:i.CLAMP_TO_EDGE,[gb]:i.MIRRORED_REPEAT},we={[_r]:i.NEAREST,[dk]:i.NEAREST_MIPMAP_NEAREST,[Qm]:i.NEAREST_MIPMAP_LINEAR,[lr]:i.LINEAR,[_b]:i.LINEAR_MIPMAP_NEAREST,[bl]:i.LINEAR_MIPMAP_LINEAR},Ne={[Doe]:i.NEVER,[Ooe]:i.ALWAYS,[Toe]:i.LESS,[E4]:i.LEQUAL,[Ioe]:i.EQUAL,[Poe]:i.GEQUAL,[Roe]:i.GREATER,[koe]:i.NOTEQUAL};function Ye(z,R){if(R.type===Jo&&!1===t.has("OES_texture_float_linear")&&(R.magFilter===lr||R.magFilter===_b||R.magFilter===Qm||R.magFilter===bl||R.minFilter===lr||R.minFilter===_b||R.minFilter===Qm||R.minFilter===bl)&&console.warn("THREE.WebGLRenderer: Unable to use linear filtering with floating point textures. OES_texture_float_linear not supported on this device."),i.texParameteri(z,i.TEXTURE_WRAP_S,J[R.wrapS]),i.texParameteri(z,i.TEXTURE_WRAP_T,J[R.wrapT]),(z===i.TEXTURE_3D||z===i.TEXTURE_2D_ARRAY)&&i.texParameteri(z,i.TEXTURE_WRAP_R,J[R.wrapR]),i.texParameteri(z,i.TEXTURE_MAG_FILTER,we[R.magFilter]),i.texParameteri(z,i.TEXTURE_MIN_FILTER,we[R.minFilter]),R.compareFunction&&(i.texParameteri(z,i.TEXTURE_COMPARE_MODE,i.COMPARE_REF_TO_TEXTURE),i.texParameteri(z,i.TEXTURE_COMPARE_FUNC,Ne[R.compareFunction])),!0===t.has("EXT_texture_filter_anisotropic")){if(R.magFilter===_r||R.minFilter!==Qm&&R.minFilter!==bl||R.type===Jo&&!1===t.has("OES_texture_float_linear"))return;if(R.anisotropy>1||n.get(R).__currentAnisotropy){const ce=t.get("EXT_texture_filter_anisotropic");i.texParameterf(z,ce.TEXTURE_MAX_ANISOTROPY_EXT,Math.min(R.anisotropy,r.getMaxAnisotropy())),n.get(R).__currentAnisotropy=R.anisotropy}}}function It(z,R){let ce=!1;void 0===z.__webglInit&&(z.__webglInit=!0,R.addEventListener("dispose",F));const Ie=R.source;let Te=p.get(Ie);void 0===Te&&(Te={},p.set(Ie,Te));const Ae=function ne(z){const R=[];return R.push(z.wrapS),R.push(z.wrapT),R.push(z.wrapR||0),R.push(z.magFilter),R.push(z.minFilter),R.push(z.anisotropy),R.push(z.internalFormat),R.push(z.format),R.push(z.type),R.push(z.generateMipmaps),R.push(z.premultiplyAlpha),R.push(z.flipY),R.push(z.unpackAlignment),R.push(z.colorSpace),R.join()}(R);if(Ae!==z.__cacheKey){void 0===Te[Ae]&&(Te[Ae]={texture:i.createTexture(),usedTimes:0},o.memory.textures++,ce=!0),Te[Ae].usedTimes++;const Bt=Te[z.__cacheKey];void 0!==Bt&&(Te[z.__cacheKey].usedTimes--,0===Bt.usedTimes&&B(R)),z.__cacheKey=Ae,z.__webglTexture=Te[Ae].texture}return ce}function en(z,R,ce){let Ie=i.TEXTURE_2D;(R.isDataArrayTexture||R.isCompressedArrayTexture)&&(Ie=i.TEXTURE_2D_ARRAY),R.isData3DTexture&&(Ie=i.TEXTURE_3D);const Te=It(z,R),Ae=R.source;e.bindTexture(Ie,z.__webglTexture,i.TEXTURE0+ce);const Bt=n.get(Ae);if(Ae.version!==Bt.__version||!0===Te){e.activeTexture(i.TEXTURE0+ce);const Je=Jn.getPrimaries(Jn.workingColorSpace),ut=R.colorSpace===wu?null:Jn.getPrimaries(R.colorSpace),bn=R.colorSpace===wu||Je===ut?i.NONE:i.BROWSER_DEFAULT_WEBGL;i.pixelStorei(i.UNPACK_FLIP_Y_WEBGL,R.flipY),i.pixelStorei(i.UNPACK_PREMULTIPLY_ALPHA_WEBGL,R.premultiplyAlpha),i.pixelStorei(i.UNPACK_ALIGNMENT,R.unpackAlignment),i.pixelStorei(i.UNPACK_COLORSPACE_CONVERSION_WEBGL,bn);let ze=b(R.image,!1,r.maxTextureSize);ze=it(R,ze);const dt=s.convert(R.format,R.colorSpace),jn=s.convert(R.type);let _t,ln=M(R.internalFormat,dt,jn,R.colorSpace,R.isVideoTexture);Ye(Ie,R);const vn=R.mipmaps,Pn=!0!==R.isVideoTexture,Xi=void 0===Bt.__version||!0===Te,Z=Ae.dataReady,$e=C(R,ze);if(R.isDepthTexture)ln=x(R.format===ng,R.type),Xi&&(Pn?e.texStorage2D(i.TEXTURE_2D,1,ln,ze.width,ze.height):e.texImage2D(i.TEXTURE_2D,0,ln,ze.width,ze.height,0,dt,jn,null));else if(R.isDataTexture)if(vn.length>0){Pn&&Xi&&e.texStorage2D(i.TEXTURE_2D,$e,ln,vn[0].width,vn[0].height);for(let Ce=0,Ee=vn.length;Ce0){const Ke=MP(_t.width,_t.height,R.format,R.type);for(const tn of R.layerUpdates){const ei=_t.data.subarray(tn*Ke/_t.data.BYTES_PER_ELEMENT,(tn+1)*Ke/_t.data.BYTES_PER_ELEMENT);e.compressedTexSubImage3D(i.TEXTURE_2D_ARRAY,Ce,0,0,tn,_t.width,_t.height,1,dt,ei,0,0)}R.clearLayerUpdates()}else e.compressedTexSubImage3D(i.TEXTURE_2D_ARRAY,Ce,0,0,0,_t.width,_t.height,ze.depth,dt,_t.data,0,0)}else e.compressedTexImage3D(i.TEXTURE_2D_ARRAY,Ce,ln,_t.width,_t.height,ze.depth,0,_t.data,0,0);else console.warn("THREE.WebGLRenderer: Attempt to load unsupported compressed texture format in .uploadTexture()");else Pn?Z&&e.texSubImage3D(i.TEXTURE_2D_ARRAY,Ce,0,0,0,_t.width,_t.height,ze.depth,dt,jn,_t.data):e.texImage3D(i.TEXTURE_2D_ARRAY,Ce,ln,_t.width,_t.height,ze.depth,0,dt,jn,_t.data)}else{Pn&&Xi&&e.texStorage2D(i.TEXTURE_2D,$e,ln,vn[0].width,vn[0].height);for(let Ce=0,Ee=vn.length;Ce0){const Ce=MP(ze.width,ze.height,R.format,R.type);for(const Ee of R.layerUpdates){const Ke=ze.data.subarray(Ee*Ce/ze.data.BYTES_PER_ELEMENT,(Ee+1)*Ce/ze.data.BYTES_PER_ELEMENT);e.texSubImage3D(i.TEXTURE_2D_ARRAY,0,0,0,Ee,ze.width,ze.height,1,dt,jn,Ke)}R.clearLayerUpdates()}else e.texSubImage3D(i.TEXTURE_2D_ARRAY,0,0,0,0,ze.width,ze.height,ze.depth,dt,jn,ze.data)}else e.texImage3D(i.TEXTURE_2D_ARRAY,0,ln,ze.width,ze.height,ze.depth,0,dt,jn,ze.data);else if(R.isData3DTexture)Pn?(Xi&&e.texStorage3D(i.TEXTURE_3D,$e,ln,ze.width,ze.height,ze.depth),Z&&e.texSubImage3D(i.TEXTURE_3D,0,0,0,0,ze.width,ze.height,ze.depth,dt,jn,ze.data)):e.texImage3D(i.TEXTURE_3D,0,ln,ze.width,ze.height,ze.depth,0,dt,jn,ze.data);else if(R.isFramebufferTexture){if(Xi)if(Pn)e.texStorage2D(i.TEXTURE_2D,$e,ln,ze.width,ze.height);else{let Ce=ze.width,Ee=ze.height;for(let Ke=0;Ke<$e;Ke++)e.texImage2D(i.TEXTURE_2D,Ke,ln,Ce,Ee,0,dt,jn,null),Ce>>=1,Ee>>=1}}else if(vn.length>0){if(Pn&&Xi){const Ce=pt(vn[0]);e.texStorage2D(i.TEXTURE_2D,$e,ln,Ce.width,Ce.height)}for(let Ce=0,Ee=vn.length;Ce>Ae),dt=Math.max(1,R.height>>Ae);Te===i.TEXTURE_3D||Te===i.TEXTURE_2D_ARRAY?e.texImage3D(Te,Ae,ut,ze,dt,R.depth,0,Bt,Je,null):e.texImage2D(Te,Ae,ut,ze,dt,0,Bt,Je,null)}e.bindFramebuffer(i.FRAMEBUFFER,z),Me(R)?a.framebufferTexture2DMultisampleEXT(i.FRAMEBUFFER,Ie,Te,n.get(ce).__webglTexture,0,nt(R)):(Te===i.TEXTURE_2D||Te>=i.TEXTURE_CUBE_MAP_POSITIVE_X&&Te<=i.TEXTURE_CUBE_MAP_NEGATIVE_Z)&&i.framebufferTexture2D(i.FRAMEBUFFER,Ie,Te,n.get(ce).__webglTexture,Ae),e.bindFramebuffer(i.FRAMEBUFFER,null)}function Ze(z,R,ce){if(i.bindRenderbuffer(i.RENDERBUFFER,z),R.depthBuffer){const Ie=R.depthTexture,Ae=x(R.stencilBuffer,Ie&&Ie.isDepthTexture?Ie.type:null),Bt=R.stencilBuffer?i.DEPTH_STENCIL_ATTACHMENT:i.DEPTH_ATTACHMENT,Je=nt(R);Me(R)?a.renderbufferStorageMultisampleEXT(i.RENDERBUFFER,Je,Ae,R.width,R.height):ce?i.renderbufferStorageMultisample(i.RENDERBUFFER,Je,Ae,R.width,R.height):i.renderbufferStorage(i.RENDERBUFFER,Ae,R.width,R.height),i.framebufferRenderbuffer(i.FRAMEBUFFER,Bt,i.RENDERBUFFER,z)}else{const Ie=R.textures;for(let Te=0;Te0&&!0===t.has("WEBGL_multisampled_render_to_texture")&&!1!==R.__useRenderToTexture}function it(z,R){const ce=z.colorSpace,Ie=z.format,Te=z.type;return!0===z.isCompressedTexture||!0===z.isVideoTexture||ce!==ds&&ce!==wu&&(Jn.getTransfer(ce)===Oi?(Ie!==ko||Te!==Jc)&&console.warn("THREE.WebGLTextures: sRGB encoded textures have to use RGBAFormat and UnsignedByteType."):console.error("THREE.WebGLTextures: Unsupported texture color space:",ce)),R}function pt(z){return typeof HTMLImageElement<"u"&&z instanceof HTMLImageElement?(c.width=z.naturalWidth||z.width,c.height=z.naturalHeight||z.height):typeof VideoFrame<"u"&&z instanceof VideoFrame?(c.width=z.displayWidth,c.height=z.displayHeight):(c.width=z.width,c.height=z.height),c}this.allocateTextureUnit=function ie(){const z=A;return z>=r.maxTextures&&console.warn("THREE.WebGLTextures: Trying to use "+z+" texture units while this GPU supports only "+r.maxTextures),A+=1,z},this.resetTextureUnits=function $(){A=0},this.setTexture2D=se,this.setTexture2DArray=function ge(z,R){const ce=n.get(z);z.version>0&&ce.__version!==z.version?en(ce,z,R):e.bindTexture(i.TEXTURE_2D_ARRAY,ce.__webglTexture,i.TEXTURE0+R)},this.setTexture3D=function q(z,R){const ce=n.get(z);z.version>0&&ce.__version!==z.version?en(ce,z,R):e.bindTexture(i.TEXTURE_3D,ce.__webglTexture,i.TEXTURE0+R)},this.setTextureCube=function re(z,R){const ce=n.get(z);z.version>0&&ce.__version!==z.version?function ae(z,R,ce){if(6!==R.image.length)return;const Ie=It(z,R),Te=R.source;e.bindTexture(i.TEXTURE_CUBE_MAP,z.__webglTexture,i.TEXTURE0+ce);const Ae=n.get(Te);if(Te.version!==Ae.__version||!0===Ie){e.activeTexture(i.TEXTURE0+ce);const Bt=Jn.getPrimaries(Jn.workingColorSpace),Je=R.colorSpace===wu?null:Jn.getPrimaries(R.colorSpace),ut=R.colorSpace===wu||Bt===Je?i.NONE:i.BROWSER_DEFAULT_WEBGL;i.pixelStorei(i.UNPACK_FLIP_Y_WEBGL,R.flipY),i.pixelStorei(i.UNPACK_PREMULTIPLY_ALPHA_WEBGL,R.premultiplyAlpha),i.pixelStorei(i.UNPACK_ALIGNMENT,R.unpackAlignment),i.pixelStorei(i.UNPACK_COLORSPACE_CONVERSION_WEBGL,ut);const bn=R.isCompressedTexture||R.image[0].isCompressedTexture,ze=R.image[0]&&R.image[0].isDataTexture,dt=[];for(let Ee=0;Ee<6;Ee++)dt[Ee]=bn||ze?ze?R.image[Ee].image:R.image[Ee]:b(R.image[Ee],!0,r.maxCubemapSize),dt[Ee]=it(R,dt[Ee]);const jn=dt[0],ln=s.convert(R.format,R.colorSpace),_t=s.convert(R.type),vn=M(R.internalFormat,ln,_t,R.colorSpace),Pn=!0!==R.isVideoTexture,Xi=void 0===Ae.__version||!0===Ie,Z=Te.dataReady;let Ce,$e=C(R,jn);if(Ye(i.TEXTURE_CUBE_MAP,R),bn){Pn&&Xi&&e.texStorage2D(i.TEXTURE_CUBE_MAP,$e,vn,jn.width,jn.height);for(let Ee=0;Ee<6;Ee++){Ce=dt[Ee].mipmaps;for(let Ke=0;Ke0&&$e++;const Ee=pt(dt[0]);e.texStorage2D(i.TEXTURE_CUBE_MAP,$e,vn,Ee.width,Ee.height)}for(let Ee=0;Ee<6;Ee++)if(ze){Pn?Z&&e.texSubImage2D(i.TEXTURE_CUBE_MAP_POSITIVE_X+Ee,0,0,0,dt[Ee].width,dt[Ee].height,ln,_t,dt[Ee].data):e.texImage2D(i.TEXTURE_CUBE_MAP_POSITIVE_X+Ee,0,vn,dt[Ee].width,dt[Ee].height,0,ln,_t,dt[Ee].data);for(let Ke=0;Ke1;if(Bt||(void 0===Ie.__webglTexture&&(Ie.__webglTexture=i.createTexture()),Ie.__version=R.version,o.memory.textures++),Ae){ce.__webglFramebuffer=[];for(let Je=0;Je<6;Je++)if(R.mipmaps&&R.mipmaps.length>0){ce.__webglFramebuffer[Je]=[];for(let ut=0;ut0){ce.__webglFramebuffer=[];for(let Je=0;Je0&&!1===Me(z)){ce.__webglMultisampledFramebuffer=i.createFramebuffer(),ce.__webglColorRenderbuffer=[],e.bindFramebuffer(i.FRAMEBUFFER,ce.__webglMultisampledFramebuffer);for(let Je=0;Je0)for(let ut=0;ut0)for(let ut=0;ut0)if(!1===Me(z)){const R=z.textures,ce=z.width,Ie=z.height;let Te=i.COLOR_BUFFER_BIT;const Ae=z.stencilBuffer?i.DEPTH_STENCIL_ATTACHMENT:i.DEPTH_ATTACHMENT,Bt=n.get(z),Je=R.length>1;if(Je)for(let ut=0;utm+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(xue)))}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 Lo;n.matrixAutoUpdate=!1,n.visible=!1,t.joints[e.jointName]=n,t.add(n)}return t.joints[e.jointName]}}class Cue{constructor(){this.texture=null,this.mesh=null,this.depthNear=0,this.depthFar=0}init(t,e,n){if(null===this.texture){const r=new Po;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}}getMesh(t){if(null!==this.texture&&null===this.mesh){const e=t.cameras[0].viewport,n=new Cl({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:e.z},depthHeight:{value:e.w}}});this.mesh=new Mn(new Iu(20,20),n)}return this.mesh}reset(){this.texture=null,this.mesh=null}getDepthTexture(){return this.texture}}class Sue extends og{constructor(t,e){super();const n=this;let r=null,s=1,o=null,a="local-floor",l=1,c=null,d=null,h=null,p=null,m=null,g=null;const b=new Cue,v=e.getContextAttributes();let y=null,M=null;const x=[],C=[],F=new xe;let D=null;const k=new yr;k.layers.enable(1),k.viewport=new gi;const B=new yr;B.layers.enable(2),B.viewport=new gi;const T=[k,B],A=new bue;A.layers.enable(1),A.layers.enable(2);let $=null,ie=null;function ne(ae){const Oe=C.indexOf(ae.inputSource);if(-1===Oe)return;const Ze=x[Oe];void 0!==Ze&&(Ze.update(ae.inputSource,ae.frame,c||o),Ze.dispatchEvent({type:ae.type,data:ae.inputSource}))}function se(){r.removeEventListener("select",ne),r.removeEventListener("selectstart",ne),r.removeEventListener("selectend",ne),r.removeEventListener("squeeze",ne),r.removeEventListener("squeezestart",ne),r.removeEventListener("squeezeend",ne),r.removeEventListener("end",se),r.removeEventListener("inputsourceschange",ge);for(let ae=0;ae=0&&(C[Fe]=null,x[Fe].disconnect(Ze))}for(let Oe=0;Oe=C.length){C.push(Ze),Fe=St;break}if(null===C[St]){C[St]=Ze,Fe=St;break}}if(-1===Fe)break}const bt=x[Fe];bt&&bt.connect(Ze)}}this.cameraAutoUpdate=!0,this.enabled=!1,this.isPresenting=!1,this.getController=function(ae){let Oe=x[ae];return void 0===Oe&&(Oe=new CP,x[ae]=Oe),Oe.getTargetRaySpace()},this.getControllerGrip=function(ae){let Oe=x[ae];return void 0===Oe&&(Oe=new CP,x[ae]=Oe),Oe.getGripSpace()},this.getHand=function(ae){let Oe=x[ae];return void 0===Oe&&(Oe=new CP,x[ae]=Oe),Oe.getHandSpace()},this.setFramebufferScaleFactor=function(ae){s=ae,!0===n.isPresenting&&console.warn("THREE.WebXRManager: Cannot change framebuffer scale while presenting.")},this.setReferenceSpaceType=function(ae){a=ae,!0===n.isPresenting&&console.warn("THREE.WebXRManager: Cannot change reference space type while presenting.")},this.getReferenceSpace=function(){return c||o},this.setReferenceSpace=function(ae){c=ae},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 ae=tt(function*(Oe){if(r=Oe,null!==r){if(y=t.getRenderTarget(),r.addEventListener("select",ne),r.addEventListener("selectstart",ne),r.addEventListener("selectend",ne),r.addEventListener("squeeze",ne),r.addEventListener("squeezestart",ne),r.addEventListener("squeezeend",ne),r.addEventListener("end",se),r.addEventListener("inputsourceschange",ge),!0!==v.xrCompatible&&(yield e.makeXRCompatible()),D=t.getPixelRatio(),t.getSize(F),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 Mu(m.framebufferWidth,m.framebufferHeight,{format:ko,type:Jc,colorSpace:t.outputColorSpace,stencilBuffer:v.stencil});else{let Ze=null,Fe=null,bt=null;v.depth&&(bt=v.stencil?e.DEPTH24_STENCIL8:e.DEPTH_COMPONENT24,Ze=v.stencil?ng:tg,Fe=v.stencil?eg:xu);const St={colorFormat:e.RGBA8,depthFormat:bt,scaleFactor:s};h=new XRWebGLBinding(r,e),p=h.createProjectionLayer(St),r.updateRenderState({layers:[p]}),t.setPixelRatio(1),t.setSize(p.textureWidth,p.textureHeight,!1),M=new Mu(p.textureWidth,p.textureHeight,{format:ko,type:Jc,depthTexture:new d5(p.textureWidth,p.textureHeight,Fe,void 0,void 0,void 0,void 0,void 0,void 0,Ze),stencilBuffer:v.stencil,colorSpace:t.outputColorSpace,samples:v.antialias?4:0,resolveDepthBuffer:!1===p.ignoreDepthValues})}M.isXRRenderTarget=!0,this.setFoveation(l),c=null,o=yield r.requestReferenceSpace(a),en.setContext(r),en.start(),n.isPresenting=!0,n.dispatchEvent({type:"sessionstart"})}});return function(Oe){return ae.apply(this,arguments)}}(),this.getEnvironmentBlendMode=function(){if(null!==r)return r.environmentBlendMode},this.getDepthTexture=function(){return b.getDepthTexture()};const q=new O,re=new O;function we(ae,Oe){null===Oe?ae.matrixWorld.copy(ae.matrix):ae.matrixWorld.multiplyMatrices(Oe.matrixWorld,ae.matrix),ae.matrixWorldInverse.copy(ae.matrixWorld).invert()}this.updateCamera=function(ae){if(null===r)return;null!==b.texture&&(ae.near=b.depthNear,ae.far=b.depthFar),A.near=B.near=k.near=ae.near,A.far=B.far=k.far=ae.far,($!==A.near||ie!==A.far)&&(r.updateRenderState({depthNear:A.near,depthFar:A.far}),$=A.near,ie=A.far,k.near=$,k.far=ie,B.near=$,B.far=ie,k.updateProjectionMatrix(),B.updateProjectionMatrix(),ae.updateProjectionMatrix());const Oe=ae.parent,Ze=A.cameras;we(A,Oe);for(let Fe=0;Fe0&&(v.alphaTest.value=y.alphaTest);const M=t.get(y),x=M.envMap,C=M.envMapRotation;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(Eue.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,v.lightMapIntensity.value=y.lightMapIntensity,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,Z4(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 d(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===Ro&&v.clearcoatNormalScale.value.negate())),y.dispersion>0&&(v.dispersion.value=y.dispersion),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 Due(i,t,e,n){let r={},s={},o=[];const a=i.getParameter(i.MAX_UNIFORM_BUFFER_BINDINGS);function m(M,x,C,F){const D=M.value,k=x+"_"+C;if(void 0===F[k])return F[k]="number"==typeof D||"boolean"==typeof D?D:D.clone(),!0;{const B=F[k];if("number"==typeof D||"boolean"==typeof D){if(B!==D)return F[k]=D,!0}else if(!1===B.equals(D))return B.copy(D),!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 k=0,B=x.length;k0&&(C+=16-D),M.__size=C,M.__cache={}}(M),C=function d(M){const x=function h(){for(let M=0;M0),Xt=!!le.morphAttributes.position,ai=!!le.morphAttributes.normal,Fi=!!le.morphAttributes.color;let nr=bu;de.toneMapped&&(null===k||!0===k.isXRRenderTarget)&&(nr=x.toneMapping);const aa=le.morphAttributes.position||le.morphAttributes.normal||le.morphAttributes.color,hi=void 0!==aa?aa.length:0,Rt=it.get(de),fs=v.state.lights;!0!==ae||!0!==Oe&&L===T||bn.setState(de,L,L===T&&de.id===B);let fi=!1;de.version===Rt.__version?(Rt.needsLights&&Rt.lightsStateVersion!==fs.state.version||Rt.outputColorSpace!==xt||te.isBatchedMesh&&!1===Rt.batching||!te.isBatchedMesh&&!0===Rt.batching||te.isBatchedMesh&&!0===Rt.batchingColor&&null===te.colorTexture||te.isBatchedMesh&&!1===Rt.batchingColor&&null!==te.colorTexture||te.isInstancedMesh&&!1===Rt.instancing||!te.isInstancedMesh&&!0===Rt.instancing||te.isSkinnedMesh&&!1===Rt.skinning||!te.isSkinnedMesh&&!0===Rt.skinning||te.isInstancedMesh&&!0===Rt.instancingColor&&null===te.instanceColor||te.isInstancedMesh&&!1===Rt.instancingColor&&null!==te.instanceColor||te.isInstancedMesh&&!0===Rt.instancingMorph&&null===te.morphTexture||te.isInstancedMesh&&!1===Rt.instancingMorph&&null!==te.morphTexture||Rt.envMap!==wt||!0===de.fog&&Rt.fog!==je||void 0!==Rt.numClippingPlanes&&(Rt.numClippingPlanes!==bn.numPlanes||Rt.numIntersection!==bn.numIntersection)||Rt.vertexAlphas!==qt||Rt.vertexTangents!==on||Rt.morphTargets!==Xt||Rt.morphNormals!==ai||Rt.morphColors!==Fi||Rt.toneMapping!==nr||Rt.morphTargetsCount!==hi)&&(fi=!0):(fi=!0,Rt.__version=de.version);let El=Rt.currentProgram;!0===fi&&(El=xE(de,K,te));let qg=!1,la=!1,qO=!1;const xr=El.getUniforms(),Uu=Rt.uniforms;if(Me.useProgram(El.program)&&(qg=!0,la=!0,qO=!0),de.id!==B&&(B=de.id,la=!0),qg||T!==L){xr.setValue(N,"projectionMatrix",L.projectionMatrix),xr.setValue(N,"viewMatrix",L.matrixWorldInverse);const za=xr.map.cameraPosition;void 0!==za&&za.setValue(N,Fe.setFromMatrixPosition(L.matrixWorld)),nt.logarithmicDepthBuffer&&xr.setValue(N,"logDepthBufFC",2/(Math.log(L.far+1)/Math.LN2)),(de.isMeshPhongMaterial||de.isMeshToonMaterial||de.isMeshLambertMaterial||de.isMeshBasicMaterial||de.isMeshStandardMaterial||de.isShaderMaterial)&&xr.setValue(N,"isOrthographic",!0===L.isOrthographicCamera),T!==L&&(T=L,la=!0,qO=!0)}if(te.isSkinnedMesh){xr.setOptional(N,te,"bindMatrix"),xr.setOptional(N,te,"bindMatrixInverse");const za=te.skeleton;za&&(null===za.boneTexture&&za.computeBoneTexture(),xr.setValue(N,"boneTexture",za.boneTexture,pt))}te.isBatchedMesh&&(xr.setOptional(N,te,"batchingTexture"),xr.setValue(N,"batchingTexture",te._matricesTexture,pt),xr.setOptional(N,te,"batchingIdTexture"),xr.setValue(N,"batchingIdTexture",te._indirectTexture,pt),xr.setOptional(N,te,"batchingColorTexture"),null!==te._colorsTexture&&xr.setValue(N,"batchingColorTexture",te._colorsTexture,pt));const XO=le.morphAttributes;if((void 0!==XO.position||void 0!==XO.normal||void 0!==XO.color)&&jn.update(te,le,El),(la||Rt.receiveShadow!==te.receiveShadow)&&(Rt.receiveShadow=te.receiveShadow,xr.setValue(N,"receiveShadow",te.receiveShadow)),de.isMeshGouraudMaterial&&null!==de.envMap&&(Uu.envMap.value=wt,Uu.flipEnvMap.value=wt.isCubeTexture&&!1===wt.isRenderTargetTexture?-1:1),de.isMeshStandardMaterial&&null===de.envMap&&null!==K.environment&&(Uu.envMapIntensity.value=K.environmentIntensity),la&&(xr.setValue(N,"toneMappingExposure",x.toneMappingExposure),Rt.needsLights&&function Pve(L,K){L.ambientLightColor.needsUpdate=K,L.lightProbe.needsUpdate=K,L.directionalLights.needsUpdate=K,L.directionalLightShadows.needsUpdate=K,L.pointLights.needsUpdate=K,L.pointLightShadows.needsUpdate=K,L.spotLights.needsUpdate=K,L.spotLightShadows.needsUpdate=K,L.rectAreaLights.needsUpdate=K,L.hemisphereLights.needsUpdate=K}(Uu,qO),je&&!0===de.fog&&Bt.refreshFogUniforms(Uu,je),Bt.refreshMaterialUniforms(Uu,de,re,q,v.state.transmissionRenderTarget[L.id]),uS.upload(N,_8(Rt),Uu,pt)),de.isShaderMaterial&&!0===de.uniformsNeedUpdate&&(uS.upload(N,_8(Rt),Uu,pt),de.uniformsNeedUpdate=!1),de.isSpriteMaterial&&xr.setValue(N,"center",te.center),xr.setValue(N,"modelViewMatrix",te.modelViewMatrix),xr.setValue(N,"normalMatrix",te.normalMatrix),xr.setValue(N,"modelMatrix",te.matrixWorld),de.isShaderMaterial||de.isRawShaderMaterial){const za=de.uniformsGroups;for(let KO=0,Fve=za.length;KO{function je(){de.forEach(function(st){it.get(st).currentProgram.isReady()&&de.delete(st)}),0!==de.size?setTimeout(je,10):te(L)}null!==Le.get("KHR_parallel_shader_compile")?je():setTimeout(je,10)})};let ui=null;function fc(){kf.stop()}function f8(){kf.start()}const kf=new t5;function YO(L,K,le,de){if(!1===L.visible)return;if(L.layers.test(K.layers))if(L.isGroup)le=L.renderOrder;else if(L.isLOD)!0===L.autoUpdate&&L.update(K);else if(L.isLight)v.pushLight(L),L.castShadow&&v.pushShadow(L);else if(L.isSprite){if(!L.frustumCulled||en.intersectsSprite(L)){de&&bt.setFromMatrixPosition(L.matrixWorld).applyMatrix4(Ze);const st=Te.update(L),xt=L.material;xt.visible&&b.push(L,st,xt,le,bt.z,null)}}else if((L.isMesh||L.isLine||L.isPoints)&&(!L.frustumCulled||en.intersectsObject(L))){const st=Te.update(L),xt=L.material;if(de&&(void 0!==L.boundingSphere?(null===L.boundingSphere&&L.computeBoundingSphere(),bt.copy(L.boundingSphere.center)):(null===st.boundingSphere&&st.computeBoundingSphere(),bt.copy(st.boundingSphere.center)),bt.applyMatrix4(L.matrixWorld).applyMatrix4(Ze)),Array.isArray(xt)){const wt=st.groups;for(let qt=0,on=wt.length;qt0&&bE(te,K,le),je.length>0&&bE(je,K,le),st.length>0&&bE(st,K,le),Me.buffers.depth.setTest(!0),Me.buffers.depth.setMask(!0),Me.buffers.color.setMask(!0),Me.setPolygonOffset(!1)}function m8(L,K,le,de){if(null!==(!0===le.isScene?le.overrideMaterial:null))return;void 0===v.state.transmissionRenderTarget[de.id]&&(v.state.transmissionRenderTarget[de.id]=new Mu(1,1,{generateMipmaps:!0,type:Le.has("EXT_color_buffer_half_float")||Le.has("EXT_color_buffer_float")?Jm:Jc,minFilter:bl,samples:4,stencilBuffer:s,resolveDepthBuffer:!1,resolveStencilBuffer:!1,colorSpace:Jn.workingColorSpace}));const je=v.state.transmissionRenderTarget[de.id],st=de.viewport||A;je.setSize(st.z,st.w);const xt=x.getRenderTarget();x.setRenderTarget(je),x.getClearColor(ne),se=x.getClearAlpha(),se<1&&x.setClearColor(16777215,.5),x.clear(),Mt&&dt.render(le);const wt=x.toneMapping;x.toneMapping=bu;const qt=de.viewport;if(void 0!==de.viewport&&(de.viewport=void 0),v.setupLightsView(de),!0===ae&&bn.setGlobalState(x.clippingPlanes,de),bE(L,le,de),pt.updateMultisampleRenderTarget(je),pt.updateRenderTargetMipmap(je),!1===Le.has("WEBGL_multisampled_render_to_texture")){let on=!1;for(let Xt=0,ai=K.length;Xt0)for(let st=0,xt=je.length;st0&&m8(de,te,L,K),Mt&&dt.render(L),p8(b,L,K);null!==k&&(pt.updateMultisampleRenderTarget(k),pt.updateRenderTargetMipmap(k)),!0===L.isScene&&L.onAfterRender(x,L,K),Pn.resetDefaultState(),B=-1,T=null,M.pop(),M.length>0?(v=M[M.length-1],!0===ae&&bn.setGlobalState(x.clippingPlanes,v.state.camera)):v=null,y.pop(),b=y.length>0?y[y.length-1]:null},this.getActiveCubeFace=function(){return F},this.getActiveMipmapLevel=function(){return D},this.getRenderTarget=function(){return k},this.setRenderTargetTextures=function(L,K,le){it.get(L.texture).__webglTexture=K,it.get(L.depthTexture).__webglTexture=le;const de=it.get(L);de.__hasExternalTextures=!0,de.__autoAllocateDepthBuffer=void 0===le,de.__autoAllocateDepthBuffer||!0===Le.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(L,K){const le=it.get(L);le.__webglFramebuffer=K,le.__useDefaultFramebuffer=void 0===K},this.setRenderTarget=function(L,K=0,le=0){k=L,F=K,D=le;let de=!0,te=null,je=!1,st=!1;if(L){const wt=it.get(L);void 0!==wt.__useDefaultFramebuffer?(Me.bindFramebuffer(N.FRAMEBUFFER,null),de=!1):void 0===wt.__webglFramebuffer?pt.setupRenderTarget(L):wt.__hasExternalTextures&&pt.rebindTextures(L,it.get(L.texture).__webglTexture,it.get(L.depthTexture).__webglTexture);const qt=L.texture;(qt.isData3DTexture||qt.isDataArrayTexture||qt.isCompressedArrayTexture)&&(st=!0);const on=it.get(L).__webglFramebuffer;L.isWebGLCubeRenderTarget?(te=Array.isArray(on[K])?on[K][le]:on[K],je=!0):te=L.samples>0&&!1===pt.useMultisampledRTT(L)?it.get(L).__webglMultisampledFramebuffer:Array.isArray(on)?on[le]:on,A.copy(L.viewport),$.copy(L.scissor),ie=L.scissorTest}else A.copy(Ne).multiplyScalar(re).floor(),$.copy(Ye).multiplyScalar(re).floor(),ie=It;if(Me.bindFramebuffer(N.FRAMEBUFFER,te)&&de&&Me.drawBuffers(L,te),Me.viewport(A),Me.scissor($),Me.setScissorTest(ie),je){const wt=it.get(L.texture);N.framebufferTexture2D(N.FRAMEBUFFER,N.COLOR_ATTACHMENT0,N.TEXTURE_CUBE_MAP_POSITIVE_X+K,wt.__webglTexture,le)}else if(st){const wt=it.get(L.texture);N.framebufferTextureLayer(N.FRAMEBUFFER,N.COLOR_ATTACHMENT0,wt.__webglTexture,le||0,K||0)}B=-1},this.readRenderTargetPixels=function(L,K,le,de,te,je,st){if(!L||!L.isWebGLRenderTarget)return void console.error("THREE.WebGLRenderer.readRenderTargetPixels: renderTarget is not THREE.WebGLRenderTarget.");let xt=it.get(L).__webglFramebuffer;if(L.isWebGLCubeRenderTarget&&void 0!==st&&(xt=xt[st]),xt){Me.bindFramebuffer(N.FRAMEBUFFER,xt);try{const wt=L.texture,qt=wt.format,on=wt.type;if(!nt.textureFormatReadable(qt))return void console.error("THREE.WebGLRenderer.readRenderTargetPixels: renderTarget is not in RGBA or implementation defined format.");if(!nt.textureTypeReadable(on))return void console.error("THREE.WebGLRenderer.readRenderTargetPixels: renderTarget is not in UnsignedByteType or implementation defined type.");K>=0&&K<=L.width-de&&le>=0&&le<=L.height-te&&N.readPixels(K,le,de,te,vn.convert(qt),vn.convert(on),je)}finally{const wt=null!==k?it.get(k).__webglFramebuffer:null;Me.bindFramebuffer(N.FRAMEBUFFER,wt)}}},this.readRenderTargetPixelsAsync=function(){var L=tt(function*(K,le,de,te,je,st,xt){if(!K||!K.isWebGLRenderTarget)throw new Error("THREE.WebGLRenderer.readRenderTargetPixels: renderTarget is not THREE.WebGLRenderTarget.");let wt=it.get(K).__webglFramebuffer;if(K.isWebGLCubeRenderTarget&&void 0!==xt&&(wt=wt[xt]),wt){Me.bindFramebuffer(N.FRAMEBUFFER,wt);try{const qt=K.texture,on=qt.format,Xt=qt.type;if(!nt.textureFormatReadable(on))throw new Error("THREE.WebGLRenderer.readRenderTargetPixelsAsync: renderTarget is not in RGBA or implementation defined format.");if(!nt.textureTypeReadable(Xt))throw new Error("THREE.WebGLRenderer.readRenderTargetPixelsAsync: renderTarget is not in UnsignedByteType or implementation defined type.");if(le>=0&&le<=K.width-te&&de>=0&&de<=K.height-je){const ai=N.createBuffer();N.bindBuffer(N.PIXEL_PACK_BUFFER,ai),N.bufferData(N.PIXEL_PACK_BUFFER,st.byteLength,N.STREAM_READ),N.readPixels(le,de,te,je,vn.convert(on),vn.convert(Xt),0),N.flush();const Fi=N.fenceSync(N.SYNC_GPU_COMMANDS_COMPLETE,0);yield function eae(i,t,e){return new Promise(function(n,r){setTimeout(function s(){switch(i.clientWaitSync(t,i.SYNC_FLUSH_COMMANDS_BIT,0)){case i.WAIT_FAILED:r();break;case i.TIMEOUT_EXPIRED:setTimeout(s,e);break;default:n()}},e)})}(N,Fi,4);try{N.bindBuffer(N.PIXEL_PACK_BUFFER,ai),N.getBufferSubData(N.PIXEL_PACK_BUFFER,0,st)}finally{N.deleteBuffer(ai),N.deleteSync(Fi)}return st}}finally{const qt=null!==k?it.get(k).__webglFramebuffer:null;Me.bindFramebuffer(N.FRAMEBUFFER,qt)}}});return function(K,le,de,te,je,st,xt){return L.apply(this,arguments)}}(),this.copyFramebufferToTexture=function(L,K=null,le=0){!0!==L.isTexture&&(cg("WebGLRenderer: copyFramebufferToTexture function signature has changed."),K=arguments[0]||null,L=arguments[1]);const de=Math.pow(2,-le),te=Math.floor(L.image.width*de),je=Math.floor(L.image.height*de),st=null!==K?K.x:0,xt=null!==K?K.y:0;pt.setTexture2D(L,0),N.copyTexSubImage2D(N.TEXTURE_2D,le,0,0,st,xt,te,je),Me.unbindTexture()},this.copyTextureToTexture=function(L,K,le=null,de=null,te=0){let je,st,xt,wt,qt,on;!0!==L.isTexture&&(cg("WebGLRenderer: copyTextureToTexture function signature has changed."),de=arguments[0]||null,L=arguments[1],K=arguments[2],te=arguments[3]||0,le=null),null!==le?(je=le.max.x-le.min.x,st=le.max.y-le.min.y,xt=le.min.x,wt=le.min.y):(je=L.image.width,st=L.image.height,xt=0,wt=0),null!==de?(qt=de.x,on=de.y):(qt=0,on=0);const Xt=vn.convert(K.format),ai=vn.convert(K.type);pt.setTexture2D(K,0),N.pixelStorei(N.UNPACK_FLIP_Y_WEBGL,K.flipY),N.pixelStorei(N.UNPACK_PREMULTIPLY_ALPHA_WEBGL,K.premultiplyAlpha),N.pixelStorei(N.UNPACK_ALIGNMENT,K.unpackAlignment);const Fi=N.getParameter(N.UNPACK_ROW_LENGTH),nr=N.getParameter(N.UNPACK_IMAGE_HEIGHT),aa=N.getParameter(N.UNPACK_SKIP_PIXELS),hi=N.getParameter(N.UNPACK_SKIP_ROWS),Rt=N.getParameter(N.UNPACK_SKIP_IMAGES),fs=L.isCompressedTexture?L.mipmaps[te]:L.image;N.pixelStorei(N.UNPACK_ROW_LENGTH,fs.width),N.pixelStorei(N.UNPACK_IMAGE_HEIGHT,fs.height),N.pixelStorei(N.UNPACK_SKIP_PIXELS,xt),N.pixelStorei(N.UNPACK_SKIP_ROWS,wt),L.isDataTexture?N.texSubImage2D(N.TEXTURE_2D,te,qt,on,je,st,Xt,ai,fs.data):L.isCompressedTexture?N.compressedTexSubImage2D(N.TEXTURE_2D,te,qt,on,fs.width,fs.height,Xt,fs.data):N.texSubImage2D(N.TEXTURE_2D,te,qt,on,je,st,Xt,ai,fs),N.pixelStorei(N.UNPACK_ROW_LENGTH,Fi),N.pixelStorei(N.UNPACK_IMAGE_HEIGHT,nr),N.pixelStorei(N.UNPACK_SKIP_PIXELS,aa),N.pixelStorei(N.UNPACK_SKIP_ROWS,hi),N.pixelStorei(N.UNPACK_SKIP_IMAGES,Rt),0===te&&K.generateMipmaps&&N.generateMipmap(N.TEXTURE_2D),Me.unbindTexture()},this.copyTextureToTexture3D=function(L,K,le=null,de=null,te=0){let je,st,xt,wt,qt,on,Xt,ai,Fi;!0!==L.isTexture&&(cg("WebGLRenderer: copyTextureToTexture3D function signature has changed."),le=arguments[0]||null,de=arguments[1]||null,L=arguments[2],K=arguments[3],te=arguments[4]||0);const nr=L.isCompressedTexture?L.mipmaps[te]:L.image;null!==le?(je=le.max.x-le.min.x,st=le.max.y-le.min.y,xt=le.max.z-le.min.z,wt=le.min.x,qt=le.min.y,on=le.min.z):(je=nr.width,st=nr.height,xt=nr.depth,wt=0,qt=0,on=0),null!==de?(Xt=de.x,ai=de.y,Fi=de.z):(Xt=0,ai=0,Fi=0);const aa=vn.convert(K.format),hi=vn.convert(K.type);let Rt;if(K.isData3DTexture)pt.setTexture3D(K,0),Rt=N.TEXTURE_3D;else{if(!K.isDataArrayTexture&&!K.isCompressedArrayTexture)return void console.warn("THREE.WebGLRenderer.copyTextureToTexture3D: only supports THREE.DataTexture3D and THREE.DataTexture2DArray.");pt.setTexture2DArray(K,0),Rt=N.TEXTURE_2D_ARRAY}N.pixelStorei(N.UNPACK_FLIP_Y_WEBGL,K.flipY),N.pixelStorei(N.UNPACK_PREMULTIPLY_ALPHA_WEBGL,K.premultiplyAlpha),N.pixelStorei(N.UNPACK_ALIGNMENT,K.unpackAlignment);const fs=N.getParameter(N.UNPACK_ROW_LENGTH),fi=N.getParameter(N.UNPACK_IMAGE_HEIGHT),El=N.getParameter(N.UNPACK_SKIP_PIXELS),qg=N.getParameter(N.UNPACK_SKIP_ROWS),la=N.getParameter(N.UNPACK_SKIP_IMAGES);N.pixelStorei(N.UNPACK_ROW_LENGTH,nr.width),N.pixelStorei(N.UNPACK_IMAGE_HEIGHT,nr.height),N.pixelStorei(N.UNPACK_SKIP_PIXELS,wt),N.pixelStorei(N.UNPACK_SKIP_ROWS,qt),N.pixelStorei(N.UNPACK_SKIP_IMAGES,on),L.isDataTexture||L.isData3DTexture?N.texSubImage3D(Rt,te,Xt,ai,Fi,je,st,xt,aa,hi,nr.data):K.isCompressedArrayTexture?N.compressedTexSubImage3D(Rt,te,Xt,ai,Fi,je,st,xt,aa,nr.data):N.texSubImage3D(Rt,te,Xt,ai,Fi,je,st,xt,aa,hi,nr),N.pixelStorei(N.UNPACK_ROW_LENGTH,fs),N.pixelStorei(N.UNPACK_IMAGE_HEIGHT,fi),N.pixelStorei(N.UNPACK_SKIP_PIXELS,El),N.pixelStorei(N.UNPACK_SKIP_ROWS,qg),N.pixelStorei(N.UNPACK_SKIP_IMAGES,la),0===te&&K.generateMipmaps&&N.generateMipmap(Rt),Me.unbindTexture()},this.initRenderTarget=function(L){void 0===it.get(L).__webglFramebuffer&&pt.setupRenderTarget(L)},this.initTexture=function(L){L.isCubeTexture?pt.setTextureCube(L,0):L.isData3DTexture?pt.setTexture3D(L,0):L.isDataArrayTexture||L.isCompressedArrayTexture?pt.setTexture2DArray(L,0):pt.setTexture2D(L,0),Me.unbindTexture()},this.resetState=function(){F=0,D=0,k=null,Me.reset(),Pn.reset()},typeof __THREE_DEVTOOLS__<"u"&&__THREE_DEVTOOLS__.dispatchEvent(new CustomEvent("observe",{detail:this}))}get coordinateSystem(){return ed}get outputColorSpace(){return this._outputColorSpace}set outputColorSpace(t){this._outputColorSpace=t;const e=this.getContext();e.drawingBufferColorSpace=t===jk?"display-p3":"srgb",e.unpackColorSpace=Jn.workingColorSpace===LC?"display-p3":"srgb"}}class kb extends Or{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 id,this.environmentIntensity=1,this.environmentRotation=new id,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 AP{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=ea()}onUploadCallback(){}set needsUpdate(t){!0===t&&this.version++}get updateRange(){return cg("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;r0){const r=e[n[0]];if(void 0!==r){this.morphTargetInfluences=[],this.morphTargetDictionary={};for(let s=0,o=r.length;sn)return;FP.applyMatrix4(i.matrixWorld);const l=t.ray.origin.distanceTo(FP);return lt.far?void 0:{distance:l,point:Z5.clone().applyMatrix4(i.matrixWorld),index:r,face:null,faceIndex:null,object:i}}const Q5=new O,J5=new O;class Ng extends pf{constructor(t,e){super(t,e),this.isLineSegments=!0,this.type="LineSegments"}computeLineDistances(){const t=this.geometry;if(null===t.index){const e=t.attributes.position,n=[];for(let r=0,s=e.count;r0){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 dc{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 d=n[r];return(r+(o-d)/(n[r+1]-d))/(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 xe:new O);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 O,r=[],s=[],o=[],a=new O,l=new Nt;for(let m=0;m<=t;m++)r[m]=this.getTangentAt(m/t,new O);s[0]=new O,o[0]=new O;let c=Number.MAX_VALUE;const d=Math.abs(r[0].x),h=Math.abs(r[0].y),p=Math.abs(r[0].z);d<=c&&(c=d,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(er(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(er(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 NP extends dc{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 xe){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(iG(a,l.x,c.x,d.x,h.x),iG(a,l.y,c.y,d.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]:(DS.subVectors(r[0],r[1]).add(r[0]),c=DS);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 d=c.getPoint(1);return this.currentPoint.copy(d),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 RS extends hn{constructor(t=[new xe(0,-.5),new xe(.5,0),new xe(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=er(r,0,2*Math.PI);const s=[],o=[],a=[],l=[],c=[],d=1/e,h=new O,p=new xe,m=new O,g=new O,b=new O;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*d*r,C=Math.sin(x),F=Math.cos(x);for(let D=0;D<=t.length-1;D++)h.x=t[D].x*C,h.y=t[D].y,h.z=t[D].x*F,o.push(h.x,h.y,h.z),p.x=M/e,p.y=D/(t.length-1),a.push(p.x,p.y),c.push(l[3*D+0]*C,l[3*D+1],l[3*D+0]*F)}for(let M=0;M0&&x(!0),e>0&&x(!1)),this.setIndex(d),this.setAttribute("position",new ct(h,3)),this.setAttribute("normal",new ct(p,3)),this.setAttribute("uv",new ct(m,2))}copy(t){return super.copy(t),this.parameters=Object.assign({},t.parameters),this}static fromJSON(t){return new Bg(t.radiusTop,t.radiusBottom,t.height,t.radialSegments,t.heightSegments,t.openEnded,t.thetaStart,t.thetaLength)}}class PS extends Bg{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 PS(t.radius,t.height,t.radialSegments,t.heightSegments,t.openEnded,t.thetaStart,t.thetaLength)}}class jb 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 d=[],h=new O,p=new O,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 F=0;F<=e;F++){const D=F/e;h.x=-t*Math.cos(r+D*s)*Math.sin(o+x*a),h.y=t*Math.cos(o+x*a),h.z=t*Math.sin(r+D*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(D+C,1-x),M.push(c++)}d.push(M)}for(let y=0;y0)&&m.push(d[y][M+1],C,D),(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 dispersion(){return this._dispersion}set dispersion(t){this._dispersion>0!=t>0&&this.version++,this._dispersion=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.dispersion=t.dispersion,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 zS extends Oo{constructor(t){super(),this.isMeshPhongMaterial=!0,this.type="MeshPhongMaterial",this.color=new qe(16777215),this.specular=new qe(1118481),this.shininess=30,this.map=null,this.lightMap=null,this.lightMapIntensity=1,this.aoMap=null,this.aoMapIntensity=1,this.emissive=new qe(0),this.emissiveIntensity=1,this.emissiveMap=null,this.bumpMap=null,this.bumpScale=1,this.normalMap=null,this.normalMapType=Qh,this.normalScale=new xe(1,1),this.displacementMap=null,this.displacementScale=1,this.displacementBias=0,this.specularMap=null,this.alphaMap=null,this.envMap=null,this.envMapRotation=new id,this.combine=EC,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 vf(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 vG(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 tO(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 nO(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 qb{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 _G(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}}uc.prototype.TimeBufferType=Float32Array,uc.prototype.ValueBufferType=Float32Array,uc.prototype.DefaultInterpolation=bb;class zg extends uc{constructor(t,e,n){super(t,e,n)}}zg.prototype.ValueTypeName="bool",zg.prototype.ValueBufferType=Array,zg.prototype.DefaultInterpolation=yb,zg.prototype.InterpolantFactoryMethodLinear=void 0,zg.prototype.InterpolantFactoryMethodSmooth=void 0;class bG extends uc{}bG.prototype.ValueTypeName="color";class Hg extends uc{}Hg.prototype.ValueTypeName="number";class Fhe extends qb{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 d=c+a;c!==d;c+=4)uo.slerpFlat(s,0,o,c-a,o,c,l);return s}}class Gg extends uc{InterpolantFactoryMethodLinear(t){return new Fhe(this.times,this.values,this.getValueSize(),t)}}Gg.prototype.ValueTypeName="quaternion",Gg.prototype.InterpolantFactoryMethodSmooth=void 0;class $g extends uc{constructor(t,e,n){super(t,e,n)}}$g.prototype.ValueTypeName="string",$g.prototype.ValueBufferType=Array,$g.prototype.DefaultInterpolation=yb,$g.prototype.InterpolantFactoryMethodLinear=void 0,$g.prototype.InterpolantFactoryMethodSmooth=void 0;class Wg extends uc{}Wg.prototype.ValueTypeName="vector";class Xb{constructor(t="",e=-1,n=[],r=2500){this.name=t,this.tracks=n,this.duration=e,this.blendMode=r,this.uuid=ea(),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(Nhe(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(uc.toJSON(n[s]));return r}static CreateFromMorphTargetSequence(t,e,n,r){const s=e.length,o=[];for(let a=0;a1){const h=d[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=[];nO(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:wG,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 dd={};class Bhe extends Error{constructor(t,e){super(t),this.response=e}}class La extends yf{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=ku.get(t);if(void 0!==s)return this.manager.itemStart(t),setTimeout(()=>{e&&e(s),this.manager.itemEnd(t)},0),s;if(void 0!==dd[t])return void dd[t].push({onLoad:e,onProgress:n,onError:r});dd[t]=[],dd[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 d=dd[t],h=c.body.getReader(),p=c.headers.get("X-File-Size")||c.headers.get("Content-Length"),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 F=new ProgressEvent("progress",{lengthComputable:g,loaded:b,total:m});for(let D=0,k=d.length;D{y.error(x)})}()}});return new Response(v)}throw new Bhe(`fetch for "${c.url}" responded with ${c.status}: ${c.statusText}`,c)}).then(c=>{switch(l){case"arraybuffer":return c.arrayBuffer();case"blob":return c.blob();case"document":return c.text().then(d=>(new DOMParser).parseFromString(d,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=>{ku.add(t,c);const d=dd[t];delete dd[t];for(let h=0,p=d.length;h{const d=dd[t];if(void 0===d)throw this.manager.itemError(t),c;delete dd[t];for(let h=0,p=d.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 HS extends yf{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=ku.get(t);if(void 0!==o)return s.manager.itemStart(t),setTimeout(function(){e&&e(o),s.manager.itemEnd(t)},0),o;const a=wb("img");function l(){d(),ku.add(t,this),e&&e(this),s.manager.itemEnd(t)}function c(h){d(),r&&r(h),s.manager.itemError(t),s.manager.itemEnd(t)}function d(){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 Pu extends yf{constructor(t){super(t)}load(t,e,n,r){const s=new Po,o=new HS(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 GS extends Or{constructor(t,e=1){super(),this.isLight=!0,this.type="Light",this.color=new qe(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()),void 0!==this.target&&(e.object.target=this.target.uuid),e}}const iO=new Nt,MG=new O,CG=new O;class rO{constructor(t){this.camera=t,this.intensity=1,this.bias=0,this.normalBias=0,this.radius=1,this.blurSamples=8,this.mapSize=new xe(512,512),this.map=null,this.mapPass=null,this.matrix=new Nt,this.autoUpdate=!0,this.needsUpdate=!1,this._frustum=new aS,this._frameExtents=new xe(1,1),this._viewportCount=1,this._viewports=[new gi(0,0,1,1)]}getViewportCount(){return this._viewportCount}getFrustum(){return this._frustum}updateMatrices(t){const e=this.camera,n=this.matrix;MG.setFromMatrixPosition(t.matrixWorld),e.position.copy(MG),CG.setFromMatrixPosition(t.target.matrixWorld),e.lookAt(CG),e.updateMatrixWorld(),iO.multiplyMatrices(e.projectionMatrix,e.matrixWorldInverse),this._frustum.setFromProjectionMatrix(iO),n.set(.5,0,0,.5,0,.5,0,.5,0,0,.5,.5,0,0,0,1),n.multiply(iO)}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.intensity=t.intensity,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 1!==this.intensity&&(t.intensity=this.intensity),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 Vhe extends rO{constructor(){super(new yr(50,1,.5,500)),this.isSpotLightShadow=!0,this.focus=1}updateMatrices(t){const e=this.camera,n=2*ag*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 SG extends GS{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(Or.DEFAULT_UP),this.updateMatrix(),this.target=new Or,this.distance=n,this.angle=r,this.penumbra=s,this.decay=o,this.map=null,this.shadow=new Vhe}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 EG=new Nt,Kb=new O,sO=new O;class zhe extends rO{constructor(){super(new yr(90,1,.5,500)),this.isPointLightShadow=!0,this._frameExtents=new xe(4,2),this._viewportCount=6,this._viewports=[new gi(2,1,1,1),new gi(0,1,1,1),new gi(3,1,1,1),new gi(1,1,1,1),new gi(3,0,1,1),new gi(1,0,1,1)],this._cubeDirections=[new O(1,0,0),new O(-1,0,0),new O(0,0,1),new O(0,0,-1),new O(0,1,0),new O(0,-1,0)],this._cubeUps=[new O(0,1,0),new O(0,1,0),new O(0,1,0),new O(0,1,0),new O(0,0,1),new O(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()),Kb.setFromMatrixPosition(t.matrixWorld),n.position.copy(Kb),sO.copy(n.position),sO.add(this._cubeDirections[e]),n.up.copy(this._cubeUps[e]),n.lookAt(sO),n.updateMatrixWorld(),r.makeTranslation(-Kb.x,-Kb.y,-Kb.z),EG.multiplyMatrices(n.projectionMatrix,n.matrixWorldInverse),this._frustum.setFromProjectionMatrix(EG)}}class AG extends GS{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 zhe}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 Hhe extends rO{constructor(){super(new Ib(-5,5,5,-5,.5,500)),this.isDirectionalLightShadow=!0}}class DG extends GS{constructor(t,e){super(t,e),this.isDirectionalLight=!0,this.type="DirectionalLight",this.position.copy(Or.DEFAULT_UP),this.updateMatrix(),this.target=new Or,this.shadow=new Hhe}dispose(){this.shadow.dispose()}copy(t){return super.copy(t),this.target=t.target.clone(),this.shadow=t.shadow.clone(),this}}class $S extends GS{constructor(t,e){super(t,e),this.isAmbientLight=!0,this.type="AmbientLight"}}class Ou{static decodeText(t){if(console.warn("THREE.LoaderUtils: decodeText() has been deprecated with r165 and will be removed with r175. Use TextDecoder instead."),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=ku.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 ku.add(t,c),e&&e(c),s.manager.itemEnd(t),c}).catch(function(c){r&&r(c),ku.remove(t),s.manager.itemError(t),s.manager.itemEnd(t)});ku.add(t,l),s.manager.itemStart(t)}}class OG{constructor(t=!0){this.autoStart=t,this.startTime=0,this.oldTime=0,this.elapsedTime=0,this.running=!1}start(){this.startTime=FG(),this.oldTime=this.startTime,this.elapsedTime=0,this.running=!0}stop(){this.getElapsedTime(),this.running=!1,this.autoStart=!1}getElapsedTime(){return this.getDelta(),this.elapsedTime}getDelta(){let t=0;if(this.autoStart&&!this.running)return this.start(),0;if(this.running){const e=FG();t=(e-this.oldTime)/1e3,this.oldTime=e,this.elapsedTime+=t}return t}}function FG(){return(typeof performance>"u"?Date:performance).now()}const aO="\\[\\]\\.:\\/",Jhe=new RegExp("["+aO+"]","g"),lO="[^"+aO+"]",efe="[^"+aO.replace("\\.","")+"]",sfe=new RegExp("^"+/((?:WC+[\/:])*)/.source.replace("WC",lO)+/(WCOD+)?/.source.replace("WCOD",efe)+/(?:\.(WC+)(?:\[(.+)\])?)?/.source.replace("WC",lO)+/\.(WC+)(?:\[(.+)\])?/.source.replace("WC",lO)+"$"),ofe=["material","materials","bones","map"];class afe{constructor(t,e,n){const r=n||Ii.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 Ii=(()=>{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(Jhe,"")}static parseTrackName(e){const n=sfe.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!==ofe.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;an.name===t||n.userData.name===t);return e?(e.removeFromParent(),new ia(e)):null}getBoundings(){return(new Us).setFromObject(this.nativeMesh)}clone(){return new ia(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 Mn&&this.disposeMesh(t)}),this.nativeMesh instanceof Mn&&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 hfe extends ia{get supportsFov(){return this.nativeCamera instanceof yr||"PerspectiveCamera"==this.nativeCamera.type}get fov(){return this.nativeCamera.fov||NaN}set fov(t){this.supportsFov&&(this.nativeCamera.fov=t,this.nativeCamera.updateProjectionMatrix())}constructor(t){super(t),this.nativeCamera=t}}class ffe extends Ose{createMaterial(t){let e={};t.color?e={color:t.color}:t.diffuse||(e={color:super.randomColor()});let n=t.shading||"unlit";switch(n){case"unlit":return new Yi(Object.assign(Object.assign({},e),{map:t.diffuse||null}));case"standart":return new Yb(Object.assign(Object.assign({},e),{map:t.diffuse||null}));case"phong":return new zS(Object.assign(Object.assign({},e),{map:t.diffuse||null}));case"wireframe":return new Yi(Object.assign(Object.assign({},e),{wireframe:!0}));default:throw new Error(`"${n}" shading not implemented for three.js`)}}transformPrimitiveZUp(t){t.geometry.rotateX(Math.PI/2)}createPrimitive(t,e={}){var n,r,s,o;let a=null,l=this.createMaterial(e);switch(t.shape){case"PLANE":a=new Mn(new Iu((null===(n=t.dimensions)||void 0===n?void 0:n.x)||1e4,(null===(r=t.dimensions)||void 0===r?void 0:r.y)||1e4,null===(s=t.segments)||void 0===s?void 0:s.x,null===(o=t.segments)||void 0===o?void 0:o.y),l);break;case"BOX":a=new Mn(new rf(...Pe.spr(t.dimensions),...t.segments?Pe.spr(t.segments):[]),l);break;case"CAPSULE":a=new Mn(new kS(t.radius,t.centersDistance,t.capSegments,t.radialSegments),l),this.transformPrimitiveZUp(a);break;case"CYLINDER":a=new Mn(new Bg(t.radius,t.radius,t.height,t.radialSegments,t.heightSegments),l),this.transformPrimitiveZUp(a);break;case"CONE":a=new Mn(new PS(t.radius,t.height,t.radialSegments,t.heightSegments),l),this.transformPrimitiveZUp(a);break;case"SPHERE":a=new Mn(new jb(t.radius,t.widthSegments,t.heightSegments),l),this.transformPrimitiveZUp(a);break;case"COMPOUND":a=new Lo;for(const{position:d,rotation:h,shape:p}of t.children){const m=this.createPrimitive(p,e).nativeMesh;d&&m.position.set(...Pe.spr(d)),h&&m.quaternion.set(...ji.spr(h)),a.add(m)}break;case"MESH":const c=new hn;c.setFromPoints(t.vertices.map(d=>new O(...Pe.spr(d)))),c.setIndex(t.faces.reduce((d,h)=>(d.push(...h),d),[])),a=new Mn(c,l)}if(!a)throw new Error(`Primitive with shape "${t.shape}" not implemented`);return void 0!==e.castShadow&&(a.castShadow=e.castShadow),void 0!==e.receiveShadow&&(a.receiveShadow=e.receiveShadow),new ia(a)}createPerspectiveCamera(t={}){return new hfe(new yr(t.fov||75,t.aspectRatio||1,t.frustrum?t.frustrum.near:1,t.frustrum?t.frustrum.far:1e4))}}function QG(i,t){if(t===Coe)return console.warn("THREE.BufferGeometryUtils.toTrianglesDrawMode(): Geometry already defined as triangles."),i;if(t===Wk||t===C4){let e=i.getIndex();if(null===e){const o=[],a=i.getAttribute("position");if(void 0===a)return console.error("THREE.BufferGeometryUtils.toTrianglesDrawMode(): Undefined position attribute. Processing not possible."),i;for(let l=0;l=2.0 are supported.")));const c=new Yfe(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 d=0;d=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 mfe(){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 Bn={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_DISPERSION:"KHR_materials_dispersion",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 gfe{constructor(t){this.parser=t,this.name=Bn.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 Ife{constructor(t){this.parser=t,this.name=Bn.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 Rfe{constructor(t){this.parser=t,this.name=Bn.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 kfe{constructor(t){this.name=Bn.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 d=r.count,h=r.byteStride,p=new Uint8Array(a,r.byteOffset||0,r.byteLength||0);return o.decodeGltfBufferAsync?o.decodeGltfBufferAsync(d,h,p,r.mode,r.filter).then(function(m){return m.buffer}):o.ready.then(function(){const m=new ArrayBuffer(d*h);return o.decodeGltfBuffer(new Uint8Array(m),d,h,p,r.mode,r.filter),m})})}return null}}class Pfe{constructor(t){this.name=Bn.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!==Na.TRIANGLES&&c.mode!==Na.TRIANGLE_STRIP&&c.mode!==Na.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(d=>(l[c]=d,l[c])));return a.length<1?null:(a.push(this.parser.createNodeMesh(t)),Promise.all(a).then(c=>{const d=c.pop(),h=d.isGroup?d.children:[d],p=c[0].count,m=[];for(const g of h){const b=new Nt,v=new O,y=new uo,M=new O(1,1,1),x=new Y5(g.geometry,g.material,p);for(let C=0;C-1,o=s?a.match(/Firefox\/([0-9]+)\./)[1]:-1}this.textureLoader=typeof createImageBitmap>"u"||n&&r<17||s&&o<98?new Pu(this.options.manager):new Xhe(this.options.manager),this.textureLoader.setCrossOrigin(this.options.crossOrigin),this.textureLoader.setRequestHeader(this.options.requestHeader),this.fileLoader=new La(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 Sf(s,a,r),ud(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,d]of o.children.entries())s(d,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(T,D[k*l+1]),l>=3&&v.setZ(T,D[k*l+2]),l>=4&&v.setW(T,D[k*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(d){d.flipY=!1,d.name=o.name||a.name||"",""===d.name&&"string"==typeof a.uri&&!1===a.uri.startsWith("data:image/")&&(d.name=a.uri);const p=(s.samplers||{})[o.sampler]||{};return d.magFilter=n$[p.magFilter]||lr,d.minFilter=n$[p.minFilter]||bl,d.wrapS=i$[p.wrapS]||Ns,d.wrapT=i$[p.wrapT]||Ns,r.associations.set(d,{textures:t}),d}).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 d=Promise.resolve(l).then(function(h){return new Promise(function(p,m){let g=p;!0===e.isImageBitmapLoader&&(g=function(b){const v=new Po(b);v.needsUpdate=!0,p(v)}),e.load(Ou.resolveURL(h,s.path),g,void 0,m)})}).then(function(h){return!0===c&&a.revokeObjectURL(l),ud(h,o),h.userData.mimeType=o.mimeType||function Wfe(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]=d,d}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[Bn.KHR_TEXTURE_TRANSFORM]){const a=void 0!==n.extensions?n.extensions[Bn.KHR_TEXTURE_TRANSFORM]:void 0;if(a){const l=s.associations.get(o);o=s.extensions[Bn.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 mf,Oo.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 us,Oo.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 Yb}loadMaterial(t){const e=this,r=this.extensions,s=this.json.materials[t];let o;const a={},c=[];if((s.extensions||{})[Bn.KHR_MATERIALS_UNLIT]){const h=r[Bn.KHR_MATERIALS_UNLIT];o=h.getMaterialType(),c.push(h.extendParams(a,s,e))}else{const h=s.pbrMetallicRoughness||{};if(a.color=new qe(1,1,1),a.opacity=1,Array.isArray(h.baseColorFactor)){const p=h.baseColorFactor;a.color.setRGB(p[0],p[1],p[2],ds),a.opacity=p[3]}void 0!==h.baseColorTexture&&c.push(e.assignTexture(a,"map",h.baseColorTexture,cs)),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=Ls);const d=s.alphaMode||"OPAQUE";if("BLEND"===d?(a.transparent=!0,a.depthWrite=!1):(a.transparent=!1,"MASK"===d&&(a.alphaTest=void 0!==s.alphaCutoff?s.alphaCutoff:.5)),void 0!==s.normalTexture&&o!==Yi&&(c.push(e.assignTexture(a,"normalMap",s.normalTexture)),a.normalScale=new xe(1,1),void 0!==s.normalTexture.scale)){const h=s.normalTexture.scale;a.normalScale.set(h,h)}if(void 0!==s.occlusionTexture&&o!==Yi&&(c.push(e.assignTexture(a,"aoMap",s.occlusionTexture)),void 0!==s.occlusionTexture.strength&&(a.aoMapIntensity=s.occlusionTexture.strength)),void 0!==s.emissiveFactor&&o!==Yi){const h=s.emissiveFactor;a.emissive=(new qe).setRGB(h[0],h[1],h[2],ds)}return void 0!==s.emissiveTexture&&o!==Yi&&c.push(e.assignTexture(a,"emissiveMap",s.emissiveTexture,cs)),Promise.all(c).then(function(){const h=new o(a);return s.name&&(h.name=s.name),ud(h,s),e.associations.set(h,{materials:t}),s.extensions&&Sf(r,h,s),h})}createUniqueName(t){const e=Ii.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[Bn.KHR_DRACO_MESH_COMPRESSION].decodePrimitive(a,e).then(function(l){return r$(l,a,e)})}const o=[];for(let a=0,l=t.length;a0&&Gfe(y,s),y.name=e.createUniqueName(s.name||"mesh_"+t),ud(y,s),v.extensions&&Sf(r,y,v),e.assignFinalMaterial(y),h.push(y)}for(let m=0,g=h.length;m1?new Lo:1===c.length?c[0]:new Or,d!==c[0])for(let h=0,p=c.length;h{const h=new Map;for(const[p,m]of r.associations)(p instanceof Oo||p instanceof Po)&&h.set(p,m);return d.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(Lu[s.path]===Lu.weights?t.traverse(function(p){p.morphTargetInfluences&&l.push(p.name?p.name:p.uuid)}):l.push(a),Lu[s.path]){case Lu.weights:c=Hg;break;case Lu.rotation:c=Gg;break;case Lu.position:case Lu.scale:c=Wg;break;default:c=1===n.itemSize?Hg:Wg}const d=void 0!==r.interpolation?Vfe[r.interpolation]:bb,h=this._getArrayFromAccessor(n);for(let p=0,m=l.length;p{r.type.endsWith("Light")&&(console.warn("WORKAROUND: light intensity from GLB divided by 200."),r.intensity*=.005)}),new ia(n.scene)})}}const po=(i,t)=>Array(i).fill(null).map((e,n)=>t(n));class Ef{static startDebugView(t,e){let n=this.activeDebugViews.get(t);return n?n.renderers.includes(e)||n.renderers.push(e):(n={view:new Ef(t),renderers:[e]},this.activeDebugViews.set(t,n)),n.view}static stopDebugView(t,e){const n=t.world,r=this.activeDebugViews.get(n);r&&(r.renderers=r.renderers.filter(s=>s!==e),0===r.renderers.length&&(r.view.dispose(),this.activeDebugViews.delete(n)))}constructor(t){this.world=t,this.debugScene=null,this.aSub=null,this.rSub=null,this.syncMap=new Map,this.debugScene=new kb;const e=n=>{var r,s;const o=n.debugBodySettings;let c,l=this.lineSegmentPointsForShape(o.shape);c=l?new Ng((new hn).setFromPoints(l)):null===(r=this.world)||void 0===r?void 0:r.visualScene.factory.createPrimitive(o.shape,{shading:"wireframe",color:0}).nativeMesh,this.syncMap.set(n,c),null===(s=this.debugScene)||void 0===s||s.add(c)};for(const n of this.world.physicsWorld.children)e(n);this.aSub=this.world.physicsWorld.added$.subscribe(n=>e(n)),this.rSub=this.world.physicsWorld.removed$.subscribe(n=>{var r;const s=this.syncMap.get(n);s&&(this.syncMap.delete(n),null===(r=this.debugScene)||void 0===r||r.remove(s))})}get scene(){return this.debugScene}render(t,e){for(const[r,s]of this.syncMap.entries()){const o=r.debugBodySettings;if(o.ignoreTransform||(s.position.set(...Pe.spr(r.position)),s.quaternion.set(...ji.spr(r.rotation))),s.material){let a=16777215;switch(o.type){case"RIGID_DYNAMIC":a=o.sleeping?255:16711680;break;case"RIGID_STATIC":a=65280;break;case"TRIGGER":a=16776960}s.material.color.set(a),s.material.needsUpdate=!0}}const n=t.autoClearColor;n&&(t.autoClearColor=!1),t.render(this.debugScene,e),n&&(t.autoClearColor=!0)}lineSegmentPointsForShape(t){if("BOX"===t.shape){const e=Pe.scalarMult(t.dimensions,.5);return[...po(8,n=>new O(n<4?e.x:-e.x,n%4<2?e.y:-e.y,n%2?e.z:-e.z)),...po(8,n=>new O(n%2?e.x:-e.x,n<4?e.y:-e.y,n%4<2?e.z:-e.z)),...po(8,n=>new O(n%4<2?e.x:-e.x,n%2?e.y:-e.y,n<4?e.z:-e.z))]}if("CYLINDER"===t.shape)return[...po(32,e=>new O(t.radius*Math.sin(Math.floor((e+1)/2)*Math.PI/8),t.radius*Math.cos(Math.floor((e+1)/2)*Math.PI/8),-t.height/2)),...po(32,e=>new O(t.radius*Math.sin(Math.floor((e+1)/2)*Math.PI/8),t.radius*Math.cos(Math.floor((e+1)/2)*Math.PI/8),t.height/2)),...po(8,e=>new O(Math.floor(e/2)%2?0:e<4?t.radius:-t.radius,Math.floor(e/2)%2?e<4?t.radius:-t.radius:0,e%2?t.height/2:-t.height/2)),new O(0,0,-t.height/2),new O(0,0,t.height/2)];if("CONE"===t.shape)return[...po(32,e=>new O(t.radius*Math.sin(Math.floor((e+1)/2)*Math.PI/8),t.radius*Math.cos(Math.floor((e+1)/2)*Math.PI/8),-t.height/2)),...po(8,e=>new O(e%2||Math.floor(e/2)%2?0:e<4?t.radius:-t.radius,e%2?0:Math.floor(e/2)%2?e<4?t.radius:-t.radius:0,e%2?t.height/2:-t.height/2)),new O(0,0,-t.height/2),new O(0,0,t.height/2)];if("SPHERE"===t.shape)return[...po(32,e=>new O(t.radius*Math.sin(Math.floor((e+1)/2)*Math.PI/8),t.radius*Math.cos(Math.floor((e+1)/2)*Math.PI/8),0)),...po(32,e=>new O(t.radius*Math.sin(Math.floor((e+1)/2)*Math.PI/8),0,t.radius*Math.cos(Math.floor((e+1)/2)*Math.PI/8))),...po(32,e=>new O(0,t.radius*Math.sin(Math.floor((e+1)/2)*Math.PI/8),t.radius*Math.cos(Math.floor((e+1)/2)*Math.PI/8)))];if("CAPSULE"===t.shape)return[...this.lineSegmentPointsForShape({shape:"CYLINDER",radius:t.radius,height:t.centersDistance}),...po(16,e=>new O(t.radius*Math.cos(Math.floor((e+1)/2)*Math.PI/8),0,t.radius*Math.sin(Math.floor((e+1)/2)*Math.PI/8)+t.centersDistance/2)),...po(16,e=>new O(t.radius*Math.cos(Math.floor((e+1)/2)*Math.PI/8),0,-t.radius*Math.sin(Math.floor((e+1)/2)*Math.PI/8)-t.centersDistance/2)),...po(16,e=>new O(0,t.radius*Math.cos(Math.floor((e+1)/2)*Math.PI/8),t.radius*Math.sin(Math.floor((e+1)/2)*Math.PI/8)+t.centersDistance/2)),...po(16,e=>new O(0,t.radius*Math.cos(Math.floor((e+1)/2)*Math.PI/8),-t.radius*Math.sin(Math.floor((e+1)/2)*Math.PI/8)-t.centersDistance/2))];if("CONVEX_HULL"===t.shape)return[...t.vertices.map(n=>[new O(n.x-.05,n.y,n.z),new O(n.x+.05,n.y,n.z),new O(n.x,n.y-.05,n.z),new O(n.x,n.y+.05,n.z),new O(n.x,n.y,n.z-.05),new O(n.x,n.y,n.z+.05)]).reduce((n,r)=>(n.push(...r),n),[])];if("COMPOUND"===t.shape){const e=[];for(const{position:n,shape:r,rotation:s}of t.children){let o=this.lineSegmentPointsForShape(r);if(!o)return null;e.push(...o.map(a=>new O(...Pe.spr(Pe.add(n||Pe.O,Pe.rot(a,s||ji.O))))))}return e}return null}dispose(){var t,e;this.debugScene=null,null===(t=this.aSub)||void 0===t||t.unsubscribe(),null===(e=this.rSub)||void 0===e||e.unsubscribe(),this.syncMap=new Map}}Ef.activeDebugViews=new Map;class s$ extends Ese{get physicsDebugViewActive(){return this._physicsDebugViewActive}set physicsDebugViewActive(t){this._physicsDebugViewActive!=t&&(this._physicsDebugViewActive=t,this.world&&(t?this.debugView=Ef.startDebugView(this.world,this):(Ef.stopDebugView(this.debugView,this),this.debugView=null)))}constructor(t,e,n,r={}){super(t,n,r),this.scene=t,this.camera=e,this.canvas=n,this.world=null,this.debugView=null,this._physicsDebugViewActive=!1,this.nativeRenderer=new Tue(Object.assign({canvas:n,alpha:this.rendererOptions.transparent},this.rendererOptions)),this.nativeRenderer.shadowMap.enabled=!0,this.nativeRenderer.setClearColor(this.rendererOptions.background),this.nativeRenderer.shadowMap.type=c4,this.nativeRenderer.setPixelRatio(this.rendererOptions.forceResolution||devicePixelRatio)}addToWorld(t){this.world=t,this.physicsDebugViewActive&&(this.debugView=Ef.startDebugView(this.world,this))}removeFromWorld(t){this.physicsDebugViewActive&&(Ef.stopDebugView(this.debugView,this),this.debugView=null),this.world=null}resizeRenderer(t){this.nativeRenderer.setSize(t.x,t.y),(this.camera.nativeCamera instanceof yr||"PerspectiveCamera"==this.camera.nativeCamera.type)&&Math.abs(this.camera.nativeCamera.aspect-t.x/t.y)>.01&&(this.camera.nativeCamera.aspect=t.x/t.y,this.camera.nativeCamera.updateProjectionMatrix())}render(){this.nativeRenderer.render(this.scene.nativeScene,this.camera.nativeCamera),this.physicsDebugViewActive&&this.debugView.render(this.nativeRenderer,this.camera.nativeCamera)}dispose(){this.camera.dispose(),this.nativeRenderer.clear(),this.nativeRenderer.dispose(),this.nativeRenderer.domElement=null}}const Zfe={name:"CopyShader",uniforms:{tDiffuse:{value:null},opacity:{value:1}},vertexShader:"\n\n\t\tvarying vec2 vUv;\n\n\t\tvoid main() {\n\n\t\t\tvUv = uv;\n\t\t\tgl_Position = projectionMatrix * modelViewMatrix * vec4( position, 1.0 );\n\n\t\t}",fragmentShader:"\n\n\t\tuniform float opacity;\n\n\t\tuniform sampler2D tDiffuse;\n\n\t\tvarying vec2 vUv;\n\n\t\tvoid main() {\n\n\t\t\tvec4 texel = texture2D( tDiffuse, vUv );\n\t\t\tgl_FragColor = opacity * texel;\n\n\n\t\t}"};class QS{constructor(){this.isPass=!0,this.enabled=!0,this.needsSwap=!0,this.clear=!1,this.renderToScreen=!1}setSize(){}render(){console.error("THREE.Pass: .render() must be implemented in derived pass.")}dispose(){}}const Qfe=new Ib(-1,1,1,-1,0,1),epe=new class Jfe extends hn{constructor(){super(),this.setAttribute("position",new ct([-1,3,0,-1,-1,0,3,-1,0],3)),this.setAttribute("uv",new ct([0,2,0,0,2,0],2))}};class tpe{constructor(t){this._mesh=new Mn(epe,t)}dispose(){this._mesh.geometry.dispose()}render(t){t.render(this._mesh,Qfe)}get material(){return this._mesh.material}set material(t){this._mesh.material=t}}class npe extends QS{constructor(t,e){super(),this.textureID=void 0!==e?e:"tDiffuse",t instanceof Cl?(this.uniforms=t.uniforms,this.material=t):t&&(this.uniforms=Q4.clone(t.uniforms),this.material=new Cl({name:void 0!==t.name?t.name:"unspecified",defines:Object.assign({},t.defines),uniforms:this.uniforms,vertexShader:t.vertexShader,fragmentShader:t.fragmentShader})),this.fsQuad=new tpe(this.material)}render(t,e,n){this.uniforms[this.textureID]&&(this.uniforms[this.textureID].value=n.texture),this.fsQuad.material=this.material,this.renderToScreen?(t.setRenderTarget(null),this.fsQuad.render(t)):(t.setRenderTarget(e),this.clear&&t.clear(t.autoClearColor,t.autoClearDepth,t.autoClearStencil),this.fsQuad.render(t))}dispose(){this.material.dispose(),this.fsQuad.dispose()}}class o$ extends QS{constructor(t,e){super(),this.scene=t,this.camera=e,this.clear=!0,this.needsSwap=!1,this.inverse=!1}render(t,e,n){const r=t.getContext(),s=t.state;let o,a;s.buffers.color.setMask(!1),s.buffers.depth.setMask(!1),s.buffers.color.setLocked(!0),s.buffers.depth.setLocked(!0),this.inverse?(o=0,a=1):(o=1,a=0),s.buffers.stencil.setTest(!0),s.buffers.stencil.setOp(r.REPLACE,r.REPLACE,r.REPLACE),s.buffers.stencil.setFunc(r.ALWAYS,o,4294967295),s.buffers.stencil.setClear(a),s.buffers.stencil.setLocked(!0),t.setRenderTarget(n),this.clear&&t.clear(),t.render(this.scene,this.camera),t.setRenderTarget(e),this.clear&&t.clear(),t.render(this.scene,this.camera),s.buffers.color.setLocked(!1),s.buffers.depth.setLocked(!1),s.buffers.color.setMask(!0),s.buffers.depth.setMask(!0),s.buffers.stencil.setLocked(!1),s.buffers.stencil.setFunc(r.EQUAL,1,4294967295),s.buffers.stencil.setOp(r.KEEP,r.KEEP,r.KEEP),s.buffers.stencil.setLocked(!0)}}class ipe extends QS{constructor(){super(),this.needsSwap=!1}render(t){t.state.buffers.stencil.setLocked(!1),t.state.buffers.stencil.setTest(!1)}}class rpe{constructor(t,e){if(this.renderer=t,this._pixelRatio=t.getPixelRatio(),void 0===e){const n=t.getSize(new xe);this._width=n.width,this._height=n.height,(e=new Mu(this._width*this._pixelRatio,this._height*this._pixelRatio,{type:Jm})).texture.name="EffectComposer.rt1"}else this._width=e.width,this._height=e.height;this.renderTarget1=e,this.renderTarget2=e.clone(),this.renderTarget2.texture.name="EffectComposer.rt2",this.writeBuffer=this.renderTarget1,this.readBuffer=this.renderTarget2,this.renderToScreen=!0,this.passes=[],this.copyPass=new npe(Zfe),this.copyPass.material.blending=Qc,this.clock=new OG}swapBuffers(){const t=this.readBuffer;this.readBuffer=this.writeBuffer,this.writeBuffer=t}addPass(t){this.passes.push(t),t.setSize(this._width*this._pixelRatio,this._height*this._pixelRatio)}insertPass(t,e){this.passes.splice(e,0,t),t.setSize(this._width*this._pixelRatio,this._height*this._pixelRatio)}removePass(t){const e=this.passes.indexOf(t);-1!==e&&this.passes.splice(e,1)}isLastEnabledPass(t){for(let e=t+1;e0?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;l$.fromArray(r,t),yO.fromArray(r,e),c$.fromArray(r,n),Ba.subVectors(c$,yO),d$.subVectors(l$,yO),Ba.cross(d$),Ba.normalize(),s.push(Ba.x,Ba.y,Ba.z),s.push(Ba.x,Ba.y,Ba.z),s.push(Ba.x,Ba.y,Ba.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 d=this.vertices.length;let h=this.parseVertexIndex(t,d),p=this.parseVertexIndex(e,d),m=this.parseVertexIndex(n,d);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?(JS.setRGB(parseFloat(h[4]),parseFloat(h[5]),parseFloat(h[6])).convertSRGBToLinear(),e.colors.push(JS.r,JS.g,JS.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"===d){const p=c.slice(1).trim().split(a$),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 Lo;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 ct(d.normals,3)),d.colors.length>0&&(g=!0,b.setAttribute("color",new ct(d.colors,3))),!0===d.hasUVIndices&&b.setAttribute("uv",new ct(d.uvs,2));const v=[];for(let M=0,x=h.length;M1){for(let M=0,x=h.length;M0){const a=new mf({size:1,sizeAttenuation:!1}),l=new hn;l.setAttribute("position",new ct(e.vertices,3)),e.colors.length>0&&void 0!==e.colors[0]&&(l.setAttribute("color",new ct(e.colors,3)),a.vertexColors=!0);const c=new Vb(l,a);s.add(c)}return s}}class bO extends yf{constructor(t){super(t)}load(t,e,n,r){const s=this,o=""===this.path?Ou.extractUrlBase(t):this.path,a=new La(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,d):c;h=h.toLowerCase();let p=d>=0?c.substring(d+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 fpe(this.resourcePath||e,this.materialOptions);return a.setCrossOrigin(this.crossOrigin),a.setManager(this.manager),a.setMaterials(o),a}}class fpe{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:ac,this.wrap=void 0!==this.options.wrap?this.options.wrap:Ns}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),d=e.loadTexture(function s(a,l){return"string"!=typeof l||""===l?"":/^https?:\/\//i.test(l)?l:a+l}(e.baseUrl,c.url));d.repeat.copy(c.scale),d.offset.copy(c.offset),d.wrapS=e.wrap,d.wrapT=e.wrap,("map"===a||"emissiveMap"===a)&&(d.colorSpace=cs),r[a]=d}for(const a in n){const l=n[a];let c;if(""!==l)switch(a.toLowerCase()){case"kd":r.color=(new qe).fromArray(l).convertSRGBToLinear();break;case"ks":r.specular=(new qe).fromArray(l).convertSRGBToLinear();break;case"ke":r.emissive=(new qe).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 zS(r),this.materials[t]}getTextureParams(t,e){const n={scale:new xe(1,1),offset:new xe(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:wG;let a=o.getHandler(t);null===a&&(a=new Pu(o)),a.setCrossOrigin&&a.setCrossOrigin(this.crossOrigin);const l=a.load(t,n,r,s);return void 0!==e&&(l.mapping=e),l}}const ppe=["determinateSpinner"];function mpe(i,t){if(1&i&&(Ri(),W(0,"svg",11),De(1,"circle",12),j()),2&i){const e=he();Dt("viewBox",e._viewBox()),G(1),Yo("stroke-dasharray",e._strokeCircumference(),"px")("stroke-dashoffset",e._strokeCircumference()/2,"px")("stroke-width",e._circleStrokeWidth(),"%"),Dt("r",e._circleRadius())}}const gpe=Qy(class{constructor(i){this._elementRef=i}},"primary"),_pe=new me("mat-progress-spinner-default-options",{providedIn:"root",factory:function vpe(){return{diameter:u$}}}),u$=100;let Jb=(()=>{class i extends gpe{constructor(e,n,r){super(e),this.mode="mat-spinner"===this._elementRef.nativeElement.nodeName.toLowerCase()?"indeterminate":"determinate",this._value=0,this._diameter=u$,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,ks(e)))}get diameter(){return this._diameter}set diameter(e){this._diameter=ks(e)}get strokeWidth(){return this._strokeWidth??this.diameter/10}set strokeWidth(e){this._strokeWidth=ks(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)(E(mt),E(Rr,8),E(_pe))},i.\u0275cmp=ot({type:i,selectors:[["mat-progress-spinner"],["mat-spinner"]],viewQuery:function(e,n){if(1&e&&Wn(ppe,5),2&e){let r;Et(r=At())&&(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&&(Dt("aria-valuemin",0)("aria-valuemax",100)("aria-valuenow","determinate"===n.mode?n.value:null)("mode",n.mode),Yo("width",n.diameter,"px")("height",n.diameter,"px"),un("_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:[lt],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&&(fe(0,mpe,2,8,"ng-template",null,0,Vc),W(2,"div",1,2),Ri(),W(4,"svg",3),De(5,"circle",4),j()(),_a(),W(6,"div",5)(7,"div",6)(8,"div",7),sy(9,8),j(),W(10,"div",9),sy(11,8),j(),W(12,"div",10),sy(13,8),j()()()),2&e){const r=Ki(1);G(4),Dt("viewBox",n._viewBox()),G(1),Yo("stroke-dasharray",n._strokeCircumference(),"px")("stroke-dashoffset",n._strokeDashOffset(),"px")("stroke-width",n._circleStrokeWidth(),"%"),Dt("r",n._circleRadius()),G(4),U("ngTemplateOutlet",r),G(2),U("ngTemplateOutlet",r),G(2),U("ngTemplateOutlet",r)}},dependencies:[xy],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})(),bpe=(()=>{class i{}return i.\u0275fac=function(e){return new(e||i)},i.\u0275mod=nn({type:i}),i.\u0275inj=Kt({imports:[Ao,Qn]}),i})();const xpe=["previewCanvasContainer"],wpe=["previewCanvas"];function Mpe(i,t){if(1&i){const e=di();Gr(0),W(1,"label",11),Ve(2),j(),W(3,"input",12),Ue("change",function(r){an(e);const s=he().$implicit;return s.value=r.currentTarget.checked,zt(s.change(s.value))}),j(),$r()}if(2&i){const e=he(),n=e.index,r=e.$implicit,s=he().index;G(1),U("for","custom_control_"+s+"_"+n),G(1),_i(r.label),G(1),U("id","custom_control_"+s+"_"+n)("type",r.type)("checked",r.value)}}function Cpe(i,t){if(1&i){const e=di();W(0,"div",9)(1,"label",11),Ve(2),j(),W(3,"input",14),Ue("change",function(){const s=an(e).$implicit,o=he(2).$implicit;return o.value=s,zt(o.change(o.value))}),j()()}if(2&i){const e=t.$implicit,n=he(2),r=n.index,s=n.$implicit,o=he().index;G(1),U("for","custom_control_"+o+"_"+r+"_"+e),G(1),_i(e),G(1),U("id","custom_control_"+o+"_"+r+"_"+e)("checked",s.value===e)}}function Spe(i,t){if(1&i&&(W(0,"div",13)(1,"label"),Ve(2),j(),fe(3,Cpe,4,4,"div",8),j()),2&i){const e=he().$implicit;G(2),_i(e.label),G(1),U("ngForOf",e.options)}}function Epe(i,t){if(1&i){const e=di();Gr(0),W(1,"label",11),Ve(2),j(),W(3,"input",15),Ue("colorChange",function(r){an(e);const s=he().$implicit,o=he(2);return s.value=o.toRGB(r.value),zt(s.change(s.value))}),j(),De(4,"ngx-mat-color-toggle",16)(5,"ngx-mat-color-picker",null,17),$r()}if(2&i){const e=Ki(6),n=he(),r=n.index,s=n.$implicit,o=he().index;G(1),U("for","custom_control_"+o+"_"+r),G(1),_i(s.label),G(1),U("ngxMatColorPicker",e),G(1),U("for",e)}}function Ape(i,t){if(1&i){const e=di();Gr(0),W(1,"label",11),Ve(2),j(),W(3,"input",18),Ue("change",function(r){an(e);const s=he().$implicit;return s.value=r.currentTarget.value,zt(s.change(s.value))}),j(),$r()}if(2&i){const e=he(),n=e.index,r=e.$implicit,s=he().index;G(1),U("for","custom_control_"+s+"_"+n),G(1),_i(r.label),G(1),U("id","custom_control_"+s+"_"+n)("min",r.minValue)("max",r.maxValue)("step",r.valueStep)("value",r.value)}}function Dpe(i,t){if(1&i&&(W(0,"div",9),fe(1,Mpe,4,5,"ng-container",6),fe(2,Spe,4,2,"div",10),fe(3,Epe,7,4,"ng-container",6),fe(4,Ape,4,7,"ng-container",6),j()),2&i){const e=t.$implicit;G(1),U("ngIf","checkbox"===e.type),G(1),U("ngIf","radio"===e.type),G(1),U("ngIf","color"===e.type),G(1),U("ngIf","slider"===e.type)}}function Tpe(i,t){if(1&i&&(Gr(0),W(1,"h4"),Ve(2),j(),fe(3,Dpe,5,4,"div",8),$r()),2&i){const e=t.$implicit;G(2),_i(e.title),G(1),U("ngForOf",e.controls)}}function Ipe(i,t){if(1&i){const e=di();W(0,"div",9)(1,"label",11),Ve(2),j(),W(3,"input",19),Ue("change",function(r){return zt(an(e).$implicit.visible=r.currentTarget.checked)}),j()()}if(2&i){const e=t.$implicit;G(1),U("for","visibility_"+e.name),G(1),_i(e.name),G(1),U("id","visibility_"+e.name)("checked",e.visible)}}function Rpe(i,t){if(1&i&&(Gr(0),W(1,"h4"),Ve(2,"Objects visibility"),j(),fe(3,Ipe,4,4,"div",8),$r()),2&i){const e=he();G(3),U("ngForOf",e.meshes)}}function kpe(i,t){1&i&&De(0,"mat-spinner",20)}const ra=i=>{i.colorSpace="srgb",i.anisotropy=8,i.magFilter=_r,i.minFilter=_r};let h$=(()=>{class i{constructor(e){this.cdr=e,this.visibilityControls=!0,this.groupFunction=null,this.customControls=[],this.onObjectLoaded=new We,this._paths$=new gt(null),this.destroyed$=new Re,this.entity=null,this.meshes=[]}get paths(){return this._paths$.getValue()}set paths(e){this._paths$.next(e)}ngAfterViewInit(){var e=this;return tt(function*(){var s;e.world=new sk(new vO,{init:(s=tt(function*(){}),function(){return s.apply(this,arguments)}),simulate:()=>{}}),yield e.world.init(),e.world.visualScene.nativeScene.add(new $S(16777215,2));let n=new gt({x:1,y:1});e.renderer=e.world.addRenderer(e.world.visualScene.factory.createPerspectiveCamera({frustrum:{near:.01,far:1e4}}),e.previewCanvas.nativeElement,{size:n.asObservable(),background:11184810}),e.controller=new kse(e.renderer,{mouseOptions:{canvas:e.previewCanvas.nativeElement},orbiting:{sensitivityX:2,sensitivityY:2},orbitingElasticity:30}),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(He(e.destroyed$)).subscribe(function(){var s=tt(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 Qb,h=yield(new bO).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 Lo;y.add(...b[v]),y.name=v,p.remove(...b[v]),p.add(y)}}e.meshes=p.children,e.meshes.sort((b,v)=>b.name>v.name?1:-1),p.traverse(b=>{if(b instanceof Mn){const v=b.material instanceof Array?b.material:[b.material];for(const y of v)y.transparent=!0,y.alphaTest=.5,y instanceof Yi&&y.map&&(y.map.wrapS=Ji,y.map.wrapT=Ji,ra(y.map),y.map.needsUpdate=!0)}}),e.onObjectLoaded.next(p),e.entity=new Qo({object3D:new ia(p)}),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=Pe.scalarMult(Pe.add(m.min,m.max),.5),e.controller.spherical={phi:1.22,theta:-1.32,radius:Pe.dist(m.min,m.max)},e.cdr.markForCheck()}});return function(o){return s.apply(this,arguments)}}())})()}toRGB(e){return(e?.r||0)<<16|(e?.g||0)<<8|(e?.b||0)}ngOnDestroy(){this.destroyed$.next(),this.destroyed$.complete()}}return i.\u0275fac=function(e){return new(e||i)(E(Zn))},i.\u0275cmp=ot({type:i,selectors:[["app-obj-viewer"]],viewQuery:function(e,n){if(1&e&&(Wn(xpe,5),Wn(wpe,5)),2&e){let r;Et(r=At())&&(n.previewCanvasContainer=r.first),Et(r=At())&&(n.previewCanvas=r.first)}},inputs:{paths:"paths",visibilityControls:"visibilityControls",groupFunction:"groupFunction",customControls:"customControls"},outputs:{onObjectLoaded:"onObjectLoaded"},decls:8,vars:3,consts:[[1,"previewCanvasContainer"],["previewCanvasContainer",""],["width","640","height","480"],["previewCanvas",""],["id","controls"],[4,"ngFor","ngForOf"],[4,"ngIf"],["mode","indeterminate",4,"ngIf"],["class","controls-list",4,"ngFor","ngForOf"],[1,"controls-list"],["style","width: 100%",4,"ngIf"],[3,"for"],[3,"id","type","checked","change"],[2,"width","100%"],["type","radio",3,"id","checked","change"],["matInput","",1,"hidden",3,"ngxMatColorPicker","colorChange"],["matSuffix","",3,"for"],["picker",""],["type","range",3,"id","min","max","step","value","change"],["type","checkbox",3,"id","checked","change"],["mode","indeterminate"]],template:function(e,n){1&e&&(W(0,"div",0,1),De(2,"canvas",2,3),W(4,"div",4),fe(5,Tpe,4,2,"ng-container",5),fe(6,Rpe,4,1,"ng-container",6),j(),fe(7,kpe,1,0,"mat-spinner",7),j()),2&e&&(G(5),U("ngForOf",n.customControls),G(1),U("ngIf",n.visibilityControls),G(1),U("ngIf",!n.entity))},dependencies:[Eo,vi,Xte,ic,Jb,jie,bC,LH],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%] > h4[_ngcontent-%COMP%]{margin:0}.previewCanvasContainer[_ngcontent-%COMP%] #controls[_ngcontent-%COMP%] .controls-list[_ngcontent-%COMP%]{width:100%;display:flex;-webkit-user-select:none;user-select:none;align-items:center}.previewCanvasContainer[_ngcontent-%COMP%] #controls[_ngcontent-%COMP%] .controls-list[_ngcontent-%COMP%] > span[_ngcontent-%COMP%]{flex-grow:1}.previewCanvasContainer[_ngcontent-%COMP%] #controls[_ngcontent-%COMP%] .controls-list[_ngcontent-%COMP%] > label[_ngcontent-%COMP%]{flex-grow:1}"],changeDetection:0}),i})();function Ppe(i,t){if(1&i&&(Ri(),De(0,"circle",5),Ct(1,"async"),Ct(2,"async")),2&i){const e=he();let n,r;Dt("cx",(null==(n=Tt(1,3,e.mapPointer$))?null:n.x)||0)("cy",(null==(r=Tt(2,5,e.mapPointer$))?null:r.y)||0)("r",10)}}const Ope=function(){return{"stroke-width":3}};let f$=(()=>{class i{constructor(e){this.ref=e,this._roadSpline$=new gt([]),this._pointer$=new gt(null),this.splineClosed=!1,this.svgSize$=new gt({x:100,y:100}),this.scalingSquare$=new gt({x:0,y:0,width:100,height:100}),this.mapPolyline$=new gt(""),this.mapPointer$=new gt(null),this.destroyed$=new Re}set roadSpline(e){this._roadSpline$.next(e)}set pointer(e){this._pointer$.next(e)}get trackLength$(){return this._roadSpline$.pipe(et(e=>{let n=0;for(let r=1;r{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$),nu([this._roadSpline$,this.scalingSquare$,this.svgSize$]).pipe(He(this.destroyed$),et(([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$),nu([this._pointer$,this.scalingSquare$.asObservable(),this.svgSize$]).pipe(He(this.destroyed$),et(([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)(E(mt))},i.\u0275cmp=ot({type:i,selectors:[["app-tri-minimap"]],inputs:{roadSpline:"roadSpline",pointer:"pointer",splineClosed:"splineClosed"},decls:13,vars:16,consts:[[1,"container"],["shape-rendering","geometricPrecision"],[2,"fill","none","stroke","#333333",3,"ngStyle"],["fill","#e30","stroke","black","stroke-width","3",4,"ngIf"],[1,"info_div"],["fill","#e30","stroke","black","stroke-width","3"]],template:function(e,n){if(1&e&&(W(0,"div",0),Ri(),W(1,"svg",1),Ct(2,"async"),Ct(3,"async"),De(4,"polyline",2),Ct(5,"async"),Ve(6," cars "),fe(7,Ppe,3,7,"circle",3),Ct(8,"async"),j(),_a(),W(9,"div",4)(10,"span"),Ve(11),Ct(12,"async"),j()()()),2&e){let r,s;G(1),Dt("viewBox","0 0 "+(null==(r=Tt(2,5,n.svgSize$))?null:r.x)+" "+(null==(r=Tt(3,7,n.svgSize$))?null:r.y)),G(3),U("ngStyle",oo(15,Ope)),Dt("points",Tt(5,9,n.mapPolyline$)),G(3),U("ngIf",Tt(8,11,n.mapPointer$)),G(4),Zi("Track length (m): ",null==(s=Tt(12,13,n.trackLength$))?null:s.toFixed(2),"")}},dependencies:[vi,tM,pl],styles:["[_nghost-%COMP%]{overflow:auto}.container[_ngcontent-%COMP%]{position:relative;width:100%;height:100%}.container[_ngcontent-%COMP%] svg[_ngcontent-%COMP%]{position:absolute;width:100%;height:100%}.container[_ngcontent-%COMP%] .info_div[_ngcontent-%COMP%]{color:#838383}"],changeDetection:0}),i})();const Fpe=["previewCanvasContainer"],Lpe=["previewCanvas"];function Npe(i,t){if(1&i&&(W(0,"mat-option",19),Ve(1),j()),2&i){const e=t.$implicit;U("value",e),G(1),Zi(" ",e," ")}}function Bpe(i,t){if(1&i){const e=di();Gr(0),W(1,"mat-form-field",1)(2,"mat-label"),Ve(3,"Custom FAM path"),j(),De(4,"input",20,21),Ct(6,"async"),j(),W(7,"button",22),Ue("click",function(){an(e);const r=Ki(5);return zt(he().onFamSelected(r.value))}),Ve(8,"LOAD"),j(),$r()}if(2&i){const e=he();G(4),U("value",Tt(6,1,e.previewFamLocation$))}}function Upe(i,t){1&i&&De(0,"mat-spinner",23),2&i&&U("diameter",40)}function Vpe(i,t){1&i&&De(0,"mat-spinner",24)}const zpe=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 Af=(()=>{return(i=Af||(Af={})).ThreeModel="model",i.Bitmap="bitmap",i.TwoSidedBitmap="two_sided_bitmap",Af;var i})();class Hpe extends QH{constructor(t,e,n){super(t,{loadDepth:40,inertia:2}),this.mapGraph=t,this.famPath=e,this.hideUnknownEntities$=n,this.textureLoader=new Pu,this.terrainMaterials={},this.objLoader=new Qb,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(Zl(),He(this._onRemoved$)).subscribe(e=>{for(const n of this.unknownEntities)n.visible=!e})}getPlaceholderTexture(){var t=this;return tt(function*(){return t._placeholder?t._placeholder:(t._placeholderPromise||(t._placeholderPromise=t.textureLoader.loadAsync("assets/placeholder_texture.png")),t._placeholderPromise)})()}getPlaceholderTerrainTexture(){var t=this;return tt(function*(){return t._placeholderTerrain?t._placeholderTerrain:(t._placeholderTerrainPromise||(t._placeholderTerrainPromise=t.textureLoader.loadAsync("assets/placeholder_texture.png").then(e=>(e.wrapS=Ns,e.wrapT=Ji,ra(e),e.flipY=!0,e))),t._placeholderTerrainPromise)})()}loadChunk(t){var e=this;return tt(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 Mn&&(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:Pe.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:ji.fromAngle(Pe.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 Qo({object3D:new ia(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 Yi({side:Ls,transparent:!0,visible:!1}),this.famPath?this.textureLoader.loadAsync(`${this.famPath}/background/${t}.png`).then(e=>{e.wrapS=Ns,e.wrapT=Ji,ra(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 tt(function*(){let n=!1;if(t.type==Af.ThreeModel){let r;try{if(!e.famPath)throw new Error;const o=new bO,a=new Qb,l=yield o.loadAsync(`${e.famPath}/props/${t.data.data.resource_id}/0/material.mtl`);l.preload(),a.setMaterials(l),r=new ia(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 Mn){const a=o.material instanceof Array?o.material:[o.material];for(const l of a)l.transparent=!0,l.alphaTest=.5,l instanceof Yi&&l.map&&(l.map.wrapS=Ji,l.map.wrapT=Ji,ra(l.map),l.map.needsUpdate=!0)}});const s=new Qo({object3D: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==Af.Bitmap||t.type==Af.TwoSidedBitmap){const r=(c,d)=>new Array(d).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 Lo,[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==Af.TwoSidedBitmap){const[c,d]=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 Qo({object3D:new ia(s)});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 tt(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=>(ra(h),new Yi({map:h,alphaTest:.5,transparent:!0,side:Ls}))),d=new Mn(new Iu(e.x,e.y),c[0]);if(d.rotateX(Math.PI/2),d.position.set(0,0,e.y/2),c.length>1){let h=-1;Ym(r.world).pipe(o4(n&&!isNaN(+n)?1e3*+n:250)).subscribe(()=>{h=(h+1)%c.length,d.material=c[h]})}return[d,a]})()}}let Gpe=(()=>{class i{constructor(e,n,r){this.eelDelegate=e,this.cdr=n,this.mainService=r,this._resource$=new gt(null),this.changed=new We,this.previewLoading$=new gt(!0),this.previewFamLocation$=new gt(null),this.previewFamLoading$=new gt(!1),this.pointer$=new gt(null),this.selectedSplineIndex$=new gt(0),this.selectedSplineItem$=new gt(null),this.selectedAiInfoItem$=new gt(null),this.selectedTerrainItem$=new gt(null),this.famPath=null,this.name="",this.renderer=null,this.map=null,this.isOpenedTrack=!0,this.roadPath=null,this.destroyed$=new Re}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 tt(function*(){var s;e.world=new sk(new vO,{init:(s=tt(function*(){}),function(){return s.apply(this,arguments)}),simulate:()=>{},loader:{loadFromGgGlb:function(){var s=tt(function*(...o){return[]});return function(){return s.apply(this,arguments)}}()}}),yield e.world.init(),e.skySphere=new Qo({object3D:e.world.visualScene.factory.createPrimitive({shape:"SPHERE",radius:1e3},{color:16777215})}),e.skySphere.object3D.nativeMesh.material.side=Ls,e.world.addEntity(e.skySphere),e.selectionSphere=new Qo({object3D: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 $S(16777215,2));let n=new gt({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=ji.lookAt(e.renderer.camera.position,Pe.add(e.renderer.camera.position,Pe.Y),Pe.Z),Ym(e.world).pipe(He(e.destroyed$)).subscribe(()=>{e.renderer&&(e.skySphere.position=e.renderer.camera.position,e.pointer$.next(e.renderer.camera.position))}),e.controller=new n4(e.world.keyboardInput,e.renderer,{mouseOptions:{canvas:e.previewCanvas.nativeElement,pointerLock:!0},keymap:"wasd+arrows",cameraLinearSpeed:40,cameraBoostMultiplier:4,cameraMovementElasticity:100,cameraRotationElasticity:30,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(He(e.destroyed$)).subscribe(function(){var s=tt(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(He(e.destroyed$),gn(([s,o])=>!!e.resource&&s.startsWith(e.resource.id)),ml(3e3)).subscribe(tt(function*(){e.previewLoading$.next(!0),yield e.postTmpUpdates(e.resource?.id),yield e.loadPreview(),e.previewLoading$.next(!1)})),e.selectedSplineIndex$.pipe(He(e.destroyed$),ml(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=Pe.add(a,Pe.rotAround({x:10,y:-12,z:5},{x:0,y:0,z:1},-e.resource.data.road_spline[s].orientation)),e.renderer.rotation=ji.lookAt(e.renderer.position,a,{x:0,y:0,z:1}),e.controller.reset())}e.selectedSplineItem$.next({id:rc(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:rc(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:rc(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 tt(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 Pu,o=r.find(a=>a.endsWith("spherical.png"));if(o){const a=yield s.loadAsync(o);a.colorSpace="srgb",a.mapping=lc,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 tt(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 tt(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=Km.fromMapArray(e.roadPath.map((r,s)=>({path:`${e.terrainChunksObjLocation}terrain_chunk_${s}`,position:r,loadOptions:{}}))||[],!e.isOpenedTrack);e.unloadPreview(),e.map=new Hpe(n,e.famPath&&"resources/"+e.famPath,e.mainService.hideHiddenFields$),e.map.resource=e.resource,e.map.isOpenedTrack=e.isOpenedTrack,Ym(e.world).pipe(He(e.destroyed$)).subscribe(()=>{e.map&&e.renderer&&e.map.loaderCursor$.next(e.renderer.position)}),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 tt(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)(E(Ql),E(Zn),E(Pa))},i.\u0275cmp=ot({type:i,selectors:[["app-tri-map-block-ui"]],viewQuery:function(e,n){if(1&e&&(Wn(Fpe,5),Wn(Lpe,5)),2&e){let r;Et(r=At())&&(n.previewCanvasContainer=r.first),Et(r=At())&&(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&&(W(0,"div",0)(1,"h4"),Ve(2,"Preview *.FAM file"),j(),W(3,"mat-form-field",1)(4,"mat-label"),Ve(5,"Current preview FAM"),j(),W(6,"mat-select",2,3),Ue("valueChange",function(s){return n.onFamSelected(s)}),Ct(8,"async"),Ct(9,"async"),fe(10,Npe,2,2,"mat-option",4),W(11,"mat-option",5),Ve(12,"custom"),j()()(),fe(13,Bpe,9,3,"ng-container",6),fe(14,Upe,1,1,"mat-spinner",7),Ct(15,"async"),j(),W(16,"div",8)(17,"div",9,10),De(19,"canvas",11,12),fe(21,Vpe,1,0,"mat-spinner",13),Ct(22,"async"),j(),W(23,"div",14,10)(25,"mat-form-field",1)(26,"mat-label"),Ve(27,"Spline item"),j(),W(28,"input",15),Ue("ngModelChange",function(s){return n.selectedSplineIndex$.next(s)}),Ct(29,"async"),Ct(30,"async"),j()(),De(31,"app-tri-minimap",16),Ct(32,"async"),j()(),W(33,"h4"),Ve(34,"Road spline item"),j(),De(35,"app-compound-block-ui",17),Ct(36,"async"),W(37,"h4"),Ve(38,"AI info (block for 4 spline items)"),j(),De(39,"app-compound-block-ui",17),Ct(40,"async"),W(41,"h4"),Ve(42,"Terrain (block for 4 spline items)"),j(),De(43,"app-compound-block-ui",17),Ct(44,"async"),W(45,"h4"),Ve(46,"Common"),j(),De(47,"app-compound-block-ui",18),Ct(48,"async")),2&e){const r=Ki(7);let s;G(6),U("value",n.previewFamPossibleLocations.includes(Tt(8,20,n.previewFamLocation$))?Tt(9,22,n.previewFamLocation$):"custom"),G(4),U("ngForOf",n.previewFamPossibleLocations),G(3),U("ngIf","custom"==r.value),G(1),U("ngIf",Tt(15,24,n.previewFamLoading$)),G(7),U("ngIf",Tt(22,26,n.previewLoading$)),G(7),U("min",0)("max",4*(null==(s=Tt(29,28,n._resource$))?null:s.data.num_chunks)-1)("ngModel",Tt(30,30,n.selectedSplineIndex$)),G(3),U("roadSpline",n.roadSpline)("pointer",Tt(32,32,n.pointer$))("splineClosed",!n.isOpenedTrack),G(4),U("resource",Tt(36,34,n.selectedSplineItem$))("hideBlockActions",!0),G(4),U("resource",Tt(40,36,n.selectedAiInfoItem$))("hideBlockActions",!0),G(4),U("resource",Tt(44,38,n.selectedTerrainItem$))("hideBlockActions",!0),G(4),U("resource",Tt(48,40,n._resource$))("hideBlockActions",!0)("fieldWhitelist",oo(42,zpe))}},dependencies:[Eo,vi,gl,mu,tc,_u,gu,Kc,vl,Io,ic,ib,fb,Nm,Jb,Jl,f$,pl],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})();const p$=i=>new Promise(t=>setTimeout(t,i)),m$=(i,t,e=null)=>{const n=document.createElement("canvas"),r=n.getContext("2d",{willReadFrequently:!0}),s=i.width,o=i.height;n.width=s,n.height=o,r.drawImage(i,0,0,s,o);const a=r.getImageData(0,0,s,o);for(let l=0;l{if(!(o instanceof Mn))return;let a=-1;if(o.name.startsWith("lbl__rt_frnt")?a=0:o.name.startsWith("lbl__lt_frnt")?a=1:o.name.startsWith("lbl__rt_rear")?a=2:o.name.startsWith("lbl__lt_rear")&&(a=3),a>-1){this.wheels[a]=o,a<2&&(this.frontWheels[a]=o),o.geometry.boundingBox||o.geometry.computeBoundingBox();const l=Pe.avg(o.geometry.boundingBox.min,o.geometry.boundingBox.max);o.geometry.translate(...Pe.spr(Pe.neg(l))),o.position.set(...Pe.spr(l)),this.wheelIdlePositions[a]=l}(o.name.includes("rsid")||o.name.includes("lite"))&&(r.push(o),this.originalTexWithTailLights=o.material.map)}),!this.originalTexWithTailLights)throw new Error("Not a driveable NFS1 car");this.tailLightColors=n.includes("TRAFFC.CFM")?[9509903,16711680]:[3212546,16258068],this.texWithTailLightsImg=document.createElement("img"),this.texWithTailLights=new Po(this.texWithTailLightsImg),this.texWithTailLights.flipY=this.originalTexWithTailLights.flipY,ra(this.texWithTailLights),this.recolorTailLights(this.tailLightColors[0]).then();for(const o of r)o.material.map=this.texWithTailLights;const s=new Pu;this.tyreTextures=[1,2,3,4].map(o=>s.load(`${n}/tyr${o}.png`));for(const o of this.tyreTextures)ra(o);this.tyreMaterial=new Yi({map:this.tyreTextures[0]}),this.tyreMaterial.transparent=!0,this.tyreMaterial.alphaTest=.5,this.tyreMaterial.map.wrapS=Ji,this.tyreMaterial.map.wrapT=Ji,this.tyreMaterial.polygonOffset=!0,this.tyreMaterial.polygonOffsetFactor=-4;for(const o of this.wheels)o.material=this.tyreMaterial}get tailLightsOn(){return this._tailLightsOn}set tailLightsOn(t){t!==this._tailLightsOn&&(this._tailLightsOn=t,this.recolorTailLights(this.tailLightColors[t?1:0]))}get speed(){return this._speed}set speed(t){if(t!==this._speed){switch(this._speed=t,this.tyreTextureUpdateTimer&&clearInterval(this.tyreTextureUpdateTimer),t){case"idle":this.tyreMaterial.map=this.tyreTextures[0];break;case"slow":let e=!0;this.tyreTextureUpdateTimer=setInterval(()=>{this.tyreMaterial.map=this.tyreTextures[e?1:2],this.tyreMaterial.needsUpdate=!0,e=!e},16);break;case"fast":this.tyreMaterial.map=this.tyreTextures[3]}this.tyreMaterial.needsUpdate=!0}}get steeringAngle(){return this._steeringAngle}set steeringAngle(t){if(t!==this._steeringAngle){this._steeringAngle=t;for(const e of this.frontWheels)e.rotation.set(0,0,t)}}recolorTailLights(t){var e=this;return tt(function*(){if(e.originalTexWithTailLights&&e.texWithTailLights&&e.texWithTailLightsImg){for(let n=100;n>0&&!e.originalTexWithTailLights.source.data;n--)yield p$(50);((i,t,e,n=null)=>{const[r,s,o]=[t>>16,t>>8&255,255&t],[a,l,c]=[e>>16,e>>8&255,255&e];m$(i,(d,h)=>{d[h]==r&&d[h+1]==s&&d[h+2]==o&&(d[h]=a,d[h+1]=l,d[h+2]=c)},n)})(e.originalTexWithTailLights.source.data,e.tailLightsTexColor,t,e.texWithTailLightsImg),e.texWithTailLights.needsUpdate=!0}})()}dispose(){this.texWithTailLightsImg&&(this.texWithTailLightsImg.remove(),this.texWithTailLightsImg=null),this.texWithTailLights&&(this.texWithTailLights.dispose(),this.texWithTailLights=null),this.tyreTextureUpdateTimer&&clearInterval(this.tyreTextureUpdateTimer),this.tyreMaterial&&(this.tyreMaterial.dispose(),this.tyreMaterial=null)}}let jpe=(()=>{class i{constructor(e,n,r){this.eelDelegate=e,this.mainService=n,this.cdr=r,this._resource$=new gt(null),this.changed=new We,this.previewPaths$=new gt(null),this.destroyed$=new Re,this.customControls=[],this.serializerSettings={geometry__save_obj:!0,geometry__save_blend:!1,geometry__export_to_gg_web_engine:!1}}get resource(){return this._resource$.getValue()}set resource(e){this._resource$.next(e)}ngAfterViewInit(){var e=this;return tt(function*(){e._resource$.pipe(He(e.destroyed$)).subscribe(function(){var n=tt(function*(r){e.previewPaths$.next(yield e.loadPreviewFilePaths(r?.id))});return function(r){return n.apply(this,arguments)}}()),e.mainService.dataBlockChange$.pipe(He(e.destroyed$),gn(([n,r])=>!!e.resource&&n.startsWith(e.resource.id)),ml(1500)).subscribe(tt(function*(){e.previewPaths$.next(null),e.previewPaths$.next(yield e.postTmpUpdates(e.resource?.id))}))})()}onObjectLoaded(e){var n=this;return tt(function*(){if((n._resource$.value?.id||"").includes(".CFM__"))try{const r=n.resource?.id.split("/");r.pop(),r[r.length-1]=""+(+r[r.length-1]+1);const s=yield n.eelDelegate.retrieveValue(r.join("/")+"/data"),o=s.children_aliases.findIndex(l=>"!PAL"===l);if(-1==o)throw new Error("Not a car");const a=new Wpe(e,s.children[o].data.colors[254]>>>8,n.previewPaths$.value[0].substring(0,n.previewPaths$.value[0].lastIndexOf("/"))+"/assets");n.customControls=[{title:"TNFS car features",controls:[{label:"Brake lights on",type:"checkbox",value:!1,change:l=>{a.tailLightsOn=l}},{label:"Car speed",type:"radio",options:["idle","slow","fast"],value:"idle",change:l=>{a.speed=l}},{label:"Steering angle",type:"slider",minValue:-.7,maxValue:.7,valueStep:.05,value:0,change:l=>{a.steeringAngle=l}}]}],n.cdr.markForCheck()}catch{}})()}postTmpUpdates(e){var n=this;return tt(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 tt(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)(E(Ql),E(Pa),E(Zn))},i.\u0275cmp=ot({type:i,selectors:[["app-orip-geometry-block-ui"]],inputs:{resource:"resource"},outputs:{changed:"changed"},decls:4,vars:7,consts:[[3,"paths","customControls","onObjectLoaded"],[3,"resource"]],template:function(e,n){1&e&&(W(0,"app-obj-viewer",0),Ue("onObjectLoaded",function(s){return n.onObjectLoaded(s)}),Ct(1,"async"),j(),De(2,"app-compound-block-ui",1),Ct(3,"async")),2&e&&(U("paths",Tt(1,3,n.previewPaths$))("customControls",n.customControls),G(2),U("resource",Tt(3,5,n._resource$)))},dependencies:[Jl,h$,pl],changeDetection:0}),i})();const g$=i=>{let t=i.block_class_mro.split("__")[0];return"ArrayBlock"===t?g$(i.child_schema)+"[]":t},Ype=["class","block-ui"];function qpe(i,t){if(1&i&&(W(0,"mat-label",7),Ve(1),j()),2&i){const e=he(2);U("matTooltip",e.resourceDescription),G(1),Zi("",null==e.resource?null:e.resource.name," ")}}function Xpe(i,t){if(1&i&&(W(0,"mat-option",8),Ve(1),j()),2&i){const e=t.$implicit,n=t.index,r=he(2);U("value",n)("disabled",r.disabled),G(1),Zi(" ",r.blockClassStr(e)," ")}}function Kpe(i,t){if(1&i){const e=di();Gr(0),fe(1,qpe,2,2,"mat-label",1),Ct(2,"async"),W(3,"div",2)(4,"mat-label"),Ve(5,"Resource type:"),j(),W(6,"mat-select",3),Ue("selectionChange",function(r){return an(e),zt(he().setChoiceIndex(r.value))}),fe(7,Xpe,2,3,"mat-option",4),j(),De(8,"app-block-actions",5),j(),De(9,"app-editor",6),$r()}if(2&i){const e=he();let n;G(1),U("ngIf",(null==e.resource?null:e.resource.name)&&(null==e.resource?null:e.resource.name)!=(null==(n=Tt(2,8,e.main.resource$))?null:n.name)),G(5),U("value",e.resourceData.choice_index)("disabled",e.disabled),G(1),U("ngForOf",e.resource.schema.possible_resource_schemas),G(1),U("resource",e.childResource),G(1),U("resource",e.childResource)("hideBlockActions",!0)("disabled",e.disabled)}}let _$=(()=>{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 We,this.blockClassStr=g$}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:rc(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)(E(Pa))},i.\u0275cmp=ot({type:i,selectors:[["app-delegate",8,"block-ui"]],inputs:{resource:"resource",resourceDescription:"resourceDescription",hideBlockActions:"hideBlockActions",disabled:"disabled"},outputs:{changed:"changed"},attrs:Ype,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"],[3,"resource","hideBlockActions","disabled"],["matTooltipPosition","above",3,"matTooltip"],[3,"value","disabled"]],template:function(e,n){1&e&&fe(0,Kpe,10,10,"ng-container",0),2&e&&U("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 Zpe=["class","block-ui"];function Qpe(i,t){if(1&i&&(W(0,"mat-label",7),Ve(1),j()),2&i){const e=he(2);U("matTooltip",e.resourceDescription),G(1),Zi(" ",e.resource.name," ")}}function Jpe(i,t){if(1&i){const e=di();Gr(0),fe(1,Qpe,2,2,"mat-label",1),W(2,"mat-selection-list",2),Ue("selectionChange",function(r){return an(e),zt(he().onSelection(r))}),W(3,"mat-list-option",3),Ve(4," Left "),j(),W(5,"mat-list-option",4),Ve(6," Right "),j()(),W(7,"mat-form-field",5)(8,"mat-label"),Ve(9,"Texture ID"),j(),W(10,"input",6),Ue("ngModelChange",function(r){return an(e),zt(he().resource.data.texture_id=r)})("change",function(){return an(e),zt(he().changed.emit())}),j()(),$r()}if(2&i){const e=he();G(1),U("ngIf",e.resource.name),G(2),U("selected",e.resource.data.has_left_fence),G(2),U("selected",e.resource.data.has_right_fence),G(5),U("max",63)("min",0)("step",1)("ngModel",e.resource.data.texture_id)}}let eme=(()=>{class i{constructor(){this.resource=null,this.resourceDescription="",this.changed=new We}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=ot({type:i,selectors:[["app-fence-type",8,"block-ui"]],inputs:{resource:"resource",resourceDescription:"resourceDescription"},outputs:{changed:"changed"},attrs:Zpe,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&&fe(0,Jpe,11,7,"ng-container",0),2&e&&U("ngIf",n.resource)},dependencies:[vi,gl,mu,tc,_u,gu,Kc,vl,Io,ic,Os,MC,wC],changeDetection:0}),i})(),tme=(()=>{class i{constructor(){this._resource=null,this.resourceMap={},this.changed=new We}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]=["",_l.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)(E(nb),E(bte),E(oR))},i.\u0275cmp=ot({type:i,selectors:[["app-run-custom-action",8,"dialog"]],attrs:nme,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&&(W(0,"h1",0),Ve(1),j(),W(2,"div",1)(3,"p"),Ve(4),j()(),W(5,"form",2),fe(6,ime,4,4,"mat-form-field",3),j(),W(7,"div",4)(8,"button",5),Ue("click",function(){return n.dialogRef.close()}),Ve(9,"Cancel"),j(),W(10,"button",6),Ue("click",function(){return n.submit()}),Ve(11,"Run"),j()()),2&e&&(G(1),Zi('Run action "',n.data.title,'"'),G(3),_i(n.data.description),G(1),U("formGroup",n.argsForm),G(1),U("ngForOf",n.data.args),G(4),U("disabled",n.argsForm.invalid))},dependencies:[Eo,IR,gl,tc,bR,vl,Io,ic,ib,fV,pV,mV,Gh,fC],styles:["form[_ngcontent-%COMP%]{padding:0 24px}"]}),i})();function v$(i,t){return t?e=>Sy(t.pipe(Pi(1),function sme(){return ti((i,t)=>{i.subscribe(Yn(t,ms))})}()),e.pipe(v$(i))):ir((e,n)=>wr(i(e,n)).pipe(Pi(1),YB(e)))}function y$(i,t=$y){const e=OI(i,t);return v$(()=>e)}const ome=["mat-menu-item",""];function ame(i,t){1&i&&(Ri(),W(0,"svg",3),De(1,"polygon",4),j())}const lme=[[["mat-icon"],["","matMenuItemIcon",""]],"*"],cme=["mat-icon, [matMenuItemIcon]","*"];function dme(i,t){if(1&i){const e=di();W(0,"div",0),Ue("keydown",function(r){return an(e),zt(he()._handleKeydown(r))})("click",function(){return an(e),zt(he().closed.emit("click"))})("@transformMenu.start",function(r){return an(e),zt(he()._onAnimationStart(r))})("@transformMenu.done",function(r){return an(e),zt(he()._onAnimationDone(r))}),W(1,"div",1),Wt(2),j()()}if(2&i){const e=he();U("id",e.panelId)("ngClass",e._classList)("@transformMenu",e._panelAnimationState),Dt("aria-label",e.ariaLabel||null)("aria-labelledby",e.ariaLabelledby||null)("aria-describedby",e.ariaDescribedby||null)}}const ume=["*"],xO=new me("MAT_MENU_PANEL"),hme=YM(jM(class{}));let eE=(()=>{class i extends hme{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 Re,this._focused=new Re,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",jr("120ms cubic-bezier(0, 0, 0.2, 1)",si({opacity:1,transform:"scale(1)"}))),Pr("* => void",jr("100ms 25ms linear",si({opacity:0})))]),fadeInItems:ka("fadeInItems",[Ps("showing",si({opacity:1})),Pr("void => *",[si({opacity:0}),jr("400ms 100ms cubic-bezier(0.55, 0, 0.55, 0.2)")])])};let pme=0;const b$=new me("mat-menu-default-options",{providedIn:"root",factory:function mme(){return{overlapTrigger:!1,xPosition:"after",yPosition:"below",backdropClass:"cdk-overlay-transparent-backdrop"}}});let e0=(()=>{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 om,this._classList={},this._panelAnimationState="void",this._animationDone=new Re,this.overlayPanelClass=this._defaultOptions.overlayPanelClass||"",this.backdropClass=this._defaultOptions.backdropClass,this._overlapTrigger=this._defaultOptions.overlapTrigger,this._hasBackdrop=this._defaultOptions.hasBackdrop,this.closed=new We,this.close=this.closed,this.panelId="mat-menu-panel-"+pme++}ngOnInit(){this.setPositionClasses()}ngAfterContentInit(){this._updateDirectDescendants(),this._keyManager=new RU(this._directDescendantItems).withWrap().withTypeAhead().withHomeAndEnd(),this._keyManager.tabOut.subscribe(()=>this.closed.emit("tab")),this._directDescendantItems.changes.pipe(Do(this._directDescendantItems),Rs(e=>Mr(...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(Do(this._directDescendantItems),Rs(n=>Mr(...n.map(r=>r._hovered))))}addItem(e){}removeItem(e){}_handleKeydown(e){const n=e.keyCode,r=this._keyManager;switch(n){case 27:Ko(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(Pi(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(Do(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)(E(mt),E(ft),E(b$),E(Zn))},i.\u0275dir=ve({type:i,contentQueries:function(e,n,r){if(1&e&&($i(r,fme,5),$i(r,eE,5),$i(r,eE,4)),2&e){let s;Et(s=At())&&(n.lazyContent=s.first),Et(s=At())&&(n._allItems=s),Et(s=At())&&(n.items=s)}},viewQuery:function(e,n){if(1&e&&Wn(Co,5),2&e){let r;Et(r=At())&&(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})(),gme=(()=>{class i extends e0{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)(E(mt),E(ft),E(b$),E(Zn))},i.\u0275cmp=ot({type:i,selectors:[["mat-menu"]],hostVars:3,hostBindings:function(e,n){2&e&&Dt("aria-label",null)("aria-labelledby",null)("aria-describedby",null)},exportAs:["matMenu"],features:[Dn([{provide:xO,useExisting:i}]),lt],ngContentSelectors:ume,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&&(sr(),fe(0,dme,3,6,"ng-template"))},dependencies:[hm],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:[tE.transformMenu,tE.fadeInItems]},changeDetection:0}),i})();const x$=new me("mat-menu-scroll-strategy"),vme={provide:x$,deps:[as],useFactory:function _me(i){return()=>i.scrollStrategies.reposition()}},w$=Oh({passive:!0});let yme=(()=>{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,d){this._overlay=e,this._element=n,this._viewContainerRef=r,this._menuItemInstance=a,this._dir=l,this._focusMonitor=c,this._ngZone=d,this._overlayRef=null,this._menuOpen=!1,this._closingActionsSubscription=Zt.EMPTY,this._hoverSubscription=Zt.EMPTY,this._menuCloseSubscription=Zt.EMPTY,this._changeDetectorRef=Ft(Zn),this._handleTouchStart=h=>{qI(h)||(this._openedBy="touch")},this._openedBy=void 0,this.restoreFocus=!0,this.menuOpened=new We,this.onMenuOpen=this.menuOpened,this.menuClosed=new We,this.onMenuClose=this.menuClosed,this._scrollStrategy=s,this._parentMaterialMenu=o instanceof e0?o:void 0,n.nativeElement.addEventListener("touchstart",this._handleTouchStart,w$)}ngAfterContentInit(){this._handleHover()}ngOnDestroy(){this._overlayRef&&(this._overlayRef.dispose(),this._overlayRef=null),this._element.nativeElement.removeEventListener("touchstart",this._handleTouchStart,w$),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 e0&&(e._startAnimation(),e._directDescendantItems.changes.pipe(He(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 e0?(n._resetAnimation(),n.lazyContent?n._animationDone.pipe(gn(r=>"void"===r.toState),Pi(1),He(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],[d,h]=[r,s],p=0;if(this.triggersSubmenu()){if(h=r="before"===e.xPosition?"start":"end",s=d="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:d,overlayY:o,offsetY:p},{originX:s,originY:l,overlayX:h,overlayY:o,offsetY:p},{originX:r,originY:c,overlayX:d,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 Mr(e,this._parentMaterialMenu?this._parentMaterialMenu.closed:ht(),this._parentMaterialMenu?this._parentMaterialMenu._hovered().pipe(gn(o=>o!==this._menuItemInstance),gn(()=>this._menuOpen)):ht(),n)}_handleMousedown(e){YI(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(gn(e=>e===this._menuItemInstance&&!e.disabled),y$(0,PI)).subscribe(()=>{this._openedBy="mouse",this.menu instanceof e0&&this.menu._isAnimating?this.menu._animationDone.pipe(Pi(1),y$(0,PI),He(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)(E(as),E(mt),E(Wr),E(x$),E(xO,8),E(eE,10),E(Ra,8),E(qc),E(ft))},i.\u0275dir=ve({type:i,hostVars:3,hostBindings:function(e,n){1&e&&Ue("click",function(s){return n._handleClick(s)})("mousedown",function(s){return n._handleMousedown(s)})("keydown",function(s){return n._handleKeydown(s)}),2&e&&Dt("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})(),bme=(()=>{class i extends yme{}return i.\u0275fac=function(){let t;return function(n){return(t||(t=ri(i)))(n||i)}}(),i.\u0275dir=ve({type:i,selectors:[["","mat-menu-trigger-for",""],["","matMenuTriggerFor",""]],hostAttrs:[1,"mat-mdc-menu-trigger"],exportAs:["matMenuTrigger"],features:[lt]}),i})(),xme=(()=>{class i{}return i.\u0275fac=function(e){return new(e||i)},i.\u0275mod=nn({type:i}),i.\u0275inj=Kt({providers:[vme],imports:[Ao,eb,Qn,Pm,Xy,Qn]}),i})();function wme(i,t){if(1&i){const e=di();W(0,"button",7),Ue("click",function(){return an(e),zt(he(2).deserialize())}),De(1,"mat-icon",8),j()}}function Mme(i,t){if(1&i){const e=di();Gr(0),fe(1,wme,2,0,"button",4),W(2,"button",5),Ue("click",function(){return an(e),zt(he().serializeBlockReversible())}),De(3,"mat-icon",6),j(),$r()}if(2&i){const e=he();G(1),U("ngIf",e.isInReversibleSerializationState),G(1),U("disabled",e.isInReversibleSerializationState)}}function Cme(i,t){1&i&&(W(0,"button",9),De(1,"mat-icon",10),j()),2&i&&(he(),U("matMenuTriggerFor",Ki(3)))}function Sme(i,t){if(1&i){const e=di();W(0,"button",11),Ue("click",function(){const s=an(e).$implicit;return zt(he().runCustomAction(s))}),W(1,"span"),Ve(2),j()()}if(2&i){const e=t.$implicit;G(2),_i(e.title)}}const Eme=function(){return[]};let nE=(()=>{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 tt(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)(E(Pa),E(Ql),E(Zn),E(Bm),E(IV))},i.\u0275cmp=ot({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&&(fe(0,Mme,4,2,"ng-container",0),fe(1,Cme,2,1,"button",1),W(2,"mat-menu",null,2),fe(4,Sme,3,1,"button",3),j()),2&e&&(U("ngIf",null==n.resource||null==n.resource.schema?null:n.resource.schema.serializable_to_disc),G(1),U("ngIf",(null==n.resource||null==n.resource.schema.custom_actions?null:n.resource.schema.custom_actions.length)>0),G(3),U("ngForOf",(null==n.resource?null:n.resource.schema.custom_actions)||oo(3,Eme)))},dependencies:[Eo,vi,Os,XM,gR,gme,eE,bme],styles:["[_nghost-%COMP%]{display:flex}"]}),i})();const Ame=["class","block-ui"];function Dme(i,t){if(1&i&&(W(0,"mat-label",7),Ve(1),j()),2&i){const e=he();U("matTooltip",e.resourceDescription),G(1),Zi("",null==e.resource?null:e.resource.name," ")}}function Tme(i,t){if(1&i&&(W(0,"audio",8),De(1,"source",9),Ct(2,"async"),Ve(3," Your browser does not support the audio element. "),j()),2&i){const e=he();G(1),U("src",Tt(2,1,e.audioUrl$),Lp)}}function Ime(i,t){1&i&&De(0,"mat-spinner",10)}function Rme(i,t){1&i&&De(0,"app-block-actions",11),2&i&&U("resource",he().resource)}const kme=function(){return["wave_data"]};let Pme=(()=>{class i{constructor(e,n){this.eelDelegate=e,this.main=n,this._resource$=new gt(null),this.audioUrl$=new gt(null),this.resourceDescription="",this.hideBlockActions=!1,this.destroyed$=new Re,this.changed=new We}set resource(e){this._resource$.next(e)}get resource(){return this._resource$.getValue()}ngAfterViewInit(){var e=this;return tt(function*(){e._resource$.pipe(He(e.destroyed$)).subscribe(function(){var n=tt(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)(E(Ql),E(Pa))},i.\u0275cmp=ot({type:i,selectors:[["app-eacs-audio",8,"block-ui"]],inputs:{resource:"resource",resourceDescription:"resourceDescription",hideBlockActions:"hideBlockActions"},outputs:{changed:"changed"},attrs:Ame,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&&(W(0,"div",0),fe(1,Dme,2,2,"mat-label",1),Ct(2,"async"),fe(3,Tme,4,3,"audio",2),Ct(4,"async"),fe(5,Ime,1,0,"mat-spinner",3),Ct(6,"async"),De(7,"div",4),fe(8,Rme,1,1,"app-block-actions",5),j(),De(9,"app-compound-block-ui",6),Ct(10,"async")),2&e){let r;G(1),U("ngIf",(null==n.resource?null:n.resource.name)&&(null==n.resource?null:n.resource.name)!=(null==(r=Tt(2,7,n.main.resource$))?null:r.name)),G(2),U("ngIf",Tt(4,9,n.audioUrl$)),G(2),U("ngIf",n.resource&&!Tt(6,11,n.audioUrl$)),G(3),U("ngIf",!n.hideBlockActions),G(1),U("resource",Tt(10,13,n._resource$))("hideBlockActions",!0)("fieldBlacklist",oo(15,kme))}},dependencies:[vi,Io,Os,Jb,Jl,nE,pl],styles:["#header[_ngcontent-%COMP%]{display:flex}"]}),i})();class Ome{constructor(t,e){this.mesh=t,this.assetsPath=e,this.textures=[],this.tyreTextureUpdateTimer=void 0,this.tyreMaterial=null,this.tyreTextures=[],this._color=65280,this._speed="idle",this._steeringAngle=0,this.wheels=[],this.wheelIdlePositions=[],this.frontWheels=[];let n=new Set;if(t.traverse(r=>{if(!(r instanceof Mn))return;let s=-1;if(r.name.startsWith("part_hp_12")?s=0:r.name.startsWith("part_hp_14")?s=1:r.name.startsWith("part_hp_16")?s=2:r.name.startsWith("part_hp_18")&&(s=3),s>-1){r.geometry.boundingBox||r.geometry.computeBoundingBox();let a=Pe.avg(r.geometry.boundingBox.min,r.geometry.boundingBox.max);return(0==s||2==s)&&(a={x:a.x,y:a.y,z:a.z+1.5}),r.geometry.translate(...Pe.spr(Pe.neg(a))),r.position.set(...Pe.spr(a)),this.wheelIdlePositions[s]=a,this.wheels.push(r),void(s<2&&this.frontWheels.push(r))}const o=r.material.map;o&&n.add(o)}),this.textures=Array.from(n).map(r=>{const s=new Po(document.createElement("img"));return s.flipY=r.flipY,ra(s),[r,s]}),t.traverse(r=>{if(!(r instanceof Mn))return;const s=r.material.map;if(s){const o=this.textures.find(([a,l])=>a===s);o&&(r.material.map=o[1])}}),this.hasWheels){const r=new Pu;this.tyreTextures=[0,1,2,3].map(s=>r.load(`${e}/m${s}00.png`));for(const s of this.tyreTextures)ra(s);this.tyreMaterial=new Yi({map:this.tyreTextures[0]}),this.tyreMaterial.transparent=!0,this.tyreMaterial.alphaTest=.5,this.tyreMaterial.map.wrapS=Ji,this.tyreMaterial.map.wrapT=Ji,this.tyreMaterial.polygonOffset=!0,this.tyreMaterial.polygonOffsetFactor=-4;for(const s of this.wheels)s.material=this.tyreMaterial}this.color=65280,this.recolorCar().then()}get color(){return this._color}set color(t){t!==this._color&&(this._color=t,this.recolorCar().then())}get speed(){return this._speed}set speed(t){if(t!==this._speed){switch(this._speed=t,this.tyreTextureUpdateTimer&&clearInterval(this.tyreTextureUpdateTimer),t){case"idle":this.tyreMaterial.map=this.tyreTextures[0];break;case"slow":let e=!0;this.tyreTextureUpdateTimer=setInterval(()=>{this.tyreMaterial.map=this.tyreTextures[e?1:2],this.tyreMaterial.needsUpdate=!0,e=!e},16);break;case"fast":this.tyreMaterial.map=this.tyreTextures[3]}this.tyreMaterial.needsUpdate=!0}}get steeringAngle(){return this._steeringAngle}set steeringAngle(t){if(t!==this._steeringAngle){this._steeringAngle=t;for(const e of this.frontWheels)e.rotation.set(0,0,t)}}get hasWheels(){return this.wheels.length>0}recolorCar(){var t=this;return tt(function*(){const[e,n,r]=[t.color>>16,t.color>>8&255,255&t.color];for(const[s,o]of t.textures){for(let a=100;a>0&&!s.source.data;a--)yield p$(50);m$(s.source.data,(a,l)=>{if(a[l]+a[l+2]{class i{constructor(e,n,r){this.eelDelegate=e,this.main=n,this.cdr=r,this._resource$=new gt(null),this.changed=new We,this.customControls=[],this.previewPaths$=new gt(null),this.destroyed$=new Re,this.serializerSettings={geometry__save_obj:!0,geometry__save_blend:!1,geometry__export_to_gg_web_engine:!1}}get resource(){return this._resource$.getValue()}set resource(e){this._resource$.next(e)}ngAfterViewInit(){var e=this;return tt(function*(){e._resource$.pipe(He(e.destroyed$)).subscribe(function(){var n=tt(function*(r){e.previewPaths$.next(yield e.loadPreviewFilePaths(r?.id))});return function(r){return n.apply(this,arguments)}}()),e.main.dataBlockChange$.pipe(He(e.destroyed$),gn(([n,r])=>!!e.resource&&n.startsWith(e.resource.id)),ml(1500)).subscribe(tt(function*(){e.previewPaths$.next(null),e.previewPaths$.next(yield e.postTmpUpdates(e.resource?.id))}))})()}onObjectLoaded(e){var n=this;return tt(function*(){try{const r=new Ome(e,n.previewPaths$.value[0].substring(0,n.previewPaths$.value[0].lastIndexOf("/"))+"/assets");let s=null;const o=a=>{s&&clearTimeout(s),s=setTimeout(()=>r.color=a,50)};n.customControls=[{title:"NFS2 car features",controls:[{label:"Car color",type:"color",value:65280,change:a=>o(a)}]}],r.hasWheels&&n.customControls[0].controls.push({label:"Car speed",type:"radio",options:["idle","slow","fast"],value:"idle",change:a=>{r.speed=a}},{label:"Steering angle",type:"slider",minValue:-.7,maxValue:.7,valueStep:.05,value:0,change:a=>{r.steeringAngle=a}}),n.cdr.markForCheck()}catch(r){console.error(r)}})()}postTmpUpdates(e){var n=this;return tt(function*(){if(e){const r=yield n.eelDelegate.serializeResourceTmp(e,Object.entries(n.main.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 tt(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)(E(Ql),E(Pa),E(Zn))},i.\u0275cmp=ot({type:i,selectors:[["app-geo-geometry",8,"block-ui"]],inputs:{resource:"resource"},outputs:{changed:"changed"},attrs:Fme,decls:4,vars:8,consts:[[3,"paths","groupFunction","customControls","onObjectLoaded"],[3,"resource",4,"ngIf"],[3,"resource"]],template:function(e,n){1&e&&(W(0,"app-obj-viewer",0),Ue("onObjectLoaded",function(s){return n.onObjectLoaded(s)}),Ct(1,"async"),j(),fe(2,Lme,2,3,"app-compound-block-ui",1),Ct(3,"async")),2&e&&(U("paths",Tt(1,4,n.previewPaths$))("groupFunction",n.previewObjectGroupFunc)("customControls",n.customControls),G(2),U("ngIf",!Tt(3,6,n.main.hideHiddenFields$)))},dependencies:[vi,Jl,h$,pl],changeDetection:0}),i})();const Bme=function(){return["children","items_descr"]};let Ume=(()=>{class i{constructor(){this._resource=null,this.hideBlockActions=!1,this.resourceMap={},this.changed=new We}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:rc(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=ot({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&&De(0,"app-compound-block-ui",0)(1,"app-sidenav-res-list",1),2&e&&(U("resource",n.resource)("hideBlockActions",n.hideBlockActions)("fieldBlacklist",oo(4,Bme)),G(1),U("resources",n.resourceMap))},dependencies:[Jl,xC],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})();const Vme=["previewCanvasContainer"],zme=["previewCanvas"];function Hme(i,t){1&i&&De(0,"mat-spinner",16),2&i&&U("diameter",40)}function Gme(i,t){1&i&&De(0,"mat-spinner",17)}var Df=(()=>{return(i=Df||(Df={})).ThreeModel="model",i.Bitmap="bitmap",i.TwoSidedBitmap="two_sided_bitmap",Df;var i})();class $me extends QH{constructor(t,e,n){super(t,{loadDepth:40,inertia:2}),this.mapGraph=t,this.qfsPath=e,this.hideUnknownEntities$=n,this.textureLoader=new Pu,this.terrainMaterials={},this.objLoader=new Qb,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(Zl(),He(this._onRemoved$)).subscribe(e=>{for(const n of this.unknownEntities)n.visible=!e})}getPlaceholderTexture(){var t=this;return tt(function*(){return t._placeholder?t._placeholder:(t._placeholderPromise||(t._placeholderPromise=t.textureLoader.loadAsync("assets/placeholder_texture.png")),t._placeholderPromise)})()}getPlaceholderTerrainTexture(){var t=this;return tt(function*(){return t._placeholderTerrain?t._placeholderTerrain:(t._placeholderTerrainPromise||(t._placeholderTerrainPromise=t.textureLoader.loadAsync("assets/placeholder_texture.png").then(e=>(e.wrapS=Ns,e.wrapT=Ns,ra(e),e))),t._placeholderTerrainPromise)})()}loadChunk(t){var e=this;return tt(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 Mn&&(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:Pe.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:ji.fromAngle(Pe.nZ,l.rotation)}));const o=(yield Promise.all(s.map(l=>e.loadPropInternal(l)))).filter(l=>!!l),a=new Qo({object3D:new ia(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 Yi({side:Ls,transparent:!0,visible:!1}),this.qfsPath?this.textureLoader.loadAsync(`${this.qfsPath}/${t}.png`).then(e=>{e.wrapS=Ns,e.wrapT=Ns,ra(e),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 tt(function*(){let n=!1;if(t.type==Df.ThreeModel){let r;try{if(!e.qfsPath)throw new Error;const o=new bO,a=new Qb,l=yield o.loadAsync(`${e.qfsPath}/props/${t.data.data.resource_id}/0/material.mtl`);l.preload(),a.setMaterials(l),r=new ia(yield a.loadAsync(`${e.qfsPath}/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 Mn){const a=o.material instanceof Array?o.material:[o.material];for(const l of a)l.transparent=!0,l.alphaTest=.5,l instanceof Yi&&l.map&&(l.map.wrapS=Ns,l.map.wrapT=Ns,ra(l.map),l.map.needsUpdate=!0)}});const s=new Qo({object3D: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,d)=>new Array(d).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 Lo,[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,d]=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 Qo({object3D:new ia(s)});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 tt(function*(){const s=t.split(";"),o=yield r.getPlaceholderTexture();let a=!1,l=[];r.qfsPath?l=yield Promise.all(s.map(h=>r.textureLoader.loadAsync(`${r.qfsPath}/foreground/${h}.png`).catch(()=>(a=!0,o)))):(a=!0,l=s.map(()=>o));const c=l.map(h=>(ra(h),new Yi({map:h,alphaTest:.5,transparent:!0,side:Ls}))),d=new Mn(new Iu(e.x,e.y),c[0]);if(d.rotateX(Math.PI/2),d.position.set(0,0,e.y/2),c.length>1){let h=-1;Ym(r.world).pipe(o4(n&&!isNaN(+n)?1e3*+n:250)).subscribe(()=>{h=(h+1)%c.length,d.material=c[h]})}return[d,a]})()}}let Wme=(()=>{class i{constructor(e,n,r){this.eelDelegate=e,this.cdr=n,this.mainService=r,this._resource$=new gt(null),this.changed=new We,this.previewLoading$=new gt(!0),this.previewQfsLocation$=new gt(null),this.previewQfsLoading$=new gt(!1),this.pointer$=new gt(null),this.selectedSplineIndex$=new gt(0),this.qfsPath=null,this.name="",this.renderer=null,this.map=null,this.roadPath=null,this.destroyed$=new Re}get resource(){return this._resource$.getValue()}set resource(e){this._resource$.next(e)}get roadSpline(){return this.resource?.data.block_positions||[]}ngAfterViewInit(){var e=this;return tt(function*(){var s;e.world=new sk(new vO,{init:(s=tt(function*(){}),function(){return s.apply(this,arguments)}),simulate:()=>{},loader:{loadFromGgGlb:function(){var s=tt(function*(...o){return[]});return function(){return s.apply(this,arguments)}}()}}),yield e.world.init(),e.skySphere=new Qo({object3D:e.world.visualScene.factory.createPrimitive({shape:"SPHERE",radius:1e3},{color:16777215})}),e.skySphere.object3D.nativeMesh.material.side=Ls,e.world.addEntity(e.skySphere),e.selectionSphere=new Qo({object3D: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 $S(16777215,2));let n=new gt({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=ji.lookAt(e.renderer.camera.position,Pe.add(e.renderer.camera.position,Pe.Y),Pe.Z),Ym(e.world).pipe(He(e.destroyed$)).subscribe(()=>{e.renderer&&(e.skySphere.position=e.renderer.camera.position,e.pointer$.next(e.renderer.camera.position))}),e.controller=new n4(e.world.keyboardInput,e.renderer,{mouseOptions:{canvas:e.previewCanvas.nativeElement,pointerLock:!0},keymap:"wasd+arrows",cameraLinearSpeed:40,cameraBoostMultiplier:4,cameraMovementElasticity:100,cameraRotationElasticity:30,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(He(e.destroyed$)).subscribe(function(){var s=tt(function*(o){e.previewLoading$.next(!0),o?(e.previewQfsLocation$.next(o.id.substring(0,o.id.indexOf(".TRK"))+"0.QFS"),yield e.loadTerrainChunks(o.id),yield e.onQfsSelected(e.previewQfsLocation$.value)):(yield e.loadTerrainChunks(),yield e.loadPreview()),e.previewLoading$.next(!1)});return function(o){return s.apply(this,arguments)}}()),e.mainService.dataBlockChange$.pipe(He(e.destroyed$),gn(([s,o])=>!!e.resource&&s.startsWith(e.resource.id)),ml(3e3)).subscribe(tt(function*(){e.previewLoading$.next(!0),yield e.postTmpUpdates(e.resource?.id),yield e.loadPreview(),e.previewLoading$.next(!1)})),e.selectedSplineIndex$.pipe(He(e.destroyed$),ml(250)).subscribe(s=>{if(e.resource){let o=e.resource.data.block_positions[s];if(!o)return;o={x:o.x,y:o.z,z:o.y},e.selectionSphere.position=o,e.renderer&&(e.renderer.position=Pe.add(o,Pe.rotAround({x:10,y:-12,z:5},{x:0,y:0,z:1},-0)),e.renderer.rotation=ji.lookAt(e.renderer.position,o,{x:0,y:0,z:1}),e.controller.reset())}})})()}onQfsSelected(e){var n=this;return tt(function*(){if(n.qfsPath!=e){n.previewQfsLoading$.next(!0);try{const r=yield n.eelDelegate.serializeResource(e),s=new Pu,o=r.find(a=>a.endsWith("spherical.png"));if(o){const a=yield s.loadAsync(o);a.colorSpace="srgb",a.mapping=lc,n.skySphere.object3D.nativeMesh.material.map=a}else n.skySphere.object3D.nativeMesh.material.map=null;n.skySphere.object3D.nativeMesh.material.needsUpdate=!0,n.qfsPath=e}catch{n.skySphere.object3D.nativeMesh.material.map=null,n.skySphere.object3D.nativeMesh.material.needsUpdate=!0,n.qfsPath=null}finally{n.previewQfsLoading$.next(!1)}yield n.loadPreview()}})()}loadTerrainChunks(e){var n=this;return tt(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 tt(function*(){if(e.roadPath=e.resource?.data.block_positions.map(r=>({x:r.x,y:r.z,z:r.y})),!e.terrainChunksObjLocation||!e.roadPath)return;const n=Km.fromMapArray(e.roadPath.map((r,s)=>({path:`${e.terrainChunksObjLocation}terrain_chunk_${s}`,position:r,loadOptions:{}}))||[],!0);e.unloadPreview(),e.map=new $me(n,e.qfsPath&&"resources/"+e.qfsPath,e.mainService.hideHiddenFields$),e.map.resource=e.resource,e.map.isOpenedTrack=!1,Ym(e.world).pipe(He(e.destroyed$)).subscribe(()=>{e.map&&e.renderer&&e.map.loaderCursor$.next(e.renderer.position)}),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 tt(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)(E(Ql),E(Zn),E(Pa))},i.\u0275cmp=ot({type:i,selectors:[["app-trk-map-block-ui"]],viewQuery:function(e,n){if(1&e&&(Wn(Vme,5),Wn(zme,5)),2&e){let r;Et(r=At())&&(n.previewCanvasContainer=r.first),Et(r=At())&&(n.previewCanvas=r.first)}},inputs:{resource:"resource"},outputs:{changed:"changed"},decls:32,vars:24,consts:[[1,"qfsSelector"],["appearance","fill"],["matInput","","type","text",3,"value"],["customQfsInput",""],["mat-button","",3,"click"],["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"],["mode","indeterminate",3,"diameter"],["mode","indeterminate"]],template:function(e,n){if(1&e){const r=di();W(0,"div",0)(1,"h4"),Ve(2,"Preview QFS file"),j(),W(3,"mat-form-field",1)(4,"mat-label"),Ve(5,"Custom QFS path"),j(),De(6,"input",2,3),Ct(8,"async"),j(),W(9,"button",4),Ue("click",function(){an(r);const o=Ki(7);return zt(n.onQfsSelected(o.value))}),Ve(10,"LOAD"),j(),fe(11,Hme,1,1,"mat-spinner",5),Ct(12,"async"),j(),W(13,"div",6)(14,"div",7,8),De(16,"canvas",9,10),fe(18,Gme,1,0,"mat-spinner",11),Ct(19,"async"),j(),W(20,"div",12,8)(22,"mat-form-field",1)(23,"mat-label"),Ve(24,"Spline item"),j(),W(25,"input",13),Ue("ngModelChange",function(o){return n.selectedSplineIndex$.next(o)}),Ct(26,"async"),Ct(27,"async"),j()(),De(28,"app-tri-minimap",14),Ct(29,"async"),j()(),De(30,"app-compound-block-ui",15),Ct(31,"async")}if(2&e){let r;G(6),U("value",Tt(8,10,n.previewQfsLocation$)),G(5),U("ngIf",Tt(12,12,n.previewQfsLoading$)),G(7),U("ngIf",Tt(19,14,n.previewLoading$)),G(7),U("min",0)("max",4*(null==(r=Tt(26,16,n._resource$))?null:r.data.num_blocks)-1)("ngModel",Tt(27,18,n.selectedSplineIndex$)),G(3),U("roadSpline",n.roadSpline)("pointer",Tt(29,20,n.pointer$))("splineClosed",!0),G(2),U("resource",Tt(31,22,n._resource$))}},dependencies:[vi,gl,mu,tc,_u,gu,Kc,vl,Io,ic,ib,Jb,Jl,f$,pl],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}.qfsSelector[_ngcontent-%COMP%]{display:flex;align-items:center;width:100%;column-gap:1rem}.qfsSelector[_ngcontent-%COMP%] h4[_ngcontent-%COMP%]{min-width:-moz-fit-content;min-width:fit-content}.qfsSelector[_ngcontent-%COMP%] mat-form-field[_ngcontent-%COMP%]{flex-grow:1}.qfsSelector[_ngcontent-%COMP%] mat-spinner[_ngcontent-%COMP%], .qfsSelector[_ngcontent-%COMP%] button[_ngcontent-%COMP%]{margin-bottom:1.34375em}"],changeDetection:0}),i})();function jme(i,t){if(1&i&&(W(0,"mat-error"),Ve(1),j()),2&i){const e=he(2);G(1),tm(" ",e.resourceError.data.error_class,": ",e.resourceError.data.error_text," ")}}function Yme(i,t){1&i&&De(0,"mat-spinner",5)}function qme(i,t){if(1&i&&(W(0,"div",2),fe(1,jme,2,2,"mat-error",3),fe(2,Yme,1,0,"mat-spinner",4),j()),2&i){const e=he();G(1),U("ngIf",e.resourceError),G(1),U("ngIf",!e.resourceError)}}function Xme(i,t){}let t0=(()=>{class i{constructor(e){this.mainService=e,this._component=null,this._componentChangedSub=null,this.destroyed$=new Re,this.resourceSet$=new Re,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(He(this.destroyed$),He(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 Kme(i,t){1&i&&De(0,"mat-icon",17)}function Zme(i,t){1&i&&De(0,"mat-icon",18)}let Qme=(()=>{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 tt(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 tt(function*(){if(e.mainService.hasUnsavedChanges){let n=e.dialog.open(CV,{data:{text:"There are unsaved changes, which will be lost. Are you sure you want to reload file?"}});if(!(yield lR(n.afterClosed())))return}yield e.mainService.reloadResource(),e.cdr.markForCheck()})()}}return i.\u0275fac=function(e){return new(e||i)(E(Ql),E(Pa),E(Bm),E(IV),E(Zn))},i.\u0275cmp=ot({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&&(W(0,"mat-toolbar",0)(1,"span"),Ve(2),Ct(3,"async"),Ct(4,"async"),j(),De(5,"span",1),W(6,"button",2),Ue("click",function(){return n.toggleUnknownsVisibility()}),fe(7,Kme,1,0,"mat-icon",3),Ct(8,"async"),fe(9,Zme,1,0,"mat-icon",4),Ct(10,"async"),j(),De(11,"mat-divider",5)(12,"app-block-actions",6),Ct(13,"async"),W(14,"button",7),Ue("click",function(){return n.reloadResource()}),Ct(15,"async"),De(16,"mat-icon",8),j(),De(17,"mat-divider",5),W(18,"button",9),Ue("click",function(){return n.saveResource()}),Ct(19,"async"),Ct(20,"async"),De(21,"mat-icon",10),j()(),W(22,"div",11),De(23,"div",12)(24,"app-editor",13),Ct(25,"async"),Ct(26,"async"),Ct(27,"async"),W(28,"div",14)(29,"a",15),De(30,"img",16),j()(),De(31,"div",12),j()),2&e){let r;G(2),tm("",(null==(r=Tt(3,9,n.mainService.resource$))?null:r.name)||"...","",Tt(4,11,n.mainService.hasUnsavedChanges$)?"*":"",""),G(5),U("ngIf",Tt(8,13,n.mainService.hideHiddenFields$)),G(2),U("ngIf",!Tt(10,15,n.mainService.hideHiddenFields$)),G(3),U("resource",Tt(13,17,n.mainService.resource$)),G(2),U("disabled",!Tt(15,19,n.mainService.eelDelegate.openedResourcePath$)),G(4),U("disabled",!Tt(19,21,n.mainService.resource$)||!Tt(20,23,n.mainService.hasUnsavedChanges$)),G(6),U("resource",Tt(25,25,n.mainService.customActionRunning$)?null:Tt(26,27,n.mainService.resource$)||Tt(27,29,n.mainService.error$))("hideBlockActions",!0)}},dependencies:[vi,CJ,EJ,Os,XM,gR,t0,nE,pl],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 M$(i){return new pe(3e3,!1)}function Pge(){return typeof window<"u"&&typeof window.document<"u"}function wO(){return typeof process<"u"&&"[object process]"==={}.toString.call(process)}function Nu(i){switch(i.length){case 0:return new tb;case 1:return i[0];default:return new oV(i)}}function C$(i,t,e,n,r=new Map,s=new Map){const o=[],a=[];let l=-1,c=null;if(n.forEach(d=>{const h=d.get("offset"),p=h==l,m=p&&c||new Map;d.forEach((g,b)=>{let v=b,y=g;if("offset"!==b)switch(v=t.normalizePropertyName(v,o),y){case rR:y=r.get(b);break;case Xc: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 xge(i){return new pe(3502,!1)}();return a}function MO(i,t,e,n){switch(t){case"start":i.onStart(()=>n(e&&CO(e,"start",i)));break;case"done":i.onDone(()=>n(e&&CO(e,"done",i)));break;case"destroy":i.onDestroy(()=>n(e&&CO(e,"destroy",i)))}}function CO(i,t,e){const s=SO(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 SO(i,t,e,n,r="",s=0,o){return{element:i,triggerName:t,fromState:e,toState:n,phaseName:r,totalTime:s,disabled:!!o}}function sa(i,t,e){let n=i.get(t);return n||i.set(t,n=e),n}function S$(i){const t=i.indexOf(":");return[i.substring(1,t),i.slice(t+1)]}let EO=(i,t)=>!1,E$=(i,t,e)=>[],A$=null;function AO(i){const t=i.parentNode||i.host;return t===A$?null:t}(wO()||typeof Element<"u")&&(Pge()?(A$=(()=>document.documentElement)(),EO=(i,t)=>{for(;t;){if(t===i)return!0;t=AO(t)}return!1}):EO=(i,t)=>i.contains(t),E$=(i,t,e)=>{if(e)return Array.from(i.querySelectorAll(t));const n=i.querySelector(t);return n?[n]:[]});let Tf=null,D$=!1;const T$=EO,I$=E$;let R$=(()=>{class i{validateStyleProperty(e){return function Fge(i){Tf||(Tf=function Lge(){return typeof document<"u"?document.body:null}()||{},D$=!!Tf.style&&"WebkitAppearance"in Tf.style);let t=!0;return Tf.style&&!function Oge(i){return"ebkit"==i.substring(1,6)}(i)&&(t=i in Tf.style,!t&&D$&&(t="Webkit"+i.charAt(0).toUpperCase()+i.slice(1)in Tf.style)),t}(e)}matchesElement(e,n){return!1}containsElement(e,n){return T$(e,n)}getParentElement(e){return AO(e)}query(e,n,r){return I$(e,n,r)}computeStyle(e,n,r){return r||""}animate(e,n,r,s,o,a=[],l){return new tb(r,s)}}return i.\u0275fac=function(e){return new(e||i)},i.\u0275prov=ke({token:i,factory:i.\u0275fac}),i})(),DO=(()=>{class i{}return i.NOOP=new R$,i})();const Nge=1e3,TO="ng-enter",iE="ng-leave",rE="ng-trigger",sE=".ng-trigger",P$="ng-animating",IO=".ng-animating";function hd(i){if("number"==typeof i)return i;const t=i.match(/^(-?[\.\d]+)(m?s)/);return!t||t.length<2?0:RO(parseFloat(t[1]),t[2])}function RO(i,t){return"s"===t?i*Nge:i}function oE(i,t,e){return i.hasOwnProperty("duration")?i:function Uge(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(M$()),{duration:0,delay:0,easing:""};r=RO(parseFloat(a[1]),a[2]);const l=a[3];null!=l&&(s=RO(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 Jme(){return new pe(3100,!1)}()),a=!0),s<0&&(t.push(function ege(){return new pe(3101,!1)}()),a=!0),a&&t.splice(l,0,M$())}return{duration:r,delay:s,easing:o}}(i,t,e)}function n0(i,t={}){return Object.keys(i).forEach(e=>{t[e]=i[e]}),t}function O$(i){const t=new Map;return Object.keys(i).forEach(e=>{t.set(e,i[e])}),t}function Bu(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 L$(i,t,e){return e?t+":"+e+";":""}function N$(i){let t="";for(let e=0;e{const s=PO(r);e&&!e.has(r)&&e.set(r,i.style[s]),i.style[s]=n}),wO()&&N$(i))}function If(i,t){i.style&&(t.forEach((e,n)=>{const r=PO(n);i.style[r]=""}),wO()&&N$(i))}function r0(i){return Array.isArray(i)?1==i.length?i[0]:iV(i):i}const kO=new RegExp("{{\\s*(.+?)\\s*}}","g");function B$(i){let t=[];if("string"==typeof i){let e;for(;e=kO.exec(i);)t.push(e[1]);kO.lastIndex=0}return t}function s0(i,t,e){const n=i.toString(),r=n.replace(kO,(s,o)=>{let a=t[o];return null==a&&(e.push(function nge(i){return new pe(3003,!1)}()),a=""),a.toString()});return r==n?i:r}function aE(i){const t=[];let e=i.next();for(;!e.done;)t.push(e.value),e=i.next();return t}const Hge=/-+([a-z0-9])/g;function PO(i){return i.replace(Hge,(...t)=>t[1].toUpperCase())}function Gge(i){return i.replace(/([a-z])([A-Z])/g,"$1-$2").toLowerCase()}function oa(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 ige(i){return new pe(3004,!1)}()}}function U$(i,t){return window.getComputedStyle(i)[t]}const dE="*";function Xge(i,t){const e=[];return"string"==typeof i?i.split(/\s*,\s*/).forEach(n=>function Kge(i,t,e){if(":"==i[0]){const l=function Zge(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 gge(i){return new pe(3015,!1)}()),t;const r=n[1],s=n[2],o=n[3];t.push(V$(r,o));"<"==s[0]&&!(r==dE&&o==dE)&&t.push(V$(o,r))}(n,e,t)):e.push(i),e}const uE=new Set(["true","1"]),hE=new Set(["false","0"]);function V$(i,t){const e=uE.has(i)||hE.has(i),n=uE.has(t)||hE.has(t);return(r,s)=>{let o=i==dE||i==r,a=t==dE||t==s;return!o&&e&&"boolean"==typeof r&&(o=r?uE.has(i):hE.has(i)),!a&&n&&"boolean"==typeof s&&(a=s?uE.has(t):hE.has(t)),o&&a}}const Qge=new RegExp("s*:selfs*,?","g");function OO(i,t,e,n){return new Jge(i).build(t,e,n)}class Jge{constructor(t){this._driver=t}build(t,e,n){const r=new n_e(e);return this._resetContextStyleTimingState(r),oa(this,r0(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 sge(){return new pe(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(d=>{l.name=d,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 oge(){return new pe(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=>{B$(l).forEach(c=>{o.hasOwnProperty(c)||s.add(c)})})}),s.size&&(aE(s.values()),e.errors.push(function age(i,t){return new pe(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=oa(this,r0(t.animation),e);return{type:1,matchers:Xge(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=>oa(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=oa(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 r_e(i,t){if(i.hasOwnProperty("duration"))return i;if("number"==typeof i)return FO(oE(i,t).duration,0,"");const e=i;if(e.split(/\s+/).some(s=>"{"==s.charAt(0)&&"{"==s.charAt(1))){const s=FO(0,0,"");return s.dynamic=!0,s.strValue=e,s}const r=oE(e,t);return FO(r.duration,r.delay,r.easing)}(t.timings,e.errors);e.currentAnimateTimings=n;let r,s=t.styles?t.styles:si({});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=si(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===Xc?n.push(a):e.errors.push(new pe(3002,!1)):n.push(O$(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),d=c.get(l);let h=!0;d&&(s!=r&&s>=d.startTime&&r<=d.endTime&&(e.errors.push(function cge(i,t,e,n,r){return new pe(3010,!1)}()),h=!1),s=d.startTime),h&&c.set(l,{startTime:s,endTime:r}),e.options&&function zge(i,t,e){const n=t.params||{},r=B$(i);r.length&&r.forEach(s=>{n.hasOwnProperty(s)||e.push(function tge(i){return new pe(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 dge(){return new pe(3011,!1)}()),n;let s=0;const o=[];let a=!1,l=!1,c=0;const d=t.steps.map(y=>{const M=this._makeStyleAst(y,e);let x=null!=M.offset?M.offset:function i_e(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:oa(this,r0(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 e_e(i){const t=!!i.split(/\s*,\s*/).find(e=>":self"==e);return t&&(i=i.replace(Qge,"")),i=i.replace(/@\*/g,sE).replace(/@\w+/g,e=>sE+"-"+e.slice(1)).replace(/:animating/g,IO),[i,t]}(t.selector);e.currentQuerySelector=n.length?n+" "+s:s,sa(e.collectedStyles,e.currentQuerySelector,new Map);const a=oa(this,r0(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 pge(){return new pe(3013,!1)}());const n="full"===t.timings?{duration:0,delay:0,easing:"full"}:oE(t.timings,e.errors,!0);return{type:12,animation:oa(this,r0(t.animation),e),timings:n,options:null}}}class n_e{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=n0(i)).params&&(i.params=function t_e(i){return i?n0(i):null}(i.params)):i={},i}function FO(i,t,e){return{duration:i,delay:t,easing:e}}function LO(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 fE{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 a_e=new RegExp(":enter","g"),c_e=new RegExp(":leave","g");function NO(i,t,e,n,r,s=new Map,o=new Map,a,l,c=[]){return(new d_e).buildKeyframes(i,t,e,n,r,s,o,a,l,c)}class d_e{buildKeyframes(t,e,n,r,s,o,a,l,c,d=[]){c=c||new fE;const h=new BO(t,e,c,r,s,d,[]);h.options=l;const p=l.delay?hd(l.delay):0;h.currentTimeline.delayNextStep(p),h.currentTimeline.setStyles([o],null,h.errors,l),oa(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()):[LO(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:hd(s0(s,r?.params??{},e.errors));n.delayNextStep(o)}}}_visitSubInstructions(t,e,n){let s=e.currentTimeline.currentTime;const o=null!=n.duration?hd(n.duration):null,a=null!=n.delay?hd(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),oa(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=pE);const o=hd(s.delay);r.delayNextStep(o)}t.steps.length&&(t.steps.forEach(o=>oa(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?hd(t.options.delay):0;t.steps.forEach(o=>{const a=e.createSubContext(t.options);s&&a.delayNextStep(s),oa(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 oE(e.params?s0(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?hd(r.delay):0;s&&(6===e.previousNode.type||0==n&&e.currentTimeline.hasCurrentStyleProperties())&&(e.currentTimeline.snapshotCurrentStyles(),e.previousNode=pE);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,d)=>{e.currentQueryIndex=d;const h=e.createSubContext(t.options,c);s&&h.delayNextStep(s),c===e.element&&(l=h.currentTimeline),oa(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 d=e.currentTimeline;l&&d.delayNextStep(l);const h=d.currentTime;oa(this,t.animation,e),e.previousNode=t,n.currentStaggerTime=r.currentTime-h+(r.startTime-n.currentTimeline.startTime)}}const pE={};class BO{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=pE,this.subContextCount=0,this.options={},this.currentQueryIndex=0,this.currentQueryTotal=0,this.currentStaggerTime=0,this.currentTimeline=l||new mE(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=hd(n.duration)),null!=n.delay&&(r.delay=hd(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]=s0(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 BO(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=pE,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 u_e(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(a_e,"."+this._enterClassName)).replace(c_e,"."+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 mge(i){return new pe(3014,!1)}()),a}}class mE{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 mE(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||Xc),this._currentKeyframe.set(e,Xc);this._currentEmptyStepKeyframe=this._currentKeyframe}setStyles(t,e,n,r){e&&this._previousKeyframe.set("easing",e);const s=r&&r.params||{},o=function h_e(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,Xc)}else Bu(r,e)}),e}(t,this._globalTimelineStyles);for(let[a,l]of o){const c=s0(l,s,n);this._pendingStyles.set(a,c),this._localTimelineStyles.has(a)||this._backFill.set(a,this._globalTimelineStyles.get(a)??Xc),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=Bu(a,new Map,this._backFill);c.forEach((d,h)=>{d===rR?t.add(h):d===Xc&&e.add(h)}),n||c.set("offset",l/this.duration),r.push(c)});const s=t.size?aE(t.values()):[],o=e.size?aE(e.values()):[];if(n){const a=r[0],l=new Map(a);a.set("offset",0),l.set("offset",1),r=[a,l]}return LO(this.element,r,s,o,this.duration,this.startTime,this.easing,!1)}}class u_e extends mE{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=Bu(t[0]);l.set("offset",0),s.push(l);const c=Bu(t[0]);c.set("offset",G$(a)),s.push(c);const d=t.length-1;for(let h=1;h<=d;h++){let p=Bu(t[h]);const m=p.get("offset");p.set("offset",G$((e+m*n)/o)),s.push(p)}n=o,e=0,r="",t=s}return LO(this.element,t,this.preStyleProps,this.postStyleProps,n,e,r,!0)}}function G$(i,t=3){const e=Math.pow(10,t-1);return Math.round(i*e)/e}class UO{}const f_e=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 p_e extends UO{normalizePropertyName(t,e){return PO(t)}normalizeStyleValue(t,e,n,r){let s="";const o=n.toString().trim();if(f_e.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 rge(i,t){return new pe(3005,!1)}())}return o+s}}function $$(i,t,e,n,r,s,o,a,l,c,d,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:d,totalTime:h,errors:p}}const VO={};class W${constructor(t,e,n){this._triggerName=t,this.ast=e,this._stateStyles=n}match(t,e,n,r){return function m_e(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,d){const h=[],p=this.ast.options&&this.ast.options.params||VO,g=this.buildStyles(n,a&&a.params||VO,h),b=l&&l.params||VO,v=this.buildStyles(r,b,h),y=new Set,M=new Map,x=new Map,C="void"===r,F={params:g_e(b,p),delay:this.ast.options?.delay},D=d?[]:NO(t,e,this.ast.animation,s,o,g,v,F,c,h);let k=0;if(D.forEach(T=>{k=Math.max(T.duration+T.delay,k)}),h.length)return $$(e,this._triggerName,n,r,C,g,v,[],[],M,x,k,h);D.forEach(T=>{const A=T.element,$=sa(M,A,new Set);T.preStyleProps.forEach(ne=>$.add(ne));const ie=sa(x,A,new Set);T.postStyleProps.forEach(ne=>ie.add(ne)),A!==e&&y.add(A)});const B=aE(y.values());return $$(e,this._triggerName,n,r,C,g,v,D,B,M,x,k)}}function g_e(i,t){const e=n0(t);for(const n in i)i.hasOwnProperty(n)&&null!=i[n]&&(e[n]=i[n]);return e}class __e{constructor(t,e,n){this.styles=t,this.defaultParams=e,this.normalizer=n}buildStyles(t,e){const n=new Map,r=n0(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=s0(o,r,e));const l=this.normalizer.normalizePropertyName(a,e);o=this.normalizer.normalizeStyleValue(a,l,o,e),n.set(a,o)})}),n}}class y_e{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 __e(r.style,r.options&&r.options.params||{},n))}),j$(this.states,"true","1"),j$(this.states,"false","0"),e.transitions.forEach(r=>{this.transitionFactories.push(new W$(t,r,this.states))}),this.fallbackTransition=function b_e(i,t,e){return new W$(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 j$(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 x_e=new fE;class w_e{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=OO(this._driver,e,n,r);if(n.length)throw function wge(i){return new pe(3503,!1)}();this._animations.set(t,s)}_buildPlayer(t,e,n){const r=t.element,s=C$(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=NO(this._driver,e,s,TO,iE,new Map,new Map,n,x_e,r),o.forEach(d=>{const h=sa(a,d.element,new Map);d.postStyleProps.forEach(p=>h.set(p,null))})):(r.push(function Mge(){return new pe(3300,!1)}()),o=[]),r.length)throw function Cge(i){return new pe(3504,!1)}();a.forEach((d,h)=>{d.forEach((p,m)=>{d.set(m,this._driver.computeStyle(h,m,Xc))})});const c=Nu(o.map(d=>{const h=a.get(d.element);return this._buildPlayer(d,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 Sge(i){return new pe(3301,!1)}();return e}listen(t,e,n,r){const s=SO(e,"","","");return MO(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 Y$="ng-animate-queued",zO="ng-animate-disabled",A_e=[],q$={namespaceId:"",setForRemoval:!1,setForMove:!1,hasAnimation:!1,removedBeforeQueried:!1},D_e={namespaceId:"",setForMove:!1,setForRemoval:!1,hasAnimation:!1,removedBeforeQueried:!0},Ua="__ng_removed";class HO{get params(){return this.options.params}constructor(t,e=""){this.namespaceId=e;const n=t&&t.hasOwnProperty("value");if(this.value=function k_e(i){return i??null}(n?t.value:t),n){const s=n0(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 o0="void",GO=new HO(o0);class T_e{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,Va(e,this._hostClassName)}listen(t,e,n,r){if(!this._triggers.has(e))throw function Ege(i,t){return new pe(3302,!1)}();if(null==n||0==n.length)throw function Age(i){return new pe(3303,!1)}();if(!function P_e(i){return"start"==i||"done"==i}(n))throw function Dge(i,t){return new pe(3400,!1)}();const s=sa(this._elementListeners,t,[]),o={name:e,phase:n,callback:r};s.push(o);const a=sa(this._engine.statesByElement,t,new Map);return a.has(e)||(Va(t,rE),Va(t,rE+"-"+e),a.set(e,GO)),()=>{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 Tge(i){return new pe(3401,!1)}();return e}trigger(t,e,n,r=!0){const s=this._getTrigger(e),o=new $O(this.id,e,t);let a=this._engine.statesByElement.get(t);a||(Va(t,rE),Va(t,rE+"-"+e),this._engine.statesByElement.set(t,a=new Map));let l=a.get(e);const c=new HO(n,this.id);if(!(n&&n.hasOwnProperty("value"))&&l&&c.absorbOptions(l.options),a.set(e,c),l||(l=GO),c.value!==o0&&l.value===c.value){if(!function L_e(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),hc(t,y)})}return}const p=sa(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||(Va(t,Y$),o.onStart(()=>{Yg(t,Y$)})),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,sE,!0);n.forEach(r=>{if(r[Ua])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 d=this.trigger(t,c,o0,r);d&&a.push(d)}}),a.length)return this._engine.markElementAsRemoved(this.id,t,!0,e,o),n&&Nu(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)||GO,d=new HO(o0),h=new $O(this.id,o,t);this._engine.totalQueuedPlayers++,this._queue.push({element:t,triggerName:o,transition:l,fromState:c,toState:d,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[Ua];(!s||s===q$)&&(n.afterFlush(()=>this.clearElementCache(t)),n.destroyInnerAnimations(t),n._onRemovalComplete(t,e))}}insertNode(t,e){Va(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=SO(s,n.triggerName,n.fromState.value,n.toState.value);l._data=t,MO(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 I_e{_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 T_e(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(gE(e)){const s=this._fetchNamespace(t);if(s)return s.trigger(e,n,r),!0}return!1}insertNode(t,e,n,r){if(!gE(e))return;const s=e[Ua];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),Va(t,zO)):this.disabledNodes.has(t)&&(this.disabledNodes.delete(t),Yg(t,zO))}removeNode(t,e,n,r){if(gE(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[Ua]={namespaceId:t,setForRemoval:r,hasAnimation:n,removedBeforeQueried:!1,previousTriggersValues:s}}listen(t,e,n,r,s){return gE(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,sE,!0);e.forEach(n=>this.destroyActiveAnimationsForElement(n)),0!=this.playersByQueriedElement.size&&(e=this.driver.query(t,IO,!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 Nu(this.players).onDone(()=>t());t()})}processLeaveNode(t){const e=t[Ua];if(e&&e.setForRemoval){if(t[Ua]=q$,e.namespaceId){this.destroyInnerAnimations(t);const n=this._fetchNamespace(e.namespaceId);n&&n.clearElementCache(t)}this._onRemovalComplete(t,e.setForRemoval)}t.classList?.contains(zO)&&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?Nu(e).onDone(()=>{n.forEach(r=>r())}):n.forEach(r=>r())}}reportError(t){throw function Ige(i){return new pe(3402,!1)}()}_flushAnimations(t,e){const n=new fE,r=[],s=new Map,o=[],a=new Map,l=new Map,c=new Map,d=new Set;this.disabledNodes.forEach(q=>{d.add(q);const re=this.driver.query(q,".ng-animate-queued",!0);for(let J=0;J{const J=TO+b++;g.set(re,J),q.forEach(we=>Va(we,J))});const v=[],y=new Set,M=new Set;for(let q=0;qy.add(we)):M.add(re))}const x=new Map,C=Z$(p,Array.from(y));C.forEach((q,re)=>{const J=iE+b++;x.set(re,J),q.forEach(we=>Va(we,J))}),t.push(()=>{m.forEach((q,re)=>{const J=g.get(re);q.forEach(we=>Yg(we,J))}),C.forEach((q,re)=>{const J=x.get(re);q.forEach(we=>Yg(we,J))}),v.forEach(q=>{this.processLeaveNode(q)})});const F=[],D=[];for(let q=this._namespaceList.length-1;q>=0;q--)this._namespaceList[q].drainQueuedTransitions(e).forEach(J=>{const we=J.player,Ne=J.element;if(F.push(we),this.collectedEnterElements.length){const Fe=Ne[Ua];if(Fe&&Fe.setForMove){if(Fe.previousTriggersValues&&Fe.previousTriggersValues.has(J.triggerName)){const bt=Fe.previousTriggersValues.get(J.triggerName),St=this.statesByElement.get(J.element);if(St&&St.has(J.triggerName)){const Mt=St.get(J.triggerName);Mt.value=bt,St.set(J.triggerName,Mt)}}return void we.destroy()}}const Ye=!h||!this.driver.containsElement(h,Ne),It=x.get(Ne),en=g.get(Ne),ae=this._buildInstruction(J,n,en,It,Ye);if(ae.errors&&ae.errors.length)return void D.push(ae);if(Ye)return we.onStart(()=>If(Ne,ae.fromStyles)),we.onDestroy(()=>hc(Ne,ae.toStyles)),void r.push(we);if(J.isFallbackTransition)return we.onStart(()=>If(Ne,ae.fromStyles)),we.onDestroy(()=>hc(Ne,ae.toStyles)),void r.push(we);const Oe=[];ae.timelines.forEach(Fe=>{Fe.stretchStartingKeyframe=!0,this.disabledNodes.has(Fe.element)||Oe.push(Fe)}),ae.timelines=Oe,n.append(Ne,ae.timelines),o.push({instruction:ae,player:we,element:Ne}),ae.queriedElements.forEach(Fe=>sa(a,Fe,[]).push(we)),ae.preStyleProps.forEach((Fe,bt)=>{if(Fe.size){let St=l.get(bt);St||l.set(bt,St=new Set),Fe.forEach((Mt,Sn)=>St.add(Sn))}}),ae.postStyleProps.forEach((Fe,bt)=>{let St=c.get(bt);St||c.set(bt,St=new Set),Fe.forEach((Mt,Sn)=>St.add(Sn))})});if(D.length){const q=[];D.forEach(re=>{q.push(function Rge(i,t){return new pe(3505,!1)}())}),F.forEach(re=>re.destroy()),this.reportError(q)}const k=new Map,B=new Map;o.forEach(q=>{const re=q.element;n.has(re)&&(B.set(re,re),this._beforeAnimationBuild(q.player.namespaceId,q.instruction,k))}),r.forEach(q=>{const re=q.element;this._getPreviousPlayers(re,!1,q.namespaceId,q.triggerName,null).forEach(we=>{sa(k,re,[]).push(we),we.destroy()})});const T=v.filter(q=>J$(q,l,c)),A=new Map;K$(A,this.driver,M,c,Xc).forEach(q=>{J$(q,l,c)&&T.push(q)});const ie=new Map;m.forEach((q,re)=>{K$(ie,this.driver,new Set(q),l,rR)}),T.forEach(q=>{const re=A.get(q),J=ie.get(q);A.set(q,new Map([...Array.from(re?.entries()??[]),...Array.from(J?.entries()??[])]))});const ne=[],se=[],ge={};o.forEach(q=>{const{element:re,player:J,instruction:we}=q;if(n.has(re)){if(d.has(re))return J.onDestroy(()=>hc(re,we.toStyles)),J.disabled=!0,J.overrideTotalTime(we.totalTime),void r.push(J);let Ne=ge;if(B.size>1){let It=re;const en=[];for(;It=It.parentNode;){const ae=B.get(It);if(ae){Ne=ae;break}en.push(It)}en.forEach(ae=>B.set(ae,Ne))}const Ye=this._buildAnimation(J.namespaceId,we,k,s,ie,A);if(J.setRealPlayer(Ye),Ne===ge)ne.push(J);else{const It=this.playersByElement.get(Ne);It&&It.length&&(J.parentPlayer=Nu(It)),r.push(J)}}else If(re,we.fromStyles),J.onDestroy(()=>hc(re,we.toStyles)),se.push(J),d.has(re)&&r.push(J)}),se.forEach(q=>{const re=s.get(q.element);if(re&&re.length){const J=Nu(re);q.setRealPlayer(J)}}),r.forEach(q=>{q.parentPlayer?q.syncPlayerEvents(q.parentPlayer):q.destroy()});for(let q=0;q!Ye.destroyed);Ne.length?O_e(this,re,Ne):this.processLeaveNode(re)}return v.length=0,ne.forEach(q=>{this.players.push(q),q.onDone(()=>{q.destroy();const re=this.players.indexOf(q);this.players.splice(re,1)}),q.play()}),ne}elementContainsData(t,e){let n=!1;const r=e[Ua];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==o0;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,d=c!==s,h=sa(n,c,[]);this._getPreviousPlayers(c,d,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=[],d=new Set,h=new Set,p=e.timelines.map(g=>{const b=g.element;d.add(b);const v=b[Ua];if(v&&v.removedBeforeQueried)return new tb(g.duration,g.delay);const y=b!==l,M=function F_e(i){const t=[];return Q$(i,t),t}((n.get(b)||A_e).map(k=>k.getRealPlayer())).filter(k=>!!k.element&&k.element===b),x=s.get(b),C=o.get(b),F=C$(0,this._normalizer,0,g.keyframes,x,C),D=this._buildPlayer(g,F,M);if(g.subTimeline&&r&&h.add(b),y){const k=new $O(t,a,b);k.setRealPlayer(D),c.push(k)}return D});c.forEach(g=>{sa(this.playersByQueriedElement,g.element,[]).push(g),g.onDone(()=>function R_e(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))}),d.forEach(g=>Va(g,P$));const m=Nu(p);return m.onDestroy(()=>{d.forEach(g=>Yg(g,P$)),hc(l,e.toStyles)}),h.forEach(g=>{sa(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 tb(t.duration,t.delay)}}class $O{constructor(t,e,n){this.namespaceId=t,this.triggerName=e,this.element=n,this._player=new tb,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=>MO(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){sa(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 gE(i){return i&&1===i.nodeType}function X$(i,t){const e=i.style.display;return i.style.display=t??"none",e}function K$(i,t,e,n,r){const s=[];e.forEach(l=>s.push(X$(l)));const o=[];n.forEach((l,c)=>{const d=new Map;l.forEach(h=>{const p=t.computeStyle(c,h,r);d.set(h,p),(!p||0==p.length)&&(c[Ua]=D_e,o.push(c))}),i.set(c,d)});let a=0;return e.forEach(l=>X$(l,s[a++])),o}function Z$(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 Va(i,t){i.classList?.add(t)}function Yg(i,t){i.classList?.remove(t)}function O_e(i,t,e){Nu(e).onDone(()=>i.processLeaveNode(t))}function Q$(i,t){for(let e=0;er.add(s)):t.set(i,n),e.delete(i),!0}class _E{constructor(t,e,n){this.bodyNode=t,this._driver=e,this._normalizer=n,this._triggerCache={},this.onRemovalComplete=(r,s)=>{},this._transitionEngine=new I_e(t,e,n),this._timelineEngine=new w_e(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=[],d=OO(this._driver,s,l,c);if(l.length)throw function bge(i,t){return new pe(3404,!1)}();a=function v_e(i,t,e){return new y_e(i,t,e)}(r,d,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]=S$(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]=S$(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 B_e=(()=>{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&&hc(this._element,this._startStyles,this._initialStyles),this._state=1)}finish(){this.start(),this._state<2&&(hc(this._element,this._initialStyles),this._endStyles&&(hc(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),hc(this._element,this._initialStyles),this._state=3)}}return i.initialStylesByElement=new WeakMap,i})();function WO(i){let t=null;return i.forEach((e,n)=>{(function U_e(i){return"display"===i||"position"===i})(n)&&(t=t||new Map,t.set(n,e))}),t}class e8{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:U$(this.element,r))}),this.currentSnapshot=t}triggerCallback(t){const e="start"===t?this._onStartFns:this._onDoneFns;e.forEach(n=>n()),e.length=0}}class V_e{validateStyleProperty(t){return!0}validateAnimatableStyleProperty(t){return!0}matchesElement(t,e){return!1}containsElement(t,e){return T$(t,e)}getParentElement(t){return AO(t)}query(t,e,n){return I$(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,d=o.filter(m=>m instanceof e8);(function $ge(i,t){return 0===i||0===t})(n,r)&&d.forEach(m=>{m.currentSnapshot.forEach((g,b)=>c.set(b,g))});let h=function Vge(i){return i.length?i[0]instanceof Map?i:i.map(t=>O$(t)):[]}(e).map(m=>Bu(m));h=function Wge(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,U$(i,a)))}}return t}(t,h,c);const p=function N_e(i,t){let e=null,n=null;return Array.isArray(t)&&t.length?(e=WO(t[0]),t.length>1&&(n=WO(t[t.length-1]))):t instanceof Map&&(e=WO(t)),e||n?new B_e(i,e,n):null}(t,h);return new e8(t,h,l,p)}}let z_e=(()=>{class i extends tV{constructor(e,n){super(),this._nextAnimationId=0,this._renderer=e.createRenderer(n.body,{id:"0",encapsulation:Xs.None,styles:[],data:{animation:[]}})}build(e){const n=this._nextAnimationId.toString();this._nextAnimationId++;const r=Array.isArray(e)?iV(e):e;return t8(this._renderer,null,n,"register",[r]),new H_e(n,this._renderer)}}return i.\u0275fac=function(e){return new(e||i)(ee(Gl),ee(jt))},i.\u0275prov=ke({token:i,factory:i.\u0275fac}),i})();class H_e extends LQ{constructor(t,e){super(),this._id=t,this._renderer=e}create(t,e){return new G_e(this._id,t,e||{},this._renderer)}}class G_e{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 t8(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 t8(i,t,e,n,r){return i.setProperty(t,`@@${e}:${n}`,r)}const n8="@.disabled";let $_e=(()=>{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 d=this._rendererCache.get(s);return d||(d=new i8("",s,this.engine,()=>this._rendererCache.delete(s)),this._rendererCache.set(s,d)),d}const o=n.id,a=n.id+"-"+this._currentId;this._currentId++,this.engine.register(a,e);const l=d=>{Array.isArray(d)?d.forEach(l):this.engine.registerTrigger(o,a,e,d.name,d)};return n.data.animation.forEach(l),new W_e(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)(ee(Gl),ee(_E),ee(ft))},i.\u0275prov=ke({token:i,factory:i.\u0275fac}),i})();class i8{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==n8?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 W_e extends i8{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==n8?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 j_e(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 Y_e(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 r8=[{provide:tV,useClass:z_e},{provide:UO,useFactory:function X_e(){return new p_e}},{provide:_E,useClass:(()=>{class i extends _E{constructor(e,n,r,s){super(e.body,n,r)}ngOnDestroy(){this.flush()}}return i.\u0275fac=function(e){return new(e||i)(ee(jt),ee(DO),ee(UO),ee(dm))},i.\u0275prov=ke({token:i,factory:i.\u0275fac}),i})()},{provide:Gl,useFactory:function K_e(i,t,e){return new $_e(i,t,e)},deps:[aM,_E,ft]}],jO=[{provide:DO,useFactory:()=>new V_e},{provide:Rr,useValue:"BrowserAnimations"},...r8],s8=[{provide:DO,useClass:R$},{provide:Rr,useValue:"NoopAnimations"},...r8];let Z_e=(()=>{class i{static withConfig(e){return{ngModule:i,providers:e.disableAnimations?s8:jO}}}return i.\u0275fac=function(e){return new(e||i)},i.\u0275mod=nn({type:i}),i.\u0275inj=Kt({providers:jO,imports:[FB]}),i})();const o8=new me("CdkAccordion");let Q_e=0,J_e=(()=>{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=Zt.EMPTY,this.closed=new We,this.opened=new We,this.destroyed=new We,this.expandedChange=new We,this.id="cdk-accordion-child-"+Q_e++,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)(E(o8,12),E(Zn),E(GR))},i.\u0275dir=ve({type:i,selectors:[["cdk-accordion-item"],["","cdkAccordionItem",""]],inputs:{expanded:"expanded",disabled:"disabled"},outputs:{closed:"closed",opened:"opened",destroyed:"destroyed",expandedChange:"expandedChange"},exportAs:["cdkAccordionItem"],features:[Dn([{provide:o8,useValue:void 0}])]}),i})(),eve=(()=>{class i{}return i.\u0275fac=function(e){return new(e||i)},i.\u0275mod=nn({type:i}),i.\u0275inj=Kt({}),i})();const tve=["body"];function nve(i,t){}const ive=[[["mat-expansion-panel-header"]],"*",[["mat-action-row"]]],rve=["mat-expansion-panel-header","*","mat-action-row"];function sve(i,t){1&i&&De(0,"span",2),2&i&&U("@indicatorRotate",he()._getExpandedState())}const ove=[[["mat-panel-title"]],[["mat-panel-description"]],"*"],ave=["mat-panel-title","mat-panel-description","*"],a8=new me("MAT_ACCORDION"),l8="225ms cubic-bezier(0.4,0.0,0.2,1)",c8={indicatorRotate:ka("indicatorRotate",[Ps("collapsed, void",si({transform:"rotate(0deg)"})),Ps("expanded",si({transform:"rotate(180deg)"})),Pr("expanded <=> collapsed, void => collapsed",jr(l8))]),bodyExpansion:ka("bodyExpansion",[Ps("collapsed, void",si({height:"0px",visibility:"hidden"})),Ps("expanded",si({height:"*",visibility:"visible"})),Pr("expanded <=> collapsed, void => collapsed",jr(l8))])},d8=new me("MAT_EXPANSION_PANEL");let lve=(()=>{class i{constructor(e,n){this._template=e,this._expansionPanel=n}}return i.\u0275fac=function(e){return new(e||i)(E(Co),E(d8,8))},i.\u0275dir=ve({type:i,selectors:[["ng-template","matExpansionPanelContent",""]]}),i})(),cve=0;const u8=new me("MAT_EXPANSION_PANEL_DEFAULT_OPTIONS");let h8=(()=>{class i extends J_e{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 We,this.afterCollapse=new We,this._inputChanges=new Re,this._headerId="mat-expansion-panel-header-"+cve++,this._bodyAnimationDone=new Re,this.accordion=e,this._document=o,this._bodyAnimationDone.pipe(Zl((c,d)=>c.fromState===d.fromState&&c.toState===d.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(Do(null),gn(()=>this.expanded&&!this._portal),Pi(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)(E(a8,12),E(Zn),E(GR),E(Wr),E(jt),E(Rr,8),E(u8,8))},i.\u0275cmp=ot({type:i,selectors:[["mat-expansion-panel"]],contentQueries:function(e,n,r){if(1&e&&$i(r,lve,5),2&e){let s;Et(s=At())&&(n._lazyContent=s.first)}},viewQuery:function(e,n){if(1&e&&Wn(tve,5),2&e){let r;Et(r=At())&&(n._body=r.first)}},hostAttrs:[1,"mat-expansion-panel"],hostVars:6,hostBindings:function(e,n){2&e&&un("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:[Dn([{provide:a8,useValue:void 0},{provide:d8,useExisting:i}]),lt,bi],ngContentSelectors:rve,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&&(sr(ive),Wt(0),W(1,"div",0,1),Ue("@bodyExpansion.done",function(s){return n._bodyAnimationDone.next(s)}),W(3,"div",2),Wt(4,1),fe(5,nve,0,0,"ng-template",3),j(),Wt(6,2),j()),2&e&&(G(1),U("@bodyExpansion",n._getExpandedState())("id",n.id),Dt("aria-labelledby",n._headerId),G(4),U("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:[c8.bodyExpansion]},changeDetection:0}),i})();class dve{}const uve=JI(dve);let hve=(()=>{class i extends uve{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=Zt.EMPTY;const c=e.accordion?e.accordion._stateChanges.pipe(gn(d=>!(!d.hideToggle&&!d.togglePosition))):mo;this.tabIndex=parseInt(l||"")||0,this._parentChangeSubscription=Mr(e.opened,e.closed,c,e._inputChanges.pipe(gn(d=>!!(d.hideToggle||d.disabled||d.togglePosition)))).subscribe(()=>this._changeDetectorRef.markForCheck()),e.closed.pipe(gn(()=>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:Ko(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)(E(h8,1),E(mt),E(qc),E(Zn),E(u8,8),E(Rr,8),ba("tabindex"))},i.\u0275cmp=ot({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&&Ue("click",function(){return n._toggle()})("keydown",function(s){return n._keydown(s)}),2&e&&(Dt("id",n.panel._headerId)("tabindex",n.tabIndex)("aria-controls",n._getPanelId())("aria-expanded",n._isExpanded())("aria-disabled",n.panel.disabled),Yo("height",n._getHeaderHeight()),un("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:[lt],ngContentSelectors:ave,decls:5,vars:3,consts:[[1,"mat-content"],["class","mat-expansion-indicator",4,"ngIf"],[1,"mat-expansion-indicator"]],template:function(e,n){1&e&&(sr(ove),W(0,"span",0),Wt(1),Wt(2,1),Wt(3,2),j(),fe(4,sve,1,1,"span",1)),2&e&&(un("mat-content-hide-toggle",!n._showToggle()),G(4),U("ngIf",n._showToggle()))},dependencies:[vi],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:[c8.indicatorRotate]},changeDetection:0}),i})(),fve=(()=>{class i{}return i.\u0275fac=function(e){return new(e||i)},i.\u0275dir=ve({type:i,selectors:[["mat-panel-description"]],hostAttrs:[1,"mat-expansion-panel-header-description"]}),i})(),pve=(()=>{class i{}return i.\u0275fac=function(e){return new(e||i)},i.\u0275dir=ve({type:i,selectors:[["mat-panel-title"]],hostAttrs:[1,"mat-expansion-panel-header-title"]}),i})(),mve=(()=>{class i{}return i.\u0275fac=function(e){return new(e||i)},i.\u0275mod=nn({type:i}),i.\u0275inj=Kt({imports:[Ao,Qn,eve,Nh]}),i})();function gve(i,t){if(1&i&&(W(0,"mat-option",19),Ve(1),j()),2&i){const e=t.$implicit;U("value",e),G(1),Zi(" ",e," ")}}function _ve(i,t){if(1&i){const e=di();W(0,"mat-form-field",16)(1,"mat-select",17),Ue("selectionChange",function(r){return an(e),zt(he(2)._changePageSize(r.value))}),fe(2,gve,2,2,"mat-option",18),j()()}if(2&i){const e=he(2);U("appearance",e._formFieldAppearance)("color",e.color),G(1),U("value",e.pageSize)("disabled",e.disabled)("aria-labelledby",e._pageSizeLabelId)("panelClass",e.selectConfig.panelClass||"")("disableOptionCentering",e.selectConfig.disableOptionCentering),G(1),U("ngForOf",e._displayedPageSizeOptions)}}function vve(i,t){if(1&i&&(W(0,"div",20),Ve(1),j()),2&i){const e=he(2);G(1),_i(e.pageSize)}}function yve(i,t){if(1&i&&(W(0,"div",12)(1,"div",13),Ve(2),j(),fe(3,_ve,3,8,"mat-form-field",14),fe(4,vve,2,1,"div",15),j()),2&i){const e=he();G(1),B1("id",e._pageSizeLabelId),G(1),Zi(" ",e._intl.itemsPerPageLabel," "),G(1),U("ngIf",e._displayedPageSizeOptions.length>1),G(1),U("ngIf",e._displayedPageSizeOptions.length<=1)}}function bve(i,t){if(1&i){const e=di();W(0,"button",21),Ue("click",function(){return an(e),zt(he().firstPage())}),Ri(),W(1,"svg",7),De(2,"path",22),j()()}if(2&i){const e=he();U("matTooltip",e._intl.firstPageLabel)("matTooltipDisabled",e._previousButtonsDisabled())("matTooltipPosition","above")("disabled",e._previousButtonsDisabled()),Dt("aria-label",e._intl.firstPageLabel)}}function xve(i,t){if(1&i){const e=di();Ri(),_a(),W(0,"button",23),Ue("click",function(){return an(e),zt(he().lastPage())}),Ri(),W(1,"svg",7),De(2,"path",24),j()()}if(2&i){const e=he();U("matTooltip",e._intl.lastPageLabel)("matTooltipDisabled",e._nextButtonsDisabled())("matTooltipPosition","above")("disabled",e._nextButtonsDisabled()),Dt("aria-label",e._intl.lastPageLabel)}}let yE=(()=>{class i{constructor(){this.changes=new Re,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=ke({token:i,factory:i.\u0275fac,providedIn:"root"}),i})();const Mve={provide:yE,deps:[[new Ss,new wa,yE]],useFactory:function wve(i){return i||new yE}},Sve=new me("MAT_PAGINATOR_DEFAULT_OPTIONS"),Eve=jM(CQ(class{}));let Ave=(()=>{class i extends Eve{get pageIndex(){return this._pageIndex}set pageIndex(e){this._pageIndex=Math.max(ks(e),0),this._changeDetectorRef.markForCheck()}get length(){return this._length}set length(e){this._length=ks(e),this._changeDetectorRef.markForCheck()}get pageSize(){return this._pageSize}set pageSize(e){this._pageSize=Math.max(ks(e),0),this._updateDisplayedPageSizeOptions()}get pageSizeOptions(){return this._pageSizeOptions}set pageSizeOptions(e){this._pageSizeOptions=(e||[]).map(n=>ks(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 We,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){wo()},i.\u0275dir=ve({type:i,inputs:{color:"color",pageIndex:"pageIndex",length:"length",pageSize:"pageSize",pageSizeOptions:"pageSizeOptions",hidePageSize:"hidePageSize",showFirstLastButtons:"showFirstLastButtons",selectConfig:"selectConfig"},outputs:{page:"page"},features:[lt]}),i})(),Dve=0,Tve=(()=>{class i extends Ave{constructor(e,n,r){super(e,n,r),this._pageSizeLabelId="mat-paginator-page-size-label-"+Dve++,this._formFieldAppearance=r?.formFieldAppearance||"outline"}}return i.\u0275fac=function(e){return new(e||i)(E(yE),E(Zn),E(Sve,8))},i.\u0275cmp=ot({type:i,selectors:[["mat-paginator"]],hostAttrs:["role","group",1,"mat-mdc-paginator"],inputs:{disabled:"disabled"},exportAs:["matPaginator"],features:[lt],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&&(W(0,"div",0)(1,"div",1),fe(2,yve,5,4,"div",2),W(3,"div",3)(4,"div",4),Ve(5),j(),fe(6,bve,3,5,"button",5),W(7,"button",6),Ue("click",function(){return n.previousPage()}),Ri(),W(8,"svg",7),De(9,"path",8),j()(),_a(),W(10,"button",9),Ue("click",function(){return n.nextPage()}),Ri(),W(11,"svg",7),De(12,"path",10),j()(),fe(13,xve,3,5,"button",11),j()()()),2&e&&(G(2),U("ngIf",!n.hidePageSize),G(3),Zi(" ",n._intl.getRangeLabel(n.pageIndex,n.pageSize,n.length)," "),G(1),U("ngIf",n.showFirstLastButtons),G(1),U("matTooltip",n._intl.previousPageLabel)("matTooltipDisabled",n._previousButtonsDisabled())("matTooltipPosition","above")("disabled",n._previousButtonsDisabled()),Dt("aria-label",n._intl.previousPageLabel),G(3),U("matTooltip",n._intl.nextPageLabel)("matTooltipDisabled",n._nextButtonsDisabled())("matTooltipPosition","above")("disabled",n._nextButtonsDisabled()),Dt("aria-label",n._intl.nextPageLabel),G(3),U("ngIf",n.showFirstLastButtons))},dependencies:[Eo,vi,XM,vl,fb,Nm,Os],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})(),Ive=(()=>{class i{}return i.\u0275fac=function(e){return new(e||i)},i.\u0275mod=nn({type:i}),i.\u0275inj=Kt({providers:[Mve],imports:[Ao,KM,VH,FV]}),i})(),Rve=(()=>{class i{}return i.\u0275fac=function(e){return new(e||i)},i.\u0275mod=nn({type:i,bootstrap:[Qme]}),i.\u0275inj=Kt({providers:[Ql,NH,{provide:PH,useValue:Vie}],imports:[FB,wK,Z_e,eH,SJ,gC,pH,mve,DV,RV,FV,KM,ez,Ive,sse,_H,VH,_V,bpe,xme,tH,tR,Yie]}),i})();th(Jl,[Eo,vi,Os,t0,nE],[pl]),th(zR,[hm,Eo,vi,xy,tc,Kc,vl,h8,hve,pve,fve,Os,Tve,fb,Nm,t0],[]),th(xC,[Eo,vi,MC,wC,gH,t0],[]),th(_$,[Eo,vi,Io,Os,fb,Nm,t0,nE],[pl]),L7().bootstrapModule(Rve).catch(i=>console.error(i))},489:function(No,Gs,ps){var cn;No=ps.nmd(No),function(){var V,Kr=200,Un="Expected a function",Ha="__lodash_hash_undefined__",Mi="__lodash_placeholder__",Ci=1,ms=2,Ws=4,js=1,Bo=2,On=1,dr=2,pc=4,ca=8,Dl=16,da=32,Tl=64,Ga=128,ua=256,pd=512,ME=800,Kg=16,In=1/0,Wa=9007199254740991,SE=17976931348623157e292,Pf=NaN,ha=4294967295,Re=ha-1,l0=ha>>>1,c0=[["ary",Ga],["bind",On],["bindKey",dr],["curry",ca],["curryRight",Dl],["flip",pd],["partial",da],["partialRight",Tl],["rearg",ua]],ti="[object Arguments]",Yn="[object Array]",EE="[object AsyncFunction]",et="[object Boolean]",mc="[object Date]",AE="[object DOMException]",md="[object Error]",Of="[object Function]",d0="[object GeneratorFunction]",Uo="[object Map]",Vu="[object Number]",DE="[object Null]",ja="[object Object]",u0="[object Promise]",TE="[object Proxy]",gd="[object RegExp]",Vo="[object Set]",gc="[object String]",Ff="[object Symbol]",Zg="[object Undefined]",_d="[object WeakMap]",zu="[object ArrayBuffer]",vd="[object DataView]",fa="[object Float32Array]",Lf="[object Float64Array]",Qg="[object Int8Array]",Nf="[object Int16Array]",Jg="[object Int32Array]",e_="[object Uint8Array]",Hu="[object Uint8ClampedArray]",t_="[object Uint16Array]",n_="[object Uint32Array]",RE=/\b__p \+= '';/g,kE=/\b(__p \+=) '' \+/g,PE=/(__e\(.*?\)|\b__t\)) \+\n'';/g,h0=/&(?:amp|lt|gt|quot|#39);/g,f0=/[&<>"']/g,OE=RegExp(h0.source),FE=RegExp(f0.source),ZO=/<%-([\s\S]+?)%>/g,i_=/<%([\s\S]+?)%>/g,r_=/<%=([\s\S]+?)%>/g,p0=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,m0=/^\w*$/,g0=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,s_=/[\\^$.*+?()[\]{}|]/g,_0=RegExp(s_.source),Bf=/^\s+/,v0=/\s/,y0=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,wr=/\{\n\/\* \[wrapped with (.+)\] \*/,LE=/,? & /,NE=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,BE=/[()=,{}\[\]\/\s]/,UE=/\\(\\)?/g,b0=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,x0=/\w*$/,VE=/^[-+]0x[0-9a-f]+$/i,Ya=/^0b[01]+$/i,zE=/^\[object .+?Constructor\]$/,ir=/^0o[0-7]+$/i,yd=/^(?:0|[1-9]\d*)$/,mo=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,o_=/($^)/,HE=/['\n\r\u2028\u2029\\]/g,Gu="\\ud800-\\udfff",M0="\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff",l_="\\u2700-\\u27bf",c_="a-z\\xdf-\\xf6\\xf8-\\xff",d_="A-Z\\xc0-\\xd6\\xd8-\\xde",C0="\\ufe0e\\ufe0f",S0="\\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",Mr="["+Gu+"]",Uf="["+S0+"]",bd="["+M0+"]",li="\\d+",u_="["+l_+"]",pi="["+c_+"]",Vf="[^"+Gu+S0+li+l_+c_+d_+"]",h_="\\ud83c[\\udffb-\\udfff]",Pt="[^"+Gu+"]",Wu="(?:\\ud83c[\\udde6-\\uddff]){2}",ju="[\\ud800-\\udbff][\\udc00-\\udfff]",Yu="["+d_+"]",pe="(?:"+pi+"|"+Vf+")",zf="(?:"+Yu+"|"+Vf+")",Qt="(?:['\u2019](?:d|ll|m|re|s|t|ve))?",qn="(?:['\u2019](?:D|LL|M|RE|S|T|VE))?",E0="(?:"+bd+"|"+h_+")?",YE="["+C0+"]?",XE=YE+E0+"(?:\\u200d(?:"+[Pt,Wu,ju].join("|")+")"+YE+E0+")*",KE="(?:"+[u_,Wu,ju].join("|")+")"+XE,QO="(?:"+[Pt+bd+"?",bd,Wu,ju,Mr].join("|")+")",Il=RegExp("['\u2019]","g"),JO=RegExp(bd,"g"),A0=RegExp(h_+"(?="+h_+")|"+QO+XE,"g"),eF=RegExp([Yu+"?"+pi+"+"+Qt+"(?="+[Uf,Yu,"$"].join("|")+")",zf+"+"+qn+"(?="+[Uf,Yu+pe,"$"].join("|")+")",Yu+"?"+pe+"+"+Qt,Yu+"+"+qn,"\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])","\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",li,KE].join("|"),"g"),tF=RegExp("[\\u200d"+Gu+M0+C0+"]"),ZE=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,nF=["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"],QE=-1,Si={};Si[fa]=Si[Lf]=Si[Qg]=Si[Nf]=Si[Jg]=Si[e_]=Si[Hu]=Si[t_]=Si[n_]=!0,Si[ti]=Si[Yn]=Si[zu]=Si[et]=Si[vd]=Si[mc]=Si[md]=Si[Of]=Si[Uo]=Si[Vu]=Si[ja]=Si[gd]=Si[Vo]=Si[gc]=Si[_d]=!1;var En={};En[ti]=En[Yn]=En[zu]=En[vd]=En[et]=En[mc]=En[fa]=En[Lf]=En[Qg]=En[Nf]=En[Jg]=En[Uo]=En[Vu]=En[ja]=En[gd]=En[Vo]=En[gc]=En[Ff]=En[e_]=En[Hu]=En[t_]=En[n_]=!0,En[md]=En[Of]=En[_d]=!1;var sF={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},ke=parseFloat,oF=parseInt,Kt="object"==typeof global&&global&&global.Object===Object&&global,Gf="object"==typeof self&&self&&self.Object===Object&&self,Cr=Kt||Gf||Function("return this")(),f_=Gs&&!Gs.nodeType&&Gs,Xu=f_&&No&&!No.nodeType&&No,p_=Xu&&Xu.exports===f_,xd=p_&&Kt.process,gs=function(){try{return Xu&&Xu.require&&Xu.require("util").types||xd&&xd.binding&&xd.binding("util")}catch{}}(),m_=gs&&gs.isArrayBuffer,D0=gs&&gs.isDate,Ot=gs&&gs.isMap,$f=gs&&gs.isRegExp,T0=gs&&gs.isSet,qs=gs&&gs.isTypedArray;function _s(X,ue,oe){switch(oe.length){case 0:return X.call(ue);case 1:return X.call(ue,oe[0]);case 2:return X.call(ue,oe[0],oe[1]);case 3:return X.call(ue,oe[0],oe[1],oe[2])}return X.apply(ue,oe)}function aF(X,ue,oe,Be){for(var $t=-1,Vn=null==X?0:X.length;++$t-1}function Ku(X,ue,oe){for(var Be=-1,$t=null==X?0:X.length;++Be<$t;)if(oe(ue,X[Be]))return!0;return!1}function mi(X,ue){for(var oe=-1,Be=null==X?0:X.length,$t=Array(Be);++oe-1;);return oe}function pa(X,ue){for(var oe=X.length;oe--&&Ft(ue,X[oe],0)>-1;);return oe}var nA=v_({\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"}),ot=v_({"&":"&","<":"<",">":">",'"':""","'":"'"});function th(X){return"\\"+sF[X]}function Cd(X){return tF.test(X)}function qf(X){var ue=-1,oe=Array(X.size);return X.forEach(function(Be,$t){oe[++ue]=[$t,Be]}),oe}function ve(X,ue){return function(oe){return X(ue(oe))}}function Hi(X,ue){for(var oe=-1,Be=X.length,$t=0,Vn=[];++oe",""":'"',"'":"'"}),ys=function X(ue){var u,oe=(ue=null==ue?Cr:ys.defaults(Cr.Object(),ue,ys.pick(Cr,nF))).Array,Be=ue.Date,$t=ue.Error,Vn=ue.Function,yt=ue.Math,oi=ue.Object,yc=ue.RegExp,R0=ue.String,Sr=ue.TypeError,rr=oe.prototype,zo=oi.prototype,Ks=ue["__core-js_shared__"],Pl=Vn.prototype.toString,ii=zo.hasOwnProperty,yi=0,sA=(u=/[^.]+$/.exec(Ks&&Ks.keys&&Ks.keys.IE_PROTO||""))?"Symbol(src)_1."+u:"",Ed=zo.toString,k0=Pl.call(oi),Kf=Cr._,Zf=yc("^"+Pl.call(ii).replace(s_,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),Za=p_?ue.Buffer:V,Bi=ue.Symbol,x_=ue.Uint8Array,bs=Za?Za.allocUnsafe:V,xs=ve(oi.getPrototypeOf,oi),Qf=oi.create,Ad=zo.propertyIsEnumerable,bc=rr.splice,vo=Bi?Bi.isConcatSpreadable:V,ih=Bi?Bi.iterator:V,Dd=Bi?Bi.toStringTag:V,Jf=function(){try{var u=Rc(oi,"defineProperty");return u({},"",{}),u}catch{}}(),oA=ue.clearTimeout!==Cr.clearTimeout&&ue.clearTimeout,cF=Be&&Be.now!==Cr.Date.now&&Be.now,dF=ue.setTimeout!==Cr.setTimeout&&ue.setTimeout,w_=yt.ceil,M_=yt.floor,P0=oi.getOwnPropertySymbols,uF=Za?Za.isBuffer:V,aA=ue.isFinite,hF=rr.join,fF=ve(oi.keys,oi),hr=yt.max,Zr=yt.min,pF=Be.now,O0=ue.parseInt,C_=yt.random,mF=rr.reverse,F0=Rc(ue,"DataView"),ep=Rc(ue,"Map"),Qa=Rc(ue,"Promise"),Td=Rc(ue,"Set"),bi=Rc(ue,"WeakMap"),Id=Rc(oi,"create"),tp=bi&&new bi,Rd={},L0=kc(F0),N0=kc(ep),lA=kc(Qa),S_=kc(Td),cA=kc(bi),Qr=Bi?Bi.prototype:V,kd=Qr?Qr.valueOf:V,E_=Qr?Qr.toString:V;function I(u){if(ki(u)&&!rn(u)&&!(u instanceof kn)){if(u instanceof Ei)return u;if(ii.call(u,"__wrapped__"))return ns(u)}return new Ei(u)}var Pd=function(){function u(){}return function(f){if(!wi(f))return{};if(Qf)return Qf(f);u.prototype=f;var _=new u;return u.prototype=V,_}}();function xc(){}function Ei(u,f){this.__wrapped__=u,this.__actions__=[],this.__chain__=!!f,this.__index__=0,this.__values__=V}function kn(u){this.__wrapped__=u,this.__actions__=[],this.__dir__=1,this.__filtered__=!1,this.__iteratees__=[],this.__takeCount__=ha,this.__views__=[]}function wc(u){var f=-1,_=null==u?0:u.length;for(this.clear();++f<_;){var w=u[f];this.set(w[0],w[1])}}function kt(u){var f=-1,_=null==u?0:u.length;for(this.clear();++f<_;){var w=u[f];this.set(w[0],w[1])}}function ma(u){var f=-1,_=null==u?0:u.length;for(this.clear();++f<_;){var w=u[f];this.set(w[0],w[1])}}function zt(u){var f=-1,_=null==u?0:u.length;for(this.__data__=new ma;++f<_;)this.add(u[f])}function Jr(u){var f=this.__data__=new kt(u);this.size=f.size}function I_(u,f){var _=rn(u),w=!_&&Fc(u),S=!_&&!w&&rl(u),P=!_&&!w&&!S&&Wo(u),H=_||w||S||P,Y=H?Xs(u.length,R0):[],Q=Y.length;for(var _e in u)(f||ii.call(u,_e))&&(!H||!("length"==_e||S&&("offset"==_e||"parent"==_e)||P&&("buffer"==_e||"byteLength"==_e||"byteOffset"==_e)||il(_e,Q)))&&Y.push(_e);return Y}function Vr(u){var f=u.length;return f?u[lh(0,f-1)]:V}function Ja(u,f){return Sp(Js(u),Ll(f,0,u.length))}function H0(u){return Sp(Js(u))}function Fl(u,f,_){(_!==V&&!$o(u[f],_)||_===V&&!(f in u))&&Ho(u,f,_)}function Zs(u,f,_){var w=u[f];(!ii.call(u,f)||!$o(w,_)||_===V&&!(f in u))&&Ho(u,f,_)}function ip(u,f){for(var _=u.length;_--;)if($o(u[_][0],f))return _;return-1}function G0(u,f,_,w){return el(u,function(S,P,H){f(w,S,_(S),H)}),w}function $0(u,f){return u&&ci(f,fr(f),u)}function Ho(u,f,_){"__proto__"==f&&Jf?Jf(u,f,{configurable:!0,enumerable:!0,value:_,writable:!0}):u[f]=_}function rh(u,f){for(var _=-1,w=f.length,S=oe(w),P=null==u;++_=f?u:f)),u}function Ms(u,f,_,w,S,P){var H,Y=f&Ci,Q=f&ms,_e=f&Ws;if(_&&(H=S?_(u,w,S,P):_(u)),H!==V)return H;if(!wi(u))return u;var ye=rn(u);if(ye){if(H=function hx(u){var f=u.length,_=new u.constructor(f);return f&&"string"==typeof u[0]&&ii.call(u,"index")&&(_.index=u.index,_.input=u.input),_}(u),!Y)return Js(u,H)}else{var be=zr(u),Xe=be==Of||be==d0;if(rl(u))return me(u,Y);if(be==ja||be==ti||Xe&&!S){if(H=Q||Xe?{}:PA(u),!Y)return Q?function hh(u,f){return ci(u,cx(u),f)}(u,function _A(u,f){return u&&ci(f,Ds(f),u)}(H,u)):function H_(u,f){return ci(u,Z_(u),f)}(u,$0(H,u))}else{if(!En[be])return S?u:{};H=function fx(u,f,_){var w=u.constructor;switch(f){case zu:return rx(u);case et:case mc:return new w(+u);case vd:return function xF(u,f){var _=f?rx(u.buffer):u.buffer;return new u.constructor(_,u.byteOffset,u.byteLength)}(u,_);case fa:case Lf:case Qg:case Nf:case Jg:case e_:case Hu:case t_:case n_:return AA(u,_);case Uo:return new w;case Vu:case gc:return new w(u);case gd:return function wF(u){var f=new u.constructor(u.source,x0.exec(u));return f.lastIndex=u.lastIndex,f}(u);case Vo:return new w;case Ff:return function MF(u){return kd?oi(kd.call(u)):{}}(u)}}(u,be,Y)}}P||(P=new Jr);var vt=P.get(u);if(vt)return vt;P.set(u,H),nw(u)?u.forEach(function(Vt){H.add(Ms(Vt,f,_,Vt,u,P))}):Tv(u)&&u.forEach(function(Vt,An){H.set(An,Ms(Vt,f,_,An,u,P))});var mn=ye?V:(_e?Q?q_:yp:Q?Ds:fr)(u);return Rn(mn||u,function(Vt,An){mn&&(Vt=u[An=Vt]),Zs(H,An,Ms(Vt,f,_,An,u,P))}),H}function R_(u,f,_){var w=_.length;if(null==u)return!w;for(u=oi(u);w--;){var S=_[w],H=u[S];if(H===V&&!(S in u)||!(0,f[S])(H))return!1}return!0}function rp(u,f,_){if("function"!=typeof u)throw new Sr(Un);return gh(function(){u.apply(V,_)},f)}function Fd(u,f,_,w){var S=-1,P=Rl,H=!0,Y=u.length,Q=[],_e=f.length;if(!Y)return Q;_&&(f=mi(f,Br(_))),w?(P=Ku,H=!1):f.length>=Kr&&(P=vc,H=!1,f=new zt(f));e:for(;++S-1},kt.prototype.set=function fA(u,f){var _=this.__data__,w=ip(_,u);return w<0?(++this.size,_.push([u,f])):_[w][1]=f,this},ma.prototype.clear=function pA(){this.size=0,this.__data__={hash:new wc,map:new(ep||kt),string:new wc}},ma.prototype.delete=function mA(u){var f=K_(this,u).delete(u);return this.size-=f?1:0,f},ma.prototype.get=function Se(u){return K_(this,u).get(u)},ma.prototype.has=function zn(u){return K_(this,u).has(u)},ma.prototype.set=function an(u,f){var _=K_(this,u),w=_.size;return _.set(u,f),this.size+=_.size==w?0:1,this},zt.prototype.add=zt.prototype.push=function Er(u){return this.__data__.set(u,Ha),this},zt.prototype.has=function z0(u){return this.__data__.has(u)},Jr.prototype.clear=function ga(){this.__data__=new kt,this.size=0},Jr.prototype.delete=function D_(u){var f=this.__data__,_=f.delete(u);return this.size=f.size,_},Jr.prototype.get=function T_(u){return this.__data__.get(u)},Jr.prototype.has=function gA(u){return this.__data__.has(u)},Jr.prototype.set=function _F(u,f){var _=this.__data__;if(_ instanceof kt){var w=_.__data__;if(!ep||w.length0&&_(Y)?f>1?Xn(Y,f-1,_,w,S):kl(S,Y):w||(S[S.length]=Y)}return S}var tl=G_(),Ai=G_(!0);function Ri(u,f){return u&&tl(u,f,fr)}function P_(u,f){return u&&Ai(u,f,fr)}function _a(u,f){return _c(f,function(_){return zl(u[_])})}function Mc(u,f){for(var _=0,w=(f=xa(f,u)).length;null!=u&&_f}function sp(u,f){return null!=u&&ii.call(u,f)}function op(u,f){return null!=u&&f in oi(u)}function ap(u,f,_){for(var w=_?Ku:Rl,S=u[0].length,P=u.length,H=P,Y=oe(P),Q=1/0,_e=[];H--;){var ye=u[H];H&&f&&(ye=mi(ye,Br(f))),Q=Zr(ye.length,Q),Y[H]=!_&&(f||S>=120&&ye.length>=120)?new zt(H&&ye):V}ye=u[0];var be=-1,Xe=Y[0];e:for(;++be=Y?Q:Q*("desc"==_[w]?-1:1)}return u.index-f.index}(P,H,_)})}function Q0(u,f,_){for(var w=-1,S=f.length,P={};++w-1;)Y!==u&&bc.call(Y,Q,1),bc.call(u,Q,1);return u}function ah(u,f){for(var _=u?f.length:0,w=_-1;_--;){var S=f[_];if(_==w||S!==P){var P=S;il(S)?bc.call(u,S,1):dh(u,S)}}return u}function lh(u,f){return u+M_(C_()*(f-u+1))}function ch(u,f){var _="";if(!u||f<1||f>Wa)return _;do{f%2&&(_+=u),(f=M_(f/2))&&(u+=u)}while(f);return _}function pn(u,f){return Mp(J_(u,f,is),u+"")}function SA(u){return Vr(Bc(u))}function ex(u,f){var _=Bc(u);return Sp(_,Ll(f,0,_.length))}function Vd(u,f,_,w){if(!wi(u))return u;for(var S=-1,P=(f=xa(f,u)).length,H=P-1,Y=u;null!=Y&&++SS?0:S+f),(_=_>S?S:_)<0&&(_+=S),S=f>_?0:_-f>>>0,f>>>=0;for(var P=oe(S);++w>>1,H=u[P];null!==H&&!As(H)&&(_?H<=f:H=Kr){var _e=f?null:j_(u);if(_e)return Hn(_e);H=!1,S=vc,Q=new zt}else Q=f?[]:Y;e:for(;++w=w?u:ts(u,f,_)}var ix=oA||function(u){return Cr.clearTimeout(u)};function me(u,f){if(f)return u.slice();var _=u.length,w=bs?bs(_):new u.constructor(_);return u.copy(w),w}function rx(u){var f=new u.constructor(u.byteLength);return new x_(f).set(new x_(u)),f}function AA(u,f){var _=f?rx(u.buffer):u.buffer;return new u.constructor(_,u.byteOffset,u.length)}function DA(u,f){if(u!==f){var _=u!==V,w=null===u,S=u==u,P=As(u),H=f!==V,Y=null===f,Q=f==f,_e=As(f);if(!Y&&!_e&&!P&&u>f||P&&H&&Q&&!Y&&!_e||w&&H&&Q||!_&&Q||!S)return 1;if(!w&&!P&&!_e&&u1?_[S-1]:V,H=S>2?_[2]:V;for(P=u.length>3&&"function"==typeof P?(S--,P):V,H&&Dr(_[0],_[1],H)&&(P=S<3?V:P,S=1),f=oi(f);++w-1?S[P?f[H]:H]:V}}function Cs(u){return bo(function(f){var _=f.length,w=_,S=Ei.prototype.thru;for(u&&f.reverse();w--;){var P=f[w];if("function"!=typeof P)throw new Sr(Un);if(S&&!H&&"wrapper"==nl(P))var H=new Ei([],!0)}for(w=H?w:_;++w<_;){var Y=nl(P=f[w]),Q="wrapper"==Y?X_(P):V;H=Q&&mh(Q[0])&&Q[1]==(Ga|ca|da|ua)&&!Q[4].length&&1==Q[9]?H[nl(Q[0])].apply(H,Q[3]):1==P.length&&mh(P)?H[Y]():H.thru(P)}return function(){var _e=arguments,ye=_e[0];if(H&&1==_e.length&&rn(ye))return H.plant(ye).value();for(var be=0,Xe=_?f[be].apply(this,_e):ye;++be<_;)Xe=f[be].call(this,Xe);return Xe}})}function Wd(u,f,_,w,S,P,H,Y,Q,_e){var ye=f&Ga,be=f&On,Xe=f&dr,vt=f&(ca|Dl),Ut=f&pd,mn=Xe?V:mp(u);return function Vt(){for(var An=arguments.length,Ln=oe(An),rs=An;rs--;)Ln[rs]=arguments[rs];if(vt)var ss=Ma(Vt),ro=function eh(X,ue){for(var oe=X.length,Be=0;oe--;)X[oe]===ue&&++Be;return Be}(Ln,ss);if(w&&(Ln=Hd(Ln,w,S,vt)),P&&(Ln=TA(Ln,P,H,vt)),An-=ro,vt&&An<_e){var Di=Hi(Ln,ss);return ox(u,f,Wd,Vt.placeholder,_,Ln,Di,Y,Q,_e-An)}var Ts=be?_:this,Mo=Xe?Ts[u]:u;return An=Ln.length,Y?Ln=function Es(u,f){for(var _=u.length,w=Zr(f.length,_),S=Js(u);w--;){var P=f[w];u[w]=il(P,_)?S[P]:V}return u}(Ln,Y):Ut&&An>1&&Ln.reverse(),ye&&QY))return!1;var _e=P.get(u),ye=P.get(f);if(_e&&ye)return _e==f&&ye==u;var be=-1,Xe=!0,vt=_&Bo?new zt:V;for(P.set(u,f),P.set(f,u);++be-1&&u%1==0&&u1?"& ":"")+f[w],f=f.join(_>2?", ":" "),u.replace(y0,"{\n/* [wrapped with "+f+"] */\n")}(w,function BA(u,f){return Rn(c0,function(_){var w="_."+_[0];f&_[1]&&!Rl(u,w)&&u.push(w)}),u.sort()}(function dx(u){var f=u.match(wr);return f?f[1].split(LE):[]}(w),_)))}function vx(u){var f=0,_=0;return function(){var w=pF(),S=Kg-(w-_);if(_=w,S>0){if(++f>=ME)return arguments[0]}else f=0;return u.apply(V,arguments)}}function Sp(u,f){var _=-1,w=u.length,S=w-1;for(f=f===V?w:f;++_1?u[f-1]:V;return _="function"==typeof _?(u.pop(),_):V,yh(u,_)});function zx(u){var f=I(u);return f.__chain__=!0,f}function Ip(u,f){return f(u)}var Hx=bo(function(u){var f=u.length,_=f?u[0]:0,w=this.__wrapped__,S=function(P){return rh(P,u)};return!(f>1||this.__actions__.length)&&w instanceof kn&&il(_)?((w=w.slice(_,+_+(f?1:0))).__actions__.push({func:Ip,args:[S],thisArg:V}),new Ei(w,this.__chain__).thru(function(P){return f&&!P.length&&P.push(V),P})):this.thru(S)}),rD=fp(function(u,f,_){ii.call(u,_)?++u[_]:Ho(u,_,1)}),$x=RA(Sx),kp=RA(rv);function bv(u,f){return(rn(u)?Rn:el)(u,Lt(f,3))}function Vl(u,f){return(rn(u)?lF:k_)(u,Lt(f,3))}var oD=fp(function(u,f,_){ii.call(u,_)?u[_].push(f):Ho(u,_,[f])}),lD=pn(function(u,f,_){var w=-1,S="function"==typeof f,P=to(u)?oe(u.length):[];return el(u,function(H){P[++w]=S?_s(f,H,_):va(H,f,_)}),P}),cD=fp(function(u,f,_){Ho(u,_,f)});function Pp(u,f){return(rn(u)?mi:sh)(u,Lt(f,3))}var Ca=fp(function(u,f,_){u[_?0:1].push(f)},function(){return[[],[]]}),_D=pn(function(u,f){if(null==u)return[];var _=f.length;return _>1&&Dr(u,f[0],f[1])?f=[]:_>2&&Dr(f[0],f[1],f[2])&&(f=[f[0]]),B_(u,Xn(f,1),[])}),Op=cF||function(){return Cr.Date.now()};function xh(u,f,_){return f=_?V:f,yo(u,Ga,V,V,V,V,f=u&&null==f?u.length:f)}function Sa(u,f){var _;if("function"!=typeof f)throw new Sr(Un);return u=dn(u),function(){return--u>0&&(_=f.apply(this,arguments)),u<=1&&(f=V),_}}var Oc=pn(function(u,f,_){var w=On;if(_.length){var S=Hi(_,Ma(Oc));w|=da}return yo(u,w,f,_,S)}),xv=pn(function(u,f,_){var w=On|dr;if(_.length){var S=Hi(_,Ma(xv));w|=da}return yo(f,w,u,_,S)});function yD(u,f,_){var w,S,P,H,Y,Q,_e=0,ye=!1,be=!1,Xe=!0;if("function"!=typeof u)throw new Sr(Un);function vt(Di){var Ts=w,Mo=S;return w=S=V,_e=Di,H=u.apply(Mo,Ts)}function Vt(Di){var Ts=Di-Q;return Q===V||Ts>=f||Ts<0||be&&Di-_e>=P}function An(){var Di=Op();if(Vt(Di))return Ln(Di);Y=gh(An,function mn(Di){var I1=f-(Di-Q);return be?Zr(I1,P-(Di-_e)):I1}(Di))}function Ln(Di){return Y=V,Xe&&w?vt(Di):(w=S=V,H)}function ro(){var Di=Op(),Ts=Vt(Di);if(w=arguments,S=this,Q=Di,Ts){if(Y===V)return function Ut(Di){return _e=Di,Y=gh(An,f),ye?vt(Di):H}(Q);if(be)return ix(Y),Y=gh(An,f),vt(Q)}return Y===V&&(Y=gh(An,f)),H}return f=xo(f)||0,wi(_)&&(ye=!!_.leading,P=(be="maxWait"in _)?hr(xo(_.maxWait)||0,f):P,Xe="trailing"in _?!!_.trailing:Xe),ro.cancel=function rs(){Y!==V&&ix(Y),_e=0,w=Q=S=Y=V},ro.flush=function ss(){return Y===V?H:Ln(Op())},ro}var kF=pn(function(u,f){return rp(u,1,f)}),PF=pn(function(u,f,_){return rp(u,xo(f)||0,_)});function Yd(u,f){if("function"!=typeof u||null!=f&&"function"!=typeof f)throw new Sr(Un);var _=function(){var w=arguments,S=f?f.apply(this,w):w[0],P=_.cache;if(P.has(S))return P.get(S);var H=u.apply(this,w);return _.cache=P.set(S,H)||P,H};return _.cache=new(Yd.Cache||ma),_}function Sv(u){if("function"!=typeof u)throw new Sr(Un);return function(){var f=arguments;switch(f.length){case 0:return!u.call(this);case 1:return!u.call(this,f[0]);case 2:return!u.call(this,f[0],f[1]);case 3:return!u.call(this,f[0],f[1],f[2])}return!u.apply(this,f)}}Yd.Cache=ma;var qx=zd(function(u,f){var _=(f=1==f.length&&rn(f[0])?mi(f[0],Br(Lt())):mi(Xn(f,1),Br(Lt()))).length;return pn(function(w){for(var S=-1,P=Zr(w.length,_);++S=f}),Fc=Bd(function(){return arguments}())?Bd:function(u){return ki(u)&&ii.call(u,"callee")&&!Ad.call(u,"callee")},rn=oe.isArray,FF=m_?Br(m_):function xA(u){return ki(u)&&es(u)==zu};function to(u){return null!=u&&Vp(u.length)&&!zl(u)}function xi(u){return ki(u)&&to(u)}var rl=uF||Qd,Jx=D0?Br(D0):function vF(u){return ki(u)&&es(u)==mc};function Bp(u){if(!ki(u))return!1;var f=es(u);return f==md||f==AE||"string"==typeof u.message&&"string"==typeof u.name&&!no(u)}function zl(u){if(!wi(u))return!1;var f=es(u);return f==Of||f==d0||f==EE||f==TE}function Up(u){return"number"==typeof u&&u==dn(u)}function Vp(u){return"number"==typeof u&&u>-1&&u%1==0&&u<=Wa}function wi(u){var f=typeof u;return null!=u&&("object"==f||"function"==f)}function ki(u){return null!=u&&"object"==typeof u}var Tv=Ot?Br(Ot):function wA(u){return ki(u)&&zr(u)==Uo};function wh(u){return"number"==typeof u||ki(u)&&es(u)==Vu}function no(u){if(!ki(u)||es(u)!=ja)return!1;var f=xs(u);if(null===f)return!0;var _=ii.call(f,"constructor")&&f.constructor;return"function"==typeof _&&_ instanceof _&&Pl.call(_)==k0}var Hp=$f?Br($f):function bF(u){return ki(u)&&es(u)==gd},nw=T0?Br(T0):function L_(u){return ki(u)&&zr(u)==Vo};function Gp(u){return"string"==typeof u||!rn(u)&&ki(u)&&es(u)==gc}function As(u){return"symbol"==typeof u||ki(u)&&es(u)==Ff}var Wo=qs?Br(qs):function q0(u){return ki(u)&&Vp(u.length)&&!!Si[es(u)]},Pv=vp(lp),PD=vp(function(u,f){return u<=f});function Ov(u){if(!u)return[];if(to(u))return Gp(u)?_o(u):Js(u);if(ih&&u[ih])return function rA(X){for(var ue,oe=[];!(ue=X.next()).done;)oe.push(ue.value);return oe}(u[ih]());var f=zr(u);return(f==Uo?qf:f==Vo?Hn:Bc)(u)}function sl(u){return u?(u=xo(u))===In||u===-In?(u<0?-1:1)*SE:u==u?u:0:0===u?u:0}function dn(u){var f=sl(u),_=f%1;return f==f?_?f-_:f:0}function OD(u){return u?Ll(dn(u),0,ha):0}function xo(u){if("number"==typeof u)return u;if(As(u))return Pf;if(wi(u)){var f="function"==typeof u.valueOf?u.valueOf():u;u=wi(f)?f+"":f}if("string"!=typeof u)return 0===u?u:+u;u=$n(u);var _=Ya.test(u);return _||ir.test(u)?oF(u.slice(2),_?2:8):VE.test(u)?Pf:+u}function Hl(u){return ci(u,Ds(u))}function Fn(u){return null==u?"":Qs(u)}var mt=Ar(function(u,f){if(wp(f)||to(f))ci(f,fr(f),u);else for(var _ in f)ii.call(f,_)&&Zs(u,_,f[_])}),iw=Ar(function(u,f){ci(f,Ds(f),u)}),Gl=Ar(function(u,f,_,w){ci(f,Ds(f),u,w)}),ol=Ar(function(u,f,_,w){ci(f,fr(f),u,w)}),LD=bo(rh),Nc=pn(function(u,f){u=oi(u);var _=-1,w=f.length,S=w>2?f[2]:V;for(S&&Dr(f[0],f[1],S)&&(w=1);++_1),P}),ci(u,q_(u),_),w&&(_=Ms(_,Ci|ms|Ws,wa));for(var S=f.length;S--;)dh(_,f[S]);return _}),jD=bo(function(u,f){return null==u?{}:function Z0(u,f){return Q0(u,f,function(_,w){return Uv(u,w)})}(u,f)});function Vv(u,f){if(null==u)return{};var _=mi(q_(u),function(w){return[w]});return f=Lt(f),Q0(u,_,function(w,S){return f(w,S[0])})}var aw=fh(fr),zv=fh(Ds);function Bc(u){return null==u?[]:Ju(u,fr(u))}var G=$d(function(u,f,_){return f=f.toLowerCase(),u+(_?Hv(f):f)});function Hv(u){return Kd(Fn(u).toLowerCase())}function Gv(u){return(u=Fn(u))&&u.replace(mo,nA).replace(JO,"")}var s1=$d(function(u,f,_){return u+(_?"-":"")+f.toLowerCase()}),cw=$d(function(u,f,_){return u+(_?" ":"")+f.toLowerCase()}),o1=Gd("toLowerCase"),$v=$d(function(u,f,_){return u+(_?"_":"")+f.toLowerCase()}),c1=$d(function(u,f,_){return u+(_?" ":"")+Kd(f)}),fw=$d(function(u,f,_){return u+(_?" ":"")+f.toUpperCase()}),Kd=Gd("toUpperCase");function pw(u,f,_){return u=Fn(u),(f=_?V:f)===V?function nn(X){return ZE.test(X)}(u)?function fn(X){return X.match(eF)||[]}(u):function tA(X){return X.match(NE)||[]}(u):u.match(f)||[]}var jv=pn(function(u,f){try{return _s(u,V,f)}catch(_){return Bp(_)?_:new $t(_)}}),f1=bo(function(u,f){return Rn(f,function(_){_=Go(_),Ho(u,_,Oc(u[_],u))}),u});function Yv(u){return function(){return u}}var mw=Cs(),_1=Cs(!0);function is(u){return u}function $p(u){return N_("function"==typeof u?u:Ms(u,Ci))}var Xv=pn(function(u,f){return function(_){return va(_,u,f)}}),v1=pn(function(u,f){return function(_){return va(u,_,f)}});function gw(u,f,_){var w=fr(f),S=_a(f,w);null==_&&(!wi(f)||!S.length&&w.length)&&(_=f,f=u,u=this,S=_a(f,fr(f)));var P=!(wi(_)&&"chain"in _&&!_.chain),H=zl(u);return Rn(S,function(Y){var Q=f[Y];u[Y]=Q,H&&(u.prototype[Y]=function(){var _e=this.__chain__;if(P||_e){var ye=u(this.__wrapped__);return(ye.__actions__=Js(this.__actions__)).push({func:Q,args:arguments,thisArg:u}),ye.__chain__=_e,ye}return Q.apply(u,kl([this.value()],arguments))})}),u}function wo(){}var _w=gp(mi),b1=gp(JE),x1=gp(Wf);function Mh(u){return px(u)?__(Go(u)):function ya(u){return function(f){return Mc(f,u)}}(u)}var Kv=sx(),Ch=sx(!0);function Sh(){return[]}function Qd(){return!1}var w1=$_(function(u,f){return u+f},0),M1=W_("ceil"),bw=$_(function(u,f){return u/f},1),C1=W_("floor"),D1=$_(function(u,f){return u*f},1),WF=W_("round"),ty=$_(function(u,f){return u-f},0);return I.after=function vD(u,f){if("function"!=typeof f)throw new Sr(Un);return u=dn(u),function(){if(--u<1)return f.apply(this,arguments)}},I.ary=xh,I.assign=mt,I.assignIn=iw,I.assignInWith=Gl,I.assignWith=ol,I.at=LD,I.before=Sa,I.bind=Oc,I.bindAll=f1,I.bindKey=xv,I.castArray=function wD(){if(!arguments.length)return[];var u=arguments[0];return rn(u)?u:[u]},I.chain=zx,I.chunk=function nv(u,f,_){f=(_?Dr(u,f,_):f===V)?1:hr(dn(f),0);var w=null==u?0:u.length;if(!w||f<1)return[];for(var S=0,P=0,H=oe(w_(w/f));SS?0:S+_),(w=w===V||w>S?S:dn(w))<0&&(w+=S),w=_>w?0:OD(w);_>>0)?(u=Fn(u))&&("string"==typeof f||null!=f&&!Hp(f))&&!(f=Qs(f))&&Cd(u)?Tc(_o(u),0,_):u.split(f,_):[]},I.spread=function Kx(u,f){if("function"!=typeof u)throw new Sr(Un);return f=null==f?0:hr(dn(f),0),pn(function(_){var w=_[f],S=Tc(_,0,f);return w&&kl(S,w),_s(u,this,S)})},I.tail=function Pc(u){var f=null==u?0:u.length;return f?ts(u,1,f):[]},I.take=function Ox(u,f,_){return u&&u.length?ts(u,0,(f=_||f===V?1:dn(f))<0?0:f):[]},I.takeRight=function Fx(u,f,_){var w=null==u?0:u.length;return w?ts(u,(f=w-(f=_||f===V?1:dn(f)))<0?0:f,w):[]},I.takeRightWhile=function QA(u,f){return u&&u.length?uh(u,Lt(f,3),!1,!0):[]},I.takeWhile=function IF(u,f){return u&&u.length?uh(u,Lt(f,3)):[]},I.tap=function tD(u,f){return f(u),u},I.throttle=function Fp(u,f,_){var w=!0,S=!0;if("function"!=typeof u)throw new Sr(Un);return wi(_)&&(w="leading"in _?!!_.leading:w,S="trailing"in _?!!_.trailing:S),yD(u,f,{leading:w,maxWait:f,trailing:S})},I.thru=Ip,I.toArray=Ov,I.toPairs=aw,I.toPairsIn=zv,I.toPath=function yw(u){return rn(u)?mi(u,Go):As(u)?[u]:Js(yx(Fn(u)))},I.toPlainObject=Hl,I.transform=function XD(u,f,_){var w=rn(u),S=w||rl(u)||Wo(u);if(f=Lt(f,4),null==_){var P=u&&u.constructor;_=S?w?new P:[]:wi(u)&&zl(P)?Pd(xs(u)):{}}return(S?Rn:Ri)(u,function(H,Y,Q){return f(_,H,Y,Q)}),_},I.unary=function Zx(u){return xh(u,1)},I.union=Ap,I.unionBy=JA,I.unionWith=Lx,I.uniq=function Nx(u){return u&&u.length?ri(u):[]},I.uniqBy=function Bx(u,f){return u&&u.length?ri(u,Lt(f,2)):[]},I.uniqWith=function fv(u,f){return f="function"==typeof f?f:V,u&&u.length?ri(u,V,f):[]},I.unset=function KD(u,f){return null==u||dh(u,f)},I.unzip=Dp,I.unzipWith=yh,I.update=function ZD(u,f,_){return null==u?u:nx(u,f,hp(_))},I.updateWith=function QD(u,f,_,w){return w="function"==typeof w?w:V,null==u?u:nx(u,f,hp(_),w)},I.values=Bc,I.valuesIn=function JD(u){return null==u?[]:Ju(u,Ds(u))},I.without=Tp,I.words=pw,I.wrap=function Av(u,f){return Ev(hp(f),u)},I.xor=Ux,I.xorBy=pv,I.xorWith=mv,I.zip=gv,I.zipObject=function bh(u,f){return Dc(u||[],f||[],Zs)},I.zipObjectDeep=function eD(u,f){return Dc(u||[],f||[],Vd)},I.zipWith=Vx,I.entries=aw,I.entriesIn=zv,I.extend=iw,I.extendWith=Gl,gw(I,I),I.add=w1,I.attempt=jv,I.camelCase=G,I.capitalize=Hv,I.ceil=M1,I.clamp=function e1(u,f,_){return _===V&&(_=f,f=V),_!==V&&(_=(_=xo(_))==_?_:0),f!==V&&(f=(f=xo(f))==f?f:0),Ll(xo(u),f,_)},I.clone=function Kn(u){return Ms(u,Ws)},I.cloneDeep=function CD(u){return Ms(u,Ci|Ws)},I.cloneDeepWith=function Lp(u,f){return Ms(u,Ci|Ws,f="function"==typeof f?f:V)},I.cloneWith=function MD(u,f){return Ms(u,Ws,f="function"==typeof f?f:V)},I.conformsTo=function Qx(u,f){return null==f||R_(u,f,fr(f))},I.deburr=Gv,I.defaultTo=function g1(u,f){return null==u||u!=u?f:u},I.divide=bw,I.endsWith=function n1(u,f,_){u=Fn(u),f=Qs(f);var w=u.length,S=_=_===V?w:Ll(dn(_),0,w);return(_-=f.length)>=0&&u.slice(_,S)==f},I.eq=$o,I.escape=function r1(u){return(u=Fn(u))&&FE.test(u)?u.replace(f0,ot):u},I.escapeRegExp=function lw(u){return(u=Fn(u))&&_0.test(u)?u.replace(s_,"\\$&"):u},I.every=function vv(u,f,_){var w=rn(u)?JE:W0;return _&&Dr(u,f,_)&&(f=V),w(u,Lt(f,3))},I.find=$x,I.findIndex=Sx,I.findKey=function Fv(u,f){return ee(u,Lt(f,3),Ri)},I.findLast=kp,I.findLastIndex=rv,I.findLastKey=function Lv(u,f){return ee(u,Lt(f,3),P_)},I.floor=C1,I.forEach=bv,I.forEachRight=Vl,I.forIn=function UD(u,f){return null==u?u:tl(u,Lt(f,3),Ds)},I.forInRight=function Nv(u,f){return null==u?u:Ai(u,Lt(f,3),Ds)},I.forOwn=function al(u,f){return u&&Ri(u,Lt(f,3))},I.forOwnRight=function VD(u,f){return u&&P_(u,Lt(f,3))},I.get=Bv,I.gt=SD,I.gte=ED,I.has=function GD(u,f){return null!=u&&ux(u,f,sp)},I.hasIn=Uv,I.head=Ax,I.identity=is,I.includes=function aD(u,f,_,w){u=to(u)?u:Bc(u),_=_&&!w?dn(_):0;var S=u.length;return _<0&&(_=hr(S+_,0)),Gp(u)?_<=S&&u.indexOf(f,_)>-1:!!S&&Ft(u,f,_)>-1},I.indexOf=function vh(u,f,_){var w=null==u?0:u.length;if(!w)return-1;var S=null==_?0:dn(_);return S<0&&(S=hr(w+S,0)),Ft(u,f,S)},I.inRange=function t1(u,f,_){return f=sl(f),_===V?(_=f,f=0):_=sl(_),function O_(u,f,_){return u>=Zr(f,_)&&u=-Wa&&u<=Wa},I.isSet=nw,I.isString=Gp,I.isSymbol=As,I.isTypedArray=Wo,I.isUndefined=function ID(u){return u===V},I.isWeakMap=function RD(u){return ki(u)&&zr(u)==_d},I.isWeakSet=function kD(u){return ki(u)&&"[object WeakSet]"==es(u)},I.join=function Dx(u,f){return null==u?"":hF.call(u,f)},I.kebabCase=s1,I.last=Tr,I.lastIndexOf=function cv(u,f,_){var w=null==u?0:u.length;if(!w)return-1;var S=w;return _!==V&&(S=(S=dn(_))<0?hr(w+S,0):Zr(S,w-1)),f==f?function Sd(X,ue,oe){for(var Be=oe+1;Be--;)if(X[Be]===ue)return Be;return Be}(u,f,S):Qu(u,Yf,S,!0)},I.lowerCase=cw,I.lowerFirst=o1,I.lt=Pv,I.lte=PD,I.max=function xw(u){return u&&u.length?Ld(u,is,Nd):V},I.maxBy=function ww(u,f){return u&&u.length?Ld(u,Lt(f,2),Nd):V},I.mean=function S1(u){return Md(u,is)},I.meanBy=function E1(u,f){return Md(u,Lt(f,2))},I.min=function io(u){return u&&u.length?Ld(u,is,lp):V},I.minBy=function A1(u,f){return u&&u.length?Ld(u,Lt(f,2),lp):V},I.stubArray=Sh,I.stubFalse=Qd,I.stubObject=function vw(){return{}},I.stubString=function Zv(){return""},I.stubTrue=function Qv(){return!0},I.multiply=D1,I.nth=function Tx(u,f){return u&&u.length?CA(u,dn(f)):V},I.noConflict=function E(){return Cr._===this&&(Cr._=Kf),this},I.noop=wo,I.now=Op,I.pad=function a1(u,f,_){u=Fn(u);var w=(f=dn(f))?ur(u):0;if(!f||w>=f)return u;var S=(f-w)/2;return _p(M_(S),_)+u+_p(w_(S),_)},I.padEnd=function UF(u,f,_){u=Fn(u);var w=(f=dn(f))?ur(u):0;return f&&wf){var w=u;u=f,f=w}if(_||u%1||f%1){var S=C_();return Zr(u+S*(f-u+ke("1e-"+((S+"").length-1))),f)}return lh(u,f)},I.reduce=function dD(u,f,_){var w=rn(u)?g_:I0,S=arguments.length<3;return w(u,Lt(f,4),_,S,el)},I.reduceRight=function uD(u,f,_){var w=rn(u)?eA:I0,S=arguments.length<3;return w(u,Lt(f,4),_,S,k_)},I.repeat=function Gi(u,f,_){return f=(_?Dr(u,f,_):f===V)?1:dn(f),ch(Fn(u),f)},I.replace=function l1(){var u=arguments,f=Fn(u[0]);return u.length<3?f:f.replace(u[1],u[2])},I.result=function YD(u,f,_){var w=-1,S=(f=xa(f,u)).length;for(S||(S=1,u=V);++wWa)return[];var _=ha,w=Zr(u,ha);f=Lt(f),u-=ha;for(var S=Xs(w,f);++_=P)return u;var Y=_-ur(w);if(Y<1)return w;var Q=H?Tc(H,0,Y).join(""):u.slice(0,Y);if(S===V)return Q+w;if(H&&(Y+=Q.length-Y),Hp(S)){if(u.slice(Y).search(S)){var _e,ye=Q;for(S.global||(S=yc(S.source,Fn(x0.exec(S))+"g")),S.lastIndex=0;_e=S.exec(ye);)var be=_e.index;Q=Q.slice(0,be===V?Y:be)}}else if(u.indexOf(Qs(S),Y)!=Y){var Xe=Q.lastIndexOf(S);Xe>-1&&(Q=Q.slice(0,Xe))}return Q+w},I.unescape=function h1(u){return(u=Fn(u))&&OE.test(u)?u.replace(h0,Xf):u},I.uniqueId=function ey(u){var f=++yi;return Fn(u)+f},I.upperCase=fw,I.upperFirst=Kd,I.each=bv,I.eachRight=Vl,I.first=Ax,gw(I,function(){var u={};return Ri(I,function(f,_){ii.call(I.prototype,_)||(u[_]=f)}),u}(),{chain:!1}),I.VERSION="4.17.21",Rn(["bind","bindKey","curry","curryRight","partial","partialRight"],function(u){I[u].placeholder=I}),Rn(["drop","take"],function(u,f){kn.prototype[u]=function(_){_=_===V?1:hr(dn(_),0);var w=this.__filtered__&&!f?new kn(this):this.clone();return w.__filtered__?w.__takeCount__=Zr(_,w.__takeCount__):w.__views__.push({size:Zr(_,ha),type:u+(w.__dir__<0?"Right":"")}),w},kn.prototype[u+"Right"]=function(_){return this.reverse()[u](_).reverse()}}),Rn(["filter","map","takeWhile"],function(u,f){var _=f+1,w=1==_||3==_;kn.prototype[u]=function(S){var P=this.clone();return P.__iteratees__.push({iteratee:Lt(S,3),type:_}),P.__filtered__=P.__filtered__||w,P}}),Rn(["head","last"],function(u,f){var _="take"+(f?"Right":"");kn.prototype[u]=function(){return this[_](1).value()[0]}}),Rn(["initial","tail"],function(u,f){var _="drop"+(f?"":"Right");kn.prototype[u]=function(){return this.__filtered__?new kn(this):this[_](1)}}),kn.prototype.compact=function(){return this.filter(is)},kn.prototype.find=function(u){return this.filter(u).head()},kn.prototype.findLast=function(u){return this.reverse().find(u)},kn.prototype.invokeMap=pn(function(u,f){return"function"==typeof u?new kn(this):this.map(function(_){return va(_,u,f)})}),kn.prototype.reject=function(u){return this.filter(Sv(Lt(u)))},kn.prototype.slice=function(u,f){u=dn(u);var _=this;return _.__filtered__&&(u>0||f<0)?new kn(_):(u<0?_=_.takeRight(-u):u&&(_=_.drop(u)),f!==V&&(_=(f=dn(f))<0?_.dropRight(-f):_.take(f-u)),_)},kn.prototype.takeRightWhile=function(u){return this.reverse().takeWhile(u).reverse()},kn.prototype.toArray=function(){return this.take(ha)},Ri(kn.prototype,function(u,f){var _=/^(?:filter|find|map|reject)|While$/.test(f),w=/^(?:head|last)$/.test(f),S=I[w?"take"+("last"==f?"Right":""):f],P=w||/^find/.test(f);S&&(I.prototype[f]=function(){var H=this.__wrapped__,Y=w?[1]:arguments,Q=H instanceof kn,_e=Y[0],ye=Q||rn(H),be=function(An){var Ln=S.apply(I,kl([An],Y));return w&&Xe?Ln[0]:Ln};ye&&_&&"function"==typeof _e&&1!=_e.length&&(Q=ye=!1);var Xe=this.__chain__,Ut=P&&!Xe,mn=Q&&!this.__actions__.length;if(!P&&ye){H=mn?H:new kn(this);var Vt=u.apply(H,Y);return Vt.__actions__.push({func:Ip,args:[be],thisArg:V}),new Ei(Vt,Xe)}return Ut&&mn?u.apply(this,Y):(Vt=this.thru(be),Ut?w?Vt.value()[0]:Vt.value():Vt)})}),Rn(["pop","push","shift","sort","splice","unshift"],function(u){var f=rr[u],_=/^(?:push|sort|unshift)$/.test(u)?"tap":"thru",w=/^(?:pop|shift)$/.test(u);I.prototype[u]=function(){var S=arguments;if(w&&!this.__chain__){var P=this.value();return f.apply(rn(P)?P:[],S)}return this[_](function(H){return f.apply(rn(H)?H:[],S)})}}),Ri(kn.prototype,function(u,f){var _=I[f];if(_){var w=_.name+"";ii.call(Rd,w)||(Rd[w]=[]),Rd[w].push({name:f,func:_})}}),Rd[Wd(V,dr).name]=[{name:"wrapper",func:V}],kn.prototype.clone=function B0(){var u=new kn(this.__wrapped__);return u.__actions__=Js(this.__actions__),u.__dir__=this.__dir__,u.__filtered__=this.__filtered__,u.__iteratees__=Js(this.__iteratees__),u.__takeCount__=this.__takeCount__,u.__views__=Js(this.__views__),u},kn.prototype.reverse=function Od(){if(this.__filtered__){var u=new kn(this);u.__dir__=-1,u.__filtered__=!0}else(u=this.clone()).__dir__*=-1;return u},kn.prototype.value=function ws(){var u=this.__wrapped__.value(),f=this.__dir__,_=rn(u),w=f<0,S=_?u.length:0,P=function xp(u,f,_){for(var w=-1,S=_.length;++w=this.__values__.length;return{done:u,value:u?V:this.__values__[this.__index__++]}},I.prototype.plant=function nD(u){for(var f,_=this;_ instanceof xc;){var w=ns(_);w.__index__=0,w.__values__=V,f?S.__wrapped__=w:f=w;var S=w;_=_.__wrapped__}return S.__wrapped__=u,f},I.prototype.reverse=function iD(){var u=this.__wrapped__;if(u instanceof kn){var f=u;return this.__actions__.length&&(f=new kn(this)),(f=f.reverse()).__actions__.push({func:Ip,args:[dv],thisArg:V}),new Ei(f,this.__chain__)}return this.thru(dv)},I.prototype.toJSON=I.prototype.valueOf=I.prototype.value=function RF(){return ba(this.__wrapped__,this.__actions__)},I.prototype.first=I.prototype.head,ih&&(I.prototype[ih]=function jd(){return this}),I}();Cr._=ys,(cn=function(){return ys}.call(Gs,ps,Gs,No))!==V&&(No.exports=cn)}.call(this)},738:function(No){var Gs;No.exports=((Gs=function(){function ps(Mi){return Nr.appendChild(Mi.dom),Mi}function cn(Mi){for(var Ci=0;CiZt+1e3&&(Al.update(1e3*Un/(Mi-Zt),100),Zt=Mi,Un=0,$s)){var Ci=performance.memory;$s.update(Ci.usedJSHeapSize/1048576,Ci.jsHeapSizeLimit/1048576)}return Mi},update:function(){Kr=this.end()},domElement:Nr,setMode:cn}}).Panel=function(ps,cn,V){var Nr=1/0,Kr=0,Zt=Math.round,Un=Zt(window.devicePixelRatio||1),Al=80*Un,Ha=48*Un,$s=3*Un,Mi=2*Un,Ci=3*Un,ms=15*Un,Ws=74*Un,js=30*Un,Bo=document.createElement("canvas");Bo.width=Al,Bo.height=Ha,Bo.style.cssText="width:80px;height:48px";var On=Bo.getContext("2d");return On.font="bold "+9*Un+"px Helvetica,Arial,sans-serif",On.textBaseline="top",On.fillStyle=V,On.fillRect(0,0,Al,Ha),On.fillStyle=cn,On.fillText(ps,$s,Mi),On.fillRect(Ci,ms,Ws,js),On.fillStyle=V,On.globalAlpha=.9,On.fillRect(Ci,ms,Ws,js),{dom:Bo,update:function(dr,pc){Nr=Math.min(Nr,dr),Kr=Math.max(Kr,dr),On.fillStyle=V,On.globalAlpha=1,On.fillRect(0,0,Al,ms),On.fillStyle=cn,On.fillText(Zt(dr)+" "+ps+" ("+Zt(Nr)+"-"+Zt(Kr)+")",$s,Mi),On.drawImage(Bo,Ci+Un,ms,Ws-Un,js,Ci,ms,Ws-Un,js),On.fillRect(Ci+Ws-Un,ms,Un,js),On.fillStyle=V,On.globalAlpha=.9,On.fillRect(Ci+Ws-Un,ms,Un,Zt((1-dr/pc)*js))}}},Gs)}},No=>{No(No.s=790)}]); \ No newline at end of file +(self.webpackChunkgui=self.webpackChunkgui||[]).push([[179],{790:(Bo,$s,ps)=>{"use strict";function cn(i){return"function"==typeof i}function V(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 Br=V(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 Kr(i,t){if(i){const e=i.indexOf(t);0<=e&&i.splice(e,1)}}class Zt{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(cn(n))try{n()}catch(s){t=s instanceof Br?s.errors:[s]}const{_finalizers:r}=this;if(r){this._finalizers=null;for(const s of r)try{Ha(s)}catch(o){t=t??[],o instanceof Br?t=[...t,...o.errors]:t.push(o)}}if(t)throw new Br(t)}}add(t){var e;if(t&&t!==this)if(this.closed)Ha(t);else{if(t instanceof Zt){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)&&Kr(e,t)}remove(t){const{_finalizers:e}=this;e&&Kr(e,t),t instanceof Zt&&t._removeParent(this)}}Zt.EMPTY=(()=>{const i=new Zt;return i.closed=!0,i})();const Un=Zt.EMPTY;function Al(i){return i instanceof Zt||i&&"closed"in i&&cn(i.remove)&&cn(i.add)&&cn(i.unsubscribe)}function Ha(i){cn(i)?i():i.unsubscribe()}const Ws={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 Si(i){Ci.setTimeout(()=>{const{onUnhandledError:t}=Ws;if(!t)throw i;t(i)})}function ms(){}const js=On("C",void 0,void 0);function On(i,t,e){return{kind:i,value:t,error:e}}let ur=null;function mc(i){if(Ws.useDeprecatedSynchronousErrorHandling){const t=!ur;if(t&&(ur={errorThrown:!1,error:null}),i(),t){const{errorThrown:e,error:n}=ur;if(ur=null,e)throw n}}else i()}class Dl extends Zt{constructor(t){super(),this.isStopped=!1,t?(this.destination=t,Al(t)&&t.add(this)):this.destination=ME}static create(t,e,n){return new ha(t,e,n)}next(t){this.isStopped?Xg(function Uo(i){return On("N",i,void 0)}(t),this):this._next(t)}error(t){this.isStopped?Xg(function Ys(i){return On("E",void 0,i)}(t),this):(this.isStopped=!0,this._error(t))}complete(){this.isStopped?Xg(js,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 ua=Function.prototype.bind;function Tl(i,t){return ua.call(i,t)}class Ga{constructor(t){this.partialObserver=t}next(t){const{partialObserver:e}=this;if(e.next)try{e.next(t)}catch(n){md(n)}}error(t){const{partialObserver:e}=this;if(e.error)try{e.error(t)}catch(n){md(n)}else md(t)}complete(){const{partialObserver:t}=this;if(t.complete)try{t.complete()}catch(e){md(e)}}}class ha extends Dl{constructor(t,e,n){let r;if(super(),cn(t)||!t)r={next:t??void 0,error:e??void 0,complete:n??void 0};else{let s;this&&Ws.useDeprecatedNextContext?(s=Object.create(t),s.unsubscribe=()=>this.unsubscribe(),r={next:t.next&&Tl(t.next,s),error:t.error&&Tl(t.error,s),complete:t.complete&&Tl(t.complete,s)}):r=t}this.destination=new Ga(r)}}function md(i){Ws.useDeprecatedSynchronousErrorHandling?function da(i){Ws.useDeprecatedSynchronousErrorHandling&&ur&&(ur.errorThrown=!0,ur.error=i)}(i):Si(i)}function Xg(i,t){const{onStoppedNotification:e}=Ws;e&&Ci.setTimeout(()=>e(i,t))}const ME={closed:!0,next:ms,error:function wE(i){throw i},complete:ms},Kg="function"==typeof Symbol&&Symbol.observable||"@@observable";function $a(i){return i}function a0(i){return 0===i.length?$a:1===i.length?i[0]:function(e){return i.reduce((n,r)=>r(n),e)}}let In=(()=>{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 Pf(i){return i&&i instanceof Dl||function SE(i){return i&&cn(i.next)&&cn(i.error)&&cn(i.complete)}(i)&&Al(i)}(e)?e:new ha(e,n,r);return mc(()=>{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=Wa(n))((r,s)=>{const o=new ha({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)}[Kg](){return this}pipe(...e){return a0(e)(this)}toPromise(e){return new(e=Wa(e))((n,r)=>{let s;this.subscribe(o=>s=o,o=>r(o),()=>n(s))})}}return i.create=t=>new i(t),i})();function Wa(i){var t;return null!==(t=i??Ws.Promise)&&void 0!==t?t:Promise}const fa=V(i=>function(){i(this),this.name="ObjectUnsubscribedError",this.message="object unsubscribed"});let Re=(()=>{class i extends In{constructor(){super(),this.closed=!1,this.currentObservers=null,this.observers=[],this.isStopped=!1,this.hasError=!1,this.thrownError=null}lift(e){const n=new l0(this,this);return n.operator=e,n}_throwIfClosed(){if(this.closed)throw new fa}next(e){mc(()=>{if(this._throwIfClosed(),!this.isStopped){this.currentObservers||(this.currentObservers=Array.from(this.observers));for(const n of this.currentObservers)n.next(e)}})}error(e){mc(()=>{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(){mc(()=>{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?Un:(this.currentObservers=null,s.push(e),new Zt(()=>{this.currentObservers=null,Kr(s,e)}))}_checkFinalizedStatuses(e){const{hasError:n,thrownError:r,isStopped:s}=this;n?e.error(r):s&&e.complete()}asObservable(){const e=new In;return e.source=this,e}}return i.create=(t,e)=>new l0(t,e),i})();class l0 extends Re{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:Un}}function c0(i){return cn(i?.lift)}function ti(i){return t=>{if(c0(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 Yn(i,t,e,n,r){return new EE(i,t,e,n,r)}class EE extends Dl{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 et(i,t){return ti((e,n)=>{let r=0;e.subscribe(Yn(n,s=>{n.next(i.call(t,s,r++))}))})}function pa(i){return this instanceof pa?(this.v=i,this):new pa(i)}function Nf(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 Zg(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 i_=i=>i&&"number"==typeof i.length&&"function"!=typeof i;function r_(i){return cn(i?.then)}function p0(i){return cn(i[Kg])}function m0(i){return Symbol.asyncIterator&&cn(i?.[Symbol.asyncIterator])}function g0(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 _0=function s_(){return"function"==typeof Symbol&&Symbol.iterator?Symbol.iterator:"@@iterator"}();function Bf(i){return cn(i?.[_0])}function v0(i){return function Lf(i,t,e){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var r,n=e.apply(i,t||[]),s=[];return r=Object.create(("function"==typeof AsyncIterator?AsyncIterator:Object).prototype),a("next"),a("throw"),a("return",function o(m){return function(g){return Promise.resolve(g).then(m,h)}}),r[Symbol.asyncIterator]=function(){return this},r;function a(m,g){n[m]&&(r[m]=function(b){return new Promise(function(v,y){s.push([m,b,v,y])>1||l(m,b)})},g&&(r[m]=g(r[m])))}function l(m,g){try{!function c(m){m.value instanceof pa?Promise.resolve(m.value.v).then(d,h):p(s[0][2],m)}(n[m](g))}catch(b){p(s[0][3],b)}}function d(m){l("next",m)}function h(m){l("throw",m)}function p(m,g){m(g),s.shift(),s.length&&l(s[0][0],s[0][1])}}(this,arguments,function*(){const e=i.getReader();try{for(;;){const{value:n,done:r}=yield pa(e.read());if(r)return yield pa(void 0);yield yield pa(n)}}finally{e.releaseLock()}})}function y0(i){return cn(i?.getReader)}function Mr(i){if(i instanceof In)return i;if(null!=i){if(p0(i))return function LE(i){return new In(t=>{const e=i[Kg]();if(cn(e.subscribe))return e.subscribe(t);throw new TypeError("Provided object does not correctly implement Symbol.observable")})}(i);if(i_(i))return function NE(i){return new In(t=>{for(let e=0;e{i.then(e=>{t.closed||(t.next(e),t.complete())},e=>t.error(e)).then(null,Si)})}(i);if(m0(i))return b0(i);if(Bf(i))return function UE(i){return new In(t=>{for(const e of i)if(t.next(e),t.closed)return;t.complete()})}(i);if(y0(i))return function x0(i){return b0(v0(i))}(i)}throw g0(i)}function b0(i){return new In(t=>{(function VE(i,t){var e,n,r,s;return function _d(i,t,e,n){return new(e||(e=Promise))(function(s,o){function a(d){try{c(n.next(d))}catch(h){o(h)}}function l(d){try{c(n.throw(d))}catch(h){o(h)}}function c(d){d.done?s(d.value):function r(s){return s instanceof e?s:new e(function(o){o(s)})}(d.value).then(a,l)}c((n=n.apply(i,t||[])).next())})}(this,void 0,void 0,function*(){try{for(e=Nf(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 Ya(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 rr(i,t,e=1/0){return cn(t)?rr((n,r)=>et((s,o)=>t(n,s,r,o))(Mr(i(n,r))),e):("number"==typeof t&&(e=t),ti((n,r)=>function zE(i,t,e,n,r,s,o,a){const l=[];let c=0,d=0,h=!1;const p=()=>{h&&!l.length&&!c&&t.complete()},m=b=>c{s&&t.next(b),c++;let v=!1;Mr(e(b,d++)).subscribe(Yn(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(Yn(t,m,()=>{h=!0,p()})),()=>{a?.()}}(n,r,i,e)))}function bd(i=1/0){return rr($a,i)}const mo=new In(i=>i.complete());function Gu(i){return i&&cn(i.schedule)}function a_(i){return i[i.length-1]}function w0(i){return cn(a_(i))?i.pop():void 0}function $u(i){return Gu(a_(i))?i.pop():void 0}function l_(i,t=0){return ti((e,n)=>{e.subscribe(Yn(n,r=>Ya(n,i,()=>n.next(r),t),()=>Ya(n,i,()=>n.complete(),t),r=>Ya(n,i,()=>n.error(r),t)))})}function c_(i,t=0){return ti((e,n)=>{n.add(i.schedule(()=>e.subscribe(n),t))})}function d_(i,t){if(!i)throw new Error("Iterable cannot be null");return new In(e=>{Ya(e,t,()=>{const n=i[Symbol.asyncIterator]();Ya(e,t,()=>{n.next().then(r=>{r.done?e.complete():e.next(r.value)})},0,!0)})})}function Ni(i,t){return t?function S0(i,t){if(null!=i){if(p0(i))return function GE(i,t){return Mr(i).pipe(c_(t),l_(t))}(i,t);if(i_(i))return function WE(i,t){return new In(e=>{let n=0;return t.schedule(function(){n===i.length?e.complete():(e.next(i[n++]),e.closed||this.schedule())})})}(i,t);if(r_(i))return function $E(i,t){return Mr(i).pipe(c_(t),l_(t))}(i,t);if(m0(i))return d_(i,t);if(Bf(i))return function jE(i,t){return new In(e=>{let n;return Ya(e,t,()=>{n=i[_0](),Ya(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)}),()=>cn(n?.return)&&n.return()})}(i,t);if(y0(i))return function C0(i,t){return d_(v0(i),t)}(i,t)}throw g0(i)}(i,t):Mr(i)}function Cr(...i){const t=$u(i),e=function M0(i,t){return"number"==typeof a_(i)?i.pop():t}(i,1/0),n=i;return n.length?1===n.length?Mr(n[0]):bd(e)(Ni(n,t)):mo}function Uf(i={}){const{connector:t=(()=>new Re),resetOnError:e=!0,resetOnComplete:n=!0,resetOnRefCountZero:r=!0}=i;return s=>{let o,a,l,c=0,d=!1,h=!1;const p=()=>{a?.unsubscribe(),a=void 0},m=()=>{p(),o=l=void 0,d=h=!1},g=()=>{const b=o;m(),b?.unsubscribe()};return ti((b,v)=>{c++,!h&&!d&&p();const y=l=l??t();v.add(()=>{c--,0===c&&!h&&!d&&(a=xd(g,r))}),y.subscribe(v),!o&&c>0&&(o=new ha({next:M=>y.next(M),error:M=>{h=!0,p(),a=xd(m,e,M),y.error(M)},complete:()=>{d=!0,p(),a=xd(m,n),y.complete()}}),Mr(b).subscribe(o))})(s)}}function xd(i,t,...e){if(!0===t)return void i();if(!1===t)return;const n=new ha({next:()=>{n.unsubscribe(),i()}});return Mr(t(...e)).subscribe(n)}function ci(i){for(let t in i)if(i[t]===ci)return t;throw Error("Could not find renamed property on target object.")}function u_(i,t){for(const e in t)t.hasOwnProperty(e)&&!i.hasOwnProperty(e)&&(i[e]=t[e])}function pi(i){if("string"==typeof i)return i;if(Array.isArray(i))return"["+i.map(pi).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 Vf(i,t){return null==i||""===i?null===t?"":t:null==t||""===t?i:i+" "+t}const h_=ci({__forward_ref__:ci});function Gn(i){return i.__forward_ref__=Gn,i.toString=function(){return pi(this())},i}function Pt(i){return Wu(i)?i():i}function Wu(i){return"function"==typeof i&&i.hasOwnProperty(h_)&&i.__forward_ref__===Gn}function ju(i){return i&&!!i.\u0275providers}const qu="https://g.co/ng/security#xss";class pe extends Error{constructor(t,e){super(zf(t,e)),this.code=t}}function zf(i,t){return`NG0${Math.abs(i)}${t?": "+t.trim():""}`}function Qt(i){return"string"==typeof i?i:null==i?"":String(i)}function Hf(i,t){throw new pe(-201,!1)}function En(i,t){null==i&&function ni(i,t,e,n){throw new Error(`ASSERTION ERROR: ${i}`+(null==n?"":` [Expected=> ${e} ${n} ${t} <=Actual]`))}(t,i,null,"!=")}function ke(i){return{token:i.token,providedIn:i.providedIn||null,factory:i.factory,value:void 0}}function Kt(i){return{providers:i.providers||[],imports:i.imports||[]}}function Gf(i){return f_(i,wd)||f_(i,m_)}function f_(i,t){return i.hasOwnProperty(t)?i[t]:null}function p_(i){return i&&(i.hasOwnProperty(gs)||i.hasOwnProperty(D0))?i[gs]:null}const wd=ci({\u0275prov:ci}),gs=ci({\u0275inj:ci}),m_=ci({ngInjectableDef:ci}),D0=ci({ngInjectorDef:ci});var Ot=(()=>((Ot=Ot||{})[Ot.Default=0]="Default",Ot[Ot.Host=1]="Host",Ot[Ot.Self=2]="Self",Ot[Ot.SkipSelf=4]="SkipSelf",Ot[Ot.Optional=8]="Optional",Ot))();let $f;function Xs(i){const t=$f;return $f=i,t}function _s(i,t,e){const n=Gf(i);return n&&"root"==n.providedIn?void 0===n.value?n.value=n.factory():n.value:e&Ot.Optional?null:void 0!==t?t:void Hf(pi(i))}const Rn=(()=>typeof globalThis<"u"&&globalThis||typeof global<"u"&&global||typeof window<"u"&&window||typeof self<"u"&&typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&self)(),Rl={},Ku="__NG_DI_FLAG__",mi="ngTempTokenPath",kl="ngTokenPath",g_=/\n/gm,eA="\u0275",Wf="__source";let Zu;function Md(i){const t=Zu;return Zu=i,t}function tA(i,t=Ot.Default){if(void 0===Zu)throw new pe(-203,!1);return null===Zu?_s(i,void 0,t):Zu.get(i,t&Ot.Optional?null:void 0,t)}function ee(i,t=Ot.Default){return(function T0(){return $f}()||tA)(Pt(i),t)}function Ft(i,t=Ot.Default){return ee(i,jf(t))}function jf(i){return typeof i>"u"||"number"==typeof i?i:0|(i.optional&&8)|(i.host&&1)|(i.self&&2)|(i.skipSelf&&4)}function Yf(i){const t=[];for(let e=0;e((go=go||{})[go.OnPush=0]="OnPush",go[go.Default=1]="Default",go))(),Ks=(()=>{return(i=Ks||(Ks={}))[i.Emulated=0]="Emulated",i[i.None=2]="None",i[i.ShadowDom=3]="ShadowDom",Ks;var i})();const Xa={},$n=[],Ur=ci({\u0275cmp:ci}),Ju=ci({\u0275dir:ci}),yc=ci({\u0275pipe:ci}),y_=ci({\u0275mod:ci}),ma=ci({\u0275fac:ci}),eh=ci({__NG_ELEMENT_ID__:ci});let nA=0;function ot(i){return qa(()=>{const t=_o(i),e={...t,decls:i.decls,vars:i.vars,template:i.template,consts:i.consts||null,ngContentSelectors:i.ngContentSelectors,onPush:i.changeDetection===go.OnPush,directiveDefs:null,pipeDefs:null,dependencies:t.standalone&&i.dependencies||null,getStandaloneInjector:null,data:i.data||{},encapsulation:i.encapsulation||Ks.Emulated,id:"c"+nA++,styles:i.styles||$n,_:null,schemas:i.schemas||null,tView:null};b_(e);const n=i.dependencies;return e.directiveDefs=Xf(n,!1),e.pipeDefs=Xf(n,!0),e})}function th(i,t,e){const n=i.\u0275cmp;n.directiveDefs=Xf(t,!1),n.pipeDefs=Xf(e,!0)}function iA(i){return Hn(i)||Vr(i)}function Sd(i){return null!==i}function nn(i){return qa(()=>({type:i.type,bootstrap:i.bootstrap||$n,declarations:i.declarations||$n,imports:i.imports||$n,exports:i.exports||$n,transitiveCompileScopes:null,schemas:i.schemas||null,id:i.id||null}))}function qf(i,t){if(null==i)return Xa;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 ve(i){return qa(()=>{const t=_o(i);return b_(t),t})}function Gi(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 Hn(i){return i[Ur]||null}function Vr(i){return i[Ju]||null}function vs(i){return i[yc]||null}function hr(i,t){const e=i[y_]||null;if(!e&&!0===t)throw new Error(`Type ${pi(i)} does not have '\u0275mod' property.`);return e}function _o(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||$n,viewQuery:i.viewQuery||null,features:i.features||null,setInput:null,findHostDirectiveDefs:null,hostDirectives:null,inputs:qf(i.inputs,t),outputs:qf(i.outputs)}}function b_(i){i.features?.forEach(t=>t(i))}function Xf(i,t){if(!i)return null;const e=t?vs:iA;return()=>("function"==typeof i?i():i).map(n=>e(n)).filter(Sd)}const Ka=0,at=1,fn=2,Bi=3,ys=4,X=5,ue=6,oe=7,Ue=8,$t=9,Vn=10,yt=11,oi=12,bc=13,R0=14,Er=15,sr=16,nh=17,Ho=18,Zs=19,Pl=20,ii=21,bi=22,Ad=1,k0=2,Kf=7,Zf=8,Za=9,Ui=10;function bs(i){return Array.isArray(i)&&"object"==typeof i[Ad]}function xs(i){return Array.isArray(i)&&!0===i[Ad]}function Qf(i){return 0!=(4&i.flags)}function Dd(i){return i.componentOffset>-1}function xc(i){return 1==(1&i.flags)}function vo(i){return!!i.template}function ih(i){return 0!=(256&i[fn])}function Qa(i,t){return i.hasOwnProperty(ma)?i[ma]:null}class Id{constructor(t,e,n){this.previousValue=t,this.currentValue=e,this.firstChange=n}isFirstChange(){return this.firstChange}}function xi(){return Rd}function Rd(i){return i.type.prototype.ngOnChanges&&(i.setInput=kd),tp}function tp(){const i=N0(this),t=i?.current;if(t){const e=i.previous;if(e===Xa)i.previous=t;else for(let n in t)e[n]=t[n];i.current=null,this.ngOnChanges(t)}}function kd(i,t,e,n){const r=this.declaredInputs[e],s=N0(i)||function lA(i,t){return i[L0]=t}(i,{previous:Xa,current:null}),o=s.current||(s.current={}),a=s.previous,l=a[r];o[r]=new Id(l&&l.currentValue,t,a===Xa),i[n]=t}xi.ngInherit=!0;const L0="__ngSimpleChanges__";function N0(i){return i[L0]||null}const Qr=function(i,t,e){},Pd="svg";function I(i){for(;Array.isArray(i);)i=i[Ka];return i}function wc(i,t){return I(t[i])}function Ai(i,t){return I(t[i.index])}function B0(i,t){return i.data[t]}function Fd(i,t){return i[t]}function ws(i,t){const e=t[i];return bs(e)?e:e[Ka]}function np(i){return 64==(64&i[fn])}function Ol(i,t){return null==t?null:i[t]}function U0(i){i[Ho]=0}function A_(i,t){i[X]+=t;let e=i,n=i[Bi];for(;null!==n&&(1===t&&1===e[X]||-1===t&&0===e[X]);)n[X]+=t,e=n,n=n[Bi]}const kt={lFrame:el(null),bindingsEnabled:!0};function ga(){return kt.bindingsEnabled}function Se(){return kt.lFrame.lView}function zn(){return kt.lFrame.tView}function rn(i){return kt.lFrame.contextLView=i,i[Ue]}function Ut(i){return kt.lFrame.contextLView=null,i}function Ar(){let i=z0();for(;null!==i&&64===i.type;)i=i.parent;return i}function z0(){return kt.lFrame.currentTNode}function _a(i,t){const e=kt.lFrame;e.currentTNode=i,e.isParent=t}function D_(){return kt.lFrame.isParent}function T_(){kt.lFrame.isParent=!1}function zr(){const i=kt.lFrame;let t=i.bindingRootIndex;return-1===t&&(t=i.bindingRootIndex=i.tView.bindingStartIndex),t}function Fl(){return kt.lFrame.bindingIndex++}function Qs(i){const t=kt.lFrame,e=t.bindingIndex;return t.bindingIndex=t.bindingIndex+i,e}function $0(i,t){const e=kt.lFrame;e.bindingIndex=e.bindingRootIndex=i,Go(t)}function Go(i){kt.lFrame.currentDirectiveIndex=i}function rh(i){const t=kt.lFrame.currentDirectiveIndex;return-1===t?null:i[t]}function Ll(){return kt.lFrame.currentQueryIndex}function Ms(i){kt.lFrame.currentQueryIndex=i}function vA(i){const t=i[at];return 2===t.type?t.declTNode:1===t.type?i[ue]:null}function R_(i,t,e){if(e&Ot.SkipSelf){let r=t,s=i;for(;!(r=r.parent,null!==r||e&Ot.Host||(r=vA(s),null===r||(s=s[Er],10&r.type))););if(null===r)return!1;t=r,i=s}const n=kt.lFrame=Ld();return n.currentTNode=t,n.lView=i,!0}function rp(i){const t=Ld(),e=i[at];kt.lFrame=t,t.currentTNode=e.firstChild,t.lView=i,t.tView=e,t.contextLView=i,t.bindingIndex=e.bindingStartIndex,t.inI18n=!1}function Ld(){const i=kt.lFrame,t=null===i?null:i.child;return null===t?el(i):t}function el(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 k_(){const i=kt.lFrame;return kt.lFrame=i.parent,i.currentTNode=null,i.lView=null,i}const W0=k_;function Nd(){const i=k_();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 Xn(){return kt.lFrame.selectedIndex}function tl(i){kt.lFrame.selectedIndex=i}function Di(){const i=kt.lFrame;return B0(i.tView,i.selectedIndex)}function ki(){kt.lFrame.currentNamespace=Pd}function va(){!function Cc(){kt.lFrame.currentNamespace=null}()}function Bd(i,t){for(let e=t.directiveStart,n=t.directiveEnd;e=n)break}else t[l]<0&&(i[Ho]+=65536),(a>11>16&&(3&i[fn])===t){i[fn]+=2048,Qr(4,a,s);try{s.call(a)}finally{Qr(5,a,s)}}}else{Qr(4,a,s);try{s.call(a)}finally{Qr(5,a,s)}}}const ya=-1;class Ud{constructor(t,e,n){this.factory=t,this.resolving=!1,this.canSeeViewProviders=e,this.injectImpl=n}}function L_(i,t,e){let n=0;for(;nt){o=s-1;break}}}for(;s>16}(i),n=t;for(;e>0;)n=n[Er],e--;return n}let Vd=!0;function cp(i){const t=Vd;return Vd=i,t}const B_=255,Z0=5;let Q0=0;const ba={};function ah(i,t){const e=J0(i,t);if(-1!==e)return e;const n=t[at];n.firstCreatePass&&(i.injectorIndex=t.length,lh(n.data,i),lh(t,null),lh(n.blueprint,null));const r=ch(i,t),s=i.injectorIndex;if(lp(r)){const o=sh(r),a=oh(r,t),l=a[at].data;for(let c=0;c<8;c++)t[s+c]=a[o+c]|l[o+c]}return t[s+8]=r,s}function lh(i,t){i.push(0,0,0,0,0,0,0,0,t)}function J0(i,t){return-1===i.injectorIndex||i.parent&&i.parent.injectorIndex===i.injectorIndex||null===t[i.injectorIndex+8]?-1:i.injectorIndex}function ch(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=uh(r),null===n)return ya;if(e++,r=r[Er],-1!==n.injectorIndex)return n.injectorIndex|e<<16}return ya}function pn(i,t,e){!function U_(i,t,e){let n;"string"==typeof e?n=e.charCodeAt(0)||0:e.hasOwnProperty(eh)&&(n=e[eh]),null==n&&(n=e[eh]=Q0++);const r=n&B_;t.data[i+(r>>Z0)]|=1<=0?t&B_:Js:t}(e);if("function"==typeof s){if(!R_(t,i,n))return n&Ot.Host?ex(r,0,n):zd(t,e,n,r);try{const o=s(n);if(null!=o||n&Ot.Optional)return o;Hf()}finally{W0()}}else if("number"==typeof s){let o=null,a=J0(i,t),l=ya,c=n&Ot.Host?t[sr][ue]:null;for((-1===a||n&Ot.SkipSelf)&&(l=-1===a?ch(i,t):t[a+8],l!==ya&&z_(n,!1)?(o=t[at],a=sh(l),t=oh(l,t)):a=-1);-1!==a;){const d=t[at];if(up(s,a,d.data)){const h=EA(a,t,e,o,n,c);if(h!==ba)return h}l=t[a+8],l!==ya&&z_(n,t[at].data[a+8]===c)&&up(s,a,t)?(o=d,a=sh(l),t=oh(l,t)):a=-1}}return r}function EA(i,t,e,n,r,s){const o=t[at],a=o.data[i+8],d=ts(a,o,e,null==n?Dd(a)&&Vd:n!=o&&0!=(3&a.type),r&Ot.Host&&s===a);return null!==d?Ac(t,o,d,a):ba}function ts(i,t,e,n,r){const s=i.providerIndexes,o=t.data,a=1048575&s,l=i.directiveStart,d=s>>20,p=r?a+d:i.directiveEnd;for(let m=n?a:a+d;m=l&&g.type===e)return m}if(r){const m=o[l];if(m&&vo(m)&&m.type===e)return l}return null}function Ac(i,t,e,n){let r=i[e];const s=t.data;if(function xA(i){return i instanceof Ud}(r)){const o=r;o.resolving&&function E0(i,t){const e=t?`. Dependency path: ${t.join(" > ")} > ${i}`:"";throw new pe(-200,`Circular dependency in DI detected for ${i}${e}`)}(function qn(i){return"function"==typeof i?i.name||i.toString():"object"==typeof i&&null!=i&&"function"==typeof i.type?i.type.name||i.type.toString():Qt(i)}(s[e]));const a=cp(o.canSeeViewProviders);o.resolving=!0;const l=o.injectImpl?Xs(o.injectImpl):null;R_(i,n,Ot.Default);try{r=i[e]=o.factory(void 0,s,i,n),t.firstCreatePass&&e>=n.directiveStart&&function es(i,t,e){const{ngOnChanges:n,ngOnInit:r,ngDoCheck:s}=t.type.prototype;if(n){const o=Rd(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&&Xs(l),cp(a),o.resolving=!1,W0()}}return r}function up(i,t,e){return!!(e[t+(i>>Z0)]&1<{const t=i.prototype.constructor,e=t[ma]||dh(t),n=Object.prototype;let r=Object.getPrototypeOf(i.prototype).constructor;for(;r&&r!==n;){const s=r[ma]||dh(r);if(s&&s!==e)return s;r=Object.getPrototypeOf(r)}return s=>new s})}function dh(i){return Wu(i)?()=>{const t=dh(Pt(i));return t&&t()}:Qa(i)}function uh(i){const t=i[at],e=t.type;return 2===e?t.declTNode:1===e?i[ue]:null}function xa(i){return function SA(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 wa(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,d){const h=l.hasOwnProperty(Tc)?l[Tc]:Object.defineProperty(l,Tc,{value:[]})[Tc];for(;h.length<=d;)h.push(null);return(h[d]=h[d]||[]).push(o),l}}return e&&(r.prototype=Object.create(e.prototype)),r.prototype.ngMetadataName=i,r.annotationCls=r,r})}class me{constructor(t,e){this._desc=t,this.ngMetadataName="InjectionToken",this.\u0275prov=void 0,"number"==typeof e?this.__NG_ELEMENT_ID__=e:void 0!==e&&(this.\u0275prov=ke({token:this,providedIn:e.providedIn||"root",factory:e.factory}))}get multi(){return this}toString(){return`InjectionToken ${this._desc}`}}function Ul(i,t){i.forEach(e=>Array.isArray(e)?Ul(e,t):t(e))}function G_(i,t,e){t>=i.length?i.push(e):i.splice(t,0,e)}function pp(i,t){return t>=i.length-1?i.pop():i.splice(t,1)[0]}function $d(i,t){const e=[];for(let n=0;n=0?i[1|n]=e:(n=~n,function IA(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 jd(i,t){const e=Rc(i,t);if(e>=0)return i[1|e]}function Rc(i,t){return function gp(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),Ss=Cd(Hd("Optional"),8),Ma=Cd(Hd("SkipSelf"),4);var Es=(()=>((Es=Es||{})[Es.Important=1]="Important",Es[Es.DashCase=2]="DashCase",Es))();const Cp=new Map;let vx=0;const iv="__ngContext__";function Gr(i,t){bs(t)?(i[iv]=t[Pl],function yx(i){Cp.set(i[Pl],i)}(t)):i[iv]=t}let sv;function ov(i,t){return sv(i,t)}function vh(i){const t=i[Bi];return xs(t)?t[Bi]:t}function av(i){return Dx(i[bc])}function lv(i){return Dx(i[ys])}function Dx(i){for(;null!==i&&!xs(i);)i=i[ys];return i}function Ir(i,t,e,n,r){if(null!=n){let s,o=!1;xs(n)?s=n:bs(n)&&(o=!0,n=n[Ka]);const a=I(n);0===i&&null!==e?null==r?Ox(t,e,a):Oc(t,e,a,r||null,!0):1===i&&null!==e?Oc(t,e,a,r||null,!0):2===i?function mv(i,t,e){const n=Ap(i,t);n&&function QA(i,t,e,n){i.removeChild(t,e,n)}(i,n,t,e)}(t,a,o):3===i&&t.destroyNode(a),null!=s&&function zx(i,t,e,n,r){const s=e[Kf];s!==I(e)&&Ir(t,i,n,s,r);for(let a=Ui;a0&&(i[e-1][ys]=n[ys]);const s=pp(i,Ui+t);!function WA(i,t){bh(i,t,t[yt],2,null,null),t[Ka]=null,t[ue]=null}(n[at],n);const o=s[Zs];null!==o&&o.detachView(s[at]),n[Bi]=null,n[ys]=null,n[fn]&=-65}return n}function Rx(i,t){if(!(128&t[fn])){const e=t[yt];e.destroyNode&&bh(i,t,e,3,null,null),function qA(i){let t=i[bc];if(!t)return hv(i[at],i);for(;t;){let e=null;if(bs(t))e=t[bc];else{const n=t[Ui];n&&(e=n)}if(!e){for(;t&&!t[ys]&&t!==i;)bs(t)&&hv(t[at],t),t=t[Bi];null===t&&(t=i),bs(t)&&hv(t[at],t),e=t&&t[ys]}t=e}}(t)}}function hv(i,t){if(!(128&t[fn])){t[fn]&=-65,t[fn]|=128,function ZA(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===Ks.None||s===Ks.Emulated)return null}return Ai(n,e)}}(i,t.parent,e)}function Oc(i,t,e,n,r){i.insertBefore(t,e,n,r)}function Ox(i,t,e){i.appendChild(t,e)}function Fx(i,t,e,n,r){null!==n?Oc(i,t,e,n,r):Ox(i,t,e)}function Ap(i,t){return i.parentNode(t)}function Lx(i,t,e){return Bx(i,t,e)}let fv,Rp,vv,Bx=function Nx(i,t,e){return 40&i.type?Ai(i,e):null};function yh(i,t,e,n){const r=kx(i,n,t),s=t[yt],a=Lx(n.parent||t[ue],n,t);if(null!=r)if(Array.isArray(e))for(let l=0;li,createScript:i=>i,createScriptURL:i=>i})}catch{}return Rp}()?.createHTML(i)||i}class Vl{constructor(t){this.changingThisBreaksApplicationSecurity=t}toString(){return`SafeValue must use [property]=binding: ${this.changingThisBreaksApplicationSecurity} (see ${qu})`}}class oD extends Vl{getTypeName(){return"HTML"}}class aD extends Vl{getTypeName(){return"Style"}}class lD extends Vl{getTypeName(){return"Script"}}class cD extends Vl{getTypeName(){return"URL"}}class Pp extends Vl{getTypeName(){return"ResourceURL"}}function to(i){return i instanceof Vl?i.changingThisBreaksApplicationSecurity:i}function Sa(i,t){const e=function dD(i){return i instanceof Vl&&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 ${qu})`)}return e===t}class gD{constructor(t){this.inertDocumentHelper=t}getInertBodyElement(t){t=""+t;try{const e=(new window.DOMParser).parseFromString(Yd(t),"text/html").body;return null===e?this.inertDocumentHelper.getInertBodyElement(t):(e.removeChild(e.firstChild),e)}catch{return null}}}class _D{constructor(t){this.defaultDoc=t,this.inertDocument=this.defaultDoc.implementation.createHTMLDocument("sanitization-inert")}getInertBodyElement(t){const e=this.inertDocument.createElement("template");return e.innerHTML=Yd(t),e}}const vD=/^(?!javascript:)(?:[a-z0-9+.-]+:|[^&:\/?#]*(?:[\/?#]|$))/i;function xh(i){return(i=String(i)).match(vD)?i:"unsafe:"+i}function Ea(i){const t={};for(const e of i.split(","))t[e]=!0;return t}function Fc(...i){const t={};for(const e of i)for(const n in e)e.hasOwnProperty(n)&&(t[n]=!0);return t}const xv=Ea("area,br,col,hr,img,wbr"),wv=Ea("colgroup,dd,dt,li,p,tbody,td,tfoot,th,thead,tr"),Mv=Ea("rp,rt"),Cv=Fc(xv,Fc(wv,Ea("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")),Fc(Mv,Ea("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")),Fc(Mv,wv)),qd=Ea("background,cite,href,itemtype,longdesc,poster,src,xlink:href"),qx=Fc(qd,Ea("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"),Ea("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")),Ev=Ea("script,style,template");class Xx{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(!Cv.hasOwnProperty(e))return this.sanitizedSomething=!0,!Ev.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();Cv.hasOwnProperty(e)&&!xv.hasOwnProperty(e)&&(this.buf.push(""))}chars(t){this.buf.push(Kx(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 bD=/[\uD800-\uDBFF][\uDC00-\uDFFF]/g,xD=/([^\#-~ |!])/g;function Kx(i){return i.replace(/&/g,"&").replace(bD,function(t){return"&#"+(1024*(t.charCodeAt(0)-55296)+(t.charCodeAt(1)-56320)+65536)+";"}).replace(xD,function(t){return"&#"+t.charCodeAt(0)+";"}).replace(//g,">")}let Fp;function Zx(i,t){let e=null;try{Fp=Fp||function Yx(i){const t=new _D(i);return function Op(){try{return!!(new window.DOMParser).parseFromString(Yd(""),"text/html")}catch{return!1}}()?new gD(t):t}(i);let n=t?String(t):"";e=Fp.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=Fp.getInertBodyElement(n)}while(n!==s);return Yd((new Xx).sanitizeChildren(Av(e)||e))}finally{if(e){const n=Av(e)||e;for(;n.firstChild;)n.removeChild(n.firstChild)}}}function Av(i){return"content"in i&&function wD(i){return i.nodeType===Node.ELEMENT_NODE&&"TEMPLATE"===i.nodeName}(i)?i.content:null}var Kn=(()=>((Kn=Kn||{})[Kn.NONE=0]="NONE",Kn[Kn.HTML=1]="HTML",Kn[Kn.STYLE=2]="STYLE",Kn[Kn.SCRIPT=3]="SCRIPT",Kn[Kn.URL=4]="URL",Kn[Kn.RESOURCE_URL=5]="RESOURCE_URL",Kn))();function Lp(i){const t=function wi(){const i=Se();return i&&i[oi]}();return t?t.sanitize(Kn.URL,i)||"":Sa(i,"URL")?to(i):xh(Qt(i))}const Np=new me("ENVIRONMENT_INITIALIZER"),rl=new me("INJECTOR",-1),Jx=new me("INJECTOR_DEF_TYPES");class ew{get(t,e=Rl){if(e===Rl){const n=new Error(`NullInjectorError: No provider for ${pi(t)}!`);throw n.name="NullInjectorError",n}return e}}function AD(...i){return{\u0275providers:tw(0,i),\u0275fromNgModule:!0}}function tw(i,...t){const e=[],n=new Set;let r;return Ul(t,s=>{const o=s;Dv(o,e,[],n)&&(r||(r=[]),r.push(o))}),void 0!==r&&Bp(r,e),e}function Bp(i,t){for(let e=0;e{t.push(s)})}}function Dv(i,t,e,n){if(!(i=Pt(i)))return!1;let r=null,s=p_(i);const o=!s&&Hn(i);if(s||o){if(o&&!o.standalone)return!1;r=i}else{const l=i.ngModule;if(s=p_(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)Dv(c,t,e,n)}}else{if(!s)return!1;{if(null!=s.imports&&!a){let c;n.add(r);try{Ul(s.imports,d=>{Dv(d,t,e,n)&&(c||(c=[]),c.push(d))})}finally{}void 0!==c&&Bp(c,t)}if(!a){const c=Qa(r)||(()=>new r);t.push({provide:r,useFactory:c,deps:$n},{provide:Jx,useValue:r,multi:!0},{provide:Np,useValue:()=>ee(r),multi:!0})}const l=s.providers;null==l||a||Up(l,d=>{t.push(d)})}}return r!==i&&void 0!==i.providers}function Up(i,t){for(let e of i)ju(e)&&(e=e.\u0275providers),Array.isArray(e)?Up(e,t):t(e)}const Vp=ci({provide:String,useValue:ci});function Mi(i){return null!==i&&"object"==typeof i&&Vp in i}function Nc(i){return"function"==typeof i}const Iv=new me("Set Injector scope."),zp={},TD={};let Rv;function wh(){return void 0===Rv&&(Rv=new ew),Rv}class io{}class Hp extends io{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,Pv(t,o=>this.processProvider(o)),this.records.set(rl,jo(void 0,this)),r.has("environment")&&this.records.set(io,jo(void 0,this));const s=this.records.get(Iv);null!=s&&"string"==typeof s.value&&this.scopes.add(s.value),this.injectorDefTypes=new Set(this.get(Jx.multi,$n,Ot.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=Md(this),n=Xs(void 0);try{return t()}finally{Md(e),Xs(n)}}get(t,e=Rl,n=Ot.Default){this.assertNotDestroyed(),n=jf(n);const r=Md(this),s=Xs(void 0);try{if(!(n&Ot.SkipSelf)){let a=this.records.get(t);if(void 0===a){const l=function kD(i){return"function"==typeof i||"object"==typeof i&&i instanceof me}(t)&&Gf(t);a=l&&this.injectableDefInScope(l)?jo(kv(t),zp):null,this.records.set(t,a)}if(null!=a)return this.hydrate(t,a)}return(n&Ot.Self?wh():this.parent).get(t,e=n&Ot.Optional&&e===Rl?null:e)}catch(o){if("NullInjectorError"===o.name){if((o[mi]=o[mi]||[]).unshift(pi(t)),r)throw o;return function v_(i,t,e,n){const r=i[mi];throw t[Wf]&&r.unshift(t[Wf]),i.message=function I0(i,t,e,n=null){i=i&&"\n"===i.charAt(0)&&i.charAt(1)==eA?i.slice(2):i;let r=pi(t);if(Array.isArray(t))r=t.map(pi).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):pi(a)))}r=`{${s.join(", ")}}`}return`${e}${n?"("+n+")":""}[${r}]: ${i.replace(g_,"\n ")}`}("\n"+i.message,r,e,n),i[kl]=r,i[mi]=null,i}(o,t,"R3InjectorError",this.source)}throw o}finally{Xs(s),Md(r)}}resolveInjectorInitializers(){const t=Md(this),e=Xs(void 0);try{const n=this.get(Np.multi,$n,Ot.Self);for(const r of n)r()}finally{Md(t),Xs(e)}}toString(){const t=[],e=this.records;for(const n of e.keys())t.push(pi(n));return`R3Injector[${t.join(", ")}]`}assertNotDestroyed(){if(this._destroyed)throw new pe(205,!1)}processProvider(t){let e=Nc(t=Pt(t))?t:Pt(t&&t.provide);const n=function Gp(i){return Mi(i)?jo(void 0,i.useValue):jo(As(i),zp)}(t);if(Nc(t)||!0!==t.multi)this.records.get(e);else{let r=this.records.get(e);r||(r=jo(void 0,zp,!0),r.factory=()=>Yf(r.multi),this.records.set(e,r)),e=t,r.multi.push(t)}this.records.set(e,n)}hydrate(t,e){return e.value===zp&&(e.value=TD,e.value=e.factory()),"object"==typeof e.value&&e.value&&function RD(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=Pt(t.providedIn);return"string"==typeof e?"any"===e||this.scopes.has(e):this.injectorDefTypes.has(e)}}function kv(i){const t=Gf(i),e=null!==t?t.factory:Qa(i);if(null!==e)return e;if(i instanceof me)throw new pe(204,!1);if(i instanceof Function)return function nw(i){const t=i.length;if(t>0)throw $d(t,"?"),new pe(204,!1);const e=function Xu(i){return i&&(i[wd]||i[m_])||null}(i);return null!==e?()=>e.factory(i):()=>new i}(i);throw new pe(204,!1)}function As(i,t,e){let n;if(Nc(i)){const r=Pt(i);return Qa(r)||kv(r)}if(Mi(i))n=()=>Pt(i.useValue);else if(function Tv(i){return!(!i||!i.useFactory)}(i))n=()=>i.useFactory(...Yf(i.deps||[]));else if(function Pi(i){return!(!i||!i.useExisting)}(i))n=()=>ee(Pt(i.useExisting));else{const r=Pt(i&&(i.useClass||i.provide));if(!function ID(i){return!!i.deps}(i))return Qa(r)||kv(r);n=()=>new r(...Yf(i.deps))}return n}function jo(i,t,e=!1){return{factory:i,value:t,multi:e?[]:void 0}}function Pv(i,t){for(const e of i)Array.isArray(e)?Pv(e,t):e&&ju(e)?Pv(e.\u0275providers,t):t(e)}class PD{}class Ov{}class xo{resolveComponentFactory(t){throw function sl(i){const t=Error(`No component factory found for ${pi(i)}. Did you add it to @NgModule.entryComponents?`);return t.ngComponent=i,t}(t)}}let Hl=(()=>{class i{}return i.NULL=new xo,i})();function FD(){return Fn(Ar(),Se())}function Fn(i,t){return new gt(Ai(i,t))}let gt=(()=>{class i{constructor(e){this.nativeElement=e}}return i.__NG_ELEMENT_ID__=FD,i})();function iw(i){return i instanceof gt?i.nativeElement:i}class Gl{}let ol=(()=>{class i{}return i.__NG_ELEMENT_ID__=()=>function LD(){const i=Se(),e=ws(Ar().index,i);return(bs(e)?e:i)[yt]}(),i})(),ND=(()=>{class i{}return i.\u0275prov=ke({token:i,providedIn:"root",factory:()=>null}),i})();class Bc{constructor(t){this.full=t,this.major=t.split(".")[0],this.minor=t.split(".")[1],this.patch=t.split(".").slice(2).join(".")}}const BD=new Bc("15.2.10"),Fv={},Lv="ngOriginalError";function Nv(i){return i[Lv]}class al{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&&Nv(t);for(;e&&Nv(e);)e=Nv(e);return e||null}}function ll(i){return i instanceof Function?i():i}function sw(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 ow="ng-template";function jD(i,t,e){let n=0,r=!0;for(;ns?"":r[h+1].toLowerCase();const m=8&n?p:null;if(m&&-1!==sw(m,c,0)||2&n&&c!==p){if(Yo(n))return!1;o=!0}}}}else{if(!o&&!Yo(n)&&!Yo(l))return!1;if(o&&Yo(l))continue;o=!1,n=l|1&n}}return Yo(n)||o}function Yo(i){return 0==(1&i)}function aw(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&&!Yo(o)&&(t+=Uc(s,r),r=""),n=o,s=s||!Yo(n);e++}return""!==r&&(t+=Uc(s,r)),t}const on={};function G(i){Hv(zn(),Se(),Xn()+i,!1)}function Hv(i,t,e,n){if(!n)if(3==(3&t[fn])){const s=i.preOrderCheckHooks;null!==s&&sp(t,s,e)}else{const s=i.preOrderHooks;null!==s&&op(t,s,0,e)}tl(e)}function dw(i,t=null,e=null,n){const r=uw(i,t,e,n);return r.resolveInjectorInitializers(),r}function uw(i,t=null,e=null,n,r=new Set){const s=[e||$n,AD(i)];return n=n||("object"==typeof i?void 0:pi(i)),new Hp(s,t||wh(),n||null,r)}let $i=(()=>{class i{static create(e,n){if(Array.isArray(e))return dw({name:""},n,e,"");{const r=e.name??"";return dw({name:r},e.parent,e.providers,r)}}}return i.THROW_IF_NOT_FOUND=Rl,i.NULL=new ew,i.\u0275prov=ke({token:i,providedIn:"any",factory:()=>ee(rl)}),i.__NG_ELEMENT_ID__=-1,i})();function E(i,t=Ot.Default){const e=Se();return null===e?ee(i,t):V_(Ar(),e,Pt(i),t)}function wo(){throw new Error("invalid")}function _w(i,t){const e=i.contentQueries;if(null!==e)for(let n=0;nbi&&Hv(i,t,bi,!1),Qr(o?2:0,r),e(n,r)}finally{tl(s),Qr(o?3:1,r)}}function Zv(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,Ch(i,e,r.hostVars,on),r)}function be(i,t,e,n,r,s){const o=Ai(i,t);!function Xe(i,t,e,n,r,s,o){if(null==s)i.removeAttribute(t,r,e);else{const a=null==o?Qt(s):o(s,n||"",r);i.setAttribute(t,r,a,e)}}(t[yt],o,s,i.value,e,n,r)}function vt(i,t,e,n,r,s){const o=s[t];if(null!==o){const a=n.setInput;for(let l=0;l0&&rs(e)}}function rs(i){for(let n=av(i);null!==n;n=lv(n))for(let r=Ui;r0&&rs(s)}const e=i[at].components;if(null!==e)for(let n=0;n0&&rs(r)}}function ss(i,t){const e=ws(t,i),n=e[at];(function so(i,t){for(let e=t.length;e-1&&(uv(t,n),pp(e,n))}this._attachedToViewContainer=!1}Rx(this._lView[at],this._lView)}onDestroy(t){bw(this._lView[at],this._lView,null,t)}markForCheck(){Ts(this._cdRefInjectingView||this._lView)}detach(){this._lView[fn]&=-65}reattach(){this._lView[fn]|=64}detectChanges(){Mo(this._lView[at],this._lView,this.context)}checkNoChanges(){}attachToViewContainerRef(){if(this._appRef)throw new pe(902,!1);this._attachedToViewContainer=!0}detachFromAppRef(){this._appRef=null,function YA(i,t){bh(i,t,t[yt],2,null,null)}(this._lView[at],this._lView)}attachToAppRef(t){if(this._attachedToViewContainer)throw new pe(902,!1);this._appRef=t}}class b8 extends ny{constructor(t){super(t),this._view=t}detectChanges(){const t=this._view;Mo(t[at],t,t[Ue],!1)}checkNoChanges(){}get context(){return null}}class KF extends Hl{constructor(t){super(),this.ngModule=t}resolveComponentFactory(t){const e=Hn(t);return new iy(e,this.ngModule)}}function ZF(i){const t=[];for(let e in i)i.hasOwnProperty(e)&&t.push({propName:i[e],templateName:e});return t}class w8{constructor(t,e){this.injector=t,this.parentInjector=e}get(t,e,n){n=jf(n);const r=this.injector.get(t,Fv,n);return r!==Fv||e===Fv?r:this.parentInjector.get(t,e,n)}}class iy extends Ov{get inputs(){return ZF(this.componentDef.inputs)}get outputs(){return ZF(this.componentDef.outputs)}constructor(t,e){super(),this.componentDef=t,this.ngModule=e,this.componentType=t.type,this.selector=function e1(i){return i.map(JD).join(",")}(t.selectors),this.ngContentSelectors=t.ngContentSelectors?t.ngContentSelectors:[],this.isBoundToModule=!!e}create(t,e,n,r){let s=(r=r||this.ngModule)instanceof io?r:r?.injector;s&&null!==this.componentDef.getStandaloneInjector&&(s=this.componentDef.getStandaloneInjector(s)||s);const o=s?new w8(t,s):t,a=o.get(Gl,null);if(null===a)throw new pe(407,!1);const l=o.get(ND,null),c=a.createRenderer(null,this.componentDef),d=this.componentDef.selectors[0][0]||"div",h=n?function M1(i,t,e){return i.selectRootElement(t,e===Ks.ShadowDom)}(c,n,this.componentDef.encapsulation):Ep(c,d,function x8(i){const t=i.toLowerCase();return"svg"===t?Pd:"math"===t?"math":null}(d)),p=this.componentDef.onPush?288:272,m=ey(0,null,null,1,0,null,null,null,null,null),g=Mh(null,m,null,p,null,null,a,c,l,o,null);let b,v;rp(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 C8(i,t){const e=i[at],n=bi;return i[n]=t,Qd(e,n,2,"#host",null)}(g,h),F=function S8(i,t,e,n,r,s,o,a){const l=r[at];!function E8(i,t,e,n){for(const r of i)t.mergedAttrs=Ec(t.mergedAttrs,r.hostAttrs);null!==t.mergedAttrs&&(Cw(t,t.mergedAttrs,!0),null!==e&&Gx(n,e,t))}(n,i,t,o);const c=s.createRenderer(t,e),d=Mh(r,yw(e),null,e.onPush?32:16,r[i.index],i,s,c,a||null,null,null);return l.firstCreatePass&&P(l,i,n.length-1),Ti(r,d),r[i.index]=d}(C,h,y,M,g,a,c);v=B0(m,bi),h&&function D8(i,t,e,n){if(n)L_(i,e,["ng-version",BD.full]);else{const{attrs:r,classes:s}=function t1(i){const t=[],e=[];let n=1,r=2;for(;n0&&Hx(i,e,s.join(" "))}}(c,y,h,n),void 0!==e&&function T8(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=Ec(r.hostAttrs,e=Ec(e,r.hostAttrs))}}(n)}function P1(i){return i===Xa?{}:i===$n?[]:i}function k8(i,t){const e=i.viewQuery;i.viewQuery=e?(n,r)=>{t(n,r),e(n,r)}:t}function P8(i,t){const e=i.contentQueries;i.contentQueries=e?(n,r,s)=>{t(n,r,s),e(n,r,s)}:t}function O8(i,t){const e=i.hostBindings;i.hostBindings=e?(n,r)=>{t(n,r),e(n,r)}:t}function Ew(i){return!!O1(i)&&(Array.isArray(i)||!(i instanceof Map)&&Symbol.iterator in i)}function O1(i){return null!==i&&("function"==typeof i||"object"==typeof i)}function $l(i,t,e){return i[t]=e}function Is(i,t,e){return!Object.is(i[t],e)&&(i[t]=e,!0)}function Eh(i,t,e,n){const r=Is(i,t,e);return Is(i,t+1,n)||r}function Dt(i,t,e,n){const r=Se();return Is(r,Fl(),t)&&(zn(),be(Di(),r,i,t,e,n)),Dt}function jp(i,t,e,n){return Is(i,Fl(),e)?t+Qt(e)+n:on}function Yp(i,t,e,n,r,s){const a=Eh(i,function Ja(){return kt.lFrame.bindingIndex}(),e,r);return Qs(2),a?t+Qt(e)+n+Qt(r)+s:on}function fe(i,t,e,n,r,s,o,a){const l=Se(),c=zn(),d=i+bi,h=c.firstCreatePass?function $8(i,t,e,n,r,s,o,a,l){const c=t.consts,d=Qd(t,i,4,o||null,Ol(c,a));ty(t,e,d,Ol(c,l)),Bd(t,d);const h=d.tView=ey(2,d,n,r,s,t.directiveRegistry,t.pipeRegistry,null,t.schemas,c);return null!==t.queries&&(t.queries.template(t,d),h.queries=t.queries.embeddedTView(d)),d}(d,c,l,t,e,n,r,s,o):c.data[d];_a(h,!1);const p=l[yt].createComment("");yh(c,l,p,h),Gr(p,l),Ti(l,l[d]=mn(p,l,p,h)),xc(h)&&Qv(c,l,h),null!=o&&Jv(l,h,a)}function Zi(i){return Fd(function gA(){return kt.lFrame.contextLView}(),bi+i)}function U(i,t,e){const n=Se();return Is(n,Fl(),t)&&ro(zn(),Di(),n,i,t,n[yt],e,!1),U}function F1(i,t,e,n,r){const o=r?"class":"style";k1(i,e,t.inputs[o],o,n)}function W(i,t,e,n){const r=Se(),s=zn(),o=bi+i,a=r[yt],l=s.firstCreatePass?function j8(i,t,e,n,r,s){const o=t.consts,l=Qd(t,i,2,n,Ol(o,r));return ty(t,e,l,Ol(o,s)),null!==l.attrs&&Cw(l,l.attrs,!1),null!==l.mergedAttrs&&Cw(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]=Ep(a,t,function Y0(){return kt.lFrame.currentNamespace}()),d=xc(l);return _a(l,!0),Gx(a,c,l),32!=(32&l.flags)&&yh(s,r,c,l),0===function uA(){return kt.lFrame.elementDepthCount}()&&Gr(c,r),function hA(){kt.lFrame.elementDepthCount++}(),d&&(Qv(s,r,l),Zv(s,l,r)),null!==n&&Jv(r,l),W}function j(){let i=Ar();D_()?T_():(i=i.parent,_a(i,!1));const t=i;!function fA(){kt.lFrame.elementDepthCount--}();const e=zn();return e.firstCreatePass&&(Bd(e,i),Qf(i)&&e.queries.elementEnd(i)),null!=t.classesWithoutHost&&function wA(i){return 0!=(8&i.flags)}(t)&&F1(e,t,Se(),t.classesWithoutHost,!0),null!=t.stylesWithoutHost&&function F_(i){return 0!=(16&i.flags)}(t)&&F1(e,t,Se(),t.stylesWithoutHost,!1),j}function Pe(i,t,e,n){return W(i,t,e,n),j(),Pe}function $r(i,t,e){const n=Se(),r=zn(),s=i+bi,o=r.firstCreatePass?function Y8(i,t,e,n,r){const s=t.consts,o=Ol(s,n),a=Qd(t,i,8,"ng-container",o);return null!==o&&Cw(a,o,!0),ty(t,e,a,Ol(s,r)),null!==t.queries&&t.queries.elementStart(t,a),a}(s,r,n,t,e):r.data[s];_a(o,!0);const a=n[s]=n[yt].createComment("");return yh(r,n,a,o),Gr(a,n),xc(o)&&(Qv(r,n,o),Zv(r,o,n)),null!=e&&Jv(n,o),$r}function Wr(){let i=Ar();const t=zn();return D_()?T_():(i=i.parent,_a(i,!1)),t.firstCreatePass&&(Bd(t,i),Qf(i)&&t.queries.elementEnd(i)),Wr}function sy(i,t,e){return $r(i,t,e),Wr(),sy}function ai(){return Se()}function oy(i){return!!i&&"function"==typeof i.then}function uL(i){return!!i&&"function"==typeof i.subscribe}const L1=uL;function Le(i,t,e,n){const r=Se(),s=zn(),o=Ar();return hL(s,r,r[yt],o,i,t,n),Le}function N1(i,t){const e=Ar(),n=Se(),r=zn();return hL(r,n,qF(rh(r.data),e,n),e,i,t),N1}function hL(i,t,e,n,r,s,o){const a=xc(n),c=i.firstCreatePass&&YF(i),d=t[Ue],h=jF(t);let p=!0;if(3&n.type||o){const b=Ai(n,t),v=o?o(b):b,y=h.length,M=o?C=>o(I(C[n.index])):n.index;let x=null;if(!o&&a&&(x=function q8(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=pL(n,t,d,s,!1);const C=e.listen(v,r,s);h.push(s,C),c&&c.push(r,M,y,y+1)}}else s=pL(n,t,d,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?ws(i.index,t):t);let l=fL(t,e,n,o),c=s.__ngNextListenerFn__;for(;c;)l=fL(t,e,c,o)&&l,c=c.__ngNextListenerFn__;return r&&!1===l&&(o.preventDefault(),o.returnValue=!1),l}}function he(i=1){return function yA(i){return(kt.lFrame.contextLView=function j0(i,t){for(;i>0;)t=t[Er],i--;return t}(i,kt.lFrame.contextLView))[Ue]}(i)}function X8(i,t){let e=null;const n=function XD(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 V1(i){return 2|i}function Ah(i){return(131068&i)>>2}function z1(i,t){return-131069&i|t<<2}function H1(i){return 1|i}function ML(i,t,e,n,r){const s=i[e+1],o=null===t;let a=n?eu(s):Ah(s),l=!1;for(;0!==a&&(!1===l||o);){const d=i[a+1];tW(i[a],t)&&(l=!0,i[a+1]=n?H1(d):V1(d)),a=n?eu(d):Ah(d)}l&&(i[e+1]=n?V1(s):H1(s))}function tW(i,t){return null===i||null==t||(Array.isArray(i)?i[1]:i)===t||!(!Array.isArray(i)||"string"!=typeof t)&&Rc(i,t)>=0}const Rr={textEnd:0,key:0,keyEnd:0,value:0,valueEnd:0};function CL(i){return i.substring(Rr.key,Rr.keyEnd)}function SL(i,t){const e=Rr.textEnd;return e===t?-1:(t=Rr.keyEnd=function sW(i,t,e){for(;t32;)t++;return t}(i,Rr.key=t,e),em(i,t,e))}function em(i,t,e){for(;t=0;e=SL(t,e))Cs(i,CL(t),!0)}function cl(i,t,e,n){const r=Se(),s=zn(),o=Qs(2);s.firstUpdatePass&&RL(s,i,o,n),t!==on&&Is(r,o,t)&&PL(s,s.data[Xn()],r,r[yt],i,r[o+1]=function _W(i,t){return null==i||""===i||("string"==typeof t?i+=t:"object"==typeof i&&(i=pi(to(i)))),i}(t,e),n,o)}function IL(i,t){return t>=i.expandoStartIndex}function RL(i,t,e,n){const r=i.data;if(null===r[e+1]){const s=r[Xn()],o=IL(i,e);FL(s,n)&&null===t&&!o&&(t=!1),t=function dW(i,t,e,n){const r=rh(i);let s=n?t.residualClasses:t.residualStyles;if(null===r)0===(n?t.classBindings:t.styleBindings)&&(e=ay(e=G1(null,i,t,e,n),t.attrs,n),s=null);else{const o=t.directiveStylingLast;if(-1===o||i[o]!==r)if(e=G1(r,i,t,e,n),null===s){let l=function uW(i,t,e){const n=e?t.classBindings:t.styleBindings;if(0!==Ah(n))return i[eu(n)]}(i,t,n);void 0!==l&&Array.isArray(l)&&(l=G1(null,i,t,l[1],n),l=ay(l,t.attrs,n),function hW(i,t,e,n){i[eu(e?t.classBindings:t.styleBindings)]=n}(i,t,n,l))}else s=function fW(i,t,e){let n;const r=t.directiveEnd;for(let s=1+t.directiveStylingLast;s0)&&(c=!0)):d=e,r)if(0!==l){const p=eu(i[a+1]);i[n+1]=Dw(p,a),0!==p&&(i[p+1]=z1(i[p+1],n)),i[a+1]=function Z8(i,t){return 131071&i|t<<17}(i[a+1],n)}else i[n+1]=Dw(a,0),0!==a&&(i[a+1]=z1(i[a+1],n)),a=n;else i[n+1]=Dw(l,0),0===a?a=n:i[l+1]=z1(i[l+1],n),l=n;c&&(i[n+1]=V1(i[n+1])),ML(i,d,n,!0),ML(i,d,n,!1),function eW(i,t,e,n,r){const s=r?i.residualClasses:i.residualStyles;null!=s&&"string"==typeof t&&Rc(s,t)>=0&&(e[n+1]=H1(e[n+1]))}(t,d,i,n,s),o=Dw(a,l),s?t.classBindings=o:t.styleBindings=o}(r,s,t,e,o,n)}}function G1(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),d=c?l[1]:l,h=null===d;let p=e[r+1];p===on&&(p=h?$n:void 0);let m=h?jd(p,n):d===n?p:void 0;if(c&&!Tw(m)&&(m=jd(l,n)),Tw(m)&&(a=m,o))return a;const g=i[r+1];r=o?eu(g):Ah(g)}if(null!==t){let l=s?t.residualClasses:t.residualStyles;null!=l&&(a=jd(l,n))}return a}function Tw(i){return void 0!==i}function FL(i,t){return 0!=(i.flags&(t?8:16))}function ze(i,t=""){const e=Se(),n=zn(),r=i+bi,s=n.firstCreatePass?Qd(n,r,1,t,null):n.data[r],o=e[r]=function cv(i,t){return i.createText(t)}(e[yt],t);yh(n,e,o,s),_a(s,!1)}function _i(i){return Qi("",i,""),_i}function Qi(i,t,e){const n=Se(),r=jp(n,i,t,e);return r!==on&&Vc(n,Xn(),r),Qi}function tm(i,t,e,n,r){const s=Se(),o=Yp(s,i,t,e,n,r);return o!==on&&Vc(s,Xn(),o),tm}function GL(i,t,e){!function dl(i,t,e,n){const r=zn(),s=Qs(2);r.firstUpdatePass&&RL(r,null,s,n);const o=Se();if(e!==on&&Is(o,s,e)){const a=r.data[Xn()];if(FL(a,n)&&!IL(r,s)){let l=n?a.classesWithoutHost:a.stylesWithoutHost;null!==l&&(e=Vf(l,e||"")),F1(r,a,o,e,n)}else!function gW(i,t,e,n,r,s,o,a){r===on&&(r=$n);let l=0,c=0,d=0((rt=rt||{})[rt.LocaleId=0]="LocaleId",rt[rt.DayPeriodsFormat=1]="DayPeriodsFormat",rt[rt.DayPeriodsStandalone=2]="DayPeriodsStandalone",rt[rt.DaysFormat=3]="DaysFormat",rt[rt.DaysStandalone=4]="DaysStandalone",rt[rt.MonthsFormat=5]="MonthsFormat",rt[rt.MonthsStandalone=6]="MonthsStandalone",rt[rt.Eras=7]="Eras",rt[rt.FirstDayOfWeek=8]="FirstDayOfWeek",rt[rt.WeekendRange=9]="WeekendRange",rt[rt.DateFormat=10]="DateFormat",rt[rt.TimeFormat=11]="TimeFormat",rt[rt.DateTimeFormat=12]="DateTimeFormat",rt[rt.NumberSymbols=13]="NumberSymbols",rt[rt.NumberFormats=14]="NumberFormats",rt[rt.CurrencyCode=15]="CurrencyCode",rt[rt.CurrencySymbol=16]="CurrencySymbol",rt[rt.CurrencyName=17]="CurrencyName",rt[rt.Currencies=18]="Currencies",rt[rt.Directionality=19]="Directionality",rt[rt.PluralCase=20]="PluralCase",rt[rt.ExtraData=21]="ExtraData",rt))();const im="en-US";let t2=im;function j1(i,t,e,n,r){if(i=Pt(i),Array.isArray(i))for(let s=0;s>20;if(Nc(i)||!i.multi){const m=new Ud(l,r,E),g=q1(a,t,r?d:d+p,h);-1===g?(pn(ah(c,o),s,a),Y1(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=q1(a,t,d+p,h),g=q1(a,t,d,d+p),v=g>=0&&e[g];if(r&&!v||!r&&!(m>=0&&e[m])){pn(ah(c,o),s,a);const y=function Oj(i,t,e,n,r){const s=new Ud(i,e,E);return s.multi=[],s.index=t,s.componentProviders=0,A2(s,r,n&&!e),s}(r?Pj:kj,e.length,r,n,l);!r&&v&&(e[g].providerFactory=y),Y1(s,i,t.length,0),t.push(a),c.directiveStart++,c.directiveEnd++,r&&(c.providerIndexes+=1048576),e.push(y),o.push(y)}else Y1(s,i,m>-1?m:g,A2(e[r?g:m],l,!r&&n));!r&&n&&v&&e[g].componentProviders++}}}function Y1(i,t,e,n){const r=Nc(t),s=function DD(i){return!!i.useClass}(t);if(r||s){const l=(s?Pt(t.useClass):t).prototype.ngOnDestroy;if(l){const c=i.destroyHooks||(i.destroyHooks=[]);if(!r&&t.multi){const d=c.indexOf(e);-1===d?c.push(e,[n,l]):c[d+1].push(n,l)}else c.push(e,l)}}}function A2(i,t,e){return e&&i.componentProviders++,i.multi.push(t)-1}function q1(i,t,e,n){for(let r=e;r{e.providersResolver=(n,r)=>function Rj(i,t,e){const n=zn();if(n.firstCreatePass){const r=vo(i);j1(e,n.data,n.blueprint,r,!0),j1(t,n.data,n.blueprint,r,!1)}}(n,r?r(i):i,t)}}class rm{}class D2{}class T2 extends rm{constructor(t,e){super(),this._parent=e,this._bootstrapComponents=[],this.destroyCbs=[],this.componentFactoryResolver=new KF(this);const n=hr(t);this._bootstrapComponents=ll(n.bootstrap),this._r3Injector=uw(t,e,[{provide:rm,useValue:this},{provide:Hl,useValue:this.componentFactoryResolver}],pi(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 K1 extends D2{constructor(t){super(),this.moduleType=t}create(t){return new T2(this.moduleType,t)}}class Lj extends rm{constructor(t,e,n){super(),this.componentFactoryResolver=new KF(this),this.instance=null;const r=new Hp([...t,{provide:rm,useValue:this},{provide:Hl,useValue:this.componentFactoryResolver}],e||wh(),n,new Set(["environment"]));this.injector=r,r.resolveInjectorInitializers()}destroy(){this.injector.destroy()}onDestroy(t){this.injector.onDestroy(t)}}function Fw(i,t,e=null){return new Lj(i,t,e).injector}let Nj=(()=>{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=tw(0,e.type),r=n.length>0?Fw([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=ke({token:i,providedIn:"environment",factory:()=>new i(ee(io))}),i})();function Z1(i){i.getStandaloneInjector=t=>t.get(Nj).getOrCreateStandaloneInjector(i)}function Rs(i,t,e){const n=zr()+i,r=Se();return r[n]===on?$l(r,n,e?t.call(e):t()):function ry(i,t){return i[t]}(r,n)}function sm(i,t,e,n){return N2(Se(),zr(),i,t,e,n)}function L2(i,t,e,n,r,s,o){return function V2(i,t,e,n,r,s,o,a,l){const c=t+e;return function Aa(i,t,e,n,r,s){const o=Eh(i,t,e,n);return Eh(i,t+2,r,s)||o}(i,c,r,s,o,a)?$l(i,c+4,l?n.call(l,r,s,o,a):n(r,s,o,a)):fy(i,c+4)}(Se(),zr(),i,t,e,n,r,s,o)}function fy(i,t){const e=i[t];return e===on?void 0:e}function N2(i,t,e,n,r,s){const o=t+e;return Is(i,o,r)?$l(i,o+1,s?n.call(s,r):n(r)):fy(i,o+1)}function Ct(i,t){const e=zn();let n;const r=i+bi;e.firstCreatePass?(n=function Jj(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=Qa(n.type)),o=Xs(E);try{const a=cp(!1),l=s();return cp(a),function W8(i,t,e,n){e>=i.data.length&&(i.data[e]=null,i.blueprint[e]=null),t[e]=n}(e,Se(),r,l),l}finally{Xs(o)}}function Tt(i,t,e){const n=i+bi,r=Se(),s=Fd(r,n);return py(r,n)?N2(r,zr(),t,s.transform,e,s):s.transform(e)}function J1(i,t,e,n){const r=i+bi,s=Se(),o=Fd(s,r);return py(s,r)?function B2(i,t,e,n,r,s,o){const a=t+e;return Eh(i,a,r,s)?$l(i,a+2,o?n.call(o,r,s):n(r,s)):fy(i,a+2)}(s,zr(),t,o.transform,e,n,o):o.transform(e,n)}function py(i,t){return i[at].data[t].pure}function eT(i){return t=>{setTimeout(i,void 0,t)}}const $e=class r6 extends Re{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=eT(s),r&&(r=eT(r)),o&&(o=eT(o)));const a=super.subscribe({next:r,error:s,complete:o});return t instanceof Zt&&t.add(a),a}};function s6(){return this._results[Symbol.iterator]()}class om{get changes(){return this._changes||(this._changes=new $e)}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=om.prototype;e[Symbol.iterator]||(e[Symbol.iterator]=s6)}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 Dr(i){return i.flat(Number.POSITIVE_INFINITY)}(t);(this._changesDetected=!function fp(i,t,e){if(i.length!==t.length)return!1;for(let n=0;n{class i{}return i.__NG_ELEMENT_ID__=l6,i})();const o6=Co,a6=class extends o6{constructor(t,e,n){super(),this._declarationLView=t,this._declarationTContainer=e,this.elementRef=n}createEmbeddedView(t,e){const n=this._declarationTContainer.tView,r=Mh(this._declarationLView,n,t,16,null,n.declTNode,null,null,null,null,e||null);r[nh]=this._declarationLView[this._declarationTContainer.index];const o=this._declarationLView[Zs];return null!==o&&(r[Zs]=o.createEmbeddedView(n)),Sh(n,r,t),new ny(r)}};function l6(){return Lw(Ar(),Se())}function Lw(i,t){return 4&i.type?new a6(t,i,Fn(i,t)):null}let jr=(()=>{class i{}return i.__NG_ELEMENT_ID__=c6,i})();function c6(){return $2(Ar(),Se())}const d6=jr,H2=class extends d6{constructor(t,e,n){super(),this._lContainer=t,this._hostTNode=e,this._hostLView=n}get element(){return Fn(this._hostTNode,this._hostLView)}get injector(){return new Dc(this._hostTNode,this._hostLView)}get parentInjector(){const t=ch(this._hostTNode,this._hostLView);if(lp(t)){const e=oh(t,this._hostLView),n=sh(t);return new Dc(e[at].data[n+8],e)}return new Dc(null,this._hostLView)}clear(){for(;this.length>0;)this.remove(this.length-1)}get(t){const e=G2(this._lContainer);return null!==e&&e[t]||null}get length(){return this._lContainer.length-Ui}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 hh(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 iy(Hn(t)),c=n||this.parentInjector;if(!s&&null==l.ngModule){const p=(o?c:this.parentInjector).get(io,null);p&&(s=p)}const d=l.create(c,r,void 0,s);return this.insert(d.hostView,a),d}insert(t,e){const n=t._lView,r=n[at];if(function dA(i){return xs(i[Bi])}(n)){const d=this.indexOf(t);if(-1!==d)this.detach(d);else{const h=n[Bi],p=new H2(h,h[ue],h[Bi]);p.detach(p.indexOf(t))}}const s=this._adjustIndex(e),o=this._lContainer;!function dv(i,t,e,n){const r=Ui+n,s=e.length;n>0&&(e[r-1][ys]=t),n0)n.push(o[a/2]);else{const c=s[a+1],d=t[-l];for(let h=Ui;h{class i{constructor(e){this.appInits=e,this.resolve=Bw,this.reject=Bw,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)(ee(Uw,8))},i.\u0275prov=ke({token:i,factory:i.\u0275fac,providedIn:"root"}),i})();const cm=new me("AppId",{providedIn:"root",factory:function fN(){return`${hT()}${hT()}${hT()}`}});function hT(){return String.fromCharCode(97+Math.floor(25*Math.random()))}const pN=new me("Platform Initializer"),fT=new me("Platform ID",{providedIn:"platform",factory:()=>"unknown"}),kr=new me("AnimationModuleType");let L6=(()=>{class i{log(e){console.log(e)}warn(e){console.warn(e)}}return i.\u0275fac=function(e){return new(e||i)},i.\u0275prov=ke({token:i,factory:i.\u0275fac,providedIn:"platform"}),i})();const ql=new me("LocaleId",{providedIn:"root",factory:()=>Ft(ql,Ot.Optional|Ot.SkipSelf)||function N6(){return typeof $localize<"u"&&$localize.locale||im}()});class U6{constructor(t,e){this.ngModuleFactory=t,this.componentFactories=e}}let mN=(()=>{class i{compileModuleSync(e){return new K1(e)}compileModuleAsync(e){return Promise.resolve(this.compileModuleSync(e))}compileModuleAndAllComponentsSync(e){const n=this.compileModuleSync(e),s=ll(hr(e).declarations).reduce((o,a)=>{const l=Hn(a);return l&&o.push(new iy(l)),o},[]);return new U6(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=ke({token:i,factory:i.\u0275fac,providedIn:"root"}),i})();const H6=(()=>Promise.resolve(0))();function pT(i){typeof Zone>"u"?H6.then(()=>{i&&i.apply(null,null)}):Zone.current.scheduleMicroTask("scheduleMicrotask",i)}class pt{constructor({enableLongStackTrace:t=!1,shouldCoalesceEventChangeDetection:e=!1,shouldCoalesceRunChangeDetection:n=!1}){if(this.hasPendingMacrotasks=!1,this.hasPendingMicrotasks=!1,this.isStable=!0,this.onUnstable=new $e(!1),this.onMicrotaskEmpty=new $e(!1),this.onStable=new $e(!1),this.onError=new $e(!1),typeof Zone>"u")throw new pe(908,!1);Zone.assertZonePatched();const r=this;r._nesting=0,r._outer=r._inner=Zone.current,Zone.TaskTrackingZoneSpec&&(r._inner=r._inner.fork(new Zone.TaskTrackingZoneSpec)),t&&Zone.longStackTraceZoneSpec&&(r._inner=r._inner.fork(Zone.longStackTraceZoneSpec)),r.shouldCoalesceEventChangeDetection=!n&&e,r.shouldCoalesceRunChangeDetection=n,r.lastRequestAnimationFrameId=-1,r.nativeRequestAnimationFrame=function G6(){let i=Rn.requestAnimationFrame,t=Rn.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 j6(i){const t=()=>{!function W6(i){i.isCheckStableRunning||-1!==i.lastRequestAnimationFrameId||(i.lastRequestAnimationFrameId=i.nativeRequestAnimationFrame.call(Rn,()=>{i.fakeTopEventTask||(i.fakeTopEventTask=Zone.root.scheduleEventTask("fakeTopEventTask",()=>{i.lastRequestAnimationFrameId=-1,gT(i),i.isCheckStableRunning=!0,mT(i),i.isCheckStableRunning=!1},void 0,()=>{},()=>{})),i.fakeTopEventTask.invoke()}),gT(i))}(i)};i._inner=i._inner.fork({name:"angular",properties:{isAngularZone:!0},onInvokeTask:(e,n,r,s,o,a)=>{try{return vN(i),e.invokeTask(r,s,o,a)}finally{(i.shouldCoalesceEventChangeDetection&&"eventTask"===s.type||i.shouldCoalesceRunChangeDetection)&&t(),yN(i)}},onInvoke:(e,n,r,s,o,a,l)=>{try{return vN(i),e.invoke(r,s,o,a,l)}finally{i.shouldCoalesceRunChangeDetection&&t(),yN(i)}},onHasTask:(e,n,r,s)=>{e.hasTask(r,s),n===r&&("microTask"==s.change?(i._hasPendingMicrotasks=s.microTask,gT(i),mT(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(!pt.isInAngularZone())throw new pe(909,!1)}static assertNotInAngularZone(){if(pt.isInAngularZone())throw new pe(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,$6,Bw,Bw);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 $6={};function mT(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 gT(i){i.hasPendingMicrotasks=!!(i._hasPendingMicrotasks||(i.shouldCoalesceEventChangeDetection||i.shouldCoalesceRunChangeDetection)&&-1!==i.lastRequestAnimationFrameId)}function vN(i){i._nesting++,i.isStable&&(i.isStable=!1,i.onUnstable.emit(null))}function yN(i){i._nesting--,mT(i)}class Y6{constructor(){this.hasPendingMicrotasks=!1,this.hasPendingMacrotasks=!1,this.isStable=!0,this.onUnstable=new $e,this.onMicrotaskEmpty=new $e,this.onStable=new $e,this.onError=new $e}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 bN=new me(""),zw=new me("");let yT,_T=(()=>{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,yT||(function q6(i){yT=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:()=>{pt.assertNotInAngularZone(),pT(()=>{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())pT(()=>{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)(ee(pt),ee(vT),ee(zw))},i.\u0275prov=ke({token:i,factory:i.\u0275fac}),i})(),vT=(()=>{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 yT?.findTestabilityInTree(this,e,n)??null}}return i.\u0275fac=function(e){return new(e||i)},i.\u0275prov=ke({token:i,factory:i.\u0275fac,providedIn:"platform"}),i})();const Hc=!1;let tu=null;const xN=new me("AllowMultipleToken"),bT=new me("PlatformDestroyListeners"),wN=new me("appBootstrapListener");class MN{constructor(t,e){this.name=t,this.token=e}}function SN(i,t,e=[]){const n=`Platform: ${t}`,r=new me(n);return(s=[])=>{let o=xT();if(!o||o.injector.get(xN,!1)){const a=[...e,...s,{provide:r,useValue:!0}];i?i(a):function Z6(i){if(tu&&!tu.get(xN,!1))throw new pe(400,!1);tu=i;const t=i.get(AN);(function CN(i){const t=i.get(pN,null);t&&t.forEach(e=>e())})(i)}(function EN(i=[],t){return $i.create({name:t,providers:[{provide:Iv,useValue:"platform"},{provide:bT,useValue:new Set([()=>tu=null])},...i]})}(a,n))}return function J6(i){const t=xT();if(!t)throw new pe(401,!1);return t}()}}function xT(){return tu?.get(AN)??null}let AN=(()=>{class i{constructor(e){this._injector=e,this._modules=[],this._destroyListeners=[],this._destroyed=!1}bootstrapModuleFactory(e,n){const r=function TN(i,t){let e;return e="noop"===i?new Y6:("zone.js"===i?void 0:i)||new pt(t),e}(n?.ngZone,function DN(i){return{enableLongStackTrace:!1,shouldCoalesceEventChangeDetection:!(!i||!i.ngZoneEventCoalescing)||!1,shouldCoalesceRunChangeDetection:!(!i||!i.ngZoneRunCoalescing)||!1}}(n)),s=[{provide:pt,useValue:r}];return r.run(()=>{const o=$i.create({providers:s,parent:this.injector,name:e.moduleType.name}),a=e.create(o),l=a.injector.get(al,null);if(!l)throw new pe(402,!1);return r.runOutsideAngular(()=>{const c=r.onError.subscribe({next:d=>{l.handleError(d)}});a.onDestroy(()=>{Hw(this._modules,a),c.unsubscribe()})}),function IN(i,t,e){try{const n=e();return oy(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(Vw);return c.runInitializers(),c.donePromise.then(()=>(function n2(i){En(i,"Expected localeId to be defined"),"string"==typeof i&&(t2=i.toLowerCase().replace(/_/g,"-"))}(a.injector.get(ql,im)||im),this._moduleDoBootstrap(a),a))})})}bootstrapModule(e,n=[]){const r=RN({},n);return function X6(i,t,e){const n=new K1(e);return Promise.resolve(n)}(0,0,e).then(s=>this.bootstrapModuleFactory(s,r))}_moduleDoBootstrap(e){const n=e.injector.get(dm);if(e._bootstrapComponents.length>0)e._bootstrapComponents.forEach(r=>n.bootstrap(r));else{if(!e.instance.ngDoBootstrap)throw new pe(-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 pe(404,!1);this._modules.slice().forEach(n=>n.destroy()),this._destroyListeners.forEach(n=>n());const e=this._injector.get(bT,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)(ee($i))},i.\u0275prov=ke({token:i,factory:i.\u0275fac,providedIn:"platform"}),i})();function RN(i,t){return Array.isArray(t)?t.reduce(RN,i):{...i,...t}}let dm=(()=>{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 In(a=>{this._stable=this._zone.isStable&&!this._zone.hasPendingMacrotasks&&!this._zone.hasPendingMicrotasks,this._zone.runOutsideAngular(()=>{a.next(this._stable),a.complete()})}),o=new In(a=>{let l;this._zone.runOutsideAngular(()=>{l=this._zone.onStable.subscribe(()=>{pt.assertNotInAngularZone(),pT(()=>{!this._stable&&!this._zone.hasPendingMacrotasks&&!this._zone.hasPendingMicrotasks&&(this._stable=!0,a.next(!0))})})});const c=this._zone.onUnstable.subscribe(()=>{pt.assertInAngularZone(),this._stable&&(this._stable=!1,this._zone.runOutsideAngular(()=>{a.next(!1)}))});return()=>{l.unsubscribe(),c.unsubscribe()}});this.isStable=Cr(s,o.pipe(Uf()))}bootstrap(e,n){const r=e instanceof Ov;if(!this._injector.get(Vw).done){!r&&function Ed(i){const t=Hn(i)||Vr(i)||vs(i);return null!==t&&t.standalone}(e);throw new pe(405,Hc)}let o;o=r?e:this._injector.get(Hl).resolveComponentFactory(e),this.componentTypes.push(o.componentType);const a=function K6(i){return i.isBoundToModule}(o)?void 0:this._injector.get(rm),c=o.create($i.NULL,[],n||o.selector,a),d=c.location.nativeElement,h=c.injector.get(bN,null);return h?.registerApplication(d),c.onDestroy(()=>{this.detachView(c.hostView),Hw(this.components,c),h?.unregisterApplication(d)}),this._loadComponent(c),c}tick(){if(this._runningTick)throw new pe(101,!1);try{this._runningTick=!0;for(let e of this._views)e.detectChanges()}catch(e){this._zone.runOutsideAngular(()=>this._exceptionHandler.handleError(e))}finally{this._runningTick=!1}}attachView(e){const n=e;this._views.push(n),n.attachToAppRef(this)}detachView(e){const n=e;Hw(this._views,n),n.detachFromAppRef()}_loadComponent(e){this.attachView(e.hostView),this.tick(),this.components.push(e);const n=this._injector.get(wN,[]);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),()=>Hw(this._destroyListeners,e)}destroy(){if(this._destroyed)throw new pe(406,!1);const e=this._injector;e.destroy&&!e.destroyed&&e.destroy()}get viewCount(){return this._views.length}warnIfDestroyed(){}}return i.\u0275fac=function(e){return new(e||i)(ee(pt),ee(io),ee(al))},i.\u0275prov=ke({token:i,factory:i.\u0275fac,providedIn:"root"}),i})();function Hw(i,t){const e=i.indexOf(t);e>-1&&i.splice(e,1)}let Zn=(()=>{class i{}return i.__NG_ELEMENT_ID__=t9,i})();function t9(i){return function n9(i,t,e){if(Dd(i)&&!e){const n=ws(i.index,t);return new ny(n,n)}return 47&i.type?new ny(t[sr],t):null}(Ar(),Se(),16==(16&i))}class LN{constructor(){}supports(t){return Ew(t)}create(t){return new c9(t)}}const l9=(i,t)=>t;class c9{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||l9}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 d9(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 NN),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 NN),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 d9{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 u9{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 NN{constructor(){this.map=new Map}put(t){const e=t.trackById;let n=this.map.get(e);n||(n=new u9,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 BN(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 f9(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 f9{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 VN(){return new Ww([new LN])}let Ww=(()=>{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||VN()),deps:[[i,new Ma,new Ss]]}}find(e){const n=this.factories.find(r=>r.supports(e));if(null!=n)return n;throw new pe(901,!1)}}return i.\u0275prov=ke({token:i,providedIn:"root",factory:VN}),i})();function zN(){return new gy([new UN])}let gy=(()=>{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||zN()),deps:[[i,new Ma,new Ss]]}}find(e){const n=this.factories.find(r=>r.supports(e));if(n)return n;throw new pe(901,!1)}}return i.\u0275prov=ke({token:i,providedIn:"root",factory:zN}),i})();const g9=SN(null,"core",[]);let _9=(()=>{class i{constructor(e){}}return i.\u0275fac=function(e){return new(e||i)(ee(dm))},i.\u0275mod=nn({type:i}),i.\u0275inj=Kt({}),i})();let ET=null;function Gc(){return ET}class b9{}const jt=new me("DocumentToken");let AT=(()=>{class i{historyGo(e){throw new Error("Not implemented")}}return i.\u0275fac=function(e){return new(e||i)},i.\u0275prov=ke({token:i,factory:function(){return function x9(){return ee(HN)}()},providedIn:"platform"}),i})();const w9=new me("Location Initialized");let HN=(()=>{class i extends AT{constructor(e){super(),this._doc=e,this._location=window.location,this._history=window.history}getBaseHrefFromDOM(){return Gc().getBaseHref(this._doc)}onPopState(e){const n=Gc().getGlobalEventTarget(this._doc,"window");return n.addEventListener("popstate",e,!1),()=>n.removeEventListener("popstate",e)}onHashChange(e){const n=Gc().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){GN()?this._history.pushState(e,n,r):this._location.hash=r}replaceState(e,n,r){GN()?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)(ee(jt))},i.\u0275prov=ke({token:i,factory:function(){return function M9(){return new HN(ee(jt))}()},providedIn:"platform"}),i})();function GN(){return!!window.history.pushState}function DT(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 $N(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 $c(i){return i&&"?"!==i[0]?"?"+i:i}let Ih=(()=>{class i{historyGo(e){throw new Error("Not implemented")}}return i.\u0275fac=function(e){return new(e||i)},i.\u0275prov=ke({token:i,factory:function(){return Ft(jN)},providedIn:"root"}),i})();const WN=new me("appBaseHref");let jN=(()=>{class i extends Ih{constructor(e,n){super(),this._platformLocation=e,this._removeListenerFns=[],this._baseHref=n??this._platformLocation.getBaseHrefFromDOM()??Ft(jt).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 DT(this._baseHref,e)}path(e=!1){const n=this._platformLocation.pathname+$c(this._platformLocation.search),r=this._platformLocation.hash;return r&&e?`${n}${r}`:n}pushState(e,n,r,s){const o=this.prepareExternalUrl(r+$c(s));this._platformLocation.pushState(e,n,o)}replaceState(e,n,r,s){const o=this.prepareExternalUrl(r+$c(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)(ee(AT),ee(WN,8))},i.\u0275prov=ke({token:i,factory:i.\u0275fac,providedIn:"root"}),i})(),C9=(()=>{class i extends Ih{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=DT(this._baseHref,e);return n.length>0?"#"+n:n}pushState(e,n,r,s){let o=this.prepareExternalUrl(r+$c(s));0==o.length&&(o=this._platformLocation.pathname),this._platformLocation.pushState(e,n,o)}replaceState(e,n,r,s){let o=this.prepareExternalUrl(r+$c(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)(ee(AT),ee(WN,8))},i.\u0275prov=ke({token:i,factory:i.\u0275fac}),i})(),_y=(()=>{class i{constructor(e){this._subject=new $e,this._urlChangeListeners=[],this._urlChangeSubscription=null,this._locationStrategy=e;const n=this._locationStrategy.getBaseHref();this._basePath=function A9(i){if(new RegExp("^(https?:)?//").test(i)){const[,e]=i.split(/\/\/[^\/]+/);return e}return i}($N(YN(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+$c(n))}normalize(e){return i.stripTrailingSlash(function E9(i,t){if(!i||!t.startsWith(i))return t;const e=t.substring(i.length);return""===e||["/",";","?","#"].includes(e[0])?e:t}(this._basePath,YN(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+$c(n)),r)}replaceState(e,n="",r=null){this._locationStrategy.replaceState(r,"",e,n),this._notifyUrlChangeListeners(this.prepareExternalUrl(e+$c(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=$c,i.joinWithSlash=DT,i.stripTrailingSlash=$N,i.\u0275fac=function(e){return new(e||i)(ee(Ih))},i.\u0275prov=ke({token:i,factory:function(){return function S9(){return new _y(ee(Ih))}()},providedIn:"root"}),i})();function YN(i){return i.replace(/\/index.html$/,"")}var So=(()=>((So=So||{})[So.Decimal=0]="Decimal",So[So.Percent=1]="Percent",So[So.Currency=2]="Currency",So[So.Scientific=3]="Scientific",So))(),Ht=(()=>((Ht=Ht||{})[Ht.Decimal=0]="Decimal",Ht[Ht.Group=1]="Group",Ht[Ht.List=2]="List",Ht[Ht.PercentSign=3]="PercentSign",Ht[Ht.PlusSign=4]="PlusSign",Ht[Ht.MinusSign=5]="MinusSign",Ht[Ht.Exponential=6]="Exponential",Ht[Ht.SuperscriptingExponent=7]="SuperscriptingExponent",Ht[Ht.PerMille=8]="PerMille",Ht[Ht.Infinity=9]="Infinity",Ht[Ht.NaN=10]="NaN",Ht[Ht.TimeSeparator=11]="TimeSeparator",Ht[Ht.CurrencyDecimal=12]="CurrencyDecimal",Ht[Ht.CurrencyGroup=13]="CurrencyGroup",Ht))();function Da(i,t){const e=oo(i),n=e[rt.NumberSymbols][t];if(typeof n>"u"){if(t===Ht.CurrencyDecimal)return e[rt.NumberSymbols][Ht.Decimal];if(t===Ht.CurrencyGroup)return e[rt.NumberSymbols][Ht.Group]}return n}const J9=/^(\d+)?\.((\d+)(-(\d+))?)?$/,JN=22,eM=".",yy="0",eY=";",tY=",",PT="#";function LT(i){const t=parseInt(i);if(isNaN(t))throw new Error("Invalid integer literal when parsing "+i);return t}const BT=/\s+/,nB=[];let hm=(()=>{class i{constructor(e,n,r,s){this._iterableDiffers=e,this._keyValueDiffers=n,this._ngEl=r,this._renderer=s,this.initialClasses=nB,this.stateMap=new Map}set klass(e){this.initialClasses=null!=e?e.trim().split(BT):nB}set ngClass(e){this.rawClass="string"==typeof e?e.trim().split(BT):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(BT).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)(E(Ww),E(gy),E(gt),E(ol))},i.\u0275dir=ve({type:i,selectors:[["","ngClass",""]],inputs:{klass:["class","klass"],ngClass:"ngClass"},standalone:!0}),i})();class hY{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 Eo=(()=>{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 hY(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),sB(a,r)}});for(let r=0,s=n.length;r{sB(n.get(r.currentIndex),r)})}static ngTemplateContextGuard(e,n){return!0}}return i.\u0275fac=function(e){return new(e||i)(E(jr),E(Co),E(Ww))},i.\u0275dir=ve({type:i,selectors:[["","ngFor","","ngForOf",""]],inputs:{ngForOf:"ngForOf",ngForTrackBy:"ngForTrackBy",ngForTemplate:"ngForTemplate"},standalone:!0}),i})();function sB(i,t){i.context.$implicit=t.item}let vi=(()=>{class i{constructor(e,n){this._viewContainer=e,this._context=new pY,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){oB("ngIfThen",e),this._thenTemplateRef=e,this._thenViewRef=null,this._updateView()}set ngIfElse(e){oB("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)(E(jr),E(Co))},i.\u0275dir=ve({type:i,selectors:[["","ngIf",""]],inputs:{ngIf:"ngIf",ngIfThen:"ngIfThen",ngIfElse:"ngIfElse"},standalone:!0}),i})();class pY{constructor(){this.$implicit=null,this.ngIf=null}}function oB(i,t){if(t&&!t.createEmbeddedView)throw new Error(`${i} must be a TemplateRef, but received '${pi(t)}'.`)}class UT{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 by=(()=>{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=ve({type:i,selectors:[["","ngSwitch",""]],inputs:{ngSwitch:"ngSwitch"},standalone:!0}),i})(),VT=(()=>{class i{constructor(e,n,r){this.ngSwitch=r,r._addCase(),this._view=new UT(e,n)}ngDoCheck(){this._view.enforceState(this.ngSwitch._matchCase(this.ngSwitchCase))}}return i.\u0275fac=function(e){return new(e||i)(E(jr),E(Co),E(by,9))},i.\u0275dir=ve({type:i,selectors:[["","ngSwitchCase",""]],inputs:{ngSwitchCase:"ngSwitchCase"},standalone:!0}),i})(),aB=(()=>{class i{constructor(e,n,r){r._addDefault(new UT(e,n))}}return i.\u0275fac=function(e){return new(e||i)(E(jr),E(Co),E(by,9))},i.\u0275dir=ve({type:i,selectors:[["","ngSwitchDefault",""]],standalone:!0}),i})(),tM=(()=>{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:Es.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)(E(gt),E(gy),E(ol))},i.\u0275dir=ve({type:i,selectors:[["","ngStyle",""]],inputs:{ngStyle:"ngStyle"},standalone:!0}),i})(),xy=(()=>{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)(E(jr))},i.\u0275dir=ve({type:i,selectors:[["","ngTemplateOutlet",""]],inputs:{ngTemplateOutletContext:"ngTemplateOutletContext",ngTemplateOutlet:"ngTemplateOutlet",ngTemplateOutletInjector:"ngTemplateOutletInjector"},standalone:!0,features:[xi]}),i})();function fl(i,t){return new pe(2100,!1)}class gY{createSubscription(t,e){return t.subscribe({next:e,error:n=>{throw n}})}dispose(t){t.unsubscribe()}}class _Y{createSubscription(t,e){return t.then(e,n=>{throw n})}dispose(t){}}const vY=new _Y,yY=new gY;let pl=(()=>{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(oy(e))return vY;if(uL(e))return yY;throw fl()}_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)(E(Zn,16))},i.\u0275pipe=Gi({name:"async",type:i,pure:!1,standalone:!0}),i})(),cB=(()=>{class i{constructor(e){this.differs=e,this.keyValues=[],this.compareFn=dB}transform(e,n=dB){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 kY(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)(E(gy,16))},i.\u0275pipe=Gi({name:"keyvalue",type:i,pure:!1,standalone:!0}),i})();function dB(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 zT(i){return!(null==i||""===i||i!=i)}(e))return null;r=r||this._locale;try{return function sY(i,t,e){return function OT(i,t,e,n,r,s,o=!1){let a="",l=!1;if(isFinite(i)){let c=function aY(i){let n,r,s,o,a,t=Math.abs(i)+"",e=0;for((r=t.indexOf(eM))>-1&&(t=t.replace(eM,"")),(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)===yy;s++);if(s===(a=t.length))n=[0],r=1;else{for(a--;t.charAt(a)===yy;)a--;for(r-=s,n=[],o=0;s<=a;s++,o++)n[o]=Number(t.charAt(s))}return r>JN&&(n=n.splice(0,JN-1),e=r-1,r=1),{digits:n,exponent:e,integerLen:r}}(i);o&&(c=function oY(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 d=t.minInt,h=t.minFrac,p=t.maxFrac;if(s){const M=s.match(J9);if(null===M)throw new Error(`${s} is not a valid digit info`);const x=M[1],C=M[3],F=M[5];null!=x&&(d=LT(x)),null!=C&&(h=LT(C)),null!=F?p=LT(F):null!=C&&h>p&&(p=h)}!function lY(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);d&&(n.unshift(d),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(Da(e,n)),v.length&&(a+=Da(e,r)+v.join("")),b&&(a+=Da(e,Ht.Exponential)+"+"+b)}else a=Da(e,Ht.Infinity);return a=i<0&&!l?t.negPre+a+t.negSuf:t.posPre+a+t.posSuf,a}(i,function FT(i,t="-"){const e={minInt:1,minFrac:0,maxFrac:0,posPre:"",posSuf:"",negPre:"",negSuf:"",gSize:0,lgSize:0},n=i.split(eY),r=n[0],s=n[1],o=-1!==r.indexOf(eM)?r.split(eM):[r.substring(0,r.lastIndexOf(yy)+1),r.substring(r.lastIndexOf(yy)+1)],a=o[0],l=o[1]||"";e.posPre=a.substring(0,a.indexOf(PT));for(let d=0;d{class i{}return i.\u0275fac=function(e){return new(e||i)},i.\u0275mod=nn({type:i}),i.\u0275inj=Kt({}),i})();const hB="browser";let UY=(()=>{class i{}return i.\u0275prov=ke({token:i,providedIn:"root",factory:()=>new VY(ee(jt),window)}),i})();class VY{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 zY(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=fB(this.window.history)||fB(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 fB(i){return Object.getOwnPropertyDescriptor(i,"scrollRestoration")}class m7 extends b9{constructor(){super(...arguments),this.supportsDOMEvents=!0}}class WT extends m7{static makeCurrent(){!function y9(i){ET||(ET=i)}(new WT)}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 g7(){return My=My||document.querySelector("base"),My?My.getAttribute("href"):null}();return null==e?null:function _7(i){rM=rM||document.createElement("a"),rM.setAttribute("href",i);const t=rM.pathname;return"/"===t.charAt(0)?t:`/${t}`}(e)}resetBaseElement(){My=null}getUserAgent(){return window.navigator.userAgent}getCookie(t){return function dY(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 rM,My=null;const vB=new me("TRANSITION_ID"),y7=[{provide:Uw,useFactory:function v7(i,t,e){return()=>{e.get(Vw).donePromise.then(()=>{const n=Gc(),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=ke({token:i,factory:i.\u0275fac}),i})();const sM=new me("EventManagerPlugins");let oM=(()=>{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=ke({token:i,factory:i.\u0275fac}),i})(),Cy=(()=>{class i extends bB{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)(ee(jt))},i.\u0275prov=ke({token:i,factory:i.\u0275fac}),i})();const jT={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/"},YT=/%COMP%/g,MB=new me("RemoveStylesOnCompDestory",{providedIn:"root",factory:()=>!1});function CB(i,t){return t.flat(100).map(e=>e.replace(YT,i))}function SB(i){return t=>{if("__ngUnwrap__"===t)return i;!1===i(t)&&(t.preventDefault(),t.returnValue=!1)}}let aM=(()=>{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 qT(e)}createRenderer(e,n){if(!e||!n)return this.defaultRenderer;const r=this.getOrCreateRenderer(e,n);return r instanceof DB?r.applyToHost(e):r instanceof XT&&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 Ks.Emulated:s=new DB(o,a,n,this.appId,l);break;case Ks.ShadowDom:return new D7(o,a,e,n);default:s=new XT(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)(ee(oM),ee(Cy),ee(cm),ee(MB))},i.\u0275prov=ke({token:i,factory:i.\u0275fac}),i})();class qT{constructor(t){this.eventManager=t,this.data=Object.create(null),this.destroyNode=null}destroy(){}createElement(t,e){return e?document.createElementNS(jT[e]||e,t):document.createElement(t)}createComment(t){return document.createComment(t)}createText(t){return document.createTextNode(t)}appendChild(t,e){(AB(t)?t.content:t).appendChild(e)}insertBefore(t,e,n){t&&(AB(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=jT[r];s?t.setAttributeNS(s,e,n):t.setAttribute(e,n)}else t.setAttribute(e,n)}removeAttribute(t,e,n){if(n){const r=jT[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&(Es.DashCase|Es.Important)?t.style.setProperty(e,n,r&Es.Important?"important":""):t.style[e]=n}removeStyle(t,e,n){n&Es.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,SB(n)):this.eventManager.addEventListener(t,e,SB(n))}}function AB(i){return"TEMPLATE"===i.tagName&&void 0!==i.content}class D7 extends qT{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=CB(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 XT extends qT{constructor(t,e,n,r,s=n.id){super(t),this.sharedStylesHost=e,this.removeStylesOnCompDestory=r,this.rendererUsageCount=0,this.styles=CB(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 DB extends XT{constructor(t,e,n,r,s){const o=r+"-"+n.id;super(t,e,n,s,o),this.contentAttr=function S7(i){return"_ngcontent-%COMP%".replace(YT,i)}(o),this.hostAttr=function E7(i){return"_nghost-%COMP%".replace(YT,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 T7=(()=>{class i extends yB{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)(ee(jt))},i.\u0275prov=ke({token:i,factory:i.\u0275fac}),i})();const TB=["alt","control","meta","shift"],I7={"\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"},R7={alt:i=>i.altKey,control:i=>i.ctrlKey,meta:i=>i.metaKey,shift:i=>i.shiftKey};let k7=(()=>{class i extends yB{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(()=>Gc().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."),TB.forEach(c=>{const d=n.indexOf(c);d>-1&&(n.splice(d,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=I7[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"),TB.forEach(o=>{o!==r&&(0,R7[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)(ee(jt))},i.\u0275prov=ke({token:i,factory:i.\u0275fac}),i})();const L7=SN(g9,"browser",[{provide:fT,useValue:hB},{provide:pN,useValue:function P7(){WT.makeCurrent()},multi:!0},{provide:jt,useFactory:function F7(){return function sD(i){vv=i}(document),document},deps:[]}]),kB=new me(""),PB=[{provide:zw,useClass:class b7{addToWindow(t){Rn.getAngularTestability=(n,r=!0)=>{const s=t.findTestabilityInTree(n,r);if(null==s)throw new Error("Could not find testability for element.");return s},Rn.getAllAngularTestabilities=()=>t.getAllTestabilities(),Rn.getAllAngularRootElements=()=>t.getAllRootElements(),Rn.frameworkStabilizers||(Rn.frameworkStabilizers=[]),Rn.frameworkStabilizers.push(n=>{const r=Rn.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?Gc().isShadowRoot(e)?this.findTestabilityInTree(t,e.host,!0):this.findTestabilityInTree(t,e.parentElement,!0):null)}},deps:[]},{provide:bN,useClass:_T,deps:[pt,vT,zw]},{provide:_T,useClass:_T,deps:[pt,vT,zw]}],OB=[{provide:Iv,useValue:"root"},{provide:al,useFactory:function O7(){return new al},deps:[]},{provide:sM,useClass:T7,multi:!0,deps:[jt,pt,fT]},{provide:sM,useClass:k7,multi:!0,deps:[jt]},{provide:aM,useClass:aM,deps:[oM,Cy,cm,MB]},{provide:Gl,useExisting:aM},{provide:bB,useExisting:Cy},{provide:Cy,useClass:Cy,deps:[jt]},{provide:oM,useClass:oM,deps:[sM,pt]},{provide:class HY{},useClass:x7,deps:[]},[]];let FB=(()=>{class i{constructor(e){}static withServerTransition(e){return{ngModule:i,providers:[{provide:cm,useValue:e.appId},{provide:vB,useExisting:cm},y7]}}}return i.\u0275fac=function(e){return new(e||i)(ee(kB,12))},i.\u0275mod=nn({type:i}),i.\u0275inj=Kt({providers:[...OB,...PB],imports:[Ao,_9]}),i})(),LB=(()=>{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)(ee(jt))},i.\u0275prov=ke({token:i,factory:function(e){let n=null;return n=e?new e:function B7(){return new LB(ee(jt))}(),n},providedIn:"root"}),i})();typeof window<"u"&&window;let QT=(()=>{class i{}return i.\u0275fac=function(e){return new(e||i)},i.\u0275prov=ke({token:i,factory:function(e){let n=null;return n=e?new(e||i):ee(UB),n},providedIn:"root"}),i})(),UB=(()=>{class i extends QT{constructor(e){super(),this._doc=e}sanitize(e,n){if(null==n)return null;switch(e){case Kn.NONE:return n;case Kn.HTML:return Sa(n,"HTML")?to(n):Zx(this._doc,String(n)).toString();case Kn.STYLE:return Sa(n,"Style")?to(n):n;case Kn.SCRIPT:if(Sa(n,"Script"))return to(n);throw new Error("unsafe value used in a script context");case Kn.URL:return Sa(n,"URL")?to(n):xh(String(n));case Kn.RESOURCE_URL:if(Sa(n,"ResourceURL"))return to(n);throw new Error(`unsafe value used in a resource URL context (see ${qu})`);default:throw new Error(`Unexpected SecurityContext ${e} (see ${qu})`)}}bypassSecurityTrustHtml(e){return function uD(i){return new oD(i)}(e)}bypassSecurityTrustStyle(e){return function hD(i){return new aD(i)}(e)}bypassSecurityTrustScript(e){return function fD(i){return new lD(i)}(e)}bypassSecurityTrustUrl(e){return function pD(i){return new cD(i)}(e)}bypassSecurityTrustResourceUrl(e){return function mD(i){return new Pp(i)}(e)}}return i.\u0275fac=function(e){return new(e||i)(ee(jt))},i.\u0275prov=ke({token:i,factory:function(e){let n=null;return n=e?new e:function G7(i){return new UB(i.get(jt))}(ee($i)),n},providedIn:"root"}),i})();function ft(...i){return Ni(i,$u(i))}class ut extends Re{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 fm=V(i=>function(){i(this),this.name="EmptyError",this.message="no elements in sequence"}),{isArray:$7}=Array,{getPrototypeOf:W7,prototype:j7,keys:Y7}=Object;function VB(i){if(1===i.length){const t=i[0];if($7(t))return{args:t,keys:null};if(function q7(i){return i&&"object"==typeof i&&W7(i)===j7}(t)){const e=Y7(t);return{args:e.map(n=>t[n]),keys:e}}}return{args:i,keys:null}}const{isArray:X7}=Array;function JT(i){return et(t=>function K7(i,t){return X7(t)?i(...t):i(t)}(i,t))}function zB(i,t){return i.reduce((e,n,r)=>(e[n]=t[r],e),{})}function Xl(...i){const t=$u(i),e=w0(i),{args:n,keys:r}=VB(i);if(0===n.length)return Ni([],t);const s=new In(function Z7(i,t,e=$a){return n=>{HB(t,()=>{const{length:r}=i,s=new Array(r);let o=r,a=r;for(let l=0;l{const c=Ni(i[l],t);let d=!1;c.subscribe(Yn(n,h=>{s[l]=h,d||(d=!0,a--),a||n.next(e(s.slice()))},()=>{--o||n.complete()}))},n)},n)}}(n,t,r?o=>zB(r,o):$a));return e?s.pipe(JT(e)):s}function HB(i,t,e){i?Ya(e,i,t):t()}function Sy(...i){return function Q7(){return bd(1)}()(Ni(i,$u(i)))}function Ey(i){return new In(t=>{Mr(i()).subscribe(t)})}function pm(i,t){const e=cn(i)?i:()=>i,n=r=>r.error(e());return new In(t?r=>t.schedule(n,0,r):n)}function eI(){return ti((i,t)=>{let e=null;i._refCount++;const n=Yn(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 GB extends In{constructor(t,e){super(),this.source=t,this.subjectFactory=e,this._subject=null,this._refCount=0,this._connection=null,c0(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 Zt;const e=this.getSubject();t.add(this.source.subscribe(Yn(e,void 0,()=>{this._teardown(),e.complete()},n=>{this._teardown(),e.error(n)},()=>this._teardown()))),t.closed&&(this._connection=null,t=Zt.EMPTY)}return t}refCount(){return eI()(this)}}function ks(i,t){return ti((e,n)=>{let r=null,s=0,o=!1;const a=()=>o&&!r&&n.complete();e.subscribe(Yn(n,l=>{r?.unsubscribe();let c=0;const d=s++;Mr(i(l,d)).subscribe(r=Yn(n,h=>n.next(t?t(l,h,d,c++):h),()=>{r=null,a()}))},()=>{o=!0,a()}))})}function Oi(i){return i<=0?()=>mo:ti((t,e)=>{let n=0;t.subscribe(Yn(e,r=>{++n<=i&&(e.next(r),i<=n&&e.complete())}))})}function Do(...i){const t=$u(i);return ti((e,n)=>{(t?Sy(i,e,t):Sy(i,e)).subscribe(n)})}function gn(i,t){return ti((e,n)=>{let r=0;e.subscribe(Yn(n,s=>i.call(t,s,r++)&&n.next(s)))})}function lM(i){return ti((t,e)=>{let n=!1;t.subscribe(Yn(e,r=>{n=!0,e.next(r)},()=>{n||e.next(i),e.complete()}))})}function $B(i=J7){return ti((t,e)=>{let n=!1;t.subscribe(Yn(e,r=>{n=!0,e.next(r)},()=>n?e.complete():e.error(i())))})}function J7(){return new fm}function iu(i,t){const e=arguments.length>=2;return n=>n.pipe(i?gn((r,s)=>i(r,s,n)):$a,Oi(1),e?lM(t):$B(()=>new fm))}function ru(i,t){return cn(t)?rr(i,t,1):rr(i,1)}function Vi(i,t,e){const n=cn(i)||t||e?{next:i,error:t,complete:e}:i;return n?ti((r,s)=>{var o;null===(o=n.subscribe)||void 0===o||o.call(n);let a=!0;r.subscribe(Yn(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)}))}):$a}function jc(i){return ti((t,e)=>{let s,n=null,r=!1;n=t.subscribe(Yn(e,void 0,void 0,o=>{s=Mr(i(o,jc(i)(t))),n?(n.unsubscribe(),n=null,s.subscribe(e)):r=!0})),r&&(n.unsubscribe(),n=null,s.subscribe(e))})}function tI(i,t){return ti(function eq(i,t,e,n,r){return(s,o)=>{let a=e,l=t,c=0;s.subscribe(Yn(o,d=>{const h=c++;l=a?i(l,d,h):(a=!0,d),n&&o.next(l)},r&&(()=>{a&&o.next(l),o.complete()})))}}(i,t,arguments.length>=2,!0))}function nI(i){return i<=0?()=>mo:ti((t,e)=>{let n=[];t.subscribe(Yn(e,r=>{n.push(r),i{for(const r of n)e.next(r);e.complete()},void 0,()=>{n=null}))})}function WB(i,t){const e=arguments.length>=2;return n=>n.pipe(i?gn((r,s)=>i(r,s,n)):$a,nI(1),e?lM(t):$B(()=>new fm))}function jB(i,t=!1){return ti((e,n)=>{let r=0;e.subscribe(Yn(n,s=>{const o=i(s,r++);(o||t)&&n.next(s),!o&&n.complete()}))})}function YB(i){return et(()=>i)}function su(i){return ti((t,e)=>{try{t.subscribe(e)}finally{e.add(i)}})}const _n="primary",Ay=Symbol("RouteTitle");class tq{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 tq(i)}function nq(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 XB(i){return Array.prototype.concat.apply([],i)}function KB(i){return i.length>0?i[i.length-1]:null}function os(i,t){for(const e in i)i.hasOwnProperty(e)&&t(i[e],e)}function ou(i){return L1(i)?i:oy(i)?Ni(Promise.resolve(i)):ft(i)}const cM=!1,rq={exact:function JB(i,t,e){if(!Rh(i.segments,t.segments)||!dM(i.segments,t.segments,e)||i.numberOfChildren!==t.numberOfChildren)return!1;for(const n in t.children)if(!i.children[n]||!JB(i.children[n],t.children[n],e))return!1;return!0},subset:e3},ZB={exact:function sq(i,t){return Kl(i,t)},subset:function oq(i,t){return Object.keys(t).length<=Object.keys(i).length&&Object.keys(t).every(e=>qB(i[e],t[e]))},ignored:()=>!0};function QB(i,t,e){return rq[e.paths](i.root,t.root,e.matrixParams)&&ZB[e.queryParams](i.queryParams,t.queryParams)&&!("exact"===e.fragment&&i.fragment!==t.fragment)}function e3(i,t,e){return t3(i,t,t.segments,e)}function t3(i,t,e,n){if(i.segments.length>e.length){const r=i.segments.slice(0,e.length);return!(!Rh(r,e)||t.hasChildren()||!dM(r,e,n))}if(i.segments.length===e.length){if(!Rh(i.segments,e)||!dM(i.segments,e,n))return!1;for(const r in t.children)if(!i.children[r]||!e3(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!!(Rh(i.segments,r)&&dM(i.segments,r,n)&&i.children[_n])&&t3(i.children[_n],t,s,n)}}function dM(i,t,e){return t.every((n,r)=>ZB[e](i[r].parameters,n.parameters))}class au{constructor(t=new Tn([],{}),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 cq.serialize(this)}}class Tn{constructor(t,e){this.segments=t,this.children=e,this.parent=null,os(e,(n,r)=>n.parent=this)}hasChildren(){return this.numberOfChildren>0}get numberOfChildren(){return Object.keys(this.children).length}toString(){return uM(this)}}class Dy{constructor(t,e){this.path=t,this.parameters=e}get parameterMap(){return this._parameterMap||(this._parameterMap=mm(this.parameters)),this._parameterMap}toString(){return s3(this)}}function Rh(i,t){return i.length===t.length&&i.every((e,n)=>e.path===t[n].path)}let Ty=(()=>{class i{}return i.\u0275fac=function(e){return new(e||i)},i.\u0275prov=ke({token:i,factory:function(){return new iI},providedIn:"root"}),i})();class iI{parse(t){const e=new vq(t);return new au(e.parseRootSegment(),e.parseQueryParams(),e.parseFragment())}serialize(t){const e=`/${Iy(t.root,!0)}`,n=function hq(i){const t=Object.keys(i).map(e=>{const n=i[e];return Array.isArray(n)?n.map(r=>`${hM(e)}=${hM(r)}`).join("&"):`${hM(e)}=${hM(n)}`}).filter(e=>!!e);return t.length?`?${t.join("&")}`:""}(t.queryParams);return`${e}${n}${"string"==typeof t.fragment?`#${function dq(i){return encodeURI(i)}(t.fragment)}`:""}`}}const cq=new iI;function uM(i){return i.segments.map(t=>s3(t)).join("/")}function Iy(i,t){if(!i.hasChildren())return uM(i);if(t){const e=i.children[_n]?Iy(i.children[_n],!1):"",n=[];return os(i.children,(r,s)=>{s!==_n&&n.push(`${s}:${Iy(r,!1)}`)}),n.length>0?`${e}(${n.join("//")})`:e}{const e=function lq(i,t){let e=[];return os(i.children,(n,r)=>{r===_n&&(e=e.concat(t(n,r)))}),os(i.children,(n,r)=>{r!==_n&&(e=e.concat(t(n,r)))}),e}(i,(n,r)=>r===_n?[Iy(i.children[_n],!1)]:[`${r}:${Iy(n,!1)}`]);return 1===Object.keys(i.children).length&&null!=i.children[_n]?`${uM(i)}/${e[0]}`:`${uM(i)}/(${e.join("//")})`}}function n3(i){return encodeURIComponent(i).replace(/%40/g,"@").replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",")}function hM(i){return n3(i).replace(/%3B/gi,";")}function rI(i){return n3(i).replace(/\(/g,"%28").replace(/\)/g,"%29").replace(/%26/gi,"&")}function fM(i){return decodeURIComponent(i)}function r3(i){return fM(i.replace(/\+/g,"%20"))}function s3(i){return`${rI(i.path)}${function uq(i){return Object.keys(i).map(t=>`;${rI(t)}=${rI(i[t])}`).join("")}(i.parameters)}`}const fq=/^[^\/()?;=#]+/;function pM(i){const t=i.match(fq);return t?t[0]:""}const pq=/^[^=?&#]+/,gq=/^[^&#]+/;class vq{constructor(t){this.url=t,this.remaining=t}parseRootSegment(){return this.consumeOptional("/"),""===this.remaining||this.peekStartsWith("?")||this.peekStartsWith("#")?new Tn([],{}):new Tn([],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[_n]=new Tn(t,e)),n}parseSegment(){const t=pM(this.remaining);if(""===t&&this.peekStartsWith(";"))throw new pe(4009,cM);return this.capture(t),new Dy(fM(t),this.parseMatrixParams())}parseMatrixParams(){const t={};for(;this.consumeOptional(";");)this.parseParam(t);return t}parseParam(t){const e=pM(this.remaining);if(!e)return;this.capture(e);let n="";if(this.consumeOptional("=")){const r=pM(this.remaining);r&&(n=r,this.capture(n))}t[fM(e)]=fM(n)}parseQueryParam(t){const e=function mq(i){const t=i.match(pq);return t?t[0]:""}(this.remaining);if(!e)return;this.capture(e);let n="";if(this.consumeOptional("=")){const o=function _q(i){const t=i.match(gq);return t?t[0]:""}(this.remaining);o&&(n=o,this.capture(n))}const r=r3(e),s=r3(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=pM(this.remaining),r=this.remaining[n.length];if("/"!==r&&")"!==r&&";"!==r)throw new pe(4010,cM);let s;n.indexOf(":")>-1?(s=n.slice(0,n.indexOf(":")),this.capture(s),this.capture(":")):t&&(s=_n);const o=this.parseChildren();e[s]=1===Object.keys(o).length?o[_n]:new Tn([],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 pe(4011,cM)}}function sI(i){return i.segments.length>0?new Tn([],{[_n]:i}):i}function mM(i){const t={};for(const n of Object.keys(i.children)){const s=mM(i.children[n]);(s.segments.length>0||s.hasChildren())&&(t[n]=s)}return function yq(i){if(1===i.numberOfChildren&&i.children[_n]){const t=i.children[_n];return new Tn(i.segments.concat(t.segments),t.children)}return i}(new Tn(i.segments,t))}function kh(i){return i instanceof au}const oI=!1;function bq(i,t,e,n,r){if(0===e.length)return gm(t.root,t.root,t.root,n,r);const s=function d3(i){if("string"==typeof i[0]&&1===i.length&&"/"===i[0])return new c3(!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 os(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 c3(e,t,n)}(e);return s.toRoot()?gm(t.root,t.root,new Tn([],{}),n,r):function o(l){const c=function wq(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 u3(i,t,e){let n=i,r=t,s=e;for(;s>r;){if(s-=r,n=n.parent,!n)throw new pe(4005,oI&&"Invalid number of '../'");r=n.segments.length}return new _m(n,!1,r-s)}(e,n+(Ry(i.commands[0])?0:1),i.numberOfDoubleDots)}(s,t,i.snapshot?._urlSegment,l),d=c.processChildren?vm(c.segmentGroup,c.index,s.commands):aI(c.segmentGroup,c.index,s.commands);return gm(t.root,c.segmentGroup,d,n,r)}(i.snapshot?._lastPathIndex)}function Ry(i){return"object"==typeof i&&null!=i&&!i.outlets&&!i.segmentPath}function ky(i){return"object"==typeof i&&null!=i&&i.outlets}function gm(i,t,e,n,r){let o,s={};n&&os(n,(l,c)=>{s[c]=Array.isArray(l)?l.map(d=>`${d}`):`${l}`}),o=i===t?e:l3(i,t,e);const a=sI(mM(o));return new au(a,s,r)}function l3(i,t,e){const n={};return os(i.children,(r,s)=>{n[s]=r===t?e:l3(r,t,e)}),new Tn(i.segments,n)}class c3{constructor(t,e,n){if(this.isAbsolute=t,this.numberOfDoubleDots=e,this.commands=n,t&&n.length>0&&Ry(n[0]))throw new pe(4003,oI&&"Root segment cannot have matrix parameters");const r=n.find(ky);if(r&&r!==KB(n))throw new pe(4004,oI&&"{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 aI(i,t,e){if(i||(i=new Tn([],{})),0===i.segments.length&&i.hasChildren())return vm(i,t,e);const n=function Cq(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(ky(a))break;const l=`${a}`,c=n0&&void 0===l)break;if(l&&c&&"object"==typeof c&&void 0===c.outlets){if(!f3(l,c,o))return s;n+=2}else{if(!f3(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]=aI(i.children[o],t,s))}),os(i.children,(s,o)=>{void 0===n[o]&&(r[o]=s)}),new Tn(i.segments,r)}}function lI(i,t,e){const n=i.segments.slice(0,t);let r=0;for(;r{"string"==typeof e&&(e=[e]),null!==e&&(t[n]=lI(new Tn([],{}),0,e))}),t}function h3(i){const t={};return os(i,(e,n)=>t[n]=`${e}`),t}function f3(i,t,e){return i==e.path&&Kl(t,e.parameters)}const Py="imperative";class Zl{constructor(t,e){this.id=t,this.url=e}}class cI extends Zl{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 Ph extends Zl{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 gM extends Zl{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 _M extends Zl{constructor(t,e,n,r){super(t,e),this.reason=n,this.code=r,this.type=16}}class dI extends Zl{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 Eq extends Zl{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 Aq extends Zl{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 Dq extends Zl{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 Tq extends Zl{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 Iq extends Zl{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 Rq{constructor(t){this.route=t,this.type=9}toString(){return`RouteConfigLoadStart(path: ${this.route.path})`}}class kq{constructor(t){this.route=t,this.type=10}toString(){return`RouteConfigLoadEnd(path: ${this.route.path})`}}class Pq{constructor(t){this.snapshot=t,this.type=11}toString(){return`ChildActivationStart(path: '${this.snapshot.routeConfig&&this.snapshot.routeConfig.path||""}')`}}class Oq{constructor(t){this.snapshot=t,this.type=12}toString(){return`ChildActivationEnd(path: '${this.snapshot.routeConfig&&this.snapshot.routeConfig.path||""}')`}}class Fq{constructor(t){this.snapshot=t,this.type=13}toString(){return`ActivationStart(path: '${this.snapshot.routeConfig&&this.snapshot.routeConfig.path||""}')`}}class Lq{constructor(t){this.snapshot=t,this.type=14}toString(){return`ActivationEnd(path: '${this.snapshot.routeConfig&&this.snapshot.routeConfig.path||""}')`}}class p3{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 Uq=(()=>{class i{createUrlTree(e,n,r,s,o,a){return bq(e||n.root,r,s,o,a)}}return i.\u0275fac=function(e){return new(e||i)},i.\u0275prov=ke({token:i,factory:i.\u0275fac}),i})(),zq=(()=>{class i{}return i.\u0275fac=function(e){return new(e||i)},i.\u0275prov=ke({token:i,factory:function(t){return Uq.\u0275fac(t)},providedIn:"root"}),i})();class m3{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=uI(t,this._root);return e?e.children.map(n=>n.value):[]}firstChild(t){const e=uI(t,this._root);return e&&e.children.length>0?e.children[0].value:null}siblings(t){const e=hI(t,this._root);return e.length<2?[]:e[e.length-2].children.map(r=>r.value).filter(r=>r!==t)}pathFromRoot(t){return hI(t,this._root).map(e=>e.value)}}function uI(i,t){if(i===t.value)return t;for(const e of t.children){const n=uI(i,e);if(n)return n}return null}function hI(i,t){if(i===t.value)return[t];for(const e of t.children){const n=hI(i,e);if(n.length)return n.unshift(t),n}return[]}class Yc{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 g3 extends m3{constructor(t,e){super(t),this.snapshot=e,fI(this,t)}toString(){return this.snapshot.toString()}}function _3(i,t){const e=function Hq(i,t){const o=new vM([],{},{},"",{},_n,t,null,i.root,-1,{});return new y3("",new Yc(o,[]))}(i,t),n=new ut([new Dy("",{})]),r=new ut({}),s=new ut({}),o=new ut({}),a=new ut(""),l=new bm(n,r,o,a,s,_n,t,e.root);return l.snapshot=e.root,new g3(new Yc(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(et(c=>c[Ay]))??ft(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(et(t=>mm(t)))),this._paramMap}get queryParamMap(){return this._queryParamMap||(this._queryParamMap=this.queryParams.pipe(et(t=>mm(t)))),this._queryParamMap}toString(){return this.snapshot?this.snapshot.toString():`Future(${this._futureSnapshot})`}}function v3(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 Gq(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 vM{get title(){return this.data?.[Ay]}constructor(t,e,n,r,s,o,a,l,c,d,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=d,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 y3 extends m3{constructor(t,e){super(e),this.url=t,fI(this,e)}toString(){return b3(this._root)}}function fI(i,t){t.value._routerState=i,t.children.forEach(e=>fI(i,e))}function b3(i){const t=i.children.length>0?` { ${i.children.map(b3).join(", ")} } `:"";return`${i.value}${t}`}function pI(i){if(i.snapshot){const t=i.snapshot,e=i._futureSnapshot;i.snapshot=e,Kl(t.queryParams,e.queryParams)||i.queryParams.next(e.queryParams),t.fragment!==e.fragment&&i.fragment.next(e.fragment),Kl(t.params,e.params)||i.params.next(e.params),function iq(i,t){if(i.length!==t.length)return!1;for(let e=0;eKl(e.parameters,t[n].parameters))}(i.url,t.url);return e&&!(!i.parent!=!t.parent)&&(!i.parent||mI(i.parent,t.parent))}function Oy(i,t,e){if(e&&i.shouldReuseRoute(t.value,e.value.snapshot)){const n=e.value;n._futureSnapshot=t.value;const r=function Wq(i,t,e){return t.children.map(n=>{for(const r of e.children)if(i.shouldReuseRoute(n.value,r.value.snapshot))return Oy(i,n,r);return Oy(i,n)})}(i,t,e);return new Yc(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=>Oy(i,a)),o}}const n=function jq(i){return new bm(new ut(i.url),new ut(i.params),new ut(i.queryParams),new ut(i.fragment),new ut(i.data),i.outlet,i.component,i)}(t.value),r=t.children.map(s=>Oy(i,s));return new Yc(n,r)}}const gI="ngNavigationCancelingError";function x3(i,t){const{redirectTo:e,navigationBehaviorOptions:n}=kh(t)?{redirectTo:t,navigationBehaviorOptions:void 0}:t,r=w3(!1,0,t);return r.url=e,r.navigationBehaviorOptions=n,r}function w3(i,t,e){const n=new Error("NavigationCancelingError: "+(i||""));return n[gI]=!0,n.cancellationCode=t,e&&(n.url=e),n}function M3(i){return C3(i)&&kh(i.url)}function C3(i){return i&&i[gI]}class Yq{constructor(){this.outlet=null,this.route=null,this.resolver=null,this.injector=null,this.children=new Fy,this.attachRef=null}}let Fy=(()=>{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 Yq,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=ke({token:i,factory:i.\u0275fac,providedIn:"root"}),i})();const yM=!1;let S3=(()=>{class i{constructor(){this.activated=null,this._activatedRoute=null,this.name=_n,this.activateEvents=new $e,this.deactivateEvents=new $e,this.attachEvents=new $e,this.detachEvents=new $e,this.parentContexts=Ft(Fy),this.location=Ft(jr),this.changeDetector=Ft(Zn),this.environmentInjector=Ft(io)}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 pe(4012,yM);return this.activated.instance}get activatedRoute(){if(!this.activated)throw new pe(4012,yM);return this._activatedRoute}get activatedRouteData(){return this._activatedRoute?this._activatedRoute.snapshot.data:{}}detach(){if(!this.activated)throw new pe(4012,yM);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 pe(4013,yM);this._activatedRoute=e;const r=this.location,o=e.snapshot.component,a=this.parentContexts.getOrCreateContext(this.name).children,l=new qq(e,a,r.injector);if(n&&function Xq(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=ve({type:i,selectors:[["router-outlet"]],inputs:{name:"name"},outputs:{activateEvents:"activate",deactivateEvents:"deactivate",attachEvents:"attach",detachEvents:"detach"},exportAs:["outlet"],standalone:!0,features:[xi]}),i})();class qq{constructor(t,e,n){this.route=t,this.childContexts=e,this.parent=n}get(t,e){return t===bm?this.route:t===Fy?this.childContexts:this.parent.get(t,e)}}let _I=(()=>{class i{}return i.\u0275fac=function(e){return new(e||i)},i.\u0275cmp=ot({type:i,selectors:[["ng-component"]],standalone:!0,features:[Z1],decls:1,vars:0,template:function(e,n){1&e&&Pe(0,"router-outlet")},dependencies:[S3],encapsulation:2}),i})();function E3(i,t){return i.providers&&!i._injector&&(i._injector=Fw(i.providers,t,`Route: ${i.path}`)),i._injector??t}function yI(i){const t=i.children&&i.children.map(yI),e=t?{...i,children:t}:{...i};return!e.component&&!e.loadComponent&&(t||e.loadChildren)&&e.outlet&&e.outlet!==_n&&(e.component=_I),e}function Ia(i){return i.outlet||_n}function A3(i,t){const e=i.filter(n=>Ia(n)===t);return e.push(...i.filter(n=>Ia(n)!==t)),e}function Ly(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 eX{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),pI(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]}),os(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 Lq(s.value.snapshot))}),t.children.length&&this.forwardEvent(new Oq(t.value.snapshot))}activateRoutes(t,e,n){const r=t.value,s=e?e.value:null;if(pI(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),pI(a.route.value),this.activateChildRoutes(t,null,o.children)}else{const a=Ly(r.snapshot),l=a?.get(Hl)??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 D3{constructor(t){this.path=t,this.route=this.path[this.path.length-1]}}class bM{constructor(t,e){this.component=t,this.route=e}}function tX(i,t,e){const n=i._root;return Ny(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 Sr(i){return null!==Gf(i)}(i)?t.get(i):i:n}function Ny(i,t,e,n,r={canDeactivateChecks:[],canActivateChecks:[]}){const s=ym(t);return i.children.forEach(o=>{(function iX(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 rX(i,t,e){if("function"==typeof e)return e(i,t);switch(e){case"pathParamsChange":return!Rh(i.url,t.url);case"pathParamsOrQueryParamsChange":return!Rh(i.url,t.url)||!Kl(i.queryParams,t.queryParams);case"always":return!0;case"paramsOrQueryParamsChange":return!mI(i,t)||!Kl(i.queryParams,t.queryParams);default:return!mI(i,t)}}(o,s,s.routeConfig.runGuardsAndResolvers);l?r.canActivateChecks.push(new D3(n)):(s.data=o.data,s._resolvedData=o._resolvedData),Ny(i,t,s.component?a?a.children:null:e,n,r),l&&a&&a.outlet&&a.outlet.isActivated&&r.canDeactivateChecks.push(new bM(a.outlet.component,o))}else o&&By(t,a,r),r.canActivateChecks.push(new D3(n)),Ny(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]}),os(s,(o,a)=>By(o,e.getContext(a),r)),r}function By(i,t,e){const n=ym(i),r=i.value;os(n,(s,o)=>{By(s,r.component?t?t.children.getContext(o):null:t,e)}),e.canDeactivateChecks.push(new bM(r.component&&t&&t.outlet&&t.outlet.isActivated?t.outlet.component:null,r))}function Uy(i){return"function"==typeof i}function bI(i){return i instanceof fm||"EmptyError"===i?.name}const xM=Symbol("INITIAL_VALUE");function wm(){return ks(i=>Xl(i.map(t=>t.pipe(Oi(1),Do(xM)))).pipe(et(t=>{for(const e of t)if(!0!==e){if(e===xM)return xM;if(!1===e||e instanceof au)return e}return!0}),gn(t=>t!==xM),Oi(1)))}function T3(i){return function CE(...i){return a0(i)}(Vi(t=>{if(kh(t))throw x3(0,t)}),et(t=>!0===t))}const xI={matched:!1,consumedSegments:[],remainingSegments:[],parameters:{},positionalParamSegments:{}};function I3(i,t,e,n,r){const s=wI(i,t,e);return s.matched?function xX(i,t,e,n){const r=t.canMatch;return r&&0!==r.length?ft(r.map(o=>{const a=xm(o,i);return ou(function dX(i){return i&&Uy(i.canMatch)}(a)?a.canMatch(t,e):i.runInContext(()=>a(t,e)))})).pipe(wm(),T3()):ft(!0)}(n=E3(t,n),t,e).pipe(et(o=>!0===o?s:{...xI})):ft(s)}function wI(i,t,e){if(""===t.path)return"full"===t.pathMatch&&(i.hasChildren()||e.length>0)?{...xI}:{matched:!0,consumedSegments:[],remainingSegments:e,parameters:{},positionalParamSegments:{}};const r=(t.matcher||nq)(e,i,t);if(!r)return{...xI};const s={};os(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 wM(i,t,e,n){if(e.length>0&&function CX(i,t,e){return e.some(n=>MM(i,t,n)&&Ia(n)!==_n)}(i,e,n)){const s=new Tn(t,function MX(i,t,e,n){const r={};r[_n]=n,n._sourceSegment=i,n._segmentIndexShift=t.length;for(const s of e)if(""===s.path&&Ia(s)!==_n){const o=new Tn([],{});o._sourceSegment=i,o._segmentIndexShift=t.length,r[Ia(s)]=o}return r}(i,t,n,new Tn(e,i.children)));return s._sourceSegment=i,s._segmentIndexShift=t.length,{segmentGroup:s,slicedSegments:[]}}if(0===e.length&&function SX(i,t,e){return e.some(n=>MM(i,t,n))}(i,e,n)){const s=new Tn(i.segments,function wX(i,t,e,n,r){const s={};for(const o of n)if(MM(i,e,o)&&!r[Ia(o)]){const a=new Tn([],{});a._sourceSegment=i,a._segmentIndexShift=t.length,s[Ia(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 Tn(i.segments,i.children);return r._sourceSegment=i,r._segmentIndexShift=t.length,{segmentGroup:r,slicedSegments:e}}function MM(i,t,e){return(!(i.hasChildren()||t.length>0)||"full"!==e.pathMatch)&&""===e.path}function R3(i,t,e,n){return!!(Ia(i)===n||n!==_n&&MM(t,e,i))&&("**"===i.path||wI(t,i,e).matched)}function k3(i,t,e){return 0===t.length&&!i.children[e]}const CM=!1;class SM{constructor(t){this.segmentGroup=t||null}}class P3{constructor(t){this.urlTree=t}}function Vy(i){return pm(new SM(i))}function O3(i){return pm(new P3(i))}class TX{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=wM(this.urlTree.root,[],[],this.config).segmentGroup,e=new Tn(t.segments,t.children);return this.expandSegmentGroup(this.injector,this.config,e,_n).pipe(et(s=>this.createUrlTree(mM(s),this.urlTree.queryParams,this.urlTree.fragment))).pipe(jc(s=>{if(s instanceof P3)return this.allowRedirects=!1,this.match(s.urlTree);throw s instanceof SM?this.noMatchError(s):s}))}match(t){return this.expandSegmentGroup(this.injector,this.config,t.root,_n).pipe(et(r=>this.createUrlTree(mM(r),t.queryParams,t.fragment))).pipe(jc(r=>{throw r instanceof SM?this.noMatchError(r):r}))}noMatchError(t){return new pe(4002,CM)}createUrlTree(t,e,n){const r=sI(t);return new au(r,e,n)}expandSegmentGroup(t,e,n,r){return 0===n.segments.length&&n.hasChildren()?this.expandChildren(t,e,n).pipe(et(s=>new Tn([],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 Ni(r).pipe(ru(s=>{const o=n.children[s],a=A3(e,s);return this.expandSegmentGroup(t,a,o,s).pipe(et(l=>({segment:l,outlet:s})))}),tI((s,o)=>(s[o.outlet]=o.segment,s),{}),WB())}expandSegment(t,e,n,r,s,o){return Ni(n).pipe(ru(a=>this.expandSegmentAgainstRoute(t,e,n,a,r,s,o).pipe(jc(c=>{if(c instanceof SM)return ft(null);throw c}))),iu(a=>!!a),jc((a,l)=>{if(bI(a))return k3(e,r,s)?ft(new Tn([],{})):Vy(e);throw a}))}expandSegmentAgainstRoute(t,e,n,r,s,o,a){return R3(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):Vy(e):Vy(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("/")?O3(s):this.lineralizeSegments(n,s).pipe(rr(o=>{const a=new Tn(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:d}=wI(e,r,s);if(!a)return Vy(e);const h=this.applyRedirectCommands(l,r.redirectTo,d);return r.redirectTo.startsWith("/")?O3(h):this.lineralizeSegments(r,h).pipe(rr(p=>this.expandSegment(t,e,n,p.concat(c),o,!1)))}matchSegmentAgainstRoute(t,e,n,r,s){return"**"===n.path?(t=E3(n,t),n.loadChildren?(n._loadedRoutes?ft({routes:n._loadedRoutes,injector:n._loadedInjector}):this.configLoader.loadChildren(t,n)).pipe(et(a=>(n._loadedRoutes=a.routes,n._loadedInjector=a.injector,new Tn(r,{})))):ft(new Tn(r,{}))):I3(e,n,r,t).pipe(ks(({matched:o,consumedSegments:a,remainingSegments:l})=>o?this.getChildConfig(t=n._injector??t,n,r).pipe(rr(d=>{const h=d.injector??t,p=d.routes,{segmentGroup:m,slicedSegments:g}=wM(e,a,l,p),b=new Tn(m.segments,m.children);if(0===g.length&&b.hasChildren())return this.expandChildren(h,p,b).pipe(et(x=>new Tn(a,x)));if(0===p.length&&0===g.length)return ft(new Tn(a,{}));const v=Ia(n)===s;return this.expandSegment(h,b,p,g,v?_n:s,!0).pipe(et(M=>new Tn(a.concat(M.segments),M.children)))})):Vy(e)))}getChildConfig(t,e,n){return e.children?ft({routes:e.children,injector:t}):e.loadChildren?void 0!==e._loadedRoutes?ft({routes:e._loadedRoutes,injector:e._loadedInjector}):function bX(i,t,e,n){const r=t.canLoad;return void 0===r||0===r.length?ft(!0):ft(r.map(o=>{const a=xm(o,i);return ou(function oX(i){return i&&Uy(i.canLoad)}(a)?a.canLoad(t,e):i.runInContext(()=>a(t,e)))})).pipe(wm(),T3())}(t,e,n).pipe(rr(r=>r?this.configLoader.loadChildren(t,e).pipe(Vi(s=>{e._loadedRoutes=s.routes,e._loadedInjector=s.injector})):function AX(i){return pm(w3(CM,3))}())):ft({routes:[],injector:t})}lineralizeSegments(t,e){let n=[],r=e.root;for(;;){if(n=n.concat(r.segments),0===r.numberOfChildren)return ft(n);if(r.numberOfChildren>1||!r.children[_n])return t.redirectTo,pm(new pe(4e3,CM));r=r.children[_n]}}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 au(s,this.createQueryParams(e.queryParams,this.urlTree.queryParams),e.fragment)}createQueryParams(t,e){const n={};return os(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 os(e.children,(a,l)=>{o[l]=this.createSegmentGroup(t,a,n,r)}),new Tn(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 pe(4001,CM);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 RX{}class OX{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=wM(this.urlTree.root,[],[],this.config.filter(e=>void 0===e.redirectTo)).segmentGroup;return this.processSegmentGroup(this.injector,this.config,t,_n).pipe(et(e=>{if(null===e)return null;const n=new vM([],Object.freeze({}),Object.freeze({...this.urlTree.queryParams}),this.urlTree.fragment,{},_n,this.rootComponentType,null,this.urlTree.root,-1,{}),r=new Yc(n,e),s=new y3(this.url,r);return this.inheritParamsAndData(s._root),s}))}inheritParamsAndData(t){const e=t.value,n=v3(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 Ni(Object.keys(n.children)).pipe(ru(r=>{const s=n.children[r],o=A3(e,r);return this.processSegmentGroup(t,o,s,r)}),tI((r,s)=>r&&s?(r.push(...s),r):null),jB(r=>null!==r),lM(null),WB(),et(r=>{if(null===r)return null;const s=L3(r);return function FX(i){i.sort((t,e)=>t.value.outlet===_n?-1:e.value.outlet===_n?1:t.value.outlet.localeCompare(e.value.outlet))}(s),s}))}processSegment(t,e,n,r,s){return Ni(e).pipe(ru(o=>this.processSegmentAgainstRoute(o._injector??t,o,n,r,s)),iu(o=>!!o),jc(o=>{if(bI(o))return k3(n,r,s)?ft([]):ft(null);throw o}))}processSegmentAgainstRoute(t,e,n,r,s){if(e.redirectTo||!R3(e,n,r,s))return ft(null);let o;if("**"===e.path){const a=r.length>0?KB(r).parameters:{},l=B3(n)+r.length;o=ft({snapshot:new vM(r,a,Object.freeze({...this.urlTree.queryParams}),this.urlTree.fragment,U3(e),Ia(e),e.component??e._loadedComponent??null,e,N3(n),l,V3(e)),consumedSegments:[],remainingSegments:[]})}else o=I3(n,e,r,t).pipe(et(({matched:a,consumedSegments:l,remainingSegments:c,parameters:d})=>{if(!a)return null;const h=B3(n)+l.length;return{snapshot:new vM(l,d,Object.freeze({...this.urlTree.queryParams}),this.urlTree.fragment,U3(e),Ia(e),e.component??e._loadedComponent??null,e,N3(n),h,V3(e)),consumedSegments:l,remainingSegments:c}}));return o.pipe(ks(a=>{if(null===a)return ft(null);const{snapshot:l,consumedSegments:c,remainingSegments:d}=a;t=e._injector??t;const h=e._loadedInjector??t,p=function LX(i){return i.children?i.children:i.loadChildren?i._loadedRoutes:[]}(e),{segmentGroup:m,slicedSegments:g}=wM(n,c,d,p.filter(v=>void 0===v.redirectTo));if(0===g.length&&m.hasChildren())return this.processChildren(h,p,m).pipe(et(v=>null===v?null:[new Yc(l,v)]));if(0===p.length&&0===g.length)return ft([new Yc(l,[])]);const b=Ia(e)===s;return this.processSegment(h,p,m,g,b?_n:s).pipe(et(v=>null===v?null:[new Yc(l,v)]))}))}}function NX(i){const t=i.value.routeConfig;return t&&""===t.path&&void 0===t.redirectTo}function L3(i){const t=[],e=new Set;for(const n of i){if(!NX(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=L3(n.children);t.push(new Yc(n.value,r))}return t.filter(n=>!e.has(n))}function N3(i){let t=i;for(;t._sourceSegment;)t=t._sourceSegment;return t}function B3(i){let t=i,e=t._segmentIndexShift??0;for(;t._sourceSegment;)t=t._sourceSegment,e+=t._segmentIndexShift??0;return e-1}function U3(i){return i.data||{}}function V3(i){return i.resolve||{}}function z3(i){return"string"==typeof i.title||null===i.title}function MI(i){return ks(t=>{const e=i(t);return e?Ni(e).pipe(et(()=>t)):ft(t)})}const Mm=new me("ROUTES");let CI=(()=>{class i{constructor(){this.componentLoaders=new WeakMap,this.childrenLoaders=new WeakMap,this.compiler=Ft(mN)}loadComponent(e){if(this.componentLoaders.get(e))return this.componentLoaders.get(e);if(e._loadedComponent)return ft(e._loadedComponent);this.onLoadStartListener&&this.onLoadStartListener(e);const n=ou(e.loadComponent()).pipe(et(G3),Vi(s=>{this.onLoadEndListener&&this.onLoadEndListener(e),e._loadedComponent=s}),su(()=>{this.componentLoaders.delete(e)})),r=new GB(n,()=>new Re).pipe(eI());return this.componentLoaders.set(e,r),r}loadChildren(e,n){if(this.childrenLoaders.get(n))return this.childrenLoaders.get(n);if(n._loadedRoutes)return ft({routes:n._loadedRoutes,injector:n._loadedInjector});this.onLoadStartListener&&this.onLoadStartListener(n);const s=this.loadModuleFactoryOrRoutes(n.loadChildren).pipe(et(a=>{this.onLoadEndListener&&this.onLoadEndListener(n);let l,c,d=!1;Array.isArray(a)?c=a:(l=a.create(e).injector,c=XB(l.get(Mm,[],Ot.Self|Ot.Optional)));return{routes:c.map(yI),injector:l}}),su(()=>{this.childrenLoaders.delete(n)})),o=new GB(s,()=>new Re).pipe(eI());return this.childrenLoaders.set(n,o),o}loadModuleFactoryOrRoutes(e){return ou(e()).pipe(et(G3),rr(n=>n instanceof D2||Array.isArray(n)?ft(n):Ni(this.compiler.compileModuleAsync(n))))}}return i.\u0275fac=function(e){return new(e||i)},i.\u0275prov=ke({token:i,factory:i.\u0275fac,providedIn:"root"}),i})();function G3(i){return function WX(i){return i&&"object"==typeof i&&"default"in i}(i)?i.default:i}let AM=(()=>{class i{get hasRequestedNavigation(){return 0!==this.navigationId}constructor(){this.currentNavigation=null,this.lastSuccessfulNavigation=null,this.events=new Re,this.configLoader=Ft(CI),this.environmentInjector=Ft(io),this.urlSerializer=Ft(Ty),this.rootContexts=Ft(Fy),this.navigationId=0,this.afterPreactivation=()=>ft(void 0),this.rootComponentType=null,this.configLoader.onLoadEndListener=r=>this.events.next(new kq(r)),this.configLoader.onLoadStartListener=r=>this.events.next(new Rq(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 ut({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:Py,restoredState:null,currentSnapshot:e.routerState.snapshot,targetSnapshot:null,currentRouterState:e.routerState,targetRouterState:null,guards:{canActivateChecks:[],canDeactivateChecks:[]},guardsResult:null}),this.transitions.pipe(gn(n=>0!==n.id),et(n=>({...n,extractedUrl:e.urlHandlingStrategy.extract(n.rawUrl)})),ks(n=>{let r=!1,s=!1;return ft(n).pipe(Vi(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}}),ks(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 d="";return this.events.next(new _M(o.id,e.serializeUrl(n.rawUrl),d,0)),e.rawUrlTree=o.rawUrl,o.resolve(null),mo}if(e.urlHandlingStrategy.shouldProcessUrl(o.rawUrl))return $3(o.source)&&(e.browserUrlTree=o.extractedUrl),ft(o).pipe(ks(d=>{const h=this.transitions?.getValue();return this.events.next(new cI(d.id,this.urlSerializer.serialize(d.extractedUrl),d.source,d.restoredState)),h!==this.transitions?.getValue()?mo:Promise.resolve(d)}),function IX(i,t,e,n){return ks(r=>function DX(i,t,e,n,r){return new TX(i,t,e,n,r).apply()}(i,t,e,r.extractedUrl,n).pipe(et(s=>({...r,urlAfterRedirects:s}))))}(this.environmentInjector,this.configLoader,this.urlSerializer,e.config),Vi(d=>{this.currentNavigation={...this.currentNavigation,finalUrl:d.urlAfterRedirects},n.urlAfterRedirects=d.urlAfterRedirects}),function UX(i,t,e,n,r){return rr(s=>function PX(i,t,e,n,r,s,o="emptyOnly"){return new OX(i,t,e,n,r,o,s).recognize().pipe(ks(a=>null===a?function kX(i){return new In(t=>t.error(i))}(new RX):ft(a)))}(i,t,e,s.urlAfterRedirects,n.serialize(s.urlAfterRedirects),n,r).pipe(et(o=>({...s,targetSnapshot:o}))))}(this.environmentInjector,this.rootComponentType,e.config,this.urlSerializer,e.paramsInheritanceStrategy),Vi(d=>{if(n.targetSnapshot=d.targetSnapshot,"eager"===e.urlUpdateStrategy){if(!d.extras.skipLocationChange){const p=e.urlHandlingStrategy.merge(d.urlAfterRedirects,d.rawUrl);e.setBrowserUrl(p,d)}e.browserUrlTree=d.urlAfterRedirects}const h=new Eq(d.id,this.urlSerializer.serialize(d.extractedUrl),this.urlSerializer.serialize(d.urlAfterRedirects),d.targetSnapshot);this.events.next(h)}));if(l&&e.urlHandlingStrategy.shouldProcessUrl(e.rawUrlTree)){const{id:d,extractedUrl:h,source:p,restoredState:m,extras:g}=o,b=new cI(d,this.urlSerializer.serialize(h),p,m);this.events.next(b);const v=_3(h,this.rootComponentType).snapshot;return ft(n={...o,targetSnapshot:v,urlAfterRedirects:h,extras:{...g,skipLocationChange:!1,replaceUrl:!1}})}{const d="";return this.events.next(new _M(o.id,e.serializeUrl(n.extractedUrl),d,1)),e.rawUrlTree=o.rawUrl,o.resolve(null),mo}}),Vi(o=>{const a=new Aq(o.id,this.urlSerializer.serialize(o.extractedUrl),this.urlSerializer.serialize(o.urlAfterRedirects),o.targetSnapshot);this.events.next(a)}),et(o=>n={...o,guards:tX(o.targetSnapshot,o.currentSnapshot,this.rootContexts)}),function hX(i,t){return rr(e=>{const{targetSnapshot:n,currentSnapshot:r,guards:{canActivateChecks:s,canDeactivateChecks:o}}=e;return 0===o.length&&0===s.length?ft({...e,guardsResult:!0}):function fX(i,t,e,n){return Ni(i).pipe(rr(r=>function yX(i,t,e,n,r){const s=t&&t.routeConfig?t.routeConfig.canDeactivate:null;return s&&0!==s.length?ft(s.map(a=>{const l=Ly(t)??r,c=xm(a,l);return ou(function cX(i){return i&&Uy(i.canDeactivate)}(c)?c.canDeactivate(i,t,e,n):l.runInContext(()=>c(i,t,e,n))).pipe(iu())})).pipe(wm()):ft(!0)}(r.component,r.route,e,t,n)),iu(r=>!0!==r,!0))}(o,n,r,i).pipe(rr(a=>a&&function sX(i){return"boolean"==typeof i}(a)?function pX(i,t,e,n){return Ni(t).pipe(ru(r=>Sy(function gX(i,t){return null!==i&&t&&t(new Pq(i)),ft(!0)}(r.route.parent,n),function mX(i,t){return null!==i&&t&&t(new Fq(i)),ft(!0)}(r.route,n),function vX(i,t,e){const n=t[t.length-1],s=t.slice(0,t.length-1).reverse().map(o=>function nX(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=>Ey(()=>ft(o.guards.map(l=>{const c=Ly(o.node)??e,d=xm(l,c);return ou(function lX(i){return i&&Uy(i.canActivateChild)}(d)?d.canActivateChild(n,i):c.runInContext(()=>d(n,i))).pipe(iu())})).pipe(wm())));return ft(s).pipe(wm())}(i,r.path,e),function _X(i,t,e){const n=t.routeConfig?t.routeConfig.canActivate:null;if(!n||0===n.length)return ft(!0);const r=n.map(s=>Ey(()=>{const o=Ly(t)??e,a=xm(s,o);return ou(function aX(i){return i&&Uy(i.canActivate)}(a)?a.canActivate(t,i):o.runInContext(()=>a(t,i))).pipe(iu())}));return ft(r).pipe(wm())}(i,r.route,e))),iu(r=>!0!==r,!0))}(n,s,i,t):ft(a)),et(a=>({...e,guardsResult:a})))})}(this.environmentInjector,o=>this.events.next(o)),Vi(o=>{if(n.guardsResult=o.guardsResult,kh(o.guardsResult))throw x3(0,o.guardsResult);const a=new Dq(o.id,this.urlSerializer.serialize(o.extractedUrl),this.urlSerializer.serialize(o.urlAfterRedirects),o.targetSnapshot,!!o.guardsResult);this.events.next(a)}),gn(o=>!!o.guardsResult||(e.restoreHistory(o),this.cancelNavigationTransition(o,"",3),!1)),MI(o=>{if(o.guards.canActivateChecks.length)return ft(o).pipe(Vi(a=>{const l=new Tq(a.id,this.urlSerializer.serialize(a.extractedUrl),this.urlSerializer.serialize(a.urlAfterRedirects),a.targetSnapshot);this.events.next(l)}),ks(a=>{let l=!1;return ft(a).pipe(function VX(i,t){return rr(e=>{const{targetSnapshot:n,guards:{canActivateChecks:r}}=e;if(!r.length)return ft(e);let s=0;return Ni(r).pipe(ru(o=>function zX(i,t,e,n){const r=i.routeConfig,s=i._resolve;return void 0!==r?.title&&!z3(r)&&(s[Ay]=r.title),function HX(i,t,e,n){const r=function GX(i){return[...Object.keys(i),...Object.getOwnPropertySymbols(i)]}(i);if(0===r.length)return ft({});const s={};return Ni(r).pipe(rr(o=>function $X(i,t,e,n){const r=Ly(t)??n,s=xm(i,r);return ou(s.resolve?s.resolve(t,e):r.runInContext(()=>s(t,e)))}(i[o],t,e,n).pipe(iu(),Vi(a=>{s[o]=a}))),nI(1),YB(s),jc(o=>bI(o)?mo:pm(o)))}(s,i,t,n).pipe(et(o=>(i._resolvedData=o,i.data=v3(i,e).resolve,r&&z3(r)&&(i.data[Ay]=r.title),null)))}(o.route,n,i,t)),Vi(()=>s++),nI(1),rr(o=>s===r.length?ft(e):mo))})}(e.paramsInheritanceStrategy,this.environmentInjector),Vi({next:()=>l=!0,complete:()=>{l||(e.restoreHistory(a),this.cancelNavigationTransition(a,"",2))}}))}),Vi(a=>{const l=new Iq(a.id,this.urlSerializer.serialize(a.extractedUrl),this.urlSerializer.serialize(a.urlAfterRedirects),a.targetSnapshot);this.events.next(l)}))}),MI(o=>{const a=l=>{const c=[];l.routeConfig?.loadComponent&&!l.routeConfig._loadedComponent&&c.push(this.configLoader.loadComponent(l.routeConfig).pipe(Vi(d=>{l.component=d}),et(()=>{})));for(const d of l.children)c.push(...a(d));return c};return Xl(a(o.targetSnapshot.root)).pipe(lM(),Oi(1))}),MI(()=>this.afterPreactivation()),et(o=>{const a=function $q(i,t,e){const n=Oy(i,t._root,e?e._root:void 0);return new g3(n,t)}(e.routeReuseStrategy,o.targetSnapshot,o.currentRouterState);return n={...o,targetRouterState:a}}),Vi(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)=>et(n=>(new eX(t,n.targetRouterState,n.currentRouterState,e).activate(i),n)))(this.rootContexts,e.routeReuseStrategy,o=>this.events.next(o)),Oi(1),Vi({next:o=>{r=!0,this.lastSuccessfulNavigation=this.currentNavigation,e.navigated=!0,this.events.next(new Ph(o.id,this.urlSerializer.serialize(o.extractedUrl),this.urlSerializer.serialize(e.currentUrlTree))),e.titleStrategy?.updateTitle(o.targetRouterState.snapshot),o.resolve(!0)},complete:()=>{r=!0}}),su(()=>{r||s||this.cancelNavigationTransition(n,"",1),this.currentNavigation?.id===n.id&&(this.currentNavigation=null)}),jc(o=>{if(s=!0,C3(o)){M3(o)||(e.navigated=!0,e.restoreHistory(n,!0));const a=new gM(n.id,this.urlSerializer.serialize(n.extractedUrl),o.message,o.cancellationCode);if(this.events.next(a),M3(o)){const l=e.urlHandlingStrategy.merge(o.url,e.rawUrlTree),c={skipLocationChange:n.extras.skipLocationChange,replaceUrl:"eager"===e.urlUpdateStrategy||$3(n.source)};e.scheduleNavigation(l,Py,null,c,{resolve:n.resolve,reject:n.reject,promise:n.promise})}else n.resolve(!1)}else{e.restoreHistory(n,!0);const a=new dI(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 mo}))}))}cancelNavigationTransition(e,n,r){const s=new gM(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=ke({token:i,factory:i.\u0275fac,providedIn:"root"}),i})();function $3(i){return i!==Py}let W3=(()=>{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===_n);return n}getResolvedTitleForRoute(e){return e.data[Ay]}}return i.\u0275fac=function(e){return new(e||i)},i.\u0275prov=ke({token:i,factory:function(){return Ft(jX)},providedIn:"root"}),i})(),jX=(()=>{class i extends W3{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)(ee(LB))},i.\u0275prov=ke({token:i,factory:i.\u0275fac,providedIn:"root"}),i})(),YX=(()=>{class i{}return i.\u0275fac=function(e){return new(e||i)},i.\u0275prov=ke({token:i,factory:function(){return Ft(XX)},providedIn:"root"}),i})();class qX{shouldDetach(t){return!1}store(t,e){}shouldAttach(t){return!1}retrieve(t){return null}shouldReuseRoute(t,e){return t.routeConfig===e.routeConfig}}let XX=(()=>{class i extends qX{}return i.\u0275fac=function(){let t;return function(n){return(t||(t=ri(i)))(n||i)}}(),i.\u0275prov=ke({token:i,factory:i.\u0275fac,providedIn:"root"}),i})();const DM=new me("",{providedIn:"root",factory:()=>({})});let ZX=(()=>{class i{}return i.\u0275fac=function(e){return new(e||i)},i.\u0275prov=ke({token:i,factory:function(){return Ft(QX)},providedIn:"root"}),i})(),QX=(()=>{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=ke({token:i,factory:i.\u0275fac,providedIn:"root"}),i})();function JX(i){throw i}function eK(i,t,e){return t.parse("/")}const tK={paths:"exact",fragment:"ignored",matrixParams:"ignored",queryParams:"exact"},nK={paths:"subset",fragment:"ignored",matrixParams:"ignored",queryParams:"subset"};let Xo=(()=>{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=Ft(L6),this.isNgZoneEnabled=!1,this.options=Ft(DM,{optional:!0})||{},this.errorHandler=this.options.errorHandler||JX,this.malformedUriErrorHandler=this.options.malformedUriErrorHandler||eK,this.navigated=!1,this.lastSuccessfulId=-1,this.urlHandlingStrategy=Ft(ZX),this.routeReuseStrategy=Ft(YX),this.urlCreationStrategy=Ft(zq),this.titleStrategy=Ft(W3),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=XB(Ft(Mm,{optional:!0})??[]),this.navigationTransitions=Ft(AM),this.urlSerializer=Ft(Ty),this.location=Ft(_y),this.isNgZoneEnabled=Ft(pt)instanceof pt&&pt.isInAngularZone(),this.resetConfig(this.config),this.currentUrlTree=new au,this.rawUrlTree=this.currentUrlTree,this.browserUrlTree=this.currentUrlTree,this.routerState=_3(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),Py,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(yI),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 d=null;switch(a){case"merge":d={...this.currentUrlTree.queryParams,...s};break;case"preserve":d=this.currentUrlTree.queryParams;break;default:d=s||null}return null!==d&&(d=this.removeEmptyProps(d)),this.urlCreationStrategy.createUrlTree(r,this.routerState,this.currentUrlTree,e,d,c??null)}navigateByUrl(e,n={skipLocationChange:!1}){const r=kh(e)?e:this.parseUrl(e),s=this.urlHandlingStrategy.merge(r,this.rawUrlTree);return this.scheduleNavigation(s,Py,null,n)}navigate(e,n={skipLocationChange:!1}){return function iK(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,d;return o?(a=o.resolve,l=o.reject,c=o.promise):c=new Promise((h,p)=>{a=h,l=p}),d="computed"===this.canceledNavigationResolution?r&&r.\u0275routerPageId?r.\u0275routerPageId:(this.browserPageId??0)+1:0,this.navigationTransitions.handleNavigationRequest({targetPageId:d,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=ke({token:i,factory:i.\u0275fac,providedIn:"root"}),i})();class j3{}let oK=(()=>{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(gn(e=>e instanceof Ph),ru(()=>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=Fw(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 Ni(r).pipe(bd())}preloadConfig(e,n){return this.preloadingStrategy.preload(n,()=>{let r;r=n.loadChildren&&void 0===n.canLoad?this.loader.loadChildren(e,n):ft(null);const s=r.pipe(rr(o=>null===o?ft(void 0):(n._loadedRoutes=o.routes,n._loadedInjector=o.injector,this.processRoutes(o.injector??e,o.routes))));return n.loadComponent&&!n._loadedComponent?Ni([s,this.loader.loadComponent(n)]).pipe(bd()):s})}}return i.\u0275fac=function(e){return new(e||i)(ee(Xo),ee(mN),ee(io),ee(j3),ee(CI))},i.\u0275prov=ke({token:i,factory:i.\u0275fac,providedIn:"root"}),i})();const AI=new me("");let Y3=(()=>{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 cI?(this.store[this.lastId]=this.viewportScroller.getScrollPosition(),this.lastSource=e.navigationTrigger,this.restoredId=e.restoredState?e.restoredState.navigationId:0):e instanceof Ph&&(this.lastId=e.id,this.scheduleScrollEvent(e,this.urlSerializer.parse(e.urlAfterRedirects).fragment))})}consumeScrollEvents(){return this.transitions.events.subscribe(e=>{e instanceof p3&&(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 p3(e,"popstate"===this.lastSource?this.store[this.restoredId]:null,n))})},0)})}ngOnDestroy(){this.routerEventsSubscription?.unsubscribe(),this.scrollEventsSubscription?.unsubscribe()}}return i.\u0275fac=function(e){wo()},i.\u0275prov=ke({token:i,factory:i.\u0275fac}),i})();var Ko=(()=>((Ko=Ko||{})[Ko.COMPLETE=0]="COMPLETE",Ko[Ko.FAILED=1]="FAILED",Ko[Ko.REDIRECTING=2]="REDIRECTING",Ko))();const Cm=!1;function lu(i,t){return{\u0275kind:i,\u0275providers:t}}const DI=new me("",{providedIn:"root",factory:()=>!1});function X3(){const i=Ft($i);return t=>{const e=i.get(dm);if(t!==e.components[0])return;const n=i.get(Xo),r=i.get(K3);1===i.get(TI)&&n.initialNavigation(),i.get(Z3,null,Ot.Optional)?.setUpPreloading(),i.get(AI,null,Ot.Optional)?.init(),n.resetRootComponentType(e.componentTypes[0]),r.closed||(r.next(),r.complete(),r.unsubscribe())}}const K3=new me(Cm?"bootstrap done indicator":"",{factory:()=>new Re}),TI=new me(Cm?"initial navigation":"",{providedIn:"root",factory:()=>1});function uK(){let i=[];return i=Cm?[{provide:Np,multi:!0,useFactory:()=>{const t=Ft(Xo);return()=>t.events.subscribe(e=>{console.group?.(`Router Event: ${e.constructor.name}`),console.log(function Nq(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?.()})}}]:[],lu(1,i)}const Z3=new me(Cm?"router preloader":"");function hK(i){return lu(0,[{provide:Z3,useExisting:oK},{provide:j3,useExisting:i}])}const zy=!1,Q3=new me(zy?"router duplicate forRoot guard":"ROUTER_FORROOT_GUARD"),fK=[_y,{provide:Ty,useClass:iI},Xo,Fy,{provide:bm,useFactory:function q3(i){return i.routerState.root},deps:[Xo]},CI,zy?{provide:DI,useValue:!0}:[]];function pK(){return new MN("Router",Xo)}let J3=(()=>{class i{constructor(e){}static forRoot(e,n){return{ngModule:i,providers:[fK,zy&&n?.enableTracing?uK().\u0275providers:[],{provide:Mm,multi:!0,useValue:e},{provide:Q3,useFactory:vK,deps:[[Xo,new Ss,new Ma]]},{provide:DM,useValue:n||{}},n?.useHash?{provide:Ih,useClass:C9}:{provide:Ih,useClass:jN},{provide:AI,useFactory:()=>{const i=Ft(UY),t=Ft(pt),e=Ft(DM),n=Ft(AM),r=Ft(Ty);return e.scrollOffset&&i.setOffset(e.scrollOffset),new Y3(r,n,i,t,e)}},n?.preloadingStrategy?hK(n.preloadingStrategy).\u0275providers:[],{provide:MN,multi:!0,useFactory:pK},n?.initialNavigation?yK(n):[],[{provide:eU,useFactory:X3},{provide:wN,multi:!0,useExisting:eU}]]}}static forChild(e){return{ngModule:i,providers:[{provide:Mm,multi:!0,useValue:e}]}}}return i.\u0275fac=function(e){return new(e||i)(ee(Q3,8))},i.\u0275mod=nn({type:i}),i.\u0275inj=Kt({imports:[_I]}),i})();function vK(i){if(zy&&i)throw new pe(4007,"The Router was provided more than once. This can happen if 'forRoot' is used outside of the root injector. Lazy loaded modules should use RouterModule.forChild() instead.");return"guarded"}function yK(i){return["disabled"===i.initialNavigation?lu(3,[{provide:Uw,multi:!0,useFactory:()=>{const t=Ft(Xo);return()=>{t.setUpLocationChangeListener()}}},{provide:TI,useValue:2}]).\u0275providers:[],"enabledBlocking"===i.initialNavigation?lu(2,[{provide:TI,useValue:0},{provide:Uw,multi:!0,deps:[$i],useFactory:t=>{const e=t.get(w9,Promise.resolve());return()=>e.then(()=>new Promise(n=>{const r=t.get(Xo),s=t.get(K3);(function aK(i,t){i.events.pipe(gn(e=>e instanceof Ph||e instanceof gM||e instanceof dI||e instanceof _M),et(e=>e instanceof Ph||e instanceof _M?Ko.COMPLETE:e instanceof gM&&(0===e.code||1===e.code)?Ko.REDIRECTING:Ko.FAILED),gn(e=>e!==Ko.REDIRECTING),Oi(1)).subscribe(()=>{t()})})(r,()=>{n(!0)}),t.get(AM).afterPreactivation=()=>(n(!0),s.closed?ft(void 0):s),r.initialNavigation()}))}}]).\u0275providers:[]]}const eU=new me(zy?"Router Initializer":""),xK=[];let wK=(()=>{class i{}return i.\u0275fac=function(e){return new(e||i)},i.\u0275mod=nn({type:i}),i.\u0275inj=Kt({imports:[J3.forRoot(xK),J3]}),i})();function tU(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 tt(i){return function(){var t=this,e=arguments;return new Promise(function(n,r){var s=i.apply(t,e);function o(l){tU(s,n,r,o,a,"next",l)}function a(l){tU(s,n,r,o,a,"throw",l)}o(void 0)})}}function Jt(i){return null!=i&&"false"!=`${i}`}function Ps(i,t=0){return function MK(i){return!isNaN(parseFloat(i))&&!isNaN(Number(i))}(i)?Number(i):t}function TM(i){return Array.isArray(i)?i:[i]}function _r(i){return null==i?"":"string"==typeof i?i:`${i}px`}function qc(i){return i instanceof gt?i.nativeElement:i}const CK=["addListener","removeListener"],SK=["addEventListener","removeEventListener"],EK=["on","off"];function To(i,t,e,n){if(cn(e)&&(n=e,e=void 0),n)return To(i,t,e).pipe(JT(n));const[r,s]=function TK(i){return cn(i.addEventListener)&&cn(i.removeEventListener)}(i)?SK.map(o=>a=>i[o](t,a,e)):function AK(i){return cn(i.addListener)&&cn(i.removeListener)}(i)?CK.map(nU(i,t)):function DK(i){return cn(i.on)&&cn(i.off)}(i)?EK.map(nU(i,t)):[];if(!r&&i_(i))return rr(o=>To(o,t,e))(Mr(i));if(!r)throw new TypeError("Invalid event target");return new In(o=>{const a=(...l)=>o.next(1s(a)})}function nU(i,t){return e=>n=>i[e](t,n)}class IK extends Zt{constructor(t,e){super()}schedule(t,e=0){return this}}const IM={setInterval(i,t,...e){const{delegate:n}=IM;return n?.setInterval?n.setInterval(i,t,...e):setInterval(i,t,...e)},clearInterval(i){const{delegate:t}=IM;return(t?.clearInterval||clearInterval)(i)},delegate:void 0};class II extends IK{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 IM.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&&IM.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,Kr(n,this),null!=t&&(this.id=this.recycleAsyncId(e,t,null)),this.delay=null,super.unsubscribe()}}}const Hy={schedule(i){let t=requestAnimationFrame,e=cancelAnimationFrame;const{delegate:n}=Hy;n&&(t=n.requestAnimationFrame,e=n.cancelAnimationFrame);const r=t(s=>{e=void 0,i(s)});return new Zt(()=>e?.(r))},requestAnimationFrame(...i){const{delegate:t}=Hy;return(t?.requestAnimationFrame||requestAnimationFrame)(...i)},cancelAnimationFrame(...i){const{delegate:t}=Hy;return(t?.cancelAnimationFrame||cancelAnimationFrame)(...i)},delegate:void 0},iU={now:()=>(iU.delegate||Date).now(),delegate:void 0};class Gy{constructor(t,e=Gy.now){this.schedulerActionCtor=t,this.now=e}schedule(t,e=0,n){return new this.schedulerActionCtor(this,t).schedule(n,e)}}Gy.now=iU.now;class RI extends Gy{constructor(t,e=Gy.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 PK=new class kK extends RI{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 RK extends II{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=Hy.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&&(Hy.cancelAnimationFrame(e),t._scheduled=void 0)}});let kI,OK=1;const RM={};function rU(i){return i in RM&&(delete RM[i],!0)}const FK={setImmediate(i){const t=OK++;return RM[t]=!0,kI||(kI=Promise.resolve()),kI.then(()=>rU(t)&&i()),t},clearImmediate(i){rU(i)}},{setImmediate:LK,clearImmediate:NK}=FK,kM={setImmediate(...i){const{delegate:t}=kM;return(t?.setImmediate||LK)(...i)},clearImmediate(i){const{delegate:t}=kM;return(t?.clearImmediate||NK)(i)},delegate:void 0},PI=new class UK extends RI{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 BK extends II{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=kM.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&&(kM.clearImmediate(e),t._scheduled===e&&(t._scheduled=void 0))}}),$y=new RI(II),VK=$y;function OI(i=0,t,e=VK){let n=-1;return null!=t&&(Gu(t)?e=t:n=t),new In(r=>{let s=function HK(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 PM(i,t=$y){return function zK(i){return ti((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(Yn(e,c=>{n=!0,r=c,s||Mr(i(c)).subscribe(s=Yn(e,a,l))},()=>{o=!0,(!n||!s||s.closed)&&e.complete()}))})}(()=>OI(i,t))}function Ve(i){return ti((t,e)=>{Mr(i).subscribe(Yn(e,()=>e.complete(),ms)),!e.closed&&t.subscribe(e)})}let FI;try{FI=typeof Intl<"u"&&Intl.v8BreakIterator}catch{FI=!1}let Sm,zi=(()=>{class i{constructor(e){this._platformId=e,this.isBrowser=this._platformId?function BY(i){return i===hB}(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&&!FI)&&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)(ee(fT))},i.\u0275prov=ke({token:i,factory:i.\u0275fac,providedIn:"root"}),i})();const sU=["color","button","checkbox","date","datetime-local","email","file","hidden","image","month","number","password","radio","range","reset","search","submit","tel","text","time","url","week"];function oU(){if(Sm)return Sm;if("object"!=typeof document||!document)return Sm=new Set(sU),Sm;let i=document.createElement("input");return Sm=new Set(sU.filter(t=>(i.setAttribute("type",t),i.type===t))),Sm}let Wy,OM,Fh,LI;function Oh(i){return function GK(){if(null==Wy&&typeof window<"u")try{window.addEventListener("test",null,Object.defineProperty({},"passive",{get:()=>Wy=!0}))}finally{Wy=Wy||!1}return Wy}()?i:!!i.capture}function aU(){if(null==Fh){if("object"!=typeof document||!document||"function"!=typeof Element||!Element)return Fh=!1,Fh;if("scrollBehavior"in document.documentElement.style)Fh=!0;else{const i=Element.prototype.scrollTo;Fh=!!i&&!/\{\s*\[native code\]\s*\}/.test(i.toString())}}return Fh}function jy(){if("object"!=typeof document||!document)return 0;if(null==OM){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),OM=0,0===i.scrollLeft&&(i.scrollLeft=1,OM=0===i.scrollLeft?1:2),i.remove()}return OM}function FM(){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 cu(i){return i.composedPath?i.composedPath()[0]:i.target}function NI(){return typeof __karma__<"u"&&!!__karma__||typeof jasmine<"u"&&!!jasmine||typeof jest<"u"&&!!jest||typeof Mocha<"u"&&!!Mocha}const jK=new me("cdk-dir-doc",{providedIn:"root",factory:function YK(){return Ft(jt)}}),qK=/^(ar|ckb|dv|he|iw|fa|nqo|ps|sd|ug|ur|yi|.*[-_](Adlm|Arab|Hebr|Nkoo|Rohg|Thaa))(?!.*[-_](Latn|Cyrl)($|-|_))($|-|_)/i;let Ra=(()=>{class i{constructor(e){this.value="ltr",this.change=new $e,e&&(this.value=function XK(i){const t=i?.toLowerCase()||"";return"auto"===t&&typeof navigator<"u"&&navigator?.language?qK.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)(ee(jK,8))},i.\u0275prov=ke({token:i,factory:i.\u0275fac,providedIn:"root"}),i})(),Yy=(()=>{class i{}return i.\u0275fac=function(e){return new(e||i)},i.\u0275mod=nn({type:i}),i.\u0275inj=Kt({}),i})();const KK=["contentWrapper"],ZK=["*"],QK=new me("VIRTUAL_SCROLL_STRATEGY");let qy=(()=>{class i{constructor(e,n,r){this._ngZone=e,this._platform=n,this._scrolled=new Re,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 In(n=>{this._globalSubscription||this._addGlobalListener();const r=e>0?this._scrolled.pipe(PM(e)).subscribe(n):this._scrolled.subscribe(n);return this._scrolledCount++,()=>{r.unsubscribe(),this._scrolledCount--,this._scrolledCount||this._removeGlobalListener()}}):ft()}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(gn(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=qc(n),s=e.getElementRef().nativeElement;do{if(r==s)return!0}while(r=r.parentElement);return!1}_addGlobalListener(){this._globalSubscription=this._ngZone.runOutsideAngular(()=>To(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)(ee(pt),ee(zi),ee(jt,8))},i.\u0275prov=ke({token:i,factory:i.\u0275fac,providedIn:"root"}),i})(),lU=(()=>{class i{constructor(e,n,r,s){this.elementRef=e,this.scrollDispatcher=n,this.ngZone=r,this.dir=s,this._destroyed=new Re,this._elementScrolled=new In(o=>this.ngZone.runOutsideAngular(()=>To(this.elementRef.nativeElement,"scroll").pipe(Ve(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!=jy()?(null!=e.left&&(e.right=n.scrollWidth-n.clientWidth-e.left),2==jy()?e.left=e.right:1==jy()&&(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;aU()?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==jy()?e==n?s.scrollWidth-s.clientWidth-s.scrollLeft:s.scrollLeft:o&&1==jy()?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)(E(gt),E(qy),E(pt),E(Ra,8))},i.\u0275dir=ve({type:i,selectors:[["","cdk-scrollable",""],["","cdkScrollable",""]],standalone:!0}),i})(),LM=(()=>{class i{constructor(e,n,r){this._platform=e,this._change=new Re,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(PM(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)(ee(zi),ee(pt),ee(jt,8))},i.\u0275prov=ke({token:i,factory:i.\u0275fac,providedIn:"root"}),i})();const cU=new me("VIRTUAL_SCROLLABLE");let tZ=(()=>{class i extends lU{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)(E(gt),E(qy),E(pt),E(Ra,8))},i.\u0275dir=ve({type:i,features:[lt]}),i})();const iZ=typeof requestAnimationFrame<"u"?PK:PI;let rZ=(()=>{class i extends tZ{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=Ft(zi),this._detachedSubject=new Re,this._renderedRangeSubject=new Re,this._orientation="vertical",this._appendOnly=!1,this.scrolledIndexChange=new In(d=>this._scrollStrategy.scrolledIndexChange.subscribe(h=>Promise.resolve().then(()=>this.ngZone.run(()=>d.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=Zt.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(Do(null),PM(0,iZ)).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(Ve(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 nZ(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)(E(gt),E(Zn),E(pt),E(QK,8),E(Ra,8),E(qy),E(LM),E(cU,8))},i.\u0275cmp=ot({type:i,selectors:[["cdk-virtual-scroll-viewport"]],viewQuery:function(e,n){if(1&e&&Wn(KK,7),2&e){let r;Et(r=At())&&(n._contentWrapper=r.first)}},hostAttrs:[1,"cdk-virtual-scroll-viewport"],hostVars:4,hostBindings:function(e,n){2&e&&un("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:[Dn([{provide:lU,useFactory:(t,e)=>t||e,deps:[[new Ss,new yo(cU)],i]}]),lt,Z1],ngContentSelectors:ZK,decls:4,vars:4,consts:[[1,"cdk-virtual-scroll-content-wrapper"],["contentWrapper",""],[1,"cdk-virtual-scroll-spacer"]],template:function(e,n){1&e&&(or(),W(0,"div",0,1),Wt(2),j(),Pe(3,"div",2)),2&e&&(G(3),qo("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})(),Xy=(()=>{class i{}return i.\u0275fac=function(e){return new(e||i)},i.\u0275mod=nn({type:i}),i.\u0275inj=Kt({}),i})(),dU=(()=>{class i{}return i.\u0275fac=function(e){return new(e||i)},i.\u0275mod=nn({type:i}),i.\u0275inj=Kt({imports:[Yy,Xy,rZ,Yy,Xy]}),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 Lh 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 sZ extends BI{constructor(t){super(),this.element=t instanceof gt?t.nativeElement:t}}class NM{constructor(){this._isDisposed=!1,this.attachDomPortal=null}hasAttached(){return!!this._attachedPortal}attach(t){return t instanceof Lh?(this._attachedPortal=t,this.attachComponentPortal(t)):t instanceof Em?(this._attachedPortal=t,this.attachTemplatePortal(t)):this.attachDomPortal&&t instanceof sZ?(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 oZ extends NM{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||$i.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 NM{constructor(e,n,r){super(),this._componentFactoryResolver=e,this._viewContainerRef=n,this._isInitialized=!1,this.attached=new $e,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)(E(Hl),E(jr),E(jt))},i.\u0275dir=ve({type:i,selectors:[["","cdkPortalOutlet",""]],inputs:{portal:["cdkPortalOutlet","portal"]},outputs:{attached:"attached"},exportAs:["cdkPortalOutlet"],features:[lt]}),i})(),Nh=(()=>{class i{}return i.\u0275fac=function(e){return new(e||i)},i.\u0275mod=nn({type:i}),i.\u0275inj=Kt({}),i})();function Zo(i,...t){return t.length?t.some(e=>i[e]):i.altKey||i.shiftKey||i.ctrlKey||i.metaKey}const uU=aU();class bZ{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=_r(-this._previousScrollPosition.left),t.style.top=_r(-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"),uU&&(n.scrollBehavior=r.scrollBehavior="auto"),window.scroll(this._previousScrollPosition.left,this._previousScrollPosition.top),uU&&(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 xZ{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(gn(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 hU{enable(){}disable(){}attach(){}}function VI(i,t){return t.some(e=>i.bottome.bottom||i.righte.right)}function fU(i,t){return t.some(e=>i.tope.bottom||i.lefte.right)}class wZ{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();VI(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 MZ=(()=>{class i{constructor(e,n,r,s){this._scrollDispatcher=e,this._viewportRuler=n,this._ngZone=r,this.noop=()=>new hU,this.close=o=>new xZ(this._scrollDispatcher,this._ngZone,this._viewportRuler,o),this.block=()=>new bZ(this._viewportRuler,this._document),this.reposition=o=>new wZ(this._scrollDispatcher,this._viewportRuler,this._ngZone,o),this._document=s}}return i.\u0275fac=function(e){return new(e||i)(ee(qy),ee(LM),ee(pt),ee(jt))},i.\u0275prov=ke({token:i,factory:i.\u0275fac,providedIn:"root"}),i})();class km{constructor(t){if(this.scrollStrategy=new hU,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 CZ{constructor(t,e){this.connectionPair=t,this.scrollableViewProperties=e}}let pU=(()=>{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)(ee(jt))},i.\u0275prov=ke({token:i,factory:i.\u0275fac,providedIn:"root"}),i})(),SZ=(()=>{class i extends pU{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)(ee(jt),ee(pt,8))},i.\u0275prov=ke({token:i,factory:i.\u0275fac,providedIn:"root"}),i})(),EZ=(()=>{class i extends pU{constructor(e,n,r){super(e),this._platform=n,this._ngZone=r,this._cursorStyleIsSet=!1,this._pointerDownListener=s=>{this._pointerDownEventTarget=cu(s)},this._clickListener=s=>{const o=cu(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 d=l[c];if(d._outsidePointerEvents.observers.length<1||!d.hasAttached())continue;if(d.overlayElement.contains(o)||d.overlayElement.contains(a))break;const h=d._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)(ee(jt),ee(zi),ee(pt,8))},i.\u0275prov=ke({token:i,factory:i.\u0275fac,providedIn:"root"}),i})(),VM=(()=>{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||NI()){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 Re,this._outsidePointerEvents=new Re,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(Oi(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=_r(this._config.width),t.height=_r(this._config.height),t.minWidth=_r(this._config.minWidth),t.minHeight=_r(this._config.minHeight),t.maxWidth=_r(this._config.maxWidth),t.maxHeight=_r(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=TM(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(Ve(Cr(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 mU="cdk-overlay-connected-position-bounding-box",AZ=/([A-Za-z%]+)$/;class DZ{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 Re,this._resizeSubscription=Zt.EMPTY,this._offsetX=0,this._offsetY=0,this._appliedPanelClasses=[],this.positionChanges=this._positionChanges,this.setOrigin(t)}attach(t){this._validatePositions(),t.hostElement.classList.add(mU),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),d=this._getOverlayFit(c,e,n,a);if(d.isCompletelyWithinViewport)return this._isPushed=!1,void this._applyPosition(a,l);this._canFitWithFlexibleDimensions(d,c,n)?s.push({position:a,origin:l,overlayRect:e,boundingBoxRect:this._calculateBoundingBoxRect(l,a)}):(!o||o.overlayFit.visibleAreal&&(l=d,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&&Bh(this._boundingBox.style,{top:"",left:"",right:"",bottom:"",height:"",width:"",alignItems:"",justifyContent:""}),this._pane&&this._resetOverlayElementStyles(),this._overlayRef&&this._overlayRef.hostElement.classList.remove(mU),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=_U(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=gU(this._overlayRef.getConfig().minHeight),a=gU(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=_U(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 d=0,h=0;return d=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,d=t.x-this._viewportMargin;else if("start"===e.overlayX&&!r||"end"===e.overlayX&&r)h=t.x,d=n.right-t.x;else{const m=Math.min(n.right-t.x+n.left,t.x),g=this._lastBoundingBoxSize.width;d=2*m,h=t.x-m,d>g&&!this._isInitialRender&&!this._growAfterOpen&&(h=t.x-g/2)}return{top:o,left:h,bottom:a,right:p,width:d,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=_r(n.height),r.top=_r(n.top),r.bottom=_r(n.bottom),r.width=_r(n.width),r.left=_r(n.left),r.right=_r(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=_r(s)),o&&(r.maxWidth=_r(o))}this._lastBoundingBoxSize=n,Bh(this._boundingBox.style,r)}_resetBoundingBoxStyles(){Bh(this._boundingBox.style,{top:"0",left:"0",right:"0",bottom:"0",height:"",width:"",alignItems:"",justifyContent:""})}_resetOverlayElementStyles(){Bh(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 d=this._viewportRuler.getViewportScrollPosition();Bh(n,this._getExactOverlayY(e,t,d)),Bh(n,this._getExactOverlayX(e,t,d))}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=_r(o.maxHeight):s&&(n.maxHeight="")),o.maxWidth&&(r?n.maxWidth=_r(o.maxWidth):s&&(n.maxWidth="")),Bh(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=_r(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=_r(s.x),r}_getScrollVisibility(){const t=this._getOriginRect(),e=this._pane.getBoundingClientRect(),n=this._scrollables.map(r=>r.getElementRef().nativeElement.getBoundingClientRect());return{isOriginClipped:fU(t,n),isOriginOutsideView:VI(t,n),isOverlayClipped:fU(e,n),isOverlayOutsideView:VI(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&&TM(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 gt)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 Bh(i,t){for(let e in t)t.hasOwnProperty(e)&&(i[e]=t[e]);return i}function gU(i){if("number"!=typeof i&&null!=i){const[t,e]=i.split(AZ);return e&&"px"!==e?null:parseFloat(t)}return i||null}function _U(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 vU="cdk-global-overlay-wrapper";class yU{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(vU),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),d=this._xPosition,h=this._xOffset,p="rtl"===this._overlayRef.getConfig().direction;let m="",g="",b="";l?b="flex-start":"center"===d?(b="center",p?g=h:m=h):p?"left"===d||"end"===d?(b="flex-end",m=h):("right"===d||"start"===d)&&(b="flex-start",g=h):"left"===d||"start"===d?(b="flex-start",m=h):("right"===d||"end"===d)&&(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(vU),n.justifyContent=n.alignItems=t.marginTop=t.marginBottom=t.marginLeft=t.marginRight=t.position="",this._overlayRef=null,this._isDisposed=!0}}let TZ=(()=>{class i{constructor(e,n,r,s){this._viewportRuler=e,this._document=n,this._platform=r,this._overlayContainer=s}global(){return new yU}flexibleConnectedTo(e){return new DZ(e,this._viewportRuler,this._document,this._platform,this._overlayContainer)}}return i.\u0275fac=function(e){return new(e||i)(ee(LM),ee(jt),ee(zi),ee(VM))},i.\u0275prov=ke({token:i,factory:i.\u0275fac,providedIn:"root"}),i})(),IZ=0,as=(()=>{class i{constructor(e,n,r,s,o,a,l,c,d,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=d,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 Zy(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-"+IZ++,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(dm)),new oZ(e,this._componentFactoryResolver,this._appRef,this._injector,this._document)}}return i.\u0275fac=function(e){return new(e||i)(ee(MZ),ee(VM),ee(Hl),ee(TZ),ee(SZ),ee($i),ee(pt),ee(jt),ee(Ra),ee(_y),ee(EZ),ee(kr,8))},i.\u0275prov=ke({token:i,factory:i.\u0275fac,providedIn:"root"}),i})();const RZ=[{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"}],bU=new me("cdk-connected-overlay-scroll-strategy");let zI=(()=>{class i{constructor(e){this.elementRef=e}}return i.\u0275fac=function(e){return new(e||i)(E(gt))},i.\u0275dir=ve({type:i,selectors:[["","cdk-overlay-origin",""],["","overlay-origin",""],["","cdkOverlayOrigin",""]],exportAs:["cdkOverlayOrigin"],standalone:!0}),i})(),xU=(()=>{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=Zt.EMPTY,this._attachSubscription=Zt.EMPTY,this._detachSubscription=Zt.EMPTY,this._positionSubscription=Zt.EMPTY,this.viewportMargin=0,this.open=!1,this.disableClose=!1,this.backdropClick=new $e,this.positionChange=new $e,this.attach=new $e,this.detach=new $e,this.overlayKeydown=new $e,this.overlayOutsideClick=new $e,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=RZ);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&&!Zo(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 zI?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(jB(()=>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)(E(as),E(Co),E(jr),E(bU),E(Ra,8))},i.\u0275dir=ve({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:[xi]}),i})();const PZ={provide:bU,deps:[as],useFactory:function kZ(i){return()=>i.scrollStrategies.reposition()}};let Pm=(()=>{class i{}return i.\u0275fac=function(e){return new(e||i)},i.\u0275mod=nn({type:i}),i.\u0275inj=Kt({providers:[as,PZ],imports:[Yy,Nh,dU,dU]}),i})();function ml(i,t=$y){return ti((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,d=t.now();if(d{s=c,o=t.now(),r||(r=t.schedule(l,i),n.add(r))},()=>{a(),n.complete()},void 0,()=>{s=r=null}))})}function wU(i){return gn((t,e)=>i<=e)}function Ql(i,t=$a){return i=i??OZ,ti((e,n)=>{let r,s=!0;e.subscribe(Yn(n,o=>{const a=t(o);(s||!i(r,a))&&(s=!1,r=a,n.next(o))}))})}function OZ(i,t){return i===t}let MU=(()=>{class i{create(e){return typeof MutationObserver>"u"?null:new MutationObserver(e)}}return i.\u0275fac=function(e){return new(e||i)},i.\u0275prov=ke({token:i,factory:i.\u0275fac,providedIn:"root"}),i})(),FZ=(()=>{class i{constructor(e){this._mutationObserverFactory=e,this._observedElements=new Map}ngOnDestroy(){this._observedElements.forEach((e,n)=>this._cleanupObserver(n))}observe(e){const n=qc(e);return new In(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 Re,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)(ee(MU))},i.\u0275prov=ke({token:i,factory:i.\u0275fac,providedIn:"root"}),i})(),CU=(()=>{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=Ps(e),this._subscribe()}constructor(e,n,r){this._contentObserver=e,this._elementRef=n,this._ngZone=r,this.event=new $e,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(ml(this.debounce)):e).subscribe(this.event)})}_unsubscribe(){this._currentSubscription?.unsubscribe()}}return i.\u0275fac=function(e){return new(e||i)(E(FZ),E(gt),E(pt))},i.\u0275dir=ve({type:i,selectors:[["","cdkObserveContent",""]],inputs:{disabled:["cdkObserveContentDisabled","disabled"],debounce:"debounce"},outputs:{event:"cdkObserveContent"},exportAs:["cdkObserveContent"]}),i})(),HI=(()=>{class i{}return i.\u0275fac=function(e){return new(e||i)},i.\u0275mod=nn({type:i}),i.\u0275inj=Kt({providers:[MU]}),i})();const SU=new Set;let Om,LZ=(()=>{class i{constructor(e){this._platform=e,this._matchMedia=this._platform.isBrowser&&window.matchMedia?window.matchMedia.bind(window):BZ}matchMedia(e){return(this._platform.WEBKIT||this._platform.BLINK)&&function NZ(i){if(!SU.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),SU.add(i))}catch(t){console.error(t)}}(e),this._matchMedia(e)}}return i.\u0275fac=function(e){return new(e||i)(ee(zi))},i.\u0275prov=ke({token:i,factory:i.\u0275fac,providedIn:"root"}),i})();function BZ(i){return{matches:"all"===i||""===i,media:i,addListener:()=>{},removeListener:()=>{}}}let GI=(()=>{class i{constructor(e,n){this._mediaMatcher=e,this._zone=n,this._queries=new Map,this._destroySubject=new Re}ngOnDestroy(){this._destroySubject.next(),this._destroySubject.complete()}isMatched(e){return EU(TM(e)).some(r=>this._registerQuery(r).mql.matches)}observe(e){let s=Xl(EU(TM(e)).map(o=>this._registerQuery(o).observable));return s=Sy(s.pipe(Oi(1)),s.pipe(wU(1),ml(0))),s.pipe(et(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 In(o=>{const a=l=>this._zone.run(()=>o.next(l));return n.addListener(a),()=>{n.removeListener(a)}}).pipe(Do(n),et(({matches:o})=>({query:e,matches:o})),Ve(this._destroySubject)),mql:n};return this._queries.set(e,s),s}}return i.\u0275fac=function(e){return new(e||i)(ee(LZ),ee(pt))},i.\u0275prov=ke({token:i,factory:i.\u0275fac,providedIn:"root"}),i})();function EU(i){return i.map(t=>t.split(",")).reduce((t,e)=>t.concat(e)).map(t=>t.trim())}function zM(i,t){return(i.getAttribute(t)||"").match(/\S+/g)||[]}const DU="cdk-describedby-message",HM="cdk-describedby-host";let $I=0,HZ=(()=>{class i{constructor(e,n){this._platform=n,this._messageRegistry=new Map,this._messagesContainer=null,this._id=""+$I++,this._document=e,this._id=Ft(cm)+"-"+$I++}describe(e,n,r){if(!this._canBeDescribed(e,n))return;const s=WI(n,r);"string"!=typeof n?(TU(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=WI(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(`[${HM}="${this._id}"]`);for(let n=0;n0!=r.indexOf(DU));e.setAttribute("aria-describedby",n.join(" "))}_addMessageReference(e,n){const r=this._messageRegistry.get(n);(function VZ(i,t,e){const n=zM(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(HM,this._id),r.referenceCount++}_removeMessageReference(e,n){const r=this._messageRegistry.get(n);r.referenceCount--,function zZ(i,t,e){const r=zM(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(HM)}_isElementDescribedByMessage(e,n){const r=zM(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)(ee(jt),ee(zi))},i.\u0275prov=ke({token:i,factory:i.\u0275fac,providedIn:"root"}),i})();function WI(i,t){return"string"==typeof i?`${t||""}/${i}`:i}function TU(i,t){i.id||(i.id=`${DU}-${t}-${$I++}`)}class IU{constructor(t){this._items=t,this._activeItemIndex=-1,this._activeItem=null,this._wrap=!1,this._letterKeyStream=new Re,this._typeaheadSubscription=Zt.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 Re,this.change=new Re,t instanceof om&&(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(Vi(e=>this._pressedLetters.push(e)),ml(t),gn(()=>this._pressedLetters.length>0),et(()=>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 om?this._items.toArray():this._items}}class GZ extends IU{setActiveItem(t){this.activeItem&&this.activeItem.setInactiveStyles(),super.setActiveItem(t),this.activeItem&&this.activeItem.setActiveStyles()}}class RU extends IU{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 GM=(()=>{class i{constructor(e){this._platform=e}isDisabled(e){return e.hasAttribute("disabled")}isVisible(e){return function WZ(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 $Z(i){try{return i.frameElement}catch{return null}}(function JZ(i){return i.ownerDocument&&i.ownerDocument.defaultView||window}(e));if(n&&(-1===PU(n)||!this.isVisible(n)))return!1;let r=e.nodeName.toLowerCase(),s=PU(e);return e.hasAttribute("contenteditable")?-1!==s:!("iframe"===r||"object"===r||this._platform.WEBKIT&&this._platform.IOS&&!function ZZ(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 QZ(i){return!function YZ(i){return function XZ(i){return"input"==i.nodeName.toLowerCase()}(i)&&"hidden"==i.type}(i)&&(function jZ(i){let t=i.nodeName.toLowerCase();return"input"===t||"select"===t||"button"===t||"textarea"===t}(i)||function qZ(i){return function KZ(i){return"a"==i.nodeName.toLowerCase()}(i)&&i.hasAttribute("href")}(i)||i.hasAttribute("contenteditable")||kU(i))}(e)&&!this.isDisabled(e)&&(n?.ignoreVisibility||this.isVisible(e))}}return i.\u0275fac=function(e){return new(e||i)(ee(zi))},i.\u0275prov=ke({token:i,factory:i.\u0275fac,providedIn:"root"}),i})();function kU(i){if(!i.hasAttribute("tabindex")||void 0===i.tabIndex)return!1;let t=i.getAttribute("tabindex");return!(!t||isNaN(parseInt(t,10)))}function PU(i){if(!kU(i))return null;const t=parseInt(i.getAttribute("tabindex")||"",10);return isNaN(t)?-1:t}class eQ{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(Oi(1)).subscribe(t)}}let jI=(()=>{class i{constructor(e,n,r){this._checker=e,this._ngZone=n,this._document=r}create(e,n=!1){return new eQ(e,this._checker,this._ngZone,this._document,n)}}return i.\u0275fac=function(e){return new(e||i)(ee(GM),ee(pt),ee(jt))},i.\u0275prov=ke({token:i,factory:i.\u0275fac,providedIn:"root"}),i})();function YI(i){return 0===i.buttons||0===i.offsetX&&0===i.offsetY}function qI(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 tQ=new me("cdk-input-modality-detector-options"),nQ={ignoreKeys:[18,17,224,91,16]},Fm=Oh({passive:!0,capture:!0});let iQ=(()=>{class i{get mostRecentModality(){return this._modality.value}constructor(e,n,r,s){this._platform=e,this._mostRecentTarget=null,this._modality=new ut(null),this._lastTouchMs=0,this._onKeydown=o=>{this._options?.ignoreKeys?.some(a=>a===o.keyCode)||(this._modality.next("keyboard"),this._mostRecentTarget=cu(o))},this._onMousedown=o=>{Date.now()-this._lastTouchMs<650||(this._modality.next(YI(o)?"keyboard":"mouse"),this._mostRecentTarget=cu(o))},this._onTouchstart=o=>{qI(o)?this._modality.next("keyboard"):(this._lastTouchMs=Date.now(),this._modality.next("touch"),this._mostRecentTarget=cu(o))},this._options={...nQ,...s},this.modalityDetected=this._modality.pipe(wU(1)),this.modalityChanged=this.modalityDetected.pipe(Ql()),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)(ee(zi),ee(pt),ee(jt),ee(tQ,8))},i.\u0275prov=ke({token:i,factory:i.\u0275fac,providedIn:"root"}),i})();const rQ=new me("liveAnnouncerElement",{providedIn:"root",factory:function sQ(){return null}}),oQ=new me("LIVE_ANNOUNCER_DEFAULT_OPTIONS");let aQ=0,XI=(()=>{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 Re,this._rootNodeFocusAndBlurListener=a=>{for(let c=cu(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=qc(e);if(!this._platform.isBrowser||1!==r.nodeType)return ft(null);const s=function WK(i){if(function $K(){if(null==LI){const i=typeof document<"u"?document.head:null;LI=!(!i||!i.createShadowRoot&&!i.attachShadow)}return LI}()){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 Re,rootNode:s};return this._elementInfo.set(r,a),this._registerGlobalListeners(a),a.subject}stopMonitoring(e){const n=qc(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=qc(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=cu(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,$M),n.addEventListener("blur",this._rootNodeFocusAndBlurListener,$M)}),this._rootNodeFocusListenerCount.set(n,r+1),1==++this._monitoredElementCount&&(this._ngZone.runOutsideAngular(()=>{this._getWindow().addEventListener("focus",this._windowFocusListener)}),this._inputModalityDetector.modalityDetected.pipe(Ve(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,$M),n.removeEventListener("blur",this._rootNodeFocusAndBlurListener,$M),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=Ft(GI).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,FU,LU),this._hasCheckedHighContrastMode=!0;const n=this.getHighContrastMode();1===n?e.add(KI,FU):2===n&&e.add(KI,LU)}}}return i.\u0275fac=function(e){return new(e||i)(ee(zi),ee(jt))},i.\u0275prov=ke({token:i,factory:i.\u0275fac,providedIn:"root"}),i})(),BU=(()=>{class i{constructor(e){e._applyBodyHighContrastModeCssClasses()}}return i.\u0275fac=function(e){return new(e||i)(ee(NU))},i.\u0275mod=nn({type:i}),i.\u0275inj=Kt({imports:[HI]}),i})();function cQ(i,t){}class WM{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 UU=(()=>{class i extends NM{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=d=>{this._portalOutlet.hasAttached();const h=this._portalOutlet.attachDomPortal(d);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=FM(),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=FM();return e===n||e.contains(n)}_initializeFocusTrap(){this._focusTrap=this._focusTrapFactory.create(this._elementRef.nativeElement),this._document&&(this._elementFocusedBeforeDialogWasOpened=FM())}_handleBackdropClicks(){this._overlayRef.backdropClick().subscribe(()=>{this._config.disableClose&&this._recaptureFocus()})}}return i.\u0275fac=function(e){return new(e||i)(E(gt),E(jI),E(jt,8),E(WM),E(GM),E(pt),E(Zy),E(Xc))},i.\u0275cmp=ot({type:i,selectors:[["cdk-dialog-container"]],viewQuery:function(e,n){if(1&e&&Wn(Am,7),2&e){let r;Et(r=At())&&(n._portalOutlet=r.first)}},hostAttrs:["tabindex","-1",1,"cdk-dialog-container"],hostVars:6,hostBindings:function(e,n){2&e&&Dt("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:[lt],decls:1,vars:0,consts:[["cdkPortalOutlet",""]],template:function(e,n){1&e&&fe(0,cQ,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 ZI{constructor(t,e){this.overlayRef=t,this.config=e,this.closed=new Re,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&&!Zo(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 VU=new me("DialogScrollStrategy"),dQ=new me("DialogData"),uQ=new me("DefaultDialogConfig"),fQ={provide:VU,deps:[as],useFactory:function hQ(i){return()=>i.scrollStrategies.block()}};let pQ=0,zU=(()=>{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 Re,this._afterOpenedAtThisLevel=new Re,this._ariaHiddenElements=new Map,this.afterAllClosed=Ey(()=>this.openDialogs.length?this._getAfterAllClosed():this._getAfterAllClosed().pipe(Do(void 0))),this._scrollStrategy=a}open(e,n){(n={...this._defaultOptions||new WM,...n}).id=n.id||"cdk-dialog-"+pQ++,n.id&&this.getDialogById(n.id);const s=this._getOverlayConfig(n),o=this._overlay.create(s),a=new ZI(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(){QI(this.openDialogs,e=>e.close())}getDialogById(e){return this.openDialogs.find(n=>n.id===e)}ngOnDestroy(){QI(this._openDialogsAtThisLevel,e=>{!1===e.config.closeOnDestroy&&this._removeOpenDialog(e,!1)}),QI(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:WM,useValue:r},{provide:ZI,useValue:n},{provide:Zy,useValue:e}];let a;r.container?"function"==typeof r.container?a=r.container:(a=r.container.type,o.push(...r.container.providers(r))):a=UU;const l=new Lh(a,r.viewContainerRef,$i.create({parent:s||this._injector,providers:o}),r.componentFactoryResolver);return e.attach(l).instance}_attachDialogContent(e,n,r,s){if(e instanceof Co){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 Lh(e,s.viewContainerRef,o,s.componentFactoryResolver));n.componentInstance=a.instance}}_createInjector(e,n,r,s){const o=e.injector||e.viewContainerRef?.injector,a=[{provide:dQ,useValue:e.data},{provide:ZI,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(Ra,null,{optional:!0}))&&a.push({provide:Ra,useValue:{value:e.direction,change:ft()}}),$i.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)(ee(as),ee($i),ee(uQ,8),ee(i,12),ee(VM),ee(VU))},i.\u0275prov=ke({token:i,factory:i.\u0275fac}),i})();function QI(i,t){let e=i.length;for(;e--;)t(i[e])}let mQ=(()=>{class i{}return i.\u0275fac=function(e){return new(e||i)},i.\u0275mod=nn({type:i}),i.\u0275inj=Kt({providers:[zU,fQ],imports:[Pm,Nh,BU,Nh]}),i})();const gQ=["text"];function _Q(i,t){if(1&i&&Pe(0,"mat-pseudo-checkbox",6),2&i){const e=he();U("state",e.selected?"checked":"unchecked")("disabled",e.disabled)}}function vQ(i,t){1&i&&Pe(0,"mat-pseudo-checkbox",7),2&i&&U("disabled",he().disabled)}function yQ(i,t){if(1&i&&(W(0,"span",8),ze(1),j()),2&i){const e=he();G(1),Qi("(",e.group.label,")")}}const bQ=[[["mat-icon"]],"*"],xQ=["mat-icon","*"],MQ=new me("mat-sanity-checks",{providedIn:"root",factory:function wQ(){return!0}});let Qn=(()=>{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!NI()&&("boolean"==typeof this._sanityChecks?this._sanityChecks:!!this._sanityChecks[e])}}return i.\u0275fac=function(e){return new(e||i)(ee(NU),ee(MQ,8),ee(jt))},i.\u0275mod=nn({type:i}),i.\u0275inj=Kt({imports:[Yy,Yy]}),i})();function jM(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 Qy(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 YM(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 JI(i,t=0){return class extends i{get tabIndex(){return this.disabled?-1:this._tabIndex}set tabIndex(e){this._tabIndex=null!=e?Ps(e):this.defaultTabIndex}constructor(...e){super(...e),this._tabIndex=t,this.defaultTabIndex=t}}}function $U(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 CQ(i){return class extends i{constructor(...t){super(...t),this._isInitialized=!1,this._pendingSubscribers=[],this.initialized=new In(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 jU=(()=>{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=ke({token:i,factory:i.\u0275fac,providedIn:"root"}),i})();class EQ{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 YU=Oh({passive:!0,capture:!0});class AQ{constructor(){this._events=new Map,this._delegateEventHandler=t=>{const e=cu(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,YU)})}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,YU)))}}const qU={enterDuration:225,exitDuration:150},XU=Oh({passive:!0,capture:!0}),KU=["mousedown","touchstart"],ZU=["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=qc(n))}fadeInRipple(t,e,n={}){const r=this._containerRect=this._containerRect||this._containerElement.getBoundingClientRect(),s={...qU,...n.animation};n.centered&&(t=r.left+r.width/2,e=r.top+r.height/2);const o=n.radius||function TQ(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,d=document.createElement("div");d.classList.add("mat-ripple-element"),d.style.left=a-o+"px",d.style.top=l-o+"px",d.style.height=2*o+"px",d.style.width=2*o+"px",null!=n.color&&(d.style.backgroundColor=n.color),d.style.transitionDuration=`${c}ms`,this._containerElement.appendChild(d);const h=window.getComputedStyle(d),m=h.transitionDuration,g="none"===h.transitionProperty||"0s"===m||"0s, 0s"===m||0===r.width&&0===r.height,b=new EQ(this,d,n,g);d.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);d.addEventListener("transitionend",y),d.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={...qU,...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=qc(t);!this._platform.isBrowser||!e||e===this._triggerElement||(this._removeTriggerEvents(),this._triggerElement=e,KU.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(()=>{ZU.forEach(e=>{this._triggerElement.addEventListener(e,this,XU)})}),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=YI(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&&(KU.forEach(e=>Lm._eventManager.removeHandler(e,t,this)),this._pointerUpEventsRegistered&&ZU.forEach(e=>t.removeEventListener(e,this,XU)))}}Lm._eventManager=new AQ;const eR=new me("mat-ripple-global-options");let Uh=(()=>{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)(E(gt),E(pt),E(zi),E(eR,8),E(kr,8))},i.\u0275dir=ve({type:i,selectors:[["","mat-ripple",""],["","matRipple",""]],hostAttrs:[1,"mat-ripple"],hostVars:2,hostBindings:function(e,n){2&e&&un("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})(),eb=(()=>{class i{}return i.\u0275fac=function(e){return new(e||i)},i.\u0275mod=nn({type:i}),i.\u0275inj=Kt({imports:[Qn,Qn]}),i})(),IQ=(()=>{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)(E(kr,8))},i.\u0275cmp=ot({type:i,selectors:[["mat-pseudo-checkbox"]],hostAttrs:[1,"mat-pseudo-checkbox"],hostVars:12,hostBindings:function(e,n){2&e&&un("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})(),QU=(()=>{class i{}return i.\u0275fac=function(e){return new(e||i)},i.\u0275mod=nn({type:i}),i.\u0275inj=Kt({imports:[Qn]}),i})();const JU=new me("MAT_OPTION_PARENT_COMPONENT"),eV=new me("MatOptgroup");let RQ=0;class kQ{constructor(t,e=!1){this.source=t,this.isUserInput=e}}let PQ=(()=>{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-"+RQ++,this.onSelectionChange=new $e,this._stateChanges=new Re}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)&&!Zo(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 kQ(this,e))}}return i.\u0275fac=function(e){wo()},i.\u0275dir=ve({type:i,viewQuery:function(e,n){if(1&e&&Wn(gQ,7),2&e){let r;Et(r=At())&&(n._text=r.first)}},inputs:{value:"value",id:"id",disabled:"disabled"},outputs:{onSelectionChange:"onSelectionChange"}}),i})(),Nm=(()=>{class i extends PQ{constructor(e,n,r,s){super(e,n,r,s)}}return i.\u0275fac=function(e){return new(e||i)(E(gt),E(Zn),E(JU,8),E(eV,8))},i.\u0275cmp=ot({type:i,selectors:[["mat-option"]],hostAttrs:["role","option",1,"mat-mdc-option","mdc-list-item"],hostVars:11,hostBindings:function(e,n){1&e&&Le("click",function(){return n._selectViaInteraction()})("keydown",function(s){return n._handleKeydown(s)}),2&e&&(Yl("id",n.id),Dt("aria-selected",n.selected)("aria-disabled",n.disabled.toString()),un("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:[lt],ngContentSelectors:xQ,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&&(or(bQ),fe(0,_Q,1,2,"mat-pseudo-checkbox",0),Wt(1),W(2,"span",1,2),Wt(4,1),j(),fe(5,vQ,1,1,"mat-pseudo-checkbox",3),fe(6,yQ,2,1,"span",4),Pe(7,"div",5)),2&e&&(U("ngIf",n.multiple),G(5),U("ngIf",!n.multiple&&n.selected&&!n.hideSingleSelectionIndicator),G(1),U("ngIf",n.group&&n.group._inert),G(1),U("matRippleTrigger",n._getHostElement())("matRippleDisabled",n.disabled||n.disableRipple))},dependencies:[Uh,vi,IQ],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})(),tR=(()=>{class i{}return i.\u0275fac=function(e){return new(e||i)},i.\u0275mod=nn({type:i}),i.\u0275inj=Kt({imports:[eb,Ao,Qn,QU]}),i})();class tV{}class LQ{}const Kc="*";function ka(i,t){return{type:7,name:i,definitions:t,options:{}}}function Yr(i,t=null){return{type:4,styles:t,timings:i}}function iV(i,t=null){return{type:2,steps:i,options:t}}function si(i){return{type:6,styles:i,offset:null}}function Os(i,t,e){return{type:0,name:i,styles:t,options:e}}function rV(i){return{type:5,steps:i}}function Or(i,t,e=null){return{type:1,expr:i,animation:t,options:e}}function nR(i=null){return{type:9,options:i}}function iR(i,t,e=null){return{type:11,selector:i,animation:t,options:e}}function sV(i){Promise.resolve().then(i)}class tb{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(){sV(()=>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 oV{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?sV(()=>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 rR="!";function NQ(i,t){}class qM{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 sR="mdc-dialog--open",aV="mdc-dialog--opening",lV="mdc-dialog--closing";let VQ=(()=>{class i extends UU{constructor(e,n,r,s,o,a,l,c){super(e,n,r,s,o,a,l,c),this._animationStateChanged=new $e}_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)(E(gt),E(jI),E(jt,8),E(qM),E(GM),E(pt),E(Zy),E(Xc))},i.\u0275cmp=ot({type:i,selectors:[["ng-component"]],features:[lt],decls:0,vars:0,template:function(e,n){},encapsulation:2}),i})();const cV="--mat-dialog-transition-duration";function dV(i){return null==i?null:"number"==typeof i?i:i.endsWith("ms")?Ps(i.substring(0,i.length-2)):i.endsWith("s")?1e3*Ps(i.substring(0,i.length-1)):"0"===i?0:null}let zQ=(()=>{class i extends VQ{constructor(e,n,r,s,o,a,l,c,d){super(e,n,r,s,o,a,l,d),this._animationMode=c,this._animationsEnabled="NoopAnimations"!==this._animationMode,this._hostElement=this._elementRef.nativeElement,this._openAnimationDuration=this._animationsEnabled?dV(this._config.enterAnimationDuration)??150:0,this._closeAnimationDuration=this._animationsEnabled?dV(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(cV,`${this._openAnimationDuration}ms`),this._requestAnimationFrame(()=>this._hostElement.classList.add(aV,sR)),this._waitForAnimationToComplete(this._openAnimationDuration,this._finishDialogOpen)):(this._hostElement.classList.add(sR),Promise.resolve().then(()=>this._finishDialogOpen()))}_startExitAnimation(){this._animationStateChanged.emit({state:"closing",totalTime:this._closeAnimationDuration}),this._hostElement.classList.remove(sR),this._animationsEnabled?(this._hostElement.style.setProperty(cV,`${this._openAnimationDuration}ms`),this._requestAnimationFrame(()=>this._hostElement.classList.add(lV)),this._waitForAnimationToComplete(this._closeAnimationDuration,this._finishDialogClose)):Promise.resolve().then(()=>this._finishDialogClose())}_clearAnimationClasses(){this._hostElement.classList.remove(aV,lV)}_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)(E(gt),E(jI),E(jt,8),E(qM),E(GM),E(pt),E(Zy),E(kr,8),E(Xc))},i.\u0275cmp=ot({type:i,selectors:[["mat-dialog-container"]],hostAttrs:["tabindex","-1",1,"mat-mdc-dialog-container","mdc-dialog"],hostVars:8,hostBindings:function(e,n){2&e&&(Yl("id",n._config.id),Dt("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),un("_mat-animation-noopable",!n._animationsEnabled))},features:[lt],decls:3,vars:0,consts:[[1,"mdc-dialog__container"],[1,"mat-mdc-dialog-surface","mdc-dialog__surface"],["cdkPortalOutlet",""]],template:function(e,n){1&e&&(W(0,"div",0)(1,"div",1),fe(2,NQ,0,0,"ng-template",2),j()())},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 nb{constructor(t,e,n){this._ref=t,this._containerInstance=n,this._afterOpened=new Re,this._beforeClosed=new Re,this._state=0,this.disableClose=e.disableClose,this.id=t.id,n._animationStateChanged.pipe(gn(r=>"opened"===r.state),Oi(1)).subscribe(()=>{this._afterOpened.next(),this._afterOpened.complete()}),n._animationStateChanged.pipe(gn(r=>"closed"===r.state),Oi(1)).subscribe(()=>{clearTimeout(this._closeFallbackTimeout),this._finishDialogClose()}),t.overlayRef.detachments().subscribe(()=>{this._beforeClosed.next(this._result),this._beforeClosed.complete(),this._finishDialogClose()}),Cr(this.backdropClick(),this.keydownEvents().pipe(gn(r=>27===r.keyCode&&!this.disableClose&&!Zo(r)))).subscribe(r=>{this.disableClose||(r.preventDefault(),uV(this,"keydown"===r.type?"keyboard":"mouse"))})}close(t){this._result=t,this._containerInstance._animationStateChanged.pipe(gn(e=>"closing"===e.state),Oi(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 uV(i,t,e){return i._closeInteractionType=t,i.close(e)}const oR=new me("MatMdcDialogData"),HQ=new me("mat-mdc-dialog-default-options"),hV=new me("mat-mdc-dialog-scroll-strategy"),$Q={provide:hV,deps:[as],useFactory:function GQ(i){return()=>i.scrollStrategies.block()}};let WQ=0,jQ=(()=>{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,d,h){this._overlay=e,this._defaultOptions=r,this._parentDialog=s,this._dialogRefConstructor=l,this._dialogContainerType=c,this._dialogDataToken=d,this._openDialogsAtThisLevel=[],this._afterAllClosedAtThisLevel=new Re,this._afterOpenedAtThisLevel=new Re,this._idPrefix="mat-dialog-",this.dialogConfigClass=qM,this.afterAllClosed=Ey(()=>this.openDialogs.length?this._getAfterAllClosed():this._getAfterAllClosed().pipe(Do(void 0))),this._scrollStrategy=a,this._dialog=n.get(zU)}open(e,n){let r;(n={...this._defaultOptions||new qM,...n}).id=n.id||`${this._idPrefix}${WQ++}`,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:WM,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){wo()},i.\u0275prov=ke({token:i,factory:i.\u0275fac}),i})(),Bm=(()=>{class i extends jQ{constructor(e,n,r,s,o,a,l,c){super(e,n,s,a,l,o,nb,zQ,oR,c),this._idPrefix="mat-mdc-dialog-"}}return i.\u0275fac=function(e){return new(e||i)(ee(as),ee($i),ee(_y,8),ee(HQ,8),ee(hV),ee(i,12),ee(VM),ee(kr,8))},i.\u0275prov=ke({token:i,factory:i.\u0275fac}),i})(),YQ=0,qQ=(()=>{class i{constructor(e,n,r){this.dialogRef=e,this._elementRef=n,this._dialog=r,this.type="button"}ngOnInit(){this.dialogRef||(this.dialogRef=gV(this._elementRef,this._dialog.openDialogs))}ngOnChanges(e){const n=e._matDialogClose||e._matDialogCloseResult;n&&(this.dialogResult=n.currentValue)}_onButtonClick(e){uV(this.dialogRef,0===e.screenX&&0===e.screenY?"keyboard":"mouse",this.dialogResult)}}return i.\u0275fac=function(e){return new(e||i)(E(nb,8),E(gt),E(Bm))},i.\u0275dir=ve({type:i,selectors:[["","mat-dialog-close",""],["","matDialogClose",""]],hostVars:2,hostBindings:function(e,n){1&e&&Le("click",function(s){return n._onButtonClick(s)}),2&e&&Dt("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:[xi]}),i})(),fV=(()=>{class i{constructor(e,n,r){this._dialogRef=e,this._elementRef=n,this._dialog=r,this.id="mat-mdc-dialog-title-"+YQ++}ngOnInit(){this._dialogRef||(this._dialogRef=gV(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)(E(nb,8),E(gt),E(Bm))},i.\u0275dir=ve({type:i,selectors:[["","mat-dialog-title",""],["","matDialogTitle",""]],hostAttrs:[1,"mat-mdc-dialog-title","mdc-dialog__title"],hostVars:1,hostBindings:function(e,n){2&e&&Yl("id",n.id)},inputs:{id:"id"},exportAs:["matDialogTitle"]}),i})(),pV=(()=>{class i{}return i.\u0275fac=function(e){return new(e||i)},i.\u0275dir=ve({type:i,selectors:[["","mat-dialog-content",""],["mat-dialog-content"],["","matDialogContent",""]],hostAttrs:[1,"mat-mdc-dialog-content","mdc-dialog__content"]}),i})(),mV=(()=>{class i{constructor(){this.align="start"}}return i.\u0275fac=function(e){return new(e||i)},i.\u0275dir=ve({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&&un("mat-mdc-dialog-actions-align-center","center"===n.align)("mat-mdc-dialog-actions-align-end","end"===n.align)},inputs:{align:"align"}}),i})();function gV(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 _V=(()=>{class i{}return i.\u0275fac=function(e){return new(e||i)},i.\u0275mod=nn({type:i}),i.\u0275inj=Kt({providers:[Bm,$Q],imports:[mQ,Pm,Nh,Qn,Qn]}),i})();const XQ=["mat-button",""],yV=[[["",8,"material-icons",3,"iconPositionEnd",""],["mat-icon",3,"iconPositionEnd",""],["","matButtonIcon","",3,"iconPositionEnd",""]],"*",[["","iconPositionEnd","",8,"material-icons"],["mat-icon","iconPositionEnd",""],["","matButtonIcon","","iconPositionEnd",""]]],bV=[".material-icons:not([iconPositionEnd]), mat-icon:not([iconPositionEnd]), [matButtonIcon]:not([iconPositionEnd])","*",".material-icons[iconPositionEnd], mat-icon[iconPositionEnd], [matButtonIcon][iconPositionEnd]"],ZQ=["mat-mini-fab",""],JQ=["mat-icon-button",""],eJ=["*"],tJ=[{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"]}],nJ=Qy(jM(YM(class{constructor(i){this._elementRef=i}})));let aR=(()=>{class i extends nJ{constructor(e,n,r,s){super(e),this._platform=n,this._ngZone=r,this._animationMode=s,this._focusMonitor=Ft(Xc),this._isFab=!1;const o=e.nativeElement.classList;for(const a of tJ)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){wo()},i.\u0275dir=ve({type:i,viewQuery:function(e,n){if(1&e&&Wn(Uh,5),2&e){let r;Et(r=At())&&(n.ripple=r.first)}},features:[lt]}),i})(),ib=(()=>{class i extends aR{constructor(e,n,r,s){super(e,n,r,s)}}return i.\u0275fac=function(e){return new(e||i)(E(gt),E(zi),E(pt),E(kr,8))},i.\u0275cmp=ot({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&&(Dt("disabled",n.disabled||null),un("_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:[lt],attrs:XQ,ngContentSelectors:bV,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&&(or(yV),Pe(0,"span",0),Wt(1),W(2,"span",1),Wt(3,1),j(),Wt(4,2),Pe(5,"span",2)(6,"span",3)(7,"span",4)),2&e&&(un("mdc-button__ripple",!n._isFab)("mdc-fab__ripple",n._isFab),G(6),U("matRippleDisabled",n._isRippleDisabled())("matRippleTrigger",n._elementRef.nativeElement))},dependencies:[Uh],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 rJ=new me("mat-mdc-fab-default-options",{providedIn:"root",factory:xV});function xV(){return{color:"accent"}}const wV=xV();let MV=(()=>{class i extends aR{constructor(e,n,r,s,o){super(e,n,r,s),this._options=o,this._isFab=!0,this._options=this._options||wV,this.color=this.defaultColor=this._options.color||wV.color}}return i.\u0275fac=function(e){return new(e||i)(E(gt),E(zi),E(pt),E(kr,8),E(rJ,8))},i.\u0275cmp=ot({type:i,selectors:[["button","mat-mini-fab",""]],hostVars:7,hostBindings:function(e,n){2&e&&(Dt("disabled",n.disabled||null),un("_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:[lt],attrs:ZQ,ngContentSelectors:bV,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&&(or(yV),Pe(0,"span",0),Wt(1),W(2,"span",1),Wt(3,1),j(),Wt(4,2),Pe(5,"span",2)(6,"span",3)(7,"span",4)),2&e&&(un("mdc-button__ripple",!n._isFab)("mdc-fab__ripple",n._isFab),G(6),U("matRippleDisabled",n._isRippleDisabled())("matRippleTrigger",n._elementRef.nativeElement))},dependencies:[Uh],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})(),XM=(()=>{class i extends aR{constructor(e,n,r,s){super(e,n,r,s)}}return i.\u0275fac=function(e){return new(e||i)(E(gt),E(zi),E(pt),E(kr,8))},i.\u0275cmp=ot({type:i,selectors:[["button","mat-icon-button",""]],hostVars:7,hostBindings:function(e,n){2&e&&(Dt("disabled",n.disabled||null),un("_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:[lt],attrs:JQ,ngContentSelectors:eJ,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&&(or(),Pe(0,"span",0),Wt(1),Pe(2,"span",1)(3,"span",2)(4,"span",3)),2&e&&(G(3),U("matRippleDisabled",n._isRippleDisabled())("matRippleCentered",!0)("matRippleTrigger",n._elementRef.nativeElement))},dependencies:[Uh],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})(),KM=(()=>{class i{}return i.\u0275fac=function(e){return new(e||i)},i.\u0275mod=nn({type:i}),i.\u0275inj=Kt({imports:[Qn,eb,Qn]}),i})();const sJ=["class","dialog"];let CV=(()=>{class i{constructor(e,n){this.dialogRef=e,this.data=n}}return i.\u0275fac=function(e){return new(e||i)(E(nb),E(oR))},i.\u0275cmp=ot({type:i,selectors:[["app-confirm",8,"dialog"]],attrs:sJ,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&&(W(0,"h1",0),ze(1,"Confirmation"),j(),W(2,"div",1)(3,"p"),ze(4),j()(),W(5,"div",2)(6,"button",3),Le("click",function(){return n.dialogRef.close()}),ze(7,"Cancel"),j(),W(8,"button",4),ze(9,"Yes"),j()()),2&e&&(G(4),_i(n.data.text),G(4),U("mat-dialog-close",!0))},dependencies:[ib,qQ,fV,pV,mV]}),i})();function lR(i,t){const e="object"==typeof t;return new Promise((n,r)=>{const s=new ha({next:o=>{n(o),s.unsubscribe()},error:r,complete:()=>{e?n(t.defaultValue):r(new fm)}});i.subscribe(s)})}let Jl=(()=>{class i{constructor(e){this.ngZone=e,this.openedResource$=new ut(null),this.openedResourcePath$=new ut(null),eel.expose(this.wrapHandler(this.openFile),"open_file"),eel.on_angular_ready(),setTimeout(tt(function*(){for(;;){if(eel._websocket){eel._websocket.onclose=()=>window.close();break}yield new Promise(n=>setTimeout(n,0))}}),0)}wrapHandler(e){return(...n)=>{try{pt.assertInAngularZone(),e.bind(this)(...n)}catch{this.ngZone.run(e,this,n)}}}openFile(e,n=!1){var r=this;return tt(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 tt(function*(){yield eel.open_file_with_system_app(e)()})()}retrieveValue(e){return tt(function*(){return yield eel.retrieve_value(e)()})()}runCustomAction(e,n,r){return tt(function*(){return eel.run_custom_action(e,n,r)()})()}saveFile(e){var n=this;return tt(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 tt(function*(){return eel.serialize_resource(e,n)()})()}serializeResourceTmp(e,n,r={}){return tt(function*(){return eel.serialize_resource_tmp(e,n,r)()})()}serializeReversible(e,n){return tt(function*(){return eel.serialize_reversible(e,n)()})()}deserializeResource(e){return tt(function*(){return eel.deserialize_resource(e)()})()}}return i.\u0275fac=function(e){return new(e||i)(ee(pt))},i.\u0275prov=ke({token:i,factory:i.\u0275fac,providedIn:"root"}),i})();var cR=ps(489);const SV=i=>!(!i||"object"!=typeof i),EV=(i={},t,e,n=[])=>{const r=[];if(SV(i)){const s=Object.entries(i);for(let o=0;o{class i{constructor(e){var n=this;this.eelDelegate=e,this._hasUnsavedChanges$=new ut(!1),this.resource$=new ut(null),this.error$=new ut(null),this.customActionRunning$=new ut(!1),this.changedDataBlocks={},this.dataBlockChange$=new Re,this.hideHiddenFields$=new ut(!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=EV(r.schema,"is_recursive_ref",!0);for(const[o,a]of s){const l=o.block_class_mro;let c=r.schema,d=c.block_class_mro===l?c:void 0;for(const h of a.slice(0,a.length-1))!d&&c[h]?.block_class_mro===l&&(d=c[h]),c=c[h];c[a[a.length-1]]=d}this.resource$.next(r),this.error$.next(null)}else this.resource$.next(null),this.error$.next(null)}),this.dataBlockChange$.subscribe(function(){var r=tt(function*([s,o]){n.changedDataBlocks[s]=o,n.updateUnsavedChanges();const a=yield n.eelDelegate.retrieveValue(s);n.changedDataBlocks[s]==o&&((0,cR.isNumber)(o)?Math.abs(o-a)<1e-10:(0,cR.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 tt(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 tt(function*(){return s.processExternalChanges(e,()=>s.eelDelegate.runCustomAction(e,n,r))})()}deserializeResource(e){var n=this;return tt(function*(){return n.processExternalChanges(e,()=>n.eelDelegate.deserializeResource(e))})()}reloadResource(){var e=this;return tt(function*(){const n=e.eelDelegate.openedResourcePath$.getValue();n&&e.eelDelegate.openFile(n,!0).then()})()}saveResource(){var e=this;return tt(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)(ee(Jl))},i.\u0275prov=ke({token:i,factory:i.\u0275fac,providedIn:"root"}),i})();function oJ(i,t){if(1&i){const e=ai();W(0,"div",2)(1,"button",3),Le("click",function(){return rn(e),Ut(he().action())}),ze(2),j()()}if(2&i){const e=he();G(2),Qi(" ",e.data.action," ")}}const aJ=["label"];function lJ(i,t){}const cJ=Math.pow(2,31)-1;class dR{constructor(t,e){this._overlayRef=e,this._afterDismissed=new Re,this._afterOpened=new Re,this._onAction=new Re,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,cJ))}_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 AV=new me("MatSnackBarData");class ZM{constructor(){this.politeness="assertive",this.announcementMessage="",this.duration=0,this.data=null,this.horizontalPosition="center",this.verticalPosition="bottom"}}let dJ=(()=>{class i{}return i.\u0275fac=function(e){return new(e||i)},i.\u0275dir=ve({type:i,selectors:[["","matSnackBarLabel",""]],hostAttrs:[1,"mat-mdc-snack-bar-label","mdc-snackbar__label"]}),i})(),uJ=(()=>{class i{}return i.\u0275fac=function(e){return new(e||i)},i.\u0275dir=ve({type:i,selectors:[["","matSnackBarActions",""]],hostAttrs:[1,"mat-mdc-snack-bar-actions","mdc-snackbar__actions"]}),i})(),hJ=(()=>{class i{}return i.\u0275fac=function(e){return new(e||i)},i.\u0275dir=ve({type:i,selectors:[["","matSnackBarAction",""]],hostAttrs:[1,"mat-mdc-snack-bar-action","mdc-snackbar__action"]}),i})(),fJ=(()=>{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)(E(dR),E(AV))},i.\u0275cmp=ot({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&&(W(0,"div",0),ze(1),j(),fe(2,oJ,3,1,"div",1)),2&e&&(G(1),Qi(" ",n.data.message,"\n"),G(1),U("ngIf",n.hasAction))},dependencies:[vi,ib,dJ,uJ,hJ],styles:[".mat-mdc-simple-snack-bar{display:flex}"],encapsulation:2,changeDetection:0}),i})();const pJ={snackBarState:ka("state",[Os("void, hidden",si({transform:"scale(0.8)",opacity:0})),Os("visible",si({transform:"scale(1)",opacity:1})),Or("* => visible",Yr("150ms cubic-bezier(0, 0, 0.2, 1)")),Or("* => void, * => hidden",Yr("75ms cubic-bezier(0.4, 0.0, 1, 1)",si({opacity:0})))])};let mJ=0,gJ=(()=>{class i extends NM{constructor(e,n,r,s,o){super(),this._ngZone=e,this._elementRef=n,this._changeDetectorRef=r,this._platform=s,this.snackBarConfig=o,this._document=Ft(jt),this._trackedModals=new Set,this._announceDelay=150,this._destroyed=!1,this._onAnnounce=new Re,this._onExit=new Re,this._onEnter=new Re,this._animationState="void",this._liveElementId="mat-snack-bar-container-live-"+mJ++,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(Oi(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)(E(pt),E(gt),E(Zn),E(zi),E(ZM))},i.\u0275dir=ve({type:i,viewQuery:function(e,n){if(1&e&&Wn(Am,7),2&e){let r;Et(r=At())&&(n._portalOutlet=r.first)}},features:[lt]}),i})(),_J=(()=>{class i extends gJ{_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=ri(i)))(n||i)}}(),i.\u0275cmp=ot({type:i,selectors:[["mat-snack-bar-container"]],viewQuery:function(e,n){if(1&e&&Wn(aJ,7),2&e){let r;Et(r=At())&&(n._label=r.first)}},hostAttrs:[1,"mdc-snackbar","mat-mdc-snack-bar-container","mdc-snackbar--open"],hostVars:1,hostBindings:function(e,n){1&e&&N1("@state.done",function(s){return n.onAnimationEnd(s)}),2&e&&Iw("@state",n._animationState)},features:[lt],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&&(W(0,"div",0)(1,"div",1,2)(3,"div",3),fe(4,lJ,0,0,"ng-template",4),j(),Pe(5,"div"),j()()),2&e&&(G(5),Dt("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:[pJ.snackBarState]}}),i})(),DV=(()=>{class i{}return i.\u0275fac=function(e){return new(e||i)},i.\u0275mod=nn({type:i}),i.\u0275inj=Kt({imports:[Pm,Nh,Ao,KM,Qn,Qn]}),i})();const TV=new me("mat-snack-bar-default-options",{providedIn:"root",factory:function vJ(){return new ZM}});let yJ=(()=>{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=$i.create({parent:n&&n.viewContainerRef&&n.viewContainerRef.injector||this._injector,providers:[{provide:ZM,useValue:n}]}),o=new Lh(this.snackBarContainerComponent,n.viewContainerRef,s),a=e.attach(o);return a.instance.snackBarConfig=n,a.instance}_attach(e,n){const r={...new ZM,...this._defaultConfig,...n},s=this._createOverlay(r),o=this._attachSnackBarContainer(s,r),a=new dR(o,s);if(e instanceof Co){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 Lh(e,void 0,l),d=o.attachComponentPortal(c);a.instance=d.instance}return this._breakpointObserver.observe("(max-width: 599.98px) and (orientation: portrait)").pipe(Ve(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 $i.create({parent:e&&e.viewContainerRef&&e.viewContainerRef.injector||this._injector,providers:[{provide:dR,useValue:n},{provide:AV,useValue:e.data}]})}}return i.\u0275fac=function(e){return new(e||i)(ee(as),ee(XI),ee($i),ee(GI),ee(i,12),ee(TV))},i.\u0275prov=ke({token:i,factory:i.\u0275fac}),i})(),IV=(()=>{class i extends yJ{constructor(e,n,r,s,o,a){super(e,n,r,s,o,a),this.simpleSnackBarComponent=fJ,this.snackBarContainerComponent=_J,this.handsetCssClass="mat-mdc-snack-bar-handset"}}return i.\u0275fac=function(e){return new(e||i)(ee(as),ee(XI),ee($i),ee(GI),ee(i,12),ee(TV))},i.\u0275prov=ke({token:i,factory:i.\u0275fac,providedIn:DV}),i})();const bJ=["*",[["mat-toolbar-row"]]],xJ=["*","mat-toolbar-row"],wJ=Qy(class{constructor(i){this._elementRef=i}});let MJ=(()=>{class i{}return i.\u0275fac=function(e){return new(e||i)},i.\u0275dir=ve({type:i,selectors:[["mat-toolbar-row"]],hostAttrs:[1,"mat-toolbar-row"],exportAs:["matToolbarRow"]}),i})(),CJ=(()=>{class i extends wJ{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)(E(gt),E(zi),E(jt))},i.\u0275cmp=ot({type:i,selectors:[["mat-toolbar"]],contentQueries:function(e,n,r){if(1&e&&Wi(r,MJ,5),2&e){let s;Et(s=At())&&(n._toolbarRows=s)}},hostAttrs:[1,"mat-toolbar"],hostVars:4,hostBindings:function(e,n){2&e&&un("mat-toolbar-multiple-rows",n._toolbarRows.length>0)("mat-toolbar-single-row",0===n._toolbarRows.length)},inputs:{color:"color"},exportAs:["matToolbar"],features:[lt],ngContentSelectors:xJ,decls:2,vars:0,template:function(e,n){1&e&&(or(bJ),Wt(0),Wt(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})(),SJ=(()=>{class i{}return i.\u0275fac=function(e){return new(e||i)},i.\u0275mod=nn({type:i}),i.\u0275inj=Kt({imports:[Qn,Qn]}),i})(),EJ=(()=>{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=ot({type:i,selectors:[["mat-divider"]],hostAttrs:["role","separator",1,"mat-divider"],hostVars:7,hostBindings:function(e,n){2&e&&(Dt("aria-orientation",n.vertical?"vertical":"horizontal"),un("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})(),RV=(()=>{class i{}return i.\u0275fac=function(e){return new(e||i)},i.\u0275mod=nn({type:i}),i.\u0275inj=Kt({imports:[Qn,Qn]}),i})();const AJ=["tooltip"],kV=new me("mat-tooltip-scroll-strategy"),IJ={provide:kV,deps:[as],useFactory:function TJ(i){return()=>i.scrollStrategies.reposition({scrollThrottle:20})}},kJ=new me("mat-tooltip-default-options",{providedIn:"root",factory:function RJ(){return{showDelay:0,hideDelay:0,touchendHideDelay:1500}}}),PV="tooltip-panel",OV=Oh({passive:!0});let BJ=(()=>{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=Ps(e)}get hideDelay(){return this._hideDelay}set hideDelay(e){this._hideDelay=Ps(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,d,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 Re,this._scrollStrategy=d,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(Ve(this._destroyed)).subscribe(()=>{this._overlayRef&&this._updatePosition(this._overlayRef)})}ngAfterViewInit(){this._viewInitialized=!0,this._setupPointerEnterEventsIfNeeded(),this._focusMonitor.monitor(this._elementRef).pipe(Ve(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,OV)}),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 Lh(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(Ve(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 gt)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(Ve(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}-${PV}`,scrollStrategy:this._scrollStrategy()}),this._updatePosition(this._overlayRef),this._overlayRef.detachments().pipe(Ve(this._destroyed)).subscribe(()=>this._detach()),this._overlayRef.outsidePointerEvents().pipe(Ve(this._destroyed)).subscribe(()=>this._tooltipInstance?._handleBodyInteraction()),this._overlayRef.keydownEvents().pipe(Ve(this._destroyed)).subscribe(s=>{this._isTooltipVisible()&&27===s.keyCode&&!Zo(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(Oi(1),Ve(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}-${PV}-`;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,OV)})}_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){wo()},i.\u0275dir=ve({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})(),Fs=(()=>{class i extends BJ{constructor(e,n,r,s,o,a,l,c,d,h,p,m){super(e,n,r,s,o,a,l,c,d,h,p,m),this._tooltipComponent=VJ,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)(E(as),E(gt),E(qy),E(jr),E(pt),E(zi),E(HZ),E(Xc),E(kV),E(Ra,8),E(kJ,8),E(jt))},i.\u0275dir=ve({type:i,selectors:[["","matTooltip",""]],hostAttrs:[1,"mat-mdc-tooltip-trigger"],exportAs:["matTooltip"],features:[lt]}),i})(),UJ=(()=>{class i{constructor(e,n){this._changeDetectorRef=e,this._closeOnInteraction=!1,this._isVisible=!1,this._onHide=new Re,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)(E(Zn),E(kr,8))},i.\u0275dir=ve({type:i}),i})(),VJ=(()=>{class i extends UJ{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)(E(Zn),E(gt),E(kr,8))},i.\u0275cmp=ot({type:i,selectors:[["mat-tooltip-component"]],viewQuery:function(e,n){if(1&e&&Wn(AJ,7),2&e){let r;Et(r=At())&&(n._tooltip=r.first)}},hostAttrs:["aria-hidden","true"],hostVars:2,hostBindings:function(e,n){1&e&&Le("mouseleave",function(s){return n._handleMouseLeave(s)}),2&e&&qo("zoom",n.isVisible()?1:null)},features:[lt],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&&(W(0,"div",0,1),Le("animationend",function(s){return n._handleAnimationEnd(s)}),W(2,"div",2),ze(3),j()()),2&e&&(un("mdc-tooltip--multiline",n._isMultiline),U("ngClass",n.tooltipClass),G(3),_i(n.message))},dependencies:[hm],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})(),FV=(()=>{class i{}return i.\u0275fac=function(e){return new(e||i)},i.\u0275mod=nn({type:i}),i.\u0275inj=Kt({providers:[IJ],imports:[BU,Ao,Pm,Qn,Qn,Xy]}),i})();function LV(...i){const t=w0(i),{args:e,keys:n}=VB(i),r=new In(s=>{const{length:o}=e;if(!o)return void s.complete();const a=new Array(o);let l=o,c=o;for(let d=0;d{h||(h=!0,c--),a[d]=p},()=>l--,void 0,()=>{(!l||!h)&&(c||s.next(n?zB(n,a):a),s.complete())}))}});return t?r.pipe(JT(t)):r}class uR{}class uu{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 uu?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 uu;return e.lazyInit=this.lazyInit&&this.lazyInit instanceof uu?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 zJ{encodeKey(t){return BV(t)}encodeValue(t){return BV(t)}decodeKey(t){return decodeURIComponent(t)}decodeValue(t){return decodeURIComponent(t)}}const GJ=/%(\d[a-f0-9])/gi,$J={40:"@","3A":":",24:"$","2C":",","3B":";","3D":"=","3F":"?","2F":"/"};function BV(i){return encodeURIComponent(i).replace(GJ,(t,e)=>$J[e]??t)}function QM(i){return`${i}`}class hu{constructor(t={}){if(this.updates=null,this.cloneFrom=null,this.encoder=t.encoder||new zJ,t.fromString){if(t.fromObject)throw new Error("Cannot specify both fromString and fromObject.");this.map=function HJ(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 hu({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 WJ{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 UV(i){return typeof ArrayBuffer<"u"&&i instanceof ArrayBuffer}function VV(i){return typeof Blob<"u"&&i instanceof Blob}function zV(i){return typeof FormData<"u"&&i instanceof FormData}class rb{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 jJ(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 uu),this.context||(this.context=new WJ),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 rb(e,n,s,{params:c,headers:l,context:d,reportProgress:a,responseType:r,withCredentials:o})}}var ls=(()=>((ls=ls||{})[ls.Sent=0]="Sent",ls[ls.UploadProgress=1]="UploadProgress",ls[ls.ResponseHeader=2]="ResponseHeader",ls[ls.DownloadProgress=3]="DownloadProgress",ls[ls.Response=4]="Response",ls[ls.User=5]="User",ls))();class qJ{constructor(t,e=200,n="OK"){this.headers=t.headers||new uu,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 hR extends qJ{constructor(t={}){super(t),this.type=ls.Response,this.body=void 0!==t.body?t.body:null}clone(t={}){return new hR({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 fR(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 pR=(()=>{class i{constructor(e){this.handler=e}request(e,n,r={}){let s;if(e instanceof rb)s=e;else{let l,c;l=r.headers instanceof uu?r.headers:new uu(r.headers),r.params&&(c=r.params instanceof hu?r.params:new hu({fromObject:r.params})),s=new rb(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=ft(s).pipe(ru(l=>this.handler.handle(l)));if(e instanceof rb||"events"===r.observe)return o;const a=o.pipe(gn(l=>l instanceof hR));switch(r.observe||"body"){case"body":switch(s.responseType){case"arraybuffer":return a.pipe(et(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(et(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(et(l=>{if(null!==l.body&&"string"!=typeof l.body)throw new Error("Response is not a string.");return l.body}));default:return a.pipe(et(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 hu).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,fR(r,n))}post(e,n,r={}){return this.request("POST",e,fR(r,n))}put(e,n,r={}){return this.request("PUT",e,fR(r,n))}}return i.\u0275fac=function(e){return new(e||i)(ee(uR))},i.\u0275prov=ke({token:i,factory:i.\u0275fac}),i})();const aee=["*"];let eC;function sb(i){return function lee(){if(void 0===eC&&(eC=null,typeof window<"u")){const i=window;void 0!==i.trustedTypes&&(eC=i.trustedTypes.createPolicy("angular#components",{createHTML:t=>t}))}return eC}()?.createHTML(i)||i}function XV(i){return Error(`Unable to find icon with the name "${i}"`)}function KV(i){return Error(`The URL provided to MatIconRegistry was not trusted as a resource URL via Angular's DomSanitizer. Attempted URL was "${i}".`)}function ZV(i){return Error(`The literal provided to MatIconRegistry was not trusted as safe HTML by Angular's DomSanitizer. Attempted literal was "${i}".`)}class Vh{constructor(t,e,n){this.url=t,this.svgText=e,this.options=n}}let tC=(()=>{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 Vh(r,null,s))}addSvgIconResolver(e){return this._resolvers.push(e),this}addSvgIconLiteralInNamespace(e,n,r,s){const o=this._sanitizer.sanitize(Kn.HTML,r);if(!o)throw ZV(r);const a=sb(o);return this._addSvgIconConfig(e,n,new Vh("",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 Vh(n,null,r))}addSvgIconSetLiteralInNamespace(e,n,r){const s=this._sanitizer.sanitize(Kn.HTML,n);if(!s)throw ZV(n);const o=sb(s);return this._addSvgIconSetConfig(e,new Vh("",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(Kn.RESOURCE_URL,e);if(!n)throw KV(e);const r=this._cachedIconsByUrl.get(n);return r?ft(nC(r)):this._loadSvgIconFromConfig(new Vh(e,null)).pipe(Vi(s=>this._cachedIconsByUrl.set(n,s)),et(s=>nC(s)))}getNamedSvgIcon(e,n=""){const r=QV(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(XV(r))}ngOnDestroy(){this._resolvers=[],this._svgIconConfigs.clear(),this._iconSetConfigs.clear(),this._cachedIconsByUrl.clear()}_getSvgFromConfig(e){return e.svgText?ft(nC(this._svgElementFromConfig(e))):this._loadSvgIconFromConfig(e).pipe(et(n=>nC(n)))}_getSvgFromIconSetConfigs(e,n){const r=this._extractIconWithNameFromAnySet(e,n);return r?ft(r):LV(n.filter(o=>!o.svgText).map(o=>this._loadSvgIconSetFromConfig(o).pipe(jc(a=>{const c=`Loading icon set URL: ${this._sanitizer.sanitize(Kn.RESOURCE_URL,o.url)} failed: ${a.message}`;return this._errorHandler.handleError(new Error(c)),ft(null)})))).pipe(et(()=>{const o=this._extractIconWithNameFromAnySet(e,n);if(!o)throw XV(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(Vi(n=>e.svgText=n),et(()=>this._svgElementFromConfig(e)))}_loadSvgIconSetFromConfig(e){return e.svgText?ft(null):this._fetchIcon(e).pipe(Vi(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(sb(""));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(sb("")),r=e.attributes;for(let s=0;ssb(c)),su(()=>this._inProgressUrlFetches.delete(o)),Uf());return this._inProgressUrlFetches.set(o,l),l}_addSvgIconConfig(e,n,r){return this._svgIconConfigs.set(QV(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:""}}}),JV=["clip-path","color-profile","src","cursor","fill","filter","marker","marker-start","marker-mid","marker-end","mask","stroke"],gee=JV.map(i=>`[${i}]`).join(", "),_ee=/^url\(['"]?#(.*?)['"]?\)$/;let gR=(()=>{class i extends hee{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=Zt.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(gee),r=this._elementsWithExternalReferences=this._elementsWithExternalReferences||new Map;for(let s=0;s{const a=n[s],l=a.getAttribute(o),c=l?l.match(_ee):null;if(c){let d=r.get(a);d||(d=[],r.set(a,d)),d.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(Oi(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)(E(gt),E(tC),xa("aria-hidden"),E(pee),E(al),E(fee,8))},i.\u0275cmp=ot({type:i,selectors:[["mat-icon"]],hostAttrs:["role","img",1,"mat-icon","notranslate"],hostVars:8,hostBindings:function(e,n){2&e&&(Dt("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),un("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:[lt],ngContentSelectors:aee,decls:1,vars:0,template:function(e,n){1&e&&(or(),Wt(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})(),ez=(()=>{class i{}return i.\u0275fac=function(e){return new(e||i)},i.\u0275mod=nn({type:i}),i.\u0275inj=Kt({imports:[Qn,Qn]}),i})(),tz=(()=>{class i{constructor(e){this.viewContainerRef=e}}return i.\u0275fac=function(e){return new(e||i)(E(jr))},i.\u0275dir=ve({type:i,selectors:[["","dataBlockUI",""]]}),i})(),vee=(()=>{class i{constructor(){this.resource=null,this.name="",this.resourceDescription="",this.changed=new $e}}return i.\u0275fac=function(e){return new(e||i)},i.\u0275cmp=ot({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&&(W(0,"p",0),ze(1),j()),2&e&&(U("matTooltip",n.resourceDescription),G(1),tm("",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:[Fs],changeDetection:0}),i})();function yee(i,t){if(1&i&&(W(0,"h2",4),ze(1),j()),2&i){const e=he();U("matTooltip",e.resourceDescription),G(1),_i(e.name)}}function bee(i,t){1&i&&Pe(0,"app-block-actions",5),2&i&&U("resource",he().resource)}const xee=function(i,t,e,n){return{id:i,name:t,data:e,schema:n}};function wee(i,t){if(1&i&&Pe(0,"app-editor",7),2&i){const e=he().$implicit,n=he();U("resource",L2(3,xee,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 Mee(i,t){if(1&i&&($r(0),fe(1,wee,1,8,"app-editor",6),Ct(2,"async"),Wr()),2&i){const e=t.$implicit,n=he();G(1),U("ngIf",!(Tt(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 ec=(()=>{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 $e,this.destroyed$=new Re}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(Ve(this.destroyed$),gn(([n,r])=>!!this.resource&&n.startsWith(this.resource.id)&&!n.substring(this.resource.id.length+1).includes("/"))).subscribe(function(){var n=tt(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)(E(Pa))},i.\u0275cmp=ot({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&&(fe(0,yee,2,2,"h2",0),Ct(1,"async"),fe(2,bee,1,1,"app-block-actions",1),W(3,"div",2),fe(4,Mee,3,3,"ng-container",3),j()),2&e){let r;U("ngIf",n.name&&n.name!=(null==(r=Tt(1,4,n.main.resource$))?null:r.name)),G(2),U("ngIf",!n.hideBlockActions),G(2),U("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})(),nz=(()=>{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)(E(ol),E(gt))},i.\u0275dir=ve({type:i}),i})(),zh=(()=>{class i extends nz{}return i.\u0275fac=function(){let t;return function(n){return(t||(t=ri(i)))(n||i)}}(),i.\u0275dir=ve({type:i,features:[lt]}),i})();const Io=new me("NgValueAccessor"),See={provide:Io,useExisting:Gn(()=>gl),multi:!0},Aee=new me("CompositionEventMode");let gl=(()=>{class i extends nz{constructor(e,n,r){super(e,n),this._compositionMode=r,this._composing=!1,null==this._compositionMode&&(this._compositionMode=!function Eee(){const i=Gc()?Gc().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)(E(ol),E(gt),E(Aee,8))},i.\u0275dir=ve({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&&Le("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:[Dn([See]),lt]}),i})();const Dee=!1;function fu(i){return null==i||("string"==typeof i||Array.isArray(i))&&0===i.length}function rz(i){return null!=i&&"number"==typeof i.length}const qr=new me("NgValidators"),pu=new me("NgAsyncValidators"),Tee=/^(?=.{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 _l{static min(t){return sz(t)}static max(t){return oz(t)}static required(t){return function az(i){return fu(i.value)?{required:!0}:null}(t)}static requiredTrue(t){return function lz(i){return!0===i.value?null:{required:!0}}(t)}static email(t){return function cz(i){return fu(i.value)||Tee.test(i.value)?null:{email:!0}}(t)}static minLength(t){return dz(t)}static maxLength(t){return uz(t)}static pattern(t){return function hz(i){if(!i)return iC;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(fu(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 vz(t)}static composeAsync(t){return yz(t)}}function sz(i){return t=>{if(fu(t.value)||fu(i))return null;const e=parseFloat(t.value);return!isNaN(e)&&e{if(fu(t.value)||fu(i))return null;const e=parseFloat(t.value);return!isNaN(e)&&e>i?{max:{max:i,actual:t.value}}:null}}function dz(i){return t=>fu(t.value)||!rz(t.value)?null:t.value.lengthrz(t.value)&&t.value.length>i?{maxlength:{requiredLength:i,actualLength:t.value.length}}:null}function iC(i){return null}function fz(i){return null!=i}function pz(i){const t=oy(i)?Ni(i):i;if(Dee&&!L1(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 pe(-1101,e)}return t}function mz(i){let t={};return i.forEach(e=>{t=null!=e?{...t,...e}:t}),0===Object.keys(t).length?null:t}function gz(i,t){return t.map(e=>e(i))}function _z(i){return i.map(t=>function Iee(i){return!i.validate}(t)?t:e=>t.validate(e))}function vz(i){if(!i)return null;const t=i.filter(fz);return 0==t.length?null:function(e){return mz(gz(e,t))}}function _R(i){return null!=i?vz(_z(i)):null}function yz(i){if(!i)return null;const t=i.filter(fz);return 0==t.length?null:function(e){return LV(gz(e,t).map(pz)).pipe(et(mz))}}function vR(i){return null!=i?yz(_z(i)):null}function bz(i,t){return null===i?[t]:Array.isArray(i)?[...i,t]:[i,t]}function xz(i){return i._rawValidators}function wz(i){return i._rawAsyncValidators}function yR(i){return i?Array.isArray(i)?i:[i]:[]}function rC(i,t){return Array.isArray(i)?i.includes(t):i===t}function Mz(i,t){const e=yR(t);return yR(i).forEach(r=>{rC(e,r)||e.push(r)}),e}function Cz(i,t){return yR(t).filter(e=>!rC(i,e))}class Sz{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=_R(this._rawValidators)}_setAsyncValidators(t){this._rawAsyncValidators=t||[],this._composedAsyncValidatorFn=vR(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 lo extends Sz{get formDirective(){return null}get path(){return null}}class tc extends Sz{constructor(){super(...arguments),this._parent=null,this.name=null,this.valueAccessor=null}}class Ez{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 nc=(()=>{class i extends Ez{constructor(e){super(e)}}return i.\u0275fac=function(e){return new(e||i)(E(tc,2))},i.\u0275dir=ve({type:i,selectors:[["","formControlName",""],["","ngModel",""],["","formControl",""]],hostVars:14,hostBindings:function(e,n){2&e&&un("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:[lt]}),i})(),bR=(()=>{class i extends Ez{constructor(e){super(e)}}return i.\u0275fac=function(e){return new(e||i)(E(lo,10))},i.\u0275dir=ve({type:i,selectors:[["","formGroupName",""],["","formArrayName",""],["","ngModelGroup",""],["","formGroup",""],["form",3,"ngNoForm",""],["","ngForm",""]],hostVars:16,hostBindings:function(e,n){2&e&&un("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:[lt]}),i})();function Az(i,t){return i?`with name: '${t}'`:`at index: ${t}`}const MR=!1,ob="VALID",oC="INVALID",zm="PENDING",ab="DISABLED";function CR(i){return(aC(i)?i.validators:i)||null}function SR(i,t){return(aC(t)?t.asyncValidators:i)||null}function aC(i){return null!=i&&!Array.isArray(i)&&"object"==typeof i}function Dz(i,t,e){const n=i.controls;if(!(t?Object.keys(n):n).length)throw new pe(1e3,MR?function Oee(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 pe(1001,MR?function Fee(i,t){return`Cannot find form control ${Az(i,t)}`}(t,e):"")}function Tz(i,t,e){i._forEachChild((n,r)=>{if(void 0===e[r])throw new pe(1002,MR?function Lee(i,t){return`Must supply a value for form control ${Az(i,t)}`}(t,r):"")})}class lC{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===ob}get invalid(){return this.status===oC}get pending(){return this.status==zm}get disabled(){return this.status===ab}get enabled(){return this.status!==ab}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(Mz(t,this._rawValidators))}addAsyncValidators(t){this.setAsyncValidators(Mz(t,this._rawAsyncValidators))}removeValidators(t){this.setValidators(Cz(t,this._rawValidators))}removeAsyncValidators(t){this.setAsyncValidators(Cz(t,this._rawAsyncValidators))}hasValidator(t){return rC(this._rawValidators,t)}hasAsyncValidator(t){return rC(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=ab,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=ob,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===ob||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()?ab:ob}_runValidator(){return this.validator?this.validator(this):null}_runAsyncValidator(t){if(this.asyncValidator){this.status=zm,this._hasOwnPendingAsyncValidator=!0;const e=pz(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 $e,this.statusChanges=new $e}_calculateStatus(){return this._allControlsDisabled()?ab:this.errors?oC:this._hasOwnPendingAsyncValidator||this._anyControlsHaveStatus(zm)?zm:this._anyControlsHaveStatus(oC)?oC:ob}_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){aC(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 Nee(i){return Array.isArray(i)?_R(i):i||null}(this._rawValidators)}_assignAsyncValidators(t){this._rawAsyncValidators=Array.isArray(t)?t.slice():t,this._composedAsyncValidatorFn=function Bee(i){return Array.isArray(i)?vR(i):i||null}(this._rawAsyncValidators)}}class Hm extends lC{constructor(t,e,n){super(CR(e),SR(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={}){Tz(this,!0,t),Object.keys(t).forEach(n=>{Dz(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 Iz extends Hm{}const Hh=new me("CallSetDisabledState",{providedIn:"root",factory:()=>lb}),lb="always";function cC(i,t){return[...t.path,i]}function cb(i,t,e=lb){ER(i,t),t.valueAccessor.writeValue(i.value),(i.disabled||"always"===e)&&t.valueAccessor.setDisabledState?.(i.disabled),function Vee(i,t){t.valueAccessor.registerOnChange(e=>{i._pendingValue=e,i._pendingChange=!0,i._pendingDirty=!0,"change"===i.updateOn&&Rz(i,t)})}(i,t),function Hee(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 zee(i,t){t.valueAccessor.registerOnTouched(()=>{i._pendingTouched=!0,"blur"===i.updateOn&&i._pendingChange&&Rz(i,t),"submit"!==i.updateOn&&i.markAsTouched()})}(i,t),function Uee(i,t){if(t.valueAccessor.setDisabledState){const e=n=>{t.valueAccessor.setDisabledState(n)};i.registerOnDisabledChange(e),t._registerOnDestroy(()=>{i._unregisterOnDisabledChange(e)})}}(i,t)}function dC(i,t,e=!0){const n=()=>{};t.valueAccessor&&(t.valueAccessor.registerOnChange(n),t.valueAccessor.registerOnTouched(n)),hC(i,t),i&&(t._invokeOnDestroyCallbacks(),i._registerOnCollectionChange(()=>{}))}function uC(i,t){i.forEach(e=>{e.registerOnValidatorChange&&e.registerOnValidatorChange(t)})}function ER(i,t){const e=xz(i);null!==t.validator?i.setValidators(bz(e,t.validator)):"function"==typeof e&&i.setValidators([e]);const n=wz(i);null!==t.asyncValidator?i.setAsyncValidators(bz(n,t.asyncValidator)):"function"==typeof n&&i.setAsyncValidators([n]);const r=()=>i.updateValueAndValidity();uC(t._rawValidators,r),uC(t._rawAsyncValidators,r)}function hC(i,t){let e=!1;if(null!==i){if(null!==t.validator){const r=xz(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=wz(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 uC(t._rawValidators,n),uC(t._rawAsyncValidators,n),e}function Rz(i,t){i._pendingDirty&&i.markAsDirty(),i.setValue(i._pendingValue,{emitModelToViewChange:!1}),t.viewToModelUpdate(i._pendingValue),i._pendingChange=!1}function kz(i,t){ER(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 Pz(i,t){i._syncPendingControls(),t.forEach(e=>{const n=e.control;"submit"===n.updateOn&&n._pendingChange&&(e.viewToModelUpdate(n._pendingValue),n._pendingChange=!1)})}function TR(i,t){if(!t)return null;let e,n,r;return Array.isArray(t),t.forEach(s=>{s.constructor===gl?e=s:function Wee(i){return Object.getPrototypeOf(i.constructor)===zh}(s)?n=s:r=s}),r||n||e||null}const Yee={provide:lo,useExisting:Gn(()=>ub)},db=(()=>Promise.resolve())();let ub=(()=>{class i extends lo{constructor(e,n,r){super(),this.callSetDisabledState=r,this.submitted=!1,this._directives=new Set,this.ngSubmit=new $e,this.form=new Hm({},_R(e),vR(n))}ngAfterViewInit(){this._setUpdateStrategy()}get formDirective(){return this}get control(){return this.form}get path(){return[]}get controls(){return this.form.controls}addControl(e){db.then(()=>{const n=this._findContainer(e.path);e.control=n.registerControl(e.name,e.control),cb(e.control,e,this.callSetDisabledState),e.control.updateValueAndValidity({emitEvent:!1}),this._directives.add(e)})}getControl(e){return this.form.get(e.path)}removeControl(e){db.then(()=>{const n=this._findContainer(e.path);n&&n.removeControl(e.name),this._directives.delete(e)})}addFormGroup(e){db.then(()=>{const n=this._findContainer(e.path),r=new Hm({});kz(r,e),n.registerControl(e.name,r),r.updateValueAndValidity({emitEvent:!1})})}removeFormGroup(e){db.then(()=>{const n=this._findContainer(e.path);n&&n.removeControl(e.name)})}getFormGroup(e){return this.form.get(e.path)}updateModel(e,n){db.then(()=>{this.form.get(e.path).setValue(n)})}setValue(e){this.control.setValue(e)}onSubmit(e){return this.submitted=!0,Pz(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)(E(qr,10),E(pu,10),E(Hh,8))},i.\u0275dir=ve({type:i,selectors:[["form",3,"ngNoForm","",3,"formGroup",""],["ng-form"],["","ngForm",""]],hostBindings:function(e,n){1&e&&Le("submit",function(s){return n.onSubmit(s)})("reset",function(){return n.onReset()})},inputs:{options:["ngFormOptions","options"]},outputs:{ngSubmit:"ngSubmit"},exportAs:["ngForm"],features:[Dn([Yee]),lt]}),i})();function Oz(i,t){const e=i.indexOf(t);e>-1&&i.splice(e,1)}function Fz(i){return"object"==typeof i&&null!==i&&2===Object.keys(i).length&&"value"in i&&"disabled"in i}const ic=class extends lC{constructor(t=null,e,n){super(CR(e),SR(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}),aC(e)&&(e.nonNullable||e.initialValueIsDefault)&&(this.defaultValue=Fz(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){Oz(this._onChange,t)}registerOnDisabledChange(t){this._onDisabledChange.push(t)}_unregisterOnDisabledChange(t){Oz(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){Fz(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}},Kee={provide:tc,useExisting:Gn(()=>Zc)},Bz=(()=>Promise.resolve())();let Zc=(()=>{class i extends tc{constructor(e,n,r,s,o,a){super(),this._changeDetectorRef=o,this.callSetDisabledState=a,this.control=new ic,this._registered=!1,this.update=new $e,this._parent=e,this._setValidators(n),this._setAsyncValidators(r),this.valueAccessor=TR(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(){cb(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){Bz.then(()=>{this.control.setValue(e,{emitViewToModelChange:!1}),this._changeDetectorRef?.markForCheck()})}_updateDisabled(e){const n=e.isDisabled.currentValue,r=0!==n&&function um(i){return"boolean"==typeof i?i:null!=i&&"false"!==i}(n);Bz.then(()=>{r&&!this.control.disabled?this.control.disable():!r&&this.control.disabled&&this.control.enable(),this._changeDetectorRef?.markForCheck()})}_getPath(e){return this._parent?cC(e,this._parent):[e]}}return i.\u0275fac=function(e){return new(e||i)(E(lo,9),E(qr,10),E(pu,10),E(Io,10),E(Zn,8),E(Hh,8))},i.\u0275dir=ve({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:[Dn([Kee]),lt,xi]}),i})(),IR=(()=>{class i{}return i.\u0275fac=function(e){return new(e||i)},i.\u0275dir=ve({type:i,selectors:[["form",3,"ngNoForm","",3,"ngNativeValidate",""]],hostAttrs:["novalidate",""]}),i})();const Zee={provide:Io,useExisting:Gn(()=>mu),multi:!0};let mu=(()=>{class i extends zh{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=ri(i)))(n||i)}}(),i.\u0275dir=ve({type:i,selectors:[["input","type","number","formControlName",""],["input","type","number","formControl",""],["input","type","number","ngModel",""]],hostBindings:function(e,n){1&e&&Le("input",function(s){return n.onChange(s.target.value)})("blur",function(){return n.onTouched()})},features:[Dn([Zee]),lt]}),i})(),Uz=(()=>{class i{}return i.\u0275fac=function(e){return new(e||i)},i.\u0275mod=nn({type:i}),i.\u0275inj=Kt({}),i})();const RR=new me("NgModelWithFormControlWarning"),nte={provide:lo,useExisting:Gn(()=>Gh)};let Gh=(()=>{class i extends lo{constructor(e,n,r){super(),this.callSetDisabledState=r,this.submitted=!1,this._onCollectionChange=()=>this._updateDomValue(),this.directives=[],this.form=null,this.ngSubmit=new $e,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&&(hC(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 cb(n,e,this.callSetDisabledState),n.updateValueAndValidity({emitEvent:!1}),this.directives.push(e),n}getControl(e){return this.form.get(e.path)}removeControl(e){dC(e.control||null,e,!1),function jee(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,Pz(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&&(dC(n||null,e),(i=>i instanceof ic)(r)&&(cb(r,e,this.callSetDisabledState),e.control=r))}),this.form._updateTreeValidity({emitEvent:!1})}_setUpFormContainer(e){const n=this.form.get(e.path);kz(n,e),n.updateValueAndValidity({emitEvent:!1})}_cleanUpFormContainer(e){if(this.form){const n=this.form.get(e.path);n&&function Gee(i,t){return hC(i,t)}(n,e)&&n.updateValueAndValidity({emitEvent:!1})}}_updateRegistrations(){this.form._registerOnCollectionChange(this._onCollectionChange),this._oldForm&&this._oldForm._registerOnCollectionChange(()=>{})}_updateValidators(){ER(this.form,this),this._oldForm&&hC(this._oldForm,this)}_checkFormPresent(){}}return i.\u0275fac=function(e){return new(e||i)(E(qr,10),E(pu,10),E(Hh,8))},i.\u0275dir=ve({type:i,selectors:[["","formGroup",""]],hostBindings:function(e,n){1&e&&Le("submit",function(s){return n.onSubmit(s)})("reset",function(){return n.onReset()})},inputs:{form:["formGroup","form"]},outputs:{ngSubmit:"ngSubmit"},exportAs:["ngForm"],features:[Dn([nte]),lt,xi]}),i})();const ste={provide:tc,useExisting:Gn(()=>fC)};let fC=(()=>{class i extends tc{set isDisabled(e){}constructor(e,n,r,s,o){super(),this._ngModelWarningConfig=o,this._added=!1,this.update=new $e,this._ngModelWarningSent=!1,this._parent=e,this._setValidators(n),this._setAsyncValidators(r),this.valueAccessor=TR(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 cC(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)(E(lo,13),E(qr,10),E(pu,10),E(Io,10),E(RR,8))},i.\u0275dir=ve({type:i,selectors:[["","formControlName",""]],inputs:{name:["formControlName","name"],isDisabled:["disabled","isDisabled"],model:["ngModel","model"]},outputs:{update:"ngModelChange"},features:[Dn([ste]),lt,xi]}),i})();function jz(i){return"number"==typeof i?i:parseInt(i,10)}function Yz(i){return"number"==typeof i?i:parseFloat(i)}let $h=(()=>{class i{constructor(){this._validator=iC}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):iC,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=ve({type:i,features:[xi]}),i})();const hte={provide:qr,useExisting:Gn(()=>gu),multi:!0};let gu=(()=>{class i extends $h{constructor(){super(...arguments),this.inputName="max",this.normalizeInput=e=>Yz(e),this.createValidator=e=>oz(e)}}return i.\u0275fac=function(){let t;return function(n){return(t||(t=ri(i)))(n||i)}}(),i.\u0275dir=ve({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&&Dt("max",n._enabled?n.max:null)},inputs:{max:"max"},features:[Dn([hte]),lt]}),i})();const fte={provide:qr,useExisting:Gn(()=>_u),multi:!0};let _u=(()=>{class i extends $h{constructor(){super(...arguments),this.inputName="min",this.normalizeInput=e=>Yz(e),this.createValidator=e=>sz(e)}}return i.\u0275fac=function(){let t;return function(n){return(t||(t=ri(i)))(n||i)}}(),i.\u0275dir=ve({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&&Dt("min",n._enabled?n.min:null)},inputs:{min:"min"},features:[Dn([fte]),lt]}),i})();const _te={provide:qr,useExisting:Gn(()=>NR),multi:!0};let NR=(()=>{class i extends $h{constructor(){super(...arguments),this.inputName="minlength",this.normalizeInput=e=>jz(e),this.createValidator=e=>dz(e)}}return i.\u0275fac=function(){let t;return function(n){return(t||(t=ri(i)))(n||i)}}(),i.\u0275dir=ve({type:i,selectors:[["","minlength","","formControlName",""],["","minlength","","formControl",""],["","minlength","","ngModel",""]],hostVars:1,hostBindings:function(e,n){2&e&&Dt("minlength",n._enabled?n.minlength:null)},inputs:{minlength:"minlength"},features:[Dn([_te]),lt]}),i})();const vte={provide:qr,useExisting:Gn(()=>BR),multi:!0};let BR=(()=>{class i extends $h{constructor(){super(...arguments),this.inputName="maxlength",this.normalizeInput=e=>jz(e),this.createValidator=e=>uz(e)}}return i.\u0275fac=function(){let t;return function(n){return(t||(t=ri(i)))(n||i)}}(),i.\u0275dir=ve({type:i,selectors:[["","maxlength","","formControlName",""],["","maxlength","","formControl",""],["","maxlength","","ngModel",""]],hostVars:1,hostBindings:function(e,n){2&e&&Dt("maxlength",n._enabled?n.maxlength:null)},inputs:{maxlength:"maxlength"},features:[Dn([vte]),lt]}),i})(),Zz=(()=>{class i{}return i.\u0275fac=function(e){return new(e||i)},i.\u0275mod=nn({type:i}),i.\u0275inj=Kt({imports:[Uz]}),i})();class Qz extends lC{constructor(t,e,n){super(CR(e),SR(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={}){Tz(this,!1,t),t.forEach((n,r)=>{Dz(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 Jz(i){return!!i&&(void 0!==i.asyncValidators||void 0!==i.validators||void 0!==i.updateOn)}let bte=(()=>{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 Jz(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 Iz(r,n)}control(e,n,r){let s={};return this.useNonNullable?(Jz(n)?s=n:(s.validators=n,s.asyncValidators=r),new ic(e,{...s,nonNullable:!0})):new ic(e,n,r)}array(e,n,r){const s=e.map(o=>this._createControl(o));return new Qz(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 ic||e instanceof lC?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=ke({token:i,factory:i.\u0275fac,providedIn:"root"}),i})(),eH=(()=>{class i{static withConfig(e){return{ngModule:i,providers:[{provide:Hh,useValue:e.callSetDisabledState??lb}]}}}return i.\u0275fac=function(e){return new(e||i)},i.\u0275mod=nn({type:i}),i.\u0275inj=Kt({imports:[Zz]}),i})(),tH=(()=>{class i{static withConfig(e){return{ngModule:i,providers:[{provide:RR,useValue:e.warnOnNgModelWithFormControl??"always"},{provide:Hh,useValue:e.callSetDisabledState??lb}]}}}return i.\u0275fac=function(e){return new(e||i)},i.\u0275mod=nn({type:i}),i.\u0275inj=Kt({imports:[Zz]}),i})();const xte=["matFormFieldNotchedOutline",""],wte=["*"],Mte=["textField"],Cte=["iconPrefixContainer"],Ste=["textPrefixContainer"];function Ete(i,t){1&i&&Pe(0,"span",19)}function Ate(i,t){if(1&i){const e=ai();W(0,"label",17),Le("cdkObserveContent",function(){return rn(e),Ut(he(2)._refreshOutlineNotchWidth())}),Wt(1,1),fe(2,Ete,1,0,"span",18),j()}if(2&i){const e=he(2);U("floating",e._shouldLabelFloat())("cdkObserveContentDisabled",!e._hasOutline())("id",e._labelId),Dt("for",e._control.id)("aria-owns",e._control.id),G(2),U("ngIf",!e.hideRequiredMarker&&e._control.required)}}function Dte(i,t){1&i&&fe(0,Ate,3,6,"label",16),2&i&&U("ngIf",he()._hasFloatingLabel())}function Tte(i,t){1&i&&Pe(0,"div",20)}function Ite(i,t){}function Rte(i,t){1&i&&fe(0,Ite,0,0,"ng-template",22),2&i&&(he(2),U("ngTemplateOutlet",Zi(1)))}function kte(i,t){if(1&i&&(W(0,"div",21),fe(1,Rte,1,1,"ng-template",9),j()),2&i){const e=he();U("matFormFieldNotchedOutlineOpen",e._shouldLabelFloat())("matFormFieldNotchedOutlineLabelWidth",e._labelWidth),G(1),U("ngIf",!e._forceDisplayInfixLabel())}}function Pte(i,t){1&i&&(W(0,"div",23,24),Wt(2,2),j())}function Ote(i,t){1&i&&(W(0,"div",25,26),Wt(2,3),j())}function Fte(i,t){}function Lte(i,t){1&i&&fe(0,Fte,0,0,"ng-template",22),2&i&&(he(),U("ngTemplateOutlet",Zi(1)))}function Nte(i,t){1&i&&(W(0,"div",27),Wt(1,4),j())}function Bte(i,t){1&i&&(W(0,"div",28),Wt(1,5),j())}function Ute(i,t){1&i&&Pe(0,"div",29)}function Vte(i,t){1&i&&(W(0,"div",30),Wt(1,6),j()),2&i&&U("@transitionMessages",he()._subscriptAnimationState)}function zte(i,t){if(1&i&&(W(0,"mat-hint",34),ze(1),j()),2&i){const e=he(2);U("id",e._hintLabelId),G(1),_i(e.hintLabel)}}function Hte(i,t){if(1&i&&(W(0,"div",31),fe(1,zte,2,2,"mat-hint",32),Wt(2,7),Pe(3,"div",33),Wt(4,8),j()),2&i){const e=he();U("@transitionMessages",e._subscriptAnimationState),G(1),U("ngIf",e.hintLabel)}}const Gte=["*",[["mat-label"]],[["","matPrefix",""],["","matIconPrefix",""]],[["","matTextPrefix",""]],[["","matTextSuffix",""]],[["","matSuffix",""],["","matIconSuffix",""]],[["mat-error"],["","matError",""]],[["mat-hint",3,"align","end"]],[["mat-hint","align","end"]]],$te=["*","mat-label","[matPrefix], [matIconPrefix]","[matTextPrefix]","[matTextSuffix]","[matSuffix], [matIconSuffix]","mat-error, [matError]","mat-hint:not([align='end'])","mat-hint[align='end']"];let Ro=(()=>{class i{}return i.\u0275fac=function(e){return new(e||i)},i.\u0275dir=ve({type:i,selectors:[["mat-label"]]}),i})(),Wte=0;const nH=new me("MatError");let jte=(()=>{class i{constructor(e,n){this.id="mat-mdc-error-"+Wte++,e||n.nativeElement.setAttribute("aria-live","polite")}}return i.\u0275fac=function(e){return new(e||i)(xa("aria-live"),E(gt))},i.\u0275dir=ve({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&&Yl("id",n.id)},inputs:{id:"id"},features:[Dn([{provide:nH,useExisting:i}])]}),i})(),Yte=0,iH=(()=>{class i{constructor(){this.align="start",this.id="mat-mdc-hint-"+Yte++}}return i.\u0275fac=function(e){return new(e||i)},i.\u0275dir=ve({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&&(Yl("id",n.id),Dt("align",null),un("mat-mdc-form-field-hint-end","end"===n.align))},inputs:{align:"align",id:"id"}}),i})();const rH=new me("MatPrefix");let qte=(()=>{class i{constructor(){this._isText=!1}set _isTextSelector(e){this._isText=!0}}return i.\u0275fac=function(e){return new(e||i)},i.\u0275dir=ve({type:i,selectors:[["","matPrefix",""],["","matIconPrefix",""],["","matTextPrefix",""]],inputs:{_isTextSelector:["matTextPrefix","_isTextSelector"]},features:[Dn([{provide:rH,useExisting:i}])]}),i})();const sH=new me("MatSuffix");let Xte=(()=>{class i{constructor(){this._isText=!1}set _isTextSelector(e){this._isText=!0}}return i.\u0275fac=function(e){return new(e||i)},i.\u0275dir=ve({type:i,selectors:[["","matSuffix",""],["","matIconSuffix",""],["","matTextSuffix",""]],inputs:{_isTextSelector:["matTextSuffix","_isTextSelector"]},features:[Dn([{provide:sH,useExisting:i}])]}),i})(),oH=(()=>{class i{constructor(e){this._elementRef=e,this.floating=!1}getWidth(){return function Kte(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)(E(gt))},i.\u0275dir=ve({type:i,selectors:[["label","matFormFieldFloatingLabel",""]],hostAttrs:[1,"mdc-floating-label","mat-mdc-floating-label"],hostVars:2,hostBindings:function(e,n){2&e&&un("mdc-floating-label--float-above",n.floating)},inputs:{floating:"floating"}}),i})();const aH="mdc-line-ripple--active",pC="mdc-line-ripple--deactivating";let lH=(()=>{class i{constructor(e,n){this._elementRef=e,this._handleTransitionEnd=r=>{const s=this._elementRef.nativeElement.classList,o=s.contains(pC);"opacity"===r.propertyName&&o&&s.remove(aH,pC)},n.runOutsideAngular(()=>{e.nativeElement.addEventListener("transitionend",this._handleTransitionEnd)})}activate(){const e=this._elementRef.nativeElement.classList;e.remove(pC),e.add(aH)}deactivate(){this._elementRef.nativeElement.classList.add(pC)}ngOnDestroy(){this._elementRef.nativeElement.removeEventListener("transitionend",this._handleTransitionEnd)}}return i.\u0275fac=function(e){return new(e||i)(E(gt),E(pt))},i.\u0275dir=ve({type:i,selectors:[["div","matFormFieldLineRipple",""]],hostAttrs:[1,"mdc-line-ripple"]}),i})(),cH=(()=>{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)(E(gt),E(pt))},i.\u0275cmp=ot({type:i,selectors:[["div","matFormFieldNotchedOutline",""]],hostAttrs:[1,"mdc-notched-outline"],hostVars:2,hostBindings:function(e,n){2&e&&un("mdc-notched-outline--notched",n.open)},inputs:{labelWidth:["matFormFieldNotchedOutlineLabelWidth","labelWidth"],open:["matFormFieldNotchedOutlineOpen","open"]},attrs:xte,ngContentSelectors:wte,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&&(or(),Pe(0,"div",0),W(1,"div",1),Wt(2),j(),Pe(3,"div",2)),2&e&&(G(1),qo("width",n._getNotchWidth()))},encapsulation:2,changeDetection:0}),i})();const Zte={transitionMessages:ka("transitionMessages",[Os("enter",si({opacity:1,transform:"translateY(0%)"})),Or("void => enter",[si({opacity:0,transform:"translateY(-5px)"}),Yr("300ms cubic-bezier(0.55, 0, 0.55, 0.2)")])])};let UR=(()=>{class i{}return i.\u0275fac=function(e){return new(e||i)},i.\u0275dir=ve({type:i}),i})();const mC=new me("MatFormField"),Qte=new me("MAT_FORM_FIELD_DEFAULT_OPTIONS");let dH=0,vl=(()=>{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-"+dH++,this._hintLabelId="mat-mdc-hint-"+dH++,this._subscriptAnimationState="",this._labelWidth=0,this._destroyed=new Re,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(Ve(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(),Cr(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(Ve(this._destroyed)).subscribe(()=>{this._needsOutlineLabelOffsetUpdateOnStable&&(this._needsOutlineLabelOffsetUpdateOnStable=!1,this._updateOutlineLabelOffset())})}),this._dir.change.pipe(Ve(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)(E(gt),E(Zn),E(pt),E(Ra),E(zi),E(Qte,8),E(kr,8),E(jt))},i.\u0275cmp=ot({type:i,selectors:[["mat-form-field"]],contentQueries:function(e,n,r){if(1&e&&(Wi(r,Ro,5),Wi(r,Ro,7),Wi(r,UR,5),Wi(r,rH,5),Wi(r,sH,5),Wi(r,nH,5),Wi(r,iH,5)),2&e){let s;Et(s=At())&&(n._labelChildNonStatic=s.first),Et(s=At())&&(n._labelChildStatic=s.first),Et(s=At())&&(n._formFieldControl=s.first),Et(s=At())&&(n._prefixChildren=s),Et(s=At())&&(n._suffixChildren=s),Et(s=At())&&(n._errorChildren=s),Et(s=At())&&(n._hintChildren=s)}},viewQuery:function(e,n){if(1&e&&(Wn(Mte,5),Wn(Cte,5),Wn(Ste,5),Wn(oH,5),Wn(cH,5),Wn(lH,5)),2&e){let r;Et(r=At())&&(n._textField=r.first),Et(r=At())&&(n._iconPrefixContainer=r.first),Et(r=At())&&(n._textPrefixContainer=r.first),Et(r=At())&&(n._floatingLabel=r.first),Et(r=At())&&(n._notchedOutline=r.first),Et(r=At())&&(n._lineRipple=r.first)}},hostAttrs:[1,"mat-mdc-form-field"],hostVars:42,hostBindings:function(e,n){2&e&&un("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:[Dn([{provide:mC,useExisting:i}])],ngContentSelectors:$te,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&&(or(Gte),fe(0,Dte,1,1,"ng-template",null,0,zc),W(2,"div",1,2),Le("click",function(s){return n._control.onContainerClick&&n._control.onContainerClick(s)}),fe(4,Tte,1,0,"div",3),W(5,"div",4),fe(6,kte,2,3,"div",5),fe(7,Pte,3,0,"div",6),fe(8,Ote,3,0,"div",7),W(9,"div",8),fe(10,Lte,1,1,"ng-template",9),Wt(11),j(),fe(12,Nte,2,0,"div",10),fe(13,Bte,2,0,"div",11),j(),fe(14,Ute,1,0,"div",12),j(),W(15,"div",13),fe(16,Vte,2,1,"div",14),fe(17,Hte,5,2,"div",15),j()),2&e&&(G(2),un("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),G(2),U("ngIf",!n._hasOutline()&&!n._control.disabled),G(2),U("ngIf",n._hasOutline()),G(1),U("ngIf",n._hasIconPrefix),G(1),U("ngIf",n._hasTextPrefix),G(2),U("ngIf",!n._hasOutline()||n._forceDisplayInfixLabel()),G(2),U("ngIf",n._hasTextSuffix),G(1),U("ngIf",n._hasIconSuffix),G(1),U("ngIf",!n._hasOutline()),G(1),un("mat-mdc-form-field-subscript-dynamic-size","dynamic"===n.subscriptSizing),U("ngSwitch",n._getDisplayedMessages()),G(1),U("ngSwitchCase","error"),G(1),U("ngSwitchCase","hint"))},dependencies:[vi,xy,by,VT,CU,iH,oH,cH,lH],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:[Zte.transitionMessages]},changeDetection:0}),i})(),gC=(()=>{class i{}return i.\u0275fac=function(e){return new(e||i)},i.\u0275mod=nn({type:i}),i.\u0275inj=Kt({imports:[Qn,Ao,HI,Qn]}),i})();const fH=Oh({passive:!0});let tne=(()=>{class i{constructor(e,n){this._platform=e,this._ngZone=n,this._monitoredElements=new Map}monitor(e){if(!this._platform.isBrowser)return mo;const n=qc(e),r=this._monitoredElements.get(n);if(r)return r.subject;const s=new Re,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,fH),n.classList.add("cdk-text-field-autofill-monitored")}),this._monitoredElements.set(n,{subject:s,unlisten:()=>{n.removeEventListener("animationstart",a,fH)}}),s}stopMonitoring(e){const n=qc(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)(ee(zi),ee(pt))},i.\u0275prov=ke({token:i,factory:i.\u0275fac,providedIn:"root"}),i})(),nne=(()=>{class i{}return i.\u0275fac=function(e){return new(e||i)},i.\u0275mod=nn({type:i}),i.\u0275inj=Kt({}),i})();const VR=new me("MAT_INPUT_VALUE_ACCESSOR"),ine=["button","checkbox","file","hidden","image","radio","range","reset","submit"];let rne=0;const sne=$U(class{constructor(i,t,e,n){this._defaultErrorStateMatcher=i,this._parentForm=t,this._parentFormGroup=e,this.ngControl=n,this.stateChanges=new Re}});let rc=(()=>{class i extends sne{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(_l.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&&oU().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,d,h){super(a,s,o,r),this._elementRef=e,this._platform=n,this._autofillMonitor=c,this._formField=h,this._uid="mat-input-"+rne++,this.focused=!1,this.stateChanges=new Re,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=>oU().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&&d.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(){ine.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)(E(gt),E(zi),E(tc,10),E(ub,8),E(Gh,8),E(jU),E(VR,10),E(tne),E(pt),E(mC,8))},i.\u0275dir=ve({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&&Le("focus",function(){return n._focusChanged(!0)})("blur",function(){return n._focusChanged(!1)})("input",function(){return n._onInput()}),2&e&&(Yl("id",n.id)("disabled",n.disabled)("required",n.required),Dt("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),un("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:[Dn([{provide:UR,useExisting:i}]),lt,xi]}),i})(),pH=(()=>{class i{}return i.\u0275fac=function(e){return new(e||i)},i.\u0275mod=nn({type:i}),i.\u0275inj=Kt({imports:[Qn,gC,gC,nne,Qn]}),i})();function one(i,t){if(1&i&&(W(0,"mat-label"),ze(1),j()),2&i){const e=he(2);G(1),_i(e.resource.name)}}function ane(i,t){if(1&i){const e=ai();W(0,"mat-form-field",1),fe(1,one,2,1,"mat-label",2),W(2,"input",3),Le("ngModelChange",function(r){return rn(e),Ut(he().resource.data=r)})("change",function(){return rn(e),Ut(he().changed.emit())}),j()()}if(2&i){const e=he();U("matTooltip",e.resourceDescription),G(1),U("ngIf",e.resource.name),G(1),U("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 lne=(()=>{class i{constructor(){this.resource=null,this.resourceDescription="",this.disabled=!1,this.changed=new $e}}return i.\u0275fac=function(e){return new(e||i)},i.\u0275cmp=ot({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&&fe(0,ane,3,7,"mat-form-field",0),2&e&&U("ngIf",n.resource)},dependencies:[vi,gl,mu,nc,_u,gu,Zc,vl,Ro,rc,Fs],changeDetection:0}),i})();function cne(i,t){if(1&i&&(W(0,"mat-label"),ze(1),j()),2&i){const e=he(2);G(1),_i(e.resource.name)}}function dne(i,t){if(1&i){const e=ai();W(0,"mat-form-field",1),fe(1,cne,2,1,"mat-label",2),W(2,"input",3),Le("ngModelChange",function(r){return rn(e),Ut(he().resource.data=r)})("change",function(){return rn(e),Ut(he().changed.emit())}),j()()}if(2&i){const e=he();U("matTooltip",e.resourceDescription),G(1),U("ngIf",e.resource.name),G(1),U("disabled",e.disabled||void 0!==e.resource.schema.required_value)("maxlength",e.maxLength)("minlength",e.minLength)("ngModel",e.resource.data)}}let mH=(()=>{class i{constructor(){this._resource=null,this.resourceDescription="",this.disabled=!1,this.changed=new $e,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=ot({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&&fe(0,dne,3,6,"mat-form-field",0),2&e&&U("ngIf",n.resource)},dependencies:[vi,gl,nc,NR,BR,Zc,vl,Ro,rc,Fs],changeDetection:0}),i})();const sc=(i,t)=>i+(i.includes("__")?"/":"__")+t,Wh=function(){return[]};function une(i,t){if(1&i&&(W(0,"mat-panel-description"),ze(1," Click to view items ("),W(2,"b"),ze(3),j(),ze(4,") "),j()),2&i){const e=he(2);G(3),_i((e.resourceData||Rs(1,Wh)).length)}}function hne(i,t){1&i&&(W(0,"mat-panel-description"),ze(1," Empty array "),j())}function fne(i,t){}function pne(i,t){if(1&i){const e=ai();W(0,"mat-expansion-panel",4),Le("opened",function(){return rn(e),Ut(he().onContentsTrigger(!0))})("closed",function(){return rn(e),Ut(he().onContentsTrigger(!1))}),W(1,"mat-expansion-panel-header",5)(2,"mat-panel-title"),ze(3),j(),fe(4,une,5,2,"mat-panel-description",1),fe(5,hne,2,0,"mat-panel-description",1),j(),fe(6,fne,0,0,"ng-template",6),j()}if(2&i){const e=he(),n=Zi(3);G(1),U("matTooltip",e.resourceDescription),G(2),Qi(" ",e.name," "),G(1),U("ngIf",(e.resourceData||Rs(5,Wh)).length>0),G(1),U("ngIf",0==(e.resourceData||Rs(6,Wh)).length),G(1),U("ngTemplateOutlet",n)}}function mne(i,t){}function gne(i,t){if(1&i&&($r(0),W(1,"h2",5),ze(2),j(),W(3,"div",7),fe(4,mne,0,0,"ng-template",6),j(),Wr()),2&i){const e=he(),n=Zi(3);G(1),U("matTooltip",e.resourceDescription),G(1),_i(e.name),G(2),U("ngTemplateOutlet",n)}}function _ne(i,t){}function vne(i,t){if(1&i&&Pe(0,"app-editor",10),2&i){const e=he().$implicit,n=he(3);U("resource",n.children[n.pageIndex*n.pageSize+e])("disabled",n.disabled)}}function yne(i,t){if(1&i&&($r(0),fe(1,vne,1,2,"app-editor",9),Wr()),2&i){const e=t.$implicit,n=he(3);G(1),U("ngIf",n.pageIndex*n.pageSize+e0)}let zR=(()=>{class i{constructor(e,n){this.main=e,this.cdr=n,this._resource=null,this.resourceDescription="",this.disabled=!1,this.changed=new $e,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 Re}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:sc(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(Ve(this.destroyed$),gn(([n,r])=>!!this.resource&&n.startsWith(this.resource.id)&&!n.substring(this.resource.id.length+1).includes("/"))).subscribe(function(){var n=tt(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 ut(null),this.imageUrl$=new ut(null),this.destroyed$=new Re,this.changed=new $e}set resource(e){this._resource$.next(e)}get resource(){return this._resource$.getValue()}ngAfterViewInit(){var e=this;return tt(function*(){e._resource$.pipe(Ve(e.destroyed$)).subscribe(function(){var n=tt(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)(E(Jl),E(Pa))},i.\u0275cmp=ot({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&&(Pe(0,"app-compound-block-ui",0),Ct(1,"async"),fe(2,Dne,2,3,"img",1),Ct(3,"async")),2&e&&(U("resource",Tt(1,3,n._resource$))("fieldBlacklist",Rs(7,Tne)),G(2),U("ngIf",Tt(3,5,n.imageUrl$)))},dependencies:[vi,ec,pl],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 Rne=["*"],Lne=new me("MAT_CARD_CONFIG");let gH=(()=>{class i{constructor(e){this.appearance=e?.appearance||"raised"}}return i.\u0275fac=function(e){return new(e||i)(E(Lne,8))},i.\u0275cmp=ot({type:i,selectors:[["mat-card"]],hostAttrs:[1,"mat-mdc-card","mdc-card"],hostVars:4,hostBindings:function(e,n){2&e&&un("mat-mdc-card-outlined","outlined"===n.appearance)("mdc-card--outlined","outlined"===n.appearance)},inputs:{appearance:"appearance"},exportAs:["matCard"],ngContentSelectors:Rne,decls:1,vars:0,template:function(e,n){1&e&&(or(),Wt(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})(),_H=(()=>{class i{}return i.\u0275fac=function(e){return new(e||i)},i.\u0275mod=nn({type:i}),i.\u0275inj=Kt({imports:[Qn,Ao,Qn]}),i})();class HR{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 Re,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 GR=(()=>{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=ke({token:i,factory:i.\u0275fac,providedIn:"root"}),i})(),aie=(()=>{class i{}return i.\u0275fac=function(e){return new(e||i)},i.\u0275mod=nn({type:i}),i.\u0275inj=Kt({imports:[Qn,Ao,eb,Qn]}),i})();const MH={transformPanel:ka("transformPanel",[Or("void => enter-dropdown",Yr("120ms cubic-bezier(0, 0, 0.2, 1)",rV([si({opacity:0,transform:"scale(1, 0.8)"}),si({opacity:1,transform:"scale(1, 1)"})]))),Or("void => enter-dialog",Yr("150ms cubic-bezier(0, 0, 0.2, 1)",rV([si({opacity:0,transform:"scale(0.7)"}),si({transform:"none",opacity:1})]))),Or("* => void",Yr("100ms linear",si({opacity:0})))]),fadeInCalendar:ka("fadeInCalendar",[Os("void",si({opacity:0})),Os("enter",si({opacity:1})),Or("void => *",Yr("120ms 100ms cubic-bezier(0.55, 0, 0.55, 0.2)"))])},EH=function(i){return{active:i}};function Sie(i,t){if(1&i){const e=ai();W(0,"button",2),Le("click",function(){const s=rn(e).$implicit;return Ut(he().select(s))}),j()}if(2&i){const e=t.$implicit,n=he();qo("background-color",e),U("ngClass",sm(3,EH,n.selectedColor===e))}}function Eie(i,t){if(1&i){const e=ai();W(0,"button",2),Le("click",function(){const s=rn(e).$implicit;return Ut(he().select(s))}),j()}if(2&i){const e=t.$implicit,n=he();qo("background-color",e),U("ngClass",sm(3,EH,n.selectedColor===e))}}const Aie=["button"],Die=/^\s+/,Tie=/\s+$/,$m=Math.round,Iie=(Math,Math,Math,/[^0-9]/g),AH=["#ffffff","#ffff00","#ff00ff","#ff0000","#c0c0c0","#808080","#808000","#800080","#800000","#00ffff","#00ff00","#008080","#008000","#0000ff","#000080","#000000"];function DH(i,t,e){const n=i.getImageData(t,e,1,1).data;return{r:n[0],g:n[1],b:n[2]}}function jh(i){return 1==i.length?"0"+i:""+i}function kie(i){return Math.round(255*parseFloat(i)).toString(16)}function TH(i){return Qo(i)/255}function Qo(i){return parseInt(i,16)}function IH(i,t,e,n){var r=[jh($m(i).toString(16)),jh($m(t).toString(16)),jh($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 vu="(?:[-\\+]?\\d*\\.\\d+%?)|(?:[-\\+]?\\d+%?)",jR="[\\s|\\(]+("+vu+")[,|\\s]+("+vu+")[,|\\s]+("+vu+")\\s*\\)?",YR="[\\s|\\(]+("+vu+")[,|\\s]+("+vu+")[,|\\s]+("+vu+")[,|\\s]+("+vu+")\\s*\\)?",Yh={CSS_UNIT:new RegExp(vu),rgb:new RegExp("rgb"+jR),rgba:new RegExp("rgba"+YR),hsl:new RegExp("hsl"+jR),hsla:new RegExp("hsla"+YR),hsv:new RegExp("hsv"+jR),hsva:new RegExp("hsva"+YR),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 qR(i){let t;return i=i.replace(Die,"").replace(Tie,"").toLowerCase(),(t=Yh.rgb.exec(i))?{r:t[1],g:t[2],b:t[3],a:1}:(t=Yh.rgba.exec(i))?{r:t[1],g:t[2],b:t[3],a:t[4]}:(t=Yh.hex8.exec(i))?{r:Qo(t[1]),g:Qo(t[2]),b:Qo(t[3]),a:TH(t[4])}:(t=Yh.hex6.exec(i))?{r:Qo(t[1]),g:Qo(t[2]),b:Qo(t[3]),a:1}:(t=Yh.hex4.exec(i))?{r:Qo(t[1]+""+t[1]),g:Qo(t[2]+""+t[2]),b:Qo(t[3]+""+t[3]),a:TH(t[4]+""+t[4])}:(t=Yh.hex3.exec(i))?{r:Qo(t[1]+""+t[1]),g:Qo(t[2]+""+t[2]),b:Qo(t[3]+""+t[3]),a:1}:null}class qh{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=IH(this.r,this.g,this.b),this.rgba=this.toRgba()}toHex(t){return IH(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 Rie(i,t,e,n,r){var s=[jh($m(i).toString(16)),jh($m(t).toString(16)),jh($m(e).toString(16)),jh(kie(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 RH=(()=>{class i{constructor(e,n){this.zone=e,this.colorChanged=new $e,this.x=0,this.y=0,this.drag=!1,this._destroyed=new Re,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){wo()},i.\u0275dir=ve({type:i,inputs:{color:"color"},outputs:{colorChanged:"colorChanged"}}),i})(),Fie=(()=>{class i extends RH{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}=DH(this.ctx,e.offsetX,e.offsetY);this.emitChange(new qh(n,r,s))}}return i.\u0275fac=function(e){return new(e||i)(E(pt))},i.\u0275cmp=ot({type:i,selectors:[["ngx-mat-color-slider"]],features:[lt],decls:1,vars:0,consts:[["id","color-strip","width","15","height","234",1,"zone-strip",3,"mousedown","mouseup"]],template:function(e,n){1&e&&(W(0,"canvas",0),Le("mousedown",function(s){return n.onMousedown(s)})("mouseup",function(s){return n.onMouseup(s)}),j())}}),i})(),Lie=(()=>{class i{constructor(){}onInput(e){this._formatInput(e.target)}_formatInput(e){let n=Number(e.value.replace(Iie,""));n=isNaN(n)?0:n,e.value=n}}return i.\u0275fac=function(e){return new(e||i)},i.\u0275dir=ve({type:i,selectors:[["","ngxMatNumericColorInput",""]],hostBindings:function(e,n){1&e&&Le("input",function(s){return n.onInput(s)})}}),i})(),Bie=(()=>{class i extends RH{constructor(e){super(e,"color-block"),this.zone=e,this._resetBaseColor=!0,this.formGroup=new Hm({r:new ic(null,[_l.required]),g:new ic(null,[_l.required]),b:new ic(null,[_l.required]),a:new ic(null,[_l.required]),hex:new ic(null,[_l.required,_l.pattern(Yh.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(){Cr(this.rCtrl.valueChanges,this.gCtrl.valueChanges,this.bCtrl.valueChanges,this.aCtrl.valueChanges).pipe(Ve(this._destroyed),ml(400)).subscribe(r=>{const s=new qh(Number(this.rCtrl.value),Number(this.gCtrl.value),Number(this.bCtrl.value),Number(this.aCtrl.value));this.emitChange(s)}),this.hexCtrl.valueChanges.pipe(Ve(this._destroyed),ml(400),Ql()).subscribe(r=>{const s=qR(r);if(null!=s){const o=new qh(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}=DH(this.ctx,e.offsetX,e.offsetY);this.emitChange(new qh(n,r,s))}}return i.\u0275fac=function(e){return new(e||i)(E(pt))},i.\u0275cmp=ot({type:i,selectors:[["ngx-mat-color-canvas"]],hostAttrs:[1,"ngx-mat-color-canvas"],features:[lt,xi],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&&(W(0,"form",0)(1,"div",1)(2,"div",2)(3,"canvas",3),Le("mousedown",function(s){return n.onMousedown(s)})("mouseup",function(s){return n.onMouseup(s)}),j(),W(4,"ngx-mat-color-slider",4),Le("colorChanged",function(s){return n.onSliderColorChanged(s)}),j()(),W(5,"div",5)(6,"mat-form-field")(7,"mat-label"),ze(8,"R"),j(),Pe(9,"input",6),j(),W(10,"mat-form-field")(11,"mat-label"),ze(12,"G"),j(),Pe(13,"input",7),j(),W(14,"mat-form-field")(15,"mat-label"),ze(16,"B"),j(),Pe(17,"input",8),j()()(),W(18,"div",1),Pe(19,"button",9),W(20,"mat-form-field")(21,"mat-label"),ze(22,"HEX6"),j(),W(23,"mat-label",10),ze(24,"#\xa0"),j(),Pe(25,"input",11),j(),W(26,"mat-form-field",12)(27,"mat-label"),ze(28,"A"),j(),Pe(29,"input",13),j()()()),2&e&&(U("formGroup",n.formGroup),G(19),qo("background-color",(null==n.color?null:n.color.rgba)||"transparent"))},dependencies:[rc,vl,Ro,qte,MV,IR,gl,mu,nc,bR,_u,gu,Gh,fC,Fie,Lie],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})(),Uie=(()=>{class i{constructor(){this.colorChanged=new $e,this.colors1=AH.slice(0,8),this.colors2=AH.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}=qR(e);this.colorChanged.emit(new qh(n,r,s,o))}}return i.\u0275fac=function(e){return new(e||i)},i.\u0275cmp=ot({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&&(W(0,"div",0),fe(1,Sie,1,5,"button",1),j(),W(2,"div",0),fe(3,Eie,1,5,"button",1),j()),2&e&&(G(1),U("ngForOf",n.colors1),G(2),U("ngForOf",n.colors2))},dependencies:[hm,Eo,MV],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})(),kH=(()=>{class i{constructor(){this.colorChanged=new $e}ngOnInit(){}handleColorChanged(e){this.colorChanged.emit(e)}}return i.\u0275fac=function(e){return new(e||i)},i.\u0275cmp=ot({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&&(W(0,"ngx-mat-color-canvas",0),Le("colorChanged",function(s){return n.handleColorChanged(s)}),j(),W(1,"ngx-mat-color-collection",0),Le("colorChanged",function(s){return n.handleColorChanged(s)}),j()),2&e&&(U("color",n.color),G(1),U("color",n.color))},dependencies:[Bie,Uie],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})(),XR=(()=>{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=qR(e);return n?new qh(n.r,n.g,n.b,n.a):null}}return i.\u0275fac=function(e){return new(e||i)},i.\u0275prov=ke({token:i,factory:i.\u0275fac}),i})();const Vie={display:{colorInput:"hex"}},PH=new me("mat-color-formats"),OH=new me("ngx-mat-colorpicker-scroll-strategy"),Hie={provide:OH,deps:[as],useFactory:function zie(i){return()=>i.scrollStrategies.reposition()}},Gie=Qy(class{constructor(i){this._elementRef=i}});let FH=(()=>{class i extends Gie{constructor(e){super(e)}}return i.\u0275fac=function(e){return new(e||i)(E(gt))},i.\u0275cmp=ot({type:i,selectors:[["ngx-mat-color-picker-content"]],viewQuery:function(e,n){if(1&e&&Wn(kH,5),2&e){let r;Et(r=At())&&(n._palette=r.first)}},hostAttrs:[1,"ngx-mat-colorpicker-content"],hostVars:3,hostBindings:function(e,n){2&e&&(Iw("@transformPanel","enter"),un("ngx-mat-colorpicker-content-touch",n.picker.touchUi))},inputs:{color:"color"},exportAs:["ngxMatColorPickerContent"],features:[lt],decls:1,vars:1,consts:[[3,"color","colorChanged"]],template:function(e,n){1&e&&(W(0,"ngx-mat-color-palette",0),Le("colorChanged",function(s){return n.picker.select(s)}),j()),2&e&&U("color",n.picker._selected)},dependencies:[kH],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:[MH.transformPanel,MH.fadeInCalendar]},changeDetection:0}),i})(),LH=(()=>{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 $e,this.closedStream=new $e,this._touchUi=!1,this._opened=!1,this._defaultColor="primary",this._validSelected=null,this._disabledChange=new Re,this._focusedElementBeforeOpen=null,this._inputSubscription=Zt.EMPTY,this._selectedChanged=new Re,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(FH,{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 Lh(FH,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(Oi(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"),Cr(this._popupRef.backdropClick(),this._popupRef.detachments(),this._popupRef.keydownEvents().pipe(gn(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)(E(Bm),E(as),E(pt),E(XR),E(Ra,8),E(OH),E(jt,8),E(jr))},i.\u0275cmp=ot({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 yC{constructor(t,e){this.target=t,this.targetElement=e,this.value=this.target.value}}const $ie={provide:Io,useExisting:Gn(()=>bC),multi:!0},Wie={provide:qr,useExisting:Gn(()=>bC),multi:!0};let bC=(()=>{class i{constructor(e,n,r,s){if(this._elementRef=e,this._formField=n,this._colorFormats=r,this._adapter=s,this.colorChange=new $e,this.colorInput=new $e,this._disabledChange=new $e,this._valueChange=new $e,this._onTouched=()=>{},this._cvaOnChange=()=>{},this._validatorOnChange=()=>{},this._pickerSubscription=Zt.EMPTY,this._validator=_l.compose([]),this._lastValueValid=!1,!this._colorFormats)throw function Oie(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 yC(this,this._elementRef.nativeElement)),this.colorChange.emit(new yC(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 yC(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 yC(this,this._elementRef.nativeElement)))}}return i.\u0275fac=function(e){return new(e||i)(E(gt),E(vl,8),E(PH,8),E(XR))},i.\u0275dir=ve({type:i,selectors:[["input","ngxMatColorPicker",""]],hostVars:3,hostBindings:function(e,n){1&e&&Le("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&&(Yl("disabled",n.disabled),Dt("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:[Dn([$ie,Wie,{provide:VR,useExisting:i}])]}),i})(),jie=(()=>{class i{constructor(e){this._cd=e,this._stateChanges=Zt.EMPTY}get disabled(){if(null==this._disabled&&this.picker)return this.picker.disabled}set disabled(e){this._disabled=e}ngOnInit(){}ngOnChanges(e){e.picker&&this._watchStateChanges()}ngOnDestroy(){this._stateChanges.unsubscribe()}ngAfterContentInit(){this._watchStateChanges()}open(e){this.picker&&!this.disabled&&(this.picker.open(),e.stopPropagation())}_watchStateChanges(){const e=this.picker?this.picker._disabledChange:ft(),n=this.picker&&this.picker._pickerInput?this.picker._pickerInput._disabledChange:ft(),r=this.picker?Cr(this.picker.openedStream,this.picker.closedStream):ft();this._stateChanges.unsubscribe(),this._stateChanges=Cr(e,n,r).subscribe(()=>this._cd.markForCheck())}}return i.\u0275fac=function(e){return new(e||i)(E(Zn))},i.\u0275cmp=ot({type:i,selectors:[["ngx-mat-color-toggle"]],viewQuery:function(e,n){if(1&e&&Wn(Aie,5),2&e){let r;Et(r=At())&&(n._button=r.first)}},hostAttrs:[1,"ngx-mat-color-toggle"],hostVars:7,hostBindings:function(e,n){1&e&&Le("focus",function(){return n._button.focus()}),2&e&&(Dt("tabindex",-1),un("ngx-mat-color-toggle-active",n.picker&&n.picker.opened)("mat-accent",n.picker&&"accent"===n.picker.color)("mat-warn",n.picker&&"warn"===n.picker.color))},inputs:{picker:["for","picker"],tabIndex:"tabIndex",disabled:"disabled"},exportAs:["ngxMatColorPickerToggle"],features:[xi],decls:4,vars:5,consts:[["mat-icon-button","","type","button",3,"disabled","click"],["button",""]],template:function(e,n){1&e&&(W(0,"button",0,1),Le("click",function(s){return n.open(s)}),W(2,"mat-icon"),ze(3,"palette"),j()()),2&e&&(U("disabled",n.disabled),Dt("aria-haspopup",n.picker?"dialog":null)("tabindex",n.disabled?-1:n.tabIndex),G(2),qo("color",null==n.picker||null==n.picker._selected?null:n.picker._selected.rgba))},dependencies:[XM,gR],styles:[".mat-form-field-appearance .mat-form-field-prefix .ngx-mat-color-toggle-default-icon,.mat-form-field-appearance .mat-form-field-suffix .ngx-mat-color-toggle-default-icon{width:1em}.mat-form-field:not(.mat-form-field-appearance) .mat-form-field-prefix .ngx-mat-color-toggle-default-icon,.mat-form-field:not(.mat-form-field-appearance) .mat-form-field-suffix .ngx-mat-color-toggle-default-icon{display:block;width:1.5em;height:1.5em}.mat-form-field:not(.mat-form-field-appearance) .mat-form-field-prefix .mat-icon-button .ngx-mat-color-toggle-default-icon,.mat-form-field:not(.mat-form-field-appearance) .mat-form-field-suffix .mat-icon-button .ngx-mat-color-toggle-default-icon{margin:auto}\n"],encapsulation:2}),i})(),Yie=(()=>{class i{}return i.\u0275fac=function(e){return new(e||i)},i.\u0275mod=nn({type:i}),i.\u0275inj=Kt({providers:[XR,Hie],imports:[Ao,pH,KM,_H,aie,eH,tH,_V,Nh,ez]}),i})();const qie=["picker"],Xie=function(i){return{"background-color":i}};function Kie(i,t){if(1&i){const e=ai();W(0,"div",5),Le("click",function(r){const o=rn(e).index;return Ut(he().onColorClicked(r.currentTarget,o))}),j()}if(2&i){const e=t.$implicit,n=t.index,r=he();U("ngStyle",sm(2,Xie,"#"+r.lpad(e.toString(16),"0",8)))("matTooltip",n+": #"+e.toString(16))}}const Zie=function(){return["colors"]};let Qie=(()=>{class i{constructor(){this.resource=null,this.changed=new $e,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 yU;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=ot({type:i,selectors:[["app-palette-block-ui"]],viewQuery:function(e,n){if(1&e&&Wn(qie,5),2&e){let r;Et(r=At())&&(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&&(Pe(0,"app-compound-block-ui",0),W(1,"div",1),fe(2,Kie,1,4,"div",2),j(),W(3,"input",3),Le("colorChange",function(s){return n.onColorChange(s.value)}),j(),Pe(4,"ngx-mat-color-picker",null,4)),2&e){const r=Zi(5);U("resource",n.resource)("fieldBlacklist",Rs(4,Zie)),G(2),U("ngForOf",null==n.resourceData?null:n.resourceData.colors),G(1),U("ngxMatColorPicker",r)}},dependencies:[Eo,tM,rc,Fs,bC,LH,ec],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 Jie=["editor"];let ere=(()=>{class i{constructor(e){this.cdr=e,this._resource=null,this.resourceDescription="",this.disabled=!1,this.changed=new $e,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)(E(Zn))},i.\u0275cmp=ot({type:i,selectors:[["app-binary-block-ui"]],viewQuery:function(e,n){if(1&e&&Wn(Jie,5),2&e){let r;Et(r=At())&&(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&&(W(0,"h2",0),ze(1),j(),Pe(2,"div",null,1)),2&e&&(U("matTooltip",n.resourceDescription),G(1),_i(null==n.resource?null:n.resource.name))},dependencies:[Fs],changeDetection:0}),i})();const tre=["picker"];function nre(i,t){if(1&i&&(W(0,"mat-label",8),ze(1),j()),2&i){const e=he();G(1),_i(null==e.resource?null:e.resource.name)}}const ire=function(i){return{transform:i}};let rre=(()=>{class i{constructor(e){this.cdr=e,this.resource=null,this.resourceDescription="",this.changed=new $e,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)(E(Zn))},i.\u0275cmp=ot({type:i,selectors:[["app-angle-block-ui"]],viewQuery:function(e,n){if(1&e&&Wn(tre,5),2&e){let r;Et(r=At())&&(n.picker=r.first)}},hostBindings:function(e,n){1&e&&Le("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&&(W(0,"div",0)(1,"div",1,2)(3,"div",3),Pe(4,"div",4)(5,"div",5),j()(),W(6,"div",6),fe(7,nre,2,1,"mat-label",7),W(8,"mat-label"),ze(9),Ct(10,"number"),j(),W(11,"mat-label"),ze(12),Ct(13,"number"),j()()()),2&e&&(U("matTooltip",n.resourceDescription),G(3),U("ngStyle",sm(11,ire,"rotate("+((null==n.resource?null:n.resource.data)||0)+"rad)")),G(4),U("ngIf",null==n.resource?null:n.resource.name),G(2),Qi("",J1(10,5,180*(null==n.resource?null:n.resource.data)/n.pi||0,"1.2-2")," deg"),G(3),Qi("",J1(13,8,(null==n.resource?null:n.resource.data)||0,"1.2-2")," rad"))},dependencies:[vi,tM,Ro,Fs,uB],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 NH{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,d=new Set;for(const h of e)!0===Array.isArray(h)?a.add(h):"object"==typeof h?l.add(h):"function"==typeof h?d.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===d.size){h=!0;for(const p of o)if(!1===d.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 sre(i,t){if(1&i&&(W(0,"mat-list-option",3),ze(1),j()),2&i){const e=t.$implicit,n=he();U("value",e)("selected",n.selectedValue==e),G(1),Qi(" ",e," ")}}function ore(i,t){if(1&i&&(W(0,"mat-card"),Pe(1,"app-editor",4),j()),2&i){const e=he();G(1),U("resource",e.resources[e.selectedValue])}}let xC=(()=>{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)(E(NH))},i.\u0275cmp=ot({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&&(W(0,"mat-selection-list",0),Le("selectionChange",function(s){return n.selectedValue=s.source.selectedOptions.selected[0].value}),fe(1,sre,2,3,"mat-list-option",1),j(),fe(2,ore,2,1,"mat-card",2)),2&e&&(U("multiple",!1),G(1),U("ngForOf",n.keys),G(1),U("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})(),are=(()=>{class i{constructor(){this._resource=null,this.resourceMap={},this.changed=new $e}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",iR("@transformPanel",[nR()],{optional:!0}))]),transformPanel:ka("transformPanel",[Os("void",si({opacity:0,transform:"scale(1, 0.8)"})),Or("void => showing",Yr("120ms cubic-bezier(0, 0, 0.2, 1)",si({opacity:1,transform:"scale(1, 1)"}))),Or("* => void",Yr("100ms linear",si({opacity:0})))])};let BH=0;const UH=new me("mat-select-scroll-strategy"),yre=new me("MAT_SELECT_CONFIG"),bre={provide:UH,deps:[as],useFactory:function vre(i){return()=>i.scrollStrategies.reposition()}},xre=new me("MatSelectTrigger");class wre{constructor(t,e){this.source=t,this.value=e}}const Mre=YM(JI(jM($U(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 Re}}))));let Cre=(()=>{class i extends Mre{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(_l.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=Ps(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,d,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=d,this._liveAnnouncer=g,this._defaultOptions=b,this._panelOpen=!1,this._compareWith=(v,y)=>v===y,this._uid="mat-select-"+BH++,this._triggerAriaLabelledBy=null,this._destroy=new Re,this._onChange=()=>{},this._onTouched=()=>{},this._valueId="mat-select-value-"+BH++,this._panelDoneAnimatingStream=new Re,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=Ey(()=>{const v=this.options;return v?v.changes.pipe(Do(v),ks(()=>Cr(...v.map(y=>y.onSelectionChange)))):this._ngZone.onStable.pipe(Oi(1),ks(()=>this.optionSelectionChanges))}),this.openedChange=new $e,this._openedStream=this.openedChange.pipe(gn(v=>v),et(()=>{})),this._closedStream=this.openedChange.pipe(gn(v=>!v),et(()=>{})),this.selectionChange=new $e,this.valueChange=new $e,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 HR(this.multiple),this.stateChanges.next(),this._panelDoneAnimatingStream.pipe(Ql(),Ve(this._destroy)).subscribe(()=>this._panelDoneAnimating(this.panelOpen))}ngAfterContentInit(){this._initKeyManager(),this._selectionModel.changed.pipe(Ve(this._destroy)).subscribe(e=>{e.added.forEach(n=>n.select()),e.removed.forEach(n=>n.deselect())}),this.options.changes.pipe(Do(null),Ve(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&&!Zo(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||Zo(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(Oi(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 GZ(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=Cr(this.options.changes,this._destroy);this.optionSelectionChanges.pipe(Ve(e)).subscribe(n=>{this._onSelect(n.source,n.isUserInput),n.isUserInput&&!this.multiple&&this._panelOpen&&(this.close(),this.focus())}),Cr(...this.options.map(n=>n._stateChanges)).pipe(Ve(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)(E(LM),E(Zn),E(pt),E(jU),E(gt),E(Ra,8),E(ub,8),E(Gh,8),E(mC,8),E(tc,10),xa("tabindex"),E(UH),E(XI),E(yre,8))},i.\u0275dir=ve({type:i,viewQuery:function(e,n){if(1&e&&(Wn(lre,5),Wn(cre,5),Wn(xU,5)),2&e){let r;Et(r=At())&&(n.trigger=r.first),Et(r=At())&&(n.panel=r.first),Et(r=At())&&(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:[lt,xi]}),i})(),fb=(()=>{class i extends Cre{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(Ve(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 OQ(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 wre(this,e)}_getOverlayWidth(){return(this._preferredOverlayOrigin instanceof zI?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=ri(i)))(n||i)}}(),i.\u0275cmp=ot({type:i,selectors:[["mat-select"]],contentQueries:function(e,n,r){if(1&e&&(Wi(r,xre,5),Wi(r,Nm,5),Wi(r,eV,5)),2&e){let s;Et(s=At())&&(n.customTrigger=s.first),Et(s=At())&&(n.options=s),Et(s=At())&&(n.optionGroups=s)}},hostAttrs:["role","combobox","aria-autocomplete","none","aria-haspopup","listbox",1,"mat-mdc-select"],hostVars:19,hostBindings:function(e,n){1&e&&Le("keydown",function(s){return n._handleKeydown(s)})("focus",function(){return n._onFocus()})("blur",function(){return n._onBlur()}),2&e&&(Dt("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()),un("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:[Dn([{provide:UR,useExisting:i},{provide:JU,useExisting:i}]),lt],ngContentSelectors:gre,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&&(or(mre),W(0,"div",0,1),Le("click",function(){return n.toggle()}),W(3,"div",2),fe(4,dre,2,1,"span",3),fe(5,fre,3,2,"span",4),j(),W(6,"div",5)(7,"div",6),ki(),W(8,"svg",7),Pe(9,"path",8),j()()()(),fe(10,pre,3,9,"ng-template",9),Le("backdropClick",function(){return n.close()})("attach",function(){return n._onAttached()})("detach",function(){return n.close()})),2&e){const r=Zi(1);Dt("aria-owns",n.panelOpen?n.id+"-panel":null),G(3),U("ngSwitch",n.empty),Dt("id",n._valueId),G(1),U("ngSwitchCase",!0),G(1),U("ngSwitchCase",!1),G(5),U("cdkConnectedOverlayPanelClass",n._overlayPanelClass)("cdkConnectedOverlayScrollStrategy",n._scrollStrategy)("cdkConnectedOverlayOrigin",n._preferredOverlayOrigin||r)("cdkConnectedOverlayOpen",n.panelOpen)("cdkConnectedOverlayPositions",n._positions)("cdkConnectedOverlayWidth",n._overlayWidth)}},dependencies:[hm,by,VT,aB,xU,zI],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:[_re.transformPanel]},changeDetection:0}),i})(),VH=(()=>{class i{}return i.\u0275fac=function(e){return new(e||i)},i.\u0275mod=nn({type:i}),i.\u0275inj=Kt({providers:[bre],imports:[Ao,Pm,tR,Qn,Xy,gC,tR,Qn]}),i})();function Sre(i,t){if(1&i&&(W(0,"mat-label"),ze(1),j()),2&i){const e=he(3);G(1),_i(e.resource.name)}}function Ere(i,t){if(1&i&&(W(0,"mat-option",6),ze(1),j()),2&i){const e=t.$implicit,n=he(3);U("value",e[1])("disabled",n.disabled),G(1),Qi(" ",e[1]," ")}}function Are(i,t){if(1&i){const e=ai();W(0,"mat-form-field",3),fe(1,Sre,2,1,"mat-label",0),W(2,"mat-select",4),Le("valueChange",function(r){return rn(e),Ut(he(2).resource.data=r)})("selectionChange",function(){return rn(e),Ut(he(2).changed.emit())}),fe(3,Ere,2,3,"mat-option",5),j()()}if(2&i){const e=he(2);U("matTooltip",e.resourceDescription),G(1),U("ngIf",e.resource.name),G(1),U("value",e.resource.data)("disabled",e.disabled),G(1),U("ngForOf",e.resource.schema.enum_names)}}function Dre(i,t){if(1&i&&(W(0,"mat-label"),ze(1),j()),2&i){const e=he(3);G(1),_i(e.resource.name)}}function Tre(i,t){if(1&i){const e=ai();W(0,"mat-form-field",3),fe(1,Dre,2,1,"mat-label",0),W(2,"input",7),Le("ngModelChange",function(r){return rn(e),Ut(he(2).resource.data=r)})("change",function(){return rn(e),Ut(he(2).changed.emit())}),j()()}if(2&i){const e=he(2);U("matTooltip",e.resourceDescription),G(1),U("ngIf",e.resource.name),G(1),U("min",0)("max",256*(e.resource.schema.length||1)-1)("ngModel",e.resource.data)}}function Ire(i,t){if(1&i&&($r(0),fe(1,Are,4,5,"mat-form-field",1),fe(2,Tre,3,5,"ng-template",null,2,zc),Wr()),2&i){const e=Zi(3),n=he();G(1),U("ngIf",n.isKnownEnumValue(n.resource.data))("ngIfElse",e)}}let Rre=(()=>{class i{constructor(){this.resource=null,this.resourceDescription="",this.disabled=!1,this.changed=new $e}isKnownEnumValue(e){return!!this.resource?.schema.enum_names.find(([n,r])=>r==e)}}return i.\u0275fac=function(e){return new(e||i)},i.\u0275cmp=ot({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&&fe(0,Ire,4,2,"ng-container",0),2&e&&U("ngIf",n.resource)},dependencies:[Eo,vi,gl,mu,nc,_u,gu,Zc,vl,Ro,rc,Fs,fb,Nm],changeDetection:0}),i})();const kre=["*"],Ore=["unscopedContent"];function Fre(i,t){1&i&&Wt(0,4)}function Lre(i,t){if(1&i&&(W(0,"div",11),Pe(1,"input",12),W(2,"div",13),ki(),W(3,"svg",14),Pe(4,"path",15),j(),va(),Pe(5,"div",16),j()()),2&i){const e=he();un("mdc-checkbox--disabled",e.disabled),G(1),U("checked",e.selected)("disabled",e.disabled)}}function Nre(i,t){if(1&i&&(W(0,"div",17),Pe(1,"input",18),W(2,"div",19),Pe(3,"div",20)(4,"div",21),j()()),2&i){const e=he();un("mdc-radio--disabled",e.disabled),G(1),U("checked",e.selected)("disabled",e.disabled)}}function Bre(i,t){}function Ure(i,t){if(1&i&&(W(0,"span",22),fe(1,Bre,0,0,"ng-template",23),j()),2&i){he();const e=Zi(3);G(1),U("ngTemplateOutlet",e)}}function Vre(i,t){}function zre(i,t){if(1&i&&(W(0,"span",24),fe(1,Vre,0,0,"ng-template",23),j()),2&i){he();const e=Zi(5);G(1),U("ngTemplateOutlet",e)}}function Hre(i,t){}function Gre(i,t){1&i&&fe(0,Hre,0,0,"ng-template",23),2&i&&(he(),U("ngTemplateOutlet",Zi(1)))}function $re(i,t){}function Wre(i,t){if(1&i&&(W(0,"span",25),fe(1,$re,0,0,"ng-template",23),j()),2&i){he();const e=Zi(3);G(1),U("ngTemplateOutlet",e)}}function jre(i,t){}function Yre(i,t){if(1&i&&(W(0,"span",25),fe(1,jre,0,0,"ng-template",23),j()),2&i){he();const e=Zi(5);G(1),U("ngTemplateOutlet",e)}}function qre(i,t){}function Xre(i,t){1&i&&fe(0,qre,0,0,"ng-template",23),2&i&&(he(),U("ngTemplateOutlet",Zi(1)))}const Kre=[[["","matListItemTitle",""]],[["","matListItemLine",""]],"*",[["mat-divider"]],[["","matListItemAvatar",""],["","matListItemIcon",""]]],Zre=["[matListItemTitle]","[matListItemLine]","*","mat-divider","[matListItemAvatar],[matListItemIcon]"],zH=new me("ListOption");let Qre=(()=>{class i{constructor(e){this._elementRef=e}}return i.\u0275fac=function(e){return new(e||i)(E(gt))},i.\u0275dir=ve({type:i,selectors:[["","matListItemTitle",""]],hostAttrs:[1,"mat-mdc-list-item-title","mdc-list-item__primary-text"]}),i})(),Jre=(()=>{class i{constructor(e){this._elementRef=e}}return i.\u0275fac=function(e){return new(e||i)(E(gt))},i.\u0275dir=ve({type:i,selectors:[["","matListItemLine",""]],hostAttrs:[1,"mat-mdc-list-item-line","mdc-list-item__secondary-text"]}),i})(),HH=(()=>{class i{constructor(e){this._listOption=e}_isAlignedAtStart(){return!this._listOption||"after"===this._listOption?._getTogglePosition()}}return i.\u0275fac=function(e){return new(e||i)(E(zH,8))},i.\u0275dir=ve({type:i,hostVars:4,hostBindings:function(e,n){2&e&&un("mdc-list-item__start",n._isAlignedAtStart())("mdc-list-item__end",!n._isAlignedAtStart())}}),i})(),ese=(()=>{class i extends HH{}return i.\u0275fac=function(){let t;return function(n){return(t||(t=ri(i)))(n||i)}}(),i.\u0275dir=ve({type:i,selectors:[["","matListItemAvatar",""]],hostAttrs:[1,"mat-mdc-list-item-avatar"],features:[lt]}),i})(),tse=(()=>{class i extends HH{}return i.\u0275fac=function(){let t;return function(n){return(t||(t=ri(i)))(n||i)}}(),i.\u0275dir=ve({type:i,selectors:[["","matListItemIcon",""]],hostAttrs:[1,"mat-mdc-list-item-icon"],features:[lt]}),i})();const nse=new me("MAT_LIST_CONFIG");let KR=(()=>{class i{constructor(){this._isNonInteractive=!0,this._disableRipple=!1,this._disabled=!1,this._defaultOptions=Ft(nse,{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=ve({type:i,hostVars:1,hostBindings:function(e,n){2&e&&Dt("aria-disabled",n.disabled)},inputs:{disableRipple:"disableRipple",disabled:"disabled"}}),i})(),GH=(()=>{class i{set lines(e){this._explicitLines=Ps(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 Zt,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(Cr(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)(E(gt),E(pt),E(KR,8),E(zi),E(eR,8),E(kr,8))},i.\u0275dir=ve({type:i,contentQueries:function(e,n,r){if(1&e&&(Wi(r,ese,4),Wi(r,tse,4)),2&e){let s;Et(s=At())&&(n._avatars=s),Et(s=At())&&(n._icons=s)}},hostVars:4,hostBindings:function(e,n){2&e&&(Dt("aria-disabled",n.disabled)("disabled",n._isButtonElement&&n.disabled||null),un("mdc-list-item--disabled",n.disabled))},inputs:{lines:"lines",disableRipple:"disableRipple",disabled:"disabled"}}),i})();const $H=new me("SelectionList");let wC=(()=>{class i extends GH{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 $e,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)(E(gt),E(pt),E($H),E(zi),E(Zn),E(eR,8),E(kr,8))},i.\u0275cmp=ot({type:i,selectors:[["mat-list-option"]],contentQueries:function(e,n,r){if(1&e&&(Wi(r,Jre,5),Wi(r,Qre,5)),2&e){let s;Et(s=At())&&(n._lines=s),Et(s=At())&&(n._titles=s)}},viewQuery:function(e,n){if(1&e&&Wn(Ore,5),2&e){let r;Et(r=At())&&(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&&Le("blur",function(){return n._handleBlur()})("click",function(){return n._toggleOnInteraction()}),2&e&&(Dt("aria-selected",n.selected),un("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:[Dn([{provide:GH,useExisting:i},{provide:zH,useExisting:i}]),lt],ngContentSelectors:Zre,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&&(or(Kre),fe(0,Fre,1,0,"ng-template",null,0,zc),fe(2,Lre,6,4,"ng-template",null,1,zc),fe(4,Nre,5,4,"ng-template",null,2,zc),fe(6,Ure,2,1,"span",3),fe(7,zre,2,1,"span",4),fe(8,Gre,1,1,"ng-template",5),W(9,"span",6),Wt(10),Wt(11,1),W(12,"span",7,8),Le("cdkObserveContent",function(){return n._updateItemLines(!0)}),Wt(14,2),j()(),fe(15,Wre,2,1,"span",9),fe(16,Yre,2,1,"span",9),fe(17,Xre,1,1,"ng-template",5),Wt(18,3),Pe(19,"div",10)),2&e&&(G(6),U("ngIf",n._hasCheckboxAt("before")),G(1),U("ngIf",n._hasRadioAt("before")),G(1),U("ngIf",n._hasIconsOrAvatarsAt("before")),G(7),U("ngIf",n._hasCheckboxAt("after")),G(1),U("ngIf",n._hasRadioAt("after")),G(1),U("ngIf",n._hasIconsOrAvatarsAt("after")))},dependencies:[CU,vi,xy],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 ise={provide:Io,useExisting:Gn(()=>MC),multi:!0};class rse{constructor(t,e){this.source=t,this.options=e}}let MC=(()=>{class i extends KR{get multiple(){return this._multiple}set multiple(e){const n=Jt(e);n!==this._multiple&&(this._multiple=n,this.selectedOptions=new HR(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 Re,this._onChange=r=>{},this.selectionChange=new $e,this.color="accent",this.compareWith=(r,s)=>r===s,this._multiple=!0,this._hideSingleSelectionIndicator=this._defaultOptions?.hideSingleSelectionIndicator??!1,this.selectedOptions=new HR(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 rse(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(Ve(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()&&Zo(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 RU(this._items).withHomeAndEnd().withTypeAhead().withWrap().skipPredicate(()=>this.disabled),this._resetActiveOption(),this._keyManager.change.subscribe(e=>this._setActiveOption(e)),this._items.changes.pipe(Ve(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=FM();return e&&this._element.nativeElement.contains(e)}}return i.\u0275fac=function(e){return new(e||i)(E(gt),E(pt))},i.\u0275cmp=ot({type:i,selectors:[["mat-selection-list"]],contentQueries:function(e,n,r){if(1&e&&Wi(r,wC,5),2&e){let s;Et(s=At())&&(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&&Le("keydown",function(s){return n._handleKeydown(s)}),2&e&&Dt("aria-multiselectable",n.multiple)},inputs:{color:"color",compareWith:"compareWith",multiple:"multiple",hideSingleSelectionIndicator:"hideSingleSelectionIndicator",disabled:"disabled"},outputs:{selectionChange:"selectionChange"},exportAs:["matSelectionList"],features:[Dn([ise,{provide:KR,useExisting:i},{provide:$H,useExisting:i}]),lt,xi],ngContentSelectors:kre,decls:1,vars:0,template:function(e,n){1&e&&(or(),Wt(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})(),sse=(()=>{class i{}return i.\u0275fac=function(e){return new(e||i)},i.\u0275mod=nn({type:i}),i.\u0275inj=Kt({imports:[HI,Ao,Qn,eb,QU,RV]}),i})();function ose(i,t){if(1&i&&(W(0,"mat-label"),ze(1),j()),2&i){const e=he(2);G(1),_i(e.resource.name)}}function ase(i,t){if(1&i&&(W(0,"mat-list-option",5),ze(1),j()),2&i){const e=t.$implicit,n=he(2);U("value",e.key)("selected",n.resource.data[e.key])("disabled",n.disabled),G(1),Qi(" ",e.key," ")}}function lse(i,t){if(1&i){const e=ai();$r(0,1),fe(1,ose,2,1,"mat-label",2),W(2,"mat-selection-list",3),Le("selectionChange",function(r){return rn(e),Ut(he().onSelection(r))}),fe(3,ase,2,4,"mat-list-option",4),Ct(4,"keyvalue"),j(),Wr()}if(2&i){const e=he();U("matTooltip",e.resourceDescription),G(1),U("ngIf",e.resource.name),G(1),U("disabled",e.disabled),G(1),U("ngForOf",Tt(4,4,e.resource.data))}}let cse=(()=>{class i{constructor(){this.resource=null,this.resourceDescription="",this.disabled=!1,this.changed=new $e}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=ot({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&&fe(0,lse,5,6,"ng-container",0),2&e&&U("ngIf",n.resource)},dependencies:[Eo,vi,Ro,Fs,MC,wC,cB],styles:["[_nghost-%COMP%]{padding-bottom:1.34375em}"],changeDetection:0}),i})();class WH{get tick$(){return this._tick$.asObservable()}get children(){return[...this._children]}constructor(t){this.parent=t,this._tick$=new Re,this._children=[],t&&t.addChild(this)}addChild(t){if(t.parent!==this)throw new Error("Incorrect child clock");this._children.includes(t)||this._children.push(t)}removeChild(t){if(t.parent!==this)throw new Error("Incorrect child clock");this._children=this._children.filter(e=>e!==t)}dispose(){this.parent&&this.parent.removeChild(this);for(const t of this._children)t.dispose();this._tick$.complete()}}const use=typeof performance>"u"?()=>Date.now():()=>performance.now();class jm extends WH{static get instance(){return jm._instance||(jm._instance=new jm),jm._instance}get elapsedTime(){return use()}constructor(){super(null);let t=this.elapsedTime;const e=()=>{requestAnimationFrame(e);const n=t,r=this.elapsedTime;t=r,this._tick$.next([n,r-n])};requestAnimationFrame(e)}dispose(){throw new Error("Cannot dispose global clock")}}class jH extends WH{get isRunning(){return!!this.tickSub}get isPaused(){return-1!==this.pausedAt}get isStopped(){return-1===this.startedAt}get timeScale(){return this._timeScale}set timeScale(t){if(t!==this._timeScale||this.pausedByTimescale&&0!==t){if(0===t)return void(this.isPaused||(this.pause(),this.pausedByTimescale=!0));if(this.isPaused&&this.pausedByTimescale&&(this.resume(),this.pausedByTimescale=!1),!this.isStopped){const e=this.isPaused?this.pausedAt:this.parentClock.elapsedTime;this.startedAt=e-(e-this.startedAt)*this.timeScale/t}this._timeScale=t}}get elapsedTime(){return this.isStopped?this.lastStopElapsed:this.isPaused?this._timeScale*(this.pausedAt-this.startedAt):this._timeScale*(this.parentClock.elapsedTime-this.startedAt)}constructor(t=!1,e=jm.instance){super(e),this.parentClock=e,this.tickSub=null,this._internalTick$=new Re,this.tickRateLimit=0,this.paused$=new Re,this.startedAt=-1,this.oldRelativeTime=0,this.pausedAt=-1,this.lastStopElapsed=0,this._timeScale=1,this.pausedByTimescale=!1,this.lastFiredTickElapsed=0,t&&this.start(),this._internalTick$.pipe(et(([n,r])=>[r,r-this.lastFiredTickElapsed]),gn(([n])=>!this.tickRateLimit||Math.floor(this.lastFiredTickElapsed*this.tickRateLimit/1e3)this.lastFiredTickElapsed=n)).subscribe(this._tick$)}start(){this.isRunning||(this.oldRelativeTime=0,this.startedAt=this.parentClock.elapsedTime,this.startListeningTicks())}stop(){this.stopListeningTicks(),this.lastStopElapsed=this.elapsedTime,this.startedAt=this.pausedAt=-1}pause(){this.stopListeningTicks(),this.pausedAt=this.parentClock.elapsedTime,this.pausedByTimescale=!1,this.paused$.next(!0)}resume(){this.isRunning||-1==this.pausedAt||(this.startedAt+=this.parentClock.elapsedTime-this.pausedAt,this.pausedAt=-1,this.startListeningTicks(),this.paused$.next(!1))}startListeningTicks(){if(this.tickSub)throw new Error("Clock is already ticking!");this.tickSub=this.parentClock.tick$.pipe(et(([t,e])=>[this.oldRelativeTime,this.oldRelativeTime+e*this.timeScale]),Vi(([t,e])=>this.oldRelativeTime=e)).subscribe(this._internalTick$)}stopListeningTicks(){var t;null===(t=this.tickSub)||void 0===t||t.unsubscribe(),this.tickSub=null}dispose(){this.stopListeningTicks(),this._internalTick$.complete(),super.dispose()}}const hse={transparent:!1,background:0,size:"fullscreen",antialias:!0};class fse{constructor(t,e,n={}){this.scene=t,this.canvas=e,this.entity=null,this.rendererOptions=Object.assign(Object.assign({},hse),n||{})}}class pb{static fromArray(t,e=!1){const n=new pb(t[0]);let r=n;for(let s=1;sn.map(r=>new pb(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]}constructor(t){this.data=t,this.adjacent=new Set}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(d=>!e.has(d));for(const d of c)e.add(d),r.push([d,a-1])}}return n}nodes(){return Array.from(this.walkRead(-1))}}var oc=(()=>{return(i=oc||(oc={}))[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",oc;var i})();let Xh=(()=>{class i{constructor(){this.tick$=new Re,this._world=null,this._name="e0x"+(i.default_name_counter++).toString(16),this._selfActive=!0,this.parent=null,this._children=[],this._components=[],this._onSpawned$=new Re,this._onRemoved$=new Re}get world(){return this._world}get name(){return this._name}set name(e){this._name=e}get active(){return this._selfActive&&(!this.parent||this.parent.active)}set active(e){this._selfActive=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 pse extends Xh{constructor(t){super(),this.tickOrder=t}}function Ym(i,t=oc.CONTROLLERS,e){const n=new pse(t);return e&&(n.name=e),i.addEntity(n),n.tick$.pipe(su(()=>{i.removeEntity(n,!0)}))}class ZR extends Xh{get rendererSize$(){return this._rendererSize$.asObservable()}get rendererSize(){return this._rendererSize$.getValue()}get rendererOptions(){return this.renderer.rendererOptions}get physicsDebugViewActive(){return this.renderer.physicsDebugViewActive}set physicsDebugViewActive(t){this.renderer.physicsDebugViewActive=t}constructor(t){super(),this.renderer=t,this.tickOrder=oc.RENDERING,this._rendererSize$=new ut(null),this.addComponents(t),this.tick$.subscribe(()=>{this.renderer.render()})}onSpawned(t){this._rendererSize$.next(null),"fullscreen"==this.rendererOptions.size||"function"==typeof this.rendererOptions.size?(this.renderer.canvas&&(this.renderer.canvas.style.position="absolute"),Cr(To(window,"resize").pipe(PM(100)),To(window,"orientationchange")).pipe(Ve(this._onRemoved$),et(()=>({x:window.innerWidth,y:window.innerHeight})),Do({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 In||void 0!==this.rendererOptions.size.subscribe&&void 0!==this.rendererOptions.size.pipe?this.rendererOptions.size.pipe(Ve(this._onRemoved$)).subscribe(e=>{this._rendererSize$.next(e)}):this._rendererSize$.next(this.rendererOptions.size),this._rendererSize$.pipe(Ve(this._onRemoved$),Ql((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 QR=i=>{i.updateVisibility?i.updateVisibility():YH(i)},YH=i=>{for(const t of i.children)QR(t)};class mse extends Xh{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(){YH(this)}addChildren(...t){super.addChildren(...t);for(const e of t)QR(e)}removeChildren(t,e=!1){if(super.removeChildren(t,e),!e)for(const n of t)QR(n)}}class JR{constructor(){this._running=!1,this.stop$=new Re}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 gse extends JR{get output$(){return this._output$.asObservable()}constructor(t,e){super(),this.keyboard=t,this.keymap=e,this._output$=new Re}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")),Xl(t.map(e=>this.keyboard.bindMany(...e))).pipe(Ve(this.stop$),et(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 ek=new In(ms);class CC extends JR{constructor(){super(),this.bindings={},this.skipKeyDownsOnExternalFocus=!0,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 ut(!1);return this.bindings[t].push(e),e.pipe(Ql(),su(()=>{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"),ek;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 ut(!1);this.bindings[n].push(r),e.push(r)}return Xl(e).pipe(su(()=>{for(let n=0;nn.includes(!0)),Ql())}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 CC.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)}}CC.externalFocusBlacklist=[HTMLInputElement,HTMLTextAreaElement,HTMLSelectElement,HTMLButtonElement];class yi{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 yi.len(yi.sub(t,e))}static norm(t){const e=yi.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 vse={pointerLock:!1};var Ls=(()=>{return(i=Ls||(Ls={}))[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",Ls;var i})();class qm extends JR{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$=To(this._element,"wheel",{passive:!1}).pipe(Ve(this.stopped$),su(()=>this._wheel$=null),Vi(t=>t.preventDefault()),et(t=>t.deltaY),Uf())),this._wheel$}get isPointerLocked(){return!!document.pointerLockElement}get isPointerLocked$(){return To(document,"pointerlockchange").pipe(et(()=>this.isPointerLocked))}get state(){return this._state$.getValue()}get state$(){return this._state$.asObservable()}get multiTouchPositions$(){return this._multiTouchPositions$.asObservable()}get twoTouchGestureDelta$(){return this.state$.pipe(ks(t=>t==Ls.DRAG_TOUCH_TWO_FINGERS?this.multiTouchPositions$:ek),et(t=>t.map(e=>({x:e.x,y:e.y}))),function _se(){return ti((i,t)=>{let e,n=!1;i.subscribe(Yn(t,r=>{const s=e;e=r,n&&t.next([s,r]),n=!0}))})}(),gn(([t,e])=>t.length>1&&e.length>1),et(([t,e])=>({centerPointDelta:yi.sub(yi.scalarMult(e.reduce((n,r)=>yi.add(n,r),yi.O),1/e.length),yi.scalarMult(t.reduce((n,r)=>yi.add(n,r),yi.O),1/e.length)),angleDelta:yi.angle(e[1],e[0])-yi.angle(t[1],t[0]),distanceDelta:yi.dist(e[1],e[0])-yi.dist(t[1],t[0])})))}get _element(){return this.options.canvas||window}constructor(t={}){super(),this._wheel$=null,this._delta$=new Re,this._position$=new ut(yi.O),this._multiTouchPositions$=new ut([]),this.stopped$=new Re,this._state$=new ut(Ls.NONE),this.options=Object.assign(Object.assign({},vse),t),this.canvasClickListener=this.canvasClickListener.bind(this)}startInternal(){this.options.canvas&&(this.options.canvas.style.touchAction="none"),this._state$.next(Ls.NONE);const t=[Ls.DRAG,Ls.DRAG_MIDDLE_BUTTON,Ls.DRAG_RIGHT_BUTTON],e=[Ls.NONE,Ls.DRAG,Ls.DRAG_TOUCH_TWO_FINGERS],n=[],r={};To(this._element,"mousemove").pipe(Ve(this.stopped$)).subscribe(o=>{this._delta$.next({x:o.movementX,y:o.movementY})}),To(this._element,"pointermove").pipe(Ve(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})}),!qm.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{if(0===n.length)try{this.options.canvas&&this.options.canvas.setPointerCapture(o.pointerId),window.addEventListener("pointerup",s),this._element.addEventListener("pointercancel",s)}catch(a){console.error(a)}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]||Ls.NONE)}),To(this._element,"contextmenu").pipe(Ve(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 yse{static lookAt(t,e,n){let r=Te.sub(t,e);r=0===Te.lenSq(r)?Object.assign(Object.assign({},r),{z:1}):Te.norm(r);let s=Te.cross(n,r);0===Te.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=Te.norm(r),s=Te.cross(n,r)),s=Te.norm(s);let o=Te.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 Yi{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,d=t.w*Math.sin((1-n)*s)/o+e.w*Math.sin(n*s)/o;return isNaN(a)||isNaN(l)||isNaN(c)||isNaN(d)?Yi.clone(t):{x:a,y:l,z:c,w:d}}static fromAngle(t,e){const n=e/2,r=Math.sin(n);return Object.assign(Object.assign({},Te.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],d=t[10],h=e+o+d;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>d){const p=2*Math.sqrt(1+e-o-d);return{x:.25*p,y:(n+s)/p,z:(r+l)/p,w:(c-a)/p}}if(o>d){const p=2*Math.sqrt(1+o-e-d);return{x:(n+s)/p,y:.25*p,z:(a+c)/p,w:(r-l)/p}}{const p=2*Math.sqrt(1+d-e-o);return{x:(r+l)/p,y:(a+c)/p,z:.25*p,w:(s-n)/p}}}static fromMatrix3(t){const e=t[0][0]+t[1][1]+t[2][2];let n,r,s,o;if(e>0){const a=.5/Math.sqrt(e+1);n=.25/a,r=(t[2][1]-t[1][2])*a,s=(t[0][2]-t[2][0])*a,o=(t[1][0]-t[0][1])*a}else if(t[0][0]>t[1][1]&&t[0][0]>t[2][2]){const a=2*Math.sqrt(1+t[0][0]-t[1][1]-t[2][2]);n=(t[2][1]-t[1][2])/a,r=.25*a,s=(t[0][1]+t[1][0])/a,o=(t[0][2]+t[2][0])/a}else if(t[1][1]>t[2][2]){const a=2*Math.sqrt(1+t[1][1]-t[0][0]-t[2][2]);n=(t[0][2]-t[2][0])/a,r=(t[0][1]+t[1][0])/a,s=.25*a,o=(t[1][2]+t[2][1])/a}else{const a=2*Math.sqrt(1+t[2][2]-t[0][0]-t[1][1]);n=(t[1][0]-t[0][1])/a,r=(t[0][2]+t[2][0])/a,s=(t[1][2]+t[2][1])/a,o=.25*a}return{w:n,x:r,y:s,z:o}}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),d=Math.sin(.5*e);return{w:c*a*s+d*l*o,x:d*a*s-c*l*o,y:c*l*s+d*a*o,z:c*a*o-d*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=Te.Z){return this.fromMatrix4(yse.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 Te{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 Te.len(Te.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=Te.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,Yi.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)}}}function tk(i,t,e,n){return r=>r.pipe(tI((s,o)=>{var a;return{targetValue:o,currentValue:null!==(a=s.currentValue)&&void 0!==a?a:o,hasReachedTarget:!1}},{targetValue:null,currentValue:null,hasReachedTarget:!1}),ks(s=>i.pipe(et(([o,a])=>{if(null===s.targetValue||null===s.currentValue)return s.currentValue;if(s.hasReachedTarget)return;const l=1-Math.exp(-a/t),c=e(s.currentValue,s.targetValue,l);return s.currentValue=c,n(c,s.targetValue)?(s.hasReachedTarget=!0,s.targetValue):c}))),et(s=>void 0!==s?s:null),gn(s=>null!==s))}ps(738);class wse extends Xh{get avgReport(){return this._avgReport}get peakReport(){return this._peakReport}constructor(t=60,e=15){super(),this.maxSamples=t,this.maxRows=e,this.tickOrder=Number.MAX_SAFE_INTEGER,this.sampleIndex=0,this.collectedData=new Map,this._avgReport={totalTime:0,entries:[]},this._peakReport={totalTime:0,entries:[]}}onSpawned(t){super.onSpawned(t),this.sampleIndex=0;const e=()=>(typeof performance>"u"?Date:performance).now();this.world.tickForwardTo$.pipe(Ve(this.onRemoved$)).subscribe(n=>{n!==this&&(this.collectedData.has(n)?this.collectedData.get(n).push([this.sampleIndex,e(),0]):this.collectedData.set(n,[[this.sampleIndex,e(),0]]))}),this.world.tickForwardedTo$.pipe(Ve(this.onRemoved$)).subscribe(n=>{if(n===this)return;const r=this.collectedData.get(n);r[r.length-1][2]=e()}),this.tick$.pipe(Ve(this.onRemoved$)).subscribe(()=>{this.sampleIndex++;const n=Array.from(this.collectedData.entries());for(const[h,p]of n){for(;p.length>0&&p[0][0]h instanceof Xh?""===h.name?h.constructor.name:h.name:"PHYSICS_WORLD"===h?"Physics simulation":h,s=h=>{let p=0,m=0;for(;mh.length-m+1){m--;break}p+=h[h.length-m-1][1]}return m>1&&(h=h.slice(0,h.length-m)).push([`Rest (${m})`,p]),h};let o=0,a=Array.from(this.collectedData.entries()).map(([h,p])=>{const m=p.reduce((g,[b,v,y])=>g+y-v,0)/this.maxSamples;return o+=m,[r(h),m]}).sort((h,p)=>p[1]-h[1]);a=s(a),this._avgReport={totalTime:o,entries:a};let l=new Map,c=Array.from(this.collectedData.entries()).map(([h,p])=>{let m=0;for(const[g,b,v]of p){const y=v-b;m=Math.max(m,y),l.set(g,y+(l.get(g)||0))}return[r(h),m]}).sort((h,p)=>p[1]-h[1]);c=s(c);let d=Array.from(l.values()).reduce((h,p)=>Math.max(h,p),0);this._peakReport={totalTime:d,entries:c}})}onRemoved(){super.onRemoved(),this.collectedData=new Map,this._avgReport={totalTime:0,entries:[]},this._peakReport={totalTime:0,entries:[]}}}var Xm=function(i,t,e,n){return new(e||(e=Promise))(function(s,o){function a(d){try{c(n.next(d))}catch(h){o(h)}}function l(d){try{c(n.throw(d))}catch(h){o(h)}}function c(d){d.done?s(d.value):function r(s){return s instanceof e?s:new e(function(o){o(s)})}(d.value).then(a,l)}c((n=n.apply(i,t||[])).next())})};class yl{static get documentWorlds(){return[...yl._documentWorlds]}constructor(t,e){this.visualScene=t,this.physicsWorld=e,this.worldClock=new jH(!1),this.keyboardInput=new CC,this.name="w0x"+(yl.default_name_counter++).toString(16),this.children=[],this.tickListeners=[],this.tickStarted$=new Re,this.tickForwardTo$=new Re,this.tickForwardedTo$=new Re,this.paused$=new Re,this.disposed$=new Re,this.keyboardInput.start(),window.ggstatic?this.registerConsoleCommands(window.ggstatic):(this.onGgStaticInitialized=this.onGgStaticInitialized.bind(this),window.addEventListener("ggstatic_added",this.onGgStaticInitialized)),this.worldClock.paused$.subscribe(this.paused$),yl._documentWorlds.push(this),yl.worldCreated$.next(this)}init(){return Xm(this,void 0,void 0,function*(){yield Promise.all([this.physicsWorld.init(),this.visualScene.init()]);const t=(e,n,r)=>{e.active&&(this.tickForwardTo$.next(e),e.tick$.next([n,r]),this.tickForwardedTo$.next(e))};this.worldClock.tick$.subscribe(([e,n])=>{this.tickStarted$.next();let r=0;for(;r=oc.PHYSICS_SIMULATION);r++)t(this.tickListeners[r],e,n);for(this.tickForwardTo$.next("PHYSICS_WORLD"),this.physicsWorld.simulate(n),this.tickForwardedTo$.next("PHYSICS_WORLD");re.tickOrder-n.tickOrder),t.onSpawned(this))}removeEntity(t,e=!1){if(t.world){if(t.world!==this)throw new Error("Entity is not a part of this world");this.children.splice(this.children.findIndex(n=>n===t),1),this.tickListeners.splice(this.tickListeners.findIndex(n=>n===t),1),t.onRemoved()}e&&t.dispose()}onGgStaticInitialized(){window.removeEventListener("ggstatic_added",this.onGgStaticInitialized),this.registerConsoleCommands(window.ggstatic)}registerConsoleCommands(t){t.registerConsoleCommand(this,"timescale",(...e)=>Xm(this,void 0,void 0,function*(){return isNaN(+e[0])||(this.worldClock.timeScale=+e[0]),this.worldClock.timeScale.toString()}),"args: [ float? ]; Get current time scale of selected world clock or set it. Default value is 1.0 (no time scale applied)"),t.registerConsoleCommand(this,"fps_limit",(...e)=>Xm(this,void 0,void 0,function*(){return isNaN(+e[0])||(this.worldClock.tickRateLimit=+e[0]),this.worldClock.tickRateLimit.toString()}),"args: [ int? ]; Get current tick rate limit of selected world clock or set it. 0 means no limit applied"),t.registerConsoleCommand(this,"renderers",()=>Xm(this,void 0,void 0,function*(){return this.children.filter(e=>e instanceof ZR).map(e=>e.name).join("\n")}),"no args; Print all renderers in selected world"),t.registerConsoleCommand(this,"debug_view",(...e)=>Xm(this,void 0,void 0,function*(){let r,n="toggle";for(let o of e)["1","0"].includes(o)?n="1"===o:r=o;let s=this.children.find(o=>o instanceof ZR&&(!r||o.name===r));if(s)return s.physicsDebugViewActive="toggle"===n?!s.physicsDebugViewActive:n,s.physicsDebugViewActive?"1":"0";throw r?new Error(`Renderer with name "${r}" not found`):new Error("No renderer found")}),'args: [ 0|1?, string? ]; Turn on/off physics debug view, skip first argument to toggle value. Second argument expects renderer name, if not provided first renderer will be picked. Use "renderers" to get list of renderers in the world'),t.registerConsoleCommand(this,"performance",(...e)=>Xm(this,void 0,void 0,function*(){let n="avg",r=20;for(let d of e)["avg","peak"].includes(d)?n=d:isNaN(+d)||(r=+d);const s=new wse(r,250);this.addEntity(s),yield function bse(i,t){const e="object"==typeof t;return new Promise((n,r)=>{let o,s=!1;i.subscribe({next:a=>{o=a,s=!0},error:r,complete:()=>{s?n(o):e?n(t.defaultValue):r(new fm)}})})}(this.worldClock.tick$.pipe(Oi(r)));const o="avg"===n?s.avgReport:s.peakReport;this.removeEntity(s);const a=o.entries.map(([d,h])=>`${d}:`+new Array(Math.max(0,26-d.length)).join(" ")+`${h.toFixed(2)} ms`+("avg"===n?` (${(100*h/o.totalTime).toFixed(2)}%)`:""));let l="lightgreen";o.totalTime>12&&(l=o.totalTime<16?"yellow":"red");const c=("avg"===n?"Average":"Peak")+" Frame time";return a.unshift(c+":"+new Array(Math.max(0,26-c.length)).join(" ")+`${o.totalTime.toFixed(2)} ms`),a.unshift(`Performance report (${r} samples)`),a.join("\n")}),'args: [ int?, avg|peak? ]; Measure how much time was spent per entity in world. Arguments are samples amount (20 by default) and "peak" or "avg" choice, both arguments are optional. "avg" report sorts entities by average time consumed, "peak" records highest value for each entity')}}yl.default_name_counter=0,yl._documentWorlds=[],yl.worldCreated$=new Re;class Ese extends fse{}class XH extends mse{constructor(){super(...arguments),this._world=null}get world(){return this._world}}class Jo extends XH{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}constructor(t){super(),this.tickOrder=oc.OBJECTS_BINDING,this._position=Te.O,this._rotation=Yi.O,this.object3D=null,this.objectBody=null,t.objectBody&&(this.objectBody=t.objectBody,this.name=this.objectBody.name,this.addComponents(this.objectBody)),t.object3D&&(this.object3D=t.object3D,t.objectBody||(this._position=this.object3D.position,this._rotation=this.object3D.rotation,this.name=this.object3D.name),this.addComponents(this.object3D)),this.objectBody&&(this.tick$.subscribe(()=>{this.runTransformBinding(this.objectBody,this.object3D)}),this.runTransformBinding(this.objectBody,this.object3D))}}class Km extends pb{static fromMapArray(t,e=!1){const n=new Km(t[0]);let r=n;for(let s=1;sn.map(r=>new Km(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));othis.mapGraph.getNearestDummy(this.mapGraphNodes,this.loaderCursor$.getValue())),Ql(),Vi(r=>this._nearestDummy$.next(r))).subscribe(r=>{let o,s=new Set;if(this.options.inertia>0){o=new Set;const a=r.walkReadPreserveDepth(this.options.loadDepth+this.options.inertia);for(let l=0;lo.add(c.data)),l<=this.options.loadDepth&&a[l].forEach(c=>s.add(c.data))}else r.walkRead(this.options.loadDepth).forEach(a=>s.add(a.data)),o=s;for(const a of this.loaded.keys())o.has(a)?s.delete(a):n.includes(a)||n.push(a);for(let a of Array.from(s.keys()))e.includes(a)||e.push(a)}),this.tick$.pipe(Do(null),Ve(this._onRemoved$)).subscribe(()=>{if(n.length){for(const r of n)this.disposeChunk(r);n=[]}if(e.length)if(this._initialLoadComplete$.value&&e.length>this.options.maxNodesLoadingPerTick){let r=e.slice(0,this.options.maxNodesLoadingPerTick);e=e.slice(this.options.maxNodesLoadingPerTick),Promise.all(r.map(s=>this.loadChunk(s))).then()}else Promise.all(e.map(r=>this.loadChunk(r))).then(()=>{this._initialLoadComplete$.value||this._initialLoadComplete$.next(!0)}),e=[]})}onRemoved(){super.onRemoved(),this.loadClock&&(this.loadClock.stop(),this.loadClock=null),this.loaderCursor$.next(Te.O)}loadChunk(t){return function(i,t,e,n){return new(e||(e=Promise))(function(s,o){function a(d){try{c(n.next(d))}catch(h){o(h)}}function l(d){try{c(n.throw(d))}catch(h){o(h)}}function c(d){d.done?s(d.value):function r(s){return s instanceof e?s:new e(function(o){o(s)})}(d.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||Yi.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||Yi.O}]),[n,e]})}disposeChunk(t){this.loaded.has(t)&&(this.removeChildren(this.loaded.get(t),!0),this.loaded.delete(t))}}class Tse extends ZR{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 e4=function(i,t,e,n){return new(e||(e=Promise))(function(s,o){function a(d){try{c(n.next(d))}catch(h){o(h)}}function l(d){try{c(n.throw(d))}catch(h){o(h)}}function c(d){d.done?s(d.value):function r(s){return s instanceof e?s:new e(function(o){o(s)})}(d.value).then(a,l)}c((n=n.apply(i,t||[])).next())})};const t4={keymap:"wasd",cameraLinearSpeed:20,cameraMovementElasticity:0,cameraBoostMultiplier:2.5,cameraRotationSensitivity:1,cameraRotationElasticity:0,mouseOptions:{},ignoreMouseUnlessPointerLocked:!1,ignoreKeyboardUnlessPointerLocked:!1};class n4 extends Xh{get active(){return super.active}set active(t){!super.active&&t&&this.reset(),super.active=t}get spherical(){return this._spherical}set spherical(t){this._spherical.phi=Math.max(1e-6,Math.min(Math.PI-1e-6,t.phi)),this._spherical.theta=t.theta,this.resetMotion$.next()}constructor(t,e,n={}){super(),this.keyboard=t,this.camera=e,this.tickOrder=oc.INPUT_CONTROLLERS,this._spherical={phi:0,radius:1,theta:0},this.resetMotion$=new Re,this.options=Object.assign(Object.assign({},t4),n),n.mouseOptions&&(this.options.mouseOptions=Object.assign(Object.assign({},t4.mouseOptions),n.mouseOptions)),this.mouseInput=new qm(this.options.mouseOptions),this.directionsInput=new gse(t,this.options.keymap)}reset(){this._spherical=Te.toSpherical(Te.rot({x:0,y:0,z:-1},this.camera.rotation)),this.resetMotion$.next()}onSpawned(t){const e=Object.create(null,{onSpawned:{get:()=>super.onSpawned}});return e4(this,void 0,void 0,function*(){yield e.onSpawned.call(this,t),this._spherical=Te.toSpherical(Te.rot({x:0,y:0,z:-1},this.camera.rotation));const n=["KeyE","KeyQ"];this.camera.camera.supportsFov&&n.push("KeyZ","KeyC"),n.push("ShiftLeft");let r=Xl([this.directionsInput.output$,...n.map(c=>this.keyboard.bind(c))]).pipe(Ve(this._onRemoved$),et(([c,...d])=>{let h={direction:{},rest:[]};(!this.options.ignoreKeyboardUnlessPointerLocked||this.mouseInput.isPointerLocked)&&(h={direction:c,rest:d});let p=Object.assign({},Te.O);const[m,g,b,v,y]=h.rest;void 0!==h.direction.upDown&&(p.z=h.direction.upDown?-1:1),void 0!==h.direction.leftRight&&(p.x=h.direction.leftRight?-1:1),m!=g&&(p.y=g?-1:1);let M=0;return b!=v&&(M=b?1:-1),p=Te.norm(p),y&&(p=Te.scalarMult(p,this.options.cameraBoostMultiplier)),[p,M]}));this.options.cameraMovementElasticity>0&&(r=r.pipe(tk(this.camera.tick$,this.options.cameraMovementElasticity,([c,d],[h,p],m)=>[Te.lerp(c,h,m),p],([c,d],[h,p])=>d==p&&Te.dist(c,h)<.001)));let s=Te.O,o=0;r.subscribe(([c,d])=>{s=c,o=d});let a=qm.isTouchDevice(),l=this.mouseInput.delta$.pipe(Ve(this._onRemoved$),gn(()=>this.active&&(a||!this.options.ignoreMouseUnlessPointerLocked||this.mouseInput.isPointerLocked)));if(this.options.cameraRotationElasticity>0){const c=new ut(this._spherical);l.subscribe(h=>{const p=c.getValue();c.next({phi:Math.max(1e-6,Math.min(Math.PI-1e-6,p.phi+h.y*this.options.cameraRotationSensitivity/1e3)),theta:p.theta-h.x*this.options.cameraRotationSensitivity/1e3,radius:1})});const d=()=>{c.pipe(Ve(this._onRemoved$),tk(this.tick$,this.options.cameraRotationElasticity,(h,p,m)=>({phi:h.phi+m*(p.phi-h.phi),theta:h.theta+m*(p.theta-h.theta),radius:1}),(h,p)=>yi.dist({x:h.phi,y:h.theta},{x:p.phi,y:p.theta})<1e-4),Ve(this.resetMotion$)).subscribe(h=>{this._spherical.theta=h.theta,this._spherical.phi=h.phi})};this.resetMotion$.pipe(Ve(this._onRemoved$)).subscribe(()=>{c.next(this._spherical),d()}),d()}else l.subscribe(c=>{this._spherical.theta-=c.x*this.options.cameraRotationSensitivity/1e3,this._spherical.phi+=c.y*this.options.cameraRotationSensitivity/1e3,this._spherical.phi=Math.max(1e-6,Math.min(Math.PI-1e-6,this._spherical.phi))});this.camera.tick$.pipe(Ve(this._onRemoved$),gn(()=>this.active)).subscribe(([c,d])=>{this.camera.camera.fov+=o,this.camera.position=Te.add(this.camera.position,Te.rot(Te.scalarMult(s,this.options.cameraLinearSpeed*d/1e3),this.camera.rotation)),this.camera.rotation=Yi.lookAt(this.camera.position,Te.add(this.camera.position,Te.fromSpherical(this._spherical)))}),this.mouseInput.start(),this.directionsInput.start()})}onRemoved(){const t=Object.create(null,{onRemoved:{get:()=>super.onRemoved}});return e4(this,void 0,void 0,function*(){yield t.onRemoved.call(this),yield this.mouseInput.stop(!0),yield this.directionsInput.stop()})}}var i4=function(i,t,e,n){return new(e||(e=Promise))(function(s,o){function a(d){try{c(n.next(d))}catch(h){o(h)}}function l(d){try{c(n.throw(d))}catch(h){o(h)}}function c(d){d.done?s(d.value):function r(s){return s instanceof e?s:new e(function(o){o(s)})}(d.value).then(a,l)}c((n=n.apply(i,t||[])).next())})};const Rse={mouseOptions:{},orbiting:{sensitivityX:1,sensitivityY:1},orbitingElasticity:0,zooming:{sensitivity:1},panning:{sensitivityX:1,sensitivityY:1},dollying:{sensitivity:1}};class kse extends Xh{get active(){return super.active}set active(t){!super.active&&t&&this.reset(),super.active=t}get spherical(){return this._spherical}set spherical(t){this._spherical.phi=Math.max(1e-6,Math.min(Math.PI-1e-6,t.phi)),this._spherical.theta=t.theta,this._spherical.radius=t.radius,this.resetMotion$.next()}constructor(t,e={}){super(),this.camera=t,this.tickOrder=oc.INPUT_CONTROLLERS,this._spherical={phi:0,radius:10,theta:0},this.target=Te.O,this.resetMotion$=new Re,this.options=Object.assign(Object.assign({},Rse),e),this.mouseInput=new qm(this.options.mouseOptions)}reset(){let t=Te.dist(this.target,this.camera.position);this.target=Te.add(this.camera.position,Te.rot({x:0,y:0,z:-t},this.camera.rotation)),this._spherical=Te.toSpherical(Te.sub(this.camera.position,this.target)),this.resetMotion$.next()}onSpawned(t){const e=Object.create(null,{onSpawned:{get:()=>super.onSpawned}});return i4(this,void 0,void 0,function*(){if(yield e.onSpawned.call(this,t),this._spherical=Te.toSpherical(Te.sub(this.camera.position,this.target)),this.options.orbiting){let r=this.mouseInput.delta$.pipe(Ve(this._onRemoved$),gn(()=>this.active&&this.mouseInput.state==Ls.DRAG));if(this.options.orbitingElasticity>0){const s=new ut(this._spherical);r.subscribe(a=>{const l=s.getValue();s.next({phi:Math.max(1e-6,Math.min(Math.PI-1e-6,l.phi-a.y*this.options.orbiting.sensitivityY/1e3)),theta:l.theta-a.x*this.options.orbiting.sensitivityX/1e3,radius:1})});const o=()=>{s.pipe(Ve(this._onRemoved$),tk(this.tick$,this.options.orbitingElasticity,(a,l,c)=>({phi:a.phi+c*(l.phi-a.phi),theta:a.theta+c*(l.theta-a.theta),radius:1}),(a,l)=>yi.dist({x:a.phi,y:a.theta},{x:l.phi,y:l.theta})<1e-4),Ve(this.resetMotion$)).subscribe(a=>{this._spherical.theta=a.theta,this._spherical.phi=a.phi})};this.resetMotion$.pipe(Ve(this._onRemoved$)).subscribe(()=>{s.next(this._spherical),o()}),o()}else r.subscribe(s=>{this._spherical.theta-=s.x*this.options.orbiting.sensitivityX/1e3,this._spherical.phi-=s.y*this.options.orbiting.sensitivityY/1e3,this._spherical.phi=Math.max(1e-6,Math.min(Math.PI-1e-6,this._spherical.phi))})}this.options.zooming&&this.mouseInput.wheel$.pipe(Ve(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=Te.fromSpherical(this._spherical),o=Te.rotAround(s,{x:-Math.sin(this._spherical.theta),y:Math.cos(this._spherical.theta),z:0},Math.PI/2),a=Te.rotAround(s,Te.norm(o),Math.PI/2);this.target=Te.add(this.target,Te.add(Te.scalarMult(o,-this.options.panning.sensitivityY*r.y/1e3),Te.scalarMult(a,this.options.panning.sensitivityX*r.x/1e3)))};this.options.panning&&this.mouseInput.delta$.pipe(Ve(this._onRemoved$),gn(()=>this.mouseInput.state==Ls.DRAG_RIGHT_BUTTON)).subscribe(r=>{n(r)}),this.options.dollying&&this.mouseInput.delta$.pipe(Ve(this._onRemoved$),gn(()=>this.mouseInput.state==Ls.DRAG_MIDDLE_BUTTON)).subscribe(r=>{this._spherical.radius*=Math.pow(.95,-this.options.dollying.sensitivity*r.y/10)}),qm.isTouchDevice()&&(this.options.dollying||this.options.panning)&&this.mouseInput.twoTouchGestureDelta$.pipe(Ve(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(Ve(this._onRemoved$),gn(()=>this.active),et(()=>this._spherical)).subscribe(r=>{this.camera.position=Te.add(this.target,Te.fromSpherical(r)),this.camera.rotation=Yi.lookAt(this.camera.position,this.target)}),yield this.mouseInput.start()})}onRemoved(){const t=Object.create(null,{onRemoved:{get:()=>super.onRemoved}});return i4(this,void 0,void 0,function*(){yield t.onRemoved.call(this),yield this.mouseInput.stop(!0)})}}class Ose{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 rk=function(i,t,e,n){return new(e||(e=Promise))(function(s,o){function a(d){try{c(n.next(d))}catch(h){o(h)}}function l(d){try{c(n.throw(d))}catch(h){o(h)}}function c(d){d.done?s(d.value):function r(s){return s instanceof e?s:new e(function(o){o(s)})}(d.value).then(a,l)}c((n=n.apply(i,t||[])).next())})},yu=(()=>{return(i=yu||(yu={}))[i.Nothing=0]="Nothing",i[i.Files=1]="Files",i[i.Entities=2]="Entities",yu;var i})();const r4={cachingStrategy:yu.Nothing,position:Te.O,rotation:Yi.O,loadProps:!0},s4=i=>({meta:i.meta,resources:i.resources.map(({object3D:t,body:e})=>({object3D:t&&t.clone(),body:e&&e.clone()}))});class Fse{constructor(t){this.world=t,this.filesCache=new Map,this.loadResultCache=new Map}loadGgGlbFiles(t){return rk(this,arguments,void 0,function*(e,n=!1){if(n&&this.filesCache.has(e))return this.filesCache.get(e);const r=Promise.all([fetch(`${e}.glb`).then(o=>o.arrayBuffer()),fetch(`${e}.meta`).then(o=>o.text()).then(o=>JSON.parse(o))]);n&&this.filesCache.set(e,r);const s=yield r;return n&&this.filesCache.set(e,s),s})}loadGgGlbResources(t){return rk(this,arguments,void 0,function*(e,n=yu.Nothing){if(n==yu.Entities&&this.loadResultCache.has(e)){const c=this.loadResultCache.get(e),d=c instanceof Promise?yield c:c;return s4(d)}const[r,s]=yield this.loadGgGlbFiles(e,n==yu.Files);if(!r)throw new Error("GLB not found");const[o,a]=yield Promise.all([this.world.visualScene.loader.loadFromGgGlb(r,s),this.world.physicsWorld.loader.loadFromGgGlb(r,s)]),l={resources:[],meta:s};if(!o)return l;if(0==a.length)l.resources.push({object3D:o,body:null});else if(1==a.length)l.resources.push({object3D:o,body:a[0]});else{for(const c of a)l.resources.push({object3D:o.popChild(c.name),body:c});o.isEmpty()||l.resources.push({object3D:o,body:null})}return n==yu.Entities&&this.loadResultCache.set(e,s4(l)),l})}loadGgGlb(t){return rk(this,arguments,void 0,function*(e,n=r4){const r=Object.assign(Object.assign({},r4),n),{resources:s,meta:o}=yield this.loadGgGlbResources(e,r.cachingStrategy),a={entities:s.map(l=>new Jo({object3D:l.object3D,objectBody:l.body})),meta:o};return r.loadProps&&(a.props=yield Promise.all(o.dummies.filter(l=>l.is_prop||l.is_scene).map(l=>this.loadGgGlb(l.is_prop?(r.propsPath||e.substring(0,e.lastIndexOf("/")+1))+l.prop_id:l.scene_id,{loadProps:!!l.is_scene,position:Te.add(Te.rot(l.position,r.rotation),r.position),rotation:Yi.combineRotations(l.rotation,r.rotation)})))),a.entities.forEach(l=>{l.position=Te.add(Te.rot(Te.clone(l.position),r.rotation),r.position),l.rotation=Yi.mult(Yi.clone(l.rotation),r.rotation)}),a})}}class sk extends yl{constructor(t,e){super(t,e),this.visualScene=t,this.physicsWorld=e,this.loader=new Fse(this)}addPrimitiveRigidBody(t,e=Te.O,n=Yi.O,r={}){const s=new Jo({object3D:this.visualScene.factory.createPrimitive(t.shape,r),objectBody:this.physicsWorld.factory.createRigidBody(t)});return s.position=e,s.rotation=n,this.addEntity(s),s}addRenderer(t,e,n){const r=new Tse(this.visualScene.createRenderer(t,e,n));return this.addEntity(r),r}registerConsoleCommands(t){super.registerConsoleCommands(t),t.registerConsoleCommand(this,"gravity",(...e)=>function(i,t,e,n){return new(e||(e=Promise))(function(s,o){function a(d){try{c(n.next(d))}catch(h){o(h)}}function l(d){try{c(n.throw(d))}catch(h){o(h)}}function c(d){d.done?s(d.value):function r(s){return s instanceof e?s:new e(function(o){o(s)})}(d.value).then(a,l)}c((n=n.apply(i,t||[])).next())})}(this,void 0,void 0,function*(){if(1==e.length&&(e=["0","0",""+-+e[0]]),e.length>0){if(isNaN(+e[0])||isNaN(+e[1])||isNaN(+e[2]))throw new Error("Wrong arguments");this.physicsWorld.gravity={x:+e[0],y:+e[1],z:+e[2]}}return JSON.stringify(this.physicsWorld.gravity)}),'args: [ ?float, ?float, ?float ]; Get or set 3D world gravity vector. 1 argument sets vector {x: 0, y: 0, z: -value}, 3 arguments set the whole vector. Default value is "9.82" or "0 0 -9.82"')}}function o4(i,t=$y,e){const n=OI(i,t);return function Nse(i,t){return ti((e,n)=>{const{leading:r=!0,trailing:s=!1}=t??{};let o=!1,a=null,l=null,c=!1;const d=()=>{l?.unsubscribe(),l=null,s&&(m(),c&&n.complete())},h=()=>{l=null,c&&n.complete()},p=g=>l=Mr(i(g)).subscribe(Yn(n,d,h)),m=()=>{if(o){o=!1;const g=a;a=null,n.next(g),!c&&p(g)}};e.subscribe(Yn(n,g=>{o=!0,a=g,(!l||l.closed)&&(r?m():p(g))},()=>{c=!0,(!(s&&o&&l)||l.closed)&&n.complete()}))})}(()=>n,e)}window.gg_version="0.0.56";const Bse=0,a4=1,Use=2,l4=1,c4=2,Qc=3,lc=0,ko=1,Ns=2,Jc=0,Zm=1,d4=2,u4=3,h4=4,Vse=5,Kh=100,zse=101,Hse=102,Gse=103,$se=104,Wse=200,jse=201,Yse=202,qse=203,ak=204,lk=205,Xse=206,Kse=207,Zse=208,Qse=209,Jse=210,eoe=211,toe=212,noe=213,ioe=214,roe=0,soe=1,ooe=2,SC=3,aoe=4,loe=5,coe=6,doe=7,EC=0,uoe=1,hoe=2,bu=0,foe=1,poe=2,moe=3,goe=4,_oe=5,voe=6,yoe=7,f4="attached",cc=301,Zh=302,AC=303,DC=304,mb=306,Bs=1e3,er=1001,gb=1002,vr=1003,dk=1004,Qm=1005,cr=1006,_b=1007,bl=1008,ed=1009,p4=1010,m4=1011,vb=1012,uk=1013,xu=1014,ea=1015,Jm=1016,hk=1017,fk=1018,eg=1020,g4=35902,_4=1021,v4=1022,Po=1023,y4=1024,b4=1025,tg=1026,ng=1027,pk=1028,TC=1029,x4=1030,mk=1031,gk=1033,IC=33776,RC=33777,kC=33778,PC=33779,_k=35840,vk=35841,yk=35842,bk=35843,xk=36196,wk=37492,Mk=37496,Ck=37808,Sk=37809,Ek=37810,Ak=37811,Dk=37812,Tk=37813,Ik=37814,Rk=37815,kk=37816,Pk=37817,Ok=37818,Fk=37819,Lk=37820,Nk=37821,OC=36492,Bk=36494,Uk=36495,w4=36283,Vk=36284,zk=36285,Hk=36286,yb=2300,bb=2301,Coe=0,C4=1,Wk=2,Eoe=3201,Qh=0,Aoe=1,wu="",cs="srgb",ds="srgb-linear",jk="display-p3",LC="display-p3-linear",NC="linear",Fi="srgb",BC="rec709",UC="p3",sg=7680,Doe=512,Toe=513,Ioe=514,E4=515,Roe=516,koe=517,Poe=518,Ooe=519,A4="300 es",td=2e3;class og{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]+Us[i>>16&255]+Us[i>>24&255]+"-"+Us[255&t]+Us[t>>8&255]+"-"+Us[t>>16&15|64]+Us[t>>24&255]+"-"+Us[63&e|128]+Us[e>>8&255]+"-"+Us[e>>16&255]+Us[e>>24&255]+Us[255&n]+Us[n>>8&255]+Us[n>>16&255]+Us[n>>24&255]).toLowerCase()}function tr(i,t,e){return Math.max(t,Math.min(e,i))}function Yk(i,t){return(i%t+t)%t}function xb(i,t,e){return(1-e)*i+e*t}function co(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 yn(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 Zoe_radToDeg=function joe(i){return i*ag};class xe{constructor(t=0,e=0){xe.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(tr(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 wn{constructor(t,e,n,r,s,o,a,l,c){wn.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 d=this.elements;return d[0]=t,d[1]=r,d[2]=a,d[3]=e,d[4]=s,d[5]=l,d[6]=n,d[7]=o,d[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],d=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],F=r[2],D=r[5],k=r[8];return s[0]=o*b+a*M+l*F,s[3]=o*v+a*x+l*D,s[6]=o*y+a*C+l*k,s[1]=c*b+d*M+h*F,s[4]=c*v+d*x+h*D,s[7]=c*y+d*C+h*k,s[2]=p*b+m*M+g*F,s[5]=p*v+m*x+g*D,s[8]=p*y+m*C+g*k,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],d=t[8];return e*o*d-e*a*c-n*s*d+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],d=t[8],h=d*o-a*c,p=a*l-d*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-d*n)*b,t[2]=(a*n-r*o)*b,t[3]=p*b,t[4]=(d*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(qk.makeScale(t,e)),this}rotate(t){return this.premultiply(qk.makeRotation(-t)),this}translate(t,e){return this.premultiply(qk.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 qk=new wn;function T4(i){for(let t=i.length-1;t>=0;--t)if(i[t]>=65535)return!0;return!1}function wb(i){return document.createElementNS("http://www.w3.org/1999/xhtml",i)}function Joe(){const i=wb("canvas");return i.style.display="block",i}Int8Array,Uint8Array,Uint8ClampedArray,Int16Array,Uint16Array,Int32Array,Uint32Array,Float32Array,Float64Array;const I4={};function cg(i){i in I4||(I4[i]=!0,console.warn(i))}const R4=(new wn).set(.8224621,.177538,0,.0331941,.9668058,0,.0170827,.0723974,.9105199),k4=(new wn).set(1.2249401,-.2249404,0,-.0420569,1.0420571,0,-.0196376,-.0786361,1.0982735),Mb={[ds]:{transfer:NC,primaries:BC,luminanceCoefficients:[.2126,.7152,.0722],toReference:i=>i,fromReference:i=>i},[cs]:{transfer:Fi,primaries:BC,luminanceCoefficients:[.2126,.7152,.0722],toReference:i=>i.convertSRGBToLinear(),fromReference:i=>i.convertLinearToSRGB()},[LC]:{transfer:NC,primaries:UC,luminanceCoefficients:[.2289,.6917,.0793],toReference:i=>i.applyMatrix3(k4),fromReference:i=>i.applyMatrix3(R4)},[jk]:{transfer:Fi,primaries:UC,luminanceCoefficients:[.2289,.6917,.0793],toReference:i=>i.convertSRGBToLinear().applyMatrix3(k4),fromReference:i=>i.applyMatrix3(R4).convertLinearToSRGB()}},tae=new Set([ds,LC]),Jn={enabled:!0,_workingColorSpace:ds,get workingColorSpace(){return this._workingColorSpace},set workingColorSpace(i){if(!tae.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,Mb[e].fromReference)((0,Mb[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 Mb[i].primaries},getTransfer:function(i){return i===wu?NC:Mb[i].transfer},getLuminanceCoefficients:function(i,t=this._workingColorSpace){return i.fromArray(Mb[t].luminanceCoefficients)}};function dg(i){return i<.04045?.0773993808*i:Math.pow(.9478672986*i+.0521327014,2.4)}function Xk(i){return i<.0031308?12.92*i:1.055*Math.pow(i,.41666)-.055}let ug;class nae{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===ug&&(ug=wb("canvas")),ug.width=t.width,ug.height=t.height;const n=ug.getContext("2d");t instanceof ImageData?n.putImageData(t,0,0):n.drawImage(t,0,0,t.width,t.height),e=ug}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=wb("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 og{constructor(e=i.DEFAULT_IMAGE,n=i.DEFAULT_MAPPING,r=er,s=er,o=cr,a=bl,l=Po,c=ed,d=i.DEFAULT_ANISOTROPY,h=wu){super(),this.isTexture=!0,Object.defineProperty(this,"id",{value:rae++}),this.uuid=ta(),this.name="",this.source=new hg(e),this.mipmaps=[],this.mapping=n,this.channel=0,this.wrapS=r,this.wrapT=s,this.magFilter=o,this.minFilter=a,this.anisotropy=d,this.format=l,this.internalFormat=null,this.type=c,this.offset=new xe(0,0),this.repeat=new xe(1,1),this.center=new xe(0,0),this.rotation=0,this.matrixAutoUpdate=!0,this.matrix=new wn,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 Bs:e.x=e.x-Math.floor(e.x);break;case er:e.x=e.x<0?0:1;break;case gb: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 Bs:e.y=e.y-Math.floor(e.y);break;case er:e.y=e.y<0?0:1;break;case gb: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 gi{constructor(t=0,e=0,n=0,r=1){gi.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],d=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(d-p)<.01&&Math.abs(h-b)<.01&&Math.abs(g-v)<.01){if(Math.abs(d+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,F=(y+1)/2,D=(d+p)/4,k=(h+b)/4,B=(g+v)/4;return x>C&&x>F?x<.01?(n=0,r=.707106781,s=.707106781):(n=Math.sqrt(x),r=D/n,s=k/n):C>F?C<.01?(n=.707106781,r=0,s=.707106781):(r=Math.sqrt(C),n=D/r,s=B/r):F<.01?(n=.707106781,r=.707106781,s=0):(s=Math.sqrt(F),n=k/s,r=B/s),this.set(n,r,s,e),this}let M=Math.sqrt((v-g)*(v-g)+(h-b)*(h-b)+(p-d)*(p-d));return Math.abs(M)<.001&&(M=1),this.x=(v-g)/M,this.y=(h-b)/M,this.z=(p-d)/M,this.w=Math.acos((c+m+y-1)/2),this}setFromMatrixPosition(t){const e=t.elements;return this.x=e[12],this.y=e[13],this.z=e[14],this.w=e[15],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 sae extends og{constructor(t=1,e=1,n={}){super(),this.isRenderTarget=!0,this.width=t,this.height=e,this.depth=1,this.scissor=new gi(0,0,t,e),this.scissorTest=!1,this.viewport=new gi(0,0,t,e);const r={width:t,height:e,depth:1};n=Object.assign({generateMipmaps:!1,internalFormat:null,minFilter:cr,depthBuffer:!0,stencilBuffer:!1,resolveDepthBuffer:!0,resolveStencilBuffer:!0,depthTexture:null,samples:0,count:1},n);const s=new Oo(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 F=Math.sqrt(x),D=Math.atan2(F,y*M);v=Math.sin(v*D)/F,a=Math.sin(a*D)/F}const C=a*M;if(l=l*v+p*C,c=c*v+m*C,d=d*v+g*C,h=h*v+b*C,v===1-a){const F=1/Math.sqrt(l*l+c*c+d*d+h*h);l*=F,c*=F,d*=F,h*=F}}t[e]=l,t[e+1]=c,t[e+2]=d,t[e+3]=h}static multiplyQuaternionsFlat(t,e,n,r,s,o){const a=n[r],l=n[r+1],c=n[r+2],d=n[r+3],h=s[o],p=s[o+1],m=s[o+2],g=s[o+3];return t[e]=a*g+d*h+l*m-c*p,t[e+1]=l*g+d*p+c*h-a*m,t[e+2]=c*g+d*m+a*p-l*h,t[e+3]=d*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),d=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*d*h+c*m*g,this._y=c*m*h-p*d*g,this._z=c*d*g+p*m*h,this._w=c*d*h-p*m*g;break;case"YXZ":this._x=p*d*h+c*m*g,this._y=c*m*h-p*d*g,this._z=c*d*g-p*m*h,this._w=c*d*h+p*m*g;break;case"ZXY":this._x=p*d*h-c*m*g,this._y=c*m*h+p*d*g,this._z=c*d*g+p*m*h,this._w=c*d*h-p*m*g;break;case"ZYX":this._x=p*d*h-c*m*g,this._y=c*m*h+p*d*g,this._z=c*d*g-p*m*h,this._w=c*d*h+p*m*g;break;case"YZX":this._x=p*d*h+c*m*g,this._y=c*m*h+p*d*g,this._z=c*d*g-p*m*h,this._w=c*d*h-p*m*g;break;case"XZY":this._x=p*d*h-c*m*g,this._y=c*m*h-p*d*g,this._z=c*d*g+p*m*h,this._w=c*d*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],d=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=(d-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=(d-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+d)/m}else{const m=2*Math.sqrt(1+h-n-a);this._w=(o-r)/m,this._x=(s+c)/m,this._y=(l+d)/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(tr(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,d=e._w;return this._x=n*d+o*a+r*c-s*l,this._y=r*d+o*l+s*a-n*c,this._z=s*d+o*c+n*l-r*a,this._w=o*d-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),d=Math.atan2(c,a),h=Math.sin((1-e)*d)/c,p=Math.sin(e*d)/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 O{constructor(t=0,e=0,n=0){O.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(O4.setFromEuler(t))}applyAxisAngle(t,e){return this.applyQuaternion(O4.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),d=2*(a*e-s*r),h=2*(s*n-o*e);return this.x=e+l*c+o*h-a*d,this.y=n+l*d+a*c-s*h,this.z=r+l*h+s*d-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 Qk.copy(this).projectOnVector(t),this.sub(Qk)}reflect(t){return this.sub(Qk.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(tr(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 Qk=new O,O4=new uo;class Vs{constructor(t=new O(1/0,1/0,1/0),e=new O(-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;e=this.min.x&&t.x<=this.max.x&&t.y>=this.min.y&&t.y<=this.max.y&&t.z>=this.min.z&&t.z<=this.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.x>=this.min.x&&t.min.x<=this.max.x&&t.max.y>=this.min.y&&t.min.y<=this.max.y&&t.max.z>=this.min.z&&t.min.z<=this.max.z}intersectsSphere(t){return this.clampPoint(t.center,xl),xl.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(Cb),GC.subVectors(this.max,Cb),fg.subVectors(t.a,Cb),pg.subVectors(t.b,Cb),mg.subVectors(t.c,Cb),Cu.subVectors(pg,fg),Su.subVectors(mg,pg),ef.subVectors(fg,mg);let e=[0,-Cu.z,Cu.y,0,-Su.z,Su.y,0,-ef.z,ef.y,Cu.z,0,-Cu.x,Su.z,0,-Su.x,ef.z,0,-ef.x,-Cu.y,Cu.x,0,-Su.y,Su.x,0,-ef.y,ef.x,0];return!(!Jk(e,fg,pg,mg,GC)||(e=[1,0,0,0,1,0,0,0,1],!Jk(e,fg,pg,mg,GC)))&&($C.crossVectors(Cu,Su),e=[$C.x,$C.y,$C.z],Jk(e,fg,pg,mg,GC))}clampPoint(t,e){return e.copy(t).clamp(this.min,this.max)}distanceToPoint(t){return this.clampPoint(t,xl).distanceTo(t)}getBoundingSphere(t){return this.isEmpty()?t.makeEmpty():(this.getCenter(t.center),t.radius=.5*this.getSize(xl).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()||(nd[0].set(this.min.x,this.min.y,this.min.z).applyMatrix4(t),nd[1].set(this.min.x,this.min.y,this.max.z).applyMatrix4(t),nd[2].set(this.min.x,this.max.y,this.min.z).applyMatrix4(t),nd[3].set(this.min.x,this.max.y,this.max.z).applyMatrix4(t),nd[4].set(this.max.x,this.min.y,this.min.z).applyMatrix4(t),nd[5].set(this.max.x,this.min.y,this.max.z).applyMatrix4(t),nd[6].set(this.max.x,this.max.y,this.min.z).applyMatrix4(t),nd[7].set(this.max.x,this.max.y,this.max.z).applyMatrix4(t),this.setFromPoints(nd)),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 nd=[new O,new O,new O,new O,new O,new O,new O,new O],xl=new O,HC=new Vs,fg=new O,pg=new O,mg=new O,Cu=new O,Su=new O,ef=new O,Cb=new O,GC=new O,$C=new O,tf=new O;function Jk(i,t,e,n,r){for(let s=0,o=i.length-3;s<=o;s+=3){tf.fromArray(i,s);const a=r.x*Math.abs(tf.x)+r.y*Math.abs(tf.y)+r.z*Math.abs(tf.z),l=t.dot(tf),c=e.dot(tf),d=n.dot(tf);if(Math.max(-Math.max(l,c,d),Math.min(l,c,d))>a)return!1}return!0}const oae=new Vs,Sb=new O,eP=new O;class zs{constructor(t=new O,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):oae.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;Sb.subVectors(t,this.center);const e=Sb.lengthSq();if(e>this.radius*this.radius){const n=Math.sqrt(e),r=.5*(n-this.radius);this.center.addScaledVector(Sb,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):(eP.subVectors(t.center,this.center).setLength(t.radius),this.expandByPoint(Sb.copy(t.center).add(eP)),this.expandByPoint(Sb.copy(t.center).sub(eP))),this)}equals(t){return t.center.equals(this.center)&&t.radius===this.radius}clone(){return(new this.constructor).copy(this)}}const id=new O,tP=new O,WC=new O,Eu=new O,nP=new O,jC=new O,iP=new O;class Eb{constructor(t=new O,e=new O(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,id)),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=id.subVectors(t,this.origin).dot(this.direction);return e<0?this.origin.distanceToSquared(t):(id.copy(this.origin).addScaledVector(this.direction,e),id.distanceToSquared(t))}distanceSqToSegment(t,e,n,r){tP.copy(t).add(e).multiplyScalar(.5),WC.copy(e).sub(t).normalize(),Eu.copy(this.origin).sub(tP);const s=.5*t.distanceTo(e),o=-this.direction.dot(WC),a=Eu.dot(this.direction),l=-Eu.dot(WC),c=Eu.lengthSq(),d=Math.abs(1-o*o);let h,p,m,g;if(d>0)if(h=o*l-a,p=o*a-l,g=s*d,h>=0)if(p>=-g)if(p<=g){const b=1/d;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(tP).addScaledVector(WC,p),m}intersectSphere(t,e){id.subVectors(t.center,this.origin);const n=id.dot(this.direction),r=id.dot(id)-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,d=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),d>=0?(s=(t.min.y-p.y)*d,o=(t.max.y-p.y)*d):(s=(t.max.y-p.y)*d,o=(t.min.y-p.y)*d),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,id)}intersectTriangle(t,e,n,r,s){nP.subVectors(e,t),jC.subVectors(n,t),iP.crossVectors(nP,jC);let a,o=this.direction.dot(iP);if(o>0){if(r)return null;a=1}else{if(!(o<0))return null;a=-1,o=-o}Eu.subVectors(this.origin,t);const l=a*this.direction.dot(jC.crossVectors(Eu,jC));if(l<0)return null;const c=a*this.direction.dot(nP.cross(Eu));if(c<0||l+c>o)return null;const d=-a*Eu.dot(iP);return d<0?null:this.at(d/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 Nt{constructor(t,e,n,r,s,o,a,l,c,d,h,p,m,g,b,v){Nt.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,d,h,p,m,g,b,v)}set(t,e,n,r,s,o,a,l,c,d,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]=d,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 Nt).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/gg.setFromMatrixColumn(t,0).length(),s=1/gg.setFromMatrixColumn(t,1).length(),o=1/gg.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),d=Math.cos(s),h=Math.sin(s);if("XYZ"===t.order){const p=o*d,m=o*h,g=a*d,b=a*h;e[0]=l*d,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*d,m=l*h,g=c*d,b=c*h;e[0]=p+b*a,e[4]=g*a-m,e[8]=o*c,e[1]=o*h,e[5]=o*d,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*d,m=l*h,g=c*d,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*d,e[9]=b-p*a,e[2]=-o*c,e[6]=a,e[10]=o*l}else if("ZYX"===t.order){const p=o*d,m=o*h,g=a*d,b=a*h;e[0]=l*d,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*d,e[4]=b-p*h,e[8]=g*h+m,e[1]=h,e[5]=o*d,e[9]=-a*d,e[2]=-c*d,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*d,e[4]=-h,e[8]=c*d,e[1]=p*h+b,e[5]=o*d,e[9]=m*h-g,e[2]=g*h-m,e[6]=a*d,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(aae,t,lae)}lookAt(t,e,n){const r=this.elements;return na.subVectors(t,e),0===na.lengthSq()&&(na.z=1),na.normalize(),Au.crossVectors(n,na),0===Au.lengthSq()&&(1===Math.abs(n.z)?na.x+=1e-4:na.z+=1e-4,na.normalize(),Au.crossVectors(n,na)),Au.normalize(),YC.crossVectors(na,Au),r[0]=Au.x,r[4]=YC.x,r[8]=na.x,r[1]=Au.y,r[5]=YC.y,r[9]=na.y,r[2]=Au.z,r[6]=YC.z,r[10]=na.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],d=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],F=n[15],D=r[0],k=r[4],B=r[8],T=r[12],A=r[1],$=r[5],ie=r[9],ne=r[13],se=r[2],ge=r[6],q=r[10],re=r[14],J=r[3],we=r[7],Be=r[11],Ye=r[15];return s[0]=o*D+a*A+l*se+c*J,s[4]=o*k+a*$+l*ge+c*we,s[8]=o*B+a*ie+l*q+c*Be,s[12]=o*T+a*ne+l*re+c*Ye,s[1]=d*D+h*A+p*se+m*J,s[5]=d*k+h*$+p*ge+m*we,s[9]=d*B+h*ie+p*q+m*Be,s[13]=d*T+h*ne+p*re+m*Ye,s[2]=g*D+b*A+v*se+y*J,s[6]=g*k+b*$+v*ge+y*we,s[10]=g*B+b*ie+v*q+y*Be,s[14]=g*T+b*ne+v*re+y*Ye,s[3]=M*D+x*A+C*se+F*J,s[7]=M*k+x*$+C*ge+F*we,s[11]=M*B+x*ie+C*q+F*Be,s[15]=M*T+x*ne+C*re+F*Ye,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],d=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*d-s*l*d)+t[11]*(+e*c*h-e*a*m-s*o*h+n*o*m+s*a*d-n*c*d)+t[15]*(-r*a*d-e*l*h+e*a*p+r*o*h-n*o*p+n*l*d)}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],d=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-d*v*c-g*l*m+o*v*m+d*l*y-o*p*y,C=d*b*c-g*h*c+g*a*m-o*b*m-d*a*y+o*h*y,F=g*h*l-d*b*l-g*a*p+o*b*p+d*a*v-o*h*v,D=e*M+n*x+r*C+s*F;if(0===D)return this.set(0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0);const k=1/D;return t[0]=M*k,t[1]=(b*p*s-h*v*s-b*r*m+n*v*m+h*r*y-n*p*y)*k,t[2]=(a*v*s-b*l*s+b*r*c-n*v*c-a*r*y+n*l*y)*k,t[3]=(h*l*s-a*p*s-h*r*c+n*p*c+a*r*m-n*l*m)*k,t[4]=x*k,t[5]=(d*v*s-g*p*s+g*r*m-e*v*m-d*r*y+e*p*y)*k,t[6]=(g*l*s-o*v*s-g*r*c+e*v*c+o*r*y-e*l*y)*k,t[7]=(o*p*s-d*l*s+d*r*c-e*p*c-o*r*m+e*l*m)*k,t[8]=C*k,t[9]=(g*h*s-d*b*s-g*n*m+e*b*m+d*n*y-e*h*y)*k,t[10]=(o*b*s-g*a*s+g*n*c-e*b*c-o*n*y+e*a*y)*k,t[11]=(d*a*s-o*h*s-d*n*c+e*h*c+o*n*m-e*a*m)*k,t[12]=F*k,t[13]=(d*b*r-g*h*r+g*n*p-e*b*p-d*n*v+e*h*v)*k,t[14]=(g*a*r-o*b*r-g*n*l+e*b*l+o*n*v-e*a*v)*k,t[15]=(o*h*r-d*a*r+d*n*l-e*h*l-o*n*p+e*a*p)*k,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,d=s*a;return this.set(c*o+n,c*a-r*l,c*l+r*a,0,c*a+r*l,d*a+n,d*l-r*o,0,c*l-r*a,d*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,d=o+o,h=a+a,p=s*c,m=s*d,g=s*h,b=o*d,v=o*h,y=a*h,M=l*c,x=l*d,C=l*h,F=n.x,D=n.y,k=n.z;return r[0]=(1-(b+y))*F,r[1]=(m+C)*F,r[2]=(g-x)*F,r[3]=0,r[4]=(m-C)*D,r[5]=(1-(p+y))*D,r[6]=(v+M)*D,r[7]=0,r[8]=(g+x)*k,r[9]=(v-M)*k,r[10]=(1-(p+b))*k,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=gg.set(r[0],r[1],r[2]).length();const o=gg.set(r[4],r[5],r[6]).length(),a=gg.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],wl.copy(this);const c=1/s,d=1/o,h=1/a;return wl.elements[0]*=c,wl.elements[1]*=c,wl.elements[2]*=c,wl.elements[4]*=d,wl.elements[5]*=d,wl.elements[6]*=d,wl.elements[8]*=h,wl.elements[9]*=h,wl.elements[10]*=h,e.setFromRotationMatrix(wl),n.x=s,n.y=o,n.z=a,this}makePerspective(t,e,n,r,s,o,a=td){const l=this.elements,c=2*s/(e-t),d=2*s/(n-r),h=(e+t)/(e-t),p=(n+r)/(n-r);let m,g;if(a===td)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]=d,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=td){const l=this.elements,c=1/(e-t),d=1/(n-r),h=1/(o-s),p=(e+t)*c,m=(n+r)*d;let g,b;if(a===td)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*d,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 gg=new O,wl=new Nt,aae=new O(0,0,0),lae=new O(1,1,1),Au=new O,YC=new O,na=new O,F4=new Nt,L4=new uo;let rd=(()=>{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],d=s[5],h=s[9],p=s[2],m=s[6],g=s[10];switch(n){case"XYZ":this._y=Math.asin(tr(l,-1,1)),Math.abs(l)<.9999999?(this._x=Math.atan2(-h,g),this._z=Math.atan2(-a,o)):(this._x=Math.atan2(m,d),this._z=0);break;case"YXZ":this._x=Math.asin(-tr(h,-1,1)),Math.abs(h)<.9999999?(this._y=Math.atan2(l,g),this._z=Math.atan2(c,d)):(this._y=Math.atan2(-p,o),this._z=0);break;case"ZXY":this._x=Math.asin(tr(m,-1,1)),Math.abs(m)<.9999999?(this._y=Math.atan2(-p,g),this._z=Math.atan2(-a,d)):(this._y=0,this._z=Math.atan2(c,o));break;case"ZYX":this._y=Math.asin(-tr(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,d));break;case"YZX":this._z=Math.asin(tr(c,-1,1)),Math.abs(c)<.9999999?(this._x=Math.atan2(-h,d),this._y=Math.atan2(-p,o)):(this._x=0,this._y=Math.atan2(l,g));break;case"XZY":this._z=Math.asin(-tr(a,-1,1)),Math.abs(a)<.9999999?(this._x=Math.atan2(m,d),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 F4.makeRotationFromQuaternion(e),this.setFromRotationMatrix(F4,n,r)}setFromVector3(e,n=this._order){return this.set(e.x,e.y,e.z,n)}reorder(e){return L4.setFromEuler(this),this.setFromQuaternion(L4,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 rP{constructor(){this.mask=1}set(t){this.mask=(1<>>0}enable(t){this.mask|=1<{class i extends og{constructor(){super(),this.isObject3D=!0,Object.defineProperty(this,"id",{value:cae++}),this.uuid=ta(),this.name="",this.type="Object3D",this.parent=null,this.children=[],this.up=i.DEFAULT_UP.clone();const e=new O,n=new rd,r=new uo,s=new O(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 Nt},normalMatrix:{value:new wn}}),this.matrix=new Nt,this.matrixWorld=new Nt,this.matrixAutoUpdate=i.DEFAULT_MATRIX_AUTO_UPDATE,this.matrixWorldAutoUpdate=i.DEFAULT_MATRIX_WORLD_AUTO_UPDATE,this.matrixWorldNeedsUpdate=!1,this.layers=new rP,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 _g.setFromAxisAngle(e,n),this.quaternion.multiply(_g),this}rotateOnWorldAxis(e,n){return _g.setFromAxisAngle(e,n),this.quaternion.premultiply(_g),this}rotateX(e){return this.rotateOnAxis(B4,e)}rotateY(e){return this.rotateOnAxis(U4,e)}rotateZ(e){return this.rotateOnAxis(V4,e)}translateOnAxis(e,n){return N4.copy(e).applyQuaternion(this.quaternion),this.position.add(N4.multiplyScalar(n)),this}translateX(e){return this.translateOnAxis(B4,e)}translateY(e){return this.translateOnAxis(U4,e)}translateZ(e){return this.translateOnAxis(V4,e)}localToWorld(e){return this.updateWorldMatrix(!0,!1),e.applyMatrix4(this.matrixWorld)}worldToLocal(e){return this.updateWorldMatrix(!0,!1),e.applyMatrix4(sd.copy(this.matrixWorld).invert())}lookAt(e,n,r){e.isVector3?qC.copy(e):qC.set(e,n,r);const s=this.parent;this.updateWorldMatrix(!0,!1),Ab.setFromMatrixPosition(this.matrixWorld),this.isCamera||this.isLight?sd.lookAt(Ab,qC,this.up):sd.lookAt(qC,Ab,this.up),this.quaternion.setFromRotationMatrix(sd),s&&(sd.extractRotation(s.matrixWorld),_g.setFromRotationMatrix(sd),this.quaternion.premultiply(_g.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.maxInstanceCount=this._maxInstanceCount,s.maxVertexCount=this._maxVertexCount,s.maxIndexCount=this._maxIndexCount,s.geometryInitialized=this._geometryInitialized,s.geometryCount=this._geometryCount,s.matricesTexture=this._matricesTexture.toJSON(e),null!==this._colorsTexture&&(s.colorsTexture=this._colorsTexture.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 d=0,h=c.length;d0){s.children=[];for(let l=0;l0){s.animations=[];for(let l=0;l0&&(r.geometries=l),c.length>0&&(r.materials=c),d.length>0&&(r.textures=d),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 d in l){const h=l[d];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){Ml.subVectors(r,e),od.subVectors(n,e),oP.subVectors(t,e);const o=Ml.dot(Ml),a=Ml.dot(od),l=Ml.dot(oP),c=od.dot(od),d=od.dot(oP),h=o*c-a*a;if(0===h)return s.set(0,0,0),null;const p=1/h,m=(c*l-a*d)*p,g=(o*d-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,ad)&&ad.x>=0&&ad.y>=0&&ad.x+ad.y<=1}static getInterpolation(t,e,n,r,s,o,a,l){return null===this.getBarycoord(t,e,n,r,ad)?(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,ad.x),l.addScaledVector(o,ad.y),l.addScaledVector(a,ad.z),l)}static isFrontFacing(t,e,n,r){return Ml.subVectors(n,e),od.subVectors(t,e),Ml.cross(od).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 Ml.subVectors(this.c,this.b),od.subVectors(this.a,this.b),.5*Ml.cross(od).length()}getMidpoint(t){return t.addVectors(this.a,this.b).add(this.c).multiplyScalar(1/3)}getNormal(t){return Oa.getNormal(this.a,this.b,this.c,t)}getPlane(t){return t.setFromCoplanarPoints(this.a,this.b,this.c)}getBarycoord(t,e){return Oa.getBarycoord(t,this.a,this.b,this.c,e)}getInterpolation(t,e,n,r,s){return Oa.getInterpolation(t,this.a,this.b,this.c,e,n,r,s)}containsPoint(t){return Oa.containsPoint(t,this.a,this.b,this.c)}isFrontFacing(t){return Oa.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;yg.subVectors(r,n),bg.subVectors(s,n),aP.subVectors(t,n);const l=yg.dot(aP),c=bg.dot(aP);if(l<=0&&c<=0)return e.copy(n);lP.subVectors(t,r);const d=yg.dot(lP),h=bg.dot(lP);if(d>=0&&h<=d)return e.copy(r);const p=l*h-d*c;if(p<=0&&l>=0&&d<=0)return o=l/(l-d),e.copy(n).addScaledVector(yg,o);cP.subVectors(t,s);const m=yg.dot(cP),g=bg.dot(cP);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(bg,a);const v=d*g-m*h;if(v<=0&&h-d>=0&&m-g>=0)return H4.subVectors(s,r),a=(h-d)/(h-d+(m-g)),e.copy(r).addScaledVector(H4,a);const y=1/(v+b+p);return o=b*y,a=p*y,e.copy(n).addScaledVector(yg,o).addScaledVector(bg,a)}equals(t){return t.a.equals(this.a)&&t.b.equals(this.b)&&t.c.equals(this.c)}}const G4={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},Du={h:0,s:0,l:0},XC={h:0,s:0,l:0};function dP(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 qe{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=cs){return t=Math.floor(t),this.r=(t>>16&255)/255,this.g=(t>>8&255)/255,this.b=(255&t)/255,Jn.toWorkingColorSpace(this,e),this}setRGB(t,e,n,r=Jn.workingColorSpace){return this.r=t,this.g=e,this.b=n,Jn.toWorkingColorSpace(this,r),this}setHSL(t,e,n,r=Jn.workingColorSpace){if(t=Yk(t,1),e=tr(e,0,1),n=tr(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=dP(o,s,t+1/3),this.g=dP(o,s,t),this.b=dP(o,s,t-1/3)}return Jn.toWorkingColorSpace(this,r),this}setStyle(t,e=cs){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=cs){const n=G4[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=dg(t.r),this.g=dg(t.g),this.b=dg(t.b),this}copyLinearToSRGB(t){return this.r=Xk(t.r),this.g=Xk(t.g),this.b=Xk(t.b),this}convertSRGBToLinear(){return this.copySRGBToLinear(this),this}convertLinearToSRGB(){return this.copyLinearToSRGB(this),this}getHex(t=cs){return Jn.fromWorkingColorSpace(Hs.copy(this),t),65536*Math.round(tr(255*Hs.r,0,255))+256*Math.round(tr(255*Hs.g,0,255))+Math.round(tr(255*Hs.b,0,255))}getHexString(t=cs){return("000000"+this.getHex(t).toString(16)).slice(-6)}getHSL(t,e=Jn.workingColorSpace){Jn.fromWorkingColorSpace(Hs.copy(this),e);const n=Hs.r,r=Hs.g,s=Hs.b,o=Math.max(n,r,s),a=Math.min(n,r,s);let l,c;const d=(a+o)/2;if(a===o)l=0,c=0;else{const h=o-a;switch(c=d<=.5?h/(o+a):h/(2-o-a),o){case n:l=(r-s)/h+(r0!=t>0&&this.version++,this._alphaTest=t}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.dispersion&&(n.dispersion=this.dispersion),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!==Zm&&(n.blending=this.blending),this.side!==lc&&(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!==ak&&(n.blendSrc=this.blendSrc),this.blendDst!==lk&&(n.blendDst=this.blendDst),this.blendEquation!==Kh&&(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!==SC&&(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!==sg&&(n.stencilFail=this.stencilFail),this.stencilZFail!==sg&&(n.stencilZFail=this.stencilZFail),this.stencilZPass!==sg&&(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++}onBuild(){console.warn("Material: onBuild() has been removed.")}onBeforeRender(){console.warn("Material: onBeforeRender() has been removed.")}}class qi extends Fo{constructor(t){super(),this.isMeshBasicMaterial=!0,this.type="MeshBasicMaterial",this.color=new qe(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 rd,this.combine=EC,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 yr=new O,KC=new xe;class Hi{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=ea,this.version=0}onUploadCallback(){}set needsUpdate(t){!0===t&&this.version++}get updateRange(){return cg("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],d=[];for(let h=0,p=c.length;h0&&(r[l]=d,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 d=[],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))&&(j4.copy(s).invert(),nf.copy(t.ray).applyMatrix4(j4),(null===n.boundingBox||!1!==nf.intersectsBox(n.boundingBox))&&this._computeIntersections(t,e,nf)))}_computeIntersections(t,e,n){let r;const s=this.geometry,o=this.material,a=s.index,l=s.attributes.position,c=s.attributes.uv,d=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:iS.clone(),object:i}}(i,t,e,n,wg,Mg,Cg,nS);if(d){r&&(JC.fromBufferAttribute(r,a),eS.fromBufferAttribute(r,l),tS.fromBufferAttribute(r,c),d.uv=Oa.getInterpolation(nS,wg,Mg,Cg,JC,eS,tS,new xe)),s&&(JC.fromBufferAttribute(s,a),eS.fromBufferAttribute(s,l),tS.fromBufferAttribute(s,c),d.uv1=Oa.getInterpolation(nS,wg,Mg,Cg,JC,eS,tS,new xe)),o&&(q4.fromBufferAttribute(o,a),X4.fromBufferAttribute(o,l),K4.fromBufferAttribute(o,c),d.normal=Oa.getInterpolation(nS,wg,Mg,Cg,q4,X4,K4,new O),d.normal.dot(n.direction)>0&&d.normal.multiplyScalar(-1));const h={a,b:l,c,normal:new O,materialIndex:0};Oa.getNormal(wg,Mg,Cg,h.normal),d.face=h}return d}class rf 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=[],d=[],h=[];let p=0,m=0;function g(b,v,y,M,x,C,F,D,k,B,T){const A=C/k,$=F/B,ie=C/2,ne=F/2,se=D/2,ge=k+1,q=B+1;let re=0,J=0;const we=new O;for(let Be=0;Be0?1:-1,d.push(we.x,we.y,we.z),h.push(It/k),h.push(1-Be/B),re+=1}for(let Be=0;Be0&&(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 fP extends Fr{constructor(){super(),this.isCamera=!0,this.type="Camera",this.matrixWorldInverse=new Nt,this.projectionMatrix=new Nt,this.projectionMatrixInverse=new Nt,this.coordinateSystem=td}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 Tu=new O,J4=new xe,e5=new xe;class br extends fP{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*ag*Math.atan(e),this.updateProjectionMatrix()}getFocalLength(){const t=Math.tan(.5*Jh*this.fov);return.5*this.getFilmHeight()/t}getEffectiveFOV(){return 2*ag*Math.atan(Math.tan(.5*Jh*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){Tu.set(-1,-1,.5).applyMatrix4(this.projectionMatrixInverse),e.set(Tu.x,Tu.y).multiplyScalar(-t/Tu.z),Tu.set(1,1,.5).applyMatrix4(this.projectionMatrixInverse),n.set(Tu.x,Tu.y).multiplyScalar(-t/Tu.z)}getViewSize(t,e){return this.getViewBounds(t,J4,e5),e.subVectors(e5,J4)}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*Jh*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 bae extends Fr{constructor(t,e,n){super(),this.type="CubeCamera",this.renderTarget=n,this.coordinateSystem=null,this.activeMipmapLevel=0;const r=new br(-90,1,t,e);r.layers=this.layers,this.add(r);const s=new br(-90,1,t,e);s.layers=this.layers,this.add(s);const o=new br(-90,1,t,e);o.layers=this.layers,this.add(o);const a=new br(-90,1,t,e);a.layers=this.layers,this.add(a);const l=new br(-90,1,t,e);l.layers=this.layers,this.add(l);const c=new br(-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===td)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,d]=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,d),t.setRenderTarget(h,p,m),t.xr.enabled=g,n.texture.needsPMREMUpdate=!0}}class sS extends Oo{constructor(t,e,n,r,s,o,a,l,c,d){super(t=void 0!==t?t:[],e=void 0!==e?e:cc,n,r,s,o,a,l,c,d),this.isCubeTexture=!0,this.flipY=!1}get images(){return this.image}set images(t){this.image=t}}class xae extends Mu{constructor(t=1,e={}){super(t,t,e),this.isWebGLCubeRenderTarget=!0;const n={width:t,height:t,depth:1};this.texture=new sS([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:cr}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 rf(5,5,5),s=new Cl({name:"CubemapFromEquirect",uniforms:Sg(n_uniforms),vertexShader:n_vertexShader,fragmentShader:n_fragmentShader,side:ko,blending:Jc});s.uniforms.tEquirect.value=e;const o=new Mn(r,s),a=e.minFilter;return e.minFilter===bl&&(e.minFilter=cr),new bae(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 pP=new O,wae=new O,Mae=new wn;class sf{constructor(t=new O(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=pP.subVectors(n,e).cross(wae.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(pP),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||Mae.getNormalMatrix(t),r=this.coplanarPoint(pP).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 af=new zs,oS=new O;class aS{constructor(t=new sf,e=new sf,n=new sf,r=new sf,s=new sf,o=new sf){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=td){const n=this.planes,r=t.elements,s=r[0],o=r[1],a=r[2],l=r[3],c=r[4],d=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+d,v+g,C+M).normalize(),n[3].setComponents(l-o,p-d,v-g,C-M).normalize(),n[4].setComponents(l-a,p-h,v-b,C-x).normalize(),e===td)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(),af.copy(t.boundingSphere).applyMatrix4(t.matrixWorld);else{const e=t.geometry;null===e.boundingSphere&&e.computeBoundingSphere(),af.copy(e.boundingSphere).applyMatrix4(t.matrixWorld)}return this.intersectsSphere(af)}intersectsSprite(t){return af.center.set(0,0,0),af.radius=.7071067811865476,af.applyMatrix4(t.matrixWorld),this.intersectsSphere(af)}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,oS.y=r.normal.y>0?t.max.y:t.min.y,oS.z=r.normal.z>0?t.max.z:t.min.z,r.distanceToPoint(oS)<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 t5(){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 Cae(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.isInterleavedBufferAttribute&&(a=a.data),a.isGLBufferAttribute){const d=t.get(a);return void((!d||d.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 ) || defined( USE_BATCHING_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 ) || defined( USE_BATCHING_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\n#ifdef USE_BATCHING_COLOR\n\tvec3 batchingColor = getBatchingColor( getIndirectIndex( gl_DrawID ) );\n\tvColor.xyz *= batchingColor.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}\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}",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_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\tfloat distanceFalloff = 1.0 / max( pow( lightDistance, decayExponent ), 0.01 );\n\tif ( cutoffDistance > 0.0 ) {\n\t\tdistanceFalloff *= pow2( saturate( 1.0 - pow4( lightDistance / cutoffDistance ) ) );\n\t}\n\treturn distanceFalloff;\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_DISPERSION\n\tmaterial.dispersion = dispersion;\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\tfloat dispersion;\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.shadowIntensity, 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.shadowIntensity, 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.shadowIntensity, 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 )\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\tfor ( int i = 0; i < MORPHTARGETS_COUNT; i ++ ) {\n\t\tif ( morphTargetInfluences[ i ] != 0.0 ) objectNormal += getMorph( gl_VertexID, i, 1 ).xyz * morphTargetInfluences[ i ];\n\t}\n#endif",morphtarget_pars_vertex:"#ifdef USE_MORPHTARGETS\n\t#ifndef USE_INSTANCING_MORPH\n\t\tuniform float morphTargetBaseInfluence;\n\t\tuniform float morphTargetInfluences[ MORPHTARGETS_COUNT ];\n\t#endif\n\tuniform sampler2DArray morphTargetsTexture;\n\tuniform ivec2 morphTargetsTextureSize;\n\tvec4 getMorph( const in int vertexIndex, const in int morphTargetIndex, const in int offset ) {\n\t\tint texelIndex = vertexIndex * MORPHTARGETS_TEXTURE_STRIDE + offset;\n\t\tint y = texelIndex / morphTargetsTextureSize.x;\n\t\tint x = texelIndex - y * morphTargetsTextureSize.x;\n\t\tivec3 morphUV = ivec3( x, y, morphTargetIndex );\n\t\treturn texelFetch( morphTargetsTexture, morphUV, 0 );\n\t}\n#endif",morphtarget_vertex:"#ifdef USE_MORPHTARGETS\n\ttransformed *= morphTargetBaseInfluence;\n\tfor ( int i = 0; i < MORPHTARGETS_COUNT; i ++ ) {\n\t\tif ( morphTargetInfluences[ i ] != 0.0 ) transformed += getMorph( gl_VertexID, i, 0 ).xyz * morphTargetInfluences[ i ];\n\t}\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.;const float ShiftRight8 = 1. / 256.;\nconst float Inv255 = 1. / 255.;\nconst vec4 PackFactors = vec4( 1.0, 256.0, 256.0 * 256.0, 256.0 * 256.0 * 256.0 );\nconst vec2 UnpackFactors2 = vec2( UnpackDownscale, 1.0 / PackFactors.g );\nconst vec3 UnpackFactors3 = vec3( UnpackDownscale / PackFactors.rg, 1.0 / PackFactors.b );\nconst vec4 UnpackFactors4 = vec4( UnpackDownscale / PackFactors.rgb, 1.0 / PackFactors.a );\nvec4 packDepthToRGBA( const in float v ) {\n\tif( v <= 0.0 )\n\t\treturn vec4( 0., 0., 0., 0. );\n\tif( v >= 1.0 )\n\t\treturn vec4( 1., 1., 1., 1. );\n\tfloat vuf;\n\tfloat af = modf( v * PackFactors.a, vuf );\n\tfloat bf = modf( vuf * ShiftRight8, vuf );\n\tfloat gf = modf( vuf * ShiftRight8, vuf );\n\treturn vec4( vuf * Inv255, gf * PackUpscale, bf * PackUpscale, af );\n}\nvec3 packDepthToRGB( const in float v ) {\n\tif( v <= 0.0 )\n\t\treturn vec3( 0., 0., 0. );\n\tif( v >= 1.0 )\n\t\treturn vec3( 1., 1., 1. );\n\tfloat vuf;\n\tfloat bf = modf( v * PackFactors.b, vuf );\n\tfloat gf = modf( vuf * ShiftRight8, vuf );\n\treturn vec3( vuf * Inv255, gf * PackUpscale, bf );\n}\nvec2 packDepthToRG( const in float v ) {\n\tif( v <= 0.0 )\n\t\treturn vec2( 0., 0. );\n\tif( v >= 1.0 )\n\t\treturn vec2( 1., 1. );\n\tfloat vuf;\n\tfloat gf = modf( v * 256., vuf );\n\treturn vec2( vuf * Inv255, gf );\n}\nfloat unpackRGBAToDepth( const in vec4 v ) {\n\treturn dot( v, UnpackFactors4 );\n}\nfloat unpackRGBToDepth( const in vec3 v ) {\n\treturn dot( v, UnpackFactors3 );\n}\nfloat unpackRGToDepth( const in vec2 v ) {\n\treturn v.r * UnpackFactors2.r + v.g * UnpackFactors2.g;\n}\nvec4 pack2HalfToRGBA( const in 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( const in 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 shadowIntensity;\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 shadowIntensity;\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 shadowIntensity;\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 shadowIntensity, 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 mix( 1.0, shadow, shadowIntensity );\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 shadowIntensity, 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 mix( 1.0, shadow, shadowIntensity );\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 shadowIntensity;\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 shadowIntensity;\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 shadowIntensity;\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.shadowIntensity, 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.shadowIntensity, 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.shadowIntensity, 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\tconst float StartCompression = 0.8 - 0.04;\n\tconst float 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, vec3( newPeak ), 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.dispersion, 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 dispersion, const in float ior, const in float thickness,\n\t\tconst in vec3 attenuationColor, const in float attenuationDistance ) {\n\t\tvec4 transmittedLight;\n\t\tvec3 transmittance;\n\t\t#ifdef USE_DISPERSION\n\t\t\tfloat halfSpread = ( ior - 1.0 ) * 0.025 * dispersion;\n\t\t\tvec3 iors = vec3( ior - halfSpread, ior, ior + halfSpread );\n\t\t\tfor ( int i = 0; i < 3; i ++ ) {\n\t\t\t\tvec3 transmissionRay = getVolumeTransmissionRay( n, v, thickness, iors[ i ], modelMatrix );\n\t\t\t\tvec3 refractedRayExit = position + transmissionRay;\n\t\t\n\t\t\t\tvec4 ndcPos = projMatrix * viewMatrix * vec4( refractedRayExit, 1.0 );\n\t\t\t\tvec2 refractionCoords = ndcPos.xy / ndcPos.w;\n\t\t\t\trefractionCoords += 1.0;\n\t\t\t\trefractionCoords /= 2.0;\n\t\t\n\t\t\t\tvec4 transmissionSample = getTransmissionSample( refractionCoords, roughness, iors[ i ] );\n\t\t\t\ttransmittedLight[ i ] = transmissionSample[ i ];\n\t\t\t\ttransmittedLight.a += transmissionSample.a;\n\t\t\t\ttransmittance[ i ] = diffuseColor[ i ] * volumeAttenuation( length( transmissionRay ), attenuationColor, attenuationDistance )[ i ];\n\t\t\t}\n\t\t\ttransmittedLight.a /= 3.0;\n\t\t\n\t\t#else\n\t\t\n\t\t\tvec3 transmissionRay = getVolumeTransmissionRay( n, v, thickness, ior, modelMatrix );\n\t\t\tvec3 refractedRayExit = position + transmissionRay;\n\t\t\tvec4 ndcPos = projMatrix * viewMatrix * vec4( refractedRayExit, 1.0 );\n\t\t\tvec2 refractionCoords = ndcPos.xy / ndcPos.w;\n\t\t\trefractionCoords += 1.0;\n\t\t\trefractionCoords /= 2.0;\n\t\t\ttransmittedLight = getTransmissionSample( refractionCoords, roughness, ior );\n\t\t\ttransmittance = diffuseColor * volumeAttenuation( length( transmissionRay ), attenuationColor, attenuationDistance );\n\t\t\n\t\t#endif\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#elif DEPTH_PACKING == 3202\n\t\tgl_FragColor = vec4( packDepthToRGB( fragCoordZ ), 1.0 );\n\t#elif DEPTH_PACKING == 3203\n\t\tgl_FragColor = vec4( packDepthToRG( fragCoordZ ), 0.0, 1.0 );\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_DISPERSION\n\tuniform float dispersion;\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}"},Qe={common:{diffuse:{value:new qe(16777215)},opacity:{value:1},map:{value:null},mapTransform:{value:new wn},alphaMap:{value:null},alphaMapTransform:{value:new wn},alphaTest:{value:0}},specularmap:{specularMap:{value:null},specularMapTransform:{value:new wn}},envmap:{envMap:{value:null},envMapRotation:{value:new wn},flipEnvMap:{value:-1},reflectivity:{value:1},ior:{value:1.5},refractionRatio:{value:.98}},aomap:{aoMap:{value:null},aoMapIntensity:{value:1},aoMapTransform:{value:new wn}},lightmap:{lightMap:{value:null},lightMapIntensity:{value:1},lightMapTransform:{value:new wn}},bumpmap:{bumpMap:{value:null},bumpMapTransform:{value:new wn},bumpScale:{value:1}},normalmap:{normalMap:{value:null},normalMapTransform:{value:new wn},normalScale:{value:new xe(1,1)}},displacementmap:{displacementMap:{value:null},displacementMapTransform:{value:new wn},displacementScale:{value:1},displacementBias:{value:0}},emissivemap:{emissiveMap:{value:null},emissiveMapTransform:{value:new wn}},metalnessmap:{metalnessMap:{value:null},metalnessMapTransform:{value:new wn}},roughnessmap:{roughnessMap:{value:null},roughnessMapTransform:{value:new wn}},gradientmap:{gradientMap:{value:null}},fog:{fogDensity:{value:25e-5},fogNear:{value:1},fogFar:{value:2e3},fogColor:{value:new qe(16777215)}},lights:{ambientLightColor:{value:[]},lightProbe:{value:[]},directionalLights:{value:[],properties:{direction:{},color:{}}},directionalLightShadows:{value:[],properties:{shadowIntensity:1,shadowBias:{},shadowNormalBias:{},shadowRadius:{},shadowMapSize:{}}},directionalShadowMap:{value:[]},directionalShadowMatrix:{value:[]},spotLights:{value:[],properties:{color:{},position:{},direction:{},distance:{},coneCos:{},penumbraCos:{},decay:{}}},spotLightShadows:{value:[],properties:{shadowIntensity:1,shadowBias:{},shadowNormalBias:{},shadowRadius:{},shadowMapSize:{}}},spotLightMap:{value:[]},spotShadowMap:{value:[]},spotLightMatrix:{value:[]},pointLights:{value:[],properties:{color:{},position:{},decay:{},distance:{}}},pointLightShadows:{value:[],properties:{shadowIntensity:1,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 qe(16777215)},opacity:{value:1},size:{value:1},scale:{value:1},map:{value:null},alphaMap:{value:null},alphaMapTransform:{value:new wn},alphaTest:{value:0},uvTransform:{value:new wn}},sprite:{diffuse:{value:new qe(16777215)},opacity:{value:1},center:{value:new xe(.5,.5)},rotation:{value:0},map:{value:null},mapTransform:{value:new wn},alphaMap:{value:null},alphaMapTransform:{value:new wn},alphaTest:{value:0}}},dc={basic:{uniforms:ho([Qe.common,Qe.specularmap,Qe.envmap,Qe.aomap,Qe.lightmap,Qe.fog]),vertexShader:Cn.meshbasic_vert,fragmentShader:Cn.meshbasic_frag},lambert:{uniforms:ho([Qe.common,Qe.specularmap,Qe.envmap,Qe.aomap,Qe.lightmap,Qe.emissivemap,Qe.bumpmap,Qe.normalmap,Qe.displacementmap,Qe.fog,Qe.lights,{emissive:{value:new qe(0)}}]),vertexShader:Cn.meshlambert_vert,fragmentShader:Cn.meshlambert_frag},phong:{uniforms:ho([Qe.common,Qe.specularmap,Qe.envmap,Qe.aomap,Qe.lightmap,Qe.emissivemap,Qe.bumpmap,Qe.normalmap,Qe.displacementmap,Qe.fog,Qe.lights,{emissive:{value:new qe(0)},specular:{value:new qe(1118481)},shininess:{value:30}}]),vertexShader:Cn.meshphong_vert,fragmentShader:Cn.meshphong_frag},standard:{uniforms:ho([Qe.common,Qe.envmap,Qe.aomap,Qe.lightmap,Qe.emissivemap,Qe.bumpmap,Qe.normalmap,Qe.displacementmap,Qe.roughnessmap,Qe.metalnessmap,Qe.fog,Qe.lights,{emissive:{value:new qe(0)},roughness:{value:1},metalness:{value:0},envMapIntensity:{value:1}}]),vertexShader:Cn.meshphysical_vert,fragmentShader:Cn.meshphysical_frag},toon:{uniforms:ho([Qe.common,Qe.aomap,Qe.lightmap,Qe.emissivemap,Qe.bumpmap,Qe.normalmap,Qe.displacementmap,Qe.gradientmap,Qe.fog,Qe.lights,{emissive:{value:new qe(0)}}]),vertexShader:Cn.meshtoon_vert,fragmentShader:Cn.meshtoon_frag},matcap:{uniforms:ho([Qe.common,Qe.bumpmap,Qe.normalmap,Qe.displacementmap,Qe.fog,{matcap:{value:null}}]),vertexShader:Cn.meshmatcap_vert,fragmentShader:Cn.meshmatcap_frag},points:{uniforms:ho([Qe.points,Qe.fog]),vertexShader:Cn.points_vert,fragmentShader:Cn.points_frag},dashed:{uniforms:ho([Qe.common,Qe.fog,{scale:{value:1},dashSize:{value:1},totalSize:{value:2}}]),vertexShader:Cn.linedashed_vert,fragmentShader:Cn.linedashed_frag},depth:{uniforms:ho([Qe.common,Qe.displacementmap]),vertexShader:Cn.depth_vert,fragmentShader:Cn.depth_frag},normal:{uniforms:ho([Qe.common,Qe.bumpmap,Qe.normalmap,Qe.displacementmap,{opacity:{value:1}}]),vertexShader:Cn.meshnormal_vert,fragmentShader:Cn.meshnormal_frag},sprite:{uniforms:ho([Qe.sprite,Qe.fog]),vertexShader:Cn.sprite_vert,fragmentShader:Cn.sprite_frag},background:{uniforms:{uvTransform:{value:new wn},t2D:{value:null},backgroundIntensity:{value:1}},vertexShader:Cn.background_vert,fragmentShader:Cn.background_frag},backgroundCube:{uniforms:{envMap:{value:null},flipEnvMap:{value:-1},backgroundBlurriness:{value:0},backgroundIntensity:{value:1},backgroundRotation:{value:new wn}},vertexShader:Cn.backgroundCube_vert,fragmentShader:Cn.backgroundCube_frag},cube:{uniforms:{tCube:{value:null},tFlip:{value:-1},opacity:{value:1}},vertexShader:Cn.cube_vert,fragmentShader:Cn.cube_frag},equirect:{uniforms:{tEquirect:{value:null}},vertexShader:Cn.equirect_vert,fragmentShader:Cn.equirect_frag},distanceRGBA:{uniforms:ho([Qe.common,Qe.displacementmap,{referencePosition:{value:new O},nearDistance:{value:1},farDistance:{value:1e3}}]),vertexShader:Cn.distanceRGBA_vert,fragmentShader:Cn.distanceRGBA_frag},shadow:{uniforms:ho([Qe.lights,Qe.fog,{color:{value:new qe(0)},opacity:{value:1}}]),vertexShader:Cn.shadow_vert,fragmentShader:Cn.shadow_frag}};dc.physical={uniforms:ho([dc.standard.uniforms,{clearcoat:{value:0},clearcoatMap:{value:null},clearcoatMapTransform:{value:new wn},clearcoatNormalMap:{value:null},clearcoatNormalMapTransform:{value:new wn},clearcoatNormalScale:{value:new xe(1,1)},clearcoatRoughness:{value:0},clearcoatRoughnessMap:{value:null},clearcoatRoughnessMapTransform:{value:new wn},dispersion:{value:0},iridescence:{value:0},iridescenceMap:{value:null},iridescenceMapTransform:{value:new wn},iridescenceIOR:{value:1.3},iridescenceThicknessMinimum:{value:100},iridescenceThicknessMaximum:{value:400},iridescenceThicknessMap:{value:null},iridescenceThicknessMapTransform:{value:new wn},sheen:{value:0},sheenColor:{value:new qe(0)},sheenColorMap:{value:null},sheenColorMapTransform:{value:new wn},sheenRoughness:{value:1},sheenRoughnessMap:{value:null},sheenRoughnessMapTransform:{value:new wn},transmission:{value:0},transmissionMap:{value:null},transmissionMapTransform:{value:new wn},transmissionSamplerSize:{value:new xe},transmissionSamplerMap:{value:null},thickness:{value:0},thicknessMap:{value:null},thicknessMapTransform:{value:new wn},attenuationDistance:{value:0},attenuationColor:{value:new qe(0)},specularColor:{value:new qe(1,1,1)},specularColorMap:{value:null},specularColorMapTransform:{value:new wn},specularIntensity:{value:1},specularIntensityMap:{value:null},specularIntensityMapTransform:{value:new wn},anisotropyVector:{value:new xe},anisotropyMap:{value:null},anisotropyMapTransform:{value:new wn}}]),vertexShader:Cn.meshphysical_vert,fragmentShader:Cn.meshphysical_frag};const lS={r:0,b:0,g:0},lf=new rd,Cce=new Nt;function Sce(i,t,e,n,r,s,o){const a=new qe(0);let c,d,l=!0===s?0:1,h=null,p=0,m=null;function g(M){let x=!0===M.isScene?M.background:null;return x&&x.isTexture&&(x=(M.backgroundBlurriness>0?e:t).get(x)),x}function y(M,x){M.getRGB(lS,Z4(i)),n.buffers.color.setClear(lS.r,lS.g,lS.b,x,o)}return{getClearColor:function(){return a},setClearColor:function(M,x=1){a.set(M),l=x,y(a,l)},getClearAlpha:function(){return l},setClearAlpha:function(M){l=M,y(a,l)},render:function b(M){let x=!1;const C=g(M);null===C?y(a,l):C&&C.isColor&&(y(C,1),x=!0);const F=i.xr.getEnvironmentBlendMode();"additive"===F?n.buffers.color.setClear(0,0,0,1,o):"alpha-blend"===F&&n.buffers.color.setClear(0,0,0,0,o),(i.autoClear||x)&&(n.buffers.depth.setTest(!0),n.buffers.depth.setMask(!0),n.buffers.color.setMask(!0),i.clear(i.autoClearColor,i.autoClearDepth,i.autoClearStencil))},addToRenderList:function v(M,x){const C=g(x);C&&(C.isCubeTexture||C.mapping===mb)?(void 0===d&&(d=new Mn(new rf(1,1,1),new Cl({name:"BackgroundCubeMaterial",uniforms:Sg(dc.backgroundCube.uniforms),vertexShader:dc.backgroundCube.vertexShader,fragmentShader:dc.backgroundCube.fragmentShader,side:ko,depthTest:!1,depthWrite:!1,fog:!1})),d.geometry.deleteAttribute("normal"),d.geometry.deleteAttribute("uv"),d.onBeforeRender=function(F,D,k){this.matrixWorld.copyPosition(k.matrixWorld)},Object.defineProperty(d.material,"envMap",{get:function(){return this.uniforms.envMap.value}}),r.update(d)),lf.copy(x.backgroundRotation),lf.x*=-1,lf.y*=-1,lf.z*=-1,C.isCubeTexture&&!1===C.isRenderTargetTexture&&(lf.y*=-1,lf.z*=-1),d.material.uniforms.envMap.value=C,d.material.uniforms.flipEnvMap.value=C.isCubeTexture&&!1===C.isRenderTargetTexture?-1:1,d.material.uniforms.backgroundBlurriness.value=x.backgroundBlurriness,d.material.uniforms.backgroundIntensity.value=x.backgroundIntensity,d.material.uniforms.backgroundRotation.value.setFromMatrix4(Cce.makeRotationFromEuler(lf)),d.material.toneMapped=Jn.getTransfer(C.colorSpace)!==Fi,(h!==C||p!==C.version||m!==i.toneMapping)&&(d.material.needsUpdate=!0,h=C,p=C.version,m=i.toneMapping),d.layers.enableAll(),M.unshift(d,d.geometry,d.material,0,0,null)):C&&C.isTexture&&(void 0===c&&(c=new Mn(new Iu(2,2),new Cl({name:"BackgroundMaterial",uniforms:Sg(dc.background.uniforms),vertexShader:dc.background.vertexShader,fragmentShader:dc.background.fragmentShader,side:lc,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=C,c.material.uniforms.backgroundIntensity.value=x.backgroundIntensity,c.material.toneMapped=Jn.getTransfer(C.colorSpace)!==Fi,!0===C.matrixAutoUpdate&&C.updateMatrix(),c.material.uniforms.uvTransform.value.copy(C.matrix),(h!==C||p!==C.version||m!==i.toneMapping)&&(c.material.needsUpdate=!0,h=C,p=C.version,m=i.toneMapping),c.layers.enableAll(),M.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(A){return i.bindVertexArray(A)}function d(A){return i.deleteVertexArray(A)}function p(A){const $=[],ie=[],ne=[];for(let se=0;se=0){const Be=se[J];let Ye=ge[J];if(void 0===Ye&&("instanceMatrix"===J&&A.instanceMatrix&&(Ye=A.instanceMatrix),"instanceColor"===J&&A.instanceColor&&(Ye=A.instanceColor)),void 0===Be||Be.attribute!==Ye||Ye&&Be.data!==Ye.data)return!0;q++}return s.attributesNum!==q||s.index!==ne}(A,ne,ie,se),ge&&function g(A,$,ie,ne){const se={},ge=$.attributes;let q=0;const re=ie.getAttributes();for(const J in re)if(re[J].location>=0){let Be=ge[J];void 0===Be&&("instanceMatrix"===J&&A.instanceMatrix&&(Be=A.instanceMatrix),"instanceColor"===J&&A.instanceColor&&(Be=A.instanceColor));const Ye={};Ye.attribute=Be,Be&&Be.data&&(Ye.data=Be.data),se[J]=Ye,q++}s.attributes=se,s.attributesNum=q,s.index=ne}(A,ne,ie,se),null!==se&&t.update(se,i.ELEMENT_ARRAY_BUFFER),(ge||o)&&(o=!1,function C(A,$,ie,ne){b();const se=ne.attributes,ge=ie.getAttributes(),q=$.defaultAttributeValues;for(const re in ge){const J=ge[re];if(J.location>=0){let we=se[re];if(void 0===we&&("instanceMatrix"===re&&A.instanceMatrix&&(we=A.instanceMatrix),"instanceColor"===re&&A.instanceColor&&(we=A.instanceColor)),void 0!==we){const Be=we.normalized,Ye=we.itemSize,It=t.get(we);if(void 0===It)continue;const en=It.buffer,ae=It.type,Oe=It.bytesPerElement,Ze=ae===i.INT||ae===i.UNSIGNED_INT||we.gpuType===uk;if(we.isInterleavedBufferAttribute){const Fe=we.data,bt=Fe.stride,St=we.offset;if(Fe.isInstancedInterleavedBuffer){for(let Mt=0;Mt0&&i.getShaderPrecisionFormat(i.FRAGMENT_SHADER,i.HIGH_FLOAT).precision>0)return"highp";D="mediump"}return"mediump"===D&&i.getShaderPrecisionFormat(i.VERTEX_SHADER,i.MEDIUM_FLOAT).precision>0&&i.getShaderPrecisionFormat(i.FRAGMENT_SHADER,i.MEDIUM_FLOAT).precision>0?"mediump":"lowp"}let c=void 0!==e.precision?e.precision:"highp";const d=l(c);d!==c&&(console.warn("THREE.WebGLRenderer:",c,"not supported, using",d,"instead."),c=d);const h=!0===e.logarithmicDepthBuffer,p=i.getParameter(i.MAX_TEXTURE_IMAGE_UNITS),m=i.getParameter(i.MAX_VERTEX_TEXTURE_IMAGE_UNITS);return{isWebGL2:!0,getMaxAnisotropy:function s(){if(void 0!==r)return r;if(!0===t.has("EXT_texture_filter_anisotropic")){const D=t.get("EXT_texture_filter_anisotropic");r=i.getParameter(D.MAX_TEXTURE_MAX_ANISOTROPY_EXT)}else r=0;return r},getMaxPrecision:l,textureFormatReadable:function o(D){return!(D!==Po&&n.convert(D)!==i.getParameter(i.IMPLEMENTATION_COLOR_READ_FORMAT))},textureTypeReadable:function a(D){const k=D===Jm&&(t.has("EXT_color_buffer_half_float")||t.has("EXT_color_buffer_float"));return!(D!==ed&&n.convert(D)!==i.getParameter(i.IMPLEMENTATION_COLOR_READ_TYPE)&&D!==ea&&!k)},precision:c,logarithmicDepthBuffer:h,maxTextures:p,maxVertexTextures:m,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:m>0,maxSamples:i.getParameter(i.MAX_SAMPLES)}}function Tce(i){const t=this;let e=null,n=0,r=!1,s=!1;const o=new sf,a=new wn,l={value:null,needsUpdate:!1};function d(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=d(g,p,x,m);for(let F=0;F!==x;++F)C[F]=e[F];y.clippingState=C,this.numIntersection=b?this.numPlanes:0,this.numPlanes+=M}}}function Ice(i){let t=new WeakMap;function e(o,a){return a===AC?o.mapping=cc:a===DC&&(o.mapping=Zh),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===AC||a===DC){if(t.has(o))return e(t.get(o).texture,o.mapping);{const l=o.image;if(l&&l.height>0){const c=new xae(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 Ib extends fP{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,d=(this.top-this.bottom)/this.view.fullHeight/this.zoom;s+=c*this.view.offsetX,o=s+c*this.view.width,a-=d*this.view.offsetY,l=a-d*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 n5=[.125,.215,.35,.446,.526,.582],mP=new Ib,r5=new qe;let gP=null,_P=0,vP=0,yP=!1;const df=(1+Math.sqrt(5))/2,Tg=1/df,s5=[new O(-df,Tg,0),new O(df,Tg,0),new O(-Tg,0,df),new O(Tg,0,df),new O(0,df,-Tg),new O(0,df,Tg),new O(-1,1,-1),new O(1,1,-1),new O(-1,1,1),new O(1,1,1)];class o5{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){gP=this._renderer.getRenderTarget(),_P=this._renderer.getActiveCubeFace(),vP=this._renderer.getActiveMipmapLevel(),yP=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=c5(),this._compileMaterial(this._cubemapMaterial))}compileEquirectangularShader(){null===this._equirectMaterial&&(this._equirectMaterial=l5(),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=n5[o-i+4-1]:0===o&&(l=0),n.push(l);const c=1/(a-2),d=-c,h=1+c,p=[d,d,h,d,h,h,d,d,h,h,d,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 D=0;D2?0:-1;M.set([k,B,0,k+2/3,B,0,k+2/3,B+1,0,k,B,0,k+2/3,B+1,0,k,B+1,0],b*g*D),x.set(p,v*g*D),C.set([D,D,D,D,D,D],y*g*D)}const F=new hn;F.setAttribute("position",new Hi(M,b)),F.setAttribute("uv",new Hi(x,v)),F.setAttribute("faceIndex",new Hi(C,y)),t.push(F),r>4&&r--}return{lodPlanes:t,sizeLods:e,sigmas:n}}(s)),this._blurMaterial=function kce(i,t,e){const n=new Float32Array(20),r=new O(0,1,0);return new Cl({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:Jc,depthTest:!1,depthWrite:!1})}(s,t,e)}return r}_compileMaterial(t){const e=new Mn(this._lodPlanes[0],t);this._renderer.compile(e,mP)}_sceneToCubeUV(t,e,n,r){const a=new br(90,1,e,n),l=[1,-1,1,1,1,1],c=[1,1,1,-1,-1,-1],d=this._renderer,h=d.autoClear,p=d.toneMapping;d.getClearColor(r5),d.toneMapping=bu,d.autoClear=!1;const m=new qi({name:"PMREM.Background",side:ko,depthWrite:!1,depthTest:!1}),g=new Mn(new rf,m);let b=!1;const v=t.background;v?v.isColor&&(m.color.copy(v),t.background=null,b=!0):(m.color.copy(r5),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;cS(r,M*x,y>2?x:0,x,x),d.setRenderTarget(r),b&&d.render(g,a),d.render(t,a)}g.geometry.dispose(),g.material.dispose(),d.toneMapping=p,d.autoClear=h,t.background=v}_textureToCubeUV(t,e){const n=this._renderer,r=t.mapping===cc||t.mapping===Zh;r?(null===this._cubemapMaterial&&(this._cubemapMaterial=c5()),this._cubemapMaterial.uniforms.flipEnvMap.value=!1===t.isRenderTargetTexture?-1:1):null===this._equirectMaterial&&(this._equirectMaterial=l5());const s=r?this._cubemapMaterial:this._equirectMaterial,o=new Mn(this._lodPlanes[0],s);s.uniforms.envMap.value=t;const l=this._cubeSize;cS(e,0,0,3*l,2*l),n.setRenderTarget(e),n.render(o,mP)}_applyPMREM(t){const e=this._renderer,n=e.autoClear;e.autoClear=!1;const r=this._lodPlanes.length;for(let s=1;s20&&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 k=0;k<20;++k){const B=k/b,T=Math.exp(-B*B/2);y.push(T),0===k?M+=T:kx-4?r-x+4:0),4*(this._cubeSize-C),3*C,2*C),l.setRenderTarget(e),l.render(h,mP)}}function a5(i,t,e){const n=new Mu(i,t,e);return n.texture.mapping=mb,n.texture.name="PMREM.cubeUv",n.scissorTest=!0,n}function cS(i,t,e,n,r){i.viewport.set(t,e,n,r),i.scissor.set(t,e,n,r)}function l5(){return new Cl({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:Jc,depthTest:!1,depthWrite:!1})}function c5(){return new Cl({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:Jc,depthTest:!1,depthWrite:!1})}function Pce(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===AC||l===DC,d=l===cc||l===Zh;if(c||d){let h=t.get(a);if(a.isRenderTargetTexture&&a.pmremVersion!==(void 0!==h?h.texture.pmremVersion:0))return null===e&&(e=new o5(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||d&&m&&function r(a){let l=0;for(let d=0;d<6;d++)void 0!==a[d]&&l++;return 6===l}(m)?(null===e&&(e=new o5(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 Oce(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&&cg("THREE.WebGLRenderer: "+n+" extension not supported."),r}}}function Fce(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&&(F=Math.ceil(C/t.maxTextureSize),C=t.maxTextureSize);const D=new Float32Array(C*F*4*h),k=new Zk(D,C,F,h);k.type=ea,k.needsUpdate=!0;const B=4*x;for(let A=0;A0)return i;const r=t*e;let s=g5[r];if(void 0===s&&(s=new Float32Array(r),g5[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 Lr(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 Ode(i,t){const e=function Pde(i){const t=Jn.getPrimaries(Jn.workingColorSpace),e=Jn.getPrimaries(i);let n;switch(t===e?n="":t===UC&&e===BC?n="LinearDisplayP3ToLinearSRGB":t===BC&&e===UC&&(n="LinearSRGBToLinearDisplayP3"),i){case ds:case LC:return[n,"LinearTransferOETF"];case cs:case jk: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 Fde(i,t){let e;switch(t){case foe:e="Linear";break;case poe:e="Reinhard";break;case moe:e="OptimizedCineon";break;case goe:e="ACESFilmic";break;case voe:e="AgX";break;case yoe:e="Neutral";break;case _oe:e="Custom";break;default:console.warn("THREE.WebGLProgram: Unsupported toneMapping:",t),e="Linear"}return"vec3 "+i+"( vec3 color ) { return "+e+"ToneMapping( color ); }"}const hS=new O;function Rb(i){return""!==i}function C5(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 S5(i,t){return i.replace(/NUM_CLIPPING_PLANES/g,t.numClippingPlanes).replace(/UNION_CLIPPING_PLANES/g,t.numClippingPlanes-t.numClipIntersection)}const Vde=/^[ \t]*#include +<([\w\d./]+)>/gm;function wP(i){return i.replace(Vde,Hde)}const zde=new Map;function Hde(i,t){let e=Cn[t];if(void 0===e){const n=zde.get(t);if(void 0===n)throw new Error("Can not resolve #include <"+t+">");e=Cn[n],console.warn('THREE.WebGLRenderer: Shader chunk "%s" has been deprecated. Use "%s" instead.',t,n)}return wP(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 E5(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(Rb).join("\n"),y.length>0&&(y+="\n")):(v=[A5(e),"#define SHADER_TYPE "+e.shaderType,"#define SHADER_NAME "+e.shaderName,g,e.extensionClipCullDistance?"#define USE_CLIP_DISTANCE":"",e.batching?"#define USE_BATCHING":"",e.batchingColor?"#define USE_BATCHING_COLOR":"",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 "+d:"",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_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.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","#ifdef USE_SKINNING","\tattribute vec4 skinIndex;","\tattribute vec4 skinWeight;","#endif","\n"].filter(Rb).join("\n"),y=[A5(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 "+d:"",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.dispersion?"#define USE_DISPERSION":"",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||e.batchingColor?"#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.decodeVideoTexture?"#define DECODE_VIDEO_TEXTURE":"",e.logarithmicDepthBuffer?"#define USE_LOGDEPTHBUF":"","uniform mat4 viewMatrix;","uniform vec3 cameraPosition;","uniform bool isOrthographic;",e.toneMapping!==bu?"#define TONE_MAPPING":"",e.toneMapping!==bu?Cn.tonemapping_pars_fragment:"",e.toneMapping!==bu?Fde("toneMapping",e.toneMapping):"",e.dithering?"#define DITHERING":"",e.opaque?"#define OPAQUE":"",Cn.colorspace_pars_fragment,Ode("linearToOutputTexel",e.outputColorSpace),(Jn.getLuminanceCoefficients(hS),["float luminance( const in vec3 rgb ) {",`\tconst vec3 weights = vec3( ${hS.x.toFixed(4)}, ${hS.y.toFixed(4)}, ${hS.z.toFixed(4)} );`,"\treturn dot( weights, rgb );","}"].join("\n")),e.useDepthPacking?"#define DEPTH_PACKING "+e.depthPacking:"","\n"].filter(Rb).join("\n")),o=wP(o),o=C5(o,e),o=S5(o,e),a=wP(a),a=C5(a,e),a=S5(a,e),o=E5(o),a=E5(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===A4?"":"layout(location = 0) out highp vec4 pc_fragColor;",e.glslVersion===A4?"":"#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,F=w5(r,r.VERTEX_SHADER,M+v+o),D=w5(r,r.FRAGMENT_SHADER,C);function k($){if(i.debug.checkShaderErrors){const ie=r.getProgramInfoLog(b).trim(),ne=r.getShaderInfoLog(F).trim(),se=r.getShaderInfoLog(D).trim();let ge=!0,q=!0;if(!1===r.getProgramParameter(b,r.LINK_STATUS))if(ge=!1,"function"==typeof i.debug.onShaderError)i.debug.onShaderError(r,b,F,D);else{const re=M5(r,F,"vertex"),J=M5(r,D,"fragment");console.error("THREE.WebGLProgram: Shader Error "+r.getError()+" - VALIDATE_STATUS "+r.getProgramParameter(b,r.VALIDATE_STATUS)+"\n\nMaterial Name: "+$.name+"\nMaterial Type: "+$.type+"\n\nProgram Info Log: "+ie+"\n"+re+"\n"+J)}else""!==ie?console.warn("THREE.WebGLProgram: Program Info Log:",ie):(""===ne||""===se)&&(q=!1);q&&($.diagnostics={runnable:ge,programLog:ie,vertexShader:{log:ne,prefix:v},fragmentShader:{log:se,prefix:y}})}r.deleteShader(F),r.deleteShader(D),B=new uS(r,b),T=function Ude(i,t){const e={},n=i.getProgramParameter(t,i.ACTIVE_ATTRIBUTES);for(let r=0;r0,ce=T.clearcoat>0,De=T.iridescence>0,Ae=T.sheen>0,Bt=T.transmission>0,Je=R&&!!T.anisotropyMap,ht=ce&&!!T.clearcoatMap,bn=ce&&!!T.clearcoatNormalMap,He=ce&&!!T.clearcoatRoughnessMap,dt=De&&!!T.iridescenceMap,jn=De&&!!T.iridescenceThicknessMap,ln=Ae&&!!T.sheenColorMap,_t=Ae&&!!T.sheenRoughnessMap,vn=!!T.specularMap,Pn=!!T.specularColorMap,Ki=!!T.specularIntensityMap,Z=Bt&&!!T.transmissionMap,We=Bt&&!!T.thicknessMap,Ee=!!T.alphaMap,ei=!!T.extensions;let xr=bu;T.toneMapped&&(null===Fe||!0===Fe.isXRRenderTarget)&&(xr=i.toneMapping);const hs={shaderID:we,shaderType:T.type,shaderName:T.name,vertexShader:en,fragmentShader:ae,defines:T.defines,customVertexShaderID:Oe,customFragmentShaderID:Ze,isRawShaderMaterial:!0===T.isRawShaderMaterial,glslVersion:T.glslVersion,precision:m,batching:St,batchingColor:St&&null!==ne._colorsTexture,instancing:bt,instancingColor:bt&&null!==ne.instanceColor,instancingMorph:bt&&null!==ne.morphTexture,supportsVertexTextures:p,outputColorSpace:null===Fe?i.outputColorSpace:!0===Fe.isXRRenderTarget?Fe.texture.colorSpace:ds,alphaToCoverage:!!T.alphaToCoverage,map:Mt,matcap:!!T.matcap,envMap:N,envMapMode:N&&re.mapping,envMapCubeUVHeight:J,aoMap:Ge,lightMap:Ne,bumpMap:nt,normalMap:Me,displacementMap:p&&Gt,emissiveMap:it,normalMapObjectSpace:Me&&T.normalMapType===Aoe,normalMapTangentSpace:Me&&T.normalMapType===Qh,metalnessMap:mt,roughnessMap:z,anisotropy:R,anisotropyMap:Je,clearcoat:ce,clearcoatMap:ht,clearcoatNormalMap:bn,clearcoatRoughnessMap:He,dispersion:T.dispersion>0,iridescence:De,iridescenceMap:dt,iridescenceThicknessMap:jn,sheen:Ae,sheenColorMap:ln,sheenRoughnessMap:_t,specularMap:vn,specularColorMap:Pn,specularIntensityMap:Ki,transmission:Bt,transmissionMap:Z,thicknessMap:We,gradientMap:!!T.gradientMap,opaque:!1===T.transparent&&T.blending===Zm&&!1===T.alphaToCoverage,alphaMap:Ee,alphaTest:T.alphaTest>0,alphaHash:!!T.alphaHash,combine:T.combine,mapUv:Mt&&b(T.map.channel),aoMapUv:Ge&&b(T.aoMap.channel),lightMapUv:Ne&&b(T.lightMap.channel),bumpMapUv:nt&&b(T.bumpMap.channel),normalMapUv:Me&&b(T.normalMap.channel),displacementMapUv:Gt&&b(T.displacementMap.channel),emissiveMapUv:it&&b(T.emissiveMap.channel),metalnessMapUv:mt&&b(T.metalnessMap.channel),roughnessMapUv:z&&b(T.roughnessMap.channel),anisotropyMapUv:Je&&b(T.anisotropyMap.channel),clearcoatMapUv:ht&&b(T.clearcoatMap.channel),clearcoatNormalMapUv:bn&&b(T.clearcoatNormalMap.channel),clearcoatRoughnessMapUv:He&&b(T.clearcoatRoughnessMap.channel),iridescenceMapUv:dt&&b(T.iridescenceMap.channel),iridescenceThicknessMapUv:jn&&b(T.iridescenceThicknessMap.channel),sheenColorMapUv:ln&&b(T.sheenColorMap.channel),sheenRoughnessMapUv:_t&&b(T.sheenRoughnessMap.channel),specularMapUv:vn&&b(T.specularMap.channel),specularColorMapUv:Pn&&b(T.specularColorMap.channel),specularIntensityMapUv:Ki&&b(T.specularIntensityMap.channel),transmissionMapUv:Z&&b(T.transmissionMap.channel),thicknessMapUv:We&&b(T.thicknessMap.channel),alphaMapUv:Ee&&b(T.alphaMap.channel),vertexTangents:!!ge.attributes.tangent&&(Me||R),vertexColors:T.vertexColors,vertexAlphas:!0===T.vertexColors&&!!ge.attributes.color&&4===ge.attributes.color.itemSize,pointsUvs:!0===ne.isPoints&&!!ge.attributes.uv&&(Mt||Ee),fog:!!se,useFog:!0===T.fog,fogExp2:!!se&&se.isFogExp2,flatShading:!0===T.flatShading,sizeAttenuation:!0===T.sizeAttenuation,logarithmicDepthBuffer:h,skinning:!0===ne.isSkinnedMesh,morphTargets:void 0!==ge.morphAttributes.position,morphNormals:void 0!==ge.morphAttributes.normal,morphColors:void 0!==ge.morphAttributes.color,morphTargetsCount:Ye,morphTextureStride:It,numDirLights:A.directional.length,numPointLights:A.point.length,numSpotLights:A.spot.length,numSpotLightMaps:A.spotLightMap.length,numRectAreaLights:A.rectArea.length,numHemiLights:A.hemi.length,numDirLightShadows:A.directionalShadowMap.length,numPointLightShadows:A.pointShadowMap.length,numSpotLightShadows:A.spotShadowMap.length,numSpotLightShadowsWithMaps:A.numSpotLightShadowsWithMaps,numLightProbes:A.numLightProbes,numClippingPlanes:o.numPlanes,numClipIntersection:o.numIntersection,dithering:T.dithering,shadowMapEnabled:i.shadowMap.enabled&&$.length>0,shadowMapType:i.shadowMap.type,toneMapping:xr,decodeVideoTexture:Mt&&!0===T.map.isVideoTexture&&Jn.getTransfer(T.map.colorSpace)===Fi,premultipliedAlpha:T.premultipliedAlpha,doubleSided:T.side===Ns,flipSided:T.side===ko,useDepthPacking:T.depthPacking>=0,depthPacking:T.depthPacking||0,index0AttributeName:T.index0AttributeName,extensionClipCullDistance:ei&&!0===T.extensions.clipCullDistance&&n.has("WEBGL_clip_cull_distance"),extensionMultiDraw:(ei&&!0===T.extensions.multiDraw||St)&&n.has("WEBGL_multi_draw"),rendererExtensionParallelShaderCompile:n.has("KHR_parallel_shader_compile"),customProgramCacheKey:T.customProgramCacheKey()};return hs.vertexUv1s=c.has(1),hs.vertexUv2s=c.has(2),hs.vertexUv3s=c.has(3),c.clear(),hs},getProgramCacheKey:function y(T){const A=[];if(T.shaderID?A.push(T.shaderID):(A.push(T.customVertexShaderID),A.push(T.customFragmentShaderID)),void 0!==T.defines)for(const $ in T.defines)A.push($),A.push(T.defines[$]);return!1===T.isRawShaderMaterial&&(function M(T,A){T.push(A.precision),T.push(A.outputColorSpace),T.push(A.envMapMode),T.push(A.envMapCubeUVHeight),T.push(A.mapUv),T.push(A.alphaMapUv),T.push(A.lightMapUv),T.push(A.aoMapUv),T.push(A.bumpMapUv),T.push(A.normalMapUv),T.push(A.displacementMapUv),T.push(A.emissiveMapUv),T.push(A.metalnessMapUv),T.push(A.roughnessMapUv),T.push(A.anisotropyMapUv),T.push(A.clearcoatMapUv),T.push(A.clearcoatNormalMapUv),T.push(A.clearcoatRoughnessMapUv),T.push(A.iridescenceMapUv),T.push(A.iridescenceThicknessMapUv),T.push(A.sheenColorMapUv),T.push(A.sheenRoughnessMapUv),T.push(A.specularMapUv),T.push(A.specularColorMapUv),T.push(A.specularIntensityMapUv),T.push(A.transmissionMapUv),T.push(A.thicknessMapUv),T.push(A.combine),T.push(A.fogExp2),T.push(A.sizeAttenuation),T.push(A.morphTargetsCount),T.push(A.morphAttributeCount),T.push(A.numDirLights),T.push(A.numPointLights),T.push(A.numSpotLights),T.push(A.numSpotLightMaps),T.push(A.numHemiLights),T.push(A.numRectAreaLights),T.push(A.numDirLightShadows),T.push(A.numPointLightShadows),T.push(A.numSpotLightShadows),T.push(A.numSpotLightShadowsWithMaps),T.push(A.numLightProbes),T.push(A.shadowMapType),T.push(A.toneMapping),T.push(A.numClippingPlanes),T.push(A.numClipIntersection),T.push(A.depthPacking)}(A,T),function x(T,A){a.disableAll(),A.supportsVertexTextures&&a.enable(0),A.instancing&&a.enable(1),A.instancingColor&&a.enable(2),A.instancingMorph&&a.enable(3),A.matcap&&a.enable(4),A.envMap&&a.enable(5),A.normalMapObjectSpace&&a.enable(6),A.normalMapTangentSpace&&a.enable(7),A.clearcoat&&a.enable(8),A.iridescence&&a.enable(9),A.alphaTest&&a.enable(10),A.vertexColors&&a.enable(11),A.vertexAlphas&&a.enable(12),A.vertexUv1s&&a.enable(13),A.vertexUv2s&&a.enable(14),A.vertexUv3s&&a.enable(15),A.vertexTangents&&a.enable(16),A.anisotropy&&a.enable(17),A.alphaHash&&a.enable(18),A.batching&&a.enable(19),A.dispersion&&a.enable(20),A.batchingColor&&a.enable(21),T.push(a.mask),a.disableAll(),A.fog&&a.enable(0),A.useFog&&a.enable(1),A.flatShading&&a.enable(2),A.logarithmicDepthBuffer&&a.enable(3),A.skinning&&a.enable(4),A.morphTargets&&a.enable(5),A.morphNormals&&a.enable(6),A.morphColors&&a.enable(7),A.premultipliedAlpha&&a.enable(8),A.shadowMapEnabled&&a.enable(9),A.doubleSided&&a.enable(10),A.flipSided&&a.enable(11),A.useDepthPacking&&a.enable(12),A.dithering&&a.enable(13),A.transmission&&a.enable(14),A.sheen&&a.enable(15),A.opaque&&a.enable(16),A.pointsUvs&&a.enable(17),A.decodeVideoTexture&&a.enable(18),A.alphaToCoverage&&a.enable(19),T.push(a.mask)}(A,T),A.push(i.outputColorSpace)),A.push(T.customProgramCacheKey),A.join()},getUniforms:function C(T){const A=g[T.type];let $;return $=A?Q4.clone(dc[A].uniforms):T.uniforms,$},acquireProgram:function F(T,A){let $;for(let ie=0,ne=d.length;ie0?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 d(){for(let h=t,p=i.length;h1&&e.sort(h||nue),n.length>1&&n.sort(p||D5),r.length>1&&r.sort(p||D5)}}}function iue(){let i=new WeakMap;return{get:function t(n,r){const s=i.get(n);let o;return void 0===s?(o=new T5,i.set(n,[o])):r>=s.length?(o=new T5,s.push(o)):o=s[r],o},dispose:function e(){i=new WeakMap}}}function rue(){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 O,color:new qe};break;case"SpotLight":e={position:new O,direction:new O,color:new qe,distance:0,coneCos:0,penumbraCos:0,decay:0};break;case"PointLight":e={position:new O,color:new qe,distance:0,decay:0};break;case"HemisphereLight":e={direction:new O,skyColor:new qe,groundColor:new qe};break;case"RectAreaLight":e={color:new qe,position:new O,halfWidth:new O,halfHeight:new O}}return i[t.id]=e,e}}}let oue=0;function aue(i,t){return(t.castShadow?2:0)-(i.castShadow?2:0)+(t.map?1:0)-(i.map?1:0)}function lue(i){const t=new rue,e=function sue(){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={shadowIntensity:1,shadowBias:0,shadowNormalBias:0,shadowRadius:1,shadowMapSize:new xe};break;case"PointLight":e={shadowIntensity:1,shadowBias:0,shadowNormalBias:0,shadowRadius:1,shadowMapSize:new xe,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 O);const r=new O,s=new Nt,o=new Nt;return{setup:function a(c){let d=0,h=0,p=0;for(let T=0;T<9;T++)n.probe[T].set(0,0,0);let m=0,g=0,b=0,v=0,y=0,M=0,x=0,C=0,F=0,D=0,k=0;c.sort(aue);for(let T=0,A=c.length;T0&&(!0===i.has("OES_texture_float_linear")?(n.rectAreaLTC1=Qe.LTC_FLOAT_1,n.rectAreaLTC2=Qe.LTC_FLOAT_2):(n.rectAreaLTC1=Qe.LTC_HALF_1,n.rectAreaLTC2=Qe.LTC_HALF_2)),n.ambient[0]=d,n.ambient[1]=h,n.ambient[2]=p;const B=n.hash;(B.directionalLength!==m||B.pointLength!==g||B.spotLength!==b||B.rectAreaLength!==v||B.hemiLength!==y||B.numDirectionalShadows!==M||B.numPointShadows!==x||B.numSpotShadows!==C||B.numSpotMaps!==F||B.numLightProbes!==k)&&(n.directional.length=m,n.spot.length=b,n.rectArea.length=v,n.point.length=g,n.hemi.length=y,n.directionalShadow.length=M,n.directionalShadowMap.length=M,n.pointShadow.length=x,n.pointShadowMap.length=x,n.spotShadow.length=C,n.spotShadowMap.length=C,n.directionalShadowMatrix.length=M,n.pointShadowMatrix.length=x,n.spotLightMatrix.length=C+F-D,n.spotLightMap.length=F,n.numSpotLightShadowsWithMaps=D,n.numLightProbes=k,B.directionalLength=m,B.pointLength=g,B.spotLength=b,B.rectAreaLength=v,B.hemiLength=y,B.numDirectionalShadows=M,B.numPointShadows=x,B.numSpotShadows=C,B.numSpotMaps=F,B.numLightProbes=k,n.version=oue++)},setupView:function l(c,d){let h=0,p=0,m=0,g=0,b=0;const v=d.matrixWorldInverse;for(let y=0,M=c.length;y=o.length?(a=new I5(i),o.push(a)):a=o[s],a},dispose:function n(){t=new WeakMap}}}class R5 extends Fo{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 k5 extends Fo{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 due="void main() {\n\tgl_Position = vec4( position, 1.0 );\n}",uue="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 hue(i,t,e){let n=new aS;const r=new xe,s=new xe,o=new gi,a=new R5({depthPacking:Eoe}),l=new k5,c={},d=e.maxTextureSize,h={[lc]:ko,[ko]:lc,[Ns]:Ns},p=new Cl({defines:{VSM_SAMPLES:8},uniforms:{shadow_pass:{value:null},resolution:{value:new xe},radius:{value:4}},vertexShader:due,fragmentShader:uue}),m=p.clone();m.defines.HORIZONTAL_PASS=1;const g=new hn;g.setAttribute("position",new Hi(new Float32Array([-1,-1,.5,3,-1,.5,-1,3,.5]),3));const b=new Mn(g,p),v=this;this.enabled=!1,this.autoUpdate=!0,this.needsUpdate=!1,this.type=l4;let y=this.type;function M(D,k){const B=t.update(b);p.defines.VSM_SAMPLES!==D.blurSamples&&(p.defines.VSM_SAMPLES=D.blurSamples,m.defines.VSM_SAMPLES=D.blurSamples,p.needsUpdate=!0,m.needsUpdate=!0),null===D.mapPass&&(D.mapPass=new Mu(r.x,r.y)),p.uniforms.shadow_pass.value=D.map.texture,p.uniforms.resolution.value=D.mapSize,p.uniforms.radius.value=D.radius,i.setRenderTarget(D.mapPass),i.clear(),i.renderBufferDirect(k,null,B,p,b,null),m.uniforms.shadow_pass.value=D.mapPass.texture,m.uniforms.resolution.value=D.mapSize,m.uniforms.radius.value=D.radius,i.setRenderTarget(D.map),i.clear(),i.renderBufferDirect(k,null,B,m,b,null)}function x(D,k,B,T){let A=null;const $=!0===B.isPointLight?D.customDistanceMaterial:D.customDepthMaterial;if(void 0!==$)A=$;else if(A=!0===B.isPointLight?l:a,i.localClippingEnabled&&!0===k.clipShadows&&Array.isArray(k.clippingPlanes)&&0!==k.clippingPlanes.length||k.displacementMap&&0!==k.displacementScale||k.alphaMap&&k.alphaTest>0||k.map&&k.alphaTest>0){const ie=A.uuid,ne=k.uuid;let se=c[ie];void 0===se&&(se={},c[ie]=se);let ge=se[ne];void 0===ge&&(ge=A.clone(),se[ne]=ge,k.addEventListener("dispose",F)),A=ge}return A.visible=k.visible,A.wireframe=k.wireframe,A.side=T===Qc?null!==k.shadowSide?k.shadowSide:k.side:null!==k.shadowSide?k.shadowSide:h[k.side],A.alphaMap=k.alphaMap,A.alphaTest=k.alphaTest,A.map=k.map,A.clipShadows=k.clipShadows,A.clippingPlanes=k.clippingPlanes,A.clipIntersection=k.clipIntersection,A.displacementMap=k.displacementMap,A.displacementScale=k.displacementScale,A.displacementBias=k.displacementBias,A.wireframeLinewidth=k.wireframeLinewidth,A.linewidth=k.linewidth,!0===B.isPointLight&&!0===A.isMeshDistanceMaterial&&(i.properties.get(A).light=B),A}function C(D,k,B,T,A){if(!1===D.visible)return;if(D.layers.test(k.layers)&&(D.isMesh||D.isLine||D.isPoints)&&(D.castShadow||D.receiveShadow&&A===Qc)&&(!D.frustumCulled||n.intersectsObject(D))){D.modelViewMatrix.multiplyMatrices(B.matrixWorldInverse,D.matrixWorld);const ne=t.update(D),se=D.material;if(Array.isArray(se)){const ge=ne.groups;for(let q=0,re=ge.length;qd||r.y>d)&&(r.x>d&&(s.x=Math.floor(d/we.x),r.x=s.x*we.x,J.mapSize.x=s.x),r.y>d&&(s.y=Math.floor(d/we.y),r.y=s.y*we.y,J.mapSize.y=s.y)),null===J.map||!0===ne||!0===se){const Ye=this.type!==Qc?{minFilter:vr,magFilter:vr}:{};null!==J.map&&J.map.dispose(),J.map=new Mu(r.x,r.y,Ye),J.map.texture.name=re.name+".shadowMap",J.camera.updateProjectionMatrix()}i.setRenderTarget(J.map),i.clear();const Be=J.getViewportCount();for(let Ye=0;Ye=1):-1!==re.indexOf("OpenGL ES")&&(q=parseFloat(/^OpenGL ES (\d)/.exec(re)[1]),ge=q>=2);let J=null,we={};const Be=i.getParameter(i.SCISSOR_BOX),Ye=i.getParameter(i.VIEWPORT),It=(new gi).fromArray(Be),en=(new gi).fromArray(Ye);function ae(Z,We,Ce,Ee){const Ke=new Uint8Array(4),tn=i.createTexture();i.bindTexture(Z,tn),i.texParameteri(Z,i.TEXTURE_MIN_FILTER,i.NEAREST),i.texParameteri(Z,i.TEXTURE_MAG_FILTER,i.NEAREST);for(let ei=0;ei"u")&&/OculusBrowser/g.test(navigator.userAgent),c=new xe,d=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(z,R){return m?new OffscreenCanvas(z,R):wb("canvas")}function b(z,R,ce){let Ie=1;const De=mt(z);if((De.width>ce||De.height>ce)&&(Ie=ce/Math.max(De.width,De.height)),Ie<1){if(typeof HTMLImageElement<"u"&&z instanceof HTMLImageElement||typeof HTMLCanvasElement<"u"&&z instanceof HTMLCanvasElement||typeof ImageBitmap<"u"&&z instanceof ImageBitmap||typeof VideoFrame<"u"&&z instanceof VideoFrame){const Ae=Math.floor(Ie*De.width),Bt=Math.floor(Ie*De.height);void 0===h&&(h=g(Ae,Bt));const Je=R?g(Ae,Bt):h;return Je.width=Ae,Je.height=Bt,Je.getContext("2d").drawImage(z,0,0,Ae,Bt),console.warn("THREE.WebGLRenderer: Texture has been resized from ("+De.width+"x"+De.height+") to ("+Ae+"x"+Bt+")."),Je}return"data"in z&&console.warn("THREE.WebGLRenderer: Image in DataTexture is too big ("+De.width+"x"+De.height+")."),z}return z}function v(z){return z.generateMipmaps&&z.minFilter!==vr&&z.minFilter!==cr}function y(z){i.generateMipmap(z)}function M(z,R,ce,Ie,De=!1){if(null!==z){if(void 0!==i[z])return i[z];console.warn("THREE.WebGLRenderer: Attempt to use non-existing WebGL internal format '"+z+"'")}let Ae=R;if(R===i.RED&&(ce===i.FLOAT&&(Ae=i.R32F),ce===i.HALF_FLOAT&&(Ae=i.R16F),ce===i.UNSIGNED_BYTE&&(Ae=i.R8)),R===i.RED_INTEGER&&(ce===i.UNSIGNED_BYTE&&(Ae=i.R8UI),ce===i.UNSIGNED_SHORT&&(Ae=i.R16UI),ce===i.UNSIGNED_INT&&(Ae=i.R32UI),ce===i.BYTE&&(Ae=i.R8I),ce===i.SHORT&&(Ae=i.R16I),ce===i.INT&&(Ae=i.R32I)),R===i.RG&&(ce===i.FLOAT&&(Ae=i.RG32F),ce===i.HALF_FLOAT&&(Ae=i.RG16F),ce===i.UNSIGNED_BYTE&&(Ae=i.RG8)),R===i.RG_INTEGER&&(ce===i.UNSIGNED_BYTE&&(Ae=i.RG8UI),ce===i.UNSIGNED_SHORT&&(Ae=i.RG16UI),ce===i.UNSIGNED_INT&&(Ae=i.RG32UI),ce===i.BYTE&&(Ae=i.RG8I),ce===i.SHORT&&(Ae=i.RG16I),ce===i.INT&&(Ae=i.RG32I)),R===i.RGB&&ce===i.UNSIGNED_INT_5_9_9_9_REV&&(Ae=i.RGB9_E5),R===i.RGBA){const Bt=De?NC:Jn.getTransfer(Ie);ce===i.FLOAT&&(Ae=i.RGBA32F),ce===i.HALF_FLOAT&&(Ae=i.RGBA16F),ce===i.UNSIGNED_BYTE&&(Ae=Bt===Fi?i.SRGB8_ALPHA8:i.RGBA8),ce===i.UNSIGNED_SHORT_4_4_4_4&&(Ae=i.RGBA4),ce===i.UNSIGNED_SHORT_5_5_5_1&&(Ae=i.RGB5_A1)}return(Ae===i.R16F||Ae===i.R32F||Ae===i.RG16F||Ae===i.RG32F||Ae===i.RGBA16F||Ae===i.RGBA32F)&&t.get("EXT_color_buffer_float"),Ae}function x(z,R){let ce;return z?null===R||R===xu||R===eg?ce=i.DEPTH24_STENCIL8:R===ea?ce=i.DEPTH32F_STENCIL8:R===vb&&(ce=i.DEPTH24_STENCIL8,console.warn("DepthTexture: 16 bit depth attachment is not supported with stencil. Using 24-bit attachment.")):null===R||R===xu||R===eg?ce=i.DEPTH_COMPONENT24:R===ea?ce=i.DEPTH_COMPONENT32F:R===vb&&(ce=i.DEPTH_COMPONENT16),ce}function C(z,R){return!0===v(z)||z.isFramebufferTexture&&z.minFilter!==vr&&z.minFilter!==cr?Math.log2(Math.max(R.width,R.height))+1:void 0!==z.mipmaps&&z.mipmaps.length>0?z.mipmaps.length:z.isCompressedTexture&&Array.isArray(z.image)?R.mipmaps.length:1}function F(z){const R=z.target;R.removeEventListener("dispose",F),function k(z){const R=n.get(z);if(void 0===R.__webglInit)return;const ce=z.source,Ie=p.get(ce);if(Ie){const De=Ie[R.__cacheKey];De.usedTimes--,0===De.usedTimes&&B(z),0===Object.keys(Ie).length&&p.delete(ce)}n.remove(z)}(R),R.isVideoTexture&&d.delete(R)}function D(z){const R=z.target;R.removeEventListener("dispose",D),function T(z){const R=n.get(z);if(z.depthTexture&&z.depthTexture.dispose(),z.isWebGLCubeRenderTarget)for(let Ie=0;Ie<6;Ie++){if(Array.isArray(R.__webglFramebuffer[Ie]))for(let De=0;De0&&ce.__version!==z.version){const Ie=z.image;if(null===Ie)console.warn("THREE.WebGLRenderer: Texture marked for update but no image data found.");else{if(!1!==Ie.complete)return void en(ce,z,R);console.warn("THREE.WebGLRenderer: Texture marked for update but image is incomplete")}}e.bindTexture(i.TEXTURE_2D,ce.__webglTexture,i.TEXTURE0+R)}const J={[Bs]:i.REPEAT,[er]:i.CLAMP_TO_EDGE,[gb]:i.MIRRORED_REPEAT},we={[vr]:i.NEAREST,[dk]:i.NEAREST_MIPMAP_NEAREST,[Qm]:i.NEAREST_MIPMAP_LINEAR,[cr]:i.LINEAR,[_b]:i.LINEAR_MIPMAP_NEAREST,[bl]:i.LINEAR_MIPMAP_LINEAR},Be={[Doe]:i.NEVER,[Ooe]:i.ALWAYS,[Toe]:i.LESS,[E4]:i.LEQUAL,[Ioe]:i.EQUAL,[Poe]:i.GEQUAL,[Roe]:i.GREATER,[koe]:i.NOTEQUAL};function Ye(z,R){if(R.type===ea&&!1===t.has("OES_texture_float_linear")&&(R.magFilter===cr||R.magFilter===_b||R.magFilter===Qm||R.magFilter===bl||R.minFilter===cr||R.minFilter===_b||R.minFilter===Qm||R.minFilter===bl)&&console.warn("THREE.WebGLRenderer: Unable to use linear filtering with floating point textures. OES_texture_float_linear not supported on this device."),i.texParameteri(z,i.TEXTURE_WRAP_S,J[R.wrapS]),i.texParameteri(z,i.TEXTURE_WRAP_T,J[R.wrapT]),(z===i.TEXTURE_3D||z===i.TEXTURE_2D_ARRAY)&&i.texParameteri(z,i.TEXTURE_WRAP_R,J[R.wrapR]),i.texParameteri(z,i.TEXTURE_MAG_FILTER,we[R.magFilter]),i.texParameteri(z,i.TEXTURE_MIN_FILTER,we[R.minFilter]),R.compareFunction&&(i.texParameteri(z,i.TEXTURE_COMPARE_MODE,i.COMPARE_REF_TO_TEXTURE),i.texParameteri(z,i.TEXTURE_COMPARE_FUNC,Be[R.compareFunction])),!0===t.has("EXT_texture_filter_anisotropic")){if(R.magFilter===vr||R.minFilter!==Qm&&R.minFilter!==bl||R.type===ea&&!1===t.has("OES_texture_float_linear"))return;if(R.anisotropy>1||n.get(R).__currentAnisotropy){const ce=t.get("EXT_texture_filter_anisotropic");i.texParameterf(z,ce.TEXTURE_MAX_ANISOTROPY_EXT,Math.min(R.anisotropy,r.getMaxAnisotropy())),n.get(R).__currentAnisotropy=R.anisotropy}}}function It(z,R){let ce=!1;void 0===z.__webglInit&&(z.__webglInit=!0,R.addEventListener("dispose",F));const Ie=R.source;let De=p.get(Ie);void 0===De&&(De={},p.set(Ie,De));const Ae=function ne(z){const R=[];return R.push(z.wrapS),R.push(z.wrapT),R.push(z.wrapR||0),R.push(z.magFilter),R.push(z.minFilter),R.push(z.anisotropy),R.push(z.internalFormat),R.push(z.format),R.push(z.type),R.push(z.generateMipmaps),R.push(z.premultiplyAlpha),R.push(z.flipY),R.push(z.unpackAlignment),R.push(z.colorSpace),R.join()}(R);if(Ae!==z.__cacheKey){void 0===De[Ae]&&(De[Ae]={texture:i.createTexture(),usedTimes:0},o.memory.textures++,ce=!0),De[Ae].usedTimes++;const Bt=De[z.__cacheKey];void 0!==Bt&&(De[z.__cacheKey].usedTimes--,0===Bt.usedTimes&&B(R)),z.__cacheKey=Ae,z.__webglTexture=De[Ae].texture}return ce}function en(z,R,ce){let Ie=i.TEXTURE_2D;(R.isDataArrayTexture||R.isCompressedArrayTexture)&&(Ie=i.TEXTURE_2D_ARRAY),R.isData3DTexture&&(Ie=i.TEXTURE_3D);const De=It(z,R),Ae=R.source;e.bindTexture(Ie,z.__webglTexture,i.TEXTURE0+ce);const Bt=n.get(Ae);if(Ae.version!==Bt.__version||!0===De){e.activeTexture(i.TEXTURE0+ce);const Je=Jn.getPrimaries(Jn.workingColorSpace),ht=R.colorSpace===wu?null:Jn.getPrimaries(R.colorSpace),bn=R.colorSpace===wu||Je===ht?i.NONE:i.BROWSER_DEFAULT_WEBGL;i.pixelStorei(i.UNPACK_FLIP_Y_WEBGL,R.flipY),i.pixelStorei(i.UNPACK_PREMULTIPLY_ALPHA_WEBGL,R.premultiplyAlpha),i.pixelStorei(i.UNPACK_ALIGNMENT,R.unpackAlignment),i.pixelStorei(i.UNPACK_COLORSPACE_CONVERSION_WEBGL,bn);let He=b(R.image,!1,r.maxTextureSize);He=it(R,He);const dt=s.convert(R.format,R.colorSpace),jn=s.convert(R.type);let _t,ln=M(R.internalFormat,dt,jn,R.colorSpace,R.isVideoTexture);Ye(Ie,R);const vn=R.mipmaps,Pn=!0!==R.isVideoTexture,Ki=void 0===Bt.__version||!0===De,Z=Ae.dataReady,We=C(R,He);if(R.isDepthTexture)ln=x(R.format===ng,R.type),Ki&&(Pn?e.texStorage2D(i.TEXTURE_2D,1,ln,He.width,He.height):e.texImage2D(i.TEXTURE_2D,0,ln,He.width,He.height,0,dt,jn,null));else if(R.isDataTexture)if(vn.length>0){Pn&&Ki&&e.texStorage2D(i.TEXTURE_2D,We,ln,vn[0].width,vn[0].height);for(let Ce=0,Ee=vn.length;Ce0){const Ke=MP(_t.width,_t.height,R.format,R.type);for(const tn of R.layerUpdates){const ei=_t.data.subarray(tn*Ke/_t.data.BYTES_PER_ELEMENT,(tn+1)*Ke/_t.data.BYTES_PER_ELEMENT);e.compressedTexSubImage3D(i.TEXTURE_2D_ARRAY,Ce,0,0,tn,_t.width,_t.height,1,dt,ei,0,0)}R.clearLayerUpdates()}else e.compressedTexSubImage3D(i.TEXTURE_2D_ARRAY,Ce,0,0,0,_t.width,_t.height,He.depth,dt,_t.data,0,0)}else e.compressedTexImage3D(i.TEXTURE_2D_ARRAY,Ce,ln,_t.width,_t.height,He.depth,0,_t.data,0,0);else console.warn("THREE.WebGLRenderer: Attempt to load unsupported compressed texture format in .uploadTexture()");else Pn?Z&&e.texSubImage3D(i.TEXTURE_2D_ARRAY,Ce,0,0,0,_t.width,_t.height,He.depth,dt,jn,_t.data):e.texImage3D(i.TEXTURE_2D_ARRAY,Ce,ln,_t.width,_t.height,He.depth,0,dt,jn,_t.data)}else{Pn&&Ki&&e.texStorage2D(i.TEXTURE_2D,We,ln,vn[0].width,vn[0].height);for(let Ce=0,Ee=vn.length;Ce0){const Ce=MP(He.width,He.height,R.format,R.type);for(const Ee of R.layerUpdates){const Ke=He.data.subarray(Ee*Ce/He.data.BYTES_PER_ELEMENT,(Ee+1)*Ce/He.data.BYTES_PER_ELEMENT);e.texSubImage3D(i.TEXTURE_2D_ARRAY,0,0,0,Ee,He.width,He.height,1,dt,jn,Ke)}R.clearLayerUpdates()}else e.texSubImage3D(i.TEXTURE_2D_ARRAY,0,0,0,0,He.width,He.height,He.depth,dt,jn,He.data)}else e.texImage3D(i.TEXTURE_2D_ARRAY,0,ln,He.width,He.height,He.depth,0,dt,jn,He.data);else if(R.isData3DTexture)Pn?(Ki&&e.texStorage3D(i.TEXTURE_3D,We,ln,He.width,He.height,He.depth),Z&&e.texSubImage3D(i.TEXTURE_3D,0,0,0,0,He.width,He.height,He.depth,dt,jn,He.data)):e.texImage3D(i.TEXTURE_3D,0,ln,He.width,He.height,He.depth,0,dt,jn,He.data);else if(R.isFramebufferTexture){if(Ki)if(Pn)e.texStorage2D(i.TEXTURE_2D,We,ln,He.width,He.height);else{let Ce=He.width,Ee=He.height;for(let Ke=0;Ke>=1,Ee>>=1}}else if(vn.length>0){if(Pn&&Ki){const Ce=mt(vn[0]);e.texStorage2D(i.TEXTURE_2D,We,ln,Ce.width,Ce.height)}for(let Ce=0,Ee=vn.length;Ce>Ae),dt=Math.max(1,R.height>>Ae);De===i.TEXTURE_3D||De===i.TEXTURE_2D_ARRAY?e.texImage3D(De,Ae,ht,He,dt,R.depth,0,Bt,Je,null):e.texImage2D(De,Ae,ht,He,dt,0,Bt,Je,null)}e.bindFramebuffer(i.FRAMEBUFFER,z),Me(R)?a.framebufferTexture2DMultisampleEXT(i.FRAMEBUFFER,Ie,De,n.get(ce).__webglTexture,0,nt(R)):(De===i.TEXTURE_2D||De>=i.TEXTURE_CUBE_MAP_POSITIVE_X&&De<=i.TEXTURE_CUBE_MAP_NEGATIVE_Z)&&i.framebufferTexture2D(i.FRAMEBUFFER,Ie,De,n.get(ce).__webglTexture,Ae),e.bindFramebuffer(i.FRAMEBUFFER,null)}function Ze(z,R,ce){if(i.bindRenderbuffer(i.RENDERBUFFER,z),R.depthBuffer){const Ie=R.depthTexture,Ae=x(R.stencilBuffer,Ie&&Ie.isDepthTexture?Ie.type:null),Bt=R.stencilBuffer?i.DEPTH_STENCIL_ATTACHMENT:i.DEPTH_ATTACHMENT,Je=nt(R);Me(R)?a.renderbufferStorageMultisampleEXT(i.RENDERBUFFER,Je,Ae,R.width,R.height):ce?i.renderbufferStorageMultisample(i.RENDERBUFFER,Je,Ae,R.width,R.height):i.renderbufferStorage(i.RENDERBUFFER,Ae,R.width,R.height),i.framebufferRenderbuffer(i.FRAMEBUFFER,Bt,i.RENDERBUFFER,z)}else{const Ie=R.textures;for(let De=0;De0&&!0===t.has("WEBGL_multisampled_render_to_texture")&&!1!==R.__useRenderToTexture}function it(z,R){const ce=z.colorSpace,Ie=z.format,De=z.type;return!0===z.isCompressedTexture||!0===z.isVideoTexture||ce!==ds&&ce!==wu&&(Jn.getTransfer(ce)===Fi?(Ie!==Po||De!==ed)&&console.warn("THREE.WebGLTextures: sRGB encoded textures have to use RGBAFormat and UnsignedByteType."):console.error("THREE.WebGLTextures: Unsupported texture color space:",ce)),R}function mt(z){return typeof HTMLImageElement<"u"&&z instanceof HTMLImageElement?(c.width=z.naturalWidth||z.width,c.height=z.naturalHeight||z.height):typeof VideoFrame<"u"&&z instanceof VideoFrame?(c.width=z.displayWidth,c.height=z.displayHeight):(c.width=z.width,c.height=z.height),c}this.allocateTextureUnit=function ie(){const z=A;return z>=r.maxTextures&&console.warn("THREE.WebGLTextures: Trying to use "+z+" texture units while this GPU supports only "+r.maxTextures),A+=1,z},this.resetTextureUnits=function $(){A=0},this.setTexture2D=se,this.setTexture2DArray=function ge(z,R){const ce=n.get(z);z.version>0&&ce.__version!==z.version?en(ce,z,R):e.bindTexture(i.TEXTURE_2D_ARRAY,ce.__webglTexture,i.TEXTURE0+R)},this.setTexture3D=function q(z,R){const ce=n.get(z);z.version>0&&ce.__version!==z.version?en(ce,z,R):e.bindTexture(i.TEXTURE_3D,ce.__webglTexture,i.TEXTURE0+R)},this.setTextureCube=function re(z,R){const ce=n.get(z);z.version>0&&ce.__version!==z.version?function ae(z,R,ce){if(6!==R.image.length)return;const Ie=It(z,R),De=R.source;e.bindTexture(i.TEXTURE_CUBE_MAP,z.__webglTexture,i.TEXTURE0+ce);const Ae=n.get(De);if(De.version!==Ae.__version||!0===Ie){e.activeTexture(i.TEXTURE0+ce);const Bt=Jn.getPrimaries(Jn.workingColorSpace),Je=R.colorSpace===wu?null:Jn.getPrimaries(R.colorSpace),ht=R.colorSpace===wu||Bt===Je?i.NONE:i.BROWSER_DEFAULT_WEBGL;i.pixelStorei(i.UNPACK_FLIP_Y_WEBGL,R.flipY),i.pixelStorei(i.UNPACK_PREMULTIPLY_ALPHA_WEBGL,R.premultiplyAlpha),i.pixelStorei(i.UNPACK_ALIGNMENT,R.unpackAlignment),i.pixelStorei(i.UNPACK_COLORSPACE_CONVERSION_WEBGL,ht);const bn=R.isCompressedTexture||R.image[0].isCompressedTexture,He=R.image[0]&&R.image[0].isDataTexture,dt=[];for(let Ee=0;Ee<6;Ee++)dt[Ee]=bn||He?He?R.image[Ee].image:R.image[Ee]:b(R.image[Ee],!0,r.maxCubemapSize),dt[Ee]=it(R,dt[Ee]);const jn=dt[0],ln=s.convert(R.format,R.colorSpace),_t=s.convert(R.type),vn=M(R.internalFormat,ln,_t,R.colorSpace),Pn=!0!==R.isVideoTexture,Ki=void 0===Ae.__version||!0===Ie,Z=De.dataReady;let Ce,We=C(R,jn);if(Ye(i.TEXTURE_CUBE_MAP,R),bn){Pn&&Ki&&e.texStorage2D(i.TEXTURE_CUBE_MAP,We,vn,jn.width,jn.height);for(let Ee=0;Ee<6;Ee++){Ce=dt[Ee].mipmaps;for(let Ke=0;Ke0&&We++;const Ee=mt(dt[0]);e.texStorage2D(i.TEXTURE_CUBE_MAP,We,vn,Ee.width,Ee.height)}for(let Ee=0;Ee<6;Ee++)if(He){Pn?Z&&e.texSubImage2D(i.TEXTURE_CUBE_MAP_POSITIVE_X+Ee,0,0,0,dt[Ee].width,dt[Ee].height,ln,_t,dt[Ee].data):e.texImage2D(i.TEXTURE_CUBE_MAP_POSITIVE_X+Ee,0,vn,dt[Ee].width,dt[Ee].height,0,ln,_t,dt[Ee].data);for(let Ke=0;Ke1;if(Bt||(void 0===Ie.__webglTexture&&(Ie.__webglTexture=i.createTexture()),Ie.__version=R.version,o.memory.textures++),Ae){ce.__webglFramebuffer=[];for(let Je=0;Je<6;Je++)if(R.mipmaps&&R.mipmaps.length>0){ce.__webglFramebuffer[Je]=[];for(let ht=0;ht0){ce.__webglFramebuffer=[];for(let Je=0;Je0&&!1===Me(z)){ce.__webglMultisampledFramebuffer=i.createFramebuffer(),ce.__webglColorRenderbuffer=[],e.bindFramebuffer(i.FRAMEBUFFER,ce.__webglMultisampledFramebuffer);for(let Je=0;Je0)for(let ht=0;ht0)for(let ht=0;ht0)if(!1===Me(z)){const R=z.textures,ce=z.width,Ie=z.height;let De=i.COLOR_BUFFER_BIT;const Ae=z.stencilBuffer?i.DEPTH_STENCIL_ATTACHMENT:i.DEPTH_ATTACHMENT,Bt=n.get(z),Je=R.length>1;if(Je)for(let ht=0;htm+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(xue)))}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 No;n.matrixAutoUpdate=!1,n.visible=!1,t.joints[e.jointName]=n,t.add(n)}return t.joints[e.jointName]}}class Cue{constructor(){this.texture=null,this.mesh=null,this.depthNear=0,this.depthFar=0}init(t,e,n){if(null===this.texture){const r=new Oo;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}}getMesh(t){if(null!==this.texture&&null===this.mesh){const e=t.cameras[0].viewport,n=new Cl({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:e.z},depthHeight:{value:e.w}}});this.mesh=new Mn(new Iu(20,20),n)}return this.mesh}reset(){this.texture=null,this.mesh=null}getDepthTexture(){return this.texture}}class Sue extends og{constructor(t,e){super();const n=this;let r=null,s=1,o=null,a="local-floor",l=1,c=null,d=null,h=null,p=null,m=null,g=null;const b=new Cue,v=e.getContextAttributes();let y=null,M=null;const x=[],C=[],F=new xe;let D=null;const k=new br;k.layers.enable(1),k.viewport=new gi;const B=new br;B.layers.enable(2),B.viewport=new gi;const T=[k,B],A=new bue;A.layers.enable(1),A.layers.enable(2);let $=null,ie=null;function ne(ae){const Oe=C.indexOf(ae.inputSource);if(-1===Oe)return;const Ze=x[Oe];void 0!==Ze&&(Ze.update(ae.inputSource,ae.frame,c||o),Ze.dispatchEvent({type:ae.type,data:ae.inputSource}))}function se(){r.removeEventListener("select",ne),r.removeEventListener("selectstart",ne),r.removeEventListener("selectend",ne),r.removeEventListener("squeeze",ne),r.removeEventListener("squeezestart",ne),r.removeEventListener("squeezeend",ne),r.removeEventListener("end",se),r.removeEventListener("inputsourceschange",ge);for(let ae=0;ae=0&&(C[Fe]=null,x[Fe].disconnect(Ze))}for(let Oe=0;Oe=C.length){C.push(Ze),Fe=St;break}if(null===C[St]){C[St]=Ze,Fe=St;break}}if(-1===Fe)break}const bt=x[Fe];bt&&bt.connect(Ze)}}this.cameraAutoUpdate=!0,this.enabled=!1,this.isPresenting=!1,this.getController=function(ae){let Oe=x[ae];return void 0===Oe&&(Oe=new CP,x[ae]=Oe),Oe.getTargetRaySpace()},this.getControllerGrip=function(ae){let Oe=x[ae];return void 0===Oe&&(Oe=new CP,x[ae]=Oe),Oe.getGripSpace()},this.getHand=function(ae){let Oe=x[ae];return void 0===Oe&&(Oe=new CP,x[ae]=Oe),Oe.getHandSpace()},this.setFramebufferScaleFactor=function(ae){s=ae,!0===n.isPresenting&&console.warn("THREE.WebXRManager: Cannot change framebuffer scale while presenting.")},this.setReferenceSpaceType=function(ae){a=ae,!0===n.isPresenting&&console.warn("THREE.WebXRManager: Cannot change reference space type while presenting.")},this.getReferenceSpace=function(){return c||o},this.setReferenceSpace=function(ae){c=ae},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 ae=tt(function*(Oe){if(r=Oe,null!==r){if(y=t.getRenderTarget(),r.addEventListener("select",ne),r.addEventListener("selectstart",ne),r.addEventListener("selectend",ne),r.addEventListener("squeeze",ne),r.addEventListener("squeezestart",ne),r.addEventListener("squeezeend",ne),r.addEventListener("end",se),r.addEventListener("inputsourceschange",ge),!0!==v.xrCompatible&&(yield e.makeXRCompatible()),D=t.getPixelRatio(),t.getSize(F),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 Mu(m.framebufferWidth,m.framebufferHeight,{format:Po,type:ed,colorSpace:t.outputColorSpace,stencilBuffer:v.stencil});else{let Ze=null,Fe=null,bt=null;v.depth&&(bt=v.stencil?e.DEPTH24_STENCIL8:e.DEPTH_COMPONENT24,Ze=v.stencil?ng:tg,Fe=v.stencil?eg:xu);const St={colorFormat:e.RGBA8,depthFormat:bt,scaleFactor:s};h=new XRWebGLBinding(r,e),p=h.createProjectionLayer(St),r.updateRenderState({layers:[p]}),t.setPixelRatio(1),t.setSize(p.textureWidth,p.textureHeight,!1),M=new Mu(p.textureWidth,p.textureHeight,{format:Po,type:ed,depthTexture:new d5(p.textureWidth,p.textureHeight,Fe,void 0,void 0,void 0,void 0,void 0,void 0,Ze),stencilBuffer:v.stencil,colorSpace:t.outputColorSpace,samples:v.antialias?4:0,resolveDepthBuffer:!1===p.ignoreDepthValues})}M.isXRRenderTarget=!0,this.setFoveation(l),c=null,o=yield r.requestReferenceSpace(a),en.setContext(r),en.start(),n.isPresenting=!0,n.dispatchEvent({type:"sessionstart"})}});return function(Oe){return ae.apply(this,arguments)}}(),this.getEnvironmentBlendMode=function(){if(null!==r)return r.environmentBlendMode},this.getDepthTexture=function(){return b.getDepthTexture()};const q=new O,re=new O;function we(ae,Oe){null===Oe?ae.matrixWorld.copy(ae.matrix):ae.matrixWorld.multiplyMatrices(Oe.matrixWorld,ae.matrix),ae.matrixWorldInverse.copy(ae.matrixWorld).invert()}this.updateCamera=function(ae){if(null===r)return;null!==b.texture&&(ae.near=b.depthNear,ae.far=b.depthFar),A.near=B.near=k.near=ae.near,A.far=B.far=k.far=ae.far,($!==A.near||ie!==A.far)&&(r.updateRenderState({depthNear:A.near,depthFar:A.far}),$=A.near,ie=A.far,k.near=$,k.far=ie,B.near=$,B.far=ie,k.updateProjectionMatrix(),B.updateProjectionMatrix(),ae.updateProjectionMatrix());const Oe=ae.parent,Ze=A.cameras;we(A,Oe);for(let Fe=0;Fe0&&(v.alphaTest.value=y.alphaTest);const M=t.get(y),x=M.envMap,C=M.envMapRotation;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(Eue.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,v.lightMapIntensity.value=y.lightMapIntensity,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,Z4(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 d(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===ko&&v.clearcoatNormalScale.value.negate())),y.dispersion>0&&(v.dispersion.value=y.dispersion),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 Due(i,t,e,n){let r={},s={},o=[];const a=i.getParameter(i.MAX_UNIFORM_BUFFER_BINDINGS);function m(M,x,C,F){const D=M.value,k=x+"_"+C;if(void 0===F[k])return F[k]="number"==typeof D||"boolean"==typeof D?D:D.clone(),!0;{const B=F[k];if("number"==typeof D||"boolean"==typeof D){if(B!==D)return F[k]=D,!0}else if(!1===B.equals(D))return B.copy(D),!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 k=0,B=x.length;k0&&(C+=16-D),M.__size=C,M.__cache={}}(M),C=function d(M){const x=function h(){for(let M=0;M0),Xt=!!le.morphAttributes.position,li=!!le.morphAttributes.normal,Li=!!le.morphAttributes.color;let ir=bu;de.toneMapped&&(null===k||!0===k.isXRRenderTarget)&&(ir=x.toneMapping);const la=le.morphAttributes.position||le.morphAttributes.normal||le.morphAttributes.color,hi=void 0!==la?la.length:0,Rt=it.get(de),fs=v.state.lights;!0!==ae||!0!==Oe&&L===T||bn.setState(de,L,L===T&&de.id===B);let fi=!1;de.version===Rt.__version?(Rt.needsLights&&Rt.lightsStateVersion!==fs.state.version||Rt.outputColorSpace!==xt||te.isBatchedMesh&&!1===Rt.batching||!te.isBatchedMesh&&!0===Rt.batching||te.isBatchedMesh&&!0===Rt.batchingColor&&null===te.colorTexture||te.isBatchedMesh&&!1===Rt.batchingColor&&null!==te.colorTexture||te.isInstancedMesh&&!1===Rt.instancing||!te.isInstancedMesh&&!0===Rt.instancing||te.isSkinnedMesh&&!1===Rt.skinning||!te.isSkinnedMesh&&!0===Rt.skinning||te.isInstancedMesh&&!0===Rt.instancingColor&&null===te.instanceColor||te.isInstancedMesh&&!1===Rt.instancingColor&&null!==te.instanceColor||te.isInstancedMesh&&!0===Rt.instancingMorph&&null===te.morphTexture||te.isInstancedMesh&&!1===Rt.instancingMorph&&null!==te.morphTexture||Rt.envMap!==wt||!0===de.fog&&Rt.fog!==je||void 0!==Rt.numClippingPlanes&&(Rt.numClippingPlanes!==bn.numPlanes||Rt.numIntersection!==bn.numIntersection)||Rt.vertexAlphas!==qt||Rt.vertexTangents!==an||Rt.morphTargets!==Xt||Rt.morphNormals!==li||Rt.morphColors!==Li||Rt.toneMapping!==ir||Rt.morphTargetsCount!==hi)&&(fi=!0):(fi=!0,Rt.__version=de.version);let El=Rt.currentProgram;!0===fi&&(El=xE(de,K,te));let qg=!1,ca=!1,qO=!1;const wr=El.getUniforms(),Uu=Rt.uniforms;if(Me.useProgram(El.program)&&(qg=!0,ca=!0,qO=!0),de.id!==B&&(B=de.id,ca=!0),qg||T!==L){wr.setValue(N,"projectionMatrix",L.projectionMatrix),wr.setValue(N,"viewMatrix",L.matrixWorldInverse);const za=wr.map.cameraPosition;void 0!==za&&za.setValue(N,Fe.setFromMatrixPosition(L.matrixWorld)),nt.logarithmicDepthBuffer&&wr.setValue(N,"logDepthBufFC",2/(Math.log(L.far+1)/Math.LN2)),(de.isMeshPhongMaterial||de.isMeshToonMaterial||de.isMeshLambertMaterial||de.isMeshBasicMaterial||de.isMeshStandardMaterial||de.isShaderMaterial)&&wr.setValue(N,"isOrthographic",!0===L.isOrthographicCamera),T!==L&&(T=L,ca=!0,qO=!0)}if(te.isSkinnedMesh){wr.setOptional(N,te,"bindMatrix"),wr.setOptional(N,te,"bindMatrixInverse");const za=te.skeleton;za&&(null===za.boneTexture&&za.computeBoneTexture(),wr.setValue(N,"boneTexture",za.boneTexture,mt))}te.isBatchedMesh&&(wr.setOptional(N,te,"batchingTexture"),wr.setValue(N,"batchingTexture",te._matricesTexture,mt),wr.setOptional(N,te,"batchingIdTexture"),wr.setValue(N,"batchingIdTexture",te._indirectTexture,mt),wr.setOptional(N,te,"batchingColorTexture"),null!==te._colorsTexture&&wr.setValue(N,"batchingColorTexture",te._colorsTexture,mt));const XO=le.morphAttributes;if((void 0!==XO.position||void 0!==XO.normal||void 0!==XO.color)&&jn.update(te,le,El),(ca||Rt.receiveShadow!==te.receiveShadow)&&(Rt.receiveShadow=te.receiveShadow,wr.setValue(N,"receiveShadow",te.receiveShadow)),de.isMeshGouraudMaterial&&null!==de.envMap&&(Uu.envMap.value=wt,Uu.flipEnvMap.value=wt.isCubeTexture&&!1===wt.isRenderTargetTexture?-1:1),de.isMeshStandardMaterial&&null===de.envMap&&null!==K.environment&&(Uu.envMapIntensity.value=K.environmentIntensity),ca&&(wr.setValue(N,"toneMappingExposure",x.toneMappingExposure),Rt.needsLights&&function Ove(L,K){L.ambientLightColor.needsUpdate=K,L.lightProbe.needsUpdate=K,L.directionalLights.needsUpdate=K,L.directionalLightShadows.needsUpdate=K,L.pointLights.needsUpdate=K,L.pointLightShadows.needsUpdate=K,L.spotLights.needsUpdate=K,L.spotLightShadows.needsUpdate=K,L.rectAreaLights.needsUpdate=K,L.hemisphereLights.needsUpdate=K}(Uu,qO),je&&!0===de.fog&&Bt.refreshFogUniforms(Uu,je),Bt.refreshMaterialUniforms(Uu,de,re,q,v.state.transmissionRenderTarget[L.id]),uS.upload(N,_8(Rt),Uu,mt)),de.isShaderMaterial&&!0===de.uniformsNeedUpdate&&(uS.upload(N,_8(Rt),Uu,mt),de.uniformsNeedUpdate=!1),de.isSpriteMaterial&&wr.setValue(N,"center",te.center),wr.setValue(N,"modelViewMatrix",te.modelViewMatrix),wr.setValue(N,"normalMatrix",te.normalMatrix),wr.setValue(N,"modelMatrix",te.matrixWorld),de.isShaderMaterial||de.isRawShaderMaterial){const za=de.uniformsGroups;for(let KO=0,Lve=za.length;KO{function je(){de.forEach(function(st){it.get(st).currentProgram.isReady()&&de.delete(st)}),0!==de.size?setTimeout(je,10):te(L)}null!==Ne.get("KHR_parallel_shader_compile")?je():setTimeout(je,10)})};let ui=null;function pc(){kf.stop()}function f8(){kf.start()}const kf=new t5;function YO(L,K,le,de){if(!1===L.visible)return;if(L.layers.test(K.layers))if(L.isGroup)le=L.renderOrder;else if(L.isLOD)!0===L.autoUpdate&&L.update(K);else if(L.isLight)v.pushLight(L),L.castShadow&&v.pushShadow(L);else if(L.isSprite){if(!L.frustumCulled||en.intersectsSprite(L)){de&&bt.setFromMatrixPosition(L.matrixWorld).applyMatrix4(Ze);const st=De.update(L),xt=L.material;xt.visible&&b.push(L,st,xt,le,bt.z,null)}}else if((L.isMesh||L.isLine||L.isPoints)&&(!L.frustumCulled||en.intersectsObject(L))){const st=De.update(L),xt=L.material;if(de&&(void 0!==L.boundingSphere?(null===L.boundingSphere&&L.computeBoundingSphere(),bt.copy(L.boundingSphere.center)):(null===st.boundingSphere&&st.computeBoundingSphere(),bt.copy(st.boundingSphere.center)),bt.applyMatrix4(L.matrixWorld).applyMatrix4(Ze)),Array.isArray(xt)){const wt=st.groups;for(let qt=0,an=wt.length;qt0&&bE(te,K,le),je.length>0&&bE(je,K,le),st.length>0&&bE(st,K,le),Me.buffers.depth.setTest(!0),Me.buffers.depth.setMask(!0),Me.buffers.color.setMask(!0),Me.setPolygonOffset(!1)}function m8(L,K,le,de){if(null!==(!0===le.isScene?le.overrideMaterial:null))return;void 0===v.state.transmissionRenderTarget[de.id]&&(v.state.transmissionRenderTarget[de.id]=new Mu(1,1,{generateMipmaps:!0,type:Ne.has("EXT_color_buffer_half_float")||Ne.has("EXT_color_buffer_float")?Jm:ed,minFilter:bl,samples:4,stencilBuffer:s,resolveDepthBuffer:!1,resolveStencilBuffer:!1,colorSpace:Jn.workingColorSpace}));const je=v.state.transmissionRenderTarget[de.id],st=de.viewport||A;je.setSize(st.z,st.w);const xt=x.getRenderTarget();x.setRenderTarget(je),x.getClearColor(ne),se=x.getClearAlpha(),se<1&&x.setClearColor(16777215,.5),x.clear(),Mt&&dt.render(le);const wt=x.toneMapping;x.toneMapping=bu;const qt=de.viewport;if(void 0!==de.viewport&&(de.viewport=void 0),v.setupLightsView(de),!0===ae&&bn.setGlobalState(x.clippingPlanes,de),bE(L,le,de),mt.updateMultisampleRenderTarget(je),mt.updateRenderTargetMipmap(je),!1===Ne.has("WEBGL_multisampled_render_to_texture")){let an=!1;for(let Xt=0,li=K.length;Xt0)for(let st=0,xt=je.length;st0&&m8(de,te,L,K),Mt&&dt.render(L),p8(b,L,K);null!==k&&(mt.updateMultisampleRenderTarget(k),mt.updateRenderTargetMipmap(k)),!0===L.isScene&&L.onAfterRender(x,L,K),Pn.resetDefaultState(),B=-1,T=null,M.pop(),M.length>0?(v=M[M.length-1],!0===ae&&bn.setGlobalState(x.clippingPlanes,v.state.camera)):v=null,y.pop(),b=y.length>0?y[y.length-1]:null},this.getActiveCubeFace=function(){return F},this.getActiveMipmapLevel=function(){return D},this.getRenderTarget=function(){return k},this.setRenderTargetTextures=function(L,K,le){it.get(L.texture).__webglTexture=K,it.get(L.depthTexture).__webglTexture=le;const de=it.get(L);de.__hasExternalTextures=!0,de.__autoAllocateDepthBuffer=void 0===le,de.__autoAllocateDepthBuffer||!0===Ne.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(L,K){const le=it.get(L);le.__webglFramebuffer=K,le.__useDefaultFramebuffer=void 0===K},this.setRenderTarget=function(L,K=0,le=0){k=L,F=K,D=le;let de=!0,te=null,je=!1,st=!1;if(L){const wt=it.get(L);void 0!==wt.__useDefaultFramebuffer?(Me.bindFramebuffer(N.FRAMEBUFFER,null),de=!1):void 0===wt.__webglFramebuffer?mt.setupRenderTarget(L):wt.__hasExternalTextures&&mt.rebindTextures(L,it.get(L.texture).__webglTexture,it.get(L.depthTexture).__webglTexture);const qt=L.texture;(qt.isData3DTexture||qt.isDataArrayTexture||qt.isCompressedArrayTexture)&&(st=!0);const an=it.get(L).__webglFramebuffer;L.isWebGLCubeRenderTarget?(te=Array.isArray(an[K])?an[K][le]:an[K],je=!0):te=L.samples>0&&!1===mt.useMultisampledRTT(L)?it.get(L).__webglMultisampledFramebuffer:Array.isArray(an)?an[le]:an,A.copy(L.viewport),$.copy(L.scissor),ie=L.scissorTest}else A.copy(Be).multiplyScalar(re).floor(),$.copy(Ye).multiplyScalar(re).floor(),ie=It;if(Me.bindFramebuffer(N.FRAMEBUFFER,te)&&de&&Me.drawBuffers(L,te),Me.viewport(A),Me.scissor($),Me.setScissorTest(ie),je){const wt=it.get(L.texture);N.framebufferTexture2D(N.FRAMEBUFFER,N.COLOR_ATTACHMENT0,N.TEXTURE_CUBE_MAP_POSITIVE_X+K,wt.__webglTexture,le)}else if(st){const wt=it.get(L.texture);N.framebufferTextureLayer(N.FRAMEBUFFER,N.COLOR_ATTACHMENT0,wt.__webglTexture,le||0,K||0)}B=-1},this.readRenderTargetPixels=function(L,K,le,de,te,je,st){if(!L||!L.isWebGLRenderTarget)return void console.error("THREE.WebGLRenderer.readRenderTargetPixels: renderTarget is not THREE.WebGLRenderTarget.");let xt=it.get(L).__webglFramebuffer;if(L.isWebGLCubeRenderTarget&&void 0!==st&&(xt=xt[st]),xt){Me.bindFramebuffer(N.FRAMEBUFFER,xt);try{const wt=L.texture,qt=wt.format,an=wt.type;if(!nt.textureFormatReadable(qt))return void console.error("THREE.WebGLRenderer.readRenderTargetPixels: renderTarget is not in RGBA or implementation defined format.");if(!nt.textureTypeReadable(an))return void console.error("THREE.WebGLRenderer.readRenderTargetPixels: renderTarget is not in UnsignedByteType or implementation defined type.");K>=0&&K<=L.width-de&&le>=0&&le<=L.height-te&&N.readPixels(K,le,de,te,vn.convert(qt),vn.convert(an),je)}finally{const wt=null!==k?it.get(k).__webglFramebuffer:null;Me.bindFramebuffer(N.FRAMEBUFFER,wt)}}},this.readRenderTargetPixelsAsync=function(){var L=tt(function*(K,le,de,te,je,st,xt){if(!K||!K.isWebGLRenderTarget)throw new Error("THREE.WebGLRenderer.readRenderTargetPixels: renderTarget is not THREE.WebGLRenderTarget.");let wt=it.get(K).__webglFramebuffer;if(K.isWebGLCubeRenderTarget&&void 0!==xt&&(wt=wt[xt]),wt){Me.bindFramebuffer(N.FRAMEBUFFER,wt);try{const qt=K.texture,an=qt.format,Xt=qt.type;if(!nt.textureFormatReadable(an))throw new Error("THREE.WebGLRenderer.readRenderTargetPixelsAsync: renderTarget is not in RGBA or implementation defined format.");if(!nt.textureTypeReadable(Xt))throw new Error("THREE.WebGLRenderer.readRenderTargetPixelsAsync: renderTarget is not in UnsignedByteType or implementation defined type.");if(le>=0&&le<=K.width-te&&de>=0&&de<=K.height-je){const li=N.createBuffer();N.bindBuffer(N.PIXEL_PACK_BUFFER,li),N.bufferData(N.PIXEL_PACK_BUFFER,st.byteLength,N.STREAM_READ),N.readPixels(le,de,te,je,vn.convert(an),vn.convert(Xt),0),N.flush();const Li=N.fenceSync(N.SYNC_GPU_COMMANDS_COMPLETE,0);yield function eae(i,t,e){return new Promise(function(n,r){setTimeout(function s(){switch(i.clientWaitSync(t,i.SYNC_FLUSH_COMMANDS_BIT,0)){case i.WAIT_FAILED:r();break;case i.TIMEOUT_EXPIRED:setTimeout(s,e);break;default:n()}},e)})}(N,Li,4);try{N.bindBuffer(N.PIXEL_PACK_BUFFER,li),N.getBufferSubData(N.PIXEL_PACK_BUFFER,0,st)}finally{N.deleteBuffer(li),N.deleteSync(Li)}return st}}finally{const qt=null!==k?it.get(k).__webglFramebuffer:null;Me.bindFramebuffer(N.FRAMEBUFFER,qt)}}});return function(K,le,de,te,je,st,xt){return L.apply(this,arguments)}}(),this.copyFramebufferToTexture=function(L,K=null,le=0){!0!==L.isTexture&&(cg("WebGLRenderer: copyFramebufferToTexture function signature has changed."),K=arguments[0]||null,L=arguments[1]);const de=Math.pow(2,-le),te=Math.floor(L.image.width*de),je=Math.floor(L.image.height*de),st=null!==K?K.x:0,xt=null!==K?K.y:0;mt.setTexture2D(L,0),N.copyTexSubImage2D(N.TEXTURE_2D,le,0,0,st,xt,te,je),Me.unbindTexture()},this.copyTextureToTexture=function(L,K,le=null,de=null,te=0){let je,st,xt,wt,qt,an;!0!==L.isTexture&&(cg("WebGLRenderer: copyTextureToTexture function signature has changed."),de=arguments[0]||null,L=arguments[1],K=arguments[2],te=arguments[3]||0,le=null),null!==le?(je=le.max.x-le.min.x,st=le.max.y-le.min.y,xt=le.min.x,wt=le.min.y):(je=L.image.width,st=L.image.height,xt=0,wt=0),null!==de?(qt=de.x,an=de.y):(qt=0,an=0);const Xt=vn.convert(K.format),li=vn.convert(K.type);mt.setTexture2D(K,0),N.pixelStorei(N.UNPACK_FLIP_Y_WEBGL,K.flipY),N.pixelStorei(N.UNPACK_PREMULTIPLY_ALPHA_WEBGL,K.premultiplyAlpha),N.pixelStorei(N.UNPACK_ALIGNMENT,K.unpackAlignment);const Li=N.getParameter(N.UNPACK_ROW_LENGTH),ir=N.getParameter(N.UNPACK_IMAGE_HEIGHT),la=N.getParameter(N.UNPACK_SKIP_PIXELS),hi=N.getParameter(N.UNPACK_SKIP_ROWS),Rt=N.getParameter(N.UNPACK_SKIP_IMAGES),fs=L.isCompressedTexture?L.mipmaps[te]:L.image;N.pixelStorei(N.UNPACK_ROW_LENGTH,fs.width),N.pixelStorei(N.UNPACK_IMAGE_HEIGHT,fs.height),N.pixelStorei(N.UNPACK_SKIP_PIXELS,xt),N.pixelStorei(N.UNPACK_SKIP_ROWS,wt),L.isDataTexture?N.texSubImage2D(N.TEXTURE_2D,te,qt,an,je,st,Xt,li,fs.data):L.isCompressedTexture?N.compressedTexSubImage2D(N.TEXTURE_2D,te,qt,an,fs.width,fs.height,Xt,fs.data):N.texSubImage2D(N.TEXTURE_2D,te,qt,an,je,st,Xt,li,fs),N.pixelStorei(N.UNPACK_ROW_LENGTH,Li),N.pixelStorei(N.UNPACK_IMAGE_HEIGHT,ir),N.pixelStorei(N.UNPACK_SKIP_PIXELS,la),N.pixelStorei(N.UNPACK_SKIP_ROWS,hi),N.pixelStorei(N.UNPACK_SKIP_IMAGES,Rt),0===te&&K.generateMipmaps&&N.generateMipmap(N.TEXTURE_2D),Me.unbindTexture()},this.copyTextureToTexture3D=function(L,K,le=null,de=null,te=0){let je,st,xt,wt,qt,an,Xt,li,Li;!0!==L.isTexture&&(cg("WebGLRenderer: copyTextureToTexture3D function signature has changed."),le=arguments[0]||null,de=arguments[1]||null,L=arguments[2],K=arguments[3],te=arguments[4]||0);const ir=L.isCompressedTexture?L.mipmaps[te]:L.image;null!==le?(je=le.max.x-le.min.x,st=le.max.y-le.min.y,xt=le.max.z-le.min.z,wt=le.min.x,qt=le.min.y,an=le.min.z):(je=ir.width,st=ir.height,xt=ir.depth,wt=0,qt=0,an=0),null!==de?(Xt=de.x,li=de.y,Li=de.z):(Xt=0,li=0,Li=0);const la=vn.convert(K.format),hi=vn.convert(K.type);let Rt;if(K.isData3DTexture)mt.setTexture3D(K,0),Rt=N.TEXTURE_3D;else{if(!K.isDataArrayTexture&&!K.isCompressedArrayTexture)return void console.warn("THREE.WebGLRenderer.copyTextureToTexture3D: only supports THREE.DataTexture3D and THREE.DataTexture2DArray.");mt.setTexture2DArray(K,0),Rt=N.TEXTURE_2D_ARRAY}N.pixelStorei(N.UNPACK_FLIP_Y_WEBGL,K.flipY),N.pixelStorei(N.UNPACK_PREMULTIPLY_ALPHA_WEBGL,K.premultiplyAlpha),N.pixelStorei(N.UNPACK_ALIGNMENT,K.unpackAlignment);const fs=N.getParameter(N.UNPACK_ROW_LENGTH),fi=N.getParameter(N.UNPACK_IMAGE_HEIGHT),El=N.getParameter(N.UNPACK_SKIP_PIXELS),qg=N.getParameter(N.UNPACK_SKIP_ROWS),ca=N.getParameter(N.UNPACK_SKIP_IMAGES);N.pixelStorei(N.UNPACK_ROW_LENGTH,ir.width),N.pixelStorei(N.UNPACK_IMAGE_HEIGHT,ir.height),N.pixelStorei(N.UNPACK_SKIP_PIXELS,wt),N.pixelStorei(N.UNPACK_SKIP_ROWS,qt),N.pixelStorei(N.UNPACK_SKIP_IMAGES,an),L.isDataTexture||L.isData3DTexture?N.texSubImage3D(Rt,te,Xt,li,Li,je,st,xt,la,hi,ir.data):K.isCompressedArrayTexture?N.compressedTexSubImage3D(Rt,te,Xt,li,Li,je,st,xt,la,ir.data):N.texSubImage3D(Rt,te,Xt,li,Li,je,st,xt,la,hi,ir),N.pixelStorei(N.UNPACK_ROW_LENGTH,fs),N.pixelStorei(N.UNPACK_IMAGE_HEIGHT,fi),N.pixelStorei(N.UNPACK_SKIP_PIXELS,El),N.pixelStorei(N.UNPACK_SKIP_ROWS,qg),N.pixelStorei(N.UNPACK_SKIP_IMAGES,ca),0===te&&K.generateMipmaps&&N.generateMipmap(Rt),Me.unbindTexture()},this.initRenderTarget=function(L){void 0===it.get(L).__webglFramebuffer&&mt.setupRenderTarget(L)},this.initTexture=function(L){L.isCubeTexture?mt.setTextureCube(L,0):L.isData3DTexture?mt.setTexture3D(L,0):L.isDataArrayTexture||L.isCompressedArrayTexture?mt.setTexture2DArray(L,0):mt.setTexture2D(L,0),Me.unbindTexture()},this.resetState=function(){F=0,D=0,k=null,Me.reset(),Pn.reset()},typeof __THREE_DEVTOOLS__<"u"&&__THREE_DEVTOOLS__.dispatchEvent(new CustomEvent("observe",{detail:this}))}get coordinateSystem(){return td}get outputColorSpace(){return this._outputColorSpace}set outputColorSpace(t){this._outputColorSpace=t;const e=this.getContext();e.drawingBufferColorSpace=t===jk?"display-p3":"srgb",e.unpackColorSpace=Jn.workingColorSpace===LC?"display-p3":"srgb"}}class kb extends Fr{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 rd,this.environmentIntensity=1,this.environmentRotation=new rd,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 AP{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=ta()}onUploadCallback(){}set needsUpdate(t){!0===t&&this.version++}get updateRange(){return cg("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;r0){const r=e[n[0]];if(void 0!==r){this.morphTargetInfluences=[],this.morphTargetDictionary={};for(let s=0,o=r.length;sn)return;FP.applyMatrix4(i.matrixWorld);const l=t.ray.origin.distanceTo(FP);return lt.far?void 0:{distance:l,point:Z5.clone().applyMatrix4(i.matrixWorld),index:r,face:null,faceIndex:null,object:i}}const Q5=new O,J5=new O;class Ng extends pf{constructor(t,e){super(t,e),this.isLineSegments=!0,this.type="LineSegments"}computeLineDistances(){const t=this.geometry;if(null===t.index){const e=t.attributes.position,n=[];for(let r=0,s=e.count;r0){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 uc{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 d=n[r];return(r+(o-d)/(n[r+1]-d))/(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 xe:new O);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 O,r=[],s=[],o=[],a=new O,l=new Nt;for(let m=0;m<=t;m++)r[m]=this.getTangentAt(m/t,new O);s[0]=new O,o[0]=new O;let c=Number.MAX_VALUE;const d=Math.abs(r[0].x),h=Math.abs(r[0].y),p=Math.abs(r[0].z);d<=c&&(c=d,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(tr(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(tr(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 NP extends uc{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 xe){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(iG(a,l.x,c.x,d.x,h.x),iG(a,l.y,c.y,d.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]:(DS.subVectors(r[0],r[1]).add(r[0]),c=DS);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 d=c.getPoint(1);return this.currentPoint.copy(d),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 RS extends hn{constructor(t=[new xe(0,-.5),new xe(.5,0),new xe(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=tr(r,0,2*Math.PI);const s=[],o=[],a=[],l=[],c=[],d=1/e,h=new O,p=new xe,m=new O,g=new O,b=new O;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*d*r,C=Math.sin(x),F=Math.cos(x);for(let D=0;D<=t.length-1;D++)h.x=t[D].x*C,h.y=t[D].y,h.z=t[D].x*F,o.push(h.x,h.y,h.z),p.x=M/e,p.y=D/(t.length-1),a.push(p.x,p.y),c.push(l[3*D+0]*C,l[3*D+1],l[3*D+0]*F)}for(let M=0;M0&&x(!0),e>0&&x(!1)),this.setIndex(d),this.setAttribute("position",new ct(h,3)),this.setAttribute("normal",new ct(p,3)),this.setAttribute("uv",new ct(m,2))}copy(t){return super.copy(t),this.parameters=Object.assign({},t.parameters),this}static fromJSON(t){return new Bg(t.radiusTop,t.radiusBottom,t.height,t.radialSegments,t.heightSegments,t.openEnded,t.thetaStart,t.thetaLength)}}class PS extends Bg{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 PS(t.radius,t.height,t.radialSegments,t.heightSegments,t.openEnded,t.thetaStart,t.thetaLength)}}class jb 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 d=[],h=new O,p=new O,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 F=0;F<=e;F++){const D=F/e;h.x=-t*Math.cos(r+D*s)*Math.sin(o+x*a),h.y=t*Math.cos(o+x*a),h.z=t*Math.sin(r+D*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(D+C,1-x),M.push(c++)}d.push(M)}for(let y=0;y0)&&m.push(d[y][M+1],C,D),(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 dispersion(){return this._dispersion}set dispersion(t){this._dispersion>0!=t>0&&this.version++,this._dispersion=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.dispersion=t.dispersion,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 zS extends Fo{constructor(t){super(),this.isMeshPhongMaterial=!0,this.type="MeshPhongMaterial",this.color=new qe(16777215),this.specular=new qe(1118481),this.shininess=30,this.map=null,this.lightMap=null,this.lightMapIntensity=1,this.aoMap=null,this.aoMapIntensity=1,this.emissive=new qe(0),this.emissiveIntensity=1,this.emissiveMap=null,this.bumpMap=null,this.bumpScale=1,this.normalMap=null,this.normalMapType=Qh,this.normalScale=new xe(1,1),this.displacementMap=null,this.displacementScale=1,this.displacementBias=0,this.specularMap=null,this.alphaMap=null,this.envMap=null,this.envMapRotation=new rd,this.combine=EC,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 vf(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 vG(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 tO(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 nO(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 qb{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 _G(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}}hc.prototype.TimeBufferType=Float32Array,hc.prototype.ValueBufferType=Float32Array,hc.prototype.DefaultInterpolation=bb;class zg extends hc{constructor(t,e,n){super(t,e,n)}}zg.prototype.ValueTypeName="bool",zg.prototype.ValueBufferType=Array,zg.prototype.DefaultInterpolation=yb,zg.prototype.InterpolantFactoryMethodLinear=void 0,zg.prototype.InterpolantFactoryMethodSmooth=void 0;class bG extends hc{}bG.prototype.ValueTypeName="color";class Hg extends hc{}Hg.prototype.ValueTypeName="number";class Fhe extends qb{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 d=c+a;c!==d;c+=4)uo.slerpFlat(s,0,o,c-a,o,c,l);return s}}class Gg extends hc{InterpolantFactoryMethodLinear(t){return new Fhe(this.times,this.values,this.getValueSize(),t)}}Gg.prototype.ValueTypeName="quaternion",Gg.prototype.InterpolantFactoryMethodSmooth=void 0;class $g extends hc{constructor(t,e,n){super(t,e,n)}}$g.prototype.ValueTypeName="string",$g.prototype.ValueBufferType=Array,$g.prototype.DefaultInterpolation=yb,$g.prototype.InterpolantFactoryMethodLinear=void 0,$g.prototype.InterpolantFactoryMethodSmooth=void 0;class Wg extends hc{}Wg.prototype.ValueTypeName="vector";class Xb{constructor(t="",e=-1,n=[],r=2500){this.name=t,this.tracks=n,this.duration=e,this.blendMode=r,this.uuid=ta(),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(Nhe(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(hc.toJSON(n[s]));return r}static CreateFromMorphTargetSequence(t,e,n,r){const s=e.length,o=[];for(let a=0;a1){const h=d[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=[];nO(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:wG,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 ud={};class Bhe extends Error{constructor(t,e){super(t),this.response=e}}class La extends yf{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=ku.get(t);if(void 0!==s)return this.manager.itemStart(t),setTimeout(()=>{e&&e(s),this.manager.itemEnd(t)},0),s;if(void 0!==ud[t])return void ud[t].push({onLoad:e,onProgress:n,onError:r});ud[t]=[],ud[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 d=ud[t],h=c.body.getReader(),p=c.headers.get("X-File-Size")||c.headers.get("Content-Length"),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 F=new ProgressEvent("progress",{lengthComputable:g,loaded:b,total:m});for(let D=0,k=d.length;D{y.error(x)})}()}});return new Response(v)}throw new Bhe(`fetch for "${c.url}" responded with ${c.status}: ${c.statusText}`,c)}).then(c=>{switch(l){case"arraybuffer":return c.arrayBuffer();case"blob":return c.blob();case"document":return c.text().then(d=>(new DOMParser).parseFromString(d,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=>{ku.add(t,c);const d=ud[t];delete ud[t];for(let h=0,p=d.length;h{const d=ud[t];if(void 0===d)throw this.manager.itemError(t),c;delete ud[t];for(let h=0,p=d.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 HS extends yf{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=ku.get(t);if(void 0!==o)return s.manager.itemStart(t),setTimeout(function(){e&&e(o),s.manager.itemEnd(t)},0),o;const a=wb("img");function l(){d(),ku.add(t,this),e&&e(this),s.manager.itemEnd(t)}function c(h){d(),r&&r(h),s.manager.itemError(t),s.manager.itemEnd(t)}function d(){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 Pu extends yf{constructor(t){super(t)}load(t,e,n,r){const s=new Oo,o=new HS(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 GS extends Fr{constructor(t,e=1){super(),this.isLight=!0,this.type="Light",this.color=new qe(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()),void 0!==this.target&&(e.object.target=this.target.uuid),e}}const iO=new Nt,MG=new O,CG=new O;class rO{constructor(t){this.camera=t,this.intensity=1,this.bias=0,this.normalBias=0,this.radius=1,this.blurSamples=8,this.mapSize=new xe(512,512),this.map=null,this.mapPass=null,this.matrix=new Nt,this.autoUpdate=!0,this.needsUpdate=!1,this._frustum=new aS,this._frameExtents=new xe(1,1),this._viewportCount=1,this._viewports=[new gi(0,0,1,1)]}getViewportCount(){return this._viewportCount}getFrustum(){return this._frustum}updateMatrices(t){const e=this.camera,n=this.matrix;MG.setFromMatrixPosition(t.matrixWorld),e.position.copy(MG),CG.setFromMatrixPosition(t.target.matrixWorld),e.lookAt(CG),e.updateMatrixWorld(),iO.multiplyMatrices(e.projectionMatrix,e.matrixWorldInverse),this._frustum.setFromProjectionMatrix(iO),n.set(.5,0,0,.5,0,.5,0,.5,0,0,.5,.5,0,0,0,1),n.multiply(iO)}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.intensity=t.intensity,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 1!==this.intensity&&(t.intensity=this.intensity),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 Vhe extends rO{constructor(){super(new br(50,1,.5,500)),this.isSpotLightShadow=!0,this.focus=1}updateMatrices(t){const e=this.camera,n=2*ag*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 SG extends GS{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(Fr.DEFAULT_UP),this.updateMatrix(),this.target=new Fr,this.distance=n,this.angle=r,this.penumbra=s,this.decay=o,this.map=null,this.shadow=new Vhe}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 EG=new Nt,Kb=new O,sO=new O;class zhe extends rO{constructor(){super(new br(90,1,.5,500)),this.isPointLightShadow=!0,this._frameExtents=new xe(4,2),this._viewportCount=6,this._viewports=[new gi(2,1,1,1),new gi(0,1,1,1),new gi(3,1,1,1),new gi(1,1,1,1),new gi(3,0,1,1),new gi(1,0,1,1)],this._cubeDirections=[new O(1,0,0),new O(-1,0,0),new O(0,0,1),new O(0,0,-1),new O(0,1,0),new O(0,-1,0)],this._cubeUps=[new O(0,1,0),new O(0,1,0),new O(0,1,0),new O(0,1,0),new O(0,0,1),new O(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()),Kb.setFromMatrixPosition(t.matrixWorld),n.position.copy(Kb),sO.copy(n.position),sO.add(this._cubeDirections[e]),n.up.copy(this._cubeUps[e]),n.lookAt(sO),n.updateMatrixWorld(),r.makeTranslation(-Kb.x,-Kb.y,-Kb.z),EG.multiplyMatrices(n.projectionMatrix,n.matrixWorldInverse),this._frustum.setFromProjectionMatrix(EG)}}class AG extends GS{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 zhe}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 Hhe extends rO{constructor(){super(new Ib(-5,5,5,-5,.5,500)),this.isDirectionalLightShadow=!0}}class DG extends GS{constructor(t,e){super(t,e),this.isDirectionalLight=!0,this.type="DirectionalLight",this.position.copy(Fr.DEFAULT_UP),this.updateMatrix(),this.target=new Fr,this.shadow=new Hhe}dispose(){this.shadow.dispose()}copy(t){return super.copy(t),this.target=t.target.clone(),this.shadow=t.shadow.clone(),this}}class $S extends GS{constructor(t,e){super(t,e),this.isAmbientLight=!0,this.type="AmbientLight"}}class Ou{static decodeText(t){if(console.warn("THREE.LoaderUtils: decodeText() has been deprecated with r165 and will be removed with r175. Use TextDecoder instead."),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=ku.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 ku.add(t,c),e&&e(c),s.manager.itemEnd(t),c}).catch(function(c){r&&r(c),ku.remove(t),s.manager.itemError(t),s.manager.itemEnd(t)});ku.add(t,l),s.manager.itemStart(t)}}class OG{constructor(t=!0){this.autoStart=t,this.startTime=0,this.oldTime=0,this.elapsedTime=0,this.running=!1}start(){this.startTime=FG(),this.oldTime=this.startTime,this.elapsedTime=0,this.running=!0}stop(){this.getElapsedTime(),this.running=!1,this.autoStart=!1}getElapsedTime(){return this.getDelta(),this.elapsedTime}getDelta(){let t=0;if(this.autoStart&&!this.running)return this.start(),0;if(this.running){const e=FG();t=(e-this.oldTime)/1e3,this.oldTime=e,this.elapsedTime+=t}return t}}function FG(){return(typeof performance>"u"?Date:performance).now()}const aO="\\[\\]\\.:\\/",Jhe=new RegExp("["+aO+"]","g"),lO="[^"+aO+"]",efe="[^"+aO.replace("\\.","")+"]",sfe=new RegExp("^"+/((?:WC+[\/:])*)/.source.replace("WC",lO)+/(WCOD+)?/.source.replace("WCOD",efe)+/(?:\.(WC+)(?:\[(.+)\])?)?/.source.replace("WC",lO)+/\.(WC+)(?:\[(.+)\])?/.source.replace("WC",lO)+"$"),ofe=["material","materials","bones","map"];class afe{constructor(t,e,n){const r=n||Ri.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 Ri=(()=>{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(Jhe,"")}static parseTrackName(e){const n=sfe.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!==ofe.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;an.name===t||n.userData.name===t);return e?(e.removeFromParent(),new ra(e)):null}getBoundings(){return(new Vs).setFromObject(this.nativeMesh)}clone(){return new ra(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 Mn&&this.disposeMesh(t)}),this.nativeMesh instanceof Mn&&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 hfe extends ra{get supportsFov(){return this.nativeCamera instanceof br||"PerspectiveCamera"==this.nativeCamera.type}get fov(){return this.nativeCamera.fov||NaN}set fov(t){this.supportsFov&&(this.nativeCamera.fov=t,this.nativeCamera.updateProjectionMatrix())}constructor(t){super(t),this.nativeCamera=t}}class ffe extends Ose{createMaterial(t){let e={};t.color?e={color:t.color}:t.diffuse||(e={color:super.randomColor()});let n=t.shading||"unlit";switch(n){case"unlit":return new qi(Object.assign(Object.assign({},e),{map:t.diffuse||null}));case"standart":return new Yb(Object.assign(Object.assign({},e),{map:t.diffuse||null}));case"phong":return new zS(Object.assign(Object.assign({},e),{map:t.diffuse||null}));case"wireframe":return new qi(Object.assign(Object.assign({},e),{wireframe:!0}));default:throw new Error(`"${n}" shading not implemented for three.js`)}}transformPrimitiveZUp(t){t.geometry.rotateX(Math.PI/2)}createPrimitive(t,e={}){var n,r,s,o;let a=null,l=this.createMaterial(e);switch(t.shape){case"PLANE":a=new Mn(new Iu((null===(n=t.dimensions)||void 0===n?void 0:n.x)||1e4,(null===(r=t.dimensions)||void 0===r?void 0:r.y)||1e4,null===(s=t.segments)||void 0===s?void 0:s.x,null===(o=t.segments)||void 0===o?void 0:o.y),l);break;case"BOX":a=new Mn(new rf(...Te.spr(t.dimensions),...t.segments?Te.spr(t.segments):[]),l);break;case"CAPSULE":a=new Mn(new kS(t.radius,t.centersDistance,t.capSegments,t.radialSegments),l),this.transformPrimitiveZUp(a);break;case"CYLINDER":a=new Mn(new Bg(t.radius,t.radius,t.height,t.radialSegments,t.heightSegments),l),this.transformPrimitiveZUp(a);break;case"CONE":a=new Mn(new PS(t.radius,t.height,t.radialSegments,t.heightSegments),l),this.transformPrimitiveZUp(a);break;case"SPHERE":a=new Mn(new jb(t.radius,t.widthSegments,t.heightSegments),l),this.transformPrimitiveZUp(a);break;case"COMPOUND":a=new No;for(const{position:d,rotation:h,shape:p}of t.children){const m=this.createPrimitive(p,e).nativeMesh;d&&m.position.set(...Te.spr(d)),h&&m.quaternion.set(...Yi.spr(h)),a.add(m)}break;case"MESH":const c=new hn;c.setFromPoints(t.vertices.map(d=>new O(...Te.spr(d)))),c.setIndex(t.faces.reduce((d,h)=>(d.push(...h),d),[])),a=new Mn(c,l)}if(!a)throw new Error(`Primitive with shape "${t.shape}" not implemented`);return void 0!==e.castShadow&&(a.castShadow=e.castShadow),void 0!==e.receiveShadow&&(a.receiveShadow=e.receiveShadow),new ra(a)}createPerspectiveCamera(t={}){return new hfe(new br(t.fov||75,t.aspectRatio||1,t.frustrum?t.frustrum.near:1,t.frustrum?t.frustrum.far:1e4))}}function QG(i,t){if(t===Coe)return console.warn("THREE.BufferGeometryUtils.toTrianglesDrawMode(): Geometry already defined as triangles."),i;if(t===Wk||t===C4){let e=i.getIndex();if(null===e){const o=[],a=i.getAttribute("position");if(void 0===a)return console.error("THREE.BufferGeometryUtils.toTrianglesDrawMode(): Undefined position attribute. Processing not possible."),i;for(let l=0;l=2.0 are supported.")));const c=new Yfe(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 d=0;d=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 mfe(){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 Bn={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_DISPERSION:"KHR_materials_dispersion",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 gfe{constructor(t){this.parser=t,this.name=Bn.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 Ife{constructor(t){this.parser=t,this.name=Bn.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 Rfe{constructor(t){this.parser=t,this.name=Bn.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 kfe{constructor(t){this.name=Bn.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 d=r.count,h=r.byteStride,p=new Uint8Array(a,r.byteOffset||0,r.byteLength||0);return o.decodeGltfBufferAsync?o.decodeGltfBufferAsync(d,h,p,r.mode,r.filter).then(function(m){return m.buffer}):o.ready.then(function(){const m=new ArrayBuffer(d*h);return o.decodeGltfBuffer(new Uint8Array(m),d,h,p,r.mode,r.filter),m})})}return null}}class Pfe{constructor(t){this.name=Bn.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!==Na.TRIANGLES&&c.mode!==Na.TRIANGLE_STRIP&&c.mode!==Na.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(d=>(l[c]=d,l[c])));return a.length<1?null:(a.push(this.parser.createNodeMesh(t)),Promise.all(a).then(c=>{const d=c.pop(),h=d.isGroup?d.children:[d],p=c[0].count,m=[];for(const g of h){const b=new Nt,v=new O,y=new uo,M=new O(1,1,1),x=new Y5(g.geometry,g.material,p);for(let C=0;C-1,o=s?a.match(/Firefox\/([0-9]+)\./)[1]:-1}this.textureLoader=typeof createImageBitmap>"u"||n&&r<17||s&&o<98?new Pu(this.options.manager):new Xhe(this.options.manager),this.textureLoader.setCrossOrigin(this.options.crossOrigin),this.textureLoader.setRequestHeader(this.options.requestHeader),this.fileLoader=new La(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 Sf(s,a,r),hd(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,d]of o.children.entries())s(d,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(T,D[k*l+1]),l>=3&&v.setZ(T,D[k*l+2]),l>=4&&v.setW(T,D[k*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(d){d.flipY=!1,d.name=o.name||a.name||"",""===d.name&&"string"==typeof a.uri&&!1===a.uri.startsWith("data:image/")&&(d.name=a.uri);const p=(s.samplers||{})[o.sampler]||{};return d.magFilter=n$[p.magFilter]||cr,d.minFilter=n$[p.minFilter]||bl,d.wrapS=i$[p.wrapS]||Bs,d.wrapT=i$[p.wrapT]||Bs,r.associations.set(d,{textures:t}),d}).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 d=Promise.resolve(l).then(function(h){return new Promise(function(p,m){let g=p;!0===e.isImageBitmapLoader&&(g=function(b){const v=new Oo(b);v.needsUpdate=!0,p(v)}),e.load(Ou.resolveURL(h,s.path),g,void 0,m)})}).then(function(h){return!0===c&&a.revokeObjectURL(l),hd(h,o),h.userData.mimeType=o.mimeType||function Wfe(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]=d,d}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[Bn.KHR_TEXTURE_TRANSFORM]){const a=void 0!==n.extensions?n.extensions[Bn.KHR_TEXTURE_TRANSFORM]:void 0;if(a){const l=s.associations.get(o);o=s.extensions[Bn.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 mf,Fo.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 us,Fo.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 Yb}loadMaterial(t){const e=this,r=this.extensions,s=this.json.materials[t];let o;const a={},c=[];if((s.extensions||{})[Bn.KHR_MATERIALS_UNLIT]){const h=r[Bn.KHR_MATERIALS_UNLIT];o=h.getMaterialType(),c.push(h.extendParams(a,s,e))}else{const h=s.pbrMetallicRoughness||{};if(a.color=new qe(1,1,1),a.opacity=1,Array.isArray(h.baseColorFactor)){const p=h.baseColorFactor;a.color.setRGB(p[0],p[1],p[2],ds),a.opacity=p[3]}void 0!==h.baseColorTexture&&c.push(e.assignTexture(a,"map",h.baseColorTexture,cs)),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=Ns);const d=s.alphaMode||"OPAQUE";if("BLEND"===d?(a.transparent=!0,a.depthWrite=!1):(a.transparent=!1,"MASK"===d&&(a.alphaTest=void 0!==s.alphaCutoff?s.alphaCutoff:.5)),void 0!==s.normalTexture&&o!==qi&&(c.push(e.assignTexture(a,"normalMap",s.normalTexture)),a.normalScale=new xe(1,1),void 0!==s.normalTexture.scale)){const h=s.normalTexture.scale;a.normalScale.set(h,h)}if(void 0!==s.occlusionTexture&&o!==qi&&(c.push(e.assignTexture(a,"aoMap",s.occlusionTexture)),void 0!==s.occlusionTexture.strength&&(a.aoMapIntensity=s.occlusionTexture.strength)),void 0!==s.emissiveFactor&&o!==qi){const h=s.emissiveFactor;a.emissive=(new qe).setRGB(h[0],h[1],h[2],ds)}return void 0!==s.emissiveTexture&&o!==qi&&c.push(e.assignTexture(a,"emissiveMap",s.emissiveTexture,cs)),Promise.all(c).then(function(){const h=new o(a);return s.name&&(h.name=s.name),hd(h,s),e.associations.set(h,{materials:t}),s.extensions&&Sf(r,h,s),h})}createUniqueName(t){const e=Ri.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[Bn.KHR_DRACO_MESH_COMPRESSION].decodePrimitive(a,e).then(function(l){return r$(l,a,e)})}const o=[];for(let a=0,l=t.length;a0&&Gfe(y,s),y.name=e.createUniqueName(s.name||"mesh_"+t),hd(y,s),v.extensions&&Sf(r,y,v),e.assignFinalMaterial(y),h.push(y)}for(let m=0,g=h.length;m1?new No:1===c.length?c[0]:new Fr,d!==c[0])for(let h=0,p=c.length;h{const h=new Map;for(const[p,m]of r.associations)(p instanceof Fo||p instanceof Oo)&&h.set(p,m);return d.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(Lu[s.path]===Lu.weights?t.traverse(function(p){p.morphTargetInfluences&&l.push(p.name?p.name:p.uuid)}):l.push(a),Lu[s.path]){case Lu.weights:c=Hg;break;case Lu.rotation:c=Gg;break;case Lu.position:case Lu.scale:c=Wg;break;default:c=1===n.itemSize?Hg:Wg}const d=void 0!==r.interpolation?Vfe[r.interpolation]:bb,h=this._getArrayFromAccessor(n);for(let p=0,m=l.length;p{r.type.endsWith("Light")&&(console.warn("WORKAROUND: light intensity from GLB divided by 200."),r.intensity*=.005)}),new ra(n.scene)})}}const po=(i,t)=>Array(i).fill(null).map((e,n)=>t(n));class Ef{static startDebugView(t,e){let n=this.activeDebugViews.get(t);return n?n.renderers.includes(e)||n.renderers.push(e):(n={view:new Ef(t),renderers:[e]},this.activeDebugViews.set(t,n)),n.view}static stopDebugView(t,e){const n=t.world,r=this.activeDebugViews.get(n);r&&(r.renderers=r.renderers.filter(s=>s!==e),0===r.renderers.length&&(r.view.dispose(),this.activeDebugViews.delete(n)))}constructor(t){this.world=t,this.debugScene=null,this.aSub=null,this.rSub=null,this.syncMap=new Map,this.debugScene=new kb;const e=n=>{var r,s;const o=n.debugBodySettings;let c,l=this.lineSegmentPointsForShape(o.shape);c=l?new Ng((new hn).setFromPoints(l)):null===(r=this.world)||void 0===r?void 0:r.visualScene.factory.createPrimitive(o.shape,{shading:"wireframe",color:0}).nativeMesh,this.syncMap.set(n,c),null===(s=this.debugScene)||void 0===s||s.add(c)};for(const n of this.world.physicsWorld.children)e(n);this.aSub=this.world.physicsWorld.added$.subscribe(n=>e(n)),this.rSub=this.world.physicsWorld.removed$.subscribe(n=>{var r;const s=this.syncMap.get(n);s&&(this.syncMap.delete(n),null===(r=this.debugScene)||void 0===r||r.remove(s))})}get scene(){return this.debugScene}render(t,e){for(const[r,s]of this.syncMap.entries()){const o=r.debugBodySettings;if(o.ignoreTransform||(s.position.set(...Te.spr(r.position)),s.quaternion.set(...Yi.spr(r.rotation))),s.material){let a=16777215;switch(o.type){case"RIGID_DYNAMIC":a=o.sleeping?255:16711680;break;case"RIGID_STATIC":a=65280;break;case"TRIGGER":a=16776960}s.material.color.set(a),s.material.needsUpdate=!0}}const n=t.autoClearColor;n&&(t.autoClearColor=!1),t.render(this.debugScene,e),n&&(t.autoClearColor=!0)}lineSegmentPointsForShape(t){if("BOX"===t.shape){const e=Te.scalarMult(t.dimensions,.5);return[...po(8,n=>new O(n<4?e.x:-e.x,n%4<2?e.y:-e.y,n%2?e.z:-e.z)),...po(8,n=>new O(n%2?e.x:-e.x,n<4?e.y:-e.y,n%4<2?e.z:-e.z)),...po(8,n=>new O(n%4<2?e.x:-e.x,n%2?e.y:-e.y,n<4?e.z:-e.z))]}if("CYLINDER"===t.shape)return[...po(32,e=>new O(t.radius*Math.sin(Math.floor((e+1)/2)*Math.PI/8),t.radius*Math.cos(Math.floor((e+1)/2)*Math.PI/8),-t.height/2)),...po(32,e=>new O(t.radius*Math.sin(Math.floor((e+1)/2)*Math.PI/8),t.radius*Math.cos(Math.floor((e+1)/2)*Math.PI/8),t.height/2)),...po(8,e=>new O(Math.floor(e/2)%2?0:e<4?t.radius:-t.radius,Math.floor(e/2)%2?e<4?t.radius:-t.radius:0,e%2?t.height/2:-t.height/2)),new O(0,0,-t.height/2),new O(0,0,t.height/2)];if("CONE"===t.shape)return[...po(32,e=>new O(t.radius*Math.sin(Math.floor((e+1)/2)*Math.PI/8),t.radius*Math.cos(Math.floor((e+1)/2)*Math.PI/8),-t.height/2)),...po(8,e=>new O(e%2||Math.floor(e/2)%2?0:e<4?t.radius:-t.radius,e%2?0:Math.floor(e/2)%2?e<4?t.radius:-t.radius:0,e%2?t.height/2:-t.height/2)),new O(0,0,-t.height/2),new O(0,0,t.height/2)];if("SPHERE"===t.shape)return[...po(32,e=>new O(t.radius*Math.sin(Math.floor((e+1)/2)*Math.PI/8),t.radius*Math.cos(Math.floor((e+1)/2)*Math.PI/8),0)),...po(32,e=>new O(t.radius*Math.sin(Math.floor((e+1)/2)*Math.PI/8),0,t.radius*Math.cos(Math.floor((e+1)/2)*Math.PI/8))),...po(32,e=>new O(0,t.radius*Math.sin(Math.floor((e+1)/2)*Math.PI/8),t.radius*Math.cos(Math.floor((e+1)/2)*Math.PI/8)))];if("CAPSULE"===t.shape)return[...this.lineSegmentPointsForShape({shape:"CYLINDER",radius:t.radius,height:t.centersDistance}),...po(16,e=>new O(t.radius*Math.cos(Math.floor((e+1)/2)*Math.PI/8),0,t.radius*Math.sin(Math.floor((e+1)/2)*Math.PI/8)+t.centersDistance/2)),...po(16,e=>new O(t.radius*Math.cos(Math.floor((e+1)/2)*Math.PI/8),0,-t.radius*Math.sin(Math.floor((e+1)/2)*Math.PI/8)-t.centersDistance/2)),...po(16,e=>new O(0,t.radius*Math.cos(Math.floor((e+1)/2)*Math.PI/8),t.radius*Math.sin(Math.floor((e+1)/2)*Math.PI/8)+t.centersDistance/2)),...po(16,e=>new O(0,t.radius*Math.cos(Math.floor((e+1)/2)*Math.PI/8),-t.radius*Math.sin(Math.floor((e+1)/2)*Math.PI/8)-t.centersDistance/2))];if("CONVEX_HULL"===t.shape)return[...t.vertices.map(n=>[new O(n.x-.05,n.y,n.z),new O(n.x+.05,n.y,n.z),new O(n.x,n.y-.05,n.z),new O(n.x,n.y+.05,n.z),new O(n.x,n.y,n.z-.05),new O(n.x,n.y,n.z+.05)]).reduce((n,r)=>(n.push(...r),n),[])];if("COMPOUND"===t.shape){const e=[];for(const{position:n,shape:r,rotation:s}of t.children){let o=this.lineSegmentPointsForShape(r);if(!o)return null;e.push(...o.map(a=>new O(...Te.spr(Te.add(n||Te.O,Te.rot(a,s||Yi.O))))))}return e}return null}dispose(){var t,e;this.debugScene=null,null===(t=this.aSub)||void 0===t||t.unsubscribe(),null===(e=this.rSub)||void 0===e||e.unsubscribe(),this.syncMap=new Map}}Ef.activeDebugViews=new Map;class s$ extends Ese{get physicsDebugViewActive(){return this._physicsDebugViewActive}set physicsDebugViewActive(t){this._physicsDebugViewActive!=t&&(this._physicsDebugViewActive=t,this.world&&(t?this.debugView=Ef.startDebugView(this.world,this):(Ef.stopDebugView(this.debugView,this),this.debugView=null)))}constructor(t,e,n,r={}){super(t,n,r),this.scene=t,this.camera=e,this.canvas=n,this.world=null,this.debugView=null,this._physicsDebugViewActive=!1,this.nativeRenderer=new Tue(Object.assign({canvas:n,alpha:this.rendererOptions.transparent},this.rendererOptions)),this.nativeRenderer.shadowMap.enabled=!0,this.nativeRenderer.setClearColor(this.rendererOptions.background),this.nativeRenderer.shadowMap.type=c4,this.nativeRenderer.setPixelRatio(this.rendererOptions.forceResolution||devicePixelRatio)}addToWorld(t){this.world=t,this.physicsDebugViewActive&&(this.debugView=Ef.startDebugView(this.world,this))}removeFromWorld(t){this.physicsDebugViewActive&&(Ef.stopDebugView(this.debugView,this),this.debugView=null),this.world=null}resizeRenderer(t){this.nativeRenderer.setSize(t.x,t.y),(this.camera.nativeCamera instanceof br||"PerspectiveCamera"==this.camera.nativeCamera.type)&&Math.abs(this.camera.nativeCamera.aspect-t.x/t.y)>.01&&(this.camera.nativeCamera.aspect=t.x/t.y,this.camera.nativeCamera.updateProjectionMatrix())}render(){this.nativeRenderer.render(this.scene.nativeScene,this.camera.nativeCamera),this.physicsDebugViewActive&&this.debugView.render(this.nativeRenderer,this.camera.nativeCamera)}dispose(){this.camera.dispose(),this.nativeRenderer.clear(),this.nativeRenderer.dispose(),this.nativeRenderer.domElement=null}}const Zfe={name:"CopyShader",uniforms:{tDiffuse:{value:null},opacity:{value:1}},vertexShader:"\n\n\t\tvarying vec2 vUv;\n\n\t\tvoid main() {\n\n\t\t\tvUv = uv;\n\t\t\tgl_Position = projectionMatrix * modelViewMatrix * vec4( position, 1.0 );\n\n\t\t}",fragmentShader:"\n\n\t\tuniform float opacity;\n\n\t\tuniform sampler2D tDiffuse;\n\n\t\tvarying vec2 vUv;\n\n\t\tvoid main() {\n\n\t\t\tvec4 texel = texture2D( tDiffuse, vUv );\n\t\t\tgl_FragColor = opacity * texel;\n\n\n\t\t}"};class QS{constructor(){this.isPass=!0,this.enabled=!0,this.needsSwap=!0,this.clear=!1,this.renderToScreen=!1}setSize(){}render(){console.error("THREE.Pass: .render() must be implemented in derived pass.")}dispose(){}}const Qfe=new Ib(-1,1,1,-1,0,1),epe=new class Jfe extends hn{constructor(){super(),this.setAttribute("position",new ct([-1,3,0,-1,-1,0,3,-1,0],3)),this.setAttribute("uv",new ct([0,2,0,0,2,0],2))}};class tpe{constructor(t){this._mesh=new Mn(epe,t)}dispose(){this._mesh.geometry.dispose()}render(t){t.render(this._mesh,Qfe)}get material(){return this._mesh.material}set material(t){this._mesh.material=t}}class npe extends QS{constructor(t,e){super(),this.textureID=void 0!==e?e:"tDiffuse",t instanceof Cl?(this.uniforms=t.uniforms,this.material=t):t&&(this.uniforms=Q4.clone(t.uniforms),this.material=new Cl({name:void 0!==t.name?t.name:"unspecified",defines:Object.assign({},t.defines),uniforms:this.uniforms,vertexShader:t.vertexShader,fragmentShader:t.fragmentShader})),this.fsQuad=new tpe(this.material)}render(t,e,n){this.uniforms[this.textureID]&&(this.uniforms[this.textureID].value=n.texture),this.fsQuad.material=this.material,this.renderToScreen?(t.setRenderTarget(null),this.fsQuad.render(t)):(t.setRenderTarget(e),this.clear&&t.clear(t.autoClearColor,t.autoClearDepth,t.autoClearStencil),this.fsQuad.render(t))}dispose(){this.material.dispose(),this.fsQuad.dispose()}}class o$ extends QS{constructor(t,e){super(),this.scene=t,this.camera=e,this.clear=!0,this.needsSwap=!1,this.inverse=!1}render(t,e,n){const r=t.getContext(),s=t.state;let o,a;s.buffers.color.setMask(!1),s.buffers.depth.setMask(!1),s.buffers.color.setLocked(!0),s.buffers.depth.setLocked(!0),this.inverse?(o=0,a=1):(o=1,a=0),s.buffers.stencil.setTest(!0),s.buffers.stencil.setOp(r.REPLACE,r.REPLACE,r.REPLACE),s.buffers.stencil.setFunc(r.ALWAYS,o,4294967295),s.buffers.stencil.setClear(a),s.buffers.stencil.setLocked(!0),t.setRenderTarget(n),this.clear&&t.clear(),t.render(this.scene,this.camera),t.setRenderTarget(e),this.clear&&t.clear(),t.render(this.scene,this.camera),s.buffers.color.setLocked(!1),s.buffers.depth.setLocked(!1),s.buffers.color.setMask(!0),s.buffers.depth.setMask(!0),s.buffers.stencil.setLocked(!1),s.buffers.stencil.setFunc(r.EQUAL,1,4294967295),s.buffers.stencil.setOp(r.KEEP,r.KEEP,r.KEEP),s.buffers.stencil.setLocked(!0)}}class ipe extends QS{constructor(){super(),this.needsSwap=!1}render(t){t.state.buffers.stencil.setLocked(!1),t.state.buffers.stencil.setTest(!1)}}class rpe{constructor(t,e){if(this.renderer=t,this._pixelRatio=t.getPixelRatio(),void 0===e){const n=t.getSize(new xe);this._width=n.width,this._height=n.height,(e=new Mu(this._width*this._pixelRatio,this._height*this._pixelRatio,{type:Jm})).texture.name="EffectComposer.rt1"}else this._width=e.width,this._height=e.height;this.renderTarget1=e,this.renderTarget2=e.clone(),this.renderTarget2.texture.name="EffectComposer.rt2",this.writeBuffer=this.renderTarget1,this.readBuffer=this.renderTarget2,this.renderToScreen=!0,this.passes=[],this.copyPass=new npe(Zfe),this.copyPass.material.blending=Jc,this.clock=new OG}swapBuffers(){const t=this.readBuffer;this.readBuffer=this.writeBuffer,this.writeBuffer=t}addPass(t){this.passes.push(t),t.setSize(this._width*this._pixelRatio,this._height*this._pixelRatio)}insertPass(t,e){this.passes.splice(e,0,t),t.setSize(this._width*this._pixelRatio,this._height*this._pixelRatio)}removePass(t){const e=this.passes.indexOf(t);-1!==e&&this.passes.splice(e,1)}isLastEnabledPass(t){for(let e=t+1;e0?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;l$.fromArray(r,t),yO.fromArray(r,e),c$.fromArray(r,n),Ba.subVectors(c$,yO),d$.subVectors(l$,yO),Ba.cross(d$),Ba.normalize(),s.push(Ba.x,Ba.y,Ba.z),s.push(Ba.x,Ba.y,Ba.z),s.push(Ba.x,Ba.y,Ba.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 d=this.vertices.length;let h=this.parseVertexIndex(t,d),p=this.parseVertexIndex(e,d),m=this.parseVertexIndex(n,d);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?(JS.setRGB(parseFloat(h[4]),parseFloat(h[5]),parseFloat(h[6])).convertSRGBToLinear(),e.colors.push(JS.r,JS.g,JS.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"===d){const p=c.slice(1).trim().split(a$),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 No;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 ct(d.normals,3)),d.colors.length>0&&(g=!0,b.setAttribute("color",new ct(d.colors,3))),!0===d.hasUVIndices&&b.setAttribute("uv",new ct(d.uvs,2));const v=[];for(let M=0,x=h.length;M1){for(let M=0,x=h.length;M0){const a=new mf({size:1,sizeAttenuation:!1}),l=new hn;l.setAttribute("position",new ct(e.vertices,3)),e.colors.length>0&&void 0!==e.colors[0]&&(l.setAttribute("color",new ct(e.colors,3)),a.vertexColors=!0);const c=new Vb(l,a);s.add(c)}return s}}class bO extends yf{constructor(t){super(t)}load(t,e,n,r){const s=this,o=""===this.path?Ou.extractUrlBase(t):this.path,a=new La(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,d):c;h=h.toLowerCase();let p=d>=0?c.substring(d+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 fpe(this.resourcePath||e,this.materialOptions);return a.setCrossOrigin(this.crossOrigin),a.setManager(this.manager),a.setMaterials(o),a}}class fpe{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:lc,this.wrap=void 0!==this.options.wrap?this.options.wrap:Bs}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),d=e.loadTexture(function s(a,l){return"string"!=typeof l||""===l?"":/^https?:\/\//i.test(l)?l:a+l}(e.baseUrl,c.url));d.repeat.copy(c.scale),d.offset.copy(c.offset),d.wrapS=e.wrap,d.wrapT=e.wrap,("map"===a||"emissiveMap"===a)&&(d.colorSpace=cs),r[a]=d}for(const a in n){const l=n[a];let c;if(""!==l)switch(a.toLowerCase()){case"kd":r.color=(new qe).fromArray(l).convertSRGBToLinear();break;case"ks":r.specular=(new qe).fromArray(l).convertSRGBToLinear();break;case"ke":r.emissive=(new qe).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 zS(r),this.materials[t]}getTextureParams(t,e){const n={scale:new xe(1,1),offset:new xe(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:wG;let a=o.getHandler(t);null===a&&(a=new Pu(o)),a.setCrossOrigin&&a.setCrossOrigin(this.crossOrigin);const l=a.load(t,n,r,s);return void 0!==e&&(l.mapping=e),l}}const ppe=["determinateSpinner"];function mpe(i,t){if(1&i&&(ki(),W(0,"svg",11),Pe(1,"circle",12),j()),2&i){const e=he();Dt("viewBox",e._viewBox()),G(1),qo("stroke-dasharray",e._strokeCircumference(),"px")("stroke-dashoffset",e._strokeCircumference()/2,"px")("stroke-width",e._circleStrokeWidth(),"%"),Dt("r",e._circleRadius())}}const gpe=Qy(class{constructor(i){this._elementRef=i}},"primary"),_pe=new me("mat-progress-spinner-default-options",{providedIn:"root",factory:function vpe(){return{diameter:u$}}}),u$=100;let Jb=(()=>{class i extends gpe{constructor(e,n,r){super(e),this.mode="mat-spinner"===this._elementRef.nativeElement.nodeName.toLowerCase()?"indeterminate":"determinate",this._value=0,this._diameter=u$,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,Ps(e)))}get diameter(){return this._diameter}set diameter(e){this._diameter=Ps(e)}get strokeWidth(){return this._strokeWidth??this.diameter/10}set strokeWidth(e){this._strokeWidth=Ps(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)(E(gt),E(kr,8),E(_pe))},i.\u0275cmp=ot({type:i,selectors:[["mat-progress-spinner"],["mat-spinner"]],viewQuery:function(e,n){if(1&e&&Wn(ppe,5),2&e){let r;Et(r=At())&&(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&&(Dt("aria-valuemin",0)("aria-valuemax",100)("aria-valuenow","determinate"===n.mode?n.value:null)("mode",n.mode),qo("width",n.diameter,"px")("height",n.diameter,"px"),un("_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:[lt],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&&(fe(0,mpe,2,8,"ng-template",null,0,zc),W(2,"div",1,2),ki(),W(4,"svg",3),Pe(5,"circle",4),j()(),va(),W(6,"div",5)(7,"div",6)(8,"div",7),sy(9,8),j(),W(10,"div",9),sy(11,8),j(),W(12,"div",10),sy(13,8),j()()()),2&e){const r=Zi(1);G(4),Dt("viewBox",n._viewBox()),G(1),qo("stroke-dasharray",n._strokeCircumference(),"px")("stroke-dashoffset",n._strokeDashOffset(),"px")("stroke-width",n._circleStrokeWidth(),"%"),Dt("r",n._circleRadius()),G(4),U("ngTemplateOutlet",r),G(2),U("ngTemplateOutlet",r),G(2),U("ngTemplateOutlet",r)}},dependencies:[xy],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})(),bpe=(()=>{class i{}return i.\u0275fac=function(e){return new(e||i)},i.\u0275mod=nn({type:i}),i.\u0275inj=Kt({imports:[Ao,Qn]}),i})();const xpe=["previewCanvasContainer"],wpe=["previewCanvas"];function Mpe(i,t){if(1&i){const e=ai();$r(0),W(1,"label",11),ze(2),j(),W(3,"input",12),Le("change",function(r){rn(e);const s=he().$implicit;return s.value=r.currentTarget.checked,Ut(s.change(s.value))}),j(),Wr()}if(2&i){const e=he(),n=e.index,r=e.$implicit,s=he().index;G(1),U("for","custom_control_"+s+"_"+n),G(1),_i(r.label),G(1),U("id","custom_control_"+s+"_"+n)("type",r.type)("checked",r.value)}}function Cpe(i,t){if(1&i){const e=ai();W(0,"div",9)(1,"label",11),ze(2),j(),W(3,"input",14),Le("change",function(){const s=rn(e).$implicit,o=he(2).$implicit;return o.value=s,Ut(o.change(o.value))}),j()()}if(2&i){const e=t.$implicit,n=he(2),r=n.index,s=n.$implicit,o=he().index;G(1),U("for","custom_control_"+o+"_"+r+"_"+e),G(1),_i(e),G(1),U("id","custom_control_"+o+"_"+r+"_"+e)("checked",s.value===e)}}function Spe(i,t){if(1&i&&(W(0,"div",13)(1,"label"),ze(2),j(),fe(3,Cpe,4,4,"div",8),j()),2&i){const e=he().$implicit;G(2),_i(e.label),G(1),U("ngForOf",e.options)}}function Epe(i,t){if(1&i){const e=ai();$r(0),W(1,"label",11),ze(2),j(),W(3,"input",15),Le("colorChange",function(r){rn(e);const s=he().$implicit,o=he(2);return s.value=o.toRGB(r.value),Ut(s.change(s.value))}),j(),Pe(4,"ngx-mat-color-toggle",16)(5,"ngx-mat-color-picker",null,17),Wr()}if(2&i){const e=Zi(6),n=he(),r=n.index,s=n.$implicit,o=he().index;G(1),U("for","custom_control_"+o+"_"+r),G(1),_i(s.label),G(1),U("ngxMatColorPicker",e),G(1),U("for",e)}}function Ape(i,t){if(1&i){const e=ai();$r(0),W(1,"label",11),ze(2),j(),W(3,"input",18),Le("change",function(r){rn(e);const s=he().$implicit;return s.value=r.currentTarget.value,Ut(s.change(s.value))}),j(),Wr()}if(2&i){const e=he(),n=e.index,r=e.$implicit,s=he().index;G(1),U("for","custom_control_"+s+"_"+n),G(1),_i(r.label),G(1),U("id","custom_control_"+s+"_"+n)("min",r.minValue)("max",r.maxValue)("step",r.valueStep)("value",r.value)}}function Dpe(i,t){if(1&i&&(W(0,"div",9),fe(1,Mpe,4,5,"ng-container",6),fe(2,Spe,4,2,"div",10),fe(3,Epe,7,4,"ng-container",6),fe(4,Ape,4,7,"ng-container",6),j()),2&i){const e=t.$implicit;G(1),U("ngIf","checkbox"===e.type),G(1),U("ngIf","radio"===e.type),G(1),U("ngIf","color"===e.type),G(1),U("ngIf","slider"===e.type)}}function Tpe(i,t){if(1&i&&($r(0),W(1,"h4"),ze(2),j(),fe(3,Dpe,5,4,"div",8),Wr()),2&i){const e=t.$implicit;G(2),_i(e.title),G(1),U("ngForOf",e.controls)}}function Ipe(i,t){if(1&i){const e=ai();W(0,"div",9)(1,"label",11),ze(2),j(),W(3,"input",19),Le("change",function(r){return Ut(rn(e).$implicit.visible=r.currentTarget.checked)}),j()()}if(2&i){const e=t.$implicit;G(1),U("for","visibility_"+e.name),G(1),_i(e.name),G(1),U("id","visibility_"+e.name)("checked",e.visible)}}function Rpe(i,t){if(1&i&&($r(0),W(1,"h4"),ze(2,"Objects visibility"),j(),fe(3,Ipe,4,4,"div",8),Wr()),2&i){const e=he();G(3),U("ngForOf",e.meshes)}}function kpe(i,t){1&i&&Pe(0,"mat-spinner",20)}const sa=i=>{i.colorSpace="srgb",i.anisotropy=8,i.magFilter=vr,i.minFilter=vr};let h$=(()=>{class i{constructor(e){this.cdr=e,this.visibilityControls=!0,this.groupFunction=null,this.customControls=[],this.onObjectLoaded=new $e,this._paths$=new ut(null),this.destroyed$=new Re,this.entity=null,this.meshes=[]}get paths(){return this._paths$.getValue()}set paths(e){this._paths$.next(e)}ngAfterViewInit(){var e=this;return tt(function*(){var s;e.world=new sk(new vO,{init:(s=tt(function*(){}),function(){return s.apply(this,arguments)}),simulate:()=>{}}),yield e.world.init(),e.world.visualScene.nativeScene.add(new $S(16777215,2));let n=new ut({x:1,y:1});e.renderer=e.world.addRenderer(e.world.visualScene.factory.createPerspectiveCamera({frustrum:{near:.01,far:1e4}}),e.previewCanvas.nativeElement,{size:n.asObservable(),background:11184810}),e.controller=new kse(e.renderer,{mouseOptions:{canvas:e.previewCanvas.nativeElement},orbiting:{sensitivityX:2,sensitivityY:2},orbitingElasticity:30}),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(Ve(e.destroyed$)).subscribe(function(){var s=tt(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 Qb,h=yield(new bO).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 No;y.add(...b[v]),y.name=v,p.remove(...b[v]),p.add(y)}}e.meshes=p.children,e.meshes.sort((b,v)=>b.name>v.name?1:-1),p.traverse(b=>{if(b instanceof Mn){const v=b.material instanceof Array?b.material:[b.material];for(const y of v)y.transparent=!0,y.alphaTest=.5,y instanceof qi&&y.map&&(y.map.wrapS=er,y.map.wrapT=er,sa(y.map),y.map.needsUpdate=!0)}}),e.onObjectLoaded.next(p),e.entity=new Jo({object3D:new ra(p)}),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=Te.scalarMult(Te.add(m.min,m.max),.5),e.controller.spherical={phi:1.22,theta:-1.32,radius:Te.dist(m.min,m.max)},e.cdr.markForCheck()}});return function(o){return s.apply(this,arguments)}}())})()}toRGB(e){return(e?.r||0)<<16|(e?.g||0)<<8|(e?.b||0)}ngOnDestroy(){this.destroyed$.next(),this.destroyed$.complete()}}return i.\u0275fac=function(e){return new(e||i)(E(Zn))},i.\u0275cmp=ot({type:i,selectors:[["app-obj-viewer"]],viewQuery:function(e,n){if(1&e&&(Wn(xpe,5),Wn(wpe,5)),2&e){let r;Et(r=At())&&(n.previewCanvasContainer=r.first),Et(r=At())&&(n.previewCanvas=r.first)}},inputs:{paths:"paths",visibilityControls:"visibilityControls",groupFunction:"groupFunction",customControls:"customControls"},outputs:{onObjectLoaded:"onObjectLoaded"},decls:8,vars:3,consts:[[1,"previewCanvasContainer"],["previewCanvasContainer",""],["width","640","height","480"],["previewCanvas",""],["id","controls"],[4,"ngFor","ngForOf"],[4,"ngIf"],["mode","indeterminate",4,"ngIf"],["class","controls-list",4,"ngFor","ngForOf"],[1,"controls-list"],["style","width: 100%",4,"ngIf"],[3,"for"],[3,"id","type","checked","change"],[2,"width","100%"],["type","radio",3,"id","checked","change"],["matInput","",1,"hidden",3,"ngxMatColorPicker","colorChange"],["matSuffix","",3,"for"],["picker",""],["type","range",3,"id","min","max","step","value","change"],["type","checkbox",3,"id","checked","change"],["mode","indeterminate"]],template:function(e,n){1&e&&(W(0,"div",0,1),Pe(2,"canvas",2,3),W(4,"div",4),fe(5,Tpe,4,2,"ng-container",5),fe(6,Rpe,4,1,"ng-container",6),j(),fe(7,kpe,1,0,"mat-spinner",7),j()),2&e&&(G(5),U("ngForOf",n.customControls),G(1),U("ngIf",n.visibilityControls),G(1),U("ngIf",!n.entity))},dependencies:[Eo,vi,Xte,rc,Jb,jie,bC,LH],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%] > h4[_ngcontent-%COMP%]{margin:0}.previewCanvasContainer[_ngcontent-%COMP%] #controls[_ngcontent-%COMP%] .controls-list[_ngcontent-%COMP%]{width:100%;display:flex;-webkit-user-select:none;user-select:none;align-items:center}.previewCanvasContainer[_ngcontent-%COMP%] #controls[_ngcontent-%COMP%] .controls-list[_ngcontent-%COMP%] > span[_ngcontent-%COMP%]{flex-grow:1}.previewCanvasContainer[_ngcontent-%COMP%] #controls[_ngcontent-%COMP%] .controls-list[_ngcontent-%COMP%] > label[_ngcontent-%COMP%]{flex-grow:1}"],changeDetection:0}),i})();function Ppe(i,t){if(1&i){const e=ai();ki(),W(0,"circle",5),Le("mousedown",function(r){return rn(e),Ut(he().startDrag(r))}),Ct(1,"async"),Ct(2,"async"),j()}if(2&i){const e=he();let n,r;Dt("cx",(null==(n=Tt(1,3,e.mapPointer$))?null:n.x)||0)("cy",(null==(r=Tt(2,5,e.mapPointer$))?null:r.y)||0)("r",10)}}const Ope=function(){return{"stroke-width":3}};let f$=(()=>{class i{constructor(e){this.ref=e,this._roadSpline$=new ut([]),this._pointer$=new ut(null),this._projection$=new ut("nz"),this._roadSplineProjected$=new ut([]),this._pointerProjected$=new ut(yi.O),this.splineClosed=!1,this.pointerChange=new $e,this.svgSize$=new ut({x:100,y:100}),this.scalingSquare$=new ut({x:0,y:0,width:100,height:100}),this.mapPolyline$=new ut(""),this.mapPointer$=new ut(null),this.isShiftPressed=!1,this.destroyed$=new Re,this.isDragging=!1}set roadSpline(e){this._roadSpline$.next(e)}set pointer(e){this._pointer$.next(e)}set projection(e){this._projection$.next(e)}get trackLength$(){return this._roadSpline$.pipe(et(e=>{let n=0;for(let r=1;r{"Shift"===n.key&&(this.isShiftPressed=!0)}),To(window,"keyup").pipe(Ve(this.destroyed$)).subscribe(n=>{"Shift"===n.key&&(this.isShiftPressed=!1)}),Xl([this._roadSpline$,this._projection$]).pipe(Ve(this.destroyed$)).subscribe(([n,r])=>{this._roadSplineProjected$.next(n.map(s=>this.project(s)))}),Xl([this._pointer$,this._projection$]).pipe(Ve(this.destroyed$)).subscribe(([n,r])=>{this._pointerProjected$.next(this.project(n||Te.O))}),this._roadSplineProjected$.pipe(Ve(this.destroyed$),et(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.y)},s={x:Math.max(s.x,a.x),y:Math.max(s.y,a.y)}});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$),Xl([this._roadSplineProjected$,this.scalingSquare$,this.svgSize$]).pipe(Ve(this.destroyed$),et(([n,r,s])=>{const o=n.map(a=>({x:(a.x-r.x)*s.x/r.width,y:(r.y-a.y)*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$),Xl([this._pointerProjected$,this.scalingSquare$.asObservable(),this.svgSize$]).pipe(Ve(this.destroyed$),et(([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()}startDrag(e){this.isDragging=!0,this.updatePointer(e)}drag(e){this.isDragging&&this.updatePointer(e)}endDrag(){this.isDragging=!1}getClosestProjectedLineIndex(e){const n=this._roadSplineProjected$.getValue();let r=-1,s=Number.MAX_SAFE_INTEGER;for(let d=1;d{return(i=Af||(Af={})).ThreeModel="model",i.Bitmap="bitmap",i.TwoSidedBitmap="two_sided_bitmap",Af;var i})();class Hpe extends QH{constructor(t,e,n){super(t,{loadDepth:40,inertia:2}),this.mapGraph=t,this.famPath=e,this.hideUnknownEntities$=n,this.textureLoader=new Pu,this.terrainMaterials={},this.objLoader=new Qb,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(Ql(),Ve(this._onRemoved$)).subscribe(e=>{for(const n of this.unknownEntities)n.visible=!e})}getPlaceholderTexture(){var t=this;return tt(function*(){return t._placeholder?t._placeholder:(t._placeholderPromise||(t._placeholderPromise=t.textureLoader.loadAsync("assets/placeholder_texture.png")),t._placeholderPromise)})()}getPlaceholderTerrainTexture(){var t=this;return tt(function*(){return t._placeholderTerrain?t._placeholderTerrain:(t._placeholderTerrainPromise||(t._placeholderTerrainPromise=t.textureLoader.loadAsync("assets/placeholder_texture.png").then(e=>(e.wrapS=Bs,e.wrapT=er,sa(e),e.flipY=!0,e))),t._placeholderTerrainPromise)})()}loadChunk(t){var e=this;return tt(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 Mn&&(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:Te.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:Yi.fromAngle(Te.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 Jo({object3D:new ra(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 qi({side:Ns,transparent:!0,visible:!1}),this.famPath?this.textureLoader.loadAsync(`${this.famPath}/background/${t}.png`).then(e=>{e.wrapS=Bs,e.wrapT=er,sa(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 tt(function*(){let n=!1;if(t.type==Af.ThreeModel){let r;try{if(!e.famPath)throw new Error;const o=new bO,a=new Qb,l=yield o.loadAsync(`${e.famPath}/props/${t.data.data.resource_id}/0/material.mtl`);l.preload(),a.setMaterials(l),r=new ra(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 Mn){const a=o.material instanceof Array?o.material:[o.material];for(const l of a)l.transparent=!0,l.alphaTest=.5,l instanceof qi&&l.map&&(l.map.wrapS=er,l.map.wrapT=er,sa(l.map),l.map.needsUpdate=!0)}});const s=new Jo({object3D: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==Af.Bitmap||t.type==Af.TwoSidedBitmap){const r=(c,d)=>new Array(d).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 No,[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==Af.TwoSidedBitmap){const[c,d]=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 Jo({object3D:new ra(s)});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 tt(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=>(sa(h),new qi({map:h,alphaTest:.5,transparent:!0,side:Ns}))),d=new Mn(new Iu(e.x,e.y),c[0]);if(d.rotateX(Math.PI/2),d.position.set(0,0,e.y/2),c.length>1){let h=-1;Ym(r.world).pipe(o4(n&&!isNaN(+n)?1e3*+n:250)).subscribe(()=>{h=(h+1)%c.length,d.material=c[h]})}return[d,a]})()}}let Gpe=(()=>{class i{constructor(e,n,r){this.eelDelegate=e,this.cdr=n,this.mainService=r,this._resource$=new ut(null),this.changed=new $e,this.previewLoading$=new ut(!0),this.previewFamLocation$=new ut(null),this.previewFamLoading$=new ut(!1),this.pointer$=new ut(null),this.selectedSplineIndex$=new ut(0),this.selectedSplineItem$=new ut(null),this.selectedAiInfoItem$=new ut(null),this.selectedTerrainItem$=new ut(null),this.famPath=null,this.name="",this.renderer=null,this.map=null,this.isOpenedTrack=!0,this.roadPath=null,this.destroyed$=new Re}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=>({x:e.position.x,y:e.position.z,z:e.position.y}))||[]}ngAfterViewInit(){var e=this;return tt(function*(){var s;e.world=new sk(new vO,{init:(s=tt(function*(){}),function(){return s.apply(this,arguments)}),simulate:()=>{},loader:{loadFromGgGlb:function(){var s=tt(function*(...o){return[]});return function(){return s.apply(this,arguments)}}()}}),yield e.world.init(),e.skySphere=new Jo({object3D:e.world.visualScene.factory.createPrimitive({shape:"SPHERE",radius:1e3},{color:16777215})}),e.skySphere.object3D.nativeMesh.material.side=Ns,e.world.addEntity(e.skySphere),e.selectionSphere=new Jo({object3D: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 $S(16777215,2));let n=new ut({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=Yi.lookAt(e.renderer.camera.position,Te.add(e.renderer.camera.position,Te.Y),Te.Z),Ym(e.world).pipe(Ve(e.destroyed$)).subscribe(()=>{e.renderer&&(e.skySphere.position=e.renderer.camera.position,e.pointer$.next(e.renderer.camera.position))}),e.controller=new n4(e.world.keyboardInput,e.renderer,{mouseOptions:{canvas:e.previewCanvas.nativeElement,pointerLock:!0},keymap:"wasd+arrows",cameraLinearSpeed:40,cameraBoostMultiplier:4,cameraMovementElasticity:100,cameraRotationElasticity:30,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(Ve(e.destroyed$)).subscribe(function(){var s=tt(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(Ve(e.destroyed$),gn(([s,o])=>!!e.resource&&s.startsWith(e.resource.id)),ml(3e3)).subscribe(tt(function*(){e.previewLoading$.next(!0),yield e.postTmpUpdates(e.resource?.id),yield e.loadPreview(),e.previewLoading$.next(!1)})),e.selectedSplineIndex$.pipe(Ve(e.destroyed$),ml(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=Te.add(a,Te.rotAround({x:10,y:-12,z:5},{x:0,y:0,z:1},-e.resource.data.road_spline[s].orientation)),e.renderer.rotation=Yi.lookAt(e.renderer.position,a,{x:0,y:0,z:1}),e.controller.reset())}e.selectedSplineItem$.next({id:sc(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:sc(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:sc(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 tt(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 Pu,o=r.find(a=>a.endsWith("spherical.png"));if(o){const a=yield s.loadAsync(o);a.colorSpace="srgb",a.mapping=cc,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 tt(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})()}onPointerChange(e){this.renderer&&(this.renderer.position=e)}loadPreview(){var e=this;return tt(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=Km.fromMapArray(e.roadPath.map((r,s)=>({path:`${e.terrainChunksObjLocation}terrain_chunk_${s}`,position:r,loadOptions:{}}))||[],!e.isOpenedTrack);e.unloadPreview(),e.map=new Hpe(n,e.famPath&&"resources/"+e.famPath,e.mainService.hideHiddenFields$),e.map.resource=e.resource,e.map.isOpenedTrack=e.isOpenedTrack,Ym(e.world).pipe(Ve(e.destroyed$)).subscribe(()=>{e.map&&e.renderer&&e.map.loaderCursor$.next(e.renderer.position)}),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 tt(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)(E(Jl),E(Zn),E(Pa))},i.\u0275cmp=ot({type:i,selectors:[["app-tri-map-block-ui"]],viewQuery:function(e,n){if(1&e&&(Wn(Fpe,5),Wn(Lpe,5)),2&e){let r;Et(r=At())&&(n.previewCanvasContainer=r.first),Et(r=At())&&(n.previewCanvas=r.first)}},inputs:{resource:"resource"},outputs:{changed:"changed"},decls:49,vars:44,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","projection","pointerChange"],[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&&(W(0,"div",0)(1,"h4"),ze(2,"Preview *.FAM file"),j(),W(3,"mat-form-field",1)(4,"mat-label"),ze(5,"Current preview FAM"),j(),W(6,"mat-select",2,3),Le("valueChange",function(s){return n.onFamSelected(s)}),Ct(8,"async"),Ct(9,"async"),fe(10,Npe,2,2,"mat-option",4),W(11,"mat-option",5),ze(12,"custom"),j()()(),fe(13,Bpe,9,3,"ng-container",6),fe(14,Upe,1,1,"mat-spinner",7),Ct(15,"async"),j(),W(16,"div",8)(17,"div",9,10),Pe(19,"canvas",11,12),fe(21,Vpe,1,0,"mat-spinner",13),Ct(22,"async"),j(),W(23,"div",14,10)(25,"mat-form-field",1)(26,"mat-label"),ze(27,"Spline item"),j(),W(28,"input",15),Le("ngModelChange",function(s){return n.selectedSplineIndex$.next(s)}),Ct(29,"async"),Ct(30,"async"),j()(),W(31,"app-minimap",16),Le("pointerChange",function(s){return n.onPointerChange(s)}),Ct(32,"async"),j()()(),W(33,"h4"),ze(34,"Road spline item"),j(),Pe(35,"app-compound-block-ui",17),Ct(36,"async"),W(37,"h4"),ze(38,"AI info (block for 4 spline items)"),j(),Pe(39,"app-compound-block-ui",17),Ct(40,"async"),W(41,"h4"),ze(42,"Terrain (block for 4 spline items)"),j(),Pe(43,"app-compound-block-ui",17),Ct(44,"async"),W(45,"h4"),ze(46,"Common"),j(),Pe(47,"app-compound-block-ui",18),Ct(48,"async")),2&e){const r=Zi(7);let s;G(6),U("value",n.previewFamPossibleLocations.includes(Tt(8,21,n.previewFamLocation$))?Tt(9,23,n.previewFamLocation$):"custom"),G(4),U("ngForOf",n.previewFamPossibleLocations),G(3),U("ngIf","custom"==r.value),G(1),U("ngIf",Tt(15,25,n.previewFamLoading$)),G(7),U("ngIf",Tt(22,27,n.previewLoading$)),G(7),U("min",0)("max",4*(null==(s=Tt(29,29,n._resource$))?null:s.data.num_chunks)-1)("ngModel",Tt(30,31,n.selectedSplineIndex$)),G(3),U("roadSpline",n.roadSpline)("pointer",Tt(32,33,n.pointer$))("splineClosed",!n.isOpenedTrack)("projection","nz"),G(4),U("resource",Tt(36,35,n.selectedSplineItem$))("hideBlockActions",!0),G(4),U("resource",Tt(40,37,n.selectedAiInfoItem$))("hideBlockActions",!0),G(4),U("resource",Tt(44,39,n.selectedTerrainItem$))("hideBlockActions",!0),G(4),U("resource",Tt(48,41,n._resource$))("hideBlockActions",!0)("fieldWhitelist",Rs(43,zpe))}},dependencies:[Eo,vi,gl,mu,nc,_u,gu,Zc,vl,Ro,rc,ib,fb,Nm,Jb,ec,f$,pl],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-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})();const p$=i=>new Promise(t=>setTimeout(t,i)),m$=(i,t,e=null)=>{const n=document.createElement("canvas"),r=n.getContext("2d",{willReadFrequently:!0}),s=i.width,o=i.height;n.width=s,n.height=o,r.drawImage(i,0,0,s,o);const a=r.getImageData(0,0,s,o);for(let l=0;l{if(!(o instanceof Mn))return;let a=-1;if(o.name.startsWith("lbl__rt_frnt")?a=0:o.name.startsWith("lbl__lt_frnt")?a=1:o.name.startsWith("lbl__rt_rear")?a=2:o.name.startsWith("lbl__lt_rear")&&(a=3),a>-1){this.wheels[a]=o,a<2&&(this.frontWheels[a]=o),o.geometry.boundingBox||o.geometry.computeBoundingBox();const l=Te.avg(o.geometry.boundingBox.min,o.geometry.boundingBox.max);o.geometry.translate(...Te.spr(Te.neg(l))),o.position.set(...Te.spr(l)),this.wheelIdlePositions[a]=l}(o.name.includes("rsid")||o.name.includes("lite"))&&(r.push(o),this.originalTexWithTailLights=o.material.map)}),!this.originalTexWithTailLights)throw new Error("Not a driveable NFS1 car");this.tailLightColors=n.includes("TRAFFC.CFM")?[9509903,16711680]:[3212546,16258068],this.texWithTailLightsImg=document.createElement("img"),this.texWithTailLights=new Oo(this.texWithTailLightsImg),this.texWithTailLights.flipY=this.originalTexWithTailLights.flipY,sa(this.texWithTailLights),this.recolorTailLights(this.tailLightColors[0]).then();for(const o of r)o.material.map=this.texWithTailLights;const s=new Pu;this.tyreTextures=[1,2,3,4].map(o=>s.load(`${n}/tyr${o}.png`));for(const o of this.tyreTextures)sa(o);this.tyreMaterial=new qi({map:this.tyreTextures[0]}),this.tyreMaterial.transparent=!0,this.tyreMaterial.alphaTest=.5,this.tyreMaterial.map.wrapS=er,this.tyreMaterial.map.wrapT=er,this.tyreMaterial.polygonOffset=!0,this.tyreMaterial.polygonOffsetFactor=-4;for(const o of this.wheels)o.material=this.tyreMaterial}get tailLightsOn(){return this._tailLightsOn}set tailLightsOn(t){t!==this._tailLightsOn&&(this._tailLightsOn=t,this.recolorTailLights(this.tailLightColors[t?1:0]))}get speed(){return this._speed}set speed(t){if(t!==this._speed){switch(this._speed=t,this.tyreTextureUpdateTimer&&clearInterval(this.tyreTextureUpdateTimer),t){case"idle":this.tyreMaterial.map=this.tyreTextures[0];break;case"slow":let e=!0;this.tyreTextureUpdateTimer=setInterval(()=>{this.tyreMaterial.map=this.tyreTextures[e?1:2],this.tyreMaterial.needsUpdate=!0,e=!e},16);break;case"fast":this.tyreMaterial.map=this.tyreTextures[3]}this.tyreMaterial.needsUpdate=!0}}get steeringAngle(){return this._steeringAngle}set steeringAngle(t){if(t!==this._steeringAngle){this._steeringAngle=t;for(const e of this.frontWheels)e.rotation.set(0,0,t)}}recolorTailLights(t){var e=this;return tt(function*(){if(e.originalTexWithTailLights&&e.texWithTailLights&&e.texWithTailLightsImg){for(let n=100;n>0&&!e.originalTexWithTailLights.source.data;n--)yield p$(50);((i,t,e,n=null)=>{const[r,s,o]=[t>>16,t>>8&255,255&t],[a,l,c]=[e>>16,e>>8&255,255&e];m$(i,(d,h)=>{d[h]==r&&d[h+1]==s&&d[h+2]==o&&(d[h]=a,d[h+1]=l,d[h+2]=c)},n)})(e.originalTexWithTailLights.source.data,e.tailLightsTexColor,t,e.texWithTailLightsImg),e.texWithTailLights.needsUpdate=!0}})()}dispose(){this.texWithTailLightsImg&&(this.texWithTailLightsImg.remove(),this.texWithTailLightsImg=null),this.texWithTailLights&&(this.texWithTailLights.dispose(),this.texWithTailLights=null),this.tyreTextureUpdateTimer&&clearInterval(this.tyreTextureUpdateTimer),this.tyreMaterial&&(this.tyreMaterial.dispose(),this.tyreMaterial=null)}}let jpe=(()=>{class i{constructor(e,n,r){this.eelDelegate=e,this.mainService=n,this.cdr=r,this._resource$=new ut(null),this.changed=new $e,this.previewPaths$=new ut(null),this.destroyed$=new Re,this.customControls=[],this.serializerSettings={geometry__save_obj:!0,geometry__save_blend:!1,geometry__export_to_gg_web_engine:!1}}get resource(){return this._resource$.getValue()}set resource(e){this._resource$.next(e)}ngAfterViewInit(){var e=this;return tt(function*(){e._resource$.pipe(Ve(e.destroyed$)).subscribe(function(){var n=tt(function*(r){e.previewPaths$.next(yield e.loadPreviewFilePaths(r?.id))});return function(r){return n.apply(this,arguments)}}()),e.mainService.dataBlockChange$.pipe(Ve(e.destroyed$),gn(([n,r])=>!!e.resource&&n.startsWith(e.resource.id)),ml(1500)).subscribe(tt(function*(){e.previewPaths$.next(null),e.previewPaths$.next(yield e.postTmpUpdates(e.resource?.id))}))})()}onObjectLoaded(e){var n=this;return tt(function*(){if((n._resource$.value?.id||"").includes(".CFM__"))try{const r=n.resource?.id.split("/");r.pop(),r[r.length-1]=""+(+r[r.length-1]+1);const s=yield n.eelDelegate.retrieveValue(r.join("/")+"/data"),o=s.children_aliases.findIndex(l=>"!PAL"===l);if(-1==o)throw new Error("Not a car");const a=new Wpe(e,s.children[o].data.colors[254]>>>8,n.previewPaths$.value[0].substring(0,n.previewPaths$.value[0].lastIndexOf("/"))+"/assets");n.customControls=[{title:"TNFS car features",controls:[{label:"Brake lights on",type:"checkbox",value:!1,change:l=>{a.tailLightsOn=l}},{label:"Car speed",type:"radio",options:["idle","slow","fast"],value:"idle",change:l=>{a.speed=l}},{label:"Steering angle",type:"slider",minValue:-.7,maxValue:.7,valueStep:.05,value:0,change:l=>{a.steeringAngle=l}}]}],n.cdr.markForCheck()}catch{}})()}postTmpUpdates(e){var n=this;return tt(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 tt(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)(E(Jl),E(Pa),E(Zn))},i.\u0275cmp=ot({type:i,selectors:[["app-orip-geometry-block-ui"]],inputs:{resource:"resource"},outputs:{changed:"changed"},decls:4,vars:7,consts:[[3,"paths","customControls","onObjectLoaded"],[3,"resource"]],template:function(e,n){1&e&&(W(0,"app-obj-viewer",0),Le("onObjectLoaded",function(s){return n.onObjectLoaded(s)}),Ct(1,"async"),j(),Pe(2,"app-compound-block-ui",1),Ct(3,"async")),2&e&&(U("paths",Tt(1,3,n.previewPaths$))("customControls",n.customControls),G(2),U("resource",Tt(3,5,n._resource$)))},dependencies:[ec,h$,pl],changeDetection:0}),i})();const g$=i=>{let t=i.block_class_mro.split("__")[0];return"ArrayBlock"===t?g$(i.child_schema)+"[]":t},Ype=["class","block-ui"];function qpe(i,t){if(1&i&&(W(0,"mat-label",7),ze(1),j()),2&i){const e=he(2);U("matTooltip",e.resourceDescription),G(1),Qi("",null==e.resource?null:e.resource.name," ")}}function Xpe(i,t){if(1&i&&(W(0,"mat-option",8),ze(1),j()),2&i){const e=t.$implicit,n=t.index,r=he(2);U("value",n)("disabled",r.disabled),G(1),Qi(" ",r.blockClassStr(e)," ")}}function Kpe(i,t){if(1&i){const e=ai();$r(0),fe(1,qpe,2,2,"mat-label",1),Ct(2,"async"),W(3,"div",2)(4,"mat-label"),ze(5,"Resource type:"),j(),W(6,"mat-select",3),Le("selectionChange",function(r){return rn(e),Ut(he().setChoiceIndex(r.value))}),fe(7,Xpe,2,3,"mat-option",4),j(),Pe(8,"app-block-actions",5),j(),Pe(9,"app-editor",6),Wr()}if(2&i){const e=he();let n;G(1),U("ngIf",(null==e.resource?null:e.resource.name)&&(null==e.resource?null:e.resource.name)!=(null==(n=Tt(2,8,e.main.resource$))?null:n.name)),G(5),U("value",e.resourceData.choice_index)("disabled",e.disabled),G(1),U("ngForOf",e.resource.schema.possible_resource_schemas),G(1),U("resource",e.childResource),G(1),U("resource",e.childResource)("hideBlockActions",!0)("disabled",e.disabled)}}let _$=(()=>{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 $e,this.blockClassStr=g$}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:sc(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)(E(Pa))},i.\u0275cmp=ot({type:i,selectors:[["app-delegate",8,"block-ui"]],inputs:{resource:"resource",resourceDescription:"resourceDescription",hideBlockActions:"hideBlockActions",disabled:"disabled"},outputs:{changed:"changed"},attrs:Ype,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"],[3,"resource","hideBlockActions","disabled"],["matTooltipPosition","above",3,"matTooltip"],[3,"value","disabled"]],template:function(e,n){1&e&&fe(0,Kpe,10,10,"ng-container",0),2&e&&U("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 Zpe=["class","block-ui"];function Qpe(i,t){if(1&i&&(W(0,"mat-label",7),ze(1),j()),2&i){const e=he(2);U("matTooltip",e.resourceDescription),G(1),Qi(" ",e.resource.name," ")}}function Jpe(i,t){if(1&i){const e=ai();$r(0),fe(1,Qpe,2,2,"mat-label",1),W(2,"mat-selection-list",2),Le("selectionChange",function(r){return rn(e),Ut(he().onSelection(r))}),W(3,"mat-list-option",3),ze(4," Left "),j(),W(5,"mat-list-option",4),ze(6," Right "),j()(),W(7,"mat-form-field",5)(8,"mat-label"),ze(9,"Texture ID"),j(),W(10,"input",6),Le("ngModelChange",function(r){return rn(e),Ut(he().resource.data.texture_id=r)})("change",function(){return rn(e),Ut(he().changed.emit())}),j()(),Wr()}if(2&i){const e=he();G(1),U("ngIf",e.resource.name),G(2),U("selected",e.resource.data.has_left_fence),G(2),U("selected",e.resource.data.has_right_fence),G(5),U("max",63)("min",0)("step",1)("ngModel",e.resource.data.texture_id)}}let eme=(()=>{class i{constructor(){this.resource=null,this.resourceDescription="",this.changed=new $e}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=ot({type:i,selectors:[["app-fence-type",8,"block-ui"]],inputs:{resource:"resource",resourceDescription:"resourceDescription"},outputs:{changed:"changed"},attrs:Zpe,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&&fe(0,Jpe,11,7,"ng-container",0),2&e&&U("ngIf",n.resource)},dependencies:[vi,gl,mu,nc,_u,gu,Zc,vl,Ro,rc,Fs,MC,wC],changeDetection:0}),i})(),tme=(()=>{class i{constructor(){this._resource=null,this.resourceMap={},this.changed=new $e}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]=["",_l.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)(E(nb),E(bte),E(oR))},i.\u0275cmp=ot({type:i,selectors:[["app-run-custom-action",8,"dialog"]],attrs:nme,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&&(W(0,"h1",0),ze(1),j(),W(2,"div",1)(3,"p"),ze(4),j()(),W(5,"form",2),fe(6,ime,4,4,"mat-form-field",3),j(),W(7,"div",4)(8,"button",5),Le("click",function(){return n.dialogRef.close()}),ze(9,"Cancel"),j(),W(10,"button",6),Le("click",function(){return n.submit()}),ze(11,"Run"),j()()),2&e&&(G(1),Qi('Run action "',n.data.title,'"'),G(3),_i(n.data.description),G(1),U("formGroup",n.argsForm),G(1),U("ngForOf",n.data.args),G(4),U("disabled",n.argsForm.invalid))},dependencies:[Eo,IR,gl,nc,bR,vl,Ro,rc,ib,fV,pV,mV,Gh,fC],styles:["form[_ngcontent-%COMP%]{padding:0 24px}"]}),i})();function v$(i,t){return t?e=>Sy(t.pipe(Oi(1),function sme(){return ti((i,t)=>{i.subscribe(Yn(t,ms))})}()),e.pipe(v$(i))):rr((e,n)=>Mr(i(e,n)).pipe(Oi(1),YB(e)))}function y$(i,t=$y){const e=OI(i,t);return v$(()=>e)}const ome=["mat-menu-item",""];function ame(i,t){1&i&&(ki(),W(0,"svg",3),Pe(1,"polygon",4),j())}const lme=[[["mat-icon"],["","matMenuItemIcon",""]],"*"],cme=["mat-icon, [matMenuItemIcon]","*"];function dme(i,t){if(1&i){const e=ai();W(0,"div",0),Le("keydown",function(r){return rn(e),Ut(he()._handleKeydown(r))})("click",function(){return rn(e),Ut(he().closed.emit("click"))})("@transformMenu.start",function(r){return rn(e),Ut(he()._onAnimationStart(r))})("@transformMenu.done",function(r){return rn(e),Ut(he()._onAnimationDone(r))}),W(1,"div",1),Wt(2),j()()}if(2&i){const e=he();U("id",e.panelId)("ngClass",e._classList)("@transformMenu",e._panelAnimationState),Dt("aria-label",e.ariaLabel||null)("aria-labelledby",e.ariaLabelledby||null)("aria-describedby",e.ariaDescribedby||null)}}const ume=["*"],xO=new me("MAT_MENU_PANEL"),hme=YM(jM(class{}));let eE=(()=>{class i extends hme{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 Re,this._focused=new Re,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",Yr("120ms cubic-bezier(0, 0, 0.2, 1)",si({opacity:1,transform:"scale(1)"}))),Or("* => void",Yr("100ms 25ms linear",si({opacity:0})))]),fadeInItems:ka("fadeInItems",[Os("showing",si({opacity:1})),Or("void => *",[si({opacity:0}),Yr("400ms 100ms cubic-bezier(0.55, 0, 0.55, 0.2)")])])};let pme=0;const b$=new me("mat-menu-default-options",{providedIn:"root",factory:function mme(){return{overlapTrigger:!1,xPosition:"after",yPosition:"below",backdropClass:"cdk-overlay-transparent-backdrop"}}});let e0=(()=>{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 om,this._classList={},this._panelAnimationState="void",this._animationDone=new Re,this.overlayPanelClass=this._defaultOptions.overlayPanelClass||"",this.backdropClass=this._defaultOptions.backdropClass,this._overlapTrigger=this._defaultOptions.overlapTrigger,this._hasBackdrop=this._defaultOptions.hasBackdrop,this.closed=new $e,this.close=this.closed,this.panelId="mat-menu-panel-"+pme++}ngOnInit(){this.setPositionClasses()}ngAfterContentInit(){this._updateDirectDescendants(),this._keyManager=new RU(this._directDescendantItems).withWrap().withTypeAhead().withHomeAndEnd(),this._keyManager.tabOut.subscribe(()=>this.closed.emit("tab")),this._directDescendantItems.changes.pipe(Do(this._directDescendantItems),ks(e=>Cr(...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(Do(this._directDescendantItems),ks(n=>Cr(...n.map(r=>r._hovered))))}addItem(e){}removeItem(e){}_handleKeydown(e){const n=e.keyCode,r=this._keyManager;switch(n){case 27:Zo(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(Oi(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(Do(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)(E(gt),E(pt),E(b$),E(Zn))},i.\u0275dir=ve({type:i,contentQueries:function(e,n,r){if(1&e&&(Wi(r,fme,5),Wi(r,eE,5),Wi(r,eE,4)),2&e){let s;Et(s=At())&&(n.lazyContent=s.first),Et(s=At())&&(n._allItems=s),Et(s=At())&&(n.items=s)}},viewQuery:function(e,n){if(1&e&&Wn(Co,5),2&e){let r;Et(r=At())&&(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})(),gme=(()=>{class i extends e0{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)(E(gt),E(pt),E(b$),E(Zn))},i.\u0275cmp=ot({type:i,selectors:[["mat-menu"]],hostVars:3,hostBindings:function(e,n){2&e&&Dt("aria-label",null)("aria-labelledby",null)("aria-describedby",null)},exportAs:["matMenu"],features:[Dn([{provide:xO,useExisting:i}]),lt],ngContentSelectors:ume,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&&(or(),fe(0,dme,3,6,"ng-template"))},dependencies:[hm],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:[tE.transformMenu,tE.fadeInItems]},changeDetection:0}),i})();const x$=new me("mat-menu-scroll-strategy"),vme={provide:x$,deps:[as],useFactory:function _me(i){return()=>i.scrollStrategies.reposition()}},w$=Oh({passive:!0});let yme=(()=>{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,d){this._overlay=e,this._element=n,this._viewContainerRef=r,this._menuItemInstance=a,this._dir=l,this._focusMonitor=c,this._ngZone=d,this._overlayRef=null,this._menuOpen=!1,this._closingActionsSubscription=Zt.EMPTY,this._hoverSubscription=Zt.EMPTY,this._menuCloseSubscription=Zt.EMPTY,this._changeDetectorRef=Ft(Zn),this._handleTouchStart=h=>{qI(h)||(this._openedBy="touch")},this._openedBy=void 0,this.restoreFocus=!0,this.menuOpened=new $e,this.onMenuOpen=this.menuOpened,this.menuClosed=new $e,this.onMenuClose=this.menuClosed,this._scrollStrategy=s,this._parentMaterialMenu=o instanceof e0?o:void 0,n.nativeElement.addEventListener("touchstart",this._handleTouchStart,w$)}ngAfterContentInit(){this._handleHover()}ngOnDestroy(){this._overlayRef&&(this._overlayRef.dispose(),this._overlayRef=null),this._element.nativeElement.removeEventListener("touchstart",this._handleTouchStart,w$),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 e0&&(e._startAnimation(),e._directDescendantItems.changes.pipe(Ve(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 e0?(n._resetAnimation(),n.lazyContent?n._animationDone.pipe(gn(r=>"void"===r.toState),Oi(1),Ve(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],[d,h]=[r,s],p=0;if(this.triggersSubmenu()){if(h=r="before"===e.xPosition?"start":"end",s=d="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:d,overlayY:o,offsetY:p},{originX:s,originY:l,overlayX:h,overlayY:o,offsetY:p},{originX:r,originY:c,overlayX:d,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 Cr(e,this._parentMaterialMenu?this._parentMaterialMenu.closed:ft(),this._parentMaterialMenu?this._parentMaterialMenu._hovered().pipe(gn(o=>o!==this._menuItemInstance),gn(()=>this._menuOpen)):ft(),n)}_handleMousedown(e){YI(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(gn(e=>e===this._menuItemInstance&&!e.disabled),y$(0,PI)).subscribe(()=>{this._openedBy="mouse",this.menu instanceof e0&&this.menu._isAnimating?this.menu._animationDone.pipe(Oi(1),y$(0,PI),Ve(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)(E(as),E(gt),E(jr),E(x$),E(xO,8),E(eE,10),E(Ra,8),E(Xc),E(pt))},i.\u0275dir=ve({type:i,hostVars:3,hostBindings:function(e,n){1&e&&Le("click",function(s){return n._handleClick(s)})("mousedown",function(s){return n._handleMousedown(s)})("keydown",function(s){return n._handleKeydown(s)}),2&e&&Dt("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})(),bme=(()=>{class i extends yme{}return i.\u0275fac=function(){let t;return function(n){return(t||(t=ri(i)))(n||i)}}(),i.\u0275dir=ve({type:i,selectors:[["","mat-menu-trigger-for",""],["","matMenuTriggerFor",""]],hostAttrs:[1,"mat-mdc-menu-trigger"],exportAs:["matMenuTrigger"],features:[lt]}),i})(),xme=(()=>{class i{}return i.\u0275fac=function(e){return new(e||i)},i.\u0275mod=nn({type:i}),i.\u0275inj=Kt({providers:[vme],imports:[Ao,eb,Qn,Pm,Xy,Qn]}),i})();function wme(i,t){if(1&i){const e=ai();W(0,"button",7),Le("click",function(){return rn(e),Ut(he(2).deserialize())}),Pe(1,"mat-icon",8),j()}}function Mme(i,t){if(1&i){const e=ai();$r(0),fe(1,wme,2,0,"button",4),W(2,"button",5),Le("click",function(){return rn(e),Ut(he().serializeBlockReversible())}),Pe(3,"mat-icon",6),j(),Wr()}if(2&i){const e=he();G(1),U("ngIf",e.isInReversibleSerializationState),G(1),U("disabled",e.isInReversibleSerializationState)}}function Cme(i,t){1&i&&(W(0,"button",9),Pe(1,"mat-icon",10),j()),2&i&&(he(),U("matMenuTriggerFor",Zi(3)))}function Sme(i,t){if(1&i){const e=ai();W(0,"button",11),Le("click",function(){const s=rn(e).$implicit;return Ut(he().runCustomAction(s))}),W(1,"span"),ze(2),j()()}if(2&i){const e=t.$implicit;G(2),_i(e.title)}}const Eme=function(){return[]};let nE=(()=>{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 tt(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)(E(Pa),E(Jl),E(Zn),E(Bm),E(IV))},i.\u0275cmp=ot({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&&(fe(0,Mme,4,2,"ng-container",0),fe(1,Cme,2,1,"button",1),W(2,"mat-menu",null,2),fe(4,Sme,3,1,"button",3),j()),2&e&&(U("ngIf",null==n.resource||null==n.resource.schema?null:n.resource.schema.serializable_to_disc),G(1),U("ngIf",(null==n.resource||null==n.resource.schema.custom_actions?null:n.resource.schema.custom_actions.length)>0),G(3),U("ngForOf",(null==n.resource?null:n.resource.schema.custom_actions)||Rs(3,Eme)))},dependencies:[Eo,vi,Fs,XM,gR,gme,eE,bme],styles:["[_nghost-%COMP%]{display:flex}"]}),i})();const Ame=["class","block-ui"];function Dme(i,t){if(1&i&&(W(0,"mat-label",7),ze(1),j()),2&i){const e=he();U("matTooltip",e.resourceDescription),G(1),Qi("",null==e.resource?null:e.resource.name," ")}}function Tme(i,t){if(1&i&&(W(0,"audio",8),Pe(1,"source",9),Ct(2,"async"),ze(3," Your browser does not support the audio element. "),j()),2&i){const e=he();G(1),U("src",Tt(2,1,e.audioUrl$),Lp)}}function Ime(i,t){1&i&&Pe(0,"mat-spinner",10)}function Rme(i,t){1&i&&Pe(0,"app-block-actions",11),2&i&&U("resource",he().resource)}const kme=function(){return["wave_data"]};let Pme=(()=>{class i{constructor(e,n){this.eelDelegate=e,this.main=n,this._resource$=new ut(null),this.audioUrl$=new ut(null),this.resourceDescription="",this.hideBlockActions=!1,this.destroyed$=new Re,this.changed=new $e}set resource(e){this._resource$.next(e)}get resource(){return this._resource$.getValue()}ngAfterViewInit(){var e=this;return tt(function*(){e._resource$.pipe(Ve(e.destroyed$)).subscribe(function(){var n=tt(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)(E(Jl),E(Pa))},i.\u0275cmp=ot({type:i,selectors:[["app-eacs-audio",8,"block-ui"]],inputs:{resource:"resource",resourceDescription:"resourceDescription",hideBlockActions:"hideBlockActions"},outputs:{changed:"changed"},attrs:Ame,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&&(W(0,"div",0),fe(1,Dme,2,2,"mat-label",1),Ct(2,"async"),fe(3,Tme,4,3,"audio",2),Ct(4,"async"),fe(5,Ime,1,0,"mat-spinner",3),Ct(6,"async"),Pe(7,"div",4),fe(8,Rme,1,1,"app-block-actions",5),j(),Pe(9,"app-compound-block-ui",6),Ct(10,"async")),2&e){let r;G(1),U("ngIf",(null==n.resource?null:n.resource.name)&&(null==n.resource?null:n.resource.name)!=(null==(r=Tt(2,7,n.main.resource$))?null:r.name)),G(2),U("ngIf",Tt(4,9,n.audioUrl$)),G(2),U("ngIf",n.resource&&!Tt(6,11,n.audioUrl$)),G(3),U("ngIf",!n.hideBlockActions),G(1),U("resource",Tt(10,13,n._resource$))("hideBlockActions",!0)("fieldBlacklist",Rs(15,kme))}},dependencies:[vi,Ro,Fs,Jb,ec,nE,pl],styles:["#header[_ngcontent-%COMP%]{display:flex}"]}),i})();class Ome{constructor(t,e){this.mesh=t,this.assetsPath=e,this.textures=[],this.tyreTextureUpdateTimer=void 0,this.tyreMaterial=null,this.tyreTextures=[],this._color=65280,this._speed="idle",this._steeringAngle=0,this.wheels=[],this.wheelIdlePositions=[],this.frontWheels=[];let n=new Set;if(t.traverse(r=>{if(!(r instanceof Mn))return;let s=-1;if(r.name.startsWith("part_hp_12")?s=0:r.name.startsWith("part_hp_14")?s=1:r.name.startsWith("part_hp_16")?s=2:r.name.startsWith("part_hp_18")&&(s=3),s>-1){r.geometry.boundingBox||r.geometry.computeBoundingBox();let a=Te.avg(r.geometry.boundingBox.min,r.geometry.boundingBox.max);return(0==s||2==s)&&(a={x:a.x,y:a.y,z:a.z+1.5}),r.geometry.translate(...Te.spr(Te.neg(a))),r.position.set(...Te.spr(a)),this.wheelIdlePositions[s]=a,this.wheels.push(r),void(s<2&&this.frontWheels.push(r))}const o=r.material.map;o&&n.add(o)}),this.textures=Array.from(n).map(r=>{const s=new Oo(document.createElement("img"));return s.flipY=r.flipY,sa(s),[r,s]}),t.traverse(r=>{if(!(r instanceof Mn))return;const s=r.material.map;if(s){const o=this.textures.find(([a,l])=>a===s);o&&(r.material.map=o[1])}}),this.hasWheels){const r=new Pu;this.tyreTextures=[0,1,2,3].map(s=>r.load(`${e}/m${s}00.png`));for(const s of this.tyreTextures)sa(s);this.tyreMaterial=new qi({map:this.tyreTextures[0]}),this.tyreMaterial.transparent=!0,this.tyreMaterial.alphaTest=.5,this.tyreMaterial.map.wrapS=er,this.tyreMaterial.map.wrapT=er,this.tyreMaterial.polygonOffset=!0,this.tyreMaterial.polygonOffsetFactor=-4;for(const s of this.wheels)s.material=this.tyreMaterial}this.color=65280,this.recolorCar().then()}get color(){return this._color}set color(t){t!==this._color&&(this._color=t,this.recolorCar().then())}get speed(){return this._speed}set speed(t){if(t!==this._speed){switch(this._speed=t,this.tyreTextureUpdateTimer&&clearInterval(this.tyreTextureUpdateTimer),t){case"idle":this.tyreMaterial.map=this.tyreTextures[0];break;case"slow":let e=!0;this.tyreTextureUpdateTimer=setInterval(()=>{this.tyreMaterial.map=this.tyreTextures[e?1:2],this.tyreMaterial.needsUpdate=!0,e=!e},16);break;case"fast":this.tyreMaterial.map=this.tyreTextures[3]}this.tyreMaterial.needsUpdate=!0}}get steeringAngle(){return this._steeringAngle}set steeringAngle(t){if(t!==this._steeringAngle){this._steeringAngle=t;for(const e of this.frontWheels)e.rotation.set(0,0,t)}}get hasWheels(){return this.wheels.length>0}recolorCar(){var t=this;return tt(function*(){const[e,n,r]=[t.color>>16,t.color>>8&255,255&t.color];for(const[s,o]of t.textures){for(let a=100;a>0&&!s.source.data;a--)yield p$(50);m$(s.source.data,(a,l)=>{if(a[l]+a[l+2]{class i{constructor(e,n,r){this.eelDelegate=e,this.main=n,this.cdr=r,this._resource$=new ut(null),this.changed=new $e,this.customControls=[],this.previewPaths$=new ut(null),this.destroyed$=new Re,this.serializerSettings={geometry__save_obj:!0,geometry__save_blend:!1,geometry__export_to_gg_web_engine:!1}}get resource(){return this._resource$.getValue()}set resource(e){this._resource$.next(e)}ngAfterViewInit(){var e=this;return tt(function*(){e._resource$.pipe(Ve(e.destroyed$)).subscribe(function(){var n=tt(function*(r){e.previewPaths$.next(yield e.loadPreviewFilePaths(r?.id))});return function(r){return n.apply(this,arguments)}}()),e.main.dataBlockChange$.pipe(Ve(e.destroyed$),gn(([n,r])=>!!e.resource&&n.startsWith(e.resource.id)),ml(1500)).subscribe(tt(function*(){e.previewPaths$.next(null),e.previewPaths$.next(yield e.postTmpUpdates(e.resource?.id))}))})()}onObjectLoaded(e){var n=this;return tt(function*(){try{const r=new Ome(e,n.previewPaths$.value[0].substring(0,n.previewPaths$.value[0].lastIndexOf("/"))+"/assets");let s=null;const o=a=>{s&&clearTimeout(s),s=setTimeout(()=>r.color=a,50)};n.customControls=[{title:"NFS2 car features",controls:[{label:"Car color",type:"color",value:65280,change:a=>o(a)}]}],r.hasWheels&&n.customControls[0].controls.push({label:"Car speed",type:"radio",options:["idle","slow","fast"],value:"idle",change:a=>{r.speed=a}},{label:"Steering angle",type:"slider",minValue:-.7,maxValue:.7,valueStep:.05,value:0,change:a=>{r.steeringAngle=a}}),n.cdr.markForCheck()}catch(r){console.error(r)}})()}postTmpUpdates(e){var n=this;return tt(function*(){if(e){const r=yield n.eelDelegate.serializeResourceTmp(e,Object.entries(n.main.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 tt(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)(E(Jl),E(Pa),E(Zn))},i.\u0275cmp=ot({type:i,selectors:[["app-geo-geometry",8,"block-ui"]],inputs:{resource:"resource"},outputs:{changed:"changed"},attrs:Fme,decls:4,vars:8,consts:[[3,"paths","groupFunction","customControls","onObjectLoaded"],[3,"resource",4,"ngIf"],[3,"resource"]],template:function(e,n){1&e&&(W(0,"app-obj-viewer",0),Le("onObjectLoaded",function(s){return n.onObjectLoaded(s)}),Ct(1,"async"),j(),fe(2,Lme,2,3,"app-compound-block-ui",1),Ct(3,"async")),2&e&&(U("paths",Tt(1,4,n.previewPaths$))("groupFunction",n.previewObjectGroupFunc)("customControls",n.customControls),G(2),U("ngIf",!Tt(3,6,n.main.hideHiddenFields$)))},dependencies:[vi,ec,h$,pl],changeDetection:0}),i})();const Bme=function(){return["children","items_descr"]};let Ume=(()=>{class i{constructor(){this._resource=null,this.hideBlockActions=!1,this.resourceMap={},this.changed=new $e}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:sc(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=ot({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&&Pe(0,"app-compound-block-ui",0)(1,"app-sidenav-res-list",1),2&e&&(U("resource",n.resource)("hideBlockActions",n.hideBlockActions)("fieldBlacklist",Rs(4,Bme)),G(1),U("resources",n.resourceMap))},dependencies:[ec,xC],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})();const Vme=["previewCanvasContainer"],zme=["previewCanvas"];function Hme(i,t){1&i&&Pe(0,"mat-spinner",16),2&i&&U("diameter",40)}function Gme(i,t){1&i&&Pe(0,"mat-spinner",17)}const $me=function(){return[]};var Df=(()=>{return(i=Df||(Df={})).ThreeModel="model",i.Bitmap="bitmap",i.TwoSidedBitmap="two_sided_bitmap",Df;var i})();class Wme extends QH{constructor(t,e,n){super(t,{loadDepth:40,inertia:2}),this.mapGraph=t,this.qfsPath=e,this.hideUnknownEntities$=n,this.textureLoader=new Pu,this.terrainMaterials={},this.objLoader=new Qb,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(Ql(),Ve(this._onRemoved$)).subscribe(e=>{for(const n of this.unknownEntities)n.visible=!e})}getPlaceholderTexture(){var t=this;return tt(function*(){return t._placeholder?t._placeholder:(t._placeholderPromise||(t._placeholderPromise=t.textureLoader.loadAsync("assets/placeholder_texture.png")),t._placeholderPromise)})()}getPlaceholderTerrainTexture(){var t=this;return tt(function*(){return t._placeholderTerrain?t._placeholderTerrain:(t._placeholderTerrainPromise||(t._placeholderTerrainPromise=t.textureLoader.loadAsync("assets/placeholder_texture.png").then(e=>(e.wrapS=Bs,e.wrapT=Bs,sa(e),e))),t._placeholderTerrainPromise)})()}loadChunk(t){var e=this;return tt(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 Mn&&(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:Te.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:Yi.fromAngle(Te.nZ,l.rotation)}));const o=(yield Promise.all(s.map(l=>e.loadPropInternal(l)))).filter(l=>!!l),a=new Jo({object3D:new ra(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 qi({side:Ns,transparent:!0,visible:!1}),this.qfsPath?this.textureLoader.loadAsync(`${this.qfsPath}/${t}.png`).then(e=>{e.wrapS=Bs,e.wrapT=Bs,sa(e),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 tt(function*(){let n=!1;if(t.type==Df.ThreeModel){let r;try{if(!e.qfsPath)throw new Error;const o=new bO,a=new Qb,l=yield o.loadAsync(`${e.qfsPath}/props/${t.data.data.resource_id}/0/material.mtl`);l.preload(),a.setMaterials(l),r=new ra(yield a.loadAsync(`${e.qfsPath}/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 Mn){const a=o.material instanceof Array?o.material:[o.material];for(const l of a)l.transparent=!0,l.alphaTest=.5,l instanceof qi&&l.map&&(l.map.wrapS=Bs,l.map.wrapT=Bs,sa(l.map),l.map.needsUpdate=!0)}});const s=new Jo({object3D: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,d)=>new Array(d).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 No,[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,d]=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 Jo({object3D:new ra(s)});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 tt(function*(){const s=t.split(";"),o=yield r.getPlaceholderTexture();let a=!1,l=[];r.qfsPath?l=yield Promise.all(s.map(h=>r.textureLoader.loadAsync(`${r.qfsPath}/foreground/${h}.png`).catch(()=>(a=!0,o)))):(a=!0,l=s.map(()=>o));const c=l.map(h=>(sa(h),new qi({map:h,alphaTest:.5,transparent:!0,side:Ns}))),d=new Mn(new Iu(e.x,e.y),c[0]);if(d.rotateX(Math.PI/2),d.position.set(0,0,e.y/2),c.length>1){let h=-1;Ym(r.world).pipe(o4(n&&!isNaN(+n)?1e3*+n:250)).subscribe(()=>{h=(h+1)%c.length,d.material=c[h]})}return[d,a]})()}}let jme=(()=>{class i{constructor(e,n,r){this.eelDelegate=e,this.cdr=n,this.mainService=r,this._resource$=new ut(null),this.changed=new $e,this.previewLoading$=new ut(!0),this.previewQfsLocation$=new ut(null),this.previewQfsLoading$=new ut(!1),this.pointer$=new ut(null),this.selectedSplineIndex$=new ut(0),this.qfsPath=null,this.name="",this.renderer=null,this.map=null,this.roadPath=null,this.destroyed$=new Re}get resource(){return this._resource$.getValue()}set resource(e){this._resource$.next(e)}ngAfterViewInit(){var e=this;return tt(function*(){var s;e.world=new sk(new vO,{init:(s=tt(function*(){}),function(){return s.apply(this,arguments)}),simulate:()=>{},loader:{loadFromGgGlb:function(){var s=tt(function*(...o){return[]});return function(){return s.apply(this,arguments)}}()}}),yield e.world.init(),e.skySphere=new Jo({object3D:e.world.visualScene.factory.createPrimitive({shape:"SPHERE",radius:1e3},{color:16777215})}),e.skySphere.object3D.nativeMesh.material.side=Ns,e.world.addEntity(e.skySphere),e.selectionSphere=new Jo({object3D: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 $S(16777215,2));let n=new ut({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=Yi.lookAt(e.renderer.camera.position,Te.add(e.renderer.camera.position,Te.Y),Te.Z),Ym(e.world).pipe(Ve(e.destroyed$)).subscribe(()=>{e.renderer&&(e.skySphere.position=e.renderer.camera.position,e.pointer$.next(e.renderer.camera.position))}),e.controller=new n4(e.world.keyboardInput,e.renderer,{mouseOptions:{canvas:e.previewCanvas.nativeElement,pointerLock:!0},keymap:"wasd+arrows",cameraLinearSpeed:40,cameraBoostMultiplier:4,cameraMovementElasticity:100,cameraRotationElasticity:30,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(Ve(e.destroyed$)).subscribe(function(){var s=tt(function*(o){e.roadPath=e.resource?.data.block_positions.map(a=>({x:a.x,y:a.z,z:a.y})),e.previewLoading$.next(!0),o?(e.previewQfsLocation$.next(o.id.substring(0,o.id.indexOf(".TRK"))+"0.QFS"),yield e.loadTerrainChunks(o.id),yield e.onQfsSelected(e.previewQfsLocation$.value)):(yield e.loadTerrainChunks(),yield e.loadPreview()),e.previewLoading$.next(!1)});return function(o){return s.apply(this,arguments)}}()),e.mainService.dataBlockChange$.pipe(Ve(e.destroyed$),gn(([s,o])=>!!e.resource&&s.startsWith(e.resource.id)),ml(3e3)).subscribe(tt(function*(){e.roadPath=e.resource?.data.block_positions.map(s=>({x:s.x,y:s.z,z:s.y})),e.previewLoading$.next(!0),yield e.postTmpUpdates(e.resource?.id),yield e.loadPreview(),e.previewLoading$.next(!1)})),e.selectedSplineIndex$.pipe(Ve(e.destroyed$),ml(250)).subscribe(s=>{if(e.resource){let o=e.resource.data.block_positions[s];if(!o)return;o={x:o.x,y:o.z,z:o.y},e.selectionSphere.position=o,e.renderer&&(e.renderer.position=Te.add(o,Te.rotAround({x:10,y:-12,z:5},{x:0,y:0,z:1},-0)),e.renderer.rotation=Yi.lookAt(e.renderer.position,o,{x:0,y:0,z:1}),e.controller.reset())}})})()}onQfsSelected(e){var n=this;return tt(function*(){if(n.qfsPath!=e){n.previewQfsLoading$.next(!0);try{const r=yield n.eelDelegate.serializeResource(e),s=new Pu,o=r.find(a=>a.endsWith("spherical.png"));if(o){const a=yield s.loadAsync(o);a.colorSpace="srgb",a.mapping=cc,n.skySphere.object3D.nativeMesh.material.map=a}else n.skySphere.object3D.nativeMesh.material.map=null;n.skySphere.object3D.nativeMesh.material.needsUpdate=!0,n.qfsPath=e}catch{n.skySphere.object3D.nativeMesh.material.map=null,n.skySphere.object3D.nativeMesh.material.needsUpdate=!0,n.qfsPath=null}finally{n.previewQfsLoading$.next(!1)}yield n.loadPreview()}})()}loadTerrainChunks(e){var n=this;return tt(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})()}onPointerChange(e){this.renderer&&(this.renderer.position=e)}loadPreview(){var e=this;return tt(function*(){if(!e.terrainChunksObjLocation||!e.roadPath)return;const n=Km.fromMapArray(e.roadPath.map((r,s)=>({path:`${e.terrainChunksObjLocation}terrain_chunk_${s}`,position:r,loadOptions:{}}))||[],!0);e.unloadPreview(),e.map=new Wme(n,e.qfsPath&&"resources/"+e.qfsPath,e.mainService.hideHiddenFields$),e.map.resource=e.resource,e.map.isOpenedTrack=!1,Ym(e.world).pipe(Ve(e.destroyed$)).subscribe(()=>{e.map&&e.renderer&&e.map.loaderCursor$.next(e.renderer.position)}),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 tt(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)(E(Jl),E(Zn),E(Pa))},i.\u0275cmp=ot({type:i,selectors:[["app-trk-map-block-ui"]],viewQuery:function(e,n){if(1&e&&(Wn(Vme,5),Wn(zme,5)),2&e){let r;Et(r=At())&&(n.previewCanvasContainer=r.first),Et(r=At())&&(n.previewCanvas=r.first)}},inputs:{resource:"resource"},outputs:{changed:"changed"},decls:32,vars:26,consts:[[1,"qfsSelector"],["appearance","fill"],["matInput","","type","text",3,"value"],["customQfsInput",""],["mat-button","",3,"click"],["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","projection","pointerChange"],[3,"resource"],["mode","indeterminate",3,"diameter"],["mode","indeterminate"]],template:function(e,n){if(1&e){const r=ai();W(0,"div",0)(1,"h4"),ze(2,"Preview QFS file"),j(),W(3,"mat-form-field",1)(4,"mat-label"),ze(5,"Custom QFS path"),j(),Pe(6,"input",2,3),Ct(8,"async"),j(),W(9,"button",4),Le("click",function(){rn(r);const o=Zi(7);return Ut(n.onQfsSelected(o.value))}),ze(10,"LOAD"),j(),fe(11,Hme,1,1,"mat-spinner",5),Ct(12,"async"),j(),W(13,"div",6)(14,"div",7,8),Pe(16,"canvas",9,10),fe(18,Gme,1,0,"mat-spinner",11),Ct(19,"async"),j(),W(20,"div",12,8)(22,"mat-form-field",1)(23,"mat-label"),ze(24,"Spline item"),j(),W(25,"input",13),Le("ngModelChange",function(o){return n.selectedSplineIndex$.next(o)}),Ct(26,"async"),Ct(27,"async"),j()(),W(28,"app-minimap",14),Le("pointerChange",function(o){return n.onPointerChange(o)}),Ct(29,"async"),j()()(),Pe(30,"app-compound-block-ui",15),Ct(31,"async")}if(2&e){let r;G(6),U("value",Tt(8,11,n.previewQfsLocation$)),G(5),U("ngIf",Tt(12,13,n.previewQfsLoading$)),G(7),U("ngIf",Tt(19,15,n.previewLoading$)),G(7),U("min",0)("max",4*(null==(r=Tt(26,17,n._resource$))?null:r.data.num_blocks)-1)("ngModel",Tt(27,19,n.selectedSplineIndex$)),G(3),U("roadSpline",n.roadPath||Rs(25,$me))("pointer",Tt(29,21,n.pointer$))("splineClosed",!0)("projection","nz"),G(2),U("resource",Tt(31,23,n._resource$))}},dependencies:[vi,gl,mu,nc,_u,gu,Zc,vl,Ro,rc,ib,Jb,ec,f$,pl],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-minimap[_ngcontent-%COMP%]{flex-grow:1;display:flex}.qfsSelector[_ngcontent-%COMP%]{display:flex;align-items:center;width:100%;column-gap:1rem}.qfsSelector[_ngcontent-%COMP%] h4[_ngcontent-%COMP%]{min-width:-moz-fit-content;min-width:fit-content}.qfsSelector[_ngcontent-%COMP%] mat-form-field[_ngcontent-%COMP%]{flex-grow:1}.qfsSelector[_ngcontent-%COMP%] mat-spinner[_ngcontent-%COMP%], .qfsSelector[_ngcontent-%COMP%] button[_ngcontent-%COMP%]{margin-bottom:1.34375em}"],changeDetection:0}),i})();function Yme(i,t){if(1&i&&(W(0,"mat-error"),ze(1),j()),2&i){const e=he(2);G(1),tm(" ",e.resourceError.data.error_class,": ",e.resourceError.data.error_text," ")}}function qme(i,t){1&i&&Pe(0,"mat-spinner",5)}function Xme(i,t){if(1&i&&(W(0,"div",2),fe(1,Yme,2,2,"mat-error",3),fe(2,qme,1,0,"mat-spinner",4),j()),2&i){const e=he();G(1),U("ngIf",e.resourceError),G(1),U("ngIf",!e.resourceError)}}function Kme(i,t){}let t0=(()=>{class i{constructor(e){this.mainService=e,this._component=null,this._componentChangedSub=null,this.destroyed$=new Re,this.resourceSet$=new Re,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(Ve(this.destroyed$),Ve(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 Zme(i,t){1&i&&Pe(0,"mat-icon",17)}function Qme(i,t){1&i&&Pe(0,"mat-icon",18)}let Jme=(()=>{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 tt(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 tt(function*(){if(e.mainService.hasUnsavedChanges){let n=e.dialog.open(CV,{data:{text:"There are unsaved changes, which will be lost. Are you sure you want to reload file?"}});if(!(yield lR(n.afterClosed())))return}yield e.mainService.reloadResource(),e.cdr.markForCheck()})()}}return i.\u0275fac=function(e){return new(e||i)(E(Jl),E(Pa),E(Bm),E(IV),E(Zn))},i.\u0275cmp=ot({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&&(W(0,"mat-toolbar",0)(1,"span"),ze(2),Ct(3,"async"),Ct(4,"async"),j(),Pe(5,"span",1),W(6,"button",2),Le("click",function(){return n.toggleUnknownsVisibility()}),fe(7,Zme,1,0,"mat-icon",3),Ct(8,"async"),fe(9,Qme,1,0,"mat-icon",4),Ct(10,"async"),j(),Pe(11,"mat-divider",5)(12,"app-block-actions",6),Ct(13,"async"),W(14,"button",7),Le("click",function(){return n.reloadResource()}),Ct(15,"async"),Pe(16,"mat-icon",8),j(),Pe(17,"mat-divider",5),W(18,"button",9),Le("click",function(){return n.saveResource()}),Ct(19,"async"),Ct(20,"async"),Pe(21,"mat-icon",10),j()(),W(22,"div",11),Pe(23,"div",12)(24,"app-editor",13),Ct(25,"async"),Ct(26,"async"),Ct(27,"async"),W(28,"div",14)(29,"a",15),Pe(30,"img",16),j()(),Pe(31,"div",12),j()),2&e){let r;G(2),tm("",(null==(r=Tt(3,9,n.mainService.resource$))?null:r.name)||"...","",Tt(4,11,n.mainService.hasUnsavedChanges$)?"*":"",""),G(5),U("ngIf",Tt(8,13,n.mainService.hideHiddenFields$)),G(2),U("ngIf",!Tt(10,15,n.mainService.hideHiddenFields$)),G(3),U("resource",Tt(13,17,n.mainService.resource$)),G(2),U("disabled",!Tt(15,19,n.mainService.eelDelegate.openedResourcePath$)),G(4),U("disabled",!Tt(19,21,n.mainService.resource$)||!Tt(20,23,n.mainService.hasUnsavedChanges$)),G(6),U("resource",Tt(25,25,n.mainService.customActionRunning$)?null:Tt(26,27,n.mainService.resource$)||Tt(27,29,n.mainService.error$))("hideBlockActions",!0)}},dependencies:[vi,CJ,EJ,Fs,XM,gR,t0,nE,pl],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 M$(i){return new pe(3e3,!1)}function Oge(){return typeof window<"u"&&typeof window.document<"u"}function wO(){return typeof process<"u"&&"[object process]"==={}.toString.call(process)}function Nu(i){switch(i.length){case 0:return new tb;case 1:return i[0];default:return new oV(i)}}function C$(i,t,e,n,r=new Map,s=new Map){const o=[],a=[];let l=-1,c=null;if(n.forEach(d=>{const h=d.get("offset"),p=h==l,m=p&&c||new Map;d.forEach((g,b)=>{let v=b,y=g;if("offset"!==b)switch(v=t.normalizePropertyName(v,o),y){case rR:y=r.get(b);break;case Kc: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 wge(i){return new pe(3502,!1)}();return a}function MO(i,t,e,n){switch(t){case"start":i.onStart(()=>n(e&&CO(e,"start",i)));break;case"done":i.onDone(()=>n(e&&CO(e,"done",i)));break;case"destroy":i.onDestroy(()=>n(e&&CO(e,"destroy",i)))}}function CO(i,t,e){const s=SO(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 SO(i,t,e,n,r="",s=0,o){return{element:i,triggerName:t,fromState:e,toState:n,phaseName:r,totalTime:s,disabled:!!o}}function oa(i,t,e){let n=i.get(t);return n||i.set(t,n=e),n}function S$(i){const t=i.indexOf(":");return[i.substring(1,t),i.slice(t+1)]}let EO=(i,t)=>!1,E$=(i,t,e)=>[],A$=null;function AO(i){const t=i.parentNode||i.host;return t===A$?null:t}(wO()||typeof Element<"u")&&(Oge()?(A$=(()=>document.documentElement)(),EO=(i,t)=>{for(;t;){if(t===i)return!0;t=AO(t)}return!1}):EO=(i,t)=>i.contains(t),E$=(i,t,e)=>{if(e)return Array.from(i.querySelectorAll(t));const n=i.querySelector(t);return n?[n]:[]});let Tf=null,D$=!1;const T$=EO,I$=E$;let R$=(()=>{class i{validateStyleProperty(e){return function Lge(i){Tf||(Tf=function Nge(){return typeof document<"u"?document.body:null}()||{},D$=!!Tf.style&&"WebkitAppearance"in Tf.style);let t=!0;return Tf.style&&!function Fge(i){return"ebkit"==i.substring(1,6)}(i)&&(t=i in Tf.style,!t&&D$&&(t="Webkit"+i.charAt(0).toUpperCase()+i.slice(1)in Tf.style)),t}(e)}matchesElement(e,n){return!1}containsElement(e,n){return T$(e,n)}getParentElement(e){return AO(e)}query(e,n,r){return I$(e,n,r)}computeStyle(e,n,r){return r||""}animate(e,n,r,s,o,a=[],l){return new tb(r,s)}}return i.\u0275fac=function(e){return new(e||i)},i.\u0275prov=ke({token:i,factory:i.\u0275fac}),i})(),DO=(()=>{class i{}return i.NOOP=new R$,i})();const Bge=1e3,TO="ng-enter",iE="ng-leave",rE="ng-trigger",sE=".ng-trigger",P$="ng-animating",IO=".ng-animating";function fd(i){if("number"==typeof i)return i;const t=i.match(/^(-?[\.\d]+)(m?s)/);return!t||t.length<2?0:RO(parseFloat(t[1]),t[2])}function RO(i,t){return"s"===t?i*Bge:i}function oE(i,t,e){return i.hasOwnProperty("duration")?i:function Vge(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(M$()),{duration:0,delay:0,easing:""};r=RO(parseFloat(a[1]),a[2]);const l=a[3];null!=l&&(s=RO(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 ege(){return new pe(3100,!1)}()),a=!0),s<0&&(t.push(function tge(){return new pe(3101,!1)}()),a=!0),a&&t.splice(l,0,M$())}return{duration:r,delay:s,easing:o}}(i,t,e)}function n0(i,t={}){return Object.keys(i).forEach(e=>{t[e]=i[e]}),t}function O$(i){const t=new Map;return Object.keys(i).forEach(e=>{t.set(e,i[e])}),t}function Bu(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 L$(i,t,e){return e?t+":"+e+";":""}function N$(i){let t="";for(let e=0;e{const s=PO(r);e&&!e.has(r)&&e.set(r,i.style[s]),i.style[s]=n}),wO()&&N$(i))}function If(i,t){i.style&&(t.forEach((e,n)=>{const r=PO(n);i.style[r]=""}),wO()&&N$(i))}function r0(i){return Array.isArray(i)?1==i.length?i[0]:iV(i):i}const kO=new RegExp("{{\\s*(.+?)\\s*}}","g");function B$(i){let t=[];if("string"==typeof i){let e;for(;e=kO.exec(i);)t.push(e[1]);kO.lastIndex=0}return t}function s0(i,t,e){const n=i.toString(),r=n.replace(kO,(s,o)=>{let a=t[o];return null==a&&(e.push(function ige(i){return new pe(3003,!1)}()),a=""),a.toString()});return r==n?i:r}function aE(i){const t=[];let e=i.next();for(;!e.done;)t.push(e.value),e=i.next();return t}const Gge=/-+([a-z0-9])/g;function PO(i){return i.replace(Gge,(...t)=>t[1].toUpperCase())}function $ge(i){return i.replace(/([a-z])([A-Z])/g,"$1-$2").toLowerCase()}function aa(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 rge(i){return new pe(3004,!1)}()}}function U$(i,t){return window.getComputedStyle(i)[t]}const dE="*";function Kge(i,t){const e=[];return"string"==typeof i?i.split(/\s*,\s*/).forEach(n=>function Zge(i,t,e){if(":"==i[0]){const l=function Qge(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 _ge(i){return new pe(3015,!1)}()),t;const r=n[1],s=n[2],o=n[3];t.push(V$(r,o));"<"==s[0]&&!(r==dE&&o==dE)&&t.push(V$(o,r))}(n,e,t)):e.push(i),e}const uE=new Set(["true","1"]),hE=new Set(["false","0"]);function V$(i,t){const e=uE.has(i)||hE.has(i),n=uE.has(t)||hE.has(t);return(r,s)=>{let o=i==dE||i==r,a=t==dE||t==s;return!o&&e&&"boolean"==typeof r&&(o=r?uE.has(i):hE.has(i)),!a&&n&&"boolean"==typeof s&&(a=s?uE.has(t):hE.has(t)),o&&a}}const Jge=new RegExp("s*:selfs*,?","g");function OO(i,t,e,n){return new e_e(i).build(t,e,n)}class e_e{constructor(t){this._driver=t}build(t,e,n){const r=new i_e(e);return this._resetContextStyleTimingState(r),aa(this,r0(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 oge(){return new pe(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(d=>{l.name=d,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 age(){return new pe(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=>{B$(l).forEach(c=>{o.hasOwnProperty(c)||s.add(c)})})}),s.size&&(aE(s.values()),e.errors.push(function lge(i,t){return new pe(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=aa(this,r0(t.animation),e);return{type:1,matchers:Kge(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=>aa(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=aa(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 s_e(i,t){if(i.hasOwnProperty("duration"))return i;if("number"==typeof i)return FO(oE(i,t).duration,0,"");const e=i;if(e.split(/\s+/).some(s=>"{"==s.charAt(0)&&"{"==s.charAt(1))){const s=FO(0,0,"");return s.dynamic=!0,s.strValue=e,s}const r=oE(e,t);return FO(r.duration,r.delay,r.easing)}(t.timings,e.errors);e.currentAnimateTimings=n;let r,s=t.styles?t.styles:si({});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=si(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===Kc?n.push(a):e.errors.push(new pe(3002,!1)):n.push(O$(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),d=c.get(l);let h=!0;d&&(s!=r&&s>=d.startTime&&r<=d.endTime&&(e.errors.push(function dge(i,t,e,n,r){return new pe(3010,!1)}()),h=!1),s=d.startTime),h&&c.set(l,{startTime:s,endTime:r}),e.options&&function Hge(i,t,e){const n=t.params||{},r=B$(i);r.length&&r.forEach(s=>{n.hasOwnProperty(s)||e.push(function nge(i){return new pe(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 uge(){return new pe(3011,!1)}()),n;let s=0;const o=[];let a=!1,l=!1,c=0;const d=t.steps.map(y=>{const M=this._makeStyleAst(y,e);let x=null!=M.offset?M.offset:function r_e(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:aa(this,r0(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 t_e(i){const t=!!i.split(/\s*,\s*/).find(e=>":self"==e);return t&&(i=i.replace(Jge,"")),i=i.replace(/@\*/g,sE).replace(/@\w+/g,e=>sE+"-"+e.slice(1)).replace(/:animating/g,IO),[i,t]}(t.selector);e.currentQuerySelector=n.length?n+" "+s:s,oa(e.collectedStyles,e.currentQuerySelector,new Map);const a=aa(this,r0(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 mge(){return new pe(3013,!1)}());const n="full"===t.timings?{duration:0,delay:0,easing:"full"}:oE(t.timings,e.errors,!0);return{type:12,animation:aa(this,r0(t.animation),e),timings:n,options:null}}}class i_e{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=n0(i)).params&&(i.params=function n_e(i){return i?n0(i):null}(i.params)):i={},i}function FO(i,t,e){return{duration:i,delay:t,easing:e}}function LO(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 fE{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 l_e=new RegExp(":enter","g"),d_e=new RegExp(":leave","g");function NO(i,t,e,n,r,s=new Map,o=new Map,a,l,c=[]){return(new u_e).buildKeyframes(i,t,e,n,r,s,o,a,l,c)}class u_e{buildKeyframes(t,e,n,r,s,o,a,l,c,d=[]){c=c||new fE;const h=new BO(t,e,c,r,s,d,[]);h.options=l;const p=l.delay?fd(l.delay):0;h.currentTimeline.delayNextStep(p),h.currentTimeline.setStyles([o],null,h.errors,l),aa(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()):[LO(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:fd(s0(s,r?.params??{},e.errors));n.delayNextStep(o)}}}_visitSubInstructions(t,e,n){let s=e.currentTimeline.currentTime;const o=null!=n.duration?fd(n.duration):null,a=null!=n.delay?fd(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),aa(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=pE);const o=fd(s.delay);r.delayNextStep(o)}t.steps.length&&(t.steps.forEach(o=>aa(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?fd(t.options.delay):0;t.steps.forEach(o=>{const a=e.createSubContext(t.options);s&&a.delayNextStep(s),aa(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 oE(e.params?s0(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?fd(r.delay):0;s&&(6===e.previousNode.type||0==n&&e.currentTimeline.hasCurrentStyleProperties())&&(e.currentTimeline.snapshotCurrentStyles(),e.previousNode=pE);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,d)=>{e.currentQueryIndex=d;const h=e.createSubContext(t.options,c);s&&h.delayNextStep(s),c===e.element&&(l=h.currentTimeline),aa(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 d=e.currentTimeline;l&&d.delayNextStep(l);const h=d.currentTime;aa(this,t.animation,e),e.previousNode=t,n.currentStaggerTime=r.currentTime-h+(r.startTime-n.currentTimeline.startTime)}}const pE={};class BO{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=pE,this.subContextCount=0,this.options={},this.currentQueryIndex=0,this.currentQueryTotal=0,this.currentStaggerTime=0,this.currentTimeline=l||new mE(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=fd(n.duration)),null!=n.delay&&(r.delay=fd(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]=s0(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 BO(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=pE,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 h_e(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(l_e,"."+this._enterClassName)).replace(d_e,"."+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 gge(i){return new pe(3014,!1)}()),a}}class mE{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 mE(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||Kc),this._currentKeyframe.set(e,Kc);this._currentEmptyStepKeyframe=this._currentKeyframe}setStyles(t,e,n,r){e&&this._previousKeyframe.set("easing",e);const s=r&&r.params||{},o=function f_e(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,Kc)}else Bu(r,e)}),e}(t,this._globalTimelineStyles);for(let[a,l]of o){const c=s0(l,s,n);this._pendingStyles.set(a,c),this._localTimelineStyles.has(a)||this._backFill.set(a,this._globalTimelineStyles.get(a)??Kc),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=Bu(a,new Map,this._backFill);c.forEach((d,h)=>{d===rR?t.add(h):d===Kc&&e.add(h)}),n||c.set("offset",l/this.duration),r.push(c)});const s=t.size?aE(t.values()):[],o=e.size?aE(e.values()):[];if(n){const a=r[0],l=new Map(a);a.set("offset",0),l.set("offset",1),r=[a,l]}return LO(this.element,r,s,o,this.duration,this.startTime,this.easing,!1)}}class h_e extends mE{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=Bu(t[0]);l.set("offset",0),s.push(l);const c=Bu(t[0]);c.set("offset",G$(a)),s.push(c);const d=t.length-1;for(let h=1;h<=d;h++){let p=Bu(t[h]);const m=p.get("offset");p.set("offset",G$((e+m*n)/o)),s.push(p)}n=o,e=0,r="",t=s}return LO(this.element,t,this.preStyleProps,this.postStyleProps,n,e,r,!0)}}function G$(i,t=3){const e=Math.pow(10,t-1);return Math.round(i*e)/e}class UO{}const p_e=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 m_e extends UO{normalizePropertyName(t,e){return PO(t)}normalizeStyleValue(t,e,n,r){let s="";const o=n.toString().trim();if(p_e.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 sge(i,t){return new pe(3005,!1)}())}return o+s}}function $$(i,t,e,n,r,s,o,a,l,c,d,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:d,totalTime:h,errors:p}}const VO={};class W${constructor(t,e,n){this._triggerName=t,this.ast=e,this._stateStyles=n}match(t,e,n,r){return function g_e(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,d){const h=[],p=this.ast.options&&this.ast.options.params||VO,g=this.buildStyles(n,a&&a.params||VO,h),b=l&&l.params||VO,v=this.buildStyles(r,b,h),y=new Set,M=new Map,x=new Map,C="void"===r,F={params:__e(b,p),delay:this.ast.options?.delay},D=d?[]:NO(t,e,this.ast.animation,s,o,g,v,F,c,h);let k=0;if(D.forEach(T=>{k=Math.max(T.duration+T.delay,k)}),h.length)return $$(e,this._triggerName,n,r,C,g,v,[],[],M,x,k,h);D.forEach(T=>{const A=T.element,$=oa(M,A,new Set);T.preStyleProps.forEach(ne=>$.add(ne));const ie=oa(x,A,new Set);T.postStyleProps.forEach(ne=>ie.add(ne)),A!==e&&y.add(A)});const B=aE(y.values());return $$(e,this._triggerName,n,r,C,g,v,D,B,M,x,k)}}function __e(i,t){const e=n0(t);for(const n in i)i.hasOwnProperty(n)&&null!=i[n]&&(e[n]=i[n]);return e}class v_e{constructor(t,e,n){this.styles=t,this.defaultParams=e,this.normalizer=n}buildStyles(t,e){const n=new Map,r=n0(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=s0(o,r,e));const l=this.normalizer.normalizePropertyName(a,e);o=this.normalizer.normalizeStyleValue(a,l,o,e),n.set(a,o)})}),n}}class b_e{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 v_e(r.style,r.options&&r.options.params||{},n))}),j$(this.states,"true","1"),j$(this.states,"false","0"),e.transitions.forEach(r=>{this.transitionFactories.push(new W$(t,r,this.states))}),this.fallbackTransition=function x_e(i,t,e){return new W$(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 j$(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 w_e=new fE;class M_e{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=OO(this._driver,e,n,r);if(n.length)throw function Mge(i){return new pe(3503,!1)}();this._animations.set(t,s)}_buildPlayer(t,e,n){const r=t.element,s=C$(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=NO(this._driver,e,s,TO,iE,new Map,new Map,n,w_e,r),o.forEach(d=>{const h=oa(a,d.element,new Map);d.postStyleProps.forEach(p=>h.set(p,null))})):(r.push(function Cge(){return new pe(3300,!1)}()),o=[]),r.length)throw function Sge(i){return new pe(3504,!1)}();a.forEach((d,h)=>{d.forEach((p,m)=>{d.set(m,this._driver.computeStyle(h,m,Kc))})});const c=Nu(o.map(d=>{const h=a.get(d.element);return this._buildPlayer(d,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 Ege(i){return new pe(3301,!1)}();return e}listen(t,e,n,r){const s=SO(e,"","","");return MO(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 Y$="ng-animate-queued",zO="ng-animate-disabled",D_e=[],q$={namespaceId:"",setForRemoval:!1,setForMove:!1,hasAnimation:!1,removedBeforeQueried:!1},T_e={namespaceId:"",setForMove:!1,setForRemoval:!1,hasAnimation:!1,removedBeforeQueried:!0},Ua="__ng_removed";class HO{get params(){return this.options.params}constructor(t,e=""){this.namespaceId=e;const n=t&&t.hasOwnProperty("value");if(this.value=function P_e(i){return i??null}(n?t.value:t),n){const s=n0(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 o0="void",GO=new HO(o0);class I_e{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,Va(e,this._hostClassName)}listen(t,e,n,r){if(!this._triggers.has(e))throw function Age(i,t){return new pe(3302,!1)}();if(null==n||0==n.length)throw function Dge(i){return new pe(3303,!1)}();if(!function O_e(i){return"start"==i||"done"==i}(n))throw function Tge(i,t){return new pe(3400,!1)}();const s=oa(this._elementListeners,t,[]),o={name:e,phase:n,callback:r};s.push(o);const a=oa(this._engine.statesByElement,t,new Map);return a.has(e)||(Va(t,rE),Va(t,rE+"-"+e),a.set(e,GO)),()=>{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 Ige(i){return new pe(3401,!1)}();return e}trigger(t,e,n,r=!0){const s=this._getTrigger(e),o=new $O(this.id,e,t);let a=this._engine.statesByElement.get(t);a||(Va(t,rE),Va(t,rE+"-"+e),this._engine.statesByElement.set(t,a=new Map));let l=a.get(e);const c=new HO(n,this.id);if(!(n&&n.hasOwnProperty("value"))&&l&&c.absorbOptions(l.options),a.set(e,c),l||(l=GO),c.value!==o0&&l.value===c.value){if(!function N_e(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),fc(t,y)})}return}const p=oa(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||(Va(t,Y$),o.onStart(()=>{Yg(t,Y$)})),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,sE,!0);n.forEach(r=>{if(r[Ua])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 d=this.trigger(t,c,o0,r);d&&a.push(d)}}),a.length)return this._engine.markElementAsRemoved(this.id,t,!0,e,o),n&&Nu(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)||GO,d=new HO(o0),h=new $O(this.id,o,t);this._engine.totalQueuedPlayers++,this._queue.push({element:t,triggerName:o,transition:l,fromState:c,toState:d,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[Ua];(!s||s===q$)&&(n.afterFlush(()=>this.clearElementCache(t)),n.destroyInnerAnimations(t),n._onRemovalComplete(t,e))}}insertNode(t,e){Va(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=SO(s,n.triggerName,n.fromState.value,n.toState.value);l._data=t,MO(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 R_e{_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 I_e(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(gE(e)){const s=this._fetchNamespace(t);if(s)return s.trigger(e,n,r),!0}return!1}insertNode(t,e,n,r){if(!gE(e))return;const s=e[Ua];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),Va(t,zO)):this.disabledNodes.has(t)&&(this.disabledNodes.delete(t),Yg(t,zO))}removeNode(t,e,n,r){if(gE(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[Ua]={namespaceId:t,setForRemoval:r,hasAnimation:n,removedBeforeQueried:!1,previousTriggersValues:s}}listen(t,e,n,r,s){return gE(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,sE,!0);e.forEach(n=>this.destroyActiveAnimationsForElement(n)),0!=this.playersByQueriedElement.size&&(e=this.driver.query(t,IO,!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 Nu(this.players).onDone(()=>t());t()})}processLeaveNode(t){const e=t[Ua];if(e&&e.setForRemoval){if(t[Ua]=q$,e.namespaceId){this.destroyInnerAnimations(t);const n=this._fetchNamespace(e.namespaceId);n&&n.clearElementCache(t)}this._onRemovalComplete(t,e.setForRemoval)}t.classList?.contains(zO)&&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?Nu(e).onDone(()=>{n.forEach(r=>r())}):n.forEach(r=>r())}}reportError(t){throw function Rge(i){return new pe(3402,!1)}()}_flushAnimations(t,e){const n=new fE,r=[],s=new Map,o=[],a=new Map,l=new Map,c=new Map,d=new Set;this.disabledNodes.forEach(q=>{d.add(q);const re=this.driver.query(q,".ng-animate-queued",!0);for(let J=0;J{const J=TO+b++;g.set(re,J),q.forEach(we=>Va(we,J))});const v=[],y=new Set,M=new Set;for(let q=0;qy.add(we)):M.add(re))}const x=new Map,C=Z$(p,Array.from(y));C.forEach((q,re)=>{const J=iE+b++;x.set(re,J),q.forEach(we=>Va(we,J))}),t.push(()=>{m.forEach((q,re)=>{const J=g.get(re);q.forEach(we=>Yg(we,J))}),C.forEach((q,re)=>{const J=x.get(re);q.forEach(we=>Yg(we,J))}),v.forEach(q=>{this.processLeaveNode(q)})});const F=[],D=[];for(let q=this._namespaceList.length-1;q>=0;q--)this._namespaceList[q].drainQueuedTransitions(e).forEach(J=>{const we=J.player,Be=J.element;if(F.push(we),this.collectedEnterElements.length){const Fe=Be[Ua];if(Fe&&Fe.setForMove){if(Fe.previousTriggersValues&&Fe.previousTriggersValues.has(J.triggerName)){const bt=Fe.previousTriggersValues.get(J.triggerName),St=this.statesByElement.get(J.element);if(St&&St.has(J.triggerName)){const Mt=St.get(J.triggerName);Mt.value=bt,St.set(J.triggerName,Mt)}}return void we.destroy()}}const Ye=!h||!this.driver.containsElement(h,Be),It=x.get(Be),en=g.get(Be),ae=this._buildInstruction(J,n,en,It,Ye);if(ae.errors&&ae.errors.length)return void D.push(ae);if(Ye)return we.onStart(()=>If(Be,ae.fromStyles)),we.onDestroy(()=>fc(Be,ae.toStyles)),void r.push(we);if(J.isFallbackTransition)return we.onStart(()=>If(Be,ae.fromStyles)),we.onDestroy(()=>fc(Be,ae.toStyles)),void r.push(we);const Oe=[];ae.timelines.forEach(Fe=>{Fe.stretchStartingKeyframe=!0,this.disabledNodes.has(Fe.element)||Oe.push(Fe)}),ae.timelines=Oe,n.append(Be,ae.timelines),o.push({instruction:ae,player:we,element:Be}),ae.queriedElements.forEach(Fe=>oa(a,Fe,[]).push(we)),ae.preStyleProps.forEach((Fe,bt)=>{if(Fe.size){let St=l.get(bt);St||l.set(bt,St=new Set),Fe.forEach((Mt,Sn)=>St.add(Sn))}}),ae.postStyleProps.forEach((Fe,bt)=>{let St=c.get(bt);St||c.set(bt,St=new Set),Fe.forEach((Mt,Sn)=>St.add(Sn))})});if(D.length){const q=[];D.forEach(re=>{q.push(function kge(i,t){return new pe(3505,!1)}())}),F.forEach(re=>re.destroy()),this.reportError(q)}const k=new Map,B=new Map;o.forEach(q=>{const re=q.element;n.has(re)&&(B.set(re,re),this._beforeAnimationBuild(q.player.namespaceId,q.instruction,k))}),r.forEach(q=>{const re=q.element;this._getPreviousPlayers(re,!1,q.namespaceId,q.triggerName,null).forEach(we=>{oa(k,re,[]).push(we),we.destroy()})});const T=v.filter(q=>J$(q,l,c)),A=new Map;K$(A,this.driver,M,c,Kc).forEach(q=>{J$(q,l,c)&&T.push(q)});const ie=new Map;m.forEach((q,re)=>{K$(ie,this.driver,new Set(q),l,rR)}),T.forEach(q=>{const re=A.get(q),J=ie.get(q);A.set(q,new Map([...Array.from(re?.entries()??[]),...Array.from(J?.entries()??[])]))});const ne=[],se=[],ge={};o.forEach(q=>{const{element:re,player:J,instruction:we}=q;if(n.has(re)){if(d.has(re))return J.onDestroy(()=>fc(re,we.toStyles)),J.disabled=!0,J.overrideTotalTime(we.totalTime),void r.push(J);let Be=ge;if(B.size>1){let It=re;const en=[];for(;It=It.parentNode;){const ae=B.get(It);if(ae){Be=ae;break}en.push(It)}en.forEach(ae=>B.set(ae,Be))}const Ye=this._buildAnimation(J.namespaceId,we,k,s,ie,A);if(J.setRealPlayer(Ye),Be===ge)ne.push(J);else{const It=this.playersByElement.get(Be);It&&It.length&&(J.parentPlayer=Nu(It)),r.push(J)}}else If(re,we.fromStyles),J.onDestroy(()=>fc(re,we.toStyles)),se.push(J),d.has(re)&&r.push(J)}),se.forEach(q=>{const re=s.get(q.element);if(re&&re.length){const J=Nu(re);q.setRealPlayer(J)}}),r.forEach(q=>{q.parentPlayer?q.syncPlayerEvents(q.parentPlayer):q.destroy()});for(let q=0;q!Ye.destroyed);Be.length?F_e(this,re,Be):this.processLeaveNode(re)}return v.length=0,ne.forEach(q=>{this.players.push(q),q.onDone(()=>{q.destroy();const re=this.players.indexOf(q);this.players.splice(re,1)}),q.play()}),ne}elementContainsData(t,e){let n=!1;const r=e[Ua];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==o0;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,d=c!==s,h=oa(n,c,[]);this._getPreviousPlayers(c,d,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=[],d=new Set,h=new Set,p=e.timelines.map(g=>{const b=g.element;d.add(b);const v=b[Ua];if(v&&v.removedBeforeQueried)return new tb(g.duration,g.delay);const y=b!==l,M=function L_e(i){const t=[];return Q$(i,t),t}((n.get(b)||D_e).map(k=>k.getRealPlayer())).filter(k=>!!k.element&&k.element===b),x=s.get(b),C=o.get(b),F=C$(0,this._normalizer,0,g.keyframes,x,C),D=this._buildPlayer(g,F,M);if(g.subTimeline&&r&&h.add(b),y){const k=new $O(t,a,b);k.setRealPlayer(D),c.push(k)}return D});c.forEach(g=>{oa(this.playersByQueriedElement,g.element,[]).push(g),g.onDone(()=>function k_e(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))}),d.forEach(g=>Va(g,P$));const m=Nu(p);return m.onDestroy(()=>{d.forEach(g=>Yg(g,P$)),fc(l,e.toStyles)}),h.forEach(g=>{oa(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 tb(t.duration,t.delay)}}class $O{constructor(t,e,n){this.namespaceId=t,this.triggerName=e,this.element=n,this._player=new tb,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=>MO(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){oa(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 gE(i){return i&&1===i.nodeType}function X$(i,t){const e=i.style.display;return i.style.display=t??"none",e}function K$(i,t,e,n,r){const s=[];e.forEach(l=>s.push(X$(l)));const o=[];n.forEach((l,c)=>{const d=new Map;l.forEach(h=>{const p=t.computeStyle(c,h,r);d.set(h,p),(!p||0==p.length)&&(c[Ua]=T_e,o.push(c))}),i.set(c,d)});let a=0;return e.forEach(l=>X$(l,s[a++])),o}function Z$(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 Va(i,t){i.classList?.add(t)}function Yg(i,t){i.classList?.remove(t)}function F_e(i,t,e){Nu(e).onDone(()=>i.processLeaveNode(t))}function Q$(i,t){for(let e=0;er.add(s)):t.set(i,n),e.delete(i),!0}class _E{constructor(t,e,n){this.bodyNode=t,this._driver=e,this._normalizer=n,this._triggerCache={},this.onRemovalComplete=(r,s)=>{},this._transitionEngine=new R_e(t,e,n),this._timelineEngine=new M_e(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=[],d=OO(this._driver,s,l,c);if(l.length)throw function xge(i,t){return new pe(3404,!1)}();a=function y_e(i,t,e){return new b_e(i,t,e)}(r,d,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]=S$(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]=S$(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 U_e=(()=>{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&&fc(this._element,this._startStyles,this._initialStyles),this._state=1)}finish(){this.start(),this._state<2&&(fc(this._element,this._initialStyles),this._endStyles&&(fc(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),fc(this._element,this._initialStyles),this._state=3)}}return i.initialStylesByElement=new WeakMap,i})();function WO(i){let t=null;return i.forEach((e,n)=>{(function V_e(i){return"display"===i||"position"===i})(n)&&(t=t||new Map,t.set(n,e))}),t}class e8{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:U$(this.element,r))}),this.currentSnapshot=t}triggerCallback(t){const e="start"===t?this._onStartFns:this._onDoneFns;e.forEach(n=>n()),e.length=0}}class z_e{validateStyleProperty(t){return!0}validateAnimatableStyleProperty(t){return!0}matchesElement(t,e){return!1}containsElement(t,e){return T$(t,e)}getParentElement(t){return AO(t)}query(t,e,n){return I$(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,d=o.filter(m=>m instanceof e8);(function Wge(i,t){return 0===i||0===t})(n,r)&&d.forEach(m=>{m.currentSnapshot.forEach((g,b)=>c.set(b,g))});let h=function zge(i){return i.length?i[0]instanceof Map?i:i.map(t=>O$(t)):[]}(e).map(m=>Bu(m));h=function jge(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,U$(i,a)))}}return t}(t,h,c);const p=function B_e(i,t){let e=null,n=null;return Array.isArray(t)&&t.length?(e=WO(t[0]),t.length>1&&(n=WO(t[t.length-1]))):t instanceof Map&&(e=WO(t)),e||n?new U_e(i,e,n):null}(t,h);return new e8(t,h,l,p)}}let H_e=(()=>{class i extends tV{constructor(e,n){super(),this._nextAnimationId=0,this._renderer=e.createRenderer(n.body,{id:"0",encapsulation:Ks.None,styles:[],data:{animation:[]}})}build(e){const n=this._nextAnimationId.toString();this._nextAnimationId++;const r=Array.isArray(e)?iV(e):e;return t8(this._renderer,null,n,"register",[r]),new G_e(n,this._renderer)}}return i.\u0275fac=function(e){return new(e||i)(ee(Gl),ee(jt))},i.\u0275prov=ke({token:i,factory:i.\u0275fac}),i})();class G_e extends LQ{constructor(t,e){super(),this._id=t,this._renderer=e}create(t,e){return new $_e(this._id,t,e||{},this._renderer)}}class $_e{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 t8(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 t8(i,t,e,n,r){return i.setProperty(t,`@@${e}:${n}`,r)}const n8="@.disabled";let W_e=(()=>{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 d=this._rendererCache.get(s);return d||(d=new i8("",s,this.engine,()=>this._rendererCache.delete(s)),this._rendererCache.set(s,d)),d}const o=n.id,a=n.id+"-"+this._currentId;this._currentId++,this.engine.register(a,e);const l=d=>{Array.isArray(d)?d.forEach(l):this.engine.registerTrigger(o,a,e,d.name,d)};return n.data.animation.forEach(l),new j_e(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)(ee(Gl),ee(_E),ee(pt))},i.\u0275prov=ke({token:i,factory:i.\u0275fac}),i})();class i8{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==n8?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 j_e extends i8{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==n8?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 Y_e(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 q_e(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 r8=[{provide:tV,useClass:H_e},{provide:UO,useFactory:function K_e(){return new m_e}},{provide:_E,useClass:(()=>{class i extends _E{constructor(e,n,r,s){super(e.body,n,r)}ngOnDestroy(){this.flush()}}return i.\u0275fac=function(e){return new(e||i)(ee(jt),ee(DO),ee(UO),ee(dm))},i.\u0275prov=ke({token:i,factory:i.\u0275fac}),i})()},{provide:Gl,useFactory:function Z_e(i,t,e){return new W_e(i,t,e)},deps:[aM,_E,pt]}],jO=[{provide:DO,useFactory:()=>new z_e},{provide:kr,useValue:"BrowserAnimations"},...r8],s8=[{provide:DO,useClass:R$},{provide:kr,useValue:"NoopAnimations"},...r8];let Q_e=(()=>{class i{static withConfig(e){return{ngModule:i,providers:e.disableAnimations?s8:jO}}}return i.\u0275fac=function(e){return new(e||i)},i.\u0275mod=nn({type:i}),i.\u0275inj=Kt({providers:jO,imports:[FB]}),i})();const o8=new me("CdkAccordion");let J_e=0,eve=(()=>{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=Zt.EMPTY,this.closed=new $e,this.opened=new $e,this.destroyed=new $e,this.expandedChange=new $e,this.id="cdk-accordion-child-"+J_e++,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)(E(o8,12),E(Zn),E(GR))},i.\u0275dir=ve({type:i,selectors:[["cdk-accordion-item"],["","cdkAccordionItem",""]],inputs:{expanded:"expanded",disabled:"disabled"},outputs:{closed:"closed",opened:"opened",destroyed:"destroyed",expandedChange:"expandedChange"},exportAs:["cdkAccordionItem"],features:[Dn([{provide:o8,useValue:void 0}])]}),i})(),tve=(()=>{class i{}return i.\u0275fac=function(e){return new(e||i)},i.\u0275mod=nn({type:i}),i.\u0275inj=Kt({}),i})();const nve=["body"];function ive(i,t){}const rve=[[["mat-expansion-panel-header"]],"*",[["mat-action-row"]]],sve=["mat-expansion-panel-header","*","mat-action-row"];function ove(i,t){1&i&&Pe(0,"span",2),2&i&&U("@indicatorRotate",he()._getExpandedState())}const ave=[[["mat-panel-title"]],[["mat-panel-description"]],"*"],lve=["mat-panel-title","mat-panel-description","*"],a8=new me("MAT_ACCORDION"),l8="225ms cubic-bezier(0.4,0.0,0.2,1)",c8={indicatorRotate:ka("indicatorRotate",[Os("collapsed, void",si({transform:"rotate(0deg)"})),Os("expanded",si({transform:"rotate(180deg)"})),Or("expanded <=> collapsed, void => collapsed",Yr(l8))]),bodyExpansion:ka("bodyExpansion",[Os("collapsed, void",si({height:"0px",visibility:"hidden"})),Os("expanded",si({height:"*",visibility:"visible"})),Or("expanded <=> collapsed, void => collapsed",Yr(l8))])},d8=new me("MAT_EXPANSION_PANEL");let cve=(()=>{class i{constructor(e,n){this._template=e,this._expansionPanel=n}}return i.\u0275fac=function(e){return new(e||i)(E(Co),E(d8,8))},i.\u0275dir=ve({type:i,selectors:[["ng-template","matExpansionPanelContent",""]]}),i})(),dve=0;const u8=new me("MAT_EXPANSION_PANEL_DEFAULT_OPTIONS");let h8=(()=>{class i extends eve{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 $e,this.afterCollapse=new $e,this._inputChanges=new Re,this._headerId="mat-expansion-panel-header-"+dve++,this._bodyAnimationDone=new Re,this.accordion=e,this._document=o,this._bodyAnimationDone.pipe(Ql((c,d)=>c.fromState===d.fromState&&c.toState===d.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(Do(null),gn(()=>this.expanded&&!this._portal),Oi(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)(E(a8,12),E(Zn),E(GR),E(jr),E(jt),E(kr,8),E(u8,8))},i.\u0275cmp=ot({type:i,selectors:[["mat-expansion-panel"]],contentQueries:function(e,n,r){if(1&e&&Wi(r,cve,5),2&e){let s;Et(s=At())&&(n._lazyContent=s.first)}},viewQuery:function(e,n){if(1&e&&Wn(nve,5),2&e){let r;Et(r=At())&&(n._body=r.first)}},hostAttrs:[1,"mat-expansion-panel"],hostVars:6,hostBindings:function(e,n){2&e&&un("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:[Dn([{provide:a8,useValue:void 0},{provide:d8,useExisting:i}]),lt,xi],ngContentSelectors:sve,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&&(or(rve),Wt(0),W(1,"div",0,1),Le("@bodyExpansion.done",function(s){return n._bodyAnimationDone.next(s)}),W(3,"div",2),Wt(4,1),fe(5,ive,0,0,"ng-template",3),j(),Wt(6,2),j()),2&e&&(G(1),U("@bodyExpansion",n._getExpandedState())("id",n.id),Dt("aria-labelledby",n._headerId),G(4),U("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:[c8.bodyExpansion]},changeDetection:0}),i})();class uve{}const hve=JI(uve);let fve=(()=>{class i extends hve{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=Zt.EMPTY;const c=e.accordion?e.accordion._stateChanges.pipe(gn(d=>!(!d.hideToggle&&!d.togglePosition))):mo;this.tabIndex=parseInt(l||"")||0,this._parentChangeSubscription=Cr(e.opened,e.closed,c,e._inputChanges.pipe(gn(d=>!!(d.hideToggle||d.disabled||d.togglePosition)))).subscribe(()=>this._changeDetectorRef.markForCheck()),e.closed.pipe(gn(()=>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:Zo(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)(E(h8,1),E(gt),E(Xc),E(Zn),E(u8,8),E(kr,8),xa("tabindex"))},i.\u0275cmp=ot({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&&Le("click",function(){return n._toggle()})("keydown",function(s){return n._keydown(s)}),2&e&&(Dt("id",n.panel._headerId)("tabindex",n.tabIndex)("aria-controls",n._getPanelId())("aria-expanded",n._isExpanded())("aria-disabled",n.panel.disabled),qo("height",n._getHeaderHeight()),un("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:[lt],ngContentSelectors:lve,decls:5,vars:3,consts:[[1,"mat-content"],["class","mat-expansion-indicator",4,"ngIf"],[1,"mat-expansion-indicator"]],template:function(e,n){1&e&&(or(ave),W(0,"span",0),Wt(1),Wt(2,1),Wt(3,2),j(),fe(4,ove,1,1,"span",1)),2&e&&(un("mat-content-hide-toggle",!n._showToggle()),G(4),U("ngIf",n._showToggle()))},dependencies:[vi],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:[c8.indicatorRotate]},changeDetection:0}),i})(),pve=(()=>{class i{}return i.\u0275fac=function(e){return new(e||i)},i.\u0275dir=ve({type:i,selectors:[["mat-panel-description"]],hostAttrs:[1,"mat-expansion-panel-header-description"]}),i})(),mve=(()=>{class i{}return i.\u0275fac=function(e){return new(e||i)},i.\u0275dir=ve({type:i,selectors:[["mat-panel-title"]],hostAttrs:[1,"mat-expansion-panel-header-title"]}),i})(),gve=(()=>{class i{}return i.\u0275fac=function(e){return new(e||i)},i.\u0275mod=nn({type:i}),i.\u0275inj=Kt({imports:[Ao,Qn,tve,Nh]}),i})();function _ve(i,t){if(1&i&&(W(0,"mat-option",19),ze(1),j()),2&i){const e=t.$implicit;U("value",e),G(1),Qi(" ",e," ")}}function vve(i,t){if(1&i){const e=ai();W(0,"mat-form-field",16)(1,"mat-select",17),Le("selectionChange",function(r){return rn(e),Ut(he(2)._changePageSize(r.value))}),fe(2,_ve,2,2,"mat-option",18),j()()}if(2&i){const e=he(2);U("appearance",e._formFieldAppearance)("color",e.color),G(1),U("value",e.pageSize)("disabled",e.disabled)("aria-labelledby",e._pageSizeLabelId)("panelClass",e.selectConfig.panelClass||"")("disableOptionCentering",e.selectConfig.disableOptionCentering),G(1),U("ngForOf",e._displayedPageSizeOptions)}}function yve(i,t){if(1&i&&(W(0,"div",20),ze(1),j()),2&i){const e=he(2);G(1),_i(e.pageSize)}}function bve(i,t){if(1&i&&(W(0,"div",12)(1,"div",13),ze(2),j(),fe(3,vve,3,8,"mat-form-field",14),fe(4,yve,2,1,"div",15),j()),2&i){const e=he();G(1),B1("id",e._pageSizeLabelId),G(1),Qi(" ",e._intl.itemsPerPageLabel," "),G(1),U("ngIf",e._displayedPageSizeOptions.length>1),G(1),U("ngIf",e._displayedPageSizeOptions.length<=1)}}function xve(i,t){if(1&i){const e=ai();W(0,"button",21),Le("click",function(){return rn(e),Ut(he().firstPage())}),ki(),W(1,"svg",7),Pe(2,"path",22),j()()}if(2&i){const e=he();U("matTooltip",e._intl.firstPageLabel)("matTooltipDisabled",e._previousButtonsDisabled())("matTooltipPosition","above")("disabled",e._previousButtonsDisabled()),Dt("aria-label",e._intl.firstPageLabel)}}function wve(i,t){if(1&i){const e=ai();ki(),va(),W(0,"button",23),Le("click",function(){return rn(e),Ut(he().lastPage())}),ki(),W(1,"svg",7),Pe(2,"path",24),j()()}if(2&i){const e=he();U("matTooltip",e._intl.lastPageLabel)("matTooltipDisabled",e._nextButtonsDisabled())("matTooltipPosition","above")("disabled",e._nextButtonsDisabled()),Dt("aria-label",e._intl.lastPageLabel)}}let yE=(()=>{class i{constructor(){this.changes=new Re,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=ke({token:i,factory:i.\u0275fac,providedIn:"root"}),i})();const Cve={provide:yE,deps:[[new Ss,new Ma,yE]],useFactory:function Mve(i){return i||new yE}},Eve=new me("MAT_PAGINATOR_DEFAULT_OPTIONS"),Ave=jM(CQ(class{}));let Dve=(()=>{class i extends Ave{get pageIndex(){return this._pageIndex}set pageIndex(e){this._pageIndex=Math.max(Ps(e),0),this._changeDetectorRef.markForCheck()}get length(){return this._length}set length(e){this._length=Ps(e),this._changeDetectorRef.markForCheck()}get pageSize(){return this._pageSize}set pageSize(e){this._pageSize=Math.max(Ps(e),0),this._updateDisplayedPageSizeOptions()}get pageSizeOptions(){return this._pageSizeOptions}set pageSizeOptions(e){this._pageSizeOptions=(e||[]).map(n=>Ps(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 $e,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){wo()},i.\u0275dir=ve({type:i,inputs:{color:"color",pageIndex:"pageIndex",length:"length",pageSize:"pageSize",pageSizeOptions:"pageSizeOptions",hidePageSize:"hidePageSize",showFirstLastButtons:"showFirstLastButtons",selectConfig:"selectConfig"},outputs:{page:"page"},features:[lt]}),i})(),Tve=0,Ive=(()=>{class i extends Dve{constructor(e,n,r){super(e,n,r),this._pageSizeLabelId="mat-paginator-page-size-label-"+Tve++,this._formFieldAppearance=r?.formFieldAppearance||"outline"}}return i.\u0275fac=function(e){return new(e||i)(E(yE),E(Zn),E(Eve,8))},i.\u0275cmp=ot({type:i,selectors:[["mat-paginator"]],hostAttrs:["role","group",1,"mat-mdc-paginator"],inputs:{disabled:"disabled"},exportAs:["matPaginator"],features:[lt],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&&(W(0,"div",0)(1,"div",1),fe(2,bve,5,4,"div",2),W(3,"div",3)(4,"div",4),ze(5),j(),fe(6,xve,3,5,"button",5),W(7,"button",6),Le("click",function(){return n.previousPage()}),ki(),W(8,"svg",7),Pe(9,"path",8),j()(),va(),W(10,"button",9),Le("click",function(){return n.nextPage()}),ki(),W(11,"svg",7),Pe(12,"path",10),j()(),fe(13,wve,3,5,"button",11),j()()()),2&e&&(G(2),U("ngIf",!n.hidePageSize),G(3),Qi(" ",n._intl.getRangeLabel(n.pageIndex,n.pageSize,n.length)," "),G(1),U("ngIf",n.showFirstLastButtons),G(1),U("matTooltip",n._intl.previousPageLabel)("matTooltipDisabled",n._previousButtonsDisabled())("matTooltipPosition","above")("disabled",n._previousButtonsDisabled()),Dt("aria-label",n._intl.previousPageLabel),G(3),U("matTooltip",n._intl.nextPageLabel)("matTooltipDisabled",n._nextButtonsDisabled())("matTooltipPosition","above")("disabled",n._nextButtonsDisabled()),Dt("aria-label",n._intl.nextPageLabel),G(3),U("ngIf",n.showFirstLastButtons))},dependencies:[Eo,vi,XM,vl,fb,Nm,Fs],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})(),Rve=(()=>{class i{}return i.\u0275fac=function(e){return new(e||i)},i.\u0275mod=nn({type:i}),i.\u0275inj=Kt({providers:[Cve],imports:[Ao,KM,VH,FV]}),i})(),kve=(()=>{class i{}return i.\u0275fac=function(e){return new(e||i)},i.\u0275mod=nn({type:i,bootstrap:[Jme]}),i.\u0275inj=Kt({providers:[Jl,NH,{provide:PH,useValue:Vie}],imports:[FB,wK,Q_e,eH,SJ,gC,pH,gve,DV,RV,FV,KM,ez,Rve,sse,_H,VH,_V,bpe,xme,tH,tR,Yie]}),i})();th(ec,[Eo,vi,Fs,t0,nE],[pl]),th(zR,[hm,Eo,vi,xy,nc,Zc,vl,h8,fve,mve,pve,Fs,Ive,fb,Nm,t0],[]),th(xC,[Eo,vi,MC,wC,gH,t0],[]),th(_$,[Eo,vi,Ro,Fs,fb,Nm,t0,nE],[pl]),L7().bootstrapModule(kve).catch(i=>console.error(i))},489:function(Bo,$s,ps){var cn;Bo=ps.nmd(Bo),function(){var V,Kr=200,Un="Expected a function",Ha="__lodash_hash_undefined__",Ci="__lodash_placeholder__",Si=1,ms=2,js=4,Ys=1,Uo=2,On=1,ur=2,mc=4,da=8,Dl=16,ua=32,Tl=64,Ga=128,ha=256,md=512,ME=800,Kg=16,In=1/0,Wa=9007199254740991,SE=17976931348623157e292,Pf=NaN,fa=4294967295,Re=fa-1,l0=fa>>>1,c0=[["ary",Ga],["bind",On],["bindKey",ur],["curry",da],["curryRight",Dl],["flip",md],["partial",ua],["partialRight",Tl],["rearg",ha]],ti="[object Arguments]",Yn="[object Array]",EE="[object AsyncFunction]",et="[object Boolean]",gc="[object Date]",AE="[object DOMException]",gd="[object Error]",Of="[object Function]",d0="[object GeneratorFunction]",Vo="[object Map]",Vu="[object Number]",DE="[object Null]",ja="[object Object]",u0="[object Promise]",TE="[object Proxy]",_d="[object RegExp]",zo="[object Set]",_c="[object String]",Ff="[object Symbol]",Zg="[object Undefined]",vd="[object WeakMap]",zu="[object ArrayBuffer]",yd="[object DataView]",pa="[object Float32Array]",Lf="[object Float64Array]",Qg="[object Int8Array]",Nf="[object Int16Array]",Jg="[object Int32Array]",e_="[object Uint8Array]",Hu="[object Uint8ClampedArray]",t_="[object Uint16Array]",n_="[object Uint32Array]",RE=/\b__p \+= '';/g,kE=/\b(__p \+=) '' \+/g,PE=/(__e\(.*?\)|\b__t\)) \+\n'';/g,h0=/&(?:amp|lt|gt|quot|#39);/g,f0=/[&<>"']/g,OE=RegExp(h0.source),FE=RegExp(f0.source),ZO=/<%-([\s\S]+?)%>/g,i_=/<%([\s\S]+?)%>/g,r_=/<%=([\s\S]+?)%>/g,p0=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,m0=/^\w*$/,g0=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,s_=/[\\^$.*+?()[\]{}|]/g,_0=RegExp(s_.source),Bf=/^\s+/,v0=/\s/,y0=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,Mr=/\{\n\/\* \[wrapped with (.+)\] \*/,LE=/,? & /,NE=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,BE=/[()=,{}\[\]\/\s]/,UE=/\\(\\)?/g,b0=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,x0=/\w*$/,VE=/^[-+]0x[0-9a-f]+$/i,Ya=/^0b[01]+$/i,zE=/^\[object .+?Constructor\]$/,rr=/^0o[0-7]+$/i,bd=/^(?:0|[1-9]\d*)$/,mo=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,o_=/($^)/,HE=/['\n\r\u2028\u2029\\]/g,Gu="\\ud800-\\udfff",M0="\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff",l_="\\u2700-\\u27bf",c_="a-z\\xdf-\\xf6\\xf8-\\xff",d_="A-Z\\xc0-\\xd6\\xd8-\\xde",C0="\\ufe0e\\ufe0f",S0="\\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",Cr="["+Gu+"]",Uf="["+S0+"]",xd="["+M0+"]",ci="\\d+",u_="["+l_+"]",pi="["+c_+"]",Vf="[^"+Gu+S0+ci+l_+c_+d_+"]",h_="\\ud83c[\\udffb-\\udfff]",Pt="[^"+Gu+"]",Wu="(?:\\ud83c[\\udde6-\\uddff]){2}",ju="[\\ud800-\\udbff][\\udc00-\\udfff]",Yu="["+d_+"]",pe="(?:"+pi+"|"+Vf+")",zf="(?:"+Yu+"|"+Vf+")",Qt="(?:['\u2019](?:d|ll|m|re|s|t|ve))?",qn="(?:['\u2019](?:D|LL|M|RE|S|T|VE))?",E0="(?:"+xd+"|"+h_+")?",YE="["+C0+"]?",XE=YE+E0+"(?:\\u200d(?:"+[Pt,Wu,ju].join("|")+")"+YE+E0+")*",KE="(?:"+[u_,Wu,ju].join("|")+")"+XE,QO="(?:"+[Pt+xd+"?",xd,Wu,ju,Cr].join("|")+")",Il=RegExp("['\u2019]","g"),JO=RegExp(xd,"g"),A0=RegExp(h_+"(?="+h_+")|"+QO+XE,"g"),eF=RegExp([Yu+"?"+pi+"+"+Qt+"(?="+[Uf,Yu,"$"].join("|")+")",zf+"+"+qn+"(?="+[Uf,Yu+pe,"$"].join("|")+")",Yu+"?"+pe+"+"+Qt,Yu+"+"+qn,"\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])","\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",ci,KE].join("|"),"g"),tF=RegExp("[\\u200d"+Gu+M0+C0+"]"),ZE=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,nF=["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"],QE=-1,Ei={};Ei[pa]=Ei[Lf]=Ei[Qg]=Ei[Nf]=Ei[Jg]=Ei[e_]=Ei[Hu]=Ei[t_]=Ei[n_]=!0,Ei[ti]=Ei[Yn]=Ei[zu]=Ei[et]=Ei[yd]=Ei[gc]=Ei[gd]=Ei[Of]=Ei[Vo]=Ei[Vu]=Ei[ja]=Ei[_d]=Ei[zo]=Ei[_c]=Ei[vd]=!1;var En={};En[ti]=En[Yn]=En[zu]=En[yd]=En[et]=En[gc]=En[pa]=En[Lf]=En[Qg]=En[Nf]=En[Jg]=En[Vo]=En[Vu]=En[ja]=En[_d]=En[zo]=En[_c]=En[Ff]=En[e_]=En[Hu]=En[t_]=En[n_]=!0,En[gd]=En[Of]=En[vd]=!1;var sF={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},ke=parseFloat,oF=parseInt,Kt="object"==typeof global&&global&&global.Object===Object&&global,Gf="object"==typeof self&&self&&self.Object===Object&&self,Sr=Kt||Gf||Function("return this")(),f_=$s&&!$s.nodeType&&$s,Xu=f_&&Bo&&!Bo.nodeType&&Bo,p_=Xu&&Xu.exports===f_,wd=p_&&Kt.process,gs=function(){try{return Xu&&Xu.require&&Xu.require("util").types||wd&&wd.binding&&wd.binding("util")}catch{}}(),m_=gs&&gs.isArrayBuffer,D0=gs&&gs.isDate,Ot=gs&&gs.isMap,$f=gs&&gs.isRegExp,T0=gs&&gs.isSet,Xs=gs&&gs.isTypedArray;function _s(X,ue,oe){switch(oe.length){case 0:return X.call(ue);case 1:return X.call(ue,oe[0]);case 2:return X.call(ue,oe[0],oe[1]);case 3:return X.call(ue,oe[0],oe[1],oe[2])}return X.apply(ue,oe)}function aF(X,ue,oe,Ue){for(var $t=-1,Vn=null==X?0:X.length;++$t-1}function Ku(X,ue,oe){for(var Ue=-1,$t=null==X?0:X.length;++Ue<$t;)if(oe(ue,X[Ue]))return!0;return!1}function mi(X,ue){for(var oe=-1,Ue=null==X?0:X.length,$t=Array(Ue);++oe-1;);return oe}function ma(X,ue){for(var oe=X.length;oe--&&Ft(ue,X[oe],0)>-1;);return oe}var nA=v_({\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"}),ot=v_({"&":"&","<":"<",">":">",'"':""","'":"'"});function th(X){return"\\"+sF[X]}function Sd(X){return tF.test(X)}function qf(X){var ue=-1,oe=Array(X.size);return X.forEach(function(Ue,$t){oe[++ue]=[$t,Ue]}),oe}function ve(X,ue){return function(oe){return X(ue(oe))}}function Gi(X,ue){for(var oe=-1,Ue=X.length,$t=0,Vn=[];++oe",""":'"',"'":"'"}),ys=function X(ue){var u,oe=(ue=null==ue?Sr:ys.defaults(Sr.Object(),ue,ys.pick(Sr,nF))).Array,Ue=ue.Date,$t=ue.Error,Vn=ue.Function,yt=ue.Math,oi=ue.Object,bc=ue.RegExp,R0=ue.String,Er=ue.TypeError,sr=oe.prototype,Ho=oi.prototype,Zs=ue["__core-js_shared__"],Pl=Vn.prototype.toString,ii=Ho.hasOwnProperty,bi=0,sA=(u=/[^.]+$/.exec(Zs&&Zs.keys&&Zs.keys.IE_PROTO||""))?"Symbol(src)_1."+u:"",Ad=Ho.toString,k0=Pl.call(oi),Kf=Sr._,Zf=bc("^"+Pl.call(ii).replace(s_,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),Za=p_?ue.Buffer:V,Ui=ue.Symbol,x_=ue.Uint8Array,bs=Za?Za.allocUnsafe:V,xs=ve(oi.getPrototypeOf,oi),Qf=oi.create,Dd=Ho.propertyIsEnumerable,xc=sr.splice,vo=Ui?Ui.isConcatSpreadable:V,ih=Ui?Ui.iterator:V,Td=Ui?Ui.toStringTag:V,Jf=function(){try{var u=kc(oi,"defineProperty");return u({},"",{}),u}catch{}}(),oA=ue.clearTimeout!==Sr.clearTimeout&&ue.clearTimeout,cF=Ue&&Ue.now!==Sr.Date.now&&Ue.now,dF=ue.setTimeout!==Sr.setTimeout&&ue.setTimeout,w_=yt.ceil,M_=yt.floor,P0=oi.getOwnPropertySymbols,uF=Za?Za.isBuffer:V,aA=ue.isFinite,hF=sr.join,fF=ve(oi.keys,oi),fr=yt.max,Zr=yt.min,pF=Ue.now,O0=ue.parseInt,C_=yt.random,mF=sr.reverse,F0=kc(ue,"DataView"),ep=kc(ue,"Map"),Qa=kc(ue,"Promise"),Id=kc(ue,"Set"),xi=kc(ue,"WeakMap"),Rd=kc(oi,"create"),tp=xi&&new xi,kd={},L0=Pc(F0),N0=Pc(ep),lA=Pc(Qa),S_=Pc(Id),cA=Pc(xi),Qr=Ui?Ui.prototype:V,Pd=Qr?Qr.valueOf:V,E_=Qr?Qr.toString:V;function I(u){if(Pi(u)&&!sn(u)&&!(u instanceof kn)){if(u instanceof Ai)return u;if(ii.call(u,"__wrapped__"))return ns(u)}return new Ai(u)}var Od=function(){function u(){}return function(f){if(!Mi(f))return{};if(Qf)return Qf(f);u.prototype=f;var _=new u;return u.prototype=V,_}}();function wc(){}function Ai(u,f){this.__wrapped__=u,this.__actions__=[],this.__chain__=!!f,this.__index__=0,this.__values__=V}function kn(u){this.__wrapped__=u,this.__actions__=[],this.__dir__=1,this.__filtered__=!1,this.__iteratees__=[],this.__takeCount__=fa,this.__views__=[]}function Mc(u){var f=-1,_=null==u?0:u.length;for(this.clear();++f<_;){var w=u[f];this.set(w[0],w[1])}}function kt(u){var f=-1,_=null==u?0:u.length;for(this.clear();++f<_;){var w=u[f];this.set(w[0],w[1])}}function ga(u){var f=-1,_=null==u?0:u.length;for(this.clear();++f<_;){var w=u[f];this.set(w[0],w[1])}}function Ut(u){var f=-1,_=null==u?0:u.length;for(this.__data__=new ga;++f<_;)this.add(u[f])}function Jr(u){var f=this.__data__=new kt(u);this.size=f.size}function I_(u,f){var _=sn(u),w=!_&&Lc(u),S=!_&&!w&&rl(u),P=!_&&!w&&!S&&jo(u),H=_||w||S||P,Y=H?Ks(u.length,R0):[],Q=Y.length;for(var _e in u)(f||ii.call(u,_e))&&(!H||!("length"==_e||S&&("offset"==_e||"parent"==_e)||P&&("buffer"==_e||"byteLength"==_e||"byteOffset"==_e)||il(_e,Q)))&&Y.push(_e);return Y}function zr(u){var f=u.length;return f?u[lh(0,f-1)]:V}function Ja(u,f){return Sp(eo(u),Ll(f,0,u.length))}function H0(u){return Sp(eo(u))}function Fl(u,f,_){(_!==V&&!Wo(u[f],_)||_===V&&!(f in u))&&Go(u,f,_)}function Qs(u,f,_){var w=u[f];(!ii.call(u,f)||!Wo(w,_)||_===V&&!(f in u))&&Go(u,f,_)}function ip(u,f){for(var _=u.length;_--;)if(Wo(u[_][0],f))return _;return-1}function G0(u,f,_,w){return el(u,function(S,P,H){f(w,S,_(S),H)}),w}function $0(u,f){return u&&di(f,pr(f),u)}function Go(u,f,_){"__proto__"==f&&Jf?Jf(u,f,{configurable:!0,enumerable:!0,value:_,writable:!0}):u[f]=_}function rh(u,f){for(var _=-1,w=f.length,S=oe(w),P=null==u;++_=f?u:f)),u}function Ms(u,f,_,w,S,P){var H,Y=f&Si,Q=f&ms,_e=f&js;if(_&&(H=S?_(u,w,S,P):_(u)),H!==V)return H;if(!Mi(u))return u;var ye=sn(u);if(ye){if(H=function hx(u){var f=u.length,_=new u.constructor(f);return f&&"string"==typeof u[0]&&ii.call(u,"index")&&(_.index=u.index,_.input=u.input),_}(u),!Y)return eo(u,H)}else{var be=Hr(u),Xe=be==Of||be==d0;if(rl(u))return me(u,Y);if(be==ja||be==ti||Xe&&!S){if(H=Q||Xe?{}:PA(u),!Y)return Q?function hh(u,f){return di(u,cx(u),f)}(u,function _A(u,f){return u&&di(f,Ds(f),u)}(H,u)):function H_(u,f){return di(u,Z_(u),f)}(u,$0(H,u))}else{if(!En[be])return S?u:{};H=function fx(u,f,_){var w=u.constructor;switch(f){case zu:return rx(u);case et:case gc:return new w(+u);case yd:return function xF(u,f){var _=f?rx(u.buffer):u.buffer;return new u.constructor(_,u.byteOffset,u.byteLength)}(u,_);case pa:case Lf:case Qg:case Nf:case Jg:case e_:case Hu:case t_:case n_:return AA(u,_);case Vo:return new w;case Vu:case _c:return new w(u);case _d:return function wF(u){var f=new u.constructor(u.source,x0.exec(u));return f.lastIndex=u.lastIndex,f}(u);case zo:return new w;case Ff:return function MF(u){return Pd?oi(Pd.call(u)):{}}(u)}}(u,be,Y)}}P||(P=new Jr);var vt=P.get(u);if(vt)return vt;P.set(u,H),nw(u)?u.forEach(function(zt){H.add(Ms(zt,f,_,zt,u,P))}):Tv(u)&&u.forEach(function(zt,An){H.set(An,Ms(zt,f,_,An,u,P))});var mn=ye?V:(_e?Q?q_:yp:Q?Ds:pr)(u);return Rn(mn||u,function(zt,An){mn&&(zt=u[An=zt]),Qs(H,An,Ms(zt,f,_,An,u,P))}),H}function R_(u,f,_){var w=_.length;if(null==u)return!w;for(u=oi(u);w--;){var S=_[w],H=u[S];if(H===V&&!(S in u)||!(0,f[S])(H))return!1}return!0}function rp(u,f,_){if("function"!=typeof u)throw new Er(Un);return gh(function(){u.apply(V,_)},f)}function Ld(u,f,_,w){var S=-1,P=Rl,H=!0,Y=u.length,Q=[],_e=f.length;if(!Y)return Q;_&&(f=mi(f,Ur(_))),w?(P=Ku,H=!1):f.length>=Kr&&(P=yc,H=!1,f=new Ut(f));e:for(;++S-1},kt.prototype.set=function fA(u,f){var _=this.__data__,w=ip(_,u);return w<0?(++this.size,_.push([u,f])):_[w][1]=f,this},ga.prototype.clear=function pA(){this.size=0,this.__data__={hash:new Mc,map:new(ep||kt),string:new Mc}},ga.prototype.delete=function mA(u){var f=K_(this,u).delete(u);return this.size-=f?1:0,f},ga.prototype.get=function Se(u){return K_(this,u).get(u)},ga.prototype.has=function zn(u){return K_(this,u).has(u)},ga.prototype.set=function rn(u,f){var _=K_(this,u),w=_.size;return _.set(u,f),this.size+=_.size==w?0:1,this},Ut.prototype.add=Ut.prototype.push=function Ar(u){return this.__data__.set(u,Ha),this},Ut.prototype.has=function z0(u){return this.__data__.has(u)},Jr.prototype.clear=function _a(){this.__data__=new kt,this.size=0},Jr.prototype.delete=function D_(u){var f=this.__data__,_=f.delete(u);return this.size=f.size,_},Jr.prototype.get=function T_(u){return this.__data__.get(u)},Jr.prototype.has=function gA(u){return this.__data__.has(u)},Jr.prototype.set=function _F(u,f){var _=this.__data__;if(_ instanceof kt){var w=_.__data__;if(!ep||w.length0&&_(Y)?f>1?Xn(Y,f-1,_,w,S):kl(S,Y):w||(S[S.length]=Y)}return S}var tl=G_(),Di=G_(!0);function ki(u,f){return u&&tl(u,f,pr)}function P_(u,f){return u&&Di(u,f,pr)}function va(u,f){return vc(f,function(_){return zl(u[_])})}function Cc(u,f){for(var _=0,w=(f=wa(f,u)).length;null!=u&&_f}function sp(u,f){return null!=u&&ii.call(u,f)}function op(u,f){return null!=u&&f in oi(u)}function ap(u,f,_){for(var w=_?Ku:Rl,S=u[0].length,P=u.length,H=P,Y=oe(P),Q=1/0,_e=[];H--;){var ye=u[H];H&&f&&(ye=mi(ye,Ur(f))),Q=Zr(ye.length,Q),Y[H]=!_&&(f||S>=120&&ye.length>=120)?new Ut(H&&ye):V}ye=u[0];var be=-1,Xe=Y[0];e:for(;++be=Y?Q:Q*("desc"==_[w]?-1:1)}return u.index-f.index}(P,H,_)})}function Q0(u,f,_){for(var w=-1,S=f.length,P={};++w-1;)Y!==u&&xc.call(Y,Q,1),xc.call(u,Q,1);return u}function ah(u,f){for(var _=u?f.length:0,w=_-1;_--;){var S=f[_];if(_==w||S!==P){var P=S;il(S)?xc.call(u,S,1):dh(u,S)}}return u}function lh(u,f){return u+M_(C_()*(f-u+1))}function ch(u,f){var _="";if(!u||f<1||f>Wa)return _;do{f%2&&(_+=u),(f=M_(f/2))&&(u+=u)}while(f);return _}function pn(u,f){return Mp(J_(u,f,is),u+"")}function SA(u){return zr(Uc(u))}function ex(u,f){var _=Uc(u);return Sp(_,Ll(f,0,_.length))}function zd(u,f,_,w){if(!Mi(u))return u;for(var S=-1,P=(f=wa(f,u)).length,H=P-1,Y=u;null!=Y&&++SS?0:S+f),(_=_>S?S:_)<0&&(_+=S),S=f>_?0:_-f>>>0,f>>>=0;for(var P=oe(S);++w>>1,H=u[P];null!==H&&!As(H)&&(_?H<=f:H=Kr){var _e=f?null:j_(u);if(_e)return Hn(_e);H=!1,S=yc,Q=new Ut}else Q=f?[]:Y;e:for(;++w=w?u:ts(u,f,_)}var ix=oA||function(u){return Sr.clearTimeout(u)};function me(u,f){if(f)return u.slice();var _=u.length,w=bs?bs(_):new u.constructor(_);return u.copy(w),w}function rx(u){var f=new u.constructor(u.byteLength);return new x_(f).set(new x_(u)),f}function AA(u,f){var _=f?rx(u.buffer):u.buffer;return new u.constructor(_,u.byteOffset,u.length)}function DA(u,f){if(u!==f){var _=u!==V,w=null===u,S=u==u,P=As(u),H=f!==V,Y=null===f,Q=f==f,_e=As(f);if(!Y&&!_e&&!P&&u>f||P&&H&&Q&&!Y&&!_e||w&&H&&Q||!_&&Q||!S)return 1;if(!w&&!P&&!_e&&u1?_[S-1]:V,H=S>2?_[2]:V;for(P=u.length>3&&"function"==typeof P?(S--,P):V,H&&Tr(_[0],_[1],H)&&(P=S<3?V:P,S=1),f=oi(f);++w-1?S[P?f[H]:H]:V}}function Cs(u){return bo(function(f){var _=f.length,w=_,S=Ai.prototype.thru;for(u&&f.reverse();w--;){var P=f[w];if("function"!=typeof P)throw new Er(Un);if(S&&!H&&"wrapper"==nl(P))var H=new Ai([],!0)}for(w=H?w:_;++w<_;){var Y=nl(P=f[w]),Q="wrapper"==Y?X_(P):V;H=Q&&mh(Q[0])&&Q[1]==(Ga|da|ua|ha)&&!Q[4].length&&1==Q[9]?H[nl(Q[0])].apply(H,Q[3]):1==P.length&&mh(P)?H[Y]():H.thru(P)}return function(){var _e=arguments,ye=_e[0];if(H&&1==_e.length&&sn(ye))return H.plant(ye).value();for(var be=0,Xe=_?f[be].apply(this,_e):ye;++be<_;)Xe=f[be].call(this,Xe);return Xe}})}function jd(u,f,_,w,S,P,H,Y,Q,_e){var ye=f&Ga,be=f&On,Xe=f&ur,vt=f&(da|Dl),Vt=f&md,mn=Xe?V:mp(u);return function zt(){for(var An=arguments.length,Ln=oe(An),rs=An;rs--;)Ln[rs]=arguments[rs];if(vt)var ss=Ca(zt),so=function eh(X,ue){for(var oe=X.length,Ue=0;oe--;)X[oe]===ue&&++Ue;return Ue}(Ln,ss);if(w&&(Ln=Gd(Ln,w,S,vt)),P&&(Ln=TA(Ln,P,H,vt)),An-=so,vt&&An<_e){var Ti=Gi(Ln,ss);return ox(u,f,jd,zt.placeholder,_,Ln,Ti,Y,Q,_e-An)}var Ts=be?_:this,Mo=Xe?Ts[u]:u;return An=Ln.length,Y?Ln=function Es(u,f){for(var _=u.length,w=Zr(f.length,_),S=eo(u);w--;){var P=f[w];u[w]=il(P,_)?S[P]:V}return u}(Ln,Y):Vt&&An>1&&Ln.reverse(),ye&&QY))return!1;var _e=P.get(u),ye=P.get(f);if(_e&&ye)return _e==f&&ye==u;var be=-1,Xe=!0,vt=_&Uo?new Ut:V;for(P.set(u,f),P.set(f,u);++be-1&&u%1==0&&u1?"& ":"")+f[w],f=f.join(_>2?", ":" "),u.replace(y0,"{\n/* [wrapped with "+f+"] */\n")}(w,function BA(u,f){return Rn(c0,function(_){var w="_."+_[0];f&_[1]&&!Rl(u,w)&&u.push(w)}),u.sort()}(function dx(u){var f=u.match(Mr);return f?f[1].split(LE):[]}(w),_)))}function vx(u){var f=0,_=0;return function(){var w=pF(),S=Kg-(w-_);if(_=w,S>0){if(++f>=ME)return arguments[0]}else f=0;return u.apply(V,arguments)}}function Sp(u,f){var _=-1,w=u.length,S=w-1;for(f=f===V?w:f;++_1?u[f-1]:V;return _="function"==typeof _?(u.pop(),_):V,yh(u,_)});function zx(u){var f=I(u);return f.__chain__=!0,f}function Ip(u,f){return f(u)}var Hx=bo(function(u){var f=u.length,_=f?u[0]:0,w=this.__wrapped__,S=function(P){return rh(P,u)};return!(f>1||this.__actions__.length)&&w instanceof kn&&il(_)?((w=w.slice(_,+_+(f?1:0))).__actions__.push({func:Ip,args:[S],thisArg:V}),new Ai(w,this.__chain__).thru(function(P){return f&&!P.length&&P.push(V),P})):this.thru(S)}),rD=fp(function(u,f,_){ii.call(u,_)?++u[_]:Go(u,_,1)}),$x=RA(Sx),kp=RA(rv);function bv(u,f){return(sn(u)?Rn:el)(u,Lt(f,3))}function Vl(u,f){return(sn(u)?lF:k_)(u,Lt(f,3))}var oD=fp(function(u,f,_){ii.call(u,_)?u[_].push(f):Go(u,_,[f])}),lD=pn(function(u,f,_){var w=-1,S="function"==typeof f,P=no(u)?oe(u.length):[];return el(u,function(H){P[++w]=S?_s(f,H,_):ya(H,f,_)}),P}),cD=fp(function(u,f,_){Go(u,_,f)});function Pp(u,f){return(sn(u)?mi:sh)(u,Lt(f,3))}var Sa=fp(function(u,f,_){u[_?0:1].push(f)},function(){return[[],[]]}),_D=pn(function(u,f){if(null==u)return[];var _=f.length;return _>1&&Tr(u,f[0],f[1])?f=[]:_>2&&Tr(f[0],f[1],f[2])&&(f=[f[0]]),B_(u,Xn(f,1),[])}),Op=cF||function(){return Sr.Date.now()};function xh(u,f,_){return f=_?V:f,yo(u,Ga,V,V,V,V,f=u&&null==f?u.length:f)}function Ea(u,f){var _;if("function"!=typeof f)throw new Er(Un);return u=dn(u),function(){return--u>0&&(_=f.apply(this,arguments)),u<=1&&(f=V),_}}var Fc=pn(function(u,f,_){var w=On;if(_.length){var S=Gi(_,Ca(Fc));w|=ua}return yo(u,w,f,_,S)}),xv=pn(function(u,f,_){var w=On|ur;if(_.length){var S=Gi(_,Ca(xv));w|=ua}return yo(f,w,u,_,S)});function yD(u,f,_){var w,S,P,H,Y,Q,_e=0,ye=!1,be=!1,Xe=!0;if("function"!=typeof u)throw new Er(Un);function vt(Ti){var Ts=w,Mo=S;return w=S=V,_e=Ti,H=u.apply(Mo,Ts)}function zt(Ti){var Ts=Ti-Q;return Q===V||Ts>=f||Ts<0||be&&Ti-_e>=P}function An(){var Ti=Op();if(zt(Ti))return Ln(Ti);Y=gh(An,function mn(Ti){var I1=f-(Ti-Q);return be?Zr(I1,P-(Ti-_e)):I1}(Ti))}function Ln(Ti){return Y=V,Xe&&w?vt(Ti):(w=S=V,H)}function so(){var Ti=Op(),Ts=zt(Ti);if(w=arguments,S=this,Q=Ti,Ts){if(Y===V)return function Vt(Ti){return _e=Ti,Y=gh(An,f),ye?vt(Ti):H}(Q);if(be)return ix(Y),Y=gh(An,f),vt(Q)}return Y===V&&(Y=gh(An,f)),H}return f=xo(f)||0,Mi(_)&&(ye=!!_.leading,P=(be="maxWait"in _)?fr(xo(_.maxWait)||0,f):P,Xe="trailing"in _?!!_.trailing:Xe),so.cancel=function rs(){Y!==V&&ix(Y),_e=0,w=Q=S=Y=V},so.flush=function ss(){return Y===V?H:Ln(Op())},so}var kF=pn(function(u,f){return rp(u,1,f)}),PF=pn(function(u,f,_){return rp(u,xo(f)||0,_)});function qd(u,f){if("function"!=typeof u||null!=f&&"function"!=typeof f)throw new Er(Un);var _=function(){var w=arguments,S=f?f.apply(this,w):w[0],P=_.cache;if(P.has(S))return P.get(S);var H=u.apply(this,w);return _.cache=P.set(S,H)||P,H};return _.cache=new(qd.Cache||ga),_}function Sv(u){if("function"!=typeof u)throw new Er(Un);return function(){var f=arguments;switch(f.length){case 0:return!u.call(this);case 1:return!u.call(this,f[0]);case 2:return!u.call(this,f[0],f[1]);case 3:return!u.call(this,f[0],f[1],f[2])}return!u.apply(this,f)}}qd.Cache=ga;var qx=Hd(function(u,f){var _=(f=1==f.length&&sn(f[0])?mi(f[0],Ur(Lt())):mi(Xn(f,1),Ur(Lt()))).length;return pn(function(w){for(var S=-1,P=Zr(w.length,_);++S=f}),Lc=Ud(function(){return arguments}())?Ud:function(u){return Pi(u)&&ii.call(u,"callee")&&!Dd.call(u,"callee")},sn=oe.isArray,FF=m_?Ur(m_):function xA(u){return Pi(u)&&es(u)==zu};function no(u){return null!=u&&Vp(u.length)&&!zl(u)}function wi(u){return Pi(u)&&no(u)}var rl=uF||Jd,Jx=D0?Ur(D0):function vF(u){return Pi(u)&&es(u)==gc};function Bp(u){if(!Pi(u))return!1;var f=es(u);return f==gd||f==AE||"string"==typeof u.message&&"string"==typeof u.name&&!io(u)}function zl(u){if(!Mi(u))return!1;var f=es(u);return f==Of||f==d0||f==EE||f==TE}function Up(u){return"number"==typeof u&&u==dn(u)}function Vp(u){return"number"==typeof u&&u>-1&&u%1==0&&u<=Wa}function Mi(u){var f=typeof u;return null!=u&&("object"==f||"function"==f)}function Pi(u){return null!=u&&"object"==typeof u}var Tv=Ot?Ur(Ot):function wA(u){return Pi(u)&&Hr(u)==Vo};function wh(u){return"number"==typeof u||Pi(u)&&es(u)==Vu}function io(u){if(!Pi(u)||es(u)!=ja)return!1;var f=xs(u);if(null===f)return!0;var _=ii.call(f,"constructor")&&f.constructor;return"function"==typeof _&&_ instanceof _&&Pl.call(_)==k0}var Hp=$f?Ur($f):function bF(u){return Pi(u)&&es(u)==_d},nw=T0?Ur(T0):function L_(u){return Pi(u)&&Hr(u)==zo};function Gp(u){return"string"==typeof u||!sn(u)&&Pi(u)&&es(u)==_c}function As(u){return"symbol"==typeof u||Pi(u)&&es(u)==Ff}var jo=Xs?Ur(Xs):function q0(u){return Pi(u)&&Vp(u.length)&&!!Ei[es(u)]},Pv=vp(lp),PD=vp(function(u,f){return u<=f});function Ov(u){if(!u)return[];if(no(u))return Gp(u)?_o(u):eo(u);if(ih&&u[ih])return function rA(X){for(var ue,oe=[];!(ue=X.next()).done;)oe.push(ue.value);return oe}(u[ih]());var f=Hr(u);return(f==Vo?qf:f==zo?Hn:Uc)(u)}function sl(u){return u?(u=xo(u))===In||u===-In?(u<0?-1:1)*SE:u==u?u:0:0===u?u:0}function dn(u){var f=sl(u),_=f%1;return f==f?_?f-_:f:0}function OD(u){return u?Ll(dn(u),0,fa):0}function xo(u){if("number"==typeof u)return u;if(As(u))return Pf;if(Mi(u)){var f="function"==typeof u.valueOf?u.valueOf():u;u=Mi(f)?f+"":f}if("string"!=typeof u)return 0===u?u:+u;u=$n(u);var _=Ya.test(u);return _||rr.test(u)?oF(u.slice(2),_?2:8):VE.test(u)?Pf:+u}function Hl(u){return di(u,Ds(u))}function Fn(u){return null==u?"":Js(u)}var gt=Dr(function(u,f){if(wp(f)||no(f))di(f,pr(f),u);else for(var _ in f)ii.call(f,_)&&Qs(u,_,f[_])}),iw=Dr(function(u,f){di(f,Ds(f),u)}),Gl=Dr(function(u,f,_,w){di(f,Ds(f),u,w)}),ol=Dr(function(u,f,_,w){di(f,pr(f),u,w)}),LD=bo(rh),Bc=pn(function(u,f){u=oi(u);var _=-1,w=f.length,S=w>2?f[2]:V;for(S&&Tr(f[0],f[1],S)&&(w=1);++_1),P}),di(u,q_(u),_),w&&(_=Ms(_,Si|ms|js,Ma));for(var S=f.length;S--;)dh(_,f[S]);return _}),jD=bo(function(u,f){return null==u?{}:function Z0(u,f){return Q0(u,f,function(_,w){return Uv(u,w)})}(u,f)});function Vv(u,f){if(null==u)return{};var _=mi(q_(u),function(w){return[w]});return f=Lt(f),Q0(u,_,function(w,S){return f(w,S[0])})}var aw=fh(pr),zv=fh(Ds);function Uc(u){return null==u?[]:Ju(u,pr(u))}var G=Wd(function(u,f,_){return f=f.toLowerCase(),u+(_?Hv(f):f)});function Hv(u){return Zd(Fn(u).toLowerCase())}function Gv(u){return(u=Fn(u))&&u.replace(mo,nA).replace(JO,"")}var s1=Wd(function(u,f,_){return u+(_?"-":"")+f.toLowerCase()}),cw=Wd(function(u,f,_){return u+(_?" ":"")+f.toLowerCase()}),o1=$d("toLowerCase"),$v=Wd(function(u,f,_){return u+(_?"_":"")+f.toLowerCase()}),c1=Wd(function(u,f,_){return u+(_?" ":"")+Zd(f)}),fw=Wd(function(u,f,_){return u+(_?" ":"")+f.toUpperCase()}),Zd=$d("toUpperCase");function pw(u,f,_){return u=Fn(u),(f=_?V:f)===V?function nn(X){return ZE.test(X)}(u)?function fn(X){return X.match(eF)||[]}(u):function tA(X){return X.match(NE)||[]}(u):u.match(f)||[]}var jv=pn(function(u,f){try{return _s(u,V,f)}catch(_){return Bp(_)?_:new $t(_)}}),f1=bo(function(u,f){return Rn(f,function(_){_=$o(_),Go(u,_,Fc(u[_],u))}),u});function Yv(u){return function(){return u}}var mw=Cs(),_1=Cs(!0);function is(u){return u}function $p(u){return N_("function"==typeof u?u:Ms(u,Si))}var Xv=pn(function(u,f){return function(_){return ya(_,u,f)}}),v1=pn(function(u,f){return function(_){return ya(u,_,f)}});function gw(u,f,_){var w=pr(f),S=va(f,w);null==_&&(!Mi(f)||!S.length&&w.length)&&(_=f,f=u,u=this,S=va(f,pr(f)));var P=!(Mi(_)&&"chain"in _&&!_.chain),H=zl(u);return Rn(S,function(Y){var Q=f[Y];u[Y]=Q,H&&(u.prototype[Y]=function(){var _e=this.__chain__;if(P||_e){var ye=u(this.__wrapped__);return(ye.__actions__=eo(this.__actions__)).push({func:Q,args:arguments,thisArg:u}),ye.__chain__=_e,ye}return Q.apply(u,kl([this.value()],arguments))})}),u}function wo(){}var _w=gp(mi),b1=gp(JE),x1=gp(Wf);function Mh(u){return px(u)?__($o(u)):function ba(u){return function(f){return Cc(f,u)}}(u)}var Kv=sx(),Ch=sx(!0);function Sh(){return[]}function Jd(){return!1}var w1=$_(function(u,f){return u+f},0),M1=W_("ceil"),bw=$_(function(u,f){return u/f},1),C1=W_("floor"),D1=$_(function(u,f){return u*f},1),WF=W_("round"),ty=$_(function(u,f){return u-f},0);return I.after=function vD(u,f){if("function"!=typeof f)throw new Er(Un);return u=dn(u),function(){if(--u<1)return f.apply(this,arguments)}},I.ary=xh,I.assign=gt,I.assignIn=iw,I.assignInWith=Gl,I.assignWith=ol,I.at=LD,I.before=Ea,I.bind=Fc,I.bindAll=f1,I.bindKey=xv,I.castArray=function wD(){if(!arguments.length)return[];var u=arguments[0];return sn(u)?u:[u]},I.chain=zx,I.chunk=function nv(u,f,_){f=(_?Tr(u,f,_):f===V)?1:fr(dn(f),0);var w=null==u?0:u.length;if(!w||f<1)return[];for(var S=0,P=0,H=oe(w_(w/f));SS?0:S+_),(w=w===V||w>S?S:dn(w))<0&&(w+=S),w=_>w?0:OD(w);_>>0)?(u=Fn(u))&&("string"==typeof f||null!=f&&!Hp(f))&&!(f=Js(f))&&Sd(u)?Ic(_o(u),0,_):u.split(f,_):[]},I.spread=function Kx(u,f){if("function"!=typeof u)throw new Er(Un);return f=null==f?0:fr(dn(f),0),pn(function(_){var w=_[f],S=Ic(_,0,f);return w&&kl(S,w),_s(u,this,S)})},I.tail=function Oc(u){var f=null==u?0:u.length;return f?ts(u,1,f):[]},I.take=function Ox(u,f,_){return u&&u.length?ts(u,0,(f=_||f===V?1:dn(f))<0?0:f):[]},I.takeRight=function Fx(u,f,_){var w=null==u?0:u.length;return w?ts(u,(f=w-(f=_||f===V?1:dn(f)))<0?0:f,w):[]},I.takeRightWhile=function QA(u,f){return u&&u.length?uh(u,Lt(f,3),!1,!0):[]},I.takeWhile=function IF(u,f){return u&&u.length?uh(u,Lt(f,3)):[]},I.tap=function tD(u,f){return f(u),u},I.throttle=function Fp(u,f,_){var w=!0,S=!0;if("function"!=typeof u)throw new Er(Un);return Mi(_)&&(w="leading"in _?!!_.leading:w,S="trailing"in _?!!_.trailing:S),yD(u,f,{leading:w,maxWait:f,trailing:S})},I.thru=Ip,I.toArray=Ov,I.toPairs=aw,I.toPairsIn=zv,I.toPath=function yw(u){return sn(u)?mi(u,$o):As(u)?[u]:eo(yx(Fn(u)))},I.toPlainObject=Hl,I.transform=function XD(u,f,_){var w=sn(u),S=w||rl(u)||jo(u);if(f=Lt(f,4),null==_){var P=u&&u.constructor;_=S?w?new P:[]:Mi(u)&&zl(P)?Od(xs(u)):{}}return(S?Rn:ki)(u,function(H,Y,Q){return f(_,H,Y,Q)}),_},I.unary=function Zx(u){return xh(u,1)},I.union=Ap,I.unionBy=JA,I.unionWith=Lx,I.uniq=function Nx(u){return u&&u.length?ri(u):[]},I.uniqBy=function Bx(u,f){return u&&u.length?ri(u,Lt(f,2)):[]},I.uniqWith=function fv(u,f){return f="function"==typeof f?f:V,u&&u.length?ri(u,V,f):[]},I.unset=function KD(u,f){return null==u||dh(u,f)},I.unzip=Dp,I.unzipWith=yh,I.update=function ZD(u,f,_){return null==u?u:nx(u,f,hp(_))},I.updateWith=function QD(u,f,_,w){return w="function"==typeof w?w:V,null==u?u:nx(u,f,hp(_),w)},I.values=Uc,I.valuesIn=function JD(u){return null==u?[]:Ju(u,Ds(u))},I.without=Tp,I.words=pw,I.wrap=function Av(u,f){return Ev(hp(f),u)},I.xor=Ux,I.xorBy=pv,I.xorWith=mv,I.zip=gv,I.zipObject=function bh(u,f){return Tc(u||[],f||[],Qs)},I.zipObjectDeep=function eD(u,f){return Tc(u||[],f||[],zd)},I.zipWith=Vx,I.entries=aw,I.entriesIn=zv,I.extend=iw,I.extendWith=Gl,gw(I,I),I.add=w1,I.attempt=jv,I.camelCase=G,I.capitalize=Hv,I.ceil=M1,I.clamp=function e1(u,f,_){return _===V&&(_=f,f=V),_!==V&&(_=(_=xo(_))==_?_:0),f!==V&&(f=(f=xo(f))==f?f:0),Ll(xo(u),f,_)},I.clone=function Kn(u){return Ms(u,js)},I.cloneDeep=function CD(u){return Ms(u,Si|js)},I.cloneDeepWith=function Lp(u,f){return Ms(u,Si|js,f="function"==typeof f?f:V)},I.cloneWith=function MD(u,f){return Ms(u,js,f="function"==typeof f?f:V)},I.conformsTo=function Qx(u,f){return null==f||R_(u,f,pr(f))},I.deburr=Gv,I.defaultTo=function g1(u,f){return null==u||u!=u?f:u},I.divide=bw,I.endsWith=function n1(u,f,_){u=Fn(u),f=Js(f);var w=u.length,S=_=_===V?w:Ll(dn(_),0,w);return(_-=f.length)>=0&&u.slice(_,S)==f},I.eq=Wo,I.escape=function r1(u){return(u=Fn(u))&&FE.test(u)?u.replace(f0,ot):u},I.escapeRegExp=function lw(u){return(u=Fn(u))&&_0.test(u)?u.replace(s_,"\\$&"):u},I.every=function vv(u,f,_){var w=sn(u)?JE:W0;return _&&Tr(u,f,_)&&(f=V),w(u,Lt(f,3))},I.find=$x,I.findIndex=Sx,I.findKey=function Fv(u,f){return ee(u,Lt(f,3),ki)},I.findLast=kp,I.findLastIndex=rv,I.findLastKey=function Lv(u,f){return ee(u,Lt(f,3),P_)},I.floor=C1,I.forEach=bv,I.forEachRight=Vl,I.forIn=function UD(u,f){return null==u?u:tl(u,Lt(f,3),Ds)},I.forInRight=function Nv(u,f){return null==u?u:Di(u,Lt(f,3),Ds)},I.forOwn=function al(u,f){return u&&ki(u,Lt(f,3))},I.forOwnRight=function VD(u,f){return u&&P_(u,Lt(f,3))},I.get=Bv,I.gt=SD,I.gte=ED,I.has=function GD(u,f){return null!=u&&ux(u,f,sp)},I.hasIn=Uv,I.head=Ax,I.identity=is,I.includes=function aD(u,f,_,w){u=no(u)?u:Uc(u),_=_&&!w?dn(_):0;var S=u.length;return _<0&&(_=fr(S+_,0)),Gp(u)?_<=S&&u.indexOf(f,_)>-1:!!S&&Ft(u,f,_)>-1},I.indexOf=function vh(u,f,_){var w=null==u?0:u.length;if(!w)return-1;var S=null==_?0:dn(_);return S<0&&(S=fr(w+S,0)),Ft(u,f,S)},I.inRange=function t1(u,f,_){return f=sl(f),_===V?(_=f,f=0):_=sl(_),function O_(u,f,_){return u>=Zr(f,_)&&u=-Wa&&u<=Wa},I.isSet=nw,I.isString=Gp,I.isSymbol=As,I.isTypedArray=jo,I.isUndefined=function ID(u){return u===V},I.isWeakMap=function RD(u){return Pi(u)&&Hr(u)==vd},I.isWeakSet=function kD(u){return Pi(u)&&"[object WeakSet]"==es(u)},I.join=function Dx(u,f){return null==u?"":hF.call(u,f)},I.kebabCase=s1,I.last=Ir,I.lastIndexOf=function cv(u,f,_){var w=null==u?0:u.length;if(!w)return-1;var S=w;return _!==V&&(S=(S=dn(_))<0?fr(w+S,0):Zr(S,w-1)),f==f?function Ed(X,ue,oe){for(var Ue=oe+1;Ue--;)if(X[Ue]===ue)return Ue;return Ue}(u,f,S):Qu(u,Yf,S,!0)},I.lowerCase=cw,I.lowerFirst=o1,I.lt=Pv,I.lte=PD,I.max=function xw(u){return u&&u.length?Nd(u,is,Bd):V},I.maxBy=function ww(u,f){return u&&u.length?Nd(u,Lt(f,2),Bd):V},I.mean=function S1(u){return Cd(u,is)},I.meanBy=function E1(u,f){return Cd(u,Lt(f,2))},I.min=function ro(u){return u&&u.length?Nd(u,is,lp):V},I.minBy=function A1(u,f){return u&&u.length?Nd(u,Lt(f,2),lp):V},I.stubArray=Sh,I.stubFalse=Jd,I.stubObject=function vw(){return{}},I.stubString=function Zv(){return""},I.stubTrue=function Qv(){return!0},I.multiply=D1,I.nth=function Tx(u,f){return u&&u.length?CA(u,dn(f)):V},I.noConflict=function E(){return Sr._===this&&(Sr._=Kf),this},I.noop=wo,I.now=Op,I.pad=function a1(u,f,_){u=Fn(u);var w=(f=dn(f))?hr(u):0;if(!f||w>=f)return u;var S=(f-w)/2;return _p(M_(S),_)+u+_p(w_(S),_)},I.padEnd=function UF(u,f,_){u=Fn(u);var w=(f=dn(f))?hr(u):0;return f&&wf){var w=u;u=f,f=w}if(_||u%1||f%1){var S=C_();return Zr(u+S*(f-u+ke("1e-"+((S+"").length-1))),f)}return lh(u,f)},I.reduce=function dD(u,f,_){var w=sn(u)?g_:I0,S=arguments.length<3;return w(u,Lt(f,4),_,S,el)},I.reduceRight=function uD(u,f,_){var w=sn(u)?eA:I0,S=arguments.length<3;return w(u,Lt(f,4),_,S,k_)},I.repeat=function $i(u,f,_){return f=(_?Tr(u,f,_):f===V)?1:dn(f),ch(Fn(u),f)},I.replace=function l1(){var u=arguments,f=Fn(u[0]);return u.length<3?f:f.replace(u[1],u[2])},I.result=function YD(u,f,_){var w=-1,S=(f=wa(f,u)).length;for(S||(S=1,u=V);++wWa)return[];var _=fa,w=Zr(u,fa);f=Lt(f),u-=fa;for(var S=Ks(w,f);++_=P)return u;var Y=_-hr(w);if(Y<1)return w;var Q=H?Ic(H,0,Y).join(""):u.slice(0,Y);if(S===V)return Q+w;if(H&&(Y+=Q.length-Y),Hp(S)){if(u.slice(Y).search(S)){var _e,ye=Q;for(S.global||(S=bc(S.source,Fn(x0.exec(S))+"g")),S.lastIndex=0;_e=S.exec(ye);)var be=_e.index;Q=Q.slice(0,be===V?Y:be)}}else if(u.indexOf(Js(S),Y)!=Y){var Xe=Q.lastIndexOf(S);Xe>-1&&(Q=Q.slice(0,Xe))}return Q+w},I.unescape=function h1(u){return(u=Fn(u))&&OE.test(u)?u.replace(h0,Xf):u},I.uniqueId=function ey(u){var f=++bi;return Fn(u)+f},I.upperCase=fw,I.upperFirst=Zd,I.each=bv,I.eachRight=Vl,I.first=Ax,gw(I,function(){var u={};return ki(I,function(f,_){ii.call(I.prototype,_)||(u[_]=f)}),u}(),{chain:!1}),I.VERSION="4.17.21",Rn(["bind","bindKey","curry","curryRight","partial","partialRight"],function(u){I[u].placeholder=I}),Rn(["drop","take"],function(u,f){kn.prototype[u]=function(_){_=_===V?1:fr(dn(_),0);var w=this.__filtered__&&!f?new kn(this):this.clone();return w.__filtered__?w.__takeCount__=Zr(_,w.__takeCount__):w.__views__.push({size:Zr(_,fa),type:u+(w.__dir__<0?"Right":"")}),w},kn.prototype[u+"Right"]=function(_){return this.reverse()[u](_).reverse()}}),Rn(["filter","map","takeWhile"],function(u,f){var _=f+1,w=1==_||3==_;kn.prototype[u]=function(S){var P=this.clone();return P.__iteratees__.push({iteratee:Lt(S,3),type:_}),P.__filtered__=P.__filtered__||w,P}}),Rn(["head","last"],function(u,f){var _="take"+(f?"Right":"");kn.prototype[u]=function(){return this[_](1).value()[0]}}),Rn(["initial","tail"],function(u,f){var _="drop"+(f?"":"Right");kn.prototype[u]=function(){return this.__filtered__?new kn(this):this[_](1)}}),kn.prototype.compact=function(){return this.filter(is)},kn.prototype.find=function(u){return this.filter(u).head()},kn.prototype.findLast=function(u){return this.reverse().find(u)},kn.prototype.invokeMap=pn(function(u,f){return"function"==typeof u?new kn(this):this.map(function(_){return ya(_,u,f)})}),kn.prototype.reject=function(u){return this.filter(Sv(Lt(u)))},kn.prototype.slice=function(u,f){u=dn(u);var _=this;return _.__filtered__&&(u>0||f<0)?new kn(_):(u<0?_=_.takeRight(-u):u&&(_=_.drop(u)),f!==V&&(_=(f=dn(f))<0?_.dropRight(-f):_.take(f-u)),_)},kn.prototype.takeRightWhile=function(u){return this.reverse().takeWhile(u).reverse()},kn.prototype.toArray=function(){return this.take(fa)},ki(kn.prototype,function(u,f){var _=/^(?:filter|find|map|reject)|While$/.test(f),w=/^(?:head|last)$/.test(f),S=I[w?"take"+("last"==f?"Right":""):f],P=w||/^find/.test(f);S&&(I.prototype[f]=function(){var H=this.__wrapped__,Y=w?[1]:arguments,Q=H instanceof kn,_e=Y[0],ye=Q||sn(H),be=function(An){var Ln=S.apply(I,kl([An],Y));return w&&Xe?Ln[0]:Ln};ye&&_&&"function"==typeof _e&&1!=_e.length&&(Q=ye=!1);var Xe=this.__chain__,Vt=P&&!Xe,mn=Q&&!this.__actions__.length;if(!P&&ye){H=mn?H:new kn(this);var zt=u.apply(H,Y);return zt.__actions__.push({func:Ip,args:[be],thisArg:V}),new Ai(zt,Xe)}return Vt&&mn?u.apply(this,Y):(zt=this.thru(be),Vt?w?zt.value()[0]:zt.value():zt)})}),Rn(["pop","push","shift","sort","splice","unshift"],function(u){var f=sr[u],_=/^(?:push|sort|unshift)$/.test(u)?"tap":"thru",w=/^(?:pop|shift)$/.test(u);I.prototype[u]=function(){var S=arguments;if(w&&!this.__chain__){var P=this.value();return f.apply(sn(P)?P:[],S)}return this[_](function(H){return f.apply(sn(H)?H:[],S)})}}),ki(kn.prototype,function(u,f){var _=I[f];if(_){var w=_.name+"";ii.call(kd,w)||(kd[w]=[]),kd[w].push({name:f,func:_})}}),kd[jd(V,ur).name]=[{name:"wrapper",func:V}],kn.prototype.clone=function B0(){var u=new kn(this.__wrapped__);return u.__actions__=eo(this.__actions__),u.__dir__=this.__dir__,u.__filtered__=this.__filtered__,u.__iteratees__=eo(this.__iteratees__),u.__takeCount__=this.__takeCount__,u.__views__=eo(this.__views__),u},kn.prototype.reverse=function Fd(){if(this.__filtered__){var u=new kn(this);u.__dir__=-1,u.__filtered__=!0}else(u=this.clone()).__dir__*=-1;return u},kn.prototype.value=function ws(){var u=this.__wrapped__.value(),f=this.__dir__,_=sn(u),w=f<0,S=_?u.length:0,P=function xp(u,f,_){for(var w=-1,S=_.length;++w=this.__values__.length;return{done:u,value:u?V:this.__values__[this.__index__++]}},I.prototype.plant=function nD(u){for(var f,_=this;_ instanceof wc;){var w=ns(_);w.__index__=0,w.__values__=V,f?S.__wrapped__=w:f=w;var S=w;_=_.__wrapped__}return S.__wrapped__=u,f},I.prototype.reverse=function iD(){var u=this.__wrapped__;if(u instanceof kn){var f=u;return this.__actions__.length&&(f=new kn(this)),(f=f.reverse()).__actions__.push({func:Ip,args:[dv],thisArg:V}),new Ai(f,this.__chain__)}return this.thru(dv)},I.prototype.toJSON=I.prototype.valueOf=I.prototype.value=function RF(){return xa(this.__wrapped__,this.__actions__)},I.prototype.first=I.prototype.head,ih&&(I.prototype[ih]=function Yd(){return this}),I}();Sr._=ys,(cn=function(){return ys}.call($s,ps,$s,Bo))!==V&&(Bo.exports=cn)}.call(this)},738:function(Bo){var $s;Bo.exports=(($s=function(){function ps(Ci){return Br.appendChild(Ci.dom),Ci}function cn(Ci){for(var Si=0;SiZt+1e3&&(Al.update(1e3*Un/(Ci-Zt),100),Zt=Ci,Un=0,Ws)){var Si=performance.memory;Ws.update(Si.usedJSHeapSize/1048576,Si.jsHeapSizeLimit/1048576)}return Ci},update:function(){Kr=this.end()},domElement:Br,setMode:cn}}).Panel=function(ps,cn,V){var Br=1/0,Kr=0,Zt=Math.round,Un=Zt(window.devicePixelRatio||1),Al=80*Un,Ha=48*Un,Ws=3*Un,Ci=2*Un,Si=3*Un,ms=15*Un,js=74*Un,Ys=30*Un,Uo=document.createElement("canvas");Uo.width=Al,Uo.height=Ha,Uo.style.cssText="width:80px;height:48px";var On=Uo.getContext("2d");return On.font="bold "+9*Un+"px Helvetica,Arial,sans-serif",On.textBaseline="top",On.fillStyle=V,On.fillRect(0,0,Al,Ha),On.fillStyle=cn,On.fillText(ps,Ws,Ci),On.fillRect(Si,ms,js,Ys),On.fillStyle=V,On.globalAlpha=.9,On.fillRect(Si,ms,js,Ys),{dom:Uo,update:function(ur,mc){Br=Math.min(Br,ur),Kr=Math.max(Kr,ur),On.fillStyle=V,On.globalAlpha=1,On.fillRect(0,0,Al,ms),On.fillStyle=cn,On.fillText(Zt(ur)+" "+ps+" ("+Zt(Br)+"-"+Zt(Kr)+")",Ws,Ci),On.drawImage(Uo,Si+Un,ms,js-Un,Ys,Si,ms,js-Un,Ys),On.fillRect(Si+js-Un,ms,Un,Ys),On.fillStyle=V,On.globalAlpha=.9,On.fillRect(Si+js-Un,ms,Un,Zt((1-ur/mc)*Ys))}}},$s)}},Bo=>{Bo(Bo.s=790)}]); \ No newline at end of file diff --git a/frontend/src/app/components/editor/common/minimap/minimap.component.html b/frontend/src/app/components/editor/common/minimap/minimap.component.html new file mode 100644 index 0000000..1b0dee8 --- /dev/null +++ b/frontend/src/app/components/editor/common/minimap/minimap.component.html @@ -0,0 +1,30 @@ +
+ + + + + + +
+ Track length (m): {{ (trackLength$ | async)?.toFixed(2) }} +
+
diff --git a/frontend/src/app/components/editor/common/minimap/minimap.component.ts b/frontend/src/app/components/editor/common/minimap/minimap.component.ts new file mode 100644 index 0000000..1873822 --- /dev/null +++ b/frontend/src/app/components/editor/common/minimap/minimap.component.ts @@ -0,0 +1,289 @@ +import { + AfterViewInit, + ChangeDetectionStrategy, + Component, + ElementRef, + EventEmitter, + Input, + OnDestroy, + Output, +} from '@angular/core'; +import { BehaviorSubject, combineLatest, fromEvent, Observable, Subject } from 'rxjs'; +import { map, takeUntil } from 'rxjs/operators'; +import { Pnt2, Pnt3, Point2, Point3 } from '@gg-web-engine/core'; + +type Projection = 'x' | 'nx' | 'y' | 'ny' | 'z' | 'nz'; + +@Component({ + selector: 'app-minimap', + templateUrl: './minimap.component.html', + styleUrls: ['./minimap.component.scss'], + changeDetection: ChangeDetectionStrategy.OnPush, +}) +export class MinimapComponent implements AfterViewInit, OnDestroy { + _roadSpline$: BehaviorSubject = new BehaviorSubject([]); + _pointer$: BehaviorSubject = new BehaviorSubject(null); + _projection$: BehaviorSubject = new BehaviorSubject('nz'); + + _roadSplineProjected$: BehaviorSubject = new BehaviorSubject([]); + _pointerProjected$: BehaviorSubject = new BehaviorSubject(Pnt2.O); + + @Input('roadSpline') set roadSpline(value: Point3[]) { + this._roadSpline$.next(value); + } + + @Input('pointer') set pointer(value: Point3 | null) { + this._pointer$.next(value); + } + + @Input('projection') set projection(value: Projection) { + this._projection$.next(value); + } + + @Input() splineClosed: boolean = false; + @Output() pointerChange = new EventEmitter(); + + svgSize$: BehaviorSubject = new BehaviorSubject({ x: 100, y: 100 }); + scalingSquare$: BehaviorSubject<{ x: number; y: number; width: number; height: number }> = new BehaviorSubject<{ + x: number; + y: number; + width: number; + height: number; + }>({ x: 0, y: 0, width: 100, height: 100 }); + mapPolyline$: BehaviorSubject = new BehaviorSubject(''); + mapPointer$: BehaviorSubject = new BehaviorSubject(null); + + private isShiftPressed = false; + + get trackLength$(): Observable { + return this._roadSpline$.pipe( + map(s => { + let ret = 0; + for (let i = 1; i < s.length; i++) { + ret += Pnt3.dist(s[i], s[i - 1]); + } + return ret; + }), + ); + } + + private readonly destroyed$: Subject = new Subject(); + private isDragging = false; + + constructor(private readonly ref: ElementRef) {} + + private projectionKeys(): ['x' | 'y' | 'z', 'x' | 'y' | 'z', 'x' | 'y' | 'z', boolean] { + switch (this._projection$.getValue()) { + case 'nz': + return ['x', 'y', 'z', false]; + case 'z': + return ['x', 'y', 'z', true]; + case 'ny': + return ['x', 'z', 'y', false]; + case 'y': + return ['x', 'z', 'y', true]; + case 'nx': + return ['y', 'z', 'x', false]; + case 'x': + return ['y', 'z', 'x', true]; + } + } + + private unproject(point: Point2, z: number): Point3 { + let [xKey, yKey, zKey, invert] = this.projectionKeys(); + let out = { x: 0, y: 0, z: 0 }; + out[xKey] = point.x; + out[yKey] = invert ? -point.y : point.y; + out[zKey] = invert ? -z : z; + return out; + } + + private projectionZ(point: Point3): number { + let [_, __, zKey, invert] = this.projectionKeys(); + return invert ? -point[zKey] : point[zKey]; + } + + private project(point: Point3): Point2 { + let [xKey, yKey, _, invertY] = this.projectionKeys(); + return { x: point[xKey], y: invertY ? -point[yKey] : point[yKey] }; + } + + ngAfterViewInit() { + fromEvent(window, 'keydown') + .pipe(takeUntil(this.destroyed$)) + .subscribe(event => { + if ((event as KeyboardEvent).key === 'Shift') { + this.isShiftPressed = true; + } + }); + fromEvent(window, 'keyup') + .pipe(takeUntil(this.destroyed$)) + .subscribe(event => { + if ((event as KeyboardEvent).key === 'Shift') { + this.isShiftPressed = false; + } + }); + combineLatest([this._roadSpline$, this._projection$]) + .pipe(takeUntil(this.destroyed$)) + .subscribe(([roadSpline, _]) => { + this._roadSplineProjected$.next(roadSpline.map(p => this.project(p))); + }); + combineLatest([this._pointer$, this._projection$]) + .pipe(takeUntil(this.destroyed$)) + .subscribe(([pointer, _]) => { + this._pointerProjected$.next(this.project(pointer || Pnt3.O)); + }); + this._roadSplineProjected$ + .pipe( + takeUntil(this.destroyed$), + map((points: Point2[]) => { + let minPoint: Point2 = { x: Number.MAX_SAFE_INTEGER, y: Number.MAX_SAFE_INTEGER }; + let maxPoint: Point2 = { x: Number.MIN_SAFE_INTEGER, y: Number.MIN_SAFE_INTEGER }; + points.forEach(p => { + minPoint = { x: Math.min(minPoint.x, p.x), y: Math.min(minPoint.y, p.y) }; + maxPoint = { x: Math.max(maxPoint.x, p.x), y: Math.max(maxPoint.y, p.y) }; + }); + const roadActualSize: Point2 = { x: maxPoint.x - minPoint.x, y: maxPoint.y - minPoint.y }; + // +10% margins + return { + x: minPoint.x - roadActualSize.x * 0.1, + y: minPoint.y - roadActualSize.y * 0.1, + width: roadActualSize.x * 1.2, + height: roadActualSize.y * 1.2, + }; + }), + ) + .subscribe(this.scalingSquare$); + + combineLatest([this._roadSplineProjected$, this.scalingSquare$, this.svgSize$]) + .pipe( + takeUntil(this.destroyed$), + map(([points, scalingSquare, svgSize]) => { + const polygonToDraw: Point2[] = points.map(p => ({ + x: ((p.x - scalingSquare.x) * svgSize.x) / scalingSquare.width, + y: ((scalingSquare.y - p.y) * svgSize.y) / scalingSquare.height + svgSize.y, + })); + if (this.splineClosed && polygonToDraw.length) { + polygonToDraw.push(polygonToDraw[0]); + } + return polygonToDraw.map(v => Math.round(v.x) + ',' + Math.round(v.y)).join(' '); + }), + ) + .subscribe(this.mapPolyline$); + + combineLatest([this._pointerProjected$, this.scalingSquare$.asObservable(), this.svgSize$]) + .pipe( + takeUntil(this.destroyed$), + map(([point, scalingSquare, svgSize]) => { + if (!point) { + return null; + } + return { + x: ((point.x - scalingSquare.x) * svgSize.x) / scalingSquare.width, + y: ((scalingSquare.y - point.y) * svgSize.y) / scalingSquare.height + svgSize.y, + }; + }), + ) + .subscribe(this.mapPointer$); + + const updateSize = () => { + this.svgSize$.next({ x: this.ref.nativeElement.clientWidth, y: this.ref.nativeElement.clientHeight }); + }; + new ResizeObserver(updateSize).observe(this.ref.nativeElement); + updateSize(); + } + + ngOnDestroy(): void { + this.destroyed$.next(); + this.destroyed$.complete(); + } + + startDrag(event: MouseEvent) { + this.isDragging = true; + this.updatePointer(event); + } + + drag(event: MouseEvent) { + if (this.isDragging) { + this.updatePointer(event); + } + } + + endDrag() { + this.isDragging = false; + } + + private getClosestProjectedLineIndex(pos: Point2): [number, number] { + const roadSplineProjected = this._roadSplineProjected$.getValue(); + let closestLineIndex = -1; + let minDistance = Number.MAX_SAFE_INTEGER; + for (let i = 1; i < roadSplineProjected.length; i++) { + const p = roadSplineProjected[i - 1]; + const d = Pnt2.sub(roadSplineProjected[i], roadSplineProjected[i - 1]); + const t = Math.max(0, Math.min(1, ((pos.x - p.x) * d.x + (pos.y - p.y) * d.y) / Pnt2.lenSq(d))); + const projX = p.x + t * d.x; + const projY = p.y + t * d.y; + const distance = Math.hypot(pos.x - projX, pos.y - projY); + if (distance < minDistance) { + minDistance = distance; + closestLineIndex = i - 1; + } + } + if (closestLineIndex == -1) { + return [-1, 0]; + } + const p1 = roadSplineProjected[closestLineIndex]; + const p2 = roadSplineProjected[closestLineIndex + 1]; + const d = Pnt2.sub(p2, p1); + const t = Math.max(0, Math.min(1, ((pos.x - p1.x) * d.x + (pos.y - p1.y) * d.y) / Pnt2.lenSq(d))); + return [closestLineIndex, t]; + } + + private getRoadSplineProjectionZ(pos: Point2): number { + const [closestLineIndex, t] = this.getClosestProjectedLineIndex(pos); + if (closestLineIndex == -1) { + return 0; + } + const roadSpline = this._roadSpline$.getValue(); + return ( + this.projectionZ(roadSpline[closestLineIndex]) + + t * (this.projectionZ(roadSpline[closestLineIndex + 1]) - this.projectionZ(roadSpline[closestLineIndex])) + ); + } + + private updatePointer(event: MouseEvent) { + const boundingRect = this.ref.nativeElement.querySelector('svg')?.getBoundingClientRect(); + if (boundingRect) { + const localPos = { + x: event.clientX - boundingRect.left, + y: boundingRect.height - event.clientY + boundingRect.top, + }; + const scalingSquare = this.scalingSquare$.getValue(); + const svgSize = this.svgSize$.getValue(); + + const oldPtr = this._pointerProjected$.getValue() || Pnt2.O; + let newPtr = { + x: localPos.x * (scalingSquare.width / svgSize.x) + scalingSquare.x, + y: localPos.y * (scalingSquare.height / svgSize.y) + scalingSquare.y, + }; + + if (this.isShiftPressed) { + const roadSplineProjected = this._roadSplineProjected$.getValue(); + const [oldClosestLineIndex, oldT] = this.getClosestProjectedLineIndex(oldPtr); + const [newClosestLineIndex, newT] = this.getClosestProjectedLineIndex(newPtr); + if (oldClosestLineIndex !== -1 && newClosestLineIndex !== -1) { + const oldOffsetVector = Pnt2.sub( + oldPtr, + Pnt2.lerp(roadSplineProjected[oldClosestLineIndex], roadSplineProjected[oldClosestLineIndex + 1], oldT), + ); + newPtr = Pnt2.add( + oldOffsetVector, + Pnt2.lerp(roadSplineProjected[newClosestLineIndex], roadSplineProjected[newClosestLineIndex + 1], newT), + ); + } + } + const elevation = this.projectionZ(this._pointer$.getValue() || Pnt3.O) - this.getRoadSplineProjectionZ(oldPtr); + this.pointerChange.emit(this.unproject(newPtr, elevation + this.getRoadSplineProjectionZ(newPtr))); + } + } +} diff --git a/frontend/src/app/components/editor/eac/trk-map.block-ui/trk-map.block-ui.component.html b/frontend/src/app/components/editor/eac/trk-map.block-ui/trk-map.block-ui.component.html index 520a707..6073599 100644 --- a/frontend/src/app/components/editor/eac/trk-map.block-ui/trk-map.block-ui.component.html +++ b/frontend/src/app/components/editor/eac/trk-map.block-ui/trk-map.block-ui.component.html @@ -20,9 +20,11 @@

Preview QFS file

[ngModel]='selectedSplineIndex$ | async' (ngModelChange)='selectedSplineIndex$.next($event)'> - +
diff --git a/frontend/src/app/components/editor/eac/trk-map.block-ui/trk-map.block-ui.component.scss b/frontend/src/app/components/editor/eac/trk-map.block-ui/trk-map.block-ui.component.scss index a0a3863..f76ebbc 100644 --- a/frontend/src/app/components/editor/eac/trk-map.block-ui/trk-map.block-ui.component.scss +++ b/frontend/src/app/components/editor/eac/trk-map.block-ui/trk-map.block-ui.component.scss @@ -24,7 +24,7 @@ display: flex; flex-direction: column; - app-tri-minimap { + app-minimap { flex-grow: 1; display: flex; } diff --git a/frontend/src/app/components/editor/eac/trk-map.block-ui/trk-map.block-ui.component.ts b/frontend/src/app/components/editor/eac/trk-map.block-ui/trk-map.block-ui.component.ts index 3c26d37..0a235f3 100644 --- a/frontend/src/app/components/editor/eac/trk-map.block-ui/trk-map.block-ui.component.ts +++ b/frontend/src/app/components/editor/eac/trk-map.block-ui/trk-map.block-ui.component.ts @@ -30,7 +30,6 @@ import { BehaviorSubject, debounceTime, distinctUntilChanged, filter, Subject, t import { EelDelegateService } from '../../../../services/eel-delegate.service'; import { AmbientLight, - ClampToEdgeWrapping, CubeReflectionMapping, DoubleSide, Group, @@ -354,7 +353,7 @@ export class TrkMapBlockUiComponent implements GuiComponentInterface, AfterViewI previewQfsLoading$: BehaviorSubject = new BehaviorSubject(false); private terrainChunksObjLocation: string | undefined; - pointer$: BehaviorSubject = new BehaviorSubject(null); + pointer$: BehaviorSubject = new BehaviorSubject(null); selectedSplineIndex$: BehaviorSubject = new BehaviorSubject(0); qfsPath: string | null = null; @@ -375,10 +374,6 @@ export class TrkMapBlockUiComponent implements GuiComponentInterface, AfterViewI private readonly mainService: MainService, ) {} - get roadSpline(): Point3[] { - return this.resource?.data.block_positions || []; - } - async ngAfterViewInit() { this.world = new Gg3dWorld(new ThreeSceneComponent(), { init: async () => {}, @@ -462,6 +457,11 @@ export class TrkMapBlockUiComponent implements GuiComponentInterface, AfterViewI this.world.start(); this._resource$.pipe(takeUntil(this.destroyed$)).subscribe(async res => { + this.roadPath = this.resource?.data.block_positions.map((p: Point3) => ({ + x: p.x, + y: p.z, + z: p.y, + })); this.previewLoading$.next(true); if (res) { this.previewQfsLocation$.next(res.id.substring(0, res.id.indexOf('.TRK')) + '0.QFS'); @@ -480,6 +480,11 @@ export class TrkMapBlockUiComponent implements GuiComponentInterface, AfterViewI debounceTime(3000), ) .subscribe(async () => { + this.roadPath = this.resource?.data.block_positions.map((p: Point3) => ({ + x: p.x, + y: p.z, + z: p.y, + })); this.previewLoading$.next(true); await this.postTmpUpdates(this.resource?.id); await this.loadPreview(); @@ -555,12 +560,14 @@ export class TrkMapBlockUiComponent implements GuiComponentInterface, AfterViewI } } + onPointerChange(pos: Point3) { + if (!this.renderer) { + return; + } + this.renderer.position = pos; + } + private async loadPreview() { - this.roadPath = this.resource?.data.block_positions.map((p: Point3) => ({ - x: p.x, - y: p.z, - z: p.y, - })); if (!this.terrainChunksObjLocation || !this.roadPath) { return; } From b00c554a6aeaab29989301c9afb8031811823d3e Mon Sep 17 00:00:00 2001 From: andy Date: Fri, 3 Jan 2025 14:28:22 +0200 Subject: [PATCH 11/36] fixed COL reader; fixed TRK props positions reset --- resources/eac/maps/nfs2.py | 8 ++++---- serializers/maps.py | 15 +++++++++------ 2 files changed, 13 insertions(+), 10 deletions(-) diff --git a/resources/eac/maps/nfs2.py b/resources/eac/maps/nfs2.py index 87fcc8c..4973532 100644 --- a/resources/eac/maps/nfs2.py +++ b/resources/eac/maps/nfs2.py @@ -249,12 +249,12 @@ def read(self, buffer: [BufferedReader, BytesIO], ctx: ReadContext = DataBlock.r read_bytes_amount=None): start_offset = buffer.tell() data = super().read(buffer, ctx, name, read_bytes_amount) - extrablocks_offset = 16 - extrablocks_buf = BytesIO(buffer.read(data['block_size'] - (buffer.tell() - start_offset))) + buffer.seek(start_offset) + block_buf = BytesIO(buffer.read(data['block_size'])) child_block = self.field_blocks_map.get('extrablocks').child self_ctx = ReadContext(buffer=buffer, data=data, name=name, block=self, parent=ctx, read_bytes_amount=read_bytes_amount) for offset in data['extrablock_offsets']: - extrablocks_buf.seek(offset - extrablocks_offset) - data['extrablocks'].append(child_block.read(extrablocks_buf, self_ctx)) + block_buf.seek(offset + 16) + data['extrablocks'].append(child_block.read(block_buf, self_ctx)) return data diff --git a/serializers/maps.py b/serializers/maps.py index 9ef1a32..5fe891a 100644 --- a/serializers/maps.py +++ b/serializers/maps.py @@ -890,17 +890,20 @@ def get_texture(tex): for i, vi in enumerate(polygon): submesh.vertex_uvs[vi] = uvs[i] sub_meshes.extend(prop_sub_meshes) - chunks.append([m for m, _, _ in sub_meshes]) - for meshes in chunks: - for mesh in meshes: + chunks.append([[m for m, _, _ in sub_meshes], (pivot['x'], pivot['y'], pivot['z'])]) + for chunk in chunks: + chunk[1] = (chunk[1][0], chunk[1][2], chunk[1][1]) + for mesh in chunk[0]: mesh.pivot_offset = (mesh.pivot_offset[0], mesh.pivot_offset[2], mesh.pivot_offset[1]) mesh.change_axes(new_z='y', new_y='z') if self.settings.maps__save_as_chunked: - for i, chunk in enumerate(chunks): + for i, (meshes, pivot) in enumerate(chunks): with open(os.path.join(path, f'terrain_chunk_{i}.obj'), 'w') as f: face_index_increment = 1 - for mesh in chunk: - mesh.pivot_offset = (0, 0, 0) + for mesh in meshes: + mesh.pivot_offset = (mesh.pivot_offset[0] - pivot[0], + mesh.pivot_offset[1] - pivot[1], + mesh.pivot_offset[2] - pivot[2]) obj, fii = mesh.to_obj(face_index_increment) f.write(obj) face_index_increment += fii From 75884904c905365078523e9a4942841cd92101d9 Mon Sep 17 00:00:00 2001 From: andy Date: Fri, 3 Jan 2025 17:22:30 +0200 Subject: [PATCH 12/36] enum lookup delegate field; added missing extrablock declaration for TRK/COL --- generate_resource_doc.py | 13 ++- library/context.py | 11 ++- library/read_blocks/array.py | 4 + library/read_blocks/basic.py | 5 + library/read_blocks/compound.py | 6 ++ library/read_blocks/smart_fields.py | 21 ++++ resources/NFS2.md | 60 ++++++++++-- resources/TNFS_SE.md | 6 +- resources/eac/fields/misc.py | 19 +++- resources/eac/maps/__init__.py | 5 + resources/eac/maps/nfs2.py | 143 ++++++++++++++++++---------- resources/eac/maps/tnfs.py | 18 ++-- resources/eac/palettes.py | 5 + 13 files changed, 238 insertions(+), 78 deletions(-) diff --git a/generate_resource_doc.py b/generate_resource_doc.py index fcadf55..83018ac 100644 --- a/generate_resource_doc.py +++ b/generate_resource_doc.py @@ -1,6 +1,7 @@ from datetime import datetime, timezone from library.read_blocks import CompoundBlock, ArrayBlock, DataBlock, DelegateBlock, SkipBlock +from library.read_blocks.smart_fields import EnumLookupDelegateBlock from resources.eac import (archives, bitmaps, fonts, @@ -27,8 +28,11 @@ def render_type(instance: DataBlock, possible_blocks_filter=None) -> str: not possible_blocks_filter or x.__class__ in possible_blocks_filter or (not isinstance(x, CompoundBlock) or x.schema["inline_description"]))] - return 'One of types:
' + '
'.join(['- ' + render_type(x, possible_blocks_filter) - for x in possible_blocks]) + if isinstance(instance, EnumLookupDelegateBlock): + description = f'Type according to enum `{instance.enum_field}`:
' + else: + description = f'One of types:
' + return description + '
'.join(['- ' + render_type(x, possible_blocks_filter) for x in possible_blocks]) if not isinstance(instance, CompoundBlock) or schema["inline_description"]: descr = schema['block_description'] if isinstance(instance, ArrayBlock): @@ -168,10 +172,15 @@ def render_type(instance: DataBlock, possible_blocks_filter=None) -> str: maps.TrkBlock(), maps.TrkExtraBlock(), maps.TexturesMapExtraDataRecord(), + maps.MedianExtraDataRecord(), maps.PolygonMapExtraDataRecord(), maps.PropExtraDataRecord(), + maps.AnimatedPropPosition(), + maps.AnimatedPropPositionFrame(), maps.PropDescriptionExtraDataRecord(), + maps.LanesExtraDataRecord(), maps.RoadVectorsExtraDataRecord(), + maps.CollisionExtraDataRecord(), maps.TrkPolygon(), ], # 'Physics': [ diff --git a/library/context.py b/library/context.py index 95fd7c4..48fb49c 100644 --- a/library/context.py +++ b/library/context.py @@ -9,7 +9,7 @@ def ctx_path(self): def __init__(self, name: str = '', data=None, block=None, parent=None): self.name = name self._data = data - self.block = block + self._block = block self.parent = parent self.children = [] if self.parent: @@ -27,6 +27,15 @@ def data(self, local_path: str): entry = entry[p] return entry + def block(self, local_path: str): + block_path = local_path.split('/') + entry = self._block + for p in block_path: + if p == '..': + return self.parent.block('/'.join(block_path[1:])) + entry = entry.get_child_block(p) + return entry + def get_full_data(self): return self._data diff --git a/library/read_blocks/array.py b/library/read_blocks/array.py index f63bc8c..270ba2a 100644 --- a/library/read_blocks/array.py +++ b/library/read_blocks/array.py @@ -79,6 +79,10 @@ def resolve_length(self, ctx): self_len = self_len(ctx) return self_len + def get_child_block(self, name: str) -> 'DataBlock': + int(name) + return self.child + def get_child_block_with_data(self, unpacked_data: list, name: str) -> Tuple['DataBlock', Any]: return self.child, unpacked_data[int(name)] diff --git a/library/read_blocks/basic.py b/library/read_blocks/basic.py index 38ec341..970f1cd 100644 --- a/library/read_blocks/basic.py +++ b/library/read_blocks/basic.py @@ -69,6 +69,11 @@ def pack(self, data, ctx: WriteContext = None, name: str = '') -> bytes: class DataBlockWithChildren(ABC): + ### get child block + @abstractmethod + def get_child_block(self, name: str) -> 'DataBlock': + pass + ### get child block with appropriate data from this block unpacked data @abstractmethod def get_child_block_with_data(self, unpacked_data: dict, name: str) -> Tuple['DataBlock', Any]: diff --git a/library/read_blocks/compound.py b/library/read_blocks/compound.py index 3bd19a1..cf68b15 100644 --- a/library/read_blocks/compound.py +++ b/library/read_blocks/compound.py @@ -41,6 +41,12 @@ def schema(self) -> Dict: schema['block_description'] = self.inline_description return schema + def get_child_block(self, name: str) -> 'DataBlock': + field = self.field_blocks_map.get(name) + if field is None: + raise BlockDefinitionException(None, f'Cannot find field {name}') + return field + def get_child_block_with_data(self, unpacked_data: dict, name: str) -> Tuple['DataBlock', Any]: field = self.field_blocks_map.get(name) if field is None: diff --git a/library/read_blocks/smart_fields.py b/library/read_blocks/smart_fields.py index 54626e0..22ae9f0 100644 --- a/library/read_blocks/smart_fields.py +++ b/library/read_blocks/smart_fields.py @@ -1,6 +1,8 @@ +import traceback from io import BufferedReader, BytesIO from typing import List, Dict, Tuple, Any +import settings from library.context import ReadContext, WriteContext, DocumentationContext from library.exceptions import DataIntegrityException from library.read_blocks.basic import DataBlock, SkipBlock, BytesBlock @@ -134,3 +136,22 @@ def detect(self, ctx, name=None): return i raise DataIntegrityException(ctx=ctx, message='Expectation failed for auto-detect block while reading: class not found') + + +def _enum_lookup(ctx, enum_field, fallback_index): + try: + return [name for (_, name) in ctx.block(enum_field).enum_names].index(ctx.data(enum_field)) + except Exception: + if settings.print_errors: + traceback.print_exc() + return fallback_index + + +class EnumLookupDelegateBlock(DelegateBlock): + + def __init__(self, enum_field: str, blocks: List[DataBlock], **kwargs): + super().__init__(possible_blocks=blocks, + choice_index=lambda ctx, **_: _enum_lookup(ctx, enum_field, len(blocks) - 1), + **kwargs) + self.enum_field = enum_field + diff --git a/resources/NFS2.md b/resources/NFS2.md index 45537e0..51f0c3c 100644 --- a/resources/NFS2.md +++ b/resources/NFS2.md @@ -1,6 +1,6 @@ # **NFS2 file specs** # -*Last time updated: 2025-01-02 01:05:35.351955+00:00* +*Last time updated: 2025-01-03 15:11:07.077716+00:00* # **Info by file extensions** # @@ -179,18 +179,24 @@ Did not find what you need or some given data is wrong? Please submit an | Offset | Name | Size (bytes) | Type | Description | | --- | --- | --- | --- | --- | | 0 | **block_size** | 4 | 4-bytes unsigned integer (little endian) | Block size | -| 4 | **type** | 1 | Enum of 256 possible values
Value names:2: textures_map
4: block_numbers
5: polygon_map
6: median_polygons
7: props_7
8: prop_descriptions
9: lanes
13: road_vectors
15: positions
18: props_18
| - | +| 4 | **type** | 1 | Enum of 256 possible values
Value names:2: textures_map
4: block_numbers
5: polygon_map
6: median_polygons
7: props_7
8: prop_descriptions
9: lanes
13: road_vectors
15: collision_data
18: props_18
19: props_19
| - | | 5 | **unk** | 1 | 1-byte unsigned integer. Always == 0x0 | - | | 6 | **num_data_records** | 2 | 2-bytes unsigned integer (little endian) | - | -| 8 | **data_records** | ? | One of types:
- Array of `num_data_records` items
Item type: [TexturesMapExtraDataRecord](#texturesmapextradatarecord)
- Array of `num_data_records` items
Item size: 2 bytes
Item type: 2-bytes unsigned integer (little endian)
- Array of `num_data_records` items
Item type: [PolygonMapExtraDataRecord](#polygonmapextradatarecord)
- Bytes
- Array of `num_data_records` items
Item type: [PropExtraDataRecord](#propextradatarecord)
- Array of `num_data_records` items
Item type: [PropDescriptionExtraDataRecord](#propdescriptionextradatarecord)
- Bytes
- Array of `num_data_records` items
Item type: [RoadVectorsExtraDataRecord](#roadvectorsextradatarecord)
- Bytes
- Array of `num_data_records` items
Item type: [PropExtraDataRecord](#propextradatarecord)
- Bytes | - | +| 8 | **data_records** | ? | Type according to enum `type`:
- Array of `num_data_records` items
Item type: [TexturesMapExtraDataRecord](#texturesmapextradatarecord)
- Array of `num_data_records` items
Item size: 2 bytes
Item type: 2-bytes unsigned integer (little endian)
- Array of `num_data_records` items
Item type: [PolygonMapExtraDataRecord](#polygonmapextradatarecord)
- Array of `num_data_records` items
Item type: [MedianExtraDataRecord](#medianextradatarecord)
- Array of `num_data_records` items
Item type: [PropExtraDataRecord](#propextradatarecord)
- Array of `num_data_records` items
Item type: [PropDescriptionExtraDataRecord](#propdescriptionextradatarecord)
- Array of `num_data_records` items
Item type: [LanesExtraDataRecord](#lanesextradatarecord)
- Array of `num_data_records` items
Item type: [RoadVectorsExtraDataRecord](#roadvectorsextradatarecord)
- Array of `num_data_records` items
Item type: [CollisionExtraDataRecord](#collisionextradatarecord)
- Array of `num_data_records` items
Item type: [PropExtraDataRecord](#propextradatarecord)
- Array of `num_data_records` items
Item type: [PropExtraDataRecord](#propextradatarecord)
- Bytes | - | ### **TexturesMapExtraDataRecord** ### #### **Size**: 10 bytes #### | Offset | Name | Size (bytes) | Type | Description | | --- | --- | --- | --- | --- | -| 0 | **texture_number** | 2 | 2-bytes unsigned integer (little endian) | - | +| 0 | **texture_number** | 2 | 2-bytes unsigned integer (little endian) | Texture number in QFS file | | 2 | **alignment_data** | 2 | 2-bytes unsigned integer (little endian) | - | -| 4 | **rgb0** | 3 | 3-bytes unsigned integer (little endian) | - | -| 7 | **rgb1** | 3 | 3-bytes unsigned integer (little endian) | - | +| 4 | **luminosity** | 3 | Color RGB values | Luminosity color | +| 7 | **black** | 3 | Color RGB values | Unknown, usually black | +### **MedianExtraDataRecord** ### +#### **Size**: 8 bytes #### +| Offset | Name | Size (bytes) | Type | Description | +| --- | --- | --- | --- | --- | +| 0 | **polygon_idx** | 1 | 1-byte unsigned integer | Polygon index | +| 1 | **unk** | 7 | Bytes | Unknown purpose | ### **PolygonMapExtraDataRecord** ### #### **Size**: 2 bytes #### | Offset | Name | Size (bytes) | Type | Description | @@ -204,7 +210,20 @@ Did not find what you need or some given data is wrong? Please submit an | 0 | **block_size** | 2 | 2-bytes unsigned integer (little endian) | Block size | | 2 | **type** | 1 | Enum of 256 possible values
Value names:1: static_prop
3: animated_prop
| - | | 3 | **prop_descr_idx** | 1 | 1-byte unsigned integer | - | -| 4 | **position** | ? | One of types:
- Point in 3D space (x,y,z), where each coordinate is: 32-bit real number (little-endian, signed), where last 16 bits is a fractional part
- Bytes | - | +| 4 | **position** | ? | Type according to enum `type`:
- Point in 3D space (x,y,z), where each coordinate is: 32-bit real number (little-endian, signed), where last 16 bits is a fractional part
- [AnimatedPropPosition](#animatedpropposition)
- Bytes | - | +### **AnimatedPropPosition** ### +#### **Size**: 4..? bytes #### +| Offset | Name | Size (bytes) | Type | Description | +| --- | --- | --- | --- | --- | +| 0 | **num_frames** | 2 | 2-bytes unsigned integer (little endian) | - | +| 2 | **unk** | 2 | 2-bytes unsigned integer (little endian) | Unknown purpose | +| 4 | **frames** | num_frames\*20 | Array of `num_frames` items
Item type: [AnimatedPropPositionFrame](#animatedproppositionframe) | - | +### **AnimatedPropPositionFrame** ### +#### **Size**: 20 bytes #### +| Offset | Name | Size (bytes) | Type | Description | +| --- | --- | --- | --- | --- | +| 0 | **position** | 12 | Point in 3D space (x,y,z), where each coordinate is: 32-bit real number (little-endian, signed), where last 16 bits is a fractional part | - | +| 12 | **unk0** | 8 | Bytes | Unknown purpose | ### **PropDescriptionExtraDataRecord** ### #### **Size**: 8..? bytes #### | Offset | Name | Size (bytes) | Type | Description | @@ -215,12 +234,35 @@ Did not find what you need or some given data is wrong? Please submit an | 8 | **vertices** | num_vertices\*6 | Array of `num_vertices` items
Item size: 6 bytes
Item type: Point in 3D space (x,y,z), where each coordinate is: 16-bit real number (little-endian, signed), where last 8 bits is a fractional part | - | | 8 + num_vertices\*6 | **polygons** | num_polygons\*8 | Array of `num_polygons` items
Item type: [TrkPolygon](#trkpolygon) | - | | 8 + num_vertices\*6 + num_polygons\*8 | **padding** | custom_func | Bytes | - | +### **LanesExtraDataRecord** ### +#### **Size**: 4 bytes #### +| Offset | Name | Size (bytes) | Type | Description | +| --- | --- | --- | --- | --- | +| 0 | **vertex_idx** | 1 | 1-byte unsigned integer | vertex number (inside background 3D structure : 0 to nv1+nv8) | +| 1 | **track_pos** | 1 | 1-byte unsigned integer | position along track inside block (0 to 7) | +| 2 | **lat_pos** | 1 | 1-byte unsigned integer | lateral position ? (constant in each lane), -1 at the end) | +| 3 | **polygon_idx** | 1 | 1-byte unsigned integer | polygon number (inside full-res backgnd 3D structure : 0 to np1) | ### **RoadVectorsExtraDataRecord** ### #### **Size**: 12 bytes #### | Offset | Name | Size (bytes) | Type | Description | | --- | --- | --- | --- | --- | -| 0 | **normal** | 6 | Point in 3D space (x,y,z), where each coordinate is: 16-bit real number (little-endian, signed), where last 15 bits is a fractional part, normalized | - | -| 6 | **forward** | 6 | Point in 3D space (x,y,z), where each coordinate is: 16-bit real number (little-endian, signed), where last 15 bits is a fractional part, normalized | - | +| 0 | **normal** | 6 | Point in 3D space (x,y,z), where each coordinate is: 16-bit real number (little-endian, signed), where last 16 bits is a fractional part, normalized | - | +| 6 | **forward** | 6 | Point in 3D space (x,y,z), where each coordinate is: 16-bit real number (little-endian, signed), where last 16 bits is a fractional part, normalized | - | +### **CollisionExtraDataRecord** ### +#### **Size**: 36 bytes #### +| Offset | Name | Size (bytes) | Type | Description | +| --- | --- | --- | --- | --- | +| 0 | **position** | 12 | Point in 3D space (x,y,z), where each coordinate is: 32-bit real number (little-endian, signed), where last 16 bits is a fractional part | - | +| 12 | **vertical** | 3 | Point in 3D space (x,y,z), where each coordinate is: 8-bit real number (little-endian, signed), where last 8 bits is a fractional part, normalized | - | +| 15 | **forward** | 3 | Point in 3D space (x,y,z), where each coordinate is: 8-bit real number (little-endian, signed), where last 8 bits is a fractional part, normalized | - | +| 18 | **right** | 3 | Point in 3D space (x,y,z), where each coordinate is: 8-bit real number (little-endian, signed), where last 8 bits is a fractional part, normalized | - | +| 21 | **unk0** | 1 | 1-byte unsigned integer | Unknown purpose | +| 22 | **block_idx** | 2 | 2-bytes unsigned integer (little endian) | - | +| 24 | **unk1** | 2 | 2-bytes unsigned integer (little endian) | Unknown purpose | +| 26 | **left_border** | 2 | 2-bytes unsigned integer (little endian) | - | +| 28 | **right_border** | 2 | 2-bytes unsigned integer (little endian) | - | +| 30 | **respawn_lat_pos** | 2 | 2-bytes unsigned integer (little endian) | - | +| 32 | **unk2** | 4 | 4-bytes unsigned integer (little endian) | Unknown purpose | ### **TrkPolygon** ### #### **Size**: 8 bytes #### | Offset | Name | Size (bytes) | Type | Description | diff --git a/resources/TNFS_SE.md b/resources/TNFS_SE.md index a4f1a70..84f9628 100644 --- a/resources/TNFS_SE.md +++ b/resources/TNFS_SE.md @@ -1,6 +1,6 @@ # **TNFSSE (PC) file specs** # -*Last time updated: 2025-01-03 09:38:58.848509+00:00* +*Last time updated: 2025-01-03 13:20:26.821219+00:00* # **Info by file extensions** # @@ -197,8 +197,8 @@ Did not find what you need or some given data is wrong? Please submit an | Offset | Name | Size (bytes) | Type | Description | | --- | --- | --- | --- | --- | | 0 | **flags** | 1 | 8 flags container
flag names (from least to most significant)2: is_animated
| Different modes of prop | -| 1 | **type** | 1 | Enum of 256 possible values
Value names:0: unk
1: model
4: bitmap
6: two_sided_bitmap
| Type of prop | -| 2 | **data** | 14 | One of types:
- [ModelPropDescrData](#modelpropdescrdata)
- [BitmapPropDescrData](#bitmappropdescrdata)
- [TwoSidedBitmapPropDescrData](#twosidedbitmappropdescrdata)
- Bytes | Settings of the prop. Block class picked according to `type` | +| 1 | **type** | 1 | Enum of 256 possible values
Value names:1: model
4: bitmap
6: two_sided_bitmap
| Type of prop | +| 2 | **data** | 14 | Type according to enum `type`:
- [ModelPropDescrData](#modelpropdescrdata)
- [BitmapPropDescrData](#bitmappropdescrdata)
- [TwoSidedBitmapPropDescrData](#twosidedbitmappropdescrdata)
- Bytes | Settings of the prop. Block class picked according to `type` | ### **MapProp** ### #### **Size**: 16 bytes #### #### **Description**: The prop on the map. For instance: exactly the same road sign used 5 times on the map. In this case file will have 1 PropDescr for this road sign and 5 MapProps #### diff --git a/resources/eac/fields/misc.py b/resources/eac/fields/misc.py index 3bfce07..0d58cb0 100644 --- a/resources/eac/fields/misc.py +++ b/resources/eac/fields/misc.py @@ -13,7 +13,7 @@ class Point3D(CompoundBlock): def schema(self) -> Dict: schema = super().schema return { - **super().schema, + **schema, 'block_description': 'Point in 3D space (x,y,z), where each coordinate is: ' + schema['fields'][0]['schema']['block_description'] + ( ', normalized' if self.normalized else '' @@ -40,6 +40,23 @@ def write(self, data, ctx: WriteContext = None, name: str = '') -> bytes: return super().write(data, ctx, name) +class RGBBlock(CompoundBlock): + + @property + def schema(self) -> Dict: + return { + **super().schema, + 'block_description': "Color RGB values", + 'inline_description': True, + } + + def __init__(self, **kwargs): + child = IntegerBlock(length=1, is_signed=False) + super().__init__(fields=[('r', child, {}), + ('g', child, {}), + ('b', child, {})], **kwargs) + + class FenceType(IntegerBlock): @property def schema(self) -> Dict: diff --git a/resources/eac/maps/__init__.py b/resources/eac/maps/__init__.py index 2e36eb6..89f12f9 100644 --- a/resources/eac/maps/__init__.py +++ b/resources/eac/maps/__init__.py @@ -6,9 +6,14 @@ TrkMapCol, TexturesMapExtraDataRecord, PolygonMapExtraDataRecord, + AnimatedPropPosition, + AnimatedPropPositionFrame, PropExtraDataRecord, PropDescriptionExtraDataRecord, RoadVectorsExtraDataRecord, + MedianExtraDataRecord, + LanesExtraDataRecord, + CollisionExtraDataRecord, ) from .tnfs import (RoadSplinePoint, ModelPropDescrData, diff --git a/resources/eac/maps/nfs2.py b/resources/eac/maps/nfs2.py index 4973532..b8c954a 100644 --- a/resources/eac/maps/nfs2.py +++ b/resources/eac/maps/nfs2.py @@ -4,9 +4,10 @@ from library.context import ReadContext from library.read_blocks import (DeclarativeCompoundBlock, IntegerBlock, - UTF8Block, BytesBlock, ArrayBlock, DataBlock, DelegateBlock, CompoundBlock) + UTF8Block, BytesBlock, ArrayBlock, DataBlock) from library.read_blocks.numbers import EnumByteBlock -from resources.eac.fields.misc import Point3D +from library.read_blocks.smart_fields import EnumLookupDelegateBlock +from resources.eac.fields.misc import Point3D, RGBBlock class TrkPolygon(DeclarativeCompoundBlock): @@ -20,10 +21,14 @@ class Fields(DeclarativeCompoundBlock.Fields): class TexturesMapExtraDataRecord(DeclarativeCompoundBlock): class Fields(DeclarativeCompoundBlock.Fields): - texture_number = IntegerBlock(length=2, is_signed=False) + texture_number = (IntegerBlock(length=2, is_signed=False), + {'description': 'Texture number in QFS file'}) alignment_data = IntegerBlock(length=2, is_signed=False) - rgb0 = IntegerBlock(length=3, is_signed=False) - rgb1 = IntegerBlock(length=3, is_signed=False) + luminosity = (RGBBlock(), + {'description': 'Luminosity color'}) + black = (RGBBlock(), + {'description': 'Unknown, usually black', + 'is_unknown': True}) class PolygonMapExtraDataRecord(DeclarativeCompoundBlock): @@ -34,6 +39,31 @@ class Fields(DeclarativeCompoundBlock.Fields): ]) +class MedianExtraDataRecord(DeclarativeCompoundBlock): + class Fields(DeclarativeCompoundBlock.Fields): + polygon_idx = (IntegerBlock(length=1, is_signed=False), + {'description': 'Polygon index'}) + unk = (BytesBlock(length=7), + {'is_unknown': True}) + + +class AnimatedPropPositionFrame(DeclarativeCompoundBlock): + class Fields(DeclarativeCompoundBlock.Fields): + position = Point3D(child_length=4, fraction_bits=16) + unk0 = (BytesBlock(length=8), + {'is_unknown': True}) + + +class AnimatedPropPosition(DeclarativeCompoundBlock): + class Fields(DeclarativeCompoundBlock.Fields): + num_frames = IntegerBlock(length=2, is_signed=False) + unk = (IntegerBlock(length=2), + {'is_unknown': True}) + frames = ArrayBlock( + length=lambda ctx: ctx.data('num_frames'), + child=AnimatedPropPositionFrame()) + + class PropExtraDataRecord(DeclarativeCompoundBlock): class Fields(DeclarativeCompoundBlock.Fields): block_size = (IntegerBlock(length=2, is_signed=False), @@ -42,25 +72,11 @@ class Fields(DeclarativeCompoundBlock.Fields): (3, 'animated_prop'), ]) prop_descr_idx = IntegerBlock(length=1, is_signed=False) - position = DelegateBlock(possible_blocks=[ - Point3D(child_length=4, fraction_bits=16), - CompoundBlock(fields=[('num_frames', IntegerBlock(length=2, is_signed=False), {}), - ('unk', IntegerBlock(length=2), {'is_unknown': True}), - ('frames', ArrayBlock(length=lambda ctx: ctx.data('num_frames'), - child=CompoundBlock(fields=[ - ('position', Point3D(child_length=4, fraction_bits=16), {}), - ('unk0', IntegerBlock(length=2), - {'is_unknown': True}), - ('unk1', IntegerBlock(length=2), - {'is_unknown': True}), - ('unk2', IntegerBlock(length=2), - {'is_unknown': True}), - ('unk3', IntegerBlock(length=2), - {'is_unknown': True})])), {})]), - BytesBlock(length=lambda ctx: ctx.data('block_size') - 4)], - choice_index=lambda ctx, **_: (0 if ctx.data('type') == 'static_prop' else - 1 if ctx.data('type') == 'animated_prop' else 2) - ) + position = EnumLookupDelegateBlock( + enum_field='type', + blocks=[Point3D(child_length=4, fraction_bits=16), + AnimatedPropPosition(), + BytesBlock(length=lambda ctx: ctx.data('block_size') - 4)]) class PropDescriptionExtraDataRecord(DeclarativeCompoundBlock): @@ -80,10 +96,40 @@ class Fields(DeclarativeCompoundBlock.Fields): padding = BytesBlock(length=lambda ctx: ctx.data('block_size') - ctx.buffer.tell() + ctx.read_start_offset) +class LanesExtraDataRecord(DeclarativeCompoundBlock): + class Fields(DeclarativeCompoundBlock.Fields): + vertex_idx = (IntegerBlock(length=1, is_signed=False), + {'description': 'vertex number (inside background 3D structure : 0 to nv1+nv8)'}) + track_pos = (IntegerBlock(length=1, is_signed=False), + {'description': 'position along track inside block (0 to 7)'}) + lat_pos = (IntegerBlock(length=1, is_signed=False), + {'description': 'lateral position ? (constant in each lane), -1 at the end)'}) + polygon_idx = (IntegerBlock(length=1, is_signed=False), + {'description': 'polygon number (inside full-res backgnd 3D structure : 0 to np1)'}) + + class RoadVectorsExtraDataRecord(DeclarativeCompoundBlock): class Fields(DeclarativeCompoundBlock.Fields): - normal = Point3D(child_length=2, fraction_bits=15, normalized=True) - forward = Point3D(child_length=2, fraction_bits=15, normalized=True) + normal = Point3D(child_length=2, fraction_bits=16, normalized=True) + forward = Point3D(child_length=2, fraction_bits=16, normalized=True) + + +class CollisionExtraDataRecord(DeclarativeCompoundBlock): + class Fields(DeclarativeCompoundBlock.Fields): + position = Point3D(child_length=4, fraction_bits=16) + vertical = Point3D(child_length=1, fraction_bits=8, normalized=True) + forward = Point3D(child_length=1, fraction_bits=8, normalized=True) + right = Point3D(child_length=1, fraction_bits=8, normalized=True) + unk0 = (IntegerBlock(length=1), + {'is_unknown': True}) + block_idx = IntegerBlock(length=2, is_signed=False) + unk1 = (IntegerBlock(length=2), + {'is_unknown': True}) + left_border = IntegerBlock(length=2, is_signed=False) + right_border = IntegerBlock(length=2, is_signed=False) + respawn_lat_pos = IntegerBlock(length=2, is_signed=False) + unk2 = (IntegerBlock(length=4), + {'is_unknown': True}) class TrkExtraBlock(DeclarativeCompoundBlock): @@ -98,34 +144,28 @@ class Fields(DeclarativeCompoundBlock.Fields): (8, 'prop_descriptions'), (9, 'lanes'), (13, 'road_vectors'), - (15, 'positions'), + (15, 'collision_data'), (18, 'props_18'), + (19, 'props_19'), ]) unk = IntegerBlock(length=1, required_value=0) num_data_records = IntegerBlock(length=2) - data_records = DelegateBlock(possible_blocks=[ - ArrayBlock(child=TexturesMapExtraDataRecord(), length=lambda ctx: ctx.data('num_data_records')), - ArrayBlock(child=IntegerBlock(length=2, is_signed=False), length=lambda ctx: ctx.data('num_data_records')), - ArrayBlock(child=PolygonMapExtraDataRecord(), length=lambda ctx: ctx.data('num_data_records')), - BytesBlock(length=lambda ctx: ctx.data('block_size') - 8), - ArrayBlock(child=PropExtraDataRecord(), length=lambda ctx: ctx.data('num_data_records')), - ArrayBlock(child=PropDescriptionExtraDataRecord(), length=lambda ctx: ctx.data('num_data_records')), - BytesBlock(length=lambda ctx: ctx.data('block_size') - 8), - ArrayBlock(child=RoadVectorsExtraDataRecord(), length=lambda ctx: ctx.data('num_data_records')), - BytesBlock(length=lambda ctx: ctx.data('block_size') - 8), - ArrayBlock(child=PropExtraDataRecord(), length=lambda ctx: ctx.data('num_data_records')), - BytesBlock(length=lambda ctx: ctx.data('block_size') - 8)], - choice_index=lambda ctx, **_: (0 if ctx.data('type') == 'textures_map' else - 1 if ctx.data('type') == 'block_numbers' else - 2 if ctx.data('type') == 'polygon_map' else - 3 if ctx.data('type') == 'median_polygons' else - 4 if ctx.data('type') == 'props_7' else - 5 if ctx.data('type') == 'prop_descriptions' else - 6 if ctx.data('type') == 'lanes' else - 7 if ctx.data('type') == 'road_vectors' else - 8 if ctx.data('type') == 'positions' else - 9 if ctx.data('type') == 'props_18' else 10) - ) + data_records = EnumLookupDelegateBlock( + enum_field='type', + blocks=[ + ArrayBlock(child=TexturesMapExtraDataRecord(), length=lambda ctx: ctx.data('num_data_records')), + ArrayBlock(child=IntegerBlock(length=2), length=lambda ctx: ctx.data('num_data_records')), + ArrayBlock(child=PolygonMapExtraDataRecord(), length=lambda ctx: ctx.data('num_data_records')), + ArrayBlock(child=MedianExtraDataRecord(), length=lambda ctx: ctx.data('num_data_records')), + ArrayBlock(child=PropExtraDataRecord(), length=lambda ctx: ctx.data('num_data_records')), + ArrayBlock(child=PropDescriptionExtraDataRecord(), length=lambda ctx: ctx.data('num_data_records')), + ArrayBlock(child=LanesExtraDataRecord(), length=lambda ctx: ctx.data('num_data_records')), + ArrayBlock(child=RoadVectorsExtraDataRecord(), length=lambda ctx: ctx.data('num_data_records')), + ArrayBlock(child=CollisionExtraDataRecord(), length=lambda ctx: ctx.data('num_data_records')), + ArrayBlock(child=PropExtraDataRecord(), length=lambda ctx: ctx.data('num_data_records')), + ArrayBlock(child=PropExtraDataRecord(), length=lambda ctx: ctx.data('num_data_records')), + BytesBlock(length=lambda ctx: ctx.data('block_size') - 8) + ]) class TrkBlock(DeclarativeCompoundBlock): @@ -133,7 +173,8 @@ class Fields(DeclarativeCompoundBlock.Fields): block_size = (IntegerBlock(length=4, is_signed=False), {'description': 'Block size'}) block_size_2 = (IntegerBlock(length=4, is_signed=False), - {'description': 'Block size (duplicated)'}) + {'description': 'Block size (duplicated)', + 'programmatic_value': lambda ctx: ctx.data('block_size')}) num_extrablocks = (IntegerBlock(length=2, is_signed=False), {'description': 'number of extrablocks'}) unk0 = (IntegerBlock(length=2, is_signed=False), diff --git a/resources/eac/maps/tnfs.py b/resources/eac/maps/tnfs.py index 742435d..4f39753 100644 --- a/resources/eac/maps/tnfs.py +++ b/resources/eac/maps/tnfs.py @@ -6,9 +6,9 @@ BytesBlock, ArrayBlock, UTF8Block, - DelegateBlock, SubByteArrayBlock) from library.read_blocks.numbers import EnumByteBlock +from library.read_blocks.smart_fields import EnumLookupDelegateBlock from resources.eac.fields.misc import FenceType, Point3D from resources.eac.fields.numbers import Nfs1Angle14, RationalNumber, Nfs1Angle8, Nfs1Angle16, Nfs1TimeField @@ -192,17 +192,13 @@ def schema(self) -> Dict: class Fields(DeclarativeCompoundBlock.Fields): flags = (BitFlagsBlock(flag_names=[(2, 'is_animated')]), {'description': 'Different modes of prop'}) - type = (EnumByteBlock(enum_names=[(0, 'unk'), (1, 'model'), (4, 'bitmap'), (6, 'two_sided_bitmap')]), + type = (EnumByteBlock(enum_names=[(1, 'model'), (4, 'bitmap'), (6, 'two_sided_bitmap')]), {'description': 'Type of prop'}) - data = (DelegateBlock(possible_blocks=[ModelPropDescrData(), - BitmapPropDescrData(), - TwoSidedBitmapPropDescrData(), - BytesBlock(length=14)], - choice_index=lambda ctx, **_: 0 if ctx.data('type') == 'model' else ( - 1 if ctx.data('type') == 'bitmap' else ( - 2 if ctx.data('type') == 'two_sided_bitmap' else 3 - ) - )), + data = (EnumLookupDelegateBlock(enum_field='type', + blocks=[ModelPropDescrData(), + BitmapPropDescrData(), + TwoSidedBitmapPropDescrData(), + BytesBlock(length=14)]), {'description': 'Settings of the prop. Block class picked according to `type`'}) diff --git a/resources/eac/palettes.py b/resources/eac/palettes.py index aa23718..53cae2d 100644 --- a/resources/eac/palettes.py +++ b/resources/eac/palettes.py @@ -29,6 +29,11 @@ def new_data(self): return {**super().new_data(), 'last_color_transparent': False} + def get_child_block(self, name: str) -> 'DataBlock': + if name == 'last_color_transparent': + return None + return super().get_child_block(name) + 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'] From afc3d22c956e537f03b147af7351c0786197f38f Mon Sep 17 00:00:00 2001 From: andy Date: Thu, 9 Jan 2025 23:21:39 +0200 Subject: [PATCH 13/36] hex editor --- frontend/angular.json | 8 +- frontend/dist/gui/3rdpartylicenses.txt | 3 + frontend/dist/gui/index.html | 6 +- frontend/dist/gui/main.93e6f667a9a3161b.js | 1 - frontend/dist/gui/main.bfac01a483b35508.js | 1 + frontend/dist/gui/scripts.d5dc2919fc5b98cb.js | 1 - frontend/package-lock.json | 13 + frontend/package.json | 1 + frontend/src/app/app.module.ts | 21 +- .../app/components/editor/editor.component.ts | 23 +- .../binary.block-ui.component.html | 8 +- .../binary.block-ui.component.ts | 79 +- frontend/src/libs/hex-editor/README.md | 1 - frontend/src/libs/hex-editor/index.js | 2228 ----------------- library/read_blocks/basic.py | 3 + 15 files changed, 81 insertions(+), 2316 deletions(-) delete mode 100644 frontend/dist/gui/main.93e6f667a9a3161b.js create mode 100644 frontend/dist/gui/main.bfac01a483b35508.js delete mode 100644 frontend/dist/gui/scripts.d5dc2919fc5b98cb.js delete mode 100644 frontend/src/libs/hex-editor/README.md delete mode 100644 frontend/src/libs/hex-editor/index.js diff --git a/frontend/angular.json b/frontend/angular.json index b214958..1bcc664 100644 --- a/frontend/angular.json +++ b/frontend/angular.json @@ -31,9 +31,7 @@ "./node_modules/@angular/material/prebuilt-themes/indigo-pink.css", "src/styles.scss" ], - "scripts": [ - "src/libs/hex-editor/index.js" - ] + "scripts": [] }, "configurations": { "production": { @@ -105,9 +103,7 @@ "./node_modules/@angular/material/prebuilt-themes/indigo-pink.css", "src/styles.scss" ], - "scripts": [ - "src/libs/hex-editor/index.js" - ] + "scripts": [] } } } diff --git a/frontend/dist/gui/3rdpartylicenses.txt b/frontend/dist/gui/3rdpartylicenses.txt index eb48105..eb54f78 100644 --- a/frontend/dist/gui/3rdpartylicenses.txt +++ b/frontend/dist/gui/3rdpartylicenses.txt @@ -137,6 +137,9 @@ The above copyright notice and this permission notice shall be included in all c THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +ngx-hex-editor +Apache-2.0 + rxjs Apache-2.0 Apache License diff --git a/frontend/dist/gui/index.html b/frontend/dist/gui/index.html index f051a0e..32a4a19 100644 --- a/frontend/dist/gui/index.html +++ b/frontend/dist/gui/index.html @@ -6,11 +6,11 @@ - - + + - + \ No newline at end of file diff --git a/frontend/dist/gui/main.93e6f667a9a3161b.js b/frontend/dist/gui/main.93e6f667a9a3161b.js deleted file mode 100644 index 33dba36..0000000 --- a/frontend/dist/gui/main.93e6f667a9a3161b.js +++ /dev/null @@ -1 +0,0 @@ -(self.webpackChunkgui=self.webpackChunkgui||[]).push([[179],{790:(Bo,$s,ps)=>{"use strict";function cn(i){return"function"==typeof i}function V(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 Br=V(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 Kr(i,t){if(i){const e=i.indexOf(t);0<=e&&i.splice(e,1)}}class Zt{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(cn(n))try{n()}catch(s){t=s instanceof Br?s.errors:[s]}const{_finalizers:r}=this;if(r){this._finalizers=null;for(const s of r)try{Ha(s)}catch(o){t=t??[],o instanceof Br?t=[...t,...o.errors]:t.push(o)}}if(t)throw new Br(t)}}add(t){var e;if(t&&t!==this)if(this.closed)Ha(t);else{if(t instanceof Zt){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)&&Kr(e,t)}remove(t){const{_finalizers:e}=this;e&&Kr(e,t),t instanceof Zt&&t._removeParent(this)}}Zt.EMPTY=(()=>{const i=new Zt;return i.closed=!0,i})();const Un=Zt.EMPTY;function Al(i){return i instanceof Zt||i&&"closed"in i&&cn(i.remove)&&cn(i.add)&&cn(i.unsubscribe)}function Ha(i){cn(i)?i():i.unsubscribe()}const Ws={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 Si(i){Ci.setTimeout(()=>{const{onUnhandledError:t}=Ws;if(!t)throw i;t(i)})}function ms(){}const js=On("C",void 0,void 0);function On(i,t,e){return{kind:i,value:t,error:e}}let ur=null;function mc(i){if(Ws.useDeprecatedSynchronousErrorHandling){const t=!ur;if(t&&(ur={errorThrown:!1,error:null}),i(),t){const{errorThrown:e,error:n}=ur;if(ur=null,e)throw n}}else i()}class Dl extends Zt{constructor(t){super(),this.isStopped=!1,t?(this.destination=t,Al(t)&&t.add(this)):this.destination=ME}static create(t,e,n){return new ha(t,e,n)}next(t){this.isStopped?Xg(function Uo(i){return On("N",i,void 0)}(t),this):this._next(t)}error(t){this.isStopped?Xg(function Ys(i){return On("E",void 0,i)}(t),this):(this.isStopped=!0,this._error(t))}complete(){this.isStopped?Xg(js,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 ua=Function.prototype.bind;function Tl(i,t){return ua.call(i,t)}class Ga{constructor(t){this.partialObserver=t}next(t){const{partialObserver:e}=this;if(e.next)try{e.next(t)}catch(n){md(n)}}error(t){const{partialObserver:e}=this;if(e.error)try{e.error(t)}catch(n){md(n)}else md(t)}complete(){const{partialObserver:t}=this;if(t.complete)try{t.complete()}catch(e){md(e)}}}class ha extends Dl{constructor(t,e,n){let r;if(super(),cn(t)||!t)r={next:t??void 0,error:e??void 0,complete:n??void 0};else{let s;this&&Ws.useDeprecatedNextContext?(s=Object.create(t),s.unsubscribe=()=>this.unsubscribe(),r={next:t.next&&Tl(t.next,s),error:t.error&&Tl(t.error,s),complete:t.complete&&Tl(t.complete,s)}):r=t}this.destination=new Ga(r)}}function md(i){Ws.useDeprecatedSynchronousErrorHandling?function da(i){Ws.useDeprecatedSynchronousErrorHandling&&ur&&(ur.errorThrown=!0,ur.error=i)}(i):Si(i)}function Xg(i,t){const{onStoppedNotification:e}=Ws;e&&Ci.setTimeout(()=>e(i,t))}const ME={closed:!0,next:ms,error:function wE(i){throw i},complete:ms},Kg="function"==typeof Symbol&&Symbol.observable||"@@observable";function $a(i){return i}function a0(i){return 0===i.length?$a:1===i.length?i[0]:function(e){return i.reduce((n,r)=>r(n),e)}}let In=(()=>{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 Pf(i){return i&&i instanceof Dl||function SE(i){return i&&cn(i.next)&&cn(i.error)&&cn(i.complete)}(i)&&Al(i)}(e)?e:new ha(e,n,r);return mc(()=>{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=Wa(n))((r,s)=>{const o=new ha({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)}[Kg](){return this}pipe(...e){return a0(e)(this)}toPromise(e){return new(e=Wa(e))((n,r)=>{let s;this.subscribe(o=>s=o,o=>r(o),()=>n(s))})}}return i.create=t=>new i(t),i})();function Wa(i){var t;return null!==(t=i??Ws.Promise)&&void 0!==t?t:Promise}const fa=V(i=>function(){i(this),this.name="ObjectUnsubscribedError",this.message="object unsubscribed"});let Re=(()=>{class i extends In{constructor(){super(),this.closed=!1,this.currentObservers=null,this.observers=[],this.isStopped=!1,this.hasError=!1,this.thrownError=null}lift(e){const n=new l0(this,this);return n.operator=e,n}_throwIfClosed(){if(this.closed)throw new fa}next(e){mc(()=>{if(this._throwIfClosed(),!this.isStopped){this.currentObservers||(this.currentObservers=Array.from(this.observers));for(const n of this.currentObservers)n.next(e)}})}error(e){mc(()=>{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(){mc(()=>{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?Un:(this.currentObservers=null,s.push(e),new Zt(()=>{this.currentObservers=null,Kr(s,e)}))}_checkFinalizedStatuses(e){const{hasError:n,thrownError:r,isStopped:s}=this;n?e.error(r):s&&e.complete()}asObservable(){const e=new In;return e.source=this,e}}return i.create=(t,e)=>new l0(t,e),i})();class l0 extends Re{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:Un}}function c0(i){return cn(i?.lift)}function ti(i){return t=>{if(c0(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 Yn(i,t,e,n,r){return new EE(i,t,e,n,r)}class EE extends Dl{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 et(i,t){return ti((e,n)=>{let r=0;e.subscribe(Yn(n,s=>{n.next(i.call(t,s,r++))}))})}function pa(i){return this instanceof pa?(this.v=i,this):new pa(i)}function Nf(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 Zg(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 i_=i=>i&&"number"==typeof i.length&&"function"!=typeof i;function r_(i){return cn(i?.then)}function p0(i){return cn(i[Kg])}function m0(i){return Symbol.asyncIterator&&cn(i?.[Symbol.asyncIterator])}function g0(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 _0=function s_(){return"function"==typeof Symbol&&Symbol.iterator?Symbol.iterator:"@@iterator"}();function Bf(i){return cn(i?.[_0])}function v0(i){return function Lf(i,t,e){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var r,n=e.apply(i,t||[]),s=[];return r=Object.create(("function"==typeof AsyncIterator?AsyncIterator:Object).prototype),a("next"),a("throw"),a("return",function o(m){return function(g){return Promise.resolve(g).then(m,h)}}),r[Symbol.asyncIterator]=function(){return this},r;function a(m,g){n[m]&&(r[m]=function(b){return new Promise(function(v,y){s.push([m,b,v,y])>1||l(m,b)})},g&&(r[m]=g(r[m])))}function l(m,g){try{!function c(m){m.value instanceof pa?Promise.resolve(m.value.v).then(d,h):p(s[0][2],m)}(n[m](g))}catch(b){p(s[0][3],b)}}function d(m){l("next",m)}function h(m){l("throw",m)}function p(m,g){m(g),s.shift(),s.length&&l(s[0][0],s[0][1])}}(this,arguments,function*(){const e=i.getReader();try{for(;;){const{value:n,done:r}=yield pa(e.read());if(r)return yield pa(void 0);yield yield pa(n)}}finally{e.releaseLock()}})}function y0(i){return cn(i?.getReader)}function Mr(i){if(i instanceof In)return i;if(null!=i){if(p0(i))return function LE(i){return new In(t=>{const e=i[Kg]();if(cn(e.subscribe))return e.subscribe(t);throw new TypeError("Provided object does not correctly implement Symbol.observable")})}(i);if(i_(i))return function NE(i){return new In(t=>{for(let e=0;e{i.then(e=>{t.closed||(t.next(e),t.complete())},e=>t.error(e)).then(null,Si)})}(i);if(m0(i))return b0(i);if(Bf(i))return function UE(i){return new In(t=>{for(const e of i)if(t.next(e),t.closed)return;t.complete()})}(i);if(y0(i))return function x0(i){return b0(v0(i))}(i)}throw g0(i)}function b0(i){return new In(t=>{(function VE(i,t){var e,n,r,s;return function _d(i,t,e,n){return new(e||(e=Promise))(function(s,o){function a(d){try{c(n.next(d))}catch(h){o(h)}}function l(d){try{c(n.throw(d))}catch(h){o(h)}}function c(d){d.done?s(d.value):function r(s){return s instanceof e?s:new e(function(o){o(s)})}(d.value).then(a,l)}c((n=n.apply(i,t||[])).next())})}(this,void 0,void 0,function*(){try{for(e=Nf(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 Ya(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 rr(i,t,e=1/0){return cn(t)?rr((n,r)=>et((s,o)=>t(n,s,r,o))(Mr(i(n,r))),e):("number"==typeof t&&(e=t),ti((n,r)=>function zE(i,t,e,n,r,s,o,a){const l=[];let c=0,d=0,h=!1;const p=()=>{h&&!l.length&&!c&&t.complete()},m=b=>c{s&&t.next(b),c++;let v=!1;Mr(e(b,d++)).subscribe(Yn(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(Yn(t,m,()=>{h=!0,p()})),()=>{a?.()}}(n,r,i,e)))}function bd(i=1/0){return rr($a,i)}const mo=new In(i=>i.complete());function Gu(i){return i&&cn(i.schedule)}function a_(i){return i[i.length-1]}function w0(i){return cn(a_(i))?i.pop():void 0}function $u(i){return Gu(a_(i))?i.pop():void 0}function l_(i,t=0){return ti((e,n)=>{e.subscribe(Yn(n,r=>Ya(n,i,()=>n.next(r),t),()=>Ya(n,i,()=>n.complete(),t),r=>Ya(n,i,()=>n.error(r),t)))})}function c_(i,t=0){return ti((e,n)=>{n.add(i.schedule(()=>e.subscribe(n),t))})}function d_(i,t){if(!i)throw new Error("Iterable cannot be null");return new In(e=>{Ya(e,t,()=>{const n=i[Symbol.asyncIterator]();Ya(e,t,()=>{n.next().then(r=>{r.done?e.complete():e.next(r.value)})},0,!0)})})}function Ni(i,t){return t?function S0(i,t){if(null!=i){if(p0(i))return function GE(i,t){return Mr(i).pipe(c_(t),l_(t))}(i,t);if(i_(i))return function WE(i,t){return new In(e=>{let n=0;return t.schedule(function(){n===i.length?e.complete():(e.next(i[n++]),e.closed||this.schedule())})})}(i,t);if(r_(i))return function $E(i,t){return Mr(i).pipe(c_(t),l_(t))}(i,t);if(m0(i))return d_(i,t);if(Bf(i))return function jE(i,t){return new In(e=>{let n;return Ya(e,t,()=>{n=i[_0](),Ya(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)}),()=>cn(n?.return)&&n.return()})}(i,t);if(y0(i))return function C0(i,t){return d_(v0(i),t)}(i,t)}throw g0(i)}(i,t):Mr(i)}function Cr(...i){const t=$u(i),e=function M0(i,t){return"number"==typeof a_(i)?i.pop():t}(i,1/0),n=i;return n.length?1===n.length?Mr(n[0]):bd(e)(Ni(n,t)):mo}function Uf(i={}){const{connector:t=(()=>new Re),resetOnError:e=!0,resetOnComplete:n=!0,resetOnRefCountZero:r=!0}=i;return s=>{let o,a,l,c=0,d=!1,h=!1;const p=()=>{a?.unsubscribe(),a=void 0},m=()=>{p(),o=l=void 0,d=h=!1},g=()=>{const b=o;m(),b?.unsubscribe()};return ti((b,v)=>{c++,!h&&!d&&p();const y=l=l??t();v.add(()=>{c--,0===c&&!h&&!d&&(a=xd(g,r))}),y.subscribe(v),!o&&c>0&&(o=new ha({next:M=>y.next(M),error:M=>{h=!0,p(),a=xd(m,e,M),y.error(M)},complete:()=>{d=!0,p(),a=xd(m,n),y.complete()}}),Mr(b).subscribe(o))})(s)}}function xd(i,t,...e){if(!0===t)return void i();if(!1===t)return;const n=new ha({next:()=>{n.unsubscribe(),i()}});return Mr(t(...e)).subscribe(n)}function ci(i){for(let t in i)if(i[t]===ci)return t;throw Error("Could not find renamed property on target object.")}function u_(i,t){for(const e in t)t.hasOwnProperty(e)&&!i.hasOwnProperty(e)&&(i[e]=t[e])}function pi(i){if("string"==typeof i)return i;if(Array.isArray(i))return"["+i.map(pi).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 Vf(i,t){return null==i||""===i?null===t?"":t:null==t||""===t?i:i+" "+t}const h_=ci({__forward_ref__:ci});function Gn(i){return i.__forward_ref__=Gn,i.toString=function(){return pi(this())},i}function Pt(i){return Wu(i)?i():i}function Wu(i){return"function"==typeof i&&i.hasOwnProperty(h_)&&i.__forward_ref__===Gn}function ju(i){return i&&!!i.\u0275providers}const qu="https://g.co/ng/security#xss";class pe extends Error{constructor(t,e){super(zf(t,e)),this.code=t}}function zf(i,t){return`NG0${Math.abs(i)}${t?": "+t.trim():""}`}function Qt(i){return"string"==typeof i?i:null==i?"":String(i)}function Hf(i,t){throw new pe(-201,!1)}function En(i,t){null==i&&function ni(i,t,e,n){throw new Error(`ASSERTION ERROR: ${i}`+(null==n?"":` [Expected=> ${e} ${n} ${t} <=Actual]`))}(t,i,null,"!=")}function ke(i){return{token:i.token,providedIn:i.providedIn||null,factory:i.factory,value:void 0}}function Kt(i){return{providers:i.providers||[],imports:i.imports||[]}}function Gf(i){return f_(i,wd)||f_(i,m_)}function f_(i,t){return i.hasOwnProperty(t)?i[t]:null}function p_(i){return i&&(i.hasOwnProperty(gs)||i.hasOwnProperty(D0))?i[gs]:null}const wd=ci({\u0275prov:ci}),gs=ci({\u0275inj:ci}),m_=ci({ngInjectableDef:ci}),D0=ci({ngInjectorDef:ci});var Ot=(()=>((Ot=Ot||{})[Ot.Default=0]="Default",Ot[Ot.Host=1]="Host",Ot[Ot.Self=2]="Self",Ot[Ot.SkipSelf=4]="SkipSelf",Ot[Ot.Optional=8]="Optional",Ot))();let $f;function Xs(i){const t=$f;return $f=i,t}function _s(i,t,e){const n=Gf(i);return n&&"root"==n.providedIn?void 0===n.value?n.value=n.factory():n.value:e&Ot.Optional?null:void 0!==t?t:void Hf(pi(i))}const Rn=(()=>typeof globalThis<"u"&&globalThis||typeof global<"u"&&global||typeof window<"u"&&window||typeof self<"u"&&typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&self)(),Rl={},Ku="__NG_DI_FLAG__",mi="ngTempTokenPath",kl="ngTokenPath",g_=/\n/gm,eA="\u0275",Wf="__source";let Zu;function Md(i){const t=Zu;return Zu=i,t}function tA(i,t=Ot.Default){if(void 0===Zu)throw new pe(-203,!1);return null===Zu?_s(i,void 0,t):Zu.get(i,t&Ot.Optional?null:void 0,t)}function ee(i,t=Ot.Default){return(function T0(){return $f}()||tA)(Pt(i),t)}function Ft(i,t=Ot.Default){return ee(i,jf(t))}function jf(i){return typeof i>"u"||"number"==typeof i?i:0|(i.optional&&8)|(i.host&&1)|(i.self&&2)|(i.skipSelf&&4)}function Yf(i){const t=[];for(let e=0;e((go=go||{})[go.OnPush=0]="OnPush",go[go.Default=1]="Default",go))(),Ks=(()=>{return(i=Ks||(Ks={}))[i.Emulated=0]="Emulated",i[i.None=2]="None",i[i.ShadowDom=3]="ShadowDom",Ks;var i})();const Xa={},$n=[],Ur=ci({\u0275cmp:ci}),Ju=ci({\u0275dir:ci}),yc=ci({\u0275pipe:ci}),y_=ci({\u0275mod:ci}),ma=ci({\u0275fac:ci}),eh=ci({__NG_ELEMENT_ID__:ci});let nA=0;function ot(i){return qa(()=>{const t=_o(i),e={...t,decls:i.decls,vars:i.vars,template:i.template,consts:i.consts||null,ngContentSelectors:i.ngContentSelectors,onPush:i.changeDetection===go.OnPush,directiveDefs:null,pipeDefs:null,dependencies:t.standalone&&i.dependencies||null,getStandaloneInjector:null,data:i.data||{},encapsulation:i.encapsulation||Ks.Emulated,id:"c"+nA++,styles:i.styles||$n,_:null,schemas:i.schemas||null,tView:null};b_(e);const n=i.dependencies;return e.directiveDefs=Xf(n,!1),e.pipeDefs=Xf(n,!0),e})}function th(i,t,e){const n=i.\u0275cmp;n.directiveDefs=Xf(t,!1),n.pipeDefs=Xf(e,!0)}function iA(i){return Hn(i)||Vr(i)}function Sd(i){return null!==i}function nn(i){return qa(()=>({type:i.type,bootstrap:i.bootstrap||$n,declarations:i.declarations||$n,imports:i.imports||$n,exports:i.exports||$n,transitiveCompileScopes:null,schemas:i.schemas||null,id:i.id||null}))}function qf(i,t){if(null==i)return Xa;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 ve(i){return qa(()=>{const t=_o(i);return b_(t),t})}function Gi(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 Hn(i){return i[Ur]||null}function Vr(i){return i[Ju]||null}function vs(i){return i[yc]||null}function hr(i,t){const e=i[y_]||null;if(!e&&!0===t)throw new Error(`Type ${pi(i)} does not have '\u0275mod' property.`);return e}function _o(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||$n,viewQuery:i.viewQuery||null,features:i.features||null,setInput:null,findHostDirectiveDefs:null,hostDirectives:null,inputs:qf(i.inputs,t),outputs:qf(i.outputs)}}function b_(i){i.features?.forEach(t=>t(i))}function Xf(i,t){if(!i)return null;const e=t?vs:iA;return()=>("function"==typeof i?i():i).map(n=>e(n)).filter(Sd)}const Ka=0,at=1,fn=2,Bi=3,ys=4,X=5,ue=6,oe=7,Ue=8,$t=9,Vn=10,yt=11,oi=12,bc=13,R0=14,Er=15,sr=16,nh=17,Ho=18,Zs=19,Pl=20,ii=21,bi=22,Ad=1,k0=2,Kf=7,Zf=8,Za=9,Ui=10;function bs(i){return Array.isArray(i)&&"object"==typeof i[Ad]}function xs(i){return Array.isArray(i)&&!0===i[Ad]}function Qf(i){return 0!=(4&i.flags)}function Dd(i){return i.componentOffset>-1}function xc(i){return 1==(1&i.flags)}function vo(i){return!!i.template}function ih(i){return 0!=(256&i[fn])}function Qa(i,t){return i.hasOwnProperty(ma)?i[ma]:null}class Id{constructor(t,e,n){this.previousValue=t,this.currentValue=e,this.firstChange=n}isFirstChange(){return this.firstChange}}function xi(){return Rd}function Rd(i){return i.type.prototype.ngOnChanges&&(i.setInput=kd),tp}function tp(){const i=N0(this),t=i?.current;if(t){const e=i.previous;if(e===Xa)i.previous=t;else for(let n in t)e[n]=t[n];i.current=null,this.ngOnChanges(t)}}function kd(i,t,e,n){const r=this.declaredInputs[e],s=N0(i)||function lA(i,t){return i[L0]=t}(i,{previous:Xa,current:null}),o=s.current||(s.current={}),a=s.previous,l=a[r];o[r]=new Id(l&&l.currentValue,t,a===Xa),i[n]=t}xi.ngInherit=!0;const L0="__ngSimpleChanges__";function N0(i){return i[L0]||null}const Qr=function(i,t,e){},Pd="svg";function I(i){for(;Array.isArray(i);)i=i[Ka];return i}function wc(i,t){return I(t[i])}function Ai(i,t){return I(t[i.index])}function B0(i,t){return i.data[t]}function Fd(i,t){return i[t]}function ws(i,t){const e=t[i];return bs(e)?e:e[Ka]}function np(i){return 64==(64&i[fn])}function Ol(i,t){return null==t?null:i[t]}function U0(i){i[Ho]=0}function A_(i,t){i[X]+=t;let e=i,n=i[Bi];for(;null!==n&&(1===t&&1===e[X]||-1===t&&0===e[X]);)n[X]+=t,e=n,n=n[Bi]}const kt={lFrame:el(null),bindingsEnabled:!0};function ga(){return kt.bindingsEnabled}function Se(){return kt.lFrame.lView}function zn(){return kt.lFrame.tView}function rn(i){return kt.lFrame.contextLView=i,i[Ue]}function Ut(i){return kt.lFrame.contextLView=null,i}function Ar(){let i=z0();for(;null!==i&&64===i.type;)i=i.parent;return i}function z0(){return kt.lFrame.currentTNode}function _a(i,t){const e=kt.lFrame;e.currentTNode=i,e.isParent=t}function D_(){return kt.lFrame.isParent}function T_(){kt.lFrame.isParent=!1}function zr(){const i=kt.lFrame;let t=i.bindingRootIndex;return-1===t&&(t=i.bindingRootIndex=i.tView.bindingStartIndex),t}function Fl(){return kt.lFrame.bindingIndex++}function Qs(i){const t=kt.lFrame,e=t.bindingIndex;return t.bindingIndex=t.bindingIndex+i,e}function $0(i,t){const e=kt.lFrame;e.bindingIndex=e.bindingRootIndex=i,Go(t)}function Go(i){kt.lFrame.currentDirectiveIndex=i}function rh(i){const t=kt.lFrame.currentDirectiveIndex;return-1===t?null:i[t]}function Ll(){return kt.lFrame.currentQueryIndex}function Ms(i){kt.lFrame.currentQueryIndex=i}function vA(i){const t=i[at];return 2===t.type?t.declTNode:1===t.type?i[ue]:null}function R_(i,t,e){if(e&Ot.SkipSelf){let r=t,s=i;for(;!(r=r.parent,null!==r||e&Ot.Host||(r=vA(s),null===r||(s=s[Er],10&r.type))););if(null===r)return!1;t=r,i=s}const n=kt.lFrame=Ld();return n.currentTNode=t,n.lView=i,!0}function rp(i){const t=Ld(),e=i[at];kt.lFrame=t,t.currentTNode=e.firstChild,t.lView=i,t.tView=e,t.contextLView=i,t.bindingIndex=e.bindingStartIndex,t.inI18n=!1}function Ld(){const i=kt.lFrame,t=null===i?null:i.child;return null===t?el(i):t}function el(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 k_(){const i=kt.lFrame;return kt.lFrame=i.parent,i.currentTNode=null,i.lView=null,i}const W0=k_;function Nd(){const i=k_();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 Xn(){return kt.lFrame.selectedIndex}function tl(i){kt.lFrame.selectedIndex=i}function Di(){const i=kt.lFrame;return B0(i.tView,i.selectedIndex)}function ki(){kt.lFrame.currentNamespace=Pd}function va(){!function Cc(){kt.lFrame.currentNamespace=null}()}function Bd(i,t){for(let e=t.directiveStart,n=t.directiveEnd;e=n)break}else t[l]<0&&(i[Ho]+=65536),(a>11>16&&(3&i[fn])===t){i[fn]+=2048,Qr(4,a,s);try{s.call(a)}finally{Qr(5,a,s)}}}else{Qr(4,a,s);try{s.call(a)}finally{Qr(5,a,s)}}}const ya=-1;class Ud{constructor(t,e,n){this.factory=t,this.resolving=!1,this.canSeeViewProviders=e,this.injectImpl=n}}function L_(i,t,e){let n=0;for(;nt){o=s-1;break}}}for(;s>16}(i),n=t;for(;e>0;)n=n[Er],e--;return n}let Vd=!0;function cp(i){const t=Vd;return Vd=i,t}const B_=255,Z0=5;let Q0=0;const ba={};function ah(i,t){const e=J0(i,t);if(-1!==e)return e;const n=t[at];n.firstCreatePass&&(i.injectorIndex=t.length,lh(n.data,i),lh(t,null),lh(n.blueprint,null));const r=ch(i,t),s=i.injectorIndex;if(lp(r)){const o=sh(r),a=oh(r,t),l=a[at].data;for(let c=0;c<8;c++)t[s+c]=a[o+c]|l[o+c]}return t[s+8]=r,s}function lh(i,t){i.push(0,0,0,0,0,0,0,0,t)}function J0(i,t){return-1===i.injectorIndex||i.parent&&i.parent.injectorIndex===i.injectorIndex||null===t[i.injectorIndex+8]?-1:i.injectorIndex}function ch(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=uh(r),null===n)return ya;if(e++,r=r[Er],-1!==n.injectorIndex)return n.injectorIndex|e<<16}return ya}function pn(i,t,e){!function U_(i,t,e){let n;"string"==typeof e?n=e.charCodeAt(0)||0:e.hasOwnProperty(eh)&&(n=e[eh]),null==n&&(n=e[eh]=Q0++);const r=n&B_;t.data[i+(r>>Z0)]|=1<=0?t&B_:Js:t}(e);if("function"==typeof s){if(!R_(t,i,n))return n&Ot.Host?ex(r,0,n):zd(t,e,n,r);try{const o=s(n);if(null!=o||n&Ot.Optional)return o;Hf()}finally{W0()}}else if("number"==typeof s){let o=null,a=J0(i,t),l=ya,c=n&Ot.Host?t[sr][ue]:null;for((-1===a||n&Ot.SkipSelf)&&(l=-1===a?ch(i,t):t[a+8],l!==ya&&z_(n,!1)?(o=t[at],a=sh(l),t=oh(l,t)):a=-1);-1!==a;){const d=t[at];if(up(s,a,d.data)){const h=EA(a,t,e,o,n,c);if(h!==ba)return h}l=t[a+8],l!==ya&&z_(n,t[at].data[a+8]===c)&&up(s,a,t)?(o=d,a=sh(l),t=oh(l,t)):a=-1}}return r}function EA(i,t,e,n,r,s){const o=t[at],a=o.data[i+8],d=ts(a,o,e,null==n?Dd(a)&&Vd:n!=o&&0!=(3&a.type),r&Ot.Host&&s===a);return null!==d?Ac(t,o,d,a):ba}function ts(i,t,e,n,r){const s=i.providerIndexes,o=t.data,a=1048575&s,l=i.directiveStart,d=s>>20,p=r?a+d:i.directiveEnd;for(let m=n?a:a+d;m=l&&g.type===e)return m}if(r){const m=o[l];if(m&&vo(m)&&m.type===e)return l}return null}function Ac(i,t,e,n){let r=i[e];const s=t.data;if(function xA(i){return i instanceof Ud}(r)){const o=r;o.resolving&&function E0(i,t){const e=t?`. Dependency path: ${t.join(" > ")} > ${i}`:"";throw new pe(-200,`Circular dependency in DI detected for ${i}${e}`)}(function qn(i){return"function"==typeof i?i.name||i.toString():"object"==typeof i&&null!=i&&"function"==typeof i.type?i.type.name||i.type.toString():Qt(i)}(s[e]));const a=cp(o.canSeeViewProviders);o.resolving=!0;const l=o.injectImpl?Xs(o.injectImpl):null;R_(i,n,Ot.Default);try{r=i[e]=o.factory(void 0,s,i,n),t.firstCreatePass&&e>=n.directiveStart&&function es(i,t,e){const{ngOnChanges:n,ngOnInit:r,ngDoCheck:s}=t.type.prototype;if(n){const o=Rd(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&&Xs(l),cp(a),o.resolving=!1,W0()}}return r}function up(i,t,e){return!!(e[t+(i>>Z0)]&1<{const t=i.prototype.constructor,e=t[ma]||dh(t),n=Object.prototype;let r=Object.getPrototypeOf(i.prototype).constructor;for(;r&&r!==n;){const s=r[ma]||dh(r);if(s&&s!==e)return s;r=Object.getPrototypeOf(r)}return s=>new s})}function dh(i){return Wu(i)?()=>{const t=dh(Pt(i));return t&&t()}:Qa(i)}function uh(i){const t=i[at],e=t.type;return 2===e?t.declTNode:1===e?i[ue]:null}function xa(i){return function SA(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 wa(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,d){const h=l.hasOwnProperty(Tc)?l[Tc]:Object.defineProperty(l,Tc,{value:[]})[Tc];for(;h.length<=d;)h.push(null);return(h[d]=h[d]||[]).push(o),l}}return e&&(r.prototype=Object.create(e.prototype)),r.prototype.ngMetadataName=i,r.annotationCls=r,r})}class me{constructor(t,e){this._desc=t,this.ngMetadataName="InjectionToken",this.\u0275prov=void 0,"number"==typeof e?this.__NG_ELEMENT_ID__=e:void 0!==e&&(this.\u0275prov=ke({token:this,providedIn:e.providedIn||"root",factory:e.factory}))}get multi(){return this}toString(){return`InjectionToken ${this._desc}`}}function Ul(i,t){i.forEach(e=>Array.isArray(e)?Ul(e,t):t(e))}function G_(i,t,e){t>=i.length?i.push(e):i.splice(t,0,e)}function pp(i,t){return t>=i.length-1?i.pop():i.splice(t,1)[0]}function $d(i,t){const e=[];for(let n=0;n=0?i[1|n]=e:(n=~n,function IA(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 jd(i,t){const e=Rc(i,t);if(e>=0)return i[1|e]}function Rc(i,t){return function gp(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),Ss=Cd(Hd("Optional"),8),Ma=Cd(Hd("SkipSelf"),4);var Es=(()=>((Es=Es||{})[Es.Important=1]="Important",Es[Es.DashCase=2]="DashCase",Es))();const Cp=new Map;let vx=0;const iv="__ngContext__";function Gr(i,t){bs(t)?(i[iv]=t[Pl],function yx(i){Cp.set(i[Pl],i)}(t)):i[iv]=t}let sv;function ov(i,t){return sv(i,t)}function vh(i){const t=i[Bi];return xs(t)?t[Bi]:t}function av(i){return Dx(i[bc])}function lv(i){return Dx(i[ys])}function Dx(i){for(;null!==i&&!xs(i);)i=i[ys];return i}function Ir(i,t,e,n,r){if(null!=n){let s,o=!1;xs(n)?s=n:bs(n)&&(o=!0,n=n[Ka]);const a=I(n);0===i&&null!==e?null==r?Ox(t,e,a):Oc(t,e,a,r||null,!0):1===i&&null!==e?Oc(t,e,a,r||null,!0):2===i?function mv(i,t,e){const n=Ap(i,t);n&&function QA(i,t,e,n){i.removeChild(t,e,n)}(i,n,t,e)}(t,a,o):3===i&&t.destroyNode(a),null!=s&&function zx(i,t,e,n,r){const s=e[Kf];s!==I(e)&&Ir(t,i,n,s,r);for(let a=Ui;a0&&(i[e-1][ys]=n[ys]);const s=pp(i,Ui+t);!function WA(i,t){bh(i,t,t[yt],2,null,null),t[Ka]=null,t[ue]=null}(n[at],n);const o=s[Zs];null!==o&&o.detachView(s[at]),n[Bi]=null,n[ys]=null,n[fn]&=-65}return n}function Rx(i,t){if(!(128&t[fn])){const e=t[yt];e.destroyNode&&bh(i,t,e,3,null,null),function qA(i){let t=i[bc];if(!t)return hv(i[at],i);for(;t;){let e=null;if(bs(t))e=t[bc];else{const n=t[Ui];n&&(e=n)}if(!e){for(;t&&!t[ys]&&t!==i;)bs(t)&&hv(t[at],t),t=t[Bi];null===t&&(t=i),bs(t)&&hv(t[at],t),e=t&&t[ys]}t=e}}(t)}}function hv(i,t){if(!(128&t[fn])){t[fn]&=-65,t[fn]|=128,function ZA(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===Ks.None||s===Ks.Emulated)return null}return Ai(n,e)}}(i,t.parent,e)}function Oc(i,t,e,n,r){i.insertBefore(t,e,n,r)}function Ox(i,t,e){i.appendChild(t,e)}function Fx(i,t,e,n,r){null!==n?Oc(i,t,e,n,r):Ox(i,t,e)}function Ap(i,t){return i.parentNode(t)}function Lx(i,t,e){return Bx(i,t,e)}let fv,Rp,vv,Bx=function Nx(i,t,e){return 40&i.type?Ai(i,e):null};function yh(i,t,e,n){const r=kx(i,n,t),s=t[yt],a=Lx(n.parent||t[ue],n,t);if(null!=r)if(Array.isArray(e))for(let l=0;li,createScript:i=>i,createScriptURL:i=>i})}catch{}return Rp}()?.createHTML(i)||i}class Vl{constructor(t){this.changingThisBreaksApplicationSecurity=t}toString(){return`SafeValue must use [property]=binding: ${this.changingThisBreaksApplicationSecurity} (see ${qu})`}}class oD extends Vl{getTypeName(){return"HTML"}}class aD extends Vl{getTypeName(){return"Style"}}class lD extends Vl{getTypeName(){return"Script"}}class cD extends Vl{getTypeName(){return"URL"}}class Pp extends Vl{getTypeName(){return"ResourceURL"}}function to(i){return i instanceof Vl?i.changingThisBreaksApplicationSecurity:i}function Sa(i,t){const e=function dD(i){return i instanceof Vl&&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 ${qu})`)}return e===t}class gD{constructor(t){this.inertDocumentHelper=t}getInertBodyElement(t){t=""+t;try{const e=(new window.DOMParser).parseFromString(Yd(t),"text/html").body;return null===e?this.inertDocumentHelper.getInertBodyElement(t):(e.removeChild(e.firstChild),e)}catch{return null}}}class _D{constructor(t){this.defaultDoc=t,this.inertDocument=this.defaultDoc.implementation.createHTMLDocument("sanitization-inert")}getInertBodyElement(t){const e=this.inertDocument.createElement("template");return e.innerHTML=Yd(t),e}}const vD=/^(?!javascript:)(?:[a-z0-9+.-]+:|[^&:\/?#]*(?:[\/?#]|$))/i;function xh(i){return(i=String(i)).match(vD)?i:"unsafe:"+i}function Ea(i){const t={};for(const e of i.split(","))t[e]=!0;return t}function Fc(...i){const t={};for(const e of i)for(const n in e)e.hasOwnProperty(n)&&(t[n]=!0);return t}const xv=Ea("area,br,col,hr,img,wbr"),wv=Ea("colgroup,dd,dt,li,p,tbody,td,tfoot,th,thead,tr"),Mv=Ea("rp,rt"),Cv=Fc(xv,Fc(wv,Ea("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")),Fc(Mv,Ea("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")),Fc(Mv,wv)),qd=Ea("background,cite,href,itemtype,longdesc,poster,src,xlink:href"),qx=Fc(qd,Ea("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"),Ea("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")),Ev=Ea("script,style,template");class Xx{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(!Cv.hasOwnProperty(e))return this.sanitizedSomething=!0,!Ev.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();Cv.hasOwnProperty(e)&&!xv.hasOwnProperty(e)&&(this.buf.push(""))}chars(t){this.buf.push(Kx(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 bD=/[\uD800-\uDBFF][\uDC00-\uDFFF]/g,xD=/([^\#-~ |!])/g;function Kx(i){return i.replace(/&/g,"&").replace(bD,function(t){return"&#"+(1024*(t.charCodeAt(0)-55296)+(t.charCodeAt(1)-56320)+65536)+";"}).replace(xD,function(t){return"&#"+t.charCodeAt(0)+";"}).replace(//g,">")}let Fp;function Zx(i,t){let e=null;try{Fp=Fp||function Yx(i){const t=new _D(i);return function Op(){try{return!!(new window.DOMParser).parseFromString(Yd(""),"text/html")}catch{return!1}}()?new gD(t):t}(i);let n=t?String(t):"";e=Fp.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=Fp.getInertBodyElement(n)}while(n!==s);return Yd((new Xx).sanitizeChildren(Av(e)||e))}finally{if(e){const n=Av(e)||e;for(;n.firstChild;)n.removeChild(n.firstChild)}}}function Av(i){return"content"in i&&function wD(i){return i.nodeType===Node.ELEMENT_NODE&&"TEMPLATE"===i.nodeName}(i)?i.content:null}var Kn=(()=>((Kn=Kn||{})[Kn.NONE=0]="NONE",Kn[Kn.HTML=1]="HTML",Kn[Kn.STYLE=2]="STYLE",Kn[Kn.SCRIPT=3]="SCRIPT",Kn[Kn.URL=4]="URL",Kn[Kn.RESOURCE_URL=5]="RESOURCE_URL",Kn))();function Lp(i){const t=function wi(){const i=Se();return i&&i[oi]}();return t?t.sanitize(Kn.URL,i)||"":Sa(i,"URL")?to(i):xh(Qt(i))}const Np=new me("ENVIRONMENT_INITIALIZER"),rl=new me("INJECTOR",-1),Jx=new me("INJECTOR_DEF_TYPES");class ew{get(t,e=Rl){if(e===Rl){const n=new Error(`NullInjectorError: No provider for ${pi(t)}!`);throw n.name="NullInjectorError",n}return e}}function AD(...i){return{\u0275providers:tw(0,i),\u0275fromNgModule:!0}}function tw(i,...t){const e=[],n=new Set;let r;return Ul(t,s=>{const o=s;Dv(o,e,[],n)&&(r||(r=[]),r.push(o))}),void 0!==r&&Bp(r,e),e}function Bp(i,t){for(let e=0;e{t.push(s)})}}function Dv(i,t,e,n){if(!(i=Pt(i)))return!1;let r=null,s=p_(i);const o=!s&&Hn(i);if(s||o){if(o&&!o.standalone)return!1;r=i}else{const l=i.ngModule;if(s=p_(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)Dv(c,t,e,n)}}else{if(!s)return!1;{if(null!=s.imports&&!a){let c;n.add(r);try{Ul(s.imports,d=>{Dv(d,t,e,n)&&(c||(c=[]),c.push(d))})}finally{}void 0!==c&&Bp(c,t)}if(!a){const c=Qa(r)||(()=>new r);t.push({provide:r,useFactory:c,deps:$n},{provide:Jx,useValue:r,multi:!0},{provide:Np,useValue:()=>ee(r),multi:!0})}const l=s.providers;null==l||a||Up(l,d=>{t.push(d)})}}return r!==i&&void 0!==i.providers}function Up(i,t){for(let e of i)ju(e)&&(e=e.\u0275providers),Array.isArray(e)?Up(e,t):t(e)}const Vp=ci({provide:String,useValue:ci});function Mi(i){return null!==i&&"object"==typeof i&&Vp in i}function Nc(i){return"function"==typeof i}const Iv=new me("Set Injector scope."),zp={},TD={};let Rv;function wh(){return void 0===Rv&&(Rv=new ew),Rv}class io{}class Hp extends io{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,Pv(t,o=>this.processProvider(o)),this.records.set(rl,jo(void 0,this)),r.has("environment")&&this.records.set(io,jo(void 0,this));const s=this.records.get(Iv);null!=s&&"string"==typeof s.value&&this.scopes.add(s.value),this.injectorDefTypes=new Set(this.get(Jx.multi,$n,Ot.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=Md(this),n=Xs(void 0);try{return t()}finally{Md(e),Xs(n)}}get(t,e=Rl,n=Ot.Default){this.assertNotDestroyed(),n=jf(n);const r=Md(this),s=Xs(void 0);try{if(!(n&Ot.SkipSelf)){let a=this.records.get(t);if(void 0===a){const l=function kD(i){return"function"==typeof i||"object"==typeof i&&i instanceof me}(t)&&Gf(t);a=l&&this.injectableDefInScope(l)?jo(kv(t),zp):null,this.records.set(t,a)}if(null!=a)return this.hydrate(t,a)}return(n&Ot.Self?wh():this.parent).get(t,e=n&Ot.Optional&&e===Rl?null:e)}catch(o){if("NullInjectorError"===o.name){if((o[mi]=o[mi]||[]).unshift(pi(t)),r)throw o;return function v_(i,t,e,n){const r=i[mi];throw t[Wf]&&r.unshift(t[Wf]),i.message=function I0(i,t,e,n=null){i=i&&"\n"===i.charAt(0)&&i.charAt(1)==eA?i.slice(2):i;let r=pi(t);if(Array.isArray(t))r=t.map(pi).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):pi(a)))}r=`{${s.join(", ")}}`}return`${e}${n?"("+n+")":""}[${r}]: ${i.replace(g_,"\n ")}`}("\n"+i.message,r,e,n),i[kl]=r,i[mi]=null,i}(o,t,"R3InjectorError",this.source)}throw o}finally{Xs(s),Md(r)}}resolveInjectorInitializers(){const t=Md(this),e=Xs(void 0);try{const n=this.get(Np.multi,$n,Ot.Self);for(const r of n)r()}finally{Md(t),Xs(e)}}toString(){const t=[],e=this.records;for(const n of e.keys())t.push(pi(n));return`R3Injector[${t.join(", ")}]`}assertNotDestroyed(){if(this._destroyed)throw new pe(205,!1)}processProvider(t){let e=Nc(t=Pt(t))?t:Pt(t&&t.provide);const n=function Gp(i){return Mi(i)?jo(void 0,i.useValue):jo(As(i),zp)}(t);if(Nc(t)||!0!==t.multi)this.records.get(e);else{let r=this.records.get(e);r||(r=jo(void 0,zp,!0),r.factory=()=>Yf(r.multi),this.records.set(e,r)),e=t,r.multi.push(t)}this.records.set(e,n)}hydrate(t,e){return e.value===zp&&(e.value=TD,e.value=e.factory()),"object"==typeof e.value&&e.value&&function RD(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=Pt(t.providedIn);return"string"==typeof e?"any"===e||this.scopes.has(e):this.injectorDefTypes.has(e)}}function kv(i){const t=Gf(i),e=null!==t?t.factory:Qa(i);if(null!==e)return e;if(i instanceof me)throw new pe(204,!1);if(i instanceof Function)return function nw(i){const t=i.length;if(t>0)throw $d(t,"?"),new pe(204,!1);const e=function Xu(i){return i&&(i[wd]||i[m_])||null}(i);return null!==e?()=>e.factory(i):()=>new i}(i);throw new pe(204,!1)}function As(i,t,e){let n;if(Nc(i)){const r=Pt(i);return Qa(r)||kv(r)}if(Mi(i))n=()=>Pt(i.useValue);else if(function Tv(i){return!(!i||!i.useFactory)}(i))n=()=>i.useFactory(...Yf(i.deps||[]));else if(function Pi(i){return!(!i||!i.useExisting)}(i))n=()=>ee(Pt(i.useExisting));else{const r=Pt(i&&(i.useClass||i.provide));if(!function ID(i){return!!i.deps}(i))return Qa(r)||kv(r);n=()=>new r(...Yf(i.deps))}return n}function jo(i,t,e=!1){return{factory:i,value:t,multi:e?[]:void 0}}function Pv(i,t){for(const e of i)Array.isArray(e)?Pv(e,t):e&&ju(e)?Pv(e.\u0275providers,t):t(e)}class PD{}class Ov{}class xo{resolveComponentFactory(t){throw function sl(i){const t=Error(`No component factory found for ${pi(i)}. Did you add it to @NgModule.entryComponents?`);return t.ngComponent=i,t}(t)}}let Hl=(()=>{class i{}return i.NULL=new xo,i})();function FD(){return Fn(Ar(),Se())}function Fn(i,t){return new gt(Ai(i,t))}let gt=(()=>{class i{constructor(e){this.nativeElement=e}}return i.__NG_ELEMENT_ID__=FD,i})();function iw(i){return i instanceof gt?i.nativeElement:i}class Gl{}let ol=(()=>{class i{}return i.__NG_ELEMENT_ID__=()=>function LD(){const i=Se(),e=ws(Ar().index,i);return(bs(e)?e:i)[yt]}(),i})(),ND=(()=>{class i{}return i.\u0275prov=ke({token:i,providedIn:"root",factory:()=>null}),i})();class Bc{constructor(t){this.full=t,this.major=t.split(".")[0],this.minor=t.split(".")[1],this.patch=t.split(".").slice(2).join(".")}}const BD=new Bc("15.2.10"),Fv={},Lv="ngOriginalError";function Nv(i){return i[Lv]}class al{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&&Nv(t);for(;e&&Nv(e);)e=Nv(e);return e||null}}function ll(i){return i instanceof Function?i():i}function sw(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 ow="ng-template";function jD(i,t,e){let n=0,r=!0;for(;ns?"":r[h+1].toLowerCase();const m=8&n?p:null;if(m&&-1!==sw(m,c,0)||2&n&&c!==p){if(Yo(n))return!1;o=!0}}}}else{if(!o&&!Yo(n)&&!Yo(l))return!1;if(o&&Yo(l))continue;o=!1,n=l|1&n}}return Yo(n)||o}function Yo(i){return 0==(1&i)}function aw(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&&!Yo(o)&&(t+=Uc(s,r),r=""),n=o,s=s||!Yo(n);e++}return""!==r&&(t+=Uc(s,r)),t}const on={};function G(i){Hv(zn(),Se(),Xn()+i,!1)}function Hv(i,t,e,n){if(!n)if(3==(3&t[fn])){const s=i.preOrderCheckHooks;null!==s&&sp(t,s,e)}else{const s=i.preOrderHooks;null!==s&&op(t,s,0,e)}tl(e)}function dw(i,t=null,e=null,n){const r=uw(i,t,e,n);return r.resolveInjectorInitializers(),r}function uw(i,t=null,e=null,n,r=new Set){const s=[e||$n,AD(i)];return n=n||("object"==typeof i?void 0:pi(i)),new Hp(s,t||wh(),n||null,r)}let $i=(()=>{class i{static create(e,n){if(Array.isArray(e))return dw({name:""},n,e,"");{const r=e.name??"";return dw({name:r},e.parent,e.providers,r)}}}return i.THROW_IF_NOT_FOUND=Rl,i.NULL=new ew,i.\u0275prov=ke({token:i,providedIn:"any",factory:()=>ee(rl)}),i.__NG_ELEMENT_ID__=-1,i})();function E(i,t=Ot.Default){const e=Se();return null===e?ee(i,t):V_(Ar(),e,Pt(i),t)}function wo(){throw new Error("invalid")}function _w(i,t){const e=i.contentQueries;if(null!==e)for(let n=0;nbi&&Hv(i,t,bi,!1),Qr(o?2:0,r),e(n,r)}finally{tl(s),Qr(o?3:1,r)}}function Zv(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,Ch(i,e,r.hostVars,on),r)}function be(i,t,e,n,r,s){const o=Ai(i,t);!function Xe(i,t,e,n,r,s,o){if(null==s)i.removeAttribute(t,r,e);else{const a=null==o?Qt(s):o(s,n||"",r);i.setAttribute(t,r,a,e)}}(t[yt],o,s,i.value,e,n,r)}function vt(i,t,e,n,r,s){const o=s[t];if(null!==o){const a=n.setInput;for(let l=0;l0&&rs(e)}}function rs(i){for(let n=av(i);null!==n;n=lv(n))for(let r=Ui;r0&&rs(s)}const e=i[at].components;if(null!==e)for(let n=0;n0&&rs(r)}}function ss(i,t){const e=ws(t,i),n=e[at];(function so(i,t){for(let e=t.length;e-1&&(uv(t,n),pp(e,n))}this._attachedToViewContainer=!1}Rx(this._lView[at],this._lView)}onDestroy(t){bw(this._lView[at],this._lView,null,t)}markForCheck(){Ts(this._cdRefInjectingView||this._lView)}detach(){this._lView[fn]&=-65}reattach(){this._lView[fn]|=64}detectChanges(){Mo(this._lView[at],this._lView,this.context)}checkNoChanges(){}attachToViewContainerRef(){if(this._appRef)throw new pe(902,!1);this._attachedToViewContainer=!0}detachFromAppRef(){this._appRef=null,function YA(i,t){bh(i,t,t[yt],2,null,null)}(this._lView[at],this._lView)}attachToAppRef(t){if(this._attachedToViewContainer)throw new pe(902,!1);this._appRef=t}}class b8 extends ny{constructor(t){super(t),this._view=t}detectChanges(){const t=this._view;Mo(t[at],t,t[Ue],!1)}checkNoChanges(){}get context(){return null}}class KF extends Hl{constructor(t){super(),this.ngModule=t}resolveComponentFactory(t){const e=Hn(t);return new iy(e,this.ngModule)}}function ZF(i){const t=[];for(let e in i)i.hasOwnProperty(e)&&t.push({propName:i[e],templateName:e});return t}class w8{constructor(t,e){this.injector=t,this.parentInjector=e}get(t,e,n){n=jf(n);const r=this.injector.get(t,Fv,n);return r!==Fv||e===Fv?r:this.parentInjector.get(t,e,n)}}class iy extends Ov{get inputs(){return ZF(this.componentDef.inputs)}get outputs(){return ZF(this.componentDef.outputs)}constructor(t,e){super(),this.componentDef=t,this.ngModule=e,this.componentType=t.type,this.selector=function e1(i){return i.map(JD).join(",")}(t.selectors),this.ngContentSelectors=t.ngContentSelectors?t.ngContentSelectors:[],this.isBoundToModule=!!e}create(t,e,n,r){let s=(r=r||this.ngModule)instanceof io?r:r?.injector;s&&null!==this.componentDef.getStandaloneInjector&&(s=this.componentDef.getStandaloneInjector(s)||s);const o=s?new w8(t,s):t,a=o.get(Gl,null);if(null===a)throw new pe(407,!1);const l=o.get(ND,null),c=a.createRenderer(null,this.componentDef),d=this.componentDef.selectors[0][0]||"div",h=n?function M1(i,t,e){return i.selectRootElement(t,e===Ks.ShadowDom)}(c,n,this.componentDef.encapsulation):Ep(c,d,function x8(i){const t=i.toLowerCase();return"svg"===t?Pd:"math"===t?"math":null}(d)),p=this.componentDef.onPush?288:272,m=ey(0,null,null,1,0,null,null,null,null,null),g=Mh(null,m,null,p,null,null,a,c,l,o,null);let b,v;rp(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 C8(i,t){const e=i[at],n=bi;return i[n]=t,Qd(e,n,2,"#host",null)}(g,h),F=function S8(i,t,e,n,r,s,o,a){const l=r[at];!function E8(i,t,e,n){for(const r of i)t.mergedAttrs=Ec(t.mergedAttrs,r.hostAttrs);null!==t.mergedAttrs&&(Cw(t,t.mergedAttrs,!0),null!==e&&Gx(n,e,t))}(n,i,t,o);const c=s.createRenderer(t,e),d=Mh(r,yw(e),null,e.onPush?32:16,r[i.index],i,s,c,a||null,null,null);return l.firstCreatePass&&P(l,i,n.length-1),Ti(r,d),r[i.index]=d}(C,h,y,M,g,a,c);v=B0(m,bi),h&&function D8(i,t,e,n){if(n)L_(i,e,["ng-version",BD.full]);else{const{attrs:r,classes:s}=function t1(i){const t=[],e=[];let n=1,r=2;for(;n0&&Hx(i,e,s.join(" "))}}(c,y,h,n),void 0!==e&&function T8(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=Ec(r.hostAttrs,e=Ec(e,r.hostAttrs))}}(n)}function P1(i){return i===Xa?{}:i===$n?[]:i}function k8(i,t){const e=i.viewQuery;i.viewQuery=e?(n,r)=>{t(n,r),e(n,r)}:t}function P8(i,t){const e=i.contentQueries;i.contentQueries=e?(n,r,s)=>{t(n,r,s),e(n,r,s)}:t}function O8(i,t){const e=i.hostBindings;i.hostBindings=e?(n,r)=>{t(n,r),e(n,r)}:t}function Ew(i){return!!O1(i)&&(Array.isArray(i)||!(i instanceof Map)&&Symbol.iterator in i)}function O1(i){return null!==i&&("function"==typeof i||"object"==typeof i)}function $l(i,t,e){return i[t]=e}function Is(i,t,e){return!Object.is(i[t],e)&&(i[t]=e,!0)}function Eh(i,t,e,n){const r=Is(i,t,e);return Is(i,t+1,n)||r}function Dt(i,t,e,n){const r=Se();return Is(r,Fl(),t)&&(zn(),be(Di(),r,i,t,e,n)),Dt}function jp(i,t,e,n){return Is(i,Fl(),e)?t+Qt(e)+n:on}function Yp(i,t,e,n,r,s){const a=Eh(i,function Ja(){return kt.lFrame.bindingIndex}(),e,r);return Qs(2),a?t+Qt(e)+n+Qt(r)+s:on}function fe(i,t,e,n,r,s,o,a){const l=Se(),c=zn(),d=i+bi,h=c.firstCreatePass?function $8(i,t,e,n,r,s,o,a,l){const c=t.consts,d=Qd(t,i,4,o||null,Ol(c,a));ty(t,e,d,Ol(c,l)),Bd(t,d);const h=d.tView=ey(2,d,n,r,s,t.directiveRegistry,t.pipeRegistry,null,t.schemas,c);return null!==t.queries&&(t.queries.template(t,d),h.queries=t.queries.embeddedTView(d)),d}(d,c,l,t,e,n,r,s,o):c.data[d];_a(h,!1);const p=l[yt].createComment("");yh(c,l,p,h),Gr(p,l),Ti(l,l[d]=mn(p,l,p,h)),xc(h)&&Qv(c,l,h),null!=o&&Jv(l,h,a)}function Zi(i){return Fd(function gA(){return kt.lFrame.contextLView}(),bi+i)}function U(i,t,e){const n=Se();return Is(n,Fl(),t)&&ro(zn(),Di(),n,i,t,n[yt],e,!1),U}function F1(i,t,e,n,r){const o=r?"class":"style";k1(i,e,t.inputs[o],o,n)}function W(i,t,e,n){const r=Se(),s=zn(),o=bi+i,a=r[yt],l=s.firstCreatePass?function j8(i,t,e,n,r,s){const o=t.consts,l=Qd(t,i,2,n,Ol(o,r));return ty(t,e,l,Ol(o,s)),null!==l.attrs&&Cw(l,l.attrs,!1),null!==l.mergedAttrs&&Cw(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]=Ep(a,t,function Y0(){return kt.lFrame.currentNamespace}()),d=xc(l);return _a(l,!0),Gx(a,c,l),32!=(32&l.flags)&&yh(s,r,c,l),0===function uA(){return kt.lFrame.elementDepthCount}()&&Gr(c,r),function hA(){kt.lFrame.elementDepthCount++}(),d&&(Qv(s,r,l),Zv(s,l,r)),null!==n&&Jv(r,l),W}function j(){let i=Ar();D_()?T_():(i=i.parent,_a(i,!1));const t=i;!function fA(){kt.lFrame.elementDepthCount--}();const e=zn();return e.firstCreatePass&&(Bd(e,i),Qf(i)&&e.queries.elementEnd(i)),null!=t.classesWithoutHost&&function wA(i){return 0!=(8&i.flags)}(t)&&F1(e,t,Se(),t.classesWithoutHost,!0),null!=t.stylesWithoutHost&&function F_(i){return 0!=(16&i.flags)}(t)&&F1(e,t,Se(),t.stylesWithoutHost,!1),j}function Pe(i,t,e,n){return W(i,t,e,n),j(),Pe}function $r(i,t,e){const n=Se(),r=zn(),s=i+bi,o=r.firstCreatePass?function Y8(i,t,e,n,r){const s=t.consts,o=Ol(s,n),a=Qd(t,i,8,"ng-container",o);return null!==o&&Cw(a,o,!0),ty(t,e,a,Ol(s,r)),null!==t.queries&&t.queries.elementStart(t,a),a}(s,r,n,t,e):r.data[s];_a(o,!0);const a=n[s]=n[yt].createComment("");return yh(r,n,a,o),Gr(a,n),xc(o)&&(Qv(r,n,o),Zv(r,o,n)),null!=e&&Jv(n,o),$r}function Wr(){let i=Ar();const t=zn();return D_()?T_():(i=i.parent,_a(i,!1)),t.firstCreatePass&&(Bd(t,i),Qf(i)&&t.queries.elementEnd(i)),Wr}function sy(i,t,e){return $r(i,t,e),Wr(),sy}function ai(){return Se()}function oy(i){return!!i&&"function"==typeof i.then}function uL(i){return!!i&&"function"==typeof i.subscribe}const L1=uL;function Le(i,t,e,n){const r=Se(),s=zn(),o=Ar();return hL(s,r,r[yt],o,i,t,n),Le}function N1(i,t){const e=Ar(),n=Se(),r=zn();return hL(r,n,qF(rh(r.data),e,n),e,i,t),N1}function hL(i,t,e,n,r,s,o){const a=xc(n),c=i.firstCreatePass&&YF(i),d=t[Ue],h=jF(t);let p=!0;if(3&n.type||o){const b=Ai(n,t),v=o?o(b):b,y=h.length,M=o?C=>o(I(C[n.index])):n.index;let x=null;if(!o&&a&&(x=function q8(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=pL(n,t,d,s,!1);const C=e.listen(v,r,s);h.push(s,C),c&&c.push(r,M,y,y+1)}}else s=pL(n,t,d,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?ws(i.index,t):t);let l=fL(t,e,n,o),c=s.__ngNextListenerFn__;for(;c;)l=fL(t,e,c,o)&&l,c=c.__ngNextListenerFn__;return r&&!1===l&&(o.preventDefault(),o.returnValue=!1),l}}function he(i=1){return function yA(i){return(kt.lFrame.contextLView=function j0(i,t){for(;i>0;)t=t[Er],i--;return t}(i,kt.lFrame.contextLView))[Ue]}(i)}function X8(i,t){let e=null;const n=function XD(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 V1(i){return 2|i}function Ah(i){return(131068&i)>>2}function z1(i,t){return-131069&i|t<<2}function H1(i){return 1|i}function ML(i,t,e,n,r){const s=i[e+1],o=null===t;let a=n?eu(s):Ah(s),l=!1;for(;0!==a&&(!1===l||o);){const d=i[a+1];tW(i[a],t)&&(l=!0,i[a+1]=n?H1(d):V1(d)),a=n?eu(d):Ah(d)}l&&(i[e+1]=n?V1(s):H1(s))}function tW(i,t){return null===i||null==t||(Array.isArray(i)?i[1]:i)===t||!(!Array.isArray(i)||"string"!=typeof t)&&Rc(i,t)>=0}const Rr={textEnd:0,key:0,keyEnd:0,value:0,valueEnd:0};function CL(i){return i.substring(Rr.key,Rr.keyEnd)}function SL(i,t){const e=Rr.textEnd;return e===t?-1:(t=Rr.keyEnd=function sW(i,t,e){for(;t32;)t++;return t}(i,Rr.key=t,e),em(i,t,e))}function em(i,t,e){for(;t=0;e=SL(t,e))Cs(i,CL(t),!0)}function cl(i,t,e,n){const r=Se(),s=zn(),o=Qs(2);s.firstUpdatePass&&RL(s,i,o,n),t!==on&&Is(r,o,t)&&PL(s,s.data[Xn()],r,r[yt],i,r[o+1]=function _W(i,t){return null==i||""===i||("string"==typeof t?i+=t:"object"==typeof i&&(i=pi(to(i)))),i}(t,e),n,o)}function IL(i,t){return t>=i.expandoStartIndex}function RL(i,t,e,n){const r=i.data;if(null===r[e+1]){const s=r[Xn()],o=IL(i,e);FL(s,n)&&null===t&&!o&&(t=!1),t=function dW(i,t,e,n){const r=rh(i);let s=n?t.residualClasses:t.residualStyles;if(null===r)0===(n?t.classBindings:t.styleBindings)&&(e=ay(e=G1(null,i,t,e,n),t.attrs,n),s=null);else{const o=t.directiveStylingLast;if(-1===o||i[o]!==r)if(e=G1(r,i,t,e,n),null===s){let l=function uW(i,t,e){const n=e?t.classBindings:t.styleBindings;if(0!==Ah(n))return i[eu(n)]}(i,t,n);void 0!==l&&Array.isArray(l)&&(l=G1(null,i,t,l[1],n),l=ay(l,t.attrs,n),function hW(i,t,e,n){i[eu(e?t.classBindings:t.styleBindings)]=n}(i,t,n,l))}else s=function fW(i,t,e){let n;const r=t.directiveEnd;for(let s=1+t.directiveStylingLast;s0)&&(c=!0)):d=e,r)if(0!==l){const p=eu(i[a+1]);i[n+1]=Dw(p,a),0!==p&&(i[p+1]=z1(i[p+1],n)),i[a+1]=function Z8(i,t){return 131071&i|t<<17}(i[a+1],n)}else i[n+1]=Dw(a,0),0!==a&&(i[a+1]=z1(i[a+1],n)),a=n;else i[n+1]=Dw(l,0),0===a?a=n:i[l+1]=z1(i[l+1],n),l=n;c&&(i[n+1]=V1(i[n+1])),ML(i,d,n,!0),ML(i,d,n,!1),function eW(i,t,e,n,r){const s=r?i.residualClasses:i.residualStyles;null!=s&&"string"==typeof t&&Rc(s,t)>=0&&(e[n+1]=H1(e[n+1]))}(t,d,i,n,s),o=Dw(a,l),s?t.classBindings=o:t.styleBindings=o}(r,s,t,e,o,n)}}function G1(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),d=c?l[1]:l,h=null===d;let p=e[r+1];p===on&&(p=h?$n:void 0);let m=h?jd(p,n):d===n?p:void 0;if(c&&!Tw(m)&&(m=jd(l,n)),Tw(m)&&(a=m,o))return a;const g=i[r+1];r=o?eu(g):Ah(g)}if(null!==t){let l=s?t.residualClasses:t.residualStyles;null!=l&&(a=jd(l,n))}return a}function Tw(i){return void 0!==i}function FL(i,t){return 0!=(i.flags&(t?8:16))}function ze(i,t=""){const e=Se(),n=zn(),r=i+bi,s=n.firstCreatePass?Qd(n,r,1,t,null):n.data[r],o=e[r]=function cv(i,t){return i.createText(t)}(e[yt],t);yh(n,e,o,s),_a(s,!1)}function _i(i){return Qi("",i,""),_i}function Qi(i,t,e){const n=Se(),r=jp(n,i,t,e);return r!==on&&Vc(n,Xn(),r),Qi}function tm(i,t,e,n,r){const s=Se(),o=Yp(s,i,t,e,n,r);return o!==on&&Vc(s,Xn(),o),tm}function GL(i,t,e){!function dl(i,t,e,n){const r=zn(),s=Qs(2);r.firstUpdatePass&&RL(r,null,s,n);const o=Se();if(e!==on&&Is(o,s,e)){const a=r.data[Xn()];if(FL(a,n)&&!IL(r,s)){let l=n?a.classesWithoutHost:a.stylesWithoutHost;null!==l&&(e=Vf(l,e||"")),F1(r,a,o,e,n)}else!function gW(i,t,e,n,r,s,o,a){r===on&&(r=$n);let l=0,c=0,d=0((rt=rt||{})[rt.LocaleId=0]="LocaleId",rt[rt.DayPeriodsFormat=1]="DayPeriodsFormat",rt[rt.DayPeriodsStandalone=2]="DayPeriodsStandalone",rt[rt.DaysFormat=3]="DaysFormat",rt[rt.DaysStandalone=4]="DaysStandalone",rt[rt.MonthsFormat=5]="MonthsFormat",rt[rt.MonthsStandalone=6]="MonthsStandalone",rt[rt.Eras=7]="Eras",rt[rt.FirstDayOfWeek=8]="FirstDayOfWeek",rt[rt.WeekendRange=9]="WeekendRange",rt[rt.DateFormat=10]="DateFormat",rt[rt.TimeFormat=11]="TimeFormat",rt[rt.DateTimeFormat=12]="DateTimeFormat",rt[rt.NumberSymbols=13]="NumberSymbols",rt[rt.NumberFormats=14]="NumberFormats",rt[rt.CurrencyCode=15]="CurrencyCode",rt[rt.CurrencySymbol=16]="CurrencySymbol",rt[rt.CurrencyName=17]="CurrencyName",rt[rt.Currencies=18]="Currencies",rt[rt.Directionality=19]="Directionality",rt[rt.PluralCase=20]="PluralCase",rt[rt.ExtraData=21]="ExtraData",rt))();const im="en-US";let t2=im;function j1(i,t,e,n,r){if(i=Pt(i),Array.isArray(i))for(let s=0;s>20;if(Nc(i)||!i.multi){const m=new Ud(l,r,E),g=q1(a,t,r?d:d+p,h);-1===g?(pn(ah(c,o),s,a),Y1(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=q1(a,t,d+p,h),g=q1(a,t,d,d+p),v=g>=0&&e[g];if(r&&!v||!r&&!(m>=0&&e[m])){pn(ah(c,o),s,a);const y=function Oj(i,t,e,n,r){const s=new Ud(i,e,E);return s.multi=[],s.index=t,s.componentProviders=0,A2(s,r,n&&!e),s}(r?Pj:kj,e.length,r,n,l);!r&&v&&(e[g].providerFactory=y),Y1(s,i,t.length,0),t.push(a),c.directiveStart++,c.directiveEnd++,r&&(c.providerIndexes+=1048576),e.push(y),o.push(y)}else Y1(s,i,m>-1?m:g,A2(e[r?g:m],l,!r&&n));!r&&n&&v&&e[g].componentProviders++}}}function Y1(i,t,e,n){const r=Nc(t),s=function DD(i){return!!i.useClass}(t);if(r||s){const l=(s?Pt(t.useClass):t).prototype.ngOnDestroy;if(l){const c=i.destroyHooks||(i.destroyHooks=[]);if(!r&&t.multi){const d=c.indexOf(e);-1===d?c.push(e,[n,l]):c[d+1].push(n,l)}else c.push(e,l)}}}function A2(i,t,e){return e&&i.componentProviders++,i.multi.push(t)-1}function q1(i,t,e,n){for(let r=e;r{e.providersResolver=(n,r)=>function Rj(i,t,e){const n=zn();if(n.firstCreatePass){const r=vo(i);j1(e,n.data,n.blueprint,r,!0),j1(t,n.data,n.blueprint,r,!1)}}(n,r?r(i):i,t)}}class rm{}class D2{}class T2 extends rm{constructor(t,e){super(),this._parent=e,this._bootstrapComponents=[],this.destroyCbs=[],this.componentFactoryResolver=new KF(this);const n=hr(t);this._bootstrapComponents=ll(n.bootstrap),this._r3Injector=uw(t,e,[{provide:rm,useValue:this},{provide:Hl,useValue:this.componentFactoryResolver}],pi(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 K1 extends D2{constructor(t){super(),this.moduleType=t}create(t){return new T2(this.moduleType,t)}}class Lj extends rm{constructor(t,e,n){super(),this.componentFactoryResolver=new KF(this),this.instance=null;const r=new Hp([...t,{provide:rm,useValue:this},{provide:Hl,useValue:this.componentFactoryResolver}],e||wh(),n,new Set(["environment"]));this.injector=r,r.resolveInjectorInitializers()}destroy(){this.injector.destroy()}onDestroy(t){this.injector.onDestroy(t)}}function Fw(i,t,e=null){return new Lj(i,t,e).injector}let Nj=(()=>{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=tw(0,e.type),r=n.length>0?Fw([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=ke({token:i,providedIn:"environment",factory:()=>new i(ee(io))}),i})();function Z1(i){i.getStandaloneInjector=t=>t.get(Nj).getOrCreateStandaloneInjector(i)}function Rs(i,t,e){const n=zr()+i,r=Se();return r[n]===on?$l(r,n,e?t.call(e):t()):function ry(i,t){return i[t]}(r,n)}function sm(i,t,e,n){return N2(Se(),zr(),i,t,e,n)}function L2(i,t,e,n,r,s,o){return function V2(i,t,e,n,r,s,o,a,l){const c=t+e;return function Aa(i,t,e,n,r,s){const o=Eh(i,t,e,n);return Eh(i,t+2,r,s)||o}(i,c,r,s,o,a)?$l(i,c+4,l?n.call(l,r,s,o,a):n(r,s,o,a)):fy(i,c+4)}(Se(),zr(),i,t,e,n,r,s,o)}function fy(i,t){const e=i[t];return e===on?void 0:e}function N2(i,t,e,n,r,s){const o=t+e;return Is(i,o,r)?$l(i,o+1,s?n.call(s,r):n(r)):fy(i,o+1)}function Ct(i,t){const e=zn();let n;const r=i+bi;e.firstCreatePass?(n=function Jj(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=Qa(n.type)),o=Xs(E);try{const a=cp(!1),l=s();return cp(a),function W8(i,t,e,n){e>=i.data.length&&(i.data[e]=null,i.blueprint[e]=null),t[e]=n}(e,Se(),r,l),l}finally{Xs(o)}}function Tt(i,t,e){const n=i+bi,r=Se(),s=Fd(r,n);return py(r,n)?N2(r,zr(),t,s.transform,e,s):s.transform(e)}function J1(i,t,e,n){const r=i+bi,s=Se(),o=Fd(s,r);return py(s,r)?function B2(i,t,e,n,r,s,o){const a=t+e;return Eh(i,a,r,s)?$l(i,a+2,o?n.call(o,r,s):n(r,s)):fy(i,a+2)}(s,zr(),t,o.transform,e,n,o):o.transform(e,n)}function py(i,t){return i[at].data[t].pure}function eT(i){return t=>{setTimeout(i,void 0,t)}}const $e=class r6 extends Re{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=eT(s),r&&(r=eT(r)),o&&(o=eT(o)));const a=super.subscribe({next:r,error:s,complete:o});return t instanceof Zt&&t.add(a),a}};function s6(){return this._results[Symbol.iterator]()}class om{get changes(){return this._changes||(this._changes=new $e)}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=om.prototype;e[Symbol.iterator]||(e[Symbol.iterator]=s6)}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 Dr(i){return i.flat(Number.POSITIVE_INFINITY)}(t);(this._changesDetected=!function fp(i,t,e){if(i.length!==t.length)return!1;for(let n=0;n{class i{}return i.__NG_ELEMENT_ID__=l6,i})();const o6=Co,a6=class extends o6{constructor(t,e,n){super(),this._declarationLView=t,this._declarationTContainer=e,this.elementRef=n}createEmbeddedView(t,e){const n=this._declarationTContainer.tView,r=Mh(this._declarationLView,n,t,16,null,n.declTNode,null,null,null,null,e||null);r[nh]=this._declarationLView[this._declarationTContainer.index];const o=this._declarationLView[Zs];return null!==o&&(r[Zs]=o.createEmbeddedView(n)),Sh(n,r,t),new ny(r)}};function l6(){return Lw(Ar(),Se())}function Lw(i,t){return 4&i.type?new a6(t,i,Fn(i,t)):null}let jr=(()=>{class i{}return i.__NG_ELEMENT_ID__=c6,i})();function c6(){return $2(Ar(),Se())}const d6=jr,H2=class extends d6{constructor(t,e,n){super(),this._lContainer=t,this._hostTNode=e,this._hostLView=n}get element(){return Fn(this._hostTNode,this._hostLView)}get injector(){return new Dc(this._hostTNode,this._hostLView)}get parentInjector(){const t=ch(this._hostTNode,this._hostLView);if(lp(t)){const e=oh(t,this._hostLView),n=sh(t);return new Dc(e[at].data[n+8],e)}return new Dc(null,this._hostLView)}clear(){for(;this.length>0;)this.remove(this.length-1)}get(t){const e=G2(this._lContainer);return null!==e&&e[t]||null}get length(){return this._lContainer.length-Ui}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 hh(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 iy(Hn(t)),c=n||this.parentInjector;if(!s&&null==l.ngModule){const p=(o?c:this.parentInjector).get(io,null);p&&(s=p)}const d=l.create(c,r,void 0,s);return this.insert(d.hostView,a),d}insert(t,e){const n=t._lView,r=n[at];if(function dA(i){return xs(i[Bi])}(n)){const d=this.indexOf(t);if(-1!==d)this.detach(d);else{const h=n[Bi],p=new H2(h,h[ue],h[Bi]);p.detach(p.indexOf(t))}}const s=this._adjustIndex(e),o=this._lContainer;!function dv(i,t,e,n){const r=Ui+n,s=e.length;n>0&&(e[r-1][ys]=t),n0)n.push(o[a/2]);else{const c=s[a+1],d=t[-l];for(let h=Ui;h{class i{constructor(e){this.appInits=e,this.resolve=Bw,this.reject=Bw,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)(ee(Uw,8))},i.\u0275prov=ke({token:i,factory:i.\u0275fac,providedIn:"root"}),i})();const cm=new me("AppId",{providedIn:"root",factory:function fN(){return`${hT()}${hT()}${hT()}`}});function hT(){return String.fromCharCode(97+Math.floor(25*Math.random()))}const pN=new me("Platform Initializer"),fT=new me("Platform ID",{providedIn:"platform",factory:()=>"unknown"}),kr=new me("AnimationModuleType");let L6=(()=>{class i{log(e){console.log(e)}warn(e){console.warn(e)}}return i.\u0275fac=function(e){return new(e||i)},i.\u0275prov=ke({token:i,factory:i.\u0275fac,providedIn:"platform"}),i})();const ql=new me("LocaleId",{providedIn:"root",factory:()=>Ft(ql,Ot.Optional|Ot.SkipSelf)||function N6(){return typeof $localize<"u"&&$localize.locale||im}()});class U6{constructor(t,e){this.ngModuleFactory=t,this.componentFactories=e}}let mN=(()=>{class i{compileModuleSync(e){return new K1(e)}compileModuleAsync(e){return Promise.resolve(this.compileModuleSync(e))}compileModuleAndAllComponentsSync(e){const n=this.compileModuleSync(e),s=ll(hr(e).declarations).reduce((o,a)=>{const l=Hn(a);return l&&o.push(new iy(l)),o},[]);return new U6(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=ke({token:i,factory:i.\u0275fac,providedIn:"root"}),i})();const H6=(()=>Promise.resolve(0))();function pT(i){typeof Zone>"u"?H6.then(()=>{i&&i.apply(null,null)}):Zone.current.scheduleMicroTask("scheduleMicrotask",i)}class pt{constructor({enableLongStackTrace:t=!1,shouldCoalesceEventChangeDetection:e=!1,shouldCoalesceRunChangeDetection:n=!1}){if(this.hasPendingMacrotasks=!1,this.hasPendingMicrotasks=!1,this.isStable=!0,this.onUnstable=new $e(!1),this.onMicrotaskEmpty=new $e(!1),this.onStable=new $e(!1),this.onError=new $e(!1),typeof Zone>"u")throw new pe(908,!1);Zone.assertZonePatched();const r=this;r._nesting=0,r._outer=r._inner=Zone.current,Zone.TaskTrackingZoneSpec&&(r._inner=r._inner.fork(new Zone.TaskTrackingZoneSpec)),t&&Zone.longStackTraceZoneSpec&&(r._inner=r._inner.fork(Zone.longStackTraceZoneSpec)),r.shouldCoalesceEventChangeDetection=!n&&e,r.shouldCoalesceRunChangeDetection=n,r.lastRequestAnimationFrameId=-1,r.nativeRequestAnimationFrame=function G6(){let i=Rn.requestAnimationFrame,t=Rn.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 j6(i){const t=()=>{!function W6(i){i.isCheckStableRunning||-1!==i.lastRequestAnimationFrameId||(i.lastRequestAnimationFrameId=i.nativeRequestAnimationFrame.call(Rn,()=>{i.fakeTopEventTask||(i.fakeTopEventTask=Zone.root.scheduleEventTask("fakeTopEventTask",()=>{i.lastRequestAnimationFrameId=-1,gT(i),i.isCheckStableRunning=!0,mT(i),i.isCheckStableRunning=!1},void 0,()=>{},()=>{})),i.fakeTopEventTask.invoke()}),gT(i))}(i)};i._inner=i._inner.fork({name:"angular",properties:{isAngularZone:!0},onInvokeTask:(e,n,r,s,o,a)=>{try{return vN(i),e.invokeTask(r,s,o,a)}finally{(i.shouldCoalesceEventChangeDetection&&"eventTask"===s.type||i.shouldCoalesceRunChangeDetection)&&t(),yN(i)}},onInvoke:(e,n,r,s,o,a,l)=>{try{return vN(i),e.invoke(r,s,o,a,l)}finally{i.shouldCoalesceRunChangeDetection&&t(),yN(i)}},onHasTask:(e,n,r,s)=>{e.hasTask(r,s),n===r&&("microTask"==s.change?(i._hasPendingMicrotasks=s.microTask,gT(i),mT(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(!pt.isInAngularZone())throw new pe(909,!1)}static assertNotInAngularZone(){if(pt.isInAngularZone())throw new pe(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,$6,Bw,Bw);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 $6={};function mT(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 gT(i){i.hasPendingMicrotasks=!!(i._hasPendingMicrotasks||(i.shouldCoalesceEventChangeDetection||i.shouldCoalesceRunChangeDetection)&&-1!==i.lastRequestAnimationFrameId)}function vN(i){i._nesting++,i.isStable&&(i.isStable=!1,i.onUnstable.emit(null))}function yN(i){i._nesting--,mT(i)}class Y6{constructor(){this.hasPendingMicrotasks=!1,this.hasPendingMacrotasks=!1,this.isStable=!0,this.onUnstable=new $e,this.onMicrotaskEmpty=new $e,this.onStable=new $e,this.onError=new $e}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 bN=new me(""),zw=new me("");let yT,_T=(()=>{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,yT||(function q6(i){yT=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:()=>{pt.assertNotInAngularZone(),pT(()=>{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())pT(()=>{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)(ee(pt),ee(vT),ee(zw))},i.\u0275prov=ke({token:i,factory:i.\u0275fac}),i})(),vT=(()=>{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 yT?.findTestabilityInTree(this,e,n)??null}}return i.\u0275fac=function(e){return new(e||i)},i.\u0275prov=ke({token:i,factory:i.\u0275fac,providedIn:"platform"}),i})();const Hc=!1;let tu=null;const xN=new me("AllowMultipleToken"),bT=new me("PlatformDestroyListeners"),wN=new me("appBootstrapListener");class MN{constructor(t,e){this.name=t,this.token=e}}function SN(i,t,e=[]){const n=`Platform: ${t}`,r=new me(n);return(s=[])=>{let o=xT();if(!o||o.injector.get(xN,!1)){const a=[...e,...s,{provide:r,useValue:!0}];i?i(a):function Z6(i){if(tu&&!tu.get(xN,!1))throw new pe(400,!1);tu=i;const t=i.get(AN);(function CN(i){const t=i.get(pN,null);t&&t.forEach(e=>e())})(i)}(function EN(i=[],t){return $i.create({name:t,providers:[{provide:Iv,useValue:"platform"},{provide:bT,useValue:new Set([()=>tu=null])},...i]})}(a,n))}return function J6(i){const t=xT();if(!t)throw new pe(401,!1);return t}()}}function xT(){return tu?.get(AN)??null}let AN=(()=>{class i{constructor(e){this._injector=e,this._modules=[],this._destroyListeners=[],this._destroyed=!1}bootstrapModuleFactory(e,n){const r=function TN(i,t){let e;return e="noop"===i?new Y6:("zone.js"===i?void 0:i)||new pt(t),e}(n?.ngZone,function DN(i){return{enableLongStackTrace:!1,shouldCoalesceEventChangeDetection:!(!i||!i.ngZoneEventCoalescing)||!1,shouldCoalesceRunChangeDetection:!(!i||!i.ngZoneRunCoalescing)||!1}}(n)),s=[{provide:pt,useValue:r}];return r.run(()=>{const o=$i.create({providers:s,parent:this.injector,name:e.moduleType.name}),a=e.create(o),l=a.injector.get(al,null);if(!l)throw new pe(402,!1);return r.runOutsideAngular(()=>{const c=r.onError.subscribe({next:d=>{l.handleError(d)}});a.onDestroy(()=>{Hw(this._modules,a),c.unsubscribe()})}),function IN(i,t,e){try{const n=e();return oy(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(Vw);return c.runInitializers(),c.donePromise.then(()=>(function n2(i){En(i,"Expected localeId to be defined"),"string"==typeof i&&(t2=i.toLowerCase().replace(/_/g,"-"))}(a.injector.get(ql,im)||im),this._moduleDoBootstrap(a),a))})})}bootstrapModule(e,n=[]){const r=RN({},n);return function X6(i,t,e){const n=new K1(e);return Promise.resolve(n)}(0,0,e).then(s=>this.bootstrapModuleFactory(s,r))}_moduleDoBootstrap(e){const n=e.injector.get(dm);if(e._bootstrapComponents.length>0)e._bootstrapComponents.forEach(r=>n.bootstrap(r));else{if(!e.instance.ngDoBootstrap)throw new pe(-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 pe(404,!1);this._modules.slice().forEach(n=>n.destroy()),this._destroyListeners.forEach(n=>n());const e=this._injector.get(bT,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)(ee($i))},i.\u0275prov=ke({token:i,factory:i.\u0275fac,providedIn:"platform"}),i})();function RN(i,t){return Array.isArray(t)?t.reduce(RN,i):{...i,...t}}let dm=(()=>{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 In(a=>{this._stable=this._zone.isStable&&!this._zone.hasPendingMacrotasks&&!this._zone.hasPendingMicrotasks,this._zone.runOutsideAngular(()=>{a.next(this._stable),a.complete()})}),o=new In(a=>{let l;this._zone.runOutsideAngular(()=>{l=this._zone.onStable.subscribe(()=>{pt.assertNotInAngularZone(),pT(()=>{!this._stable&&!this._zone.hasPendingMacrotasks&&!this._zone.hasPendingMicrotasks&&(this._stable=!0,a.next(!0))})})});const c=this._zone.onUnstable.subscribe(()=>{pt.assertInAngularZone(),this._stable&&(this._stable=!1,this._zone.runOutsideAngular(()=>{a.next(!1)}))});return()=>{l.unsubscribe(),c.unsubscribe()}});this.isStable=Cr(s,o.pipe(Uf()))}bootstrap(e,n){const r=e instanceof Ov;if(!this._injector.get(Vw).done){!r&&function Ed(i){const t=Hn(i)||Vr(i)||vs(i);return null!==t&&t.standalone}(e);throw new pe(405,Hc)}let o;o=r?e:this._injector.get(Hl).resolveComponentFactory(e),this.componentTypes.push(o.componentType);const a=function K6(i){return i.isBoundToModule}(o)?void 0:this._injector.get(rm),c=o.create($i.NULL,[],n||o.selector,a),d=c.location.nativeElement,h=c.injector.get(bN,null);return h?.registerApplication(d),c.onDestroy(()=>{this.detachView(c.hostView),Hw(this.components,c),h?.unregisterApplication(d)}),this._loadComponent(c),c}tick(){if(this._runningTick)throw new pe(101,!1);try{this._runningTick=!0;for(let e of this._views)e.detectChanges()}catch(e){this._zone.runOutsideAngular(()=>this._exceptionHandler.handleError(e))}finally{this._runningTick=!1}}attachView(e){const n=e;this._views.push(n),n.attachToAppRef(this)}detachView(e){const n=e;Hw(this._views,n),n.detachFromAppRef()}_loadComponent(e){this.attachView(e.hostView),this.tick(),this.components.push(e);const n=this._injector.get(wN,[]);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),()=>Hw(this._destroyListeners,e)}destroy(){if(this._destroyed)throw new pe(406,!1);const e=this._injector;e.destroy&&!e.destroyed&&e.destroy()}get viewCount(){return this._views.length}warnIfDestroyed(){}}return i.\u0275fac=function(e){return new(e||i)(ee(pt),ee(io),ee(al))},i.\u0275prov=ke({token:i,factory:i.\u0275fac,providedIn:"root"}),i})();function Hw(i,t){const e=i.indexOf(t);e>-1&&i.splice(e,1)}let Zn=(()=>{class i{}return i.__NG_ELEMENT_ID__=t9,i})();function t9(i){return function n9(i,t,e){if(Dd(i)&&!e){const n=ws(i.index,t);return new ny(n,n)}return 47&i.type?new ny(t[sr],t):null}(Ar(),Se(),16==(16&i))}class LN{constructor(){}supports(t){return Ew(t)}create(t){return new c9(t)}}const l9=(i,t)=>t;class c9{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||l9}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 d9(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 NN),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 NN),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 d9{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 u9{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 NN{constructor(){this.map=new Map}put(t){const e=t.trackById;let n=this.map.get(e);n||(n=new u9,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 BN(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 f9(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 f9{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 VN(){return new Ww([new LN])}let Ww=(()=>{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||VN()),deps:[[i,new Ma,new Ss]]}}find(e){const n=this.factories.find(r=>r.supports(e));if(null!=n)return n;throw new pe(901,!1)}}return i.\u0275prov=ke({token:i,providedIn:"root",factory:VN}),i})();function zN(){return new gy([new UN])}let gy=(()=>{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||zN()),deps:[[i,new Ma,new Ss]]}}find(e){const n=this.factories.find(r=>r.supports(e));if(n)return n;throw new pe(901,!1)}}return i.\u0275prov=ke({token:i,providedIn:"root",factory:zN}),i})();const g9=SN(null,"core",[]);let _9=(()=>{class i{constructor(e){}}return i.\u0275fac=function(e){return new(e||i)(ee(dm))},i.\u0275mod=nn({type:i}),i.\u0275inj=Kt({}),i})();let ET=null;function Gc(){return ET}class b9{}const jt=new me("DocumentToken");let AT=(()=>{class i{historyGo(e){throw new Error("Not implemented")}}return i.\u0275fac=function(e){return new(e||i)},i.\u0275prov=ke({token:i,factory:function(){return function x9(){return ee(HN)}()},providedIn:"platform"}),i})();const w9=new me("Location Initialized");let HN=(()=>{class i extends AT{constructor(e){super(),this._doc=e,this._location=window.location,this._history=window.history}getBaseHrefFromDOM(){return Gc().getBaseHref(this._doc)}onPopState(e){const n=Gc().getGlobalEventTarget(this._doc,"window");return n.addEventListener("popstate",e,!1),()=>n.removeEventListener("popstate",e)}onHashChange(e){const n=Gc().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){GN()?this._history.pushState(e,n,r):this._location.hash=r}replaceState(e,n,r){GN()?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)(ee(jt))},i.\u0275prov=ke({token:i,factory:function(){return function M9(){return new HN(ee(jt))}()},providedIn:"platform"}),i})();function GN(){return!!window.history.pushState}function DT(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 $N(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 $c(i){return i&&"?"!==i[0]?"?"+i:i}let Ih=(()=>{class i{historyGo(e){throw new Error("Not implemented")}}return i.\u0275fac=function(e){return new(e||i)},i.\u0275prov=ke({token:i,factory:function(){return Ft(jN)},providedIn:"root"}),i})();const WN=new me("appBaseHref");let jN=(()=>{class i extends Ih{constructor(e,n){super(),this._platformLocation=e,this._removeListenerFns=[],this._baseHref=n??this._platformLocation.getBaseHrefFromDOM()??Ft(jt).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 DT(this._baseHref,e)}path(e=!1){const n=this._platformLocation.pathname+$c(this._platformLocation.search),r=this._platformLocation.hash;return r&&e?`${n}${r}`:n}pushState(e,n,r,s){const o=this.prepareExternalUrl(r+$c(s));this._platformLocation.pushState(e,n,o)}replaceState(e,n,r,s){const o=this.prepareExternalUrl(r+$c(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)(ee(AT),ee(WN,8))},i.\u0275prov=ke({token:i,factory:i.\u0275fac,providedIn:"root"}),i})(),C9=(()=>{class i extends Ih{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=DT(this._baseHref,e);return n.length>0?"#"+n:n}pushState(e,n,r,s){let o=this.prepareExternalUrl(r+$c(s));0==o.length&&(o=this._platformLocation.pathname),this._platformLocation.pushState(e,n,o)}replaceState(e,n,r,s){let o=this.prepareExternalUrl(r+$c(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)(ee(AT),ee(WN,8))},i.\u0275prov=ke({token:i,factory:i.\u0275fac}),i})(),_y=(()=>{class i{constructor(e){this._subject=new $e,this._urlChangeListeners=[],this._urlChangeSubscription=null,this._locationStrategy=e;const n=this._locationStrategy.getBaseHref();this._basePath=function A9(i){if(new RegExp("^(https?:)?//").test(i)){const[,e]=i.split(/\/\/[^\/]+/);return e}return i}($N(YN(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+$c(n))}normalize(e){return i.stripTrailingSlash(function E9(i,t){if(!i||!t.startsWith(i))return t;const e=t.substring(i.length);return""===e||["/",";","?","#"].includes(e[0])?e:t}(this._basePath,YN(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+$c(n)),r)}replaceState(e,n="",r=null){this._locationStrategy.replaceState(r,"",e,n),this._notifyUrlChangeListeners(this.prepareExternalUrl(e+$c(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=$c,i.joinWithSlash=DT,i.stripTrailingSlash=$N,i.\u0275fac=function(e){return new(e||i)(ee(Ih))},i.\u0275prov=ke({token:i,factory:function(){return function S9(){return new _y(ee(Ih))}()},providedIn:"root"}),i})();function YN(i){return i.replace(/\/index.html$/,"")}var So=(()=>((So=So||{})[So.Decimal=0]="Decimal",So[So.Percent=1]="Percent",So[So.Currency=2]="Currency",So[So.Scientific=3]="Scientific",So))(),Ht=(()=>((Ht=Ht||{})[Ht.Decimal=0]="Decimal",Ht[Ht.Group=1]="Group",Ht[Ht.List=2]="List",Ht[Ht.PercentSign=3]="PercentSign",Ht[Ht.PlusSign=4]="PlusSign",Ht[Ht.MinusSign=5]="MinusSign",Ht[Ht.Exponential=6]="Exponential",Ht[Ht.SuperscriptingExponent=7]="SuperscriptingExponent",Ht[Ht.PerMille=8]="PerMille",Ht[Ht.Infinity=9]="Infinity",Ht[Ht.NaN=10]="NaN",Ht[Ht.TimeSeparator=11]="TimeSeparator",Ht[Ht.CurrencyDecimal=12]="CurrencyDecimal",Ht[Ht.CurrencyGroup=13]="CurrencyGroup",Ht))();function Da(i,t){const e=oo(i),n=e[rt.NumberSymbols][t];if(typeof n>"u"){if(t===Ht.CurrencyDecimal)return e[rt.NumberSymbols][Ht.Decimal];if(t===Ht.CurrencyGroup)return e[rt.NumberSymbols][Ht.Group]}return n}const J9=/^(\d+)?\.((\d+)(-(\d+))?)?$/,JN=22,eM=".",yy="0",eY=";",tY=",",PT="#";function LT(i){const t=parseInt(i);if(isNaN(t))throw new Error("Invalid integer literal when parsing "+i);return t}const BT=/\s+/,nB=[];let hm=(()=>{class i{constructor(e,n,r,s){this._iterableDiffers=e,this._keyValueDiffers=n,this._ngEl=r,this._renderer=s,this.initialClasses=nB,this.stateMap=new Map}set klass(e){this.initialClasses=null!=e?e.trim().split(BT):nB}set ngClass(e){this.rawClass="string"==typeof e?e.trim().split(BT):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(BT).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)(E(Ww),E(gy),E(gt),E(ol))},i.\u0275dir=ve({type:i,selectors:[["","ngClass",""]],inputs:{klass:["class","klass"],ngClass:"ngClass"},standalone:!0}),i})();class hY{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 Eo=(()=>{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 hY(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),sB(a,r)}});for(let r=0,s=n.length;r{sB(n.get(r.currentIndex),r)})}static ngTemplateContextGuard(e,n){return!0}}return i.\u0275fac=function(e){return new(e||i)(E(jr),E(Co),E(Ww))},i.\u0275dir=ve({type:i,selectors:[["","ngFor","","ngForOf",""]],inputs:{ngForOf:"ngForOf",ngForTrackBy:"ngForTrackBy",ngForTemplate:"ngForTemplate"},standalone:!0}),i})();function sB(i,t){i.context.$implicit=t.item}let vi=(()=>{class i{constructor(e,n){this._viewContainer=e,this._context=new pY,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){oB("ngIfThen",e),this._thenTemplateRef=e,this._thenViewRef=null,this._updateView()}set ngIfElse(e){oB("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)(E(jr),E(Co))},i.\u0275dir=ve({type:i,selectors:[["","ngIf",""]],inputs:{ngIf:"ngIf",ngIfThen:"ngIfThen",ngIfElse:"ngIfElse"},standalone:!0}),i})();class pY{constructor(){this.$implicit=null,this.ngIf=null}}function oB(i,t){if(t&&!t.createEmbeddedView)throw new Error(`${i} must be a TemplateRef, but received '${pi(t)}'.`)}class UT{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 by=(()=>{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=ve({type:i,selectors:[["","ngSwitch",""]],inputs:{ngSwitch:"ngSwitch"},standalone:!0}),i})(),VT=(()=>{class i{constructor(e,n,r){this.ngSwitch=r,r._addCase(),this._view=new UT(e,n)}ngDoCheck(){this._view.enforceState(this.ngSwitch._matchCase(this.ngSwitchCase))}}return i.\u0275fac=function(e){return new(e||i)(E(jr),E(Co),E(by,9))},i.\u0275dir=ve({type:i,selectors:[["","ngSwitchCase",""]],inputs:{ngSwitchCase:"ngSwitchCase"},standalone:!0}),i})(),aB=(()=>{class i{constructor(e,n,r){r._addDefault(new UT(e,n))}}return i.\u0275fac=function(e){return new(e||i)(E(jr),E(Co),E(by,9))},i.\u0275dir=ve({type:i,selectors:[["","ngSwitchDefault",""]],standalone:!0}),i})(),tM=(()=>{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:Es.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)(E(gt),E(gy),E(ol))},i.\u0275dir=ve({type:i,selectors:[["","ngStyle",""]],inputs:{ngStyle:"ngStyle"},standalone:!0}),i})(),xy=(()=>{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)(E(jr))},i.\u0275dir=ve({type:i,selectors:[["","ngTemplateOutlet",""]],inputs:{ngTemplateOutletContext:"ngTemplateOutletContext",ngTemplateOutlet:"ngTemplateOutlet",ngTemplateOutletInjector:"ngTemplateOutletInjector"},standalone:!0,features:[xi]}),i})();function fl(i,t){return new pe(2100,!1)}class gY{createSubscription(t,e){return t.subscribe({next:e,error:n=>{throw n}})}dispose(t){t.unsubscribe()}}class _Y{createSubscription(t,e){return t.then(e,n=>{throw n})}dispose(t){}}const vY=new _Y,yY=new gY;let pl=(()=>{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(oy(e))return vY;if(uL(e))return yY;throw fl()}_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)(E(Zn,16))},i.\u0275pipe=Gi({name:"async",type:i,pure:!1,standalone:!0}),i})(),cB=(()=>{class i{constructor(e){this.differs=e,this.keyValues=[],this.compareFn=dB}transform(e,n=dB){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 kY(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)(E(gy,16))},i.\u0275pipe=Gi({name:"keyvalue",type:i,pure:!1,standalone:!0}),i})();function dB(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 zT(i){return!(null==i||""===i||i!=i)}(e))return null;r=r||this._locale;try{return function sY(i,t,e){return function OT(i,t,e,n,r,s,o=!1){let a="",l=!1;if(isFinite(i)){let c=function aY(i){let n,r,s,o,a,t=Math.abs(i)+"",e=0;for((r=t.indexOf(eM))>-1&&(t=t.replace(eM,"")),(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)===yy;s++);if(s===(a=t.length))n=[0],r=1;else{for(a--;t.charAt(a)===yy;)a--;for(r-=s,n=[],o=0;s<=a;s++,o++)n[o]=Number(t.charAt(s))}return r>JN&&(n=n.splice(0,JN-1),e=r-1,r=1),{digits:n,exponent:e,integerLen:r}}(i);o&&(c=function oY(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 d=t.minInt,h=t.minFrac,p=t.maxFrac;if(s){const M=s.match(J9);if(null===M)throw new Error(`${s} is not a valid digit info`);const x=M[1],C=M[3],F=M[5];null!=x&&(d=LT(x)),null!=C&&(h=LT(C)),null!=F?p=LT(F):null!=C&&h>p&&(p=h)}!function lY(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);d&&(n.unshift(d),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(Da(e,n)),v.length&&(a+=Da(e,r)+v.join("")),b&&(a+=Da(e,Ht.Exponential)+"+"+b)}else a=Da(e,Ht.Infinity);return a=i<0&&!l?t.negPre+a+t.negSuf:t.posPre+a+t.posSuf,a}(i,function FT(i,t="-"){const e={minInt:1,minFrac:0,maxFrac:0,posPre:"",posSuf:"",negPre:"",negSuf:"",gSize:0,lgSize:0},n=i.split(eY),r=n[0],s=n[1],o=-1!==r.indexOf(eM)?r.split(eM):[r.substring(0,r.lastIndexOf(yy)+1),r.substring(r.lastIndexOf(yy)+1)],a=o[0],l=o[1]||"";e.posPre=a.substring(0,a.indexOf(PT));for(let d=0;d{class i{}return i.\u0275fac=function(e){return new(e||i)},i.\u0275mod=nn({type:i}),i.\u0275inj=Kt({}),i})();const hB="browser";let UY=(()=>{class i{}return i.\u0275prov=ke({token:i,providedIn:"root",factory:()=>new VY(ee(jt),window)}),i})();class VY{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 zY(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=fB(this.window.history)||fB(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 fB(i){return Object.getOwnPropertyDescriptor(i,"scrollRestoration")}class m7 extends b9{constructor(){super(...arguments),this.supportsDOMEvents=!0}}class WT extends m7{static makeCurrent(){!function y9(i){ET||(ET=i)}(new WT)}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 g7(){return My=My||document.querySelector("base"),My?My.getAttribute("href"):null}();return null==e?null:function _7(i){rM=rM||document.createElement("a"),rM.setAttribute("href",i);const t=rM.pathname;return"/"===t.charAt(0)?t:`/${t}`}(e)}resetBaseElement(){My=null}getUserAgent(){return window.navigator.userAgent}getCookie(t){return function dY(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 rM,My=null;const vB=new me("TRANSITION_ID"),y7=[{provide:Uw,useFactory:function v7(i,t,e){return()=>{e.get(Vw).donePromise.then(()=>{const n=Gc(),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=ke({token:i,factory:i.\u0275fac}),i})();const sM=new me("EventManagerPlugins");let oM=(()=>{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=ke({token:i,factory:i.\u0275fac}),i})(),Cy=(()=>{class i extends bB{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)(ee(jt))},i.\u0275prov=ke({token:i,factory:i.\u0275fac}),i})();const jT={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/"},YT=/%COMP%/g,MB=new me("RemoveStylesOnCompDestory",{providedIn:"root",factory:()=>!1});function CB(i,t){return t.flat(100).map(e=>e.replace(YT,i))}function SB(i){return t=>{if("__ngUnwrap__"===t)return i;!1===i(t)&&(t.preventDefault(),t.returnValue=!1)}}let aM=(()=>{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 qT(e)}createRenderer(e,n){if(!e||!n)return this.defaultRenderer;const r=this.getOrCreateRenderer(e,n);return r instanceof DB?r.applyToHost(e):r instanceof XT&&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 Ks.Emulated:s=new DB(o,a,n,this.appId,l);break;case Ks.ShadowDom:return new D7(o,a,e,n);default:s=new XT(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)(ee(oM),ee(Cy),ee(cm),ee(MB))},i.\u0275prov=ke({token:i,factory:i.\u0275fac}),i})();class qT{constructor(t){this.eventManager=t,this.data=Object.create(null),this.destroyNode=null}destroy(){}createElement(t,e){return e?document.createElementNS(jT[e]||e,t):document.createElement(t)}createComment(t){return document.createComment(t)}createText(t){return document.createTextNode(t)}appendChild(t,e){(AB(t)?t.content:t).appendChild(e)}insertBefore(t,e,n){t&&(AB(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=jT[r];s?t.setAttributeNS(s,e,n):t.setAttribute(e,n)}else t.setAttribute(e,n)}removeAttribute(t,e,n){if(n){const r=jT[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&(Es.DashCase|Es.Important)?t.style.setProperty(e,n,r&Es.Important?"important":""):t.style[e]=n}removeStyle(t,e,n){n&Es.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,SB(n)):this.eventManager.addEventListener(t,e,SB(n))}}function AB(i){return"TEMPLATE"===i.tagName&&void 0!==i.content}class D7 extends qT{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=CB(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 XT extends qT{constructor(t,e,n,r,s=n.id){super(t),this.sharedStylesHost=e,this.removeStylesOnCompDestory=r,this.rendererUsageCount=0,this.styles=CB(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 DB extends XT{constructor(t,e,n,r,s){const o=r+"-"+n.id;super(t,e,n,s,o),this.contentAttr=function S7(i){return"_ngcontent-%COMP%".replace(YT,i)}(o),this.hostAttr=function E7(i){return"_nghost-%COMP%".replace(YT,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 T7=(()=>{class i extends yB{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)(ee(jt))},i.\u0275prov=ke({token:i,factory:i.\u0275fac}),i})();const TB=["alt","control","meta","shift"],I7={"\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"},R7={alt:i=>i.altKey,control:i=>i.ctrlKey,meta:i=>i.metaKey,shift:i=>i.shiftKey};let k7=(()=>{class i extends yB{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(()=>Gc().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."),TB.forEach(c=>{const d=n.indexOf(c);d>-1&&(n.splice(d,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=I7[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"),TB.forEach(o=>{o!==r&&(0,R7[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)(ee(jt))},i.\u0275prov=ke({token:i,factory:i.\u0275fac}),i})();const L7=SN(g9,"browser",[{provide:fT,useValue:hB},{provide:pN,useValue:function P7(){WT.makeCurrent()},multi:!0},{provide:jt,useFactory:function F7(){return function sD(i){vv=i}(document),document},deps:[]}]),kB=new me(""),PB=[{provide:zw,useClass:class b7{addToWindow(t){Rn.getAngularTestability=(n,r=!0)=>{const s=t.findTestabilityInTree(n,r);if(null==s)throw new Error("Could not find testability for element.");return s},Rn.getAllAngularTestabilities=()=>t.getAllTestabilities(),Rn.getAllAngularRootElements=()=>t.getAllRootElements(),Rn.frameworkStabilizers||(Rn.frameworkStabilizers=[]),Rn.frameworkStabilizers.push(n=>{const r=Rn.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?Gc().isShadowRoot(e)?this.findTestabilityInTree(t,e.host,!0):this.findTestabilityInTree(t,e.parentElement,!0):null)}},deps:[]},{provide:bN,useClass:_T,deps:[pt,vT,zw]},{provide:_T,useClass:_T,deps:[pt,vT,zw]}],OB=[{provide:Iv,useValue:"root"},{provide:al,useFactory:function O7(){return new al},deps:[]},{provide:sM,useClass:T7,multi:!0,deps:[jt,pt,fT]},{provide:sM,useClass:k7,multi:!0,deps:[jt]},{provide:aM,useClass:aM,deps:[oM,Cy,cm,MB]},{provide:Gl,useExisting:aM},{provide:bB,useExisting:Cy},{provide:Cy,useClass:Cy,deps:[jt]},{provide:oM,useClass:oM,deps:[sM,pt]},{provide:class HY{},useClass:x7,deps:[]},[]];let FB=(()=>{class i{constructor(e){}static withServerTransition(e){return{ngModule:i,providers:[{provide:cm,useValue:e.appId},{provide:vB,useExisting:cm},y7]}}}return i.\u0275fac=function(e){return new(e||i)(ee(kB,12))},i.\u0275mod=nn({type:i}),i.\u0275inj=Kt({providers:[...OB,...PB],imports:[Ao,_9]}),i})(),LB=(()=>{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)(ee(jt))},i.\u0275prov=ke({token:i,factory:function(e){let n=null;return n=e?new e:function B7(){return new LB(ee(jt))}(),n},providedIn:"root"}),i})();typeof window<"u"&&window;let QT=(()=>{class i{}return i.\u0275fac=function(e){return new(e||i)},i.\u0275prov=ke({token:i,factory:function(e){let n=null;return n=e?new(e||i):ee(UB),n},providedIn:"root"}),i})(),UB=(()=>{class i extends QT{constructor(e){super(),this._doc=e}sanitize(e,n){if(null==n)return null;switch(e){case Kn.NONE:return n;case Kn.HTML:return Sa(n,"HTML")?to(n):Zx(this._doc,String(n)).toString();case Kn.STYLE:return Sa(n,"Style")?to(n):n;case Kn.SCRIPT:if(Sa(n,"Script"))return to(n);throw new Error("unsafe value used in a script context");case Kn.URL:return Sa(n,"URL")?to(n):xh(String(n));case Kn.RESOURCE_URL:if(Sa(n,"ResourceURL"))return to(n);throw new Error(`unsafe value used in a resource URL context (see ${qu})`);default:throw new Error(`Unexpected SecurityContext ${e} (see ${qu})`)}}bypassSecurityTrustHtml(e){return function uD(i){return new oD(i)}(e)}bypassSecurityTrustStyle(e){return function hD(i){return new aD(i)}(e)}bypassSecurityTrustScript(e){return function fD(i){return new lD(i)}(e)}bypassSecurityTrustUrl(e){return function pD(i){return new cD(i)}(e)}bypassSecurityTrustResourceUrl(e){return function mD(i){return new Pp(i)}(e)}}return i.\u0275fac=function(e){return new(e||i)(ee(jt))},i.\u0275prov=ke({token:i,factory:function(e){let n=null;return n=e?new e:function G7(i){return new UB(i.get(jt))}(ee($i)),n},providedIn:"root"}),i})();function ft(...i){return Ni(i,$u(i))}class ut extends Re{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 fm=V(i=>function(){i(this),this.name="EmptyError",this.message="no elements in sequence"}),{isArray:$7}=Array,{getPrototypeOf:W7,prototype:j7,keys:Y7}=Object;function VB(i){if(1===i.length){const t=i[0];if($7(t))return{args:t,keys:null};if(function q7(i){return i&&"object"==typeof i&&W7(i)===j7}(t)){const e=Y7(t);return{args:e.map(n=>t[n]),keys:e}}}return{args:i,keys:null}}const{isArray:X7}=Array;function JT(i){return et(t=>function K7(i,t){return X7(t)?i(...t):i(t)}(i,t))}function zB(i,t){return i.reduce((e,n,r)=>(e[n]=t[r],e),{})}function Xl(...i){const t=$u(i),e=w0(i),{args:n,keys:r}=VB(i);if(0===n.length)return Ni([],t);const s=new In(function Z7(i,t,e=$a){return n=>{HB(t,()=>{const{length:r}=i,s=new Array(r);let o=r,a=r;for(let l=0;l{const c=Ni(i[l],t);let d=!1;c.subscribe(Yn(n,h=>{s[l]=h,d||(d=!0,a--),a||n.next(e(s.slice()))},()=>{--o||n.complete()}))},n)},n)}}(n,t,r?o=>zB(r,o):$a));return e?s.pipe(JT(e)):s}function HB(i,t,e){i?Ya(e,i,t):t()}function Sy(...i){return function Q7(){return bd(1)}()(Ni(i,$u(i)))}function Ey(i){return new In(t=>{Mr(i()).subscribe(t)})}function pm(i,t){const e=cn(i)?i:()=>i,n=r=>r.error(e());return new In(t?r=>t.schedule(n,0,r):n)}function eI(){return ti((i,t)=>{let e=null;i._refCount++;const n=Yn(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 GB extends In{constructor(t,e){super(),this.source=t,this.subjectFactory=e,this._subject=null,this._refCount=0,this._connection=null,c0(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 Zt;const e=this.getSubject();t.add(this.source.subscribe(Yn(e,void 0,()=>{this._teardown(),e.complete()},n=>{this._teardown(),e.error(n)},()=>this._teardown()))),t.closed&&(this._connection=null,t=Zt.EMPTY)}return t}refCount(){return eI()(this)}}function ks(i,t){return ti((e,n)=>{let r=null,s=0,o=!1;const a=()=>o&&!r&&n.complete();e.subscribe(Yn(n,l=>{r?.unsubscribe();let c=0;const d=s++;Mr(i(l,d)).subscribe(r=Yn(n,h=>n.next(t?t(l,h,d,c++):h),()=>{r=null,a()}))},()=>{o=!0,a()}))})}function Oi(i){return i<=0?()=>mo:ti((t,e)=>{let n=0;t.subscribe(Yn(e,r=>{++n<=i&&(e.next(r),i<=n&&e.complete())}))})}function Do(...i){const t=$u(i);return ti((e,n)=>{(t?Sy(i,e,t):Sy(i,e)).subscribe(n)})}function gn(i,t){return ti((e,n)=>{let r=0;e.subscribe(Yn(n,s=>i.call(t,s,r++)&&n.next(s)))})}function lM(i){return ti((t,e)=>{let n=!1;t.subscribe(Yn(e,r=>{n=!0,e.next(r)},()=>{n||e.next(i),e.complete()}))})}function $B(i=J7){return ti((t,e)=>{let n=!1;t.subscribe(Yn(e,r=>{n=!0,e.next(r)},()=>n?e.complete():e.error(i())))})}function J7(){return new fm}function iu(i,t){const e=arguments.length>=2;return n=>n.pipe(i?gn((r,s)=>i(r,s,n)):$a,Oi(1),e?lM(t):$B(()=>new fm))}function ru(i,t){return cn(t)?rr(i,t,1):rr(i,1)}function Vi(i,t,e){const n=cn(i)||t||e?{next:i,error:t,complete:e}:i;return n?ti((r,s)=>{var o;null===(o=n.subscribe)||void 0===o||o.call(n);let a=!0;r.subscribe(Yn(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)}))}):$a}function jc(i){return ti((t,e)=>{let s,n=null,r=!1;n=t.subscribe(Yn(e,void 0,void 0,o=>{s=Mr(i(o,jc(i)(t))),n?(n.unsubscribe(),n=null,s.subscribe(e)):r=!0})),r&&(n.unsubscribe(),n=null,s.subscribe(e))})}function tI(i,t){return ti(function eq(i,t,e,n,r){return(s,o)=>{let a=e,l=t,c=0;s.subscribe(Yn(o,d=>{const h=c++;l=a?i(l,d,h):(a=!0,d),n&&o.next(l)},r&&(()=>{a&&o.next(l),o.complete()})))}}(i,t,arguments.length>=2,!0))}function nI(i){return i<=0?()=>mo:ti((t,e)=>{let n=[];t.subscribe(Yn(e,r=>{n.push(r),i{for(const r of n)e.next(r);e.complete()},void 0,()=>{n=null}))})}function WB(i,t){const e=arguments.length>=2;return n=>n.pipe(i?gn((r,s)=>i(r,s,n)):$a,nI(1),e?lM(t):$B(()=>new fm))}function jB(i,t=!1){return ti((e,n)=>{let r=0;e.subscribe(Yn(n,s=>{const o=i(s,r++);(o||t)&&n.next(s),!o&&n.complete()}))})}function YB(i){return et(()=>i)}function su(i){return ti((t,e)=>{try{t.subscribe(e)}finally{e.add(i)}})}const _n="primary",Ay=Symbol("RouteTitle");class tq{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 tq(i)}function nq(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 XB(i){return Array.prototype.concat.apply([],i)}function KB(i){return i.length>0?i[i.length-1]:null}function os(i,t){for(const e in i)i.hasOwnProperty(e)&&t(i[e],e)}function ou(i){return L1(i)?i:oy(i)?Ni(Promise.resolve(i)):ft(i)}const cM=!1,rq={exact:function JB(i,t,e){if(!Rh(i.segments,t.segments)||!dM(i.segments,t.segments,e)||i.numberOfChildren!==t.numberOfChildren)return!1;for(const n in t.children)if(!i.children[n]||!JB(i.children[n],t.children[n],e))return!1;return!0},subset:e3},ZB={exact:function sq(i,t){return Kl(i,t)},subset:function oq(i,t){return Object.keys(t).length<=Object.keys(i).length&&Object.keys(t).every(e=>qB(i[e],t[e]))},ignored:()=>!0};function QB(i,t,e){return rq[e.paths](i.root,t.root,e.matrixParams)&&ZB[e.queryParams](i.queryParams,t.queryParams)&&!("exact"===e.fragment&&i.fragment!==t.fragment)}function e3(i,t,e){return t3(i,t,t.segments,e)}function t3(i,t,e,n){if(i.segments.length>e.length){const r=i.segments.slice(0,e.length);return!(!Rh(r,e)||t.hasChildren()||!dM(r,e,n))}if(i.segments.length===e.length){if(!Rh(i.segments,e)||!dM(i.segments,e,n))return!1;for(const r in t.children)if(!i.children[r]||!e3(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!!(Rh(i.segments,r)&&dM(i.segments,r,n)&&i.children[_n])&&t3(i.children[_n],t,s,n)}}function dM(i,t,e){return t.every((n,r)=>ZB[e](i[r].parameters,n.parameters))}class au{constructor(t=new Tn([],{}),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 cq.serialize(this)}}class Tn{constructor(t,e){this.segments=t,this.children=e,this.parent=null,os(e,(n,r)=>n.parent=this)}hasChildren(){return this.numberOfChildren>0}get numberOfChildren(){return Object.keys(this.children).length}toString(){return uM(this)}}class Dy{constructor(t,e){this.path=t,this.parameters=e}get parameterMap(){return this._parameterMap||(this._parameterMap=mm(this.parameters)),this._parameterMap}toString(){return s3(this)}}function Rh(i,t){return i.length===t.length&&i.every((e,n)=>e.path===t[n].path)}let Ty=(()=>{class i{}return i.\u0275fac=function(e){return new(e||i)},i.\u0275prov=ke({token:i,factory:function(){return new iI},providedIn:"root"}),i})();class iI{parse(t){const e=new vq(t);return new au(e.parseRootSegment(),e.parseQueryParams(),e.parseFragment())}serialize(t){const e=`/${Iy(t.root,!0)}`,n=function hq(i){const t=Object.keys(i).map(e=>{const n=i[e];return Array.isArray(n)?n.map(r=>`${hM(e)}=${hM(r)}`).join("&"):`${hM(e)}=${hM(n)}`}).filter(e=>!!e);return t.length?`?${t.join("&")}`:""}(t.queryParams);return`${e}${n}${"string"==typeof t.fragment?`#${function dq(i){return encodeURI(i)}(t.fragment)}`:""}`}}const cq=new iI;function uM(i){return i.segments.map(t=>s3(t)).join("/")}function Iy(i,t){if(!i.hasChildren())return uM(i);if(t){const e=i.children[_n]?Iy(i.children[_n],!1):"",n=[];return os(i.children,(r,s)=>{s!==_n&&n.push(`${s}:${Iy(r,!1)}`)}),n.length>0?`${e}(${n.join("//")})`:e}{const e=function lq(i,t){let e=[];return os(i.children,(n,r)=>{r===_n&&(e=e.concat(t(n,r)))}),os(i.children,(n,r)=>{r!==_n&&(e=e.concat(t(n,r)))}),e}(i,(n,r)=>r===_n?[Iy(i.children[_n],!1)]:[`${r}:${Iy(n,!1)}`]);return 1===Object.keys(i.children).length&&null!=i.children[_n]?`${uM(i)}/${e[0]}`:`${uM(i)}/(${e.join("//")})`}}function n3(i){return encodeURIComponent(i).replace(/%40/g,"@").replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",")}function hM(i){return n3(i).replace(/%3B/gi,";")}function rI(i){return n3(i).replace(/\(/g,"%28").replace(/\)/g,"%29").replace(/%26/gi,"&")}function fM(i){return decodeURIComponent(i)}function r3(i){return fM(i.replace(/\+/g,"%20"))}function s3(i){return`${rI(i.path)}${function uq(i){return Object.keys(i).map(t=>`;${rI(t)}=${rI(i[t])}`).join("")}(i.parameters)}`}const fq=/^[^\/()?;=#]+/;function pM(i){const t=i.match(fq);return t?t[0]:""}const pq=/^[^=?&#]+/,gq=/^[^&#]+/;class vq{constructor(t){this.url=t,this.remaining=t}parseRootSegment(){return this.consumeOptional("/"),""===this.remaining||this.peekStartsWith("?")||this.peekStartsWith("#")?new Tn([],{}):new Tn([],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[_n]=new Tn(t,e)),n}parseSegment(){const t=pM(this.remaining);if(""===t&&this.peekStartsWith(";"))throw new pe(4009,cM);return this.capture(t),new Dy(fM(t),this.parseMatrixParams())}parseMatrixParams(){const t={};for(;this.consumeOptional(";");)this.parseParam(t);return t}parseParam(t){const e=pM(this.remaining);if(!e)return;this.capture(e);let n="";if(this.consumeOptional("=")){const r=pM(this.remaining);r&&(n=r,this.capture(n))}t[fM(e)]=fM(n)}parseQueryParam(t){const e=function mq(i){const t=i.match(pq);return t?t[0]:""}(this.remaining);if(!e)return;this.capture(e);let n="";if(this.consumeOptional("=")){const o=function _q(i){const t=i.match(gq);return t?t[0]:""}(this.remaining);o&&(n=o,this.capture(n))}const r=r3(e),s=r3(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=pM(this.remaining),r=this.remaining[n.length];if("/"!==r&&")"!==r&&";"!==r)throw new pe(4010,cM);let s;n.indexOf(":")>-1?(s=n.slice(0,n.indexOf(":")),this.capture(s),this.capture(":")):t&&(s=_n);const o=this.parseChildren();e[s]=1===Object.keys(o).length?o[_n]:new Tn([],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 pe(4011,cM)}}function sI(i){return i.segments.length>0?new Tn([],{[_n]:i}):i}function mM(i){const t={};for(const n of Object.keys(i.children)){const s=mM(i.children[n]);(s.segments.length>0||s.hasChildren())&&(t[n]=s)}return function yq(i){if(1===i.numberOfChildren&&i.children[_n]){const t=i.children[_n];return new Tn(i.segments.concat(t.segments),t.children)}return i}(new Tn(i.segments,t))}function kh(i){return i instanceof au}const oI=!1;function bq(i,t,e,n,r){if(0===e.length)return gm(t.root,t.root,t.root,n,r);const s=function d3(i){if("string"==typeof i[0]&&1===i.length&&"/"===i[0])return new c3(!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 os(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 c3(e,t,n)}(e);return s.toRoot()?gm(t.root,t.root,new Tn([],{}),n,r):function o(l){const c=function wq(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 u3(i,t,e){let n=i,r=t,s=e;for(;s>r;){if(s-=r,n=n.parent,!n)throw new pe(4005,oI&&"Invalid number of '../'");r=n.segments.length}return new _m(n,!1,r-s)}(e,n+(Ry(i.commands[0])?0:1),i.numberOfDoubleDots)}(s,t,i.snapshot?._urlSegment,l),d=c.processChildren?vm(c.segmentGroup,c.index,s.commands):aI(c.segmentGroup,c.index,s.commands);return gm(t.root,c.segmentGroup,d,n,r)}(i.snapshot?._lastPathIndex)}function Ry(i){return"object"==typeof i&&null!=i&&!i.outlets&&!i.segmentPath}function ky(i){return"object"==typeof i&&null!=i&&i.outlets}function gm(i,t,e,n,r){let o,s={};n&&os(n,(l,c)=>{s[c]=Array.isArray(l)?l.map(d=>`${d}`):`${l}`}),o=i===t?e:l3(i,t,e);const a=sI(mM(o));return new au(a,s,r)}function l3(i,t,e){const n={};return os(i.children,(r,s)=>{n[s]=r===t?e:l3(r,t,e)}),new Tn(i.segments,n)}class c3{constructor(t,e,n){if(this.isAbsolute=t,this.numberOfDoubleDots=e,this.commands=n,t&&n.length>0&&Ry(n[0]))throw new pe(4003,oI&&"Root segment cannot have matrix parameters");const r=n.find(ky);if(r&&r!==KB(n))throw new pe(4004,oI&&"{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 aI(i,t,e){if(i||(i=new Tn([],{})),0===i.segments.length&&i.hasChildren())return vm(i,t,e);const n=function Cq(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(ky(a))break;const l=`${a}`,c=n0&&void 0===l)break;if(l&&c&&"object"==typeof c&&void 0===c.outlets){if(!f3(l,c,o))return s;n+=2}else{if(!f3(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]=aI(i.children[o],t,s))}),os(i.children,(s,o)=>{void 0===n[o]&&(r[o]=s)}),new Tn(i.segments,r)}}function lI(i,t,e){const n=i.segments.slice(0,t);let r=0;for(;r{"string"==typeof e&&(e=[e]),null!==e&&(t[n]=lI(new Tn([],{}),0,e))}),t}function h3(i){const t={};return os(i,(e,n)=>t[n]=`${e}`),t}function f3(i,t,e){return i==e.path&&Kl(t,e.parameters)}const Py="imperative";class Zl{constructor(t,e){this.id=t,this.url=e}}class cI extends Zl{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 Ph extends Zl{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 gM extends Zl{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 _M extends Zl{constructor(t,e,n,r){super(t,e),this.reason=n,this.code=r,this.type=16}}class dI extends Zl{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 Eq extends Zl{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 Aq extends Zl{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 Dq extends Zl{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 Tq extends Zl{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 Iq extends Zl{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 Rq{constructor(t){this.route=t,this.type=9}toString(){return`RouteConfigLoadStart(path: ${this.route.path})`}}class kq{constructor(t){this.route=t,this.type=10}toString(){return`RouteConfigLoadEnd(path: ${this.route.path})`}}class Pq{constructor(t){this.snapshot=t,this.type=11}toString(){return`ChildActivationStart(path: '${this.snapshot.routeConfig&&this.snapshot.routeConfig.path||""}')`}}class Oq{constructor(t){this.snapshot=t,this.type=12}toString(){return`ChildActivationEnd(path: '${this.snapshot.routeConfig&&this.snapshot.routeConfig.path||""}')`}}class Fq{constructor(t){this.snapshot=t,this.type=13}toString(){return`ActivationStart(path: '${this.snapshot.routeConfig&&this.snapshot.routeConfig.path||""}')`}}class Lq{constructor(t){this.snapshot=t,this.type=14}toString(){return`ActivationEnd(path: '${this.snapshot.routeConfig&&this.snapshot.routeConfig.path||""}')`}}class p3{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 Uq=(()=>{class i{createUrlTree(e,n,r,s,o,a){return bq(e||n.root,r,s,o,a)}}return i.\u0275fac=function(e){return new(e||i)},i.\u0275prov=ke({token:i,factory:i.\u0275fac}),i})(),zq=(()=>{class i{}return i.\u0275fac=function(e){return new(e||i)},i.\u0275prov=ke({token:i,factory:function(t){return Uq.\u0275fac(t)},providedIn:"root"}),i})();class m3{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=uI(t,this._root);return e?e.children.map(n=>n.value):[]}firstChild(t){const e=uI(t,this._root);return e&&e.children.length>0?e.children[0].value:null}siblings(t){const e=hI(t,this._root);return e.length<2?[]:e[e.length-2].children.map(r=>r.value).filter(r=>r!==t)}pathFromRoot(t){return hI(t,this._root).map(e=>e.value)}}function uI(i,t){if(i===t.value)return t;for(const e of t.children){const n=uI(i,e);if(n)return n}return null}function hI(i,t){if(i===t.value)return[t];for(const e of t.children){const n=hI(i,e);if(n.length)return n.unshift(t),n}return[]}class Yc{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 g3 extends m3{constructor(t,e){super(t),this.snapshot=e,fI(this,t)}toString(){return this.snapshot.toString()}}function _3(i,t){const e=function Hq(i,t){const o=new vM([],{},{},"",{},_n,t,null,i.root,-1,{});return new y3("",new Yc(o,[]))}(i,t),n=new ut([new Dy("",{})]),r=new ut({}),s=new ut({}),o=new ut({}),a=new ut(""),l=new bm(n,r,o,a,s,_n,t,e.root);return l.snapshot=e.root,new g3(new Yc(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(et(c=>c[Ay]))??ft(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(et(t=>mm(t)))),this._paramMap}get queryParamMap(){return this._queryParamMap||(this._queryParamMap=this.queryParams.pipe(et(t=>mm(t)))),this._queryParamMap}toString(){return this.snapshot?this.snapshot.toString():`Future(${this._futureSnapshot})`}}function v3(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 Gq(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 vM{get title(){return this.data?.[Ay]}constructor(t,e,n,r,s,o,a,l,c,d,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=d,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 y3 extends m3{constructor(t,e){super(e),this.url=t,fI(this,e)}toString(){return b3(this._root)}}function fI(i,t){t.value._routerState=i,t.children.forEach(e=>fI(i,e))}function b3(i){const t=i.children.length>0?` { ${i.children.map(b3).join(", ")} } `:"";return`${i.value}${t}`}function pI(i){if(i.snapshot){const t=i.snapshot,e=i._futureSnapshot;i.snapshot=e,Kl(t.queryParams,e.queryParams)||i.queryParams.next(e.queryParams),t.fragment!==e.fragment&&i.fragment.next(e.fragment),Kl(t.params,e.params)||i.params.next(e.params),function iq(i,t){if(i.length!==t.length)return!1;for(let e=0;eKl(e.parameters,t[n].parameters))}(i.url,t.url);return e&&!(!i.parent!=!t.parent)&&(!i.parent||mI(i.parent,t.parent))}function Oy(i,t,e){if(e&&i.shouldReuseRoute(t.value,e.value.snapshot)){const n=e.value;n._futureSnapshot=t.value;const r=function Wq(i,t,e){return t.children.map(n=>{for(const r of e.children)if(i.shouldReuseRoute(n.value,r.value.snapshot))return Oy(i,n,r);return Oy(i,n)})}(i,t,e);return new Yc(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=>Oy(i,a)),o}}const n=function jq(i){return new bm(new ut(i.url),new ut(i.params),new ut(i.queryParams),new ut(i.fragment),new ut(i.data),i.outlet,i.component,i)}(t.value),r=t.children.map(s=>Oy(i,s));return new Yc(n,r)}}const gI="ngNavigationCancelingError";function x3(i,t){const{redirectTo:e,navigationBehaviorOptions:n}=kh(t)?{redirectTo:t,navigationBehaviorOptions:void 0}:t,r=w3(!1,0,t);return r.url=e,r.navigationBehaviorOptions=n,r}function w3(i,t,e){const n=new Error("NavigationCancelingError: "+(i||""));return n[gI]=!0,n.cancellationCode=t,e&&(n.url=e),n}function M3(i){return C3(i)&&kh(i.url)}function C3(i){return i&&i[gI]}class Yq{constructor(){this.outlet=null,this.route=null,this.resolver=null,this.injector=null,this.children=new Fy,this.attachRef=null}}let Fy=(()=>{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 Yq,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=ke({token:i,factory:i.\u0275fac,providedIn:"root"}),i})();const yM=!1;let S3=(()=>{class i{constructor(){this.activated=null,this._activatedRoute=null,this.name=_n,this.activateEvents=new $e,this.deactivateEvents=new $e,this.attachEvents=new $e,this.detachEvents=new $e,this.parentContexts=Ft(Fy),this.location=Ft(jr),this.changeDetector=Ft(Zn),this.environmentInjector=Ft(io)}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 pe(4012,yM);return this.activated.instance}get activatedRoute(){if(!this.activated)throw new pe(4012,yM);return this._activatedRoute}get activatedRouteData(){return this._activatedRoute?this._activatedRoute.snapshot.data:{}}detach(){if(!this.activated)throw new pe(4012,yM);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 pe(4013,yM);this._activatedRoute=e;const r=this.location,o=e.snapshot.component,a=this.parentContexts.getOrCreateContext(this.name).children,l=new qq(e,a,r.injector);if(n&&function Xq(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=ve({type:i,selectors:[["router-outlet"]],inputs:{name:"name"},outputs:{activateEvents:"activate",deactivateEvents:"deactivate",attachEvents:"attach",detachEvents:"detach"},exportAs:["outlet"],standalone:!0,features:[xi]}),i})();class qq{constructor(t,e,n){this.route=t,this.childContexts=e,this.parent=n}get(t,e){return t===bm?this.route:t===Fy?this.childContexts:this.parent.get(t,e)}}let _I=(()=>{class i{}return i.\u0275fac=function(e){return new(e||i)},i.\u0275cmp=ot({type:i,selectors:[["ng-component"]],standalone:!0,features:[Z1],decls:1,vars:0,template:function(e,n){1&e&&Pe(0,"router-outlet")},dependencies:[S3],encapsulation:2}),i})();function E3(i,t){return i.providers&&!i._injector&&(i._injector=Fw(i.providers,t,`Route: ${i.path}`)),i._injector??t}function yI(i){const t=i.children&&i.children.map(yI),e=t?{...i,children:t}:{...i};return!e.component&&!e.loadComponent&&(t||e.loadChildren)&&e.outlet&&e.outlet!==_n&&(e.component=_I),e}function Ia(i){return i.outlet||_n}function A3(i,t){const e=i.filter(n=>Ia(n)===t);return e.push(...i.filter(n=>Ia(n)!==t)),e}function Ly(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 eX{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),pI(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]}),os(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 Lq(s.value.snapshot))}),t.children.length&&this.forwardEvent(new Oq(t.value.snapshot))}activateRoutes(t,e,n){const r=t.value,s=e?e.value:null;if(pI(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),pI(a.route.value),this.activateChildRoutes(t,null,o.children)}else{const a=Ly(r.snapshot),l=a?.get(Hl)??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 D3{constructor(t){this.path=t,this.route=this.path[this.path.length-1]}}class bM{constructor(t,e){this.component=t,this.route=e}}function tX(i,t,e){const n=i._root;return Ny(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 Sr(i){return null!==Gf(i)}(i)?t.get(i):i:n}function Ny(i,t,e,n,r={canDeactivateChecks:[],canActivateChecks:[]}){const s=ym(t);return i.children.forEach(o=>{(function iX(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 rX(i,t,e){if("function"==typeof e)return e(i,t);switch(e){case"pathParamsChange":return!Rh(i.url,t.url);case"pathParamsOrQueryParamsChange":return!Rh(i.url,t.url)||!Kl(i.queryParams,t.queryParams);case"always":return!0;case"paramsOrQueryParamsChange":return!mI(i,t)||!Kl(i.queryParams,t.queryParams);default:return!mI(i,t)}}(o,s,s.routeConfig.runGuardsAndResolvers);l?r.canActivateChecks.push(new D3(n)):(s.data=o.data,s._resolvedData=o._resolvedData),Ny(i,t,s.component?a?a.children:null:e,n,r),l&&a&&a.outlet&&a.outlet.isActivated&&r.canDeactivateChecks.push(new bM(a.outlet.component,o))}else o&&By(t,a,r),r.canActivateChecks.push(new D3(n)),Ny(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]}),os(s,(o,a)=>By(o,e.getContext(a),r)),r}function By(i,t,e){const n=ym(i),r=i.value;os(n,(s,o)=>{By(s,r.component?t?t.children.getContext(o):null:t,e)}),e.canDeactivateChecks.push(new bM(r.component&&t&&t.outlet&&t.outlet.isActivated?t.outlet.component:null,r))}function Uy(i){return"function"==typeof i}function bI(i){return i instanceof fm||"EmptyError"===i?.name}const xM=Symbol("INITIAL_VALUE");function wm(){return ks(i=>Xl(i.map(t=>t.pipe(Oi(1),Do(xM)))).pipe(et(t=>{for(const e of t)if(!0!==e){if(e===xM)return xM;if(!1===e||e instanceof au)return e}return!0}),gn(t=>t!==xM),Oi(1)))}function T3(i){return function CE(...i){return a0(i)}(Vi(t=>{if(kh(t))throw x3(0,t)}),et(t=>!0===t))}const xI={matched:!1,consumedSegments:[],remainingSegments:[],parameters:{},positionalParamSegments:{}};function I3(i,t,e,n,r){const s=wI(i,t,e);return s.matched?function xX(i,t,e,n){const r=t.canMatch;return r&&0!==r.length?ft(r.map(o=>{const a=xm(o,i);return ou(function dX(i){return i&&Uy(i.canMatch)}(a)?a.canMatch(t,e):i.runInContext(()=>a(t,e)))})).pipe(wm(),T3()):ft(!0)}(n=E3(t,n),t,e).pipe(et(o=>!0===o?s:{...xI})):ft(s)}function wI(i,t,e){if(""===t.path)return"full"===t.pathMatch&&(i.hasChildren()||e.length>0)?{...xI}:{matched:!0,consumedSegments:[],remainingSegments:e,parameters:{},positionalParamSegments:{}};const r=(t.matcher||nq)(e,i,t);if(!r)return{...xI};const s={};os(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 wM(i,t,e,n){if(e.length>0&&function CX(i,t,e){return e.some(n=>MM(i,t,n)&&Ia(n)!==_n)}(i,e,n)){const s=new Tn(t,function MX(i,t,e,n){const r={};r[_n]=n,n._sourceSegment=i,n._segmentIndexShift=t.length;for(const s of e)if(""===s.path&&Ia(s)!==_n){const o=new Tn([],{});o._sourceSegment=i,o._segmentIndexShift=t.length,r[Ia(s)]=o}return r}(i,t,n,new Tn(e,i.children)));return s._sourceSegment=i,s._segmentIndexShift=t.length,{segmentGroup:s,slicedSegments:[]}}if(0===e.length&&function SX(i,t,e){return e.some(n=>MM(i,t,n))}(i,e,n)){const s=new Tn(i.segments,function wX(i,t,e,n,r){const s={};for(const o of n)if(MM(i,e,o)&&!r[Ia(o)]){const a=new Tn([],{});a._sourceSegment=i,a._segmentIndexShift=t.length,s[Ia(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 Tn(i.segments,i.children);return r._sourceSegment=i,r._segmentIndexShift=t.length,{segmentGroup:r,slicedSegments:e}}function MM(i,t,e){return(!(i.hasChildren()||t.length>0)||"full"!==e.pathMatch)&&""===e.path}function R3(i,t,e,n){return!!(Ia(i)===n||n!==_n&&MM(t,e,i))&&("**"===i.path||wI(t,i,e).matched)}function k3(i,t,e){return 0===t.length&&!i.children[e]}const CM=!1;class SM{constructor(t){this.segmentGroup=t||null}}class P3{constructor(t){this.urlTree=t}}function Vy(i){return pm(new SM(i))}function O3(i){return pm(new P3(i))}class TX{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=wM(this.urlTree.root,[],[],this.config).segmentGroup,e=new Tn(t.segments,t.children);return this.expandSegmentGroup(this.injector,this.config,e,_n).pipe(et(s=>this.createUrlTree(mM(s),this.urlTree.queryParams,this.urlTree.fragment))).pipe(jc(s=>{if(s instanceof P3)return this.allowRedirects=!1,this.match(s.urlTree);throw s instanceof SM?this.noMatchError(s):s}))}match(t){return this.expandSegmentGroup(this.injector,this.config,t.root,_n).pipe(et(r=>this.createUrlTree(mM(r),t.queryParams,t.fragment))).pipe(jc(r=>{throw r instanceof SM?this.noMatchError(r):r}))}noMatchError(t){return new pe(4002,CM)}createUrlTree(t,e,n){const r=sI(t);return new au(r,e,n)}expandSegmentGroup(t,e,n,r){return 0===n.segments.length&&n.hasChildren()?this.expandChildren(t,e,n).pipe(et(s=>new Tn([],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 Ni(r).pipe(ru(s=>{const o=n.children[s],a=A3(e,s);return this.expandSegmentGroup(t,a,o,s).pipe(et(l=>({segment:l,outlet:s})))}),tI((s,o)=>(s[o.outlet]=o.segment,s),{}),WB())}expandSegment(t,e,n,r,s,o){return Ni(n).pipe(ru(a=>this.expandSegmentAgainstRoute(t,e,n,a,r,s,o).pipe(jc(c=>{if(c instanceof SM)return ft(null);throw c}))),iu(a=>!!a),jc((a,l)=>{if(bI(a))return k3(e,r,s)?ft(new Tn([],{})):Vy(e);throw a}))}expandSegmentAgainstRoute(t,e,n,r,s,o,a){return R3(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):Vy(e):Vy(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("/")?O3(s):this.lineralizeSegments(n,s).pipe(rr(o=>{const a=new Tn(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:d}=wI(e,r,s);if(!a)return Vy(e);const h=this.applyRedirectCommands(l,r.redirectTo,d);return r.redirectTo.startsWith("/")?O3(h):this.lineralizeSegments(r,h).pipe(rr(p=>this.expandSegment(t,e,n,p.concat(c),o,!1)))}matchSegmentAgainstRoute(t,e,n,r,s){return"**"===n.path?(t=E3(n,t),n.loadChildren?(n._loadedRoutes?ft({routes:n._loadedRoutes,injector:n._loadedInjector}):this.configLoader.loadChildren(t,n)).pipe(et(a=>(n._loadedRoutes=a.routes,n._loadedInjector=a.injector,new Tn(r,{})))):ft(new Tn(r,{}))):I3(e,n,r,t).pipe(ks(({matched:o,consumedSegments:a,remainingSegments:l})=>o?this.getChildConfig(t=n._injector??t,n,r).pipe(rr(d=>{const h=d.injector??t,p=d.routes,{segmentGroup:m,slicedSegments:g}=wM(e,a,l,p),b=new Tn(m.segments,m.children);if(0===g.length&&b.hasChildren())return this.expandChildren(h,p,b).pipe(et(x=>new Tn(a,x)));if(0===p.length&&0===g.length)return ft(new Tn(a,{}));const v=Ia(n)===s;return this.expandSegment(h,b,p,g,v?_n:s,!0).pipe(et(M=>new Tn(a.concat(M.segments),M.children)))})):Vy(e)))}getChildConfig(t,e,n){return e.children?ft({routes:e.children,injector:t}):e.loadChildren?void 0!==e._loadedRoutes?ft({routes:e._loadedRoutes,injector:e._loadedInjector}):function bX(i,t,e,n){const r=t.canLoad;return void 0===r||0===r.length?ft(!0):ft(r.map(o=>{const a=xm(o,i);return ou(function oX(i){return i&&Uy(i.canLoad)}(a)?a.canLoad(t,e):i.runInContext(()=>a(t,e)))})).pipe(wm(),T3())}(t,e,n).pipe(rr(r=>r?this.configLoader.loadChildren(t,e).pipe(Vi(s=>{e._loadedRoutes=s.routes,e._loadedInjector=s.injector})):function AX(i){return pm(w3(CM,3))}())):ft({routes:[],injector:t})}lineralizeSegments(t,e){let n=[],r=e.root;for(;;){if(n=n.concat(r.segments),0===r.numberOfChildren)return ft(n);if(r.numberOfChildren>1||!r.children[_n])return t.redirectTo,pm(new pe(4e3,CM));r=r.children[_n]}}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 au(s,this.createQueryParams(e.queryParams,this.urlTree.queryParams),e.fragment)}createQueryParams(t,e){const n={};return os(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 os(e.children,(a,l)=>{o[l]=this.createSegmentGroup(t,a,n,r)}),new Tn(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 pe(4001,CM);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 RX{}class OX{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=wM(this.urlTree.root,[],[],this.config.filter(e=>void 0===e.redirectTo)).segmentGroup;return this.processSegmentGroup(this.injector,this.config,t,_n).pipe(et(e=>{if(null===e)return null;const n=new vM([],Object.freeze({}),Object.freeze({...this.urlTree.queryParams}),this.urlTree.fragment,{},_n,this.rootComponentType,null,this.urlTree.root,-1,{}),r=new Yc(n,e),s=new y3(this.url,r);return this.inheritParamsAndData(s._root),s}))}inheritParamsAndData(t){const e=t.value,n=v3(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 Ni(Object.keys(n.children)).pipe(ru(r=>{const s=n.children[r],o=A3(e,r);return this.processSegmentGroup(t,o,s,r)}),tI((r,s)=>r&&s?(r.push(...s),r):null),jB(r=>null!==r),lM(null),WB(),et(r=>{if(null===r)return null;const s=L3(r);return function FX(i){i.sort((t,e)=>t.value.outlet===_n?-1:e.value.outlet===_n?1:t.value.outlet.localeCompare(e.value.outlet))}(s),s}))}processSegment(t,e,n,r,s){return Ni(e).pipe(ru(o=>this.processSegmentAgainstRoute(o._injector??t,o,n,r,s)),iu(o=>!!o),jc(o=>{if(bI(o))return k3(n,r,s)?ft([]):ft(null);throw o}))}processSegmentAgainstRoute(t,e,n,r,s){if(e.redirectTo||!R3(e,n,r,s))return ft(null);let o;if("**"===e.path){const a=r.length>0?KB(r).parameters:{},l=B3(n)+r.length;o=ft({snapshot:new vM(r,a,Object.freeze({...this.urlTree.queryParams}),this.urlTree.fragment,U3(e),Ia(e),e.component??e._loadedComponent??null,e,N3(n),l,V3(e)),consumedSegments:[],remainingSegments:[]})}else o=I3(n,e,r,t).pipe(et(({matched:a,consumedSegments:l,remainingSegments:c,parameters:d})=>{if(!a)return null;const h=B3(n)+l.length;return{snapshot:new vM(l,d,Object.freeze({...this.urlTree.queryParams}),this.urlTree.fragment,U3(e),Ia(e),e.component??e._loadedComponent??null,e,N3(n),h,V3(e)),consumedSegments:l,remainingSegments:c}}));return o.pipe(ks(a=>{if(null===a)return ft(null);const{snapshot:l,consumedSegments:c,remainingSegments:d}=a;t=e._injector??t;const h=e._loadedInjector??t,p=function LX(i){return i.children?i.children:i.loadChildren?i._loadedRoutes:[]}(e),{segmentGroup:m,slicedSegments:g}=wM(n,c,d,p.filter(v=>void 0===v.redirectTo));if(0===g.length&&m.hasChildren())return this.processChildren(h,p,m).pipe(et(v=>null===v?null:[new Yc(l,v)]));if(0===p.length&&0===g.length)return ft([new Yc(l,[])]);const b=Ia(e)===s;return this.processSegment(h,p,m,g,b?_n:s).pipe(et(v=>null===v?null:[new Yc(l,v)]))}))}}function NX(i){const t=i.value.routeConfig;return t&&""===t.path&&void 0===t.redirectTo}function L3(i){const t=[],e=new Set;for(const n of i){if(!NX(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=L3(n.children);t.push(new Yc(n.value,r))}return t.filter(n=>!e.has(n))}function N3(i){let t=i;for(;t._sourceSegment;)t=t._sourceSegment;return t}function B3(i){let t=i,e=t._segmentIndexShift??0;for(;t._sourceSegment;)t=t._sourceSegment,e+=t._segmentIndexShift??0;return e-1}function U3(i){return i.data||{}}function V3(i){return i.resolve||{}}function z3(i){return"string"==typeof i.title||null===i.title}function MI(i){return ks(t=>{const e=i(t);return e?Ni(e).pipe(et(()=>t)):ft(t)})}const Mm=new me("ROUTES");let CI=(()=>{class i{constructor(){this.componentLoaders=new WeakMap,this.childrenLoaders=new WeakMap,this.compiler=Ft(mN)}loadComponent(e){if(this.componentLoaders.get(e))return this.componentLoaders.get(e);if(e._loadedComponent)return ft(e._loadedComponent);this.onLoadStartListener&&this.onLoadStartListener(e);const n=ou(e.loadComponent()).pipe(et(G3),Vi(s=>{this.onLoadEndListener&&this.onLoadEndListener(e),e._loadedComponent=s}),su(()=>{this.componentLoaders.delete(e)})),r=new GB(n,()=>new Re).pipe(eI());return this.componentLoaders.set(e,r),r}loadChildren(e,n){if(this.childrenLoaders.get(n))return this.childrenLoaders.get(n);if(n._loadedRoutes)return ft({routes:n._loadedRoutes,injector:n._loadedInjector});this.onLoadStartListener&&this.onLoadStartListener(n);const s=this.loadModuleFactoryOrRoutes(n.loadChildren).pipe(et(a=>{this.onLoadEndListener&&this.onLoadEndListener(n);let l,c,d=!1;Array.isArray(a)?c=a:(l=a.create(e).injector,c=XB(l.get(Mm,[],Ot.Self|Ot.Optional)));return{routes:c.map(yI),injector:l}}),su(()=>{this.childrenLoaders.delete(n)})),o=new GB(s,()=>new Re).pipe(eI());return this.childrenLoaders.set(n,o),o}loadModuleFactoryOrRoutes(e){return ou(e()).pipe(et(G3),rr(n=>n instanceof D2||Array.isArray(n)?ft(n):Ni(this.compiler.compileModuleAsync(n))))}}return i.\u0275fac=function(e){return new(e||i)},i.\u0275prov=ke({token:i,factory:i.\u0275fac,providedIn:"root"}),i})();function G3(i){return function WX(i){return i&&"object"==typeof i&&"default"in i}(i)?i.default:i}let AM=(()=>{class i{get hasRequestedNavigation(){return 0!==this.navigationId}constructor(){this.currentNavigation=null,this.lastSuccessfulNavigation=null,this.events=new Re,this.configLoader=Ft(CI),this.environmentInjector=Ft(io),this.urlSerializer=Ft(Ty),this.rootContexts=Ft(Fy),this.navigationId=0,this.afterPreactivation=()=>ft(void 0),this.rootComponentType=null,this.configLoader.onLoadEndListener=r=>this.events.next(new kq(r)),this.configLoader.onLoadStartListener=r=>this.events.next(new Rq(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 ut({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:Py,restoredState:null,currentSnapshot:e.routerState.snapshot,targetSnapshot:null,currentRouterState:e.routerState,targetRouterState:null,guards:{canActivateChecks:[],canDeactivateChecks:[]},guardsResult:null}),this.transitions.pipe(gn(n=>0!==n.id),et(n=>({...n,extractedUrl:e.urlHandlingStrategy.extract(n.rawUrl)})),ks(n=>{let r=!1,s=!1;return ft(n).pipe(Vi(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}}),ks(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 d="";return this.events.next(new _M(o.id,e.serializeUrl(n.rawUrl),d,0)),e.rawUrlTree=o.rawUrl,o.resolve(null),mo}if(e.urlHandlingStrategy.shouldProcessUrl(o.rawUrl))return $3(o.source)&&(e.browserUrlTree=o.extractedUrl),ft(o).pipe(ks(d=>{const h=this.transitions?.getValue();return this.events.next(new cI(d.id,this.urlSerializer.serialize(d.extractedUrl),d.source,d.restoredState)),h!==this.transitions?.getValue()?mo:Promise.resolve(d)}),function IX(i,t,e,n){return ks(r=>function DX(i,t,e,n,r){return new TX(i,t,e,n,r).apply()}(i,t,e,r.extractedUrl,n).pipe(et(s=>({...r,urlAfterRedirects:s}))))}(this.environmentInjector,this.configLoader,this.urlSerializer,e.config),Vi(d=>{this.currentNavigation={...this.currentNavigation,finalUrl:d.urlAfterRedirects},n.urlAfterRedirects=d.urlAfterRedirects}),function UX(i,t,e,n,r){return rr(s=>function PX(i,t,e,n,r,s,o="emptyOnly"){return new OX(i,t,e,n,r,o,s).recognize().pipe(ks(a=>null===a?function kX(i){return new In(t=>t.error(i))}(new RX):ft(a)))}(i,t,e,s.urlAfterRedirects,n.serialize(s.urlAfterRedirects),n,r).pipe(et(o=>({...s,targetSnapshot:o}))))}(this.environmentInjector,this.rootComponentType,e.config,this.urlSerializer,e.paramsInheritanceStrategy),Vi(d=>{if(n.targetSnapshot=d.targetSnapshot,"eager"===e.urlUpdateStrategy){if(!d.extras.skipLocationChange){const p=e.urlHandlingStrategy.merge(d.urlAfterRedirects,d.rawUrl);e.setBrowserUrl(p,d)}e.browserUrlTree=d.urlAfterRedirects}const h=new Eq(d.id,this.urlSerializer.serialize(d.extractedUrl),this.urlSerializer.serialize(d.urlAfterRedirects),d.targetSnapshot);this.events.next(h)}));if(l&&e.urlHandlingStrategy.shouldProcessUrl(e.rawUrlTree)){const{id:d,extractedUrl:h,source:p,restoredState:m,extras:g}=o,b=new cI(d,this.urlSerializer.serialize(h),p,m);this.events.next(b);const v=_3(h,this.rootComponentType).snapshot;return ft(n={...o,targetSnapshot:v,urlAfterRedirects:h,extras:{...g,skipLocationChange:!1,replaceUrl:!1}})}{const d="";return this.events.next(new _M(o.id,e.serializeUrl(n.extractedUrl),d,1)),e.rawUrlTree=o.rawUrl,o.resolve(null),mo}}),Vi(o=>{const a=new Aq(o.id,this.urlSerializer.serialize(o.extractedUrl),this.urlSerializer.serialize(o.urlAfterRedirects),o.targetSnapshot);this.events.next(a)}),et(o=>n={...o,guards:tX(o.targetSnapshot,o.currentSnapshot,this.rootContexts)}),function hX(i,t){return rr(e=>{const{targetSnapshot:n,currentSnapshot:r,guards:{canActivateChecks:s,canDeactivateChecks:o}}=e;return 0===o.length&&0===s.length?ft({...e,guardsResult:!0}):function fX(i,t,e,n){return Ni(i).pipe(rr(r=>function yX(i,t,e,n,r){const s=t&&t.routeConfig?t.routeConfig.canDeactivate:null;return s&&0!==s.length?ft(s.map(a=>{const l=Ly(t)??r,c=xm(a,l);return ou(function cX(i){return i&&Uy(i.canDeactivate)}(c)?c.canDeactivate(i,t,e,n):l.runInContext(()=>c(i,t,e,n))).pipe(iu())})).pipe(wm()):ft(!0)}(r.component,r.route,e,t,n)),iu(r=>!0!==r,!0))}(o,n,r,i).pipe(rr(a=>a&&function sX(i){return"boolean"==typeof i}(a)?function pX(i,t,e,n){return Ni(t).pipe(ru(r=>Sy(function gX(i,t){return null!==i&&t&&t(new Pq(i)),ft(!0)}(r.route.parent,n),function mX(i,t){return null!==i&&t&&t(new Fq(i)),ft(!0)}(r.route,n),function vX(i,t,e){const n=t[t.length-1],s=t.slice(0,t.length-1).reverse().map(o=>function nX(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=>Ey(()=>ft(o.guards.map(l=>{const c=Ly(o.node)??e,d=xm(l,c);return ou(function lX(i){return i&&Uy(i.canActivateChild)}(d)?d.canActivateChild(n,i):c.runInContext(()=>d(n,i))).pipe(iu())})).pipe(wm())));return ft(s).pipe(wm())}(i,r.path,e),function _X(i,t,e){const n=t.routeConfig?t.routeConfig.canActivate:null;if(!n||0===n.length)return ft(!0);const r=n.map(s=>Ey(()=>{const o=Ly(t)??e,a=xm(s,o);return ou(function aX(i){return i&&Uy(i.canActivate)}(a)?a.canActivate(t,i):o.runInContext(()=>a(t,i))).pipe(iu())}));return ft(r).pipe(wm())}(i,r.route,e))),iu(r=>!0!==r,!0))}(n,s,i,t):ft(a)),et(a=>({...e,guardsResult:a})))})}(this.environmentInjector,o=>this.events.next(o)),Vi(o=>{if(n.guardsResult=o.guardsResult,kh(o.guardsResult))throw x3(0,o.guardsResult);const a=new Dq(o.id,this.urlSerializer.serialize(o.extractedUrl),this.urlSerializer.serialize(o.urlAfterRedirects),o.targetSnapshot,!!o.guardsResult);this.events.next(a)}),gn(o=>!!o.guardsResult||(e.restoreHistory(o),this.cancelNavigationTransition(o,"",3),!1)),MI(o=>{if(o.guards.canActivateChecks.length)return ft(o).pipe(Vi(a=>{const l=new Tq(a.id,this.urlSerializer.serialize(a.extractedUrl),this.urlSerializer.serialize(a.urlAfterRedirects),a.targetSnapshot);this.events.next(l)}),ks(a=>{let l=!1;return ft(a).pipe(function VX(i,t){return rr(e=>{const{targetSnapshot:n,guards:{canActivateChecks:r}}=e;if(!r.length)return ft(e);let s=0;return Ni(r).pipe(ru(o=>function zX(i,t,e,n){const r=i.routeConfig,s=i._resolve;return void 0!==r?.title&&!z3(r)&&(s[Ay]=r.title),function HX(i,t,e,n){const r=function GX(i){return[...Object.keys(i),...Object.getOwnPropertySymbols(i)]}(i);if(0===r.length)return ft({});const s={};return Ni(r).pipe(rr(o=>function $X(i,t,e,n){const r=Ly(t)??n,s=xm(i,r);return ou(s.resolve?s.resolve(t,e):r.runInContext(()=>s(t,e)))}(i[o],t,e,n).pipe(iu(),Vi(a=>{s[o]=a}))),nI(1),YB(s),jc(o=>bI(o)?mo:pm(o)))}(s,i,t,n).pipe(et(o=>(i._resolvedData=o,i.data=v3(i,e).resolve,r&&z3(r)&&(i.data[Ay]=r.title),null)))}(o.route,n,i,t)),Vi(()=>s++),nI(1),rr(o=>s===r.length?ft(e):mo))})}(e.paramsInheritanceStrategy,this.environmentInjector),Vi({next:()=>l=!0,complete:()=>{l||(e.restoreHistory(a),this.cancelNavigationTransition(a,"",2))}}))}),Vi(a=>{const l=new Iq(a.id,this.urlSerializer.serialize(a.extractedUrl),this.urlSerializer.serialize(a.urlAfterRedirects),a.targetSnapshot);this.events.next(l)}))}),MI(o=>{const a=l=>{const c=[];l.routeConfig?.loadComponent&&!l.routeConfig._loadedComponent&&c.push(this.configLoader.loadComponent(l.routeConfig).pipe(Vi(d=>{l.component=d}),et(()=>{})));for(const d of l.children)c.push(...a(d));return c};return Xl(a(o.targetSnapshot.root)).pipe(lM(),Oi(1))}),MI(()=>this.afterPreactivation()),et(o=>{const a=function $q(i,t,e){const n=Oy(i,t._root,e?e._root:void 0);return new g3(n,t)}(e.routeReuseStrategy,o.targetSnapshot,o.currentRouterState);return n={...o,targetRouterState:a}}),Vi(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)=>et(n=>(new eX(t,n.targetRouterState,n.currentRouterState,e).activate(i),n)))(this.rootContexts,e.routeReuseStrategy,o=>this.events.next(o)),Oi(1),Vi({next:o=>{r=!0,this.lastSuccessfulNavigation=this.currentNavigation,e.navigated=!0,this.events.next(new Ph(o.id,this.urlSerializer.serialize(o.extractedUrl),this.urlSerializer.serialize(e.currentUrlTree))),e.titleStrategy?.updateTitle(o.targetRouterState.snapshot),o.resolve(!0)},complete:()=>{r=!0}}),su(()=>{r||s||this.cancelNavigationTransition(n,"",1),this.currentNavigation?.id===n.id&&(this.currentNavigation=null)}),jc(o=>{if(s=!0,C3(o)){M3(o)||(e.navigated=!0,e.restoreHistory(n,!0));const a=new gM(n.id,this.urlSerializer.serialize(n.extractedUrl),o.message,o.cancellationCode);if(this.events.next(a),M3(o)){const l=e.urlHandlingStrategy.merge(o.url,e.rawUrlTree),c={skipLocationChange:n.extras.skipLocationChange,replaceUrl:"eager"===e.urlUpdateStrategy||$3(n.source)};e.scheduleNavigation(l,Py,null,c,{resolve:n.resolve,reject:n.reject,promise:n.promise})}else n.resolve(!1)}else{e.restoreHistory(n,!0);const a=new dI(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 mo}))}))}cancelNavigationTransition(e,n,r){const s=new gM(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=ke({token:i,factory:i.\u0275fac,providedIn:"root"}),i})();function $3(i){return i!==Py}let W3=(()=>{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===_n);return n}getResolvedTitleForRoute(e){return e.data[Ay]}}return i.\u0275fac=function(e){return new(e||i)},i.\u0275prov=ke({token:i,factory:function(){return Ft(jX)},providedIn:"root"}),i})(),jX=(()=>{class i extends W3{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)(ee(LB))},i.\u0275prov=ke({token:i,factory:i.\u0275fac,providedIn:"root"}),i})(),YX=(()=>{class i{}return i.\u0275fac=function(e){return new(e||i)},i.\u0275prov=ke({token:i,factory:function(){return Ft(XX)},providedIn:"root"}),i})();class qX{shouldDetach(t){return!1}store(t,e){}shouldAttach(t){return!1}retrieve(t){return null}shouldReuseRoute(t,e){return t.routeConfig===e.routeConfig}}let XX=(()=>{class i extends qX{}return i.\u0275fac=function(){let t;return function(n){return(t||(t=ri(i)))(n||i)}}(),i.\u0275prov=ke({token:i,factory:i.\u0275fac,providedIn:"root"}),i})();const DM=new me("",{providedIn:"root",factory:()=>({})});let ZX=(()=>{class i{}return i.\u0275fac=function(e){return new(e||i)},i.\u0275prov=ke({token:i,factory:function(){return Ft(QX)},providedIn:"root"}),i})(),QX=(()=>{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=ke({token:i,factory:i.\u0275fac,providedIn:"root"}),i})();function JX(i){throw i}function eK(i,t,e){return t.parse("/")}const tK={paths:"exact",fragment:"ignored",matrixParams:"ignored",queryParams:"exact"},nK={paths:"subset",fragment:"ignored",matrixParams:"ignored",queryParams:"subset"};let Xo=(()=>{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=Ft(L6),this.isNgZoneEnabled=!1,this.options=Ft(DM,{optional:!0})||{},this.errorHandler=this.options.errorHandler||JX,this.malformedUriErrorHandler=this.options.malformedUriErrorHandler||eK,this.navigated=!1,this.lastSuccessfulId=-1,this.urlHandlingStrategy=Ft(ZX),this.routeReuseStrategy=Ft(YX),this.urlCreationStrategy=Ft(zq),this.titleStrategy=Ft(W3),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=XB(Ft(Mm,{optional:!0})??[]),this.navigationTransitions=Ft(AM),this.urlSerializer=Ft(Ty),this.location=Ft(_y),this.isNgZoneEnabled=Ft(pt)instanceof pt&&pt.isInAngularZone(),this.resetConfig(this.config),this.currentUrlTree=new au,this.rawUrlTree=this.currentUrlTree,this.browserUrlTree=this.currentUrlTree,this.routerState=_3(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),Py,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(yI),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 d=null;switch(a){case"merge":d={...this.currentUrlTree.queryParams,...s};break;case"preserve":d=this.currentUrlTree.queryParams;break;default:d=s||null}return null!==d&&(d=this.removeEmptyProps(d)),this.urlCreationStrategy.createUrlTree(r,this.routerState,this.currentUrlTree,e,d,c??null)}navigateByUrl(e,n={skipLocationChange:!1}){const r=kh(e)?e:this.parseUrl(e),s=this.urlHandlingStrategy.merge(r,this.rawUrlTree);return this.scheduleNavigation(s,Py,null,n)}navigate(e,n={skipLocationChange:!1}){return function iK(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,d;return o?(a=o.resolve,l=o.reject,c=o.promise):c=new Promise((h,p)=>{a=h,l=p}),d="computed"===this.canceledNavigationResolution?r&&r.\u0275routerPageId?r.\u0275routerPageId:(this.browserPageId??0)+1:0,this.navigationTransitions.handleNavigationRequest({targetPageId:d,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=ke({token:i,factory:i.\u0275fac,providedIn:"root"}),i})();class j3{}let oK=(()=>{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(gn(e=>e instanceof Ph),ru(()=>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=Fw(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 Ni(r).pipe(bd())}preloadConfig(e,n){return this.preloadingStrategy.preload(n,()=>{let r;r=n.loadChildren&&void 0===n.canLoad?this.loader.loadChildren(e,n):ft(null);const s=r.pipe(rr(o=>null===o?ft(void 0):(n._loadedRoutes=o.routes,n._loadedInjector=o.injector,this.processRoutes(o.injector??e,o.routes))));return n.loadComponent&&!n._loadedComponent?Ni([s,this.loader.loadComponent(n)]).pipe(bd()):s})}}return i.\u0275fac=function(e){return new(e||i)(ee(Xo),ee(mN),ee(io),ee(j3),ee(CI))},i.\u0275prov=ke({token:i,factory:i.\u0275fac,providedIn:"root"}),i})();const AI=new me("");let Y3=(()=>{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 cI?(this.store[this.lastId]=this.viewportScroller.getScrollPosition(),this.lastSource=e.navigationTrigger,this.restoredId=e.restoredState?e.restoredState.navigationId:0):e instanceof Ph&&(this.lastId=e.id,this.scheduleScrollEvent(e,this.urlSerializer.parse(e.urlAfterRedirects).fragment))})}consumeScrollEvents(){return this.transitions.events.subscribe(e=>{e instanceof p3&&(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 p3(e,"popstate"===this.lastSource?this.store[this.restoredId]:null,n))})},0)})}ngOnDestroy(){this.routerEventsSubscription?.unsubscribe(),this.scrollEventsSubscription?.unsubscribe()}}return i.\u0275fac=function(e){wo()},i.\u0275prov=ke({token:i,factory:i.\u0275fac}),i})();var Ko=(()=>((Ko=Ko||{})[Ko.COMPLETE=0]="COMPLETE",Ko[Ko.FAILED=1]="FAILED",Ko[Ko.REDIRECTING=2]="REDIRECTING",Ko))();const Cm=!1;function lu(i,t){return{\u0275kind:i,\u0275providers:t}}const DI=new me("",{providedIn:"root",factory:()=>!1});function X3(){const i=Ft($i);return t=>{const e=i.get(dm);if(t!==e.components[0])return;const n=i.get(Xo),r=i.get(K3);1===i.get(TI)&&n.initialNavigation(),i.get(Z3,null,Ot.Optional)?.setUpPreloading(),i.get(AI,null,Ot.Optional)?.init(),n.resetRootComponentType(e.componentTypes[0]),r.closed||(r.next(),r.complete(),r.unsubscribe())}}const K3=new me(Cm?"bootstrap done indicator":"",{factory:()=>new Re}),TI=new me(Cm?"initial navigation":"",{providedIn:"root",factory:()=>1});function uK(){let i=[];return i=Cm?[{provide:Np,multi:!0,useFactory:()=>{const t=Ft(Xo);return()=>t.events.subscribe(e=>{console.group?.(`Router Event: ${e.constructor.name}`),console.log(function Nq(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?.()})}}]:[],lu(1,i)}const Z3=new me(Cm?"router preloader":"");function hK(i){return lu(0,[{provide:Z3,useExisting:oK},{provide:j3,useExisting:i}])}const zy=!1,Q3=new me(zy?"router duplicate forRoot guard":"ROUTER_FORROOT_GUARD"),fK=[_y,{provide:Ty,useClass:iI},Xo,Fy,{provide:bm,useFactory:function q3(i){return i.routerState.root},deps:[Xo]},CI,zy?{provide:DI,useValue:!0}:[]];function pK(){return new MN("Router",Xo)}let J3=(()=>{class i{constructor(e){}static forRoot(e,n){return{ngModule:i,providers:[fK,zy&&n?.enableTracing?uK().\u0275providers:[],{provide:Mm,multi:!0,useValue:e},{provide:Q3,useFactory:vK,deps:[[Xo,new Ss,new Ma]]},{provide:DM,useValue:n||{}},n?.useHash?{provide:Ih,useClass:C9}:{provide:Ih,useClass:jN},{provide:AI,useFactory:()=>{const i=Ft(UY),t=Ft(pt),e=Ft(DM),n=Ft(AM),r=Ft(Ty);return e.scrollOffset&&i.setOffset(e.scrollOffset),new Y3(r,n,i,t,e)}},n?.preloadingStrategy?hK(n.preloadingStrategy).\u0275providers:[],{provide:MN,multi:!0,useFactory:pK},n?.initialNavigation?yK(n):[],[{provide:eU,useFactory:X3},{provide:wN,multi:!0,useExisting:eU}]]}}static forChild(e){return{ngModule:i,providers:[{provide:Mm,multi:!0,useValue:e}]}}}return i.\u0275fac=function(e){return new(e||i)(ee(Q3,8))},i.\u0275mod=nn({type:i}),i.\u0275inj=Kt({imports:[_I]}),i})();function vK(i){if(zy&&i)throw new pe(4007,"The Router was provided more than once. This can happen if 'forRoot' is used outside of the root injector. Lazy loaded modules should use RouterModule.forChild() instead.");return"guarded"}function yK(i){return["disabled"===i.initialNavigation?lu(3,[{provide:Uw,multi:!0,useFactory:()=>{const t=Ft(Xo);return()=>{t.setUpLocationChangeListener()}}},{provide:TI,useValue:2}]).\u0275providers:[],"enabledBlocking"===i.initialNavigation?lu(2,[{provide:TI,useValue:0},{provide:Uw,multi:!0,deps:[$i],useFactory:t=>{const e=t.get(w9,Promise.resolve());return()=>e.then(()=>new Promise(n=>{const r=t.get(Xo),s=t.get(K3);(function aK(i,t){i.events.pipe(gn(e=>e instanceof Ph||e instanceof gM||e instanceof dI||e instanceof _M),et(e=>e instanceof Ph||e instanceof _M?Ko.COMPLETE:e instanceof gM&&(0===e.code||1===e.code)?Ko.REDIRECTING:Ko.FAILED),gn(e=>e!==Ko.REDIRECTING),Oi(1)).subscribe(()=>{t()})})(r,()=>{n(!0)}),t.get(AM).afterPreactivation=()=>(n(!0),s.closed?ft(void 0):s),r.initialNavigation()}))}}]).\u0275providers:[]]}const eU=new me(zy?"Router Initializer":""),xK=[];let wK=(()=>{class i{}return i.\u0275fac=function(e){return new(e||i)},i.\u0275mod=nn({type:i}),i.\u0275inj=Kt({imports:[J3.forRoot(xK),J3]}),i})();function tU(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 tt(i){return function(){var t=this,e=arguments;return new Promise(function(n,r){var s=i.apply(t,e);function o(l){tU(s,n,r,o,a,"next",l)}function a(l){tU(s,n,r,o,a,"throw",l)}o(void 0)})}}function Jt(i){return null!=i&&"false"!=`${i}`}function Ps(i,t=0){return function MK(i){return!isNaN(parseFloat(i))&&!isNaN(Number(i))}(i)?Number(i):t}function TM(i){return Array.isArray(i)?i:[i]}function _r(i){return null==i?"":"string"==typeof i?i:`${i}px`}function qc(i){return i instanceof gt?i.nativeElement:i}const CK=["addListener","removeListener"],SK=["addEventListener","removeEventListener"],EK=["on","off"];function To(i,t,e,n){if(cn(e)&&(n=e,e=void 0),n)return To(i,t,e).pipe(JT(n));const[r,s]=function TK(i){return cn(i.addEventListener)&&cn(i.removeEventListener)}(i)?SK.map(o=>a=>i[o](t,a,e)):function AK(i){return cn(i.addListener)&&cn(i.removeListener)}(i)?CK.map(nU(i,t)):function DK(i){return cn(i.on)&&cn(i.off)}(i)?EK.map(nU(i,t)):[];if(!r&&i_(i))return rr(o=>To(o,t,e))(Mr(i));if(!r)throw new TypeError("Invalid event target");return new In(o=>{const a=(...l)=>o.next(1s(a)})}function nU(i,t){return e=>n=>i[e](t,n)}class IK extends Zt{constructor(t,e){super()}schedule(t,e=0){return this}}const IM={setInterval(i,t,...e){const{delegate:n}=IM;return n?.setInterval?n.setInterval(i,t,...e):setInterval(i,t,...e)},clearInterval(i){const{delegate:t}=IM;return(t?.clearInterval||clearInterval)(i)},delegate:void 0};class II extends IK{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 IM.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&&IM.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,Kr(n,this),null!=t&&(this.id=this.recycleAsyncId(e,t,null)),this.delay=null,super.unsubscribe()}}}const Hy={schedule(i){let t=requestAnimationFrame,e=cancelAnimationFrame;const{delegate:n}=Hy;n&&(t=n.requestAnimationFrame,e=n.cancelAnimationFrame);const r=t(s=>{e=void 0,i(s)});return new Zt(()=>e?.(r))},requestAnimationFrame(...i){const{delegate:t}=Hy;return(t?.requestAnimationFrame||requestAnimationFrame)(...i)},cancelAnimationFrame(...i){const{delegate:t}=Hy;return(t?.cancelAnimationFrame||cancelAnimationFrame)(...i)},delegate:void 0},iU={now:()=>(iU.delegate||Date).now(),delegate:void 0};class Gy{constructor(t,e=Gy.now){this.schedulerActionCtor=t,this.now=e}schedule(t,e=0,n){return new this.schedulerActionCtor(this,t).schedule(n,e)}}Gy.now=iU.now;class RI extends Gy{constructor(t,e=Gy.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 PK=new class kK extends RI{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 RK extends II{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=Hy.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&&(Hy.cancelAnimationFrame(e),t._scheduled=void 0)}});let kI,OK=1;const RM={};function rU(i){return i in RM&&(delete RM[i],!0)}const FK={setImmediate(i){const t=OK++;return RM[t]=!0,kI||(kI=Promise.resolve()),kI.then(()=>rU(t)&&i()),t},clearImmediate(i){rU(i)}},{setImmediate:LK,clearImmediate:NK}=FK,kM={setImmediate(...i){const{delegate:t}=kM;return(t?.setImmediate||LK)(...i)},clearImmediate(i){const{delegate:t}=kM;return(t?.clearImmediate||NK)(i)},delegate:void 0},PI=new class UK extends RI{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 BK extends II{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=kM.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&&(kM.clearImmediate(e),t._scheduled===e&&(t._scheduled=void 0))}}),$y=new RI(II),VK=$y;function OI(i=0,t,e=VK){let n=-1;return null!=t&&(Gu(t)?e=t:n=t),new In(r=>{let s=function HK(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 PM(i,t=$y){return function zK(i){return ti((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(Yn(e,c=>{n=!0,r=c,s||Mr(i(c)).subscribe(s=Yn(e,a,l))},()=>{o=!0,(!n||!s||s.closed)&&e.complete()}))})}(()=>OI(i,t))}function Ve(i){return ti((t,e)=>{Mr(i).subscribe(Yn(e,()=>e.complete(),ms)),!e.closed&&t.subscribe(e)})}let FI;try{FI=typeof Intl<"u"&&Intl.v8BreakIterator}catch{FI=!1}let Sm,zi=(()=>{class i{constructor(e){this._platformId=e,this.isBrowser=this._platformId?function BY(i){return i===hB}(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&&!FI)&&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)(ee(fT))},i.\u0275prov=ke({token:i,factory:i.\u0275fac,providedIn:"root"}),i})();const sU=["color","button","checkbox","date","datetime-local","email","file","hidden","image","month","number","password","radio","range","reset","search","submit","tel","text","time","url","week"];function oU(){if(Sm)return Sm;if("object"!=typeof document||!document)return Sm=new Set(sU),Sm;let i=document.createElement("input");return Sm=new Set(sU.filter(t=>(i.setAttribute("type",t),i.type===t))),Sm}let Wy,OM,Fh,LI;function Oh(i){return function GK(){if(null==Wy&&typeof window<"u")try{window.addEventListener("test",null,Object.defineProperty({},"passive",{get:()=>Wy=!0}))}finally{Wy=Wy||!1}return Wy}()?i:!!i.capture}function aU(){if(null==Fh){if("object"!=typeof document||!document||"function"!=typeof Element||!Element)return Fh=!1,Fh;if("scrollBehavior"in document.documentElement.style)Fh=!0;else{const i=Element.prototype.scrollTo;Fh=!!i&&!/\{\s*\[native code\]\s*\}/.test(i.toString())}}return Fh}function jy(){if("object"!=typeof document||!document)return 0;if(null==OM){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),OM=0,0===i.scrollLeft&&(i.scrollLeft=1,OM=0===i.scrollLeft?1:2),i.remove()}return OM}function FM(){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 cu(i){return i.composedPath?i.composedPath()[0]:i.target}function NI(){return typeof __karma__<"u"&&!!__karma__||typeof jasmine<"u"&&!!jasmine||typeof jest<"u"&&!!jest||typeof Mocha<"u"&&!!Mocha}const jK=new me("cdk-dir-doc",{providedIn:"root",factory:function YK(){return Ft(jt)}}),qK=/^(ar|ckb|dv|he|iw|fa|nqo|ps|sd|ug|ur|yi|.*[-_](Adlm|Arab|Hebr|Nkoo|Rohg|Thaa))(?!.*[-_](Latn|Cyrl)($|-|_))($|-|_)/i;let Ra=(()=>{class i{constructor(e){this.value="ltr",this.change=new $e,e&&(this.value=function XK(i){const t=i?.toLowerCase()||"";return"auto"===t&&typeof navigator<"u"&&navigator?.language?qK.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)(ee(jK,8))},i.\u0275prov=ke({token:i,factory:i.\u0275fac,providedIn:"root"}),i})(),Yy=(()=>{class i{}return i.\u0275fac=function(e){return new(e||i)},i.\u0275mod=nn({type:i}),i.\u0275inj=Kt({}),i})();const KK=["contentWrapper"],ZK=["*"],QK=new me("VIRTUAL_SCROLL_STRATEGY");let qy=(()=>{class i{constructor(e,n,r){this._ngZone=e,this._platform=n,this._scrolled=new Re,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 In(n=>{this._globalSubscription||this._addGlobalListener();const r=e>0?this._scrolled.pipe(PM(e)).subscribe(n):this._scrolled.subscribe(n);return this._scrolledCount++,()=>{r.unsubscribe(),this._scrolledCount--,this._scrolledCount||this._removeGlobalListener()}}):ft()}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(gn(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=qc(n),s=e.getElementRef().nativeElement;do{if(r==s)return!0}while(r=r.parentElement);return!1}_addGlobalListener(){this._globalSubscription=this._ngZone.runOutsideAngular(()=>To(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)(ee(pt),ee(zi),ee(jt,8))},i.\u0275prov=ke({token:i,factory:i.\u0275fac,providedIn:"root"}),i})(),lU=(()=>{class i{constructor(e,n,r,s){this.elementRef=e,this.scrollDispatcher=n,this.ngZone=r,this.dir=s,this._destroyed=new Re,this._elementScrolled=new In(o=>this.ngZone.runOutsideAngular(()=>To(this.elementRef.nativeElement,"scroll").pipe(Ve(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!=jy()?(null!=e.left&&(e.right=n.scrollWidth-n.clientWidth-e.left),2==jy()?e.left=e.right:1==jy()&&(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;aU()?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==jy()?e==n?s.scrollWidth-s.clientWidth-s.scrollLeft:s.scrollLeft:o&&1==jy()?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)(E(gt),E(qy),E(pt),E(Ra,8))},i.\u0275dir=ve({type:i,selectors:[["","cdk-scrollable",""],["","cdkScrollable",""]],standalone:!0}),i})(),LM=(()=>{class i{constructor(e,n,r){this._platform=e,this._change=new Re,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(PM(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)(ee(zi),ee(pt),ee(jt,8))},i.\u0275prov=ke({token:i,factory:i.\u0275fac,providedIn:"root"}),i})();const cU=new me("VIRTUAL_SCROLLABLE");let tZ=(()=>{class i extends lU{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)(E(gt),E(qy),E(pt),E(Ra,8))},i.\u0275dir=ve({type:i,features:[lt]}),i})();const iZ=typeof requestAnimationFrame<"u"?PK:PI;let rZ=(()=>{class i extends tZ{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=Ft(zi),this._detachedSubject=new Re,this._renderedRangeSubject=new Re,this._orientation="vertical",this._appendOnly=!1,this.scrolledIndexChange=new In(d=>this._scrollStrategy.scrolledIndexChange.subscribe(h=>Promise.resolve().then(()=>this.ngZone.run(()=>d.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=Zt.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(Do(null),PM(0,iZ)).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(Ve(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 nZ(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)(E(gt),E(Zn),E(pt),E(QK,8),E(Ra,8),E(qy),E(LM),E(cU,8))},i.\u0275cmp=ot({type:i,selectors:[["cdk-virtual-scroll-viewport"]],viewQuery:function(e,n){if(1&e&&Wn(KK,7),2&e){let r;Et(r=At())&&(n._contentWrapper=r.first)}},hostAttrs:[1,"cdk-virtual-scroll-viewport"],hostVars:4,hostBindings:function(e,n){2&e&&un("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:[Dn([{provide:lU,useFactory:(t,e)=>t||e,deps:[[new Ss,new yo(cU)],i]}]),lt,Z1],ngContentSelectors:ZK,decls:4,vars:4,consts:[[1,"cdk-virtual-scroll-content-wrapper"],["contentWrapper",""],[1,"cdk-virtual-scroll-spacer"]],template:function(e,n){1&e&&(or(),W(0,"div",0,1),Wt(2),j(),Pe(3,"div",2)),2&e&&(G(3),qo("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})(),Xy=(()=>{class i{}return i.\u0275fac=function(e){return new(e||i)},i.\u0275mod=nn({type:i}),i.\u0275inj=Kt({}),i})(),dU=(()=>{class i{}return i.\u0275fac=function(e){return new(e||i)},i.\u0275mod=nn({type:i}),i.\u0275inj=Kt({imports:[Yy,Xy,rZ,Yy,Xy]}),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 Lh 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 sZ extends BI{constructor(t){super(),this.element=t instanceof gt?t.nativeElement:t}}class NM{constructor(){this._isDisposed=!1,this.attachDomPortal=null}hasAttached(){return!!this._attachedPortal}attach(t){return t instanceof Lh?(this._attachedPortal=t,this.attachComponentPortal(t)):t instanceof Em?(this._attachedPortal=t,this.attachTemplatePortal(t)):this.attachDomPortal&&t instanceof sZ?(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 oZ extends NM{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||$i.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 NM{constructor(e,n,r){super(),this._componentFactoryResolver=e,this._viewContainerRef=n,this._isInitialized=!1,this.attached=new $e,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)(E(Hl),E(jr),E(jt))},i.\u0275dir=ve({type:i,selectors:[["","cdkPortalOutlet",""]],inputs:{portal:["cdkPortalOutlet","portal"]},outputs:{attached:"attached"},exportAs:["cdkPortalOutlet"],features:[lt]}),i})(),Nh=(()=>{class i{}return i.\u0275fac=function(e){return new(e||i)},i.\u0275mod=nn({type:i}),i.\u0275inj=Kt({}),i})();function Zo(i,...t){return t.length?t.some(e=>i[e]):i.altKey||i.shiftKey||i.ctrlKey||i.metaKey}const uU=aU();class bZ{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=_r(-this._previousScrollPosition.left),t.style.top=_r(-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"),uU&&(n.scrollBehavior=r.scrollBehavior="auto"),window.scroll(this._previousScrollPosition.left,this._previousScrollPosition.top),uU&&(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 xZ{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(gn(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 hU{enable(){}disable(){}attach(){}}function VI(i,t){return t.some(e=>i.bottome.bottom||i.righte.right)}function fU(i,t){return t.some(e=>i.tope.bottom||i.lefte.right)}class wZ{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();VI(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 MZ=(()=>{class i{constructor(e,n,r,s){this._scrollDispatcher=e,this._viewportRuler=n,this._ngZone=r,this.noop=()=>new hU,this.close=o=>new xZ(this._scrollDispatcher,this._ngZone,this._viewportRuler,o),this.block=()=>new bZ(this._viewportRuler,this._document),this.reposition=o=>new wZ(this._scrollDispatcher,this._viewportRuler,this._ngZone,o),this._document=s}}return i.\u0275fac=function(e){return new(e||i)(ee(qy),ee(LM),ee(pt),ee(jt))},i.\u0275prov=ke({token:i,factory:i.\u0275fac,providedIn:"root"}),i})();class km{constructor(t){if(this.scrollStrategy=new hU,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 CZ{constructor(t,e){this.connectionPair=t,this.scrollableViewProperties=e}}let pU=(()=>{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)(ee(jt))},i.\u0275prov=ke({token:i,factory:i.\u0275fac,providedIn:"root"}),i})(),SZ=(()=>{class i extends pU{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)(ee(jt),ee(pt,8))},i.\u0275prov=ke({token:i,factory:i.\u0275fac,providedIn:"root"}),i})(),EZ=(()=>{class i extends pU{constructor(e,n,r){super(e),this._platform=n,this._ngZone=r,this._cursorStyleIsSet=!1,this._pointerDownListener=s=>{this._pointerDownEventTarget=cu(s)},this._clickListener=s=>{const o=cu(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 d=l[c];if(d._outsidePointerEvents.observers.length<1||!d.hasAttached())continue;if(d.overlayElement.contains(o)||d.overlayElement.contains(a))break;const h=d._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)(ee(jt),ee(zi),ee(pt,8))},i.\u0275prov=ke({token:i,factory:i.\u0275fac,providedIn:"root"}),i})(),VM=(()=>{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||NI()){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 Re,this._outsidePointerEvents=new Re,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(Oi(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=_r(this._config.width),t.height=_r(this._config.height),t.minWidth=_r(this._config.minWidth),t.minHeight=_r(this._config.minHeight),t.maxWidth=_r(this._config.maxWidth),t.maxHeight=_r(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=TM(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(Ve(Cr(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 mU="cdk-overlay-connected-position-bounding-box",AZ=/([A-Za-z%]+)$/;class DZ{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 Re,this._resizeSubscription=Zt.EMPTY,this._offsetX=0,this._offsetY=0,this._appliedPanelClasses=[],this.positionChanges=this._positionChanges,this.setOrigin(t)}attach(t){this._validatePositions(),t.hostElement.classList.add(mU),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),d=this._getOverlayFit(c,e,n,a);if(d.isCompletelyWithinViewport)return this._isPushed=!1,void this._applyPosition(a,l);this._canFitWithFlexibleDimensions(d,c,n)?s.push({position:a,origin:l,overlayRect:e,boundingBoxRect:this._calculateBoundingBoxRect(l,a)}):(!o||o.overlayFit.visibleAreal&&(l=d,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&&Bh(this._boundingBox.style,{top:"",left:"",right:"",bottom:"",height:"",width:"",alignItems:"",justifyContent:""}),this._pane&&this._resetOverlayElementStyles(),this._overlayRef&&this._overlayRef.hostElement.classList.remove(mU),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=_U(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=gU(this._overlayRef.getConfig().minHeight),a=gU(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=_U(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 d=0,h=0;return d=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,d=t.x-this._viewportMargin;else if("start"===e.overlayX&&!r||"end"===e.overlayX&&r)h=t.x,d=n.right-t.x;else{const m=Math.min(n.right-t.x+n.left,t.x),g=this._lastBoundingBoxSize.width;d=2*m,h=t.x-m,d>g&&!this._isInitialRender&&!this._growAfterOpen&&(h=t.x-g/2)}return{top:o,left:h,bottom:a,right:p,width:d,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=_r(n.height),r.top=_r(n.top),r.bottom=_r(n.bottom),r.width=_r(n.width),r.left=_r(n.left),r.right=_r(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=_r(s)),o&&(r.maxWidth=_r(o))}this._lastBoundingBoxSize=n,Bh(this._boundingBox.style,r)}_resetBoundingBoxStyles(){Bh(this._boundingBox.style,{top:"0",left:"0",right:"0",bottom:"0",height:"",width:"",alignItems:"",justifyContent:""})}_resetOverlayElementStyles(){Bh(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 d=this._viewportRuler.getViewportScrollPosition();Bh(n,this._getExactOverlayY(e,t,d)),Bh(n,this._getExactOverlayX(e,t,d))}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=_r(o.maxHeight):s&&(n.maxHeight="")),o.maxWidth&&(r?n.maxWidth=_r(o.maxWidth):s&&(n.maxWidth="")),Bh(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=_r(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=_r(s.x),r}_getScrollVisibility(){const t=this._getOriginRect(),e=this._pane.getBoundingClientRect(),n=this._scrollables.map(r=>r.getElementRef().nativeElement.getBoundingClientRect());return{isOriginClipped:fU(t,n),isOriginOutsideView:VI(t,n),isOverlayClipped:fU(e,n),isOverlayOutsideView:VI(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&&TM(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 gt)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 Bh(i,t){for(let e in t)t.hasOwnProperty(e)&&(i[e]=t[e]);return i}function gU(i){if("number"!=typeof i&&null!=i){const[t,e]=i.split(AZ);return e&&"px"!==e?null:parseFloat(t)}return i||null}function _U(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 vU="cdk-global-overlay-wrapper";class yU{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(vU),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),d=this._xPosition,h=this._xOffset,p="rtl"===this._overlayRef.getConfig().direction;let m="",g="",b="";l?b="flex-start":"center"===d?(b="center",p?g=h:m=h):p?"left"===d||"end"===d?(b="flex-end",m=h):("right"===d||"start"===d)&&(b="flex-start",g=h):"left"===d||"start"===d?(b="flex-start",m=h):("right"===d||"end"===d)&&(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(vU),n.justifyContent=n.alignItems=t.marginTop=t.marginBottom=t.marginLeft=t.marginRight=t.position="",this._overlayRef=null,this._isDisposed=!0}}let TZ=(()=>{class i{constructor(e,n,r,s){this._viewportRuler=e,this._document=n,this._platform=r,this._overlayContainer=s}global(){return new yU}flexibleConnectedTo(e){return new DZ(e,this._viewportRuler,this._document,this._platform,this._overlayContainer)}}return i.\u0275fac=function(e){return new(e||i)(ee(LM),ee(jt),ee(zi),ee(VM))},i.\u0275prov=ke({token:i,factory:i.\u0275fac,providedIn:"root"}),i})(),IZ=0,as=(()=>{class i{constructor(e,n,r,s,o,a,l,c,d,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=d,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 Zy(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-"+IZ++,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(dm)),new oZ(e,this._componentFactoryResolver,this._appRef,this._injector,this._document)}}return i.\u0275fac=function(e){return new(e||i)(ee(MZ),ee(VM),ee(Hl),ee(TZ),ee(SZ),ee($i),ee(pt),ee(jt),ee(Ra),ee(_y),ee(EZ),ee(kr,8))},i.\u0275prov=ke({token:i,factory:i.\u0275fac,providedIn:"root"}),i})();const RZ=[{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"}],bU=new me("cdk-connected-overlay-scroll-strategy");let zI=(()=>{class i{constructor(e){this.elementRef=e}}return i.\u0275fac=function(e){return new(e||i)(E(gt))},i.\u0275dir=ve({type:i,selectors:[["","cdk-overlay-origin",""],["","overlay-origin",""],["","cdkOverlayOrigin",""]],exportAs:["cdkOverlayOrigin"],standalone:!0}),i})(),xU=(()=>{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=Zt.EMPTY,this._attachSubscription=Zt.EMPTY,this._detachSubscription=Zt.EMPTY,this._positionSubscription=Zt.EMPTY,this.viewportMargin=0,this.open=!1,this.disableClose=!1,this.backdropClick=new $e,this.positionChange=new $e,this.attach=new $e,this.detach=new $e,this.overlayKeydown=new $e,this.overlayOutsideClick=new $e,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=RZ);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&&!Zo(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 zI?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(jB(()=>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)(E(as),E(Co),E(jr),E(bU),E(Ra,8))},i.\u0275dir=ve({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:[xi]}),i})();const PZ={provide:bU,deps:[as],useFactory:function kZ(i){return()=>i.scrollStrategies.reposition()}};let Pm=(()=>{class i{}return i.\u0275fac=function(e){return new(e||i)},i.\u0275mod=nn({type:i}),i.\u0275inj=Kt({providers:[as,PZ],imports:[Yy,Nh,dU,dU]}),i})();function ml(i,t=$y){return ti((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,d=t.now();if(d{s=c,o=t.now(),r||(r=t.schedule(l,i),n.add(r))},()=>{a(),n.complete()},void 0,()=>{s=r=null}))})}function wU(i){return gn((t,e)=>i<=e)}function Ql(i,t=$a){return i=i??OZ,ti((e,n)=>{let r,s=!0;e.subscribe(Yn(n,o=>{const a=t(o);(s||!i(r,a))&&(s=!1,r=a,n.next(o))}))})}function OZ(i,t){return i===t}let MU=(()=>{class i{create(e){return typeof MutationObserver>"u"?null:new MutationObserver(e)}}return i.\u0275fac=function(e){return new(e||i)},i.\u0275prov=ke({token:i,factory:i.\u0275fac,providedIn:"root"}),i})(),FZ=(()=>{class i{constructor(e){this._mutationObserverFactory=e,this._observedElements=new Map}ngOnDestroy(){this._observedElements.forEach((e,n)=>this._cleanupObserver(n))}observe(e){const n=qc(e);return new In(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 Re,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)(ee(MU))},i.\u0275prov=ke({token:i,factory:i.\u0275fac,providedIn:"root"}),i})(),CU=(()=>{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=Ps(e),this._subscribe()}constructor(e,n,r){this._contentObserver=e,this._elementRef=n,this._ngZone=r,this.event=new $e,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(ml(this.debounce)):e).subscribe(this.event)})}_unsubscribe(){this._currentSubscription?.unsubscribe()}}return i.\u0275fac=function(e){return new(e||i)(E(FZ),E(gt),E(pt))},i.\u0275dir=ve({type:i,selectors:[["","cdkObserveContent",""]],inputs:{disabled:["cdkObserveContentDisabled","disabled"],debounce:"debounce"},outputs:{event:"cdkObserveContent"},exportAs:["cdkObserveContent"]}),i})(),HI=(()=>{class i{}return i.\u0275fac=function(e){return new(e||i)},i.\u0275mod=nn({type:i}),i.\u0275inj=Kt({providers:[MU]}),i})();const SU=new Set;let Om,LZ=(()=>{class i{constructor(e){this._platform=e,this._matchMedia=this._platform.isBrowser&&window.matchMedia?window.matchMedia.bind(window):BZ}matchMedia(e){return(this._platform.WEBKIT||this._platform.BLINK)&&function NZ(i){if(!SU.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),SU.add(i))}catch(t){console.error(t)}}(e),this._matchMedia(e)}}return i.\u0275fac=function(e){return new(e||i)(ee(zi))},i.\u0275prov=ke({token:i,factory:i.\u0275fac,providedIn:"root"}),i})();function BZ(i){return{matches:"all"===i||""===i,media:i,addListener:()=>{},removeListener:()=>{}}}let GI=(()=>{class i{constructor(e,n){this._mediaMatcher=e,this._zone=n,this._queries=new Map,this._destroySubject=new Re}ngOnDestroy(){this._destroySubject.next(),this._destroySubject.complete()}isMatched(e){return EU(TM(e)).some(r=>this._registerQuery(r).mql.matches)}observe(e){let s=Xl(EU(TM(e)).map(o=>this._registerQuery(o).observable));return s=Sy(s.pipe(Oi(1)),s.pipe(wU(1),ml(0))),s.pipe(et(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 In(o=>{const a=l=>this._zone.run(()=>o.next(l));return n.addListener(a),()=>{n.removeListener(a)}}).pipe(Do(n),et(({matches:o})=>({query:e,matches:o})),Ve(this._destroySubject)),mql:n};return this._queries.set(e,s),s}}return i.\u0275fac=function(e){return new(e||i)(ee(LZ),ee(pt))},i.\u0275prov=ke({token:i,factory:i.\u0275fac,providedIn:"root"}),i})();function EU(i){return i.map(t=>t.split(",")).reduce((t,e)=>t.concat(e)).map(t=>t.trim())}function zM(i,t){return(i.getAttribute(t)||"").match(/\S+/g)||[]}const DU="cdk-describedby-message",HM="cdk-describedby-host";let $I=0,HZ=(()=>{class i{constructor(e,n){this._platform=n,this._messageRegistry=new Map,this._messagesContainer=null,this._id=""+$I++,this._document=e,this._id=Ft(cm)+"-"+$I++}describe(e,n,r){if(!this._canBeDescribed(e,n))return;const s=WI(n,r);"string"!=typeof n?(TU(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=WI(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(`[${HM}="${this._id}"]`);for(let n=0;n0!=r.indexOf(DU));e.setAttribute("aria-describedby",n.join(" "))}_addMessageReference(e,n){const r=this._messageRegistry.get(n);(function VZ(i,t,e){const n=zM(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(HM,this._id),r.referenceCount++}_removeMessageReference(e,n){const r=this._messageRegistry.get(n);r.referenceCount--,function zZ(i,t,e){const r=zM(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(HM)}_isElementDescribedByMessage(e,n){const r=zM(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)(ee(jt),ee(zi))},i.\u0275prov=ke({token:i,factory:i.\u0275fac,providedIn:"root"}),i})();function WI(i,t){return"string"==typeof i?`${t||""}/${i}`:i}function TU(i,t){i.id||(i.id=`${DU}-${t}-${$I++}`)}class IU{constructor(t){this._items=t,this._activeItemIndex=-1,this._activeItem=null,this._wrap=!1,this._letterKeyStream=new Re,this._typeaheadSubscription=Zt.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 Re,this.change=new Re,t instanceof om&&(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(Vi(e=>this._pressedLetters.push(e)),ml(t),gn(()=>this._pressedLetters.length>0),et(()=>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 om?this._items.toArray():this._items}}class GZ extends IU{setActiveItem(t){this.activeItem&&this.activeItem.setInactiveStyles(),super.setActiveItem(t),this.activeItem&&this.activeItem.setActiveStyles()}}class RU extends IU{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 GM=(()=>{class i{constructor(e){this._platform=e}isDisabled(e){return e.hasAttribute("disabled")}isVisible(e){return function WZ(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 $Z(i){try{return i.frameElement}catch{return null}}(function JZ(i){return i.ownerDocument&&i.ownerDocument.defaultView||window}(e));if(n&&(-1===PU(n)||!this.isVisible(n)))return!1;let r=e.nodeName.toLowerCase(),s=PU(e);return e.hasAttribute("contenteditable")?-1!==s:!("iframe"===r||"object"===r||this._platform.WEBKIT&&this._platform.IOS&&!function ZZ(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 QZ(i){return!function YZ(i){return function XZ(i){return"input"==i.nodeName.toLowerCase()}(i)&&"hidden"==i.type}(i)&&(function jZ(i){let t=i.nodeName.toLowerCase();return"input"===t||"select"===t||"button"===t||"textarea"===t}(i)||function qZ(i){return function KZ(i){return"a"==i.nodeName.toLowerCase()}(i)&&i.hasAttribute("href")}(i)||i.hasAttribute("contenteditable")||kU(i))}(e)&&!this.isDisabled(e)&&(n?.ignoreVisibility||this.isVisible(e))}}return i.\u0275fac=function(e){return new(e||i)(ee(zi))},i.\u0275prov=ke({token:i,factory:i.\u0275fac,providedIn:"root"}),i})();function kU(i){if(!i.hasAttribute("tabindex")||void 0===i.tabIndex)return!1;let t=i.getAttribute("tabindex");return!(!t||isNaN(parseInt(t,10)))}function PU(i){if(!kU(i))return null;const t=parseInt(i.getAttribute("tabindex")||"",10);return isNaN(t)?-1:t}class eQ{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(Oi(1)).subscribe(t)}}let jI=(()=>{class i{constructor(e,n,r){this._checker=e,this._ngZone=n,this._document=r}create(e,n=!1){return new eQ(e,this._checker,this._ngZone,this._document,n)}}return i.\u0275fac=function(e){return new(e||i)(ee(GM),ee(pt),ee(jt))},i.\u0275prov=ke({token:i,factory:i.\u0275fac,providedIn:"root"}),i})();function YI(i){return 0===i.buttons||0===i.offsetX&&0===i.offsetY}function qI(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 tQ=new me("cdk-input-modality-detector-options"),nQ={ignoreKeys:[18,17,224,91,16]},Fm=Oh({passive:!0,capture:!0});let iQ=(()=>{class i{get mostRecentModality(){return this._modality.value}constructor(e,n,r,s){this._platform=e,this._mostRecentTarget=null,this._modality=new ut(null),this._lastTouchMs=0,this._onKeydown=o=>{this._options?.ignoreKeys?.some(a=>a===o.keyCode)||(this._modality.next("keyboard"),this._mostRecentTarget=cu(o))},this._onMousedown=o=>{Date.now()-this._lastTouchMs<650||(this._modality.next(YI(o)?"keyboard":"mouse"),this._mostRecentTarget=cu(o))},this._onTouchstart=o=>{qI(o)?this._modality.next("keyboard"):(this._lastTouchMs=Date.now(),this._modality.next("touch"),this._mostRecentTarget=cu(o))},this._options={...nQ,...s},this.modalityDetected=this._modality.pipe(wU(1)),this.modalityChanged=this.modalityDetected.pipe(Ql()),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)(ee(zi),ee(pt),ee(jt),ee(tQ,8))},i.\u0275prov=ke({token:i,factory:i.\u0275fac,providedIn:"root"}),i})();const rQ=new me("liveAnnouncerElement",{providedIn:"root",factory:function sQ(){return null}}),oQ=new me("LIVE_ANNOUNCER_DEFAULT_OPTIONS");let aQ=0,XI=(()=>{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 Re,this._rootNodeFocusAndBlurListener=a=>{for(let c=cu(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=qc(e);if(!this._platform.isBrowser||1!==r.nodeType)return ft(null);const s=function WK(i){if(function $K(){if(null==LI){const i=typeof document<"u"?document.head:null;LI=!(!i||!i.createShadowRoot&&!i.attachShadow)}return LI}()){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 Re,rootNode:s};return this._elementInfo.set(r,a),this._registerGlobalListeners(a),a.subject}stopMonitoring(e){const n=qc(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=qc(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=cu(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,$M),n.addEventListener("blur",this._rootNodeFocusAndBlurListener,$M)}),this._rootNodeFocusListenerCount.set(n,r+1),1==++this._monitoredElementCount&&(this._ngZone.runOutsideAngular(()=>{this._getWindow().addEventListener("focus",this._windowFocusListener)}),this._inputModalityDetector.modalityDetected.pipe(Ve(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,$M),n.removeEventListener("blur",this._rootNodeFocusAndBlurListener,$M),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=Ft(GI).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,FU,LU),this._hasCheckedHighContrastMode=!0;const n=this.getHighContrastMode();1===n?e.add(KI,FU):2===n&&e.add(KI,LU)}}}return i.\u0275fac=function(e){return new(e||i)(ee(zi),ee(jt))},i.\u0275prov=ke({token:i,factory:i.\u0275fac,providedIn:"root"}),i})(),BU=(()=>{class i{constructor(e){e._applyBodyHighContrastModeCssClasses()}}return i.\u0275fac=function(e){return new(e||i)(ee(NU))},i.\u0275mod=nn({type:i}),i.\u0275inj=Kt({imports:[HI]}),i})();function cQ(i,t){}class WM{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 UU=(()=>{class i extends NM{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=d=>{this._portalOutlet.hasAttached();const h=this._portalOutlet.attachDomPortal(d);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=FM(),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=FM();return e===n||e.contains(n)}_initializeFocusTrap(){this._focusTrap=this._focusTrapFactory.create(this._elementRef.nativeElement),this._document&&(this._elementFocusedBeforeDialogWasOpened=FM())}_handleBackdropClicks(){this._overlayRef.backdropClick().subscribe(()=>{this._config.disableClose&&this._recaptureFocus()})}}return i.\u0275fac=function(e){return new(e||i)(E(gt),E(jI),E(jt,8),E(WM),E(GM),E(pt),E(Zy),E(Xc))},i.\u0275cmp=ot({type:i,selectors:[["cdk-dialog-container"]],viewQuery:function(e,n){if(1&e&&Wn(Am,7),2&e){let r;Et(r=At())&&(n._portalOutlet=r.first)}},hostAttrs:["tabindex","-1",1,"cdk-dialog-container"],hostVars:6,hostBindings:function(e,n){2&e&&Dt("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:[lt],decls:1,vars:0,consts:[["cdkPortalOutlet",""]],template:function(e,n){1&e&&fe(0,cQ,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 ZI{constructor(t,e){this.overlayRef=t,this.config=e,this.closed=new Re,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&&!Zo(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 VU=new me("DialogScrollStrategy"),dQ=new me("DialogData"),uQ=new me("DefaultDialogConfig"),fQ={provide:VU,deps:[as],useFactory:function hQ(i){return()=>i.scrollStrategies.block()}};let pQ=0,zU=(()=>{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 Re,this._afterOpenedAtThisLevel=new Re,this._ariaHiddenElements=new Map,this.afterAllClosed=Ey(()=>this.openDialogs.length?this._getAfterAllClosed():this._getAfterAllClosed().pipe(Do(void 0))),this._scrollStrategy=a}open(e,n){(n={...this._defaultOptions||new WM,...n}).id=n.id||"cdk-dialog-"+pQ++,n.id&&this.getDialogById(n.id);const s=this._getOverlayConfig(n),o=this._overlay.create(s),a=new ZI(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(){QI(this.openDialogs,e=>e.close())}getDialogById(e){return this.openDialogs.find(n=>n.id===e)}ngOnDestroy(){QI(this._openDialogsAtThisLevel,e=>{!1===e.config.closeOnDestroy&&this._removeOpenDialog(e,!1)}),QI(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:WM,useValue:r},{provide:ZI,useValue:n},{provide:Zy,useValue:e}];let a;r.container?"function"==typeof r.container?a=r.container:(a=r.container.type,o.push(...r.container.providers(r))):a=UU;const l=new Lh(a,r.viewContainerRef,$i.create({parent:s||this._injector,providers:o}),r.componentFactoryResolver);return e.attach(l).instance}_attachDialogContent(e,n,r,s){if(e instanceof Co){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 Lh(e,s.viewContainerRef,o,s.componentFactoryResolver));n.componentInstance=a.instance}}_createInjector(e,n,r,s){const o=e.injector||e.viewContainerRef?.injector,a=[{provide:dQ,useValue:e.data},{provide:ZI,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(Ra,null,{optional:!0}))&&a.push({provide:Ra,useValue:{value:e.direction,change:ft()}}),$i.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)(ee(as),ee($i),ee(uQ,8),ee(i,12),ee(VM),ee(VU))},i.\u0275prov=ke({token:i,factory:i.\u0275fac}),i})();function QI(i,t){let e=i.length;for(;e--;)t(i[e])}let mQ=(()=>{class i{}return i.\u0275fac=function(e){return new(e||i)},i.\u0275mod=nn({type:i}),i.\u0275inj=Kt({providers:[zU,fQ],imports:[Pm,Nh,BU,Nh]}),i})();const gQ=["text"];function _Q(i,t){if(1&i&&Pe(0,"mat-pseudo-checkbox",6),2&i){const e=he();U("state",e.selected?"checked":"unchecked")("disabled",e.disabled)}}function vQ(i,t){1&i&&Pe(0,"mat-pseudo-checkbox",7),2&i&&U("disabled",he().disabled)}function yQ(i,t){if(1&i&&(W(0,"span",8),ze(1),j()),2&i){const e=he();G(1),Qi("(",e.group.label,")")}}const bQ=[[["mat-icon"]],"*"],xQ=["mat-icon","*"],MQ=new me("mat-sanity-checks",{providedIn:"root",factory:function wQ(){return!0}});let Qn=(()=>{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!NI()&&("boolean"==typeof this._sanityChecks?this._sanityChecks:!!this._sanityChecks[e])}}return i.\u0275fac=function(e){return new(e||i)(ee(NU),ee(MQ,8),ee(jt))},i.\u0275mod=nn({type:i}),i.\u0275inj=Kt({imports:[Yy,Yy]}),i})();function jM(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 Qy(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 YM(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 JI(i,t=0){return class extends i{get tabIndex(){return this.disabled?-1:this._tabIndex}set tabIndex(e){this._tabIndex=null!=e?Ps(e):this.defaultTabIndex}constructor(...e){super(...e),this._tabIndex=t,this.defaultTabIndex=t}}}function $U(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 CQ(i){return class extends i{constructor(...t){super(...t),this._isInitialized=!1,this._pendingSubscribers=[],this.initialized=new In(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 jU=(()=>{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=ke({token:i,factory:i.\u0275fac,providedIn:"root"}),i})();class EQ{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 YU=Oh({passive:!0,capture:!0});class AQ{constructor(){this._events=new Map,this._delegateEventHandler=t=>{const e=cu(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,YU)})}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,YU)))}}const qU={enterDuration:225,exitDuration:150},XU=Oh({passive:!0,capture:!0}),KU=["mousedown","touchstart"],ZU=["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=qc(n))}fadeInRipple(t,e,n={}){const r=this._containerRect=this._containerRect||this._containerElement.getBoundingClientRect(),s={...qU,...n.animation};n.centered&&(t=r.left+r.width/2,e=r.top+r.height/2);const o=n.radius||function TQ(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,d=document.createElement("div");d.classList.add("mat-ripple-element"),d.style.left=a-o+"px",d.style.top=l-o+"px",d.style.height=2*o+"px",d.style.width=2*o+"px",null!=n.color&&(d.style.backgroundColor=n.color),d.style.transitionDuration=`${c}ms`,this._containerElement.appendChild(d);const h=window.getComputedStyle(d),m=h.transitionDuration,g="none"===h.transitionProperty||"0s"===m||"0s, 0s"===m||0===r.width&&0===r.height,b=new EQ(this,d,n,g);d.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);d.addEventListener("transitionend",y),d.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={...qU,...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=qc(t);!this._platform.isBrowser||!e||e===this._triggerElement||(this._removeTriggerEvents(),this._triggerElement=e,KU.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(()=>{ZU.forEach(e=>{this._triggerElement.addEventListener(e,this,XU)})}),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=YI(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&&(KU.forEach(e=>Lm._eventManager.removeHandler(e,t,this)),this._pointerUpEventsRegistered&&ZU.forEach(e=>t.removeEventListener(e,this,XU)))}}Lm._eventManager=new AQ;const eR=new me("mat-ripple-global-options");let Uh=(()=>{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)(E(gt),E(pt),E(zi),E(eR,8),E(kr,8))},i.\u0275dir=ve({type:i,selectors:[["","mat-ripple",""],["","matRipple",""]],hostAttrs:[1,"mat-ripple"],hostVars:2,hostBindings:function(e,n){2&e&&un("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})(),eb=(()=>{class i{}return i.\u0275fac=function(e){return new(e||i)},i.\u0275mod=nn({type:i}),i.\u0275inj=Kt({imports:[Qn,Qn]}),i})(),IQ=(()=>{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)(E(kr,8))},i.\u0275cmp=ot({type:i,selectors:[["mat-pseudo-checkbox"]],hostAttrs:[1,"mat-pseudo-checkbox"],hostVars:12,hostBindings:function(e,n){2&e&&un("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})(),QU=(()=>{class i{}return i.\u0275fac=function(e){return new(e||i)},i.\u0275mod=nn({type:i}),i.\u0275inj=Kt({imports:[Qn]}),i})();const JU=new me("MAT_OPTION_PARENT_COMPONENT"),eV=new me("MatOptgroup");let RQ=0;class kQ{constructor(t,e=!1){this.source=t,this.isUserInput=e}}let PQ=(()=>{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-"+RQ++,this.onSelectionChange=new $e,this._stateChanges=new Re}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)&&!Zo(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 kQ(this,e))}}return i.\u0275fac=function(e){wo()},i.\u0275dir=ve({type:i,viewQuery:function(e,n){if(1&e&&Wn(gQ,7),2&e){let r;Et(r=At())&&(n._text=r.first)}},inputs:{value:"value",id:"id",disabled:"disabled"},outputs:{onSelectionChange:"onSelectionChange"}}),i})(),Nm=(()=>{class i extends PQ{constructor(e,n,r,s){super(e,n,r,s)}}return i.\u0275fac=function(e){return new(e||i)(E(gt),E(Zn),E(JU,8),E(eV,8))},i.\u0275cmp=ot({type:i,selectors:[["mat-option"]],hostAttrs:["role","option",1,"mat-mdc-option","mdc-list-item"],hostVars:11,hostBindings:function(e,n){1&e&&Le("click",function(){return n._selectViaInteraction()})("keydown",function(s){return n._handleKeydown(s)}),2&e&&(Yl("id",n.id),Dt("aria-selected",n.selected)("aria-disabled",n.disabled.toString()),un("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:[lt],ngContentSelectors:xQ,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&&(or(bQ),fe(0,_Q,1,2,"mat-pseudo-checkbox",0),Wt(1),W(2,"span",1,2),Wt(4,1),j(),fe(5,vQ,1,1,"mat-pseudo-checkbox",3),fe(6,yQ,2,1,"span",4),Pe(7,"div",5)),2&e&&(U("ngIf",n.multiple),G(5),U("ngIf",!n.multiple&&n.selected&&!n.hideSingleSelectionIndicator),G(1),U("ngIf",n.group&&n.group._inert),G(1),U("matRippleTrigger",n._getHostElement())("matRippleDisabled",n.disabled||n.disableRipple))},dependencies:[Uh,vi,IQ],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})(),tR=(()=>{class i{}return i.\u0275fac=function(e){return new(e||i)},i.\u0275mod=nn({type:i}),i.\u0275inj=Kt({imports:[eb,Ao,Qn,QU]}),i})();class tV{}class LQ{}const Kc="*";function ka(i,t){return{type:7,name:i,definitions:t,options:{}}}function Yr(i,t=null){return{type:4,styles:t,timings:i}}function iV(i,t=null){return{type:2,steps:i,options:t}}function si(i){return{type:6,styles:i,offset:null}}function Os(i,t,e){return{type:0,name:i,styles:t,options:e}}function rV(i){return{type:5,steps:i}}function Or(i,t,e=null){return{type:1,expr:i,animation:t,options:e}}function nR(i=null){return{type:9,options:i}}function iR(i,t,e=null){return{type:11,selector:i,animation:t,options:e}}function sV(i){Promise.resolve().then(i)}class tb{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(){sV(()=>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 oV{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?sV(()=>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 rR="!";function NQ(i,t){}class qM{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 sR="mdc-dialog--open",aV="mdc-dialog--opening",lV="mdc-dialog--closing";let VQ=(()=>{class i extends UU{constructor(e,n,r,s,o,a,l,c){super(e,n,r,s,o,a,l,c),this._animationStateChanged=new $e}_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)(E(gt),E(jI),E(jt,8),E(qM),E(GM),E(pt),E(Zy),E(Xc))},i.\u0275cmp=ot({type:i,selectors:[["ng-component"]],features:[lt],decls:0,vars:0,template:function(e,n){},encapsulation:2}),i})();const cV="--mat-dialog-transition-duration";function dV(i){return null==i?null:"number"==typeof i?i:i.endsWith("ms")?Ps(i.substring(0,i.length-2)):i.endsWith("s")?1e3*Ps(i.substring(0,i.length-1)):"0"===i?0:null}let zQ=(()=>{class i extends VQ{constructor(e,n,r,s,o,a,l,c,d){super(e,n,r,s,o,a,l,d),this._animationMode=c,this._animationsEnabled="NoopAnimations"!==this._animationMode,this._hostElement=this._elementRef.nativeElement,this._openAnimationDuration=this._animationsEnabled?dV(this._config.enterAnimationDuration)??150:0,this._closeAnimationDuration=this._animationsEnabled?dV(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(cV,`${this._openAnimationDuration}ms`),this._requestAnimationFrame(()=>this._hostElement.classList.add(aV,sR)),this._waitForAnimationToComplete(this._openAnimationDuration,this._finishDialogOpen)):(this._hostElement.classList.add(sR),Promise.resolve().then(()=>this._finishDialogOpen()))}_startExitAnimation(){this._animationStateChanged.emit({state:"closing",totalTime:this._closeAnimationDuration}),this._hostElement.classList.remove(sR),this._animationsEnabled?(this._hostElement.style.setProperty(cV,`${this._openAnimationDuration}ms`),this._requestAnimationFrame(()=>this._hostElement.classList.add(lV)),this._waitForAnimationToComplete(this._closeAnimationDuration,this._finishDialogClose)):Promise.resolve().then(()=>this._finishDialogClose())}_clearAnimationClasses(){this._hostElement.classList.remove(aV,lV)}_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)(E(gt),E(jI),E(jt,8),E(qM),E(GM),E(pt),E(Zy),E(kr,8),E(Xc))},i.\u0275cmp=ot({type:i,selectors:[["mat-dialog-container"]],hostAttrs:["tabindex","-1",1,"mat-mdc-dialog-container","mdc-dialog"],hostVars:8,hostBindings:function(e,n){2&e&&(Yl("id",n._config.id),Dt("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),un("_mat-animation-noopable",!n._animationsEnabled))},features:[lt],decls:3,vars:0,consts:[[1,"mdc-dialog__container"],[1,"mat-mdc-dialog-surface","mdc-dialog__surface"],["cdkPortalOutlet",""]],template:function(e,n){1&e&&(W(0,"div",0)(1,"div",1),fe(2,NQ,0,0,"ng-template",2),j()())},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 nb{constructor(t,e,n){this._ref=t,this._containerInstance=n,this._afterOpened=new Re,this._beforeClosed=new Re,this._state=0,this.disableClose=e.disableClose,this.id=t.id,n._animationStateChanged.pipe(gn(r=>"opened"===r.state),Oi(1)).subscribe(()=>{this._afterOpened.next(),this._afterOpened.complete()}),n._animationStateChanged.pipe(gn(r=>"closed"===r.state),Oi(1)).subscribe(()=>{clearTimeout(this._closeFallbackTimeout),this._finishDialogClose()}),t.overlayRef.detachments().subscribe(()=>{this._beforeClosed.next(this._result),this._beforeClosed.complete(),this._finishDialogClose()}),Cr(this.backdropClick(),this.keydownEvents().pipe(gn(r=>27===r.keyCode&&!this.disableClose&&!Zo(r)))).subscribe(r=>{this.disableClose||(r.preventDefault(),uV(this,"keydown"===r.type?"keyboard":"mouse"))})}close(t){this._result=t,this._containerInstance._animationStateChanged.pipe(gn(e=>"closing"===e.state),Oi(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 uV(i,t,e){return i._closeInteractionType=t,i.close(e)}const oR=new me("MatMdcDialogData"),HQ=new me("mat-mdc-dialog-default-options"),hV=new me("mat-mdc-dialog-scroll-strategy"),$Q={provide:hV,deps:[as],useFactory:function GQ(i){return()=>i.scrollStrategies.block()}};let WQ=0,jQ=(()=>{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,d,h){this._overlay=e,this._defaultOptions=r,this._parentDialog=s,this._dialogRefConstructor=l,this._dialogContainerType=c,this._dialogDataToken=d,this._openDialogsAtThisLevel=[],this._afterAllClosedAtThisLevel=new Re,this._afterOpenedAtThisLevel=new Re,this._idPrefix="mat-dialog-",this.dialogConfigClass=qM,this.afterAllClosed=Ey(()=>this.openDialogs.length?this._getAfterAllClosed():this._getAfterAllClosed().pipe(Do(void 0))),this._scrollStrategy=a,this._dialog=n.get(zU)}open(e,n){let r;(n={...this._defaultOptions||new qM,...n}).id=n.id||`${this._idPrefix}${WQ++}`,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:WM,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){wo()},i.\u0275prov=ke({token:i,factory:i.\u0275fac}),i})(),Bm=(()=>{class i extends jQ{constructor(e,n,r,s,o,a,l,c){super(e,n,s,a,l,o,nb,zQ,oR,c),this._idPrefix="mat-mdc-dialog-"}}return i.\u0275fac=function(e){return new(e||i)(ee(as),ee($i),ee(_y,8),ee(HQ,8),ee(hV),ee(i,12),ee(VM),ee(kr,8))},i.\u0275prov=ke({token:i,factory:i.\u0275fac}),i})(),YQ=0,qQ=(()=>{class i{constructor(e,n,r){this.dialogRef=e,this._elementRef=n,this._dialog=r,this.type="button"}ngOnInit(){this.dialogRef||(this.dialogRef=gV(this._elementRef,this._dialog.openDialogs))}ngOnChanges(e){const n=e._matDialogClose||e._matDialogCloseResult;n&&(this.dialogResult=n.currentValue)}_onButtonClick(e){uV(this.dialogRef,0===e.screenX&&0===e.screenY?"keyboard":"mouse",this.dialogResult)}}return i.\u0275fac=function(e){return new(e||i)(E(nb,8),E(gt),E(Bm))},i.\u0275dir=ve({type:i,selectors:[["","mat-dialog-close",""],["","matDialogClose",""]],hostVars:2,hostBindings:function(e,n){1&e&&Le("click",function(s){return n._onButtonClick(s)}),2&e&&Dt("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:[xi]}),i})(),fV=(()=>{class i{constructor(e,n,r){this._dialogRef=e,this._elementRef=n,this._dialog=r,this.id="mat-mdc-dialog-title-"+YQ++}ngOnInit(){this._dialogRef||(this._dialogRef=gV(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)(E(nb,8),E(gt),E(Bm))},i.\u0275dir=ve({type:i,selectors:[["","mat-dialog-title",""],["","matDialogTitle",""]],hostAttrs:[1,"mat-mdc-dialog-title","mdc-dialog__title"],hostVars:1,hostBindings:function(e,n){2&e&&Yl("id",n.id)},inputs:{id:"id"},exportAs:["matDialogTitle"]}),i})(),pV=(()=>{class i{}return i.\u0275fac=function(e){return new(e||i)},i.\u0275dir=ve({type:i,selectors:[["","mat-dialog-content",""],["mat-dialog-content"],["","matDialogContent",""]],hostAttrs:[1,"mat-mdc-dialog-content","mdc-dialog__content"]}),i})(),mV=(()=>{class i{constructor(){this.align="start"}}return i.\u0275fac=function(e){return new(e||i)},i.\u0275dir=ve({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&&un("mat-mdc-dialog-actions-align-center","center"===n.align)("mat-mdc-dialog-actions-align-end","end"===n.align)},inputs:{align:"align"}}),i})();function gV(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 _V=(()=>{class i{}return i.\u0275fac=function(e){return new(e||i)},i.\u0275mod=nn({type:i}),i.\u0275inj=Kt({providers:[Bm,$Q],imports:[mQ,Pm,Nh,Qn,Qn]}),i})();const XQ=["mat-button",""],yV=[[["",8,"material-icons",3,"iconPositionEnd",""],["mat-icon",3,"iconPositionEnd",""],["","matButtonIcon","",3,"iconPositionEnd",""]],"*",[["","iconPositionEnd","",8,"material-icons"],["mat-icon","iconPositionEnd",""],["","matButtonIcon","","iconPositionEnd",""]]],bV=[".material-icons:not([iconPositionEnd]), mat-icon:not([iconPositionEnd]), [matButtonIcon]:not([iconPositionEnd])","*",".material-icons[iconPositionEnd], mat-icon[iconPositionEnd], [matButtonIcon][iconPositionEnd]"],ZQ=["mat-mini-fab",""],JQ=["mat-icon-button",""],eJ=["*"],tJ=[{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"]}],nJ=Qy(jM(YM(class{constructor(i){this._elementRef=i}})));let aR=(()=>{class i extends nJ{constructor(e,n,r,s){super(e),this._platform=n,this._ngZone=r,this._animationMode=s,this._focusMonitor=Ft(Xc),this._isFab=!1;const o=e.nativeElement.classList;for(const a of tJ)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){wo()},i.\u0275dir=ve({type:i,viewQuery:function(e,n){if(1&e&&Wn(Uh,5),2&e){let r;Et(r=At())&&(n.ripple=r.first)}},features:[lt]}),i})(),ib=(()=>{class i extends aR{constructor(e,n,r,s){super(e,n,r,s)}}return i.\u0275fac=function(e){return new(e||i)(E(gt),E(zi),E(pt),E(kr,8))},i.\u0275cmp=ot({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&&(Dt("disabled",n.disabled||null),un("_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:[lt],attrs:XQ,ngContentSelectors:bV,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&&(or(yV),Pe(0,"span",0),Wt(1),W(2,"span",1),Wt(3,1),j(),Wt(4,2),Pe(5,"span",2)(6,"span",3)(7,"span",4)),2&e&&(un("mdc-button__ripple",!n._isFab)("mdc-fab__ripple",n._isFab),G(6),U("matRippleDisabled",n._isRippleDisabled())("matRippleTrigger",n._elementRef.nativeElement))},dependencies:[Uh],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 rJ=new me("mat-mdc-fab-default-options",{providedIn:"root",factory:xV});function xV(){return{color:"accent"}}const wV=xV();let MV=(()=>{class i extends aR{constructor(e,n,r,s,o){super(e,n,r,s),this._options=o,this._isFab=!0,this._options=this._options||wV,this.color=this.defaultColor=this._options.color||wV.color}}return i.\u0275fac=function(e){return new(e||i)(E(gt),E(zi),E(pt),E(kr,8),E(rJ,8))},i.\u0275cmp=ot({type:i,selectors:[["button","mat-mini-fab",""]],hostVars:7,hostBindings:function(e,n){2&e&&(Dt("disabled",n.disabled||null),un("_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:[lt],attrs:ZQ,ngContentSelectors:bV,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&&(or(yV),Pe(0,"span",0),Wt(1),W(2,"span",1),Wt(3,1),j(),Wt(4,2),Pe(5,"span",2)(6,"span",3)(7,"span",4)),2&e&&(un("mdc-button__ripple",!n._isFab)("mdc-fab__ripple",n._isFab),G(6),U("matRippleDisabled",n._isRippleDisabled())("matRippleTrigger",n._elementRef.nativeElement))},dependencies:[Uh],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})(),XM=(()=>{class i extends aR{constructor(e,n,r,s){super(e,n,r,s)}}return i.\u0275fac=function(e){return new(e||i)(E(gt),E(zi),E(pt),E(kr,8))},i.\u0275cmp=ot({type:i,selectors:[["button","mat-icon-button",""]],hostVars:7,hostBindings:function(e,n){2&e&&(Dt("disabled",n.disabled||null),un("_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:[lt],attrs:JQ,ngContentSelectors:eJ,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&&(or(),Pe(0,"span",0),Wt(1),Pe(2,"span",1)(3,"span",2)(4,"span",3)),2&e&&(G(3),U("matRippleDisabled",n._isRippleDisabled())("matRippleCentered",!0)("matRippleTrigger",n._elementRef.nativeElement))},dependencies:[Uh],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})(),KM=(()=>{class i{}return i.\u0275fac=function(e){return new(e||i)},i.\u0275mod=nn({type:i}),i.\u0275inj=Kt({imports:[Qn,eb,Qn]}),i})();const sJ=["class","dialog"];let CV=(()=>{class i{constructor(e,n){this.dialogRef=e,this.data=n}}return i.\u0275fac=function(e){return new(e||i)(E(nb),E(oR))},i.\u0275cmp=ot({type:i,selectors:[["app-confirm",8,"dialog"]],attrs:sJ,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&&(W(0,"h1",0),ze(1,"Confirmation"),j(),W(2,"div",1)(3,"p"),ze(4),j()(),W(5,"div",2)(6,"button",3),Le("click",function(){return n.dialogRef.close()}),ze(7,"Cancel"),j(),W(8,"button",4),ze(9,"Yes"),j()()),2&e&&(G(4),_i(n.data.text),G(4),U("mat-dialog-close",!0))},dependencies:[ib,qQ,fV,pV,mV]}),i})();function lR(i,t){const e="object"==typeof t;return new Promise((n,r)=>{const s=new ha({next:o=>{n(o),s.unsubscribe()},error:r,complete:()=>{e?n(t.defaultValue):r(new fm)}});i.subscribe(s)})}let Jl=(()=>{class i{constructor(e){this.ngZone=e,this.openedResource$=new ut(null),this.openedResourcePath$=new ut(null),eel.expose(this.wrapHandler(this.openFile),"open_file"),eel.on_angular_ready(),setTimeout(tt(function*(){for(;;){if(eel._websocket){eel._websocket.onclose=()=>window.close();break}yield new Promise(n=>setTimeout(n,0))}}),0)}wrapHandler(e){return(...n)=>{try{pt.assertInAngularZone(),e.bind(this)(...n)}catch{this.ngZone.run(e,this,n)}}}openFile(e,n=!1){var r=this;return tt(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 tt(function*(){yield eel.open_file_with_system_app(e)()})()}retrieveValue(e){return tt(function*(){return yield eel.retrieve_value(e)()})()}runCustomAction(e,n,r){return tt(function*(){return eel.run_custom_action(e,n,r)()})()}saveFile(e){var n=this;return tt(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 tt(function*(){return eel.serialize_resource(e,n)()})()}serializeResourceTmp(e,n,r={}){return tt(function*(){return eel.serialize_resource_tmp(e,n,r)()})()}serializeReversible(e,n){return tt(function*(){return eel.serialize_reversible(e,n)()})()}deserializeResource(e){return tt(function*(){return eel.deserialize_resource(e)()})()}}return i.\u0275fac=function(e){return new(e||i)(ee(pt))},i.\u0275prov=ke({token:i,factory:i.\u0275fac,providedIn:"root"}),i})();var cR=ps(489);const SV=i=>!(!i||"object"!=typeof i),EV=(i={},t,e,n=[])=>{const r=[];if(SV(i)){const s=Object.entries(i);for(let o=0;o{class i{constructor(e){var n=this;this.eelDelegate=e,this._hasUnsavedChanges$=new ut(!1),this.resource$=new ut(null),this.error$=new ut(null),this.customActionRunning$=new ut(!1),this.changedDataBlocks={},this.dataBlockChange$=new Re,this.hideHiddenFields$=new ut(!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=EV(r.schema,"is_recursive_ref",!0);for(const[o,a]of s){const l=o.block_class_mro;let c=r.schema,d=c.block_class_mro===l?c:void 0;for(const h of a.slice(0,a.length-1))!d&&c[h]?.block_class_mro===l&&(d=c[h]),c=c[h];c[a[a.length-1]]=d}this.resource$.next(r),this.error$.next(null)}else this.resource$.next(null),this.error$.next(null)}),this.dataBlockChange$.subscribe(function(){var r=tt(function*([s,o]){n.changedDataBlocks[s]=o,n.updateUnsavedChanges();const a=yield n.eelDelegate.retrieveValue(s);n.changedDataBlocks[s]==o&&((0,cR.isNumber)(o)?Math.abs(o-a)<1e-10:(0,cR.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 tt(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 tt(function*(){return s.processExternalChanges(e,()=>s.eelDelegate.runCustomAction(e,n,r))})()}deserializeResource(e){var n=this;return tt(function*(){return n.processExternalChanges(e,()=>n.eelDelegate.deserializeResource(e))})()}reloadResource(){var e=this;return tt(function*(){const n=e.eelDelegate.openedResourcePath$.getValue();n&&e.eelDelegate.openFile(n,!0).then()})()}saveResource(){var e=this;return tt(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)(ee(Jl))},i.\u0275prov=ke({token:i,factory:i.\u0275fac,providedIn:"root"}),i})();function oJ(i,t){if(1&i){const e=ai();W(0,"div",2)(1,"button",3),Le("click",function(){return rn(e),Ut(he().action())}),ze(2),j()()}if(2&i){const e=he();G(2),Qi(" ",e.data.action," ")}}const aJ=["label"];function lJ(i,t){}const cJ=Math.pow(2,31)-1;class dR{constructor(t,e){this._overlayRef=e,this._afterDismissed=new Re,this._afterOpened=new Re,this._onAction=new Re,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,cJ))}_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 AV=new me("MatSnackBarData");class ZM{constructor(){this.politeness="assertive",this.announcementMessage="",this.duration=0,this.data=null,this.horizontalPosition="center",this.verticalPosition="bottom"}}let dJ=(()=>{class i{}return i.\u0275fac=function(e){return new(e||i)},i.\u0275dir=ve({type:i,selectors:[["","matSnackBarLabel",""]],hostAttrs:[1,"mat-mdc-snack-bar-label","mdc-snackbar__label"]}),i})(),uJ=(()=>{class i{}return i.\u0275fac=function(e){return new(e||i)},i.\u0275dir=ve({type:i,selectors:[["","matSnackBarActions",""]],hostAttrs:[1,"mat-mdc-snack-bar-actions","mdc-snackbar__actions"]}),i})(),hJ=(()=>{class i{}return i.\u0275fac=function(e){return new(e||i)},i.\u0275dir=ve({type:i,selectors:[["","matSnackBarAction",""]],hostAttrs:[1,"mat-mdc-snack-bar-action","mdc-snackbar__action"]}),i})(),fJ=(()=>{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)(E(dR),E(AV))},i.\u0275cmp=ot({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&&(W(0,"div",0),ze(1),j(),fe(2,oJ,3,1,"div",1)),2&e&&(G(1),Qi(" ",n.data.message,"\n"),G(1),U("ngIf",n.hasAction))},dependencies:[vi,ib,dJ,uJ,hJ],styles:[".mat-mdc-simple-snack-bar{display:flex}"],encapsulation:2,changeDetection:0}),i})();const pJ={snackBarState:ka("state",[Os("void, hidden",si({transform:"scale(0.8)",opacity:0})),Os("visible",si({transform:"scale(1)",opacity:1})),Or("* => visible",Yr("150ms cubic-bezier(0, 0, 0.2, 1)")),Or("* => void, * => hidden",Yr("75ms cubic-bezier(0.4, 0.0, 1, 1)",si({opacity:0})))])};let mJ=0,gJ=(()=>{class i extends NM{constructor(e,n,r,s,o){super(),this._ngZone=e,this._elementRef=n,this._changeDetectorRef=r,this._platform=s,this.snackBarConfig=o,this._document=Ft(jt),this._trackedModals=new Set,this._announceDelay=150,this._destroyed=!1,this._onAnnounce=new Re,this._onExit=new Re,this._onEnter=new Re,this._animationState="void",this._liveElementId="mat-snack-bar-container-live-"+mJ++,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(Oi(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)(E(pt),E(gt),E(Zn),E(zi),E(ZM))},i.\u0275dir=ve({type:i,viewQuery:function(e,n){if(1&e&&Wn(Am,7),2&e){let r;Et(r=At())&&(n._portalOutlet=r.first)}},features:[lt]}),i})(),_J=(()=>{class i extends gJ{_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=ri(i)))(n||i)}}(),i.\u0275cmp=ot({type:i,selectors:[["mat-snack-bar-container"]],viewQuery:function(e,n){if(1&e&&Wn(aJ,7),2&e){let r;Et(r=At())&&(n._label=r.first)}},hostAttrs:[1,"mdc-snackbar","mat-mdc-snack-bar-container","mdc-snackbar--open"],hostVars:1,hostBindings:function(e,n){1&e&&N1("@state.done",function(s){return n.onAnimationEnd(s)}),2&e&&Iw("@state",n._animationState)},features:[lt],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&&(W(0,"div",0)(1,"div",1,2)(3,"div",3),fe(4,lJ,0,0,"ng-template",4),j(),Pe(5,"div"),j()()),2&e&&(G(5),Dt("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:[pJ.snackBarState]}}),i})(),DV=(()=>{class i{}return i.\u0275fac=function(e){return new(e||i)},i.\u0275mod=nn({type:i}),i.\u0275inj=Kt({imports:[Pm,Nh,Ao,KM,Qn,Qn]}),i})();const TV=new me("mat-snack-bar-default-options",{providedIn:"root",factory:function vJ(){return new ZM}});let yJ=(()=>{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=$i.create({parent:n&&n.viewContainerRef&&n.viewContainerRef.injector||this._injector,providers:[{provide:ZM,useValue:n}]}),o=new Lh(this.snackBarContainerComponent,n.viewContainerRef,s),a=e.attach(o);return a.instance.snackBarConfig=n,a.instance}_attach(e,n){const r={...new ZM,...this._defaultConfig,...n},s=this._createOverlay(r),o=this._attachSnackBarContainer(s,r),a=new dR(o,s);if(e instanceof Co){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 Lh(e,void 0,l),d=o.attachComponentPortal(c);a.instance=d.instance}return this._breakpointObserver.observe("(max-width: 599.98px) and (orientation: portrait)").pipe(Ve(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 $i.create({parent:e&&e.viewContainerRef&&e.viewContainerRef.injector||this._injector,providers:[{provide:dR,useValue:n},{provide:AV,useValue:e.data}]})}}return i.\u0275fac=function(e){return new(e||i)(ee(as),ee(XI),ee($i),ee(GI),ee(i,12),ee(TV))},i.\u0275prov=ke({token:i,factory:i.\u0275fac}),i})(),IV=(()=>{class i extends yJ{constructor(e,n,r,s,o,a){super(e,n,r,s,o,a),this.simpleSnackBarComponent=fJ,this.snackBarContainerComponent=_J,this.handsetCssClass="mat-mdc-snack-bar-handset"}}return i.\u0275fac=function(e){return new(e||i)(ee(as),ee(XI),ee($i),ee(GI),ee(i,12),ee(TV))},i.\u0275prov=ke({token:i,factory:i.\u0275fac,providedIn:DV}),i})();const bJ=["*",[["mat-toolbar-row"]]],xJ=["*","mat-toolbar-row"],wJ=Qy(class{constructor(i){this._elementRef=i}});let MJ=(()=>{class i{}return i.\u0275fac=function(e){return new(e||i)},i.\u0275dir=ve({type:i,selectors:[["mat-toolbar-row"]],hostAttrs:[1,"mat-toolbar-row"],exportAs:["matToolbarRow"]}),i})(),CJ=(()=>{class i extends wJ{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)(E(gt),E(zi),E(jt))},i.\u0275cmp=ot({type:i,selectors:[["mat-toolbar"]],contentQueries:function(e,n,r){if(1&e&&Wi(r,MJ,5),2&e){let s;Et(s=At())&&(n._toolbarRows=s)}},hostAttrs:[1,"mat-toolbar"],hostVars:4,hostBindings:function(e,n){2&e&&un("mat-toolbar-multiple-rows",n._toolbarRows.length>0)("mat-toolbar-single-row",0===n._toolbarRows.length)},inputs:{color:"color"},exportAs:["matToolbar"],features:[lt],ngContentSelectors:xJ,decls:2,vars:0,template:function(e,n){1&e&&(or(bJ),Wt(0),Wt(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})(),SJ=(()=>{class i{}return i.\u0275fac=function(e){return new(e||i)},i.\u0275mod=nn({type:i}),i.\u0275inj=Kt({imports:[Qn,Qn]}),i})(),EJ=(()=>{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=ot({type:i,selectors:[["mat-divider"]],hostAttrs:["role","separator",1,"mat-divider"],hostVars:7,hostBindings:function(e,n){2&e&&(Dt("aria-orientation",n.vertical?"vertical":"horizontal"),un("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})(),RV=(()=>{class i{}return i.\u0275fac=function(e){return new(e||i)},i.\u0275mod=nn({type:i}),i.\u0275inj=Kt({imports:[Qn,Qn]}),i})();const AJ=["tooltip"],kV=new me("mat-tooltip-scroll-strategy"),IJ={provide:kV,deps:[as],useFactory:function TJ(i){return()=>i.scrollStrategies.reposition({scrollThrottle:20})}},kJ=new me("mat-tooltip-default-options",{providedIn:"root",factory:function RJ(){return{showDelay:0,hideDelay:0,touchendHideDelay:1500}}}),PV="tooltip-panel",OV=Oh({passive:!0});let BJ=(()=>{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=Ps(e)}get hideDelay(){return this._hideDelay}set hideDelay(e){this._hideDelay=Ps(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,d,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 Re,this._scrollStrategy=d,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(Ve(this._destroyed)).subscribe(()=>{this._overlayRef&&this._updatePosition(this._overlayRef)})}ngAfterViewInit(){this._viewInitialized=!0,this._setupPointerEnterEventsIfNeeded(),this._focusMonitor.monitor(this._elementRef).pipe(Ve(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,OV)}),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 Lh(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(Ve(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 gt)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(Ve(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}-${PV}`,scrollStrategy:this._scrollStrategy()}),this._updatePosition(this._overlayRef),this._overlayRef.detachments().pipe(Ve(this._destroyed)).subscribe(()=>this._detach()),this._overlayRef.outsidePointerEvents().pipe(Ve(this._destroyed)).subscribe(()=>this._tooltipInstance?._handleBodyInteraction()),this._overlayRef.keydownEvents().pipe(Ve(this._destroyed)).subscribe(s=>{this._isTooltipVisible()&&27===s.keyCode&&!Zo(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(Oi(1),Ve(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}-${PV}-`;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,OV)})}_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){wo()},i.\u0275dir=ve({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})(),Fs=(()=>{class i extends BJ{constructor(e,n,r,s,o,a,l,c,d,h,p,m){super(e,n,r,s,o,a,l,c,d,h,p,m),this._tooltipComponent=VJ,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)(E(as),E(gt),E(qy),E(jr),E(pt),E(zi),E(HZ),E(Xc),E(kV),E(Ra,8),E(kJ,8),E(jt))},i.\u0275dir=ve({type:i,selectors:[["","matTooltip",""]],hostAttrs:[1,"mat-mdc-tooltip-trigger"],exportAs:["matTooltip"],features:[lt]}),i})(),UJ=(()=>{class i{constructor(e,n){this._changeDetectorRef=e,this._closeOnInteraction=!1,this._isVisible=!1,this._onHide=new Re,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)(E(Zn),E(kr,8))},i.\u0275dir=ve({type:i}),i})(),VJ=(()=>{class i extends UJ{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)(E(Zn),E(gt),E(kr,8))},i.\u0275cmp=ot({type:i,selectors:[["mat-tooltip-component"]],viewQuery:function(e,n){if(1&e&&Wn(AJ,7),2&e){let r;Et(r=At())&&(n._tooltip=r.first)}},hostAttrs:["aria-hidden","true"],hostVars:2,hostBindings:function(e,n){1&e&&Le("mouseleave",function(s){return n._handleMouseLeave(s)}),2&e&&qo("zoom",n.isVisible()?1:null)},features:[lt],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&&(W(0,"div",0,1),Le("animationend",function(s){return n._handleAnimationEnd(s)}),W(2,"div",2),ze(3),j()()),2&e&&(un("mdc-tooltip--multiline",n._isMultiline),U("ngClass",n.tooltipClass),G(3),_i(n.message))},dependencies:[hm],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})(),FV=(()=>{class i{}return i.\u0275fac=function(e){return new(e||i)},i.\u0275mod=nn({type:i}),i.\u0275inj=Kt({providers:[IJ],imports:[BU,Ao,Pm,Qn,Qn,Xy]}),i})();function LV(...i){const t=w0(i),{args:e,keys:n}=VB(i),r=new In(s=>{const{length:o}=e;if(!o)return void s.complete();const a=new Array(o);let l=o,c=o;for(let d=0;d{h||(h=!0,c--),a[d]=p},()=>l--,void 0,()=>{(!l||!h)&&(c||s.next(n?zB(n,a):a),s.complete())}))}});return t?r.pipe(JT(t)):r}class uR{}class uu{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 uu?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 uu;return e.lazyInit=this.lazyInit&&this.lazyInit instanceof uu?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 zJ{encodeKey(t){return BV(t)}encodeValue(t){return BV(t)}decodeKey(t){return decodeURIComponent(t)}decodeValue(t){return decodeURIComponent(t)}}const GJ=/%(\d[a-f0-9])/gi,$J={40:"@","3A":":",24:"$","2C":",","3B":";","3D":"=","3F":"?","2F":"/"};function BV(i){return encodeURIComponent(i).replace(GJ,(t,e)=>$J[e]??t)}function QM(i){return`${i}`}class hu{constructor(t={}){if(this.updates=null,this.cloneFrom=null,this.encoder=t.encoder||new zJ,t.fromString){if(t.fromObject)throw new Error("Cannot specify both fromString and fromObject.");this.map=function HJ(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 hu({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 WJ{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 UV(i){return typeof ArrayBuffer<"u"&&i instanceof ArrayBuffer}function VV(i){return typeof Blob<"u"&&i instanceof Blob}function zV(i){return typeof FormData<"u"&&i instanceof FormData}class rb{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 jJ(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 uu),this.context||(this.context=new WJ),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 rb(e,n,s,{params:c,headers:l,context:d,reportProgress:a,responseType:r,withCredentials:o})}}var ls=(()=>((ls=ls||{})[ls.Sent=0]="Sent",ls[ls.UploadProgress=1]="UploadProgress",ls[ls.ResponseHeader=2]="ResponseHeader",ls[ls.DownloadProgress=3]="DownloadProgress",ls[ls.Response=4]="Response",ls[ls.User=5]="User",ls))();class qJ{constructor(t,e=200,n="OK"){this.headers=t.headers||new uu,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 hR extends qJ{constructor(t={}){super(t),this.type=ls.Response,this.body=void 0!==t.body?t.body:null}clone(t={}){return new hR({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 fR(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 pR=(()=>{class i{constructor(e){this.handler=e}request(e,n,r={}){let s;if(e instanceof rb)s=e;else{let l,c;l=r.headers instanceof uu?r.headers:new uu(r.headers),r.params&&(c=r.params instanceof hu?r.params:new hu({fromObject:r.params})),s=new rb(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=ft(s).pipe(ru(l=>this.handler.handle(l)));if(e instanceof rb||"events"===r.observe)return o;const a=o.pipe(gn(l=>l instanceof hR));switch(r.observe||"body"){case"body":switch(s.responseType){case"arraybuffer":return a.pipe(et(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(et(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(et(l=>{if(null!==l.body&&"string"!=typeof l.body)throw new Error("Response is not a string.");return l.body}));default:return a.pipe(et(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 hu).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,fR(r,n))}post(e,n,r={}){return this.request("POST",e,fR(r,n))}put(e,n,r={}){return this.request("PUT",e,fR(r,n))}}return i.\u0275fac=function(e){return new(e||i)(ee(uR))},i.\u0275prov=ke({token:i,factory:i.\u0275fac}),i})();const aee=["*"];let eC;function sb(i){return function lee(){if(void 0===eC&&(eC=null,typeof window<"u")){const i=window;void 0!==i.trustedTypes&&(eC=i.trustedTypes.createPolicy("angular#components",{createHTML:t=>t}))}return eC}()?.createHTML(i)||i}function XV(i){return Error(`Unable to find icon with the name "${i}"`)}function KV(i){return Error(`The URL provided to MatIconRegistry was not trusted as a resource URL via Angular's DomSanitizer. Attempted URL was "${i}".`)}function ZV(i){return Error(`The literal provided to MatIconRegistry was not trusted as safe HTML by Angular's DomSanitizer. Attempted literal was "${i}".`)}class Vh{constructor(t,e,n){this.url=t,this.svgText=e,this.options=n}}let tC=(()=>{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 Vh(r,null,s))}addSvgIconResolver(e){return this._resolvers.push(e),this}addSvgIconLiteralInNamespace(e,n,r,s){const o=this._sanitizer.sanitize(Kn.HTML,r);if(!o)throw ZV(r);const a=sb(o);return this._addSvgIconConfig(e,n,new Vh("",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 Vh(n,null,r))}addSvgIconSetLiteralInNamespace(e,n,r){const s=this._sanitizer.sanitize(Kn.HTML,n);if(!s)throw ZV(n);const o=sb(s);return this._addSvgIconSetConfig(e,new Vh("",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(Kn.RESOURCE_URL,e);if(!n)throw KV(e);const r=this._cachedIconsByUrl.get(n);return r?ft(nC(r)):this._loadSvgIconFromConfig(new Vh(e,null)).pipe(Vi(s=>this._cachedIconsByUrl.set(n,s)),et(s=>nC(s)))}getNamedSvgIcon(e,n=""){const r=QV(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(XV(r))}ngOnDestroy(){this._resolvers=[],this._svgIconConfigs.clear(),this._iconSetConfigs.clear(),this._cachedIconsByUrl.clear()}_getSvgFromConfig(e){return e.svgText?ft(nC(this._svgElementFromConfig(e))):this._loadSvgIconFromConfig(e).pipe(et(n=>nC(n)))}_getSvgFromIconSetConfigs(e,n){const r=this._extractIconWithNameFromAnySet(e,n);return r?ft(r):LV(n.filter(o=>!o.svgText).map(o=>this._loadSvgIconSetFromConfig(o).pipe(jc(a=>{const c=`Loading icon set URL: ${this._sanitizer.sanitize(Kn.RESOURCE_URL,o.url)} failed: ${a.message}`;return this._errorHandler.handleError(new Error(c)),ft(null)})))).pipe(et(()=>{const o=this._extractIconWithNameFromAnySet(e,n);if(!o)throw XV(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(Vi(n=>e.svgText=n),et(()=>this._svgElementFromConfig(e)))}_loadSvgIconSetFromConfig(e){return e.svgText?ft(null):this._fetchIcon(e).pipe(Vi(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(sb(""));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(sb("")),r=e.attributes;for(let s=0;ssb(c)),su(()=>this._inProgressUrlFetches.delete(o)),Uf());return this._inProgressUrlFetches.set(o,l),l}_addSvgIconConfig(e,n,r){return this._svgIconConfigs.set(QV(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:""}}}),JV=["clip-path","color-profile","src","cursor","fill","filter","marker","marker-start","marker-mid","marker-end","mask","stroke"],gee=JV.map(i=>`[${i}]`).join(", "),_ee=/^url\(['"]?#(.*?)['"]?\)$/;let gR=(()=>{class i extends hee{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=Zt.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(gee),r=this._elementsWithExternalReferences=this._elementsWithExternalReferences||new Map;for(let s=0;s{const a=n[s],l=a.getAttribute(o),c=l?l.match(_ee):null;if(c){let d=r.get(a);d||(d=[],r.set(a,d)),d.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(Oi(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)(E(gt),E(tC),xa("aria-hidden"),E(pee),E(al),E(fee,8))},i.\u0275cmp=ot({type:i,selectors:[["mat-icon"]],hostAttrs:["role","img",1,"mat-icon","notranslate"],hostVars:8,hostBindings:function(e,n){2&e&&(Dt("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),un("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:[lt],ngContentSelectors:aee,decls:1,vars:0,template:function(e,n){1&e&&(or(),Wt(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})(),ez=(()=>{class i{}return i.\u0275fac=function(e){return new(e||i)},i.\u0275mod=nn({type:i}),i.\u0275inj=Kt({imports:[Qn,Qn]}),i})(),tz=(()=>{class i{constructor(e){this.viewContainerRef=e}}return i.\u0275fac=function(e){return new(e||i)(E(jr))},i.\u0275dir=ve({type:i,selectors:[["","dataBlockUI",""]]}),i})(),vee=(()=>{class i{constructor(){this.resource=null,this.name="",this.resourceDescription="",this.changed=new $e}}return i.\u0275fac=function(e){return new(e||i)},i.\u0275cmp=ot({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&&(W(0,"p",0),ze(1),j()),2&e&&(U("matTooltip",n.resourceDescription),G(1),tm("",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:[Fs],changeDetection:0}),i})();function yee(i,t){if(1&i&&(W(0,"h2",4),ze(1),j()),2&i){const e=he();U("matTooltip",e.resourceDescription),G(1),_i(e.name)}}function bee(i,t){1&i&&Pe(0,"app-block-actions",5),2&i&&U("resource",he().resource)}const xee=function(i,t,e,n){return{id:i,name:t,data:e,schema:n}};function wee(i,t){if(1&i&&Pe(0,"app-editor",7),2&i){const e=he().$implicit,n=he();U("resource",L2(3,xee,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 Mee(i,t){if(1&i&&($r(0),fe(1,wee,1,8,"app-editor",6),Ct(2,"async"),Wr()),2&i){const e=t.$implicit,n=he();G(1),U("ngIf",!(Tt(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 ec=(()=>{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 $e,this.destroyed$=new Re}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(Ve(this.destroyed$),gn(([n,r])=>!!this.resource&&n.startsWith(this.resource.id)&&!n.substring(this.resource.id.length+1).includes("/"))).subscribe(function(){var n=tt(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)(E(Pa))},i.\u0275cmp=ot({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&&(fe(0,yee,2,2,"h2",0),Ct(1,"async"),fe(2,bee,1,1,"app-block-actions",1),W(3,"div",2),fe(4,Mee,3,3,"ng-container",3),j()),2&e){let r;U("ngIf",n.name&&n.name!=(null==(r=Tt(1,4,n.main.resource$))?null:r.name)),G(2),U("ngIf",!n.hideBlockActions),G(2),U("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})(),nz=(()=>{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)(E(ol),E(gt))},i.\u0275dir=ve({type:i}),i})(),zh=(()=>{class i extends nz{}return i.\u0275fac=function(){let t;return function(n){return(t||(t=ri(i)))(n||i)}}(),i.\u0275dir=ve({type:i,features:[lt]}),i})();const Io=new me("NgValueAccessor"),See={provide:Io,useExisting:Gn(()=>gl),multi:!0},Aee=new me("CompositionEventMode");let gl=(()=>{class i extends nz{constructor(e,n,r){super(e,n),this._compositionMode=r,this._composing=!1,null==this._compositionMode&&(this._compositionMode=!function Eee(){const i=Gc()?Gc().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)(E(ol),E(gt),E(Aee,8))},i.\u0275dir=ve({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&&Le("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:[Dn([See]),lt]}),i})();const Dee=!1;function fu(i){return null==i||("string"==typeof i||Array.isArray(i))&&0===i.length}function rz(i){return null!=i&&"number"==typeof i.length}const qr=new me("NgValidators"),pu=new me("NgAsyncValidators"),Tee=/^(?=.{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 _l{static min(t){return sz(t)}static max(t){return oz(t)}static required(t){return function az(i){return fu(i.value)?{required:!0}:null}(t)}static requiredTrue(t){return function lz(i){return!0===i.value?null:{required:!0}}(t)}static email(t){return function cz(i){return fu(i.value)||Tee.test(i.value)?null:{email:!0}}(t)}static minLength(t){return dz(t)}static maxLength(t){return uz(t)}static pattern(t){return function hz(i){if(!i)return iC;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(fu(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 vz(t)}static composeAsync(t){return yz(t)}}function sz(i){return t=>{if(fu(t.value)||fu(i))return null;const e=parseFloat(t.value);return!isNaN(e)&&e{if(fu(t.value)||fu(i))return null;const e=parseFloat(t.value);return!isNaN(e)&&e>i?{max:{max:i,actual:t.value}}:null}}function dz(i){return t=>fu(t.value)||!rz(t.value)?null:t.value.lengthrz(t.value)&&t.value.length>i?{maxlength:{requiredLength:i,actualLength:t.value.length}}:null}function iC(i){return null}function fz(i){return null!=i}function pz(i){const t=oy(i)?Ni(i):i;if(Dee&&!L1(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 pe(-1101,e)}return t}function mz(i){let t={};return i.forEach(e=>{t=null!=e?{...t,...e}:t}),0===Object.keys(t).length?null:t}function gz(i,t){return t.map(e=>e(i))}function _z(i){return i.map(t=>function Iee(i){return!i.validate}(t)?t:e=>t.validate(e))}function vz(i){if(!i)return null;const t=i.filter(fz);return 0==t.length?null:function(e){return mz(gz(e,t))}}function _R(i){return null!=i?vz(_z(i)):null}function yz(i){if(!i)return null;const t=i.filter(fz);return 0==t.length?null:function(e){return LV(gz(e,t).map(pz)).pipe(et(mz))}}function vR(i){return null!=i?yz(_z(i)):null}function bz(i,t){return null===i?[t]:Array.isArray(i)?[...i,t]:[i,t]}function xz(i){return i._rawValidators}function wz(i){return i._rawAsyncValidators}function yR(i){return i?Array.isArray(i)?i:[i]:[]}function rC(i,t){return Array.isArray(i)?i.includes(t):i===t}function Mz(i,t){const e=yR(t);return yR(i).forEach(r=>{rC(e,r)||e.push(r)}),e}function Cz(i,t){return yR(t).filter(e=>!rC(i,e))}class Sz{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=_R(this._rawValidators)}_setAsyncValidators(t){this._rawAsyncValidators=t||[],this._composedAsyncValidatorFn=vR(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 lo extends Sz{get formDirective(){return null}get path(){return null}}class tc extends Sz{constructor(){super(...arguments),this._parent=null,this.name=null,this.valueAccessor=null}}class Ez{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 nc=(()=>{class i extends Ez{constructor(e){super(e)}}return i.\u0275fac=function(e){return new(e||i)(E(tc,2))},i.\u0275dir=ve({type:i,selectors:[["","formControlName",""],["","ngModel",""],["","formControl",""]],hostVars:14,hostBindings:function(e,n){2&e&&un("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:[lt]}),i})(),bR=(()=>{class i extends Ez{constructor(e){super(e)}}return i.\u0275fac=function(e){return new(e||i)(E(lo,10))},i.\u0275dir=ve({type:i,selectors:[["","formGroupName",""],["","formArrayName",""],["","ngModelGroup",""],["","formGroup",""],["form",3,"ngNoForm",""],["","ngForm",""]],hostVars:16,hostBindings:function(e,n){2&e&&un("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:[lt]}),i})();function Az(i,t){return i?`with name: '${t}'`:`at index: ${t}`}const MR=!1,ob="VALID",oC="INVALID",zm="PENDING",ab="DISABLED";function CR(i){return(aC(i)?i.validators:i)||null}function SR(i,t){return(aC(t)?t.asyncValidators:i)||null}function aC(i){return null!=i&&!Array.isArray(i)&&"object"==typeof i}function Dz(i,t,e){const n=i.controls;if(!(t?Object.keys(n):n).length)throw new pe(1e3,MR?function Oee(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 pe(1001,MR?function Fee(i,t){return`Cannot find form control ${Az(i,t)}`}(t,e):"")}function Tz(i,t,e){i._forEachChild((n,r)=>{if(void 0===e[r])throw new pe(1002,MR?function Lee(i,t){return`Must supply a value for form control ${Az(i,t)}`}(t,r):"")})}class lC{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===ob}get invalid(){return this.status===oC}get pending(){return this.status==zm}get disabled(){return this.status===ab}get enabled(){return this.status!==ab}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(Mz(t,this._rawValidators))}addAsyncValidators(t){this.setAsyncValidators(Mz(t,this._rawAsyncValidators))}removeValidators(t){this.setValidators(Cz(t,this._rawValidators))}removeAsyncValidators(t){this.setAsyncValidators(Cz(t,this._rawAsyncValidators))}hasValidator(t){return rC(this._rawValidators,t)}hasAsyncValidator(t){return rC(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=ab,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=ob,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===ob||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()?ab:ob}_runValidator(){return this.validator?this.validator(this):null}_runAsyncValidator(t){if(this.asyncValidator){this.status=zm,this._hasOwnPendingAsyncValidator=!0;const e=pz(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 $e,this.statusChanges=new $e}_calculateStatus(){return this._allControlsDisabled()?ab:this.errors?oC:this._hasOwnPendingAsyncValidator||this._anyControlsHaveStatus(zm)?zm:this._anyControlsHaveStatus(oC)?oC:ob}_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){aC(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 Nee(i){return Array.isArray(i)?_R(i):i||null}(this._rawValidators)}_assignAsyncValidators(t){this._rawAsyncValidators=Array.isArray(t)?t.slice():t,this._composedAsyncValidatorFn=function Bee(i){return Array.isArray(i)?vR(i):i||null}(this._rawAsyncValidators)}}class Hm extends lC{constructor(t,e,n){super(CR(e),SR(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={}){Tz(this,!0,t),Object.keys(t).forEach(n=>{Dz(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 Iz extends Hm{}const Hh=new me("CallSetDisabledState",{providedIn:"root",factory:()=>lb}),lb="always";function cC(i,t){return[...t.path,i]}function cb(i,t,e=lb){ER(i,t),t.valueAccessor.writeValue(i.value),(i.disabled||"always"===e)&&t.valueAccessor.setDisabledState?.(i.disabled),function Vee(i,t){t.valueAccessor.registerOnChange(e=>{i._pendingValue=e,i._pendingChange=!0,i._pendingDirty=!0,"change"===i.updateOn&&Rz(i,t)})}(i,t),function Hee(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 zee(i,t){t.valueAccessor.registerOnTouched(()=>{i._pendingTouched=!0,"blur"===i.updateOn&&i._pendingChange&&Rz(i,t),"submit"!==i.updateOn&&i.markAsTouched()})}(i,t),function Uee(i,t){if(t.valueAccessor.setDisabledState){const e=n=>{t.valueAccessor.setDisabledState(n)};i.registerOnDisabledChange(e),t._registerOnDestroy(()=>{i._unregisterOnDisabledChange(e)})}}(i,t)}function dC(i,t,e=!0){const n=()=>{};t.valueAccessor&&(t.valueAccessor.registerOnChange(n),t.valueAccessor.registerOnTouched(n)),hC(i,t),i&&(t._invokeOnDestroyCallbacks(),i._registerOnCollectionChange(()=>{}))}function uC(i,t){i.forEach(e=>{e.registerOnValidatorChange&&e.registerOnValidatorChange(t)})}function ER(i,t){const e=xz(i);null!==t.validator?i.setValidators(bz(e,t.validator)):"function"==typeof e&&i.setValidators([e]);const n=wz(i);null!==t.asyncValidator?i.setAsyncValidators(bz(n,t.asyncValidator)):"function"==typeof n&&i.setAsyncValidators([n]);const r=()=>i.updateValueAndValidity();uC(t._rawValidators,r),uC(t._rawAsyncValidators,r)}function hC(i,t){let e=!1;if(null!==i){if(null!==t.validator){const r=xz(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=wz(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 uC(t._rawValidators,n),uC(t._rawAsyncValidators,n),e}function Rz(i,t){i._pendingDirty&&i.markAsDirty(),i.setValue(i._pendingValue,{emitModelToViewChange:!1}),t.viewToModelUpdate(i._pendingValue),i._pendingChange=!1}function kz(i,t){ER(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 Pz(i,t){i._syncPendingControls(),t.forEach(e=>{const n=e.control;"submit"===n.updateOn&&n._pendingChange&&(e.viewToModelUpdate(n._pendingValue),n._pendingChange=!1)})}function TR(i,t){if(!t)return null;let e,n,r;return Array.isArray(t),t.forEach(s=>{s.constructor===gl?e=s:function Wee(i){return Object.getPrototypeOf(i.constructor)===zh}(s)?n=s:r=s}),r||n||e||null}const Yee={provide:lo,useExisting:Gn(()=>ub)},db=(()=>Promise.resolve())();let ub=(()=>{class i extends lo{constructor(e,n,r){super(),this.callSetDisabledState=r,this.submitted=!1,this._directives=new Set,this.ngSubmit=new $e,this.form=new Hm({},_R(e),vR(n))}ngAfterViewInit(){this._setUpdateStrategy()}get formDirective(){return this}get control(){return this.form}get path(){return[]}get controls(){return this.form.controls}addControl(e){db.then(()=>{const n=this._findContainer(e.path);e.control=n.registerControl(e.name,e.control),cb(e.control,e,this.callSetDisabledState),e.control.updateValueAndValidity({emitEvent:!1}),this._directives.add(e)})}getControl(e){return this.form.get(e.path)}removeControl(e){db.then(()=>{const n=this._findContainer(e.path);n&&n.removeControl(e.name),this._directives.delete(e)})}addFormGroup(e){db.then(()=>{const n=this._findContainer(e.path),r=new Hm({});kz(r,e),n.registerControl(e.name,r),r.updateValueAndValidity({emitEvent:!1})})}removeFormGroup(e){db.then(()=>{const n=this._findContainer(e.path);n&&n.removeControl(e.name)})}getFormGroup(e){return this.form.get(e.path)}updateModel(e,n){db.then(()=>{this.form.get(e.path).setValue(n)})}setValue(e){this.control.setValue(e)}onSubmit(e){return this.submitted=!0,Pz(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)(E(qr,10),E(pu,10),E(Hh,8))},i.\u0275dir=ve({type:i,selectors:[["form",3,"ngNoForm","",3,"formGroup",""],["ng-form"],["","ngForm",""]],hostBindings:function(e,n){1&e&&Le("submit",function(s){return n.onSubmit(s)})("reset",function(){return n.onReset()})},inputs:{options:["ngFormOptions","options"]},outputs:{ngSubmit:"ngSubmit"},exportAs:["ngForm"],features:[Dn([Yee]),lt]}),i})();function Oz(i,t){const e=i.indexOf(t);e>-1&&i.splice(e,1)}function Fz(i){return"object"==typeof i&&null!==i&&2===Object.keys(i).length&&"value"in i&&"disabled"in i}const ic=class extends lC{constructor(t=null,e,n){super(CR(e),SR(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}),aC(e)&&(e.nonNullable||e.initialValueIsDefault)&&(this.defaultValue=Fz(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){Oz(this._onChange,t)}registerOnDisabledChange(t){this._onDisabledChange.push(t)}_unregisterOnDisabledChange(t){Oz(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){Fz(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}},Kee={provide:tc,useExisting:Gn(()=>Zc)},Bz=(()=>Promise.resolve())();let Zc=(()=>{class i extends tc{constructor(e,n,r,s,o,a){super(),this._changeDetectorRef=o,this.callSetDisabledState=a,this.control=new ic,this._registered=!1,this.update=new $e,this._parent=e,this._setValidators(n),this._setAsyncValidators(r),this.valueAccessor=TR(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(){cb(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){Bz.then(()=>{this.control.setValue(e,{emitViewToModelChange:!1}),this._changeDetectorRef?.markForCheck()})}_updateDisabled(e){const n=e.isDisabled.currentValue,r=0!==n&&function um(i){return"boolean"==typeof i?i:null!=i&&"false"!==i}(n);Bz.then(()=>{r&&!this.control.disabled?this.control.disable():!r&&this.control.disabled&&this.control.enable(),this._changeDetectorRef?.markForCheck()})}_getPath(e){return this._parent?cC(e,this._parent):[e]}}return i.\u0275fac=function(e){return new(e||i)(E(lo,9),E(qr,10),E(pu,10),E(Io,10),E(Zn,8),E(Hh,8))},i.\u0275dir=ve({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:[Dn([Kee]),lt,xi]}),i})(),IR=(()=>{class i{}return i.\u0275fac=function(e){return new(e||i)},i.\u0275dir=ve({type:i,selectors:[["form",3,"ngNoForm","",3,"ngNativeValidate",""]],hostAttrs:["novalidate",""]}),i})();const Zee={provide:Io,useExisting:Gn(()=>mu),multi:!0};let mu=(()=>{class i extends zh{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=ri(i)))(n||i)}}(),i.\u0275dir=ve({type:i,selectors:[["input","type","number","formControlName",""],["input","type","number","formControl",""],["input","type","number","ngModel",""]],hostBindings:function(e,n){1&e&&Le("input",function(s){return n.onChange(s.target.value)})("blur",function(){return n.onTouched()})},features:[Dn([Zee]),lt]}),i})(),Uz=(()=>{class i{}return i.\u0275fac=function(e){return new(e||i)},i.\u0275mod=nn({type:i}),i.\u0275inj=Kt({}),i})();const RR=new me("NgModelWithFormControlWarning"),nte={provide:lo,useExisting:Gn(()=>Gh)};let Gh=(()=>{class i extends lo{constructor(e,n,r){super(),this.callSetDisabledState=r,this.submitted=!1,this._onCollectionChange=()=>this._updateDomValue(),this.directives=[],this.form=null,this.ngSubmit=new $e,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&&(hC(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 cb(n,e,this.callSetDisabledState),n.updateValueAndValidity({emitEvent:!1}),this.directives.push(e),n}getControl(e){return this.form.get(e.path)}removeControl(e){dC(e.control||null,e,!1),function jee(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,Pz(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&&(dC(n||null,e),(i=>i instanceof ic)(r)&&(cb(r,e,this.callSetDisabledState),e.control=r))}),this.form._updateTreeValidity({emitEvent:!1})}_setUpFormContainer(e){const n=this.form.get(e.path);kz(n,e),n.updateValueAndValidity({emitEvent:!1})}_cleanUpFormContainer(e){if(this.form){const n=this.form.get(e.path);n&&function Gee(i,t){return hC(i,t)}(n,e)&&n.updateValueAndValidity({emitEvent:!1})}}_updateRegistrations(){this.form._registerOnCollectionChange(this._onCollectionChange),this._oldForm&&this._oldForm._registerOnCollectionChange(()=>{})}_updateValidators(){ER(this.form,this),this._oldForm&&hC(this._oldForm,this)}_checkFormPresent(){}}return i.\u0275fac=function(e){return new(e||i)(E(qr,10),E(pu,10),E(Hh,8))},i.\u0275dir=ve({type:i,selectors:[["","formGroup",""]],hostBindings:function(e,n){1&e&&Le("submit",function(s){return n.onSubmit(s)})("reset",function(){return n.onReset()})},inputs:{form:["formGroup","form"]},outputs:{ngSubmit:"ngSubmit"},exportAs:["ngForm"],features:[Dn([nte]),lt,xi]}),i})();const ste={provide:tc,useExisting:Gn(()=>fC)};let fC=(()=>{class i extends tc{set isDisabled(e){}constructor(e,n,r,s,o){super(),this._ngModelWarningConfig=o,this._added=!1,this.update=new $e,this._ngModelWarningSent=!1,this._parent=e,this._setValidators(n),this._setAsyncValidators(r),this.valueAccessor=TR(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 cC(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)(E(lo,13),E(qr,10),E(pu,10),E(Io,10),E(RR,8))},i.\u0275dir=ve({type:i,selectors:[["","formControlName",""]],inputs:{name:["formControlName","name"],isDisabled:["disabled","isDisabled"],model:["ngModel","model"]},outputs:{update:"ngModelChange"},features:[Dn([ste]),lt,xi]}),i})();function jz(i){return"number"==typeof i?i:parseInt(i,10)}function Yz(i){return"number"==typeof i?i:parseFloat(i)}let $h=(()=>{class i{constructor(){this._validator=iC}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):iC,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=ve({type:i,features:[xi]}),i})();const hte={provide:qr,useExisting:Gn(()=>gu),multi:!0};let gu=(()=>{class i extends $h{constructor(){super(...arguments),this.inputName="max",this.normalizeInput=e=>Yz(e),this.createValidator=e=>oz(e)}}return i.\u0275fac=function(){let t;return function(n){return(t||(t=ri(i)))(n||i)}}(),i.\u0275dir=ve({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&&Dt("max",n._enabled?n.max:null)},inputs:{max:"max"},features:[Dn([hte]),lt]}),i})();const fte={provide:qr,useExisting:Gn(()=>_u),multi:!0};let _u=(()=>{class i extends $h{constructor(){super(...arguments),this.inputName="min",this.normalizeInput=e=>Yz(e),this.createValidator=e=>sz(e)}}return i.\u0275fac=function(){let t;return function(n){return(t||(t=ri(i)))(n||i)}}(),i.\u0275dir=ve({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&&Dt("min",n._enabled?n.min:null)},inputs:{min:"min"},features:[Dn([fte]),lt]}),i})();const _te={provide:qr,useExisting:Gn(()=>NR),multi:!0};let NR=(()=>{class i extends $h{constructor(){super(...arguments),this.inputName="minlength",this.normalizeInput=e=>jz(e),this.createValidator=e=>dz(e)}}return i.\u0275fac=function(){let t;return function(n){return(t||(t=ri(i)))(n||i)}}(),i.\u0275dir=ve({type:i,selectors:[["","minlength","","formControlName",""],["","minlength","","formControl",""],["","minlength","","ngModel",""]],hostVars:1,hostBindings:function(e,n){2&e&&Dt("minlength",n._enabled?n.minlength:null)},inputs:{minlength:"minlength"},features:[Dn([_te]),lt]}),i})();const vte={provide:qr,useExisting:Gn(()=>BR),multi:!0};let BR=(()=>{class i extends $h{constructor(){super(...arguments),this.inputName="maxlength",this.normalizeInput=e=>jz(e),this.createValidator=e=>uz(e)}}return i.\u0275fac=function(){let t;return function(n){return(t||(t=ri(i)))(n||i)}}(),i.\u0275dir=ve({type:i,selectors:[["","maxlength","","formControlName",""],["","maxlength","","formControl",""],["","maxlength","","ngModel",""]],hostVars:1,hostBindings:function(e,n){2&e&&Dt("maxlength",n._enabled?n.maxlength:null)},inputs:{maxlength:"maxlength"},features:[Dn([vte]),lt]}),i})(),Zz=(()=>{class i{}return i.\u0275fac=function(e){return new(e||i)},i.\u0275mod=nn({type:i}),i.\u0275inj=Kt({imports:[Uz]}),i})();class Qz extends lC{constructor(t,e,n){super(CR(e),SR(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={}){Tz(this,!1,t),t.forEach((n,r)=>{Dz(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 Jz(i){return!!i&&(void 0!==i.asyncValidators||void 0!==i.validators||void 0!==i.updateOn)}let bte=(()=>{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 Jz(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 Iz(r,n)}control(e,n,r){let s={};return this.useNonNullable?(Jz(n)?s=n:(s.validators=n,s.asyncValidators=r),new ic(e,{...s,nonNullable:!0})):new ic(e,n,r)}array(e,n,r){const s=e.map(o=>this._createControl(o));return new Qz(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 ic||e instanceof lC?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=ke({token:i,factory:i.\u0275fac,providedIn:"root"}),i})(),eH=(()=>{class i{static withConfig(e){return{ngModule:i,providers:[{provide:Hh,useValue:e.callSetDisabledState??lb}]}}}return i.\u0275fac=function(e){return new(e||i)},i.\u0275mod=nn({type:i}),i.\u0275inj=Kt({imports:[Zz]}),i})(),tH=(()=>{class i{static withConfig(e){return{ngModule:i,providers:[{provide:RR,useValue:e.warnOnNgModelWithFormControl??"always"},{provide:Hh,useValue:e.callSetDisabledState??lb}]}}}return i.\u0275fac=function(e){return new(e||i)},i.\u0275mod=nn({type:i}),i.\u0275inj=Kt({imports:[Zz]}),i})();const xte=["matFormFieldNotchedOutline",""],wte=["*"],Mte=["textField"],Cte=["iconPrefixContainer"],Ste=["textPrefixContainer"];function Ete(i,t){1&i&&Pe(0,"span",19)}function Ate(i,t){if(1&i){const e=ai();W(0,"label",17),Le("cdkObserveContent",function(){return rn(e),Ut(he(2)._refreshOutlineNotchWidth())}),Wt(1,1),fe(2,Ete,1,0,"span",18),j()}if(2&i){const e=he(2);U("floating",e._shouldLabelFloat())("cdkObserveContentDisabled",!e._hasOutline())("id",e._labelId),Dt("for",e._control.id)("aria-owns",e._control.id),G(2),U("ngIf",!e.hideRequiredMarker&&e._control.required)}}function Dte(i,t){1&i&&fe(0,Ate,3,6,"label",16),2&i&&U("ngIf",he()._hasFloatingLabel())}function Tte(i,t){1&i&&Pe(0,"div",20)}function Ite(i,t){}function Rte(i,t){1&i&&fe(0,Ite,0,0,"ng-template",22),2&i&&(he(2),U("ngTemplateOutlet",Zi(1)))}function kte(i,t){if(1&i&&(W(0,"div",21),fe(1,Rte,1,1,"ng-template",9),j()),2&i){const e=he();U("matFormFieldNotchedOutlineOpen",e._shouldLabelFloat())("matFormFieldNotchedOutlineLabelWidth",e._labelWidth),G(1),U("ngIf",!e._forceDisplayInfixLabel())}}function Pte(i,t){1&i&&(W(0,"div",23,24),Wt(2,2),j())}function Ote(i,t){1&i&&(W(0,"div",25,26),Wt(2,3),j())}function Fte(i,t){}function Lte(i,t){1&i&&fe(0,Fte,0,0,"ng-template",22),2&i&&(he(),U("ngTemplateOutlet",Zi(1)))}function Nte(i,t){1&i&&(W(0,"div",27),Wt(1,4),j())}function Bte(i,t){1&i&&(W(0,"div",28),Wt(1,5),j())}function Ute(i,t){1&i&&Pe(0,"div",29)}function Vte(i,t){1&i&&(W(0,"div",30),Wt(1,6),j()),2&i&&U("@transitionMessages",he()._subscriptAnimationState)}function zte(i,t){if(1&i&&(W(0,"mat-hint",34),ze(1),j()),2&i){const e=he(2);U("id",e._hintLabelId),G(1),_i(e.hintLabel)}}function Hte(i,t){if(1&i&&(W(0,"div",31),fe(1,zte,2,2,"mat-hint",32),Wt(2,7),Pe(3,"div",33),Wt(4,8),j()),2&i){const e=he();U("@transitionMessages",e._subscriptAnimationState),G(1),U("ngIf",e.hintLabel)}}const Gte=["*",[["mat-label"]],[["","matPrefix",""],["","matIconPrefix",""]],[["","matTextPrefix",""]],[["","matTextSuffix",""]],[["","matSuffix",""],["","matIconSuffix",""]],[["mat-error"],["","matError",""]],[["mat-hint",3,"align","end"]],[["mat-hint","align","end"]]],$te=["*","mat-label","[matPrefix], [matIconPrefix]","[matTextPrefix]","[matTextSuffix]","[matSuffix], [matIconSuffix]","mat-error, [matError]","mat-hint:not([align='end'])","mat-hint[align='end']"];let Ro=(()=>{class i{}return i.\u0275fac=function(e){return new(e||i)},i.\u0275dir=ve({type:i,selectors:[["mat-label"]]}),i})(),Wte=0;const nH=new me("MatError");let jte=(()=>{class i{constructor(e,n){this.id="mat-mdc-error-"+Wte++,e||n.nativeElement.setAttribute("aria-live","polite")}}return i.\u0275fac=function(e){return new(e||i)(xa("aria-live"),E(gt))},i.\u0275dir=ve({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&&Yl("id",n.id)},inputs:{id:"id"},features:[Dn([{provide:nH,useExisting:i}])]}),i})(),Yte=0,iH=(()=>{class i{constructor(){this.align="start",this.id="mat-mdc-hint-"+Yte++}}return i.\u0275fac=function(e){return new(e||i)},i.\u0275dir=ve({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&&(Yl("id",n.id),Dt("align",null),un("mat-mdc-form-field-hint-end","end"===n.align))},inputs:{align:"align",id:"id"}}),i})();const rH=new me("MatPrefix");let qte=(()=>{class i{constructor(){this._isText=!1}set _isTextSelector(e){this._isText=!0}}return i.\u0275fac=function(e){return new(e||i)},i.\u0275dir=ve({type:i,selectors:[["","matPrefix",""],["","matIconPrefix",""],["","matTextPrefix",""]],inputs:{_isTextSelector:["matTextPrefix","_isTextSelector"]},features:[Dn([{provide:rH,useExisting:i}])]}),i})();const sH=new me("MatSuffix");let Xte=(()=>{class i{constructor(){this._isText=!1}set _isTextSelector(e){this._isText=!0}}return i.\u0275fac=function(e){return new(e||i)},i.\u0275dir=ve({type:i,selectors:[["","matSuffix",""],["","matIconSuffix",""],["","matTextSuffix",""]],inputs:{_isTextSelector:["matTextSuffix","_isTextSelector"]},features:[Dn([{provide:sH,useExisting:i}])]}),i})(),oH=(()=>{class i{constructor(e){this._elementRef=e,this.floating=!1}getWidth(){return function Kte(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)(E(gt))},i.\u0275dir=ve({type:i,selectors:[["label","matFormFieldFloatingLabel",""]],hostAttrs:[1,"mdc-floating-label","mat-mdc-floating-label"],hostVars:2,hostBindings:function(e,n){2&e&&un("mdc-floating-label--float-above",n.floating)},inputs:{floating:"floating"}}),i})();const aH="mdc-line-ripple--active",pC="mdc-line-ripple--deactivating";let lH=(()=>{class i{constructor(e,n){this._elementRef=e,this._handleTransitionEnd=r=>{const s=this._elementRef.nativeElement.classList,o=s.contains(pC);"opacity"===r.propertyName&&o&&s.remove(aH,pC)},n.runOutsideAngular(()=>{e.nativeElement.addEventListener("transitionend",this._handleTransitionEnd)})}activate(){const e=this._elementRef.nativeElement.classList;e.remove(pC),e.add(aH)}deactivate(){this._elementRef.nativeElement.classList.add(pC)}ngOnDestroy(){this._elementRef.nativeElement.removeEventListener("transitionend",this._handleTransitionEnd)}}return i.\u0275fac=function(e){return new(e||i)(E(gt),E(pt))},i.\u0275dir=ve({type:i,selectors:[["div","matFormFieldLineRipple",""]],hostAttrs:[1,"mdc-line-ripple"]}),i})(),cH=(()=>{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)(E(gt),E(pt))},i.\u0275cmp=ot({type:i,selectors:[["div","matFormFieldNotchedOutline",""]],hostAttrs:[1,"mdc-notched-outline"],hostVars:2,hostBindings:function(e,n){2&e&&un("mdc-notched-outline--notched",n.open)},inputs:{labelWidth:["matFormFieldNotchedOutlineLabelWidth","labelWidth"],open:["matFormFieldNotchedOutlineOpen","open"]},attrs:xte,ngContentSelectors:wte,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&&(or(),Pe(0,"div",0),W(1,"div",1),Wt(2),j(),Pe(3,"div",2)),2&e&&(G(1),qo("width",n._getNotchWidth()))},encapsulation:2,changeDetection:0}),i})();const Zte={transitionMessages:ka("transitionMessages",[Os("enter",si({opacity:1,transform:"translateY(0%)"})),Or("void => enter",[si({opacity:0,transform:"translateY(-5px)"}),Yr("300ms cubic-bezier(0.55, 0, 0.55, 0.2)")])])};let UR=(()=>{class i{}return i.\u0275fac=function(e){return new(e||i)},i.\u0275dir=ve({type:i}),i})();const mC=new me("MatFormField"),Qte=new me("MAT_FORM_FIELD_DEFAULT_OPTIONS");let dH=0,vl=(()=>{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-"+dH++,this._hintLabelId="mat-mdc-hint-"+dH++,this._subscriptAnimationState="",this._labelWidth=0,this._destroyed=new Re,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(Ve(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(),Cr(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(Ve(this._destroyed)).subscribe(()=>{this._needsOutlineLabelOffsetUpdateOnStable&&(this._needsOutlineLabelOffsetUpdateOnStable=!1,this._updateOutlineLabelOffset())})}),this._dir.change.pipe(Ve(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)(E(gt),E(Zn),E(pt),E(Ra),E(zi),E(Qte,8),E(kr,8),E(jt))},i.\u0275cmp=ot({type:i,selectors:[["mat-form-field"]],contentQueries:function(e,n,r){if(1&e&&(Wi(r,Ro,5),Wi(r,Ro,7),Wi(r,UR,5),Wi(r,rH,5),Wi(r,sH,5),Wi(r,nH,5),Wi(r,iH,5)),2&e){let s;Et(s=At())&&(n._labelChildNonStatic=s.first),Et(s=At())&&(n._labelChildStatic=s.first),Et(s=At())&&(n._formFieldControl=s.first),Et(s=At())&&(n._prefixChildren=s),Et(s=At())&&(n._suffixChildren=s),Et(s=At())&&(n._errorChildren=s),Et(s=At())&&(n._hintChildren=s)}},viewQuery:function(e,n){if(1&e&&(Wn(Mte,5),Wn(Cte,5),Wn(Ste,5),Wn(oH,5),Wn(cH,5),Wn(lH,5)),2&e){let r;Et(r=At())&&(n._textField=r.first),Et(r=At())&&(n._iconPrefixContainer=r.first),Et(r=At())&&(n._textPrefixContainer=r.first),Et(r=At())&&(n._floatingLabel=r.first),Et(r=At())&&(n._notchedOutline=r.first),Et(r=At())&&(n._lineRipple=r.first)}},hostAttrs:[1,"mat-mdc-form-field"],hostVars:42,hostBindings:function(e,n){2&e&&un("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:[Dn([{provide:mC,useExisting:i}])],ngContentSelectors:$te,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&&(or(Gte),fe(0,Dte,1,1,"ng-template",null,0,zc),W(2,"div",1,2),Le("click",function(s){return n._control.onContainerClick&&n._control.onContainerClick(s)}),fe(4,Tte,1,0,"div",3),W(5,"div",4),fe(6,kte,2,3,"div",5),fe(7,Pte,3,0,"div",6),fe(8,Ote,3,0,"div",7),W(9,"div",8),fe(10,Lte,1,1,"ng-template",9),Wt(11),j(),fe(12,Nte,2,0,"div",10),fe(13,Bte,2,0,"div",11),j(),fe(14,Ute,1,0,"div",12),j(),W(15,"div",13),fe(16,Vte,2,1,"div",14),fe(17,Hte,5,2,"div",15),j()),2&e&&(G(2),un("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),G(2),U("ngIf",!n._hasOutline()&&!n._control.disabled),G(2),U("ngIf",n._hasOutline()),G(1),U("ngIf",n._hasIconPrefix),G(1),U("ngIf",n._hasTextPrefix),G(2),U("ngIf",!n._hasOutline()||n._forceDisplayInfixLabel()),G(2),U("ngIf",n._hasTextSuffix),G(1),U("ngIf",n._hasIconSuffix),G(1),U("ngIf",!n._hasOutline()),G(1),un("mat-mdc-form-field-subscript-dynamic-size","dynamic"===n.subscriptSizing),U("ngSwitch",n._getDisplayedMessages()),G(1),U("ngSwitchCase","error"),G(1),U("ngSwitchCase","hint"))},dependencies:[vi,xy,by,VT,CU,iH,oH,cH,lH],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:[Zte.transitionMessages]},changeDetection:0}),i})(),gC=(()=>{class i{}return i.\u0275fac=function(e){return new(e||i)},i.\u0275mod=nn({type:i}),i.\u0275inj=Kt({imports:[Qn,Ao,HI,Qn]}),i})();const fH=Oh({passive:!0});let tne=(()=>{class i{constructor(e,n){this._platform=e,this._ngZone=n,this._monitoredElements=new Map}monitor(e){if(!this._platform.isBrowser)return mo;const n=qc(e),r=this._monitoredElements.get(n);if(r)return r.subject;const s=new Re,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,fH),n.classList.add("cdk-text-field-autofill-monitored")}),this._monitoredElements.set(n,{subject:s,unlisten:()=>{n.removeEventListener("animationstart",a,fH)}}),s}stopMonitoring(e){const n=qc(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)(ee(zi),ee(pt))},i.\u0275prov=ke({token:i,factory:i.\u0275fac,providedIn:"root"}),i})(),nne=(()=>{class i{}return i.\u0275fac=function(e){return new(e||i)},i.\u0275mod=nn({type:i}),i.\u0275inj=Kt({}),i})();const VR=new me("MAT_INPUT_VALUE_ACCESSOR"),ine=["button","checkbox","file","hidden","image","radio","range","reset","submit"];let rne=0;const sne=$U(class{constructor(i,t,e,n){this._defaultErrorStateMatcher=i,this._parentForm=t,this._parentFormGroup=e,this.ngControl=n,this.stateChanges=new Re}});let rc=(()=>{class i extends sne{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(_l.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&&oU().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,d,h){super(a,s,o,r),this._elementRef=e,this._platform=n,this._autofillMonitor=c,this._formField=h,this._uid="mat-input-"+rne++,this.focused=!1,this.stateChanges=new Re,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=>oU().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&&d.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(){ine.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)(E(gt),E(zi),E(tc,10),E(ub,8),E(Gh,8),E(jU),E(VR,10),E(tne),E(pt),E(mC,8))},i.\u0275dir=ve({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&&Le("focus",function(){return n._focusChanged(!0)})("blur",function(){return n._focusChanged(!1)})("input",function(){return n._onInput()}),2&e&&(Yl("id",n.id)("disabled",n.disabled)("required",n.required),Dt("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),un("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:[Dn([{provide:UR,useExisting:i}]),lt,xi]}),i})(),pH=(()=>{class i{}return i.\u0275fac=function(e){return new(e||i)},i.\u0275mod=nn({type:i}),i.\u0275inj=Kt({imports:[Qn,gC,gC,nne,Qn]}),i})();function one(i,t){if(1&i&&(W(0,"mat-label"),ze(1),j()),2&i){const e=he(2);G(1),_i(e.resource.name)}}function ane(i,t){if(1&i){const e=ai();W(0,"mat-form-field",1),fe(1,one,2,1,"mat-label",2),W(2,"input",3),Le("ngModelChange",function(r){return rn(e),Ut(he().resource.data=r)})("change",function(){return rn(e),Ut(he().changed.emit())}),j()()}if(2&i){const e=he();U("matTooltip",e.resourceDescription),G(1),U("ngIf",e.resource.name),G(1),U("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 lne=(()=>{class i{constructor(){this.resource=null,this.resourceDescription="",this.disabled=!1,this.changed=new $e}}return i.\u0275fac=function(e){return new(e||i)},i.\u0275cmp=ot({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&&fe(0,ane,3,7,"mat-form-field",0),2&e&&U("ngIf",n.resource)},dependencies:[vi,gl,mu,nc,_u,gu,Zc,vl,Ro,rc,Fs],changeDetection:0}),i})();function cne(i,t){if(1&i&&(W(0,"mat-label"),ze(1),j()),2&i){const e=he(2);G(1),_i(e.resource.name)}}function dne(i,t){if(1&i){const e=ai();W(0,"mat-form-field",1),fe(1,cne,2,1,"mat-label",2),W(2,"input",3),Le("ngModelChange",function(r){return rn(e),Ut(he().resource.data=r)})("change",function(){return rn(e),Ut(he().changed.emit())}),j()()}if(2&i){const e=he();U("matTooltip",e.resourceDescription),G(1),U("ngIf",e.resource.name),G(1),U("disabled",e.disabled||void 0!==e.resource.schema.required_value)("maxlength",e.maxLength)("minlength",e.minLength)("ngModel",e.resource.data)}}let mH=(()=>{class i{constructor(){this._resource=null,this.resourceDescription="",this.disabled=!1,this.changed=new $e,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=ot({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&&fe(0,dne,3,6,"mat-form-field",0),2&e&&U("ngIf",n.resource)},dependencies:[vi,gl,nc,NR,BR,Zc,vl,Ro,rc,Fs],changeDetection:0}),i})();const sc=(i,t)=>i+(i.includes("__")?"/":"__")+t,Wh=function(){return[]};function une(i,t){if(1&i&&(W(0,"mat-panel-description"),ze(1," Click to view items ("),W(2,"b"),ze(3),j(),ze(4,") "),j()),2&i){const e=he(2);G(3),_i((e.resourceData||Rs(1,Wh)).length)}}function hne(i,t){1&i&&(W(0,"mat-panel-description"),ze(1," Empty array "),j())}function fne(i,t){}function pne(i,t){if(1&i){const e=ai();W(0,"mat-expansion-panel",4),Le("opened",function(){return rn(e),Ut(he().onContentsTrigger(!0))})("closed",function(){return rn(e),Ut(he().onContentsTrigger(!1))}),W(1,"mat-expansion-panel-header",5)(2,"mat-panel-title"),ze(3),j(),fe(4,une,5,2,"mat-panel-description",1),fe(5,hne,2,0,"mat-panel-description",1),j(),fe(6,fne,0,0,"ng-template",6),j()}if(2&i){const e=he(),n=Zi(3);G(1),U("matTooltip",e.resourceDescription),G(2),Qi(" ",e.name," "),G(1),U("ngIf",(e.resourceData||Rs(5,Wh)).length>0),G(1),U("ngIf",0==(e.resourceData||Rs(6,Wh)).length),G(1),U("ngTemplateOutlet",n)}}function mne(i,t){}function gne(i,t){if(1&i&&($r(0),W(1,"h2",5),ze(2),j(),W(3,"div",7),fe(4,mne,0,0,"ng-template",6),j(),Wr()),2&i){const e=he(),n=Zi(3);G(1),U("matTooltip",e.resourceDescription),G(1),_i(e.name),G(2),U("ngTemplateOutlet",n)}}function _ne(i,t){}function vne(i,t){if(1&i&&Pe(0,"app-editor",10),2&i){const e=he().$implicit,n=he(3);U("resource",n.children[n.pageIndex*n.pageSize+e])("disabled",n.disabled)}}function yne(i,t){if(1&i&&($r(0),fe(1,vne,1,2,"app-editor",9),Wr()),2&i){const e=t.$implicit,n=he(3);G(1),U("ngIf",n.pageIndex*n.pageSize+e0)}let zR=(()=>{class i{constructor(e,n){this.main=e,this.cdr=n,this._resource=null,this.resourceDescription="",this.disabled=!1,this.changed=new $e,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 Re}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:sc(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(Ve(this.destroyed$),gn(([n,r])=>!!this.resource&&n.startsWith(this.resource.id)&&!n.substring(this.resource.id.length+1).includes("/"))).subscribe(function(){var n=tt(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 ut(null),this.imageUrl$=new ut(null),this.destroyed$=new Re,this.changed=new $e}set resource(e){this._resource$.next(e)}get resource(){return this._resource$.getValue()}ngAfterViewInit(){var e=this;return tt(function*(){e._resource$.pipe(Ve(e.destroyed$)).subscribe(function(){var n=tt(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)(E(Jl),E(Pa))},i.\u0275cmp=ot({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&&(Pe(0,"app-compound-block-ui",0),Ct(1,"async"),fe(2,Dne,2,3,"img",1),Ct(3,"async")),2&e&&(U("resource",Tt(1,3,n._resource$))("fieldBlacklist",Rs(7,Tne)),G(2),U("ngIf",Tt(3,5,n.imageUrl$)))},dependencies:[vi,ec,pl],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 Rne=["*"],Lne=new me("MAT_CARD_CONFIG");let gH=(()=>{class i{constructor(e){this.appearance=e?.appearance||"raised"}}return i.\u0275fac=function(e){return new(e||i)(E(Lne,8))},i.\u0275cmp=ot({type:i,selectors:[["mat-card"]],hostAttrs:[1,"mat-mdc-card","mdc-card"],hostVars:4,hostBindings:function(e,n){2&e&&un("mat-mdc-card-outlined","outlined"===n.appearance)("mdc-card--outlined","outlined"===n.appearance)},inputs:{appearance:"appearance"},exportAs:["matCard"],ngContentSelectors:Rne,decls:1,vars:0,template:function(e,n){1&e&&(or(),Wt(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})(),_H=(()=>{class i{}return i.\u0275fac=function(e){return new(e||i)},i.\u0275mod=nn({type:i}),i.\u0275inj=Kt({imports:[Qn,Ao,Qn]}),i})();class HR{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 Re,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 GR=(()=>{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=ke({token:i,factory:i.\u0275fac,providedIn:"root"}),i})(),aie=(()=>{class i{}return i.\u0275fac=function(e){return new(e||i)},i.\u0275mod=nn({type:i}),i.\u0275inj=Kt({imports:[Qn,Ao,eb,Qn]}),i})();const MH={transformPanel:ka("transformPanel",[Or("void => enter-dropdown",Yr("120ms cubic-bezier(0, 0, 0.2, 1)",rV([si({opacity:0,transform:"scale(1, 0.8)"}),si({opacity:1,transform:"scale(1, 1)"})]))),Or("void => enter-dialog",Yr("150ms cubic-bezier(0, 0, 0.2, 1)",rV([si({opacity:0,transform:"scale(0.7)"}),si({transform:"none",opacity:1})]))),Or("* => void",Yr("100ms linear",si({opacity:0})))]),fadeInCalendar:ka("fadeInCalendar",[Os("void",si({opacity:0})),Os("enter",si({opacity:1})),Or("void => *",Yr("120ms 100ms cubic-bezier(0.55, 0, 0.55, 0.2)"))])},EH=function(i){return{active:i}};function Sie(i,t){if(1&i){const e=ai();W(0,"button",2),Le("click",function(){const s=rn(e).$implicit;return Ut(he().select(s))}),j()}if(2&i){const e=t.$implicit,n=he();qo("background-color",e),U("ngClass",sm(3,EH,n.selectedColor===e))}}function Eie(i,t){if(1&i){const e=ai();W(0,"button",2),Le("click",function(){const s=rn(e).$implicit;return Ut(he().select(s))}),j()}if(2&i){const e=t.$implicit,n=he();qo("background-color",e),U("ngClass",sm(3,EH,n.selectedColor===e))}}const Aie=["button"],Die=/^\s+/,Tie=/\s+$/,$m=Math.round,Iie=(Math,Math,Math,/[^0-9]/g),AH=["#ffffff","#ffff00","#ff00ff","#ff0000","#c0c0c0","#808080","#808000","#800080","#800000","#00ffff","#00ff00","#008080","#008000","#0000ff","#000080","#000000"];function DH(i,t,e){const n=i.getImageData(t,e,1,1).data;return{r:n[0],g:n[1],b:n[2]}}function jh(i){return 1==i.length?"0"+i:""+i}function kie(i){return Math.round(255*parseFloat(i)).toString(16)}function TH(i){return Qo(i)/255}function Qo(i){return parseInt(i,16)}function IH(i,t,e,n){var r=[jh($m(i).toString(16)),jh($m(t).toString(16)),jh($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 vu="(?:[-\\+]?\\d*\\.\\d+%?)|(?:[-\\+]?\\d+%?)",jR="[\\s|\\(]+("+vu+")[,|\\s]+("+vu+")[,|\\s]+("+vu+")\\s*\\)?",YR="[\\s|\\(]+("+vu+")[,|\\s]+("+vu+")[,|\\s]+("+vu+")[,|\\s]+("+vu+")\\s*\\)?",Yh={CSS_UNIT:new RegExp(vu),rgb:new RegExp("rgb"+jR),rgba:new RegExp("rgba"+YR),hsl:new RegExp("hsl"+jR),hsla:new RegExp("hsla"+YR),hsv:new RegExp("hsv"+jR),hsva:new RegExp("hsva"+YR),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 qR(i){let t;return i=i.replace(Die,"").replace(Tie,"").toLowerCase(),(t=Yh.rgb.exec(i))?{r:t[1],g:t[2],b:t[3],a:1}:(t=Yh.rgba.exec(i))?{r:t[1],g:t[2],b:t[3],a:t[4]}:(t=Yh.hex8.exec(i))?{r:Qo(t[1]),g:Qo(t[2]),b:Qo(t[3]),a:TH(t[4])}:(t=Yh.hex6.exec(i))?{r:Qo(t[1]),g:Qo(t[2]),b:Qo(t[3]),a:1}:(t=Yh.hex4.exec(i))?{r:Qo(t[1]+""+t[1]),g:Qo(t[2]+""+t[2]),b:Qo(t[3]+""+t[3]),a:TH(t[4]+""+t[4])}:(t=Yh.hex3.exec(i))?{r:Qo(t[1]+""+t[1]),g:Qo(t[2]+""+t[2]),b:Qo(t[3]+""+t[3]),a:1}:null}class qh{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=IH(this.r,this.g,this.b),this.rgba=this.toRgba()}toHex(t){return IH(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 Rie(i,t,e,n,r){var s=[jh($m(i).toString(16)),jh($m(t).toString(16)),jh($m(e).toString(16)),jh(kie(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 RH=(()=>{class i{constructor(e,n){this.zone=e,this.colorChanged=new $e,this.x=0,this.y=0,this.drag=!1,this._destroyed=new Re,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){wo()},i.\u0275dir=ve({type:i,inputs:{color:"color"},outputs:{colorChanged:"colorChanged"}}),i})(),Fie=(()=>{class i extends RH{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}=DH(this.ctx,e.offsetX,e.offsetY);this.emitChange(new qh(n,r,s))}}return i.\u0275fac=function(e){return new(e||i)(E(pt))},i.\u0275cmp=ot({type:i,selectors:[["ngx-mat-color-slider"]],features:[lt],decls:1,vars:0,consts:[["id","color-strip","width","15","height","234",1,"zone-strip",3,"mousedown","mouseup"]],template:function(e,n){1&e&&(W(0,"canvas",0),Le("mousedown",function(s){return n.onMousedown(s)})("mouseup",function(s){return n.onMouseup(s)}),j())}}),i})(),Lie=(()=>{class i{constructor(){}onInput(e){this._formatInput(e.target)}_formatInput(e){let n=Number(e.value.replace(Iie,""));n=isNaN(n)?0:n,e.value=n}}return i.\u0275fac=function(e){return new(e||i)},i.\u0275dir=ve({type:i,selectors:[["","ngxMatNumericColorInput",""]],hostBindings:function(e,n){1&e&&Le("input",function(s){return n.onInput(s)})}}),i})(),Bie=(()=>{class i extends RH{constructor(e){super(e,"color-block"),this.zone=e,this._resetBaseColor=!0,this.formGroup=new Hm({r:new ic(null,[_l.required]),g:new ic(null,[_l.required]),b:new ic(null,[_l.required]),a:new ic(null,[_l.required]),hex:new ic(null,[_l.required,_l.pattern(Yh.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(){Cr(this.rCtrl.valueChanges,this.gCtrl.valueChanges,this.bCtrl.valueChanges,this.aCtrl.valueChanges).pipe(Ve(this._destroyed),ml(400)).subscribe(r=>{const s=new qh(Number(this.rCtrl.value),Number(this.gCtrl.value),Number(this.bCtrl.value),Number(this.aCtrl.value));this.emitChange(s)}),this.hexCtrl.valueChanges.pipe(Ve(this._destroyed),ml(400),Ql()).subscribe(r=>{const s=qR(r);if(null!=s){const o=new qh(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}=DH(this.ctx,e.offsetX,e.offsetY);this.emitChange(new qh(n,r,s))}}return i.\u0275fac=function(e){return new(e||i)(E(pt))},i.\u0275cmp=ot({type:i,selectors:[["ngx-mat-color-canvas"]],hostAttrs:[1,"ngx-mat-color-canvas"],features:[lt,xi],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&&(W(0,"form",0)(1,"div",1)(2,"div",2)(3,"canvas",3),Le("mousedown",function(s){return n.onMousedown(s)})("mouseup",function(s){return n.onMouseup(s)}),j(),W(4,"ngx-mat-color-slider",4),Le("colorChanged",function(s){return n.onSliderColorChanged(s)}),j()(),W(5,"div",5)(6,"mat-form-field")(7,"mat-label"),ze(8,"R"),j(),Pe(9,"input",6),j(),W(10,"mat-form-field")(11,"mat-label"),ze(12,"G"),j(),Pe(13,"input",7),j(),W(14,"mat-form-field")(15,"mat-label"),ze(16,"B"),j(),Pe(17,"input",8),j()()(),W(18,"div",1),Pe(19,"button",9),W(20,"mat-form-field")(21,"mat-label"),ze(22,"HEX6"),j(),W(23,"mat-label",10),ze(24,"#\xa0"),j(),Pe(25,"input",11),j(),W(26,"mat-form-field",12)(27,"mat-label"),ze(28,"A"),j(),Pe(29,"input",13),j()()()),2&e&&(U("formGroup",n.formGroup),G(19),qo("background-color",(null==n.color?null:n.color.rgba)||"transparent"))},dependencies:[rc,vl,Ro,qte,MV,IR,gl,mu,nc,bR,_u,gu,Gh,fC,Fie,Lie],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})(),Uie=(()=>{class i{constructor(){this.colorChanged=new $e,this.colors1=AH.slice(0,8),this.colors2=AH.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}=qR(e);this.colorChanged.emit(new qh(n,r,s,o))}}return i.\u0275fac=function(e){return new(e||i)},i.\u0275cmp=ot({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&&(W(0,"div",0),fe(1,Sie,1,5,"button",1),j(),W(2,"div",0),fe(3,Eie,1,5,"button",1),j()),2&e&&(G(1),U("ngForOf",n.colors1),G(2),U("ngForOf",n.colors2))},dependencies:[hm,Eo,MV],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})(),kH=(()=>{class i{constructor(){this.colorChanged=new $e}ngOnInit(){}handleColorChanged(e){this.colorChanged.emit(e)}}return i.\u0275fac=function(e){return new(e||i)},i.\u0275cmp=ot({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&&(W(0,"ngx-mat-color-canvas",0),Le("colorChanged",function(s){return n.handleColorChanged(s)}),j(),W(1,"ngx-mat-color-collection",0),Le("colorChanged",function(s){return n.handleColorChanged(s)}),j()),2&e&&(U("color",n.color),G(1),U("color",n.color))},dependencies:[Bie,Uie],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})(),XR=(()=>{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=qR(e);return n?new qh(n.r,n.g,n.b,n.a):null}}return i.\u0275fac=function(e){return new(e||i)},i.\u0275prov=ke({token:i,factory:i.\u0275fac}),i})();const Vie={display:{colorInput:"hex"}},PH=new me("mat-color-formats"),OH=new me("ngx-mat-colorpicker-scroll-strategy"),Hie={provide:OH,deps:[as],useFactory:function zie(i){return()=>i.scrollStrategies.reposition()}},Gie=Qy(class{constructor(i){this._elementRef=i}});let FH=(()=>{class i extends Gie{constructor(e){super(e)}}return i.\u0275fac=function(e){return new(e||i)(E(gt))},i.\u0275cmp=ot({type:i,selectors:[["ngx-mat-color-picker-content"]],viewQuery:function(e,n){if(1&e&&Wn(kH,5),2&e){let r;Et(r=At())&&(n._palette=r.first)}},hostAttrs:[1,"ngx-mat-colorpicker-content"],hostVars:3,hostBindings:function(e,n){2&e&&(Iw("@transformPanel","enter"),un("ngx-mat-colorpicker-content-touch",n.picker.touchUi))},inputs:{color:"color"},exportAs:["ngxMatColorPickerContent"],features:[lt],decls:1,vars:1,consts:[[3,"color","colorChanged"]],template:function(e,n){1&e&&(W(0,"ngx-mat-color-palette",0),Le("colorChanged",function(s){return n.picker.select(s)}),j()),2&e&&U("color",n.picker._selected)},dependencies:[kH],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:[MH.transformPanel,MH.fadeInCalendar]},changeDetection:0}),i})(),LH=(()=>{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 $e,this.closedStream=new $e,this._touchUi=!1,this._opened=!1,this._defaultColor="primary",this._validSelected=null,this._disabledChange=new Re,this._focusedElementBeforeOpen=null,this._inputSubscription=Zt.EMPTY,this._selectedChanged=new Re,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(FH,{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 Lh(FH,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(Oi(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"),Cr(this._popupRef.backdropClick(),this._popupRef.detachments(),this._popupRef.keydownEvents().pipe(gn(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)(E(Bm),E(as),E(pt),E(XR),E(Ra,8),E(OH),E(jt,8),E(jr))},i.\u0275cmp=ot({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 yC{constructor(t,e){this.target=t,this.targetElement=e,this.value=this.target.value}}const $ie={provide:Io,useExisting:Gn(()=>bC),multi:!0},Wie={provide:qr,useExisting:Gn(()=>bC),multi:!0};let bC=(()=>{class i{constructor(e,n,r,s){if(this._elementRef=e,this._formField=n,this._colorFormats=r,this._adapter=s,this.colorChange=new $e,this.colorInput=new $e,this._disabledChange=new $e,this._valueChange=new $e,this._onTouched=()=>{},this._cvaOnChange=()=>{},this._validatorOnChange=()=>{},this._pickerSubscription=Zt.EMPTY,this._validator=_l.compose([]),this._lastValueValid=!1,!this._colorFormats)throw function Oie(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 yC(this,this._elementRef.nativeElement)),this.colorChange.emit(new yC(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 yC(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 yC(this,this._elementRef.nativeElement)))}}return i.\u0275fac=function(e){return new(e||i)(E(gt),E(vl,8),E(PH,8),E(XR))},i.\u0275dir=ve({type:i,selectors:[["input","ngxMatColorPicker",""]],hostVars:3,hostBindings:function(e,n){1&e&&Le("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&&(Yl("disabled",n.disabled),Dt("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:[Dn([$ie,Wie,{provide:VR,useExisting:i}])]}),i})(),jie=(()=>{class i{constructor(e){this._cd=e,this._stateChanges=Zt.EMPTY}get disabled(){if(null==this._disabled&&this.picker)return this.picker.disabled}set disabled(e){this._disabled=e}ngOnInit(){}ngOnChanges(e){e.picker&&this._watchStateChanges()}ngOnDestroy(){this._stateChanges.unsubscribe()}ngAfterContentInit(){this._watchStateChanges()}open(e){this.picker&&!this.disabled&&(this.picker.open(),e.stopPropagation())}_watchStateChanges(){const e=this.picker?this.picker._disabledChange:ft(),n=this.picker&&this.picker._pickerInput?this.picker._pickerInput._disabledChange:ft(),r=this.picker?Cr(this.picker.openedStream,this.picker.closedStream):ft();this._stateChanges.unsubscribe(),this._stateChanges=Cr(e,n,r).subscribe(()=>this._cd.markForCheck())}}return i.\u0275fac=function(e){return new(e||i)(E(Zn))},i.\u0275cmp=ot({type:i,selectors:[["ngx-mat-color-toggle"]],viewQuery:function(e,n){if(1&e&&Wn(Aie,5),2&e){let r;Et(r=At())&&(n._button=r.first)}},hostAttrs:[1,"ngx-mat-color-toggle"],hostVars:7,hostBindings:function(e,n){1&e&&Le("focus",function(){return n._button.focus()}),2&e&&(Dt("tabindex",-1),un("ngx-mat-color-toggle-active",n.picker&&n.picker.opened)("mat-accent",n.picker&&"accent"===n.picker.color)("mat-warn",n.picker&&"warn"===n.picker.color))},inputs:{picker:["for","picker"],tabIndex:"tabIndex",disabled:"disabled"},exportAs:["ngxMatColorPickerToggle"],features:[xi],decls:4,vars:5,consts:[["mat-icon-button","","type","button",3,"disabled","click"],["button",""]],template:function(e,n){1&e&&(W(0,"button",0,1),Le("click",function(s){return n.open(s)}),W(2,"mat-icon"),ze(3,"palette"),j()()),2&e&&(U("disabled",n.disabled),Dt("aria-haspopup",n.picker?"dialog":null)("tabindex",n.disabled?-1:n.tabIndex),G(2),qo("color",null==n.picker||null==n.picker._selected?null:n.picker._selected.rgba))},dependencies:[XM,gR],styles:[".mat-form-field-appearance .mat-form-field-prefix .ngx-mat-color-toggle-default-icon,.mat-form-field-appearance .mat-form-field-suffix .ngx-mat-color-toggle-default-icon{width:1em}.mat-form-field:not(.mat-form-field-appearance) .mat-form-field-prefix .ngx-mat-color-toggle-default-icon,.mat-form-field:not(.mat-form-field-appearance) .mat-form-field-suffix .ngx-mat-color-toggle-default-icon{display:block;width:1.5em;height:1.5em}.mat-form-field:not(.mat-form-field-appearance) .mat-form-field-prefix .mat-icon-button .ngx-mat-color-toggle-default-icon,.mat-form-field:not(.mat-form-field-appearance) .mat-form-field-suffix .mat-icon-button .ngx-mat-color-toggle-default-icon{margin:auto}\n"],encapsulation:2}),i})(),Yie=(()=>{class i{}return i.\u0275fac=function(e){return new(e||i)},i.\u0275mod=nn({type:i}),i.\u0275inj=Kt({providers:[XR,Hie],imports:[Ao,pH,KM,_H,aie,eH,tH,_V,Nh,ez]}),i})();const qie=["picker"],Xie=function(i){return{"background-color":i}};function Kie(i,t){if(1&i){const e=ai();W(0,"div",5),Le("click",function(r){const o=rn(e).index;return Ut(he().onColorClicked(r.currentTarget,o))}),j()}if(2&i){const e=t.$implicit,n=t.index,r=he();U("ngStyle",sm(2,Xie,"#"+r.lpad(e.toString(16),"0",8)))("matTooltip",n+": #"+e.toString(16))}}const Zie=function(){return["colors"]};let Qie=(()=>{class i{constructor(){this.resource=null,this.changed=new $e,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 yU;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=ot({type:i,selectors:[["app-palette-block-ui"]],viewQuery:function(e,n){if(1&e&&Wn(qie,5),2&e){let r;Et(r=At())&&(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&&(Pe(0,"app-compound-block-ui",0),W(1,"div",1),fe(2,Kie,1,4,"div",2),j(),W(3,"input",3),Le("colorChange",function(s){return n.onColorChange(s.value)}),j(),Pe(4,"ngx-mat-color-picker",null,4)),2&e){const r=Zi(5);U("resource",n.resource)("fieldBlacklist",Rs(4,Zie)),G(2),U("ngForOf",null==n.resourceData?null:n.resourceData.colors),G(1),U("ngxMatColorPicker",r)}},dependencies:[Eo,tM,rc,Fs,bC,LH,ec],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 Jie=["editor"];let ere=(()=>{class i{constructor(e){this.cdr=e,this._resource=null,this.resourceDescription="",this.disabled=!1,this.changed=new $e,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)(E(Zn))},i.\u0275cmp=ot({type:i,selectors:[["app-binary-block-ui"]],viewQuery:function(e,n){if(1&e&&Wn(Jie,5),2&e){let r;Et(r=At())&&(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&&(W(0,"h2",0),ze(1),j(),Pe(2,"div",null,1)),2&e&&(U("matTooltip",n.resourceDescription),G(1),_i(null==n.resource?null:n.resource.name))},dependencies:[Fs],changeDetection:0}),i})();const tre=["picker"];function nre(i,t){if(1&i&&(W(0,"mat-label",8),ze(1),j()),2&i){const e=he();G(1),_i(null==e.resource?null:e.resource.name)}}const ire=function(i){return{transform:i}};let rre=(()=>{class i{constructor(e){this.cdr=e,this.resource=null,this.resourceDescription="",this.changed=new $e,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)(E(Zn))},i.\u0275cmp=ot({type:i,selectors:[["app-angle-block-ui"]],viewQuery:function(e,n){if(1&e&&Wn(tre,5),2&e){let r;Et(r=At())&&(n.picker=r.first)}},hostBindings:function(e,n){1&e&&Le("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&&(W(0,"div",0)(1,"div",1,2)(3,"div",3),Pe(4,"div",4)(5,"div",5),j()(),W(6,"div",6),fe(7,nre,2,1,"mat-label",7),W(8,"mat-label"),ze(9),Ct(10,"number"),j(),W(11,"mat-label"),ze(12),Ct(13,"number"),j()()()),2&e&&(U("matTooltip",n.resourceDescription),G(3),U("ngStyle",sm(11,ire,"rotate("+((null==n.resource?null:n.resource.data)||0)+"rad)")),G(4),U("ngIf",null==n.resource?null:n.resource.name),G(2),Qi("",J1(10,5,180*(null==n.resource?null:n.resource.data)/n.pi||0,"1.2-2")," deg"),G(3),Qi("",J1(13,8,(null==n.resource?null:n.resource.data)||0,"1.2-2")," rad"))},dependencies:[vi,tM,Ro,Fs,uB],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 NH{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,d=new Set;for(const h of e)!0===Array.isArray(h)?a.add(h):"object"==typeof h?l.add(h):"function"==typeof h?d.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===d.size){h=!0;for(const p of o)if(!1===d.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 sre(i,t){if(1&i&&(W(0,"mat-list-option",3),ze(1),j()),2&i){const e=t.$implicit,n=he();U("value",e)("selected",n.selectedValue==e),G(1),Qi(" ",e," ")}}function ore(i,t){if(1&i&&(W(0,"mat-card"),Pe(1,"app-editor",4),j()),2&i){const e=he();G(1),U("resource",e.resources[e.selectedValue])}}let xC=(()=>{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)(E(NH))},i.\u0275cmp=ot({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&&(W(0,"mat-selection-list",0),Le("selectionChange",function(s){return n.selectedValue=s.source.selectedOptions.selected[0].value}),fe(1,sre,2,3,"mat-list-option",1),j(),fe(2,ore,2,1,"mat-card",2)),2&e&&(U("multiple",!1),G(1),U("ngForOf",n.keys),G(1),U("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})(),are=(()=>{class i{constructor(){this._resource=null,this.resourceMap={},this.changed=new $e}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",iR("@transformPanel",[nR()],{optional:!0}))]),transformPanel:ka("transformPanel",[Os("void",si({opacity:0,transform:"scale(1, 0.8)"})),Or("void => showing",Yr("120ms cubic-bezier(0, 0, 0.2, 1)",si({opacity:1,transform:"scale(1, 1)"}))),Or("* => void",Yr("100ms linear",si({opacity:0})))])};let BH=0;const UH=new me("mat-select-scroll-strategy"),yre=new me("MAT_SELECT_CONFIG"),bre={provide:UH,deps:[as],useFactory:function vre(i){return()=>i.scrollStrategies.reposition()}},xre=new me("MatSelectTrigger");class wre{constructor(t,e){this.source=t,this.value=e}}const Mre=YM(JI(jM($U(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 Re}}))));let Cre=(()=>{class i extends Mre{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(_l.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=Ps(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,d,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=d,this._liveAnnouncer=g,this._defaultOptions=b,this._panelOpen=!1,this._compareWith=(v,y)=>v===y,this._uid="mat-select-"+BH++,this._triggerAriaLabelledBy=null,this._destroy=new Re,this._onChange=()=>{},this._onTouched=()=>{},this._valueId="mat-select-value-"+BH++,this._panelDoneAnimatingStream=new Re,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=Ey(()=>{const v=this.options;return v?v.changes.pipe(Do(v),ks(()=>Cr(...v.map(y=>y.onSelectionChange)))):this._ngZone.onStable.pipe(Oi(1),ks(()=>this.optionSelectionChanges))}),this.openedChange=new $e,this._openedStream=this.openedChange.pipe(gn(v=>v),et(()=>{})),this._closedStream=this.openedChange.pipe(gn(v=>!v),et(()=>{})),this.selectionChange=new $e,this.valueChange=new $e,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 HR(this.multiple),this.stateChanges.next(),this._panelDoneAnimatingStream.pipe(Ql(),Ve(this._destroy)).subscribe(()=>this._panelDoneAnimating(this.panelOpen))}ngAfterContentInit(){this._initKeyManager(),this._selectionModel.changed.pipe(Ve(this._destroy)).subscribe(e=>{e.added.forEach(n=>n.select()),e.removed.forEach(n=>n.deselect())}),this.options.changes.pipe(Do(null),Ve(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&&!Zo(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||Zo(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(Oi(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 GZ(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=Cr(this.options.changes,this._destroy);this.optionSelectionChanges.pipe(Ve(e)).subscribe(n=>{this._onSelect(n.source,n.isUserInput),n.isUserInput&&!this.multiple&&this._panelOpen&&(this.close(),this.focus())}),Cr(...this.options.map(n=>n._stateChanges)).pipe(Ve(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)(E(LM),E(Zn),E(pt),E(jU),E(gt),E(Ra,8),E(ub,8),E(Gh,8),E(mC,8),E(tc,10),xa("tabindex"),E(UH),E(XI),E(yre,8))},i.\u0275dir=ve({type:i,viewQuery:function(e,n){if(1&e&&(Wn(lre,5),Wn(cre,5),Wn(xU,5)),2&e){let r;Et(r=At())&&(n.trigger=r.first),Et(r=At())&&(n.panel=r.first),Et(r=At())&&(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:[lt,xi]}),i})(),fb=(()=>{class i extends Cre{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(Ve(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 OQ(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 wre(this,e)}_getOverlayWidth(){return(this._preferredOverlayOrigin instanceof zI?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=ri(i)))(n||i)}}(),i.\u0275cmp=ot({type:i,selectors:[["mat-select"]],contentQueries:function(e,n,r){if(1&e&&(Wi(r,xre,5),Wi(r,Nm,5),Wi(r,eV,5)),2&e){let s;Et(s=At())&&(n.customTrigger=s.first),Et(s=At())&&(n.options=s),Et(s=At())&&(n.optionGroups=s)}},hostAttrs:["role","combobox","aria-autocomplete","none","aria-haspopup","listbox",1,"mat-mdc-select"],hostVars:19,hostBindings:function(e,n){1&e&&Le("keydown",function(s){return n._handleKeydown(s)})("focus",function(){return n._onFocus()})("blur",function(){return n._onBlur()}),2&e&&(Dt("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()),un("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:[Dn([{provide:UR,useExisting:i},{provide:JU,useExisting:i}]),lt],ngContentSelectors:gre,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&&(or(mre),W(0,"div",0,1),Le("click",function(){return n.toggle()}),W(3,"div",2),fe(4,dre,2,1,"span",3),fe(5,fre,3,2,"span",4),j(),W(6,"div",5)(7,"div",6),ki(),W(8,"svg",7),Pe(9,"path",8),j()()()(),fe(10,pre,3,9,"ng-template",9),Le("backdropClick",function(){return n.close()})("attach",function(){return n._onAttached()})("detach",function(){return n.close()})),2&e){const r=Zi(1);Dt("aria-owns",n.panelOpen?n.id+"-panel":null),G(3),U("ngSwitch",n.empty),Dt("id",n._valueId),G(1),U("ngSwitchCase",!0),G(1),U("ngSwitchCase",!1),G(5),U("cdkConnectedOverlayPanelClass",n._overlayPanelClass)("cdkConnectedOverlayScrollStrategy",n._scrollStrategy)("cdkConnectedOverlayOrigin",n._preferredOverlayOrigin||r)("cdkConnectedOverlayOpen",n.panelOpen)("cdkConnectedOverlayPositions",n._positions)("cdkConnectedOverlayWidth",n._overlayWidth)}},dependencies:[hm,by,VT,aB,xU,zI],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:[_re.transformPanel]},changeDetection:0}),i})(),VH=(()=>{class i{}return i.\u0275fac=function(e){return new(e||i)},i.\u0275mod=nn({type:i}),i.\u0275inj=Kt({providers:[bre],imports:[Ao,Pm,tR,Qn,Xy,gC,tR,Qn]}),i})();function Sre(i,t){if(1&i&&(W(0,"mat-label"),ze(1),j()),2&i){const e=he(3);G(1),_i(e.resource.name)}}function Ere(i,t){if(1&i&&(W(0,"mat-option",6),ze(1),j()),2&i){const e=t.$implicit,n=he(3);U("value",e[1])("disabled",n.disabled),G(1),Qi(" ",e[1]," ")}}function Are(i,t){if(1&i){const e=ai();W(0,"mat-form-field",3),fe(1,Sre,2,1,"mat-label",0),W(2,"mat-select",4),Le("valueChange",function(r){return rn(e),Ut(he(2).resource.data=r)})("selectionChange",function(){return rn(e),Ut(he(2).changed.emit())}),fe(3,Ere,2,3,"mat-option",5),j()()}if(2&i){const e=he(2);U("matTooltip",e.resourceDescription),G(1),U("ngIf",e.resource.name),G(1),U("value",e.resource.data)("disabled",e.disabled),G(1),U("ngForOf",e.resource.schema.enum_names)}}function Dre(i,t){if(1&i&&(W(0,"mat-label"),ze(1),j()),2&i){const e=he(3);G(1),_i(e.resource.name)}}function Tre(i,t){if(1&i){const e=ai();W(0,"mat-form-field",3),fe(1,Dre,2,1,"mat-label",0),W(2,"input",7),Le("ngModelChange",function(r){return rn(e),Ut(he(2).resource.data=r)})("change",function(){return rn(e),Ut(he(2).changed.emit())}),j()()}if(2&i){const e=he(2);U("matTooltip",e.resourceDescription),G(1),U("ngIf",e.resource.name),G(1),U("min",0)("max",256*(e.resource.schema.length||1)-1)("ngModel",e.resource.data)}}function Ire(i,t){if(1&i&&($r(0),fe(1,Are,4,5,"mat-form-field",1),fe(2,Tre,3,5,"ng-template",null,2,zc),Wr()),2&i){const e=Zi(3),n=he();G(1),U("ngIf",n.isKnownEnumValue(n.resource.data))("ngIfElse",e)}}let Rre=(()=>{class i{constructor(){this.resource=null,this.resourceDescription="",this.disabled=!1,this.changed=new $e}isKnownEnumValue(e){return!!this.resource?.schema.enum_names.find(([n,r])=>r==e)}}return i.\u0275fac=function(e){return new(e||i)},i.\u0275cmp=ot({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&&fe(0,Ire,4,2,"ng-container",0),2&e&&U("ngIf",n.resource)},dependencies:[Eo,vi,gl,mu,nc,_u,gu,Zc,vl,Ro,rc,Fs,fb,Nm],changeDetection:0}),i})();const kre=["*"],Ore=["unscopedContent"];function Fre(i,t){1&i&&Wt(0,4)}function Lre(i,t){if(1&i&&(W(0,"div",11),Pe(1,"input",12),W(2,"div",13),ki(),W(3,"svg",14),Pe(4,"path",15),j(),va(),Pe(5,"div",16),j()()),2&i){const e=he();un("mdc-checkbox--disabled",e.disabled),G(1),U("checked",e.selected)("disabled",e.disabled)}}function Nre(i,t){if(1&i&&(W(0,"div",17),Pe(1,"input",18),W(2,"div",19),Pe(3,"div",20)(4,"div",21),j()()),2&i){const e=he();un("mdc-radio--disabled",e.disabled),G(1),U("checked",e.selected)("disabled",e.disabled)}}function Bre(i,t){}function Ure(i,t){if(1&i&&(W(0,"span",22),fe(1,Bre,0,0,"ng-template",23),j()),2&i){he();const e=Zi(3);G(1),U("ngTemplateOutlet",e)}}function Vre(i,t){}function zre(i,t){if(1&i&&(W(0,"span",24),fe(1,Vre,0,0,"ng-template",23),j()),2&i){he();const e=Zi(5);G(1),U("ngTemplateOutlet",e)}}function Hre(i,t){}function Gre(i,t){1&i&&fe(0,Hre,0,0,"ng-template",23),2&i&&(he(),U("ngTemplateOutlet",Zi(1)))}function $re(i,t){}function Wre(i,t){if(1&i&&(W(0,"span",25),fe(1,$re,0,0,"ng-template",23),j()),2&i){he();const e=Zi(3);G(1),U("ngTemplateOutlet",e)}}function jre(i,t){}function Yre(i,t){if(1&i&&(W(0,"span",25),fe(1,jre,0,0,"ng-template",23),j()),2&i){he();const e=Zi(5);G(1),U("ngTemplateOutlet",e)}}function qre(i,t){}function Xre(i,t){1&i&&fe(0,qre,0,0,"ng-template",23),2&i&&(he(),U("ngTemplateOutlet",Zi(1)))}const Kre=[[["","matListItemTitle",""]],[["","matListItemLine",""]],"*",[["mat-divider"]],[["","matListItemAvatar",""],["","matListItemIcon",""]]],Zre=["[matListItemTitle]","[matListItemLine]","*","mat-divider","[matListItemAvatar],[matListItemIcon]"],zH=new me("ListOption");let Qre=(()=>{class i{constructor(e){this._elementRef=e}}return i.\u0275fac=function(e){return new(e||i)(E(gt))},i.\u0275dir=ve({type:i,selectors:[["","matListItemTitle",""]],hostAttrs:[1,"mat-mdc-list-item-title","mdc-list-item__primary-text"]}),i})(),Jre=(()=>{class i{constructor(e){this._elementRef=e}}return i.\u0275fac=function(e){return new(e||i)(E(gt))},i.\u0275dir=ve({type:i,selectors:[["","matListItemLine",""]],hostAttrs:[1,"mat-mdc-list-item-line","mdc-list-item__secondary-text"]}),i})(),HH=(()=>{class i{constructor(e){this._listOption=e}_isAlignedAtStart(){return!this._listOption||"after"===this._listOption?._getTogglePosition()}}return i.\u0275fac=function(e){return new(e||i)(E(zH,8))},i.\u0275dir=ve({type:i,hostVars:4,hostBindings:function(e,n){2&e&&un("mdc-list-item__start",n._isAlignedAtStart())("mdc-list-item__end",!n._isAlignedAtStart())}}),i})(),ese=(()=>{class i extends HH{}return i.\u0275fac=function(){let t;return function(n){return(t||(t=ri(i)))(n||i)}}(),i.\u0275dir=ve({type:i,selectors:[["","matListItemAvatar",""]],hostAttrs:[1,"mat-mdc-list-item-avatar"],features:[lt]}),i})(),tse=(()=>{class i extends HH{}return i.\u0275fac=function(){let t;return function(n){return(t||(t=ri(i)))(n||i)}}(),i.\u0275dir=ve({type:i,selectors:[["","matListItemIcon",""]],hostAttrs:[1,"mat-mdc-list-item-icon"],features:[lt]}),i})();const nse=new me("MAT_LIST_CONFIG");let KR=(()=>{class i{constructor(){this._isNonInteractive=!0,this._disableRipple=!1,this._disabled=!1,this._defaultOptions=Ft(nse,{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=ve({type:i,hostVars:1,hostBindings:function(e,n){2&e&&Dt("aria-disabled",n.disabled)},inputs:{disableRipple:"disableRipple",disabled:"disabled"}}),i})(),GH=(()=>{class i{set lines(e){this._explicitLines=Ps(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 Zt,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(Cr(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)(E(gt),E(pt),E(KR,8),E(zi),E(eR,8),E(kr,8))},i.\u0275dir=ve({type:i,contentQueries:function(e,n,r){if(1&e&&(Wi(r,ese,4),Wi(r,tse,4)),2&e){let s;Et(s=At())&&(n._avatars=s),Et(s=At())&&(n._icons=s)}},hostVars:4,hostBindings:function(e,n){2&e&&(Dt("aria-disabled",n.disabled)("disabled",n._isButtonElement&&n.disabled||null),un("mdc-list-item--disabled",n.disabled))},inputs:{lines:"lines",disableRipple:"disableRipple",disabled:"disabled"}}),i})();const $H=new me("SelectionList");let wC=(()=>{class i extends GH{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 $e,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)(E(gt),E(pt),E($H),E(zi),E(Zn),E(eR,8),E(kr,8))},i.\u0275cmp=ot({type:i,selectors:[["mat-list-option"]],contentQueries:function(e,n,r){if(1&e&&(Wi(r,Jre,5),Wi(r,Qre,5)),2&e){let s;Et(s=At())&&(n._lines=s),Et(s=At())&&(n._titles=s)}},viewQuery:function(e,n){if(1&e&&Wn(Ore,5),2&e){let r;Et(r=At())&&(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&&Le("blur",function(){return n._handleBlur()})("click",function(){return n._toggleOnInteraction()}),2&e&&(Dt("aria-selected",n.selected),un("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:[Dn([{provide:GH,useExisting:i},{provide:zH,useExisting:i}]),lt],ngContentSelectors:Zre,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&&(or(Kre),fe(0,Fre,1,0,"ng-template",null,0,zc),fe(2,Lre,6,4,"ng-template",null,1,zc),fe(4,Nre,5,4,"ng-template",null,2,zc),fe(6,Ure,2,1,"span",3),fe(7,zre,2,1,"span",4),fe(8,Gre,1,1,"ng-template",5),W(9,"span",6),Wt(10),Wt(11,1),W(12,"span",7,8),Le("cdkObserveContent",function(){return n._updateItemLines(!0)}),Wt(14,2),j()(),fe(15,Wre,2,1,"span",9),fe(16,Yre,2,1,"span",9),fe(17,Xre,1,1,"ng-template",5),Wt(18,3),Pe(19,"div",10)),2&e&&(G(6),U("ngIf",n._hasCheckboxAt("before")),G(1),U("ngIf",n._hasRadioAt("before")),G(1),U("ngIf",n._hasIconsOrAvatarsAt("before")),G(7),U("ngIf",n._hasCheckboxAt("after")),G(1),U("ngIf",n._hasRadioAt("after")),G(1),U("ngIf",n._hasIconsOrAvatarsAt("after")))},dependencies:[CU,vi,xy],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 ise={provide:Io,useExisting:Gn(()=>MC),multi:!0};class rse{constructor(t,e){this.source=t,this.options=e}}let MC=(()=>{class i extends KR{get multiple(){return this._multiple}set multiple(e){const n=Jt(e);n!==this._multiple&&(this._multiple=n,this.selectedOptions=new HR(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 Re,this._onChange=r=>{},this.selectionChange=new $e,this.color="accent",this.compareWith=(r,s)=>r===s,this._multiple=!0,this._hideSingleSelectionIndicator=this._defaultOptions?.hideSingleSelectionIndicator??!1,this.selectedOptions=new HR(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 rse(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(Ve(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()&&Zo(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 RU(this._items).withHomeAndEnd().withTypeAhead().withWrap().skipPredicate(()=>this.disabled),this._resetActiveOption(),this._keyManager.change.subscribe(e=>this._setActiveOption(e)),this._items.changes.pipe(Ve(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=FM();return e&&this._element.nativeElement.contains(e)}}return i.\u0275fac=function(e){return new(e||i)(E(gt),E(pt))},i.\u0275cmp=ot({type:i,selectors:[["mat-selection-list"]],contentQueries:function(e,n,r){if(1&e&&Wi(r,wC,5),2&e){let s;Et(s=At())&&(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&&Le("keydown",function(s){return n._handleKeydown(s)}),2&e&&Dt("aria-multiselectable",n.multiple)},inputs:{color:"color",compareWith:"compareWith",multiple:"multiple",hideSingleSelectionIndicator:"hideSingleSelectionIndicator",disabled:"disabled"},outputs:{selectionChange:"selectionChange"},exportAs:["matSelectionList"],features:[Dn([ise,{provide:KR,useExisting:i},{provide:$H,useExisting:i}]),lt,xi],ngContentSelectors:kre,decls:1,vars:0,template:function(e,n){1&e&&(or(),Wt(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})(),sse=(()=>{class i{}return i.\u0275fac=function(e){return new(e||i)},i.\u0275mod=nn({type:i}),i.\u0275inj=Kt({imports:[HI,Ao,Qn,eb,QU,RV]}),i})();function ose(i,t){if(1&i&&(W(0,"mat-label"),ze(1),j()),2&i){const e=he(2);G(1),_i(e.resource.name)}}function ase(i,t){if(1&i&&(W(0,"mat-list-option",5),ze(1),j()),2&i){const e=t.$implicit,n=he(2);U("value",e.key)("selected",n.resource.data[e.key])("disabled",n.disabled),G(1),Qi(" ",e.key," ")}}function lse(i,t){if(1&i){const e=ai();$r(0,1),fe(1,ose,2,1,"mat-label",2),W(2,"mat-selection-list",3),Le("selectionChange",function(r){return rn(e),Ut(he().onSelection(r))}),fe(3,ase,2,4,"mat-list-option",4),Ct(4,"keyvalue"),j(),Wr()}if(2&i){const e=he();U("matTooltip",e.resourceDescription),G(1),U("ngIf",e.resource.name),G(1),U("disabled",e.disabled),G(1),U("ngForOf",Tt(4,4,e.resource.data))}}let cse=(()=>{class i{constructor(){this.resource=null,this.resourceDescription="",this.disabled=!1,this.changed=new $e}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=ot({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&&fe(0,lse,5,6,"ng-container",0),2&e&&U("ngIf",n.resource)},dependencies:[Eo,vi,Ro,Fs,MC,wC,cB],styles:["[_nghost-%COMP%]{padding-bottom:1.34375em}"],changeDetection:0}),i})();class WH{get tick$(){return this._tick$.asObservable()}get children(){return[...this._children]}constructor(t){this.parent=t,this._tick$=new Re,this._children=[],t&&t.addChild(this)}addChild(t){if(t.parent!==this)throw new Error("Incorrect child clock");this._children.includes(t)||this._children.push(t)}removeChild(t){if(t.parent!==this)throw new Error("Incorrect child clock");this._children=this._children.filter(e=>e!==t)}dispose(){this.parent&&this.parent.removeChild(this);for(const t of this._children)t.dispose();this._tick$.complete()}}const use=typeof performance>"u"?()=>Date.now():()=>performance.now();class jm extends WH{static get instance(){return jm._instance||(jm._instance=new jm),jm._instance}get elapsedTime(){return use()}constructor(){super(null);let t=this.elapsedTime;const e=()=>{requestAnimationFrame(e);const n=t,r=this.elapsedTime;t=r,this._tick$.next([n,r-n])};requestAnimationFrame(e)}dispose(){throw new Error("Cannot dispose global clock")}}class jH extends WH{get isRunning(){return!!this.tickSub}get isPaused(){return-1!==this.pausedAt}get isStopped(){return-1===this.startedAt}get timeScale(){return this._timeScale}set timeScale(t){if(t!==this._timeScale||this.pausedByTimescale&&0!==t){if(0===t)return void(this.isPaused||(this.pause(),this.pausedByTimescale=!0));if(this.isPaused&&this.pausedByTimescale&&(this.resume(),this.pausedByTimescale=!1),!this.isStopped){const e=this.isPaused?this.pausedAt:this.parentClock.elapsedTime;this.startedAt=e-(e-this.startedAt)*this.timeScale/t}this._timeScale=t}}get elapsedTime(){return this.isStopped?this.lastStopElapsed:this.isPaused?this._timeScale*(this.pausedAt-this.startedAt):this._timeScale*(this.parentClock.elapsedTime-this.startedAt)}constructor(t=!1,e=jm.instance){super(e),this.parentClock=e,this.tickSub=null,this._internalTick$=new Re,this.tickRateLimit=0,this.paused$=new Re,this.startedAt=-1,this.oldRelativeTime=0,this.pausedAt=-1,this.lastStopElapsed=0,this._timeScale=1,this.pausedByTimescale=!1,this.lastFiredTickElapsed=0,t&&this.start(),this._internalTick$.pipe(et(([n,r])=>[r,r-this.lastFiredTickElapsed]),gn(([n])=>!this.tickRateLimit||Math.floor(this.lastFiredTickElapsed*this.tickRateLimit/1e3)this.lastFiredTickElapsed=n)).subscribe(this._tick$)}start(){this.isRunning||(this.oldRelativeTime=0,this.startedAt=this.parentClock.elapsedTime,this.startListeningTicks())}stop(){this.stopListeningTicks(),this.lastStopElapsed=this.elapsedTime,this.startedAt=this.pausedAt=-1}pause(){this.stopListeningTicks(),this.pausedAt=this.parentClock.elapsedTime,this.pausedByTimescale=!1,this.paused$.next(!0)}resume(){this.isRunning||-1==this.pausedAt||(this.startedAt+=this.parentClock.elapsedTime-this.pausedAt,this.pausedAt=-1,this.startListeningTicks(),this.paused$.next(!1))}startListeningTicks(){if(this.tickSub)throw new Error("Clock is already ticking!");this.tickSub=this.parentClock.tick$.pipe(et(([t,e])=>[this.oldRelativeTime,this.oldRelativeTime+e*this.timeScale]),Vi(([t,e])=>this.oldRelativeTime=e)).subscribe(this._internalTick$)}stopListeningTicks(){var t;null===(t=this.tickSub)||void 0===t||t.unsubscribe(),this.tickSub=null}dispose(){this.stopListeningTicks(),this._internalTick$.complete(),super.dispose()}}const hse={transparent:!1,background:0,size:"fullscreen",antialias:!0};class fse{constructor(t,e,n={}){this.scene=t,this.canvas=e,this.entity=null,this.rendererOptions=Object.assign(Object.assign({},hse),n||{})}}class pb{static fromArray(t,e=!1){const n=new pb(t[0]);let r=n;for(let s=1;sn.map(r=>new pb(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]}constructor(t){this.data=t,this.adjacent=new Set}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(d=>!e.has(d));for(const d of c)e.add(d),r.push([d,a-1])}}return n}nodes(){return Array.from(this.walkRead(-1))}}var oc=(()=>{return(i=oc||(oc={}))[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",oc;var i})();let Xh=(()=>{class i{constructor(){this.tick$=new Re,this._world=null,this._name="e0x"+(i.default_name_counter++).toString(16),this._selfActive=!0,this.parent=null,this._children=[],this._components=[],this._onSpawned$=new Re,this._onRemoved$=new Re}get world(){return this._world}get name(){return this._name}set name(e){this._name=e}get active(){return this._selfActive&&(!this.parent||this.parent.active)}set active(e){this._selfActive=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 pse extends Xh{constructor(t){super(),this.tickOrder=t}}function Ym(i,t=oc.CONTROLLERS,e){const n=new pse(t);return e&&(n.name=e),i.addEntity(n),n.tick$.pipe(su(()=>{i.removeEntity(n,!0)}))}class ZR extends Xh{get rendererSize$(){return this._rendererSize$.asObservable()}get rendererSize(){return this._rendererSize$.getValue()}get rendererOptions(){return this.renderer.rendererOptions}get physicsDebugViewActive(){return this.renderer.physicsDebugViewActive}set physicsDebugViewActive(t){this.renderer.physicsDebugViewActive=t}constructor(t){super(),this.renderer=t,this.tickOrder=oc.RENDERING,this._rendererSize$=new ut(null),this.addComponents(t),this.tick$.subscribe(()=>{this.renderer.render()})}onSpawned(t){this._rendererSize$.next(null),"fullscreen"==this.rendererOptions.size||"function"==typeof this.rendererOptions.size?(this.renderer.canvas&&(this.renderer.canvas.style.position="absolute"),Cr(To(window,"resize").pipe(PM(100)),To(window,"orientationchange")).pipe(Ve(this._onRemoved$),et(()=>({x:window.innerWidth,y:window.innerHeight})),Do({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 In||void 0!==this.rendererOptions.size.subscribe&&void 0!==this.rendererOptions.size.pipe?this.rendererOptions.size.pipe(Ve(this._onRemoved$)).subscribe(e=>{this._rendererSize$.next(e)}):this._rendererSize$.next(this.rendererOptions.size),this._rendererSize$.pipe(Ve(this._onRemoved$),Ql((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 QR=i=>{i.updateVisibility?i.updateVisibility():YH(i)},YH=i=>{for(const t of i.children)QR(t)};class mse extends Xh{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(){YH(this)}addChildren(...t){super.addChildren(...t);for(const e of t)QR(e)}removeChildren(t,e=!1){if(super.removeChildren(t,e),!e)for(const n of t)QR(n)}}class JR{constructor(){this._running=!1,this.stop$=new Re}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 gse extends JR{get output$(){return this._output$.asObservable()}constructor(t,e){super(),this.keyboard=t,this.keymap=e,this._output$=new Re}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")),Xl(t.map(e=>this.keyboard.bindMany(...e))).pipe(Ve(this.stop$),et(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 ek=new In(ms);class CC extends JR{constructor(){super(),this.bindings={},this.skipKeyDownsOnExternalFocus=!0,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 ut(!1);return this.bindings[t].push(e),e.pipe(Ql(),su(()=>{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"),ek;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 ut(!1);this.bindings[n].push(r),e.push(r)}return Xl(e).pipe(su(()=>{for(let n=0;nn.includes(!0)),Ql())}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 CC.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)}}CC.externalFocusBlacklist=[HTMLInputElement,HTMLTextAreaElement,HTMLSelectElement,HTMLButtonElement];class yi{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 yi.len(yi.sub(t,e))}static norm(t){const e=yi.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 vse={pointerLock:!1};var Ls=(()=>{return(i=Ls||(Ls={}))[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",Ls;var i})();class qm extends JR{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$=To(this._element,"wheel",{passive:!1}).pipe(Ve(this.stopped$),su(()=>this._wheel$=null),Vi(t=>t.preventDefault()),et(t=>t.deltaY),Uf())),this._wheel$}get isPointerLocked(){return!!document.pointerLockElement}get isPointerLocked$(){return To(document,"pointerlockchange").pipe(et(()=>this.isPointerLocked))}get state(){return this._state$.getValue()}get state$(){return this._state$.asObservable()}get multiTouchPositions$(){return this._multiTouchPositions$.asObservable()}get twoTouchGestureDelta$(){return this.state$.pipe(ks(t=>t==Ls.DRAG_TOUCH_TWO_FINGERS?this.multiTouchPositions$:ek),et(t=>t.map(e=>({x:e.x,y:e.y}))),function _se(){return ti((i,t)=>{let e,n=!1;i.subscribe(Yn(t,r=>{const s=e;e=r,n&&t.next([s,r]),n=!0}))})}(),gn(([t,e])=>t.length>1&&e.length>1),et(([t,e])=>({centerPointDelta:yi.sub(yi.scalarMult(e.reduce((n,r)=>yi.add(n,r),yi.O),1/e.length),yi.scalarMult(t.reduce((n,r)=>yi.add(n,r),yi.O),1/e.length)),angleDelta:yi.angle(e[1],e[0])-yi.angle(t[1],t[0]),distanceDelta:yi.dist(e[1],e[0])-yi.dist(t[1],t[0])})))}get _element(){return this.options.canvas||window}constructor(t={}){super(),this._wheel$=null,this._delta$=new Re,this._position$=new ut(yi.O),this._multiTouchPositions$=new ut([]),this.stopped$=new Re,this._state$=new ut(Ls.NONE),this.options=Object.assign(Object.assign({},vse),t),this.canvasClickListener=this.canvasClickListener.bind(this)}startInternal(){this.options.canvas&&(this.options.canvas.style.touchAction="none"),this._state$.next(Ls.NONE);const t=[Ls.DRAG,Ls.DRAG_MIDDLE_BUTTON,Ls.DRAG_RIGHT_BUTTON],e=[Ls.NONE,Ls.DRAG,Ls.DRAG_TOUCH_TWO_FINGERS],n=[],r={};To(this._element,"mousemove").pipe(Ve(this.stopped$)).subscribe(o=>{this._delta$.next({x:o.movementX,y:o.movementY})}),To(this._element,"pointermove").pipe(Ve(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})}),!qm.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{if(0===n.length)try{this.options.canvas&&this.options.canvas.setPointerCapture(o.pointerId),window.addEventListener("pointerup",s),this._element.addEventListener("pointercancel",s)}catch(a){console.error(a)}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]||Ls.NONE)}),To(this._element,"contextmenu").pipe(Ve(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 yse{static lookAt(t,e,n){let r=Te.sub(t,e);r=0===Te.lenSq(r)?Object.assign(Object.assign({},r),{z:1}):Te.norm(r);let s=Te.cross(n,r);0===Te.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=Te.norm(r),s=Te.cross(n,r)),s=Te.norm(s);let o=Te.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 Yi{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,d=t.w*Math.sin((1-n)*s)/o+e.w*Math.sin(n*s)/o;return isNaN(a)||isNaN(l)||isNaN(c)||isNaN(d)?Yi.clone(t):{x:a,y:l,z:c,w:d}}static fromAngle(t,e){const n=e/2,r=Math.sin(n);return Object.assign(Object.assign({},Te.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],d=t[10],h=e+o+d;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>d){const p=2*Math.sqrt(1+e-o-d);return{x:.25*p,y:(n+s)/p,z:(r+l)/p,w:(c-a)/p}}if(o>d){const p=2*Math.sqrt(1+o-e-d);return{x:(n+s)/p,y:.25*p,z:(a+c)/p,w:(r-l)/p}}{const p=2*Math.sqrt(1+d-e-o);return{x:(r+l)/p,y:(a+c)/p,z:.25*p,w:(s-n)/p}}}static fromMatrix3(t){const e=t[0][0]+t[1][1]+t[2][2];let n,r,s,o;if(e>0){const a=.5/Math.sqrt(e+1);n=.25/a,r=(t[2][1]-t[1][2])*a,s=(t[0][2]-t[2][0])*a,o=(t[1][0]-t[0][1])*a}else if(t[0][0]>t[1][1]&&t[0][0]>t[2][2]){const a=2*Math.sqrt(1+t[0][0]-t[1][1]-t[2][2]);n=(t[2][1]-t[1][2])/a,r=.25*a,s=(t[0][1]+t[1][0])/a,o=(t[0][2]+t[2][0])/a}else if(t[1][1]>t[2][2]){const a=2*Math.sqrt(1+t[1][1]-t[0][0]-t[2][2]);n=(t[0][2]-t[2][0])/a,r=(t[0][1]+t[1][0])/a,s=.25*a,o=(t[1][2]+t[2][1])/a}else{const a=2*Math.sqrt(1+t[2][2]-t[0][0]-t[1][1]);n=(t[1][0]-t[0][1])/a,r=(t[0][2]+t[2][0])/a,s=(t[1][2]+t[2][1])/a,o=.25*a}return{w:n,x:r,y:s,z:o}}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),d=Math.sin(.5*e);return{w:c*a*s+d*l*o,x:d*a*s-c*l*o,y:c*l*s+d*a*o,z:c*a*o-d*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=Te.Z){return this.fromMatrix4(yse.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 Te{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 Te.len(Te.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=Te.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,Yi.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)}}}function tk(i,t,e,n){return r=>r.pipe(tI((s,o)=>{var a;return{targetValue:o,currentValue:null!==(a=s.currentValue)&&void 0!==a?a:o,hasReachedTarget:!1}},{targetValue:null,currentValue:null,hasReachedTarget:!1}),ks(s=>i.pipe(et(([o,a])=>{if(null===s.targetValue||null===s.currentValue)return s.currentValue;if(s.hasReachedTarget)return;const l=1-Math.exp(-a/t),c=e(s.currentValue,s.targetValue,l);return s.currentValue=c,n(c,s.targetValue)?(s.hasReachedTarget=!0,s.targetValue):c}))),et(s=>void 0!==s?s:null),gn(s=>null!==s))}ps(738);class wse extends Xh{get avgReport(){return this._avgReport}get peakReport(){return this._peakReport}constructor(t=60,e=15){super(),this.maxSamples=t,this.maxRows=e,this.tickOrder=Number.MAX_SAFE_INTEGER,this.sampleIndex=0,this.collectedData=new Map,this._avgReport={totalTime:0,entries:[]},this._peakReport={totalTime:0,entries:[]}}onSpawned(t){super.onSpawned(t),this.sampleIndex=0;const e=()=>(typeof performance>"u"?Date:performance).now();this.world.tickForwardTo$.pipe(Ve(this.onRemoved$)).subscribe(n=>{n!==this&&(this.collectedData.has(n)?this.collectedData.get(n).push([this.sampleIndex,e(),0]):this.collectedData.set(n,[[this.sampleIndex,e(),0]]))}),this.world.tickForwardedTo$.pipe(Ve(this.onRemoved$)).subscribe(n=>{if(n===this)return;const r=this.collectedData.get(n);r[r.length-1][2]=e()}),this.tick$.pipe(Ve(this.onRemoved$)).subscribe(()=>{this.sampleIndex++;const n=Array.from(this.collectedData.entries());for(const[h,p]of n){for(;p.length>0&&p[0][0]h instanceof Xh?""===h.name?h.constructor.name:h.name:"PHYSICS_WORLD"===h?"Physics simulation":h,s=h=>{let p=0,m=0;for(;mh.length-m+1){m--;break}p+=h[h.length-m-1][1]}return m>1&&(h=h.slice(0,h.length-m)).push([`Rest (${m})`,p]),h};let o=0,a=Array.from(this.collectedData.entries()).map(([h,p])=>{const m=p.reduce((g,[b,v,y])=>g+y-v,0)/this.maxSamples;return o+=m,[r(h),m]}).sort((h,p)=>p[1]-h[1]);a=s(a),this._avgReport={totalTime:o,entries:a};let l=new Map,c=Array.from(this.collectedData.entries()).map(([h,p])=>{let m=0;for(const[g,b,v]of p){const y=v-b;m=Math.max(m,y),l.set(g,y+(l.get(g)||0))}return[r(h),m]}).sort((h,p)=>p[1]-h[1]);c=s(c);let d=Array.from(l.values()).reduce((h,p)=>Math.max(h,p),0);this._peakReport={totalTime:d,entries:c}})}onRemoved(){super.onRemoved(),this.collectedData=new Map,this._avgReport={totalTime:0,entries:[]},this._peakReport={totalTime:0,entries:[]}}}var Xm=function(i,t,e,n){return new(e||(e=Promise))(function(s,o){function a(d){try{c(n.next(d))}catch(h){o(h)}}function l(d){try{c(n.throw(d))}catch(h){o(h)}}function c(d){d.done?s(d.value):function r(s){return s instanceof e?s:new e(function(o){o(s)})}(d.value).then(a,l)}c((n=n.apply(i,t||[])).next())})};class yl{static get documentWorlds(){return[...yl._documentWorlds]}constructor(t,e){this.visualScene=t,this.physicsWorld=e,this.worldClock=new jH(!1),this.keyboardInput=new CC,this.name="w0x"+(yl.default_name_counter++).toString(16),this.children=[],this.tickListeners=[],this.tickStarted$=new Re,this.tickForwardTo$=new Re,this.tickForwardedTo$=new Re,this.paused$=new Re,this.disposed$=new Re,this.keyboardInput.start(),window.ggstatic?this.registerConsoleCommands(window.ggstatic):(this.onGgStaticInitialized=this.onGgStaticInitialized.bind(this),window.addEventListener("ggstatic_added",this.onGgStaticInitialized)),this.worldClock.paused$.subscribe(this.paused$),yl._documentWorlds.push(this),yl.worldCreated$.next(this)}init(){return Xm(this,void 0,void 0,function*(){yield Promise.all([this.physicsWorld.init(),this.visualScene.init()]);const t=(e,n,r)=>{e.active&&(this.tickForwardTo$.next(e),e.tick$.next([n,r]),this.tickForwardedTo$.next(e))};this.worldClock.tick$.subscribe(([e,n])=>{this.tickStarted$.next();let r=0;for(;r=oc.PHYSICS_SIMULATION);r++)t(this.tickListeners[r],e,n);for(this.tickForwardTo$.next("PHYSICS_WORLD"),this.physicsWorld.simulate(n),this.tickForwardedTo$.next("PHYSICS_WORLD");re.tickOrder-n.tickOrder),t.onSpawned(this))}removeEntity(t,e=!1){if(t.world){if(t.world!==this)throw new Error("Entity is not a part of this world");this.children.splice(this.children.findIndex(n=>n===t),1),this.tickListeners.splice(this.tickListeners.findIndex(n=>n===t),1),t.onRemoved()}e&&t.dispose()}onGgStaticInitialized(){window.removeEventListener("ggstatic_added",this.onGgStaticInitialized),this.registerConsoleCommands(window.ggstatic)}registerConsoleCommands(t){t.registerConsoleCommand(this,"timescale",(...e)=>Xm(this,void 0,void 0,function*(){return isNaN(+e[0])||(this.worldClock.timeScale=+e[0]),this.worldClock.timeScale.toString()}),"args: [ float? ]; Get current time scale of selected world clock or set it. Default value is 1.0 (no time scale applied)"),t.registerConsoleCommand(this,"fps_limit",(...e)=>Xm(this,void 0,void 0,function*(){return isNaN(+e[0])||(this.worldClock.tickRateLimit=+e[0]),this.worldClock.tickRateLimit.toString()}),"args: [ int? ]; Get current tick rate limit of selected world clock or set it. 0 means no limit applied"),t.registerConsoleCommand(this,"renderers",()=>Xm(this,void 0,void 0,function*(){return this.children.filter(e=>e instanceof ZR).map(e=>e.name).join("\n")}),"no args; Print all renderers in selected world"),t.registerConsoleCommand(this,"debug_view",(...e)=>Xm(this,void 0,void 0,function*(){let r,n="toggle";for(let o of e)["1","0"].includes(o)?n="1"===o:r=o;let s=this.children.find(o=>o instanceof ZR&&(!r||o.name===r));if(s)return s.physicsDebugViewActive="toggle"===n?!s.physicsDebugViewActive:n,s.physicsDebugViewActive?"1":"0";throw r?new Error(`Renderer with name "${r}" not found`):new Error("No renderer found")}),'args: [ 0|1?, string? ]; Turn on/off physics debug view, skip first argument to toggle value. Second argument expects renderer name, if not provided first renderer will be picked. Use "renderers" to get list of renderers in the world'),t.registerConsoleCommand(this,"performance",(...e)=>Xm(this,void 0,void 0,function*(){let n="avg",r=20;for(let d of e)["avg","peak"].includes(d)?n=d:isNaN(+d)||(r=+d);const s=new wse(r,250);this.addEntity(s),yield function bse(i,t){const e="object"==typeof t;return new Promise((n,r)=>{let o,s=!1;i.subscribe({next:a=>{o=a,s=!0},error:r,complete:()=>{s?n(o):e?n(t.defaultValue):r(new fm)}})})}(this.worldClock.tick$.pipe(Oi(r)));const o="avg"===n?s.avgReport:s.peakReport;this.removeEntity(s);const a=o.entries.map(([d,h])=>`${d}:`+new Array(Math.max(0,26-d.length)).join(" ")+`${h.toFixed(2)} ms`+("avg"===n?` (${(100*h/o.totalTime).toFixed(2)}%)`:""));let l="lightgreen";o.totalTime>12&&(l=o.totalTime<16?"yellow":"red");const c=("avg"===n?"Average":"Peak")+" Frame time";return a.unshift(c+":"+new Array(Math.max(0,26-c.length)).join(" ")+`${o.totalTime.toFixed(2)} ms`),a.unshift(`Performance report (${r} samples)`),a.join("\n")}),'args: [ int?, avg|peak? ]; Measure how much time was spent per entity in world. Arguments are samples amount (20 by default) and "peak" or "avg" choice, both arguments are optional. "avg" report sorts entities by average time consumed, "peak" records highest value for each entity')}}yl.default_name_counter=0,yl._documentWorlds=[],yl.worldCreated$=new Re;class Ese extends fse{}class XH extends mse{constructor(){super(...arguments),this._world=null}get world(){return this._world}}class Jo extends XH{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}constructor(t){super(),this.tickOrder=oc.OBJECTS_BINDING,this._position=Te.O,this._rotation=Yi.O,this.object3D=null,this.objectBody=null,t.objectBody&&(this.objectBody=t.objectBody,this.name=this.objectBody.name,this.addComponents(this.objectBody)),t.object3D&&(this.object3D=t.object3D,t.objectBody||(this._position=this.object3D.position,this._rotation=this.object3D.rotation,this.name=this.object3D.name),this.addComponents(this.object3D)),this.objectBody&&(this.tick$.subscribe(()=>{this.runTransformBinding(this.objectBody,this.object3D)}),this.runTransformBinding(this.objectBody,this.object3D))}}class Km extends pb{static fromMapArray(t,e=!1){const n=new Km(t[0]);let r=n;for(let s=1;sn.map(r=>new Km(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));othis.mapGraph.getNearestDummy(this.mapGraphNodes,this.loaderCursor$.getValue())),Ql(),Vi(r=>this._nearestDummy$.next(r))).subscribe(r=>{let o,s=new Set;if(this.options.inertia>0){o=new Set;const a=r.walkReadPreserveDepth(this.options.loadDepth+this.options.inertia);for(let l=0;lo.add(c.data)),l<=this.options.loadDepth&&a[l].forEach(c=>s.add(c.data))}else r.walkRead(this.options.loadDepth).forEach(a=>s.add(a.data)),o=s;for(const a of this.loaded.keys())o.has(a)?s.delete(a):n.includes(a)||n.push(a);for(let a of Array.from(s.keys()))e.includes(a)||e.push(a)}),this.tick$.pipe(Do(null),Ve(this._onRemoved$)).subscribe(()=>{if(n.length){for(const r of n)this.disposeChunk(r);n=[]}if(e.length)if(this._initialLoadComplete$.value&&e.length>this.options.maxNodesLoadingPerTick){let r=e.slice(0,this.options.maxNodesLoadingPerTick);e=e.slice(this.options.maxNodesLoadingPerTick),Promise.all(r.map(s=>this.loadChunk(s))).then()}else Promise.all(e.map(r=>this.loadChunk(r))).then(()=>{this._initialLoadComplete$.value||this._initialLoadComplete$.next(!0)}),e=[]})}onRemoved(){super.onRemoved(),this.loadClock&&(this.loadClock.stop(),this.loadClock=null),this.loaderCursor$.next(Te.O)}loadChunk(t){return function(i,t,e,n){return new(e||(e=Promise))(function(s,o){function a(d){try{c(n.next(d))}catch(h){o(h)}}function l(d){try{c(n.throw(d))}catch(h){o(h)}}function c(d){d.done?s(d.value):function r(s){return s instanceof e?s:new e(function(o){o(s)})}(d.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||Yi.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||Yi.O}]),[n,e]})}disposeChunk(t){this.loaded.has(t)&&(this.removeChildren(this.loaded.get(t),!0),this.loaded.delete(t))}}class Tse extends ZR{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 e4=function(i,t,e,n){return new(e||(e=Promise))(function(s,o){function a(d){try{c(n.next(d))}catch(h){o(h)}}function l(d){try{c(n.throw(d))}catch(h){o(h)}}function c(d){d.done?s(d.value):function r(s){return s instanceof e?s:new e(function(o){o(s)})}(d.value).then(a,l)}c((n=n.apply(i,t||[])).next())})};const t4={keymap:"wasd",cameraLinearSpeed:20,cameraMovementElasticity:0,cameraBoostMultiplier:2.5,cameraRotationSensitivity:1,cameraRotationElasticity:0,mouseOptions:{},ignoreMouseUnlessPointerLocked:!1,ignoreKeyboardUnlessPointerLocked:!1};class n4 extends Xh{get active(){return super.active}set active(t){!super.active&&t&&this.reset(),super.active=t}get spherical(){return this._spherical}set spherical(t){this._spherical.phi=Math.max(1e-6,Math.min(Math.PI-1e-6,t.phi)),this._spherical.theta=t.theta,this.resetMotion$.next()}constructor(t,e,n={}){super(),this.keyboard=t,this.camera=e,this.tickOrder=oc.INPUT_CONTROLLERS,this._spherical={phi:0,radius:1,theta:0},this.resetMotion$=new Re,this.options=Object.assign(Object.assign({},t4),n),n.mouseOptions&&(this.options.mouseOptions=Object.assign(Object.assign({},t4.mouseOptions),n.mouseOptions)),this.mouseInput=new qm(this.options.mouseOptions),this.directionsInput=new gse(t,this.options.keymap)}reset(){this._spherical=Te.toSpherical(Te.rot({x:0,y:0,z:-1},this.camera.rotation)),this.resetMotion$.next()}onSpawned(t){const e=Object.create(null,{onSpawned:{get:()=>super.onSpawned}});return e4(this,void 0,void 0,function*(){yield e.onSpawned.call(this,t),this._spherical=Te.toSpherical(Te.rot({x:0,y:0,z:-1},this.camera.rotation));const n=["KeyE","KeyQ"];this.camera.camera.supportsFov&&n.push("KeyZ","KeyC"),n.push("ShiftLeft");let r=Xl([this.directionsInput.output$,...n.map(c=>this.keyboard.bind(c))]).pipe(Ve(this._onRemoved$),et(([c,...d])=>{let h={direction:{},rest:[]};(!this.options.ignoreKeyboardUnlessPointerLocked||this.mouseInput.isPointerLocked)&&(h={direction:c,rest:d});let p=Object.assign({},Te.O);const[m,g,b,v,y]=h.rest;void 0!==h.direction.upDown&&(p.z=h.direction.upDown?-1:1),void 0!==h.direction.leftRight&&(p.x=h.direction.leftRight?-1:1),m!=g&&(p.y=g?-1:1);let M=0;return b!=v&&(M=b?1:-1),p=Te.norm(p),y&&(p=Te.scalarMult(p,this.options.cameraBoostMultiplier)),[p,M]}));this.options.cameraMovementElasticity>0&&(r=r.pipe(tk(this.camera.tick$,this.options.cameraMovementElasticity,([c,d],[h,p],m)=>[Te.lerp(c,h,m),p],([c,d],[h,p])=>d==p&&Te.dist(c,h)<.001)));let s=Te.O,o=0;r.subscribe(([c,d])=>{s=c,o=d});let a=qm.isTouchDevice(),l=this.mouseInput.delta$.pipe(Ve(this._onRemoved$),gn(()=>this.active&&(a||!this.options.ignoreMouseUnlessPointerLocked||this.mouseInput.isPointerLocked)));if(this.options.cameraRotationElasticity>0){const c=new ut(this._spherical);l.subscribe(h=>{const p=c.getValue();c.next({phi:Math.max(1e-6,Math.min(Math.PI-1e-6,p.phi+h.y*this.options.cameraRotationSensitivity/1e3)),theta:p.theta-h.x*this.options.cameraRotationSensitivity/1e3,radius:1})});const d=()=>{c.pipe(Ve(this._onRemoved$),tk(this.tick$,this.options.cameraRotationElasticity,(h,p,m)=>({phi:h.phi+m*(p.phi-h.phi),theta:h.theta+m*(p.theta-h.theta),radius:1}),(h,p)=>yi.dist({x:h.phi,y:h.theta},{x:p.phi,y:p.theta})<1e-4),Ve(this.resetMotion$)).subscribe(h=>{this._spherical.theta=h.theta,this._spherical.phi=h.phi})};this.resetMotion$.pipe(Ve(this._onRemoved$)).subscribe(()=>{c.next(this._spherical),d()}),d()}else l.subscribe(c=>{this._spherical.theta-=c.x*this.options.cameraRotationSensitivity/1e3,this._spherical.phi+=c.y*this.options.cameraRotationSensitivity/1e3,this._spherical.phi=Math.max(1e-6,Math.min(Math.PI-1e-6,this._spherical.phi))});this.camera.tick$.pipe(Ve(this._onRemoved$),gn(()=>this.active)).subscribe(([c,d])=>{this.camera.camera.fov+=o,this.camera.position=Te.add(this.camera.position,Te.rot(Te.scalarMult(s,this.options.cameraLinearSpeed*d/1e3),this.camera.rotation)),this.camera.rotation=Yi.lookAt(this.camera.position,Te.add(this.camera.position,Te.fromSpherical(this._spherical)))}),this.mouseInput.start(),this.directionsInput.start()})}onRemoved(){const t=Object.create(null,{onRemoved:{get:()=>super.onRemoved}});return e4(this,void 0,void 0,function*(){yield t.onRemoved.call(this),yield this.mouseInput.stop(!0),yield this.directionsInput.stop()})}}var i4=function(i,t,e,n){return new(e||(e=Promise))(function(s,o){function a(d){try{c(n.next(d))}catch(h){o(h)}}function l(d){try{c(n.throw(d))}catch(h){o(h)}}function c(d){d.done?s(d.value):function r(s){return s instanceof e?s:new e(function(o){o(s)})}(d.value).then(a,l)}c((n=n.apply(i,t||[])).next())})};const Rse={mouseOptions:{},orbiting:{sensitivityX:1,sensitivityY:1},orbitingElasticity:0,zooming:{sensitivity:1},panning:{sensitivityX:1,sensitivityY:1},dollying:{sensitivity:1}};class kse extends Xh{get active(){return super.active}set active(t){!super.active&&t&&this.reset(),super.active=t}get spherical(){return this._spherical}set spherical(t){this._spherical.phi=Math.max(1e-6,Math.min(Math.PI-1e-6,t.phi)),this._spherical.theta=t.theta,this._spherical.radius=t.radius,this.resetMotion$.next()}constructor(t,e={}){super(),this.camera=t,this.tickOrder=oc.INPUT_CONTROLLERS,this._spherical={phi:0,radius:10,theta:0},this.target=Te.O,this.resetMotion$=new Re,this.options=Object.assign(Object.assign({},Rse),e),this.mouseInput=new qm(this.options.mouseOptions)}reset(){let t=Te.dist(this.target,this.camera.position);this.target=Te.add(this.camera.position,Te.rot({x:0,y:0,z:-t},this.camera.rotation)),this._spherical=Te.toSpherical(Te.sub(this.camera.position,this.target)),this.resetMotion$.next()}onSpawned(t){const e=Object.create(null,{onSpawned:{get:()=>super.onSpawned}});return i4(this,void 0,void 0,function*(){if(yield e.onSpawned.call(this,t),this._spherical=Te.toSpherical(Te.sub(this.camera.position,this.target)),this.options.orbiting){let r=this.mouseInput.delta$.pipe(Ve(this._onRemoved$),gn(()=>this.active&&this.mouseInput.state==Ls.DRAG));if(this.options.orbitingElasticity>0){const s=new ut(this._spherical);r.subscribe(a=>{const l=s.getValue();s.next({phi:Math.max(1e-6,Math.min(Math.PI-1e-6,l.phi-a.y*this.options.orbiting.sensitivityY/1e3)),theta:l.theta-a.x*this.options.orbiting.sensitivityX/1e3,radius:1})});const o=()=>{s.pipe(Ve(this._onRemoved$),tk(this.tick$,this.options.orbitingElasticity,(a,l,c)=>({phi:a.phi+c*(l.phi-a.phi),theta:a.theta+c*(l.theta-a.theta),radius:1}),(a,l)=>yi.dist({x:a.phi,y:a.theta},{x:l.phi,y:l.theta})<1e-4),Ve(this.resetMotion$)).subscribe(a=>{this._spherical.theta=a.theta,this._spherical.phi=a.phi})};this.resetMotion$.pipe(Ve(this._onRemoved$)).subscribe(()=>{s.next(this._spherical),o()}),o()}else r.subscribe(s=>{this._spherical.theta-=s.x*this.options.orbiting.sensitivityX/1e3,this._spherical.phi-=s.y*this.options.orbiting.sensitivityY/1e3,this._spherical.phi=Math.max(1e-6,Math.min(Math.PI-1e-6,this._spherical.phi))})}this.options.zooming&&this.mouseInput.wheel$.pipe(Ve(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=Te.fromSpherical(this._spherical),o=Te.rotAround(s,{x:-Math.sin(this._spherical.theta),y:Math.cos(this._spherical.theta),z:0},Math.PI/2),a=Te.rotAround(s,Te.norm(o),Math.PI/2);this.target=Te.add(this.target,Te.add(Te.scalarMult(o,-this.options.panning.sensitivityY*r.y/1e3),Te.scalarMult(a,this.options.panning.sensitivityX*r.x/1e3)))};this.options.panning&&this.mouseInput.delta$.pipe(Ve(this._onRemoved$),gn(()=>this.mouseInput.state==Ls.DRAG_RIGHT_BUTTON)).subscribe(r=>{n(r)}),this.options.dollying&&this.mouseInput.delta$.pipe(Ve(this._onRemoved$),gn(()=>this.mouseInput.state==Ls.DRAG_MIDDLE_BUTTON)).subscribe(r=>{this._spherical.radius*=Math.pow(.95,-this.options.dollying.sensitivity*r.y/10)}),qm.isTouchDevice()&&(this.options.dollying||this.options.panning)&&this.mouseInput.twoTouchGestureDelta$.pipe(Ve(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(Ve(this._onRemoved$),gn(()=>this.active),et(()=>this._spherical)).subscribe(r=>{this.camera.position=Te.add(this.target,Te.fromSpherical(r)),this.camera.rotation=Yi.lookAt(this.camera.position,this.target)}),yield this.mouseInput.start()})}onRemoved(){const t=Object.create(null,{onRemoved:{get:()=>super.onRemoved}});return i4(this,void 0,void 0,function*(){yield t.onRemoved.call(this),yield this.mouseInput.stop(!0)})}}class Ose{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 rk=function(i,t,e,n){return new(e||(e=Promise))(function(s,o){function a(d){try{c(n.next(d))}catch(h){o(h)}}function l(d){try{c(n.throw(d))}catch(h){o(h)}}function c(d){d.done?s(d.value):function r(s){return s instanceof e?s:new e(function(o){o(s)})}(d.value).then(a,l)}c((n=n.apply(i,t||[])).next())})},yu=(()=>{return(i=yu||(yu={}))[i.Nothing=0]="Nothing",i[i.Files=1]="Files",i[i.Entities=2]="Entities",yu;var i})();const r4={cachingStrategy:yu.Nothing,position:Te.O,rotation:Yi.O,loadProps:!0},s4=i=>({meta:i.meta,resources:i.resources.map(({object3D:t,body:e})=>({object3D:t&&t.clone(),body:e&&e.clone()}))});class Fse{constructor(t){this.world=t,this.filesCache=new Map,this.loadResultCache=new Map}loadGgGlbFiles(t){return rk(this,arguments,void 0,function*(e,n=!1){if(n&&this.filesCache.has(e))return this.filesCache.get(e);const r=Promise.all([fetch(`${e}.glb`).then(o=>o.arrayBuffer()),fetch(`${e}.meta`).then(o=>o.text()).then(o=>JSON.parse(o))]);n&&this.filesCache.set(e,r);const s=yield r;return n&&this.filesCache.set(e,s),s})}loadGgGlbResources(t){return rk(this,arguments,void 0,function*(e,n=yu.Nothing){if(n==yu.Entities&&this.loadResultCache.has(e)){const c=this.loadResultCache.get(e),d=c instanceof Promise?yield c:c;return s4(d)}const[r,s]=yield this.loadGgGlbFiles(e,n==yu.Files);if(!r)throw new Error("GLB not found");const[o,a]=yield Promise.all([this.world.visualScene.loader.loadFromGgGlb(r,s),this.world.physicsWorld.loader.loadFromGgGlb(r,s)]),l={resources:[],meta:s};if(!o)return l;if(0==a.length)l.resources.push({object3D:o,body:null});else if(1==a.length)l.resources.push({object3D:o,body:a[0]});else{for(const c of a)l.resources.push({object3D:o.popChild(c.name),body:c});o.isEmpty()||l.resources.push({object3D:o,body:null})}return n==yu.Entities&&this.loadResultCache.set(e,s4(l)),l})}loadGgGlb(t){return rk(this,arguments,void 0,function*(e,n=r4){const r=Object.assign(Object.assign({},r4),n),{resources:s,meta:o}=yield this.loadGgGlbResources(e,r.cachingStrategy),a={entities:s.map(l=>new Jo({object3D:l.object3D,objectBody:l.body})),meta:o};return r.loadProps&&(a.props=yield Promise.all(o.dummies.filter(l=>l.is_prop||l.is_scene).map(l=>this.loadGgGlb(l.is_prop?(r.propsPath||e.substring(0,e.lastIndexOf("/")+1))+l.prop_id:l.scene_id,{loadProps:!!l.is_scene,position:Te.add(Te.rot(l.position,r.rotation),r.position),rotation:Yi.combineRotations(l.rotation,r.rotation)})))),a.entities.forEach(l=>{l.position=Te.add(Te.rot(Te.clone(l.position),r.rotation),r.position),l.rotation=Yi.mult(Yi.clone(l.rotation),r.rotation)}),a})}}class sk extends yl{constructor(t,e){super(t,e),this.visualScene=t,this.physicsWorld=e,this.loader=new Fse(this)}addPrimitiveRigidBody(t,e=Te.O,n=Yi.O,r={}){const s=new Jo({object3D:this.visualScene.factory.createPrimitive(t.shape,r),objectBody:this.physicsWorld.factory.createRigidBody(t)});return s.position=e,s.rotation=n,this.addEntity(s),s}addRenderer(t,e,n){const r=new Tse(this.visualScene.createRenderer(t,e,n));return this.addEntity(r),r}registerConsoleCommands(t){super.registerConsoleCommands(t),t.registerConsoleCommand(this,"gravity",(...e)=>function(i,t,e,n){return new(e||(e=Promise))(function(s,o){function a(d){try{c(n.next(d))}catch(h){o(h)}}function l(d){try{c(n.throw(d))}catch(h){o(h)}}function c(d){d.done?s(d.value):function r(s){return s instanceof e?s:new e(function(o){o(s)})}(d.value).then(a,l)}c((n=n.apply(i,t||[])).next())})}(this,void 0,void 0,function*(){if(1==e.length&&(e=["0","0",""+-+e[0]]),e.length>0){if(isNaN(+e[0])||isNaN(+e[1])||isNaN(+e[2]))throw new Error("Wrong arguments");this.physicsWorld.gravity={x:+e[0],y:+e[1],z:+e[2]}}return JSON.stringify(this.physicsWorld.gravity)}),'args: [ ?float, ?float, ?float ]; Get or set 3D world gravity vector. 1 argument sets vector {x: 0, y: 0, z: -value}, 3 arguments set the whole vector. Default value is "9.82" or "0 0 -9.82"')}}function o4(i,t=$y,e){const n=OI(i,t);return function Nse(i,t){return ti((e,n)=>{const{leading:r=!0,trailing:s=!1}=t??{};let o=!1,a=null,l=null,c=!1;const d=()=>{l?.unsubscribe(),l=null,s&&(m(),c&&n.complete())},h=()=>{l=null,c&&n.complete()},p=g=>l=Mr(i(g)).subscribe(Yn(n,d,h)),m=()=>{if(o){o=!1;const g=a;a=null,n.next(g),!c&&p(g)}};e.subscribe(Yn(n,g=>{o=!0,a=g,(!l||l.closed)&&(r?m():p(g))},()=>{c=!0,(!(s&&o&&l)||l.closed)&&n.complete()}))})}(()=>n,e)}window.gg_version="0.0.56";const Bse=0,a4=1,Use=2,l4=1,c4=2,Qc=3,lc=0,ko=1,Ns=2,Jc=0,Zm=1,d4=2,u4=3,h4=4,Vse=5,Kh=100,zse=101,Hse=102,Gse=103,$se=104,Wse=200,jse=201,Yse=202,qse=203,ak=204,lk=205,Xse=206,Kse=207,Zse=208,Qse=209,Jse=210,eoe=211,toe=212,noe=213,ioe=214,roe=0,soe=1,ooe=2,SC=3,aoe=4,loe=5,coe=6,doe=7,EC=0,uoe=1,hoe=2,bu=0,foe=1,poe=2,moe=3,goe=4,_oe=5,voe=6,yoe=7,f4="attached",cc=301,Zh=302,AC=303,DC=304,mb=306,Bs=1e3,er=1001,gb=1002,vr=1003,dk=1004,Qm=1005,cr=1006,_b=1007,bl=1008,ed=1009,p4=1010,m4=1011,vb=1012,uk=1013,xu=1014,ea=1015,Jm=1016,hk=1017,fk=1018,eg=1020,g4=35902,_4=1021,v4=1022,Po=1023,y4=1024,b4=1025,tg=1026,ng=1027,pk=1028,TC=1029,x4=1030,mk=1031,gk=1033,IC=33776,RC=33777,kC=33778,PC=33779,_k=35840,vk=35841,yk=35842,bk=35843,xk=36196,wk=37492,Mk=37496,Ck=37808,Sk=37809,Ek=37810,Ak=37811,Dk=37812,Tk=37813,Ik=37814,Rk=37815,kk=37816,Pk=37817,Ok=37818,Fk=37819,Lk=37820,Nk=37821,OC=36492,Bk=36494,Uk=36495,w4=36283,Vk=36284,zk=36285,Hk=36286,yb=2300,bb=2301,Coe=0,C4=1,Wk=2,Eoe=3201,Qh=0,Aoe=1,wu="",cs="srgb",ds="srgb-linear",jk="display-p3",LC="display-p3-linear",NC="linear",Fi="srgb",BC="rec709",UC="p3",sg=7680,Doe=512,Toe=513,Ioe=514,E4=515,Roe=516,koe=517,Poe=518,Ooe=519,A4="300 es",td=2e3;class og{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]+Us[i>>16&255]+Us[i>>24&255]+"-"+Us[255&t]+Us[t>>8&255]+"-"+Us[t>>16&15|64]+Us[t>>24&255]+"-"+Us[63&e|128]+Us[e>>8&255]+"-"+Us[e>>16&255]+Us[e>>24&255]+Us[255&n]+Us[n>>8&255]+Us[n>>16&255]+Us[n>>24&255]).toLowerCase()}function tr(i,t,e){return Math.max(t,Math.min(e,i))}function Yk(i,t){return(i%t+t)%t}function xb(i,t,e){return(1-e)*i+e*t}function co(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 yn(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 Zoe_radToDeg=function joe(i){return i*ag};class xe{constructor(t=0,e=0){xe.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(tr(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 wn{constructor(t,e,n,r,s,o,a,l,c){wn.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 d=this.elements;return d[0]=t,d[1]=r,d[2]=a,d[3]=e,d[4]=s,d[5]=l,d[6]=n,d[7]=o,d[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],d=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],F=r[2],D=r[5],k=r[8];return s[0]=o*b+a*M+l*F,s[3]=o*v+a*x+l*D,s[6]=o*y+a*C+l*k,s[1]=c*b+d*M+h*F,s[4]=c*v+d*x+h*D,s[7]=c*y+d*C+h*k,s[2]=p*b+m*M+g*F,s[5]=p*v+m*x+g*D,s[8]=p*y+m*C+g*k,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],d=t[8];return e*o*d-e*a*c-n*s*d+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],d=t[8],h=d*o-a*c,p=a*l-d*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-d*n)*b,t[2]=(a*n-r*o)*b,t[3]=p*b,t[4]=(d*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(qk.makeScale(t,e)),this}rotate(t){return this.premultiply(qk.makeRotation(-t)),this}translate(t,e){return this.premultiply(qk.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 qk=new wn;function T4(i){for(let t=i.length-1;t>=0;--t)if(i[t]>=65535)return!0;return!1}function wb(i){return document.createElementNS("http://www.w3.org/1999/xhtml",i)}function Joe(){const i=wb("canvas");return i.style.display="block",i}Int8Array,Uint8Array,Uint8ClampedArray,Int16Array,Uint16Array,Int32Array,Uint32Array,Float32Array,Float64Array;const I4={};function cg(i){i in I4||(I4[i]=!0,console.warn(i))}const R4=(new wn).set(.8224621,.177538,0,.0331941,.9668058,0,.0170827,.0723974,.9105199),k4=(new wn).set(1.2249401,-.2249404,0,-.0420569,1.0420571,0,-.0196376,-.0786361,1.0982735),Mb={[ds]:{transfer:NC,primaries:BC,luminanceCoefficients:[.2126,.7152,.0722],toReference:i=>i,fromReference:i=>i},[cs]:{transfer:Fi,primaries:BC,luminanceCoefficients:[.2126,.7152,.0722],toReference:i=>i.convertSRGBToLinear(),fromReference:i=>i.convertLinearToSRGB()},[LC]:{transfer:NC,primaries:UC,luminanceCoefficients:[.2289,.6917,.0793],toReference:i=>i.applyMatrix3(k4),fromReference:i=>i.applyMatrix3(R4)},[jk]:{transfer:Fi,primaries:UC,luminanceCoefficients:[.2289,.6917,.0793],toReference:i=>i.convertSRGBToLinear().applyMatrix3(k4),fromReference:i=>i.applyMatrix3(R4).convertLinearToSRGB()}},tae=new Set([ds,LC]),Jn={enabled:!0,_workingColorSpace:ds,get workingColorSpace(){return this._workingColorSpace},set workingColorSpace(i){if(!tae.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,Mb[e].fromReference)((0,Mb[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 Mb[i].primaries},getTransfer:function(i){return i===wu?NC:Mb[i].transfer},getLuminanceCoefficients:function(i,t=this._workingColorSpace){return i.fromArray(Mb[t].luminanceCoefficients)}};function dg(i){return i<.04045?.0773993808*i:Math.pow(.9478672986*i+.0521327014,2.4)}function Xk(i){return i<.0031308?12.92*i:1.055*Math.pow(i,.41666)-.055}let ug;class nae{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===ug&&(ug=wb("canvas")),ug.width=t.width,ug.height=t.height;const n=ug.getContext("2d");t instanceof ImageData?n.putImageData(t,0,0):n.drawImage(t,0,0,t.width,t.height),e=ug}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=wb("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 og{constructor(e=i.DEFAULT_IMAGE,n=i.DEFAULT_MAPPING,r=er,s=er,o=cr,a=bl,l=Po,c=ed,d=i.DEFAULT_ANISOTROPY,h=wu){super(),this.isTexture=!0,Object.defineProperty(this,"id",{value:rae++}),this.uuid=ta(),this.name="",this.source=new hg(e),this.mipmaps=[],this.mapping=n,this.channel=0,this.wrapS=r,this.wrapT=s,this.magFilter=o,this.minFilter=a,this.anisotropy=d,this.format=l,this.internalFormat=null,this.type=c,this.offset=new xe(0,0),this.repeat=new xe(1,1),this.center=new xe(0,0),this.rotation=0,this.matrixAutoUpdate=!0,this.matrix=new wn,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 Bs:e.x=e.x-Math.floor(e.x);break;case er:e.x=e.x<0?0:1;break;case gb: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 Bs:e.y=e.y-Math.floor(e.y);break;case er:e.y=e.y<0?0:1;break;case gb: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 gi{constructor(t=0,e=0,n=0,r=1){gi.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],d=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(d-p)<.01&&Math.abs(h-b)<.01&&Math.abs(g-v)<.01){if(Math.abs(d+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,F=(y+1)/2,D=(d+p)/4,k=(h+b)/4,B=(g+v)/4;return x>C&&x>F?x<.01?(n=0,r=.707106781,s=.707106781):(n=Math.sqrt(x),r=D/n,s=k/n):C>F?C<.01?(n=.707106781,r=0,s=.707106781):(r=Math.sqrt(C),n=D/r,s=B/r):F<.01?(n=.707106781,r=.707106781,s=0):(s=Math.sqrt(F),n=k/s,r=B/s),this.set(n,r,s,e),this}let M=Math.sqrt((v-g)*(v-g)+(h-b)*(h-b)+(p-d)*(p-d));return Math.abs(M)<.001&&(M=1),this.x=(v-g)/M,this.y=(h-b)/M,this.z=(p-d)/M,this.w=Math.acos((c+m+y-1)/2),this}setFromMatrixPosition(t){const e=t.elements;return this.x=e[12],this.y=e[13],this.z=e[14],this.w=e[15],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 sae extends og{constructor(t=1,e=1,n={}){super(),this.isRenderTarget=!0,this.width=t,this.height=e,this.depth=1,this.scissor=new gi(0,0,t,e),this.scissorTest=!1,this.viewport=new gi(0,0,t,e);const r={width:t,height:e,depth:1};n=Object.assign({generateMipmaps:!1,internalFormat:null,minFilter:cr,depthBuffer:!0,stencilBuffer:!1,resolveDepthBuffer:!0,resolveStencilBuffer:!0,depthTexture:null,samples:0,count:1},n);const s=new Oo(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 F=Math.sqrt(x),D=Math.atan2(F,y*M);v=Math.sin(v*D)/F,a=Math.sin(a*D)/F}const C=a*M;if(l=l*v+p*C,c=c*v+m*C,d=d*v+g*C,h=h*v+b*C,v===1-a){const F=1/Math.sqrt(l*l+c*c+d*d+h*h);l*=F,c*=F,d*=F,h*=F}}t[e]=l,t[e+1]=c,t[e+2]=d,t[e+3]=h}static multiplyQuaternionsFlat(t,e,n,r,s,o){const a=n[r],l=n[r+1],c=n[r+2],d=n[r+3],h=s[o],p=s[o+1],m=s[o+2],g=s[o+3];return t[e]=a*g+d*h+l*m-c*p,t[e+1]=l*g+d*p+c*h-a*m,t[e+2]=c*g+d*m+a*p-l*h,t[e+3]=d*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),d=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*d*h+c*m*g,this._y=c*m*h-p*d*g,this._z=c*d*g+p*m*h,this._w=c*d*h-p*m*g;break;case"YXZ":this._x=p*d*h+c*m*g,this._y=c*m*h-p*d*g,this._z=c*d*g-p*m*h,this._w=c*d*h+p*m*g;break;case"ZXY":this._x=p*d*h-c*m*g,this._y=c*m*h+p*d*g,this._z=c*d*g+p*m*h,this._w=c*d*h-p*m*g;break;case"ZYX":this._x=p*d*h-c*m*g,this._y=c*m*h+p*d*g,this._z=c*d*g-p*m*h,this._w=c*d*h+p*m*g;break;case"YZX":this._x=p*d*h+c*m*g,this._y=c*m*h+p*d*g,this._z=c*d*g-p*m*h,this._w=c*d*h-p*m*g;break;case"XZY":this._x=p*d*h-c*m*g,this._y=c*m*h-p*d*g,this._z=c*d*g+p*m*h,this._w=c*d*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],d=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=(d-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=(d-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+d)/m}else{const m=2*Math.sqrt(1+h-n-a);this._w=(o-r)/m,this._x=(s+c)/m,this._y=(l+d)/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(tr(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,d=e._w;return this._x=n*d+o*a+r*c-s*l,this._y=r*d+o*l+s*a-n*c,this._z=s*d+o*c+n*l-r*a,this._w=o*d-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),d=Math.atan2(c,a),h=Math.sin((1-e)*d)/c,p=Math.sin(e*d)/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 O{constructor(t=0,e=0,n=0){O.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(O4.setFromEuler(t))}applyAxisAngle(t,e){return this.applyQuaternion(O4.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),d=2*(a*e-s*r),h=2*(s*n-o*e);return this.x=e+l*c+o*h-a*d,this.y=n+l*d+a*c-s*h,this.z=r+l*h+s*d-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 Qk.copy(this).projectOnVector(t),this.sub(Qk)}reflect(t){return this.sub(Qk.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(tr(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 Qk=new O,O4=new uo;class Vs{constructor(t=new O(1/0,1/0,1/0),e=new O(-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;e=this.min.x&&t.x<=this.max.x&&t.y>=this.min.y&&t.y<=this.max.y&&t.z>=this.min.z&&t.z<=this.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.x>=this.min.x&&t.min.x<=this.max.x&&t.max.y>=this.min.y&&t.min.y<=this.max.y&&t.max.z>=this.min.z&&t.min.z<=this.max.z}intersectsSphere(t){return this.clampPoint(t.center,xl),xl.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(Cb),GC.subVectors(this.max,Cb),fg.subVectors(t.a,Cb),pg.subVectors(t.b,Cb),mg.subVectors(t.c,Cb),Cu.subVectors(pg,fg),Su.subVectors(mg,pg),ef.subVectors(fg,mg);let e=[0,-Cu.z,Cu.y,0,-Su.z,Su.y,0,-ef.z,ef.y,Cu.z,0,-Cu.x,Su.z,0,-Su.x,ef.z,0,-ef.x,-Cu.y,Cu.x,0,-Su.y,Su.x,0,-ef.y,ef.x,0];return!(!Jk(e,fg,pg,mg,GC)||(e=[1,0,0,0,1,0,0,0,1],!Jk(e,fg,pg,mg,GC)))&&($C.crossVectors(Cu,Su),e=[$C.x,$C.y,$C.z],Jk(e,fg,pg,mg,GC))}clampPoint(t,e){return e.copy(t).clamp(this.min,this.max)}distanceToPoint(t){return this.clampPoint(t,xl).distanceTo(t)}getBoundingSphere(t){return this.isEmpty()?t.makeEmpty():(this.getCenter(t.center),t.radius=.5*this.getSize(xl).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()||(nd[0].set(this.min.x,this.min.y,this.min.z).applyMatrix4(t),nd[1].set(this.min.x,this.min.y,this.max.z).applyMatrix4(t),nd[2].set(this.min.x,this.max.y,this.min.z).applyMatrix4(t),nd[3].set(this.min.x,this.max.y,this.max.z).applyMatrix4(t),nd[4].set(this.max.x,this.min.y,this.min.z).applyMatrix4(t),nd[5].set(this.max.x,this.min.y,this.max.z).applyMatrix4(t),nd[6].set(this.max.x,this.max.y,this.min.z).applyMatrix4(t),nd[7].set(this.max.x,this.max.y,this.max.z).applyMatrix4(t),this.setFromPoints(nd)),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 nd=[new O,new O,new O,new O,new O,new O,new O,new O],xl=new O,HC=new Vs,fg=new O,pg=new O,mg=new O,Cu=new O,Su=new O,ef=new O,Cb=new O,GC=new O,$C=new O,tf=new O;function Jk(i,t,e,n,r){for(let s=0,o=i.length-3;s<=o;s+=3){tf.fromArray(i,s);const a=r.x*Math.abs(tf.x)+r.y*Math.abs(tf.y)+r.z*Math.abs(tf.z),l=t.dot(tf),c=e.dot(tf),d=n.dot(tf);if(Math.max(-Math.max(l,c,d),Math.min(l,c,d))>a)return!1}return!0}const oae=new Vs,Sb=new O,eP=new O;class zs{constructor(t=new O,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):oae.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;Sb.subVectors(t,this.center);const e=Sb.lengthSq();if(e>this.radius*this.radius){const n=Math.sqrt(e),r=.5*(n-this.radius);this.center.addScaledVector(Sb,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):(eP.subVectors(t.center,this.center).setLength(t.radius),this.expandByPoint(Sb.copy(t.center).add(eP)),this.expandByPoint(Sb.copy(t.center).sub(eP))),this)}equals(t){return t.center.equals(this.center)&&t.radius===this.radius}clone(){return(new this.constructor).copy(this)}}const id=new O,tP=new O,WC=new O,Eu=new O,nP=new O,jC=new O,iP=new O;class Eb{constructor(t=new O,e=new O(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,id)),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=id.subVectors(t,this.origin).dot(this.direction);return e<0?this.origin.distanceToSquared(t):(id.copy(this.origin).addScaledVector(this.direction,e),id.distanceToSquared(t))}distanceSqToSegment(t,e,n,r){tP.copy(t).add(e).multiplyScalar(.5),WC.copy(e).sub(t).normalize(),Eu.copy(this.origin).sub(tP);const s=.5*t.distanceTo(e),o=-this.direction.dot(WC),a=Eu.dot(this.direction),l=-Eu.dot(WC),c=Eu.lengthSq(),d=Math.abs(1-o*o);let h,p,m,g;if(d>0)if(h=o*l-a,p=o*a-l,g=s*d,h>=0)if(p>=-g)if(p<=g){const b=1/d;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(tP).addScaledVector(WC,p),m}intersectSphere(t,e){id.subVectors(t.center,this.origin);const n=id.dot(this.direction),r=id.dot(id)-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,d=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),d>=0?(s=(t.min.y-p.y)*d,o=(t.max.y-p.y)*d):(s=(t.max.y-p.y)*d,o=(t.min.y-p.y)*d),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,id)}intersectTriangle(t,e,n,r,s){nP.subVectors(e,t),jC.subVectors(n,t),iP.crossVectors(nP,jC);let a,o=this.direction.dot(iP);if(o>0){if(r)return null;a=1}else{if(!(o<0))return null;a=-1,o=-o}Eu.subVectors(this.origin,t);const l=a*this.direction.dot(jC.crossVectors(Eu,jC));if(l<0)return null;const c=a*this.direction.dot(nP.cross(Eu));if(c<0||l+c>o)return null;const d=-a*Eu.dot(iP);return d<0?null:this.at(d/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 Nt{constructor(t,e,n,r,s,o,a,l,c,d,h,p,m,g,b,v){Nt.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,d,h,p,m,g,b,v)}set(t,e,n,r,s,o,a,l,c,d,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]=d,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 Nt).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/gg.setFromMatrixColumn(t,0).length(),s=1/gg.setFromMatrixColumn(t,1).length(),o=1/gg.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),d=Math.cos(s),h=Math.sin(s);if("XYZ"===t.order){const p=o*d,m=o*h,g=a*d,b=a*h;e[0]=l*d,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*d,m=l*h,g=c*d,b=c*h;e[0]=p+b*a,e[4]=g*a-m,e[8]=o*c,e[1]=o*h,e[5]=o*d,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*d,m=l*h,g=c*d,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*d,e[9]=b-p*a,e[2]=-o*c,e[6]=a,e[10]=o*l}else if("ZYX"===t.order){const p=o*d,m=o*h,g=a*d,b=a*h;e[0]=l*d,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*d,e[4]=b-p*h,e[8]=g*h+m,e[1]=h,e[5]=o*d,e[9]=-a*d,e[2]=-c*d,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*d,e[4]=-h,e[8]=c*d,e[1]=p*h+b,e[5]=o*d,e[9]=m*h-g,e[2]=g*h-m,e[6]=a*d,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(aae,t,lae)}lookAt(t,e,n){const r=this.elements;return na.subVectors(t,e),0===na.lengthSq()&&(na.z=1),na.normalize(),Au.crossVectors(n,na),0===Au.lengthSq()&&(1===Math.abs(n.z)?na.x+=1e-4:na.z+=1e-4,na.normalize(),Au.crossVectors(n,na)),Au.normalize(),YC.crossVectors(na,Au),r[0]=Au.x,r[4]=YC.x,r[8]=na.x,r[1]=Au.y,r[5]=YC.y,r[9]=na.y,r[2]=Au.z,r[6]=YC.z,r[10]=na.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],d=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],F=n[15],D=r[0],k=r[4],B=r[8],T=r[12],A=r[1],$=r[5],ie=r[9],ne=r[13],se=r[2],ge=r[6],q=r[10],re=r[14],J=r[3],we=r[7],Be=r[11],Ye=r[15];return s[0]=o*D+a*A+l*se+c*J,s[4]=o*k+a*$+l*ge+c*we,s[8]=o*B+a*ie+l*q+c*Be,s[12]=o*T+a*ne+l*re+c*Ye,s[1]=d*D+h*A+p*se+m*J,s[5]=d*k+h*$+p*ge+m*we,s[9]=d*B+h*ie+p*q+m*Be,s[13]=d*T+h*ne+p*re+m*Ye,s[2]=g*D+b*A+v*se+y*J,s[6]=g*k+b*$+v*ge+y*we,s[10]=g*B+b*ie+v*q+y*Be,s[14]=g*T+b*ne+v*re+y*Ye,s[3]=M*D+x*A+C*se+F*J,s[7]=M*k+x*$+C*ge+F*we,s[11]=M*B+x*ie+C*q+F*Be,s[15]=M*T+x*ne+C*re+F*Ye,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],d=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*d-s*l*d)+t[11]*(+e*c*h-e*a*m-s*o*h+n*o*m+s*a*d-n*c*d)+t[15]*(-r*a*d-e*l*h+e*a*p+r*o*h-n*o*p+n*l*d)}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],d=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-d*v*c-g*l*m+o*v*m+d*l*y-o*p*y,C=d*b*c-g*h*c+g*a*m-o*b*m-d*a*y+o*h*y,F=g*h*l-d*b*l-g*a*p+o*b*p+d*a*v-o*h*v,D=e*M+n*x+r*C+s*F;if(0===D)return this.set(0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0);const k=1/D;return t[0]=M*k,t[1]=(b*p*s-h*v*s-b*r*m+n*v*m+h*r*y-n*p*y)*k,t[2]=(a*v*s-b*l*s+b*r*c-n*v*c-a*r*y+n*l*y)*k,t[3]=(h*l*s-a*p*s-h*r*c+n*p*c+a*r*m-n*l*m)*k,t[4]=x*k,t[5]=(d*v*s-g*p*s+g*r*m-e*v*m-d*r*y+e*p*y)*k,t[6]=(g*l*s-o*v*s-g*r*c+e*v*c+o*r*y-e*l*y)*k,t[7]=(o*p*s-d*l*s+d*r*c-e*p*c-o*r*m+e*l*m)*k,t[8]=C*k,t[9]=(g*h*s-d*b*s-g*n*m+e*b*m+d*n*y-e*h*y)*k,t[10]=(o*b*s-g*a*s+g*n*c-e*b*c-o*n*y+e*a*y)*k,t[11]=(d*a*s-o*h*s-d*n*c+e*h*c+o*n*m-e*a*m)*k,t[12]=F*k,t[13]=(d*b*r-g*h*r+g*n*p-e*b*p-d*n*v+e*h*v)*k,t[14]=(g*a*r-o*b*r-g*n*l+e*b*l+o*n*v-e*a*v)*k,t[15]=(o*h*r-d*a*r+d*n*l-e*h*l-o*n*p+e*a*p)*k,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,d=s*a;return this.set(c*o+n,c*a-r*l,c*l+r*a,0,c*a+r*l,d*a+n,d*l-r*o,0,c*l-r*a,d*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,d=o+o,h=a+a,p=s*c,m=s*d,g=s*h,b=o*d,v=o*h,y=a*h,M=l*c,x=l*d,C=l*h,F=n.x,D=n.y,k=n.z;return r[0]=(1-(b+y))*F,r[1]=(m+C)*F,r[2]=(g-x)*F,r[3]=0,r[4]=(m-C)*D,r[5]=(1-(p+y))*D,r[6]=(v+M)*D,r[7]=0,r[8]=(g+x)*k,r[9]=(v-M)*k,r[10]=(1-(p+b))*k,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=gg.set(r[0],r[1],r[2]).length();const o=gg.set(r[4],r[5],r[6]).length(),a=gg.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],wl.copy(this);const c=1/s,d=1/o,h=1/a;return wl.elements[0]*=c,wl.elements[1]*=c,wl.elements[2]*=c,wl.elements[4]*=d,wl.elements[5]*=d,wl.elements[6]*=d,wl.elements[8]*=h,wl.elements[9]*=h,wl.elements[10]*=h,e.setFromRotationMatrix(wl),n.x=s,n.y=o,n.z=a,this}makePerspective(t,e,n,r,s,o,a=td){const l=this.elements,c=2*s/(e-t),d=2*s/(n-r),h=(e+t)/(e-t),p=(n+r)/(n-r);let m,g;if(a===td)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]=d,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=td){const l=this.elements,c=1/(e-t),d=1/(n-r),h=1/(o-s),p=(e+t)*c,m=(n+r)*d;let g,b;if(a===td)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*d,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 gg=new O,wl=new Nt,aae=new O(0,0,0),lae=new O(1,1,1),Au=new O,YC=new O,na=new O,F4=new Nt,L4=new uo;let rd=(()=>{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],d=s[5],h=s[9],p=s[2],m=s[6],g=s[10];switch(n){case"XYZ":this._y=Math.asin(tr(l,-1,1)),Math.abs(l)<.9999999?(this._x=Math.atan2(-h,g),this._z=Math.atan2(-a,o)):(this._x=Math.atan2(m,d),this._z=0);break;case"YXZ":this._x=Math.asin(-tr(h,-1,1)),Math.abs(h)<.9999999?(this._y=Math.atan2(l,g),this._z=Math.atan2(c,d)):(this._y=Math.atan2(-p,o),this._z=0);break;case"ZXY":this._x=Math.asin(tr(m,-1,1)),Math.abs(m)<.9999999?(this._y=Math.atan2(-p,g),this._z=Math.atan2(-a,d)):(this._y=0,this._z=Math.atan2(c,o));break;case"ZYX":this._y=Math.asin(-tr(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,d));break;case"YZX":this._z=Math.asin(tr(c,-1,1)),Math.abs(c)<.9999999?(this._x=Math.atan2(-h,d),this._y=Math.atan2(-p,o)):(this._x=0,this._y=Math.atan2(l,g));break;case"XZY":this._z=Math.asin(-tr(a,-1,1)),Math.abs(a)<.9999999?(this._x=Math.atan2(m,d),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 F4.makeRotationFromQuaternion(e),this.setFromRotationMatrix(F4,n,r)}setFromVector3(e,n=this._order){return this.set(e.x,e.y,e.z,n)}reorder(e){return L4.setFromEuler(this),this.setFromQuaternion(L4,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 rP{constructor(){this.mask=1}set(t){this.mask=(1<>>0}enable(t){this.mask|=1<{class i extends og{constructor(){super(),this.isObject3D=!0,Object.defineProperty(this,"id",{value:cae++}),this.uuid=ta(),this.name="",this.type="Object3D",this.parent=null,this.children=[],this.up=i.DEFAULT_UP.clone();const e=new O,n=new rd,r=new uo,s=new O(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 Nt},normalMatrix:{value:new wn}}),this.matrix=new Nt,this.matrixWorld=new Nt,this.matrixAutoUpdate=i.DEFAULT_MATRIX_AUTO_UPDATE,this.matrixWorldAutoUpdate=i.DEFAULT_MATRIX_WORLD_AUTO_UPDATE,this.matrixWorldNeedsUpdate=!1,this.layers=new rP,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 _g.setFromAxisAngle(e,n),this.quaternion.multiply(_g),this}rotateOnWorldAxis(e,n){return _g.setFromAxisAngle(e,n),this.quaternion.premultiply(_g),this}rotateX(e){return this.rotateOnAxis(B4,e)}rotateY(e){return this.rotateOnAxis(U4,e)}rotateZ(e){return this.rotateOnAxis(V4,e)}translateOnAxis(e,n){return N4.copy(e).applyQuaternion(this.quaternion),this.position.add(N4.multiplyScalar(n)),this}translateX(e){return this.translateOnAxis(B4,e)}translateY(e){return this.translateOnAxis(U4,e)}translateZ(e){return this.translateOnAxis(V4,e)}localToWorld(e){return this.updateWorldMatrix(!0,!1),e.applyMatrix4(this.matrixWorld)}worldToLocal(e){return this.updateWorldMatrix(!0,!1),e.applyMatrix4(sd.copy(this.matrixWorld).invert())}lookAt(e,n,r){e.isVector3?qC.copy(e):qC.set(e,n,r);const s=this.parent;this.updateWorldMatrix(!0,!1),Ab.setFromMatrixPosition(this.matrixWorld),this.isCamera||this.isLight?sd.lookAt(Ab,qC,this.up):sd.lookAt(qC,Ab,this.up),this.quaternion.setFromRotationMatrix(sd),s&&(sd.extractRotation(s.matrixWorld),_g.setFromRotationMatrix(sd),this.quaternion.premultiply(_g.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.maxInstanceCount=this._maxInstanceCount,s.maxVertexCount=this._maxVertexCount,s.maxIndexCount=this._maxIndexCount,s.geometryInitialized=this._geometryInitialized,s.geometryCount=this._geometryCount,s.matricesTexture=this._matricesTexture.toJSON(e),null!==this._colorsTexture&&(s.colorsTexture=this._colorsTexture.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 d=0,h=c.length;d0){s.children=[];for(let l=0;l0){s.animations=[];for(let l=0;l0&&(r.geometries=l),c.length>0&&(r.materials=c),d.length>0&&(r.textures=d),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 d in l){const h=l[d];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){Ml.subVectors(r,e),od.subVectors(n,e),oP.subVectors(t,e);const o=Ml.dot(Ml),a=Ml.dot(od),l=Ml.dot(oP),c=od.dot(od),d=od.dot(oP),h=o*c-a*a;if(0===h)return s.set(0,0,0),null;const p=1/h,m=(c*l-a*d)*p,g=(o*d-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,ad)&&ad.x>=0&&ad.y>=0&&ad.x+ad.y<=1}static getInterpolation(t,e,n,r,s,o,a,l){return null===this.getBarycoord(t,e,n,r,ad)?(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,ad.x),l.addScaledVector(o,ad.y),l.addScaledVector(a,ad.z),l)}static isFrontFacing(t,e,n,r){return Ml.subVectors(n,e),od.subVectors(t,e),Ml.cross(od).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 Ml.subVectors(this.c,this.b),od.subVectors(this.a,this.b),.5*Ml.cross(od).length()}getMidpoint(t){return t.addVectors(this.a,this.b).add(this.c).multiplyScalar(1/3)}getNormal(t){return Oa.getNormal(this.a,this.b,this.c,t)}getPlane(t){return t.setFromCoplanarPoints(this.a,this.b,this.c)}getBarycoord(t,e){return Oa.getBarycoord(t,this.a,this.b,this.c,e)}getInterpolation(t,e,n,r,s){return Oa.getInterpolation(t,this.a,this.b,this.c,e,n,r,s)}containsPoint(t){return Oa.containsPoint(t,this.a,this.b,this.c)}isFrontFacing(t){return Oa.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;yg.subVectors(r,n),bg.subVectors(s,n),aP.subVectors(t,n);const l=yg.dot(aP),c=bg.dot(aP);if(l<=0&&c<=0)return e.copy(n);lP.subVectors(t,r);const d=yg.dot(lP),h=bg.dot(lP);if(d>=0&&h<=d)return e.copy(r);const p=l*h-d*c;if(p<=0&&l>=0&&d<=0)return o=l/(l-d),e.copy(n).addScaledVector(yg,o);cP.subVectors(t,s);const m=yg.dot(cP),g=bg.dot(cP);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(bg,a);const v=d*g-m*h;if(v<=0&&h-d>=0&&m-g>=0)return H4.subVectors(s,r),a=(h-d)/(h-d+(m-g)),e.copy(r).addScaledVector(H4,a);const y=1/(v+b+p);return o=b*y,a=p*y,e.copy(n).addScaledVector(yg,o).addScaledVector(bg,a)}equals(t){return t.a.equals(this.a)&&t.b.equals(this.b)&&t.c.equals(this.c)}}const G4={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},Du={h:0,s:0,l:0},XC={h:0,s:0,l:0};function dP(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 qe{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=cs){return t=Math.floor(t),this.r=(t>>16&255)/255,this.g=(t>>8&255)/255,this.b=(255&t)/255,Jn.toWorkingColorSpace(this,e),this}setRGB(t,e,n,r=Jn.workingColorSpace){return this.r=t,this.g=e,this.b=n,Jn.toWorkingColorSpace(this,r),this}setHSL(t,e,n,r=Jn.workingColorSpace){if(t=Yk(t,1),e=tr(e,0,1),n=tr(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=dP(o,s,t+1/3),this.g=dP(o,s,t),this.b=dP(o,s,t-1/3)}return Jn.toWorkingColorSpace(this,r),this}setStyle(t,e=cs){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=cs){const n=G4[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=dg(t.r),this.g=dg(t.g),this.b=dg(t.b),this}copyLinearToSRGB(t){return this.r=Xk(t.r),this.g=Xk(t.g),this.b=Xk(t.b),this}convertSRGBToLinear(){return this.copySRGBToLinear(this),this}convertLinearToSRGB(){return this.copyLinearToSRGB(this),this}getHex(t=cs){return Jn.fromWorkingColorSpace(Hs.copy(this),t),65536*Math.round(tr(255*Hs.r,0,255))+256*Math.round(tr(255*Hs.g,0,255))+Math.round(tr(255*Hs.b,0,255))}getHexString(t=cs){return("000000"+this.getHex(t).toString(16)).slice(-6)}getHSL(t,e=Jn.workingColorSpace){Jn.fromWorkingColorSpace(Hs.copy(this),e);const n=Hs.r,r=Hs.g,s=Hs.b,o=Math.max(n,r,s),a=Math.min(n,r,s);let l,c;const d=(a+o)/2;if(a===o)l=0,c=0;else{const h=o-a;switch(c=d<=.5?h/(o+a):h/(2-o-a),o){case n:l=(r-s)/h+(r0!=t>0&&this.version++,this._alphaTest=t}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.dispersion&&(n.dispersion=this.dispersion),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!==Zm&&(n.blending=this.blending),this.side!==lc&&(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!==ak&&(n.blendSrc=this.blendSrc),this.blendDst!==lk&&(n.blendDst=this.blendDst),this.blendEquation!==Kh&&(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!==SC&&(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!==sg&&(n.stencilFail=this.stencilFail),this.stencilZFail!==sg&&(n.stencilZFail=this.stencilZFail),this.stencilZPass!==sg&&(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++}onBuild(){console.warn("Material: onBuild() has been removed.")}onBeforeRender(){console.warn("Material: onBeforeRender() has been removed.")}}class qi extends Fo{constructor(t){super(),this.isMeshBasicMaterial=!0,this.type="MeshBasicMaterial",this.color=new qe(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 rd,this.combine=EC,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 yr=new O,KC=new xe;class Hi{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=ea,this.version=0}onUploadCallback(){}set needsUpdate(t){!0===t&&this.version++}get updateRange(){return cg("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],d=[];for(let h=0,p=c.length;h0&&(r[l]=d,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 d=[],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))&&(j4.copy(s).invert(),nf.copy(t.ray).applyMatrix4(j4),(null===n.boundingBox||!1!==nf.intersectsBox(n.boundingBox))&&this._computeIntersections(t,e,nf)))}_computeIntersections(t,e,n){let r;const s=this.geometry,o=this.material,a=s.index,l=s.attributes.position,c=s.attributes.uv,d=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:iS.clone(),object:i}}(i,t,e,n,wg,Mg,Cg,nS);if(d){r&&(JC.fromBufferAttribute(r,a),eS.fromBufferAttribute(r,l),tS.fromBufferAttribute(r,c),d.uv=Oa.getInterpolation(nS,wg,Mg,Cg,JC,eS,tS,new xe)),s&&(JC.fromBufferAttribute(s,a),eS.fromBufferAttribute(s,l),tS.fromBufferAttribute(s,c),d.uv1=Oa.getInterpolation(nS,wg,Mg,Cg,JC,eS,tS,new xe)),o&&(q4.fromBufferAttribute(o,a),X4.fromBufferAttribute(o,l),K4.fromBufferAttribute(o,c),d.normal=Oa.getInterpolation(nS,wg,Mg,Cg,q4,X4,K4,new O),d.normal.dot(n.direction)>0&&d.normal.multiplyScalar(-1));const h={a,b:l,c,normal:new O,materialIndex:0};Oa.getNormal(wg,Mg,Cg,h.normal),d.face=h}return d}class rf 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=[],d=[],h=[];let p=0,m=0;function g(b,v,y,M,x,C,F,D,k,B,T){const A=C/k,$=F/B,ie=C/2,ne=F/2,se=D/2,ge=k+1,q=B+1;let re=0,J=0;const we=new O;for(let Be=0;Be0?1:-1,d.push(we.x,we.y,we.z),h.push(It/k),h.push(1-Be/B),re+=1}for(let Be=0;Be0&&(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 fP extends Fr{constructor(){super(),this.isCamera=!0,this.type="Camera",this.matrixWorldInverse=new Nt,this.projectionMatrix=new Nt,this.projectionMatrixInverse=new Nt,this.coordinateSystem=td}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 Tu=new O,J4=new xe,e5=new xe;class br extends fP{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*ag*Math.atan(e),this.updateProjectionMatrix()}getFocalLength(){const t=Math.tan(.5*Jh*this.fov);return.5*this.getFilmHeight()/t}getEffectiveFOV(){return 2*ag*Math.atan(Math.tan(.5*Jh*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){Tu.set(-1,-1,.5).applyMatrix4(this.projectionMatrixInverse),e.set(Tu.x,Tu.y).multiplyScalar(-t/Tu.z),Tu.set(1,1,.5).applyMatrix4(this.projectionMatrixInverse),n.set(Tu.x,Tu.y).multiplyScalar(-t/Tu.z)}getViewSize(t,e){return this.getViewBounds(t,J4,e5),e.subVectors(e5,J4)}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*Jh*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 bae extends Fr{constructor(t,e,n){super(),this.type="CubeCamera",this.renderTarget=n,this.coordinateSystem=null,this.activeMipmapLevel=0;const r=new br(-90,1,t,e);r.layers=this.layers,this.add(r);const s=new br(-90,1,t,e);s.layers=this.layers,this.add(s);const o=new br(-90,1,t,e);o.layers=this.layers,this.add(o);const a=new br(-90,1,t,e);a.layers=this.layers,this.add(a);const l=new br(-90,1,t,e);l.layers=this.layers,this.add(l);const c=new br(-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===td)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,d]=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,d),t.setRenderTarget(h,p,m),t.xr.enabled=g,n.texture.needsPMREMUpdate=!0}}class sS extends Oo{constructor(t,e,n,r,s,o,a,l,c,d){super(t=void 0!==t?t:[],e=void 0!==e?e:cc,n,r,s,o,a,l,c,d),this.isCubeTexture=!0,this.flipY=!1}get images(){return this.image}set images(t){this.image=t}}class xae extends Mu{constructor(t=1,e={}){super(t,t,e),this.isWebGLCubeRenderTarget=!0;const n={width:t,height:t,depth:1};this.texture=new sS([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:cr}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 rf(5,5,5),s=new Cl({name:"CubemapFromEquirect",uniforms:Sg(n_uniforms),vertexShader:n_vertexShader,fragmentShader:n_fragmentShader,side:ko,blending:Jc});s.uniforms.tEquirect.value=e;const o=new Mn(r,s),a=e.minFilter;return e.minFilter===bl&&(e.minFilter=cr),new bae(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 pP=new O,wae=new O,Mae=new wn;class sf{constructor(t=new O(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=pP.subVectors(n,e).cross(wae.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(pP),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||Mae.getNormalMatrix(t),r=this.coplanarPoint(pP).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 af=new zs,oS=new O;class aS{constructor(t=new sf,e=new sf,n=new sf,r=new sf,s=new sf,o=new sf){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=td){const n=this.planes,r=t.elements,s=r[0],o=r[1],a=r[2],l=r[3],c=r[4],d=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+d,v+g,C+M).normalize(),n[3].setComponents(l-o,p-d,v-g,C-M).normalize(),n[4].setComponents(l-a,p-h,v-b,C-x).normalize(),e===td)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(),af.copy(t.boundingSphere).applyMatrix4(t.matrixWorld);else{const e=t.geometry;null===e.boundingSphere&&e.computeBoundingSphere(),af.copy(e.boundingSphere).applyMatrix4(t.matrixWorld)}return this.intersectsSphere(af)}intersectsSprite(t){return af.center.set(0,0,0),af.radius=.7071067811865476,af.applyMatrix4(t.matrixWorld),this.intersectsSphere(af)}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,oS.y=r.normal.y>0?t.max.y:t.min.y,oS.z=r.normal.z>0?t.max.z:t.min.z,r.distanceToPoint(oS)<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 t5(){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 Cae(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.isInterleavedBufferAttribute&&(a=a.data),a.isGLBufferAttribute){const d=t.get(a);return void((!d||d.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 ) || defined( USE_BATCHING_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 ) || defined( USE_BATCHING_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\n#ifdef USE_BATCHING_COLOR\n\tvec3 batchingColor = getBatchingColor( getIndirectIndex( gl_DrawID ) );\n\tvColor.xyz *= batchingColor.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}\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}",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_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\tfloat distanceFalloff = 1.0 / max( pow( lightDistance, decayExponent ), 0.01 );\n\tif ( cutoffDistance > 0.0 ) {\n\t\tdistanceFalloff *= pow2( saturate( 1.0 - pow4( lightDistance / cutoffDistance ) ) );\n\t}\n\treturn distanceFalloff;\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_DISPERSION\n\tmaterial.dispersion = dispersion;\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\tfloat dispersion;\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.shadowIntensity, 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.shadowIntensity, 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.shadowIntensity, 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 )\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\tfor ( int i = 0; i < MORPHTARGETS_COUNT; i ++ ) {\n\t\tif ( morphTargetInfluences[ i ] != 0.0 ) objectNormal += getMorph( gl_VertexID, i, 1 ).xyz * morphTargetInfluences[ i ];\n\t}\n#endif",morphtarget_pars_vertex:"#ifdef USE_MORPHTARGETS\n\t#ifndef USE_INSTANCING_MORPH\n\t\tuniform float morphTargetBaseInfluence;\n\t\tuniform float morphTargetInfluences[ MORPHTARGETS_COUNT ];\n\t#endif\n\tuniform sampler2DArray morphTargetsTexture;\n\tuniform ivec2 morphTargetsTextureSize;\n\tvec4 getMorph( const in int vertexIndex, const in int morphTargetIndex, const in int offset ) {\n\t\tint texelIndex = vertexIndex * MORPHTARGETS_TEXTURE_STRIDE + offset;\n\t\tint y = texelIndex / morphTargetsTextureSize.x;\n\t\tint x = texelIndex - y * morphTargetsTextureSize.x;\n\t\tivec3 morphUV = ivec3( x, y, morphTargetIndex );\n\t\treturn texelFetch( morphTargetsTexture, morphUV, 0 );\n\t}\n#endif",morphtarget_vertex:"#ifdef USE_MORPHTARGETS\n\ttransformed *= morphTargetBaseInfluence;\n\tfor ( int i = 0; i < MORPHTARGETS_COUNT; i ++ ) {\n\t\tif ( morphTargetInfluences[ i ] != 0.0 ) transformed += getMorph( gl_VertexID, i, 0 ).xyz * morphTargetInfluences[ i ];\n\t}\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.;const float ShiftRight8 = 1. / 256.;\nconst float Inv255 = 1. / 255.;\nconst vec4 PackFactors = vec4( 1.0, 256.0, 256.0 * 256.0, 256.0 * 256.0 * 256.0 );\nconst vec2 UnpackFactors2 = vec2( UnpackDownscale, 1.0 / PackFactors.g );\nconst vec3 UnpackFactors3 = vec3( UnpackDownscale / PackFactors.rg, 1.0 / PackFactors.b );\nconst vec4 UnpackFactors4 = vec4( UnpackDownscale / PackFactors.rgb, 1.0 / PackFactors.a );\nvec4 packDepthToRGBA( const in float v ) {\n\tif( v <= 0.0 )\n\t\treturn vec4( 0., 0., 0., 0. );\n\tif( v >= 1.0 )\n\t\treturn vec4( 1., 1., 1., 1. );\n\tfloat vuf;\n\tfloat af = modf( v * PackFactors.a, vuf );\n\tfloat bf = modf( vuf * ShiftRight8, vuf );\n\tfloat gf = modf( vuf * ShiftRight8, vuf );\n\treturn vec4( vuf * Inv255, gf * PackUpscale, bf * PackUpscale, af );\n}\nvec3 packDepthToRGB( const in float v ) {\n\tif( v <= 0.0 )\n\t\treturn vec3( 0., 0., 0. );\n\tif( v >= 1.0 )\n\t\treturn vec3( 1., 1., 1. );\n\tfloat vuf;\n\tfloat bf = modf( v * PackFactors.b, vuf );\n\tfloat gf = modf( vuf * ShiftRight8, vuf );\n\treturn vec3( vuf * Inv255, gf * PackUpscale, bf );\n}\nvec2 packDepthToRG( const in float v ) {\n\tif( v <= 0.0 )\n\t\treturn vec2( 0., 0. );\n\tif( v >= 1.0 )\n\t\treturn vec2( 1., 1. );\n\tfloat vuf;\n\tfloat gf = modf( v * 256., vuf );\n\treturn vec2( vuf * Inv255, gf );\n}\nfloat unpackRGBAToDepth( const in vec4 v ) {\n\treturn dot( v, UnpackFactors4 );\n}\nfloat unpackRGBToDepth( const in vec3 v ) {\n\treturn dot( v, UnpackFactors3 );\n}\nfloat unpackRGToDepth( const in vec2 v ) {\n\treturn v.r * UnpackFactors2.r + v.g * UnpackFactors2.g;\n}\nvec4 pack2HalfToRGBA( const in 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( const in 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 shadowIntensity;\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 shadowIntensity;\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 shadowIntensity;\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 shadowIntensity, 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 mix( 1.0, shadow, shadowIntensity );\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 shadowIntensity, 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 mix( 1.0, shadow, shadowIntensity );\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 shadowIntensity;\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 shadowIntensity;\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 shadowIntensity;\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.shadowIntensity, 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.shadowIntensity, 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.shadowIntensity, 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\tconst float StartCompression = 0.8 - 0.04;\n\tconst float 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, vec3( newPeak ), 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.dispersion, 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 dispersion, const in float ior, const in float thickness,\n\t\tconst in vec3 attenuationColor, const in float attenuationDistance ) {\n\t\tvec4 transmittedLight;\n\t\tvec3 transmittance;\n\t\t#ifdef USE_DISPERSION\n\t\t\tfloat halfSpread = ( ior - 1.0 ) * 0.025 * dispersion;\n\t\t\tvec3 iors = vec3( ior - halfSpread, ior, ior + halfSpread );\n\t\t\tfor ( int i = 0; i < 3; i ++ ) {\n\t\t\t\tvec3 transmissionRay = getVolumeTransmissionRay( n, v, thickness, iors[ i ], modelMatrix );\n\t\t\t\tvec3 refractedRayExit = position + transmissionRay;\n\t\t\n\t\t\t\tvec4 ndcPos = projMatrix * viewMatrix * vec4( refractedRayExit, 1.0 );\n\t\t\t\tvec2 refractionCoords = ndcPos.xy / ndcPos.w;\n\t\t\t\trefractionCoords += 1.0;\n\t\t\t\trefractionCoords /= 2.0;\n\t\t\n\t\t\t\tvec4 transmissionSample = getTransmissionSample( refractionCoords, roughness, iors[ i ] );\n\t\t\t\ttransmittedLight[ i ] = transmissionSample[ i ];\n\t\t\t\ttransmittedLight.a += transmissionSample.a;\n\t\t\t\ttransmittance[ i ] = diffuseColor[ i ] * volumeAttenuation( length( transmissionRay ), attenuationColor, attenuationDistance )[ i ];\n\t\t\t}\n\t\t\ttransmittedLight.a /= 3.0;\n\t\t\n\t\t#else\n\t\t\n\t\t\tvec3 transmissionRay = getVolumeTransmissionRay( n, v, thickness, ior, modelMatrix );\n\t\t\tvec3 refractedRayExit = position + transmissionRay;\n\t\t\tvec4 ndcPos = projMatrix * viewMatrix * vec4( refractedRayExit, 1.0 );\n\t\t\tvec2 refractionCoords = ndcPos.xy / ndcPos.w;\n\t\t\trefractionCoords += 1.0;\n\t\t\trefractionCoords /= 2.0;\n\t\t\ttransmittedLight = getTransmissionSample( refractionCoords, roughness, ior );\n\t\t\ttransmittance = diffuseColor * volumeAttenuation( length( transmissionRay ), attenuationColor, attenuationDistance );\n\t\t\n\t\t#endif\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#elif DEPTH_PACKING == 3202\n\t\tgl_FragColor = vec4( packDepthToRGB( fragCoordZ ), 1.0 );\n\t#elif DEPTH_PACKING == 3203\n\t\tgl_FragColor = vec4( packDepthToRG( fragCoordZ ), 0.0, 1.0 );\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_DISPERSION\n\tuniform float dispersion;\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}"},Qe={common:{diffuse:{value:new qe(16777215)},opacity:{value:1},map:{value:null},mapTransform:{value:new wn},alphaMap:{value:null},alphaMapTransform:{value:new wn},alphaTest:{value:0}},specularmap:{specularMap:{value:null},specularMapTransform:{value:new wn}},envmap:{envMap:{value:null},envMapRotation:{value:new wn},flipEnvMap:{value:-1},reflectivity:{value:1},ior:{value:1.5},refractionRatio:{value:.98}},aomap:{aoMap:{value:null},aoMapIntensity:{value:1},aoMapTransform:{value:new wn}},lightmap:{lightMap:{value:null},lightMapIntensity:{value:1},lightMapTransform:{value:new wn}},bumpmap:{bumpMap:{value:null},bumpMapTransform:{value:new wn},bumpScale:{value:1}},normalmap:{normalMap:{value:null},normalMapTransform:{value:new wn},normalScale:{value:new xe(1,1)}},displacementmap:{displacementMap:{value:null},displacementMapTransform:{value:new wn},displacementScale:{value:1},displacementBias:{value:0}},emissivemap:{emissiveMap:{value:null},emissiveMapTransform:{value:new wn}},metalnessmap:{metalnessMap:{value:null},metalnessMapTransform:{value:new wn}},roughnessmap:{roughnessMap:{value:null},roughnessMapTransform:{value:new wn}},gradientmap:{gradientMap:{value:null}},fog:{fogDensity:{value:25e-5},fogNear:{value:1},fogFar:{value:2e3},fogColor:{value:new qe(16777215)}},lights:{ambientLightColor:{value:[]},lightProbe:{value:[]},directionalLights:{value:[],properties:{direction:{},color:{}}},directionalLightShadows:{value:[],properties:{shadowIntensity:1,shadowBias:{},shadowNormalBias:{},shadowRadius:{},shadowMapSize:{}}},directionalShadowMap:{value:[]},directionalShadowMatrix:{value:[]},spotLights:{value:[],properties:{color:{},position:{},direction:{},distance:{},coneCos:{},penumbraCos:{},decay:{}}},spotLightShadows:{value:[],properties:{shadowIntensity:1,shadowBias:{},shadowNormalBias:{},shadowRadius:{},shadowMapSize:{}}},spotLightMap:{value:[]},spotShadowMap:{value:[]},spotLightMatrix:{value:[]},pointLights:{value:[],properties:{color:{},position:{},decay:{},distance:{}}},pointLightShadows:{value:[],properties:{shadowIntensity:1,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 qe(16777215)},opacity:{value:1},size:{value:1},scale:{value:1},map:{value:null},alphaMap:{value:null},alphaMapTransform:{value:new wn},alphaTest:{value:0},uvTransform:{value:new wn}},sprite:{diffuse:{value:new qe(16777215)},opacity:{value:1},center:{value:new xe(.5,.5)},rotation:{value:0},map:{value:null},mapTransform:{value:new wn},alphaMap:{value:null},alphaMapTransform:{value:new wn},alphaTest:{value:0}}},dc={basic:{uniforms:ho([Qe.common,Qe.specularmap,Qe.envmap,Qe.aomap,Qe.lightmap,Qe.fog]),vertexShader:Cn.meshbasic_vert,fragmentShader:Cn.meshbasic_frag},lambert:{uniforms:ho([Qe.common,Qe.specularmap,Qe.envmap,Qe.aomap,Qe.lightmap,Qe.emissivemap,Qe.bumpmap,Qe.normalmap,Qe.displacementmap,Qe.fog,Qe.lights,{emissive:{value:new qe(0)}}]),vertexShader:Cn.meshlambert_vert,fragmentShader:Cn.meshlambert_frag},phong:{uniforms:ho([Qe.common,Qe.specularmap,Qe.envmap,Qe.aomap,Qe.lightmap,Qe.emissivemap,Qe.bumpmap,Qe.normalmap,Qe.displacementmap,Qe.fog,Qe.lights,{emissive:{value:new qe(0)},specular:{value:new qe(1118481)},shininess:{value:30}}]),vertexShader:Cn.meshphong_vert,fragmentShader:Cn.meshphong_frag},standard:{uniforms:ho([Qe.common,Qe.envmap,Qe.aomap,Qe.lightmap,Qe.emissivemap,Qe.bumpmap,Qe.normalmap,Qe.displacementmap,Qe.roughnessmap,Qe.metalnessmap,Qe.fog,Qe.lights,{emissive:{value:new qe(0)},roughness:{value:1},metalness:{value:0},envMapIntensity:{value:1}}]),vertexShader:Cn.meshphysical_vert,fragmentShader:Cn.meshphysical_frag},toon:{uniforms:ho([Qe.common,Qe.aomap,Qe.lightmap,Qe.emissivemap,Qe.bumpmap,Qe.normalmap,Qe.displacementmap,Qe.gradientmap,Qe.fog,Qe.lights,{emissive:{value:new qe(0)}}]),vertexShader:Cn.meshtoon_vert,fragmentShader:Cn.meshtoon_frag},matcap:{uniforms:ho([Qe.common,Qe.bumpmap,Qe.normalmap,Qe.displacementmap,Qe.fog,{matcap:{value:null}}]),vertexShader:Cn.meshmatcap_vert,fragmentShader:Cn.meshmatcap_frag},points:{uniforms:ho([Qe.points,Qe.fog]),vertexShader:Cn.points_vert,fragmentShader:Cn.points_frag},dashed:{uniforms:ho([Qe.common,Qe.fog,{scale:{value:1},dashSize:{value:1},totalSize:{value:2}}]),vertexShader:Cn.linedashed_vert,fragmentShader:Cn.linedashed_frag},depth:{uniforms:ho([Qe.common,Qe.displacementmap]),vertexShader:Cn.depth_vert,fragmentShader:Cn.depth_frag},normal:{uniforms:ho([Qe.common,Qe.bumpmap,Qe.normalmap,Qe.displacementmap,{opacity:{value:1}}]),vertexShader:Cn.meshnormal_vert,fragmentShader:Cn.meshnormal_frag},sprite:{uniforms:ho([Qe.sprite,Qe.fog]),vertexShader:Cn.sprite_vert,fragmentShader:Cn.sprite_frag},background:{uniforms:{uvTransform:{value:new wn},t2D:{value:null},backgroundIntensity:{value:1}},vertexShader:Cn.background_vert,fragmentShader:Cn.background_frag},backgroundCube:{uniforms:{envMap:{value:null},flipEnvMap:{value:-1},backgroundBlurriness:{value:0},backgroundIntensity:{value:1},backgroundRotation:{value:new wn}},vertexShader:Cn.backgroundCube_vert,fragmentShader:Cn.backgroundCube_frag},cube:{uniforms:{tCube:{value:null},tFlip:{value:-1},opacity:{value:1}},vertexShader:Cn.cube_vert,fragmentShader:Cn.cube_frag},equirect:{uniforms:{tEquirect:{value:null}},vertexShader:Cn.equirect_vert,fragmentShader:Cn.equirect_frag},distanceRGBA:{uniforms:ho([Qe.common,Qe.displacementmap,{referencePosition:{value:new O},nearDistance:{value:1},farDistance:{value:1e3}}]),vertexShader:Cn.distanceRGBA_vert,fragmentShader:Cn.distanceRGBA_frag},shadow:{uniforms:ho([Qe.lights,Qe.fog,{color:{value:new qe(0)},opacity:{value:1}}]),vertexShader:Cn.shadow_vert,fragmentShader:Cn.shadow_frag}};dc.physical={uniforms:ho([dc.standard.uniforms,{clearcoat:{value:0},clearcoatMap:{value:null},clearcoatMapTransform:{value:new wn},clearcoatNormalMap:{value:null},clearcoatNormalMapTransform:{value:new wn},clearcoatNormalScale:{value:new xe(1,1)},clearcoatRoughness:{value:0},clearcoatRoughnessMap:{value:null},clearcoatRoughnessMapTransform:{value:new wn},dispersion:{value:0},iridescence:{value:0},iridescenceMap:{value:null},iridescenceMapTransform:{value:new wn},iridescenceIOR:{value:1.3},iridescenceThicknessMinimum:{value:100},iridescenceThicknessMaximum:{value:400},iridescenceThicknessMap:{value:null},iridescenceThicknessMapTransform:{value:new wn},sheen:{value:0},sheenColor:{value:new qe(0)},sheenColorMap:{value:null},sheenColorMapTransform:{value:new wn},sheenRoughness:{value:1},sheenRoughnessMap:{value:null},sheenRoughnessMapTransform:{value:new wn},transmission:{value:0},transmissionMap:{value:null},transmissionMapTransform:{value:new wn},transmissionSamplerSize:{value:new xe},transmissionSamplerMap:{value:null},thickness:{value:0},thicknessMap:{value:null},thicknessMapTransform:{value:new wn},attenuationDistance:{value:0},attenuationColor:{value:new qe(0)},specularColor:{value:new qe(1,1,1)},specularColorMap:{value:null},specularColorMapTransform:{value:new wn},specularIntensity:{value:1},specularIntensityMap:{value:null},specularIntensityMapTransform:{value:new wn},anisotropyVector:{value:new xe},anisotropyMap:{value:null},anisotropyMapTransform:{value:new wn}}]),vertexShader:Cn.meshphysical_vert,fragmentShader:Cn.meshphysical_frag};const lS={r:0,b:0,g:0},lf=new rd,Cce=new Nt;function Sce(i,t,e,n,r,s,o){const a=new qe(0);let c,d,l=!0===s?0:1,h=null,p=0,m=null;function g(M){let x=!0===M.isScene?M.background:null;return x&&x.isTexture&&(x=(M.backgroundBlurriness>0?e:t).get(x)),x}function y(M,x){M.getRGB(lS,Z4(i)),n.buffers.color.setClear(lS.r,lS.g,lS.b,x,o)}return{getClearColor:function(){return a},setClearColor:function(M,x=1){a.set(M),l=x,y(a,l)},getClearAlpha:function(){return l},setClearAlpha:function(M){l=M,y(a,l)},render:function b(M){let x=!1;const C=g(M);null===C?y(a,l):C&&C.isColor&&(y(C,1),x=!0);const F=i.xr.getEnvironmentBlendMode();"additive"===F?n.buffers.color.setClear(0,0,0,1,o):"alpha-blend"===F&&n.buffers.color.setClear(0,0,0,0,o),(i.autoClear||x)&&(n.buffers.depth.setTest(!0),n.buffers.depth.setMask(!0),n.buffers.color.setMask(!0),i.clear(i.autoClearColor,i.autoClearDepth,i.autoClearStencil))},addToRenderList:function v(M,x){const C=g(x);C&&(C.isCubeTexture||C.mapping===mb)?(void 0===d&&(d=new Mn(new rf(1,1,1),new Cl({name:"BackgroundCubeMaterial",uniforms:Sg(dc.backgroundCube.uniforms),vertexShader:dc.backgroundCube.vertexShader,fragmentShader:dc.backgroundCube.fragmentShader,side:ko,depthTest:!1,depthWrite:!1,fog:!1})),d.geometry.deleteAttribute("normal"),d.geometry.deleteAttribute("uv"),d.onBeforeRender=function(F,D,k){this.matrixWorld.copyPosition(k.matrixWorld)},Object.defineProperty(d.material,"envMap",{get:function(){return this.uniforms.envMap.value}}),r.update(d)),lf.copy(x.backgroundRotation),lf.x*=-1,lf.y*=-1,lf.z*=-1,C.isCubeTexture&&!1===C.isRenderTargetTexture&&(lf.y*=-1,lf.z*=-1),d.material.uniforms.envMap.value=C,d.material.uniforms.flipEnvMap.value=C.isCubeTexture&&!1===C.isRenderTargetTexture?-1:1,d.material.uniforms.backgroundBlurriness.value=x.backgroundBlurriness,d.material.uniforms.backgroundIntensity.value=x.backgroundIntensity,d.material.uniforms.backgroundRotation.value.setFromMatrix4(Cce.makeRotationFromEuler(lf)),d.material.toneMapped=Jn.getTransfer(C.colorSpace)!==Fi,(h!==C||p!==C.version||m!==i.toneMapping)&&(d.material.needsUpdate=!0,h=C,p=C.version,m=i.toneMapping),d.layers.enableAll(),M.unshift(d,d.geometry,d.material,0,0,null)):C&&C.isTexture&&(void 0===c&&(c=new Mn(new Iu(2,2),new Cl({name:"BackgroundMaterial",uniforms:Sg(dc.background.uniforms),vertexShader:dc.background.vertexShader,fragmentShader:dc.background.fragmentShader,side:lc,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=C,c.material.uniforms.backgroundIntensity.value=x.backgroundIntensity,c.material.toneMapped=Jn.getTransfer(C.colorSpace)!==Fi,!0===C.matrixAutoUpdate&&C.updateMatrix(),c.material.uniforms.uvTransform.value.copy(C.matrix),(h!==C||p!==C.version||m!==i.toneMapping)&&(c.material.needsUpdate=!0,h=C,p=C.version,m=i.toneMapping),c.layers.enableAll(),M.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(A){return i.bindVertexArray(A)}function d(A){return i.deleteVertexArray(A)}function p(A){const $=[],ie=[],ne=[];for(let se=0;se=0){const Be=se[J];let Ye=ge[J];if(void 0===Ye&&("instanceMatrix"===J&&A.instanceMatrix&&(Ye=A.instanceMatrix),"instanceColor"===J&&A.instanceColor&&(Ye=A.instanceColor)),void 0===Be||Be.attribute!==Ye||Ye&&Be.data!==Ye.data)return!0;q++}return s.attributesNum!==q||s.index!==ne}(A,ne,ie,se),ge&&function g(A,$,ie,ne){const se={},ge=$.attributes;let q=0;const re=ie.getAttributes();for(const J in re)if(re[J].location>=0){let Be=ge[J];void 0===Be&&("instanceMatrix"===J&&A.instanceMatrix&&(Be=A.instanceMatrix),"instanceColor"===J&&A.instanceColor&&(Be=A.instanceColor));const Ye={};Ye.attribute=Be,Be&&Be.data&&(Ye.data=Be.data),se[J]=Ye,q++}s.attributes=se,s.attributesNum=q,s.index=ne}(A,ne,ie,se),null!==se&&t.update(se,i.ELEMENT_ARRAY_BUFFER),(ge||o)&&(o=!1,function C(A,$,ie,ne){b();const se=ne.attributes,ge=ie.getAttributes(),q=$.defaultAttributeValues;for(const re in ge){const J=ge[re];if(J.location>=0){let we=se[re];if(void 0===we&&("instanceMatrix"===re&&A.instanceMatrix&&(we=A.instanceMatrix),"instanceColor"===re&&A.instanceColor&&(we=A.instanceColor)),void 0!==we){const Be=we.normalized,Ye=we.itemSize,It=t.get(we);if(void 0===It)continue;const en=It.buffer,ae=It.type,Oe=It.bytesPerElement,Ze=ae===i.INT||ae===i.UNSIGNED_INT||we.gpuType===uk;if(we.isInterleavedBufferAttribute){const Fe=we.data,bt=Fe.stride,St=we.offset;if(Fe.isInstancedInterleavedBuffer){for(let Mt=0;Mt0&&i.getShaderPrecisionFormat(i.FRAGMENT_SHADER,i.HIGH_FLOAT).precision>0)return"highp";D="mediump"}return"mediump"===D&&i.getShaderPrecisionFormat(i.VERTEX_SHADER,i.MEDIUM_FLOAT).precision>0&&i.getShaderPrecisionFormat(i.FRAGMENT_SHADER,i.MEDIUM_FLOAT).precision>0?"mediump":"lowp"}let c=void 0!==e.precision?e.precision:"highp";const d=l(c);d!==c&&(console.warn("THREE.WebGLRenderer:",c,"not supported, using",d,"instead."),c=d);const h=!0===e.logarithmicDepthBuffer,p=i.getParameter(i.MAX_TEXTURE_IMAGE_UNITS),m=i.getParameter(i.MAX_VERTEX_TEXTURE_IMAGE_UNITS);return{isWebGL2:!0,getMaxAnisotropy:function s(){if(void 0!==r)return r;if(!0===t.has("EXT_texture_filter_anisotropic")){const D=t.get("EXT_texture_filter_anisotropic");r=i.getParameter(D.MAX_TEXTURE_MAX_ANISOTROPY_EXT)}else r=0;return r},getMaxPrecision:l,textureFormatReadable:function o(D){return!(D!==Po&&n.convert(D)!==i.getParameter(i.IMPLEMENTATION_COLOR_READ_FORMAT))},textureTypeReadable:function a(D){const k=D===Jm&&(t.has("EXT_color_buffer_half_float")||t.has("EXT_color_buffer_float"));return!(D!==ed&&n.convert(D)!==i.getParameter(i.IMPLEMENTATION_COLOR_READ_TYPE)&&D!==ea&&!k)},precision:c,logarithmicDepthBuffer:h,maxTextures:p,maxVertexTextures:m,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:m>0,maxSamples:i.getParameter(i.MAX_SAMPLES)}}function Tce(i){const t=this;let e=null,n=0,r=!1,s=!1;const o=new sf,a=new wn,l={value:null,needsUpdate:!1};function d(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=d(g,p,x,m);for(let F=0;F!==x;++F)C[F]=e[F];y.clippingState=C,this.numIntersection=b?this.numPlanes:0,this.numPlanes+=M}}}function Ice(i){let t=new WeakMap;function e(o,a){return a===AC?o.mapping=cc:a===DC&&(o.mapping=Zh),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===AC||a===DC){if(t.has(o))return e(t.get(o).texture,o.mapping);{const l=o.image;if(l&&l.height>0){const c=new xae(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 Ib extends fP{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,d=(this.top-this.bottom)/this.view.fullHeight/this.zoom;s+=c*this.view.offsetX,o=s+c*this.view.width,a-=d*this.view.offsetY,l=a-d*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 n5=[.125,.215,.35,.446,.526,.582],mP=new Ib,r5=new qe;let gP=null,_P=0,vP=0,yP=!1;const df=(1+Math.sqrt(5))/2,Tg=1/df,s5=[new O(-df,Tg,0),new O(df,Tg,0),new O(-Tg,0,df),new O(Tg,0,df),new O(0,df,-Tg),new O(0,df,Tg),new O(-1,1,-1),new O(1,1,-1),new O(-1,1,1),new O(1,1,1)];class o5{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){gP=this._renderer.getRenderTarget(),_P=this._renderer.getActiveCubeFace(),vP=this._renderer.getActiveMipmapLevel(),yP=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=c5(),this._compileMaterial(this._cubemapMaterial))}compileEquirectangularShader(){null===this._equirectMaterial&&(this._equirectMaterial=l5(),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=n5[o-i+4-1]:0===o&&(l=0),n.push(l);const c=1/(a-2),d=-c,h=1+c,p=[d,d,h,d,h,h,d,d,h,h,d,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 D=0;D2?0:-1;M.set([k,B,0,k+2/3,B,0,k+2/3,B+1,0,k,B,0,k+2/3,B+1,0,k,B+1,0],b*g*D),x.set(p,v*g*D),C.set([D,D,D,D,D,D],y*g*D)}const F=new hn;F.setAttribute("position",new Hi(M,b)),F.setAttribute("uv",new Hi(x,v)),F.setAttribute("faceIndex",new Hi(C,y)),t.push(F),r>4&&r--}return{lodPlanes:t,sizeLods:e,sigmas:n}}(s)),this._blurMaterial=function kce(i,t,e){const n=new Float32Array(20),r=new O(0,1,0);return new Cl({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:Jc,depthTest:!1,depthWrite:!1})}(s,t,e)}return r}_compileMaterial(t){const e=new Mn(this._lodPlanes[0],t);this._renderer.compile(e,mP)}_sceneToCubeUV(t,e,n,r){const a=new br(90,1,e,n),l=[1,-1,1,1,1,1],c=[1,1,1,-1,-1,-1],d=this._renderer,h=d.autoClear,p=d.toneMapping;d.getClearColor(r5),d.toneMapping=bu,d.autoClear=!1;const m=new qi({name:"PMREM.Background",side:ko,depthWrite:!1,depthTest:!1}),g=new Mn(new rf,m);let b=!1;const v=t.background;v?v.isColor&&(m.color.copy(v),t.background=null,b=!0):(m.color.copy(r5),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;cS(r,M*x,y>2?x:0,x,x),d.setRenderTarget(r),b&&d.render(g,a),d.render(t,a)}g.geometry.dispose(),g.material.dispose(),d.toneMapping=p,d.autoClear=h,t.background=v}_textureToCubeUV(t,e){const n=this._renderer,r=t.mapping===cc||t.mapping===Zh;r?(null===this._cubemapMaterial&&(this._cubemapMaterial=c5()),this._cubemapMaterial.uniforms.flipEnvMap.value=!1===t.isRenderTargetTexture?-1:1):null===this._equirectMaterial&&(this._equirectMaterial=l5());const s=r?this._cubemapMaterial:this._equirectMaterial,o=new Mn(this._lodPlanes[0],s);s.uniforms.envMap.value=t;const l=this._cubeSize;cS(e,0,0,3*l,2*l),n.setRenderTarget(e),n.render(o,mP)}_applyPMREM(t){const e=this._renderer,n=e.autoClear;e.autoClear=!1;const r=this._lodPlanes.length;for(let s=1;s20&&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 k=0;k<20;++k){const B=k/b,T=Math.exp(-B*B/2);y.push(T),0===k?M+=T:kx-4?r-x+4:0),4*(this._cubeSize-C),3*C,2*C),l.setRenderTarget(e),l.render(h,mP)}}function a5(i,t,e){const n=new Mu(i,t,e);return n.texture.mapping=mb,n.texture.name="PMREM.cubeUv",n.scissorTest=!0,n}function cS(i,t,e,n,r){i.viewport.set(t,e,n,r),i.scissor.set(t,e,n,r)}function l5(){return new Cl({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:Jc,depthTest:!1,depthWrite:!1})}function c5(){return new Cl({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:Jc,depthTest:!1,depthWrite:!1})}function Pce(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===AC||l===DC,d=l===cc||l===Zh;if(c||d){let h=t.get(a);if(a.isRenderTargetTexture&&a.pmremVersion!==(void 0!==h?h.texture.pmremVersion:0))return null===e&&(e=new o5(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||d&&m&&function r(a){let l=0;for(let d=0;d<6;d++)void 0!==a[d]&&l++;return 6===l}(m)?(null===e&&(e=new o5(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 Oce(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&&cg("THREE.WebGLRenderer: "+n+" extension not supported."),r}}}function Fce(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&&(F=Math.ceil(C/t.maxTextureSize),C=t.maxTextureSize);const D=new Float32Array(C*F*4*h),k=new Zk(D,C,F,h);k.type=ea,k.needsUpdate=!0;const B=4*x;for(let A=0;A0)return i;const r=t*e;let s=g5[r];if(void 0===s&&(s=new Float32Array(r),g5[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 Lr(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 Ode(i,t){const e=function Pde(i){const t=Jn.getPrimaries(Jn.workingColorSpace),e=Jn.getPrimaries(i);let n;switch(t===e?n="":t===UC&&e===BC?n="LinearDisplayP3ToLinearSRGB":t===BC&&e===UC&&(n="LinearSRGBToLinearDisplayP3"),i){case ds:case LC:return[n,"LinearTransferOETF"];case cs:case jk: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 Fde(i,t){let e;switch(t){case foe:e="Linear";break;case poe:e="Reinhard";break;case moe:e="OptimizedCineon";break;case goe:e="ACESFilmic";break;case voe:e="AgX";break;case yoe:e="Neutral";break;case _oe:e="Custom";break;default:console.warn("THREE.WebGLProgram: Unsupported toneMapping:",t),e="Linear"}return"vec3 "+i+"( vec3 color ) { return "+e+"ToneMapping( color ); }"}const hS=new O;function Rb(i){return""!==i}function C5(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 S5(i,t){return i.replace(/NUM_CLIPPING_PLANES/g,t.numClippingPlanes).replace(/UNION_CLIPPING_PLANES/g,t.numClippingPlanes-t.numClipIntersection)}const Vde=/^[ \t]*#include +<([\w\d./]+)>/gm;function wP(i){return i.replace(Vde,Hde)}const zde=new Map;function Hde(i,t){let e=Cn[t];if(void 0===e){const n=zde.get(t);if(void 0===n)throw new Error("Can not resolve #include <"+t+">");e=Cn[n],console.warn('THREE.WebGLRenderer: Shader chunk "%s" has been deprecated. Use "%s" instead.',t,n)}return wP(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 E5(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(Rb).join("\n"),y.length>0&&(y+="\n")):(v=[A5(e),"#define SHADER_TYPE "+e.shaderType,"#define SHADER_NAME "+e.shaderName,g,e.extensionClipCullDistance?"#define USE_CLIP_DISTANCE":"",e.batching?"#define USE_BATCHING":"",e.batchingColor?"#define USE_BATCHING_COLOR":"",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 "+d:"",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_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.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","#ifdef USE_SKINNING","\tattribute vec4 skinIndex;","\tattribute vec4 skinWeight;","#endif","\n"].filter(Rb).join("\n"),y=[A5(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 "+d:"",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.dispersion?"#define USE_DISPERSION":"",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||e.batchingColor?"#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.decodeVideoTexture?"#define DECODE_VIDEO_TEXTURE":"",e.logarithmicDepthBuffer?"#define USE_LOGDEPTHBUF":"","uniform mat4 viewMatrix;","uniform vec3 cameraPosition;","uniform bool isOrthographic;",e.toneMapping!==bu?"#define TONE_MAPPING":"",e.toneMapping!==bu?Cn.tonemapping_pars_fragment:"",e.toneMapping!==bu?Fde("toneMapping",e.toneMapping):"",e.dithering?"#define DITHERING":"",e.opaque?"#define OPAQUE":"",Cn.colorspace_pars_fragment,Ode("linearToOutputTexel",e.outputColorSpace),(Jn.getLuminanceCoefficients(hS),["float luminance( const in vec3 rgb ) {",`\tconst vec3 weights = vec3( ${hS.x.toFixed(4)}, ${hS.y.toFixed(4)}, ${hS.z.toFixed(4)} );`,"\treturn dot( weights, rgb );","}"].join("\n")),e.useDepthPacking?"#define DEPTH_PACKING "+e.depthPacking:"","\n"].filter(Rb).join("\n")),o=wP(o),o=C5(o,e),o=S5(o,e),a=wP(a),a=C5(a,e),a=S5(a,e),o=E5(o),a=E5(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===A4?"":"layout(location = 0) out highp vec4 pc_fragColor;",e.glslVersion===A4?"":"#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,F=w5(r,r.VERTEX_SHADER,M+v+o),D=w5(r,r.FRAGMENT_SHADER,C);function k($){if(i.debug.checkShaderErrors){const ie=r.getProgramInfoLog(b).trim(),ne=r.getShaderInfoLog(F).trim(),se=r.getShaderInfoLog(D).trim();let ge=!0,q=!0;if(!1===r.getProgramParameter(b,r.LINK_STATUS))if(ge=!1,"function"==typeof i.debug.onShaderError)i.debug.onShaderError(r,b,F,D);else{const re=M5(r,F,"vertex"),J=M5(r,D,"fragment");console.error("THREE.WebGLProgram: Shader Error "+r.getError()+" - VALIDATE_STATUS "+r.getProgramParameter(b,r.VALIDATE_STATUS)+"\n\nMaterial Name: "+$.name+"\nMaterial Type: "+$.type+"\n\nProgram Info Log: "+ie+"\n"+re+"\n"+J)}else""!==ie?console.warn("THREE.WebGLProgram: Program Info Log:",ie):(""===ne||""===se)&&(q=!1);q&&($.diagnostics={runnable:ge,programLog:ie,vertexShader:{log:ne,prefix:v},fragmentShader:{log:se,prefix:y}})}r.deleteShader(F),r.deleteShader(D),B=new uS(r,b),T=function Ude(i,t){const e={},n=i.getProgramParameter(t,i.ACTIVE_ATTRIBUTES);for(let r=0;r0,ce=T.clearcoat>0,De=T.iridescence>0,Ae=T.sheen>0,Bt=T.transmission>0,Je=R&&!!T.anisotropyMap,ht=ce&&!!T.clearcoatMap,bn=ce&&!!T.clearcoatNormalMap,He=ce&&!!T.clearcoatRoughnessMap,dt=De&&!!T.iridescenceMap,jn=De&&!!T.iridescenceThicknessMap,ln=Ae&&!!T.sheenColorMap,_t=Ae&&!!T.sheenRoughnessMap,vn=!!T.specularMap,Pn=!!T.specularColorMap,Ki=!!T.specularIntensityMap,Z=Bt&&!!T.transmissionMap,We=Bt&&!!T.thicknessMap,Ee=!!T.alphaMap,ei=!!T.extensions;let xr=bu;T.toneMapped&&(null===Fe||!0===Fe.isXRRenderTarget)&&(xr=i.toneMapping);const hs={shaderID:we,shaderType:T.type,shaderName:T.name,vertexShader:en,fragmentShader:ae,defines:T.defines,customVertexShaderID:Oe,customFragmentShaderID:Ze,isRawShaderMaterial:!0===T.isRawShaderMaterial,glslVersion:T.glslVersion,precision:m,batching:St,batchingColor:St&&null!==ne._colorsTexture,instancing:bt,instancingColor:bt&&null!==ne.instanceColor,instancingMorph:bt&&null!==ne.morphTexture,supportsVertexTextures:p,outputColorSpace:null===Fe?i.outputColorSpace:!0===Fe.isXRRenderTarget?Fe.texture.colorSpace:ds,alphaToCoverage:!!T.alphaToCoverage,map:Mt,matcap:!!T.matcap,envMap:N,envMapMode:N&&re.mapping,envMapCubeUVHeight:J,aoMap:Ge,lightMap:Ne,bumpMap:nt,normalMap:Me,displacementMap:p&&Gt,emissiveMap:it,normalMapObjectSpace:Me&&T.normalMapType===Aoe,normalMapTangentSpace:Me&&T.normalMapType===Qh,metalnessMap:mt,roughnessMap:z,anisotropy:R,anisotropyMap:Je,clearcoat:ce,clearcoatMap:ht,clearcoatNormalMap:bn,clearcoatRoughnessMap:He,dispersion:T.dispersion>0,iridescence:De,iridescenceMap:dt,iridescenceThicknessMap:jn,sheen:Ae,sheenColorMap:ln,sheenRoughnessMap:_t,specularMap:vn,specularColorMap:Pn,specularIntensityMap:Ki,transmission:Bt,transmissionMap:Z,thicknessMap:We,gradientMap:!!T.gradientMap,opaque:!1===T.transparent&&T.blending===Zm&&!1===T.alphaToCoverage,alphaMap:Ee,alphaTest:T.alphaTest>0,alphaHash:!!T.alphaHash,combine:T.combine,mapUv:Mt&&b(T.map.channel),aoMapUv:Ge&&b(T.aoMap.channel),lightMapUv:Ne&&b(T.lightMap.channel),bumpMapUv:nt&&b(T.bumpMap.channel),normalMapUv:Me&&b(T.normalMap.channel),displacementMapUv:Gt&&b(T.displacementMap.channel),emissiveMapUv:it&&b(T.emissiveMap.channel),metalnessMapUv:mt&&b(T.metalnessMap.channel),roughnessMapUv:z&&b(T.roughnessMap.channel),anisotropyMapUv:Je&&b(T.anisotropyMap.channel),clearcoatMapUv:ht&&b(T.clearcoatMap.channel),clearcoatNormalMapUv:bn&&b(T.clearcoatNormalMap.channel),clearcoatRoughnessMapUv:He&&b(T.clearcoatRoughnessMap.channel),iridescenceMapUv:dt&&b(T.iridescenceMap.channel),iridescenceThicknessMapUv:jn&&b(T.iridescenceThicknessMap.channel),sheenColorMapUv:ln&&b(T.sheenColorMap.channel),sheenRoughnessMapUv:_t&&b(T.sheenRoughnessMap.channel),specularMapUv:vn&&b(T.specularMap.channel),specularColorMapUv:Pn&&b(T.specularColorMap.channel),specularIntensityMapUv:Ki&&b(T.specularIntensityMap.channel),transmissionMapUv:Z&&b(T.transmissionMap.channel),thicknessMapUv:We&&b(T.thicknessMap.channel),alphaMapUv:Ee&&b(T.alphaMap.channel),vertexTangents:!!ge.attributes.tangent&&(Me||R),vertexColors:T.vertexColors,vertexAlphas:!0===T.vertexColors&&!!ge.attributes.color&&4===ge.attributes.color.itemSize,pointsUvs:!0===ne.isPoints&&!!ge.attributes.uv&&(Mt||Ee),fog:!!se,useFog:!0===T.fog,fogExp2:!!se&&se.isFogExp2,flatShading:!0===T.flatShading,sizeAttenuation:!0===T.sizeAttenuation,logarithmicDepthBuffer:h,skinning:!0===ne.isSkinnedMesh,morphTargets:void 0!==ge.morphAttributes.position,morphNormals:void 0!==ge.morphAttributes.normal,morphColors:void 0!==ge.morphAttributes.color,morphTargetsCount:Ye,morphTextureStride:It,numDirLights:A.directional.length,numPointLights:A.point.length,numSpotLights:A.spot.length,numSpotLightMaps:A.spotLightMap.length,numRectAreaLights:A.rectArea.length,numHemiLights:A.hemi.length,numDirLightShadows:A.directionalShadowMap.length,numPointLightShadows:A.pointShadowMap.length,numSpotLightShadows:A.spotShadowMap.length,numSpotLightShadowsWithMaps:A.numSpotLightShadowsWithMaps,numLightProbes:A.numLightProbes,numClippingPlanes:o.numPlanes,numClipIntersection:o.numIntersection,dithering:T.dithering,shadowMapEnabled:i.shadowMap.enabled&&$.length>0,shadowMapType:i.shadowMap.type,toneMapping:xr,decodeVideoTexture:Mt&&!0===T.map.isVideoTexture&&Jn.getTransfer(T.map.colorSpace)===Fi,premultipliedAlpha:T.premultipliedAlpha,doubleSided:T.side===Ns,flipSided:T.side===ko,useDepthPacking:T.depthPacking>=0,depthPacking:T.depthPacking||0,index0AttributeName:T.index0AttributeName,extensionClipCullDistance:ei&&!0===T.extensions.clipCullDistance&&n.has("WEBGL_clip_cull_distance"),extensionMultiDraw:(ei&&!0===T.extensions.multiDraw||St)&&n.has("WEBGL_multi_draw"),rendererExtensionParallelShaderCompile:n.has("KHR_parallel_shader_compile"),customProgramCacheKey:T.customProgramCacheKey()};return hs.vertexUv1s=c.has(1),hs.vertexUv2s=c.has(2),hs.vertexUv3s=c.has(3),c.clear(),hs},getProgramCacheKey:function y(T){const A=[];if(T.shaderID?A.push(T.shaderID):(A.push(T.customVertexShaderID),A.push(T.customFragmentShaderID)),void 0!==T.defines)for(const $ in T.defines)A.push($),A.push(T.defines[$]);return!1===T.isRawShaderMaterial&&(function M(T,A){T.push(A.precision),T.push(A.outputColorSpace),T.push(A.envMapMode),T.push(A.envMapCubeUVHeight),T.push(A.mapUv),T.push(A.alphaMapUv),T.push(A.lightMapUv),T.push(A.aoMapUv),T.push(A.bumpMapUv),T.push(A.normalMapUv),T.push(A.displacementMapUv),T.push(A.emissiveMapUv),T.push(A.metalnessMapUv),T.push(A.roughnessMapUv),T.push(A.anisotropyMapUv),T.push(A.clearcoatMapUv),T.push(A.clearcoatNormalMapUv),T.push(A.clearcoatRoughnessMapUv),T.push(A.iridescenceMapUv),T.push(A.iridescenceThicknessMapUv),T.push(A.sheenColorMapUv),T.push(A.sheenRoughnessMapUv),T.push(A.specularMapUv),T.push(A.specularColorMapUv),T.push(A.specularIntensityMapUv),T.push(A.transmissionMapUv),T.push(A.thicknessMapUv),T.push(A.combine),T.push(A.fogExp2),T.push(A.sizeAttenuation),T.push(A.morphTargetsCount),T.push(A.morphAttributeCount),T.push(A.numDirLights),T.push(A.numPointLights),T.push(A.numSpotLights),T.push(A.numSpotLightMaps),T.push(A.numHemiLights),T.push(A.numRectAreaLights),T.push(A.numDirLightShadows),T.push(A.numPointLightShadows),T.push(A.numSpotLightShadows),T.push(A.numSpotLightShadowsWithMaps),T.push(A.numLightProbes),T.push(A.shadowMapType),T.push(A.toneMapping),T.push(A.numClippingPlanes),T.push(A.numClipIntersection),T.push(A.depthPacking)}(A,T),function x(T,A){a.disableAll(),A.supportsVertexTextures&&a.enable(0),A.instancing&&a.enable(1),A.instancingColor&&a.enable(2),A.instancingMorph&&a.enable(3),A.matcap&&a.enable(4),A.envMap&&a.enable(5),A.normalMapObjectSpace&&a.enable(6),A.normalMapTangentSpace&&a.enable(7),A.clearcoat&&a.enable(8),A.iridescence&&a.enable(9),A.alphaTest&&a.enable(10),A.vertexColors&&a.enable(11),A.vertexAlphas&&a.enable(12),A.vertexUv1s&&a.enable(13),A.vertexUv2s&&a.enable(14),A.vertexUv3s&&a.enable(15),A.vertexTangents&&a.enable(16),A.anisotropy&&a.enable(17),A.alphaHash&&a.enable(18),A.batching&&a.enable(19),A.dispersion&&a.enable(20),A.batchingColor&&a.enable(21),T.push(a.mask),a.disableAll(),A.fog&&a.enable(0),A.useFog&&a.enable(1),A.flatShading&&a.enable(2),A.logarithmicDepthBuffer&&a.enable(3),A.skinning&&a.enable(4),A.morphTargets&&a.enable(5),A.morphNormals&&a.enable(6),A.morphColors&&a.enable(7),A.premultipliedAlpha&&a.enable(8),A.shadowMapEnabled&&a.enable(9),A.doubleSided&&a.enable(10),A.flipSided&&a.enable(11),A.useDepthPacking&&a.enable(12),A.dithering&&a.enable(13),A.transmission&&a.enable(14),A.sheen&&a.enable(15),A.opaque&&a.enable(16),A.pointsUvs&&a.enable(17),A.decodeVideoTexture&&a.enable(18),A.alphaToCoverage&&a.enable(19),T.push(a.mask)}(A,T),A.push(i.outputColorSpace)),A.push(T.customProgramCacheKey),A.join()},getUniforms:function C(T){const A=g[T.type];let $;return $=A?Q4.clone(dc[A].uniforms):T.uniforms,$},acquireProgram:function F(T,A){let $;for(let ie=0,ne=d.length;ie0?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 d(){for(let h=t,p=i.length;h1&&e.sort(h||nue),n.length>1&&n.sort(p||D5),r.length>1&&r.sort(p||D5)}}}function iue(){let i=new WeakMap;return{get:function t(n,r){const s=i.get(n);let o;return void 0===s?(o=new T5,i.set(n,[o])):r>=s.length?(o=new T5,s.push(o)):o=s[r],o},dispose:function e(){i=new WeakMap}}}function rue(){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 O,color:new qe};break;case"SpotLight":e={position:new O,direction:new O,color:new qe,distance:0,coneCos:0,penumbraCos:0,decay:0};break;case"PointLight":e={position:new O,color:new qe,distance:0,decay:0};break;case"HemisphereLight":e={direction:new O,skyColor:new qe,groundColor:new qe};break;case"RectAreaLight":e={color:new qe,position:new O,halfWidth:new O,halfHeight:new O}}return i[t.id]=e,e}}}let oue=0;function aue(i,t){return(t.castShadow?2:0)-(i.castShadow?2:0)+(t.map?1:0)-(i.map?1:0)}function lue(i){const t=new rue,e=function sue(){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={shadowIntensity:1,shadowBias:0,shadowNormalBias:0,shadowRadius:1,shadowMapSize:new xe};break;case"PointLight":e={shadowIntensity:1,shadowBias:0,shadowNormalBias:0,shadowRadius:1,shadowMapSize:new xe,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 O);const r=new O,s=new Nt,o=new Nt;return{setup:function a(c){let d=0,h=0,p=0;for(let T=0;T<9;T++)n.probe[T].set(0,0,0);let m=0,g=0,b=0,v=0,y=0,M=0,x=0,C=0,F=0,D=0,k=0;c.sort(aue);for(let T=0,A=c.length;T0&&(!0===i.has("OES_texture_float_linear")?(n.rectAreaLTC1=Qe.LTC_FLOAT_1,n.rectAreaLTC2=Qe.LTC_FLOAT_2):(n.rectAreaLTC1=Qe.LTC_HALF_1,n.rectAreaLTC2=Qe.LTC_HALF_2)),n.ambient[0]=d,n.ambient[1]=h,n.ambient[2]=p;const B=n.hash;(B.directionalLength!==m||B.pointLength!==g||B.spotLength!==b||B.rectAreaLength!==v||B.hemiLength!==y||B.numDirectionalShadows!==M||B.numPointShadows!==x||B.numSpotShadows!==C||B.numSpotMaps!==F||B.numLightProbes!==k)&&(n.directional.length=m,n.spot.length=b,n.rectArea.length=v,n.point.length=g,n.hemi.length=y,n.directionalShadow.length=M,n.directionalShadowMap.length=M,n.pointShadow.length=x,n.pointShadowMap.length=x,n.spotShadow.length=C,n.spotShadowMap.length=C,n.directionalShadowMatrix.length=M,n.pointShadowMatrix.length=x,n.spotLightMatrix.length=C+F-D,n.spotLightMap.length=F,n.numSpotLightShadowsWithMaps=D,n.numLightProbes=k,B.directionalLength=m,B.pointLength=g,B.spotLength=b,B.rectAreaLength=v,B.hemiLength=y,B.numDirectionalShadows=M,B.numPointShadows=x,B.numSpotShadows=C,B.numSpotMaps=F,B.numLightProbes=k,n.version=oue++)},setupView:function l(c,d){let h=0,p=0,m=0,g=0,b=0;const v=d.matrixWorldInverse;for(let y=0,M=c.length;y=o.length?(a=new I5(i),o.push(a)):a=o[s],a},dispose:function n(){t=new WeakMap}}}class R5 extends Fo{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 k5 extends Fo{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 due="void main() {\n\tgl_Position = vec4( position, 1.0 );\n}",uue="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 hue(i,t,e){let n=new aS;const r=new xe,s=new xe,o=new gi,a=new R5({depthPacking:Eoe}),l=new k5,c={},d=e.maxTextureSize,h={[lc]:ko,[ko]:lc,[Ns]:Ns},p=new Cl({defines:{VSM_SAMPLES:8},uniforms:{shadow_pass:{value:null},resolution:{value:new xe},radius:{value:4}},vertexShader:due,fragmentShader:uue}),m=p.clone();m.defines.HORIZONTAL_PASS=1;const g=new hn;g.setAttribute("position",new Hi(new Float32Array([-1,-1,.5,3,-1,.5,-1,3,.5]),3));const b=new Mn(g,p),v=this;this.enabled=!1,this.autoUpdate=!0,this.needsUpdate=!1,this.type=l4;let y=this.type;function M(D,k){const B=t.update(b);p.defines.VSM_SAMPLES!==D.blurSamples&&(p.defines.VSM_SAMPLES=D.blurSamples,m.defines.VSM_SAMPLES=D.blurSamples,p.needsUpdate=!0,m.needsUpdate=!0),null===D.mapPass&&(D.mapPass=new Mu(r.x,r.y)),p.uniforms.shadow_pass.value=D.map.texture,p.uniforms.resolution.value=D.mapSize,p.uniforms.radius.value=D.radius,i.setRenderTarget(D.mapPass),i.clear(),i.renderBufferDirect(k,null,B,p,b,null),m.uniforms.shadow_pass.value=D.mapPass.texture,m.uniforms.resolution.value=D.mapSize,m.uniforms.radius.value=D.radius,i.setRenderTarget(D.map),i.clear(),i.renderBufferDirect(k,null,B,m,b,null)}function x(D,k,B,T){let A=null;const $=!0===B.isPointLight?D.customDistanceMaterial:D.customDepthMaterial;if(void 0!==$)A=$;else if(A=!0===B.isPointLight?l:a,i.localClippingEnabled&&!0===k.clipShadows&&Array.isArray(k.clippingPlanes)&&0!==k.clippingPlanes.length||k.displacementMap&&0!==k.displacementScale||k.alphaMap&&k.alphaTest>0||k.map&&k.alphaTest>0){const ie=A.uuid,ne=k.uuid;let se=c[ie];void 0===se&&(se={},c[ie]=se);let ge=se[ne];void 0===ge&&(ge=A.clone(),se[ne]=ge,k.addEventListener("dispose",F)),A=ge}return A.visible=k.visible,A.wireframe=k.wireframe,A.side=T===Qc?null!==k.shadowSide?k.shadowSide:k.side:null!==k.shadowSide?k.shadowSide:h[k.side],A.alphaMap=k.alphaMap,A.alphaTest=k.alphaTest,A.map=k.map,A.clipShadows=k.clipShadows,A.clippingPlanes=k.clippingPlanes,A.clipIntersection=k.clipIntersection,A.displacementMap=k.displacementMap,A.displacementScale=k.displacementScale,A.displacementBias=k.displacementBias,A.wireframeLinewidth=k.wireframeLinewidth,A.linewidth=k.linewidth,!0===B.isPointLight&&!0===A.isMeshDistanceMaterial&&(i.properties.get(A).light=B),A}function C(D,k,B,T,A){if(!1===D.visible)return;if(D.layers.test(k.layers)&&(D.isMesh||D.isLine||D.isPoints)&&(D.castShadow||D.receiveShadow&&A===Qc)&&(!D.frustumCulled||n.intersectsObject(D))){D.modelViewMatrix.multiplyMatrices(B.matrixWorldInverse,D.matrixWorld);const ne=t.update(D),se=D.material;if(Array.isArray(se)){const ge=ne.groups;for(let q=0,re=ge.length;qd||r.y>d)&&(r.x>d&&(s.x=Math.floor(d/we.x),r.x=s.x*we.x,J.mapSize.x=s.x),r.y>d&&(s.y=Math.floor(d/we.y),r.y=s.y*we.y,J.mapSize.y=s.y)),null===J.map||!0===ne||!0===se){const Ye=this.type!==Qc?{minFilter:vr,magFilter:vr}:{};null!==J.map&&J.map.dispose(),J.map=new Mu(r.x,r.y,Ye),J.map.texture.name=re.name+".shadowMap",J.camera.updateProjectionMatrix()}i.setRenderTarget(J.map),i.clear();const Be=J.getViewportCount();for(let Ye=0;Ye=1):-1!==re.indexOf("OpenGL ES")&&(q=parseFloat(/^OpenGL ES (\d)/.exec(re)[1]),ge=q>=2);let J=null,we={};const Be=i.getParameter(i.SCISSOR_BOX),Ye=i.getParameter(i.VIEWPORT),It=(new gi).fromArray(Be),en=(new gi).fromArray(Ye);function ae(Z,We,Ce,Ee){const Ke=new Uint8Array(4),tn=i.createTexture();i.bindTexture(Z,tn),i.texParameteri(Z,i.TEXTURE_MIN_FILTER,i.NEAREST),i.texParameteri(Z,i.TEXTURE_MAG_FILTER,i.NEAREST);for(let ei=0;ei"u")&&/OculusBrowser/g.test(navigator.userAgent),c=new xe,d=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(z,R){return m?new OffscreenCanvas(z,R):wb("canvas")}function b(z,R,ce){let Ie=1;const De=mt(z);if((De.width>ce||De.height>ce)&&(Ie=ce/Math.max(De.width,De.height)),Ie<1){if(typeof HTMLImageElement<"u"&&z instanceof HTMLImageElement||typeof HTMLCanvasElement<"u"&&z instanceof HTMLCanvasElement||typeof ImageBitmap<"u"&&z instanceof ImageBitmap||typeof VideoFrame<"u"&&z instanceof VideoFrame){const Ae=Math.floor(Ie*De.width),Bt=Math.floor(Ie*De.height);void 0===h&&(h=g(Ae,Bt));const Je=R?g(Ae,Bt):h;return Je.width=Ae,Je.height=Bt,Je.getContext("2d").drawImage(z,0,0,Ae,Bt),console.warn("THREE.WebGLRenderer: Texture has been resized from ("+De.width+"x"+De.height+") to ("+Ae+"x"+Bt+")."),Je}return"data"in z&&console.warn("THREE.WebGLRenderer: Image in DataTexture is too big ("+De.width+"x"+De.height+")."),z}return z}function v(z){return z.generateMipmaps&&z.minFilter!==vr&&z.minFilter!==cr}function y(z){i.generateMipmap(z)}function M(z,R,ce,Ie,De=!1){if(null!==z){if(void 0!==i[z])return i[z];console.warn("THREE.WebGLRenderer: Attempt to use non-existing WebGL internal format '"+z+"'")}let Ae=R;if(R===i.RED&&(ce===i.FLOAT&&(Ae=i.R32F),ce===i.HALF_FLOAT&&(Ae=i.R16F),ce===i.UNSIGNED_BYTE&&(Ae=i.R8)),R===i.RED_INTEGER&&(ce===i.UNSIGNED_BYTE&&(Ae=i.R8UI),ce===i.UNSIGNED_SHORT&&(Ae=i.R16UI),ce===i.UNSIGNED_INT&&(Ae=i.R32UI),ce===i.BYTE&&(Ae=i.R8I),ce===i.SHORT&&(Ae=i.R16I),ce===i.INT&&(Ae=i.R32I)),R===i.RG&&(ce===i.FLOAT&&(Ae=i.RG32F),ce===i.HALF_FLOAT&&(Ae=i.RG16F),ce===i.UNSIGNED_BYTE&&(Ae=i.RG8)),R===i.RG_INTEGER&&(ce===i.UNSIGNED_BYTE&&(Ae=i.RG8UI),ce===i.UNSIGNED_SHORT&&(Ae=i.RG16UI),ce===i.UNSIGNED_INT&&(Ae=i.RG32UI),ce===i.BYTE&&(Ae=i.RG8I),ce===i.SHORT&&(Ae=i.RG16I),ce===i.INT&&(Ae=i.RG32I)),R===i.RGB&&ce===i.UNSIGNED_INT_5_9_9_9_REV&&(Ae=i.RGB9_E5),R===i.RGBA){const Bt=De?NC:Jn.getTransfer(Ie);ce===i.FLOAT&&(Ae=i.RGBA32F),ce===i.HALF_FLOAT&&(Ae=i.RGBA16F),ce===i.UNSIGNED_BYTE&&(Ae=Bt===Fi?i.SRGB8_ALPHA8:i.RGBA8),ce===i.UNSIGNED_SHORT_4_4_4_4&&(Ae=i.RGBA4),ce===i.UNSIGNED_SHORT_5_5_5_1&&(Ae=i.RGB5_A1)}return(Ae===i.R16F||Ae===i.R32F||Ae===i.RG16F||Ae===i.RG32F||Ae===i.RGBA16F||Ae===i.RGBA32F)&&t.get("EXT_color_buffer_float"),Ae}function x(z,R){let ce;return z?null===R||R===xu||R===eg?ce=i.DEPTH24_STENCIL8:R===ea?ce=i.DEPTH32F_STENCIL8:R===vb&&(ce=i.DEPTH24_STENCIL8,console.warn("DepthTexture: 16 bit depth attachment is not supported with stencil. Using 24-bit attachment.")):null===R||R===xu||R===eg?ce=i.DEPTH_COMPONENT24:R===ea?ce=i.DEPTH_COMPONENT32F:R===vb&&(ce=i.DEPTH_COMPONENT16),ce}function C(z,R){return!0===v(z)||z.isFramebufferTexture&&z.minFilter!==vr&&z.minFilter!==cr?Math.log2(Math.max(R.width,R.height))+1:void 0!==z.mipmaps&&z.mipmaps.length>0?z.mipmaps.length:z.isCompressedTexture&&Array.isArray(z.image)?R.mipmaps.length:1}function F(z){const R=z.target;R.removeEventListener("dispose",F),function k(z){const R=n.get(z);if(void 0===R.__webglInit)return;const ce=z.source,Ie=p.get(ce);if(Ie){const De=Ie[R.__cacheKey];De.usedTimes--,0===De.usedTimes&&B(z),0===Object.keys(Ie).length&&p.delete(ce)}n.remove(z)}(R),R.isVideoTexture&&d.delete(R)}function D(z){const R=z.target;R.removeEventListener("dispose",D),function T(z){const R=n.get(z);if(z.depthTexture&&z.depthTexture.dispose(),z.isWebGLCubeRenderTarget)for(let Ie=0;Ie<6;Ie++){if(Array.isArray(R.__webglFramebuffer[Ie]))for(let De=0;De0&&ce.__version!==z.version){const Ie=z.image;if(null===Ie)console.warn("THREE.WebGLRenderer: Texture marked for update but no image data found.");else{if(!1!==Ie.complete)return void en(ce,z,R);console.warn("THREE.WebGLRenderer: Texture marked for update but image is incomplete")}}e.bindTexture(i.TEXTURE_2D,ce.__webglTexture,i.TEXTURE0+R)}const J={[Bs]:i.REPEAT,[er]:i.CLAMP_TO_EDGE,[gb]:i.MIRRORED_REPEAT},we={[vr]:i.NEAREST,[dk]:i.NEAREST_MIPMAP_NEAREST,[Qm]:i.NEAREST_MIPMAP_LINEAR,[cr]:i.LINEAR,[_b]:i.LINEAR_MIPMAP_NEAREST,[bl]:i.LINEAR_MIPMAP_LINEAR},Be={[Doe]:i.NEVER,[Ooe]:i.ALWAYS,[Toe]:i.LESS,[E4]:i.LEQUAL,[Ioe]:i.EQUAL,[Poe]:i.GEQUAL,[Roe]:i.GREATER,[koe]:i.NOTEQUAL};function Ye(z,R){if(R.type===ea&&!1===t.has("OES_texture_float_linear")&&(R.magFilter===cr||R.magFilter===_b||R.magFilter===Qm||R.magFilter===bl||R.minFilter===cr||R.minFilter===_b||R.minFilter===Qm||R.minFilter===bl)&&console.warn("THREE.WebGLRenderer: Unable to use linear filtering with floating point textures. OES_texture_float_linear not supported on this device."),i.texParameteri(z,i.TEXTURE_WRAP_S,J[R.wrapS]),i.texParameteri(z,i.TEXTURE_WRAP_T,J[R.wrapT]),(z===i.TEXTURE_3D||z===i.TEXTURE_2D_ARRAY)&&i.texParameteri(z,i.TEXTURE_WRAP_R,J[R.wrapR]),i.texParameteri(z,i.TEXTURE_MAG_FILTER,we[R.magFilter]),i.texParameteri(z,i.TEXTURE_MIN_FILTER,we[R.minFilter]),R.compareFunction&&(i.texParameteri(z,i.TEXTURE_COMPARE_MODE,i.COMPARE_REF_TO_TEXTURE),i.texParameteri(z,i.TEXTURE_COMPARE_FUNC,Be[R.compareFunction])),!0===t.has("EXT_texture_filter_anisotropic")){if(R.magFilter===vr||R.minFilter!==Qm&&R.minFilter!==bl||R.type===ea&&!1===t.has("OES_texture_float_linear"))return;if(R.anisotropy>1||n.get(R).__currentAnisotropy){const ce=t.get("EXT_texture_filter_anisotropic");i.texParameterf(z,ce.TEXTURE_MAX_ANISOTROPY_EXT,Math.min(R.anisotropy,r.getMaxAnisotropy())),n.get(R).__currentAnisotropy=R.anisotropy}}}function It(z,R){let ce=!1;void 0===z.__webglInit&&(z.__webglInit=!0,R.addEventListener("dispose",F));const Ie=R.source;let De=p.get(Ie);void 0===De&&(De={},p.set(Ie,De));const Ae=function ne(z){const R=[];return R.push(z.wrapS),R.push(z.wrapT),R.push(z.wrapR||0),R.push(z.magFilter),R.push(z.minFilter),R.push(z.anisotropy),R.push(z.internalFormat),R.push(z.format),R.push(z.type),R.push(z.generateMipmaps),R.push(z.premultiplyAlpha),R.push(z.flipY),R.push(z.unpackAlignment),R.push(z.colorSpace),R.join()}(R);if(Ae!==z.__cacheKey){void 0===De[Ae]&&(De[Ae]={texture:i.createTexture(),usedTimes:0},o.memory.textures++,ce=!0),De[Ae].usedTimes++;const Bt=De[z.__cacheKey];void 0!==Bt&&(De[z.__cacheKey].usedTimes--,0===Bt.usedTimes&&B(R)),z.__cacheKey=Ae,z.__webglTexture=De[Ae].texture}return ce}function en(z,R,ce){let Ie=i.TEXTURE_2D;(R.isDataArrayTexture||R.isCompressedArrayTexture)&&(Ie=i.TEXTURE_2D_ARRAY),R.isData3DTexture&&(Ie=i.TEXTURE_3D);const De=It(z,R),Ae=R.source;e.bindTexture(Ie,z.__webglTexture,i.TEXTURE0+ce);const Bt=n.get(Ae);if(Ae.version!==Bt.__version||!0===De){e.activeTexture(i.TEXTURE0+ce);const Je=Jn.getPrimaries(Jn.workingColorSpace),ht=R.colorSpace===wu?null:Jn.getPrimaries(R.colorSpace),bn=R.colorSpace===wu||Je===ht?i.NONE:i.BROWSER_DEFAULT_WEBGL;i.pixelStorei(i.UNPACK_FLIP_Y_WEBGL,R.flipY),i.pixelStorei(i.UNPACK_PREMULTIPLY_ALPHA_WEBGL,R.premultiplyAlpha),i.pixelStorei(i.UNPACK_ALIGNMENT,R.unpackAlignment),i.pixelStorei(i.UNPACK_COLORSPACE_CONVERSION_WEBGL,bn);let He=b(R.image,!1,r.maxTextureSize);He=it(R,He);const dt=s.convert(R.format,R.colorSpace),jn=s.convert(R.type);let _t,ln=M(R.internalFormat,dt,jn,R.colorSpace,R.isVideoTexture);Ye(Ie,R);const vn=R.mipmaps,Pn=!0!==R.isVideoTexture,Ki=void 0===Bt.__version||!0===De,Z=Ae.dataReady,We=C(R,He);if(R.isDepthTexture)ln=x(R.format===ng,R.type),Ki&&(Pn?e.texStorage2D(i.TEXTURE_2D,1,ln,He.width,He.height):e.texImage2D(i.TEXTURE_2D,0,ln,He.width,He.height,0,dt,jn,null));else if(R.isDataTexture)if(vn.length>0){Pn&&Ki&&e.texStorage2D(i.TEXTURE_2D,We,ln,vn[0].width,vn[0].height);for(let Ce=0,Ee=vn.length;Ce0){const Ke=MP(_t.width,_t.height,R.format,R.type);for(const tn of R.layerUpdates){const ei=_t.data.subarray(tn*Ke/_t.data.BYTES_PER_ELEMENT,(tn+1)*Ke/_t.data.BYTES_PER_ELEMENT);e.compressedTexSubImage3D(i.TEXTURE_2D_ARRAY,Ce,0,0,tn,_t.width,_t.height,1,dt,ei,0,0)}R.clearLayerUpdates()}else e.compressedTexSubImage3D(i.TEXTURE_2D_ARRAY,Ce,0,0,0,_t.width,_t.height,He.depth,dt,_t.data,0,0)}else e.compressedTexImage3D(i.TEXTURE_2D_ARRAY,Ce,ln,_t.width,_t.height,He.depth,0,_t.data,0,0);else console.warn("THREE.WebGLRenderer: Attempt to load unsupported compressed texture format in .uploadTexture()");else Pn?Z&&e.texSubImage3D(i.TEXTURE_2D_ARRAY,Ce,0,0,0,_t.width,_t.height,He.depth,dt,jn,_t.data):e.texImage3D(i.TEXTURE_2D_ARRAY,Ce,ln,_t.width,_t.height,He.depth,0,dt,jn,_t.data)}else{Pn&&Ki&&e.texStorage2D(i.TEXTURE_2D,We,ln,vn[0].width,vn[0].height);for(let Ce=0,Ee=vn.length;Ce0){const Ce=MP(He.width,He.height,R.format,R.type);for(const Ee of R.layerUpdates){const Ke=He.data.subarray(Ee*Ce/He.data.BYTES_PER_ELEMENT,(Ee+1)*Ce/He.data.BYTES_PER_ELEMENT);e.texSubImage3D(i.TEXTURE_2D_ARRAY,0,0,0,Ee,He.width,He.height,1,dt,jn,Ke)}R.clearLayerUpdates()}else e.texSubImage3D(i.TEXTURE_2D_ARRAY,0,0,0,0,He.width,He.height,He.depth,dt,jn,He.data)}else e.texImage3D(i.TEXTURE_2D_ARRAY,0,ln,He.width,He.height,He.depth,0,dt,jn,He.data);else if(R.isData3DTexture)Pn?(Ki&&e.texStorage3D(i.TEXTURE_3D,We,ln,He.width,He.height,He.depth),Z&&e.texSubImage3D(i.TEXTURE_3D,0,0,0,0,He.width,He.height,He.depth,dt,jn,He.data)):e.texImage3D(i.TEXTURE_3D,0,ln,He.width,He.height,He.depth,0,dt,jn,He.data);else if(R.isFramebufferTexture){if(Ki)if(Pn)e.texStorage2D(i.TEXTURE_2D,We,ln,He.width,He.height);else{let Ce=He.width,Ee=He.height;for(let Ke=0;Ke>=1,Ee>>=1}}else if(vn.length>0){if(Pn&&Ki){const Ce=mt(vn[0]);e.texStorage2D(i.TEXTURE_2D,We,ln,Ce.width,Ce.height)}for(let Ce=0,Ee=vn.length;Ce>Ae),dt=Math.max(1,R.height>>Ae);De===i.TEXTURE_3D||De===i.TEXTURE_2D_ARRAY?e.texImage3D(De,Ae,ht,He,dt,R.depth,0,Bt,Je,null):e.texImage2D(De,Ae,ht,He,dt,0,Bt,Je,null)}e.bindFramebuffer(i.FRAMEBUFFER,z),Me(R)?a.framebufferTexture2DMultisampleEXT(i.FRAMEBUFFER,Ie,De,n.get(ce).__webglTexture,0,nt(R)):(De===i.TEXTURE_2D||De>=i.TEXTURE_CUBE_MAP_POSITIVE_X&&De<=i.TEXTURE_CUBE_MAP_NEGATIVE_Z)&&i.framebufferTexture2D(i.FRAMEBUFFER,Ie,De,n.get(ce).__webglTexture,Ae),e.bindFramebuffer(i.FRAMEBUFFER,null)}function Ze(z,R,ce){if(i.bindRenderbuffer(i.RENDERBUFFER,z),R.depthBuffer){const Ie=R.depthTexture,Ae=x(R.stencilBuffer,Ie&&Ie.isDepthTexture?Ie.type:null),Bt=R.stencilBuffer?i.DEPTH_STENCIL_ATTACHMENT:i.DEPTH_ATTACHMENT,Je=nt(R);Me(R)?a.renderbufferStorageMultisampleEXT(i.RENDERBUFFER,Je,Ae,R.width,R.height):ce?i.renderbufferStorageMultisample(i.RENDERBUFFER,Je,Ae,R.width,R.height):i.renderbufferStorage(i.RENDERBUFFER,Ae,R.width,R.height),i.framebufferRenderbuffer(i.FRAMEBUFFER,Bt,i.RENDERBUFFER,z)}else{const Ie=R.textures;for(let De=0;De0&&!0===t.has("WEBGL_multisampled_render_to_texture")&&!1!==R.__useRenderToTexture}function it(z,R){const ce=z.colorSpace,Ie=z.format,De=z.type;return!0===z.isCompressedTexture||!0===z.isVideoTexture||ce!==ds&&ce!==wu&&(Jn.getTransfer(ce)===Fi?(Ie!==Po||De!==ed)&&console.warn("THREE.WebGLTextures: sRGB encoded textures have to use RGBAFormat and UnsignedByteType."):console.error("THREE.WebGLTextures: Unsupported texture color space:",ce)),R}function mt(z){return typeof HTMLImageElement<"u"&&z instanceof HTMLImageElement?(c.width=z.naturalWidth||z.width,c.height=z.naturalHeight||z.height):typeof VideoFrame<"u"&&z instanceof VideoFrame?(c.width=z.displayWidth,c.height=z.displayHeight):(c.width=z.width,c.height=z.height),c}this.allocateTextureUnit=function ie(){const z=A;return z>=r.maxTextures&&console.warn("THREE.WebGLTextures: Trying to use "+z+" texture units while this GPU supports only "+r.maxTextures),A+=1,z},this.resetTextureUnits=function $(){A=0},this.setTexture2D=se,this.setTexture2DArray=function ge(z,R){const ce=n.get(z);z.version>0&&ce.__version!==z.version?en(ce,z,R):e.bindTexture(i.TEXTURE_2D_ARRAY,ce.__webglTexture,i.TEXTURE0+R)},this.setTexture3D=function q(z,R){const ce=n.get(z);z.version>0&&ce.__version!==z.version?en(ce,z,R):e.bindTexture(i.TEXTURE_3D,ce.__webglTexture,i.TEXTURE0+R)},this.setTextureCube=function re(z,R){const ce=n.get(z);z.version>0&&ce.__version!==z.version?function ae(z,R,ce){if(6!==R.image.length)return;const Ie=It(z,R),De=R.source;e.bindTexture(i.TEXTURE_CUBE_MAP,z.__webglTexture,i.TEXTURE0+ce);const Ae=n.get(De);if(De.version!==Ae.__version||!0===Ie){e.activeTexture(i.TEXTURE0+ce);const Bt=Jn.getPrimaries(Jn.workingColorSpace),Je=R.colorSpace===wu?null:Jn.getPrimaries(R.colorSpace),ht=R.colorSpace===wu||Bt===Je?i.NONE:i.BROWSER_DEFAULT_WEBGL;i.pixelStorei(i.UNPACK_FLIP_Y_WEBGL,R.flipY),i.pixelStorei(i.UNPACK_PREMULTIPLY_ALPHA_WEBGL,R.premultiplyAlpha),i.pixelStorei(i.UNPACK_ALIGNMENT,R.unpackAlignment),i.pixelStorei(i.UNPACK_COLORSPACE_CONVERSION_WEBGL,ht);const bn=R.isCompressedTexture||R.image[0].isCompressedTexture,He=R.image[0]&&R.image[0].isDataTexture,dt=[];for(let Ee=0;Ee<6;Ee++)dt[Ee]=bn||He?He?R.image[Ee].image:R.image[Ee]:b(R.image[Ee],!0,r.maxCubemapSize),dt[Ee]=it(R,dt[Ee]);const jn=dt[0],ln=s.convert(R.format,R.colorSpace),_t=s.convert(R.type),vn=M(R.internalFormat,ln,_t,R.colorSpace),Pn=!0!==R.isVideoTexture,Ki=void 0===Ae.__version||!0===Ie,Z=De.dataReady;let Ce,We=C(R,jn);if(Ye(i.TEXTURE_CUBE_MAP,R),bn){Pn&&Ki&&e.texStorage2D(i.TEXTURE_CUBE_MAP,We,vn,jn.width,jn.height);for(let Ee=0;Ee<6;Ee++){Ce=dt[Ee].mipmaps;for(let Ke=0;Ke0&&We++;const Ee=mt(dt[0]);e.texStorage2D(i.TEXTURE_CUBE_MAP,We,vn,Ee.width,Ee.height)}for(let Ee=0;Ee<6;Ee++)if(He){Pn?Z&&e.texSubImage2D(i.TEXTURE_CUBE_MAP_POSITIVE_X+Ee,0,0,0,dt[Ee].width,dt[Ee].height,ln,_t,dt[Ee].data):e.texImage2D(i.TEXTURE_CUBE_MAP_POSITIVE_X+Ee,0,vn,dt[Ee].width,dt[Ee].height,0,ln,_t,dt[Ee].data);for(let Ke=0;Ke1;if(Bt||(void 0===Ie.__webglTexture&&(Ie.__webglTexture=i.createTexture()),Ie.__version=R.version,o.memory.textures++),Ae){ce.__webglFramebuffer=[];for(let Je=0;Je<6;Je++)if(R.mipmaps&&R.mipmaps.length>0){ce.__webglFramebuffer[Je]=[];for(let ht=0;ht0){ce.__webglFramebuffer=[];for(let Je=0;Je0&&!1===Me(z)){ce.__webglMultisampledFramebuffer=i.createFramebuffer(),ce.__webglColorRenderbuffer=[],e.bindFramebuffer(i.FRAMEBUFFER,ce.__webglMultisampledFramebuffer);for(let Je=0;Je0)for(let ht=0;ht0)for(let ht=0;ht0)if(!1===Me(z)){const R=z.textures,ce=z.width,Ie=z.height;let De=i.COLOR_BUFFER_BIT;const Ae=z.stencilBuffer?i.DEPTH_STENCIL_ATTACHMENT:i.DEPTH_ATTACHMENT,Bt=n.get(z),Je=R.length>1;if(Je)for(let ht=0;htm+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(xue)))}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 No;n.matrixAutoUpdate=!1,n.visible=!1,t.joints[e.jointName]=n,t.add(n)}return t.joints[e.jointName]}}class Cue{constructor(){this.texture=null,this.mesh=null,this.depthNear=0,this.depthFar=0}init(t,e,n){if(null===this.texture){const r=new Oo;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}}getMesh(t){if(null!==this.texture&&null===this.mesh){const e=t.cameras[0].viewport,n=new Cl({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:e.z},depthHeight:{value:e.w}}});this.mesh=new Mn(new Iu(20,20),n)}return this.mesh}reset(){this.texture=null,this.mesh=null}getDepthTexture(){return this.texture}}class Sue extends og{constructor(t,e){super();const n=this;let r=null,s=1,o=null,a="local-floor",l=1,c=null,d=null,h=null,p=null,m=null,g=null;const b=new Cue,v=e.getContextAttributes();let y=null,M=null;const x=[],C=[],F=new xe;let D=null;const k=new br;k.layers.enable(1),k.viewport=new gi;const B=new br;B.layers.enable(2),B.viewport=new gi;const T=[k,B],A=new bue;A.layers.enable(1),A.layers.enable(2);let $=null,ie=null;function ne(ae){const Oe=C.indexOf(ae.inputSource);if(-1===Oe)return;const Ze=x[Oe];void 0!==Ze&&(Ze.update(ae.inputSource,ae.frame,c||o),Ze.dispatchEvent({type:ae.type,data:ae.inputSource}))}function se(){r.removeEventListener("select",ne),r.removeEventListener("selectstart",ne),r.removeEventListener("selectend",ne),r.removeEventListener("squeeze",ne),r.removeEventListener("squeezestart",ne),r.removeEventListener("squeezeend",ne),r.removeEventListener("end",se),r.removeEventListener("inputsourceschange",ge);for(let ae=0;ae=0&&(C[Fe]=null,x[Fe].disconnect(Ze))}for(let Oe=0;Oe=C.length){C.push(Ze),Fe=St;break}if(null===C[St]){C[St]=Ze,Fe=St;break}}if(-1===Fe)break}const bt=x[Fe];bt&&bt.connect(Ze)}}this.cameraAutoUpdate=!0,this.enabled=!1,this.isPresenting=!1,this.getController=function(ae){let Oe=x[ae];return void 0===Oe&&(Oe=new CP,x[ae]=Oe),Oe.getTargetRaySpace()},this.getControllerGrip=function(ae){let Oe=x[ae];return void 0===Oe&&(Oe=new CP,x[ae]=Oe),Oe.getGripSpace()},this.getHand=function(ae){let Oe=x[ae];return void 0===Oe&&(Oe=new CP,x[ae]=Oe),Oe.getHandSpace()},this.setFramebufferScaleFactor=function(ae){s=ae,!0===n.isPresenting&&console.warn("THREE.WebXRManager: Cannot change framebuffer scale while presenting.")},this.setReferenceSpaceType=function(ae){a=ae,!0===n.isPresenting&&console.warn("THREE.WebXRManager: Cannot change reference space type while presenting.")},this.getReferenceSpace=function(){return c||o},this.setReferenceSpace=function(ae){c=ae},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 ae=tt(function*(Oe){if(r=Oe,null!==r){if(y=t.getRenderTarget(),r.addEventListener("select",ne),r.addEventListener("selectstart",ne),r.addEventListener("selectend",ne),r.addEventListener("squeeze",ne),r.addEventListener("squeezestart",ne),r.addEventListener("squeezeend",ne),r.addEventListener("end",se),r.addEventListener("inputsourceschange",ge),!0!==v.xrCompatible&&(yield e.makeXRCompatible()),D=t.getPixelRatio(),t.getSize(F),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 Mu(m.framebufferWidth,m.framebufferHeight,{format:Po,type:ed,colorSpace:t.outputColorSpace,stencilBuffer:v.stencil});else{let Ze=null,Fe=null,bt=null;v.depth&&(bt=v.stencil?e.DEPTH24_STENCIL8:e.DEPTH_COMPONENT24,Ze=v.stencil?ng:tg,Fe=v.stencil?eg:xu);const St={colorFormat:e.RGBA8,depthFormat:bt,scaleFactor:s};h=new XRWebGLBinding(r,e),p=h.createProjectionLayer(St),r.updateRenderState({layers:[p]}),t.setPixelRatio(1),t.setSize(p.textureWidth,p.textureHeight,!1),M=new Mu(p.textureWidth,p.textureHeight,{format:Po,type:ed,depthTexture:new d5(p.textureWidth,p.textureHeight,Fe,void 0,void 0,void 0,void 0,void 0,void 0,Ze),stencilBuffer:v.stencil,colorSpace:t.outputColorSpace,samples:v.antialias?4:0,resolveDepthBuffer:!1===p.ignoreDepthValues})}M.isXRRenderTarget=!0,this.setFoveation(l),c=null,o=yield r.requestReferenceSpace(a),en.setContext(r),en.start(),n.isPresenting=!0,n.dispatchEvent({type:"sessionstart"})}});return function(Oe){return ae.apply(this,arguments)}}(),this.getEnvironmentBlendMode=function(){if(null!==r)return r.environmentBlendMode},this.getDepthTexture=function(){return b.getDepthTexture()};const q=new O,re=new O;function we(ae,Oe){null===Oe?ae.matrixWorld.copy(ae.matrix):ae.matrixWorld.multiplyMatrices(Oe.matrixWorld,ae.matrix),ae.matrixWorldInverse.copy(ae.matrixWorld).invert()}this.updateCamera=function(ae){if(null===r)return;null!==b.texture&&(ae.near=b.depthNear,ae.far=b.depthFar),A.near=B.near=k.near=ae.near,A.far=B.far=k.far=ae.far,($!==A.near||ie!==A.far)&&(r.updateRenderState({depthNear:A.near,depthFar:A.far}),$=A.near,ie=A.far,k.near=$,k.far=ie,B.near=$,B.far=ie,k.updateProjectionMatrix(),B.updateProjectionMatrix(),ae.updateProjectionMatrix());const Oe=ae.parent,Ze=A.cameras;we(A,Oe);for(let Fe=0;Fe0&&(v.alphaTest.value=y.alphaTest);const M=t.get(y),x=M.envMap,C=M.envMapRotation;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(Eue.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,v.lightMapIntensity.value=y.lightMapIntensity,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,Z4(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 d(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===ko&&v.clearcoatNormalScale.value.negate())),y.dispersion>0&&(v.dispersion.value=y.dispersion),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 Due(i,t,e,n){let r={},s={},o=[];const a=i.getParameter(i.MAX_UNIFORM_BUFFER_BINDINGS);function m(M,x,C,F){const D=M.value,k=x+"_"+C;if(void 0===F[k])return F[k]="number"==typeof D||"boolean"==typeof D?D:D.clone(),!0;{const B=F[k];if("number"==typeof D||"boolean"==typeof D){if(B!==D)return F[k]=D,!0}else if(!1===B.equals(D))return B.copy(D),!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 k=0,B=x.length;k0&&(C+=16-D),M.__size=C,M.__cache={}}(M),C=function d(M){const x=function h(){for(let M=0;M0),Xt=!!le.morphAttributes.position,li=!!le.morphAttributes.normal,Li=!!le.morphAttributes.color;let ir=bu;de.toneMapped&&(null===k||!0===k.isXRRenderTarget)&&(ir=x.toneMapping);const la=le.morphAttributes.position||le.morphAttributes.normal||le.morphAttributes.color,hi=void 0!==la?la.length:0,Rt=it.get(de),fs=v.state.lights;!0!==ae||!0!==Oe&&L===T||bn.setState(de,L,L===T&&de.id===B);let fi=!1;de.version===Rt.__version?(Rt.needsLights&&Rt.lightsStateVersion!==fs.state.version||Rt.outputColorSpace!==xt||te.isBatchedMesh&&!1===Rt.batching||!te.isBatchedMesh&&!0===Rt.batching||te.isBatchedMesh&&!0===Rt.batchingColor&&null===te.colorTexture||te.isBatchedMesh&&!1===Rt.batchingColor&&null!==te.colorTexture||te.isInstancedMesh&&!1===Rt.instancing||!te.isInstancedMesh&&!0===Rt.instancing||te.isSkinnedMesh&&!1===Rt.skinning||!te.isSkinnedMesh&&!0===Rt.skinning||te.isInstancedMesh&&!0===Rt.instancingColor&&null===te.instanceColor||te.isInstancedMesh&&!1===Rt.instancingColor&&null!==te.instanceColor||te.isInstancedMesh&&!0===Rt.instancingMorph&&null===te.morphTexture||te.isInstancedMesh&&!1===Rt.instancingMorph&&null!==te.morphTexture||Rt.envMap!==wt||!0===de.fog&&Rt.fog!==je||void 0!==Rt.numClippingPlanes&&(Rt.numClippingPlanes!==bn.numPlanes||Rt.numIntersection!==bn.numIntersection)||Rt.vertexAlphas!==qt||Rt.vertexTangents!==an||Rt.morphTargets!==Xt||Rt.morphNormals!==li||Rt.morphColors!==Li||Rt.toneMapping!==ir||Rt.morphTargetsCount!==hi)&&(fi=!0):(fi=!0,Rt.__version=de.version);let El=Rt.currentProgram;!0===fi&&(El=xE(de,K,te));let qg=!1,ca=!1,qO=!1;const wr=El.getUniforms(),Uu=Rt.uniforms;if(Me.useProgram(El.program)&&(qg=!0,ca=!0,qO=!0),de.id!==B&&(B=de.id,ca=!0),qg||T!==L){wr.setValue(N,"projectionMatrix",L.projectionMatrix),wr.setValue(N,"viewMatrix",L.matrixWorldInverse);const za=wr.map.cameraPosition;void 0!==za&&za.setValue(N,Fe.setFromMatrixPosition(L.matrixWorld)),nt.logarithmicDepthBuffer&&wr.setValue(N,"logDepthBufFC",2/(Math.log(L.far+1)/Math.LN2)),(de.isMeshPhongMaterial||de.isMeshToonMaterial||de.isMeshLambertMaterial||de.isMeshBasicMaterial||de.isMeshStandardMaterial||de.isShaderMaterial)&&wr.setValue(N,"isOrthographic",!0===L.isOrthographicCamera),T!==L&&(T=L,ca=!0,qO=!0)}if(te.isSkinnedMesh){wr.setOptional(N,te,"bindMatrix"),wr.setOptional(N,te,"bindMatrixInverse");const za=te.skeleton;za&&(null===za.boneTexture&&za.computeBoneTexture(),wr.setValue(N,"boneTexture",za.boneTexture,mt))}te.isBatchedMesh&&(wr.setOptional(N,te,"batchingTexture"),wr.setValue(N,"batchingTexture",te._matricesTexture,mt),wr.setOptional(N,te,"batchingIdTexture"),wr.setValue(N,"batchingIdTexture",te._indirectTexture,mt),wr.setOptional(N,te,"batchingColorTexture"),null!==te._colorsTexture&&wr.setValue(N,"batchingColorTexture",te._colorsTexture,mt));const XO=le.morphAttributes;if((void 0!==XO.position||void 0!==XO.normal||void 0!==XO.color)&&jn.update(te,le,El),(ca||Rt.receiveShadow!==te.receiveShadow)&&(Rt.receiveShadow=te.receiveShadow,wr.setValue(N,"receiveShadow",te.receiveShadow)),de.isMeshGouraudMaterial&&null!==de.envMap&&(Uu.envMap.value=wt,Uu.flipEnvMap.value=wt.isCubeTexture&&!1===wt.isRenderTargetTexture?-1:1),de.isMeshStandardMaterial&&null===de.envMap&&null!==K.environment&&(Uu.envMapIntensity.value=K.environmentIntensity),ca&&(wr.setValue(N,"toneMappingExposure",x.toneMappingExposure),Rt.needsLights&&function Ove(L,K){L.ambientLightColor.needsUpdate=K,L.lightProbe.needsUpdate=K,L.directionalLights.needsUpdate=K,L.directionalLightShadows.needsUpdate=K,L.pointLights.needsUpdate=K,L.pointLightShadows.needsUpdate=K,L.spotLights.needsUpdate=K,L.spotLightShadows.needsUpdate=K,L.rectAreaLights.needsUpdate=K,L.hemisphereLights.needsUpdate=K}(Uu,qO),je&&!0===de.fog&&Bt.refreshFogUniforms(Uu,je),Bt.refreshMaterialUniforms(Uu,de,re,q,v.state.transmissionRenderTarget[L.id]),uS.upload(N,_8(Rt),Uu,mt)),de.isShaderMaterial&&!0===de.uniformsNeedUpdate&&(uS.upload(N,_8(Rt),Uu,mt),de.uniformsNeedUpdate=!1),de.isSpriteMaterial&&wr.setValue(N,"center",te.center),wr.setValue(N,"modelViewMatrix",te.modelViewMatrix),wr.setValue(N,"normalMatrix",te.normalMatrix),wr.setValue(N,"modelMatrix",te.matrixWorld),de.isShaderMaterial||de.isRawShaderMaterial){const za=de.uniformsGroups;for(let KO=0,Lve=za.length;KO{function je(){de.forEach(function(st){it.get(st).currentProgram.isReady()&&de.delete(st)}),0!==de.size?setTimeout(je,10):te(L)}null!==Ne.get("KHR_parallel_shader_compile")?je():setTimeout(je,10)})};let ui=null;function pc(){kf.stop()}function f8(){kf.start()}const kf=new t5;function YO(L,K,le,de){if(!1===L.visible)return;if(L.layers.test(K.layers))if(L.isGroup)le=L.renderOrder;else if(L.isLOD)!0===L.autoUpdate&&L.update(K);else if(L.isLight)v.pushLight(L),L.castShadow&&v.pushShadow(L);else if(L.isSprite){if(!L.frustumCulled||en.intersectsSprite(L)){de&&bt.setFromMatrixPosition(L.matrixWorld).applyMatrix4(Ze);const st=De.update(L),xt=L.material;xt.visible&&b.push(L,st,xt,le,bt.z,null)}}else if((L.isMesh||L.isLine||L.isPoints)&&(!L.frustumCulled||en.intersectsObject(L))){const st=De.update(L),xt=L.material;if(de&&(void 0!==L.boundingSphere?(null===L.boundingSphere&&L.computeBoundingSphere(),bt.copy(L.boundingSphere.center)):(null===st.boundingSphere&&st.computeBoundingSphere(),bt.copy(st.boundingSphere.center)),bt.applyMatrix4(L.matrixWorld).applyMatrix4(Ze)),Array.isArray(xt)){const wt=st.groups;for(let qt=0,an=wt.length;qt0&&bE(te,K,le),je.length>0&&bE(je,K,le),st.length>0&&bE(st,K,le),Me.buffers.depth.setTest(!0),Me.buffers.depth.setMask(!0),Me.buffers.color.setMask(!0),Me.setPolygonOffset(!1)}function m8(L,K,le,de){if(null!==(!0===le.isScene?le.overrideMaterial:null))return;void 0===v.state.transmissionRenderTarget[de.id]&&(v.state.transmissionRenderTarget[de.id]=new Mu(1,1,{generateMipmaps:!0,type:Ne.has("EXT_color_buffer_half_float")||Ne.has("EXT_color_buffer_float")?Jm:ed,minFilter:bl,samples:4,stencilBuffer:s,resolveDepthBuffer:!1,resolveStencilBuffer:!1,colorSpace:Jn.workingColorSpace}));const je=v.state.transmissionRenderTarget[de.id],st=de.viewport||A;je.setSize(st.z,st.w);const xt=x.getRenderTarget();x.setRenderTarget(je),x.getClearColor(ne),se=x.getClearAlpha(),se<1&&x.setClearColor(16777215,.5),x.clear(),Mt&&dt.render(le);const wt=x.toneMapping;x.toneMapping=bu;const qt=de.viewport;if(void 0!==de.viewport&&(de.viewport=void 0),v.setupLightsView(de),!0===ae&&bn.setGlobalState(x.clippingPlanes,de),bE(L,le,de),mt.updateMultisampleRenderTarget(je),mt.updateRenderTargetMipmap(je),!1===Ne.has("WEBGL_multisampled_render_to_texture")){let an=!1;for(let Xt=0,li=K.length;Xt0)for(let st=0,xt=je.length;st0&&m8(de,te,L,K),Mt&&dt.render(L),p8(b,L,K);null!==k&&(mt.updateMultisampleRenderTarget(k),mt.updateRenderTargetMipmap(k)),!0===L.isScene&&L.onAfterRender(x,L,K),Pn.resetDefaultState(),B=-1,T=null,M.pop(),M.length>0?(v=M[M.length-1],!0===ae&&bn.setGlobalState(x.clippingPlanes,v.state.camera)):v=null,y.pop(),b=y.length>0?y[y.length-1]:null},this.getActiveCubeFace=function(){return F},this.getActiveMipmapLevel=function(){return D},this.getRenderTarget=function(){return k},this.setRenderTargetTextures=function(L,K,le){it.get(L.texture).__webglTexture=K,it.get(L.depthTexture).__webglTexture=le;const de=it.get(L);de.__hasExternalTextures=!0,de.__autoAllocateDepthBuffer=void 0===le,de.__autoAllocateDepthBuffer||!0===Ne.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(L,K){const le=it.get(L);le.__webglFramebuffer=K,le.__useDefaultFramebuffer=void 0===K},this.setRenderTarget=function(L,K=0,le=0){k=L,F=K,D=le;let de=!0,te=null,je=!1,st=!1;if(L){const wt=it.get(L);void 0!==wt.__useDefaultFramebuffer?(Me.bindFramebuffer(N.FRAMEBUFFER,null),de=!1):void 0===wt.__webglFramebuffer?mt.setupRenderTarget(L):wt.__hasExternalTextures&&mt.rebindTextures(L,it.get(L.texture).__webglTexture,it.get(L.depthTexture).__webglTexture);const qt=L.texture;(qt.isData3DTexture||qt.isDataArrayTexture||qt.isCompressedArrayTexture)&&(st=!0);const an=it.get(L).__webglFramebuffer;L.isWebGLCubeRenderTarget?(te=Array.isArray(an[K])?an[K][le]:an[K],je=!0):te=L.samples>0&&!1===mt.useMultisampledRTT(L)?it.get(L).__webglMultisampledFramebuffer:Array.isArray(an)?an[le]:an,A.copy(L.viewport),$.copy(L.scissor),ie=L.scissorTest}else A.copy(Be).multiplyScalar(re).floor(),$.copy(Ye).multiplyScalar(re).floor(),ie=It;if(Me.bindFramebuffer(N.FRAMEBUFFER,te)&&de&&Me.drawBuffers(L,te),Me.viewport(A),Me.scissor($),Me.setScissorTest(ie),je){const wt=it.get(L.texture);N.framebufferTexture2D(N.FRAMEBUFFER,N.COLOR_ATTACHMENT0,N.TEXTURE_CUBE_MAP_POSITIVE_X+K,wt.__webglTexture,le)}else if(st){const wt=it.get(L.texture);N.framebufferTextureLayer(N.FRAMEBUFFER,N.COLOR_ATTACHMENT0,wt.__webglTexture,le||0,K||0)}B=-1},this.readRenderTargetPixels=function(L,K,le,de,te,je,st){if(!L||!L.isWebGLRenderTarget)return void console.error("THREE.WebGLRenderer.readRenderTargetPixels: renderTarget is not THREE.WebGLRenderTarget.");let xt=it.get(L).__webglFramebuffer;if(L.isWebGLCubeRenderTarget&&void 0!==st&&(xt=xt[st]),xt){Me.bindFramebuffer(N.FRAMEBUFFER,xt);try{const wt=L.texture,qt=wt.format,an=wt.type;if(!nt.textureFormatReadable(qt))return void console.error("THREE.WebGLRenderer.readRenderTargetPixels: renderTarget is not in RGBA or implementation defined format.");if(!nt.textureTypeReadable(an))return void console.error("THREE.WebGLRenderer.readRenderTargetPixels: renderTarget is not in UnsignedByteType or implementation defined type.");K>=0&&K<=L.width-de&&le>=0&&le<=L.height-te&&N.readPixels(K,le,de,te,vn.convert(qt),vn.convert(an),je)}finally{const wt=null!==k?it.get(k).__webglFramebuffer:null;Me.bindFramebuffer(N.FRAMEBUFFER,wt)}}},this.readRenderTargetPixelsAsync=function(){var L=tt(function*(K,le,de,te,je,st,xt){if(!K||!K.isWebGLRenderTarget)throw new Error("THREE.WebGLRenderer.readRenderTargetPixels: renderTarget is not THREE.WebGLRenderTarget.");let wt=it.get(K).__webglFramebuffer;if(K.isWebGLCubeRenderTarget&&void 0!==xt&&(wt=wt[xt]),wt){Me.bindFramebuffer(N.FRAMEBUFFER,wt);try{const qt=K.texture,an=qt.format,Xt=qt.type;if(!nt.textureFormatReadable(an))throw new Error("THREE.WebGLRenderer.readRenderTargetPixelsAsync: renderTarget is not in RGBA or implementation defined format.");if(!nt.textureTypeReadable(Xt))throw new Error("THREE.WebGLRenderer.readRenderTargetPixelsAsync: renderTarget is not in UnsignedByteType or implementation defined type.");if(le>=0&&le<=K.width-te&&de>=0&&de<=K.height-je){const li=N.createBuffer();N.bindBuffer(N.PIXEL_PACK_BUFFER,li),N.bufferData(N.PIXEL_PACK_BUFFER,st.byteLength,N.STREAM_READ),N.readPixels(le,de,te,je,vn.convert(an),vn.convert(Xt),0),N.flush();const Li=N.fenceSync(N.SYNC_GPU_COMMANDS_COMPLETE,0);yield function eae(i,t,e){return new Promise(function(n,r){setTimeout(function s(){switch(i.clientWaitSync(t,i.SYNC_FLUSH_COMMANDS_BIT,0)){case i.WAIT_FAILED:r();break;case i.TIMEOUT_EXPIRED:setTimeout(s,e);break;default:n()}},e)})}(N,Li,4);try{N.bindBuffer(N.PIXEL_PACK_BUFFER,li),N.getBufferSubData(N.PIXEL_PACK_BUFFER,0,st)}finally{N.deleteBuffer(li),N.deleteSync(Li)}return st}}finally{const qt=null!==k?it.get(k).__webglFramebuffer:null;Me.bindFramebuffer(N.FRAMEBUFFER,qt)}}});return function(K,le,de,te,je,st,xt){return L.apply(this,arguments)}}(),this.copyFramebufferToTexture=function(L,K=null,le=0){!0!==L.isTexture&&(cg("WebGLRenderer: copyFramebufferToTexture function signature has changed."),K=arguments[0]||null,L=arguments[1]);const de=Math.pow(2,-le),te=Math.floor(L.image.width*de),je=Math.floor(L.image.height*de),st=null!==K?K.x:0,xt=null!==K?K.y:0;mt.setTexture2D(L,0),N.copyTexSubImage2D(N.TEXTURE_2D,le,0,0,st,xt,te,je),Me.unbindTexture()},this.copyTextureToTexture=function(L,K,le=null,de=null,te=0){let je,st,xt,wt,qt,an;!0!==L.isTexture&&(cg("WebGLRenderer: copyTextureToTexture function signature has changed."),de=arguments[0]||null,L=arguments[1],K=arguments[2],te=arguments[3]||0,le=null),null!==le?(je=le.max.x-le.min.x,st=le.max.y-le.min.y,xt=le.min.x,wt=le.min.y):(je=L.image.width,st=L.image.height,xt=0,wt=0),null!==de?(qt=de.x,an=de.y):(qt=0,an=0);const Xt=vn.convert(K.format),li=vn.convert(K.type);mt.setTexture2D(K,0),N.pixelStorei(N.UNPACK_FLIP_Y_WEBGL,K.flipY),N.pixelStorei(N.UNPACK_PREMULTIPLY_ALPHA_WEBGL,K.premultiplyAlpha),N.pixelStorei(N.UNPACK_ALIGNMENT,K.unpackAlignment);const Li=N.getParameter(N.UNPACK_ROW_LENGTH),ir=N.getParameter(N.UNPACK_IMAGE_HEIGHT),la=N.getParameter(N.UNPACK_SKIP_PIXELS),hi=N.getParameter(N.UNPACK_SKIP_ROWS),Rt=N.getParameter(N.UNPACK_SKIP_IMAGES),fs=L.isCompressedTexture?L.mipmaps[te]:L.image;N.pixelStorei(N.UNPACK_ROW_LENGTH,fs.width),N.pixelStorei(N.UNPACK_IMAGE_HEIGHT,fs.height),N.pixelStorei(N.UNPACK_SKIP_PIXELS,xt),N.pixelStorei(N.UNPACK_SKIP_ROWS,wt),L.isDataTexture?N.texSubImage2D(N.TEXTURE_2D,te,qt,an,je,st,Xt,li,fs.data):L.isCompressedTexture?N.compressedTexSubImage2D(N.TEXTURE_2D,te,qt,an,fs.width,fs.height,Xt,fs.data):N.texSubImage2D(N.TEXTURE_2D,te,qt,an,je,st,Xt,li,fs),N.pixelStorei(N.UNPACK_ROW_LENGTH,Li),N.pixelStorei(N.UNPACK_IMAGE_HEIGHT,ir),N.pixelStorei(N.UNPACK_SKIP_PIXELS,la),N.pixelStorei(N.UNPACK_SKIP_ROWS,hi),N.pixelStorei(N.UNPACK_SKIP_IMAGES,Rt),0===te&&K.generateMipmaps&&N.generateMipmap(N.TEXTURE_2D),Me.unbindTexture()},this.copyTextureToTexture3D=function(L,K,le=null,de=null,te=0){let je,st,xt,wt,qt,an,Xt,li,Li;!0!==L.isTexture&&(cg("WebGLRenderer: copyTextureToTexture3D function signature has changed."),le=arguments[0]||null,de=arguments[1]||null,L=arguments[2],K=arguments[3],te=arguments[4]||0);const ir=L.isCompressedTexture?L.mipmaps[te]:L.image;null!==le?(je=le.max.x-le.min.x,st=le.max.y-le.min.y,xt=le.max.z-le.min.z,wt=le.min.x,qt=le.min.y,an=le.min.z):(je=ir.width,st=ir.height,xt=ir.depth,wt=0,qt=0,an=0),null!==de?(Xt=de.x,li=de.y,Li=de.z):(Xt=0,li=0,Li=0);const la=vn.convert(K.format),hi=vn.convert(K.type);let Rt;if(K.isData3DTexture)mt.setTexture3D(K,0),Rt=N.TEXTURE_3D;else{if(!K.isDataArrayTexture&&!K.isCompressedArrayTexture)return void console.warn("THREE.WebGLRenderer.copyTextureToTexture3D: only supports THREE.DataTexture3D and THREE.DataTexture2DArray.");mt.setTexture2DArray(K,0),Rt=N.TEXTURE_2D_ARRAY}N.pixelStorei(N.UNPACK_FLIP_Y_WEBGL,K.flipY),N.pixelStorei(N.UNPACK_PREMULTIPLY_ALPHA_WEBGL,K.premultiplyAlpha),N.pixelStorei(N.UNPACK_ALIGNMENT,K.unpackAlignment);const fs=N.getParameter(N.UNPACK_ROW_LENGTH),fi=N.getParameter(N.UNPACK_IMAGE_HEIGHT),El=N.getParameter(N.UNPACK_SKIP_PIXELS),qg=N.getParameter(N.UNPACK_SKIP_ROWS),ca=N.getParameter(N.UNPACK_SKIP_IMAGES);N.pixelStorei(N.UNPACK_ROW_LENGTH,ir.width),N.pixelStorei(N.UNPACK_IMAGE_HEIGHT,ir.height),N.pixelStorei(N.UNPACK_SKIP_PIXELS,wt),N.pixelStorei(N.UNPACK_SKIP_ROWS,qt),N.pixelStorei(N.UNPACK_SKIP_IMAGES,an),L.isDataTexture||L.isData3DTexture?N.texSubImage3D(Rt,te,Xt,li,Li,je,st,xt,la,hi,ir.data):K.isCompressedArrayTexture?N.compressedTexSubImage3D(Rt,te,Xt,li,Li,je,st,xt,la,ir.data):N.texSubImage3D(Rt,te,Xt,li,Li,je,st,xt,la,hi,ir),N.pixelStorei(N.UNPACK_ROW_LENGTH,fs),N.pixelStorei(N.UNPACK_IMAGE_HEIGHT,fi),N.pixelStorei(N.UNPACK_SKIP_PIXELS,El),N.pixelStorei(N.UNPACK_SKIP_ROWS,qg),N.pixelStorei(N.UNPACK_SKIP_IMAGES,ca),0===te&&K.generateMipmaps&&N.generateMipmap(Rt),Me.unbindTexture()},this.initRenderTarget=function(L){void 0===it.get(L).__webglFramebuffer&&mt.setupRenderTarget(L)},this.initTexture=function(L){L.isCubeTexture?mt.setTextureCube(L,0):L.isData3DTexture?mt.setTexture3D(L,0):L.isDataArrayTexture||L.isCompressedArrayTexture?mt.setTexture2DArray(L,0):mt.setTexture2D(L,0),Me.unbindTexture()},this.resetState=function(){F=0,D=0,k=null,Me.reset(),Pn.reset()},typeof __THREE_DEVTOOLS__<"u"&&__THREE_DEVTOOLS__.dispatchEvent(new CustomEvent("observe",{detail:this}))}get coordinateSystem(){return td}get outputColorSpace(){return this._outputColorSpace}set outputColorSpace(t){this._outputColorSpace=t;const e=this.getContext();e.drawingBufferColorSpace=t===jk?"display-p3":"srgb",e.unpackColorSpace=Jn.workingColorSpace===LC?"display-p3":"srgb"}}class kb extends Fr{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 rd,this.environmentIntensity=1,this.environmentRotation=new rd,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 AP{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=ta()}onUploadCallback(){}set needsUpdate(t){!0===t&&this.version++}get updateRange(){return cg("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;r0){const r=e[n[0]];if(void 0!==r){this.morphTargetInfluences=[],this.morphTargetDictionary={};for(let s=0,o=r.length;sn)return;FP.applyMatrix4(i.matrixWorld);const l=t.ray.origin.distanceTo(FP);return lt.far?void 0:{distance:l,point:Z5.clone().applyMatrix4(i.matrixWorld),index:r,face:null,faceIndex:null,object:i}}const Q5=new O,J5=new O;class Ng extends pf{constructor(t,e){super(t,e),this.isLineSegments=!0,this.type="LineSegments"}computeLineDistances(){const t=this.geometry;if(null===t.index){const e=t.attributes.position,n=[];for(let r=0,s=e.count;r0){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 uc{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 d=n[r];return(r+(o-d)/(n[r+1]-d))/(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 xe:new O);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 O,r=[],s=[],o=[],a=new O,l=new Nt;for(let m=0;m<=t;m++)r[m]=this.getTangentAt(m/t,new O);s[0]=new O,o[0]=new O;let c=Number.MAX_VALUE;const d=Math.abs(r[0].x),h=Math.abs(r[0].y),p=Math.abs(r[0].z);d<=c&&(c=d,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(tr(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(tr(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 NP extends uc{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 xe){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(iG(a,l.x,c.x,d.x,h.x),iG(a,l.y,c.y,d.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]:(DS.subVectors(r[0],r[1]).add(r[0]),c=DS);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 d=c.getPoint(1);return this.currentPoint.copy(d),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 RS extends hn{constructor(t=[new xe(0,-.5),new xe(.5,0),new xe(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=tr(r,0,2*Math.PI);const s=[],o=[],a=[],l=[],c=[],d=1/e,h=new O,p=new xe,m=new O,g=new O,b=new O;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*d*r,C=Math.sin(x),F=Math.cos(x);for(let D=0;D<=t.length-1;D++)h.x=t[D].x*C,h.y=t[D].y,h.z=t[D].x*F,o.push(h.x,h.y,h.z),p.x=M/e,p.y=D/(t.length-1),a.push(p.x,p.y),c.push(l[3*D+0]*C,l[3*D+1],l[3*D+0]*F)}for(let M=0;M0&&x(!0),e>0&&x(!1)),this.setIndex(d),this.setAttribute("position",new ct(h,3)),this.setAttribute("normal",new ct(p,3)),this.setAttribute("uv",new ct(m,2))}copy(t){return super.copy(t),this.parameters=Object.assign({},t.parameters),this}static fromJSON(t){return new Bg(t.radiusTop,t.radiusBottom,t.height,t.radialSegments,t.heightSegments,t.openEnded,t.thetaStart,t.thetaLength)}}class PS extends Bg{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 PS(t.radius,t.height,t.radialSegments,t.heightSegments,t.openEnded,t.thetaStart,t.thetaLength)}}class jb 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 d=[],h=new O,p=new O,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 F=0;F<=e;F++){const D=F/e;h.x=-t*Math.cos(r+D*s)*Math.sin(o+x*a),h.y=t*Math.cos(o+x*a),h.z=t*Math.sin(r+D*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(D+C,1-x),M.push(c++)}d.push(M)}for(let y=0;y0)&&m.push(d[y][M+1],C,D),(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 dispersion(){return this._dispersion}set dispersion(t){this._dispersion>0!=t>0&&this.version++,this._dispersion=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.dispersion=t.dispersion,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 zS extends Fo{constructor(t){super(),this.isMeshPhongMaterial=!0,this.type="MeshPhongMaterial",this.color=new qe(16777215),this.specular=new qe(1118481),this.shininess=30,this.map=null,this.lightMap=null,this.lightMapIntensity=1,this.aoMap=null,this.aoMapIntensity=1,this.emissive=new qe(0),this.emissiveIntensity=1,this.emissiveMap=null,this.bumpMap=null,this.bumpScale=1,this.normalMap=null,this.normalMapType=Qh,this.normalScale=new xe(1,1),this.displacementMap=null,this.displacementScale=1,this.displacementBias=0,this.specularMap=null,this.alphaMap=null,this.envMap=null,this.envMapRotation=new rd,this.combine=EC,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 vf(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 vG(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 tO(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 nO(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 qb{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 _G(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}}hc.prototype.TimeBufferType=Float32Array,hc.prototype.ValueBufferType=Float32Array,hc.prototype.DefaultInterpolation=bb;class zg extends hc{constructor(t,e,n){super(t,e,n)}}zg.prototype.ValueTypeName="bool",zg.prototype.ValueBufferType=Array,zg.prototype.DefaultInterpolation=yb,zg.prototype.InterpolantFactoryMethodLinear=void 0,zg.prototype.InterpolantFactoryMethodSmooth=void 0;class bG extends hc{}bG.prototype.ValueTypeName="color";class Hg extends hc{}Hg.prototype.ValueTypeName="number";class Fhe extends qb{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 d=c+a;c!==d;c+=4)uo.slerpFlat(s,0,o,c-a,o,c,l);return s}}class Gg extends hc{InterpolantFactoryMethodLinear(t){return new Fhe(this.times,this.values,this.getValueSize(),t)}}Gg.prototype.ValueTypeName="quaternion",Gg.prototype.InterpolantFactoryMethodSmooth=void 0;class $g extends hc{constructor(t,e,n){super(t,e,n)}}$g.prototype.ValueTypeName="string",$g.prototype.ValueBufferType=Array,$g.prototype.DefaultInterpolation=yb,$g.prototype.InterpolantFactoryMethodLinear=void 0,$g.prototype.InterpolantFactoryMethodSmooth=void 0;class Wg extends hc{}Wg.prototype.ValueTypeName="vector";class Xb{constructor(t="",e=-1,n=[],r=2500){this.name=t,this.tracks=n,this.duration=e,this.blendMode=r,this.uuid=ta(),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(Nhe(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(hc.toJSON(n[s]));return r}static CreateFromMorphTargetSequence(t,e,n,r){const s=e.length,o=[];for(let a=0;a1){const h=d[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=[];nO(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:wG,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 ud={};class Bhe extends Error{constructor(t,e){super(t),this.response=e}}class La extends yf{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=ku.get(t);if(void 0!==s)return this.manager.itemStart(t),setTimeout(()=>{e&&e(s),this.manager.itemEnd(t)},0),s;if(void 0!==ud[t])return void ud[t].push({onLoad:e,onProgress:n,onError:r});ud[t]=[],ud[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 d=ud[t],h=c.body.getReader(),p=c.headers.get("X-File-Size")||c.headers.get("Content-Length"),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 F=new ProgressEvent("progress",{lengthComputable:g,loaded:b,total:m});for(let D=0,k=d.length;D{y.error(x)})}()}});return new Response(v)}throw new Bhe(`fetch for "${c.url}" responded with ${c.status}: ${c.statusText}`,c)}).then(c=>{switch(l){case"arraybuffer":return c.arrayBuffer();case"blob":return c.blob();case"document":return c.text().then(d=>(new DOMParser).parseFromString(d,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=>{ku.add(t,c);const d=ud[t];delete ud[t];for(let h=0,p=d.length;h{const d=ud[t];if(void 0===d)throw this.manager.itemError(t),c;delete ud[t];for(let h=0,p=d.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 HS extends yf{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=ku.get(t);if(void 0!==o)return s.manager.itemStart(t),setTimeout(function(){e&&e(o),s.manager.itemEnd(t)},0),o;const a=wb("img");function l(){d(),ku.add(t,this),e&&e(this),s.manager.itemEnd(t)}function c(h){d(),r&&r(h),s.manager.itemError(t),s.manager.itemEnd(t)}function d(){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 Pu extends yf{constructor(t){super(t)}load(t,e,n,r){const s=new Oo,o=new HS(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 GS extends Fr{constructor(t,e=1){super(),this.isLight=!0,this.type="Light",this.color=new qe(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()),void 0!==this.target&&(e.object.target=this.target.uuid),e}}const iO=new Nt,MG=new O,CG=new O;class rO{constructor(t){this.camera=t,this.intensity=1,this.bias=0,this.normalBias=0,this.radius=1,this.blurSamples=8,this.mapSize=new xe(512,512),this.map=null,this.mapPass=null,this.matrix=new Nt,this.autoUpdate=!0,this.needsUpdate=!1,this._frustum=new aS,this._frameExtents=new xe(1,1),this._viewportCount=1,this._viewports=[new gi(0,0,1,1)]}getViewportCount(){return this._viewportCount}getFrustum(){return this._frustum}updateMatrices(t){const e=this.camera,n=this.matrix;MG.setFromMatrixPosition(t.matrixWorld),e.position.copy(MG),CG.setFromMatrixPosition(t.target.matrixWorld),e.lookAt(CG),e.updateMatrixWorld(),iO.multiplyMatrices(e.projectionMatrix,e.matrixWorldInverse),this._frustum.setFromProjectionMatrix(iO),n.set(.5,0,0,.5,0,.5,0,.5,0,0,.5,.5,0,0,0,1),n.multiply(iO)}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.intensity=t.intensity,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 1!==this.intensity&&(t.intensity=this.intensity),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 Vhe extends rO{constructor(){super(new br(50,1,.5,500)),this.isSpotLightShadow=!0,this.focus=1}updateMatrices(t){const e=this.camera,n=2*ag*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 SG extends GS{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(Fr.DEFAULT_UP),this.updateMatrix(),this.target=new Fr,this.distance=n,this.angle=r,this.penumbra=s,this.decay=o,this.map=null,this.shadow=new Vhe}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 EG=new Nt,Kb=new O,sO=new O;class zhe extends rO{constructor(){super(new br(90,1,.5,500)),this.isPointLightShadow=!0,this._frameExtents=new xe(4,2),this._viewportCount=6,this._viewports=[new gi(2,1,1,1),new gi(0,1,1,1),new gi(3,1,1,1),new gi(1,1,1,1),new gi(3,0,1,1),new gi(1,0,1,1)],this._cubeDirections=[new O(1,0,0),new O(-1,0,0),new O(0,0,1),new O(0,0,-1),new O(0,1,0),new O(0,-1,0)],this._cubeUps=[new O(0,1,0),new O(0,1,0),new O(0,1,0),new O(0,1,0),new O(0,0,1),new O(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()),Kb.setFromMatrixPosition(t.matrixWorld),n.position.copy(Kb),sO.copy(n.position),sO.add(this._cubeDirections[e]),n.up.copy(this._cubeUps[e]),n.lookAt(sO),n.updateMatrixWorld(),r.makeTranslation(-Kb.x,-Kb.y,-Kb.z),EG.multiplyMatrices(n.projectionMatrix,n.matrixWorldInverse),this._frustum.setFromProjectionMatrix(EG)}}class AG extends GS{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 zhe}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 Hhe extends rO{constructor(){super(new Ib(-5,5,5,-5,.5,500)),this.isDirectionalLightShadow=!0}}class DG extends GS{constructor(t,e){super(t,e),this.isDirectionalLight=!0,this.type="DirectionalLight",this.position.copy(Fr.DEFAULT_UP),this.updateMatrix(),this.target=new Fr,this.shadow=new Hhe}dispose(){this.shadow.dispose()}copy(t){return super.copy(t),this.target=t.target.clone(),this.shadow=t.shadow.clone(),this}}class $S extends GS{constructor(t,e){super(t,e),this.isAmbientLight=!0,this.type="AmbientLight"}}class Ou{static decodeText(t){if(console.warn("THREE.LoaderUtils: decodeText() has been deprecated with r165 and will be removed with r175. Use TextDecoder instead."),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=ku.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 ku.add(t,c),e&&e(c),s.manager.itemEnd(t),c}).catch(function(c){r&&r(c),ku.remove(t),s.manager.itemError(t),s.manager.itemEnd(t)});ku.add(t,l),s.manager.itemStart(t)}}class OG{constructor(t=!0){this.autoStart=t,this.startTime=0,this.oldTime=0,this.elapsedTime=0,this.running=!1}start(){this.startTime=FG(),this.oldTime=this.startTime,this.elapsedTime=0,this.running=!0}stop(){this.getElapsedTime(),this.running=!1,this.autoStart=!1}getElapsedTime(){return this.getDelta(),this.elapsedTime}getDelta(){let t=0;if(this.autoStart&&!this.running)return this.start(),0;if(this.running){const e=FG();t=(e-this.oldTime)/1e3,this.oldTime=e,this.elapsedTime+=t}return t}}function FG(){return(typeof performance>"u"?Date:performance).now()}const aO="\\[\\]\\.:\\/",Jhe=new RegExp("["+aO+"]","g"),lO="[^"+aO+"]",efe="[^"+aO.replace("\\.","")+"]",sfe=new RegExp("^"+/((?:WC+[\/:])*)/.source.replace("WC",lO)+/(WCOD+)?/.source.replace("WCOD",efe)+/(?:\.(WC+)(?:\[(.+)\])?)?/.source.replace("WC",lO)+/\.(WC+)(?:\[(.+)\])?/.source.replace("WC",lO)+"$"),ofe=["material","materials","bones","map"];class afe{constructor(t,e,n){const r=n||Ri.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 Ri=(()=>{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(Jhe,"")}static parseTrackName(e){const n=sfe.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!==ofe.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;an.name===t||n.userData.name===t);return e?(e.removeFromParent(),new ra(e)):null}getBoundings(){return(new Vs).setFromObject(this.nativeMesh)}clone(){return new ra(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 Mn&&this.disposeMesh(t)}),this.nativeMesh instanceof Mn&&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 hfe extends ra{get supportsFov(){return this.nativeCamera instanceof br||"PerspectiveCamera"==this.nativeCamera.type}get fov(){return this.nativeCamera.fov||NaN}set fov(t){this.supportsFov&&(this.nativeCamera.fov=t,this.nativeCamera.updateProjectionMatrix())}constructor(t){super(t),this.nativeCamera=t}}class ffe extends Ose{createMaterial(t){let e={};t.color?e={color:t.color}:t.diffuse||(e={color:super.randomColor()});let n=t.shading||"unlit";switch(n){case"unlit":return new qi(Object.assign(Object.assign({},e),{map:t.diffuse||null}));case"standart":return new Yb(Object.assign(Object.assign({},e),{map:t.diffuse||null}));case"phong":return new zS(Object.assign(Object.assign({},e),{map:t.diffuse||null}));case"wireframe":return new qi(Object.assign(Object.assign({},e),{wireframe:!0}));default:throw new Error(`"${n}" shading not implemented for three.js`)}}transformPrimitiveZUp(t){t.geometry.rotateX(Math.PI/2)}createPrimitive(t,e={}){var n,r,s,o;let a=null,l=this.createMaterial(e);switch(t.shape){case"PLANE":a=new Mn(new Iu((null===(n=t.dimensions)||void 0===n?void 0:n.x)||1e4,(null===(r=t.dimensions)||void 0===r?void 0:r.y)||1e4,null===(s=t.segments)||void 0===s?void 0:s.x,null===(o=t.segments)||void 0===o?void 0:o.y),l);break;case"BOX":a=new Mn(new rf(...Te.spr(t.dimensions),...t.segments?Te.spr(t.segments):[]),l);break;case"CAPSULE":a=new Mn(new kS(t.radius,t.centersDistance,t.capSegments,t.radialSegments),l),this.transformPrimitiveZUp(a);break;case"CYLINDER":a=new Mn(new Bg(t.radius,t.radius,t.height,t.radialSegments,t.heightSegments),l),this.transformPrimitiveZUp(a);break;case"CONE":a=new Mn(new PS(t.radius,t.height,t.radialSegments,t.heightSegments),l),this.transformPrimitiveZUp(a);break;case"SPHERE":a=new Mn(new jb(t.radius,t.widthSegments,t.heightSegments),l),this.transformPrimitiveZUp(a);break;case"COMPOUND":a=new No;for(const{position:d,rotation:h,shape:p}of t.children){const m=this.createPrimitive(p,e).nativeMesh;d&&m.position.set(...Te.spr(d)),h&&m.quaternion.set(...Yi.spr(h)),a.add(m)}break;case"MESH":const c=new hn;c.setFromPoints(t.vertices.map(d=>new O(...Te.spr(d)))),c.setIndex(t.faces.reduce((d,h)=>(d.push(...h),d),[])),a=new Mn(c,l)}if(!a)throw new Error(`Primitive with shape "${t.shape}" not implemented`);return void 0!==e.castShadow&&(a.castShadow=e.castShadow),void 0!==e.receiveShadow&&(a.receiveShadow=e.receiveShadow),new ra(a)}createPerspectiveCamera(t={}){return new hfe(new br(t.fov||75,t.aspectRatio||1,t.frustrum?t.frustrum.near:1,t.frustrum?t.frustrum.far:1e4))}}function QG(i,t){if(t===Coe)return console.warn("THREE.BufferGeometryUtils.toTrianglesDrawMode(): Geometry already defined as triangles."),i;if(t===Wk||t===C4){let e=i.getIndex();if(null===e){const o=[],a=i.getAttribute("position");if(void 0===a)return console.error("THREE.BufferGeometryUtils.toTrianglesDrawMode(): Undefined position attribute. Processing not possible."),i;for(let l=0;l=2.0 are supported.")));const c=new Yfe(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 d=0;d=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 mfe(){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 Bn={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_DISPERSION:"KHR_materials_dispersion",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 gfe{constructor(t){this.parser=t,this.name=Bn.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 Ife{constructor(t){this.parser=t,this.name=Bn.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 Rfe{constructor(t){this.parser=t,this.name=Bn.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 kfe{constructor(t){this.name=Bn.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 d=r.count,h=r.byteStride,p=new Uint8Array(a,r.byteOffset||0,r.byteLength||0);return o.decodeGltfBufferAsync?o.decodeGltfBufferAsync(d,h,p,r.mode,r.filter).then(function(m){return m.buffer}):o.ready.then(function(){const m=new ArrayBuffer(d*h);return o.decodeGltfBuffer(new Uint8Array(m),d,h,p,r.mode,r.filter),m})})}return null}}class Pfe{constructor(t){this.name=Bn.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!==Na.TRIANGLES&&c.mode!==Na.TRIANGLE_STRIP&&c.mode!==Na.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(d=>(l[c]=d,l[c])));return a.length<1?null:(a.push(this.parser.createNodeMesh(t)),Promise.all(a).then(c=>{const d=c.pop(),h=d.isGroup?d.children:[d],p=c[0].count,m=[];for(const g of h){const b=new Nt,v=new O,y=new uo,M=new O(1,1,1),x=new Y5(g.geometry,g.material,p);for(let C=0;C-1,o=s?a.match(/Firefox\/([0-9]+)\./)[1]:-1}this.textureLoader=typeof createImageBitmap>"u"||n&&r<17||s&&o<98?new Pu(this.options.manager):new Xhe(this.options.manager),this.textureLoader.setCrossOrigin(this.options.crossOrigin),this.textureLoader.setRequestHeader(this.options.requestHeader),this.fileLoader=new La(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 Sf(s,a,r),hd(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,d]of o.children.entries())s(d,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(T,D[k*l+1]),l>=3&&v.setZ(T,D[k*l+2]),l>=4&&v.setW(T,D[k*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(d){d.flipY=!1,d.name=o.name||a.name||"",""===d.name&&"string"==typeof a.uri&&!1===a.uri.startsWith("data:image/")&&(d.name=a.uri);const p=(s.samplers||{})[o.sampler]||{};return d.magFilter=n$[p.magFilter]||cr,d.minFilter=n$[p.minFilter]||bl,d.wrapS=i$[p.wrapS]||Bs,d.wrapT=i$[p.wrapT]||Bs,r.associations.set(d,{textures:t}),d}).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 d=Promise.resolve(l).then(function(h){return new Promise(function(p,m){let g=p;!0===e.isImageBitmapLoader&&(g=function(b){const v=new Oo(b);v.needsUpdate=!0,p(v)}),e.load(Ou.resolveURL(h,s.path),g,void 0,m)})}).then(function(h){return!0===c&&a.revokeObjectURL(l),hd(h,o),h.userData.mimeType=o.mimeType||function Wfe(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]=d,d}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[Bn.KHR_TEXTURE_TRANSFORM]){const a=void 0!==n.extensions?n.extensions[Bn.KHR_TEXTURE_TRANSFORM]:void 0;if(a){const l=s.associations.get(o);o=s.extensions[Bn.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 mf,Fo.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 us,Fo.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 Yb}loadMaterial(t){const e=this,r=this.extensions,s=this.json.materials[t];let o;const a={},c=[];if((s.extensions||{})[Bn.KHR_MATERIALS_UNLIT]){const h=r[Bn.KHR_MATERIALS_UNLIT];o=h.getMaterialType(),c.push(h.extendParams(a,s,e))}else{const h=s.pbrMetallicRoughness||{};if(a.color=new qe(1,1,1),a.opacity=1,Array.isArray(h.baseColorFactor)){const p=h.baseColorFactor;a.color.setRGB(p[0],p[1],p[2],ds),a.opacity=p[3]}void 0!==h.baseColorTexture&&c.push(e.assignTexture(a,"map",h.baseColorTexture,cs)),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=Ns);const d=s.alphaMode||"OPAQUE";if("BLEND"===d?(a.transparent=!0,a.depthWrite=!1):(a.transparent=!1,"MASK"===d&&(a.alphaTest=void 0!==s.alphaCutoff?s.alphaCutoff:.5)),void 0!==s.normalTexture&&o!==qi&&(c.push(e.assignTexture(a,"normalMap",s.normalTexture)),a.normalScale=new xe(1,1),void 0!==s.normalTexture.scale)){const h=s.normalTexture.scale;a.normalScale.set(h,h)}if(void 0!==s.occlusionTexture&&o!==qi&&(c.push(e.assignTexture(a,"aoMap",s.occlusionTexture)),void 0!==s.occlusionTexture.strength&&(a.aoMapIntensity=s.occlusionTexture.strength)),void 0!==s.emissiveFactor&&o!==qi){const h=s.emissiveFactor;a.emissive=(new qe).setRGB(h[0],h[1],h[2],ds)}return void 0!==s.emissiveTexture&&o!==qi&&c.push(e.assignTexture(a,"emissiveMap",s.emissiveTexture,cs)),Promise.all(c).then(function(){const h=new o(a);return s.name&&(h.name=s.name),hd(h,s),e.associations.set(h,{materials:t}),s.extensions&&Sf(r,h,s),h})}createUniqueName(t){const e=Ri.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[Bn.KHR_DRACO_MESH_COMPRESSION].decodePrimitive(a,e).then(function(l){return r$(l,a,e)})}const o=[];for(let a=0,l=t.length;a0&&Gfe(y,s),y.name=e.createUniqueName(s.name||"mesh_"+t),hd(y,s),v.extensions&&Sf(r,y,v),e.assignFinalMaterial(y),h.push(y)}for(let m=0,g=h.length;m1?new No:1===c.length?c[0]:new Fr,d!==c[0])for(let h=0,p=c.length;h{const h=new Map;for(const[p,m]of r.associations)(p instanceof Fo||p instanceof Oo)&&h.set(p,m);return d.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(Lu[s.path]===Lu.weights?t.traverse(function(p){p.morphTargetInfluences&&l.push(p.name?p.name:p.uuid)}):l.push(a),Lu[s.path]){case Lu.weights:c=Hg;break;case Lu.rotation:c=Gg;break;case Lu.position:case Lu.scale:c=Wg;break;default:c=1===n.itemSize?Hg:Wg}const d=void 0!==r.interpolation?Vfe[r.interpolation]:bb,h=this._getArrayFromAccessor(n);for(let p=0,m=l.length;p{r.type.endsWith("Light")&&(console.warn("WORKAROUND: light intensity from GLB divided by 200."),r.intensity*=.005)}),new ra(n.scene)})}}const po=(i,t)=>Array(i).fill(null).map((e,n)=>t(n));class Ef{static startDebugView(t,e){let n=this.activeDebugViews.get(t);return n?n.renderers.includes(e)||n.renderers.push(e):(n={view:new Ef(t),renderers:[e]},this.activeDebugViews.set(t,n)),n.view}static stopDebugView(t,e){const n=t.world,r=this.activeDebugViews.get(n);r&&(r.renderers=r.renderers.filter(s=>s!==e),0===r.renderers.length&&(r.view.dispose(),this.activeDebugViews.delete(n)))}constructor(t){this.world=t,this.debugScene=null,this.aSub=null,this.rSub=null,this.syncMap=new Map,this.debugScene=new kb;const e=n=>{var r,s;const o=n.debugBodySettings;let c,l=this.lineSegmentPointsForShape(o.shape);c=l?new Ng((new hn).setFromPoints(l)):null===(r=this.world)||void 0===r?void 0:r.visualScene.factory.createPrimitive(o.shape,{shading:"wireframe",color:0}).nativeMesh,this.syncMap.set(n,c),null===(s=this.debugScene)||void 0===s||s.add(c)};for(const n of this.world.physicsWorld.children)e(n);this.aSub=this.world.physicsWorld.added$.subscribe(n=>e(n)),this.rSub=this.world.physicsWorld.removed$.subscribe(n=>{var r;const s=this.syncMap.get(n);s&&(this.syncMap.delete(n),null===(r=this.debugScene)||void 0===r||r.remove(s))})}get scene(){return this.debugScene}render(t,e){for(const[r,s]of this.syncMap.entries()){const o=r.debugBodySettings;if(o.ignoreTransform||(s.position.set(...Te.spr(r.position)),s.quaternion.set(...Yi.spr(r.rotation))),s.material){let a=16777215;switch(o.type){case"RIGID_DYNAMIC":a=o.sleeping?255:16711680;break;case"RIGID_STATIC":a=65280;break;case"TRIGGER":a=16776960}s.material.color.set(a),s.material.needsUpdate=!0}}const n=t.autoClearColor;n&&(t.autoClearColor=!1),t.render(this.debugScene,e),n&&(t.autoClearColor=!0)}lineSegmentPointsForShape(t){if("BOX"===t.shape){const e=Te.scalarMult(t.dimensions,.5);return[...po(8,n=>new O(n<4?e.x:-e.x,n%4<2?e.y:-e.y,n%2?e.z:-e.z)),...po(8,n=>new O(n%2?e.x:-e.x,n<4?e.y:-e.y,n%4<2?e.z:-e.z)),...po(8,n=>new O(n%4<2?e.x:-e.x,n%2?e.y:-e.y,n<4?e.z:-e.z))]}if("CYLINDER"===t.shape)return[...po(32,e=>new O(t.radius*Math.sin(Math.floor((e+1)/2)*Math.PI/8),t.radius*Math.cos(Math.floor((e+1)/2)*Math.PI/8),-t.height/2)),...po(32,e=>new O(t.radius*Math.sin(Math.floor((e+1)/2)*Math.PI/8),t.radius*Math.cos(Math.floor((e+1)/2)*Math.PI/8),t.height/2)),...po(8,e=>new O(Math.floor(e/2)%2?0:e<4?t.radius:-t.radius,Math.floor(e/2)%2?e<4?t.radius:-t.radius:0,e%2?t.height/2:-t.height/2)),new O(0,0,-t.height/2),new O(0,0,t.height/2)];if("CONE"===t.shape)return[...po(32,e=>new O(t.radius*Math.sin(Math.floor((e+1)/2)*Math.PI/8),t.radius*Math.cos(Math.floor((e+1)/2)*Math.PI/8),-t.height/2)),...po(8,e=>new O(e%2||Math.floor(e/2)%2?0:e<4?t.radius:-t.radius,e%2?0:Math.floor(e/2)%2?e<4?t.radius:-t.radius:0,e%2?t.height/2:-t.height/2)),new O(0,0,-t.height/2),new O(0,0,t.height/2)];if("SPHERE"===t.shape)return[...po(32,e=>new O(t.radius*Math.sin(Math.floor((e+1)/2)*Math.PI/8),t.radius*Math.cos(Math.floor((e+1)/2)*Math.PI/8),0)),...po(32,e=>new O(t.radius*Math.sin(Math.floor((e+1)/2)*Math.PI/8),0,t.radius*Math.cos(Math.floor((e+1)/2)*Math.PI/8))),...po(32,e=>new O(0,t.radius*Math.sin(Math.floor((e+1)/2)*Math.PI/8),t.radius*Math.cos(Math.floor((e+1)/2)*Math.PI/8)))];if("CAPSULE"===t.shape)return[...this.lineSegmentPointsForShape({shape:"CYLINDER",radius:t.radius,height:t.centersDistance}),...po(16,e=>new O(t.radius*Math.cos(Math.floor((e+1)/2)*Math.PI/8),0,t.radius*Math.sin(Math.floor((e+1)/2)*Math.PI/8)+t.centersDistance/2)),...po(16,e=>new O(t.radius*Math.cos(Math.floor((e+1)/2)*Math.PI/8),0,-t.radius*Math.sin(Math.floor((e+1)/2)*Math.PI/8)-t.centersDistance/2)),...po(16,e=>new O(0,t.radius*Math.cos(Math.floor((e+1)/2)*Math.PI/8),t.radius*Math.sin(Math.floor((e+1)/2)*Math.PI/8)+t.centersDistance/2)),...po(16,e=>new O(0,t.radius*Math.cos(Math.floor((e+1)/2)*Math.PI/8),-t.radius*Math.sin(Math.floor((e+1)/2)*Math.PI/8)-t.centersDistance/2))];if("CONVEX_HULL"===t.shape)return[...t.vertices.map(n=>[new O(n.x-.05,n.y,n.z),new O(n.x+.05,n.y,n.z),new O(n.x,n.y-.05,n.z),new O(n.x,n.y+.05,n.z),new O(n.x,n.y,n.z-.05),new O(n.x,n.y,n.z+.05)]).reduce((n,r)=>(n.push(...r),n),[])];if("COMPOUND"===t.shape){const e=[];for(const{position:n,shape:r,rotation:s}of t.children){let o=this.lineSegmentPointsForShape(r);if(!o)return null;e.push(...o.map(a=>new O(...Te.spr(Te.add(n||Te.O,Te.rot(a,s||Yi.O))))))}return e}return null}dispose(){var t,e;this.debugScene=null,null===(t=this.aSub)||void 0===t||t.unsubscribe(),null===(e=this.rSub)||void 0===e||e.unsubscribe(),this.syncMap=new Map}}Ef.activeDebugViews=new Map;class s$ extends Ese{get physicsDebugViewActive(){return this._physicsDebugViewActive}set physicsDebugViewActive(t){this._physicsDebugViewActive!=t&&(this._physicsDebugViewActive=t,this.world&&(t?this.debugView=Ef.startDebugView(this.world,this):(Ef.stopDebugView(this.debugView,this),this.debugView=null)))}constructor(t,e,n,r={}){super(t,n,r),this.scene=t,this.camera=e,this.canvas=n,this.world=null,this.debugView=null,this._physicsDebugViewActive=!1,this.nativeRenderer=new Tue(Object.assign({canvas:n,alpha:this.rendererOptions.transparent},this.rendererOptions)),this.nativeRenderer.shadowMap.enabled=!0,this.nativeRenderer.setClearColor(this.rendererOptions.background),this.nativeRenderer.shadowMap.type=c4,this.nativeRenderer.setPixelRatio(this.rendererOptions.forceResolution||devicePixelRatio)}addToWorld(t){this.world=t,this.physicsDebugViewActive&&(this.debugView=Ef.startDebugView(this.world,this))}removeFromWorld(t){this.physicsDebugViewActive&&(Ef.stopDebugView(this.debugView,this),this.debugView=null),this.world=null}resizeRenderer(t){this.nativeRenderer.setSize(t.x,t.y),(this.camera.nativeCamera instanceof br||"PerspectiveCamera"==this.camera.nativeCamera.type)&&Math.abs(this.camera.nativeCamera.aspect-t.x/t.y)>.01&&(this.camera.nativeCamera.aspect=t.x/t.y,this.camera.nativeCamera.updateProjectionMatrix())}render(){this.nativeRenderer.render(this.scene.nativeScene,this.camera.nativeCamera),this.physicsDebugViewActive&&this.debugView.render(this.nativeRenderer,this.camera.nativeCamera)}dispose(){this.camera.dispose(),this.nativeRenderer.clear(),this.nativeRenderer.dispose(),this.nativeRenderer.domElement=null}}const Zfe={name:"CopyShader",uniforms:{tDiffuse:{value:null},opacity:{value:1}},vertexShader:"\n\n\t\tvarying vec2 vUv;\n\n\t\tvoid main() {\n\n\t\t\tvUv = uv;\n\t\t\tgl_Position = projectionMatrix * modelViewMatrix * vec4( position, 1.0 );\n\n\t\t}",fragmentShader:"\n\n\t\tuniform float opacity;\n\n\t\tuniform sampler2D tDiffuse;\n\n\t\tvarying vec2 vUv;\n\n\t\tvoid main() {\n\n\t\t\tvec4 texel = texture2D( tDiffuse, vUv );\n\t\t\tgl_FragColor = opacity * texel;\n\n\n\t\t}"};class QS{constructor(){this.isPass=!0,this.enabled=!0,this.needsSwap=!0,this.clear=!1,this.renderToScreen=!1}setSize(){}render(){console.error("THREE.Pass: .render() must be implemented in derived pass.")}dispose(){}}const Qfe=new Ib(-1,1,1,-1,0,1),epe=new class Jfe extends hn{constructor(){super(),this.setAttribute("position",new ct([-1,3,0,-1,-1,0,3,-1,0],3)),this.setAttribute("uv",new ct([0,2,0,0,2,0],2))}};class tpe{constructor(t){this._mesh=new Mn(epe,t)}dispose(){this._mesh.geometry.dispose()}render(t){t.render(this._mesh,Qfe)}get material(){return this._mesh.material}set material(t){this._mesh.material=t}}class npe extends QS{constructor(t,e){super(),this.textureID=void 0!==e?e:"tDiffuse",t instanceof Cl?(this.uniforms=t.uniforms,this.material=t):t&&(this.uniforms=Q4.clone(t.uniforms),this.material=new Cl({name:void 0!==t.name?t.name:"unspecified",defines:Object.assign({},t.defines),uniforms:this.uniforms,vertexShader:t.vertexShader,fragmentShader:t.fragmentShader})),this.fsQuad=new tpe(this.material)}render(t,e,n){this.uniforms[this.textureID]&&(this.uniforms[this.textureID].value=n.texture),this.fsQuad.material=this.material,this.renderToScreen?(t.setRenderTarget(null),this.fsQuad.render(t)):(t.setRenderTarget(e),this.clear&&t.clear(t.autoClearColor,t.autoClearDepth,t.autoClearStencil),this.fsQuad.render(t))}dispose(){this.material.dispose(),this.fsQuad.dispose()}}class o$ extends QS{constructor(t,e){super(),this.scene=t,this.camera=e,this.clear=!0,this.needsSwap=!1,this.inverse=!1}render(t,e,n){const r=t.getContext(),s=t.state;let o,a;s.buffers.color.setMask(!1),s.buffers.depth.setMask(!1),s.buffers.color.setLocked(!0),s.buffers.depth.setLocked(!0),this.inverse?(o=0,a=1):(o=1,a=0),s.buffers.stencil.setTest(!0),s.buffers.stencil.setOp(r.REPLACE,r.REPLACE,r.REPLACE),s.buffers.stencil.setFunc(r.ALWAYS,o,4294967295),s.buffers.stencil.setClear(a),s.buffers.stencil.setLocked(!0),t.setRenderTarget(n),this.clear&&t.clear(),t.render(this.scene,this.camera),t.setRenderTarget(e),this.clear&&t.clear(),t.render(this.scene,this.camera),s.buffers.color.setLocked(!1),s.buffers.depth.setLocked(!1),s.buffers.color.setMask(!0),s.buffers.depth.setMask(!0),s.buffers.stencil.setLocked(!1),s.buffers.stencil.setFunc(r.EQUAL,1,4294967295),s.buffers.stencil.setOp(r.KEEP,r.KEEP,r.KEEP),s.buffers.stencil.setLocked(!0)}}class ipe extends QS{constructor(){super(),this.needsSwap=!1}render(t){t.state.buffers.stencil.setLocked(!1),t.state.buffers.stencil.setTest(!1)}}class rpe{constructor(t,e){if(this.renderer=t,this._pixelRatio=t.getPixelRatio(),void 0===e){const n=t.getSize(new xe);this._width=n.width,this._height=n.height,(e=new Mu(this._width*this._pixelRatio,this._height*this._pixelRatio,{type:Jm})).texture.name="EffectComposer.rt1"}else this._width=e.width,this._height=e.height;this.renderTarget1=e,this.renderTarget2=e.clone(),this.renderTarget2.texture.name="EffectComposer.rt2",this.writeBuffer=this.renderTarget1,this.readBuffer=this.renderTarget2,this.renderToScreen=!0,this.passes=[],this.copyPass=new npe(Zfe),this.copyPass.material.blending=Jc,this.clock=new OG}swapBuffers(){const t=this.readBuffer;this.readBuffer=this.writeBuffer,this.writeBuffer=t}addPass(t){this.passes.push(t),t.setSize(this._width*this._pixelRatio,this._height*this._pixelRatio)}insertPass(t,e){this.passes.splice(e,0,t),t.setSize(this._width*this._pixelRatio,this._height*this._pixelRatio)}removePass(t){const e=this.passes.indexOf(t);-1!==e&&this.passes.splice(e,1)}isLastEnabledPass(t){for(let e=t+1;e0?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;l$.fromArray(r,t),yO.fromArray(r,e),c$.fromArray(r,n),Ba.subVectors(c$,yO),d$.subVectors(l$,yO),Ba.cross(d$),Ba.normalize(),s.push(Ba.x,Ba.y,Ba.z),s.push(Ba.x,Ba.y,Ba.z),s.push(Ba.x,Ba.y,Ba.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 d=this.vertices.length;let h=this.parseVertexIndex(t,d),p=this.parseVertexIndex(e,d),m=this.parseVertexIndex(n,d);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?(JS.setRGB(parseFloat(h[4]),parseFloat(h[5]),parseFloat(h[6])).convertSRGBToLinear(),e.colors.push(JS.r,JS.g,JS.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"===d){const p=c.slice(1).trim().split(a$),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 No;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 ct(d.normals,3)),d.colors.length>0&&(g=!0,b.setAttribute("color",new ct(d.colors,3))),!0===d.hasUVIndices&&b.setAttribute("uv",new ct(d.uvs,2));const v=[];for(let M=0,x=h.length;M1){for(let M=0,x=h.length;M0){const a=new mf({size:1,sizeAttenuation:!1}),l=new hn;l.setAttribute("position",new ct(e.vertices,3)),e.colors.length>0&&void 0!==e.colors[0]&&(l.setAttribute("color",new ct(e.colors,3)),a.vertexColors=!0);const c=new Vb(l,a);s.add(c)}return s}}class bO extends yf{constructor(t){super(t)}load(t,e,n,r){const s=this,o=""===this.path?Ou.extractUrlBase(t):this.path,a=new La(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,d):c;h=h.toLowerCase();let p=d>=0?c.substring(d+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 fpe(this.resourcePath||e,this.materialOptions);return a.setCrossOrigin(this.crossOrigin),a.setManager(this.manager),a.setMaterials(o),a}}class fpe{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:lc,this.wrap=void 0!==this.options.wrap?this.options.wrap:Bs}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),d=e.loadTexture(function s(a,l){return"string"!=typeof l||""===l?"":/^https?:\/\//i.test(l)?l:a+l}(e.baseUrl,c.url));d.repeat.copy(c.scale),d.offset.copy(c.offset),d.wrapS=e.wrap,d.wrapT=e.wrap,("map"===a||"emissiveMap"===a)&&(d.colorSpace=cs),r[a]=d}for(const a in n){const l=n[a];let c;if(""!==l)switch(a.toLowerCase()){case"kd":r.color=(new qe).fromArray(l).convertSRGBToLinear();break;case"ks":r.specular=(new qe).fromArray(l).convertSRGBToLinear();break;case"ke":r.emissive=(new qe).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 zS(r),this.materials[t]}getTextureParams(t,e){const n={scale:new xe(1,1),offset:new xe(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:wG;let a=o.getHandler(t);null===a&&(a=new Pu(o)),a.setCrossOrigin&&a.setCrossOrigin(this.crossOrigin);const l=a.load(t,n,r,s);return void 0!==e&&(l.mapping=e),l}}const ppe=["determinateSpinner"];function mpe(i,t){if(1&i&&(ki(),W(0,"svg",11),Pe(1,"circle",12),j()),2&i){const e=he();Dt("viewBox",e._viewBox()),G(1),qo("stroke-dasharray",e._strokeCircumference(),"px")("stroke-dashoffset",e._strokeCircumference()/2,"px")("stroke-width",e._circleStrokeWidth(),"%"),Dt("r",e._circleRadius())}}const gpe=Qy(class{constructor(i){this._elementRef=i}},"primary"),_pe=new me("mat-progress-spinner-default-options",{providedIn:"root",factory:function vpe(){return{diameter:u$}}}),u$=100;let Jb=(()=>{class i extends gpe{constructor(e,n,r){super(e),this.mode="mat-spinner"===this._elementRef.nativeElement.nodeName.toLowerCase()?"indeterminate":"determinate",this._value=0,this._diameter=u$,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,Ps(e)))}get diameter(){return this._diameter}set diameter(e){this._diameter=Ps(e)}get strokeWidth(){return this._strokeWidth??this.diameter/10}set strokeWidth(e){this._strokeWidth=Ps(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)(E(gt),E(kr,8),E(_pe))},i.\u0275cmp=ot({type:i,selectors:[["mat-progress-spinner"],["mat-spinner"]],viewQuery:function(e,n){if(1&e&&Wn(ppe,5),2&e){let r;Et(r=At())&&(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&&(Dt("aria-valuemin",0)("aria-valuemax",100)("aria-valuenow","determinate"===n.mode?n.value:null)("mode",n.mode),qo("width",n.diameter,"px")("height",n.diameter,"px"),un("_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:[lt],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&&(fe(0,mpe,2,8,"ng-template",null,0,zc),W(2,"div",1,2),ki(),W(4,"svg",3),Pe(5,"circle",4),j()(),va(),W(6,"div",5)(7,"div",6)(8,"div",7),sy(9,8),j(),W(10,"div",9),sy(11,8),j(),W(12,"div",10),sy(13,8),j()()()),2&e){const r=Zi(1);G(4),Dt("viewBox",n._viewBox()),G(1),qo("stroke-dasharray",n._strokeCircumference(),"px")("stroke-dashoffset",n._strokeDashOffset(),"px")("stroke-width",n._circleStrokeWidth(),"%"),Dt("r",n._circleRadius()),G(4),U("ngTemplateOutlet",r),G(2),U("ngTemplateOutlet",r),G(2),U("ngTemplateOutlet",r)}},dependencies:[xy],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})(),bpe=(()=>{class i{}return i.\u0275fac=function(e){return new(e||i)},i.\u0275mod=nn({type:i}),i.\u0275inj=Kt({imports:[Ao,Qn]}),i})();const xpe=["previewCanvasContainer"],wpe=["previewCanvas"];function Mpe(i,t){if(1&i){const e=ai();$r(0),W(1,"label",11),ze(2),j(),W(3,"input",12),Le("change",function(r){rn(e);const s=he().$implicit;return s.value=r.currentTarget.checked,Ut(s.change(s.value))}),j(),Wr()}if(2&i){const e=he(),n=e.index,r=e.$implicit,s=he().index;G(1),U("for","custom_control_"+s+"_"+n),G(1),_i(r.label),G(1),U("id","custom_control_"+s+"_"+n)("type",r.type)("checked",r.value)}}function Cpe(i,t){if(1&i){const e=ai();W(0,"div",9)(1,"label",11),ze(2),j(),W(3,"input",14),Le("change",function(){const s=rn(e).$implicit,o=he(2).$implicit;return o.value=s,Ut(o.change(o.value))}),j()()}if(2&i){const e=t.$implicit,n=he(2),r=n.index,s=n.$implicit,o=he().index;G(1),U("for","custom_control_"+o+"_"+r+"_"+e),G(1),_i(e),G(1),U("id","custom_control_"+o+"_"+r+"_"+e)("checked",s.value===e)}}function Spe(i,t){if(1&i&&(W(0,"div",13)(1,"label"),ze(2),j(),fe(3,Cpe,4,4,"div",8),j()),2&i){const e=he().$implicit;G(2),_i(e.label),G(1),U("ngForOf",e.options)}}function Epe(i,t){if(1&i){const e=ai();$r(0),W(1,"label",11),ze(2),j(),W(3,"input",15),Le("colorChange",function(r){rn(e);const s=he().$implicit,o=he(2);return s.value=o.toRGB(r.value),Ut(s.change(s.value))}),j(),Pe(4,"ngx-mat-color-toggle",16)(5,"ngx-mat-color-picker",null,17),Wr()}if(2&i){const e=Zi(6),n=he(),r=n.index,s=n.$implicit,o=he().index;G(1),U("for","custom_control_"+o+"_"+r),G(1),_i(s.label),G(1),U("ngxMatColorPicker",e),G(1),U("for",e)}}function Ape(i,t){if(1&i){const e=ai();$r(0),W(1,"label",11),ze(2),j(),W(3,"input",18),Le("change",function(r){rn(e);const s=he().$implicit;return s.value=r.currentTarget.value,Ut(s.change(s.value))}),j(),Wr()}if(2&i){const e=he(),n=e.index,r=e.$implicit,s=he().index;G(1),U("for","custom_control_"+s+"_"+n),G(1),_i(r.label),G(1),U("id","custom_control_"+s+"_"+n)("min",r.minValue)("max",r.maxValue)("step",r.valueStep)("value",r.value)}}function Dpe(i,t){if(1&i&&(W(0,"div",9),fe(1,Mpe,4,5,"ng-container",6),fe(2,Spe,4,2,"div",10),fe(3,Epe,7,4,"ng-container",6),fe(4,Ape,4,7,"ng-container",6),j()),2&i){const e=t.$implicit;G(1),U("ngIf","checkbox"===e.type),G(1),U("ngIf","radio"===e.type),G(1),U("ngIf","color"===e.type),G(1),U("ngIf","slider"===e.type)}}function Tpe(i,t){if(1&i&&($r(0),W(1,"h4"),ze(2),j(),fe(3,Dpe,5,4,"div",8),Wr()),2&i){const e=t.$implicit;G(2),_i(e.title),G(1),U("ngForOf",e.controls)}}function Ipe(i,t){if(1&i){const e=ai();W(0,"div",9)(1,"label",11),ze(2),j(),W(3,"input",19),Le("change",function(r){return Ut(rn(e).$implicit.visible=r.currentTarget.checked)}),j()()}if(2&i){const e=t.$implicit;G(1),U("for","visibility_"+e.name),G(1),_i(e.name),G(1),U("id","visibility_"+e.name)("checked",e.visible)}}function Rpe(i,t){if(1&i&&($r(0),W(1,"h4"),ze(2,"Objects visibility"),j(),fe(3,Ipe,4,4,"div",8),Wr()),2&i){const e=he();G(3),U("ngForOf",e.meshes)}}function kpe(i,t){1&i&&Pe(0,"mat-spinner",20)}const sa=i=>{i.colorSpace="srgb",i.anisotropy=8,i.magFilter=vr,i.minFilter=vr};let h$=(()=>{class i{constructor(e){this.cdr=e,this.visibilityControls=!0,this.groupFunction=null,this.customControls=[],this.onObjectLoaded=new $e,this._paths$=new ut(null),this.destroyed$=new Re,this.entity=null,this.meshes=[]}get paths(){return this._paths$.getValue()}set paths(e){this._paths$.next(e)}ngAfterViewInit(){var e=this;return tt(function*(){var s;e.world=new sk(new vO,{init:(s=tt(function*(){}),function(){return s.apply(this,arguments)}),simulate:()=>{}}),yield e.world.init(),e.world.visualScene.nativeScene.add(new $S(16777215,2));let n=new ut({x:1,y:1});e.renderer=e.world.addRenderer(e.world.visualScene.factory.createPerspectiveCamera({frustrum:{near:.01,far:1e4}}),e.previewCanvas.nativeElement,{size:n.asObservable(),background:11184810}),e.controller=new kse(e.renderer,{mouseOptions:{canvas:e.previewCanvas.nativeElement},orbiting:{sensitivityX:2,sensitivityY:2},orbitingElasticity:30}),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(Ve(e.destroyed$)).subscribe(function(){var s=tt(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 Qb,h=yield(new bO).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 No;y.add(...b[v]),y.name=v,p.remove(...b[v]),p.add(y)}}e.meshes=p.children,e.meshes.sort((b,v)=>b.name>v.name?1:-1),p.traverse(b=>{if(b instanceof Mn){const v=b.material instanceof Array?b.material:[b.material];for(const y of v)y.transparent=!0,y.alphaTest=.5,y instanceof qi&&y.map&&(y.map.wrapS=er,y.map.wrapT=er,sa(y.map),y.map.needsUpdate=!0)}}),e.onObjectLoaded.next(p),e.entity=new Jo({object3D:new ra(p)}),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=Te.scalarMult(Te.add(m.min,m.max),.5),e.controller.spherical={phi:1.22,theta:-1.32,radius:Te.dist(m.min,m.max)},e.cdr.markForCheck()}});return function(o){return s.apply(this,arguments)}}())})()}toRGB(e){return(e?.r||0)<<16|(e?.g||0)<<8|(e?.b||0)}ngOnDestroy(){this.destroyed$.next(),this.destroyed$.complete()}}return i.\u0275fac=function(e){return new(e||i)(E(Zn))},i.\u0275cmp=ot({type:i,selectors:[["app-obj-viewer"]],viewQuery:function(e,n){if(1&e&&(Wn(xpe,5),Wn(wpe,5)),2&e){let r;Et(r=At())&&(n.previewCanvasContainer=r.first),Et(r=At())&&(n.previewCanvas=r.first)}},inputs:{paths:"paths",visibilityControls:"visibilityControls",groupFunction:"groupFunction",customControls:"customControls"},outputs:{onObjectLoaded:"onObjectLoaded"},decls:8,vars:3,consts:[[1,"previewCanvasContainer"],["previewCanvasContainer",""],["width","640","height","480"],["previewCanvas",""],["id","controls"],[4,"ngFor","ngForOf"],[4,"ngIf"],["mode","indeterminate",4,"ngIf"],["class","controls-list",4,"ngFor","ngForOf"],[1,"controls-list"],["style","width: 100%",4,"ngIf"],[3,"for"],[3,"id","type","checked","change"],[2,"width","100%"],["type","radio",3,"id","checked","change"],["matInput","",1,"hidden",3,"ngxMatColorPicker","colorChange"],["matSuffix","",3,"for"],["picker",""],["type","range",3,"id","min","max","step","value","change"],["type","checkbox",3,"id","checked","change"],["mode","indeterminate"]],template:function(e,n){1&e&&(W(0,"div",0,1),Pe(2,"canvas",2,3),W(4,"div",4),fe(5,Tpe,4,2,"ng-container",5),fe(6,Rpe,4,1,"ng-container",6),j(),fe(7,kpe,1,0,"mat-spinner",7),j()),2&e&&(G(5),U("ngForOf",n.customControls),G(1),U("ngIf",n.visibilityControls),G(1),U("ngIf",!n.entity))},dependencies:[Eo,vi,Xte,rc,Jb,jie,bC,LH],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%] > h4[_ngcontent-%COMP%]{margin:0}.previewCanvasContainer[_ngcontent-%COMP%] #controls[_ngcontent-%COMP%] .controls-list[_ngcontent-%COMP%]{width:100%;display:flex;-webkit-user-select:none;user-select:none;align-items:center}.previewCanvasContainer[_ngcontent-%COMP%] #controls[_ngcontent-%COMP%] .controls-list[_ngcontent-%COMP%] > span[_ngcontent-%COMP%]{flex-grow:1}.previewCanvasContainer[_ngcontent-%COMP%] #controls[_ngcontent-%COMP%] .controls-list[_ngcontent-%COMP%] > label[_ngcontent-%COMP%]{flex-grow:1}"],changeDetection:0}),i})();function Ppe(i,t){if(1&i){const e=ai();ki(),W(0,"circle",5),Le("mousedown",function(r){return rn(e),Ut(he().startDrag(r))}),Ct(1,"async"),Ct(2,"async"),j()}if(2&i){const e=he();let n,r;Dt("cx",(null==(n=Tt(1,3,e.mapPointer$))?null:n.x)||0)("cy",(null==(r=Tt(2,5,e.mapPointer$))?null:r.y)||0)("r",10)}}const Ope=function(){return{"stroke-width":3}};let f$=(()=>{class i{constructor(e){this.ref=e,this._roadSpline$=new ut([]),this._pointer$=new ut(null),this._projection$=new ut("nz"),this._roadSplineProjected$=new ut([]),this._pointerProjected$=new ut(yi.O),this.splineClosed=!1,this.pointerChange=new $e,this.svgSize$=new ut({x:100,y:100}),this.scalingSquare$=new ut({x:0,y:0,width:100,height:100}),this.mapPolyline$=new ut(""),this.mapPointer$=new ut(null),this.isShiftPressed=!1,this.destroyed$=new Re,this.isDragging=!1}set roadSpline(e){this._roadSpline$.next(e)}set pointer(e){this._pointer$.next(e)}set projection(e){this._projection$.next(e)}get trackLength$(){return this._roadSpline$.pipe(et(e=>{let n=0;for(let r=1;r{"Shift"===n.key&&(this.isShiftPressed=!0)}),To(window,"keyup").pipe(Ve(this.destroyed$)).subscribe(n=>{"Shift"===n.key&&(this.isShiftPressed=!1)}),Xl([this._roadSpline$,this._projection$]).pipe(Ve(this.destroyed$)).subscribe(([n,r])=>{this._roadSplineProjected$.next(n.map(s=>this.project(s)))}),Xl([this._pointer$,this._projection$]).pipe(Ve(this.destroyed$)).subscribe(([n,r])=>{this._pointerProjected$.next(this.project(n||Te.O))}),this._roadSplineProjected$.pipe(Ve(this.destroyed$),et(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.y)},s={x:Math.max(s.x,a.x),y:Math.max(s.y,a.y)}});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$),Xl([this._roadSplineProjected$,this.scalingSquare$,this.svgSize$]).pipe(Ve(this.destroyed$),et(([n,r,s])=>{const o=n.map(a=>({x:(a.x-r.x)*s.x/r.width,y:(r.y-a.y)*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$),Xl([this._pointerProjected$,this.scalingSquare$.asObservable(),this.svgSize$]).pipe(Ve(this.destroyed$),et(([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()}startDrag(e){this.isDragging=!0,this.updatePointer(e)}drag(e){this.isDragging&&this.updatePointer(e)}endDrag(){this.isDragging=!1}getClosestProjectedLineIndex(e){const n=this._roadSplineProjected$.getValue();let r=-1,s=Number.MAX_SAFE_INTEGER;for(let d=1;d{return(i=Af||(Af={})).ThreeModel="model",i.Bitmap="bitmap",i.TwoSidedBitmap="two_sided_bitmap",Af;var i})();class Hpe extends QH{constructor(t,e,n){super(t,{loadDepth:40,inertia:2}),this.mapGraph=t,this.famPath=e,this.hideUnknownEntities$=n,this.textureLoader=new Pu,this.terrainMaterials={},this.objLoader=new Qb,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(Ql(),Ve(this._onRemoved$)).subscribe(e=>{for(const n of this.unknownEntities)n.visible=!e})}getPlaceholderTexture(){var t=this;return tt(function*(){return t._placeholder?t._placeholder:(t._placeholderPromise||(t._placeholderPromise=t.textureLoader.loadAsync("assets/placeholder_texture.png")),t._placeholderPromise)})()}getPlaceholderTerrainTexture(){var t=this;return tt(function*(){return t._placeholderTerrain?t._placeholderTerrain:(t._placeholderTerrainPromise||(t._placeholderTerrainPromise=t.textureLoader.loadAsync("assets/placeholder_texture.png").then(e=>(e.wrapS=Bs,e.wrapT=er,sa(e),e.flipY=!0,e))),t._placeholderTerrainPromise)})()}loadChunk(t){var e=this;return tt(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 Mn&&(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:Te.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:Yi.fromAngle(Te.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 Jo({object3D:new ra(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 qi({side:Ns,transparent:!0,visible:!1}),this.famPath?this.textureLoader.loadAsync(`${this.famPath}/background/${t}.png`).then(e=>{e.wrapS=Bs,e.wrapT=er,sa(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 tt(function*(){let n=!1;if(t.type==Af.ThreeModel){let r;try{if(!e.famPath)throw new Error;const o=new bO,a=new Qb,l=yield o.loadAsync(`${e.famPath}/props/${t.data.data.resource_id}/0/material.mtl`);l.preload(),a.setMaterials(l),r=new ra(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 Mn){const a=o.material instanceof Array?o.material:[o.material];for(const l of a)l.transparent=!0,l.alphaTest=.5,l instanceof qi&&l.map&&(l.map.wrapS=er,l.map.wrapT=er,sa(l.map),l.map.needsUpdate=!0)}});const s=new Jo({object3D: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==Af.Bitmap||t.type==Af.TwoSidedBitmap){const r=(c,d)=>new Array(d).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 No,[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==Af.TwoSidedBitmap){const[c,d]=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 Jo({object3D:new ra(s)});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 tt(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=>(sa(h),new qi({map:h,alphaTest:.5,transparent:!0,side:Ns}))),d=new Mn(new Iu(e.x,e.y),c[0]);if(d.rotateX(Math.PI/2),d.position.set(0,0,e.y/2),c.length>1){let h=-1;Ym(r.world).pipe(o4(n&&!isNaN(+n)?1e3*+n:250)).subscribe(()=>{h=(h+1)%c.length,d.material=c[h]})}return[d,a]})()}}let Gpe=(()=>{class i{constructor(e,n,r){this.eelDelegate=e,this.cdr=n,this.mainService=r,this._resource$=new ut(null),this.changed=new $e,this.previewLoading$=new ut(!0),this.previewFamLocation$=new ut(null),this.previewFamLoading$=new ut(!1),this.pointer$=new ut(null),this.selectedSplineIndex$=new ut(0),this.selectedSplineItem$=new ut(null),this.selectedAiInfoItem$=new ut(null),this.selectedTerrainItem$=new ut(null),this.famPath=null,this.name="",this.renderer=null,this.map=null,this.isOpenedTrack=!0,this.roadPath=null,this.destroyed$=new Re}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=>({x:e.position.x,y:e.position.z,z:e.position.y}))||[]}ngAfterViewInit(){var e=this;return tt(function*(){var s;e.world=new sk(new vO,{init:(s=tt(function*(){}),function(){return s.apply(this,arguments)}),simulate:()=>{},loader:{loadFromGgGlb:function(){var s=tt(function*(...o){return[]});return function(){return s.apply(this,arguments)}}()}}),yield e.world.init(),e.skySphere=new Jo({object3D:e.world.visualScene.factory.createPrimitive({shape:"SPHERE",radius:1e3},{color:16777215})}),e.skySphere.object3D.nativeMesh.material.side=Ns,e.world.addEntity(e.skySphere),e.selectionSphere=new Jo({object3D: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 $S(16777215,2));let n=new ut({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=Yi.lookAt(e.renderer.camera.position,Te.add(e.renderer.camera.position,Te.Y),Te.Z),Ym(e.world).pipe(Ve(e.destroyed$)).subscribe(()=>{e.renderer&&(e.skySphere.position=e.renderer.camera.position,e.pointer$.next(e.renderer.camera.position))}),e.controller=new n4(e.world.keyboardInput,e.renderer,{mouseOptions:{canvas:e.previewCanvas.nativeElement,pointerLock:!0},keymap:"wasd+arrows",cameraLinearSpeed:40,cameraBoostMultiplier:4,cameraMovementElasticity:100,cameraRotationElasticity:30,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(Ve(e.destroyed$)).subscribe(function(){var s=tt(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(Ve(e.destroyed$),gn(([s,o])=>!!e.resource&&s.startsWith(e.resource.id)),ml(3e3)).subscribe(tt(function*(){e.previewLoading$.next(!0),yield e.postTmpUpdates(e.resource?.id),yield e.loadPreview(),e.previewLoading$.next(!1)})),e.selectedSplineIndex$.pipe(Ve(e.destroyed$),ml(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=Te.add(a,Te.rotAround({x:10,y:-12,z:5},{x:0,y:0,z:1},-e.resource.data.road_spline[s].orientation)),e.renderer.rotation=Yi.lookAt(e.renderer.position,a,{x:0,y:0,z:1}),e.controller.reset())}e.selectedSplineItem$.next({id:sc(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:sc(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:sc(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 tt(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 Pu,o=r.find(a=>a.endsWith("spherical.png"));if(o){const a=yield s.loadAsync(o);a.colorSpace="srgb",a.mapping=cc,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 tt(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})()}onPointerChange(e){this.renderer&&(this.renderer.position=e)}loadPreview(){var e=this;return tt(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=Km.fromMapArray(e.roadPath.map((r,s)=>({path:`${e.terrainChunksObjLocation}terrain_chunk_${s}`,position:r,loadOptions:{}}))||[],!e.isOpenedTrack);e.unloadPreview(),e.map=new Hpe(n,e.famPath&&"resources/"+e.famPath,e.mainService.hideHiddenFields$),e.map.resource=e.resource,e.map.isOpenedTrack=e.isOpenedTrack,Ym(e.world).pipe(Ve(e.destroyed$)).subscribe(()=>{e.map&&e.renderer&&e.map.loaderCursor$.next(e.renderer.position)}),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 tt(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)(E(Jl),E(Zn),E(Pa))},i.\u0275cmp=ot({type:i,selectors:[["app-tri-map-block-ui"]],viewQuery:function(e,n){if(1&e&&(Wn(Fpe,5),Wn(Lpe,5)),2&e){let r;Et(r=At())&&(n.previewCanvasContainer=r.first),Et(r=At())&&(n.previewCanvas=r.first)}},inputs:{resource:"resource"},outputs:{changed:"changed"},decls:49,vars:44,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","projection","pointerChange"],[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&&(W(0,"div",0)(1,"h4"),ze(2,"Preview *.FAM file"),j(),W(3,"mat-form-field",1)(4,"mat-label"),ze(5,"Current preview FAM"),j(),W(6,"mat-select",2,3),Le("valueChange",function(s){return n.onFamSelected(s)}),Ct(8,"async"),Ct(9,"async"),fe(10,Npe,2,2,"mat-option",4),W(11,"mat-option",5),ze(12,"custom"),j()()(),fe(13,Bpe,9,3,"ng-container",6),fe(14,Upe,1,1,"mat-spinner",7),Ct(15,"async"),j(),W(16,"div",8)(17,"div",9,10),Pe(19,"canvas",11,12),fe(21,Vpe,1,0,"mat-spinner",13),Ct(22,"async"),j(),W(23,"div",14,10)(25,"mat-form-field",1)(26,"mat-label"),ze(27,"Spline item"),j(),W(28,"input",15),Le("ngModelChange",function(s){return n.selectedSplineIndex$.next(s)}),Ct(29,"async"),Ct(30,"async"),j()(),W(31,"app-minimap",16),Le("pointerChange",function(s){return n.onPointerChange(s)}),Ct(32,"async"),j()()(),W(33,"h4"),ze(34,"Road spline item"),j(),Pe(35,"app-compound-block-ui",17),Ct(36,"async"),W(37,"h4"),ze(38,"AI info (block for 4 spline items)"),j(),Pe(39,"app-compound-block-ui",17),Ct(40,"async"),W(41,"h4"),ze(42,"Terrain (block for 4 spline items)"),j(),Pe(43,"app-compound-block-ui",17),Ct(44,"async"),W(45,"h4"),ze(46,"Common"),j(),Pe(47,"app-compound-block-ui",18),Ct(48,"async")),2&e){const r=Zi(7);let s;G(6),U("value",n.previewFamPossibleLocations.includes(Tt(8,21,n.previewFamLocation$))?Tt(9,23,n.previewFamLocation$):"custom"),G(4),U("ngForOf",n.previewFamPossibleLocations),G(3),U("ngIf","custom"==r.value),G(1),U("ngIf",Tt(15,25,n.previewFamLoading$)),G(7),U("ngIf",Tt(22,27,n.previewLoading$)),G(7),U("min",0)("max",4*(null==(s=Tt(29,29,n._resource$))?null:s.data.num_chunks)-1)("ngModel",Tt(30,31,n.selectedSplineIndex$)),G(3),U("roadSpline",n.roadSpline)("pointer",Tt(32,33,n.pointer$))("splineClosed",!n.isOpenedTrack)("projection","nz"),G(4),U("resource",Tt(36,35,n.selectedSplineItem$))("hideBlockActions",!0),G(4),U("resource",Tt(40,37,n.selectedAiInfoItem$))("hideBlockActions",!0),G(4),U("resource",Tt(44,39,n.selectedTerrainItem$))("hideBlockActions",!0),G(4),U("resource",Tt(48,41,n._resource$))("hideBlockActions",!0)("fieldWhitelist",Rs(43,zpe))}},dependencies:[Eo,vi,gl,mu,nc,_u,gu,Zc,vl,Ro,rc,ib,fb,Nm,Jb,ec,f$,pl],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-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})();const p$=i=>new Promise(t=>setTimeout(t,i)),m$=(i,t,e=null)=>{const n=document.createElement("canvas"),r=n.getContext("2d",{willReadFrequently:!0}),s=i.width,o=i.height;n.width=s,n.height=o,r.drawImage(i,0,0,s,o);const a=r.getImageData(0,0,s,o);for(let l=0;l{if(!(o instanceof Mn))return;let a=-1;if(o.name.startsWith("lbl__rt_frnt")?a=0:o.name.startsWith("lbl__lt_frnt")?a=1:o.name.startsWith("lbl__rt_rear")?a=2:o.name.startsWith("lbl__lt_rear")&&(a=3),a>-1){this.wheels[a]=o,a<2&&(this.frontWheels[a]=o),o.geometry.boundingBox||o.geometry.computeBoundingBox();const l=Te.avg(o.geometry.boundingBox.min,o.geometry.boundingBox.max);o.geometry.translate(...Te.spr(Te.neg(l))),o.position.set(...Te.spr(l)),this.wheelIdlePositions[a]=l}(o.name.includes("rsid")||o.name.includes("lite"))&&(r.push(o),this.originalTexWithTailLights=o.material.map)}),!this.originalTexWithTailLights)throw new Error("Not a driveable NFS1 car");this.tailLightColors=n.includes("TRAFFC.CFM")?[9509903,16711680]:[3212546,16258068],this.texWithTailLightsImg=document.createElement("img"),this.texWithTailLights=new Oo(this.texWithTailLightsImg),this.texWithTailLights.flipY=this.originalTexWithTailLights.flipY,sa(this.texWithTailLights),this.recolorTailLights(this.tailLightColors[0]).then();for(const o of r)o.material.map=this.texWithTailLights;const s=new Pu;this.tyreTextures=[1,2,3,4].map(o=>s.load(`${n}/tyr${o}.png`));for(const o of this.tyreTextures)sa(o);this.tyreMaterial=new qi({map:this.tyreTextures[0]}),this.tyreMaterial.transparent=!0,this.tyreMaterial.alphaTest=.5,this.tyreMaterial.map.wrapS=er,this.tyreMaterial.map.wrapT=er,this.tyreMaterial.polygonOffset=!0,this.tyreMaterial.polygonOffsetFactor=-4;for(const o of this.wheels)o.material=this.tyreMaterial}get tailLightsOn(){return this._tailLightsOn}set tailLightsOn(t){t!==this._tailLightsOn&&(this._tailLightsOn=t,this.recolorTailLights(this.tailLightColors[t?1:0]))}get speed(){return this._speed}set speed(t){if(t!==this._speed){switch(this._speed=t,this.tyreTextureUpdateTimer&&clearInterval(this.tyreTextureUpdateTimer),t){case"idle":this.tyreMaterial.map=this.tyreTextures[0];break;case"slow":let e=!0;this.tyreTextureUpdateTimer=setInterval(()=>{this.tyreMaterial.map=this.tyreTextures[e?1:2],this.tyreMaterial.needsUpdate=!0,e=!e},16);break;case"fast":this.tyreMaterial.map=this.tyreTextures[3]}this.tyreMaterial.needsUpdate=!0}}get steeringAngle(){return this._steeringAngle}set steeringAngle(t){if(t!==this._steeringAngle){this._steeringAngle=t;for(const e of this.frontWheels)e.rotation.set(0,0,t)}}recolorTailLights(t){var e=this;return tt(function*(){if(e.originalTexWithTailLights&&e.texWithTailLights&&e.texWithTailLightsImg){for(let n=100;n>0&&!e.originalTexWithTailLights.source.data;n--)yield p$(50);((i,t,e,n=null)=>{const[r,s,o]=[t>>16,t>>8&255,255&t],[a,l,c]=[e>>16,e>>8&255,255&e];m$(i,(d,h)=>{d[h]==r&&d[h+1]==s&&d[h+2]==o&&(d[h]=a,d[h+1]=l,d[h+2]=c)},n)})(e.originalTexWithTailLights.source.data,e.tailLightsTexColor,t,e.texWithTailLightsImg),e.texWithTailLights.needsUpdate=!0}})()}dispose(){this.texWithTailLightsImg&&(this.texWithTailLightsImg.remove(),this.texWithTailLightsImg=null),this.texWithTailLights&&(this.texWithTailLights.dispose(),this.texWithTailLights=null),this.tyreTextureUpdateTimer&&clearInterval(this.tyreTextureUpdateTimer),this.tyreMaterial&&(this.tyreMaterial.dispose(),this.tyreMaterial=null)}}let jpe=(()=>{class i{constructor(e,n,r){this.eelDelegate=e,this.mainService=n,this.cdr=r,this._resource$=new ut(null),this.changed=new $e,this.previewPaths$=new ut(null),this.destroyed$=new Re,this.customControls=[],this.serializerSettings={geometry__save_obj:!0,geometry__save_blend:!1,geometry__export_to_gg_web_engine:!1}}get resource(){return this._resource$.getValue()}set resource(e){this._resource$.next(e)}ngAfterViewInit(){var e=this;return tt(function*(){e._resource$.pipe(Ve(e.destroyed$)).subscribe(function(){var n=tt(function*(r){e.previewPaths$.next(yield e.loadPreviewFilePaths(r?.id))});return function(r){return n.apply(this,arguments)}}()),e.mainService.dataBlockChange$.pipe(Ve(e.destroyed$),gn(([n,r])=>!!e.resource&&n.startsWith(e.resource.id)),ml(1500)).subscribe(tt(function*(){e.previewPaths$.next(null),e.previewPaths$.next(yield e.postTmpUpdates(e.resource?.id))}))})()}onObjectLoaded(e){var n=this;return tt(function*(){if((n._resource$.value?.id||"").includes(".CFM__"))try{const r=n.resource?.id.split("/");r.pop(),r[r.length-1]=""+(+r[r.length-1]+1);const s=yield n.eelDelegate.retrieveValue(r.join("/")+"/data"),o=s.children_aliases.findIndex(l=>"!PAL"===l);if(-1==o)throw new Error("Not a car");const a=new Wpe(e,s.children[o].data.colors[254]>>>8,n.previewPaths$.value[0].substring(0,n.previewPaths$.value[0].lastIndexOf("/"))+"/assets");n.customControls=[{title:"TNFS car features",controls:[{label:"Brake lights on",type:"checkbox",value:!1,change:l=>{a.tailLightsOn=l}},{label:"Car speed",type:"radio",options:["idle","slow","fast"],value:"idle",change:l=>{a.speed=l}},{label:"Steering angle",type:"slider",minValue:-.7,maxValue:.7,valueStep:.05,value:0,change:l=>{a.steeringAngle=l}}]}],n.cdr.markForCheck()}catch{}})()}postTmpUpdates(e){var n=this;return tt(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 tt(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)(E(Jl),E(Pa),E(Zn))},i.\u0275cmp=ot({type:i,selectors:[["app-orip-geometry-block-ui"]],inputs:{resource:"resource"},outputs:{changed:"changed"},decls:4,vars:7,consts:[[3,"paths","customControls","onObjectLoaded"],[3,"resource"]],template:function(e,n){1&e&&(W(0,"app-obj-viewer",0),Le("onObjectLoaded",function(s){return n.onObjectLoaded(s)}),Ct(1,"async"),j(),Pe(2,"app-compound-block-ui",1),Ct(3,"async")),2&e&&(U("paths",Tt(1,3,n.previewPaths$))("customControls",n.customControls),G(2),U("resource",Tt(3,5,n._resource$)))},dependencies:[ec,h$,pl],changeDetection:0}),i})();const g$=i=>{let t=i.block_class_mro.split("__")[0];return"ArrayBlock"===t?g$(i.child_schema)+"[]":t},Ype=["class","block-ui"];function qpe(i,t){if(1&i&&(W(0,"mat-label",7),ze(1),j()),2&i){const e=he(2);U("matTooltip",e.resourceDescription),G(1),Qi("",null==e.resource?null:e.resource.name," ")}}function Xpe(i,t){if(1&i&&(W(0,"mat-option",8),ze(1),j()),2&i){const e=t.$implicit,n=t.index,r=he(2);U("value",n)("disabled",r.disabled),G(1),Qi(" ",r.blockClassStr(e)," ")}}function Kpe(i,t){if(1&i){const e=ai();$r(0),fe(1,qpe,2,2,"mat-label",1),Ct(2,"async"),W(3,"div",2)(4,"mat-label"),ze(5,"Resource type:"),j(),W(6,"mat-select",3),Le("selectionChange",function(r){return rn(e),Ut(he().setChoiceIndex(r.value))}),fe(7,Xpe,2,3,"mat-option",4),j(),Pe(8,"app-block-actions",5),j(),Pe(9,"app-editor",6),Wr()}if(2&i){const e=he();let n;G(1),U("ngIf",(null==e.resource?null:e.resource.name)&&(null==e.resource?null:e.resource.name)!=(null==(n=Tt(2,8,e.main.resource$))?null:n.name)),G(5),U("value",e.resourceData.choice_index)("disabled",e.disabled),G(1),U("ngForOf",e.resource.schema.possible_resource_schemas),G(1),U("resource",e.childResource),G(1),U("resource",e.childResource)("hideBlockActions",!0)("disabled",e.disabled)}}let _$=(()=>{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 $e,this.blockClassStr=g$}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:sc(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)(E(Pa))},i.\u0275cmp=ot({type:i,selectors:[["app-delegate",8,"block-ui"]],inputs:{resource:"resource",resourceDescription:"resourceDescription",hideBlockActions:"hideBlockActions",disabled:"disabled"},outputs:{changed:"changed"},attrs:Ype,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"],[3,"resource","hideBlockActions","disabled"],["matTooltipPosition","above",3,"matTooltip"],[3,"value","disabled"]],template:function(e,n){1&e&&fe(0,Kpe,10,10,"ng-container",0),2&e&&U("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 Zpe=["class","block-ui"];function Qpe(i,t){if(1&i&&(W(0,"mat-label",7),ze(1),j()),2&i){const e=he(2);U("matTooltip",e.resourceDescription),G(1),Qi(" ",e.resource.name," ")}}function Jpe(i,t){if(1&i){const e=ai();$r(0),fe(1,Qpe,2,2,"mat-label",1),W(2,"mat-selection-list",2),Le("selectionChange",function(r){return rn(e),Ut(he().onSelection(r))}),W(3,"mat-list-option",3),ze(4," Left "),j(),W(5,"mat-list-option",4),ze(6," Right "),j()(),W(7,"mat-form-field",5)(8,"mat-label"),ze(9,"Texture ID"),j(),W(10,"input",6),Le("ngModelChange",function(r){return rn(e),Ut(he().resource.data.texture_id=r)})("change",function(){return rn(e),Ut(he().changed.emit())}),j()(),Wr()}if(2&i){const e=he();G(1),U("ngIf",e.resource.name),G(2),U("selected",e.resource.data.has_left_fence),G(2),U("selected",e.resource.data.has_right_fence),G(5),U("max",63)("min",0)("step",1)("ngModel",e.resource.data.texture_id)}}let eme=(()=>{class i{constructor(){this.resource=null,this.resourceDescription="",this.changed=new $e}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=ot({type:i,selectors:[["app-fence-type",8,"block-ui"]],inputs:{resource:"resource",resourceDescription:"resourceDescription"},outputs:{changed:"changed"},attrs:Zpe,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&&fe(0,Jpe,11,7,"ng-container",0),2&e&&U("ngIf",n.resource)},dependencies:[vi,gl,mu,nc,_u,gu,Zc,vl,Ro,rc,Fs,MC,wC],changeDetection:0}),i})(),tme=(()=>{class i{constructor(){this._resource=null,this.resourceMap={},this.changed=new $e}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]=["",_l.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)(E(nb),E(bte),E(oR))},i.\u0275cmp=ot({type:i,selectors:[["app-run-custom-action",8,"dialog"]],attrs:nme,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&&(W(0,"h1",0),ze(1),j(),W(2,"div",1)(3,"p"),ze(4),j()(),W(5,"form",2),fe(6,ime,4,4,"mat-form-field",3),j(),W(7,"div",4)(8,"button",5),Le("click",function(){return n.dialogRef.close()}),ze(9,"Cancel"),j(),W(10,"button",6),Le("click",function(){return n.submit()}),ze(11,"Run"),j()()),2&e&&(G(1),Qi('Run action "',n.data.title,'"'),G(3),_i(n.data.description),G(1),U("formGroup",n.argsForm),G(1),U("ngForOf",n.data.args),G(4),U("disabled",n.argsForm.invalid))},dependencies:[Eo,IR,gl,nc,bR,vl,Ro,rc,ib,fV,pV,mV,Gh,fC],styles:["form[_ngcontent-%COMP%]{padding:0 24px}"]}),i})();function v$(i,t){return t?e=>Sy(t.pipe(Oi(1),function sme(){return ti((i,t)=>{i.subscribe(Yn(t,ms))})}()),e.pipe(v$(i))):rr((e,n)=>Mr(i(e,n)).pipe(Oi(1),YB(e)))}function y$(i,t=$y){const e=OI(i,t);return v$(()=>e)}const ome=["mat-menu-item",""];function ame(i,t){1&i&&(ki(),W(0,"svg",3),Pe(1,"polygon",4),j())}const lme=[[["mat-icon"],["","matMenuItemIcon",""]],"*"],cme=["mat-icon, [matMenuItemIcon]","*"];function dme(i,t){if(1&i){const e=ai();W(0,"div",0),Le("keydown",function(r){return rn(e),Ut(he()._handleKeydown(r))})("click",function(){return rn(e),Ut(he().closed.emit("click"))})("@transformMenu.start",function(r){return rn(e),Ut(he()._onAnimationStart(r))})("@transformMenu.done",function(r){return rn(e),Ut(he()._onAnimationDone(r))}),W(1,"div",1),Wt(2),j()()}if(2&i){const e=he();U("id",e.panelId)("ngClass",e._classList)("@transformMenu",e._panelAnimationState),Dt("aria-label",e.ariaLabel||null)("aria-labelledby",e.ariaLabelledby||null)("aria-describedby",e.ariaDescribedby||null)}}const ume=["*"],xO=new me("MAT_MENU_PANEL"),hme=YM(jM(class{}));let eE=(()=>{class i extends hme{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 Re,this._focused=new Re,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",Yr("120ms cubic-bezier(0, 0, 0.2, 1)",si({opacity:1,transform:"scale(1)"}))),Or("* => void",Yr("100ms 25ms linear",si({opacity:0})))]),fadeInItems:ka("fadeInItems",[Os("showing",si({opacity:1})),Or("void => *",[si({opacity:0}),Yr("400ms 100ms cubic-bezier(0.55, 0, 0.55, 0.2)")])])};let pme=0;const b$=new me("mat-menu-default-options",{providedIn:"root",factory:function mme(){return{overlapTrigger:!1,xPosition:"after",yPosition:"below",backdropClass:"cdk-overlay-transparent-backdrop"}}});let e0=(()=>{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 om,this._classList={},this._panelAnimationState="void",this._animationDone=new Re,this.overlayPanelClass=this._defaultOptions.overlayPanelClass||"",this.backdropClass=this._defaultOptions.backdropClass,this._overlapTrigger=this._defaultOptions.overlapTrigger,this._hasBackdrop=this._defaultOptions.hasBackdrop,this.closed=new $e,this.close=this.closed,this.panelId="mat-menu-panel-"+pme++}ngOnInit(){this.setPositionClasses()}ngAfterContentInit(){this._updateDirectDescendants(),this._keyManager=new RU(this._directDescendantItems).withWrap().withTypeAhead().withHomeAndEnd(),this._keyManager.tabOut.subscribe(()=>this.closed.emit("tab")),this._directDescendantItems.changes.pipe(Do(this._directDescendantItems),ks(e=>Cr(...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(Do(this._directDescendantItems),ks(n=>Cr(...n.map(r=>r._hovered))))}addItem(e){}removeItem(e){}_handleKeydown(e){const n=e.keyCode,r=this._keyManager;switch(n){case 27:Zo(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(Oi(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(Do(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)(E(gt),E(pt),E(b$),E(Zn))},i.\u0275dir=ve({type:i,contentQueries:function(e,n,r){if(1&e&&(Wi(r,fme,5),Wi(r,eE,5),Wi(r,eE,4)),2&e){let s;Et(s=At())&&(n.lazyContent=s.first),Et(s=At())&&(n._allItems=s),Et(s=At())&&(n.items=s)}},viewQuery:function(e,n){if(1&e&&Wn(Co,5),2&e){let r;Et(r=At())&&(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})(),gme=(()=>{class i extends e0{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)(E(gt),E(pt),E(b$),E(Zn))},i.\u0275cmp=ot({type:i,selectors:[["mat-menu"]],hostVars:3,hostBindings:function(e,n){2&e&&Dt("aria-label",null)("aria-labelledby",null)("aria-describedby",null)},exportAs:["matMenu"],features:[Dn([{provide:xO,useExisting:i}]),lt],ngContentSelectors:ume,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&&(or(),fe(0,dme,3,6,"ng-template"))},dependencies:[hm],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:[tE.transformMenu,tE.fadeInItems]},changeDetection:0}),i})();const x$=new me("mat-menu-scroll-strategy"),vme={provide:x$,deps:[as],useFactory:function _me(i){return()=>i.scrollStrategies.reposition()}},w$=Oh({passive:!0});let yme=(()=>{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,d){this._overlay=e,this._element=n,this._viewContainerRef=r,this._menuItemInstance=a,this._dir=l,this._focusMonitor=c,this._ngZone=d,this._overlayRef=null,this._menuOpen=!1,this._closingActionsSubscription=Zt.EMPTY,this._hoverSubscription=Zt.EMPTY,this._menuCloseSubscription=Zt.EMPTY,this._changeDetectorRef=Ft(Zn),this._handleTouchStart=h=>{qI(h)||(this._openedBy="touch")},this._openedBy=void 0,this.restoreFocus=!0,this.menuOpened=new $e,this.onMenuOpen=this.menuOpened,this.menuClosed=new $e,this.onMenuClose=this.menuClosed,this._scrollStrategy=s,this._parentMaterialMenu=o instanceof e0?o:void 0,n.nativeElement.addEventListener("touchstart",this._handleTouchStart,w$)}ngAfterContentInit(){this._handleHover()}ngOnDestroy(){this._overlayRef&&(this._overlayRef.dispose(),this._overlayRef=null),this._element.nativeElement.removeEventListener("touchstart",this._handleTouchStart,w$),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 e0&&(e._startAnimation(),e._directDescendantItems.changes.pipe(Ve(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 e0?(n._resetAnimation(),n.lazyContent?n._animationDone.pipe(gn(r=>"void"===r.toState),Oi(1),Ve(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],[d,h]=[r,s],p=0;if(this.triggersSubmenu()){if(h=r="before"===e.xPosition?"start":"end",s=d="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:d,overlayY:o,offsetY:p},{originX:s,originY:l,overlayX:h,overlayY:o,offsetY:p},{originX:r,originY:c,overlayX:d,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 Cr(e,this._parentMaterialMenu?this._parentMaterialMenu.closed:ft(),this._parentMaterialMenu?this._parentMaterialMenu._hovered().pipe(gn(o=>o!==this._menuItemInstance),gn(()=>this._menuOpen)):ft(),n)}_handleMousedown(e){YI(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(gn(e=>e===this._menuItemInstance&&!e.disabled),y$(0,PI)).subscribe(()=>{this._openedBy="mouse",this.menu instanceof e0&&this.menu._isAnimating?this.menu._animationDone.pipe(Oi(1),y$(0,PI),Ve(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)(E(as),E(gt),E(jr),E(x$),E(xO,8),E(eE,10),E(Ra,8),E(Xc),E(pt))},i.\u0275dir=ve({type:i,hostVars:3,hostBindings:function(e,n){1&e&&Le("click",function(s){return n._handleClick(s)})("mousedown",function(s){return n._handleMousedown(s)})("keydown",function(s){return n._handleKeydown(s)}),2&e&&Dt("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})(),bme=(()=>{class i extends yme{}return i.\u0275fac=function(){let t;return function(n){return(t||(t=ri(i)))(n||i)}}(),i.\u0275dir=ve({type:i,selectors:[["","mat-menu-trigger-for",""],["","matMenuTriggerFor",""]],hostAttrs:[1,"mat-mdc-menu-trigger"],exportAs:["matMenuTrigger"],features:[lt]}),i})(),xme=(()=>{class i{}return i.\u0275fac=function(e){return new(e||i)},i.\u0275mod=nn({type:i}),i.\u0275inj=Kt({providers:[vme],imports:[Ao,eb,Qn,Pm,Xy,Qn]}),i})();function wme(i,t){if(1&i){const e=ai();W(0,"button",7),Le("click",function(){return rn(e),Ut(he(2).deserialize())}),Pe(1,"mat-icon",8),j()}}function Mme(i,t){if(1&i){const e=ai();$r(0),fe(1,wme,2,0,"button",4),W(2,"button",5),Le("click",function(){return rn(e),Ut(he().serializeBlockReversible())}),Pe(3,"mat-icon",6),j(),Wr()}if(2&i){const e=he();G(1),U("ngIf",e.isInReversibleSerializationState),G(1),U("disabled",e.isInReversibleSerializationState)}}function Cme(i,t){1&i&&(W(0,"button",9),Pe(1,"mat-icon",10),j()),2&i&&(he(),U("matMenuTriggerFor",Zi(3)))}function Sme(i,t){if(1&i){const e=ai();W(0,"button",11),Le("click",function(){const s=rn(e).$implicit;return Ut(he().runCustomAction(s))}),W(1,"span"),ze(2),j()()}if(2&i){const e=t.$implicit;G(2),_i(e.title)}}const Eme=function(){return[]};let nE=(()=>{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 tt(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)(E(Pa),E(Jl),E(Zn),E(Bm),E(IV))},i.\u0275cmp=ot({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&&(fe(0,Mme,4,2,"ng-container",0),fe(1,Cme,2,1,"button",1),W(2,"mat-menu",null,2),fe(4,Sme,3,1,"button",3),j()),2&e&&(U("ngIf",null==n.resource||null==n.resource.schema?null:n.resource.schema.serializable_to_disc),G(1),U("ngIf",(null==n.resource||null==n.resource.schema.custom_actions?null:n.resource.schema.custom_actions.length)>0),G(3),U("ngForOf",(null==n.resource?null:n.resource.schema.custom_actions)||Rs(3,Eme)))},dependencies:[Eo,vi,Fs,XM,gR,gme,eE,bme],styles:["[_nghost-%COMP%]{display:flex}"]}),i})();const Ame=["class","block-ui"];function Dme(i,t){if(1&i&&(W(0,"mat-label",7),ze(1),j()),2&i){const e=he();U("matTooltip",e.resourceDescription),G(1),Qi("",null==e.resource?null:e.resource.name," ")}}function Tme(i,t){if(1&i&&(W(0,"audio",8),Pe(1,"source",9),Ct(2,"async"),ze(3," Your browser does not support the audio element. "),j()),2&i){const e=he();G(1),U("src",Tt(2,1,e.audioUrl$),Lp)}}function Ime(i,t){1&i&&Pe(0,"mat-spinner",10)}function Rme(i,t){1&i&&Pe(0,"app-block-actions",11),2&i&&U("resource",he().resource)}const kme=function(){return["wave_data"]};let Pme=(()=>{class i{constructor(e,n){this.eelDelegate=e,this.main=n,this._resource$=new ut(null),this.audioUrl$=new ut(null),this.resourceDescription="",this.hideBlockActions=!1,this.destroyed$=new Re,this.changed=new $e}set resource(e){this._resource$.next(e)}get resource(){return this._resource$.getValue()}ngAfterViewInit(){var e=this;return tt(function*(){e._resource$.pipe(Ve(e.destroyed$)).subscribe(function(){var n=tt(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)(E(Jl),E(Pa))},i.\u0275cmp=ot({type:i,selectors:[["app-eacs-audio",8,"block-ui"]],inputs:{resource:"resource",resourceDescription:"resourceDescription",hideBlockActions:"hideBlockActions"},outputs:{changed:"changed"},attrs:Ame,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&&(W(0,"div",0),fe(1,Dme,2,2,"mat-label",1),Ct(2,"async"),fe(3,Tme,4,3,"audio",2),Ct(4,"async"),fe(5,Ime,1,0,"mat-spinner",3),Ct(6,"async"),Pe(7,"div",4),fe(8,Rme,1,1,"app-block-actions",5),j(),Pe(9,"app-compound-block-ui",6),Ct(10,"async")),2&e){let r;G(1),U("ngIf",(null==n.resource?null:n.resource.name)&&(null==n.resource?null:n.resource.name)!=(null==(r=Tt(2,7,n.main.resource$))?null:r.name)),G(2),U("ngIf",Tt(4,9,n.audioUrl$)),G(2),U("ngIf",n.resource&&!Tt(6,11,n.audioUrl$)),G(3),U("ngIf",!n.hideBlockActions),G(1),U("resource",Tt(10,13,n._resource$))("hideBlockActions",!0)("fieldBlacklist",Rs(15,kme))}},dependencies:[vi,Ro,Fs,Jb,ec,nE,pl],styles:["#header[_ngcontent-%COMP%]{display:flex}"]}),i})();class Ome{constructor(t,e){this.mesh=t,this.assetsPath=e,this.textures=[],this.tyreTextureUpdateTimer=void 0,this.tyreMaterial=null,this.tyreTextures=[],this._color=65280,this._speed="idle",this._steeringAngle=0,this.wheels=[],this.wheelIdlePositions=[],this.frontWheels=[];let n=new Set;if(t.traverse(r=>{if(!(r instanceof Mn))return;let s=-1;if(r.name.startsWith("part_hp_12")?s=0:r.name.startsWith("part_hp_14")?s=1:r.name.startsWith("part_hp_16")?s=2:r.name.startsWith("part_hp_18")&&(s=3),s>-1){r.geometry.boundingBox||r.geometry.computeBoundingBox();let a=Te.avg(r.geometry.boundingBox.min,r.geometry.boundingBox.max);return(0==s||2==s)&&(a={x:a.x,y:a.y,z:a.z+1.5}),r.geometry.translate(...Te.spr(Te.neg(a))),r.position.set(...Te.spr(a)),this.wheelIdlePositions[s]=a,this.wheels.push(r),void(s<2&&this.frontWheels.push(r))}const o=r.material.map;o&&n.add(o)}),this.textures=Array.from(n).map(r=>{const s=new Oo(document.createElement("img"));return s.flipY=r.flipY,sa(s),[r,s]}),t.traverse(r=>{if(!(r instanceof Mn))return;const s=r.material.map;if(s){const o=this.textures.find(([a,l])=>a===s);o&&(r.material.map=o[1])}}),this.hasWheels){const r=new Pu;this.tyreTextures=[0,1,2,3].map(s=>r.load(`${e}/m${s}00.png`));for(const s of this.tyreTextures)sa(s);this.tyreMaterial=new qi({map:this.tyreTextures[0]}),this.tyreMaterial.transparent=!0,this.tyreMaterial.alphaTest=.5,this.tyreMaterial.map.wrapS=er,this.tyreMaterial.map.wrapT=er,this.tyreMaterial.polygonOffset=!0,this.tyreMaterial.polygonOffsetFactor=-4;for(const s of this.wheels)s.material=this.tyreMaterial}this.color=65280,this.recolorCar().then()}get color(){return this._color}set color(t){t!==this._color&&(this._color=t,this.recolorCar().then())}get speed(){return this._speed}set speed(t){if(t!==this._speed){switch(this._speed=t,this.tyreTextureUpdateTimer&&clearInterval(this.tyreTextureUpdateTimer),t){case"idle":this.tyreMaterial.map=this.tyreTextures[0];break;case"slow":let e=!0;this.tyreTextureUpdateTimer=setInterval(()=>{this.tyreMaterial.map=this.tyreTextures[e?1:2],this.tyreMaterial.needsUpdate=!0,e=!e},16);break;case"fast":this.tyreMaterial.map=this.tyreTextures[3]}this.tyreMaterial.needsUpdate=!0}}get steeringAngle(){return this._steeringAngle}set steeringAngle(t){if(t!==this._steeringAngle){this._steeringAngle=t;for(const e of this.frontWheels)e.rotation.set(0,0,t)}}get hasWheels(){return this.wheels.length>0}recolorCar(){var t=this;return tt(function*(){const[e,n,r]=[t.color>>16,t.color>>8&255,255&t.color];for(const[s,o]of t.textures){for(let a=100;a>0&&!s.source.data;a--)yield p$(50);m$(s.source.data,(a,l)=>{if(a[l]+a[l+2]{class i{constructor(e,n,r){this.eelDelegate=e,this.main=n,this.cdr=r,this._resource$=new ut(null),this.changed=new $e,this.customControls=[],this.previewPaths$=new ut(null),this.destroyed$=new Re,this.serializerSettings={geometry__save_obj:!0,geometry__save_blend:!1,geometry__export_to_gg_web_engine:!1}}get resource(){return this._resource$.getValue()}set resource(e){this._resource$.next(e)}ngAfterViewInit(){var e=this;return tt(function*(){e._resource$.pipe(Ve(e.destroyed$)).subscribe(function(){var n=tt(function*(r){e.previewPaths$.next(yield e.loadPreviewFilePaths(r?.id))});return function(r){return n.apply(this,arguments)}}()),e.main.dataBlockChange$.pipe(Ve(e.destroyed$),gn(([n,r])=>!!e.resource&&n.startsWith(e.resource.id)),ml(1500)).subscribe(tt(function*(){e.previewPaths$.next(null),e.previewPaths$.next(yield e.postTmpUpdates(e.resource?.id))}))})()}onObjectLoaded(e){var n=this;return tt(function*(){try{const r=new Ome(e,n.previewPaths$.value[0].substring(0,n.previewPaths$.value[0].lastIndexOf("/"))+"/assets");let s=null;const o=a=>{s&&clearTimeout(s),s=setTimeout(()=>r.color=a,50)};n.customControls=[{title:"NFS2 car features",controls:[{label:"Car color",type:"color",value:65280,change:a=>o(a)}]}],r.hasWheels&&n.customControls[0].controls.push({label:"Car speed",type:"radio",options:["idle","slow","fast"],value:"idle",change:a=>{r.speed=a}},{label:"Steering angle",type:"slider",minValue:-.7,maxValue:.7,valueStep:.05,value:0,change:a=>{r.steeringAngle=a}}),n.cdr.markForCheck()}catch(r){console.error(r)}})()}postTmpUpdates(e){var n=this;return tt(function*(){if(e){const r=yield n.eelDelegate.serializeResourceTmp(e,Object.entries(n.main.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 tt(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)(E(Jl),E(Pa),E(Zn))},i.\u0275cmp=ot({type:i,selectors:[["app-geo-geometry",8,"block-ui"]],inputs:{resource:"resource"},outputs:{changed:"changed"},attrs:Fme,decls:4,vars:8,consts:[[3,"paths","groupFunction","customControls","onObjectLoaded"],[3,"resource",4,"ngIf"],[3,"resource"]],template:function(e,n){1&e&&(W(0,"app-obj-viewer",0),Le("onObjectLoaded",function(s){return n.onObjectLoaded(s)}),Ct(1,"async"),j(),fe(2,Lme,2,3,"app-compound-block-ui",1),Ct(3,"async")),2&e&&(U("paths",Tt(1,4,n.previewPaths$))("groupFunction",n.previewObjectGroupFunc)("customControls",n.customControls),G(2),U("ngIf",!Tt(3,6,n.main.hideHiddenFields$)))},dependencies:[vi,ec,h$,pl],changeDetection:0}),i})();const Bme=function(){return["children","items_descr"]};let Ume=(()=>{class i{constructor(){this._resource=null,this.hideBlockActions=!1,this.resourceMap={},this.changed=new $e}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:sc(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=ot({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&&Pe(0,"app-compound-block-ui",0)(1,"app-sidenav-res-list",1),2&e&&(U("resource",n.resource)("hideBlockActions",n.hideBlockActions)("fieldBlacklist",Rs(4,Bme)),G(1),U("resources",n.resourceMap))},dependencies:[ec,xC],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})();const Vme=["previewCanvasContainer"],zme=["previewCanvas"];function Hme(i,t){1&i&&Pe(0,"mat-spinner",16),2&i&&U("diameter",40)}function Gme(i,t){1&i&&Pe(0,"mat-spinner",17)}const $me=function(){return[]};var Df=(()=>{return(i=Df||(Df={})).ThreeModel="model",i.Bitmap="bitmap",i.TwoSidedBitmap="two_sided_bitmap",Df;var i})();class Wme extends QH{constructor(t,e,n){super(t,{loadDepth:40,inertia:2}),this.mapGraph=t,this.qfsPath=e,this.hideUnknownEntities$=n,this.textureLoader=new Pu,this.terrainMaterials={},this.objLoader=new Qb,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(Ql(),Ve(this._onRemoved$)).subscribe(e=>{for(const n of this.unknownEntities)n.visible=!e})}getPlaceholderTexture(){var t=this;return tt(function*(){return t._placeholder?t._placeholder:(t._placeholderPromise||(t._placeholderPromise=t.textureLoader.loadAsync("assets/placeholder_texture.png")),t._placeholderPromise)})()}getPlaceholderTerrainTexture(){var t=this;return tt(function*(){return t._placeholderTerrain?t._placeholderTerrain:(t._placeholderTerrainPromise||(t._placeholderTerrainPromise=t.textureLoader.loadAsync("assets/placeholder_texture.png").then(e=>(e.wrapS=Bs,e.wrapT=Bs,sa(e),e))),t._placeholderTerrainPromise)})()}loadChunk(t){var e=this;return tt(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 Mn&&(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:Te.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:Yi.fromAngle(Te.nZ,l.rotation)}));const o=(yield Promise.all(s.map(l=>e.loadPropInternal(l)))).filter(l=>!!l),a=new Jo({object3D:new ra(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 qi({side:Ns,transparent:!0,visible:!1}),this.qfsPath?this.textureLoader.loadAsync(`${this.qfsPath}/${t}.png`).then(e=>{e.wrapS=Bs,e.wrapT=Bs,sa(e),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 tt(function*(){let n=!1;if(t.type==Df.ThreeModel){let r;try{if(!e.qfsPath)throw new Error;const o=new bO,a=new Qb,l=yield o.loadAsync(`${e.qfsPath}/props/${t.data.data.resource_id}/0/material.mtl`);l.preload(),a.setMaterials(l),r=new ra(yield a.loadAsync(`${e.qfsPath}/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 Mn){const a=o.material instanceof Array?o.material:[o.material];for(const l of a)l.transparent=!0,l.alphaTest=.5,l instanceof qi&&l.map&&(l.map.wrapS=Bs,l.map.wrapT=Bs,sa(l.map),l.map.needsUpdate=!0)}});const s=new Jo({object3D: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,d)=>new Array(d).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 No,[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,d]=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 Jo({object3D:new ra(s)});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 tt(function*(){const s=t.split(";"),o=yield r.getPlaceholderTexture();let a=!1,l=[];r.qfsPath?l=yield Promise.all(s.map(h=>r.textureLoader.loadAsync(`${r.qfsPath}/foreground/${h}.png`).catch(()=>(a=!0,o)))):(a=!0,l=s.map(()=>o));const c=l.map(h=>(sa(h),new qi({map:h,alphaTest:.5,transparent:!0,side:Ns}))),d=new Mn(new Iu(e.x,e.y),c[0]);if(d.rotateX(Math.PI/2),d.position.set(0,0,e.y/2),c.length>1){let h=-1;Ym(r.world).pipe(o4(n&&!isNaN(+n)?1e3*+n:250)).subscribe(()=>{h=(h+1)%c.length,d.material=c[h]})}return[d,a]})()}}let jme=(()=>{class i{constructor(e,n,r){this.eelDelegate=e,this.cdr=n,this.mainService=r,this._resource$=new ut(null),this.changed=new $e,this.previewLoading$=new ut(!0),this.previewQfsLocation$=new ut(null),this.previewQfsLoading$=new ut(!1),this.pointer$=new ut(null),this.selectedSplineIndex$=new ut(0),this.qfsPath=null,this.name="",this.renderer=null,this.map=null,this.roadPath=null,this.destroyed$=new Re}get resource(){return this._resource$.getValue()}set resource(e){this._resource$.next(e)}ngAfterViewInit(){var e=this;return tt(function*(){var s;e.world=new sk(new vO,{init:(s=tt(function*(){}),function(){return s.apply(this,arguments)}),simulate:()=>{},loader:{loadFromGgGlb:function(){var s=tt(function*(...o){return[]});return function(){return s.apply(this,arguments)}}()}}),yield e.world.init(),e.skySphere=new Jo({object3D:e.world.visualScene.factory.createPrimitive({shape:"SPHERE",radius:1e3},{color:16777215})}),e.skySphere.object3D.nativeMesh.material.side=Ns,e.world.addEntity(e.skySphere),e.selectionSphere=new Jo({object3D: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 $S(16777215,2));let n=new ut({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=Yi.lookAt(e.renderer.camera.position,Te.add(e.renderer.camera.position,Te.Y),Te.Z),Ym(e.world).pipe(Ve(e.destroyed$)).subscribe(()=>{e.renderer&&(e.skySphere.position=e.renderer.camera.position,e.pointer$.next(e.renderer.camera.position))}),e.controller=new n4(e.world.keyboardInput,e.renderer,{mouseOptions:{canvas:e.previewCanvas.nativeElement,pointerLock:!0},keymap:"wasd+arrows",cameraLinearSpeed:40,cameraBoostMultiplier:4,cameraMovementElasticity:100,cameraRotationElasticity:30,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(Ve(e.destroyed$)).subscribe(function(){var s=tt(function*(o){e.roadPath=e.resource?.data.block_positions.map(a=>({x:a.x,y:a.z,z:a.y})),e.previewLoading$.next(!0),o?(e.previewQfsLocation$.next(o.id.substring(0,o.id.indexOf(".TRK"))+"0.QFS"),yield e.loadTerrainChunks(o.id),yield e.onQfsSelected(e.previewQfsLocation$.value)):(yield e.loadTerrainChunks(),yield e.loadPreview()),e.previewLoading$.next(!1)});return function(o){return s.apply(this,arguments)}}()),e.mainService.dataBlockChange$.pipe(Ve(e.destroyed$),gn(([s,o])=>!!e.resource&&s.startsWith(e.resource.id)),ml(3e3)).subscribe(tt(function*(){e.roadPath=e.resource?.data.block_positions.map(s=>({x:s.x,y:s.z,z:s.y})),e.previewLoading$.next(!0),yield e.postTmpUpdates(e.resource?.id),yield e.loadPreview(),e.previewLoading$.next(!1)})),e.selectedSplineIndex$.pipe(Ve(e.destroyed$),ml(250)).subscribe(s=>{if(e.resource){let o=e.resource.data.block_positions[s];if(!o)return;o={x:o.x,y:o.z,z:o.y},e.selectionSphere.position=o,e.renderer&&(e.renderer.position=Te.add(o,Te.rotAround({x:10,y:-12,z:5},{x:0,y:0,z:1},-0)),e.renderer.rotation=Yi.lookAt(e.renderer.position,o,{x:0,y:0,z:1}),e.controller.reset())}})})()}onQfsSelected(e){var n=this;return tt(function*(){if(n.qfsPath!=e){n.previewQfsLoading$.next(!0);try{const r=yield n.eelDelegate.serializeResource(e),s=new Pu,o=r.find(a=>a.endsWith("spherical.png"));if(o){const a=yield s.loadAsync(o);a.colorSpace="srgb",a.mapping=cc,n.skySphere.object3D.nativeMesh.material.map=a}else n.skySphere.object3D.nativeMesh.material.map=null;n.skySphere.object3D.nativeMesh.material.needsUpdate=!0,n.qfsPath=e}catch{n.skySphere.object3D.nativeMesh.material.map=null,n.skySphere.object3D.nativeMesh.material.needsUpdate=!0,n.qfsPath=null}finally{n.previewQfsLoading$.next(!1)}yield n.loadPreview()}})()}loadTerrainChunks(e){var n=this;return tt(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})()}onPointerChange(e){this.renderer&&(this.renderer.position=e)}loadPreview(){var e=this;return tt(function*(){if(!e.terrainChunksObjLocation||!e.roadPath)return;const n=Km.fromMapArray(e.roadPath.map((r,s)=>({path:`${e.terrainChunksObjLocation}terrain_chunk_${s}`,position:r,loadOptions:{}}))||[],!0);e.unloadPreview(),e.map=new Wme(n,e.qfsPath&&"resources/"+e.qfsPath,e.mainService.hideHiddenFields$),e.map.resource=e.resource,e.map.isOpenedTrack=!1,Ym(e.world).pipe(Ve(e.destroyed$)).subscribe(()=>{e.map&&e.renderer&&e.map.loaderCursor$.next(e.renderer.position)}),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 tt(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)(E(Jl),E(Zn),E(Pa))},i.\u0275cmp=ot({type:i,selectors:[["app-trk-map-block-ui"]],viewQuery:function(e,n){if(1&e&&(Wn(Vme,5),Wn(zme,5)),2&e){let r;Et(r=At())&&(n.previewCanvasContainer=r.first),Et(r=At())&&(n.previewCanvas=r.first)}},inputs:{resource:"resource"},outputs:{changed:"changed"},decls:32,vars:26,consts:[[1,"qfsSelector"],["appearance","fill"],["matInput","","type","text",3,"value"],["customQfsInput",""],["mat-button","",3,"click"],["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","projection","pointerChange"],[3,"resource"],["mode","indeterminate",3,"diameter"],["mode","indeterminate"]],template:function(e,n){if(1&e){const r=ai();W(0,"div",0)(1,"h4"),ze(2,"Preview QFS file"),j(),W(3,"mat-form-field",1)(4,"mat-label"),ze(5,"Custom QFS path"),j(),Pe(6,"input",2,3),Ct(8,"async"),j(),W(9,"button",4),Le("click",function(){rn(r);const o=Zi(7);return Ut(n.onQfsSelected(o.value))}),ze(10,"LOAD"),j(),fe(11,Hme,1,1,"mat-spinner",5),Ct(12,"async"),j(),W(13,"div",6)(14,"div",7,8),Pe(16,"canvas",9,10),fe(18,Gme,1,0,"mat-spinner",11),Ct(19,"async"),j(),W(20,"div",12,8)(22,"mat-form-field",1)(23,"mat-label"),ze(24,"Spline item"),j(),W(25,"input",13),Le("ngModelChange",function(o){return n.selectedSplineIndex$.next(o)}),Ct(26,"async"),Ct(27,"async"),j()(),W(28,"app-minimap",14),Le("pointerChange",function(o){return n.onPointerChange(o)}),Ct(29,"async"),j()()(),Pe(30,"app-compound-block-ui",15),Ct(31,"async")}if(2&e){let r;G(6),U("value",Tt(8,11,n.previewQfsLocation$)),G(5),U("ngIf",Tt(12,13,n.previewQfsLoading$)),G(7),U("ngIf",Tt(19,15,n.previewLoading$)),G(7),U("min",0)("max",4*(null==(r=Tt(26,17,n._resource$))?null:r.data.num_blocks)-1)("ngModel",Tt(27,19,n.selectedSplineIndex$)),G(3),U("roadSpline",n.roadPath||Rs(25,$me))("pointer",Tt(29,21,n.pointer$))("splineClosed",!0)("projection","nz"),G(2),U("resource",Tt(31,23,n._resource$))}},dependencies:[vi,gl,mu,nc,_u,gu,Zc,vl,Ro,rc,ib,Jb,ec,f$,pl],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-minimap[_ngcontent-%COMP%]{flex-grow:1;display:flex}.qfsSelector[_ngcontent-%COMP%]{display:flex;align-items:center;width:100%;column-gap:1rem}.qfsSelector[_ngcontent-%COMP%] h4[_ngcontent-%COMP%]{min-width:-moz-fit-content;min-width:fit-content}.qfsSelector[_ngcontent-%COMP%] mat-form-field[_ngcontent-%COMP%]{flex-grow:1}.qfsSelector[_ngcontent-%COMP%] mat-spinner[_ngcontent-%COMP%], .qfsSelector[_ngcontent-%COMP%] button[_ngcontent-%COMP%]{margin-bottom:1.34375em}"],changeDetection:0}),i})();function Yme(i,t){if(1&i&&(W(0,"mat-error"),ze(1),j()),2&i){const e=he(2);G(1),tm(" ",e.resourceError.data.error_class,": ",e.resourceError.data.error_text," ")}}function qme(i,t){1&i&&Pe(0,"mat-spinner",5)}function Xme(i,t){if(1&i&&(W(0,"div",2),fe(1,Yme,2,2,"mat-error",3),fe(2,qme,1,0,"mat-spinner",4),j()),2&i){const e=he();G(1),U("ngIf",e.resourceError),G(1),U("ngIf",!e.resourceError)}}function Kme(i,t){}let t0=(()=>{class i{constructor(e){this.mainService=e,this._component=null,this._componentChangedSub=null,this.destroyed$=new Re,this.resourceSet$=new Re,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(Ve(this.destroyed$),Ve(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 Zme(i,t){1&i&&Pe(0,"mat-icon",17)}function Qme(i,t){1&i&&Pe(0,"mat-icon",18)}let Jme=(()=>{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 tt(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 tt(function*(){if(e.mainService.hasUnsavedChanges){let n=e.dialog.open(CV,{data:{text:"There are unsaved changes, which will be lost. Are you sure you want to reload file?"}});if(!(yield lR(n.afterClosed())))return}yield e.mainService.reloadResource(),e.cdr.markForCheck()})()}}return i.\u0275fac=function(e){return new(e||i)(E(Jl),E(Pa),E(Bm),E(IV),E(Zn))},i.\u0275cmp=ot({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&&(W(0,"mat-toolbar",0)(1,"span"),ze(2),Ct(3,"async"),Ct(4,"async"),j(),Pe(5,"span",1),W(6,"button",2),Le("click",function(){return n.toggleUnknownsVisibility()}),fe(7,Zme,1,0,"mat-icon",3),Ct(8,"async"),fe(9,Qme,1,0,"mat-icon",4),Ct(10,"async"),j(),Pe(11,"mat-divider",5)(12,"app-block-actions",6),Ct(13,"async"),W(14,"button",7),Le("click",function(){return n.reloadResource()}),Ct(15,"async"),Pe(16,"mat-icon",8),j(),Pe(17,"mat-divider",5),W(18,"button",9),Le("click",function(){return n.saveResource()}),Ct(19,"async"),Ct(20,"async"),Pe(21,"mat-icon",10),j()(),W(22,"div",11),Pe(23,"div",12)(24,"app-editor",13),Ct(25,"async"),Ct(26,"async"),Ct(27,"async"),W(28,"div",14)(29,"a",15),Pe(30,"img",16),j()(),Pe(31,"div",12),j()),2&e){let r;G(2),tm("",(null==(r=Tt(3,9,n.mainService.resource$))?null:r.name)||"...","",Tt(4,11,n.mainService.hasUnsavedChanges$)?"*":"",""),G(5),U("ngIf",Tt(8,13,n.mainService.hideHiddenFields$)),G(2),U("ngIf",!Tt(10,15,n.mainService.hideHiddenFields$)),G(3),U("resource",Tt(13,17,n.mainService.resource$)),G(2),U("disabled",!Tt(15,19,n.mainService.eelDelegate.openedResourcePath$)),G(4),U("disabled",!Tt(19,21,n.mainService.resource$)||!Tt(20,23,n.mainService.hasUnsavedChanges$)),G(6),U("resource",Tt(25,25,n.mainService.customActionRunning$)?null:Tt(26,27,n.mainService.resource$)||Tt(27,29,n.mainService.error$))("hideBlockActions",!0)}},dependencies:[vi,CJ,EJ,Fs,XM,gR,t0,nE,pl],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 M$(i){return new pe(3e3,!1)}function Oge(){return typeof window<"u"&&typeof window.document<"u"}function wO(){return typeof process<"u"&&"[object process]"==={}.toString.call(process)}function Nu(i){switch(i.length){case 0:return new tb;case 1:return i[0];default:return new oV(i)}}function C$(i,t,e,n,r=new Map,s=new Map){const o=[],a=[];let l=-1,c=null;if(n.forEach(d=>{const h=d.get("offset"),p=h==l,m=p&&c||new Map;d.forEach((g,b)=>{let v=b,y=g;if("offset"!==b)switch(v=t.normalizePropertyName(v,o),y){case rR:y=r.get(b);break;case Kc: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 wge(i){return new pe(3502,!1)}();return a}function MO(i,t,e,n){switch(t){case"start":i.onStart(()=>n(e&&CO(e,"start",i)));break;case"done":i.onDone(()=>n(e&&CO(e,"done",i)));break;case"destroy":i.onDestroy(()=>n(e&&CO(e,"destroy",i)))}}function CO(i,t,e){const s=SO(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 SO(i,t,e,n,r="",s=0,o){return{element:i,triggerName:t,fromState:e,toState:n,phaseName:r,totalTime:s,disabled:!!o}}function oa(i,t,e){let n=i.get(t);return n||i.set(t,n=e),n}function S$(i){const t=i.indexOf(":");return[i.substring(1,t),i.slice(t+1)]}let EO=(i,t)=>!1,E$=(i,t,e)=>[],A$=null;function AO(i){const t=i.parentNode||i.host;return t===A$?null:t}(wO()||typeof Element<"u")&&(Oge()?(A$=(()=>document.documentElement)(),EO=(i,t)=>{for(;t;){if(t===i)return!0;t=AO(t)}return!1}):EO=(i,t)=>i.contains(t),E$=(i,t,e)=>{if(e)return Array.from(i.querySelectorAll(t));const n=i.querySelector(t);return n?[n]:[]});let Tf=null,D$=!1;const T$=EO,I$=E$;let R$=(()=>{class i{validateStyleProperty(e){return function Lge(i){Tf||(Tf=function Nge(){return typeof document<"u"?document.body:null}()||{},D$=!!Tf.style&&"WebkitAppearance"in Tf.style);let t=!0;return Tf.style&&!function Fge(i){return"ebkit"==i.substring(1,6)}(i)&&(t=i in Tf.style,!t&&D$&&(t="Webkit"+i.charAt(0).toUpperCase()+i.slice(1)in Tf.style)),t}(e)}matchesElement(e,n){return!1}containsElement(e,n){return T$(e,n)}getParentElement(e){return AO(e)}query(e,n,r){return I$(e,n,r)}computeStyle(e,n,r){return r||""}animate(e,n,r,s,o,a=[],l){return new tb(r,s)}}return i.\u0275fac=function(e){return new(e||i)},i.\u0275prov=ke({token:i,factory:i.\u0275fac}),i})(),DO=(()=>{class i{}return i.NOOP=new R$,i})();const Bge=1e3,TO="ng-enter",iE="ng-leave",rE="ng-trigger",sE=".ng-trigger",P$="ng-animating",IO=".ng-animating";function fd(i){if("number"==typeof i)return i;const t=i.match(/^(-?[\.\d]+)(m?s)/);return!t||t.length<2?0:RO(parseFloat(t[1]),t[2])}function RO(i,t){return"s"===t?i*Bge:i}function oE(i,t,e){return i.hasOwnProperty("duration")?i:function Vge(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(M$()),{duration:0,delay:0,easing:""};r=RO(parseFloat(a[1]),a[2]);const l=a[3];null!=l&&(s=RO(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 ege(){return new pe(3100,!1)}()),a=!0),s<0&&(t.push(function tge(){return new pe(3101,!1)}()),a=!0),a&&t.splice(l,0,M$())}return{duration:r,delay:s,easing:o}}(i,t,e)}function n0(i,t={}){return Object.keys(i).forEach(e=>{t[e]=i[e]}),t}function O$(i){const t=new Map;return Object.keys(i).forEach(e=>{t.set(e,i[e])}),t}function Bu(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 L$(i,t,e){return e?t+":"+e+";":""}function N$(i){let t="";for(let e=0;e{const s=PO(r);e&&!e.has(r)&&e.set(r,i.style[s]),i.style[s]=n}),wO()&&N$(i))}function If(i,t){i.style&&(t.forEach((e,n)=>{const r=PO(n);i.style[r]=""}),wO()&&N$(i))}function r0(i){return Array.isArray(i)?1==i.length?i[0]:iV(i):i}const kO=new RegExp("{{\\s*(.+?)\\s*}}","g");function B$(i){let t=[];if("string"==typeof i){let e;for(;e=kO.exec(i);)t.push(e[1]);kO.lastIndex=0}return t}function s0(i,t,e){const n=i.toString(),r=n.replace(kO,(s,o)=>{let a=t[o];return null==a&&(e.push(function ige(i){return new pe(3003,!1)}()),a=""),a.toString()});return r==n?i:r}function aE(i){const t=[];let e=i.next();for(;!e.done;)t.push(e.value),e=i.next();return t}const Gge=/-+([a-z0-9])/g;function PO(i){return i.replace(Gge,(...t)=>t[1].toUpperCase())}function $ge(i){return i.replace(/([a-z])([A-Z])/g,"$1-$2").toLowerCase()}function aa(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 rge(i){return new pe(3004,!1)}()}}function U$(i,t){return window.getComputedStyle(i)[t]}const dE="*";function Kge(i,t){const e=[];return"string"==typeof i?i.split(/\s*,\s*/).forEach(n=>function Zge(i,t,e){if(":"==i[0]){const l=function Qge(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 _ge(i){return new pe(3015,!1)}()),t;const r=n[1],s=n[2],o=n[3];t.push(V$(r,o));"<"==s[0]&&!(r==dE&&o==dE)&&t.push(V$(o,r))}(n,e,t)):e.push(i),e}const uE=new Set(["true","1"]),hE=new Set(["false","0"]);function V$(i,t){const e=uE.has(i)||hE.has(i),n=uE.has(t)||hE.has(t);return(r,s)=>{let o=i==dE||i==r,a=t==dE||t==s;return!o&&e&&"boolean"==typeof r&&(o=r?uE.has(i):hE.has(i)),!a&&n&&"boolean"==typeof s&&(a=s?uE.has(t):hE.has(t)),o&&a}}const Jge=new RegExp("s*:selfs*,?","g");function OO(i,t,e,n){return new e_e(i).build(t,e,n)}class e_e{constructor(t){this._driver=t}build(t,e,n){const r=new i_e(e);return this._resetContextStyleTimingState(r),aa(this,r0(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 oge(){return new pe(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(d=>{l.name=d,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 age(){return new pe(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=>{B$(l).forEach(c=>{o.hasOwnProperty(c)||s.add(c)})})}),s.size&&(aE(s.values()),e.errors.push(function lge(i,t){return new pe(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=aa(this,r0(t.animation),e);return{type:1,matchers:Kge(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=>aa(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=aa(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 s_e(i,t){if(i.hasOwnProperty("duration"))return i;if("number"==typeof i)return FO(oE(i,t).duration,0,"");const e=i;if(e.split(/\s+/).some(s=>"{"==s.charAt(0)&&"{"==s.charAt(1))){const s=FO(0,0,"");return s.dynamic=!0,s.strValue=e,s}const r=oE(e,t);return FO(r.duration,r.delay,r.easing)}(t.timings,e.errors);e.currentAnimateTimings=n;let r,s=t.styles?t.styles:si({});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=si(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===Kc?n.push(a):e.errors.push(new pe(3002,!1)):n.push(O$(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),d=c.get(l);let h=!0;d&&(s!=r&&s>=d.startTime&&r<=d.endTime&&(e.errors.push(function dge(i,t,e,n,r){return new pe(3010,!1)}()),h=!1),s=d.startTime),h&&c.set(l,{startTime:s,endTime:r}),e.options&&function Hge(i,t,e){const n=t.params||{},r=B$(i);r.length&&r.forEach(s=>{n.hasOwnProperty(s)||e.push(function nge(i){return new pe(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 uge(){return new pe(3011,!1)}()),n;let s=0;const o=[];let a=!1,l=!1,c=0;const d=t.steps.map(y=>{const M=this._makeStyleAst(y,e);let x=null!=M.offset?M.offset:function r_e(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:aa(this,r0(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 t_e(i){const t=!!i.split(/\s*,\s*/).find(e=>":self"==e);return t&&(i=i.replace(Jge,"")),i=i.replace(/@\*/g,sE).replace(/@\w+/g,e=>sE+"-"+e.slice(1)).replace(/:animating/g,IO),[i,t]}(t.selector);e.currentQuerySelector=n.length?n+" "+s:s,oa(e.collectedStyles,e.currentQuerySelector,new Map);const a=aa(this,r0(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 mge(){return new pe(3013,!1)}());const n="full"===t.timings?{duration:0,delay:0,easing:"full"}:oE(t.timings,e.errors,!0);return{type:12,animation:aa(this,r0(t.animation),e),timings:n,options:null}}}class i_e{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=n0(i)).params&&(i.params=function n_e(i){return i?n0(i):null}(i.params)):i={},i}function FO(i,t,e){return{duration:i,delay:t,easing:e}}function LO(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 fE{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 l_e=new RegExp(":enter","g"),d_e=new RegExp(":leave","g");function NO(i,t,e,n,r,s=new Map,o=new Map,a,l,c=[]){return(new u_e).buildKeyframes(i,t,e,n,r,s,o,a,l,c)}class u_e{buildKeyframes(t,e,n,r,s,o,a,l,c,d=[]){c=c||new fE;const h=new BO(t,e,c,r,s,d,[]);h.options=l;const p=l.delay?fd(l.delay):0;h.currentTimeline.delayNextStep(p),h.currentTimeline.setStyles([o],null,h.errors,l),aa(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()):[LO(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:fd(s0(s,r?.params??{},e.errors));n.delayNextStep(o)}}}_visitSubInstructions(t,e,n){let s=e.currentTimeline.currentTime;const o=null!=n.duration?fd(n.duration):null,a=null!=n.delay?fd(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),aa(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=pE);const o=fd(s.delay);r.delayNextStep(o)}t.steps.length&&(t.steps.forEach(o=>aa(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?fd(t.options.delay):0;t.steps.forEach(o=>{const a=e.createSubContext(t.options);s&&a.delayNextStep(s),aa(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 oE(e.params?s0(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?fd(r.delay):0;s&&(6===e.previousNode.type||0==n&&e.currentTimeline.hasCurrentStyleProperties())&&(e.currentTimeline.snapshotCurrentStyles(),e.previousNode=pE);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,d)=>{e.currentQueryIndex=d;const h=e.createSubContext(t.options,c);s&&h.delayNextStep(s),c===e.element&&(l=h.currentTimeline),aa(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 d=e.currentTimeline;l&&d.delayNextStep(l);const h=d.currentTime;aa(this,t.animation,e),e.previousNode=t,n.currentStaggerTime=r.currentTime-h+(r.startTime-n.currentTimeline.startTime)}}const pE={};class BO{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=pE,this.subContextCount=0,this.options={},this.currentQueryIndex=0,this.currentQueryTotal=0,this.currentStaggerTime=0,this.currentTimeline=l||new mE(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=fd(n.duration)),null!=n.delay&&(r.delay=fd(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]=s0(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 BO(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=pE,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 h_e(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(l_e,"."+this._enterClassName)).replace(d_e,"."+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 gge(i){return new pe(3014,!1)}()),a}}class mE{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 mE(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||Kc),this._currentKeyframe.set(e,Kc);this._currentEmptyStepKeyframe=this._currentKeyframe}setStyles(t,e,n,r){e&&this._previousKeyframe.set("easing",e);const s=r&&r.params||{},o=function f_e(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,Kc)}else Bu(r,e)}),e}(t,this._globalTimelineStyles);for(let[a,l]of o){const c=s0(l,s,n);this._pendingStyles.set(a,c),this._localTimelineStyles.has(a)||this._backFill.set(a,this._globalTimelineStyles.get(a)??Kc),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=Bu(a,new Map,this._backFill);c.forEach((d,h)=>{d===rR?t.add(h):d===Kc&&e.add(h)}),n||c.set("offset",l/this.duration),r.push(c)});const s=t.size?aE(t.values()):[],o=e.size?aE(e.values()):[];if(n){const a=r[0],l=new Map(a);a.set("offset",0),l.set("offset",1),r=[a,l]}return LO(this.element,r,s,o,this.duration,this.startTime,this.easing,!1)}}class h_e extends mE{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=Bu(t[0]);l.set("offset",0),s.push(l);const c=Bu(t[0]);c.set("offset",G$(a)),s.push(c);const d=t.length-1;for(let h=1;h<=d;h++){let p=Bu(t[h]);const m=p.get("offset");p.set("offset",G$((e+m*n)/o)),s.push(p)}n=o,e=0,r="",t=s}return LO(this.element,t,this.preStyleProps,this.postStyleProps,n,e,r,!0)}}function G$(i,t=3){const e=Math.pow(10,t-1);return Math.round(i*e)/e}class UO{}const p_e=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 m_e extends UO{normalizePropertyName(t,e){return PO(t)}normalizeStyleValue(t,e,n,r){let s="";const o=n.toString().trim();if(p_e.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 sge(i,t){return new pe(3005,!1)}())}return o+s}}function $$(i,t,e,n,r,s,o,a,l,c,d,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:d,totalTime:h,errors:p}}const VO={};class W${constructor(t,e,n){this._triggerName=t,this.ast=e,this._stateStyles=n}match(t,e,n,r){return function g_e(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,d){const h=[],p=this.ast.options&&this.ast.options.params||VO,g=this.buildStyles(n,a&&a.params||VO,h),b=l&&l.params||VO,v=this.buildStyles(r,b,h),y=new Set,M=new Map,x=new Map,C="void"===r,F={params:__e(b,p),delay:this.ast.options?.delay},D=d?[]:NO(t,e,this.ast.animation,s,o,g,v,F,c,h);let k=0;if(D.forEach(T=>{k=Math.max(T.duration+T.delay,k)}),h.length)return $$(e,this._triggerName,n,r,C,g,v,[],[],M,x,k,h);D.forEach(T=>{const A=T.element,$=oa(M,A,new Set);T.preStyleProps.forEach(ne=>$.add(ne));const ie=oa(x,A,new Set);T.postStyleProps.forEach(ne=>ie.add(ne)),A!==e&&y.add(A)});const B=aE(y.values());return $$(e,this._triggerName,n,r,C,g,v,D,B,M,x,k)}}function __e(i,t){const e=n0(t);for(const n in i)i.hasOwnProperty(n)&&null!=i[n]&&(e[n]=i[n]);return e}class v_e{constructor(t,e,n){this.styles=t,this.defaultParams=e,this.normalizer=n}buildStyles(t,e){const n=new Map,r=n0(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=s0(o,r,e));const l=this.normalizer.normalizePropertyName(a,e);o=this.normalizer.normalizeStyleValue(a,l,o,e),n.set(a,o)})}),n}}class b_e{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 v_e(r.style,r.options&&r.options.params||{},n))}),j$(this.states,"true","1"),j$(this.states,"false","0"),e.transitions.forEach(r=>{this.transitionFactories.push(new W$(t,r,this.states))}),this.fallbackTransition=function x_e(i,t,e){return new W$(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 j$(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 w_e=new fE;class M_e{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=OO(this._driver,e,n,r);if(n.length)throw function Mge(i){return new pe(3503,!1)}();this._animations.set(t,s)}_buildPlayer(t,e,n){const r=t.element,s=C$(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=NO(this._driver,e,s,TO,iE,new Map,new Map,n,w_e,r),o.forEach(d=>{const h=oa(a,d.element,new Map);d.postStyleProps.forEach(p=>h.set(p,null))})):(r.push(function Cge(){return new pe(3300,!1)}()),o=[]),r.length)throw function Sge(i){return new pe(3504,!1)}();a.forEach((d,h)=>{d.forEach((p,m)=>{d.set(m,this._driver.computeStyle(h,m,Kc))})});const c=Nu(o.map(d=>{const h=a.get(d.element);return this._buildPlayer(d,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 Ege(i){return new pe(3301,!1)}();return e}listen(t,e,n,r){const s=SO(e,"","","");return MO(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 Y$="ng-animate-queued",zO="ng-animate-disabled",D_e=[],q$={namespaceId:"",setForRemoval:!1,setForMove:!1,hasAnimation:!1,removedBeforeQueried:!1},T_e={namespaceId:"",setForMove:!1,setForRemoval:!1,hasAnimation:!1,removedBeforeQueried:!0},Ua="__ng_removed";class HO{get params(){return this.options.params}constructor(t,e=""){this.namespaceId=e;const n=t&&t.hasOwnProperty("value");if(this.value=function P_e(i){return i??null}(n?t.value:t),n){const s=n0(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 o0="void",GO=new HO(o0);class I_e{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,Va(e,this._hostClassName)}listen(t,e,n,r){if(!this._triggers.has(e))throw function Age(i,t){return new pe(3302,!1)}();if(null==n||0==n.length)throw function Dge(i){return new pe(3303,!1)}();if(!function O_e(i){return"start"==i||"done"==i}(n))throw function Tge(i,t){return new pe(3400,!1)}();const s=oa(this._elementListeners,t,[]),o={name:e,phase:n,callback:r};s.push(o);const a=oa(this._engine.statesByElement,t,new Map);return a.has(e)||(Va(t,rE),Va(t,rE+"-"+e),a.set(e,GO)),()=>{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 Ige(i){return new pe(3401,!1)}();return e}trigger(t,e,n,r=!0){const s=this._getTrigger(e),o=new $O(this.id,e,t);let a=this._engine.statesByElement.get(t);a||(Va(t,rE),Va(t,rE+"-"+e),this._engine.statesByElement.set(t,a=new Map));let l=a.get(e);const c=new HO(n,this.id);if(!(n&&n.hasOwnProperty("value"))&&l&&c.absorbOptions(l.options),a.set(e,c),l||(l=GO),c.value!==o0&&l.value===c.value){if(!function N_e(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),fc(t,y)})}return}const p=oa(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||(Va(t,Y$),o.onStart(()=>{Yg(t,Y$)})),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,sE,!0);n.forEach(r=>{if(r[Ua])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 d=this.trigger(t,c,o0,r);d&&a.push(d)}}),a.length)return this._engine.markElementAsRemoved(this.id,t,!0,e,o),n&&Nu(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)||GO,d=new HO(o0),h=new $O(this.id,o,t);this._engine.totalQueuedPlayers++,this._queue.push({element:t,triggerName:o,transition:l,fromState:c,toState:d,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[Ua];(!s||s===q$)&&(n.afterFlush(()=>this.clearElementCache(t)),n.destroyInnerAnimations(t),n._onRemovalComplete(t,e))}}insertNode(t,e){Va(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=SO(s,n.triggerName,n.fromState.value,n.toState.value);l._data=t,MO(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 R_e{_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 I_e(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(gE(e)){const s=this._fetchNamespace(t);if(s)return s.trigger(e,n,r),!0}return!1}insertNode(t,e,n,r){if(!gE(e))return;const s=e[Ua];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),Va(t,zO)):this.disabledNodes.has(t)&&(this.disabledNodes.delete(t),Yg(t,zO))}removeNode(t,e,n,r){if(gE(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[Ua]={namespaceId:t,setForRemoval:r,hasAnimation:n,removedBeforeQueried:!1,previousTriggersValues:s}}listen(t,e,n,r,s){return gE(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,sE,!0);e.forEach(n=>this.destroyActiveAnimationsForElement(n)),0!=this.playersByQueriedElement.size&&(e=this.driver.query(t,IO,!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 Nu(this.players).onDone(()=>t());t()})}processLeaveNode(t){const e=t[Ua];if(e&&e.setForRemoval){if(t[Ua]=q$,e.namespaceId){this.destroyInnerAnimations(t);const n=this._fetchNamespace(e.namespaceId);n&&n.clearElementCache(t)}this._onRemovalComplete(t,e.setForRemoval)}t.classList?.contains(zO)&&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?Nu(e).onDone(()=>{n.forEach(r=>r())}):n.forEach(r=>r())}}reportError(t){throw function Rge(i){return new pe(3402,!1)}()}_flushAnimations(t,e){const n=new fE,r=[],s=new Map,o=[],a=new Map,l=new Map,c=new Map,d=new Set;this.disabledNodes.forEach(q=>{d.add(q);const re=this.driver.query(q,".ng-animate-queued",!0);for(let J=0;J{const J=TO+b++;g.set(re,J),q.forEach(we=>Va(we,J))});const v=[],y=new Set,M=new Set;for(let q=0;qy.add(we)):M.add(re))}const x=new Map,C=Z$(p,Array.from(y));C.forEach((q,re)=>{const J=iE+b++;x.set(re,J),q.forEach(we=>Va(we,J))}),t.push(()=>{m.forEach((q,re)=>{const J=g.get(re);q.forEach(we=>Yg(we,J))}),C.forEach((q,re)=>{const J=x.get(re);q.forEach(we=>Yg(we,J))}),v.forEach(q=>{this.processLeaveNode(q)})});const F=[],D=[];for(let q=this._namespaceList.length-1;q>=0;q--)this._namespaceList[q].drainQueuedTransitions(e).forEach(J=>{const we=J.player,Be=J.element;if(F.push(we),this.collectedEnterElements.length){const Fe=Be[Ua];if(Fe&&Fe.setForMove){if(Fe.previousTriggersValues&&Fe.previousTriggersValues.has(J.triggerName)){const bt=Fe.previousTriggersValues.get(J.triggerName),St=this.statesByElement.get(J.element);if(St&&St.has(J.triggerName)){const Mt=St.get(J.triggerName);Mt.value=bt,St.set(J.triggerName,Mt)}}return void we.destroy()}}const Ye=!h||!this.driver.containsElement(h,Be),It=x.get(Be),en=g.get(Be),ae=this._buildInstruction(J,n,en,It,Ye);if(ae.errors&&ae.errors.length)return void D.push(ae);if(Ye)return we.onStart(()=>If(Be,ae.fromStyles)),we.onDestroy(()=>fc(Be,ae.toStyles)),void r.push(we);if(J.isFallbackTransition)return we.onStart(()=>If(Be,ae.fromStyles)),we.onDestroy(()=>fc(Be,ae.toStyles)),void r.push(we);const Oe=[];ae.timelines.forEach(Fe=>{Fe.stretchStartingKeyframe=!0,this.disabledNodes.has(Fe.element)||Oe.push(Fe)}),ae.timelines=Oe,n.append(Be,ae.timelines),o.push({instruction:ae,player:we,element:Be}),ae.queriedElements.forEach(Fe=>oa(a,Fe,[]).push(we)),ae.preStyleProps.forEach((Fe,bt)=>{if(Fe.size){let St=l.get(bt);St||l.set(bt,St=new Set),Fe.forEach((Mt,Sn)=>St.add(Sn))}}),ae.postStyleProps.forEach((Fe,bt)=>{let St=c.get(bt);St||c.set(bt,St=new Set),Fe.forEach((Mt,Sn)=>St.add(Sn))})});if(D.length){const q=[];D.forEach(re=>{q.push(function kge(i,t){return new pe(3505,!1)}())}),F.forEach(re=>re.destroy()),this.reportError(q)}const k=new Map,B=new Map;o.forEach(q=>{const re=q.element;n.has(re)&&(B.set(re,re),this._beforeAnimationBuild(q.player.namespaceId,q.instruction,k))}),r.forEach(q=>{const re=q.element;this._getPreviousPlayers(re,!1,q.namespaceId,q.triggerName,null).forEach(we=>{oa(k,re,[]).push(we),we.destroy()})});const T=v.filter(q=>J$(q,l,c)),A=new Map;K$(A,this.driver,M,c,Kc).forEach(q=>{J$(q,l,c)&&T.push(q)});const ie=new Map;m.forEach((q,re)=>{K$(ie,this.driver,new Set(q),l,rR)}),T.forEach(q=>{const re=A.get(q),J=ie.get(q);A.set(q,new Map([...Array.from(re?.entries()??[]),...Array.from(J?.entries()??[])]))});const ne=[],se=[],ge={};o.forEach(q=>{const{element:re,player:J,instruction:we}=q;if(n.has(re)){if(d.has(re))return J.onDestroy(()=>fc(re,we.toStyles)),J.disabled=!0,J.overrideTotalTime(we.totalTime),void r.push(J);let Be=ge;if(B.size>1){let It=re;const en=[];for(;It=It.parentNode;){const ae=B.get(It);if(ae){Be=ae;break}en.push(It)}en.forEach(ae=>B.set(ae,Be))}const Ye=this._buildAnimation(J.namespaceId,we,k,s,ie,A);if(J.setRealPlayer(Ye),Be===ge)ne.push(J);else{const It=this.playersByElement.get(Be);It&&It.length&&(J.parentPlayer=Nu(It)),r.push(J)}}else If(re,we.fromStyles),J.onDestroy(()=>fc(re,we.toStyles)),se.push(J),d.has(re)&&r.push(J)}),se.forEach(q=>{const re=s.get(q.element);if(re&&re.length){const J=Nu(re);q.setRealPlayer(J)}}),r.forEach(q=>{q.parentPlayer?q.syncPlayerEvents(q.parentPlayer):q.destroy()});for(let q=0;q!Ye.destroyed);Be.length?F_e(this,re,Be):this.processLeaveNode(re)}return v.length=0,ne.forEach(q=>{this.players.push(q),q.onDone(()=>{q.destroy();const re=this.players.indexOf(q);this.players.splice(re,1)}),q.play()}),ne}elementContainsData(t,e){let n=!1;const r=e[Ua];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==o0;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,d=c!==s,h=oa(n,c,[]);this._getPreviousPlayers(c,d,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=[],d=new Set,h=new Set,p=e.timelines.map(g=>{const b=g.element;d.add(b);const v=b[Ua];if(v&&v.removedBeforeQueried)return new tb(g.duration,g.delay);const y=b!==l,M=function L_e(i){const t=[];return Q$(i,t),t}((n.get(b)||D_e).map(k=>k.getRealPlayer())).filter(k=>!!k.element&&k.element===b),x=s.get(b),C=o.get(b),F=C$(0,this._normalizer,0,g.keyframes,x,C),D=this._buildPlayer(g,F,M);if(g.subTimeline&&r&&h.add(b),y){const k=new $O(t,a,b);k.setRealPlayer(D),c.push(k)}return D});c.forEach(g=>{oa(this.playersByQueriedElement,g.element,[]).push(g),g.onDone(()=>function k_e(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))}),d.forEach(g=>Va(g,P$));const m=Nu(p);return m.onDestroy(()=>{d.forEach(g=>Yg(g,P$)),fc(l,e.toStyles)}),h.forEach(g=>{oa(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 tb(t.duration,t.delay)}}class $O{constructor(t,e,n){this.namespaceId=t,this.triggerName=e,this.element=n,this._player=new tb,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=>MO(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){oa(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 gE(i){return i&&1===i.nodeType}function X$(i,t){const e=i.style.display;return i.style.display=t??"none",e}function K$(i,t,e,n,r){const s=[];e.forEach(l=>s.push(X$(l)));const o=[];n.forEach((l,c)=>{const d=new Map;l.forEach(h=>{const p=t.computeStyle(c,h,r);d.set(h,p),(!p||0==p.length)&&(c[Ua]=T_e,o.push(c))}),i.set(c,d)});let a=0;return e.forEach(l=>X$(l,s[a++])),o}function Z$(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 Va(i,t){i.classList?.add(t)}function Yg(i,t){i.classList?.remove(t)}function F_e(i,t,e){Nu(e).onDone(()=>i.processLeaveNode(t))}function Q$(i,t){for(let e=0;er.add(s)):t.set(i,n),e.delete(i),!0}class _E{constructor(t,e,n){this.bodyNode=t,this._driver=e,this._normalizer=n,this._triggerCache={},this.onRemovalComplete=(r,s)=>{},this._transitionEngine=new R_e(t,e,n),this._timelineEngine=new M_e(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=[],d=OO(this._driver,s,l,c);if(l.length)throw function xge(i,t){return new pe(3404,!1)}();a=function y_e(i,t,e){return new b_e(i,t,e)}(r,d,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]=S$(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]=S$(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 U_e=(()=>{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&&fc(this._element,this._startStyles,this._initialStyles),this._state=1)}finish(){this.start(),this._state<2&&(fc(this._element,this._initialStyles),this._endStyles&&(fc(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),fc(this._element,this._initialStyles),this._state=3)}}return i.initialStylesByElement=new WeakMap,i})();function WO(i){let t=null;return i.forEach((e,n)=>{(function V_e(i){return"display"===i||"position"===i})(n)&&(t=t||new Map,t.set(n,e))}),t}class e8{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:U$(this.element,r))}),this.currentSnapshot=t}triggerCallback(t){const e="start"===t?this._onStartFns:this._onDoneFns;e.forEach(n=>n()),e.length=0}}class z_e{validateStyleProperty(t){return!0}validateAnimatableStyleProperty(t){return!0}matchesElement(t,e){return!1}containsElement(t,e){return T$(t,e)}getParentElement(t){return AO(t)}query(t,e,n){return I$(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,d=o.filter(m=>m instanceof e8);(function Wge(i,t){return 0===i||0===t})(n,r)&&d.forEach(m=>{m.currentSnapshot.forEach((g,b)=>c.set(b,g))});let h=function zge(i){return i.length?i[0]instanceof Map?i:i.map(t=>O$(t)):[]}(e).map(m=>Bu(m));h=function jge(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,U$(i,a)))}}return t}(t,h,c);const p=function B_e(i,t){let e=null,n=null;return Array.isArray(t)&&t.length?(e=WO(t[0]),t.length>1&&(n=WO(t[t.length-1]))):t instanceof Map&&(e=WO(t)),e||n?new U_e(i,e,n):null}(t,h);return new e8(t,h,l,p)}}let H_e=(()=>{class i extends tV{constructor(e,n){super(),this._nextAnimationId=0,this._renderer=e.createRenderer(n.body,{id:"0",encapsulation:Ks.None,styles:[],data:{animation:[]}})}build(e){const n=this._nextAnimationId.toString();this._nextAnimationId++;const r=Array.isArray(e)?iV(e):e;return t8(this._renderer,null,n,"register",[r]),new G_e(n,this._renderer)}}return i.\u0275fac=function(e){return new(e||i)(ee(Gl),ee(jt))},i.\u0275prov=ke({token:i,factory:i.\u0275fac}),i})();class G_e extends LQ{constructor(t,e){super(),this._id=t,this._renderer=e}create(t,e){return new $_e(this._id,t,e||{},this._renderer)}}class $_e{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 t8(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 t8(i,t,e,n,r){return i.setProperty(t,`@@${e}:${n}`,r)}const n8="@.disabled";let W_e=(()=>{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 d=this._rendererCache.get(s);return d||(d=new i8("",s,this.engine,()=>this._rendererCache.delete(s)),this._rendererCache.set(s,d)),d}const o=n.id,a=n.id+"-"+this._currentId;this._currentId++,this.engine.register(a,e);const l=d=>{Array.isArray(d)?d.forEach(l):this.engine.registerTrigger(o,a,e,d.name,d)};return n.data.animation.forEach(l),new j_e(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)(ee(Gl),ee(_E),ee(pt))},i.\u0275prov=ke({token:i,factory:i.\u0275fac}),i})();class i8{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==n8?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 j_e extends i8{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==n8?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 Y_e(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 q_e(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 r8=[{provide:tV,useClass:H_e},{provide:UO,useFactory:function K_e(){return new m_e}},{provide:_E,useClass:(()=>{class i extends _E{constructor(e,n,r,s){super(e.body,n,r)}ngOnDestroy(){this.flush()}}return i.\u0275fac=function(e){return new(e||i)(ee(jt),ee(DO),ee(UO),ee(dm))},i.\u0275prov=ke({token:i,factory:i.\u0275fac}),i})()},{provide:Gl,useFactory:function Z_e(i,t,e){return new W_e(i,t,e)},deps:[aM,_E,pt]}],jO=[{provide:DO,useFactory:()=>new z_e},{provide:kr,useValue:"BrowserAnimations"},...r8],s8=[{provide:DO,useClass:R$},{provide:kr,useValue:"NoopAnimations"},...r8];let Q_e=(()=>{class i{static withConfig(e){return{ngModule:i,providers:e.disableAnimations?s8:jO}}}return i.\u0275fac=function(e){return new(e||i)},i.\u0275mod=nn({type:i}),i.\u0275inj=Kt({providers:jO,imports:[FB]}),i})();const o8=new me("CdkAccordion");let J_e=0,eve=(()=>{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=Zt.EMPTY,this.closed=new $e,this.opened=new $e,this.destroyed=new $e,this.expandedChange=new $e,this.id="cdk-accordion-child-"+J_e++,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)(E(o8,12),E(Zn),E(GR))},i.\u0275dir=ve({type:i,selectors:[["cdk-accordion-item"],["","cdkAccordionItem",""]],inputs:{expanded:"expanded",disabled:"disabled"},outputs:{closed:"closed",opened:"opened",destroyed:"destroyed",expandedChange:"expandedChange"},exportAs:["cdkAccordionItem"],features:[Dn([{provide:o8,useValue:void 0}])]}),i})(),tve=(()=>{class i{}return i.\u0275fac=function(e){return new(e||i)},i.\u0275mod=nn({type:i}),i.\u0275inj=Kt({}),i})();const nve=["body"];function ive(i,t){}const rve=[[["mat-expansion-panel-header"]],"*",[["mat-action-row"]]],sve=["mat-expansion-panel-header","*","mat-action-row"];function ove(i,t){1&i&&Pe(0,"span",2),2&i&&U("@indicatorRotate",he()._getExpandedState())}const ave=[[["mat-panel-title"]],[["mat-panel-description"]],"*"],lve=["mat-panel-title","mat-panel-description","*"],a8=new me("MAT_ACCORDION"),l8="225ms cubic-bezier(0.4,0.0,0.2,1)",c8={indicatorRotate:ka("indicatorRotate",[Os("collapsed, void",si({transform:"rotate(0deg)"})),Os("expanded",si({transform:"rotate(180deg)"})),Or("expanded <=> collapsed, void => collapsed",Yr(l8))]),bodyExpansion:ka("bodyExpansion",[Os("collapsed, void",si({height:"0px",visibility:"hidden"})),Os("expanded",si({height:"*",visibility:"visible"})),Or("expanded <=> collapsed, void => collapsed",Yr(l8))])},d8=new me("MAT_EXPANSION_PANEL");let cve=(()=>{class i{constructor(e,n){this._template=e,this._expansionPanel=n}}return i.\u0275fac=function(e){return new(e||i)(E(Co),E(d8,8))},i.\u0275dir=ve({type:i,selectors:[["ng-template","matExpansionPanelContent",""]]}),i})(),dve=0;const u8=new me("MAT_EXPANSION_PANEL_DEFAULT_OPTIONS");let h8=(()=>{class i extends eve{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 $e,this.afterCollapse=new $e,this._inputChanges=new Re,this._headerId="mat-expansion-panel-header-"+dve++,this._bodyAnimationDone=new Re,this.accordion=e,this._document=o,this._bodyAnimationDone.pipe(Ql((c,d)=>c.fromState===d.fromState&&c.toState===d.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(Do(null),gn(()=>this.expanded&&!this._portal),Oi(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)(E(a8,12),E(Zn),E(GR),E(jr),E(jt),E(kr,8),E(u8,8))},i.\u0275cmp=ot({type:i,selectors:[["mat-expansion-panel"]],contentQueries:function(e,n,r){if(1&e&&Wi(r,cve,5),2&e){let s;Et(s=At())&&(n._lazyContent=s.first)}},viewQuery:function(e,n){if(1&e&&Wn(nve,5),2&e){let r;Et(r=At())&&(n._body=r.first)}},hostAttrs:[1,"mat-expansion-panel"],hostVars:6,hostBindings:function(e,n){2&e&&un("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:[Dn([{provide:a8,useValue:void 0},{provide:d8,useExisting:i}]),lt,xi],ngContentSelectors:sve,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&&(or(rve),Wt(0),W(1,"div",0,1),Le("@bodyExpansion.done",function(s){return n._bodyAnimationDone.next(s)}),W(3,"div",2),Wt(4,1),fe(5,ive,0,0,"ng-template",3),j(),Wt(6,2),j()),2&e&&(G(1),U("@bodyExpansion",n._getExpandedState())("id",n.id),Dt("aria-labelledby",n._headerId),G(4),U("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:[c8.bodyExpansion]},changeDetection:0}),i})();class uve{}const hve=JI(uve);let fve=(()=>{class i extends hve{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=Zt.EMPTY;const c=e.accordion?e.accordion._stateChanges.pipe(gn(d=>!(!d.hideToggle&&!d.togglePosition))):mo;this.tabIndex=parseInt(l||"")||0,this._parentChangeSubscription=Cr(e.opened,e.closed,c,e._inputChanges.pipe(gn(d=>!!(d.hideToggle||d.disabled||d.togglePosition)))).subscribe(()=>this._changeDetectorRef.markForCheck()),e.closed.pipe(gn(()=>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:Zo(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)(E(h8,1),E(gt),E(Xc),E(Zn),E(u8,8),E(kr,8),xa("tabindex"))},i.\u0275cmp=ot({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&&Le("click",function(){return n._toggle()})("keydown",function(s){return n._keydown(s)}),2&e&&(Dt("id",n.panel._headerId)("tabindex",n.tabIndex)("aria-controls",n._getPanelId())("aria-expanded",n._isExpanded())("aria-disabled",n.panel.disabled),qo("height",n._getHeaderHeight()),un("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:[lt],ngContentSelectors:lve,decls:5,vars:3,consts:[[1,"mat-content"],["class","mat-expansion-indicator",4,"ngIf"],[1,"mat-expansion-indicator"]],template:function(e,n){1&e&&(or(ave),W(0,"span",0),Wt(1),Wt(2,1),Wt(3,2),j(),fe(4,ove,1,1,"span",1)),2&e&&(un("mat-content-hide-toggle",!n._showToggle()),G(4),U("ngIf",n._showToggle()))},dependencies:[vi],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:[c8.indicatorRotate]},changeDetection:0}),i})(),pve=(()=>{class i{}return i.\u0275fac=function(e){return new(e||i)},i.\u0275dir=ve({type:i,selectors:[["mat-panel-description"]],hostAttrs:[1,"mat-expansion-panel-header-description"]}),i})(),mve=(()=>{class i{}return i.\u0275fac=function(e){return new(e||i)},i.\u0275dir=ve({type:i,selectors:[["mat-panel-title"]],hostAttrs:[1,"mat-expansion-panel-header-title"]}),i})(),gve=(()=>{class i{}return i.\u0275fac=function(e){return new(e||i)},i.\u0275mod=nn({type:i}),i.\u0275inj=Kt({imports:[Ao,Qn,tve,Nh]}),i})();function _ve(i,t){if(1&i&&(W(0,"mat-option",19),ze(1),j()),2&i){const e=t.$implicit;U("value",e),G(1),Qi(" ",e," ")}}function vve(i,t){if(1&i){const e=ai();W(0,"mat-form-field",16)(1,"mat-select",17),Le("selectionChange",function(r){return rn(e),Ut(he(2)._changePageSize(r.value))}),fe(2,_ve,2,2,"mat-option",18),j()()}if(2&i){const e=he(2);U("appearance",e._formFieldAppearance)("color",e.color),G(1),U("value",e.pageSize)("disabled",e.disabled)("aria-labelledby",e._pageSizeLabelId)("panelClass",e.selectConfig.panelClass||"")("disableOptionCentering",e.selectConfig.disableOptionCentering),G(1),U("ngForOf",e._displayedPageSizeOptions)}}function yve(i,t){if(1&i&&(W(0,"div",20),ze(1),j()),2&i){const e=he(2);G(1),_i(e.pageSize)}}function bve(i,t){if(1&i&&(W(0,"div",12)(1,"div",13),ze(2),j(),fe(3,vve,3,8,"mat-form-field",14),fe(4,yve,2,1,"div",15),j()),2&i){const e=he();G(1),B1("id",e._pageSizeLabelId),G(1),Qi(" ",e._intl.itemsPerPageLabel," "),G(1),U("ngIf",e._displayedPageSizeOptions.length>1),G(1),U("ngIf",e._displayedPageSizeOptions.length<=1)}}function xve(i,t){if(1&i){const e=ai();W(0,"button",21),Le("click",function(){return rn(e),Ut(he().firstPage())}),ki(),W(1,"svg",7),Pe(2,"path",22),j()()}if(2&i){const e=he();U("matTooltip",e._intl.firstPageLabel)("matTooltipDisabled",e._previousButtonsDisabled())("matTooltipPosition","above")("disabled",e._previousButtonsDisabled()),Dt("aria-label",e._intl.firstPageLabel)}}function wve(i,t){if(1&i){const e=ai();ki(),va(),W(0,"button",23),Le("click",function(){return rn(e),Ut(he().lastPage())}),ki(),W(1,"svg",7),Pe(2,"path",24),j()()}if(2&i){const e=he();U("matTooltip",e._intl.lastPageLabel)("matTooltipDisabled",e._nextButtonsDisabled())("matTooltipPosition","above")("disabled",e._nextButtonsDisabled()),Dt("aria-label",e._intl.lastPageLabel)}}let yE=(()=>{class i{constructor(){this.changes=new Re,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=ke({token:i,factory:i.\u0275fac,providedIn:"root"}),i})();const Cve={provide:yE,deps:[[new Ss,new Ma,yE]],useFactory:function Mve(i){return i||new yE}},Eve=new me("MAT_PAGINATOR_DEFAULT_OPTIONS"),Ave=jM(CQ(class{}));let Dve=(()=>{class i extends Ave{get pageIndex(){return this._pageIndex}set pageIndex(e){this._pageIndex=Math.max(Ps(e),0),this._changeDetectorRef.markForCheck()}get length(){return this._length}set length(e){this._length=Ps(e),this._changeDetectorRef.markForCheck()}get pageSize(){return this._pageSize}set pageSize(e){this._pageSize=Math.max(Ps(e),0),this._updateDisplayedPageSizeOptions()}get pageSizeOptions(){return this._pageSizeOptions}set pageSizeOptions(e){this._pageSizeOptions=(e||[]).map(n=>Ps(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 $e,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){wo()},i.\u0275dir=ve({type:i,inputs:{color:"color",pageIndex:"pageIndex",length:"length",pageSize:"pageSize",pageSizeOptions:"pageSizeOptions",hidePageSize:"hidePageSize",showFirstLastButtons:"showFirstLastButtons",selectConfig:"selectConfig"},outputs:{page:"page"},features:[lt]}),i})(),Tve=0,Ive=(()=>{class i extends Dve{constructor(e,n,r){super(e,n,r),this._pageSizeLabelId="mat-paginator-page-size-label-"+Tve++,this._formFieldAppearance=r?.formFieldAppearance||"outline"}}return i.\u0275fac=function(e){return new(e||i)(E(yE),E(Zn),E(Eve,8))},i.\u0275cmp=ot({type:i,selectors:[["mat-paginator"]],hostAttrs:["role","group",1,"mat-mdc-paginator"],inputs:{disabled:"disabled"},exportAs:["matPaginator"],features:[lt],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&&(W(0,"div",0)(1,"div",1),fe(2,bve,5,4,"div",2),W(3,"div",3)(4,"div",4),ze(5),j(),fe(6,xve,3,5,"button",5),W(7,"button",6),Le("click",function(){return n.previousPage()}),ki(),W(8,"svg",7),Pe(9,"path",8),j()(),va(),W(10,"button",9),Le("click",function(){return n.nextPage()}),ki(),W(11,"svg",7),Pe(12,"path",10),j()(),fe(13,wve,3,5,"button",11),j()()()),2&e&&(G(2),U("ngIf",!n.hidePageSize),G(3),Qi(" ",n._intl.getRangeLabel(n.pageIndex,n.pageSize,n.length)," "),G(1),U("ngIf",n.showFirstLastButtons),G(1),U("matTooltip",n._intl.previousPageLabel)("matTooltipDisabled",n._previousButtonsDisabled())("matTooltipPosition","above")("disabled",n._previousButtonsDisabled()),Dt("aria-label",n._intl.previousPageLabel),G(3),U("matTooltip",n._intl.nextPageLabel)("matTooltipDisabled",n._nextButtonsDisabled())("matTooltipPosition","above")("disabled",n._nextButtonsDisabled()),Dt("aria-label",n._intl.nextPageLabel),G(3),U("ngIf",n.showFirstLastButtons))},dependencies:[Eo,vi,XM,vl,fb,Nm,Fs],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})(),Rve=(()=>{class i{}return i.\u0275fac=function(e){return new(e||i)},i.\u0275mod=nn({type:i}),i.\u0275inj=Kt({providers:[Cve],imports:[Ao,KM,VH,FV]}),i})(),kve=(()=>{class i{}return i.\u0275fac=function(e){return new(e||i)},i.\u0275mod=nn({type:i,bootstrap:[Jme]}),i.\u0275inj=Kt({providers:[Jl,NH,{provide:PH,useValue:Vie}],imports:[FB,wK,Q_e,eH,SJ,gC,pH,gve,DV,RV,FV,KM,ez,Rve,sse,_H,VH,_V,bpe,xme,tH,tR,Yie]}),i})();th(ec,[Eo,vi,Fs,t0,nE],[pl]),th(zR,[hm,Eo,vi,xy,nc,Zc,vl,h8,fve,mve,pve,Fs,Ive,fb,Nm,t0],[]),th(xC,[Eo,vi,MC,wC,gH,t0],[]),th(_$,[Eo,vi,Ro,Fs,fb,Nm,t0,nE],[pl]),L7().bootstrapModule(kve).catch(i=>console.error(i))},489:function(Bo,$s,ps){var cn;Bo=ps.nmd(Bo),function(){var V,Kr=200,Un="Expected a function",Ha="__lodash_hash_undefined__",Ci="__lodash_placeholder__",Si=1,ms=2,js=4,Ys=1,Uo=2,On=1,ur=2,mc=4,da=8,Dl=16,ua=32,Tl=64,Ga=128,ha=256,md=512,ME=800,Kg=16,In=1/0,Wa=9007199254740991,SE=17976931348623157e292,Pf=NaN,fa=4294967295,Re=fa-1,l0=fa>>>1,c0=[["ary",Ga],["bind",On],["bindKey",ur],["curry",da],["curryRight",Dl],["flip",md],["partial",ua],["partialRight",Tl],["rearg",ha]],ti="[object Arguments]",Yn="[object Array]",EE="[object AsyncFunction]",et="[object Boolean]",gc="[object Date]",AE="[object DOMException]",gd="[object Error]",Of="[object Function]",d0="[object GeneratorFunction]",Vo="[object Map]",Vu="[object Number]",DE="[object Null]",ja="[object Object]",u0="[object Promise]",TE="[object Proxy]",_d="[object RegExp]",zo="[object Set]",_c="[object String]",Ff="[object Symbol]",Zg="[object Undefined]",vd="[object WeakMap]",zu="[object ArrayBuffer]",yd="[object DataView]",pa="[object Float32Array]",Lf="[object Float64Array]",Qg="[object Int8Array]",Nf="[object Int16Array]",Jg="[object Int32Array]",e_="[object Uint8Array]",Hu="[object Uint8ClampedArray]",t_="[object Uint16Array]",n_="[object Uint32Array]",RE=/\b__p \+= '';/g,kE=/\b(__p \+=) '' \+/g,PE=/(__e\(.*?\)|\b__t\)) \+\n'';/g,h0=/&(?:amp|lt|gt|quot|#39);/g,f0=/[&<>"']/g,OE=RegExp(h0.source),FE=RegExp(f0.source),ZO=/<%-([\s\S]+?)%>/g,i_=/<%([\s\S]+?)%>/g,r_=/<%=([\s\S]+?)%>/g,p0=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,m0=/^\w*$/,g0=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,s_=/[\\^$.*+?()[\]{}|]/g,_0=RegExp(s_.source),Bf=/^\s+/,v0=/\s/,y0=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,Mr=/\{\n\/\* \[wrapped with (.+)\] \*/,LE=/,? & /,NE=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,BE=/[()=,{}\[\]\/\s]/,UE=/\\(\\)?/g,b0=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,x0=/\w*$/,VE=/^[-+]0x[0-9a-f]+$/i,Ya=/^0b[01]+$/i,zE=/^\[object .+?Constructor\]$/,rr=/^0o[0-7]+$/i,bd=/^(?:0|[1-9]\d*)$/,mo=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,o_=/($^)/,HE=/['\n\r\u2028\u2029\\]/g,Gu="\\ud800-\\udfff",M0="\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff",l_="\\u2700-\\u27bf",c_="a-z\\xdf-\\xf6\\xf8-\\xff",d_="A-Z\\xc0-\\xd6\\xd8-\\xde",C0="\\ufe0e\\ufe0f",S0="\\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",Cr="["+Gu+"]",Uf="["+S0+"]",xd="["+M0+"]",ci="\\d+",u_="["+l_+"]",pi="["+c_+"]",Vf="[^"+Gu+S0+ci+l_+c_+d_+"]",h_="\\ud83c[\\udffb-\\udfff]",Pt="[^"+Gu+"]",Wu="(?:\\ud83c[\\udde6-\\uddff]){2}",ju="[\\ud800-\\udbff][\\udc00-\\udfff]",Yu="["+d_+"]",pe="(?:"+pi+"|"+Vf+")",zf="(?:"+Yu+"|"+Vf+")",Qt="(?:['\u2019](?:d|ll|m|re|s|t|ve))?",qn="(?:['\u2019](?:D|LL|M|RE|S|T|VE))?",E0="(?:"+xd+"|"+h_+")?",YE="["+C0+"]?",XE=YE+E0+"(?:\\u200d(?:"+[Pt,Wu,ju].join("|")+")"+YE+E0+")*",KE="(?:"+[u_,Wu,ju].join("|")+")"+XE,QO="(?:"+[Pt+xd+"?",xd,Wu,ju,Cr].join("|")+")",Il=RegExp("['\u2019]","g"),JO=RegExp(xd,"g"),A0=RegExp(h_+"(?="+h_+")|"+QO+XE,"g"),eF=RegExp([Yu+"?"+pi+"+"+Qt+"(?="+[Uf,Yu,"$"].join("|")+")",zf+"+"+qn+"(?="+[Uf,Yu+pe,"$"].join("|")+")",Yu+"?"+pe+"+"+Qt,Yu+"+"+qn,"\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])","\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",ci,KE].join("|"),"g"),tF=RegExp("[\\u200d"+Gu+M0+C0+"]"),ZE=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,nF=["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"],QE=-1,Ei={};Ei[pa]=Ei[Lf]=Ei[Qg]=Ei[Nf]=Ei[Jg]=Ei[e_]=Ei[Hu]=Ei[t_]=Ei[n_]=!0,Ei[ti]=Ei[Yn]=Ei[zu]=Ei[et]=Ei[yd]=Ei[gc]=Ei[gd]=Ei[Of]=Ei[Vo]=Ei[Vu]=Ei[ja]=Ei[_d]=Ei[zo]=Ei[_c]=Ei[vd]=!1;var En={};En[ti]=En[Yn]=En[zu]=En[yd]=En[et]=En[gc]=En[pa]=En[Lf]=En[Qg]=En[Nf]=En[Jg]=En[Vo]=En[Vu]=En[ja]=En[_d]=En[zo]=En[_c]=En[Ff]=En[e_]=En[Hu]=En[t_]=En[n_]=!0,En[gd]=En[Of]=En[vd]=!1;var sF={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},ke=parseFloat,oF=parseInt,Kt="object"==typeof global&&global&&global.Object===Object&&global,Gf="object"==typeof self&&self&&self.Object===Object&&self,Sr=Kt||Gf||Function("return this")(),f_=$s&&!$s.nodeType&&$s,Xu=f_&&Bo&&!Bo.nodeType&&Bo,p_=Xu&&Xu.exports===f_,wd=p_&&Kt.process,gs=function(){try{return Xu&&Xu.require&&Xu.require("util").types||wd&&wd.binding&&wd.binding("util")}catch{}}(),m_=gs&&gs.isArrayBuffer,D0=gs&&gs.isDate,Ot=gs&&gs.isMap,$f=gs&&gs.isRegExp,T0=gs&&gs.isSet,Xs=gs&&gs.isTypedArray;function _s(X,ue,oe){switch(oe.length){case 0:return X.call(ue);case 1:return X.call(ue,oe[0]);case 2:return X.call(ue,oe[0],oe[1]);case 3:return X.call(ue,oe[0],oe[1],oe[2])}return X.apply(ue,oe)}function aF(X,ue,oe,Ue){for(var $t=-1,Vn=null==X?0:X.length;++$t-1}function Ku(X,ue,oe){for(var Ue=-1,$t=null==X?0:X.length;++Ue<$t;)if(oe(ue,X[Ue]))return!0;return!1}function mi(X,ue){for(var oe=-1,Ue=null==X?0:X.length,$t=Array(Ue);++oe-1;);return oe}function ma(X,ue){for(var oe=X.length;oe--&&Ft(ue,X[oe],0)>-1;);return oe}var nA=v_({\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"}),ot=v_({"&":"&","<":"<",">":">",'"':""","'":"'"});function th(X){return"\\"+sF[X]}function Sd(X){return tF.test(X)}function qf(X){var ue=-1,oe=Array(X.size);return X.forEach(function(Ue,$t){oe[++ue]=[$t,Ue]}),oe}function ve(X,ue){return function(oe){return X(ue(oe))}}function Gi(X,ue){for(var oe=-1,Ue=X.length,$t=0,Vn=[];++oe",""":'"',"'":"'"}),ys=function X(ue){var u,oe=(ue=null==ue?Sr:ys.defaults(Sr.Object(),ue,ys.pick(Sr,nF))).Array,Ue=ue.Date,$t=ue.Error,Vn=ue.Function,yt=ue.Math,oi=ue.Object,bc=ue.RegExp,R0=ue.String,Er=ue.TypeError,sr=oe.prototype,Ho=oi.prototype,Zs=ue["__core-js_shared__"],Pl=Vn.prototype.toString,ii=Ho.hasOwnProperty,bi=0,sA=(u=/[^.]+$/.exec(Zs&&Zs.keys&&Zs.keys.IE_PROTO||""))?"Symbol(src)_1."+u:"",Ad=Ho.toString,k0=Pl.call(oi),Kf=Sr._,Zf=bc("^"+Pl.call(ii).replace(s_,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),Za=p_?ue.Buffer:V,Ui=ue.Symbol,x_=ue.Uint8Array,bs=Za?Za.allocUnsafe:V,xs=ve(oi.getPrototypeOf,oi),Qf=oi.create,Dd=Ho.propertyIsEnumerable,xc=sr.splice,vo=Ui?Ui.isConcatSpreadable:V,ih=Ui?Ui.iterator:V,Td=Ui?Ui.toStringTag:V,Jf=function(){try{var u=kc(oi,"defineProperty");return u({},"",{}),u}catch{}}(),oA=ue.clearTimeout!==Sr.clearTimeout&&ue.clearTimeout,cF=Ue&&Ue.now!==Sr.Date.now&&Ue.now,dF=ue.setTimeout!==Sr.setTimeout&&ue.setTimeout,w_=yt.ceil,M_=yt.floor,P0=oi.getOwnPropertySymbols,uF=Za?Za.isBuffer:V,aA=ue.isFinite,hF=sr.join,fF=ve(oi.keys,oi),fr=yt.max,Zr=yt.min,pF=Ue.now,O0=ue.parseInt,C_=yt.random,mF=sr.reverse,F0=kc(ue,"DataView"),ep=kc(ue,"Map"),Qa=kc(ue,"Promise"),Id=kc(ue,"Set"),xi=kc(ue,"WeakMap"),Rd=kc(oi,"create"),tp=xi&&new xi,kd={},L0=Pc(F0),N0=Pc(ep),lA=Pc(Qa),S_=Pc(Id),cA=Pc(xi),Qr=Ui?Ui.prototype:V,Pd=Qr?Qr.valueOf:V,E_=Qr?Qr.toString:V;function I(u){if(Pi(u)&&!sn(u)&&!(u instanceof kn)){if(u instanceof Ai)return u;if(ii.call(u,"__wrapped__"))return ns(u)}return new Ai(u)}var Od=function(){function u(){}return function(f){if(!Mi(f))return{};if(Qf)return Qf(f);u.prototype=f;var _=new u;return u.prototype=V,_}}();function wc(){}function Ai(u,f){this.__wrapped__=u,this.__actions__=[],this.__chain__=!!f,this.__index__=0,this.__values__=V}function kn(u){this.__wrapped__=u,this.__actions__=[],this.__dir__=1,this.__filtered__=!1,this.__iteratees__=[],this.__takeCount__=fa,this.__views__=[]}function Mc(u){var f=-1,_=null==u?0:u.length;for(this.clear();++f<_;){var w=u[f];this.set(w[0],w[1])}}function kt(u){var f=-1,_=null==u?0:u.length;for(this.clear();++f<_;){var w=u[f];this.set(w[0],w[1])}}function ga(u){var f=-1,_=null==u?0:u.length;for(this.clear();++f<_;){var w=u[f];this.set(w[0],w[1])}}function Ut(u){var f=-1,_=null==u?0:u.length;for(this.__data__=new ga;++f<_;)this.add(u[f])}function Jr(u){var f=this.__data__=new kt(u);this.size=f.size}function I_(u,f){var _=sn(u),w=!_&&Lc(u),S=!_&&!w&&rl(u),P=!_&&!w&&!S&&jo(u),H=_||w||S||P,Y=H?Ks(u.length,R0):[],Q=Y.length;for(var _e in u)(f||ii.call(u,_e))&&(!H||!("length"==_e||S&&("offset"==_e||"parent"==_e)||P&&("buffer"==_e||"byteLength"==_e||"byteOffset"==_e)||il(_e,Q)))&&Y.push(_e);return Y}function zr(u){var f=u.length;return f?u[lh(0,f-1)]:V}function Ja(u,f){return Sp(eo(u),Ll(f,0,u.length))}function H0(u){return Sp(eo(u))}function Fl(u,f,_){(_!==V&&!Wo(u[f],_)||_===V&&!(f in u))&&Go(u,f,_)}function Qs(u,f,_){var w=u[f];(!ii.call(u,f)||!Wo(w,_)||_===V&&!(f in u))&&Go(u,f,_)}function ip(u,f){for(var _=u.length;_--;)if(Wo(u[_][0],f))return _;return-1}function G0(u,f,_,w){return el(u,function(S,P,H){f(w,S,_(S),H)}),w}function $0(u,f){return u&&di(f,pr(f),u)}function Go(u,f,_){"__proto__"==f&&Jf?Jf(u,f,{configurable:!0,enumerable:!0,value:_,writable:!0}):u[f]=_}function rh(u,f){for(var _=-1,w=f.length,S=oe(w),P=null==u;++_=f?u:f)),u}function Ms(u,f,_,w,S,P){var H,Y=f&Si,Q=f&ms,_e=f&js;if(_&&(H=S?_(u,w,S,P):_(u)),H!==V)return H;if(!Mi(u))return u;var ye=sn(u);if(ye){if(H=function hx(u){var f=u.length,_=new u.constructor(f);return f&&"string"==typeof u[0]&&ii.call(u,"index")&&(_.index=u.index,_.input=u.input),_}(u),!Y)return eo(u,H)}else{var be=Hr(u),Xe=be==Of||be==d0;if(rl(u))return me(u,Y);if(be==ja||be==ti||Xe&&!S){if(H=Q||Xe?{}:PA(u),!Y)return Q?function hh(u,f){return di(u,cx(u),f)}(u,function _A(u,f){return u&&di(f,Ds(f),u)}(H,u)):function H_(u,f){return di(u,Z_(u),f)}(u,$0(H,u))}else{if(!En[be])return S?u:{};H=function fx(u,f,_){var w=u.constructor;switch(f){case zu:return rx(u);case et:case gc:return new w(+u);case yd:return function xF(u,f){var _=f?rx(u.buffer):u.buffer;return new u.constructor(_,u.byteOffset,u.byteLength)}(u,_);case pa:case Lf:case Qg:case Nf:case Jg:case e_:case Hu:case t_:case n_:return AA(u,_);case Vo:return new w;case Vu:case _c:return new w(u);case _d:return function wF(u){var f=new u.constructor(u.source,x0.exec(u));return f.lastIndex=u.lastIndex,f}(u);case zo:return new w;case Ff:return function MF(u){return Pd?oi(Pd.call(u)):{}}(u)}}(u,be,Y)}}P||(P=new Jr);var vt=P.get(u);if(vt)return vt;P.set(u,H),nw(u)?u.forEach(function(zt){H.add(Ms(zt,f,_,zt,u,P))}):Tv(u)&&u.forEach(function(zt,An){H.set(An,Ms(zt,f,_,An,u,P))});var mn=ye?V:(_e?Q?q_:yp:Q?Ds:pr)(u);return Rn(mn||u,function(zt,An){mn&&(zt=u[An=zt]),Qs(H,An,Ms(zt,f,_,An,u,P))}),H}function R_(u,f,_){var w=_.length;if(null==u)return!w;for(u=oi(u);w--;){var S=_[w],H=u[S];if(H===V&&!(S in u)||!(0,f[S])(H))return!1}return!0}function rp(u,f,_){if("function"!=typeof u)throw new Er(Un);return gh(function(){u.apply(V,_)},f)}function Ld(u,f,_,w){var S=-1,P=Rl,H=!0,Y=u.length,Q=[],_e=f.length;if(!Y)return Q;_&&(f=mi(f,Ur(_))),w?(P=Ku,H=!1):f.length>=Kr&&(P=yc,H=!1,f=new Ut(f));e:for(;++S-1},kt.prototype.set=function fA(u,f){var _=this.__data__,w=ip(_,u);return w<0?(++this.size,_.push([u,f])):_[w][1]=f,this},ga.prototype.clear=function pA(){this.size=0,this.__data__={hash:new Mc,map:new(ep||kt),string:new Mc}},ga.prototype.delete=function mA(u){var f=K_(this,u).delete(u);return this.size-=f?1:0,f},ga.prototype.get=function Se(u){return K_(this,u).get(u)},ga.prototype.has=function zn(u){return K_(this,u).has(u)},ga.prototype.set=function rn(u,f){var _=K_(this,u),w=_.size;return _.set(u,f),this.size+=_.size==w?0:1,this},Ut.prototype.add=Ut.prototype.push=function Ar(u){return this.__data__.set(u,Ha),this},Ut.prototype.has=function z0(u){return this.__data__.has(u)},Jr.prototype.clear=function _a(){this.__data__=new kt,this.size=0},Jr.prototype.delete=function D_(u){var f=this.__data__,_=f.delete(u);return this.size=f.size,_},Jr.prototype.get=function T_(u){return this.__data__.get(u)},Jr.prototype.has=function gA(u){return this.__data__.has(u)},Jr.prototype.set=function _F(u,f){var _=this.__data__;if(_ instanceof kt){var w=_.__data__;if(!ep||w.length0&&_(Y)?f>1?Xn(Y,f-1,_,w,S):kl(S,Y):w||(S[S.length]=Y)}return S}var tl=G_(),Di=G_(!0);function ki(u,f){return u&&tl(u,f,pr)}function P_(u,f){return u&&Di(u,f,pr)}function va(u,f){return vc(f,function(_){return zl(u[_])})}function Cc(u,f){for(var _=0,w=(f=wa(f,u)).length;null!=u&&_f}function sp(u,f){return null!=u&&ii.call(u,f)}function op(u,f){return null!=u&&f in oi(u)}function ap(u,f,_){for(var w=_?Ku:Rl,S=u[0].length,P=u.length,H=P,Y=oe(P),Q=1/0,_e=[];H--;){var ye=u[H];H&&f&&(ye=mi(ye,Ur(f))),Q=Zr(ye.length,Q),Y[H]=!_&&(f||S>=120&&ye.length>=120)?new Ut(H&&ye):V}ye=u[0];var be=-1,Xe=Y[0];e:for(;++be=Y?Q:Q*("desc"==_[w]?-1:1)}return u.index-f.index}(P,H,_)})}function Q0(u,f,_){for(var w=-1,S=f.length,P={};++w-1;)Y!==u&&xc.call(Y,Q,1),xc.call(u,Q,1);return u}function ah(u,f){for(var _=u?f.length:0,w=_-1;_--;){var S=f[_];if(_==w||S!==P){var P=S;il(S)?xc.call(u,S,1):dh(u,S)}}return u}function lh(u,f){return u+M_(C_()*(f-u+1))}function ch(u,f){var _="";if(!u||f<1||f>Wa)return _;do{f%2&&(_+=u),(f=M_(f/2))&&(u+=u)}while(f);return _}function pn(u,f){return Mp(J_(u,f,is),u+"")}function SA(u){return zr(Uc(u))}function ex(u,f){var _=Uc(u);return Sp(_,Ll(f,0,_.length))}function zd(u,f,_,w){if(!Mi(u))return u;for(var S=-1,P=(f=wa(f,u)).length,H=P-1,Y=u;null!=Y&&++SS?0:S+f),(_=_>S?S:_)<0&&(_+=S),S=f>_?0:_-f>>>0,f>>>=0;for(var P=oe(S);++w>>1,H=u[P];null!==H&&!As(H)&&(_?H<=f:H=Kr){var _e=f?null:j_(u);if(_e)return Hn(_e);H=!1,S=yc,Q=new Ut}else Q=f?[]:Y;e:for(;++w=w?u:ts(u,f,_)}var ix=oA||function(u){return Sr.clearTimeout(u)};function me(u,f){if(f)return u.slice();var _=u.length,w=bs?bs(_):new u.constructor(_);return u.copy(w),w}function rx(u){var f=new u.constructor(u.byteLength);return new x_(f).set(new x_(u)),f}function AA(u,f){var _=f?rx(u.buffer):u.buffer;return new u.constructor(_,u.byteOffset,u.length)}function DA(u,f){if(u!==f){var _=u!==V,w=null===u,S=u==u,P=As(u),H=f!==V,Y=null===f,Q=f==f,_e=As(f);if(!Y&&!_e&&!P&&u>f||P&&H&&Q&&!Y&&!_e||w&&H&&Q||!_&&Q||!S)return 1;if(!w&&!P&&!_e&&u1?_[S-1]:V,H=S>2?_[2]:V;for(P=u.length>3&&"function"==typeof P?(S--,P):V,H&&Tr(_[0],_[1],H)&&(P=S<3?V:P,S=1),f=oi(f);++w-1?S[P?f[H]:H]:V}}function Cs(u){return bo(function(f){var _=f.length,w=_,S=Ai.prototype.thru;for(u&&f.reverse();w--;){var P=f[w];if("function"!=typeof P)throw new Er(Un);if(S&&!H&&"wrapper"==nl(P))var H=new Ai([],!0)}for(w=H?w:_;++w<_;){var Y=nl(P=f[w]),Q="wrapper"==Y?X_(P):V;H=Q&&mh(Q[0])&&Q[1]==(Ga|da|ua|ha)&&!Q[4].length&&1==Q[9]?H[nl(Q[0])].apply(H,Q[3]):1==P.length&&mh(P)?H[Y]():H.thru(P)}return function(){var _e=arguments,ye=_e[0];if(H&&1==_e.length&&sn(ye))return H.plant(ye).value();for(var be=0,Xe=_?f[be].apply(this,_e):ye;++be<_;)Xe=f[be].call(this,Xe);return Xe}})}function jd(u,f,_,w,S,P,H,Y,Q,_e){var ye=f&Ga,be=f&On,Xe=f&ur,vt=f&(da|Dl),Vt=f&md,mn=Xe?V:mp(u);return function zt(){for(var An=arguments.length,Ln=oe(An),rs=An;rs--;)Ln[rs]=arguments[rs];if(vt)var ss=Ca(zt),so=function eh(X,ue){for(var oe=X.length,Ue=0;oe--;)X[oe]===ue&&++Ue;return Ue}(Ln,ss);if(w&&(Ln=Gd(Ln,w,S,vt)),P&&(Ln=TA(Ln,P,H,vt)),An-=so,vt&&An<_e){var Ti=Gi(Ln,ss);return ox(u,f,jd,zt.placeholder,_,Ln,Ti,Y,Q,_e-An)}var Ts=be?_:this,Mo=Xe?Ts[u]:u;return An=Ln.length,Y?Ln=function Es(u,f){for(var _=u.length,w=Zr(f.length,_),S=eo(u);w--;){var P=f[w];u[w]=il(P,_)?S[P]:V}return u}(Ln,Y):Vt&&An>1&&Ln.reverse(),ye&&QY))return!1;var _e=P.get(u),ye=P.get(f);if(_e&&ye)return _e==f&&ye==u;var be=-1,Xe=!0,vt=_&Uo?new Ut:V;for(P.set(u,f),P.set(f,u);++be-1&&u%1==0&&u1?"& ":"")+f[w],f=f.join(_>2?", ":" "),u.replace(y0,"{\n/* [wrapped with "+f+"] */\n")}(w,function BA(u,f){return Rn(c0,function(_){var w="_."+_[0];f&_[1]&&!Rl(u,w)&&u.push(w)}),u.sort()}(function dx(u){var f=u.match(Mr);return f?f[1].split(LE):[]}(w),_)))}function vx(u){var f=0,_=0;return function(){var w=pF(),S=Kg-(w-_);if(_=w,S>0){if(++f>=ME)return arguments[0]}else f=0;return u.apply(V,arguments)}}function Sp(u,f){var _=-1,w=u.length,S=w-1;for(f=f===V?w:f;++_1?u[f-1]:V;return _="function"==typeof _?(u.pop(),_):V,yh(u,_)});function zx(u){var f=I(u);return f.__chain__=!0,f}function Ip(u,f){return f(u)}var Hx=bo(function(u){var f=u.length,_=f?u[0]:0,w=this.__wrapped__,S=function(P){return rh(P,u)};return!(f>1||this.__actions__.length)&&w instanceof kn&&il(_)?((w=w.slice(_,+_+(f?1:0))).__actions__.push({func:Ip,args:[S],thisArg:V}),new Ai(w,this.__chain__).thru(function(P){return f&&!P.length&&P.push(V),P})):this.thru(S)}),rD=fp(function(u,f,_){ii.call(u,_)?++u[_]:Go(u,_,1)}),$x=RA(Sx),kp=RA(rv);function bv(u,f){return(sn(u)?Rn:el)(u,Lt(f,3))}function Vl(u,f){return(sn(u)?lF:k_)(u,Lt(f,3))}var oD=fp(function(u,f,_){ii.call(u,_)?u[_].push(f):Go(u,_,[f])}),lD=pn(function(u,f,_){var w=-1,S="function"==typeof f,P=no(u)?oe(u.length):[];return el(u,function(H){P[++w]=S?_s(f,H,_):ya(H,f,_)}),P}),cD=fp(function(u,f,_){Go(u,_,f)});function Pp(u,f){return(sn(u)?mi:sh)(u,Lt(f,3))}var Sa=fp(function(u,f,_){u[_?0:1].push(f)},function(){return[[],[]]}),_D=pn(function(u,f){if(null==u)return[];var _=f.length;return _>1&&Tr(u,f[0],f[1])?f=[]:_>2&&Tr(f[0],f[1],f[2])&&(f=[f[0]]),B_(u,Xn(f,1),[])}),Op=cF||function(){return Sr.Date.now()};function xh(u,f,_){return f=_?V:f,yo(u,Ga,V,V,V,V,f=u&&null==f?u.length:f)}function Ea(u,f){var _;if("function"!=typeof f)throw new Er(Un);return u=dn(u),function(){return--u>0&&(_=f.apply(this,arguments)),u<=1&&(f=V),_}}var Fc=pn(function(u,f,_){var w=On;if(_.length){var S=Gi(_,Ca(Fc));w|=ua}return yo(u,w,f,_,S)}),xv=pn(function(u,f,_){var w=On|ur;if(_.length){var S=Gi(_,Ca(xv));w|=ua}return yo(f,w,u,_,S)});function yD(u,f,_){var w,S,P,H,Y,Q,_e=0,ye=!1,be=!1,Xe=!0;if("function"!=typeof u)throw new Er(Un);function vt(Ti){var Ts=w,Mo=S;return w=S=V,_e=Ti,H=u.apply(Mo,Ts)}function zt(Ti){var Ts=Ti-Q;return Q===V||Ts>=f||Ts<0||be&&Ti-_e>=P}function An(){var Ti=Op();if(zt(Ti))return Ln(Ti);Y=gh(An,function mn(Ti){var I1=f-(Ti-Q);return be?Zr(I1,P-(Ti-_e)):I1}(Ti))}function Ln(Ti){return Y=V,Xe&&w?vt(Ti):(w=S=V,H)}function so(){var Ti=Op(),Ts=zt(Ti);if(w=arguments,S=this,Q=Ti,Ts){if(Y===V)return function Vt(Ti){return _e=Ti,Y=gh(An,f),ye?vt(Ti):H}(Q);if(be)return ix(Y),Y=gh(An,f),vt(Q)}return Y===V&&(Y=gh(An,f)),H}return f=xo(f)||0,Mi(_)&&(ye=!!_.leading,P=(be="maxWait"in _)?fr(xo(_.maxWait)||0,f):P,Xe="trailing"in _?!!_.trailing:Xe),so.cancel=function rs(){Y!==V&&ix(Y),_e=0,w=Q=S=Y=V},so.flush=function ss(){return Y===V?H:Ln(Op())},so}var kF=pn(function(u,f){return rp(u,1,f)}),PF=pn(function(u,f,_){return rp(u,xo(f)||0,_)});function qd(u,f){if("function"!=typeof u||null!=f&&"function"!=typeof f)throw new Er(Un);var _=function(){var w=arguments,S=f?f.apply(this,w):w[0],P=_.cache;if(P.has(S))return P.get(S);var H=u.apply(this,w);return _.cache=P.set(S,H)||P,H};return _.cache=new(qd.Cache||ga),_}function Sv(u){if("function"!=typeof u)throw new Er(Un);return function(){var f=arguments;switch(f.length){case 0:return!u.call(this);case 1:return!u.call(this,f[0]);case 2:return!u.call(this,f[0],f[1]);case 3:return!u.call(this,f[0],f[1],f[2])}return!u.apply(this,f)}}qd.Cache=ga;var qx=Hd(function(u,f){var _=(f=1==f.length&&sn(f[0])?mi(f[0],Ur(Lt())):mi(Xn(f,1),Ur(Lt()))).length;return pn(function(w){for(var S=-1,P=Zr(w.length,_);++S=f}),Lc=Ud(function(){return arguments}())?Ud:function(u){return Pi(u)&&ii.call(u,"callee")&&!Dd.call(u,"callee")},sn=oe.isArray,FF=m_?Ur(m_):function xA(u){return Pi(u)&&es(u)==zu};function no(u){return null!=u&&Vp(u.length)&&!zl(u)}function wi(u){return Pi(u)&&no(u)}var rl=uF||Jd,Jx=D0?Ur(D0):function vF(u){return Pi(u)&&es(u)==gc};function Bp(u){if(!Pi(u))return!1;var f=es(u);return f==gd||f==AE||"string"==typeof u.message&&"string"==typeof u.name&&!io(u)}function zl(u){if(!Mi(u))return!1;var f=es(u);return f==Of||f==d0||f==EE||f==TE}function Up(u){return"number"==typeof u&&u==dn(u)}function Vp(u){return"number"==typeof u&&u>-1&&u%1==0&&u<=Wa}function Mi(u){var f=typeof u;return null!=u&&("object"==f||"function"==f)}function Pi(u){return null!=u&&"object"==typeof u}var Tv=Ot?Ur(Ot):function wA(u){return Pi(u)&&Hr(u)==Vo};function wh(u){return"number"==typeof u||Pi(u)&&es(u)==Vu}function io(u){if(!Pi(u)||es(u)!=ja)return!1;var f=xs(u);if(null===f)return!0;var _=ii.call(f,"constructor")&&f.constructor;return"function"==typeof _&&_ instanceof _&&Pl.call(_)==k0}var Hp=$f?Ur($f):function bF(u){return Pi(u)&&es(u)==_d},nw=T0?Ur(T0):function L_(u){return Pi(u)&&Hr(u)==zo};function Gp(u){return"string"==typeof u||!sn(u)&&Pi(u)&&es(u)==_c}function As(u){return"symbol"==typeof u||Pi(u)&&es(u)==Ff}var jo=Xs?Ur(Xs):function q0(u){return Pi(u)&&Vp(u.length)&&!!Ei[es(u)]},Pv=vp(lp),PD=vp(function(u,f){return u<=f});function Ov(u){if(!u)return[];if(no(u))return Gp(u)?_o(u):eo(u);if(ih&&u[ih])return function rA(X){for(var ue,oe=[];!(ue=X.next()).done;)oe.push(ue.value);return oe}(u[ih]());var f=Hr(u);return(f==Vo?qf:f==zo?Hn:Uc)(u)}function sl(u){return u?(u=xo(u))===In||u===-In?(u<0?-1:1)*SE:u==u?u:0:0===u?u:0}function dn(u){var f=sl(u),_=f%1;return f==f?_?f-_:f:0}function OD(u){return u?Ll(dn(u),0,fa):0}function xo(u){if("number"==typeof u)return u;if(As(u))return Pf;if(Mi(u)){var f="function"==typeof u.valueOf?u.valueOf():u;u=Mi(f)?f+"":f}if("string"!=typeof u)return 0===u?u:+u;u=$n(u);var _=Ya.test(u);return _||rr.test(u)?oF(u.slice(2),_?2:8):VE.test(u)?Pf:+u}function Hl(u){return di(u,Ds(u))}function Fn(u){return null==u?"":Js(u)}var gt=Dr(function(u,f){if(wp(f)||no(f))di(f,pr(f),u);else for(var _ in f)ii.call(f,_)&&Qs(u,_,f[_])}),iw=Dr(function(u,f){di(f,Ds(f),u)}),Gl=Dr(function(u,f,_,w){di(f,Ds(f),u,w)}),ol=Dr(function(u,f,_,w){di(f,pr(f),u,w)}),LD=bo(rh),Bc=pn(function(u,f){u=oi(u);var _=-1,w=f.length,S=w>2?f[2]:V;for(S&&Tr(f[0],f[1],S)&&(w=1);++_1),P}),di(u,q_(u),_),w&&(_=Ms(_,Si|ms|js,Ma));for(var S=f.length;S--;)dh(_,f[S]);return _}),jD=bo(function(u,f){return null==u?{}:function Z0(u,f){return Q0(u,f,function(_,w){return Uv(u,w)})}(u,f)});function Vv(u,f){if(null==u)return{};var _=mi(q_(u),function(w){return[w]});return f=Lt(f),Q0(u,_,function(w,S){return f(w,S[0])})}var aw=fh(pr),zv=fh(Ds);function Uc(u){return null==u?[]:Ju(u,pr(u))}var G=Wd(function(u,f,_){return f=f.toLowerCase(),u+(_?Hv(f):f)});function Hv(u){return Zd(Fn(u).toLowerCase())}function Gv(u){return(u=Fn(u))&&u.replace(mo,nA).replace(JO,"")}var s1=Wd(function(u,f,_){return u+(_?"-":"")+f.toLowerCase()}),cw=Wd(function(u,f,_){return u+(_?" ":"")+f.toLowerCase()}),o1=$d("toLowerCase"),$v=Wd(function(u,f,_){return u+(_?"_":"")+f.toLowerCase()}),c1=Wd(function(u,f,_){return u+(_?" ":"")+Zd(f)}),fw=Wd(function(u,f,_){return u+(_?" ":"")+f.toUpperCase()}),Zd=$d("toUpperCase");function pw(u,f,_){return u=Fn(u),(f=_?V:f)===V?function nn(X){return ZE.test(X)}(u)?function fn(X){return X.match(eF)||[]}(u):function tA(X){return X.match(NE)||[]}(u):u.match(f)||[]}var jv=pn(function(u,f){try{return _s(u,V,f)}catch(_){return Bp(_)?_:new $t(_)}}),f1=bo(function(u,f){return Rn(f,function(_){_=$o(_),Go(u,_,Fc(u[_],u))}),u});function Yv(u){return function(){return u}}var mw=Cs(),_1=Cs(!0);function is(u){return u}function $p(u){return N_("function"==typeof u?u:Ms(u,Si))}var Xv=pn(function(u,f){return function(_){return ya(_,u,f)}}),v1=pn(function(u,f){return function(_){return ya(u,_,f)}});function gw(u,f,_){var w=pr(f),S=va(f,w);null==_&&(!Mi(f)||!S.length&&w.length)&&(_=f,f=u,u=this,S=va(f,pr(f)));var P=!(Mi(_)&&"chain"in _&&!_.chain),H=zl(u);return Rn(S,function(Y){var Q=f[Y];u[Y]=Q,H&&(u.prototype[Y]=function(){var _e=this.__chain__;if(P||_e){var ye=u(this.__wrapped__);return(ye.__actions__=eo(this.__actions__)).push({func:Q,args:arguments,thisArg:u}),ye.__chain__=_e,ye}return Q.apply(u,kl([this.value()],arguments))})}),u}function wo(){}var _w=gp(mi),b1=gp(JE),x1=gp(Wf);function Mh(u){return px(u)?__($o(u)):function ba(u){return function(f){return Cc(f,u)}}(u)}var Kv=sx(),Ch=sx(!0);function Sh(){return[]}function Jd(){return!1}var w1=$_(function(u,f){return u+f},0),M1=W_("ceil"),bw=$_(function(u,f){return u/f},1),C1=W_("floor"),D1=$_(function(u,f){return u*f},1),WF=W_("round"),ty=$_(function(u,f){return u-f},0);return I.after=function vD(u,f){if("function"!=typeof f)throw new Er(Un);return u=dn(u),function(){if(--u<1)return f.apply(this,arguments)}},I.ary=xh,I.assign=gt,I.assignIn=iw,I.assignInWith=Gl,I.assignWith=ol,I.at=LD,I.before=Ea,I.bind=Fc,I.bindAll=f1,I.bindKey=xv,I.castArray=function wD(){if(!arguments.length)return[];var u=arguments[0];return sn(u)?u:[u]},I.chain=zx,I.chunk=function nv(u,f,_){f=(_?Tr(u,f,_):f===V)?1:fr(dn(f),0);var w=null==u?0:u.length;if(!w||f<1)return[];for(var S=0,P=0,H=oe(w_(w/f));SS?0:S+_),(w=w===V||w>S?S:dn(w))<0&&(w+=S),w=_>w?0:OD(w);_>>0)?(u=Fn(u))&&("string"==typeof f||null!=f&&!Hp(f))&&!(f=Js(f))&&Sd(u)?Ic(_o(u),0,_):u.split(f,_):[]},I.spread=function Kx(u,f){if("function"!=typeof u)throw new Er(Un);return f=null==f?0:fr(dn(f),0),pn(function(_){var w=_[f],S=Ic(_,0,f);return w&&kl(S,w),_s(u,this,S)})},I.tail=function Oc(u){var f=null==u?0:u.length;return f?ts(u,1,f):[]},I.take=function Ox(u,f,_){return u&&u.length?ts(u,0,(f=_||f===V?1:dn(f))<0?0:f):[]},I.takeRight=function Fx(u,f,_){var w=null==u?0:u.length;return w?ts(u,(f=w-(f=_||f===V?1:dn(f)))<0?0:f,w):[]},I.takeRightWhile=function QA(u,f){return u&&u.length?uh(u,Lt(f,3),!1,!0):[]},I.takeWhile=function IF(u,f){return u&&u.length?uh(u,Lt(f,3)):[]},I.tap=function tD(u,f){return f(u),u},I.throttle=function Fp(u,f,_){var w=!0,S=!0;if("function"!=typeof u)throw new Er(Un);return Mi(_)&&(w="leading"in _?!!_.leading:w,S="trailing"in _?!!_.trailing:S),yD(u,f,{leading:w,maxWait:f,trailing:S})},I.thru=Ip,I.toArray=Ov,I.toPairs=aw,I.toPairsIn=zv,I.toPath=function yw(u){return sn(u)?mi(u,$o):As(u)?[u]:eo(yx(Fn(u)))},I.toPlainObject=Hl,I.transform=function XD(u,f,_){var w=sn(u),S=w||rl(u)||jo(u);if(f=Lt(f,4),null==_){var P=u&&u.constructor;_=S?w?new P:[]:Mi(u)&&zl(P)?Od(xs(u)):{}}return(S?Rn:ki)(u,function(H,Y,Q){return f(_,H,Y,Q)}),_},I.unary=function Zx(u){return xh(u,1)},I.union=Ap,I.unionBy=JA,I.unionWith=Lx,I.uniq=function Nx(u){return u&&u.length?ri(u):[]},I.uniqBy=function Bx(u,f){return u&&u.length?ri(u,Lt(f,2)):[]},I.uniqWith=function fv(u,f){return f="function"==typeof f?f:V,u&&u.length?ri(u,V,f):[]},I.unset=function KD(u,f){return null==u||dh(u,f)},I.unzip=Dp,I.unzipWith=yh,I.update=function ZD(u,f,_){return null==u?u:nx(u,f,hp(_))},I.updateWith=function QD(u,f,_,w){return w="function"==typeof w?w:V,null==u?u:nx(u,f,hp(_),w)},I.values=Uc,I.valuesIn=function JD(u){return null==u?[]:Ju(u,Ds(u))},I.without=Tp,I.words=pw,I.wrap=function Av(u,f){return Ev(hp(f),u)},I.xor=Ux,I.xorBy=pv,I.xorWith=mv,I.zip=gv,I.zipObject=function bh(u,f){return Tc(u||[],f||[],Qs)},I.zipObjectDeep=function eD(u,f){return Tc(u||[],f||[],zd)},I.zipWith=Vx,I.entries=aw,I.entriesIn=zv,I.extend=iw,I.extendWith=Gl,gw(I,I),I.add=w1,I.attempt=jv,I.camelCase=G,I.capitalize=Hv,I.ceil=M1,I.clamp=function e1(u,f,_){return _===V&&(_=f,f=V),_!==V&&(_=(_=xo(_))==_?_:0),f!==V&&(f=(f=xo(f))==f?f:0),Ll(xo(u),f,_)},I.clone=function Kn(u){return Ms(u,js)},I.cloneDeep=function CD(u){return Ms(u,Si|js)},I.cloneDeepWith=function Lp(u,f){return Ms(u,Si|js,f="function"==typeof f?f:V)},I.cloneWith=function MD(u,f){return Ms(u,js,f="function"==typeof f?f:V)},I.conformsTo=function Qx(u,f){return null==f||R_(u,f,pr(f))},I.deburr=Gv,I.defaultTo=function g1(u,f){return null==u||u!=u?f:u},I.divide=bw,I.endsWith=function n1(u,f,_){u=Fn(u),f=Js(f);var w=u.length,S=_=_===V?w:Ll(dn(_),0,w);return(_-=f.length)>=0&&u.slice(_,S)==f},I.eq=Wo,I.escape=function r1(u){return(u=Fn(u))&&FE.test(u)?u.replace(f0,ot):u},I.escapeRegExp=function lw(u){return(u=Fn(u))&&_0.test(u)?u.replace(s_,"\\$&"):u},I.every=function vv(u,f,_){var w=sn(u)?JE:W0;return _&&Tr(u,f,_)&&(f=V),w(u,Lt(f,3))},I.find=$x,I.findIndex=Sx,I.findKey=function Fv(u,f){return ee(u,Lt(f,3),ki)},I.findLast=kp,I.findLastIndex=rv,I.findLastKey=function Lv(u,f){return ee(u,Lt(f,3),P_)},I.floor=C1,I.forEach=bv,I.forEachRight=Vl,I.forIn=function UD(u,f){return null==u?u:tl(u,Lt(f,3),Ds)},I.forInRight=function Nv(u,f){return null==u?u:Di(u,Lt(f,3),Ds)},I.forOwn=function al(u,f){return u&&ki(u,Lt(f,3))},I.forOwnRight=function VD(u,f){return u&&P_(u,Lt(f,3))},I.get=Bv,I.gt=SD,I.gte=ED,I.has=function GD(u,f){return null!=u&&ux(u,f,sp)},I.hasIn=Uv,I.head=Ax,I.identity=is,I.includes=function aD(u,f,_,w){u=no(u)?u:Uc(u),_=_&&!w?dn(_):0;var S=u.length;return _<0&&(_=fr(S+_,0)),Gp(u)?_<=S&&u.indexOf(f,_)>-1:!!S&&Ft(u,f,_)>-1},I.indexOf=function vh(u,f,_){var w=null==u?0:u.length;if(!w)return-1;var S=null==_?0:dn(_);return S<0&&(S=fr(w+S,0)),Ft(u,f,S)},I.inRange=function t1(u,f,_){return f=sl(f),_===V?(_=f,f=0):_=sl(_),function O_(u,f,_){return u>=Zr(f,_)&&u=-Wa&&u<=Wa},I.isSet=nw,I.isString=Gp,I.isSymbol=As,I.isTypedArray=jo,I.isUndefined=function ID(u){return u===V},I.isWeakMap=function RD(u){return Pi(u)&&Hr(u)==vd},I.isWeakSet=function kD(u){return Pi(u)&&"[object WeakSet]"==es(u)},I.join=function Dx(u,f){return null==u?"":hF.call(u,f)},I.kebabCase=s1,I.last=Ir,I.lastIndexOf=function cv(u,f,_){var w=null==u?0:u.length;if(!w)return-1;var S=w;return _!==V&&(S=(S=dn(_))<0?fr(w+S,0):Zr(S,w-1)),f==f?function Ed(X,ue,oe){for(var Ue=oe+1;Ue--;)if(X[Ue]===ue)return Ue;return Ue}(u,f,S):Qu(u,Yf,S,!0)},I.lowerCase=cw,I.lowerFirst=o1,I.lt=Pv,I.lte=PD,I.max=function xw(u){return u&&u.length?Nd(u,is,Bd):V},I.maxBy=function ww(u,f){return u&&u.length?Nd(u,Lt(f,2),Bd):V},I.mean=function S1(u){return Cd(u,is)},I.meanBy=function E1(u,f){return Cd(u,Lt(f,2))},I.min=function ro(u){return u&&u.length?Nd(u,is,lp):V},I.minBy=function A1(u,f){return u&&u.length?Nd(u,Lt(f,2),lp):V},I.stubArray=Sh,I.stubFalse=Jd,I.stubObject=function vw(){return{}},I.stubString=function Zv(){return""},I.stubTrue=function Qv(){return!0},I.multiply=D1,I.nth=function Tx(u,f){return u&&u.length?CA(u,dn(f)):V},I.noConflict=function E(){return Sr._===this&&(Sr._=Kf),this},I.noop=wo,I.now=Op,I.pad=function a1(u,f,_){u=Fn(u);var w=(f=dn(f))?hr(u):0;if(!f||w>=f)return u;var S=(f-w)/2;return _p(M_(S),_)+u+_p(w_(S),_)},I.padEnd=function UF(u,f,_){u=Fn(u);var w=(f=dn(f))?hr(u):0;return f&&wf){var w=u;u=f,f=w}if(_||u%1||f%1){var S=C_();return Zr(u+S*(f-u+ke("1e-"+((S+"").length-1))),f)}return lh(u,f)},I.reduce=function dD(u,f,_){var w=sn(u)?g_:I0,S=arguments.length<3;return w(u,Lt(f,4),_,S,el)},I.reduceRight=function uD(u,f,_){var w=sn(u)?eA:I0,S=arguments.length<3;return w(u,Lt(f,4),_,S,k_)},I.repeat=function $i(u,f,_){return f=(_?Tr(u,f,_):f===V)?1:dn(f),ch(Fn(u),f)},I.replace=function l1(){var u=arguments,f=Fn(u[0]);return u.length<3?f:f.replace(u[1],u[2])},I.result=function YD(u,f,_){var w=-1,S=(f=wa(f,u)).length;for(S||(S=1,u=V);++wWa)return[];var _=fa,w=Zr(u,fa);f=Lt(f),u-=fa;for(var S=Ks(w,f);++_=P)return u;var Y=_-hr(w);if(Y<1)return w;var Q=H?Ic(H,0,Y).join(""):u.slice(0,Y);if(S===V)return Q+w;if(H&&(Y+=Q.length-Y),Hp(S)){if(u.slice(Y).search(S)){var _e,ye=Q;for(S.global||(S=bc(S.source,Fn(x0.exec(S))+"g")),S.lastIndex=0;_e=S.exec(ye);)var be=_e.index;Q=Q.slice(0,be===V?Y:be)}}else if(u.indexOf(Js(S),Y)!=Y){var Xe=Q.lastIndexOf(S);Xe>-1&&(Q=Q.slice(0,Xe))}return Q+w},I.unescape=function h1(u){return(u=Fn(u))&&OE.test(u)?u.replace(h0,Xf):u},I.uniqueId=function ey(u){var f=++bi;return Fn(u)+f},I.upperCase=fw,I.upperFirst=Zd,I.each=bv,I.eachRight=Vl,I.first=Ax,gw(I,function(){var u={};return ki(I,function(f,_){ii.call(I.prototype,_)||(u[_]=f)}),u}(),{chain:!1}),I.VERSION="4.17.21",Rn(["bind","bindKey","curry","curryRight","partial","partialRight"],function(u){I[u].placeholder=I}),Rn(["drop","take"],function(u,f){kn.prototype[u]=function(_){_=_===V?1:fr(dn(_),0);var w=this.__filtered__&&!f?new kn(this):this.clone();return w.__filtered__?w.__takeCount__=Zr(_,w.__takeCount__):w.__views__.push({size:Zr(_,fa),type:u+(w.__dir__<0?"Right":"")}),w},kn.prototype[u+"Right"]=function(_){return this.reverse()[u](_).reverse()}}),Rn(["filter","map","takeWhile"],function(u,f){var _=f+1,w=1==_||3==_;kn.prototype[u]=function(S){var P=this.clone();return P.__iteratees__.push({iteratee:Lt(S,3),type:_}),P.__filtered__=P.__filtered__||w,P}}),Rn(["head","last"],function(u,f){var _="take"+(f?"Right":"");kn.prototype[u]=function(){return this[_](1).value()[0]}}),Rn(["initial","tail"],function(u,f){var _="drop"+(f?"":"Right");kn.prototype[u]=function(){return this.__filtered__?new kn(this):this[_](1)}}),kn.prototype.compact=function(){return this.filter(is)},kn.prototype.find=function(u){return this.filter(u).head()},kn.prototype.findLast=function(u){return this.reverse().find(u)},kn.prototype.invokeMap=pn(function(u,f){return"function"==typeof u?new kn(this):this.map(function(_){return ya(_,u,f)})}),kn.prototype.reject=function(u){return this.filter(Sv(Lt(u)))},kn.prototype.slice=function(u,f){u=dn(u);var _=this;return _.__filtered__&&(u>0||f<0)?new kn(_):(u<0?_=_.takeRight(-u):u&&(_=_.drop(u)),f!==V&&(_=(f=dn(f))<0?_.dropRight(-f):_.take(f-u)),_)},kn.prototype.takeRightWhile=function(u){return this.reverse().takeWhile(u).reverse()},kn.prototype.toArray=function(){return this.take(fa)},ki(kn.prototype,function(u,f){var _=/^(?:filter|find|map|reject)|While$/.test(f),w=/^(?:head|last)$/.test(f),S=I[w?"take"+("last"==f?"Right":""):f],P=w||/^find/.test(f);S&&(I.prototype[f]=function(){var H=this.__wrapped__,Y=w?[1]:arguments,Q=H instanceof kn,_e=Y[0],ye=Q||sn(H),be=function(An){var Ln=S.apply(I,kl([An],Y));return w&&Xe?Ln[0]:Ln};ye&&_&&"function"==typeof _e&&1!=_e.length&&(Q=ye=!1);var Xe=this.__chain__,Vt=P&&!Xe,mn=Q&&!this.__actions__.length;if(!P&&ye){H=mn?H:new kn(this);var zt=u.apply(H,Y);return zt.__actions__.push({func:Ip,args:[be],thisArg:V}),new Ai(zt,Xe)}return Vt&&mn?u.apply(this,Y):(zt=this.thru(be),Vt?w?zt.value()[0]:zt.value():zt)})}),Rn(["pop","push","shift","sort","splice","unshift"],function(u){var f=sr[u],_=/^(?:push|sort|unshift)$/.test(u)?"tap":"thru",w=/^(?:pop|shift)$/.test(u);I.prototype[u]=function(){var S=arguments;if(w&&!this.__chain__){var P=this.value();return f.apply(sn(P)?P:[],S)}return this[_](function(H){return f.apply(sn(H)?H:[],S)})}}),ki(kn.prototype,function(u,f){var _=I[f];if(_){var w=_.name+"";ii.call(kd,w)||(kd[w]=[]),kd[w].push({name:f,func:_})}}),kd[jd(V,ur).name]=[{name:"wrapper",func:V}],kn.prototype.clone=function B0(){var u=new kn(this.__wrapped__);return u.__actions__=eo(this.__actions__),u.__dir__=this.__dir__,u.__filtered__=this.__filtered__,u.__iteratees__=eo(this.__iteratees__),u.__takeCount__=this.__takeCount__,u.__views__=eo(this.__views__),u},kn.prototype.reverse=function Fd(){if(this.__filtered__){var u=new kn(this);u.__dir__=-1,u.__filtered__=!0}else(u=this.clone()).__dir__*=-1;return u},kn.prototype.value=function ws(){var u=this.__wrapped__.value(),f=this.__dir__,_=sn(u),w=f<0,S=_?u.length:0,P=function xp(u,f,_){for(var w=-1,S=_.length;++w=this.__values__.length;return{done:u,value:u?V:this.__values__[this.__index__++]}},I.prototype.plant=function nD(u){for(var f,_=this;_ instanceof wc;){var w=ns(_);w.__index__=0,w.__values__=V,f?S.__wrapped__=w:f=w;var S=w;_=_.__wrapped__}return S.__wrapped__=u,f},I.prototype.reverse=function iD(){var u=this.__wrapped__;if(u instanceof kn){var f=u;return this.__actions__.length&&(f=new kn(this)),(f=f.reverse()).__actions__.push({func:Ip,args:[dv],thisArg:V}),new Ai(f,this.__chain__)}return this.thru(dv)},I.prototype.toJSON=I.prototype.valueOf=I.prototype.value=function RF(){return xa(this.__wrapped__,this.__actions__)},I.prototype.first=I.prototype.head,ih&&(I.prototype[ih]=function Yd(){return this}),I}();Sr._=ys,(cn=function(){return ys}.call($s,ps,$s,Bo))!==V&&(Bo.exports=cn)}.call(this)},738:function(Bo){var $s;Bo.exports=(($s=function(){function ps(Ci){return Br.appendChild(Ci.dom),Ci}function cn(Ci){for(var Si=0;SiZt+1e3&&(Al.update(1e3*Un/(Ci-Zt),100),Zt=Ci,Un=0,Ws)){var Si=performance.memory;Ws.update(Si.usedJSHeapSize/1048576,Si.jsHeapSizeLimit/1048576)}return Ci},update:function(){Kr=this.end()},domElement:Br,setMode:cn}}).Panel=function(ps,cn,V){var Br=1/0,Kr=0,Zt=Math.round,Un=Zt(window.devicePixelRatio||1),Al=80*Un,Ha=48*Un,Ws=3*Un,Ci=2*Un,Si=3*Un,ms=15*Un,js=74*Un,Ys=30*Un,Uo=document.createElement("canvas");Uo.width=Al,Uo.height=Ha,Uo.style.cssText="width:80px;height:48px";var On=Uo.getContext("2d");return On.font="bold "+9*Un+"px Helvetica,Arial,sans-serif",On.textBaseline="top",On.fillStyle=V,On.fillRect(0,0,Al,Ha),On.fillStyle=cn,On.fillText(ps,Ws,Ci),On.fillRect(Si,ms,js,Ys),On.fillStyle=V,On.globalAlpha=.9,On.fillRect(Si,ms,js,Ys),{dom:Uo,update:function(ur,mc){Br=Math.min(Br,ur),Kr=Math.max(Kr,ur),On.fillStyle=V,On.globalAlpha=1,On.fillRect(0,0,Al,ms),On.fillStyle=cn,On.fillText(Zt(ur)+" "+ps+" ("+Zt(Br)+"-"+Zt(Kr)+")",Ws,Ci),On.drawImage(Uo,Si+Un,ms,js-Un,Ys,Si,ms,js-Un,Ys),On.fillRect(Si+js-Un,ms,Un,Ys),On.fillStyle=V,On.globalAlpha=.9,On.fillRect(Si+js-Un,ms,Un,Zt((1-ur/mc)*Ys))}}},$s)}},Bo=>{Bo(Bo.s=790)}]); \ No newline at end of file diff --git a/frontend/dist/gui/main.bfac01a483b35508.js b/frontend/dist/gui/main.bfac01a483b35508.js new file mode 100644 index 0000000..b64e77b --- /dev/null +++ b/frontend/dist/gui/main.bfac01a483b35508.js @@ -0,0 +1 @@ +(self.webpackChunkgui=self.webpackChunkgui||[]).push([[179],{360:(Bo,Gs,ps)=>{"use strict";function dn(i){return"function"==typeof i}function z(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 Br=z(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 Kr(i,t){if(i){const e=i.indexOf(t);0<=e&&i.splice(e,1)}}class Qt{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(dn(n))try{n()}catch(s){t=s instanceof Br?s.errors:[s]}const{_finalizers:r}=this;if(r){this._finalizers=null;for(const s of r)try{Ga(s)}catch(o){t=t??[],o instanceof Br?t=[...t,...o.errors]:t.push(o)}}if(t)throw new Br(t)}}add(t){var e;if(t&&t!==this)if(this.closed)Ga(t);else{if(t instanceof Qt){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)&&Kr(e,t)}remove(t){const{_finalizers:e}=this;e&&Kr(e,t),t instanceof Qt&&t._removeParent(this)}}Qt.EMPTY=(()=>{const i=new Qt;return i.closed=!0,i})();const Un=Qt.EMPTY;function Dl(i){return i instanceof Qt||i&&"closed"in i&&dn(i.remove)&&dn(i.add)&&dn(i.unsubscribe)}function Ga(i){dn(i)?i():i.unsubscribe()}const Ws={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 Si(i){Ci.setTimeout(()=>{const{onUnhandledError:t}=Ws;if(!t)throw i;t(i)})}function ms(){}const js=On("C",void 0,void 0);function On(i,t,e){return{kind:i,value:t,error:e}}let ur=null;function mc(i){if(Ws.useDeprecatedSynchronousErrorHandling){const t=!ur;if(t&&(ur={errorThrown:!1,error:null}),i(),t){const{errorThrown:e,error:n}=ur;if(ur=null,e)throw n}}else i()}class Tl extends Qt{constructor(t){super(),this.isStopped=!1,t?(this.destination=t,Dl(t)&&t.add(this)):this.destination=wE}static create(t,e,n){return new ha(t,e,n)}next(t){this.isStopped?Xg(function Uo(i){return On("N",i,void 0)}(t),this):this._next(t)}error(t){this.isStopped?Xg(function Ys(i){return On("E",void 0,i)}(t),this):(this.isStopped=!0,this._error(t))}complete(){this.isStopped?Xg(js,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 ua=Function.prototype.bind;function Il(i,t){return ua.call(i,t)}class Wa{constructor(t){this.partialObserver=t}next(t){const{partialObserver:e}=this;if(e.next)try{e.next(t)}catch(n){md(n)}}error(t){const{partialObserver:e}=this;if(e.error)try{e.error(t)}catch(n){md(n)}else md(t)}complete(){const{partialObserver:t}=this;if(t.complete)try{t.complete()}catch(e){md(e)}}}class ha extends Tl{constructor(t,e,n){let r;if(super(),dn(t)||!t)r={next:t??void 0,error:e??void 0,complete:n??void 0};else{let s;this&&Ws.useDeprecatedNextContext?(s=Object.create(t),s.unsubscribe=()=>this.unsubscribe(),r={next:t.next&&Il(t.next,s),error:t.error&&Il(t.error,s),complete:t.complete&&Il(t.complete,s)}):r=t}this.destination=new Wa(r)}}function md(i){Ws.useDeprecatedSynchronousErrorHandling?function da(i){Ws.useDeprecatedSynchronousErrorHandling&&ur&&(ur.errorThrown=!0,ur.error=i)}(i):Si(i)}function Xg(i,t){const{onStoppedNotification:e}=Ws;e&&Ci.setTimeout(()=>e(i,t))}const wE={closed:!0,next:ms,error:function xE(i){throw i},complete:ms},Kg="function"==typeof Symbol&&Symbol.observable||"@@observable";function ja(i){return i}function l0(i){return 0===i.length?ja:1===i.length?i[0]:function(e){return i.reduce((n,r)=>r(n),e)}}let In=(()=>{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 Tl||function CE(i){return i&&dn(i.next)&&dn(i.error)&&dn(i.complete)}(i)&&Dl(i)}(e)?e:new ha(e,n,r);return mc(()=>{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=Ya(n))((r,s)=>{const o=new ha({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)}[Kg](){return this}pipe(...e){return l0(e)(this)}toPromise(e){return new(e=Ya(e))((n,r)=>{let s;this.subscribe(o=>s=o,o=>r(o),()=>n(s))})}}return i.create=t=>new i(t),i})();function Ya(i){var t;return null!==(t=i??Ws.Promise)&&void 0!==t?t:Promise}const fa=z(i=>function(){i(this),this.name="ObjectUnsubscribedError",this.message="object unsubscribed"});let Te=(()=>{class i extends In{constructor(){super(),this.closed=!1,this.currentObservers=null,this.observers=[],this.isStopped=!1,this.hasError=!1,this.thrownError=null}lift(e){const n=new c0(this,this);return n.operator=e,n}_throwIfClosed(){if(this.closed)throw new fa}next(e){mc(()=>{if(this._throwIfClosed(),!this.isStopped){this.currentObservers||(this.currentObservers=Array.from(this.observers));for(const n of this.currentObservers)n.next(e)}})}error(e){mc(()=>{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(){mc(()=>{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?Un:(this.currentObservers=null,s.push(e),new Qt(()=>{this.currentObservers=null,Kr(s,e)}))}_checkFinalizedStatuses(e){const{hasError:n,thrownError:r,isStopped:s}=this;n?e.error(r):s&&e.complete()}asObservable(){const e=new In;return e.source=this,e}}return i.create=(t,e)=>new c0(t,e),i})();class c0 extends Te{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:Un}}function d0(i){return dn(i?.lift)}function ni(i){return t=>{if(d0(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 qn(i,t,e,n,r){return new SE(i,t,e,n,r)}class SE extends Tl{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 tt(i,t){return ni((e,n)=>{let r=0;e.subscribe(qn(n,s=>{n.next(i.call(t,s,r++))}))})}function pa(i){return this instanceof pa?(this.v=i,this):new pa(i)}function Bf(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 Zg(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 i_=i=>i&&"number"==typeof i.length&&"function"!=typeof i;function r_(i){return dn(i?.then)}function m0(i){return dn(i[Kg])}function g0(i){return Symbol.asyncIterator&&dn(i?.[Symbol.asyncIterator])}function _0(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 v0=function s_(){return"function"==typeof Symbol&&Symbol.iterator?Symbol.iterator:"@@iterator"}();function Uf(i){return dn(i?.[v0])}function y0(i){return function Nf(i,t,e){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var r,n=e.apply(i,t||[]),s=[];return r=Object.create(("function"==typeof AsyncIterator?AsyncIterator:Object).prototype),a("next"),a("throw"),a("return",function o(m){return function(g){return Promise.resolve(g).then(m,h)}}),r[Symbol.asyncIterator]=function(){return this},r;function a(m,g){n[m]&&(r[m]=function(b){return new Promise(function(v,y){s.push([m,b,v,y])>1||l(m,b)})},g&&(r[m]=g(r[m])))}function l(m,g){try{!function c(m){m.value instanceof pa?Promise.resolve(m.value.v).then(d,h):p(s[0][2],m)}(n[m](g))}catch(b){p(s[0][3],b)}}function d(m){l("next",m)}function h(m){l("throw",m)}function p(m,g){m(g),s.shift(),s.length&&l(s[0][0],s[0][1])}}(this,arguments,function*(){const e=i.getReader();try{for(;;){const{value:n,done:r}=yield pa(e.read());if(r)return yield pa(void 0);yield yield pa(n)}}finally{e.releaseLock()}})}function b0(i){return dn(i?.getReader)}function Mr(i){if(i instanceof In)return i;if(null!=i){if(m0(i))return function FE(i){return new In(t=>{const e=i[Kg]();if(dn(e.subscribe))return e.subscribe(t);throw new TypeError("Provided object does not correctly implement Symbol.observable")})}(i);if(i_(i))return function LE(i){return new In(t=>{for(let e=0;e{i.then(e=>{t.closed||(t.next(e),t.complete())},e=>t.error(e)).then(null,Si)})}(i);if(g0(i))return x0(i);if(Uf(i))return function BE(i){return new In(t=>{for(const e of i)if(t.next(e),t.closed)return;t.complete()})}(i);if(b0(i))return function w0(i){return x0(y0(i))}(i)}throw _0(i)}function x0(i){return new In(t=>{(function UE(i,t){var e,n,r,s;return function _d(i,t,e,n){return new(e||(e=Promise))(function(s,o){function a(d){try{c(n.next(d))}catch(h){o(h)}}function l(d){try{c(n.throw(d))}catch(h){o(h)}}function c(d){d.done?s(d.value):function r(s){return s instanceof e?s:new e(function(o){o(s)})}(d.value).then(a,l)}c((n=n.apply(i,t||[])).next())})}(this,void 0,void 0,function*(){try{for(e=Bf(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 Xa(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 rr(i,t,e=1/0){return dn(t)?rr((n,r)=>tt((s,o)=>t(n,s,r,o))(Mr(i(n,r))),e):("number"==typeof t&&(e=t),ni((n,r)=>function VE(i,t,e,n,r,s,o,a){const l=[];let c=0,d=0,h=!1;const p=()=>{h&&!l.length&&!c&&t.complete()},m=b=>c{s&&t.next(b),c++;let v=!1;Mr(e(b,d++)).subscribe(qn(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(qn(t,m,()=>{h=!0,p()})),()=>{a?.()}}(n,r,i,e)))}function bd(i=1/0){return rr(ja,i)}const _o=new In(i=>i.complete());function $u(i){return i&&dn(i.schedule)}function a_(i){return i[i.length-1]}function M0(i){return dn(a_(i))?i.pop():void 0}function Gu(i){return $u(a_(i))?i.pop():void 0}function l_(i,t=0){return ni((e,n)=>{e.subscribe(qn(n,r=>Xa(n,i,()=>n.next(r),t),()=>Xa(n,i,()=>n.complete(),t),r=>Xa(n,i,()=>n.error(r),t)))})}function c_(i,t=0){return ni((e,n)=>{n.add(i.schedule(()=>e.subscribe(n),t))})}function d_(i,t){if(!i)throw new Error("Iterable cannot be null");return new In(e=>{Xa(e,t,()=>{const n=i[Symbol.asyncIterator]();Xa(e,t,()=>{n.next().then(r=>{r.done?e.complete():e.next(r.value)})},0,!0)})})}function Ni(i,t){return t?function E0(i,t){if(null!=i){if(m0(i))return function HE(i,t){return Mr(i).pipe(c_(t),l_(t))}(i,t);if(i_(i))return function GE(i,t){return new In(e=>{let n=0;return t.schedule(function(){n===i.length?e.complete():(e.next(i[n++]),e.closed||this.schedule())})})}(i,t);if(r_(i))return function $E(i,t){return Mr(i).pipe(c_(t),l_(t))}(i,t);if(g0(i))return d_(i,t);if(Uf(i))return function WE(i,t){return new In(e=>{let n;return Xa(e,t,()=>{n=i[v0](),Xa(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)}),()=>dn(n?.return)&&n.return()})}(i,t);if(b0(i))return function S0(i,t){return d_(y0(i),t)}(i,t)}throw _0(i)}(i,t):Mr(i)}function Cr(...i){const t=Gu(i),e=function C0(i,t){return"number"==typeof a_(i)?i.pop():t}(i,1/0),n=i;return n.length?1===n.length?Mr(n[0]):bd(e)(Ni(n,t)):_o}function Vf(i={}){const{connector:t=(()=>new Te),resetOnError:e=!0,resetOnComplete:n=!0,resetOnRefCountZero:r=!0}=i;return s=>{let o,a,l,c=0,d=!1,h=!1;const p=()=>{a?.unsubscribe(),a=void 0},m=()=>{p(),o=l=void 0,d=h=!1},g=()=>{const b=o;m(),b?.unsubscribe()};return ni((b,v)=>{c++,!h&&!d&&p();const y=l=l??t();v.add(()=>{c--,0===c&&!h&&!d&&(a=xd(g,r))}),y.subscribe(v),!o&&c>0&&(o=new ha({next:M=>y.next(M),error:M=>{h=!0,p(),a=xd(m,e,M),y.error(M)},complete:()=>{d=!0,p(),a=xd(m,n),y.complete()}}),Mr(b).subscribe(o))})(s)}}function xd(i,t,...e){if(!0===t)return void i();if(!1===t)return;const n=new ha({next:()=>{n.unsubscribe(),i()}});return Mr(t(...e)).subscribe(n)}function ci(i){for(let t in i)if(i[t]===ci)return t;throw Error("Could not find renamed property on target object.")}function u_(i,t){for(const e in t)t.hasOwnProperty(e)&&!i.hasOwnProperty(e)&&(i[e]=t[e])}function mi(i){if("string"==typeof i)return i;if(Array.isArray(i))return"["+i.map(mi).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 zf(i,t){return null==i||""===i?null===t?"":t:null==t||""===t?i:i+" "+t}const h_=ci({__forward_ref__:ci});function Gn(i){return i.__forward_ref__=Gn,i.toString=function(){return mi(this())},i}function Ot(i){return Wu(i)?i():i}function Wu(i){return"function"==typeof i&&i.hasOwnProperty(h_)&&i.__forward_ref__===Gn}function ju(i){return i&&!!i.\u0275providers}const qu="https://g.co/ng/security#xss";class pe extends Error{constructor(t,e){super(Hf(t,e)),this.code=t}}function Hf(i,t){return`NG0${Math.abs(i)}${t?": "+t.trim():""}`}function Jt(i){return"string"==typeof i?i:null==i?"":String(i)}function $f(i,t){throw new pe(-201,!1)}function En(i,t){null==i&&function ii(i,t,e,n){throw new Error(`ASSERTION ERROR: ${i}`+(null==n?"":` [Expected=> ${e} ${n} ${t} <=Actual]`))}(t,i,null,"!=")}function Pe(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 f_(i,wd)||f_(i,m_)}function f_(i,t){return i.hasOwnProperty(t)?i[t]:null}function p_(i){return i&&(i.hasOwnProperty(gs)||i.hasOwnProperty(T0))?i[gs]:null}const wd=ci({\u0275prov:ci}),gs=ci({\u0275inj:ci}),m_=ci({ngInjectableDef:ci}),T0=ci({ngInjectorDef:ci});var Ft=(()=>((Ft=Ft||{})[Ft.Default=0]="Default",Ft[Ft.Host=1]="Host",Ft[Ft.Self=2]="Self",Ft[Ft.SkipSelf=4]="SkipSelf",Ft[Ft.Optional=8]="Optional",Ft))();let Wf;function Xs(i){const t=Wf;return Wf=i,t}function _s(i,t,e){const n=Gf(i);return n&&"root"==n.providedIn?void 0===n.value?n.value=n.factory():n.value:e&Ft.Optional?null:void 0!==t?t:void $f(mi(i))}const Rn=(()=>typeof globalThis<"u"&&globalThis||typeof global<"u"&&global||typeof window<"u"&&window||typeof self<"u"&&typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&self)(),kl={},Ku="__NG_DI_FLAG__",gi="ngTempTokenPath",Pl="ngTokenPath",g_=/\n/gm,JE="\u0275",jf="__source";let Zu;function Md(i){const t=Zu;return Zu=i,t}function eA(i,t=Ft.Default){if(void 0===Zu)throw new pe(-203,!1);return null===Zu?_s(i,void 0,t):Zu.get(i,t&Ft.Optional?null:void 0,t)}function ee(i,t=Ft.Default){return(function I0(){return Wf}()||eA)(Ot(i),t)}function Lt(i,t=Ft.Default){return ee(i,Yf(t))}function Yf(i){return typeof i>"u"||"number"==typeof i?i:0|(i.optional&&8)|(i.host&&1)|(i.self&&2)|(i.skipSelf&&4)}function qf(i){const t=[];for(let e=0;e((vo=vo||{})[vo.OnPush=0]="OnPush",vo[vo.Default=1]="Default",vo))(),Ks=(()=>{return(i=Ks||(Ks={}))[i.Emulated=0]="Emulated",i[i.None=2]="None",i[i.ShadowDom=3]="ShadowDom",Ks;var i})();const Za={},Wn=[],Ur=ci({\u0275cmp:ci}),Ju=ci({\u0275dir:ci}),yc=ci({\u0275pipe:ci}),y_=ci({\u0275mod:ci}),ma=ci({\u0275fac:ci}),eh=ci({__NG_ELEMENT_ID__:ci});let tA=0;function ot(i){return Ka(()=>{const t=yo(i),e={...t,decls:i.decls,vars:i.vars,template:i.template,consts:i.consts||null,ngContentSelectors:i.ngContentSelectors,onPush:i.changeDetection===vo.OnPush,directiveDefs:null,pipeDefs:null,dependencies:t.standalone&&i.dependencies||null,getStandaloneInjector:null,data:i.data||{},encapsulation:i.encapsulation||Ks.Emulated,id:"c"+tA++,styles:i.styles||Wn,_:null,schemas:i.schemas||null,tView:null};b_(e);const n=i.dependencies;return e.directiveDefs=Kf(n,!1),e.pipeDefs=Kf(n,!0),e})}function th(i,t,e){const n=i.\u0275cmp;n.directiveDefs=Kf(t,!1),n.pipeDefs=Kf(e,!0)}function nA(i){return Hn(i)||Vr(i)}function Sd(i){return null!==i}function en(i){return Ka(()=>({type:i.type,bootstrap:i.bootstrap||Wn,declarations:i.declarations||Wn,imports:i.imports||Wn,exports:i.exports||Wn,transitiveCompileScopes:null,schemas:i.schemas||null,id:i.id||null}))}function Xf(i,t){if(null==i)return Za;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 ve(i){return Ka(()=>{const t=yo(i);return b_(t),t})}function $i(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 Hn(i){return i[Ur]||null}function Vr(i){return i[Ju]||null}function vs(i){return i[yc]||null}function hr(i,t){const e=i[y_]||null;if(!e&&!0===t)throw new Error(`Type ${mi(i)} does not have '\u0275mod' property.`);return e}function yo(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||Wn,viewQuery:i.viewQuery||null,features:i.features||null,setInput:null,findHostDirectiveDefs:null,hostDirectives:null,inputs:Xf(i.inputs,t),outputs:Xf(i.outputs)}}function b_(i){i.features?.forEach(t=>t(i))}function Kf(i,t){if(!i)return null;const e=t?vs:nA;return()=>("function"==typeof i?i():i).map(n=>e(n)).filter(Sd)}const Qa=0,lt=1,fn=2,Bi=3,ys=4,X=5,he=6,ae=7,ze=8,jt=9,Vn=10,xt=11,ai=12,bc=13,k0=14,Er=15,sr=16,nh=17,Ho=18,Zs=19,Ol=20,ri=21,bi=22,Ad=1,P0=2,Zf=7,Qf=8,Ja=9,Ui=10;function bs(i){return Array.isArray(i)&&"object"==typeof i[Ad]}function xs(i){return Array.isArray(i)&&!0===i[Ad]}function Jf(i){return 0!=(4&i.flags)}function Dd(i){return i.componentOffset>-1}function xc(i){return 1==(1&i.flags)}function bo(i){return!!i.template}function ih(i){return 0!=(256&i[fn])}function el(i,t){return i.hasOwnProperty(ma)?i[ma]:null}class Id{constructor(t,e,n){this.previousValue=t,this.currentValue=e,this.firstChange=n}isFirstChange(){return this.firstChange}}function xi(){return Rd}function Rd(i){return i.type.prototype.ngOnChanges&&(i.setInput=kd),np}function np(){const i=B0(this),t=i?.current;if(t){const e=i.previous;if(e===Za)i.previous=t;else for(let n in t)e[n]=t[n];i.current=null,this.ngOnChanges(t)}}function kd(i,t,e,n){const r=this.declaredInputs[e],s=B0(i)||function aA(i,t){return i[N0]=t}(i,{previous:Za,current:null}),o=s.current||(s.current={}),a=s.previous,l=a[r];o[r]=new Id(l&&l.currentValue,t,a===Za),i[n]=t}xi.ngInherit=!0;const N0="__ngSimpleChanges__";function B0(i){return i[N0]||null}const Qr=function(i,t,e){},Pd="svg";function I(i){for(;Array.isArray(i);)i=i[Qa];return i}function wc(i,t){return I(t[i])}function Ai(i,t){return I(t[i.index])}function U0(i,t){return i.data[t]}function Fd(i,t){return i[t]}function ws(i,t){const e=t[i];return bs(e)?e:e[Qa]}function ip(i){return 64==(64&i[fn])}function Fl(i,t){return null==t?null:i[t]}function V0(i){i[Ho]=0}function A_(i,t){i[X]+=t;let e=i,n=i[Bi];for(;null!==n&&(1===t&&1===e[X]||-1===t&&0===e[X]);)n[X]+=t,e=n,n=n[Bi]}const Pt={lFrame:nl(null),bindingsEnabled:!0};function ga(){return Pt.bindingsEnabled}function Se(){return Pt.lFrame.lView}function zn(){return Pt.lFrame.tView}function Vt(i){return Pt.lFrame.contextLView=i,i[ze]}function Et(i){return Pt.lFrame.contextLView=null,i}function Ar(){let i=H0();for(;null!==i&&64===i.type;)i=i.parent;return i}function H0(){return Pt.lFrame.currentTNode}function _a(i,t){const e=Pt.lFrame;e.currentTNode=i,e.isParent=t}function D_(){return Pt.lFrame.isParent}function T_(){Pt.lFrame.isParent=!1}function zr(){const i=Pt.lFrame;let t=i.bindingRootIndex;return-1===t&&(t=i.bindingRootIndex=i.tView.bindingStartIndex),t}function Ll(){return Pt.lFrame.bindingIndex++}function Qs(i){const t=Pt.lFrame,e=t.bindingIndex;return t.bindingIndex=t.bindingIndex+i,e}function W0(i,t){const e=Pt.lFrame;e.bindingIndex=e.bindingRootIndex=i,$o(t)}function $o(i){Pt.lFrame.currentDirectiveIndex=i}function rh(i){const t=Pt.lFrame.currentDirectiveIndex;return-1===t?null:i[t]}function Nl(){return Pt.lFrame.currentQueryIndex}function Ms(i){Pt.lFrame.currentQueryIndex=i}function _A(i){const t=i[lt];return 2===t.type?t.declTNode:1===t.type?i[he]:null}function R_(i,t,e){if(e&Ft.SkipSelf){let r=t,s=i;for(;!(r=r.parent,null!==r||e&Ft.Host||(r=_A(s),null===r||(s=s[Er],10&r.type))););if(null===r)return!1;t=r,i=s}const n=Pt.lFrame=Ld();return n.currentTNode=t,n.lView=i,!0}function sp(i){const t=Ld(),e=i[lt];Pt.lFrame=t,t.currentTNode=e.firstChild,t.lView=i,t.tView=e,t.contextLView=i,t.bindingIndex=e.bindingStartIndex,t.inI18n=!1}function Ld(){const i=Pt.lFrame,t=null===i?null:i.child;return null===t?nl(i):t}function nl(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 k_(){const i=Pt.lFrame;return Pt.lFrame=i.parent,i.currentTNode=null,i.lView=null,i}const j0=k_;function Nd(){const i=k_();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 Kn(){return Pt.lFrame.selectedIndex}function il(i){Pt.lFrame.selectedIndex=i}function Di(){const i=Pt.lFrame;return U0(i.tView,i.selectedIndex)}function ki(){Pt.lFrame.currentNamespace=Pd}function va(){!function Cc(){Pt.lFrame.currentNamespace=null}()}function Bd(i,t){for(let e=t.directiveStart,n=t.directiveEnd;e=n)break}else t[l]<0&&(i[Ho]+=65536),(a>11>16&&(3&i[fn])===t){i[fn]+=2048,Qr(4,a,s);try{s.call(a)}finally{Qr(5,a,s)}}}else{Qr(4,a,s);try{s.call(a)}finally{Qr(5,a,s)}}}const ya=-1;class Ud{constructor(t,e,n){this.factory=t,this.resolving=!1,this.canSeeViewProviders=e,this.injectImpl=n}}function L_(i,t,e){let n=0;for(;nt){o=s-1;break}}}for(;s>16}(i),n=t;for(;e>0;)n=n[Er],e--;return n}let Vd=!0;function dp(i){const t=Vd;return Vd=i,t}const B_=255,Q0=5;let J0=0;const ba={};function ah(i,t){const e=ex(i,t);if(-1!==e)return e;const n=t[lt];n.firstCreatePass&&(i.injectorIndex=t.length,lh(n.data,i),lh(t,null),lh(n.blueprint,null));const r=ch(i,t),s=i.injectorIndex;if(cp(r)){const o=sh(r),a=oh(r,t),l=a[lt].data;for(let c=0;c<8;c++)t[s+c]=a[o+c]|l[o+c]}return t[s+8]=r,s}function lh(i,t){i.push(0,0,0,0,0,0,0,0,t)}function ex(i,t){return-1===i.injectorIndex||i.parent&&i.parent.injectorIndex===i.injectorIndex||null===t[i.injectorIndex+8]?-1:i.injectorIndex}function ch(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=uh(r),null===n)return ya;if(e++,r=r[Er],-1!==n.injectorIndex)return n.injectorIndex|e<<16}return ya}function pn(i,t,e){!function U_(i,t,e){let n;"string"==typeof e?n=e.charCodeAt(0)||0:e.hasOwnProperty(eh)&&(n=e[eh]),null==n&&(n=e[eh]=J0++);const r=n&B_;t.data[i+(r>>Q0)]|=1<=0?t&B_:Js:t}(e);if("function"==typeof s){if(!R_(t,i,n))return n&Ft.Host?tx(r,0,n):zd(t,e,n,r);try{const o=s(n);if(null!=o||n&Ft.Optional)return o;$f()}finally{j0()}}else if("number"==typeof s){let o=null,a=ex(i,t),l=ya,c=n&Ft.Host?t[sr][he]:null;for((-1===a||n&Ft.SkipSelf)&&(l=-1===a?ch(i,t):t[a+8],l!==ya&&z_(n,!1)?(o=t[lt],a=sh(l),t=oh(l,t)):a=-1);-1!==a;){const d=t[lt];if(hp(s,a,d.data)){const h=SA(a,t,e,o,n,c);if(h!==ba)return h}l=t[a+8],l!==ya&&z_(n,t[lt].data[a+8]===c)&&hp(s,a,t)?(o=d,a=sh(l),t=oh(l,t)):a=-1}}return r}function SA(i,t,e,n,r,s){const o=t[lt],a=o.data[i+8],d=ts(a,o,e,null==n?Dd(a)&&Vd:n!=o&&0!=(3&a.type),r&Ft.Host&&s===a);return null!==d?Ac(t,o,d,a):ba}function ts(i,t,e,n,r){const s=i.providerIndexes,o=t.data,a=1048575&s,l=i.directiveStart,d=s>>20,p=r?a+d:i.directiveEnd;for(let m=n?a:a+d;m=l&&g.type===e)return m}if(r){const m=o[l];if(m&&bo(m)&&m.type===e)return l}return null}function Ac(i,t,e,n){let r=i[e];const s=t.data;if(function bA(i){return i instanceof Ud}(r)){const o=r;o.resolving&&function A0(i,t){const e=t?`. Dependency path: ${t.join(" > ")} > ${i}`:"";throw new pe(-200,`Circular dependency in DI detected for ${i}${e}`)}(function Xn(i){return"function"==typeof i?i.name||i.toString():"object"==typeof i&&null!=i&&"function"==typeof i.type?i.type.name||i.type.toString():Jt(i)}(s[e]));const a=dp(o.canSeeViewProviders);o.resolving=!0;const l=o.injectImpl?Xs(o.injectImpl):null;R_(i,n,Ft.Default);try{r=i[e]=o.factory(void 0,s,i,n),t.firstCreatePass&&e>=n.directiveStart&&function es(i,t,e){const{ngOnChanges:n,ngOnInit:r,ngDoCheck:s}=t.type.prototype;if(n){const o=Rd(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&&Xs(l),dp(a),o.resolving=!1,j0()}}return r}function hp(i,t,e){return!!(e[t+(i>>Q0)]&1<{const t=i.prototype.constructor,e=t[ma]||dh(t),n=Object.prototype;let r=Object.getPrototypeOf(i.prototype).constructor;for(;r&&r!==n;){const s=r[ma]||dh(r);if(s&&s!==e)return s;r=Object.getPrototypeOf(r)}return s=>new s})}function dh(i){return Wu(i)?()=>{const t=dh(Ot(i));return t&&t()}:el(i)}function uh(i){const t=i[lt],e=t.type;return 2===e?t.declTNode:1===e?i[he]:null}function xa(i){return function CA(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 wa(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,d){const h=l.hasOwnProperty(Tc)?l[Tc]:Object.defineProperty(l,Tc,{value:[]})[Tc];for(;h.length<=d;)h.push(null);return(h[d]=h[d]||[]).push(o),l}}return e&&(r.prototype=Object.create(e.prototype)),r.prototype.ngMetadataName=i,r.annotationCls=r,r})}class me{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=Pe({token:this,providedIn:e.providedIn||"root",factory:e.factory}))}get multi(){return this}toString(){return`InjectionToken ${this._desc}`}}function Vl(i,t){i.forEach(e=>Array.isArray(e)?Vl(e,t):t(e))}function $_(i,t,e){t>=i.length?i.push(e):i.splice(t,0,e)}function mp(i,t){return t>=i.length-1?i.pop():i.splice(t,1)[0]}function Gd(i,t){const e=[];for(let n=0;n=0?i[1|n]=e:(n=~n,function TA(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 jd(i,t){const e=Rc(i,t);if(e>=0)return i[1|e]}function Rc(i,t){return function _p(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),Ss=Cd(Hd("Optional"),8),Ma=Cd(Hd("SkipSelf"),4);var Es=(()=>((Es=Es||{})[Es.Important=1]="Important",Es[Es.DashCase=2]="DashCase",Es))();const Sp=new Map;let yx=0;const iv="__ngContext__";function $r(i,t){bs(t)?(i[iv]=t[Ol],function bx(i){Sp.set(i[Ol],i)}(t)):i[iv]=t}let sv;function ov(i,t){return sv(i,t)}function vh(i){const t=i[Bi];return xs(t)?t[Bi]:t}function av(i){return Tx(i[bc])}function lv(i){return Tx(i[ys])}function Tx(i){for(;null!==i&&!xs(i);)i=i[ys];return i}function Ir(i,t,e,n,r){if(null!=n){let s,o=!1;xs(n)?s=n:bs(n)&&(o=!0,n=n[Qa]);const a=I(n);0===i&&null!==e?null==r?Fx(t,e,a):Oc(t,e,a,r||null,!0):1===i&&null!==e?Oc(t,e,a,r||null,!0):2===i?function mv(i,t,e){const n=Dp(i,t);n&&function ZA(i,t,e,n){i.removeChild(t,e,n)}(i,n,t,e)}(t,a,o):3===i&&t.destroyNode(a),null!=s&&function Hx(i,t,e,n,r){const s=e[Zf];s!==I(e)&&Ir(t,i,n,s,r);for(let a=Ui;a0&&(i[e-1][ys]=n[ys]);const s=mp(i,Ui+t);!function GA(i,t){bh(i,t,t[xt],2,null,null),t[Qa]=null,t[he]=null}(n[lt],n);const o=s[Zs];null!==o&&o.detachView(s[lt]),n[Bi]=null,n[ys]=null,n[fn]&=-65}return n}function kx(i,t){if(!(128&t[fn])){const e=t[xt];e.destroyNode&&bh(i,t,e,3,null,null),function YA(i){let t=i[bc];if(!t)return hv(i[lt],i);for(;t;){let e=null;if(bs(t))e=t[bc];else{const n=t[Ui];n&&(e=n)}if(!e){for(;t&&!t[ys]&&t!==i;)bs(t)&&hv(t[lt],t),t=t[Bi];null===t&&(t=i),bs(t)&&hv(t[lt],t),e=t&&t[ys]}t=e}}(t)}}function hv(i,t){if(!(128&t[fn])){t[fn]&=-65,t[fn]|=128,function KA(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===Ks.None||s===Ks.Emulated)return null}return Ai(n,e)}}(i,t.parent,e)}function Oc(i,t,e,n,r){i.insertBefore(t,e,n,r)}function Fx(i,t,e){i.appendChild(t,e)}function Lx(i,t,e,n,r){null!==n?Oc(i,t,e,n,r):Fx(i,t,e)}function Dp(i,t){return i.parentNode(t)}function Nx(i,t,e){return Ux(i,t,e)}let fv,kp,vv,Ux=function Bx(i,t,e){return 40&i.type?Ai(i,e):null};function yh(i,t,e,n){const r=Px(i,n,t),s=t[xt],a=Nx(n.parent||t[he],n,t);if(null!=r)if(Array.isArray(e))for(let l=0;li,createScript:i=>i,createScriptURL:i=>i})}catch{}return kp}()?.createHTML(i)||i}class zl{constructor(t){this.changingThisBreaksApplicationSecurity=t}toString(){return`SafeValue must use [property]=binding: ${this.changingThisBreaksApplicationSecurity} (see ${qu})`}}class o1 extends zl{getTypeName(){return"HTML"}}class a1 extends zl{getTypeName(){return"Style"}}class l1 extends zl{getTypeName(){return"Script"}}class c1 extends zl{getTypeName(){return"URL"}}class Op extends zl{getTypeName(){return"ResourceURL"}}function to(i){return i instanceof zl?i.changingThisBreaksApplicationSecurity:i}function Sa(i,t){const e=function d1(i){return i instanceof zl&&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 ${qu})`)}return e===t}class g1{constructor(t){this.inertDocumentHelper=t}getInertBodyElement(t){t=""+t;try{const e=(new window.DOMParser).parseFromString(Yd(t),"text/html").body;return null===e?this.inertDocumentHelper.getInertBodyElement(t):(e.removeChild(e.firstChild),e)}catch{return null}}}class _1{constructor(t){this.defaultDoc=t,this.inertDocument=this.defaultDoc.implementation.createHTMLDocument("sanitization-inert")}getInertBodyElement(t){const e=this.inertDocument.createElement("template");return e.innerHTML=Yd(t),e}}const v1=/^(?!javascript:)(?:[a-z0-9+.-]+:|[^&:\/?#]*(?:[\/?#]|$))/i;function xh(i){return(i=String(i)).match(v1)?i:"unsafe:"+i}function Ea(i){const t={};for(const e of i.split(","))t[e]=!0;return t}function Fc(...i){const t={};for(const e of i)for(const n in e)e.hasOwnProperty(n)&&(t[n]=!0);return t}const xv=Ea("area,br,col,hr,img,wbr"),wv=Ea("colgroup,dd,dt,li,p,tbody,td,tfoot,th,thead,tr"),Mv=Ea("rp,rt"),Cv=Fc(xv,Fc(wv,Ea("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")),Fc(Mv,Ea("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")),Fc(Mv,wv)),qd=Ea("background,cite,href,itemtype,longdesc,poster,src,xlink:href"),Xx=Fc(qd,Ea("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"),Ea("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")),Ev=Ea("script,style,template");class Kx{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(!Cv.hasOwnProperty(e))return this.sanitizedSomething=!0,!Ev.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();Cv.hasOwnProperty(e)&&!xv.hasOwnProperty(e)&&(this.buf.push(""))}chars(t){this.buf.push(Zx(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 b1=/[\uD800-\uDBFF][\uDC00-\uDFFF]/g,x1=/([^\#-~ |!])/g;function Zx(i){return i.replace(/&/g,"&").replace(b1,function(t){return"&#"+(1024*(t.charCodeAt(0)-55296)+(t.charCodeAt(1)-56320)+65536)+";"}).replace(x1,function(t){return"&#"+t.charCodeAt(0)+";"}).replace(//g,">")}let Lp;function Qx(i,t){let e=null;try{Lp=Lp||function qx(i){const t=new _1(i);return function Fp(){try{return!!(new window.DOMParser).parseFromString(Yd(""),"text/html")}catch{return!1}}()?new g1(t):t}(i);let n=t?String(t):"";e=Lp.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=Lp.getInertBodyElement(n)}while(n!==s);return Yd((new Kx).sanitizeChildren(Av(e)||e))}finally{if(e){const n=Av(e)||e;for(;n.firstChild;)n.removeChild(n.firstChild)}}}function Av(i){return"content"in i&&function w1(i){return i.nodeType===Node.ELEMENT_NODE&&"TEMPLATE"===i.nodeName}(i)?i.content:null}var Zn=(()=>((Zn=Zn||{})[Zn.NONE=0]="NONE",Zn[Zn.HTML=1]="HTML",Zn[Zn.STYLE=2]="STYLE",Zn[Zn.SCRIPT=3]="SCRIPT",Zn[Zn.URL=4]="URL",Zn[Zn.RESOURCE_URL=5]="RESOURCE_URL",Zn))();function Np(i){const t=function wi(){const i=Se();return i&&i[ai]}();return t?t.sanitize(Zn.URL,i)||"":Sa(i,"URL")?to(i):xh(Jt(i))}const Bp=new me("ENVIRONMENT_INITIALIZER"),ol=new me("INJECTOR",-1),ew=new me("INJECTOR_DEF_TYPES");class tw{get(t,e=kl){if(e===kl){const n=new Error(`NullInjectorError: No provider for ${mi(t)}!`);throw n.name="NullInjectorError",n}return e}}function A1(...i){return{\u0275providers:nw(0,i),\u0275fromNgModule:!0}}function nw(i,...t){const e=[],n=new Set;let r;return Vl(t,s=>{const o=s;Dv(o,e,[],n)&&(r||(r=[]),r.push(o))}),void 0!==r&&Up(r,e),e}function Up(i,t){for(let e=0;e{t.push(s)})}}function Dv(i,t,e,n){if(!(i=Ot(i)))return!1;let r=null,s=p_(i);const o=!s&&Hn(i);if(s||o){if(o&&!o.standalone)return!1;r=i}else{const l=i.ngModule;if(s=p_(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)Dv(c,t,e,n)}}else{if(!s)return!1;{if(null!=s.imports&&!a){let c;n.add(r);try{Vl(s.imports,d=>{Dv(d,t,e,n)&&(c||(c=[]),c.push(d))})}finally{}void 0!==c&&Up(c,t)}if(!a){const c=el(r)||(()=>new r);t.push({provide:r,useFactory:c,deps:Wn},{provide:ew,useValue:r,multi:!0},{provide:Bp,useValue:()=>ee(r),multi:!0})}const l=s.providers;null==l||a||Vp(l,d=>{t.push(d)})}}return r!==i&&void 0!==i.providers}function Vp(i,t){for(let e of i)ju(e)&&(e=e.\u0275providers),Array.isArray(e)?Vp(e,t):t(e)}const zp=ci({provide:String,useValue:ci});function Mi(i){return null!==i&&"object"==typeof i&&zp in i}function Nc(i){return"function"==typeof i}const Iv=new me("Set Injector scope."),Hp={},T1={};let Rv;function wh(){return void 0===Rv&&(Rv=new tw),Rv}class io{}class $p extends io{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,Pv(t,o=>this.processProvider(o)),this.records.set(ol,jo(void 0,this)),r.has("environment")&&this.records.set(io,jo(void 0,this));const s=this.records.get(Iv);null!=s&&"string"==typeof s.value&&this.scopes.add(s.value),this.injectorDefTypes=new Set(this.get(ew.multi,Wn,Ft.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=Md(this),n=Xs(void 0);try{return t()}finally{Md(e),Xs(n)}}get(t,e=kl,n=Ft.Default){this.assertNotDestroyed(),n=Yf(n);const r=Md(this),s=Xs(void 0);try{if(!(n&Ft.SkipSelf)){let a=this.records.get(t);if(void 0===a){const l=function k1(i){return"function"==typeof i||"object"==typeof i&&i instanceof me}(t)&&Gf(t);a=l&&this.injectableDefInScope(l)?jo(kv(t),Hp):null,this.records.set(t,a)}if(null!=a)return this.hydrate(t,a)}return(n&Ft.Self?wh():this.parent).get(t,e=n&Ft.Optional&&e===kl?null:e)}catch(o){if("NullInjectorError"===o.name){if((o[gi]=o[gi]||[]).unshift(mi(t)),r)throw o;return function v_(i,t,e,n){const r=i[gi];throw t[jf]&&r.unshift(t[jf]),i.message=function R0(i,t,e,n=null){i=i&&"\n"===i.charAt(0)&&i.charAt(1)==JE?i.slice(2):i;let r=mi(t);if(Array.isArray(t))r=t.map(mi).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):mi(a)))}r=`{${s.join(", ")}}`}return`${e}${n?"("+n+")":""}[${r}]: ${i.replace(g_,"\n ")}`}("\n"+i.message,r,e,n),i[Pl]=r,i[gi]=null,i}(o,t,"R3InjectorError",this.source)}throw o}finally{Xs(s),Md(r)}}resolveInjectorInitializers(){const t=Md(this),e=Xs(void 0);try{const n=this.get(Bp.multi,Wn,Ft.Self);for(const r of n)r()}finally{Md(t),Xs(e)}}toString(){const t=[],e=this.records;for(const n of e.keys())t.push(mi(n));return`R3Injector[${t.join(", ")}]`}assertNotDestroyed(){if(this._destroyed)throw new pe(205,!1)}processProvider(t){let e=Nc(t=Ot(t))?t:Ot(t&&t.provide);const n=function Gp(i){return Mi(i)?jo(void 0,i.useValue):jo(As(i),Hp)}(t);if(Nc(t)||!0!==t.multi)this.records.get(e);else{let r=this.records.get(e);r||(r=jo(void 0,Hp,!0),r.factory=()=>qf(r.multi),this.records.set(e,r)),e=t,r.multi.push(t)}this.records.set(e,n)}hydrate(t,e){return e.value===Hp&&(e.value=T1,e.value=e.factory()),"object"==typeof e.value&&e.value&&function R1(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=Ot(t.providedIn);return"string"==typeof e?"any"===e||this.scopes.has(e):this.injectorDefTypes.has(e)}}function kv(i){const t=Gf(i),e=null!==t?t.factory:el(i);if(null!==e)return e;if(i instanceof me)throw new pe(204,!1);if(i instanceof Function)return function iw(i){const t=i.length;if(t>0)throw Gd(t,"?"),new pe(204,!1);const e=function Xu(i){return i&&(i[wd]||i[m_])||null}(i);return null!==e?()=>e.factory(i):()=>new i}(i);throw new pe(204,!1)}function As(i,t,e){let n;if(Nc(i)){const r=Ot(i);return el(r)||kv(r)}if(Mi(i))n=()=>Ot(i.useValue);else if(function Tv(i){return!(!i||!i.useFactory)}(i))n=()=>i.useFactory(...qf(i.deps||[]));else if(function Pi(i){return!(!i||!i.useExisting)}(i))n=()=>ee(Ot(i.useExisting));else{const r=Ot(i&&(i.useClass||i.provide));if(!function I1(i){return!!i.deps}(i))return el(r)||kv(r);n=()=>new r(...qf(i.deps))}return n}function jo(i,t,e=!1){return{factory:i,value:t,multi:e?[]:void 0}}function Pv(i,t){for(const e of i)Array.isArray(e)?Pv(e,t):e&&ju(e)?Pv(e.\u0275providers,t):t(e)}class P1{}class Ov{}class Mo{resolveComponentFactory(t){throw function al(i){const t=Error(`No component factory found for ${mi(i)}. Did you add it to @NgModule.entryComponents?`);return t.ngComponent=i,t}(t)}}let $l=(()=>{class i{}return i.NULL=new Mo,i})();function F1(){return Fn(Ar(),Se())}function Fn(i,t){return new vt(Ai(i,t))}let vt=(()=>{class i{constructor(e){this.nativeElement=e}}return i.__NG_ELEMENT_ID__=F1,i})();function rw(i){return i instanceof vt?i.nativeElement:i}class Gl{}let ll=(()=>{class i{}return i.__NG_ELEMENT_ID__=()=>function L1(){const i=Se(),e=ws(Ar().index,i);return(bs(e)?e:i)[xt]}(),i})(),N1=(()=>{class i{}return i.\u0275prov=Pe({token:i,providedIn:"root",factory:()=>null}),i})();class Bc{constructor(t){this.full=t,this.major=t.split(".")[0],this.minor=t.split(".")[1],this.patch=t.split(".").slice(2).join(".")}}const B1=new Bc("15.2.10"),Fv={},Lv="ngOriginalError";function Nv(i){return i[Lv]}class cl{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&&Nv(t);for(;e&&Nv(e);)e=Nv(e);return e||null}}function dl(i){return i instanceof Function?i():i}function ow(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 aw="ng-template";function j1(i,t,e){let n=0,r=!0;for(;ns?"":r[h+1].toLowerCase();const m=8&n?p:null;if(m&&-1!==ow(m,c,0)||2&n&&c!==p){if(Yo(n))return!1;o=!0}}}}else{if(!o&&!Yo(n)&&!Yo(l))return!1;if(o&&Yo(l))continue;o=!1,n=l|1&n}}return Yo(n)||o}function Yo(i){return 0==(1&i)}function lw(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&&!Yo(o)&&(t+=Uc(s,r),r=""),n=o,s=s||!Yo(n);e++}return""!==r&&(t+=Uc(s,r)),t}const on={};function V(i){Hv(zn(),Se(),Kn()+i,!1)}function Hv(i,t,e,n){if(!n)if(3==(3&t[fn])){const s=i.preOrderCheckHooks;null!==s&&op(t,s,e)}else{const s=i.preOrderHooks;null!==s&&ap(t,s,0,e)}il(e)}function uw(i,t=null,e=null,n){const r=hw(i,t,e,n);return r.resolveInjectorInitializers(),r}function hw(i,t=null,e=null,n,r=new Set){const s=[e||Wn,A1(i)];return n=n||("object"==typeof i?void 0:mi(i)),new $p(s,t||wh(),n||null,r)}let Gi=(()=>{class i{static create(e,n){if(Array.isArray(e))return uw({name:""},n,e,"");{const r=e.name??"";return uw({name:r},e.parent,e.providers,r)}}}return i.THROW_IF_NOT_FOUND=kl,i.NULL=new tw,i.\u0275prov=Pe({token:i,providedIn:"any",factory:()=>ee(ol)}),i.__NG_ELEMENT_ID__=-1,i})();function E(i,t=Ft.Default){const e=Se();return null===e?ee(i,t):V_(Ar(),e,Ot(i),t)}function Co(){throw new Error("invalid")}function vw(i,t){const e=i.contentQueries;if(null!==e)for(let n=0;nbi&&Hv(i,t,bi,!1),Qr(o?2:0,r),e(n,r)}finally{il(s),Qr(o?3:1,r)}}function Zv(i,t,e){if(Jf(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,Ch(i,e,r.hostVars,on),r)}function be(i,t,e,n,r,s){const o=Ai(i,t);!function Xe(i,t,e,n,r,s,o){if(null==s)i.removeAttribute(t,r,e);else{const a=null==o?Jt(s):o(s,n||"",r);i.setAttribute(t,r,a,e)}}(t[xt],o,s,i.value,e,n,r)}function bt(i,t,e,n,r,s){const o=s[t];if(null!==o){const a=n.setInput;for(let l=0;l0&&rs(e)}}function rs(i){for(let n=av(i);null!==n;n=lv(n))for(let r=Ui;r0&&rs(s)}const e=i[lt].components;if(null!==e)for(let n=0;n0&&rs(r)}}function ss(i,t){const e=ws(t,i),n=e[lt];(function so(i,t){for(let e=t.length;e-1&&(uv(t,n),mp(e,n))}this._attachedToViewContainer=!1}kx(this._lView[lt],this._lView)}onDestroy(t){xw(this._lView[lt],this._lView,null,t)}markForCheck(){Ts(this._cdRefInjectingView||this._lView)}detach(){this._lView[fn]&=-65}reattach(){this._lView[fn]|=64}detectChanges(){So(this._lView[lt],this._lView,this.context)}checkNoChanges(){}attachToViewContainerRef(){if(this._appRef)throw new pe(902,!1);this._attachedToViewContainer=!0}detachFromAppRef(){this._appRef=null,function jA(i,t){bh(i,t,t[xt],2,null,null)}(this._lView[lt],this._lView)}attachToAppRef(t){if(this._attachedToViewContainer)throw new pe(902,!1);this._appRef=t}}class b8 extends ny{constructor(t){super(t),this._view=t}detectChanges(){const t=this._view;So(t[lt],t,t[ze],!1)}checkNoChanges(){}get context(){return null}}class ZF extends $l{constructor(t){super(),this.ngModule=t}resolveComponentFactory(t){const e=Hn(t);return new iy(e,this.ngModule)}}function QF(i){const t=[];for(let e in i)i.hasOwnProperty(e)&&t.push({propName:i[e],templateName:e});return t}class w8{constructor(t,e){this.injector=t,this.parentInjector=e}get(t,e,n){n=Yf(n);const r=this.injector.get(t,Fv,n);return r!==Fv||e===Fv?r:this.parentInjector.get(t,e,n)}}class iy extends Ov{get inputs(){return QF(this.componentDef.inputs)}get outputs(){return QF(this.componentDef.outputs)}constructor(t,e){super(),this.componentDef=t,this.ngModule=e,this.componentType=t.type,this.selector=function eD(i){return i.map(J1).join(",")}(t.selectors),this.ngContentSelectors=t.ngContentSelectors?t.ngContentSelectors:[],this.isBoundToModule=!!e}create(t,e,n,r){let s=(r=r||this.ngModule)instanceof io?r:r?.injector;s&&null!==this.componentDef.getStandaloneInjector&&(s=this.componentDef.getStandaloneInjector(s)||s);const o=s?new w8(t,s):t,a=o.get(Gl,null);if(null===a)throw new pe(407,!1);const l=o.get(N1,null),c=a.createRenderer(null,this.componentDef),d=this.componentDef.selectors[0][0]||"div",h=n?function wD(i,t,e){return i.selectRootElement(t,e===Ks.ShadowDom)}(c,n,this.componentDef.encapsulation):Ap(c,d,function x8(i){const t=i.toLowerCase();return"svg"===t?Pd:"math"===t?"math":null}(d)),p=this.componentDef.onPush?288:272,m=ey(0,null,null,1,0,null,null,null,null,null),g=Mh(null,m,null,p,null,null,a,c,l,o,null);let b,v;sp(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 C8(i,t){const e=i[lt],n=bi;return i[n]=t,Qd(e,n,2,"#host",null)}(g,h),F=function S8(i,t,e,n,r,s,o,a){const l=r[lt];!function E8(i,t,e,n){for(const r of i)t.mergedAttrs=Ec(t.mergedAttrs,r.hostAttrs);null!==t.mergedAttrs&&(Sw(t,t.mergedAttrs,!0),null!==e&&Gx(n,e,t))}(n,i,t,o);const c=s.createRenderer(t,e),d=Mh(r,bw(e),null,e.onPush?32:16,r[i.index],i,s,c,a||null,null,null);return l.firstCreatePass&&P(l,i,n.length-1),Ti(r,d),r[i.index]=d}(C,h,y,M,g,a,c);v=U0(m,bi),h&&function D8(i,t,e,n){if(n)L_(i,e,["ng-version",B1.full]);else{const{attrs:r,classes:s}=function tD(i){const t=[],e=[];let n=1,r=2;for(;n0&&$x(i,e,s.join(" "))}}(c,y,h,n),void 0!==e&&function T8(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=Ec(r.hostAttrs,e=Ec(e,r.hostAttrs))}}(n)}function kD(i){return i===Za?{}:i===Wn?[]:i}function k8(i,t){const e=i.viewQuery;i.viewQuery=e?(n,r)=>{t(n,r),e(n,r)}:t}function P8(i,t){const e=i.contentQueries;i.contentQueries=e?(n,r,s)=>{t(n,r,s),e(n,r,s)}:t}function O8(i,t){const e=i.hostBindings;i.hostBindings=e?(n,r)=>{t(n,r),e(n,r)}:t}function Aw(i){return!!PD(i)&&(Array.isArray(i)||!(i instanceof Map)&&Symbol.iterator in i)}function PD(i){return null!==i&&("function"==typeof i||"object"==typeof i)}function Wl(i,t,e){return i[t]=e}function Is(i,t,e){return!Object.is(i[t],e)&&(i[t]=e,!0)}function Eh(i,t,e,n){const r=Is(i,t,e);return Is(i,t+1,n)||r}function It(i,t,e,n){const r=Se();return Is(r,Ll(),t)&&(zn(),be(Di(),r,i,t,e,n)),It}function Yp(i,t,e,n){return Is(i,Ll(),e)?t+Jt(e)+n:on}function qp(i,t,e,n,r,s){const a=Eh(i,function tl(){return Pt.lFrame.bindingIndex}(),e,r);return Qs(2),a?t+Jt(e)+n+Jt(r)+s:on}function fe(i,t,e,n,r,s,o,a){const l=Se(),c=zn(),d=i+bi,h=c.firstCreatePass?function G8(i,t,e,n,r,s,o,a,l){const c=t.consts,d=Qd(t,i,4,o||null,Fl(c,a));ty(t,e,d,Fl(c,l)),Bd(t,d);const h=d.tView=ey(2,d,n,r,s,t.directiveRegistry,t.pipeRegistry,null,t.schemas,c);return null!==t.queries&&(t.queries.template(t,d),h.queries=t.queries.embeddedTView(d)),d}(d,c,l,t,e,n,r,s,o):c.data[d];_a(h,!1);const p=l[xt].createComment("");yh(c,l,p,h),$r(p,l),Ti(l,l[d]=mn(p,l,p,h)),xc(h)&&Qv(c,l,h),null!=o&&Jv(l,h,a)}function Zi(i){return Fd(function mA(){return Pt.lFrame.contextLView}(),bi+i)}function U(i,t,e){const n=Se();return Is(n,Ll(),t)&&ro(zn(),Di(),n,i,t,n[xt],e,!1),U}function OD(i,t,e,n,r){const o=r?"class":"style";RD(i,e,t.inputs[o],o,n)}function G(i,t,e,n){const r=Se(),s=zn(),o=bi+i,a=r[xt],l=s.firstCreatePass?function j8(i,t,e,n,r,s){const o=t.consts,l=Qd(t,i,2,n,Fl(o,r));return ty(t,e,l,Fl(o,s)),null!==l.attrs&&Sw(l,l.attrs,!1),null!==l.mergedAttrs&&Sw(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]=Ap(a,t,function q0(){return Pt.lFrame.currentNamespace}()),d=xc(l);return _a(l,!0),Gx(a,c,l),32!=(32&l.flags)&&yh(s,r,c,l),0===function dA(){return Pt.lFrame.elementDepthCount}()&&$r(c,r),function uA(){Pt.lFrame.elementDepthCount++}(),d&&(Qv(s,r,l),Zv(s,l,r)),null!==n&&Jv(r,l),G}function j(){let i=Ar();D_()?T_():(i=i.parent,_a(i,!1));const t=i;!function hA(){Pt.lFrame.elementDepthCount--}();const e=zn();return e.firstCreatePass&&(Bd(e,i),Jf(i)&&e.queries.elementEnd(i)),null!=t.classesWithoutHost&&function xA(i){return 0!=(8&i.flags)}(t)&&OD(e,t,Se(),t.classesWithoutHost,!0),null!=t.stylesWithoutHost&&function F_(i){return 0!=(16&i.flags)}(t)&&OD(e,t,Se(),t.stylesWithoutHost,!1),j}function Ie(i,t,e,n){return G(i,t,e,n),j(),Ie}function Gr(i,t,e){const n=Se(),r=zn(),s=i+bi,o=r.firstCreatePass?function Y8(i,t,e,n,r){const s=t.consts,o=Fl(s,n),a=Qd(t,i,8,"ng-container",o);return null!==o&&Sw(a,o,!0),ty(t,e,a,Fl(s,r)),null!==t.queries&&t.queries.elementStart(t,a),a}(s,r,n,t,e):r.data[s];_a(o,!0);const a=n[s]=n[xt].createComment("");return yh(r,n,a,o),$r(a,n),xc(o)&&(Qv(r,n,o),Zv(r,o,n)),null!=e&&Jv(n,o),Gr}function Wr(){let i=Ar();const t=zn();return D_()?T_():(i=i.parent,_a(i,!1)),t.firstCreatePass&&(Bd(t,i),Jf(i)&&t.queries.elementEnd(i)),Wr}function sy(i,t,e){return Gr(i,t,e),Wr(),sy}function jn(){return Se()}function oy(i){return!!i&&"function"==typeof i.then}function hL(i){return!!i&&"function"==typeof i.subscribe}const FD=hL;function Oe(i,t,e,n){const r=Se(),s=zn(),o=Ar();return fL(s,r,r[xt],o,i,t,n),Oe}function LD(i,t){const e=Ar(),n=Se(),r=zn();return fL(r,n,XF(rh(r.data),e,n),e,i,t),LD}function fL(i,t,e,n,r,s,o){const a=xc(n),c=i.firstCreatePass&&qF(i),d=t[ze],h=YF(t);let p=!0;if(3&n.type||o){const b=Ai(n,t),v=o?o(b):b,y=h.length,M=o?C=>o(I(C[n.index])):n.index;let x=null;if(!o&&a&&(x=function q8(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=mL(n,t,d,s,!1);const C=e.listen(v,r,s);h.push(s,C),c&&c.push(r,M,y,y+1)}}else s=mL(n,t,d,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?ws(i.index,t):t);let l=pL(t,e,n,o),c=s.__ngNextListenerFn__;for(;c;)l=pL(t,e,c,o)&&l,c=c.__ngNextListenerFn__;return r&&!1===l&&(o.preventDefault(),o.returnValue=!1),l}}function re(i=1){return function vA(i){return(Pt.lFrame.contextLView=function Y0(i,t){for(;i>0;)t=t[Er],i--;return t}(i,Pt.lFrame.contextLView))[ze]}(i)}function X8(i,t){let e=null;const n=function X1(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 UD(i){return 2|i}function Ah(i){return(131068&i)>>2}function VD(i,t){return-131069&i|t<<2}function zD(i){return 1|i}function CL(i,t,e,n,r){const s=i[e+1],o=null===t;let a=n?eu(s):Ah(s),l=!1;for(;0!==a&&(!1===l||o);){const d=i[a+1];tW(i[a],t)&&(l=!0,i[a+1]=n?zD(d):UD(d)),a=n?eu(d):Ah(d)}l&&(i[e+1]=n?UD(s):zD(s))}function tW(i,t){return null===i||null==t||(Array.isArray(i)?i[1]:i)===t||!(!Array.isArray(i)||"string"!=typeof t)&&Rc(i,t)>=0}const Rr={textEnd:0,key:0,keyEnd:0,value:0,valueEnd:0};function SL(i){return i.substring(Rr.key,Rr.keyEnd)}function EL(i,t){const e=Rr.textEnd;return e===t?-1:(t=Rr.keyEnd=function sW(i,t,e){for(;t32;)t++;return t}(i,Rr.key=t,e),tm(i,t,e))}function tm(i,t,e){for(;t=0;e=EL(t,e))Cs(i,SL(t),!0)}function ul(i,t,e,n){const r=Se(),s=zn(),o=Qs(2);s.firstUpdatePass&&kL(s,i,o,n),t!==on&&Is(r,o,t)&&OL(s,s.data[Kn()],r,r[xt],i,r[o+1]=function _W(i,t){return null==i||""===i||("string"==typeof t?i+=t:"object"==typeof i&&(i=mi(to(i)))),i}(t,e),n,o)}function RL(i,t){return t>=i.expandoStartIndex}function kL(i,t,e,n){const r=i.data;if(null===r[e+1]){const s=r[Kn()],o=RL(i,e);LL(s,n)&&null===t&&!o&&(t=!1),t=function dW(i,t,e,n){const r=rh(i);let s=n?t.residualClasses:t.residualStyles;if(null===r)0===(n?t.classBindings:t.styleBindings)&&(e=ay(e=HD(null,i,t,e,n),t.attrs,n),s=null);else{const o=t.directiveStylingLast;if(-1===o||i[o]!==r)if(e=HD(r,i,t,e,n),null===s){let l=function uW(i,t,e){const n=e?t.classBindings:t.styleBindings;if(0!==Ah(n))return i[eu(n)]}(i,t,n);void 0!==l&&Array.isArray(l)&&(l=HD(null,i,t,l[1],n),l=ay(l,t.attrs,n),function hW(i,t,e,n){i[eu(e?t.classBindings:t.styleBindings)]=n}(i,t,n,l))}else s=function fW(i,t,e){let n;const r=t.directiveEnd;for(let s=1+t.directiveStylingLast;s0)&&(c=!0)):d=e,r)if(0!==l){const p=eu(i[a+1]);i[n+1]=Tw(p,a),0!==p&&(i[p+1]=VD(i[p+1],n)),i[a+1]=function Z8(i,t){return 131071&i|t<<17}(i[a+1],n)}else i[n+1]=Tw(a,0),0!==a&&(i[a+1]=VD(i[a+1],n)),a=n;else i[n+1]=Tw(l,0),0===a?a=n:i[l+1]=VD(i[l+1],n),l=n;c&&(i[n+1]=UD(i[n+1])),CL(i,d,n,!0),CL(i,d,n,!1),function eW(i,t,e,n,r){const s=r?i.residualClasses:i.residualStyles;null!=s&&"string"==typeof t&&Rc(s,t)>=0&&(e[n+1]=zD(e[n+1]))}(t,d,i,n,s),o=Tw(a,l),s?t.classBindings=o:t.styleBindings=o}(r,s,t,e,o,n)}}function HD(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),d=c?l[1]:l,h=null===d;let p=e[r+1];p===on&&(p=h?Wn:void 0);let m=h?jd(p,n):d===n?p:void 0;if(c&&!Iw(m)&&(m=jd(l,n)),Iw(m)&&(a=m,o))return a;const g=i[r+1];r=o?eu(g):Ah(g)}if(null!==t){let l=s?t.residualClasses:t.residualStyles;null!=l&&(a=jd(l,n))}return a}function Iw(i){return void 0!==i}function LL(i,t){return 0!=(i.flags&(t?8:16))}function Be(i,t=""){const e=Se(),n=zn(),r=i+bi,s=n.firstCreatePass?Qd(n,r,1,t,null):n.data[r],o=e[r]=function cv(i,t){return i.createText(t)}(e[xt],t);yh(n,e,o,s),_a(s,!1)}function ui(i){return Qi("",i,""),ui}function Qi(i,t,e){const n=Se(),r=Yp(n,i,t,e);return r!==on&&Vc(n,Kn(),r),Qi}function Dh(i,t,e,n,r){const s=Se(),o=qp(s,i,t,e,n,r);return o!==on&&Vc(s,Kn(),o),Dh}function GL(i,t,e){!function hl(i,t,e,n){const r=zn(),s=Qs(2);r.firstUpdatePass&&kL(r,null,s,n);const o=Se();if(e!==on&&Is(o,s,e)){const a=r.data[Kn()];if(LL(a,n)&&!RL(r,s)){let l=n?a.classesWithoutHost:a.stylesWithoutHost;null!==l&&(e=zf(l,e||"")),OD(r,a,o,e,n)}else!function gW(i,t,e,n,r,s,o,a){r===on&&(r=Wn);let l=0,c=0,d=0((st=st||{})[st.LocaleId=0]="LocaleId",st[st.DayPeriodsFormat=1]="DayPeriodsFormat",st[st.DayPeriodsStandalone=2]="DayPeriodsStandalone",st[st.DaysFormat=3]="DaysFormat",st[st.DaysStandalone=4]="DaysStandalone",st[st.MonthsFormat=5]="MonthsFormat",st[st.MonthsStandalone=6]="MonthsStandalone",st[st.Eras=7]="Eras",st[st.FirstDayOfWeek=8]="FirstDayOfWeek",st[st.WeekendRange=9]="WeekendRange",st[st.DateFormat=10]="DateFormat",st[st.TimeFormat=11]="TimeFormat",st[st.DateTimeFormat=12]="DateTimeFormat",st[st.NumberSymbols=13]="NumberSymbols",st[st.NumberFormats=14]="NumberFormats",st[st.CurrencyCode=15]="CurrencyCode",st[st.CurrencySymbol=16]="CurrencySymbol",st[st.CurrencyName=17]="CurrencyName",st[st.Currencies=18]="Currencies",st[st.Directionality=19]="Directionality",st[st.PluralCase=20]="PluralCase",st[st.ExtraData=21]="ExtraData",st))();const im="en-US";let n2=im;function WD(i,t,e,n,r){if(i=Ot(i),Array.isArray(i))for(let s=0;s>20;if(Nc(i)||!i.multi){const m=new Ud(l,r,E),g=YD(a,t,r?d:d+p,h);-1===g?(pn(ah(c,o),s,a),jD(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=YD(a,t,d+p,h),g=YD(a,t,d,d+p),v=g>=0&&e[g];if(r&&!v||!r&&!(m>=0&&e[m])){pn(ah(c,o),s,a);const y=function Oj(i,t,e,n,r){const s=new Ud(i,e,E);return s.multi=[],s.index=t,s.componentProviders=0,D2(s,r,n&&!e),s}(r?Pj:kj,e.length,r,n,l);!r&&v&&(e[g].providerFactory=y),jD(s,i,t.length,0),t.push(a),c.directiveStart++,c.directiveEnd++,r&&(c.providerIndexes+=1048576),e.push(y),o.push(y)}else jD(s,i,m>-1?m:g,D2(e[r?g:m],l,!r&&n));!r&&n&&v&&e[g].componentProviders++}}}function jD(i,t,e,n){const r=Nc(t),s=function D1(i){return!!i.useClass}(t);if(r||s){const l=(s?Ot(t.useClass):t).prototype.ngOnDestroy;if(l){const c=i.destroyHooks||(i.destroyHooks=[]);if(!r&&t.multi){const d=c.indexOf(e);-1===d?c.push(e,[n,l]):c[d+1].push(n,l)}else c.push(e,l)}}}function D2(i,t,e){return e&&i.componentProviders++,i.multi.push(t)-1}function YD(i,t,e,n){for(let r=e;r{e.providersResolver=(n,r)=>function Rj(i,t,e){const n=zn();if(n.firstCreatePass){const r=bo(i);WD(e,n.data,n.blueprint,r,!0),WD(t,n.data,n.blueprint,r,!1)}}(n,r?r(i):i,t)}}class rm{}class T2{}class I2 extends rm{constructor(t,e){super(),this._parent=e,this._bootstrapComponents=[],this.destroyCbs=[],this.componentFactoryResolver=new ZF(this);const n=hr(t);this._bootstrapComponents=dl(n.bootstrap),this._r3Injector=hw(t,e,[{provide:rm,useValue:this},{provide:$l,useValue:this.componentFactoryResolver}],mi(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 XD extends T2{constructor(t){super(),this.moduleType=t}create(t){return new I2(this.moduleType,t)}}class Lj extends rm{constructor(t,e,n){super(),this.componentFactoryResolver=new ZF(this),this.instance=null;const r=new $p([...t,{provide:rm,useValue:this},{provide:$l,useValue:this.componentFactoryResolver}],e||wh(),n,new Set(["environment"]));this.injector=r,r.resolveInjectorInitializers()}destroy(){this.injector.destroy()}onDestroy(t){this.injector.onDestroy(t)}}function Lw(i,t,e=null){return new Lj(i,t,e).injector}let Nj=(()=>{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=nw(0,e.type),r=n.length>0?Lw([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=Pe({token:i,providedIn:"environment",factory:()=>new i(ee(io))}),i})();function KD(i){i.getStandaloneInjector=t=>t.get(Nj).getOrCreateStandaloneInjector(i)}function Rs(i,t,e){const n=zr()+i,r=Se();return r[n]===on?Wl(r,n,e?t.call(e):t()):function ry(i,t){return i[t]}(r,n)}function sm(i,t,e,n){return B2(Se(),zr(),i,t,e,n)}function N2(i,t,e,n,r,s,o){return function z2(i,t,e,n,r,s,o,a,l){const c=t+e;return function Aa(i,t,e,n,r,s){const o=Eh(i,t,e,n);return Eh(i,t+2,r,s)||o}(i,c,r,s,o,a)?Wl(i,c+4,l?n.call(l,r,s,o,a):n(r,s,o,a)):fy(i,c+4)}(Se(),zr(),i,t,e,n,r,s,o)}function fy(i,t){const e=i[t];return e===on?void 0:e}function B2(i,t,e,n,r,s){const o=t+e;return Is(i,o,r)?Wl(i,o+1,s?n.call(s,r):n(r)):fy(i,o+1)}function ct(i,t){const e=zn();let n;const r=i+bi;e.firstCreatePass?(n=function Jj(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=el(n.type)),o=Xs(E);try{const a=dp(!1),l=s();return dp(a),function W8(i,t,e,n){e>=i.data.length&&(i.data[e]=null,i.blueprint[e]=null),t[e]=n}(e,Se(),r,l),l}finally{Xs(o)}}function ut(i,t,e){const n=i+bi,r=Se(),s=Fd(r,n);return py(r,n)?B2(r,zr(),t,s.transform,e,s):s.transform(e)}function QD(i,t,e,n){const r=i+bi,s=Se(),o=Fd(s,r);return py(s,r)?function U2(i,t,e,n,r,s,o){const a=t+e;return Eh(i,a,r,s)?Wl(i,a+2,o?n.call(o,r,s):n(r,s)):fy(i,a+2)}(s,zr(),t,o.transform,e,n,o):o.transform(e,n)}function py(i,t){return i[lt].data[t].pure}function JD(i){return t=>{setTimeout(i,void 0,t)}}const $e=class r6 extends Te{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=JD(s),r&&(r=JD(r)),o&&(o=JD(o)));const a=super.subscribe({next:r,error:s,complete:o});return t instanceof Qt&&t.add(a),a}};function s6(){return this._results[Symbol.iterator]()}class om{get changes(){return this._changes||(this._changes=new $e)}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=om.prototype;e[Symbol.iterator]||(e[Symbol.iterator]=s6)}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 Dr(i){return i.flat(Number.POSITIVE_INFINITY)}(t);(this._changesDetected=!function pp(i,t,e){if(i.length!==t.length)return!1;for(let n=0;n{class i{}return i.__NG_ELEMENT_ID__=l6,i})();const o6=Eo,a6=class extends o6{constructor(t,e,n){super(),this._declarationLView=t,this._declarationTContainer=e,this.elementRef=n}createEmbeddedView(t,e){const n=this._declarationTContainer.tView,r=Mh(this._declarationLView,n,t,16,null,n.declTNode,null,null,null,null,e||null);r[nh]=this._declarationLView[this._declarationTContainer.index];const o=this._declarationLView[Zs];return null!==o&&(r[Zs]=o.createEmbeddedView(n)),Sh(n,r,t),new ny(r)}};function l6(){return Nw(Ar(),Se())}function Nw(i,t){return 4&i.type?new a6(t,i,Fn(i,t)):null}let jr=(()=>{class i{}return i.__NG_ELEMENT_ID__=c6,i})();function c6(){return W2(Ar(),Se())}const d6=jr,$2=class extends d6{constructor(t,e,n){super(),this._lContainer=t,this._hostTNode=e,this._hostLView=n}get element(){return Fn(this._hostTNode,this._hostLView)}get injector(){return new Dc(this._hostTNode,this._hostLView)}get parentInjector(){const t=ch(this._hostTNode,this._hostLView);if(cp(t)){const e=oh(t,this._hostLView),n=sh(t);return new Dc(e[lt].data[n+8],e)}return new Dc(null,this._hostLView)}clear(){for(;this.length>0;)this.remove(this.length-1)}get(t){const e=G2(this._lContainer);return null!==e&&e[t]||null}get length(){return this._lContainer.length-Ui}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 hh(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 iy(Hn(t)),c=n||this.parentInjector;if(!s&&null==l.ngModule){const p=(o?c:this.parentInjector).get(io,null);p&&(s=p)}const d=l.create(c,r,void 0,s);return this.insert(d.hostView,a),d}insert(t,e){const n=t._lView,r=n[lt];if(function cA(i){return xs(i[Bi])}(n)){const d=this.indexOf(t);if(-1!==d)this.detach(d);else{const h=n[Bi],p=new $2(h,h[he],h[Bi]);p.detach(p.indexOf(t))}}const s=this._adjustIndex(e),o=this._lContainer;!function dv(i,t,e,n){const r=Ui+n,s=e.length;n>0&&(e[r-1][ys]=t),n0)n.push(o[a/2]);else{const c=s[a+1],d=t[-l];for(let h=Ui;h{class i{constructor(e){this.appInits=e,this.resolve=Uw,this.reject=Uw,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)(ee(Vw,8))},i.\u0275prov=Pe({token:i,factory:i.\u0275fac,providedIn:"root"}),i})();const cm=new me("AppId",{providedIn:"root",factory:function pN(){return`${uT()}${uT()}${uT()}`}});function uT(){return String.fromCharCode(97+Math.floor(25*Math.random()))}const mN=new me("Platform Initializer"),hT=new me("Platform ID",{providedIn:"platform",factory:()=>"unknown"}),kr=new me("AnimationModuleType");let L6=(()=>{class i{log(e){console.log(e)}warn(e){console.warn(e)}}return i.\u0275fac=function(e){return new(e||i)},i.\u0275prov=Pe({token:i,factory:i.\u0275fac,providedIn:"platform"}),i})();const Xl=new me("LocaleId",{providedIn:"root",factory:()=>Lt(Xl,Ft.Optional|Ft.SkipSelf)||function N6(){return typeof $localize<"u"&&$localize.locale||im}()});class U6{constructor(t,e){this.ngModuleFactory=t,this.componentFactories=e}}let gN=(()=>{class i{compileModuleSync(e){return new XD(e)}compileModuleAsync(e){return Promise.resolve(this.compileModuleSync(e))}compileModuleAndAllComponentsSync(e){const n=this.compileModuleSync(e),s=dl(hr(e).declarations).reduce((o,a)=>{const l=Hn(a);return l&&o.push(new iy(l)),o},[]);return new U6(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=Pe({token:i,factory:i.\u0275fac,providedIn:"root"}),i})();const H6=(()=>Promise.resolve(0))();function fT(i){typeof Zone>"u"?H6.then(()=>{i&&i.apply(null,null)}):Zone.current.scheduleMicroTask("scheduleMicrotask",i)}class gt{constructor({enableLongStackTrace:t=!1,shouldCoalesceEventChangeDetection:e=!1,shouldCoalesceRunChangeDetection:n=!1}){if(this.hasPendingMacrotasks=!1,this.hasPendingMicrotasks=!1,this.isStable=!0,this.onUnstable=new $e(!1),this.onMicrotaskEmpty=new $e(!1),this.onStable=new $e(!1),this.onError=new $e(!1),typeof Zone>"u")throw new pe(908,!1);Zone.assertZonePatched();const r=this;r._nesting=0,r._outer=r._inner=Zone.current,Zone.TaskTrackingZoneSpec&&(r._inner=r._inner.fork(new Zone.TaskTrackingZoneSpec)),t&&Zone.longStackTraceZoneSpec&&(r._inner=r._inner.fork(Zone.longStackTraceZoneSpec)),r.shouldCoalesceEventChangeDetection=!n&&e,r.shouldCoalesceRunChangeDetection=n,r.lastRequestAnimationFrameId=-1,r.nativeRequestAnimationFrame=function $6(){let i=Rn.requestAnimationFrame,t=Rn.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 j6(i){const t=()=>{!function W6(i){i.isCheckStableRunning||-1!==i.lastRequestAnimationFrameId||(i.lastRequestAnimationFrameId=i.nativeRequestAnimationFrame.call(Rn,()=>{i.fakeTopEventTask||(i.fakeTopEventTask=Zone.root.scheduleEventTask("fakeTopEventTask",()=>{i.lastRequestAnimationFrameId=-1,mT(i),i.isCheckStableRunning=!0,pT(i),i.isCheckStableRunning=!1},void 0,()=>{},()=>{})),i.fakeTopEventTask.invoke()}),mT(i))}(i)};i._inner=i._inner.fork({name:"angular",properties:{isAngularZone:!0},onInvokeTask:(e,n,r,s,o,a)=>{try{return yN(i),e.invokeTask(r,s,o,a)}finally{(i.shouldCoalesceEventChangeDetection&&"eventTask"===s.type||i.shouldCoalesceRunChangeDetection)&&t(),bN(i)}},onInvoke:(e,n,r,s,o,a,l)=>{try{return yN(i),e.invoke(r,s,o,a,l)}finally{i.shouldCoalesceRunChangeDetection&&t(),bN(i)}},onHasTask:(e,n,r,s)=>{e.hasTask(r,s),n===r&&("microTask"==s.change?(i._hasPendingMicrotasks=s.microTask,mT(i),pT(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(!gt.isInAngularZone())throw new pe(909,!1)}static assertNotInAngularZone(){if(gt.isInAngularZone())throw new pe(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,G6,Uw,Uw);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 G6={};function pT(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 mT(i){i.hasPendingMicrotasks=!!(i._hasPendingMicrotasks||(i.shouldCoalesceEventChangeDetection||i.shouldCoalesceRunChangeDetection)&&-1!==i.lastRequestAnimationFrameId)}function yN(i){i._nesting++,i.isStable&&(i.isStable=!1,i.onUnstable.emit(null))}function bN(i){i._nesting--,pT(i)}class Y6{constructor(){this.hasPendingMicrotasks=!1,this.hasPendingMacrotasks=!1,this.isStable=!0,this.onUnstable=new $e,this.onMicrotaskEmpty=new $e,this.onStable=new $e,this.onError=new $e}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 xN=new me(""),Hw=new me("");let vT,gT=(()=>{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,vT||(function q6(i){vT=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:()=>{gt.assertNotInAngularZone(),fT(()=>{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())fT(()=>{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)(ee(gt),ee(_T),ee(Hw))},i.\u0275prov=Pe({token:i,factory:i.\u0275fac}),i})(),_T=(()=>{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 vT?.findTestabilityInTree(this,e,n)??null}}return i.\u0275fac=function(e){return new(e||i)},i.\u0275prov=Pe({token:i,factory:i.\u0275fac,providedIn:"platform"}),i})();const Hc=!1;let tu=null;const wN=new me("AllowMultipleToken"),yT=new me("PlatformDestroyListeners"),MN=new me("appBootstrapListener");class CN{constructor(t,e){this.name=t,this.token=e}}function EN(i,t,e=[]){const n=`Platform: ${t}`,r=new me(n);return(s=[])=>{let o=bT();if(!o||o.injector.get(wN,!1)){const a=[...e,...s,{provide:r,useValue:!0}];i?i(a):function Z6(i){if(tu&&!tu.get(wN,!1))throw new pe(400,!1);tu=i;const t=i.get(DN);(function SN(i){const t=i.get(mN,null);t&&t.forEach(e=>e())})(i)}(function AN(i=[],t){return Gi.create({name:t,providers:[{provide:Iv,useValue:"platform"},{provide:yT,useValue:new Set([()=>tu=null])},...i]})}(a,n))}return function J6(i){const t=bT();if(!t)throw new pe(401,!1);return t}()}}function bT(){return tu?.get(DN)??null}let DN=(()=>{class i{constructor(e){this._injector=e,this._modules=[],this._destroyListeners=[],this._destroyed=!1}bootstrapModuleFactory(e,n){const r=function IN(i,t){let e;return e="noop"===i?new Y6:("zone.js"===i?void 0:i)||new gt(t),e}(n?.ngZone,function TN(i){return{enableLongStackTrace:!1,shouldCoalesceEventChangeDetection:!(!i||!i.ngZoneEventCoalescing)||!1,shouldCoalesceRunChangeDetection:!(!i||!i.ngZoneRunCoalescing)||!1}}(n)),s=[{provide:gt,useValue:r}];return r.run(()=>{const o=Gi.create({providers:s,parent:this.injector,name:e.moduleType.name}),a=e.create(o),l=a.injector.get(cl,null);if(!l)throw new pe(402,!1);return r.runOutsideAngular(()=>{const c=r.onError.subscribe({next:d=>{l.handleError(d)}});a.onDestroy(()=>{$w(this._modules,a),c.unsubscribe()})}),function RN(i,t,e){try{const n=e();return oy(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(zw);return c.runInitializers(),c.donePromise.then(()=>(function r2(i){En(i,"Expected localeId to be defined"),"string"==typeof i&&(n2=i.toLowerCase().replace(/_/g,"-"))}(a.injector.get(Xl,im)||im),this._moduleDoBootstrap(a),a))})})}bootstrapModule(e,n=[]){const r=kN({},n);return function X6(i,t,e){const n=new XD(e);return Promise.resolve(n)}(0,0,e).then(s=>this.bootstrapModuleFactory(s,r))}_moduleDoBootstrap(e){const n=e.injector.get(dm);if(e._bootstrapComponents.length>0)e._bootstrapComponents.forEach(r=>n.bootstrap(r));else{if(!e.instance.ngDoBootstrap)throw new pe(-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 pe(404,!1);this._modules.slice().forEach(n=>n.destroy()),this._destroyListeners.forEach(n=>n());const e=this._injector.get(yT,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)(ee(Gi))},i.\u0275prov=Pe({token:i,factory:i.\u0275fac,providedIn:"platform"}),i})();function kN(i,t){return Array.isArray(t)?t.reduce(kN,i):{...i,...t}}let dm=(()=>{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 In(a=>{this._stable=this._zone.isStable&&!this._zone.hasPendingMacrotasks&&!this._zone.hasPendingMicrotasks,this._zone.runOutsideAngular(()=>{a.next(this._stable),a.complete()})}),o=new In(a=>{let l;this._zone.runOutsideAngular(()=>{l=this._zone.onStable.subscribe(()=>{gt.assertNotInAngularZone(),fT(()=>{!this._stable&&!this._zone.hasPendingMacrotasks&&!this._zone.hasPendingMicrotasks&&(this._stable=!0,a.next(!0))})})});const c=this._zone.onUnstable.subscribe(()=>{gt.assertInAngularZone(),this._stable&&(this._stable=!1,this._zone.runOutsideAngular(()=>{a.next(!1)}))});return()=>{l.unsubscribe(),c.unsubscribe()}});this.isStable=Cr(s,o.pipe(Vf()))}bootstrap(e,n){const r=e instanceof Ov;if(!this._injector.get(zw).done){!r&&function Ed(i){const t=Hn(i)||Vr(i)||vs(i);return null!==t&&t.standalone}(e);throw new pe(405,Hc)}let o;o=r?e:this._injector.get($l).resolveComponentFactory(e),this.componentTypes.push(o.componentType);const a=function K6(i){return i.isBoundToModule}(o)?void 0:this._injector.get(rm),c=o.create(Gi.NULL,[],n||o.selector,a),d=c.location.nativeElement,h=c.injector.get(xN,null);return h?.registerApplication(d),c.onDestroy(()=>{this.detachView(c.hostView),$w(this.components,c),h?.unregisterApplication(d)}),this._loadComponent(c),c}tick(){if(this._runningTick)throw new pe(101,!1);try{this._runningTick=!0;for(let e of this._views)e.detectChanges()}catch(e){this._zone.runOutsideAngular(()=>this._exceptionHandler.handleError(e))}finally{this._runningTick=!1}}attachView(e){const n=e;this._views.push(n),n.attachToAppRef(this)}detachView(e){const n=e;$w(this._views,n),n.detachFromAppRef()}_loadComponent(e){this.attachView(e.hostView),this.tick(),this.components.push(e);const n=this._injector.get(MN,[]);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),()=>$w(this._destroyListeners,e)}destroy(){if(this._destroyed)throw new pe(406,!1);const e=this._injector;e.destroy&&!e.destroyed&&e.destroy()}get viewCount(){return this._views.length}warnIfDestroyed(){}}return i.\u0275fac=function(e){return new(e||i)(ee(gt),ee(io),ee(cl))},i.\u0275prov=Pe({token:i,factory:i.\u0275fac,providedIn:"root"}),i})();function $w(i,t){const e=i.indexOf(t);e>-1&&i.splice(e,1)}let Qn=(()=>{class i{}return i.__NG_ELEMENT_ID__=t9,i})();function t9(i){return function n9(i,t,e){if(Dd(i)&&!e){const n=ws(i.index,t);return new ny(n,n)}return 47&i.type?new ny(t[sr],t):null}(Ar(),Se(),16==(16&i))}class NN{constructor(){}supports(t){return Aw(t)}create(t){return new c9(t)}}const l9=(i,t)=>t;class c9{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||l9}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 d9(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 BN),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 BN),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 d9{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 u9{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 BN{constructor(){this.map=new Map}put(t){const e=t.trackById;let n=this.map.get(e);n||(n=new u9,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 UN(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 f9(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 f9{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 zN(){return new jw([new NN])}let jw=(()=>{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||zN()),deps:[[i,new Ma,new Ss]]}}find(e){const n=this.factories.find(r=>r.supports(e));if(null!=n)return n;throw new pe(901,!1)}}return i.\u0275prov=Pe({token:i,providedIn:"root",factory:zN}),i})();function HN(){return new gy([new VN])}let gy=(()=>{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||HN()),deps:[[i,new Ma,new Ss]]}}find(e){const n=this.factories.find(r=>r.supports(e));if(n)return n;throw new pe(901,!1)}}return i.\u0275prov=Pe({token:i,providedIn:"root",factory:HN}),i})();const g9=EN(null,"core",[]);let _9=(()=>{class i{constructor(e){}}return i.\u0275fac=function(e){return new(e||i)(ee(dm))},i.\u0275mod=en({type:i}),i.\u0275inj=Wt({}),i})();let ST=null;function $c(){return ST}class b9{}const qt=new me("DocumentToken");let ET=(()=>{class i{historyGo(e){throw new Error("Not implemented")}}return i.\u0275fac=function(e){return new(e||i)},i.\u0275prov=Pe({token:i,factory:function(){return function x9(){return ee($N)}()},providedIn:"platform"}),i})();const w9=new me("Location Initialized");let $N=(()=>{class i extends ET{constructor(e){super(),this._doc=e,this._location=window.location,this._history=window.history}getBaseHrefFromDOM(){return $c().getBaseHref(this._doc)}onPopState(e){const n=$c().getGlobalEventTarget(this._doc,"window");return n.addEventListener("popstate",e,!1),()=>n.removeEventListener("popstate",e)}onHashChange(e){const n=$c().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){GN()?this._history.pushState(e,n,r):this._location.hash=r}replaceState(e,n,r){GN()?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)(ee(qt))},i.\u0275prov=Pe({token:i,factory:function(){return function M9(){return new $N(ee(qt))}()},providedIn:"platform"}),i})();function GN(){return!!window.history.pushState}function AT(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 WN(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 Gc(i){return i&&"?"!==i[0]?"?"+i:i}let Rh=(()=>{class i{historyGo(e){throw new Error("Not implemented")}}return i.\u0275fac=function(e){return new(e||i)},i.\u0275prov=Pe({token:i,factory:function(){return Lt(YN)},providedIn:"root"}),i})();const jN=new me("appBaseHref");let YN=(()=>{class i extends Rh{constructor(e,n){super(),this._platformLocation=e,this._removeListenerFns=[],this._baseHref=n??this._platformLocation.getBaseHrefFromDOM()??Lt(qt).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 AT(this._baseHref,e)}path(e=!1){const n=this._platformLocation.pathname+Gc(this._platformLocation.search),r=this._platformLocation.hash;return r&&e?`${n}${r}`:n}pushState(e,n,r,s){const o=this.prepareExternalUrl(r+Gc(s));this._platformLocation.pushState(e,n,o)}replaceState(e,n,r,s){const o=this.prepareExternalUrl(r+Gc(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)(ee(ET),ee(jN,8))},i.\u0275prov=Pe({token:i,factory:i.\u0275fac,providedIn:"root"}),i})(),C9=(()=>{class i extends Rh{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=AT(this._baseHref,e);return n.length>0?"#"+n:n}pushState(e,n,r,s){let o=this.prepareExternalUrl(r+Gc(s));0==o.length&&(o=this._platformLocation.pathname),this._platformLocation.pushState(e,n,o)}replaceState(e,n,r,s){let o=this.prepareExternalUrl(r+Gc(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)(ee(ET),ee(jN,8))},i.\u0275prov=Pe({token:i,factory:i.\u0275fac}),i})(),_y=(()=>{class i{constructor(e){this._subject=new $e,this._urlChangeListeners=[],this._urlChangeSubscription=null,this._locationStrategy=e;const n=this._locationStrategy.getBaseHref();this._basePath=function A9(i){if(new RegExp("^(https?:)?//").test(i)){const[,e]=i.split(/\/\/[^\/]+/);return e}return i}(WN(qN(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+Gc(n))}normalize(e){return i.stripTrailingSlash(function E9(i,t){if(!i||!t.startsWith(i))return t;const e=t.substring(i.length);return""===e||["/",";","?","#"].includes(e[0])?e:t}(this._basePath,qN(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+Gc(n)),r)}replaceState(e,n="",r=null){this._locationStrategy.replaceState(r,"",e,n),this._notifyUrlChangeListeners(this.prepareExternalUrl(e+Gc(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=Gc,i.joinWithSlash=AT,i.stripTrailingSlash=WN,i.\u0275fac=function(e){return new(e||i)(ee(Rh))},i.\u0275prov=Pe({token:i,factory:function(){return function S9(){return new _y(ee(Rh))}()},providedIn:"root"}),i})();function qN(i){return i.replace(/\/index.html$/,"")}var Ao=(()=>((Ao=Ao||{})[Ao.Decimal=0]="Decimal",Ao[Ao.Percent=1]="Percent",Ao[Ao.Currency=2]="Currency",Ao[Ao.Scientific=3]="Scientific",Ao))(),$t=(()=>(($t=$t||{})[$t.Decimal=0]="Decimal",$t[$t.Group=1]="Group",$t[$t.List=2]="List",$t[$t.PercentSign=3]="PercentSign",$t[$t.PlusSign=4]="PlusSign",$t[$t.MinusSign=5]="MinusSign",$t[$t.Exponential=6]="Exponential",$t[$t.SuperscriptingExponent=7]="SuperscriptingExponent",$t[$t.PerMille=8]="PerMille",$t[$t.Infinity=9]="Infinity",$t[$t.NaN=10]="NaN",$t[$t.TimeSeparator=11]="TimeSeparator",$t[$t.CurrencyDecimal=12]="CurrencyDecimal",$t[$t.CurrencyGroup=13]="CurrencyGroup",$t))();function Da(i,t){const e=oo(i),n=e[st.NumberSymbols][t];if(typeof n>"u"){if(t===$t.CurrencyDecimal)return e[st.NumberSymbols][$t.Decimal];if(t===$t.CurrencyGroup)return e[st.NumberSymbols][$t.Group]}return n}const J9=/^(\d+)?\.((\d+)(-(\d+))?)?$/,eB=22,tM=".",yy="0",eY=";",tY=",",kT="#";function FT(i){const t=parseInt(i);if(isNaN(t))throw new Error("Invalid integer literal when parsing "+i);return t}const NT=/\s+/,iB=[];let hm=(()=>{class i{constructor(e,n,r,s){this._iterableDiffers=e,this._keyValueDiffers=n,this._ngEl=r,this._renderer=s,this.initialClasses=iB,this.stateMap=new Map}set klass(e){this.initialClasses=null!=e?e.trim().split(NT):iB}set ngClass(e){this.rawClass="string"==typeof e?e.trim().split(NT):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(NT).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)(E(jw),E(gy),E(vt),E(ll))},i.\u0275dir=ve({type:i,selectors:[["","ngClass",""]],inputs:{klass:["class","klass"],ngClass:"ngClass"},standalone:!0}),i})();class hY{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 lo=(()=>{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 hY(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),oB(a,r)}});for(let r=0,s=n.length;r{oB(n.get(r.currentIndex),r)})}static ngTemplateContextGuard(e,n){return!0}}return i.\u0275fac=function(e){return new(e||i)(E(jr),E(Eo),E(jw))},i.\u0275dir=ve({type:i,selectors:[["","ngFor","","ngForOf",""]],inputs:{ngForOf:"ngForOf",ngForTrackBy:"ngForTrackBy",ngForTemplate:"ngForTemplate"},standalone:!0}),i})();function oB(i,t){i.context.$implicit=t.item}let vi=(()=>{class i{constructor(e,n){this._viewContainer=e,this._context=new pY,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){aB("ngIfThen",e),this._thenTemplateRef=e,this._thenViewRef=null,this._updateView()}set ngIfElse(e){aB("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)(E(jr),E(Eo))},i.\u0275dir=ve({type:i,selectors:[["","ngIf",""]],inputs:{ngIf:"ngIf",ngIfThen:"ngIfThen",ngIfElse:"ngIfElse"},standalone:!0}),i})();class pY{constructor(){this.$implicit=null,this.ngIf=null}}function aB(i,t){if(t&&!t.createEmbeddedView)throw new Error(`${i} must be a TemplateRef, but received '${mi(t)}'.`)}class BT{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 by=(()=>{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=ve({type:i,selectors:[["","ngSwitch",""]],inputs:{ngSwitch:"ngSwitch"},standalone:!0}),i})(),UT=(()=>{class i{constructor(e,n,r){this.ngSwitch=r,r._addCase(),this._view=new BT(e,n)}ngDoCheck(){this._view.enforceState(this.ngSwitch._matchCase(this.ngSwitchCase))}}return i.\u0275fac=function(e){return new(e||i)(E(jr),E(Eo),E(by,9))},i.\u0275dir=ve({type:i,selectors:[["","ngSwitchCase",""]],inputs:{ngSwitchCase:"ngSwitchCase"},standalone:!0}),i})(),lB=(()=>{class i{constructor(e,n,r){r._addDefault(new BT(e,n))}}return i.\u0275fac=function(e){return new(e||i)(E(jr),E(Eo),E(by,9))},i.\u0275dir=ve({type:i,selectors:[["","ngSwitchDefault",""]],standalone:!0}),i})(),VT=(()=>{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:Es.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)(E(vt),E(gy),E(ll))},i.\u0275dir=ve({type:i,selectors:[["","ngStyle",""]],inputs:{ngStyle:"ngStyle"},standalone:!0}),i})(),xy=(()=>{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)(E(jr))},i.\u0275dir=ve({type:i,selectors:[["","ngTemplateOutlet",""]],inputs:{ngTemplateOutletContext:"ngTemplateOutletContext",ngTemplateOutlet:"ngTemplateOutlet",ngTemplateOutletInjector:"ngTemplateOutletInjector"},standalone:!0,features:[xi]}),i})();function ml(i,t){return new pe(2100,!1)}class gY{createSubscription(t,e){return t.subscribe({next:e,error:n=>{throw n}})}dispose(t){t.unsubscribe()}}class _Y{createSubscription(t,e){return t.then(e,n=>{throw n})}dispose(t){}}const vY=new _Y,yY=new gY;let Ia=(()=>{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(oy(e))return vY;if(hL(e))return yY;throw ml()}_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)(E(Qn,16))},i.\u0275pipe=$i({name:"async",type:i,pure:!1,standalone:!0}),i})(),dB=(()=>{class i{constructor(e){this.differs=e,this.keyValues=[],this.compareFn=uB}transform(e,n=uB){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 kY(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)(E(gy,16))},i.\u0275pipe=$i({name:"keyvalue",type:i,pure:!1,standalone:!0}),i})();function uB(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 zT(i){return!(null==i||""===i||i!=i)}(e))return null;r=r||this._locale;try{return function sY(i,t,e){return function PT(i,t,e,n,r,s,o=!1){let a="",l=!1;if(isFinite(i)){let c=function aY(i){let n,r,s,o,a,t=Math.abs(i)+"",e=0;for((r=t.indexOf(tM))>-1&&(t=t.replace(tM,"")),(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)===yy;s++);if(s===(a=t.length))n=[0],r=1;else{for(a--;t.charAt(a)===yy;)a--;for(r-=s,n=[],o=0;s<=a;s++,o++)n[o]=Number(t.charAt(s))}return r>eB&&(n=n.splice(0,eB-1),e=r-1,r=1),{digits:n,exponent:e,integerLen:r}}(i);o&&(c=function oY(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 d=t.minInt,h=t.minFrac,p=t.maxFrac;if(s){const M=s.match(J9);if(null===M)throw new Error(`${s} is not a valid digit info`);const x=M[1],C=M[3],F=M[5];null!=x&&(d=FT(x)),null!=C&&(h=FT(C)),null!=F?p=FT(F):null!=C&&h>p&&(p=h)}!function lY(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);d&&(n.unshift(d),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(Da(e,n)),v.length&&(a+=Da(e,r)+v.join("")),b&&(a+=Da(e,$t.Exponential)+"+"+b)}else a=Da(e,$t.Infinity);return a=i<0&&!l?t.negPre+a+t.negSuf:t.posPre+a+t.posSuf,a}(i,function OT(i,t="-"){const e={minInt:1,minFrac:0,maxFrac:0,posPre:"",posSuf:"",negPre:"",negSuf:"",gSize:0,lgSize:0},n=i.split(eY),r=n[0],s=n[1],o=-1!==r.indexOf(tM)?r.split(tM):[r.substring(0,r.lastIndexOf(yy)+1),r.substring(r.lastIndexOf(yy)+1)],a=o[0],l=o[1]||"";e.posPre=a.substring(0,a.indexOf(kT));for(let d=0;d{class i{}return i.\u0275fac=function(e){return new(e||i)},i.\u0275mod=en({type:i}),i.\u0275inj=Wt({}),i})();const fB="browser";let UY=(()=>{class i{}return i.\u0275prov=Pe({token:i,providedIn:"root",factory:()=>new VY(ee(qt),window)}),i})();class VY{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 zY(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=pB(this.window.history)||pB(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 pB(i){return Object.getOwnPropertyDescriptor(i,"scrollRestoration")}class m7 extends b9{constructor(){super(...arguments),this.supportsDOMEvents=!0}}class WT extends m7{static makeCurrent(){!function y9(i){ST||(ST=i)}(new WT)}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 g7(){return My=My||document.querySelector("base"),My?My.getAttribute("href"):null}();return null==e?null:function _7(i){rM=rM||document.createElement("a"),rM.setAttribute("href",i);const t=rM.pathname;return"/"===t.charAt(0)?t:`/${t}`}(e)}resetBaseElement(){My=null}getUserAgent(){return window.navigator.userAgent}getCookie(t){return function dY(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 rM,My=null;const yB=new me("TRANSITION_ID"),y7=[{provide:Vw,useFactory:function v7(i,t,e){return()=>{e.get(zw).donePromise.then(()=>{const n=$c(),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=Pe({token:i,factory:i.\u0275fac}),i})();const sM=new me("EventManagerPlugins");let oM=(()=>{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=Pe({token:i,factory:i.\u0275fac}),i})(),Cy=(()=>{class i extends xB{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)(ee(qt))},i.\u0275prov=Pe({token:i,factory:i.\u0275fac}),i})();const jT={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/"},YT=/%COMP%/g,CB=new me("RemoveStylesOnCompDestory",{providedIn:"root",factory:()=>!1});function SB(i,t){return t.flat(100).map(e=>e.replace(YT,i))}function EB(i){return t=>{if("__ngUnwrap__"===t)return i;!1===i(t)&&(t.preventDefault(),t.returnValue=!1)}}let aM=(()=>{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 qT(e)}createRenderer(e,n){if(!e||!n)return this.defaultRenderer;const r=this.getOrCreateRenderer(e,n);return r instanceof TB?r.applyToHost(e):r instanceof XT&&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 Ks.Emulated:s=new TB(o,a,n,this.appId,l);break;case Ks.ShadowDom:return new D7(o,a,e,n);default:s=new XT(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)(ee(oM),ee(Cy),ee(cm),ee(CB))},i.\u0275prov=Pe({token:i,factory:i.\u0275fac}),i})();class qT{constructor(t){this.eventManager=t,this.data=Object.create(null),this.destroyNode=null}destroy(){}createElement(t,e){return e?document.createElementNS(jT[e]||e,t):document.createElement(t)}createComment(t){return document.createComment(t)}createText(t){return document.createTextNode(t)}appendChild(t,e){(DB(t)?t.content:t).appendChild(e)}insertBefore(t,e,n){t&&(DB(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=jT[r];s?t.setAttributeNS(s,e,n):t.setAttribute(e,n)}else t.setAttribute(e,n)}removeAttribute(t,e,n){if(n){const r=jT[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&(Es.DashCase|Es.Important)?t.style.setProperty(e,n,r&Es.Important?"important":""):t.style[e]=n}removeStyle(t,e,n){n&Es.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,EB(n)):this.eventManager.addEventListener(t,e,EB(n))}}function DB(i){return"TEMPLATE"===i.tagName&&void 0!==i.content}class D7 extends qT{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=SB(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 XT extends qT{constructor(t,e,n,r,s=n.id){super(t),this.sharedStylesHost=e,this.removeStylesOnCompDestory=r,this.rendererUsageCount=0,this.styles=SB(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 TB extends XT{constructor(t,e,n,r,s){const o=r+"-"+n.id;super(t,e,n,s,o),this.contentAttr=function S7(i){return"_ngcontent-%COMP%".replace(YT,i)}(o),this.hostAttr=function E7(i){return"_nghost-%COMP%".replace(YT,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 T7=(()=>{class i extends bB{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)(ee(qt))},i.\u0275prov=Pe({token:i,factory:i.\u0275fac}),i})();const IB=["alt","control","meta","shift"],I7={"\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"},R7={alt:i=>i.altKey,control:i=>i.ctrlKey,meta:i=>i.metaKey,shift:i=>i.shiftKey};let k7=(()=>{class i extends bB{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(()=>$c().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."),IB.forEach(c=>{const d=n.indexOf(c);d>-1&&(n.splice(d,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=I7[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"),IB.forEach(o=>{o!==r&&(0,R7[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)(ee(qt))},i.\u0275prov=Pe({token:i,factory:i.\u0275fac}),i})();const L7=EN(g9,"browser",[{provide:hT,useValue:fB},{provide:mN,useValue:function P7(){WT.makeCurrent()},multi:!0},{provide:qt,useFactory:function F7(){return function s1(i){vv=i}(document),document},deps:[]}]),PB=new me(""),OB=[{provide:Hw,useClass:class b7{addToWindow(t){Rn.getAngularTestability=(n,r=!0)=>{const s=t.findTestabilityInTree(n,r);if(null==s)throw new Error("Could not find testability for element.");return s},Rn.getAllAngularTestabilities=()=>t.getAllTestabilities(),Rn.getAllAngularRootElements=()=>t.getAllRootElements(),Rn.frameworkStabilizers||(Rn.frameworkStabilizers=[]),Rn.frameworkStabilizers.push(n=>{const r=Rn.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?$c().isShadowRoot(e)?this.findTestabilityInTree(t,e.host,!0):this.findTestabilityInTree(t,e.parentElement,!0):null)}},deps:[]},{provide:xN,useClass:gT,deps:[gt,_T,Hw]},{provide:gT,useClass:gT,deps:[gt,_T,Hw]}],FB=[{provide:Iv,useValue:"root"},{provide:cl,useFactory:function O7(){return new cl},deps:[]},{provide:sM,useClass:T7,multi:!0,deps:[qt,gt,hT]},{provide:sM,useClass:k7,multi:!0,deps:[qt]},{provide:aM,useClass:aM,deps:[oM,Cy,cm,CB]},{provide:Gl,useExisting:aM},{provide:xB,useExisting:Cy},{provide:Cy,useClass:Cy,deps:[qt]},{provide:oM,useClass:oM,deps:[sM,gt]},{provide:class HY{},useClass:x7,deps:[]},[]];let LB=(()=>{class i{constructor(e){}static withServerTransition(e){return{ngModule:i,providers:[{provide:cm,useValue:e.appId},{provide:yB,useExisting:cm},y7]}}}return i.\u0275fac=function(e){return new(e||i)(ee(PB,12))},i.\u0275mod=en({type:i}),i.\u0275inj=Wt({providers:[...FB,...OB],imports:[co,_9]}),i})(),NB=(()=>{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)(ee(qt))},i.\u0275prov=Pe({token:i,factory:function(e){let n=null;return n=e?new e:function B7(){return new NB(ee(qt))}(),n},providedIn:"root"}),i})();typeof window<"u"&&window;let QT=(()=>{class i{}return i.\u0275fac=function(e){return new(e||i)},i.\u0275prov=Pe({token:i,factory:function(e){let n=null;return n=e?new(e||i):ee(VB),n},providedIn:"root"}),i})(),VB=(()=>{class i extends QT{constructor(e){super(),this._doc=e}sanitize(e,n){if(null==n)return null;switch(e){case Zn.NONE:return n;case Zn.HTML:return Sa(n,"HTML")?to(n):Qx(this._doc,String(n)).toString();case Zn.STYLE:return Sa(n,"Style")?to(n):n;case Zn.SCRIPT:if(Sa(n,"Script"))return to(n);throw new Error("unsafe value used in a script context");case Zn.URL:return Sa(n,"URL")?to(n):xh(String(n));case Zn.RESOURCE_URL:if(Sa(n,"ResourceURL"))return to(n);throw new Error(`unsafe value used in a resource URL context (see ${qu})`);default:throw new Error(`Unexpected SecurityContext ${e} (see ${qu})`)}}bypassSecurityTrustHtml(e){return function u1(i){return new o1(i)}(e)}bypassSecurityTrustStyle(e){return function h1(i){return new a1(i)}(e)}bypassSecurityTrustScript(e){return function f1(i){return new l1(i)}(e)}bypassSecurityTrustUrl(e){return function p1(i){return new c1(i)}(e)}bypassSecurityTrustResourceUrl(e){return function m1(i){return new Op(i)}(e)}}return i.\u0275fac=function(e){return new(e||i)(ee(qt))},i.\u0275prov=Pe({token:i,factory:function(e){let n=null;return n=e?new e:function $7(i){return new VB(i.get(qt))}(ee(Gi)),n},providedIn:"root"}),i})();function mt(...i){return Ni(i,Gu(i))}class Qe extends Te{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 fm=z(i=>function(){i(this),this.name="EmptyError",this.message="no elements in sequence"}),{isArray:G7}=Array,{getPrototypeOf:W7,prototype:j7,keys:Y7}=Object;function zB(i){if(1===i.length){const t=i[0];if(G7(t))return{args:t,keys:null};if(function q7(i){return i&&"object"==typeof i&&W7(i)===j7}(t)){const e=Y7(t);return{args:e.map(n=>t[n]),keys:e}}}return{args:i,keys:null}}const{isArray:X7}=Array;function JT(i){return tt(t=>function K7(i,t){return X7(t)?i(...t):i(t)}(i,t))}function HB(i,t){return i.reduce((e,n,r)=>(e[n]=t[r],e),{})}function Ra(...i){const t=Gu(i),e=M0(i),{args:n,keys:r}=zB(i);if(0===n.length)return Ni([],t);const s=new In(function Z7(i,t,e=ja){return n=>{$B(t,()=>{const{length:r}=i,s=new Array(r);let o=r,a=r;for(let l=0;l{const c=Ni(i[l],t);let d=!1;c.subscribe(qn(n,h=>{s[l]=h,d||(d=!0,a--),a||n.next(e(s.slice()))},()=>{--o||n.complete()}))},n)},n)}}(n,t,r?o=>HB(r,o):ja));return e?s.pipe(JT(e)):s}function $B(i,t,e){i?Xa(e,i,t):t()}function Sy(...i){return function Q7(){return bd(1)}()(Ni(i,Gu(i)))}function Ey(i){return new In(t=>{Mr(i()).subscribe(t)})}function pm(i,t){const e=dn(i)?i:()=>i,n=r=>r.error(e());return new In(t?r=>t.schedule(n,0,r):n)}function eI(){return ni((i,t)=>{let e=null;i._refCount++;const n=qn(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 GB extends In{constructor(t,e){super(),this.source=t,this.subjectFactory=e,this._subject=null,this._refCount=0,this._connection=null,d0(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 Qt;const e=this.getSubject();t.add(this.source.subscribe(qn(e,void 0,()=>{this._teardown(),e.complete()},n=>{this._teardown(),e.error(n)},()=>this._teardown()))),t.closed&&(this._connection=null,t=Qt.EMPTY)}return t}refCount(){return eI()(this)}}function ks(i,t){return ni((e,n)=>{let r=null,s=0,o=!1;const a=()=>o&&!r&&n.complete();e.subscribe(qn(n,l=>{r?.unsubscribe();let c=0;const d=s++;Mr(i(l,d)).subscribe(r=qn(n,h=>n.next(t?t(l,h,d,c++):h),()=>{r=null,a()}))},()=>{o=!0,a()}))})}function Oi(i){return i<=0?()=>_o:ni((t,e)=>{let n=0;t.subscribe(qn(e,r=>{++n<=i&&(e.next(r),i<=n&&e.complete())}))})}function Do(...i){const t=Gu(i);return ni((e,n)=>{(t?Sy(i,e,t):Sy(i,e)).subscribe(n)})}function gn(i,t){return ni((e,n)=>{let r=0;e.subscribe(qn(n,s=>i.call(t,s,r++)&&n.next(s)))})}function lM(i){return ni((t,e)=>{let n=!1;t.subscribe(qn(e,r=>{n=!0,e.next(r)},()=>{n||e.next(i),e.complete()}))})}function WB(i=J7){return ni((t,e)=>{let n=!1;t.subscribe(qn(e,r=>{n=!0,e.next(r)},()=>n?e.complete():e.error(i())))})}function J7(){return new fm}function iu(i,t){const e=arguments.length>=2;return n=>n.pipe(i?gn((r,s)=>i(r,s,n)):ja,Oi(1),e?lM(t):WB(()=>new fm))}function ru(i,t){return dn(t)?rr(i,t,1):rr(i,1)}function Vi(i,t,e){const n=dn(i)||t||e?{next:i,error:t,complete:e}:i;return n?ni((r,s)=>{var o;null===(o=n.subscribe)||void 0===o||o.call(n);let a=!0;r.subscribe(qn(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)}))}):ja}function jc(i){return ni((t,e)=>{let s,n=null,r=!1;n=t.subscribe(qn(e,void 0,void 0,o=>{s=Mr(i(o,jc(i)(t))),n?(n.unsubscribe(),n=null,s.subscribe(e)):r=!0})),r&&(n.unsubscribe(),n=null,s.subscribe(e))})}function tI(i,t){return ni(function eq(i,t,e,n,r){return(s,o)=>{let a=e,l=t,c=0;s.subscribe(qn(o,d=>{const h=c++;l=a?i(l,d,h):(a=!0,d),n&&o.next(l)},r&&(()=>{a&&o.next(l),o.complete()})))}}(i,t,arguments.length>=2,!0))}function nI(i){return i<=0?()=>_o:ni((t,e)=>{let n=[];t.subscribe(qn(e,r=>{n.push(r),i{for(const r of n)e.next(r);e.complete()},void 0,()=>{n=null}))})}function jB(i,t){const e=arguments.length>=2;return n=>n.pipe(i?gn((r,s)=>i(r,s,n)):ja,nI(1),e?lM(t):WB(()=>new fm))}function YB(i,t=!1){return ni((e,n)=>{let r=0;e.subscribe(qn(n,s=>{const o=i(s,r++);(o||t)&&n.next(s),!o&&n.complete()}))})}function qB(i){return tt(()=>i)}function su(i){return ni((t,e)=>{try{t.subscribe(e)}finally{e.add(i)}})}const _n="primary",Ay=Symbol("RouteTitle");class tq{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 tq(i)}function nq(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 KB(i){return Array.prototype.concat.apply([],i)}function ZB(i){return i.length>0?i[i.length-1]:null}function os(i,t){for(const e in i)i.hasOwnProperty(e)&&t(i[e],e)}function ou(i){return FD(i)?i:oy(i)?Ni(Promise.resolve(i)):mt(i)}const cM=!1,rq={exact:function e3(i,t,e){if(!kh(i.segments,t.segments)||!dM(i.segments,t.segments,e)||i.numberOfChildren!==t.numberOfChildren)return!1;for(const n in t.children)if(!i.children[n]||!e3(i.children[n],t.children[n],e))return!1;return!0},subset:t3},QB={exact:function sq(i,t){return Kl(i,t)},subset:function oq(i,t){return Object.keys(t).length<=Object.keys(i).length&&Object.keys(t).every(e=>XB(i[e],t[e]))},ignored:()=>!0};function JB(i,t,e){return rq[e.paths](i.root,t.root,e.matrixParams)&&QB[e.queryParams](i.queryParams,t.queryParams)&&!("exact"===e.fragment&&i.fragment!==t.fragment)}function t3(i,t,e){return n3(i,t,t.segments,e)}function n3(i,t,e,n){if(i.segments.length>e.length){const r=i.segments.slice(0,e.length);return!(!kh(r,e)||t.hasChildren()||!dM(r,e,n))}if(i.segments.length===e.length){if(!kh(i.segments,e)||!dM(i.segments,e,n))return!1;for(const r in t.children)if(!i.children[r]||!t3(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!!(kh(i.segments,r)&&dM(i.segments,r,n)&&i.children[_n])&&n3(i.children[_n],t,s,n)}}function dM(i,t,e){return t.every((n,r)=>QB[e](i[r].parameters,n.parameters))}class au{constructor(t=new Tn([],{}),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 cq.serialize(this)}}class Tn{constructor(t,e){this.segments=t,this.children=e,this.parent=null,os(e,(n,r)=>n.parent=this)}hasChildren(){return this.numberOfChildren>0}get numberOfChildren(){return Object.keys(this.children).length}toString(){return uM(this)}}class Dy{constructor(t,e){this.path=t,this.parameters=e}get parameterMap(){return this._parameterMap||(this._parameterMap=mm(this.parameters)),this._parameterMap}toString(){return o3(this)}}function kh(i,t){return i.length===t.length&&i.every((e,n)=>e.path===t[n].path)}let Ty=(()=>{class i{}return i.\u0275fac=function(e){return new(e||i)},i.\u0275prov=Pe({token:i,factory:function(){return new iI},providedIn:"root"}),i})();class iI{parse(t){const e=new vq(t);return new au(e.parseRootSegment(),e.parseQueryParams(),e.parseFragment())}serialize(t){const e=`/${Iy(t.root,!0)}`,n=function hq(i){const t=Object.keys(i).map(e=>{const n=i[e];return Array.isArray(n)?n.map(r=>`${hM(e)}=${hM(r)}`).join("&"):`${hM(e)}=${hM(n)}`}).filter(e=>!!e);return t.length?`?${t.join("&")}`:""}(t.queryParams);return`${e}${n}${"string"==typeof t.fragment?`#${function dq(i){return encodeURI(i)}(t.fragment)}`:""}`}}const cq=new iI;function uM(i){return i.segments.map(t=>o3(t)).join("/")}function Iy(i,t){if(!i.hasChildren())return uM(i);if(t){const e=i.children[_n]?Iy(i.children[_n],!1):"",n=[];return os(i.children,(r,s)=>{s!==_n&&n.push(`${s}:${Iy(r,!1)}`)}),n.length>0?`${e}(${n.join("//")})`:e}{const e=function lq(i,t){let e=[];return os(i.children,(n,r)=>{r===_n&&(e=e.concat(t(n,r)))}),os(i.children,(n,r)=>{r!==_n&&(e=e.concat(t(n,r)))}),e}(i,(n,r)=>r===_n?[Iy(i.children[_n],!1)]:[`${r}:${Iy(n,!1)}`]);return 1===Object.keys(i.children).length&&null!=i.children[_n]?`${uM(i)}/${e[0]}`:`${uM(i)}/(${e.join("//")})`}}function r3(i){return encodeURIComponent(i).replace(/%40/g,"@").replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",")}function hM(i){return r3(i).replace(/%3B/gi,";")}function rI(i){return r3(i).replace(/\(/g,"%28").replace(/\)/g,"%29").replace(/%26/gi,"&")}function fM(i){return decodeURIComponent(i)}function s3(i){return fM(i.replace(/\+/g,"%20"))}function o3(i){return`${rI(i.path)}${function uq(i){return Object.keys(i).map(t=>`;${rI(t)}=${rI(i[t])}`).join("")}(i.parameters)}`}const fq=/^[^\/()?;=#]+/;function pM(i){const t=i.match(fq);return t?t[0]:""}const pq=/^[^=?&#]+/,gq=/^[^&#]+/;class vq{constructor(t){this.url=t,this.remaining=t}parseRootSegment(){return this.consumeOptional("/"),""===this.remaining||this.peekStartsWith("?")||this.peekStartsWith("#")?new Tn([],{}):new Tn([],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[_n]=new Tn(t,e)),n}parseSegment(){const t=pM(this.remaining);if(""===t&&this.peekStartsWith(";"))throw new pe(4009,cM);return this.capture(t),new Dy(fM(t),this.parseMatrixParams())}parseMatrixParams(){const t={};for(;this.consumeOptional(";");)this.parseParam(t);return t}parseParam(t){const e=pM(this.remaining);if(!e)return;this.capture(e);let n="";if(this.consumeOptional("=")){const r=pM(this.remaining);r&&(n=r,this.capture(n))}t[fM(e)]=fM(n)}parseQueryParam(t){const e=function mq(i){const t=i.match(pq);return t?t[0]:""}(this.remaining);if(!e)return;this.capture(e);let n="";if(this.consumeOptional("=")){const o=function _q(i){const t=i.match(gq);return t?t[0]:""}(this.remaining);o&&(n=o,this.capture(n))}const r=s3(e),s=s3(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=pM(this.remaining),r=this.remaining[n.length];if("/"!==r&&")"!==r&&";"!==r)throw new pe(4010,cM);let s;n.indexOf(":")>-1?(s=n.slice(0,n.indexOf(":")),this.capture(s),this.capture(":")):t&&(s=_n);const o=this.parseChildren();e[s]=1===Object.keys(o).length?o[_n]:new Tn([],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 pe(4011,cM)}}function sI(i){return i.segments.length>0?new Tn([],{[_n]:i}):i}function mM(i){const t={};for(const n of Object.keys(i.children)){const s=mM(i.children[n]);(s.segments.length>0||s.hasChildren())&&(t[n]=s)}return function yq(i){if(1===i.numberOfChildren&&i.children[_n]){const t=i.children[_n];return new Tn(i.segments.concat(t.segments),t.children)}return i}(new Tn(i.segments,t))}function Ph(i){return i instanceof au}const oI=!1;function bq(i,t,e,n,r){if(0===e.length)return gm(t.root,t.root,t.root,n,r);const s=function u3(i){if("string"==typeof i[0]&&1===i.length&&"/"===i[0])return new d3(!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 os(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 d3(e,t,n)}(e);return s.toRoot()?gm(t.root,t.root,new Tn([],{}),n,r):function o(l){const c=function wq(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 h3(i,t,e){let n=i,r=t,s=e;for(;s>r;){if(s-=r,n=n.parent,!n)throw new pe(4005,oI&&"Invalid number of '../'");r=n.segments.length}return new _m(n,!1,r-s)}(e,n+(Ry(i.commands[0])?0:1),i.numberOfDoubleDots)}(s,t,i.snapshot?._urlSegment,l),d=c.processChildren?vm(c.segmentGroup,c.index,s.commands):aI(c.segmentGroup,c.index,s.commands);return gm(t.root,c.segmentGroup,d,n,r)}(i.snapshot?._lastPathIndex)}function Ry(i){return"object"==typeof i&&null!=i&&!i.outlets&&!i.segmentPath}function ky(i){return"object"==typeof i&&null!=i&&i.outlets}function gm(i,t,e,n,r){let o,s={};n&&os(n,(l,c)=>{s[c]=Array.isArray(l)?l.map(d=>`${d}`):`${l}`}),o=i===t?e:c3(i,t,e);const a=sI(mM(o));return new au(a,s,r)}function c3(i,t,e){const n={};return os(i.children,(r,s)=>{n[s]=r===t?e:c3(r,t,e)}),new Tn(i.segments,n)}class d3{constructor(t,e,n){if(this.isAbsolute=t,this.numberOfDoubleDots=e,this.commands=n,t&&n.length>0&&Ry(n[0]))throw new pe(4003,oI&&"Root segment cannot have matrix parameters");const r=n.find(ky);if(r&&r!==ZB(n))throw new pe(4004,oI&&"{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 aI(i,t,e){if(i||(i=new Tn([],{})),0===i.segments.length&&i.hasChildren())return vm(i,t,e);const n=function Cq(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(ky(a))break;const l=`${a}`,c=n0&&void 0===l)break;if(l&&c&&"object"==typeof c&&void 0===c.outlets){if(!p3(l,c,o))return s;n+=2}else{if(!p3(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]=aI(i.children[o],t,s))}),os(i.children,(s,o)=>{void 0===n[o]&&(r[o]=s)}),new Tn(i.segments,r)}}function lI(i,t,e){const n=i.segments.slice(0,t);let r=0;for(;r{"string"==typeof e&&(e=[e]),null!==e&&(t[n]=lI(new Tn([],{}),0,e))}),t}function f3(i){const t={};return os(i,(e,n)=>t[n]=`${e}`),t}function p3(i,t,e){return i==e.path&&Kl(t,e.parameters)}const Py="imperative";class Zl{constructor(t,e){this.id=t,this.url=e}}class cI extends Zl{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 Oh extends Zl{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 gM extends Zl{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 _M extends Zl{constructor(t,e,n,r){super(t,e),this.reason=n,this.code=r,this.type=16}}class dI extends Zl{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 Eq extends Zl{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 Aq extends Zl{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 Dq extends Zl{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 Tq extends Zl{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 Iq extends Zl{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 Rq{constructor(t){this.route=t,this.type=9}toString(){return`RouteConfigLoadStart(path: ${this.route.path})`}}class kq{constructor(t){this.route=t,this.type=10}toString(){return`RouteConfigLoadEnd(path: ${this.route.path})`}}class Pq{constructor(t){this.snapshot=t,this.type=11}toString(){return`ChildActivationStart(path: '${this.snapshot.routeConfig&&this.snapshot.routeConfig.path||""}')`}}class Oq{constructor(t){this.snapshot=t,this.type=12}toString(){return`ChildActivationEnd(path: '${this.snapshot.routeConfig&&this.snapshot.routeConfig.path||""}')`}}class Fq{constructor(t){this.snapshot=t,this.type=13}toString(){return`ActivationStart(path: '${this.snapshot.routeConfig&&this.snapshot.routeConfig.path||""}')`}}class Lq{constructor(t){this.snapshot=t,this.type=14}toString(){return`ActivationEnd(path: '${this.snapshot.routeConfig&&this.snapshot.routeConfig.path||""}')`}}class m3{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 Uq=(()=>{class i{createUrlTree(e,n,r,s,o,a){return bq(e||n.root,r,s,o,a)}}return i.\u0275fac=function(e){return new(e||i)},i.\u0275prov=Pe({token:i,factory:i.\u0275fac}),i})(),zq=(()=>{class i{}return i.\u0275fac=function(e){return new(e||i)},i.\u0275prov=Pe({token:i,factory:function(t){return Uq.\u0275fac(t)},providedIn:"root"}),i})();class g3{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=uI(t,this._root);return e?e.children.map(n=>n.value):[]}firstChild(t){const e=uI(t,this._root);return e&&e.children.length>0?e.children[0].value:null}siblings(t){const e=hI(t,this._root);return e.length<2?[]:e[e.length-2].children.map(r=>r.value).filter(r=>r!==t)}pathFromRoot(t){return hI(t,this._root).map(e=>e.value)}}function uI(i,t){if(i===t.value)return t;for(const e of t.children){const n=uI(i,e);if(n)return n}return null}function hI(i,t){if(i===t.value)return[t];for(const e of t.children){const n=hI(i,e);if(n.length)return n.unshift(t),n}return[]}class Yc{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 _3 extends g3{constructor(t,e){super(t),this.snapshot=e,fI(this,t)}toString(){return this.snapshot.toString()}}function v3(i,t){const e=function Hq(i,t){const o=new vM([],{},{},"",{},_n,t,null,i.root,-1,{});return new b3("",new Yc(o,[]))}(i,t),n=new Qe([new Dy("",{})]),r=new Qe({}),s=new Qe({}),o=new Qe({}),a=new Qe(""),l=new bm(n,r,o,a,s,_n,t,e.root);return l.snapshot=e.root,new _3(new Yc(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(tt(c=>c[Ay]))??mt(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(tt(t=>mm(t)))),this._paramMap}get queryParamMap(){return this._queryParamMap||(this._queryParamMap=this.queryParams.pipe(tt(t=>mm(t)))),this._queryParamMap}toString(){return this.snapshot?this.snapshot.toString():`Future(${this._futureSnapshot})`}}function y3(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 $q(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 vM{get title(){return this.data?.[Ay]}constructor(t,e,n,r,s,o,a,l,c,d,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=d,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 b3 extends g3{constructor(t,e){super(e),this.url=t,fI(this,e)}toString(){return x3(this._root)}}function fI(i,t){t.value._routerState=i,t.children.forEach(e=>fI(i,e))}function x3(i){const t=i.children.length>0?` { ${i.children.map(x3).join(", ")} } `:"";return`${i.value}${t}`}function pI(i){if(i.snapshot){const t=i.snapshot,e=i._futureSnapshot;i.snapshot=e,Kl(t.queryParams,e.queryParams)||i.queryParams.next(e.queryParams),t.fragment!==e.fragment&&i.fragment.next(e.fragment),Kl(t.params,e.params)||i.params.next(e.params),function iq(i,t){if(i.length!==t.length)return!1;for(let e=0;eKl(e.parameters,t[n].parameters))}(i.url,t.url);return e&&!(!i.parent!=!t.parent)&&(!i.parent||mI(i.parent,t.parent))}function Oy(i,t,e){if(e&&i.shouldReuseRoute(t.value,e.value.snapshot)){const n=e.value;n._futureSnapshot=t.value;const r=function Wq(i,t,e){return t.children.map(n=>{for(const r of e.children)if(i.shouldReuseRoute(n.value,r.value.snapshot))return Oy(i,n,r);return Oy(i,n)})}(i,t,e);return new Yc(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=>Oy(i,a)),o}}const n=function jq(i){return new bm(new Qe(i.url),new Qe(i.params),new Qe(i.queryParams),new Qe(i.fragment),new Qe(i.data),i.outlet,i.component,i)}(t.value),r=t.children.map(s=>Oy(i,s));return new Yc(n,r)}}const gI="ngNavigationCancelingError";function w3(i,t){const{redirectTo:e,navigationBehaviorOptions:n}=Ph(t)?{redirectTo:t,navigationBehaviorOptions:void 0}:t,r=M3(!1,0,t);return r.url=e,r.navigationBehaviorOptions=n,r}function M3(i,t,e){const n=new Error("NavigationCancelingError: "+(i||""));return n[gI]=!0,n.cancellationCode=t,e&&(n.url=e),n}function C3(i){return S3(i)&&Ph(i.url)}function S3(i){return i&&i[gI]}class Yq{constructor(){this.outlet=null,this.route=null,this.resolver=null,this.injector=null,this.children=new Fy,this.attachRef=null}}let Fy=(()=>{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 Yq,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=Pe({token:i,factory:i.\u0275fac,providedIn:"root"}),i})();const yM=!1;let E3=(()=>{class i{constructor(){this.activated=null,this._activatedRoute=null,this.name=_n,this.activateEvents=new $e,this.deactivateEvents=new $e,this.attachEvents=new $e,this.detachEvents=new $e,this.parentContexts=Lt(Fy),this.location=Lt(jr),this.changeDetector=Lt(Qn),this.environmentInjector=Lt(io)}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 pe(4012,yM);return this.activated.instance}get activatedRoute(){if(!this.activated)throw new pe(4012,yM);return this._activatedRoute}get activatedRouteData(){return this._activatedRoute?this._activatedRoute.snapshot.data:{}}detach(){if(!this.activated)throw new pe(4012,yM);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 pe(4013,yM);this._activatedRoute=e;const r=this.location,o=e.snapshot.component,a=this.parentContexts.getOrCreateContext(this.name).children,l=new qq(e,a,r.injector);if(n&&function Xq(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=ve({type:i,selectors:[["router-outlet"]],inputs:{name:"name"},outputs:{activateEvents:"activate",deactivateEvents:"deactivate",attachEvents:"attach",detachEvents:"detach"},exportAs:["outlet"],standalone:!0,features:[xi]}),i})();class qq{constructor(t,e,n){this.route=t,this.childContexts=e,this.parent=n}get(t,e){return t===bm?this.route:t===Fy?this.childContexts:this.parent.get(t,e)}}let _I=(()=>{class i{}return i.\u0275fac=function(e){return new(e||i)},i.\u0275cmp=ot({type:i,selectors:[["ng-component"]],standalone:!0,features:[KD],decls:1,vars:0,template:function(e,n){1&e&&Ie(0,"router-outlet")},dependencies:[E3],encapsulation:2}),i})();function A3(i,t){return i.providers&&!i._injector&&(i._injector=Lw(i.providers,t,`Route: ${i.path}`)),i._injector??t}function yI(i){const t=i.children&&i.children.map(yI),e=t?{...i,children:t}:{...i};return!e.component&&!e.loadComponent&&(t||e.loadChildren)&&e.outlet&&e.outlet!==_n&&(e.component=_I),e}function ka(i){return i.outlet||_n}function D3(i,t){const e=i.filter(n=>ka(n)===t);return e.push(...i.filter(n=>ka(n)!==t)),e}function Ly(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 eX{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),pI(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]}),os(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 Lq(s.value.snapshot))}),t.children.length&&this.forwardEvent(new Oq(t.value.snapshot))}activateRoutes(t,e,n){const r=t.value,s=e?e.value:null;if(pI(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),pI(a.route.value),this.activateChildRoutes(t,null,o.children)}else{const a=Ly(r.snapshot),l=a?.get($l)??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 T3{constructor(t){this.path=t,this.route=this.path[this.path.length-1]}}class bM{constructor(t,e){this.component=t,this.route=e}}function tX(i,t,e){const n=i._root;return Ny(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 Sr(i){return null!==Gf(i)}(i)?t.get(i):i:n}function Ny(i,t,e,n,r={canDeactivateChecks:[],canActivateChecks:[]}){const s=ym(t);return i.children.forEach(o=>{(function iX(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 rX(i,t,e){if("function"==typeof e)return e(i,t);switch(e){case"pathParamsChange":return!kh(i.url,t.url);case"pathParamsOrQueryParamsChange":return!kh(i.url,t.url)||!Kl(i.queryParams,t.queryParams);case"always":return!0;case"paramsOrQueryParamsChange":return!mI(i,t)||!Kl(i.queryParams,t.queryParams);default:return!mI(i,t)}}(o,s,s.routeConfig.runGuardsAndResolvers);l?r.canActivateChecks.push(new T3(n)):(s.data=o.data,s._resolvedData=o._resolvedData),Ny(i,t,s.component?a?a.children:null:e,n,r),l&&a&&a.outlet&&a.outlet.isActivated&&r.canDeactivateChecks.push(new bM(a.outlet.component,o))}else o&&By(t,a,r),r.canActivateChecks.push(new T3(n)),Ny(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]}),os(s,(o,a)=>By(o,e.getContext(a),r)),r}function By(i,t,e){const n=ym(i),r=i.value;os(n,(s,o)=>{By(s,r.component?t?t.children.getContext(o):null:t,e)}),e.canDeactivateChecks.push(new bM(r.component&&t&&t.outlet&&t.outlet.isActivated?t.outlet.component:null,r))}function Uy(i){return"function"==typeof i}function bI(i){return i instanceof fm||"EmptyError"===i?.name}const xM=Symbol("INITIAL_VALUE");function wm(){return ks(i=>Ra(i.map(t=>t.pipe(Oi(1),Do(xM)))).pipe(tt(t=>{for(const e of t)if(!0!==e){if(e===xM)return xM;if(!1===e||e instanceof au)return e}return!0}),gn(t=>t!==xM),Oi(1)))}function I3(i){return function ME(...i){return l0(i)}(Vi(t=>{if(Ph(t))throw w3(0,t)}),tt(t=>!0===t))}const xI={matched:!1,consumedSegments:[],remainingSegments:[],parameters:{},positionalParamSegments:{}};function R3(i,t,e,n,r){const s=wI(i,t,e);return s.matched?function xX(i,t,e,n){const r=t.canMatch;return r&&0!==r.length?mt(r.map(o=>{const a=xm(o,i);return ou(function dX(i){return i&&Uy(i.canMatch)}(a)?a.canMatch(t,e):i.runInContext(()=>a(t,e)))})).pipe(wm(),I3()):mt(!0)}(n=A3(t,n),t,e).pipe(tt(o=>!0===o?s:{...xI})):mt(s)}function wI(i,t,e){if(""===t.path)return"full"===t.pathMatch&&(i.hasChildren()||e.length>0)?{...xI}:{matched:!0,consumedSegments:[],remainingSegments:e,parameters:{},positionalParamSegments:{}};const r=(t.matcher||nq)(e,i,t);if(!r)return{...xI};const s={};os(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 wM(i,t,e,n){if(e.length>0&&function CX(i,t,e){return e.some(n=>MM(i,t,n)&&ka(n)!==_n)}(i,e,n)){const s=new Tn(t,function MX(i,t,e,n){const r={};r[_n]=n,n._sourceSegment=i,n._segmentIndexShift=t.length;for(const s of e)if(""===s.path&&ka(s)!==_n){const o=new Tn([],{});o._sourceSegment=i,o._segmentIndexShift=t.length,r[ka(s)]=o}return r}(i,t,n,new Tn(e,i.children)));return s._sourceSegment=i,s._segmentIndexShift=t.length,{segmentGroup:s,slicedSegments:[]}}if(0===e.length&&function SX(i,t,e){return e.some(n=>MM(i,t,n))}(i,e,n)){const s=new Tn(i.segments,function wX(i,t,e,n,r){const s={};for(const o of n)if(MM(i,e,o)&&!r[ka(o)]){const a=new Tn([],{});a._sourceSegment=i,a._segmentIndexShift=t.length,s[ka(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 Tn(i.segments,i.children);return r._sourceSegment=i,r._segmentIndexShift=t.length,{segmentGroup:r,slicedSegments:e}}function MM(i,t,e){return(!(i.hasChildren()||t.length>0)||"full"!==e.pathMatch)&&""===e.path}function k3(i,t,e,n){return!!(ka(i)===n||n!==_n&&MM(t,e,i))&&("**"===i.path||wI(t,i,e).matched)}function P3(i,t,e){return 0===t.length&&!i.children[e]}const CM=!1;class SM{constructor(t){this.segmentGroup=t||null}}class O3{constructor(t){this.urlTree=t}}function Vy(i){return pm(new SM(i))}function F3(i){return pm(new O3(i))}class TX{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=wM(this.urlTree.root,[],[],this.config).segmentGroup,e=new Tn(t.segments,t.children);return this.expandSegmentGroup(this.injector,this.config,e,_n).pipe(tt(s=>this.createUrlTree(mM(s),this.urlTree.queryParams,this.urlTree.fragment))).pipe(jc(s=>{if(s instanceof O3)return this.allowRedirects=!1,this.match(s.urlTree);throw s instanceof SM?this.noMatchError(s):s}))}match(t){return this.expandSegmentGroup(this.injector,this.config,t.root,_n).pipe(tt(r=>this.createUrlTree(mM(r),t.queryParams,t.fragment))).pipe(jc(r=>{throw r instanceof SM?this.noMatchError(r):r}))}noMatchError(t){return new pe(4002,CM)}createUrlTree(t,e,n){const r=sI(t);return new au(r,e,n)}expandSegmentGroup(t,e,n,r){return 0===n.segments.length&&n.hasChildren()?this.expandChildren(t,e,n).pipe(tt(s=>new Tn([],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 Ni(r).pipe(ru(s=>{const o=n.children[s],a=D3(e,s);return this.expandSegmentGroup(t,a,o,s).pipe(tt(l=>({segment:l,outlet:s})))}),tI((s,o)=>(s[o.outlet]=o.segment,s),{}),jB())}expandSegment(t,e,n,r,s,o){return Ni(n).pipe(ru(a=>this.expandSegmentAgainstRoute(t,e,n,a,r,s,o).pipe(jc(c=>{if(c instanceof SM)return mt(null);throw c}))),iu(a=>!!a),jc((a,l)=>{if(bI(a))return P3(e,r,s)?mt(new Tn([],{})):Vy(e);throw a}))}expandSegmentAgainstRoute(t,e,n,r,s,o,a){return k3(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):Vy(e):Vy(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("/")?F3(s):this.lineralizeSegments(n,s).pipe(rr(o=>{const a=new Tn(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:d}=wI(e,r,s);if(!a)return Vy(e);const h=this.applyRedirectCommands(l,r.redirectTo,d);return r.redirectTo.startsWith("/")?F3(h):this.lineralizeSegments(r,h).pipe(rr(p=>this.expandSegment(t,e,n,p.concat(c),o,!1)))}matchSegmentAgainstRoute(t,e,n,r,s){return"**"===n.path?(t=A3(n,t),n.loadChildren?(n._loadedRoutes?mt({routes:n._loadedRoutes,injector:n._loadedInjector}):this.configLoader.loadChildren(t,n)).pipe(tt(a=>(n._loadedRoutes=a.routes,n._loadedInjector=a.injector,new Tn(r,{})))):mt(new Tn(r,{}))):R3(e,n,r,t).pipe(ks(({matched:o,consumedSegments:a,remainingSegments:l})=>o?this.getChildConfig(t=n._injector??t,n,r).pipe(rr(d=>{const h=d.injector??t,p=d.routes,{segmentGroup:m,slicedSegments:g}=wM(e,a,l,p),b=new Tn(m.segments,m.children);if(0===g.length&&b.hasChildren())return this.expandChildren(h,p,b).pipe(tt(x=>new Tn(a,x)));if(0===p.length&&0===g.length)return mt(new Tn(a,{}));const v=ka(n)===s;return this.expandSegment(h,b,p,g,v?_n:s,!0).pipe(tt(M=>new Tn(a.concat(M.segments),M.children)))})):Vy(e)))}getChildConfig(t,e,n){return e.children?mt({routes:e.children,injector:t}):e.loadChildren?void 0!==e._loadedRoutes?mt({routes:e._loadedRoutes,injector:e._loadedInjector}):function bX(i,t,e,n){const r=t.canLoad;return void 0===r||0===r.length?mt(!0):mt(r.map(o=>{const a=xm(o,i);return ou(function oX(i){return i&&Uy(i.canLoad)}(a)?a.canLoad(t,e):i.runInContext(()=>a(t,e)))})).pipe(wm(),I3())}(t,e,n).pipe(rr(r=>r?this.configLoader.loadChildren(t,e).pipe(Vi(s=>{e._loadedRoutes=s.routes,e._loadedInjector=s.injector})):function AX(i){return pm(M3(CM,3))}())):mt({routes:[],injector:t})}lineralizeSegments(t,e){let n=[],r=e.root;for(;;){if(n=n.concat(r.segments),0===r.numberOfChildren)return mt(n);if(r.numberOfChildren>1||!r.children[_n])return t.redirectTo,pm(new pe(4e3,CM));r=r.children[_n]}}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 au(s,this.createQueryParams(e.queryParams,this.urlTree.queryParams),e.fragment)}createQueryParams(t,e){const n={};return os(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 os(e.children,(a,l)=>{o[l]=this.createSegmentGroup(t,a,n,r)}),new Tn(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 pe(4001,CM);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 RX{}class OX{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=wM(this.urlTree.root,[],[],this.config.filter(e=>void 0===e.redirectTo)).segmentGroup;return this.processSegmentGroup(this.injector,this.config,t,_n).pipe(tt(e=>{if(null===e)return null;const n=new vM([],Object.freeze({}),Object.freeze({...this.urlTree.queryParams}),this.urlTree.fragment,{},_n,this.rootComponentType,null,this.urlTree.root,-1,{}),r=new Yc(n,e),s=new b3(this.url,r);return this.inheritParamsAndData(s._root),s}))}inheritParamsAndData(t){const e=t.value,n=y3(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 Ni(Object.keys(n.children)).pipe(ru(r=>{const s=n.children[r],o=D3(e,r);return this.processSegmentGroup(t,o,s,r)}),tI((r,s)=>r&&s?(r.push(...s),r):null),YB(r=>null!==r),lM(null),jB(),tt(r=>{if(null===r)return null;const s=N3(r);return function FX(i){i.sort((t,e)=>t.value.outlet===_n?-1:e.value.outlet===_n?1:t.value.outlet.localeCompare(e.value.outlet))}(s),s}))}processSegment(t,e,n,r,s){return Ni(e).pipe(ru(o=>this.processSegmentAgainstRoute(o._injector??t,o,n,r,s)),iu(o=>!!o),jc(o=>{if(bI(o))return P3(n,r,s)?mt([]):mt(null);throw o}))}processSegmentAgainstRoute(t,e,n,r,s){if(e.redirectTo||!k3(e,n,r,s))return mt(null);let o;if("**"===e.path){const a=r.length>0?ZB(r).parameters:{},l=U3(n)+r.length;o=mt({snapshot:new vM(r,a,Object.freeze({...this.urlTree.queryParams}),this.urlTree.fragment,V3(e),ka(e),e.component??e._loadedComponent??null,e,B3(n),l,z3(e)),consumedSegments:[],remainingSegments:[]})}else o=R3(n,e,r,t).pipe(tt(({matched:a,consumedSegments:l,remainingSegments:c,parameters:d})=>{if(!a)return null;const h=U3(n)+l.length;return{snapshot:new vM(l,d,Object.freeze({...this.urlTree.queryParams}),this.urlTree.fragment,V3(e),ka(e),e.component??e._loadedComponent??null,e,B3(n),h,z3(e)),consumedSegments:l,remainingSegments:c}}));return o.pipe(ks(a=>{if(null===a)return mt(null);const{snapshot:l,consumedSegments:c,remainingSegments:d}=a;t=e._injector??t;const h=e._loadedInjector??t,p=function LX(i){return i.children?i.children:i.loadChildren?i._loadedRoutes:[]}(e),{segmentGroup:m,slicedSegments:g}=wM(n,c,d,p.filter(v=>void 0===v.redirectTo));if(0===g.length&&m.hasChildren())return this.processChildren(h,p,m).pipe(tt(v=>null===v?null:[new Yc(l,v)]));if(0===p.length&&0===g.length)return mt([new Yc(l,[])]);const b=ka(e)===s;return this.processSegment(h,p,m,g,b?_n:s).pipe(tt(v=>null===v?null:[new Yc(l,v)]))}))}}function NX(i){const t=i.value.routeConfig;return t&&""===t.path&&void 0===t.redirectTo}function N3(i){const t=[],e=new Set;for(const n of i){if(!NX(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=N3(n.children);t.push(new Yc(n.value,r))}return t.filter(n=>!e.has(n))}function B3(i){let t=i;for(;t._sourceSegment;)t=t._sourceSegment;return t}function U3(i){let t=i,e=t._segmentIndexShift??0;for(;t._sourceSegment;)t=t._sourceSegment,e+=t._segmentIndexShift??0;return e-1}function V3(i){return i.data||{}}function z3(i){return i.resolve||{}}function H3(i){return"string"==typeof i.title||null===i.title}function MI(i){return ks(t=>{const e=i(t);return e?Ni(e).pipe(tt(()=>t)):mt(t)})}const Mm=new me("ROUTES");let CI=(()=>{class i{constructor(){this.componentLoaders=new WeakMap,this.childrenLoaders=new WeakMap,this.compiler=Lt(gN)}loadComponent(e){if(this.componentLoaders.get(e))return this.componentLoaders.get(e);if(e._loadedComponent)return mt(e._loadedComponent);this.onLoadStartListener&&this.onLoadStartListener(e);const n=ou(e.loadComponent()).pipe(tt(G3),Vi(s=>{this.onLoadEndListener&&this.onLoadEndListener(e),e._loadedComponent=s}),su(()=>{this.componentLoaders.delete(e)})),r=new GB(n,()=>new Te).pipe(eI());return this.componentLoaders.set(e,r),r}loadChildren(e,n){if(this.childrenLoaders.get(n))return this.childrenLoaders.get(n);if(n._loadedRoutes)return mt({routes:n._loadedRoutes,injector:n._loadedInjector});this.onLoadStartListener&&this.onLoadStartListener(n);const s=this.loadModuleFactoryOrRoutes(n.loadChildren).pipe(tt(a=>{this.onLoadEndListener&&this.onLoadEndListener(n);let l,c,d=!1;Array.isArray(a)?c=a:(l=a.create(e).injector,c=KB(l.get(Mm,[],Ft.Self|Ft.Optional)));return{routes:c.map(yI),injector:l}}),su(()=>{this.childrenLoaders.delete(n)})),o=new GB(s,()=>new Te).pipe(eI());return this.childrenLoaders.set(n,o),o}loadModuleFactoryOrRoutes(e){return ou(e()).pipe(tt(G3),rr(n=>n instanceof T2||Array.isArray(n)?mt(n):Ni(this.compiler.compileModuleAsync(n))))}}return i.\u0275fac=function(e){return new(e||i)},i.\u0275prov=Pe({token:i,factory:i.\u0275fac,providedIn:"root"}),i})();function G3(i){return function WX(i){return i&&"object"==typeof i&&"default"in i}(i)?i.default:i}let AM=(()=>{class i{get hasRequestedNavigation(){return 0!==this.navigationId}constructor(){this.currentNavigation=null,this.lastSuccessfulNavigation=null,this.events=new Te,this.configLoader=Lt(CI),this.environmentInjector=Lt(io),this.urlSerializer=Lt(Ty),this.rootContexts=Lt(Fy),this.navigationId=0,this.afterPreactivation=()=>mt(void 0),this.rootComponentType=null,this.configLoader.onLoadEndListener=r=>this.events.next(new kq(r)),this.configLoader.onLoadStartListener=r=>this.events.next(new Rq(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 Qe({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:Py,restoredState:null,currentSnapshot:e.routerState.snapshot,targetSnapshot:null,currentRouterState:e.routerState,targetRouterState:null,guards:{canActivateChecks:[],canDeactivateChecks:[]},guardsResult:null}),this.transitions.pipe(gn(n=>0!==n.id),tt(n=>({...n,extractedUrl:e.urlHandlingStrategy.extract(n.rawUrl)})),ks(n=>{let r=!1,s=!1;return mt(n).pipe(Vi(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}}),ks(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 d="";return this.events.next(new _M(o.id,e.serializeUrl(n.rawUrl),d,0)),e.rawUrlTree=o.rawUrl,o.resolve(null),_o}if(e.urlHandlingStrategy.shouldProcessUrl(o.rawUrl))return W3(o.source)&&(e.browserUrlTree=o.extractedUrl),mt(o).pipe(ks(d=>{const h=this.transitions?.getValue();return this.events.next(new cI(d.id,this.urlSerializer.serialize(d.extractedUrl),d.source,d.restoredState)),h!==this.transitions?.getValue()?_o:Promise.resolve(d)}),function IX(i,t,e,n){return ks(r=>function DX(i,t,e,n,r){return new TX(i,t,e,n,r).apply()}(i,t,e,r.extractedUrl,n).pipe(tt(s=>({...r,urlAfterRedirects:s}))))}(this.environmentInjector,this.configLoader,this.urlSerializer,e.config),Vi(d=>{this.currentNavigation={...this.currentNavigation,finalUrl:d.urlAfterRedirects},n.urlAfterRedirects=d.urlAfterRedirects}),function UX(i,t,e,n,r){return rr(s=>function PX(i,t,e,n,r,s,o="emptyOnly"){return new OX(i,t,e,n,r,o,s).recognize().pipe(ks(a=>null===a?function kX(i){return new In(t=>t.error(i))}(new RX):mt(a)))}(i,t,e,s.urlAfterRedirects,n.serialize(s.urlAfterRedirects),n,r).pipe(tt(o=>({...s,targetSnapshot:o}))))}(this.environmentInjector,this.rootComponentType,e.config,this.urlSerializer,e.paramsInheritanceStrategy),Vi(d=>{if(n.targetSnapshot=d.targetSnapshot,"eager"===e.urlUpdateStrategy){if(!d.extras.skipLocationChange){const p=e.urlHandlingStrategy.merge(d.urlAfterRedirects,d.rawUrl);e.setBrowserUrl(p,d)}e.browserUrlTree=d.urlAfterRedirects}const h=new Eq(d.id,this.urlSerializer.serialize(d.extractedUrl),this.urlSerializer.serialize(d.urlAfterRedirects),d.targetSnapshot);this.events.next(h)}));if(l&&e.urlHandlingStrategy.shouldProcessUrl(e.rawUrlTree)){const{id:d,extractedUrl:h,source:p,restoredState:m,extras:g}=o,b=new cI(d,this.urlSerializer.serialize(h),p,m);this.events.next(b);const v=v3(h,this.rootComponentType).snapshot;return mt(n={...o,targetSnapshot:v,urlAfterRedirects:h,extras:{...g,skipLocationChange:!1,replaceUrl:!1}})}{const d="";return this.events.next(new _M(o.id,e.serializeUrl(n.extractedUrl),d,1)),e.rawUrlTree=o.rawUrl,o.resolve(null),_o}}),Vi(o=>{const a=new Aq(o.id,this.urlSerializer.serialize(o.extractedUrl),this.urlSerializer.serialize(o.urlAfterRedirects),o.targetSnapshot);this.events.next(a)}),tt(o=>n={...o,guards:tX(o.targetSnapshot,o.currentSnapshot,this.rootContexts)}),function hX(i,t){return rr(e=>{const{targetSnapshot:n,currentSnapshot:r,guards:{canActivateChecks:s,canDeactivateChecks:o}}=e;return 0===o.length&&0===s.length?mt({...e,guardsResult:!0}):function fX(i,t,e,n){return Ni(i).pipe(rr(r=>function yX(i,t,e,n,r){const s=t&&t.routeConfig?t.routeConfig.canDeactivate:null;return s&&0!==s.length?mt(s.map(a=>{const l=Ly(t)??r,c=xm(a,l);return ou(function cX(i){return i&&Uy(i.canDeactivate)}(c)?c.canDeactivate(i,t,e,n):l.runInContext(()=>c(i,t,e,n))).pipe(iu())})).pipe(wm()):mt(!0)}(r.component,r.route,e,t,n)),iu(r=>!0!==r,!0))}(o,n,r,i).pipe(rr(a=>a&&function sX(i){return"boolean"==typeof i}(a)?function pX(i,t,e,n){return Ni(t).pipe(ru(r=>Sy(function gX(i,t){return null!==i&&t&&t(new Pq(i)),mt(!0)}(r.route.parent,n),function mX(i,t){return null!==i&&t&&t(new Fq(i)),mt(!0)}(r.route,n),function vX(i,t,e){const n=t[t.length-1],s=t.slice(0,t.length-1).reverse().map(o=>function nX(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=>Ey(()=>mt(o.guards.map(l=>{const c=Ly(o.node)??e,d=xm(l,c);return ou(function lX(i){return i&&Uy(i.canActivateChild)}(d)?d.canActivateChild(n,i):c.runInContext(()=>d(n,i))).pipe(iu())})).pipe(wm())));return mt(s).pipe(wm())}(i,r.path,e),function _X(i,t,e){const n=t.routeConfig?t.routeConfig.canActivate:null;if(!n||0===n.length)return mt(!0);const r=n.map(s=>Ey(()=>{const o=Ly(t)??e,a=xm(s,o);return ou(function aX(i){return i&&Uy(i.canActivate)}(a)?a.canActivate(t,i):o.runInContext(()=>a(t,i))).pipe(iu())}));return mt(r).pipe(wm())}(i,r.route,e))),iu(r=>!0!==r,!0))}(n,s,i,t):mt(a)),tt(a=>({...e,guardsResult:a})))})}(this.environmentInjector,o=>this.events.next(o)),Vi(o=>{if(n.guardsResult=o.guardsResult,Ph(o.guardsResult))throw w3(0,o.guardsResult);const a=new Dq(o.id,this.urlSerializer.serialize(o.extractedUrl),this.urlSerializer.serialize(o.urlAfterRedirects),o.targetSnapshot,!!o.guardsResult);this.events.next(a)}),gn(o=>!!o.guardsResult||(e.restoreHistory(o),this.cancelNavigationTransition(o,"",3),!1)),MI(o=>{if(o.guards.canActivateChecks.length)return mt(o).pipe(Vi(a=>{const l=new Tq(a.id,this.urlSerializer.serialize(a.extractedUrl),this.urlSerializer.serialize(a.urlAfterRedirects),a.targetSnapshot);this.events.next(l)}),ks(a=>{let l=!1;return mt(a).pipe(function VX(i,t){return rr(e=>{const{targetSnapshot:n,guards:{canActivateChecks:r}}=e;if(!r.length)return mt(e);let s=0;return Ni(r).pipe(ru(o=>function zX(i,t,e,n){const r=i.routeConfig,s=i._resolve;return void 0!==r?.title&&!H3(r)&&(s[Ay]=r.title),function HX(i,t,e,n){const r=function $X(i){return[...Object.keys(i),...Object.getOwnPropertySymbols(i)]}(i);if(0===r.length)return mt({});const s={};return Ni(r).pipe(rr(o=>function GX(i,t,e,n){const r=Ly(t)??n,s=xm(i,r);return ou(s.resolve?s.resolve(t,e):r.runInContext(()=>s(t,e)))}(i[o],t,e,n).pipe(iu(),Vi(a=>{s[o]=a}))),nI(1),qB(s),jc(o=>bI(o)?_o:pm(o)))}(s,i,t,n).pipe(tt(o=>(i._resolvedData=o,i.data=y3(i,e).resolve,r&&H3(r)&&(i.data[Ay]=r.title),null)))}(o.route,n,i,t)),Vi(()=>s++),nI(1),rr(o=>s===r.length?mt(e):_o))})}(e.paramsInheritanceStrategy,this.environmentInjector),Vi({next:()=>l=!0,complete:()=>{l||(e.restoreHistory(a),this.cancelNavigationTransition(a,"",2))}}))}),Vi(a=>{const l=new Iq(a.id,this.urlSerializer.serialize(a.extractedUrl),this.urlSerializer.serialize(a.urlAfterRedirects),a.targetSnapshot);this.events.next(l)}))}),MI(o=>{const a=l=>{const c=[];l.routeConfig?.loadComponent&&!l.routeConfig._loadedComponent&&c.push(this.configLoader.loadComponent(l.routeConfig).pipe(Vi(d=>{l.component=d}),tt(()=>{})));for(const d of l.children)c.push(...a(d));return c};return Ra(a(o.targetSnapshot.root)).pipe(lM(),Oi(1))}),MI(()=>this.afterPreactivation()),tt(o=>{const a=function Gq(i,t,e){const n=Oy(i,t._root,e?e._root:void 0);return new _3(n,t)}(e.routeReuseStrategy,o.targetSnapshot,o.currentRouterState);return n={...o,targetRouterState:a}}),Vi(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)=>tt(n=>(new eX(t,n.targetRouterState,n.currentRouterState,e).activate(i),n)))(this.rootContexts,e.routeReuseStrategy,o=>this.events.next(o)),Oi(1),Vi({next:o=>{r=!0,this.lastSuccessfulNavigation=this.currentNavigation,e.navigated=!0,this.events.next(new Oh(o.id,this.urlSerializer.serialize(o.extractedUrl),this.urlSerializer.serialize(e.currentUrlTree))),e.titleStrategy?.updateTitle(o.targetRouterState.snapshot),o.resolve(!0)},complete:()=>{r=!0}}),su(()=>{r||s||this.cancelNavigationTransition(n,"",1),this.currentNavigation?.id===n.id&&(this.currentNavigation=null)}),jc(o=>{if(s=!0,S3(o)){C3(o)||(e.navigated=!0,e.restoreHistory(n,!0));const a=new gM(n.id,this.urlSerializer.serialize(n.extractedUrl),o.message,o.cancellationCode);if(this.events.next(a),C3(o)){const l=e.urlHandlingStrategy.merge(o.url,e.rawUrlTree),c={skipLocationChange:n.extras.skipLocationChange,replaceUrl:"eager"===e.urlUpdateStrategy||W3(n.source)};e.scheduleNavigation(l,Py,null,c,{resolve:n.resolve,reject:n.reject,promise:n.promise})}else n.resolve(!1)}else{e.restoreHistory(n,!0);const a=new dI(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 _o}))}))}cancelNavigationTransition(e,n,r){const s=new gM(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=Pe({token:i,factory:i.\u0275fac,providedIn:"root"}),i})();function W3(i){return i!==Py}let j3=(()=>{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===_n);return n}getResolvedTitleForRoute(e){return e.data[Ay]}}return i.\u0275fac=function(e){return new(e||i)},i.\u0275prov=Pe({token:i,factory:function(){return Lt(jX)},providedIn:"root"}),i})(),jX=(()=>{class i extends j3{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)(ee(NB))},i.\u0275prov=Pe({token:i,factory:i.\u0275fac,providedIn:"root"}),i})(),YX=(()=>{class i{}return i.\u0275fac=function(e){return new(e||i)},i.\u0275prov=Pe({token:i,factory:function(){return Lt(XX)},providedIn:"root"}),i})();class qX{shouldDetach(t){return!1}store(t,e){}shouldAttach(t){return!1}retrieve(t){return null}shouldReuseRoute(t,e){return t.routeConfig===e.routeConfig}}let XX=(()=>{class i extends qX{}return i.\u0275fac=function(){let t;return function(n){return(t||(t=si(i)))(n||i)}}(),i.\u0275prov=Pe({token:i,factory:i.\u0275fac,providedIn:"root"}),i})();const DM=new me("",{providedIn:"root",factory:()=>({})});let ZX=(()=>{class i{}return i.\u0275fac=function(e){return new(e||i)},i.\u0275prov=Pe({token:i,factory:function(){return Lt(QX)},providedIn:"root"}),i})(),QX=(()=>{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=Pe({token:i,factory:i.\u0275fac,providedIn:"root"}),i})();function JX(i){throw i}function eK(i,t,e){return t.parse("/")}const tK={paths:"exact",fragment:"ignored",matrixParams:"ignored",queryParams:"exact"},nK={paths:"subset",fragment:"ignored",matrixParams:"ignored",queryParams:"subset"};let Xo=(()=>{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=Lt(L6),this.isNgZoneEnabled=!1,this.options=Lt(DM,{optional:!0})||{},this.errorHandler=this.options.errorHandler||JX,this.malformedUriErrorHandler=this.options.malformedUriErrorHandler||eK,this.navigated=!1,this.lastSuccessfulId=-1,this.urlHandlingStrategy=Lt(ZX),this.routeReuseStrategy=Lt(YX),this.urlCreationStrategy=Lt(zq),this.titleStrategy=Lt(j3),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=KB(Lt(Mm,{optional:!0})??[]),this.navigationTransitions=Lt(AM),this.urlSerializer=Lt(Ty),this.location=Lt(_y),this.isNgZoneEnabled=Lt(gt)instanceof gt&>.isInAngularZone(),this.resetConfig(this.config),this.currentUrlTree=new au,this.rawUrlTree=this.currentUrlTree,this.browserUrlTree=this.currentUrlTree,this.routerState=v3(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),Py,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(yI),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 d=null;switch(a){case"merge":d={...this.currentUrlTree.queryParams,...s};break;case"preserve":d=this.currentUrlTree.queryParams;break;default:d=s||null}return null!==d&&(d=this.removeEmptyProps(d)),this.urlCreationStrategy.createUrlTree(r,this.routerState,this.currentUrlTree,e,d,c??null)}navigateByUrl(e,n={skipLocationChange:!1}){const r=Ph(e)?e:this.parseUrl(e),s=this.urlHandlingStrategy.merge(r,this.rawUrlTree);return this.scheduleNavigation(s,Py,null,n)}navigate(e,n={skipLocationChange:!1}){return function iK(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,d;return o?(a=o.resolve,l=o.reject,c=o.promise):c=new Promise((h,p)=>{a=h,l=p}),d="computed"===this.canceledNavigationResolution?r&&r.\u0275routerPageId?r.\u0275routerPageId:(this.browserPageId??0)+1:0,this.navigationTransitions.handleNavigationRequest({targetPageId:d,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=Pe({token:i,factory:i.\u0275fac,providedIn:"root"}),i})();class Y3{}let oK=(()=>{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(gn(e=>e instanceof Oh),ru(()=>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=Lw(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 Ni(r).pipe(bd())}preloadConfig(e,n){return this.preloadingStrategy.preload(n,()=>{let r;r=n.loadChildren&&void 0===n.canLoad?this.loader.loadChildren(e,n):mt(null);const s=r.pipe(rr(o=>null===o?mt(void 0):(n._loadedRoutes=o.routes,n._loadedInjector=o.injector,this.processRoutes(o.injector??e,o.routes))));return n.loadComponent&&!n._loadedComponent?Ni([s,this.loader.loadComponent(n)]).pipe(bd()):s})}}return i.\u0275fac=function(e){return new(e||i)(ee(Xo),ee(gN),ee(io),ee(Y3),ee(CI))},i.\u0275prov=Pe({token:i,factory:i.\u0275fac,providedIn:"root"}),i})();const AI=new me("");let q3=(()=>{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 cI?(this.store[this.lastId]=this.viewportScroller.getScrollPosition(),this.lastSource=e.navigationTrigger,this.restoredId=e.restoredState?e.restoredState.navigationId:0):e instanceof Oh&&(this.lastId=e.id,this.scheduleScrollEvent(e,this.urlSerializer.parse(e.urlAfterRedirects).fragment))})}consumeScrollEvents(){return this.transitions.events.subscribe(e=>{e instanceof m3&&(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 m3(e,"popstate"===this.lastSource?this.store[this.restoredId]:null,n))})},0)})}ngOnDestroy(){this.routerEventsSubscription?.unsubscribe(),this.scrollEventsSubscription?.unsubscribe()}}return i.\u0275fac=function(e){Co()},i.\u0275prov=Pe({token:i,factory:i.\u0275fac}),i})();var Ko=(()=>((Ko=Ko||{})[Ko.COMPLETE=0]="COMPLETE",Ko[Ko.FAILED=1]="FAILED",Ko[Ko.REDIRECTING=2]="REDIRECTING",Ko))();const Cm=!1;function lu(i,t){return{\u0275kind:i,\u0275providers:t}}const DI=new me("",{providedIn:"root",factory:()=>!1});function K3(){const i=Lt(Gi);return t=>{const e=i.get(dm);if(t!==e.components[0])return;const n=i.get(Xo),r=i.get(Z3);1===i.get(TI)&&n.initialNavigation(),i.get(Q3,null,Ft.Optional)?.setUpPreloading(),i.get(AI,null,Ft.Optional)?.init(),n.resetRootComponentType(e.componentTypes[0]),r.closed||(r.next(),r.complete(),r.unsubscribe())}}const Z3=new me(Cm?"bootstrap done indicator":"",{factory:()=>new Te}),TI=new me(Cm?"initial navigation":"",{providedIn:"root",factory:()=>1});function uK(){let i=[];return i=Cm?[{provide:Bp,multi:!0,useFactory:()=>{const t=Lt(Xo);return()=>t.events.subscribe(e=>{console.group?.(`Router Event: ${e.constructor.name}`),console.log(function Nq(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?.()})}}]:[],lu(1,i)}const Q3=new me(Cm?"router preloader":"");function hK(i){return lu(0,[{provide:Q3,useExisting:oK},{provide:Y3,useExisting:i}])}const zy=!1,J3=new me(zy?"router duplicate forRoot guard":"ROUTER_FORROOT_GUARD"),fK=[_y,{provide:Ty,useClass:iI},Xo,Fy,{provide:bm,useFactory:function X3(i){return i.routerState.root},deps:[Xo]},CI,zy?{provide:DI,useValue:!0}:[]];function pK(){return new CN("Router",Xo)}let eU=(()=>{class i{constructor(e){}static forRoot(e,n){return{ngModule:i,providers:[fK,zy&&n?.enableTracing?uK().\u0275providers:[],{provide:Mm,multi:!0,useValue:e},{provide:J3,useFactory:vK,deps:[[Xo,new Ss,new Ma]]},{provide:DM,useValue:n||{}},n?.useHash?{provide:Rh,useClass:C9}:{provide:Rh,useClass:YN},{provide:AI,useFactory:()=>{const i=Lt(UY),t=Lt(gt),e=Lt(DM),n=Lt(AM),r=Lt(Ty);return e.scrollOffset&&i.setOffset(e.scrollOffset),new q3(r,n,i,t,e)}},n?.preloadingStrategy?hK(n.preloadingStrategy).\u0275providers:[],{provide:CN,multi:!0,useFactory:pK},n?.initialNavigation?yK(n):[],[{provide:tU,useFactory:K3},{provide:MN,multi:!0,useExisting:tU}]]}}static forChild(e){return{ngModule:i,providers:[{provide:Mm,multi:!0,useValue:e}]}}}return i.\u0275fac=function(e){return new(e||i)(ee(J3,8))},i.\u0275mod=en({type:i}),i.\u0275inj=Wt({imports:[_I]}),i})();function vK(i){if(zy&&i)throw new pe(4007,"The Router was provided more than once. This can happen if 'forRoot' is used outside of the root injector. Lazy loaded modules should use RouterModule.forChild() instead.");return"guarded"}function yK(i){return["disabled"===i.initialNavigation?lu(3,[{provide:Vw,multi:!0,useFactory:()=>{const t=Lt(Xo);return()=>{t.setUpLocationChangeListener()}}},{provide:TI,useValue:2}]).\u0275providers:[],"enabledBlocking"===i.initialNavigation?lu(2,[{provide:TI,useValue:0},{provide:Vw,multi:!0,deps:[Gi],useFactory:t=>{const e=t.get(w9,Promise.resolve());return()=>e.then(()=>new Promise(n=>{const r=t.get(Xo),s=t.get(Z3);(function aK(i,t){i.events.pipe(gn(e=>e instanceof Oh||e instanceof gM||e instanceof dI||e instanceof _M),tt(e=>e instanceof Oh||e instanceof _M?Ko.COMPLETE:e instanceof gM&&(0===e.code||1===e.code)?Ko.REDIRECTING:Ko.FAILED),gn(e=>e!==Ko.REDIRECTING),Oi(1)).subscribe(()=>{t()})})(r,()=>{n(!0)}),t.get(AM).afterPreactivation=()=>(n(!0),s.closed?mt(void 0):s),r.initialNavigation()}))}}]).\u0275providers:[]]}const tU=new me(zy?"Router Initializer":""),xK=[];let wK=(()=>{class i{}return i.\u0275fac=function(e){return new(e||i)},i.\u0275mod=en({type:i}),i.\u0275inj=Wt({imports:[eU.forRoot(xK),eU]}),i})();function nU(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 nt(i){return function(){var t=this,e=arguments;return new Promise(function(n,r){var s=i.apply(t,e);function o(l){nU(s,n,r,o,a,"next",l)}function a(l){nU(s,n,r,o,a,"throw",l)}o(void 0)})}}function tn(i){return null!=i&&"false"!=`${i}`}function Ps(i,t=0){return function MK(i){return!isNaN(parseFloat(i))&&!isNaN(Number(i))}(i)?Number(i):t}function TM(i){return Array.isArray(i)?i:[i]}function _r(i){return null==i?"":"string"==typeof i?i:`${i}px`}function qc(i){return i instanceof vt?i.nativeElement:i}const CK=["addListener","removeListener"],SK=["addEventListener","removeEventListener"],EK=["on","off"];function To(i,t,e,n){if(dn(e)&&(n=e,e=void 0),n)return To(i,t,e).pipe(JT(n));const[r,s]=function TK(i){return dn(i.addEventListener)&&dn(i.removeEventListener)}(i)?SK.map(o=>a=>i[o](t,a,e)):function AK(i){return dn(i.addListener)&&dn(i.removeListener)}(i)?CK.map(iU(i,t)):function DK(i){return dn(i.on)&&dn(i.off)}(i)?EK.map(iU(i,t)):[];if(!r&&i_(i))return rr(o=>To(o,t,e))(Mr(i));if(!r)throw new TypeError("Invalid event target");return new In(o=>{const a=(...l)=>o.next(1s(a)})}function iU(i,t){return e=>n=>i[e](t,n)}class IK extends Qt{constructor(t,e){super()}schedule(t,e=0){return this}}const IM={setInterval(i,t,...e){const{delegate:n}=IM;return n?.setInterval?n.setInterval(i,t,...e):setInterval(i,t,...e)},clearInterval(i){const{delegate:t}=IM;return(t?.clearInterval||clearInterval)(i)},delegate:void 0};class II extends IK{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 IM.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&&IM.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,Kr(n,this),null!=t&&(this.id=this.recycleAsyncId(e,t,null)),this.delay=null,super.unsubscribe()}}}const Hy={schedule(i){let t=requestAnimationFrame,e=cancelAnimationFrame;const{delegate:n}=Hy;n&&(t=n.requestAnimationFrame,e=n.cancelAnimationFrame);const r=t(s=>{e=void 0,i(s)});return new Qt(()=>e?.(r))},requestAnimationFrame(...i){const{delegate:t}=Hy;return(t?.requestAnimationFrame||requestAnimationFrame)(...i)},cancelAnimationFrame(...i){const{delegate:t}=Hy;return(t?.cancelAnimationFrame||cancelAnimationFrame)(...i)},delegate:void 0},rU={now:()=>(rU.delegate||Date).now(),delegate:void 0};class $y{constructor(t,e=$y.now){this.schedulerActionCtor=t,this.now=e}schedule(t,e=0,n){return new this.schedulerActionCtor(this,t).schedule(n,e)}}$y.now=rU.now;class RI extends $y{constructor(t,e=$y.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 PK=new class kK extends RI{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 RK extends II{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=Hy.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&&(Hy.cancelAnimationFrame(e),t._scheduled=void 0)}});let kI,OK=1;const RM={};function sU(i){return i in RM&&(delete RM[i],!0)}const FK={setImmediate(i){const t=OK++;return RM[t]=!0,kI||(kI=Promise.resolve()),kI.then(()=>sU(t)&&i()),t},clearImmediate(i){sU(i)}},{setImmediate:LK,clearImmediate:NK}=FK,kM={setImmediate(...i){const{delegate:t}=kM;return(t?.setImmediate||LK)(...i)},clearImmediate(i){const{delegate:t}=kM;return(t?.clearImmediate||NK)(i)},delegate:void 0},PI=new class UK extends RI{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 BK extends II{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=kM.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&&(kM.clearImmediate(e),t._scheduled===e&&(t._scheduled=void 0))}}),Gy=new RI(II),VK=Gy;function OI(i=0,t,e=VK){let n=-1;return null!=t&&($u(t)?e=t:n=t),new In(r=>{let s=function HK(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 Wy(i,t=Gy){return function zK(i){return ni((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(qn(e,c=>{n=!0,r=c,s||Mr(i(c)).subscribe(s=qn(e,a,l))},()=>{o=!0,(!n||!s||s.closed)&&e.complete()}))})}(()=>OI(i,t))}function Ue(i){return ni((t,e)=>{Mr(i).subscribe(qn(e,()=>e.complete(),ms)),!e.closed&&t.subscribe(e)})}let FI;try{FI=typeof Intl<"u"&&Intl.v8BreakIterator}catch{FI=!1}let Sm,zi=(()=>{class i{constructor(e){this._platformId=e,this.isBrowser=this._platformId?function BY(i){return i===fB}(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&&!FI)&&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)(ee(hT))},i.\u0275prov=Pe({token:i,factory:i.\u0275fac,providedIn:"root"}),i})();const oU=["color","button","checkbox","date","datetime-local","email","file","hidden","image","month","number","password","radio","range","reset","search","submit","tel","text","time","url","week"];function aU(){if(Sm)return Sm;if("object"!=typeof document||!document)return Sm=new Set(oU),Sm;let i=document.createElement("input");return Sm=new Set(oU.filter(t=>(i.setAttribute("type",t),i.type===t))),Sm}let jy,PM,Lh,LI;function Fh(i){return function $K(){if(null==jy&&typeof window<"u")try{window.addEventListener("test",null,Object.defineProperty({},"passive",{get:()=>jy=!0}))}finally{jy=jy||!1}return jy}()?i:!!i.capture}function lU(){if(null==Lh){if("object"!=typeof document||!document||"function"!=typeof Element||!Element)return Lh=!1,Lh;if("scrollBehavior"in document.documentElement.style)Lh=!0;else{const i=Element.prototype.scrollTo;Lh=!!i&&!/\{\s*\[native code\]\s*\}/.test(i.toString())}}return Lh}function Yy(){if("object"!=typeof document||!document)return 0;if(null==PM){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),PM=0,0===i.scrollLeft&&(i.scrollLeft=1,PM=0===i.scrollLeft?1:2),i.remove()}return PM}function OM(){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 cu(i){return i.composedPath?i.composedPath()[0]:i.target}function NI(){return typeof __karma__<"u"&&!!__karma__||typeof jasmine<"u"&&!!jasmine||typeof jest<"u"&&!!jest||typeof Mocha<"u"&&!!Mocha}const jK=new me("cdk-dir-doc",{providedIn:"root",factory:function YK(){return Lt(qt)}}),qK=/^(ar|ckb|dv|he|iw|fa|nqo|ps|sd|ug|ur|yi|.*[-_](Adlm|Arab|Hebr|Nkoo|Rohg|Thaa))(?!.*[-_](Latn|Cyrl)($|-|_))($|-|_)/i;let Pa=(()=>{class i{constructor(e){this.value="ltr",this.change=new $e,e&&(this.value=function XK(i){const t=i?.toLowerCase()||"";return"auto"===t&&typeof navigator<"u"&&navigator?.language?qK.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)(ee(jK,8))},i.\u0275prov=Pe({token:i,factory:i.\u0275fac,providedIn:"root"}),i})(),qy=(()=>{class i{}return i.\u0275fac=function(e){return new(e||i)},i.\u0275mod=en({type:i}),i.\u0275inj=Wt({}),i})();const KK=["contentWrapper"],ZK=["*"],QK=new me("VIRTUAL_SCROLL_STRATEGY");let Xy=(()=>{class i{constructor(e,n,r){this._ngZone=e,this._platform=n,this._scrolled=new Te,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 In(n=>{this._globalSubscription||this._addGlobalListener();const r=e>0?this._scrolled.pipe(Wy(e)).subscribe(n):this._scrolled.subscribe(n);return this._scrolledCount++,()=>{r.unsubscribe(),this._scrolledCount--,this._scrolledCount||this._removeGlobalListener()}}):mt()}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(gn(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=qc(n),s=e.getElementRef().nativeElement;do{if(r==s)return!0}while(r=r.parentElement);return!1}_addGlobalListener(){this._globalSubscription=this._ngZone.runOutsideAngular(()=>To(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)(ee(gt),ee(zi),ee(qt,8))},i.\u0275prov=Pe({token:i,factory:i.\u0275fac,providedIn:"root"}),i})(),cU=(()=>{class i{constructor(e,n,r,s){this.elementRef=e,this.scrollDispatcher=n,this.ngZone=r,this.dir=s,this._destroyed=new Te,this._elementScrolled=new In(o=>this.ngZone.runOutsideAngular(()=>To(this.elementRef.nativeElement,"scroll").pipe(Ue(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!=Yy()?(null!=e.left&&(e.right=n.scrollWidth-n.clientWidth-e.left),2==Yy()?e.left=e.right:1==Yy()&&(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;lU()?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==Yy()?e==n?s.scrollWidth-s.clientWidth-s.scrollLeft:s.scrollLeft:o&&1==Yy()?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)(E(vt),E(Xy),E(gt),E(Pa,8))},i.\u0275dir=ve({type:i,selectors:[["","cdk-scrollable",""],["","cdkScrollable",""]],standalone:!0}),i})(),FM=(()=>{class i{constructor(e,n,r){this._platform=e,this._change=new Te,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(Wy(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)(ee(zi),ee(gt),ee(qt,8))},i.\u0275prov=Pe({token:i,factory:i.\u0275fac,providedIn:"root"}),i})();const dU=new me("VIRTUAL_SCROLLABLE");let tZ=(()=>{class i extends cU{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)(E(vt),E(Xy),E(gt),E(Pa,8))},i.\u0275dir=ve({type:i,features:[dt]}),i})();const iZ=typeof requestAnimationFrame<"u"?PK:PI;let rZ=(()=>{class i extends tZ{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=tn(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=Lt(zi),this._detachedSubject=new Te,this._renderedRangeSubject=new Te,this._orientation="vertical",this._appendOnly=!1,this.scrolledIndexChange=new In(d=>this._scrollStrategy.scrolledIndexChange.subscribe(h=>Promise.resolve().then(()=>this.ngZone.run(()=>d.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=Qt.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(Do(null),Wy(0,iZ)).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(Ue(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 nZ(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)(E(vt),E(Qn),E(gt),E(QK,8),E(Pa,8),E(Xy),E(FM),E(dU,8))},i.\u0275cmp=ot({type:i,selectors:[["cdk-virtual-scroll-viewport"]],viewQuery:function(e,n){if(1&e&&$n(KK,7),2&e){let r;At(r=Dt())&&(n._contentWrapper=r.first)}},hostAttrs:[1,"cdk-virtual-scroll-viewport"],hostVars:4,hostBindings:function(e,n){2&e&&ln("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:[Dn([{provide:cU,useFactory:(t,e)=>t||e,deps:[[new Ss,new xo(dU)],i]}]),dt,KD],ngContentSelectors:ZK,decls:4,vars:4,consts:[[1,"cdk-virtual-scroll-content-wrapper"],["contentWrapper",""],[1,"cdk-virtual-scroll-spacer"]],template:function(e,n){1&e&&(or(),G(0,"div",0,1),Yt(2),j(),Ie(3,"div",2)),2&e&&(V(3),qo("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})(),Ky=(()=>{class i{}return i.\u0275fac=function(e){return new(e||i)},i.\u0275mod=en({type:i}),i.\u0275inj=Wt({}),i})(),uU=(()=>{class i{}return i.\u0275fac=function(e){return new(e||i)},i.\u0275mod=en({type:i}),i.\u0275inj=Wt({imports:[qy,Ky,rZ,qy,Ky]}),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 Nh 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 sZ extends BI{constructor(t){super(),this.element=t instanceof vt?t.nativeElement:t}}class LM{constructor(){this._isDisposed=!1,this.attachDomPortal=null}hasAttached(){return!!this._attachedPortal}attach(t){return t instanceof Nh?(this._attachedPortal=t,this.attachComponentPortal(t)):t instanceof Em?(this._attachedPortal=t,this.attachTemplatePortal(t)):this.attachDomPortal&&t instanceof sZ?(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 oZ extends LM{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||Gi.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 LM{constructor(e,n,r){super(),this._componentFactoryResolver=e,this._viewContainerRef=n,this._isInitialized=!1,this.attached=new $e,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)(E($l),E(jr),E(qt))},i.\u0275dir=ve({type:i,selectors:[["","cdkPortalOutlet",""]],inputs:{portal:["cdkPortalOutlet","portal"]},outputs:{attached:"attached"},exportAs:["cdkPortalOutlet"],features:[dt]}),i})(),Bh=(()=>{class i{}return i.\u0275fac=function(e){return new(e||i)},i.\u0275mod=en({type:i}),i.\u0275inj=Wt({}),i})();function Zo(i,...t){return t.length?t.some(e=>i[e]):i.altKey||i.shiftKey||i.ctrlKey||i.metaKey}const hU=lU();class bZ{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=_r(-this._previousScrollPosition.left),t.style.top=_r(-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"),hU&&(n.scrollBehavior=r.scrollBehavior="auto"),window.scroll(this._previousScrollPosition.left,this._previousScrollPosition.top),hU&&(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 xZ{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(gn(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 fU{enable(){}disable(){}attach(){}}function VI(i,t){return t.some(e=>i.bottome.bottom||i.righte.right)}function pU(i,t){return t.some(e=>i.tope.bottom||i.lefte.right)}class wZ{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();VI(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 MZ=(()=>{class i{constructor(e,n,r,s){this._scrollDispatcher=e,this._viewportRuler=n,this._ngZone=r,this.noop=()=>new fU,this.close=o=>new xZ(this._scrollDispatcher,this._ngZone,this._viewportRuler,o),this.block=()=>new bZ(this._viewportRuler,this._document),this.reposition=o=>new wZ(this._scrollDispatcher,this._viewportRuler,this._ngZone,o),this._document=s}}return i.\u0275fac=function(e){return new(e||i)(ee(Xy),ee(FM),ee(gt),ee(qt))},i.\u0275prov=Pe({token:i,factory:i.\u0275fac,providedIn:"root"}),i})();class km{constructor(t){if(this.scrollStrategy=new fU,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 CZ{constructor(t,e){this.connectionPair=t,this.scrollableViewProperties=e}}let mU=(()=>{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)(ee(qt))},i.\u0275prov=Pe({token:i,factory:i.\u0275fac,providedIn:"root"}),i})(),SZ=(()=>{class i extends mU{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)(ee(qt),ee(gt,8))},i.\u0275prov=Pe({token:i,factory:i.\u0275fac,providedIn:"root"}),i})(),EZ=(()=>{class i extends mU{constructor(e,n,r){super(e),this._platform=n,this._ngZone=r,this._cursorStyleIsSet=!1,this._pointerDownListener=s=>{this._pointerDownEventTarget=cu(s)},this._clickListener=s=>{const o=cu(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 d=l[c];if(d._outsidePointerEvents.observers.length<1||!d.hasAttached())continue;if(d.overlayElement.contains(o)||d.overlayElement.contains(a))break;const h=d._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)(ee(qt),ee(zi),ee(gt,8))},i.\u0275prov=Pe({token:i,factory:i.\u0275fac,providedIn:"root"}),i})(),UM=(()=>{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||NI()){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 Te,this._outsidePointerEvents=new Te,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(Oi(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=_r(this._config.width),t.height=_r(this._config.height),t.minWidth=_r(this._config.minWidth),t.minHeight=_r(this._config.minHeight),t.maxWidth=_r(this._config.maxWidth),t.maxHeight=_r(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=TM(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(Ue(Cr(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 gU="cdk-overlay-connected-position-bounding-box",AZ=/([A-Za-z%]+)$/;class DZ{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 Te,this._resizeSubscription=Qt.EMPTY,this._offsetX=0,this._offsetY=0,this._appliedPanelClasses=[],this.positionChanges=this._positionChanges,this.setOrigin(t)}attach(t){this._validatePositions(),t.hostElement.classList.add(gU),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),d=this._getOverlayFit(c,e,n,a);if(d.isCompletelyWithinViewport)return this._isPushed=!1,void this._applyPosition(a,l);this._canFitWithFlexibleDimensions(d,c,n)?s.push({position:a,origin:l,overlayRect:e,boundingBoxRect:this._calculateBoundingBoxRect(l,a)}):(!o||o.overlayFit.visibleAreal&&(l=d,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&&Uh(this._boundingBox.style,{top:"",left:"",right:"",bottom:"",height:"",width:"",alignItems:"",justifyContent:""}),this._pane&&this._resetOverlayElementStyles(),this._overlayRef&&this._overlayRef.hostElement.classList.remove(gU),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=vU(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=_U(this._overlayRef.getConfig().minHeight),a=_U(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=vU(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 d=0,h=0;return d=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,d=t.x-this._viewportMargin;else if("start"===e.overlayX&&!r||"end"===e.overlayX&&r)h=t.x,d=n.right-t.x;else{const m=Math.min(n.right-t.x+n.left,t.x),g=this._lastBoundingBoxSize.width;d=2*m,h=t.x-m,d>g&&!this._isInitialRender&&!this._growAfterOpen&&(h=t.x-g/2)}return{top:o,left:h,bottom:a,right:p,width:d,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=_r(n.height),r.top=_r(n.top),r.bottom=_r(n.bottom),r.width=_r(n.width),r.left=_r(n.left),r.right=_r(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=_r(s)),o&&(r.maxWidth=_r(o))}this._lastBoundingBoxSize=n,Uh(this._boundingBox.style,r)}_resetBoundingBoxStyles(){Uh(this._boundingBox.style,{top:"0",left:"0",right:"0",bottom:"0",height:"",width:"",alignItems:"",justifyContent:""})}_resetOverlayElementStyles(){Uh(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 d=this._viewportRuler.getViewportScrollPosition();Uh(n,this._getExactOverlayY(e,t,d)),Uh(n,this._getExactOverlayX(e,t,d))}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=_r(o.maxHeight):s&&(n.maxHeight="")),o.maxWidth&&(r?n.maxWidth=_r(o.maxWidth):s&&(n.maxWidth="")),Uh(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=_r(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=_r(s.x),r}_getScrollVisibility(){const t=this._getOriginRect(),e=this._pane.getBoundingClientRect(),n=this._scrollables.map(r=>r.getElementRef().nativeElement.getBoundingClientRect());return{isOriginClipped:pU(t,n),isOriginOutsideView:VI(t,n),isOverlayClipped:pU(e,n),isOverlayOutsideView:VI(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&&TM(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 vt)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 Uh(i,t){for(let e in t)t.hasOwnProperty(e)&&(i[e]=t[e]);return i}function _U(i){if("number"!=typeof i&&null!=i){const[t,e]=i.split(AZ);return e&&"px"!==e?null:parseFloat(t)}return i||null}function vU(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 yU="cdk-global-overlay-wrapper";class bU{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(yU),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),d=this._xPosition,h=this._xOffset,p="rtl"===this._overlayRef.getConfig().direction;let m="",g="",b="";l?b="flex-start":"center"===d?(b="center",p?g=h:m=h):p?"left"===d||"end"===d?(b="flex-end",m=h):("right"===d||"start"===d)&&(b="flex-start",g=h):"left"===d||"start"===d?(b="flex-start",m=h):("right"===d||"end"===d)&&(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(yU),n.justifyContent=n.alignItems=t.marginTop=t.marginBottom=t.marginLeft=t.marginRight=t.position="",this._overlayRef=null,this._isDisposed=!0}}let TZ=(()=>{class i{constructor(e,n,r,s){this._viewportRuler=e,this._document=n,this._platform=r,this._overlayContainer=s}global(){return new bU}flexibleConnectedTo(e){return new DZ(e,this._viewportRuler,this._document,this._platform,this._overlayContainer)}}return i.\u0275fac=function(e){return new(e||i)(ee(FM),ee(qt),ee(zi),ee(UM))},i.\u0275prov=Pe({token:i,factory:i.\u0275fac,providedIn:"root"}),i})(),IZ=0,as=(()=>{class i{constructor(e,n,r,s,o,a,l,c,d,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=d,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 Qy(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-"+IZ++,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(dm)),new oZ(e,this._componentFactoryResolver,this._appRef,this._injector,this._document)}}return i.\u0275fac=function(e){return new(e||i)(ee(MZ),ee(UM),ee($l),ee(TZ),ee(SZ),ee(Gi),ee(gt),ee(qt),ee(Pa),ee(_y),ee(EZ),ee(kr,8))},i.\u0275prov=Pe({token:i,factory:i.\u0275fac,providedIn:"root"}),i})();const RZ=[{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"}],xU=new me("cdk-connected-overlay-scroll-strategy");let zI=(()=>{class i{constructor(e){this.elementRef=e}}return i.\u0275fac=function(e){return new(e||i)(E(vt))},i.\u0275dir=ve({type:i,selectors:[["","cdk-overlay-origin",""],["","overlay-origin",""],["","cdkOverlayOrigin",""]],exportAs:["cdkOverlayOrigin"],standalone:!0}),i})(),wU=(()=>{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=tn(e)}get lockPosition(){return this._lockPosition}set lockPosition(e){this._lockPosition=tn(e)}get flexibleDimensions(){return this._flexibleDimensions}set flexibleDimensions(e){this._flexibleDimensions=tn(e)}get growAfterOpen(){return this._growAfterOpen}set growAfterOpen(e){this._growAfterOpen=tn(e)}get push(){return this._push}set push(e){this._push=tn(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=Qt.EMPTY,this._attachSubscription=Qt.EMPTY,this._detachSubscription=Qt.EMPTY,this._positionSubscription=Qt.EMPTY,this.viewportMargin=0,this.open=!1,this.disableClose=!1,this.backdropClick=new $e,this.positionChange=new $e,this.attach=new $e,this.detach=new $e,this.overlayKeydown=new $e,this.overlayOutsideClick=new $e,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=RZ);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&&!Zo(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 zI?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(YB(()=>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)(E(as),E(Eo),E(jr),E(xU),E(Pa,8))},i.\u0275dir=ve({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:[xi]}),i})();const PZ={provide:xU,deps:[as],useFactory:function kZ(i){return()=>i.scrollStrategies.reposition()}};let Pm=(()=>{class i{}return i.\u0275fac=function(e){return new(e||i)},i.\u0275mod=en({type:i}),i.\u0275inj=Wt({providers:[as,PZ],imports:[qy,Bh,uU,uU]}),i})();function gl(i,t=Gy){return ni((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,d=t.now();if(d{s=c,o=t.now(),r||(r=t.schedule(l,i),n.add(r))},()=>{a(),n.complete()},void 0,()=>{s=r=null}))})}function MU(i){return gn((t,e)=>i<=e)}function Ql(i,t=ja){return i=i??OZ,ni((e,n)=>{let r,s=!0;e.subscribe(qn(n,o=>{const a=t(o);(s||!i(r,a))&&(s=!1,r=a,n.next(o))}))})}function OZ(i,t){return i===t}let CU=(()=>{class i{create(e){return typeof MutationObserver>"u"?null:new MutationObserver(e)}}return i.\u0275fac=function(e){return new(e||i)},i.\u0275prov=Pe({token:i,factory:i.\u0275fac,providedIn:"root"}),i})(),FZ=(()=>{class i{constructor(e){this._mutationObserverFactory=e,this._observedElements=new Map}ngOnDestroy(){this._observedElements.forEach((e,n)=>this._cleanupObserver(n))}observe(e){const n=qc(e);return new In(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 Te,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)(ee(CU))},i.\u0275prov=Pe({token:i,factory:i.\u0275fac,providedIn:"root"}),i})(),SU=(()=>{class i{get disabled(){return this._disabled}set disabled(e){this._disabled=tn(e),this._disabled?this._unsubscribe():this._subscribe()}get debounce(){return this._debounce}set debounce(e){this._debounce=Ps(e),this._subscribe()}constructor(e,n,r){this._contentObserver=e,this._elementRef=n,this._ngZone=r,this.event=new $e,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(gl(this.debounce)):e).subscribe(this.event)})}_unsubscribe(){this._currentSubscription?.unsubscribe()}}return i.\u0275fac=function(e){return new(e||i)(E(FZ),E(vt),E(gt))},i.\u0275dir=ve({type:i,selectors:[["","cdkObserveContent",""]],inputs:{disabled:["cdkObserveContentDisabled","disabled"],debounce:"debounce"},outputs:{event:"cdkObserveContent"},exportAs:["cdkObserveContent"]}),i})(),HI=(()=>{class i{}return i.\u0275fac=function(e){return new(e||i)},i.\u0275mod=en({type:i}),i.\u0275inj=Wt({providers:[CU]}),i})();const EU=new Set;let Om,LZ=(()=>{class i{constructor(e){this._platform=e,this._matchMedia=this._platform.isBrowser&&window.matchMedia?window.matchMedia.bind(window):BZ}matchMedia(e){return(this._platform.WEBKIT||this._platform.BLINK)&&function NZ(i){if(!EU.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),EU.add(i))}catch(t){console.error(t)}}(e),this._matchMedia(e)}}return i.\u0275fac=function(e){return new(e||i)(ee(zi))},i.\u0275prov=Pe({token:i,factory:i.\u0275fac,providedIn:"root"}),i})();function BZ(i){return{matches:"all"===i||""===i,media:i,addListener:()=>{},removeListener:()=>{}}}let $I=(()=>{class i{constructor(e,n){this._mediaMatcher=e,this._zone=n,this._queries=new Map,this._destroySubject=new Te}ngOnDestroy(){this._destroySubject.next(),this._destroySubject.complete()}isMatched(e){return AU(TM(e)).some(r=>this._registerQuery(r).mql.matches)}observe(e){let s=Ra(AU(TM(e)).map(o=>this._registerQuery(o).observable));return s=Sy(s.pipe(Oi(1)),s.pipe(MU(1),gl(0))),s.pipe(tt(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 In(o=>{const a=l=>this._zone.run(()=>o.next(l));return n.addListener(a),()=>{n.removeListener(a)}}).pipe(Do(n),tt(({matches:o})=>({query:e,matches:o})),Ue(this._destroySubject)),mql:n};return this._queries.set(e,s),s}}return i.\u0275fac=function(e){return new(e||i)(ee(LZ),ee(gt))},i.\u0275prov=Pe({token:i,factory:i.\u0275fac,providedIn:"root"}),i})();function AU(i){return i.map(t=>t.split(",")).reduce((t,e)=>t.concat(e)).map(t=>t.trim())}function VM(i,t){return(i.getAttribute(t)||"").match(/\S+/g)||[]}const TU="cdk-describedby-message",zM="cdk-describedby-host";let GI=0,HZ=(()=>{class i{constructor(e,n){this._platform=n,this._messageRegistry=new Map,this._messagesContainer=null,this._id=""+GI++,this._document=e,this._id=Lt(cm)+"-"+GI++}describe(e,n,r){if(!this._canBeDescribed(e,n))return;const s=WI(n,r);"string"!=typeof n?(IU(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=WI(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(`[${zM}="${this._id}"]`);for(let n=0;n0!=r.indexOf(TU));e.setAttribute("aria-describedby",n.join(" "))}_addMessageReference(e,n){const r=this._messageRegistry.get(n);(function VZ(i,t,e){const n=VM(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(zM,this._id),r.referenceCount++}_removeMessageReference(e,n){const r=this._messageRegistry.get(n);r.referenceCount--,function zZ(i,t,e){const r=VM(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(zM)}_isElementDescribedByMessage(e,n){const r=VM(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)(ee(qt),ee(zi))},i.\u0275prov=Pe({token:i,factory:i.\u0275fac,providedIn:"root"}),i})();function WI(i,t){return"string"==typeof i?`${t||""}/${i}`:i}function IU(i,t){i.id||(i.id=`${TU}-${t}-${GI++}`)}class RU{constructor(t){this._items=t,this._activeItemIndex=-1,this._activeItem=null,this._wrap=!1,this._letterKeyStream=new Te,this._typeaheadSubscription=Qt.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 Te,this.change=new Te,t instanceof om&&(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(Vi(e=>this._pressedLetters.push(e)),gl(t),gn(()=>this._pressedLetters.length>0),tt(()=>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 om?this._items.toArray():this._items}}class $Z extends RU{setActiveItem(t){this.activeItem&&this.activeItem.setInactiveStyles(),super.setActiveItem(t),this.activeItem&&this.activeItem.setActiveStyles()}}class kU extends RU{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 HM=(()=>{class i{constructor(e){this._platform=e}isDisabled(e){return e.hasAttribute("disabled")}isVisible(e){return function WZ(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 GZ(i){try{return i.frameElement}catch{return null}}(function JZ(i){return i.ownerDocument&&i.ownerDocument.defaultView||window}(e));if(n&&(-1===OU(n)||!this.isVisible(n)))return!1;let r=e.nodeName.toLowerCase(),s=OU(e);return e.hasAttribute("contenteditable")?-1!==s:!("iframe"===r||"object"===r||this._platform.WEBKIT&&this._platform.IOS&&!function ZZ(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 QZ(i){return!function YZ(i){return function XZ(i){return"input"==i.nodeName.toLowerCase()}(i)&&"hidden"==i.type}(i)&&(function jZ(i){let t=i.nodeName.toLowerCase();return"input"===t||"select"===t||"button"===t||"textarea"===t}(i)||function qZ(i){return function KZ(i){return"a"==i.nodeName.toLowerCase()}(i)&&i.hasAttribute("href")}(i)||i.hasAttribute("contenteditable")||PU(i))}(e)&&!this.isDisabled(e)&&(n?.ignoreVisibility||this.isVisible(e))}}return i.\u0275fac=function(e){return new(e||i)(ee(zi))},i.\u0275prov=Pe({token:i,factory:i.\u0275fac,providedIn:"root"}),i})();function PU(i){if(!i.hasAttribute("tabindex")||void 0===i.tabIndex)return!1;let t=i.getAttribute("tabindex");return!(!t||isNaN(parseInt(t,10)))}function OU(i){if(!PU(i))return null;const t=parseInt(i.getAttribute("tabindex")||"",10);return isNaN(t)?-1:t}class eQ{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(Oi(1)).subscribe(t)}}let jI=(()=>{class i{constructor(e,n,r){this._checker=e,this._ngZone=n,this._document=r}create(e,n=!1){return new eQ(e,this._checker,this._ngZone,this._document,n)}}return i.\u0275fac=function(e){return new(e||i)(ee(HM),ee(gt),ee(qt))},i.\u0275prov=Pe({token:i,factory:i.\u0275fac,providedIn:"root"}),i})();function YI(i){return 0===i.buttons||0===i.offsetX&&0===i.offsetY}function qI(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 tQ=new me("cdk-input-modality-detector-options"),nQ={ignoreKeys:[18,17,224,91,16]},Fm=Fh({passive:!0,capture:!0});let iQ=(()=>{class i{get mostRecentModality(){return this._modality.value}constructor(e,n,r,s){this._platform=e,this._mostRecentTarget=null,this._modality=new Qe(null),this._lastTouchMs=0,this._onKeydown=o=>{this._options?.ignoreKeys?.some(a=>a===o.keyCode)||(this._modality.next("keyboard"),this._mostRecentTarget=cu(o))},this._onMousedown=o=>{Date.now()-this._lastTouchMs<650||(this._modality.next(YI(o)?"keyboard":"mouse"),this._mostRecentTarget=cu(o))},this._onTouchstart=o=>{qI(o)?this._modality.next("keyboard"):(this._lastTouchMs=Date.now(),this._modality.next("touch"),this._mostRecentTarget=cu(o))},this._options={...nQ,...s},this.modalityDetected=this._modality.pipe(MU(1)),this.modalityChanged=this.modalityDetected.pipe(Ql()),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)(ee(zi),ee(gt),ee(qt),ee(tQ,8))},i.\u0275prov=Pe({token:i,factory:i.\u0275fac,providedIn:"root"}),i})();const rQ=new me("liveAnnouncerElement",{providedIn:"root",factory:function sQ(){return null}}),oQ=new me("LIVE_ANNOUNCER_DEFAULT_OPTIONS");let aQ=0,XI=(()=>{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 Te,this._rootNodeFocusAndBlurListener=a=>{for(let c=cu(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=qc(e);if(!this._platform.isBrowser||1!==r.nodeType)return mt(null);const s=function WK(i){if(function GK(){if(null==LI){const i=typeof document<"u"?document.head:null;LI=!(!i||!i.createShadowRoot&&!i.attachShadow)}return LI}()){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 Te,rootNode:s};return this._elementInfo.set(r,a),this._registerGlobalListeners(a),a.subject}stopMonitoring(e){const n=qc(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=qc(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=cu(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,$M),n.addEventListener("blur",this._rootNodeFocusAndBlurListener,$M)}),this._rootNodeFocusListenerCount.set(n,r+1),1==++this._monitoredElementCount&&(this._ngZone.runOutsideAngular(()=>{this._getWindow().addEventListener("focus",this._windowFocusListener)}),this._inputModalityDetector.modalityDetected.pipe(Ue(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,$M),n.removeEventListener("blur",this._rootNodeFocusAndBlurListener,$M),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=Lt($I).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,LU,NU),this._hasCheckedHighContrastMode=!0;const n=this.getHighContrastMode();1===n?e.add(KI,LU):2===n&&e.add(KI,NU)}}}return i.\u0275fac=function(e){return new(e||i)(ee(zi),ee(qt))},i.\u0275prov=Pe({token:i,factory:i.\u0275fac,providedIn:"root"}),i})(),UU=(()=>{class i{constructor(e){e._applyBodyHighContrastModeCssClasses()}}return i.\u0275fac=function(e){return new(e||i)(ee(BU))},i.\u0275mod=en({type:i}),i.\u0275inj=Wt({imports:[HI]}),i})();function cQ(i,t){}class GM{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 VU=(()=>{class i extends LM{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=d=>{this._portalOutlet.hasAttached();const h=this._portalOutlet.attachDomPortal(d);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=OM(),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=OM();return e===n||e.contains(n)}_initializeFocusTrap(){this._focusTrap=this._focusTrapFactory.create(this._elementRef.nativeElement),this._document&&(this._elementFocusedBeforeDialogWasOpened=OM())}_handleBackdropClicks(){this._overlayRef.backdropClick().subscribe(()=>{this._config.disableClose&&this._recaptureFocus()})}}return i.\u0275fac=function(e){return new(e||i)(E(vt),E(jI),E(qt,8),E(GM),E(HM),E(gt),E(Qy),E(Xc))},i.\u0275cmp=ot({type:i,selectors:[["cdk-dialog-container"]],viewQuery:function(e,n){if(1&e&&$n(Am,7),2&e){let r;At(r=Dt())&&(n._portalOutlet=r.first)}},hostAttrs:["tabindex","-1",1,"cdk-dialog-container"],hostVars:6,hostBindings:function(e,n){2&e&&It("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:[dt],decls:1,vars:0,consts:[["cdkPortalOutlet",""]],template:function(e,n){1&e&&fe(0,cQ,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 ZI{constructor(t,e){this.overlayRef=t,this.config=e,this.closed=new Te,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&&!Zo(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 zU=new me("DialogScrollStrategy"),dQ=new me("DialogData"),uQ=new me("DefaultDialogConfig"),fQ={provide:zU,deps:[as],useFactory:function hQ(i){return()=>i.scrollStrategies.block()}};let pQ=0,HU=(()=>{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 Te,this._afterOpenedAtThisLevel=new Te,this._ariaHiddenElements=new Map,this.afterAllClosed=Ey(()=>this.openDialogs.length?this._getAfterAllClosed():this._getAfterAllClosed().pipe(Do(void 0))),this._scrollStrategy=a}open(e,n){(n={...this._defaultOptions||new GM,...n}).id=n.id||"cdk-dialog-"+pQ++,n.id&&this.getDialogById(n.id);const s=this._getOverlayConfig(n),o=this._overlay.create(s),a=new ZI(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(){QI(this.openDialogs,e=>e.close())}getDialogById(e){return this.openDialogs.find(n=>n.id===e)}ngOnDestroy(){QI(this._openDialogsAtThisLevel,e=>{!1===e.config.closeOnDestroy&&this._removeOpenDialog(e,!1)}),QI(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:GM,useValue:r},{provide:ZI,useValue:n},{provide:Qy,useValue:e}];let a;r.container?"function"==typeof r.container?a=r.container:(a=r.container.type,o.push(...r.container.providers(r))):a=VU;const l=new Nh(a,r.viewContainerRef,Gi.create({parent:s||this._injector,providers:o}),r.componentFactoryResolver);return e.attach(l).instance}_attachDialogContent(e,n,r,s){if(e instanceof Eo){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 Nh(e,s.viewContainerRef,o,s.componentFactoryResolver));n.componentInstance=a.instance}}_createInjector(e,n,r,s){const o=e.injector||e.viewContainerRef?.injector,a=[{provide:dQ,useValue:e.data},{provide:ZI,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(Pa,null,{optional:!0}))&&a.push({provide:Pa,useValue:{value:e.direction,change:mt()}}),Gi.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)(ee(as),ee(Gi),ee(uQ,8),ee(i,12),ee(UM),ee(zU))},i.\u0275prov=Pe({token:i,factory:i.\u0275fac}),i})();function QI(i,t){let e=i.length;for(;e--;)t(i[e])}let mQ=(()=>{class i{}return i.\u0275fac=function(e){return new(e||i)},i.\u0275mod=en({type:i}),i.\u0275inj=Wt({providers:[HU,fQ],imports:[Pm,Bh,UU,Bh]}),i})();const gQ=["text"];function _Q(i,t){if(1&i&&Ie(0,"mat-pseudo-checkbox",6),2&i){const e=re();U("state",e.selected?"checked":"unchecked")("disabled",e.disabled)}}function vQ(i,t){1&i&&Ie(0,"mat-pseudo-checkbox",7),2&i&&U("disabled",re().disabled)}function yQ(i,t){if(1&i&&(G(0,"span",8),Be(1),j()),2&i){const e=re();V(1),Qi("(",e.group.label,")")}}const bQ=[[["mat-icon"]],"*"],xQ=["mat-icon","*"],MQ=new me("mat-sanity-checks",{providedIn:"root",factory:function wQ(){return!0}});let Jn=(()=>{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!NI()&&("boolean"==typeof this._sanityChecks?this._sanityChecks:!!this._sanityChecks[e])}}return i.\u0275fac=function(e){return new(e||i)(ee(BU),ee(MQ,8),ee(qt))},i.\u0275mod=en({type:i}),i.\u0275inj=Wt({imports:[qy,qy]}),i})();function WM(i){return class extends i{get disabled(){return this._disabled}set disabled(t){this._disabled=tn(t)}constructor(...t){super(...t),this._disabled=!1}}}function Jy(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 jM(i){return class extends i{get disableRipple(){return this._disableRipple}set disableRipple(t){this._disableRipple=tn(t)}constructor(...t){super(...t),this._disableRipple=!1}}}function JI(i,t=0){return class extends i{get tabIndex(){return this.disabled?-1:this._tabIndex}set tabIndex(e){this._tabIndex=null!=e?Ps(e):this.defaultTabIndex}constructor(...e){super(...e),this._tabIndex=t,this.defaultTabIndex=t}}}function WU(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 CQ(i){return class extends i{constructor(...t){super(...t),this._isInitialized=!1,this._pendingSubscribers=[],this.initialized=new In(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 YU=(()=>{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=Pe({token:i,factory:i.\u0275fac,providedIn:"root"}),i})();class EQ{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 qU=Fh({passive:!0,capture:!0});class AQ{constructor(){this._events=new Map,this._delegateEventHandler=t=>{const e=cu(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,qU)})}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,qU)))}}const XU={enterDuration:225,exitDuration:150},KU=Fh({passive:!0,capture:!0}),ZU=["mousedown","touchstart"],QU=["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=qc(n))}fadeInRipple(t,e,n={}){const r=this._containerRect=this._containerRect||this._containerElement.getBoundingClientRect(),s={...XU,...n.animation};n.centered&&(t=r.left+r.width/2,e=r.top+r.height/2);const o=n.radius||function TQ(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,d=document.createElement("div");d.classList.add("mat-ripple-element"),d.style.left=a-o+"px",d.style.top=l-o+"px",d.style.height=2*o+"px",d.style.width=2*o+"px",null!=n.color&&(d.style.backgroundColor=n.color),d.style.transitionDuration=`${c}ms`,this._containerElement.appendChild(d);const h=window.getComputedStyle(d),m=h.transitionDuration,g="none"===h.transitionProperty||"0s"===m||"0s, 0s"===m||0===r.width&&0===r.height,b=new EQ(this,d,n,g);d.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);d.addEventListener("transitionend",y),d.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={...XU,...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=qc(t);!this._platform.isBrowser||!e||e===this._triggerElement||(this._removeTriggerEvents(),this._triggerElement=e,ZU.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(()=>{QU.forEach(e=>{this._triggerElement.addEventListener(e,this,KU)})}),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=YI(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&&(ZU.forEach(e=>Lm._eventManager.removeHandler(e,t,this)),this._pointerUpEventsRegistered&&QU.forEach(e=>t.removeEventListener(e,this,KU)))}}Lm._eventManager=new AQ;const eR=new me("mat-ripple-global-options");let Vh=(()=>{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)(E(vt),E(gt),E(zi),E(eR,8),E(kr,8))},i.\u0275dir=ve({type:i,selectors:[["","mat-ripple",""],["","matRipple",""]],hostAttrs:[1,"mat-ripple"],hostVars:2,hostBindings:function(e,n){2&e&&ln("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})(),tb=(()=>{class i{}return i.\u0275fac=function(e){return new(e||i)},i.\u0275mod=en({type:i}),i.\u0275inj=Wt({imports:[Jn,Jn]}),i})(),IQ=(()=>{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)(E(kr,8))},i.\u0275cmp=ot({type:i,selectors:[["mat-pseudo-checkbox"]],hostAttrs:[1,"mat-pseudo-checkbox"],hostVars:12,hostBindings:function(e,n){2&e&&ln("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})(),JU=(()=>{class i{}return i.\u0275fac=function(e){return new(e||i)},i.\u0275mod=en({type:i}),i.\u0275inj=Wt({imports:[Jn]}),i})();const eV=new me("MAT_OPTION_PARENT_COMPONENT"),tV=new me("MatOptgroup");let RQ=0;class kQ{constructor(t,e=!1){this.source=t,this.isUserInput=e}}let PQ=(()=>{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=tn(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-"+RQ++,this.onSelectionChange=new $e,this._stateChanges=new Te}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)&&!Zo(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 kQ(this,e))}}return i.\u0275fac=function(e){Co()},i.\u0275dir=ve({type:i,viewQuery:function(e,n){if(1&e&&$n(gQ,7),2&e){let r;At(r=Dt())&&(n._text=r.first)}},inputs:{value:"value",id:"id",disabled:"disabled"},outputs:{onSelectionChange:"onSelectionChange"}}),i})(),Nm=(()=>{class i extends PQ{constructor(e,n,r,s){super(e,n,r,s)}}return i.\u0275fac=function(e){return new(e||i)(E(vt),E(Qn),E(eV,8),E(tV,8))},i.\u0275cmp=ot({type:i,selectors:[["mat-option"]],hostAttrs:["role","option",1,"mat-mdc-option","mdc-list-item"],hostVars:11,hostBindings:function(e,n){1&e&&Oe("click",function(){return n._selectViaInteraction()})("keydown",function(s){return n._handleKeydown(s)}),2&e&&(ql("id",n.id),It("aria-selected",n.selected)("aria-disabled",n.disabled.toString()),ln("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:[dt],ngContentSelectors:xQ,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&&(or(bQ),fe(0,_Q,1,2,"mat-pseudo-checkbox",0),Yt(1),G(2,"span",1,2),Yt(4,1),j(),fe(5,vQ,1,1,"mat-pseudo-checkbox",3),fe(6,yQ,2,1,"span",4),Ie(7,"div",5)),2&e&&(U("ngIf",n.multiple),V(5),U("ngIf",!n.multiple&&n.selected&&!n.hideSingleSelectionIndicator),V(1),U("ngIf",n.group&&n.group._inert),V(1),U("matRippleTrigger",n._getHostElement())("matRippleDisabled",n.disabled||n.disableRipple))},dependencies:[Vh,vi,IQ],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})(),tR=(()=>{class i{}return i.\u0275fac=function(e){return new(e||i)},i.\u0275mod=en({type:i}),i.\u0275inj=Wt({imports:[tb,co,Jn,JU]}),i})();class nV{}class LQ{}const Kc="*";function Oa(i,t){return{type:7,name:i,definitions:t,options:{}}}function Yr(i,t=null){return{type:4,styles:t,timings:i}}function rV(i,t=null){return{type:2,steps:i,options:t}}function oi(i){return{type:6,styles:i,offset:null}}function Os(i,t,e){return{type:0,name:i,styles:t,options:e}}function sV(i){return{type:5,steps:i}}function Or(i,t,e=null){return{type:1,expr:i,animation:t,options:e}}function nR(i=null){return{type:9,options:i}}function iR(i,t,e=null){return{type:11,selector:i,animation:t,options:e}}function oV(i){Promise.resolve().then(i)}class nb{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(){oV(()=>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 aV{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?oV(()=>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 rR="!";function NQ(i,t){}class YM{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 sR="mdc-dialog--open",lV="mdc-dialog--opening",cV="mdc-dialog--closing";let VQ=(()=>{class i extends VU{constructor(e,n,r,s,o,a,l,c){super(e,n,r,s,o,a,l,c),this._animationStateChanged=new $e}_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)(E(vt),E(jI),E(qt,8),E(YM),E(HM),E(gt),E(Qy),E(Xc))},i.\u0275cmp=ot({type:i,selectors:[["ng-component"]],features:[dt],decls:0,vars:0,template:function(e,n){},encapsulation:2}),i})();const dV="--mat-dialog-transition-duration";function uV(i){return null==i?null:"number"==typeof i?i:i.endsWith("ms")?Ps(i.substring(0,i.length-2)):i.endsWith("s")?1e3*Ps(i.substring(0,i.length-1)):"0"===i?0:null}let zQ=(()=>{class i extends VQ{constructor(e,n,r,s,o,a,l,c,d){super(e,n,r,s,o,a,l,d),this._animationMode=c,this._animationsEnabled="NoopAnimations"!==this._animationMode,this._hostElement=this._elementRef.nativeElement,this._openAnimationDuration=this._animationsEnabled?uV(this._config.enterAnimationDuration)??150:0,this._closeAnimationDuration=this._animationsEnabled?uV(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(dV,`${this._openAnimationDuration}ms`),this._requestAnimationFrame(()=>this._hostElement.classList.add(lV,sR)),this._waitForAnimationToComplete(this._openAnimationDuration,this._finishDialogOpen)):(this._hostElement.classList.add(sR),Promise.resolve().then(()=>this._finishDialogOpen()))}_startExitAnimation(){this._animationStateChanged.emit({state:"closing",totalTime:this._closeAnimationDuration}),this._hostElement.classList.remove(sR),this._animationsEnabled?(this._hostElement.style.setProperty(dV,`${this._openAnimationDuration}ms`),this._requestAnimationFrame(()=>this._hostElement.classList.add(cV)),this._waitForAnimationToComplete(this._closeAnimationDuration,this._finishDialogClose)):Promise.resolve().then(()=>this._finishDialogClose())}_clearAnimationClasses(){this._hostElement.classList.remove(lV,cV)}_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)(E(vt),E(jI),E(qt,8),E(YM),E(HM),E(gt),E(Qy),E(kr,8),E(Xc))},i.\u0275cmp=ot({type:i,selectors:[["mat-dialog-container"]],hostAttrs:["tabindex","-1",1,"mat-mdc-dialog-container","mdc-dialog"],hostVars:8,hostBindings:function(e,n){2&e&&(ql("id",n._config.id),It("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),ln("_mat-animation-noopable",!n._animationsEnabled))},features:[dt],decls:3,vars:0,consts:[[1,"mdc-dialog__container"],[1,"mat-mdc-dialog-surface","mdc-dialog__surface"],["cdkPortalOutlet",""]],template:function(e,n){1&e&&(G(0,"div",0)(1,"div",1),fe(2,NQ,0,0,"ng-template",2),j()())},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 ib{constructor(t,e,n){this._ref=t,this._containerInstance=n,this._afterOpened=new Te,this._beforeClosed=new Te,this._state=0,this.disableClose=e.disableClose,this.id=t.id,n._animationStateChanged.pipe(gn(r=>"opened"===r.state),Oi(1)).subscribe(()=>{this._afterOpened.next(),this._afterOpened.complete()}),n._animationStateChanged.pipe(gn(r=>"closed"===r.state),Oi(1)).subscribe(()=>{clearTimeout(this._closeFallbackTimeout),this._finishDialogClose()}),t.overlayRef.detachments().subscribe(()=>{this._beforeClosed.next(this._result),this._beforeClosed.complete(),this._finishDialogClose()}),Cr(this.backdropClick(),this.keydownEvents().pipe(gn(r=>27===r.keyCode&&!this.disableClose&&!Zo(r)))).subscribe(r=>{this.disableClose||(r.preventDefault(),hV(this,"keydown"===r.type?"keyboard":"mouse"))})}close(t){this._result=t,this._containerInstance._animationStateChanged.pipe(gn(e=>"closing"===e.state),Oi(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 hV(i,t,e){return i._closeInteractionType=t,i.close(e)}const oR=new me("MatMdcDialogData"),HQ=new me("mat-mdc-dialog-default-options"),fV=new me("mat-mdc-dialog-scroll-strategy"),GQ={provide:fV,deps:[as],useFactory:function $Q(i){return()=>i.scrollStrategies.block()}};let WQ=0,jQ=(()=>{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,d,h){this._overlay=e,this._defaultOptions=r,this._parentDialog=s,this._dialogRefConstructor=l,this._dialogContainerType=c,this._dialogDataToken=d,this._openDialogsAtThisLevel=[],this._afterAllClosedAtThisLevel=new Te,this._afterOpenedAtThisLevel=new Te,this._idPrefix="mat-dialog-",this.dialogConfigClass=YM,this.afterAllClosed=Ey(()=>this.openDialogs.length?this._getAfterAllClosed():this._getAfterAllClosed().pipe(Do(void 0))),this._scrollStrategy=a,this._dialog=n.get(HU)}open(e,n){let r;(n={...this._defaultOptions||new YM,...n}).id=n.id||`${this._idPrefix}${WQ++}`,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:GM,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){Co()},i.\u0275prov=Pe({token:i,factory:i.\u0275fac}),i})(),Bm=(()=>{class i extends jQ{constructor(e,n,r,s,o,a,l,c){super(e,n,s,a,l,o,ib,zQ,oR,c),this._idPrefix="mat-mdc-dialog-"}}return i.\u0275fac=function(e){return new(e||i)(ee(as),ee(Gi),ee(_y,8),ee(HQ,8),ee(fV),ee(i,12),ee(UM),ee(kr,8))},i.\u0275prov=Pe({token:i,factory:i.\u0275fac}),i})(),YQ=0,qQ=(()=>{class i{constructor(e,n,r){this.dialogRef=e,this._elementRef=n,this._dialog=r,this.type="button"}ngOnInit(){this.dialogRef||(this.dialogRef=_V(this._elementRef,this._dialog.openDialogs))}ngOnChanges(e){const n=e._matDialogClose||e._matDialogCloseResult;n&&(this.dialogResult=n.currentValue)}_onButtonClick(e){hV(this.dialogRef,0===e.screenX&&0===e.screenY?"keyboard":"mouse",this.dialogResult)}}return i.\u0275fac=function(e){return new(e||i)(E(ib,8),E(vt),E(Bm))},i.\u0275dir=ve({type:i,selectors:[["","mat-dialog-close",""],["","matDialogClose",""]],hostVars:2,hostBindings:function(e,n){1&e&&Oe("click",function(s){return n._onButtonClick(s)}),2&e&&It("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:[xi]}),i})(),pV=(()=>{class i{constructor(e,n,r){this._dialogRef=e,this._elementRef=n,this._dialog=r,this.id="mat-mdc-dialog-title-"+YQ++}ngOnInit(){this._dialogRef||(this._dialogRef=_V(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)(E(ib,8),E(vt),E(Bm))},i.\u0275dir=ve({type:i,selectors:[["","mat-dialog-title",""],["","matDialogTitle",""]],hostAttrs:[1,"mat-mdc-dialog-title","mdc-dialog__title"],hostVars:1,hostBindings:function(e,n){2&e&&ql("id",n.id)},inputs:{id:"id"},exportAs:["matDialogTitle"]}),i})(),mV=(()=>{class i{}return i.\u0275fac=function(e){return new(e||i)},i.\u0275dir=ve({type:i,selectors:[["","mat-dialog-content",""],["mat-dialog-content"],["","matDialogContent",""]],hostAttrs:[1,"mat-mdc-dialog-content","mdc-dialog__content"]}),i})(),gV=(()=>{class i{constructor(){this.align="start"}}return i.\u0275fac=function(e){return new(e||i)},i.\u0275dir=ve({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&&ln("mat-mdc-dialog-actions-align-center","center"===n.align)("mat-mdc-dialog-actions-align-end","end"===n.align)},inputs:{align:"align"}}),i})();function _V(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 vV=(()=>{class i{}return i.\u0275fac=function(e){return new(e||i)},i.\u0275mod=en({type:i}),i.\u0275inj=Wt({providers:[Bm,GQ],imports:[mQ,Pm,Bh,Jn,Jn]}),i})();const XQ=["mat-button",""],bV=[[["",8,"material-icons",3,"iconPositionEnd",""],["mat-icon",3,"iconPositionEnd",""],["","matButtonIcon","",3,"iconPositionEnd",""]],"*",[["","iconPositionEnd","",8,"material-icons"],["mat-icon","iconPositionEnd",""],["","matButtonIcon","","iconPositionEnd",""]]],xV=[".material-icons:not([iconPositionEnd]), mat-icon:not([iconPositionEnd]), [matButtonIcon]:not([iconPositionEnd])","*",".material-icons[iconPositionEnd], mat-icon[iconPositionEnd], [matButtonIcon][iconPositionEnd]"],ZQ=["mat-mini-fab",""],JQ=["mat-icon-button",""],eJ=["*"],tJ=[{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"]}],nJ=Jy(WM(jM(class{constructor(i){this._elementRef=i}})));let aR=(()=>{class i extends nJ{constructor(e,n,r,s){super(e),this._platform=n,this._ngZone=r,this._animationMode=s,this._focusMonitor=Lt(Xc),this._isFab=!1;const o=e.nativeElement.classList;for(const a of tJ)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){Co()},i.\u0275dir=ve({type:i,viewQuery:function(e,n){if(1&e&&$n(Vh,5),2&e){let r;At(r=Dt())&&(n.ripple=r.first)}},features:[dt]}),i})(),rb=(()=>{class i extends aR{constructor(e,n,r,s){super(e,n,r,s)}}return i.\u0275fac=function(e){return new(e||i)(E(vt),E(zi),E(gt),E(kr,8))},i.\u0275cmp=ot({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&&(It("disabled",n.disabled||null),ln("_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:[dt],attrs:XQ,ngContentSelectors:xV,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&&(or(bV),Ie(0,"span",0),Yt(1),G(2,"span",1),Yt(3,1),j(),Yt(4,2),Ie(5,"span",2)(6,"span",3)(7,"span",4)),2&e&&(ln("mdc-button__ripple",!n._isFab)("mdc-fab__ripple",n._isFab),V(6),U("matRippleDisabled",n._isRippleDisabled())("matRippleTrigger",n._elementRef.nativeElement))},dependencies:[Vh],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 rJ=new me("mat-mdc-fab-default-options",{providedIn:"root",factory:wV});function wV(){return{color:"accent"}}const MV=wV();let CV=(()=>{class i extends aR{constructor(e,n,r,s,o){super(e,n,r,s),this._options=o,this._isFab=!0,this._options=this._options||MV,this.color=this.defaultColor=this._options.color||MV.color}}return i.\u0275fac=function(e){return new(e||i)(E(vt),E(zi),E(gt),E(kr,8),E(rJ,8))},i.\u0275cmp=ot({type:i,selectors:[["button","mat-mini-fab",""]],hostVars:7,hostBindings:function(e,n){2&e&&(It("disabled",n.disabled||null),ln("_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:[dt],attrs:ZQ,ngContentSelectors:xV,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&&(or(bV),Ie(0,"span",0),Yt(1),G(2,"span",1),Yt(3,1),j(),Yt(4,2),Ie(5,"span",2)(6,"span",3)(7,"span",4)),2&e&&(ln("mdc-button__ripple",!n._isFab)("mdc-fab__ripple",n._isFab),V(6),U("matRippleDisabled",n._isRippleDisabled())("matRippleTrigger",n._elementRef.nativeElement))},dependencies:[Vh],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})(),qM=(()=>{class i extends aR{constructor(e,n,r,s){super(e,n,r,s)}}return i.\u0275fac=function(e){return new(e||i)(E(vt),E(zi),E(gt),E(kr,8))},i.\u0275cmp=ot({type:i,selectors:[["button","mat-icon-button",""]],hostVars:7,hostBindings:function(e,n){2&e&&(It("disabled",n.disabled||null),ln("_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:[dt],attrs:JQ,ngContentSelectors:eJ,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&&(or(),Ie(0,"span",0),Yt(1),Ie(2,"span",1)(3,"span",2)(4,"span",3)),2&e&&(V(3),U("matRippleDisabled",n._isRippleDisabled())("matRippleCentered",!0)("matRippleTrigger",n._elementRef.nativeElement))},dependencies:[Vh],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})(),XM=(()=>{class i{}return i.\u0275fac=function(e){return new(e||i)},i.\u0275mod=en({type:i}),i.\u0275inj=Wt({imports:[Jn,tb,Jn]}),i})();const sJ=["class","dialog"];let SV=(()=>{class i{constructor(e,n){this.dialogRef=e,this.data=n}}return i.\u0275fac=function(e){return new(e||i)(E(ib),E(oR))},i.\u0275cmp=ot({type:i,selectors:[["app-confirm",8,"dialog"]],attrs:sJ,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&&(G(0,"h1",0),Be(1,"Confirmation"),j(),G(2,"div",1)(3,"p"),Be(4),j()(),G(5,"div",2)(6,"button",3),Oe("click",function(){return n.dialogRef.close()}),Be(7,"Cancel"),j(),G(8,"button",4),Be(9,"Yes"),j()()),2&e&&(V(4),ui(n.data.text),V(4),U("mat-dialog-close",!0))},dependencies:[rb,qQ,pV,mV,gV]}),i})();function lR(i,t){const e="object"==typeof t;return new Promise((n,r)=>{const s=new ha({next:o=>{n(o),s.unsubscribe()},error:r,complete:()=>{e?n(t.defaultValue):r(new fm)}});i.subscribe(s)})}let Jl=(()=>{class i{constructor(e){this.ngZone=e,this.openedResource$=new Qe(null),this.openedResourcePath$=new Qe(null),eel.expose(this.wrapHandler(this.openFile),"open_file"),eel.on_angular_ready(),setTimeout(nt(function*(){for(;;){if(eel._websocket){eel._websocket.onclose=()=>window.close();break}yield new Promise(n=>setTimeout(n,0))}}),0)}wrapHandler(e){return(...n)=>{try{gt.assertInAngularZone(),e.bind(this)(...n)}catch{this.ngZone.run(e,this,n)}}}openFile(e,n=!1){var r=this;return nt(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 nt(function*(){yield eel.open_file_with_system_app(e)()})()}retrieveValue(e){return nt(function*(){return yield eel.retrieve_value(e)()})()}runCustomAction(e,n,r){return nt(function*(){return eel.run_custom_action(e,n,r)()})()}saveFile(e){var n=this;return nt(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 nt(function*(){return eel.serialize_resource(e,n)()})()}serializeResourceTmp(e,n,r={}){return nt(function*(){return eel.serialize_resource_tmp(e,n,r)()})()}serializeReversible(e,n){return nt(function*(){return eel.serialize_reversible(e,n)()})()}deserializeResource(e){return nt(function*(){return eel.deserialize_resource(e)()})()}}return i.\u0275fac=function(e){return new(e||i)(ee(gt))},i.\u0275prov=Pe({token:i,factory:i.\u0275fac,providedIn:"root"}),i})();var cR=ps(489);const EV=i=>!(!i||"object"!=typeof i),AV=(i={},t,e,n=[])=>{const r=[];if(EV(i)){const s=Object.entries(i);for(let o=0;o{class i{constructor(e){var n=this;this.eelDelegate=e,this._hasUnsavedChanges$=new Qe(!1),this.resource$=new Qe(null),this.error$=new Qe(null),this.customActionRunning$=new Qe(!1),this.changedDataBlocks={},this.dataBlockChange$=new Te,this.hideHiddenFields$=new Qe(!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=AV(r.schema,"is_recursive_ref",!0);for(const[o,a]of s){const l=o.block_class_mro;let c=r.schema,d=c.block_class_mro===l?c:void 0;for(const h of a.slice(0,a.length-1))!d&&c[h]?.block_class_mro===l&&(d=c[h]),c=c[h];c[a[a.length-1]]=d}this.resource$.next(r),this.error$.next(null)}else this.resource$.next(null),this.error$.next(null)}),this.dataBlockChange$.subscribe(function(){var r=nt(function*([s,o]){n.changedDataBlocks[s]=o,n.updateUnsavedChanges();const a=yield n.eelDelegate.retrieveValue(s);n.changedDataBlocks[s]==o&&((0,cR.isNumber)(o)?Math.abs(o-a)<1e-10:(0,cR.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 nt(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 nt(function*(){return s.processExternalChanges(e,()=>s.eelDelegate.runCustomAction(e,n,r))})()}deserializeResource(e){var n=this;return nt(function*(){return n.processExternalChanges(e,()=>n.eelDelegate.deserializeResource(e))})()}reloadResource(){var e=this;return nt(function*(){const n=e.eelDelegate.openedResourcePath$.getValue();n&&e.eelDelegate.openFile(n,!0).then()})()}saveResource(){var e=this;return nt(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)(ee(Jl))},i.\u0275prov=Pe({token:i,factory:i.\u0275fac,providedIn:"root"}),i})();function oJ(i,t){if(1&i){const e=jn();G(0,"div",2)(1,"button",3),Oe("click",function(){return Vt(e),Et(re().action())}),Be(2),j()()}if(2&i){const e=re();V(2),Qi(" ",e.data.action," ")}}const aJ=["label"];function lJ(i,t){}const cJ=Math.pow(2,31)-1;class dR{constructor(t,e){this._overlayRef=e,this._afterDismissed=new Te,this._afterOpened=new Te,this._onAction=new Te,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,cJ))}_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 DV=new me("MatSnackBarData");class KM{constructor(){this.politeness="assertive",this.announcementMessage="",this.duration=0,this.data=null,this.horizontalPosition="center",this.verticalPosition="bottom"}}let dJ=(()=>{class i{}return i.\u0275fac=function(e){return new(e||i)},i.\u0275dir=ve({type:i,selectors:[["","matSnackBarLabel",""]],hostAttrs:[1,"mat-mdc-snack-bar-label","mdc-snackbar__label"]}),i})(),uJ=(()=>{class i{}return i.\u0275fac=function(e){return new(e||i)},i.\u0275dir=ve({type:i,selectors:[["","matSnackBarActions",""]],hostAttrs:[1,"mat-mdc-snack-bar-actions","mdc-snackbar__actions"]}),i})(),hJ=(()=>{class i{}return i.\u0275fac=function(e){return new(e||i)},i.\u0275dir=ve({type:i,selectors:[["","matSnackBarAction",""]],hostAttrs:[1,"mat-mdc-snack-bar-action","mdc-snackbar__action"]}),i})(),fJ=(()=>{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)(E(dR),E(DV))},i.\u0275cmp=ot({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&&(G(0,"div",0),Be(1),j(),fe(2,oJ,3,1,"div",1)),2&e&&(V(1),Qi(" ",n.data.message,"\n"),V(1),U("ngIf",n.hasAction))},dependencies:[vi,rb,dJ,uJ,hJ],styles:[".mat-mdc-simple-snack-bar{display:flex}"],encapsulation:2,changeDetection:0}),i})();const pJ={snackBarState:Oa("state",[Os("void, hidden",oi({transform:"scale(0.8)",opacity:0})),Os("visible",oi({transform:"scale(1)",opacity:1})),Or("* => visible",Yr("150ms cubic-bezier(0, 0, 0.2, 1)")),Or("* => void, * => hidden",Yr("75ms cubic-bezier(0.4, 0.0, 1, 1)",oi({opacity:0})))])};let mJ=0,gJ=(()=>{class i extends LM{constructor(e,n,r,s,o){super(),this._ngZone=e,this._elementRef=n,this._changeDetectorRef=r,this._platform=s,this.snackBarConfig=o,this._document=Lt(qt),this._trackedModals=new Set,this._announceDelay=150,this._destroyed=!1,this._onAnnounce=new Te,this._onExit=new Te,this._onEnter=new Te,this._animationState="void",this._liveElementId="mat-snack-bar-container-live-"+mJ++,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(Oi(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)(E(gt),E(vt),E(Qn),E(zi),E(KM))},i.\u0275dir=ve({type:i,viewQuery:function(e,n){if(1&e&&$n(Am,7),2&e){let r;At(r=Dt())&&(n._portalOutlet=r.first)}},features:[dt]}),i})(),_J=(()=>{class i extends gJ{_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=si(i)))(n||i)}}(),i.\u0275cmp=ot({type:i,selectors:[["mat-snack-bar-container"]],viewQuery:function(e,n){if(1&e&&$n(aJ,7),2&e){let r;At(r=Dt())&&(n._label=r.first)}},hostAttrs:[1,"mdc-snackbar","mat-mdc-snack-bar-container","mdc-snackbar--open"],hostVars:1,hostBindings:function(e,n){1&e&&LD("@state.done",function(s){return n.onAnimationEnd(s)}),2&e&&Rw("@state",n._animationState)},features:[dt],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&&(G(0,"div",0)(1,"div",1,2)(3,"div",3),fe(4,lJ,0,0,"ng-template",4),j(),Ie(5,"div"),j()()),2&e&&(V(5),It("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:[pJ.snackBarState]}}),i})(),TV=(()=>{class i{}return i.\u0275fac=function(e){return new(e||i)},i.\u0275mod=en({type:i}),i.\u0275inj=Wt({imports:[Pm,Bh,co,XM,Jn,Jn]}),i})();const IV=new me("mat-snack-bar-default-options",{providedIn:"root",factory:function vJ(){return new KM}});let yJ=(()=>{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=Gi.create({parent:n&&n.viewContainerRef&&n.viewContainerRef.injector||this._injector,providers:[{provide:KM,useValue:n}]}),o=new Nh(this.snackBarContainerComponent,n.viewContainerRef,s),a=e.attach(o);return a.instance.snackBarConfig=n,a.instance}_attach(e,n){const r={...new KM,...this._defaultConfig,...n},s=this._createOverlay(r),o=this._attachSnackBarContainer(s,r),a=new dR(o,s);if(e instanceof Eo){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 Nh(e,void 0,l),d=o.attachComponentPortal(c);a.instance=d.instance}return this._breakpointObserver.observe("(max-width: 599.98px) and (orientation: portrait)").pipe(Ue(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 Gi.create({parent:e&&e.viewContainerRef&&e.viewContainerRef.injector||this._injector,providers:[{provide:dR,useValue:n},{provide:DV,useValue:e.data}]})}}return i.\u0275fac=function(e){return new(e||i)(ee(as),ee(XI),ee(Gi),ee($I),ee(i,12),ee(IV))},i.\u0275prov=Pe({token:i,factory:i.\u0275fac}),i})(),RV=(()=>{class i extends yJ{constructor(e,n,r,s,o,a){super(e,n,r,s,o,a),this.simpleSnackBarComponent=fJ,this.snackBarContainerComponent=_J,this.handsetCssClass="mat-mdc-snack-bar-handset"}}return i.\u0275fac=function(e){return new(e||i)(ee(as),ee(XI),ee(Gi),ee($I),ee(i,12),ee(IV))},i.\u0275prov=Pe({token:i,factory:i.\u0275fac,providedIn:TV}),i})();const bJ=["*",[["mat-toolbar-row"]]],xJ=["*","mat-toolbar-row"],wJ=Jy(class{constructor(i){this._elementRef=i}});let MJ=(()=>{class i{}return i.\u0275fac=function(e){return new(e||i)},i.\u0275dir=ve({type:i,selectors:[["mat-toolbar-row"]],hostAttrs:[1,"mat-toolbar-row"],exportAs:["matToolbarRow"]}),i})(),CJ=(()=>{class i extends wJ{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)(E(vt),E(zi),E(qt))},i.\u0275cmp=ot({type:i,selectors:[["mat-toolbar"]],contentQueries:function(e,n,r){if(1&e&&Wi(r,MJ,5),2&e){let s;At(s=Dt())&&(n._toolbarRows=s)}},hostAttrs:[1,"mat-toolbar"],hostVars:4,hostBindings:function(e,n){2&e&&ln("mat-toolbar-multiple-rows",n._toolbarRows.length>0)("mat-toolbar-single-row",0===n._toolbarRows.length)},inputs:{color:"color"},exportAs:["matToolbar"],features:[dt],ngContentSelectors:xJ,decls:2,vars:0,template:function(e,n){1&e&&(or(bJ),Yt(0),Yt(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})(),SJ=(()=>{class i{}return i.\u0275fac=function(e){return new(e||i)},i.\u0275mod=en({type:i}),i.\u0275inj=Wt({imports:[Jn,Jn]}),i})(),EJ=(()=>{class i{constructor(){this._vertical=!1,this._inset=!1}get vertical(){return this._vertical}set vertical(e){this._vertical=tn(e)}get inset(){return this._inset}set inset(e){this._inset=tn(e)}}return i.\u0275fac=function(e){return new(e||i)},i.\u0275cmp=ot({type:i,selectors:[["mat-divider"]],hostAttrs:["role","separator",1,"mat-divider"],hostVars:7,hostBindings:function(e,n){2&e&&(It("aria-orientation",n.vertical?"vertical":"horizontal"),ln("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})(),kV=(()=>{class i{}return i.\u0275fac=function(e){return new(e||i)},i.\u0275mod=en({type:i}),i.\u0275inj=Wt({imports:[Jn,Jn]}),i})();const AJ=["tooltip"],PV=new me("mat-tooltip-scroll-strategy"),IJ={provide:PV,deps:[as],useFactory:function TJ(i){return()=>i.scrollStrategies.reposition({scrollThrottle:20})}},kJ=new me("mat-tooltip-default-options",{providedIn:"root",factory:function RJ(){return{showDelay:0,hideDelay:0,touchendHideDelay:1500}}}),OV="tooltip-panel",FV=Fh({passive:!0});let BJ=(()=>{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=tn(e),this._detach(),this._overlayRef=null}get disabled(){return this._disabled}set disabled(e){this._disabled=tn(e),this._disabled?this.hide(0):this._setupPointerEnterEventsIfNeeded()}get showDelay(){return this._showDelay}set showDelay(e){this._showDelay=Ps(e)}get hideDelay(){return this._hideDelay}set hideDelay(e){this._hideDelay=Ps(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,d,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 Te,this._scrollStrategy=d,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(Ue(this._destroyed)).subscribe(()=>{this._overlayRef&&this._updatePosition(this._overlayRef)})}ngAfterViewInit(){this._viewInitialized=!0,this._setupPointerEnterEventsIfNeeded(),this._focusMonitor.monitor(this._elementRef).pipe(Ue(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,FV)}),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 Nh(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(Ue(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 vt)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(Ue(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}-${OV}`,scrollStrategy:this._scrollStrategy()}),this._updatePosition(this._overlayRef),this._overlayRef.detachments().pipe(Ue(this._destroyed)).subscribe(()=>this._detach()),this._overlayRef.outsidePointerEvents().pipe(Ue(this._destroyed)).subscribe(()=>this._tooltipInstance?._handleBodyInteraction()),this._overlayRef.keydownEvents().pipe(Ue(this._destroyed)).subscribe(s=>{this._isTooltipVisible()&&27===s.keyCode&&!Zo(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(Oi(1),Ue(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}-${OV}-`;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,FV)})}_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){Co()},i.\u0275dir=ve({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})(),Fs=(()=>{class i extends BJ{constructor(e,n,r,s,o,a,l,c,d,h,p,m){super(e,n,r,s,o,a,l,c,d,h,p,m),this._tooltipComponent=VJ,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)(E(as),E(vt),E(Xy),E(jr),E(gt),E(zi),E(HZ),E(Xc),E(PV),E(Pa,8),E(kJ,8),E(qt))},i.\u0275dir=ve({type:i,selectors:[["","matTooltip",""]],hostAttrs:[1,"mat-mdc-tooltip-trigger"],exportAs:["matTooltip"],features:[dt]}),i})(),UJ=(()=>{class i{constructor(e,n){this._changeDetectorRef=e,this._closeOnInteraction=!1,this._isVisible=!1,this._onHide=new Te,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)(E(Qn),E(kr,8))},i.\u0275dir=ve({type:i}),i})(),VJ=(()=>{class i extends UJ{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)(E(Qn),E(vt),E(kr,8))},i.\u0275cmp=ot({type:i,selectors:[["mat-tooltip-component"]],viewQuery:function(e,n){if(1&e&&$n(AJ,7),2&e){let r;At(r=Dt())&&(n._tooltip=r.first)}},hostAttrs:["aria-hidden","true"],hostVars:2,hostBindings:function(e,n){1&e&&Oe("mouseleave",function(s){return n._handleMouseLeave(s)}),2&e&&qo("zoom",n.isVisible()?1:null)},features:[dt],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&&(G(0,"div",0,1),Oe("animationend",function(s){return n._handleAnimationEnd(s)}),G(2,"div",2),Be(3),j()()),2&e&&(ln("mdc-tooltip--multiline",n._isMultiline),U("ngClass",n.tooltipClass),V(3),ui(n.message))},dependencies:[hm],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})(),LV=(()=>{class i{}return i.\u0275fac=function(e){return new(e||i)},i.\u0275mod=en({type:i}),i.\u0275inj=Wt({providers:[IJ],imports:[UU,co,Pm,Jn,Jn,Ky]}),i})();function NV(...i){const t=M0(i),{args:e,keys:n}=zB(i),r=new In(s=>{const{length:o}=e;if(!o)return void s.complete();const a=new Array(o);let l=o,c=o;for(let d=0;d{h||(h=!0,c--),a[d]=p},()=>l--,void 0,()=>{(!l||!h)&&(c||s.next(n?HB(n,a):a),s.complete())}))}});return t?r.pipe(JT(t)):r}class uR{}class uu{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 uu?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 uu;return e.lazyInit=this.lazyInit&&this.lazyInit instanceof uu?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 zJ{encodeKey(t){return UV(t)}encodeValue(t){return UV(t)}decodeKey(t){return decodeURIComponent(t)}decodeValue(t){return decodeURIComponent(t)}}const $J=/%(\d[a-f0-9])/gi,GJ={40:"@","3A":":",24:"$","2C":",","3B":";","3D":"=","3F":"?","2F":"/"};function UV(i){return encodeURIComponent(i).replace($J,(t,e)=>GJ[e]??t)}function ZM(i){return`${i}`}class hu{constructor(t={}){if(this.updates=null,this.cloneFrom=null,this.encoder=t.encoder||new zJ,t.fromString){if(t.fromObject)throw new Error("Cannot specify both fromString and fromObject.");this.map=function HJ(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(ZM):[ZM(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 hu({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(ZM(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(ZM(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 WJ{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 VV(i){return typeof ArrayBuffer<"u"&&i instanceof ArrayBuffer}function zV(i){return typeof Blob<"u"&&i instanceof Blob}function HV(i){return typeof FormData<"u"&&i instanceof FormData}class sb{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 jJ(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 uu),this.context||(this.context=new WJ),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 sb(e,n,s,{params:c,headers:l,context:d,reportProgress:a,responseType:r,withCredentials:o})}}var ls=(()=>((ls=ls||{})[ls.Sent=0]="Sent",ls[ls.UploadProgress=1]="UploadProgress",ls[ls.ResponseHeader=2]="ResponseHeader",ls[ls.DownloadProgress=3]="DownloadProgress",ls[ls.Response=4]="Response",ls[ls.User=5]="User",ls))();class qJ{constructor(t,e=200,n="OK"){this.headers=t.headers||new uu,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 hR extends qJ{constructor(t={}){super(t),this.type=ls.Response,this.body=void 0!==t.body?t.body:null}clone(t={}){return new hR({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 fR(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 pR=(()=>{class i{constructor(e){this.handler=e}request(e,n,r={}){let s;if(e instanceof sb)s=e;else{let l,c;l=r.headers instanceof uu?r.headers:new uu(r.headers),r.params&&(c=r.params instanceof hu?r.params:new hu({fromObject:r.params})),s=new sb(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=mt(s).pipe(ru(l=>this.handler.handle(l)));if(e instanceof sb||"events"===r.observe)return o;const a=o.pipe(gn(l=>l instanceof hR));switch(r.observe||"body"){case"body":switch(s.responseType){case"arraybuffer":return a.pipe(tt(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(tt(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(tt(l=>{if(null!==l.body&&"string"!=typeof l.body)throw new Error("Response is not a string.");return l.body}));default:return a.pipe(tt(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 hu).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,fR(r,n))}post(e,n,r={}){return this.request("POST",e,fR(r,n))}put(e,n,r={}){return this.request("PUT",e,fR(r,n))}}return i.\u0275fac=function(e){return new(e||i)(ee(uR))},i.\u0275prov=Pe({token:i,factory:i.\u0275fac}),i})();const aee=["*"];let JM;function ob(i){return function lee(){if(void 0===JM&&(JM=null,typeof window<"u")){const i=window;void 0!==i.trustedTypes&&(JM=i.trustedTypes.createPolicy("angular#components",{createHTML:t=>t}))}return JM}()?.createHTML(i)||i}function KV(i){return Error(`Unable to find icon with the name "${i}"`)}function ZV(i){return Error(`The URL provided to MatIconRegistry was not trusted as a resource URL via Angular's DomSanitizer. Attempted URL was "${i}".`)}function QV(i){return Error(`The literal provided to MatIconRegistry was not trusted as safe HTML by Angular's DomSanitizer. Attempted literal was "${i}".`)}class zh{constructor(t,e,n){this.url=t,this.svgText=e,this.options=n}}let eC=(()=>{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 zh(r,null,s))}addSvgIconResolver(e){return this._resolvers.push(e),this}addSvgIconLiteralInNamespace(e,n,r,s){const o=this._sanitizer.sanitize(Zn.HTML,r);if(!o)throw QV(r);const a=ob(o);return this._addSvgIconConfig(e,n,new zh("",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 zh(n,null,r))}addSvgIconSetLiteralInNamespace(e,n,r){const s=this._sanitizer.sanitize(Zn.HTML,n);if(!s)throw QV(n);const o=ob(s);return this._addSvgIconSetConfig(e,new zh("",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(Zn.RESOURCE_URL,e);if(!n)throw ZV(e);const r=this._cachedIconsByUrl.get(n);return r?mt(tC(r)):this._loadSvgIconFromConfig(new zh(e,null)).pipe(Vi(s=>this._cachedIconsByUrl.set(n,s)),tt(s=>tC(s)))}getNamedSvgIcon(e,n=""){const r=JV(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(KV(r))}ngOnDestroy(){this._resolvers=[],this._svgIconConfigs.clear(),this._iconSetConfigs.clear(),this._cachedIconsByUrl.clear()}_getSvgFromConfig(e){return e.svgText?mt(tC(this._svgElementFromConfig(e))):this._loadSvgIconFromConfig(e).pipe(tt(n=>tC(n)))}_getSvgFromIconSetConfigs(e,n){const r=this._extractIconWithNameFromAnySet(e,n);return r?mt(r):NV(n.filter(o=>!o.svgText).map(o=>this._loadSvgIconSetFromConfig(o).pipe(jc(a=>{const c=`Loading icon set URL: ${this._sanitizer.sanitize(Zn.RESOURCE_URL,o.url)} failed: ${a.message}`;return this._errorHandler.handleError(new Error(c)),mt(null)})))).pipe(tt(()=>{const o=this._extractIconWithNameFromAnySet(e,n);if(!o)throw KV(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(Vi(n=>e.svgText=n),tt(()=>this._svgElementFromConfig(e)))}_loadSvgIconSetFromConfig(e){return e.svgText?mt(null):this._fetchIcon(e).pipe(Vi(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(ob(""));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(ob("")),r=e.attributes;for(let s=0;sob(c)),su(()=>this._inProgressUrlFetches.delete(o)),Vf());return this._inProgressUrlFetches.set(o,l),l}_addSvgIconConfig(e,n,r){return this._svgIconConfigs.set(JV(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:""}}}),ez=["clip-path","color-profile","src","cursor","fill","filter","marker","marker-start","marker-mid","marker-end","mask","stroke"],gee=ez.map(i=>`[${i}]`).join(", "),_ee=/^url\(['"]?#(.*?)['"]?\)$/;let gR=(()=>{class i extends hee{get inline(){return this._inline}set inline(e){this._inline=tn(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=Qt.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(gee),r=this._elementsWithExternalReferences=this._elementsWithExternalReferences||new Map;for(let s=0;s{const a=n[s],l=a.getAttribute(o),c=l?l.match(_ee):null;if(c){let d=r.get(a);d||(d=[],r.set(a,d)),d.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(Oi(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)(E(vt),E(eC),xa("aria-hidden"),E(pee),E(cl),E(fee,8))},i.\u0275cmp=ot({type:i,selectors:[["mat-icon"]],hostAttrs:["role","img",1,"mat-icon","notranslate"],hostVars:8,hostBindings:function(e,n){2&e&&(It("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),ln("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:[dt],ngContentSelectors:aee,decls:1,vars:0,template:function(e,n){1&e&&(or(),Yt(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})(),tz=(()=>{class i{}return i.\u0275fac=function(e){return new(e||i)},i.\u0275mod=en({type:i}),i.\u0275inj=Wt({imports:[Jn,Jn]}),i})(),nz=(()=>{class i{constructor(e){this.viewContainerRef=e}}return i.\u0275fac=function(e){return new(e||i)(E(jr))},i.\u0275dir=ve({type:i,selectors:[["","dataBlockUI",""]]}),i})(),vee=(()=>{class i{constructor(){this.resource=null,this.name="",this.resourceDescription="",this.changed=new $e}}return i.\u0275fac=function(e){return new(e||i)},i.\u0275cmp=ot({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&&(G(0,"p",0),Be(1),j()),2&e&&(U("matTooltip",n.resourceDescription),V(1),Dh("",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:[Fs],changeDetection:0}),i})();function yee(i,t){if(1&i&&(G(0,"h2",4),Be(1),j()),2&i){const e=re();U("matTooltip",e.resourceDescription),V(1),ui(e.name)}}function bee(i,t){1&i&&Ie(0,"app-block-actions",5),2&i&&U("resource",re().resource)}const xee=function(i,t,e,n){return{id:i,name:t,data:e,schema:n}};function wee(i,t){if(1&i&&Ie(0,"app-editor",7),2&i){const e=re().$implicit,n=re();U("resource",N2(3,xee,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 Mee(i,t){if(1&i&&(Gr(0),fe(1,wee,1,8,"app-editor",6),ct(2,"async"),Wr()),2&i){const e=t.$implicit,n=re();V(1),U("ngIf",!(ut(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 ec=(()=>{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 $e,this.destroyed$=new Te}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(Ue(this.destroyed$),gn(([n,r])=>!!this.resource&&n.startsWith(this.resource.id)&&!n.substring(this.resource.id.length+1).includes("/"))).subscribe(function(){var n=nt(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)(E(Fa))},i.\u0275cmp=ot({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&&(fe(0,yee,2,2,"h2",0),ct(1,"async"),fe(2,bee,1,1,"app-block-actions",1),G(3,"div",2),fe(4,Mee,3,3,"ng-container",3),j()),2&e){let r;U("ngIf",n.name&&n.name!=(null==(r=ut(1,4,n.main.resource$))?null:r.name)),V(2),U("ngIf",!n.hideBlockActions),V(2),U("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})(),iz=(()=>{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)(E(ll),E(vt))},i.\u0275dir=ve({type:i}),i})(),Hh=(()=>{class i extends iz{}return i.\u0275fac=function(){let t;return function(n){return(t||(t=si(i)))(n||i)}}(),i.\u0275dir=ve({type:i,features:[dt]}),i})();const Io=new me("NgValueAccessor"),See={provide:Io,useExisting:Gn(()=>_l),multi:!0},Aee=new me("CompositionEventMode");let _l=(()=>{class i extends iz{constructor(e,n,r){super(e,n),this._compositionMode=r,this._composing=!1,null==this._compositionMode&&(this._compositionMode=!function Eee(){const i=$c()?$c().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)(E(ll),E(vt),E(Aee,8))},i.\u0275dir=ve({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&&Oe("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:[Dn([See]),dt]}),i})();const Dee=!1;function fu(i){return null==i||("string"==typeof i||Array.isArray(i))&&0===i.length}function sz(i){return null!=i&&"number"==typeof i.length}const qr=new me("NgValidators"),pu=new me("NgAsyncValidators"),Tee=/^(?=.{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 vl{static min(t){return oz(t)}static max(t){return az(t)}static required(t){return function lz(i){return fu(i.value)?{required:!0}:null}(t)}static requiredTrue(t){return function cz(i){return!0===i.value?null:{required:!0}}(t)}static email(t){return function dz(i){return fu(i.value)||Tee.test(i.value)?null:{email:!0}}(t)}static minLength(t){return uz(t)}static maxLength(t){return hz(t)}static pattern(t){return function fz(i){if(!i)return nC;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(fu(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 yz(t)}static composeAsync(t){return bz(t)}}function oz(i){return t=>{if(fu(t.value)||fu(i))return null;const e=parseFloat(t.value);return!isNaN(e)&&e{if(fu(t.value)||fu(i))return null;const e=parseFloat(t.value);return!isNaN(e)&&e>i?{max:{max:i,actual:t.value}}:null}}function uz(i){return t=>fu(t.value)||!sz(t.value)?null:t.value.lengthsz(t.value)&&t.value.length>i?{maxlength:{requiredLength:i,actualLength:t.value.length}}:null}function nC(i){return null}function pz(i){return null!=i}function mz(i){const t=oy(i)?Ni(i):i;if(Dee&&!FD(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 pe(-1101,e)}return t}function gz(i){let t={};return i.forEach(e=>{t=null!=e?{...t,...e}:t}),0===Object.keys(t).length?null:t}function _z(i,t){return t.map(e=>e(i))}function vz(i){return i.map(t=>function Iee(i){return!i.validate}(t)?t:e=>t.validate(e))}function yz(i){if(!i)return null;const t=i.filter(pz);return 0==t.length?null:function(e){return gz(_z(e,t))}}function _R(i){return null!=i?yz(vz(i)):null}function bz(i){if(!i)return null;const t=i.filter(pz);return 0==t.length?null:function(e){return NV(_z(e,t).map(mz)).pipe(tt(gz))}}function vR(i){return null!=i?bz(vz(i)):null}function xz(i,t){return null===i?[t]:Array.isArray(i)?[...i,t]:[i,t]}function wz(i){return i._rawValidators}function Mz(i){return i._rawAsyncValidators}function yR(i){return i?Array.isArray(i)?i:[i]:[]}function iC(i,t){return Array.isArray(i)?i.includes(t):i===t}function Cz(i,t){const e=yR(t);return yR(i).forEach(r=>{iC(e,r)||e.push(r)}),e}function Sz(i,t){return yR(t).filter(e=>!iC(i,e))}class Ez{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=_R(this._rawValidators)}_setAsyncValidators(t){this._rawAsyncValidators=t||[],this._composedAsyncValidatorFn=vR(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 uo extends Ez{get formDirective(){return null}get path(){return null}}class tc extends Ez{constructor(){super(...arguments),this._parent=null,this.name=null,this.valueAccessor=null}}class Az{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 nc=(()=>{class i extends Az{constructor(e){super(e)}}return i.\u0275fac=function(e){return new(e||i)(E(tc,2))},i.\u0275dir=ve({type:i,selectors:[["","formControlName",""],["","ngModel",""],["","formControl",""]],hostVars:14,hostBindings:function(e,n){2&e&&ln("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:[dt]}),i})(),bR=(()=>{class i extends Az{constructor(e){super(e)}}return i.\u0275fac=function(e){return new(e||i)(E(uo,10))},i.\u0275dir=ve({type:i,selectors:[["","formGroupName",""],["","formArrayName",""],["","ngModelGroup",""],["","formGroup",""],["form",3,"ngNoForm",""],["","ngForm",""]],hostVars:16,hostBindings:function(e,n){2&e&&ln("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:[dt]}),i})();function Dz(i,t){return i?`with name: '${t}'`:`at index: ${t}`}const MR=!1,ab="VALID",sC="INVALID",zm="PENDING",lb="DISABLED";function CR(i){return(oC(i)?i.validators:i)||null}function SR(i,t){return(oC(t)?t.asyncValidators:i)||null}function oC(i){return null!=i&&!Array.isArray(i)&&"object"==typeof i}function Tz(i,t,e){const n=i.controls;if(!(t?Object.keys(n):n).length)throw new pe(1e3,MR?function Oee(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 pe(1001,MR?function Fee(i,t){return`Cannot find form control ${Dz(i,t)}`}(t,e):"")}function Iz(i,t,e){i._forEachChild((n,r)=>{if(void 0===e[r])throw new pe(1002,MR?function Lee(i,t){return`Must supply a value for form control ${Dz(i,t)}`}(t,r):"")})}class aC{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===ab}get invalid(){return this.status===sC}get pending(){return this.status==zm}get disabled(){return this.status===lb}get enabled(){return this.status!==lb}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(Cz(t,this._rawValidators))}addAsyncValidators(t){this.setAsyncValidators(Cz(t,this._rawAsyncValidators))}removeValidators(t){this.setValidators(Sz(t,this._rawValidators))}removeAsyncValidators(t){this.setAsyncValidators(Sz(t,this._rawAsyncValidators))}hasValidator(t){return iC(this._rawValidators,t)}hasAsyncValidator(t){return iC(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=lb,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=ab,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===ab||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()?lb:ab}_runValidator(){return this.validator?this.validator(this):null}_runAsyncValidator(t){if(this.asyncValidator){this.status=zm,this._hasOwnPendingAsyncValidator=!0;const e=mz(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 $e,this.statusChanges=new $e}_calculateStatus(){return this._allControlsDisabled()?lb:this.errors?sC:this._hasOwnPendingAsyncValidator||this._anyControlsHaveStatus(zm)?zm:this._anyControlsHaveStatus(sC)?sC:ab}_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){oC(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 Nee(i){return Array.isArray(i)?_R(i):i||null}(this._rawValidators)}_assignAsyncValidators(t){this._rawAsyncValidators=Array.isArray(t)?t.slice():t,this._composedAsyncValidatorFn=function Bee(i){return Array.isArray(i)?vR(i):i||null}(this._rawAsyncValidators)}}class Hm extends aC{constructor(t,e,n){super(CR(e),SR(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={}){Iz(this,!0,t),Object.keys(t).forEach(n=>{Tz(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 Rz extends Hm{}const $h=new me("CallSetDisabledState",{providedIn:"root",factory:()=>cb}),cb="always";function lC(i,t){return[...t.path,i]}function db(i,t,e=cb){ER(i,t),t.valueAccessor.writeValue(i.value),(i.disabled||"always"===e)&&t.valueAccessor.setDisabledState?.(i.disabled),function Vee(i,t){t.valueAccessor.registerOnChange(e=>{i._pendingValue=e,i._pendingChange=!0,i._pendingDirty=!0,"change"===i.updateOn&&kz(i,t)})}(i,t),function Hee(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 zee(i,t){t.valueAccessor.registerOnTouched(()=>{i._pendingTouched=!0,"blur"===i.updateOn&&i._pendingChange&&kz(i,t),"submit"!==i.updateOn&&i.markAsTouched()})}(i,t),function Uee(i,t){if(t.valueAccessor.setDisabledState){const e=n=>{t.valueAccessor.setDisabledState(n)};i.registerOnDisabledChange(e),t._registerOnDestroy(()=>{i._unregisterOnDisabledChange(e)})}}(i,t)}function cC(i,t,e=!0){const n=()=>{};t.valueAccessor&&(t.valueAccessor.registerOnChange(n),t.valueAccessor.registerOnTouched(n)),uC(i,t),i&&(t._invokeOnDestroyCallbacks(),i._registerOnCollectionChange(()=>{}))}function dC(i,t){i.forEach(e=>{e.registerOnValidatorChange&&e.registerOnValidatorChange(t)})}function ER(i,t){const e=wz(i);null!==t.validator?i.setValidators(xz(e,t.validator)):"function"==typeof e&&i.setValidators([e]);const n=Mz(i);null!==t.asyncValidator?i.setAsyncValidators(xz(n,t.asyncValidator)):"function"==typeof n&&i.setAsyncValidators([n]);const r=()=>i.updateValueAndValidity();dC(t._rawValidators,r),dC(t._rawAsyncValidators,r)}function uC(i,t){let e=!1;if(null!==i){if(null!==t.validator){const r=wz(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=Mz(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 dC(t._rawValidators,n),dC(t._rawAsyncValidators,n),e}function kz(i,t){i._pendingDirty&&i.markAsDirty(),i.setValue(i._pendingValue,{emitModelToViewChange:!1}),t.viewToModelUpdate(i._pendingValue),i._pendingChange=!1}function Pz(i,t){ER(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 Oz(i,t){i._syncPendingControls(),t.forEach(e=>{const n=e.control;"submit"===n.updateOn&&n._pendingChange&&(e.viewToModelUpdate(n._pendingValue),n._pendingChange=!1)})}function TR(i,t){if(!t)return null;let e,n,r;return Array.isArray(t),t.forEach(s=>{s.constructor===_l?e=s:function Wee(i){return Object.getPrototypeOf(i.constructor)===Hh}(s)?n=s:r=s}),r||n||e||null}const Yee={provide:uo,useExisting:Gn(()=>hb)},ub=(()=>Promise.resolve())();let hb=(()=>{class i extends uo{constructor(e,n,r){super(),this.callSetDisabledState=r,this.submitted=!1,this._directives=new Set,this.ngSubmit=new $e,this.form=new Hm({},_R(e),vR(n))}ngAfterViewInit(){this._setUpdateStrategy()}get formDirective(){return this}get control(){return this.form}get path(){return[]}get controls(){return this.form.controls}addControl(e){ub.then(()=>{const n=this._findContainer(e.path);e.control=n.registerControl(e.name,e.control),db(e.control,e,this.callSetDisabledState),e.control.updateValueAndValidity({emitEvent:!1}),this._directives.add(e)})}getControl(e){return this.form.get(e.path)}removeControl(e){ub.then(()=>{const n=this._findContainer(e.path);n&&n.removeControl(e.name),this._directives.delete(e)})}addFormGroup(e){ub.then(()=>{const n=this._findContainer(e.path),r=new Hm({});Pz(r,e),n.registerControl(e.name,r),r.updateValueAndValidity({emitEvent:!1})})}removeFormGroup(e){ub.then(()=>{const n=this._findContainer(e.path);n&&n.removeControl(e.name)})}getFormGroup(e){return this.form.get(e.path)}updateModel(e,n){ub.then(()=>{this.form.get(e.path).setValue(n)})}setValue(e){this.control.setValue(e)}onSubmit(e){return this.submitted=!0,Oz(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)(E(qr,10),E(pu,10),E($h,8))},i.\u0275dir=ve({type:i,selectors:[["form",3,"ngNoForm","",3,"formGroup",""],["ng-form"],["","ngForm",""]],hostBindings:function(e,n){1&e&&Oe("submit",function(s){return n.onSubmit(s)})("reset",function(){return n.onReset()})},inputs:{options:["ngFormOptions","options"]},outputs:{ngSubmit:"ngSubmit"},exportAs:["ngForm"],features:[Dn([Yee]),dt]}),i})();function Fz(i,t){const e=i.indexOf(t);e>-1&&i.splice(e,1)}function Lz(i){return"object"==typeof i&&null!==i&&2===Object.keys(i).length&&"value"in i&&"disabled"in i}const ic=class extends aC{constructor(t=null,e,n){super(CR(e),SR(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}),oC(e)&&(e.nonNullable||e.initialValueIsDefault)&&(this.defaultValue=Lz(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){Fz(this._onChange,t)}registerOnDisabledChange(t){this._onDisabledChange.push(t)}_unregisterOnDisabledChange(t){Fz(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){Lz(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}},Kee={provide:tc,useExisting:Gn(()=>Zc)},Uz=(()=>Promise.resolve())();let Zc=(()=>{class i extends tc{constructor(e,n,r,s,o,a){super(),this._changeDetectorRef=o,this.callSetDisabledState=a,this.control=new ic,this._registered=!1,this.update=new $e,this._parent=e,this._setValidators(n),this._setAsyncValidators(r),this.valueAccessor=TR(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(){db(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){Uz.then(()=>{this.control.setValue(e,{emitViewToModelChange:!1}),this._changeDetectorRef?.markForCheck()})}_updateDisabled(e){const n=e.isDisabled.currentValue,r=0!==n&&function um(i){return"boolean"==typeof i?i:null!=i&&"false"!==i}(n);Uz.then(()=>{r&&!this.control.disabled?this.control.disable():!r&&this.control.disabled&&this.control.enable(),this._changeDetectorRef?.markForCheck()})}_getPath(e){return this._parent?lC(e,this._parent):[e]}}return i.\u0275fac=function(e){return new(e||i)(E(uo,9),E(qr,10),E(pu,10),E(Io,10),E(Qn,8),E($h,8))},i.\u0275dir=ve({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:[Dn([Kee]),dt,xi]}),i})(),IR=(()=>{class i{}return i.\u0275fac=function(e){return new(e||i)},i.\u0275dir=ve({type:i,selectors:[["form",3,"ngNoForm","",3,"ngNativeValidate",""]],hostAttrs:["novalidate",""]}),i})();const Zee={provide:Io,useExisting:Gn(()=>mu),multi:!0};let mu=(()=>{class i extends Hh{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=si(i)))(n||i)}}(),i.\u0275dir=ve({type:i,selectors:[["input","type","number","formControlName",""],["input","type","number","formControl",""],["input","type","number","ngModel",""]],hostBindings:function(e,n){1&e&&Oe("input",function(s){return n.onChange(s.target.value)})("blur",function(){return n.onTouched()})},features:[Dn([Zee]),dt]}),i})(),Vz=(()=>{class i{}return i.\u0275fac=function(e){return new(e||i)},i.\u0275mod=en({type:i}),i.\u0275inj=Wt({}),i})();const RR=new me("NgModelWithFormControlWarning"),nte={provide:uo,useExisting:Gn(()=>Gh)};let Gh=(()=>{class i extends uo{constructor(e,n,r){super(),this.callSetDisabledState=r,this.submitted=!1,this._onCollectionChange=()=>this._updateDomValue(),this.directives=[],this.form=null,this.ngSubmit=new $e,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&&(uC(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 db(n,e,this.callSetDisabledState),n.updateValueAndValidity({emitEvent:!1}),this.directives.push(e),n}getControl(e){return this.form.get(e.path)}removeControl(e){cC(e.control||null,e,!1),function jee(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,Oz(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&&(cC(n||null,e),(i=>i instanceof ic)(r)&&(db(r,e,this.callSetDisabledState),e.control=r))}),this.form._updateTreeValidity({emitEvent:!1})}_setUpFormContainer(e){const n=this.form.get(e.path);Pz(n,e),n.updateValueAndValidity({emitEvent:!1})}_cleanUpFormContainer(e){if(this.form){const n=this.form.get(e.path);n&&function $ee(i,t){return uC(i,t)}(n,e)&&n.updateValueAndValidity({emitEvent:!1})}}_updateRegistrations(){this.form._registerOnCollectionChange(this._onCollectionChange),this._oldForm&&this._oldForm._registerOnCollectionChange(()=>{})}_updateValidators(){ER(this.form,this),this._oldForm&&uC(this._oldForm,this)}_checkFormPresent(){}}return i.\u0275fac=function(e){return new(e||i)(E(qr,10),E(pu,10),E($h,8))},i.\u0275dir=ve({type:i,selectors:[["","formGroup",""]],hostBindings:function(e,n){1&e&&Oe("submit",function(s){return n.onSubmit(s)})("reset",function(){return n.onReset()})},inputs:{form:["formGroup","form"]},outputs:{ngSubmit:"ngSubmit"},exportAs:["ngForm"],features:[Dn([nte]),dt,xi]}),i})();const ste={provide:tc,useExisting:Gn(()=>hC)};let hC=(()=>{class i extends tc{set isDisabled(e){}constructor(e,n,r,s,o){super(),this._ngModelWarningConfig=o,this._added=!1,this.update=new $e,this._ngModelWarningSent=!1,this._parent=e,this._setValidators(n),this._setAsyncValidators(r),this.valueAccessor=TR(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 lC(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)(E(uo,13),E(qr,10),E(pu,10),E(Io,10),E(RR,8))},i.\u0275dir=ve({type:i,selectors:[["","formControlName",""]],inputs:{name:["formControlName","name"],isDisabled:["disabled","isDisabled"],model:["ngModel","model"]},outputs:{update:"ngModelChange"},features:[Dn([ste]),dt,xi]}),i})();function Yz(i){return"number"==typeof i?i:parseInt(i,10)}function qz(i){return"number"==typeof i?i:parseFloat(i)}let Wh=(()=>{class i{constructor(){this._validator=nC}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):nC,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=ve({type:i,features:[xi]}),i})();const hte={provide:qr,useExisting:Gn(()=>gu),multi:!0};let gu=(()=>{class i extends Wh{constructor(){super(...arguments),this.inputName="max",this.normalizeInput=e=>qz(e),this.createValidator=e=>az(e)}}return i.\u0275fac=function(){let t;return function(n){return(t||(t=si(i)))(n||i)}}(),i.\u0275dir=ve({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&&It("max",n._enabled?n.max:null)},inputs:{max:"max"},features:[Dn([hte]),dt]}),i})();const fte={provide:qr,useExisting:Gn(()=>_u),multi:!0};let _u=(()=>{class i extends Wh{constructor(){super(...arguments),this.inputName="min",this.normalizeInput=e=>qz(e),this.createValidator=e=>oz(e)}}return i.\u0275fac=function(){let t;return function(n){return(t||(t=si(i)))(n||i)}}(),i.\u0275dir=ve({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&&It("min",n._enabled?n.min:null)},inputs:{min:"min"},features:[Dn([fte]),dt]}),i})();const _te={provide:qr,useExisting:Gn(()=>NR),multi:!0};let NR=(()=>{class i extends Wh{constructor(){super(...arguments),this.inputName="minlength",this.normalizeInput=e=>Yz(e),this.createValidator=e=>uz(e)}}return i.\u0275fac=function(){let t;return function(n){return(t||(t=si(i)))(n||i)}}(),i.\u0275dir=ve({type:i,selectors:[["","minlength","","formControlName",""],["","minlength","","formControl",""],["","minlength","","ngModel",""]],hostVars:1,hostBindings:function(e,n){2&e&&It("minlength",n._enabled?n.minlength:null)},inputs:{minlength:"minlength"},features:[Dn([_te]),dt]}),i})();const vte={provide:qr,useExisting:Gn(()=>BR),multi:!0};let BR=(()=>{class i extends Wh{constructor(){super(...arguments),this.inputName="maxlength",this.normalizeInput=e=>Yz(e),this.createValidator=e=>hz(e)}}return i.\u0275fac=function(){let t;return function(n){return(t||(t=si(i)))(n||i)}}(),i.\u0275dir=ve({type:i,selectors:[["","maxlength","","formControlName",""],["","maxlength","","formControl",""],["","maxlength","","ngModel",""]],hostVars:1,hostBindings:function(e,n){2&e&&It("maxlength",n._enabled?n.maxlength:null)},inputs:{maxlength:"maxlength"},features:[Dn([vte]),dt]}),i})(),Qz=(()=>{class i{}return i.\u0275fac=function(e){return new(e||i)},i.\u0275mod=en({type:i}),i.\u0275inj=Wt({imports:[Vz]}),i})();class Jz extends aC{constructor(t,e,n){super(CR(e),SR(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={}){Iz(this,!1,t),t.forEach((n,r)=>{Tz(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 eH(i){return!!i&&(void 0!==i.asyncValidators||void 0!==i.validators||void 0!==i.updateOn)}let bte=(()=>{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 eH(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 Rz(r,n)}control(e,n,r){let s={};return this.useNonNullable?(eH(n)?s=n:(s.validators=n,s.asyncValidators=r),new ic(e,{...s,nonNullable:!0})):new ic(e,n,r)}array(e,n,r){const s=e.map(o=>this._createControl(o));return new Jz(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 ic||e instanceof aC?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=Pe({token:i,factory:i.\u0275fac,providedIn:"root"}),i})(),tH=(()=>{class i{static withConfig(e){return{ngModule:i,providers:[{provide:$h,useValue:e.callSetDisabledState??cb}]}}}return i.\u0275fac=function(e){return new(e||i)},i.\u0275mod=en({type:i}),i.\u0275inj=Wt({imports:[Qz]}),i})(),nH=(()=>{class i{static withConfig(e){return{ngModule:i,providers:[{provide:RR,useValue:e.warnOnNgModelWithFormControl??"always"},{provide:$h,useValue:e.callSetDisabledState??cb}]}}}return i.\u0275fac=function(e){return new(e||i)},i.\u0275mod=en({type:i}),i.\u0275inj=Wt({imports:[Qz]}),i})();const xte=["matFormFieldNotchedOutline",""],wte=["*"],Mte=["textField"],Cte=["iconPrefixContainer"],Ste=["textPrefixContainer"];function Ete(i,t){1&i&&Ie(0,"span",19)}function Ate(i,t){if(1&i){const e=jn();G(0,"label",17),Oe("cdkObserveContent",function(){return Vt(e),Et(re(2)._refreshOutlineNotchWidth())}),Yt(1,1),fe(2,Ete,1,0,"span",18),j()}if(2&i){const e=re(2);U("floating",e._shouldLabelFloat())("cdkObserveContentDisabled",!e._hasOutline())("id",e._labelId),It("for",e._control.id)("aria-owns",e._control.id),V(2),U("ngIf",!e.hideRequiredMarker&&e._control.required)}}function Dte(i,t){1&i&&fe(0,Ate,3,6,"label",16),2&i&&U("ngIf",re()._hasFloatingLabel())}function Tte(i,t){1&i&&Ie(0,"div",20)}function Ite(i,t){}function Rte(i,t){1&i&&fe(0,Ite,0,0,"ng-template",22),2&i&&(re(2),U("ngTemplateOutlet",Zi(1)))}function kte(i,t){if(1&i&&(G(0,"div",21),fe(1,Rte,1,1,"ng-template",9),j()),2&i){const e=re();U("matFormFieldNotchedOutlineOpen",e._shouldLabelFloat())("matFormFieldNotchedOutlineLabelWidth",e._labelWidth),V(1),U("ngIf",!e._forceDisplayInfixLabel())}}function Pte(i,t){1&i&&(G(0,"div",23,24),Yt(2,2),j())}function Ote(i,t){1&i&&(G(0,"div",25,26),Yt(2,3),j())}function Fte(i,t){}function Lte(i,t){1&i&&fe(0,Fte,0,0,"ng-template",22),2&i&&(re(),U("ngTemplateOutlet",Zi(1)))}function Nte(i,t){1&i&&(G(0,"div",27),Yt(1,4),j())}function Bte(i,t){1&i&&(G(0,"div",28),Yt(1,5),j())}function Ute(i,t){1&i&&Ie(0,"div",29)}function Vte(i,t){1&i&&(G(0,"div",30),Yt(1,6),j()),2&i&&U("@transitionMessages",re()._subscriptAnimationState)}function zte(i,t){if(1&i&&(G(0,"mat-hint",34),Be(1),j()),2&i){const e=re(2);U("id",e._hintLabelId),V(1),ui(e.hintLabel)}}function Hte(i,t){if(1&i&&(G(0,"div",31),fe(1,zte,2,2,"mat-hint",32),Yt(2,7),Ie(3,"div",33),Yt(4,8),j()),2&i){const e=re();U("@transitionMessages",e._subscriptAnimationState),V(1),U("ngIf",e.hintLabel)}}const $te=["*",[["mat-label"]],[["","matPrefix",""],["","matIconPrefix",""]],[["","matTextPrefix",""]],[["","matTextSuffix",""]],[["","matSuffix",""],["","matIconSuffix",""]],[["mat-error"],["","matError",""]],[["mat-hint",3,"align","end"]],[["mat-hint","align","end"]]],Gte=["*","mat-label","[matPrefix], [matIconPrefix]","[matTextPrefix]","[matTextSuffix]","[matSuffix], [matIconSuffix]","mat-error, [matError]","mat-hint:not([align='end'])","mat-hint[align='end']"];let Ro=(()=>{class i{}return i.\u0275fac=function(e){return new(e||i)},i.\u0275dir=ve({type:i,selectors:[["mat-label"]]}),i})(),Wte=0;const iH=new me("MatError");let jte=(()=>{class i{constructor(e,n){this.id="mat-mdc-error-"+Wte++,e||n.nativeElement.setAttribute("aria-live","polite")}}return i.\u0275fac=function(e){return new(e||i)(xa("aria-live"),E(vt))},i.\u0275dir=ve({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&&ql("id",n.id)},inputs:{id:"id"},features:[Dn([{provide:iH,useExisting:i}])]}),i})(),Yte=0,rH=(()=>{class i{constructor(){this.align="start",this.id="mat-mdc-hint-"+Yte++}}return i.\u0275fac=function(e){return new(e||i)},i.\u0275dir=ve({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&&(ql("id",n.id),It("align",null),ln("mat-mdc-form-field-hint-end","end"===n.align))},inputs:{align:"align",id:"id"}}),i})();const sH=new me("MatPrefix");let qte=(()=>{class i{constructor(){this._isText=!1}set _isTextSelector(e){this._isText=!0}}return i.\u0275fac=function(e){return new(e||i)},i.\u0275dir=ve({type:i,selectors:[["","matPrefix",""],["","matIconPrefix",""],["","matTextPrefix",""]],inputs:{_isTextSelector:["matTextPrefix","_isTextSelector"]},features:[Dn([{provide:sH,useExisting:i}])]}),i})();const oH=new me("MatSuffix");let Xte=(()=>{class i{constructor(){this._isText=!1}set _isTextSelector(e){this._isText=!0}}return i.\u0275fac=function(e){return new(e||i)},i.\u0275dir=ve({type:i,selectors:[["","matSuffix",""],["","matIconSuffix",""],["","matTextSuffix",""]],inputs:{_isTextSelector:["matTextSuffix","_isTextSelector"]},features:[Dn([{provide:oH,useExisting:i}])]}),i})(),aH=(()=>{class i{constructor(e){this._elementRef=e,this.floating=!1}getWidth(){return function Kte(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)(E(vt))},i.\u0275dir=ve({type:i,selectors:[["label","matFormFieldFloatingLabel",""]],hostAttrs:[1,"mdc-floating-label","mat-mdc-floating-label"],hostVars:2,hostBindings:function(e,n){2&e&&ln("mdc-floating-label--float-above",n.floating)},inputs:{floating:"floating"}}),i})();const lH="mdc-line-ripple--active",fC="mdc-line-ripple--deactivating";let cH=(()=>{class i{constructor(e,n){this._elementRef=e,this._handleTransitionEnd=r=>{const s=this._elementRef.nativeElement.classList,o=s.contains(fC);"opacity"===r.propertyName&&o&&s.remove(lH,fC)},n.runOutsideAngular(()=>{e.nativeElement.addEventListener("transitionend",this._handleTransitionEnd)})}activate(){const e=this._elementRef.nativeElement.classList;e.remove(fC),e.add(lH)}deactivate(){this._elementRef.nativeElement.classList.add(fC)}ngOnDestroy(){this._elementRef.nativeElement.removeEventListener("transitionend",this._handleTransitionEnd)}}return i.\u0275fac=function(e){return new(e||i)(E(vt),E(gt))},i.\u0275dir=ve({type:i,selectors:[["div","matFormFieldLineRipple",""]],hostAttrs:[1,"mdc-line-ripple"]}),i})(),dH=(()=>{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)(E(vt),E(gt))},i.\u0275cmp=ot({type:i,selectors:[["div","matFormFieldNotchedOutline",""]],hostAttrs:[1,"mdc-notched-outline"],hostVars:2,hostBindings:function(e,n){2&e&&ln("mdc-notched-outline--notched",n.open)},inputs:{labelWidth:["matFormFieldNotchedOutlineLabelWidth","labelWidth"],open:["matFormFieldNotchedOutlineOpen","open"]},attrs:xte,ngContentSelectors:wte,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&&(or(),Ie(0,"div",0),G(1,"div",1),Yt(2),j(),Ie(3,"div",2)),2&e&&(V(1),qo("width",n._getNotchWidth()))},encapsulation:2,changeDetection:0}),i})();const Zte={transitionMessages:Oa("transitionMessages",[Os("enter",oi({opacity:1,transform:"translateY(0%)"})),Or("void => enter",[oi({opacity:0,transform:"translateY(-5px)"}),Yr("300ms cubic-bezier(0.55, 0, 0.55, 0.2)")])])};let UR=(()=>{class i{}return i.\u0275fac=function(e){return new(e||i)},i.\u0275dir=ve({type:i}),i})();const pC=new me("MatFormField"),Qte=new me("MAT_FORM_FIELD_DEFAULT_OPTIONS");let uH=0,yl=(()=>{class i{get hideRequiredMarker(){return this._hideRequiredMarker}set hideRequiredMarker(e){this._hideRequiredMarker=tn(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-"+uH++,this._hintLabelId="mat-mdc-hint-"+uH++,this._subscriptAnimationState="",this._labelWidth=0,this._destroyed=new Te,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(Ue(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(),Cr(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(Ue(this._destroyed)).subscribe(()=>{this._needsOutlineLabelOffsetUpdateOnStable&&(this._needsOutlineLabelOffsetUpdateOnStable=!1,this._updateOutlineLabelOffset())})}),this._dir.change.pipe(Ue(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)(E(vt),E(Qn),E(gt),E(Pa),E(zi),E(Qte,8),E(kr,8),E(qt))},i.\u0275cmp=ot({type:i,selectors:[["mat-form-field"]],contentQueries:function(e,n,r){if(1&e&&(Wi(r,Ro,5),Wi(r,Ro,7),Wi(r,UR,5),Wi(r,sH,5),Wi(r,oH,5),Wi(r,iH,5),Wi(r,rH,5)),2&e){let s;At(s=Dt())&&(n._labelChildNonStatic=s.first),At(s=Dt())&&(n._labelChildStatic=s.first),At(s=Dt())&&(n._formFieldControl=s.first),At(s=Dt())&&(n._prefixChildren=s),At(s=Dt())&&(n._suffixChildren=s),At(s=Dt())&&(n._errorChildren=s),At(s=Dt())&&(n._hintChildren=s)}},viewQuery:function(e,n){if(1&e&&($n(Mte,5),$n(Cte,5),$n(Ste,5),$n(aH,5),$n(dH,5),$n(cH,5)),2&e){let r;At(r=Dt())&&(n._textField=r.first),At(r=Dt())&&(n._iconPrefixContainer=r.first),At(r=Dt())&&(n._textPrefixContainer=r.first),At(r=Dt())&&(n._floatingLabel=r.first),At(r=Dt())&&(n._notchedOutline=r.first),At(r=Dt())&&(n._lineRipple=r.first)}},hostAttrs:[1,"mat-mdc-form-field"],hostVars:42,hostBindings:function(e,n){2&e&&ln("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:[Dn([{provide:pC,useExisting:i}])],ngContentSelectors:Gte,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&&(or($te),fe(0,Dte,1,1,"ng-template",null,0,zc),G(2,"div",1,2),Oe("click",function(s){return n._control.onContainerClick&&n._control.onContainerClick(s)}),fe(4,Tte,1,0,"div",3),G(5,"div",4),fe(6,kte,2,3,"div",5),fe(7,Pte,3,0,"div",6),fe(8,Ote,3,0,"div",7),G(9,"div",8),fe(10,Lte,1,1,"ng-template",9),Yt(11),j(),fe(12,Nte,2,0,"div",10),fe(13,Bte,2,0,"div",11),j(),fe(14,Ute,1,0,"div",12),j(),G(15,"div",13),fe(16,Vte,2,1,"div",14),fe(17,Hte,5,2,"div",15),j()),2&e&&(V(2),ln("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),V(2),U("ngIf",!n._hasOutline()&&!n._control.disabled),V(2),U("ngIf",n._hasOutline()),V(1),U("ngIf",n._hasIconPrefix),V(1),U("ngIf",n._hasTextPrefix),V(2),U("ngIf",!n._hasOutline()||n._forceDisplayInfixLabel()),V(2),U("ngIf",n._hasTextSuffix),V(1),U("ngIf",n._hasIconSuffix),V(1),U("ngIf",!n._hasOutline()),V(1),ln("mat-mdc-form-field-subscript-dynamic-size","dynamic"===n.subscriptSizing),U("ngSwitch",n._getDisplayedMessages()),V(1),U("ngSwitchCase","error"),V(1),U("ngSwitchCase","hint"))},dependencies:[vi,xy,by,UT,SU,rH,aH,dH,cH],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:[Zte.transitionMessages]},changeDetection:0}),i})(),mC=(()=>{class i{}return i.\u0275fac=function(e){return new(e||i)},i.\u0275mod=en({type:i}),i.\u0275inj=Wt({imports:[Jn,co,HI,Jn]}),i})();const pH=Fh({passive:!0});let tne=(()=>{class i{constructor(e,n){this._platform=e,this._ngZone=n,this._monitoredElements=new Map}monitor(e){if(!this._platform.isBrowser)return _o;const n=qc(e),r=this._monitoredElements.get(n);if(r)return r.subject;const s=new Te,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,pH),n.classList.add("cdk-text-field-autofill-monitored")}),this._monitoredElements.set(n,{subject:s,unlisten:()=>{n.removeEventListener("animationstart",a,pH)}}),s}stopMonitoring(e){const n=qc(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)(ee(zi),ee(gt))},i.\u0275prov=Pe({token:i,factory:i.\u0275fac,providedIn:"root"}),i})(),nne=(()=>{class i{}return i.\u0275fac=function(e){return new(e||i)},i.\u0275mod=en({type:i}),i.\u0275inj=Wt({}),i})();const VR=new me("MAT_INPUT_VALUE_ACCESSOR"),ine=["button","checkbox","file","hidden","image","radio","range","reset","submit"];let rne=0;const sne=WU(class{constructor(i,t,e,n){this._defaultErrorStateMatcher=i,this._parentForm=t,this._parentFormGroup=e,this.ngControl=n,this.stateChanges=new Te}});let rc=(()=>{class i extends sne{get disabled(){return this._disabled}set disabled(e){this._disabled=tn(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(vl.required)??!1}set required(e){this._required=tn(e)}get type(){return this._type}set type(e){this._type=e||"text",this._validateType(),!this._isTextarea&&aU().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=tn(e)}constructor(e,n,r,s,o,a,l,c,d,h){super(a,s,o,r),this._elementRef=e,this._platform=n,this._autofillMonitor=c,this._formField=h,this._uid="mat-input-"+rne++,this.focused=!1,this.stateChanges=new Te,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=>aU().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&&d.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(){ine.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)(E(vt),E(zi),E(tc,10),E(hb,8),E(Gh,8),E(YU),E(VR,10),E(tne),E(gt),E(pC,8))},i.\u0275dir=ve({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&&Oe("focus",function(){return n._focusChanged(!0)})("blur",function(){return n._focusChanged(!1)})("input",function(){return n._onInput()}),2&e&&(ql("id",n.id)("disabled",n.disabled)("required",n.required),It("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),ln("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:[Dn([{provide:UR,useExisting:i}]),dt,xi]}),i})(),mH=(()=>{class i{}return i.\u0275fac=function(e){return new(e||i)},i.\u0275mod=en({type:i}),i.\u0275inj=Wt({imports:[Jn,mC,mC,nne,Jn]}),i})();function one(i,t){if(1&i&&(G(0,"mat-label"),Be(1),j()),2&i){const e=re(2);V(1),ui(e.resource.name)}}function ane(i,t){if(1&i){const e=jn();G(0,"mat-form-field",1),fe(1,one,2,1,"mat-label",2),G(2,"input",3),Oe("ngModelChange",function(r){return Vt(e),Et(re().resource.data=r)})("change",function(){return Vt(e),Et(re().changed.emit())}),j()()}if(2&i){const e=re();U("matTooltip",e.resourceDescription),V(1),U("ngIf",e.resource.name),V(1),U("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 lne=(()=>{class i{constructor(){this.resource=null,this.resourceDescription="",this.disabled=!1,this.changed=new $e}}return i.\u0275fac=function(e){return new(e||i)},i.\u0275cmp=ot({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&&fe(0,ane,3,7,"mat-form-field",0),2&e&&U("ngIf",n.resource)},dependencies:[vi,_l,mu,nc,_u,gu,Zc,yl,Ro,rc,Fs],changeDetection:0}),i})();function cne(i,t){if(1&i&&(G(0,"mat-label"),Be(1),j()),2&i){const e=re(2);V(1),ui(e.resource.name)}}function dne(i,t){if(1&i){const e=jn();G(0,"mat-form-field",1),fe(1,cne,2,1,"mat-label",2),G(2,"input",3),Oe("ngModelChange",function(r){return Vt(e),Et(re().resource.data=r)})("change",function(){return Vt(e),Et(re().changed.emit())}),j()()}if(2&i){const e=re();U("matTooltip",e.resourceDescription),V(1),U("ngIf",e.resource.name),V(1),U("disabled",e.disabled||void 0!==e.resource.schema.required_value)("maxlength",e.maxLength)("minlength",e.minLength)("ngModel",e.resource.data)}}let gH=(()=>{class i{constructor(){this._resource=null,this.resourceDescription="",this.disabled=!1,this.changed=new $e,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=ot({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&&fe(0,dne,3,6,"mat-form-field",0),2&e&&U("ngIf",n.resource)},dependencies:[vi,_l,nc,NR,BR,Zc,yl,Ro,rc,Fs],changeDetection:0}),i})();const sc=(i,t)=>i+(i.includes("__")?"/":"__")+t,jh=function(){return[]};function une(i,t){if(1&i&&(G(0,"mat-panel-description"),Be(1," Click to view items ("),G(2,"b"),Be(3),j(),Be(4,") "),j()),2&i){const e=re(2);V(3),ui((e.resourceData||Rs(1,jh)).length)}}function hne(i,t){1&i&&(G(0,"mat-panel-description"),Be(1," Empty array "),j())}function fne(i,t){}function pne(i,t){if(1&i){const e=jn();G(0,"mat-expansion-panel",4),Oe("opened",function(){return Vt(e),Et(re().onContentsTrigger(!0))})("closed",function(){return Vt(e),Et(re().onContentsTrigger(!1))}),G(1,"mat-expansion-panel-header",5)(2,"mat-panel-title"),Be(3),j(),fe(4,une,5,2,"mat-panel-description",1),fe(5,hne,2,0,"mat-panel-description",1),j(),fe(6,fne,0,0,"ng-template",6),j()}if(2&i){const e=re(),n=Zi(3);V(1),U("matTooltip",e.resourceDescription),V(2),Qi(" ",e.name," "),V(1),U("ngIf",(e.resourceData||Rs(5,jh)).length>0),V(1),U("ngIf",0==(e.resourceData||Rs(6,jh)).length),V(1),U("ngTemplateOutlet",n)}}function mne(i,t){}function gne(i,t){if(1&i&&(Gr(0),G(1,"h2",5),Be(2),j(),G(3,"div",7),fe(4,mne,0,0,"ng-template",6),j(),Wr()),2&i){const e=re(),n=Zi(3);V(1),U("matTooltip",e.resourceDescription),V(1),ui(e.name),V(2),U("ngTemplateOutlet",n)}}function _ne(i,t){}function vne(i,t){if(1&i&&Ie(0,"app-editor",10),2&i){const e=re().$implicit,n=re(3);U("resource",n.children[n.pageIndex*n.pageSize+e])("disabled",n.disabled)}}function yne(i,t){if(1&i&&(Gr(0),fe(1,vne,1,2,"app-editor",9),Wr()),2&i){const e=t.$implicit,n=re(3);V(1),U("ngIf",n.pageIndex*n.pageSize+e0)}let zR=(()=>{class i{constructor(e,n){this.main=e,this.cdr=n,this._resource=null,this.resourceDescription="",this.disabled=!1,this.changed=new $e,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 Te}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:sc(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(Ue(this.destroyed$),gn(([n,r])=>!!this.resource&&n.startsWith(this.resource.id)&&!n.substring(this.resource.id.length+1).includes("/"))).subscribe(function(){var n=nt(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 Qe(null),this.imageUrl$=new Qe(null),this.destroyed$=new Te,this.changed=new $e}set resource(e){this._resource$.next(e)}get resource(){return this._resource$.getValue()}ngAfterViewInit(){var e=this;return nt(function*(){e._resource$.pipe(Ue(e.destroyed$)).subscribe(function(){var n=nt(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)(E(Jl),E(Fa))},i.\u0275cmp=ot({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&&(Ie(0,"app-compound-block-ui",0),ct(1,"async"),fe(2,Dne,2,3,"img",1),ct(3,"async")),2&e&&(U("resource",ut(1,3,n._resource$))("fieldBlacklist",Rs(7,Tne)),V(2),U("ngIf",ut(3,5,n.imageUrl$)))},dependencies:[vi,ec,Ia],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 Rne=["*"],Lne=new me("MAT_CARD_CONFIG");let _H=(()=>{class i{constructor(e){this.appearance=e?.appearance||"raised"}}return i.\u0275fac=function(e){return new(e||i)(E(Lne,8))},i.\u0275cmp=ot({type:i,selectors:[["mat-card"]],hostAttrs:[1,"mat-mdc-card","mdc-card"],hostVars:4,hostBindings:function(e,n){2&e&&ln("mat-mdc-card-outlined","outlined"===n.appearance)("mdc-card--outlined","outlined"===n.appearance)},inputs:{appearance:"appearance"},exportAs:["matCard"],ngContentSelectors:Rne,decls:1,vars:0,template:function(e,n){1&e&&(or(),Yt(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})(),vH=(()=>{class i{}return i.\u0275fac=function(e){return new(e||i)},i.\u0275mod=en({type:i}),i.\u0275inj=Wt({imports:[Jn,co,Jn]}),i})();class HR{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 Te,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 $R=(()=>{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=Pe({token:i,factory:i.\u0275fac,providedIn:"root"}),i})(),aie=(()=>{class i{}return i.\u0275fac=function(e){return new(e||i)},i.\u0275mod=en({type:i}),i.\u0275inj=Wt({imports:[Jn,co,tb,Jn]}),i})();const CH={transformPanel:Oa("transformPanel",[Or("void => enter-dropdown",Yr("120ms cubic-bezier(0, 0, 0.2, 1)",sV([oi({opacity:0,transform:"scale(1, 0.8)"}),oi({opacity:1,transform:"scale(1, 1)"})]))),Or("void => enter-dialog",Yr("150ms cubic-bezier(0, 0, 0.2, 1)",sV([oi({opacity:0,transform:"scale(0.7)"}),oi({transform:"none",opacity:1})]))),Or("* => void",Yr("100ms linear",oi({opacity:0})))]),fadeInCalendar:Oa("fadeInCalendar",[Os("void",oi({opacity:0})),Os("enter",oi({opacity:1})),Or("void => *",Yr("120ms 100ms cubic-bezier(0.55, 0, 0.55, 0.2)"))])},AH=function(i){return{active:i}};function Sie(i,t){if(1&i){const e=jn();G(0,"button",2),Oe("click",function(){const s=Vt(e).$implicit;return Et(re().select(s))}),j()}if(2&i){const e=t.$implicit,n=re();qo("background-color",e),U("ngClass",sm(3,AH,n.selectedColor===e))}}function Eie(i,t){if(1&i){const e=jn();G(0,"button",2),Oe("click",function(){const s=Vt(e).$implicit;return Et(re().select(s))}),j()}if(2&i){const e=t.$implicit,n=re();qo("background-color",e),U("ngClass",sm(3,AH,n.selectedColor===e))}}const Aie=["button"],Die=/^\s+/,Tie=/\s+$/,Gm=Math.round,Iie=(Math,Math,Math,/[^0-9]/g),DH=["#ffffff","#ffff00","#ff00ff","#ff0000","#c0c0c0","#808080","#808000","#800080","#800000","#00ffff","#00ff00","#008080","#008000","#0000ff","#000080","#000000"];function TH(i,t,e){const n=i.getImageData(t,e,1,1).data;return{r:n[0],g:n[1],b:n[2]}}function Yh(i){return 1==i.length?"0"+i:""+i}function kie(i){return Math.round(255*parseFloat(i)).toString(16)}function IH(i){return Qo(i)/255}function Qo(i){return parseInt(i,16)}function RH(i,t,e,n){var r=[Yh(Gm(i).toString(16)),Yh(Gm(t).toString(16)),Yh(Gm(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 vu="(?:[-\\+]?\\d*\\.\\d+%?)|(?:[-\\+]?\\d+%?)",jR="[\\s|\\(]+("+vu+")[,|\\s]+("+vu+")[,|\\s]+("+vu+")\\s*\\)?",YR="[\\s|\\(]+("+vu+")[,|\\s]+("+vu+")[,|\\s]+("+vu+")[,|\\s]+("+vu+")\\s*\\)?",qh={CSS_UNIT:new RegExp(vu),rgb:new RegExp("rgb"+jR),rgba:new RegExp("rgba"+YR),hsl:new RegExp("hsl"+jR),hsla:new RegExp("hsla"+YR),hsv:new RegExp("hsv"+jR),hsva:new RegExp("hsva"+YR),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 qR(i){let t;return i=i.replace(Die,"").replace(Tie,"").toLowerCase(),(t=qh.rgb.exec(i))?{r:t[1],g:t[2],b:t[3],a:1}:(t=qh.rgba.exec(i))?{r:t[1],g:t[2],b:t[3],a:t[4]}:(t=qh.hex8.exec(i))?{r:Qo(t[1]),g:Qo(t[2]),b:Qo(t[3]),a:IH(t[4])}:(t=qh.hex6.exec(i))?{r:Qo(t[1]),g:Qo(t[2]),b:Qo(t[3]),a:1}:(t=qh.hex4.exec(i))?{r:Qo(t[1]+""+t[1]),g:Qo(t[2]+""+t[2]),b:Qo(t[3]+""+t[3]),a:IH(t[4]+""+t[4])}:(t=qh.hex3.exec(i))?{r:Qo(t[1]+""+t[1]),g:Qo(t[2]+""+t[2]),b:Qo(t[3]+""+t[3]),a:1}:null}class Xh{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=RH(this.r,this.g,this.b),this.rgba=this.toRgba()}toHex(t){return RH(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 Rie(i,t,e,n,r){var s=[Yh(Gm(i).toString(16)),Yh(Gm(t).toString(16)),Yh(Gm(e).toString(16)),Yh(kie(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 kH=(()=>{class i{constructor(e,n){this.zone=e,this.colorChanged=new $e,this.x=0,this.y=0,this.drag=!1,this._destroyed=new Te,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){Co()},i.\u0275dir=ve({type:i,inputs:{color:"color"},outputs:{colorChanged:"colorChanged"}}),i})(),Fie=(()=>{class i extends kH{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}=TH(this.ctx,e.offsetX,e.offsetY);this.emitChange(new Xh(n,r,s))}}return i.\u0275fac=function(e){return new(e||i)(E(gt))},i.\u0275cmp=ot({type:i,selectors:[["ngx-mat-color-slider"]],features:[dt],decls:1,vars:0,consts:[["id","color-strip","width","15","height","234",1,"zone-strip",3,"mousedown","mouseup"]],template:function(e,n){1&e&&(G(0,"canvas",0),Oe("mousedown",function(s){return n.onMousedown(s)})("mouseup",function(s){return n.onMouseup(s)}),j())}}),i})(),Lie=(()=>{class i{constructor(){}onInput(e){this._formatInput(e.target)}_formatInput(e){let n=Number(e.value.replace(Iie,""));n=isNaN(n)?0:n,e.value=n}}return i.\u0275fac=function(e){return new(e||i)},i.\u0275dir=ve({type:i,selectors:[["","ngxMatNumericColorInput",""]],hostBindings:function(e,n){1&e&&Oe("input",function(s){return n.onInput(s)})}}),i})(),Bie=(()=>{class i extends kH{constructor(e){super(e,"color-block"),this.zone=e,this._resetBaseColor=!0,this.formGroup=new Hm({r:new ic(null,[vl.required]),g:new ic(null,[vl.required]),b:new ic(null,[vl.required]),a:new ic(null,[vl.required]),hex:new ic(null,[vl.required,vl.pattern(qh.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(){Cr(this.rCtrl.valueChanges,this.gCtrl.valueChanges,this.bCtrl.valueChanges,this.aCtrl.valueChanges).pipe(Ue(this._destroyed),gl(400)).subscribe(r=>{const s=new Xh(Number(this.rCtrl.value),Number(this.gCtrl.value),Number(this.bCtrl.value),Number(this.aCtrl.value));this.emitChange(s)}),this.hexCtrl.valueChanges.pipe(Ue(this._destroyed),gl(400),Ql()).subscribe(r=>{const s=qR(r);if(null!=s){const o=new Xh(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}=TH(this.ctx,e.offsetX,e.offsetY);this.emitChange(new Xh(n,r,s))}}return i.\u0275fac=function(e){return new(e||i)(E(gt))},i.\u0275cmp=ot({type:i,selectors:[["ngx-mat-color-canvas"]],hostAttrs:[1,"ngx-mat-color-canvas"],features:[dt,xi],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&&(G(0,"form",0)(1,"div",1)(2,"div",2)(3,"canvas",3),Oe("mousedown",function(s){return n.onMousedown(s)})("mouseup",function(s){return n.onMouseup(s)}),j(),G(4,"ngx-mat-color-slider",4),Oe("colorChanged",function(s){return n.onSliderColorChanged(s)}),j()(),G(5,"div",5)(6,"mat-form-field")(7,"mat-label"),Be(8,"R"),j(),Ie(9,"input",6),j(),G(10,"mat-form-field")(11,"mat-label"),Be(12,"G"),j(),Ie(13,"input",7),j(),G(14,"mat-form-field")(15,"mat-label"),Be(16,"B"),j(),Ie(17,"input",8),j()()(),G(18,"div",1),Ie(19,"button",9),G(20,"mat-form-field")(21,"mat-label"),Be(22,"HEX6"),j(),G(23,"mat-label",10),Be(24,"#\xa0"),j(),Ie(25,"input",11),j(),G(26,"mat-form-field",12)(27,"mat-label"),Be(28,"A"),j(),Ie(29,"input",13),j()()()),2&e&&(U("formGroup",n.formGroup),V(19),qo("background-color",(null==n.color?null:n.color.rgba)||"transparent"))},dependencies:[rc,yl,Ro,qte,CV,IR,_l,mu,nc,bR,_u,gu,Gh,hC,Fie,Lie],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})(),Uie=(()=>{class i{constructor(){this.colorChanged=new $e,this.colors1=DH.slice(0,8),this.colors2=DH.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}=qR(e);this.colorChanged.emit(new Xh(n,r,s,o))}}return i.\u0275fac=function(e){return new(e||i)},i.\u0275cmp=ot({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&&(G(0,"div",0),fe(1,Sie,1,5,"button",1),j(),G(2,"div",0),fe(3,Eie,1,5,"button",1),j()),2&e&&(V(1),U("ngForOf",n.colors1),V(2),U("ngForOf",n.colors2))},dependencies:[hm,lo,CV],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})(),PH=(()=>{class i{constructor(){this.colorChanged=new $e}ngOnInit(){}handleColorChanged(e){this.colorChanged.emit(e)}}return i.\u0275fac=function(e){return new(e||i)},i.\u0275cmp=ot({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&&(G(0,"ngx-mat-color-canvas",0),Oe("colorChanged",function(s){return n.handleColorChanged(s)}),j(),G(1,"ngx-mat-color-collection",0),Oe("colorChanged",function(s){return n.handleColorChanged(s)}),j()),2&e&&(U("color",n.color),V(1),U("color",n.color))},dependencies:[Bie,Uie],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})(),XR=(()=>{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=qR(e);return n?new Xh(n.r,n.g,n.b,n.a):null}}return i.\u0275fac=function(e){return new(e||i)},i.\u0275prov=Pe({token:i,factory:i.\u0275fac}),i})();const Vie={display:{colorInput:"hex"}},OH=new me("mat-color-formats"),FH=new me("ngx-mat-colorpicker-scroll-strategy"),Hie={provide:FH,deps:[as],useFactory:function zie(i){return()=>i.scrollStrategies.reposition()}},$ie=Jy(class{constructor(i){this._elementRef=i}});let LH=(()=>{class i extends $ie{constructor(e){super(e)}}return i.\u0275fac=function(e){return new(e||i)(E(vt))},i.\u0275cmp=ot({type:i,selectors:[["ngx-mat-color-picker-content"]],viewQuery:function(e,n){if(1&e&&$n(PH,5),2&e){let r;At(r=Dt())&&(n._palette=r.first)}},hostAttrs:[1,"ngx-mat-colorpicker-content"],hostVars:3,hostBindings:function(e,n){2&e&&(Rw("@transformPanel","enter"),ln("ngx-mat-colorpicker-content-touch",n.picker.touchUi))},inputs:{color:"color"},exportAs:["ngxMatColorPickerContent"],features:[dt],decls:1,vars:1,consts:[[3,"color","colorChanged"]],template:function(e,n){1&e&&(G(0,"ngx-mat-color-palette",0),Oe("colorChanged",function(s){return n.picker.select(s)}),j()),2&e&&U("color",n.picker._selected)},dependencies:[PH],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:[CH.transformPanel,CH.fadeInCalendar]},changeDetection:0}),i})(),NH=(()=>{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 $e,this.closedStream=new $e,this._touchUi=!1,this._opened=!1,this._defaultColor="primary",this._validSelected=null,this._disabledChange=new Te,this._focusedElementBeforeOpen=null,this._inputSubscription=Qt.EMPTY,this._selectedChanged=new Te,this._scrollStrategy=a}get disabled(){return void 0===this._disabled&&this._pickerInput?this._pickerInput.disabled:!!this._disabled}set disabled(e){const n=tn(e);n!==this._disabled&&(this._disabled=n,this._disabledChange.next(n))}get touchUi(){return this._touchUi}set touchUi(e){this._touchUi=tn(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(LH,{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 Nh(LH,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(Oi(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"),Cr(this._popupRef.backdropClick(),this._popupRef.detachments(),this._popupRef.keydownEvents().pipe(gn(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)(E(Bm),E(as),E(gt),E(XR),E(Pa,8),E(FH),E(qt,8),E(jr))},i.\u0275cmp=ot({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 vC{constructor(t,e){this.target=t,this.targetElement=e,this.value=this.target.value}}const Gie={provide:Io,useExisting:Gn(()=>yC),multi:!0},Wie={provide:qr,useExisting:Gn(()=>yC),multi:!0};let yC=(()=>{class i{constructor(e,n,r,s){if(this._elementRef=e,this._formField=n,this._colorFormats=r,this._adapter=s,this.colorChange=new $e,this.colorInput=new $e,this._disabledChange=new $e,this._valueChange=new $e,this._onTouched=()=>{},this._cvaOnChange=()=>{},this._validatorOnChange=()=>{},this._pickerSubscription=Qt.EMPTY,this._validator=vl.compose([]),this._lastValueValid=!1,!this._colorFormats)throw function Oie(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 vC(this,this._elementRef.nativeElement)),this.colorChange.emit(new vC(this,this._elementRef.nativeElement))}))}get disabled(){return!!this._disabled}set disabled(e){const n=tn(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 vC(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 vC(this,this._elementRef.nativeElement)))}}return i.\u0275fac=function(e){return new(e||i)(E(vt),E(yl,8),E(OH,8),E(XR))},i.\u0275dir=ve({type:i,selectors:[["input","ngxMatColorPicker",""]],hostVars:3,hostBindings:function(e,n){1&e&&Oe("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&&(ql("disabled",n.disabled),It("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:[Dn([Gie,Wie,{provide:VR,useExisting:i}])]}),i})(),jie=(()=>{class i{constructor(e){this._cd=e,this._stateChanges=Qt.EMPTY}get disabled(){if(null==this._disabled&&this.picker)return this.picker.disabled}set disabled(e){this._disabled=e}ngOnInit(){}ngOnChanges(e){e.picker&&this._watchStateChanges()}ngOnDestroy(){this._stateChanges.unsubscribe()}ngAfterContentInit(){this._watchStateChanges()}open(e){this.picker&&!this.disabled&&(this.picker.open(),e.stopPropagation())}_watchStateChanges(){const e=this.picker?this.picker._disabledChange:mt(),n=this.picker&&this.picker._pickerInput?this.picker._pickerInput._disabledChange:mt(),r=this.picker?Cr(this.picker.openedStream,this.picker.closedStream):mt();this._stateChanges.unsubscribe(),this._stateChanges=Cr(e,n,r).subscribe(()=>this._cd.markForCheck())}}return i.\u0275fac=function(e){return new(e||i)(E(Qn))},i.\u0275cmp=ot({type:i,selectors:[["ngx-mat-color-toggle"]],viewQuery:function(e,n){if(1&e&&$n(Aie,5),2&e){let r;At(r=Dt())&&(n._button=r.first)}},hostAttrs:[1,"ngx-mat-color-toggle"],hostVars:7,hostBindings:function(e,n){1&e&&Oe("focus",function(){return n._button.focus()}),2&e&&(It("tabindex",-1),ln("ngx-mat-color-toggle-active",n.picker&&n.picker.opened)("mat-accent",n.picker&&"accent"===n.picker.color)("mat-warn",n.picker&&"warn"===n.picker.color))},inputs:{picker:["for","picker"],tabIndex:"tabIndex",disabled:"disabled"},exportAs:["ngxMatColorPickerToggle"],features:[xi],decls:4,vars:5,consts:[["mat-icon-button","","type","button",3,"disabled","click"],["button",""]],template:function(e,n){1&e&&(G(0,"button",0,1),Oe("click",function(s){return n.open(s)}),G(2,"mat-icon"),Be(3,"palette"),j()()),2&e&&(U("disabled",n.disabled),It("aria-haspopup",n.picker?"dialog":null)("tabindex",n.disabled?-1:n.tabIndex),V(2),qo("color",null==n.picker||null==n.picker._selected?null:n.picker._selected.rgba))},dependencies:[qM,gR],styles:[".mat-form-field-appearance .mat-form-field-prefix .ngx-mat-color-toggle-default-icon,.mat-form-field-appearance .mat-form-field-suffix .ngx-mat-color-toggle-default-icon{width:1em}.mat-form-field:not(.mat-form-field-appearance) .mat-form-field-prefix .ngx-mat-color-toggle-default-icon,.mat-form-field:not(.mat-form-field-appearance) .mat-form-field-suffix .ngx-mat-color-toggle-default-icon{display:block;width:1.5em;height:1.5em}.mat-form-field:not(.mat-form-field-appearance) .mat-form-field-prefix .mat-icon-button .ngx-mat-color-toggle-default-icon,.mat-form-field:not(.mat-form-field-appearance) .mat-form-field-suffix .mat-icon-button .ngx-mat-color-toggle-default-icon{margin:auto}\n"],encapsulation:2}),i})(),Yie=(()=>{class i{}return i.\u0275fac=function(e){return new(e||i)},i.\u0275mod=en({type:i}),i.\u0275inj=Wt({providers:[XR,Hie],imports:[co,mH,XM,vH,aie,tH,nH,vV,Bh,tz]}),i})();const qie=["picker"],Xie=function(i){return{"background-color":i}};function Kie(i,t){if(1&i){const e=jn();G(0,"div",5),Oe("click",function(r){const o=Vt(e).index;return Et(re().onColorClicked(r.currentTarget,o))}),j()}if(2&i){const e=t.$implicit,n=t.index,r=re();U("ngStyle",sm(2,Xie,"#"+r.lpad(e.toString(16),"0",8)))("matTooltip",n+": #"+e.toString(16))}}const Zie=function(){return["colors"]};let Qie=(()=>{class i{constructor(){this.resource=null,this.changed=new $e,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 bU;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=ot({type:i,selectors:[["app-palette-block-ui"]],viewQuery:function(e,n){if(1&e&&$n(qie,5),2&e){let r;At(r=Dt())&&(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&&(Ie(0,"app-compound-block-ui",0),G(1,"div",1),fe(2,Kie,1,4,"div",2),j(),G(3,"input",3),Oe("colorChange",function(s){return n.onColorChange(s.value)}),j(),Ie(4,"ngx-mat-color-picker",null,4)),2&e){const r=Zi(5);U("resource",n.resource)("fieldBlacklist",Rs(4,Zie)),V(2),U("ngForOf",null==n.resourceData?null:n.resourceData.colors),V(1),U("ngxMatColorPicker",r)}},dependencies:[lo,VT,rc,Fs,yC,NH,ec],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 Jie=["editorBody"];function ere(i,t){if(1&i&&(G(0,"div",11),Be(1),j()),2&i){const e=re().$implicit;V(1),ui(e.offset)}}function tre(i,t){if(1&i){const e=jn();G(0,"input",12),Oe("input",function(r){const o=Vt(e).index,a=re().index;return Et(re().onHexInput(r,a,o))})("focus",function(r){const o=Vt(e).index;return Et(re(2).onHexFocus(r,o))})("blur",function(r){return Vt(e),Et(re(2).onHexBlur(r))}),j()}if(2&i){const e=t.$implicit,n=t.index;U("id","hex_input__"+re().index+"__"+n)("value",e[0])("disabled",null===e[0])}}function nre(i,t){1&i&&Ie(0,"div",3)}function ire(i,t){if(1&i){const e=jn();G(0,"span",15),Oe("click",function(){const s=Vt(e).index,o=re(2).index;return Et(re().blurInput(o,s))}),Be(1),j()}if(2&i){const e=t.$implicit,n=t.index;U("id","utf_char__"+re(2).index+"__"+n),V(1),ui(e[1])}}function rre(i,t){if(1&i&&(G(0,"div",13),fe(1,ire,2,2,"span",14),j()),2&i){const e=re().$implicit,n=re();V(1),U("ngForOf",e.values)("ngForTrackBy",n.trackByIndex)}}function sre(i,t){if(1&i&&(G(0,"div",5),fe(1,ere,2,1,"div",6),ct(2,"async"),G(3,"div",7),fe(4,tre,1,3,"input",8),j(),fe(5,nre,1,0,"div",9),ct(6,"async"),ct(7,"async"),fe(8,rre,2,2,"div",10),ct(9,"async"),j()),2&i){const e=t.$implicit,n=t.index,r=re();ln("gray",n%2!=0),V(1),U("ngIf",ut(2,7,r._showOffsets$)),V(3),U("ngForOf",e.values)("ngForTrackBy",r.trackByIndex),V(1),U("ngIf",ut(6,9,r._showOffsets$)||ut(7,11,r._showUtf8$)),V(3),U("ngIf",ut(9,13,r._showUtf8$))}}function ore(i,t){if(1&i){const e=jn();G(0,"div",16)(1,"button",17),Oe("click",function(){return Vt(e),Et(re().changePage(-1))}),ct(2,"async"),Be(3,"Previous"),j(),G(4,"span"),Be(5),ct(6,"async"),ct(7,"async"),j(),G(8,"button",17),Oe("click",function(){return Vt(e),Et(re().changePage(1))}),ct(9,"async"),ct(10,"async"),Be(11," Next "),j()()}if(2&i){const e=re();V(1),U("disabled",0===ut(2,4,e.currentPage$)),V(4),Dh("Page ",(ut(6,6,e.currentPage$)||0)+1," of ",ut(7,8,e.totalPages$),""),V(3),U("disabled",(ut(9,10,e.currentPage$)||0)>=(ut(10,12,e.totalPages$)||0)-1)}}let are=(()=>{class i{set maxColumns(e){this._maxColumns$.next(e)}set maxRows(e){this._maxRows$.next(e)}set showOffsets(e){this._showOffsets$.next(e)}set showUtf8(e){this._showUtf8$.next(e)}set data(e){if(e!==this._data$.value){if(e.length===this._data$.value.length){for(let n=0;n=32&&e<=126?String.fromCharCode(e):"."]}ngAfterViewInit(){new ResizeObserver(e=>{for(const n of e)this.viewportSize$.next([n.contentRect.width,n.contentRect.height])}).observe(this.editorBody.nativeElement),Ra([this.viewportSize$,this._maxColumns$,this._maxRows$,this._showOffsets$,this._showUtf8$]).pipe(Ue(this.destroyed$),Wy(50)).subscribe(([[e,n],r,s,o,a])=>{let l=e-8;o&&(l-=68);let c=34;a&&(l-=8,c+=10);let h=Math.floor(l/c);r>0&&h>r&&(h=r);let p=this.pageSize$.value[0];h===p+1&&l/c%1<.5&&(h=p),h=Math.max(1,h);let m=Math.floor(n/28);s>0&&m>s&&(m=s),m=Math.max(1,m),(h!=this.pageSize$.value[0]||m!==this.pageSize$.value[1])&&this.pageSize$.next([h,m])}),Ra([this._data$,this.currentPage$,this.pageSize$]).pipe(Ue(this.destroyed$)).subscribe(([e,n,r])=>{if(0===r[0]||0===r[1])return;let s=Math.max(1,Math.ceil(Math.ceil(e.length/r[0])/r[1]));if(this.totalPages$.value!==s&&this.totalPages$.next(s),n>=s)return void this.currentPage$.next(n=s-1);const o=[];for(let a=n*r[0]*r[1];a=0&&a<=255&&(this.data[(this.currentPage$.value*this.pageSize$.value[1]+n)*this.pageSize$.value[0]+r]=a,this.renderedRows$.value[n].values[r]=this.renderValue(a),this.cdr.detectChanges(),this.dataChange.emit(this.data),this.goToNextInput(s.id))}}onHexFocus(e,n){const r=e.target,s=r.closest(".row");s&&s.querySelectorAll(".utf8-values span").forEach((a,l)=>{a.classList.toggle("highlight",l===n)}),r.select()}onHexBlur(e){const r=e.target.closest(".row");r&&r.querySelectorAll(".utf8-values span").forEach(o=>{o.classList.remove("highlight")})}}return i.\u0275fac=function(e){return new(e||i)(E(Qn))},i.\u0275cmp=ot({type:i,selectors:[["hex-editor"]],viewQuery:function(e,n){if(1&e&&$n(Jie,5),2&e){let r;At(r=Dt())&&(n.editorBody=r.first)}},inputs:{maxColumns:"maxColumns",maxRows:"maxRows",showOffsets:"showOffsets",showUtf8:"showUtf8",data:"data",readOnly:"readOnly"},outputs:{dataChange:"dataChange"},decls:7,vars:7,consts:[[1,"editor-body"],["editorBody",""],["class","row",3,"gray",4,"ngFor","ngForOf","ngForTrackBy"],[1,"flex-spacer"],["class","pagination",4,"ngIf"],[1,"row"],["class","offset",4,"ngIf"],[1,"hex-values"],["maxlength","2",3,"id","value","disabled","input","focus","blur",4,"ngFor","ngForOf","ngForTrackBy"],["class","flex-spacer",4,"ngIf"],["class","utf8-values",4,"ngIf"],[1,"offset"],["maxlength","2",3,"id","value","disabled","input","focus","blur"],[1,"utf8-values"],[3,"id","click",4,"ngFor","ngForOf","ngForTrackBy"],[3,"id","click"],[1,"pagination"],[3,"disabled","click"]],template:function(e,n){1&e&&(G(0,"div",0,1),fe(2,sre,10,15,"div",2),ct(3,"async"),Ie(4,"div",3),j(),fe(5,ore,12,14,"div",4),ct(6,"async")),2&e&&(V(2),U("ngForOf",ut(3,3,n.renderedRows$))("ngForTrackBy",n.trackByIndex),V(3),U("ngIf",(ut(6,5,n.totalPages$)||0)>1))},dependencies:[lo,vi,Ia],styles:["[_nghost-%COMP%]{display:flex;flex-direction:column;font-family:monospace}.editor-body[_ngcontent-%COMP%]{display:flex;flex-grow:1;flex-direction:column;overflow-y:hidden}.row[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:center;height:24px;margin-bottom:4px}.row.gray[_ngcontent-%COMP%]{background-color:#d3d3d3}.offset[_ngcontent-%COMP%]{width:60px;text-align:left;margin-right:8px}.hex-values[_ngcontent-%COMP%]{display:flex;gap:2px;flex-shrink:1;overflow-x:clip}.hex-values[_ngcontent-%COMP%] input[_ngcontent-%COMP%]{width:32px;text-align:center;box-sizing:border-box}.utf8-values[_ngcontent-%COMP%]{margin-left:8px}.utf8-values[_ngcontent-%COMP%] span[_ngcontent-%COMP%]{display:inline-block;width:8px;margin-left:2px;color:#000}.utf8-values[_ngcontent-%COMP%] span.highlight[_ngcontent-%COMP%]{background-color:#ff0}.pagination[_ngcontent-%COMP%]{display:flex;justify-content:space-between;align-items:center;margin-top:1em}.flex-spacer[_ngcontent-%COMP%]{flex-grow:1}"],changeDetection:0}),i})(),lre=(()=>{class i{}return i.\u0275fac=function(e){return new(e||i)},i.\u0275mod=en({type:i}),i.\u0275inj=Wt({imports:[co]}),i})();const cre=["editor"];let dre=(()=>{class i{constructor(){this._resource=null,this.empty=new Uint8Array,this.data$=new Qe(new Uint8Array),this.resourceDescription="",this.disabled=!1,this.changed=new $e}get resource(){return this._resource}set resource(e){this._resource=e,this.data$.next(new Uint8Array(e?e.data:0))}onDataChange(e){this._resource.data=Array.from(e),this.changed.emit()}}return i.\u0275fac=function(e){return new(e||i)},i.\u0275cmp=ot({type:i,selectors:[["app-binary-block-ui"]],viewQuery:function(e,n){if(1&e&&$n(cre,5),2&e){let r;At(r=Dt())&&(n.editorDiv=r.first)}},inputs:{resource:"resource",resourceDescription:"resourceDescription",disabled:"disabled"},outputs:{changed:"changed"},decls:5,vars:10,consts:[["matTooltipPosition","above",3,"matTooltip"],[3,"data","maxColumns","showOffsets","readOnly","dataChange"]],template:function(e,n){1&e&&(G(0,"h2",0),Be(1),j(),G(2,"hex-editor",1),Oe("dataChange",function(s){return n.onDataChange(s)}),ct(3,"async"),ct(4,"async"),j()),2&e&&(U("matTooltip",n.resourceDescription),V(1),ui(null==n.resource?null:n.resource.name),V(1),U("data",ut(3,6,n.data$)||n.empty)("maxColumns",8)("showOffsets",(ut(4,8,n.data$)||n.empty).length>16)("readOnly",n.disabled))},dependencies:[Fs,are,Ia],changeDetection:0}),i})();const ure=["picker"];function hre(i,t){if(1&i&&(G(0,"mat-label",8),Be(1),j()),2&i){const e=re();V(1),ui(null==e.resource?null:e.resource.name)}}const fre=function(i){return{transform:i}};let pre=(()=>{class i{constructor(e){this.cdr=e,this.resource=null,this.resourceDescription="",this.changed=new $e,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)(E(Qn))},i.\u0275cmp=ot({type:i,selectors:[["app-angle-block-ui"]],viewQuery:function(e,n){if(1&e&&$n(ure,5),2&e){let r;At(r=Dt())&&(n.picker=r.first)}},hostBindings:function(e,n){1&e&&Oe("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&&(G(0,"div",0)(1,"div",1,2)(3,"div",3),Ie(4,"div",4)(5,"div",5),j()(),G(6,"div",6),fe(7,hre,2,1,"mat-label",7),G(8,"mat-label"),Be(9),ct(10,"number"),j(),G(11,"mat-label"),Be(12),ct(13,"number"),j()()()),2&e&&(U("matTooltip",n.resourceDescription),V(3),U("ngStyle",sm(11,fre,"rotate("+((null==n.resource?null:n.resource.data)||0)+"rad)")),V(4),U("ngIf",null==n.resource?null:n.resource.name),V(2),Qi("",QD(10,5,180*(null==n.resource?null:n.resource.data)/n.pi||0,"1.2-2")," deg"),V(3),Qi("",QD(13,8,(null==n.resource?null:n.resource.data)||0,"1.2-2")," rad"))},dependencies:[vi,VT,Ro,Fs,hB],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 KR{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,d=new Set;for(const h of e)!0===Array.isArray(h)?a.add(h):"object"==typeof h?l.add(h):"function"==typeof h?d.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===d.size){h=!0;for(const p of o)if(!1===d.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 mre(i,t){if(1&i&&(G(0,"mat-list-option",3),Be(1),j()),2&i){const e=t.$implicit,n=re();U("value",e)("selected",n.selectedValue==e),V(1),Qi(" ",e," ")}}function gre(i,t){if(1&i&&(G(0,"mat-card"),Ie(1,"app-editor",4),j()),2&i){const e=re();V(1),U("resource",e.resources[e.selectedValue])}}let bC=(()=>{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)(E(KR))},i.\u0275cmp=ot({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&&(G(0,"mat-selection-list",0),Oe("selectionChange",function(s){return n.selectedValue=s.source.selectedOptions.selected[0].value}),fe(1,mre,2,3,"mat-list-option",1),j(),fe(2,gre,2,1,"mat-card",2)),2&e&&(U("multiple",!1),V(1),U("ngForOf",n.keys),V(1),U("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})(),_re=(()=>{class i{constructor(){this._resource=null,this.resourceMap={},this.changed=new $e}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",iR("@transformPanel",[nR()],{optional:!0}))]),transformPanel:Oa("transformPanel",[Os("void",oi({opacity:0,transform:"scale(1, 0.8)"})),Or("void => showing",Yr("120ms cubic-bezier(0, 0, 0.2, 1)",oi({opacity:1,transform:"scale(1, 1)"}))),Or("* => void",Yr("100ms linear",oi({opacity:0})))])};let BH=0;const UH=new me("mat-select-scroll-strategy"),Tre=new me("MAT_SELECT_CONFIG"),Ire={provide:UH,deps:[as],useFactory:function Dre(i){return()=>i.scrollStrategies.reposition()}},Rre=new me("MatSelectTrigger");class kre{constructor(t,e){this.source=t,this.value=e}}const Pre=jM(JI(WM(WU(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 Te}}))));let Ore=(()=>{class i extends Pre{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(vl.required)??!1}set required(e){this._required=tn(e),this.stateChanges.next()}get multiple(){return this._multiple}set multiple(e){this._multiple=tn(e)}get disableOptionCentering(){return this._disableOptionCentering}set disableOptionCentering(e){this._disableOptionCentering=tn(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=Ps(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,d,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=d,this._liveAnnouncer=g,this._defaultOptions=b,this._panelOpen=!1,this._compareWith=(v,y)=>v===y,this._uid="mat-select-"+BH++,this._triggerAriaLabelledBy=null,this._destroy=new Te,this._onChange=()=>{},this._onTouched=()=>{},this._valueId="mat-select-value-"+BH++,this._panelDoneAnimatingStream=new Te,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=Ey(()=>{const v=this.options;return v?v.changes.pipe(Do(v),ks(()=>Cr(...v.map(y=>y.onSelectionChange)))):this._ngZone.onStable.pipe(Oi(1),ks(()=>this.optionSelectionChanges))}),this.openedChange=new $e,this._openedStream=this.openedChange.pipe(gn(v=>v),tt(()=>{})),this._closedStream=this.openedChange.pipe(gn(v=>!v),tt(()=>{})),this.selectionChange=new $e,this.valueChange=new $e,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 HR(this.multiple),this.stateChanges.next(),this._panelDoneAnimatingStream.pipe(Ql(),Ue(this._destroy)).subscribe(()=>this._panelDoneAnimating(this.panelOpen))}ngAfterContentInit(){this._initKeyManager(),this._selectionModel.changed.pipe(Ue(this._destroy)).subscribe(e=>{e.added.forEach(n=>n.select()),e.removed.forEach(n=>n.deselect())}),this.options.changes.pipe(Do(null),Ue(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&&!Zo(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||Zo(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(Oi(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 $Z(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=Cr(this.options.changes,this._destroy);this.optionSelectionChanges.pipe(Ue(e)).subscribe(n=>{this._onSelect(n.source,n.isUserInput),n.isUserInput&&!this.multiple&&this._panelOpen&&(this.close(),this.focus())}),Cr(...this.options.map(n=>n._stateChanges)).pipe(Ue(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)(E(FM),E(Qn),E(gt),E(YU),E(vt),E(Pa,8),E(hb,8),E(Gh,8),E(pC,8),E(tc,10),xa("tabindex"),E(UH),E(XI),E(Tre,8))},i.\u0275dir=ve({type:i,viewQuery:function(e,n){if(1&e&&($n(vre,5),$n(yre,5),$n(wU,5)),2&e){let r;At(r=Dt())&&(n.trigger=r.first),At(r=Dt())&&(n.panel=r.first),At(r=Dt())&&(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:[dt,xi]}),i})(),pb=(()=>{class i extends Ore{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(Ue(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 OQ(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 kre(this,e)}_getOverlayWidth(){return(this._preferredOverlayOrigin instanceof zI?this._preferredOverlayOrigin.elementRef:this._preferredOverlayOrigin||this._elementRef).nativeElement.getBoundingClientRect().width}get hideSingleSelectionIndicator(){return this._hideSingleSelectionIndicator}set hideSingleSelectionIndicator(e){this._hideSingleSelectionIndicator=tn(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=si(i)))(n||i)}}(),i.\u0275cmp=ot({type:i,selectors:[["mat-select"]],contentQueries:function(e,n,r){if(1&e&&(Wi(r,Rre,5),Wi(r,Nm,5),Wi(r,tV,5)),2&e){let s;At(s=Dt())&&(n.customTrigger=s.first),At(s=Dt())&&(n.options=s),At(s=Dt())&&(n.optionGroups=s)}},hostAttrs:["role","combobox","aria-autocomplete","none","aria-haspopup","listbox",1,"mat-mdc-select"],hostVars:19,hostBindings:function(e,n){1&e&&Oe("keydown",function(s){return n._handleKeydown(s)})("focus",function(){return n._onFocus()})("blur",function(){return n._onBlur()}),2&e&&(It("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()),ln("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:[Dn([{provide:UR,useExisting:i},{provide:eV,useExisting:i}]),dt],ngContentSelectors:Ere,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&&(or(Sre),G(0,"div",0,1),Oe("click",function(){return n.toggle()}),G(3,"div",2),fe(4,bre,2,1,"span",3),fe(5,Mre,3,2,"span",4),j(),G(6,"div",5)(7,"div",6),ki(),G(8,"svg",7),Ie(9,"path",8),j()()()(),fe(10,Cre,3,9,"ng-template",9),Oe("backdropClick",function(){return n.close()})("attach",function(){return n._onAttached()})("detach",function(){return n.close()})),2&e){const r=Zi(1);It("aria-owns",n.panelOpen?n.id+"-panel":null),V(3),U("ngSwitch",n.empty),It("id",n._valueId),V(1),U("ngSwitchCase",!0),V(1),U("ngSwitchCase",!1),V(5),U("cdkConnectedOverlayPanelClass",n._overlayPanelClass)("cdkConnectedOverlayScrollStrategy",n._scrollStrategy)("cdkConnectedOverlayOrigin",n._preferredOverlayOrigin||r)("cdkConnectedOverlayOpen",n.panelOpen)("cdkConnectedOverlayPositions",n._positions)("cdkConnectedOverlayWidth",n._overlayWidth)}},dependencies:[hm,by,UT,lB,wU,zI],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:[Are.transformPanel]},changeDetection:0}),i})(),VH=(()=>{class i{}return i.\u0275fac=function(e){return new(e||i)},i.\u0275mod=en({type:i}),i.\u0275inj=Wt({providers:[Ire],imports:[co,Pm,tR,Jn,Ky,mC,tR,Jn]}),i})();function Fre(i,t){if(1&i&&(G(0,"mat-label"),Be(1),j()),2&i){const e=re(3);V(1),ui(e.resource.name)}}function Lre(i,t){if(1&i&&(G(0,"mat-option",6),Be(1),j()),2&i){const e=t.$implicit,n=re(3);U("value",e[1])("disabled",n.disabled),V(1),Qi(" ",e[1]," ")}}function Nre(i,t){if(1&i){const e=jn();G(0,"mat-form-field",3),fe(1,Fre,2,1,"mat-label",0),G(2,"mat-select",4),Oe("valueChange",function(r){return Vt(e),Et(re(2).resource.data=r)})("selectionChange",function(){return Vt(e),Et(re(2).changed.emit())}),fe(3,Lre,2,3,"mat-option",5),j()()}if(2&i){const e=re(2);U("matTooltip",e.resourceDescription),V(1),U("ngIf",e.resource.name),V(1),U("value",e.resource.data)("disabled",e.disabled),V(1),U("ngForOf",e.resource.schema.enum_names)}}function Bre(i,t){if(1&i&&(G(0,"mat-label"),Be(1),j()),2&i){const e=re(3);V(1),ui(e.resource.name)}}function Ure(i,t){if(1&i){const e=jn();G(0,"mat-form-field",3),fe(1,Bre,2,1,"mat-label",0),G(2,"input",7),Oe("ngModelChange",function(r){return Vt(e),Et(re(2).resource.data=r)})("change",function(){return Vt(e),Et(re(2).changed.emit())}),j()()}if(2&i){const e=re(2);U("matTooltip",e.resourceDescription),V(1),U("ngIf",e.resource.name),V(1),U("min",0)("max",256*(e.resource.schema.length||1)-1)("ngModel",e.resource.data)}}function Vre(i,t){if(1&i&&(Gr(0),fe(1,Nre,4,5,"mat-form-field",1),fe(2,Ure,3,5,"ng-template",null,2,zc),Wr()),2&i){const e=Zi(3),n=re();V(1),U("ngIf",n.isKnownEnumValue(n.resource.data))("ngIfElse",e)}}let zre=(()=>{class i{constructor(){this.resource=null,this.resourceDescription="",this.disabled=!1,this.changed=new $e}isKnownEnumValue(e){return!!this.resource?.schema.enum_names.find(([n,r])=>r==e)}}return i.\u0275fac=function(e){return new(e||i)},i.\u0275cmp=ot({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&&fe(0,Vre,4,2,"ng-container",0),2&e&&U("ngIf",n.resource)},dependencies:[lo,vi,_l,mu,nc,_u,gu,Zc,yl,Ro,rc,Fs,pb,Nm],changeDetection:0}),i})();const Hre=["*"],Gre=["unscopedContent"];function Wre(i,t){1&i&&Yt(0,4)}function jre(i,t){if(1&i&&(G(0,"div",11),Ie(1,"input",12),G(2,"div",13),ki(),G(3,"svg",14),Ie(4,"path",15),j(),va(),Ie(5,"div",16),j()()),2&i){const e=re();ln("mdc-checkbox--disabled",e.disabled),V(1),U("checked",e.selected)("disabled",e.disabled)}}function Yre(i,t){if(1&i&&(G(0,"div",17),Ie(1,"input",18),G(2,"div",19),Ie(3,"div",20)(4,"div",21),j()()),2&i){const e=re();ln("mdc-radio--disabled",e.disabled),V(1),U("checked",e.selected)("disabled",e.disabled)}}function qre(i,t){}function Xre(i,t){if(1&i&&(G(0,"span",22),fe(1,qre,0,0,"ng-template",23),j()),2&i){re();const e=Zi(3);V(1),U("ngTemplateOutlet",e)}}function Kre(i,t){}function Zre(i,t){if(1&i&&(G(0,"span",24),fe(1,Kre,0,0,"ng-template",23),j()),2&i){re();const e=Zi(5);V(1),U("ngTemplateOutlet",e)}}function Qre(i,t){}function Jre(i,t){1&i&&fe(0,Qre,0,0,"ng-template",23),2&i&&(re(),U("ngTemplateOutlet",Zi(1)))}function ese(i,t){}function tse(i,t){if(1&i&&(G(0,"span",25),fe(1,ese,0,0,"ng-template",23),j()),2&i){re();const e=Zi(3);V(1),U("ngTemplateOutlet",e)}}function nse(i,t){}function ise(i,t){if(1&i&&(G(0,"span",25),fe(1,nse,0,0,"ng-template",23),j()),2&i){re();const e=Zi(5);V(1),U("ngTemplateOutlet",e)}}function rse(i,t){}function sse(i,t){1&i&&fe(0,rse,0,0,"ng-template",23),2&i&&(re(),U("ngTemplateOutlet",Zi(1)))}const ose=[[["","matListItemTitle",""]],[["","matListItemLine",""]],"*",[["mat-divider"]],[["","matListItemAvatar",""],["","matListItemIcon",""]]],ase=["[matListItemTitle]","[matListItemLine]","*","mat-divider","[matListItemAvatar],[matListItemIcon]"],zH=new me("ListOption");let lse=(()=>{class i{constructor(e){this._elementRef=e}}return i.\u0275fac=function(e){return new(e||i)(E(vt))},i.\u0275dir=ve({type:i,selectors:[["","matListItemTitle",""]],hostAttrs:[1,"mat-mdc-list-item-title","mdc-list-item__primary-text"]}),i})(),cse=(()=>{class i{constructor(e){this._elementRef=e}}return i.\u0275fac=function(e){return new(e||i)(E(vt))},i.\u0275dir=ve({type:i,selectors:[["","matListItemLine",""]],hostAttrs:[1,"mat-mdc-list-item-line","mdc-list-item__secondary-text"]}),i})(),HH=(()=>{class i{constructor(e){this._listOption=e}_isAlignedAtStart(){return!this._listOption||"after"===this._listOption?._getTogglePosition()}}return i.\u0275fac=function(e){return new(e||i)(E(zH,8))},i.\u0275dir=ve({type:i,hostVars:4,hostBindings:function(e,n){2&e&&ln("mdc-list-item__start",n._isAlignedAtStart())("mdc-list-item__end",!n._isAlignedAtStart())}}),i})(),dse=(()=>{class i extends HH{}return i.\u0275fac=function(){let t;return function(n){return(t||(t=si(i)))(n||i)}}(),i.\u0275dir=ve({type:i,selectors:[["","matListItemAvatar",""]],hostAttrs:[1,"mat-mdc-list-item-avatar"],features:[dt]}),i})(),use=(()=>{class i extends HH{}return i.\u0275fac=function(){let t;return function(n){return(t||(t=si(i)))(n||i)}}(),i.\u0275dir=ve({type:i,selectors:[["","matListItemIcon",""]],hostAttrs:[1,"mat-mdc-list-item-icon"],features:[dt]}),i})();const hse=new me("MAT_LIST_CONFIG");let ZR=(()=>{class i{constructor(){this._isNonInteractive=!0,this._disableRipple=!1,this._disabled=!1,this._defaultOptions=Lt(hse,{optional:!0})}get disableRipple(){return this._disableRipple}set disableRipple(e){this._disableRipple=tn(e)}get disabled(){return this._disabled}set disabled(e){this._disabled=tn(e)}}return i.\u0275fac=function(e){return new(e||i)},i.\u0275dir=ve({type:i,hostVars:1,hostBindings:function(e,n){2&e&&It("aria-disabled",n.disabled)},inputs:{disableRipple:"disableRipple",disabled:"disabled"}}),i})(),$H=(()=>{class i{set lines(e){this._explicitLines=Ps(e,null),this._updateItemLines(!1)}get disableRipple(){return this.disabled||this._disableRipple||this._noopAnimations||!!this._listBase?.disableRipple}set disableRipple(e){this._disableRipple=tn(e)}get disabled(){return this._disabled||!!this._listBase?.disabled}set disabled(e){this._disabled=tn(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 Qt,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(Cr(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)(E(vt),E(gt),E(ZR,8),E(zi),E(eR,8),E(kr,8))},i.\u0275dir=ve({type:i,contentQueries:function(e,n,r){if(1&e&&(Wi(r,dse,4),Wi(r,use,4)),2&e){let s;At(s=Dt())&&(n._avatars=s),At(s=Dt())&&(n._icons=s)}},hostVars:4,hostBindings:function(e,n){2&e&&(It("aria-disabled",n.disabled)("disabled",n._isButtonElement&&n.disabled||null),ln("mdc-list-item--disabled",n.disabled))},inputs:{lines:"lines",disableRipple:"disableRipple",disabled:"disabled"}}),i})();const GH=new me("SelectionList");let xC=(()=>{class i extends $H{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=tn(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 $e,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)(E(vt),E(gt),E(GH),E(zi),E(Qn),E(eR,8),E(kr,8))},i.\u0275cmp=ot({type:i,selectors:[["mat-list-option"]],contentQueries:function(e,n,r){if(1&e&&(Wi(r,cse,5),Wi(r,lse,5)),2&e){let s;At(s=Dt())&&(n._lines=s),At(s=Dt())&&(n._titles=s)}},viewQuery:function(e,n){if(1&e&&$n(Gre,5),2&e){let r;At(r=Dt())&&(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&&Oe("blur",function(){return n._handleBlur()})("click",function(){return n._toggleOnInteraction()}),2&e&&(It("aria-selected",n.selected),ln("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:[Dn([{provide:$H,useExisting:i},{provide:zH,useExisting:i}]),dt],ngContentSelectors:ase,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&&(or(ose),fe(0,Wre,1,0,"ng-template",null,0,zc),fe(2,jre,6,4,"ng-template",null,1,zc),fe(4,Yre,5,4,"ng-template",null,2,zc),fe(6,Xre,2,1,"span",3),fe(7,Zre,2,1,"span",4),fe(8,Jre,1,1,"ng-template",5),G(9,"span",6),Yt(10),Yt(11,1),G(12,"span",7,8),Oe("cdkObserveContent",function(){return n._updateItemLines(!0)}),Yt(14,2),j()(),fe(15,tse,2,1,"span",9),fe(16,ise,2,1,"span",9),fe(17,sse,1,1,"ng-template",5),Yt(18,3),Ie(19,"div",10)),2&e&&(V(6),U("ngIf",n._hasCheckboxAt("before")),V(1),U("ngIf",n._hasRadioAt("before")),V(1),U("ngIf",n._hasIconsOrAvatarsAt("before")),V(7),U("ngIf",n._hasCheckboxAt("after")),V(1),U("ngIf",n._hasRadioAt("after")),V(1),U("ngIf",n._hasIconsOrAvatarsAt("after")))},dependencies:[SU,vi,xy],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 fse={provide:Io,useExisting:Gn(()=>wC),multi:!0};class pse{constructor(t,e){this.source=t,this.options=e}}let wC=(()=>{class i extends ZR{get multiple(){return this._multiple}set multiple(e){const n=tn(e);n!==this._multiple&&(this._multiple=n,this.selectedOptions=new HR(this._multiple,this.selectedOptions.selected))}get hideSingleSelectionIndicator(){return this._hideSingleSelectionIndicator}set hideSingleSelectionIndicator(e){this._hideSingleSelectionIndicator=tn(e)}constructor(e,n){super(),this._element=e,this._ngZone=n,this._initialized=!1,this._destroyed=new Te,this._onChange=r=>{},this.selectionChange=new $e,this.color="accent",this.compareWith=(r,s)=>r===s,this._multiple=!0,this._hideSingleSelectionIndicator=this._defaultOptions?.hideSingleSelectionIndicator??!1,this.selectedOptions=new HR(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 pse(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=tn(e),this._selectionListDisabled&&this._keyManager?.setActiveItem(-1)}registerOnChange(e){this._onChange=e}registerOnTouched(e){this._onTouched=e}_watchForSelectionChange(){this.selectedOptions.changed.pipe(Ue(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()&&Zo(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 kU(this._items).withHomeAndEnd().withTypeAhead().withWrap().skipPredicate(()=>this.disabled),this._resetActiveOption(),this._keyManager.change.subscribe(e=>this._setActiveOption(e)),this._items.changes.pipe(Ue(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=OM();return e&&this._element.nativeElement.contains(e)}}return i.\u0275fac=function(e){return new(e||i)(E(vt),E(gt))},i.\u0275cmp=ot({type:i,selectors:[["mat-selection-list"]],contentQueries:function(e,n,r){if(1&e&&Wi(r,xC,5),2&e){let s;At(s=Dt())&&(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&&Oe("keydown",function(s){return n._handleKeydown(s)}),2&e&&It("aria-multiselectable",n.multiple)},inputs:{color:"color",compareWith:"compareWith",multiple:"multiple",hideSingleSelectionIndicator:"hideSingleSelectionIndicator",disabled:"disabled"},outputs:{selectionChange:"selectionChange"},exportAs:["matSelectionList"],features:[Dn([fse,{provide:ZR,useExisting:i},{provide:GH,useExisting:i}]),dt,xi],ngContentSelectors:Hre,decls:1,vars:0,template:function(e,n){1&e&&(or(),Yt(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})(),mse=(()=>{class i{}return i.\u0275fac=function(e){return new(e||i)},i.\u0275mod=en({type:i}),i.\u0275inj=Wt({imports:[HI,co,Jn,tb,JU,kV]}),i})();function gse(i,t){if(1&i&&(G(0,"mat-label"),Be(1),j()),2&i){const e=re(2);V(1),ui(e.resource.name)}}function _se(i,t){if(1&i&&(G(0,"mat-list-option",5),Be(1),j()),2&i){const e=t.$implicit,n=re(2);U("value",e.key)("selected",n.resource.data[e.key])("disabled",n.disabled),V(1),Qi(" ",e.key," ")}}function vse(i,t){if(1&i){const e=jn();Gr(0,1),fe(1,gse,2,1,"mat-label",2),G(2,"mat-selection-list",3),Oe("selectionChange",function(r){return Vt(e),Et(re().onSelection(r))}),fe(3,_se,2,4,"mat-list-option",4),ct(4,"keyvalue"),j(),Wr()}if(2&i){const e=re();U("matTooltip",e.resourceDescription),V(1),U("ngIf",e.resource.name),V(1),U("disabled",e.disabled),V(1),U("ngForOf",ut(4,4,e.resource.data))}}let yse=(()=>{class i{constructor(){this.resource=null,this.resourceDescription="",this.disabled=!1,this.changed=new $e}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=ot({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&&fe(0,vse,5,6,"ng-container",0),2&e&&U("ngIf",n.resource)},dependencies:[lo,vi,Ro,Fs,wC,xC,dB],styles:["[_nghost-%COMP%]{padding-bottom:1.34375em}"],changeDetection:0}),i})();class WH{get tick$(){return this._tick$.asObservable()}get children(){return[...this._children]}constructor(t){this.parent=t,this._tick$=new Te,this._children=[],t&&t.addChild(this)}addChild(t){if(t.parent!==this)throw new Error("Incorrect child clock");this._children.includes(t)||this._children.push(t)}removeChild(t){if(t.parent!==this)throw new Error("Incorrect child clock");this._children=this._children.filter(e=>e!==t)}dispose(){this.parent&&this.parent.removeChild(this);for(const t of this._children)t.dispose();this._tick$.complete()}}const xse=typeof performance>"u"?()=>Date.now():()=>performance.now();class jm extends WH{static get instance(){return jm._instance||(jm._instance=new jm),jm._instance}get elapsedTime(){return xse()}constructor(){super(null);let t=this.elapsedTime;const e=()=>{requestAnimationFrame(e);const n=t,r=this.elapsedTime;t=r,this._tick$.next([n,r-n])};requestAnimationFrame(e)}dispose(){throw new Error("Cannot dispose global clock")}}class jH extends WH{get isRunning(){return!!this.tickSub}get isPaused(){return-1!==this.pausedAt}get isStopped(){return-1===this.startedAt}get timeScale(){return this._timeScale}set timeScale(t){if(t!==this._timeScale||this.pausedByTimescale&&0!==t){if(0===t)return void(this.isPaused||(this.pause(),this.pausedByTimescale=!0));if(this.isPaused&&this.pausedByTimescale&&(this.resume(),this.pausedByTimescale=!1),!this.isStopped){const e=this.isPaused?this.pausedAt:this.parentClock.elapsedTime;this.startedAt=e-(e-this.startedAt)*this.timeScale/t}this._timeScale=t}}get elapsedTime(){return this.isStopped?this.lastStopElapsed:this.isPaused?this._timeScale*(this.pausedAt-this.startedAt):this._timeScale*(this.parentClock.elapsedTime-this.startedAt)}constructor(t=!1,e=jm.instance){super(e),this.parentClock=e,this.tickSub=null,this._internalTick$=new Te,this.tickRateLimit=0,this.paused$=new Te,this.startedAt=-1,this.oldRelativeTime=0,this.pausedAt=-1,this.lastStopElapsed=0,this._timeScale=1,this.pausedByTimescale=!1,this.lastFiredTickElapsed=0,t&&this.start(),this._internalTick$.pipe(tt(([n,r])=>[r,r-this.lastFiredTickElapsed]),gn(([n])=>!this.tickRateLimit||Math.floor(this.lastFiredTickElapsed*this.tickRateLimit/1e3)this.lastFiredTickElapsed=n)).subscribe(this._tick$)}start(){this.isRunning||(this.oldRelativeTime=0,this.startedAt=this.parentClock.elapsedTime,this.startListeningTicks())}stop(){this.stopListeningTicks(),this.lastStopElapsed=this.elapsedTime,this.startedAt=this.pausedAt=-1}pause(){this.stopListeningTicks(),this.pausedAt=this.parentClock.elapsedTime,this.pausedByTimescale=!1,this.paused$.next(!0)}resume(){this.isRunning||-1==this.pausedAt||(this.startedAt+=this.parentClock.elapsedTime-this.pausedAt,this.pausedAt=-1,this.startListeningTicks(),this.paused$.next(!1))}startListeningTicks(){if(this.tickSub)throw new Error("Clock is already ticking!");this.tickSub=this.parentClock.tick$.pipe(tt(([t,e])=>[this.oldRelativeTime,this.oldRelativeTime+e*this.timeScale]),Vi(([t,e])=>this.oldRelativeTime=e)).subscribe(this._internalTick$)}stopListeningTicks(){var t;null===(t=this.tickSub)||void 0===t||t.unsubscribe(),this.tickSub=null}dispose(){this.stopListeningTicks(),this._internalTick$.complete(),super.dispose()}}const wse={transparent:!1,background:0,size:"fullscreen",antialias:!0};class Mse{constructor(t,e,n={}){this.scene=t,this.canvas=e,this.entity=null,this.rendererOptions=Object.assign(Object.assign({},wse),n||{})}}class mb{static fromArray(t,e=!1){const n=new mb(t[0]);let r=n;for(let s=1;sn.map(r=>new mb(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]}constructor(t){this.data=t,this.adjacent=new Set}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(d=>!e.has(d));for(const d of c)e.add(d),r.push([d,a-1])}}return n}nodes(){return Array.from(this.walkRead(-1))}}var oc=(()=>{return(i=oc||(oc={}))[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",oc;var i})();let Kh=(()=>{class i{constructor(){this.tick$=new Te,this._world=null,this._name="e0x"+(i.default_name_counter++).toString(16),this._selfActive=!0,this.parent=null,this._children=[],this._components=[],this._onSpawned$=new Te,this._onRemoved$=new Te}get world(){return this._world}get name(){return this._name}set name(e){this._name=e}get active(){return this._selfActive&&(!this.parent||this.parent.active)}set active(e){this._selfActive=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 Cse extends Kh{constructor(t){super(),this.tickOrder=t}}function Ym(i,t=oc.CONTROLLERS,e){const n=new Cse(t);return e&&(n.name=e),i.addEntity(n),n.tick$.pipe(su(()=>{i.removeEntity(n,!0)}))}class QR extends Kh{get rendererSize$(){return this._rendererSize$.asObservable()}get rendererSize(){return this._rendererSize$.getValue()}get rendererOptions(){return this.renderer.rendererOptions}get physicsDebugViewActive(){return this.renderer.physicsDebugViewActive}set physicsDebugViewActive(t){this.renderer.physicsDebugViewActive=t}constructor(t){super(),this.renderer=t,this.tickOrder=oc.RENDERING,this._rendererSize$=new Qe(null),this.addComponents(t),this.tick$.subscribe(()=>{this.renderer.render()})}onSpawned(t){this._rendererSize$.next(null),"fullscreen"==this.rendererOptions.size||"function"==typeof this.rendererOptions.size?(this.renderer.canvas&&(this.renderer.canvas.style.position="absolute"),Cr(To(window,"resize").pipe(Wy(100)),To(window,"orientationchange")).pipe(Ue(this._onRemoved$),tt(()=>({x:window.innerWidth,y:window.innerHeight})),Do({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 In||void 0!==this.rendererOptions.size.subscribe&&void 0!==this.rendererOptions.size.pipe?this.rendererOptions.size.pipe(Ue(this._onRemoved$)).subscribe(e=>{this._rendererSize$.next(e)}):this._rendererSize$.next(this.rendererOptions.size),this._rendererSize$.pipe(Ue(this._onRemoved$),Ql((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 JR=i=>{i.updateVisibility?i.updateVisibility():YH(i)},YH=i=>{for(const t of i.children)JR(t)};class Sse extends Kh{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(){YH(this)}addChildren(...t){super.addChildren(...t);for(const e of t)JR(e)}removeChildren(t,e=!1){if(super.removeChildren(t,e),!e)for(const n of t)JR(n)}}class ek{constructor(){this._running=!1,this.stop$=new Te}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 Ese extends ek{get output$(){return this._output$.asObservable()}constructor(t,e){super(),this.keyboard=t,this.keymap=e,this._output$=new Te}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")),Ra(t.map(e=>this.keyboard.bindMany(...e))).pipe(Ue(this.stop$),tt(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 tk=new In(ms);class MC extends ek{constructor(){super(),this.bindings={},this.skipKeyDownsOnExternalFocus=!0,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 Qe(!1);return this.bindings[t].push(e),e.pipe(Ql(),su(()=>{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"),tk;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 Qe(!1);this.bindings[n].push(r),e.push(r)}return Ra(e).pipe(su(()=>{for(let n=0;nn.includes(!0)),Ql())}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 MC.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)}}MC.externalFocusBlacklist=[HTMLInputElement,HTMLTextAreaElement,HTMLSelectElement,HTMLButtonElement];class yi{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 yi.len(yi.sub(t,e))}static norm(t){const e=yi.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 Dse={pointerLock:!1};var Ls=(()=>{return(i=Ls||(Ls={}))[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",Ls;var i})();class qm extends ek{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$=To(this._element,"wheel",{passive:!1}).pipe(Ue(this.stopped$),su(()=>this._wheel$=null),Vi(t=>t.preventDefault()),tt(t=>t.deltaY),Vf())),this._wheel$}get isPointerLocked(){return!!document.pointerLockElement}get isPointerLocked$(){return To(document,"pointerlockchange").pipe(tt(()=>this.isPointerLocked))}get state(){return this._state$.getValue()}get state$(){return this._state$.asObservable()}get multiTouchPositions$(){return this._multiTouchPositions$.asObservable()}get twoTouchGestureDelta$(){return this.state$.pipe(ks(t=>t==Ls.DRAG_TOUCH_TWO_FINGERS?this.multiTouchPositions$:tk),tt(t=>t.map(e=>({x:e.x,y:e.y}))),function Ase(){return ni((i,t)=>{let e,n=!1;i.subscribe(qn(t,r=>{const s=e;e=r,n&&t.next([s,r]),n=!0}))})}(),gn(([t,e])=>t.length>1&&e.length>1),tt(([t,e])=>({centerPointDelta:yi.sub(yi.scalarMult(e.reduce((n,r)=>yi.add(n,r),yi.O),1/e.length),yi.scalarMult(t.reduce((n,r)=>yi.add(n,r),yi.O),1/e.length)),angleDelta:yi.angle(e[1],e[0])-yi.angle(t[1],t[0]),distanceDelta:yi.dist(e[1],e[0])-yi.dist(t[1],t[0])})))}get _element(){return this.options.canvas||window}constructor(t={}){super(),this._wheel$=null,this._delta$=new Te,this._position$=new Qe(yi.O),this._multiTouchPositions$=new Qe([]),this.stopped$=new Te,this._state$=new Qe(Ls.NONE),this.options=Object.assign(Object.assign({},Dse),t),this.canvasClickListener=this.canvasClickListener.bind(this)}startInternal(){this.options.canvas&&(this.options.canvas.style.touchAction="none"),this._state$.next(Ls.NONE);const t=[Ls.DRAG,Ls.DRAG_MIDDLE_BUTTON,Ls.DRAG_RIGHT_BUTTON],e=[Ls.NONE,Ls.DRAG,Ls.DRAG_TOUCH_TWO_FINGERS],n=[],r={};To(this._element,"mousemove").pipe(Ue(this.stopped$)).subscribe(o=>{this._delta$.next({x:o.movementX,y:o.movementY})}),To(this._element,"pointermove").pipe(Ue(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})}),!qm.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{if(0===n.length)try{this.options.canvas&&this.options.canvas.setPointerCapture(o.pointerId),window.addEventListener("pointerup",s),this._element.addEventListener("pointercancel",s)}catch(a){console.error(a)}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]||Ls.NONE)}),To(this._element,"contextmenu").pipe(Ue(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 Tse{static lookAt(t,e,n){let r=Re.sub(t,e);r=0===Re.lenSq(r)?Object.assign(Object.assign({},r),{z:1}):Re.norm(r);let s=Re.cross(n,r);0===Re.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=Re.norm(r),s=Re.cross(n,r)),s=Re.norm(s);let o=Re.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 Yi{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,d=t.w*Math.sin((1-n)*s)/o+e.w*Math.sin(n*s)/o;return isNaN(a)||isNaN(l)||isNaN(c)||isNaN(d)?Yi.clone(t):{x:a,y:l,z:c,w:d}}static fromAngle(t,e){const n=e/2,r=Math.sin(n);return Object.assign(Object.assign({},Re.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],d=t[10],h=e+o+d;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>d){const p=2*Math.sqrt(1+e-o-d);return{x:.25*p,y:(n+s)/p,z:(r+l)/p,w:(c-a)/p}}if(o>d){const p=2*Math.sqrt(1+o-e-d);return{x:(n+s)/p,y:.25*p,z:(a+c)/p,w:(r-l)/p}}{const p=2*Math.sqrt(1+d-e-o);return{x:(r+l)/p,y:(a+c)/p,z:.25*p,w:(s-n)/p}}}static fromMatrix3(t){const e=t[0][0]+t[1][1]+t[2][2];let n,r,s,o;if(e>0){const a=.5/Math.sqrt(e+1);n=.25/a,r=(t[2][1]-t[1][2])*a,s=(t[0][2]-t[2][0])*a,o=(t[1][0]-t[0][1])*a}else if(t[0][0]>t[1][1]&&t[0][0]>t[2][2]){const a=2*Math.sqrt(1+t[0][0]-t[1][1]-t[2][2]);n=(t[2][1]-t[1][2])/a,r=.25*a,s=(t[0][1]+t[1][0])/a,o=(t[0][2]+t[2][0])/a}else if(t[1][1]>t[2][2]){const a=2*Math.sqrt(1+t[1][1]-t[0][0]-t[2][2]);n=(t[0][2]-t[2][0])/a,r=(t[0][1]+t[1][0])/a,s=.25*a,o=(t[1][2]+t[2][1])/a}else{const a=2*Math.sqrt(1+t[2][2]-t[0][0]-t[1][1]);n=(t[1][0]-t[0][1])/a,r=(t[0][2]+t[2][0])/a,s=(t[1][2]+t[2][1])/a,o=.25*a}return{w:n,x:r,y:s,z:o}}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),d=Math.sin(.5*e);return{w:c*a*s+d*l*o,x:d*a*s-c*l*o,y:c*l*s+d*a*o,z:c*a*o-d*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=Re.Z){return this.fromMatrix4(Tse.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 Re{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 Re.len(Re.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=Re.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,Yi.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)}}}function nk(i,t,e,n){return r=>r.pipe(tI((s,o)=>{var a;return{targetValue:o,currentValue:null!==(a=s.currentValue)&&void 0!==a?a:o,hasReachedTarget:!1}},{targetValue:null,currentValue:null,hasReachedTarget:!1}),ks(s=>i.pipe(tt(([o,a])=>{if(null===s.targetValue||null===s.currentValue)return s.currentValue;if(s.hasReachedTarget)return;const l=1-Math.exp(-a/t),c=e(s.currentValue,s.targetValue,l);return s.currentValue=c,n(c,s.targetValue)?(s.hasReachedTarget=!0,s.targetValue):c}))),tt(s=>void 0!==s?s:null),gn(s=>null!==s))}ps(738);class kse extends Kh{get avgReport(){return this._avgReport}get peakReport(){return this._peakReport}constructor(t=60,e=15){super(),this.maxSamples=t,this.maxRows=e,this.tickOrder=Number.MAX_SAFE_INTEGER,this.sampleIndex=0,this.collectedData=new Map,this._avgReport={totalTime:0,entries:[]},this._peakReport={totalTime:0,entries:[]}}onSpawned(t){super.onSpawned(t),this.sampleIndex=0;const e=()=>(typeof performance>"u"?Date:performance).now();this.world.tickForwardTo$.pipe(Ue(this.onRemoved$)).subscribe(n=>{n!==this&&(this.collectedData.has(n)?this.collectedData.get(n).push([this.sampleIndex,e(),0]):this.collectedData.set(n,[[this.sampleIndex,e(),0]]))}),this.world.tickForwardedTo$.pipe(Ue(this.onRemoved$)).subscribe(n=>{if(n===this)return;const r=this.collectedData.get(n);r[r.length-1][2]=e()}),this.tick$.pipe(Ue(this.onRemoved$)).subscribe(()=>{this.sampleIndex++;const n=Array.from(this.collectedData.entries());for(const[h,p]of n){for(;p.length>0&&p[0][0]h instanceof Kh?""===h.name?h.constructor.name:h.name:"PHYSICS_WORLD"===h?"Physics simulation":h,s=h=>{let p=0,m=0;for(;mh.length-m+1){m--;break}p+=h[h.length-m-1][1]}return m>1&&(h=h.slice(0,h.length-m)).push([`Rest (${m})`,p]),h};let o=0,a=Array.from(this.collectedData.entries()).map(([h,p])=>{const m=p.reduce((g,[b,v,y])=>g+y-v,0)/this.maxSamples;return o+=m,[r(h),m]}).sort((h,p)=>p[1]-h[1]);a=s(a),this._avgReport={totalTime:o,entries:a};let l=new Map,c=Array.from(this.collectedData.entries()).map(([h,p])=>{let m=0;for(const[g,b,v]of p){const y=v-b;m=Math.max(m,y),l.set(g,y+(l.get(g)||0))}return[r(h),m]}).sort((h,p)=>p[1]-h[1]);c=s(c);let d=Array.from(l.values()).reduce((h,p)=>Math.max(h,p),0);this._peakReport={totalTime:d,entries:c}})}onRemoved(){super.onRemoved(),this.collectedData=new Map,this._avgReport={totalTime:0,entries:[]},this._peakReport={totalTime:0,entries:[]}}}var Xm=function(i,t,e,n){return new(e||(e=Promise))(function(s,o){function a(d){try{c(n.next(d))}catch(h){o(h)}}function l(d){try{c(n.throw(d))}catch(h){o(h)}}function c(d){d.done?s(d.value):function r(s){return s instanceof e?s:new e(function(o){o(s)})}(d.value).then(a,l)}c((n=n.apply(i,t||[])).next())})};class bl{static get documentWorlds(){return[...bl._documentWorlds]}constructor(t,e){this.visualScene=t,this.physicsWorld=e,this.worldClock=new jH(!1),this.keyboardInput=new MC,this.name="w0x"+(bl.default_name_counter++).toString(16),this.children=[],this.tickListeners=[],this.tickStarted$=new Te,this.tickForwardTo$=new Te,this.tickForwardedTo$=new Te,this.paused$=new Te,this.disposed$=new Te,this.keyboardInput.start(),window.ggstatic?this.registerConsoleCommands(window.ggstatic):(this.onGgStaticInitialized=this.onGgStaticInitialized.bind(this),window.addEventListener("ggstatic_added",this.onGgStaticInitialized)),this.worldClock.paused$.subscribe(this.paused$),bl._documentWorlds.push(this),bl.worldCreated$.next(this)}init(){return Xm(this,void 0,void 0,function*(){yield Promise.all([this.physicsWorld.init(),this.visualScene.init()]);const t=(e,n,r)=>{e.active&&(this.tickForwardTo$.next(e),e.tick$.next([n,r]),this.tickForwardedTo$.next(e))};this.worldClock.tick$.subscribe(([e,n])=>{this.tickStarted$.next();let r=0;for(;r=oc.PHYSICS_SIMULATION);r++)t(this.tickListeners[r],e,n);for(this.tickForwardTo$.next("PHYSICS_WORLD"),this.physicsWorld.simulate(n),this.tickForwardedTo$.next("PHYSICS_WORLD");re.tickOrder-n.tickOrder),t.onSpawned(this))}removeEntity(t,e=!1){if(t.world){if(t.world!==this)throw new Error("Entity is not a part of this world");this.children.splice(this.children.findIndex(n=>n===t),1),this.tickListeners.splice(this.tickListeners.findIndex(n=>n===t),1),t.onRemoved()}e&&t.dispose()}onGgStaticInitialized(){window.removeEventListener("ggstatic_added",this.onGgStaticInitialized),this.registerConsoleCommands(window.ggstatic)}registerConsoleCommands(t){t.registerConsoleCommand(this,"timescale",(...e)=>Xm(this,void 0,void 0,function*(){return isNaN(+e[0])||(this.worldClock.timeScale=+e[0]),this.worldClock.timeScale.toString()}),"args: [ float? ]; Get current time scale of selected world clock or set it. Default value is 1.0 (no time scale applied)"),t.registerConsoleCommand(this,"fps_limit",(...e)=>Xm(this,void 0,void 0,function*(){return isNaN(+e[0])||(this.worldClock.tickRateLimit=+e[0]),this.worldClock.tickRateLimit.toString()}),"args: [ int? ]; Get current tick rate limit of selected world clock or set it. 0 means no limit applied"),t.registerConsoleCommand(this,"renderers",()=>Xm(this,void 0,void 0,function*(){return this.children.filter(e=>e instanceof QR).map(e=>e.name).join("\n")}),"no args; Print all renderers in selected world"),t.registerConsoleCommand(this,"debug_view",(...e)=>Xm(this,void 0,void 0,function*(){let r,n="toggle";for(let o of e)["1","0"].includes(o)?n="1"===o:r=o;let s=this.children.find(o=>o instanceof QR&&(!r||o.name===r));if(s)return s.physicsDebugViewActive="toggle"===n?!s.physicsDebugViewActive:n,s.physicsDebugViewActive?"1":"0";throw r?new Error(`Renderer with name "${r}" not found`):new Error("No renderer found")}),'args: [ 0|1?, string? ]; Turn on/off physics debug view, skip first argument to toggle value. Second argument expects renderer name, if not provided first renderer will be picked. Use "renderers" to get list of renderers in the world'),t.registerConsoleCommand(this,"performance",(...e)=>Xm(this,void 0,void 0,function*(){let n="avg",r=20;for(let d of e)["avg","peak"].includes(d)?n=d:isNaN(+d)||(r=+d);const s=new kse(r,250);this.addEntity(s),yield function Ise(i,t){const e="object"==typeof t;return new Promise((n,r)=>{let o,s=!1;i.subscribe({next:a=>{o=a,s=!0},error:r,complete:()=>{s?n(o):e?n(t.defaultValue):r(new fm)}})})}(this.worldClock.tick$.pipe(Oi(r)));const o="avg"===n?s.avgReport:s.peakReport;this.removeEntity(s);const a=o.entries.map(([d,h])=>`${d}:`+new Array(Math.max(0,26-d.length)).join(" ")+`${h.toFixed(2)} ms`+("avg"===n?` (${(100*h/o.totalTime).toFixed(2)}%)`:""));let l="lightgreen";o.totalTime>12&&(l=o.totalTime<16?"yellow":"red");const c=("avg"===n?"Average":"Peak")+" Frame time";return a.unshift(c+":"+new Array(Math.max(0,26-c.length)).join(" ")+`${o.totalTime.toFixed(2)} ms`),a.unshift(`Performance report (${r} samples)`),a.join("\n")}),'args: [ int?, avg|peak? ]; Measure how much time was spent per entity in world. Arguments are samples amount (20 by default) and "peak" or "avg" choice, both arguments are optional. "avg" report sorts entities by average time consumed, "peak" records highest value for each entity')}}bl.default_name_counter=0,bl._documentWorlds=[],bl.worldCreated$=new Te;class Lse extends Mse{}class XH extends Sse{constructor(){super(...arguments),this._world=null}get world(){return this._world}}class Jo extends XH{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}constructor(t){super(),this.tickOrder=oc.OBJECTS_BINDING,this._position=Re.O,this._rotation=Yi.O,this.object3D=null,this.objectBody=null,t.objectBody&&(this.objectBody=t.objectBody,this.name=this.objectBody.name,this.addComponents(this.objectBody)),t.object3D&&(this.object3D=t.object3D,t.objectBody||(this._position=this.object3D.position,this._rotation=this.object3D.rotation,this.name=this.object3D.name),this.addComponents(this.object3D)),this.objectBody&&(this.tick$.subscribe(()=>{this.runTransformBinding(this.objectBody,this.object3D)}),this.runTransformBinding(this.objectBody,this.object3D))}}class Km extends mb{static fromMapArray(t,e=!1){const n=new Km(t[0]);let r=n;for(let s=1;sn.map(r=>new Km(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));othis.mapGraph.getNearestDummy(this.mapGraphNodes,this.loaderCursor$.getValue())),Ql(),Vi(r=>this._nearestDummy$.next(r))).subscribe(r=>{let o,s=new Set;if(this.options.inertia>0){o=new Set;const a=r.walkReadPreserveDepth(this.options.loadDepth+this.options.inertia);for(let l=0;lo.add(c.data)),l<=this.options.loadDepth&&a[l].forEach(c=>s.add(c.data))}else r.walkRead(this.options.loadDepth).forEach(a=>s.add(a.data)),o=s;for(const a of this.loaded.keys())o.has(a)?s.delete(a):n.includes(a)||n.push(a);for(let a of Array.from(s.keys()))e.includes(a)||e.push(a)}),this.tick$.pipe(Do(null),Ue(this._onRemoved$)).subscribe(()=>{if(n.length){for(const r of n)this.disposeChunk(r);n=[]}if(e.length)if(this._initialLoadComplete$.value&&e.length>this.options.maxNodesLoadingPerTick){let r=e.slice(0,this.options.maxNodesLoadingPerTick);e=e.slice(this.options.maxNodesLoadingPerTick),Promise.all(r.map(s=>this.loadChunk(s))).then()}else Promise.all(e.map(r=>this.loadChunk(r))).then(()=>{this._initialLoadComplete$.value||this._initialLoadComplete$.next(!0)}),e=[]})}onRemoved(){super.onRemoved(),this.loadClock&&(this.loadClock.stop(),this.loadClock=null),this.loaderCursor$.next(Re.O)}loadChunk(t){return function(i,t,e,n){return new(e||(e=Promise))(function(s,o){function a(d){try{c(n.next(d))}catch(h){o(h)}}function l(d){try{c(n.throw(d))}catch(h){o(h)}}function c(d){d.done?s(d.value):function r(s){return s instanceof e?s:new e(function(o){o(s)})}(d.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||Yi.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||Yi.O}]),[n,e]})}disposeChunk(t){this.loaded.has(t)&&(this.removeChildren(this.loaded.get(t),!0),this.loaded.delete(t))}}class Use extends QR{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 e4=function(i,t,e,n){return new(e||(e=Promise))(function(s,o){function a(d){try{c(n.next(d))}catch(h){o(h)}}function l(d){try{c(n.throw(d))}catch(h){o(h)}}function c(d){d.done?s(d.value):function r(s){return s instanceof e?s:new e(function(o){o(s)})}(d.value).then(a,l)}c((n=n.apply(i,t||[])).next())})};const t4={keymap:"wasd",cameraLinearSpeed:20,cameraMovementElasticity:0,cameraBoostMultiplier:2.5,cameraRotationSensitivity:1,cameraRotationElasticity:0,mouseOptions:{},ignoreMouseUnlessPointerLocked:!1,ignoreKeyboardUnlessPointerLocked:!1};class n4 extends Kh{get active(){return super.active}set active(t){!super.active&&t&&this.reset(),super.active=t}get spherical(){return this._spherical}set spherical(t){this._spherical.phi=Math.max(1e-6,Math.min(Math.PI-1e-6,t.phi)),this._spherical.theta=t.theta,this.resetMotion$.next()}constructor(t,e,n={}){super(),this.keyboard=t,this.camera=e,this.tickOrder=oc.INPUT_CONTROLLERS,this._spherical={phi:0,radius:1,theta:0},this.resetMotion$=new Te,this.options=Object.assign(Object.assign({},t4),n),n.mouseOptions&&(this.options.mouseOptions=Object.assign(Object.assign({},t4.mouseOptions),n.mouseOptions)),this.mouseInput=new qm(this.options.mouseOptions),this.directionsInput=new Ese(t,this.options.keymap)}reset(){this._spherical=Re.toSpherical(Re.rot({x:0,y:0,z:-1},this.camera.rotation)),this.resetMotion$.next()}onSpawned(t){const e=Object.create(null,{onSpawned:{get:()=>super.onSpawned}});return e4(this,void 0,void 0,function*(){yield e.onSpawned.call(this,t),this._spherical=Re.toSpherical(Re.rot({x:0,y:0,z:-1},this.camera.rotation));const n=["KeyE","KeyQ"];this.camera.camera.supportsFov&&n.push("KeyZ","KeyC"),n.push("ShiftLeft");let r=Ra([this.directionsInput.output$,...n.map(c=>this.keyboard.bind(c))]).pipe(Ue(this._onRemoved$),tt(([c,...d])=>{let h={direction:{},rest:[]};(!this.options.ignoreKeyboardUnlessPointerLocked||this.mouseInput.isPointerLocked)&&(h={direction:c,rest:d});let p=Object.assign({},Re.O);const[m,g,b,v,y]=h.rest;void 0!==h.direction.upDown&&(p.z=h.direction.upDown?-1:1),void 0!==h.direction.leftRight&&(p.x=h.direction.leftRight?-1:1),m!=g&&(p.y=g?-1:1);let M=0;return b!=v&&(M=b?1:-1),p=Re.norm(p),y&&(p=Re.scalarMult(p,this.options.cameraBoostMultiplier)),[p,M]}));this.options.cameraMovementElasticity>0&&(r=r.pipe(nk(this.camera.tick$,this.options.cameraMovementElasticity,([c,d],[h,p],m)=>[Re.lerp(c,h,m),p],([c,d],[h,p])=>d==p&&Re.dist(c,h)<.001)));let s=Re.O,o=0;r.subscribe(([c,d])=>{s=c,o=d});let a=qm.isTouchDevice(),l=this.mouseInput.delta$.pipe(Ue(this._onRemoved$),gn(()=>this.active&&(a||!this.options.ignoreMouseUnlessPointerLocked||this.mouseInput.isPointerLocked)));if(this.options.cameraRotationElasticity>0){const c=new Qe(this._spherical);l.subscribe(h=>{const p=c.getValue();c.next({phi:Math.max(1e-6,Math.min(Math.PI-1e-6,p.phi+h.y*this.options.cameraRotationSensitivity/1e3)),theta:p.theta-h.x*this.options.cameraRotationSensitivity/1e3,radius:1})});const d=()=>{c.pipe(Ue(this._onRemoved$),nk(this.tick$,this.options.cameraRotationElasticity,(h,p,m)=>({phi:h.phi+m*(p.phi-h.phi),theta:h.theta+m*(p.theta-h.theta),radius:1}),(h,p)=>yi.dist({x:h.phi,y:h.theta},{x:p.phi,y:p.theta})<1e-4),Ue(this.resetMotion$)).subscribe(h=>{this._spherical.theta=h.theta,this._spherical.phi=h.phi})};this.resetMotion$.pipe(Ue(this._onRemoved$)).subscribe(()=>{c.next(this._spherical),d()}),d()}else l.subscribe(c=>{this._spherical.theta-=c.x*this.options.cameraRotationSensitivity/1e3,this._spherical.phi+=c.y*this.options.cameraRotationSensitivity/1e3,this._spherical.phi=Math.max(1e-6,Math.min(Math.PI-1e-6,this._spherical.phi))});this.camera.tick$.pipe(Ue(this._onRemoved$),gn(()=>this.active)).subscribe(([c,d])=>{this.camera.camera.fov+=o,this.camera.position=Re.add(this.camera.position,Re.rot(Re.scalarMult(s,this.options.cameraLinearSpeed*d/1e3),this.camera.rotation)),this.camera.rotation=Yi.lookAt(this.camera.position,Re.add(this.camera.position,Re.fromSpherical(this._spherical)))}),this.mouseInput.start(),this.directionsInput.start()})}onRemoved(){const t=Object.create(null,{onRemoved:{get:()=>super.onRemoved}});return e4(this,void 0,void 0,function*(){yield t.onRemoved.call(this),yield this.mouseInput.stop(!0),yield this.directionsInput.stop()})}}var i4=function(i,t,e,n){return new(e||(e=Promise))(function(s,o){function a(d){try{c(n.next(d))}catch(h){o(h)}}function l(d){try{c(n.throw(d))}catch(h){o(h)}}function c(d){d.done?s(d.value):function r(s){return s instanceof e?s:new e(function(o){o(s)})}(d.value).then(a,l)}c((n=n.apply(i,t||[])).next())})};const zse={mouseOptions:{},orbiting:{sensitivityX:1,sensitivityY:1},orbitingElasticity:0,zooming:{sensitivity:1},panning:{sensitivityX:1,sensitivityY:1},dollying:{sensitivity:1}};class Hse extends Kh{get active(){return super.active}set active(t){!super.active&&t&&this.reset(),super.active=t}get spherical(){return this._spherical}set spherical(t){this._spherical.phi=Math.max(1e-6,Math.min(Math.PI-1e-6,t.phi)),this._spherical.theta=t.theta,this._spherical.radius=t.radius,this.resetMotion$.next()}constructor(t,e={}){super(),this.camera=t,this.tickOrder=oc.INPUT_CONTROLLERS,this._spherical={phi:0,radius:10,theta:0},this.target=Re.O,this.resetMotion$=new Te,this.options=Object.assign(Object.assign({},zse),e),this.mouseInput=new qm(this.options.mouseOptions)}reset(){let t=Re.dist(this.target,this.camera.position);this.target=Re.add(this.camera.position,Re.rot({x:0,y:0,z:-t},this.camera.rotation)),this._spherical=Re.toSpherical(Re.sub(this.camera.position,this.target)),this.resetMotion$.next()}onSpawned(t){const e=Object.create(null,{onSpawned:{get:()=>super.onSpawned}});return i4(this,void 0,void 0,function*(){if(yield e.onSpawned.call(this,t),this._spherical=Re.toSpherical(Re.sub(this.camera.position,this.target)),this.options.orbiting){let r=this.mouseInput.delta$.pipe(Ue(this._onRemoved$),gn(()=>this.active&&this.mouseInput.state==Ls.DRAG));if(this.options.orbitingElasticity>0){const s=new Qe(this._spherical);r.subscribe(a=>{const l=s.getValue();s.next({phi:Math.max(1e-6,Math.min(Math.PI-1e-6,l.phi-a.y*this.options.orbiting.sensitivityY/1e3)),theta:l.theta-a.x*this.options.orbiting.sensitivityX/1e3,radius:1})});const o=()=>{s.pipe(Ue(this._onRemoved$),nk(this.tick$,this.options.orbitingElasticity,(a,l,c)=>({phi:a.phi+c*(l.phi-a.phi),theta:a.theta+c*(l.theta-a.theta),radius:1}),(a,l)=>yi.dist({x:a.phi,y:a.theta},{x:l.phi,y:l.theta})<1e-4),Ue(this.resetMotion$)).subscribe(a=>{this._spherical.theta=a.theta,this._spherical.phi=a.phi})};this.resetMotion$.pipe(Ue(this._onRemoved$)).subscribe(()=>{s.next(this._spherical),o()}),o()}else r.subscribe(s=>{this._spherical.theta-=s.x*this.options.orbiting.sensitivityX/1e3,this._spherical.phi-=s.y*this.options.orbiting.sensitivityY/1e3,this._spherical.phi=Math.max(1e-6,Math.min(Math.PI-1e-6,this._spherical.phi))})}this.options.zooming&&this.mouseInput.wheel$.pipe(Ue(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=Re.fromSpherical(this._spherical),o=Re.rotAround(s,{x:-Math.sin(this._spherical.theta),y:Math.cos(this._spherical.theta),z:0},Math.PI/2),a=Re.rotAround(s,Re.norm(o),Math.PI/2);this.target=Re.add(this.target,Re.add(Re.scalarMult(o,-this.options.panning.sensitivityY*r.y/1e3),Re.scalarMult(a,this.options.panning.sensitivityX*r.x/1e3)))};this.options.panning&&this.mouseInput.delta$.pipe(Ue(this._onRemoved$),gn(()=>this.mouseInput.state==Ls.DRAG_RIGHT_BUTTON)).subscribe(r=>{n(r)}),this.options.dollying&&this.mouseInput.delta$.pipe(Ue(this._onRemoved$),gn(()=>this.mouseInput.state==Ls.DRAG_MIDDLE_BUTTON)).subscribe(r=>{this._spherical.radius*=Math.pow(.95,-this.options.dollying.sensitivity*r.y/10)}),qm.isTouchDevice()&&(this.options.dollying||this.options.panning)&&this.mouseInput.twoTouchGestureDelta$.pipe(Ue(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(Ue(this._onRemoved$),gn(()=>this.active),tt(()=>this._spherical)).subscribe(r=>{this.camera.position=Re.add(this.target,Re.fromSpherical(r)),this.camera.rotation=Yi.lookAt(this.camera.position,this.target)}),yield this.mouseInput.start()})}onRemoved(){const t=Object.create(null,{onRemoved:{get:()=>super.onRemoved}});return i4(this,void 0,void 0,function*(){yield t.onRemoved.call(this),yield this.mouseInput.stop(!0)})}}class Gse{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 sk=function(i,t,e,n){return new(e||(e=Promise))(function(s,o){function a(d){try{c(n.next(d))}catch(h){o(h)}}function l(d){try{c(n.throw(d))}catch(h){o(h)}}function c(d){d.done?s(d.value):function r(s){return s instanceof e?s:new e(function(o){o(s)})}(d.value).then(a,l)}c((n=n.apply(i,t||[])).next())})},yu=(()=>{return(i=yu||(yu={}))[i.Nothing=0]="Nothing",i[i.Files=1]="Files",i[i.Entities=2]="Entities",yu;var i})();const r4={cachingStrategy:yu.Nothing,position:Re.O,rotation:Yi.O,loadProps:!0},s4=i=>({meta:i.meta,resources:i.resources.map(({object3D:t,body:e})=>({object3D:t&&t.clone(),body:e&&e.clone()}))});class Wse{constructor(t){this.world=t,this.filesCache=new Map,this.loadResultCache=new Map}loadGgGlbFiles(t){return sk(this,arguments,void 0,function*(e,n=!1){if(n&&this.filesCache.has(e))return this.filesCache.get(e);const r=Promise.all([fetch(`${e}.glb`).then(o=>o.arrayBuffer()),fetch(`${e}.meta`).then(o=>o.text()).then(o=>JSON.parse(o))]);n&&this.filesCache.set(e,r);const s=yield r;return n&&this.filesCache.set(e,s),s})}loadGgGlbResources(t){return sk(this,arguments,void 0,function*(e,n=yu.Nothing){if(n==yu.Entities&&this.loadResultCache.has(e)){const c=this.loadResultCache.get(e),d=c instanceof Promise?yield c:c;return s4(d)}const[r,s]=yield this.loadGgGlbFiles(e,n==yu.Files);if(!r)throw new Error("GLB not found");const[o,a]=yield Promise.all([this.world.visualScene.loader.loadFromGgGlb(r,s),this.world.physicsWorld.loader.loadFromGgGlb(r,s)]),l={resources:[],meta:s};if(!o)return l;if(0==a.length)l.resources.push({object3D:o,body:null});else if(1==a.length)l.resources.push({object3D:o,body:a[0]});else{for(const c of a)l.resources.push({object3D:o.popChild(c.name),body:c});o.isEmpty()||l.resources.push({object3D:o,body:null})}return n==yu.Entities&&this.loadResultCache.set(e,s4(l)),l})}loadGgGlb(t){return sk(this,arguments,void 0,function*(e,n=r4){const r=Object.assign(Object.assign({},r4),n),{resources:s,meta:o}=yield this.loadGgGlbResources(e,r.cachingStrategy),a={entities:s.map(l=>new Jo({object3D:l.object3D,objectBody:l.body})),meta:o};return r.loadProps&&(a.props=yield Promise.all(o.dummies.filter(l=>l.is_prop||l.is_scene).map(l=>this.loadGgGlb(l.is_prop?(r.propsPath||e.substring(0,e.lastIndexOf("/")+1))+l.prop_id:l.scene_id,{loadProps:!!l.is_scene,position:Re.add(Re.rot(l.position,r.rotation),r.position),rotation:Yi.combineRotations(l.rotation,r.rotation)})))),a.entities.forEach(l=>{l.position=Re.add(Re.rot(Re.clone(l.position),r.rotation),r.position),l.rotation=Yi.mult(Yi.clone(l.rotation),r.rotation)}),a})}}class ok extends bl{constructor(t,e){super(t,e),this.visualScene=t,this.physicsWorld=e,this.loader=new Wse(this)}addPrimitiveRigidBody(t,e=Re.O,n=Yi.O,r={}){const s=new Jo({object3D:this.visualScene.factory.createPrimitive(t.shape,r),objectBody:this.physicsWorld.factory.createRigidBody(t)});return s.position=e,s.rotation=n,this.addEntity(s),s}addRenderer(t,e,n){const r=new Use(this.visualScene.createRenderer(t,e,n));return this.addEntity(r),r}registerConsoleCommands(t){super.registerConsoleCommands(t),t.registerConsoleCommand(this,"gravity",(...e)=>function(i,t,e,n){return new(e||(e=Promise))(function(s,o){function a(d){try{c(n.next(d))}catch(h){o(h)}}function l(d){try{c(n.throw(d))}catch(h){o(h)}}function c(d){d.done?s(d.value):function r(s){return s instanceof e?s:new e(function(o){o(s)})}(d.value).then(a,l)}c((n=n.apply(i,t||[])).next())})}(this,void 0,void 0,function*(){if(1==e.length&&(e=["0","0",""+-+e[0]]),e.length>0){if(isNaN(+e[0])||isNaN(+e[1])||isNaN(+e[2]))throw new Error("Wrong arguments");this.physicsWorld.gravity={x:+e[0],y:+e[1],z:+e[2]}}return JSON.stringify(this.physicsWorld.gravity)}),'args: [ ?float, ?float, ?float ]; Get or set 3D world gravity vector. 1 argument sets vector {x: 0, y: 0, z: -value}, 3 arguments set the whole vector. Default value is "9.82" or "0 0 -9.82"')}}function o4(i,t=Gy,e){const n=OI(i,t);return function Yse(i,t){return ni((e,n)=>{const{leading:r=!0,trailing:s=!1}=t??{};let o=!1,a=null,l=null,c=!1;const d=()=>{l?.unsubscribe(),l=null,s&&(m(),c&&n.complete())},h=()=>{l=null,c&&n.complete()},p=g=>l=Mr(i(g)).subscribe(qn(n,d,h)),m=()=>{if(o){o=!1;const g=a;a=null,n.next(g),!c&&p(g)}};e.subscribe(qn(n,g=>{o=!0,a=g,(!l||l.closed)&&(r?m():p(g))},()=>{c=!0,(!(s&&o&&l)||l.closed)&&n.complete()}))})}(()=>n,e)}window.gg_version="0.0.56";const qse=0,a4=1,Xse=2,l4=1,c4=2,Qc=3,lc=0,ko=1,Ns=2,Jc=0,Zm=1,d4=2,u4=3,h4=4,Kse=5,Zh=100,Zse=101,Qse=102,Jse=103,eoe=104,toe=200,noe=201,ioe=202,roe=203,lk=204,ck=205,soe=206,ooe=207,aoe=208,loe=209,coe=210,doe=211,uoe=212,hoe=213,foe=214,poe=0,moe=1,goe=2,CC=3,_oe=4,voe=5,yoe=6,boe=7,SC=0,xoe=1,woe=2,bu=0,Moe=1,Coe=2,Soe=3,Eoe=4,Aoe=5,Doe=6,Toe=7,f4="attached",cc=301,Qh=302,EC=303,AC=304,gb=306,Bs=1e3,er=1001,_b=1002,vr=1003,uk=1004,Qm=1005,cr=1006,vb=1007,xl=1008,ed=1009,p4=1010,m4=1011,yb=1012,hk=1013,xu=1014,ea=1015,Jm=1016,fk=1017,pk=1018,eg=1020,g4=35902,_4=1021,v4=1022,Po=1023,y4=1024,b4=1025,tg=1026,ng=1027,mk=1028,DC=1029,x4=1030,gk=1031,_k=1033,TC=33776,IC=33777,RC=33778,kC=33779,vk=35840,yk=35841,bk=35842,xk=35843,wk=36196,Mk=37492,Ck=37496,Sk=37808,Ek=37809,Ak=37810,Dk=37811,Tk=37812,Ik=37813,Rk=37814,kk=37815,Pk=37816,Ok=37817,Fk=37818,Lk=37819,Nk=37820,Bk=37821,PC=36492,Uk=36494,Vk=36495,w4=36283,zk=36284,Hk=36285,$k=36286,bb=2300,xb=2301,Ooe=0,C4=1,jk=2,Loe=3201,Jh=0,Noe=1,wu="",cs="srgb",ds="srgb-linear",Yk="display-p3",FC="display-p3-linear",LC="linear",Fi="srgb",NC="rec709",BC="p3",sg=7680,Boe=512,Uoe=513,Voe=514,E4=515,zoe=516,Hoe=517,$oe=518,Goe=519,A4="300 es",td=2e3;class og{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]+Us[i>>16&255]+Us[i>>24&255]+"-"+Us[255&t]+Us[t>>8&255]+"-"+Us[t>>16&15|64]+Us[t>>24&255]+"-"+Us[63&e|128]+Us[e>>8&255]+"-"+Us[e>>16&255]+Us[e>>24&255]+Us[255&n]+Us[n>>8&255]+Us[n>>16&255]+Us[n>>24&255]).toLowerCase()}function tr(i,t,e){return Math.max(t,Math.min(e,i))}function qk(i,t){return(i%t+t)%t}function wb(i,t,e){return(1-e)*i+e*t}function ho(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 yn(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 aae_radToDeg=function nae(i){return i*ag};class xe{constructor(t=0,e=0){xe.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(tr(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 wn{constructor(t,e,n,r,s,o,a,l,c){wn.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 d=this.elements;return d[0]=t,d[1]=r,d[2]=a,d[3]=e,d[4]=s,d[5]=l,d[6]=n,d[7]=o,d[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],d=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],F=r[2],D=r[5],k=r[8];return s[0]=o*b+a*M+l*F,s[3]=o*v+a*x+l*D,s[6]=o*y+a*C+l*k,s[1]=c*b+d*M+h*F,s[4]=c*v+d*x+h*D,s[7]=c*y+d*C+h*k,s[2]=p*b+m*M+g*F,s[5]=p*v+m*x+g*D,s[8]=p*y+m*C+g*k,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],d=t[8];return e*o*d-e*a*c-n*s*d+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],d=t[8],h=d*o-a*c,p=a*l-d*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-d*n)*b,t[2]=(a*n-r*o)*b,t[3]=p*b,t[4]=(d*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(Xk.makeScale(t,e)),this}rotate(t){return this.premultiply(Xk.makeRotation(-t)),this}translate(t,e){return this.premultiply(Xk.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 Xk=new wn;function T4(i){for(let t=i.length-1;t>=0;--t)if(i[t]>=65535)return!0;return!1}function Mb(i){return document.createElementNS("http://www.w3.org/1999/xhtml",i)}function cae(){const i=Mb("canvas");return i.style.display="block",i}Int8Array,Uint8Array,Uint8ClampedArray,Int16Array,Uint16Array,Int32Array,Uint32Array,Float32Array,Float64Array;const I4={};function cg(i){i in I4||(I4[i]=!0,console.warn(i))}const R4=(new wn).set(.8224621,.177538,0,.0331941,.9668058,0,.0170827,.0723974,.9105199),k4=(new wn).set(1.2249401,-.2249404,0,-.0420569,1.0420571,0,-.0196376,-.0786361,1.0982735),Cb={[ds]:{transfer:LC,primaries:NC,luminanceCoefficients:[.2126,.7152,.0722],toReference:i=>i,fromReference:i=>i},[cs]:{transfer:Fi,primaries:NC,luminanceCoefficients:[.2126,.7152,.0722],toReference:i=>i.convertSRGBToLinear(),fromReference:i=>i.convertLinearToSRGB()},[FC]:{transfer:LC,primaries:BC,luminanceCoefficients:[.2289,.6917,.0793],toReference:i=>i.applyMatrix3(k4),fromReference:i=>i.applyMatrix3(R4)},[Yk]:{transfer:Fi,primaries:BC,luminanceCoefficients:[.2289,.6917,.0793],toReference:i=>i.convertSRGBToLinear().applyMatrix3(k4),fromReference:i=>i.applyMatrix3(R4).convertLinearToSRGB()}},uae=new Set([ds,FC]),ei={enabled:!0,_workingColorSpace:ds,get workingColorSpace(){return this._workingColorSpace},set workingColorSpace(i){if(!uae.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,Cb[e].fromReference)((0,Cb[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 Cb[i].primaries},getTransfer:function(i){return i===wu?LC:Cb[i].transfer},getLuminanceCoefficients:function(i,t=this._workingColorSpace){return i.fromArray(Cb[t].luminanceCoefficients)}};function dg(i){return i<.04045?.0773993808*i:Math.pow(.9478672986*i+.0521327014,2.4)}function Kk(i){return i<.0031308?12.92*i:1.055*Math.pow(i,.41666)-.055}let ug;class hae{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===ug&&(ug=Mb("canvas")),ug.width=t.width,ug.height=t.height;const n=ug.getContext("2d");t instanceof ImageData?n.putImageData(t,0,0):n.drawImage(t,0,0,t.width,t.height),e=ug}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=Mb("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 og{constructor(e=i.DEFAULT_IMAGE,n=i.DEFAULT_MAPPING,r=er,s=er,o=cr,a=xl,l=Po,c=ed,d=i.DEFAULT_ANISOTROPY,h=wu){super(),this.isTexture=!0,Object.defineProperty(this,"id",{value:pae++}),this.uuid=ta(),this.name="",this.source=new hg(e),this.mipmaps=[],this.mapping=n,this.channel=0,this.wrapS=r,this.wrapT=s,this.magFilter=o,this.minFilter=a,this.anisotropy=d,this.format=l,this.internalFormat=null,this.type=c,this.offset=new xe(0,0),this.repeat=new xe(1,1),this.center=new xe(0,0),this.rotation=0,this.matrixAutoUpdate=!0,this.matrix=new wn,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 Bs:e.x=e.x-Math.floor(e.x);break;case er:e.x=e.x<0?0:1;break;case _b: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 Bs:e.y=e.y-Math.floor(e.y);break;case er:e.y=e.y<0?0:1;break;case _b: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 _i{constructor(t=0,e=0,n=0,r=1){_i.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],d=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(d-p)<.01&&Math.abs(h-b)<.01&&Math.abs(g-v)<.01){if(Math.abs(d+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,F=(y+1)/2,D=(d+p)/4,k=(h+b)/4,B=(g+v)/4;return x>C&&x>F?x<.01?(n=0,r=.707106781,s=.707106781):(n=Math.sqrt(x),r=D/n,s=k/n):C>F?C<.01?(n=.707106781,r=0,s=.707106781):(r=Math.sqrt(C),n=D/r,s=B/r):F<.01?(n=.707106781,r=.707106781,s=0):(s=Math.sqrt(F),n=k/s,r=B/s),this.set(n,r,s,e),this}let M=Math.sqrt((v-g)*(v-g)+(h-b)*(h-b)+(p-d)*(p-d));return Math.abs(M)<.001&&(M=1),this.x=(v-g)/M,this.y=(h-b)/M,this.z=(p-d)/M,this.w=Math.acos((c+m+y-1)/2),this}setFromMatrixPosition(t){const e=t.elements;return this.x=e[12],this.y=e[13],this.z=e[14],this.w=e[15],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 mae extends og{constructor(t=1,e=1,n={}){super(),this.isRenderTarget=!0,this.width=t,this.height=e,this.depth=1,this.scissor=new _i(0,0,t,e),this.scissorTest=!1,this.viewport=new _i(0,0,t,e);const r={width:t,height:e,depth:1};n=Object.assign({generateMipmaps:!1,internalFormat:null,minFilter:cr,depthBuffer:!0,stencilBuffer:!1,resolveDepthBuffer:!0,resolveStencilBuffer:!0,depthTexture:null,samples:0,count:1},n);const s=new Oo(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 F=Math.sqrt(x),D=Math.atan2(F,y*M);v=Math.sin(v*D)/F,a=Math.sin(a*D)/F}const C=a*M;if(l=l*v+p*C,c=c*v+m*C,d=d*v+g*C,h=h*v+b*C,v===1-a){const F=1/Math.sqrt(l*l+c*c+d*d+h*h);l*=F,c*=F,d*=F,h*=F}}t[e]=l,t[e+1]=c,t[e+2]=d,t[e+3]=h}static multiplyQuaternionsFlat(t,e,n,r,s,o){const a=n[r],l=n[r+1],c=n[r+2],d=n[r+3],h=s[o],p=s[o+1],m=s[o+2],g=s[o+3];return t[e]=a*g+d*h+l*m-c*p,t[e+1]=l*g+d*p+c*h-a*m,t[e+2]=c*g+d*m+a*p-l*h,t[e+3]=d*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),d=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*d*h+c*m*g,this._y=c*m*h-p*d*g,this._z=c*d*g+p*m*h,this._w=c*d*h-p*m*g;break;case"YXZ":this._x=p*d*h+c*m*g,this._y=c*m*h-p*d*g,this._z=c*d*g-p*m*h,this._w=c*d*h+p*m*g;break;case"ZXY":this._x=p*d*h-c*m*g,this._y=c*m*h+p*d*g,this._z=c*d*g+p*m*h,this._w=c*d*h-p*m*g;break;case"ZYX":this._x=p*d*h-c*m*g,this._y=c*m*h+p*d*g,this._z=c*d*g-p*m*h,this._w=c*d*h+p*m*g;break;case"YZX":this._x=p*d*h+c*m*g,this._y=c*m*h+p*d*g,this._z=c*d*g-p*m*h,this._w=c*d*h-p*m*g;break;case"XZY":this._x=p*d*h-c*m*g,this._y=c*m*h-p*d*g,this._z=c*d*g+p*m*h,this._w=c*d*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],d=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=(d-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=(d-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+d)/m}else{const m=2*Math.sqrt(1+h-n-a);this._w=(o-r)/m,this._x=(s+c)/m,this._y=(l+d)/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(tr(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,d=e._w;return this._x=n*d+o*a+r*c-s*l,this._y=r*d+o*l+s*a-n*c,this._z=s*d+o*c+n*l-r*a,this._w=o*d-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),d=Math.atan2(c,a),h=Math.sin((1-e)*d)/c,p=Math.sin(e*d)/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 O{constructor(t=0,e=0,n=0){O.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(O4.setFromEuler(t))}applyAxisAngle(t,e){return this.applyQuaternion(O4.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),d=2*(a*e-s*r),h=2*(s*n-o*e);return this.x=e+l*c+o*h-a*d,this.y=n+l*d+a*c-s*h,this.z=r+l*h+s*d-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 Jk.copy(this).projectOnVector(t),this.sub(Jk)}reflect(t){return this.sub(Jk.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(tr(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 Jk=new O,O4=new fo;class Vs{constructor(t=new O(1/0,1/0,1/0),e=new O(-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;e=this.min.x&&t.x<=this.max.x&&t.y>=this.min.y&&t.y<=this.max.y&&t.z>=this.min.z&&t.z<=this.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.x>=this.min.x&&t.min.x<=this.max.x&&t.max.y>=this.min.y&&t.min.y<=this.max.y&&t.max.z>=this.min.z&&t.min.z<=this.max.z}intersectsSphere(t){return this.clampPoint(t.center,wl),wl.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(Sb),HC.subVectors(this.max,Sb),fg.subVectors(t.a,Sb),pg.subVectors(t.b,Sb),mg.subVectors(t.c,Sb),Cu.subVectors(pg,fg),Su.subVectors(mg,pg),tf.subVectors(fg,mg);let e=[0,-Cu.z,Cu.y,0,-Su.z,Su.y,0,-tf.z,tf.y,Cu.z,0,-Cu.x,Su.z,0,-Su.x,tf.z,0,-tf.x,-Cu.y,Cu.x,0,-Su.y,Su.x,0,-tf.y,tf.x,0];return!(!eP(e,fg,pg,mg,HC)||(e=[1,0,0,0,1,0,0,0,1],!eP(e,fg,pg,mg,HC)))&&($C.crossVectors(Cu,Su),e=[$C.x,$C.y,$C.z],eP(e,fg,pg,mg,HC))}clampPoint(t,e){return e.copy(t).clamp(this.min,this.max)}distanceToPoint(t){return this.clampPoint(t,wl).distanceTo(t)}getBoundingSphere(t){return this.isEmpty()?t.makeEmpty():(this.getCenter(t.center),t.radius=.5*this.getSize(wl).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()||(nd[0].set(this.min.x,this.min.y,this.min.z).applyMatrix4(t),nd[1].set(this.min.x,this.min.y,this.max.z).applyMatrix4(t),nd[2].set(this.min.x,this.max.y,this.min.z).applyMatrix4(t),nd[3].set(this.min.x,this.max.y,this.max.z).applyMatrix4(t),nd[4].set(this.max.x,this.min.y,this.min.z).applyMatrix4(t),nd[5].set(this.max.x,this.min.y,this.max.z).applyMatrix4(t),nd[6].set(this.max.x,this.max.y,this.min.z).applyMatrix4(t),nd[7].set(this.max.x,this.max.y,this.max.z).applyMatrix4(t),this.setFromPoints(nd)),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 nd=[new O,new O,new O,new O,new O,new O,new O,new O],wl=new O,zC=new Vs,fg=new O,pg=new O,mg=new O,Cu=new O,Su=new O,tf=new O,Sb=new O,HC=new O,$C=new O,nf=new O;function eP(i,t,e,n,r){for(let s=0,o=i.length-3;s<=o;s+=3){nf.fromArray(i,s);const a=r.x*Math.abs(nf.x)+r.y*Math.abs(nf.y)+r.z*Math.abs(nf.z),l=t.dot(nf),c=e.dot(nf),d=n.dot(nf);if(Math.max(-Math.max(l,c,d),Math.min(l,c,d))>a)return!1}return!0}const gae=new Vs,Eb=new O,tP=new O;class zs{constructor(t=new O,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):gae.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;Eb.subVectors(t,this.center);const e=Eb.lengthSq();if(e>this.radius*this.radius){const n=Math.sqrt(e),r=.5*(n-this.radius);this.center.addScaledVector(Eb,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):(tP.subVectors(t.center,this.center).setLength(t.radius),this.expandByPoint(Eb.copy(t.center).add(tP)),this.expandByPoint(Eb.copy(t.center).sub(tP))),this)}equals(t){return t.center.equals(this.center)&&t.radius===this.radius}clone(){return(new this.constructor).copy(this)}}const id=new O,nP=new O,GC=new O,Eu=new O,iP=new O,WC=new O,rP=new O;class Ab{constructor(t=new O,e=new O(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,id)),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=id.subVectors(t,this.origin).dot(this.direction);return e<0?this.origin.distanceToSquared(t):(id.copy(this.origin).addScaledVector(this.direction,e),id.distanceToSquared(t))}distanceSqToSegment(t,e,n,r){nP.copy(t).add(e).multiplyScalar(.5),GC.copy(e).sub(t).normalize(),Eu.copy(this.origin).sub(nP);const s=.5*t.distanceTo(e),o=-this.direction.dot(GC),a=Eu.dot(this.direction),l=-Eu.dot(GC),c=Eu.lengthSq(),d=Math.abs(1-o*o);let h,p,m,g;if(d>0)if(h=o*l-a,p=o*a-l,g=s*d,h>=0)if(p>=-g)if(p<=g){const b=1/d;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(nP).addScaledVector(GC,p),m}intersectSphere(t,e){id.subVectors(t.center,this.origin);const n=id.dot(this.direction),r=id.dot(id)-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,d=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),d>=0?(s=(t.min.y-p.y)*d,o=(t.max.y-p.y)*d):(s=(t.max.y-p.y)*d,o=(t.min.y-p.y)*d),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,id)}intersectTriangle(t,e,n,r,s){iP.subVectors(e,t),WC.subVectors(n,t),rP.crossVectors(iP,WC);let a,o=this.direction.dot(rP);if(o>0){if(r)return null;a=1}else{if(!(o<0))return null;a=-1,o=-o}Eu.subVectors(this.origin,t);const l=a*this.direction.dot(WC.crossVectors(Eu,WC));if(l<0)return null;const c=a*this.direction.dot(iP.cross(Eu));if(c<0||l+c>o)return null;const d=-a*Eu.dot(rP);return d<0?null:this.at(d/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 Bt{constructor(t,e,n,r,s,o,a,l,c,d,h,p,m,g,b,v){Bt.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,d,h,p,m,g,b,v)}set(t,e,n,r,s,o,a,l,c,d,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]=d,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 Bt).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/gg.setFromMatrixColumn(t,0).length(),s=1/gg.setFromMatrixColumn(t,1).length(),o=1/gg.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),d=Math.cos(s),h=Math.sin(s);if("XYZ"===t.order){const p=o*d,m=o*h,g=a*d,b=a*h;e[0]=l*d,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*d,m=l*h,g=c*d,b=c*h;e[0]=p+b*a,e[4]=g*a-m,e[8]=o*c,e[1]=o*h,e[5]=o*d,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*d,m=l*h,g=c*d,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*d,e[9]=b-p*a,e[2]=-o*c,e[6]=a,e[10]=o*l}else if("ZYX"===t.order){const p=o*d,m=o*h,g=a*d,b=a*h;e[0]=l*d,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*d,e[4]=b-p*h,e[8]=g*h+m,e[1]=h,e[5]=o*d,e[9]=-a*d,e[2]=-c*d,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*d,e[4]=-h,e[8]=c*d,e[1]=p*h+b,e[5]=o*d,e[9]=m*h-g,e[2]=g*h-m,e[6]=a*d,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(_ae,t,vae)}lookAt(t,e,n){const r=this.elements;return na.subVectors(t,e),0===na.lengthSq()&&(na.z=1),na.normalize(),Au.crossVectors(n,na),0===Au.lengthSq()&&(1===Math.abs(n.z)?na.x+=1e-4:na.z+=1e-4,na.normalize(),Au.crossVectors(n,na)),Au.normalize(),jC.crossVectors(na,Au),r[0]=Au.x,r[4]=jC.x,r[8]=na.x,r[1]=Au.y,r[5]=jC.y,r[9]=na.y,r[2]=Au.z,r[6]=jC.z,r[10]=na.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],d=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],F=n[15],D=r[0],k=r[4],B=r[8],T=r[12],A=r[1],W=r[5],ie=r[9],ne=r[13],oe=r[2],ge=r[6],q=r[10],se=r[14],J=r[3],we=r[7],Ve=r[11],Ye=r[15];return s[0]=o*D+a*A+l*oe+c*J,s[4]=o*k+a*W+l*ge+c*we,s[8]=o*B+a*ie+l*q+c*Ve,s[12]=o*T+a*ne+l*se+c*Ye,s[1]=d*D+h*A+p*oe+m*J,s[5]=d*k+h*W+p*ge+m*we,s[9]=d*B+h*ie+p*q+m*Ve,s[13]=d*T+h*ne+p*se+m*Ye,s[2]=g*D+b*A+v*oe+y*J,s[6]=g*k+b*W+v*ge+y*we,s[10]=g*B+b*ie+v*q+y*Ve,s[14]=g*T+b*ne+v*se+y*Ye,s[3]=M*D+x*A+C*oe+F*J,s[7]=M*k+x*W+C*ge+F*we,s[11]=M*B+x*ie+C*q+F*Ve,s[15]=M*T+x*ne+C*se+F*Ye,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],d=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*d-s*l*d)+t[11]*(+e*c*h-e*a*m-s*o*h+n*o*m+s*a*d-n*c*d)+t[15]*(-r*a*d-e*l*h+e*a*p+r*o*h-n*o*p+n*l*d)}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],d=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-d*v*c-g*l*m+o*v*m+d*l*y-o*p*y,C=d*b*c-g*h*c+g*a*m-o*b*m-d*a*y+o*h*y,F=g*h*l-d*b*l-g*a*p+o*b*p+d*a*v-o*h*v,D=e*M+n*x+r*C+s*F;if(0===D)return this.set(0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0);const k=1/D;return t[0]=M*k,t[1]=(b*p*s-h*v*s-b*r*m+n*v*m+h*r*y-n*p*y)*k,t[2]=(a*v*s-b*l*s+b*r*c-n*v*c-a*r*y+n*l*y)*k,t[3]=(h*l*s-a*p*s-h*r*c+n*p*c+a*r*m-n*l*m)*k,t[4]=x*k,t[5]=(d*v*s-g*p*s+g*r*m-e*v*m-d*r*y+e*p*y)*k,t[6]=(g*l*s-o*v*s-g*r*c+e*v*c+o*r*y-e*l*y)*k,t[7]=(o*p*s-d*l*s+d*r*c-e*p*c-o*r*m+e*l*m)*k,t[8]=C*k,t[9]=(g*h*s-d*b*s-g*n*m+e*b*m+d*n*y-e*h*y)*k,t[10]=(o*b*s-g*a*s+g*n*c-e*b*c-o*n*y+e*a*y)*k,t[11]=(d*a*s-o*h*s-d*n*c+e*h*c+o*n*m-e*a*m)*k,t[12]=F*k,t[13]=(d*b*r-g*h*r+g*n*p-e*b*p-d*n*v+e*h*v)*k,t[14]=(g*a*r-o*b*r-g*n*l+e*b*l+o*n*v-e*a*v)*k,t[15]=(o*h*r-d*a*r+d*n*l-e*h*l-o*n*p+e*a*p)*k,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,d=s*a;return this.set(c*o+n,c*a-r*l,c*l+r*a,0,c*a+r*l,d*a+n,d*l-r*o,0,c*l-r*a,d*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,d=o+o,h=a+a,p=s*c,m=s*d,g=s*h,b=o*d,v=o*h,y=a*h,M=l*c,x=l*d,C=l*h,F=n.x,D=n.y,k=n.z;return r[0]=(1-(b+y))*F,r[1]=(m+C)*F,r[2]=(g-x)*F,r[3]=0,r[4]=(m-C)*D,r[5]=(1-(p+y))*D,r[6]=(v+M)*D,r[7]=0,r[8]=(g+x)*k,r[9]=(v-M)*k,r[10]=(1-(p+b))*k,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=gg.set(r[0],r[1],r[2]).length();const o=gg.set(r[4],r[5],r[6]).length(),a=gg.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],Ml.copy(this);const c=1/s,d=1/o,h=1/a;return Ml.elements[0]*=c,Ml.elements[1]*=c,Ml.elements[2]*=c,Ml.elements[4]*=d,Ml.elements[5]*=d,Ml.elements[6]*=d,Ml.elements[8]*=h,Ml.elements[9]*=h,Ml.elements[10]*=h,e.setFromRotationMatrix(Ml),n.x=s,n.y=o,n.z=a,this}makePerspective(t,e,n,r,s,o,a=td){const l=this.elements,c=2*s/(e-t),d=2*s/(n-r),h=(e+t)/(e-t),p=(n+r)/(n-r);let m,g;if(a===td)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]=d,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=td){const l=this.elements,c=1/(e-t),d=1/(n-r),h=1/(o-s),p=(e+t)*c,m=(n+r)*d;let g,b;if(a===td)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*d,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 gg=new O,Ml=new Bt,_ae=new O(0,0,0),vae=new O(1,1,1),Au=new O,jC=new O,na=new O,F4=new Bt,L4=new fo;let rd=(()=>{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],d=s[5],h=s[9],p=s[2],m=s[6],g=s[10];switch(n){case"XYZ":this._y=Math.asin(tr(l,-1,1)),Math.abs(l)<.9999999?(this._x=Math.atan2(-h,g),this._z=Math.atan2(-a,o)):(this._x=Math.atan2(m,d),this._z=0);break;case"YXZ":this._x=Math.asin(-tr(h,-1,1)),Math.abs(h)<.9999999?(this._y=Math.atan2(l,g),this._z=Math.atan2(c,d)):(this._y=Math.atan2(-p,o),this._z=0);break;case"ZXY":this._x=Math.asin(tr(m,-1,1)),Math.abs(m)<.9999999?(this._y=Math.atan2(-p,g),this._z=Math.atan2(-a,d)):(this._y=0,this._z=Math.atan2(c,o));break;case"ZYX":this._y=Math.asin(-tr(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,d));break;case"YZX":this._z=Math.asin(tr(c,-1,1)),Math.abs(c)<.9999999?(this._x=Math.atan2(-h,d),this._y=Math.atan2(-p,o)):(this._x=0,this._y=Math.atan2(l,g));break;case"XZY":this._z=Math.asin(-tr(a,-1,1)),Math.abs(a)<.9999999?(this._x=Math.atan2(m,d),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 F4.makeRotationFromQuaternion(e),this.setFromRotationMatrix(F4,n,r)}setFromVector3(e,n=this._order){return this.set(e.x,e.y,e.z,n)}reorder(e){return L4.setFromEuler(this),this.setFromQuaternion(L4,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 sP{constructor(){this.mask=1}set(t){this.mask=(1<>>0}enable(t){this.mask|=1<{class i extends og{constructor(){super(),this.isObject3D=!0,Object.defineProperty(this,"id",{value:yae++}),this.uuid=ta(),this.name="",this.type="Object3D",this.parent=null,this.children=[],this.up=i.DEFAULT_UP.clone();const e=new O,n=new rd,r=new fo,s=new O(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 Bt},normalMatrix:{value:new wn}}),this.matrix=new Bt,this.matrixWorld=new Bt,this.matrixAutoUpdate=i.DEFAULT_MATRIX_AUTO_UPDATE,this.matrixWorldAutoUpdate=i.DEFAULT_MATRIX_WORLD_AUTO_UPDATE,this.matrixWorldNeedsUpdate=!1,this.layers=new sP,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 _g.setFromAxisAngle(e,n),this.quaternion.multiply(_g),this}rotateOnWorldAxis(e,n){return _g.setFromAxisAngle(e,n),this.quaternion.premultiply(_g),this}rotateX(e){return this.rotateOnAxis(B4,e)}rotateY(e){return this.rotateOnAxis(U4,e)}rotateZ(e){return this.rotateOnAxis(V4,e)}translateOnAxis(e,n){return N4.copy(e).applyQuaternion(this.quaternion),this.position.add(N4.multiplyScalar(n)),this}translateX(e){return this.translateOnAxis(B4,e)}translateY(e){return this.translateOnAxis(U4,e)}translateZ(e){return this.translateOnAxis(V4,e)}localToWorld(e){return this.updateWorldMatrix(!0,!1),e.applyMatrix4(this.matrixWorld)}worldToLocal(e){return this.updateWorldMatrix(!0,!1),e.applyMatrix4(sd.copy(this.matrixWorld).invert())}lookAt(e,n,r){e.isVector3?YC.copy(e):YC.set(e,n,r);const s=this.parent;this.updateWorldMatrix(!0,!1),Db.setFromMatrixPosition(this.matrixWorld),this.isCamera||this.isLight?sd.lookAt(Db,YC,this.up):sd.lookAt(YC,Db,this.up),this.quaternion.setFromRotationMatrix(sd),s&&(sd.extractRotation(s.matrixWorld),_g.setFromRotationMatrix(sd),this.quaternion.premultiply(_g.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.maxInstanceCount=this._maxInstanceCount,s.maxVertexCount=this._maxVertexCount,s.maxIndexCount=this._maxIndexCount,s.geometryInitialized=this._geometryInitialized,s.geometryCount=this._geometryCount,s.matricesTexture=this._matricesTexture.toJSON(e),null!==this._colorsTexture&&(s.colorsTexture=this._colorsTexture.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 d=0,h=c.length;d0){s.children=[];for(let l=0;l0){s.animations=[];for(let l=0;l0&&(r.geometries=l),c.length>0&&(r.materials=c),d.length>0&&(r.textures=d),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 d in l){const h=l[d];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){Cl.subVectors(r,e),od.subVectors(n,e),aP.subVectors(t,e);const o=Cl.dot(Cl),a=Cl.dot(od),l=Cl.dot(aP),c=od.dot(od),d=od.dot(aP),h=o*c-a*a;if(0===h)return s.set(0,0,0),null;const p=1/h,m=(c*l-a*d)*p,g=(o*d-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,ad)&&ad.x>=0&&ad.y>=0&&ad.x+ad.y<=1}static getInterpolation(t,e,n,r,s,o,a,l){return null===this.getBarycoord(t,e,n,r,ad)?(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,ad.x),l.addScaledVector(o,ad.y),l.addScaledVector(a,ad.z),l)}static isFrontFacing(t,e,n,r){return Cl.subVectors(n,e),od.subVectors(t,e),Cl.cross(od).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 Cl.subVectors(this.c,this.b),od.subVectors(this.a,this.b),.5*Cl.cross(od).length()}getMidpoint(t){return t.addVectors(this.a,this.b).add(this.c).multiplyScalar(1/3)}getNormal(t){return La.getNormal(this.a,this.b,this.c,t)}getPlane(t){return t.setFromCoplanarPoints(this.a,this.b,this.c)}getBarycoord(t,e){return La.getBarycoord(t,this.a,this.b,this.c,e)}getInterpolation(t,e,n,r,s){return La.getInterpolation(t,this.a,this.b,this.c,e,n,r,s)}containsPoint(t){return La.containsPoint(t,this.a,this.b,this.c)}isFrontFacing(t){return La.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;yg.subVectors(r,n),bg.subVectors(s,n),lP.subVectors(t,n);const l=yg.dot(lP),c=bg.dot(lP);if(l<=0&&c<=0)return e.copy(n);cP.subVectors(t,r);const d=yg.dot(cP),h=bg.dot(cP);if(d>=0&&h<=d)return e.copy(r);const p=l*h-d*c;if(p<=0&&l>=0&&d<=0)return o=l/(l-d),e.copy(n).addScaledVector(yg,o);dP.subVectors(t,s);const m=yg.dot(dP),g=bg.dot(dP);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(bg,a);const v=d*g-m*h;if(v<=0&&h-d>=0&&m-g>=0)return H4.subVectors(s,r),a=(h-d)/(h-d+(m-g)),e.copy(r).addScaledVector(H4,a);const y=1/(v+b+p);return o=b*y,a=p*y,e.copy(n).addScaledVector(yg,o).addScaledVector(bg,a)}equals(t){return t.a.equals(this.a)&&t.b.equals(this.b)&&t.c.equals(this.c)}}const $4={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},Du={h:0,s:0,l:0},qC={h:0,s:0,l:0};function uP(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 qe{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=cs){return t=Math.floor(t),this.r=(t>>16&255)/255,this.g=(t>>8&255)/255,this.b=(255&t)/255,ei.toWorkingColorSpace(this,e),this}setRGB(t,e,n,r=ei.workingColorSpace){return this.r=t,this.g=e,this.b=n,ei.toWorkingColorSpace(this,r),this}setHSL(t,e,n,r=ei.workingColorSpace){if(t=qk(t,1),e=tr(e,0,1),n=tr(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=uP(o,s,t+1/3),this.g=uP(o,s,t),this.b=uP(o,s,t-1/3)}return ei.toWorkingColorSpace(this,r),this}setStyle(t,e=cs){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=cs){const n=$4[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=dg(t.r),this.g=dg(t.g),this.b=dg(t.b),this}copyLinearToSRGB(t){return this.r=Kk(t.r),this.g=Kk(t.g),this.b=Kk(t.b),this}convertSRGBToLinear(){return this.copySRGBToLinear(this),this}convertLinearToSRGB(){return this.copyLinearToSRGB(this),this}getHex(t=cs){return ei.fromWorkingColorSpace(Hs.copy(this),t),65536*Math.round(tr(255*Hs.r,0,255))+256*Math.round(tr(255*Hs.g,0,255))+Math.round(tr(255*Hs.b,0,255))}getHexString(t=cs){return("000000"+this.getHex(t).toString(16)).slice(-6)}getHSL(t,e=ei.workingColorSpace){ei.fromWorkingColorSpace(Hs.copy(this),e);const n=Hs.r,r=Hs.g,s=Hs.b,o=Math.max(n,r,s),a=Math.min(n,r,s);let l,c;const d=(a+o)/2;if(a===o)l=0,c=0;else{const h=o-a;switch(c=d<=.5?h/(o+a):h/(2-o-a),o){case n:l=(r-s)/h+(r0!=t>0&&this.version++,this._alphaTest=t}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.dispersion&&(n.dispersion=this.dispersion),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!==Zm&&(n.blending=this.blending),this.side!==lc&&(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!==lk&&(n.blendSrc=this.blendSrc),this.blendDst!==ck&&(n.blendDst=this.blendDst),this.blendEquation!==Zh&&(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!==CC&&(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!==sg&&(n.stencilFail=this.stencilFail),this.stencilZFail!==sg&&(n.stencilZFail=this.stencilZFail),this.stencilZPass!==sg&&(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++}onBuild(){console.warn("Material: onBuild() has been removed.")}onBeforeRender(){console.warn("Material: onBeforeRender() has been removed.")}}class qi extends Fo{constructor(t){super(),this.isMeshBasicMaterial=!0,this.type="MeshBasicMaterial",this.color=new qe(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 rd,this.combine=SC,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 yr=new O,XC=new xe;class Hi{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=ea,this.version=0}onUploadCallback(){}set needsUpdate(t){!0===t&&this.version++}get updateRange(){return cg("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],d=[];for(let h=0,p=c.length;h0&&(r[l]=d,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 d=[],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))&&(j4.copy(s).invert(),rf.copy(t.ray).applyMatrix4(j4),(null===n.boundingBox||!1!==rf.intersectsBox(n.boundingBox))&&this._computeIntersections(t,e,rf)))}_computeIntersections(t,e,n){let r;const s=this.geometry,o=this.material,a=s.index,l=s.attributes.position,c=s.attributes.uv,d=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:nS.clone(),object:i}}(i,t,e,n,wg,Mg,Cg,tS);if(d){r&&(QC.fromBufferAttribute(r,a),JC.fromBufferAttribute(r,l),eS.fromBufferAttribute(r,c),d.uv=La.getInterpolation(tS,wg,Mg,Cg,QC,JC,eS,new xe)),s&&(QC.fromBufferAttribute(s,a),JC.fromBufferAttribute(s,l),eS.fromBufferAttribute(s,c),d.uv1=La.getInterpolation(tS,wg,Mg,Cg,QC,JC,eS,new xe)),o&&(q4.fromBufferAttribute(o,a),X4.fromBufferAttribute(o,l),K4.fromBufferAttribute(o,c),d.normal=La.getInterpolation(tS,wg,Mg,Cg,q4,X4,K4,new O),d.normal.dot(n.direction)>0&&d.normal.multiplyScalar(-1));const h={a,b:l,c,normal:new O,materialIndex:0};La.getNormal(wg,Mg,Cg,h.normal),d.face=h}return d}class sf 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=[],d=[],h=[];let p=0,m=0;function g(b,v,y,M,x,C,F,D,k,B,T){const A=C/k,W=F/B,ie=C/2,ne=F/2,oe=D/2,ge=k+1,q=B+1;let se=0,J=0;const we=new O;for(let Ve=0;Ve0?1:-1,d.push(we.x,we.y,we.z),h.push(Rt/k),h.push(1-Ve/B),se+=1}for(let Ve=0;Ve0&&(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 pP extends Fr{constructor(){super(),this.isCamera=!0,this.type="Camera",this.matrixWorldInverse=new Bt,this.projectionMatrix=new Bt,this.projectionMatrixInverse=new Bt,this.coordinateSystem=td}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 Tu=new O,J4=new xe,e5=new xe;class br extends pP{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*ag*Math.atan(e),this.updateProjectionMatrix()}getFocalLength(){const t=Math.tan(.5*ef*this.fov);return.5*this.getFilmHeight()/t}getEffectiveFOV(){return 2*ag*Math.atan(Math.tan(.5*ef*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){Tu.set(-1,-1,.5).applyMatrix4(this.projectionMatrixInverse),e.set(Tu.x,Tu.y).multiplyScalar(-t/Tu.z),Tu.set(1,1,.5).applyMatrix4(this.projectionMatrixInverse),n.set(Tu.x,Tu.y).multiplyScalar(-t/Tu.z)}getViewSize(t,e){return this.getViewBounds(t,J4,e5),e.subVectors(e5,J4)}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*ef*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 Iae extends Fr{constructor(t,e,n){super(),this.type="CubeCamera",this.renderTarget=n,this.coordinateSystem=null,this.activeMipmapLevel=0;const r=new br(-90,1,t,e);r.layers=this.layers,this.add(r);const s=new br(-90,1,t,e);s.layers=this.layers,this.add(s);const o=new br(-90,1,t,e);o.layers=this.layers,this.add(o);const a=new br(-90,1,t,e);a.layers=this.layers,this.add(a);const l=new br(-90,1,t,e);l.layers=this.layers,this.add(l);const c=new br(-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===td)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,d]=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,d),t.setRenderTarget(h,p,m),t.xr.enabled=g,n.texture.needsPMREMUpdate=!0}}class rS extends Oo{constructor(t,e,n,r,s,o,a,l,c,d){super(t=void 0!==t?t:[],e=void 0!==e?e:cc,n,r,s,o,a,l,c,d),this.isCubeTexture=!0,this.flipY=!1}get images(){return this.image}set images(t){this.image=t}}class Rae extends Mu{constructor(t=1,e={}){super(t,t,e),this.isWebGLCubeRenderTarget=!0;const n={width:t,height:t,depth:1};this.texture=new rS([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:cr}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 sf(5,5,5),s=new Sl({name:"CubemapFromEquirect",uniforms:Sg(n_uniforms),vertexShader:n_vertexShader,fragmentShader:n_fragmentShader,side:ko,blending:Jc});s.uniforms.tEquirect.value=e;const o=new Mn(r,s),a=e.minFilter;return e.minFilter===xl&&(e.minFilter=cr),new Iae(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 mP=new O,kae=new O,Pae=new wn;class af{constructor(t=new O(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=mP.subVectors(n,e).cross(kae.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(mP),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||Pae.getNormalMatrix(t),r=this.coplanarPoint(mP).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 lf=new zs,sS=new O;class oS{constructor(t=new af,e=new af,n=new af,r=new af,s=new af,o=new af){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=td){const n=this.planes,r=t.elements,s=r[0],o=r[1],a=r[2],l=r[3],c=r[4],d=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+d,v+g,C+M).normalize(),n[3].setComponents(l-o,p-d,v-g,C-M).normalize(),n[4].setComponents(l-a,p-h,v-b,C-x).normalize(),e===td)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(),lf.copy(t.boundingSphere).applyMatrix4(t.matrixWorld);else{const e=t.geometry;null===e.boundingSphere&&e.computeBoundingSphere(),lf.copy(e.boundingSphere).applyMatrix4(t.matrixWorld)}return this.intersectsSphere(lf)}intersectsSprite(t){return lf.center.set(0,0,0),lf.radius=.7071067811865476,lf.applyMatrix4(t.matrixWorld),this.intersectsSphere(lf)}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,sS.y=r.normal.y>0?t.max.y:t.min.y,sS.z=r.normal.z>0?t.max.z:t.min.z,r.distanceToPoint(sS)<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 t5(){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 Oae(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.isInterleavedBufferAttribute&&(a=a.data),a.isGLBufferAttribute){const d=t.get(a);return void((!d||d.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 ) || defined( USE_BATCHING_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 ) || defined( USE_BATCHING_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\n#ifdef USE_BATCHING_COLOR\n\tvec3 batchingColor = getBatchingColor( getIndirectIndex( gl_DrawID ) );\n\tvColor.xyz *= batchingColor.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}\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}",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_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\tfloat distanceFalloff = 1.0 / max( pow( lightDistance, decayExponent ), 0.01 );\n\tif ( cutoffDistance > 0.0 ) {\n\t\tdistanceFalloff *= pow2( saturate( 1.0 - pow4( lightDistance / cutoffDistance ) ) );\n\t}\n\treturn distanceFalloff;\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_DISPERSION\n\tmaterial.dispersion = dispersion;\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\tfloat dispersion;\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.shadowIntensity, 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.shadowIntensity, 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.shadowIntensity, 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 )\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\tfor ( int i = 0; i < MORPHTARGETS_COUNT; i ++ ) {\n\t\tif ( morphTargetInfluences[ i ] != 0.0 ) objectNormal += getMorph( gl_VertexID, i, 1 ).xyz * morphTargetInfluences[ i ];\n\t}\n#endif",morphtarget_pars_vertex:"#ifdef USE_MORPHTARGETS\n\t#ifndef USE_INSTANCING_MORPH\n\t\tuniform float morphTargetBaseInfluence;\n\t\tuniform float morphTargetInfluences[ MORPHTARGETS_COUNT ];\n\t#endif\n\tuniform sampler2DArray morphTargetsTexture;\n\tuniform ivec2 morphTargetsTextureSize;\n\tvec4 getMorph( const in int vertexIndex, const in int morphTargetIndex, const in int offset ) {\n\t\tint texelIndex = vertexIndex * MORPHTARGETS_TEXTURE_STRIDE + offset;\n\t\tint y = texelIndex / morphTargetsTextureSize.x;\n\t\tint x = texelIndex - y * morphTargetsTextureSize.x;\n\t\tivec3 morphUV = ivec3( x, y, morphTargetIndex );\n\t\treturn texelFetch( morphTargetsTexture, morphUV, 0 );\n\t}\n#endif",morphtarget_vertex:"#ifdef USE_MORPHTARGETS\n\ttransformed *= morphTargetBaseInfluence;\n\tfor ( int i = 0; i < MORPHTARGETS_COUNT; i ++ ) {\n\t\tif ( morphTargetInfluences[ i ] != 0.0 ) transformed += getMorph( gl_VertexID, i, 0 ).xyz * morphTargetInfluences[ i ];\n\t}\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.;const float ShiftRight8 = 1. / 256.;\nconst float Inv255 = 1. / 255.;\nconst vec4 PackFactors = vec4( 1.0, 256.0, 256.0 * 256.0, 256.0 * 256.0 * 256.0 );\nconst vec2 UnpackFactors2 = vec2( UnpackDownscale, 1.0 / PackFactors.g );\nconst vec3 UnpackFactors3 = vec3( UnpackDownscale / PackFactors.rg, 1.0 / PackFactors.b );\nconst vec4 UnpackFactors4 = vec4( UnpackDownscale / PackFactors.rgb, 1.0 / PackFactors.a );\nvec4 packDepthToRGBA( const in float v ) {\n\tif( v <= 0.0 )\n\t\treturn vec4( 0., 0., 0., 0. );\n\tif( v >= 1.0 )\n\t\treturn vec4( 1., 1., 1., 1. );\n\tfloat vuf;\n\tfloat af = modf( v * PackFactors.a, vuf );\n\tfloat bf = modf( vuf * ShiftRight8, vuf );\n\tfloat gf = modf( vuf * ShiftRight8, vuf );\n\treturn vec4( vuf * Inv255, gf * PackUpscale, bf * PackUpscale, af );\n}\nvec3 packDepthToRGB( const in float v ) {\n\tif( v <= 0.0 )\n\t\treturn vec3( 0., 0., 0. );\n\tif( v >= 1.0 )\n\t\treturn vec3( 1., 1., 1. );\n\tfloat vuf;\n\tfloat bf = modf( v * PackFactors.b, vuf );\n\tfloat gf = modf( vuf * ShiftRight8, vuf );\n\treturn vec3( vuf * Inv255, gf * PackUpscale, bf );\n}\nvec2 packDepthToRG( const in float v ) {\n\tif( v <= 0.0 )\n\t\treturn vec2( 0., 0. );\n\tif( v >= 1.0 )\n\t\treturn vec2( 1., 1. );\n\tfloat vuf;\n\tfloat gf = modf( v * 256., vuf );\n\treturn vec2( vuf * Inv255, gf );\n}\nfloat unpackRGBAToDepth( const in vec4 v ) {\n\treturn dot( v, UnpackFactors4 );\n}\nfloat unpackRGBToDepth( const in vec3 v ) {\n\treturn dot( v, UnpackFactors3 );\n}\nfloat unpackRGToDepth( const in vec2 v ) {\n\treturn v.r * UnpackFactors2.r + v.g * UnpackFactors2.g;\n}\nvec4 pack2HalfToRGBA( const in 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( const in 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 shadowIntensity;\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 shadowIntensity;\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 shadowIntensity;\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 shadowIntensity, 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 mix( 1.0, shadow, shadowIntensity );\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 shadowIntensity, 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 mix( 1.0, shadow, shadowIntensity );\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 shadowIntensity;\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 shadowIntensity;\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 shadowIntensity;\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.shadowIntensity, 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.shadowIntensity, 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.shadowIntensity, 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\tconst float StartCompression = 0.8 - 0.04;\n\tconst float 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, vec3( newPeak ), 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.dispersion, 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 dispersion, const in float ior, const in float thickness,\n\t\tconst in vec3 attenuationColor, const in float attenuationDistance ) {\n\t\tvec4 transmittedLight;\n\t\tvec3 transmittance;\n\t\t#ifdef USE_DISPERSION\n\t\t\tfloat halfSpread = ( ior - 1.0 ) * 0.025 * dispersion;\n\t\t\tvec3 iors = vec3( ior - halfSpread, ior, ior + halfSpread );\n\t\t\tfor ( int i = 0; i < 3; i ++ ) {\n\t\t\t\tvec3 transmissionRay = getVolumeTransmissionRay( n, v, thickness, iors[ i ], modelMatrix );\n\t\t\t\tvec3 refractedRayExit = position + transmissionRay;\n\t\t\n\t\t\t\tvec4 ndcPos = projMatrix * viewMatrix * vec4( refractedRayExit, 1.0 );\n\t\t\t\tvec2 refractionCoords = ndcPos.xy / ndcPos.w;\n\t\t\t\trefractionCoords += 1.0;\n\t\t\t\trefractionCoords /= 2.0;\n\t\t\n\t\t\t\tvec4 transmissionSample = getTransmissionSample( refractionCoords, roughness, iors[ i ] );\n\t\t\t\ttransmittedLight[ i ] = transmissionSample[ i ];\n\t\t\t\ttransmittedLight.a += transmissionSample.a;\n\t\t\t\ttransmittance[ i ] = diffuseColor[ i ] * volumeAttenuation( length( transmissionRay ), attenuationColor, attenuationDistance )[ i ];\n\t\t\t}\n\t\t\ttransmittedLight.a /= 3.0;\n\t\t\n\t\t#else\n\t\t\n\t\t\tvec3 transmissionRay = getVolumeTransmissionRay( n, v, thickness, ior, modelMatrix );\n\t\t\tvec3 refractedRayExit = position + transmissionRay;\n\t\t\tvec4 ndcPos = projMatrix * viewMatrix * vec4( refractedRayExit, 1.0 );\n\t\t\tvec2 refractionCoords = ndcPos.xy / ndcPos.w;\n\t\t\trefractionCoords += 1.0;\n\t\t\trefractionCoords /= 2.0;\n\t\t\ttransmittedLight = getTransmissionSample( refractionCoords, roughness, ior );\n\t\t\ttransmittance = diffuseColor * volumeAttenuation( length( transmissionRay ), attenuationColor, attenuationDistance );\n\t\t\n\t\t#endif\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#elif DEPTH_PACKING == 3202\n\t\tgl_FragColor = vec4( packDepthToRGB( fragCoordZ ), 1.0 );\n\t#elif DEPTH_PACKING == 3203\n\t\tgl_FragColor = vec4( packDepthToRG( fragCoordZ ), 0.0, 1.0 );\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_DISPERSION\n\tuniform float dispersion;\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}"},Je={common:{diffuse:{value:new qe(16777215)},opacity:{value:1},map:{value:null},mapTransform:{value:new wn},alphaMap:{value:null},alphaMapTransform:{value:new wn},alphaTest:{value:0}},specularmap:{specularMap:{value:null},specularMapTransform:{value:new wn}},envmap:{envMap:{value:null},envMapRotation:{value:new wn},flipEnvMap:{value:-1},reflectivity:{value:1},ior:{value:1.5},refractionRatio:{value:.98}},aomap:{aoMap:{value:null},aoMapIntensity:{value:1},aoMapTransform:{value:new wn}},lightmap:{lightMap:{value:null},lightMapIntensity:{value:1},lightMapTransform:{value:new wn}},bumpmap:{bumpMap:{value:null},bumpMapTransform:{value:new wn},bumpScale:{value:1}},normalmap:{normalMap:{value:null},normalMapTransform:{value:new wn},normalScale:{value:new xe(1,1)}},displacementmap:{displacementMap:{value:null},displacementMapTransform:{value:new wn},displacementScale:{value:1},displacementBias:{value:0}},emissivemap:{emissiveMap:{value:null},emissiveMapTransform:{value:new wn}},metalnessmap:{metalnessMap:{value:null},metalnessMapTransform:{value:new wn}},roughnessmap:{roughnessMap:{value:null},roughnessMapTransform:{value:new wn}},gradientmap:{gradientMap:{value:null}},fog:{fogDensity:{value:25e-5},fogNear:{value:1},fogFar:{value:2e3},fogColor:{value:new qe(16777215)}},lights:{ambientLightColor:{value:[]},lightProbe:{value:[]},directionalLights:{value:[],properties:{direction:{},color:{}}},directionalLightShadows:{value:[],properties:{shadowIntensity:1,shadowBias:{},shadowNormalBias:{},shadowRadius:{},shadowMapSize:{}}},directionalShadowMap:{value:[]},directionalShadowMatrix:{value:[]},spotLights:{value:[],properties:{color:{},position:{},direction:{},distance:{},coneCos:{},penumbraCos:{},decay:{}}},spotLightShadows:{value:[],properties:{shadowIntensity:1,shadowBias:{},shadowNormalBias:{},shadowRadius:{},shadowMapSize:{}}},spotLightMap:{value:[]},spotShadowMap:{value:[]},spotLightMatrix:{value:[]},pointLights:{value:[],properties:{color:{},position:{},decay:{},distance:{}}},pointLightShadows:{value:[],properties:{shadowIntensity:1,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 qe(16777215)},opacity:{value:1},size:{value:1},scale:{value:1},map:{value:null},alphaMap:{value:null},alphaMapTransform:{value:new wn},alphaTest:{value:0},uvTransform:{value:new wn}},sprite:{diffuse:{value:new qe(16777215)},opacity:{value:1},center:{value:new xe(.5,.5)},rotation:{value:0},map:{value:null},mapTransform:{value:new wn},alphaMap:{value:null},alphaMapTransform:{value:new wn},alphaTest:{value:0}}},dc={basic:{uniforms:po([Je.common,Je.specularmap,Je.envmap,Je.aomap,Je.lightmap,Je.fog]),vertexShader:Cn.meshbasic_vert,fragmentShader:Cn.meshbasic_frag},lambert:{uniforms:po([Je.common,Je.specularmap,Je.envmap,Je.aomap,Je.lightmap,Je.emissivemap,Je.bumpmap,Je.normalmap,Je.displacementmap,Je.fog,Je.lights,{emissive:{value:new qe(0)}}]),vertexShader:Cn.meshlambert_vert,fragmentShader:Cn.meshlambert_frag},phong:{uniforms:po([Je.common,Je.specularmap,Je.envmap,Je.aomap,Je.lightmap,Je.emissivemap,Je.bumpmap,Je.normalmap,Je.displacementmap,Je.fog,Je.lights,{emissive:{value:new qe(0)},specular:{value:new qe(1118481)},shininess:{value:30}}]),vertexShader:Cn.meshphong_vert,fragmentShader:Cn.meshphong_frag},standard:{uniforms:po([Je.common,Je.envmap,Je.aomap,Je.lightmap,Je.emissivemap,Je.bumpmap,Je.normalmap,Je.displacementmap,Je.roughnessmap,Je.metalnessmap,Je.fog,Je.lights,{emissive:{value:new qe(0)},roughness:{value:1},metalness:{value:0},envMapIntensity:{value:1}}]),vertexShader:Cn.meshphysical_vert,fragmentShader:Cn.meshphysical_frag},toon:{uniforms:po([Je.common,Je.aomap,Je.lightmap,Je.emissivemap,Je.bumpmap,Je.normalmap,Je.displacementmap,Je.gradientmap,Je.fog,Je.lights,{emissive:{value:new qe(0)}}]),vertexShader:Cn.meshtoon_vert,fragmentShader:Cn.meshtoon_frag},matcap:{uniforms:po([Je.common,Je.bumpmap,Je.normalmap,Je.displacementmap,Je.fog,{matcap:{value:null}}]),vertexShader:Cn.meshmatcap_vert,fragmentShader:Cn.meshmatcap_frag},points:{uniforms:po([Je.points,Je.fog]),vertexShader:Cn.points_vert,fragmentShader:Cn.points_frag},dashed:{uniforms:po([Je.common,Je.fog,{scale:{value:1},dashSize:{value:1},totalSize:{value:2}}]),vertexShader:Cn.linedashed_vert,fragmentShader:Cn.linedashed_frag},depth:{uniforms:po([Je.common,Je.displacementmap]),vertexShader:Cn.depth_vert,fragmentShader:Cn.depth_frag},normal:{uniforms:po([Je.common,Je.bumpmap,Je.normalmap,Je.displacementmap,{opacity:{value:1}}]),vertexShader:Cn.meshnormal_vert,fragmentShader:Cn.meshnormal_frag},sprite:{uniforms:po([Je.sprite,Je.fog]),vertexShader:Cn.sprite_vert,fragmentShader:Cn.sprite_frag},background:{uniforms:{uvTransform:{value:new wn},t2D:{value:null},backgroundIntensity:{value:1}},vertexShader:Cn.background_vert,fragmentShader:Cn.background_frag},backgroundCube:{uniforms:{envMap:{value:null},flipEnvMap:{value:-1},backgroundBlurriness:{value:0},backgroundIntensity:{value:1},backgroundRotation:{value:new wn}},vertexShader:Cn.backgroundCube_vert,fragmentShader:Cn.backgroundCube_frag},cube:{uniforms:{tCube:{value:null},tFlip:{value:-1},opacity:{value:1}},vertexShader:Cn.cube_vert,fragmentShader:Cn.cube_frag},equirect:{uniforms:{tEquirect:{value:null}},vertexShader:Cn.equirect_vert,fragmentShader:Cn.equirect_frag},distanceRGBA:{uniforms:po([Je.common,Je.displacementmap,{referencePosition:{value:new O},nearDistance:{value:1},farDistance:{value:1e3}}]),vertexShader:Cn.distanceRGBA_vert,fragmentShader:Cn.distanceRGBA_frag},shadow:{uniforms:po([Je.lights,Je.fog,{color:{value:new qe(0)},opacity:{value:1}}]),vertexShader:Cn.shadow_vert,fragmentShader:Cn.shadow_frag}};dc.physical={uniforms:po([dc.standard.uniforms,{clearcoat:{value:0},clearcoatMap:{value:null},clearcoatMapTransform:{value:new wn},clearcoatNormalMap:{value:null},clearcoatNormalMapTransform:{value:new wn},clearcoatNormalScale:{value:new xe(1,1)},clearcoatRoughness:{value:0},clearcoatRoughnessMap:{value:null},clearcoatRoughnessMapTransform:{value:new wn},dispersion:{value:0},iridescence:{value:0},iridescenceMap:{value:null},iridescenceMapTransform:{value:new wn},iridescenceIOR:{value:1.3},iridescenceThicknessMinimum:{value:100},iridescenceThicknessMaximum:{value:400},iridescenceThicknessMap:{value:null},iridescenceThicknessMapTransform:{value:new wn},sheen:{value:0},sheenColor:{value:new qe(0)},sheenColorMap:{value:null},sheenColorMapTransform:{value:new wn},sheenRoughness:{value:1},sheenRoughnessMap:{value:null},sheenRoughnessMapTransform:{value:new wn},transmission:{value:0},transmissionMap:{value:null},transmissionMapTransform:{value:new wn},transmissionSamplerSize:{value:new xe},transmissionSamplerMap:{value:null},thickness:{value:0},thicknessMap:{value:null},thicknessMapTransform:{value:new wn},attenuationDistance:{value:0},attenuationColor:{value:new qe(0)},specularColor:{value:new qe(1,1,1)},specularColorMap:{value:null},specularColorMapTransform:{value:new wn},specularIntensity:{value:1},specularIntensityMap:{value:null},specularIntensityMapTransform:{value:new wn},anisotropyVector:{value:new xe},anisotropyMap:{value:null},anisotropyMapTransform:{value:new wn}}]),vertexShader:Cn.meshphysical_vert,fragmentShader:Cn.meshphysical_frag};const aS={r:0,b:0,g:0},cf=new rd,Oce=new Bt;function Fce(i,t,e,n,r,s,o){const a=new qe(0);let c,d,l=!0===s?0:1,h=null,p=0,m=null;function g(M){let x=!0===M.isScene?M.background:null;return x&&x.isTexture&&(x=(M.backgroundBlurriness>0?e:t).get(x)),x}function y(M,x){M.getRGB(aS,Z4(i)),n.buffers.color.setClear(aS.r,aS.g,aS.b,x,o)}return{getClearColor:function(){return a},setClearColor:function(M,x=1){a.set(M),l=x,y(a,l)},getClearAlpha:function(){return l},setClearAlpha:function(M){l=M,y(a,l)},render:function b(M){let x=!1;const C=g(M);null===C?y(a,l):C&&C.isColor&&(y(C,1),x=!0);const F=i.xr.getEnvironmentBlendMode();"additive"===F?n.buffers.color.setClear(0,0,0,1,o):"alpha-blend"===F&&n.buffers.color.setClear(0,0,0,0,o),(i.autoClear||x)&&(n.buffers.depth.setTest(!0),n.buffers.depth.setMask(!0),n.buffers.color.setMask(!0),i.clear(i.autoClearColor,i.autoClearDepth,i.autoClearStencil))},addToRenderList:function v(M,x){const C=g(x);C&&(C.isCubeTexture||C.mapping===gb)?(void 0===d&&(d=new Mn(new sf(1,1,1),new Sl({name:"BackgroundCubeMaterial",uniforms:Sg(dc.backgroundCube.uniforms),vertexShader:dc.backgroundCube.vertexShader,fragmentShader:dc.backgroundCube.fragmentShader,side:ko,depthTest:!1,depthWrite:!1,fog:!1})),d.geometry.deleteAttribute("normal"),d.geometry.deleteAttribute("uv"),d.onBeforeRender=function(F,D,k){this.matrixWorld.copyPosition(k.matrixWorld)},Object.defineProperty(d.material,"envMap",{get:function(){return this.uniforms.envMap.value}}),r.update(d)),cf.copy(x.backgroundRotation),cf.x*=-1,cf.y*=-1,cf.z*=-1,C.isCubeTexture&&!1===C.isRenderTargetTexture&&(cf.y*=-1,cf.z*=-1),d.material.uniforms.envMap.value=C,d.material.uniforms.flipEnvMap.value=C.isCubeTexture&&!1===C.isRenderTargetTexture?-1:1,d.material.uniforms.backgroundBlurriness.value=x.backgroundBlurriness,d.material.uniforms.backgroundIntensity.value=x.backgroundIntensity,d.material.uniforms.backgroundRotation.value.setFromMatrix4(Oce.makeRotationFromEuler(cf)),d.material.toneMapped=ei.getTransfer(C.colorSpace)!==Fi,(h!==C||p!==C.version||m!==i.toneMapping)&&(d.material.needsUpdate=!0,h=C,p=C.version,m=i.toneMapping),d.layers.enableAll(),M.unshift(d,d.geometry,d.material,0,0,null)):C&&C.isTexture&&(void 0===c&&(c=new Mn(new Iu(2,2),new Sl({name:"BackgroundMaterial",uniforms:Sg(dc.background.uniforms),vertexShader:dc.background.vertexShader,fragmentShader:dc.background.fragmentShader,side:lc,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=C,c.material.uniforms.backgroundIntensity.value=x.backgroundIntensity,c.material.toneMapped=ei.getTransfer(C.colorSpace)!==Fi,!0===C.matrixAutoUpdate&&C.updateMatrix(),c.material.uniforms.uvTransform.value.copy(C.matrix),(h!==C||p!==C.version||m!==i.toneMapping)&&(c.material.needsUpdate=!0,h=C,p=C.version,m=i.toneMapping),c.layers.enableAll(),M.unshift(c,c.geometry,c.material,0,0,null))}}}function Lce(i,t){const e=i.getParameter(i.MAX_VERTEX_ATTRIBS),n={},r=p(null);let s=r,o=!1;function c(A){return i.bindVertexArray(A)}function d(A){return i.deleteVertexArray(A)}function p(A){const W=[],ie=[],ne=[];for(let oe=0;oe=0){const Ve=oe[J];let Ye=ge[J];if(void 0===Ye&&("instanceMatrix"===J&&A.instanceMatrix&&(Ye=A.instanceMatrix),"instanceColor"===J&&A.instanceColor&&(Ye=A.instanceColor)),void 0===Ve||Ve.attribute!==Ye||Ye&&Ve.data!==Ye.data)return!0;q++}return s.attributesNum!==q||s.index!==ne}(A,ne,ie,oe),ge&&function g(A,W,ie,ne){const oe={},ge=W.attributes;let q=0;const se=ie.getAttributes();for(const J in se)if(se[J].location>=0){let Ve=ge[J];void 0===Ve&&("instanceMatrix"===J&&A.instanceMatrix&&(Ve=A.instanceMatrix),"instanceColor"===J&&A.instanceColor&&(Ve=A.instanceColor));const Ye={};Ye.attribute=Ve,Ve&&Ve.data&&(Ye.data=Ve.data),oe[J]=Ye,q++}s.attributes=oe,s.attributesNum=q,s.index=ne}(A,ne,ie,oe),null!==oe&&t.update(oe,i.ELEMENT_ARRAY_BUFFER),(ge||o)&&(o=!1,function C(A,W,ie,ne){b();const oe=ne.attributes,ge=ie.getAttributes(),q=W.defaultAttributeValues;for(const se in ge){const J=ge[se];if(J.location>=0){let we=oe[se];if(void 0===we&&("instanceMatrix"===se&&A.instanceMatrix&&(we=A.instanceMatrix),"instanceColor"===se&&A.instanceColor&&(we=A.instanceColor)),void 0!==we){const Ve=we.normalized,Ye=we.itemSize,Rt=t.get(we);if(void 0===Rt)continue;const nn=Rt.buffer,le=Rt.type,Fe=Rt.bytesPerElement,Ze=le===i.INT||le===i.UNSIGNED_INT||we.gpuType===hk;if(we.isInterleavedBufferAttribute){const Le=we.data,wt=Le.stride,Tt=we.offset;if(Le.isInstancedInterleavedBuffer){for(let St=0;St0&&i.getShaderPrecisionFormat(i.FRAGMENT_SHADER,i.HIGH_FLOAT).precision>0)return"highp";D="mediump"}return"mediump"===D&&i.getShaderPrecisionFormat(i.VERTEX_SHADER,i.MEDIUM_FLOAT).precision>0&&i.getShaderPrecisionFormat(i.FRAGMENT_SHADER,i.MEDIUM_FLOAT).precision>0?"mediump":"lowp"}let c=void 0!==e.precision?e.precision:"highp";const d=l(c);d!==c&&(console.warn("THREE.WebGLRenderer:",c,"not supported, using",d,"instead."),c=d);const h=!0===e.logarithmicDepthBuffer,p=i.getParameter(i.MAX_TEXTURE_IMAGE_UNITS),m=i.getParameter(i.MAX_VERTEX_TEXTURE_IMAGE_UNITS);return{isWebGL2:!0,getMaxAnisotropy:function s(){if(void 0!==r)return r;if(!0===t.has("EXT_texture_filter_anisotropic")){const D=t.get("EXT_texture_filter_anisotropic");r=i.getParameter(D.MAX_TEXTURE_MAX_ANISOTROPY_EXT)}else r=0;return r},getMaxPrecision:l,textureFormatReadable:function o(D){return!(D!==Po&&n.convert(D)!==i.getParameter(i.IMPLEMENTATION_COLOR_READ_FORMAT))},textureTypeReadable:function a(D){const k=D===Jm&&(t.has("EXT_color_buffer_half_float")||t.has("EXT_color_buffer_float"));return!(D!==ed&&n.convert(D)!==i.getParameter(i.IMPLEMENTATION_COLOR_READ_TYPE)&&D!==ea&&!k)},precision:c,logarithmicDepthBuffer:h,maxTextures:p,maxVertexTextures:m,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:m>0,maxSamples:i.getParameter(i.MAX_SAMPLES)}}function Uce(i){const t=this;let e=null,n=0,r=!1,s=!1;const o=new af,a=new wn,l={value:null,needsUpdate:!1};function d(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=d(g,p,x,m);for(let F=0;F!==x;++F)C[F]=e[F];y.clippingState=C,this.numIntersection=b?this.numPlanes:0,this.numPlanes+=M}}}function Vce(i){let t=new WeakMap;function e(o,a){return a===EC?o.mapping=cc:a===AC&&(o.mapping=Qh),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===EC||a===AC){if(t.has(o))return e(t.get(o).texture,o.mapping);{const l=o.image;if(l&&l.height>0){const c=new Rae(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 Rb extends pP{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,d=(this.top-this.bottom)/this.view.fullHeight/this.zoom;s+=c*this.view.offsetX,o=s+c*this.view.width,a-=d*this.view.offsetY,l=a-d*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 n5=[.125,.215,.35,.446,.526,.582],gP=new Rb,r5=new qe;let _P=null,vP=0,yP=0,bP=!1;const uf=(1+Math.sqrt(5))/2,Tg=1/uf,s5=[new O(-uf,Tg,0),new O(uf,Tg,0),new O(-Tg,0,uf),new O(Tg,0,uf),new O(0,uf,-Tg),new O(0,uf,Tg),new O(-1,1,-1),new O(1,1,-1),new O(-1,1,1),new O(1,1,1)];class o5{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){_P=this._renderer.getRenderTarget(),vP=this._renderer.getActiveCubeFace(),yP=this._renderer.getActiveMipmapLevel(),bP=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=c5(),this._compileMaterial(this._cubemapMaterial))}compileEquirectangularShader(){null===this._equirectMaterial&&(this._equirectMaterial=l5(),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=n5[o-i+4-1]:0===o&&(l=0),n.push(l);const c=1/(a-2),d=-c,h=1+c,p=[d,d,h,d,h,h,d,d,h,h,d,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 D=0;D2?0:-1;M.set([k,B,0,k+2/3,B,0,k+2/3,B+1,0,k,B,0,k+2/3,B+1,0,k,B+1,0],b*g*D),x.set(p,v*g*D),C.set([D,D,D,D,D,D],y*g*D)}const F=new hn;F.setAttribute("position",new Hi(M,b)),F.setAttribute("uv",new Hi(x,v)),F.setAttribute("faceIndex",new Hi(C,y)),t.push(F),r>4&&r--}return{lodPlanes:t,sizeLods:e,sigmas:n}}(s)),this._blurMaterial=function Hce(i,t,e){const n=new Float32Array(20),r=new O(0,1,0);return new Sl({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:Jc,depthTest:!1,depthWrite:!1})}(s,t,e)}return r}_compileMaterial(t){const e=new Mn(this._lodPlanes[0],t);this._renderer.compile(e,gP)}_sceneToCubeUV(t,e,n,r){const a=new br(90,1,e,n),l=[1,-1,1,1,1,1],c=[1,1,1,-1,-1,-1],d=this._renderer,h=d.autoClear,p=d.toneMapping;d.getClearColor(r5),d.toneMapping=bu,d.autoClear=!1;const m=new qi({name:"PMREM.Background",side:ko,depthWrite:!1,depthTest:!1}),g=new Mn(new sf,m);let b=!1;const v=t.background;v?v.isColor&&(m.color.copy(v),t.background=null,b=!0):(m.color.copy(r5),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;lS(r,M*x,y>2?x:0,x,x),d.setRenderTarget(r),b&&d.render(g,a),d.render(t,a)}g.geometry.dispose(),g.material.dispose(),d.toneMapping=p,d.autoClear=h,t.background=v}_textureToCubeUV(t,e){const n=this._renderer,r=t.mapping===cc||t.mapping===Qh;r?(null===this._cubemapMaterial&&(this._cubemapMaterial=c5()),this._cubemapMaterial.uniforms.flipEnvMap.value=!1===t.isRenderTargetTexture?-1:1):null===this._equirectMaterial&&(this._equirectMaterial=l5());const s=r?this._cubemapMaterial:this._equirectMaterial,o=new Mn(this._lodPlanes[0],s);s.uniforms.envMap.value=t;const l=this._cubeSize;lS(e,0,0,3*l,2*l),n.setRenderTarget(e),n.render(o,gP)}_applyPMREM(t){const e=this._renderer,n=e.autoClear;e.autoClear=!1;const r=this._lodPlanes.length;for(let s=1;s20&&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 k=0;k<20;++k){const B=k/b,T=Math.exp(-B*B/2);y.push(T),0===k?M+=T:kx-4?r-x+4:0),4*(this._cubeSize-C),3*C,2*C),l.setRenderTarget(e),l.render(h,gP)}}function a5(i,t,e){const n=new Mu(i,t,e);return n.texture.mapping=gb,n.texture.name="PMREM.cubeUv",n.scissorTest=!0,n}function lS(i,t,e,n,r){i.viewport.set(t,e,n,r),i.scissor.set(t,e,n,r)}function l5(){return new Sl({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:Jc,depthTest:!1,depthWrite:!1})}function c5(){return new Sl({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:Jc,depthTest:!1,depthWrite:!1})}function $ce(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===EC||l===AC,d=l===cc||l===Qh;if(c||d){let h=t.get(a);if(a.isRenderTargetTexture&&a.pmremVersion!==(void 0!==h?h.texture.pmremVersion:0))return null===e&&(e=new o5(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||d&&m&&function r(a){let l=0;for(let d=0;d<6;d++)void 0!==a[d]&&l++;return 6===l}(m)?(null===e&&(e=new o5(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 Gce(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&&cg("THREE.WebGLRenderer: "+n+" extension not supported."),r}}}function Wce(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&&(F=Math.ceil(C/t.maxTextureSize),C=t.maxTextureSize);const D=new Float32Array(C*F*4*h),k=new Qk(D,C,F,h);k.type=ea,k.needsUpdate=!0;const B=4*x;for(let A=0;A0)return i;const r=t*e;let s=g5[r];if(void 0===s&&(s=new Float32Array(r),g5[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 Lr(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 Gde(i,t){const e=function $de(i){const t=ei.getPrimaries(ei.workingColorSpace),e=ei.getPrimaries(i);let n;switch(t===e?n="":t===BC&&e===NC?n="LinearDisplayP3ToLinearSRGB":t===NC&&e===BC&&(n="LinearSRGBToLinearDisplayP3"),i){case ds:case FC:return[n,"LinearTransferOETF"];case cs:case Yk: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 Wde(i,t){let e;switch(t){case Moe:e="Linear";break;case Coe:e="Reinhard";break;case Soe:e="OptimizedCineon";break;case Eoe:e="ACESFilmic";break;case Doe:e="AgX";break;case Toe:e="Neutral";break;case Aoe:e="Custom";break;default:console.warn("THREE.WebGLProgram: Unsupported toneMapping:",t),e="Linear"}return"vec3 "+i+"( vec3 color ) { return "+e+"ToneMapping( color ); }"}const uS=new O;function kb(i){return""!==i}function C5(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 S5(i,t){return i.replace(/NUM_CLIPPING_PLANES/g,t.numClippingPlanes).replace(/UNION_CLIPPING_PLANES/g,t.numClippingPlanes-t.numClipIntersection)}const Kde=/^[ \t]*#include +<([\w\d./]+)>/gm;function MP(i){return i.replace(Kde,Qde)}const Zde=new Map;function Qde(i,t){let e=Cn[t];if(void 0===e){const n=Zde.get(t);if(void 0===n)throw new Error("Can not resolve #include <"+t+">");e=Cn[n],console.warn('THREE.WebGLRenderer: Shader chunk "%s" has been deprecated. Use "%s" instead.',t,n)}return MP(e)}const Jde=/#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 E5(i){return i.replace(Jde,eue)}function eue(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(kb).join("\n"),y.length>0&&(y+="\n")):(v=[A5(e),"#define SHADER_TYPE "+e.shaderType,"#define SHADER_NAME "+e.shaderName,g,e.extensionClipCullDistance?"#define USE_CLIP_DISTANCE":"",e.batching?"#define USE_BATCHING":"",e.batchingColor?"#define USE_BATCHING_COLOR":"",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 "+d:"",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_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.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","#ifdef USE_SKINNING","\tattribute vec4 skinIndex;","\tattribute vec4 skinWeight;","#endif","\n"].filter(kb).join("\n"),y=[A5(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 "+d:"",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.dispersion?"#define USE_DISPERSION":"",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||e.batchingColor?"#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.decodeVideoTexture?"#define DECODE_VIDEO_TEXTURE":"",e.logarithmicDepthBuffer?"#define USE_LOGDEPTHBUF":"","uniform mat4 viewMatrix;","uniform vec3 cameraPosition;","uniform bool isOrthographic;",e.toneMapping!==bu?"#define TONE_MAPPING":"",e.toneMapping!==bu?Cn.tonemapping_pars_fragment:"",e.toneMapping!==bu?Wde("toneMapping",e.toneMapping):"",e.dithering?"#define DITHERING":"",e.opaque?"#define OPAQUE":"",Cn.colorspace_pars_fragment,Gde("linearToOutputTexel",e.outputColorSpace),(ei.getLuminanceCoefficients(uS),["float luminance( const in vec3 rgb ) {",`\tconst vec3 weights = vec3( ${uS.x.toFixed(4)}, ${uS.y.toFixed(4)}, ${uS.z.toFixed(4)} );`,"\treturn dot( weights, rgb );","}"].join("\n")),e.useDepthPacking?"#define DEPTH_PACKING "+e.depthPacking:"","\n"].filter(kb).join("\n")),o=MP(o),o=C5(o,e),o=S5(o,e),a=MP(a),a=C5(a,e),a=S5(a,e),o=E5(o),a=E5(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===A4?"":"layout(location = 0) out highp vec4 pc_fragColor;",e.glslVersion===A4?"":"#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,F=w5(r,r.VERTEX_SHADER,M+v+o),D=w5(r,r.FRAGMENT_SHADER,C);function k(W){if(i.debug.checkShaderErrors){const ie=r.getProgramInfoLog(b).trim(),ne=r.getShaderInfoLog(F).trim(),oe=r.getShaderInfoLog(D).trim();let ge=!0,q=!0;if(!1===r.getProgramParameter(b,r.LINK_STATUS))if(ge=!1,"function"==typeof i.debug.onShaderError)i.debug.onShaderError(r,b,F,D);else{const se=M5(r,F,"vertex"),J=M5(r,D,"fragment");console.error("THREE.WebGLProgram: Shader Error "+r.getError()+" - VALIDATE_STATUS "+r.getProgramParameter(b,r.VALIDATE_STATUS)+"\n\nMaterial Name: "+W.name+"\nMaterial Type: "+W.type+"\n\nProgram Info Log: "+ie+"\n"+se+"\n"+J)}else""!==ie?console.warn("THREE.WebGLProgram: Program Info Log:",ie):(""===ne||""===oe)&&(q=!1);q&&(W.diagnostics={runnable:ge,programLog:ie,vertexShader:{log:ne,prefix:v},fragmentShader:{log:oe,prefix:y}})}r.deleteShader(F),r.deleteShader(D),B=new dS(r,b),T=function Xde(i,t){const e={},n=i.getProgramParameter(t,i.ACTIVE_ATTRIBUTES);for(let r=0;r0,de=T.clearcoat>0,De=T.iridescence>0,Ae=T.sheen>0,Ut=T.transmission>0,et=R&&!!T.anisotropyMap,pt=de&&!!T.clearcoatMap,bn=de&&!!T.clearcoatNormalMap,He=de&&!!T.clearcoatRoughnessMap,ft=De&&!!T.iridescenceMap,Yn=De&&!!T.iridescenceThicknessMap,cn=Ae&&!!T.sheenColorMap,yt=Ae&&!!T.sheenRoughnessMap,vn=!!T.specularMap,Pn=!!T.specularColorMap,Ki=!!T.specularIntensityMap,Z=Ut&&!!T.transmissionMap,We=Ut&&!!T.thicknessMap,Ee=!!T.alphaMap,ti=!!T.extensions;let xr=bu;T.toneMapped&&(null===Le||!0===Le.isXRRenderTarget)&&(xr=i.toneMapping);const hs={shaderID:we,shaderType:T.type,shaderName:T.name,vertexShader:nn,fragmentShader:le,defines:T.defines,customVertexShaderID:Fe,customFragmentShaderID:Ze,isRawShaderMaterial:!0===T.isRawShaderMaterial,glslVersion:T.glslVersion,precision:m,batching:Tt,batchingColor:Tt&&null!==ne._colorsTexture,instancing:wt,instancingColor:wt&&null!==ne.instanceColor,instancingMorph:wt&&null!==ne.morphTexture,supportsVertexTextures:p,outputColorSpace:null===Le?i.outputColorSpace:!0===Le.isXRRenderTarget?Le.texture.colorSpace:ds,alphaToCoverage:!!T.alphaToCoverage,map:St,matcap:!!T.matcap,envMap:N,envMapMode:N&&se.mapping,envMapCubeUVHeight:J,aoMap:Ge,lightMap:Ne,bumpMap:it,normalMap:Me,displacementMap:p&&Gt,emissiveMap:rt,normalMapObjectSpace:Me&&T.normalMapType===Noe,normalMapTangentSpace:Me&&T.normalMapType===Jh,metalnessMap:_t,roughnessMap:H,anisotropy:R,anisotropyMap:et,clearcoat:de,clearcoatMap:pt,clearcoatNormalMap:bn,clearcoatRoughnessMap:He,dispersion:T.dispersion>0,iridescence:De,iridescenceMap:ft,iridescenceThicknessMap:Yn,sheen:Ae,sheenColorMap:cn,sheenRoughnessMap:yt,specularMap:vn,specularColorMap:Pn,specularIntensityMap:Ki,transmission:Ut,transmissionMap:Z,thicknessMap:We,gradientMap:!!T.gradientMap,opaque:!1===T.transparent&&T.blending===Zm&&!1===T.alphaToCoverage,alphaMap:Ee,alphaTest:T.alphaTest>0,alphaHash:!!T.alphaHash,combine:T.combine,mapUv:St&&b(T.map.channel),aoMapUv:Ge&&b(T.aoMap.channel),lightMapUv:Ne&&b(T.lightMap.channel),bumpMapUv:it&&b(T.bumpMap.channel),normalMapUv:Me&&b(T.normalMap.channel),displacementMapUv:Gt&&b(T.displacementMap.channel),emissiveMapUv:rt&&b(T.emissiveMap.channel),metalnessMapUv:_t&&b(T.metalnessMap.channel),roughnessMapUv:H&&b(T.roughnessMap.channel),anisotropyMapUv:et&&b(T.anisotropyMap.channel),clearcoatMapUv:pt&&b(T.clearcoatMap.channel),clearcoatNormalMapUv:bn&&b(T.clearcoatNormalMap.channel),clearcoatRoughnessMapUv:He&&b(T.clearcoatRoughnessMap.channel),iridescenceMapUv:ft&&b(T.iridescenceMap.channel),iridescenceThicknessMapUv:Yn&&b(T.iridescenceThicknessMap.channel),sheenColorMapUv:cn&&b(T.sheenColorMap.channel),sheenRoughnessMapUv:yt&&b(T.sheenRoughnessMap.channel),specularMapUv:vn&&b(T.specularMap.channel),specularColorMapUv:Pn&&b(T.specularColorMap.channel),specularIntensityMapUv:Ki&&b(T.specularIntensityMap.channel),transmissionMapUv:Z&&b(T.transmissionMap.channel),thicknessMapUv:We&&b(T.thicknessMap.channel),alphaMapUv:Ee&&b(T.alphaMap.channel),vertexTangents:!!ge.attributes.tangent&&(Me||R),vertexColors:T.vertexColors,vertexAlphas:!0===T.vertexColors&&!!ge.attributes.color&&4===ge.attributes.color.itemSize,pointsUvs:!0===ne.isPoints&&!!ge.attributes.uv&&(St||Ee),fog:!!oe,useFog:!0===T.fog,fogExp2:!!oe&&oe.isFogExp2,flatShading:!0===T.flatShading,sizeAttenuation:!0===T.sizeAttenuation,logarithmicDepthBuffer:h,skinning:!0===ne.isSkinnedMesh,morphTargets:void 0!==ge.morphAttributes.position,morphNormals:void 0!==ge.morphAttributes.normal,morphColors:void 0!==ge.morphAttributes.color,morphTargetsCount:Ye,morphTextureStride:Rt,numDirLights:A.directional.length,numPointLights:A.point.length,numSpotLights:A.spot.length,numSpotLightMaps:A.spotLightMap.length,numRectAreaLights:A.rectArea.length,numHemiLights:A.hemi.length,numDirLightShadows:A.directionalShadowMap.length,numPointLightShadows:A.pointShadowMap.length,numSpotLightShadows:A.spotShadowMap.length,numSpotLightShadowsWithMaps:A.numSpotLightShadowsWithMaps,numLightProbes:A.numLightProbes,numClippingPlanes:o.numPlanes,numClipIntersection:o.numIntersection,dithering:T.dithering,shadowMapEnabled:i.shadowMap.enabled&&W.length>0,shadowMapType:i.shadowMap.type,toneMapping:xr,decodeVideoTexture:St&&!0===T.map.isVideoTexture&&ei.getTransfer(T.map.colorSpace)===Fi,premultipliedAlpha:T.premultipliedAlpha,doubleSided:T.side===Ns,flipSided:T.side===ko,useDepthPacking:T.depthPacking>=0,depthPacking:T.depthPacking||0,index0AttributeName:T.index0AttributeName,extensionClipCullDistance:ti&&!0===T.extensions.clipCullDistance&&n.has("WEBGL_clip_cull_distance"),extensionMultiDraw:(ti&&!0===T.extensions.multiDraw||Tt)&&n.has("WEBGL_multi_draw"),rendererExtensionParallelShaderCompile:n.has("KHR_parallel_shader_compile"),customProgramCacheKey:T.customProgramCacheKey()};return hs.vertexUv1s=c.has(1),hs.vertexUv2s=c.has(2),hs.vertexUv3s=c.has(3),c.clear(),hs},getProgramCacheKey:function y(T){const A=[];if(T.shaderID?A.push(T.shaderID):(A.push(T.customVertexShaderID),A.push(T.customFragmentShaderID)),void 0!==T.defines)for(const W in T.defines)A.push(W),A.push(T.defines[W]);return!1===T.isRawShaderMaterial&&(function M(T,A){T.push(A.precision),T.push(A.outputColorSpace),T.push(A.envMapMode),T.push(A.envMapCubeUVHeight),T.push(A.mapUv),T.push(A.alphaMapUv),T.push(A.lightMapUv),T.push(A.aoMapUv),T.push(A.bumpMapUv),T.push(A.normalMapUv),T.push(A.displacementMapUv),T.push(A.emissiveMapUv),T.push(A.metalnessMapUv),T.push(A.roughnessMapUv),T.push(A.anisotropyMapUv),T.push(A.clearcoatMapUv),T.push(A.clearcoatNormalMapUv),T.push(A.clearcoatRoughnessMapUv),T.push(A.iridescenceMapUv),T.push(A.iridescenceThicknessMapUv),T.push(A.sheenColorMapUv),T.push(A.sheenRoughnessMapUv),T.push(A.specularMapUv),T.push(A.specularColorMapUv),T.push(A.specularIntensityMapUv),T.push(A.transmissionMapUv),T.push(A.thicknessMapUv),T.push(A.combine),T.push(A.fogExp2),T.push(A.sizeAttenuation),T.push(A.morphTargetsCount),T.push(A.morphAttributeCount),T.push(A.numDirLights),T.push(A.numPointLights),T.push(A.numSpotLights),T.push(A.numSpotLightMaps),T.push(A.numHemiLights),T.push(A.numRectAreaLights),T.push(A.numDirLightShadows),T.push(A.numPointLightShadows),T.push(A.numSpotLightShadows),T.push(A.numSpotLightShadowsWithMaps),T.push(A.numLightProbes),T.push(A.shadowMapType),T.push(A.toneMapping),T.push(A.numClippingPlanes),T.push(A.numClipIntersection),T.push(A.depthPacking)}(A,T),function x(T,A){a.disableAll(),A.supportsVertexTextures&&a.enable(0),A.instancing&&a.enable(1),A.instancingColor&&a.enable(2),A.instancingMorph&&a.enable(3),A.matcap&&a.enable(4),A.envMap&&a.enable(5),A.normalMapObjectSpace&&a.enable(6),A.normalMapTangentSpace&&a.enable(7),A.clearcoat&&a.enable(8),A.iridescence&&a.enable(9),A.alphaTest&&a.enable(10),A.vertexColors&&a.enable(11),A.vertexAlphas&&a.enable(12),A.vertexUv1s&&a.enable(13),A.vertexUv2s&&a.enable(14),A.vertexUv3s&&a.enable(15),A.vertexTangents&&a.enable(16),A.anisotropy&&a.enable(17),A.alphaHash&&a.enable(18),A.batching&&a.enable(19),A.dispersion&&a.enable(20),A.batchingColor&&a.enable(21),T.push(a.mask),a.disableAll(),A.fog&&a.enable(0),A.useFog&&a.enable(1),A.flatShading&&a.enable(2),A.logarithmicDepthBuffer&&a.enable(3),A.skinning&&a.enable(4),A.morphTargets&&a.enable(5),A.morphNormals&&a.enable(6),A.morphColors&&a.enable(7),A.premultipliedAlpha&&a.enable(8),A.shadowMapEnabled&&a.enable(9),A.doubleSided&&a.enable(10),A.flipSided&&a.enable(11),A.useDepthPacking&&a.enable(12),A.dithering&&a.enable(13),A.transmission&&a.enable(14),A.sheen&&a.enable(15),A.opaque&&a.enable(16),A.pointsUvs&&a.enable(17),A.decodeVideoTexture&&a.enable(18),A.alphaToCoverage&&a.enable(19),T.push(a.mask)}(A,T),A.push(i.outputColorSpace)),A.push(T.customProgramCacheKey),A.join()},getUniforms:function C(T){const A=g[T.type];let W;return W=A?Q4.clone(dc[A].uniforms):T.uniforms,W},acquireProgram:function F(T,A){let W;for(let ie=0,ne=d.length;ie0?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 d(){for(let h=t,p=i.length;h1&&e.sort(h||hue),n.length>1&&n.sort(p||D5),r.length>1&&r.sort(p||D5)}}}function fue(){let i=new WeakMap;return{get:function t(n,r){const s=i.get(n);let o;return void 0===s?(o=new T5,i.set(n,[o])):r>=s.length?(o=new T5,s.push(o)):o=s[r],o},dispose:function e(){i=new WeakMap}}}function pue(){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 O,color:new qe};break;case"SpotLight":e={position:new O,direction:new O,color:new qe,distance:0,coneCos:0,penumbraCos:0,decay:0};break;case"PointLight":e={position:new O,color:new qe,distance:0,decay:0};break;case"HemisphereLight":e={direction:new O,skyColor:new qe,groundColor:new qe};break;case"RectAreaLight":e={color:new qe,position:new O,halfWidth:new O,halfHeight:new O}}return i[t.id]=e,e}}}let gue=0;function _ue(i,t){return(t.castShadow?2:0)-(i.castShadow?2:0)+(t.map?1:0)-(i.map?1:0)}function vue(i){const t=new pue,e=function mue(){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={shadowIntensity:1,shadowBias:0,shadowNormalBias:0,shadowRadius:1,shadowMapSize:new xe};break;case"PointLight":e={shadowIntensity:1,shadowBias:0,shadowNormalBias:0,shadowRadius:1,shadowMapSize:new xe,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 O);const r=new O,s=new Bt,o=new Bt;return{setup:function a(c){let d=0,h=0,p=0;for(let T=0;T<9;T++)n.probe[T].set(0,0,0);let m=0,g=0,b=0,v=0,y=0,M=0,x=0,C=0,F=0,D=0,k=0;c.sort(_ue);for(let T=0,A=c.length;T0&&(!0===i.has("OES_texture_float_linear")?(n.rectAreaLTC1=Je.LTC_FLOAT_1,n.rectAreaLTC2=Je.LTC_FLOAT_2):(n.rectAreaLTC1=Je.LTC_HALF_1,n.rectAreaLTC2=Je.LTC_HALF_2)),n.ambient[0]=d,n.ambient[1]=h,n.ambient[2]=p;const B=n.hash;(B.directionalLength!==m||B.pointLength!==g||B.spotLength!==b||B.rectAreaLength!==v||B.hemiLength!==y||B.numDirectionalShadows!==M||B.numPointShadows!==x||B.numSpotShadows!==C||B.numSpotMaps!==F||B.numLightProbes!==k)&&(n.directional.length=m,n.spot.length=b,n.rectArea.length=v,n.point.length=g,n.hemi.length=y,n.directionalShadow.length=M,n.directionalShadowMap.length=M,n.pointShadow.length=x,n.pointShadowMap.length=x,n.spotShadow.length=C,n.spotShadowMap.length=C,n.directionalShadowMatrix.length=M,n.pointShadowMatrix.length=x,n.spotLightMatrix.length=C+F-D,n.spotLightMap.length=F,n.numSpotLightShadowsWithMaps=D,n.numLightProbes=k,B.directionalLength=m,B.pointLength=g,B.spotLength=b,B.rectAreaLength=v,B.hemiLength=y,B.numDirectionalShadows=M,B.numPointShadows=x,B.numSpotShadows=C,B.numSpotMaps=F,B.numLightProbes=k,n.version=gue++)},setupView:function l(c,d){let h=0,p=0,m=0,g=0,b=0;const v=d.matrixWorldInverse;for(let y=0,M=c.length;y=o.length?(a=new I5(i),o.push(a)):a=o[s],a},dispose:function n(){t=new WeakMap}}}class R5 extends Fo{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 k5 extends Fo{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 bue="void main() {\n\tgl_Position = vec4( position, 1.0 );\n}",xue="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 wue(i,t,e){let n=new oS;const r=new xe,s=new xe,o=new _i,a=new R5({depthPacking:Loe}),l=new k5,c={},d=e.maxTextureSize,h={[lc]:ko,[ko]:lc,[Ns]:Ns},p=new Sl({defines:{VSM_SAMPLES:8},uniforms:{shadow_pass:{value:null},resolution:{value:new xe},radius:{value:4}},vertexShader:bue,fragmentShader:xue}),m=p.clone();m.defines.HORIZONTAL_PASS=1;const g=new hn;g.setAttribute("position",new Hi(new Float32Array([-1,-1,.5,3,-1,.5,-1,3,.5]),3));const b=new Mn(g,p),v=this;this.enabled=!1,this.autoUpdate=!0,this.needsUpdate=!1,this.type=l4;let y=this.type;function M(D,k){const B=t.update(b);p.defines.VSM_SAMPLES!==D.blurSamples&&(p.defines.VSM_SAMPLES=D.blurSamples,m.defines.VSM_SAMPLES=D.blurSamples,p.needsUpdate=!0,m.needsUpdate=!0),null===D.mapPass&&(D.mapPass=new Mu(r.x,r.y)),p.uniforms.shadow_pass.value=D.map.texture,p.uniforms.resolution.value=D.mapSize,p.uniforms.radius.value=D.radius,i.setRenderTarget(D.mapPass),i.clear(),i.renderBufferDirect(k,null,B,p,b,null),m.uniforms.shadow_pass.value=D.mapPass.texture,m.uniforms.resolution.value=D.mapSize,m.uniforms.radius.value=D.radius,i.setRenderTarget(D.map),i.clear(),i.renderBufferDirect(k,null,B,m,b,null)}function x(D,k,B,T){let A=null;const W=!0===B.isPointLight?D.customDistanceMaterial:D.customDepthMaterial;if(void 0!==W)A=W;else if(A=!0===B.isPointLight?l:a,i.localClippingEnabled&&!0===k.clipShadows&&Array.isArray(k.clippingPlanes)&&0!==k.clippingPlanes.length||k.displacementMap&&0!==k.displacementScale||k.alphaMap&&k.alphaTest>0||k.map&&k.alphaTest>0){const ie=A.uuid,ne=k.uuid;let oe=c[ie];void 0===oe&&(oe={},c[ie]=oe);let ge=oe[ne];void 0===ge&&(ge=A.clone(),oe[ne]=ge,k.addEventListener("dispose",F)),A=ge}return A.visible=k.visible,A.wireframe=k.wireframe,A.side=T===Qc?null!==k.shadowSide?k.shadowSide:k.side:null!==k.shadowSide?k.shadowSide:h[k.side],A.alphaMap=k.alphaMap,A.alphaTest=k.alphaTest,A.map=k.map,A.clipShadows=k.clipShadows,A.clippingPlanes=k.clippingPlanes,A.clipIntersection=k.clipIntersection,A.displacementMap=k.displacementMap,A.displacementScale=k.displacementScale,A.displacementBias=k.displacementBias,A.wireframeLinewidth=k.wireframeLinewidth,A.linewidth=k.linewidth,!0===B.isPointLight&&!0===A.isMeshDistanceMaterial&&(i.properties.get(A).light=B),A}function C(D,k,B,T,A){if(!1===D.visible)return;if(D.layers.test(k.layers)&&(D.isMesh||D.isLine||D.isPoints)&&(D.castShadow||D.receiveShadow&&A===Qc)&&(!D.frustumCulled||n.intersectsObject(D))){D.modelViewMatrix.multiplyMatrices(B.matrixWorldInverse,D.matrixWorld);const ne=t.update(D),oe=D.material;if(Array.isArray(oe)){const ge=ne.groups;for(let q=0,se=ge.length;qd||r.y>d)&&(r.x>d&&(s.x=Math.floor(d/we.x),r.x=s.x*we.x,J.mapSize.x=s.x),r.y>d&&(s.y=Math.floor(d/we.y),r.y=s.y*we.y,J.mapSize.y=s.y)),null===J.map||!0===ne||!0===oe){const Ye=this.type!==Qc?{minFilter:vr,magFilter:vr}:{};null!==J.map&&J.map.dispose(),J.map=new Mu(r.x,r.y,Ye),J.map.texture.name=se.name+".shadowMap",J.camera.updateProjectionMatrix()}i.setRenderTarget(J.map),i.clear();const Ve=J.getViewportCount();for(let Ye=0;Ye=1):-1!==se.indexOf("OpenGL ES")&&(q=parseFloat(/^OpenGL ES (\d)/.exec(se)[1]),ge=q>=2);let J=null,we={};const Ve=i.getParameter(i.SCISSOR_BOX),Ye=i.getParameter(i.VIEWPORT),Rt=(new _i).fromArray(Ve),nn=(new _i).fromArray(Ye);function le(Z,We,Ce,Ee){const Ke=new Uint8Array(4),rn=i.createTexture();i.bindTexture(Z,rn),i.texParameteri(Z,i.TEXTURE_MIN_FILTER,i.NEAREST),i.texParameteri(Z,i.TEXTURE_MAG_FILTER,i.NEAREST);for(let ti=0;ti"u")&&/OculusBrowser/g.test(navigator.userAgent),c=new xe,d=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(H,R){return m?new OffscreenCanvas(H,R):Mb("canvas")}function b(H,R,de){let ke=1;const De=_t(H);if((De.width>de||De.height>de)&&(ke=de/Math.max(De.width,De.height)),ke<1){if(typeof HTMLImageElement<"u"&&H instanceof HTMLImageElement||typeof HTMLCanvasElement<"u"&&H instanceof HTMLCanvasElement||typeof ImageBitmap<"u"&&H instanceof ImageBitmap||typeof VideoFrame<"u"&&H instanceof VideoFrame){const Ae=Math.floor(ke*De.width),Ut=Math.floor(ke*De.height);void 0===h&&(h=g(Ae,Ut));const et=R?g(Ae,Ut):h;return et.width=Ae,et.height=Ut,et.getContext("2d").drawImage(H,0,0,Ae,Ut),console.warn("THREE.WebGLRenderer: Texture has been resized from ("+De.width+"x"+De.height+") to ("+Ae+"x"+Ut+")."),et}return"data"in H&&console.warn("THREE.WebGLRenderer: Image in DataTexture is too big ("+De.width+"x"+De.height+")."),H}return H}function v(H){return H.generateMipmaps&&H.minFilter!==vr&&H.minFilter!==cr}function y(H){i.generateMipmap(H)}function M(H,R,de,ke,De=!1){if(null!==H){if(void 0!==i[H])return i[H];console.warn("THREE.WebGLRenderer: Attempt to use non-existing WebGL internal format '"+H+"'")}let Ae=R;if(R===i.RED&&(de===i.FLOAT&&(Ae=i.R32F),de===i.HALF_FLOAT&&(Ae=i.R16F),de===i.UNSIGNED_BYTE&&(Ae=i.R8)),R===i.RED_INTEGER&&(de===i.UNSIGNED_BYTE&&(Ae=i.R8UI),de===i.UNSIGNED_SHORT&&(Ae=i.R16UI),de===i.UNSIGNED_INT&&(Ae=i.R32UI),de===i.BYTE&&(Ae=i.R8I),de===i.SHORT&&(Ae=i.R16I),de===i.INT&&(Ae=i.R32I)),R===i.RG&&(de===i.FLOAT&&(Ae=i.RG32F),de===i.HALF_FLOAT&&(Ae=i.RG16F),de===i.UNSIGNED_BYTE&&(Ae=i.RG8)),R===i.RG_INTEGER&&(de===i.UNSIGNED_BYTE&&(Ae=i.RG8UI),de===i.UNSIGNED_SHORT&&(Ae=i.RG16UI),de===i.UNSIGNED_INT&&(Ae=i.RG32UI),de===i.BYTE&&(Ae=i.RG8I),de===i.SHORT&&(Ae=i.RG16I),de===i.INT&&(Ae=i.RG32I)),R===i.RGB&&de===i.UNSIGNED_INT_5_9_9_9_REV&&(Ae=i.RGB9_E5),R===i.RGBA){const Ut=De?LC:ei.getTransfer(ke);de===i.FLOAT&&(Ae=i.RGBA32F),de===i.HALF_FLOAT&&(Ae=i.RGBA16F),de===i.UNSIGNED_BYTE&&(Ae=Ut===Fi?i.SRGB8_ALPHA8:i.RGBA8),de===i.UNSIGNED_SHORT_4_4_4_4&&(Ae=i.RGBA4),de===i.UNSIGNED_SHORT_5_5_5_1&&(Ae=i.RGB5_A1)}return(Ae===i.R16F||Ae===i.R32F||Ae===i.RG16F||Ae===i.RG32F||Ae===i.RGBA16F||Ae===i.RGBA32F)&&t.get("EXT_color_buffer_float"),Ae}function x(H,R){let de;return H?null===R||R===xu||R===eg?de=i.DEPTH24_STENCIL8:R===ea?de=i.DEPTH32F_STENCIL8:R===yb&&(de=i.DEPTH24_STENCIL8,console.warn("DepthTexture: 16 bit depth attachment is not supported with stencil. Using 24-bit attachment.")):null===R||R===xu||R===eg?de=i.DEPTH_COMPONENT24:R===ea?de=i.DEPTH_COMPONENT32F:R===yb&&(de=i.DEPTH_COMPONENT16),de}function C(H,R){return!0===v(H)||H.isFramebufferTexture&&H.minFilter!==vr&&H.minFilter!==cr?Math.log2(Math.max(R.width,R.height))+1:void 0!==H.mipmaps&&H.mipmaps.length>0?H.mipmaps.length:H.isCompressedTexture&&Array.isArray(H.image)?R.mipmaps.length:1}function F(H){const R=H.target;R.removeEventListener("dispose",F),function k(H){const R=n.get(H);if(void 0===R.__webglInit)return;const de=H.source,ke=p.get(de);if(ke){const De=ke[R.__cacheKey];De.usedTimes--,0===De.usedTimes&&B(H),0===Object.keys(ke).length&&p.delete(de)}n.remove(H)}(R),R.isVideoTexture&&d.delete(R)}function D(H){const R=H.target;R.removeEventListener("dispose",D),function T(H){const R=n.get(H);if(H.depthTexture&&H.depthTexture.dispose(),H.isWebGLCubeRenderTarget)for(let ke=0;ke<6;ke++){if(Array.isArray(R.__webglFramebuffer[ke]))for(let De=0;De0&&de.__version!==H.version){const ke=H.image;if(null===ke)console.warn("THREE.WebGLRenderer: Texture marked for update but no image data found.");else{if(!1!==ke.complete)return void nn(de,H,R);console.warn("THREE.WebGLRenderer: Texture marked for update but image is incomplete")}}e.bindTexture(i.TEXTURE_2D,de.__webglTexture,i.TEXTURE0+R)}const J={[Bs]:i.REPEAT,[er]:i.CLAMP_TO_EDGE,[_b]:i.MIRRORED_REPEAT},we={[vr]:i.NEAREST,[uk]:i.NEAREST_MIPMAP_NEAREST,[Qm]:i.NEAREST_MIPMAP_LINEAR,[cr]:i.LINEAR,[vb]:i.LINEAR_MIPMAP_NEAREST,[xl]:i.LINEAR_MIPMAP_LINEAR},Ve={[Boe]:i.NEVER,[Goe]:i.ALWAYS,[Uoe]:i.LESS,[E4]:i.LEQUAL,[Voe]:i.EQUAL,[$oe]:i.GEQUAL,[zoe]:i.GREATER,[Hoe]:i.NOTEQUAL};function Ye(H,R){if(R.type===ea&&!1===t.has("OES_texture_float_linear")&&(R.magFilter===cr||R.magFilter===vb||R.magFilter===Qm||R.magFilter===xl||R.minFilter===cr||R.minFilter===vb||R.minFilter===Qm||R.minFilter===xl)&&console.warn("THREE.WebGLRenderer: Unable to use linear filtering with floating point textures. OES_texture_float_linear not supported on this device."),i.texParameteri(H,i.TEXTURE_WRAP_S,J[R.wrapS]),i.texParameteri(H,i.TEXTURE_WRAP_T,J[R.wrapT]),(H===i.TEXTURE_3D||H===i.TEXTURE_2D_ARRAY)&&i.texParameteri(H,i.TEXTURE_WRAP_R,J[R.wrapR]),i.texParameteri(H,i.TEXTURE_MAG_FILTER,we[R.magFilter]),i.texParameteri(H,i.TEXTURE_MIN_FILTER,we[R.minFilter]),R.compareFunction&&(i.texParameteri(H,i.TEXTURE_COMPARE_MODE,i.COMPARE_REF_TO_TEXTURE),i.texParameteri(H,i.TEXTURE_COMPARE_FUNC,Ve[R.compareFunction])),!0===t.has("EXT_texture_filter_anisotropic")){if(R.magFilter===vr||R.minFilter!==Qm&&R.minFilter!==xl||R.type===ea&&!1===t.has("OES_texture_float_linear"))return;if(R.anisotropy>1||n.get(R).__currentAnisotropy){const de=t.get("EXT_texture_filter_anisotropic");i.texParameterf(H,de.TEXTURE_MAX_ANISOTROPY_EXT,Math.min(R.anisotropy,r.getMaxAnisotropy())),n.get(R).__currentAnisotropy=R.anisotropy}}}function Rt(H,R){let de=!1;void 0===H.__webglInit&&(H.__webglInit=!0,R.addEventListener("dispose",F));const ke=R.source;let De=p.get(ke);void 0===De&&(De={},p.set(ke,De));const Ae=function ne(H){const R=[];return R.push(H.wrapS),R.push(H.wrapT),R.push(H.wrapR||0),R.push(H.magFilter),R.push(H.minFilter),R.push(H.anisotropy),R.push(H.internalFormat),R.push(H.format),R.push(H.type),R.push(H.generateMipmaps),R.push(H.premultiplyAlpha),R.push(H.flipY),R.push(H.unpackAlignment),R.push(H.colorSpace),R.join()}(R);if(Ae!==H.__cacheKey){void 0===De[Ae]&&(De[Ae]={texture:i.createTexture(),usedTimes:0},o.memory.textures++,de=!0),De[Ae].usedTimes++;const Ut=De[H.__cacheKey];void 0!==Ut&&(De[H.__cacheKey].usedTimes--,0===Ut.usedTimes&&B(R)),H.__cacheKey=Ae,H.__webglTexture=De[Ae].texture}return de}function nn(H,R,de){let ke=i.TEXTURE_2D;(R.isDataArrayTexture||R.isCompressedArrayTexture)&&(ke=i.TEXTURE_2D_ARRAY),R.isData3DTexture&&(ke=i.TEXTURE_3D);const De=Rt(H,R),Ae=R.source;e.bindTexture(ke,H.__webglTexture,i.TEXTURE0+de);const Ut=n.get(Ae);if(Ae.version!==Ut.__version||!0===De){e.activeTexture(i.TEXTURE0+de);const et=ei.getPrimaries(ei.workingColorSpace),pt=R.colorSpace===wu?null:ei.getPrimaries(R.colorSpace),bn=R.colorSpace===wu||et===pt?i.NONE:i.BROWSER_DEFAULT_WEBGL;i.pixelStorei(i.UNPACK_FLIP_Y_WEBGL,R.flipY),i.pixelStorei(i.UNPACK_PREMULTIPLY_ALPHA_WEBGL,R.premultiplyAlpha),i.pixelStorei(i.UNPACK_ALIGNMENT,R.unpackAlignment),i.pixelStorei(i.UNPACK_COLORSPACE_CONVERSION_WEBGL,bn);let He=b(R.image,!1,r.maxTextureSize);He=rt(R,He);const ft=s.convert(R.format,R.colorSpace),Yn=s.convert(R.type);let yt,cn=M(R.internalFormat,ft,Yn,R.colorSpace,R.isVideoTexture);Ye(ke,R);const vn=R.mipmaps,Pn=!0!==R.isVideoTexture,Ki=void 0===Ut.__version||!0===De,Z=Ae.dataReady,We=C(R,He);if(R.isDepthTexture)cn=x(R.format===ng,R.type),Ki&&(Pn?e.texStorage2D(i.TEXTURE_2D,1,cn,He.width,He.height):e.texImage2D(i.TEXTURE_2D,0,cn,He.width,He.height,0,ft,Yn,null));else if(R.isDataTexture)if(vn.length>0){Pn&&Ki&&e.texStorage2D(i.TEXTURE_2D,We,cn,vn[0].width,vn[0].height);for(let Ce=0,Ee=vn.length;Ce0){const Ke=CP(yt.width,yt.height,R.format,R.type);for(const rn of R.layerUpdates){const ti=yt.data.subarray(rn*Ke/yt.data.BYTES_PER_ELEMENT,(rn+1)*Ke/yt.data.BYTES_PER_ELEMENT);e.compressedTexSubImage3D(i.TEXTURE_2D_ARRAY,Ce,0,0,rn,yt.width,yt.height,1,ft,ti,0,0)}R.clearLayerUpdates()}else e.compressedTexSubImage3D(i.TEXTURE_2D_ARRAY,Ce,0,0,0,yt.width,yt.height,He.depth,ft,yt.data,0,0)}else e.compressedTexImage3D(i.TEXTURE_2D_ARRAY,Ce,cn,yt.width,yt.height,He.depth,0,yt.data,0,0);else console.warn("THREE.WebGLRenderer: Attempt to load unsupported compressed texture format in .uploadTexture()");else Pn?Z&&e.texSubImage3D(i.TEXTURE_2D_ARRAY,Ce,0,0,0,yt.width,yt.height,He.depth,ft,Yn,yt.data):e.texImage3D(i.TEXTURE_2D_ARRAY,Ce,cn,yt.width,yt.height,He.depth,0,ft,Yn,yt.data)}else{Pn&&Ki&&e.texStorage2D(i.TEXTURE_2D,We,cn,vn[0].width,vn[0].height);for(let Ce=0,Ee=vn.length;Ce0){const Ce=CP(He.width,He.height,R.format,R.type);for(const Ee of R.layerUpdates){const Ke=He.data.subarray(Ee*Ce/He.data.BYTES_PER_ELEMENT,(Ee+1)*Ce/He.data.BYTES_PER_ELEMENT);e.texSubImage3D(i.TEXTURE_2D_ARRAY,0,0,0,Ee,He.width,He.height,1,ft,Yn,Ke)}R.clearLayerUpdates()}else e.texSubImage3D(i.TEXTURE_2D_ARRAY,0,0,0,0,He.width,He.height,He.depth,ft,Yn,He.data)}else e.texImage3D(i.TEXTURE_2D_ARRAY,0,cn,He.width,He.height,He.depth,0,ft,Yn,He.data);else if(R.isData3DTexture)Pn?(Ki&&e.texStorage3D(i.TEXTURE_3D,We,cn,He.width,He.height,He.depth),Z&&e.texSubImage3D(i.TEXTURE_3D,0,0,0,0,He.width,He.height,He.depth,ft,Yn,He.data)):e.texImage3D(i.TEXTURE_3D,0,cn,He.width,He.height,He.depth,0,ft,Yn,He.data);else if(R.isFramebufferTexture){if(Ki)if(Pn)e.texStorage2D(i.TEXTURE_2D,We,cn,He.width,He.height);else{let Ce=He.width,Ee=He.height;for(let Ke=0;Ke>=1,Ee>>=1}}else if(vn.length>0){if(Pn&&Ki){const Ce=_t(vn[0]);e.texStorage2D(i.TEXTURE_2D,We,cn,Ce.width,Ce.height)}for(let Ce=0,Ee=vn.length;Ce>Ae),ft=Math.max(1,R.height>>Ae);De===i.TEXTURE_3D||De===i.TEXTURE_2D_ARRAY?e.texImage3D(De,Ae,pt,He,ft,R.depth,0,Ut,et,null):e.texImage2D(De,Ae,pt,He,ft,0,Ut,et,null)}e.bindFramebuffer(i.FRAMEBUFFER,H),Me(R)?a.framebufferTexture2DMultisampleEXT(i.FRAMEBUFFER,ke,De,n.get(de).__webglTexture,0,it(R)):(De===i.TEXTURE_2D||De>=i.TEXTURE_CUBE_MAP_POSITIVE_X&&De<=i.TEXTURE_CUBE_MAP_NEGATIVE_Z)&&i.framebufferTexture2D(i.FRAMEBUFFER,ke,De,n.get(de).__webglTexture,Ae),e.bindFramebuffer(i.FRAMEBUFFER,null)}function Ze(H,R,de){if(i.bindRenderbuffer(i.RENDERBUFFER,H),R.depthBuffer){const ke=R.depthTexture,Ae=x(R.stencilBuffer,ke&&ke.isDepthTexture?ke.type:null),Ut=R.stencilBuffer?i.DEPTH_STENCIL_ATTACHMENT:i.DEPTH_ATTACHMENT,et=it(R);Me(R)?a.renderbufferStorageMultisampleEXT(i.RENDERBUFFER,et,Ae,R.width,R.height):de?i.renderbufferStorageMultisample(i.RENDERBUFFER,et,Ae,R.width,R.height):i.renderbufferStorage(i.RENDERBUFFER,Ae,R.width,R.height),i.framebufferRenderbuffer(i.FRAMEBUFFER,Ut,i.RENDERBUFFER,H)}else{const ke=R.textures;for(let De=0;De0&&!0===t.has("WEBGL_multisampled_render_to_texture")&&!1!==R.__useRenderToTexture}function rt(H,R){const de=H.colorSpace,ke=H.format,De=H.type;return!0===H.isCompressedTexture||!0===H.isVideoTexture||de!==ds&&de!==wu&&(ei.getTransfer(de)===Fi?(ke!==Po||De!==ed)&&console.warn("THREE.WebGLTextures: sRGB encoded textures have to use RGBAFormat and UnsignedByteType."):console.error("THREE.WebGLTextures: Unsupported texture color space:",de)),R}function _t(H){return typeof HTMLImageElement<"u"&&H instanceof HTMLImageElement?(c.width=H.naturalWidth||H.width,c.height=H.naturalHeight||H.height):typeof VideoFrame<"u"&&H instanceof VideoFrame?(c.width=H.displayWidth,c.height=H.displayHeight):(c.width=H.width,c.height=H.height),c}this.allocateTextureUnit=function ie(){const H=A;return H>=r.maxTextures&&console.warn("THREE.WebGLTextures: Trying to use "+H+" texture units while this GPU supports only "+r.maxTextures),A+=1,H},this.resetTextureUnits=function W(){A=0},this.setTexture2D=oe,this.setTexture2DArray=function ge(H,R){const de=n.get(H);H.version>0&&de.__version!==H.version?nn(de,H,R):e.bindTexture(i.TEXTURE_2D_ARRAY,de.__webglTexture,i.TEXTURE0+R)},this.setTexture3D=function q(H,R){const de=n.get(H);H.version>0&&de.__version!==H.version?nn(de,H,R):e.bindTexture(i.TEXTURE_3D,de.__webglTexture,i.TEXTURE0+R)},this.setTextureCube=function se(H,R){const de=n.get(H);H.version>0&&de.__version!==H.version?function le(H,R,de){if(6!==R.image.length)return;const ke=Rt(H,R),De=R.source;e.bindTexture(i.TEXTURE_CUBE_MAP,H.__webglTexture,i.TEXTURE0+de);const Ae=n.get(De);if(De.version!==Ae.__version||!0===ke){e.activeTexture(i.TEXTURE0+de);const Ut=ei.getPrimaries(ei.workingColorSpace),et=R.colorSpace===wu?null:ei.getPrimaries(R.colorSpace),pt=R.colorSpace===wu||Ut===et?i.NONE:i.BROWSER_DEFAULT_WEBGL;i.pixelStorei(i.UNPACK_FLIP_Y_WEBGL,R.flipY),i.pixelStorei(i.UNPACK_PREMULTIPLY_ALPHA_WEBGL,R.premultiplyAlpha),i.pixelStorei(i.UNPACK_ALIGNMENT,R.unpackAlignment),i.pixelStorei(i.UNPACK_COLORSPACE_CONVERSION_WEBGL,pt);const bn=R.isCompressedTexture||R.image[0].isCompressedTexture,He=R.image[0]&&R.image[0].isDataTexture,ft=[];for(let Ee=0;Ee<6;Ee++)ft[Ee]=bn||He?He?R.image[Ee].image:R.image[Ee]:b(R.image[Ee],!0,r.maxCubemapSize),ft[Ee]=rt(R,ft[Ee]);const Yn=ft[0],cn=s.convert(R.format,R.colorSpace),yt=s.convert(R.type),vn=M(R.internalFormat,cn,yt,R.colorSpace),Pn=!0!==R.isVideoTexture,Ki=void 0===Ae.__version||!0===ke,Z=De.dataReady;let Ce,We=C(R,Yn);if(Ye(i.TEXTURE_CUBE_MAP,R),bn){Pn&&Ki&&e.texStorage2D(i.TEXTURE_CUBE_MAP,We,vn,Yn.width,Yn.height);for(let Ee=0;Ee<6;Ee++){Ce=ft[Ee].mipmaps;for(let Ke=0;Ke0&&We++;const Ee=_t(ft[0]);e.texStorage2D(i.TEXTURE_CUBE_MAP,We,vn,Ee.width,Ee.height)}for(let Ee=0;Ee<6;Ee++)if(He){Pn?Z&&e.texSubImage2D(i.TEXTURE_CUBE_MAP_POSITIVE_X+Ee,0,0,0,ft[Ee].width,ft[Ee].height,cn,yt,ft[Ee].data):e.texImage2D(i.TEXTURE_CUBE_MAP_POSITIVE_X+Ee,0,vn,ft[Ee].width,ft[Ee].height,0,cn,yt,ft[Ee].data);for(let Ke=0;Ke1;if(Ut||(void 0===ke.__webglTexture&&(ke.__webglTexture=i.createTexture()),ke.__version=R.version,o.memory.textures++),Ae){de.__webglFramebuffer=[];for(let et=0;et<6;et++)if(R.mipmaps&&R.mipmaps.length>0){de.__webglFramebuffer[et]=[];for(let pt=0;pt0){de.__webglFramebuffer=[];for(let et=0;et0&&!1===Me(H)){de.__webglMultisampledFramebuffer=i.createFramebuffer(),de.__webglColorRenderbuffer=[],e.bindFramebuffer(i.FRAMEBUFFER,de.__webglMultisampledFramebuffer);for(let et=0;et0)for(let pt=0;pt0)for(let pt=0;pt0)if(!1===Me(H)){const R=H.textures,de=H.width,ke=H.height;let De=i.COLOR_BUFFER_BIT;const Ae=H.stencilBuffer?i.DEPTH_STENCIL_ATTACHMENT:i.DEPTH_ATTACHMENT,Ut=n.get(H),et=R.length>1;if(et)for(let pt=0;ptm+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(Rue)))}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 No;n.matrixAutoUpdate=!1,n.visible=!1,t.joints[e.jointName]=n,t.add(n)}return t.joints[e.jointName]}}class Oue{constructor(){this.texture=null,this.mesh=null,this.depthNear=0,this.depthFar=0}init(t,e,n){if(null===this.texture){const r=new Oo;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}}getMesh(t){if(null!==this.texture&&null===this.mesh){const e=t.cameras[0].viewport,n=new Sl({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:e.z},depthHeight:{value:e.w}}});this.mesh=new Mn(new Iu(20,20),n)}return this.mesh}reset(){this.texture=null,this.mesh=null}getDepthTexture(){return this.texture}}class Fue extends og{constructor(t,e){super();const n=this;let r=null,s=1,o=null,a="local-floor",l=1,c=null,d=null,h=null,p=null,m=null,g=null;const b=new Oue,v=e.getContextAttributes();let y=null,M=null;const x=[],C=[],F=new xe;let D=null;const k=new br;k.layers.enable(1),k.viewport=new _i;const B=new br;B.layers.enable(2),B.viewport=new _i;const T=[k,B],A=new Iue;A.layers.enable(1),A.layers.enable(2);let W=null,ie=null;function ne(le){const Fe=C.indexOf(le.inputSource);if(-1===Fe)return;const Ze=x[Fe];void 0!==Ze&&(Ze.update(le.inputSource,le.frame,c||o),Ze.dispatchEvent({type:le.type,data:le.inputSource}))}function oe(){r.removeEventListener("select",ne),r.removeEventListener("selectstart",ne),r.removeEventListener("selectend",ne),r.removeEventListener("squeeze",ne),r.removeEventListener("squeezestart",ne),r.removeEventListener("squeezeend",ne),r.removeEventListener("end",oe),r.removeEventListener("inputsourceschange",ge);for(let le=0;le=0&&(C[Le]=null,x[Le].disconnect(Ze))}for(let Fe=0;Fe=C.length){C.push(Ze),Le=Tt;break}if(null===C[Tt]){C[Tt]=Ze,Le=Tt;break}}if(-1===Le)break}const wt=x[Le];wt&&wt.connect(Ze)}}this.cameraAutoUpdate=!0,this.enabled=!1,this.isPresenting=!1,this.getController=function(le){let Fe=x[le];return void 0===Fe&&(Fe=new SP,x[le]=Fe),Fe.getTargetRaySpace()},this.getControllerGrip=function(le){let Fe=x[le];return void 0===Fe&&(Fe=new SP,x[le]=Fe),Fe.getGripSpace()},this.getHand=function(le){let Fe=x[le];return void 0===Fe&&(Fe=new SP,x[le]=Fe),Fe.getHandSpace()},this.setFramebufferScaleFactor=function(le){s=le,!0===n.isPresenting&&console.warn("THREE.WebXRManager: Cannot change framebuffer scale while presenting.")},this.setReferenceSpaceType=function(le){a=le,!0===n.isPresenting&&console.warn("THREE.WebXRManager: Cannot change reference space type while presenting.")},this.getReferenceSpace=function(){return c||o},this.setReferenceSpace=function(le){c=le},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 le=nt(function*(Fe){if(r=Fe,null!==r){if(y=t.getRenderTarget(),r.addEventListener("select",ne),r.addEventListener("selectstart",ne),r.addEventListener("selectend",ne),r.addEventListener("squeeze",ne),r.addEventListener("squeezestart",ne),r.addEventListener("squeezeend",ne),r.addEventListener("end",oe),r.addEventListener("inputsourceschange",ge),!0!==v.xrCompatible&&(yield e.makeXRCompatible()),D=t.getPixelRatio(),t.getSize(F),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 Mu(m.framebufferWidth,m.framebufferHeight,{format:Po,type:ed,colorSpace:t.outputColorSpace,stencilBuffer:v.stencil});else{let Ze=null,Le=null,wt=null;v.depth&&(wt=v.stencil?e.DEPTH24_STENCIL8:e.DEPTH_COMPONENT24,Ze=v.stencil?ng:tg,Le=v.stencil?eg:xu);const Tt={colorFormat:e.RGBA8,depthFormat:wt,scaleFactor:s};h=new XRWebGLBinding(r,e),p=h.createProjectionLayer(Tt),r.updateRenderState({layers:[p]}),t.setPixelRatio(1),t.setSize(p.textureWidth,p.textureHeight,!1),M=new Mu(p.textureWidth,p.textureHeight,{format:Po,type:ed,depthTexture:new d5(p.textureWidth,p.textureHeight,Le,void 0,void 0,void 0,void 0,void 0,void 0,Ze),stencilBuffer:v.stencil,colorSpace:t.outputColorSpace,samples:v.antialias?4:0,resolveDepthBuffer:!1===p.ignoreDepthValues})}M.isXRRenderTarget=!0,this.setFoveation(l),c=null,o=yield r.requestReferenceSpace(a),nn.setContext(r),nn.start(),n.isPresenting=!0,n.dispatchEvent({type:"sessionstart"})}});return function(Fe){return le.apply(this,arguments)}}(),this.getEnvironmentBlendMode=function(){if(null!==r)return r.environmentBlendMode},this.getDepthTexture=function(){return b.getDepthTexture()};const q=new O,se=new O;function we(le,Fe){null===Fe?le.matrixWorld.copy(le.matrix):le.matrixWorld.multiplyMatrices(Fe.matrixWorld,le.matrix),le.matrixWorldInverse.copy(le.matrixWorld).invert()}this.updateCamera=function(le){if(null===r)return;null!==b.texture&&(le.near=b.depthNear,le.far=b.depthFar),A.near=B.near=k.near=le.near,A.far=B.far=k.far=le.far,(W!==A.near||ie!==A.far)&&(r.updateRenderState({depthNear:A.near,depthFar:A.far}),W=A.near,ie=A.far,k.near=W,k.far=ie,B.near=W,B.far=ie,k.updateProjectionMatrix(),B.updateProjectionMatrix(),le.updateProjectionMatrix());const Fe=le.parent,Ze=A.cameras;we(A,Fe);for(let Le=0;Le0&&(v.alphaTest.value=y.alphaTest);const M=t.get(y),x=M.envMap,C=M.envMapRotation;x&&(v.envMap.value=x,hf.copy(C),hf.x*=-1,hf.y*=-1,hf.z*=-1,x.isCubeTexture&&!1===x.isRenderTargetTexture&&(hf.y*=-1,hf.z*=-1),v.envMapRotation.value.setFromMatrix4(Lue.makeRotationFromEuler(hf)),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,v.lightMapIntensity.value=y.lightMapIntensity,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,Z4(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 d(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===ko&&v.clearcoatNormalScale.value.negate())),y.dispersion>0&&(v.dispersion.value=y.dispersion),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 Bue(i,t,e,n){let r={},s={},o=[];const a=i.getParameter(i.MAX_UNIFORM_BUFFER_BINDINGS);function m(M,x,C,F){const D=M.value,k=x+"_"+C;if(void 0===F[k])return F[k]="number"==typeof D||"boolean"==typeof D?D:D.clone(),!0;{const B=F[k];if("number"==typeof D||"boolean"==typeof D){if(B!==D)return F[k]=D,!0}else if(!1===B.equals(D))return B.copy(D),!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 k=0,B=x.length;k0&&(C+=16-D),M.__size=C,M.__cache={}}(M),C=function d(M){const x=function h(){for(let M=0;M0),Zt=!!ce.morphAttributes.position,li=!!ce.morphAttributes.normal,Li=!!ce.morphAttributes.color;let ir=bu;ue.toneMapped&&(null===k||!0===k.isXRRenderTarget)&&(ir=x.toneMapping);const la=ce.morphAttributes.position||ce.morphAttributes.normal||ce.morphAttributes.color,fi=void 0!==la?la.length:0,kt=rt.get(ue),fs=v.state.lights;!0!==le||!0!==Fe&&L===T||bn.setState(ue,L,L===T&&ue.id===B);let pi=!1;ue.version===kt.__version?(kt.needsLights&&kt.lightsStateVersion!==fs.state.version||kt.outputColorSpace!==Mt||te.isBatchedMesh&&!1===kt.batching||!te.isBatchedMesh&&!0===kt.batching||te.isBatchedMesh&&!0===kt.batchingColor&&null===te.colorTexture||te.isBatchedMesh&&!1===kt.batchingColor&&null!==te.colorTexture||te.isInstancedMesh&&!1===kt.instancing||!te.isInstancedMesh&&!0===kt.instancing||te.isSkinnedMesh&&!1===kt.skinning||!te.isSkinnedMesh&&!0===kt.skinning||te.isInstancedMesh&&!0===kt.instancingColor&&null===te.instanceColor||te.isInstancedMesh&&!1===kt.instancingColor&&null!==te.instanceColor||te.isInstancedMesh&&!0===kt.instancingMorph&&null===te.morphTexture||te.isInstancedMesh&&!1===kt.instancingMorph&&null!==te.morphTexture||kt.envMap!==Ct||!0===ue.fog&&kt.fog!==je||void 0!==kt.numClippingPlanes&&(kt.numClippingPlanes!==bn.numPlanes||kt.numIntersection!==bn.numIntersection)||kt.vertexAlphas!==Kt||kt.vertexTangents!==an||kt.morphTargets!==Zt||kt.morphNormals!==li||kt.morphColors!==Li||kt.toneMapping!==ir||kt.morphTargetsCount!==fi)&&(pi=!0):(pi=!0,kt.__version=ue.version);let Al=kt.currentProgram;!0===pi&&(Al=bE(ue,K,te));let qg=!1,ca=!1,XO=!1;const wr=Al.getUniforms(),Uu=kt.uniforms;if(Me.useProgram(Al.program)&&(qg=!0,ca=!0,XO=!0),ue.id!==B&&(B=ue.id,ca=!0),qg||T!==L){wr.setValue(N,"projectionMatrix",L.projectionMatrix),wr.setValue(N,"viewMatrix",L.matrixWorldInverse);const $a=wr.map.cameraPosition;void 0!==$a&&$a.setValue(N,Le.setFromMatrixPosition(L.matrixWorld)),it.logarithmicDepthBuffer&&wr.setValue(N,"logDepthBufFC",2/(Math.log(L.far+1)/Math.LN2)),(ue.isMeshPhongMaterial||ue.isMeshToonMaterial||ue.isMeshLambertMaterial||ue.isMeshBasicMaterial||ue.isMeshStandardMaterial||ue.isShaderMaterial)&&wr.setValue(N,"isOrthographic",!0===L.isOrthographicCamera),T!==L&&(T=L,ca=!0,XO=!0)}if(te.isSkinnedMesh){wr.setOptional(N,te,"bindMatrix"),wr.setOptional(N,te,"bindMatrixInverse");const $a=te.skeleton;$a&&(null===$a.boneTexture&&$a.computeBoneTexture(),wr.setValue(N,"boneTexture",$a.boneTexture,_t))}te.isBatchedMesh&&(wr.setOptional(N,te,"batchingTexture"),wr.setValue(N,"batchingTexture",te._matricesTexture,_t),wr.setOptional(N,te,"batchingIdTexture"),wr.setValue(N,"batchingIdTexture",te._indirectTexture,_t),wr.setOptional(N,te,"batchingColorTexture"),null!==te._colorsTexture&&wr.setValue(N,"batchingColorTexture",te._colorsTexture,_t));const KO=ce.morphAttributes;if((void 0!==KO.position||void 0!==KO.normal||void 0!==KO.color)&&Yn.update(te,ce,Al),(ca||kt.receiveShadow!==te.receiveShadow)&&(kt.receiveShadow=te.receiveShadow,wr.setValue(N,"receiveShadow",te.receiveShadow)),ue.isMeshGouraudMaterial&&null!==ue.envMap&&(Uu.envMap.value=Ct,Uu.flipEnvMap.value=Ct.isCubeTexture&&!1===Ct.isRenderTargetTexture?-1:1),ue.isMeshStandardMaterial&&null===ue.envMap&&null!==K.environment&&(Uu.envMapIntensity.value=K.environmentIntensity),ca&&(wr.setValue(N,"toneMappingExposure",x.toneMappingExposure),kt.needsLights&&function Gve(L,K){L.ambientLightColor.needsUpdate=K,L.lightProbe.needsUpdate=K,L.directionalLights.needsUpdate=K,L.directionalLightShadows.needsUpdate=K,L.pointLights.needsUpdate=K,L.pointLightShadows.needsUpdate=K,L.spotLights.needsUpdate=K,L.spotLightShadows.needsUpdate=K,L.rectAreaLights.needsUpdate=K,L.hemisphereLights.needsUpdate=K}(Uu,XO),je&&!0===ue.fog&&Ut.refreshFogUniforms(Uu,je),Ut.refreshMaterialUniforms(Uu,ue,se,q,v.state.transmissionRenderTarget[L.id]),dS.upload(N,_8(kt),Uu,_t)),ue.isShaderMaterial&&!0===ue.uniformsNeedUpdate&&(dS.upload(N,_8(kt),Uu,_t),ue.uniformsNeedUpdate=!1),ue.isSpriteMaterial&&wr.setValue(N,"center",te.center),wr.setValue(N,"modelViewMatrix",te.modelViewMatrix),wr.setValue(N,"normalMatrix",te.normalMatrix),wr.setValue(N,"modelMatrix",te.matrixWorld),ue.isShaderMaterial||ue.isRawShaderMaterial){const $a=ue.uniformsGroups;for(let ZO=0,jve=$a.length;ZO{function je(){ue.forEach(function(at){rt.get(at).currentProgram.isReady()&&ue.delete(at)}),0!==ue.size?setTimeout(je,10):te(L)}null!==Ne.get("KHR_parallel_shader_compile")?je():setTimeout(je,10)})};let hi=null;function pc(){Pf.stop()}function f8(){Pf.start()}const Pf=new t5;function qO(L,K,ce,ue){if(!1===L.visible)return;if(L.layers.test(K.layers))if(L.isGroup)ce=L.renderOrder;else if(L.isLOD)!0===L.autoUpdate&&L.update(K);else if(L.isLight)v.pushLight(L),L.castShadow&&v.pushShadow(L);else if(L.isSprite){if(!L.frustumCulled||nn.intersectsSprite(L)){ue&&wt.setFromMatrixPosition(L.matrixWorld).applyMatrix4(Ze);const at=De.update(L),Mt=L.material;Mt.visible&&b.push(L,at,Mt,ce,wt.z,null)}}else if((L.isMesh||L.isLine||L.isPoints)&&(!L.frustumCulled||nn.intersectsObject(L))){const at=De.update(L),Mt=L.material;if(ue&&(void 0!==L.boundingSphere?(null===L.boundingSphere&&L.computeBoundingSphere(),wt.copy(L.boundingSphere.center)):(null===at.boundingSphere&&at.computeBoundingSphere(),wt.copy(at.boundingSphere.center)),wt.applyMatrix4(L.matrixWorld).applyMatrix4(Ze)),Array.isArray(Mt)){const Ct=at.groups;for(let Kt=0,an=Ct.length;Kt0&&yE(te,K,ce),je.length>0&&yE(je,K,ce),at.length>0&&yE(at,K,ce),Me.buffers.depth.setTest(!0),Me.buffers.depth.setMask(!0),Me.buffers.color.setMask(!0),Me.setPolygonOffset(!1)}function m8(L,K,ce,ue){if(null!==(!0===ce.isScene?ce.overrideMaterial:null))return;void 0===v.state.transmissionRenderTarget[ue.id]&&(v.state.transmissionRenderTarget[ue.id]=new Mu(1,1,{generateMipmaps:!0,type:Ne.has("EXT_color_buffer_half_float")||Ne.has("EXT_color_buffer_float")?Jm:ed,minFilter:xl,samples:4,stencilBuffer:s,resolveDepthBuffer:!1,resolveStencilBuffer:!1,colorSpace:ei.workingColorSpace}));const je=v.state.transmissionRenderTarget[ue.id],at=ue.viewport||A;je.setSize(at.z,at.w);const Mt=x.getRenderTarget();x.setRenderTarget(je),x.getClearColor(ne),oe=x.getClearAlpha(),oe<1&&x.setClearColor(16777215,.5),x.clear(),St&&ft.render(ce);const Ct=x.toneMapping;x.toneMapping=bu;const Kt=ue.viewport;if(void 0!==ue.viewport&&(ue.viewport=void 0),v.setupLightsView(ue),!0===le&&bn.setGlobalState(x.clippingPlanes,ue),yE(L,ce,ue),_t.updateMultisampleRenderTarget(je),_t.updateRenderTargetMipmap(je),!1===Ne.has("WEBGL_multisampled_render_to_texture")){let an=!1;for(let Zt=0,li=K.length;Zt0)for(let at=0,Mt=je.length;at0&&m8(ue,te,L,K),St&&ft.render(L),p8(b,L,K);null!==k&&(_t.updateMultisampleRenderTarget(k),_t.updateRenderTargetMipmap(k)),!0===L.isScene&&L.onAfterRender(x,L,K),Pn.resetDefaultState(),B=-1,T=null,M.pop(),M.length>0?(v=M[M.length-1],!0===le&&bn.setGlobalState(x.clippingPlanes,v.state.camera)):v=null,y.pop(),b=y.length>0?y[y.length-1]:null},this.getActiveCubeFace=function(){return F},this.getActiveMipmapLevel=function(){return D},this.getRenderTarget=function(){return k},this.setRenderTargetTextures=function(L,K,ce){rt.get(L.texture).__webglTexture=K,rt.get(L.depthTexture).__webglTexture=ce;const ue=rt.get(L);ue.__hasExternalTextures=!0,ue.__autoAllocateDepthBuffer=void 0===ce,ue.__autoAllocateDepthBuffer||!0===Ne.has("WEBGL_multisampled_render_to_texture")&&(console.warn("THREE.WebGLRenderer: Render-to-texture extension was disabled because an external texture was provided"),ue.__useRenderToTexture=!1)},this.setRenderTargetFramebuffer=function(L,K){const ce=rt.get(L);ce.__webglFramebuffer=K,ce.__useDefaultFramebuffer=void 0===K},this.setRenderTarget=function(L,K=0,ce=0){k=L,F=K,D=ce;let ue=!0,te=null,je=!1,at=!1;if(L){const Ct=rt.get(L);void 0!==Ct.__useDefaultFramebuffer?(Me.bindFramebuffer(N.FRAMEBUFFER,null),ue=!1):void 0===Ct.__webglFramebuffer?_t.setupRenderTarget(L):Ct.__hasExternalTextures&&_t.rebindTextures(L,rt.get(L.texture).__webglTexture,rt.get(L.depthTexture).__webglTexture);const Kt=L.texture;(Kt.isData3DTexture||Kt.isDataArrayTexture||Kt.isCompressedArrayTexture)&&(at=!0);const an=rt.get(L).__webglFramebuffer;L.isWebGLCubeRenderTarget?(te=Array.isArray(an[K])?an[K][ce]:an[K],je=!0):te=L.samples>0&&!1===_t.useMultisampledRTT(L)?rt.get(L).__webglMultisampledFramebuffer:Array.isArray(an)?an[ce]:an,A.copy(L.viewport),W.copy(L.scissor),ie=L.scissorTest}else A.copy(Ve).multiplyScalar(se).floor(),W.copy(Ye).multiplyScalar(se).floor(),ie=Rt;if(Me.bindFramebuffer(N.FRAMEBUFFER,te)&&ue&&Me.drawBuffers(L,te),Me.viewport(A),Me.scissor(W),Me.setScissorTest(ie),je){const Ct=rt.get(L.texture);N.framebufferTexture2D(N.FRAMEBUFFER,N.COLOR_ATTACHMENT0,N.TEXTURE_CUBE_MAP_POSITIVE_X+K,Ct.__webglTexture,ce)}else if(at){const Ct=rt.get(L.texture);N.framebufferTextureLayer(N.FRAMEBUFFER,N.COLOR_ATTACHMENT0,Ct.__webglTexture,ce||0,K||0)}B=-1},this.readRenderTargetPixels=function(L,K,ce,ue,te,je,at){if(!L||!L.isWebGLRenderTarget)return void console.error("THREE.WebGLRenderer.readRenderTargetPixels: renderTarget is not THREE.WebGLRenderTarget.");let Mt=rt.get(L).__webglFramebuffer;if(L.isWebGLCubeRenderTarget&&void 0!==at&&(Mt=Mt[at]),Mt){Me.bindFramebuffer(N.FRAMEBUFFER,Mt);try{const Ct=L.texture,Kt=Ct.format,an=Ct.type;if(!it.textureFormatReadable(Kt))return void console.error("THREE.WebGLRenderer.readRenderTargetPixels: renderTarget is not in RGBA or implementation defined format.");if(!it.textureTypeReadable(an))return void console.error("THREE.WebGLRenderer.readRenderTargetPixels: renderTarget is not in UnsignedByteType or implementation defined type.");K>=0&&K<=L.width-ue&&ce>=0&&ce<=L.height-te&&N.readPixels(K,ce,ue,te,vn.convert(Kt),vn.convert(an),je)}finally{const Ct=null!==k?rt.get(k).__webglFramebuffer:null;Me.bindFramebuffer(N.FRAMEBUFFER,Ct)}}},this.readRenderTargetPixelsAsync=function(){var L=nt(function*(K,ce,ue,te,je,at,Mt){if(!K||!K.isWebGLRenderTarget)throw new Error("THREE.WebGLRenderer.readRenderTargetPixels: renderTarget is not THREE.WebGLRenderTarget.");let Ct=rt.get(K).__webglFramebuffer;if(K.isWebGLCubeRenderTarget&&void 0!==Mt&&(Ct=Ct[Mt]),Ct){Me.bindFramebuffer(N.FRAMEBUFFER,Ct);try{const Kt=K.texture,an=Kt.format,Zt=Kt.type;if(!it.textureFormatReadable(an))throw new Error("THREE.WebGLRenderer.readRenderTargetPixelsAsync: renderTarget is not in RGBA or implementation defined format.");if(!it.textureTypeReadable(Zt))throw new Error("THREE.WebGLRenderer.readRenderTargetPixelsAsync: renderTarget is not in UnsignedByteType or implementation defined type.");if(ce>=0&&ce<=K.width-te&&ue>=0&&ue<=K.height-je){const li=N.createBuffer();N.bindBuffer(N.PIXEL_PACK_BUFFER,li),N.bufferData(N.PIXEL_PACK_BUFFER,at.byteLength,N.STREAM_READ),N.readPixels(ce,ue,te,je,vn.convert(an),vn.convert(Zt),0),N.flush();const Li=N.fenceSync(N.SYNC_GPU_COMMANDS_COMPLETE,0);yield function dae(i,t,e){return new Promise(function(n,r){setTimeout(function s(){switch(i.clientWaitSync(t,i.SYNC_FLUSH_COMMANDS_BIT,0)){case i.WAIT_FAILED:r();break;case i.TIMEOUT_EXPIRED:setTimeout(s,e);break;default:n()}},e)})}(N,Li,4);try{N.bindBuffer(N.PIXEL_PACK_BUFFER,li),N.getBufferSubData(N.PIXEL_PACK_BUFFER,0,at)}finally{N.deleteBuffer(li),N.deleteSync(Li)}return at}}finally{const Kt=null!==k?rt.get(k).__webglFramebuffer:null;Me.bindFramebuffer(N.FRAMEBUFFER,Kt)}}});return function(K,ce,ue,te,je,at,Mt){return L.apply(this,arguments)}}(),this.copyFramebufferToTexture=function(L,K=null,ce=0){!0!==L.isTexture&&(cg("WebGLRenderer: copyFramebufferToTexture function signature has changed."),K=arguments[0]||null,L=arguments[1]);const ue=Math.pow(2,-ce),te=Math.floor(L.image.width*ue),je=Math.floor(L.image.height*ue),at=null!==K?K.x:0,Mt=null!==K?K.y:0;_t.setTexture2D(L,0),N.copyTexSubImage2D(N.TEXTURE_2D,ce,0,0,at,Mt,te,je),Me.unbindTexture()},this.copyTextureToTexture=function(L,K,ce=null,ue=null,te=0){let je,at,Mt,Ct,Kt,an;!0!==L.isTexture&&(cg("WebGLRenderer: copyTextureToTexture function signature has changed."),ue=arguments[0]||null,L=arguments[1],K=arguments[2],te=arguments[3]||0,ce=null),null!==ce?(je=ce.max.x-ce.min.x,at=ce.max.y-ce.min.y,Mt=ce.min.x,Ct=ce.min.y):(je=L.image.width,at=L.image.height,Mt=0,Ct=0),null!==ue?(Kt=ue.x,an=ue.y):(Kt=0,an=0);const Zt=vn.convert(K.format),li=vn.convert(K.type);_t.setTexture2D(K,0),N.pixelStorei(N.UNPACK_FLIP_Y_WEBGL,K.flipY),N.pixelStorei(N.UNPACK_PREMULTIPLY_ALPHA_WEBGL,K.premultiplyAlpha),N.pixelStorei(N.UNPACK_ALIGNMENT,K.unpackAlignment);const Li=N.getParameter(N.UNPACK_ROW_LENGTH),ir=N.getParameter(N.UNPACK_IMAGE_HEIGHT),la=N.getParameter(N.UNPACK_SKIP_PIXELS),fi=N.getParameter(N.UNPACK_SKIP_ROWS),kt=N.getParameter(N.UNPACK_SKIP_IMAGES),fs=L.isCompressedTexture?L.mipmaps[te]:L.image;N.pixelStorei(N.UNPACK_ROW_LENGTH,fs.width),N.pixelStorei(N.UNPACK_IMAGE_HEIGHT,fs.height),N.pixelStorei(N.UNPACK_SKIP_PIXELS,Mt),N.pixelStorei(N.UNPACK_SKIP_ROWS,Ct),L.isDataTexture?N.texSubImage2D(N.TEXTURE_2D,te,Kt,an,je,at,Zt,li,fs.data):L.isCompressedTexture?N.compressedTexSubImage2D(N.TEXTURE_2D,te,Kt,an,fs.width,fs.height,Zt,fs.data):N.texSubImage2D(N.TEXTURE_2D,te,Kt,an,je,at,Zt,li,fs),N.pixelStorei(N.UNPACK_ROW_LENGTH,Li),N.pixelStorei(N.UNPACK_IMAGE_HEIGHT,ir),N.pixelStorei(N.UNPACK_SKIP_PIXELS,la),N.pixelStorei(N.UNPACK_SKIP_ROWS,fi),N.pixelStorei(N.UNPACK_SKIP_IMAGES,kt),0===te&&K.generateMipmaps&&N.generateMipmap(N.TEXTURE_2D),Me.unbindTexture()},this.copyTextureToTexture3D=function(L,K,ce=null,ue=null,te=0){let je,at,Mt,Ct,Kt,an,Zt,li,Li;!0!==L.isTexture&&(cg("WebGLRenderer: copyTextureToTexture3D function signature has changed."),ce=arguments[0]||null,ue=arguments[1]||null,L=arguments[2],K=arguments[3],te=arguments[4]||0);const ir=L.isCompressedTexture?L.mipmaps[te]:L.image;null!==ce?(je=ce.max.x-ce.min.x,at=ce.max.y-ce.min.y,Mt=ce.max.z-ce.min.z,Ct=ce.min.x,Kt=ce.min.y,an=ce.min.z):(je=ir.width,at=ir.height,Mt=ir.depth,Ct=0,Kt=0,an=0),null!==ue?(Zt=ue.x,li=ue.y,Li=ue.z):(Zt=0,li=0,Li=0);const la=vn.convert(K.format),fi=vn.convert(K.type);let kt;if(K.isData3DTexture)_t.setTexture3D(K,0),kt=N.TEXTURE_3D;else{if(!K.isDataArrayTexture&&!K.isCompressedArrayTexture)return void console.warn("THREE.WebGLRenderer.copyTextureToTexture3D: only supports THREE.DataTexture3D and THREE.DataTexture2DArray.");_t.setTexture2DArray(K,0),kt=N.TEXTURE_2D_ARRAY}N.pixelStorei(N.UNPACK_FLIP_Y_WEBGL,K.flipY),N.pixelStorei(N.UNPACK_PREMULTIPLY_ALPHA_WEBGL,K.premultiplyAlpha),N.pixelStorei(N.UNPACK_ALIGNMENT,K.unpackAlignment);const fs=N.getParameter(N.UNPACK_ROW_LENGTH),pi=N.getParameter(N.UNPACK_IMAGE_HEIGHT),Al=N.getParameter(N.UNPACK_SKIP_PIXELS),qg=N.getParameter(N.UNPACK_SKIP_ROWS),ca=N.getParameter(N.UNPACK_SKIP_IMAGES);N.pixelStorei(N.UNPACK_ROW_LENGTH,ir.width),N.pixelStorei(N.UNPACK_IMAGE_HEIGHT,ir.height),N.pixelStorei(N.UNPACK_SKIP_PIXELS,Ct),N.pixelStorei(N.UNPACK_SKIP_ROWS,Kt),N.pixelStorei(N.UNPACK_SKIP_IMAGES,an),L.isDataTexture||L.isData3DTexture?N.texSubImage3D(kt,te,Zt,li,Li,je,at,Mt,la,fi,ir.data):K.isCompressedArrayTexture?N.compressedTexSubImage3D(kt,te,Zt,li,Li,je,at,Mt,la,ir.data):N.texSubImage3D(kt,te,Zt,li,Li,je,at,Mt,la,fi,ir),N.pixelStorei(N.UNPACK_ROW_LENGTH,fs),N.pixelStorei(N.UNPACK_IMAGE_HEIGHT,pi),N.pixelStorei(N.UNPACK_SKIP_PIXELS,Al),N.pixelStorei(N.UNPACK_SKIP_ROWS,qg),N.pixelStorei(N.UNPACK_SKIP_IMAGES,ca),0===te&&K.generateMipmaps&&N.generateMipmap(kt),Me.unbindTexture()},this.initRenderTarget=function(L){void 0===rt.get(L).__webglFramebuffer&&_t.setupRenderTarget(L)},this.initTexture=function(L){L.isCubeTexture?_t.setTextureCube(L,0):L.isData3DTexture?_t.setTexture3D(L,0):L.isDataArrayTexture||L.isCompressedArrayTexture?_t.setTexture2DArray(L,0):_t.setTexture2D(L,0),Me.unbindTexture()},this.resetState=function(){F=0,D=0,k=null,Me.reset(),Pn.reset()},typeof __THREE_DEVTOOLS__<"u"&&__THREE_DEVTOOLS__.dispatchEvent(new CustomEvent("observe",{detail:this}))}get coordinateSystem(){return td}get outputColorSpace(){return this._outputColorSpace}set outputColorSpace(t){this._outputColorSpace=t;const e=this.getContext();e.drawingBufferColorSpace=t===Yk?"display-p3":"srgb",e.unpackColorSpace=ei.workingColorSpace===FC?"display-p3":"srgb"}}class Pb extends Fr{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 rd,this.environmentIntensity=1,this.environmentRotation=new rd,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 DP{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=ta()}onUploadCallback(){}set needsUpdate(t){!0===t&&this.version++}get updateRange(){return cg("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;r0){const r=e[n[0]];if(void 0!==r){this.morphTargetInfluences=[],this.morphTargetDictionary={};for(let s=0,o=r.length;sn)return;LP.applyMatrix4(i.matrixWorld);const l=t.ray.origin.distanceTo(LP);return lt.far?void 0:{distance:l,point:Z5.clone().applyMatrix4(i.matrixWorld),index:r,face:null,faceIndex:null,object:i}}const Q5=new O,J5=new O;class Ng extends mf{constructor(t,e){super(t,e),this.isLineSegments=!0,this.type="LineSegments"}computeLineDistances(){const t=this.geometry;if(null===t.index){const e=t.attributes.position,n=[];for(let r=0,s=e.count;r0){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 uc{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 d=n[r];return(r+(o-d)/(n[r+1]-d))/(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 xe:new O);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 O,r=[],s=[],o=[],a=new O,l=new Bt;for(let m=0;m<=t;m++)r[m]=this.getTangentAt(m/t,new O);s[0]=new O,o[0]=new O;let c=Number.MAX_VALUE;const d=Math.abs(r[0].x),h=Math.abs(r[0].y),p=Math.abs(r[0].z);d<=c&&(c=d,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(tr(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(tr(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 BP extends uc{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 xe){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(i$(a,l.x,c.x,d.x,h.x),i$(a,l.y,c.y,d.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]:(AS.subVectors(r[0],r[1]).add(r[0]),c=AS);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 d=c.getPoint(1);return this.currentPoint.copy(d),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 IS extends hn{constructor(t=[new xe(0,-.5),new xe(.5,0),new xe(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=tr(r,0,2*Math.PI);const s=[],o=[],a=[],l=[],c=[],d=1/e,h=new O,p=new xe,m=new O,g=new O,b=new O;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*d*r,C=Math.sin(x),F=Math.cos(x);for(let D=0;D<=t.length-1;D++)h.x=t[D].x*C,h.y=t[D].y,h.z=t[D].x*F,o.push(h.x,h.y,h.z),p.x=M/e,p.y=D/(t.length-1),a.push(p.x,p.y),c.push(l[3*D+0]*C,l[3*D+1],l[3*D+0]*F)}for(let M=0;M0&&x(!0),e>0&&x(!1)),this.setIndex(d),this.setAttribute("position",new ht(h,3)),this.setAttribute("normal",new ht(p,3)),this.setAttribute("uv",new ht(m,2))}copy(t){return super.copy(t),this.parameters=Object.assign({},t.parameters),this}static fromJSON(t){return new Bg(t.radiusTop,t.radiusBottom,t.height,t.radialSegments,t.heightSegments,t.openEnded,t.thetaStart,t.thetaLength)}}class kS extends Bg{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 kS(t.radius,t.height,t.radialSegments,t.heightSegments,t.openEnded,t.thetaStart,t.thetaLength)}}class Yb 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 d=[],h=new O,p=new O,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 F=0;F<=e;F++){const D=F/e;h.x=-t*Math.cos(r+D*s)*Math.sin(o+x*a),h.y=t*Math.cos(o+x*a),h.z=t*Math.sin(r+D*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(D+C,1-x),M.push(c++)}d.push(M)}for(let y=0;y0)&&m.push(d[y][M+1],C,D),(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 dispersion(){return this._dispersion}set dispersion(t){this._dispersion>0!=t>0&&this.version++,this._dispersion=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.dispersion=t.dispersion,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 VS extends Fo{constructor(t){super(),this.isMeshPhongMaterial=!0,this.type="MeshPhongMaterial",this.color=new qe(16777215),this.specular=new qe(1118481),this.shininess=30,this.map=null,this.lightMap=null,this.lightMapIntensity=1,this.aoMap=null,this.aoMapIntensity=1,this.emissive=new qe(0),this.emissiveIntensity=1,this.emissiveMap=null,this.bumpMap=null,this.bumpScale=1,this.normalMap=null,this.normalMapType=Jh,this.normalScale=new xe(1,1),this.displacementMap=null,this.displacementScale=1,this.displacementBias=0,this.specularMap=null,this.alphaMap=null,this.envMap=null,this.envMapRotation=new rd,this.combine=SC,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 v$(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 nO(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 iO(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 Xb{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 _$(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}}hc.prototype.TimeBufferType=Float32Array,hc.prototype.ValueBufferType=Float32Array,hc.prototype.DefaultInterpolation=xb;class zg extends hc{constructor(t,e,n){super(t,e,n)}}zg.prototype.ValueTypeName="bool",zg.prototype.ValueBufferType=Array,zg.prototype.DefaultInterpolation=bb,zg.prototype.InterpolantFactoryMethodLinear=void 0,zg.prototype.InterpolantFactoryMethodSmooth=void 0;class b$ extends hc{}b$.prototype.ValueTypeName="color";class Hg extends hc{}Hg.prototype.ValueTypeName="number";class Whe extends Xb{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 d=c+a;c!==d;c+=4)fo.slerpFlat(s,0,o,c-a,o,c,l);return s}}class $g extends hc{InterpolantFactoryMethodLinear(t){return new Whe(this.times,this.values,this.getValueSize(),t)}}$g.prototype.ValueTypeName="quaternion",$g.prototype.InterpolantFactoryMethodSmooth=void 0;class Gg extends hc{constructor(t,e,n){super(t,e,n)}}Gg.prototype.ValueTypeName="string",Gg.prototype.ValueBufferType=Array,Gg.prototype.DefaultInterpolation=bb,Gg.prototype.InterpolantFactoryMethodLinear=void 0,Gg.prototype.InterpolantFactoryMethodSmooth=void 0;class Wg extends hc{}Wg.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=ta(),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(Yhe(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(hc.toJSON(n[s]));return r}static CreateFromMorphTargetSequence(t,e,n,r){const s=e.length,o=[];for(let a=0;a1){const h=d[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=[];iO(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:w$,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 ud={};class qhe extends Error{constructor(t,e){super(t),this.response=e}}class Ba extends bf{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=ku.get(t);if(void 0!==s)return this.manager.itemStart(t),setTimeout(()=>{e&&e(s),this.manager.itemEnd(t)},0),s;if(void 0!==ud[t])return void ud[t].push({onLoad:e,onProgress:n,onError:r});ud[t]=[],ud[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 d=ud[t],h=c.body.getReader(),p=c.headers.get("X-File-Size")||c.headers.get("Content-Length"),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 F=new ProgressEvent("progress",{lengthComputable:g,loaded:b,total:m});for(let D=0,k=d.length;D{y.error(x)})}()}});return new Response(v)}throw new qhe(`fetch for "${c.url}" responded with ${c.status}: ${c.statusText}`,c)}).then(c=>{switch(l){case"arraybuffer":return c.arrayBuffer();case"blob":return c.blob();case"document":return c.text().then(d=>(new DOMParser).parseFromString(d,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=>{ku.add(t,c);const d=ud[t];delete ud[t];for(let h=0,p=d.length;h{const d=ud[t];if(void 0===d)throw this.manager.itemError(t),c;delete ud[t];for(let h=0,p=d.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 zS extends bf{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=ku.get(t);if(void 0!==o)return s.manager.itemStart(t),setTimeout(function(){e&&e(o),s.manager.itemEnd(t)},0),o;const a=Mb("img");function l(){d(),ku.add(t,this),e&&e(this),s.manager.itemEnd(t)}function c(h){d(),r&&r(h),s.manager.itemError(t),s.manager.itemEnd(t)}function d(){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 Pu extends bf{constructor(t){super(t)}load(t,e,n,r){const s=new Oo,o=new zS(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 HS extends Fr{constructor(t,e=1){super(),this.isLight=!0,this.type="Light",this.color=new qe(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()),void 0!==this.target&&(e.object.target=this.target.uuid),e}}const rO=new Bt,M$=new O,C$=new O;class sO{constructor(t){this.camera=t,this.intensity=1,this.bias=0,this.normalBias=0,this.radius=1,this.blurSamples=8,this.mapSize=new xe(512,512),this.map=null,this.mapPass=null,this.matrix=new Bt,this.autoUpdate=!0,this.needsUpdate=!1,this._frustum=new oS,this._frameExtents=new xe(1,1),this._viewportCount=1,this._viewports=[new _i(0,0,1,1)]}getViewportCount(){return this._viewportCount}getFrustum(){return this._frustum}updateMatrices(t){const e=this.camera,n=this.matrix;M$.setFromMatrixPosition(t.matrixWorld),e.position.copy(M$),C$.setFromMatrixPosition(t.target.matrixWorld),e.lookAt(C$),e.updateMatrixWorld(),rO.multiplyMatrices(e.projectionMatrix,e.matrixWorldInverse),this._frustum.setFromProjectionMatrix(rO),n.set(.5,0,0,.5,0,.5,0,.5,0,0,.5,.5,0,0,0,1),n.multiply(rO)}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.intensity=t.intensity,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 1!==this.intensity&&(t.intensity=this.intensity),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 Khe extends sO{constructor(){super(new br(50,1,.5,500)),this.isSpotLightShadow=!0,this.focus=1}updateMatrices(t){const e=this.camera,n=2*ag*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 S$ extends HS{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(Fr.DEFAULT_UP),this.updateMatrix(),this.target=new Fr,this.distance=n,this.angle=r,this.penumbra=s,this.decay=o,this.map=null,this.shadow=new Khe}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 E$=new Bt,Zb=new O,oO=new O;class Zhe extends sO{constructor(){super(new br(90,1,.5,500)),this.isPointLightShadow=!0,this._frameExtents=new xe(4,2),this._viewportCount=6,this._viewports=[new _i(2,1,1,1),new _i(0,1,1,1),new _i(3,1,1,1),new _i(1,1,1,1),new _i(3,0,1,1),new _i(1,0,1,1)],this._cubeDirections=[new O(1,0,0),new O(-1,0,0),new O(0,0,1),new O(0,0,-1),new O(0,1,0),new O(0,-1,0)],this._cubeUps=[new O(0,1,0),new O(0,1,0),new O(0,1,0),new O(0,1,0),new O(0,0,1),new O(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()),Zb.setFromMatrixPosition(t.matrixWorld),n.position.copy(Zb),oO.copy(n.position),oO.add(this._cubeDirections[e]),n.up.copy(this._cubeUps[e]),n.lookAt(oO),n.updateMatrixWorld(),r.makeTranslation(-Zb.x,-Zb.y,-Zb.z),E$.multiplyMatrices(n.projectionMatrix,n.matrixWorldInverse),this._frustum.setFromProjectionMatrix(E$)}}class A$ extends HS{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 Zhe}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 Qhe extends sO{constructor(){super(new Rb(-5,5,5,-5,.5,500)),this.isDirectionalLightShadow=!0}}class D$ extends HS{constructor(t,e){super(t,e),this.isDirectionalLight=!0,this.type="DirectionalLight",this.position.copy(Fr.DEFAULT_UP),this.updateMatrix(),this.target=new Fr,this.shadow=new Qhe}dispose(){this.shadow.dispose()}copy(t){return super.copy(t),this.target=t.target.clone(),this.shadow=t.shadow.clone(),this}}class $S extends HS{constructor(t,e){super(t,e),this.isAmbientLight=!0,this.type="AmbientLight"}}class Ou{static decodeText(t){if(console.warn("THREE.LoaderUtils: decodeText() has been deprecated with r165 and will be removed with r175. Use TextDecoder instead."),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=ku.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 ku.add(t,c),e&&e(c),s.manager.itemEnd(t),c}).catch(function(c){r&&r(c),ku.remove(t),s.manager.itemError(t),s.manager.itemEnd(t)});ku.add(t,l),s.manager.itemStart(t)}}class O${constructor(t=!0){this.autoStart=t,this.startTime=0,this.oldTime=0,this.elapsedTime=0,this.running=!1}start(){this.startTime=F$(),this.oldTime=this.startTime,this.elapsedTime=0,this.running=!0}stop(){this.getElapsedTime(),this.running=!1,this.autoStart=!1}getElapsedTime(){return this.getDelta(),this.elapsedTime}getDelta(){let t=0;if(this.autoStart&&!this.running)return this.start(),0;if(this.running){const e=F$();t=(e-this.oldTime)/1e3,this.oldTime=e,this.elapsedTime+=t}return t}}function F$(){return(typeof performance>"u"?Date:performance).now()}const lO="\\[\\]\\.:\\/",cfe=new RegExp("["+lO+"]","g"),cO="[^"+lO+"]",dfe="[^"+lO.replace("\\.","")+"]",mfe=new RegExp("^"+/((?:WC+[\/:])*)/.source.replace("WC",cO)+/(WCOD+)?/.source.replace("WCOD",dfe)+/(?:\.(WC+)(?:\[(.+)\])?)?/.source.replace("WC",cO)+/\.(WC+)(?:\[(.+)\])?/.source.replace("WC",cO)+"$"),gfe=["material","materials","bones","map"];class _fe{constructor(t,e,n){const r=n||Ri.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 Ri=(()=>{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(cfe,"")}static parseTrackName(e){const n=mfe.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!==gfe.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;an.name===t||n.userData.name===t);return e?(e.removeFromParent(),new ra(e)):null}getBoundings(){return(new Vs).setFromObject(this.nativeMesh)}clone(){return new ra(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 Mn&&this.disposeMesh(t)}),this.nativeMesh instanceof Mn&&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 wfe extends ra{get supportsFov(){return this.nativeCamera instanceof br||"PerspectiveCamera"==this.nativeCamera.type}get fov(){return this.nativeCamera.fov||NaN}set fov(t){this.supportsFov&&(this.nativeCamera.fov=t,this.nativeCamera.updateProjectionMatrix())}constructor(t){super(t),this.nativeCamera=t}}class Mfe extends Gse{createMaterial(t){let e={};t.color?e={color:t.color}:t.diffuse||(e={color:super.randomColor()});let n=t.shading||"unlit";switch(n){case"unlit":return new qi(Object.assign(Object.assign({},e),{map:t.diffuse||null}));case"standart":return new qb(Object.assign(Object.assign({},e),{map:t.diffuse||null}));case"phong":return new VS(Object.assign(Object.assign({},e),{map:t.diffuse||null}));case"wireframe":return new qi(Object.assign(Object.assign({},e),{wireframe:!0}));default:throw new Error(`"${n}" shading not implemented for three.js`)}}transformPrimitiveZUp(t){t.geometry.rotateX(Math.PI/2)}createPrimitive(t,e={}){var n,r,s,o;let a=null,l=this.createMaterial(e);switch(t.shape){case"PLANE":a=new Mn(new Iu((null===(n=t.dimensions)||void 0===n?void 0:n.x)||1e4,(null===(r=t.dimensions)||void 0===r?void 0:r.y)||1e4,null===(s=t.segments)||void 0===s?void 0:s.x,null===(o=t.segments)||void 0===o?void 0:o.y),l);break;case"BOX":a=new Mn(new sf(...Re.spr(t.dimensions),...t.segments?Re.spr(t.segments):[]),l);break;case"CAPSULE":a=new Mn(new RS(t.radius,t.centersDistance,t.capSegments,t.radialSegments),l),this.transformPrimitiveZUp(a);break;case"CYLINDER":a=new Mn(new Bg(t.radius,t.radius,t.height,t.radialSegments,t.heightSegments),l),this.transformPrimitiveZUp(a);break;case"CONE":a=new Mn(new kS(t.radius,t.height,t.radialSegments,t.heightSegments),l),this.transformPrimitiveZUp(a);break;case"SPHERE":a=new Mn(new Yb(t.radius,t.widthSegments,t.heightSegments),l),this.transformPrimitiveZUp(a);break;case"COMPOUND":a=new No;for(const{position:d,rotation:h,shape:p}of t.children){const m=this.createPrimitive(p,e).nativeMesh;d&&m.position.set(...Re.spr(d)),h&&m.quaternion.set(...Yi.spr(h)),a.add(m)}break;case"MESH":const c=new hn;c.setFromPoints(t.vertices.map(d=>new O(...Re.spr(d)))),c.setIndex(t.faces.reduce((d,h)=>(d.push(...h),d),[])),a=new Mn(c,l)}if(!a)throw new Error(`Primitive with shape "${t.shape}" not implemented`);return void 0!==e.castShadow&&(a.castShadow=e.castShadow),void 0!==e.receiveShadow&&(a.receiveShadow=e.receiveShadow),new ra(a)}createPerspectiveCamera(t={}){return new wfe(new br(t.fov||75,t.aspectRatio||1,t.frustrum?t.frustrum.near:1,t.frustrum?t.frustrum.far:1e4))}}function Q$(i,t){if(t===Ooe)return console.warn("THREE.BufferGeometryUtils.toTrianglesDrawMode(): Geometry already defined as triangles."),i;if(t===jk||t===C4){let e=i.getIndex();if(null===e){const o=[],a=i.getAttribute("position");if(void 0===a)return console.error("THREE.BufferGeometryUtils.toTrianglesDrawMode(): Undefined position attribute. Processing not possible."),i;for(let l=0;l=2.0 are supported.")));const c=new ipe(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 d=0;d=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 Sfe(){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 Bn={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_DISPERSION:"KHR_materials_dispersion",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 Efe{constructor(t){this.parser=t,this.name=Bn.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 Vfe{constructor(t){this.parser=t,this.name=Bn.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 zfe{constructor(t){this.parser=t,this.name=Bn.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 Hfe{constructor(t){this.name=Bn.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 d=r.count,h=r.byteStride,p=new Uint8Array(a,r.byteOffset||0,r.byteLength||0);return o.decodeGltfBufferAsync?o.decodeGltfBufferAsync(d,h,p,r.mode,r.filter).then(function(m){return m.buffer}):o.ready.then(function(){const m=new ArrayBuffer(d*h);return o.decodeGltfBuffer(new Uint8Array(m),d,h,p,r.mode,r.filter),m})})}return null}}class $fe{constructor(t){this.name=Bn.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!==Ua.TRIANGLES&&c.mode!==Ua.TRIANGLE_STRIP&&c.mode!==Ua.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(d=>(l[c]=d,l[c])));return a.length<1?null:(a.push(this.parser.createNodeMesh(t)),Promise.all(a).then(c=>{const d=c.pop(),h=d.isGroup?d.children:[d],p=c[0].count,m=[];for(const g of h){const b=new Bt,v=new O,y=new fo,M=new O(1,1,1),x=new Y5(g.geometry,g.material,p);for(let C=0;C-1,o=s?a.match(/Firefox\/([0-9]+)\./)[1]:-1}this.textureLoader=typeof createImageBitmap>"u"||n&&r<17||s&&o<98?new Pu(this.options.manager):new sfe(this.options.manager),this.textureLoader.setCrossOrigin(this.options.crossOrigin),this.textureLoader.setRequestHeader(this.options.requestHeader),this.fileLoader=new Ba(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 Ef(s,a,r),hd(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,d]of o.children.entries())s(d,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(T,D[k*l+1]),l>=3&&v.setZ(T,D[k*l+2]),l>=4&&v.setW(T,D[k*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(d){d.flipY=!1,d.name=o.name||a.name||"",""===d.name&&"string"==typeof a.uri&&!1===a.uri.startsWith("data:image/")&&(d.name=a.uri);const p=(s.samplers||{})[o.sampler]||{};return d.magFilter=nG[p.magFilter]||cr,d.minFilter=nG[p.minFilter]||xl,d.wrapS=iG[p.wrapS]||Bs,d.wrapT=iG[p.wrapT]||Bs,r.associations.set(d,{textures:t}),d}).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 d=Promise.resolve(l).then(function(h){return new Promise(function(p,m){let g=p;!0===e.isImageBitmapLoader&&(g=function(b){const v=new Oo(b);v.needsUpdate=!0,p(v)}),e.load(Ou.resolveURL(h,s.path),g,void 0,m)})}).then(function(h){return!0===c&&a.revokeObjectURL(l),hd(h,o),h.userData.mimeType=o.mimeType||function tpe(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]=d,d}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[Bn.KHR_TEXTURE_TRANSFORM]){const a=void 0!==n.extensions?n.extensions[Bn.KHR_TEXTURE_TRANSFORM]:void 0;if(a){const l=s.associations.get(o);o=s.extensions[Bn.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,Fo.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 us,Fo.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 qb}loadMaterial(t){const e=this,r=this.extensions,s=this.json.materials[t];let o;const a={},c=[];if((s.extensions||{})[Bn.KHR_MATERIALS_UNLIT]){const h=r[Bn.KHR_MATERIALS_UNLIT];o=h.getMaterialType(),c.push(h.extendParams(a,s,e))}else{const h=s.pbrMetallicRoughness||{};if(a.color=new qe(1,1,1),a.opacity=1,Array.isArray(h.baseColorFactor)){const p=h.baseColorFactor;a.color.setRGB(p[0],p[1],p[2],ds),a.opacity=p[3]}void 0!==h.baseColorTexture&&c.push(e.assignTexture(a,"map",h.baseColorTexture,cs)),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=Ns);const d=s.alphaMode||"OPAQUE";if("BLEND"===d?(a.transparent=!0,a.depthWrite=!1):(a.transparent=!1,"MASK"===d&&(a.alphaTest=void 0!==s.alphaCutoff?s.alphaCutoff:.5)),void 0!==s.normalTexture&&o!==qi&&(c.push(e.assignTexture(a,"normalMap",s.normalTexture)),a.normalScale=new xe(1,1),void 0!==s.normalTexture.scale)){const h=s.normalTexture.scale;a.normalScale.set(h,h)}if(void 0!==s.occlusionTexture&&o!==qi&&(c.push(e.assignTexture(a,"aoMap",s.occlusionTexture)),void 0!==s.occlusionTexture.strength&&(a.aoMapIntensity=s.occlusionTexture.strength)),void 0!==s.emissiveFactor&&o!==qi){const h=s.emissiveFactor;a.emissive=(new qe).setRGB(h[0],h[1],h[2],ds)}return void 0!==s.emissiveTexture&&o!==qi&&c.push(e.assignTexture(a,"emissiveMap",s.emissiveTexture,cs)),Promise.all(c).then(function(){const h=new o(a);return s.name&&(h.name=s.name),hd(h,s),e.associations.set(h,{materials:t}),s.extensions&&Ef(r,h,s),h})}createUniqueName(t){const e=Ri.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[Bn.KHR_DRACO_MESH_COMPRESSION].decodePrimitive(a,e).then(function(l){return rG(l,a,e)})}const o=[];for(let a=0,l=t.length;a0&&Jfe(y,s),y.name=e.createUniqueName(s.name||"mesh_"+t),hd(y,s),v.extensions&&Ef(r,y,v),e.assignFinalMaterial(y),h.push(y)}for(let m=0,g=h.length;m1?new No:1===c.length?c[0]:new Fr,d!==c[0])for(let h=0,p=c.length;h{const h=new Map;for(const[p,m]of r.associations)(p instanceof Fo||p instanceof Oo)&&h.set(p,m);return d.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(Lu[s.path]===Lu.weights?t.traverse(function(p){p.morphTargetInfluences&&l.push(p.name?p.name:p.uuid)}):l.push(a),Lu[s.path]){case Lu.weights:c=Hg;break;case Lu.rotation:c=$g;break;case Lu.position:case Lu.scale:c=Wg;break;default:c=1===n.itemSize?Hg:Wg}const d=void 0!==r.interpolation?Kfe[r.interpolation]:xb,h=this._getArrayFromAccessor(n);for(let p=0,m=l.length;p{r.type.endsWith("Light")&&(console.warn("WORKAROUND: light intensity from GLB divided by 200."),r.intensity*=.005)}),new ra(n.scene)})}}const go=(i,t)=>Array(i).fill(null).map((e,n)=>t(n));class Af{static startDebugView(t,e){let n=this.activeDebugViews.get(t);return n?n.renderers.includes(e)||n.renderers.push(e):(n={view:new Af(t),renderers:[e]},this.activeDebugViews.set(t,n)),n.view}static stopDebugView(t,e){const n=t.world,r=this.activeDebugViews.get(n);r&&(r.renderers=r.renderers.filter(s=>s!==e),0===r.renderers.length&&(r.view.dispose(),this.activeDebugViews.delete(n)))}constructor(t){this.world=t,this.debugScene=null,this.aSub=null,this.rSub=null,this.syncMap=new Map,this.debugScene=new Pb;const e=n=>{var r,s;const o=n.debugBodySettings;let c,l=this.lineSegmentPointsForShape(o.shape);c=l?new Ng((new hn).setFromPoints(l)):null===(r=this.world)||void 0===r?void 0:r.visualScene.factory.createPrimitive(o.shape,{shading:"wireframe",color:0}).nativeMesh,this.syncMap.set(n,c),null===(s=this.debugScene)||void 0===s||s.add(c)};for(const n of this.world.physicsWorld.children)e(n);this.aSub=this.world.physicsWorld.added$.subscribe(n=>e(n)),this.rSub=this.world.physicsWorld.removed$.subscribe(n=>{var r;const s=this.syncMap.get(n);s&&(this.syncMap.delete(n),null===(r=this.debugScene)||void 0===r||r.remove(s))})}get scene(){return this.debugScene}render(t,e){for(const[r,s]of this.syncMap.entries()){const o=r.debugBodySettings;if(o.ignoreTransform||(s.position.set(...Re.spr(r.position)),s.quaternion.set(...Yi.spr(r.rotation))),s.material){let a=16777215;switch(o.type){case"RIGID_DYNAMIC":a=o.sleeping?255:16711680;break;case"RIGID_STATIC":a=65280;break;case"TRIGGER":a=16776960}s.material.color.set(a),s.material.needsUpdate=!0}}const n=t.autoClearColor;n&&(t.autoClearColor=!1),t.render(this.debugScene,e),n&&(t.autoClearColor=!0)}lineSegmentPointsForShape(t){if("BOX"===t.shape){const e=Re.scalarMult(t.dimensions,.5);return[...go(8,n=>new O(n<4?e.x:-e.x,n%4<2?e.y:-e.y,n%2?e.z:-e.z)),...go(8,n=>new O(n%2?e.x:-e.x,n<4?e.y:-e.y,n%4<2?e.z:-e.z)),...go(8,n=>new O(n%4<2?e.x:-e.x,n%2?e.y:-e.y,n<4?e.z:-e.z))]}if("CYLINDER"===t.shape)return[...go(32,e=>new O(t.radius*Math.sin(Math.floor((e+1)/2)*Math.PI/8),t.radius*Math.cos(Math.floor((e+1)/2)*Math.PI/8),-t.height/2)),...go(32,e=>new O(t.radius*Math.sin(Math.floor((e+1)/2)*Math.PI/8),t.radius*Math.cos(Math.floor((e+1)/2)*Math.PI/8),t.height/2)),...go(8,e=>new O(Math.floor(e/2)%2?0:e<4?t.radius:-t.radius,Math.floor(e/2)%2?e<4?t.radius:-t.radius:0,e%2?t.height/2:-t.height/2)),new O(0,0,-t.height/2),new O(0,0,t.height/2)];if("CONE"===t.shape)return[...go(32,e=>new O(t.radius*Math.sin(Math.floor((e+1)/2)*Math.PI/8),t.radius*Math.cos(Math.floor((e+1)/2)*Math.PI/8),-t.height/2)),...go(8,e=>new O(e%2||Math.floor(e/2)%2?0:e<4?t.radius:-t.radius,e%2?0:Math.floor(e/2)%2?e<4?t.radius:-t.radius:0,e%2?t.height/2:-t.height/2)),new O(0,0,-t.height/2),new O(0,0,t.height/2)];if("SPHERE"===t.shape)return[...go(32,e=>new O(t.radius*Math.sin(Math.floor((e+1)/2)*Math.PI/8),t.radius*Math.cos(Math.floor((e+1)/2)*Math.PI/8),0)),...go(32,e=>new O(t.radius*Math.sin(Math.floor((e+1)/2)*Math.PI/8),0,t.radius*Math.cos(Math.floor((e+1)/2)*Math.PI/8))),...go(32,e=>new O(0,t.radius*Math.sin(Math.floor((e+1)/2)*Math.PI/8),t.radius*Math.cos(Math.floor((e+1)/2)*Math.PI/8)))];if("CAPSULE"===t.shape)return[...this.lineSegmentPointsForShape({shape:"CYLINDER",radius:t.radius,height:t.centersDistance}),...go(16,e=>new O(t.radius*Math.cos(Math.floor((e+1)/2)*Math.PI/8),0,t.radius*Math.sin(Math.floor((e+1)/2)*Math.PI/8)+t.centersDistance/2)),...go(16,e=>new O(t.radius*Math.cos(Math.floor((e+1)/2)*Math.PI/8),0,-t.radius*Math.sin(Math.floor((e+1)/2)*Math.PI/8)-t.centersDistance/2)),...go(16,e=>new O(0,t.radius*Math.cos(Math.floor((e+1)/2)*Math.PI/8),t.radius*Math.sin(Math.floor((e+1)/2)*Math.PI/8)+t.centersDistance/2)),...go(16,e=>new O(0,t.radius*Math.cos(Math.floor((e+1)/2)*Math.PI/8),-t.radius*Math.sin(Math.floor((e+1)/2)*Math.PI/8)-t.centersDistance/2))];if("CONVEX_HULL"===t.shape)return[...t.vertices.map(n=>[new O(n.x-.05,n.y,n.z),new O(n.x+.05,n.y,n.z),new O(n.x,n.y-.05,n.z),new O(n.x,n.y+.05,n.z),new O(n.x,n.y,n.z-.05),new O(n.x,n.y,n.z+.05)]).reduce((n,r)=>(n.push(...r),n),[])];if("COMPOUND"===t.shape){const e=[];for(const{position:n,shape:r,rotation:s}of t.children){let o=this.lineSegmentPointsForShape(r);if(!o)return null;e.push(...o.map(a=>new O(...Re.spr(Re.add(n||Re.O,Re.rot(a,s||Yi.O))))))}return e}return null}dispose(){var t,e;this.debugScene=null,null===(t=this.aSub)||void 0===t||t.unsubscribe(),null===(e=this.rSub)||void 0===e||e.unsubscribe(),this.syncMap=new Map}}Af.activeDebugViews=new Map;class sG extends Lse{get physicsDebugViewActive(){return this._physicsDebugViewActive}set physicsDebugViewActive(t){this._physicsDebugViewActive!=t&&(this._physicsDebugViewActive=t,this.world&&(t?this.debugView=Af.startDebugView(this.world,this):(Af.stopDebugView(this.debugView,this),this.debugView=null)))}constructor(t,e,n,r={}){super(t,n,r),this.scene=t,this.camera=e,this.canvas=n,this.world=null,this.debugView=null,this._physicsDebugViewActive=!1,this.nativeRenderer=new Uue(Object.assign({canvas:n,alpha:this.rendererOptions.transparent},this.rendererOptions)),this.nativeRenderer.shadowMap.enabled=!0,this.nativeRenderer.setClearColor(this.rendererOptions.background),this.nativeRenderer.shadowMap.type=c4,this.nativeRenderer.setPixelRatio(this.rendererOptions.forceResolution||devicePixelRatio)}addToWorld(t){this.world=t,this.physicsDebugViewActive&&(this.debugView=Af.startDebugView(this.world,this))}removeFromWorld(t){this.physicsDebugViewActive&&(Af.stopDebugView(this.debugView,this),this.debugView=null),this.world=null}resizeRenderer(t){this.nativeRenderer.setSize(t.x,t.y),(this.camera.nativeCamera instanceof br||"PerspectiveCamera"==this.camera.nativeCamera.type)&&Math.abs(this.camera.nativeCamera.aspect-t.x/t.y)>.01&&(this.camera.nativeCamera.aspect=t.x/t.y,this.camera.nativeCamera.updateProjectionMatrix())}render(){this.nativeRenderer.render(this.scene.nativeScene,this.camera.nativeCamera),this.physicsDebugViewActive&&this.debugView.render(this.nativeRenderer,this.camera.nativeCamera)}dispose(){this.camera.dispose(),this.nativeRenderer.clear(),this.nativeRenderer.dispose(),this.nativeRenderer.domElement=null}}const ape={name:"CopyShader",uniforms:{tDiffuse:{value:null},opacity:{value:1}},vertexShader:"\n\n\t\tvarying vec2 vUv;\n\n\t\tvoid main() {\n\n\t\t\tvUv = uv;\n\t\t\tgl_Position = projectionMatrix * modelViewMatrix * vec4( position, 1.0 );\n\n\t\t}",fragmentShader:"\n\n\t\tuniform float opacity;\n\n\t\tuniform sampler2D tDiffuse;\n\n\t\tvarying vec2 vUv;\n\n\t\tvoid main() {\n\n\t\t\tvec4 texel = texture2D( tDiffuse, vUv );\n\t\t\tgl_FragColor = opacity * texel;\n\n\n\t\t}"};class ZS{constructor(){this.isPass=!0,this.enabled=!0,this.needsSwap=!0,this.clear=!1,this.renderToScreen=!1}setSize(){}render(){console.error("THREE.Pass: .render() must be implemented in derived pass.")}dispose(){}}const lpe=new Rb(-1,1,1,-1,0,1),dpe=new class cpe extends hn{constructor(){super(),this.setAttribute("position",new ht([-1,3,0,-1,-1,0,3,-1,0],3)),this.setAttribute("uv",new ht([0,2,0,0,2,0],2))}};class upe{constructor(t){this._mesh=new Mn(dpe,t)}dispose(){this._mesh.geometry.dispose()}render(t){t.render(this._mesh,lpe)}get material(){return this._mesh.material}set material(t){this._mesh.material=t}}class hpe extends ZS{constructor(t,e){super(),this.textureID=void 0!==e?e:"tDiffuse",t instanceof Sl?(this.uniforms=t.uniforms,this.material=t):t&&(this.uniforms=Q4.clone(t.uniforms),this.material=new Sl({name:void 0!==t.name?t.name:"unspecified",defines:Object.assign({},t.defines),uniforms:this.uniforms,vertexShader:t.vertexShader,fragmentShader:t.fragmentShader})),this.fsQuad=new upe(this.material)}render(t,e,n){this.uniforms[this.textureID]&&(this.uniforms[this.textureID].value=n.texture),this.fsQuad.material=this.material,this.renderToScreen?(t.setRenderTarget(null),this.fsQuad.render(t)):(t.setRenderTarget(e),this.clear&&t.clear(t.autoClearColor,t.autoClearDepth,t.autoClearStencil),this.fsQuad.render(t))}dispose(){this.material.dispose(),this.fsQuad.dispose()}}class oG extends ZS{constructor(t,e){super(),this.scene=t,this.camera=e,this.clear=!0,this.needsSwap=!1,this.inverse=!1}render(t,e,n){const r=t.getContext(),s=t.state;let o,a;s.buffers.color.setMask(!1),s.buffers.depth.setMask(!1),s.buffers.color.setLocked(!0),s.buffers.depth.setLocked(!0),this.inverse?(o=0,a=1):(o=1,a=0),s.buffers.stencil.setTest(!0),s.buffers.stencil.setOp(r.REPLACE,r.REPLACE,r.REPLACE),s.buffers.stencil.setFunc(r.ALWAYS,o,4294967295),s.buffers.stencil.setClear(a),s.buffers.stencil.setLocked(!0),t.setRenderTarget(n),this.clear&&t.clear(),t.render(this.scene,this.camera),t.setRenderTarget(e),this.clear&&t.clear(),t.render(this.scene,this.camera),s.buffers.color.setLocked(!1),s.buffers.depth.setLocked(!1),s.buffers.color.setMask(!0),s.buffers.depth.setMask(!0),s.buffers.stencil.setLocked(!1),s.buffers.stencil.setFunc(r.EQUAL,1,4294967295),s.buffers.stencil.setOp(r.KEEP,r.KEEP,r.KEEP),s.buffers.stencil.setLocked(!0)}}class fpe extends ZS{constructor(){super(),this.needsSwap=!1}render(t){t.state.buffers.stencil.setLocked(!1),t.state.buffers.stencil.setTest(!1)}}class ppe{constructor(t,e){if(this.renderer=t,this._pixelRatio=t.getPixelRatio(),void 0===e){const n=t.getSize(new xe);this._width=n.width,this._height=n.height,(e=new Mu(this._width*this._pixelRatio,this._height*this._pixelRatio,{type:Jm})).texture.name="EffectComposer.rt1"}else this._width=e.width,this._height=e.height;this.renderTarget1=e,this.renderTarget2=e.clone(),this.renderTarget2.texture.name="EffectComposer.rt2",this.writeBuffer=this.renderTarget1,this.readBuffer=this.renderTarget2,this.renderToScreen=!0,this.passes=[],this.copyPass=new hpe(ape),this.copyPass.material.blending=Jc,this.clock=new O$}swapBuffers(){const t=this.readBuffer;this.readBuffer=this.writeBuffer,this.writeBuffer=t}addPass(t){this.passes.push(t),t.setSize(this._width*this._pixelRatio,this._height*this._pixelRatio)}insertPass(t,e){this.passes.splice(e,0,t),t.setSize(this._width*this._pixelRatio,this._height*this._pixelRatio)}removePass(t){const e=this.passes.indexOf(t);-1!==e&&this.passes.splice(e,1)}isLastEnabledPass(t){for(let e=t+1;e0?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;lG.fromArray(r,t),bO.fromArray(r,e),cG.fromArray(r,n),Va.subVectors(cG,bO),dG.subVectors(lG,bO),Va.cross(dG),Va.normalize(),s.push(Va.x,Va.y,Va.z),s.push(Va.x,Va.y,Va.z),s.push(Va.x,Va.y,Va.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 d=this.vertices.length;let h=this.parseVertexIndex(t,d),p=this.parseVertexIndex(e,d),m=this.parseVertexIndex(n,d);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?(QS.setRGB(parseFloat(h[4]),parseFloat(h[5]),parseFloat(h[6])).convertSRGBToLinear(),e.colors.push(QS.r,QS.g,QS.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"===d){const p=c.slice(1).trim().split(aG),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 No;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 ht(d.normals,3)),d.colors.length>0&&(g=!0,b.setAttribute("color",new ht(d.colors,3))),!0===d.hasUVIndices&&b.setAttribute("uv",new ht(d.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 ht(e.vertices,3)),e.colors.length>0&&void 0!==e.colors[0]&&(l.setAttribute("color",new ht(e.colors,3)),a.vertexColors=!0);const c=new zb(l,a);s.add(c)}return s}}class xO extends bf{constructor(t){super(t)}load(t,e,n,r){const s=this,o=""===this.path?Ou.extractUrlBase(t):this.path,a=new Ba(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,d):c;h=h.toLowerCase();let p=d>=0?c.substring(d+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 Mpe(this.resourcePath||e,this.materialOptions);return a.setCrossOrigin(this.crossOrigin),a.setManager(this.manager),a.setMaterials(o),a}}class Mpe{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:lc,this.wrap=void 0!==this.options.wrap?this.options.wrap:Bs}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),d=e.loadTexture(function s(a,l){return"string"!=typeof l||""===l?"":/^https?:\/\//i.test(l)?l:a+l}(e.baseUrl,c.url));d.repeat.copy(c.scale),d.offset.copy(c.offset),d.wrapS=e.wrap,d.wrapT=e.wrap,("map"===a||"emissiveMap"===a)&&(d.colorSpace=cs),r[a]=d}for(const a in n){const l=n[a];let c;if(""!==l)switch(a.toLowerCase()){case"kd":r.color=(new qe).fromArray(l).convertSRGBToLinear();break;case"ks":r.specular=(new qe).fromArray(l).convertSRGBToLinear();break;case"ke":r.emissive=(new qe).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 VS(r),this.materials[t]}getTextureParams(t,e){const n={scale:new xe(1,1),offset:new xe(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:w$;let a=o.getHandler(t);null===a&&(a=new Pu(o)),a.setCrossOrigin&&a.setCrossOrigin(this.crossOrigin);const l=a.load(t,n,r,s);return void 0!==e&&(l.mapping=e),l}}const Cpe=["determinateSpinner"];function Spe(i,t){if(1&i&&(ki(),G(0,"svg",11),Ie(1,"circle",12),j()),2&i){const e=re();It("viewBox",e._viewBox()),V(1),qo("stroke-dasharray",e._strokeCircumference(),"px")("stroke-dashoffset",e._strokeCircumference()/2,"px")("stroke-width",e._circleStrokeWidth(),"%"),It("r",e._circleRadius())}}const Epe=Jy(class{constructor(i){this._elementRef=i}},"primary"),Ape=new me("mat-progress-spinner-default-options",{providedIn:"root",factory:function Dpe(){return{diameter:uG}}}),uG=100;let e0=(()=>{class i extends Epe{constructor(e,n,r){super(e),this.mode="mat-spinner"===this._elementRef.nativeElement.nodeName.toLowerCase()?"indeterminate":"determinate",this._value=0,this._diameter=uG,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,Ps(e)))}get diameter(){return this._diameter}set diameter(e){this._diameter=Ps(e)}get strokeWidth(){return this._strokeWidth??this.diameter/10}set strokeWidth(e){this._strokeWidth=Ps(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)(E(vt),E(kr,8),E(Ape))},i.\u0275cmp=ot({type:i,selectors:[["mat-progress-spinner"],["mat-spinner"]],viewQuery:function(e,n){if(1&e&&$n(Cpe,5),2&e){let r;At(r=Dt())&&(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&&(It("aria-valuemin",0)("aria-valuemax",100)("aria-valuenow","determinate"===n.mode?n.value:null)("mode",n.mode),qo("width",n.diameter,"px")("height",n.diameter,"px"),ln("_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:[dt],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&&(fe(0,Spe,2,8,"ng-template",null,0,zc),G(2,"div",1,2),ki(),G(4,"svg",3),Ie(5,"circle",4),j()(),va(),G(6,"div",5)(7,"div",6)(8,"div",7),sy(9,8),j(),G(10,"div",9),sy(11,8),j(),G(12,"div",10),sy(13,8),j()()()),2&e){const r=Zi(1);V(4),It("viewBox",n._viewBox()),V(1),qo("stroke-dasharray",n._strokeCircumference(),"px")("stroke-dashoffset",n._strokeDashOffset(),"px")("stroke-width",n._circleStrokeWidth(),"%"),It("r",n._circleRadius()),V(4),U("ngTemplateOutlet",r),V(2),U("ngTemplateOutlet",r),V(2),U("ngTemplateOutlet",r)}},dependencies:[xy],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})(),Ipe=(()=>{class i{}return i.\u0275fac=function(e){return new(e||i)},i.\u0275mod=en({type:i}),i.\u0275inj=Wt({imports:[co,Jn]}),i})();const Rpe=["previewCanvasContainer"],kpe=["previewCanvas"];function Ppe(i,t){if(1&i){const e=jn();Gr(0),G(1,"label",11),Be(2),j(),G(3,"input",12),Oe("change",function(r){Vt(e);const s=re().$implicit;return s.value=r.currentTarget.checked,Et(s.change(s.value))}),j(),Wr()}if(2&i){const e=re(),n=e.index,r=e.$implicit,s=re().index;V(1),U("for","custom_control_"+s+"_"+n),V(1),ui(r.label),V(1),U("id","custom_control_"+s+"_"+n)("type",r.type)("checked",r.value)}}function Ope(i,t){if(1&i){const e=jn();G(0,"div",9)(1,"label",11),Be(2),j(),G(3,"input",14),Oe("change",function(){const s=Vt(e).$implicit,o=re(2).$implicit;return o.value=s,Et(o.change(o.value))}),j()()}if(2&i){const e=t.$implicit,n=re(2),r=n.index,s=n.$implicit,o=re().index;V(1),U("for","custom_control_"+o+"_"+r+"_"+e),V(1),ui(e),V(1),U("id","custom_control_"+o+"_"+r+"_"+e)("checked",s.value===e)}}function Fpe(i,t){if(1&i&&(G(0,"div",13)(1,"label"),Be(2),j(),fe(3,Ope,4,4,"div",8),j()),2&i){const e=re().$implicit;V(2),ui(e.label),V(1),U("ngForOf",e.options)}}function Lpe(i,t){if(1&i){const e=jn();Gr(0),G(1,"label",11),Be(2),j(),G(3,"input",15),Oe("colorChange",function(r){Vt(e);const s=re().$implicit,o=re(2);return s.value=o.toRGB(r.value),Et(s.change(s.value))}),j(),Ie(4,"ngx-mat-color-toggle",16)(5,"ngx-mat-color-picker",null,17),Wr()}if(2&i){const e=Zi(6),n=re(),r=n.index,s=n.$implicit,o=re().index;V(1),U("for","custom_control_"+o+"_"+r),V(1),ui(s.label),V(1),U("ngxMatColorPicker",e),V(1),U("for",e)}}function Npe(i,t){if(1&i){const e=jn();Gr(0),G(1,"label",11),Be(2),j(),G(3,"input",18),Oe("change",function(r){Vt(e);const s=re().$implicit;return s.value=r.currentTarget.value,Et(s.change(s.value))}),j(),Wr()}if(2&i){const e=re(),n=e.index,r=e.$implicit,s=re().index;V(1),U("for","custom_control_"+s+"_"+n),V(1),ui(r.label),V(1),U("id","custom_control_"+s+"_"+n)("min",r.minValue)("max",r.maxValue)("step",r.valueStep)("value",r.value)}}function Bpe(i,t){if(1&i&&(G(0,"div",9),fe(1,Ppe,4,5,"ng-container",6),fe(2,Fpe,4,2,"div",10),fe(3,Lpe,7,4,"ng-container",6),fe(4,Npe,4,7,"ng-container",6),j()),2&i){const e=t.$implicit;V(1),U("ngIf","checkbox"===e.type),V(1),U("ngIf","radio"===e.type),V(1),U("ngIf","color"===e.type),V(1),U("ngIf","slider"===e.type)}}function Upe(i,t){if(1&i&&(Gr(0),G(1,"h4"),Be(2),j(),fe(3,Bpe,5,4,"div",8),Wr()),2&i){const e=t.$implicit;V(2),ui(e.title),V(1),U("ngForOf",e.controls)}}function Vpe(i,t){if(1&i){const e=jn();G(0,"div",9)(1,"label",11),Be(2),j(),G(3,"input",19),Oe("change",function(r){return Et(Vt(e).$implicit.visible=r.currentTarget.checked)}),j()()}if(2&i){const e=t.$implicit;V(1),U("for","visibility_"+e.name),V(1),ui(e.name),V(1),U("id","visibility_"+e.name)("checked",e.visible)}}function zpe(i,t){if(1&i&&(Gr(0),G(1,"h4"),Be(2,"Objects visibility"),j(),fe(3,Vpe,4,4,"div",8),Wr()),2&i){const e=re();V(3),U("ngForOf",e.meshes)}}function Hpe(i,t){1&i&&Ie(0,"mat-spinner",20)}const sa=i=>{i.colorSpace="srgb",i.anisotropy=8,i.magFilter=vr,i.minFilter=vr};let hG=(()=>{class i{constructor(e){this.cdr=e,this.visibilityControls=!0,this.groupFunction=null,this.customControls=[],this.onObjectLoaded=new $e,this._paths$=new Qe(null),this.destroyed$=new Te,this.entity=null,this.meshes=[]}get paths(){return this._paths$.getValue()}set paths(e){this._paths$.next(e)}ngAfterViewInit(){var e=this;return nt(function*(){var s;e.world=new ok(new yO,{init:(s=nt(function*(){}),function(){return s.apply(this,arguments)}),simulate:()=>{}}),yield e.world.init(),e.world.visualScene.nativeScene.add(new $S(16777215,2));let n=new Qe({x:1,y:1});e.renderer=e.world.addRenderer(e.world.visualScene.factory.createPerspectiveCamera({frustrum:{near:.01,far:1e4}}),e.previewCanvas.nativeElement,{size:n.asObservable(),background:11184810}),e.controller=new Hse(e.renderer,{mouseOptions:{canvas:e.previewCanvas.nativeElement},orbiting:{sensitivityX:2,sensitivityY:2},orbitingElasticity:30}),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(Ue(e.destroyed$)).subscribe(function(){var s=nt(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 Jb,h=yield(new xO).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 No;y.add(...b[v]),y.name=v,p.remove(...b[v]),p.add(y)}}e.meshes=p.children,e.meshes.sort((b,v)=>b.name>v.name?1:-1),p.traverse(b=>{if(b instanceof Mn){const v=b.material instanceof Array?b.material:[b.material];for(const y of v)y.transparent=!0,y.alphaTest=.5,y instanceof qi&&y.map&&(y.map.wrapS=er,y.map.wrapT=er,sa(y.map),y.map.needsUpdate=!0)}}),e.onObjectLoaded.next(p),e.entity=new Jo({object3D:new ra(p)}),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=Re.scalarMult(Re.add(m.min,m.max),.5),e.controller.spherical={phi:1.22,theta:-1.32,radius:Re.dist(m.min,m.max)},e.cdr.markForCheck()}});return function(o){return s.apply(this,arguments)}}())})()}toRGB(e){return(e?.r||0)<<16|(e?.g||0)<<8|(e?.b||0)}ngOnDestroy(){this.destroyed$.next(),this.destroyed$.complete()}}return i.\u0275fac=function(e){return new(e||i)(E(Qn))},i.\u0275cmp=ot({type:i,selectors:[["app-obj-viewer"]],viewQuery:function(e,n){if(1&e&&($n(Rpe,5),$n(kpe,5)),2&e){let r;At(r=Dt())&&(n.previewCanvasContainer=r.first),At(r=Dt())&&(n.previewCanvas=r.first)}},inputs:{paths:"paths",visibilityControls:"visibilityControls",groupFunction:"groupFunction",customControls:"customControls"},outputs:{onObjectLoaded:"onObjectLoaded"},decls:8,vars:3,consts:[[1,"previewCanvasContainer"],["previewCanvasContainer",""],["width","640","height","480"],["previewCanvas",""],["id","controls"],[4,"ngFor","ngForOf"],[4,"ngIf"],["mode","indeterminate",4,"ngIf"],["class","controls-list",4,"ngFor","ngForOf"],[1,"controls-list"],["style","width: 100%",4,"ngIf"],[3,"for"],[3,"id","type","checked","change"],[2,"width","100%"],["type","radio",3,"id","checked","change"],["matInput","",1,"hidden",3,"ngxMatColorPicker","colorChange"],["matSuffix","",3,"for"],["picker",""],["type","range",3,"id","min","max","step","value","change"],["type","checkbox",3,"id","checked","change"],["mode","indeterminate"]],template:function(e,n){1&e&&(G(0,"div",0,1),Ie(2,"canvas",2,3),G(4,"div",4),fe(5,Upe,4,2,"ng-container",5),fe(6,zpe,4,1,"ng-container",6),j(),fe(7,Hpe,1,0,"mat-spinner",7),j()),2&e&&(V(5),U("ngForOf",n.customControls),V(1),U("ngIf",n.visibilityControls),V(1),U("ngIf",!n.entity))},dependencies:[lo,vi,Xte,rc,e0,jie,yC,NH],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%] > h4[_ngcontent-%COMP%]{margin:0}.previewCanvasContainer[_ngcontent-%COMP%] #controls[_ngcontent-%COMP%] .controls-list[_ngcontent-%COMP%]{width:100%;display:flex;-webkit-user-select:none;user-select:none;align-items:center}.previewCanvasContainer[_ngcontent-%COMP%] #controls[_ngcontent-%COMP%] .controls-list[_ngcontent-%COMP%] > span[_ngcontent-%COMP%]{flex-grow:1}.previewCanvasContainer[_ngcontent-%COMP%] #controls[_ngcontent-%COMP%] .controls-list[_ngcontent-%COMP%] > label[_ngcontent-%COMP%]{flex-grow:1}"],changeDetection:0}),i})();function $pe(i,t){if(1&i){const e=jn();ki(),G(0,"circle",5),Oe("mousedown",function(r){return Vt(e),Et(re().startDrag(r))}),ct(1,"async"),ct(2,"async"),j()}if(2&i){const e=re();let n,r;It("cx",(null==(n=ut(1,3,e.mapPointer$))?null:n.x)||0)("cy",(null==(r=ut(2,5,e.mapPointer$))?null:r.y)||0)("r",10)}}const Gpe=function(){return{"stroke-width":3}};let fG=(()=>{class i{constructor(e){this.ref=e,this._roadSpline$=new Qe([]),this._pointer$=new Qe(null),this._projection$=new Qe("nz"),this._roadSplineProjected$=new Qe([]),this._pointerProjected$=new Qe(yi.O),this.splineClosed=!1,this.pointerChange=new $e,this.svgSize$=new Qe({x:100,y:100}),this.scalingSquare$=new Qe({x:0,y:0,width:100,height:100}),this.mapPolyline$=new Qe(""),this.mapPointer$=new Qe(null),this.isShiftPressed=!1,this.destroyed$=new Te,this.isDragging=!1}set roadSpline(e){this._roadSpline$.next(e)}set pointer(e){this._pointer$.next(e)}set projection(e){this._projection$.next(e)}get trackLength$(){return this._roadSpline$.pipe(tt(e=>{let n=0;for(let r=1;r{"Shift"===n.key&&(this.isShiftPressed=!0)}),To(window,"keyup").pipe(Ue(this.destroyed$)).subscribe(n=>{"Shift"===n.key&&(this.isShiftPressed=!1)}),Ra([this._roadSpline$,this._projection$]).pipe(Ue(this.destroyed$)).subscribe(([n,r])=>{this._roadSplineProjected$.next(n.map(s=>this.project(s)))}),Ra([this._pointer$,this._projection$]).pipe(Ue(this.destroyed$)).subscribe(([n,r])=>{this._pointerProjected$.next(this.project(n||Re.O))}),this._roadSplineProjected$.pipe(Ue(this.destroyed$),tt(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.y)},s={x:Math.max(s.x,a.x),y:Math.max(s.y,a.y)}});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$),Ra([this._roadSplineProjected$,this.scalingSquare$,this.svgSize$]).pipe(Ue(this.destroyed$),tt(([n,r,s])=>{const o=n.map(a=>({x:(a.x-r.x)*s.x/r.width,y:(r.y-a.y)*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$),Ra([this._pointerProjected$,this.scalingSquare$.asObservable(),this.svgSize$]).pipe(Ue(this.destroyed$),tt(([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()}startDrag(e){this.isDragging=!0,this.updatePointer(e)}drag(e){this.isDragging&&this.updatePointer(e)}endDrag(){this.isDragging=!1}getClosestProjectedLineIndex(e){const n=this._roadSplineProjected$.getValue();let r=-1,s=Number.MAX_SAFE_INTEGER;for(let d=1;d{return(i=Df||(Df={})).ThreeModel="model",i.Bitmap="bitmap",i.TwoSidedBitmap="two_sided_bitmap",Df;var i})();class Qpe extends QH{constructor(t,e,n){super(t,{loadDepth:40,inertia:2}),this.mapGraph=t,this.famPath=e,this.hideUnknownEntities$=n,this.textureLoader=new Pu,this.terrainMaterials={},this.objLoader=new Jb,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(Ql(),Ue(this._onRemoved$)).subscribe(e=>{for(const n of this.unknownEntities)n.visible=!e})}getPlaceholderTexture(){var t=this;return nt(function*(){return t._placeholder?t._placeholder:(t._placeholderPromise||(t._placeholderPromise=t.textureLoader.loadAsync("assets/placeholder_texture.png")),t._placeholderPromise)})()}getPlaceholderTerrainTexture(){var t=this;return nt(function*(){return t._placeholderTerrain?t._placeholderTerrain:(t._placeholderTerrainPromise||(t._placeholderTerrainPromise=t.textureLoader.loadAsync("assets/placeholder_texture.png").then(e=>(e.wrapS=Bs,e.wrapT=er,sa(e),e.flipY=!0,e))),t._placeholderTerrainPromise)})()}loadChunk(t){var e=this;return nt(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 Mn&&(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:Re.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:Yi.fromAngle(Re.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 Jo({object3D:new ra(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 qi({side:Ns,transparent:!0,visible:!1}),this.famPath?this.textureLoader.loadAsync(`${this.famPath}/background/${t}.png`).then(e=>{e.wrapS=Bs,e.wrapT=er,sa(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 nt(function*(){let n=!1;if(t.type==Df.ThreeModel){let r;try{if(!e.famPath)throw new Error;const o=new xO,a=new Jb,l=yield o.loadAsync(`${e.famPath}/props/${t.data.data.resource_id}/0/material.mtl`);l.preload(),a.setMaterials(l),r=new ra(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 Mn){const a=o.material instanceof Array?o.material:[o.material];for(const l of a)l.transparent=!0,l.alphaTest=.5,l instanceof qi&&l.map&&(l.map.wrapS=er,l.map.wrapT=er,sa(l.map),l.map.needsUpdate=!0)}});const s=new Jo({object3D: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,d)=>new Array(d).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 No,[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,d]=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 Jo({object3D:new ra(s)});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 nt(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=>(sa(h),new qi({map:h,alphaTest:.5,transparent:!0,side:Ns}))),d=new Mn(new Iu(e.x,e.y),c[0]);if(d.rotateX(Math.PI/2),d.position.set(0,0,e.y/2),c.length>1){let h=-1;Ym(r.world).pipe(o4(n&&!isNaN(+n)?1e3*+n:250)).subscribe(()=>{h=(h+1)%c.length,d.material=c[h]})}return[d,a]})()}}let Jpe=(()=>{class i{constructor(e,n,r){this.eelDelegate=e,this.cdr=n,this.mainService=r,this._resource$=new Qe(null),this.changed=new $e,this.previewLoading$=new Qe(!0),this.previewFamLocation$=new Qe(null),this.previewFamLoading$=new Qe(!1),this.pointer$=new Qe(null),this.selectedSplineIndex$=new Qe(0),this.selectedSplineItem$=new Qe(null),this.selectedAiInfoItem$=new Qe(null),this.selectedTerrainItem$=new Qe(null),this.famPath=null,this.name="",this.renderer=null,this.map=null,this.isOpenedTrack=!0,this.roadPath=null,this.destroyed$=new Te}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=>({x:e.position.x,y:e.position.z,z:e.position.y}))||[]}ngAfterViewInit(){var e=this;return nt(function*(){var s;e.world=new ok(new yO,{init:(s=nt(function*(){}),function(){return s.apply(this,arguments)}),simulate:()=>{},loader:{loadFromGgGlb:function(){var s=nt(function*(...o){return[]});return function(){return s.apply(this,arguments)}}()}}),yield e.world.init(),e.skySphere=new Jo({object3D:e.world.visualScene.factory.createPrimitive({shape:"SPHERE",radius:1e3},{color:16777215})}),e.skySphere.object3D.nativeMesh.material.side=Ns,e.world.addEntity(e.skySphere),e.selectionSphere=new Jo({object3D: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 $S(16777215,2));let n=new Qe({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=Yi.lookAt(e.renderer.camera.position,Re.add(e.renderer.camera.position,Re.Y),Re.Z),Ym(e.world).pipe(Ue(e.destroyed$)).subscribe(()=>{e.renderer&&(e.skySphere.position=e.renderer.camera.position,e.pointer$.next(e.renderer.camera.position))}),e.controller=new n4(e.world.keyboardInput,e.renderer,{mouseOptions:{canvas:e.previewCanvas.nativeElement,pointerLock:!0},keymap:"wasd+arrows",cameraLinearSpeed:40,cameraBoostMultiplier:4,cameraMovementElasticity:100,cameraRotationElasticity:30,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(Ue(e.destroyed$)).subscribe(function(){var s=nt(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(Ue(e.destroyed$),gn(([s,o])=>!!e.resource&&s.startsWith(e.resource.id)),gl(3e3)).subscribe(nt(function*(){e.previewLoading$.next(!0),yield e.postTmpUpdates(e.resource?.id),yield e.loadPreview(),e.previewLoading$.next(!1)})),e.selectedSplineIndex$.pipe(Ue(e.destroyed$),gl(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=Re.add(a,Re.rotAround({x:10,y:-12,z:5},{x:0,y:0,z:1},-e.resource.data.road_spline[s].orientation)),e.renderer.rotation=Yi.lookAt(e.renderer.position,a,{x:0,y:0,z:1}),e.controller.reset())}e.selectedSplineItem$.next({id:sc(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:sc(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:sc(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 nt(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 Pu,o=r.find(a=>a.endsWith("spherical.png"));if(o){const a=yield s.loadAsync(o);a.colorSpace="srgb",a.mapping=cc,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 nt(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})()}onPointerChange(e){this.renderer&&(this.renderer.position=e)}loadPreview(){var e=this;return nt(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=Km.fromMapArray(e.roadPath.map((r,s)=>({path:`${e.terrainChunksObjLocation}terrain_chunk_${s}`,position:r,loadOptions:{}}))||[],!e.isOpenedTrack);e.unloadPreview(),e.map=new Qpe(n,e.famPath&&"resources/"+e.famPath,e.mainService.hideHiddenFields$),e.map.resource=e.resource,e.map.isOpenedTrack=e.isOpenedTrack,Ym(e.world).pipe(Ue(e.destroyed$)).subscribe(()=>{e.map&&e.renderer&&e.map.loaderCursor$.next(e.renderer.position)}),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 nt(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)(E(Jl),E(Qn),E(Fa))},i.\u0275cmp=ot({type:i,selectors:[["app-tri-map-block-ui"]],viewQuery:function(e,n){if(1&e&&($n(Wpe,5),$n(jpe,5)),2&e){let r;At(r=Dt())&&(n.previewCanvasContainer=r.first),At(r=Dt())&&(n.previewCanvas=r.first)}},inputs:{resource:"resource"},outputs:{changed:"changed"},decls:49,vars:44,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","projection","pointerChange"],[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&&(G(0,"div",0)(1,"h4"),Be(2,"Preview *.FAM file"),j(),G(3,"mat-form-field",1)(4,"mat-label"),Be(5,"Current preview FAM"),j(),G(6,"mat-select",2,3),Oe("valueChange",function(s){return n.onFamSelected(s)}),ct(8,"async"),ct(9,"async"),fe(10,Ype,2,2,"mat-option",4),G(11,"mat-option",5),Be(12,"custom"),j()()(),fe(13,qpe,9,3,"ng-container",6),fe(14,Xpe,1,1,"mat-spinner",7),ct(15,"async"),j(),G(16,"div",8)(17,"div",9,10),Ie(19,"canvas",11,12),fe(21,Kpe,1,0,"mat-spinner",13),ct(22,"async"),j(),G(23,"div",14,10)(25,"mat-form-field",1)(26,"mat-label"),Be(27,"Spline item"),j(),G(28,"input",15),Oe("ngModelChange",function(s){return n.selectedSplineIndex$.next(s)}),ct(29,"async"),ct(30,"async"),j()(),G(31,"app-minimap",16),Oe("pointerChange",function(s){return n.onPointerChange(s)}),ct(32,"async"),j()()(),G(33,"h4"),Be(34,"Road spline item"),j(),Ie(35,"app-compound-block-ui",17),ct(36,"async"),G(37,"h4"),Be(38,"AI info (block for 4 spline items)"),j(),Ie(39,"app-compound-block-ui",17),ct(40,"async"),G(41,"h4"),Be(42,"Terrain (block for 4 spline items)"),j(),Ie(43,"app-compound-block-ui",17),ct(44,"async"),G(45,"h4"),Be(46,"Common"),j(),Ie(47,"app-compound-block-ui",18),ct(48,"async")),2&e){const r=Zi(7);let s;V(6),U("value",n.previewFamPossibleLocations.includes(ut(8,21,n.previewFamLocation$))?ut(9,23,n.previewFamLocation$):"custom"),V(4),U("ngForOf",n.previewFamPossibleLocations),V(3),U("ngIf","custom"==r.value),V(1),U("ngIf",ut(15,25,n.previewFamLoading$)),V(7),U("ngIf",ut(22,27,n.previewLoading$)),V(7),U("min",0)("max",4*(null==(s=ut(29,29,n._resource$))?null:s.data.num_chunks)-1)("ngModel",ut(30,31,n.selectedSplineIndex$)),V(3),U("roadSpline",n.roadSpline)("pointer",ut(32,33,n.pointer$))("splineClosed",!n.isOpenedTrack)("projection","nz"),V(4),U("resource",ut(36,35,n.selectedSplineItem$))("hideBlockActions",!0),V(4),U("resource",ut(40,37,n.selectedAiInfoItem$))("hideBlockActions",!0),V(4),U("resource",ut(44,39,n.selectedTerrainItem$))("hideBlockActions",!0),V(4),U("resource",ut(48,41,n._resource$))("hideBlockActions",!0)("fieldWhitelist",Rs(43,Zpe))}},dependencies:[lo,vi,_l,mu,nc,_u,gu,Zc,yl,Ro,rc,rb,pb,Nm,e0,ec,fG,Ia],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-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})();const pG=i=>new Promise(t=>setTimeout(t,i)),mG=(i,t,e=null)=>{const n=document.createElement("canvas"),r=n.getContext("2d",{willReadFrequently:!0}),s=i.width,o=i.height;n.width=s,n.height=o,r.drawImage(i,0,0,s,o);const a=r.getImageData(0,0,s,o);for(let l=0;l{if(!(o instanceof Mn))return;let a=-1;if(o.name.startsWith("lbl__rt_frnt")?a=0:o.name.startsWith("lbl__lt_frnt")?a=1:o.name.startsWith("lbl__rt_rear")?a=2:o.name.startsWith("lbl__lt_rear")&&(a=3),a>-1){this.wheels[a]=o,a<2&&(this.frontWheels[a]=o),o.geometry.boundingBox||o.geometry.computeBoundingBox();const l=Re.avg(o.geometry.boundingBox.min,o.geometry.boundingBox.max);o.geometry.translate(...Re.spr(Re.neg(l))),o.position.set(...Re.spr(l)),this.wheelIdlePositions[a]=l}(o.name.includes("rsid")||o.name.includes("lite"))&&(r.push(o),this.originalTexWithTailLights=o.material.map)}),!this.originalTexWithTailLights)throw new Error("Not a driveable NFS1 car");this.tailLightColors=n.includes("TRAFFC.CFM")?[9509903,16711680]:[3212546,16258068],this.texWithTailLightsImg=document.createElement("img"),this.texWithTailLights=new Oo(this.texWithTailLightsImg),this.texWithTailLights.flipY=this.originalTexWithTailLights.flipY,sa(this.texWithTailLights),this.recolorTailLights(this.tailLightColors[0]).then();for(const o of r)o.material.map=this.texWithTailLights;const s=new Pu;this.tyreTextures=[1,2,3,4].map(o=>s.load(`${n}/tyr${o}.png`));for(const o of this.tyreTextures)sa(o);this.tyreMaterial=new qi({map:this.tyreTextures[0]}),this.tyreMaterial.transparent=!0,this.tyreMaterial.alphaTest=.5,this.tyreMaterial.map.wrapS=er,this.tyreMaterial.map.wrapT=er,this.tyreMaterial.polygonOffset=!0,this.tyreMaterial.polygonOffsetFactor=-4;for(const o of this.wheels)o.material=this.tyreMaterial}get tailLightsOn(){return this._tailLightsOn}set tailLightsOn(t){t!==this._tailLightsOn&&(this._tailLightsOn=t,this.recolorTailLights(this.tailLightColors[t?1:0]))}get speed(){return this._speed}set speed(t){if(t!==this._speed){switch(this._speed=t,this.tyreTextureUpdateTimer&&clearInterval(this.tyreTextureUpdateTimer),t){case"idle":this.tyreMaterial.map=this.tyreTextures[0];break;case"slow":let e=!0;this.tyreTextureUpdateTimer=setInterval(()=>{this.tyreMaterial.map=this.tyreTextures[e?1:2],this.tyreMaterial.needsUpdate=!0,e=!e},16);break;case"fast":this.tyreMaterial.map=this.tyreTextures[3]}this.tyreMaterial.needsUpdate=!0}}get steeringAngle(){return this._steeringAngle}set steeringAngle(t){if(t!==this._steeringAngle){this._steeringAngle=t;for(const e of this.frontWheels)e.rotation.set(0,0,t)}}recolorTailLights(t){var e=this;return nt(function*(){if(e.originalTexWithTailLights&&e.texWithTailLights&&e.texWithTailLightsImg){for(let n=100;n>0&&!e.originalTexWithTailLights.source.data;n--)yield pG(50);((i,t,e,n=null)=>{const[r,s,o]=[t>>16,t>>8&255,255&t],[a,l,c]=[e>>16,e>>8&255,255&e];mG(i,(d,h)=>{d[h]==r&&d[h+1]==s&&d[h+2]==o&&(d[h]=a,d[h+1]=l,d[h+2]=c)},n)})(e.originalTexWithTailLights.source.data,e.tailLightsTexColor,t,e.texWithTailLightsImg),e.texWithTailLights.needsUpdate=!0}})()}dispose(){this.texWithTailLightsImg&&(this.texWithTailLightsImg.remove(),this.texWithTailLightsImg=null),this.texWithTailLights&&(this.texWithTailLights.dispose(),this.texWithTailLights=null),this.tyreTextureUpdateTimer&&clearInterval(this.tyreTextureUpdateTimer),this.tyreMaterial&&(this.tyreMaterial.dispose(),this.tyreMaterial=null)}}let nme=(()=>{class i{constructor(e,n,r){this.eelDelegate=e,this.mainService=n,this.cdr=r,this._resource$=new Qe(null),this.changed=new $e,this.previewPaths$=new Qe(null),this.destroyed$=new Te,this.customControls=[],this.serializerSettings={geometry__save_obj:!0,geometry__save_blend:!1,geometry__export_to_gg_web_engine:!1}}get resource(){return this._resource$.getValue()}set resource(e){this._resource$.next(e)}ngAfterViewInit(){var e=this;return nt(function*(){e._resource$.pipe(Ue(e.destroyed$)).subscribe(function(){var n=nt(function*(r){e.previewPaths$.next(yield e.loadPreviewFilePaths(r?.id))});return function(r){return n.apply(this,arguments)}}()),e.mainService.dataBlockChange$.pipe(Ue(e.destroyed$),gn(([n,r])=>!!e.resource&&n.startsWith(e.resource.id)),gl(1500)).subscribe(nt(function*(){e.previewPaths$.next(null),e.previewPaths$.next(yield e.postTmpUpdates(e.resource?.id))}))})()}onObjectLoaded(e){var n=this;return nt(function*(){if((n._resource$.value?.id||"").includes(".CFM__"))try{const r=n.resource?.id.split("/");r.pop(),r[r.length-1]=""+(+r[r.length-1]+1);const s=yield n.eelDelegate.retrieveValue(r.join("/")+"/data"),o=s.children_aliases.findIndex(l=>"!PAL"===l);if(-1==o)throw new Error("Not a car");const a=new tme(e,s.children[o].data.colors[254]>>>8,n.previewPaths$.value[0].substring(0,n.previewPaths$.value[0].lastIndexOf("/"))+"/assets");n.customControls=[{title:"TNFS car features",controls:[{label:"Brake lights on",type:"checkbox",value:!1,change:l=>{a.tailLightsOn=l}},{label:"Car speed",type:"radio",options:["idle","slow","fast"],value:"idle",change:l=>{a.speed=l}},{label:"Steering angle",type:"slider",minValue:-.7,maxValue:.7,valueStep:.05,value:0,change:l=>{a.steeringAngle=l}}]}],n.cdr.markForCheck()}catch{}})()}postTmpUpdates(e){var n=this;return nt(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 nt(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)(E(Jl),E(Fa),E(Qn))},i.\u0275cmp=ot({type:i,selectors:[["app-orip-geometry-block-ui"]],inputs:{resource:"resource"},outputs:{changed:"changed"},decls:4,vars:7,consts:[[3,"paths","customControls","onObjectLoaded"],[3,"resource"]],template:function(e,n){1&e&&(G(0,"app-obj-viewer",0),Oe("onObjectLoaded",function(s){return n.onObjectLoaded(s)}),ct(1,"async"),j(),Ie(2,"app-compound-block-ui",1),ct(3,"async")),2&e&&(U("paths",ut(1,3,n.previewPaths$))("customControls",n.customControls),V(2),U("resource",ut(3,5,n._resource$)))},dependencies:[ec,hG,Ia],changeDetection:0}),i})();const gG=i=>{let t=i.block_class_mro.split("__")[0];return"ArrayBlock"===t?gG(i.child_schema)+"[]":t},ime=["class","block-ui"];function rme(i,t){if(1&i&&(G(0,"mat-label",7),Be(1),j()),2&i){const e=re(2);U("matTooltip",e.resourceDescription),V(1),Qi("",null==e.resource?null:e.resource.name," ")}}function sme(i,t){if(1&i&&(G(0,"mat-option",8),Be(1),j()),2&i){const e=t.$implicit,n=t.index,r=re(2);U("value",n)("disabled",r.disabled),V(1),Qi(" ",r.blockClassStr(e)," ")}}function ome(i,t){if(1&i){const e=jn();Gr(0),fe(1,rme,2,2,"mat-label",1),ct(2,"async"),G(3,"div",2)(4,"mat-label"),Be(5,"Resource type:"),j(),G(6,"mat-select",3),Oe("selectionChange",function(r){return Vt(e),Et(re().setChoiceIndex(r.value))}),fe(7,sme,2,3,"mat-option",4),j(),Ie(8,"app-block-actions",5),j(),Ie(9,"app-editor",6),Wr()}if(2&i){const e=re();let n;V(1),U("ngIf",(null==e.resource?null:e.resource.name)&&(null==e.resource?null:e.resource.name)!=(null==(n=ut(2,8,e.main.resource$))?null:n.name)),V(5),U("value",e.resourceData.choice_index)("disabled",e.disabled),V(1),U("ngForOf",e.resource.schema.possible_resource_schemas),V(1),U("resource",e.childResource),V(1),U("resource",e.childResource)("hideBlockActions",!0)("disabled",e.disabled)}}let _G=(()=>{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 $e,this.blockClassStr=gG}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:sc(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)(E(Fa))},i.\u0275cmp=ot({type:i,selectors:[["app-delegate",8,"block-ui"]],inputs:{resource:"resource",resourceDescription:"resourceDescription",hideBlockActions:"hideBlockActions",disabled:"disabled"},outputs:{changed:"changed"},attrs:ime,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"],[3,"resource","hideBlockActions","disabled"],["matTooltipPosition","above",3,"matTooltip"],[3,"value","disabled"]],template:function(e,n){1&e&&fe(0,ome,10,10,"ng-container",0),2&e&&U("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 ame=["class","block-ui"];function lme(i,t){if(1&i&&(G(0,"mat-label",7),Be(1),j()),2&i){const e=re(2);U("matTooltip",e.resourceDescription),V(1),Qi(" ",e.resource.name," ")}}function cme(i,t){if(1&i){const e=jn();Gr(0),fe(1,lme,2,2,"mat-label",1),G(2,"mat-selection-list",2),Oe("selectionChange",function(r){return Vt(e),Et(re().onSelection(r))}),G(3,"mat-list-option",3),Be(4," Left "),j(),G(5,"mat-list-option",4),Be(6," Right "),j()(),G(7,"mat-form-field",5)(8,"mat-label"),Be(9,"Texture ID"),j(),G(10,"input",6),Oe("ngModelChange",function(r){return Vt(e),Et(re().resource.data.texture_id=r)})("change",function(){return Vt(e),Et(re().changed.emit())}),j()(),Wr()}if(2&i){const e=re();V(1),U("ngIf",e.resource.name),V(2),U("selected",e.resource.data.has_left_fence),V(2),U("selected",e.resource.data.has_right_fence),V(5),U("max",63)("min",0)("step",1)("ngModel",e.resource.data.texture_id)}}let dme=(()=>{class i{constructor(){this.resource=null,this.resourceDescription="",this.changed=new $e}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=ot({type:i,selectors:[["app-fence-type",8,"block-ui"]],inputs:{resource:"resource",resourceDescription:"resourceDescription"},outputs:{changed:"changed"},attrs:ame,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&&fe(0,cme,11,7,"ng-container",0),2&e&&U("ngIf",n.resource)},dependencies:[vi,_l,mu,nc,_u,gu,Zc,yl,Ro,rc,Fs,wC,xC],changeDetection:0}),i})(),ume=(()=>{class i{constructor(){this._resource=null,this.resourceMap={},this.changed=new $e}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]=["",vl.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)(E(ib),E(bte),E(oR))},i.\u0275cmp=ot({type:i,selectors:[["app-run-custom-action",8,"dialog"]],attrs:hme,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&&(G(0,"h1",0),Be(1),j(),G(2,"div",1)(3,"p"),Be(4),j()(),G(5,"form",2),fe(6,fme,4,4,"mat-form-field",3),j(),G(7,"div",4)(8,"button",5),Oe("click",function(){return n.dialogRef.close()}),Be(9,"Cancel"),j(),G(10,"button",6),Oe("click",function(){return n.submit()}),Be(11,"Run"),j()()),2&e&&(V(1),Qi('Run action "',n.data.title,'"'),V(3),ui(n.data.description),V(1),U("formGroup",n.argsForm),V(1),U("ngForOf",n.data.args),V(4),U("disabled",n.argsForm.invalid))},dependencies:[lo,IR,_l,nc,bR,yl,Ro,rc,rb,pV,mV,gV,Gh,hC],styles:["form[_ngcontent-%COMP%]{padding:0 24px}"]}),i})();function vG(i,t){return t?e=>Sy(t.pipe(Oi(1),function mme(){return ni((i,t)=>{i.subscribe(qn(t,ms))})}()),e.pipe(vG(i))):rr((e,n)=>Mr(i(e,n)).pipe(Oi(1),qB(e)))}function yG(i,t=Gy){const e=OI(i,t);return vG(()=>e)}const gme=["mat-menu-item",""];function _me(i,t){1&i&&(ki(),G(0,"svg",3),Ie(1,"polygon",4),j())}const vme=[[["mat-icon"],["","matMenuItemIcon",""]],"*"],yme=["mat-icon, [matMenuItemIcon]","*"];function bme(i,t){if(1&i){const e=jn();G(0,"div",0),Oe("keydown",function(r){return Vt(e),Et(re()._handleKeydown(r))})("click",function(){return Vt(e),Et(re().closed.emit("click"))})("@transformMenu.start",function(r){return Vt(e),Et(re()._onAnimationStart(r))})("@transformMenu.done",function(r){return Vt(e),Et(re()._onAnimationDone(r))}),G(1,"div",1),Yt(2),j()()}if(2&i){const e=re();U("id",e.panelId)("ngClass",e._classList)("@transformMenu",e._panelAnimationState),It("aria-label",e.ariaLabel||null)("aria-labelledby",e.ariaLabelledby||null)("aria-describedby",e.ariaDescribedby||null)}}const xme=["*"],wO=new me("MAT_MENU_PANEL"),wme=jM(WM(class{}));let JS=(()=>{class i extends wme{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 Te,this._focused=new Te,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",Yr("120ms cubic-bezier(0, 0, 0.2, 1)",oi({opacity:1,transform:"scale(1)"}))),Or("* => void",Yr("100ms 25ms linear",oi({opacity:0})))]),fadeInItems:Oa("fadeInItems",[Os("showing",oi({opacity:1})),Or("void => *",[oi({opacity:0}),Yr("400ms 100ms cubic-bezier(0.55, 0, 0.55, 0.2)")])])};let Cme=0;const bG=new me("mat-menu-default-options",{providedIn:"root",factory:function Sme(){return{overlapTrigger:!1,xPosition:"after",yPosition:"below",backdropClass:"cdk-overlay-transparent-backdrop"}}});let t0=(()=>{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=tn(e)}get hasBackdrop(){return this._hasBackdrop}set hasBackdrop(e){this._hasBackdrop=tn(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 om,this._classList={},this._panelAnimationState="void",this._animationDone=new Te,this.overlayPanelClass=this._defaultOptions.overlayPanelClass||"",this.backdropClass=this._defaultOptions.backdropClass,this._overlapTrigger=this._defaultOptions.overlapTrigger,this._hasBackdrop=this._defaultOptions.hasBackdrop,this.closed=new $e,this.close=this.closed,this.panelId="mat-menu-panel-"+Cme++}ngOnInit(){this.setPositionClasses()}ngAfterContentInit(){this._updateDirectDescendants(),this._keyManager=new kU(this._directDescendantItems).withWrap().withTypeAhead().withHomeAndEnd(),this._keyManager.tabOut.subscribe(()=>this.closed.emit("tab")),this._directDescendantItems.changes.pipe(Do(this._directDescendantItems),ks(e=>Cr(...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(Do(this._directDescendantItems),ks(n=>Cr(...n.map(r=>r._hovered))))}addItem(e){}removeItem(e){}_handleKeydown(e){const n=e.keyCode,r=this._keyManager;switch(n){case 27:Zo(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(Oi(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(Do(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)(E(vt),E(gt),E(bG),E(Qn))},i.\u0275dir=ve({type:i,contentQueries:function(e,n,r){if(1&e&&(Wi(r,Mme,5),Wi(r,JS,5),Wi(r,JS,4)),2&e){let s;At(s=Dt())&&(n.lazyContent=s.first),At(s=Dt())&&(n._allItems=s),At(s=Dt())&&(n.items=s)}},viewQuery:function(e,n){if(1&e&&$n(Eo,5),2&e){let r;At(r=Dt())&&(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})(),Eme=(()=>{class i extends t0{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)(E(vt),E(gt),E(bG),E(Qn))},i.\u0275cmp=ot({type:i,selectors:[["mat-menu"]],hostVars:3,hostBindings:function(e,n){2&e&&It("aria-label",null)("aria-labelledby",null)("aria-describedby",null)},exportAs:["matMenu"],features:[Dn([{provide:wO,useExisting:i}]),dt],ngContentSelectors:xme,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&&(or(),fe(0,bme,3,6,"ng-template"))},dependencies:[hm],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:[eE.transformMenu,eE.fadeInItems]},changeDetection:0}),i})();const xG=new me("mat-menu-scroll-strategy"),Dme={provide:xG,deps:[as],useFactory:function Ame(i){return()=>i.scrollStrategies.reposition()}},wG=Fh({passive:!0});let Tme=(()=>{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,d){this._overlay=e,this._element=n,this._viewContainerRef=r,this._menuItemInstance=a,this._dir=l,this._focusMonitor=c,this._ngZone=d,this._overlayRef=null,this._menuOpen=!1,this._closingActionsSubscription=Qt.EMPTY,this._hoverSubscription=Qt.EMPTY,this._menuCloseSubscription=Qt.EMPTY,this._changeDetectorRef=Lt(Qn),this._handleTouchStart=h=>{qI(h)||(this._openedBy="touch")},this._openedBy=void 0,this.restoreFocus=!0,this.menuOpened=new $e,this.onMenuOpen=this.menuOpened,this.menuClosed=new $e,this.onMenuClose=this.menuClosed,this._scrollStrategy=s,this._parentMaterialMenu=o instanceof t0?o:void 0,n.nativeElement.addEventListener("touchstart",this._handleTouchStart,wG)}ngAfterContentInit(){this._handleHover()}ngOnDestroy(){this._overlayRef&&(this._overlayRef.dispose(),this._overlayRef=null),this._element.nativeElement.removeEventListener("touchstart",this._handleTouchStart,wG),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 t0&&(e._startAnimation(),e._directDescendantItems.changes.pipe(Ue(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 t0?(n._resetAnimation(),n.lazyContent?n._animationDone.pipe(gn(r=>"void"===r.toState),Oi(1),Ue(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],[d,h]=[r,s],p=0;if(this.triggersSubmenu()){if(h=r="before"===e.xPosition?"start":"end",s=d="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:d,overlayY:o,offsetY:p},{originX:s,originY:l,overlayX:h,overlayY:o,offsetY:p},{originX:r,originY:c,overlayX:d,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 Cr(e,this._parentMaterialMenu?this._parentMaterialMenu.closed:mt(),this._parentMaterialMenu?this._parentMaterialMenu._hovered().pipe(gn(o=>o!==this._menuItemInstance),gn(()=>this._menuOpen)):mt(),n)}_handleMousedown(e){YI(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(gn(e=>e===this._menuItemInstance&&!e.disabled),yG(0,PI)).subscribe(()=>{this._openedBy="mouse",this.menu instanceof t0&&this.menu._isAnimating?this.menu._animationDone.pipe(Oi(1),yG(0,PI),Ue(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)(E(as),E(vt),E(jr),E(xG),E(wO,8),E(JS,10),E(Pa,8),E(Xc),E(gt))},i.\u0275dir=ve({type:i,hostVars:3,hostBindings:function(e,n){1&e&&Oe("click",function(s){return n._handleClick(s)})("mousedown",function(s){return n._handleMousedown(s)})("keydown",function(s){return n._handleKeydown(s)}),2&e&&It("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})(),Ime=(()=>{class i extends Tme{}return i.\u0275fac=function(){let t;return function(n){return(t||(t=si(i)))(n||i)}}(),i.\u0275dir=ve({type:i,selectors:[["","mat-menu-trigger-for",""],["","matMenuTriggerFor",""]],hostAttrs:[1,"mat-mdc-menu-trigger"],exportAs:["matMenuTrigger"],features:[dt]}),i})(),Rme=(()=>{class i{}return i.\u0275fac=function(e){return new(e||i)},i.\u0275mod=en({type:i}),i.\u0275inj=Wt({providers:[Dme],imports:[co,tb,Jn,Pm,Ky,Jn]}),i})();function kme(i,t){if(1&i){const e=jn();G(0,"button",7),Oe("click",function(){return Vt(e),Et(re(2).deserialize())}),Ie(1,"mat-icon",8),j()}}function Pme(i,t){if(1&i){const e=jn();Gr(0),fe(1,kme,2,0,"button",4),G(2,"button",5),Oe("click",function(){return Vt(e),Et(re().serializeBlockReversible())}),Ie(3,"mat-icon",6),j(),Wr()}if(2&i){const e=re();V(1),U("ngIf",e.isInReversibleSerializationState),V(1),U("disabled",e.isInReversibleSerializationState)}}function Ome(i,t){1&i&&(G(0,"button",9),Ie(1,"mat-icon",10),j()),2&i&&(re(),U("matMenuTriggerFor",Zi(3)))}function Fme(i,t){if(1&i){const e=jn();G(0,"button",11),Oe("click",function(){const s=Vt(e).$implicit;return Et(re().runCustomAction(s))}),G(1,"span"),Be(2),j()()}if(2&i){const e=t.$implicit;V(2),ui(e.title)}}const Lme=function(){return[]};let tE=(()=>{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 nt(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)(E(Fa),E(Jl),E(Qn),E(Bm),E(RV))},i.\u0275cmp=ot({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&&(fe(0,Pme,4,2,"ng-container",0),fe(1,Ome,2,1,"button",1),G(2,"mat-menu",null,2),fe(4,Fme,3,1,"button",3),j()),2&e&&(U("ngIf",null==n.resource||null==n.resource.schema?null:n.resource.schema.serializable_to_disc),V(1),U("ngIf",(null==n.resource||null==n.resource.schema.custom_actions?null:n.resource.schema.custom_actions.length)>0),V(3),U("ngForOf",(null==n.resource?null:n.resource.schema.custom_actions)||Rs(3,Lme)))},dependencies:[lo,vi,Fs,qM,gR,Eme,JS,Ime],styles:["[_nghost-%COMP%]{display:flex}"]}),i})();const Nme=["class","block-ui"];function Bme(i,t){if(1&i&&(G(0,"mat-label",7),Be(1),j()),2&i){const e=re();U("matTooltip",e.resourceDescription),V(1),Qi("",null==e.resource?null:e.resource.name," ")}}function Ume(i,t){if(1&i&&(G(0,"audio",8),Ie(1,"source",9),ct(2,"async"),Be(3," Your browser does not support the audio element. "),j()),2&i){const e=re();V(1),U("src",ut(2,1,e.audioUrl$),Np)}}function Vme(i,t){1&i&&Ie(0,"mat-spinner",10)}function zme(i,t){1&i&&Ie(0,"app-block-actions",11),2&i&&U("resource",re().resource)}const Hme=function(){return["wave_data"]};let $me=(()=>{class i{constructor(e,n){this.eelDelegate=e,this.main=n,this._resource$=new Qe(null),this.audioUrl$=new Qe(null),this.resourceDescription="",this.hideBlockActions=!1,this.destroyed$=new Te,this.changed=new $e}set resource(e){this._resource$.next(e)}get resource(){return this._resource$.getValue()}ngAfterViewInit(){var e=this;return nt(function*(){e._resource$.pipe(Ue(e.destroyed$)).subscribe(function(){var n=nt(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)(E(Jl),E(Fa))},i.\u0275cmp=ot({type:i,selectors:[["app-eacs-audio",8,"block-ui"]],inputs:{resource:"resource",resourceDescription:"resourceDescription",hideBlockActions:"hideBlockActions"},outputs:{changed:"changed"},attrs:Nme,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&&(G(0,"div",0),fe(1,Bme,2,2,"mat-label",1),ct(2,"async"),fe(3,Ume,4,3,"audio",2),ct(4,"async"),fe(5,Vme,1,0,"mat-spinner",3),ct(6,"async"),Ie(7,"div",4),fe(8,zme,1,1,"app-block-actions",5),j(),Ie(9,"app-compound-block-ui",6),ct(10,"async")),2&e){let r;V(1),U("ngIf",(null==n.resource?null:n.resource.name)&&(null==n.resource?null:n.resource.name)!=(null==(r=ut(2,7,n.main.resource$))?null:r.name)),V(2),U("ngIf",ut(4,9,n.audioUrl$)),V(2),U("ngIf",n.resource&&!ut(6,11,n.audioUrl$)),V(3),U("ngIf",!n.hideBlockActions),V(1),U("resource",ut(10,13,n._resource$))("hideBlockActions",!0)("fieldBlacklist",Rs(15,Hme))}},dependencies:[vi,Ro,Fs,e0,ec,tE,Ia],styles:["#header[_ngcontent-%COMP%]{display:flex}"]}),i})();class Gme{constructor(t,e){this.mesh=t,this.assetsPath=e,this.textures=[],this.tyreTextureUpdateTimer=void 0,this.tyreMaterial=null,this.tyreTextures=[],this._color=65280,this._speed="idle",this._steeringAngle=0,this.wheels=[],this.wheelIdlePositions=[],this.frontWheels=[];let n=new Set;if(t.traverse(r=>{if(!(r instanceof Mn))return;let s=-1;if(r.name.startsWith("part_hp_12")?s=0:r.name.startsWith("part_hp_14")?s=1:r.name.startsWith("part_hp_16")?s=2:r.name.startsWith("part_hp_18")&&(s=3),s>-1){r.geometry.boundingBox||r.geometry.computeBoundingBox();let a=Re.avg(r.geometry.boundingBox.min,r.geometry.boundingBox.max);return(0==s||2==s)&&(a={x:a.x,y:a.y,z:a.z+1.5}),r.geometry.translate(...Re.spr(Re.neg(a))),r.position.set(...Re.spr(a)),this.wheelIdlePositions[s]=a,this.wheels.push(r),void(s<2&&this.frontWheels.push(r))}const o=r.material.map;o&&n.add(o)}),this.textures=Array.from(n).map(r=>{const s=new Oo(document.createElement("img"));return s.flipY=r.flipY,sa(s),[r,s]}),t.traverse(r=>{if(!(r instanceof Mn))return;const s=r.material.map;if(s){const o=this.textures.find(([a,l])=>a===s);o&&(r.material.map=o[1])}}),this.hasWheels){const r=new Pu;this.tyreTextures=[0,1,2,3].map(s=>r.load(`${e}/m${s}00.png`));for(const s of this.tyreTextures)sa(s);this.tyreMaterial=new qi({map:this.tyreTextures[0]}),this.tyreMaterial.transparent=!0,this.tyreMaterial.alphaTest=.5,this.tyreMaterial.map.wrapS=er,this.tyreMaterial.map.wrapT=er,this.tyreMaterial.polygonOffset=!0,this.tyreMaterial.polygonOffsetFactor=-4;for(const s of this.wheels)s.material=this.tyreMaterial}this.color=65280,this.recolorCar().then()}get color(){return this._color}set color(t){t!==this._color&&(this._color=t,this.recolorCar().then())}get speed(){return this._speed}set speed(t){if(t!==this._speed){switch(this._speed=t,this.tyreTextureUpdateTimer&&clearInterval(this.tyreTextureUpdateTimer),t){case"idle":this.tyreMaterial.map=this.tyreTextures[0];break;case"slow":let e=!0;this.tyreTextureUpdateTimer=setInterval(()=>{this.tyreMaterial.map=this.tyreTextures[e?1:2],this.tyreMaterial.needsUpdate=!0,e=!e},16);break;case"fast":this.tyreMaterial.map=this.tyreTextures[3]}this.tyreMaterial.needsUpdate=!0}}get steeringAngle(){return this._steeringAngle}set steeringAngle(t){if(t!==this._steeringAngle){this._steeringAngle=t;for(const e of this.frontWheels)e.rotation.set(0,0,t)}}get hasWheels(){return this.wheels.length>0}recolorCar(){var t=this;return nt(function*(){const[e,n,r]=[t.color>>16,t.color>>8&255,255&t.color];for(const[s,o]of t.textures){for(let a=100;a>0&&!s.source.data;a--)yield pG(50);mG(s.source.data,(a,l)=>{if(a[l]+a[l+2]{class i{constructor(e,n,r){this.eelDelegate=e,this.main=n,this.cdr=r,this._resource$=new Qe(null),this.changed=new $e,this.customControls=[],this.previewPaths$=new Qe(null),this.destroyed$=new Te,this.serializerSettings={geometry__save_obj:!0,geometry__save_blend:!1,geometry__export_to_gg_web_engine:!1}}get resource(){return this._resource$.getValue()}set resource(e){this._resource$.next(e)}ngAfterViewInit(){var e=this;return nt(function*(){e._resource$.pipe(Ue(e.destroyed$)).subscribe(function(){var n=nt(function*(r){e.previewPaths$.next(yield e.loadPreviewFilePaths(r?.id))});return function(r){return n.apply(this,arguments)}}()),e.main.dataBlockChange$.pipe(Ue(e.destroyed$),gn(([n,r])=>!!e.resource&&n.startsWith(e.resource.id)),gl(1500)).subscribe(nt(function*(){e.previewPaths$.next(null),e.previewPaths$.next(yield e.postTmpUpdates(e.resource?.id))}))})()}onObjectLoaded(e){var n=this;return nt(function*(){try{const r=new Gme(e,n.previewPaths$.value[0].substring(0,n.previewPaths$.value[0].lastIndexOf("/"))+"/assets");let s=null;const o=a=>{s&&clearTimeout(s),s=setTimeout(()=>r.color=a,50)};n.customControls=[{title:"NFS2 car features",controls:[{label:"Car color",type:"color",value:65280,change:a=>o(a)}]}],r.hasWheels&&n.customControls[0].controls.push({label:"Car speed",type:"radio",options:["idle","slow","fast"],value:"idle",change:a=>{r.speed=a}},{label:"Steering angle",type:"slider",minValue:-.7,maxValue:.7,valueStep:.05,value:0,change:a=>{r.steeringAngle=a}}),n.cdr.markForCheck()}catch(r){console.error(r)}})()}postTmpUpdates(e){var n=this;return nt(function*(){if(e){const r=yield n.eelDelegate.serializeResourceTmp(e,Object.entries(n.main.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 nt(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)(E(Jl),E(Fa),E(Qn))},i.\u0275cmp=ot({type:i,selectors:[["app-geo-geometry",8,"block-ui"]],inputs:{resource:"resource"},outputs:{changed:"changed"},attrs:Wme,decls:4,vars:8,consts:[[3,"paths","groupFunction","customControls","onObjectLoaded"],[3,"resource",4,"ngIf"],[3,"resource"]],template:function(e,n){1&e&&(G(0,"app-obj-viewer",0),Oe("onObjectLoaded",function(s){return n.onObjectLoaded(s)}),ct(1,"async"),j(),fe(2,jme,2,3,"app-compound-block-ui",1),ct(3,"async")),2&e&&(U("paths",ut(1,4,n.previewPaths$))("groupFunction",n.previewObjectGroupFunc)("customControls",n.customControls),V(2),U("ngIf",!ut(3,6,n.main.hideHiddenFields$)))},dependencies:[vi,ec,hG,Ia],changeDetection:0}),i})();const qme=function(){return["children","items_descr"]};let Xme=(()=>{class i{constructor(){this._resource=null,this.hideBlockActions=!1,this.resourceMap={},this.changed=new $e}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:sc(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=ot({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&&Ie(0,"app-compound-block-ui",0)(1,"app-sidenav-res-list",1),2&e&&(U("resource",n.resource)("hideBlockActions",n.hideBlockActions)("fieldBlacklist",Rs(4,qme)),V(1),U("resources",n.resourceMap))},dependencies:[ec,bC],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})();const Kme=["previewCanvasContainer"],Zme=["previewCanvas"];function Qme(i,t){1&i&&Ie(0,"mat-spinner",16),2&i&&U("diameter",40)}function Jme(i,t){1&i&&Ie(0,"mat-spinner",17)}const ege=function(){return[]};var Tf=(()=>{return(i=Tf||(Tf={})).ThreeModel="model",i.Bitmap="bitmap",i.TwoSidedBitmap="two_sided_bitmap",Tf;var i})();class tge extends QH{constructor(t,e,n){super(t,{loadDepth:40,inertia:2}),this.mapGraph=t,this.qfsPath=e,this.hideUnknownEntities$=n,this.textureLoader=new Pu,this.terrainMaterials={},this.objLoader=new Jb,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(Ql(),Ue(this._onRemoved$)).subscribe(e=>{for(const n of this.unknownEntities)n.visible=!e})}getPlaceholderTexture(){var t=this;return nt(function*(){return t._placeholder?t._placeholder:(t._placeholderPromise||(t._placeholderPromise=t.textureLoader.loadAsync("assets/placeholder_texture.png")),t._placeholderPromise)})()}getPlaceholderTerrainTexture(){var t=this;return nt(function*(){return t._placeholderTerrain?t._placeholderTerrain:(t._placeholderTerrainPromise||(t._placeholderTerrainPromise=t.textureLoader.loadAsync("assets/placeholder_texture.png").then(e=>(e.wrapS=Bs,e.wrapT=Bs,sa(e),e))),t._placeholderTerrainPromise)})()}loadChunk(t){var e=this;return nt(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 Mn&&(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:Re.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:Yi.fromAngle(Re.nZ,l.rotation)}));const o=(yield Promise.all(s.map(l=>e.loadPropInternal(l)))).filter(l=>!!l),a=new Jo({object3D:new ra(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 qi({side:Ns,transparent:!0,visible:!1}),this.qfsPath?this.textureLoader.loadAsync(`${this.qfsPath}/${t}.png`).then(e=>{e.wrapS=Bs,e.wrapT=Bs,sa(e),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 nt(function*(){let n=!1;if(t.type==Tf.ThreeModel){let r;try{if(!e.qfsPath)throw new Error;const o=new xO,a=new Jb,l=yield o.loadAsync(`${e.qfsPath}/props/${t.data.data.resource_id}/0/material.mtl`);l.preload(),a.setMaterials(l),r=new ra(yield a.loadAsync(`${e.qfsPath}/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 Mn){const a=o.material instanceof Array?o.material:[o.material];for(const l of a)l.transparent=!0,l.alphaTest=.5,l instanceof qi&&l.map&&(l.map.wrapS=Bs,l.map.wrapT=Bs,sa(l.map),l.map.needsUpdate=!0)}});const s=new Jo({object3D: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==Tf.Bitmap||t.type==Tf.TwoSidedBitmap){const r=(c,d)=>new Array(d).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 No,[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==Tf.TwoSidedBitmap){const[c,d]=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 Jo({object3D:new ra(s)});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 nt(function*(){const s=t.split(";"),o=yield r.getPlaceholderTexture();let a=!1,l=[];r.qfsPath?l=yield Promise.all(s.map(h=>r.textureLoader.loadAsync(`${r.qfsPath}/foreground/${h}.png`).catch(()=>(a=!0,o)))):(a=!0,l=s.map(()=>o));const c=l.map(h=>(sa(h),new qi({map:h,alphaTest:.5,transparent:!0,side:Ns}))),d=new Mn(new Iu(e.x,e.y),c[0]);if(d.rotateX(Math.PI/2),d.position.set(0,0,e.y/2),c.length>1){let h=-1;Ym(r.world).pipe(o4(n&&!isNaN(+n)?1e3*+n:250)).subscribe(()=>{h=(h+1)%c.length,d.material=c[h]})}return[d,a]})()}}let nge=(()=>{class i{constructor(e,n,r){this.eelDelegate=e,this.cdr=n,this.mainService=r,this._resource$=new Qe(null),this.changed=new $e,this.previewLoading$=new Qe(!0),this.previewQfsLocation$=new Qe(null),this.previewQfsLoading$=new Qe(!1),this.pointer$=new Qe(null),this.selectedSplineIndex$=new Qe(0),this.qfsPath=null,this.name="",this.renderer=null,this.map=null,this.roadPath=null,this.destroyed$=new Te}get resource(){return this._resource$.getValue()}set resource(e){this._resource$.next(e)}ngAfterViewInit(){var e=this;return nt(function*(){var s;e.world=new ok(new yO,{init:(s=nt(function*(){}),function(){return s.apply(this,arguments)}),simulate:()=>{},loader:{loadFromGgGlb:function(){var s=nt(function*(...o){return[]});return function(){return s.apply(this,arguments)}}()}}),yield e.world.init(),e.skySphere=new Jo({object3D:e.world.visualScene.factory.createPrimitive({shape:"SPHERE",radius:1e3},{color:16777215})}),e.skySphere.object3D.nativeMesh.material.side=Ns,e.world.addEntity(e.skySphere),e.selectionSphere=new Jo({object3D: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 $S(16777215,2));let n=new Qe({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=Yi.lookAt(e.renderer.camera.position,Re.add(e.renderer.camera.position,Re.Y),Re.Z),Ym(e.world).pipe(Ue(e.destroyed$)).subscribe(()=>{e.renderer&&(e.skySphere.position=e.renderer.camera.position,e.pointer$.next(e.renderer.camera.position))}),e.controller=new n4(e.world.keyboardInput,e.renderer,{mouseOptions:{canvas:e.previewCanvas.nativeElement,pointerLock:!0},keymap:"wasd+arrows",cameraLinearSpeed:40,cameraBoostMultiplier:4,cameraMovementElasticity:100,cameraRotationElasticity:30,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(Ue(e.destroyed$)).subscribe(function(){var s=nt(function*(o){e.roadPath=e.resource?.data.block_positions.map(a=>({x:a.x,y:a.z,z:a.y})),e.previewLoading$.next(!0),o?(e.previewQfsLocation$.next(o.id.substring(0,o.id.indexOf(".TRK"))+"0.QFS"),yield e.loadTerrainChunks(o.id),yield e.onQfsSelected(e.previewQfsLocation$.value)):(yield e.loadTerrainChunks(),yield e.loadPreview()),e.previewLoading$.next(!1)});return function(o){return s.apply(this,arguments)}}()),e.mainService.dataBlockChange$.pipe(Ue(e.destroyed$),gn(([s,o])=>!!e.resource&&s.startsWith(e.resource.id)),gl(3e3)).subscribe(nt(function*(){e.roadPath=e.resource?.data.block_positions.map(s=>({x:s.x,y:s.z,z:s.y})),e.previewLoading$.next(!0),yield e.postTmpUpdates(e.resource?.id),yield e.loadPreview(),e.previewLoading$.next(!1)})),e.selectedSplineIndex$.pipe(Ue(e.destroyed$),gl(250)).subscribe(s=>{if(e.resource){let o=e.resource.data.block_positions[s];if(!o)return;o={x:o.x,y:o.z,z:o.y},e.selectionSphere.position=o,e.renderer&&(e.renderer.position=Re.add(o,Re.rotAround({x:10,y:-12,z:5},{x:0,y:0,z:1},-0)),e.renderer.rotation=Yi.lookAt(e.renderer.position,o,{x:0,y:0,z:1}),e.controller.reset())}})})()}onQfsSelected(e){var n=this;return nt(function*(){if(n.qfsPath!=e){n.previewQfsLoading$.next(!0);try{const r=yield n.eelDelegate.serializeResource(e),s=new Pu,o=r.find(a=>a.endsWith("spherical.png"));if(o){const a=yield s.loadAsync(o);a.colorSpace="srgb",a.mapping=cc,n.skySphere.object3D.nativeMesh.material.map=a}else n.skySphere.object3D.nativeMesh.material.map=null;n.skySphere.object3D.nativeMesh.material.needsUpdate=!0,n.qfsPath=e}catch{n.skySphere.object3D.nativeMesh.material.map=null,n.skySphere.object3D.nativeMesh.material.needsUpdate=!0,n.qfsPath=null}finally{n.previewQfsLoading$.next(!1)}yield n.loadPreview()}})()}loadTerrainChunks(e){var n=this;return nt(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})()}onPointerChange(e){this.renderer&&(this.renderer.position=e)}loadPreview(){var e=this;return nt(function*(){if(!e.terrainChunksObjLocation||!e.roadPath)return;const n=Km.fromMapArray(e.roadPath.map((r,s)=>({path:`${e.terrainChunksObjLocation}terrain_chunk_${s}`,position:r,loadOptions:{}}))||[],!0);e.unloadPreview(),e.map=new tge(n,e.qfsPath&&"resources/"+e.qfsPath,e.mainService.hideHiddenFields$),e.map.resource=e.resource,e.map.isOpenedTrack=!1,Ym(e.world).pipe(Ue(e.destroyed$)).subscribe(()=>{e.map&&e.renderer&&e.map.loaderCursor$.next(e.renderer.position)}),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 nt(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)(E(Jl),E(Qn),E(Fa))},i.\u0275cmp=ot({type:i,selectors:[["app-trk-map-block-ui"]],viewQuery:function(e,n){if(1&e&&($n(Kme,5),$n(Zme,5)),2&e){let r;At(r=Dt())&&(n.previewCanvasContainer=r.first),At(r=Dt())&&(n.previewCanvas=r.first)}},inputs:{resource:"resource"},outputs:{changed:"changed"},decls:32,vars:26,consts:[[1,"qfsSelector"],["appearance","fill"],["matInput","","type","text",3,"value"],["customQfsInput",""],["mat-button","",3,"click"],["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","projection","pointerChange"],[3,"resource"],["mode","indeterminate",3,"diameter"],["mode","indeterminate"]],template:function(e,n){if(1&e){const r=jn();G(0,"div",0)(1,"h4"),Be(2,"Preview QFS file"),j(),G(3,"mat-form-field",1)(4,"mat-label"),Be(5,"Custom QFS path"),j(),Ie(6,"input",2,3),ct(8,"async"),j(),G(9,"button",4),Oe("click",function(){Vt(r);const o=Zi(7);return Et(n.onQfsSelected(o.value))}),Be(10,"LOAD"),j(),fe(11,Qme,1,1,"mat-spinner",5),ct(12,"async"),j(),G(13,"div",6)(14,"div",7,8),Ie(16,"canvas",9,10),fe(18,Jme,1,0,"mat-spinner",11),ct(19,"async"),j(),G(20,"div",12,8)(22,"mat-form-field",1)(23,"mat-label"),Be(24,"Spline item"),j(),G(25,"input",13),Oe("ngModelChange",function(o){return n.selectedSplineIndex$.next(o)}),ct(26,"async"),ct(27,"async"),j()(),G(28,"app-minimap",14),Oe("pointerChange",function(o){return n.onPointerChange(o)}),ct(29,"async"),j()()(),Ie(30,"app-compound-block-ui",15),ct(31,"async")}if(2&e){let r;V(6),U("value",ut(8,11,n.previewQfsLocation$)),V(5),U("ngIf",ut(12,13,n.previewQfsLoading$)),V(7),U("ngIf",ut(19,15,n.previewLoading$)),V(7),U("min",0)("max",4*(null==(r=ut(26,17,n._resource$))?null:r.data.num_blocks)-1)("ngModel",ut(27,19,n.selectedSplineIndex$)),V(3),U("roadSpline",n.roadPath||Rs(25,ege))("pointer",ut(29,21,n.pointer$))("splineClosed",!0)("projection","nz"),V(2),U("resource",ut(31,23,n._resource$))}},dependencies:[vi,_l,mu,nc,_u,gu,Zc,yl,Ro,rc,rb,e0,ec,fG,Ia],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-minimap[_ngcontent-%COMP%]{flex-grow:1;display:flex}.qfsSelector[_ngcontent-%COMP%]{display:flex;align-items:center;width:100%;column-gap:1rem}.qfsSelector[_ngcontent-%COMP%] h4[_ngcontent-%COMP%]{min-width:-moz-fit-content;min-width:fit-content}.qfsSelector[_ngcontent-%COMP%] mat-form-field[_ngcontent-%COMP%]{flex-grow:1}.qfsSelector[_ngcontent-%COMP%] mat-spinner[_ngcontent-%COMP%], .qfsSelector[_ngcontent-%COMP%] button[_ngcontent-%COMP%]{margin-bottom:1.34375em}"],changeDetection:0}),i})();function ige(i,t){if(1&i&&(G(0,"mat-error"),Be(1),j()),2&i){const e=re(2);V(1),Dh(" ",e.resourceError.data.error_class,": ",e.resourceError.data.error_text," ")}}function rge(i,t){1&i&&Ie(0,"mat-spinner",5)}function sge(i,t){if(1&i&&(G(0,"div",2),fe(1,ige,2,2,"mat-error",3),fe(2,rge,1,0,"mat-spinner",4),j()),2&i){const e=re();V(1),U("ngIf",e.resourceError),V(1),U("ngIf",!e.resourceError)}}function oge(i,t){}let n0=(()=>{class i{constructor(e,n){this.mainService=e,this.deep=n,this._component=null,this._componentChangedSub=null,this.destroyed$=new Te,this.resourceSet$=new Te,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)}resourceEqual(e,n){return e&&n?e.id===n.id&&this.deep.deepEquals(e.data,n.data):!e==!n}set resource(e){if(!this.resourceEqual(e,this._resourceError||this._resource)&&(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(Ue(this.destroyed$),Ue(this.resourceSet$)).subscribe(()=>{const s=this._resource.id,o=this._resource.data;if(o instanceof Array)if(this._resource.schema.block_class_mro.startsWith("BytesBlock"))this.mainService.dataBlockChange$.next([s,o]);else 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 age(i,t){1&i&&Ie(0,"mat-icon",17)}function lge(i,t){1&i&&Ie(0,"mat-icon",18)}let cge=(()=>{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 nt(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 nt(function*(){if(e.mainService.hasUnsavedChanges){let n=e.dialog.open(SV,{data:{text:"There are unsaved changes, which will be lost. Are you sure you want to reload file?"}});if(!(yield lR(n.afterClosed())))return}yield e.mainService.reloadResource(),e.cdr.markForCheck()})()}}return i.\u0275fac=function(e){return new(e||i)(E(Jl),E(Fa),E(Bm),E(RV),E(Qn))},i.\u0275cmp=ot({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&&(G(0,"mat-toolbar",0)(1,"span"),Be(2),ct(3,"async"),ct(4,"async"),j(),Ie(5,"span",1),G(6,"button",2),Oe("click",function(){return n.toggleUnknownsVisibility()}),fe(7,age,1,0,"mat-icon",3),ct(8,"async"),fe(9,lge,1,0,"mat-icon",4),ct(10,"async"),j(),Ie(11,"mat-divider",5)(12,"app-block-actions",6),ct(13,"async"),G(14,"button",7),Oe("click",function(){return n.reloadResource()}),ct(15,"async"),Ie(16,"mat-icon",8),j(),Ie(17,"mat-divider",5),G(18,"button",9),Oe("click",function(){return n.saveResource()}),ct(19,"async"),ct(20,"async"),Ie(21,"mat-icon",10),j()(),G(22,"div",11),Ie(23,"div",12)(24,"app-editor",13),ct(25,"async"),ct(26,"async"),ct(27,"async"),G(28,"div",14)(29,"a",15),Ie(30,"img",16),j()(),Ie(31,"div",12),j()),2&e){let r;V(2),Dh("",(null==(r=ut(3,9,n.mainService.resource$))?null:r.name)||"...","",ut(4,11,n.mainService.hasUnsavedChanges$)?"*":"",""),V(5),U("ngIf",ut(8,13,n.mainService.hideHiddenFields$)),V(2),U("ngIf",!ut(10,15,n.mainService.hideHiddenFields$)),V(3),U("resource",ut(13,17,n.mainService.resource$)),V(2),U("disabled",!ut(15,19,n.mainService.eelDelegate.openedResourcePath$)),V(4),U("disabled",!ut(19,21,n.mainService.resource$)||!ut(20,23,n.mainService.hasUnsavedChanges$)),V(6),U("resource",ut(25,25,n.mainService.customActionRunning$)?null:ut(26,27,n.mainService.resource$)||ut(27,29,n.mainService.error$))("hideBlockActions",!0)}},dependencies:[vi,CJ,EJ,Fs,qM,gR,n0,tE,Ia],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 MG(i){return new pe(3e3,!1)}function Gge(){return typeof window<"u"&&typeof window.document<"u"}function MO(){return typeof process<"u"&&"[object process]"==={}.toString.call(process)}function Nu(i){switch(i.length){case 0:return new nb;case 1:return i[0];default:return new aV(i)}}function CG(i,t,e,n,r=new Map,s=new Map){const o=[],a=[];let l=-1,c=null;if(n.forEach(d=>{const h=d.get("offset"),p=h==l,m=p&&c||new Map;d.forEach((g,b)=>{let v=b,y=g;if("offset"!==b)switch(v=t.normalizePropertyName(v,o),y){case rR:y=r.get(b);break;case Kc: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 kge(i){return new pe(3502,!1)}();return a}function CO(i,t,e,n){switch(t){case"start":i.onStart(()=>n(e&&SO(e,"start",i)));break;case"done":i.onDone(()=>n(e&&SO(e,"done",i)));break;case"destroy":i.onDestroy(()=>n(e&&SO(e,"destroy",i)))}}function SO(i,t,e){const s=EO(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 EO(i,t,e,n,r="",s=0,o){return{element:i,triggerName:t,fromState:e,toState:n,phaseName:r,totalTime:s,disabled:!!o}}function oa(i,t,e){let n=i.get(t);return n||i.set(t,n=e),n}function SG(i){const t=i.indexOf(":");return[i.substring(1,t),i.slice(t+1)]}let AO=(i,t)=>!1,EG=(i,t,e)=>[],AG=null;function DO(i){const t=i.parentNode||i.host;return t===AG?null:t}(MO()||typeof Element<"u")&&(Gge()?(AG=(()=>document.documentElement)(),AO=(i,t)=>{for(;t;){if(t===i)return!0;t=DO(t)}return!1}):AO=(i,t)=>i.contains(t),EG=(i,t,e)=>{if(e)return Array.from(i.querySelectorAll(t));const n=i.querySelector(t);return n?[n]:[]});let If=null,DG=!1;const TG=AO,IG=EG;let RG=(()=>{class i{validateStyleProperty(e){return function jge(i){If||(If=function Yge(){return typeof document<"u"?document.body:null}()||{},DG=!!If.style&&"WebkitAppearance"in If.style);let t=!0;return If.style&&!function Wge(i){return"ebkit"==i.substring(1,6)}(i)&&(t=i in If.style,!t&&DG&&(t="Webkit"+i.charAt(0).toUpperCase()+i.slice(1)in If.style)),t}(e)}matchesElement(e,n){return!1}containsElement(e,n){return TG(e,n)}getParentElement(e){return DO(e)}query(e,n,r){return IG(e,n,r)}computeStyle(e,n,r){return r||""}animate(e,n,r,s,o,a=[],l){return new nb(r,s)}}return i.\u0275fac=function(e){return new(e||i)},i.\u0275prov=Pe({token:i,factory:i.\u0275fac}),i})(),TO=(()=>{class i{}return i.NOOP=new RG,i})();const qge=1e3,IO="ng-enter",nE="ng-leave",iE="ng-trigger",rE=".ng-trigger",PG="ng-animating",RO=".ng-animating";function fd(i){if("number"==typeof i)return i;const t=i.match(/^(-?[\.\d]+)(m?s)/);return!t||t.length<2?0:kO(parseFloat(t[1]),t[2])}function kO(i,t){return"s"===t?i*qge:i}function sE(i,t,e){return i.hasOwnProperty("duration")?i:function Kge(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(MG()),{duration:0,delay:0,easing:""};r=kO(parseFloat(a[1]),a[2]);const l=a[3];null!=l&&(s=kO(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 dge(){return new pe(3100,!1)}()),a=!0),s<0&&(t.push(function uge(){return new pe(3101,!1)}()),a=!0),a&&t.splice(l,0,MG())}return{duration:r,delay:s,easing:o}}(i,t,e)}function r0(i,t={}){return Object.keys(i).forEach(e=>{t[e]=i[e]}),t}function OG(i){const t=new Map;return Object.keys(i).forEach(e=>{t.set(e,i[e])}),t}function Bu(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 LG(i,t,e){return e?t+":"+e+";":""}function NG(i){let t="";for(let e=0;e{const s=OO(r);e&&!e.has(r)&&e.set(r,i.style[s]),i.style[s]=n}),MO()&&NG(i))}function Rf(i,t){i.style&&(t.forEach((e,n)=>{const r=OO(n);i.style[r]=""}),MO()&&NG(i))}function s0(i){return Array.isArray(i)?1==i.length?i[0]:rV(i):i}const PO=new RegExp("{{\\s*(.+?)\\s*}}","g");function BG(i){let t=[];if("string"==typeof i){let e;for(;e=PO.exec(i);)t.push(e[1]);PO.lastIndex=0}return t}function o0(i,t,e){const n=i.toString(),r=n.replace(PO,(s,o)=>{let a=t[o];return null==a&&(e.push(function fge(i){return new pe(3003,!1)}()),a=""),a.toString()});return r==n?i:r}function oE(i){const t=[];let e=i.next();for(;!e.done;)t.push(e.value),e=i.next();return t}const Jge=/-+([a-z0-9])/g;function OO(i){return i.replace(Jge,(...t)=>t[1].toUpperCase())}function e_e(i){return i.replace(/([a-z])([A-Z])/g,"$1-$2").toLowerCase()}function aa(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 pge(i){return new pe(3004,!1)}()}}function UG(i,t){return window.getComputedStyle(i)[t]}const cE="*";function o_e(i,t){const e=[];return"string"==typeof i?i.split(/\s*,\s*/).forEach(n=>function a_e(i,t,e){if(":"==i[0]){const l=function l_e(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 Age(i){return new pe(3015,!1)}()),t;const r=n[1],s=n[2],o=n[3];t.push(VG(r,o));"<"==s[0]&&!(r==cE&&o==cE)&&t.push(VG(o,r))}(n,e,t)):e.push(i),e}const dE=new Set(["true","1"]),uE=new Set(["false","0"]);function VG(i,t){const e=dE.has(i)||uE.has(i),n=dE.has(t)||uE.has(t);return(r,s)=>{let o=i==cE||i==r,a=t==cE||t==s;return!o&&e&&"boolean"==typeof r&&(o=r?dE.has(i):uE.has(i)),!a&&n&&"boolean"==typeof s&&(a=s?dE.has(t):uE.has(t)),o&&a}}const c_e=new RegExp("s*:selfs*,?","g");function FO(i,t,e,n){return new d_e(i).build(t,e,n)}class d_e{constructor(t){this._driver=t}build(t,e,n){const r=new f_e(e);return this._resetContextStyleTimingState(r),aa(this,s0(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 gge(){return new pe(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(d=>{l.name=d,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 _ge(){return new pe(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=>{BG(l).forEach(c=>{o.hasOwnProperty(c)||s.add(c)})})}),s.size&&(oE(s.values()),e.errors.push(function vge(i,t){return new pe(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=aa(this,s0(t.animation),e);return{type:1,matchers:o_e(t.expr,e.errors),animation:n,queryCount:e.queryCount,depCount:e.depCount,options:kf(t.options)}}visitSequence(t,e){return{type:2,steps:t.steps.map(n=>aa(this,n,e)),options:kf(t.options)}}visitGroup(t,e){const n=e.currentTime;let r=0;const s=t.steps.map(o=>{e.currentTime=n;const a=aa(this,o,e);return r=Math.max(r,e.currentTime),a});return e.currentTime=r,{type:3,steps:s,options:kf(t.options)}}visitAnimate(t,e){const n=function m_e(i,t){if(i.hasOwnProperty("duration"))return i;if("number"==typeof i)return LO(sE(i,t).duration,0,"");const e=i;if(e.split(/\s+/).some(s=>"{"==s.charAt(0)&&"{"==s.charAt(1))){const s=LO(0,0,"");return s.dynamic=!0,s.strValue=e,s}const r=sE(e,t);return LO(r.duration,r.delay,r.easing)}(t.timings,e.errors);e.currentAnimateTimings=n;let r,s=t.styles?t.styles:oi({});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=oi(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===Kc?n.push(a):e.errors.push(new pe(3002,!1)):n.push(OG(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),d=c.get(l);let h=!0;d&&(s!=r&&s>=d.startTime&&r<=d.endTime&&(e.errors.push(function bge(i,t,e,n,r){return new pe(3010,!1)}()),h=!1),s=d.startTime),h&&c.set(l,{startTime:s,endTime:r}),e.options&&function Qge(i,t,e){const n=t.params||{},r=BG(i);r.length&&r.forEach(s=>{n.hasOwnProperty(s)||e.push(function hge(i){return new pe(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 xge(){return new pe(3011,!1)}()),n;let s=0;const o=[];let a=!1,l=!1,c=0;const d=t.steps.map(y=>{const M=this._makeStyleAst(y,e);let x=null!=M.offset?M.offset:function p_e(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:aa(this,s0(t.animation),e),options:kf(t.options)}}visitAnimateChild(t,e){return e.depCount++,{type:9,options:kf(t.options)}}visitAnimateRef(t,e){return{type:10,animation:this.visitReference(t.animation,e),options:kf(t.options)}}visitQuery(t,e){const n=e.currentQuerySelector,r=t.options||{};e.queryCount++,e.currentQuery=t;const[s,o]=function u_e(i){const t=!!i.split(/\s*,\s*/).find(e=>":self"==e);return t&&(i=i.replace(c_e,"")),i=i.replace(/@\*/g,rE).replace(/@\w+/g,e=>rE+"-"+e.slice(1)).replace(/:animating/g,RO),[i,t]}(t.selector);e.currentQuerySelector=n.length?n+" "+s:s,oa(e.collectedStyles,e.currentQuerySelector,new Map);const a=aa(this,s0(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:kf(t.options)}}visitStagger(t,e){e.currentQuery||e.errors.push(function Sge(){return new pe(3013,!1)}());const n="full"===t.timings?{duration:0,delay:0,easing:"full"}:sE(t.timings,e.errors,!0);return{type:12,animation:aa(this,s0(t.animation),e),timings:n,options:null}}}class f_e{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 kf(i){return i?(i=r0(i)).params&&(i.params=function h_e(i){return i?r0(i):null}(i.params)):i={},i}function LO(i,t,e){return{duration:i,delay:t,easing:e}}function NO(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 hE{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 v_e=new RegExp(":enter","g"),b_e=new RegExp(":leave","g");function BO(i,t,e,n,r,s=new Map,o=new Map,a,l,c=[]){return(new x_e).buildKeyframes(i,t,e,n,r,s,o,a,l,c)}class x_e{buildKeyframes(t,e,n,r,s,o,a,l,c,d=[]){c=c||new hE;const h=new UO(t,e,c,r,s,d,[]);h.options=l;const p=l.delay?fd(l.delay):0;h.currentTimeline.delayNextStep(p),h.currentTimeline.setStyles([o],null,h.errors,l),aa(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()):[NO(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:fd(o0(s,r?.params??{},e.errors));n.delayNextStep(o)}}}_visitSubInstructions(t,e,n){let s=e.currentTimeline.currentTime;const o=null!=n.duration?fd(n.duration):null,a=null!=n.delay?fd(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),aa(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=fE);const o=fd(s.delay);r.delayNextStep(o)}t.steps.length&&(t.steps.forEach(o=>aa(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?fd(t.options.delay):0;t.steps.forEach(o=>{const a=e.createSubContext(t.options);s&&a.delayNextStep(s),aa(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 sE(e.params?o0(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?fd(r.delay):0;s&&(6===e.previousNode.type||0==n&&e.currentTimeline.hasCurrentStyleProperties())&&(e.currentTimeline.snapshotCurrentStyles(),e.previousNode=fE);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,d)=>{e.currentQueryIndex=d;const h=e.createSubContext(t.options,c);s&&h.delayNextStep(s),c===e.element&&(l=h.currentTimeline),aa(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 d=e.currentTimeline;l&&d.delayNextStep(l);const h=d.currentTime;aa(this,t.animation,e),e.previousNode=t,n.currentStaggerTime=r.currentTime-h+(r.startTime-n.currentTimeline.startTime)}}const fE={};class UO{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=fE,this.subContextCount=0,this.options={},this.currentQueryIndex=0,this.currentQueryTotal=0,this.currentStaggerTime=0,this.currentTimeline=l||new pE(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=fd(n.duration)),null!=n.delay&&(r.delay=fd(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]=o0(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 UO(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=fE,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 w_e(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(v_e,"."+this._enterClassName)).replace(b_e,"."+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 Ege(i){return new pe(3014,!1)}()),a}}class pE{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 pE(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||Kc),this._currentKeyframe.set(e,Kc);this._currentEmptyStepKeyframe=this._currentKeyframe}setStyles(t,e,n,r){e&&this._previousKeyframe.set("easing",e);const s=r&&r.params||{},o=function M_e(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,Kc)}else Bu(r,e)}),e}(t,this._globalTimelineStyles);for(let[a,l]of o){const c=o0(l,s,n);this._pendingStyles.set(a,c),this._localTimelineStyles.has(a)||this._backFill.set(a,this._globalTimelineStyles.get(a)??Kc),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=Bu(a,new Map,this._backFill);c.forEach((d,h)=>{d===rR?t.add(h):d===Kc&&e.add(h)}),n||c.set("offset",l/this.duration),r.push(c)});const s=t.size?oE(t.values()):[],o=e.size?oE(e.values()):[];if(n){const a=r[0],l=new Map(a);a.set("offset",0),l.set("offset",1),r=[a,l]}return NO(this.element,r,s,o,this.duration,this.startTime,this.easing,!1)}}class w_e extends pE{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=Bu(t[0]);l.set("offset",0),s.push(l);const c=Bu(t[0]);c.set("offset",$G(a)),s.push(c);const d=t.length-1;for(let h=1;h<=d;h++){let p=Bu(t[h]);const m=p.get("offset");p.set("offset",$G((e+m*n)/o)),s.push(p)}n=o,e=0,r="",t=s}return NO(this.element,t,this.preStyleProps,this.postStyleProps,n,e,r,!0)}}function $G(i,t=3){const e=Math.pow(10,t-1);return Math.round(i*e)/e}class VO{}const C_e=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 S_e extends VO{normalizePropertyName(t,e){return OO(t)}normalizeStyleValue(t,e,n,r){let s="";const o=n.toString().trim();if(C_e.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 mge(i,t){return new pe(3005,!1)}())}return o+s}}function GG(i,t,e,n,r,s,o,a,l,c,d,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:d,totalTime:h,errors:p}}const zO={};class WG{constructor(t,e,n){this._triggerName=t,this.ast=e,this._stateStyles=n}match(t,e,n,r){return function E_e(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,d){const h=[],p=this.ast.options&&this.ast.options.params||zO,g=this.buildStyles(n,a&&a.params||zO,h),b=l&&l.params||zO,v=this.buildStyles(r,b,h),y=new Set,M=new Map,x=new Map,C="void"===r,F={params:A_e(b,p),delay:this.ast.options?.delay},D=d?[]:BO(t,e,this.ast.animation,s,o,g,v,F,c,h);let k=0;if(D.forEach(T=>{k=Math.max(T.duration+T.delay,k)}),h.length)return GG(e,this._triggerName,n,r,C,g,v,[],[],M,x,k,h);D.forEach(T=>{const A=T.element,W=oa(M,A,new Set);T.preStyleProps.forEach(ne=>W.add(ne));const ie=oa(x,A,new Set);T.postStyleProps.forEach(ne=>ie.add(ne)),A!==e&&y.add(A)});const B=oE(y.values());return GG(e,this._triggerName,n,r,C,g,v,D,B,M,x,k)}}function A_e(i,t){const e=r0(t);for(const n in i)i.hasOwnProperty(n)&&null!=i[n]&&(e[n]=i[n]);return e}class D_e{constructor(t,e,n){this.styles=t,this.defaultParams=e,this.normalizer=n}buildStyles(t,e){const n=new Map,r=r0(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=o0(o,r,e));const l=this.normalizer.normalizePropertyName(a,e);o=this.normalizer.normalizeStyleValue(a,l,o,e),n.set(a,o)})}),n}}class I_e{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 D_e(r.style,r.options&&r.options.params||{},n))}),jG(this.states,"true","1"),jG(this.states,"false","0"),e.transitions.forEach(r=>{this.transitionFactories.push(new WG(t,r,this.states))}),this.fallbackTransition=function R_e(i,t,e){return new WG(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 jG(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 k_e=new hE;class P_e{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=FO(this._driver,e,n,r);if(n.length)throw function Pge(i){return new pe(3503,!1)}();this._animations.set(t,s)}_buildPlayer(t,e,n){const r=t.element,s=CG(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=BO(this._driver,e,s,IO,nE,new Map,new Map,n,k_e,r),o.forEach(d=>{const h=oa(a,d.element,new Map);d.postStyleProps.forEach(p=>h.set(p,null))})):(r.push(function Oge(){return new pe(3300,!1)}()),o=[]),r.length)throw function Fge(i){return new pe(3504,!1)}();a.forEach((d,h)=>{d.forEach((p,m)=>{d.set(m,this._driver.computeStyle(h,m,Kc))})});const c=Nu(o.map(d=>{const h=a.get(d.element);return this._buildPlayer(d,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 Lge(i){return new pe(3301,!1)}();return e}listen(t,e,n,r){const s=EO(e,"","","");return CO(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 YG="ng-animate-queued",HO="ng-animate-disabled",B_e=[],qG={namespaceId:"",setForRemoval:!1,setForMove:!1,hasAnimation:!1,removedBeforeQueried:!1},U_e={namespaceId:"",setForMove:!1,setForRemoval:!1,hasAnimation:!1,removedBeforeQueried:!0},za="__ng_removed";class $O{get params(){return this.options.params}constructor(t,e=""){this.namespaceId=e;const n=t&&t.hasOwnProperty("value");if(this.value=function $_e(i){return i??null}(n?t.value:t),n){const s=r0(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 a0="void",GO=new $O(a0);class V_e{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,Ha(e,this._hostClassName)}listen(t,e,n,r){if(!this._triggers.has(e))throw function Nge(i,t){return new pe(3302,!1)}();if(null==n||0==n.length)throw function Bge(i){return new pe(3303,!1)}();if(!function G_e(i){return"start"==i||"done"==i}(n))throw function Uge(i,t){return new pe(3400,!1)}();const s=oa(this._elementListeners,t,[]),o={name:e,phase:n,callback:r};s.push(o);const a=oa(this._engine.statesByElement,t,new Map);return a.has(e)||(Ha(t,iE),Ha(t,iE+"-"+e),a.set(e,GO)),()=>{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 Vge(i){return new pe(3401,!1)}();return e}trigger(t,e,n,r=!0){const s=this._getTrigger(e),o=new WO(this.id,e,t);let a=this._engine.statesByElement.get(t);a||(Ha(t,iE),Ha(t,iE+"-"+e),this._engine.statesByElement.set(t,a=new Map));let l=a.get(e);const c=new $O(n,this.id);if(!(n&&n.hasOwnProperty("value"))&&l&&c.absorbOptions(l.options),a.set(e,c),l||(l=GO),c.value!==a0&&l.value===c.value){if(!function Y_e(i,t){const e=Object.keys(i),n=Object.keys(t);if(e.length!=n.length)return!1;for(let r=0;r{Rf(t,v),fc(t,y)})}return}const p=oa(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||(Ha(t,YG),o.onStart(()=>{Yg(t,YG)})),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,rE,!0);n.forEach(r=>{if(r[za])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 d=this.trigger(t,c,a0,r);d&&a.push(d)}}),a.length)return this._engine.markElementAsRemoved(this.id,t,!0,e,o),n&&Nu(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)||GO,d=new $O(a0),h=new WO(this.id,o,t);this._engine.totalQueuedPlayers++,this._queue.push({element:t,triggerName:o,transition:l,fromState:c,toState:d,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[za];(!s||s===qG)&&(n.afterFlush(()=>this.clearElementCache(t)),n.destroyInnerAnimations(t),n._onRemovalComplete(t,e))}}insertNode(t,e){Ha(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=EO(s,n.triggerName,n.fromState.value,n.toState.value);l._data=t,CO(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 z_e{_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 V_e(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(mE(e)){const s=this._fetchNamespace(t);if(s)return s.trigger(e,n,r),!0}return!1}insertNode(t,e,n,r){if(!mE(e))return;const s=e[za];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),Ha(t,HO)):this.disabledNodes.has(t)&&(this.disabledNodes.delete(t),Yg(t,HO))}removeNode(t,e,n,r){if(mE(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[za]={namespaceId:t,setForRemoval:r,hasAnimation:n,removedBeforeQueried:!1,previousTriggersValues:s}}listen(t,e,n,r,s){return mE(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,rE,!0);e.forEach(n=>this.destroyActiveAnimationsForElement(n)),0!=this.playersByQueriedElement.size&&(e=this.driver.query(t,RO,!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 Nu(this.players).onDone(()=>t());t()})}processLeaveNode(t){const e=t[za];if(e&&e.setForRemoval){if(t[za]=qG,e.namespaceId){this.destroyInnerAnimations(t);const n=this._fetchNamespace(e.namespaceId);n&&n.clearElementCache(t)}this._onRemovalComplete(t,e.setForRemoval)}t.classList?.contains(HO)&&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?Nu(e).onDone(()=>{n.forEach(r=>r())}):n.forEach(r=>r())}}reportError(t){throw function zge(i){return new pe(3402,!1)}()}_flushAnimations(t,e){const n=new hE,r=[],s=new Map,o=[],a=new Map,l=new Map,c=new Map,d=new Set;this.disabledNodes.forEach(q=>{d.add(q);const se=this.driver.query(q,".ng-animate-queued",!0);for(let J=0;J{const J=IO+b++;g.set(se,J),q.forEach(we=>Ha(we,J))});const v=[],y=new Set,M=new Set;for(let q=0;qy.add(we)):M.add(se))}const x=new Map,C=ZG(p,Array.from(y));C.forEach((q,se)=>{const J=nE+b++;x.set(se,J),q.forEach(we=>Ha(we,J))}),t.push(()=>{m.forEach((q,se)=>{const J=g.get(se);q.forEach(we=>Yg(we,J))}),C.forEach((q,se)=>{const J=x.get(se);q.forEach(we=>Yg(we,J))}),v.forEach(q=>{this.processLeaveNode(q)})});const F=[],D=[];for(let q=this._namespaceList.length-1;q>=0;q--)this._namespaceList[q].drainQueuedTransitions(e).forEach(J=>{const we=J.player,Ve=J.element;if(F.push(we),this.collectedEnterElements.length){const Le=Ve[za];if(Le&&Le.setForMove){if(Le.previousTriggersValues&&Le.previousTriggersValues.has(J.triggerName)){const wt=Le.previousTriggersValues.get(J.triggerName),Tt=this.statesByElement.get(J.element);if(Tt&&Tt.has(J.triggerName)){const St=Tt.get(J.triggerName);St.value=wt,Tt.set(J.triggerName,St)}}return void we.destroy()}}const Ye=!h||!this.driver.containsElement(h,Ve),Rt=x.get(Ve),nn=g.get(Ve),le=this._buildInstruction(J,n,nn,Rt,Ye);if(le.errors&&le.errors.length)return void D.push(le);if(Ye)return we.onStart(()=>Rf(Ve,le.fromStyles)),we.onDestroy(()=>fc(Ve,le.toStyles)),void r.push(we);if(J.isFallbackTransition)return we.onStart(()=>Rf(Ve,le.fromStyles)),we.onDestroy(()=>fc(Ve,le.toStyles)),void r.push(we);const Fe=[];le.timelines.forEach(Le=>{Le.stretchStartingKeyframe=!0,this.disabledNodes.has(Le.element)||Fe.push(Le)}),le.timelines=Fe,n.append(Ve,le.timelines),o.push({instruction:le,player:we,element:Ve}),le.queriedElements.forEach(Le=>oa(a,Le,[]).push(we)),le.preStyleProps.forEach((Le,wt)=>{if(Le.size){let Tt=l.get(wt);Tt||l.set(wt,Tt=new Set),Le.forEach((St,Sn)=>Tt.add(Sn))}}),le.postStyleProps.forEach((Le,wt)=>{let Tt=c.get(wt);Tt||c.set(wt,Tt=new Set),Le.forEach((St,Sn)=>Tt.add(Sn))})});if(D.length){const q=[];D.forEach(se=>{q.push(function Hge(i,t){return new pe(3505,!1)}())}),F.forEach(se=>se.destroy()),this.reportError(q)}const k=new Map,B=new Map;o.forEach(q=>{const se=q.element;n.has(se)&&(B.set(se,se),this._beforeAnimationBuild(q.player.namespaceId,q.instruction,k))}),r.forEach(q=>{const se=q.element;this._getPreviousPlayers(se,!1,q.namespaceId,q.triggerName,null).forEach(we=>{oa(k,se,[]).push(we),we.destroy()})});const T=v.filter(q=>JG(q,l,c)),A=new Map;KG(A,this.driver,M,c,Kc).forEach(q=>{JG(q,l,c)&&T.push(q)});const ie=new Map;m.forEach((q,se)=>{KG(ie,this.driver,new Set(q),l,rR)}),T.forEach(q=>{const se=A.get(q),J=ie.get(q);A.set(q,new Map([...Array.from(se?.entries()??[]),...Array.from(J?.entries()??[])]))});const ne=[],oe=[],ge={};o.forEach(q=>{const{element:se,player:J,instruction:we}=q;if(n.has(se)){if(d.has(se))return J.onDestroy(()=>fc(se,we.toStyles)),J.disabled=!0,J.overrideTotalTime(we.totalTime),void r.push(J);let Ve=ge;if(B.size>1){let Rt=se;const nn=[];for(;Rt=Rt.parentNode;){const le=B.get(Rt);if(le){Ve=le;break}nn.push(Rt)}nn.forEach(le=>B.set(le,Ve))}const Ye=this._buildAnimation(J.namespaceId,we,k,s,ie,A);if(J.setRealPlayer(Ye),Ve===ge)ne.push(J);else{const Rt=this.playersByElement.get(Ve);Rt&&Rt.length&&(J.parentPlayer=Nu(Rt)),r.push(J)}}else Rf(se,we.fromStyles),J.onDestroy(()=>fc(se,we.toStyles)),oe.push(J),d.has(se)&&r.push(J)}),oe.forEach(q=>{const se=s.get(q.element);if(se&&se.length){const J=Nu(se);q.setRealPlayer(J)}}),r.forEach(q=>{q.parentPlayer?q.syncPlayerEvents(q.parentPlayer):q.destroy()});for(let q=0;q!Ye.destroyed);Ve.length?W_e(this,se,Ve):this.processLeaveNode(se)}return v.length=0,ne.forEach(q=>{this.players.push(q),q.onDone(()=>{q.destroy();const se=this.players.indexOf(q);this.players.splice(se,1)}),q.play()}),ne}elementContainsData(t,e){let n=!1;const r=e[za];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==a0;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,d=c!==s,h=oa(n,c,[]);this._getPreviousPlayers(c,d,o,a,e.toState).forEach(m=>{const g=m.getRealPlayer();g.beforeDestroy&&g.beforeDestroy(),m.destroy(),h.push(m)})}Rf(s,e.fromStyles)}_buildAnimation(t,e,n,r,s,o){const a=e.triggerName,l=e.element,c=[],d=new Set,h=new Set,p=e.timelines.map(g=>{const b=g.element;d.add(b);const v=b[za];if(v&&v.removedBeforeQueried)return new nb(g.duration,g.delay);const y=b!==l,M=function j_e(i){const t=[];return QG(i,t),t}((n.get(b)||B_e).map(k=>k.getRealPlayer())).filter(k=>!!k.element&&k.element===b),x=s.get(b),C=o.get(b),F=CG(0,this._normalizer,0,g.keyframes,x,C),D=this._buildPlayer(g,F,M);if(g.subTimeline&&r&&h.add(b),y){const k=new WO(t,a,b);k.setRealPlayer(D),c.push(k)}return D});c.forEach(g=>{oa(this.playersByQueriedElement,g.element,[]).push(g),g.onDone(()=>function H_e(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))}),d.forEach(g=>Ha(g,PG));const m=Nu(p);return m.onDestroy(()=>{d.forEach(g=>Yg(g,PG)),fc(l,e.toStyles)}),h.forEach(g=>{oa(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 nb(t.duration,t.delay)}}class WO{constructor(t,e,n){this.namespaceId=t,this.triggerName=e,this.element=n,this._player=new nb,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=>CO(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){oa(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 mE(i){return i&&1===i.nodeType}function XG(i,t){const e=i.style.display;return i.style.display=t??"none",e}function KG(i,t,e,n,r){const s=[];e.forEach(l=>s.push(XG(l)));const o=[];n.forEach((l,c)=>{const d=new Map;l.forEach(h=>{const p=t.computeStyle(c,h,r);d.set(h,p),(!p||0==p.length)&&(c[za]=U_e,o.push(c))}),i.set(c,d)});let a=0;return e.forEach(l=>XG(l,s[a++])),o}function ZG(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 Ha(i,t){i.classList?.add(t)}function Yg(i,t){i.classList?.remove(t)}function W_e(i,t,e){Nu(e).onDone(()=>i.processLeaveNode(t))}function QG(i,t){for(let e=0;er.add(s)):t.set(i,n),e.delete(i),!0}class gE{constructor(t,e,n){this.bodyNode=t,this._driver=e,this._normalizer=n,this._triggerCache={},this.onRemovalComplete=(r,s)=>{},this._transitionEngine=new z_e(t,e,n),this._timelineEngine=new P_e(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=[],d=FO(this._driver,s,l,c);if(l.length)throw function Rge(i,t){return new pe(3404,!1)}();a=function T_e(i,t,e){return new I_e(i,t,e)}(r,d,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]=SG(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]=SG(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 X_e=(()=>{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&&fc(this._element,this._startStyles,this._initialStyles),this._state=1)}finish(){this.start(),this._state<2&&(fc(this._element,this._initialStyles),this._endStyles&&(fc(this._element,this._endStyles),this._endStyles=null),this._state=1)}destroy(){this.finish(),this._state<3&&(i.initialStylesByElement.delete(this._element),this._startStyles&&(Rf(this._element,this._startStyles),this._endStyles=null),this._endStyles&&(Rf(this._element,this._endStyles),this._endStyles=null),fc(this._element,this._initialStyles),this._state=3)}}return i.initialStylesByElement=new WeakMap,i})();function jO(i){let t=null;return i.forEach((e,n)=>{(function K_e(i){return"display"===i||"position"===i})(n)&&(t=t||new Map,t.set(n,e))}),t}class e8{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:UG(this.element,r))}),this.currentSnapshot=t}triggerCallback(t){const e="start"===t?this._onStartFns:this._onDoneFns;e.forEach(n=>n()),e.length=0}}class Z_e{validateStyleProperty(t){return!0}validateAnimatableStyleProperty(t){return!0}matchesElement(t,e){return!1}containsElement(t,e){return TG(t,e)}getParentElement(t){return DO(t)}query(t,e,n){return IG(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,d=o.filter(m=>m instanceof e8);(function t_e(i,t){return 0===i||0===t})(n,r)&&d.forEach(m=>{m.currentSnapshot.forEach((g,b)=>c.set(b,g))});let h=function Zge(i){return i.length?i[0]instanceof Map?i:i.map(t=>OG(t)):[]}(e).map(m=>Bu(m));h=function n_e(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,UG(i,a)))}}return t}(t,h,c);const p=function q_e(i,t){let e=null,n=null;return Array.isArray(t)&&t.length?(e=jO(t[0]),t.length>1&&(n=jO(t[t.length-1]))):t instanceof Map&&(e=jO(t)),e||n?new X_e(i,e,n):null}(t,h);return new e8(t,h,l,p)}}let Q_e=(()=>{class i extends nV{constructor(e,n){super(),this._nextAnimationId=0,this._renderer=e.createRenderer(n.body,{id:"0",encapsulation:Ks.None,styles:[],data:{animation:[]}})}build(e){const n=this._nextAnimationId.toString();this._nextAnimationId++;const r=Array.isArray(e)?rV(e):e;return t8(this._renderer,null,n,"register",[r]),new J_e(n,this._renderer)}}return i.\u0275fac=function(e){return new(e||i)(ee(Gl),ee(qt))},i.\u0275prov=Pe({token:i,factory:i.\u0275fac}),i})();class J_e extends LQ{constructor(t,e){super(),this._id=t,this._renderer=e}create(t,e){return new eve(this._id,t,e||{},this._renderer)}}class eve{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 t8(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 t8(i,t,e,n,r){return i.setProperty(t,`@@${e}:${n}`,r)}const n8="@.disabled";let tve=(()=>{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 d=this._rendererCache.get(s);return d||(d=new i8("",s,this.engine,()=>this._rendererCache.delete(s)),this._rendererCache.set(s,d)),d}const o=n.id,a=n.id+"-"+this._currentId;this._currentId++,this.engine.register(a,e);const l=d=>{Array.isArray(d)?d.forEach(l):this.engine.registerTrigger(o,a,e,d.name,d)};return n.data.animation.forEach(l),new nve(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)(ee(Gl),ee(gE),ee(gt))},i.\u0275prov=Pe({token:i,factory:i.\u0275fac}),i})();class i8{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==n8?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 nve extends i8{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==n8?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 ive(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 rve(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 r8=[{provide:nV,useClass:Q_e},{provide:VO,useFactory:function ove(){return new S_e}},{provide:gE,useClass:(()=>{class i extends gE{constructor(e,n,r,s){super(e.body,n,r)}ngOnDestroy(){this.flush()}}return i.\u0275fac=function(e){return new(e||i)(ee(qt),ee(TO),ee(VO),ee(dm))},i.\u0275prov=Pe({token:i,factory:i.\u0275fac}),i})()},{provide:Gl,useFactory:function ave(i,t,e){return new tve(i,t,e)},deps:[aM,gE,gt]}],YO=[{provide:TO,useFactory:()=>new Z_e},{provide:kr,useValue:"BrowserAnimations"},...r8],s8=[{provide:TO,useClass:RG},{provide:kr,useValue:"NoopAnimations"},...r8];let lve=(()=>{class i{static withConfig(e){return{ngModule:i,providers:e.disableAnimations?s8:YO}}}return i.\u0275fac=function(e){return new(e||i)},i.\u0275mod=en({type:i}),i.\u0275inj=Wt({providers:YO,imports:[LB]}),i})();const o8=new me("CdkAccordion");let cve=0,dve=(()=>{class i{get expanded(){return this._expanded}set expanded(e){e=tn(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=tn(e)}constructor(e,n,r){this.accordion=e,this._changeDetectorRef=n,this._expansionDispatcher=r,this._openCloseAllSubscription=Qt.EMPTY,this.closed=new $e,this.opened=new $e,this.destroyed=new $e,this.expandedChange=new $e,this.id="cdk-accordion-child-"+cve++,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)(E(o8,12),E(Qn),E($R))},i.\u0275dir=ve({type:i,selectors:[["cdk-accordion-item"],["","cdkAccordionItem",""]],inputs:{expanded:"expanded",disabled:"disabled"},outputs:{closed:"closed",opened:"opened",destroyed:"destroyed",expandedChange:"expandedChange"},exportAs:["cdkAccordionItem"],features:[Dn([{provide:o8,useValue:void 0}])]}),i})(),uve=(()=>{class i{}return i.\u0275fac=function(e){return new(e||i)},i.\u0275mod=en({type:i}),i.\u0275inj=Wt({}),i})();const hve=["body"];function fve(i,t){}const pve=[[["mat-expansion-panel-header"]],"*",[["mat-action-row"]]],mve=["mat-expansion-panel-header","*","mat-action-row"];function gve(i,t){1&i&&Ie(0,"span",2),2&i&&U("@indicatorRotate",re()._getExpandedState())}const _ve=[[["mat-panel-title"]],[["mat-panel-description"]],"*"],vve=["mat-panel-title","mat-panel-description","*"],a8=new me("MAT_ACCORDION"),l8="225ms cubic-bezier(0.4,0.0,0.2,1)",c8={indicatorRotate:Oa("indicatorRotate",[Os("collapsed, void",oi({transform:"rotate(0deg)"})),Os("expanded",oi({transform:"rotate(180deg)"})),Or("expanded <=> collapsed, void => collapsed",Yr(l8))]),bodyExpansion:Oa("bodyExpansion",[Os("collapsed, void",oi({height:"0px",visibility:"hidden"})),Os("expanded",oi({height:"*",visibility:"visible"})),Or("expanded <=> collapsed, void => collapsed",Yr(l8))])},d8=new me("MAT_EXPANSION_PANEL");let yve=(()=>{class i{constructor(e,n){this._template=e,this._expansionPanel=n}}return i.\u0275fac=function(e){return new(e||i)(E(Eo),E(d8,8))},i.\u0275dir=ve({type:i,selectors:[["ng-template","matExpansionPanelContent",""]]}),i})(),bve=0;const u8=new me("MAT_EXPANSION_PANEL_DEFAULT_OPTIONS");let h8=(()=>{class i extends dve{get hideToggle(){return this._hideToggle||this.accordion&&this.accordion.hideToggle}set hideToggle(e){this._hideToggle=tn(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 $e,this.afterCollapse=new $e,this._inputChanges=new Te,this._headerId="mat-expansion-panel-header-"+bve++,this._bodyAnimationDone=new Te,this.accordion=e,this._document=o,this._bodyAnimationDone.pipe(Ql((c,d)=>c.fromState===d.fromState&&c.toState===d.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(Do(null),gn(()=>this.expanded&&!this._portal),Oi(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)(E(a8,12),E(Qn),E($R),E(jr),E(qt),E(kr,8),E(u8,8))},i.\u0275cmp=ot({type:i,selectors:[["mat-expansion-panel"]],contentQueries:function(e,n,r){if(1&e&&Wi(r,yve,5),2&e){let s;At(s=Dt())&&(n._lazyContent=s.first)}},viewQuery:function(e,n){if(1&e&&$n(hve,5),2&e){let r;At(r=Dt())&&(n._body=r.first)}},hostAttrs:[1,"mat-expansion-panel"],hostVars:6,hostBindings:function(e,n){2&e&&ln("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:[Dn([{provide:a8,useValue:void 0},{provide:d8,useExisting:i}]),dt,xi],ngContentSelectors:mve,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&&(or(pve),Yt(0),G(1,"div",0,1),Oe("@bodyExpansion.done",function(s){return n._bodyAnimationDone.next(s)}),G(3,"div",2),Yt(4,1),fe(5,fve,0,0,"ng-template",3),j(),Yt(6,2),j()),2&e&&(V(1),U("@bodyExpansion",n._getExpandedState())("id",n.id),It("aria-labelledby",n._headerId),V(4),U("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:[c8.bodyExpansion]},changeDetection:0}),i})();class xve{}const wve=JI(xve);let Mve=(()=>{class i extends wve{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=Qt.EMPTY;const c=e.accordion?e.accordion._stateChanges.pipe(gn(d=>!(!d.hideToggle&&!d.togglePosition))):_o;this.tabIndex=parseInt(l||"")||0,this._parentChangeSubscription=Cr(e.opened,e.closed,c,e._inputChanges.pipe(gn(d=>!!(d.hideToggle||d.disabled||d.togglePosition)))).subscribe(()=>this._changeDetectorRef.markForCheck()),e.closed.pipe(gn(()=>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:Zo(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)(E(h8,1),E(vt),E(Xc),E(Qn),E(u8,8),E(kr,8),xa("tabindex"))},i.\u0275cmp=ot({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&&Oe("click",function(){return n._toggle()})("keydown",function(s){return n._keydown(s)}),2&e&&(It("id",n.panel._headerId)("tabindex",n.tabIndex)("aria-controls",n._getPanelId())("aria-expanded",n._isExpanded())("aria-disabled",n.panel.disabled),qo("height",n._getHeaderHeight()),ln("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:[dt],ngContentSelectors:vve,decls:5,vars:3,consts:[[1,"mat-content"],["class","mat-expansion-indicator",4,"ngIf"],[1,"mat-expansion-indicator"]],template:function(e,n){1&e&&(or(_ve),G(0,"span",0),Yt(1),Yt(2,1),Yt(3,2),j(),fe(4,gve,1,1,"span",1)),2&e&&(ln("mat-content-hide-toggle",!n._showToggle()),V(4),U("ngIf",n._showToggle()))},dependencies:[vi],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:[c8.indicatorRotate]},changeDetection:0}),i})(),Cve=(()=>{class i{}return i.\u0275fac=function(e){return new(e||i)},i.\u0275dir=ve({type:i,selectors:[["mat-panel-description"]],hostAttrs:[1,"mat-expansion-panel-header-description"]}),i})(),Sve=(()=>{class i{}return i.\u0275fac=function(e){return new(e||i)},i.\u0275dir=ve({type:i,selectors:[["mat-panel-title"]],hostAttrs:[1,"mat-expansion-panel-header-title"]}),i})(),Eve=(()=>{class i{}return i.\u0275fac=function(e){return new(e||i)},i.\u0275mod=en({type:i}),i.\u0275inj=Wt({imports:[co,Jn,uve,Bh]}),i})();function Ave(i,t){if(1&i&&(G(0,"mat-option",19),Be(1),j()),2&i){const e=t.$implicit;U("value",e),V(1),Qi(" ",e," ")}}function Dve(i,t){if(1&i){const e=jn();G(0,"mat-form-field",16)(1,"mat-select",17),Oe("selectionChange",function(r){return Vt(e),Et(re(2)._changePageSize(r.value))}),fe(2,Ave,2,2,"mat-option",18),j()()}if(2&i){const e=re(2);U("appearance",e._formFieldAppearance)("color",e.color),V(1),U("value",e.pageSize)("disabled",e.disabled)("aria-labelledby",e._pageSizeLabelId)("panelClass",e.selectConfig.panelClass||"")("disableOptionCentering",e.selectConfig.disableOptionCentering),V(1),U("ngForOf",e._displayedPageSizeOptions)}}function Tve(i,t){if(1&i&&(G(0,"div",20),Be(1),j()),2&i){const e=re(2);V(1),ui(e.pageSize)}}function Ive(i,t){if(1&i&&(G(0,"div",12)(1,"div",13),Be(2),j(),fe(3,Dve,3,8,"mat-form-field",14),fe(4,Tve,2,1,"div",15),j()),2&i){const e=re();V(1),ND("id",e._pageSizeLabelId),V(1),Qi(" ",e._intl.itemsPerPageLabel," "),V(1),U("ngIf",e._displayedPageSizeOptions.length>1),V(1),U("ngIf",e._displayedPageSizeOptions.length<=1)}}function Rve(i,t){if(1&i){const e=jn();G(0,"button",21),Oe("click",function(){return Vt(e),Et(re().firstPage())}),ki(),G(1,"svg",7),Ie(2,"path",22),j()()}if(2&i){const e=re();U("matTooltip",e._intl.firstPageLabel)("matTooltipDisabled",e._previousButtonsDisabled())("matTooltipPosition","above")("disabled",e._previousButtonsDisabled()),It("aria-label",e._intl.firstPageLabel)}}function kve(i,t){if(1&i){const e=jn();ki(),va(),G(0,"button",23),Oe("click",function(){return Vt(e),Et(re().lastPage())}),ki(),G(1,"svg",7),Ie(2,"path",24),j()()}if(2&i){const e=re();U("matTooltip",e._intl.lastPageLabel)("matTooltipDisabled",e._nextButtonsDisabled())("matTooltipPosition","above")("disabled",e._nextButtonsDisabled()),It("aria-label",e._intl.lastPageLabel)}}let vE=(()=>{class i{constructor(){this.changes=new Te,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=Pe({token:i,factory:i.\u0275fac,providedIn:"root"}),i})();const Ove={provide:vE,deps:[[new Ss,new Ma,vE]],useFactory:function Pve(i){return i||new vE}},Lve=new me("MAT_PAGINATOR_DEFAULT_OPTIONS"),Nve=WM(CQ(class{}));let Bve=(()=>{class i extends Nve{get pageIndex(){return this._pageIndex}set pageIndex(e){this._pageIndex=Math.max(Ps(e),0),this._changeDetectorRef.markForCheck()}get length(){return this._length}set length(e){this._length=Ps(e),this._changeDetectorRef.markForCheck()}get pageSize(){return this._pageSize}set pageSize(e){this._pageSize=Math.max(Ps(e),0),this._updateDisplayedPageSizeOptions()}get pageSizeOptions(){return this._pageSizeOptions}set pageSizeOptions(e){this._pageSizeOptions=(e||[]).map(n=>Ps(n)),this._updateDisplayedPageSizeOptions()}get hidePageSize(){return this._hidePageSize}set hidePageSize(e){this._hidePageSize=tn(e)}get showFirstLastButtons(){return this._showFirstLastButtons}set showFirstLastButtons(e){this._showFirstLastButtons=tn(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 $e,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){Co()},i.\u0275dir=ve({type:i,inputs:{color:"color",pageIndex:"pageIndex",length:"length",pageSize:"pageSize",pageSizeOptions:"pageSizeOptions",hidePageSize:"hidePageSize",showFirstLastButtons:"showFirstLastButtons",selectConfig:"selectConfig"},outputs:{page:"page"},features:[dt]}),i})(),Uve=0,Vve=(()=>{class i extends Bve{constructor(e,n,r){super(e,n,r),this._pageSizeLabelId="mat-paginator-page-size-label-"+Uve++,this._formFieldAppearance=r?.formFieldAppearance||"outline"}}return i.\u0275fac=function(e){return new(e||i)(E(vE),E(Qn),E(Lve,8))},i.\u0275cmp=ot({type:i,selectors:[["mat-paginator"]],hostAttrs:["role","group",1,"mat-mdc-paginator"],inputs:{disabled:"disabled"},exportAs:["matPaginator"],features:[dt],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&&(G(0,"div",0)(1,"div",1),fe(2,Ive,5,4,"div",2),G(3,"div",3)(4,"div",4),Be(5),j(),fe(6,Rve,3,5,"button",5),G(7,"button",6),Oe("click",function(){return n.previousPage()}),ki(),G(8,"svg",7),Ie(9,"path",8),j()(),va(),G(10,"button",9),Oe("click",function(){return n.nextPage()}),ki(),G(11,"svg",7),Ie(12,"path",10),j()(),fe(13,kve,3,5,"button",11),j()()()),2&e&&(V(2),U("ngIf",!n.hidePageSize),V(3),Qi(" ",n._intl.getRangeLabel(n.pageIndex,n.pageSize,n.length)," "),V(1),U("ngIf",n.showFirstLastButtons),V(1),U("matTooltip",n._intl.previousPageLabel)("matTooltipDisabled",n._previousButtonsDisabled())("matTooltipPosition","above")("disabled",n._previousButtonsDisabled()),It("aria-label",n._intl.previousPageLabel),V(3),U("matTooltip",n._intl.nextPageLabel)("matTooltipDisabled",n._nextButtonsDisabled())("matTooltipPosition","above")("disabled",n._nextButtonsDisabled()),It("aria-label",n._intl.nextPageLabel),V(3),U("ngIf",n.showFirstLastButtons))},dependencies:[lo,vi,qM,yl,pb,Nm,Fs],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})(),zve=(()=>{class i{}return i.\u0275fac=function(e){return new(e||i)},i.\u0275mod=en({type:i}),i.\u0275inj=Wt({providers:[Ove],imports:[co,XM,VH,LV]}),i})(),Hve=(()=>{class i{}return i.\u0275fac=function(e){return new(e||i)},i.\u0275mod=en({type:i,bootstrap:[cge]}),i.\u0275inj=Wt({providers:[Jl,KR,{provide:OH,useValue:Vie}],imports:[LB,wK,lve,tH,SJ,mC,mH,Eve,TV,kV,LV,XM,tz,zve,mse,vH,VH,vV,Ipe,Rme,nH,tR,Yie,lre]}),i})();th(ec,[lo,vi,Fs,n0,tE],[Ia]),th(zR,[hm,lo,vi,xy,nc,Zc,yl,h8,Mve,Sve,Cve,Fs,Vve,pb,Nm,n0],[]),th(bC,[lo,vi,wC,xC,_H,n0],[]),th(_G,[lo,vi,Ro,Fs,pb,Nm,n0,tE],[Ia]),L7().bootstrapModule(Hve).catch(i=>console.error(i))},489:function(Bo,Gs,ps){var dn;Bo=ps.nmd(Bo),function(){var z,Kr=200,Un="Expected a function",Ga="__lodash_hash_undefined__",Ci="__lodash_placeholder__",Si=1,ms=2,js=4,Ys=1,Uo=2,On=1,ur=2,mc=4,da=8,Tl=16,ua=32,Il=64,Wa=128,ha=256,md=512,wE=800,Kg=16,In=1/0,Ya=9007199254740991,CE=17976931348623157e292,Of=NaN,fa=4294967295,Te=fa-1,c0=fa>>>1,d0=[["ary",Wa],["bind",On],["bindKey",ur],["curry",da],["curryRight",Tl],["flip",md],["partial",ua],["partialRight",Il],["rearg",ha]],ni="[object Arguments]",qn="[object Array]",SE="[object AsyncFunction]",tt="[object Boolean]",gc="[object Date]",EE="[object DOMException]",gd="[object Error]",Ff="[object Function]",u0="[object GeneratorFunction]",Vo="[object Map]",Vu="[object Number]",AE="[object Null]",qa="[object Object]",h0="[object Promise]",DE="[object Proxy]",_d="[object RegExp]",zo="[object Set]",_c="[object String]",Lf="[object Symbol]",Zg="[object Undefined]",vd="[object WeakMap]",zu="[object ArrayBuffer]",yd="[object DataView]",pa="[object Float32Array]",Nf="[object Float64Array]",Qg="[object Int8Array]",Bf="[object Int16Array]",Jg="[object Int32Array]",e_="[object Uint8Array]",Hu="[object Uint8ClampedArray]",t_="[object Uint16Array]",n_="[object Uint32Array]",IE=/\b__p \+= '';/g,RE=/\b(__p \+=) '' \+/g,kE=/(__e\(.*?\)|\b__t\)) \+\n'';/g,f0=/&(?:amp|lt|gt|quot|#39);/g,p0=/[&<>"']/g,PE=RegExp(f0.source),OE=RegExp(p0.source),QO=/<%-([\s\S]+?)%>/g,i_=/<%([\s\S]+?)%>/g,r_=/<%=([\s\S]+?)%>/g,m0=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,g0=/^\w*$/,_0=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,s_=/[\\^$.*+?()[\]{}|]/g,v0=RegExp(s_.source),Uf=/^\s+/,y0=/\s/,b0=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,Mr=/\{\n\/\* \[wrapped with (.+)\] \*/,FE=/,? & /,LE=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,NE=/[()=,{}\[\]\/\s]/,BE=/\\(\\)?/g,x0=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,w0=/\w*$/,UE=/^[-+]0x[0-9a-f]+$/i,Xa=/^0b[01]+$/i,VE=/^\[object .+?Constructor\]$/,rr=/^0o[0-7]+$/i,bd=/^(?:0|[1-9]\d*)$/,_o=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,o_=/($^)/,zE=/['\n\r\u2028\u2029\\]/g,$u="\\ud800-\\udfff",C0="\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff",l_="\\u2700-\\u27bf",c_="a-z\\xdf-\\xf6\\xf8-\\xff",d_="A-Z\\xc0-\\xd6\\xd8-\\xde",S0="\\ufe0e\\ufe0f",E0="\\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",Cr="["+$u+"]",Vf="["+E0+"]",xd="["+C0+"]",ci="\\d+",u_="["+l_+"]",mi="["+c_+"]",zf="[^"+$u+E0+ci+l_+c_+d_+"]",h_="\\ud83c[\\udffb-\\udfff]",Ot="[^"+$u+"]",Wu="(?:\\ud83c[\\udde6-\\uddff]){2}",ju="[\\ud800-\\udbff][\\udc00-\\udfff]",Yu="["+d_+"]",pe="(?:"+mi+"|"+zf+")",Hf="(?:"+Yu+"|"+zf+")",Jt="(?:['\u2019](?:d|ll|m|re|s|t|ve))?",Xn="(?:['\u2019](?:D|LL|M|RE|S|T|VE))?",A0="(?:"+xd+"|"+h_+")?",jE="["+S0+"]?",qE=jE+A0+"(?:\\u200d(?:"+[Ot,Wu,ju].join("|")+")"+jE+A0+")*",XE="(?:"+[u_,Wu,ju].join("|")+")"+qE,JO="(?:"+[Ot+xd+"?",xd,Wu,ju,Cr].join("|")+")",Rl=RegExp("['\u2019]","g"),eF=RegExp(xd,"g"),D0=RegExp(h_+"(?="+h_+")|"+JO+qE,"g"),tF=RegExp([Yu+"?"+mi+"+"+Jt+"(?="+[Vf,Yu,"$"].join("|")+")",Hf+"+"+Xn+"(?="+[Vf,Yu+pe,"$"].join("|")+")",Yu+"?"+pe+"+"+Jt,Yu+"+"+Xn,"\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])","\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",ci,XE].join("|"),"g"),nF=RegExp("[\\u200d"+$u+C0+S0+"]"),KE=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,iF=["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"],ZE=-1,Ei={};Ei[pa]=Ei[Nf]=Ei[Qg]=Ei[Bf]=Ei[Jg]=Ei[e_]=Ei[Hu]=Ei[t_]=Ei[n_]=!0,Ei[ni]=Ei[qn]=Ei[zu]=Ei[tt]=Ei[yd]=Ei[gc]=Ei[gd]=Ei[Ff]=Ei[Vo]=Ei[Vu]=Ei[qa]=Ei[_d]=Ei[zo]=Ei[_c]=Ei[vd]=!1;var En={};En[ni]=En[qn]=En[zu]=En[yd]=En[tt]=En[gc]=En[pa]=En[Nf]=En[Qg]=En[Bf]=En[Jg]=En[Vo]=En[Vu]=En[qa]=En[_d]=En[zo]=En[_c]=En[Lf]=En[e_]=En[Hu]=En[t_]=En[n_]=!0,En[gd]=En[Ff]=En[vd]=!1;var oF={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},Pe=parseFloat,aF=parseInt,Wt="object"==typeof global&&global&&global.Object===Object&&global,Gf="object"==typeof self&&self&&self.Object===Object&&self,Sr=Wt||Gf||Function("return this")(),f_=Gs&&!Gs.nodeType&&Gs,Xu=f_&&Bo&&!Bo.nodeType&&Bo,p_=Xu&&Xu.exports===f_,wd=p_&&Wt.process,gs=function(){try{return Xu&&Xu.require&&Xu.require("util").types||wd&&wd.binding&&wd.binding("util")}catch{}}(),m_=gs&&gs.isArrayBuffer,T0=gs&&gs.isDate,Ft=gs&&gs.isMap,Wf=gs&&gs.isRegExp,I0=gs&&gs.isSet,Xs=gs&&gs.isTypedArray;function _s(X,he,ae){switch(ae.length){case 0:return X.call(he);case 1:return X.call(he,ae[0]);case 2:return X.call(he,ae[0],ae[1]);case 3:return X.call(he,ae[0],ae[1],ae[2])}return X.apply(he,ae)}function lF(X,he,ae,ze){for(var jt=-1,Vn=null==X?0:X.length;++jt-1}function Ku(X,he,ae){for(var ze=-1,jt=null==X?0:X.length;++ze-1;);return ae}function ma(X,he){for(var ae=X.length;ae--&&Lt(he,X[ae],0)>-1;);return ae}var tA=v_({\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"}),ot=v_({"&":"&","<":"<",">":">",'"':""","'":"'"});function th(X){return"\\"+oF[X]}function Sd(X){return nF.test(X)}function Xf(X){var he=-1,ae=Array(X.size);return X.forEach(function(ze,jt){ae[++he]=[jt,ze]}),ae}function ve(X,he){return function(ae){return X(he(ae))}}function $i(X,he){for(var ae=-1,ze=X.length,jt=0,Vn=[];++ae",""":'"',"'":"'"}),ys=function X(he){var u,ae=(he=null==he?Sr:ys.defaults(Sr.Object(),he,ys.pick(Sr,iF))).Array,ze=he.Date,jt=he.Error,Vn=he.Function,xt=he.Math,ai=he.Object,bc=he.RegExp,k0=he.String,Er=he.TypeError,sr=ae.prototype,Ho=ai.prototype,Zs=he["__core-js_shared__"],Ol=Vn.prototype.toString,ri=Ho.hasOwnProperty,bi=0,rA=(u=/[^.]+$/.exec(Zs&&Zs.keys&&Zs.keys.IE_PROTO||""))?"Symbol(src)_1."+u:"",Ad=Ho.toString,P0=Ol.call(ai),Zf=Sr._,Qf=bc("^"+Ol.call(ri).replace(s_,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),Ja=p_?he.Buffer:z,Ui=he.Symbol,x_=he.Uint8Array,bs=Ja?Ja.allocUnsafe:z,xs=ve(ai.getPrototypeOf,ai),Jf=ai.create,Dd=Ho.propertyIsEnumerable,xc=sr.splice,bo=Ui?Ui.isConcatSpreadable:z,ih=Ui?Ui.iterator:z,Td=Ui?Ui.toStringTag:z,ep=function(){try{var u=kc(ai,"defineProperty");return u({},"",{}),u}catch{}}(),sA=he.clearTimeout!==Sr.clearTimeout&&he.clearTimeout,dF=ze&&ze.now!==Sr.Date.now&&ze.now,uF=he.setTimeout!==Sr.setTimeout&&he.setTimeout,w_=xt.ceil,M_=xt.floor,O0=ai.getOwnPropertySymbols,hF=Ja?Ja.isBuffer:z,oA=he.isFinite,fF=sr.join,pF=ve(ai.keys,ai),fr=xt.max,Zr=xt.min,mF=ze.now,F0=he.parseInt,C_=xt.random,gF=sr.reverse,L0=kc(he,"DataView"),tp=kc(he,"Map"),el=kc(he,"Promise"),Id=kc(he,"Set"),xi=kc(he,"WeakMap"),Rd=kc(ai,"create"),np=xi&&new xi,kd={},N0=Pc(L0),B0=Pc(tp),aA=Pc(el),S_=Pc(Id),lA=Pc(xi),Qr=Ui?Ui.prototype:z,Pd=Qr?Qr.valueOf:z,E_=Qr?Qr.toString:z;function I(u){if(Pi(u)&&!sn(u)&&!(u instanceof kn)){if(u instanceof Ai)return u;if(ri.call(u,"__wrapped__"))return ns(u)}return new Ai(u)}var Od=function(){function u(){}return function(f){if(!Mi(f))return{};if(Jf)return Jf(f);u.prototype=f;var _=new u;return u.prototype=z,_}}();function wc(){}function Ai(u,f){this.__wrapped__=u,this.__actions__=[],this.__chain__=!!f,this.__index__=0,this.__values__=z}function kn(u){this.__wrapped__=u,this.__actions__=[],this.__dir__=1,this.__filtered__=!1,this.__iteratees__=[],this.__takeCount__=fa,this.__views__=[]}function Mc(u){var f=-1,_=null==u?0:u.length;for(this.clear();++f<_;){var w=u[f];this.set(w[0],w[1])}}function Pt(u){var f=-1,_=null==u?0:u.length;for(this.clear();++f<_;){var w=u[f];this.set(w[0],w[1])}}function ga(u){var f=-1,_=null==u?0:u.length;for(this.clear();++f<_;){var w=u[f];this.set(w[0],w[1])}}function Et(u){var f=-1,_=null==u?0:u.length;for(this.__data__=new ga;++f<_;)this.add(u[f])}function Jr(u){var f=this.__data__=new Pt(u);this.size=f.size}function I_(u,f){var _=sn(u),w=!_&&Lc(u),S=!_&&!w&&ol(u),P=!_&&!w&&!S&&jo(u),$=_||w||S||P,Y=$?Ks(u.length,k0):[],Q=Y.length;for(var _e in u)(f||ri.call(u,_e))&&(!$||!("length"==_e||S&&("offset"==_e||"parent"==_e)||P&&("buffer"==_e||"byteLength"==_e||"byteOffset"==_e)||sl(_e,Q)))&&Y.push(_e);return Y}function zr(u){var f=u.length;return f?u[lh(0,f-1)]:z}function tl(u,f){return Ep(eo(u),Nl(f,0,u.length))}function $0(u){return Ep(eo(u))}function Ll(u,f,_){(_!==z&&!Wo(u[f],_)||_===z&&!(f in u))&&$o(u,f,_)}function Qs(u,f,_){var w=u[f];(!ri.call(u,f)||!Wo(w,_)||_===z&&!(f in u))&&$o(u,f,_)}function rp(u,f){for(var _=u.length;_--;)if(Wo(u[_][0],f))return _;return-1}function G0(u,f,_,w){return nl(u,function(S,P,$){f(w,S,_(S),$)}),w}function W0(u,f){return u&&di(f,pr(f),u)}function $o(u,f,_){"__proto__"==f&&ep?ep(u,f,{configurable:!0,enumerable:!0,value:_,writable:!0}):u[f]=_}function rh(u,f){for(var _=-1,w=f.length,S=ae(w),P=null==u;++_=f?u:f)),u}function Ms(u,f,_,w,S,P){var $,Y=f&Si,Q=f&ms,_e=f&js;if(_&&($=S?_(u,w,S,P):_(u)),$!==z)return $;if(!Mi(u))return u;var ye=sn(u);if(ye){if($=function fx(u){var f=u.length,_=new u.constructor(f);return f&&"string"==typeof u[0]&&ri.call(u,"index")&&(_.index=u.index,_.input=u.input),_}(u),!Y)return eo(u,$)}else{var be=Hr(u),Xe=be==Ff||be==u0;if(ol(u))return me(u,Y);if(be==qa||be==ni||Xe&&!S){if($=Q||Xe?{}:kA(u),!Y)return Q?function hh(u,f){return di(u,dx(u),f)}(u,function gA(u,f){return u&&di(f,Ds(f),u)}($,u)):function H_(u,f){return di(u,Z_(u),f)}(u,W0($,u))}else{if(!En[be])return S?u:{};$=function px(u,f,_){var w=u.constructor;switch(f){case zu:return sx(u);case tt:case gc:return new w(+u);case yd:return function wF(u,f){var _=f?sx(u.buffer):u.buffer;return new u.constructor(_,u.byteOffset,u.byteLength)}(u,_);case pa:case Nf:case Qg:case Bf:case Jg:case e_:case Hu:case t_:case n_:return EA(u,_);case Vo:return new w;case Vu:case _c:return new w(u);case _d:return function MF(u){var f=new u.constructor(u.source,w0.exec(u));return f.lastIndex=u.lastIndex,f}(u);case zo:return new w;case Lf:return function CF(u){return Pd?ai(Pd.call(u)):{}}(u)}}(u,be,Y)}}P||(P=new Jr);var bt=P.get(u);if(bt)return bt;P.set(u,$),iw(u)?u.forEach(function(Ht){$.add(Ms(Ht,f,_,Ht,u,P))}):Tv(u)&&u.forEach(function(Ht,An){$.set(An,Ms(Ht,f,_,An,u,P))});var mn=ye?z:(_e?Q?q_:bp:Q?Ds:pr)(u);return Rn(mn||u,function(Ht,An){mn&&(Ht=u[An=Ht]),Qs($,An,Ms(Ht,f,_,An,u,P))}),$}function R_(u,f,_){var w=_.length;if(null==u)return!w;for(u=ai(u);w--;){var S=_[w],$=u[S];if($===z&&!(S in u)||!(0,f[S])($))return!1}return!0}function sp(u,f,_){if("function"!=typeof u)throw new Er(Un);return gh(function(){u.apply(z,_)},f)}function Ld(u,f,_,w){var S=-1,P=kl,$=!0,Y=u.length,Q=[],_e=f.length;if(!Y)return Q;_&&(f=gi(f,Ur(_))),w?(P=Ku,$=!1):f.length>=Kr&&(P=yc,$=!1,f=new Et(f));e:for(;++S-1},Pt.prototype.set=function hA(u,f){var _=this.__data__,w=rp(_,u);return w<0?(++this.size,_.push([u,f])):_[w][1]=f,this},ga.prototype.clear=function fA(){this.size=0,this.__data__={hash:new Mc,map:new(tp||Pt),string:new Mc}},ga.prototype.delete=function pA(u){var f=K_(this,u).delete(u);return this.size-=f?1:0,f},ga.prototype.get=function Se(u){return K_(this,u).get(u)},ga.prototype.has=function zn(u){return K_(this,u).has(u)},ga.prototype.set=function Vt(u,f){var _=K_(this,u),w=_.size;return _.set(u,f),this.size+=_.size==w?0:1,this},Et.prototype.add=Et.prototype.push=function Ar(u){return this.__data__.set(u,Ga),this},Et.prototype.has=function H0(u){return this.__data__.has(u)},Jr.prototype.clear=function _a(){this.__data__=new Pt,this.size=0},Jr.prototype.delete=function D_(u){var f=this.__data__,_=f.delete(u);return this.size=f.size,_},Jr.prototype.get=function T_(u){return this.__data__.get(u)},Jr.prototype.has=function mA(u){return this.__data__.has(u)},Jr.prototype.set=function vF(u,f){var _=this.__data__;if(_ instanceof Pt){var w=_.__data__;if(!tp||w.length0&&_(Y)?f>1?Kn(Y,f-1,_,w,S):Pl(S,Y):w||(S[S.length]=Y)}return S}var il=$_(),Di=$_(!0);function ki(u,f){return u&&il(u,f,pr)}function P_(u,f){return u&&Di(u,f,pr)}function va(u,f){return vc(f,function(_){return Hl(u[_])})}function Cc(u,f){for(var _=0,w=(f=wa(f,u)).length;null!=u&&_f}function op(u,f){return null!=u&&ri.call(u,f)}function ap(u,f){return null!=u&&f in ai(u)}function lp(u,f,_){for(var w=_?Ku:kl,S=u[0].length,P=u.length,$=P,Y=ae(P),Q=1/0,_e=[];$--;){var ye=u[$];$&&f&&(ye=gi(ye,Ur(f))),Q=Zr(ye.length,Q),Y[$]=!_&&(f||S>=120&&ye.length>=120)?new Et($&&ye):z}ye=u[0];var be=-1,Xe=Y[0];e:for(;++be=Y?Q:Q*("desc"==_[w]?-1:1)}return u.index-f.index}(P,$,_)})}function J0(u,f,_){for(var w=-1,S=f.length,P={};++w-1;)Y!==u&&xc.call(Y,Q,1),xc.call(u,Q,1);return u}function ah(u,f){for(var _=u?f.length:0,w=_-1;_--;){var S=f[_];if(_==w||S!==P){var P=S;sl(S)?xc.call(u,S,1):dh(u,S)}}return u}function lh(u,f){return u+M_(C_()*(f-u+1))}function ch(u,f){var _="";if(!u||f<1||f>Ya)return _;do{f%2&&(_+=u),(f=M_(f/2))&&(u+=u)}while(f);return _}function pn(u,f){return Cp(J_(u,f,is),u+"")}function CA(u){return zr(Uc(u))}function tx(u,f){var _=Uc(u);return Ep(_,Nl(f,0,_.length))}function zd(u,f,_,w){if(!Mi(u))return u;for(var S=-1,P=(f=wa(f,u)).length,$=P-1,Y=u;null!=Y&&++SS?0:S+f),(_=_>S?S:_)<0&&(_+=S),S=f>_?0:_-f>>>0,f>>>=0;for(var P=ae(S);++w>>1,$=u[P];null!==$&&!As($)&&(_?$<=f:$=Kr){var _e=f?null:j_(u);if(_e)return Hn(_e);$=!1,S=yc,Q=new Et}else Q=f?[]:Y;e:for(;++w=w?u:ts(u,f,_)}var rx=sA||function(u){return Sr.clearTimeout(u)};function me(u,f){if(f)return u.slice();var _=u.length,w=bs?bs(_):new u.constructor(_);return u.copy(w),w}function sx(u){var f=new u.constructor(u.byteLength);return new x_(f).set(new x_(u)),f}function EA(u,f){var _=f?sx(u.buffer):u.buffer;return new u.constructor(_,u.byteOffset,u.length)}function AA(u,f){if(u!==f){var _=u!==z,w=null===u,S=u==u,P=As(u),$=f!==z,Y=null===f,Q=f==f,_e=As(f);if(!Y&&!_e&&!P&&u>f||P&&$&&Q&&!Y&&!_e||w&&$&&Q||!_&&Q||!S)return 1;if(!w&&!P&&!_e&&u1?_[S-1]:z,$=S>2?_[2]:z;for(P=u.length>3&&"function"==typeof P?(S--,P):z,$&&Tr(_[0],_[1],$)&&(P=S<3?z:P,S=1),f=ai(f);++w-1?S[P?f[$]:$]:z}}function Cs(u){return wo(function(f){var _=f.length,w=_,S=Ai.prototype.thru;for(u&&f.reverse();w--;){var P=f[w];if("function"!=typeof P)throw new Er(Un);if(S&&!$&&"wrapper"==rl(P))var $=new Ai([],!0)}for(w=$?w:_;++w<_;){var Y=rl(P=f[w]),Q="wrapper"==Y?X_(P):z;$=Q&&mh(Q[0])&&Q[1]==(Wa|da|ua|ha)&&!Q[4].length&&1==Q[9]?$[rl(Q[0])].apply($,Q[3]):1==P.length&&mh(P)?$[Y]():$.thru(P)}return function(){var _e=arguments,ye=_e[0];if($&&1==_e.length&&sn(ye))return $.plant(ye).value();for(var be=0,Xe=_?f[be].apply(this,_e):ye;++be<_;)Xe=f[be].call(this,Xe);return Xe}})}function jd(u,f,_,w,S,P,$,Y,Q,_e){var ye=f&Wa,be=f&On,Xe=f&ur,bt=f&(da|Tl),zt=f&md,mn=Xe?z:gp(u);return function Ht(){for(var An=arguments.length,Ln=ae(An),rs=An;rs--;)Ln[rs]=arguments[rs];if(bt)var ss=Ca(Ht),so=function eh(X,he){for(var ae=X.length,ze=0;ae--;)X[ae]===he&&++ze;return ze}(Ln,ss);if(w&&(Ln=$d(Ln,w,S,bt)),P&&(Ln=DA(Ln,P,$,bt)),An-=so,bt&&An<_e){var Ti=$i(Ln,ss);return ax(u,f,jd,Ht.placeholder,_,Ln,Ti,Y,Q,_e-An)}var Ts=be?_:this,So=Xe?Ts[u]:u;return An=Ln.length,Y?Ln=function Es(u,f){for(var _=u.length,w=Zr(f.length,_),S=eo(u);w--;){var P=f[w];u[w]=sl(P,_)?S[P]:z}return u}(Ln,Y):zt&&An>1&&Ln.reverse(),ye&&QY))return!1;var _e=P.get(u),ye=P.get(f);if(_e&&ye)return _e==f&&ye==u;var be=-1,Xe=!0,bt=_&Uo?new Et:z;for(P.set(u,f),P.set(f,u);++be-1&&u%1==0&&u1?"& ":"")+f[w],f=f.join(_>2?", ":" "),u.replace(b0,"{\n/* [wrapped with "+f+"] */\n")}(w,function NA(u,f){return Rn(d0,function(_){var w="_."+_[0];f&_[1]&&!kl(u,w)&&u.push(w)}),u.sort()}(function ux(u){var f=u.match(Mr);return f?f[1].split(FE):[]}(w),_)))}function yx(u){var f=0,_=0;return function(){var w=mF(),S=Kg-(w-_);if(_=w,S>0){if(++f>=wE)return arguments[0]}else f=0;return u.apply(z,arguments)}}function Ep(u,f){var _=-1,w=u.length,S=w-1;for(f=f===z?w:f;++_1?u[f-1]:z;return _="function"==typeof _?(u.pop(),_):z,yh(u,_)});function Hx(u){var f=I(u);return f.__chain__=!0,f}function Rp(u,f){return f(u)}var $x=wo(function(u){var f=u.length,_=f?u[0]:0,w=this.__wrapped__,S=function(P){return rh(P,u)};return!(f>1||this.__actions__.length)&&w instanceof kn&&sl(_)?((w=w.slice(_,+_+(f?1:0))).__actions__.push({func:Rp,args:[S],thisArg:z}),new Ai(w,this.__chain__).thru(function(P){return f&&!P.length&&P.push(z),P})):this.thru(S)}),r1=pp(function(u,f,_){ri.call(u,_)?++u[_]:$o(u,_,1)}),Wx=IA(Ex),Pp=IA(rv);function bv(u,f){return(sn(u)?Rn:nl)(u,Nt(f,3))}function zl(u,f){return(sn(u)?cF:k_)(u,Nt(f,3))}var o1=pp(function(u,f,_){ri.call(u,_)?u[_].push(f):$o(u,_,[f])}),l1=pn(function(u,f,_){var w=-1,S="function"==typeof f,P=no(u)?ae(u.length):[];return nl(u,function($){P[++w]=S?_s(f,$,_):ya($,f,_)}),P}),c1=pp(function(u,f,_){$o(u,_,f)});function Op(u,f){return(sn(u)?gi:sh)(u,Nt(f,3))}var Sa=pp(function(u,f,_){u[_?0:1].push(f)},function(){return[[],[]]}),_1=pn(function(u,f){if(null==u)return[];var _=f.length;return _>1&&Tr(u,f[0],f[1])?f=[]:_>2&&Tr(f[0],f[1],f[2])&&(f=[f[0]]),B_(u,Kn(f,1),[])}),Fp=dF||function(){return Sr.Date.now()};function xh(u,f,_){return f=_?z:f,xo(u,Wa,z,z,z,z,f=u&&null==f?u.length:f)}function Ea(u,f){var _;if("function"!=typeof f)throw new Er(Un);return u=un(u),function(){return--u>0&&(_=f.apply(this,arguments)),u<=1&&(f=z),_}}var Fc=pn(function(u,f,_){var w=On;if(_.length){var S=$i(_,Ca(Fc));w|=ua}return xo(u,w,f,_,S)}),xv=pn(function(u,f,_){var w=On|ur;if(_.length){var S=$i(_,Ca(xv));w|=ua}return xo(f,w,u,_,S)});function y1(u,f,_){var w,S,P,$,Y,Q,_e=0,ye=!1,be=!1,Xe=!0;if("function"!=typeof u)throw new Er(Un);function bt(Ti){var Ts=w,So=S;return w=S=z,_e=Ti,$=u.apply(So,Ts)}function Ht(Ti){var Ts=Ti-Q;return Q===z||Ts>=f||Ts<0||be&&Ti-_e>=P}function An(){var Ti=Fp();if(Ht(Ti))return Ln(Ti);Y=gh(An,function mn(Ti){var TD=f-(Ti-Q);return be?Zr(TD,P-(Ti-_e)):TD}(Ti))}function Ln(Ti){return Y=z,Xe&&w?bt(Ti):(w=S=z,$)}function so(){var Ti=Fp(),Ts=Ht(Ti);if(w=arguments,S=this,Q=Ti,Ts){if(Y===z)return function zt(Ti){return _e=Ti,Y=gh(An,f),ye?bt(Ti):$}(Q);if(be)return rx(Y),Y=gh(An,f),bt(Q)}return Y===z&&(Y=gh(An,f)),$}return f=Mo(f)||0,Mi(_)&&(ye=!!_.leading,P=(be="maxWait"in _)?fr(Mo(_.maxWait)||0,f):P,Xe="trailing"in _?!!_.trailing:Xe),so.cancel=function rs(){Y!==z&&rx(Y),_e=0,w=Q=S=Y=z},so.flush=function ss(){return Y===z?$:Ln(Fp())},so}var PF=pn(function(u,f){return sp(u,1,f)}),OF=pn(function(u,f,_){return sp(u,Mo(f)||0,_)});function qd(u,f){if("function"!=typeof u||null!=f&&"function"!=typeof f)throw new Er(Un);var _=function(){var w=arguments,S=f?f.apply(this,w):w[0],P=_.cache;if(P.has(S))return P.get(S);var $=u.apply(this,w);return _.cache=P.set(S,$)||P,$};return _.cache=new(qd.Cache||ga),_}function Sv(u){if("function"!=typeof u)throw new Er(Un);return function(){var f=arguments;switch(f.length){case 0:return!u.call(this);case 1:return!u.call(this,f[0]);case 2:return!u.call(this,f[0],f[1]);case 3:return!u.call(this,f[0],f[1],f[2])}return!u.apply(this,f)}}qd.Cache=ga;var Xx=Hd(function(u,f){var _=(f=1==f.length&&sn(f[0])?gi(f[0],Ur(Nt())):gi(Kn(f,1),Ur(Nt()))).length;return pn(function(w){for(var S=-1,P=Zr(w.length,_);++S=f}),Lc=Ud(function(){return arguments}())?Ud:function(u){return Pi(u)&&ri.call(u,"callee")&&!Dd.call(u,"callee")},sn=ae.isArray,LF=m_?Ur(m_):function bA(u){return Pi(u)&&es(u)==zu};function no(u){return null!=u&&zp(u.length)&&!Hl(u)}function wi(u){return Pi(u)&&no(u)}var ol=hF||Jd,ew=T0?Ur(T0):function yF(u){return Pi(u)&&es(u)==gc};function Up(u){if(!Pi(u))return!1;var f=es(u);return f==gd||f==EE||"string"==typeof u.message&&"string"==typeof u.name&&!io(u)}function Hl(u){if(!Mi(u))return!1;var f=es(u);return f==Ff||f==u0||f==SE||f==DE}function Vp(u){return"number"==typeof u&&u==un(u)}function zp(u){return"number"==typeof u&&u>-1&&u%1==0&&u<=Ya}function Mi(u){var f=typeof u;return null!=u&&("object"==f||"function"==f)}function Pi(u){return null!=u&&"object"==typeof u}var Tv=Ft?Ur(Ft):function xA(u){return Pi(u)&&Hr(u)==Vo};function wh(u){return"number"==typeof u||Pi(u)&&es(u)==Vu}function io(u){if(!Pi(u)||es(u)!=qa)return!1;var f=xs(u);if(null===f)return!0;var _=ri.call(f,"constructor")&&f.constructor;return"function"==typeof _&&_ instanceof _&&Ol.call(_)==P0}var $p=Wf?Ur(Wf):function xF(u){return Pi(u)&&es(u)==_d},iw=I0?Ur(I0):function L_(u){return Pi(u)&&Hr(u)==zo};function Gp(u){return"string"==typeof u||!sn(u)&&Pi(u)&&es(u)==_c}function As(u){return"symbol"==typeof u||Pi(u)&&es(u)==Lf}var jo=Xs?Ur(Xs):function X0(u){return Pi(u)&&zp(u.length)&&!!Ei[es(u)]},Pv=yp(cp),P1=yp(function(u,f){return u<=f});function Ov(u){if(!u)return[];if(no(u))return Gp(u)?yo(u):eo(u);if(ih&&u[ih])return function iA(X){for(var he,ae=[];!(he=X.next()).done;)ae.push(he.value);return ae}(u[ih]());var f=Hr(u);return(f==Vo?Xf:f==zo?Hn:Uc)(u)}function al(u){return u?(u=Mo(u))===In||u===-In?(u<0?-1:1)*CE:u==u?u:0:0===u?u:0}function un(u){var f=al(u),_=f%1;return f==f?_?f-_:f:0}function O1(u){return u?Nl(un(u),0,fa):0}function Mo(u){if("number"==typeof u)return u;if(As(u))return Of;if(Mi(u)){var f="function"==typeof u.valueOf?u.valueOf():u;u=Mi(f)?f+"":f}if("string"!=typeof u)return 0===u?u:+u;u=Wn(u);var _=Xa.test(u);return _||rr.test(u)?aF(u.slice(2),_?2:8):UE.test(u)?Of:+u}function $l(u){return di(u,Ds(u))}function Fn(u){return null==u?"":Js(u)}var vt=Dr(function(u,f){if(Mp(f)||no(f))di(f,pr(f),u);else for(var _ in f)ri.call(f,_)&&Qs(u,_,f[_])}),rw=Dr(function(u,f){di(f,Ds(f),u)}),Gl=Dr(function(u,f,_,w){di(f,Ds(f),u,w)}),ll=Dr(function(u,f,_,w){di(f,pr(f),u,w)}),L1=wo(rh),Bc=pn(function(u,f){u=ai(u);var _=-1,w=f.length,S=w>2?f[2]:z;for(S&&Tr(f[0],f[1],S)&&(w=1);++_1),P}),di(u,q_(u),_),w&&(_=Ms(_,Si|ms|js,Ma));for(var S=f.length;S--;)dh(_,f[S]);return _}),j1=wo(function(u,f){return null==u?{}:function Q0(u,f){return J0(u,f,function(_,w){return Uv(u,w)})}(u,f)});function Vv(u,f){if(null==u)return{};var _=gi(q_(u),function(w){return[w]});return f=Nt(f),J0(u,_,function(w,S){return f(w,S[0])})}var lw=fh(pr),zv=fh(Ds);function Uc(u){return null==u?[]:Ju(u,pr(u))}var V=Wd(function(u,f,_){return f=f.toLowerCase(),u+(_?Hv(f):f)});function Hv(u){return Zd(Fn(u).toLowerCase())}function $v(u){return(u=Fn(u))&&u.replace(_o,tA).replace(eF,"")}var rD=Wd(function(u,f,_){return u+(_?"-":"")+f.toLowerCase()}),dw=Wd(function(u,f,_){return u+(_?" ":"")+f.toLowerCase()}),sD=Gd("toLowerCase"),Gv=Wd(function(u,f,_){return u+(_?"_":"")+f.toLowerCase()}),lD=Wd(function(u,f,_){return u+(_?" ":"")+Zd(f)}),pw=Wd(function(u,f,_){return u+(_?" ":"")+f.toUpperCase()}),Zd=Gd("toUpperCase");function mw(u,f,_){return u=Fn(u),(f=_?z:f)===z?function en(X){return KE.test(X)}(u)?function fn(X){return X.match(tF)||[]}(u):function eA(X){return X.match(LE)||[]}(u):u.match(f)||[]}var jv=pn(function(u,f){try{return _s(u,z,f)}catch(_){return Up(_)?_:new jt(_)}}),hD=wo(function(u,f){return Rn(f,function(_){_=Go(_),$o(u,_,Fc(u[_],u))}),u});function Yv(u){return function(){return u}}var gw=Cs(),gD=Cs(!0);function is(u){return u}function Wp(u){return N_("function"==typeof u?u:Ms(u,Si))}var Xv=pn(function(u,f){return function(_){return ya(_,u,f)}}),_D=pn(function(u,f){return function(_){return ya(u,_,f)}});function _w(u,f,_){var w=pr(f),S=va(f,w);null==_&&(!Mi(f)||!S.length&&w.length)&&(_=f,f=u,u=this,S=va(f,pr(f)));var P=!(Mi(_)&&"chain"in _&&!_.chain),$=Hl(u);return Rn(S,function(Y){var Q=f[Y];u[Y]=Q,$&&(u.prototype[Y]=function(){var _e=this.__chain__;if(P||_e){var ye=u(this.__wrapped__);return(ye.__actions__=eo(this.__actions__)).push({func:Q,args:arguments,thisArg:u}),ye.__chain__=_e,ye}return Q.apply(u,Pl([this.value()],arguments))})}),u}function Co(){}var vw=_p(gi),yD=_p(QE),bD=_p(jf);function Mh(u){return mx(u)?__(Go(u)):function ba(u){return function(f){return Cc(f,u)}}(u)}var Kv=ox(),Ch=ox(!0);function Sh(){return[]}function Jd(){return!1}var xD=G_(function(u,f){return u+f},0),wD=W_("ceil"),xw=G_(function(u,f){return u/f},1),MD=W_("floor"),AD=G_(function(u,f){return u*f},1),jF=W_("round"),ty=G_(function(u,f){return u-f},0);return I.after=function v1(u,f){if("function"!=typeof f)throw new Er(Un);return u=un(u),function(){if(--u<1)return f.apply(this,arguments)}},I.ary=xh,I.assign=vt,I.assignIn=rw,I.assignInWith=Gl,I.assignWith=ll,I.at=L1,I.before=Ea,I.bind=Fc,I.bindAll=hD,I.bindKey=xv,I.castArray=function w1(){if(!arguments.length)return[];var u=arguments[0];return sn(u)?u:[u]},I.chain=Hx,I.chunk=function nv(u,f,_){f=(_?Tr(u,f,_):f===z)?1:fr(un(f),0);var w=null==u?0:u.length;if(!w||f<1)return[];for(var S=0,P=0,$=ae(w_(w/f));SS?0:S+_),(w=w===z||w>S?S:un(w))<0&&(w+=S),w=_>w?0:O1(w);_>>0)?(u=Fn(u))&&("string"==typeof f||null!=f&&!$p(f))&&!(f=Js(f))&&Sd(u)?Ic(yo(u),0,_):u.split(f,_):[]},I.spread=function Zx(u,f){if("function"!=typeof u)throw new Er(Un);return f=null==f?0:fr(un(f),0),pn(function(_){var w=_[f],S=Ic(_,0,f);return w&&Pl(S,w),_s(u,this,S)})},I.tail=function Oc(u){var f=null==u?0:u.length;return f?ts(u,1,f):[]},I.take=function Fx(u,f,_){return u&&u.length?ts(u,0,(f=_||f===z?1:un(f))<0?0:f):[]},I.takeRight=function Lx(u,f,_){var w=null==u?0:u.length;return w?ts(u,(f=w-(f=_||f===z?1:un(f)))<0?0:f,w):[]},I.takeRightWhile=function ZA(u,f){return u&&u.length?uh(u,Nt(f,3),!1,!0):[]},I.takeWhile=function RF(u,f){return u&&u.length?uh(u,Nt(f,3)):[]},I.tap=function e1(u,f){return f(u),u},I.throttle=function Lp(u,f,_){var w=!0,S=!0;if("function"!=typeof u)throw new Er(Un);return Mi(_)&&(w="leading"in _?!!_.leading:w,S="trailing"in _?!!_.trailing:S),y1(u,f,{leading:w,maxWait:f,trailing:S})},I.thru=Rp,I.toArray=Ov,I.toPairs=lw,I.toPairsIn=zv,I.toPath=function bw(u){return sn(u)?gi(u,Go):As(u)?[u]:eo(bx(Fn(u)))},I.toPlainObject=$l,I.transform=function X1(u,f,_){var w=sn(u),S=w||ol(u)||jo(u);if(f=Nt(f,4),null==_){var P=u&&u.constructor;_=S?w?new P:[]:Mi(u)&&Hl(P)?Od(xs(u)):{}}return(S?Rn:ki)(u,function($,Y,Q){return f(_,$,Y,Q)}),_},I.unary=function Qx(u){return xh(u,1)},I.union=Dp,I.unionBy=QA,I.unionWith=Nx,I.uniq=function Bx(u){return u&&u.length?si(u):[]},I.uniqBy=function Ux(u,f){return u&&u.length?si(u,Nt(f,2)):[]},I.uniqWith=function fv(u,f){return f="function"==typeof f?f:z,u&&u.length?si(u,z,f):[]},I.unset=function K1(u,f){return null==u||dh(u,f)},I.unzip=Tp,I.unzipWith=yh,I.update=function Z1(u,f,_){return null==u?u:ix(u,f,fp(_))},I.updateWith=function Q1(u,f,_,w){return w="function"==typeof w?w:z,null==u?u:ix(u,f,fp(_),w)},I.values=Uc,I.valuesIn=function J1(u){return null==u?[]:Ju(u,Ds(u))},I.without=Ip,I.words=mw,I.wrap=function Av(u,f){return Ev(fp(f),u)},I.xor=Vx,I.xorBy=pv,I.xorWith=mv,I.zip=gv,I.zipObject=function bh(u,f){return Tc(u||[],f||[],Qs)},I.zipObjectDeep=function JA(u,f){return Tc(u||[],f||[],zd)},I.zipWith=zx,I.entries=lw,I.entriesIn=zv,I.extend=rw,I.extendWith=Gl,_w(I,I),I.add=xD,I.attempt=jv,I.camelCase=V,I.capitalize=Hv,I.ceil=wD,I.clamp=function eD(u,f,_){return _===z&&(_=f,f=z),_!==z&&(_=(_=Mo(_))==_?_:0),f!==z&&(f=(f=Mo(f))==f?f:0),Nl(Mo(u),f,_)},I.clone=function Zn(u){return Ms(u,js)},I.cloneDeep=function C1(u){return Ms(u,Si|js)},I.cloneDeepWith=function Np(u,f){return Ms(u,Si|js,f="function"==typeof f?f:z)},I.cloneWith=function M1(u,f){return Ms(u,js,f="function"==typeof f?f:z)},I.conformsTo=function Jx(u,f){return null==f||R_(u,f,pr(f))},I.deburr=$v,I.defaultTo=function mD(u,f){return null==u||u!=u?f:u},I.divide=xw,I.endsWith=function nD(u,f,_){u=Fn(u),f=Js(f);var w=u.length,S=_=_===z?w:Nl(un(_),0,w);return(_-=f.length)>=0&&u.slice(_,S)==f},I.eq=Wo,I.escape=function iD(u){return(u=Fn(u))&&OE.test(u)?u.replace(p0,ot):u},I.escapeRegExp=function cw(u){return(u=Fn(u))&&v0.test(u)?u.replace(s_,"\\$&"):u},I.every=function vv(u,f,_){var w=sn(u)?QE:j0;return _&&Tr(u,f,_)&&(f=z),w(u,Nt(f,3))},I.find=Wx,I.findIndex=Ex,I.findKey=function Fv(u,f){return ee(u,Nt(f,3),ki)},I.findLast=Pp,I.findLastIndex=rv,I.findLastKey=function Lv(u,f){return ee(u,Nt(f,3),P_)},I.floor=MD,I.forEach=bv,I.forEachRight=zl,I.forIn=function U1(u,f){return null==u?u:il(u,Nt(f,3),Ds)},I.forInRight=function Nv(u,f){return null==u?u:Di(u,Nt(f,3),Ds)},I.forOwn=function cl(u,f){return u&&ki(u,Nt(f,3))},I.forOwnRight=function V1(u,f){return u&&P_(u,Nt(f,3))},I.get=Bv,I.gt=S1,I.gte=E1,I.has=function $1(u,f){return null!=u&&hx(u,f,op)},I.hasIn=Uv,I.head=Dx,I.identity=is,I.includes=function a1(u,f,_,w){u=no(u)?u:Uc(u),_=_&&!w?un(_):0;var S=u.length;return _<0&&(_=fr(S+_,0)),Gp(u)?_<=S&&u.indexOf(f,_)>-1:!!S&&Lt(u,f,_)>-1},I.indexOf=function vh(u,f,_){var w=null==u?0:u.length;if(!w)return-1;var S=null==_?0:un(_);return S<0&&(S=fr(w+S,0)),Lt(u,f,S)},I.inRange=function tD(u,f,_){return f=al(f),_===z?(_=f,f=0):_=al(_),function O_(u,f,_){return u>=Zr(f,_)&&u=-Ya&&u<=Ya},I.isSet=iw,I.isString=Gp,I.isSymbol=As,I.isTypedArray=jo,I.isUndefined=function I1(u){return u===z},I.isWeakMap=function R1(u){return Pi(u)&&Hr(u)==vd},I.isWeakSet=function k1(u){return Pi(u)&&"[object WeakSet]"==es(u)},I.join=function Tx(u,f){return null==u?"":fF.call(u,f)},I.kebabCase=rD,I.last=Ir,I.lastIndexOf=function cv(u,f,_){var w=null==u?0:u.length;if(!w)return-1;var S=w;return _!==z&&(S=(S=un(_))<0?fr(w+S,0):Zr(S,w-1)),f==f?function Ed(X,he,ae){for(var ze=ae+1;ze--;)if(X[ze]===he)return ze;return ze}(u,f,S):Qu(u,qf,S,!0)},I.lowerCase=dw,I.lowerFirst=sD,I.lt=Pv,I.lte=P1,I.max=function ww(u){return u&&u.length?Nd(u,is,Bd):z},I.maxBy=function Mw(u,f){return u&&u.length?Nd(u,Nt(f,2),Bd):z},I.mean=function CD(u){return Cd(u,is)},I.meanBy=function SD(u,f){return Cd(u,Nt(f,2))},I.min=function ro(u){return u&&u.length?Nd(u,is,cp):z},I.minBy=function ED(u,f){return u&&u.length?Nd(u,Nt(f,2),cp):z},I.stubArray=Sh,I.stubFalse=Jd,I.stubObject=function yw(){return{}},I.stubString=function Zv(){return""},I.stubTrue=function Qv(){return!0},I.multiply=AD,I.nth=function Ix(u,f){return u&&u.length?MA(u,un(f)):z},I.noConflict=function E(){return Sr._===this&&(Sr._=Zf),this},I.noop=Co,I.now=Fp,I.pad=function oD(u,f,_){u=Fn(u);var w=(f=un(f))?hr(u):0;if(!f||w>=f)return u;var S=(f-w)/2;return vp(M_(S),_)+u+vp(w_(S),_)},I.padEnd=function VF(u,f,_){u=Fn(u);var w=(f=un(f))?hr(u):0;return f&&wf){var w=u;u=f,f=w}if(_||u%1||f%1){var S=C_();return Zr(u+S*(f-u+Pe("1e-"+((S+"").length-1))),f)}return lh(u,f)},I.reduce=function d1(u,f,_){var w=sn(u)?g_:R0,S=arguments.length<3;return w(u,Nt(f,4),_,S,nl)},I.reduceRight=function u1(u,f,_){var w=sn(u)?JE:R0,S=arguments.length<3;return w(u,Nt(f,4),_,S,k_)},I.repeat=function Gi(u,f,_){return f=(_?Tr(u,f,_):f===z)?1:un(f),ch(Fn(u),f)},I.replace=function aD(){var u=arguments,f=Fn(u[0]);return u.length<3?f:f.replace(u[1],u[2])},I.result=function Y1(u,f,_){var w=-1,S=(f=wa(f,u)).length;for(S||(S=1,u=z);++wYa)return[];var _=fa,w=Zr(u,fa);f=Nt(f),u-=fa;for(var S=Ks(w,f);++_=P)return u;var Y=_-hr(w);if(Y<1)return w;var Q=$?Ic($,0,Y).join(""):u.slice(0,Y);if(S===z)return Q+w;if($&&(Y+=Q.length-Y),$p(S)){if(u.slice(Y).search(S)){var _e,ye=Q;for(S.global||(S=bc(S.source,Fn(w0.exec(S))+"g")),S.lastIndex=0;_e=S.exec(ye);)var be=_e.index;Q=Q.slice(0,be===z?Y:be)}}else if(u.indexOf(Js(S),Y)!=Y){var Xe=Q.lastIndexOf(S);Xe>-1&&(Q=Q.slice(0,Xe))}return Q+w},I.unescape=function uD(u){return(u=Fn(u))&&PE.test(u)?u.replace(f0,Kf):u},I.uniqueId=function ey(u){var f=++bi;return Fn(u)+f},I.upperCase=pw,I.upperFirst=Zd,I.each=bv,I.eachRight=zl,I.first=Dx,_w(I,function(){var u={};return ki(I,function(f,_){ri.call(I.prototype,_)||(u[_]=f)}),u}(),{chain:!1}),I.VERSION="4.17.21",Rn(["bind","bindKey","curry","curryRight","partial","partialRight"],function(u){I[u].placeholder=I}),Rn(["drop","take"],function(u,f){kn.prototype[u]=function(_){_=_===z?1:fr(un(_),0);var w=this.__filtered__&&!f?new kn(this):this.clone();return w.__filtered__?w.__takeCount__=Zr(_,w.__takeCount__):w.__views__.push({size:Zr(_,fa),type:u+(w.__dir__<0?"Right":"")}),w},kn.prototype[u+"Right"]=function(_){return this.reverse()[u](_).reverse()}}),Rn(["filter","map","takeWhile"],function(u,f){var _=f+1,w=1==_||3==_;kn.prototype[u]=function(S){var P=this.clone();return P.__iteratees__.push({iteratee:Nt(S,3),type:_}),P.__filtered__=P.__filtered__||w,P}}),Rn(["head","last"],function(u,f){var _="take"+(f?"Right":"");kn.prototype[u]=function(){return this[_](1).value()[0]}}),Rn(["initial","tail"],function(u,f){var _="drop"+(f?"":"Right");kn.prototype[u]=function(){return this.__filtered__?new kn(this):this[_](1)}}),kn.prototype.compact=function(){return this.filter(is)},kn.prototype.find=function(u){return this.filter(u).head()},kn.prototype.findLast=function(u){return this.reverse().find(u)},kn.prototype.invokeMap=pn(function(u,f){return"function"==typeof u?new kn(this):this.map(function(_){return ya(_,u,f)})}),kn.prototype.reject=function(u){return this.filter(Sv(Nt(u)))},kn.prototype.slice=function(u,f){u=un(u);var _=this;return _.__filtered__&&(u>0||f<0)?new kn(_):(u<0?_=_.takeRight(-u):u&&(_=_.drop(u)),f!==z&&(_=(f=un(f))<0?_.dropRight(-f):_.take(f-u)),_)},kn.prototype.takeRightWhile=function(u){return this.reverse().takeWhile(u).reverse()},kn.prototype.toArray=function(){return this.take(fa)},ki(kn.prototype,function(u,f){var _=/^(?:filter|find|map|reject)|While$/.test(f),w=/^(?:head|last)$/.test(f),S=I[w?"take"+("last"==f?"Right":""):f],P=w||/^find/.test(f);S&&(I.prototype[f]=function(){var $=this.__wrapped__,Y=w?[1]:arguments,Q=$ instanceof kn,_e=Y[0],ye=Q||sn($),be=function(An){var Ln=S.apply(I,Pl([An],Y));return w&&Xe?Ln[0]:Ln};ye&&_&&"function"==typeof _e&&1!=_e.length&&(Q=ye=!1);var Xe=this.__chain__,zt=P&&!Xe,mn=Q&&!this.__actions__.length;if(!P&&ye){$=mn?$:new kn(this);var Ht=u.apply($,Y);return Ht.__actions__.push({func:Rp,args:[be],thisArg:z}),new Ai(Ht,Xe)}return zt&&mn?u.apply(this,Y):(Ht=this.thru(be),zt?w?Ht.value()[0]:Ht.value():Ht)})}),Rn(["pop","push","shift","sort","splice","unshift"],function(u){var f=sr[u],_=/^(?:push|sort|unshift)$/.test(u)?"tap":"thru",w=/^(?:pop|shift)$/.test(u);I.prototype[u]=function(){var S=arguments;if(w&&!this.__chain__){var P=this.value();return f.apply(sn(P)?P:[],S)}return this[_](function($){return f.apply(sn($)?$:[],S)})}}),ki(kn.prototype,function(u,f){var _=I[f];if(_){var w=_.name+"";ri.call(kd,w)||(kd[w]=[]),kd[w].push({name:f,func:_})}}),kd[jd(z,ur).name]=[{name:"wrapper",func:z}],kn.prototype.clone=function U0(){var u=new kn(this.__wrapped__);return u.__actions__=eo(this.__actions__),u.__dir__=this.__dir__,u.__filtered__=this.__filtered__,u.__iteratees__=eo(this.__iteratees__),u.__takeCount__=this.__takeCount__,u.__views__=eo(this.__views__),u},kn.prototype.reverse=function Fd(){if(this.__filtered__){var u=new kn(this);u.__dir__=-1,u.__filtered__=!0}else(u=this.clone()).__dir__*=-1;return u},kn.prototype.value=function ws(){var u=this.__wrapped__.value(),f=this.__dir__,_=sn(u),w=f<0,S=_?u.length:0,P=function wp(u,f,_){for(var w=-1,S=_.length;++w=this.__values__.length;return{done:u,value:u?z:this.__values__[this.__index__++]}},I.prototype.plant=function t1(u){for(var f,_=this;_ instanceof wc;){var w=ns(_);w.__index__=0,w.__values__=z,f?S.__wrapped__=w:f=w;var S=w;_=_.__wrapped__}return S.__wrapped__=u,f},I.prototype.reverse=function n1(){var u=this.__wrapped__;if(u instanceof kn){var f=u;return this.__actions__.length&&(f=new kn(this)),(f=f.reverse()).__actions__.push({func:Rp,args:[dv],thisArg:z}),new Ai(f,this.__chain__)}return this.thru(dv)},I.prototype.toJSON=I.prototype.valueOf=I.prototype.value=function kF(){return xa(this.__wrapped__,this.__actions__)},I.prototype.first=I.prototype.head,ih&&(I.prototype[ih]=function Yd(){return this}),I}();Sr._=ys,(dn=function(){return ys}.call(Gs,ps,Gs,Bo))!==z&&(Bo.exports=dn)}.call(this)},738:function(Bo){var Gs;Bo.exports=((Gs=function(){function ps(Ci){return Br.appendChild(Ci.dom),Ci}function dn(Ci){for(var Si=0;SiQt+1e3&&(Dl.update(1e3*Un/(Ci-Qt),100),Qt=Ci,Un=0,Ws)){var Si=performance.memory;Ws.update(Si.usedJSHeapSize/1048576,Si.jsHeapSizeLimit/1048576)}return Ci},update:function(){Kr=this.end()},domElement:Br,setMode:dn}}).Panel=function(ps,dn,z){var Br=1/0,Kr=0,Qt=Math.round,Un=Qt(window.devicePixelRatio||1),Dl=80*Un,Ga=48*Un,Ws=3*Un,Ci=2*Un,Si=3*Un,ms=15*Un,js=74*Un,Ys=30*Un,Uo=document.createElement("canvas");Uo.width=Dl,Uo.height=Ga,Uo.style.cssText="width:80px;height:48px";var On=Uo.getContext("2d");return On.font="bold "+9*Un+"px Helvetica,Arial,sans-serif",On.textBaseline="top",On.fillStyle=z,On.fillRect(0,0,Dl,Ga),On.fillStyle=dn,On.fillText(ps,Ws,Ci),On.fillRect(Si,ms,js,Ys),On.fillStyle=z,On.globalAlpha=.9,On.fillRect(Si,ms,js,Ys),{dom:Uo,update:function(ur,mc){Br=Math.min(Br,ur),Kr=Math.max(Kr,ur),On.fillStyle=z,On.globalAlpha=1,On.fillRect(0,0,Dl,ms),On.fillStyle=dn,On.fillText(Qt(ur)+" "+ps+" ("+Qt(Br)+"-"+Qt(Kr)+")",Ws,Ci),On.drawImage(Uo,Si+Un,ms,js-Un,Ys,Si,ms,js-Un,Ys),On.fillRect(Si+js-Un,ms,Un,Ys),On.fillStyle=z,On.globalAlpha=.9,On.fillRect(Si+js-Un,ms,Un,Qt((1-ur/mc)*Ys))}}},Gs)}},Bo=>{Bo(Bo.s=360)}]); \ No newline at end of file diff --git a/frontend/dist/gui/scripts.d5dc2919fc5b98cb.js b/frontend/dist/gui/scripts.d5dc2919fc5b98cb.js deleted file mode 100644 index 8bc8d53..0000000 --- a/frontend/dist/gui/scripts.d5dc2919fc5b98cb.js +++ /dev/null @@ -1 +0,0 @@ -function noop(){}function assign(e,t){for(const n in t)e[n]=t[n];return e}function run(e){return e()}function blank_object(){return Object.create(null)}function run_all(e){e.forEach(run)}function is_function(e){return"function"==typeof e}function safe_not_equal(e,t){return e!=e?t==t:e!==t||e&&"object"==typeof e||"function"==typeof e}function is_empty(e){return 0===Object.keys(e).length}function create_slot(e,t,n,l){if(e){const o=get_slot_context(e,t,n,l);return e[0](o)}}function get_slot_context(e,t,n,l){return e[1]&&l?assign(n.ctx.slice(),e[1](l(t))):n.ctx}function get_slot_changes(e,t,n,l){if(e[2]&&l){const o=e[2](l(n));if(void 0===t.dirty)return o;if("object"==typeof o){const i=[],f=Math.max(t.dirty.length,o.length);for(let c=0;c>1);n(o)<=l?e=o+1:t=o}return e}function init_hydrate(e){if(e.hydrate_init)return;e.hydrate_init=!0;const t=e.childNodes,n=new Int32Array(t.length+1),l=new Int32Array(t.length);n[0]=-1;let o=0;for(let s=0;st[n[d]].claim_order,t[s].claim_order)-1;l[s]=n[u]+1;const m=u+1;n[m]=s,o=Math.max(m,o)}const i=[],f=[];let c=t.length-1;for(let s=n[o]+1;0!=s;s=l[s-1]){for(i.push(t[s-1]);c>=s;c--)f.push(t[c]);c--}for(;c>=0;c--)f.push(t[c]);i.reverse(),f.sort((s,r)=>s.claim_order-r.claim_order);for(let s=0,r=0;s=i[r].claim_order;)r++;e.insertBefore(f[s],re.removeEventListener(t,n,l)}function attr(e,t,n){null==n?e.removeAttribute(t):e.getAttribute(t)!==n&&e.setAttribute(t,n)}function set_custom_element_data(e,t,n){t in e?e[t]="boolean"==typeof e[t]&&""===n||n:attr(e,t,n)}function children(e){return Array.from(e.childNodes)}function set_data(e,t){e.wholeText!==(t=""+t)&&(e.data=t)}function set_style(e,t,n,l){e.style.setProperty(t,n,l?"important":"")}function select_option(e,t){for(let n=0;n{f.source===l.contentWindow&&t()})):(l.src="about:blank",l.onload=()=>{i=listen(l.contentWindow,"resize",t)}),append(e,l),()=>{(o||i&&l.contentWindow)&&i(),detach(l)}}function toggle_class(e,t,n){e.classList[n?"add":"remove"](t)}function set_current_component(e){current_component=e}function get_current_component(){if(!current_component)throw new Error("Function called outside component initialization");return current_component}function onMount(e){get_current_component().$$.on_mount.push(e)}const dirty_components=[],binding_callbacks=[],render_callbacks=[],flush_callbacks=[],resolved_promise=Promise.resolve();let update_scheduled=!1;function schedule_update(){update_scheduled||(update_scheduled=!0,resolved_promise.then(flush))}function tick(){return schedule_update(),resolved_promise}function add_render_callback(e){render_callbacks.push(e)}function add_flush_callback(e){flush_callbacks.push(e)}let flushing=!1;const seen_callbacks=new Set;function flush(){if(!flushing){flushing=!0;do{for(let e=0;e{outroing.delete(e),l&&(n&&e.d(1),l())}),e.o(t)}}function outro_and_destroy_block(e,t){transition_out(e,1,1,()=>{t.delete(e.key)})}function update_keyed_each(e,t,n,l,o,i,f,c,s,r,u,m){let d=e.length,_=i.length,p=d;const a={};for(;p--;)a[e[p].key]=p;const h=[],k=new Map,v=new Map;for(p=_;p--;){const q=m(o,i,p),I=n(q);let H=f.get(I);H?l&&H.p(q,t):(H=r(I,q),H.c()),k.set(I,h[p]=H),I in a&&v.set(I,Math.abs(p-a[I]))}const g=new Set,B=new Set;function w(q){transition_in(q,1),q.m(c,u),f.set(q.key,q),u=q.first,_--}for(;d&&_;){const q=h[_-1],I=e[d-1],H=q.key,b=I.key;q===I?(u=q.first,d--,_--):k.has(b)?!f.has(H)||g.has(H)?w(q):B.has(b)?d--:v.get(H)>v.get(b)?(B.add(H),w(q)):(g.add(b),d--):(s(I,f),d--)}for(;d--;){const q=e[d];k.has(q.key)||s(q,f)}for(;_;)w(h[_-1]);return h}function bind(e,t,n){const l=e.$$.props[t];void 0!==l&&(e.$$.bound[l]=n,n(e.$$.ctx[l]))}function create_component(e){e&&e.c()}function mount_component(e,t,n,l){const{fragment:o,on_mount:i,on_destroy:f,after_update:c}=e.$$;o&&o.m(t,n),l||add_render_callback(()=>{const s=i.map(run).filter(is_function);f?f.push(...s):run_all(s),e.$$.on_mount=[]}),c.forEach(add_render_callback)}function destroy_component(e,t){const n=e.$$;null!==n.fragment&&(run_all(n.on_destroy),n.fragment&&n.fragment.d(t),n.on_destroy=n.fragment=null,n.ctx=[])}function make_dirty(e,t){-1===e.$$.dirty[0]&&(dirty_components.push(e),schedule_update(),e.$$.dirty.fill(0)),e.$$.dirty[t/31|0]|=1<{const _=d.length?d[0]:m;return s.ctx&&o(s.ctx[u],s.ctx[u]=_)&&(!s.skip_bound&&s.bound[u]&&s.bound[u](_),r&&make_dirty(e,u)),m}):[],s.update(),r=!0,run_all(s.before_update),s.fragment=!!l&&l(s.ctx),t.target){if(t.hydrate){start_hydrating();const u=children(t.target);s.fragment&&s.fragment.l(u),u.forEach(detach)}else s.fragment&&s.fragment.c();t.intro&&transition_in(e.$$.fragment),mount_component(e,t.target,t.anchor,t.customElement),end_hydrating(),flush()}set_current_component(c)}class SvelteComponent{$destroy(){destroy_component(this,1),this.$destroy=noop}$on(t,n){const l=this.$$.callbacks[t]||(this.$$.callbacks[t]=[]);return l.push(n),()=>{const o=l.indexOf(n);-1!==o&&l.splice(o,1)}}$set(t){this.$$set&&!is_empty(t)&&(this.$$.skip_bound=!0,this.$$set(t),this.$$.skip_bound=!1)}}function add_css$2(){var e=element("style");e.id="svelte-1tqh76q-style",e.textContent="svelte-virtual-list-viewport.svelte-1tqh76q{position:relative;overflow-y:auto;-webkit-overflow-scrolling:touch;display:block}svelte-virtual-list-contents.svelte-1tqh76q,svelte-virtual-list-row.svelte-1tqh76q{display:block}svelte-virtual-list-row.svelte-1tqh76q{overflow:hidden}",append(document.head,e)}function get_each_context$1(e,t,n){const l=e.slice();return l[23]=t[n],l}const get_default_slot_changes=e=>({item:16&e}),get_default_slot_context=e=>({item:e[23].data});function fallback_block(e){let t;return{c(){t=text("Missing template")},m(n,l){insert(n,t,l)},d(n){n&&detach(t)}}}function create_each_block$1(e,t){let n,l,o;const i=t[14].default,f=create_slot(i,t,t[13],get_default_slot_context),c=f||fallback_block();return{key:e,first:null,c(){n=element("svelte-virtual-list-row"),c&&c.c(),l=space(),set_custom_element_data(n,"class","svelte-1tqh76q"),this.first=n},m(s,r){insert(s,n,r),c&&c.m(n,null),append(n,l),o=!0},p(s,r){t=s,f&&f.p&&(!o||8208&r)&&update_slot(f,i,t,t[13],o?r:-1,get_default_slot_changes,get_default_slot_context)},i(s){o||(transition_in(c,s),o=!0)},o(s){transition_out(c,s),o=!1},d(s){s&&detach(n),c&&c.d(s)}}}function create_fragment$2(e){let t,n,i,f,c,s,l=[],o=new Map,r=e[4];const u=m=>m[23].index;for(let m=0;me[17].call(t))},m(m,d){insert(m,t,d),append(t,n);for(let _=0;_{m=_.getElementsByTagName("svelte-virtual-list-row"),n(12,h=!0)}),e.$$set=b=>{"items"in b&&n(10,i=b.items),"height"in b&&n(0,f=b.height),"itemHeight"in b&&n(11,c=b.itemHeight),"start"in b&&n(8,s=b.start),"end"in b&&n(9,r=b.end),"$$scope"in b&&n(13,o=b.$$scope)},e.$$.update=()=>{1792&e.$$.dirty&&n(4,a=i.slice(s,r).map((b,E)=>({index:E+s,data:b}))),7170&e.$$.dirty&&h&&async function B(b,E,y){const{scrollTop:S}=d;await tick();let A=k-S,M=s;for(;Ab){n(8,s=y),n(5,k=S);break}S+=M,y+=1}for(;yb+p)););n(9,r=y);const A=i.length-r;for(g=S/r;y{_=b,n(3,_)})},function I(b){binding_callbacks[b?"unshift":"push"](()=>{d=b,n(2,d)})},function H(){p=this.offsetHeight,n(1,p)}]}class VirtualList extends SvelteComponent{constructor(t){super(),document.getElementById("svelte-1tqh76q-style")||add_css$2(),init(this,t,instance$2,create_fragment$2,safe_not_equal,{items:10,height:0,itemHeight:11,start:8,end:9})}}function enumKeys(e){return Object.keys(e).filter(t=>Number.isNaN(+t))}function getBaseLog(e,t){return Math.log(t)/Math.log(e)}function numDigits(e,t=10){return Math.max(Math.floor(getBaseLog(t,Math.abs(e))),0)+1}function*iter_range(e,t,n){if(n=n||1,typeof t>"u"&&(t=e>0?e:0,e=e<0?e:0),e!=t){e>t&&(n*=-1);for(let l=e;l{"position"in r&&n(0,o=r.position),"value"in r&&n(1,i=r.value),"type"in r&&n(2,f=r.type),"selected"in r&&n(3,c=r.selected),"maxItems"in r&&n(5,s=r.maxItems)},e.$$.update=()=>{38&e.$$.dirty&&n(4,l=Math.max(0,Math.ceil(getBaseLog(f,s))-(i??0).toString(f||2).length,Math.ceil(getBaseLog(f,256))-(i??0).toString(f||2).length))},[o,i,f,c,l,s]}class Glyph extends SvelteComponent{constructor(t){super(),document.getElementById("svelte-1miow1p-style")||add_css$1(),init(this,t,instance$1,create_fragment$1,safe_not_equal,{position:0,value:1,type:2,selected:3,maxItems:5})}}var NumberBase;function add_css(){var e=element("style");e.id="svelte-1qk31u8-style",e.textContent="main.svelte-1qk31u8.svelte-1qk31u8{height:var(--height);min-height:96px;width:var(--width);box-sizing:content-box;display:inline-flex;flex-direction:column;font-family:monospace;font-variant-numeric:slashed-zero;border:1px solid gray;user-select:none;-webkit-user-select:none;cursor:pointer}main.svelte-1qk31u8>header.svelte-1qk31u8{display:flex;box-shadow:0px 1px 0 rgba(0, 0, 0, 0.2), 0px 1px 4px rgba(0, 0, 0, 0.2)}main.svelte-1qk31u8>header .header-offset.svelte-1qk31u8{background-color:rgba(0, 0, 0, 0.1);min-width:110px;text-align:center}main.svelte-1qk31u8>header .header-data.svelte-1qk31u8{margin-left:20px}svelte-virtual-list-viewport{flex-grow:1}main.svelte-1qk31u8>footer.svelte-1qk31u8{background-color:rgba(0, 0, 0, 0.08);box-shadow:0px -1px 0 rgba(0, 0, 0, 0.2), 0px -1px 4px rgba(0, 0, 0, 0.2);padding:2px 1em;display:flex;font-size:12px;justify-content:center}main.svelte-1qk31u8 .hex-row.svelte-1qk31u8{display:flex;flex-wrap:nowrap}main.svelte-1qk31u8 .hex-row-offset.svelte-1qk31u8{background-color:rgba(0, 0, 0, 0.1);min-width:100px;padding-right:10px;margin-right:2em;justify-content:flex-end;display:flex;flex-wrap:nowrap}main.svelte-1qk31u8 .hex-row-data.svelte-1qk31u8{margin-right:1em;display:flex;flex-wrap:nowrap}main.svelte-1qk31u8 .hex-row-ascii.svelte-1qk31u8{margin:0 1em;display:flex;flex-wrap:nowrap}",append(document.head,e)}function get_each_context(e,t,n){const l=e.slice();return l[25]=t[n],l}function get_each_context_1(e,t,n){const l=e.slice();return l[25]=t[n],l}function get_each_context_2(e,t,n){const l=e.slice();return l[24]=t[n],l}function get_each_context_3(e,t,n){const l=e.slice();return l[24]=t[n],l}function get_each_context_4(e,t,n){const l=e.slice();return l[24]=t[n],l}function create_if_block_1(e){let t,n,l,o,i,f,c,s,r,u,m,d,_=e[12],p=[];for(let g=0;g<_.length;g+=1)p[g]=create_each_block_4(get_each_context_4(e,_,g));let a=e[12],h=[];for(let g=0;ge[19].call(l)),attr(n,"class","header-offset svelte-1qk31u8"),set_style(n,"--offsetWidth",e[14]),void 0===e[2]&&add_render_callback(()=>e[20].call(f)),attr(s,"title","Bytes per line"),void 0===e[0]&&add_render_callback(()=>e[21].call(s)),attr(i,"class","header-data svelte-1qk31u8"),set_style(i,"--width",e[15]),attr(u,"class","header-ascii"),set_style(u,"--width",e[15]),attr(t,"class","svelte-1qk31u8")},m(g,B){insert(g,t,B),append(t,n),append(n,l);for(let w=0;wtransition_out(u[a],1,1,()=>{u[a]=null});let d=range(0,e[0],1),_=[];for(let a=0;atransition_out(_[a],1,1,()=>{_[a]=null});return{c(){t=element("div"),n=element("div"),create_component(l.$$.fragment),o=space(),i=element("div");for(let a=0;a({24:a}),({item:a})=>[a?16777216:0]]},$$scope:{ctx:e}};void 0!==e[8]&&(_.start=e[8]),void 0!==e[9]&&(_.end=e[9]),l=new VirtualList({props:_}),binding_callbacks.push(()=>bind(l,"start",m)),binding_callbacks.push(()=>bind(l,"end",d));let p=e[5]&&create_if_block(e);return{c(){t=element("main"),u&&u.c(),n=space(),create_component(l.$$.fragment),f=space(),p&&p.c(),set_style(t,"--width",e[7]),set_style(t,"--height",e[6]),attr(t,"class","svelte-1qk31u8"),toggle_class(t,"readonly",e[3])},m(a,h){insert(a,t,h),u&&u.m(t,null),append(t,n),mount_component(l,t,null),append(t,f),p&&p.m(t,null),c=!0,s||(r=[listen(t,"mouseover",e[16]),listen(t,"mouseout",e[17])],s=!0)},p(a,h){a[4]?u?u.p(a,h):(u=create_if_block_1(a),u.c(),u.m(t,n)):u&&(u.d(1),u=null);const k={};2048&h[0]&&(k.items=a[11]),64&h[0]&&(k.height=a[6]),16780295&h[0]|32&h[1]&&(k.$$scope={dirty:h,ctx:a}),!o&&256&h[0]&&(o=!0,k.start=a[8],add_flush_callback(()=>o=!1)),!i&&512&h[0]&&(i=!0,k.end=a[9],add_flush_callback(()=>i=!1)),l.$set(k),a[5]?p?(p.p(a,h),32&h[0]&&transition_in(p,1)):(p=create_if_block(a),p.c(),transition_in(p,1),p.m(t,null)):p&&(group_outros(),transition_out(p,1,1,()=>{p=null}),check_outros()),(!c||128&h[0])&&set_style(t,"--width",a[7]),(!c||64&h[0])&&set_style(t,"--height",a[6]),8&h[0]&&toggle_class(t,"readonly",a[3])},i(a){c||(transition_in(l.$$.fragment,a),transition_in(p),c=!0)},o(a){transition_out(l.$$.fragment,a),transition_out(p),c=!1},d(a){a&&detach(t),u&&u.d(),destroy_component(l),p&&p.d(),s=!1,run_all(r)}}}function instance(e,t,n){let l,{data:o=new ArrayBuffer(0)}=t,{readonly:i=!1}=t,{showHeader:f=!0}=t,{showFooter:c=!0}=t,{height:s="auto"}=t,{width:r="auto"}=t,{offsetBase:u=NumberBase.Hexadecimal}=t,{dataBase:m=NumberBase.Hexadecimal}=t,{bytesPerLine:d=8}=t,_=0,p=0;const a=enumKeys(NumberBase).map(y=>NumberBase[y]);let h;const k=new Uint8Array(o),v=numDigits(k.length),g=d*numDigits(u);return e.$$set=y=>{"data"in y&&n(18,o=y.data),"readonly"in y&&n(3,i=y.readonly),"showHeader"in y&&n(4,f=y.showHeader),"showFooter"in y&&n(5,c=y.showFooter),"height"in y&&n(6,s=y.height),"width"in y&&n(7,r=y.width),"offsetBase"in y&&n(1,u=y.offsetBase),"dataBase"in y&&n(2,m=y.dataBase),"bytesPerLine"in y&&n(0,d=y.bytesPerLine)},e.$$.update=()=>{1&e.$$.dirty[0]&&n(11,l=[...Array(Math.max(4,Math.ceil(k.length/d))).keys()])},[d,u,m,i,f,c,s,r,_,p,h,l,a,k,v,g,function B(y){const S=y.target.dataset.position;void 0!==S&&"undefined"!==S&&n(10,h=S)},function w(y){n(10,h=y.target.dataset.position)&&n(10,h=void 0)},o,function q(){u=select_value(this),n(1,u),n(12,a)},function I(){m=select_value(this),n(2,m),n(12,a)},function H(){d=select_value(this),n(0,d)},function b(y){_=y,n(8,_)},function E(y){p=y,n(9,p)}]}!function(e){e[e.Binary=2]="Binary",e[e.Octal=8]="Octal",e[e.Decimal=10]="Decimal",e[e.Hexadecimal=16]="Hexadecimal"}(NumberBase||(NumberBase={}));class HexEditor extends SvelteComponent{constructor(t){super(),document.getElementById("svelte-1qk31u8-style")||add_css(),init(this,t,instance,create_fragment,safe_not_equal,{data:18,readonly:3,showHeader:4,showFooter:5,height:6,width:7,offsetBase:1,dataBase:2,bytesPerLine:0},[-1,-1])}} \ No newline at end of file diff --git a/frontend/package-lock.json b/frontend/package-lock.json index d278c99..1cdaf8d 100644 --- a/frontend/package-lock.json +++ b/frontend/package-lock.json @@ -23,6 +23,7 @@ "@gg-web-engine/three": "^0.0.56", "lodash": "^4.17.21", "ngx-deep-equals-pure": "^0.4.1", + "ngx-hex-editor": "^0.0.3", "rxjs": "7.8.1", "tslib": "^2.3.0", "zone.js": "~0.11.4" @@ -9416,6 +9417,18 @@ "@angular/core": "^15.0.0" } }, + "node_modules/ngx-hex-editor": { + "version": "0.0.3", + "resolved": "https://registry.npmjs.org/ngx-hex-editor/-/ngx-hex-editor-0.0.3.tgz", + "integrity": "sha512-Qn8r1jgrefzN06p+ThYnUemDqOG1VRNSiqpfUm37fMV5ik5uRY3HjbUCvgDMxD6TR+qFSU+DKn9uueYBR9txQQ==", + "dependencies": { + "tslib": "^2.3.0" + }, + "peerDependencies": { + "@angular/common": "^15.1.0", + "@angular/core": "^15.1.0" + } + }, "node_modules/nice-napi": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/nice-napi/-/nice-napi-1.0.2.tgz", diff --git a/frontend/package.json b/frontend/package.json index e8bf1c3..22cc724 100644 --- a/frontend/package.json +++ b/frontend/package.json @@ -26,6 +26,7 @@ "@gg-web-engine/three": "^0.0.56", "lodash": "^4.17.21", "ngx-deep-equals-pure": "^0.4.1", + "ngx-hex-editor": "^0.0.3", "rxjs": "7.8.1", "tslib": "^2.3.0", "zone.js": "~0.11.4" diff --git a/frontend/src/app/app.module.ts b/frontend/src/app/app.module.ts index 6922957..a864706 100644 --- a/frontend/src/app/app.module.ts +++ b/frontend/src/app/app.module.ts @@ -40,8 +40,12 @@ import { MatProgressSpinnerModule } from '@angular/material/progress-spinner'; import { MatMenuModule } from '@angular/material/menu'; import { TriMapBlockUiComponent } from './components/editor/eac/tri-map.block-ui/tri-map.block-ui.component'; import { TrkMapBlockUiComponent } from './components/editor/eac/trk-map.block-ui/trk-map.block-ui.component'; -import { RunCustomActionDialogComponent } from './components/run-custom-action.dialog/run-custom-action.dialog.component'; -import { OripGeometryBlockUiComponent } from './components/editor/eac/orip-geometry.block-ui/orip-geometry.block-ui.component'; +import { + RunCustomActionDialogComponent, +} from './components/run-custom-action.dialog/run-custom-action.dialog.component'; +import { + OripGeometryBlockUiComponent, +} from './components/editor/eac/orip-geometry.block-ui/orip-geometry.block-ui.component'; import { MinimapComponent } from './components/editor/common/minimap/minimap.component'; import { DelegateBlockUiComponent } from './components/editor/library/delegate.block-ui/delegate.block-ui.component'; import { MatOptionModule } from '@angular/material/core'; @@ -49,14 +53,19 @@ import { FenceTypeBlockUiComponent } from './components/editor/eac/fence-type.bl import { BlockActionsComponent } from './components/editor/common/block-actions/block-actions.component'; import { SoundbankBlockUiComponent } from './components/editor/eac/soundbank.block-ui/soundbank.block-ui.component'; import { EacsAudioBlockUiComponent } from './components/editor/eac/eacs-audio.block-ui/eacs-audio.block-ui.component'; -import { GeoGeometryBlockUiComponent } from './components/editor/eac/geo-geometry.block-ui/geo-geometry.block-ui.component'; +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 { + 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'; +import { HexEditorModule } from 'ngx-hex-editor'; @NgModule({ declarations: [ @@ -115,6 +124,7 @@ import { ReactiveFormsModule, MatOptionModule, NgxMatColorPickerModule, + HexEditorModule, ], providers: [ EelDelegateService, @@ -123,4 +133,5 @@ import { ], bootstrap: [AppComponent], }) -export class AppModule {} +export class AppModule { +} diff --git a/frontend/src/app/components/editor/editor.component.ts b/frontend/src/app/components/editor/editor.component.ts index 3f61925..f3827f0 100644 --- a/frontend/src/app/components/editor/editor.component.ts +++ b/frontend/src/app/components/editor/editor.component.ts @@ -26,6 +26,7 @@ import { EacsAudioBlockUiComponent } from './eac/eacs-audio.block-ui/eacs-audio. import { GeoGeometryBlockUiComponent } from './eac/geo-geometry.block-ui/geo-geometry.block-ui.component'; import { BaseArchiveBlockUiComponent } from './eac/base-archive.block-ui/base-archive.block-ui.component'; import { TrkMapBlockUiComponent } from './eac/trk-map.block-ui/trk-map.block-ui.component'; +import { NgxDeepEqualsPureService } from 'ngx-deep-equals-pure'; @Component({ selector: 'app-editor', @@ -107,8 +108,18 @@ export class EditorComponent implements OnDestroy { } } + resourceEqual(resA: Resource | ResourceError | null, resB: Resource | ResourceError | null): boolean { + if (!resA || !resB) { + return !resA === !resB; + } + return resA.id === resB.id && this.deep.deepEquals(resA.data, resB.data); + } + @Input() public set resource(value: Resource | ResourceError | null) { + if (this.resourceEqual(value, this._resourceError || this._resource)) { + return; + } this.resourceSet$.next(); // TODO reusing components does not work for some reason. At least when child is compound block with the same schema let reuseComponent = false; //!!this._component && value && this._resource && value.schema.block_class_mro === this._resource.schema.block_class_mro; @@ -146,8 +157,13 @@ export class EditorComponent implements OnDestroy { const id = this._resource!.id; const data = this._resource!.data; if (data instanceof Array) { - for (let i = 0; i < data.length; i++) { - this.mainService.dataBlockChange$.next([joinId(id, i), data[i]]); + if (this._resource!.schema.block_class_mro.startsWith('BytesBlock')) { + // for bytes block we save whole array + this.mainService.dataBlockChange$.next([id, data]); + } else { + for (let i = 0; i < data.length; i++) { + this.mainService.dataBlockChange$.next([joinId(id, i), data[i]]); + } } } else if (isObject(data)) { for (const key in data) { @@ -166,7 +182,8 @@ export class EditorComponent implements OnDestroy { } } - constructor(readonly mainService: MainService) {} + constructor(readonly mainService: MainService, + private readonly deep: NgxDeepEqualsPureService) {} ngOnDestroy(): void { this.destroyed$.next(); diff --git a/frontend/src/app/components/editor/library/binary.block-ui/binary.block-ui.component.html b/frontend/src/app/components/editor/library/binary.block-ui/binary.block-ui.component.html index d5918d9..774cfae 100644 --- a/frontend/src/app/components/editor/library/binary.block-ui/binary.block-ui.component.html +++ b/frontend/src/app/components/editor/library/binary.block-ui/binary.block-ui.component.html @@ -1,2 +1,6 @@ -

{{ resource?.name }}

-
+

{{ resource?.name }}

+ diff --git a/frontend/src/app/components/editor/library/binary.block-ui/binary.block-ui.component.ts b/frontend/src/app/components/editor/library/binary.block-ui/binary.block-ui.component.ts index e20b1b4..45360ac 100644 --- a/frontend/src/app/components/editor/library/binary.block-ui/binary.block-ui.component.ts +++ b/frontend/src/app/components/editor/library/binary.block-ui/binary.block-ui.component.ts @@ -1,40 +1,6 @@ -import { - AfterViewInit, - ChangeDetectionStrategy, - ChangeDetectorRef, - Component, - ElementRef, - EventEmitter, - Input, - OnDestroy, - Output, - ViewChild, -} from '@angular/core'; +import { ChangeDetectionStrategy, Component, ElementRef, EventEmitter, Input, Output, ViewChild } from '@angular/core'; import { GuiComponentInterface } from '../../gui-component.interface'; - -declare var HexEditor: any; - -enum NumberBase { - Binary = 2, - Octal = 8, - Decimal = 10, - Hexadecimal = 16, -} - -interface HexEditorProps - extends Partial<{ - data: ArrayBuffer; - readonly: boolean; - showHeader: boolean; - showFooter: boolean; - height: string; - width: string; - offsetBase: NumberBase; - dataBase: NumberBase; - bytesPerLine: number; - start: number; - end: number; - }> {} +import { BehaviorSubject } from 'rxjs'; @Component({ selector: 'app-binary-block-ui', @@ -42,7 +8,7 @@ interface HexEditorProps styleUrls: ['./binary.block-ui.component.scss'], changeDetection: ChangeDetectionStrategy.OnPush, }) -export class BinaryBlockUiComponent implements GuiComponentInterface, AfterViewInit, OnDestroy { +export class BinaryBlockUiComponent implements GuiComponentInterface { @ViewChild('editor') editorDiv?: ElementRef; private _resource: Resource | null = null; @@ -53,14 +19,13 @@ export class BinaryBlockUiComponent implements GuiComponentInterface, AfterViewI @Input() set resource(value: Resource | null) { this._resource = value; - if (this.editor) { - this.editorProps.data = value ? new Uint8Array(value.data) : undefined; - this.editorProps.height = Math.min(24, Math.ceil((value?.data || []).length / 8) * 1.5) + 'rem'; - this.editor.$set({ props: this.editorProps }); - this.cdr.markForCheck(); - } + this.data$.next(new Uint8Array(value ? value.data : 0)); } + empty: Uint8Array = new Uint8Array(); + + data$: BehaviorSubject = new BehaviorSubject(new Uint8Array()); + @Input() resourceDescription: string = ''; @@ -68,30 +33,12 @@ export class BinaryBlockUiComponent implements GuiComponentInterface, AfterViewI @Output('changed') changed: EventEmitter = new EventEmitter(); - private editor: any; - private editorProps: HexEditorProps = { - showHeader: false, - height: '10rem', - readonly: false, - }; - - constructor(private readonly cdr: ChangeDetectorRef) {} - - ngAfterViewInit(): void { - if (this.resource) { - this.editorProps.data = new Uint8Array(this.resource.data); - this.editorProps.height = Math.min(24, Math.ceil(this.resource.data.length / 8) * 1.5) + 'rem'; - } - this.editor = new HexEditor({ - target: this.editorDiv?.nativeElement, - props: this.editorProps, - }); - this.cdr.markForCheck(); + constructor() { } - ngOnDestroy(): void { - if (this.editor) { - this.editor.$destroy(); - } + onDataChange(arr: Uint8Array) { + this._resource!.data = Array.from(arr); + this.changed.emit(); } + } diff --git a/frontend/src/libs/hex-editor/README.md b/frontend/src/libs/hex-editor/README.md deleted file mode 100644 index b4244e0..0000000 --- a/frontend/src/libs/hex-editor/README.md +++ /dev/null @@ -1 +0,0 @@ -This directory contains built project: https://github.com/stan-kondrat/js-hex-editor diff --git a/frontend/src/libs/hex-editor/index.js b/frontend/src/libs/hex-editor/index.js deleted file mode 100644 index 23d3f0d..0000000 --- a/frontend/src/libs/hex-editor/index.js +++ /dev/null @@ -1,2228 +0,0 @@ -function noop() { } -function assign(tar, src) { - // @ts-ignore - for (const k in src) - tar[k] = src[k]; - return tar; -} -function run(fn) { - return fn(); -} -function blank_object() { - return Object.create(null); -} -function run_all(fns) { - fns.forEach(run); -} -function is_function(thing) { - return typeof thing === 'function'; -} -function safe_not_equal(a, b) { - return a != a ? b == b : a !== b || ((a && typeof a === 'object') || typeof a === 'function'); -} -function is_empty(obj) { - return Object.keys(obj).length === 0; -} -function create_slot(definition, ctx, $$scope, fn) { - if (definition) { - const slot_ctx = get_slot_context(definition, ctx, $$scope, fn); - return definition[0](slot_ctx); - } -} -function get_slot_context(definition, ctx, $$scope, fn) { - return definition[1] && fn - ? assign($$scope.ctx.slice(), definition[1](fn(ctx))) - : $$scope.ctx; -} -function get_slot_changes(definition, $$scope, dirty, fn) { - if (definition[2] && fn) { - const lets = definition[2](fn(dirty)); - if ($$scope.dirty === undefined) { - return lets; - } - if (typeof lets === 'object') { - const merged = []; - const len = Math.max($$scope.dirty.length, lets.length); - for (let i = 0; i < len; i += 1) { - merged[i] = $$scope.dirty[i] | lets[i]; - } - return merged; - } - return $$scope.dirty | lets; - } - return $$scope.dirty; -} -function update_slot(slot, slot_definition, ctx, $$scope, dirty, get_slot_changes_fn, get_slot_context_fn) { - const slot_changes = get_slot_changes(slot_definition, $$scope, dirty, get_slot_changes_fn); - if (slot_changes) { - const slot_context = get_slot_context(slot_definition, ctx, $$scope, get_slot_context_fn); - slot.p(slot_context, slot_changes); - } -} - -// Track which nodes are claimed during hydration. Unclaimed nodes can then be removed from the DOM -// at the end of hydration without touching the remaining nodes. -let is_hydrating = false; -function start_hydrating() { - is_hydrating = true; -} -function end_hydrating() { - is_hydrating = false; -} -function upper_bound(low, high, key, value) { - // Return first index of value larger than input value in the range [low, high) - while (low < high) { - const mid = low + ((high - low) >> 1); - if (key(mid) <= value) { - low = mid + 1; - } - else { - high = mid; - } - } - return low; -} -function init_hydrate(target) { - if (target.hydrate_init) - return; - target.hydrate_init = true; - // We know that all children have claim_order values since the unclaimed have been detached - const children = target.childNodes; - /* - * Reorder claimed children optimally. - * We can reorder claimed children optimally by finding the longest subsequence of - * nodes that are already claimed in order and only moving the rest. The longest - * subsequence subsequence of nodes that are claimed in order can be found by - * computing the longest increasing subsequence of .claim_order values. - * - * This algorithm is optimal in generating the least amount of reorder operations - * possible. - * - * Proof: - * We know that, given a set of reordering operations, the nodes that do not move - * always form an increasing subsequence, since they do not move among each other - * meaning that they must be already ordered among each other. Thus, the maximal - * set of nodes that do not move form a longest increasing subsequence. - */ - // Compute longest increasing subsequence - // m: subsequence length j => index k of smallest value that ends an increasing subsequence of length j - const m = new Int32Array(children.length + 1); - // Predecessor indices + 1 - const p = new Int32Array(children.length); - m[0] = -1; - let longest = 0; - for (let i = 0; i < children.length; i++) { - const current = children[i].claim_order; - // Find the largest subsequence length such that it ends in a value less than our current value - // upper_bound returns first greater value, so we subtract one - const seqLen = upper_bound(1, longest + 1, idx => children[m[idx]].claim_order, current) - 1; - p[i] = m[seqLen] + 1; - const newLen = seqLen + 1; - // We can guarantee that current is the smallest value. Otherwise, we would have generated a longer sequence. - m[newLen] = i; - longest = Math.max(newLen, longest); - } - // The longest increasing subsequence of nodes (initially reversed) - const lis = []; - // The rest of the nodes, nodes that will be moved - const toMove = []; - let last = children.length - 1; - for (let cur = m[longest] + 1; cur != 0; cur = p[cur - 1]) { - lis.push(children[cur - 1]); - for (; last >= cur; last--) { - toMove.push(children[last]); - } - last--; - } - for (; last >= 0; last--) { - toMove.push(children[last]); - } - lis.reverse(); - // We sort the nodes being moved to guarantee that their insertion order matches the claim order - toMove.sort((a, b) => a.claim_order - b.claim_order); - // Finally, we move the nodes - for (let i = 0, j = 0; i < toMove.length; i++) { - while (j < lis.length && toMove[i].claim_order >= lis[j].claim_order) { - j++; - } - const anchor = j < lis.length ? lis[j] : null; - target.insertBefore(toMove[i], anchor); - } -} -function append(target, node) { - if (is_hydrating) { - init_hydrate(target); - if ((target.actual_end_child === undefined) || ((target.actual_end_child !== null) && (target.actual_end_child.parentElement !== target))) { - target.actual_end_child = target.firstChild; - } - if (node !== target.actual_end_child) { - target.insertBefore(node, target.actual_end_child); - } - else { - target.actual_end_child = node.nextSibling; - } - } - else if (node.parentNode !== target) { - target.appendChild(node); - } -} -function insert(target, node, anchor) { - if (is_hydrating && !anchor) { - append(target, node); - } - else if (node.parentNode !== target || (anchor && node.nextSibling !== anchor)) { - target.insertBefore(node, anchor || null); - } -} -function detach(node) { - node.parentNode.removeChild(node); -} -function destroy_each(iterations, detaching) { - for (let i = 0; i < iterations.length; i += 1) { - if (iterations[i]) - iterations[i].d(detaching); - } -} -function element(name) { - return document.createElement(name); -} -function text(data) { - return document.createTextNode(data); -} -function space() { - return text(' '); -} -function listen(node, event, handler, options) { - node.addEventListener(event, handler, options); - return () => node.removeEventListener(event, handler, options); -} -function attr(node, attribute, value) { - if (value == null) - node.removeAttribute(attribute); - else if (node.getAttribute(attribute) !== value) - node.setAttribute(attribute, value); -} -function set_custom_element_data(node, prop, value) { - if (prop in node) { - node[prop] = typeof node[prop] === 'boolean' && value === '' ? true : value; - } - else { - attr(node, prop, value); - } -} -function children(element) { - return Array.from(element.childNodes); -} -function set_data(text, data) { - data = '' + data; - if (text.wholeText !== data) - text.data = data; -} -function set_style(node, key, value, important) { - node.style.setProperty(key, value, important ? 'important' : ''); -} -function select_option(select, value) { - for (let i = 0; i < select.options.length; i += 1) { - const option = select.options[i]; - if (option.__value === value) { - option.selected = true; - return; - } - } -} -function select_value(select) { - const selected_option = select.querySelector(':checked') || select.options[0]; - return selected_option && selected_option.__value; -} -// unfortunately this can't be a constant as that wouldn't be tree-shakeable -// so we cache the result instead -let crossorigin; -function is_crossorigin() { - if (crossorigin === undefined) { - crossorigin = false; - try { - if (typeof window !== 'undefined' && window.parent) { - void window.parent.document; - } - } - catch (error) { - crossorigin = true; - } - } - return crossorigin; -} -function add_resize_listener(node, fn) { - const computed_style = getComputedStyle(node); - if (computed_style.position === 'static') { - node.style.position = 'relative'; - } - const iframe = element('iframe'); - iframe.setAttribute('style', 'display: block; position: absolute; top: 0; left: 0; width: 100%; height: 100%; ' + - 'overflow: hidden; border: 0; opacity: 0; pointer-events: none; z-index: -1;'); - iframe.setAttribute('aria-hidden', 'true'); - iframe.tabIndex = -1; - const crossorigin = is_crossorigin(); - let unsubscribe; - if (crossorigin) { - iframe.src = "data:text/html,"; - unsubscribe = listen(window, 'message', (event) => { - if (event.source === iframe.contentWindow) - fn(); - }); - } - else { - iframe.src = 'about:blank'; - iframe.onload = () => { - unsubscribe = listen(iframe.contentWindow, 'resize', fn); - }; - } - append(node, iframe); - return () => { - if (crossorigin) { - unsubscribe(); - } - else if (unsubscribe && iframe.contentWindow) { - unsubscribe(); - } - detach(iframe); - }; -} -function toggle_class(element, name, toggle) { - element.classList[toggle ? 'add' : 'remove'](name); -} - -let current_component; -function set_current_component(component) { - current_component = component; -} -function get_current_component() { - if (!current_component) - throw new Error('Function called outside component initialization'); - return current_component; -} -function onMount(fn) { - get_current_component().$$.on_mount.push(fn); -} - -const dirty_components = []; -const binding_callbacks = []; -const render_callbacks = []; -const flush_callbacks = []; -const resolved_promise = Promise.resolve(); -let update_scheduled = false; -function schedule_update() { - if (!update_scheduled) { - update_scheduled = true; - resolved_promise.then(flush); - } -} -function tick() { - schedule_update(); - return resolved_promise; -} -function add_render_callback(fn) { - render_callbacks.push(fn); -} -function add_flush_callback(fn) { - flush_callbacks.push(fn); -} -let flushing = false; -const seen_callbacks = new Set(); -function flush() { - if (flushing) - return; - flushing = true; - do { - // first, call beforeUpdate functions - // and update components - for (let i = 0; i < dirty_components.length; i += 1) { - const component = dirty_components[i]; - set_current_component(component); - update(component.$$); - } - set_current_component(null); - dirty_components.length = 0; - while (binding_callbacks.length) - binding_callbacks.pop()(); - // then, once components are updated, call - // afterUpdate functions. This may cause - // subsequent updates... - for (let i = 0; i < render_callbacks.length; i += 1) { - const callback = render_callbacks[i]; - if (!seen_callbacks.has(callback)) { - // ...so guard against infinite loops - seen_callbacks.add(callback); - callback(); - } - } - render_callbacks.length = 0; - } while (dirty_components.length); - while (flush_callbacks.length) { - flush_callbacks.pop()(); - } - update_scheduled = false; - flushing = false; - seen_callbacks.clear(); -} -function update($$) { - if ($$.fragment !== null) { - $$.update(); - run_all($$.before_update); - const dirty = $$.dirty; - $$.dirty = [-1]; - $$.fragment && $$.fragment.p($$.ctx, dirty); - $$.after_update.forEach(add_render_callback); - } -} -const outroing = new Set(); -let outros; -function group_outros() { - outros = { - r: 0, - c: [], - p: outros // parent group - }; -} -function check_outros() { - if (!outros.r) { - run_all(outros.c); - } - outros = outros.p; -} -function transition_in(block, local) { - if (block && block.i) { - outroing.delete(block); - block.i(local); - } -} -function transition_out(block, local, detach, callback) { - if (block && block.o) { - if (outroing.has(block)) - return; - outroing.add(block); - outros.c.push(() => { - outroing.delete(block); - if (callback) { - if (detach) - block.d(1); - callback(); - } - }); - block.o(local); - } -} -function outro_and_destroy_block(block, lookup) { - transition_out(block, 1, 1, () => { - lookup.delete(block.key); - }); -} -function update_keyed_each(old_blocks, dirty, get_key, dynamic, ctx, list, lookup, node, destroy, create_each_block, next, get_context) { - let o = old_blocks.length; - let n = list.length; - let i = o; - const old_indexes = {}; - while (i--) - old_indexes[old_blocks[i].key] = i; - const new_blocks = []; - const new_lookup = new Map(); - const deltas = new Map(); - i = n; - while (i--) { - const child_ctx = get_context(ctx, list, i); - const key = get_key(child_ctx); - let block = lookup.get(key); - if (!block) { - block = create_each_block(key, child_ctx); - block.c(); - } - else if (dynamic) { - block.p(child_ctx, dirty); - } - new_lookup.set(key, new_blocks[i] = block); - if (key in old_indexes) - deltas.set(key, Math.abs(i - old_indexes[key])); - } - const will_move = new Set(); - const did_move = new Set(); - function insert(block) { - transition_in(block, 1); - block.m(node, next); - lookup.set(block.key, block); - next = block.first; - n--; - } - while (o && n) { - const new_block = new_blocks[n - 1]; - const old_block = old_blocks[o - 1]; - const new_key = new_block.key; - const old_key = old_block.key; - if (new_block === old_block) { - // do nothing - next = new_block.first; - o--; - n--; - } - else if (!new_lookup.has(old_key)) { - // remove old block - destroy(old_block, lookup); - o--; - } - else if (!lookup.has(new_key) || will_move.has(new_key)) { - insert(new_block); - } - else if (did_move.has(old_key)) { - o--; - } - else if (deltas.get(new_key) > deltas.get(old_key)) { - did_move.add(new_key); - insert(new_block); - } - else { - will_move.add(old_key); - o--; - } - } - while (o--) { - const old_block = old_blocks[o]; - if (!new_lookup.has(old_block.key)) - destroy(old_block, lookup); - } - while (n) - insert(new_blocks[n - 1]); - return new_blocks; -} - -function bind(component, name, callback) { - const index = component.$$.props[name]; - if (index !== undefined) { - component.$$.bound[index] = callback; - callback(component.$$.ctx[index]); - } -} -function create_component(block) { - block && block.c(); -} -function mount_component(component, target, anchor, customElement) { - const { fragment, on_mount, on_destroy, after_update } = component.$$; - fragment && fragment.m(target, anchor); - if (!customElement) { - // onMount happens before the initial afterUpdate - add_render_callback(() => { - const new_on_destroy = on_mount.map(run).filter(is_function); - if (on_destroy) { - on_destroy.push(...new_on_destroy); - } - else { - // Edge case - component was destroyed immediately, - // most likely as a result of a binding initialising - run_all(new_on_destroy); - } - component.$$.on_mount = []; - }); - } - after_update.forEach(add_render_callback); -} -function destroy_component(component, detaching) { - const $$ = component.$$; - if ($$.fragment !== null) { - run_all($$.on_destroy); - $$.fragment && $$.fragment.d(detaching); - // TODO null out other refs, including component.$$ (but need to - // preserve final state?) - $$.on_destroy = $$.fragment = null; - $$.ctx = []; - } -} -function make_dirty(component, i) { - if (component.$$.dirty[0] === -1) { - dirty_components.push(component); - schedule_update(); - component.$$.dirty.fill(0); - } - component.$$.dirty[(i / 31) | 0] |= (1 << (i % 31)); -} -function init(component, options, instance, create_fragment, not_equal, props, dirty = [-1]) { - const parent_component = current_component; - set_current_component(component); - const $$ = component.$$ = { - fragment: null, - ctx: null, - // state - props, - update: noop, - not_equal, - bound: blank_object(), - // lifecycle - on_mount: [], - on_destroy: [], - on_disconnect: [], - before_update: [], - after_update: [], - context: new Map(parent_component ? parent_component.$$.context : options.context || []), - // everything else - callbacks: blank_object(), - dirty, - skip_bound: false - }; - let ready = false; - $$.ctx = instance - ? instance(component, options.props || {}, (i, ret, ...rest) => { - const value = rest.length ? rest[0] : ret; - if ($$.ctx && not_equal($$.ctx[i], $$.ctx[i] = value)) { - if (!$$.skip_bound && $$.bound[i]) - $$.bound[i](value); - if (ready) - make_dirty(component, i); - } - return ret; - }) - : []; - $$.update(); - ready = true; - run_all($$.before_update); - // `false` as a special case of no DOM component - $$.fragment = create_fragment ? create_fragment($$.ctx) : false; - if (options.target) { - if (options.hydrate) { - start_hydrating(); - const nodes = children(options.target); - // eslint-disable-next-line @typescript-eslint/no-non-null-assertion - $$.fragment && $$.fragment.l(nodes); - nodes.forEach(detach); - } - else { - // eslint-disable-next-line @typescript-eslint/no-non-null-assertion - $$.fragment && $$.fragment.c(); - } - if (options.intro) - transition_in(component.$$.fragment); - mount_component(component, options.target, options.anchor, options.customElement); - end_hydrating(); - flush(); - } - set_current_component(parent_component); -} -/** - * Base class for Svelte components. Used when dev=false. - */ -class SvelteComponent { - $destroy() { - destroy_component(this, 1); - this.$destroy = noop; - } - $on(type, callback) { - const callbacks = (this.$$.callbacks[type] || (this.$$.callbacks[type] = [])); - callbacks.push(callback); - return () => { - const index = callbacks.indexOf(callback); - if (index !== -1) - callbacks.splice(index, 1); - }; - } - $set($$props) { - if (this.$$set && !is_empty($$props)) { - this.$$.skip_bound = true; - this.$$set($$props); - this.$$.skip_bound = false; - } - } -} - -/* tmp/test/js-hex-editor-main/node_modules/@sveltejs/svelte-virtual-list/VirtualList.svelte generated by Svelte v3.38.3 */ - -function add_css$2() { - var style = element("style"); - style.id = "svelte-1tqh76q-style"; - style.textContent = "svelte-virtual-list-viewport.svelte-1tqh76q{position:relative;overflow-y:auto;-webkit-overflow-scrolling:touch;display:block}svelte-virtual-list-contents.svelte-1tqh76q,svelte-virtual-list-row.svelte-1tqh76q{display:block}svelte-virtual-list-row.svelte-1tqh76q{overflow:hidden}"; - append(document.head, style); -} - -function get_each_context$1(ctx, list, i) { - const child_ctx = ctx.slice(); - child_ctx[23] = list[i]; - return child_ctx; -} - -const get_default_slot_changes = dirty => ({ item: dirty & /*visible*/ 16 }); -const get_default_slot_context = ctx => ({ item: /*row*/ ctx[23].data }); - -// (166:26) Missing template -function fallback_block(ctx) { - let t; - - return { - c() { - t = text("Missing template"); - }, - m(target, anchor) { - insert(target, t, anchor); - }, - d(detaching) { - if (detaching) detach(t); - } - }; -} - -// (164:2) {#each visible as row (row.index)} -function create_each_block$1(key_1, ctx) { - let svelte_virtual_list_row; - let t; - let current; - const default_slot_template = /*#slots*/ ctx[14].default; - const default_slot = create_slot(default_slot_template, ctx, /*$$scope*/ ctx[13], get_default_slot_context); - const default_slot_or_fallback = default_slot || fallback_block(); - - return { - key: key_1, - first: null, - c() { - svelte_virtual_list_row = element("svelte-virtual-list-row"); - if (default_slot_or_fallback) default_slot_or_fallback.c(); - t = space(); - set_custom_element_data(svelte_virtual_list_row, "class", "svelte-1tqh76q"); - this.first = svelte_virtual_list_row; - }, - m(target, anchor) { - insert(target, svelte_virtual_list_row, anchor); - - if (default_slot_or_fallback) { - default_slot_or_fallback.m(svelte_virtual_list_row, null); - } - - append(svelte_virtual_list_row, t); - current = true; - }, - p(new_ctx, dirty) { - ctx = new_ctx; - - if (default_slot) { - if (default_slot.p && (!current || dirty & /*$$scope, visible*/ 8208)) { - update_slot(default_slot, default_slot_template, ctx, /*$$scope*/ ctx[13], !current ? -1 : dirty, get_default_slot_changes, get_default_slot_context); - } - } - }, - i(local) { - if (current) return; - transition_in(default_slot_or_fallback, local); - current = true; - }, - o(local) { - transition_out(default_slot_or_fallback, local); - current = false; - }, - d(detaching) { - if (detaching) detach(svelte_virtual_list_row); - if (default_slot_or_fallback) default_slot_or_fallback.d(detaching); - } - }; -} - -function create_fragment$2(ctx) { - let svelte_virtual_list_viewport; - let svelte_virtual_list_contents; - let each_blocks = []; - let each_1_lookup = new Map(); - let svelte_virtual_list_viewport_resize_listener; - let current; - let mounted; - let dispose; - let each_value = /*visible*/ ctx[4]; - const get_key = ctx => /*row*/ ctx[23].index; - - for (let i = 0; i < each_value.length; i += 1) { - let child_ctx = get_each_context$1(ctx, each_value, i); - let key = get_key(child_ctx); - each_1_lookup.set(key, each_blocks[i] = create_each_block$1(key, child_ctx)); - } - - return { - c() { - svelte_virtual_list_viewport = element("svelte-virtual-list-viewport"); - svelte_virtual_list_contents = element("svelte-virtual-list-contents"); - - for (let i = 0; i < each_blocks.length; i += 1) { - each_blocks[i].c(); - } - - set_style(svelte_virtual_list_contents, "padding-top", /*top*/ ctx[5] + "px"); - set_style(svelte_virtual_list_contents, "padding-bottom", /*bottom*/ ctx[6] + "px"); - set_custom_element_data(svelte_virtual_list_contents, "class", "svelte-1tqh76q"); - set_style(svelte_virtual_list_viewport, "height", /*height*/ ctx[0]); - set_custom_element_data(svelte_virtual_list_viewport, "class", "svelte-1tqh76q"); - add_render_callback(() => /*svelte_virtual_list_viewport_elementresize_handler*/ ctx[17].call(svelte_virtual_list_viewport)); - }, - m(target, anchor) { - insert(target, svelte_virtual_list_viewport, anchor); - append(svelte_virtual_list_viewport, svelte_virtual_list_contents); - - for (let i = 0; i < each_blocks.length; i += 1) { - each_blocks[i].m(svelte_virtual_list_contents, null); - } - - /*svelte_virtual_list_contents_binding*/ ctx[15](svelte_virtual_list_contents); - /*svelte_virtual_list_viewport_binding*/ ctx[16](svelte_virtual_list_viewport); - svelte_virtual_list_viewport_resize_listener = add_resize_listener(svelte_virtual_list_viewport, /*svelte_virtual_list_viewport_elementresize_handler*/ ctx[17].bind(svelte_virtual_list_viewport)); - current = true; - - if (!mounted) { - dispose = listen(svelte_virtual_list_viewport, "scroll", /*handle_scroll*/ ctx[7]); - mounted = true; - } - }, - p(ctx, [dirty]) { - if (dirty & /*$$scope, visible*/ 8208) { - each_value = /*visible*/ ctx[4]; - group_outros(); - each_blocks = update_keyed_each(each_blocks, dirty, get_key, 1, ctx, each_value, each_1_lookup, svelte_virtual_list_contents, outro_and_destroy_block, create_each_block$1, null, get_each_context$1); - check_outros(); - } - - if (!current || dirty & /*top*/ 32) { - set_style(svelte_virtual_list_contents, "padding-top", /*top*/ ctx[5] + "px"); - } - - if (!current || dirty & /*bottom*/ 64) { - set_style(svelte_virtual_list_contents, "padding-bottom", /*bottom*/ ctx[6] + "px"); - } - - if (!current || dirty & /*height*/ 1) { - set_style(svelte_virtual_list_viewport, "height", /*height*/ ctx[0]); - } - }, - i(local) { - if (current) return; - - for (let i = 0; i < each_value.length; i += 1) { - transition_in(each_blocks[i]); - } - - current = true; - }, - o(local) { - for (let i = 0; i < each_blocks.length; i += 1) { - transition_out(each_blocks[i]); - } - - current = false; - }, - d(detaching) { - if (detaching) detach(svelte_virtual_list_viewport); - - for (let i = 0; i < each_blocks.length; i += 1) { - each_blocks[i].d(); - } - - /*svelte_virtual_list_contents_binding*/ ctx[15](null); - /*svelte_virtual_list_viewport_binding*/ ctx[16](null); - svelte_virtual_list_viewport_resize_listener(); - mounted = false; - dispose(); - } - }; -} - -function instance$2($$self, $$props, $$invalidate) { - let { $$slots: slots = {}, $$scope } = $$props; - let { items } = $$props; - let { height = "100%" } = $$props; - let { itemHeight = undefined } = $$props; - let { start = 0 } = $$props; - let { end = 0 } = $$props; - - // local state - let height_map = []; - - let rows; - let viewport; - let contents; - let viewport_height = 0; - let visible; - let mounted; - let top = 0; - let bottom = 0; - let average_height; - - async function refresh(items, viewport_height, itemHeight) { - const { scrollTop } = viewport; - await tick(); // wait until the DOM is up to date - let content_height = top - scrollTop; - let i = start; - - while (content_height < viewport_height && i < items.length) { - let row = rows[i - start]; - - if (!row) { - $$invalidate(9, end = i + 1); - await tick(); // render the newly visible row - row = rows[i - start]; - } - - const row_height = height_map[i] = itemHeight || row.offsetHeight; - content_height += row_height; - i += 1; - } - - $$invalidate(9, end = i); - const remaining = items.length - end; - average_height = (top + content_height) / end; - $$invalidate(6, bottom = remaining * average_height); - height_map.length = items.length; - } - - async function handle_scroll() { - const { scrollTop } = viewport; - const old_start = start; - - for (let v = 0; v < rows.length; v += 1) { - height_map[start + v] = itemHeight || rows[v].offsetHeight; - } - - let i = 0; - let y = 0; - - while (i < items.length) { - const row_height = height_map[i] || average_height; - - if (y + row_height > scrollTop) { - $$invalidate(8, start = i); - $$invalidate(5, top = y); - break; - } - - y += row_height; - i += 1; - } - - while (i < items.length) { - y += height_map[i] || average_height; - i += 1; - if (y > scrollTop + viewport_height) break; - } - - $$invalidate(9, end = i); - const remaining = items.length - end; - average_height = y / end; - while (i < items.length) height_map[i++] = average_height; - $$invalidate(6, bottom = remaining * average_height); - - // prevent jumping if we scrolled up into unknown territory - if (start < old_start) { - await tick(); - let expected_height = 0; - let actual_height = 0; - - for (let i = start; i < old_start; i += 1) { - if (rows[i - start]) { - expected_height += height_map[i]; - actual_height += itemHeight || rows[i - start].offsetHeight; - } - } - - const d = actual_height - expected_height; - viewport.scrollTo(0, scrollTop + d); - } - } // TODO if we overestimated the space these - // rows would occupy we may need to add some - - // more. maybe we can just call handle_scroll again? - // trigger initial refresh - onMount(() => { - rows = contents.getElementsByTagName("svelte-virtual-list-row"); - $$invalidate(12, mounted = true); - }); - - function svelte_virtual_list_contents_binding($$value) { - binding_callbacks[$$value ? "unshift" : "push"](() => { - contents = $$value; - $$invalidate(3, contents); - }); - } - - function svelte_virtual_list_viewport_binding($$value) { - binding_callbacks[$$value ? "unshift" : "push"](() => { - viewport = $$value; - $$invalidate(2, viewport); - }); - } - - function svelte_virtual_list_viewport_elementresize_handler() { - viewport_height = this.offsetHeight; - $$invalidate(1, viewport_height); - } - - $$self.$$set = $$props => { - if ("items" in $$props) $$invalidate(10, items = $$props.items); - if ("height" in $$props) $$invalidate(0, height = $$props.height); - if ("itemHeight" in $$props) $$invalidate(11, itemHeight = $$props.itemHeight); - if ("start" in $$props) $$invalidate(8, start = $$props.start); - if ("end" in $$props) $$invalidate(9, end = $$props.end); - if ("$$scope" in $$props) $$invalidate(13, $$scope = $$props.$$scope); - }; - - $$self.$$.update = () => { - if ($$self.$$.dirty & /*items, start, end*/ 1792) { - $$invalidate(4, visible = items.slice(start, end).map((data, i) => { - return { index: i + start, data }; - })); - } - - if ($$self.$$.dirty & /*mounted, items, viewport_height, itemHeight*/ 7170) { - // whenever `items` changes, invalidate the current heightmap - if (mounted) refresh(items, viewport_height, itemHeight); - } - }; - - return [ - height, - viewport_height, - viewport, - contents, - visible, - top, - bottom, - handle_scroll, - start, - end, - items, - itemHeight, - mounted, - $$scope, - slots, - svelte_virtual_list_contents_binding, - svelte_virtual_list_viewport_binding, - svelte_virtual_list_viewport_elementresize_handler - ]; -} - -class VirtualList extends SvelteComponent { - constructor(options) { - super(); - if (!document.getElementById("svelte-1tqh76q-style")) add_css$2(); - - init(this, options, instance$2, create_fragment$2, safe_not_equal, { - items: 10, - height: 0, - itemHeight: 11, - start: 8, - end: 9 - }); - } -} - -function enumKeys(obj) { - return Object.keys(obj).filter((k) => Number.isNaN(+k)); -} -function getBaseLog(x, y) { - return Math.log(y) / Math.log(x); -} -function numDigits(x, base = 10) { - return Math.max(Math.floor(getBaseLog(base, Math.abs(x))), 0) + 1; -} -function* iter_range(begin, end, step) { - step = step ? step : 1; - if (typeof end === "undefined") { - end = begin > 0 ? begin : 0; - begin = begin < 0 ? begin : 0; - } - if (begin == end) { - return; - } - if (begin > end) { - step = step * -1; - } - for (let x = begin; x < end; x += step) { - yield x; - } -} -function range(begin, end, step) { - return Array.from(iter_range(begin, end, step)); -} - -/* src/Glyph.svelte generated by Svelte v3.38.3 */ - -function add_css$1() { - var style = element("style"); - style.id = "svelte-1miow1p-style"; - style.textContent = "span.svelte-1miow1p.svelte-1miow1p{display:inline-block;background-color:var(--color);min-width:1ch;min-height:1em;padding:0 4px}main.selected.svelte-1miow1p span.svelte-1miow1p{box-shadow:inset 0px 0px 0px 1px red}main.svelte-1miow1p span.svelte-1miow1p:focus{background-color:wheat;outline:none}span.empty.svelte-1miow1p.svelte-1miow1p{color:#aaa}span.ascii.svelte-1miow1p.svelte-1miow1p{margin-left:0.2ch;padding:0 1px}span.number.svelte-1miow1p.svelte-1miow1p::before{content:attr(data-digits);display:inline;color:#aaa}"; - append(document.head, style); -} - -// (18:2) {:else} -function create_else_block(ctx) { - let span; - let t_value = /*value*/ ctx[1].toString(/*type*/ ctx[2]).toUpperCase() + ""; - let t; - let span_data_digits_value; - - return { - c() { - span = element("span"); - t = text(t_value); - attr(span, "class", "number svelte-1miow1p"); - attr(span, "tabindex", "0"); - attr(span, "data-position", /*position*/ ctx[0]); - attr(span, "data-digits", span_data_digits_value = ("0").repeat(/*digits*/ ctx[4])); - }, - m(target, anchor) { - insert(target, span, anchor); - append(span, t); - }, - p(ctx, dirty) { - if (dirty & /*value, type*/ 6 && t_value !== (t_value = /*value*/ ctx[1].toString(/*type*/ ctx[2]).toUpperCase() + "")) set_data(t, t_value); - - if (dirty & /*position*/ 1) { - attr(span, "data-position", /*position*/ ctx[0]); - } - - if (dirty & /*digits*/ 16 && span_data_digits_value !== (span_data_digits_value = ("0").repeat(/*digits*/ ctx[4]))) { - attr(span, "data-digits", span_data_digits_value); - } - }, - d(detaching) { - if (detaching) detach(span); - } - }; -} - -// (14:23) -function create_if_block_1$1(ctx) { - let span; - let t_value = String.fromCharCode(/*value*/ ctx[1]) + ""; - let t; - - return { - c() { - span = element("span"); - t = text(t_value); - attr(span, "class", "ascii svelte-1miow1p"); - attr(span, "tabindex", "0"); - attr(span, "data-position", /*position*/ ctx[0]); - }, - m(target, anchor) { - insert(target, span, anchor); - append(span, t); - }, - p(ctx, dirty) { - if (dirty & /*value*/ 2 && t_value !== (t_value = String.fromCharCode(/*value*/ ctx[1]) + "")) set_data(t, t_value); - - if (dirty & /*position*/ 1) { - attr(span, "data-position", /*position*/ ctx[0]); - } - }, - d(detaching) { - if (detaching) detach(span); - } - }; -} - -// (12:2) {#if value === undefined} -function create_if_block$1(ctx) { - let span; - let t_value = (".").repeat(/*digits*/ ctx[4] + 1) + ""; - let t; - - return { - c() { - span = element("span"); - t = text(t_value); - attr(span, "class", "empty svelte-1miow1p"); - }, - m(target, anchor) { - insert(target, span, anchor); - append(span, t); - }, - p(ctx, dirty) { - if (dirty & /*digits*/ 16 && t_value !== (t_value = (".").repeat(/*digits*/ ctx[4] + 1) + "")) set_data(t, t_value); - }, - d(detaching) { - if (detaching) detach(span); - } - }; -} - -function create_fragment$1(ctx) { - let main; - - function select_block_type(ctx, dirty) { - if (/*value*/ ctx[1] === undefined) return create_if_block$1; - if (/*type*/ ctx[2] === 0) return create_if_block_1$1; - return create_else_block; - } - - let current_block_type = select_block_type(ctx); - let if_block = current_block_type(ctx); - - return { - c() { - main = element("main"); - if_block.c(); - attr(main, "class", "svelte-1miow1p"); - toggle_class(main, "selected", /*selected*/ ctx[3]); - }, - m(target, anchor) { - insert(target, main, anchor); - if_block.m(main, null); - }, - p(ctx, [dirty]) { - if (current_block_type === (current_block_type = select_block_type(ctx)) && if_block) { - if_block.p(ctx, dirty); - } else { - if_block.d(1); - if_block = current_block_type(ctx); - - if (if_block) { - if_block.c(); - if_block.m(main, null); - } - } - - if (dirty & /*selected*/ 8) { - toggle_class(main, "selected", /*selected*/ ctx[3]); - } - }, - i: noop, - o: noop, - d(detaching) { - if (detaching) detach(main); - if_block.d(); - } - }; -} - -function instance$1($$self, $$props, $$invalidate) { - let digits; - let { position = "" } = $$props; - let { value } = $$props; - let { type } = $$props; - let { selected = false } = $$props; - let { maxItems = 0 } = $$props; - - $$self.$$set = $$props => { - if ("position" in $$props) $$invalidate(0, position = $$props.position); - if ("value" in $$props) $$invalidate(1, value = $$props.value); - if ("type" in $$props) $$invalidate(2, type = $$props.type); - if ("selected" in $$props) $$invalidate(3, selected = $$props.selected); - if ("maxItems" in $$props) $$invalidate(5, maxItems = $$props.maxItems); - }; - - $$self.$$.update = () => { - if ($$self.$$.dirty & /*type, maxItems, value*/ 38) { - $$invalidate(4, digits = Math.max(0, Math.ceil(getBaseLog(type, maxItems)) - (value !== null && value !== void 0 ? value : 0).toString(type || 2).length, Math.ceil(getBaseLog(type, 256)) - (value !== null && value !== void 0 ? value : 0).toString(type || 2).length)); - } - }; - - return [position, value, type, selected, digits, maxItems]; -} - -class Glyph extends SvelteComponent { - constructor(options) { - super(); - if (!document.getElementById("svelte-1miow1p-style")) add_css$1(); - - init(this, options, instance$1, create_fragment$1, safe_not_equal, { - position: 0, - value: 1, - type: 2, - selected: 3, - maxItems: 5 - }); - } -} - -var NumberBase; -(function (NumberBase) { - NumberBase[NumberBase["Binary"] = 2] = "Binary"; - NumberBase[NumberBase["Octal"] = 8] = "Octal"; - NumberBase[NumberBase["Decimal"] = 10] = "Decimal"; - NumberBase[NumberBase["Hexadecimal"] = 16] = "Hexadecimal"; -})(NumberBase || (NumberBase = {})); - -/* src/HexEditor.svelte generated by Svelte v3.38.3 */ - -function add_css() { - var style = element("style"); - style.id = "svelte-1qk31u8-style"; - style.textContent = "main.svelte-1qk31u8.svelte-1qk31u8{height:var(--height);min-height:96px;width:var(--width);box-sizing:content-box;display:inline-flex;flex-direction:column;font-family:monospace;font-variant-numeric:slashed-zero;border:1px solid gray;user-select:none;-webkit-user-select:none;cursor:pointer}main.svelte-1qk31u8>header.svelte-1qk31u8{display:flex;box-shadow:0px 1px 0 rgba(0, 0, 0, 0.2), 0px 1px 4px rgba(0, 0, 0, 0.2)}main.svelte-1qk31u8>header .header-offset.svelte-1qk31u8{background-color:rgba(0, 0, 0, 0.1);min-width:110px;text-align:center}main.svelte-1qk31u8>header .header-data.svelte-1qk31u8{margin-left:20px}svelte-virtual-list-viewport{flex-grow:1}main.svelte-1qk31u8>footer.svelte-1qk31u8{background-color:rgba(0, 0, 0, 0.08);box-shadow:0px -1px 0 rgba(0, 0, 0, 0.2), 0px -1px 4px rgba(0, 0, 0, 0.2);padding:2px 1em;display:flex;font-size:12px;justify-content:center}main.svelte-1qk31u8 .hex-row.svelte-1qk31u8{display:flex;flex-wrap:nowrap}main.svelte-1qk31u8 .hex-row-offset.svelte-1qk31u8{background-color:rgba(0, 0, 0, 0.1);min-width:100px;padding-right:10px;margin-right:2em;justify-content:flex-end;display:flex;flex-wrap:nowrap}main.svelte-1qk31u8 .hex-row-data.svelte-1qk31u8{margin-right:1em;display:flex;flex-wrap:nowrap}main.svelte-1qk31u8 .hex-row-ascii.svelte-1qk31u8{margin:0 1em;display:flex;flex-wrap:nowrap}"; - append(document.head, style); -} - -function get_each_context(ctx, list, i) { - const child_ctx = ctx.slice(); - child_ctx[25] = list[i]; - return child_ctx; -} - -function get_each_context_1(ctx, list, i) { - const child_ctx = ctx.slice(); - child_ctx[25] = list[i]; - return child_ctx; -} - -function get_each_context_2(ctx, list, i) { - const child_ctx = ctx.slice(); - child_ctx[24] = list[i]; - return child_ctx; -} - -function get_each_context_3(ctx, list, i) { - const child_ctx = ctx.slice(); - child_ctx[24] = list[i]; - return child_ctx; -} - -function get_each_context_4(ctx, list, i) { - const child_ctx = ctx.slice(); - child_ctx[24] = list[i]; - return child_ctx; -} - -// (44:2) {#if showHeader} -function create_if_block_1(ctx) { - let header; - let div0; - let select0; - let t0; - let div1; - let select1; - let t1; - let select2; - let t2; - let div2; - let mounted; - let dispose; - let each_value_4 = /*numberBases*/ ctx[12]; - let each_blocks_2 = []; - - for (let i = 0; i < each_value_4.length; i += 1) { - each_blocks_2[i] = create_each_block_4(get_each_context_4(ctx, each_value_4, i)); - } - - let each_value_3 = /*numberBases*/ ctx[12]; - let each_blocks_1 = []; - - for (let i = 0; i < each_value_3.length; i += 1) { - each_blocks_1[i] = create_each_block_3(get_each_context_3(ctx, each_value_3, i)); - } - - let each_value_2 = [1, 2, 4, 8, 16]; - let each_blocks = []; - - for (let i = 0; i < 5; i += 1) { - each_blocks[i] = create_each_block_2(get_each_context_2(ctx, each_value_2, i)); - } - - return { - c() { - header = element("header"); - div0 = element("div"); - select0 = element("select"); - - for (let i = 0; i < each_blocks_2.length; i += 1) { - each_blocks_2[i].c(); - } - - t0 = space(); - div1 = element("div"); - select1 = element("select"); - - for (let i = 0; i < each_blocks_1.length; i += 1) { - each_blocks_1[i].c(); - } - - t1 = space(); - select2 = element("select"); - - for (let i = 0; i < 5; i += 1) { - each_blocks[i].c(); - } - - t2 = space(); - div2 = element("div"); - if (/*offsetBase*/ ctx[1] === void 0) add_render_callback(() => /*select0_change_handler*/ ctx[19].call(select0)); - attr(div0, "class", "header-offset svelte-1qk31u8"); - set_style(div0, "--offsetWidth", /*offsetWidth*/ ctx[14]); - if (/*dataBase*/ ctx[2] === void 0) add_render_callback(() => /*select1_change_handler*/ ctx[20].call(select1)); - attr(select2, "title", "Bytes per line"); - if (/*bytesPerLine*/ ctx[0] === void 0) add_render_callback(() => /*select2_change_handler*/ ctx[21].call(select2)); - attr(div1, "class", "header-data svelte-1qk31u8"); - set_style(div1, "--width", /*dataWidth*/ ctx[15]); - attr(div2, "class", "header-ascii"); - set_style(div2, "--width", /*dataWidth*/ ctx[15]); - attr(header, "class", "svelte-1qk31u8"); - }, - m(target, anchor) { - insert(target, header, anchor); - append(header, div0); - append(div0, select0); - - for (let i = 0; i < each_blocks_2.length; i += 1) { - each_blocks_2[i].m(select0, null); - } - - select_option(select0, /*offsetBase*/ ctx[1]); - append(header, t0); - append(header, div1); - append(div1, select1); - - for (let i = 0; i < each_blocks_1.length; i += 1) { - each_blocks_1[i].m(select1, null); - } - - select_option(select1, /*dataBase*/ ctx[2]); - append(div1, t1); - append(div1, select2); - - for (let i = 0; i < 5; i += 1) { - each_blocks[i].m(select2, null); - } - - select_option(select2, /*bytesPerLine*/ ctx[0]); - append(header, t2); - append(header, div2); - - if (!mounted) { - dispose = [ - listen(select0, "change", /*select0_change_handler*/ ctx[19]), - listen(select1, "change", /*select1_change_handler*/ ctx[20]), - listen(select2, "change", /*select2_change_handler*/ ctx[21]) - ]; - - mounted = true; - } - }, - p(ctx, dirty) { - if (dirty[0] & /*numberBases*/ 4096) { - each_value_4 = /*numberBases*/ ctx[12]; - let i; - - for (i = 0; i < each_value_4.length; i += 1) { - const child_ctx = get_each_context_4(ctx, each_value_4, i); - - if (each_blocks_2[i]) { - each_blocks_2[i].p(child_ctx, dirty); - } else { - each_blocks_2[i] = create_each_block_4(child_ctx); - each_blocks_2[i].c(); - each_blocks_2[i].m(select0, null); - } - } - - for (; i < each_blocks_2.length; i += 1) { - each_blocks_2[i].d(1); - } - - each_blocks_2.length = each_value_4.length; - } - - if (dirty[0] & /*offsetBase, numberBases*/ 4098) { - select_option(select0, /*offsetBase*/ ctx[1]); - } - - if (dirty[0] & /*numberBases*/ 4096) { - each_value_3 = /*numberBases*/ ctx[12]; - let i; - - for (i = 0; i < each_value_3.length; i += 1) { - const child_ctx = get_each_context_3(ctx, each_value_3, i); - - if (each_blocks_1[i]) { - each_blocks_1[i].p(child_ctx, dirty); - } else { - each_blocks_1[i] = create_each_block_3(child_ctx); - each_blocks_1[i].c(); - each_blocks_1[i].m(select1, null); - } - } - - for (; i < each_blocks_1.length; i += 1) { - each_blocks_1[i].d(1); - } - - each_blocks_1.length = each_value_3.length; - } - - if (dirty[0] & /*dataBase, numberBases*/ 4100) { - select_option(select1, /*dataBase*/ ctx[2]); - } - - if (dirty[0] & /*bytesPerLine*/ 1) { - select_option(select2, /*bytesPerLine*/ ctx[0]); - } - }, - d(detaching) { - if (detaching) detach(header); - destroy_each(each_blocks_2, detaching); - destroy_each(each_blocks_1, detaching); - destroy_each(each_blocks, detaching); - mounted = false; - run_all(dispose); - } - }; -} - -// (48:10) {#each numberBases as item} -function create_each_block_4(ctx) { - let option; - let t0_value = NumberBase[/*item*/ ctx[24]] + ""; - let t0; - let t1; - let option_value_value; - - return { - c() { - option = element("option"); - t0 = text(t0_value); - t1 = space(); - option.__value = option_value_value = /*item*/ ctx[24]; - option.value = option.__value; - }, - m(target, anchor) { - insert(target, option, anchor); - append(option, t0); - append(option, t1); - }, - p: noop, - d(detaching) { - if (detaching) detach(option); - } - }; -} - -// (57:10) {#each numberBases as item} -function create_each_block_3(ctx) { - let option; - let t0_value = NumberBase[/*item*/ ctx[24]] + ""; - let t0; - let t1; - let option_value_value; - - return { - c() { - option = element("option"); - t0 = text(t0_value); - t1 = space(); - option.__value = option_value_value = /*item*/ ctx[24]; - option.value = option.__value; - }, - m(target, anchor) { - insert(target, option, anchor); - append(option, t0); - append(option, t1); - }, - p: noop, - d(detaching) { - if (detaching) detach(option); - } - }; -} - -// (64:10) {#each [1, 2, 4, 8, 16] as item} -function create_each_block_2(ctx) { - let option; - let t0; - let t1; - let t2_value = (/*item*/ ctx[24] === 1 ? "Byte" : "Bytes") + ""; - let t2; - let t3; - let option_value_value; - - return { - c() { - option = element("option"); - t0 = text(/*item*/ ctx[24]); - t1 = space(); - t2 = text(t2_value); - t3 = space(); - option.__value = option_value_value = /*item*/ ctx[24]; - option.value = option.__value; - }, - m(target, anchor) { - insert(target, option, anchor); - append(option, t0); - append(option, t1); - append(option, t2); - append(option, t3); - }, - p: noop, - d(detaching) { - if (detaching) detach(option); - } - }; -} - -// (86:8) {#each range(0, bytesPerLine, 1) as i} -function create_each_block_1(ctx) { - let glyph; - let current; - - glyph = new Glyph({ - props: { - value: /*u8arr*/ ctx[13][/*item*/ ctx[24] * /*bytesPerLine*/ ctx[0] + /*i*/ ctx[25]], - type: /*dataBase*/ ctx[2], - position: /*item*/ ctx[24] * /*bytesPerLine*/ ctx[0] + /*i*/ ctx[25], - selected: +/*mouseOverPosition*/ ctx[10] === /*item*/ ctx[24] * /*bytesPerLine*/ ctx[0] + /*i*/ ctx[25] - } - }); - - return { - c() { - create_component(glyph.$$.fragment); - }, - m(target, anchor) { - mount_component(glyph, target, anchor); - current = true; - }, - p(ctx, dirty) { - const glyph_changes = {}; - if (dirty[0] & /*item, bytesPerLine*/ 16777217) glyph_changes.value = /*u8arr*/ ctx[13][/*item*/ ctx[24] * /*bytesPerLine*/ ctx[0] + /*i*/ ctx[25]]; - if (dirty[0] & /*dataBase*/ 4) glyph_changes.type = /*dataBase*/ ctx[2]; - if (dirty[0] & /*item, bytesPerLine*/ 16777217) glyph_changes.position = /*item*/ ctx[24] * /*bytesPerLine*/ ctx[0] + /*i*/ ctx[25]; - if (dirty[0] & /*mouseOverPosition, item, bytesPerLine*/ 16778241) glyph_changes.selected = +/*mouseOverPosition*/ ctx[10] === /*item*/ ctx[24] * /*bytesPerLine*/ ctx[0] + /*i*/ ctx[25]; - glyph.$set(glyph_changes); - }, - i(local) { - if (current) return; - transition_in(glyph.$$.fragment, local); - current = true; - }, - o(local) { - transition_out(glyph.$$.fragment, local); - current = false; - }, - d(detaching) { - destroy_component(glyph, detaching); - } - }; -} - -// (96:8) {#each range(0, bytesPerLine, 1) as i} -function create_each_block(ctx) { - let glyph; - let current; - - glyph = new Glyph({ - props: { - value: /*u8arr*/ ctx[13][/*item*/ ctx[24] * /*bytesPerLine*/ ctx[0] + /*i*/ ctx[25]], - type: 0, - position: /*item*/ ctx[24] * /*bytesPerLine*/ ctx[0] + /*i*/ ctx[25], - selected: +/*mouseOverPosition*/ ctx[10] === /*item*/ ctx[24] * /*bytesPerLine*/ ctx[0] + /*i*/ ctx[25] - } - }); - - return { - c() { - create_component(glyph.$$.fragment); - }, - m(target, anchor) { - mount_component(glyph, target, anchor); - current = true; - }, - p(ctx, dirty) { - const glyph_changes = {}; - if (dirty[0] & /*item, bytesPerLine*/ 16777217) glyph_changes.value = /*u8arr*/ ctx[13][/*item*/ ctx[24] * /*bytesPerLine*/ ctx[0] + /*i*/ ctx[25]]; - if (dirty[0] & /*item, bytesPerLine*/ 16777217) glyph_changes.position = /*item*/ ctx[24] * /*bytesPerLine*/ ctx[0] + /*i*/ ctx[25]; - if (dirty[0] & /*mouseOverPosition, item, bytesPerLine*/ 16778241) glyph_changes.selected = +/*mouseOverPosition*/ ctx[10] === /*item*/ ctx[24] * /*bytesPerLine*/ ctx[0] + /*i*/ ctx[25]; - glyph.$set(glyph_changes); - }, - i(local) { - if (current) return; - transition_in(glyph.$$.fragment, local); - current = true; - }, - o(local) { - transition_out(glyph.$$.fragment, local); - current = false; - }, - d(detaching) { - destroy_component(glyph, detaching); - } - }; -} - -// (76:2) -function create_default_slot(ctx) { - let div3; - let div0; - let glyph; - let t0; - let div1; - let t1; - let div2; - let current; - - glyph = new Glyph({ - props: { - value: /*item*/ ctx[24] * /*bytesPerLine*/ ctx[0], - type: /*offsetBase*/ ctx[1], - maxItems: /*items*/ ctx[11].length - } - }); - - let each_value_1 = range(0, /*bytesPerLine*/ ctx[0], 1); - let each_blocks_1 = []; - - for (let i = 0; i < each_value_1.length; i += 1) { - each_blocks_1[i] = create_each_block_1(get_each_context_1(ctx, each_value_1, i)); - } - - const out = i => transition_out(each_blocks_1[i], 1, 1, () => { - each_blocks_1[i] = null; - }); - - let each_value = range(0, /*bytesPerLine*/ ctx[0], 1); - let each_blocks = []; - - for (let i = 0; i < each_value.length; i += 1) { - each_blocks[i] = create_each_block(get_each_context(ctx, each_value, i)); - } - - const out_1 = i => transition_out(each_blocks[i], 1, 1, () => { - each_blocks[i] = null; - }); - - return { - c() { - div3 = element("div"); - div0 = element("div"); - create_component(glyph.$$.fragment); - t0 = space(); - div1 = element("div"); - - for (let i = 0; i < each_blocks_1.length; i += 1) { - each_blocks_1[i].c(); - } - - t1 = space(); - div2 = element("div"); - - for (let i = 0; i < each_blocks.length; i += 1) { - each_blocks[i].c(); - } - - attr(div0, "class", "hex-row-offset svelte-1qk31u8"); - set_style(div0, "--width", /*offsetWidth*/ ctx[14]); - attr(div1, "class", "hex-row-data svelte-1qk31u8"); - set_style(div1, "--width", /*dataWidth*/ ctx[15]); - attr(div2, "class", "hex-row-ascii svelte-1qk31u8"); - set_style(div2, "--width", /*dataWidth*/ ctx[15]); - attr(div3, "class", "hex-row svelte-1qk31u8"); - }, - m(target, anchor) { - insert(target, div3, anchor); - append(div3, div0); - mount_component(glyph, div0, null); - append(div3, t0); - append(div3, div1); - - for (let i = 0; i < each_blocks_1.length; i += 1) { - each_blocks_1[i].m(div1, null); - } - - append(div3, t1); - append(div3, div2); - - for (let i = 0; i < each_blocks.length; i += 1) { - each_blocks[i].m(div2, null); - } - - current = true; - }, - p(ctx, dirty) { - const glyph_changes = {}; - if (dirty[0] & /*item, bytesPerLine*/ 16777217) glyph_changes.value = /*item*/ ctx[24] * /*bytesPerLine*/ ctx[0]; - if (dirty[0] & /*offsetBase*/ 2) glyph_changes.type = /*offsetBase*/ ctx[1]; - if (dirty[0] & /*items*/ 2048) glyph_changes.maxItems = /*items*/ ctx[11].length; - glyph.$set(glyph_changes); - - if (dirty[0] & /*u8arr, item, bytesPerLine, dataBase, mouseOverPosition*/ 16786437) { - each_value_1 = range(0, /*bytesPerLine*/ ctx[0], 1); - let i; - - for (i = 0; i < each_value_1.length; i += 1) { - const child_ctx = get_each_context_1(ctx, each_value_1, i); - - if (each_blocks_1[i]) { - each_blocks_1[i].p(child_ctx, dirty); - transition_in(each_blocks_1[i], 1); - } else { - each_blocks_1[i] = create_each_block_1(child_ctx); - each_blocks_1[i].c(); - transition_in(each_blocks_1[i], 1); - each_blocks_1[i].m(div1, null); - } - } - - group_outros(); - - for (i = each_value_1.length; i < each_blocks_1.length; i += 1) { - out(i); - } - - check_outros(); - } - - if (dirty[0] & /*u8arr, item, bytesPerLine, mouseOverPosition*/ 16786433) { - each_value = range(0, /*bytesPerLine*/ ctx[0], 1); - let i; - - for (i = 0; i < each_value.length; i += 1) { - const child_ctx = get_each_context(ctx, each_value, i); - - if (each_blocks[i]) { - each_blocks[i].p(child_ctx, dirty); - transition_in(each_blocks[i], 1); - } else { - each_blocks[i] = create_each_block(child_ctx); - each_blocks[i].c(); - transition_in(each_blocks[i], 1); - each_blocks[i].m(div2, null); - } - } - - group_outros(); - - for (i = each_value.length; i < each_blocks.length; i += 1) { - out_1(i); - } - - check_outros(); - } - }, - i(local) { - if (current) return; - transition_in(glyph.$$.fragment, local); - - for (let i = 0; i < each_value_1.length; i += 1) { - transition_in(each_blocks_1[i]); - } - - for (let i = 0; i < each_value.length; i += 1) { - transition_in(each_blocks[i]); - } - - current = true; - }, - o(local) { - transition_out(glyph.$$.fragment, local); - each_blocks_1 = each_blocks_1.filter(Boolean); - - for (let i = 0; i < each_blocks_1.length; i += 1) { - transition_out(each_blocks_1[i]); - } - - each_blocks = each_blocks.filter(Boolean); - - for (let i = 0; i < each_blocks.length; i += 1) { - transition_out(each_blocks[i]); - } - - current = false; - }, - d(detaching) { - if (detaching) detach(div3); - destroy_component(glyph); - destroy_each(each_blocks_1, detaching); - destroy_each(each_blocks, detaching); - } - }; -} - -// (108:2) {#if showFooter} -function create_if_block(ctx) { - let footer; - let t0; - let glyph0; - let t1; - let glyph1; - let t2; - let glyph2; - let current; - - glyph0 = new Glyph({ - props: { - value: /*start*/ ctx[8] * /*bytesPerLine*/ ctx[0], - type: /*offsetBase*/ ctx[1], - maxItems: /*items*/ ctx[11].length - } - }); - - glyph1 = new Glyph({ - props: { - value: /*end*/ ctx[9] * /*bytesPerLine*/ ctx[0], - type: /*offsetBase*/ ctx[1], - maxItems: /*items*/ ctx[11].length - } - }); - - glyph2 = new Glyph({ - props: { - value: /*items*/ ctx[11].length * /*bytesPerLine*/ ctx[0], - type: /*offsetBase*/ ctx[1], - maxItems: /*items*/ ctx[11].length - } - }); - - return { - c() { - footer = element("footer"); - t0 = text("Showing\n "); - create_component(glyph0.$$.fragment); - t1 = text("\n -\n "); - create_component(glyph1.$$.fragment); - t2 = text("\n of\n "); - create_component(glyph2.$$.fragment); - attr(footer, "class", "svelte-1qk31u8"); - }, - m(target, anchor) { - insert(target, footer, anchor); - append(footer, t0); - mount_component(glyph0, footer, null); - append(footer, t1); - mount_component(glyph1, footer, null); - append(footer, t2); - mount_component(glyph2, footer, null); - current = true; - }, - p(ctx, dirty) { - const glyph0_changes = {}; - if (dirty[0] & /*start, bytesPerLine*/ 257) glyph0_changes.value = /*start*/ ctx[8] * /*bytesPerLine*/ ctx[0]; - if (dirty[0] & /*offsetBase*/ 2) glyph0_changes.type = /*offsetBase*/ ctx[1]; - if (dirty[0] & /*items*/ 2048) glyph0_changes.maxItems = /*items*/ ctx[11].length; - glyph0.$set(glyph0_changes); - const glyph1_changes = {}; - if (dirty[0] & /*end, bytesPerLine*/ 513) glyph1_changes.value = /*end*/ ctx[9] * /*bytesPerLine*/ ctx[0]; - if (dirty[0] & /*offsetBase*/ 2) glyph1_changes.type = /*offsetBase*/ ctx[1]; - if (dirty[0] & /*items*/ 2048) glyph1_changes.maxItems = /*items*/ ctx[11].length; - glyph1.$set(glyph1_changes); - const glyph2_changes = {}; - if (dirty[0] & /*items, bytesPerLine*/ 2049) glyph2_changes.value = /*items*/ ctx[11].length * /*bytesPerLine*/ ctx[0]; - if (dirty[0] & /*offsetBase*/ 2) glyph2_changes.type = /*offsetBase*/ ctx[1]; - if (dirty[0] & /*items*/ 2048) glyph2_changes.maxItems = /*items*/ ctx[11].length; - glyph2.$set(glyph2_changes); - }, - i(local) { - if (current) return; - transition_in(glyph0.$$.fragment, local); - transition_in(glyph1.$$.fragment, local); - transition_in(glyph2.$$.fragment, local); - current = true; - }, - o(local) { - transition_out(glyph0.$$.fragment, local); - transition_out(glyph1.$$.fragment, local); - transition_out(glyph2.$$.fragment, local); - current = false; - }, - d(detaching) { - if (detaching) detach(footer); - destroy_component(glyph0); - destroy_component(glyph1); - destroy_component(glyph2); - } - }; -} - -function create_fragment(ctx) { - let main; - let t0; - let virtuallist; - let updating_start; - let updating_end; - let t1; - let current; - let mounted; - let dispose; - let if_block0 = /*showHeader*/ ctx[4] && create_if_block_1(ctx); - - function virtuallist_start_binding(value) { - /*virtuallist_start_binding*/ ctx[22](value); - } - - function virtuallist_end_binding(value) { - /*virtuallist_end_binding*/ ctx[23](value); - } - - let virtuallist_props = { - items: /*items*/ ctx[11], - height: /*height*/ ctx[6], - $$slots: { - default: [ - create_default_slot, - ({ item }) => ({ 24: item }), - ({ item }) => [item ? 16777216 : 0] - ] - }, - $$scope: { ctx } - }; - - if (/*start*/ ctx[8] !== void 0) { - virtuallist_props.start = /*start*/ ctx[8]; - } - - if (/*end*/ ctx[9] !== void 0) { - virtuallist_props.end = /*end*/ ctx[9]; - } - - virtuallist = new VirtualList({ props: virtuallist_props }); - binding_callbacks.push(() => bind(virtuallist, "start", virtuallist_start_binding)); - binding_callbacks.push(() => bind(virtuallist, "end", virtuallist_end_binding)); - let if_block1 = /*showFooter*/ ctx[5] && create_if_block(ctx); - - return { - c() { - main = element("main"); - if (if_block0) if_block0.c(); - t0 = space(); - create_component(virtuallist.$$.fragment); - t1 = space(); - if (if_block1) if_block1.c(); - set_style(main, "--width", /*width*/ ctx[7]); - set_style(main, "--height", /*height*/ ctx[6]); - attr(main, "class", "svelte-1qk31u8"); - toggle_class(main, "readonly", /*readonly*/ ctx[3]); - }, - m(target, anchor) { - insert(target, main, anchor); - if (if_block0) if_block0.m(main, null); - append(main, t0); - mount_component(virtuallist, main, null); - append(main, t1); - if (if_block1) if_block1.m(main, null); - current = true; - - if (!mounted) { - dispose = [ - listen(main, "mouseover", /*handleMouseOver*/ ctx[16]), - listen(main, "mouseout", /*handleMouseOut*/ ctx[17]) - ]; - - mounted = true; - } - }, - p(ctx, dirty) { - if (/*showHeader*/ ctx[4]) { - if (if_block0) { - if_block0.p(ctx, dirty); - } else { - if_block0 = create_if_block_1(ctx); - if_block0.c(); - if_block0.m(main, t0); - } - } else if (if_block0) { - if_block0.d(1); - if_block0 = null; - } - - const virtuallist_changes = {}; - if (dirty[0] & /*items*/ 2048) virtuallist_changes.items = /*items*/ ctx[11]; - if (dirty[0] & /*height*/ 64) virtuallist_changes.height = /*height*/ ctx[6]; - - if (dirty[0] & /*bytesPerLine, item, mouseOverPosition, dataBase, offsetBase, items*/ 16780295 | dirty[1] & /*$$scope*/ 32) { - virtuallist_changes.$$scope = { dirty, ctx }; - } - - if (!updating_start && dirty[0] & /*start*/ 256) { - updating_start = true; - virtuallist_changes.start = /*start*/ ctx[8]; - add_flush_callback(() => updating_start = false); - } - - if (!updating_end && dirty[0] & /*end*/ 512) { - updating_end = true; - virtuallist_changes.end = /*end*/ ctx[9]; - add_flush_callback(() => updating_end = false); - } - - virtuallist.$set(virtuallist_changes); - - if (/*showFooter*/ ctx[5]) { - if (if_block1) { - if_block1.p(ctx, dirty); - - if (dirty[0] & /*showFooter*/ 32) { - transition_in(if_block1, 1); - } - } else { - if_block1 = create_if_block(ctx); - if_block1.c(); - transition_in(if_block1, 1); - if_block1.m(main, null); - } - } else if (if_block1) { - group_outros(); - - transition_out(if_block1, 1, 1, () => { - if_block1 = null; - }); - - check_outros(); - } - - if (!current || dirty[0] & /*width*/ 128) { - set_style(main, "--width", /*width*/ ctx[7]); - } - - if (!current || dirty[0] & /*height*/ 64) { - set_style(main, "--height", /*height*/ ctx[6]); - } - - if (dirty[0] & /*readonly*/ 8) { - toggle_class(main, "readonly", /*readonly*/ ctx[3]); - } - }, - i(local) { - if (current) return; - transition_in(virtuallist.$$.fragment, local); - transition_in(if_block1); - current = true; - }, - o(local) { - transition_out(virtuallist.$$.fragment, local); - transition_out(if_block1); - current = false; - }, - d(detaching) { - if (detaching) detach(main); - if (if_block0) if_block0.d(); - destroy_component(virtuallist); - if (if_block1) if_block1.d(); - mounted = false; - run_all(dispose); - } - }; -} - -function instance($$self, $$props, $$invalidate) { - let items; - let { data = new ArrayBuffer(0) } = $$props; - let { readonly = false } = $$props; - let { showHeader = true } = $$props; - let { showFooter = true } = $$props; - let { height = "auto" } = $$props; - let { width = "auto" } = $$props; - let { offsetBase = NumberBase.Hexadecimal } = $$props; - let { dataBase = NumberBase.Hexadecimal } = $$props; - let { bytesPerLine = 8 } = $$props; - let start = 0; - let end = 0; - const numberBases = enumKeys(NumberBase).map(item => NumberBase[item]); - let mouseOverPosition = undefined; - const u8arr = new Uint8Array(data); - const offsetWidth = numDigits(u8arr.length); - const dataWidth = bytesPerLine * numDigits(offsetBase); - - function handleMouseOver(event) { - const position = event.target.dataset.position; - - if (position !== undefined && position !== "undefined") { - $$invalidate(10, mouseOverPosition = position); - } - } - - function handleMouseOut(event) { - const position = event.target.dataset.position; - - if ($$invalidate(10, mouseOverPosition = position)) { - $$invalidate(10, mouseOverPosition = undefined); - } - } - - function select0_change_handler() { - offsetBase = select_value(this); - $$invalidate(1, offsetBase); - $$invalidate(12, numberBases); - } - - function select1_change_handler() { - dataBase = select_value(this); - $$invalidate(2, dataBase); - $$invalidate(12, numberBases); - } - - function select2_change_handler() { - bytesPerLine = select_value(this); - $$invalidate(0, bytesPerLine); - } - - function virtuallist_start_binding(value) { - start = value; - $$invalidate(8, start); - } - - function virtuallist_end_binding(value) { - end = value; - $$invalidate(9, end); - } - - $$self.$$set = $$props => { - if ("data" in $$props) $$invalidate(18, data = $$props.data); - if ("readonly" in $$props) $$invalidate(3, readonly = $$props.readonly); - if ("showHeader" in $$props) $$invalidate(4, showHeader = $$props.showHeader); - if ("showFooter" in $$props) $$invalidate(5, showFooter = $$props.showFooter); - if ("height" in $$props) $$invalidate(6, height = $$props.height); - if ("width" in $$props) $$invalidate(7, width = $$props.width); - if ("offsetBase" in $$props) $$invalidate(1, offsetBase = $$props.offsetBase); - if ("dataBase" in $$props) $$invalidate(2, dataBase = $$props.dataBase); - if ("bytesPerLine" in $$props) $$invalidate(0, bytesPerLine = $$props.bytesPerLine); - }; - - $$self.$$.update = () => { - if ($$self.$$.dirty[0] & /*bytesPerLine*/ 1) { - $$invalidate(11, items = [...Array(Math.max(4, Math.ceil(u8arr.length / bytesPerLine))).keys()]); - } - }; - - return [ - bytesPerLine, - offsetBase, - dataBase, - readonly, - showHeader, - showFooter, - height, - width, - start, - end, - mouseOverPosition, - items, - numberBases, - u8arr, - offsetWidth, - dataWidth, - handleMouseOver, - handleMouseOut, - data, - select0_change_handler, - select1_change_handler, - select2_change_handler, - virtuallist_start_binding, - virtuallist_end_binding - ]; -} - -class HexEditor extends SvelteComponent { - constructor(options) { - super(); - if (!document.getElementById("svelte-1qk31u8-style")) add_css(); - - init( - this, - options, - instance, - create_fragment, - safe_not_equal, - { - data: 18, - readonly: 3, - showHeader: 4, - showFooter: 5, - height: 6, - width: 7, - offsetBase: 1, - dataBase: 2, - bytesPerLine: 0 - }, - [-1, -1] - ); - } -} diff --git a/library/read_blocks/basic.py b/library/read_blocks/basic.py index 970f1cd..b55fe72 100644 --- a/library/read_blocks/basic.py +++ b/library/read_blocks/basic.py @@ -156,6 +156,9 @@ def estimate_packed_size(self, data, ctx: WriteContext = None): return len(data) def write(self, data, ctx: WriteContext = None, name: str = '') -> bytes: + # data comes as list from GUI app + if isinstance(data, list): + data = bytes(data) return data From 49171af930b1adaf6a45483fbd444bb3f86cc116 Mon Sep 17 00:00:00 2001 From: andy Date: Thu, 9 Jan 2025 23:31:57 +0200 Subject: [PATCH 14/36] fixed merge problems --- frontend/dist/gui/index.html | 2 +- ...a483b35508.js => main.03a91b653dd90918.js} | 2 +- frontend/dist/gui/main.7bd3d1f4f0e0326e.js | 1 - frontend/src/app/app.module.ts | 19 +++++-------------- .../app/components/editor/editor.component.ts | 3 +-- 5 files changed, 8 insertions(+), 19 deletions(-) rename frontend/dist/gui/{main.bfac01a483b35508.js => main.03a91b653dd90918.js} (82%) delete mode 100644 frontend/dist/gui/main.7bd3d1f4f0e0326e.js diff --git a/frontend/dist/gui/index.html b/frontend/dist/gui/index.html index 4ea0923..e67095f 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.bfac01a483b35508.js b/frontend/dist/gui/main.03a91b653dd90918.js similarity index 82% rename from frontend/dist/gui/main.bfac01a483b35508.js rename to frontend/dist/gui/main.03a91b653dd90918.js index b64e77b..0726be1 100644 --- a/frontend/dist/gui/main.bfac01a483b35508.js +++ b/frontend/dist/gui/main.03a91b653dd90918.js @@ -1 +1 @@ -(self.webpackChunkgui=self.webpackChunkgui||[]).push([[179],{360:(Bo,Gs,ps)=>{"use strict";function dn(i){return"function"==typeof i}function z(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 Br=z(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 Kr(i,t){if(i){const e=i.indexOf(t);0<=e&&i.splice(e,1)}}class Qt{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(dn(n))try{n()}catch(s){t=s instanceof Br?s.errors:[s]}const{_finalizers:r}=this;if(r){this._finalizers=null;for(const s of r)try{Ga(s)}catch(o){t=t??[],o instanceof Br?t=[...t,...o.errors]:t.push(o)}}if(t)throw new Br(t)}}add(t){var e;if(t&&t!==this)if(this.closed)Ga(t);else{if(t instanceof Qt){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)&&Kr(e,t)}remove(t){const{_finalizers:e}=this;e&&Kr(e,t),t instanceof Qt&&t._removeParent(this)}}Qt.EMPTY=(()=>{const i=new Qt;return i.closed=!0,i})();const Un=Qt.EMPTY;function Dl(i){return i instanceof Qt||i&&"closed"in i&&dn(i.remove)&&dn(i.add)&&dn(i.unsubscribe)}function Ga(i){dn(i)?i():i.unsubscribe()}const Ws={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 Si(i){Ci.setTimeout(()=>{const{onUnhandledError:t}=Ws;if(!t)throw i;t(i)})}function ms(){}const js=On("C",void 0,void 0);function On(i,t,e){return{kind:i,value:t,error:e}}let ur=null;function mc(i){if(Ws.useDeprecatedSynchronousErrorHandling){const t=!ur;if(t&&(ur={errorThrown:!1,error:null}),i(),t){const{errorThrown:e,error:n}=ur;if(ur=null,e)throw n}}else i()}class Tl extends Qt{constructor(t){super(),this.isStopped=!1,t?(this.destination=t,Dl(t)&&t.add(this)):this.destination=wE}static create(t,e,n){return new ha(t,e,n)}next(t){this.isStopped?Xg(function Uo(i){return On("N",i,void 0)}(t),this):this._next(t)}error(t){this.isStopped?Xg(function Ys(i){return On("E",void 0,i)}(t),this):(this.isStopped=!0,this._error(t))}complete(){this.isStopped?Xg(js,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 ua=Function.prototype.bind;function Il(i,t){return ua.call(i,t)}class Wa{constructor(t){this.partialObserver=t}next(t){const{partialObserver:e}=this;if(e.next)try{e.next(t)}catch(n){md(n)}}error(t){const{partialObserver:e}=this;if(e.error)try{e.error(t)}catch(n){md(n)}else md(t)}complete(){const{partialObserver:t}=this;if(t.complete)try{t.complete()}catch(e){md(e)}}}class ha extends Tl{constructor(t,e,n){let r;if(super(),dn(t)||!t)r={next:t??void 0,error:e??void 0,complete:n??void 0};else{let s;this&&Ws.useDeprecatedNextContext?(s=Object.create(t),s.unsubscribe=()=>this.unsubscribe(),r={next:t.next&&Il(t.next,s),error:t.error&&Il(t.error,s),complete:t.complete&&Il(t.complete,s)}):r=t}this.destination=new Wa(r)}}function md(i){Ws.useDeprecatedSynchronousErrorHandling?function da(i){Ws.useDeprecatedSynchronousErrorHandling&&ur&&(ur.errorThrown=!0,ur.error=i)}(i):Si(i)}function Xg(i,t){const{onStoppedNotification:e}=Ws;e&&Ci.setTimeout(()=>e(i,t))}const wE={closed:!0,next:ms,error:function xE(i){throw i},complete:ms},Kg="function"==typeof Symbol&&Symbol.observable||"@@observable";function ja(i){return i}function l0(i){return 0===i.length?ja:1===i.length?i[0]:function(e){return i.reduce((n,r)=>r(n),e)}}let In=(()=>{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 Tl||function CE(i){return i&&dn(i.next)&&dn(i.error)&&dn(i.complete)}(i)&&Dl(i)}(e)?e:new ha(e,n,r);return mc(()=>{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=Ya(n))((r,s)=>{const o=new ha({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)}[Kg](){return this}pipe(...e){return l0(e)(this)}toPromise(e){return new(e=Ya(e))((n,r)=>{let s;this.subscribe(o=>s=o,o=>r(o),()=>n(s))})}}return i.create=t=>new i(t),i})();function Ya(i){var t;return null!==(t=i??Ws.Promise)&&void 0!==t?t:Promise}const fa=z(i=>function(){i(this),this.name="ObjectUnsubscribedError",this.message="object unsubscribed"});let Te=(()=>{class i extends In{constructor(){super(),this.closed=!1,this.currentObservers=null,this.observers=[],this.isStopped=!1,this.hasError=!1,this.thrownError=null}lift(e){const n=new c0(this,this);return n.operator=e,n}_throwIfClosed(){if(this.closed)throw new fa}next(e){mc(()=>{if(this._throwIfClosed(),!this.isStopped){this.currentObservers||(this.currentObservers=Array.from(this.observers));for(const n of this.currentObservers)n.next(e)}})}error(e){mc(()=>{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(){mc(()=>{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?Un:(this.currentObservers=null,s.push(e),new Qt(()=>{this.currentObservers=null,Kr(s,e)}))}_checkFinalizedStatuses(e){const{hasError:n,thrownError:r,isStopped:s}=this;n?e.error(r):s&&e.complete()}asObservable(){const e=new In;return e.source=this,e}}return i.create=(t,e)=>new c0(t,e),i})();class c0 extends Te{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:Un}}function d0(i){return dn(i?.lift)}function ni(i){return t=>{if(d0(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 qn(i,t,e,n,r){return new SE(i,t,e,n,r)}class SE extends Tl{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 tt(i,t){return ni((e,n)=>{let r=0;e.subscribe(qn(n,s=>{n.next(i.call(t,s,r++))}))})}function pa(i){return this instanceof pa?(this.v=i,this):new pa(i)}function Bf(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 Zg(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 i_=i=>i&&"number"==typeof i.length&&"function"!=typeof i;function r_(i){return dn(i?.then)}function m0(i){return dn(i[Kg])}function g0(i){return Symbol.asyncIterator&&dn(i?.[Symbol.asyncIterator])}function _0(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 v0=function s_(){return"function"==typeof Symbol&&Symbol.iterator?Symbol.iterator:"@@iterator"}();function Uf(i){return dn(i?.[v0])}function y0(i){return function Nf(i,t,e){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var r,n=e.apply(i,t||[]),s=[];return r=Object.create(("function"==typeof AsyncIterator?AsyncIterator:Object).prototype),a("next"),a("throw"),a("return",function o(m){return function(g){return Promise.resolve(g).then(m,h)}}),r[Symbol.asyncIterator]=function(){return this},r;function a(m,g){n[m]&&(r[m]=function(b){return new Promise(function(v,y){s.push([m,b,v,y])>1||l(m,b)})},g&&(r[m]=g(r[m])))}function l(m,g){try{!function c(m){m.value instanceof pa?Promise.resolve(m.value.v).then(d,h):p(s[0][2],m)}(n[m](g))}catch(b){p(s[0][3],b)}}function d(m){l("next",m)}function h(m){l("throw",m)}function p(m,g){m(g),s.shift(),s.length&&l(s[0][0],s[0][1])}}(this,arguments,function*(){const e=i.getReader();try{for(;;){const{value:n,done:r}=yield pa(e.read());if(r)return yield pa(void 0);yield yield pa(n)}}finally{e.releaseLock()}})}function b0(i){return dn(i?.getReader)}function Mr(i){if(i instanceof In)return i;if(null!=i){if(m0(i))return function FE(i){return new In(t=>{const e=i[Kg]();if(dn(e.subscribe))return e.subscribe(t);throw new TypeError("Provided object does not correctly implement Symbol.observable")})}(i);if(i_(i))return function LE(i){return new In(t=>{for(let e=0;e{i.then(e=>{t.closed||(t.next(e),t.complete())},e=>t.error(e)).then(null,Si)})}(i);if(g0(i))return x0(i);if(Uf(i))return function BE(i){return new In(t=>{for(const e of i)if(t.next(e),t.closed)return;t.complete()})}(i);if(b0(i))return function w0(i){return x0(y0(i))}(i)}throw _0(i)}function x0(i){return new In(t=>{(function UE(i,t){var e,n,r,s;return function _d(i,t,e,n){return new(e||(e=Promise))(function(s,o){function a(d){try{c(n.next(d))}catch(h){o(h)}}function l(d){try{c(n.throw(d))}catch(h){o(h)}}function c(d){d.done?s(d.value):function r(s){return s instanceof e?s:new e(function(o){o(s)})}(d.value).then(a,l)}c((n=n.apply(i,t||[])).next())})}(this,void 0,void 0,function*(){try{for(e=Bf(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 Xa(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 rr(i,t,e=1/0){return dn(t)?rr((n,r)=>tt((s,o)=>t(n,s,r,o))(Mr(i(n,r))),e):("number"==typeof t&&(e=t),ni((n,r)=>function VE(i,t,e,n,r,s,o,a){const l=[];let c=0,d=0,h=!1;const p=()=>{h&&!l.length&&!c&&t.complete()},m=b=>c{s&&t.next(b),c++;let v=!1;Mr(e(b,d++)).subscribe(qn(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(qn(t,m,()=>{h=!0,p()})),()=>{a?.()}}(n,r,i,e)))}function bd(i=1/0){return rr(ja,i)}const _o=new In(i=>i.complete());function $u(i){return i&&dn(i.schedule)}function a_(i){return i[i.length-1]}function M0(i){return dn(a_(i))?i.pop():void 0}function Gu(i){return $u(a_(i))?i.pop():void 0}function l_(i,t=0){return ni((e,n)=>{e.subscribe(qn(n,r=>Xa(n,i,()=>n.next(r),t),()=>Xa(n,i,()=>n.complete(),t),r=>Xa(n,i,()=>n.error(r),t)))})}function c_(i,t=0){return ni((e,n)=>{n.add(i.schedule(()=>e.subscribe(n),t))})}function d_(i,t){if(!i)throw new Error("Iterable cannot be null");return new In(e=>{Xa(e,t,()=>{const n=i[Symbol.asyncIterator]();Xa(e,t,()=>{n.next().then(r=>{r.done?e.complete():e.next(r.value)})},0,!0)})})}function Ni(i,t){return t?function E0(i,t){if(null!=i){if(m0(i))return function HE(i,t){return Mr(i).pipe(c_(t),l_(t))}(i,t);if(i_(i))return function GE(i,t){return new In(e=>{let n=0;return t.schedule(function(){n===i.length?e.complete():(e.next(i[n++]),e.closed||this.schedule())})})}(i,t);if(r_(i))return function $E(i,t){return Mr(i).pipe(c_(t),l_(t))}(i,t);if(g0(i))return d_(i,t);if(Uf(i))return function WE(i,t){return new In(e=>{let n;return Xa(e,t,()=>{n=i[v0](),Xa(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)}),()=>dn(n?.return)&&n.return()})}(i,t);if(b0(i))return function S0(i,t){return d_(y0(i),t)}(i,t)}throw _0(i)}(i,t):Mr(i)}function Cr(...i){const t=Gu(i),e=function C0(i,t){return"number"==typeof a_(i)?i.pop():t}(i,1/0),n=i;return n.length?1===n.length?Mr(n[0]):bd(e)(Ni(n,t)):_o}function Vf(i={}){const{connector:t=(()=>new Te),resetOnError:e=!0,resetOnComplete:n=!0,resetOnRefCountZero:r=!0}=i;return s=>{let o,a,l,c=0,d=!1,h=!1;const p=()=>{a?.unsubscribe(),a=void 0},m=()=>{p(),o=l=void 0,d=h=!1},g=()=>{const b=o;m(),b?.unsubscribe()};return ni((b,v)=>{c++,!h&&!d&&p();const y=l=l??t();v.add(()=>{c--,0===c&&!h&&!d&&(a=xd(g,r))}),y.subscribe(v),!o&&c>0&&(o=new ha({next:M=>y.next(M),error:M=>{h=!0,p(),a=xd(m,e,M),y.error(M)},complete:()=>{d=!0,p(),a=xd(m,n),y.complete()}}),Mr(b).subscribe(o))})(s)}}function xd(i,t,...e){if(!0===t)return void i();if(!1===t)return;const n=new ha({next:()=>{n.unsubscribe(),i()}});return Mr(t(...e)).subscribe(n)}function ci(i){for(let t in i)if(i[t]===ci)return t;throw Error("Could not find renamed property on target object.")}function u_(i,t){for(const e in t)t.hasOwnProperty(e)&&!i.hasOwnProperty(e)&&(i[e]=t[e])}function mi(i){if("string"==typeof i)return i;if(Array.isArray(i))return"["+i.map(mi).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 zf(i,t){return null==i||""===i?null===t?"":t:null==t||""===t?i:i+" "+t}const h_=ci({__forward_ref__:ci});function Gn(i){return i.__forward_ref__=Gn,i.toString=function(){return mi(this())},i}function Ot(i){return Wu(i)?i():i}function Wu(i){return"function"==typeof i&&i.hasOwnProperty(h_)&&i.__forward_ref__===Gn}function ju(i){return i&&!!i.\u0275providers}const qu="https://g.co/ng/security#xss";class pe extends Error{constructor(t,e){super(Hf(t,e)),this.code=t}}function Hf(i,t){return`NG0${Math.abs(i)}${t?": "+t.trim():""}`}function Jt(i){return"string"==typeof i?i:null==i?"":String(i)}function $f(i,t){throw new pe(-201,!1)}function En(i,t){null==i&&function ii(i,t,e,n){throw new Error(`ASSERTION ERROR: ${i}`+(null==n?"":` [Expected=> ${e} ${n} ${t} <=Actual]`))}(t,i,null,"!=")}function Pe(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 f_(i,wd)||f_(i,m_)}function f_(i,t){return i.hasOwnProperty(t)?i[t]:null}function p_(i){return i&&(i.hasOwnProperty(gs)||i.hasOwnProperty(T0))?i[gs]:null}const wd=ci({\u0275prov:ci}),gs=ci({\u0275inj:ci}),m_=ci({ngInjectableDef:ci}),T0=ci({ngInjectorDef:ci});var Ft=(()=>((Ft=Ft||{})[Ft.Default=0]="Default",Ft[Ft.Host=1]="Host",Ft[Ft.Self=2]="Self",Ft[Ft.SkipSelf=4]="SkipSelf",Ft[Ft.Optional=8]="Optional",Ft))();let Wf;function Xs(i){const t=Wf;return Wf=i,t}function _s(i,t,e){const n=Gf(i);return n&&"root"==n.providedIn?void 0===n.value?n.value=n.factory():n.value:e&Ft.Optional?null:void 0!==t?t:void $f(mi(i))}const Rn=(()=>typeof globalThis<"u"&&globalThis||typeof global<"u"&&global||typeof window<"u"&&window||typeof self<"u"&&typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&self)(),kl={},Ku="__NG_DI_FLAG__",gi="ngTempTokenPath",Pl="ngTokenPath",g_=/\n/gm,JE="\u0275",jf="__source";let Zu;function Md(i){const t=Zu;return Zu=i,t}function eA(i,t=Ft.Default){if(void 0===Zu)throw new pe(-203,!1);return null===Zu?_s(i,void 0,t):Zu.get(i,t&Ft.Optional?null:void 0,t)}function ee(i,t=Ft.Default){return(function I0(){return Wf}()||eA)(Ot(i),t)}function Lt(i,t=Ft.Default){return ee(i,Yf(t))}function Yf(i){return typeof i>"u"||"number"==typeof i?i:0|(i.optional&&8)|(i.host&&1)|(i.self&&2)|(i.skipSelf&&4)}function qf(i){const t=[];for(let e=0;e((vo=vo||{})[vo.OnPush=0]="OnPush",vo[vo.Default=1]="Default",vo))(),Ks=(()=>{return(i=Ks||(Ks={}))[i.Emulated=0]="Emulated",i[i.None=2]="None",i[i.ShadowDom=3]="ShadowDom",Ks;var i})();const Za={},Wn=[],Ur=ci({\u0275cmp:ci}),Ju=ci({\u0275dir:ci}),yc=ci({\u0275pipe:ci}),y_=ci({\u0275mod:ci}),ma=ci({\u0275fac:ci}),eh=ci({__NG_ELEMENT_ID__:ci});let tA=0;function ot(i){return Ka(()=>{const t=yo(i),e={...t,decls:i.decls,vars:i.vars,template:i.template,consts:i.consts||null,ngContentSelectors:i.ngContentSelectors,onPush:i.changeDetection===vo.OnPush,directiveDefs:null,pipeDefs:null,dependencies:t.standalone&&i.dependencies||null,getStandaloneInjector:null,data:i.data||{},encapsulation:i.encapsulation||Ks.Emulated,id:"c"+tA++,styles:i.styles||Wn,_:null,schemas:i.schemas||null,tView:null};b_(e);const n=i.dependencies;return e.directiveDefs=Kf(n,!1),e.pipeDefs=Kf(n,!0),e})}function th(i,t,e){const n=i.\u0275cmp;n.directiveDefs=Kf(t,!1),n.pipeDefs=Kf(e,!0)}function nA(i){return Hn(i)||Vr(i)}function Sd(i){return null!==i}function en(i){return Ka(()=>({type:i.type,bootstrap:i.bootstrap||Wn,declarations:i.declarations||Wn,imports:i.imports||Wn,exports:i.exports||Wn,transitiveCompileScopes:null,schemas:i.schemas||null,id:i.id||null}))}function Xf(i,t){if(null==i)return Za;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 ve(i){return Ka(()=>{const t=yo(i);return b_(t),t})}function $i(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 Hn(i){return i[Ur]||null}function Vr(i){return i[Ju]||null}function vs(i){return i[yc]||null}function hr(i,t){const e=i[y_]||null;if(!e&&!0===t)throw new Error(`Type ${mi(i)} does not have '\u0275mod' property.`);return e}function yo(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||Wn,viewQuery:i.viewQuery||null,features:i.features||null,setInput:null,findHostDirectiveDefs:null,hostDirectives:null,inputs:Xf(i.inputs,t),outputs:Xf(i.outputs)}}function b_(i){i.features?.forEach(t=>t(i))}function Kf(i,t){if(!i)return null;const e=t?vs:nA;return()=>("function"==typeof i?i():i).map(n=>e(n)).filter(Sd)}const Qa=0,lt=1,fn=2,Bi=3,ys=4,X=5,he=6,ae=7,ze=8,jt=9,Vn=10,xt=11,ai=12,bc=13,k0=14,Er=15,sr=16,nh=17,Ho=18,Zs=19,Ol=20,ri=21,bi=22,Ad=1,P0=2,Zf=7,Qf=8,Ja=9,Ui=10;function bs(i){return Array.isArray(i)&&"object"==typeof i[Ad]}function xs(i){return Array.isArray(i)&&!0===i[Ad]}function Jf(i){return 0!=(4&i.flags)}function Dd(i){return i.componentOffset>-1}function xc(i){return 1==(1&i.flags)}function bo(i){return!!i.template}function ih(i){return 0!=(256&i[fn])}function el(i,t){return i.hasOwnProperty(ma)?i[ma]:null}class Id{constructor(t,e,n){this.previousValue=t,this.currentValue=e,this.firstChange=n}isFirstChange(){return this.firstChange}}function xi(){return Rd}function Rd(i){return i.type.prototype.ngOnChanges&&(i.setInput=kd),np}function np(){const i=B0(this),t=i?.current;if(t){const e=i.previous;if(e===Za)i.previous=t;else for(let n in t)e[n]=t[n];i.current=null,this.ngOnChanges(t)}}function kd(i,t,e,n){const r=this.declaredInputs[e],s=B0(i)||function aA(i,t){return i[N0]=t}(i,{previous:Za,current:null}),o=s.current||(s.current={}),a=s.previous,l=a[r];o[r]=new Id(l&&l.currentValue,t,a===Za),i[n]=t}xi.ngInherit=!0;const N0="__ngSimpleChanges__";function B0(i){return i[N0]||null}const Qr=function(i,t,e){},Pd="svg";function I(i){for(;Array.isArray(i);)i=i[Qa];return i}function wc(i,t){return I(t[i])}function Ai(i,t){return I(t[i.index])}function U0(i,t){return i.data[t]}function Fd(i,t){return i[t]}function ws(i,t){const e=t[i];return bs(e)?e:e[Qa]}function ip(i){return 64==(64&i[fn])}function Fl(i,t){return null==t?null:i[t]}function V0(i){i[Ho]=0}function A_(i,t){i[X]+=t;let e=i,n=i[Bi];for(;null!==n&&(1===t&&1===e[X]||-1===t&&0===e[X]);)n[X]+=t,e=n,n=n[Bi]}const Pt={lFrame:nl(null),bindingsEnabled:!0};function ga(){return Pt.bindingsEnabled}function Se(){return Pt.lFrame.lView}function zn(){return Pt.lFrame.tView}function Vt(i){return Pt.lFrame.contextLView=i,i[ze]}function Et(i){return Pt.lFrame.contextLView=null,i}function Ar(){let i=H0();for(;null!==i&&64===i.type;)i=i.parent;return i}function H0(){return Pt.lFrame.currentTNode}function _a(i,t){const e=Pt.lFrame;e.currentTNode=i,e.isParent=t}function D_(){return Pt.lFrame.isParent}function T_(){Pt.lFrame.isParent=!1}function zr(){const i=Pt.lFrame;let t=i.bindingRootIndex;return-1===t&&(t=i.bindingRootIndex=i.tView.bindingStartIndex),t}function Ll(){return Pt.lFrame.bindingIndex++}function Qs(i){const t=Pt.lFrame,e=t.bindingIndex;return t.bindingIndex=t.bindingIndex+i,e}function W0(i,t){const e=Pt.lFrame;e.bindingIndex=e.bindingRootIndex=i,$o(t)}function $o(i){Pt.lFrame.currentDirectiveIndex=i}function rh(i){const t=Pt.lFrame.currentDirectiveIndex;return-1===t?null:i[t]}function Nl(){return Pt.lFrame.currentQueryIndex}function Ms(i){Pt.lFrame.currentQueryIndex=i}function _A(i){const t=i[lt];return 2===t.type?t.declTNode:1===t.type?i[he]:null}function R_(i,t,e){if(e&Ft.SkipSelf){let r=t,s=i;for(;!(r=r.parent,null!==r||e&Ft.Host||(r=_A(s),null===r||(s=s[Er],10&r.type))););if(null===r)return!1;t=r,i=s}const n=Pt.lFrame=Ld();return n.currentTNode=t,n.lView=i,!0}function sp(i){const t=Ld(),e=i[lt];Pt.lFrame=t,t.currentTNode=e.firstChild,t.lView=i,t.tView=e,t.contextLView=i,t.bindingIndex=e.bindingStartIndex,t.inI18n=!1}function Ld(){const i=Pt.lFrame,t=null===i?null:i.child;return null===t?nl(i):t}function nl(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 k_(){const i=Pt.lFrame;return Pt.lFrame=i.parent,i.currentTNode=null,i.lView=null,i}const j0=k_;function Nd(){const i=k_();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 Kn(){return Pt.lFrame.selectedIndex}function il(i){Pt.lFrame.selectedIndex=i}function Di(){const i=Pt.lFrame;return U0(i.tView,i.selectedIndex)}function ki(){Pt.lFrame.currentNamespace=Pd}function va(){!function Cc(){Pt.lFrame.currentNamespace=null}()}function Bd(i,t){for(let e=t.directiveStart,n=t.directiveEnd;e=n)break}else t[l]<0&&(i[Ho]+=65536),(a>11>16&&(3&i[fn])===t){i[fn]+=2048,Qr(4,a,s);try{s.call(a)}finally{Qr(5,a,s)}}}else{Qr(4,a,s);try{s.call(a)}finally{Qr(5,a,s)}}}const ya=-1;class Ud{constructor(t,e,n){this.factory=t,this.resolving=!1,this.canSeeViewProviders=e,this.injectImpl=n}}function L_(i,t,e){let n=0;for(;nt){o=s-1;break}}}for(;s>16}(i),n=t;for(;e>0;)n=n[Er],e--;return n}let Vd=!0;function dp(i){const t=Vd;return Vd=i,t}const B_=255,Q0=5;let J0=0;const ba={};function ah(i,t){const e=ex(i,t);if(-1!==e)return e;const n=t[lt];n.firstCreatePass&&(i.injectorIndex=t.length,lh(n.data,i),lh(t,null),lh(n.blueprint,null));const r=ch(i,t),s=i.injectorIndex;if(cp(r)){const o=sh(r),a=oh(r,t),l=a[lt].data;for(let c=0;c<8;c++)t[s+c]=a[o+c]|l[o+c]}return t[s+8]=r,s}function lh(i,t){i.push(0,0,0,0,0,0,0,0,t)}function ex(i,t){return-1===i.injectorIndex||i.parent&&i.parent.injectorIndex===i.injectorIndex||null===t[i.injectorIndex+8]?-1:i.injectorIndex}function ch(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=uh(r),null===n)return ya;if(e++,r=r[Er],-1!==n.injectorIndex)return n.injectorIndex|e<<16}return ya}function pn(i,t,e){!function U_(i,t,e){let n;"string"==typeof e?n=e.charCodeAt(0)||0:e.hasOwnProperty(eh)&&(n=e[eh]),null==n&&(n=e[eh]=J0++);const r=n&B_;t.data[i+(r>>Q0)]|=1<=0?t&B_:Js:t}(e);if("function"==typeof s){if(!R_(t,i,n))return n&Ft.Host?tx(r,0,n):zd(t,e,n,r);try{const o=s(n);if(null!=o||n&Ft.Optional)return o;$f()}finally{j0()}}else if("number"==typeof s){let o=null,a=ex(i,t),l=ya,c=n&Ft.Host?t[sr][he]:null;for((-1===a||n&Ft.SkipSelf)&&(l=-1===a?ch(i,t):t[a+8],l!==ya&&z_(n,!1)?(o=t[lt],a=sh(l),t=oh(l,t)):a=-1);-1!==a;){const d=t[lt];if(hp(s,a,d.data)){const h=SA(a,t,e,o,n,c);if(h!==ba)return h}l=t[a+8],l!==ya&&z_(n,t[lt].data[a+8]===c)&&hp(s,a,t)?(o=d,a=sh(l),t=oh(l,t)):a=-1}}return r}function SA(i,t,e,n,r,s){const o=t[lt],a=o.data[i+8],d=ts(a,o,e,null==n?Dd(a)&&Vd:n!=o&&0!=(3&a.type),r&Ft.Host&&s===a);return null!==d?Ac(t,o,d,a):ba}function ts(i,t,e,n,r){const s=i.providerIndexes,o=t.data,a=1048575&s,l=i.directiveStart,d=s>>20,p=r?a+d:i.directiveEnd;for(let m=n?a:a+d;m=l&&g.type===e)return m}if(r){const m=o[l];if(m&&bo(m)&&m.type===e)return l}return null}function Ac(i,t,e,n){let r=i[e];const s=t.data;if(function bA(i){return i instanceof Ud}(r)){const o=r;o.resolving&&function A0(i,t){const e=t?`. Dependency path: ${t.join(" > ")} > ${i}`:"";throw new pe(-200,`Circular dependency in DI detected for ${i}${e}`)}(function Xn(i){return"function"==typeof i?i.name||i.toString():"object"==typeof i&&null!=i&&"function"==typeof i.type?i.type.name||i.type.toString():Jt(i)}(s[e]));const a=dp(o.canSeeViewProviders);o.resolving=!0;const l=o.injectImpl?Xs(o.injectImpl):null;R_(i,n,Ft.Default);try{r=i[e]=o.factory(void 0,s,i,n),t.firstCreatePass&&e>=n.directiveStart&&function es(i,t,e){const{ngOnChanges:n,ngOnInit:r,ngDoCheck:s}=t.type.prototype;if(n){const o=Rd(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&&Xs(l),dp(a),o.resolving=!1,j0()}}return r}function hp(i,t,e){return!!(e[t+(i>>Q0)]&1<{const t=i.prototype.constructor,e=t[ma]||dh(t),n=Object.prototype;let r=Object.getPrototypeOf(i.prototype).constructor;for(;r&&r!==n;){const s=r[ma]||dh(r);if(s&&s!==e)return s;r=Object.getPrototypeOf(r)}return s=>new s})}function dh(i){return Wu(i)?()=>{const t=dh(Ot(i));return t&&t()}:el(i)}function uh(i){const t=i[lt],e=t.type;return 2===e?t.declTNode:1===e?i[he]:null}function xa(i){return function CA(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 wa(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,d){const h=l.hasOwnProperty(Tc)?l[Tc]:Object.defineProperty(l,Tc,{value:[]})[Tc];for(;h.length<=d;)h.push(null);return(h[d]=h[d]||[]).push(o),l}}return e&&(r.prototype=Object.create(e.prototype)),r.prototype.ngMetadataName=i,r.annotationCls=r,r})}class me{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=Pe({token:this,providedIn:e.providedIn||"root",factory:e.factory}))}get multi(){return this}toString(){return`InjectionToken ${this._desc}`}}function Vl(i,t){i.forEach(e=>Array.isArray(e)?Vl(e,t):t(e))}function $_(i,t,e){t>=i.length?i.push(e):i.splice(t,0,e)}function mp(i,t){return t>=i.length-1?i.pop():i.splice(t,1)[0]}function Gd(i,t){const e=[];for(let n=0;n=0?i[1|n]=e:(n=~n,function TA(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 jd(i,t){const e=Rc(i,t);if(e>=0)return i[1|e]}function Rc(i,t){return function _p(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),Ss=Cd(Hd("Optional"),8),Ma=Cd(Hd("SkipSelf"),4);var Es=(()=>((Es=Es||{})[Es.Important=1]="Important",Es[Es.DashCase=2]="DashCase",Es))();const Sp=new Map;let yx=0;const iv="__ngContext__";function $r(i,t){bs(t)?(i[iv]=t[Ol],function bx(i){Sp.set(i[Ol],i)}(t)):i[iv]=t}let sv;function ov(i,t){return sv(i,t)}function vh(i){const t=i[Bi];return xs(t)?t[Bi]:t}function av(i){return Tx(i[bc])}function lv(i){return Tx(i[ys])}function Tx(i){for(;null!==i&&!xs(i);)i=i[ys];return i}function Ir(i,t,e,n,r){if(null!=n){let s,o=!1;xs(n)?s=n:bs(n)&&(o=!0,n=n[Qa]);const a=I(n);0===i&&null!==e?null==r?Fx(t,e,a):Oc(t,e,a,r||null,!0):1===i&&null!==e?Oc(t,e,a,r||null,!0):2===i?function mv(i,t,e){const n=Dp(i,t);n&&function ZA(i,t,e,n){i.removeChild(t,e,n)}(i,n,t,e)}(t,a,o):3===i&&t.destroyNode(a),null!=s&&function Hx(i,t,e,n,r){const s=e[Zf];s!==I(e)&&Ir(t,i,n,s,r);for(let a=Ui;a0&&(i[e-1][ys]=n[ys]);const s=mp(i,Ui+t);!function GA(i,t){bh(i,t,t[xt],2,null,null),t[Qa]=null,t[he]=null}(n[lt],n);const o=s[Zs];null!==o&&o.detachView(s[lt]),n[Bi]=null,n[ys]=null,n[fn]&=-65}return n}function kx(i,t){if(!(128&t[fn])){const e=t[xt];e.destroyNode&&bh(i,t,e,3,null,null),function YA(i){let t=i[bc];if(!t)return hv(i[lt],i);for(;t;){let e=null;if(bs(t))e=t[bc];else{const n=t[Ui];n&&(e=n)}if(!e){for(;t&&!t[ys]&&t!==i;)bs(t)&&hv(t[lt],t),t=t[Bi];null===t&&(t=i),bs(t)&&hv(t[lt],t),e=t&&t[ys]}t=e}}(t)}}function hv(i,t){if(!(128&t[fn])){t[fn]&=-65,t[fn]|=128,function KA(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===Ks.None||s===Ks.Emulated)return null}return Ai(n,e)}}(i,t.parent,e)}function Oc(i,t,e,n,r){i.insertBefore(t,e,n,r)}function Fx(i,t,e){i.appendChild(t,e)}function Lx(i,t,e,n,r){null!==n?Oc(i,t,e,n,r):Fx(i,t,e)}function Dp(i,t){return i.parentNode(t)}function Nx(i,t,e){return Ux(i,t,e)}let fv,kp,vv,Ux=function Bx(i,t,e){return 40&i.type?Ai(i,e):null};function yh(i,t,e,n){const r=Px(i,n,t),s=t[xt],a=Nx(n.parent||t[he],n,t);if(null!=r)if(Array.isArray(e))for(let l=0;li,createScript:i=>i,createScriptURL:i=>i})}catch{}return kp}()?.createHTML(i)||i}class zl{constructor(t){this.changingThisBreaksApplicationSecurity=t}toString(){return`SafeValue must use [property]=binding: ${this.changingThisBreaksApplicationSecurity} (see ${qu})`}}class o1 extends zl{getTypeName(){return"HTML"}}class a1 extends zl{getTypeName(){return"Style"}}class l1 extends zl{getTypeName(){return"Script"}}class c1 extends zl{getTypeName(){return"URL"}}class Op extends zl{getTypeName(){return"ResourceURL"}}function to(i){return i instanceof zl?i.changingThisBreaksApplicationSecurity:i}function Sa(i,t){const e=function d1(i){return i instanceof zl&&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 ${qu})`)}return e===t}class g1{constructor(t){this.inertDocumentHelper=t}getInertBodyElement(t){t=""+t;try{const e=(new window.DOMParser).parseFromString(Yd(t),"text/html").body;return null===e?this.inertDocumentHelper.getInertBodyElement(t):(e.removeChild(e.firstChild),e)}catch{return null}}}class _1{constructor(t){this.defaultDoc=t,this.inertDocument=this.defaultDoc.implementation.createHTMLDocument("sanitization-inert")}getInertBodyElement(t){const e=this.inertDocument.createElement("template");return e.innerHTML=Yd(t),e}}const v1=/^(?!javascript:)(?:[a-z0-9+.-]+:|[^&:\/?#]*(?:[\/?#]|$))/i;function xh(i){return(i=String(i)).match(v1)?i:"unsafe:"+i}function Ea(i){const t={};for(const e of i.split(","))t[e]=!0;return t}function Fc(...i){const t={};for(const e of i)for(const n in e)e.hasOwnProperty(n)&&(t[n]=!0);return t}const xv=Ea("area,br,col,hr,img,wbr"),wv=Ea("colgroup,dd,dt,li,p,tbody,td,tfoot,th,thead,tr"),Mv=Ea("rp,rt"),Cv=Fc(xv,Fc(wv,Ea("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")),Fc(Mv,Ea("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")),Fc(Mv,wv)),qd=Ea("background,cite,href,itemtype,longdesc,poster,src,xlink:href"),Xx=Fc(qd,Ea("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"),Ea("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")),Ev=Ea("script,style,template");class Kx{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(!Cv.hasOwnProperty(e))return this.sanitizedSomething=!0,!Ev.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();Cv.hasOwnProperty(e)&&!xv.hasOwnProperty(e)&&(this.buf.push(""))}chars(t){this.buf.push(Zx(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 b1=/[\uD800-\uDBFF][\uDC00-\uDFFF]/g,x1=/([^\#-~ |!])/g;function Zx(i){return i.replace(/&/g,"&").replace(b1,function(t){return"&#"+(1024*(t.charCodeAt(0)-55296)+(t.charCodeAt(1)-56320)+65536)+";"}).replace(x1,function(t){return"&#"+t.charCodeAt(0)+";"}).replace(//g,">")}let Lp;function Qx(i,t){let e=null;try{Lp=Lp||function qx(i){const t=new _1(i);return function Fp(){try{return!!(new window.DOMParser).parseFromString(Yd(""),"text/html")}catch{return!1}}()?new g1(t):t}(i);let n=t?String(t):"";e=Lp.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=Lp.getInertBodyElement(n)}while(n!==s);return Yd((new Kx).sanitizeChildren(Av(e)||e))}finally{if(e){const n=Av(e)||e;for(;n.firstChild;)n.removeChild(n.firstChild)}}}function Av(i){return"content"in i&&function w1(i){return i.nodeType===Node.ELEMENT_NODE&&"TEMPLATE"===i.nodeName}(i)?i.content:null}var Zn=(()=>((Zn=Zn||{})[Zn.NONE=0]="NONE",Zn[Zn.HTML=1]="HTML",Zn[Zn.STYLE=2]="STYLE",Zn[Zn.SCRIPT=3]="SCRIPT",Zn[Zn.URL=4]="URL",Zn[Zn.RESOURCE_URL=5]="RESOURCE_URL",Zn))();function Np(i){const t=function wi(){const i=Se();return i&&i[ai]}();return t?t.sanitize(Zn.URL,i)||"":Sa(i,"URL")?to(i):xh(Jt(i))}const Bp=new me("ENVIRONMENT_INITIALIZER"),ol=new me("INJECTOR",-1),ew=new me("INJECTOR_DEF_TYPES");class tw{get(t,e=kl){if(e===kl){const n=new Error(`NullInjectorError: No provider for ${mi(t)}!`);throw n.name="NullInjectorError",n}return e}}function A1(...i){return{\u0275providers:nw(0,i),\u0275fromNgModule:!0}}function nw(i,...t){const e=[],n=new Set;let r;return Vl(t,s=>{const o=s;Dv(o,e,[],n)&&(r||(r=[]),r.push(o))}),void 0!==r&&Up(r,e),e}function Up(i,t){for(let e=0;e{t.push(s)})}}function Dv(i,t,e,n){if(!(i=Ot(i)))return!1;let r=null,s=p_(i);const o=!s&&Hn(i);if(s||o){if(o&&!o.standalone)return!1;r=i}else{const l=i.ngModule;if(s=p_(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)Dv(c,t,e,n)}}else{if(!s)return!1;{if(null!=s.imports&&!a){let c;n.add(r);try{Vl(s.imports,d=>{Dv(d,t,e,n)&&(c||(c=[]),c.push(d))})}finally{}void 0!==c&&Up(c,t)}if(!a){const c=el(r)||(()=>new r);t.push({provide:r,useFactory:c,deps:Wn},{provide:ew,useValue:r,multi:!0},{provide:Bp,useValue:()=>ee(r),multi:!0})}const l=s.providers;null==l||a||Vp(l,d=>{t.push(d)})}}return r!==i&&void 0!==i.providers}function Vp(i,t){for(let e of i)ju(e)&&(e=e.\u0275providers),Array.isArray(e)?Vp(e,t):t(e)}const zp=ci({provide:String,useValue:ci});function Mi(i){return null!==i&&"object"==typeof i&&zp in i}function Nc(i){return"function"==typeof i}const Iv=new me("Set Injector scope."),Hp={},T1={};let Rv;function wh(){return void 0===Rv&&(Rv=new tw),Rv}class io{}class $p extends io{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,Pv(t,o=>this.processProvider(o)),this.records.set(ol,jo(void 0,this)),r.has("environment")&&this.records.set(io,jo(void 0,this));const s=this.records.get(Iv);null!=s&&"string"==typeof s.value&&this.scopes.add(s.value),this.injectorDefTypes=new Set(this.get(ew.multi,Wn,Ft.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=Md(this),n=Xs(void 0);try{return t()}finally{Md(e),Xs(n)}}get(t,e=kl,n=Ft.Default){this.assertNotDestroyed(),n=Yf(n);const r=Md(this),s=Xs(void 0);try{if(!(n&Ft.SkipSelf)){let a=this.records.get(t);if(void 0===a){const l=function k1(i){return"function"==typeof i||"object"==typeof i&&i instanceof me}(t)&&Gf(t);a=l&&this.injectableDefInScope(l)?jo(kv(t),Hp):null,this.records.set(t,a)}if(null!=a)return this.hydrate(t,a)}return(n&Ft.Self?wh():this.parent).get(t,e=n&Ft.Optional&&e===kl?null:e)}catch(o){if("NullInjectorError"===o.name){if((o[gi]=o[gi]||[]).unshift(mi(t)),r)throw o;return function v_(i,t,e,n){const r=i[gi];throw t[jf]&&r.unshift(t[jf]),i.message=function R0(i,t,e,n=null){i=i&&"\n"===i.charAt(0)&&i.charAt(1)==JE?i.slice(2):i;let r=mi(t);if(Array.isArray(t))r=t.map(mi).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):mi(a)))}r=`{${s.join(", ")}}`}return`${e}${n?"("+n+")":""}[${r}]: ${i.replace(g_,"\n ")}`}("\n"+i.message,r,e,n),i[Pl]=r,i[gi]=null,i}(o,t,"R3InjectorError",this.source)}throw o}finally{Xs(s),Md(r)}}resolveInjectorInitializers(){const t=Md(this),e=Xs(void 0);try{const n=this.get(Bp.multi,Wn,Ft.Self);for(const r of n)r()}finally{Md(t),Xs(e)}}toString(){const t=[],e=this.records;for(const n of e.keys())t.push(mi(n));return`R3Injector[${t.join(", ")}]`}assertNotDestroyed(){if(this._destroyed)throw new pe(205,!1)}processProvider(t){let e=Nc(t=Ot(t))?t:Ot(t&&t.provide);const n=function Gp(i){return Mi(i)?jo(void 0,i.useValue):jo(As(i),Hp)}(t);if(Nc(t)||!0!==t.multi)this.records.get(e);else{let r=this.records.get(e);r||(r=jo(void 0,Hp,!0),r.factory=()=>qf(r.multi),this.records.set(e,r)),e=t,r.multi.push(t)}this.records.set(e,n)}hydrate(t,e){return e.value===Hp&&(e.value=T1,e.value=e.factory()),"object"==typeof e.value&&e.value&&function R1(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=Ot(t.providedIn);return"string"==typeof e?"any"===e||this.scopes.has(e):this.injectorDefTypes.has(e)}}function kv(i){const t=Gf(i),e=null!==t?t.factory:el(i);if(null!==e)return e;if(i instanceof me)throw new pe(204,!1);if(i instanceof Function)return function iw(i){const t=i.length;if(t>0)throw Gd(t,"?"),new pe(204,!1);const e=function Xu(i){return i&&(i[wd]||i[m_])||null}(i);return null!==e?()=>e.factory(i):()=>new i}(i);throw new pe(204,!1)}function As(i,t,e){let n;if(Nc(i)){const r=Ot(i);return el(r)||kv(r)}if(Mi(i))n=()=>Ot(i.useValue);else if(function Tv(i){return!(!i||!i.useFactory)}(i))n=()=>i.useFactory(...qf(i.deps||[]));else if(function Pi(i){return!(!i||!i.useExisting)}(i))n=()=>ee(Ot(i.useExisting));else{const r=Ot(i&&(i.useClass||i.provide));if(!function I1(i){return!!i.deps}(i))return el(r)||kv(r);n=()=>new r(...qf(i.deps))}return n}function jo(i,t,e=!1){return{factory:i,value:t,multi:e?[]:void 0}}function Pv(i,t){for(const e of i)Array.isArray(e)?Pv(e,t):e&&ju(e)?Pv(e.\u0275providers,t):t(e)}class P1{}class Ov{}class Mo{resolveComponentFactory(t){throw function al(i){const t=Error(`No component factory found for ${mi(i)}. Did you add it to @NgModule.entryComponents?`);return t.ngComponent=i,t}(t)}}let $l=(()=>{class i{}return i.NULL=new Mo,i})();function F1(){return Fn(Ar(),Se())}function Fn(i,t){return new vt(Ai(i,t))}let vt=(()=>{class i{constructor(e){this.nativeElement=e}}return i.__NG_ELEMENT_ID__=F1,i})();function rw(i){return i instanceof vt?i.nativeElement:i}class Gl{}let ll=(()=>{class i{}return i.__NG_ELEMENT_ID__=()=>function L1(){const i=Se(),e=ws(Ar().index,i);return(bs(e)?e:i)[xt]}(),i})(),N1=(()=>{class i{}return i.\u0275prov=Pe({token:i,providedIn:"root",factory:()=>null}),i})();class Bc{constructor(t){this.full=t,this.major=t.split(".")[0],this.minor=t.split(".")[1],this.patch=t.split(".").slice(2).join(".")}}const B1=new Bc("15.2.10"),Fv={},Lv="ngOriginalError";function Nv(i){return i[Lv]}class cl{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&&Nv(t);for(;e&&Nv(e);)e=Nv(e);return e||null}}function dl(i){return i instanceof Function?i():i}function ow(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 aw="ng-template";function j1(i,t,e){let n=0,r=!0;for(;ns?"":r[h+1].toLowerCase();const m=8&n?p:null;if(m&&-1!==ow(m,c,0)||2&n&&c!==p){if(Yo(n))return!1;o=!0}}}}else{if(!o&&!Yo(n)&&!Yo(l))return!1;if(o&&Yo(l))continue;o=!1,n=l|1&n}}return Yo(n)||o}function Yo(i){return 0==(1&i)}function lw(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&&!Yo(o)&&(t+=Uc(s,r),r=""),n=o,s=s||!Yo(n);e++}return""!==r&&(t+=Uc(s,r)),t}const on={};function V(i){Hv(zn(),Se(),Kn()+i,!1)}function Hv(i,t,e,n){if(!n)if(3==(3&t[fn])){const s=i.preOrderCheckHooks;null!==s&&op(t,s,e)}else{const s=i.preOrderHooks;null!==s&&ap(t,s,0,e)}il(e)}function uw(i,t=null,e=null,n){const r=hw(i,t,e,n);return r.resolveInjectorInitializers(),r}function hw(i,t=null,e=null,n,r=new Set){const s=[e||Wn,A1(i)];return n=n||("object"==typeof i?void 0:mi(i)),new $p(s,t||wh(),n||null,r)}let Gi=(()=>{class i{static create(e,n){if(Array.isArray(e))return uw({name:""},n,e,"");{const r=e.name??"";return uw({name:r},e.parent,e.providers,r)}}}return i.THROW_IF_NOT_FOUND=kl,i.NULL=new tw,i.\u0275prov=Pe({token:i,providedIn:"any",factory:()=>ee(ol)}),i.__NG_ELEMENT_ID__=-1,i})();function E(i,t=Ft.Default){const e=Se();return null===e?ee(i,t):V_(Ar(),e,Ot(i),t)}function Co(){throw new Error("invalid")}function vw(i,t){const e=i.contentQueries;if(null!==e)for(let n=0;nbi&&Hv(i,t,bi,!1),Qr(o?2:0,r),e(n,r)}finally{il(s),Qr(o?3:1,r)}}function Zv(i,t,e){if(Jf(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,Ch(i,e,r.hostVars,on),r)}function be(i,t,e,n,r,s){const o=Ai(i,t);!function Xe(i,t,e,n,r,s,o){if(null==s)i.removeAttribute(t,r,e);else{const a=null==o?Jt(s):o(s,n||"",r);i.setAttribute(t,r,a,e)}}(t[xt],o,s,i.value,e,n,r)}function bt(i,t,e,n,r,s){const o=s[t];if(null!==o){const a=n.setInput;for(let l=0;l0&&rs(e)}}function rs(i){for(let n=av(i);null!==n;n=lv(n))for(let r=Ui;r0&&rs(s)}const e=i[lt].components;if(null!==e)for(let n=0;n0&&rs(r)}}function ss(i,t){const e=ws(t,i),n=e[lt];(function so(i,t){for(let e=t.length;e-1&&(uv(t,n),mp(e,n))}this._attachedToViewContainer=!1}kx(this._lView[lt],this._lView)}onDestroy(t){xw(this._lView[lt],this._lView,null,t)}markForCheck(){Ts(this._cdRefInjectingView||this._lView)}detach(){this._lView[fn]&=-65}reattach(){this._lView[fn]|=64}detectChanges(){So(this._lView[lt],this._lView,this.context)}checkNoChanges(){}attachToViewContainerRef(){if(this._appRef)throw new pe(902,!1);this._attachedToViewContainer=!0}detachFromAppRef(){this._appRef=null,function jA(i,t){bh(i,t,t[xt],2,null,null)}(this._lView[lt],this._lView)}attachToAppRef(t){if(this._attachedToViewContainer)throw new pe(902,!1);this._appRef=t}}class b8 extends ny{constructor(t){super(t),this._view=t}detectChanges(){const t=this._view;So(t[lt],t,t[ze],!1)}checkNoChanges(){}get context(){return null}}class ZF extends $l{constructor(t){super(),this.ngModule=t}resolveComponentFactory(t){const e=Hn(t);return new iy(e,this.ngModule)}}function QF(i){const t=[];for(let e in i)i.hasOwnProperty(e)&&t.push({propName:i[e],templateName:e});return t}class w8{constructor(t,e){this.injector=t,this.parentInjector=e}get(t,e,n){n=Yf(n);const r=this.injector.get(t,Fv,n);return r!==Fv||e===Fv?r:this.parentInjector.get(t,e,n)}}class iy extends Ov{get inputs(){return QF(this.componentDef.inputs)}get outputs(){return QF(this.componentDef.outputs)}constructor(t,e){super(),this.componentDef=t,this.ngModule=e,this.componentType=t.type,this.selector=function eD(i){return i.map(J1).join(",")}(t.selectors),this.ngContentSelectors=t.ngContentSelectors?t.ngContentSelectors:[],this.isBoundToModule=!!e}create(t,e,n,r){let s=(r=r||this.ngModule)instanceof io?r:r?.injector;s&&null!==this.componentDef.getStandaloneInjector&&(s=this.componentDef.getStandaloneInjector(s)||s);const o=s?new w8(t,s):t,a=o.get(Gl,null);if(null===a)throw new pe(407,!1);const l=o.get(N1,null),c=a.createRenderer(null,this.componentDef),d=this.componentDef.selectors[0][0]||"div",h=n?function wD(i,t,e){return i.selectRootElement(t,e===Ks.ShadowDom)}(c,n,this.componentDef.encapsulation):Ap(c,d,function x8(i){const t=i.toLowerCase();return"svg"===t?Pd:"math"===t?"math":null}(d)),p=this.componentDef.onPush?288:272,m=ey(0,null,null,1,0,null,null,null,null,null),g=Mh(null,m,null,p,null,null,a,c,l,o,null);let b,v;sp(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 C8(i,t){const e=i[lt],n=bi;return i[n]=t,Qd(e,n,2,"#host",null)}(g,h),F=function S8(i,t,e,n,r,s,o,a){const l=r[lt];!function E8(i,t,e,n){for(const r of i)t.mergedAttrs=Ec(t.mergedAttrs,r.hostAttrs);null!==t.mergedAttrs&&(Sw(t,t.mergedAttrs,!0),null!==e&&Gx(n,e,t))}(n,i,t,o);const c=s.createRenderer(t,e),d=Mh(r,bw(e),null,e.onPush?32:16,r[i.index],i,s,c,a||null,null,null);return l.firstCreatePass&&P(l,i,n.length-1),Ti(r,d),r[i.index]=d}(C,h,y,M,g,a,c);v=U0(m,bi),h&&function D8(i,t,e,n){if(n)L_(i,e,["ng-version",B1.full]);else{const{attrs:r,classes:s}=function tD(i){const t=[],e=[];let n=1,r=2;for(;n0&&$x(i,e,s.join(" "))}}(c,y,h,n),void 0!==e&&function T8(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=Ec(r.hostAttrs,e=Ec(e,r.hostAttrs))}}(n)}function kD(i){return i===Za?{}:i===Wn?[]:i}function k8(i,t){const e=i.viewQuery;i.viewQuery=e?(n,r)=>{t(n,r),e(n,r)}:t}function P8(i,t){const e=i.contentQueries;i.contentQueries=e?(n,r,s)=>{t(n,r,s),e(n,r,s)}:t}function O8(i,t){const e=i.hostBindings;i.hostBindings=e?(n,r)=>{t(n,r),e(n,r)}:t}function Aw(i){return!!PD(i)&&(Array.isArray(i)||!(i instanceof Map)&&Symbol.iterator in i)}function PD(i){return null!==i&&("function"==typeof i||"object"==typeof i)}function Wl(i,t,e){return i[t]=e}function Is(i,t,e){return!Object.is(i[t],e)&&(i[t]=e,!0)}function Eh(i,t,e,n){const r=Is(i,t,e);return Is(i,t+1,n)||r}function It(i,t,e,n){const r=Se();return Is(r,Ll(),t)&&(zn(),be(Di(),r,i,t,e,n)),It}function Yp(i,t,e,n){return Is(i,Ll(),e)?t+Jt(e)+n:on}function qp(i,t,e,n,r,s){const a=Eh(i,function tl(){return Pt.lFrame.bindingIndex}(),e,r);return Qs(2),a?t+Jt(e)+n+Jt(r)+s:on}function fe(i,t,e,n,r,s,o,a){const l=Se(),c=zn(),d=i+bi,h=c.firstCreatePass?function G8(i,t,e,n,r,s,o,a,l){const c=t.consts,d=Qd(t,i,4,o||null,Fl(c,a));ty(t,e,d,Fl(c,l)),Bd(t,d);const h=d.tView=ey(2,d,n,r,s,t.directiveRegistry,t.pipeRegistry,null,t.schemas,c);return null!==t.queries&&(t.queries.template(t,d),h.queries=t.queries.embeddedTView(d)),d}(d,c,l,t,e,n,r,s,o):c.data[d];_a(h,!1);const p=l[xt].createComment("");yh(c,l,p,h),$r(p,l),Ti(l,l[d]=mn(p,l,p,h)),xc(h)&&Qv(c,l,h),null!=o&&Jv(l,h,a)}function Zi(i){return Fd(function mA(){return Pt.lFrame.contextLView}(),bi+i)}function U(i,t,e){const n=Se();return Is(n,Ll(),t)&&ro(zn(),Di(),n,i,t,n[xt],e,!1),U}function OD(i,t,e,n,r){const o=r?"class":"style";RD(i,e,t.inputs[o],o,n)}function G(i,t,e,n){const r=Se(),s=zn(),o=bi+i,a=r[xt],l=s.firstCreatePass?function j8(i,t,e,n,r,s){const o=t.consts,l=Qd(t,i,2,n,Fl(o,r));return ty(t,e,l,Fl(o,s)),null!==l.attrs&&Sw(l,l.attrs,!1),null!==l.mergedAttrs&&Sw(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]=Ap(a,t,function q0(){return Pt.lFrame.currentNamespace}()),d=xc(l);return _a(l,!0),Gx(a,c,l),32!=(32&l.flags)&&yh(s,r,c,l),0===function dA(){return Pt.lFrame.elementDepthCount}()&&$r(c,r),function uA(){Pt.lFrame.elementDepthCount++}(),d&&(Qv(s,r,l),Zv(s,l,r)),null!==n&&Jv(r,l),G}function j(){let i=Ar();D_()?T_():(i=i.parent,_a(i,!1));const t=i;!function hA(){Pt.lFrame.elementDepthCount--}();const e=zn();return e.firstCreatePass&&(Bd(e,i),Jf(i)&&e.queries.elementEnd(i)),null!=t.classesWithoutHost&&function xA(i){return 0!=(8&i.flags)}(t)&&OD(e,t,Se(),t.classesWithoutHost,!0),null!=t.stylesWithoutHost&&function F_(i){return 0!=(16&i.flags)}(t)&&OD(e,t,Se(),t.stylesWithoutHost,!1),j}function Ie(i,t,e,n){return G(i,t,e,n),j(),Ie}function Gr(i,t,e){const n=Se(),r=zn(),s=i+bi,o=r.firstCreatePass?function Y8(i,t,e,n,r){const s=t.consts,o=Fl(s,n),a=Qd(t,i,8,"ng-container",o);return null!==o&&Sw(a,o,!0),ty(t,e,a,Fl(s,r)),null!==t.queries&&t.queries.elementStart(t,a),a}(s,r,n,t,e):r.data[s];_a(o,!0);const a=n[s]=n[xt].createComment("");return yh(r,n,a,o),$r(a,n),xc(o)&&(Qv(r,n,o),Zv(r,o,n)),null!=e&&Jv(n,o),Gr}function Wr(){let i=Ar();const t=zn();return D_()?T_():(i=i.parent,_a(i,!1)),t.firstCreatePass&&(Bd(t,i),Jf(i)&&t.queries.elementEnd(i)),Wr}function sy(i,t,e){return Gr(i,t,e),Wr(),sy}function jn(){return Se()}function oy(i){return!!i&&"function"==typeof i.then}function hL(i){return!!i&&"function"==typeof i.subscribe}const FD=hL;function Oe(i,t,e,n){const r=Se(),s=zn(),o=Ar();return fL(s,r,r[xt],o,i,t,n),Oe}function LD(i,t){const e=Ar(),n=Se(),r=zn();return fL(r,n,XF(rh(r.data),e,n),e,i,t),LD}function fL(i,t,e,n,r,s,o){const a=xc(n),c=i.firstCreatePass&&qF(i),d=t[ze],h=YF(t);let p=!0;if(3&n.type||o){const b=Ai(n,t),v=o?o(b):b,y=h.length,M=o?C=>o(I(C[n.index])):n.index;let x=null;if(!o&&a&&(x=function q8(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=mL(n,t,d,s,!1);const C=e.listen(v,r,s);h.push(s,C),c&&c.push(r,M,y,y+1)}}else s=mL(n,t,d,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?ws(i.index,t):t);let l=pL(t,e,n,o),c=s.__ngNextListenerFn__;for(;c;)l=pL(t,e,c,o)&&l,c=c.__ngNextListenerFn__;return r&&!1===l&&(o.preventDefault(),o.returnValue=!1),l}}function re(i=1){return function vA(i){return(Pt.lFrame.contextLView=function Y0(i,t){for(;i>0;)t=t[Er],i--;return t}(i,Pt.lFrame.contextLView))[ze]}(i)}function X8(i,t){let e=null;const n=function X1(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 UD(i){return 2|i}function Ah(i){return(131068&i)>>2}function VD(i,t){return-131069&i|t<<2}function zD(i){return 1|i}function CL(i,t,e,n,r){const s=i[e+1],o=null===t;let a=n?eu(s):Ah(s),l=!1;for(;0!==a&&(!1===l||o);){const d=i[a+1];tW(i[a],t)&&(l=!0,i[a+1]=n?zD(d):UD(d)),a=n?eu(d):Ah(d)}l&&(i[e+1]=n?UD(s):zD(s))}function tW(i,t){return null===i||null==t||(Array.isArray(i)?i[1]:i)===t||!(!Array.isArray(i)||"string"!=typeof t)&&Rc(i,t)>=0}const Rr={textEnd:0,key:0,keyEnd:0,value:0,valueEnd:0};function SL(i){return i.substring(Rr.key,Rr.keyEnd)}function EL(i,t){const e=Rr.textEnd;return e===t?-1:(t=Rr.keyEnd=function sW(i,t,e){for(;t32;)t++;return t}(i,Rr.key=t,e),tm(i,t,e))}function tm(i,t,e){for(;t=0;e=EL(t,e))Cs(i,SL(t),!0)}function ul(i,t,e,n){const r=Se(),s=zn(),o=Qs(2);s.firstUpdatePass&&kL(s,i,o,n),t!==on&&Is(r,o,t)&&OL(s,s.data[Kn()],r,r[xt],i,r[o+1]=function _W(i,t){return null==i||""===i||("string"==typeof t?i+=t:"object"==typeof i&&(i=mi(to(i)))),i}(t,e),n,o)}function RL(i,t){return t>=i.expandoStartIndex}function kL(i,t,e,n){const r=i.data;if(null===r[e+1]){const s=r[Kn()],o=RL(i,e);LL(s,n)&&null===t&&!o&&(t=!1),t=function dW(i,t,e,n){const r=rh(i);let s=n?t.residualClasses:t.residualStyles;if(null===r)0===(n?t.classBindings:t.styleBindings)&&(e=ay(e=HD(null,i,t,e,n),t.attrs,n),s=null);else{const o=t.directiveStylingLast;if(-1===o||i[o]!==r)if(e=HD(r,i,t,e,n),null===s){let l=function uW(i,t,e){const n=e?t.classBindings:t.styleBindings;if(0!==Ah(n))return i[eu(n)]}(i,t,n);void 0!==l&&Array.isArray(l)&&(l=HD(null,i,t,l[1],n),l=ay(l,t.attrs,n),function hW(i,t,e,n){i[eu(e?t.classBindings:t.styleBindings)]=n}(i,t,n,l))}else s=function fW(i,t,e){let n;const r=t.directiveEnd;for(let s=1+t.directiveStylingLast;s0)&&(c=!0)):d=e,r)if(0!==l){const p=eu(i[a+1]);i[n+1]=Tw(p,a),0!==p&&(i[p+1]=VD(i[p+1],n)),i[a+1]=function Z8(i,t){return 131071&i|t<<17}(i[a+1],n)}else i[n+1]=Tw(a,0),0!==a&&(i[a+1]=VD(i[a+1],n)),a=n;else i[n+1]=Tw(l,0),0===a?a=n:i[l+1]=VD(i[l+1],n),l=n;c&&(i[n+1]=UD(i[n+1])),CL(i,d,n,!0),CL(i,d,n,!1),function eW(i,t,e,n,r){const s=r?i.residualClasses:i.residualStyles;null!=s&&"string"==typeof t&&Rc(s,t)>=0&&(e[n+1]=zD(e[n+1]))}(t,d,i,n,s),o=Tw(a,l),s?t.classBindings=o:t.styleBindings=o}(r,s,t,e,o,n)}}function HD(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),d=c?l[1]:l,h=null===d;let p=e[r+1];p===on&&(p=h?Wn:void 0);let m=h?jd(p,n):d===n?p:void 0;if(c&&!Iw(m)&&(m=jd(l,n)),Iw(m)&&(a=m,o))return a;const g=i[r+1];r=o?eu(g):Ah(g)}if(null!==t){let l=s?t.residualClasses:t.residualStyles;null!=l&&(a=jd(l,n))}return a}function Iw(i){return void 0!==i}function LL(i,t){return 0!=(i.flags&(t?8:16))}function Be(i,t=""){const e=Se(),n=zn(),r=i+bi,s=n.firstCreatePass?Qd(n,r,1,t,null):n.data[r],o=e[r]=function cv(i,t){return i.createText(t)}(e[xt],t);yh(n,e,o,s),_a(s,!1)}function ui(i){return Qi("",i,""),ui}function Qi(i,t,e){const n=Se(),r=Yp(n,i,t,e);return r!==on&&Vc(n,Kn(),r),Qi}function Dh(i,t,e,n,r){const s=Se(),o=qp(s,i,t,e,n,r);return o!==on&&Vc(s,Kn(),o),Dh}function GL(i,t,e){!function hl(i,t,e,n){const r=zn(),s=Qs(2);r.firstUpdatePass&&kL(r,null,s,n);const o=Se();if(e!==on&&Is(o,s,e)){const a=r.data[Kn()];if(LL(a,n)&&!RL(r,s)){let l=n?a.classesWithoutHost:a.stylesWithoutHost;null!==l&&(e=zf(l,e||"")),OD(r,a,o,e,n)}else!function gW(i,t,e,n,r,s,o,a){r===on&&(r=Wn);let l=0,c=0,d=0((st=st||{})[st.LocaleId=0]="LocaleId",st[st.DayPeriodsFormat=1]="DayPeriodsFormat",st[st.DayPeriodsStandalone=2]="DayPeriodsStandalone",st[st.DaysFormat=3]="DaysFormat",st[st.DaysStandalone=4]="DaysStandalone",st[st.MonthsFormat=5]="MonthsFormat",st[st.MonthsStandalone=6]="MonthsStandalone",st[st.Eras=7]="Eras",st[st.FirstDayOfWeek=8]="FirstDayOfWeek",st[st.WeekendRange=9]="WeekendRange",st[st.DateFormat=10]="DateFormat",st[st.TimeFormat=11]="TimeFormat",st[st.DateTimeFormat=12]="DateTimeFormat",st[st.NumberSymbols=13]="NumberSymbols",st[st.NumberFormats=14]="NumberFormats",st[st.CurrencyCode=15]="CurrencyCode",st[st.CurrencySymbol=16]="CurrencySymbol",st[st.CurrencyName=17]="CurrencyName",st[st.Currencies=18]="Currencies",st[st.Directionality=19]="Directionality",st[st.PluralCase=20]="PluralCase",st[st.ExtraData=21]="ExtraData",st))();const im="en-US";let n2=im;function WD(i,t,e,n,r){if(i=Ot(i),Array.isArray(i))for(let s=0;s>20;if(Nc(i)||!i.multi){const m=new Ud(l,r,E),g=YD(a,t,r?d:d+p,h);-1===g?(pn(ah(c,o),s,a),jD(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=YD(a,t,d+p,h),g=YD(a,t,d,d+p),v=g>=0&&e[g];if(r&&!v||!r&&!(m>=0&&e[m])){pn(ah(c,o),s,a);const y=function Oj(i,t,e,n,r){const s=new Ud(i,e,E);return s.multi=[],s.index=t,s.componentProviders=0,D2(s,r,n&&!e),s}(r?Pj:kj,e.length,r,n,l);!r&&v&&(e[g].providerFactory=y),jD(s,i,t.length,0),t.push(a),c.directiveStart++,c.directiveEnd++,r&&(c.providerIndexes+=1048576),e.push(y),o.push(y)}else jD(s,i,m>-1?m:g,D2(e[r?g:m],l,!r&&n));!r&&n&&v&&e[g].componentProviders++}}}function jD(i,t,e,n){const r=Nc(t),s=function D1(i){return!!i.useClass}(t);if(r||s){const l=(s?Ot(t.useClass):t).prototype.ngOnDestroy;if(l){const c=i.destroyHooks||(i.destroyHooks=[]);if(!r&&t.multi){const d=c.indexOf(e);-1===d?c.push(e,[n,l]):c[d+1].push(n,l)}else c.push(e,l)}}}function D2(i,t,e){return e&&i.componentProviders++,i.multi.push(t)-1}function YD(i,t,e,n){for(let r=e;r{e.providersResolver=(n,r)=>function Rj(i,t,e){const n=zn();if(n.firstCreatePass){const r=bo(i);WD(e,n.data,n.blueprint,r,!0),WD(t,n.data,n.blueprint,r,!1)}}(n,r?r(i):i,t)}}class rm{}class T2{}class I2 extends rm{constructor(t,e){super(),this._parent=e,this._bootstrapComponents=[],this.destroyCbs=[],this.componentFactoryResolver=new ZF(this);const n=hr(t);this._bootstrapComponents=dl(n.bootstrap),this._r3Injector=hw(t,e,[{provide:rm,useValue:this},{provide:$l,useValue:this.componentFactoryResolver}],mi(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 XD extends T2{constructor(t){super(),this.moduleType=t}create(t){return new I2(this.moduleType,t)}}class Lj extends rm{constructor(t,e,n){super(),this.componentFactoryResolver=new ZF(this),this.instance=null;const r=new $p([...t,{provide:rm,useValue:this},{provide:$l,useValue:this.componentFactoryResolver}],e||wh(),n,new Set(["environment"]));this.injector=r,r.resolveInjectorInitializers()}destroy(){this.injector.destroy()}onDestroy(t){this.injector.onDestroy(t)}}function Lw(i,t,e=null){return new Lj(i,t,e).injector}let Nj=(()=>{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=nw(0,e.type),r=n.length>0?Lw([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=Pe({token:i,providedIn:"environment",factory:()=>new i(ee(io))}),i})();function KD(i){i.getStandaloneInjector=t=>t.get(Nj).getOrCreateStandaloneInjector(i)}function Rs(i,t,e){const n=zr()+i,r=Se();return r[n]===on?Wl(r,n,e?t.call(e):t()):function ry(i,t){return i[t]}(r,n)}function sm(i,t,e,n){return B2(Se(),zr(),i,t,e,n)}function N2(i,t,e,n,r,s,o){return function z2(i,t,e,n,r,s,o,a,l){const c=t+e;return function Aa(i,t,e,n,r,s){const o=Eh(i,t,e,n);return Eh(i,t+2,r,s)||o}(i,c,r,s,o,a)?Wl(i,c+4,l?n.call(l,r,s,o,a):n(r,s,o,a)):fy(i,c+4)}(Se(),zr(),i,t,e,n,r,s,o)}function fy(i,t){const e=i[t];return e===on?void 0:e}function B2(i,t,e,n,r,s){const o=t+e;return Is(i,o,r)?Wl(i,o+1,s?n.call(s,r):n(r)):fy(i,o+1)}function ct(i,t){const e=zn();let n;const r=i+bi;e.firstCreatePass?(n=function Jj(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=el(n.type)),o=Xs(E);try{const a=dp(!1),l=s();return dp(a),function W8(i,t,e,n){e>=i.data.length&&(i.data[e]=null,i.blueprint[e]=null),t[e]=n}(e,Se(),r,l),l}finally{Xs(o)}}function ut(i,t,e){const n=i+bi,r=Se(),s=Fd(r,n);return py(r,n)?B2(r,zr(),t,s.transform,e,s):s.transform(e)}function QD(i,t,e,n){const r=i+bi,s=Se(),o=Fd(s,r);return py(s,r)?function U2(i,t,e,n,r,s,o){const a=t+e;return Eh(i,a,r,s)?Wl(i,a+2,o?n.call(o,r,s):n(r,s)):fy(i,a+2)}(s,zr(),t,o.transform,e,n,o):o.transform(e,n)}function py(i,t){return i[lt].data[t].pure}function JD(i){return t=>{setTimeout(i,void 0,t)}}const $e=class r6 extends Te{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=JD(s),r&&(r=JD(r)),o&&(o=JD(o)));const a=super.subscribe({next:r,error:s,complete:o});return t instanceof Qt&&t.add(a),a}};function s6(){return this._results[Symbol.iterator]()}class om{get changes(){return this._changes||(this._changes=new $e)}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=om.prototype;e[Symbol.iterator]||(e[Symbol.iterator]=s6)}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 Dr(i){return i.flat(Number.POSITIVE_INFINITY)}(t);(this._changesDetected=!function pp(i,t,e){if(i.length!==t.length)return!1;for(let n=0;n{class i{}return i.__NG_ELEMENT_ID__=l6,i})();const o6=Eo,a6=class extends o6{constructor(t,e,n){super(),this._declarationLView=t,this._declarationTContainer=e,this.elementRef=n}createEmbeddedView(t,e){const n=this._declarationTContainer.tView,r=Mh(this._declarationLView,n,t,16,null,n.declTNode,null,null,null,null,e||null);r[nh]=this._declarationLView[this._declarationTContainer.index];const o=this._declarationLView[Zs];return null!==o&&(r[Zs]=o.createEmbeddedView(n)),Sh(n,r,t),new ny(r)}};function l6(){return Nw(Ar(),Se())}function Nw(i,t){return 4&i.type?new a6(t,i,Fn(i,t)):null}let jr=(()=>{class i{}return i.__NG_ELEMENT_ID__=c6,i})();function c6(){return W2(Ar(),Se())}const d6=jr,$2=class extends d6{constructor(t,e,n){super(),this._lContainer=t,this._hostTNode=e,this._hostLView=n}get element(){return Fn(this._hostTNode,this._hostLView)}get injector(){return new Dc(this._hostTNode,this._hostLView)}get parentInjector(){const t=ch(this._hostTNode,this._hostLView);if(cp(t)){const e=oh(t,this._hostLView),n=sh(t);return new Dc(e[lt].data[n+8],e)}return new Dc(null,this._hostLView)}clear(){for(;this.length>0;)this.remove(this.length-1)}get(t){const e=G2(this._lContainer);return null!==e&&e[t]||null}get length(){return this._lContainer.length-Ui}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 hh(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 iy(Hn(t)),c=n||this.parentInjector;if(!s&&null==l.ngModule){const p=(o?c:this.parentInjector).get(io,null);p&&(s=p)}const d=l.create(c,r,void 0,s);return this.insert(d.hostView,a),d}insert(t,e){const n=t._lView,r=n[lt];if(function cA(i){return xs(i[Bi])}(n)){const d=this.indexOf(t);if(-1!==d)this.detach(d);else{const h=n[Bi],p=new $2(h,h[he],h[Bi]);p.detach(p.indexOf(t))}}const s=this._adjustIndex(e),o=this._lContainer;!function dv(i,t,e,n){const r=Ui+n,s=e.length;n>0&&(e[r-1][ys]=t),n0)n.push(o[a/2]);else{const c=s[a+1],d=t[-l];for(let h=Ui;h{class i{constructor(e){this.appInits=e,this.resolve=Uw,this.reject=Uw,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)(ee(Vw,8))},i.\u0275prov=Pe({token:i,factory:i.\u0275fac,providedIn:"root"}),i})();const cm=new me("AppId",{providedIn:"root",factory:function pN(){return`${uT()}${uT()}${uT()}`}});function uT(){return String.fromCharCode(97+Math.floor(25*Math.random()))}const mN=new me("Platform Initializer"),hT=new me("Platform ID",{providedIn:"platform",factory:()=>"unknown"}),kr=new me("AnimationModuleType");let L6=(()=>{class i{log(e){console.log(e)}warn(e){console.warn(e)}}return i.\u0275fac=function(e){return new(e||i)},i.\u0275prov=Pe({token:i,factory:i.\u0275fac,providedIn:"platform"}),i})();const Xl=new me("LocaleId",{providedIn:"root",factory:()=>Lt(Xl,Ft.Optional|Ft.SkipSelf)||function N6(){return typeof $localize<"u"&&$localize.locale||im}()});class U6{constructor(t,e){this.ngModuleFactory=t,this.componentFactories=e}}let gN=(()=>{class i{compileModuleSync(e){return new XD(e)}compileModuleAsync(e){return Promise.resolve(this.compileModuleSync(e))}compileModuleAndAllComponentsSync(e){const n=this.compileModuleSync(e),s=dl(hr(e).declarations).reduce((o,a)=>{const l=Hn(a);return l&&o.push(new iy(l)),o},[]);return new U6(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=Pe({token:i,factory:i.\u0275fac,providedIn:"root"}),i})();const H6=(()=>Promise.resolve(0))();function fT(i){typeof Zone>"u"?H6.then(()=>{i&&i.apply(null,null)}):Zone.current.scheduleMicroTask("scheduleMicrotask",i)}class gt{constructor({enableLongStackTrace:t=!1,shouldCoalesceEventChangeDetection:e=!1,shouldCoalesceRunChangeDetection:n=!1}){if(this.hasPendingMacrotasks=!1,this.hasPendingMicrotasks=!1,this.isStable=!0,this.onUnstable=new $e(!1),this.onMicrotaskEmpty=new $e(!1),this.onStable=new $e(!1),this.onError=new $e(!1),typeof Zone>"u")throw new pe(908,!1);Zone.assertZonePatched();const r=this;r._nesting=0,r._outer=r._inner=Zone.current,Zone.TaskTrackingZoneSpec&&(r._inner=r._inner.fork(new Zone.TaskTrackingZoneSpec)),t&&Zone.longStackTraceZoneSpec&&(r._inner=r._inner.fork(Zone.longStackTraceZoneSpec)),r.shouldCoalesceEventChangeDetection=!n&&e,r.shouldCoalesceRunChangeDetection=n,r.lastRequestAnimationFrameId=-1,r.nativeRequestAnimationFrame=function $6(){let i=Rn.requestAnimationFrame,t=Rn.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 j6(i){const t=()=>{!function W6(i){i.isCheckStableRunning||-1!==i.lastRequestAnimationFrameId||(i.lastRequestAnimationFrameId=i.nativeRequestAnimationFrame.call(Rn,()=>{i.fakeTopEventTask||(i.fakeTopEventTask=Zone.root.scheduleEventTask("fakeTopEventTask",()=>{i.lastRequestAnimationFrameId=-1,mT(i),i.isCheckStableRunning=!0,pT(i),i.isCheckStableRunning=!1},void 0,()=>{},()=>{})),i.fakeTopEventTask.invoke()}),mT(i))}(i)};i._inner=i._inner.fork({name:"angular",properties:{isAngularZone:!0},onInvokeTask:(e,n,r,s,o,a)=>{try{return yN(i),e.invokeTask(r,s,o,a)}finally{(i.shouldCoalesceEventChangeDetection&&"eventTask"===s.type||i.shouldCoalesceRunChangeDetection)&&t(),bN(i)}},onInvoke:(e,n,r,s,o,a,l)=>{try{return yN(i),e.invoke(r,s,o,a,l)}finally{i.shouldCoalesceRunChangeDetection&&t(),bN(i)}},onHasTask:(e,n,r,s)=>{e.hasTask(r,s),n===r&&("microTask"==s.change?(i._hasPendingMicrotasks=s.microTask,mT(i),pT(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(!gt.isInAngularZone())throw new pe(909,!1)}static assertNotInAngularZone(){if(gt.isInAngularZone())throw new pe(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,G6,Uw,Uw);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 G6={};function pT(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 mT(i){i.hasPendingMicrotasks=!!(i._hasPendingMicrotasks||(i.shouldCoalesceEventChangeDetection||i.shouldCoalesceRunChangeDetection)&&-1!==i.lastRequestAnimationFrameId)}function yN(i){i._nesting++,i.isStable&&(i.isStable=!1,i.onUnstable.emit(null))}function bN(i){i._nesting--,pT(i)}class Y6{constructor(){this.hasPendingMicrotasks=!1,this.hasPendingMacrotasks=!1,this.isStable=!0,this.onUnstable=new $e,this.onMicrotaskEmpty=new $e,this.onStable=new $e,this.onError=new $e}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 xN=new me(""),Hw=new me("");let vT,gT=(()=>{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,vT||(function q6(i){vT=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:()=>{gt.assertNotInAngularZone(),fT(()=>{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())fT(()=>{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)(ee(gt),ee(_T),ee(Hw))},i.\u0275prov=Pe({token:i,factory:i.\u0275fac}),i})(),_T=(()=>{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 vT?.findTestabilityInTree(this,e,n)??null}}return i.\u0275fac=function(e){return new(e||i)},i.\u0275prov=Pe({token:i,factory:i.\u0275fac,providedIn:"platform"}),i})();const Hc=!1;let tu=null;const wN=new me("AllowMultipleToken"),yT=new me("PlatformDestroyListeners"),MN=new me("appBootstrapListener");class CN{constructor(t,e){this.name=t,this.token=e}}function EN(i,t,e=[]){const n=`Platform: ${t}`,r=new me(n);return(s=[])=>{let o=bT();if(!o||o.injector.get(wN,!1)){const a=[...e,...s,{provide:r,useValue:!0}];i?i(a):function Z6(i){if(tu&&!tu.get(wN,!1))throw new pe(400,!1);tu=i;const t=i.get(DN);(function SN(i){const t=i.get(mN,null);t&&t.forEach(e=>e())})(i)}(function AN(i=[],t){return Gi.create({name:t,providers:[{provide:Iv,useValue:"platform"},{provide:yT,useValue:new Set([()=>tu=null])},...i]})}(a,n))}return function J6(i){const t=bT();if(!t)throw new pe(401,!1);return t}()}}function bT(){return tu?.get(DN)??null}let DN=(()=>{class i{constructor(e){this._injector=e,this._modules=[],this._destroyListeners=[],this._destroyed=!1}bootstrapModuleFactory(e,n){const r=function IN(i,t){let e;return e="noop"===i?new Y6:("zone.js"===i?void 0:i)||new gt(t),e}(n?.ngZone,function TN(i){return{enableLongStackTrace:!1,shouldCoalesceEventChangeDetection:!(!i||!i.ngZoneEventCoalescing)||!1,shouldCoalesceRunChangeDetection:!(!i||!i.ngZoneRunCoalescing)||!1}}(n)),s=[{provide:gt,useValue:r}];return r.run(()=>{const o=Gi.create({providers:s,parent:this.injector,name:e.moduleType.name}),a=e.create(o),l=a.injector.get(cl,null);if(!l)throw new pe(402,!1);return r.runOutsideAngular(()=>{const c=r.onError.subscribe({next:d=>{l.handleError(d)}});a.onDestroy(()=>{$w(this._modules,a),c.unsubscribe()})}),function RN(i,t,e){try{const n=e();return oy(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(zw);return c.runInitializers(),c.donePromise.then(()=>(function r2(i){En(i,"Expected localeId to be defined"),"string"==typeof i&&(n2=i.toLowerCase().replace(/_/g,"-"))}(a.injector.get(Xl,im)||im),this._moduleDoBootstrap(a),a))})})}bootstrapModule(e,n=[]){const r=kN({},n);return function X6(i,t,e){const n=new XD(e);return Promise.resolve(n)}(0,0,e).then(s=>this.bootstrapModuleFactory(s,r))}_moduleDoBootstrap(e){const n=e.injector.get(dm);if(e._bootstrapComponents.length>0)e._bootstrapComponents.forEach(r=>n.bootstrap(r));else{if(!e.instance.ngDoBootstrap)throw new pe(-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 pe(404,!1);this._modules.slice().forEach(n=>n.destroy()),this._destroyListeners.forEach(n=>n());const e=this._injector.get(yT,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)(ee(Gi))},i.\u0275prov=Pe({token:i,factory:i.\u0275fac,providedIn:"platform"}),i})();function kN(i,t){return Array.isArray(t)?t.reduce(kN,i):{...i,...t}}let dm=(()=>{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 In(a=>{this._stable=this._zone.isStable&&!this._zone.hasPendingMacrotasks&&!this._zone.hasPendingMicrotasks,this._zone.runOutsideAngular(()=>{a.next(this._stable),a.complete()})}),o=new In(a=>{let l;this._zone.runOutsideAngular(()=>{l=this._zone.onStable.subscribe(()=>{gt.assertNotInAngularZone(),fT(()=>{!this._stable&&!this._zone.hasPendingMacrotasks&&!this._zone.hasPendingMicrotasks&&(this._stable=!0,a.next(!0))})})});const c=this._zone.onUnstable.subscribe(()=>{gt.assertInAngularZone(),this._stable&&(this._stable=!1,this._zone.runOutsideAngular(()=>{a.next(!1)}))});return()=>{l.unsubscribe(),c.unsubscribe()}});this.isStable=Cr(s,o.pipe(Vf()))}bootstrap(e,n){const r=e instanceof Ov;if(!this._injector.get(zw).done){!r&&function Ed(i){const t=Hn(i)||Vr(i)||vs(i);return null!==t&&t.standalone}(e);throw new pe(405,Hc)}let o;o=r?e:this._injector.get($l).resolveComponentFactory(e),this.componentTypes.push(o.componentType);const a=function K6(i){return i.isBoundToModule}(o)?void 0:this._injector.get(rm),c=o.create(Gi.NULL,[],n||o.selector,a),d=c.location.nativeElement,h=c.injector.get(xN,null);return h?.registerApplication(d),c.onDestroy(()=>{this.detachView(c.hostView),$w(this.components,c),h?.unregisterApplication(d)}),this._loadComponent(c),c}tick(){if(this._runningTick)throw new pe(101,!1);try{this._runningTick=!0;for(let e of this._views)e.detectChanges()}catch(e){this._zone.runOutsideAngular(()=>this._exceptionHandler.handleError(e))}finally{this._runningTick=!1}}attachView(e){const n=e;this._views.push(n),n.attachToAppRef(this)}detachView(e){const n=e;$w(this._views,n),n.detachFromAppRef()}_loadComponent(e){this.attachView(e.hostView),this.tick(),this.components.push(e);const n=this._injector.get(MN,[]);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),()=>$w(this._destroyListeners,e)}destroy(){if(this._destroyed)throw new pe(406,!1);const e=this._injector;e.destroy&&!e.destroyed&&e.destroy()}get viewCount(){return this._views.length}warnIfDestroyed(){}}return i.\u0275fac=function(e){return new(e||i)(ee(gt),ee(io),ee(cl))},i.\u0275prov=Pe({token:i,factory:i.\u0275fac,providedIn:"root"}),i})();function $w(i,t){const e=i.indexOf(t);e>-1&&i.splice(e,1)}let Qn=(()=>{class i{}return i.__NG_ELEMENT_ID__=t9,i})();function t9(i){return function n9(i,t,e){if(Dd(i)&&!e){const n=ws(i.index,t);return new ny(n,n)}return 47&i.type?new ny(t[sr],t):null}(Ar(),Se(),16==(16&i))}class NN{constructor(){}supports(t){return Aw(t)}create(t){return new c9(t)}}const l9=(i,t)=>t;class c9{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||l9}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 d9(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 BN),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 BN),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 d9{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 u9{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 BN{constructor(){this.map=new Map}put(t){const e=t.trackById;let n=this.map.get(e);n||(n=new u9,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 UN(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 f9(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 f9{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 zN(){return new jw([new NN])}let jw=(()=>{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||zN()),deps:[[i,new Ma,new Ss]]}}find(e){const n=this.factories.find(r=>r.supports(e));if(null!=n)return n;throw new pe(901,!1)}}return i.\u0275prov=Pe({token:i,providedIn:"root",factory:zN}),i})();function HN(){return new gy([new VN])}let gy=(()=>{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||HN()),deps:[[i,new Ma,new Ss]]}}find(e){const n=this.factories.find(r=>r.supports(e));if(n)return n;throw new pe(901,!1)}}return i.\u0275prov=Pe({token:i,providedIn:"root",factory:HN}),i})();const g9=EN(null,"core",[]);let _9=(()=>{class i{constructor(e){}}return i.\u0275fac=function(e){return new(e||i)(ee(dm))},i.\u0275mod=en({type:i}),i.\u0275inj=Wt({}),i})();let ST=null;function $c(){return ST}class b9{}const qt=new me("DocumentToken");let ET=(()=>{class i{historyGo(e){throw new Error("Not implemented")}}return i.\u0275fac=function(e){return new(e||i)},i.\u0275prov=Pe({token:i,factory:function(){return function x9(){return ee($N)}()},providedIn:"platform"}),i})();const w9=new me("Location Initialized");let $N=(()=>{class i extends ET{constructor(e){super(),this._doc=e,this._location=window.location,this._history=window.history}getBaseHrefFromDOM(){return $c().getBaseHref(this._doc)}onPopState(e){const n=$c().getGlobalEventTarget(this._doc,"window");return n.addEventListener("popstate",e,!1),()=>n.removeEventListener("popstate",e)}onHashChange(e){const n=$c().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){GN()?this._history.pushState(e,n,r):this._location.hash=r}replaceState(e,n,r){GN()?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)(ee(qt))},i.\u0275prov=Pe({token:i,factory:function(){return function M9(){return new $N(ee(qt))}()},providedIn:"platform"}),i})();function GN(){return!!window.history.pushState}function AT(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 WN(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 Gc(i){return i&&"?"!==i[0]?"?"+i:i}let Rh=(()=>{class i{historyGo(e){throw new Error("Not implemented")}}return i.\u0275fac=function(e){return new(e||i)},i.\u0275prov=Pe({token:i,factory:function(){return Lt(YN)},providedIn:"root"}),i})();const jN=new me("appBaseHref");let YN=(()=>{class i extends Rh{constructor(e,n){super(),this._platformLocation=e,this._removeListenerFns=[],this._baseHref=n??this._platformLocation.getBaseHrefFromDOM()??Lt(qt).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 AT(this._baseHref,e)}path(e=!1){const n=this._platformLocation.pathname+Gc(this._platformLocation.search),r=this._platformLocation.hash;return r&&e?`${n}${r}`:n}pushState(e,n,r,s){const o=this.prepareExternalUrl(r+Gc(s));this._platformLocation.pushState(e,n,o)}replaceState(e,n,r,s){const o=this.prepareExternalUrl(r+Gc(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)(ee(ET),ee(jN,8))},i.\u0275prov=Pe({token:i,factory:i.\u0275fac,providedIn:"root"}),i})(),C9=(()=>{class i extends Rh{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=AT(this._baseHref,e);return n.length>0?"#"+n:n}pushState(e,n,r,s){let o=this.prepareExternalUrl(r+Gc(s));0==o.length&&(o=this._platformLocation.pathname),this._platformLocation.pushState(e,n,o)}replaceState(e,n,r,s){let o=this.prepareExternalUrl(r+Gc(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)(ee(ET),ee(jN,8))},i.\u0275prov=Pe({token:i,factory:i.\u0275fac}),i})(),_y=(()=>{class i{constructor(e){this._subject=new $e,this._urlChangeListeners=[],this._urlChangeSubscription=null,this._locationStrategy=e;const n=this._locationStrategy.getBaseHref();this._basePath=function A9(i){if(new RegExp("^(https?:)?//").test(i)){const[,e]=i.split(/\/\/[^\/]+/);return e}return i}(WN(qN(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+Gc(n))}normalize(e){return i.stripTrailingSlash(function E9(i,t){if(!i||!t.startsWith(i))return t;const e=t.substring(i.length);return""===e||["/",";","?","#"].includes(e[0])?e:t}(this._basePath,qN(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+Gc(n)),r)}replaceState(e,n="",r=null){this._locationStrategy.replaceState(r,"",e,n),this._notifyUrlChangeListeners(this.prepareExternalUrl(e+Gc(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=Gc,i.joinWithSlash=AT,i.stripTrailingSlash=WN,i.\u0275fac=function(e){return new(e||i)(ee(Rh))},i.\u0275prov=Pe({token:i,factory:function(){return function S9(){return new _y(ee(Rh))}()},providedIn:"root"}),i})();function qN(i){return i.replace(/\/index.html$/,"")}var Ao=(()=>((Ao=Ao||{})[Ao.Decimal=0]="Decimal",Ao[Ao.Percent=1]="Percent",Ao[Ao.Currency=2]="Currency",Ao[Ao.Scientific=3]="Scientific",Ao))(),$t=(()=>(($t=$t||{})[$t.Decimal=0]="Decimal",$t[$t.Group=1]="Group",$t[$t.List=2]="List",$t[$t.PercentSign=3]="PercentSign",$t[$t.PlusSign=4]="PlusSign",$t[$t.MinusSign=5]="MinusSign",$t[$t.Exponential=6]="Exponential",$t[$t.SuperscriptingExponent=7]="SuperscriptingExponent",$t[$t.PerMille=8]="PerMille",$t[$t.Infinity=9]="Infinity",$t[$t.NaN=10]="NaN",$t[$t.TimeSeparator=11]="TimeSeparator",$t[$t.CurrencyDecimal=12]="CurrencyDecimal",$t[$t.CurrencyGroup=13]="CurrencyGroup",$t))();function Da(i,t){const e=oo(i),n=e[st.NumberSymbols][t];if(typeof n>"u"){if(t===$t.CurrencyDecimal)return e[st.NumberSymbols][$t.Decimal];if(t===$t.CurrencyGroup)return e[st.NumberSymbols][$t.Group]}return n}const J9=/^(\d+)?\.((\d+)(-(\d+))?)?$/,eB=22,tM=".",yy="0",eY=";",tY=",",kT="#";function FT(i){const t=parseInt(i);if(isNaN(t))throw new Error("Invalid integer literal when parsing "+i);return t}const NT=/\s+/,iB=[];let hm=(()=>{class i{constructor(e,n,r,s){this._iterableDiffers=e,this._keyValueDiffers=n,this._ngEl=r,this._renderer=s,this.initialClasses=iB,this.stateMap=new Map}set klass(e){this.initialClasses=null!=e?e.trim().split(NT):iB}set ngClass(e){this.rawClass="string"==typeof e?e.trim().split(NT):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(NT).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)(E(jw),E(gy),E(vt),E(ll))},i.\u0275dir=ve({type:i,selectors:[["","ngClass",""]],inputs:{klass:["class","klass"],ngClass:"ngClass"},standalone:!0}),i})();class hY{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 lo=(()=>{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 hY(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),oB(a,r)}});for(let r=0,s=n.length;r{oB(n.get(r.currentIndex),r)})}static ngTemplateContextGuard(e,n){return!0}}return i.\u0275fac=function(e){return new(e||i)(E(jr),E(Eo),E(jw))},i.\u0275dir=ve({type:i,selectors:[["","ngFor","","ngForOf",""]],inputs:{ngForOf:"ngForOf",ngForTrackBy:"ngForTrackBy",ngForTemplate:"ngForTemplate"},standalone:!0}),i})();function oB(i,t){i.context.$implicit=t.item}let vi=(()=>{class i{constructor(e,n){this._viewContainer=e,this._context=new pY,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){aB("ngIfThen",e),this._thenTemplateRef=e,this._thenViewRef=null,this._updateView()}set ngIfElse(e){aB("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)(E(jr),E(Eo))},i.\u0275dir=ve({type:i,selectors:[["","ngIf",""]],inputs:{ngIf:"ngIf",ngIfThen:"ngIfThen",ngIfElse:"ngIfElse"},standalone:!0}),i})();class pY{constructor(){this.$implicit=null,this.ngIf=null}}function aB(i,t){if(t&&!t.createEmbeddedView)throw new Error(`${i} must be a TemplateRef, but received '${mi(t)}'.`)}class BT{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 by=(()=>{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=ve({type:i,selectors:[["","ngSwitch",""]],inputs:{ngSwitch:"ngSwitch"},standalone:!0}),i})(),UT=(()=>{class i{constructor(e,n,r){this.ngSwitch=r,r._addCase(),this._view=new BT(e,n)}ngDoCheck(){this._view.enforceState(this.ngSwitch._matchCase(this.ngSwitchCase))}}return i.\u0275fac=function(e){return new(e||i)(E(jr),E(Eo),E(by,9))},i.\u0275dir=ve({type:i,selectors:[["","ngSwitchCase",""]],inputs:{ngSwitchCase:"ngSwitchCase"},standalone:!0}),i})(),lB=(()=>{class i{constructor(e,n,r){r._addDefault(new BT(e,n))}}return i.\u0275fac=function(e){return new(e||i)(E(jr),E(Eo),E(by,9))},i.\u0275dir=ve({type:i,selectors:[["","ngSwitchDefault",""]],standalone:!0}),i})(),VT=(()=>{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:Es.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)(E(vt),E(gy),E(ll))},i.\u0275dir=ve({type:i,selectors:[["","ngStyle",""]],inputs:{ngStyle:"ngStyle"},standalone:!0}),i})(),xy=(()=>{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)(E(jr))},i.\u0275dir=ve({type:i,selectors:[["","ngTemplateOutlet",""]],inputs:{ngTemplateOutletContext:"ngTemplateOutletContext",ngTemplateOutlet:"ngTemplateOutlet",ngTemplateOutletInjector:"ngTemplateOutletInjector"},standalone:!0,features:[xi]}),i})();function ml(i,t){return new pe(2100,!1)}class gY{createSubscription(t,e){return t.subscribe({next:e,error:n=>{throw n}})}dispose(t){t.unsubscribe()}}class _Y{createSubscription(t,e){return t.then(e,n=>{throw n})}dispose(t){}}const vY=new _Y,yY=new gY;let Ia=(()=>{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(oy(e))return vY;if(hL(e))return yY;throw ml()}_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)(E(Qn,16))},i.\u0275pipe=$i({name:"async",type:i,pure:!1,standalone:!0}),i})(),dB=(()=>{class i{constructor(e){this.differs=e,this.keyValues=[],this.compareFn=uB}transform(e,n=uB){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 kY(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)(E(gy,16))},i.\u0275pipe=$i({name:"keyvalue",type:i,pure:!1,standalone:!0}),i})();function uB(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 zT(i){return!(null==i||""===i||i!=i)}(e))return null;r=r||this._locale;try{return function sY(i,t,e){return function PT(i,t,e,n,r,s,o=!1){let a="",l=!1;if(isFinite(i)){let c=function aY(i){let n,r,s,o,a,t=Math.abs(i)+"",e=0;for((r=t.indexOf(tM))>-1&&(t=t.replace(tM,"")),(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)===yy;s++);if(s===(a=t.length))n=[0],r=1;else{for(a--;t.charAt(a)===yy;)a--;for(r-=s,n=[],o=0;s<=a;s++,o++)n[o]=Number(t.charAt(s))}return r>eB&&(n=n.splice(0,eB-1),e=r-1,r=1),{digits:n,exponent:e,integerLen:r}}(i);o&&(c=function oY(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 d=t.minInt,h=t.minFrac,p=t.maxFrac;if(s){const M=s.match(J9);if(null===M)throw new Error(`${s} is not a valid digit info`);const x=M[1],C=M[3],F=M[5];null!=x&&(d=FT(x)),null!=C&&(h=FT(C)),null!=F?p=FT(F):null!=C&&h>p&&(p=h)}!function lY(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);d&&(n.unshift(d),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(Da(e,n)),v.length&&(a+=Da(e,r)+v.join("")),b&&(a+=Da(e,$t.Exponential)+"+"+b)}else a=Da(e,$t.Infinity);return a=i<0&&!l?t.negPre+a+t.negSuf:t.posPre+a+t.posSuf,a}(i,function OT(i,t="-"){const e={minInt:1,minFrac:0,maxFrac:0,posPre:"",posSuf:"",negPre:"",negSuf:"",gSize:0,lgSize:0},n=i.split(eY),r=n[0],s=n[1],o=-1!==r.indexOf(tM)?r.split(tM):[r.substring(0,r.lastIndexOf(yy)+1),r.substring(r.lastIndexOf(yy)+1)],a=o[0],l=o[1]||"";e.posPre=a.substring(0,a.indexOf(kT));for(let d=0;d{class i{}return i.\u0275fac=function(e){return new(e||i)},i.\u0275mod=en({type:i}),i.\u0275inj=Wt({}),i})();const fB="browser";let UY=(()=>{class i{}return i.\u0275prov=Pe({token:i,providedIn:"root",factory:()=>new VY(ee(qt),window)}),i})();class VY{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 zY(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=pB(this.window.history)||pB(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 pB(i){return Object.getOwnPropertyDescriptor(i,"scrollRestoration")}class m7 extends b9{constructor(){super(...arguments),this.supportsDOMEvents=!0}}class WT extends m7{static makeCurrent(){!function y9(i){ST||(ST=i)}(new WT)}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 g7(){return My=My||document.querySelector("base"),My?My.getAttribute("href"):null}();return null==e?null:function _7(i){rM=rM||document.createElement("a"),rM.setAttribute("href",i);const t=rM.pathname;return"/"===t.charAt(0)?t:`/${t}`}(e)}resetBaseElement(){My=null}getUserAgent(){return window.navigator.userAgent}getCookie(t){return function dY(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 rM,My=null;const yB=new me("TRANSITION_ID"),y7=[{provide:Vw,useFactory:function v7(i,t,e){return()=>{e.get(zw).donePromise.then(()=>{const n=$c(),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=Pe({token:i,factory:i.\u0275fac}),i})();const sM=new me("EventManagerPlugins");let oM=(()=>{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=Pe({token:i,factory:i.\u0275fac}),i})(),Cy=(()=>{class i extends xB{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)(ee(qt))},i.\u0275prov=Pe({token:i,factory:i.\u0275fac}),i})();const jT={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/"},YT=/%COMP%/g,CB=new me("RemoveStylesOnCompDestory",{providedIn:"root",factory:()=>!1});function SB(i,t){return t.flat(100).map(e=>e.replace(YT,i))}function EB(i){return t=>{if("__ngUnwrap__"===t)return i;!1===i(t)&&(t.preventDefault(),t.returnValue=!1)}}let aM=(()=>{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 qT(e)}createRenderer(e,n){if(!e||!n)return this.defaultRenderer;const r=this.getOrCreateRenderer(e,n);return r instanceof TB?r.applyToHost(e):r instanceof XT&&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 Ks.Emulated:s=new TB(o,a,n,this.appId,l);break;case Ks.ShadowDom:return new D7(o,a,e,n);default:s=new XT(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)(ee(oM),ee(Cy),ee(cm),ee(CB))},i.\u0275prov=Pe({token:i,factory:i.\u0275fac}),i})();class qT{constructor(t){this.eventManager=t,this.data=Object.create(null),this.destroyNode=null}destroy(){}createElement(t,e){return e?document.createElementNS(jT[e]||e,t):document.createElement(t)}createComment(t){return document.createComment(t)}createText(t){return document.createTextNode(t)}appendChild(t,e){(DB(t)?t.content:t).appendChild(e)}insertBefore(t,e,n){t&&(DB(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=jT[r];s?t.setAttributeNS(s,e,n):t.setAttribute(e,n)}else t.setAttribute(e,n)}removeAttribute(t,e,n){if(n){const r=jT[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&(Es.DashCase|Es.Important)?t.style.setProperty(e,n,r&Es.Important?"important":""):t.style[e]=n}removeStyle(t,e,n){n&Es.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,EB(n)):this.eventManager.addEventListener(t,e,EB(n))}}function DB(i){return"TEMPLATE"===i.tagName&&void 0!==i.content}class D7 extends qT{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=SB(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 XT extends qT{constructor(t,e,n,r,s=n.id){super(t),this.sharedStylesHost=e,this.removeStylesOnCompDestory=r,this.rendererUsageCount=0,this.styles=SB(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 TB extends XT{constructor(t,e,n,r,s){const o=r+"-"+n.id;super(t,e,n,s,o),this.contentAttr=function S7(i){return"_ngcontent-%COMP%".replace(YT,i)}(o),this.hostAttr=function E7(i){return"_nghost-%COMP%".replace(YT,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 T7=(()=>{class i extends bB{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)(ee(qt))},i.\u0275prov=Pe({token:i,factory:i.\u0275fac}),i})();const IB=["alt","control","meta","shift"],I7={"\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"},R7={alt:i=>i.altKey,control:i=>i.ctrlKey,meta:i=>i.metaKey,shift:i=>i.shiftKey};let k7=(()=>{class i extends bB{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(()=>$c().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."),IB.forEach(c=>{const d=n.indexOf(c);d>-1&&(n.splice(d,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=I7[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"),IB.forEach(o=>{o!==r&&(0,R7[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)(ee(qt))},i.\u0275prov=Pe({token:i,factory:i.\u0275fac}),i})();const L7=EN(g9,"browser",[{provide:hT,useValue:fB},{provide:mN,useValue:function P7(){WT.makeCurrent()},multi:!0},{provide:qt,useFactory:function F7(){return function s1(i){vv=i}(document),document},deps:[]}]),PB=new me(""),OB=[{provide:Hw,useClass:class b7{addToWindow(t){Rn.getAngularTestability=(n,r=!0)=>{const s=t.findTestabilityInTree(n,r);if(null==s)throw new Error("Could not find testability for element.");return s},Rn.getAllAngularTestabilities=()=>t.getAllTestabilities(),Rn.getAllAngularRootElements=()=>t.getAllRootElements(),Rn.frameworkStabilizers||(Rn.frameworkStabilizers=[]),Rn.frameworkStabilizers.push(n=>{const r=Rn.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?$c().isShadowRoot(e)?this.findTestabilityInTree(t,e.host,!0):this.findTestabilityInTree(t,e.parentElement,!0):null)}},deps:[]},{provide:xN,useClass:gT,deps:[gt,_T,Hw]},{provide:gT,useClass:gT,deps:[gt,_T,Hw]}],FB=[{provide:Iv,useValue:"root"},{provide:cl,useFactory:function O7(){return new cl},deps:[]},{provide:sM,useClass:T7,multi:!0,deps:[qt,gt,hT]},{provide:sM,useClass:k7,multi:!0,deps:[qt]},{provide:aM,useClass:aM,deps:[oM,Cy,cm,CB]},{provide:Gl,useExisting:aM},{provide:xB,useExisting:Cy},{provide:Cy,useClass:Cy,deps:[qt]},{provide:oM,useClass:oM,deps:[sM,gt]},{provide:class HY{},useClass:x7,deps:[]},[]];let LB=(()=>{class i{constructor(e){}static withServerTransition(e){return{ngModule:i,providers:[{provide:cm,useValue:e.appId},{provide:yB,useExisting:cm},y7]}}}return i.\u0275fac=function(e){return new(e||i)(ee(PB,12))},i.\u0275mod=en({type:i}),i.\u0275inj=Wt({providers:[...FB,...OB],imports:[co,_9]}),i})(),NB=(()=>{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)(ee(qt))},i.\u0275prov=Pe({token:i,factory:function(e){let n=null;return n=e?new e:function B7(){return new NB(ee(qt))}(),n},providedIn:"root"}),i})();typeof window<"u"&&window;let QT=(()=>{class i{}return i.\u0275fac=function(e){return new(e||i)},i.\u0275prov=Pe({token:i,factory:function(e){let n=null;return n=e?new(e||i):ee(VB),n},providedIn:"root"}),i})(),VB=(()=>{class i extends QT{constructor(e){super(),this._doc=e}sanitize(e,n){if(null==n)return null;switch(e){case Zn.NONE:return n;case Zn.HTML:return Sa(n,"HTML")?to(n):Qx(this._doc,String(n)).toString();case Zn.STYLE:return Sa(n,"Style")?to(n):n;case Zn.SCRIPT:if(Sa(n,"Script"))return to(n);throw new Error("unsafe value used in a script context");case Zn.URL:return Sa(n,"URL")?to(n):xh(String(n));case Zn.RESOURCE_URL:if(Sa(n,"ResourceURL"))return to(n);throw new Error(`unsafe value used in a resource URL context (see ${qu})`);default:throw new Error(`Unexpected SecurityContext ${e} (see ${qu})`)}}bypassSecurityTrustHtml(e){return function u1(i){return new o1(i)}(e)}bypassSecurityTrustStyle(e){return function h1(i){return new a1(i)}(e)}bypassSecurityTrustScript(e){return function f1(i){return new l1(i)}(e)}bypassSecurityTrustUrl(e){return function p1(i){return new c1(i)}(e)}bypassSecurityTrustResourceUrl(e){return function m1(i){return new Op(i)}(e)}}return i.\u0275fac=function(e){return new(e||i)(ee(qt))},i.\u0275prov=Pe({token:i,factory:function(e){let n=null;return n=e?new e:function $7(i){return new VB(i.get(qt))}(ee(Gi)),n},providedIn:"root"}),i})();function mt(...i){return Ni(i,Gu(i))}class Qe extends Te{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 fm=z(i=>function(){i(this),this.name="EmptyError",this.message="no elements in sequence"}),{isArray:G7}=Array,{getPrototypeOf:W7,prototype:j7,keys:Y7}=Object;function zB(i){if(1===i.length){const t=i[0];if(G7(t))return{args:t,keys:null};if(function q7(i){return i&&"object"==typeof i&&W7(i)===j7}(t)){const e=Y7(t);return{args:e.map(n=>t[n]),keys:e}}}return{args:i,keys:null}}const{isArray:X7}=Array;function JT(i){return tt(t=>function K7(i,t){return X7(t)?i(...t):i(t)}(i,t))}function HB(i,t){return i.reduce((e,n,r)=>(e[n]=t[r],e),{})}function Ra(...i){const t=Gu(i),e=M0(i),{args:n,keys:r}=zB(i);if(0===n.length)return Ni([],t);const s=new In(function Z7(i,t,e=ja){return n=>{$B(t,()=>{const{length:r}=i,s=new Array(r);let o=r,a=r;for(let l=0;l{const c=Ni(i[l],t);let d=!1;c.subscribe(qn(n,h=>{s[l]=h,d||(d=!0,a--),a||n.next(e(s.slice()))},()=>{--o||n.complete()}))},n)},n)}}(n,t,r?o=>HB(r,o):ja));return e?s.pipe(JT(e)):s}function $B(i,t,e){i?Xa(e,i,t):t()}function Sy(...i){return function Q7(){return bd(1)}()(Ni(i,Gu(i)))}function Ey(i){return new In(t=>{Mr(i()).subscribe(t)})}function pm(i,t){const e=dn(i)?i:()=>i,n=r=>r.error(e());return new In(t?r=>t.schedule(n,0,r):n)}function eI(){return ni((i,t)=>{let e=null;i._refCount++;const n=qn(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 GB extends In{constructor(t,e){super(),this.source=t,this.subjectFactory=e,this._subject=null,this._refCount=0,this._connection=null,d0(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 Qt;const e=this.getSubject();t.add(this.source.subscribe(qn(e,void 0,()=>{this._teardown(),e.complete()},n=>{this._teardown(),e.error(n)},()=>this._teardown()))),t.closed&&(this._connection=null,t=Qt.EMPTY)}return t}refCount(){return eI()(this)}}function ks(i,t){return ni((e,n)=>{let r=null,s=0,o=!1;const a=()=>o&&!r&&n.complete();e.subscribe(qn(n,l=>{r?.unsubscribe();let c=0;const d=s++;Mr(i(l,d)).subscribe(r=qn(n,h=>n.next(t?t(l,h,d,c++):h),()=>{r=null,a()}))},()=>{o=!0,a()}))})}function Oi(i){return i<=0?()=>_o:ni((t,e)=>{let n=0;t.subscribe(qn(e,r=>{++n<=i&&(e.next(r),i<=n&&e.complete())}))})}function Do(...i){const t=Gu(i);return ni((e,n)=>{(t?Sy(i,e,t):Sy(i,e)).subscribe(n)})}function gn(i,t){return ni((e,n)=>{let r=0;e.subscribe(qn(n,s=>i.call(t,s,r++)&&n.next(s)))})}function lM(i){return ni((t,e)=>{let n=!1;t.subscribe(qn(e,r=>{n=!0,e.next(r)},()=>{n||e.next(i),e.complete()}))})}function WB(i=J7){return ni((t,e)=>{let n=!1;t.subscribe(qn(e,r=>{n=!0,e.next(r)},()=>n?e.complete():e.error(i())))})}function J7(){return new fm}function iu(i,t){const e=arguments.length>=2;return n=>n.pipe(i?gn((r,s)=>i(r,s,n)):ja,Oi(1),e?lM(t):WB(()=>new fm))}function ru(i,t){return dn(t)?rr(i,t,1):rr(i,1)}function Vi(i,t,e){const n=dn(i)||t||e?{next:i,error:t,complete:e}:i;return n?ni((r,s)=>{var o;null===(o=n.subscribe)||void 0===o||o.call(n);let a=!0;r.subscribe(qn(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)}))}):ja}function jc(i){return ni((t,e)=>{let s,n=null,r=!1;n=t.subscribe(qn(e,void 0,void 0,o=>{s=Mr(i(o,jc(i)(t))),n?(n.unsubscribe(),n=null,s.subscribe(e)):r=!0})),r&&(n.unsubscribe(),n=null,s.subscribe(e))})}function tI(i,t){return ni(function eq(i,t,e,n,r){return(s,o)=>{let a=e,l=t,c=0;s.subscribe(qn(o,d=>{const h=c++;l=a?i(l,d,h):(a=!0,d),n&&o.next(l)},r&&(()=>{a&&o.next(l),o.complete()})))}}(i,t,arguments.length>=2,!0))}function nI(i){return i<=0?()=>_o:ni((t,e)=>{let n=[];t.subscribe(qn(e,r=>{n.push(r),i{for(const r of n)e.next(r);e.complete()},void 0,()=>{n=null}))})}function jB(i,t){const e=arguments.length>=2;return n=>n.pipe(i?gn((r,s)=>i(r,s,n)):ja,nI(1),e?lM(t):WB(()=>new fm))}function YB(i,t=!1){return ni((e,n)=>{let r=0;e.subscribe(qn(n,s=>{const o=i(s,r++);(o||t)&&n.next(s),!o&&n.complete()}))})}function qB(i){return tt(()=>i)}function su(i){return ni((t,e)=>{try{t.subscribe(e)}finally{e.add(i)}})}const _n="primary",Ay=Symbol("RouteTitle");class tq{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 tq(i)}function nq(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 KB(i){return Array.prototype.concat.apply([],i)}function ZB(i){return i.length>0?i[i.length-1]:null}function os(i,t){for(const e in i)i.hasOwnProperty(e)&&t(i[e],e)}function ou(i){return FD(i)?i:oy(i)?Ni(Promise.resolve(i)):mt(i)}const cM=!1,rq={exact:function e3(i,t,e){if(!kh(i.segments,t.segments)||!dM(i.segments,t.segments,e)||i.numberOfChildren!==t.numberOfChildren)return!1;for(const n in t.children)if(!i.children[n]||!e3(i.children[n],t.children[n],e))return!1;return!0},subset:t3},QB={exact:function sq(i,t){return Kl(i,t)},subset:function oq(i,t){return Object.keys(t).length<=Object.keys(i).length&&Object.keys(t).every(e=>XB(i[e],t[e]))},ignored:()=>!0};function JB(i,t,e){return rq[e.paths](i.root,t.root,e.matrixParams)&&QB[e.queryParams](i.queryParams,t.queryParams)&&!("exact"===e.fragment&&i.fragment!==t.fragment)}function t3(i,t,e){return n3(i,t,t.segments,e)}function n3(i,t,e,n){if(i.segments.length>e.length){const r=i.segments.slice(0,e.length);return!(!kh(r,e)||t.hasChildren()||!dM(r,e,n))}if(i.segments.length===e.length){if(!kh(i.segments,e)||!dM(i.segments,e,n))return!1;for(const r in t.children)if(!i.children[r]||!t3(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!!(kh(i.segments,r)&&dM(i.segments,r,n)&&i.children[_n])&&n3(i.children[_n],t,s,n)}}function dM(i,t,e){return t.every((n,r)=>QB[e](i[r].parameters,n.parameters))}class au{constructor(t=new Tn([],{}),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 cq.serialize(this)}}class Tn{constructor(t,e){this.segments=t,this.children=e,this.parent=null,os(e,(n,r)=>n.parent=this)}hasChildren(){return this.numberOfChildren>0}get numberOfChildren(){return Object.keys(this.children).length}toString(){return uM(this)}}class Dy{constructor(t,e){this.path=t,this.parameters=e}get parameterMap(){return this._parameterMap||(this._parameterMap=mm(this.parameters)),this._parameterMap}toString(){return o3(this)}}function kh(i,t){return i.length===t.length&&i.every((e,n)=>e.path===t[n].path)}let Ty=(()=>{class i{}return i.\u0275fac=function(e){return new(e||i)},i.\u0275prov=Pe({token:i,factory:function(){return new iI},providedIn:"root"}),i})();class iI{parse(t){const e=new vq(t);return new au(e.parseRootSegment(),e.parseQueryParams(),e.parseFragment())}serialize(t){const e=`/${Iy(t.root,!0)}`,n=function hq(i){const t=Object.keys(i).map(e=>{const n=i[e];return Array.isArray(n)?n.map(r=>`${hM(e)}=${hM(r)}`).join("&"):`${hM(e)}=${hM(n)}`}).filter(e=>!!e);return t.length?`?${t.join("&")}`:""}(t.queryParams);return`${e}${n}${"string"==typeof t.fragment?`#${function dq(i){return encodeURI(i)}(t.fragment)}`:""}`}}const cq=new iI;function uM(i){return i.segments.map(t=>o3(t)).join("/")}function Iy(i,t){if(!i.hasChildren())return uM(i);if(t){const e=i.children[_n]?Iy(i.children[_n],!1):"",n=[];return os(i.children,(r,s)=>{s!==_n&&n.push(`${s}:${Iy(r,!1)}`)}),n.length>0?`${e}(${n.join("//")})`:e}{const e=function lq(i,t){let e=[];return os(i.children,(n,r)=>{r===_n&&(e=e.concat(t(n,r)))}),os(i.children,(n,r)=>{r!==_n&&(e=e.concat(t(n,r)))}),e}(i,(n,r)=>r===_n?[Iy(i.children[_n],!1)]:[`${r}:${Iy(n,!1)}`]);return 1===Object.keys(i.children).length&&null!=i.children[_n]?`${uM(i)}/${e[0]}`:`${uM(i)}/(${e.join("//")})`}}function r3(i){return encodeURIComponent(i).replace(/%40/g,"@").replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",")}function hM(i){return r3(i).replace(/%3B/gi,";")}function rI(i){return r3(i).replace(/\(/g,"%28").replace(/\)/g,"%29").replace(/%26/gi,"&")}function fM(i){return decodeURIComponent(i)}function s3(i){return fM(i.replace(/\+/g,"%20"))}function o3(i){return`${rI(i.path)}${function uq(i){return Object.keys(i).map(t=>`;${rI(t)}=${rI(i[t])}`).join("")}(i.parameters)}`}const fq=/^[^\/()?;=#]+/;function pM(i){const t=i.match(fq);return t?t[0]:""}const pq=/^[^=?&#]+/,gq=/^[^&#]+/;class vq{constructor(t){this.url=t,this.remaining=t}parseRootSegment(){return this.consumeOptional("/"),""===this.remaining||this.peekStartsWith("?")||this.peekStartsWith("#")?new Tn([],{}):new Tn([],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[_n]=new Tn(t,e)),n}parseSegment(){const t=pM(this.remaining);if(""===t&&this.peekStartsWith(";"))throw new pe(4009,cM);return this.capture(t),new Dy(fM(t),this.parseMatrixParams())}parseMatrixParams(){const t={};for(;this.consumeOptional(";");)this.parseParam(t);return t}parseParam(t){const e=pM(this.remaining);if(!e)return;this.capture(e);let n="";if(this.consumeOptional("=")){const r=pM(this.remaining);r&&(n=r,this.capture(n))}t[fM(e)]=fM(n)}parseQueryParam(t){const e=function mq(i){const t=i.match(pq);return t?t[0]:""}(this.remaining);if(!e)return;this.capture(e);let n="";if(this.consumeOptional("=")){const o=function _q(i){const t=i.match(gq);return t?t[0]:""}(this.remaining);o&&(n=o,this.capture(n))}const r=s3(e),s=s3(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=pM(this.remaining),r=this.remaining[n.length];if("/"!==r&&")"!==r&&";"!==r)throw new pe(4010,cM);let s;n.indexOf(":")>-1?(s=n.slice(0,n.indexOf(":")),this.capture(s),this.capture(":")):t&&(s=_n);const o=this.parseChildren();e[s]=1===Object.keys(o).length?o[_n]:new Tn([],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 pe(4011,cM)}}function sI(i){return i.segments.length>0?new Tn([],{[_n]:i}):i}function mM(i){const t={};for(const n of Object.keys(i.children)){const s=mM(i.children[n]);(s.segments.length>0||s.hasChildren())&&(t[n]=s)}return function yq(i){if(1===i.numberOfChildren&&i.children[_n]){const t=i.children[_n];return new Tn(i.segments.concat(t.segments),t.children)}return i}(new Tn(i.segments,t))}function Ph(i){return i instanceof au}const oI=!1;function bq(i,t,e,n,r){if(0===e.length)return gm(t.root,t.root,t.root,n,r);const s=function u3(i){if("string"==typeof i[0]&&1===i.length&&"/"===i[0])return new d3(!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 os(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 d3(e,t,n)}(e);return s.toRoot()?gm(t.root,t.root,new Tn([],{}),n,r):function o(l){const c=function wq(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 h3(i,t,e){let n=i,r=t,s=e;for(;s>r;){if(s-=r,n=n.parent,!n)throw new pe(4005,oI&&"Invalid number of '../'");r=n.segments.length}return new _m(n,!1,r-s)}(e,n+(Ry(i.commands[0])?0:1),i.numberOfDoubleDots)}(s,t,i.snapshot?._urlSegment,l),d=c.processChildren?vm(c.segmentGroup,c.index,s.commands):aI(c.segmentGroup,c.index,s.commands);return gm(t.root,c.segmentGroup,d,n,r)}(i.snapshot?._lastPathIndex)}function Ry(i){return"object"==typeof i&&null!=i&&!i.outlets&&!i.segmentPath}function ky(i){return"object"==typeof i&&null!=i&&i.outlets}function gm(i,t,e,n,r){let o,s={};n&&os(n,(l,c)=>{s[c]=Array.isArray(l)?l.map(d=>`${d}`):`${l}`}),o=i===t?e:c3(i,t,e);const a=sI(mM(o));return new au(a,s,r)}function c3(i,t,e){const n={};return os(i.children,(r,s)=>{n[s]=r===t?e:c3(r,t,e)}),new Tn(i.segments,n)}class d3{constructor(t,e,n){if(this.isAbsolute=t,this.numberOfDoubleDots=e,this.commands=n,t&&n.length>0&&Ry(n[0]))throw new pe(4003,oI&&"Root segment cannot have matrix parameters");const r=n.find(ky);if(r&&r!==ZB(n))throw new pe(4004,oI&&"{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 aI(i,t,e){if(i||(i=new Tn([],{})),0===i.segments.length&&i.hasChildren())return vm(i,t,e);const n=function Cq(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(ky(a))break;const l=`${a}`,c=n0&&void 0===l)break;if(l&&c&&"object"==typeof c&&void 0===c.outlets){if(!p3(l,c,o))return s;n+=2}else{if(!p3(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]=aI(i.children[o],t,s))}),os(i.children,(s,o)=>{void 0===n[o]&&(r[o]=s)}),new Tn(i.segments,r)}}function lI(i,t,e){const n=i.segments.slice(0,t);let r=0;for(;r{"string"==typeof e&&(e=[e]),null!==e&&(t[n]=lI(new Tn([],{}),0,e))}),t}function f3(i){const t={};return os(i,(e,n)=>t[n]=`${e}`),t}function p3(i,t,e){return i==e.path&&Kl(t,e.parameters)}const Py="imperative";class Zl{constructor(t,e){this.id=t,this.url=e}}class cI extends Zl{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 Oh extends Zl{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 gM extends Zl{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 _M extends Zl{constructor(t,e,n,r){super(t,e),this.reason=n,this.code=r,this.type=16}}class dI extends Zl{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 Eq extends Zl{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 Aq extends Zl{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 Dq extends Zl{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 Tq extends Zl{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 Iq extends Zl{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 Rq{constructor(t){this.route=t,this.type=9}toString(){return`RouteConfigLoadStart(path: ${this.route.path})`}}class kq{constructor(t){this.route=t,this.type=10}toString(){return`RouteConfigLoadEnd(path: ${this.route.path})`}}class Pq{constructor(t){this.snapshot=t,this.type=11}toString(){return`ChildActivationStart(path: '${this.snapshot.routeConfig&&this.snapshot.routeConfig.path||""}')`}}class Oq{constructor(t){this.snapshot=t,this.type=12}toString(){return`ChildActivationEnd(path: '${this.snapshot.routeConfig&&this.snapshot.routeConfig.path||""}')`}}class Fq{constructor(t){this.snapshot=t,this.type=13}toString(){return`ActivationStart(path: '${this.snapshot.routeConfig&&this.snapshot.routeConfig.path||""}')`}}class Lq{constructor(t){this.snapshot=t,this.type=14}toString(){return`ActivationEnd(path: '${this.snapshot.routeConfig&&this.snapshot.routeConfig.path||""}')`}}class m3{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 Uq=(()=>{class i{createUrlTree(e,n,r,s,o,a){return bq(e||n.root,r,s,o,a)}}return i.\u0275fac=function(e){return new(e||i)},i.\u0275prov=Pe({token:i,factory:i.\u0275fac}),i})(),zq=(()=>{class i{}return i.\u0275fac=function(e){return new(e||i)},i.\u0275prov=Pe({token:i,factory:function(t){return Uq.\u0275fac(t)},providedIn:"root"}),i})();class g3{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=uI(t,this._root);return e?e.children.map(n=>n.value):[]}firstChild(t){const e=uI(t,this._root);return e&&e.children.length>0?e.children[0].value:null}siblings(t){const e=hI(t,this._root);return e.length<2?[]:e[e.length-2].children.map(r=>r.value).filter(r=>r!==t)}pathFromRoot(t){return hI(t,this._root).map(e=>e.value)}}function uI(i,t){if(i===t.value)return t;for(const e of t.children){const n=uI(i,e);if(n)return n}return null}function hI(i,t){if(i===t.value)return[t];for(const e of t.children){const n=hI(i,e);if(n.length)return n.unshift(t),n}return[]}class Yc{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 _3 extends g3{constructor(t,e){super(t),this.snapshot=e,fI(this,t)}toString(){return this.snapshot.toString()}}function v3(i,t){const e=function Hq(i,t){const o=new vM([],{},{},"",{},_n,t,null,i.root,-1,{});return new b3("",new Yc(o,[]))}(i,t),n=new Qe([new Dy("",{})]),r=new Qe({}),s=new Qe({}),o=new Qe({}),a=new Qe(""),l=new bm(n,r,o,a,s,_n,t,e.root);return l.snapshot=e.root,new _3(new Yc(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(tt(c=>c[Ay]))??mt(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(tt(t=>mm(t)))),this._paramMap}get queryParamMap(){return this._queryParamMap||(this._queryParamMap=this.queryParams.pipe(tt(t=>mm(t)))),this._queryParamMap}toString(){return this.snapshot?this.snapshot.toString():`Future(${this._futureSnapshot})`}}function y3(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 $q(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 vM{get title(){return this.data?.[Ay]}constructor(t,e,n,r,s,o,a,l,c,d,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=d,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 b3 extends g3{constructor(t,e){super(e),this.url=t,fI(this,e)}toString(){return x3(this._root)}}function fI(i,t){t.value._routerState=i,t.children.forEach(e=>fI(i,e))}function x3(i){const t=i.children.length>0?` { ${i.children.map(x3).join(", ")} } `:"";return`${i.value}${t}`}function pI(i){if(i.snapshot){const t=i.snapshot,e=i._futureSnapshot;i.snapshot=e,Kl(t.queryParams,e.queryParams)||i.queryParams.next(e.queryParams),t.fragment!==e.fragment&&i.fragment.next(e.fragment),Kl(t.params,e.params)||i.params.next(e.params),function iq(i,t){if(i.length!==t.length)return!1;for(let e=0;eKl(e.parameters,t[n].parameters))}(i.url,t.url);return e&&!(!i.parent!=!t.parent)&&(!i.parent||mI(i.parent,t.parent))}function Oy(i,t,e){if(e&&i.shouldReuseRoute(t.value,e.value.snapshot)){const n=e.value;n._futureSnapshot=t.value;const r=function Wq(i,t,e){return t.children.map(n=>{for(const r of e.children)if(i.shouldReuseRoute(n.value,r.value.snapshot))return Oy(i,n,r);return Oy(i,n)})}(i,t,e);return new Yc(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=>Oy(i,a)),o}}const n=function jq(i){return new bm(new Qe(i.url),new Qe(i.params),new Qe(i.queryParams),new Qe(i.fragment),new Qe(i.data),i.outlet,i.component,i)}(t.value),r=t.children.map(s=>Oy(i,s));return new Yc(n,r)}}const gI="ngNavigationCancelingError";function w3(i,t){const{redirectTo:e,navigationBehaviorOptions:n}=Ph(t)?{redirectTo:t,navigationBehaviorOptions:void 0}:t,r=M3(!1,0,t);return r.url=e,r.navigationBehaviorOptions=n,r}function M3(i,t,e){const n=new Error("NavigationCancelingError: "+(i||""));return n[gI]=!0,n.cancellationCode=t,e&&(n.url=e),n}function C3(i){return S3(i)&&Ph(i.url)}function S3(i){return i&&i[gI]}class Yq{constructor(){this.outlet=null,this.route=null,this.resolver=null,this.injector=null,this.children=new Fy,this.attachRef=null}}let Fy=(()=>{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 Yq,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=Pe({token:i,factory:i.\u0275fac,providedIn:"root"}),i})();const yM=!1;let E3=(()=>{class i{constructor(){this.activated=null,this._activatedRoute=null,this.name=_n,this.activateEvents=new $e,this.deactivateEvents=new $e,this.attachEvents=new $e,this.detachEvents=new $e,this.parentContexts=Lt(Fy),this.location=Lt(jr),this.changeDetector=Lt(Qn),this.environmentInjector=Lt(io)}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 pe(4012,yM);return this.activated.instance}get activatedRoute(){if(!this.activated)throw new pe(4012,yM);return this._activatedRoute}get activatedRouteData(){return this._activatedRoute?this._activatedRoute.snapshot.data:{}}detach(){if(!this.activated)throw new pe(4012,yM);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 pe(4013,yM);this._activatedRoute=e;const r=this.location,o=e.snapshot.component,a=this.parentContexts.getOrCreateContext(this.name).children,l=new qq(e,a,r.injector);if(n&&function Xq(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=ve({type:i,selectors:[["router-outlet"]],inputs:{name:"name"},outputs:{activateEvents:"activate",deactivateEvents:"deactivate",attachEvents:"attach",detachEvents:"detach"},exportAs:["outlet"],standalone:!0,features:[xi]}),i})();class qq{constructor(t,e,n){this.route=t,this.childContexts=e,this.parent=n}get(t,e){return t===bm?this.route:t===Fy?this.childContexts:this.parent.get(t,e)}}let _I=(()=>{class i{}return i.\u0275fac=function(e){return new(e||i)},i.\u0275cmp=ot({type:i,selectors:[["ng-component"]],standalone:!0,features:[KD],decls:1,vars:0,template:function(e,n){1&e&&Ie(0,"router-outlet")},dependencies:[E3],encapsulation:2}),i})();function A3(i,t){return i.providers&&!i._injector&&(i._injector=Lw(i.providers,t,`Route: ${i.path}`)),i._injector??t}function yI(i){const t=i.children&&i.children.map(yI),e=t?{...i,children:t}:{...i};return!e.component&&!e.loadComponent&&(t||e.loadChildren)&&e.outlet&&e.outlet!==_n&&(e.component=_I),e}function ka(i){return i.outlet||_n}function D3(i,t){const e=i.filter(n=>ka(n)===t);return e.push(...i.filter(n=>ka(n)!==t)),e}function Ly(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 eX{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),pI(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]}),os(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 Lq(s.value.snapshot))}),t.children.length&&this.forwardEvent(new Oq(t.value.snapshot))}activateRoutes(t,e,n){const r=t.value,s=e?e.value:null;if(pI(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),pI(a.route.value),this.activateChildRoutes(t,null,o.children)}else{const a=Ly(r.snapshot),l=a?.get($l)??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 T3{constructor(t){this.path=t,this.route=this.path[this.path.length-1]}}class bM{constructor(t,e){this.component=t,this.route=e}}function tX(i,t,e){const n=i._root;return Ny(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 Sr(i){return null!==Gf(i)}(i)?t.get(i):i:n}function Ny(i,t,e,n,r={canDeactivateChecks:[],canActivateChecks:[]}){const s=ym(t);return i.children.forEach(o=>{(function iX(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 rX(i,t,e){if("function"==typeof e)return e(i,t);switch(e){case"pathParamsChange":return!kh(i.url,t.url);case"pathParamsOrQueryParamsChange":return!kh(i.url,t.url)||!Kl(i.queryParams,t.queryParams);case"always":return!0;case"paramsOrQueryParamsChange":return!mI(i,t)||!Kl(i.queryParams,t.queryParams);default:return!mI(i,t)}}(o,s,s.routeConfig.runGuardsAndResolvers);l?r.canActivateChecks.push(new T3(n)):(s.data=o.data,s._resolvedData=o._resolvedData),Ny(i,t,s.component?a?a.children:null:e,n,r),l&&a&&a.outlet&&a.outlet.isActivated&&r.canDeactivateChecks.push(new bM(a.outlet.component,o))}else o&&By(t,a,r),r.canActivateChecks.push(new T3(n)),Ny(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]}),os(s,(o,a)=>By(o,e.getContext(a),r)),r}function By(i,t,e){const n=ym(i),r=i.value;os(n,(s,o)=>{By(s,r.component?t?t.children.getContext(o):null:t,e)}),e.canDeactivateChecks.push(new bM(r.component&&t&&t.outlet&&t.outlet.isActivated?t.outlet.component:null,r))}function Uy(i){return"function"==typeof i}function bI(i){return i instanceof fm||"EmptyError"===i?.name}const xM=Symbol("INITIAL_VALUE");function wm(){return ks(i=>Ra(i.map(t=>t.pipe(Oi(1),Do(xM)))).pipe(tt(t=>{for(const e of t)if(!0!==e){if(e===xM)return xM;if(!1===e||e instanceof au)return e}return!0}),gn(t=>t!==xM),Oi(1)))}function I3(i){return function ME(...i){return l0(i)}(Vi(t=>{if(Ph(t))throw w3(0,t)}),tt(t=>!0===t))}const xI={matched:!1,consumedSegments:[],remainingSegments:[],parameters:{},positionalParamSegments:{}};function R3(i,t,e,n,r){const s=wI(i,t,e);return s.matched?function xX(i,t,e,n){const r=t.canMatch;return r&&0!==r.length?mt(r.map(o=>{const a=xm(o,i);return ou(function dX(i){return i&&Uy(i.canMatch)}(a)?a.canMatch(t,e):i.runInContext(()=>a(t,e)))})).pipe(wm(),I3()):mt(!0)}(n=A3(t,n),t,e).pipe(tt(o=>!0===o?s:{...xI})):mt(s)}function wI(i,t,e){if(""===t.path)return"full"===t.pathMatch&&(i.hasChildren()||e.length>0)?{...xI}:{matched:!0,consumedSegments:[],remainingSegments:e,parameters:{},positionalParamSegments:{}};const r=(t.matcher||nq)(e,i,t);if(!r)return{...xI};const s={};os(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 wM(i,t,e,n){if(e.length>0&&function CX(i,t,e){return e.some(n=>MM(i,t,n)&&ka(n)!==_n)}(i,e,n)){const s=new Tn(t,function MX(i,t,e,n){const r={};r[_n]=n,n._sourceSegment=i,n._segmentIndexShift=t.length;for(const s of e)if(""===s.path&&ka(s)!==_n){const o=new Tn([],{});o._sourceSegment=i,o._segmentIndexShift=t.length,r[ka(s)]=o}return r}(i,t,n,new Tn(e,i.children)));return s._sourceSegment=i,s._segmentIndexShift=t.length,{segmentGroup:s,slicedSegments:[]}}if(0===e.length&&function SX(i,t,e){return e.some(n=>MM(i,t,n))}(i,e,n)){const s=new Tn(i.segments,function wX(i,t,e,n,r){const s={};for(const o of n)if(MM(i,e,o)&&!r[ka(o)]){const a=new Tn([],{});a._sourceSegment=i,a._segmentIndexShift=t.length,s[ka(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 Tn(i.segments,i.children);return r._sourceSegment=i,r._segmentIndexShift=t.length,{segmentGroup:r,slicedSegments:e}}function MM(i,t,e){return(!(i.hasChildren()||t.length>0)||"full"!==e.pathMatch)&&""===e.path}function k3(i,t,e,n){return!!(ka(i)===n||n!==_n&&MM(t,e,i))&&("**"===i.path||wI(t,i,e).matched)}function P3(i,t,e){return 0===t.length&&!i.children[e]}const CM=!1;class SM{constructor(t){this.segmentGroup=t||null}}class O3{constructor(t){this.urlTree=t}}function Vy(i){return pm(new SM(i))}function F3(i){return pm(new O3(i))}class TX{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=wM(this.urlTree.root,[],[],this.config).segmentGroup,e=new Tn(t.segments,t.children);return this.expandSegmentGroup(this.injector,this.config,e,_n).pipe(tt(s=>this.createUrlTree(mM(s),this.urlTree.queryParams,this.urlTree.fragment))).pipe(jc(s=>{if(s instanceof O3)return this.allowRedirects=!1,this.match(s.urlTree);throw s instanceof SM?this.noMatchError(s):s}))}match(t){return this.expandSegmentGroup(this.injector,this.config,t.root,_n).pipe(tt(r=>this.createUrlTree(mM(r),t.queryParams,t.fragment))).pipe(jc(r=>{throw r instanceof SM?this.noMatchError(r):r}))}noMatchError(t){return new pe(4002,CM)}createUrlTree(t,e,n){const r=sI(t);return new au(r,e,n)}expandSegmentGroup(t,e,n,r){return 0===n.segments.length&&n.hasChildren()?this.expandChildren(t,e,n).pipe(tt(s=>new Tn([],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 Ni(r).pipe(ru(s=>{const o=n.children[s],a=D3(e,s);return this.expandSegmentGroup(t,a,o,s).pipe(tt(l=>({segment:l,outlet:s})))}),tI((s,o)=>(s[o.outlet]=o.segment,s),{}),jB())}expandSegment(t,e,n,r,s,o){return Ni(n).pipe(ru(a=>this.expandSegmentAgainstRoute(t,e,n,a,r,s,o).pipe(jc(c=>{if(c instanceof SM)return mt(null);throw c}))),iu(a=>!!a),jc((a,l)=>{if(bI(a))return P3(e,r,s)?mt(new Tn([],{})):Vy(e);throw a}))}expandSegmentAgainstRoute(t,e,n,r,s,o,a){return k3(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):Vy(e):Vy(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("/")?F3(s):this.lineralizeSegments(n,s).pipe(rr(o=>{const a=new Tn(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:d}=wI(e,r,s);if(!a)return Vy(e);const h=this.applyRedirectCommands(l,r.redirectTo,d);return r.redirectTo.startsWith("/")?F3(h):this.lineralizeSegments(r,h).pipe(rr(p=>this.expandSegment(t,e,n,p.concat(c),o,!1)))}matchSegmentAgainstRoute(t,e,n,r,s){return"**"===n.path?(t=A3(n,t),n.loadChildren?(n._loadedRoutes?mt({routes:n._loadedRoutes,injector:n._loadedInjector}):this.configLoader.loadChildren(t,n)).pipe(tt(a=>(n._loadedRoutes=a.routes,n._loadedInjector=a.injector,new Tn(r,{})))):mt(new Tn(r,{}))):R3(e,n,r,t).pipe(ks(({matched:o,consumedSegments:a,remainingSegments:l})=>o?this.getChildConfig(t=n._injector??t,n,r).pipe(rr(d=>{const h=d.injector??t,p=d.routes,{segmentGroup:m,slicedSegments:g}=wM(e,a,l,p),b=new Tn(m.segments,m.children);if(0===g.length&&b.hasChildren())return this.expandChildren(h,p,b).pipe(tt(x=>new Tn(a,x)));if(0===p.length&&0===g.length)return mt(new Tn(a,{}));const v=ka(n)===s;return this.expandSegment(h,b,p,g,v?_n:s,!0).pipe(tt(M=>new Tn(a.concat(M.segments),M.children)))})):Vy(e)))}getChildConfig(t,e,n){return e.children?mt({routes:e.children,injector:t}):e.loadChildren?void 0!==e._loadedRoutes?mt({routes:e._loadedRoutes,injector:e._loadedInjector}):function bX(i,t,e,n){const r=t.canLoad;return void 0===r||0===r.length?mt(!0):mt(r.map(o=>{const a=xm(o,i);return ou(function oX(i){return i&&Uy(i.canLoad)}(a)?a.canLoad(t,e):i.runInContext(()=>a(t,e)))})).pipe(wm(),I3())}(t,e,n).pipe(rr(r=>r?this.configLoader.loadChildren(t,e).pipe(Vi(s=>{e._loadedRoutes=s.routes,e._loadedInjector=s.injector})):function AX(i){return pm(M3(CM,3))}())):mt({routes:[],injector:t})}lineralizeSegments(t,e){let n=[],r=e.root;for(;;){if(n=n.concat(r.segments),0===r.numberOfChildren)return mt(n);if(r.numberOfChildren>1||!r.children[_n])return t.redirectTo,pm(new pe(4e3,CM));r=r.children[_n]}}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 au(s,this.createQueryParams(e.queryParams,this.urlTree.queryParams),e.fragment)}createQueryParams(t,e){const n={};return os(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 os(e.children,(a,l)=>{o[l]=this.createSegmentGroup(t,a,n,r)}),new Tn(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 pe(4001,CM);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 RX{}class OX{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=wM(this.urlTree.root,[],[],this.config.filter(e=>void 0===e.redirectTo)).segmentGroup;return this.processSegmentGroup(this.injector,this.config,t,_n).pipe(tt(e=>{if(null===e)return null;const n=new vM([],Object.freeze({}),Object.freeze({...this.urlTree.queryParams}),this.urlTree.fragment,{},_n,this.rootComponentType,null,this.urlTree.root,-1,{}),r=new Yc(n,e),s=new b3(this.url,r);return this.inheritParamsAndData(s._root),s}))}inheritParamsAndData(t){const e=t.value,n=y3(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 Ni(Object.keys(n.children)).pipe(ru(r=>{const s=n.children[r],o=D3(e,r);return this.processSegmentGroup(t,o,s,r)}),tI((r,s)=>r&&s?(r.push(...s),r):null),YB(r=>null!==r),lM(null),jB(),tt(r=>{if(null===r)return null;const s=N3(r);return function FX(i){i.sort((t,e)=>t.value.outlet===_n?-1:e.value.outlet===_n?1:t.value.outlet.localeCompare(e.value.outlet))}(s),s}))}processSegment(t,e,n,r,s){return Ni(e).pipe(ru(o=>this.processSegmentAgainstRoute(o._injector??t,o,n,r,s)),iu(o=>!!o),jc(o=>{if(bI(o))return P3(n,r,s)?mt([]):mt(null);throw o}))}processSegmentAgainstRoute(t,e,n,r,s){if(e.redirectTo||!k3(e,n,r,s))return mt(null);let o;if("**"===e.path){const a=r.length>0?ZB(r).parameters:{},l=U3(n)+r.length;o=mt({snapshot:new vM(r,a,Object.freeze({...this.urlTree.queryParams}),this.urlTree.fragment,V3(e),ka(e),e.component??e._loadedComponent??null,e,B3(n),l,z3(e)),consumedSegments:[],remainingSegments:[]})}else o=R3(n,e,r,t).pipe(tt(({matched:a,consumedSegments:l,remainingSegments:c,parameters:d})=>{if(!a)return null;const h=U3(n)+l.length;return{snapshot:new vM(l,d,Object.freeze({...this.urlTree.queryParams}),this.urlTree.fragment,V3(e),ka(e),e.component??e._loadedComponent??null,e,B3(n),h,z3(e)),consumedSegments:l,remainingSegments:c}}));return o.pipe(ks(a=>{if(null===a)return mt(null);const{snapshot:l,consumedSegments:c,remainingSegments:d}=a;t=e._injector??t;const h=e._loadedInjector??t,p=function LX(i){return i.children?i.children:i.loadChildren?i._loadedRoutes:[]}(e),{segmentGroup:m,slicedSegments:g}=wM(n,c,d,p.filter(v=>void 0===v.redirectTo));if(0===g.length&&m.hasChildren())return this.processChildren(h,p,m).pipe(tt(v=>null===v?null:[new Yc(l,v)]));if(0===p.length&&0===g.length)return mt([new Yc(l,[])]);const b=ka(e)===s;return this.processSegment(h,p,m,g,b?_n:s).pipe(tt(v=>null===v?null:[new Yc(l,v)]))}))}}function NX(i){const t=i.value.routeConfig;return t&&""===t.path&&void 0===t.redirectTo}function N3(i){const t=[],e=new Set;for(const n of i){if(!NX(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=N3(n.children);t.push(new Yc(n.value,r))}return t.filter(n=>!e.has(n))}function B3(i){let t=i;for(;t._sourceSegment;)t=t._sourceSegment;return t}function U3(i){let t=i,e=t._segmentIndexShift??0;for(;t._sourceSegment;)t=t._sourceSegment,e+=t._segmentIndexShift??0;return e-1}function V3(i){return i.data||{}}function z3(i){return i.resolve||{}}function H3(i){return"string"==typeof i.title||null===i.title}function MI(i){return ks(t=>{const e=i(t);return e?Ni(e).pipe(tt(()=>t)):mt(t)})}const Mm=new me("ROUTES");let CI=(()=>{class i{constructor(){this.componentLoaders=new WeakMap,this.childrenLoaders=new WeakMap,this.compiler=Lt(gN)}loadComponent(e){if(this.componentLoaders.get(e))return this.componentLoaders.get(e);if(e._loadedComponent)return mt(e._loadedComponent);this.onLoadStartListener&&this.onLoadStartListener(e);const n=ou(e.loadComponent()).pipe(tt(G3),Vi(s=>{this.onLoadEndListener&&this.onLoadEndListener(e),e._loadedComponent=s}),su(()=>{this.componentLoaders.delete(e)})),r=new GB(n,()=>new Te).pipe(eI());return this.componentLoaders.set(e,r),r}loadChildren(e,n){if(this.childrenLoaders.get(n))return this.childrenLoaders.get(n);if(n._loadedRoutes)return mt({routes:n._loadedRoutes,injector:n._loadedInjector});this.onLoadStartListener&&this.onLoadStartListener(n);const s=this.loadModuleFactoryOrRoutes(n.loadChildren).pipe(tt(a=>{this.onLoadEndListener&&this.onLoadEndListener(n);let l,c,d=!1;Array.isArray(a)?c=a:(l=a.create(e).injector,c=KB(l.get(Mm,[],Ft.Self|Ft.Optional)));return{routes:c.map(yI),injector:l}}),su(()=>{this.childrenLoaders.delete(n)})),o=new GB(s,()=>new Te).pipe(eI());return this.childrenLoaders.set(n,o),o}loadModuleFactoryOrRoutes(e){return ou(e()).pipe(tt(G3),rr(n=>n instanceof T2||Array.isArray(n)?mt(n):Ni(this.compiler.compileModuleAsync(n))))}}return i.\u0275fac=function(e){return new(e||i)},i.\u0275prov=Pe({token:i,factory:i.\u0275fac,providedIn:"root"}),i})();function G3(i){return function WX(i){return i&&"object"==typeof i&&"default"in i}(i)?i.default:i}let AM=(()=>{class i{get hasRequestedNavigation(){return 0!==this.navigationId}constructor(){this.currentNavigation=null,this.lastSuccessfulNavigation=null,this.events=new Te,this.configLoader=Lt(CI),this.environmentInjector=Lt(io),this.urlSerializer=Lt(Ty),this.rootContexts=Lt(Fy),this.navigationId=0,this.afterPreactivation=()=>mt(void 0),this.rootComponentType=null,this.configLoader.onLoadEndListener=r=>this.events.next(new kq(r)),this.configLoader.onLoadStartListener=r=>this.events.next(new Rq(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 Qe({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:Py,restoredState:null,currentSnapshot:e.routerState.snapshot,targetSnapshot:null,currentRouterState:e.routerState,targetRouterState:null,guards:{canActivateChecks:[],canDeactivateChecks:[]},guardsResult:null}),this.transitions.pipe(gn(n=>0!==n.id),tt(n=>({...n,extractedUrl:e.urlHandlingStrategy.extract(n.rawUrl)})),ks(n=>{let r=!1,s=!1;return mt(n).pipe(Vi(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}}),ks(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 d="";return this.events.next(new _M(o.id,e.serializeUrl(n.rawUrl),d,0)),e.rawUrlTree=o.rawUrl,o.resolve(null),_o}if(e.urlHandlingStrategy.shouldProcessUrl(o.rawUrl))return W3(o.source)&&(e.browserUrlTree=o.extractedUrl),mt(o).pipe(ks(d=>{const h=this.transitions?.getValue();return this.events.next(new cI(d.id,this.urlSerializer.serialize(d.extractedUrl),d.source,d.restoredState)),h!==this.transitions?.getValue()?_o:Promise.resolve(d)}),function IX(i,t,e,n){return ks(r=>function DX(i,t,e,n,r){return new TX(i,t,e,n,r).apply()}(i,t,e,r.extractedUrl,n).pipe(tt(s=>({...r,urlAfterRedirects:s}))))}(this.environmentInjector,this.configLoader,this.urlSerializer,e.config),Vi(d=>{this.currentNavigation={...this.currentNavigation,finalUrl:d.urlAfterRedirects},n.urlAfterRedirects=d.urlAfterRedirects}),function UX(i,t,e,n,r){return rr(s=>function PX(i,t,e,n,r,s,o="emptyOnly"){return new OX(i,t,e,n,r,o,s).recognize().pipe(ks(a=>null===a?function kX(i){return new In(t=>t.error(i))}(new RX):mt(a)))}(i,t,e,s.urlAfterRedirects,n.serialize(s.urlAfterRedirects),n,r).pipe(tt(o=>({...s,targetSnapshot:o}))))}(this.environmentInjector,this.rootComponentType,e.config,this.urlSerializer,e.paramsInheritanceStrategy),Vi(d=>{if(n.targetSnapshot=d.targetSnapshot,"eager"===e.urlUpdateStrategy){if(!d.extras.skipLocationChange){const p=e.urlHandlingStrategy.merge(d.urlAfterRedirects,d.rawUrl);e.setBrowserUrl(p,d)}e.browserUrlTree=d.urlAfterRedirects}const h=new Eq(d.id,this.urlSerializer.serialize(d.extractedUrl),this.urlSerializer.serialize(d.urlAfterRedirects),d.targetSnapshot);this.events.next(h)}));if(l&&e.urlHandlingStrategy.shouldProcessUrl(e.rawUrlTree)){const{id:d,extractedUrl:h,source:p,restoredState:m,extras:g}=o,b=new cI(d,this.urlSerializer.serialize(h),p,m);this.events.next(b);const v=v3(h,this.rootComponentType).snapshot;return mt(n={...o,targetSnapshot:v,urlAfterRedirects:h,extras:{...g,skipLocationChange:!1,replaceUrl:!1}})}{const d="";return this.events.next(new _M(o.id,e.serializeUrl(n.extractedUrl),d,1)),e.rawUrlTree=o.rawUrl,o.resolve(null),_o}}),Vi(o=>{const a=new Aq(o.id,this.urlSerializer.serialize(o.extractedUrl),this.urlSerializer.serialize(o.urlAfterRedirects),o.targetSnapshot);this.events.next(a)}),tt(o=>n={...o,guards:tX(o.targetSnapshot,o.currentSnapshot,this.rootContexts)}),function hX(i,t){return rr(e=>{const{targetSnapshot:n,currentSnapshot:r,guards:{canActivateChecks:s,canDeactivateChecks:o}}=e;return 0===o.length&&0===s.length?mt({...e,guardsResult:!0}):function fX(i,t,e,n){return Ni(i).pipe(rr(r=>function yX(i,t,e,n,r){const s=t&&t.routeConfig?t.routeConfig.canDeactivate:null;return s&&0!==s.length?mt(s.map(a=>{const l=Ly(t)??r,c=xm(a,l);return ou(function cX(i){return i&&Uy(i.canDeactivate)}(c)?c.canDeactivate(i,t,e,n):l.runInContext(()=>c(i,t,e,n))).pipe(iu())})).pipe(wm()):mt(!0)}(r.component,r.route,e,t,n)),iu(r=>!0!==r,!0))}(o,n,r,i).pipe(rr(a=>a&&function sX(i){return"boolean"==typeof i}(a)?function pX(i,t,e,n){return Ni(t).pipe(ru(r=>Sy(function gX(i,t){return null!==i&&t&&t(new Pq(i)),mt(!0)}(r.route.parent,n),function mX(i,t){return null!==i&&t&&t(new Fq(i)),mt(!0)}(r.route,n),function vX(i,t,e){const n=t[t.length-1],s=t.slice(0,t.length-1).reverse().map(o=>function nX(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=>Ey(()=>mt(o.guards.map(l=>{const c=Ly(o.node)??e,d=xm(l,c);return ou(function lX(i){return i&&Uy(i.canActivateChild)}(d)?d.canActivateChild(n,i):c.runInContext(()=>d(n,i))).pipe(iu())})).pipe(wm())));return mt(s).pipe(wm())}(i,r.path,e),function _X(i,t,e){const n=t.routeConfig?t.routeConfig.canActivate:null;if(!n||0===n.length)return mt(!0);const r=n.map(s=>Ey(()=>{const o=Ly(t)??e,a=xm(s,o);return ou(function aX(i){return i&&Uy(i.canActivate)}(a)?a.canActivate(t,i):o.runInContext(()=>a(t,i))).pipe(iu())}));return mt(r).pipe(wm())}(i,r.route,e))),iu(r=>!0!==r,!0))}(n,s,i,t):mt(a)),tt(a=>({...e,guardsResult:a})))})}(this.environmentInjector,o=>this.events.next(o)),Vi(o=>{if(n.guardsResult=o.guardsResult,Ph(o.guardsResult))throw w3(0,o.guardsResult);const a=new Dq(o.id,this.urlSerializer.serialize(o.extractedUrl),this.urlSerializer.serialize(o.urlAfterRedirects),o.targetSnapshot,!!o.guardsResult);this.events.next(a)}),gn(o=>!!o.guardsResult||(e.restoreHistory(o),this.cancelNavigationTransition(o,"",3),!1)),MI(o=>{if(o.guards.canActivateChecks.length)return mt(o).pipe(Vi(a=>{const l=new Tq(a.id,this.urlSerializer.serialize(a.extractedUrl),this.urlSerializer.serialize(a.urlAfterRedirects),a.targetSnapshot);this.events.next(l)}),ks(a=>{let l=!1;return mt(a).pipe(function VX(i,t){return rr(e=>{const{targetSnapshot:n,guards:{canActivateChecks:r}}=e;if(!r.length)return mt(e);let s=0;return Ni(r).pipe(ru(o=>function zX(i,t,e,n){const r=i.routeConfig,s=i._resolve;return void 0!==r?.title&&!H3(r)&&(s[Ay]=r.title),function HX(i,t,e,n){const r=function $X(i){return[...Object.keys(i),...Object.getOwnPropertySymbols(i)]}(i);if(0===r.length)return mt({});const s={};return Ni(r).pipe(rr(o=>function GX(i,t,e,n){const r=Ly(t)??n,s=xm(i,r);return ou(s.resolve?s.resolve(t,e):r.runInContext(()=>s(t,e)))}(i[o],t,e,n).pipe(iu(),Vi(a=>{s[o]=a}))),nI(1),qB(s),jc(o=>bI(o)?_o:pm(o)))}(s,i,t,n).pipe(tt(o=>(i._resolvedData=o,i.data=y3(i,e).resolve,r&&H3(r)&&(i.data[Ay]=r.title),null)))}(o.route,n,i,t)),Vi(()=>s++),nI(1),rr(o=>s===r.length?mt(e):_o))})}(e.paramsInheritanceStrategy,this.environmentInjector),Vi({next:()=>l=!0,complete:()=>{l||(e.restoreHistory(a),this.cancelNavigationTransition(a,"",2))}}))}),Vi(a=>{const l=new Iq(a.id,this.urlSerializer.serialize(a.extractedUrl),this.urlSerializer.serialize(a.urlAfterRedirects),a.targetSnapshot);this.events.next(l)}))}),MI(o=>{const a=l=>{const c=[];l.routeConfig?.loadComponent&&!l.routeConfig._loadedComponent&&c.push(this.configLoader.loadComponent(l.routeConfig).pipe(Vi(d=>{l.component=d}),tt(()=>{})));for(const d of l.children)c.push(...a(d));return c};return Ra(a(o.targetSnapshot.root)).pipe(lM(),Oi(1))}),MI(()=>this.afterPreactivation()),tt(o=>{const a=function Gq(i,t,e){const n=Oy(i,t._root,e?e._root:void 0);return new _3(n,t)}(e.routeReuseStrategy,o.targetSnapshot,o.currentRouterState);return n={...o,targetRouterState:a}}),Vi(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)=>tt(n=>(new eX(t,n.targetRouterState,n.currentRouterState,e).activate(i),n)))(this.rootContexts,e.routeReuseStrategy,o=>this.events.next(o)),Oi(1),Vi({next:o=>{r=!0,this.lastSuccessfulNavigation=this.currentNavigation,e.navigated=!0,this.events.next(new Oh(o.id,this.urlSerializer.serialize(o.extractedUrl),this.urlSerializer.serialize(e.currentUrlTree))),e.titleStrategy?.updateTitle(o.targetRouterState.snapshot),o.resolve(!0)},complete:()=>{r=!0}}),su(()=>{r||s||this.cancelNavigationTransition(n,"",1),this.currentNavigation?.id===n.id&&(this.currentNavigation=null)}),jc(o=>{if(s=!0,S3(o)){C3(o)||(e.navigated=!0,e.restoreHistory(n,!0));const a=new gM(n.id,this.urlSerializer.serialize(n.extractedUrl),o.message,o.cancellationCode);if(this.events.next(a),C3(o)){const l=e.urlHandlingStrategy.merge(o.url,e.rawUrlTree),c={skipLocationChange:n.extras.skipLocationChange,replaceUrl:"eager"===e.urlUpdateStrategy||W3(n.source)};e.scheduleNavigation(l,Py,null,c,{resolve:n.resolve,reject:n.reject,promise:n.promise})}else n.resolve(!1)}else{e.restoreHistory(n,!0);const a=new dI(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 _o}))}))}cancelNavigationTransition(e,n,r){const s=new gM(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=Pe({token:i,factory:i.\u0275fac,providedIn:"root"}),i})();function W3(i){return i!==Py}let j3=(()=>{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===_n);return n}getResolvedTitleForRoute(e){return e.data[Ay]}}return i.\u0275fac=function(e){return new(e||i)},i.\u0275prov=Pe({token:i,factory:function(){return Lt(jX)},providedIn:"root"}),i})(),jX=(()=>{class i extends j3{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)(ee(NB))},i.\u0275prov=Pe({token:i,factory:i.\u0275fac,providedIn:"root"}),i})(),YX=(()=>{class i{}return i.\u0275fac=function(e){return new(e||i)},i.\u0275prov=Pe({token:i,factory:function(){return Lt(XX)},providedIn:"root"}),i})();class qX{shouldDetach(t){return!1}store(t,e){}shouldAttach(t){return!1}retrieve(t){return null}shouldReuseRoute(t,e){return t.routeConfig===e.routeConfig}}let XX=(()=>{class i extends qX{}return i.\u0275fac=function(){let t;return function(n){return(t||(t=si(i)))(n||i)}}(),i.\u0275prov=Pe({token:i,factory:i.\u0275fac,providedIn:"root"}),i})();const DM=new me("",{providedIn:"root",factory:()=>({})});let ZX=(()=>{class i{}return i.\u0275fac=function(e){return new(e||i)},i.\u0275prov=Pe({token:i,factory:function(){return Lt(QX)},providedIn:"root"}),i})(),QX=(()=>{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=Pe({token:i,factory:i.\u0275fac,providedIn:"root"}),i})();function JX(i){throw i}function eK(i,t,e){return t.parse("/")}const tK={paths:"exact",fragment:"ignored",matrixParams:"ignored",queryParams:"exact"},nK={paths:"subset",fragment:"ignored",matrixParams:"ignored",queryParams:"subset"};let Xo=(()=>{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=Lt(L6),this.isNgZoneEnabled=!1,this.options=Lt(DM,{optional:!0})||{},this.errorHandler=this.options.errorHandler||JX,this.malformedUriErrorHandler=this.options.malformedUriErrorHandler||eK,this.navigated=!1,this.lastSuccessfulId=-1,this.urlHandlingStrategy=Lt(ZX),this.routeReuseStrategy=Lt(YX),this.urlCreationStrategy=Lt(zq),this.titleStrategy=Lt(j3),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=KB(Lt(Mm,{optional:!0})??[]),this.navigationTransitions=Lt(AM),this.urlSerializer=Lt(Ty),this.location=Lt(_y),this.isNgZoneEnabled=Lt(gt)instanceof gt&>.isInAngularZone(),this.resetConfig(this.config),this.currentUrlTree=new au,this.rawUrlTree=this.currentUrlTree,this.browserUrlTree=this.currentUrlTree,this.routerState=v3(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),Py,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(yI),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 d=null;switch(a){case"merge":d={...this.currentUrlTree.queryParams,...s};break;case"preserve":d=this.currentUrlTree.queryParams;break;default:d=s||null}return null!==d&&(d=this.removeEmptyProps(d)),this.urlCreationStrategy.createUrlTree(r,this.routerState,this.currentUrlTree,e,d,c??null)}navigateByUrl(e,n={skipLocationChange:!1}){const r=Ph(e)?e:this.parseUrl(e),s=this.urlHandlingStrategy.merge(r,this.rawUrlTree);return this.scheduleNavigation(s,Py,null,n)}navigate(e,n={skipLocationChange:!1}){return function iK(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,d;return o?(a=o.resolve,l=o.reject,c=o.promise):c=new Promise((h,p)=>{a=h,l=p}),d="computed"===this.canceledNavigationResolution?r&&r.\u0275routerPageId?r.\u0275routerPageId:(this.browserPageId??0)+1:0,this.navigationTransitions.handleNavigationRequest({targetPageId:d,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=Pe({token:i,factory:i.\u0275fac,providedIn:"root"}),i})();class Y3{}let oK=(()=>{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(gn(e=>e instanceof Oh),ru(()=>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=Lw(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 Ni(r).pipe(bd())}preloadConfig(e,n){return this.preloadingStrategy.preload(n,()=>{let r;r=n.loadChildren&&void 0===n.canLoad?this.loader.loadChildren(e,n):mt(null);const s=r.pipe(rr(o=>null===o?mt(void 0):(n._loadedRoutes=o.routes,n._loadedInjector=o.injector,this.processRoutes(o.injector??e,o.routes))));return n.loadComponent&&!n._loadedComponent?Ni([s,this.loader.loadComponent(n)]).pipe(bd()):s})}}return i.\u0275fac=function(e){return new(e||i)(ee(Xo),ee(gN),ee(io),ee(Y3),ee(CI))},i.\u0275prov=Pe({token:i,factory:i.\u0275fac,providedIn:"root"}),i})();const AI=new me("");let q3=(()=>{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 cI?(this.store[this.lastId]=this.viewportScroller.getScrollPosition(),this.lastSource=e.navigationTrigger,this.restoredId=e.restoredState?e.restoredState.navigationId:0):e instanceof Oh&&(this.lastId=e.id,this.scheduleScrollEvent(e,this.urlSerializer.parse(e.urlAfterRedirects).fragment))})}consumeScrollEvents(){return this.transitions.events.subscribe(e=>{e instanceof m3&&(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 m3(e,"popstate"===this.lastSource?this.store[this.restoredId]:null,n))})},0)})}ngOnDestroy(){this.routerEventsSubscription?.unsubscribe(),this.scrollEventsSubscription?.unsubscribe()}}return i.\u0275fac=function(e){Co()},i.\u0275prov=Pe({token:i,factory:i.\u0275fac}),i})();var Ko=(()=>((Ko=Ko||{})[Ko.COMPLETE=0]="COMPLETE",Ko[Ko.FAILED=1]="FAILED",Ko[Ko.REDIRECTING=2]="REDIRECTING",Ko))();const Cm=!1;function lu(i,t){return{\u0275kind:i,\u0275providers:t}}const DI=new me("",{providedIn:"root",factory:()=>!1});function K3(){const i=Lt(Gi);return t=>{const e=i.get(dm);if(t!==e.components[0])return;const n=i.get(Xo),r=i.get(Z3);1===i.get(TI)&&n.initialNavigation(),i.get(Q3,null,Ft.Optional)?.setUpPreloading(),i.get(AI,null,Ft.Optional)?.init(),n.resetRootComponentType(e.componentTypes[0]),r.closed||(r.next(),r.complete(),r.unsubscribe())}}const Z3=new me(Cm?"bootstrap done indicator":"",{factory:()=>new Te}),TI=new me(Cm?"initial navigation":"",{providedIn:"root",factory:()=>1});function uK(){let i=[];return i=Cm?[{provide:Bp,multi:!0,useFactory:()=>{const t=Lt(Xo);return()=>t.events.subscribe(e=>{console.group?.(`Router Event: ${e.constructor.name}`),console.log(function Nq(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?.()})}}]:[],lu(1,i)}const Q3=new me(Cm?"router preloader":"");function hK(i){return lu(0,[{provide:Q3,useExisting:oK},{provide:Y3,useExisting:i}])}const zy=!1,J3=new me(zy?"router duplicate forRoot guard":"ROUTER_FORROOT_GUARD"),fK=[_y,{provide:Ty,useClass:iI},Xo,Fy,{provide:bm,useFactory:function X3(i){return i.routerState.root},deps:[Xo]},CI,zy?{provide:DI,useValue:!0}:[]];function pK(){return new CN("Router",Xo)}let eU=(()=>{class i{constructor(e){}static forRoot(e,n){return{ngModule:i,providers:[fK,zy&&n?.enableTracing?uK().\u0275providers:[],{provide:Mm,multi:!0,useValue:e},{provide:J3,useFactory:vK,deps:[[Xo,new Ss,new Ma]]},{provide:DM,useValue:n||{}},n?.useHash?{provide:Rh,useClass:C9}:{provide:Rh,useClass:YN},{provide:AI,useFactory:()=>{const i=Lt(UY),t=Lt(gt),e=Lt(DM),n=Lt(AM),r=Lt(Ty);return e.scrollOffset&&i.setOffset(e.scrollOffset),new q3(r,n,i,t,e)}},n?.preloadingStrategy?hK(n.preloadingStrategy).\u0275providers:[],{provide:CN,multi:!0,useFactory:pK},n?.initialNavigation?yK(n):[],[{provide:tU,useFactory:K3},{provide:MN,multi:!0,useExisting:tU}]]}}static forChild(e){return{ngModule:i,providers:[{provide:Mm,multi:!0,useValue:e}]}}}return i.\u0275fac=function(e){return new(e||i)(ee(J3,8))},i.\u0275mod=en({type:i}),i.\u0275inj=Wt({imports:[_I]}),i})();function vK(i){if(zy&&i)throw new pe(4007,"The Router was provided more than once. This can happen if 'forRoot' is used outside of the root injector. Lazy loaded modules should use RouterModule.forChild() instead.");return"guarded"}function yK(i){return["disabled"===i.initialNavigation?lu(3,[{provide:Vw,multi:!0,useFactory:()=>{const t=Lt(Xo);return()=>{t.setUpLocationChangeListener()}}},{provide:TI,useValue:2}]).\u0275providers:[],"enabledBlocking"===i.initialNavigation?lu(2,[{provide:TI,useValue:0},{provide:Vw,multi:!0,deps:[Gi],useFactory:t=>{const e=t.get(w9,Promise.resolve());return()=>e.then(()=>new Promise(n=>{const r=t.get(Xo),s=t.get(Z3);(function aK(i,t){i.events.pipe(gn(e=>e instanceof Oh||e instanceof gM||e instanceof dI||e instanceof _M),tt(e=>e instanceof Oh||e instanceof _M?Ko.COMPLETE:e instanceof gM&&(0===e.code||1===e.code)?Ko.REDIRECTING:Ko.FAILED),gn(e=>e!==Ko.REDIRECTING),Oi(1)).subscribe(()=>{t()})})(r,()=>{n(!0)}),t.get(AM).afterPreactivation=()=>(n(!0),s.closed?mt(void 0):s),r.initialNavigation()}))}}]).\u0275providers:[]]}const tU=new me(zy?"Router Initializer":""),xK=[];let wK=(()=>{class i{}return i.\u0275fac=function(e){return new(e||i)},i.\u0275mod=en({type:i}),i.\u0275inj=Wt({imports:[eU.forRoot(xK),eU]}),i})();function nU(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 nt(i){return function(){var t=this,e=arguments;return new Promise(function(n,r){var s=i.apply(t,e);function o(l){nU(s,n,r,o,a,"next",l)}function a(l){nU(s,n,r,o,a,"throw",l)}o(void 0)})}}function tn(i){return null!=i&&"false"!=`${i}`}function Ps(i,t=0){return function MK(i){return!isNaN(parseFloat(i))&&!isNaN(Number(i))}(i)?Number(i):t}function TM(i){return Array.isArray(i)?i:[i]}function _r(i){return null==i?"":"string"==typeof i?i:`${i}px`}function qc(i){return i instanceof vt?i.nativeElement:i}const CK=["addListener","removeListener"],SK=["addEventListener","removeEventListener"],EK=["on","off"];function To(i,t,e,n){if(dn(e)&&(n=e,e=void 0),n)return To(i,t,e).pipe(JT(n));const[r,s]=function TK(i){return dn(i.addEventListener)&&dn(i.removeEventListener)}(i)?SK.map(o=>a=>i[o](t,a,e)):function AK(i){return dn(i.addListener)&&dn(i.removeListener)}(i)?CK.map(iU(i,t)):function DK(i){return dn(i.on)&&dn(i.off)}(i)?EK.map(iU(i,t)):[];if(!r&&i_(i))return rr(o=>To(o,t,e))(Mr(i));if(!r)throw new TypeError("Invalid event target");return new In(o=>{const a=(...l)=>o.next(1s(a)})}function iU(i,t){return e=>n=>i[e](t,n)}class IK extends Qt{constructor(t,e){super()}schedule(t,e=0){return this}}const IM={setInterval(i,t,...e){const{delegate:n}=IM;return n?.setInterval?n.setInterval(i,t,...e):setInterval(i,t,...e)},clearInterval(i){const{delegate:t}=IM;return(t?.clearInterval||clearInterval)(i)},delegate:void 0};class II extends IK{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 IM.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&&IM.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,Kr(n,this),null!=t&&(this.id=this.recycleAsyncId(e,t,null)),this.delay=null,super.unsubscribe()}}}const Hy={schedule(i){let t=requestAnimationFrame,e=cancelAnimationFrame;const{delegate:n}=Hy;n&&(t=n.requestAnimationFrame,e=n.cancelAnimationFrame);const r=t(s=>{e=void 0,i(s)});return new Qt(()=>e?.(r))},requestAnimationFrame(...i){const{delegate:t}=Hy;return(t?.requestAnimationFrame||requestAnimationFrame)(...i)},cancelAnimationFrame(...i){const{delegate:t}=Hy;return(t?.cancelAnimationFrame||cancelAnimationFrame)(...i)},delegate:void 0},rU={now:()=>(rU.delegate||Date).now(),delegate:void 0};class $y{constructor(t,e=$y.now){this.schedulerActionCtor=t,this.now=e}schedule(t,e=0,n){return new this.schedulerActionCtor(this,t).schedule(n,e)}}$y.now=rU.now;class RI extends $y{constructor(t,e=$y.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 PK=new class kK extends RI{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 RK extends II{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=Hy.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&&(Hy.cancelAnimationFrame(e),t._scheduled=void 0)}});let kI,OK=1;const RM={};function sU(i){return i in RM&&(delete RM[i],!0)}const FK={setImmediate(i){const t=OK++;return RM[t]=!0,kI||(kI=Promise.resolve()),kI.then(()=>sU(t)&&i()),t},clearImmediate(i){sU(i)}},{setImmediate:LK,clearImmediate:NK}=FK,kM={setImmediate(...i){const{delegate:t}=kM;return(t?.setImmediate||LK)(...i)},clearImmediate(i){const{delegate:t}=kM;return(t?.clearImmediate||NK)(i)},delegate:void 0},PI=new class UK extends RI{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 BK extends II{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=kM.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&&(kM.clearImmediate(e),t._scheduled===e&&(t._scheduled=void 0))}}),Gy=new RI(II),VK=Gy;function OI(i=0,t,e=VK){let n=-1;return null!=t&&($u(t)?e=t:n=t),new In(r=>{let s=function HK(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 Wy(i,t=Gy){return function zK(i){return ni((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(qn(e,c=>{n=!0,r=c,s||Mr(i(c)).subscribe(s=qn(e,a,l))},()=>{o=!0,(!n||!s||s.closed)&&e.complete()}))})}(()=>OI(i,t))}function Ue(i){return ni((t,e)=>{Mr(i).subscribe(qn(e,()=>e.complete(),ms)),!e.closed&&t.subscribe(e)})}let FI;try{FI=typeof Intl<"u"&&Intl.v8BreakIterator}catch{FI=!1}let Sm,zi=(()=>{class i{constructor(e){this._platformId=e,this.isBrowser=this._platformId?function BY(i){return i===fB}(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&&!FI)&&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)(ee(hT))},i.\u0275prov=Pe({token:i,factory:i.\u0275fac,providedIn:"root"}),i})();const oU=["color","button","checkbox","date","datetime-local","email","file","hidden","image","month","number","password","radio","range","reset","search","submit","tel","text","time","url","week"];function aU(){if(Sm)return Sm;if("object"!=typeof document||!document)return Sm=new Set(oU),Sm;let i=document.createElement("input");return Sm=new Set(oU.filter(t=>(i.setAttribute("type",t),i.type===t))),Sm}let jy,PM,Lh,LI;function Fh(i){return function $K(){if(null==jy&&typeof window<"u")try{window.addEventListener("test",null,Object.defineProperty({},"passive",{get:()=>jy=!0}))}finally{jy=jy||!1}return jy}()?i:!!i.capture}function lU(){if(null==Lh){if("object"!=typeof document||!document||"function"!=typeof Element||!Element)return Lh=!1,Lh;if("scrollBehavior"in document.documentElement.style)Lh=!0;else{const i=Element.prototype.scrollTo;Lh=!!i&&!/\{\s*\[native code\]\s*\}/.test(i.toString())}}return Lh}function Yy(){if("object"!=typeof document||!document)return 0;if(null==PM){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),PM=0,0===i.scrollLeft&&(i.scrollLeft=1,PM=0===i.scrollLeft?1:2),i.remove()}return PM}function OM(){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 cu(i){return i.composedPath?i.composedPath()[0]:i.target}function NI(){return typeof __karma__<"u"&&!!__karma__||typeof jasmine<"u"&&!!jasmine||typeof jest<"u"&&!!jest||typeof Mocha<"u"&&!!Mocha}const jK=new me("cdk-dir-doc",{providedIn:"root",factory:function YK(){return Lt(qt)}}),qK=/^(ar|ckb|dv|he|iw|fa|nqo|ps|sd|ug|ur|yi|.*[-_](Adlm|Arab|Hebr|Nkoo|Rohg|Thaa))(?!.*[-_](Latn|Cyrl)($|-|_))($|-|_)/i;let Pa=(()=>{class i{constructor(e){this.value="ltr",this.change=new $e,e&&(this.value=function XK(i){const t=i?.toLowerCase()||"";return"auto"===t&&typeof navigator<"u"&&navigator?.language?qK.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)(ee(jK,8))},i.\u0275prov=Pe({token:i,factory:i.\u0275fac,providedIn:"root"}),i})(),qy=(()=>{class i{}return i.\u0275fac=function(e){return new(e||i)},i.\u0275mod=en({type:i}),i.\u0275inj=Wt({}),i})();const KK=["contentWrapper"],ZK=["*"],QK=new me("VIRTUAL_SCROLL_STRATEGY");let Xy=(()=>{class i{constructor(e,n,r){this._ngZone=e,this._platform=n,this._scrolled=new Te,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 In(n=>{this._globalSubscription||this._addGlobalListener();const r=e>0?this._scrolled.pipe(Wy(e)).subscribe(n):this._scrolled.subscribe(n);return this._scrolledCount++,()=>{r.unsubscribe(),this._scrolledCount--,this._scrolledCount||this._removeGlobalListener()}}):mt()}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(gn(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=qc(n),s=e.getElementRef().nativeElement;do{if(r==s)return!0}while(r=r.parentElement);return!1}_addGlobalListener(){this._globalSubscription=this._ngZone.runOutsideAngular(()=>To(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)(ee(gt),ee(zi),ee(qt,8))},i.\u0275prov=Pe({token:i,factory:i.\u0275fac,providedIn:"root"}),i})(),cU=(()=>{class i{constructor(e,n,r,s){this.elementRef=e,this.scrollDispatcher=n,this.ngZone=r,this.dir=s,this._destroyed=new Te,this._elementScrolled=new In(o=>this.ngZone.runOutsideAngular(()=>To(this.elementRef.nativeElement,"scroll").pipe(Ue(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!=Yy()?(null!=e.left&&(e.right=n.scrollWidth-n.clientWidth-e.left),2==Yy()?e.left=e.right:1==Yy()&&(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;lU()?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==Yy()?e==n?s.scrollWidth-s.clientWidth-s.scrollLeft:s.scrollLeft:o&&1==Yy()?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)(E(vt),E(Xy),E(gt),E(Pa,8))},i.\u0275dir=ve({type:i,selectors:[["","cdk-scrollable",""],["","cdkScrollable",""]],standalone:!0}),i})(),FM=(()=>{class i{constructor(e,n,r){this._platform=e,this._change=new Te,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(Wy(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)(ee(zi),ee(gt),ee(qt,8))},i.\u0275prov=Pe({token:i,factory:i.\u0275fac,providedIn:"root"}),i})();const dU=new me("VIRTUAL_SCROLLABLE");let tZ=(()=>{class i extends cU{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)(E(vt),E(Xy),E(gt),E(Pa,8))},i.\u0275dir=ve({type:i,features:[dt]}),i})();const iZ=typeof requestAnimationFrame<"u"?PK:PI;let rZ=(()=>{class i extends tZ{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=tn(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=Lt(zi),this._detachedSubject=new Te,this._renderedRangeSubject=new Te,this._orientation="vertical",this._appendOnly=!1,this.scrolledIndexChange=new In(d=>this._scrollStrategy.scrolledIndexChange.subscribe(h=>Promise.resolve().then(()=>this.ngZone.run(()=>d.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=Qt.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(Do(null),Wy(0,iZ)).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(Ue(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 nZ(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)(E(vt),E(Qn),E(gt),E(QK,8),E(Pa,8),E(Xy),E(FM),E(dU,8))},i.\u0275cmp=ot({type:i,selectors:[["cdk-virtual-scroll-viewport"]],viewQuery:function(e,n){if(1&e&&$n(KK,7),2&e){let r;At(r=Dt())&&(n._contentWrapper=r.first)}},hostAttrs:[1,"cdk-virtual-scroll-viewport"],hostVars:4,hostBindings:function(e,n){2&e&&ln("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:[Dn([{provide:cU,useFactory:(t,e)=>t||e,deps:[[new Ss,new xo(dU)],i]}]),dt,KD],ngContentSelectors:ZK,decls:4,vars:4,consts:[[1,"cdk-virtual-scroll-content-wrapper"],["contentWrapper",""],[1,"cdk-virtual-scroll-spacer"]],template:function(e,n){1&e&&(or(),G(0,"div",0,1),Yt(2),j(),Ie(3,"div",2)),2&e&&(V(3),qo("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})(),Ky=(()=>{class i{}return i.\u0275fac=function(e){return new(e||i)},i.\u0275mod=en({type:i}),i.\u0275inj=Wt({}),i})(),uU=(()=>{class i{}return i.\u0275fac=function(e){return new(e||i)},i.\u0275mod=en({type:i}),i.\u0275inj=Wt({imports:[qy,Ky,rZ,qy,Ky]}),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 Nh 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 sZ extends BI{constructor(t){super(),this.element=t instanceof vt?t.nativeElement:t}}class LM{constructor(){this._isDisposed=!1,this.attachDomPortal=null}hasAttached(){return!!this._attachedPortal}attach(t){return t instanceof Nh?(this._attachedPortal=t,this.attachComponentPortal(t)):t instanceof Em?(this._attachedPortal=t,this.attachTemplatePortal(t)):this.attachDomPortal&&t instanceof sZ?(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 oZ extends LM{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||Gi.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 LM{constructor(e,n,r){super(),this._componentFactoryResolver=e,this._viewContainerRef=n,this._isInitialized=!1,this.attached=new $e,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)(E($l),E(jr),E(qt))},i.\u0275dir=ve({type:i,selectors:[["","cdkPortalOutlet",""]],inputs:{portal:["cdkPortalOutlet","portal"]},outputs:{attached:"attached"},exportAs:["cdkPortalOutlet"],features:[dt]}),i})(),Bh=(()=>{class i{}return i.\u0275fac=function(e){return new(e||i)},i.\u0275mod=en({type:i}),i.\u0275inj=Wt({}),i})();function Zo(i,...t){return t.length?t.some(e=>i[e]):i.altKey||i.shiftKey||i.ctrlKey||i.metaKey}const hU=lU();class bZ{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=_r(-this._previousScrollPosition.left),t.style.top=_r(-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"),hU&&(n.scrollBehavior=r.scrollBehavior="auto"),window.scroll(this._previousScrollPosition.left,this._previousScrollPosition.top),hU&&(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 xZ{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(gn(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 fU{enable(){}disable(){}attach(){}}function VI(i,t){return t.some(e=>i.bottome.bottom||i.righte.right)}function pU(i,t){return t.some(e=>i.tope.bottom||i.lefte.right)}class wZ{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();VI(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 MZ=(()=>{class i{constructor(e,n,r,s){this._scrollDispatcher=e,this._viewportRuler=n,this._ngZone=r,this.noop=()=>new fU,this.close=o=>new xZ(this._scrollDispatcher,this._ngZone,this._viewportRuler,o),this.block=()=>new bZ(this._viewportRuler,this._document),this.reposition=o=>new wZ(this._scrollDispatcher,this._viewportRuler,this._ngZone,o),this._document=s}}return i.\u0275fac=function(e){return new(e||i)(ee(Xy),ee(FM),ee(gt),ee(qt))},i.\u0275prov=Pe({token:i,factory:i.\u0275fac,providedIn:"root"}),i})();class km{constructor(t){if(this.scrollStrategy=new fU,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 CZ{constructor(t,e){this.connectionPair=t,this.scrollableViewProperties=e}}let mU=(()=>{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)(ee(qt))},i.\u0275prov=Pe({token:i,factory:i.\u0275fac,providedIn:"root"}),i})(),SZ=(()=>{class i extends mU{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)(ee(qt),ee(gt,8))},i.\u0275prov=Pe({token:i,factory:i.\u0275fac,providedIn:"root"}),i})(),EZ=(()=>{class i extends mU{constructor(e,n,r){super(e),this._platform=n,this._ngZone=r,this._cursorStyleIsSet=!1,this._pointerDownListener=s=>{this._pointerDownEventTarget=cu(s)},this._clickListener=s=>{const o=cu(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 d=l[c];if(d._outsidePointerEvents.observers.length<1||!d.hasAttached())continue;if(d.overlayElement.contains(o)||d.overlayElement.contains(a))break;const h=d._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)(ee(qt),ee(zi),ee(gt,8))},i.\u0275prov=Pe({token:i,factory:i.\u0275fac,providedIn:"root"}),i})(),UM=(()=>{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||NI()){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 Te,this._outsidePointerEvents=new Te,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(Oi(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=_r(this._config.width),t.height=_r(this._config.height),t.minWidth=_r(this._config.minWidth),t.minHeight=_r(this._config.minHeight),t.maxWidth=_r(this._config.maxWidth),t.maxHeight=_r(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=TM(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(Ue(Cr(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 gU="cdk-overlay-connected-position-bounding-box",AZ=/([A-Za-z%]+)$/;class DZ{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 Te,this._resizeSubscription=Qt.EMPTY,this._offsetX=0,this._offsetY=0,this._appliedPanelClasses=[],this.positionChanges=this._positionChanges,this.setOrigin(t)}attach(t){this._validatePositions(),t.hostElement.classList.add(gU),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),d=this._getOverlayFit(c,e,n,a);if(d.isCompletelyWithinViewport)return this._isPushed=!1,void this._applyPosition(a,l);this._canFitWithFlexibleDimensions(d,c,n)?s.push({position:a,origin:l,overlayRect:e,boundingBoxRect:this._calculateBoundingBoxRect(l,a)}):(!o||o.overlayFit.visibleAreal&&(l=d,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&&Uh(this._boundingBox.style,{top:"",left:"",right:"",bottom:"",height:"",width:"",alignItems:"",justifyContent:""}),this._pane&&this._resetOverlayElementStyles(),this._overlayRef&&this._overlayRef.hostElement.classList.remove(gU),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=vU(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=_U(this._overlayRef.getConfig().minHeight),a=_U(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=vU(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 d=0,h=0;return d=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,d=t.x-this._viewportMargin;else if("start"===e.overlayX&&!r||"end"===e.overlayX&&r)h=t.x,d=n.right-t.x;else{const m=Math.min(n.right-t.x+n.left,t.x),g=this._lastBoundingBoxSize.width;d=2*m,h=t.x-m,d>g&&!this._isInitialRender&&!this._growAfterOpen&&(h=t.x-g/2)}return{top:o,left:h,bottom:a,right:p,width:d,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=_r(n.height),r.top=_r(n.top),r.bottom=_r(n.bottom),r.width=_r(n.width),r.left=_r(n.left),r.right=_r(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=_r(s)),o&&(r.maxWidth=_r(o))}this._lastBoundingBoxSize=n,Uh(this._boundingBox.style,r)}_resetBoundingBoxStyles(){Uh(this._boundingBox.style,{top:"0",left:"0",right:"0",bottom:"0",height:"",width:"",alignItems:"",justifyContent:""})}_resetOverlayElementStyles(){Uh(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 d=this._viewportRuler.getViewportScrollPosition();Uh(n,this._getExactOverlayY(e,t,d)),Uh(n,this._getExactOverlayX(e,t,d))}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=_r(o.maxHeight):s&&(n.maxHeight="")),o.maxWidth&&(r?n.maxWidth=_r(o.maxWidth):s&&(n.maxWidth="")),Uh(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=_r(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=_r(s.x),r}_getScrollVisibility(){const t=this._getOriginRect(),e=this._pane.getBoundingClientRect(),n=this._scrollables.map(r=>r.getElementRef().nativeElement.getBoundingClientRect());return{isOriginClipped:pU(t,n),isOriginOutsideView:VI(t,n),isOverlayClipped:pU(e,n),isOverlayOutsideView:VI(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&&TM(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 vt)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 Uh(i,t){for(let e in t)t.hasOwnProperty(e)&&(i[e]=t[e]);return i}function _U(i){if("number"!=typeof i&&null!=i){const[t,e]=i.split(AZ);return e&&"px"!==e?null:parseFloat(t)}return i||null}function vU(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 yU="cdk-global-overlay-wrapper";class bU{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(yU),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),d=this._xPosition,h=this._xOffset,p="rtl"===this._overlayRef.getConfig().direction;let m="",g="",b="";l?b="flex-start":"center"===d?(b="center",p?g=h:m=h):p?"left"===d||"end"===d?(b="flex-end",m=h):("right"===d||"start"===d)&&(b="flex-start",g=h):"left"===d||"start"===d?(b="flex-start",m=h):("right"===d||"end"===d)&&(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(yU),n.justifyContent=n.alignItems=t.marginTop=t.marginBottom=t.marginLeft=t.marginRight=t.position="",this._overlayRef=null,this._isDisposed=!0}}let TZ=(()=>{class i{constructor(e,n,r,s){this._viewportRuler=e,this._document=n,this._platform=r,this._overlayContainer=s}global(){return new bU}flexibleConnectedTo(e){return new DZ(e,this._viewportRuler,this._document,this._platform,this._overlayContainer)}}return i.\u0275fac=function(e){return new(e||i)(ee(FM),ee(qt),ee(zi),ee(UM))},i.\u0275prov=Pe({token:i,factory:i.\u0275fac,providedIn:"root"}),i})(),IZ=0,as=(()=>{class i{constructor(e,n,r,s,o,a,l,c,d,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=d,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 Qy(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-"+IZ++,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(dm)),new oZ(e,this._componentFactoryResolver,this._appRef,this._injector,this._document)}}return i.\u0275fac=function(e){return new(e||i)(ee(MZ),ee(UM),ee($l),ee(TZ),ee(SZ),ee(Gi),ee(gt),ee(qt),ee(Pa),ee(_y),ee(EZ),ee(kr,8))},i.\u0275prov=Pe({token:i,factory:i.\u0275fac,providedIn:"root"}),i})();const RZ=[{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"}],xU=new me("cdk-connected-overlay-scroll-strategy");let zI=(()=>{class i{constructor(e){this.elementRef=e}}return i.\u0275fac=function(e){return new(e||i)(E(vt))},i.\u0275dir=ve({type:i,selectors:[["","cdk-overlay-origin",""],["","overlay-origin",""],["","cdkOverlayOrigin",""]],exportAs:["cdkOverlayOrigin"],standalone:!0}),i})(),wU=(()=>{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=tn(e)}get lockPosition(){return this._lockPosition}set lockPosition(e){this._lockPosition=tn(e)}get flexibleDimensions(){return this._flexibleDimensions}set flexibleDimensions(e){this._flexibleDimensions=tn(e)}get growAfterOpen(){return this._growAfterOpen}set growAfterOpen(e){this._growAfterOpen=tn(e)}get push(){return this._push}set push(e){this._push=tn(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=Qt.EMPTY,this._attachSubscription=Qt.EMPTY,this._detachSubscription=Qt.EMPTY,this._positionSubscription=Qt.EMPTY,this.viewportMargin=0,this.open=!1,this.disableClose=!1,this.backdropClick=new $e,this.positionChange=new $e,this.attach=new $e,this.detach=new $e,this.overlayKeydown=new $e,this.overlayOutsideClick=new $e,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=RZ);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&&!Zo(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 zI?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(YB(()=>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)(E(as),E(Eo),E(jr),E(xU),E(Pa,8))},i.\u0275dir=ve({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:[xi]}),i})();const PZ={provide:xU,deps:[as],useFactory:function kZ(i){return()=>i.scrollStrategies.reposition()}};let Pm=(()=>{class i{}return i.\u0275fac=function(e){return new(e||i)},i.\u0275mod=en({type:i}),i.\u0275inj=Wt({providers:[as,PZ],imports:[qy,Bh,uU,uU]}),i})();function gl(i,t=Gy){return ni((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,d=t.now();if(d{s=c,o=t.now(),r||(r=t.schedule(l,i),n.add(r))},()=>{a(),n.complete()},void 0,()=>{s=r=null}))})}function MU(i){return gn((t,e)=>i<=e)}function Ql(i,t=ja){return i=i??OZ,ni((e,n)=>{let r,s=!0;e.subscribe(qn(n,o=>{const a=t(o);(s||!i(r,a))&&(s=!1,r=a,n.next(o))}))})}function OZ(i,t){return i===t}let CU=(()=>{class i{create(e){return typeof MutationObserver>"u"?null:new MutationObserver(e)}}return i.\u0275fac=function(e){return new(e||i)},i.\u0275prov=Pe({token:i,factory:i.\u0275fac,providedIn:"root"}),i})(),FZ=(()=>{class i{constructor(e){this._mutationObserverFactory=e,this._observedElements=new Map}ngOnDestroy(){this._observedElements.forEach((e,n)=>this._cleanupObserver(n))}observe(e){const n=qc(e);return new In(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 Te,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)(ee(CU))},i.\u0275prov=Pe({token:i,factory:i.\u0275fac,providedIn:"root"}),i})(),SU=(()=>{class i{get disabled(){return this._disabled}set disabled(e){this._disabled=tn(e),this._disabled?this._unsubscribe():this._subscribe()}get debounce(){return this._debounce}set debounce(e){this._debounce=Ps(e),this._subscribe()}constructor(e,n,r){this._contentObserver=e,this._elementRef=n,this._ngZone=r,this.event=new $e,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(gl(this.debounce)):e).subscribe(this.event)})}_unsubscribe(){this._currentSubscription?.unsubscribe()}}return i.\u0275fac=function(e){return new(e||i)(E(FZ),E(vt),E(gt))},i.\u0275dir=ve({type:i,selectors:[["","cdkObserveContent",""]],inputs:{disabled:["cdkObserveContentDisabled","disabled"],debounce:"debounce"},outputs:{event:"cdkObserveContent"},exportAs:["cdkObserveContent"]}),i})(),HI=(()=>{class i{}return i.\u0275fac=function(e){return new(e||i)},i.\u0275mod=en({type:i}),i.\u0275inj=Wt({providers:[CU]}),i})();const EU=new Set;let Om,LZ=(()=>{class i{constructor(e){this._platform=e,this._matchMedia=this._platform.isBrowser&&window.matchMedia?window.matchMedia.bind(window):BZ}matchMedia(e){return(this._platform.WEBKIT||this._platform.BLINK)&&function NZ(i){if(!EU.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),EU.add(i))}catch(t){console.error(t)}}(e),this._matchMedia(e)}}return i.\u0275fac=function(e){return new(e||i)(ee(zi))},i.\u0275prov=Pe({token:i,factory:i.\u0275fac,providedIn:"root"}),i})();function BZ(i){return{matches:"all"===i||""===i,media:i,addListener:()=>{},removeListener:()=>{}}}let $I=(()=>{class i{constructor(e,n){this._mediaMatcher=e,this._zone=n,this._queries=new Map,this._destroySubject=new Te}ngOnDestroy(){this._destroySubject.next(),this._destroySubject.complete()}isMatched(e){return AU(TM(e)).some(r=>this._registerQuery(r).mql.matches)}observe(e){let s=Ra(AU(TM(e)).map(o=>this._registerQuery(o).observable));return s=Sy(s.pipe(Oi(1)),s.pipe(MU(1),gl(0))),s.pipe(tt(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 In(o=>{const a=l=>this._zone.run(()=>o.next(l));return n.addListener(a),()=>{n.removeListener(a)}}).pipe(Do(n),tt(({matches:o})=>({query:e,matches:o})),Ue(this._destroySubject)),mql:n};return this._queries.set(e,s),s}}return i.\u0275fac=function(e){return new(e||i)(ee(LZ),ee(gt))},i.\u0275prov=Pe({token:i,factory:i.\u0275fac,providedIn:"root"}),i})();function AU(i){return i.map(t=>t.split(",")).reduce((t,e)=>t.concat(e)).map(t=>t.trim())}function VM(i,t){return(i.getAttribute(t)||"").match(/\S+/g)||[]}const TU="cdk-describedby-message",zM="cdk-describedby-host";let GI=0,HZ=(()=>{class i{constructor(e,n){this._platform=n,this._messageRegistry=new Map,this._messagesContainer=null,this._id=""+GI++,this._document=e,this._id=Lt(cm)+"-"+GI++}describe(e,n,r){if(!this._canBeDescribed(e,n))return;const s=WI(n,r);"string"!=typeof n?(IU(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=WI(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(`[${zM}="${this._id}"]`);for(let n=0;n0!=r.indexOf(TU));e.setAttribute("aria-describedby",n.join(" "))}_addMessageReference(e,n){const r=this._messageRegistry.get(n);(function VZ(i,t,e){const n=VM(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(zM,this._id),r.referenceCount++}_removeMessageReference(e,n){const r=this._messageRegistry.get(n);r.referenceCount--,function zZ(i,t,e){const r=VM(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(zM)}_isElementDescribedByMessage(e,n){const r=VM(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)(ee(qt),ee(zi))},i.\u0275prov=Pe({token:i,factory:i.\u0275fac,providedIn:"root"}),i})();function WI(i,t){return"string"==typeof i?`${t||""}/${i}`:i}function IU(i,t){i.id||(i.id=`${TU}-${t}-${GI++}`)}class RU{constructor(t){this._items=t,this._activeItemIndex=-1,this._activeItem=null,this._wrap=!1,this._letterKeyStream=new Te,this._typeaheadSubscription=Qt.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 Te,this.change=new Te,t instanceof om&&(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(Vi(e=>this._pressedLetters.push(e)),gl(t),gn(()=>this._pressedLetters.length>0),tt(()=>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 om?this._items.toArray():this._items}}class $Z extends RU{setActiveItem(t){this.activeItem&&this.activeItem.setInactiveStyles(),super.setActiveItem(t),this.activeItem&&this.activeItem.setActiveStyles()}}class kU extends RU{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 HM=(()=>{class i{constructor(e){this._platform=e}isDisabled(e){return e.hasAttribute("disabled")}isVisible(e){return function WZ(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 GZ(i){try{return i.frameElement}catch{return null}}(function JZ(i){return i.ownerDocument&&i.ownerDocument.defaultView||window}(e));if(n&&(-1===OU(n)||!this.isVisible(n)))return!1;let r=e.nodeName.toLowerCase(),s=OU(e);return e.hasAttribute("contenteditable")?-1!==s:!("iframe"===r||"object"===r||this._platform.WEBKIT&&this._platform.IOS&&!function ZZ(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 QZ(i){return!function YZ(i){return function XZ(i){return"input"==i.nodeName.toLowerCase()}(i)&&"hidden"==i.type}(i)&&(function jZ(i){let t=i.nodeName.toLowerCase();return"input"===t||"select"===t||"button"===t||"textarea"===t}(i)||function qZ(i){return function KZ(i){return"a"==i.nodeName.toLowerCase()}(i)&&i.hasAttribute("href")}(i)||i.hasAttribute("contenteditable")||PU(i))}(e)&&!this.isDisabled(e)&&(n?.ignoreVisibility||this.isVisible(e))}}return i.\u0275fac=function(e){return new(e||i)(ee(zi))},i.\u0275prov=Pe({token:i,factory:i.\u0275fac,providedIn:"root"}),i})();function PU(i){if(!i.hasAttribute("tabindex")||void 0===i.tabIndex)return!1;let t=i.getAttribute("tabindex");return!(!t||isNaN(parseInt(t,10)))}function OU(i){if(!PU(i))return null;const t=parseInt(i.getAttribute("tabindex")||"",10);return isNaN(t)?-1:t}class eQ{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(Oi(1)).subscribe(t)}}let jI=(()=>{class i{constructor(e,n,r){this._checker=e,this._ngZone=n,this._document=r}create(e,n=!1){return new eQ(e,this._checker,this._ngZone,this._document,n)}}return i.\u0275fac=function(e){return new(e||i)(ee(HM),ee(gt),ee(qt))},i.\u0275prov=Pe({token:i,factory:i.\u0275fac,providedIn:"root"}),i})();function YI(i){return 0===i.buttons||0===i.offsetX&&0===i.offsetY}function qI(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 tQ=new me("cdk-input-modality-detector-options"),nQ={ignoreKeys:[18,17,224,91,16]},Fm=Fh({passive:!0,capture:!0});let iQ=(()=>{class i{get mostRecentModality(){return this._modality.value}constructor(e,n,r,s){this._platform=e,this._mostRecentTarget=null,this._modality=new Qe(null),this._lastTouchMs=0,this._onKeydown=o=>{this._options?.ignoreKeys?.some(a=>a===o.keyCode)||(this._modality.next("keyboard"),this._mostRecentTarget=cu(o))},this._onMousedown=o=>{Date.now()-this._lastTouchMs<650||(this._modality.next(YI(o)?"keyboard":"mouse"),this._mostRecentTarget=cu(o))},this._onTouchstart=o=>{qI(o)?this._modality.next("keyboard"):(this._lastTouchMs=Date.now(),this._modality.next("touch"),this._mostRecentTarget=cu(o))},this._options={...nQ,...s},this.modalityDetected=this._modality.pipe(MU(1)),this.modalityChanged=this.modalityDetected.pipe(Ql()),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)(ee(zi),ee(gt),ee(qt),ee(tQ,8))},i.\u0275prov=Pe({token:i,factory:i.\u0275fac,providedIn:"root"}),i})();const rQ=new me("liveAnnouncerElement",{providedIn:"root",factory:function sQ(){return null}}),oQ=new me("LIVE_ANNOUNCER_DEFAULT_OPTIONS");let aQ=0,XI=(()=>{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 Te,this._rootNodeFocusAndBlurListener=a=>{for(let c=cu(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=qc(e);if(!this._platform.isBrowser||1!==r.nodeType)return mt(null);const s=function WK(i){if(function GK(){if(null==LI){const i=typeof document<"u"?document.head:null;LI=!(!i||!i.createShadowRoot&&!i.attachShadow)}return LI}()){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 Te,rootNode:s};return this._elementInfo.set(r,a),this._registerGlobalListeners(a),a.subject}stopMonitoring(e){const n=qc(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=qc(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=cu(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,$M),n.addEventListener("blur",this._rootNodeFocusAndBlurListener,$M)}),this._rootNodeFocusListenerCount.set(n,r+1),1==++this._monitoredElementCount&&(this._ngZone.runOutsideAngular(()=>{this._getWindow().addEventListener("focus",this._windowFocusListener)}),this._inputModalityDetector.modalityDetected.pipe(Ue(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,$M),n.removeEventListener("blur",this._rootNodeFocusAndBlurListener,$M),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=Lt($I).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,LU,NU),this._hasCheckedHighContrastMode=!0;const n=this.getHighContrastMode();1===n?e.add(KI,LU):2===n&&e.add(KI,NU)}}}return i.\u0275fac=function(e){return new(e||i)(ee(zi),ee(qt))},i.\u0275prov=Pe({token:i,factory:i.\u0275fac,providedIn:"root"}),i})(),UU=(()=>{class i{constructor(e){e._applyBodyHighContrastModeCssClasses()}}return i.\u0275fac=function(e){return new(e||i)(ee(BU))},i.\u0275mod=en({type:i}),i.\u0275inj=Wt({imports:[HI]}),i})();function cQ(i,t){}class GM{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 VU=(()=>{class i extends LM{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=d=>{this._portalOutlet.hasAttached();const h=this._portalOutlet.attachDomPortal(d);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=OM(),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=OM();return e===n||e.contains(n)}_initializeFocusTrap(){this._focusTrap=this._focusTrapFactory.create(this._elementRef.nativeElement),this._document&&(this._elementFocusedBeforeDialogWasOpened=OM())}_handleBackdropClicks(){this._overlayRef.backdropClick().subscribe(()=>{this._config.disableClose&&this._recaptureFocus()})}}return i.\u0275fac=function(e){return new(e||i)(E(vt),E(jI),E(qt,8),E(GM),E(HM),E(gt),E(Qy),E(Xc))},i.\u0275cmp=ot({type:i,selectors:[["cdk-dialog-container"]],viewQuery:function(e,n){if(1&e&&$n(Am,7),2&e){let r;At(r=Dt())&&(n._portalOutlet=r.first)}},hostAttrs:["tabindex","-1",1,"cdk-dialog-container"],hostVars:6,hostBindings:function(e,n){2&e&&It("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:[dt],decls:1,vars:0,consts:[["cdkPortalOutlet",""]],template:function(e,n){1&e&&fe(0,cQ,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 ZI{constructor(t,e){this.overlayRef=t,this.config=e,this.closed=new Te,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&&!Zo(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 zU=new me("DialogScrollStrategy"),dQ=new me("DialogData"),uQ=new me("DefaultDialogConfig"),fQ={provide:zU,deps:[as],useFactory:function hQ(i){return()=>i.scrollStrategies.block()}};let pQ=0,HU=(()=>{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 Te,this._afterOpenedAtThisLevel=new Te,this._ariaHiddenElements=new Map,this.afterAllClosed=Ey(()=>this.openDialogs.length?this._getAfterAllClosed():this._getAfterAllClosed().pipe(Do(void 0))),this._scrollStrategy=a}open(e,n){(n={...this._defaultOptions||new GM,...n}).id=n.id||"cdk-dialog-"+pQ++,n.id&&this.getDialogById(n.id);const s=this._getOverlayConfig(n),o=this._overlay.create(s),a=new ZI(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(){QI(this.openDialogs,e=>e.close())}getDialogById(e){return this.openDialogs.find(n=>n.id===e)}ngOnDestroy(){QI(this._openDialogsAtThisLevel,e=>{!1===e.config.closeOnDestroy&&this._removeOpenDialog(e,!1)}),QI(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:GM,useValue:r},{provide:ZI,useValue:n},{provide:Qy,useValue:e}];let a;r.container?"function"==typeof r.container?a=r.container:(a=r.container.type,o.push(...r.container.providers(r))):a=VU;const l=new Nh(a,r.viewContainerRef,Gi.create({parent:s||this._injector,providers:o}),r.componentFactoryResolver);return e.attach(l).instance}_attachDialogContent(e,n,r,s){if(e instanceof Eo){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 Nh(e,s.viewContainerRef,o,s.componentFactoryResolver));n.componentInstance=a.instance}}_createInjector(e,n,r,s){const o=e.injector||e.viewContainerRef?.injector,a=[{provide:dQ,useValue:e.data},{provide:ZI,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(Pa,null,{optional:!0}))&&a.push({provide:Pa,useValue:{value:e.direction,change:mt()}}),Gi.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)(ee(as),ee(Gi),ee(uQ,8),ee(i,12),ee(UM),ee(zU))},i.\u0275prov=Pe({token:i,factory:i.\u0275fac}),i})();function QI(i,t){let e=i.length;for(;e--;)t(i[e])}let mQ=(()=>{class i{}return i.\u0275fac=function(e){return new(e||i)},i.\u0275mod=en({type:i}),i.\u0275inj=Wt({providers:[HU,fQ],imports:[Pm,Bh,UU,Bh]}),i})();const gQ=["text"];function _Q(i,t){if(1&i&&Ie(0,"mat-pseudo-checkbox",6),2&i){const e=re();U("state",e.selected?"checked":"unchecked")("disabled",e.disabled)}}function vQ(i,t){1&i&&Ie(0,"mat-pseudo-checkbox",7),2&i&&U("disabled",re().disabled)}function yQ(i,t){if(1&i&&(G(0,"span",8),Be(1),j()),2&i){const e=re();V(1),Qi("(",e.group.label,")")}}const bQ=[[["mat-icon"]],"*"],xQ=["mat-icon","*"],MQ=new me("mat-sanity-checks",{providedIn:"root",factory:function wQ(){return!0}});let Jn=(()=>{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!NI()&&("boolean"==typeof this._sanityChecks?this._sanityChecks:!!this._sanityChecks[e])}}return i.\u0275fac=function(e){return new(e||i)(ee(BU),ee(MQ,8),ee(qt))},i.\u0275mod=en({type:i}),i.\u0275inj=Wt({imports:[qy,qy]}),i})();function WM(i){return class extends i{get disabled(){return this._disabled}set disabled(t){this._disabled=tn(t)}constructor(...t){super(...t),this._disabled=!1}}}function Jy(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 jM(i){return class extends i{get disableRipple(){return this._disableRipple}set disableRipple(t){this._disableRipple=tn(t)}constructor(...t){super(...t),this._disableRipple=!1}}}function JI(i,t=0){return class extends i{get tabIndex(){return this.disabled?-1:this._tabIndex}set tabIndex(e){this._tabIndex=null!=e?Ps(e):this.defaultTabIndex}constructor(...e){super(...e),this._tabIndex=t,this.defaultTabIndex=t}}}function WU(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 CQ(i){return class extends i{constructor(...t){super(...t),this._isInitialized=!1,this._pendingSubscribers=[],this.initialized=new In(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 YU=(()=>{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=Pe({token:i,factory:i.\u0275fac,providedIn:"root"}),i})();class EQ{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 qU=Fh({passive:!0,capture:!0});class AQ{constructor(){this._events=new Map,this._delegateEventHandler=t=>{const e=cu(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,qU)})}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,qU)))}}const XU={enterDuration:225,exitDuration:150},KU=Fh({passive:!0,capture:!0}),ZU=["mousedown","touchstart"],QU=["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=qc(n))}fadeInRipple(t,e,n={}){const r=this._containerRect=this._containerRect||this._containerElement.getBoundingClientRect(),s={...XU,...n.animation};n.centered&&(t=r.left+r.width/2,e=r.top+r.height/2);const o=n.radius||function TQ(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,d=document.createElement("div");d.classList.add("mat-ripple-element"),d.style.left=a-o+"px",d.style.top=l-o+"px",d.style.height=2*o+"px",d.style.width=2*o+"px",null!=n.color&&(d.style.backgroundColor=n.color),d.style.transitionDuration=`${c}ms`,this._containerElement.appendChild(d);const h=window.getComputedStyle(d),m=h.transitionDuration,g="none"===h.transitionProperty||"0s"===m||"0s, 0s"===m||0===r.width&&0===r.height,b=new EQ(this,d,n,g);d.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);d.addEventListener("transitionend",y),d.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={...XU,...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=qc(t);!this._platform.isBrowser||!e||e===this._triggerElement||(this._removeTriggerEvents(),this._triggerElement=e,ZU.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(()=>{QU.forEach(e=>{this._triggerElement.addEventListener(e,this,KU)})}),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=YI(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&&(ZU.forEach(e=>Lm._eventManager.removeHandler(e,t,this)),this._pointerUpEventsRegistered&&QU.forEach(e=>t.removeEventListener(e,this,KU)))}}Lm._eventManager=new AQ;const eR=new me("mat-ripple-global-options");let Vh=(()=>{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)(E(vt),E(gt),E(zi),E(eR,8),E(kr,8))},i.\u0275dir=ve({type:i,selectors:[["","mat-ripple",""],["","matRipple",""]],hostAttrs:[1,"mat-ripple"],hostVars:2,hostBindings:function(e,n){2&e&&ln("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})(),tb=(()=>{class i{}return i.\u0275fac=function(e){return new(e||i)},i.\u0275mod=en({type:i}),i.\u0275inj=Wt({imports:[Jn,Jn]}),i})(),IQ=(()=>{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)(E(kr,8))},i.\u0275cmp=ot({type:i,selectors:[["mat-pseudo-checkbox"]],hostAttrs:[1,"mat-pseudo-checkbox"],hostVars:12,hostBindings:function(e,n){2&e&&ln("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})(),JU=(()=>{class i{}return i.\u0275fac=function(e){return new(e||i)},i.\u0275mod=en({type:i}),i.\u0275inj=Wt({imports:[Jn]}),i})();const eV=new me("MAT_OPTION_PARENT_COMPONENT"),tV=new me("MatOptgroup");let RQ=0;class kQ{constructor(t,e=!1){this.source=t,this.isUserInput=e}}let PQ=(()=>{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=tn(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-"+RQ++,this.onSelectionChange=new $e,this._stateChanges=new Te}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)&&!Zo(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 kQ(this,e))}}return i.\u0275fac=function(e){Co()},i.\u0275dir=ve({type:i,viewQuery:function(e,n){if(1&e&&$n(gQ,7),2&e){let r;At(r=Dt())&&(n._text=r.first)}},inputs:{value:"value",id:"id",disabled:"disabled"},outputs:{onSelectionChange:"onSelectionChange"}}),i})(),Nm=(()=>{class i extends PQ{constructor(e,n,r,s){super(e,n,r,s)}}return i.\u0275fac=function(e){return new(e||i)(E(vt),E(Qn),E(eV,8),E(tV,8))},i.\u0275cmp=ot({type:i,selectors:[["mat-option"]],hostAttrs:["role","option",1,"mat-mdc-option","mdc-list-item"],hostVars:11,hostBindings:function(e,n){1&e&&Oe("click",function(){return n._selectViaInteraction()})("keydown",function(s){return n._handleKeydown(s)}),2&e&&(ql("id",n.id),It("aria-selected",n.selected)("aria-disabled",n.disabled.toString()),ln("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:[dt],ngContentSelectors:xQ,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&&(or(bQ),fe(0,_Q,1,2,"mat-pseudo-checkbox",0),Yt(1),G(2,"span",1,2),Yt(4,1),j(),fe(5,vQ,1,1,"mat-pseudo-checkbox",3),fe(6,yQ,2,1,"span",4),Ie(7,"div",5)),2&e&&(U("ngIf",n.multiple),V(5),U("ngIf",!n.multiple&&n.selected&&!n.hideSingleSelectionIndicator),V(1),U("ngIf",n.group&&n.group._inert),V(1),U("matRippleTrigger",n._getHostElement())("matRippleDisabled",n.disabled||n.disableRipple))},dependencies:[Vh,vi,IQ],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})(),tR=(()=>{class i{}return i.\u0275fac=function(e){return new(e||i)},i.\u0275mod=en({type:i}),i.\u0275inj=Wt({imports:[tb,co,Jn,JU]}),i})();class nV{}class LQ{}const Kc="*";function Oa(i,t){return{type:7,name:i,definitions:t,options:{}}}function Yr(i,t=null){return{type:4,styles:t,timings:i}}function rV(i,t=null){return{type:2,steps:i,options:t}}function oi(i){return{type:6,styles:i,offset:null}}function Os(i,t,e){return{type:0,name:i,styles:t,options:e}}function sV(i){return{type:5,steps:i}}function Or(i,t,e=null){return{type:1,expr:i,animation:t,options:e}}function nR(i=null){return{type:9,options:i}}function iR(i,t,e=null){return{type:11,selector:i,animation:t,options:e}}function oV(i){Promise.resolve().then(i)}class nb{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(){oV(()=>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 aV{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?oV(()=>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 rR="!";function NQ(i,t){}class YM{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 sR="mdc-dialog--open",lV="mdc-dialog--opening",cV="mdc-dialog--closing";let VQ=(()=>{class i extends VU{constructor(e,n,r,s,o,a,l,c){super(e,n,r,s,o,a,l,c),this._animationStateChanged=new $e}_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)(E(vt),E(jI),E(qt,8),E(YM),E(HM),E(gt),E(Qy),E(Xc))},i.\u0275cmp=ot({type:i,selectors:[["ng-component"]],features:[dt],decls:0,vars:0,template:function(e,n){},encapsulation:2}),i})();const dV="--mat-dialog-transition-duration";function uV(i){return null==i?null:"number"==typeof i?i:i.endsWith("ms")?Ps(i.substring(0,i.length-2)):i.endsWith("s")?1e3*Ps(i.substring(0,i.length-1)):"0"===i?0:null}let zQ=(()=>{class i extends VQ{constructor(e,n,r,s,o,a,l,c,d){super(e,n,r,s,o,a,l,d),this._animationMode=c,this._animationsEnabled="NoopAnimations"!==this._animationMode,this._hostElement=this._elementRef.nativeElement,this._openAnimationDuration=this._animationsEnabled?uV(this._config.enterAnimationDuration)??150:0,this._closeAnimationDuration=this._animationsEnabled?uV(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(dV,`${this._openAnimationDuration}ms`),this._requestAnimationFrame(()=>this._hostElement.classList.add(lV,sR)),this._waitForAnimationToComplete(this._openAnimationDuration,this._finishDialogOpen)):(this._hostElement.classList.add(sR),Promise.resolve().then(()=>this._finishDialogOpen()))}_startExitAnimation(){this._animationStateChanged.emit({state:"closing",totalTime:this._closeAnimationDuration}),this._hostElement.classList.remove(sR),this._animationsEnabled?(this._hostElement.style.setProperty(dV,`${this._openAnimationDuration}ms`),this._requestAnimationFrame(()=>this._hostElement.classList.add(cV)),this._waitForAnimationToComplete(this._closeAnimationDuration,this._finishDialogClose)):Promise.resolve().then(()=>this._finishDialogClose())}_clearAnimationClasses(){this._hostElement.classList.remove(lV,cV)}_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)(E(vt),E(jI),E(qt,8),E(YM),E(HM),E(gt),E(Qy),E(kr,8),E(Xc))},i.\u0275cmp=ot({type:i,selectors:[["mat-dialog-container"]],hostAttrs:["tabindex","-1",1,"mat-mdc-dialog-container","mdc-dialog"],hostVars:8,hostBindings:function(e,n){2&e&&(ql("id",n._config.id),It("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),ln("_mat-animation-noopable",!n._animationsEnabled))},features:[dt],decls:3,vars:0,consts:[[1,"mdc-dialog__container"],[1,"mat-mdc-dialog-surface","mdc-dialog__surface"],["cdkPortalOutlet",""]],template:function(e,n){1&e&&(G(0,"div",0)(1,"div",1),fe(2,NQ,0,0,"ng-template",2),j()())},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 ib{constructor(t,e,n){this._ref=t,this._containerInstance=n,this._afterOpened=new Te,this._beforeClosed=new Te,this._state=0,this.disableClose=e.disableClose,this.id=t.id,n._animationStateChanged.pipe(gn(r=>"opened"===r.state),Oi(1)).subscribe(()=>{this._afterOpened.next(),this._afterOpened.complete()}),n._animationStateChanged.pipe(gn(r=>"closed"===r.state),Oi(1)).subscribe(()=>{clearTimeout(this._closeFallbackTimeout),this._finishDialogClose()}),t.overlayRef.detachments().subscribe(()=>{this._beforeClosed.next(this._result),this._beforeClosed.complete(),this._finishDialogClose()}),Cr(this.backdropClick(),this.keydownEvents().pipe(gn(r=>27===r.keyCode&&!this.disableClose&&!Zo(r)))).subscribe(r=>{this.disableClose||(r.preventDefault(),hV(this,"keydown"===r.type?"keyboard":"mouse"))})}close(t){this._result=t,this._containerInstance._animationStateChanged.pipe(gn(e=>"closing"===e.state),Oi(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 hV(i,t,e){return i._closeInteractionType=t,i.close(e)}const oR=new me("MatMdcDialogData"),HQ=new me("mat-mdc-dialog-default-options"),fV=new me("mat-mdc-dialog-scroll-strategy"),GQ={provide:fV,deps:[as],useFactory:function $Q(i){return()=>i.scrollStrategies.block()}};let WQ=0,jQ=(()=>{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,d,h){this._overlay=e,this._defaultOptions=r,this._parentDialog=s,this._dialogRefConstructor=l,this._dialogContainerType=c,this._dialogDataToken=d,this._openDialogsAtThisLevel=[],this._afterAllClosedAtThisLevel=new Te,this._afterOpenedAtThisLevel=new Te,this._idPrefix="mat-dialog-",this.dialogConfigClass=YM,this.afterAllClosed=Ey(()=>this.openDialogs.length?this._getAfterAllClosed():this._getAfterAllClosed().pipe(Do(void 0))),this._scrollStrategy=a,this._dialog=n.get(HU)}open(e,n){let r;(n={...this._defaultOptions||new YM,...n}).id=n.id||`${this._idPrefix}${WQ++}`,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:GM,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){Co()},i.\u0275prov=Pe({token:i,factory:i.\u0275fac}),i})(),Bm=(()=>{class i extends jQ{constructor(e,n,r,s,o,a,l,c){super(e,n,s,a,l,o,ib,zQ,oR,c),this._idPrefix="mat-mdc-dialog-"}}return i.\u0275fac=function(e){return new(e||i)(ee(as),ee(Gi),ee(_y,8),ee(HQ,8),ee(fV),ee(i,12),ee(UM),ee(kr,8))},i.\u0275prov=Pe({token:i,factory:i.\u0275fac}),i})(),YQ=0,qQ=(()=>{class i{constructor(e,n,r){this.dialogRef=e,this._elementRef=n,this._dialog=r,this.type="button"}ngOnInit(){this.dialogRef||(this.dialogRef=_V(this._elementRef,this._dialog.openDialogs))}ngOnChanges(e){const n=e._matDialogClose||e._matDialogCloseResult;n&&(this.dialogResult=n.currentValue)}_onButtonClick(e){hV(this.dialogRef,0===e.screenX&&0===e.screenY?"keyboard":"mouse",this.dialogResult)}}return i.\u0275fac=function(e){return new(e||i)(E(ib,8),E(vt),E(Bm))},i.\u0275dir=ve({type:i,selectors:[["","mat-dialog-close",""],["","matDialogClose",""]],hostVars:2,hostBindings:function(e,n){1&e&&Oe("click",function(s){return n._onButtonClick(s)}),2&e&&It("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:[xi]}),i})(),pV=(()=>{class i{constructor(e,n,r){this._dialogRef=e,this._elementRef=n,this._dialog=r,this.id="mat-mdc-dialog-title-"+YQ++}ngOnInit(){this._dialogRef||(this._dialogRef=_V(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)(E(ib,8),E(vt),E(Bm))},i.\u0275dir=ve({type:i,selectors:[["","mat-dialog-title",""],["","matDialogTitle",""]],hostAttrs:[1,"mat-mdc-dialog-title","mdc-dialog__title"],hostVars:1,hostBindings:function(e,n){2&e&&ql("id",n.id)},inputs:{id:"id"},exportAs:["matDialogTitle"]}),i})(),mV=(()=>{class i{}return i.\u0275fac=function(e){return new(e||i)},i.\u0275dir=ve({type:i,selectors:[["","mat-dialog-content",""],["mat-dialog-content"],["","matDialogContent",""]],hostAttrs:[1,"mat-mdc-dialog-content","mdc-dialog__content"]}),i})(),gV=(()=>{class i{constructor(){this.align="start"}}return i.\u0275fac=function(e){return new(e||i)},i.\u0275dir=ve({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&&ln("mat-mdc-dialog-actions-align-center","center"===n.align)("mat-mdc-dialog-actions-align-end","end"===n.align)},inputs:{align:"align"}}),i})();function _V(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 vV=(()=>{class i{}return i.\u0275fac=function(e){return new(e||i)},i.\u0275mod=en({type:i}),i.\u0275inj=Wt({providers:[Bm,GQ],imports:[mQ,Pm,Bh,Jn,Jn]}),i})();const XQ=["mat-button",""],bV=[[["",8,"material-icons",3,"iconPositionEnd",""],["mat-icon",3,"iconPositionEnd",""],["","matButtonIcon","",3,"iconPositionEnd",""]],"*",[["","iconPositionEnd","",8,"material-icons"],["mat-icon","iconPositionEnd",""],["","matButtonIcon","","iconPositionEnd",""]]],xV=[".material-icons:not([iconPositionEnd]), mat-icon:not([iconPositionEnd]), [matButtonIcon]:not([iconPositionEnd])","*",".material-icons[iconPositionEnd], mat-icon[iconPositionEnd], [matButtonIcon][iconPositionEnd]"],ZQ=["mat-mini-fab",""],JQ=["mat-icon-button",""],eJ=["*"],tJ=[{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"]}],nJ=Jy(WM(jM(class{constructor(i){this._elementRef=i}})));let aR=(()=>{class i extends nJ{constructor(e,n,r,s){super(e),this._platform=n,this._ngZone=r,this._animationMode=s,this._focusMonitor=Lt(Xc),this._isFab=!1;const o=e.nativeElement.classList;for(const a of tJ)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){Co()},i.\u0275dir=ve({type:i,viewQuery:function(e,n){if(1&e&&$n(Vh,5),2&e){let r;At(r=Dt())&&(n.ripple=r.first)}},features:[dt]}),i})(),rb=(()=>{class i extends aR{constructor(e,n,r,s){super(e,n,r,s)}}return i.\u0275fac=function(e){return new(e||i)(E(vt),E(zi),E(gt),E(kr,8))},i.\u0275cmp=ot({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&&(It("disabled",n.disabled||null),ln("_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:[dt],attrs:XQ,ngContentSelectors:xV,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&&(or(bV),Ie(0,"span",0),Yt(1),G(2,"span",1),Yt(3,1),j(),Yt(4,2),Ie(5,"span",2)(6,"span",3)(7,"span",4)),2&e&&(ln("mdc-button__ripple",!n._isFab)("mdc-fab__ripple",n._isFab),V(6),U("matRippleDisabled",n._isRippleDisabled())("matRippleTrigger",n._elementRef.nativeElement))},dependencies:[Vh],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 rJ=new me("mat-mdc-fab-default-options",{providedIn:"root",factory:wV});function wV(){return{color:"accent"}}const MV=wV();let CV=(()=>{class i extends aR{constructor(e,n,r,s,o){super(e,n,r,s),this._options=o,this._isFab=!0,this._options=this._options||MV,this.color=this.defaultColor=this._options.color||MV.color}}return i.\u0275fac=function(e){return new(e||i)(E(vt),E(zi),E(gt),E(kr,8),E(rJ,8))},i.\u0275cmp=ot({type:i,selectors:[["button","mat-mini-fab",""]],hostVars:7,hostBindings:function(e,n){2&e&&(It("disabled",n.disabled||null),ln("_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:[dt],attrs:ZQ,ngContentSelectors:xV,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&&(or(bV),Ie(0,"span",0),Yt(1),G(2,"span",1),Yt(3,1),j(),Yt(4,2),Ie(5,"span",2)(6,"span",3)(7,"span",4)),2&e&&(ln("mdc-button__ripple",!n._isFab)("mdc-fab__ripple",n._isFab),V(6),U("matRippleDisabled",n._isRippleDisabled())("matRippleTrigger",n._elementRef.nativeElement))},dependencies:[Vh],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})(),qM=(()=>{class i extends aR{constructor(e,n,r,s){super(e,n,r,s)}}return i.\u0275fac=function(e){return new(e||i)(E(vt),E(zi),E(gt),E(kr,8))},i.\u0275cmp=ot({type:i,selectors:[["button","mat-icon-button",""]],hostVars:7,hostBindings:function(e,n){2&e&&(It("disabled",n.disabled||null),ln("_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:[dt],attrs:JQ,ngContentSelectors:eJ,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&&(or(),Ie(0,"span",0),Yt(1),Ie(2,"span",1)(3,"span",2)(4,"span",3)),2&e&&(V(3),U("matRippleDisabled",n._isRippleDisabled())("matRippleCentered",!0)("matRippleTrigger",n._elementRef.nativeElement))},dependencies:[Vh],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})(),XM=(()=>{class i{}return i.\u0275fac=function(e){return new(e||i)},i.\u0275mod=en({type:i}),i.\u0275inj=Wt({imports:[Jn,tb,Jn]}),i})();const sJ=["class","dialog"];let SV=(()=>{class i{constructor(e,n){this.dialogRef=e,this.data=n}}return i.\u0275fac=function(e){return new(e||i)(E(ib),E(oR))},i.\u0275cmp=ot({type:i,selectors:[["app-confirm",8,"dialog"]],attrs:sJ,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&&(G(0,"h1",0),Be(1,"Confirmation"),j(),G(2,"div",1)(3,"p"),Be(4),j()(),G(5,"div",2)(6,"button",3),Oe("click",function(){return n.dialogRef.close()}),Be(7,"Cancel"),j(),G(8,"button",4),Be(9,"Yes"),j()()),2&e&&(V(4),ui(n.data.text),V(4),U("mat-dialog-close",!0))},dependencies:[rb,qQ,pV,mV,gV]}),i})();function lR(i,t){const e="object"==typeof t;return new Promise((n,r)=>{const s=new ha({next:o=>{n(o),s.unsubscribe()},error:r,complete:()=>{e?n(t.defaultValue):r(new fm)}});i.subscribe(s)})}let Jl=(()=>{class i{constructor(e){this.ngZone=e,this.openedResource$=new Qe(null),this.openedResourcePath$=new Qe(null),eel.expose(this.wrapHandler(this.openFile),"open_file"),eel.on_angular_ready(),setTimeout(nt(function*(){for(;;){if(eel._websocket){eel._websocket.onclose=()=>window.close();break}yield new Promise(n=>setTimeout(n,0))}}),0)}wrapHandler(e){return(...n)=>{try{gt.assertInAngularZone(),e.bind(this)(...n)}catch{this.ngZone.run(e,this,n)}}}openFile(e,n=!1){var r=this;return nt(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 nt(function*(){yield eel.open_file_with_system_app(e)()})()}retrieveValue(e){return nt(function*(){return yield eel.retrieve_value(e)()})()}runCustomAction(e,n,r){return nt(function*(){return eel.run_custom_action(e,n,r)()})()}saveFile(e){var n=this;return nt(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 nt(function*(){return eel.serialize_resource(e,n)()})()}serializeResourceTmp(e,n,r={}){return nt(function*(){return eel.serialize_resource_tmp(e,n,r)()})()}serializeReversible(e,n){return nt(function*(){return eel.serialize_reversible(e,n)()})()}deserializeResource(e){return nt(function*(){return eel.deserialize_resource(e)()})()}}return i.\u0275fac=function(e){return new(e||i)(ee(gt))},i.\u0275prov=Pe({token:i,factory:i.\u0275fac,providedIn:"root"}),i})();var cR=ps(489);const EV=i=>!(!i||"object"!=typeof i),AV=(i={},t,e,n=[])=>{const r=[];if(EV(i)){const s=Object.entries(i);for(let o=0;o{class i{constructor(e){var n=this;this.eelDelegate=e,this._hasUnsavedChanges$=new Qe(!1),this.resource$=new Qe(null),this.error$=new Qe(null),this.customActionRunning$=new Qe(!1),this.changedDataBlocks={},this.dataBlockChange$=new Te,this.hideHiddenFields$=new Qe(!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=AV(r.schema,"is_recursive_ref",!0);for(const[o,a]of s){const l=o.block_class_mro;let c=r.schema,d=c.block_class_mro===l?c:void 0;for(const h of a.slice(0,a.length-1))!d&&c[h]?.block_class_mro===l&&(d=c[h]),c=c[h];c[a[a.length-1]]=d}this.resource$.next(r),this.error$.next(null)}else this.resource$.next(null),this.error$.next(null)}),this.dataBlockChange$.subscribe(function(){var r=nt(function*([s,o]){n.changedDataBlocks[s]=o,n.updateUnsavedChanges();const a=yield n.eelDelegate.retrieveValue(s);n.changedDataBlocks[s]==o&&((0,cR.isNumber)(o)?Math.abs(o-a)<1e-10:(0,cR.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 nt(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 nt(function*(){return s.processExternalChanges(e,()=>s.eelDelegate.runCustomAction(e,n,r))})()}deserializeResource(e){var n=this;return nt(function*(){return n.processExternalChanges(e,()=>n.eelDelegate.deserializeResource(e))})()}reloadResource(){var e=this;return nt(function*(){const n=e.eelDelegate.openedResourcePath$.getValue();n&&e.eelDelegate.openFile(n,!0).then()})()}saveResource(){var e=this;return nt(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)(ee(Jl))},i.\u0275prov=Pe({token:i,factory:i.\u0275fac,providedIn:"root"}),i})();function oJ(i,t){if(1&i){const e=jn();G(0,"div",2)(1,"button",3),Oe("click",function(){return Vt(e),Et(re().action())}),Be(2),j()()}if(2&i){const e=re();V(2),Qi(" ",e.data.action," ")}}const aJ=["label"];function lJ(i,t){}const cJ=Math.pow(2,31)-1;class dR{constructor(t,e){this._overlayRef=e,this._afterDismissed=new Te,this._afterOpened=new Te,this._onAction=new Te,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,cJ))}_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 DV=new me("MatSnackBarData");class KM{constructor(){this.politeness="assertive",this.announcementMessage="",this.duration=0,this.data=null,this.horizontalPosition="center",this.verticalPosition="bottom"}}let dJ=(()=>{class i{}return i.\u0275fac=function(e){return new(e||i)},i.\u0275dir=ve({type:i,selectors:[["","matSnackBarLabel",""]],hostAttrs:[1,"mat-mdc-snack-bar-label","mdc-snackbar__label"]}),i})(),uJ=(()=>{class i{}return i.\u0275fac=function(e){return new(e||i)},i.\u0275dir=ve({type:i,selectors:[["","matSnackBarActions",""]],hostAttrs:[1,"mat-mdc-snack-bar-actions","mdc-snackbar__actions"]}),i})(),hJ=(()=>{class i{}return i.\u0275fac=function(e){return new(e||i)},i.\u0275dir=ve({type:i,selectors:[["","matSnackBarAction",""]],hostAttrs:[1,"mat-mdc-snack-bar-action","mdc-snackbar__action"]}),i})(),fJ=(()=>{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)(E(dR),E(DV))},i.\u0275cmp=ot({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&&(G(0,"div",0),Be(1),j(),fe(2,oJ,3,1,"div",1)),2&e&&(V(1),Qi(" ",n.data.message,"\n"),V(1),U("ngIf",n.hasAction))},dependencies:[vi,rb,dJ,uJ,hJ],styles:[".mat-mdc-simple-snack-bar{display:flex}"],encapsulation:2,changeDetection:0}),i})();const pJ={snackBarState:Oa("state",[Os("void, hidden",oi({transform:"scale(0.8)",opacity:0})),Os("visible",oi({transform:"scale(1)",opacity:1})),Or("* => visible",Yr("150ms cubic-bezier(0, 0, 0.2, 1)")),Or("* => void, * => hidden",Yr("75ms cubic-bezier(0.4, 0.0, 1, 1)",oi({opacity:0})))])};let mJ=0,gJ=(()=>{class i extends LM{constructor(e,n,r,s,o){super(),this._ngZone=e,this._elementRef=n,this._changeDetectorRef=r,this._platform=s,this.snackBarConfig=o,this._document=Lt(qt),this._trackedModals=new Set,this._announceDelay=150,this._destroyed=!1,this._onAnnounce=new Te,this._onExit=new Te,this._onEnter=new Te,this._animationState="void",this._liveElementId="mat-snack-bar-container-live-"+mJ++,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(Oi(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)(E(gt),E(vt),E(Qn),E(zi),E(KM))},i.\u0275dir=ve({type:i,viewQuery:function(e,n){if(1&e&&$n(Am,7),2&e){let r;At(r=Dt())&&(n._portalOutlet=r.first)}},features:[dt]}),i})(),_J=(()=>{class i extends gJ{_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=si(i)))(n||i)}}(),i.\u0275cmp=ot({type:i,selectors:[["mat-snack-bar-container"]],viewQuery:function(e,n){if(1&e&&$n(aJ,7),2&e){let r;At(r=Dt())&&(n._label=r.first)}},hostAttrs:[1,"mdc-snackbar","mat-mdc-snack-bar-container","mdc-snackbar--open"],hostVars:1,hostBindings:function(e,n){1&e&&LD("@state.done",function(s){return n.onAnimationEnd(s)}),2&e&&Rw("@state",n._animationState)},features:[dt],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&&(G(0,"div",0)(1,"div",1,2)(3,"div",3),fe(4,lJ,0,0,"ng-template",4),j(),Ie(5,"div"),j()()),2&e&&(V(5),It("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:[pJ.snackBarState]}}),i})(),TV=(()=>{class i{}return i.\u0275fac=function(e){return new(e||i)},i.\u0275mod=en({type:i}),i.\u0275inj=Wt({imports:[Pm,Bh,co,XM,Jn,Jn]}),i})();const IV=new me("mat-snack-bar-default-options",{providedIn:"root",factory:function vJ(){return new KM}});let yJ=(()=>{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=Gi.create({parent:n&&n.viewContainerRef&&n.viewContainerRef.injector||this._injector,providers:[{provide:KM,useValue:n}]}),o=new Nh(this.snackBarContainerComponent,n.viewContainerRef,s),a=e.attach(o);return a.instance.snackBarConfig=n,a.instance}_attach(e,n){const r={...new KM,...this._defaultConfig,...n},s=this._createOverlay(r),o=this._attachSnackBarContainer(s,r),a=new dR(o,s);if(e instanceof Eo){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 Nh(e,void 0,l),d=o.attachComponentPortal(c);a.instance=d.instance}return this._breakpointObserver.observe("(max-width: 599.98px) and (orientation: portrait)").pipe(Ue(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 Gi.create({parent:e&&e.viewContainerRef&&e.viewContainerRef.injector||this._injector,providers:[{provide:dR,useValue:n},{provide:DV,useValue:e.data}]})}}return i.\u0275fac=function(e){return new(e||i)(ee(as),ee(XI),ee(Gi),ee($I),ee(i,12),ee(IV))},i.\u0275prov=Pe({token:i,factory:i.\u0275fac}),i})(),RV=(()=>{class i extends yJ{constructor(e,n,r,s,o,a){super(e,n,r,s,o,a),this.simpleSnackBarComponent=fJ,this.snackBarContainerComponent=_J,this.handsetCssClass="mat-mdc-snack-bar-handset"}}return i.\u0275fac=function(e){return new(e||i)(ee(as),ee(XI),ee(Gi),ee($I),ee(i,12),ee(IV))},i.\u0275prov=Pe({token:i,factory:i.\u0275fac,providedIn:TV}),i})();const bJ=["*",[["mat-toolbar-row"]]],xJ=["*","mat-toolbar-row"],wJ=Jy(class{constructor(i){this._elementRef=i}});let MJ=(()=>{class i{}return i.\u0275fac=function(e){return new(e||i)},i.\u0275dir=ve({type:i,selectors:[["mat-toolbar-row"]],hostAttrs:[1,"mat-toolbar-row"],exportAs:["matToolbarRow"]}),i})(),CJ=(()=>{class i extends wJ{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)(E(vt),E(zi),E(qt))},i.\u0275cmp=ot({type:i,selectors:[["mat-toolbar"]],contentQueries:function(e,n,r){if(1&e&&Wi(r,MJ,5),2&e){let s;At(s=Dt())&&(n._toolbarRows=s)}},hostAttrs:[1,"mat-toolbar"],hostVars:4,hostBindings:function(e,n){2&e&&ln("mat-toolbar-multiple-rows",n._toolbarRows.length>0)("mat-toolbar-single-row",0===n._toolbarRows.length)},inputs:{color:"color"},exportAs:["matToolbar"],features:[dt],ngContentSelectors:xJ,decls:2,vars:0,template:function(e,n){1&e&&(or(bJ),Yt(0),Yt(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})(),SJ=(()=>{class i{}return i.\u0275fac=function(e){return new(e||i)},i.\u0275mod=en({type:i}),i.\u0275inj=Wt({imports:[Jn,Jn]}),i})(),EJ=(()=>{class i{constructor(){this._vertical=!1,this._inset=!1}get vertical(){return this._vertical}set vertical(e){this._vertical=tn(e)}get inset(){return this._inset}set inset(e){this._inset=tn(e)}}return i.\u0275fac=function(e){return new(e||i)},i.\u0275cmp=ot({type:i,selectors:[["mat-divider"]],hostAttrs:["role","separator",1,"mat-divider"],hostVars:7,hostBindings:function(e,n){2&e&&(It("aria-orientation",n.vertical?"vertical":"horizontal"),ln("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})(),kV=(()=>{class i{}return i.\u0275fac=function(e){return new(e||i)},i.\u0275mod=en({type:i}),i.\u0275inj=Wt({imports:[Jn,Jn]}),i})();const AJ=["tooltip"],PV=new me("mat-tooltip-scroll-strategy"),IJ={provide:PV,deps:[as],useFactory:function TJ(i){return()=>i.scrollStrategies.reposition({scrollThrottle:20})}},kJ=new me("mat-tooltip-default-options",{providedIn:"root",factory:function RJ(){return{showDelay:0,hideDelay:0,touchendHideDelay:1500}}}),OV="tooltip-panel",FV=Fh({passive:!0});let BJ=(()=>{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=tn(e),this._detach(),this._overlayRef=null}get disabled(){return this._disabled}set disabled(e){this._disabled=tn(e),this._disabled?this.hide(0):this._setupPointerEnterEventsIfNeeded()}get showDelay(){return this._showDelay}set showDelay(e){this._showDelay=Ps(e)}get hideDelay(){return this._hideDelay}set hideDelay(e){this._hideDelay=Ps(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,d,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 Te,this._scrollStrategy=d,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(Ue(this._destroyed)).subscribe(()=>{this._overlayRef&&this._updatePosition(this._overlayRef)})}ngAfterViewInit(){this._viewInitialized=!0,this._setupPointerEnterEventsIfNeeded(),this._focusMonitor.monitor(this._elementRef).pipe(Ue(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,FV)}),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 Nh(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(Ue(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 vt)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(Ue(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}-${OV}`,scrollStrategy:this._scrollStrategy()}),this._updatePosition(this._overlayRef),this._overlayRef.detachments().pipe(Ue(this._destroyed)).subscribe(()=>this._detach()),this._overlayRef.outsidePointerEvents().pipe(Ue(this._destroyed)).subscribe(()=>this._tooltipInstance?._handleBodyInteraction()),this._overlayRef.keydownEvents().pipe(Ue(this._destroyed)).subscribe(s=>{this._isTooltipVisible()&&27===s.keyCode&&!Zo(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(Oi(1),Ue(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}-${OV}-`;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,FV)})}_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){Co()},i.\u0275dir=ve({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})(),Fs=(()=>{class i extends BJ{constructor(e,n,r,s,o,a,l,c,d,h,p,m){super(e,n,r,s,o,a,l,c,d,h,p,m),this._tooltipComponent=VJ,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)(E(as),E(vt),E(Xy),E(jr),E(gt),E(zi),E(HZ),E(Xc),E(PV),E(Pa,8),E(kJ,8),E(qt))},i.\u0275dir=ve({type:i,selectors:[["","matTooltip",""]],hostAttrs:[1,"mat-mdc-tooltip-trigger"],exportAs:["matTooltip"],features:[dt]}),i})(),UJ=(()=>{class i{constructor(e,n){this._changeDetectorRef=e,this._closeOnInteraction=!1,this._isVisible=!1,this._onHide=new Te,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)(E(Qn),E(kr,8))},i.\u0275dir=ve({type:i}),i})(),VJ=(()=>{class i extends UJ{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)(E(Qn),E(vt),E(kr,8))},i.\u0275cmp=ot({type:i,selectors:[["mat-tooltip-component"]],viewQuery:function(e,n){if(1&e&&$n(AJ,7),2&e){let r;At(r=Dt())&&(n._tooltip=r.first)}},hostAttrs:["aria-hidden","true"],hostVars:2,hostBindings:function(e,n){1&e&&Oe("mouseleave",function(s){return n._handleMouseLeave(s)}),2&e&&qo("zoom",n.isVisible()?1:null)},features:[dt],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&&(G(0,"div",0,1),Oe("animationend",function(s){return n._handleAnimationEnd(s)}),G(2,"div",2),Be(3),j()()),2&e&&(ln("mdc-tooltip--multiline",n._isMultiline),U("ngClass",n.tooltipClass),V(3),ui(n.message))},dependencies:[hm],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})(),LV=(()=>{class i{}return i.\u0275fac=function(e){return new(e||i)},i.\u0275mod=en({type:i}),i.\u0275inj=Wt({providers:[IJ],imports:[UU,co,Pm,Jn,Jn,Ky]}),i})();function NV(...i){const t=M0(i),{args:e,keys:n}=zB(i),r=new In(s=>{const{length:o}=e;if(!o)return void s.complete();const a=new Array(o);let l=o,c=o;for(let d=0;d{h||(h=!0,c--),a[d]=p},()=>l--,void 0,()=>{(!l||!h)&&(c||s.next(n?HB(n,a):a),s.complete())}))}});return t?r.pipe(JT(t)):r}class uR{}class uu{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 uu?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 uu;return e.lazyInit=this.lazyInit&&this.lazyInit instanceof uu?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 zJ{encodeKey(t){return UV(t)}encodeValue(t){return UV(t)}decodeKey(t){return decodeURIComponent(t)}decodeValue(t){return decodeURIComponent(t)}}const $J=/%(\d[a-f0-9])/gi,GJ={40:"@","3A":":",24:"$","2C":",","3B":";","3D":"=","3F":"?","2F":"/"};function UV(i){return encodeURIComponent(i).replace($J,(t,e)=>GJ[e]??t)}function ZM(i){return`${i}`}class hu{constructor(t={}){if(this.updates=null,this.cloneFrom=null,this.encoder=t.encoder||new zJ,t.fromString){if(t.fromObject)throw new Error("Cannot specify both fromString and fromObject.");this.map=function HJ(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(ZM):[ZM(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 hu({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(ZM(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(ZM(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 WJ{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 VV(i){return typeof ArrayBuffer<"u"&&i instanceof ArrayBuffer}function zV(i){return typeof Blob<"u"&&i instanceof Blob}function HV(i){return typeof FormData<"u"&&i instanceof FormData}class sb{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 jJ(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 uu),this.context||(this.context=new WJ),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 sb(e,n,s,{params:c,headers:l,context:d,reportProgress:a,responseType:r,withCredentials:o})}}var ls=(()=>((ls=ls||{})[ls.Sent=0]="Sent",ls[ls.UploadProgress=1]="UploadProgress",ls[ls.ResponseHeader=2]="ResponseHeader",ls[ls.DownloadProgress=3]="DownloadProgress",ls[ls.Response=4]="Response",ls[ls.User=5]="User",ls))();class qJ{constructor(t,e=200,n="OK"){this.headers=t.headers||new uu,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 hR extends qJ{constructor(t={}){super(t),this.type=ls.Response,this.body=void 0!==t.body?t.body:null}clone(t={}){return new hR({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 fR(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 pR=(()=>{class i{constructor(e){this.handler=e}request(e,n,r={}){let s;if(e instanceof sb)s=e;else{let l,c;l=r.headers instanceof uu?r.headers:new uu(r.headers),r.params&&(c=r.params instanceof hu?r.params:new hu({fromObject:r.params})),s=new sb(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=mt(s).pipe(ru(l=>this.handler.handle(l)));if(e instanceof sb||"events"===r.observe)return o;const a=o.pipe(gn(l=>l instanceof hR));switch(r.observe||"body"){case"body":switch(s.responseType){case"arraybuffer":return a.pipe(tt(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(tt(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(tt(l=>{if(null!==l.body&&"string"!=typeof l.body)throw new Error("Response is not a string.");return l.body}));default:return a.pipe(tt(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 hu).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,fR(r,n))}post(e,n,r={}){return this.request("POST",e,fR(r,n))}put(e,n,r={}){return this.request("PUT",e,fR(r,n))}}return i.\u0275fac=function(e){return new(e||i)(ee(uR))},i.\u0275prov=Pe({token:i,factory:i.\u0275fac}),i})();const aee=["*"];let JM;function ob(i){return function lee(){if(void 0===JM&&(JM=null,typeof window<"u")){const i=window;void 0!==i.trustedTypes&&(JM=i.trustedTypes.createPolicy("angular#components",{createHTML:t=>t}))}return JM}()?.createHTML(i)||i}function KV(i){return Error(`Unable to find icon with the name "${i}"`)}function ZV(i){return Error(`The URL provided to MatIconRegistry was not trusted as a resource URL via Angular's DomSanitizer. Attempted URL was "${i}".`)}function QV(i){return Error(`The literal provided to MatIconRegistry was not trusted as safe HTML by Angular's DomSanitizer. Attempted literal was "${i}".`)}class zh{constructor(t,e,n){this.url=t,this.svgText=e,this.options=n}}let eC=(()=>{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 zh(r,null,s))}addSvgIconResolver(e){return this._resolvers.push(e),this}addSvgIconLiteralInNamespace(e,n,r,s){const o=this._sanitizer.sanitize(Zn.HTML,r);if(!o)throw QV(r);const a=ob(o);return this._addSvgIconConfig(e,n,new zh("",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 zh(n,null,r))}addSvgIconSetLiteralInNamespace(e,n,r){const s=this._sanitizer.sanitize(Zn.HTML,n);if(!s)throw QV(n);const o=ob(s);return this._addSvgIconSetConfig(e,new zh("",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(Zn.RESOURCE_URL,e);if(!n)throw ZV(e);const r=this._cachedIconsByUrl.get(n);return r?mt(tC(r)):this._loadSvgIconFromConfig(new zh(e,null)).pipe(Vi(s=>this._cachedIconsByUrl.set(n,s)),tt(s=>tC(s)))}getNamedSvgIcon(e,n=""){const r=JV(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(KV(r))}ngOnDestroy(){this._resolvers=[],this._svgIconConfigs.clear(),this._iconSetConfigs.clear(),this._cachedIconsByUrl.clear()}_getSvgFromConfig(e){return e.svgText?mt(tC(this._svgElementFromConfig(e))):this._loadSvgIconFromConfig(e).pipe(tt(n=>tC(n)))}_getSvgFromIconSetConfigs(e,n){const r=this._extractIconWithNameFromAnySet(e,n);return r?mt(r):NV(n.filter(o=>!o.svgText).map(o=>this._loadSvgIconSetFromConfig(o).pipe(jc(a=>{const c=`Loading icon set URL: ${this._sanitizer.sanitize(Zn.RESOURCE_URL,o.url)} failed: ${a.message}`;return this._errorHandler.handleError(new Error(c)),mt(null)})))).pipe(tt(()=>{const o=this._extractIconWithNameFromAnySet(e,n);if(!o)throw KV(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(Vi(n=>e.svgText=n),tt(()=>this._svgElementFromConfig(e)))}_loadSvgIconSetFromConfig(e){return e.svgText?mt(null):this._fetchIcon(e).pipe(Vi(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(ob(""));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(ob("")),r=e.attributes;for(let s=0;sob(c)),su(()=>this._inProgressUrlFetches.delete(o)),Vf());return this._inProgressUrlFetches.set(o,l),l}_addSvgIconConfig(e,n,r){return this._svgIconConfigs.set(JV(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:""}}}),ez=["clip-path","color-profile","src","cursor","fill","filter","marker","marker-start","marker-mid","marker-end","mask","stroke"],gee=ez.map(i=>`[${i}]`).join(", "),_ee=/^url\(['"]?#(.*?)['"]?\)$/;let gR=(()=>{class i extends hee{get inline(){return this._inline}set inline(e){this._inline=tn(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=Qt.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(gee),r=this._elementsWithExternalReferences=this._elementsWithExternalReferences||new Map;for(let s=0;s{const a=n[s],l=a.getAttribute(o),c=l?l.match(_ee):null;if(c){let d=r.get(a);d||(d=[],r.set(a,d)),d.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(Oi(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)(E(vt),E(eC),xa("aria-hidden"),E(pee),E(cl),E(fee,8))},i.\u0275cmp=ot({type:i,selectors:[["mat-icon"]],hostAttrs:["role","img",1,"mat-icon","notranslate"],hostVars:8,hostBindings:function(e,n){2&e&&(It("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),ln("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:[dt],ngContentSelectors:aee,decls:1,vars:0,template:function(e,n){1&e&&(or(),Yt(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})(),tz=(()=>{class i{}return i.\u0275fac=function(e){return new(e||i)},i.\u0275mod=en({type:i}),i.\u0275inj=Wt({imports:[Jn,Jn]}),i})(),nz=(()=>{class i{constructor(e){this.viewContainerRef=e}}return i.\u0275fac=function(e){return new(e||i)(E(jr))},i.\u0275dir=ve({type:i,selectors:[["","dataBlockUI",""]]}),i})(),vee=(()=>{class i{constructor(){this.resource=null,this.name="",this.resourceDescription="",this.changed=new $e}}return i.\u0275fac=function(e){return new(e||i)},i.\u0275cmp=ot({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&&(G(0,"p",0),Be(1),j()),2&e&&(U("matTooltip",n.resourceDescription),V(1),Dh("",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:[Fs],changeDetection:0}),i})();function yee(i,t){if(1&i&&(G(0,"h2",4),Be(1),j()),2&i){const e=re();U("matTooltip",e.resourceDescription),V(1),ui(e.name)}}function bee(i,t){1&i&&Ie(0,"app-block-actions",5),2&i&&U("resource",re().resource)}const xee=function(i,t,e,n){return{id:i,name:t,data:e,schema:n}};function wee(i,t){if(1&i&&Ie(0,"app-editor",7),2&i){const e=re().$implicit,n=re();U("resource",N2(3,xee,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 Mee(i,t){if(1&i&&(Gr(0),fe(1,wee,1,8,"app-editor",6),ct(2,"async"),Wr()),2&i){const e=t.$implicit,n=re();V(1),U("ngIf",!(ut(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 ec=(()=>{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 $e,this.destroyed$=new Te}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(Ue(this.destroyed$),gn(([n,r])=>!!this.resource&&n.startsWith(this.resource.id)&&!n.substring(this.resource.id.length+1).includes("/"))).subscribe(function(){var n=nt(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)(E(Fa))},i.\u0275cmp=ot({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&&(fe(0,yee,2,2,"h2",0),ct(1,"async"),fe(2,bee,1,1,"app-block-actions",1),G(3,"div",2),fe(4,Mee,3,3,"ng-container",3),j()),2&e){let r;U("ngIf",n.name&&n.name!=(null==(r=ut(1,4,n.main.resource$))?null:r.name)),V(2),U("ngIf",!n.hideBlockActions),V(2),U("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})(),iz=(()=>{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)(E(ll),E(vt))},i.\u0275dir=ve({type:i}),i})(),Hh=(()=>{class i extends iz{}return i.\u0275fac=function(){let t;return function(n){return(t||(t=si(i)))(n||i)}}(),i.\u0275dir=ve({type:i,features:[dt]}),i})();const Io=new me("NgValueAccessor"),See={provide:Io,useExisting:Gn(()=>_l),multi:!0},Aee=new me("CompositionEventMode");let _l=(()=>{class i extends iz{constructor(e,n,r){super(e,n),this._compositionMode=r,this._composing=!1,null==this._compositionMode&&(this._compositionMode=!function Eee(){const i=$c()?$c().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)(E(ll),E(vt),E(Aee,8))},i.\u0275dir=ve({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&&Oe("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:[Dn([See]),dt]}),i})();const Dee=!1;function fu(i){return null==i||("string"==typeof i||Array.isArray(i))&&0===i.length}function sz(i){return null!=i&&"number"==typeof i.length}const qr=new me("NgValidators"),pu=new me("NgAsyncValidators"),Tee=/^(?=.{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 vl{static min(t){return oz(t)}static max(t){return az(t)}static required(t){return function lz(i){return fu(i.value)?{required:!0}:null}(t)}static requiredTrue(t){return function cz(i){return!0===i.value?null:{required:!0}}(t)}static email(t){return function dz(i){return fu(i.value)||Tee.test(i.value)?null:{email:!0}}(t)}static minLength(t){return uz(t)}static maxLength(t){return hz(t)}static pattern(t){return function fz(i){if(!i)return nC;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(fu(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 yz(t)}static composeAsync(t){return bz(t)}}function oz(i){return t=>{if(fu(t.value)||fu(i))return null;const e=parseFloat(t.value);return!isNaN(e)&&e{if(fu(t.value)||fu(i))return null;const e=parseFloat(t.value);return!isNaN(e)&&e>i?{max:{max:i,actual:t.value}}:null}}function uz(i){return t=>fu(t.value)||!sz(t.value)?null:t.value.lengthsz(t.value)&&t.value.length>i?{maxlength:{requiredLength:i,actualLength:t.value.length}}:null}function nC(i){return null}function pz(i){return null!=i}function mz(i){const t=oy(i)?Ni(i):i;if(Dee&&!FD(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 pe(-1101,e)}return t}function gz(i){let t={};return i.forEach(e=>{t=null!=e?{...t,...e}:t}),0===Object.keys(t).length?null:t}function _z(i,t){return t.map(e=>e(i))}function vz(i){return i.map(t=>function Iee(i){return!i.validate}(t)?t:e=>t.validate(e))}function yz(i){if(!i)return null;const t=i.filter(pz);return 0==t.length?null:function(e){return gz(_z(e,t))}}function _R(i){return null!=i?yz(vz(i)):null}function bz(i){if(!i)return null;const t=i.filter(pz);return 0==t.length?null:function(e){return NV(_z(e,t).map(mz)).pipe(tt(gz))}}function vR(i){return null!=i?bz(vz(i)):null}function xz(i,t){return null===i?[t]:Array.isArray(i)?[...i,t]:[i,t]}function wz(i){return i._rawValidators}function Mz(i){return i._rawAsyncValidators}function yR(i){return i?Array.isArray(i)?i:[i]:[]}function iC(i,t){return Array.isArray(i)?i.includes(t):i===t}function Cz(i,t){const e=yR(t);return yR(i).forEach(r=>{iC(e,r)||e.push(r)}),e}function Sz(i,t){return yR(t).filter(e=>!iC(i,e))}class Ez{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=_R(this._rawValidators)}_setAsyncValidators(t){this._rawAsyncValidators=t||[],this._composedAsyncValidatorFn=vR(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 uo extends Ez{get formDirective(){return null}get path(){return null}}class tc extends Ez{constructor(){super(...arguments),this._parent=null,this.name=null,this.valueAccessor=null}}class Az{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 nc=(()=>{class i extends Az{constructor(e){super(e)}}return i.\u0275fac=function(e){return new(e||i)(E(tc,2))},i.\u0275dir=ve({type:i,selectors:[["","formControlName",""],["","ngModel",""],["","formControl",""]],hostVars:14,hostBindings:function(e,n){2&e&&ln("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:[dt]}),i})(),bR=(()=>{class i extends Az{constructor(e){super(e)}}return i.\u0275fac=function(e){return new(e||i)(E(uo,10))},i.\u0275dir=ve({type:i,selectors:[["","formGroupName",""],["","formArrayName",""],["","ngModelGroup",""],["","formGroup",""],["form",3,"ngNoForm",""],["","ngForm",""]],hostVars:16,hostBindings:function(e,n){2&e&&ln("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:[dt]}),i})();function Dz(i,t){return i?`with name: '${t}'`:`at index: ${t}`}const MR=!1,ab="VALID",sC="INVALID",zm="PENDING",lb="DISABLED";function CR(i){return(oC(i)?i.validators:i)||null}function SR(i,t){return(oC(t)?t.asyncValidators:i)||null}function oC(i){return null!=i&&!Array.isArray(i)&&"object"==typeof i}function Tz(i,t,e){const n=i.controls;if(!(t?Object.keys(n):n).length)throw new pe(1e3,MR?function Oee(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 pe(1001,MR?function Fee(i,t){return`Cannot find form control ${Dz(i,t)}`}(t,e):"")}function Iz(i,t,e){i._forEachChild((n,r)=>{if(void 0===e[r])throw new pe(1002,MR?function Lee(i,t){return`Must supply a value for form control ${Dz(i,t)}`}(t,r):"")})}class aC{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===ab}get invalid(){return this.status===sC}get pending(){return this.status==zm}get disabled(){return this.status===lb}get enabled(){return this.status!==lb}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(Cz(t,this._rawValidators))}addAsyncValidators(t){this.setAsyncValidators(Cz(t,this._rawAsyncValidators))}removeValidators(t){this.setValidators(Sz(t,this._rawValidators))}removeAsyncValidators(t){this.setAsyncValidators(Sz(t,this._rawAsyncValidators))}hasValidator(t){return iC(this._rawValidators,t)}hasAsyncValidator(t){return iC(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=lb,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=ab,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===ab||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()?lb:ab}_runValidator(){return this.validator?this.validator(this):null}_runAsyncValidator(t){if(this.asyncValidator){this.status=zm,this._hasOwnPendingAsyncValidator=!0;const e=mz(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 $e,this.statusChanges=new $e}_calculateStatus(){return this._allControlsDisabled()?lb:this.errors?sC:this._hasOwnPendingAsyncValidator||this._anyControlsHaveStatus(zm)?zm:this._anyControlsHaveStatus(sC)?sC:ab}_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){oC(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 Nee(i){return Array.isArray(i)?_R(i):i||null}(this._rawValidators)}_assignAsyncValidators(t){this._rawAsyncValidators=Array.isArray(t)?t.slice():t,this._composedAsyncValidatorFn=function Bee(i){return Array.isArray(i)?vR(i):i||null}(this._rawAsyncValidators)}}class Hm extends aC{constructor(t,e,n){super(CR(e),SR(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={}){Iz(this,!0,t),Object.keys(t).forEach(n=>{Tz(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 Rz extends Hm{}const $h=new me("CallSetDisabledState",{providedIn:"root",factory:()=>cb}),cb="always";function lC(i,t){return[...t.path,i]}function db(i,t,e=cb){ER(i,t),t.valueAccessor.writeValue(i.value),(i.disabled||"always"===e)&&t.valueAccessor.setDisabledState?.(i.disabled),function Vee(i,t){t.valueAccessor.registerOnChange(e=>{i._pendingValue=e,i._pendingChange=!0,i._pendingDirty=!0,"change"===i.updateOn&&kz(i,t)})}(i,t),function Hee(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 zee(i,t){t.valueAccessor.registerOnTouched(()=>{i._pendingTouched=!0,"blur"===i.updateOn&&i._pendingChange&&kz(i,t),"submit"!==i.updateOn&&i.markAsTouched()})}(i,t),function Uee(i,t){if(t.valueAccessor.setDisabledState){const e=n=>{t.valueAccessor.setDisabledState(n)};i.registerOnDisabledChange(e),t._registerOnDestroy(()=>{i._unregisterOnDisabledChange(e)})}}(i,t)}function cC(i,t,e=!0){const n=()=>{};t.valueAccessor&&(t.valueAccessor.registerOnChange(n),t.valueAccessor.registerOnTouched(n)),uC(i,t),i&&(t._invokeOnDestroyCallbacks(),i._registerOnCollectionChange(()=>{}))}function dC(i,t){i.forEach(e=>{e.registerOnValidatorChange&&e.registerOnValidatorChange(t)})}function ER(i,t){const e=wz(i);null!==t.validator?i.setValidators(xz(e,t.validator)):"function"==typeof e&&i.setValidators([e]);const n=Mz(i);null!==t.asyncValidator?i.setAsyncValidators(xz(n,t.asyncValidator)):"function"==typeof n&&i.setAsyncValidators([n]);const r=()=>i.updateValueAndValidity();dC(t._rawValidators,r),dC(t._rawAsyncValidators,r)}function uC(i,t){let e=!1;if(null!==i){if(null!==t.validator){const r=wz(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=Mz(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 dC(t._rawValidators,n),dC(t._rawAsyncValidators,n),e}function kz(i,t){i._pendingDirty&&i.markAsDirty(),i.setValue(i._pendingValue,{emitModelToViewChange:!1}),t.viewToModelUpdate(i._pendingValue),i._pendingChange=!1}function Pz(i,t){ER(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 Oz(i,t){i._syncPendingControls(),t.forEach(e=>{const n=e.control;"submit"===n.updateOn&&n._pendingChange&&(e.viewToModelUpdate(n._pendingValue),n._pendingChange=!1)})}function TR(i,t){if(!t)return null;let e,n,r;return Array.isArray(t),t.forEach(s=>{s.constructor===_l?e=s:function Wee(i){return Object.getPrototypeOf(i.constructor)===Hh}(s)?n=s:r=s}),r||n||e||null}const Yee={provide:uo,useExisting:Gn(()=>hb)},ub=(()=>Promise.resolve())();let hb=(()=>{class i extends uo{constructor(e,n,r){super(),this.callSetDisabledState=r,this.submitted=!1,this._directives=new Set,this.ngSubmit=new $e,this.form=new Hm({},_R(e),vR(n))}ngAfterViewInit(){this._setUpdateStrategy()}get formDirective(){return this}get control(){return this.form}get path(){return[]}get controls(){return this.form.controls}addControl(e){ub.then(()=>{const n=this._findContainer(e.path);e.control=n.registerControl(e.name,e.control),db(e.control,e,this.callSetDisabledState),e.control.updateValueAndValidity({emitEvent:!1}),this._directives.add(e)})}getControl(e){return this.form.get(e.path)}removeControl(e){ub.then(()=>{const n=this._findContainer(e.path);n&&n.removeControl(e.name),this._directives.delete(e)})}addFormGroup(e){ub.then(()=>{const n=this._findContainer(e.path),r=new Hm({});Pz(r,e),n.registerControl(e.name,r),r.updateValueAndValidity({emitEvent:!1})})}removeFormGroup(e){ub.then(()=>{const n=this._findContainer(e.path);n&&n.removeControl(e.name)})}getFormGroup(e){return this.form.get(e.path)}updateModel(e,n){ub.then(()=>{this.form.get(e.path).setValue(n)})}setValue(e){this.control.setValue(e)}onSubmit(e){return this.submitted=!0,Oz(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)(E(qr,10),E(pu,10),E($h,8))},i.\u0275dir=ve({type:i,selectors:[["form",3,"ngNoForm","",3,"formGroup",""],["ng-form"],["","ngForm",""]],hostBindings:function(e,n){1&e&&Oe("submit",function(s){return n.onSubmit(s)})("reset",function(){return n.onReset()})},inputs:{options:["ngFormOptions","options"]},outputs:{ngSubmit:"ngSubmit"},exportAs:["ngForm"],features:[Dn([Yee]),dt]}),i})();function Fz(i,t){const e=i.indexOf(t);e>-1&&i.splice(e,1)}function Lz(i){return"object"==typeof i&&null!==i&&2===Object.keys(i).length&&"value"in i&&"disabled"in i}const ic=class extends aC{constructor(t=null,e,n){super(CR(e),SR(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}),oC(e)&&(e.nonNullable||e.initialValueIsDefault)&&(this.defaultValue=Lz(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){Fz(this._onChange,t)}registerOnDisabledChange(t){this._onDisabledChange.push(t)}_unregisterOnDisabledChange(t){Fz(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){Lz(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}},Kee={provide:tc,useExisting:Gn(()=>Zc)},Uz=(()=>Promise.resolve())();let Zc=(()=>{class i extends tc{constructor(e,n,r,s,o,a){super(),this._changeDetectorRef=o,this.callSetDisabledState=a,this.control=new ic,this._registered=!1,this.update=new $e,this._parent=e,this._setValidators(n),this._setAsyncValidators(r),this.valueAccessor=TR(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(){db(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){Uz.then(()=>{this.control.setValue(e,{emitViewToModelChange:!1}),this._changeDetectorRef?.markForCheck()})}_updateDisabled(e){const n=e.isDisabled.currentValue,r=0!==n&&function um(i){return"boolean"==typeof i?i:null!=i&&"false"!==i}(n);Uz.then(()=>{r&&!this.control.disabled?this.control.disable():!r&&this.control.disabled&&this.control.enable(),this._changeDetectorRef?.markForCheck()})}_getPath(e){return this._parent?lC(e,this._parent):[e]}}return i.\u0275fac=function(e){return new(e||i)(E(uo,9),E(qr,10),E(pu,10),E(Io,10),E(Qn,8),E($h,8))},i.\u0275dir=ve({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:[Dn([Kee]),dt,xi]}),i})(),IR=(()=>{class i{}return i.\u0275fac=function(e){return new(e||i)},i.\u0275dir=ve({type:i,selectors:[["form",3,"ngNoForm","",3,"ngNativeValidate",""]],hostAttrs:["novalidate",""]}),i})();const Zee={provide:Io,useExisting:Gn(()=>mu),multi:!0};let mu=(()=>{class i extends Hh{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=si(i)))(n||i)}}(),i.\u0275dir=ve({type:i,selectors:[["input","type","number","formControlName",""],["input","type","number","formControl",""],["input","type","number","ngModel",""]],hostBindings:function(e,n){1&e&&Oe("input",function(s){return n.onChange(s.target.value)})("blur",function(){return n.onTouched()})},features:[Dn([Zee]),dt]}),i})(),Vz=(()=>{class i{}return i.\u0275fac=function(e){return new(e||i)},i.\u0275mod=en({type:i}),i.\u0275inj=Wt({}),i})();const RR=new me("NgModelWithFormControlWarning"),nte={provide:uo,useExisting:Gn(()=>Gh)};let Gh=(()=>{class i extends uo{constructor(e,n,r){super(),this.callSetDisabledState=r,this.submitted=!1,this._onCollectionChange=()=>this._updateDomValue(),this.directives=[],this.form=null,this.ngSubmit=new $e,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&&(uC(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 db(n,e,this.callSetDisabledState),n.updateValueAndValidity({emitEvent:!1}),this.directives.push(e),n}getControl(e){return this.form.get(e.path)}removeControl(e){cC(e.control||null,e,!1),function jee(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,Oz(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&&(cC(n||null,e),(i=>i instanceof ic)(r)&&(db(r,e,this.callSetDisabledState),e.control=r))}),this.form._updateTreeValidity({emitEvent:!1})}_setUpFormContainer(e){const n=this.form.get(e.path);Pz(n,e),n.updateValueAndValidity({emitEvent:!1})}_cleanUpFormContainer(e){if(this.form){const n=this.form.get(e.path);n&&function $ee(i,t){return uC(i,t)}(n,e)&&n.updateValueAndValidity({emitEvent:!1})}}_updateRegistrations(){this.form._registerOnCollectionChange(this._onCollectionChange),this._oldForm&&this._oldForm._registerOnCollectionChange(()=>{})}_updateValidators(){ER(this.form,this),this._oldForm&&uC(this._oldForm,this)}_checkFormPresent(){}}return i.\u0275fac=function(e){return new(e||i)(E(qr,10),E(pu,10),E($h,8))},i.\u0275dir=ve({type:i,selectors:[["","formGroup",""]],hostBindings:function(e,n){1&e&&Oe("submit",function(s){return n.onSubmit(s)})("reset",function(){return n.onReset()})},inputs:{form:["formGroup","form"]},outputs:{ngSubmit:"ngSubmit"},exportAs:["ngForm"],features:[Dn([nte]),dt,xi]}),i})();const ste={provide:tc,useExisting:Gn(()=>hC)};let hC=(()=>{class i extends tc{set isDisabled(e){}constructor(e,n,r,s,o){super(),this._ngModelWarningConfig=o,this._added=!1,this.update=new $e,this._ngModelWarningSent=!1,this._parent=e,this._setValidators(n),this._setAsyncValidators(r),this.valueAccessor=TR(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 lC(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)(E(uo,13),E(qr,10),E(pu,10),E(Io,10),E(RR,8))},i.\u0275dir=ve({type:i,selectors:[["","formControlName",""]],inputs:{name:["formControlName","name"],isDisabled:["disabled","isDisabled"],model:["ngModel","model"]},outputs:{update:"ngModelChange"},features:[Dn([ste]),dt,xi]}),i})();function Yz(i){return"number"==typeof i?i:parseInt(i,10)}function qz(i){return"number"==typeof i?i:parseFloat(i)}let Wh=(()=>{class i{constructor(){this._validator=nC}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):nC,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=ve({type:i,features:[xi]}),i})();const hte={provide:qr,useExisting:Gn(()=>gu),multi:!0};let gu=(()=>{class i extends Wh{constructor(){super(...arguments),this.inputName="max",this.normalizeInput=e=>qz(e),this.createValidator=e=>az(e)}}return i.\u0275fac=function(){let t;return function(n){return(t||(t=si(i)))(n||i)}}(),i.\u0275dir=ve({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&&It("max",n._enabled?n.max:null)},inputs:{max:"max"},features:[Dn([hte]),dt]}),i})();const fte={provide:qr,useExisting:Gn(()=>_u),multi:!0};let _u=(()=>{class i extends Wh{constructor(){super(...arguments),this.inputName="min",this.normalizeInput=e=>qz(e),this.createValidator=e=>oz(e)}}return i.\u0275fac=function(){let t;return function(n){return(t||(t=si(i)))(n||i)}}(),i.\u0275dir=ve({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&&It("min",n._enabled?n.min:null)},inputs:{min:"min"},features:[Dn([fte]),dt]}),i})();const _te={provide:qr,useExisting:Gn(()=>NR),multi:!0};let NR=(()=>{class i extends Wh{constructor(){super(...arguments),this.inputName="minlength",this.normalizeInput=e=>Yz(e),this.createValidator=e=>uz(e)}}return i.\u0275fac=function(){let t;return function(n){return(t||(t=si(i)))(n||i)}}(),i.\u0275dir=ve({type:i,selectors:[["","minlength","","formControlName",""],["","minlength","","formControl",""],["","minlength","","ngModel",""]],hostVars:1,hostBindings:function(e,n){2&e&&It("minlength",n._enabled?n.minlength:null)},inputs:{minlength:"minlength"},features:[Dn([_te]),dt]}),i})();const vte={provide:qr,useExisting:Gn(()=>BR),multi:!0};let BR=(()=>{class i extends Wh{constructor(){super(...arguments),this.inputName="maxlength",this.normalizeInput=e=>Yz(e),this.createValidator=e=>hz(e)}}return i.\u0275fac=function(){let t;return function(n){return(t||(t=si(i)))(n||i)}}(),i.\u0275dir=ve({type:i,selectors:[["","maxlength","","formControlName",""],["","maxlength","","formControl",""],["","maxlength","","ngModel",""]],hostVars:1,hostBindings:function(e,n){2&e&&It("maxlength",n._enabled?n.maxlength:null)},inputs:{maxlength:"maxlength"},features:[Dn([vte]),dt]}),i})(),Qz=(()=>{class i{}return i.\u0275fac=function(e){return new(e||i)},i.\u0275mod=en({type:i}),i.\u0275inj=Wt({imports:[Vz]}),i})();class Jz extends aC{constructor(t,e,n){super(CR(e),SR(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={}){Iz(this,!1,t),t.forEach((n,r)=>{Tz(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 eH(i){return!!i&&(void 0!==i.asyncValidators||void 0!==i.validators||void 0!==i.updateOn)}let bte=(()=>{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 eH(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 Rz(r,n)}control(e,n,r){let s={};return this.useNonNullable?(eH(n)?s=n:(s.validators=n,s.asyncValidators=r),new ic(e,{...s,nonNullable:!0})):new ic(e,n,r)}array(e,n,r){const s=e.map(o=>this._createControl(o));return new Jz(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 ic||e instanceof aC?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=Pe({token:i,factory:i.\u0275fac,providedIn:"root"}),i})(),tH=(()=>{class i{static withConfig(e){return{ngModule:i,providers:[{provide:$h,useValue:e.callSetDisabledState??cb}]}}}return i.\u0275fac=function(e){return new(e||i)},i.\u0275mod=en({type:i}),i.\u0275inj=Wt({imports:[Qz]}),i})(),nH=(()=>{class i{static withConfig(e){return{ngModule:i,providers:[{provide:RR,useValue:e.warnOnNgModelWithFormControl??"always"},{provide:$h,useValue:e.callSetDisabledState??cb}]}}}return i.\u0275fac=function(e){return new(e||i)},i.\u0275mod=en({type:i}),i.\u0275inj=Wt({imports:[Qz]}),i})();const xte=["matFormFieldNotchedOutline",""],wte=["*"],Mte=["textField"],Cte=["iconPrefixContainer"],Ste=["textPrefixContainer"];function Ete(i,t){1&i&&Ie(0,"span",19)}function Ate(i,t){if(1&i){const e=jn();G(0,"label",17),Oe("cdkObserveContent",function(){return Vt(e),Et(re(2)._refreshOutlineNotchWidth())}),Yt(1,1),fe(2,Ete,1,0,"span",18),j()}if(2&i){const e=re(2);U("floating",e._shouldLabelFloat())("cdkObserveContentDisabled",!e._hasOutline())("id",e._labelId),It("for",e._control.id)("aria-owns",e._control.id),V(2),U("ngIf",!e.hideRequiredMarker&&e._control.required)}}function Dte(i,t){1&i&&fe(0,Ate,3,6,"label",16),2&i&&U("ngIf",re()._hasFloatingLabel())}function Tte(i,t){1&i&&Ie(0,"div",20)}function Ite(i,t){}function Rte(i,t){1&i&&fe(0,Ite,0,0,"ng-template",22),2&i&&(re(2),U("ngTemplateOutlet",Zi(1)))}function kte(i,t){if(1&i&&(G(0,"div",21),fe(1,Rte,1,1,"ng-template",9),j()),2&i){const e=re();U("matFormFieldNotchedOutlineOpen",e._shouldLabelFloat())("matFormFieldNotchedOutlineLabelWidth",e._labelWidth),V(1),U("ngIf",!e._forceDisplayInfixLabel())}}function Pte(i,t){1&i&&(G(0,"div",23,24),Yt(2,2),j())}function Ote(i,t){1&i&&(G(0,"div",25,26),Yt(2,3),j())}function Fte(i,t){}function Lte(i,t){1&i&&fe(0,Fte,0,0,"ng-template",22),2&i&&(re(),U("ngTemplateOutlet",Zi(1)))}function Nte(i,t){1&i&&(G(0,"div",27),Yt(1,4),j())}function Bte(i,t){1&i&&(G(0,"div",28),Yt(1,5),j())}function Ute(i,t){1&i&&Ie(0,"div",29)}function Vte(i,t){1&i&&(G(0,"div",30),Yt(1,6),j()),2&i&&U("@transitionMessages",re()._subscriptAnimationState)}function zte(i,t){if(1&i&&(G(0,"mat-hint",34),Be(1),j()),2&i){const e=re(2);U("id",e._hintLabelId),V(1),ui(e.hintLabel)}}function Hte(i,t){if(1&i&&(G(0,"div",31),fe(1,zte,2,2,"mat-hint",32),Yt(2,7),Ie(3,"div",33),Yt(4,8),j()),2&i){const e=re();U("@transitionMessages",e._subscriptAnimationState),V(1),U("ngIf",e.hintLabel)}}const $te=["*",[["mat-label"]],[["","matPrefix",""],["","matIconPrefix",""]],[["","matTextPrefix",""]],[["","matTextSuffix",""]],[["","matSuffix",""],["","matIconSuffix",""]],[["mat-error"],["","matError",""]],[["mat-hint",3,"align","end"]],[["mat-hint","align","end"]]],Gte=["*","mat-label","[matPrefix], [matIconPrefix]","[matTextPrefix]","[matTextSuffix]","[matSuffix], [matIconSuffix]","mat-error, [matError]","mat-hint:not([align='end'])","mat-hint[align='end']"];let Ro=(()=>{class i{}return i.\u0275fac=function(e){return new(e||i)},i.\u0275dir=ve({type:i,selectors:[["mat-label"]]}),i})(),Wte=0;const iH=new me("MatError");let jte=(()=>{class i{constructor(e,n){this.id="mat-mdc-error-"+Wte++,e||n.nativeElement.setAttribute("aria-live","polite")}}return i.\u0275fac=function(e){return new(e||i)(xa("aria-live"),E(vt))},i.\u0275dir=ve({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&&ql("id",n.id)},inputs:{id:"id"},features:[Dn([{provide:iH,useExisting:i}])]}),i})(),Yte=0,rH=(()=>{class i{constructor(){this.align="start",this.id="mat-mdc-hint-"+Yte++}}return i.\u0275fac=function(e){return new(e||i)},i.\u0275dir=ve({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&&(ql("id",n.id),It("align",null),ln("mat-mdc-form-field-hint-end","end"===n.align))},inputs:{align:"align",id:"id"}}),i})();const sH=new me("MatPrefix");let qte=(()=>{class i{constructor(){this._isText=!1}set _isTextSelector(e){this._isText=!0}}return i.\u0275fac=function(e){return new(e||i)},i.\u0275dir=ve({type:i,selectors:[["","matPrefix",""],["","matIconPrefix",""],["","matTextPrefix",""]],inputs:{_isTextSelector:["matTextPrefix","_isTextSelector"]},features:[Dn([{provide:sH,useExisting:i}])]}),i})();const oH=new me("MatSuffix");let Xte=(()=>{class i{constructor(){this._isText=!1}set _isTextSelector(e){this._isText=!0}}return i.\u0275fac=function(e){return new(e||i)},i.\u0275dir=ve({type:i,selectors:[["","matSuffix",""],["","matIconSuffix",""],["","matTextSuffix",""]],inputs:{_isTextSelector:["matTextSuffix","_isTextSelector"]},features:[Dn([{provide:oH,useExisting:i}])]}),i})(),aH=(()=>{class i{constructor(e){this._elementRef=e,this.floating=!1}getWidth(){return function Kte(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)(E(vt))},i.\u0275dir=ve({type:i,selectors:[["label","matFormFieldFloatingLabel",""]],hostAttrs:[1,"mdc-floating-label","mat-mdc-floating-label"],hostVars:2,hostBindings:function(e,n){2&e&&ln("mdc-floating-label--float-above",n.floating)},inputs:{floating:"floating"}}),i})();const lH="mdc-line-ripple--active",fC="mdc-line-ripple--deactivating";let cH=(()=>{class i{constructor(e,n){this._elementRef=e,this._handleTransitionEnd=r=>{const s=this._elementRef.nativeElement.classList,o=s.contains(fC);"opacity"===r.propertyName&&o&&s.remove(lH,fC)},n.runOutsideAngular(()=>{e.nativeElement.addEventListener("transitionend",this._handleTransitionEnd)})}activate(){const e=this._elementRef.nativeElement.classList;e.remove(fC),e.add(lH)}deactivate(){this._elementRef.nativeElement.classList.add(fC)}ngOnDestroy(){this._elementRef.nativeElement.removeEventListener("transitionend",this._handleTransitionEnd)}}return i.\u0275fac=function(e){return new(e||i)(E(vt),E(gt))},i.\u0275dir=ve({type:i,selectors:[["div","matFormFieldLineRipple",""]],hostAttrs:[1,"mdc-line-ripple"]}),i})(),dH=(()=>{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)(E(vt),E(gt))},i.\u0275cmp=ot({type:i,selectors:[["div","matFormFieldNotchedOutline",""]],hostAttrs:[1,"mdc-notched-outline"],hostVars:2,hostBindings:function(e,n){2&e&&ln("mdc-notched-outline--notched",n.open)},inputs:{labelWidth:["matFormFieldNotchedOutlineLabelWidth","labelWidth"],open:["matFormFieldNotchedOutlineOpen","open"]},attrs:xte,ngContentSelectors:wte,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&&(or(),Ie(0,"div",0),G(1,"div",1),Yt(2),j(),Ie(3,"div",2)),2&e&&(V(1),qo("width",n._getNotchWidth()))},encapsulation:2,changeDetection:0}),i})();const Zte={transitionMessages:Oa("transitionMessages",[Os("enter",oi({opacity:1,transform:"translateY(0%)"})),Or("void => enter",[oi({opacity:0,transform:"translateY(-5px)"}),Yr("300ms cubic-bezier(0.55, 0, 0.55, 0.2)")])])};let UR=(()=>{class i{}return i.\u0275fac=function(e){return new(e||i)},i.\u0275dir=ve({type:i}),i})();const pC=new me("MatFormField"),Qte=new me("MAT_FORM_FIELD_DEFAULT_OPTIONS");let uH=0,yl=(()=>{class i{get hideRequiredMarker(){return this._hideRequiredMarker}set hideRequiredMarker(e){this._hideRequiredMarker=tn(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-"+uH++,this._hintLabelId="mat-mdc-hint-"+uH++,this._subscriptAnimationState="",this._labelWidth=0,this._destroyed=new Te,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(Ue(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(),Cr(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(Ue(this._destroyed)).subscribe(()=>{this._needsOutlineLabelOffsetUpdateOnStable&&(this._needsOutlineLabelOffsetUpdateOnStable=!1,this._updateOutlineLabelOffset())})}),this._dir.change.pipe(Ue(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)(E(vt),E(Qn),E(gt),E(Pa),E(zi),E(Qte,8),E(kr,8),E(qt))},i.\u0275cmp=ot({type:i,selectors:[["mat-form-field"]],contentQueries:function(e,n,r){if(1&e&&(Wi(r,Ro,5),Wi(r,Ro,7),Wi(r,UR,5),Wi(r,sH,5),Wi(r,oH,5),Wi(r,iH,5),Wi(r,rH,5)),2&e){let s;At(s=Dt())&&(n._labelChildNonStatic=s.first),At(s=Dt())&&(n._labelChildStatic=s.first),At(s=Dt())&&(n._formFieldControl=s.first),At(s=Dt())&&(n._prefixChildren=s),At(s=Dt())&&(n._suffixChildren=s),At(s=Dt())&&(n._errorChildren=s),At(s=Dt())&&(n._hintChildren=s)}},viewQuery:function(e,n){if(1&e&&($n(Mte,5),$n(Cte,5),$n(Ste,5),$n(aH,5),$n(dH,5),$n(cH,5)),2&e){let r;At(r=Dt())&&(n._textField=r.first),At(r=Dt())&&(n._iconPrefixContainer=r.first),At(r=Dt())&&(n._textPrefixContainer=r.first),At(r=Dt())&&(n._floatingLabel=r.first),At(r=Dt())&&(n._notchedOutline=r.first),At(r=Dt())&&(n._lineRipple=r.first)}},hostAttrs:[1,"mat-mdc-form-field"],hostVars:42,hostBindings:function(e,n){2&e&&ln("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:[Dn([{provide:pC,useExisting:i}])],ngContentSelectors:Gte,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&&(or($te),fe(0,Dte,1,1,"ng-template",null,0,zc),G(2,"div",1,2),Oe("click",function(s){return n._control.onContainerClick&&n._control.onContainerClick(s)}),fe(4,Tte,1,0,"div",3),G(5,"div",4),fe(6,kte,2,3,"div",5),fe(7,Pte,3,0,"div",6),fe(8,Ote,3,0,"div",7),G(9,"div",8),fe(10,Lte,1,1,"ng-template",9),Yt(11),j(),fe(12,Nte,2,0,"div",10),fe(13,Bte,2,0,"div",11),j(),fe(14,Ute,1,0,"div",12),j(),G(15,"div",13),fe(16,Vte,2,1,"div",14),fe(17,Hte,5,2,"div",15),j()),2&e&&(V(2),ln("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),V(2),U("ngIf",!n._hasOutline()&&!n._control.disabled),V(2),U("ngIf",n._hasOutline()),V(1),U("ngIf",n._hasIconPrefix),V(1),U("ngIf",n._hasTextPrefix),V(2),U("ngIf",!n._hasOutline()||n._forceDisplayInfixLabel()),V(2),U("ngIf",n._hasTextSuffix),V(1),U("ngIf",n._hasIconSuffix),V(1),U("ngIf",!n._hasOutline()),V(1),ln("mat-mdc-form-field-subscript-dynamic-size","dynamic"===n.subscriptSizing),U("ngSwitch",n._getDisplayedMessages()),V(1),U("ngSwitchCase","error"),V(1),U("ngSwitchCase","hint"))},dependencies:[vi,xy,by,UT,SU,rH,aH,dH,cH],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:[Zte.transitionMessages]},changeDetection:0}),i})(),mC=(()=>{class i{}return i.\u0275fac=function(e){return new(e||i)},i.\u0275mod=en({type:i}),i.\u0275inj=Wt({imports:[Jn,co,HI,Jn]}),i})();const pH=Fh({passive:!0});let tne=(()=>{class i{constructor(e,n){this._platform=e,this._ngZone=n,this._monitoredElements=new Map}monitor(e){if(!this._platform.isBrowser)return _o;const n=qc(e),r=this._monitoredElements.get(n);if(r)return r.subject;const s=new Te,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,pH),n.classList.add("cdk-text-field-autofill-monitored")}),this._monitoredElements.set(n,{subject:s,unlisten:()=>{n.removeEventListener("animationstart",a,pH)}}),s}stopMonitoring(e){const n=qc(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)(ee(zi),ee(gt))},i.\u0275prov=Pe({token:i,factory:i.\u0275fac,providedIn:"root"}),i})(),nne=(()=>{class i{}return i.\u0275fac=function(e){return new(e||i)},i.\u0275mod=en({type:i}),i.\u0275inj=Wt({}),i})();const VR=new me("MAT_INPUT_VALUE_ACCESSOR"),ine=["button","checkbox","file","hidden","image","radio","range","reset","submit"];let rne=0;const sne=WU(class{constructor(i,t,e,n){this._defaultErrorStateMatcher=i,this._parentForm=t,this._parentFormGroup=e,this.ngControl=n,this.stateChanges=new Te}});let rc=(()=>{class i extends sne{get disabled(){return this._disabled}set disabled(e){this._disabled=tn(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(vl.required)??!1}set required(e){this._required=tn(e)}get type(){return this._type}set type(e){this._type=e||"text",this._validateType(),!this._isTextarea&&aU().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=tn(e)}constructor(e,n,r,s,o,a,l,c,d,h){super(a,s,o,r),this._elementRef=e,this._platform=n,this._autofillMonitor=c,this._formField=h,this._uid="mat-input-"+rne++,this.focused=!1,this.stateChanges=new Te,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=>aU().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&&d.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(){ine.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)(E(vt),E(zi),E(tc,10),E(hb,8),E(Gh,8),E(YU),E(VR,10),E(tne),E(gt),E(pC,8))},i.\u0275dir=ve({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&&Oe("focus",function(){return n._focusChanged(!0)})("blur",function(){return n._focusChanged(!1)})("input",function(){return n._onInput()}),2&e&&(ql("id",n.id)("disabled",n.disabled)("required",n.required),It("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),ln("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:[Dn([{provide:UR,useExisting:i}]),dt,xi]}),i})(),mH=(()=>{class i{}return i.\u0275fac=function(e){return new(e||i)},i.\u0275mod=en({type:i}),i.\u0275inj=Wt({imports:[Jn,mC,mC,nne,Jn]}),i})();function one(i,t){if(1&i&&(G(0,"mat-label"),Be(1),j()),2&i){const e=re(2);V(1),ui(e.resource.name)}}function ane(i,t){if(1&i){const e=jn();G(0,"mat-form-field",1),fe(1,one,2,1,"mat-label",2),G(2,"input",3),Oe("ngModelChange",function(r){return Vt(e),Et(re().resource.data=r)})("change",function(){return Vt(e),Et(re().changed.emit())}),j()()}if(2&i){const e=re();U("matTooltip",e.resourceDescription),V(1),U("ngIf",e.resource.name),V(1),U("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 lne=(()=>{class i{constructor(){this.resource=null,this.resourceDescription="",this.disabled=!1,this.changed=new $e}}return i.\u0275fac=function(e){return new(e||i)},i.\u0275cmp=ot({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&&fe(0,ane,3,7,"mat-form-field",0),2&e&&U("ngIf",n.resource)},dependencies:[vi,_l,mu,nc,_u,gu,Zc,yl,Ro,rc,Fs],changeDetection:0}),i})();function cne(i,t){if(1&i&&(G(0,"mat-label"),Be(1),j()),2&i){const e=re(2);V(1),ui(e.resource.name)}}function dne(i,t){if(1&i){const e=jn();G(0,"mat-form-field",1),fe(1,cne,2,1,"mat-label",2),G(2,"input",3),Oe("ngModelChange",function(r){return Vt(e),Et(re().resource.data=r)})("change",function(){return Vt(e),Et(re().changed.emit())}),j()()}if(2&i){const e=re();U("matTooltip",e.resourceDescription),V(1),U("ngIf",e.resource.name),V(1),U("disabled",e.disabled||void 0!==e.resource.schema.required_value)("maxlength",e.maxLength)("minlength",e.minLength)("ngModel",e.resource.data)}}let gH=(()=>{class i{constructor(){this._resource=null,this.resourceDescription="",this.disabled=!1,this.changed=new $e,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=ot({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&&fe(0,dne,3,6,"mat-form-field",0),2&e&&U("ngIf",n.resource)},dependencies:[vi,_l,nc,NR,BR,Zc,yl,Ro,rc,Fs],changeDetection:0}),i})();const sc=(i,t)=>i+(i.includes("__")?"/":"__")+t,jh=function(){return[]};function une(i,t){if(1&i&&(G(0,"mat-panel-description"),Be(1," Click to view items ("),G(2,"b"),Be(3),j(),Be(4,") "),j()),2&i){const e=re(2);V(3),ui((e.resourceData||Rs(1,jh)).length)}}function hne(i,t){1&i&&(G(0,"mat-panel-description"),Be(1," Empty array "),j())}function fne(i,t){}function pne(i,t){if(1&i){const e=jn();G(0,"mat-expansion-panel",4),Oe("opened",function(){return Vt(e),Et(re().onContentsTrigger(!0))})("closed",function(){return Vt(e),Et(re().onContentsTrigger(!1))}),G(1,"mat-expansion-panel-header",5)(2,"mat-panel-title"),Be(3),j(),fe(4,une,5,2,"mat-panel-description",1),fe(5,hne,2,0,"mat-panel-description",1),j(),fe(6,fne,0,0,"ng-template",6),j()}if(2&i){const e=re(),n=Zi(3);V(1),U("matTooltip",e.resourceDescription),V(2),Qi(" ",e.name," "),V(1),U("ngIf",(e.resourceData||Rs(5,jh)).length>0),V(1),U("ngIf",0==(e.resourceData||Rs(6,jh)).length),V(1),U("ngTemplateOutlet",n)}}function mne(i,t){}function gne(i,t){if(1&i&&(Gr(0),G(1,"h2",5),Be(2),j(),G(3,"div",7),fe(4,mne,0,0,"ng-template",6),j(),Wr()),2&i){const e=re(),n=Zi(3);V(1),U("matTooltip",e.resourceDescription),V(1),ui(e.name),V(2),U("ngTemplateOutlet",n)}}function _ne(i,t){}function vne(i,t){if(1&i&&Ie(0,"app-editor",10),2&i){const e=re().$implicit,n=re(3);U("resource",n.children[n.pageIndex*n.pageSize+e])("disabled",n.disabled)}}function yne(i,t){if(1&i&&(Gr(0),fe(1,vne,1,2,"app-editor",9),Wr()),2&i){const e=t.$implicit,n=re(3);V(1),U("ngIf",n.pageIndex*n.pageSize+e0)}let zR=(()=>{class i{constructor(e,n){this.main=e,this.cdr=n,this._resource=null,this.resourceDescription="",this.disabled=!1,this.changed=new $e,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 Te}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:sc(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(Ue(this.destroyed$),gn(([n,r])=>!!this.resource&&n.startsWith(this.resource.id)&&!n.substring(this.resource.id.length+1).includes("/"))).subscribe(function(){var n=nt(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 Qe(null),this.imageUrl$=new Qe(null),this.destroyed$=new Te,this.changed=new $e}set resource(e){this._resource$.next(e)}get resource(){return this._resource$.getValue()}ngAfterViewInit(){var e=this;return nt(function*(){e._resource$.pipe(Ue(e.destroyed$)).subscribe(function(){var n=nt(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)(E(Jl),E(Fa))},i.\u0275cmp=ot({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&&(Ie(0,"app-compound-block-ui",0),ct(1,"async"),fe(2,Dne,2,3,"img",1),ct(3,"async")),2&e&&(U("resource",ut(1,3,n._resource$))("fieldBlacklist",Rs(7,Tne)),V(2),U("ngIf",ut(3,5,n.imageUrl$)))},dependencies:[vi,ec,Ia],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 Rne=["*"],Lne=new me("MAT_CARD_CONFIG");let _H=(()=>{class i{constructor(e){this.appearance=e?.appearance||"raised"}}return i.\u0275fac=function(e){return new(e||i)(E(Lne,8))},i.\u0275cmp=ot({type:i,selectors:[["mat-card"]],hostAttrs:[1,"mat-mdc-card","mdc-card"],hostVars:4,hostBindings:function(e,n){2&e&&ln("mat-mdc-card-outlined","outlined"===n.appearance)("mdc-card--outlined","outlined"===n.appearance)},inputs:{appearance:"appearance"},exportAs:["matCard"],ngContentSelectors:Rne,decls:1,vars:0,template:function(e,n){1&e&&(or(),Yt(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})(),vH=(()=>{class i{}return i.\u0275fac=function(e){return new(e||i)},i.\u0275mod=en({type:i}),i.\u0275inj=Wt({imports:[Jn,co,Jn]}),i})();class HR{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 Te,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 $R=(()=>{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=Pe({token:i,factory:i.\u0275fac,providedIn:"root"}),i})(),aie=(()=>{class i{}return i.\u0275fac=function(e){return new(e||i)},i.\u0275mod=en({type:i}),i.\u0275inj=Wt({imports:[Jn,co,tb,Jn]}),i})();const CH={transformPanel:Oa("transformPanel",[Or("void => enter-dropdown",Yr("120ms cubic-bezier(0, 0, 0.2, 1)",sV([oi({opacity:0,transform:"scale(1, 0.8)"}),oi({opacity:1,transform:"scale(1, 1)"})]))),Or("void => enter-dialog",Yr("150ms cubic-bezier(0, 0, 0.2, 1)",sV([oi({opacity:0,transform:"scale(0.7)"}),oi({transform:"none",opacity:1})]))),Or("* => void",Yr("100ms linear",oi({opacity:0})))]),fadeInCalendar:Oa("fadeInCalendar",[Os("void",oi({opacity:0})),Os("enter",oi({opacity:1})),Or("void => *",Yr("120ms 100ms cubic-bezier(0.55, 0, 0.55, 0.2)"))])},AH=function(i){return{active:i}};function Sie(i,t){if(1&i){const e=jn();G(0,"button",2),Oe("click",function(){const s=Vt(e).$implicit;return Et(re().select(s))}),j()}if(2&i){const e=t.$implicit,n=re();qo("background-color",e),U("ngClass",sm(3,AH,n.selectedColor===e))}}function Eie(i,t){if(1&i){const e=jn();G(0,"button",2),Oe("click",function(){const s=Vt(e).$implicit;return Et(re().select(s))}),j()}if(2&i){const e=t.$implicit,n=re();qo("background-color",e),U("ngClass",sm(3,AH,n.selectedColor===e))}}const Aie=["button"],Die=/^\s+/,Tie=/\s+$/,Gm=Math.round,Iie=(Math,Math,Math,/[^0-9]/g),DH=["#ffffff","#ffff00","#ff00ff","#ff0000","#c0c0c0","#808080","#808000","#800080","#800000","#00ffff","#00ff00","#008080","#008000","#0000ff","#000080","#000000"];function TH(i,t,e){const n=i.getImageData(t,e,1,1).data;return{r:n[0],g:n[1],b:n[2]}}function Yh(i){return 1==i.length?"0"+i:""+i}function kie(i){return Math.round(255*parseFloat(i)).toString(16)}function IH(i){return Qo(i)/255}function Qo(i){return parseInt(i,16)}function RH(i,t,e,n){var r=[Yh(Gm(i).toString(16)),Yh(Gm(t).toString(16)),Yh(Gm(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 vu="(?:[-\\+]?\\d*\\.\\d+%?)|(?:[-\\+]?\\d+%?)",jR="[\\s|\\(]+("+vu+")[,|\\s]+("+vu+")[,|\\s]+("+vu+")\\s*\\)?",YR="[\\s|\\(]+("+vu+")[,|\\s]+("+vu+")[,|\\s]+("+vu+")[,|\\s]+("+vu+")\\s*\\)?",qh={CSS_UNIT:new RegExp(vu),rgb:new RegExp("rgb"+jR),rgba:new RegExp("rgba"+YR),hsl:new RegExp("hsl"+jR),hsla:new RegExp("hsla"+YR),hsv:new RegExp("hsv"+jR),hsva:new RegExp("hsva"+YR),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 qR(i){let t;return i=i.replace(Die,"").replace(Tie,"").toLowerCase(),(t=qh.rgb.exec(i))?{r:t[1],g:t[2],b:t[3],a:1}:(t=qh.rgba.exec(i))?{r:t[1],g:t[2],b:t[3],a:t[4]}:(t=qh.hex8.exec(i))?{r:Qo(t[1]),g:Qo(t[2]),b:Qo(t[3]),a:IH(t[4])}:(t=qh.hex6.exec(i))?{r:Qo(t[1]),g:Qo(t[2]),b:Qo(t[3]),a:1}:(t=qh.hex4.exec(i))?{r:Qo(t[1]+""+t[1]),g:Qo(t[2]+""+t[2]),b:Qo(t[3]+""+t[3]),a:IH(t[4]+""+t[4])}:(t=qh.hex3.exec(i))?{r:Qo(t[1]+""+t[1]),g:Qo(t[2]+""+t[2]),b:Qo(t[3]+""+t[3]),a:1}:null}class Xh{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=RH(this.r,this.g,this.b),this.rgba=this.toRgba()}toHex(t){return RH(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 Rie(i,t,e,n,r){var s=[Yh(Gm(i).toString(16)),Yh(Gm(t).toString(16)),Yh(Gm(e).toString(16)),Yh(kie(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 kH=(()=>{class i{constructor(e,n){this.zone=e,this.colorChanged=new $e,this.x=0,this.y=0,this.drag=!1,this._destroyed=new Te,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){Co()},i.\u0275dir=ve({type:i,inputs:{color:"color"},outputs:{colorChanged:"colorChanged"}}),i})(),Fie=(()=>{class i extends kH{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}=TH(this.ctx,e.offsetX,e.offsetY);this.emitChange(new Xh(n,r,s))}}return i.\u0275fac=function(e){return new(e||i)(E(gt))},i.\u0275cmp=ot({type:i,selectors:[["ngx-mat-color-slider"]],features:[dt],decls:1,vars:0,consts:[["id","color-strip","width","15","height","234",1,"zone-strip",3,"mousedown","mouseup"]],template:function(e,n){1&e&&(G(0,"canvas",0),Oe("mousedown",function(s){return n.onMousedown(s)})("mouseup",function(s){return n.onMouseup(s)}),j())}}),i})(),Lie=(()=>{class i{constructor(){}onInput(e){this._formatInput(e.target)}_formatInput(e){let n=Number(e.value.replace(Iie,""));n=isNaN(n)?0:n,e.value=n}}return i.\u0275fac=function(e){return new(e||i)},i.\u0275dir=ve({type:i,selectors:[["","ngxMatNumericColorInput",""]],hostBindings:function(e,n){1&e&&Oe("input",function(s){return n.onInput(s)})}}),i})(),Bie=(()=>{class i extends kH{constructor(e){super(e,"color-block"),this.zone=e,this._resetBaseColor=!0,this.formGroup=new Hm({r:new ic(null,[vl.required]),g:new ic(null,[vl.required]),b:new ic(null,[vl.required]),a:new ic(null,[vl.required]),hex:new ic(null,[vl.required,vl.pattern(qh.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(){Cr(this.rCtrl.valueChanges,this.gCtrl.valueChanges,this.bCtrl.valueChanges,this.aCtrl.valueChanges).pipe(Ue(this._destroyed),gl(400)).subscribe(r=>{const s=new Xh(Number(this.rCtrl.value),Number(this.gCtrl.value),Number(this.bCtrl.value),Number(this.aCtrl.value));this.emitChange(s)}),this.hexCtrl.valueChanges.pipe(Ue(this._destroyed),gl(400),Ql()).subscribe(r=>{const s=qR(r);if(null!=s){const o=new Xh(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}=TH(this.ctx,e.offsetX,e.offsetY);this.emitChange(new Xh(n,r,s))}}return i.\u0275fac=function(e){return new(e||i)(E(gt))},i.\u0275cmp=ot({type:i,selectors:[["ngx-mat-color-canvas"]],hostAttrs:[1,"ngx-mat-color-canvas"],features:[dt,xi],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&&(G(0,"form",0)(1,"div",1)(2,"div",2)(3,"canvas",3),Oe("mousedown",function(s){return n.onMousedown(s)})("mouseup",function(s){return n.onMouseup(s)}),j(),G(4,"ngx-mat-color-slider",4),Oe("colorChanged",function(s){return n.onSliderColorChanged(s)}),j()(),G(5,"div",5)(6,"mat-form-field")(7,"mat-label"),Be(8,"R"),j(),Ie(9,"input",6),j(),G(10,"mat-form-field")(11,"mat-label"),Be(12,"G"),j(),Ie(13,"input",7),j(),G(14,"mat-form-field")(15,"mat-label"),Be(16,"B"),j(),Ie(17,"input",8),j()()(),G(18,"div",1),Ie(19,"button",9),G(20,"mat-form-field")(21,"mat-label"),Be(22,"HEX6"),j(),G(23,"mat-label",10),Be(24,"#\xa0"),j(),Ie(25,"input",11),j(),G(26,"mat-form-field",12)(27,"mat-label"),Be(28,"A"),j(),Ie(29,"input",13),j()()()),2&e&&(U("formGroup",n.formGroup),V(19),qo("background-color",(null==n.color?null:n.color.rgba)||"transparent"))},dependencies:[rc,yl,Ro,qte,CV,IR,_l,mu,nc,bR,_u,gu,Gh,hC,Fie,Lie],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})(),Uie=(()=>{class i{constructor(){this.colorChanged=new $e,this.colors1=DH.slice(0,8),this.colors2=DH.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}=qR(e);this.colorChanged.emit(new Xh(n,r,s,o))}}return i.\u0275fac=function(e){return new(e||i)},i.\u0275cmp=ot({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&&(G(0,"div",0),fe(1,Sie,1,5,"button",1),j(),G(2,"div",0),fe(3,Eie,1,5,"button",1),j()),2&e&&(V(1),U("ngForOf",n.colors1),V(2),U("ngForOf",n.colors2))},dependencies:[hm,lo,CV],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})(),PH=(()=>{class i{constructor(){this.colorChanged=new $e}ngOnInit(){}handleColorChanged(e){this.colorChanged.emit(e)}}return i.\u0275fac=function(e){return new(e||i)},i.\u0275cmp=ot({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&&(G(0,"ngx-mat-color-canvas",0),Oe("colorChanged",function(s){return n.handleColorChanged(s)}),j(),G(1,"ngx-mat-color-collection",0),Oe("colorChanged",function(s){return n.handleColorChanged(s)}),j()),2&e&&(U("color",n.color),V(1),U("color",n.color))},dependencies:[Bie,Uie],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})(),XR=(()=>{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=qR(e);return n?new Xh(n.r,n.g,n.b,n.a):null}}return i.\u0275fac=function(e){return new(e||i)},i.\u0275prov=Pe({token:i,factory:i.\u0275fac}),i})();const Vie={display:{colorInput:"hex"}},OH=new me("mat-color-formats"),FH=new me("ngx-mat-colorpicker-scroll-strategy"),Hie={provide:FH,deps:[as],useFactory:function zie(i){return()=>i.scrollStrategies.reposition()}},$ie=Jy(class{constructor(i){this._elementRef=i}});let LH=(()=>{class i extends $ie{constructor(e){super(e)}}return i.\u0275fac=function(e){return new(e||i)(E(vt))},i.\u0275cmp=ot({type:i,selectors:[["ngx-mat-color-picker-content"]],viewQuery:function(e,n){if(1&e&&$n(PH,5),2&e){let r;At(r=Dt())&&(n._palette=r.first)}},hostAttrs:[1,"ngx-mat-colorpicker-content"],hostVars:3,hostBindings:function(e,n){2&e&&(Rw("@transformPanel","enter"),ln("ngx-mat-colorpicker-content-touch",n.picker.touchUi))},inputs:{color:"color"},exportAs:["ngxMatColorPickerContent"],features:[dt],decls:1,vars:1,consts:[[3,"color","colorChanged"]],template:function(e,n){1&e&&(G(0,"ngx-mat-color-palette",0),Oe("colorChanged",function(s){return n.picker.select(s)}),j()),2&e&&U("color",n.picker._selected)},dependencies:[PH],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:[CH.transformPanel,CH.fadeInCalendar]},changeDetection:0}),i})(),NH=(()=>{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 $e,this.closedStream=new $e,this._touchUi=!1,this._opened=!1,this._defaultColor="primary",this._validSelected=null,this._disabledChange=new Te,this._focusedElementBeforeOpen=null,this._inputSubscription=Qt.EMPTY,this._selectedChanged=new Te,this._scrollStrategy=a}get disabled(){return void 0===this._disabled&&this._pickerInput?this._pickerInput.disabled:!!this._disabled}set disabled(e){const n=tn(e);n!==this._disabled&&(this._disabled=n,this._disabledChange.next(n))}get touchUi(){return this._touchUi}set touchUi(e){this._touchUi=tn(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(LH,{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 Nh(LH,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(Oi(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"),Cr(this._popupRef.backdropClick(),this._popupRef.detachments(),this._popupRef.keydownEvents().pipe(gn(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)(E(Bm),E(as),E(gt),E(XR),E(Pa,8),E(FH),E(qt,8),E(jr))},i.\u0275cmp=ot({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 vC{constructor(t,e){this.target=t,this.targetElement=e,this.value=this.target.value}}const Gie={provide:Io,useExisting:Gn(()=>yC),multi:!0},Wie={provide:qr,useExisting:Gn(()=>yC),multi:!0};let yC=(()=>{class i{constructor(e,n,r,s){if(this._elementRef=e,this._formField=n,this._colorFormats=r,this._adapter=s,this.colorChange=new $e,this.colorInput=new $e,this._disabledChange=new $e,this._valueChange=new $e,this._onTouched=()=>{},this._cvaOnChange=()=>{},this._validatorOnChange=()=>{},this._pickerSubscription=Qt.EMPTY,this._validator=vl.compose([]),this._lastValueValid=!1,!this._colorFormats)throw function Oie(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 vC(this,this._elementRef.nativeElement)),this.colorChange.emit(new vC(this,this._elementRef.nativeElement))}))}get disabled(){return!!this._disabled}set disabled(e){const n=tn(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 vC(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 vC(this,this._elementRef.nativeElement)))}}return i.\u0275fac=function(e){return new(e||i)(E(vt),E(yl,8),E(OH,8),E(XR))},i.\u0275dir=ve({type:i,selectors:[["input","ngxMatColorPicker",""]],hostVars:3,hostBindings:function(e,n){1&e&&Oe("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&&(ql("disabled",n.disabled),It("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:[Dn([Gie,Wie,{provide:VR,useExisting:i}])]}),i})(),jie=(()=>{class i{constructor(e){this._cd=e,this._stateChanges=Qt.EMPTY}get disabled(){if(null==this._disabled&&this.picker)return this.picker.disabled}set disabled(e){this._disabled=e}ngOnInit(){}ngOnChanges(e){e.picker&&this._watchStateChanges()}ngOnDestroy(){this._stateChanges.unsubscribe()}ngAfterContentInit(){this._watchStateChanges()}open(e){this.picker&&!this.disabled&&(this.picker.open(),e.stopPropagation())}_watchStateChanges(){const e=this.picker?this.picker._disabledChange:mt(),n=this.picker&&this.picker._pickerInput?this.picker._pickerInput._disabledChange:mt(),r=this.picker?Cr(this.picker.openedStream,this.picker.closedStream):mt();this._stateChanges.unsubscribe(),this._stateChanges=Cr(e,n,r).subscribe(()=>this._cd.markForCheck())}}return i.\u0275fac=function(e){return new(e||i)(E(Qn))},i.\u0275cmp=ot({type:i,selectors:[["ngx-mat-color-toggle"]],viewQuery:function(e,n){if(1&e&&$n(Aie,5),2&e){let r;At(r=Dt())&&(n._button=r.first)}},hostAttrs:[1,"ngx-mat-color-toggle"],hostVars:7,hostBindings:function(e,n){1&e&&Oe("focus",function(){return n._button.focus()}),2&e&&(It("tabindex",-1),ln("ngx-mat-color-toggle-active",n.picker&&n.picker.opened)("mat-accent",n.picker&&"accent"===n.picker.color)("mat-warn",n.picker&&"warn"===n.picker.color))},inputs:{picker:["for","picker"],tabIndex:"tabIndex",disabled:"disabled"},exportAs:["ngxMatColorPickerToggle"],features:[xi],decls:4,vars:5,consts:[["mat-icon-button","","type","button",3,"disabled","click"],["button",""]],template:function(e,n){1&e&&(G(0,"button",0,1),Oe("click",function(s){return n.open(s)}),G(2,"mat-icon"),Be(3,"palette"),j()()),2&e&&(U("disabled",n.disabled),It("aria-haspopup",n.picker?"dialog":null)("tabindex",n.disabled?-1:n.tabIndex),V(2),qo("color",null==n.picker||null==n.picker._selected?null:n.picker._selected.rgba))},dependencies:[qM,gR],styles:[".mat-form-field-appearance .mat-form-field-prefix .ngx-mat-color-toggle-default-icon,.mat-form-field-appearance .mat-form-field-suffix .ngx-mat-color-toggle-default-icon{width:1em}.mat-form-field:not(.mat-form-field-appearance) .mat-form-field-prefix .ngx-mat-color-toggle-default-icon,.mat-form-field:not(.mat-form-field-appearance) .mat-form-field-suffix .ngx-mat-color-toggle-default-icon{display:block;width:1.5em;height:1.5em}.mat-form-field:not(.mat-form-field-appearance) .mat-form-field-prefix .mat-icon-button .ngx-mat-color-toggle-default-icon,.mat-form-field:not(.mat-form-field-appearance) .mat-form-field-suffix .mat-icon-button .ngx-mat-color-toggle-default-icon{margin:auto}\n"],encapsulation:2}),i})(),Yie=(()=>{class i{}return i.\u0275fac=function(e){return new(e||i)},i.\u0275mod=en({type:i}),i.\u0275inj=Wt({providers:[XR,Hie],imports:[co,mH,XM,vH,aie,tH,nH,vV,Bh,tz]}),i})();const qie=["picker"],Xie=function(i){return{"background-color":i}};function Kie(i,t){if(1&i){const e=jn();G(0,"div",5),Oe("click",function(r){const o=Vt(e).index;return Et(re().onColorClicked(r.currentTarget,o))}),j()}if(2&i){const e=t.$implicit,n=t.index,r=re();U("ngStyle",sm(2,Xie,"#"+r.lpad(e.toString(16),"0",8)))("matTooltip",n+": #"+e.toString(16))}}const Zie=function(){return["colors"]};let Qie=(()=>{class i{constructor(){this.resource=null,this.changed=new $e,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 bU;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=ot({type:i,selectors:[["app-palette-block-ui"]],viewQuery:function(e,n){if(1&e&&$n(qie,5),2&e){let r;At(r=Dt())&&(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&&(Ie(0,"app-compound-block-ui",0),G(1,"div",1),fe(2,Kie,1,4,"div",2),j(),G(3,"input",3),Oe("colorChange",function(s){return n.onColorChange(s.value)}),j(),Ie(4,"ngx-mat-color-picker",null,4)),2&e){const r=Zi(5);U("resource",n.resource)("fieldBlacklist",Rs(4,Zie)),V(2),U("ngForOf",null==n.resourceData?null:n.resourceData.colors),V(1),U("ngxMatColorPicker",r)}},dependencies:[lo,VT,rc,Fs,yC,NH,ec],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 Jie=["editorBody"];function ere(i,t){if(1&i&&(G(0,"div",11),Be(1),j()),2&i){const e=re().$implicit;V(1),ui(e.offset)}}function tre(i,t){if(1&i){const e=jn();G(0,"input",12),Oe("input",function(r){const o=Vt(e).index,a=re().index;return Et(re().onHexInput(r,a,o))})("focus",function(r){const o=Vt(e).index;return Et(re(2).onHexFocus(r,o))})("blur",function(r){return Vt(e),Et(re(2).onHexBlur(r))}),j()}if(2&i){const e=t.$implicit,n=t.index;U("id","hex_input__"+re().index+"__"+n)("value",e[0])("disabled",null===e[0])}}function nre(i,t){1&i&&Ie(0,"div",3)}function ire(i,t){if(1&i){const e=jn();G(0,"span",15),Oe("click",function(){const s=Vt(e).index,o=re(2).index;return Et(re().blurInput(o,s))}),Be(1),j()}if(2&i){const e=t.$implicit,n=t.index;U("id","utf_char__"+re(2).index+"__"+n),V(1),ui(e[1])}}function rre(i,t){if(1&i&&(G(0,"div",13),fe(1,ire,2,2,"span",14),j()),2&i){const e=re().$implicit,n=re();V(1),U("ngForOf",e.values)("ngForTrackBy",n.trackByIndex)}}function sre(i,t){if(1&i&&(G(0,"div",5),fe(1,ere,2,1,"div",6),ct(2,"async"),G(3,"div",7),fe(4,tre,1,3,"input",8),j(),fe(5,nre,1,0,"div",9),ct(6,"async"),ct(7,"async"),fe(8,rre,2,2,"div",10),ct(9,"async"),j()),2&i){const e=t.$implicit,n=t.index,r=re();ln("gray",n%2!=0),V(1),U("ngIf",ut(2,7,r._showOffsets$)),V(3),U("ngForOf",e.values)("ngForTrackBy",r.trackByIndex),V(1),U("ngIf",ut(6,9,r._showOffsets$)||ut(7,11,r._showUtf8$)),V(3),U("ngIf",ut(9,13,r._showUtf8$))}}function ore(i,t){if(1&i){const e=jn();G(0,"div",16)(1,"button",17),Oe("click",function(){return Vt(e),Et(re().changePage(-1))}),ct(2,"async"),Be(3,"Previous"),j(),G(4,"span"),Be(5),ct(6,"async"),ct(7,"async"),j(),G(8,"button",17),Oe("click",function(){return Vt(e),Et(re().changePage(1))}),ct(9,"async"),ct(10,"async"),Be(11," Next "),j()()}if(2&i){const e=re();V(1),U("disabled",0===ut(2,4,e.currentPage$)),V(4),Dh("Page ",(ut(6,6,e.currentPage$)||0)+1," of ",ut(7,8,e.totalPages$),""),V(3),U("disabled",(ut(9,10,e.currentPage$)||0)>=(ut(10,12,e.totalPages$)||0)-1)}}let are=(()=>{class i{set maxColumns(e){this._maxColumns$.next(e)}set maxRows(e){this._maxRows$.next(e)}set showOffsets(e){this._showOffsets$.next(e)}set showUtf8(e){this._showUtf8$.next(e)}set data(e){if(e!==this._data$.value){if(e.length===this._data$.value.length){for(let n=0;n=32&&e<=126?String.fromCharCode(e):"."]}ngAfterViewInit(){new ResizeObserver(e=>{for(const n of e)this.viewportSize$.next([n.contentRect.width,n.contentRect.height])}).observe(this.editorBody.nativeElement),Ra([this.viewportSize$,this._maxColumns$,this._maxRows$,this._showOffsets$,this._showUtf8$]).pipe(Ue(this.destroyed$),Wy(50)).subscribe(([[e,n],r,s,o,a])=>{let l=e-8;o&&(l-=68);let c=34;a&&(l-=8,c+=10);let h=Math.floor(l/c);r>0&&h>r&&(h=r);let p=this.pageSize$.value[0];h===p+1&&l/c%1<.5&&(h=p),h=Math.max(1,h);let m=Math.floor(n/28);s>0&&m>s&&(m=s),m=Math.max(1,m),(h!=this.pageSize$.value[0]||m!==this.pageSize$.value[1])&&this.pageSize$.next([h,m])}),Ra([this._data$,this.currentPage$,this.pageSize$]).pipe(Ue(this.destroyed$)).subscribe(([e,n,r])=>{if(0===r[0]||0===r[1])return;let s=Math.max(1,Math.ceil(Math.ceil(e.length/r[0])/r[1]));if(this.totalPages$.value!==s&&this.totalPages$.next(s),n>=s)return void this.currentPage$.next(n=s-1);const o=[];for(let a=n*r[0]*r[1];a=0&&a<=255&&(this.data[(this.currentPage$.value*this.pageSize$.value[1]+n)*this.pageSize$.value[0]+r]=a,this.renderedRows$.value[n].values[r]=this.renderValue(a),this.cdr.detectChanges(),this.dataChange.emit(this.data),this.goToNextInput(s.id))}}onHexFocus(e,n){const r=e.target,s=r.closest(".row");s&&s.querySelectorAll(".utf8-values span").forEach((a,l)=>{a.classList.toggle("highlight",l===n)}),r.select()}onHexBlur(e){const r=e.target.closest(".row");r&&r.querySelectorAll(".utf8-values span").forEach(o=>{o.classList.remove("highlight")})}}return i.\u0275fac=function(e){return new(e||i)(E(Qn))},i.\u0275cmp=ot({type:i,selectors:[["hex-editor"]],viewQuery:function(e,n){if(1&e&&$n(Jie,5),2&e){let r;At(r=Dt())&&(n.editorBody=r.first)}},inputs:{maxColumns:"maxColumns",maxRows:"maxRows",showOffsets:"showOffsets",showUtf8:"showUtf8",data:"data",readOnly:"readOnly"},outputs:{dataChange:"dataChange"},decls:7,vars:7,consts:[[1,"editor-body"],["editorBody",""],["class","row",3,"gray",4,"ngFor","ngForOf","ngForTrackBy"],[1,"flex-spacer"],["class","pagination",4,"ngIf"],[1,"row"],["class","offset",4,"ngIf"],[1,"hex-values"],["maxlength","2",3,"id","value","disabled","input","focus","blur",4,"ngFor","ngForOf","ngForTrackBy"],["class","flex-spacer",4,"ngIf"],["class","utf8-values",4,"ngIf"],[1,"offset"],["maxlength","2",3,"id","value","disabled","input","focus","blur"],[1,"utf8-values"],[3,"id","click",4,"ngFor","ngForOf","ngForTrackBy"],[3,"id","click"],[1,"pagination"],[3,"disabled","click"]],template:function(e,n){1&e&&(G(0,"div",0,1),fe(2,sre,10,15,"div",2),ct(3,"async"),Ie(4,"div",3),j(),fe(5,ore,12,14,"div",4),ct(6,"async")),2&e&&(V(2),U("ngForOf",ut(3,3,n.renderedRows$))("ngForTrackBy",n.trackByIndex),V(3),U("ngIf",(ut(6,5,n.totalPages$)||0)>1))},dependencies:[lo,vi,Ia],styles:["[_nghost-%COMP%]{display:flex;flex-direction:column;font-family:monospace}.editor-body[_ngcontent-%COMP%]{display:flex;flex-grow:1;flex-direction:column;overflow-y:hidden}.row[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:center;height:24px;margin-bottom:4px}.row.gray[_ngcontent-%COMP%]{background-color:#d3d3d3}.offset[_ngcontent-%COMP%]{width:60px;text-align:left;margin-right:8px}.hex-values[_ngcontent-%COMP%]{display:flex;gap:2px;flex-shrink:1;overflow-x:clip}.hex-values[_ngcontent-%COMP%] input[_ngcontent-%COMP%]{width:32px;text-align:center;box-sizing:border-box}.utf8-values[_ngcontent-%COMP%]{margin-left:8px}.utf8-values[_ngcontent-%COMP%] span[_ngcontent-%COMP%]{display:inline-block;width:8px;margin-left:2px;color:#000}.utf8-values[_ngcontent-%COMP%] span.highlight[_ngcontent-%COMP%]{background-color:#ff0}.pagination[_ngcontent-%COMP%]{display:flex;justify-content:space-between;align-items:center;margin-top:1em}.flex-spacer[_ngcontent-%COMP%]{flex-grow:1}"],changeDetection:0}),i})(),lre=(()=>{class i{}return i.\u0275fac=function(e){return new(e||i)},i.\u0275mod=en({type:i}),i.\u0275inj=Wt({imports:[co]}),i})();const cre=["editor"];let dre=(()=>{class i{constructor(){this._resource=null,this.empty=new Uint8Array,this.data$=new Qe(new Uint8Array),this.resourceDescription="",this.disabled=!1,this.changed=new $e}get resource(){return this._resource}set resource(e){this._resource=e,this.data$.next(new Uint8Array(e?e.data:0))}onDataChange(e){this._resource.data=Array.from(e),this.changed.emit()}}return i.\u0275fac=function(e){return new(e||i)},i.\u0275cmp=ot({type:i,selectors:[["app-binary-block-ui"]],viewQuery:function(e,n){if(1&e&&$n(cre,5),2&e){let r;At(r=Dt())&&(n.editorDiv=r.first)}},inputs:{resource:"resource",resourceDescription:"resourceDescription",disabled:"disabled"},outputs:{changed:"changed"},decls:5,vars:10,consts:[["matTooltipPosition","above",3,"matTooltip"],[3,"data","maxColumns","showOffsets","readOnly","dataChange"]],template:function(e,n){1&e&&(G(0,"h2",0),Be(1),j(),G(2,"hex-editor",1),Oe("dataChange",function(s){return n.onDataChange(s)}),ct(3,"async"),ct(4,"async"),j()),2&e&&(U("matTooltip",n.resourceDescription),V(1),ui(null==n.resource?null:n.resource.name),V(1),U("data",ut(3,6,n.data$)||n.empty)("maxColumns",8)("showOffsets",(ut(4,8,n.data$)||n.empty).length>16)("readOnly",n.disabled))},dependencies:[Fs,are,Ia],changeDetection:0}),i})();const ure=["picker"];function hre(i,t){if(1&i&&(G(0,"mat-label",8),Be(1),j()),2&i){const e=re();V(1),ui(null==e.resource?null:e.resource.name)}}const fre=function(i){return{transform:i}};let pre=(()=>{class i{constructor(e){this.cdr=e,this.resource=null,this.resourceDescription="",this.changed=new $e,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)(E(Qn))},i.\u0275cmp=ot({type:i,selectors:[["app-angle-block-ui"]],viewQuery:function(e,n){if(1&e&&$n(ure,5),2&e){let r;At(r=Dt())&&(n.picker=r.first)}},hostBindings:function(e,n){1&e&&Oe("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&&(G(0,"div",0)(1,"div",1,2)(3,"div",3),Ie(4,"div",4)(5,"div",5),j()(),G(6,"div",6),fe(7,hre,2,1,"mat-label",7),G(8,"mat-label"),Be(9),ct(10,"number"),j(),G(11,"mat-label"),Be(12),ct(13,"number"),j()()()),2&e&&(U("matTooltip",n.resourceDescription),V(3),U("ngStyle",sm(11,fre,"rotate("+((null==n.resource?null:n.resource.data)||0)+"rad)")),V(4),U("ngIf",null==n.resource?null:n.resource.name),V(2),Qi("",QD(10,5,180*(null==n.resource?null:n.resource.data)/n.pi||0,"1.2-2")," deg"),V(3),Qi("",QD(13,8,(null==n.resource?null:n.resource.data)||0,"1.2-2")," rad"))},dependencies:[vi,VT,Ro,Fs,hB],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 KR{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,d=new Set;for(const h of e)!0===Array.isArray(h)?a.add(h):"object"==typeof h?l.add(h):"function"==typeof h?d.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===d.size){h=!0;for(const p of o)if(!1===d.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 mre(i,t){if(1&i&&(G(0,"mat-list-option",3),Be(1),j()),2&i){const e=t.$implicit,n=re();U("value",e)("selected",n.selectedValue==e),V(1),Qi(" ",e," ")}}function gre(i,t){if(1&i&&(G(0,"mat-card"),Ie(1,"app-editor",4),j()),2&i){const e=re();V(1),U("resource",e.resources[e.selectedValue])}}let bC=(()=>{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)(E(KR))},i.\u0275cmp=ot({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&&(G(0,"mat-selection-list",0),Oe("selectionChange",function(s){return n.selectedValue=s.source.selectedOptions.selected[0].value}),fe(1,mre,2,3,"mat-list-option",1),j(),fe(2,gre,2,1,"mat-card",2)),2&e&&(U("multiple",!1),V(1),U("ngForOf",n.keys),V(1),U("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})(),_re=(()=>{class i{constructor(){this._resource=null,this.resourceMap={},this.changed=new $e}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",iR("@transformPanel",[nR()],{optional:!0}))]),transformPanel:Oa("transformPanel",[Os("void",oi({opacity:0,transform:"scale(1, 0.8)"})),Or("void => showing",Yr("120ms cubic-bezier(0, 0, 0.2, 1)",oi({opacity:1,transform:"scale(1, 1)"}))),Or("* => void",Yr("100ms linear",oi({opacity:0})))])};let BH=0;const UH=new me("mat-select-scroll-strategy"),Tre=new me("MAT_SELECT_CONFIG"),Ire={provide:UH,deps:[as],useFactory:function Dre(i){return()=>i.scrollStrategies.reposition()}},Rre=new me("MatSelectTrigger");class kre{constructor(t,e){this.source=t,this.value=e}}const Pre=jM(JI(WM(WU(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 Te}}))));let Ore=(()=>{class i extends Pre{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(vl.required)??!1}set required(e){this._required=tn(e),this.stateChanges.next()}get multiple(){return this._multiple}set multiple(e){this._multiple=tn(e)}get disableOptionCentering(){return this._disableOptionCentering}set disableOptionCentering(e){this._disableOptionCentering=tn(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=Ps(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,d,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=d,this._liveAnnouncer=g,this._defaultOptions=b,this._panelOpen=!1,this._compareWith=(v,y)=>v===y,this._uid="mat-select-"+BH++,this._triggerAriaLabelledBy=null,this._destroy=new Te,this._onChange=()=>{},this._onTouched=()=>{},this._valueId="mat-select-value-"+BH++,this._panelDoneAnimatingStream=new Te,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=Ey(()=>{const v=this.options;return v?v.changes.pipe(Do(v),ks(()=>Cr(...v.map(y=>y.onSelectionChange)))):this._ngZone.onStable.pipe(Oi(1),ks(()=>this.optionSelectionChanges))}),this.openedChange=new $e,this._openedStream=this.openedChange.pipe(gn(v=>v),tt(()=>{})),this._closedStream=this.openedChange.pipe(gn(v=>!v),tt(()=>{})),this.selectionChange=new $e,this.valueChange=new $e,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 HR(this.multiple),this.stateChanges.next(),this._panelDoneAnimatingStream.pipe(Ql(),Ue(this._destroy)).subscribe(()=>this._panelDoneAnimating(this.panelOpen))}ngAfterContentInit(){this._initKeyManager(),this._selectionModel.changed.pipe(Ue(this._destroy)).subscribe(e=>{e.added.forEach(n=>n.select()),e.removed.forEach(n=>n.deselect())}),this.options.changes.pipe(Do(null),Ue(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&&!Zo(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||Zo(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(Oi(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 $Z(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=Cr(this.options.changes,this._destroy);this.optionSelectionChanges.pipe(Ue(e)).subscribe(n=>{this._onSelect(n.source,n.isUserInput),n.isUserInput&&!this.multiple&&this._panelOpen&&(this.close(),this.focus())}),Cr(...this.options.map(n=>n._stateChanges)).pipe(Ue(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)(E(FM),E(Qn),E(gt),E(YU),E(vt),E(Pa,8),E(hb,8),E(Gh,8),E(pC,8),E(tc,10),xa("tabindex"),E(UH),E(XI),E(Tre,8))},i.\u0275dir=ve({type:i,viewQuery:function(e,n){if(1&e&&($n(vre,5),$n(yre,5),$n(wU,5)),2&e){let r;At(r=Dt())&&(n.trigger=r.first),At(r=Dt())&&(n.panel=r.first),At(r=Dt())&&(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:[dt,xi]}),i})(),pb=(()=>{class i extends Ore{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(Ue(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 OQ(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 kre(this,e)}_getOverlayWidth(){return(this._preferredOverlayOrigin instanceof zI?this._preferredOverlayOrigin.elementRef:this._preferredOverlayOrigin||this._elementRef).nativeElement.getBoundingClientRect().width}get hideSingleSelectionIndicator(){return this._hideSingleSelectionIndicator}set hideSingleSelectionIndicator(e){this._hideSingleSelectionIndicator=tn(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=si(i)))(n||i)}}(),i.\u0275cmp=ot({type:i,selectors:[["mat-select"]],contentQueries:function(e,n,r){if(1&e&&(Wi(r,Rre,5),Wi(r,Nm,5),Wi(r,tV,5)),2&e){let s;At(s=Dt())&&(n.customTrigger=s.first),At(s=Dt())&&(n.options=s),At(s=Dt())&&(n.optionGroups=s)}},hostAttrs:["role","combobox","aria-autocomplete","none","aria-haspopup","listbox",1,"mat-mdc-select"],hostVars:19,hostBindings:function(e,n){1&e&&Oe("keydown",function(s){return n._handleKeydown(s)})("focus",function(){return n._onFocus()})("blur",function(){return n._onBlur()}),2&e&&(It("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()),ln("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:[Dn([{provide:UR,useExisting:i},{provide:eV,useExisting:i}]),dt],ngContentSelectors:Ere,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&&(or(Sre),G(0,"div",0,1),Oe("click",function(){return n.toggle()}),G(3,"div",2),fe(4,bre,2,1,"span",3),fe(5,Mre,3,2,"span",4),j(),G(6,"div",5)(7,"div",6),ki(),G(8,"svg",7),Ie(9,"path",8),j()()()(),fe(10,Cre,3,9,"ng-template",9),Oe("backdropClick",function(){return n.close()})("attach",function(){return n._onAttached()})("detach",function(){return n.close()})),2&e){const r=Zi(1);It("aria-owns",n.panelOpen?n.id+"-panel":null),V(3),U("ngSwitch",n.empty),It("id",n._valueId),V(1),U("ngSwitchCase",!0),V(1),U("ngSwitchCase",!1),V(5),U("cdkConnectedOverlayPanelClass",n._overlayPanelClass)("cdkConnectedOverlayScrollStrategy",n._scrollStrategy)("cdkConnectedOverlayOrigin",n._preferredOverlayOrigin||r)("cdkConnectedOverlayOpen",n.panelOpen)("cdkConnectedOverlayPositions",n._positions)("cdkConnectedOverlayWidth",n._overlayWidth)}},dependencies:[hm,by,UT,lB,wU,zI],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:[Are.transformPanel]},changeDetection:0}),i})(),VH=(()=>{class i{}return i.\u0275fac=function(e){return new(e||i)},i.\u0275mod=en({type:i}),i.\u0275inj=Wt({providers:[Ire],imports:[co,Pm,tR,Jn,Ky,mC,tR,Jn]}),i})();function Fre(i,t){if(1&i&&(G(0,"mat-label"),Be(1),j()),2&i){const e=re(3);V(1),ui(e.resource.name)}}function Lre(i,t){if(1&i&&(G(0,"mat-option",6),Be(1),j()),2&i){const e=t.$implicit,n=re(3);U("value",e[1])("disabled",n.disabled),V(1),Qi(" ",e[1]," ")}}function Nre(i,t){if(1&i){const e=jn();G(0,"mat-form-field",3),fe(1,Fre,2,1,"mat-label",0),G(2,"mat-select",4),Oe("valueChange",function(r){return Vt(e),Et(re(2).resource.data=r)})("selectionChange",function(){return Vt(e),Et(re(2).changed.emit())}),fe(3,Lre,2,3,"mat-option",5),j()()}if(2&i){const e=re(2);U("matTooltip",e.resourceDescription),V(1),U("ngIf",e.resource.name),V(1),U("value",e.resource.data)("disabled",e.disabled),V(1),U("ngForOf",e.resource.schema.enum_names)}}function Bre(i,t){if(1&i&&(G(0,"mat-label"),Be(1),j()),2&i){const e=re(3);V(1),ui(e.resource.name)}}function Ure(i,t){if(1&i){const e=jn();G(0,"mat-form-field",3),fe(1,Bre,2,1,"mat-label",0),G(2,"input",7),Oe("ngModelChange",function(r){return Vt(e),Et(re(2).resource.data=r)})("change",function(){return Vt(e),Et(re(2).changed.emit())}),j()()}if(2&i){const e=re(2);U("matTooltip",e.resourceDescription),V(1),U("ngIf",e.resource.name),V(1),U("min",0)("max",256*(e.resource.schema.length||1)-1)("ngModel",e.resource.data)}}function Vre(i,t){if(1&i&&(Gr(0),fe(1,Nre,4,5,"mat-form-field",1),fe(2,Ure,3,5,"ng-template",null,2,zc),Wr()),2&i){const e=Zi(3),n=re();V(1),U("ngIf",n.isKnownEnumValue(n.resource.data))("ngIfElse",e)}}let zre=(()=>{class i{constructor(){this.resource=null,this.resourceDescription="",this.disabled=!1,this.changed=new $e}isKnownEnumValue(e){return!!this.resource?.schema.enum_names.find(([n,r])=>r==e)}}return i.\u0275fac=function(e){return new(e||i)},i.\u0275cmp=ot({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&&fe(0,Vre,4,2,"ng-container",0),2&e&&U("ngIf",n.resource)},dependencies:[lo,vi,_l,mu,nc,_u,gu,Zc,yl,Ro,rc,Fs,pb,Nm],changeDetection:0}),i})();const Hre=["*"],Gre=["unscopedContent"];function Wre(i,t){1&i&&Yt(0,4)}function jre(i,t){if(1&i&&(G(0,"div",11),Ie(1,"input",12),G(2,"div",13),ki(),G(3,"svg",14),Ie(4,"path",15),j(),va(),Ie(5,"div",16),j()()),2&i){const e=re();ln("mdc-checkbox--disabled",e.disabled),V(1),U("checked",e.selected)("disabled",e.disabled)}}function Yre(i,t){if(1&i&&(G(0,"div",17),Ie(1,"input",18),G(2,"div",19),Ie(3,"div",20)(4,"div",21),j()()),2&i){const e=re();ln("mdc-radio--disabled",e.disabled),V(1),U("checked",e.selected)("disabled",e.disabled)}}function qre(i,t){}function Xre(i,t){if(1&i&&(G(0,"span",22),fe(1,qre,0,0,"ng-template",23),j()),2&i){re();const e=Zi(3);V(1),U("ngTemplateOutlet",e)}}function Kre(i,t){}function Zre(i,t){if(1&i&&(G(0,"span",24),fe(1,Kre,0,0,"ng-template",23),j()),2&i){re();const e=Zi(5);V(1),U("ngTemplateOutlet",e)}}function Qre(i,t){}function Jre(i,t){1&i&&fe(0,Qre,0,0,"ng-template",23),2&i&&(re(),U("ngTemplateOutlet",Zi(1)))}function ese(i,t){}function tse(i,t){if(1&i&&(G(0,"span",25),fe(1,ese,0,0,"ng-template",23),j()),2&i){re();const e=Zi(3);V(1),U("ngTemplateOutlet",e)}}function nse(i,t){}function ise(i,t){if(1&i&&(G(0,"span",25),fe(1,nse,0,0,"ng-template",23),j()),2&i){re();const e=Zi(5);V(1),U("ngTemplateOutlet",e)}}function rse(i,t){}function sse(i,t){1&i&&fe(0,rse,0,0,"ng-template",23),2&i&&(re(),U("ngTemplateOutlet",Zi(1)))}const ose=[[["","matListItemTitle",""]],[["","matListItemLine",""]],"*",[["mat-divider"]],[["","matListItemAvatar",""],["","matListItemIcon",""]]],ase=["[matListItemTitle]","[matListItemLine]","*","mat-divider","[matListItemAvatar],[matListItemIcon]"],zH=new me("ListOption");let lse=(()=>{class i{constructor(e){this._elementRef=e}}return i.\u0275fac=function(e){return new(e||i)(E(vt))},i.\u0275dir=ve({type:i,selectors:[["","matListItemTitle",""]],hostAttrs:[1,"mat-mdc-list-item-title","mdc-list-item__primary-text"]}),i})(),cse=(()=>{class i{constructor(e){this._elementRef=e}}return i.\u0275fac=function(e){return new(e||i)(E(vt))},i.\u0275dir=ve({type:i,selectors:[["","matListItemLine",""]],hostAttrs:[1,"mat-mdc-list-item-line","mdc-list-item__secondary-text"]}),i})(),HH=(()=>{class i{constructor(e){this._listOption=e}_isAlignedAtStart(){return!this._listOption||"after"===this._listOption?._getTogglePosition()}}return i.\u0275fac=function(e){return new(e||i)(E(zH,8))},i.\u0275dir=ve({type:i,hostVars:4,hostBindings:function(e,n){2&e&&ln("mdc-list-item__start",n._isAlignedAtStart())("mdc-list-item__end",!n._isAlignedAtStart())}}),i})(),dse=(()=>{class i extends HH{}return i.\u0275fac=function(){let t;return function(n){return(t||(t=si(i)))(n||i)}}(),i.\u0275dir=ve({type:i,selectors:[["","matListItemAvatar",""]],hostAttrs:[1,"mat-mdc-list-item-avatar"],features:[dt]}),i})(),use=(()=>{class i extends HH{}return i.\u0275fac=function(){let t;return function(n){return(t||(t=si(i)))(n||i)}}(),i.\u0275dir=ve({type:i,selectors:[["","matListItemIcon",""]],hostAttrs:[1,"mat-mdc-list-item-icon"],features:[dt]}),i})();const hse=new me("MAT_LIST_CONFIG");let ZR=(()=>{class i{constructor(){this._isNonInteractive=!0,this._disableRipple=!1,this._disabled=!1,this._defaultOptions=Lt(hse,{optional:!0})}get disableRipple(){return this._disableRipple}set disableRipple(e){this._disableRipple=tn(e)}get disabled(){return this._disabled}set disabled(e){this._disabled=tn(e)}}return i.\u0275fac=function(e){return new(e||i)},i.\u0275dir=ve({type:i,hostVars:1,hostBindings:function(e,n){2&e&&It("aria-disabled",n.disabled)},inputs:{disableRipple:"disableRipple",disabled:"disabled"}}),i})(),$H=(()=>{class i{set lines(e){this._explicitLines=Ps(e,null),this._updateItemLines(!1)}get disableRipple(){return this.disabled||this._disableRipple||this._noopAnimations||!!this._listBase?.disableRipple}set disableRipple(e){this._disableRipple=tn(e)}get disabled(){return this._disabled||!!this._listBase?.disabled}set disabled(e){this._disabled=tn(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 Qt,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(Cr(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)(E(vt),E(gt),E(ZR,8),E(zi),E(eR,8),E(kr,8))},i.\u0275dir=ve({type:i,contentQueries:function(e,n,r){if(1&e&&(Wi(r,dse,4),Wi(r,use,4)),2&e){let s;At(s=Dt())&&(n._avatars=s),At(s=Dt())&&(n._icons=s)}},hostVars:4,hostBindings:function(e,n){2&e&&(It("aria-disabled",n.disabled)("disabled",n._isButtonElement&&n.disabled||null),ln("mdc-list-item--disabled",n.disabled))},inputs:{lines:"lines",disableRipple:"disableRipple",disabled:"disabled"}}),i})();const GH=new me("SelectionList");let xC=(()=>{class i extends $H{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=tn(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 $e,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)(E(vt),E(gt),E(GH),E(zi),E(Qn),E(eR,8),E(kr,8))},i.\u0275cmp=ot({type:i,selectors:[["mat-list-option"]],contentQueries:function(e,n,r){if(1&e&&(Wi(r,cse,5),Wi(r,lse,5)),2&e){let s;At(s=Dt())&&(n._lines=s),At(s=Dt())&&(n._titles=s)}},viewQuery:function(e,n){if(1&e&&$n(Gre,5),2&e){let r;At(r=Dt())&&(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&&Oe("blur",function(){return n._handleBlur()})("click",function(){return n._toggleOnInteraction()}),2&e&&(It("aria-selected",n.selected),ln("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:[Dn([{provide:$H,useExisting:i},{provide:zH,useExisting:i}]),dt],ngContentSelectors:ase,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&&(or(ose),fe(0,Wre,1,0,"ng-template",null,0,zc),fe(2,jre,6,4,"ng-template",null,1,zc),fe(4,Yre,5,4,"ng-template",null,2,zc),fe(6,Xre,2,1,"span",3),fe(7,Zre,2,1,"span",4),fe(8,Jre,1,1,"ng-template",5),G(9,"span",6),Yt(10),Yt(11,1),G(12,"span",7,8),Oe("cdkObserveContent",function(){return n._updateItemLines(!0)}),Yt(14,2),j()(),fe(15,tse,2,1,"span",9),fe(16,ise,2,1,"span",9),fe(17,sse,1,1,"ng-template",5),Yt(18,3),Ie(19,"div",10)),2&e&&(V(6),U("ngIf",n._hasCheckboxAt("before")),V(1),U("ngIf",n._hasRadioAt("before")),V(1),U("ngIf",n._hasIconsOrAvatarsAt("before")),V(7),U("ngIf",n._hasCheckboxAt("after")),V(1),U("ngIf",n._hasRadioAt("after")),V(1),U("ngIf",n._hasIconsOrAvatarsAt("after")))},dependencies:[SU,vi,xy],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 fse={provide:Io,useExisting:Gn(()=>wC),multi:!0};class pse{constructor(t,e){this.source=t,this.options=e}}let wC=(()=>{class i extends ZR{get multiple(){return this._multiple}set multiple(e){const n=tn(e);n!==this._multiple&&(this._multiple=n,this.selectedOptions=new HR(this._multiple,this.selectedOptions.selected))}get hideSingleSelectionIndicator(){return this._hideSingleSelectionIndicator}set hideSingleSelectionIndicator(e){this._hideSingleSelectionIndicator=tn(e)}constructor(e,n){super(),this._element=e,this._ngZone=n,this._initialized=!1,this._destroyed=new Te,this._onChange=r=>{},this.selectionChange=new $e,this.color="accent",this.compareWith=(r,s)=>r===s,this._multiple=!0,this._hideSingleSelectionIndicator=this._defaultOptions?.hideSingleSelectionIndicator??!1,this.selectedOptions=new HR(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 pse(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=tn(e),this._selectionListDisabled&&this._keyManager?.setActiveItem(-1)}registerOnChange(e){this._onChange=e}registerOnTouched(e){this._onTouched=e}_watchForSelectionChange(){this.selectedOptions.changed.pipe(Ue(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()&&Zo(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 kU(this._items).withHomeAndEnd().withTypeAhead().withWrap().skipPredicate(()=>this.disabled),this._resetActiveOption(),this._keyManager.change.subscribe(e=>this._setActiveOption(e)),this._items.changes.pipe(Ue(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=OM();return e&&this._element.nativeElement.contains(e)}}return i.\u0275fac=function(e){return new(e||i)(E(vt),E(gt))},i.\u0275cmp=ot({type:i,selectors:[["mat-selection-list"]],contentQueries:function(e,n,r){if(1&e&&Wi(r,xC,5),2&e){let s;At(s=Dt())&&(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&&Oe("keydown",function(s){return n._handleKeydown(s)}),2&e&&It("aria-multiselectable",n.multiple)},inputs:{color:"color",compareWith:"compareWith",multiple:"multiple",hideSingleSelectionIndicator:"hideSingleSelectionIndicator",disabled:"disabled"},outputs:{selectionChange:"selectionChange"},exportAs:["matSelectionList"],features:[Dn([fse,{provide:ZR,useExisting:i},{provide:GH,useExisting:i}]),dt,xi],ngContentSelectors:Hre,decls:1,vars:0,template:function(e,n){1&e&&(or(),Yt(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})(),mse=(()=>{class i{}return i.\u0275fac=function(e){return new(e||i)},i.\u0275mod=en({type:i}),i.\u0275inj=Wt({imports:[HI,co,Jn,tb,JU,kV]}),i})();function gse(i,t){if(1&i&&(G(0,"mat-label"),Be(1),j()),2&i){const e=re(2);V(1),ui(e.resource.name)}}function _se(i,t){if(1&i&&(G(0,"mat-list-option",5),Be(1),j()),2&i){const e=t.$implicit,n=re(2);U("value",e.key)("selected",n.resource.data[e.key])("disabled",n.disabled),V(1),Qi(" ",e.key," ")}}function vse(i,t){if(1&i){const e=jn();Gr(0,1),fe(1,gse,2,1,"mat-label",2),G(2,"mat-selection-list",3),Oe("selectionChange",function(r){return Vt(e),Et(re().onSelection(r))}),fe(3,_se,2,4,"mat-list-option",4),ct(4,"keyvalue"),j(),Wr()}if(2&i){const e=re();U("matTooltip",e.resourceDescription),V(1),U("ngIf",e.resource.name),V(1),U("disabled",e.disabled),V(1),U("ngForOf",ut(4,4,e.resource.data))}}let yse=(()=>{class i{constructor(){this.resource=null,this.resourceDescription="",this.disabled=!1,this.changed=new $e}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=ot({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&&fe(0,vse,5,6,"ng-container",0),2&e&&U("ngIf",n.resource)},dependencies:[lo,vi,Ro,Fs,wC,xC,dB],styles:["[_nghost-%COMP%]{padding-bottom:1.34375em}"],changeDetection:0}),i})();class WH{get tick$(){return this._tick$.asObservable()}get children(){return[...this._children]}constructor(t){this.parent=t,this._tick$=new Te,this._children=[],t&&t.addChild(this)}addChild(t){if(t.parent!==this)throw new Error("Incorrect child clock");this._children.includes(t)||this._children.push(t)}removeChild(t){if(t.parent!==this)throw new Error("Incorrect child clock");this._children=this._children.filter(e=>e!==t)}dispose(){this.parent&&this.parent.removeChild(this);for(const t of this._children)t.dispose();this._tick$.complete()}}const xse=typeof performance>"u"?()=>Date.now():()=>performance.now();class jm extends WH{static get instance(){return jm._instance||(jm._instance=new jm),jm._instance}get elapsedTime(){return xse()}constructor(){super(null);let t=this.elapsedTime;const e=()=>{requestAnimationFrame(e);const n=t,r=this.elapsedTime;t=r,this._tick$.next([n,r-n])};requestAnimationFrame(e)}dispose(){throw new Error("Cannot dispose global clock")}}class jH extends WH{get isRunning(){return!!this.tickSub}get isPaused(){return-1!==this.pausedAt}get isStopped(){return-1===this.startedAt}get timeScale(){return this._timeScale}set timeScale(t){if(t!==this._timeScale||this.pausedByTimescale&&0!==t){if(0===t)return void(this.isPaused||(this.pause(),this.pausedByTimescale=!0));if(this.isPaused&&this.pausedByTimescale&&(this.resume(),this.pausedByTimescale=!1),!this.isStopped){const e=this.isPaused?this.pausedAt:this.parentClock.elapsedTime;this.startedAt=e-(e-this.startedAt)*this.timeScale/t}this._timeScale=t}}get elapsedTime(){return this.isStopped?this.lastStopElapsed:this.isPaused?this._timeScale*(this.pausedAt-this.startedAt):this._timeScale*(this.parentClock.elapsedTime-this.startedAt)}constructor(t=!1,e=jm.instance){super(e),this.parentClock=e,this.tickSub=null,this._internalTick$=new Te,this.tickRateLimit=0,this.paused$=new Te,this.startedAt=-1,this.oldRelativeTime=0,this.pausedAt=-1,this.lastStopElapsed=0,this._timeScale=1,this.pausedByTimescale=!1,this.lastFiredTickElapsed=0,t&&this.start(),this._internalTick$.pipe(tt(([n,r])=>[r,r-this.lastFiredTickElapsed]),gn(([n])=>!this.tickRateLimit||Math.floor(this.lastFiredTickElapsed*this.tickRateLimit/1e3)this.lastFiredTickElapsed=n)).subscribe(this._tick$)}start(){this.isRunning||(this.oldRelativeTime=0,this.startedAt=this.parentClock.elapsedTime,this.startListeningTicks())}stop(){this.stopListeningTicks(),this.lastStopElapsed=this.elapsedTime,this.startedAt=this.pausedAt=-1}pause(){this.stopListeningTicks(),this.pausedAt=this.parentClock.elapsedTime,this.pausedByTimescale=!1,this.paused$.next(!0)}resume(){this.isRunning||-1==this.pausedAt||(this.startedAt+=this.parentClock.elapsedTime-this.pausedAt,this.pausedAt=-1,this.startListeningTicks(),this.paused$.next(!1))}startListeningTicks(){if(this.tickSub)throw new Error("Clock is already ticking!");this.tickSub=this.parentClock.tick$.pipe(tt(([t,e])=>[this.oldRelativeTime,this.oldRelativeTime+e*this.timeScale]),Vi(([t,e])=>this.oldRelativeTime=e)).subscribe(this._internalTick$)}stopListeningTicks(){var t;null===(t=this.tickSub)||void 0===t||t.unsubscribe(),this.tickSub=null}dispose(){this.stopListeningTicks(),this._internalTick$.complete(),super.dispose()}}const wse={transparent:!1,background:0,size:"fullscreen",antialias:!0};class Mse{constructor(t,e,n={}){this.scene=t,this.canvas=e,this.entity=null,this.rendererOptions=Object.assign(Object.assign({},wse),n||{})}}class mb{static fromArray(t,e=!1){const n=new mb(t[0]);let r=n;for(let s=1;sn.map(r=>new mb(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]}constructor(t){this.data=t,this.adjacent=new Set}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(d=>!e.has(d));for(const d of c)e.add(d),r.push([d,a-1])}}return n}nodes(){return Array.from(this.walkRead(-1))}}var oc=(()=>{return(i=oc||(oc={}))[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",oc;var i})();let Kh=(()=>{class i{constructor(){this.tick$=new Te,this._world=null,this._name="e0x"+(i.default_name_counter++).toString(16),this._selfActive=!0,this.parent=null,this._children=[],this._components=[],this._onSpawned$=new Te,this._onRemoved$=new Te}get world(){return this._world}get name(){return this._name}set name(e){this._name=e}get active(){return this._selfActive&&(!this.parent||this.parent.active)}set active(e){this._selfActive=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 Cse extends Kh{constructor(t){super(),this.tickOrder=t}}function Ym(i,t=oc.CONTROLLERS,e){const n=new Cse(t);return e&&(n.name=e),i.addEntity(n),n.tick$.pipe(su(()=>{i.removeEntity(n,!0)}))}class QR extends Kh{get rendererSize$(){return this._rendererSize$.asObservable()}get rendererSize(){return this._rendererSize$.getValue()}get rendererOptions(){return this.renderer.rendererOptions}get physicsDebugViewActive(){return this.renderer.physicsDebugViewActive}set physicsDebugViewActive(t){this.renderer.physicsDebugViewActive=t}constructor(t){super(),this.renderer=t,this.tickOrder=oc.RENDERING,this._rendererSize$=new Qe(null),this.addComponents(t),this.tick$.subscribe(()=>{this.renderer.render()})}onSpawned(t){this._rendererSize$.next(null),"fullscreen"==this.rendererOptions.size||"function"==typeof this.rendererOptions.size?(this.renderer.canvas&&(this.renderer.canvas.style.position="absolute"),Cr(To(window,"resize").pipe(Wy(100)),To(window,"orientationchange")).pipe(Ue(this._onRemoved$),tt(()=>({x:window.innerWidth,y:window.innerHeight})),Do({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 In||void 0!==this.rendererOptions.size.subscribe&&void 0!==this.rendererOptions.size.pipe?this.rendererOptions.size.pipe(Ue(this._onRemoved$)).subscribe(e=>{this._rendererSize$.next(e)}):this._rendererSize$.next(this.rendererOptions.size),this._rendererSize$.pipe(Ue(this._onRemoved$),Ql((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 JR=i=>{i.updateVisibility?i.updateVisibility():YH(i)},YH=i=>{for(const t of i.children)JR(t)};class Sse extends Kh{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(){YH(this)}addChildren(...t){super.addChildren(...t);for(const e of t)JR(e)}removeChildren(t,e=!1){if(super.removeChildren(t,e),!e)for(const n of t)JR(n)}}class ek{constructor(){this._running=!1,this.stop$=new Te}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 Ese extends ek{get output$(){return this._output$.asObservable()}constructor(t,e){super(),this.keyboard=t,this.keymap=e,this._output$=new Te}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")),Ra(t.map(e=>this.keyboard.bindMany(...e))).pipe(Ue(this.stop$),tt(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 tk=new In(ms);class MC extends ek{constructor(){super(),this.bindings={},this.skipKeyDownsOnExternalFocus=!0,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 Qe(!1);return this.bindings[t].push(e),e.pipe(Ql(),su(()=>{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"),tk;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 Qe(!1);this.bindings[n].push(r),e.push(r)}return Ra(e).pipe(su(()=>{for(let n=0;nn.includes(!0)),Ql())}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 MC.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)}}MC.externalFocusBlacklist=[HTMLInputElement,HTMLTextAreaElement,HTMLSelectElement,HTMLButtonElement];class yi{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 yi.len(yi.sub(t,e))}static norm(t){const e=yi.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 Dse={pointerLock:!1};var Ls=(()=>{return(i=Ls||(Ls={}))[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",Ls;var i})();class qm extends ek{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$=To(this._element,"wheel",{passive:!1}).pipe(Ue(this.stopped$),su(()=>this._wheel$=null),Vi(t=>t.preventDefault()),tt(t=>t.deltaY),Vf())),this._wheel$}get isPointerLocked(){return!!document.pointerLockElement}get isPointerLocked$(){return To(document,"pointerlockchange").pipe(tt(()=>this.isPointerLocked))}get state(){return this._state$.getValue()}get state$(){return this._state$.asObservable()}get multiTouchPositions$(){return this._multiTouchPositions$.asObservable()}get twoTouchGestureDelta$(){return this.state$.pipe(ks(t=>t==Ls.DRAG_TOUCH_TWO_FINGERS?this.multiTouchPositions$:tk),tt(t=>t.map(e=>({x:e.x,y:e.y}))),function Ase(){return ni((i,t)=>{let e,n=!1;i.subscribe(qn(t,r=>{const s=e;e=r,n&&t.next([s,r]),n=!0}))})}(),gn(([t,e])=>t.length>1&&e.length>1),tt(([t,e])=>({centerPointDelta:yi.sub(yi.scalarMult(e.reduce((n,r)=>yi.add(n,r),yi.O),1/e.length),yi.scalarMult(t.reduce((n,r)=>yi.add(n,r),yi.O),1/e.length)),angleDelta:yi.angle(e[1],e[0])-yi.angle(t[1],t[0]),distanceDelta:yi.dist(e[1],e[0])-yi.dist(t[1],t[0])})))}get _element(){return this.options.canvas||window}constructor(t={}){super(),this._wheel$=null,this._delta$=new Te,this._position$=new Qe(yi.O),this._multiTouchPositions$=new Qe([]),this.stopped$=new Te,this._state$=new Qe(Ls.NONE),this.options=Object.assign(Object.assign({},Dse),t),this.canvasClickListener=this.canvasClickListener.bind(this)}startInternal(){this.options.canvas&&(this.options.canvas.style.touchAction="none"),this._state$.next(Ls.NONE);const t=[Ls.DRAG,Ls.DRAG_MIDDLE_BUTTON,Ls.DRAG_RIGHT_BUTTON],e=[Ls.NONE,Ls.DRAG,Ls.DRAG_TOUCH_TWO_FINGERS],n=[],r={};To(this._element,"mousemove").pipe(Ue(this.stopped$)).subscribe(o=>{this._delta$.next({x:o.movementX,y:o.movementY})}),To(this._element,"pointermove").pipe(Ue(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})}),!qm.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{if(0===n.length)try{this.options.canvas&&this.options.canvas.setPointerCapture(o.pointerId),window.addEventListener("pointerup",s),this._element.addEventListener("pointercancel",s)}catch(a){console.error(a)}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]||Ls.NONE)}),To(this._element,"contextmenu").pipe(Ue(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 Tse{static lookAt(t,e,n){let r=Re.sub(t,e);r=0===Re.lenSq(r)?Object.assign(Object.assign({},r),{z:1}):Re.norm(r);let s=Re.cross(n,r);0===Re.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=Re.norm(r),s=Re.cross(n,r)),s=Re.norm(s);let o=Re.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 Yi{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,d=t.w*Math.sin((1-n)*s)/o+e.w*Math.sin(n*s)/o;return isNaN(a)||isNaN(l)||isNaN(c)||isNaN(d)?Yi.clone(t):{x:a,y:l,z:c,w:d}}static fromAngle(t,e){const n=e/2,r=Math.sin(n);return Object.assign(Object.assign({},Re.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],d=t[10],h=e+o+d;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>d){const p=2*Math.sqrt(1+e-o-d);return{x:.25*p,y:(n+s)/p,z:(r+l)/p,w:(c-a)/p}}if(o>d){const p=2*Math.sqrt(1+o-e-d);return{x:(n+s)/p,y:.25*p,z:(a+c)/p,w:(r-l)/p}}{const p=2*Math.sqrt(1+d-e-o);return{x:(r+l)/p,y:(a+c)/p,z:.25*p,w:(s-n)/p}}}static fromMatrix3(t){const e=t[0][0]+t[1][1]+t[2][2];let n,r,s,o;if(e>0){const a=.5/Math.sqrt(e+1);n=.25/a,r=(t[2][1]-t[1][2])*a,s=(t[0][2]-t[2][0])*a,o=(t[1][0]-t[0][1])*a}else if(t[0][0]>t[1][1]&&t[0][0]>t[2][2]){const a=2*Math.sqrt(1+t[0][0]-t[1][1]-t[2][2]);n=(t[2][1]-t[1][2])/a,r=.25*a,s=(t[0][1]+t[1][0])/a,o=(t[0][2]+t[2][0])/a}else if(t[1][1]>t[2][2]){const a=2*Math.sqrt(1+t[1][1]-t[0][0]-t[2][2]);n=(t[0][2]-t[2][0])/a,r=(t[0][1]+t[1][0])/a,s=.25*a,o=(t[1][2]+t[2][1])/a}else{const a=2*Math.sqrt(1+t[2][2]-t[0][0]-t[1][1]);n=(t[1][0]-t[0][1])/a,r=(t[0][2]+t[2][0])/a,s=(t[1][2]+t[2][1])/a,o=.25*a}return{w:n,x:r,y:s,z:o}}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),d=Math.sin(.5*e);return{w:c*a*s+d*l*o,x:d*a*s-c*l*o,y:c*l*s+d*a*o,z:c*a*o-d*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=Re.Z){return this.fromMatrix4(Tse.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 Re{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 Re.len(Re.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=Re.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,Yi.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)}}}function nk(i,t,e,n){return r=>r.pipe(tI((s,o)=>{var a;return{targetValue:o,currentValue:null!==(a=s.currentValue)&&void 0!==a?a:o,hasReachedTarget:!1}},{targetValue:null,currentValue:null,hasReachedTarget:!1}),ks(s=>i.pipe(tt(([o,a])=>{if(null===s.targetValue||null===s.currentValue)return s.currentValue;if(s.hasReachedTarget)return;const l=1-Math.exp(-a/t),c=e(s.currentValue,s.targetValue,l);return s.currentValue=c,n(c,s.targetValue)?(s.hasReachedTarget=!0,s.targetValue):c}))),tt(s=>void 0!==s?s:null),gn(s=>null!==s))}ps(738);class kse extends Kh{get avgReport(){return this._avgReport}get peakReport(){return this._peakReport}constructor(t=60,e=15){super(),this.maxSamples=t,this.maxRows=e,this.tickOrder=Number.MAX_SAFE_INTEGER,this.sampleIndex=0,this.collectedData=new Map,this._avgReport={totalTime:0,entries:[]},this._peakReport={totalTime:0,entries:[]}}onSpawned(t){super.onSpawned(t),this.sampleIndex=0;const e=()=>(typeof performance>"u"?Date:performance).now();this.world.tickForwardTo$.pipe(Ue(this.onRemoved$)).subscribe(n=>{n!==this&&(this.collectedData.has(n)?this.collectedData.get(n).push([this.sampleIndex,e(),0]):this.collectedData.set(n,[[this.sampleIndex,e(),0]]))}),this.world.tickForwardedTo$.pipe(Ue(this.onRemoved$)).subscribe(n=>{if(n===this)return;const r=this.collectedData.get(n);r[r.length-1][2]=e()}),this.tick$.pipe(Ue(this.onRemoved$)).subscribe(()=>{this.sampleIndex++;const n=Array.from(this.collectedData.entries());for(const[h,p]of n){for(;p.length>0&&p[0][0]h instanceof Kh?""===h.name?h.constructor.name:h.name:"PHYSICS_WORLD"===h?"Physics simulation":h,s=h=>{let p=0,m=0;for(;mh.length-m+1){m--;break}p+=h[h.length-m-1][1]}return m>1&&(h=h.slice(0,h.length-m)).push([`Rest (${m})`,p]),h};let o=0,a=Array.from(this.collectedData.entries()).map(([h,p])=>{const m=p.reduce((g,[b,v,y])=>g+y-v,0)/this.maxSamples;return o+=m,[r(h),m]}).sort((h,p)=>p[1]-h[1]);a=s(a),this._avgReport={totalTime:o,entries:a};let l=new Map,c=Array.from(this.collectedData.entries()).map(([h,p])=>{let m=0;for(const[g,b,v]of p){const y=v-b;m=Math.max(m,y),l.set(g,y+(l.get(g)||0))}return[r(h),m]}).sort((h,p)=>p[1]-h[1]);c=s(c);let d=Array.from(l.values()).reduce((h,p)=>Math.max(h,p),0);this._peakReport={totalTime:d,entries:c}})}onRemoved(){super.onRemoved(),this.collectedData=new Map,this._avgReport={totalTime:0,entries:[]},this._peakReport={totalTime:0,entries:[]}}}var Xm=function(i,t,e,n){return new(e||(e=Promise))(function(s,o){function a(d){try{c(n.next(d))}catch(h){o(h)}}function l(d){try{c(n.throw(d))}catch(h){o(h)}}function c(d){d.done?s(d.value):function r(s){return s instanceof e?s:new e(function(o){o(s)})}(d.value).then(a,l)}c((n=n.apply(i,t||[])).next())})};class bl{static get documentWorlds(){return[...bl._documentWorlds]}constructor(t,e){this.visualScene=t,this.physicsWorld=e,this.worldClock=new jH(!1),this.keyboardInput=new MC,this.name="w0x"+(bl.default_name_counter++).toString(16),this.children=[],this.tickListeners=[],this.tickStarted$=new Te,this.tickForwardTo$=new Te,this.tickForwardedTo$=new Te,this.paused$=new Te,this.disposed$=new Te,this.keyboardInput.start(),window.ggstatic?this.registerConsoleCommands(window.ggstatic):(this.onGgStaticInitialized=this.onGgStaticInitialized.bind(this),window.addEventListener("ggstatic_added",this.onGgStaticInitialized)),this.worldClock.paused$.subscribe(this.paused$),bl._documentWorlds.push(this),bl.worldCreated$.next(this)}init(){return Xm(this,void 0,void 0,function*(){yield Promise.all([this.physicsWorld.init(),this.visualScene.init()]);const t=(e,n,r)=>{e.active&&(this.tickForwardTo$.next(e),e.tick$.next([n,r]),this.tickForwardedTo$.next(e))};this.worldClock.tick$.subscribe(([e,n])=>{this.tickStarted$.next();let r=0;for(;r=oc.PHYSICS_SIMULATION);r++)t(this.tickListeners[r],e,n);for(this.tickForwardTo$.next("PHYSICS_WORLD"),this.physicsWorld.simulate(n),this.tickForwardedTo$.next("PHYSICS_WORLD");re.tickOrder-n.tickOrder),t.onSpawned(this))}removeEntity(t,e=!1){if(t.world){if(t.world!==this)throw new Error("Entity is not a part of this world");this.children.splice(this.children.findIndex(n=>n===t),1),this.tickListeners.splice(this.tickListeners.findIndex(n=>n===t),1),t.onRemoved()}e&&t.dispose()}onGgStaticInitialized(){window.removeEventListener("ggstatic_added",this.onGgStaticInitialized),this.registerConsoleCommands(window.ggstatic)}registerConsoleCommands(t){t.registerConsoleCommand(this,"timescale",(...e)=>Xm(this,void 0,void 0,function*(){return isNaN(+e[0])||(this.worldClock.timeScale=+e[0]),this.worldClock.timeScale.toString()}),"args: [ float? ]; Get current time scale of selected world clock or set it. Default value is 1.0 (no time scale applied)"),t.registerConsoleCommand(this,"fps_limit",(...e)=>Xm(this,void 0,void 0,function*(){return isNaN(+e[0])||(this.worldClock.tickRateLimit=+e[0]),this.worldClock.tickRateLimit.toString()}),"args: [ int? ]; Get current tick rate limit of selected world clock or set it. 0 means no limit applied"),t.registerConsoleCommand(this,"renderers",()=>Xm(this,void 0,void 0,function*(){return this.children.filter(e=>e instanceof QR).map(e=>e.name).join("\n")}),"no args; Print all renderers in selected world"),t.registerConsoleCommand(this,"debug_view",(...e)=>Xm(this,void 0,void 0,function*(){let r,n="toggle";for(let o of e)["1","0"].includes(o)?n="1"===o:r=o;let s=this.children.find(o=>o instanceof QR&&(!r||o.name===r));if(s)return s.physicsDebugViewActive="toggle"===n?!s.physicsDebugViewActive:n,s.physicsDebugViewActive?"1":"0";throw r?new Error(`Renderer with name "${r}" not found`):new Error("No renderer found")}),'args: [ 0|1?, string? ]; Turn on/off physics debug view, skip first argument to toggle value. Second argument expects renderer name, if not provided first renderer will be picked. Use "renderers" to get list of renderers in the world'),t.registerConsoleCommand(this,"performance",(...e)=>Xm(this,void 0,void 0,function*(){let n="avg",r=20;for(let d of e)["avg","peak"].includes(d)?n=d:isNaN(+d)||(r=+d);const s=new kse(r,250);this.addEntity(s),yield function Ise(i,t){const e="object"==typeof t;return new Promise((n,r)=>{let o,s=!1;i.subscribe({next:a=>{o=a,s=!0},error:r,complete:()=>{s?n(o):e?n(t.defaultValue):r(new fm)}})})}(this.worldClock.tick$.pipe(Oi(r)));const o="avg"===n?s.avgReport:s.peakReport;this.removeEntity(s);const a=o.entries.map(([d,h])=>`${d}:`+new Array(Math.max(0,26-d.length)).join(" ")+`${h.toFixed(2)} ms`+("avg"===n?` (${(100*h/o.totalTime).toFixed(2)}%)`:""));let l="lightgreen";o.totalTime>12&&(l=o.totalTime<16?"yellow":"red");const c=("avg"===n?"Average":"Peak")+" Frame time";return a.unshift(c+":"+new Array(Math.max(0,26-c.length)).join(" ")+`${o.totalTime.toFixed(2)} ms`),a.unshift(`Performance report (${r} samples)`),a.join("\n")}),'args: [ int?, avg|peak? ]; Measure how much time was spent per entity in world. Arguments are samples amount (20 by default) and "peak" or "avg" choice, both arguments are optional. "avg" report sorts entities by average time consumed, "peak" records highest value for each entity')}}bl.default_name_counter=0,bl._documentWorlds=[],bl.worldCreated$=new Te;class Lse extends Mse{}class XH extends Sse{constructor(){super(...arguments),this._world=null}get world(){return this._world}}class Jo extends XH{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}constructor(t){super(),this.tickOrder=oc.OBJECTS_BINDING,this._position=Re.O,this._rotation=Yi.O,this.object3D=null,this.objectBody=null,t.objectBody&&(this.objectBody=t.objectBody,this.name=this.objectBody.name,this.addComponents(this.objectBody)),t.object3D&&(this.object3D=t.object3D,t.objectBody||(this._position=this.object3D.position,this._rotation=this.object3D.rotation,this.name=this.object3D.name),this.addComponents(this.object3D)),this.objectBody&&(this.tick$.subscribe(()=>{this.runTransformBinding(this.objectBody,this.object3D)}),this.runTransformBinding(this.objectBody,this.object3D))}}class Km extends mb{static fromMapArray(t,e=!1){const n=new Km(t[0]);let r=n;for(let s=1;sn.map(r=>new Km(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));othis.mapGraph.getNearestDummy(this.mapGraphNodes,this.loaderCursor$.getValue())),Ql(),Vi(r=>this._nearestDummy$.next(r))).subscribe(r=>{let o,s=new Set;if(this.options.inertia>0){o=new Set;const a=r.walkReadPreserveDepth(this.options.loadDepth+this.options.inertia);for(let l=0;lo.add(c.data)),l<=this.options.loadDepth&&a[l].forEach(c=>s.add(c.data))}else r.walkRead(this.options.loadDepth).forEach(a=>s.add(a.data)),o=s;for(const a of this.loaded.keys())o.has(a)?s.delete(a):n.includes(a)||n.push(a);for(let a of Array.from(s.keys()))e.includes(a)||e.push(a)}),this.tick$.pipe(Do(null),Ue(this._onRemoved$)).subscribe(()=>{if(n.length){for(const r of n)this.disposeChunk(r);n=[]}if(e.length)if(this._initialLoadComplete$.value&&e.length>this.options.maxNodesLoadingPerTick){let r=e.slice(0,this.options.maxNodesLoadingPerTick);e=e.slice(this.options.maxNodesLoadingPerTick),Promise.all(r.map(s=>this.loadChunk(s))).then()}else Promise.all(e.map(r=>this.loadChunk(r))).then(()=>{this._initialLoadComplete$.value||this._initialLoadComplete$.next(!0)}),e=[]})}onRemoved(){super.onRemoved(),this.loadClock&&(this.loadClock.stop(),this.loadClock=null),this.loaderCursor$.next(Re.O)}loadChunk(t){return function(i,t,e,n){return new(e||(e=Promise))(function(s,o){function a(d){try{c(n.next(d))}catch(h){o(h)}}function l(d){try{c(n.throw(d))}catch(h){o(h)}}function c(d){d.done?s(d.value):function r(s){return s instanceof e?s:new e(function(o){o(s)})}(d.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||Yi.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||Yi.O}]),[n,e]})}disposeChunk(t){this.loaded.has(t)&&(this.removeChildren(this.loaded.get(t),!0),this.loaded.delete(t))}}class Use extends QR{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 e4=function(i,t,e,n){return new(e||(e=Promise))(function(s,o){function a(d){try{c(n.next(d))}catch(h){o(h)}}function l(d){try{c(n.throw(d))}catch(h){o(h)}}function c(d){d.done?s(d.value):function r(s){return s instanceof e?s:new e(function(o){o(s)})}(d.value).then(a,l)}c((n=n.apply(i,t||[])).next())})};const t4={keymap:"wasd",cameraLinearSpeed:20,cameraMovementElasticity:0,cameraBoostMultiplier:2.5,cameraRotationSensitivity:1,cameraRotationElasticity:0,mouseOptions:{},ignoreMouseUnlessPointerLocked:!1,ignoreKeyboardUnlessPointerLocked:!1};class n4 extends Kh{get active(){return super.active}set active(t){!super.active&&t&&this.reset(),super.active=t}get spherical(){return this._spherical}set spherical(t){this._spherical.phi=Math.max(1e-6,Math.min(Math.PI-1e-6,t.phi)),this._spherical.theta=t.theta,this.resetMotion$.next()}constructor(t,e,n={}){super(),this.keyboard=t,this.camera=e,this.tickOrder=oc.INPUT_CONTROLLERS,this._spherical={phi:0,radius:1,theta:0},this.resetMotion$=new Te,this.options=Object.assign(Object.assign({},t4),n),n.mouseOptions&&(this.options.mouseOptions=Object.assign(Object.assign({},t4.mouseOptions),n.mouseOptions)),this.mouseInput=new qm(this.options.mouseOptions),this.directionsInput=new Ese(t,this.options.keymap)}reset(){this._spherical=Re.toSpherical(Re.rot({x:0,y:0,z:-1},this.camera.rotation)),this.resetMotion$.next()}onSpawned(t){const e=Object.create(null,{onSpawned:{get:()=>super.onSpawned}});return e4(this,void 0,void 0,function*(){yield e.onSpawned.call(this,t),this._spherical=Re.toSpherical(Re.rot({x:0,y:0,z:-1},this.camera.rotation));const n=["KeyE","KeyQ"];this.camera.camera.supportsFov&&n.push("KeyZ","KeyC"),n.push("ShiftLeft");let r=Ra([this.directionsInput.output$,...n.map(c=>this.keyboard.bind(c))]).pipe(Ue(this._onRemoved$),tt(([c,...d])=>{let h={direction:{},rest:[]};(!this.options.ignoreKeyboardUnlessPointerLocked||this.mouseInput.isPointerLocked)&&(h={direction:c,rest:d});let p=Object.assign({},Re.O);const[m,g,b,v,y]=h.rest;void 0!==h.direction.upDown&&(p.z=h.direction.upDown?-1:1),void 0!==h.direction.leftRight&&(p.x=h.direction.leftRight?-1:1),m!=g&&(p.y=g?-1:1);let M=0;return b!=v&&(M=b?1:-1),p=Re.norm(p),y&&(p=Re.scalarMult(p,this.options.cameraBoostMultiplier)),[p,M]}));this.options.cameraMovementElasticity>0&&(r=r.pipe(nk(this.camera.tick$,this.options.cameraMovementElasticity,([c,d],[h,p],m)=>[Re.lerp(c,h,m),p],([c,d],[h,p])=>d==p&&Re.dist(c,h)<.001)));let s=Re.O,o=0;r.subscribe(([c,d])=>{s=c,o=d});let a=qm.isTouchDevice(),l=this.mouseInput.delta$.pipe(Ue(this._onRemoved$),gn(()=>this.active&&(a||!this.options.ignoreMouseUnlessPointerLocked||this.mouseInput.isPointerLocked)));if(this.options.cameraRotationElasticity>0){const c=new Qe(this._spherical);l.subscribe(h=>{const p=c.getValue();c.next({phi:Math.max(1e-6,Math.min(Math.PI-1e-6,p.phi+h.y*this.options.cameraRotationSensitivity/1e3)),theta:p.theta-h.x*this.options.cameraRotationSensitivity/1e3,radius:1})});const d=()=>{c.pipe(Ue(this._onRemoved$),nk(this.tick$,this.options.cameraRotationElasticity,(h,p,m)=>({phi:h.phi+m*(p.phi-h.phi),theta:h.theta+m*(p.theta-h.theta),radius:1}),(h,p)=>yi.dist({x:h.phi,y:h.theta},{x:p.phi,y:p.theta})<1e-4),Ue(this.resetMotion$)).subscribe(h=>{this._spherical.theta=h.theta,this._spherical.phi=h.phi})};this.resetMotion$.pipe(Ue(this._onRemoved$)).subscribe(()=>{c.next(this._spherical),d()}),d()}else l.subscribe(c=>{this._spherical.theta-=c.x*this.options.cameraRotationSensitivity/1e3,this._spherical.phi+=c.y*this.options.cameraRotationSensitivity/1e3,this._spherical.phi=Math.max(1e-6,Math.min(Math.PI-1e-6,this._spherical.phi))});this.camera.tick$.pipe(Ue(this._onRemoved$),gn(()=>this.active)).subscribe(([c,d])=>{this.camera.camera.fov+=o,this.camera.position=Re.add(this.camera.position,Re.rot(Re.scalarMult(s,this.options.cameraLinearSpeed*d/1e3),this.camera.rotation)),this.camera.rotation=Yi.lookAt(this.camera.position,Re.add(this.camera.position,Re.fromSpherical(this._spherical)))}),this.mouseInput.start(),this.directionsInput.start()})}onRemoved(){const t=Object.create(null,{onRemoved:{get:()=>super.onRemoved}});return e4(this,void 0,void 0,function*(){yield t.onRemoved.call(this),yield this.mouseInput.stop(!0),yield this.directionsInput.stop()})}}var i4=function(i,t,e,n){return new(e||(e=Promise))(function(s,o){function a(d){try{c(n.next(d))}catch(h){o(h)}}function l(d){try{c(n.throw(d))}catch(h){o(h)}}function c(d){d.done?s(d.value):function r(s){return s instanceof e?s:new e(function(o){o(s)})}(d.value).then(a,l)}c((n=n.apply(i,t||[])).next())})};const zse={mouseOptions:{},orbiting:{sensitivityX:1,sensitivityY:1},orbitingElasticity:0,zooming:{sensitivity:1},panning:{sensitivityX:1,sensitivityY:1},dollying:{sensitivity:1}};class Hse extends Kh{get active(){return super.active}set active(t){!super.active&&t&&this.reset(),super.active=t}get spherical(){return this._spherical}set spherical(t){this._spherical.phi=Math.max(1e-6,Math.min(Math.PI-1e-6,t.phi)),this._spherical.theta=t.theta,this._spherical.radius=t.radius,this.resetMotion$.next()}constructor(t,e={}){super(),this.camera=t,this.tickOrder=oc.INPUT_CONTROLLERS,this._spherical={phi:0,radius:10,theta:0},this.target=Re.O,this.resetMotion$=new Te,this.options=Object.assign(Object.assign({},zse),e),this.mouseInput=new qm(this.options.mouseOptions)}reset(){let t=Re.dist(this.target,this.camera.position);this.target=Re.add(this.camera.position,Re.rot({x:0,y:0,z:-t},this.camera.rotation)),this._spherical=Re.toSpherical(Re.sub(this.camera.position,this.target)),this.resetMotion$.next()}onSpawned(t){const e=Object.create(null,{onSpawned:{get:()=>super.onSpawned}});return i4(this,void 0,void 0,function*(){if(yield e.onSpawned.call(this,t),this._spherical=Re.toSpherical(Re.sub(this.camera.position,this.target)),this.options.orbiting){let r=this.mouseInput.delta$.pipe(Ue(this._onRemoved$),gn(()=>this.active&&this.mouseInput.state==Ls.DRAG));if(this.options.orbitingElasticity>0){const s=new Qe(this._spherical);r.subscribe(a=>{const l=s.getValue();s.next({phi:Math.max(1e-6,Math.min(Math.PI-1e-6,l.phi-a.y*this.options.orbiting.sensitivityY/1e3)),theta:l.theta-a.x*this.options.orbiting.sensitivityX/1e3,radius:1})});const o=()=>{s.pipe(Ue(this._onRemoved$),nk(this.tick$,this.options.orbitingElasticity,(a,l,c)=>({phi:a.phi+c*(l.phi-a.phi),theta:a.theta+c*(l.theta-a.theta),radius:1}),(a,l)=>yi.dist({x:a.phi,y:a.theta},{x:l.phi,y:l.theta})<1e-4),Ue(this.resetMotion$)).subscribe(a=>{this._spherical.theta=a.theta,this._spherical.phi=a.phi})};this.resetMotion$.pipe(Ue(this._onRemoved$)).subscribe(()=>{s.next(this._spherical),o()}),o()}else r.subscribe(s=>{this._spherical.theta-=s.x*this.options.orbiting.sensitivityX/1e3,this._spherical.phi-=s.y*this.options.orbiting.sensitivityY/1e3,this._spherical.phi=Math.max(1e-6,Math.min(Math.PI-1e-6,this._spherical.phi))})}this.options.zooming&&this.mouseInput.wheel$.pipe(Ue(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=Re.fromSpherical(this._spherical),o=Re.rotAround(s,{x:-Math.sin(this._spherical.theta),y:Math.cos(this._spherical.theta),z:0},Math.PI/2),a=Re.rotAround(s,Re.norm(o),Math.PI/2);this.target=Re.add(this.target,Re.add(Re.scalarMult(o,-this.options.panning.sensitivityY*r.y/1e3),Re.scalarMult(a,this.options.panning.sensitivityX*r.x/1e3)))};this.options.panning&&this.mouseInput.delta$.pipe(Ue(this._onRemoved$),gn(()=>this.mouseInput.state==Ls.DRAG_RIGHT_BUTTON)).subscribe(r=>{n(r)}),this.options.dollying&&this.mouseInput.delta$.pipe(Ue(this._onRemoved$),gn(()=>this.mouseInput.state==Ls.DRAG_MIDDLE_BUTTON)).subscribe(r=>{this._spherical.radius*=Math.pow(.95,-this.options.dollying.sensitivity*r.y/10)}),qm.isTouchDevice()&&(this.options.dollying||this.options.panning)&&this.mouseInput.twoTouchGestureDelta$.pipe(Ue(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(Ue(this._onRemoved$),gn(()=>this.active),tt(()=>this._spherical)).subscribe(r=>{this.camera.position=Re.add(this.target,Re.fromSpherical(r)),this.camera.rotation=Yi.lookAt(this.camera.position,this.target)}),yield this.mouseInput.start()})}onRemoved(){const t=Object.create(null,{onRemoved:{get:()=>super.onRemoved}});return i4(this,void 0,void 0,function*(){yield t.onRemoved.call(this),yield this.mouseInput.stop(!0)})}}class Gse{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 sk=function(i,t,e,n){return new(e||(e=Promise))(function(s,o){function a(d){try{c(n.next(d))}catch(h){o(h)}}function l(d){try{c(n.throw(d))}catch(h){o(h)}}function c(d){d.done?s(d.value):function r(s){return s instanceof e?s:new e(function(o){o(s)})}(d.value).then(a,l)}c((n=n.apply(i,t||[])).next())})},yu=(()=>{return(i=yu||(yu={}))[i.Nothing=0]="Nothing",i[i.Files=1]="Files",i[i.Entities=2]="Entities",yu;var i})();const r4={cachingStrategy:yu.Nothing,position:Re.O,rotation:Yi.O,loadProps:!0},s4=i=>({meta:i.meta,resources:i.resources.map(({object3D:t,body:e})=>({object3D:t&&t.clone(),body:e&&e.clone()}))});class Wse{constructor(t){this.world=t,this.filesCache=new Map,this.loadResultCache=new Map}loadGgGlbFiles(t){return sk(this,arguments,void 0,function*(e,n=!1){if(n&&this.filesCache.has(e))return this.filesCache.get(e);const r=Promise.all([fetch(`${e}.glb`).then(o=>o.arrayBuffer()),fetch(`${e}.meta`).then(o=>o.text()).then(o=>JSON.parse(o))]);n&&this.filesCache.set(e,r);const s=yield r;return n&&this.filesCache.set(e,s),s})}loadGgGlbResources(t){return sk(this,arguments,void 0,function*(e,n=yu.Nothing){if(n==yu.Entities&&this.loadResultCache.has(e)){const c=this.loadResultCache.get(e),d=c instanceof Promise?yield c:c;return s4(d)}const[r,s]=yield this.loadGgGlbFiles(e,n==yu.Files);if(!r)throw new Error("GLB not found");const[o,a]=yield Promise.all([this.world.visualScene.loader.loadFromGgGlb(r,s),this.world.physicsWorld.loader.loadFromGgGlb(r,s)]),l={resources:[],meta:s};if(!o)return l;if(0==a.length)l.resources.push({object3D:o,body:null});else if(1==a.length)l.resources.push({object3D:o,body:a[0]});else{for(const c of a)l.resources.push({object3D:o.popChild(c.name),body:c});o.isEmpty()||l.resources.push({object3D:o,body:null})}return n==yu.Entities&&this.loadResultCache.set(e,s4(l)),l})}loadGgGlb(t){return sk(this,arguments,void 0,function*(e,n=r4){const r=Object.assign(Object.assign({},r4),n),{resources:s,meta:o}=yield this.loadGgGlbResources(e,r.cachingStrategy),a={entities:s.map(l=>new Jo({object3D:l.object3D,objectBody:l.body})),meta:o};return r.loadProps&&(a.props=yield Promise.all(o.dummies.filter(l=>l.is_prop||l.is_scene).map(l=>this.loadGgGlb(l.is_prop?(r.propsPath||e.substring(0,e.lastIndexOf("/")+1))+l.prop_id:l.scene_id,{loadProps:!!l.is_scene,position:Re.add(Re.rot(l.position,r.rotation),r.position),rotation:Yi.combineRotations(l.rotation,r.rotation)})))),a.entities.forEach(l=>{l.position=Re.add(Re.rot(Re.clone(l.position),r.rotation),r.position),l.rotation=Yi.mult(Yi.clone(l.rotation),r.rotation)}),a})}}class ok extends bl{constructor(t,e){super(t,e),this.visualScene=t,this.physicsWorld=e,this.loader=new Wse(this)}addPrimitiveRigidBody(t,e=Re.O,n=Yi.O,r={}){const s=new Jo({object3D:this.visualScene.factory.createPrimitive(t.shape,r),objectBody:this.physicsWorld.factory.createRigidBody(t)});return s.position=e,s.rotation=n,this.addEntity(s),s}addRenderer(t,e,n){const r=new Use(this.visualScene.createRenderer(t,e,n));return this.addEntity(r),r}registerConsoleCommands(t){super.registerConsoleCommands(t),t.registerConsoleCommand(this,"gravity",(...e)=>function(i,t,e,n){return new(e||(e=Promise))(function(s,o){function a(d){try{c(n.next(d))}catch(h){o(h)}}function l(d){try{c(n.throw(d))}catch(h){o(h)}}function c(d){d.done?s(d.value):function r(s){return s instanceof e?s:new e(function(o){o(s)})}(d.value).then(a,l)}c((n=n.apply(i,t||[])).next())})}(this,void 0,void 0,function*(){if(1==e.length&&(e=["0","0",""+-+e[0]]),e.length>0){if(isNaN(+e[0])||isNaN(+e[1])||isNaN(+e[2]))throw new Error("Wrong arguments");this.physicsWorld.gravity={x:+e[0],y:+e[1],z:+e[2]}}return JSON.stringify(this.physicsWorld.gravity)}),'args: [ ?float, ?float, ?float ]; Get or set 3D world gravity vector. 1 argument sets vector {x: 0, y: 0, z: -value}, 3 arguments set the whole vector. Default value is "9.82" or "0 0 -9.82"')}}function o4(i,t=Gy,e){const n=OI(i,t);return function Yse(i,t){return ni((e,n)=>{const{leading:r=!0,trailing:s=!1}=t??{};let o=!1,a=null,l=null,c=!1;const d=()=>{l?.unsubscribe(),l=null,s&&(m(),c&&n.complete())},h=()=>{l=null,c&&n.complete()},p=g=>l=Mr(i(g)).subscribe(qn(n,d,h)),m=()=>{if(o){o=!1;const g=a;a=null,n.next(g),!c&&p(g)}};e.subscribe(qn(n,g=>{o=!0,a=g,(!l||l.closed)&&(r?m():p(g))},()=>{c=!0,(!(s&&o&&l)||l.closed)&&n.complete()}))})}(()=>n,e)}window.gg_version="0.0.56";const qse=0,a4=1,Xse=2,l4=1,c4=2,Qc=3,lc=0,ko=1,Ns=2,Jc=0,Zm=1,d4=2,u4=3,h4=4,Kse=5,Zh=100,Zse=101,Qse=102,Jse=103,eoe=104,toe=200,noe=201,ioe=202,roe=203,lk=204,ck=205,soe=206,ooe=207,aoe=208,loe=209,coe=210,doe=211,uoe=212,hoe=213,foe=214,poe=0,moe=1,goe=2,CC=3,_oe=4,voe=5,yoe=6,boe=7,SC=0,xoe=1,woe=2,bu=0,Moe=1,Coe=2,Soe=3,Eoe=4,Aoe=5,Doe=6,Toe=7,f4="attached",cc=301,Qh=302,EC=303,AC=304,gb=306,Bs=1e3,er=1001,_b=1002,vr=1003,uk=1004,Qm=1005,cr=1006,vb=1007,xl=1008,ed=1009,p4=1010,m4=1011,yb=1012,hk=1013,xu=1014,ea=1015,Jm=1016,fk=1017,pk=1018,eg=1020,g4=35902,_4=1021,v4=1022,Po=1023,y4=1024,b4=1025,tg=1026,ng=1027,mk=1028,DC=1029,x4=1030,gk=1031,_k=1033,TC=33776,IC=33777,RC=33778,kC=33779,vk=35840,yk=35841,bk=35842,xk=35843,wk=36196,Mk=37492,Ck=37496,Sk=37808,Ek=37809,Ak=37810,Dk=37811,Tk=37812,Ik=37813,Rk=37814,kk=37815,Pk=37816,Ok=37817,Fk=37818,Lk=37819,Nk=37820,Bk=37821,PC=36492,Uk=36494,Vk=36495,w4=36283,zk=36284,Hk=36285,$k=36286,bb=2300,xb=2301,Ooe=0,C4=1,jk=2,Loe=3201,Jh=0,Noe=1,wu="",cs="srgb",ds="srgb-linear",Yk="display-p3",FC="display-p3-linear",LC="linear",Fi="srgb",NC="rec709",BC="p3",sg=7680,Boe=512,Uoe=513,Voe=514,E4=515,zoe=516,Hoe=517,$oe=518,Goe=519,A4="300 es",td=2e3;class og{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]+Us[i>>16&255]+Us[i>>24&255]+"-"+Us[255&t]+Us[t>>8&255]+"-"+Us[t>>16&15|64]+Us[t>>24&255]+"-"+Us[63&e|128]+Us[e>>8&255]+"-"+Us[e>>16&255]+Us[e>>24&255]+Us[255&n]+Us[n>>8&255]+Us[n>>16&255]+Us[n>>24&255]).toLowerCase()}function tr(i,t,e){return Math.max(t,Math.min(e,i))}function qk(i,t){return(i%t+t)%t}function wb(i,t,e){return(1-e)*i+e*t}function ho(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 yn(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 aae_radToDeg=function nae(i){return i*ag};class xe{constructor(t=0,e=0){xe.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(tr(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 wn{constructor(t,e,n,r,s,o,a,l,c){wn.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 d=this.elements;return d[0]=t,d[1]=r,d[2]=a,d[3]=e,d[4]=s,d[5]=l,d[6]=n,d[7]=o,d[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],d=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],F=r[2],D=r[5],k=r[8];return s[0]=o*b+a*M+l*F,s[3]=o*v+a*x+l*D,s[6]=o*y+a*C+l*k,s[1]=c*b+d*M+h*F,s[4]=c*v+d*x+h*D,s[7]=c*y+d*C+h*k,s[2]=p*b+m*M+g*F,s[5]=p*v+m*x+g*D,s[8]=p*y+m*C+g*k,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],d=t[8];return e*o*d-e*a*c-n*s*d+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],d=t[8],h=d*o-a*c,p=a*l-d*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-d*n)*b,t[2]=(a*n-r*o)*b,t[3]=p*b,t[4]=(d*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(Xk.makeScale(t,e)),this}rotate(t){return this.premultiply(Xk.makeRotation(-t)),this}translate(t,e){return this.premultiply(Xk.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 Xk=new wn;function T4(i){for(let t=i.length-1;t>=0;--t)if(i[t]>=65535)return!0;return!1}function Mb(i){return document.createElementNS("http://www.w3.org/1999/xhtml",i)}function cae(){const i=Mb("canvas");return i.style.display="block",i}Int8Array,Uint8Array,Uint8ClampedArray,Int16Array,Uint16Array,Int32Array,Uint32Array,Float32Array,Float64Array;const I4={};function cg(i){i in I4||(I4[i]=!0,console.warn(i))}const R4=(new wn).set(.8224621,.177538,0,.0331941,.9668058,0,.0170827,.0723974,.9105199),k4=(new wn).set(1.2249401,-.2249404,0,-.0420569,1.0420571,0,-.0196376,-.0786361,1.0982735),Cb={[ds]:{transfer:LC,primaries:NC,luminanceCoefficients:[.2126,.7152,.0722],toReference:i=>i,fromReference:i=>i},[cs]:{transfer:Fi,primaries:NC,luminanceCoefficients:[.2126,.7152,.0722],toReference:i=>i.convertSRGBToLinear(),fromReference:i=>i.convertLinearToSRGB()},[FC]:{transfer:LC,primaries:BC,luminanceCoefficients:[.2289,.6917,.0793],toReference:i=>i.applyMatrix3(k4),fromReference:i=>i.applyMatrix3(R4)},[Yk]:{transfer:Fi,primaries:BC,luminanceCoefficients:[.2289,.6917,.0793],toReference:i=>i.convertSRGBToLinear().applyMatrix3(k4),fromReference:i=>i.applyMatrix3(R4).convertLinearToSRGB()}},uae=new Set([ds,FC]),ei={enabled:!0,_workingColorSpace:ds,get workingColorSpace(){return this._workingColorSpace},set workingColorSpace(i){if(!uae.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,Cb[e].fromReference)((0,Cb[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 Cb[i].primaries},getTransfer:function(i){return i===wu?LC:Cb[i].transfer},getLuminanceCoefficients:function(i,t=this._workingColorSpace){return i.fromArray(Cb[t].luminanceCoefficients)}};function dg(i){return i<.04045?.0773993808*i:Math.pow(.9478672986*i+.0521327014,2.4)}function Kk(i){return i<.0031308?12.92*i:1.055*Math.pow(i,.41666)-.055}let ug;class hae{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===ug&&(ug=Mb("canvas")),ug.width=t.width,ug.height=t.height;const n=ug.getContext("2d");t instanceof ImageData?n.putImageData(t,0,0):n.drawImage(t,0,0,t.width,t.height),e=ug}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=Mb("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 og{constructor(e=i.DEFAULT_IMAGE,n=i.DEFAULT_MAPPING,r=er,s=er,o=cr,a=xl,l=Po,c=ed,d=i.DEFAULT_ANISOTROPY,h=wu){super(),this.isTexture=!0,Object.defineProperty(this,"id",{value:pae++}),this.uuid=ta(),this.name="",this.source=new hg(e),this.mipmaps=[],this.mapping=n,this.channel=0,this.wrapS=r,this.wrapT=s,this.magFilter=o,this.minFilter=a,this.anisotropy=d,this.format=l,this.internalFormat=null,this.type=c,this.offset=new xe(0,0),this.repeat=new xe(1,1),this.center=new xe(0,0),this.rotation=0,this.matrixAutoUpdate=!0,this.matrix=new wn,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 Bs:e.x=e.x-Math.floor(e.x);break;case er:e.x=e.x<0?0:1;break;case _b: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 Bs:e.y=e.y-Math.floor(e.y);break;case er:e.y=e.y<0?0:1;break;case _b: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 _i{constructor(t=0,e=0,n=0,r=1){_i.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],d=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(d-p)<.01&&Math.abs(h-b)<.01&&Math.abs(g-v)<.01){if(Math.abs(d+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,F=(y+1)/2,D=(d+p)/4,k=(h+b)/4,B=(g+v)/4;return x>C&&x>F?x<.01?(n=0,r=.707106781,s=.707106781):(n=Math.sqrt(x),r=D/n,s=k/n):C>F?C<.01?(n=.707106781,r=0,s=.707106781):(r=Math.sqrt(C),n=D/r,s=B/r):F<.01?(n=.707106781,r=.707106781,s=0):(s=Math.sqrt(F),n=k/s,r=B/s),this.set(n,r,s,e),this}let M=Math.sqrt((v-g)*(v-g)+(h-b)*(h-b)+(p-d)*(p-d));return Math.abs(M)<.001&&(M=1),this.x=(v-g)/M,this.y=(h-b)/M,this.z=(p-d)/M,this.w=Math.acos((c+m+y-1)/2),this}setFromMatrixPosition(t){const e=t.elements;return this.x=e[12],this.y=e[13],this.z=e[14],this.w=e[15],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 mae extends og{constructor(t=1,e=1,n={}){super(),this.isRenderTarget=!0,this.width=t,this.height=e,this.depth=1,this.scissor=new _i(0,0,t,e),this.scissorTest=!1,this.viewport=new _i(0,0,t,e);const r={width:t,height:e,depth:1};n=Object.assign({generateMipmaps:!1,internalFormat:null,minFilter:cr,depthBuffer:!0,stencilBuffer:!1,resolveDepthBuffer:!0,resolveStencilBuffer:!0,depthTexture:null,samples:0,count:1},n);const s=new Oo(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 F=Math.sqrt(x),D=Math.atan2(F,y*M);v=Math.sin(v*D)/F,a=Math.sin(a*D)/F}const C=a*M;if(l=l*v+p*C,c=c*v+m*C,d=d*v+g*C,h=h*v+b*C,v===1-a){const F=1/Math.sqrt(l*l+c*c+d*d+h*h);l*=F,c*=F,d*=F,h*=F}}t[e]=l,t[e+1]=c,t[e+2]=d,t[e+3]=h}static multiplyQuaternionsFlat(t,e,n,r,s,o){const a=n[r],l=n[r+1],c=n[r+2],d=n[r+3],h=s[o],p=s[o+1],m=s[o+2],g=s[o+3];return t[e]=a*g+d*h+l*m-c*p,t[e+1]=l*g+d*p+c*h-a*m,t[e+2]=c*g+d*m+a*p-l*h,t[e+3]=d*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),d=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*d*h+c*m*g,this._y=c*m*h-p*d*g,this._z=c*d*g+p*m*h,this._w=c*d*h-p*m*g;break;case"YXZ":this._x=p*d*h+c*m*g,this._y=c*m*h-p*d*g,this._z=c*d*g-p*m*h,this._w=c*d*h+p*m*g;break;case"ZXY":this._x=p*d*h-c*m*g,this._y=c*m*h+p*d*g,this._z=c*d*g+p*m*h,this._w=c*d*h-p*m*g;break;case"ZYX":this._x=p*d*h-c*m*g,this._y=c*m*h+p*d*g,this._z=c*d*g-p*m*h,this._w=c*d*h+p*m*g;break;case"YZX":this._x=p*d*h+c*m*g,this._y=c*m*h+p*d*g,this._z=c*d*g-p*m*h,this._w=c*d*h-p*m*g;break;case"XZY":this._x=p*d*h-c*m*g,this._y=c*m*h-p*d*g,this._z=c*d*g+p*m*h,this._w=c*d*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],d=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=(d-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=(d-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+d)/m}else{const m=2*Math.sqrt(1+h-n-a);this._w=(o-r)/m,this._x=(s+c)/m,this._y=(l+d)/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(tr(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,d=e._w;return this._x=n*d+o*a+r*c-s*l,this._y=r*d+o*l+s*a-n*c,this._z=s*d+o*c+n*l-r*a,this._w=o*d-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),d=Math.atan2(c,a),h=Math.sin((1-e)*d)/c,p=Math.sin(e*d)/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 O{constructor(t=0,e=0,n=0){O.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(O4.setFromEuler(t))}applyAxisAngle(t,e){return this.applyQuaternion(O4.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),d=2*(a*e-s*r),h=2*(s*n-o*e);return this.x=e+l*c+o*h-a*d,this.y=n+l*d+a*c-s*h,this.z=r+l*h+s*d-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 Jk.copy(this).projectOnVector(t),this.sub(Jk)}reflect(t){return this.sub(Jk.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(tr(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 Jk=new O,O4=new fo;class Vs{constructor(t=new O(1/0,1/0,1/0),e=new O(-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;e=this.min.x&&t.x<=this.max.x&&t.y>=this.min.y&&t.y<=this.max.y&&t.z>=this.min.z&&t.z<=this.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.x>=this.min.x&&t.min.x<=this.max.x&&t.max.y>=this.min.y&&t.min.y<=this.max.y&&t.max.z>=this.min.z&&t.min.z<=this.max.z}intersectsSphere(t){return this.clampPoint(t.center,wl),wl.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(Sb),HC.subVectors(this.max,Sb),fg.subVectors(t.a,Sb),pg.subVectors(t.b,Sb),mg.subVectors(t.c,Sb),Cu.subVectors(pg,fg),Su.subVectors(mg,pg),tf.subVectors(fg,mg);let e=[0,-Cu.z,Cu.y,0,-Su.z,Su.y,0,-tf.z,tf.y,Cu.z,0,-Cu.x,Su.z,0,-Su.x,tf.z,0,-tf.x,-Cu.y,Cu.x,0,-Su.y,Su.x,0,-tf.y,tf.x,0];return!(!eP(e,fg,pg,mg,HC)||(e=[1,0,0,0,1,0,0,0,1],!eP(e,fg,pg,mg,HC)))&&($C.crossVectors(Cu,Su),e=[$C.x,$C.y,$C.z],eP(e,fg,pg,mg,HC))}clampPoint(t,e){return e.copy(t).clamp(this.min,this.max)}distanceToPoint(t){return this.clampPoint(t,wl).distanceTo(t)}getBoundingSphere(t){return this.isEmpty()?t.makeEmpty():(this.getCenter(t.center),t.radius=.5*this.getSize(wl).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()||(nd[0].set(this.min.x,this.min.y,this.min.z).applyMatrix4(t),nd[1].set(this.min.x,this.min.y,this.max.z).applyMatrix4(t),nd[2].set(this.min.x,this.max.y,this.min.z).applyMatrix4(t),nd[3].set(this.min.x,this.max.y,this.max.z).applyMatrix4(t),nd[4].set(this.max.x,this.min.y,this.min.z).applyMatrix4(t),nd[5].set(this.max.x,this.min.y,this.max.z).applyMatrix4(t),nd[6].set(this.max.x,this.max.y,this.min.z).applyMatrix4(t),nd[7].set(this.max.x,this.max.y,this.max.z).applyMatrix4(t),this.setFromPoints(nd)),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 nd=[new O,new O,new O,new O,new O,new O,new O,new O],wl=new O,zC=new Vs,fg=new O,pg=new O,mg=new O,Cu=new O,Su=new O,tf=new O,Sb=new O,HC=new O,$C=new O,nf=new O;function eP(i,t,e,n,r){for(let s=0,o=i.length-3;s<=o;s+=3){nf.fromArray(i,s);const a=r.x*Math.abs(nf.x)+r.y*Math.abs(nf.y)+r.z*Math.abs(nf.z),l=t.dot(nf),c=e.dot(nf),d=n.dot(nf);if(Math.max(-Math.max(l,c,d),Math.min(l,c,d))>a)return!1}return!0}const gae=new Vs,Eb=new O,tP=new O;class zs{constructor(t=new O,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):gae.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;Eb.subVectors(t,this.center);const e=Eb.lengthSq();if(e>this.radius*this.radius){const n=Math.sqrt(e),r=.5*(n-this.radius);this.center.addScaledVector(Eb,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):(tP.subVectors(t.center,this.center).setLength(t.radius),this.expandByPoint(Eb.copy(t.center).add(tP)),this.expandByPoint(Eb.copy(t.center).sub(tP))),this)}equals(t){return t.center.equals(this.center)&&t.radius===this.radius}clone(){return(new this.constructor).copy(this)}}const id=new O,nP=new O,GC=new O,Eu=new O,iP=new O,WC=new O,rP=new O;class Ab{constructor(t=new O,e=new O(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,id)),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=id.subVectors(t,this.origin).dot(this.direction);return e<0?this.origin.distanceToSquared(t):(id.copy(this.origin).addScaledVector(this.direction,e),id.distanceToSquared(t))}distanceSqToSegment(t,e,n,r){nP.copy(t).add(e).multiplyScalar(.5),GC.copy(e).sub(t).normalize(),Eu.copy(this.origin).sub(nP);const s=.5*t.distanceTo(e),o=-this.direction.dot(GC),a=Eu.dot(this.direction),l=-Eu.dot(GC),c=Eu.lengthSq(),d=Math.abs(1-o*o);let h,p,m,g;if(d>0)if(h=o*l-a,p=o*a-l,g=s*d,h>=0)if(p>=-g)if(p<=g){const b=1/d;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(nP).addScaledVector(GC,p),m}intersectSphere(t,e){id.subVectors(t.center,this.origin);const n=id.dot(this.direction),r=id.dot(id)-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,d=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),d>=0?(s=(t.min.y-p.y)*d,o=(t.max.y-p.y)*d):(s=(t.max.y-p.y)*d,o=(t.min.y-p.y)*d),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,id)}intersectTriangle(t,e,n,r,s){iP.subVectors(e,t),WC.subVectors(n,t),rP.crossVectors(iP,WC);let a,o=this.direction.dot(rP);if(o>0){if(r)return null;a=1}else{if(!(o<0))return null;a=-1,o=-o}Eu.subVectors(this.origin,t);const l=a*this.direction.dot(WC.crossVectors(Eu,WC));if(l<0)return null;const c=a*this.direction.dot(iP.cross(Eu));if(c<0||l+c>o)return null;const d=-a*Eu.dot(rP);return d<0?null:this.at(d/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 Bt{constructor(t,e,n,r,s,o,a,l,c,d,h,p,m,g,b,v){Bt.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,d,h,p,m,g,b,v)}set(t,e,n,r,s,o,a,l,c,d,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]=d,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 Bt).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/gg.setFromMatrixColumn(t,0).length(),s=1/gg.setFromMatrixColumn(t,1).length(),o=1/gg.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),d=Math.cos(s),h=Math.sin(s);if("XYZ"===t.order){const p=o*d,m=o*h,g=a*d,b=a*h;e[0]=l*d,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*d,m=l*h,g=c*d,b=c*h;e[0]=p+b*a,e[4]=g*a-m,e[8]=o*c,e[1]=o*h,e[5]=o*d,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*d,m=l*h,g=c*d,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*d,e[9]=b-p*a,e[2]=-o*c,e[6]=a,e[10]=o*l}else if("ZYX"===t.order){const p=o*d,m=o*h,g=a*d,b=a*h;e[0]=l*d,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*d,e[4]=b-p*h,e[8]=g*h+m,e[1]=h,e[5]=o*d,e[9]=-a*d,e[2]=-c*d,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*d,e[4]=-h,e[8]=c*d,e[1]=p*h+b,e[5]=o*d,e[9]=m*h-g,e[2]=g*h-m,e[6]=a*d,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(_ae,t,vae)}lookAt(t,e,n){const r=this.elements;return na.subVectors(t,e),0===na.lengthSq()&&(na.z=1),na.normalize(),Au.crossVectors(n,na),0===Au.lengthSq()&&(1===Math.abs(n.z)?na.x+=1e-4:na.z+=1e-4,na.normalize(),Au.crossVectors(n,na)),Au.normalize(),jC.crossVectors(na,Au),r[0]=Au.x,r[4]=jC.x,r[8]=na.x,r[1]=Au.y,r[5]=jC.y,r[9]=na.y,r[2]=Au.z,r[6]=jC.z,r[10]=na.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],d=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],F=n[15],D=r[0],k=r[4],B=r[8],T=r[12],A=r[1],W=r[5],ie=r[9],ne=r[13],oe=r[2],ge=r[6],q=r[10],se=r[14],J=r[3],we=r[7],Ve=r[11],Ye=r[15];return s[0]=o*D+a*A+l*oe+c*J,s[4]=o*k+a*W+l*ge+c*we,s[8]=o*B+a*ie+l*q+c*Ve,s[12]=o*T+a*ne+l*se+c*Ye,s[1]=d*D+h*A+p*oe+m*J,s[5]=d*k+h*W+p*ge+m*we,s[9]=d*B+h*ie+p*q+m*Ve,s[13]=d*T+h*ne+p*se+m*Ye,s[2]=g*D+b*A+v*oe+y*J,s[6]=g*k+b*W+v*ge+y*we,s[10]=g*B+b*ie+v*q+y*Ve,s[14]=g*T+b*ne+v*se+y*Ye,s[3]=M*D+x*A+C*oe+F*J,s[7]=M*k+x*W+C*ge+F*we,s[11]=M*B+x*ie+C*q+F*Ve,s[15]=M*T+x*ne+C*se+F*Ye,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],d=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*d-s*l*d)+t[11]*(+e*c*h-e*a*m-s*o*h+n*o*m+s*a*d-n*c*d)+t[15]*(-r*a*d-e*l*h+e*a*p+r*o*h-n*o*p+n*l*d)}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],d=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-d*v*c-g*l*m+o*v*m+d*l*y-o*p*y,C=d*b*c-g*h*c+g*a*m-o*b*m-d*a*y+o*h*y,F=g*h*l-d*b*l-g*a*p+o*b*p+d*a*v-o*h*v,D=e*M+n*x+r*C+s*F;if(0===D)return this.set(0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0);const k=1/D;return t[0]=M*k,t[1]=(b*p*s-h*v*s-b*r*m+n*v*m+h*r*y-n*p*y)*k,t[2]=(a*v*s-b*l*s+b*r*c-n*v*c-a*r*y+n*l*y)*k,t[3]=(h*l*s-a*p*s-h*r*c+n*p*c+a*r*m-n*l*m)*k,t[4]=x*k,t[5]=(d*v*s-g*p*s+g*r*m-e*v*m-d*r*y+e*p*y)*k,t[6]=(g*l*s-o*v*s-g*r*c+e*v*c+o*r*y-e*l*y)*k,t[7]=(o*p*s-d*l*s+d*r*c-e*p*c-o*r*m+e*l*m)*k,t[8]=C*k,t[9]=(g*h*s-d*b*s-g*n*m+e*b*m+d*n*y-e*h*y)*k,t[10]=(o*b*s-g*a*s+g*n*c-e*b*c-o*n*y+e*a*y)*k,t[11]=(d*a*s-o*h*s-d*n*c+e*h*c+o*n*m-e*a*m)*k,t[12]=F*k,t[13]=(d*b*r-g*h*r+g*n*p-e*b*p-d*n*v+e*h*v)*k,t[14]=(g*a*r-o*b*r-g*n*l+e*b*l+o*n*v-e*a*v)*k,t[15]=(o*h*r-d*a*r+d*n*l-e*h*l-o*n*p+e*a*p)*k,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,d=s*a;return this.set(c*o+n,c*a-r*l,c*l+r*a,0,c*a+r*l,d*a+n,d*l-r*o,0,c*l-r*a,d*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,d=o+o,h=a+a,p=s*c,m=s*d,g=s*h,b=o*d,v=o*h,y=a*h,M=l*c,x=l*d,C=l*h,F=n.x,D=n.y,k=n.z;return r[0]=(1-(b+y))*F,r[1]=(m+C)*F,r[2]=(g-x)*F,r[3]=0,r[4]=(m-C)*D,r[5]=(1-(p+y))*D,r[6]=(v+M)*D,r[7]=0,r[8]=(g+x)*k,r[9]=(v-M)*k,r[10]=(1-(p+b))*k,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=gg.set(r[0],r[1],r[2]).length();const o=gg.set(r[4],r[5],r[6]).length(),a=gg.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],Ml.copy(this);const c=1/s,d=1/o,h=1/a;return Ml.elements[0]*=c,Ml.elements[1]*=c,Ml.elements[2]*=c,Ml.elements[4]*=d,Ml.elements[5]*=d,Ml.elements[6]*=d,Ml.elements[8]*=h,Ml.elements[9]*=h,Ml.elements[10]*=h,e.setFromRotationMatrix(Ml),n.x=s,n.y=o,n.z=a,this}makePerspective(t,e,n,r,s,o,a=td){const l=this.elements,c=2*s/(e-t),d=2*s/(n-r),h=(e+t)/(e-t),p=(n+r)/(n-r);let m,g;if(a===td)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]=d,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=td){const l=this.elements,c=1/(e-t),d=1/(n-r),h=1/(o-s),p=(e+t)*c,m=(n+r)*d;let g,b;if(a===td)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*d,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 gg=new O,Ml=new Bt,_ae=new O(0,0,0),vae=new O(1,1,1),Au=new O,jC=new O,na=new O,F4=new Bt,L4=new fo;let rd=(()=>{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],d=s[5],h=s[9],p=s[2],m=s[6],g=s[10];switch(n){case"XYZ":this._y=Math.asin(tr(l,-1,1)),Math.abs(l)<.9999999?(this._x=Math.atan2(-h,g),this._z=Math.atan2(-a,o)):(this._x=Math.atan2(m,d),this._z=0);break;case"YXZ":this._x=Math.asin(-tr(h,-1,1)),Math.abs(h)<.9999999?(this._y=Math.atan2(l,g),this._z=Math.atan2(c,d)):(this._y=Math.atan2(-p,o),this._z=0);break;case"ZXY":this._x=Math.asin(tr(m,-1,1)),Math.abs(m)<.9999999?(this._y=Math.atan2(-p,g),this._z=Math.atan2(-a,d)):(this._y=0,this._z=Math.atan2(c,o));break;case"ZYX":this._y=Math.asin(-tr(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,d));break;case"YZX":this._z=Math.asin(tr(c,-1,1)),Math.abs(c)<.9999999?(this._x=Math.atan2(-h,d),this._y=Math.atan2(-p,o)):(this._x=0,this._y=Math.atan2(l,g));break;case"XZY":this._z=Math.asin(-tr(a,-1,1)),Math.abs(a)<.9999999?(this._x=Math.atan2(m,d),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 F4.makeRotationFromQuaternion(e),this.setFromRotationMatrix(F4,n,r)}setFromVector3(e,n=this._order){return this.set(e.x,e.y,e.z,n)}reorder(e){return L4.setFromEuler(this),this.setFromQuaternion(L4,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 sP{constructor(){this.mask=1}set(t){this.mask=(1<>>0}enable(t){this.mask|=1<{class i extends og{constructor(){super(),this.isObject3D=!0,Object.defineProperty(this,"id",{value:yae++}),this.uuid=ta(),this.name="",this.type="Object3D",this.parent=null,this.children=[],this.up=i.DEFAULT_UP.clone();const e=new O,n=new rd,r=new fo,s=new O(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 Bt},normalMatrix:{value:new wn}}),this.matrix=new Bt,this.matrixWorld=new Bt,this.matrixAutoUpdate=i.DEFAULT_MATRIX_AUTO_UPDATE,this.matrixWorldAutoUpdate=i.DEFAULT_MATRIX_WORLD_AUTO_UPDATE,this.matrixWorldNeedsUpdate=!1,this.layers=new sP,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 _g.setFromAxisAngle(e,n),this.quaternion.multiply(_g),this}rotateOnWorldAxis(e,n){return _g.setFromAxisAngle(e,n),this.quaternion.premultiply(_g),this}rotateX(e){return this.rotateOnAxis(B4,e)}rotateY(e){return this.rotateOnAxis(U4,e)}rotateZ(e){return this.rotateOnAxis(V4,e)}translateOnAxis(e,n){return N4.copy(e).applyQuaternion(this.quaternion),this.position.add(N4.multiplyScalar(n)),this}translateX(e){return this.translateOnAxis(B4,e)}translateY(e){return this.translateOnAxis(U4,e)}translateZ(e){return this.translateOnAxis(V4,e)}localToWorld(e){return this.updateWorldMatrix(!0,!1),e.applyMatrix4(this.matrixWorld)}worldToLocal(e){return this.updateWorldMatrix(!0,!1),e.applyMatrix4(sd.copy(this.matrixWorld).invert())}lookAt(e,n,r){e.isVector3?YC.copy(e):YC.set(e,n,r);const s=this.parent;this.updateWorldMatrix(!0,!1),Db.setFromMatrixPosition(this.matrixWorld),this.isCamera||this.isLight?sd.lookAt(Db,YC,this.up):sd.lookAt(YC,Db,this.up),this.quaternion.setFromRotationMatrix(sd),s&&(sd.extractRotation(s.matrixWorld),_g.setFromRotationMatrix(sd),this.quaternion.premultiply(_g.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.maxInstanceCount=this._maxInstanceCount,s.maxVertexCount=this._maxVertexCount,s.maxIndexCount=this._maxIndexCount,s.geometryInitialized=this._geometryInitialized,s.geometryCount=this._geometryCount,s.matricesTexture=this._matricesTexture.toJSON(e),null!==this._colorsTexture&&(s.colorsTexture=this._colorsTexture.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 d=0,h=c.length;d0){s.children=[];for(let l=0;l0){s.animations=[];for(let l=0;l0&&(r.geometries=l),c.length>0&&(r.materials=c),d.length>0&&(r.textures=d),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 d in l){const h=l[d];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){Cl.subVectors(r,e),od.subVectors(n,e),aP.subVectors(t,e);const o=Cl.dot(Cl),a=Cl.dot(od),l=Cl.dot(aP),c=od.dot(od),d=od.dot(aP),h=o*c-a*a;if(0===h)return s.set(0,0,0),null;const p=1/h,m=(c*l-a*d)*p,g=(o*d-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,ad)&&ad.x>=0&&ad.y>=0&&ad.x+ad.y<=1}static getInterpolation(t,e,n,r,s,o,a,l){return null===this.getBarycoord(t,e,n,r,ad)?(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,ad.x),l.addScaledVector(o,ad.y),l.addScaledVector(a,ad.z),l)}static isFrontFacing(t,e,n,r){return Cl.subVectors(n,e),od.subVectors(t,e),Cl.cross(od).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 Cl.subVectors(this.c,this.b),od.subVectors(this.a,this.b),.5*Cl.cross(od).length()}getMidpoint(t){return t.addVectors(this.a,this.b).add(this.c).multiplyScalar(1/3)}getNormal(t){return La.getNormal(this.a,this.b,this.c,t)}getPlane(t){return t.setFromCoplanarPoints(this.a,this.b,this.c)}getBarycoord(t,e){return La.getBarycoord(t,this.a,this.b,this.c,e)}getInterpolation(t,e,n,r,s){return La.getInterpolation(t,this.a,this.b,this.c,e,n,r,s)}containsPoint(t){return La.containsPoint(t,this.a,this.b,this.c)}isFrontFacing(t){return La.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;yg.subVectors(r,n),bg.subVectors(s,n),lP.subVectors(t,n);const l=yg.dot(lP),c=bg.dot(lP);if(l<=0&&c<=0)return e.copy(n);cP.subVectors(t,r);const d=yg.dot(cP),h=bg.dot(cP);if(d>=0&&h<=d)return e.copy(r);const p=l*h-d*c;if(p<=0&&l>=0&&d<=0)return o=l/(l-d),e.copy(n).addScaledVector(yg,o);dP.subVectors(t,s);const m=yg.dot(dP),g=bg.dot(dP);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(bg,a);const v=d*g-m*h;if(v<=0&&h-d>=0&&m-g>=0)return H4.subVectors(s,r),a=(h-d)/(h-d+(m-g)),e.copy(r).addScaledVector(H4,a);const y=1/(v+b+p);return o=b*y,a=p*y,e.copy(n).addScaledVector(yg,o).addScaledVector(bg,a)}equals(t){return t.a.equals(this.a)&&t.b.equals(this.b)&&t.c.equals(this.c)}}const $4={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},Du={h:0,s:0,l:0},qC={h:0,s:0,l:0};function uP(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 qe{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=cs){return t=Math.floor(t),this.r=(t>>16&255)/255,this.g=(t>>8&255)/255,this.b=(255&t)/255,ei.toWorkingColorSpace(this,e),this}setRGB(t,e,n,r=ei.workingColorSpace){return this.r=t,this.g=e,this.b=n,ei.toWorkingColorSpace(this,r),this}setHSL(t,e,n,r=ei.workingColorSpace){if(t=qk(t,1),e=tr(e,0,1),n=tr(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=uP(o,s,t+1/3),this.g=uP(o,s,t),this.b=uP(o,s,t-1/3)}return ei.toWorkingColorSpace(this,r),this}setStyle(t,e=cs){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=cs){const n=$4[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=dg(t.r),this.g=dg(t.g),this.b=dg(t.b),this}copyLinearToSRGB(t){return this.r=Kk(t.r),this.g=Kk(t.g),this.b=Kk(t.b),this}convertSRGBToLinear(){return this.copySRGBToLinear(this),this}convertLinearToSRGB(){return this.copyLinearToSRGB(this),this}getHex(t=cs){return ei.fromWorkingColorSpace(Hs.copy(this),t),65536*Math.round(tr(255*Hs.r,0,255))+256*Math.round(tr(255*Hs.g,0,255))+Math.round(tr(255*Hs.b,0,255))}getHexString(t=cs){return("000000"+this.getHex(t).toString(16)).slice(-6)}getHSL(t,e=ei.workingColorSpace){ei.fromWorkingColorSpace(Hs.copy(this),e);const n=Hs.r,r=Hs.g,s=Hs.b,o=Math.max(n,r,s),a=Math.min(n,r,s);let l,c;const d=(a+o)/2;if(a===o)l=0,c=0;else{const h=o-a;switch(c=d<=.5?h/(o+a):h/(2-o-a),o){case n:l=(r-s)/h+(r0!=t>0&&this.version++,this._alphaTest=t}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.dispersion&&(n.dispersion=this.dispersion),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!==Zm&&(n.blending=this.blending),this.side!==lc&&(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!==lk&&(n.blendSrc=this.blendSrc),this.blendDst!==ck&&(n.blendDst=this.blendDst),this.blendEquation!==Zh&&(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!==CC&&(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!==sg&&(n.stencilFail=this.stencilFail),this.stencilZFail!==sg&&(n.stencilZFail=this.stencilZFail),this.stencilZPass!==sg&&(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++}onBuild(){console.warn("Material: onBuild() has been removed.")}onBeforeRender(){console.warn("Material: onBeforeRender() has been removed.")}}class qi extends Fo{constructor(t){super(),this.isMeshBasicMaterial=!0,this.type="MeshBasicMaterial",this.color=new qe(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 rd,this.combine=SC,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 yr=new O,XC=new xe;class Hi{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=ea,this.version=0}onUploadCallback(){}set needsUpdate(t){!0===t&&this.version++}get updateRange(){return cg("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],d=[];for(let h=0,p=c.length;h0&&(r[l]=d,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 d=[],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))&&(j4.copy(s).invert(),rf.copy(t.ray).applyMatrix4(j4),(null===n.boundingBox||!1!==rf.intersectsBox(n.boundingBox))&&this._computeIntersections(t,e,rf)))}_computeIntersections(t,e,n){let r;const s=this.geometry,o=this.material,a=s.index,l=s.attributes.position,c=s.attributes.uv,d=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:nS.clone(),object:i}}(i,t,e,n,wg,Mg,Cg,tS);if(d){r&&(QC.fromBufferAttribute(r,a),JC.fromBufferAttribute(r,l),eS.fromBufferAttribute(r,c),d.uv=La.getInterpolation(tS,wg,Mg,Cg,QC,JC,eS,new xe)),s&&(QC.fromBufferAttribute(s,a),JC.fromBufferAttribute(s,l),eS.fromBufferAttribute(s,c),d.uv1=La.getInterpolation(tS,wg,Mg,Cg,QC,JC,eS,new xe)),o&&(q4.fromBufferAttribute(o,a),X4.fromBufferAttribute(o,l),K4.fromBufferAttribute(o,c),d.normal=La.getInterpolation(tS,wg,Mg,Cg,q4,X4,K4,new O),d.normal.dot(n.direction)>0&&d.normal.multiplyScalar(-1));const h={a,b:l,c,normal:new O,materialIndex:0};La.getNormal(wg,Mg,Cg,h.normal),d.face=h}return d}class sf 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=[],d=[],h=[];let p=0,m=0;function g(b,v,y,M,x,C,F,D,k,B,T){const A=C/k,W=F/B,ie=C/2,ne=F/2,oe=D/2,ge=k+1,q=B+1;let se=0,J=0;const we=new O;for(let Ve=0;Ve0?1:-1,d.push(we.x,we.y,we.z),h.push(Rt/k),h.push(1-Ve/B),se+=1}for(let Ve=0;Ve0&&(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 pP extends Fr{constructor(){super(),this.isCamera=!0,this.type="Camera",this.matrixWorldInverse=new Bt,this.projectionMatrix=new Bt,this.projectionMatrixInverse=new Bt,this.coordinateSystem=td}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 Tu=new O,J4=new xe,e5=new xe;class br extends pP{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*ag*Math.atan(e),this.updateProjectionMatrix()}getFocalLength(){const t=Math.tan(.5*ef*this.fov);return.5*this.getFilmHeight()/t}getEffectiveFOV(){return 2*ag*Math.atan(Math.tan(.5*ef*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){Tu.set(-1,-1,.5).applyMatrix4(this.projectionMatrixInverse),e.set(Tu.x,Tu.y).multiplyScalar(-t/Tu.z),Tu.set(1,1,.5).applyMatrix4(this.projectionMatrixInverse),n.set(Tu.x,Tu.y).multiplyScalar(-t/Tu.z)}getViewSize(t,e){return this.getViewBounds(t,J4,e5),e.subVectors(e5,J4)}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*ef*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 Iae extends Fr{constructor(t,e,n){super(),this.type="CubeCamera",this.renderTarget=n,this.coordinateSystem=null,this.activeMipmapLevel=0;const r=new br(-90,1,t,e);r.layers=this.layers,this.add(r);const s=new br(-90,1,t,e);s.layers=this.layers,this.add(s);const o=new br(-90,1,t,e);o.layers=this.layers,this.add(o);const a=new br(-90,1,t,e);a.layers=this.layers,this.add(a);const l=new br(-90,1,t,e);l.layers=this.layers,this.add(l);const c=new br(-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===td)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,d]=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,d),t.setRenderTarget(h,p,m),t.xr.enabled=g,n.texture.needsPMREMUpdate=!0}}class rS extends Oo{constructor(t,e,n,r,s,o,a,l,c,d){super(t=void 0!==t?t:[],e=void 0!==e?e:cc,n,r,s,o,a,l,c,d),this.isCubeTexture=!0,this.flipY=!1}get images(){return this.image}set images(t){this.image=t}}class Rae extends Mu{constructor(t=1,e={}){super(t,t,e),this.isWebGLCubeRenderTarget=!0;const n={width:t,height:t,depth:1};this.texture=new rS([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:cr}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 sf(5,5,5),s=new Sl({name:"CubemapFromEquirect",uniforms:Sg(n_uniforms),vertexShader:n_vertexShader,fragmentShader:n_fragmentShader,side:ko,blending:Jc});s.uniforms.tEquirect.value=e;const o=new Mn(r,s),a=e.minFilter;return e.minFilter===xl&&(e.minFilter=cr),new Iae(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 mP=new O,kae=new O,Pae=new wn;class af{constructor(t=new O(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=mP.subVectors(n,e).cross(kae.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(mP),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||Pae.getNormalMatrix(t),r=this.coplanarPoint(mP).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 lf=new zs,sS=new O;class oS{constructor(t=new af,e=new af,n=new af,r=new af,s=new af,o=new af){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=td){const n=this.planes,r=t.elements,s=r[0],o=r[1],a=r[2],l=r[3],c=r[4],d=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+d,v+g,C+M).normalize(),n[3].setComponents(l-o,p-d,v-g,C-M).normalize(),n[4].setComponents(l-a,p-h,v-b,C-x).normalize(),e===td)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(),lf.copy(t.boundingSphere).applyMatrix4(t.matrixWorld);else{const e=t.geometry;null===e.boundingSphere&&e.computeBoundingSphere(),lf.copy(e.boundingSphere).applyMatrix4(t.matrixWorld)}return this.intersectsSphere(lf)}intersectsSprite(t){return lf.center.set(0,0,0),lf.radius=.7071067811865476,lf.applyMatrix4(t.matrixWorld),this.intersectsSphere(lf)}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,sS.y=r.normal.y>0?t.max.y:t.min.y,sS.z=r.normal.z>0?t.max.z:t.min.z,r.distanceToPoint(sS)<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 t5(){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 Oae(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.isInterleavedBufferAttribute&&(a=a.data),a.isGLBufferAttribute){const d=t.get(a);return void((!d||d.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 ) || defined( USE_BATCHING_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 ) || defined( USE_BATCHING_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\n#ifdef USE_BATCHING_COLOR\n\tvec3 batchingColor = getBatchingColor( getIndirectIndex( gl_DrawID ) );\n\tvColor.xyz *= batchingColor.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}\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}",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_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\tfloat distanceFalloff = 1.0 / max( pow( lightDistance, decayExponent ), 0.01 );\n\tif ( cutoffDistance > 0.0 ) {\n\t\tdistanceFalloff *= pow2( saturate( 1.0 - pow4( lightDistance / cutoffDistance ) ) );\n\t}\n\treturn distanceFalloff;\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_DISPERSION\n\tmaterial.dispersion = dispersion;\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\tfloat dispersion;\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.shadowIntensity, 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.shadowIntensity, 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.shadowIntensity, 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 )\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\tfor ( int i = 0; i < MORPHTARGETS_COUNT; i ++ ) {\n\t\tif ( morphTargetInfluences[ i ] != 0.0 ) objectNormal += getMorph( gl_VertexID, i, 1 ).xyz * morphTargetInfluences[ i ];\n\t}\n#endif",morphtarget_pars_vertex:"#ifdef USE_MORPHTARGETS\n\t#ifndef USE_INSTANCING_MORPH\n\t\tuniform float morphTargetBaseInfluence;\n\t\tuniform float morphTargetInfluences[ MORPHTARGETS_COUNT ];\n\t#endif\n\tuniform sampler2DArray morphTargetsTexture;\n\tuniform ivec2 morphTargetsTextureSize;\n\tvec4 getMorph( const in int vertexIndex, const in int morphTargetIndex, const in int offset ) {\n\t\tint texelIndex = vertexIndex * MORPHTARGETS_TEXTURE_STRIDE + offset;\n\t\tint y = texelIndex / morphTargetsTextureSize.x;\n\t\tint x = texelIndex - y * morphTargetsTextureSize.x;\n\t\tivec3 morphUV = ivec3( x, y, morphTargetIndex );\n\t\treturn texelFetch( morphTargetsTexture, morphUV, 0 );\n\t}\n#endif",morphtarget_vertex:"#ifdef USE_MORPHTARGETS\n\ttransformed *= morphTargetBaseInfluence;\n\tfor ( int i = 0; i < MORPHTARGETS_COUNT; i ++ ) {\n\t\tif ( morphTargetInfluences[ i ] != 0.0 ) transformed += getMorph( gl_VertexID, i, 0 ).xyz * morphTargetInfluences[ i ];\n\t}\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.;const float ShiftRight8 = 1. / 256.;\nconst float Inv255 = 1. / 255.;\nconst vec4 PackFactors = vec4( 1.0, 256.0, 256.0 * 256.0, 256.0 * 256.0 * 256.0 );\nconst vec2 UnpackFactors2 = vec2( UnpackDownscale, 1.0 / PackFactors.g );\nconst vec3 UnpackFactors3 = vec3( UnpackDownscale / PackFactors.rg, 1.0 / PackFactors.b );\nconst vec4 UnpackFactors4 = vec4( UnpackDownscale / PackFactors.rgb, 1.0 / PackFactors.a );\nvec4 packDepthToRGBA( const in float v ) {\n\tif( v <= 0.0 )\n\t\treturn vec4( 0., 0., 0., 0. );\n\tif( v >= 1.0 )\n\t\treturn vec4( 1., 1., 1., 1. );\n\tfloat vuf;\n\tfloat af = modf( v * PackFactors.a, vuf );\n\tfloat bf = modf( vuf * ShiftRight8, vuf );\n\tfloat gf = modf( vuf * ShiftRight8, vuf );\n\treturn vec4( vuf * Inv255, gf * PackUpscale, bf * PackUpscale, af );\n}\nvec3 packDepthToRGB( const in float v ) {\n\tif( v <= 0.0 )\n\t\treturn vec3( 0., 0., 0. );\n\tif( v >= 1.0 )\n\t\treturn vec3( 1., 1., 1. );\n\tfloat vuf;\n\tfloat bf = modf( v * PackFactors.b, vuf );\n\tfloat gf = modf( vuf * ShiftRight8, vuf );\n\treturn vec3( vuf * Inv255, gf * PackUpscale, bf );\n}\nvec2 packDepthToRG( const in float v ) {\n\tif( v <= 0.0 )\n\t\treturn vec2( 0., 0. );\n\tif( v >= 1.0 )\n\t\treturn vec2( 1., 1. );\n\tfloat vuf;\n\tfloat gf = modf( v * 256., vuf );\n\treturn vec2( vuf * Inv255, gf );\n}\nfloat unpackRGBAToDepth( const in vec4 v ) {\n\treturn dot( v, UnpackFactors4 );\n}\nfloat unpackRGBToDepth( const in vec3 v ) {\n\treturn dot( v, UnpackFactors3 );\n}\nfloat unpackRGToDepth( const in vec2 v ) {\n\treturn v.r * UnpackFactors2.r + v.g * UnpackFactors2.g;\n}\nvec4 pack2HalfToRGBA( const in 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( const in 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 shadowIntensity;\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 shadowIntensity;\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 shadowIntensity;\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 shadowIntensity, 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 mix( 1.0, shadow, shadowIntensity );\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 shadowIntensity, 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 mix( 1.0, shadow, shadowIntensity );\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 shadowIntensity;\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 shadowIntensity;\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 shadowIntensity;\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.shadowIntensity, 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.shadowIntensity, 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.shadowIntensity, 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\tconst float StartCompression = 0.8 - 0.04;\n\tconst float 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, vec3( newPeak ), 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.dispersion, 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 dispersion, const in float ior, const in float thickness,\n\t\tconst in vec3 attenuationColor, const in float attenuationDistance ) {\n\t\tvec4 transmittedLight;\n\t\tvec3 transmittance;\n\t\t#ifdef USE_DISPERSION\n\t\t\tfloat halfSpread = ( ior - 1.0 ) * 0.025 * dispersion;\n\t\t\tvec3 iors = vec3( ior - halfSpread, ior, ior + halfSpread );\n\t\t\tfor ( int i = 0; i < 3; i ++ ) {\n\t\t\t\tvec3 transmissionRay = getVolumeTransmissionRay( n, v, thickness, iors[ i ], modelMatrix );\n\t\t\t\tvec3 refractedRayExit = position + transmissionRay;\n\t\t\n\t\t\t\tvec4 ndcPos = projMatrix * viewMatrix * vec4( refractedRayExit, 1.0 );\n\t\t\t\tvec2 refractionCoords = ndcPos.xy / ndcPos.w;\n\t\t\t\trefractionCoords += 1.0;\n\t\t\t\trefractionCoords /= 2.0;\n\t\t\n\t\t\t\tvec4 transmissionSample = getTransmissionSample( refractionCoords, roughness, iors[ i ] );\n\t\t\t\ttransmittedLight[ i ] = transmissionSample[ i ];\n\t\t\t\ttransmittedLight.a += transmissionSample.a;\n\t\t\t\ttransmittance[ i ] = diffuseColor[ i ] * volumeAttenuation( length( transmissionRay ), attenuationColor, attenuationDistance )[ i ];\n\t\t\t}\n\t\t\ttransmittedLight.a /= 3.0;\n\t\t\n\t\t#else\n\t\t\n\t\t\tvec3 transmissionRay = getVolumeTransmissionRay( n, v, thickness, ior, modelMatrix );\n\t\t\tvec3 refractedRayExit = position + transmissionRay;\n\t\t\tvec4 ndcPos = projMatrix * viewMatrix * vec4( refractedRayExit, 1.0 );\n\t\t\tvec2 refractionCoords = ndcPos.xy / ndcPos.w;\n\t\t\trefractionCoords += 1.0;\n\t\t\trefractionCoords /= 2.0;\n\t\t\ttransmittedLight = getTransmissionSample( refractionCoords, roughness, ior );\n\t\t\ttransmittance = diffuseColor * volumeAttenuation( length( transmissionRay ), attenuationColor, attenuationDistance );\n\t\t\n\t\t#endif\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#elif DEPTH_PACKING == 3202\n\t\tgl_FragColor = vec4( packDepthToRGB( fragCoordZ ), 1.0 );\n\t#elif DEPTH_PACKING == 3203\n\t\tgl_FragColor = vec4( packDepthToRG( fragCoordZ ), 0.0, 1.0 );\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_DISPERSION\n\tuniform float dispersion;\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}"},Je={common:{diffuse:{value:new qe(16777215)},opacity:{value:1},map:{value:null},mapTransform:{value:new wn},alphaMap:{value:null},alphaMapTransform:{value:new wn},alphaTest:{value:0}},specularmap:{specularMap:{value:null},specularMapTransform:{value:new wn}},envmap:{envMap:{value:null},envMapRotation:{value:new wn},flipEnvMap:{value:-1},reflectivity:{value:1},ior:{value:1.5},refractionRatio:{value:.98}},aomap:{aoMap:{value:null},aoMapIntensity:{value:1},aoMapTransform:{value:new wn}},lightmap:{lightMap:{value:null},lightMapIntensity:{value:1},lightMapTransform:{value:new wn}},bumpmap:{bumpMap:{value:null},bumpMapTransform:{value:new wn},bumpScale:{value:1}},normalmap:{normalMap:{value:null},normalMapTransform:{value:new wn},normalScale:{value:new xe(1,1)}},displacementmap:{displacementMap:{value:null},displacementMapTransform:{value:new wn},displacementScale:{value:1},displacementBias:{value:0}},emissivemap:{emissiveMap:{value:null},emissiveMapTransform:{value:new wn}},metalnessmap:{metalnessMap:{value:null},metalnessMapTransform:{value:new wn}},roughnessmap:{roughnessMap:{value:null},roughnessMapTransform:{value:new wn}},gradientmap:{gradientMap:{value:null}},fog:{fogDensity:{value:25e-5},fogNear:{value:1},fogFar:{value:2e3},fogColor:{value:new qe(16777215)}},lights:{ambientLightColor:{value:[]},lightProbe:{value:[]},directionalLights:{value:[],properties:{direction:{},color:{}}},directionalLightShadows:{value:[],properties:{shadowIntensity:1,shadowBias:{},shadowNormalBias:{},shadowRadius:{},shadowMapSize:{}}},directionalShadowMap:{value:[]},directionalShadowMatrix:{value:[]},spotLights:{value:[],properties:{color:{},position:{},direction:{},distance:{},coneCos:{},penumbraCos:{},decay:{}}},spotLightShadows:{value:[],properties:{shadowIntensity:1,shadowBias:{},shadowNormalBias:{},shadowRadius:{},shadowMapSize:{}}},spotLightMap:{value:[]},spotShadowMap:{value:[]},spotLightMatrix:{value:[]},pointLights:{value:[],properties:{color:{},position:{},decay:{},distance:{}}},pointLightShadows:{value:[],properties:{shadowIntensity:1,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 qe(16777215)},opacity:{value:1},size:{value:1},scale:{value:1},map:{value:null},alphaMap:{value:null},alphaMapTransform:{value:new wn},alphaTest:{value:0},uvTransform:{value:new wn}},sprite:{diffuse:{value:new qe(16777215)},opacity:{value:1},center:{value:new xe(.5,.5)},rotation:{value:0},map:{value:null},mapTransform:{value:new wn},alphaMap:{value:null},alphaMapTransform:{value:new wn},alphaTest:{value:0}}},dc={basic:{uniforms:po([Je.common,Je.specularmap,Je.envmap,Je.aomap,Je.lightmap,Je.fog]),vertexShader:Cn.meshbasic_vert,fragmentShader:Cn.meshbasic_frag},lambert:{uniforms:po([Je.common,Je.specularmap,Je.envmap,Je.aomap,Je.lightmap,Je.emissivemap,Je.bumpmap,Je.normalmap,Je.displacementmap,Je.fog,Je.lights,{emissive:{value:new qe(0)}}]),vertexShader:Cn.meshlambert_vert,fragmentShader:Cn.meshlambert_frag},phong:{uniforms:po([Je.common,Je.specularmap,Je.envmap,Je.aomap,Je.lightmap,Je.emissivemap,Je.bumpmap,Je.normalmap,Je.displacementmap,Je.fog,Je.lights,{emissive:{value:new qe(0)},specular:{value:new qe(1118481)},shininess:{value:30}}]),vertexShader:Cn.meshphong_vert,fragmentShader:Cn.meshphong_frag},standard:{uniforms:po([Je.common,Je.envmap,Je.aomap,Je.lightmap,Je.emissivemap,Je.bumpmap,Je.normalmap,Je.displacementmap,Je.roughnessmap,Je.metalnessmap,Je.fog,Je.lights,{emissive:{value:new qe(0)},roughness:{value:1},metalness:{value:0},envMapIntensity:{value:1}}]),vertexShader:Cn.meshphysical_vert,fragmentShader:Cn.meshphysical_frag},toon:{uniforms:po([Je.common,Je.aomap,Je.lightmap,Je.emissivemap,Je.bumpmap,Je.normalmap,Je.displacementmap,Je.gradientmap,Je.fog,Je.lights,{emissive:{value:new qe(0)}}]),vertexShader:Cn.meshtoon_vert,fragmentShader:Cn.meshtoon_frag},matcap:{uniforms:po([Je.common,Je.bumpmap,Je.normalmap,Je.displacementmap,Je.fog,{matcap:{value:null}}]),vertexShader:Cn.meshmatcap_vert,fragmentShader:Cn.meshmatcap_frag},points:{uniforms:po([Je.points,Je.fog]),vertexShader:Cn.points_vert,fragmentShader:Cn.points_frag},dashed:{uniforms:po([Je.common,Je.fog,{scale:{value:1},dashSize:{value:1},totalSize:{value:2}}]),vertexShader:Cn.linedashed_vert,fragmentShader:Cn.linedashed_frag},depth:{uniforms:po([Je.common,Je.displacementmap]),vertexShader:Cn.depth_vert,fragmentShader:Cn.depth_frag},normal:{uniforms:po([Je.common,Je.bumpmap,Je.normalmap,Je.displacementmap,{opacity:{value:1}}]),vertexShader:Cn.meshnormal_vert,fragmentShader:Cn.meshnormal_frag},sprite:{uniforms:po([Je.sprite,Je.fog]),vertexShader:Cn.sprite_vert,fragmentShader:Cn.sprite_frag},background:{uniforms:{uvTransform:{value:new wn},t2D:{value:null},backgroundIntensity:{value:1}},vertexShader:Cn.background_vert,fragmentShader:Cn.background_frag},backgroundCube:{uniforms:{envMap:{value:null},flipEnvMap:{value:-1},backgroundBlurriness:{value:0},backgroundIntensity:{value:1},backgroundRotation:{value:new wn}},vertexShader:Cn.backgroundCube_vert,fragmentShader:Cn.backgroundCube_frag},cube:{uniforms:{tCube:{value:null},tFlip:{value:-1},opacity:{value:1}},vertexShader:Cn.cube_vert,fragmentShader:Cn.cube_frag},equirect:{uniforms:{tEquirect:{value:null}},vertexShader:Cn.equirect_vert,fragmentShader:Cn.equirect_frag},distanceRGBA:{uniforms:po([Je.common,Je.displacementmap,{referencePosition:{value:new O},nearDistance:{value:1},farDistance:{value:1e3}}]),vertexShader:Cn.distanceRGBA_vert,fragmentShader:Cn.distanceRGBA_frag},shadow:{uniforms:po([Je.lights,Je.fog,{color:{value:new qe(0)},opacity:{value:1}}]),vertexShader:Cn.shadow_vert,fragmentShader:Cn.shadow_frag}};dc.physical={uniforms:po([dc.standard.uniforms,{clearcoat:{value:0},clearcoatMap:{value:null},clearcoatMapTransform:{value:new wn},clearcoatNormalMap:{value:null},clearcoatNormalMapTransform:{value:new wn},clearcoatNormalScale:{value:new xe(1,1)},clearcoatRoughness:{value:0},clearcoatRoughnessMap:{value:null},clearcoatRoughnessMapTransform:{value:new wn},dispersion:{value:0},iridescence:{value:0},iridescenceMap:{value:null},iridescenceMapTransform:{value:new wn},iridescenceIOR:{value:1.3},iridescenceThicknessMinimum:{value:100},iridescenceThicknessMaximum:{value:400},iridescenceThicknessMap:{value:null},iridescenceThicknessMapTransform:{value:new wn},sheen:{value:0},sheenColor:{value:new qe(0)},sheenColorMap:{value:null},sheenColorMapTransform:{value:new wn},sheenRoughness:{value:1},sheenRoughnessMap:{value:null},sheenRoughnessMapTransform:{value:new wn},transmission:{value:0},transmissionMap:{value:null},transmissionMapTransform:{value:new wn},transmissionSamplerSize:{value:new xe},transmissionSamplerMap:{value:null},thickness:{value:0},thicknessMap:{value:null},thicknessMapTransform:{value:new wn},attenuationDistance:{value:0},attenuationColor:{value:new qe(0)},specularColor:{value:new qe(1,1,1)},specularColorMap:{value:null},specularColorMapTransform:{value:new wn},specularIntensity:{value:1},specularIntensityMap:{value:null},specularIntensityMapTransform:{value:new wn},anisotropyVector:{value:new xe},anisotropyMap:{value:null},anisotropyMapTransform:{value:new wn}}]),vertexShader:Cn.meshphysical_vert,fragmentShader:Cn.meshphysical_frag};const aS={r:0,b:0,g:0},cf=new rd,Oce=new Bt;function Fce(i,t,e,n,r,s,o){const a=new qe(0);let c,d,l=!0===s?0:1,h=null,p=0,m=null;function g(M){let x=!0===M.isScene?M.background:null;return x&&x.isTexture&&(x=(M.backgroundBlurriness>0?e:t).get(x)),x}function y(M,x){M.getRGB(aS,Z4(i)),n.buffers.color.setClear(aS.r,aS.g,aS.b,x,o)}return{getClearColor:function(){return a},setClearColor:function(M,x=1){a.set(M),l=x,y(a,l)},getClearAlpha:function(){return l},setClearAlpha:function(M){l=M,y(a,l)},render:function b(M){let x=!1;const C=g(M);null===C?y(a,l):C&&C.isColor&&(y(C,1),x=!0);const F=i.xr.getEnvironmentBlendMode();"additive"===F?n.buffers.color.setClear(0,0,0,1,o):"alpha-blend"===F&&n.buffers.color.setClear(0,0,0,0,o),(i.autoClear||x)&&(n.buffers.depth.setTest(!0),n.buffers.depth.setMask(!0),n.buffers.color.setMask(!0),i.clear(i.autoClearColor,i.autoClearDepth,i.autoClearStencil))},addToRenderList:function v(M,x){const C=g(x);C&&(C.isCubeTexture||C.mapping===gb)?(void 0===d&&(d=new Mn(new sf(1,1,1),new Sl({name:"BackgroundCubeMaterial",uniforms:Sg(dc.backgroundCube.uniforms),vertexShader:dc.backgroundCube.vertexShader,fragmentShader:dc.backgroundCube.fragmentShader,side:ko,depthTest:!1,depthWrite:!1,fog:!1})),d.geometry.deleteAttribute("normal"),d.geometry.deleteAttribute("uv"),d.onBeforeRender=function(F,D,k){this.matrixWorld.copyPosition(k.matrixWorld)},Object.defineProperty(d.material,"envMap",{get:function(){return this.uniforms.envMap.value}}),r.update(d)),cf.copy(x.backgroundRotation),cf.x*=-1,cf.y*=-1,cf.z*=-1,C.isCubeTexture&&!1===C.isRenderTargetTexture&&(cf.y*=-1,cf.z*=-1),d.material.uniforms.envMap.value=C,d.material.uniforms.flipEnvMap.value=C.isCubeTexture&&!1===C.isRenderTargetTexture?-1:1,d.material.uniforms.backgroundBlurriness.value=x.backgroundBlurriness,d.material.uniforms.backgroundIntensity.value=x.backgroundIntensity,d.material.uniforms.backgroundRotation.value.setFromMatrix4(Oce.makeRotationFromEuler(cf)),d.material.toneMapped=ei.getTransfer(C.colorSpace)!==Fi,(h!==C||p!==C.version||m!==i.toneMapping)&&(d.material.needsUpdate=!0,h=C,p=C.version,m=i.toneMapping),d.layers.enableAll(),M.unshift(d,d.geometry,d.material,0,0,null)):C&&C.isTexture&&(void 0===c&&(c=new Mn(new Iu(2,2),new Sl({name:"BackgroundMaterial",uniforms:Sg(dc.background.uniforms),vertexShader:dc.background.vertexShader,fragmentShader:dc.background.fragmentShader,side:lc,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=C,c.material.uniforms.backgroundIntensity.value=x.backgroundIntensity,c.material.toneMapped=ei.getTransfer(C.colorSpace)!==Fi,!0===C.matrixAutoUpdate&&C.updateMatrix(),c.material.uniforms.uvTransform.value.copy(C.matrix),(h!==C||p!==C.version||m!==i.toneMapping)&&(c.material.needsUpdate=!0,h=C,p=C.version,m=i.toneMapping),c.layers.enableAll(),M.unshift(c,c.geometry,c.material,0,0,null))}}}function Lce(i,t){const e=i.getParameter(i.MAX_VERTEX_ATTRIBS),n={},r=p(null);let s=r,o=!1;function c(A){return i.bindVertexArray(A)}function d(A){return i.deleteVertexArray(A)}function p(A){const W=[],ie=[],ne=[];for(let oe=0;oe=0){const Ve=oe[J];let Ye=ge[J];if(void 0===Ye&&("instanceMatrix"===J&&A.instanceMatrix&&(Ye=A.instanceMatrix),"instanceColor"===J&&A.instanceColor&&(Ye=A.instanceColor)),void 0===Ve||Ve.attribute!==Ye||Ye&&Ve.data!==Ye.data)return!0;q++}return s.attributesNum!==q||s.index!==ne}(A,ne,ie,oe),ge&&function g(A,W,ie,ne){const oe={},ge=W.attributes;let q=0;const se=ie.getAttributes();for(const J in se)if(se[J].location>=0){let Ve=ge[J];void 0===Ve&&("instanceMatrix"===J&&A.instanceMatrix&&(Ve=A.instanceMatrix),"instanceColor"===J&&A.instanceColor&&(Ve=A.instanceColor));const Ye={};Ye.attribute=Ve,Ve&&Ve.data&&(Ye.data=Ve.data),oe[J]=Ye,q++}s.attributes=oe,s.attributesNum=q,s.index=ne}(A,ne,ie,oe),null!==oe&&t.update(oe,i.ELEMENT_ARRAY_BUFFER),(ge||o)&&(o=!1,function C(A,W,ie,ne){b();const oe=ne.attributes,ge=ie.getAttributes(),q=W.defaultAttributeValues;for(const se in ge){const J=ge[se];if(J.location>=0){let we=oe[se];if(void 0===we&&("instanceMatrix"===se&&A.instanceMatrix&&(we=A.instanceMatrix),"instanceColor"===se&&A.instanceColor&&(we=A.instanceColor)),void 0!==we){const Ve=we.normalized,Ye=we.itemSize,Rt=t.get(we);if(void 0===Rt)continue;const nn=Rt.buffer,le=Rt.type,Fe=Rt.bytesPerElement,Ze=le===i.INT||le===i.UNSIGNED_INT||we.gpuType===hk;if(we.isInterleavedBufferAttribute){const Le=we.data,wt=Le.stride,Tt=we.offset;if(Le.isInstancedInterleavedBuffer){for(let St=0;St0&&i.getShaderPrecisionFormat(i.FRAGMENT_SHADER,i.HIGH_FLOAT).precision>0)return"highp";D="mediump"}return"mediump"===D&&i.getShaderPrecisionFormat(i.VERTEX_SHADER,i.MEDIUM_FLOAT).precision>0&&i.getShaderPrecisionFormat(i.FRAGMENT_SHADER,i.MEDIUM_FLOAT).precision>0?"mediump":"lowp"}let c=void 0!==e.precision?e.precision:"highp";const d=l(c);d!==c&&(console.warn("THREE.WebGLRenderer:",c,"not supported, using",d,"instead."),c=d);const h=!0===e.logarithmicDepthBuffer,p=i.getParameter(i.MAX_TEXTURE_IMAGE_UNITS),m=i.getParameter(i.MAX_VERTEX_TEXTURE_IMAGE_UNITS);return{isWebGL2:!0,getMaxAnisotropy:function s(){if(void 0!==r)return r;if(!0===t.has("EXT_texture_filter_anisotropic")){const D=t.get("EXT_texture_filter_anisotropic");r=i.getParameter(D.MAX_TEXTURE_MAX_ANISOTROPY_EXT)}else r=0;return r},getMaxPrecision:l,textureFormatReadable:function o(D){return!(D!==Po&&n.convert(D)!==i.getParameter(i.IMPLEMENTATION_COLOR_READ_FORMAT))},textureTypeReadable:function a(D){const k=D===Jm&&(t.has("EXT_color_buffer_half_float")||t.has("EXT_color_buffer_float"));return!(D!==ed&&n.convert(D)!==i.getParameter(i.IMPLEMENTATION_COLOR_READ_TYPE)&&D!==ea&&!k)},precision:c,logarithmicDepthBuffer:h,maxTextures:p,maxVertexTextures:m,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:m>0,maxSamples:i.getParameter(i.MAX_SAMPLES)}}function Uce(i){const t=this;let e=null,n=0,r=!1,s=!1;const o=new af,a=new wn,l={value:null,needsUpdate:!1};function d(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=d(g,p,x,m);for(let F=0;F!==x;++F)C[F]=e[F];y.clippingState=C,this.numIntersection=b?this.numPlanes:0,this.numPlanes+=M}}}function Vce(i){let t=new WeakMap;function e(o,a){return a===EC?o.mapping=cc:a===AC&&(o.mapping=Qh),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===EC||a===AC){if(t.has(o))return e(t.get(o).texture,o.mapping);{const l=o.image;if(l&&l.height>0){const c=new Rae(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 Rb extends pP{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,d=(this.top-this.bottom)/this.view.fullHeight/this.zoom;s+=c*this.view.offsetX,o=s+c*this.view.width,a-=d*this.view.offsetY,l=a-d*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 n5=[.125,.215,.35,.446,.526,.582],gP=new Rb,r5=new qe;let _P=null,vP=0,yP=0,bP=!1;const uf=(1+Math.sqrt(5))/2,Tg=1/uf,s5=[new O(-uf,Tg,0),new O(uf,Tg,0),new O(-Tg,0,uf),new O(Tg,0,uf),new O(0,uf,-Tg),new O(0,uf,Tg),new O(-1,1,-1),new O(1,1,-1),new O(-1,1,1),new O(1,1,1)];class o5{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){_P=this._renderer.getRenderTarget(),vP=this._renderer.getActiveCubeFace(),yP=this._renderer.getActiveMipmapLevel(),bP=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=c5(),this._compileMaterial(this._cubemapMaterial))}compileEquirectangularShader(){null===this._equirectMaterial&&(this._equirectMaterial=l5(),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=n5[o-i+4-1]:0===o&&(l=0),n.push(l);const c=1/(a-2),d=-c,h=1+c,p=[d,d,h,d,h,h,d,d,h,h,d,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 D=0;D2?0:-1;M.set([k,B,0,k+2/3,B,0,k+2/3,B+1,0,k,B,0,k+2/3,B+1,0,k,B+1,0],b*g*D),x.set(p,v*g*D),C.set([D,D,D,D,D,D],y*g*D)}const F=new hn;F.setAttribute("position",new Hi(M,b)),F.setAttribute("uv",new Hi(x,v)),F.setAttribute("faceIndex",new Hi(C,y)),t.push(F),r>4&&r--}return{lodPlanes:t,sizeLods:e,sigmas:n}}(s)),this._blurMaterial=function Hce(i,t,e){const n=new Float32Array(20),r=new O(0,1,0);return new Sl({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:Jc,depthTest:!1,depthWrite:!1})}(s,t,e)}return r}_compileMaterial(t){const e=new Mn(this._lodPlanes[0],t);this._renderer.compile(e,gP)}_sceneToCubeUV(t,e,n,r){const a=new br(90,1,e,n),l=[1,-1,1,1,1,1],c=[1,1,1,-1,-1,-1],d=this._renderer,h=d.autoClear,p=d.toneMapping;d.getClearColor(r5),d.toneMapping=bu,d.autoClear=!1;const m=new qi({name:"PMREM.Background",side:ko,depthWrite:!1,depthTest:!1}),g=new Mn(new sf,m);let b=!1;const v=t.background;v?v.isColor&&(m.color.copy(v),t.background=null,b=!0):(m.color.copy(r5),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;lS(r,M*x,y>2?x:0,x,x),d.setRenderTarget(r),b&&d.render(g,a),d.render(t,a)}g.geometry.dispose(),g.material.dispose(),d.toneMapping=p,d.autoClear=h,t.background=v}_textureToCubeUV(t,e){const n=this._renderer,r=t.mapping===cc||t.mapping===Qh;r?(null===this._cubemapMaterial&&(this._cubemapMaterial=c5()),this._cubemapMaterial.uniforms.flipEnvMap.value=!1===t.isRenderTargetTexture?-1:1):null===this._equirectMaterial&&(this._equirectMaterial=l5());const s=r?this._cubemapMaterial:this._equirectMaterial,o=new Mn(this._lodPlanes[0],s);s.uniforms.envMap.value=t;const l=this._cubeSize;lS(e,0,0,3*l,2*l),n.setRenderTarget(e),n.render(o,gP)}_applyPMREM(t){const e=this._renderer,n=e.autoClear;e.autoClear=!1;const r=this._lodPlanes.length;for(let s=1;s20&&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 k=0;k<20;++k){const B=k/b,T=Math.exp(-B*B/2);y.push(T),0===k?M+=T:kx-4?r-x+4:0),4*(this._cubeSize-C),3*C,2*C),l.setRenderTarget(e),l.render(h,gP)}}function a5(i,t,e){const n=new Mu(i,t,e);return n.texture.mapping=gb,n.texture.name="PMREM.cubeUv",n.scissorTest=!0,n}function lS(i,t,e,n,r){i.viewport.set(t,e,n,r),i.scissor.set(t,e,n,r)}function l5(){return new Sl({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:Jc,depthTest:!1,depthWrite:!1})}function c5(){return new Sl({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:Jc,depthTest:!1,depthWrite:!1})}function $ce(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===EC||l===AC,d=l===cc||l===Qh;if(c||d){let h=t.get(a);if(a.isRenderTargetTexture&&a.pmremVersion!==(void 0!==h?h.texture.pmremVersion:0))return null===e&&(e=new o5(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||d&&m&&function r(a){let l=0;for(let d=0;d<6;d++)void 0!==a[d]&&l++;return 6===l}(m)?(null===e&&(e=new o5(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 Gce(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&&cg("THREE.WebGLRenderer: "+n+" extension not supported."),r}}}function Wce(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&&(F=Math.ceil(C/t.maxTextureSize),C=t.maxTextureSize);const D=new Float32Array(C*F*4*h),k=new Qk(D,C,F,h);k.type=ea,k.needsUpdate=!0;const B=4*x;for(let A=0;A0)return i;const r=t*e;let s=g5[r];if(void 0===s&&(s=new Float32Array(r),g5[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 Lr(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 Gde(i,t){const e=function $de(i){const t=ei.getPrimaries(ei.workingColorSpace),e=ei.getPrimaries(i);let n;switch(t===e?n="":t===BC&&e===NC?n="LinearDisplayP3ToLinearSRGB":t===NC&&e===BC&&(n="LinearSRGBToLinearDisplayP3"),i){case ds:case FC:return[n,"LinearTransferOETF"];case cs:case Yk: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 Wde(i,t){let e;switch(t){case Moe:e="Linear";break;case Coe:e="Reinhard";break;case Soe:e="OptimizedCineon";break;case Eoe:e="ACESFilmic";break;case Doe:e="AgX";break;case Toe:e="Neutral";break;case Aoe:e="Custom";break;default:console.warn("THREE.WebGLProgram: Unsupported toneMapping:",t),e="Linear"}return"vec3 "+i+"( vec3 color ) { return "+e+"ToneMapping( color ); }"}const uS=new O;function kb(i){return""!==i}function C5(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 S5(i,t){return i.replace(/NUM_CLIPPING_PLANES/g,t.numClippingPlanes).replace(/UNION_CLIPPING_PLANES/g,t.numClippingPlanes-t.numClipIntersection)}const Kde=/^[ \t]*#include +<([\w\d./]+)>/gm;function MP(i){return i.replace(Kde,Qde)}const Zde=new Map;function Qde(i,t){let e=Cn[t];if(void 0===e){const n=Zde.get(t);if(void 0===n)throw new Error("Can not resolve #include <"+t+">");e=Cn[n],console.warn('THREE.WebGLRenderer: Shader chunk "%s" has been deprecated. Use "%s" instead.',t,n)}return MP(e)}const Jde=/#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 E5(i){return i.replace(Jde,eue)}function eue(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(kb).join("\n"),y.length>0&&(y+="\n")):(v=[A5(e),"#define SHADER_TYPE "+e.shaderType,"#define SHADER_NAME "+e.shaderName,g,e.extensionClipCullDistance?"#define USE_CLIP_DISTANCE":"",e.batching?"#define USE_BATCHING":"",e.batchingColor?"#define USE_BATCHING_COLOR":"",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 "+d:"",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_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.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","#ifdef USE_SKINNING","\tattribute vec4 skinIndex;","\tattribute vec4 skinWeight;","#endif","\n"].filter(kb).join("\n"),y=[A5(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 "+d:"",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.dispersion?"#define USE_DISPERSION":"",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||e.batchingColor?"#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.decodeVideoTexture?"#define DECODE_VIDEO_TEXTURE":"",e.logarithmicDepthBuffer?"#define USE_LOGDEPTHBUF":"","uniform mat4 viewMatrix;","uniform vec3 cameraPosition;","uniform bool isOrthographic;",e.toneMapping!==bu?"#define TONE_MAPPING":"",e.toneMapping!==bu?Cn.tonemapping_pars_fragment:"",e.toneMapping!==bu?Wde("toneMapping",e.toneMapping):"",e.dithering?"#define DITHERING":"",e.opaque?"#define OPAQUE":"",Cn.colorspace_pars_fragment,Gde("linearToOutputTexel",e.outputColorSpace),(ei.getLuminanceCoefficients(uS),["float luminance( const in vec3 rgb ) {",`\tconst vec3 weights = vec3( ${uS.x.toFixed(4)}, ${uS.y.toFixed(4)}, ${uS.z.toFixed(4)} );`,"\treturn dot( weights, rgb );","}"].join("\n")),e.useDepthPacking?"#define DEPTH_PACKING "+e.depthPacking:"","\n"].filter(kb).join("\n")),o=MP(o),o=C5(o,e),o=S5(o,e),a=MP(a),a=C5(a,e),a=S5(a,e),o=E5(o),a=E5(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===A4?"":"layout(location = 0) out highp vec4 pc_fragColor;",e.glslVersion===A4?"":"#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,F=w5(r,r.VERTEX_SHADER,M+v+o),D=w5(r,r.FRAGMENT_SHADER,C);function k(W){if(i.debug.checkShaderErrors){const ie=r.getProgramInfoLog(b).trim(),ne=r.getShaderInfoLog(F).trim(),oe=r.getShaderInfoLog(D).trim();let ge=!0,q=!0;if(!1===r.getProgramParameter(b,r.LINK_STATUS))if(ge=!1,"function"==typeof i.debug.onShaderError)i.debug.onShaderError(r,b,F,D);else{const se=M5(r,F,"vertex"),J=M5(r,D,"fragment");console.error("THREE.WebGLProgram: Shader Error "+r.getError()+" - VALIDATE_STATUS "+r.getProgramParameter(b,r.VALIDATE_STATUS)+"\n\nMaterial Name: "+W.name+"\nMaterial Type: "+W.type+"\n\nProgram Info Log: "+ie+"\n"+se+"\n"+J)}else""!==ie?console.warn("THREE.WebGLProgram: Program Info Log:",ie):(""===ne||""===oe)&&(q=!1);q&&(W.diagnostics={runnable:ge,programLog:ie,vertexShader:{log:ne,prefix:v},fragmentShader:{log:oe,prefix:y}})}r.deleteShader(F),r.deleteShader(D),B=new dS(r,b),T=function Xde(i,t){const e={},n=i.getProgramParameter(t,i.ACTIVE_ATTRIBUTES);for(let r=0;r0,de=T.clearcoat>0,De=T.iridescence>0,Ae=T.sheen>0,Ut=T.transmission>0,et=R&&!!T.anisotropyMap,pt=de&&!!T.clearcoatMap,bn=de&&!!T.clearcoatNormalMap,He=de&&!!T.clearcoatRoughnessMap,ft=De&&!!T.iridescenceMap,Yn=De&&!!T.iridescenceThicknessMap,cn=Ae&&!!T.sheenColorMap,yt=Ae&&!!T.sheenRoughnessMap,vn=!!T.specularMap,Pn=!!T.specularColorMap,Ki=!!T.specularIntensityMap,Z=Ut&&!!T.transmissionMap,We=Ut&&!!T.thicknessMap,Ee=!!T.alphaMap,ti=!!T.extensions;let xr=bu;T.toneMapped&&(null===Le||!0===Le.isXRRenderTarget)&&(xr=i.toneMapping);const hs={shaderID:we,shaderType:T.type,shaderName:T.name,vertexShader:nn,fragmentShader:le,defines:T.defines,customVertexShaderID:Fe,customFragmentShaderID:Ze,isRawShaderMaterial:!0===T.isRawShaderMaterial,glslVersion:T.glslVersion,precision:m,batching:Tt,batchingColor:Tt&&null!==ne._colorsTexture,instancing:wt,instancingColor:wt&&null!==ne.instanceColor,instancingMorph:wt&&null!==ne.morphTexture,supportsVertexTextures:p,outputColorSpace:null===Le?i.outputColorSpace:!0===Le.isXRRenderTarget?Le.texture.colorSpace:ds,alphaToCoverage:!!T.alphaToCoverage,map:St,matcap:!!T.matcap,envMap:N,envMapMode:N&&se.mapping,envMapCubeUVHeight:J,aoMap:Ge,lightMap:Ne,bumpMap:it,normalMap:Me,displacementMap:p&&Gt,emissiveMap:rt,normalMapObjectSpace:Me&&T.normalMapType===Noe,normalMapTangentSpace:Me&&T.normalMapType===Jh,metalnessMap:_t,roughnessMap:H,anisotropy:R,anisotropyMap:et,clearcoat:de,clearcoatMap:pt,clearcoatNormalMap:bn,clearcoatRoughnessMap:He,dispersion:T.dispersion>0,iridescence:De,iridescenceMap:ft,iridescenceThicknessMap:Yn,sheen:Ae,sheenColorMap:cn,sheenRoughnessMap:yt,specularMap:vn,specularColorMap:Pn,specularIntensityMap:Ki,transmission:Ut,transmissionMap:Z,thicknessMap:We,gradientMap:!!T.gradientMap,opaque:!1===T.transparent&&T.blending===Zm&&!1===T.alphaToCoverage,alphaMap:Ee,alphaTest:T.alphaTest>0,alphaHash:!!T.alphaHash,combine:T.combine,mapUv:St&&b(T.map.channel),aoMapUv:Ge&&b(T.aoMap.channel),lightMapUv:Ne&&b(T.lightMap.channel),bumpMapUv:it&&b(T.bumpMap.channel),normalMapUv:Me&&b(T.normalMap.channel),displacementMapUv:Gt&&b(T.displacementMap.channel),emissiveMapUv:rt&&b(T.emissiveMap.channel),metalnessMapUv:_t&&b(T.metalnessMap.channel),roughnessMapUv:H&&b(T.roughnessMap.channel),anisotropyMapUv:et&&b(T.anisotropyMap.channel),clearcoatMapUv:pt&&b(T.clearcoatMap.channel),clearcoatNormalMapUv:bn&&b(T.clearcoatNormalMap.channel),clearcoatRoughnessMapUv:He&&b(T.clearcoatRoughnessMap.channel),iridescenceMapUv:ft&&b(T.iridescenceMap.channel),iridescenceThicknessMapUv:Yn&&b(T.iridescenceThicknessMap.channel),sheenColorMapUv:cn&&b(T.sheenColorMap.channel),sheenRoughnessMapUv:yt&&b(T.sheenRoughnessMap.channel),specularMapUv:vn&&b(T.specularMap.channel),specularColorMapUv:Pn&&b(T.specularColorMap.channel),specularIntensityMapUv:Ki&&b(T.specularIntensityMap.channel),transmissionMapUv:Z&&b(T.transmissionMap.channel),thicknessMapUv:We&&b(T.thicknessMap.channel),alphaMapUv:Ee&&b(T.alphaMap.channel),vertexTangents:!!ge.attributes.tangent&&(Me||R),vertexColors:T.vertexColors,vertexAlphas:!0===T.vertexColors&&!!ge.attributes.color&&4===ge.attributes.color.itemSize,pointsUvs:!0===ne.isPoints&&!!ge.attributes.uv&&(St||Ee),fog:!!oe,useFog:!0===T.fog,fogExp2:!!oe&&oe.isFogExp2,flatShading:!0===T.flatShading,sizeAttenuation:!0===T.sizeAttenuation,logarithmicDepthBuffer:h,skinning:!0===ne.isSkinnedMesh,morphTargets:void 0!==ge.morphAttributes.position,morphNormals:void 0!==ge.morphAttributes.normal,morphColors:void 0!==ge.morphAttributes.color,morphTargetsCount:Ye,morphTextureStride:Rt,numDirLights:A.directional.length,numPointLights:A.point.length,numSpotLights:A.spot.length,numSpotLightMaps:A.spotLightMap.length,numRectAreaLights:A.rectArea.length,numHemiLights:A.hemi.length,numDirLightShadows:A.directionalShadowMap.length,numPointLightShadows:A.pointShadowMap.length,numSpotLightShadows:A.spotShadowMap.length,numSpotLightShadowsWithMaps:A.numSpotLightShadowsWithMaps,numLightProbes:A.numLightProbes,numClippingPlanes:o.numPlanes,numClipIntersection:o.numIntersection,dithering:T.dithering,shadowMapEnabled:i.shadowMap.enabled&&W.length>0,shadowMapType:i.shadowMap.type,toneMapping:xr,decodeVideoTexture:St&&!0===T.map.isVideoTexture&&ei.getTransfer(T.map.colorSpace)===Fi,premultipliedAlpha:T.premultipliedAlpha,doubleSided:T.side===Ns,flipSided:T.side===ko,useDepthPacking:T.depthPacking>=0,depthPacking:T.depthPacking||0,index0AttributeName:T.index0AttributeName,extensionClipCullDistance:ti&&!0===T.extensions.clipCullDistance&&n.has("WEBGL_clip_cull_distance"),extensionMultiDraw:(ti&&!0===T.extensions.multiDraw||Tt)&&n.has("WEBGL_multi_draw"),rendererExtensionParallelShaderCompile:n.has("KHR_parallel_shader_compile"),customProgramCacheKey:T.customProgramCacheKey()};return hs.vertexUv1s=c.has(1),hs.vertexUv2s=c.has(2),hs.vertexUv3s=c.has(3),c.clear(),hs},getProgramCacheKey:function y(T){const A=[];if(T.shaderID?A.push(T.shaderID):(A.push(T.customVertexShaderID),A.push(T.customFragmentShaderID)),void 0!==T.defines)for(const W in T.defines)A.push(W),A.push(T.defines[W]);return!1===T.isRawShaderMaterial&&(function M(T,A){T.push(A.precision),T.push(A.outputColorSpace),T.push(A.envMapMode),T.push(A.envMapCubeUVHeight),T.push(A.mapUv),T.push(A.alphaMapUv),T.push(A.lightMapUv),T.push(A.aoMapUv),T.push(A.bumpMapUv),T.push(A.normalMapUv),T.push(A.displacementMapUv),T.push(A.emissiveMapUv),T.push(A.metalnessMapUv),T.push(A.roughnessMapUv),T.push(A.anisotropyMapUv),T.push(A.clearcoatMapUv),T.push(A.clearcoatNormalMapUv),T.push(A.clearcoatRoughnessMapUv),T.push(A.iridescenceMapUv),T.push(A.iridescenceThicknessMapUv),T.push(A.sheenColorMapUv),T.push(A.sheenRoughnessMapUv),T.push(A.specularMapUv),T.push(A.specularColorMapUv),T.push(A.specularIntensityMapUv),T.push(A.transmissionMapUv),T.push(A.thicknessMapUv),T.push(A.combine),T.push(A.fogExp2),T.push(A.sizeAttenuation),T.push(A.morphTargetsCount),T.push(A.morphAttributeCount),T.push(A.numDirLights),T.push(A.numPointLights),T.push(A.numSpotLights),T.push(A.numSpotLightMaps),T.push(A.numHemiLights),T.push(A.numRectAreaLights),T.push(A.numDirLightShadows),T.push(A.numPointLightShadows),T.push(A.numSpotLightShadows),T.push(A.numSpotLightShadowsWithMaps),T.push(A.numLightProbes),T.push(A.shadowMapType),T.push(A.toneMapping),T.push(A.numClippingPlanes),T.push(A.numClipIntersection),T.push(A.depthPacking)}(A,T),function x(T,A){a.disableAll(),A.supportsVertexTextures&&a.enable(0),A.instancing&&a.enable(1),A.instancingColor&&a.enable(2),A.instancingMorph&&a.enable(3),A.matcap&&a.enable(4),A.envMap&&a.enable(5),A.normalMapObjectSpace&&a.enable(6),A.normalMapTangentSpace&&a.enable(7),A.clearcoat&&a.enable(8),A.iridescence&&a.enable(9),A.alphaTest&&a.enable(10),A.vertexColors&&a.enable(11),A.vertexAlphas&&a.enable(12),A.vertexUv1s&&a.enable(13),A.vertexUv2s&&a.enable(14),A.vertexUv3s&&a.enable(15),A.vertexTangents&&a.enable(16),A.anisotropy&&a.enable(17),A.alphaHash&&a.enable(18),A.batching&&a.enable(19),A.dispersion&&a.enable(20),A.batchingColor&&a.enable(21),T.push(a.mask),a.disableAll(),A.fog&&a.enable(0),A.useFog&&a.enable(1),A.flatShading&&a.enable(2),A.logarithmicDepthBuffer&&a.enable(3),A.skinning&&a.enable(4),A.morphTargets&&a.enable(5),A.morphNormals&&a.enable(6),A.morphColors&&a.enable(7),A.premultipliedAlpha&&a.enable(8),A.shadowMapEnabled&&a.enable(9),A.doubleSided&&a.enable(10),A.flipSided&&a.enable(11),A.useDepthPacking&&a.enable(12),A.dithering&&a.enable(13),A.transmission&&a.enable(14),A.sheen&&a.enable(15),A.opaque&&a.enable(16),A.pointsUvs&&a.enable(17),A.decodeVideoTexture&&a.enable(18),A.alphaToCoverage&&a.enable(19),T.push(a.mask)}(A,T),A.push(i.outputColorSpace)),A.push(T.customProgramCacheKey),A.join()},getUniforms:function C(T){const A=g[T.type];let W;return W=A?Q4.clone(dc[A].uniforms):T.uniforms,W},acquireProgram:function F(T,A){let W;for(let ie=0,ne=d.length;ie0?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 d(){for(let h=t,p=i.length;h1&&e.sort(h||hue),n.length>1&&n.sort(p||D5),r.length>1&&r.sort(p||D5)}}}function fue(){let i=new WeakMap;return{get:function t(n,r){const s=i.get(n);let o;return void 0===s?(o=new T5,i.set(n,[o])):r>=s.length?(o=new T5,s.push(o)):o=s[r],o},dispose:function e(){i=new WeakMap}}}function pue(){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 O,color:new qe};break;case"SpotLight":e={position:new O,direction:new O,color:new qe,distance:0,coneCos:0,penumbraCos:0,decay:0};break;case"PointLight":e={position:new O,color:new qe,distance:0,decay:0};break;case"HemisphereLight":e={direction:new O,skyColor:new qe,groundColor:new qe};break;case"RectAreaLight":e={color:new qe,position:new O,halfWidth:new O,halfHeight:new O}}return i[t.id]=e,e}}}let gue=0;function _ue(i,t){return(t.castShadow?2:0)-(i.castShadow?2:0)+(t.map?1:0)-(i.map?1:0)}function vue(i){const t=new pue,e=function mue(){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={shadowIntensity:1,shadowBias:0,shadowNormalBias:0,shadowRadius:1,shadowMapSize:new xe};break;case"PointLight":e={shadowIntensity:1,shadowBias:0,shadowNormalBias:0,shadowRadius:1,shadowMapSize:new xe,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 O);const r=new O,s=new Bt,o=new Bt;return{setup:function a(c){let d=0,h=0,p=0;for(let T=0;T<9;T++)n.probe[T].set(0,0,0);let m=0,g=0,b=0,v=0,y=0,M=0,x=0,C=0,F=0,D=0,k=0;c.sort(_ue);for(let T=0,A=c.length;T0&&(!0===i.has("OES_texture_float_linear")?(n.rectAreaLTC1=Je.LTC_FLOAT_1,n.rectAreaLTC2=Je.LTC_FLOAT_2):(n.rectAreaLTC1=Je.LTC_HALF_1,n.rectAreaLTC2=Je.LTC_HALF_2)),n.ambient[0]=d,n.ambient[1]=h,n.ambient[2]=p;const B=n.hash;(B.directionalLength!==m||B.pointLength!==g||B.spotLength!==b||B.rectAreaLength!==v||B.hemiLength!==y||B.numDirectionalShadows!==M||B.numPointShadows!==x||B.numSpotShadows!==C||B.numSpotMaps!==F||B.numLightProbes!==k)&&(n.directional.length=m,n.spot.length=b,n.rectArea.length=v,n.point.length=g,n.hemi.length=y,n.directionalShadow.length=M,n.directionalShadowMap.length=M,n.pointShadow.length=x,n.pointShadowMap.length=x,n.spotShadow.length=C,n.spotShadowMap.length=C,n.directionalShadowMatrix.length=M,n.pointShadowMatrix.length=x,n.spotLightMatrix.length=C+F-D,n.spotLightMap.length=F,n.numSpotLightShadowsWithMaps=D,n.numLightProbes=k,B.directionalLength=m,B.pointLength=g,B.spotLength=b,B.rectAreaLength=v,B.hemiLength=y,B.numDirectionalShadows=M,B.numPointShadows=x,B.numSpotShadows=C,B.numSpotMaps=F,B.numLightProbes=k,n.version=gue++)},setupView:function l(c,d){let h=0,p=0,m=0,g=0,b=0;const v=d.matrixWorldInverse;for(let y=0,M=c.length;y=o.length?(a=new I5(i),o.push(a)):a=o[s],a},dispose:function n(){t=new WeakMap}}}class R5 extends Fo{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 k5 extends Fo{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 bue="void main() {\n\tgl_Position = vec4( position, 1.0 );\n}",xue="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 wue(i,t,e){let n=new oS;const r=new xe,s=new xe,o=new _i,a=new R5({depthPacking:Loe}),l=new k5,c={},d=e.maxTextureSize,h={[lc]:ko,[ko]:lc,[Ns]:Ns},p=new Sl({defines:{VSM_SAMPLES:8},uniforms:{shadow_pass:{value:null},resolution:{value:new xe},radius:{value:4}},vertexShader:bue,fragmentShader:xue}),m=p.clone();m.defines.HORIZONTAL_PASS=1;const g=new hn;g.setAttribute("position",new Hi(new Float32Array([-1,-1,.5,3,-1,.5,-1,3,.5]),3));const b=new Mn(g,p),v=this;this.enabled=!1,this.autoUpdate=!0,this.needsUpdate=!1,this.type=l4;let y=this.type;function M(D,k){const B=t.update(b);p.defines.VSM_SAMPLES!==D.blurSamples&&(p.defines.VSM_SAMPLES=D.blurSamples,m.defines.VSM_SAMPLES=D.blurSamples,p.needsUpdate=!0,m.needsUpdate=!0),null===D.mapPass&&(D.mapPass=new Mu(r.x,r.y)),p.uniforms.shadow_pass.value=D.map.texture,p.uniforms.resolution.value=D.mapSize,p.uniforms.radius.value=D.radius,i.setRenderTarget(D.mapPass),i.clear(),i.renderBufferDirect(k,null,B,p,b,null),m.uniforms.shadow_pass.value=D.mapPass.texture,m.uniforms.resolution.value=D.mapSize,m.uniforms.radius.value=D.radius,i.setRenderTarget(D.map),i.clear(),i.renderBufferDirect(k,null,B,m,b,null)}function x(D,k,B,T){let A=null;const W=!0===B.isPointLight?D.customDistanceMaterial:D.customDepthMaterial;if(void 0!==W)A=W;else if(A=!0===B.isPointLight?l:a,i.localClippingEnabled&&!0===k.clipShadows&&Array.isArray(k.clippingPlanes)&&0!==k.clippingPlanes.length||k.displacementMap&&0!==k.displacementScale||k.alphaMap&&k.alphaTest>0||k.map&&k.alphaTest>0){const ie=A.uuid,ne=k.uuid;let oe=c[ie];void 0===oe&&(oe={},c[ie]=oe);let ge=oe[ne];void 0===ge&&(ge=A.clone(),oe[ne]=ge,k.addEventListener("dispose",F)),A=ge}return A.visible=k.visible,A.wireframe=k.wireframe,A.side=T===Qc?null!==k.shadowSide?k.shadowSide:k.side:null!==k.shadowSide?k.shadowSide:h[k.side],A.alphaMap=k.alphaMap,A.alphaTest=k.alphaTest,A.map=k.map,A.clipShadows=k.clipShadows,A.clippingPlanes=k.clippingPlanes,A.clipIntersection=k.clipIntersection,A.displacementMap=k.displacementMap,A.displacementScale=k.displacementScale,A.displacementBias=k.displacementBias,A.wireframeLinewidth=k.wireframeLinewidth,A.linewidth=k.linewidth,!0===B.isPointLight&&!0===A.isMeshDistanceMaterial&&(i.properties.get(A).light=B),A}function C(D,k,B,T,A){if(!1===D.visible)return;if(D.layers.test(k.layers)&&(D.isMesh||D.isLine||D.isPoints)&&(D.castShadow||D.receiveShadow&&A===Qc)&&(!D.frustumCulled||n.intersectsObject(D))){D.modelViewMatrix.multiplyMatrices(B.matrixWorldInverse,D.matrixWorld);const ne=t.update(D),oe=D.material;if(Array.isArray(oe)){const ge=ne.groups;for(let q=0,se=ge.length;qd||r.y>d)&&(r.x>d&&(s.x=Math.floor(d/we.x),r.x=s.x*we.x,J.mapSize.x=s.x),r.y>d&&(s.y=Math.floor(d/we.y),r.y=s.y*we.y,J.mapSize.y=s.y)),null===J.map||!0===ne||!0===oe){const Ye=this.type!==Qc?{minFilter:vr,magFilter:vr}:{};null!==J.map&&J.map.dispose(),J.map=new Mu(r.x,r.y,Ye),J.map.texture.name=se.name+".shadowMap",J.camera.updateProjectionMatrix()}i.setRenderTarget(J.map),i.clear();const Ve=J.getViewportCount();for(let Ye=0;Ye=1):-1!==se.indexOf("OpenGL ES")&&(q=parseFloat(/^OpenGL ES (\d)/.exec(se)[1]),ge=q>=2);let J=null,we={};const Ve=i.getParameter(i.SCISSOR_BOX),Ye=i.getParameter(i.VIEWPORT),Rt=(new _i).fromArray(Ve),nn=(new _i).fromArray(Ye);function le(Z,We,Ce,Ee){const Ke=new Uint8Array(4),rn=i.createTexture();i.bindTexture(Z,rn),i.texParameteri(Z,i.TEXTURE_MIN_FILTER,i.NEAREST),i.texParameteri(Z,i.TEXTURE_MAG_FILTER,i.NEAREST);for(let ti=0;ti"u")&&/OculusBrowser/g.test(navigator.userAgent),c=new xe,d=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(H,R){return m?new OffscreenCanvas(H,R):Mb("canvas")}function b(H,R,de){let ke=1;const De=_t(H);if((De.width>de||De.height>de)&&(ke=de/Math.max(De.width,De.height)),ke<1){if(typeof HTMLImageElement<"u"&&H instanceof HTMLImageElement||typeof HTMLCanvasElement<"u"&&H instanceof HTMLCanvasElement||typeof ImageBitmap<"u"&&H instanceof ImageBitmap||typeof VideoFrame<"u"&&H instanceof VideoFrame){const Ae=Math.floor(ke*De.width),Ut=Math.floor(ke*De.height);void 0===h&&(h=g(Ae,Ut));const et=R?g(Ae,Ut):h;return et.width=Ae,et.height=Ut,et.getContext("2d").drawImage(H,0,0,Ae,Ut),console.warn("THREE.WebGLRenderer: Texture has been resized from ("+De.width+"x"+De.height+") to ("+Ae+"x"+Ut+")."),et}return"data"in H&&console.warn("THREE.WebGLRenderer: Image in DataTexture is too big ("+De.width+"x"+De.height+")."),H}return H}function v(H){return H.generateMipmaps&&H.minFilter!==vr&&H.minFilter!==cr}function y(H){i.generateMipmap(H)}function M(H,R,de,ke,De=!1){if(null!==H){if(void 0!==i[H])return i[H];console.warn("THREE.WebGLRenderer: Attempt to use non-existing WebGL internal format '"+H+"'")}let Ae=R;if(R===i.RED&&(de===i.FLOAT&&(Ae=i.R32F),de===i.HALF_FLOAT&&(Ae=i.R16F),de===i.UNSIGNED_BYTE&&(Ae=i.R8)),R===i.RED_INTEGER&&(de===i.UNSIGNED_BYTE&&(Ae=i.R8UI),de===i.UNSIGNED_SHORT&&(Ae=i.R16UI),de===i.UNSIGNED_INT&&(Ae=i.R32UI),de===i.BYTE&&(Ae=i.R8I),de===i.SHORT&&(Ae=i.R16I),de===i.INT&&(Ae=i.R32I)),R===i.RG&&(de===i.FLOAT&&(Ae=i.RG32F),de===i.HALF_FLOAT&&(Ae=i.RG16F),de===i.UNSIGNED_BYTE&&(Ae=i.RG8)),R===i.RG_INTEGER&&(de===i.UNSIGNED_BYTE&&(Ae=i.RG8UI),de===i.UNSIGNED_SHORT&&(Ae=i.RG16UI),de===i.UNSIGNED_INT&&(Ae=i.RG32UI),de===i.BYTE&&(Ae=i.RG8I),de===i.SHORT&&(Ae=i.RG16I),de===i.INT&&(Ae=i.RG32I)),R===i.RGB&&de===i.UNSIGNED_INT_5_9_9_9_REV&&(Ae=i.RGB9_E5),R===i.RGBA){const Ut=De?LC:ei.getTransfer(ke);de===i.FLOAT&&(Ae=i.RGBA32F),de===i.HALF_FLOAT&&(Ae=i.RGBA16F),de===i.UNSIGNED_BYTE&&(Ae=Ut===Fi?i.SRGB8_ALPHA8:i.RGBA8),de===i.UNSIGNED_SHORT_4_4_4_4&&(Ae=i.RGBA4),de===i.UNSIGNED_SHORT_5_5_5_1&&(Ae=i.RGB5_A1)}return(Ae===i.R16F||Ae===i.R32F||Ae===i.RG16F||Ae===i.RG32F||Ae===i.RGBA16F||Ae===i.RGBA32F)&&t.get("EXT_color_buffer_float"),Ae}function x(H,R){let de;return H?null===R||R===xu||R===eg?de=i.DEPTH24_STENCIL8:R===ea?de=i.DEPTH32F_STENCIL8:R===yb&&(de=i.DEPTH24_STENCIL8,console.warn("DepthTexture: 16 bit depth attachment is not supported with stencil. Using 24-bit attachment.")):null===R||R===xu||R===eg?de=i.DEPTH_COMPONENT24:R===ea?de=i.DEPTH_COMPONENT32F:R===yb&&(de=i.DEPTH_COMPONENT16),de}function C(H,R){return!0===v(H)||H.isFramebufferTexture&&H.minFilter!==vr&&H.minFilter!==cr?Math.log2(Math.max(R.width,R.height))+1:void 0!==H.mipmaps&&H.mipmaps.length>0?H.mipmaps.length:H.isCompressedTexture&&Array.isArray(H.image)?R.mipmaps.length:1}function F(H){const R=H.target;R.removeEventListener("dispose",F),function k(H){const R=n.get(H);if(void 0===R.__webglInit)return;const de=H.source,ke=p.get(de);if(ke){const De=ke[R.__cacheKey];De.usedTimes--,0===De.usedTimes&&B(H),0===Object.keys(ke).length&&p.delete(de)}n.remove(H)}(R),R.isVideoTexture&&d.delete(R)}function D(H){const R=H.target;R.removeEventListener("dispose",D),function T(H){const R=n.get(H);if(H.depthTexture&&H.depthTexture.dispose(),H.isWebGLCubeRenderTarget)for(let ke=0;ke<6;ke++){if(Array.isArray(R.__webglFramebuffer[ke]))for(let De=0;De0&&de.__version!==H.version){const ke=H.image;if(null===ke)console.warn("THREE.WebGLRenderer: Texture marked for update but no image data found.");else{if(!1!==ke.complete)return void nn(de,H,R);console.warn("THREE.WebGLRenderer: Texture marked for update but image is incomplete")}}e.bindTexture(i.TEXTURE_2D,de.__webglTexture,i.TEXTURE0+R)}const J={[Bs]:i.REPEAT,[er]:i.CLAMP_TO_EDGE,[_b]:i.MIRRORED_REPEAT},we={[vr]:i.NEAREST,[uk]:i.NEAREST_MIPMAP_NEAREST,[Qm]:i.NEAREST_MIPMAP_LINEAR,[cr]:i.LINEAR,[vb]:i.LINEAR_MIPMAP_NEAREST,[xl]:i.LINEAR_MIPMAP_LINEAR},Ve={[Boe]:i.NEVER,[Goe]:i.ALWAYS,[Uoe]:i.LESS,[E4]:i.LEQUAL,[Voe]:i.EQUAL,[$oe]:i.GEQUAL,[zoe]:i.GREATER,[Hoe]:i.NOTEQUAL};function Ye(H,R){if(R.type===ea&&!1===t.has("OES_texture_float_linear")&&(R.magFilter===cr||R.magFilter===vb||R.magFilter===Qm||R.magFilter===xl||R.minFilter===cr||R.minFilter===vb||R.minFilter===Qm||R.minFilter===xl)&&console.warn("THREE.WebGLRenderer: Unable to use linear filtering with floating point textures. OES_texture_float_linear not supported on this device."),i.texParameteri(H,i.TEXTURE_WRAP_S,J[R.wrapS]),i.texParameteri(H,i.TEXTURE_WRAP_T,J[R.wrapT]),(H===i.TEXTURE_3D||H===i.TEXTURE_2D_ARRAY)&&i.texParameteri(H,i.TEXTURE_WRAP_R,J[R.wrapR]),i.texParameteri(H,i.TEXTURE_MAG_FILTER,we[R.magFilter]),i.texParameteri(H,i.TEXTURE_MIN_FILTER,we[R.minFilter]),R.compareFunction&&(i.texParameteri(H,i.TEXTURE_COMPARE_MODE,i.COMPARE_REF_TO_TEXTURE),i.texParameteri(H,i.TEXTURE_COMPARE_FUNC,Ve[R.compareFunction])),!0===t.has("EXT_texture_filter_anisotropic")){if(R.magFilter===vr||R.minFilter!==Qm&&R.minFilter!==xl||R.type===ea&&!1===t.has("OES_texture_float_linear"))return;if(R.anisotropy>1||n.get(R).__currentAnisotropy){const de=t.get("EXT_texture_filter_anisotropic");i.texParameterf(H,de.TEXTURE_MAX_ANISOTROPY_EXT,Math.min(R.anisotropy,r.getMaxAnisotropy())),n.get(R).__currentAnisotropy=R.anisotropy}}}function Rt(H,R){let de=!1;void 0===H.__webglInit&&(H.__webglInit=!0,R.addEventListener("dispose",F));const ke=R.source;let De=p.get(ke);void 0===De&&(De={},p.set(ke,De));const Ae=function ne(H){const R=[];return R.push(H.wrapS),R.push(H.wrapT),R.push(H.wrapR||0),R.push(H.magFilter),R.push(H.minFilter),R.push(H.anisotropy),R.push(H.internalFormat),R.push(H.format),R.push(H.type),R.push(H.generateMipmaps),R.push(H.premultiplyAlpha),R.push(H.flipY),R.push(H.unpackAlignment),R.push(H.colorSpace),R.join()}(R);if(Ae!==H.__cacheKey){void 0===De[Ae]&&(De[Ae]={texture:i.createTexture(),usedTimes:0},o.memory.textures++,de=!0),De[Ae].usedTimes++;const Ut=De[H.__cacheKey];void 0!==Ut&&(De[H.__cacheKey].usedTimes--,0===Ut.usedTimes&&B(R)),H.__cacheKey=Ae,H.__webglTexture=De[Ae].texture}return de}function nn(H,R,de){let ke=i.TEXTURE_2D;(R.isDataArrayTexture||R.isCompressedArrayTexture)&&(ke=i.TEXTURE_2D_ARRAY),R.isData3DTexture&&(ke=i.TEXTURE_3D);const De=Rt(H,R),Ae=R.source;e.bindTexture(ke,H.__webglTexture,i.TEXTURE0+de);const Ut=n.get(Ae);if(Ae.version!==Ut.__version||!0===De){e.activeTexture(i.TEXTURE0+de);const et=ei.getPrimaries(ei.workingColorSpace),pt=R.colorSpace===wu?null:ei.getPrimaries(R.colorSpace),bn=R.colorSpace===wu||et===pt?i.NONE:i.BROWSER_DEFAULT_WEBGL;i.pixelStorei(i.UNPACK_FLIP_Y_WEBGL,R.flipY),i.pixelStorei(i.UNPACK_PREMULTIPLY_ALPHA_WEBGL,R.premultiplyAlpha),i.pixelStorei(i.UNPACK_ALIGNMENT,R.unpackAlignment),i.pixelStorei(i.UNPACK_COLORSPACE_CONVERSION_WEBGL,bn);let He=b(R.image,!1,r.maxTextureSize);He=rt(R,He);const ft=s.convert(R.format,R.colorSpace),Yn=s.convert(R.type);let yt,cn=M(R.internalFormat,ft,Yn,R.colorSpace,R.isVideoTexture);Ye(ke,R);const vn=R.mipmaps,Pn=!0!==R.isVideoTexture,Ki=void 0===Ut.__version||!0===De,Z=Ae.dataReady,We=C(R,He);if(R.isDepthTexture)cn=x(R.format===ng,R.type),Ki&&(Pn?e.texStorage2D(i.TEXTURE_2D,1,cn,He.width,He.height):e.texImage2D(i.TEXTURE_2D,0,cn,He.width,He.height,0,ft,Yn,null));else if(R.isDataTexture)if(vn.length>0){Pn&&Ki&&e.texStorage2D(i.TEXTURE_2D,We,cn,vn[0].width,vn[0].height);for(let Ce=0,Ee=vn.length;Ce0){const Ke=CP(yt.width,yt.height,R.format,R.type);for(const rn of R.layerUpdates){const ti=yt.data.subarray(rn*Ke/yt.data.BYTES_PER_ELEMENT,(rn+1)*Ke/yt.data.BYTES_PER_ELEMENT);e.compressedTexSubImage3D(i.TEXTURE_2D_ARRAY,Ce,0,0,rn,yt.width,yt.height,1,ft,ti,0,0)}R.clearLayerUpdates()}else e.compressedTexSubImage3D(i.TEXTURE_2D_ARRAY,Ce,0,0,0,yt.width,yt.height,He.depth,ft,yt.data,0,0)}else e.compressedTexImage3D(i.TEXTURE_2D_ARRAY,Ce,cn,yt.width,yt.height,He.depth,0,yt.data,0,0);else console.warn("THREE.WebGLRenderer: Attempt to load unsupported compressed texture format in .uploadTexture()");else Pn?Z&&e.texSubImage3D(i.TEXTURE_2D_ARRAY,Ce,0,0,0,yt.width,yt.height,He.depth,ft,Yn,yt.data):e.texImage3D(i.TEXTURE_2D_ARRAY,Ce,cn,yt.width,yt.height,He.depth,0,ft,Yn,yt.data)}else{Pn&&Ki&&e.texStorage2D(i.TEXTURE_2D,We,cn,vn[0].width,vn[0].height);for(let Ce=0,Ee=vn.length;Ce0){const Ce=CP(He.width,He.height,R.format,R.type);for(const Ee of R.layerUpdates){const Ke=He.data.subarray(Ee*Ce/He.data.BYTES_PER_ELEMENT,(Ee+1)*Ce/He.data.BYTES_PER_ELEMENT);e.texSubImage3D(i.TEXTURE_2D_ARRAY,0,0,0,Ee,He.width,He.height,1,ft,Yn,Ke)}R.clearLayerUpdates()}else e.texSubImage3D(i.TEXTURE_2D_ARRAY,0,0,0,0,He.width,He.height,He.depth,ft,Yn,He.data)}else e.texImage3D(i.TEXTURE_2D_ARRAY,0,cn,He.width,He.height,He.depth,0,ft,Yn,He.data);else if(R.isData3DTexture)Pn?(Ki&&e.texStorage3D(i.TEXTURE_3D,We,cn,He.width,He.height,He.depth),Z&&e.texSubImage3D(i.TEXTURE_3D,0,0,0,0,He.width,He.height,He.depth,ft,Yn,He.data)):e.texImage3D(i.TEXTURE_3D,0,cn,He.width,He.height,He.depth,0,ft,Yn,He.data);else if(R.isFramebufferTexture){if(Ki)if(Pn)e.texStorage2D(i.TEXTURE_2D,We,cn,He.width,He.height);else{let Ce=He.width,Ee=He.height;for(let Ke=0;Ke>=1,Ee>>=1}}else if(vn.length>0){if(Pn&&Ki){const Ce=_t(vn[0]);e.texStorage2D(i.TEXTURE_2D,We,cn,Ce.width,Ce.height)}for(let Ce=0,Ee=vn.length;Ce>Ae),ft=Math.max(1,R.height>>Ae);De===i.TEXTURE_3D||De===i.TEXTURE_2D_ARRAY?e.texImage3D(De,Ae,pt,He,ft,R.depth,0,Ut,et,null):e.texImage2D(De,Ae,pt,He,ft,0,Ut,et,null)}e.bindFramebuffer(i.FRAMEBUFFER,H),Me(R)?a.framebufferTexture2DMultisampleEXT(i.FRAMEBUFFER,ke,De,n.get(de).__webglTexture,0,it(R)):(De===i.TEXTURE_2D||De>=i.TEXTURE_CUBE_MAP_POSITIVE_X&&De<=i.TEXTURE_CUBE_MAP_NEGATIVE_Z)&&i.framebufferTexture2D(i.FRAMEBUFFER,ke,De,n.get(de).__webglTexture,Ae),e.bindFramebuffer(i.FRAMEBUFFER,null)}function Ze(H,R,de){if(i.bindRenderbuffer(i.RENDERBUFFER,H),R.depthBuffer){const ke=R.depthTexture,Ae=x(R.stencilBuffer,ke&&ke.isDepthTexture?ke.type:null),Ut=R.stencilBuffer?i.DEPTH_STENCIL_ATTACHMENT:i.DEPTH_ATTACHMENT,et=it(R);Me(R)?a.renderbufferStorageMultisampleEXT(i.RENDERBUFFER,et,Ae,R.width,R.height):de?i.renderbufferStorageMultisample(i.RENDERBUFFER,et,Ae,R.width,R.height):i.renderbufferStorage(i.RENDERBUFFER,Ae,R.width,R.height),i.framebufferRenderbuffer(i.FRAMEBUFFER,Ut,i.RENDERBUFFER,H)}else{const ke=R.textures;for(let De=0;De0&&!0===t.has("WEBGL_multisampled_render_to_texture")&&!1!==R.__useRenderToTexture}function rt(H,R){const de=H.colorSpace,ke=H.format,De=H.type;return!0===H.isCompressedTexture||!0===H.isVideoTexture||de!==ds&&de!==wu&&(ei.getTransfer(de)===Fi?(ke!==Po||De!==ed)&&console.warn("THREE.WebGLTextures: sRGB encoded textures have to use RGBAFormat and UnsignedByteType."):console.error("THREE.WebGLTextures: Unsupported texture color space:",de)),R}function _t(H){return typeof HTMLImageElement<"u"&&H instanceof HTMLImageElement?(c.width=H.naturalWidth||H.width,c.height=H.naturalHeight||H.height):typeof VideoFrame<"u"&&H instanceof VideoFrame?(c.width=H.displayWidth,c.height=H.displayHeight):(c.width=H.width,c.height=H.height),c}this.allocateTextureUnit=function ie(){const H=A;return H>=r.maxTextures&&console.warn("THREE.WebGLTextures: Trying to use "+H+" texture units while this GPU supports only "+r.maxTextures),A+=1,H},this.resetTextureUnits=function W(){A=0},this.setTexture2D=oe,this.setTexture2DArray=function ge(H,R){const de=n.get(H);H.version>0&&de.__version!==H.version?nn(de,H,R):e.bindTexture(i.TEXTURE_2D_ARRAY,de.__webglTexture,i.TEXTURE0+R)},this.setTexture3D=function q(H,R){const de=n.get(H);H.version>0&&de.__version!==H.version?nn(de,H,R):e.bindTexture(i.TEXTURE_3D,de.__webglTexture,i.TEXTURE0+R)},this.setTextureCube=function se(H,R){const de=n.get(H);H.version>0&&de.__version!==H.version?function le(H,R,de){if(6!==R.image.length)return;const ke=Rt(H,R),De=R.source;e.bindTexture(i.TEXTURE_CUBE_MAP,H.__webglTexture,i.TEXTURE0+de);const Ae=n.get(De);if(De.version!==Ae.__version||!0===ke){e.activeTexture(i.TEXTURE0+de);const Ut=ei.getPrimaries(ei.workingColorSpace),et=R.colorSpace===wu?null:ei.getPrimaries(R.colorSpace),pt=R.colorSpace===wu||Ut===et?i.NONE:i.BROWSER_DEFAULT_WEBGL;i.pixelStorei(i.UNPACK_FLIP_Y_WEBGL,R.flipY),i.pixelStorei(i.UNPACK_PREMULTIPLY_ALPHA_WEBGL,R.premultiplyAlpha),i.pixelStorei(i.UNPACK_ALIGNMENT,R.unpackAlignment),i.pixelStorei(i.UNPACK_COLORSPACE_CONVERSION_WEBGL,pt);const bn=R.isCompressedTexture||R.image[0].isCompressedTexture,He=R.image[0]&&R.image[0].isDataTexture,ft=[];for(let Ee=0;Ee<6;Ee++)ft[Ee]=bn||He?He?R.image[Ee].image:R.image[Ee]:b(R.image[Ee],!0,r.maxCubemapSize),ft[Ee]=rt(R,ft[Ee]);const Yn=ft[0],cn=s.convert(R.format,R.colorSpace),yt=s.convert(R.type),vn=M(R.internalFormat,cn,yt,R.colorSpace),Pn=!0!==R.isVideoTexture,Ki=void 0===Ae.__version||!0===ke,Z=De.dataReady;let Ce,We=C(R,Yn);if(Ye(i.TEXTURE_CUBE_MAP,R),bn){Pn&&Ki&&e.texStorage2D(i.TEXTURE_CUBE_MAP,We,vn,Yn.width,Yn.height);for(let Ee=0;Ee<6;Ee++){Ce=ft[Ee].mipmaps;for(let Ke=0;Ke0&&We++;const Ee=_t(ft[0]);e.texStorage2D(i.TEXTURE_CUBE_MAP,We,vn,Ee.width,Ee.height)}for(let Ee=0;Ee<6;Ee++)if(He){Pn?Z&&e.texSubImage2D(i.TEXTURE_CUBE_MAP_POSITIVE_X+Ee,0,0,0,ft[Ee].width,ft[Ee].height,cn,yt,ft[Ee].data):e.texImage2D(i.TEXTURE_CUBE_MAP_POSITIVE_X+Ee,0,vn,ft[Ee].width,ft[Ee].height,0,cn,yt,ft[Ee].data);for(let Ke=0;Ke1;if(Ut||(void 0===ke.__webglTexture&&(ke.__webglTexture=i.createTexture()),ke.__version=R.version,o.memory.textures++),Ae){de.__webglFramebuffer=[];for(let et=0;et<6;et++)if(R.mipmaps&&R.mipmaps.length>0){de.__webglFramebuffer[et]=[];for(let pt=0;pt0){de.__webglFramebuffer=[];for(let et=0;et0&&!1===Me(H)){de.__webglMultisampledFramebuffer=i.createFramebuffer(),de.__webglColorRenderbuffer=[],e.bindFramebuffer(i.FRAMEBUFFER,de.__webglMultisampledFramebuffer);for(let et=0;et0)for(let pt=0;pt0)for(let pt=0;pt0)if(!1===Me(H)){const R=H.textures,de=H.width,ke=H.height;let De=i.COLOR_BUFFER_BIT;const Ae=H.stencilBuffer?i.DEPTH_STENCIL_ATTACHMENT:i.DEPTH_ATTACHMENT,Ut=n.get(H),et=R.length>1;if(et)for(let pt=0;ptm+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(Rue)))}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 No;n.matrixAutoUpdate=!1,n.visible=!1,t.joints[e.jointName]=n,t.add(n)}return t.joints[e.jointName]}}class Oue{constructor(){this.texture=null,this.mesh=null,this.depthNear=0,this.depthFar=0}init(t,e,n){if(null===this.texture){const r=new Oo;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}}getMesh(t){if(null!==this.texture&&null===this.mesh){const e=t.cameras[0].viewport,n=new Sl({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:e.z},depthHeight:{value:e.w}}});this.mesh=new Mn(new Iu(20,20),n)}return this.mesh}reset(){this.texture=null,this.mesh=null}getDepthTexture(){return this.texture}}class Fue extends og{constructor(t,e){super();const n=this;let r=null,s=1,o=null,a="local-floor",l=1,c=null,d=null,h=null,p=null,m=null,g=null;const b=new Oue,v=e.getContextAttributes();let y=null,M=null;const x=[],C=[],F=new xe;let D=null;const k=new br;k.layers.enable(1),k.viewport=new _i;const B=new br;B.layers.enable(2),B.viewport=new _i;const T=[k,B],A=new Iue;A.layers.enable(1),A.layers.enable(2);let W=null,ie=null;function ne(le){const Fe=C.indexOf(le.inputSource);if(-1===Fe)return;const Ze=x[Fe];void 0!==Ze&&(Ze.update(le.inputSource,le.frame,c||o),Ze.dispatchEvent({type:le.type,data:le.inputSource}))}function oe(){r.removeEventListener("select",ne),r.removeEventListener("selectstart",ne),r.removeEventListener("selectend",ne),r.removeEventListener("squeeze",ne),r.removeEventListener("squeezestart",ne),r.removeEventListener("squeezeend",ne),r.removeEventListener("end",oe),r.removeEventListener("inputsourceschange",ge);for(let le=0;le=0&&(C[Le]=null,x[Le].disconnect(Ze))}for(let Fe=0;Fe=C.length){C.push(Ze),Le=Tt;break}if(null===C[Tt]){C[Tt]=Ze,Le=Tt;break}}if(-1===Le)break}const wt=x[Le];wt&&wt.connect(Ze)}}this.cameraAutoUpdate=!0,this.enabled=!1,this.isPresenting=!1,this.getController=function(le){let Fe=x[le];return void 0===Fe&&(Fe=new SP,x[le]=Fe),Fe.getTargetRaySpace()},this.getControllerGrip=function(le){let Fe=x[le];return void 0===Fe&&(Fe=new SP,x[le]=Fe),Fe.getGripSpace()},this.getHand=function(le){let Fe=x[le];return void 0===Fe&&(Fe=new SP,x[le]=Fe),Fe.getHandSpace()},this.setFramebufferScaleFactor=function(le){s=le,!0===n.isPresenting&&console.warn("THREE.WebXRManager: Cannot change framebuffer scale while presenting.")},this.setReferenceSpaceType=function(le){a=le,!0===n.isPresenting&&console.warn("THREE.WebXRManager: Cannot change reference space type while presenting.")},this.getReferenceSpace=function(){return c||o},this.setReferenceSpace=function(le){c=le},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 le=nt(function*(Fe){if(r=Fe,null!==r){if(y=t.getRenderTarget(),r.addEventListener("select",ne),r.addEventListener("selectstart",ne),r.addEventListener("selectend",ne),r.addEventListener("squeeze",ne),r.addEventListener("squeezestart",ne),r.addEventListener("squeezeend",ne),r.addEventListener("end",oe),r.addEventListener("inputsourceschange",ge),!0!==v.xrCompatible&&(yield e.makeXRCompatible()),D=t.getPixelRatio(),t.getSize(F),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 Mu(m.framebufferWidth,m.framebufferHeight,{format:Po,type:ed,colorSpace:t.outputColorSpace,stencilBuffer:v.stencil});else{let Ze=null,Le=null,wt=null;v.depth&&(wt=v.stencil?e.DEPTH24_STENCIL8:e.DEPTH_COMPONENT24,Ze=v.stencil?ng:tg,Le=v.stencil?eg:xu);const Tt={colorFormat:e.RGBA8,depthFormat:wt,scaleFactor:s};h=new XRWebGLBinding(r,e),p=h.createProjectionLayer(Tt),r.updateRenderState({layers:[p]}),t.setPixelRatio(1),t.setSize(p.textureWidth,p.textureHeight,!1),M=new Mu(p.textureWidth,p.textureHeight,{format:Po,type:ed,depthTexture:new d5(p.textureWidth,p.textureHeight,Le,void 0,void 0,void 0,void 0,void 0,void 0,Ze),stencilBuffer:v.stencil,colorSpace:t.outputColorSpace,samples:v.antialias?4:0,resolveDepthBuffer:!1===p.ignoreDepthValues})}M.isXRRenderTarget=!0,this.setFoveation(l),c=null,o=yield r.requestReferenceSpace(a),nn.setContext(r),nn.start(),n.isPresenting=!0,n.dispatchEvent({type:"sessionstart"})}});return function(Fe){return le.apply(this,arguments)}}(),this.getEnvironmentBlendMode=function(){if(null!==r)return r.environmentBlendMode},this.getDepthTexture=function(){return b.getDepthTexture()};const q=new O,se=new O;function we(le,Fe){null===Fe?le.matrixWorld.copy(le.matrix):le.matrixWorld.multiplyMatrices(Fe.matrixWorld,le.matrix),le.matrixWorldInverse.copy(le.matrixWorld).invert()}this.updateCamera=function(le){if(null===r)return;null!==b.texture&&(le.near=b.depthNear,le.far=b.depthFar),A.near=B.near=k.near=le.near,A.far=B.far=k.far=le.far,(W!==A.near||ie!==A.far)&&(r.updateRenderState({depthNear:A.near,depthFar:A.far}),W=A.near,ie=A.far,k.near=W,k.far=ie,B.near=W,B.far=ie,k.updateProjectionMatrix(),B.updateProjectionMatrix(),le.updateProjectionMatrix());const Fe=le.parent,Ze=A.cameras;we(A,Fe);for(let Le=0;Le0&&(v.alphaTest.value=y.alphaTest);const M=t.get(y),x=M.envMap,C=M.envMapRotation;x&&(v.envMap.value=x,hf.copy(C),hf.x*=-1,hf.y*=-1,hf.z*=-1,x.isCubeTexture&&!1===x.isRenderTargetTexture&&(hf.y*=-1,hf.z*=-1),v.envMapRotation.value.setFromMatrix4(Lue.makeRotationFromEuler(hf)),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,v.lightMapIntensity.value=y.lightMapIntensity,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,Z4(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 d(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===ko&&v.clearcoatNormalScale.value.negate())),y.dispersion>0&&(v.dispersion.value=y.dispersion),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 Bue(i,t,e,n){let r={},s={},o=[];const a=i.getParameter(i.MAX_UNIFORM_BUFFER_BINDINGS);function m(M,x,C,F){const D=M.value,k=x+"_"+C;if(void 0===F[k])return F[k]="number"==typeof D||"boolean"==typeof D?D:D.clone(),!0;{const B=F[k];if("number"==typeof D||"boolean"==typeof D){if(B!==D)return F[k]=D,!0}else if(!1===B.equals(D))return B.copy(D),!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 k=0,B=x.length;k0&&(C+=16-D),M.__size=C,M.__cache={}}(M),C=function d(M){const x=function h(){for(let M=0;M0),Zt=!!ce.morphAttributes.position,li=!!ce.morphAttributes.normal,Li=!!ce.morphAttributes.color;let ir=bu;ue.toneMapped&&(null===k||!0===k.isXRRenderTarget)&&(ir=x.toneMapping);const la=ce.morphAttributes.position||ce.morphAttributes.normal||ce.morphAttributes.color,fi=void 0!==la?la.length:0,kt=rt.get(ue),fs=v.state.lights;!0!==le||!0!==Fe&&L===T||bn.setState(ue,L,L===T&&ue.id===B);let pi=!1;ue.version===kt.__version?(kt.needsLights&&kt.lightsStateVersion!==fs.state.version||kt.outputColorSpace!==Mt||te.isBatchedMesh&&!1===kt.batching||!te.isBatchedMesh&&!0===kt.batching||te.isBatchedMesh&&!0===kt.batchingColor&&null===te.colorTexture||te.isBatchedMesh&&!1===kt.batchingColor&&null!==te.colorTexture||te.isInstancedMesh&&!1===kt.instancing||!te.isInstancedMesh&&!0===kt.instancing||te.isSkinnedMesh&&!1===kt.skinning||!te.isSkinnedMesh&&!0===kt.skinning||te.isInstancedMesh&&!0===kt.instancingColor&&null===te.instanceColor||te.isInstancedMesh&&!1===kt.instancingColor&&null!==te.instanceColor||te.isInstancedMesh&&!0===kt.instancingMorph&&null===te.morphTexture||te.isInstancedMesh&&!1===kt.instancingMorph&&null!==te.morphTexture||kt.envMap!==Ct||!0===ue.fog&&kt.fog!==je||void 0!==kt.numClippingPlanes&&(kt.numClippingPlanes!==bn.numPlanes||kt.numIntersection!==bn.numIntersection)||kt.vertexAlphas!==Kt||kt.vertexTangents!==an||kt.morphTargets!==Zt||kt.morphNormals!==li||kt.morphColors!==Li||kt.toneMapping!==ir||kt.morphTargetsCount!==fi)&&(pi=!0):(pi=!0,kt.__version=ue.version);let Al=kt.currentProgram;!0===pi&&(Al=bE(ue,K,te));let qg=!1,ca=!1,XO=!1;const wr=Al.getUniforms(),Uu=kt.uniforms;if(Me.useProgram(Al.program)&&(qg=!0,ca=!0,XO=!0),ue.id!==B&&(B=ue.id,ca=!0),qg||T!==L){wr.setValue(N,"projectionMatrix",L.projectionMatrix),wr.setValue(N,"viewMatrix",L.matrixWorldInverse);const $a=wr.map.cameraPosition;void 0!==$a&&$a.setValue(N,Le.setFromMatrixPosition(L.matrixWorld)),it.logarithmicDepthBuffer&&wr.setValue(N,"logDepthBufFC",2/(Math.log(L.far+1)/Math.LN2)),(ue.isMeshPhongMaterial||ue.isMeshToonMaterial||ue.isMeshLambertMaterial||ue.isMeshBasicMaterial||ue.isMeshStandardMaterial||ue.isShaderMaterial)&&wr.setValue(N,"isOrthographic",!0===L.isOrthographicCamera),T!==L&&(T=L,ca=!0,XO=!0)}if(te.isSkinnedMesh){wr.setOptional(N,te,"bindMatrix"),wr.setOptional(N,te,"bindMatrixInverse");const $a=te.skeleton;$a&&(null===$a.boneTexture&&$a.computeBoneTexture(),wr.setValue(N,"boneTexture",$a.boneTexture,_t))}te.isBatchedMesh&&(wr.setOptional(N,te,"batchingTexture"),wr.setValue(N,"batchingTexture",te._matricesTexture,_t),wr.setOptional(N,te,"batchingIdTexture"),wr.setValue(N,"batchingIdTexture",te._indirectTexture,_t),wr.setOptional(N,te,"batchingColorTexture"),null!==te._colorsTexture&&wr.setValue(N,"batchingColorTexture",te._colorsTexture,_t));const KO=ce.morphAttributes;if((void 0!==KO.position||void 0!==KO.normal||void 0!==KO.color)&&Yn.update(te,ce,Al),(ca||kt.receiveShadow!==te.receiveShadow)&&(kt.receiveShadow=te.receiveShadow,wr.setValue(N,"receiveShadow",te.receiveShadow)),ue.isMeshGouraudMaterial&&null!==ue.envMap&&(Uu.envMap.value=Ct,Uu.flipEnvMap.value=Ct.isCubeTexture&&!1===Ct.isRenderTargetTexture?-1:1),ue.isMeshStandardMaterial&&null===ue.envMap&&null!==K.environment&&(Uu.envMapIntensity.value=K.environmentIntensity),ca&&(wr.setValue(N,"toneMappingExposure",x.toneMappingExposure),kt.needsLights&&function Gve(L,K){L.ambientLightColor.needsUpdate=K,L.lightProbe.needsUpdate=K,L.directionalLights.needsUpdate=K,L.directionalLightShadows.needsUpdate=K,L.pointLights.needsUpdate=K,L.pointLightShadows.needsUpdate=K,L.spotLights.needsUpdate=K,L.spotLightShadows.needsUpdate=K,L.rectAreaLights.needsUpdate=K,L.hemisphereLights.needsUpdate=K}(Uu,XO),je&&!0===ue.fog&&Ut.refreshFogUniforms(Uu,je),Ut.refreshMaterialUniforms(Uu,ue,se,q,v.state.transmissionRenderTarget[L.id]),dS.upload(N,_8(kt),Uu,_t)),ue.isShaderMaterial&&!0===ue.uniformsNeedUpdate&&(dS.upload(N,_8(kt),Uu,_t),ue.uniformsNeedUpdate=!1),ue.isSpriteMaterial&&wr.setValue(N,"center",te.center),wr.setValue(N,"modelViewMatrix",te.modelViewMatrix),wr.setValue(N,"normalMatrix",te.normalMatrix),wr.setValue(N,"modelMatrix",te.matrixWorld),ue.isShaderMaterial||ue.isRawShaderMaterial){const $a=ue.uniformsGroups;for(let ZO=0,jve=$a.length;ZO{function je(){ue.forEach(function(at){rt.get(at).currentProgram.isReady()&&ue.delete(at)}),0!==ue.size?setTimeout(je,10):te(L)}null!==Ne.get("KHR_parallel_shader_compile")?je():setTimeout(je,10)})};let hi=null;function pc(){Pf.stop()}function f8(){Pf.start()}const Pf=new t5;function qO(L,K,ce,ue){if(!1===L.visible)return;if(L.layers.test(K.layers))if(L.isGroup)ce=L.renderOrder;else if(L.isLOD)!0===L.autoUpdate&&L.update(K);else if(L.isLight)v.pushLight(L),L.castShadow&&v.pushShadow(L);else if(L.isSprite){if(!L.frustumCulled||nn.intersectsSprite(L)){ue&&wt.setFromMatrixPosition(L.matrixWorld).applyMatrix4(Ze);const at=De.update(L),Mt=L.material;Mt.visible&&b.push(L,at,Mt,ce,wt.z,null)}}else if((L.isMesh||L.isLine||L.isPoints)&&(!L.frustumCulled||nn.intersectsObject(L))){const at=De.update(L),Mt=L.material;if(ue&&(void 0!==L.boundingSphere?(null===L.boundingSphere&&L.computeBoundingSphere(),wt.copy(L.boundingSphere.center)):(null===at.boundingSphere&&at.computeBoundingSphere(),wt.copy(at.boundingSphere.center)),wt.applyMatrix4(L.matrixWorld).applyMatrix4(Ze)),Array.isArray(Mt)){const Ct=at.groups;for(let Kt=0,an=Ct.length;Kt0&&yE(te,K,ce),je.length>0&&yE(je,K,ce),at.length>0&&yE(at,K,ce),Me.buffers.depth.setTest(!0),Me.buffers.depth.setMask(!0),Me.buffers.color.setMask(!0),Me.setPolygonOffset(!1)}function m8(L,K,ce,ue){if(null!==(!0===ce.isScene?ce.overrideMaterial:null))return;void 0===v.state.transmissionRenderTarget[ue.id]&&(v.state.transmissionRenderTarget[ue.id]=new Mu(1,1,{generateMipmaps:!0,type:Ne.has("EXT_color_buffer_half_float")||Ne.has("EXT_color_buffer_float")?Jm:ed,minFilter:xl,samples:4,stencilBuffer:s,resolveDepthBuffer:!1,resolveStencilBuffer:!1,colorSpace:ei.workingColorSpace}));const je=v.state.transmissionRenderTarget[ue.id],at=ue.viewport||A;je.setSize(at.z,at.w);const Mt=x.getRenderTarget();x.setRenderTarget(je),x.getClearColor(ne),oe=x.getClearAlpha(),oe<1&&x.setClearColor(16777215,.5),x.clear(),St&&ft.render(ce);const Ct=x.toneMapping;x.toneMapping=bu;const Kt=ue.viewport;if(void 0!==ue.viewport&&(ue.viewport=void 0),v.setupLightsView(ue),!0===le&&bn.setGlobalState(x.clippingPlanes,ue),yE(L,ce,ue),_t.updateMultisampleRenderTarget(je),_t.updateRenderTargetMipmap(je),!1===Ne.has("WEBGL_multisampled_render_to_texture")){let an=!1;for(let Zt=0,li=K.length;Zt0)for(let at=0,Mt=je.length;at0&&m8(ue,te,L,K),St&&ft.render(L),p8(b,L,K);null!==k&&(_t.updateMultisampleRenderTarget(k),_t.updateRenderTargetMipmap(k)),!0===L.isScene&&L.onAfterRender(x,L,K),Pn.resetDefaultState(),B=-1,T=null,M.pop(),M.length>0?(v=M[M.length-1],!0===le&&bn.setGlobalState(x.clippingPlanes,v.state.camera)):v=null,y.pop(),b=y.length>0?y[y.length-1]:null},this.getActiveCubeFace=function(){return F},this.getActiveMipmapLevel=function(){return D},this.getRenderTarget=function(){return k},this.setRenderTargetTextures=function(L,K,ce){rt.get(L.texture).__webglTexture=K,rt.get(L.depthTexture).__webglTexture=ce;const ue=rt.get(L);ue.__hasExternalTextures=!0,ue.__autoAllocateDepthBuffer=void 0===ce,ue.__autoAllocateDepthBuffer||!0===Ne.has("WEBGL_multisampled_render_to_texture")&&(console.warn("THREE.WebGLRenderer: Render-to-texture extension was disabled because an external texture was provided"),ue.__useRenderToTexture=!1)},this.setRenderTargetFramebuffer=function(L,K){const ce=rt.get(L);ce.__webglFramebuffer=K,ce.__useDefaultFramebuffer=void 0===K},this.setRenderTarget=function(L,K=0,ce=0){k=L,F=K,D=ce;let ue=!0,te=null,je=!1,at=!1;if(L){const Ct=rt.get(L);void 0!==Ct.__useDefaultFramebuffer?(Me.bindFramebuffer(N.FRAMEBUFFER,null),ue=!1):void 0===Ct.__webglFramebuffer?_t.setupRenderTarget(L):Ct.__hasExternalTextures&&_t.rebindTextures(L,rt.get(L.texture).__webglTexture,rt.get(L.depthTexture).__webglTexture);const Kt=L.texture;(Kt.isData3DTexture||Kt.isDataArrayTexture||Kt.isCompressedArrayTexture)&&(at=!0);const an=rt.get(L).__webglFramebuffer;L.isWebGLCubeRenderTarget?(te=Array.isArray(an[K])?an[K][ce]:an[K],je=!0):te=L.samples>0&&!1===_t.useMultisampledRTT(L)?rt.get(L).__webglMultisampledFramebuffer:Array.isArray(an)?an[ce]:an,A.copy(L.viewport),W.copy(L.scissor),ie=L.scissorTest}else A.copy(Ve).multiplyScalar(se).floor(),W.copy(Ye).multiplyScalar(se).floor(),ie=Rt;if(Me.bindFramebuffer(N.FRAMEBUFFER,te)&&ue&&Me.drawBuffers(L,te),Me.viewport(A),Me.scissor(W),Me.setScissorTest(ie),je){const Ct=rt.get(L.texture);N.framebufferTexture2D(N.FRAMEBUFFER,N.COLOR_ATTACHMENT0,N.TEXTURE_CUBE_MAP_POSITIVE_X+K,Ct.__webglTexture,ce)}else if(at){const Ct=rt.get(L.texture);N.framebufferTextureLayer(N.FRAMEBUFFER,N.COLOR_ATTACHMENT0,Ct.__webglTexture,ce||0,K||0)}B=-1},this.readRenderTargetPixels=function(L,K,ce,ue,te,je,at){if(!L||!L.isWebGLRenderTarget)return void console.error("THREE.WebGLRenderer.readRenderTargetPixels: renderTarget is not THREE.WebGLRenderTarget.");let Mt=rt.get(L).__webglFramebuffer;if(L.isWebGLCubeRenderTarget&&void 0!==at&&(Mt=Mt[at]),Mt){Me.bindFramebuffer(N.FRAMEBUFFER,Mt);try{const Ct=L.texture,Kt=Ct.format,an=Ct.type;if(!it.textureFormatReadable(Kt))return void console.error("THREE.WebGLRenderer.readRenderTargetPixels: renderTarget is not in RGBA or implementation defined format.");if(!it.textureTypeReadable(an))return void console.error("THREE.WebGLRenderer.readRenderTargetPixels: renderTarget is not in UnsignedByteType or implementation defined type.");K>=0&&K<=L.width-ue&&ce>=0&&ce<=L.height-te&&N.readPixels(K,ce,ue,te,vn.convert(Kt),vn.convert(an),je)}finally{const Ct=null!==k?rt.get(k).__webglFramebuffer:null;Me.bindFramebuffer(N.FRAMEBUFFER,Ct)}}},this.readRenderTargetPixelsAsync=function(){var L=nt(function*(K,ce,ue,te,je,at,Mt){if(!K||!K.isWebGLRenderTarget)throw new Error("THREE.WebGLRenderer.readRenderTargetPixels: renderTarget is not THREE.WebGLRenderTarget.");let Ct=rt.get(K).__webglFramebuffer;if(K.isWebGLCubeRenderTarget&&void 0!==Mt&&(Ct=Ct[Mt]),Ct){Me.bindFramebuffer(N.FRAMEBUFFER,Ct);try{const Kt=K.texture,an=Kt.format,Zt=Kt.type;if(!it.textureFormatReadable(an))throw new Error("THREE.WebGLRenderer.readRenderTargetPixelsAsync: renderTarget is not in RGBA or implementation defined format.");if(!it.textureTypeReadable(Zt))throw new Error("THREE.WebGLRenderer.readRenderTargetPixelsAsync: renderTarget is not in UnsignedByteType or implementation defined type.");if(ce>=0&&ce<=K.width-te&&ue>=0&&ue<=K.height-je){const li=N.createBuffer();N.bindBuffer(N.PIXEL_PACK_BUFFER,li),N.bufferData(N.PIXEL_PACK_BUFFER,at.byteLength,N.STREAM_READ),N.readPixels(ce,ue,te,je,vn.convert(an),vn.convert(Zt),0),N.flush();const Li=N.fenceSync(N.SYNC_GPU_COMMANDS_COMPLETE,0);yield function dae(i,t,e){return new Promise(function(n,r){setTimeout(function s(){switch(i.clientWaitSync(t,i.SYNC_FLUSH_COMMANDS_BIT,0)){case i.WAIT_FAILED:r();break;case i.TIMEOUT_EXPIRED:setTimeout(s,e);break;default:n()}},e)})}(N,Li,4);try{N.bindBuffer(N.PIXEL_PACK_BUFFER,li),N.getBufferSubData(N.PIXEL_PACK_BUFFER,0,at)}finally{N.deleteBuffer(li),N.deleteSync(Li)}return at}}finally{const Kt=null!==k?rt.get(k).__webglFramebuffer:null;Me.bindFramebuffer(N.FRAMEBUFFER,Kt)}}});return function(K,ce,ue,te,je,at,Mt){return L.apply(this,arguments)}}(),this.copyFramebufferToTexture=function(L,K=null,ce=0){!0!==L.isTexture&&(cg("WebGLRenderer: copyFramebufferToTexture function signature has changed."),K=arguments[0]||null,L=arguments[1]);const ue=Math.pow(2,-ce),te=Math.floor(L.image.width*ue),je=Math.floor(L.image.height*ue),at=null!==K?K.x:0,Mt=null!==K?K.y:0;_t.setTexture2D(L,0),N.copyTexSubImage2D(N.TEXTURE_2D,ce,0,0,at,Mt,te,je),Me.unbindTexture()},this.copyTextureToTexture=function(L,K,ce=null,ue=null,te=0){let je,at,Mt,Ct,Kt,an;!0!==L.isTexture&&(cg("WebGLRenderer: copyTextureToTexture function signature has changed."),ue=arguments[0]||null,L=arguments[1],K=arguments[2],te=arguments[3]||0,ce=null),null!==ce?(je=ce.max.x-ce.min.x,at=ce.max.y-ce.min.y,Mt=ce.min.x,Ct=ce.min.y):(je=L.image.width,at=L.image.height,Mt=0,Ct=0),null!==ue?(Kt=ue.x,an=ue.y):(Kt=0,an=0);const Zt=vn.convert(K.format),li=vn.convert(K.type);_t.setTexture2D(K,0),N.pixelStorei(N.UNPACK_FLIP_Y_WEBGL,K.flipY),N.pixelStorei(N.UNPACK_PREMULTIPLY_ALPHA_WEBGL,K.premultiplyAlpha),N.pixelStorei(N.UNPACK_ALIGNMENT,K.unpackAlignment);const Li=N.getParameter(N.UNPACK_ROW_LENGTH),ir=N.getParameter(N.UNPACK_IMAGE_HEIGHT),la=N.getParameter(N.UNPACK_SKIP_PIXELS),fi=N.getParameter(N.UNPACK_SKIP_ROWS),kt=N.getParameter(N.UNPACK_SKIP_IMAGES),fs=L.isCompressedTexture?L.mipmaps[te]:L.image;N.pixelStorei(N.UNPACK_ROW_LENGTH,fs.width),N.pixelStorei(N.UNPACK_IMAGE_HEIGHT,fs.height),N.pixelStorei(N.UNPACK_SKIP_PIXELS,Mt),N.pixelStorei(N.UNPACK_SKIP_ROWS,Ct),L.isDataTexture?N.texSubImage2D(N.TEXTURE_2D,te,Kt,an,je,at,Zt,li,fs.data):L.isCompressedTexture?N.compressedTexSubImage2D(N.TEXTURE_2D,te,Kt,an,fs.width,fs.height,Zt,fs.data):N.texSubImage2D(N.TEXTURE_2D,te,Kt,an,je,at,Zt,li,fs),N.pixelStorei(N.UNPACK_ROW_LENGTH,Li),N.pixelStorei(N.UNPACK_IMAGE_HEIGHT,ir),N.pixelStorei(N.UNPACK_SKIP_PIXELS,la),N.pixelStorei(N.UNPACK_SKIP_ROWS,fi),N.pixelStorei(N.UNPACK_SKIP_IMAGES,kt),0===te&&K.generateMipmaps&&N.generateMipmap(N.TEXTURE_2D),Me.unbindTexture()},this.copyTextureToTexture3D=function(L,K,ce=null,ue=null,te=0){let je,at,Mt,Ct,Kt,an,Zt,li,Li;!0!==L.isTexture&&(cg("WebGLRenderer: copyTextureToTexture3D function signature has changed."),ce=arguments[0]||null,ue=arguments[1]||null,L=arguments[2],K=arguments[3],te=arguments[4]||0);const ir=L.isCompressedTexture?L.mipmaps[te]:L.image;null!==ce?(je=ce.max.x-ce.min.x,at=ce.max.y-ce.min.y,Mt=ce.max.z-ce.min.z,Ct=ce.min.x,Kt=ce.min.y,an=ce.min.z):(je=ir.width,at=ir.height,Mt=ir.depth,Ct=0,Kt=0,an=0),null!==ue?(Zt=ue.x,li=ue.y,Li=ue.z):(Zt=0,li=0,Li=0);const la=vn.convert(K.format),fi=vn.convert(K.type);let kt;if(K.isData3DTexture)_t.setTexture3D(K,0),kt=N.TEXTURE_3D;else{if(!K.isDataArrayTexture&&!K.isCompressedArrayTexture)return void console.warn("THREE.WebGLRenderer.copyTextureToTexture3D: only supports THREE.DataTexture3D and THREE.DataTexture2DArray.");_t.setTexture2DArray(K,0),kt=N.TEXTURE_2D_ARRAY}N.pixelStorei(N.UNPACK_FLIP_Y_WEBGL,K.flipY),N.pixelStorei(N.UNPACK_PREMULTIPLY_ALPHA_WEBGL,K.premultiplyAlpha),N.pixelStorei(N.UNPACK_ALIGNMENT,K.unpackAlignment);const fs=N.getParameter(N.UNPACK_ROW_LENGTH),pi=N.getParameter(N.UNPACK_IMAGE_HEIGHT),Al=N.getParameter(N.UNPACK_SKIP_PIXELS),qg=N.getParameter(N.UNPACK_SKIP_ROWS),ca=N.getParameter(N.UNPACK_SKIP_IMAGES);N.pixelStorei(N.UNPACK_ROW_LENGTH,ir.width),N.pixelStorei(N.UNPACK_IMAGE_HEIGHT,ir.height),N.pixelStorei(N.UNPACK_SKIP_PIXELS,Ct),N.pixelStorei(N.UNPACK_SKIP_ROWS,Kt),N.pixelStorei(N.UNPACK_SKIP_IMAGES,an),L.isDataTexture||L.isData3DTexture?N.texSubImage3D(kt,te,Zt,li,Li,je,at,Mt,la,fi,ir.data):K.isCompressedArrayTexture?N.compressedTexSubImage3D(kt,te,Zt,li,Li,je,at,Mt,la,ir.data):N.texSubImage3D(kt,te,Zt,li,Li,je,at,Mt,la,fi,ir),N.pixelStorei(N.UNPACK_ROW_LENGTH,fs),N.pixelStorei(N.UNPACK_IMAGE_HEIGHT,pi),N.pixelStorei(N.UNPACK_SKIP_PIXELS,Al),N.pixelStorei(N.UNPACK_SKIP_ROWS,qg),N.pixelStorei(N.UNPACK_SKIP_IMAGES,ca),0===te&&K.generateMipmaps&&N.generateMipmap(kt),Me.unbindTexture()},this.initRenderTarget=function(L){void 0===rt.get(L).__webglFramebuffer&&_t.setupRenderTarget(L)},this.initTexture=function(L){L.isCubeTexture?_t.setTextureCube(L,0):L.isData3DTexture?_t.setTexture3D(L,0):L.isDataArrayTexture||L.isCompressedArrayTexture?_t.setTexture2DArray(L,0):_t.setTexture2D(L,0),Me.unbindTexture()},this.resetState=function(){F=0,D=0,k=null,Me.reset(),Pn.reset()},typeof __THREE_DEVTOOLS__<"u"&&__THREE_DEVTOOLS__.dispatchEvent(new CustomEvent("observe",{detail:this}))}get coordinateSystem(){return td}get outputColorSpace(){return this._outputColorSpace}set outputColorSpace(t){this._outputColorSpace=t;const e=this.getContext();e.drawingBufferColorSpace=t===Yk?"display-p3":"srgb",e.unpackColorSpace=ei.workingColorSpace===FC?"display-p3":"srgb"}}class Pb extends Fr{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 rd,this.environmentIntensity=1,this.environmentRotation=new rd,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 DP{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=ta()}onUploadCallback(){}set needsUpdate(t){!0===t&&this.version++}get updateRange(){return cg("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;r0){const r=e[n[0]];if(void 0!==r){this.morphTargetInfluences=[],this.morphTargetDictionary={};for(let s=0,o=r.length;sn)return;LP.applyMatrix4(i.matrixWorld);const l=t.ray.origin.distanceTo(LP);return lt.far?void 0:{distance:l,point:Z5.clone().applyMatrix4(i.matrixWorld),index:r,face:null,faceIndex:null,object:i}}const Q5=new O,J5=new O;class Ng extends mf{constructor(t,e){super(t,e),this.isLineSegments=!0,this.type="LineSegments"}computeLineDistances(){const t=this.geometry;if(null===t.index){const e=t.attributes.position,n=[];for(let r=0,s=e.count;r0){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 uc{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 d=n[r];return(r+(o-d)/(n[r+1]-d))/(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 xe:new O);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 O,r=[],s=[],o=[],a=new O,l=new Bt;for(let m=0;m<=t;m++)r[m]=this.getTangentAt(m/t,new O);s[0]=new O,o[0]=new O;let c=Number.MAX_VALUE;const d=Math.abs(r[0].x),h=Math.abs(r[0].y),p=Math.abs(r[0].z);d<=c&&(c=d,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(tr(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(tr(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 BP extends uc{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 xe){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(i$(a,l.x,c.x,d.x,h.x),i$(a,l.y,c.y,d.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]:(AS.subVectors(r[0],r[1]).add(r[0]),c=AS);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 d=c.getPoint(1);return this.currentPoint.copy(d),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 IS extends hn{constructor(t=[new xe(0,-.5),new xe(.5,0),new xe(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=tr(r,0,2*Math.PI);const s=[],o=[],a=[],l=[],c=[],d=1/e,h=new O,p=new xe,m=new O,g=new O,b=new O;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*d*r,C=Math.sin(x),F=Math.cos(x);for(let D=0;D<=t.length-1;D++)h.x=t[D].x*C,h.y=t[D].y,h.z=t[D].x*F,o.push(h.x,h.y,h.z),p.x=M/e,p.y=D/(t.length-1),a.push(p.x,p.y),c.push(l[3*D+0]*C,l[3*D+1],l[3*D+0]*F)}for(let M=0;M0&&x(!0),e>0&&x(!1)),this.setIndex(d),this.setAttribute("position",new ht(h,3)),this.setAttribute("normal",new ht(p,3)),this.setAttribute("uv",new ht(m,2))}copy(t){return super.copy(t),this.parameters=Object.assign({},t.parameters),this}static fromJSON(t){return new Bg(t.radiusTop,t.radiusBottom,t.height,t.radialSegments,t.heightSegments,t.openEnded,t.thetaStart,t.thetaLength)}}class kS extends Bg{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 kS(t.radius,t.height,t.radialSegments,t.heightSegments,t.openEnded,t.thetaStart,t.thetaLength)}}class Yb 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 d=[],h=new O,p=new O,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 F=0;F<=e;F++){const D=F/e;h.x=-t*Math.cos(r+D*s)*Math.sin(o+x*a),h.y=t*Math.cos(o+x*a),h.z=t*Math.sin(r+D*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(D+C,1-x),M.push(c++)}d.push(M)}for(let y=0;y0)&&m.push(d[y][M+1],C,D),(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 dispersion(){return this._dispersion}set dispersion(t){this._dispersion>0!=t>0&&this.version++,this._dispersion=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.dispersion=t.dispersion,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 VS extends Fo{constructor(t){super(),this.isMeshPhongMaterial=!0,this.type="MeshPhongMaterial",this.color=new qe(16777215),this.specular=new qe(1118481),this.shininess=30,this.map=null,this.lightMap=null,this.lightMapIntensity=1,this.aoMap=null,this.aoMapIntensity=1,this.emissive=new qe(0),this.emissiveIntensity=1,this.emissiveMap=null,this.bumpMap=null,this.bumpScale=1,this.normalMap=null,this.normalMapType=Jh,this.normalScale=new xe(1,1),this.displacementMap=null,this.displacementScale=1,this.displacementBias=0,this.specularMap=null,this.alphaMap=null,this.envMap=null,this.envMapRotation=new rd,this.combine=SC,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 v$(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 nO(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 iO(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 Xb{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 _$(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}}hc.prototype.TimeBufferType=Float32Array,hc.prototype.ValueBufferType=Float32Array,hc.prototype.DefaultInterpolation=xb;class zg extends hc{constructor(t,e,n){super(t,e,n)}}zg.prototype.ValueTypeName="bool",zg.prototype.ValueBufferType=Array,zg.prototype.DefaultInterpolation=bb,zg.prototype.InterpolantFactoryMethodLinear=void 0,zg.prototype.InterpolantFactoryMethodSmooth=void 0;class b$ extends hc{}b$.prototype.ValueTypeName="color";class Hg extends hc{}Hg.prototype.ValueTypeName="number";class Whe extends Xb{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 d=c+a;c!==d;c+=4)fo.slerpFlat(s,0,o,c-a,o,c,l);return s}}class $g extends hc{InterpolantFactoryMethodLinear(t){return new Whe(this.times,this.values,this.getValueSize(),t)}}$g.prototype.ValueTypeName="quaternion",$g.prototype.InterpolantFactoryMethodSmooth=void 0;class Gg extends hc{constructor(t,e,n){super(t,e,n)}}Gg.prototype.ValueTypeName="string",Gg.prototype.ValueBufferType=Array,Gg.prototype.DefaultInterpolation=bb,Gg.prototype.InterpolantFactoryMethodLinear=void 0,Gg.prototype.InterpolantFactoryMethodSmooth=void 0;class Wg extends hc{}Wg.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=ta(),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(Yhe(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(hc.toJSON(n[s]));return r}static CreateFromMorphTargetSequence(t,e,n,r){const s=e.length,o=[];for(let a=0;a1){const h=d[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=[];iO(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:w$,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 ud={};class qhe extends Error{constructor(t,e){super(t),this.response=e}}class Ba extends bf{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=ku.get(t);if(void 0!==s)return this.manager.itemStart(t),setTimeout(()=>{e&&e(s),this.manager.itemEnd(t)},0),s;if(void 0!==ud[t])return void ud[t].push({onLoad:e,onProgress:n,onError:r});ud[t]=[],ud[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 d=ud[t],h=c.body.getReader(),p=c.headers.get("X-File-Size")||c.headers.get("Content-Length"),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 F=new ProgressEvent("progress",{lengthComputable:g,loaded:b,total:m});for(let D=0,k=d.length;D{y.error(x)})}()}});return new Response(v)}throw new qhe(`fetch for "${c.url}" responded with ${c.status}: ${c.statusText}`,c)}).then(c=>{switch(l){case"arraybuffer":return c.arrayBuffer();case"blob":return c.blob();case"document":return c.text().then(d=>(new DOMParser).parseFromString(d,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=>{ku.add(t,c);const d=ud[t];delete ud[t];for(let h=0,p=d.length;h{const d=ud[t];if(void 0===d)throw this.manager.itemError(t),c;delete ud[t];for(let h=0,p=d.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 zS extends bf{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=ku.get(t);if(void 0!==o)return s.manager.itemStart(t),setTimeout(function(){e&&e(o),s.manager.itemEnd(t)},0),o;const a=Mb("img");function l(){d(),ku.add(t,this),e&&e(this),s.manager.itemEnd(t)}function c(h){d(),r&&r(h),s.manager.itemError(t),s.manager.itemEnd(t)}function d(){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 Pu extends bf{constructor(t){super(t)}load(t,e,n,r){const s=new Oo,o=new zS(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 HS extends Fr{constructor(t,e=1){super(),this.isLight=!0,this.type="Light",this.color=new qe(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()),void 0!==this.target&&(e.object.target=this.target.uuid),e}}const rO=new Bt,M$=new O,C$=new O;class sO{constructor(t){this.camera=t,this.intensity=1,this.bias=0,this.normalBias=0,this.radius=1,this.blurSamples=8,this.mapSize=new xe(512,512),this.map=null,this.mapPass=null,this.matrix=new Bt,this.autoUpdate=!0,this.needsUpdate=!1,this._frustum=new oS,this._frameExtents=new xe(1,1),this._viewportCount=1,this._viewports=[new _i(0,0,1,1)]}getViewportCount(){return this._viewportCount}getFrustum(){return this._frustum}updateMatrices(t){const e=this.camera,n=this.matrix;M$.setFromMatrixPosition(t.matrixWorld),e.position.copy(M$),C$.setFromMatrixPosition(t.target.matrixWorld),e.lookAt(C$),e.updateMatrixWorld(),rO.multiplyMatrices(e.projectionMatrix,e.matrixWorldInverse),this._frustum.setFromProjectionMatrix(rO),n.set(.5,0,0,.5,0,.5,0,.5,0,0,.5,.5,0,0,0,1),n.multiply(rO)}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.intensity=t.intensity,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 1!==this.intensity&&(t.intensity=this.intensity),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 Khe extends sO{constructor(){super(new br(50,1,.5,500)),this.isSpotLightShadow=!0,this.focus=1}updateMatrices(t){const e=this.camera,n=2*ag*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 S$ extends HS{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(Fr.DEFAULT_UP),this.updateMatrix(),this.target=new Fr,this.distance=n,this.angle=r,this.penumbra=s,this.decay=o,this.map=null,this.shadow=new Khe}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 E$=new Bt,Zb=new O,oO=new O;class Zhe extends sO{constructor(){super(new br(90,1,.5,500)),this.isPointLightShadow=!0,this._frameExtents=new xe(4,2),this._viewportCount=6,this._viewports=[new _i(2,1,1,1),new _i(0,1,1,1),new _i(3,1,1,1),new _i(1,1,1,1),new _i(3,0,1,1),new _i(1,0,1,1)],this._cubeDirections=[new O(1,0,0),new O(-1,0,0),new O(0,0,1),new O(0,0,-1),new O(0,1,0),new O(0,-1,0)],this._cubeUps=[new O(0,1,0),new O(0,1,0),new O(0,1,0),new O(0,1,0),new O(0,0,1),new O(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()),Zb.setFromMatrixPosition(t.matrixWorld),n.position.copy(Zb),oO.copy(n.position),oO.add(this._cubeDirections[e]),n.up.copy(this._cubeUps[e]),n.lookAt(oO),n.updateMatrixWorld(),r.makeTranslation(-Zb.x,-Zb.y,-Zb.z),E$.multiplyMatrices(n.projectionMatrix,n.matrixWorldInverse),this._frustum.setFromProjectionMatrix(E$)}}class A$ extends HS{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 Zhe}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 Qhe extends sO{constructor(){super(new Rb(-5,5,5,-5,.5,500)),this.isDirectionalLightShadow=!0}}class D$ extends HS{constructor(t,e){super(t,e),this.isDirectionalLight=!0,this.type="DirectionalLight",this.position.copy(Fr.DEFAULT_UP),this.updateMatrix(),this.target=new Fr,this.shadow=new Qhe}dispose(){this.shadow.dispose()}copy(t){return super.copy(t),this.target=t.target.clone(),this.shadow=t.shadow.clone(),this}}class $S extends HS{constructor(t,e){super(t,e),this.isAmbientLight=!0,this.type="AmbientLight"}}class Ou{static decodeText(t){if(console.warn("THREE.LoaderUtils: decodeText() has been deprecated with r165 and will be removed with r175. Use TextDecoder instead."),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=ku.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 ku.add(t,c),e&&e(c),s.manager.itemEnd(t),c}).catch(function(c){r&&r(c),ku.remove(t),s.manager.itemError(t),s.manager.itemEnd(t)});ku.add(t,l),s.manager.itemStart(t)}}class O${constructor(t=!0){this.autoStart=t,this.startTime=0,this.oldTime=0,this.elapsedTime=0,this.running=!1}start(){this.startTime=F$(),this.oldTime=this.startTime,this.elapsedTime=0,this.running=!0}stop(){this.getElapsedTime(),this.running=!1,this.autoStart=!1}getElapsedTime(){return this.getDelta(),this.elapsedTime}getDelta(){let t=0;if(this.autoStart&&!this.running)return this.start(),0;if(this.running){const e=F$();t=(e-this.oldTime)/1e3,this.oldTime=e,this.elapsedTime+=t}return t}}function F$(){return(typeof performance>"u"?Date:performance).now()}const lO="\\[\\]\\.:\\/",cfe=new RegExp("["+lO+"]","g"),cO="[^"+lO+"]",dfe="[^"+lO.replace("\\.","")+"]",mfe=new RegExp("^"+/((?:WC+[\/:])*)/.source.replace("WC",cO)+/(WCOD+)?/.source.replace("WCOD",dfe)+/(?:\.(WC+)(?:\[(.+)\])?)?/.source.replace("WC",cO)+/\.(WC+)(?:\[(.+)\])?/.source.replace("WC",cO)+"$"),gfe=["material","materials","bones","map"];class _fe{constructor(t,e,n){const r=n||Ri.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 Ri=(()=>{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(cfe,"")}static parseTrackName(e){const n=mfe.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!==gfe.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;an.name===t||n.userData.name===t);return e?(e.removeFromParent(),new ra(e)):null}getBoundings(){return(new Vs).setFromObject(this.nativeMesh)}clone(){return new ra(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 Mn&&this.disposeMesh(t)}),this.nativeMesh instanceof Mn&&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 wfe extends ra{get supportsFov(){return this.nativeCamera instanceof br||"PerspectiveCamera"==this.nativeCamera.type}get fov(){return this.nativeCamera.fov||NaN}set fov(t){this.supportsFov&&(this.nativeCamera.fov=t,this.nativeCamera.updateProjectionMatrix())}constructor(t){super(t),this.nativeCamera=t}}class Mfe extends Gse{createMaterial(t){let e={};t.color?e={color:t.color}:t.diffuse||(e={color:super.randomColor()});let n=t.shading||"unlit";switch(n){case"unlit":return new qi(Object.assign(Object.assign({},e),{map:t.diffuse||null}));case"standart":return new qb(Object.assign(Object.assign({},e),{map:t.diffuse||null}));case"phong":return new VS(Object.assign(Object.assign({},e),{map:t.diffuse||null}));case"wireframe":return new qi(Object.assign(Object.assign({},e),{wireframe:!0}));default:throw new Error(`"${n}" shading not implemented for three.js`)}}transformPrimitiveZUp(t){t.geometry.rotateX(Math.PI/2)}createPrimitive(t,e={}){var n,r,s,o;let a=null,l=this.createMaterial(e);switch(t.shape){case"PLANE":a=new Mn(new Iu((null===(n=t.dimensions)||void 0===n?void 0:n.x)||1e4,(null===(r=t.dimensions)||void 0===r?void 0:r.y)||1e4,null===(s=t.segments)||void 0===s?void 0:s.x,null===(o=t.segments)||void 0===o?void 0:o.y),l);break;case"BOX":a=new Mn(new sf(...Re.spr(t.dimensions),...t.segments?Re.spr(t.segments):[]),l);break;case"CAPSULE":a=new Mn(new RS(t.radius,t.centersDistance,t.capSegments,t.radialSegments),l),this.transformPrimitiveZUp(a);break;case"CYLINDER":a=new Mn(new Bg(t.radius,t.radius,t.height,t.radialSegments,t.heightSegments),l),this.transformPrimitiveZUp(a);break;case"CONE":a=new Mn(new kS(t.radius,t.height,t.radialSegments,t.heightSegments),l),this.transformPrimitiveZUp(a);break;case"SPHERE":a=new Mn(new Yb(t.radius,t.widthSegments,t.heightSegments),l),this.transformPrimitiveZUp(a);break;case"COMPOUND":a=new No;for(const{position:d,rotation:h,shape:p}of t.children){const m=this.createPrimitive(p,e).nativeMesh;d&&m.position.set(...Re.spr(d)),h&&m.quaternion.set(...Yi.spr(h)),a.add(m)}break;case"MESH":const c=new hn;c.setFromPoints(t.vertices.map(d=>new O(...Re.spr(d)))),c.setIndex(t.faces.reduce((d,h)=>(d.push(...h),d),[])),a=new Mn(c,l)}if(!a)throw new Error(`Primitive with shape "${t.shape}" not implemented`);return void 0!==e.castShadow&&(a.castShadow=e.castShadow),void 0!==e.receiveShadow&&(a.receiveShadow=e.receiveShadow),new ra(a)}createPerspectiveCamera(t={}){return new wfe(new br(t.fov||75,t.aspectRatio||1,t.frustrum?t.frustrum.near:1,t.frustrum?t.frustrum.far:1e4))}}function Q$(i,t){if(t===Ooe)return console.warn("THREE.BufferGeometryUtils.toTrianglesDrawMode(): Geometry already defined as triangles."),i;if(t===jk||t===C4){let e=i.getIndex();if(null===e){const o=[],a=i.getAttribute("position");if(void 0===a)return console.error("THREE.BufferGeometryUtils.toTrianglesDrawMode(): Undefined position attribute. Processing not possible."),i;for(let l=0;l=2.0 are supported.")));const c=new ipe(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 d=0;d=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 Sfe(){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 Bn={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_DISPERSION:"KHR_materials_dispersion",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 Efe{constructor(t){this.parser=t,this.name=Bn.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 Vfe{constructor(t){this.parser=t,this.name=Bn.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 zfe{constructor(t){this.parser=t,this.name=Bn.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 Hfe{constructor(t){this.name=Bn.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 d=r.count,h=r.byteStride,p=new Uint8Array(a,r.byteOffset||0,r.byteLength||0);return o.decodeGltfBufferAsync?o.decodeGltfBufferAsync(d,h,p,r.mode,r.filter).then(function(m){return m.buffer}):o.ready.then(function(){const m=new ArrayBuffer(d*h);return o.decodeGltfBuffer(new Uint8Array(m),d,h,p,r.mode,r.filter),m})})}return null}}class $fe{constructor(t){this.name=Bn.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!==Ua.TRIANGLES&&c.mode!==Ua.TRIANGLE_STRIP&&c.mode!==Ua.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(d=>(l[c]=d,l[c])));return a.length<1?null:(a.push(this.parser.createNodeMesh(t)),Promise.all(a).then(c=>{const d=c.pop(),h=d.isGroup?d.children:[d],p=c[0].count,m=[];for(const g of h){const b=new Bt,v=new O,y=new fo,M=new O(1,1,1),x=new Y5(g.geometry,g.material,p);for(let C=0;C-1,o=s?a.match(/Firefox\/([0-9]+)\./)[1]:-1}this.textureLoader=typeof createImageBitmap>"u"||n&&r<17||s&&o<98?new Pu(this.options.manager):new sfe(this.options.manager),this.textureLoader.setCrossOrigin(this.options.crossOrigin),this.textureLoader.setRequestHeader(this.options.requestHeader),this.fileLoader=new Ba(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 Ef(s,a,r),hd(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,d]of o.children.entries())s(d,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(T,D[k*l+1]),l>=3&&v.setZ(T,D[k*l+2]),l>=4&&v.setW(T,D[k*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(d){d.flipY=!1,d.name=o.name||a.name||"",""===d.name&&"string"==typeof a.uri&&!1===a.uri.startsWith("data:image/")&&(d.name=a.uri);const p=(s.samplers||{})[o.sampler]||{};return d.magFilter=nG[p.magFilter]||cr,d.minFilter=nG[p.minFilter]||xl,d.wrapS=iG[p.wrapS]||Bs,d.wrapT=iG[p.wrapT]||Bs,r.associations.set(d,{textures:t}),d}).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 d=Promise.resolve(l).then(function(h){return new Promise(function(p,m){let g=p;!0===e.isImageBitmapLoader&&(g=function(b){const v=new Oo(b);v.needsUpdate=!0,p(v)}),e.load(Ou.resolveURL(h,s.path),g,void 0,m)})}).then(function(h){return!0===c&&a.revokeObjectURL(l),hd(h,o),h.userData.mimeType=o.mimeType||function tpe(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]=d,d}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[Bn.KHR_TEXTURE_TRANSFORM]){const a=void 0!==n.extensions?n.extensions[Bn.KHR_TEXTURE_TRANSFORM]:void 0;if(a){const l=s.associations.get(o);o=s.extensions[Bn.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,Fo.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 us,Fo.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 qb}loadMaterial(t){const e=this,r=this.extensions,s=this.json.materials[t];let o;const a={},c=[];if((s.extensions||{})[Bn.KHR_MATERIALS_UNLIT]){const h=r[Bn.KHR_MATERIALS_UNLIT];o=h.getMaterialType(),c.push(h.extendParams(a,s,e))}else{const h=s.pbrMetallicRoughness||{};if(a.color=new qe(1,1,1),a.opacity=1,Array.isArray(h.baseColorFactor)){const p=h.baseColorFactor;a.color.setRGB(p[0],p[1],p[2],ds),a.opacity=p[3]}void 0!==h.baseColorTexture&&c.push(e.assignTexture(a,"map",h.baseColorTexture,cs)),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=Ns);const d=s.alphaMode||"OPAQUE";if("BLEND"===d?(a.transparent=!0,a.depthWrite=!1):(a.transparent=!1,"MASK"===d&&(a.alphaTest=void 0!==s.alphaCutoff?s.alphaCutoff:.5)),void 0!==s.normalTexture&&o!==qi&&(c.push(e.assignTexture(a,"normalMap",s.normalTexture)),a.normalScale=new xe(1,1),void 0!==s.normalTexture.scale)){const h=s.normalTexture.scale;a.normalScale.set(h,h)}if(void 0!==s.occlusionTexture&&o!==qi&&(c.push(e.assignTexture(a,"aoMap",s.occlusionTexture)),void 0!==s.occlusionTexture.strength&&(a.aoMapIntensity=s.occlusionTexture.strength)),void 0!==s.emissiveFactor&&o!==qi){const h=s.emissiveFactor;a.emissive=(new qe).setRGB(h[0],h[1],h[2],ds)}return void 0!==s.emissiveTexture&&o!==qi&&c.push(e.assignTexture(a,"emissiveMap",s.emissiveTexture,cs)),Promise.all(c).then(function(){const h=new o(a);return s.name&&(h.name=s.name),hd(h,s),e.associations.set(h,{materials:t}),s.extensions&&Ef(r,h,s),h})}createUniqueName(t){const e=Ri.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[Bn.KHR_DRACO_MESH_COMPRESSION].decodePrimitive(a,e).then(function(l){return rG(l,a,e)})}const o=[];for(let a=0,l=t.length;a0&&Jfe(y,s),y.name=e.createUniqueName(s.name||"mesh_"+t),hd(y,s),v.extensions&&Ef(r,y,v),e.assignFinalMaterial(y),h.push(y)}for(let m=0,g=h.length;m1?new No:1===c.length?c[0]:new Fr,d!==c[0])for(let h=0,p=c.length;h{const h=new Map;for(const[p,m]of r.associations)(p instanceof Fo||p instanceof Oo)&&h.set(p,m);return d.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(Lu[s.path]===Lu.weights?t.traverse(function(p){p.morphTargetInfluences&&l.push(p.name?p.name:p.uuid)}):l.push(a),Lu[s.path]){case Lu.weights:c=Hg;break;case Lu.rotation:c=$g;break;case Lu.position:case Lu.scale:c=Wg;break;default:c=1===n.itemSize?Hg:Wg}const d=void 0!==r.interpolation?Kfe[r.interpolation]:xb,h=this._getArrayFromAccessor(n);for(let p=0,m=l.length;p{r.type.endsWith("Light")&&(console.warn("WORKAROUND: light intensity from GLB divided by 200."),r.intensity*=.005)}),new ra(n.scene)})}}const go=(i,t)=>Array(i).fill(null).map((e,n)=>t(n));class Af{static startDebugView(t,e){let n=this.activeDebugViews.get(t);return n?n.renderers.includes(e)||n.renderers.push(e):(n={view:new Af(t),renderers:[e]},this.activeDebugViews.set(t,n)),n.view}static stopDebugView(t,e){const n=t.world,r=this.activeDebugViews.get(n);r&&(r.renderers=r.renderers.filter(s=>s!==e),0===r.renderers.length&&(r.view.dispose(),this.activeDebugViews.delete(n)))}constructor(t){this.world=t,this.debugScene=null,this.aSub=null,this.rSub=null,this.syncMap=new Map,this.debugScene=new Pb;const e=n=>{var r,s;const o=n.debugBodySettings;let c,l=this.lineSegmentPointsForShape(o.shape);c=l?new Ng((new hn).setFromPoints(l)):null===(r=this.world)||void 0===r?void 0:r.visualScene.factory.createPrimitive(o.shape,{shading:"wireframe",color:0}).nativeMesh,this.syncMap.set(n,c),null===(s=this.debugScene)||void 0===s||s.add(c)};for(const n of this.world.physicsWorld.children)e(n);this.aSub=this.world.physicsWorld.added$.subscribe(n=>e(n)),this.rSub=this.world.physicsWorld.removed$.subscribe(n=>{var r;const s=this.syncMap.get(n);s&&(this.syncMap.delete(n),null===(r=this.debugScene)||void 0===r||r.remove(s))})}get scene(){return this.debugScene}render(t,e){for(const[r,s]of this.syncMap.entries()){const o=r.debugBodySettings;if(o.ignoreTransform||(s.position.set(...Re.spr(r.position)),s.quaternion.set(...Yi.spr(r.rotation))),s.material){let a=16777215;switch(o.type){case"RIGID_DYNAMIC":a=o.sleeping?255:16711680;break;case"RIGID_STATIC":a=65280;break;case"TRIGGER":a=16776960}s.material.color.set(a),s.material.needsUpdate=!0}}const n=t.autoClearColor;n&&(t.autoClearColor=!1),t.render(this.debugScene,e),n&&(t.autoClearColor=!0)}lineSegmentPointsForShape(t){if("BOX"===t.shape){const e=Re.scalarMult(t.dimensions,.5);return[...go(8,n=>new O(n<4?e.x:-e.x,n%4<2?e.y:-e.y,n%2?e.z:-e.z)),...go(8,n=>new O(n%2?e.x:-e.x,n<4?e.y:-e.y,n%4<2?e.z:-e.z)),...go(8,n=>new O(n%4<2?e.x:-e.x,n%2?e.y:-e.y,n<4?e.z:-e.z))]}if("CYLINDER"===t.shape)return[...go(32,e=>new O(t.radius*Math.sin(Math.floor((e+1)/2)*Math.PI/8),t.radius*Math.cos(Math.floor((e+1)/2)*Math.PI/8),-t.height/2)),...go(32,e=>new O(t.radius*Math.sin(Math.floor((e+1)/2)*Math.PI/8),t.radius*Math.cos(Math.floor((e+1)/2)*Math.PI/8),t.height/2)),...go(8,e=>new O(Math.floor(e/2)%2?0:e<4?t.radius:-t.radius,Math.floor(e/2)%2?e<4?t.radius:-t.radius:0,e%2?t.height/2:-t.height/2)),new O(0,0,-t.height/2),new O(0,0,t.height/2)];if("CONE"===t.shape)return[...go(32,e=>new O(t.radius*Math.sin(Math.floor((e+1)/2)*Math.PI/8),t.radius*Math.cos(Math.floor((e+1)/2)*Math.PI/8),-t.height/2)),...go(8,e=>new O(e%2||Math.floor(e/2)%2?0:e<4?t.radius:-t.radius,e%2?0:Math.floor(e/2)%2?e<4?t.radius:-t.radius:0,e%2?t.height/2:-t.height/2)),new O(0,0,-t.height/2),new O(0,0,t.height/2)];if("SPHERE"===t.shape)return[...go(32,e=>new O(t.radius*Math.sin(Math.floor((e+1)/2)*Math.PI/8),t.radius*Math.cos(Math.floor((e+1)/2)*Math.PI/8),0)),...go(32,e=>new O(t.radius*Math.sin(Math.floor((e+1)/2)*Math.PI/8),0,t.radius*Math.cos(Math.floor((e+1)/2)*Math.PI/8))),...go(32,e=>new O(0,t.radius*Math.sin(Math.floor((e+1)/2)*Math.PI/8),t.radius*Math.cos(Math.floor((e+1)/2)*Math.PI/8)))];if("CAPSULE"===t.shape)return[...this.lineSegmentPointsForShape({shape:"CYLINDER",radius:t.radius,height:t.centersDistance}),...go(16,e=>new O(t.radius*Math.cos(Math.floor((e+1)/2)*Math.PI/8),0,t.radius*Math.sin(Math.floor((e+1)/2)*Math.PI/8)+t.centersDistance/2)),...go(16,e=>new O(t.radius*Math.cos(Math.floor((e+1)/2)*Math.PI/8),0,-t.radius*Math.sin(Math.floor((e+1)/2)*Math.PI/8)-t.centersDistance/2)),...go(16,e=>new O(0,t.radius*Math.cos(Math.floor((e+1)/2)*Math.PI/8),t.radius*Math.sin(Math.floor((e+1)/2)*Math.PI/8)+t.centersDistance/2)),...go(16,e=>new O(0,t.radius*Math.cos(Math.floor((e+1)/2)*Math.PI/8),-t.radius*Math.sin(Math.floor((e+1)/2)*Math.PI/8)-t.centersDistance/2))];if("CONVEX_HULL"===t.shape)return[...t.vertices.map(n=>[new O(n.x-.05,n.y,n.z),new O(n.x+.05,n.y,n.z),new O(n.x,n.y-.05,n.z),new O(n.x,n.y+.05,n.z),new O(n.x,n.y,n.z-.05),new O(n.x,n.y,n.z+.05)]).reduce((n,r)=>(n.push(...r),n),[])];if("COMPOUND"===t.shape){const e=[];for(const{position:n,shape:r,rotation:s}of t.children){let o=this.lineSegmentPointsForShape(r);if(!o)return null;e.push(...o.map(a=>new O(...Re.spr(Re.add(n||Re.O,Re.rot(a,s||Yi.O))))))}return e}return null}dispose(){var t,e;this.debugScene=null,null===(t=this.aSub)||void 0===t||t.unsubscribe(),null===(e=this.rSub)||void 0===e||e.unsubscribe(),this.syncMap=new Map}}Af.activeDebugViews=new Map;class sG extends Lse{get physicsDebugViewActive(){return this._physicsDebugViewActive}set physicsDebugViewActive(t){this._physicsDebugViewActive!=t&&(this._physicsDebugViewActive=t,this.world&&(t?this.debugView=Af.startDebugView(this.world,this):(Af.stopDebugView(this.debugView,this),this.debugView=null)))}constructor(t,e,n,r={}){super(t,n,r),this.scene=t,this.camera=e,this.canvas=n,this.world=null,this.debugView=null,this._physicsDebugViewActive=!1,this.nativeRenderer=new Uue(Object.assign({canvas:n,alpha:this.rendererOptions.transparent},this.rendererOptions)),this.nativeRenderer.shadowMap.enabled=!0,this.nativeRenderer.setClearColor(this.rendererOptions.background),this.nativeRenderer.shadowMap.type=c4,this.nativeRenderer.setPixelRatio(this.rendererOptions.forceResolution||devicePixelRatio)}addToWorld(t){this.world=t,this.physicsDebugViewActive&&(this.debugView=Af.startDebugView(this.world,this))}removeFromWorld(t){this.physicsDebugViewActive&&(Af.stopDebugView(this.debugView,this),this.debugView=null),this.world=null}resizeRenderer(t){this.nativeRenderer.setSize(t.x,t.y),(this.camera.nativeCamera instanceof br||"PerspectiveCamera"==this.camera.nativeCamera.type)&&Math.abs(this.camera.nativeCamera.aspect-t.x/t.y)>.01&&(this.camera.nativeCamera.aspect=t.x/t.y,this.camera.nativeCamera.updateProjectionMatrix())}render(){this.nativeRenderer.render(this.scene.nativeScene,this.camera.nativeCamera),this.physicsDebugViewActive&&this.debugView.render(this.nativeRenderer,this.camera.nativeCamera)}dispose(){this.camera.dispose(),this.nativeRenderer.clear(),this.nativeRenderer.dispose(),this.nativeRenderer.domElement=null}}const ape={name:"CopyShader",uniforms:{tDiffuse:{value:null},opacity:{value:1}},vertexShader:"\n\n\t\tvarying vec2 vUv;\n\n\t\tvoid main() {\n\n\t\t\tvUv = uv;\n\t\t\tgl_Position = projectionMatrix * modelViewMatrix * vec4( position, 1.0 );\n\n\t\t}",fragmentShader:"\n\n\t\tuniform float opacity;\n\n\t\tuniform sampler2D tDiffuse;\n\n\t\tvarying vec2 vUv;\n\n\t\tvoid main() {\n\n\t\t\tvec4 texel = texture2D( tDiffuse, vUv );\n\t\t\tgl_FragColor = opacity * texel;\n\n\n\t\t}"};class ZS{constructor(){this.isPass=!0,this.enabled=!0,this.needsSwap=!0,this.clear=!1,this.renderToScreen=!1}setSize(){}render(){console.error("THREE.Pass: .render() must be implemented in derived pass.")}dispose(){}}const lpe=new Rb(-1,1,1,-1,0,1),dpe=new class cpe extends hn{constructor(){super(),this.setAttribute("position",new ht([-1,3,0,-1,-1,0,3,-1,0],3)),this.setAttribute("uv",new ht([0,2,0,0,2,0],2))}};class upe{constructor(t){this._mesh=new Mn(dpe,t)}dispose(){this._mesh.geometry.dispose()}render(t){t.render(this._mesh,lpe)}get material(){return this._mesh.material}set material(t){this._mesh.material=t}}class hpe extends ZS{constructor(t,e){super(),this.textureID=void 0!==e?e:"tDiffuse",t instanceof Sl?(this.uniforms=t.uniforms,this.material=t):t&&(this.uniforms=Q4.clone(t.uniforms),this.material=new Sl({name:void 0!==t.name?t.name:"unspecified",defines:Object.assign({},t.defines),uniforms:this.uniforms,vertexShader:t.vertexShader,fragmentShader:t.fragmentShader})),this.fsQuad=new upe(this.material)}render(t,e,n){this.uniforms[this.textureID]&&(this.uniforms[this.textureID].value=n.texture),this.fsQuad.material=this.material,this.renderToScreen?(t.setRenderTarget(null),this.fsQuad.render(t)):(t.setRenderTarget(e),this.clear&&t.clear(t.autoClearColor,t.autoClearDepth,t.autoClearStencil),this.fsQuad.render(t))}dispose(){this.material.dispose(),this.fsQuad.dispose()}}class oG extends ZS{constructor(t,e){super(),this.scene=t,this.camera=e,this.clear=!0,this.needsSwap=!1,this.inverse=!1}render(t,e,n){const r=t.getContext(),s=t.state;let o,a;s.buffers.color.setMask(!1),s.buffers.depth.setMask(!1),s.buffers.color.setLocked(!0),s.buffers.depth.setLocked(!0),this.inverse?(o=0,a=1):(o=1,a=0),s.buffers.stencil.setTest(!0),s.buffers.stencil.setOp(r.REPLACE,r.REPLACE,r.REPLACE),s.buffers.stencil.setFunc(r.ALWAYS,o,4294967295),s.buffers.stencil.setClear(a),s.buffers.stencil.setLocked(!0),t.setRenderTarget(n),this.clear&&t.clear(),t.render(this.scene,this.camera),t.setRenderTarget(e),this.clear&&t.clear(),t.render(this.scene,this.camera),s.buffers.color.setLocked(!1),s.buffers.depth.setLocked(!1),s.buffers.color.setMask(!0),s.buffers.depth.setMask(!0),s.buffers.stencil.setLocked(!1),s.buffers.stencil.setFunc(r.EQUAL,1,4294967295),s.buffers.stencil.setOp(r.KEEP,r.KEEP,r.KEEP),s.buffers.stencil.setLocked(!0)}}class fpe extends ZS{constructor(){super(),this.needsSwap=!1}render(t){t.state.buffers.stencil.setLocked(!1),t.state.buffers.stencil.setTest(!1)}}class ppe{constructor(t,e){if(this.renderer=t,this._pixelRatio=t.getPixelRatio(),void 0===e){const n=t.getSize(new xe);this._width=n.width,this._height=n.height,(e=new Mu(this._width*this._pixelRatio,this._height*this._pixelRatio,{type:Jm})).texture.name="EffectComposer.rt1"}else this._width=e.width,this._height=e.height;this.renderTarget1=e,this.renderTarget2=e.clone(),this.renderTarget2.texture.name="EffectComposer.rt2",this.writeBuffer=this.renderTarget1,this.readBuffer=this.renderTarget2,this.renderToScreen=!0,this.passes=[],this.copyPass=new hpe(ape),this.copyPass.material.blending=Jc,this.clock=new O$}swapBuffers(){const t=this.readBuffer;this.readBuffer=this.writeBuffer,this.writeBuffer=t}addPass(t){this.passes.push(t),t.setSize(this._width*this._pixelRatio,this._height*this._pixelRatio)}insertPass(t,e){this.passes.splice(e,0,t),t.setSize(this._width*this._pixelRatio,this._height*this._pixelRatio)}removePass(t){const e=this.passes.indexOf(t);-1!==e&&this.passes.splice(e,1)}isLastEnabledPass(t){for(let e=t+1;e0?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;lG.fromArray(r,t),bO.fromArray(r,e),cG.fromArray(r,n),Va.subVectors(cG,bO),dG.subVectors(lG,bO),Va.cross(dG),Va.normalize(),s.push(Va.x,Va.y,Va.z),s.push(Va.x,Va.y,Va.z),s.push(Va.x,Va.y,Va.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 d=this.vertices.length;let h=this.parseVertexIndex(t,d),p=this.parseVertexIndex(e,d),m=this.parseVertexIndex(n,d);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?(QS.setRGB(parseFloat(h[4]),parseFloat(h[5]),parseFloat(h[6])).convertSRGBToLinear(),e.colors.push(QS.r,QS.g,QS.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"===d){const p=c.slice(1).trim().split(aG),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 No;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 ht(d.normals,3)),d.colors.length>0&&(g=!0,b.setAttribute("color",new ht(d.colors,3))),!0===d.hasUVIndices&&b.setAttribute("uv",new ht(d.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 ht(e.vertices,3)),e.colors.length>0&&void 0!==e.colors[0]&&(l.setAttribute("color",new ht(e.colors,3)),a.vertexColors=!0);const c=new zb(l,a);s.add(c)}return s}}class xO extends bf{constructor(t){super(t)}load(t,e,n,r){const s=this,o=""===this.path?Ou.extractUrlBase(t):this.path,a=new Ba(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,d):c;h=h.toLowerCase();let p=d>=0?c.substring(d+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 Mpe(this.resourcePath||e,this.materialOptions);return a.setCrossOrigin(this.crossOrigin),a.setManager(this.manager),a.setMaterials(o),a}}class Mpe{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:lc,this.wrap=void 0!==this.options.wrap?this.options.wrap:Bs}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),d=e.loadTexture(function s(a,l){return"string"!=typeof l||""===l?"":/^https?:\/\//i.test(l)?l:a+l}(e.baseUrl,c.url));d.repeat.copy(c.scale),d.offset.copy(c.offset),d.wrapS=e.wrap,d.wrapT=e.wrap,("map"===a||"emissiveMap"===a)&&(d.colorSpace=cs),r[a]=d}for(const a in n){const l=n[a];let c;if(""!==l)switch(a.toLowerCase()){case"kd":r.color=(new qe).fromArray(l).convertSRGBToLinear();break;case"ks":r.specular=(new qe).fromArray(l).convertSRGBToLinear();break;case"ke":r.emissive=(new qe).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 VS(r),this.materials[t]}getTextureParams(t,e){const n={scale:new xe(1,1),offset:new xe(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:w$;let a=o.getHandler(t);null===a&&(a=new Pu(o)),a.setCrossOrigin&&a.setCrossOrigin(this.crossOrigin);const l=a.load(t,n,r,s);return void 0!==e&&(l.mapping=e),l}}const Cpe=["determinateSpinner"];function Spe(i,t){if(1&i&&(ki(),G(0,"svg",11),Ie(1,"circle",12),j()),2&i){const e=re();It("viewBox",e._viewBox()),V(1),qo("stroke-dasharray",e._strokeCircumference(),"px")("stroke-dashoffset",e._strokeCircumference()/2,"px")("stroke-width",e._circleStrokeWidth(),"%"),It("r",e._circleRadius())}}const Epe=Jy(class{constructor(i){this._elementRef=i}},"primary"),Ape=new me("mat-progress-spinner-default-options",{providedIn:"root",factory:function Dpe(){return{diameter:uG}}}),uG=100;let e0=(()=>{class i extends Epe{constructor(e,n,r){super(e),this.mode="mat-spinner"===this._elementRef.nativeElement.nodeName.toLowerCase()?"indeterminate":"determinate",this._value=0,this._diameter=uG,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,Ps(e)))}get diameter(){return this._diameter}set diameter(e){this._diameter=Ps(e)}get strokeWidth(){return this._strokeWidth??this.diameter/10}set strokeWidth(e){this._strokeWidth=Ps(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)(E(vt),E(kr,8),E(Ape))},i.\u0275cmp=ot({type:i,selectors:[["mat-progress-spinner"],["mat-spinner"]],viewQuery:function(e,n){if(1&e&&$n(Cpe,5),2&e){let r;At(r=Dt())&&(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&&(It("aria-valuemin",0)("aria-valuemax",100)("aria-valuenow","determinate"===n.mode?n.value:null)("mode",n.mode),qo("width",n.diameter,"px")("height",n.diameter,"px"),ln("_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:[dt],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&&(fe(0,Spe,2,8,"ng-template",null,0,zc),G(2,"div",1,2),ki(),G(4,"svg",3),Ie(5,"circle",4),j()(),va(),G(6,"div",5)(7,"div",6)(8,"div",7),sy(9,8),j(),G(10,"div",9),sy(11,8),j(),G(12,"div",10),sy(13,8),j()()()),2&e){const r=Zi(1);V(4),It("viewBox",n._viewBox()),V(1),qo("stroke-dasharray",n._strokeCircumference(),"px")("stroke-dashoffset",n._strokeDashOffset(),"px")("stroke-width",n._circleStrokeWidth(),"%"),It("r",n._circleRadius()),V(4),U("ngTemplateOutlet",r),V(2),U("ngTemplateOutlet",r),V(2),U("ngTemplateOutlet",r)}},dependencies:[xy],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})(),Ipe=(()=>{class i{}return i.\u0275fac=function(e){return new(e||i)},i.\u0275mod=en({type:i}),i.\u0275inj=Wt({imports:[co,Jn]}),i})();const Rpe=["previewCanvasContainer"],kpe=["previewCanvas"];function Ppe(i,t){if(1&i){const e=jn();Gr(0),G(1,"label",11),Be(2),j(),G(3,"input",12),Oe("change",function(r){Vt(e);const s=re().$implicit;return s.value=r.currentTarget.checked,Et(s.change(s.value))}),j(),Wr()}if(2&i){const e=re(),n=e.index,r=e.$implicit,s=re().index;V(1),U("for","custom_control_"+s+"_"+n),V(1),ui(r.label),V(1),U("id","custom_control_"+s+"_"+n)("type",r.type)("checked",r.value)}}function Ope(i,t){if(1&i){const e=jn();G(0,"div",9)(1,"label",11),Be(2),j(),G(3,"input",14),Oe("change",function(){const s=Vt(e).$implicit,o=re(2).$implicit;return o.value=s,Et(o.change(o.value))}),j()()}if(2&i){const e=t.$implicit,n=re(2),r=n.index,s=n.$implicit,o=re().index;V(1),U("for","custom_control_"+o+"_"+r+"_"+e),V(1),ui(e),V(1),U("id","custom_control_"+o+"_"+r+"_"+e)("checked",s.value===e)}}function Fpe(i,t){if(1&i&&(G(0,"div",13)(1,"label"),Be(2),j(),fe(3,Ope,4,4,"div",8),j()),2&i){const e=re().$implicit;V(2),ui(e.label),V(1),U("ngForOf",e.options)}}function Lpe(i,t){if(1&i){const e=jn();Gr(0),G(1,"label",11),Be(2),j(),G(3,"input",15),Oe("colorChange",function(r){Vt(e);const s=re().$implicit,o=re(2);return s.value=o.toRGB(r.value),Et(s.change(s.value))}),j(),Ie(4,"ngx-mat-color-toggle",16)(5,"ngx-mat-color-picker",null,17),Wr()}if(2&i){const e=Zi(6),n=re(),r=n.index,s=n.$implicit,o=re().index;V(1),U("for","custom_control_"+o+"_"+r),V(1),ui(s.label),V(1),U("ngxMatColorPicker",e),V(1),U("for",e)}}function Npe(i,t){if(1&i){const e=jn();Gr(0),G(1,"label",11),Be(2),j(),G(3,"input",18),Oe("change",function(r){Vt(e);const s=re().$implicit;return s.value=r.currentTarget.value,Et(s.change(s.value))}),j(),Wr()}if(2&i){const e=re(),n=e.index,r=e.$implicit,s=re().index;V(1),U("for","custom_control_"+s+"_"+n),V(1),ui(r.label),V(1),U("id","custom_control_"+s+"_"+n)("min",r.minValue)("max",r.maxValue)("step",r.valueStep)("value",r.value)}}function Bpe(i,t){if(1&i&&(G(0,"div",9),fe(1,Ppe,4,5,"ng-container",6),fe(2,Fpe,4,2,"div",10),fe(3,Lpe,7,4,"ng-container",6),fe(4,Npe,4,7,"ng-container",6),j()),2&i){const e=t.$implicit;V(1),U("ngIf","checkbox"===e.type),V(1),U("ngIf","radio"===e.type),V(1),U("ngIf","color"===e.type),V(1),U("ngIf","slider"===e.type)}}function Upe(i,t){if(1&i&&(Gr(0),G(1,"h4"),Be(2),j(),fe(3,Bpe,5,4,"div",8),Wr()),2&i){const e=t.$implicit;V(2),ui(e.title),V(1),U("ngForOf",e.controls)}}function Vpe(i,t){if(1&i){const e=jn();G(0,"div",9)(1,"label",11),Be(2),j(),G(3,"input",19),Oe("change",function(r){return Et(Vt(e).$implicit.visible=r.currentTarget.checked)}),j()()}if(2&i){const e=t.$implicit;V(1),U("for","visibility_"+e.name),V(1),ui(e.name),V(1),U("id","visibility_"+e.name)("checked",e.visible)}}function zpe(i,t){if(1&i&&(Gr(0),G(1,"h4"),Be(2,"Objects visibility"),j(),fe(3,Vpe,4,4,"div",8),Wr()),2&i){const e=re();V(3),U("ngForOf",e.meshes)}}function Hpe(i,t){1&i&&Ie(0,"mat-spinner",20)}const sa=i=>{i.colorSpace="srgb",i.anisotropy=8,i.magFilter=vr,i.minFilter=vr};let hG=(()=>{class i{constructor(e){this.cdr=e,this.visibilityControls=!0,this.groupFunction=null,this.customControls=[],this.onObjectLoaded=new $e,this._paths$=new Qe(null),this.destroyed$=new Te,this.entity=null,this.meshes=[]}get paths(){return this._paths$.getValue()}set paths(e){this._paths$.next(e)}ngAfterViewInit(){var e=this;return nt(function*(){var s;e.world=new ok(new yO,{init:(s=nt(function*(){}),function(){return s.apply(this,arguments)}),simulate:()=>{}}),yield e.world.init(),e.world.visualScene.nativeScene.add(new $S(16777215,2));let n=new Qe({x:1,y:1});e.renderer=e.world.addRenderer(e.world.visualScene.factory.createPerspectiveCamera({frustrum:{near:.01,far:1e4}}),e.previewCanvas.nativeElement,{size:n.asObservable(),background:11184810}),e.controller=new Hse(e.renderer,{mouseOptions:{canvas:e.previewCanvas.nativeElement},orbiting:{sensitivityX:2,sensitivityY:2},orbitingElasticity:30}),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(Ue(e.destroyed$)).subscribe(function(){var s=nt(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 Jb,h=yield(new xO).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 No;y.add(...b[v]),y.name=v,p.remove(...b[v]),p.add(y)}}e.meshes=p.children,e.meshes.sort((b,v)=>b.name>v.name?1:-1),p.traverse(b=>{if(b instanceof Mn){const v=b.material instanceof Array?b.material:[b.material];for(const y of v)y.transparent=!0,y.alphaTest=.5,y instanceof qi&&y.map&&(y.map.wrapS=er,y.map.wrapT=er,sa(y.map),y.map.needsUpdate=!0)}}),e.onObjectLoaded.next(p),e.entity=new Jo({object3D:new ra(p)}),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=Re.scalarMult(Re.add(m.min,m.max),.5),e.controller.spherical={phi:1.22,theta:-1.32,radius:Re.dist(m.min,m.max)},e.cdr.markForCheck()}});return function(o){return s.apply(this,arguments)}}())})()}toRGB(e){return(e?.r||0)<<16|(e?.g||0)<<8|(e?.b||0)}ngOnDestroy(){this.destroyed$.next(),this.destroyed$.complete()}}return i.\u0275fac=function(e){return new(e||i)(E(Qn))},i.\u0275cmp=ot({type:i,selectors:[["app-obj-viewer"]],viewQuery:function(e,n){if(1&e&&($n(Rpe,5),$n(kpe,5)),2&e){let r;At(r=Dt())&&(n.previewCanvasContainer=r.first),At(r=Dt())&&(n.previewCanvas=r.first)}},inputs:{paths:"paths",visibilityControls:"visibilityControls",groupFunction:"groupFunction",customControls:"customControls"},outputs:{onObjectLoaded:"onObjectLoaded"},decls:8,vars:3,consts:[[1,"previewCanvasContainer"],["previewCanvasContainer",""],["width","640","height","480"],["previewCanvas",""],["id","controls"],[4,"ngFor","ngForOf"],[4,"ngIf"],["mode","indeterminate",4,"ngIf"],["class","controls-list",4,"ngFor","ngForOf"],[1,"controls-list"],["style","width: 100%",4,"ngIf"],[3,"for"],[3,"id","type","checked","change"],[2,"width","100%"],["type","radio",3,"id","checked","change"],["matInput","",1,"hidden",3,"ngxMatColorPicker","colorChange"],["matSuffix","",3,"for"],["picker",""],["type","range",3,"id","min","max","step","value","change"],["type","checkbox",3,"id","checked","change"],["mode","indeterminate"]],template:function(e,n){1&e&&(G(0,"div",0,1),Ie(2,"canvas",2,3),G(4,"div",4),fe(5,Upe,4,2,"ng-container",5),fe(6,zpe,4,1,"ng-container",6),j(),fe(7,Hpe,1,0,"mat-spinner",7),j()),2&e&&(V(5),U("ngForOf",n.customControls),V(1),U("ngIf",n.visibilityControls),V(1),U("ngIf",!n.entity))},dependencies:[lo,vi,Xte,rc,e0,jie,yC,NH],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%] > h4[_ngcontent-%COMP%]{margin:0}.previewCanvasContainer[_ngcontent-%COMP%] #controls[_ngcontent-%COMP%] .controls-list[_ngcontent-%COMP%]{width:100%;display:flex;-webkit-user-select:none;user-select:none;align-items:center}.previewCanvasContainer[_ngcontent-%COMP%] #controls[_ngcontent-%COMP%] .controls-list[_ngcontent-%COMP%] > span[_ngcontent-%COMP%]{flex-grow:1}.previewCanvasContainer[_ngcontent-%COMP%] #controls[_ngcontent-%COMP%] .controls-list[_ngcontent-%COMP%] > label[_ngcontent-%COMP%]{flex-grow:1}"],changeDetection:0}),i})();function $pe(i,t){if(1&i){const e=jn();ki(),G(0,"circle",5),Oe("mousedown",function(r){return Vt(e),Et(re().startDrag(r))}),ct(1,"async"),ct(2,"async"),j()}if(2&i){const e=re();let n,r;It("cx",(null==(n=ut(1,3,e.mapPointer$))?null:n.x)||0)("cy",(null==(r=ut(2,5,e.mapPointer$))?null:r.y)||0)("r",10)}}const Gpe=function(){return{"stroke-width":3}};let fG=(()=>{class i{constructor(e){this.ref=e,this._roadSpline$=new Qe([]),this._pointer$=new Qe(null),this._projection$=new Qe("nz"),this._roadSplineProjected$=new Qe([]),this._pointerProjected$=new Qe(yi.O),this.splineClosed=!1,this.pointerChange=new $e,this.svgSize$=new Qe({x:100,y:100}),this.scalingSquare$=new Qe({x:0,y:0,width:100,height:100}),this.mapPolyline$=new Qe(""),this.mapPointer$=new Qe(null),this.isShiftPressed=!1,this.destroyed$=new Te,this.isDragging=!1}set roadSpline(e){this._roadSpline$.next(e)}set pointer(e){this._pointer$.next(e)}set projection(e){this._projection$.next(e)}get trackLength$(){return this._roadSpline$.pipe(tt(e=>{let n=0;for(let r=1;r{"Shift"===n.key&&(this.isShiftPressed=!0)}),To(window,"keyup").pipe(Ue(this.destroyed$)).subscribe(n=>{"Shift"===n.key&&(this.isShiftPressed=!1)}),Ra([this._roadSpline$,this._projection$]).pipe(Ue(this.destroyed$)).subscribe(([n,r])=>{this._roadSplineProjected$.next(n.map(s=>this.project(s)))}),Ra([this._pointer$,this._projection$]).pipe(Ue(this.destroyed$)).subscribe(([n,r])=>{this._pointerProjected$.next(this.project(n||Re.O))}),this._roadSplineProjected$.pipe(Ue(this.destroyed$),tt(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.y)},s={x:Math.max(s.x,a.x),y:Math.max(s.y,a.y)}});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$),Ra([this._roadSplineProjected$,this.scalingSquare$,this.svgSize$]).pipe(Ue(this.destroyed$),tt(([n,r,s])=>{const o=n.map(a=>({x:(a.x-r.x)*s.x/r.width,y:(r.y-a.y)*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$),Ra([this._pointerProjected$,this.scalingSquare$.asObservable(),this.svgSize$]).pipe(Ue(this.destroyed$),tt(([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()}startDrag(e){this.isDragging=!0,this.updatePointer(e)}drag(e){this.isDragging&&this.updatePointer(e)}endDrag(){this.isDragging=!1}getClosestProjectedLineIndex(e){const n=this._roadSplineProjected$.getValue();let r=-1,s=Number.MAX_SAFE_INTEGER;for(let d=1;d{return(i=Df||(Df={})).ThreeModel="model",i.Bitmap="bitmap",i.TwoSidedBitmap="two_sided_bitmap",Df;var i})();class Qpe extends QH{constructor(t,e,n){super(t,{loadDepth:40,inertia:2}),this.mapGraph=t,this.famPath=e,this.hideUnknownEntities$=n,this.textureLoader=new Pu,this.terrainMaterials={},this.objLoader=new Jb,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(Ql(),Ue(this._onRemoved$)).subscribe(e=>{for(const n of this.unknownEntities)n.visible=!e})}getPlaceholderTexture(){var t=this;return nt(function*(){return t._placeholder?t._placeholder:(t._placeholderPromise||(t._placeholderPromise=t.textureLoader.loadAsync("assets/placeholder_texture.png")),t._placeholderPromise)})()}getPlaceholderTerrainTexture(){var t=this;return nt(function*(){return t._placeholderTerrain?t._placeholderTerrain:(t._placeholderTerrainPromise||(t._placeholderTerrainPromise=t.textureLoader.loadAsync("assets/placeholder_texture.png").then(e=>(e.wrapS=Bs,e.wrapT=er,sa(e),e.flipY=!0,e))),t._placeholderTerrainPromise)})()}loadChunk(t){var e=this;return nt(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 Mn&&(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:Re.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:Yi.fromAngle(Re.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 Jo({object3D:new ra(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 qi({side:Ns,transparent:!0,visible:!1}),this.famPath?this.textureLoader.loadAsync(`${this.famPath}/background/${t}.png`).then(e=>{e.wrapS=Bs,e.wrapT=er,sa(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 nt(function*(){let n=!1;if(t.type==Df.ThreeModel){let r;try{if(!e.famPath)throw new Error;const o=new xO,a=new Jb,l=yield o.loadAsync(`${e.famPath}/props/${t.data.data.resource_id}/0/material.mtl`);l.preload(),a.setMaterials(l),r=new ra(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 Mn){const a=o.material instanceof Array?o.material:[o.material];for(const l of a)l.transparent=!0,l.alphaTest=.5,l instanceof qi&&l.map&&(l.map.wrapS=er,l.map.wrapT=er,sa(l.map),l.map.needsUpdate=!0)}});const s=new Jo({object3D: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,d)=>new Array(d).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 No,[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,d]=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 Jo({object3D:new ra(s)});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 nt(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=>(sa(h),new qi({map:h,alphaTest:.5,transparent:!0,side:Ns}))),d=new Mn(new Iu(e.x,e.y),c[0]);if(d.rotateX(Math.PI/2),d.position.set(0,0,e.y/2),c.length>1){let h=-1;Ym(r.world).pipe(o4(n&&!isNaN(+n)?1e3*+n:250)).subscribe(()=>{h=(h+1)%c.length,d.material=c[h]})}return[d,a]})()}}let Jpe=(()=>{class i{constructor(e,n,r){this.eelDelegate=e,this.cdr=n,this.mainService=r,this._resource$=new Qe(null),this.changed=new $e,this.previewLoading$=new Qe(!0),this.previewFamLocation$=new Qe(null),this.previewFamLoading$=new Qe(!1),this.pointer$=new Qe(null),this.selectedSplineIndex$=new Qe(0),this.selectedSplineItem$=new Qe(null),this.selectedAiInfoItem$=new Qe(null),this.selectedTerrainItem$=new Qe(null),this.famPath=null,this.name="",this.renderer=null,this.map=null,this.isOpenedTrack=!0,this.roadPath=null,this.destroyed$=new Te}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=>({x:e.position.x,y:e.position.z,z:e.position.y}))||[]}ngAfterViewInit(){var e=this;return nt(function*(){var s;e.world=new ok(new yO,{init:(s=nt(function*(){}),function(){return s.apply(this,arguments)}),simulate:()=>{},loader:{loadFromGgGlb:function(){var s=nt(function*(...o){return[]});return function(){return s.apply(this,arguments)}}()}}),yield e.world.init(),e.skySphere=new Jo({object3D:e.world.visualScene.factory.createPrimitive({shape:"SPHERE",radius:1e3},{color:16777215})}),e.skySphere.object3D.nativeMesh.material.side=Ns,e.world.addEntity(e.skySphere),e.selectionSphere=new Jo({object3D: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 $S(16777215,2));let n=new Qe({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=Yi.lookAt(e.renderer.camera.position,Re.add(e.renderer.camera.position,Re.Y),Re.Z),Ym(e.world).pipe(Ue(e.destroyed$)).subscribe(()=>{e.renderer&&(e.skySphere.position=e.renderer.camera.position,e.pointer$.next(e.renderer.camera.position))}),e.controller=new n4(e.world.keyboardInput,e.renderer,{mouseOptions:{canvas:e.previewCanvas.nativeElement,pointerLock:!0},keymap:"wasd+arrows",cameraLinearSpeed:40,cameraBoostMultiplier:4,cameraMovementElasticity:100,cameraRotationElasticity:30,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(Ue(e.destroyed$)).subscribe(function(){var s=nt(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(Ue(e.destroyed$),gn(([s,o])=>!!e.resource&&s.startsWith(e.resource.id)),gl(3e3)).subscribe(nt(function*(){e.previewLoading$.next(!0),yield e.postTmpUpdates(e.resource?.id),yield e.loadPreview(),e.previewLoading$.next(!1)})),e.selectedSplineIndex$.pipe(Ue(e.destroyed$),gl(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=Re.add(a,Re.rotAround({x:10,y:-12,z:5},{x:0,y:0,z:1},-e.resource.data.road_spline[s].orientation)),e.renderer.rotation=Yi.lookAt(e.renderer.position,a,{x:0,y:0,z:1}),e.controller.reset())}e.selectedSplineItem$.next({id:sc(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:sc(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:sc(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 nt(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 Pu,o=r.find(a=>a.endsWith("spherical.png"));if(o){const a=yield s.loadAsync(o);a.colorSpace="srgb",a.mapping=cc,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 nt(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})()}onPointerChange(e){this.renderer&&(this.renderer.position=e)}loadPreview(){var e=this;return nt(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=Km.fromMapArray(e.roadPath.map((r,s)=>({path:`${e.terrainChunksObjLocation}terrain_chunk_${s}`,position:r,loadOptions:{}}))||[],!e.isOpenedTrack);e.unloadPreview(),e.map=new Qpe(n,e.famPath&&"resources/"+e.famPath,e.mainService.hideHiddenFields$),e.map.resource=e.resource,e.map.isOpenedTrack=e.isOpenedTrack,Ym(e.world).pipe(Ue(e.destroyed$)).subscribe(()=>{e.map&&e.renderer&&e.map.loaderCursor$.next(e.renderer.position)}),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 nt(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)(E(Jl),E(Qn),E(Fa))},i.\u0275cmp=ot({type:i,selectors:[["app-tri-map-block-ui"]],viewQuery:function(e,n){if(1&e&&($n(Wpe,5),$n(jpe,5)),2&e){let r;At(r=Dt())&&(n.previewCanvasContainer=r.first),At(r=Dt())&&(n.previewCanvas=r.first)}},inputs:{resource:"resource"},outputs:{changed:"changed"},decls:49,vars:44,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","projection","pointerChange"],[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&&(G(0,"div",0)(1,"h4"),Be(2,"Preview *.FAM file"),j(),G(3,"mat-form-field",1)(4,"mat-label"),Be(5,"Current preview FAM"),j(),G(6,"mat-select",2,3),Oe("valueChange",function(s){return n.onFamSelected(s)}),ct(8,"async"),ct(9,"async"),fe(10,Ype,2,2,"mat-option",4),G(11,"mat-option",5),Be(12,"custom"),j()()(),fe(13,qpe,9,3,"ng-container",6),fe(14,Xpe,1,1,"mat-spinner",7),ct(15,"async"),j(),G(16,"div",8)(17,"div",9,10),Ie(19,"canvas",11,12),fe(21,Kpe,1,0,"mat-spinner",13),ct(22,"async"),j(),G(23,"div",14,10)(25,"mat-form-field",1)(26,"mat-label"),Be(27,"Spline item"),j(),G(28,"input",15),Oe("ngModelChange",function(s){return n.selectedSplineIndex$.next(s)}),ct(29,"async"),ct(30,"async"),j()(),G(31,"app-minimap",16),Oe("pointerChange",function(s){return n.onPointerChange(s)}),ct(32,"async"),j()()(),G(33,"h4"),Be(34,"Road spline item"),j(),Ie(35,"app-compound-block-ui",17),ct(36,"async"),G(37,"h4"),Be(38,"AI info (block for 4 spline items)"),j(),Ie(39,"app-compound-block-ui",17),ct(40,"async"),G(41,"h4"),Be(42,"Terrain (block for 4 spline items)"),j(),Ie(43,"app-compound-block-ui",17),ct(44,"async"),G(45,"h4"),Be(46,"Common"),j(),Ie(47,"app-compound-block-ui",18),ct(48,"async")),2&e){const r=Zi(7);let s;V(6),U("value",n.previewFamPossibleLocations.includes(ut(8,21,n.previewFamLocation$))?ut(9,23,n.previewFamLocation$):"custom"),V(4),U("ngForOf",n.previewFamPossibleLocations),V(3),U("ngIf","custom"==r.value),V(1),U("ngIf",ut(15,25,n.previewFamLoading$)),V(7),U("ngIf",ut(22,27,n.previewLoading$)),V(7),U("min",0)("max",4*(null==(s=ut(29,29,n._resource$))?null:s.data.num_chunks)-1)("ngModel",ut(30,31,n.selectedSplineIndex$)),V(3),U("roadSpline",n.roadSpline)("pointer",ut(32,33,n.pointer$))("splineClosed",!n.isOpenedTrack)("projection","nz"),V(4),U("resource",ut(36,35,n.selectedSplineItem$))("hideBlockActions",!0),V(4),U("resource",ut(40,37,n.selectedAiInfoItem$))("hideBlockActions",!0),V(4),U("resource",ut(44,39,n.selectedTerrainItem$))("hideBlockActions",!0),V(4),U("resource",ut(48,41,n._resource$))("hideBlockActions",!0)("fieldWhitelist",Rs(43,Zpe))}},dependencies:[lo,vi,_l,mu,nc,_u,gu,Zc,yl,Ro,rc,rb,pb,Nm,e0,ec,fG,Ia],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-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})();const pG=i=>new Promise(t=>setTimeout(t,i)),mG=(i,t,e=null)=>{const n=document.createElement("canvas"),r=n.getContext("2d",{willReadFrequently:!0}),s=i.width,o=i.height;n.width=s,n.height=o,r.drawImage(i,0,0,s,o);const a=r.getImageData(0,0,s,o);for(let l=0;l{if(!(o instanceof Mn))return;let a=-1;if(o.name.startsWith("lbl__rt_frnt")?a=0:o.name.startsWith("lbl__lt_frnt")?a=1:o.name.startsWith("lbl__rt_rear")?a=2:o.name.startsWith("lbl__lt_rear")&&(a=3),a>-1){this.wheels[a]=o,a<2&&(this.frontWheels[a]=o),o.geometry.boundingBox||o.geometry.computeBoundingBox();const l=Re.avg(o.geometry.boundingBox.min,o.geometry.boundingBox.max);o.geometry.translate(...Re.spr(Re.neg(l))),o.position.set(...Re.spr(l)),this.wheelIdlePositions[a]=l}(o.name.includes("rsid")||o.name.includes("lite"))&&(r.push(o),this.originalTexWithTailLights=o.material.map)}),!this.originalTexWithTailLights)throw new Error("Not a driveable NFS1 car");this.tailLightColors=n.includes("TRAFFC.CFM")?[9509903,16711680]:[3212546,16258068],this.texWithTailLightsImg=document.createElement("img"),this.texWithTailLights=new Oo(this.texWithTailLightsImg),this.texWithTailLights.flipY=this.originalTexWithTailLights.flipY,sa(this.texWithTailLights),this.recolorTailLights(this.tailLightColors[0]).then();for(const o of r)o.material.map=this.texWithTailLights;const s=new Pu;this.tyreTextures=[1,2,3,4].map(o=>s.load(`${n}/tyr${o}.png`));for(const o of this.tyreTextures)sa(o);this.tyreMaterial=new qi({map:this.tyreTextures[0]}),this.tyreMaterial.transparent=!0,this.tyreMaterial.alphaTest=.5,this.tyreMaterial.map.wrapS=er,this.tyreMaterial.map.wrapT=er,this.tyreMaterial.polygonOffset=!0,this.tyreMaterial.polygonOffsetFactor=-4;for(const o of this.wheels)o.material=this.tyreMaterial}get tailLightsOn(){return this._tailLightsOn}set tailLightsOn(t){t!==this._tailLightsOn&&(this._tailLightsOn=t,this.recolorTailLights(this.tailLightColors[t?1:0]))}get speed(){return this._speed}set speed(t){if(t!==this._speed){switch(this._speed=t,this.tyreTextureUpdateTimer&&clearInterval(this.tyreTextureUpdateTimer),t){case"idle":this.tyreMaterial.map=this.tyreTextures[0];break;case"slow":let e=!0;this.tyreTextureUpdateTimer=setInterval(()=>{this.tyreMaterial.map=this.tyreTextures[e?1:2],this.tyreMaterial.needsUpdate=!0,e=!e},16);break;case"fast":this.tyreMaterial.map=this.tyreTextures[3]}this.tyreMaterial.needsUpdate=!0}}get steeringAngle(){return this._steeringAngle}set steeringAngle(t){if(t!==this._steeringAngle){this._steeringAngle=t;for(const e of this.frontWheels)e.rotation.set(0,0,t)}}recolorTailLights(t){var e=this;return nt(function*(){if(e.originalTexWithTailLights&&e.texWithTailLights&&e.texWithTailLightsImg){for(let n=100;n>0&&!e.originalTexWithTailLights.source.data;n--)yield pG(50);((i,t,e,n=null)=>{const[r,s,o]=[t>>16,t>>8&255,255&t],[a,l,c]=[e>>16,e>>8&255,255&e];mG(i,(d,h)=>{d[h]==r&&d[h+1]==s&&d[h+2]==o&&(d[h]=a,d[h+1]=l,d[h+2]=c)},n)})(e.originalTexWithTailLights.source.data,e.tailLightsTexColor,t,e.texWithTailLightsImg),e.texWithTailLights.needsUpdate=!0}})()}dispose(){this.texWithTailLightsImg&&(this.texWithTailLightsImg.remove(),this.texWithTailLightsImg=null),this.texWithTailLights&&(this.texWithTailLights.dispose(),this.texWithTailLights=null),this.tyreTextureUpdateTimer&&clearInterval(this.tyreTextureUpdateTimer),this.tyreMaterial&&(this.tyreMaterial.dispose(),this.tyreMaterial=null)}}let nme=(()=>{class i{constructor(e,n,r){this.eelDelegate=e,this.mainService=n,this.cdr=r,this._resource$=new Qe(null),this.changed=new $e,this.previewPaths$=new Qe(null),this.destroyed$=new Te,this.customControls=[],this.serializerSettings={geometry__save_obj:!0,geometry__save_blend:!1,geometry__export_to_gg_web_engine:!1}}get resource(){return this._resource$.getValue()}set resource(e){this._resource$.next(e)}ngAfterViewInit(){var e=this;return nt(function*(){e._resource$.pipe(Ue(e.destroyed$)).subscribe(function(){var n=nt(function*(r){e.previewPaths$.next(yield e.loadPreviewFilePaths(r?.id))});return function(r){return n.apply(this,arguments)}}()),e.mainService.dataBlockChange$.pipe(Ue(e.destroyed$),gn(([n,r])=>!!e.resource&&n.startsWith(e.resource.id)),gl(1500)).subscribe(nt(function*(){e.previewPaths$.next(null),e.previewPaths$.next(yield e.postTmpUpdates(e.resource?.id))}))})()}onObjectLoaded(e){var n=this;return nt(function*(){if((n._resource$.value?.id||"").includes(".CFM__"))try{const r=n.resource?.id.split("/");r.pop(),r[r.length-1]=""+(+r[r.length-1]+1);const s=yield n.eelDelegate.retrieveValue(r.join("/")+"/data"),o=s.children_aliases.findIndex(l=>"!PAL"===l);if(-1==o)throw new Error("Not a car");const a=new tme(e,s.children[o].data.colors[254]>>>8,n.previewPaths$.value[0].substring(0,n.previewPaths$.value[0].lastIndexOf("/"))+"/assets");n.customControls=[{title:"TNFS car features",controls:[{label:"Brake lights on",type:"checkbox",value:!1,change:l=>{a.tailLightsOn=l}},{label:"Car speed",type:"radio",options:["idle","slow","fast"],value:"idle",change:l=>{a.speed=l}},{label:"Steering angle",type:"slider",minValue:-.7,maxValue:.7,valueStep:.05,value:0,change:l=>{a.steeringAngle=l}}]}],n.cdr.markForCheck()}catch{}})()}postTmpUpdates(e){var n=this;return nt(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 nt(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)(E(Jl),E(Fa),E(Qn))},i.\u0275cmp=ot({type:i,selectors:[["app-orip-geometry-block-ui"]],inputs:{resource:"resource"},outputs:{changed:"changed"},decls:4,vars:7,consts:[[3,"paths","customControls","onObjectLoaded"],[3,"resource"]],template:function(e,n){1&e&&(G(0,"app-obj-viewer",0),Oe("onObjectLoaded",function(s){return n.onObjectLoaded(s)}),ct(1,"async"),j(),Ie(2,"app-compound-block-ui",1),ct(3,"async")),2&e&&(U("paths",ut(1,3,n.previewPaths$))("customControls",n.customControls),V(2),U("resource",ut(3,5,n._resource$)))},dependencies:[ec,hG,Ia],changeDetection:0}),i})();const gG=i=>{let t=i.block_class_mro.split("__")[0];return"ArrayBlock"===t?gG(i.child_schema)+"[]":t},ime=["class","block-ui"];function rme(i,t){if(1&i&&(G(0,"mat-label",7),Be(1),j()),2&i){const e=re(2);U("matTooltip",e.resourceDescription),V(1),Qi("",null==e.resource?null:e.resource.name," ")}}function sme(i,t){if(1&i&&(G(0,"mat-option",8),Be(1),j()),2&i){const e=t.$implicit,n=t.index,r=re(2);U("value",n)("disabled",r.disabled),V(1),Qi(" ",r.blockClassStr(e)," ")}}function ome(i,t){if(1&i){const e=jn();Gr(0),fe(1,rme,2,2,"mat-label",1),ct(2,"async"),G(3,"div",2)(4,"mat-label"),Be(5,"Resource type:"),j(),G(6,"mat-select",3),Oe("selectionChange",function(r){return Vt(e),Et(re().setChoiceIndex(r.value))}),fe(7,sme,2,3,"mat-option",4),j(),Ie(8,"app-block-actions",5),j(),Ie(9,"app-editor",6),Wr()}if(2&i){const e=re();let n;V(1),U("ngIf",(null==e.resource?null:e.resource.name)&&(null==e.resource?null:e.resource.name)!=(null==(n=ut(2,8,e.main.resource$))?null:n.name)),V(5),U("value",e.resourceData.choice_index)("disabled",e.disabled),V(1),U("ngForOf",e.resource.schema.possible_resource_schemas),V(1),U("resource",e.childResource),V(1),U("resource",e.childResource)("hideBlockActions",!0)("disabled",e.disabled)}}let _G=(()=>{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 $e,this.blockClassStr=gG}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:sc(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)(E(Fa))},i.\u0275cmp=ot({type:i,selectors:[["app-delegate",8,"block-ui"]],inputs:{resource:"resource",resourceDescription:"resourceDescription",hideBlockActions:"hideBlockActions",disabled:"disabled"},outputs:{changed:"changed"},attrs:ime,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"],[3,"resource","hideBlockActions","disabled"],["matTooltipPosition","above",3,"matTooltip"],[3,"value","disabled"]],template:function(e,n){1&e&&fe(0,ome,10,10,"ng-container",0),2&e&&U("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 ame=["class","block-ui"];function lme(i,t){if(1&i&&(G(0,"mat-label",7),Be(1),j()),2&i){const e=re(2);U("matTooltip",e.resourceDescription),V(1),Qi(" ",e.resource.name," ")}}function cme(i,t){if(1&i){const e=jn();Gr(0),fe(1,lme,2,2,"mat-label",1),G(2,"mat-selection-list",2),Oe("selectionChange",function(r){return Vt(e),Et(re().onSelection(r))}),G(3,"mat-list-option",3),Be(4," Left "),j(),G(5,"mat-list-option",4),Be(6," Right "),j()(),G(7,"mat-form-field",5)(8,"mat-label"),Be(9,"Texture ID"),j(),G(10,"input",6),Oe("ngModelChange",function(r){return Vt(e),Et(re().resource.data.texture_id=r)})("change",function(){return Vt(e),Et(re().changed.emit())}),j()(),Wr()}if(2&i){const e=re();V(1),U("ngIf",e.resource.name),V(2),U("selected",e.resource.data.has_left_fence),V(2),U("selected",e.resource.data.has_right_fence),V(5),U("max",63)("min",0)("step",1)("ngModel",e.resource.data.texture_id)}}let dme=(()=>{class i{constructor(){this.resource=null,this.resourceDescription="",this.changed=new $e}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=ot({type:i,selectors:[["app-fence-type",8,"block-ui"]],inputs:{resource:"resource",resourceDescription:"resourceDescription"},outputs:{changed:"changed"},attrs:ame,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&&fe(0,cme,11,7,"ng-container",0),2&e&&U("ngIf",n.resource)},dependencies:[vi,_l,mu,nc,_u,gu,Zc,yl,Ro,rc,Fs,wC,xC],changeDetection:0}),i})(),ume=(()=>{class i{constructor(){this._resource=null,this.resourceMap={},this.changed=new $e}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]=["",vl.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)(E(ib),E(bte),E(oR))},i.\u0275cmp=ot({type:i,selectors:[["app-run-custom-action",8,"dialog"]],attrs:hme,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&&(G(0,"h1",0),Be(1),j(),G(2,"div",1)(3,"p"),Be(4),j()(),G(5,"form",2),fe(6,fme,4,4,"mat-form-field",3),j(),G(7,"div",4)(8,"button",5),Oe("click",function(){return n.dialogRef.close()}),Be(9,"Cancel"),j(),G(10,"button",6),Oe("click",function(){return n.submit()}),Be(11,"Run"),j()()),2&e&&(V(1),Qi('Run action "',n.data.title,'"'),V(3),ui(n.data.description),V(1),U("formGroup",n.argsForm),V(1),U("ngForOf",n.data.args),V(4),U("disabled",n.argsForm.invalid))},dependencies:[lo,IR,_l,nc,bR,yl,Ro,rc,rb,pV,mV,gV,Gh,hC],styles:["form[_ngcontent-%COMP%]{padding:0 24px}"]}),i})();function vG(i,t){return t?e=>Sy(t.pipe(Oi(1),function mme(){return ni((i,t)=>{i.subscribe(qn(t,ms))})}()),e.pipe(vG(i))):rr((e,n)=>Mr(i(e,n)).pipe(Oi(1),qB(e)))}function yG(i,t=Gy){const e=OI(i,t);return vG(()=>e)}const gme=["mat-menu-item",""];function _me(i,t){1&i&&(ki(),G(0,"svg",3),Ie(1,"polygon",4),j())}const vme=[[["mat-icon"],["","matMenuItemIcon",""]],"*"],yme=["mat-icon, [matMenuItemIcon]","*"];function bme(i,t){if(1&i){const e=jn();G(0,"div",0),Oe("keydown",function(r){return Vt(e),Et(re()._handleKeydown(r))})("click",function(){return Vt(e),Et(re().closed.emit("click"))})("@transformMenu.start",function(r){return Vt(e),Et(re()._onAnimationStart(r))})("@transformMenu.done",function(r){return Vt(e),Et(re()._onAnimationDone(r))}),G(1,"div",1),Yt(2),j()()}if(2&i){const e=re();U("id",e.panelId)("ngClass",e._classList)("@transformMenu",e._panelAnimationState),It("aria-label",e.ariaLabel||null)("aria-labelledby",e.ariaLabelledby||null)("aria-describedby",e.ariaDescribedby||null)}}const xme=["*"],wO=new me("MAT_MENU_PANEL"),wme=jM(WM(class{}));let JS=(()=>{class i extends wme{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 Te,this._focused=new Te,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",Yr("120ms cubic-bezier(0, 0, 0.2, 1)",oi({opacity:1,transform:"scale(1)"}))),Or("* => void",Yr("100ms 25ms linear",oi({opacity:0})))]),fadeInItems:Oa("fadeInItems",[Os("showing",oi({opacity:1})),Or("void => *",[oi({opacity:0}),Yr("400ms 100ms cubic-bezier(0.55, 0, 0.55, 0.2)")])])};let Cme=0;const bG=new me("mat-menu-default-options",{providedIn:"root",factory:function Sme(){return{overlapTrigger:!1,xPosition:"after",yPosition:"below",backdropClass:"cdk-overlay-transparent-backdrop"}}});let t0=(()=>{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=tn(e)}get hasBackdrop(){return this._hasBackdrop}set hasBackdrop(e){this._hasBackdrop=tn(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 om,this._classList={},this._panelAnimationState="void",this._animationDone=new Te,this.overlayPanelClass=this._defaultOptions.overlayPanelClass||"",this.backdropClass=this._defaultOptions.backdropClass,this._overlapTrigger=this._defaultOptions.overlapTrigger,this._hasBackdrop=this._defaultOptions.hasBackdrop,this.closed=new $e,this.close=this.closed,this.panelId="mat-menu-panel-"+Cme++}ngOnInit(){this.setPositionClasses()}ngAfterContentInit(){this._updateDirectDescendants(),this._keyManager=new kU(this._directDescendantItems).withWrap().withTypeAhead().withHomeAndEnd(),this._keyManager.tabOut.subscribe(()=>this.closed.emit("tab")),this._directDescendantItems.changes.pipe(Do(this._directDescendantItems),ks(e=>Cr(...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(Do(this._directDescendantItems),ks(n=>Cr(...n.map(r=>r._hovered))))}addItem(e){}removeItem(e){}_handleKeydown(e){const n=e.keyCode,r=this._keyManager;switch(n){case 27:Zo(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(Oi(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(Do(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)(E(vt),E(gt),E(bG),E(Qn))},i.\u0275dir=ve({type:i,contentQueries:function(e,n,r){if(1&e&&(Wi(r,Mme,5),Wi(r,JS,5),Wi(r,JS,4)),2&e){let s;At(s=Dt())&&(n.lazyContent=s.first),At(s=Dt())&&(n._allItems=s),At(s=Dt())&&(n.items=s)}},viewQuery:function(e,n){if(1&e&&$n(Eo,5),2&e){let r;At(r=Dt())&&(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})(),Eme=(()=>{class i extends t0{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)(E(vt),E(gt),E(bG),E(Qn))},i.\u0275cmp=ot({type:i,selectors:[["mat-menu"]],hostVars:3,hostBindings:function(e,n){2&e&&It("aria-label",null)("aria-labelledby",null)("aria-describedby",null)},exportAs:["matMenu"],features:[Dn([{provide:wO,useExisting:i}]),dt],ngContentSelectors:xme,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&&(or(),fe(0,bme,3,6,"ng-template"))},dependencies:[hm],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:[eE.transformMenu,eE.fadeInItems]},changeDetection:0}),i})();const xG=new me("mat-menu-scroll-strategy"),Dme={provide:xG,deps:[as],useFactory:function Ame(i){return()=>i.scrollStrategies.reposition()}},wG=Fh({passive:!0});let Tme=(()=>{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,d){this._overlay=e,this._element=n,this._viewContainerRef=r,this._menuItemInstance=a,this._dir=l,this._focusMonitor=c,this._ngZone=d,this._overlayRef=null,this._menuOpen=!1,this._closingActionsSubscription=Qt.EMPTY,this._hoverSubscription=Qt.EMPTY,this._menuCloseSubscription=Qt.EMPTY,this._changeDetectorRef=Lt(Qn),this._handleTouchStart=h=>{qI(h)||(this._openedBy="touch")},this._openedBy=void 0,this.restoreFocus=!0,this.menuOpened=new $e,this.onMenuOpen=this.menuOpened,this.menuClosed=new $e,this.onMenuClose=this.menuClosed,this._scrollStrategy=s,this._parentMaterialMenu=o instanceof t0?o:void 0,n.nativeElement.addEventListener("touchstart",this._handleTouchStart,wG)}ngAfterContentInit(){this._handleHover()}ngOnDestroy(){this._overlayRef&&(this._overlayRef.dispose(),this._overlayRef=null),this._element.nativeElement.removeEventListener("touchstart",this._handleTouchStart,wG),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 t0&&(e._startAnimation(),e._directDescendantItems.changes.pipe(Ue(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 t0?(n._resetAnimation(),n.lazyContent?n._animationDone.pipe(gn(r=>"void"===r.toState),Oi(1),Ue(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],[d,h]=[r,s],p=0;if(this.triggersSubmenu()){if(h=r="before"===e.xPosition?"start":"end",s=d="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:d,overlayY:o,offsetY:p},{originX:s,originY:l,overlayX:h,overlayY:o,offsetY:p},{originX:r,originY:c,overlayX:d,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 Cr(e,this._parentMaterialMenu?this._parentMaterialMenu.closed:mt(),this._parentMaterialMenu?this._parentMaterialMenu._hovered().pipe(gn(o=>o!==this._menuItemInstance),gn(()=>this._menuOpen)):mt(),n)}_handleMousedown(e){YI(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(gn(e=>e===this._menuItemInstance&&!e.disabled),yG(0,PI)).subscribe(()=>{this._openedBy="mouse",this.menu instanceof t0&&this.menu._isAnimating?this.menu._animationDone.pipe(Oi(1),yG(0,PI),Ue(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)(E(as),E(vt),E(jr),E(xG),E(wO,8),E(JS,10),E(Pa,8),E(Xc),E(gt))},i.\u0275dir=ve({type:i,hostVars:3,hostBindings:function(e,n){1&e&&Oe("click",function(s){return n._handleClick(s)})("mousedown",function(s){return n._handleMousedown(s)})("keydown",function(s){return n._handleKeydown(s)}),2&e&&It("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})(),Ime=(()=>{class i extends Tme{}return i.\u0275fac=function(){let t;return function(n){return(t||(t=si(i)))(n||i)}}(),i.\u0275dir=ve({type:i,selectors:[["","mat-menu-trigger-for",""],["","matMenuTriggerFor",""]],hostAttrs:[1,"mat-mdc-menu-trigger"],exportAs:["matMenuTrigger"],features:[dt]}),i})(),Rme=(()=>{class i{}return i.\u0275fac=function(e){return new(e||i)},i.\u0275mod=en({type:i}),i.\u0275inj=Wt({providers:[Dme],imports:[co,tb,Jn,Pm,Ky,Jn]}),i})();function kme(i,t){if(1&i){const e=jn();G(0,"button",7),Oe("click",function(){return Vt(e),Et(re(2).deserialize())}),Ie(1,"mat-icon",8),j()}}function Pme(i,t){if(1&i){const e=jn();Gr(0),fe(1,kme,2,0,"button",4),G(2,"button",5),Oe("click",function(){return Vt(e),Et(re().serializeBlockReversible())}),Ie(3,"mat-icon",6),j(),Wr()}if(2&i){const e=re();V(1),U("ngIf",e.isInReversibleSerializationState),V(1),U("disabled",e.isInReversibleSerializationState)}}function Ome(i,t){1&i&&(G(0,"button",9),Ie(1,"mat-icon",10),j()),2&i&&(re(),U("matMenuTriggerFor",Zi(3)))}function Fme(i,t){if(1&i){const e=jn();G(0,"button",11),Oe("click",function(){const s=Vt(e).$implicit;return Et(re().runCustomAction(s))}),G(1,"span"),Be(2),j()()}if(2&i){const e=t.$implicit;V(2),ui(e.title)}}const Lme=function(){return[]};let tE=(()=>{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 nt(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)(E(Fa),E(Jl),E(Qn),E(Bm),E(RV))},i.\u0275cmp=ot({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&&(fe(0,Pme,4,2,"ng-container",0),fe(1,Ome,2,1,"button",1),G(2,"mat-menu",null,2),fe(4,Fme,3,1,"button",3),j()),2&e&&(U("ngIf",null==n.resource||null==n.resource.schema?null:n.resource.schema.serializable_to_disc),V(1),U("ngIf",(null==n.resource||null==n.resource.schema.custom_actions?null:n.resource.schema.custom_actions.length)>0),V(3),U("ngForOf",(null==n.resource?null:n.resource.schema.custom_actions)||Rs(3,Lme)))},dependencies:[lo,vi,Fs,qM,gR,Eme,JS,Ime],styles:["[_nghost-%COMP%]{display:flex}"]}),i})();const Nme=["class","block-ui"];function Bme(i,t){if(1&i&&(G(0,"mat-label",7),Be(1),j()),2&i){const e=re();U("matTooltip",e.resourceDescription),V(1),Qi("",null==e.resource?null:e.resource.name," ")}}function Ume(i,t){if(1&i&&(G(0,"audio",8),Ie(1,"source",9),ct(2,"async"),Be(3," Your browser does not support the audio element. "),j()),2&i){const e=re();V(1),U("src",ut(2,1,e.audioUrl$),Np)}}function Vme(i,t){1&i&&Ie(0,"mat-spinner",10)}function zme(i,t){1&i&&Ie(0,"app-block-actions",11),2&i&&U("resource",re().resource)}const Hme=function(){return["wave_data"]};let $me=(()=>{class i{constructor(e,n){this.eelDelegate=e,this.main=n,this._resource$=new Qe(null),this.audioUrl$=new Qe(null),this.resourceDescription="",this.hideBlockActions=!1,this.destroyed$=new Te,this.changed=new $e}set resource(e){this._resource$.next(e)}get resource(){return this._resource$.getValue()}ngAfterViewInit(){var e=this;return nt(function*(){e._resource$.pipe(Ue(e.destroyed$)).subscribe(function(){var n=nt(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)(E(Jl),E(Fa))},i.\u0275cmp=ot({type:i,selectors:[["app-eacs-audio",8,"block-ui"]],inputs:{resource:"resource",resourceDescription:"resourceDescription",hideBlockActions:"hideBlockActions"},outputs:{changed:"changed"},attrs:Nme,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&&(G(0,"div",0),fe(1,Bme,2,2,"mat-label",1),ct(2,"async"),fe(3,Ume,4,3,"audio",2),ct(4,"async"),fe(5,Vme,1,0,"mat-spinner",3),ct(6,"async"),Ie(7,"div",4),fe(8,zme,1,1,"app-block-actions",5),j(),Ie(9,"app-compound-block-ui",6),ct(10,"async")),2&e){let r;V(1),U("ngIf",(null==n.resource?null:n.resource.name)&&(null==n.resource?null:n.resource.name)!=(null==(r=ut(2,7,n.main.resource$))?null:r.name)),V(2),U("ngIf",ut(4,9,n.audioUrl$)),V(2),U("ngIf",n.resource&&!ut(6,11,n.audioUrl$)),V(3),U("ngIf",!n.hideBlockActions),V(1),U("resource",ut(10,13,n._resource$))("hideBlockActions",!0)("fieldBlacklist",Rs(15,Hme))}},dependencies:[vi,Ro,Fs,e0,ec,tE,Ia],styles:["#header[_ngcontent-%COMP%]{display:flex}"]}),i})();class Gme{constructor(t,e){this.mesh=t,this.assetsPath=e,this.textures=[],this.tyreTextureUpdateTimer=void 0,this.tyreMaterial=null,this.tyreTextures=[],this._color=65280,this._speed="idle",this._steeringAngle=0,this.wheels=[],this.wheelIdlePositions=[],this.frontWheels=[];let n=new Set;if(t.traverse(r=>{if(!(r instanceof Mn))return;let s=-1;if(r.name.startsWith("part_hp_12")?s=0:r.name.startsWith("part_hp_14")?s=1:r.name.startsWith("part_hp_16")?s=2:r.name.startsWith("part_hp_18")&&(s=3),s>-1){r.geometry.boundingBox||r.geometry.computeBoundingBox();let a=Re.avg(r.geometry.boundingBox.min,r.geometry.boundingBox.max);return(0==s||2==s)&&(a={x:a.x,y:a.y,z:a.z+1.5}),r.geometry.translate(...Re.spr(Re.neg(a))),r.position.set(...Re.spr(a)),this.wheelIdlePositions[s]=a,this.wheels.push(r),void(s<2&&this.frontWheels.push(r))}const o=r.material.map;o&&n.add(o)}),this.textures=Array.from(n).map(r=>{const s=new Oo(document.createElement("img"));return s.flipY=r.flipY,sa(s),[r,s]}),t.traverse(r=>{if(!(r instanceof Mn))return;const s=r.material.map;if(s){const o=this.textures.find(([a,l])=>a===s);o&&(r.material.map=o[1])}}),this.hasWheels){const r=new Pu;this.tyreTextures=[0,1,2,3].map(s=>r.load(`${e}/m${s}00.png`));for(const s of this.tyreTextures)sa(s);this.tyreMaterial=new qi({map:this.tyreTextures[0]}),this.tyreMaterial.transparent=!0,this.tyreMaterial.alphaTest=.5,this.tyreMaterial.map.wrapS=er,this.tyreMaterial.map.wrapT=er,this.tyreMaterial.polygonOffset=!0,this.tyreMaterial.polygonOffsetFactor=-4;for(const s of this.wheels)s.material=this.tyreMaterial}this.color=65280,this.recolorCar().then()}get color(){return this._color}set color(t){t!==this._color&&(this._color=t,this.recolorCar().then())}get speed(){return this._speed}set speed(t){if(t!==this._speed){switch(this._speed=t,this.tyreTextureUpdateTimer&&clearInterval(this.tyreTextureUpdateTimer),t){case"idle":this.tyreMaterial.map=this.tyreTextures[0];break;case"slow":let e=!0;this.tyreTextureUpdateTimer=setInterval(()=>{this.tyreMaterial.map=this.tyreTextures[e?1:2],this.tyreMaterial.needsUpdate=!0,e=!e},16);break;case"fast":this.tyreMaterial.map=this.tyreTextures[3]}this.tyreMaterial.needsUpdate=!0}}get steeringAngle(){return this._steeringAngle}set steeringAngle(t){if(t!==this._steeringAngle){this._steeringAngle=t;for(const e of this.frontWheels)e.rotation.set(0,0,t)}}get hasWheels(){return this.wheels.length>0}recolorCar(){var t=this;return nt(function*(){const[e,n,r]=[t.color>>16,t.color>>8&255,255&t.color];for(const[s,o]of t.textures){for(let a=100;a>0&&!s.source.data;a--)yield pG(50);mG(s.source.data,(a,l)=>{if(a[l]+a[l+2]{class i{constructor(e,n,r){this.eelDelegate=e,this.main=n,this.cdr=r,this._resource$=new Qe(null),this.changed=new $e,this.customControls=[],this.previewPaths$=new Qe(null),this.destroyed$=new Te,this.serializerSettings={geometry__save_obj:!0,geometry__save_blend:!1,geometry__export_to_gg_web_engine:!1}}get resource(){return this._resource$.getValue()}set resource(e){this._resource$.next(e)}ngAfterViewInit(){var e=this;return nt(function*(){e._resource$.pipe(Ue(e.destroyed$)).subscribe(function(){var n=nt(function*(r){e.previewPaths$.next(yield e.loadPreviewFilePaths(r?.id))});return function(r){return n.apply(this,arguments)}}()),e.main.dataBlockChange$.pipe(Ue(e.destroyed$),gn(([n,r])=>!!e.resource&&n.startsWith(e.resource.id)),gl(1500)).subscribe(nt(function*(){e.previewPaths$.next(null),e.previewPaths$.next(yield e.postTmpUpdates(e.resource?.id))}))})()}onObjectLoaded(e){var n=this;return nt(function*(){try{const r=new Gme(e,n.previewPaths$.value[0].substring(0,n.previewPaths$.value[0].lastIndexOf("/"))+"/assets");let s=null;const o=a=>{s&&clearTimeout(s),s=setTimeout(()=>r.color=a,50)};n.customControls=[{title:"NFS2 car features",controls:[{label:"Car color",type:"color",value:65280,change:a=>o(a)}]}],r.hasWheels&&n.customControls[0].controls.push({label:"Car speed",type:"radio",options:["idle","slow","fast"],value:"idle",change:a=>{r.speed=a}},{label:"Steering angle",type:"slider",minValue:-.7,maxValue:.7,valueStep:.05,value:0,change:a=>{r.steeringAngle=a}}),n.cdr.markForCheck()}catch(r){console.error(r)}})()}postTmpUpdates(e){var n=this;return nt(function*(){if(e){const r=yield n.eelDelegate.serializeResourceTmp(e,Object.entries(n.main.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 nt(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)(E(Jl),E(Fa),E(Qn))},i.\u0275cmp=ot({type:i,selectors:[["app-geo-geometry",8,"block-ui"]],inputs:{resource:"resource"},outputs:{changed:"changed"},attrs:Wme,decls:4,vars:8,consts:[[3,"paths","groupFunction","customControls","onObjectLoaded"],[3,"resource",4,"ngIf"],[3,"resource"]],template:function(e,n){1&e&&(G(0,"app-obj-viewer",0),Oe("onObjectLoaded",function(s){return n.onObjectLoaded(s)}),ct(1,"async"),j(),fe(2,jme,2,3,"app-compound-block-ui",1),ct(3,"async")),2&e&&(U("paths",ut(1,4,n.previewPaths$))("groupFunction",n.previewObjectGroupFunc)("customControls",n.customControls),V(2),U("ngIf",!ut(3,6,n.main.hideHiddenFields$)))},dependencies:[vi,ec,hG,Ia],changeDetection:0}),i})();const qme=function(){return["children","items_descr"]};let Xme=(()=>{class i{constructor(){this._resource=null,this.hideBlockActions=!1,this.resourceMap={},this.changed=new $e}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:sc(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=ot({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&&Ie(0,"app-compound-block-ui",0)(1,"app-sidenav-res-list",1),2&e&&(U("resource",n.resource)("hideBlockActions",n.hideBlockActions)("fieldBlacklist",Rs(4,qme)),V(1),U("resources",n.resourceMap))},dependencies:[ec,bC],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})();const Kme=["previewCanvasContainer"],Zme=["previewCanvas"];function Qme(i,t){1&i&&Ie(0,"mat-spinner",16),2&i&&U("diameter",40)}function Jme(i,t){1&i&&Ie(0,"mat-spinner",17)}const ege=function(){return[]};var Tf=(()=>{return(i=Tf||(Tf={})).ThreeModel="model",i.Bitmap="bitmap",i.TwoSidedBitmap="two_sided_bitmap",Tf;var i})();class tge extends QH{constructor(t,e,n){super(t,{loadDepth:40,inertia:2}),this.mapGraph=t,this.qfsPath=e,this.hideUnknownEntities$=n,this.textureLoader=new Pu,this.terrainMaterials={},this.objLoader=new Jb,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(Ql(),Ue(this._onRemoved$)).subscribe(e=>{for(const n of this.unknownEntities)n.visible=!e})}getPlaceholderTexture(){var t=this;return nt(function*(){return t._placeholder?t._placeholder:(t._placeholderPromise||(t._placeholderPromise=t.textureLoader.loadAsync("assets/placeholder_texture.png")),t._placeholderPromise)})()}getPlaceholderTerrainTexture(){var t=this;return nt(function*(){return t._placeholderTerrain?t._placeholderTerrain:(t._placeholderTerrainPromise||(t._placeholderTerrainPromise=t.textureLoader.loadAsync("assets/placeholder_texture.png").then(e=>(e.wrapS=Bs,e.wrapT=Bs,sa(e),e))),t._placeholderTerrainPromise)})()}loadChunk(t){var e=this;return nt(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 Mn&&(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:Re.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:Yi.fromAngle(Re.nZ,l.rotation)}));const o=(yield Promise.all(s.map(l=>e.loadPropInternal(l)))).filter(l=>!!l),a=new Jo({object3D:new ra(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 qi({side:Ns,transparent:!0,visible:!1}),this.qfsPath?this.textureLoader.loadAsync(`${this.qfsPath}/${t}.png`).then(e=>{e.wrapS=Bs,e.wrapT=Bs,sa(e),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 nt(function*(){let n=!1;if(t.type==Tf.ThreeModel){let r;try{if(!e.qfsPath)throw new Error;const o=new xO,a=new Jb,l=yield o.loadAsync(`${e.qfsPath}/props/${t.data.data.resource_id}/0/material.mtl`);l.preload(),a.setMaterials(l),r=new ra(yield a.loadAsync(`${e.qfsPath}/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 Mn){const a=o.material instanceof Array?o.material:[o.material];for(const l of a)l.transparent=!0,l.alphaTest=.5,l instanceof qi&&l.map&&(l.map.wrapS=Bs,l.map.wrapT=Bs,sa(l.map),l.map.needsUpdate=!0)}});const s=new Jo({object3D: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==Tf.Bitmap||t.type==Tf.TwoSidedBitmap){const r=(c,d)=>new Array(d).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 No,[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==Tf.TwoSidedBitmap){const[c,d]=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 Jo({object3D:new ra(s)});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 nt(function*(){const s=t.split(";"),o=yield r.getPlaceholderTexture();let a=!1,l=[];r.qfsPath?l=yield Promise.all(s.map(h=>r.textureLoader.loadAsync(`${r.qfsPath}/foreground/${h}.png`).catch(()=>(a=!0,o)))):(a=!0,l=s.map(()=>o));const c=l.map(h=>(sa(h),new qi({map:h,alphaTest:.5,transparent:!0,side:Ns}))),d=new Mn(new Iu(e.x,e.y),c[0]);if(d.rotateX(Math.PI/2),d.position.set(0,0,e.y/2),c.length>1){let h=-1;Ym(r.world).pipe(o4(n&&!isNaN(+n)?1e3*+n:250)).subscribe(()=>{h=(h+1)%c.length,d.material=c[h]})}return[d,a]})()}}let nge=(()=>{class i{constructor(e,n,r){this.eelDelegate=e,this.cdr=n,this.mainService=r,this._resource$=new Qe(null),this.changed=new $e,this.previewLoading$=new Qe(!0),this.previewQfsLocation$=new Qe(null),this.previewQfsLoading$=new Qe(!1),this.pointer$=new Qe(null),this.selectedSplineIndex$=new Qe(0),this.qfsPath=null,this.name="",this.renderer=null,this.map=null,this.roadPath=null,this.destroyed$=new Te}get resource(){return this._resource$.getValue()}set resource(e){this._resource$.next(e)}ngAfterViewInit(){var e=this;return nt(function*(){var s;e.world=new ok(new yO,{init:(s=nt(function*(){}),function(){return s.apply(this,arguments)}),simulate:()=>{},loader:{loadFromGgGlb:function(){var s=nt(function*(...o){return[]});return function(){return s.apply(this,arguments)}}()}}),yield e.world.init(),e.skySphere=new Jo({object3D:e.world.visualScene.factory.createPrimitive({shape:"SPHERE",radius:1e3},{color:16777215})}),e.skySphere.object3D.nativeMesh.material.side=Ns,e.world.addEntity(e.skySphere),e.selectionSphere=new Jo({object3D: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 $S(16777215,2));let n=new Qe({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=Yi.lookAt(e.renderer.camera.position,Re.add(e.renderer.camera.position,Re.Y),Re.Z),Ym(e.world).pipe(Ue(e.destroyed$)).subscribe(()=>{e.renderer&&(e.skySphere.position=e.renderer.camera.position,e.pointer$.next(e.renderer.camera.position))}),e.controller=new n4(e.world.keyboardInput,e.renderer,{mouseOptions:{canvas:e.previewCanvas.nativeElement,pointerLock:!0},keymap:"wasd+arrows",cameraLinearSpeed:40,cameraBoostMultiplier:4,cameraMovementElasticity:100,cameraRotationElasticity:30,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(Ue(e.destroyed$)).subscribe(function(){var s=nt(function*(o){e.roadPath=e.resource?.data.block_positions.map(a=>({x:a.x,y:a.z,z:a.y})),e.previewLoading$.next(!0),o?(e.previewQfsLocation$.next(o.id.substring(0,o.id.indexOf(".TRK"))+"0.QFS"),yield e.loadTerrainChunks(o.id),yield e.onQfsSelected(e.previewQfsLocation$.value)):(yield e.loadTerrainChunks(),yield e.loadPreview()),e.previewLoading$.next(!1)});return function(o){return s.apply(this,arguments)}}()),e.mainService.dataBlockChange$.pipe(Ue(e.destroyed$),gn(([s,o])=>!!e.resource&&s.startsWith(e.resource.id)),gl(3e3)).subscribe(nt(function*(){e.roadPath=e.resource?.data.block_positions.map(s=>({x:s.x,y:s.z,z:s.y})),e.previewLoading$.next(!0),yield e.postTmpUpdates(e.resource?.id),yield e.loadPreview(),e.previewLoading$.next(!1)})),e.selectedSplineIndex$.pipe(Ue(e.destroyed$),gl(250)).subscribe(s=>{if(e.resource){let o=e.resource.data.block_positions[s];if(!o)return;o={x:o.x,y:o.z,z:o.y},e.selectionSphere.position=o,e.renderer&&(e.renderer.position=Re.add(o,Re.rotAround({x:10,y:-12,z:5},{x:0,y:0,z:1},-0)),e.renderer.rotation=Yi.lookAt(e.renderer.position,o,{x:0,y:0,z:1}),e.controller.reset())}})})()}onQfsSelected(e){var n=this;return nt(function*(){if(n.qfsPath!=e){n.previewQfsLoading$.next(!0);try{const r=yield n.eelDelegate.serializeResource(e),s=new Pu,o=r.find(a=>a.endsWith("spherical.png"));if(o){const a=yield s.loadAsync(o);a.colorSpace="srgb",a.mapping=cc,n.skySphere.object3D.nativeMesh.material.map=a}else n.skySphere.object3D.nativeMesh.material.map=null;n.skySphere.object3D.nativeMesh.material.needsUpdate=!0,n.qfsPath=e}catch{n.skySphere.object3D.nativeMesh.material.map=null,n.skySphere.object3D.nativeMesh.material.needsUpdate=!0,n.qfsPath=null}finally{n.previewQfsLoading$.next(!1)}yield n.loadPreview()}})()}loadTerrainChunks(e){var n=this;return nt(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})()}onPointerChange(e){this.renderer&&(this.renderer.position=e)}loadPreview(){var e=this;return nt(function*(){if(!e.terrainChunksObjLocation||!e.roadPath)return;const n=Km.fromMapArray(e.roadPath.map((r,s)=>({path:`${e.terrainChunksObjLocation}terrain_chunk_${s}`,position:r,loadOptions:{}}))||[],!0);e.unloadPreview(),e.map=new tge(n,e.qfsPath&&"resources/"+e.qfsPath,e.mainService.hideHiddenFields$),e.map.resource=e.resource,e.map.isOpenedTrack=!1,Ym(e.world).pipe(Ue(e.destroyed$)).subscribe(()=>{e.map&&e.renderer&&e.map.loaderCursor$.next(e.renderer.position)}),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 nt(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)(E(Jl),E(Qn),E(Fa))},i.\u0275cmp=ot({type:i,selectors:[["app-trk-map-block-ui"]],viewQuery:function(e,n){if(1&e&&($n(Kme,5),$n(Zme,5)),2&e){let r;At(r=Dt())&&(n.previewCanvasContainer=r.first),At(r=Dt())&&(n.previewCanvas=r.first)}},inputs:{resource:"resource"},outputs:{changed:"changed"},decls:32,vars:26,consts:[[1,"qfsSelector"],["appearance","fill"],["matInput","","type","text",3,"value"],["customQfsInput",""],["mat-button","",3,"click"],["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","projection","pointerChange"],[3,"resource"],["mode","indeterminate",3,"diameter"],["mode","indeterminate"]],template:function(e,n){if(1&e){const r=jn();G(0,"div",0)(1,"h4"),Be(2,"Preview QFS file"),j(),G(3,"mat-form-field",1)(4,"mat-label"),Be(5,"Custom QFS path"),j(),Ie(6,"input",2,3),ct(8,"async"),j(),G(9,"button",4),Oe("click",function(){Vt(r);const o=Zi(7);return Et(n.onQfsSelected(o.value))}),Be(10,"LOAD"),j(),fe(11,Qme,1,1,"mat-spinner",5),ct(12,"async"),j(),G(13,"div",6)(14,"div",7,8),Ie(16,"canvas",9,10),fe(18,Jme,1,0,"mat-spinner",11),ct(19,"async"),j(),G(20,"div",12,8)(22,"mat-form-field",1)(23,"mat-label"),Be(24,"Spline item"),j(),G(25,"input",13),Oe("ngModelChange",function(o){return n.selectedSplineIndex$.next(o)}),ct(26,"async"),ct(27,"async"),j()(),G(28,"app-minimap",14),Oe("pointerChange",function(o){return n.onPointerChange(o)}),ct(29,"async"),j()()(),Ie(30,"app-compound-block-ui",15),ct(31,"async")}if(2&e){let r;V(6),U("value",ut(8,11,n.previewQfsLocation$)),V(5),U("ngIf",ut(12,13,n.previewQfsLoading$)),V(7),U("ngIf",ut(19,15,n.previewLoading$)),V(7),U("min",0)("max",4*(null==(r=ut(26,17,n._resource$))?null:r.data.num_blocks)-1)("ngModel",ut(27,19,n.selectedSplineIndex$)),V(3),U("roadSpline",n.roadPath||Rs(25,ege))("pointer",ut(29,21,n.pointer$))("splineClosed",!0)("projection","nz"),V(2),U("resource",ut(31,23,n._resource$))}},dependencies:[vi,_l,mu,nc,_u,gu,Zc,yl,Ro,rc,rb,e0,ec,fG,Ia],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-minimap[_ngcontent-%COMP%]{flex-grow:1;display:flex}.qfsSelector[_ngcontent-%COMP%]{display:flex;align-items:center;width:100%;column-gap:1rem}.qfsSelector[_ngcontent-%COMP%] h4[_ngcontent-%COMP%]{min-width:-moz-fit-content;min-width:fit-content}.qfsSelector[_ngcontent-%COMP%] mat-form-field[_ngcontent-%COMP%]{flex-grow:1}.qfsSelector[_ngcontent-%COMP%] mat-spinner[_ngcontent-%COMP%], .qfsSelector[_ngcontent-%COMP%] button[_ngcontent-%COMP%]{margin-bottom:1.34375em}"],changeDetection:0}),i})();function ige(i,t){if(1&i&&(G(0,"mat-error"),Be(1),j()),2&i){const e=re(2);V(1),Dh(" ",e.resourceError.data.error_class,": ",e.resourceError.data.error_text," ")}}function rge(i,t){1&i&&Ie(0,"mat-spinner",5)}function sge(i,t){if(1&i&&(G(0,"div",2),fe(1,ige,2,2,"mat-error",3),fe(2,rge,1,0,"mat-spinner",4),j()),2&i){const e=re();V(1),U("ngIf",e.resourceError),V(1),U("ngIf",!e.resourceError)}}function oge(i,t){}let n0=(()=>{class i{constructor(e,n){this.mainService=e,this.deep=n,this._component=null,this._componentChangedSub=null,this.destroyed$=new Te,this.resourceSet$=new Te,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)}resourceEqual(e,n){return e&&n?e.id===n.id&&this.deep.deepEquals(e.data,n.data):!e==!n}set resource(e){if(!this.resourceEqual(e,this._resourceError||this._resource)&&(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(Ue(this.destroyed$),Ue(this.resourceSet$)).subscribe(()=>{const s=this._resource.id,o=this._resource.data;if(o instanceof Array)if(this._resource.schema.block_class_mro.startsWith("BytesBlock"))this.mainService.dataBlockChange$.next([s,o]);else 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 age(i,t){1&i&&Ie(0,"mat-icon",17)}function lge(i,t){1&i&&Ie(0,"mat-icon",18)}let cge=(()=>{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 nt(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 nt(function*(){if(e.mainService.hasUnsavedChanges){let n=e.dialog.open(SV,{data:{text:"There are unsaved changes, which will be lost. Are you sure you want to reload file?"}});if(!(yield lR(n.afterClosed())))return}yield e.mainService.reloadResource(),e.cdr.markForCheck()})()}}return i.\u0275fac=function(e){return new(e||i)(E(Jl),E(Fa),E(Bm),E(RV),E(Qn))},i.\u0275cmp=ot({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&&(G(0,"mat-toolbar",0)(1,"span"),Be(2),ct(3,"async"),ct(4,"async"),j(),Ie(5,"span",1),G(6,"button",2),Oe("click",function(){return n.toggleUnknownsVisibility()}),fe(7,age,1,0,"mat-icon",3),ct(8,"async"),fe(9,lge,1,0,"mat-icon",4),ct(10,"async"),j(),Ie(11,"mat-divider",5)(12,"app-block-actions",6),ct(13,"async"),G(14,"button",7),Oe("click",function(){return n.reloadResource()}),ct(15,"async"),Ie(16,"mat-icon",8),j(),Ie(17,"mat-divider",5),G(18,"button",9),Oe("click",function(){return n.saveResource()}),ct(19,"async"),ct(20,"async"),Ie(21,"mat-icon",10),j()(),G(22,"div",11),Ie(23,"div",12)(24,"app-editor",13),ct(25,"async"),ct(26,"async"),ct(27,"async"),G(28,"div",14)(29,"a",15),Ie(30,"img",16),j()(),Ie(31,"div",12),j()),2&e){let r;V(2),Dh("",(null==(r=ut(3,9,n.mainService.resource$))?null:r.name)||"...","",ut(4,11,n.mainService.hasUnsavedChanges$)?"*":"",""),V(5),U("ngIf",ut(8,13,n.mainService.hideHiddenFields$)),V(2),U("ngIf",!ut(10,15,n.mainService.hideHiddenFields$)),V(3),U("resource",ut(13,17,n.mainService.resource$)),V(2),U("disabled",!ut(15,19,n.mainService.eelDelegate.openedResourcePath$)),V(4),U("disabled",!ut(19,21,n.mainService.resource$)||!ut(20,23,n.mainService.hasUnsavedChanges$)),V(6),U("resource",ut(25,25,n.mainService.customActionRunning$)?null:ut(26,27,n.mainService.resource$)||ut(27,29,n.mainService.error$))("hideBlockActions",!0)}},dependencies:[vi,CJ,EJ,Fs,qM,gR,n0,tE,Ia],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 MG(i){return new pe(3e3,!1)}function Gge(){return typeof window<"u"&&typeof window.document<"u"}function MO(){return typeof process<"u"&&"[object process]"==={}.toString.call(process)}function Nu(i){switch(i.length){case 0:return new nb;case 1:return i[0];default:return new aV(i)}}function CG(i,t,e,n,r=new Map,s=new Map){const o=[],a=[];let l=-1,c=null;if(n.forEach(d=>{const h=d.get("offset"),p=h==l,m=p&&c||new Map;d.forEach((g,b)=>{let v=b,y=g;if("offset"!==b)switch(v=t.normalizePropertyName(v,o),y){case rR:y=r.get(b);break;case Kc: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 kge(i){return new pe(3502,!1)}();return a}function CO(i,t,e,n){switch(t){case"start":i.onStart(()=>n(e&&SO(e,"start",i)));break;case"done":i.onDone(()=>n(e&&SO(e,"done",i)));break;case"destroy":i.onDestroy(()=>n(e&&SO(e,"destroy",i)))}}function SO(i,t,e){const s=EO(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 EO(i,t,e,n,r="",s=0,o){return{element:i,triggerName:t,fromState:e,toState:n,phaseName:r,totalTime:s,disabled:!!o}}function oa(i,t,e){let n=i.get(t);return n||i.set(t,n=e),n}function SG(i){const t=i.indexOf(":");return[i.substring(1,t),i.slice(t+1)]}let AO=(i,t)=>!1,EG=(i,t,e)=>[],AG=null;function DO(i){const t=i.parentNode||i.host;return t===AG?null:t}(MO()||typeof Element<"u")&&(Gge()?(AG=(()=>document.documentElement)(),AO=(i,t)=>{for(;t;){if(t===i)return!0;t=DO(t)}return!1}):AO=(i,t)=>i.contains(t),EG=(i,t,e)=>{if(e)return Array.from(i.querySelectorAll(t));const n=i.querySelector(t);return n?[n]:[]});let If=null,DG=!1;const TG=AO,IG=EG;let RG=(()=>{class i{validateStyleProperty(e){return function jge(i){If||(If=function Yge(){return typeof document<"u"?document.body:null}()||{},DG=!!If.style&&"WebkitAppearance"in If.style);let t=!0;return If.style&&!function Wge(i){return"ebkit"==i.substring(1,6)}(i)&&(t=i in If.style,!t&&DG&&(t="Webkit"+i.charAt(0).toUpperCase()+i.slice(1)in If.style)),t}(e)}matchesElement(e,n){return!1}containsElement(e,n){return TG(e,n)}getParentElement(e){return DO(e)}query(e,n,r){return IG(e,n,r)}computeStyle(e,n,r){return r||""}animate(e,n,r,s,o,a=[],l){return new nb(r,s)}}return i.\u0275fac=function(e){return new(e||i)},i.\u0275prov=Pe({token:i,factory:i.\u0275fac}),i})(),TO=(()=>{class i{}return i.NOOP=new RG,i})();const qge=1e3,IO="ng-enter",nE="ng-leave",iE="ng-trigger",rE=".ng-trigger",PG="ng-animating",RO=".ng-animating";function fd(i){if("number"==typeof i)return i;const t=i.match(/^(-?[\.\d]+)(m?s)/);return!t||t.length<2?0:kO(parseFloat(t[1]),t[2])}function kO(i,t){return"s"===t?i*qge:i}function sE(i,t,e){return i.hasOwnProperty("duration")?i:function Kge(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(MG()),{duration:0,delay:0,easing:""};r=kO(parseFloat(a[1]),a[2]);const l=a[3];null!=l&&(s=kO(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 dge(){return new pe(3100,!1)}()),a=!0),s<0&&(t.push(function uge(){return new pe(3101,!1)}()),a=!0),a&&t.splice(l,0,MG())}return{duration:r,delay:s,easing:o}}(i,t,e)}function r0(i,t={}){return Object.keys(i).forEach(e=>{t[e]=i[e]}),t}function OG(i){const t=new Map;return Object.keys(i).forEach(e=>{t.set(e,i[e])}),t}function Bu(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 LG(i,t,e){return e?t+":"+e+";":""}function NG(i){let t="";for(let e=0;e{const s=OO(r);e&&!e.has(r)&&e.set(r,i.style[s]),i.style[s]=n}),MO()&&NG(i))}function Rf(i,t){i.style&&(t.forEach((e,n)=>{const r=OO(n);i.style[r]=""}),MO()&&NG(i))}function s0(i){return Array.isArray(i)?1==i.length?i[0]:rV(i):i}const PO=new RegExp("{{\\s*(.+?)\\s*}}","g");function BG(i){let t=[];if("string"==typeof i){let e;for(;e=PO.exec(i);)t.push(e[1]);PO.lastIndex=0}return t}function o0(i,t,e){const n=i.toString(),r=n.replace(PO,(s,o)=>{let a=t[o];return null==a&&(e.push(function fge(i){return new pe(3003,!1)}()),a=""),a.toString()});return r==n?i:r}function oE(i){const t=[];let e=i.next();for(;!e.done;)t.push(e.value),e=i.next();return t}const Jge=/-+([a-z0-9])/g;function OO(i){return i.replace(Jge,(...t)=>t[1].toUpperCase())}function e_e(i){return i.replace(/([a-z])([A-Z])/g,"$1-$2").toLowerCase()}function aa(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 pge(i){return new pe(3004,!1)}()}}function UG(i,t){return window.getComputedStyle(i)[t]}const cE="*";function o_e(i,t){const e=[];return"string"==typeof i?i.split(/\s*,\s*/).forEach(n=>function a_e(i,t,e){if(":"==i[0]){const l=function l_e(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 Age(i){return new pe(3015,!1)}()),t;const r=n[1],s=n[2],o=n[3];t.push(VG(r,o));"<"==s[0]&&!(r==cE&&o==cE)&&t.push(VG(o,r))}(n,e,t)):e.push(i),e}const dE=new Set(["true","1"]),uE=new Set(["false","0"]);function VG(i,t){const e=dE.has(i)||uE.has(i),n=dE.has(t)||uE.has(t);return(r,s)=>{let o=i==cE||i==r,a=t==cE||t==s;return!o&&e&&"boolean"==typeof r&&(o=r?dE.has(i):uE.has(i)),!a&&n&&"boolean"==typeof s&&(a=s?dE.has(t):uE.has(t)),o&&a}}const c_e=new RegExp("s*:selfs*,?","g");function FO(i,t,e,n){return new d_e(i).build(t,e,n)}class d_e{constructor(t){this._driver=t}build(t,e,n){const r=new f_e(e);return this._resetContextStyleTimingState(r),aa(this,s0(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 gge(){return new pe(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(d=>{l.name=d,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 _ge(){return new pe(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=>{BG(l).forEach(c=>{o.hasOwnProperty(c)||s.add(c)})})}),s.size&&(oE(s.values()),e.errors.push(function vge(i,t){return new pe(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=aa(this,s0(t.animation),e);return{type:1,matchers:o_e(t.expr,e.errors),animation:n,queryCount:e.queryCount,depCount:e.depCount,options:kf(t.options)}}visitSequence(t,e){return{type:2,steps:t.steps.map(n=>aa(this,n,e)),options:kf(t.options)}}visitGroup(t,e){const n=e.currentTime;let r=0;const s=t.steps.map(o=>{e.currentTime=n;const a=aa(this,o,e);return r=Math.max(r,e.currentTime),a});return e.currentTime=r,{type:3,steps:s,options:kf(t.options)}}visitAnimate(t,e){const n=function m_e(i,t){if(i.hasOwnProperty("duration"))return i;if("number"==typeof i)return LO(sE(i,t).duration,0,"");const e=i;if(e.split(/\s+/).some(s=>"{"==s.charAt(0)&&"{"==s.charAt(1))){const s=LO(0,0,"");return s.dynamic=!0,s.strValue=e,s}const r=sE(e,t);return LO(r.duration,r.delay,r.easing)}(t.timings,e.errors);e.currentAnimateTimings=n;let r,s=t.styles?t.styles:oi({});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=oi(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===Kc?n.push(a):e.errors.push(new pe(3002,!1)):n.push(OG(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),d=c.get(l);let h=!0;d&&(s!=r&&s>=d.startTime&&r<=d.endTime&&(e.errors.push(function bge(i,t,e,n,r){return new pe(3010,!1)}()),h=!1),s=d.startTime),h&&c.set(l,{startTime:s,endTime:r}),e.options&&function Qge(i,t,e){const n=t.params||{},r=BG(i);r.length&&r.forEach(s=>{n.hasOwnProperty(s)||e.push(function hge(i){return new pe(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 xge(){return new pe(3011,!1)}()),n;let s=0;const o=[];let a=!1,l=!1,c=0;const d=t.steps.map(y=>{const M=this._makeStyleAst(y,e);let x=null!=M.offset?M.offset:function p_e(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:aa(this,s0(t.animation),e),options:kf(t.options)}}visitAnimateChild(t,e){return e.depCount++,{type:9,options:kf(t.options)}}visitAnimateRef(t,e){return{type:10,animation:this.visitReference(t.animation,e),options:kf(t.options)}}visitQuery(t,e){const n=e.currentQuerySelector,r=t.options||{};e.queryCount++,e.currentQuery=t;const[s,o]=function u_e(i){const t=!!i.split(/\s*,\s*/).find(e=>":self"==e);return t&&(i=i.replace(c_e,"")),i=i.replace(/@\*/g,rE).replace(/@\w+/g,e=>rE+"-"+e.slice(1)).replace(/:animating/g,RO),[i,t]}(t.selector);e.currentQuerySelector=n.length?n+" "+s:s,oa(e.collectedStyles,e.currentQuerySelector,new Map);const a=aa(this,s0(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:kf(t.options)}}visitStagger(t,e){e.currentQuery||e.errors.push(function Sge(){return new pe(3013,!1)}());const n="full"===t.timings?{duration:0,delay:0,easing:"full"}:sE(t.timings,e.errors,!0);return{type:12,animation:aa(this,s0(t.animation),e),timings:n,options:null}}}class f_e{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 kf(i){return i?(i=r0(i)).params&&(i.params=function h_e(i){return i?r0(i):null}(i.params)):i={},i}function LO(i,t,e){return{duration:i,delay:t,easing:e}}function NO(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 hE{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 v_e=new RegExp(":enter","g"),b_e=new RegExp(":leave","g");function BO(i,t,e,n,r,s=new Map,o=new Map,a,l,c=[]){return(new x_e).buildKeyframes(i,t,e,n,r,s,o,a,l,c)}class x_e{buildKeyframes(t,e,n,r,s,o,a,l,c,d=[]){c=c||new hE;const h=new UO(t,e,c,r,s,d,[]);h.options=l;const p=l.delay?fd(l.delay):0;h.currentTimeline.delayNextStep(p),h.currentTimeline.setStyles([o],null,h.errors,l),aa(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()):[NO(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:fd(o0(s,r?.params??{},e.errors));n.delayNextStep(o)}}}_visitSubInstructions(t,e,n){let s=e.currentTimeline.currentTime;const o=null!=n.duration?fd(n.duration):null,a=null!=n.delay?fd(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),aa(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=fE);const o=fd(s.delay);r.delayNextStep(o)}t.steps.length&&(t.steps.forEach(o=>aa(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?fd(t.options.delay):0;t.steps.forEach(o=>{const a=e.createSubContext(t.options);s&&a.delayNextStep(s),aa(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 sE(e.params?o0(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?fd(r.delay):0;s&&(6===e.previousNode.type||0==n&&e.currentTimeline.hasCurrentStyleProperties())&&(e.currentTimeline.snapshotCurrentStyles(),e.previousNode=fE);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,d)=>{e.currentQueryIndex=d;const h=e.createSubContext(t.options,c);s&&h.delayNextStep(s),c===e.element&&(l=h.currentTimeline),aa(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 d=e.currentTimeline;l&&d.delayNextStep(l);const h=d.currentTime;aa(this,t.animation,e),e.previousNode=t,n.currentStaggerTime=r.currentTime-h+(r.startTime-n.currentTimeline.startTime)}}const fE={};class UO{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=fE,this.subContextCount=0,this.options={},this.currentQueryIndex=0,this.currentQueryTotal=0,this.currentStaggerTime=0,this.currentTimeline=l||new pE(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=fd(n.duration)),null!=n.delay&&(r.delay=fd(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]=o0(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 UO(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=fE,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 w_e(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(v_e,"."+this._enterClassName)).replace(b_e,"."+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 Ege(i){return new pe(3014,!1)}()),a}}class pE{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 pE(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||Kc),this._currentKeyframe.set(e,Kc);this._currentEmptyStepKeyframe=this._currentKeyframe}setStyles(t,e,n,r){e&&this._previousKeyframe.set("easing",e);const s=r&&r.params||{},o=function M_e(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,Kc)}else Bu(r,e)}),e}(t,this._globalTimelineStyles);for(let[a,l]of o){const c=o0(l,s,n);this._pendingStyles.set(a,c),this._localTimelineStyles.has(a)||this._backFill.set(a,this._globalTimelineStyles.get(a)??Kc),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=Bu(a,new Map,this._backFill);c.forEach((d,h)=>{d===rR?t.add(h):d===Kc&&e.add(h)}),n||c.set("offset",l/this.duration),r.push(c)});const s=t.size?oE(t.values()):[],o=e.size?oE(e.values()):[];if(n){const a=r[0],l=new Map(a);a.set("offset",0),l.set("offset",1),r=[a,l]}return NO(this.element,r,s,o,this.duration,this.startTime,this.easing,!1)}}class w_e extends pE{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=Bu(t[0]);l.set("offset",0),s.push(l);const c=Bu(t[0]);c.set("offset",$G(a)),s.push(c);const d=t.length-1;for(let h=1;h<=d;h++){let p=Bu(t[h]);const m=p.get("offset");p.set("offset",$G((e+m*n)/o)),s.push(p)}n=o,e=0,r="",t=s}return NO(this.element,t,this.preStyleProps,this.postStyleProps,n,e,r,!0)}}function $G(i,t=3){const e=Math.pow(10,t-1);return Math.round(i*e)/e}class VO{}const C_e=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 S_e extends VO{normalizePropertyName(t,e){return OO(t)}normalizeStyleValue(t,e,n,r){let s="";const o=n.toString().trim();if(C_e.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 mge(i,t){return new pe(3005,!1)}())}return o+s}}function GG(i,t,e,n,r,s,o,a,l,c,d,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:d,totalTime:h,errors:p}}const zO={};class WG{constructor(t,e,n){this._triggerName=t,this.ast=e,this._stateStyles=n}match(t,e,n,r){return function E_e(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,d){const h=[],p=this.ast.options&&this.ast.options.params||zO,g=this.buildStyles(n,a&&a.params||zO,h),b=l&&l.params||zO,v=this.buildStyles(r,b,h),y=new Set,M=new Map,x=new Map,C="void"===r,F={params:A_e(b,p),delay:this.ast.options?.delay},D=d?[]:BO(t,e,this.ast.animation,s,o,g,v,F,c,h);let k=0;if(D.forEach(T=>{k=Math.max(T.duration+T.delay,k)}),h.length)return GG(e,this._triggerName,n,r,C,g,v,[],[],M,x,k,h);D.forEach(T=>{const A=T.element,W=oa(M,A,new Set);T.preStyleProps.forEach(ne=>W.add(ne));const ie=oa(x,A,new Set);T.postStyleProps.forEach(ne=>ie.add(ne)),A!==e&&y.add(A)});const B=oE(y.values());return GG(e,this._triggerName,n,r,C,g,v,D,B,M,x,k)}}function A_e(i,t){const e=r0(t);for(const n in i)i.hasOwnProperty(n)&&null!=i[n]&&(e[n]=i[n]);return e}class D_e{constructor(t,e,n){this.styles=t,this.defaultParams=e,this.normalizer=n}buildStyles(t,e){const n=new Map,r=r0(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=o0(o,r,e));const l=this.normalizer.normalizePropertyName(a,e);o=this.normalizer.normalizeStyleValue(a,l,o,e),n.set(a,o)})}),n}}class I_e{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 D_e(r.style,r.options&&r.options.params||{},n))}),jG(this.states,"true","1"),jG(this.states,"false","0"),e.transitions.forEach(r=>{this.transitionFactories.push(new WG(t,r,this.states))}),this.fallbackTransition=function R_e(i,t,e){return new WG(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 jG(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 k_e=new hE;class P_e{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=FO(this._driver,e,n,r);if(n.length)throw function Pge(i){return new pe(3503,!1)}();this._animations.set(t,s)}_buildPlayer(t,e,n){const r=t.element,s=CG(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=BO(this._driver,e,s,IO,nE,new Map,new Map,n,k_e,r),o.forEach(d=>{const h=oa(a,d.element,new Map);d.postStyleProps.forEach(p=>h.set(p,null))})):(r.push(function Oge(){return new pe(3300,!1)}()),o=[]),r.length)throw function Fge(i){return new pe(3504,!1)}();a.forEach((d,h)=>{d.forEach((p,m)=>{d.set(m,this._driver.computeStyle(h,m,Kc))})});const c=Nu(o.map(d=>{const h=a.get(d.element);return this._buildPlayer(d,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 Lge(i){return new pe(3301,!1)}();return e}listen(t,e,n,r){const s=EO(e,"","","");return CO(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 YG="ng-animate-queued",HO="ng-animate-disabled",B_e=[],qG={namespaceId:"",setForRemoval:!1,setForMove:!1,hasAnimation:!1,removedBeforeQueried:!1},U_e={namespaceId:"",setForMove:!1,setForRemoval:!1,hasAnimation:!1,removedBeforeQueried:!0},za="__ng_removed";class $O{get params(){return this.options.params}constructor(t,e=""){this.namespaceId=e;const n=t&&t.hasOwnProperty("value");if(this.value=function $_e(i){return i??null}(n?t.value:t),n){const s=r0(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 a0="void",GO=new $O(a0);class V_e{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,Ha(e,this._hostClassName)}listen(t,e,n,r){if(!this._triggers.has(e))throw function Nge(i,t){return new pe(3302,!1)}();if(null==n||0==n.length)throw function Bge(i){return new pe(3303,!1)}();if(!function G_e(i){return"start"==i||"done"==i}(n))throw function Uge(i,t){return new pe(3400,!1)}();const s=oa(this._elementListeners,t,[]),o={name:e,phase:n,callback:r};s.push(o);const a=oa(this._engine.statesByElement,t,new Map);return a.has(e)||(Ha(t,iE),Ha(t,iE+"-"+e),a.set(e,GO)),()=>{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 Vge(i){return new pe(3401,!1)}();return e}trigger(t,e,n,r=!0){const s=this._getTrigger(e),o=new WO(this.id,e,t);let a=this._engine.statesByElement.get(t);a||(Ha(t,iE),Ha(t,iE+"-"+e),this._engine.statesByElement.set(t,a=new Map));let l=a.get(e);const c=new $O(n,this.id);if(!(n&&n.hasOwnProperty("value"))&&l&&c.absorbOptions(l.options),a.set(e,c),l||(l=GO),c.value!==a0&&l.value===c.value){if(!function Y_e(i,t){const e=Object.keys(i),n=Object.keys(t);if(e.length!=n.length)return!1;for(let r=0;r{Rf(t,v),fc(t,y)})}return}const p=oa(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||(Ha(t,YG),o.onStart(()=>{Yg(t,YG)})),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,rE,!0);n.forEach(r=>{if(r[za])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 d=this.trigger(t,c,a0,r);d&&a.push(d)}}),a.length)return this._engine.markElementAsRemoved(this.id,t,!0,e,o),n&&Nu(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)||GO,d=new $O(a0),h=new WO(this.id,o,t);this._engine.totalQueuedPlayers++,this._queue.push({element:t,triggerName:o,transition:l,fromState:c,toState:d,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[za];(!s||s===qG)&&(n.afterFlush(()=>this.clearElementCache(t)),n.destroyInnerAnimations(t),n._onRemovalComplete(t,e))}}insertNode(t,e){Ha(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=EO(s,n.triggerName,n.fromState.value,n.toState.value);l._data=t,CO(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 z_e{_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 V_e(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(mE(e)){const s=this._fetchNamespace(t);if(s)return s.trigger(e,n,r),!0}return!1}insertNode(t,e,n,r){if(!mE(e))return;const s=e[za];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),Ha(t,HO)):this.disabledNodes.has(t)&&(this.disabledNodes.delete(t),Yg(t,HO))}removeNode(t,e,n,r){if(mE(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[za]={namespaceId:t,setForRemoval:r,hasAnimation:n,removedBeforeQueried:!1,previousTriggersValues:s}}listen(t,e,n,r,s){return mE(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,rE,!0);e.forEach(n=>this.destroyActiveAnimationsForElement(n)),0!=this.playersByQueriedElement.size&&(e=this.driver.query(t,RO,!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 Nu(this.players).onDone(()=>t());t()})}processLeaveNode(t){const e=t[za];if(e&&e.setForRemoval){if(t[za]=qG,e.namespaceId){this.destroyInnerAnimations(t);const n=this._fetchNamespace(e.namespaceId);n&&n.clearElementCache(t)}this._onRemovalComplete(t,e.setForRemoval)}t.classList?.contains(HO)&&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?Nu(e).onDone(()=>{n.forEach(r=>r())}):n.forEach(r=>r())}}reportError(t){throw function zge(i){return new pe(3402,!1)}()}_flushAnimations(t,e){const n=new hE,r=[],s=new Map,o=[],a=new Map,l=new Map,c=new Map,d=new Set;this.disabledNodes.forEach(q=>{d.add(q);const se=this.driver.query(q,".ng-animate-queued",!0);for(let J=0;J{const J=IO+b++;g.set(se,J),q.forEach(we=>Ha(we,J))});const v=[],y=new Set,M=new Set;for(let q=0;qy.add(we)):M.add(se))}const x=new Map,C=ZG(p,Array.from(y));C.forEach((q,se)=>{const J=nE+b++;x.set(se,J),q.forEach(we=>Ha(we,J))}),t.push(()=>{m.forEach((q,se)=>{const J=g.get(se);q.forEach(we=>Yg(we,J))}),C.forEach((q,se)=>{const J=x.get(se);q.forEach(we=>Yg(we,J))}),v.forEach(q=>{this.processLeaveNode(q)})});const F=[],D=[];for(let q=this._namespaceList.length-1;q>=0;q--)this._namespaceList[q].drainQueuedTransitions(e).forEach(J=>{const we=J.player,Ve=J.element;if(F.push(we),this.collectedEnterElements.length){const Le=Ve[za];if(Le&&Le.setForMove){if(Le.previousTriggersValues&&Le.previousTriggersValues.has(J.triggerName)){const wt=Le.previousTriggersValues.get(J.triggerName),Tt=this.statesByElement.get(J.element);if(Tt&&Tt.has(J.triggerName)){const St=Tt.get(J.triggerName);St.value=wt,Tt.set(J.triggerName,St)}}return void we.destroy()}}const Ye=!h||!this.driver.containsElement(h,Ve),Rt=x.get(Ve),nn=g.get(Ve),le=this._buildInstruction(J,n,nn,Rt,Ye);if(le.errors&&le.errors.length)return void D.push(le);if(Ye)return we.onStart(()=>Rf(Ve,le.fromStyles)),we.onDestroy(()=>fc(Ve,le.toStyles)),void r.push(we);if(J.isFallbackTransition)return we.onStart(()=>Rf(Ve,le.fromStyles)),we.onDestroy(()=>fc(Ve,le.toStyles)),void r.push(we);const Fe=[];le.timelines.forEach(Le=>{Le.stretchStartingKeyframe=!0,this.disabledNodes.has(Le.element)||Fe.push(Le)}),le.timelines=Fe,n.append(Ve,le.timelines),o.push({instruction:le,player:we,element:Ve}),le.queriedElements.forEach(Le=>oa(a,Le,[]).push(we)),le.preStyleProps.forEach((Le,wt)=>{if(Le.size){let Tt=l.get(wt);Tt||l.set(wt,Tt=new Set),Le.forEach((St,Sn)=>Tt.add(Sn))}}),le.postStyleProps.forEach((Le,wt)=>{let Tt=c.get(wt);Tt||c.set(wt,Tt=new Set),Le.forEach((St,Sn)=>Tt.add(Sn))})});if(D.length){const q=[];D.forEach(se=>{q.push(function Hge(i,t){return new pe(3505,!1)}())}),F.forEach(se=>se.destroy()),this.reportError(q)}const k=new Map,B=new Map;o.forEach(q=>{const se=q.element;n.has(se)&&(B.set(se,se),this._beforeAnimationBuild(q.player.namespaceId,q.instruction,k))}),r.forEach(q=>{const se=q.element;this._getPreviousPlayers(se,!1,q.namespaceId,q.triggerName,null).forEach(we=>{oa(k,se,[]).push(we),we.destroy()})});const T=v.filter(q=>JG(q,l,c)),A=new Map;KG(A,this.driver,M,c,Kc).forEach(q=>{JG(q,l,c)&&T.push(q)});const ie=new Map;m.forEach((q,se)=>{KG(ie,this.driver,new Set(q),l,rR)}),T.forEach(q=>{const se=A.get(q),J=ie.get(q);A.set(q,new Map([...Array.from(se?.entries()??[]),...Array.from(J?.entries()??[])]))});const ne=[],oe=[],ge={};o.forEach(q=>{const{element:se,player:J,instruction:we}=q;if(n.has(se)){if(d.has(se))return J.onDestroy(()=>fc(se,we.toStyles)),J.disabled=!0,J.overrideTotalTime(we.totalTime),void r.push(J);let Ve=ge;if(B.size>1){let Rt=se;const nn=[];for(;Rt=Rt.parentNode;){const le=B.get(Rt);if(le){Ve=le;break}nn.push(Rt)}nn.forEach(le=>B.set(le,Ve))}const Ye=this._buildAnimation(J.namespaceId,we,k,s,ie,A);if(J.setRealPlayer(Ye),Ve===ge)ne.push(J);else{const Rt=this.playersByElement.get(Ve);Rt&&Rt.length&&(J.parentPlayer=Nu(Rt)),r.push(J)}}else Rf(se,we.fromStyles),J.onDestroy(()=>fc(se,we.toStyles)),oe.push(J),d.has(se)&&r.push(J)}),oe.forEach(q=>{const se=s.get(q.element);if(se&&se.length){const J=Nu(se);q.setRealPlayer(J)}}),r.forEach(q=>{q.parentPlayer?q.syncPlayerEvents(q.parentPlayer):q.destroy()});for(let q=0;q!Ye.destroyed);Ve.length?W_e(this,se,Ve):this.processLeaveNode(se)}return v.length=0,ne.forEach(q=>{this.players.push(q),q.onDone(()=>{q.destroy();const se=this.players.indexOf(q);this.players.splice(se,1)}),q.play()}),ne}elementContainsData(t,e){let n=!1;const r=e[za];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==a0;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,d=c!==s,h=oa(n,c,[]);this._getPreviousPlayers(c,d,o,a,e.toState).forEach(m=>{const g=m.getRealPlayer();g.beforeDestroy&&g.beforeDestroy(),m.destroy(),h.push(m)})}Rf(s,e.fromStyles)}_buildAnimation(t,e,n,r,s,o){const a=e.triggerName,l=e.element,c=[],d=new Set,h=new Set,p=e.timelines.map(g=>{const b=g.element;d.add(b);const v=b[za];if(v&&v.removedBeforeQueried)return new nb(g.duration,g.delay);const y=b!==l,M=function j_e(i){const t=[];return QG(i,t),t}((n.get(b)||B_e).map(k=>k.getRealPlayer())).filter(k=>!!k.element&&k.element===b),x=s.get(b),C=o.get(b),F=CG(0,this._normalizer,0,g.keyframes,x,C),D=this._buildPlayer(g,F,M);if(g.subTimeline&&r&&h.add(b),y){const k=new WO(t,a,b);k.setRealPlayer(D),c.push(k)}return D});c.forEach(g=>{oa(this.playersByQueriedElement,g.element,[]).push(g),g.onDone(()=>function H_e(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))}),d.forEach(g=>Ha(g,PG));const m=Nu(p);return m.onDestroy(()=>{d.forEach(g=>Yg(g,PG)),fc(l,e.toStyles)}),h.forEach(g=>{oa(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 nb(t.duration,t.delay)}}class WO{constructor(t,e,n){this.namespaceId=t,this.triggerName=e,this.element=n,this._player=new nb,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=>CO(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){oa(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 mE(i){return i&&1===i.nodeType}function XG(i,t){const e=i.style.display;return i.style.display=t??"none",e}function KG(i,t,e,n,r){const s=[];e.forEach(l=>s.push(XG(l)));const o=[];n.forEach((l,c)=>{const d=new Map;l.forEach(h=>{const p=t.computeStyle(c,h,r);d.set(h,p),(!p||0==p.length)&&(c[za]=U_e,o.push(c))}),i.set(c,d)});let a=0;return e.forEach(l=>XG(l,s[a++])),o}function ZG(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 Ha(i,t){i.classList?.add(t)}function Yg(i,t){i.classList?.remove(t)}function W_e(i,t,e){Nu(e).onDone(()=>i.processLeaveNode(t))}function QG(i,t){for(let e=0;er.add(s)):t.set(i,n),e.delete(i),!0}class gE{constructor(t,e,n){this.bodyNode=t,this._driver=e,this._normalizer=n,this._triggerCache={},this.onRemovalComplete=(r,s)=>{},this._transitionEngine=new z_e(t,e,n),this._timelineEngine=new P_e(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=[],d=FO(this._driver,s,l,c);if(l.length)throw function Rge(i,t){return new pe(3404,!1)}();a=function T_e(i,t,e){return new I_e(i,t,e)}(r,d,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]=SG(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]=SG(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 X_e=(()=>{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&&fc(this._element,this._startStyles,this._initialStyles),this._state=1)}finish(){this.start(),this._state<2&&(fc(this._element,this._initialStyles),this._endStyles&&(fc(this._element,this._endStyles),this._endStyles=null),this._state=1)}destroy(){this.finish(),this._state<3&&(i.initialStylesByElement.delete(this._element),this._startStyles&&(Rf(this._element,this._startStyles),this._endStyles=null),this._endStyles&&(Rf(this._element,this._endStyles),this._endStyles=null),fc(this._element,this._initialStyles),this._state=3)}}return i.initialStylesByElement=new WeakMap,i})();function jO(i){let t=null;return i.forEach((e,n)=>{(function K_e(i){return"display"===i||"position"===i})(n)&&(t=t||new Map,t.set(n,e))}),t}class e8{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:UG(this.element,r))}),this.currentSnapshot=t}triggerCallback(t){const e="start"===t?this._onStartFns:this._onDoneFns;e.forEach(n=>n()),e.length=0}}class Z_e{validateStyleProperty(t){return!0}validateAnimatableStyleProperty(t){return!0}matchesElement(t,e){return!1}containsElement(t,e){return TG(t,e)}getParentElement(t){return DO(t)}query(t,e,n){return IG(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,d=o.filter(m=>m instanceof e8);(function t_e(i,t){return 0===i||0===t})(n,r)&&d.forEach(m=>{m.currentSnapshot.forEach((g,b)=>c.set(b,g))});let h=function Zge(i){return i.length?i[0]instanceof Map?i:i.map(t=>OG(t)):[]}(e).map(m=>Bu(m));h=function n_e(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,UG(i,a)))}}return t}(t,h,c);const p=function q_e(i,t){let e=null,n=null;return Array.isArray(t)&&t.length?(e=jO(t[0]),t.length>1&&(n=jO(t[t.length-1]))):t instanceof Map&&(e=jO(t)),e||n?new X_e(i,e,n):null}(t,h);return new e8(t,h,l,p)}}let Q_e=(()=>{class i extends nV{constructor(e,n){super(),this._nextAnimationId=0,this._renderer=e.createRenderer(n.body,{id:"0",encapsulation:Ks.None,styles:[],data:{animation:[]}})}build(e){const n=this._nextAnimationId.toString();this._nextAnimationId++;const r=Array.isArray(e)?rV(e):e;return t8(this._renderer,null,n,"register",[r]),new J_e(n,this._renderer)}}return i.\u0275fac=function(e){return new(e||i)(ee(Gl),ee(qt))},i.\u0275prov=Pe({token:i,factory:i.\u0275fac}),i})();class J_e extends LQ{constructor(t,e){super(),this._id=t,this._renderer=e}create(t,e){return new eve(this._id,t,e||{},this._renderer)}}class eve{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 t8(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 t8(i,t,e,n,r){return i.setProperty(t,`@@${e}:${n}`,r)}const n8="@.disabled";let tve=(()=>{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 d=this._rendererCache.get(s);return d||(d=new i8("",s,this.engine,()=>this._rendererCache.delete(s)),this._rendererCache.set(s,d)),d}const o=n.id,a=n.id+"-"+this._currentId;this._currentId++,this.engine.register(a,e);const l=d=>{Array.isArray(d)?d.forEach(l):this.engine.registerTrigger(o,a,e,d.name,d)};return n.data.animation.forEach(l),new nve(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)(ee(Gl),ee(gE),ee(gt))},i.\u0275prov=Pe({token:i,factory:i.\u0275fac}),i})();class i8{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==n8?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 nve extends i8{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==n8?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 ive(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 rve(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 r8=[{provide:nV,useClass:Q_e},{provide:VO,useFactory:function ove(){return new S_e}},{provide:gE,useClass:(()=>{class i extends gE{constructor(e,n,r,s){super(e.body,n,r)}ngOnDestroy(){this.flush()}}return i.\u0275fac=function(e){return new(e||i)(ee(qt),ee(TO),ee(VO),ee(dm))},i.\u0275prov=Pe({token:i,factory:i.\u0275fac}),i})()},{provide:Gl,useFactory:function ave(i,t,e){return new tve(i,t,e)},deps:[aM,gE,gt]}],YO=[{provide:TO,useFactory:()=>new Z_e},{provide:kr,useValue:"BrowserAnimations"},...r8],s8=[{provide:TO,useClass:RG},{provide:kr,useValue:"NoopAnimations"},...r8];let lve=(()=>{class i{static withConfig(e){return{ngModule:i,providers:e.disableAnimations?s8:YO}}}return i.\u0275fac=function(e){return new(e||i)},i.\u0275mod=en({type:i}),i.\u0275inj=Wt({providers:YO,imports:[LB]}),i})();const o8=new me("CdkAccordion");let cve=0,dve=(()=>{class i{get expanded(){return this._expanded}set expanded(e){e=tn(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=tn(e)}constructor(e,n,r){this.accordion=e,this._changeDetectorRef=n,this._expansionDispatcher=r,this._openCloseAllSubscription=Qt.EMPTY,this.closed=new $e,this.opened=new $e,this.destroyed=new $e,this.expandedChange=new $e,this.id="cdk-accordion-child-"+cve++,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)(E(o8,12),E(Qn),E($R))},i.\u0275dir=ve({type:i,selectors:[["cdk-accordion-item"],["","cdkAccordionItem",""]],inputs:{expanded:"expanded",disabled:"disabled"},outputs:{closed:"closed",opened:"opened",destroyed:"destroyed",expandedChange:"expandedChange"},exportAs:["cdkAccordionItem"],features:[Dn([{provide:o8,useValue:void 0}])]}),i})(),uve=(()=>{class i{}return i.\u0275fac=function(e){return new(e||i)},i.\u0275mod=en({type:i}),i.\u0275inj=Wt({}),i})();const hve=["body"];function fve(i,t){}const pve=[[["mat-expansion-panel-header"]],"*",[["mat-action-row"]]],mve=["mat-expansion-panel-header","*","mat-action-row"];function gve(i,t){1&i&&Ie(0,"span",2),2&i&&U("@indicatorRotate",re()._getExpandedState())}const _ve=[[["mat-panel-title"]],[["mat-panel-description"]],"*"],vve=["mat-panel-title","mat-panel-description","*"],a8=new me("MAT_ACCORDION"),l8="225ms cubic-bezier(0.4,0.0,0.2,1)",c8={indicatorRotate:Oa("indicatorRotate",[Os("collapsed, void",oi({transform:"rotate(0deg)"})),Os("expanded",oi({transform:"rotate(180deg)"})),Or("expanded <=> collapsed, void => collapsed",Yr(l8))]),bodyExpansion:Oa("bodyExpansion",[Os("collapsed, void",oi({height:"0px",visibility:"hidden"})),Os("expanded",oi({height:"*",visibility:"visible"})),Or("expanded <=> collapsed, void => collapsed",Yr(l8))])},d8=new me("MAT_EXPANSION_PANEL");let yve=(()=>{class i{constructor(e,n){this._template=e,this._expansionPanel=n}}return i.\u0275fac=function(e){return new(e||i)(E(Eo),E(d8,8))},i.\u0275dir=ve({type:i,selectors:[["ng-template","matExpansionPanelContent",""]]}),i})(),bve=0;const u8=new me("MAT_EXPANSION_PANEL_DEFAULT_OPTIONS");let h8=(()=>{class i extends dve{get hideToggle(){return this._hideToggle||this.accordion&&this.accordion.hideToggle}set hideToggle(e){this._hideToggle=tn(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 $e,this.afterCollapse=new $e,this._inputChanges=new Te,this._headerId="mat-expansion-panel-header-"+bve++,this._bodyAnimationDone=new Te,this.accordion=e,this._document=o,this._bodyAnimationDone.pipe(Ql((c,d)=>c.fromState===d.fromState&&c.toState===d.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(Do(null),gn(()=>this.expanded&&!this._portal),Oi(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)(E(a8,12),E(Qn),E($R),E(jr),E(qt),E(kr,8),E(u8,8))},i.\u0275cmp=ot({type:i,selectors:[["mat-expansion-panel"]],contentQueries:function(e,n,r){if(1&e&&Wi(r,yve,5),2&e){let s;At(s=Dt())&&(n._lazyContent=s.first)}},viewQuery:function(e,n){if(1&e&&$n(hve,5),2&e){let r;At(r=Dt())&&(n._body=r.first)}},hostAttrs:[1,"mat-expansion-panel"],hostVars:6,hostBindings:function(e,n){2&e&&ln("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:[Dn([{provide:a8,useValue:void 0},{provide:d8,useExisting:i}]),dt,xi],ngContentSelectors:mve,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&&(or(pve),Yt(0),G(1,"div",0,1),Oe("@bodyExpansion.done",function(s){return n._bodyAnimationDone.next(s)}),G(3,"div",2),Yt(4,1),fe(5,fve,0,0,"ng-template",3),j(),Yt(6,2),j()),2&e&&(V(1),U("@bodyExpansion",n._getExpandedState())("id",n.id),It("aria-labelledby",n._headerId),V(4),U("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:[c8.bodyExpansion]},changeDetection:0}),i})();class xve{}const wve=JI(xve);let Mve=(()=>{class i extends wve{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=Qt.EMPTY;const c=e.accordion?e.accordion._stateChanges.pipe(gn(d=>!(!d.hideToggle&&!d.togglePosition))):_o;this.tabIndex=parseInt(l||"")||0,this._parentChangeSubscription=Cr(e.opened,e.closed,c,e._inputChanges.pipe(gn(d=>!!(d.hideToggle||d.disabled||d.togglePosition)))).subscribe(()=>this._changeDetectorRef.markForCheck()),e.closed.pipe(gn(()=>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:Zo(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)(E(h8,1),E(vt),E(Xc),E(Qn),E(u8,8),E(kr,8),xa("tabindex"))},i.\u0275cmp=ot({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&&Oe("click",function(){return n._toggle()})("keydown",function(s){return n._keydown(s)}),2&e&&(It("id",n.panel._headerId)("tabindex",n.tabIndex)("aria-controls",n._getPanelId())("aria-expanded",n._isExpanded())("aria-disabled",n.panel.disabled),qo("height",n._getHeaderHeight()),ln("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:[dt],ngContentSelectors:vve,decls:5,vars:3,consts:[[1,"mat-content"],["class","mat-expansion-indicator",4,"ngIf"],[1,"mat-expansion-indicator"]],template:function(e,n){1&e&&(or(_ve),G(0,"span",0),Yt(1),Yt(2,1),Yt(3,2),j(),fe(4,gve,1,1,"span",1)),2&e&&(ln("mat-content-hide-toggle",!n._showToggle()),V(4),U("ngIf",n._showToggle()))},dependencies:[vi],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:[c8.indicatorRotate]},changeDetection:0}),i})(),Cve=(()=>{class i{}return i.\u0275fac=function(e){return new(e||i)},i.\u0275dir=ve({type:i,selectors:[["mat-panel-description"]],hostAttrs:[1,"mat-expansion-panel-header-description"]}),i})(),Sve=(()=>{class i{}return i.\u0275fac=function(e){return new(e||i)},i.\u0275dir=ve({type:i,selectors:[["mat-panel-title"]],hostAttrs:[1,"mat-expansion-panel-header-title"]}),i})(),Eve=(()=>{class i{}return i.\u0275fac=function(e){return new(e||i)},i.\u0275mod=en({type:i}),i.\u0275inj=Wt({imports:[co,Jn,uve,Bh]}),i})();function Ave(i,t){if(1&i&&(G(0,"mat-option",19),Be(1),j()),2&i){const e=t.$implicit;U("value",e),V(1),Qi(" ",e," ")}}function Dve(i,t){if(1&i){const e=jn();G(0,"mat-form-field",16)(1,"mat-select",17),Oe("selectionChange",function(r){return Vt(e),Et(re(2)._changePageSize(r.value))}),fe(2,Ave,2,2,"mat-option",18),j()()}if(2&i){const e=re(2);U("appearance",e._formFieldAppearance)("color",e.color),V(1),U("value",e.pageSize)("disabled",e.disabled)("aria-labelledby",e._pageSizeLabelId)("panelClass",e.selectConfig.panelClass||"")("disableOptionCentering",e.selectConfig.disableOptionCentering),V(1),U("ngForOf",e._displayedPageSizeOptions)}}function Tve(i,t){if(1&i&&(G(0,"div",20),Be(1),j()),2&i){const e=re(2);V(1),ui(e.pageSize)}}function Ive(i,t){if(1&i&&(G(0,"div",12)(1,"div",13),Be(2),j(),fe(3,Dve,3,8,"mat-form-field",14),fe(4,Tve,2,1,"div",15),j()),2&i){const e=re();V(1),ND("id",e._pageSizeLabelId),V(1),Qi(" ",e._intl.itemsPerPageLabel," "),V(1),U("ngIf",e._displayedPageSizeOptions.length>1),V(1),U("ngIf",e._displayedPageSizeOptions.length<=1)}}function Rve(i,t){if(1&i){const e=jn();G(0,"button",21),Oe("click",function(){return Vt(e),Et(re().firstPage())}),ki(),G(1,"svg",7),Ie(2,"path",22),j()()}if(2&i){const e=re();U("matTooltip",e._intl.firstPageLabel)("matTooltipDisabled",e._previousButtonsDisabled())("matTooltipPosition","above")("disabled",e._previousButtonsDisabled()),It("aria-label",e._intl.firstPageLabel)}}function kve(i,t){if(1&i){const e=jn();ki(),va(),G(0,"button",23),Oe("click",function(){return Vt(e),Et(re().lastPage())}),ki(),G(1,"svg",7),Ie(2,"path",24),j()()}if(2&i){const e=re();U("matTooltip",e._intl.lastPageLabel)("matTooltipDisabled",e._nextButtonsDisabled())("matTooltipPosition","above")("disabled",e._nextButtonsDisabled()),It("aria-label",e._intl.lastPageLabel)}}let vE=(()=>{class i{constructor(){this.changes=new Te,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=Pe({token:i,factory:i.\u0275fac,providedIn:"root"}),i})();const Ove={provide:vE,deps:[[new Ss,new Ma,vE]],useFactory:function Pve(i){return i||new vE}},Lve=new me("MAT_PAGINATOR_DEFAULT_OPTIONS"),Nve=WM(CQ(class{}));let Bve=(()=>{class i extends Nve{get pageIndex(){return this._pageIndex}set pageIndex(e){this._pageIndex=Math.max(Ps(e),0),this._changeDetectorRef.markForCheck()}get length(){return this._length}set length(e){this._length=Ps(e),this._changeDetectorRef.markForCheck()}get pageSize(){return this._pageSize}set pageSize(e){this._pageSize=Math.max(Ps(e),0),this._updateDisplayedPageSizeOptions()}get pageSizeOptions(){return this._pageSizeOptions}set pageSizeOptions(e){this._pageSizeOptions=(e||[]).map(n=>Ps(n)),this._updateDisplayedPageSizeOptions()}get hidePageSize(){return this._hidePageSize}set hidePageSize(e){this._hidePageSize=tn(e)}get showFirstLastButtons(){return this._showFirstLastButtons}set showFirstLastButtons(e){this._showFirstLastButtons=tn(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 $e,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){Co()},i.\u0275dir=ve({type:i,inputs:{color:"color",pageIndex:"pageIndex",length:"length",pageSize:"pageSize",pageSizeOptions:"pageSizeOptions",hidePageSize:"hidePageSize",showFirstLastButtons:"showFirstLastButtons",selectConfig:"selectConfig"},outputs:{page:"page"},features:[dt]}),i})(),Uve=0,Vve=(()=>{class i extends Bve{constructor(e,n,r){super(e,n,r),this._pageSizeLabelId="mat-paginator-page-size-label-"+Uve++,this._formFieldAppearance=r?.formFieldAppearance||"outline"}}return i.\u0275fac=function(e){return new(e||i)(E(vE),E(Qn),E(Lve,8))},i.\u0275cmp=ot({type:i,selectors:[["mat-paginator"]],hostAttrs:["role","group",1,"mat-mdc-paginator"],inputs:{disabled:"disabled"},exportAs:["matPaginator"],features:[dt],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&&(G(0,"div",0)(1,"div",1),fe(2,Ive,5,4,"div",2),G(3,"div",3)(4,"div",4),Be(5),j(),fe(6,Rve,3,5,"button",5),G(7,"button",6),Oe("click",function(){return n.previousPage()}),ki(),G(8,"svg",7),Ie(9,"path",8),j()(),va(),G(10,"button",9),Oe("click",function(){return n.nextPage()}),ki(),G(11,"svg",7),Ie(12,"path",10),j()(),fe(13,kve,3,5,"button",11),j()()()),2&e&&(V(2),U("ngIf",!n.hidePageSize),V(3),Qi(" ",n._intl.getRangeLabel(n.pageIndex,n.pageSize,n.length)," "),V(1),U("ngIf",n.showFirstLastButtons),V(1),U("matTooltip",n._intl.previousPageLabel)("matTooltipDisabled",n._previousButtonsDisabled())("matTooltipPosition","above")("disabled",n._previousButtonsDisabled()),It("aria-label",n._intl.previousPageLabel),V(3),U("matTooltip",n._intl.nextPageLabel)("matTooltipDisabled",n._nextButtonsDisabled())("matTooltipPosition","above")("disabled",n._nextButtonsDisabled()),It("aria-label",n._intl.nextPageLabel),V(3),U("ngIf",n.showFirstLastButtons))},dependencies:[lo,vi,qM,yl,pb,Nm,Fs],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})(),zve=(()=>{class i{}return i.\u0275fac=function(e){return new(e||i)},i.\u0275mod=en({type:i}),i.\u0275inj=Wt({providers:[Ove],imports:[co,XM,VH,LV]}),i})(),Hve=(()=>{class i{}return i.\u0275fac=function(e){return new(e||i)},i.\u0275mod=en({type:i,bootstrap:[cge]}),i.\u0275inj=Wt({providers:[Jl,KR,{provide:OH,useValue:Vie}],imports:[LB,wK,lve,tH,SJ,mC,mH,Eve,TV,kV,LV,XM,tz,zve,mse,vH,VH,vV,Ipe,Rme,nH,tR,Yie,lre]}),i})();th(ec,[lo,vi,Fs,n0,tE],[Ia]),th(zR,[hm,lo,vi,xy,nc,Zc,yl,h8,Mve,Sve,Cve,Fs,Vve,pb,Nm,n0],[]),th(bC,[lo,vi,wC,xC,_H,n0],[]),th(_G,[lo,vi,Ro,Fs,pb,Nm,n0,tE],[Ia]),L7().bootstrapModule(Hve).catch(i=>console.error(i))},489:function(Bo,Gs,ps){var dn;Bo=ps.nmd(Bo),function(){var z,Kr=200,Un="Expected a function",Ga="__lodash_hash_undefined__",Ci="__lodash_placeholder__",Si=1,ms=2,js=4,Ys=1,Uo=2,On=1,ur=2,mc=4,da=8,Tl=16,ua=32,Il=64,Wa=128,ha=256,md=512,wE=800,Kg=16,In=1/0,Ya=9007199254740991,CE=17976931348623157e292,Of=NaN,fa=4294967295,Te=fa-1,c0=fa>>>1,d0=[["ary",Wa],["bind",On],["bindKey",ur],["curry",da],["curryRight",Tl],["flip",md],["partial",ua],["partialRight",Il],["rearg",ha]],ni="[object Arguments]",qn="[object Array]",SE="[object AsyncFunction]",tt="[object Boolean]",gc="[object Date]",EE="[object DOMException]",gd="[object Error]",Ff="[object Function]",u0="[object GeneratorFunction]",Vo="[object Map]",Vu="[object Number]",AE="[object Null]",qa="[object Object]",h0="[object Promise]",DE="[object Proxy]",_d="[object RegExp]",zo="[object Set]",_c="[object String]",Lf="[object Symbol]",Zg="[object Undefined]",vd="[object WeakMap]",zu="[object ArrayBuffer]",yd="[object DataView]",pa="[object Float32Array]",Nf="[object Float64Array]",Qg="[object Int8Array]",Bf="[object Int16Array]",Jg="[object Int32Array]",e_="[object Uint8Array]",Hu="[object Uint8ClampedArray]",t_="[object Uint16Array]",n_="[object Uint32Array]",IE=/\b__p \+= '';/g,RE=/\b(__p \+=) '' \+/g,kE=/(__e\(.*?\)|\b__t\)) \+\n'';/g,f0=/&(?:amp|lt|gt|quot|#39);/g,p0=/[&<>"']/g,PE=RegExp(f0.source),OE=RegExp(p0.source),QO=/<%-([\s\S]+?)%>/g,i_=/<%([\s\S]+?)%>/g,r_=/<%=([\s\S]+?)%>/g,m0=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,g0=/^\w*$/,_0=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,s_=/[\\^$.*+?()[\]{}|]/g,v0=RegExp(s_.source),Uf=/^\s+/,y0=/\s/,b0=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,Mr=/\{\n\/\* \[wrapped with (.+)\] \*/,FE=/,? & /,LE=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,NE=/[()=,{}\[\]\/\s]/,BE=/\\(\\)?/g,x0=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,w0=/\w*$/,UE=/^[-+]0x[0-9a-f]+$/i,Xa=/^0b[01]+$/i,VE=/^\[object .+?Constructor\]$/,rr=/^0o[0-7]+$/i,bd=/^(?:0|[1-9]\d*)$/,_o=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,o_=/($^)/,zE=/['\n\r\u2028\u2029\\]/g,$u="\\ud800-\\udfff",C0="\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff",l_="\\u2700-\\u27bf",c_="a-z\\xdf-\\xf6\\xf8-\\xff",d_="A-Z\\xc0-\\xd6\\xd8-\\xde",S0="\\ufe0e\\ufe0f",E0="\\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",Cr="["+$u+"]",Vf="["+E0+"]",xd="["+C0+"]",ci="\\d+",u_="["+l_+"]",mi="["+c_+"]",zf="[^"+$u+E0+ci+l_+c_+d_+"]",h_="\\ud83c[\\udffb-\\udfff]",Ot="[^"+$u+"]",Wu="(?:\\ud83c[\\udde6-\\uddff]){2}",ju="[\\ud800-\\udbff][\\udc00-\\udfff]",Yu="["+d_+"]",pe="(?:"+mi+"|"+zf+")",Hf="(?:"+Yu+"|"+zf+")",Jt="(?:['\u2019](?:d|ll|m|re|s|t|ve))?",Xn="(?:['\u2019](?:D|LL|M|RE|S|T|VE))?",A0="(?:"+xd+"|"+h_+")?",jE="["+S0+"]?",qE=jE+A0+"(?:\\u200d(?:"+[Ot,Wu,ju].join("|")+")"+jE+A0+")*",XE="(?:"+[u_,Wu,ju].join("|")+")"+qE,JO="(?:"+[Ot+xd+"?",xd,Wu,ju,Cr].join("|")+")",Rl=RegExp("['\u2019]","g"),eF=RegExp(xd,"g"),D0=RegExp(h_+"(?="+h_+")|"+JO+qE,"g"),tF=RegExp([Yu+"?"+mi+"+"+Jt+"(?="+[Vf,Yu,"$"].join("|")+")",Hf+"+"+Xn+"(?="+[Vf,Yu+pe,"$"].join("|")+")",Yu+"?"+pe+"+"+Jt,Yu+"+"+Xn,"\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])","\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",ci,XE].join("|"),"g"),nF=RegExp("[\\u200d"+$u+C0+S0+"]"),KE=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,iF=["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"],ZE=-1,Ei={};Ei[pa]=Ei[Nf]=Ei[Qg]=Ei[Bf]=Ei[Jg]=Ei[e_]=Ei[Hu]=Ei[t_]=Ei[n_]=!0,Ei[ni]=Ei[qn]=Ei[zu]=Ei[tt]=Ei[yd]=Ei[gc]=Ei[gd]=Ei[Ff]=Ei[Vo]=Ei[Vu]=Ei[qa]=Ei[_d]=Ei[zo]=Ei[_c]=Ei[vd]=!1;var En={};En[ni]=En[qn]=En[zu]=En[yd]=En[tt]=En[gc]=En[pa]=En[Nf]=En[Qg]=En[Bf]=En[Jg]=En[Vo]=En[Vu]=En[qa]=En[_d]=En[zo]=En[_c]=En[Lf]=En[e_]=En[Hu]=En[t_]=En[n_]=!0,En[gd]=En[Ff]=En[vd]=!1;var oF={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},Pe=parseFloat,aF=parseInt,Wt="object"==typeof global&&global&&global.Object===Object&&global,Gf="object"==typeof self&&self&&self.Object===Object&&self,Sr=Wt||Gf||Function("return this")(),f_=Gs&&!Gs.nodeType&&Gs,Xu=f_&&Bo&&!Bo.nodeType&&Bo,p_=Xu&&Xu.exports===f_,wd=p_&&Wt.process,gs=function(){try{return Xu&&Xu.require&&Xu.require("util").types||wd&&wd.binding&&wd.binding("util")}catch{}}(),m_=gs&&gs.isArrayBuffer,T0=gs&&gs.isDate,Ft=gs&&gs.isMap,Wf=gs&&gs.isRegExp,I0=gs&&gs.isSet,Xs=gs&&gs.isTypedArray;function _s(X,he,ae){switch(ae.length){case 0:return X.call(he);case 1:return X.call(he,ae[0]);case 2:return X.call(he,ae[0],ae[1]);case 3:return X.call(he,ae[0],ae[1],ae[2])}return X.apply(he,ae)}function lF(X,he,ae,ze){for(var jt=-1,Vn=null==X?0:X.length;++jt-1}function Ku(X,he,ae){for(var ze=-1,jt=null==X?0:X.length;++ze-1;);return ae}function ma(X,he){for(var ae=X.length;ae--&&Lt(he,X[ae],0)>-1;);return ae}var tA=v_({\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"}),ot=v_({"&":"&","<":"<",">":">",'"':""","'":"'"});function th(X){return"\\"+oF[X]}function Sd(X){return nF.test(X)}function Xf(X){var he=-1,ae=Array(X.size);return X.forEach(function(ze,jt){ae[++he]=[jt,ze]}),ae}function ve(X,he){return function(ae){return X(he(ae))}}function $i(X,he){for(var ae=-1,ze=X.length,jt=0,Vn=[];++ae",""":'"',"'":"'"}),ys=function X(he){var u,ae=(he=null==he?Sr:ys.defaults(Sr.Object(),he,ys.pick(Sr,iF))).Array,ze=he.Date,jt=he.Error,Vn=he.Function,xt=he.Math,ai=he.Object,bc=he.RegExp,k0=he.String,Er=he.TypeError,sr=ae.prototype,Ho=ai.prototype,Zs=he["__core-js_shared__"],Ol=Vn.prototype.toString,ri=Ho.hasOwnProperty,bi=0,rA=(u=/[^.]+$/.exec(Zs&&Zs.keys&&Zs.keys.IE_PROTO||""))?"Symbol(src)_1."+u:"",Ad=Ho.toString,P0=Ol.call(ai),Zf=Sr._,Qf=bc("^"+Ol.call(ri).replace(s_,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),Ja=p_?he.Buffer:z,Ui=he.Symbol,x_=he.Uint8Array,bs=Ja?Ja.allocUnsafe:z,xs=ve(ai.getPrototypeOf,ai),Jf=ai.create,Dd=Ho.propertyIsEnumerable,xc=sr.splice,bo=Ui?Ui.isConcatSpreadable:z,ih=Ui?Ui.iterator:z,Td=Ui?Ui.toStringTag:z,ep=function(){try{var u=kc(ai,"defineProperty");return u({},"",{}),u}catch{}}(),sA=he.clearTimeout!==Sr.clearTimeout&&he.clearTimeout,dF=ze&&ze.now!==Sr.Date.now&&ze.now,uF=he.setTimeout!==Sr.setTimeout&&he.setTimeout,w_=xt.ceil,M_=xt.floor,O0=ai.getOwnPropertySymbols,hF=Ja?Ja.isBuffer:z,oA=he.isFinite,fF=sr.join,pF=ve(ai.keys,ai),fr=xt.max,Zr=xt.min,mF=ze.now,F0=he.parseInt,C_=xt.random,gF=sr.reverse,L0=kc(he,"DataView"),tp=kc(he,"Map"),el=kc(he,"Promise"),Id=kc(he,"Set"),xi=kc(he,"WeakMap"),Rd=kc(ai,"create"),np=xi&&new xi,kd={},N0=Pc(L0),B0=Pc(tp),aA=Pc(el),S_=Pc(Id),lA=Pc(xi),Qr=Ui?Ui.prototype:z,Pd=Qr?Qr.valueOf:z,E_=Qr?Qr.toString:z;function I(u){if(Pi(u)&&!sn(u)&&!(u instanceof kn)){if(u instanceof Ai)return u;if(ri.call(u,"__wrapped__"))return ns(u)}return new Ai(u)}var Od=function(){function u(){}return function(f){if(!Mi(f))return{};if(Jf)return Jf(f);u.prototype=f;var _=new u;return u.prototype=z,_}}();function wc(){}function Ai(u,f){this.__wrapped__=u,this.__actions__=[],this.__chain__=!!f,this.__index__=0,this.__values__=z}function kn(u){this.__wrapped__=u,this.__actions__=[],this.__dir__=1,this.__filtered__=!1,this.__iteratees__=[],this.__takeCount__=fa,this.__views__=[]}function Mc(u){var f=-1,_=null==u?0:u.length;for(this.clear();++f<_;){var w=u[f];this.set(w[0],w[1])}}function Pt(u){var f=-1,_=null==u?0:u.length;for(this.clear();++f<_;){var w=u[f];this.set(w[0],w[1])}}function ga(u){var f=-1,_=null==u?0:u.length;for(this.clear();++f<_;){var w=u[f];this.set(w[0],w[1])}}function Et(u){var f=-1,_=null==u?0:u.length;for(this.__data__=new ga;++f<_;)this.add(u[f])}function Jr(u){var f=this.__data__=new Pt(u);this.size=f.size}function I_(u,f){var _=sn(u),w=!_&&Lc(u),S=!_&&!w&&ol(u),P=!_&&!w&&!S&&jo(u),$=_||w||S||P,Y=$?Ks(u.length,k0):[],Q=Y.length;for(var _e in u)(f||ri.call(u,_e))&&(!$||!("length"==_e||S&&("offset"==_e||"parent"==_e)||P&&("buffer"==_e||"byteLength"==_e||"byteOffset"==_e)||sl(_e,Q)))&&Y.push(_e);return Y}function zr(u){var f=u.length;return f?u[lh(0,f-1)]:z}function tl(u,f){return Ep(eo(u),Nl(f,0,u.length))}function $0(u){return Ep(eo(u))}function Ll(u,f,_){(_!==z&&!Wo(u[f],_)||_===z&&!(f in u))&&$o(u,f,_)}function Qs(u,f,_){var w=u[f];(!ri.call(u,f)||!Wo(w,_)||_===z&&!(f in u))&&$o(u,f,_)}function rp(u,f){for(var _=u.length;_--;)if(Wo(u[_][0],f))return _;return-1}function G0(u,f,_,w){return nl(u,function(S,P,$){f(w,S,_(S),$)}),w}function W0(u,f){return u&&di(f,pr(f),u)}function $o(u,f,_){"__proto__"==f&&ep?ep(u,f,{configurable:!0,enumerable:!0,value:_,writable:!0}):u[f]=_}function rh(u,f){for(var _=-1,w=f.length,S=ae(w),P=null==u;++_=f?u:f)),u}function Ms(u,f,_,w,S,P){var $,Y=f&Si,Q=f&ms,_e=f&js;if(_&&($=S?_(u,w,S,P):_(u)),$!==z)return $;if(!Mi(u))return u;var ye=sn(u);if(ye){if($=function fx(u){var f=u.length,_=new u.constructor(f);return f&&"string"==typeof u[0]&&ri.call(u,"index")&&(_.index=u.index,_.input=u.input),_}(u),!Y)return eo(u,$)}else{var be=Hr(u),Xe=be==Ff||be==u0;if(ol(u))return me(u,Y);if(be==qa||be==ni||Xe&&!S){if($=Q||Xe?{}:kA(u),!Y)return Q?function hh(u,f){return di(u,dx(u),f)}(u,function gA(u,f){return u&&di(f,Ds(f),u)}($,u)):function H_(u,f){return di(u,Z_(u),f)}(u,W0($,u))}else{if(!En[be])return S?u:{};$=function px(u,f,_){var w=u.constructor;switch(f){case zu:return sx(u);case tt:case gc:return new w(+u);case yd:return function wF(u,f){var _=f?sx(u.buffer):u.buffer;return new u.constructor(_,u.byteOffset,u.byteLength)}(u,_);case pa:case Nf:case Qg:case Bf:case Jg:case e_:case Hu:case t_:case n_:return EA(u,_);case Vo:return new w;case Vu:case _c:return new w(u);case _d:return function MF(u){var f=new u.constructor(u.source,w0.exec(u));return f.lastIndex=u.lastIndex,f}(u);case zo:return new w;case Lf:return function CF(u){return Pd?ai(Pd.call(u)):{}}(u)}}(u,be,Y)}}P||(P=new Jr);var bt=P.get(u);if(bt)return bt;P.set(u,$),iw(u)?u.forEach(function(Ht){$.add(Ms(Ht,f,_,Ht,u,P))}):Tv(u)&&u.forEach(function(Ht,An){$.set(An,Ms(Ht,f,_,An,u,P))});var mn=ye?z:(_e?Q?q_:bp:Q?Ds:pr)(u);return Rn(mn||u,function(Ht,An){mn&&(Ht=u[An=Ht]),Qs($,An,Ms(Ht,f,_,An,u,P))}),$}function R_(u,f,_){var w=_.length;if(null==u)return!w;for(u=ai(u);w--;){var S=_[w],$=u[S];if($===z&&!(S in u)||!(0,f[S])($))return!1}return!0}function sp(u,f,_){if("function"!=typeof u)throw new Er(Un);return gh(function(){u.apply(z,_)},f)}function Ld(u,f,_,w){var S=-1,P=kl,$=!0,Y=u.length,Q=[],_e=f.length;if(!Y)return Q;_&&(f=gi(f,Ur(_))),w?(P=Ku,$=!1):f.length>=Kr&&(P=yc,$=!1,f=new Et(f));e:for(;++S-1},Pt.prototype.set=function hA(u,f){var _=this.__data__,w=rp(_,u);return w<0?(++this.size,_.push([u,f])):_[w][1]=f,this},ga.prototype.clear=function fA(){this.size=0,this.__data__={hash:new Mc,map:new(tp||Pt),string:new Mc}},ga.prototype.delete=function pA(u){var f=K_(this,u).delete(u);return this.size-=f?1:0,f},ga.prototype.get=function Se(u){return K_(this,u).get(u)},ga.prototype.has=function zn(u){return K_(this,u).has(u)},ga.prototype.set=function Vt(u,f){var _=K_(this,u),w=_.size;return _.set(u,f),this.size+=_.size==w?0:1,this},Et.prototype.add=Et.prototype.push=function Ar(u){return this.__data__.set(u,Ga),this},Et.prototype.has=function H0(u){return this.__data__.has(u)},Jr.prototype.clear=function _a(){this.__data__=new Pt,this.size=0},Jr.prototype.delete=function D_(u){var f=this.__data__,_=f.delete(u);return this.size=f.size,_},Jr.prototype.get=function T_(u){return this.__data__.get(u)},Jr.prototype.has=function mA(u){return this.__data__.has(u)},Jr.prototype.set=function vF(u,f){var _=this.__data__;if(_ instanceof Pt){var w=_.__data__;if(!tp||w.length0&&_(Y)?f>1?Kn(Y,f-1,_,w,S):Pl(S,Y):w||(S[S.length]=Y)}return S}var il=$_(),Di=$_(!0);function ki(u,f){return u&&il(u,f,pr)}function P_(u,f){return u&&Di(u,f,pr)}function va(u,f){return vc(f,function(_){return Hl(u[_])})}function Cc(u,f){for(var _=0,w=(f=wa(f,u)).length;null!=u&&_f}function op(u,f){return null!=u&&ri.call(u,f)}function ap(u,f){return null!=u&&f in ai(u)}function lp(u,f,_){for(var w=_?Ku:kl,S=u[0].length,P=u.length,$=P,Y=ae(P),Q=1/0,_e=[];$--;){var ye=u[$];$&&f&&(ye=gi(ye,Ur(f))),Q=Zr(ye.length,Q),Y[$]=!_&&(f||S>=120&&ye.length>=120)?new Et($&&ye):z}ye=u[0];var be=-1,Xe=Y[0];e:for(;++be=Y?Q:Q*("desc"==_[w]?-1:1)}return u.index-f.index}(P,$,_)})}function J0(u,f,_){for(var w=-1,S=f.length,P={};++w-1;)Y!==u&&xc.call(Y,Q,1),xc.call(u,Q,1);return u}function ah(u,f){for(var _=u?f.length:0,w=_-1;_--;){var S=f[_];if(_==w||S!==P){var P=S;sl(S)?xc.call(u,S,1):dh(u,S)}}return u}function lh(u,f){return u+M_(C_()*(f-u+1))}function ch(u,f){var _="";if(!u||f<1||f>Ya)return _;do{f%2&&(_+=u),(f=M_(f/2))&&(u+=u)}while(f);return _}function pn(u,f){return Cp(J_(u,f,is),u+"")}function CA(u){return zr(Uc(u))}function tx(u,f){var _=Uc(u);return Ep(_,Nl(f,0,_.length))}function zd(u,f,_,w){if(!Mi(u))return u;for(var S=-1,P=(f=wa(f,u)).length,$=P-1,Y=u;null!=Y&&++SS?0:S+f),(_=_>S?S:_)<0&&(_+=S),S=f>_?0:_-f>>>0,f>>>=0;for(var P=ae(S);++w>>1,$=u[P];null!==$&&!As($)&&(_?$<=f:$=Kr){var _e=f?null:j_(u);if(_e)return Hn(_e);$=!1,S=yc,Q=new Et}else Q=f?[]:Y;e:for(;++w=w?u:ts(u,f,_)}var rx=sA||function(u){return Sr.clearTimeout(u)};function me(u,f){if(f)return u.slice();var _=u.length,w=bs?bs(_):new u.constructor(_);return u.copy(w),w}function sx(u){var f=new u.constructor(u.byteLength);return new x_(f).set(new x_(u)),f}function EA(u,f){var _=f?sx(u.buffer):u.buffer;return new u.constructor(_,u.byteOffset,u.length)}function AA(u,f){if(u!==f){var _=u!==z,w=null===u,S=u==u,P=As(u),$=f!==z,Y=null===f,Q=f==f,_e=As(f);if(!Y&&!_e&&!P&&u>f||P&&$&&Q&&!Y&&!_e||w&&$&&Q||!_&&Q||!S)return 1;if(!w&&!P&&!_e&&u1?_[S-1]:z,$=S>2?_[2]:z;for(P=u.length>3&&"function"==typeof P?(S--,P):z,$&&Tr(_[0],_[1],$)&&(P=S<3?z:P,S=1),f=ai(f);++w-1?S[P?f[$]:$]:z}}function Cs(u){return wo(function(f){var _=f.length,w=_,S=Ai.prototype.thru;for(u&&f.reverse();w--;){var P=f[w];if("function"!=typeof P)throw new Er(Un);if(S&&!$&&"wrapper"==rl(P))var $=new Ai([],!0)}for(w=$?w:_;++w<_;){var Y=rl(P=f[w]),Q="wrapper"==Y?X_(P):z;$=Q&&mh(Q[0])&&Q[1]==(Wa|da|ua|ha)&&!Q[4].length&&1==Q[9]?$[rl(Q[0])].apply($,Q[3]):1==P.length&&mh(P)?$[Y]():$.thru(P)}return function(){var _e=arguments,ye=_e[0];if($&&1==_e.length&&sn(ye))return $.plant(ye).value();for(var be=0,Xe=_?f[be].apply(this,_e):ye;++be<_;)Xe=f[be].call(this,Xe);return Xe}})}function jd(u,f,_,w,S,P,$,Y,Q,_e){var ye=f&Wa,be=f&On,Xe=f&ur,bt=f&(da|Tl),zt=f&md,mn=Xe?z:gp(u);return function Ht(){for(var An=arguments.length,Ln=ae(An),rs=An;rs--;)Ln[rs]=arguments[rs];if(bt)var ss=Ca(Ht),so=function eh(X,he){for(var ae=X.length,ze=0;ae--;)X[ae]===he&&++ze;return ze}(Ln,ss);if(w&&(Ln=$d(Ln,w,S,bt)),P&&(Ln=DA(Ln,P,$,bt)),An-=so,bt&&An<_e){var Ti=$i(Ln,ss);return ax(u,f,jd,Ht.placeholder,_,Ln,Ti,Y,Q,_e-An)}var Ts=be?_:this,So=Xe?Ts[u]:u;return An=Ln.length,Y?Ln=function Es(u,f){for(var _=u.length,w=Zr(f.length,_),S=eo(u);w--;){var P=f[w];u[w]=sl(P,_)?S[P]:z}return u}(Ln,Y):zt&&An>1&&Ln.reverse(),ye&&QY))return!1;var _e=P.get(u),ye=P.get(f);if(_e&&ye)return _e==f&&ye==u;var be=-1,Xe=!0,bt=_&Uo?new Et:z;for(P.set(u,f),P.set(f,u);++be-1&&u%1==0&&u1?"& ":"")+f[w],f=f.join(_>2?", ":" "),u.replace(b0,"{\n/* [wrapped with "+f+"] */\n")}(w,function NA(u,f){return Rn(d0,function(_){var w="_."+_[0];f&_[1]&&!kl(u,w)&&u.push(w)}),u.sort()}(function ux(u){var f=u.match(Mr);return f?f[1].split(FE):[]}(w),_)))}function yx(u){var f=0,_=0;return function(){var w=mF(),S=Kg-(w-_);if(_=w,S>0){if(++f>=wE)return arguments[0]}else f=0;return u.apply(z,arguments)}}function Ep(u,f){var _=-1,w=u.length,S=w-1;for(f=f===z?w:f;++_1?u[f-1]:z;return _="function"==typeof _?(u.pop(),_):z,yh(u,_)});function Hx(u){var f=I(u);return f.__chain__=!0,f}function Rp(u,f){return f(u)}var $x=wo(function(u){var f=u.length,_=f?u[0]:0,w=this.__wrapped__,S=function(P){return rh(P,u)};return!(f>1||this.__actions__.length)&&w instanceof kn&&sl(_)?((w=w.slice(_,+_+(f?1:0))).__actions__.push({func:Rp,args:[S],thisArg:z}),new Ai(w,this.__chain__).thru(function(P){return f&&!P.length&&P.push(z),P})):this.thru(S)}),r1=pp(function(u,f,_){ri.call(u,_)?++u[_]:$o(u,_,1)}),Wx=IA(Ex),Pp=IA(rv);function bv(u,f){return(sn(u)?Rn:nl)(u,Nt(f,3))}function zl(u,f){return(sn(u)?cF:k_)(u,Nt(f,3))}var o1=pp(function(u,f,_){ri.call(u,_)?u[_].push(f):$o(u,_,[f])}),l1=pn(function(u,f,_){var w=-1,S="function"==typeof f,P=no(u)?ae(u.length):[];return nl(u,function($){P[++w]=S?_s(f,$,_):ya($,f,_)}),P}),c1=pp(function(u,f,_){$o(u,_,f)});function Op(u,f){return(sn(u)?gi:sh)(u,Nt(f,3))}var Sa=pp(function(u,f,_){u[_?0:1].push(f)},function(){return[[],[]]}),_1=pn(function(u,f){if(null==u)return[];var _=f.length;return _>1&&Tr(u,f[0],f[1])?f=[]:_>2&&Tr(f[0],f[1],f[2])&&(f=[f[0]]),B_(u,Kn(f,1),[])}),Fp=dF||function(){return Sr.Date.now()};function xh(u,f,_){return f=_?z:f,xo(u,Wa,z,z,z,z,f=u&&null==f?u.length:f)}function Ea(u,f){var _;if("function"!=typeof f)throw new Er(Un);return u=un(u),function(){return--u>0&&(_=f.apply(this,arguments)),u<=1&&(f=z),_}}var Fc=pn(function(u,f,_){var w=On;if(_.length){var S=$i(_,Ca(Fc));w|=ua}return xo(u,w,f,_,S)}),xv=pn(function(u,f,_){var w=On|ur;if(_.length){var S=$i(_,Ca(xv));w|=ua}return xo(f,w,u,_,S)});function y1(u,f,_){var w,S,P,$,Y,Q,_e=0,ye=!1,be=!1,Xe=!0;if("function"!=typeof u)throw new Er(Un);function bt(Ti){var Ts=w,So=S;return w=S=z,_e=Ti,$=u.apply(So,Ts)}function Ht(Ti){var Ts=Ti-Q;return Q===z||Ts>=f||Ts<0||be&&Ti-_e>=P}function An(){var Ti=Fp();if(Ht(Ti))return Ln(Ti);Y=gh(An,function mn(Ti){var TD=f-(Ti-Q);return be?Zr(TD,P-(Ti-_e)):TD}(Ti))}function Ln(Ti){return Y=z,Xe&&w?bt(Ti):(w=S=z,$)}function so(){var Ti=Fp(),Ts=Ht(Ti);if(w=arguments,S=this,Q=Ti,Ts){if(Y===z)return function zt(Ti){return _e=Ti,Y=gh(An,f),ye?bt(Ti):$}(Q);if(be)return rx(Y),Y=gh(An,f),bt(Q)}return Y===z&&(Y=gh(An,f)),$}return f=Mo(f)||0,Mi(_)&&(ye=!!_.leading,P=(be="maxWait"in _)?fr(Mo(_.maxWait)||0,f):P,Xe="trailing"in _?!!_.trailing:Xe),so.cancel=function rs(){Y!==z&&rx(Y),_e=0,w=Q=S=Y=z},so.flush=function ss(){return Y===z?$:Ln(Fp())},so}var PF=pn(function(u,f){return sp(u,1,f)}),OF=pn(function(u,f,_){return sp(u,Mo(f)||0,_)});function qd(u,f){if("function"!=typeof u||null!=f&&"function"!=typeof f)throw new Er(Un);var _=function(){var w=arguments,S=f?f.apply(this,w):w[0],P=_.cache;if(P.has(S))return P.get(S);var $=u.apply(this,w);return _.cache=P.set(S,$)||P,$};return _.cache=new(qd.Cache||ga),_}function Sv(u){if("function"!=typeof u)throw new Er(Un);return function(){var f=arguments;switch(f.length){case 0:return!u.call(this);case 1:return!u.call(this,f[0]);case 2:return!u.call(this,f[0],f[1]);case 3:return!u.call(this,f[0],f[1],f[2])}return!u.apply(this,f)}}qd.Cache=ga;var Xx=Hd(function(u,f){var _=(f=1==f.length&&sn(f[0])?gi(f[0],Ur(Nt())):gi(Kn(f,1),Ur(Nt()))).length;return pn(function(w){for(var S=-1,P=Zr(w.length,_);++S=f}),Lc=Ud(function(){return arguments}())?Ud:function(u){return Pi(u)&&ri.call(u,"callee")&&!Dd.call(u,"callee")},sn=ae.isArray,LF=m_?Ur(m_):function bA(u){return Pi(u)&&es(u)==zu};function no(u){return null!=u&&zp(u.length)&&!Hl(u)}function wi(u){return Pi(u)&&no(u)}var ol=hF||Jd,ew=T0?Ur(T0):function yF(u){return Pi(u)&&es(u)==gc};function Up(u){if(!Pi(u))return!1;var f=es(u);return f==gd||f==EE||"string"==typeof u.message&&"string"==typeof u.name&&!io(u)}function Hl(u){if(!Mi(u))return!1;var f=es(u);return f==Ff||f==u0||f==SE||f==DE}function Vp(u){return"number"==typeof u&&u==un(u)}function zp(u){return"number"==typeof u&&u>-1&&u%1==0&&u<=Ya}function Mi(u){var f=typeof u;return null!=u&&("object"==f||"function"==f)}function Pi(u){return null!=u&&"object"==typeof u}var Tv=Ft?Ur(Ft):function xA(u){return Pi(u)&&Hr(u)==Vo};function wh(u){return"number"==typeof u||Pi(u)&&es(u)==Vu}function io(u){if(!Pi(u)||es(u)!=qa)return!1;var f=xs(u);if(null===f)return!0;var _=ri.call(f,"constructor")&&f.constructor;return"function"==typeof _&&_ instanceof _&&Ol.call(_)==P0}var $p=Wf?Ur(Wf):function xF(u){return Pi(u)&&es(u)==_d},iw=I0?Ur(I0):function L_(u){return Pi(u)&&Hr(u)==zo};function Gp(u){return"string"==typeof u||!sn(u)&&Pi(u)&&es(u)==_c}function As(u){return"symbol"==typeof u||Pi(u)&&es(u)==Lf}var jo=Xs?Ur(Xs):function X0(u){return Pi(u)&&zp(u.length)&&!!Ei[es(u)]},Pv=yp(cp),P1=yp(function(u,f){return u<=f});function Ov(u){if(!u)return[];if(no(u))return Gp(u)?yo(u):eo(u);if(ih&&u[ih])return function iA(X){for(var he,ae=[];!(he=X.next()).done;)ae.push(he.value);return ae}(u[ih]());var f=Hr(u);return(f==Vo?Xf:f==zo?Hn:Uc)(u)}function al(u){return u?(u=Mo(u))===In||u===-In?(u<0?-1:1)*CE:u==u?u:0:0===u?u:0}function un(u){var f=al(u),_=f%1;return f==f?_?f-_:f:0}function O1(u){return u?Nl(un(u),0,fa):0}function Mo(u){if("number"==typeof u)return u;if(As(u))return Of;if(Mi(u)){var f="function"==typeof u.valueOf?u.valueOf():u;u=Mi(f)?f+"":f}if("string"!=typeof u)return 0===u?u:+u;u=Wn(u);var _=Xa.test(u);return _||rr.test(u)?aF(u.slice(2),_?2:8):UE.test(u)?Of:+u}function $l(u){return di(u,Ds(u))}function Fn(u){return null==u?"":Js(u)}var vt=Dr(function(u,f){if(Mp(f)||no(f))di(f,pr(f),u);else for(var _ in f)ri.call(f,_)&&Qs(u,_,f[_])}),rw=Dr(function(u,f){di(f,Ds(f),u)}),Gl=Dr(function(u,f,_,w){di(f,Ds(f),u,w)}),ll=Dr(function(u,f,_,w){di(f,pr(f),u,w)}),L1=wo(rh),Bc=pn(function(u,f){u=ai(u);var _=-1,w=f.length,S=w>2?f[2]:z;for(S&&Tr(f[0],f[1],S)&&(w=1);++_1),P}),di(u,q_(u),_),w&&(_=Ms(_,Si|ms|js,Ma));for(var S=f.length;S--;)dh(_,f[S]);return _}),j1=wo(function(u,f){return null==u?{}:function Q0(u,f){return J0(u,f,function(_,w){return Uv(u,w)})}(u,f)});function Vv(u,f){if(null==u)return{};var _=gi(q_(u),function(w){return[w]});return f=Nt(f),J0(u,_,function(w,S){return f(w,S[0])})}var lw=fh(pr),zv=fh(Ds);function Uc(u){return null==u?[]:Ju(u,pr(u))}var V=Wd(function(u,f,_){return f=f.toLowerCase(),u+(_?Hv(f):f)});function Hv(u){return Zd(Fn(u).toLowerCase())}function $v(u){return(u=Fn(u))&&u.replace(_o,tA).replace(eF,"")}var rD=Wd(function(u,f,_){return u+(_?"-":"")+f.toLowerCase()}),dw=Wd(function(u,f,_){return u+(_?" ":"")+f.toLowerCase()}),sD=Gd("toLowerCase"),Gv=Wd(function(u,f,_){return u+(_?"_":"")+f.toLowerCase()}),lD=Wd(function(u,f,_){return u+(_?" ":"")+Zd(f)}),pw=Wd(function(u,f,_){return u+(_?" ":"")+f.toUpperCase()}),Zd=Gd("toUpperCase");function mw(u,f,_){return u=Fn(u),(f=_?z:f)===z?function en(X){return KE.test(X)}(u)?function fn(X){return X.match(tF)||[]}(u):function eA(X){return X.match(LE)||[]}(u):u.match(f)||[]}var jv=pn(function(u,f){try{return _s(u,z,f)}catch(_){return Up(_)?_:new jt(_)}}),hD=wo(function(u,f){return Rn(f,function(_){_=Go(_),$o(u,_,Fc(u[_],u))}),u});function Yv(u){return function(){return u}}var gw=Cs(),gD=Cs(!0);function is(u){return u}function Wp(u){return N_("function"==typeof u?u:Ms(u,Si))}var Xv=pn(function(u,f){return function(_){return ya(_,u,f)}}),_D=pn(function(u,f){return function(_){return ya(u,_,f)}});function _w(u,f,_){var w=pr(f),S=va(f,w);null==_&&(!Mi(f)||!S.length&&w.length)&&(_=f,f=u,u=this,S=va(f,pr(f)));var P=!(Mi(_)&&"chain"in _&&!_.chain),$=Hl(u);return Rn(S,function(Y){var Q=f[Y];u[Y]=Q,$&&(u.prototype[Y]=function(){var _e=this.__chain__;if(P||_e){var ye=u(this.__wrapped__);return(ye.__actions__=eo(this.__actions__)).push({func:Q,args:arguments,thisArg:u}),ye.__chain__=_e,ye}return Q.apply(u,Pl([this.value()],arguments))})}),u}function Co(){}var vw=_p(gi),yD=_p(QE),bD=_p(jf);function Mh(u){return mx(u)?__(Go(u)):function ba(u){return function(f){return Cc(f,u)}}(u)}var Kv=ox(),Ch=ox(!0);function Sh(){return[]}function Jd(){return!1}var xD=G_(function(u,f){return u+f},0),wD=W_("ceil"),xw=G_(function(u,f){return u/f},1),MD=W_("floor"),AD=G_(function(u,f){return u*f},1),jF=W_("round"),ty=G_(function(u,f){return u-f},0);return I.after=function v1(u,f){if("function"!=typeof f)throw new Er(Un);return u=un(u),function(){if(--u<1)return f.apply(this,arguments)}},I.ary=xh,I.assign=vt,I.assignIn=rw,I.assignInWith=Gl,I.assignWith=ll,I.at=L1,I.before=Ea,I.bind=Fc,I.bindAll=hD,I.bindKey=xv,I.castArray=function w1(){if(!arguments.length)return[];var u=arguments[0];return sn(u)?u:[u]},I.chain=Hx,I.chunk=function nv(u,f,_){f=(_?Tr(u,f,_):f===z)?1:fr(un(f),0);var w=null==u?0:u.length;if(!w||f<1)return[];for(var S=0,P=0,$=ae(w_(w/f));SS?0:S+_),(w=w===z||w>S?S:un(w))<0&&(w+=S),w=_>w?0:O1(w);_>>0)?(u=Fn(u))&&("string"==typeof f||null!=f&&!$p(f))&&!(f=Js(f))&&Sd(u)?Ic(yo(u),0,_):u.split(f,_):[]},I.spread=function Zx(u,f){if("function"!=typeof u)throw new Er(Un);return f=null==f?0:fr(un(f),0),pn(function(_){var w=_[f],S=Ic(_,0,f);return w&&Pl(S,w),_s(u,this,S)})},I.tail=function Oc(u){var f=null==u?0:u.length;return f?ts(u,1,f):[]},I.take=function Fx(u,f,_){return u&&u.length?ts(u,0,(f=_||f===z?1:un(f))<0?0:f):[]},I.takeRight=function Lx(u,f,_){var w=null==u?0:u.length;return w?ts(u,(f=w-(f=_||f===z?1:un(f)))<0?0:f,w):[]},I.takeRightWhile=function ZA(u,f){return u&&u.length?uh(u,Nt(f,3),!1,!0):[]},I.takeWhile=function RF(u,f){return u&&u.length?uh(u,Nt(f,3)):[]},I.tap=function e1(u,f){return f(u),u},I.throttle=function Lp(u,f,_){var w=!0,S=!0;if("function"!=typeof u)throw new Er(Un);return Mi(_)&&(w="leading"in _?!!_.leading:w,S="trailing"in _?!!_.trailing:S),y1(u,f,{leading:w,maxWait:f,trailing:S})},I.thru=Rp,I.toArray=Ov,I.toPairs=lw,I.toPairsIn=zv,I.toPath=function bw(u){return sn(u)?gi(u,Go):As(u)?[u]:eo(bx(Fn(u)))},I.toPlainObject=$l,I.transform=function X1(u,f,_){var w=sn(u),S=w||ol(u)||jo(u);if(f=Nt(f,4),null==_){var P=u&&u.constructor;_=S?w?new P:[]:Mi(u)&&Hl(P)?Od(xs(u)):{}}return(S?Rn:ki)(u,function($,Y,Q){return f(_,$,Y,Q)}),_},I.unary=function Qx(u){return xh(u,1)},I.union=Dp,I.unionBy=QA,I.unionWith=Nx,I.uniq=function Bx(u){return u&&u.length?si(u):[]},I.uniqBy=function Ux(u,f){return u&&u.length?si(u,Nt(f,2)):[]},I.uniqWith=function fv(u,f){return f="function"==typeof f?f:z,u&&u.length?si(u,z,f):[]},I.unset=function K1(u,f){return null==u||dh(u,f)},I.unzip=Tp,I.unzipWith=yh,I.update=function Z1(u,f,_){return null==u?u:ix(u,f,fp(_))},I.updateWith=function Q1(u,f,_,w){return w="function"==typeof w?w:z,null==u?u:ix(u,f,fp(_),w)},I.values=Uc,I.valuesIn=function J1(u){return null==u?[]:Ju(u,Ds(u))},I.without=Ip,I.words=mw,I.wrap=function Av(u,f){return Ev(fp(f),u)},I.xor=Vx,I.xorBy=pv,I.xorWith=mv,I.zip=gv,I.zipObject=function bh(u,f){return Tc(u||[],f||[],Qs)},I.zipObjectDeep=function JA(u,f){return Tc(u||[],f||[],zd)},I.zipWith=zx,I.entries=lw,I.entriesIn=zv,I.extend=rw,I.extendWith=Gl,_w(I,I),I.add=xD,I.attempt=jv,I.camelCase=V,I.capitalize=Hv,I.ceil=wD,I.clamp=function eD(u,f,_){return _===z&&(_=f,f=z),_!==z&&(_=(_=Mo(_))==_?_:0),f!==z&&(f=(f=Mo(f))==f?f:0),Nl(Mo(u),f,_)},I.clone=function Zn(u){return Ms(u,js)},I.cloneDeep=function C1(u){return Ms(u,Si|js)},I.cloneDeepWith=function Np(u,f){return Ms(u,Si|js,f="function"==typeof f?f:z)},I.cloneWith=function M1(u,f){return Ms(u,js,f="function"==typeof f?f:z)},I.conformsTo=function Jx(u,f){return null==f||R_(u,f,pr(f))},I.deburr=$v,I.defaultTo=function mD(u,f){return null==u||u!=u?f:u},I.divide=xw,I.endsWith=function nD(u,f,_){u=Fn(u),f=Js(f);var w=u.length,S=_=_===z?w:Nl(un(_),0,w);return(_-=f.length)>=0&&u.slice(_,S)==f},I.eq=Wo,I.escape=function iD(u){return(u=Fn(u))&&OE.test(u)?u.replace(p0,ot):u},I.escapeRegExp=function cw(u){return(u=Fn(u))&&v0.test(u)?u.replace(s_,"\\$&"):u},I.every=function vv(u,f,_){var w=sn(u)?QE:j0;return _&&Tr(u,f,_)&&(f=z),w(u,Nt(f,3))},I.find=Wx,I.findIndex=Ex,I.findKey=function Fv(u,f){return ee(u,Nt(f,3),ki)},I.findLast=Pp,I.findLastIndex=rv,I.findLastKey=function Lv(u,f){return ee(u,Nt(f,3),P_)},I.floor=MD,I.forEach=bv,I.forEachRight=zl,I.forIn=function U1(u,f){return null==u?u:il(u,Nt(f,3),Ds)},I.forInRight=function Nv(u,f){return null==u?u:Di(u,Nt(f,3),Ds)},I.forOwn=function cl(u,f){return u&&ki(u,Nt(f,3))},I.forOwnRight=function V1(u,f){return u&&P_(u,Nt(f,3))},I.get=Bv,I.gt=S1,I.gte=E1,I.has=function $1(u,f){return null!=u&&hx(u,f,op)},I.hasIn=Uv,I.head=Dx,I.identity=is,I.includes=function a1(u,f,_,w){u=no(u)?u:Uc(u),_=_&&!w?un(_):0;var S=u.length;return _<0&&(_=fr(S+_,0)),Gp(u)?_<=S&&u.indexOf(f,_)>-1:!!S&&Lt(u,f,_)>-1},I.indexOf=function vh(u,f,_){var w=null==u?0:u.length;if(!w)return-1;var S=null==_?0:un(_);return S<0&&(S=fr(w+S,0)),Lt(u,f,S)},I.inRange=function tD(u,f,_){return f=al(f),_===z?(_=f,f=0):_=al(_),function O_(u,f,_){return u>=Zr(f,_)&&u=-Ya&&u<=Ya},I.isSet=iw,I.isString=Gp,I.isSymbol=As,I.isTypedArray=jo,I.isUndefined=function I1(u){return u===z},I.isWeakMap=function R1(u){return Pi(u)&&Hr(u)==vd},I.isWeakSet=function k1(u){return Pi(u)&&"[object WeakSet]"==es(u)},I.join=function Tx(u,f){return null==u?"":fF.call(u,f)},I.kebabCase=rD,I.last=Ir,I.lastIndexOf=function cv(u,f,_){var w=null==u?0:u.length;if(!w)return-1;var S=w;return _!==z&&(S=(S=un(_))<0?fr(w+S,0):Zr(S,w-1)),f==f?function Ed(X,he,ae){for(var ze=ae+1;ze--;)if(X[ze]===he)return ze;return ze}(u,f,S):Qu(u,qf,S,!0)},I.lowerCase=dw,I.lowerFirst=sD,I.lt=Pv,I.lte=P1,I.max=function ww(u){return u&&u.length?Nd(u,is,Bd):z},I.maxBy=function Mw(u,f){return u&&u.length?Nd(u,Nt(f,2),Bd):z},I.mean=function CD(u){return Cd(u,is)},I.meanBy=function SD(u,f){return Cd(u,Nt(f,2))},I.min=function ro(u){return u&&u.length?Nd(u,is,cp):z},I.minBy=function ED(u,f){return u&&u.length?Nd(u,Nt(f,2),cp):z},I.stubArray=Sh,I.stubFalse=Jd,I.stubObject=function yw(){return{}},I.stubString=function Zv(){return""},I.stubTrue=function Qv(){return!0},I.multiply=AD,I.nth=function Ix(u,f){return u&&u.length?MA(u,un(f)):z},I.noConflict=function E(){return Sr._===this&&(Sr._=Zf),this},I.noop=Co,I.now=Fp,I.pad=function oD(u,f,_){u=Fn(u);var w=(f=un(f))?hr(u):0;if(!f||w>=f)return u;var S=(f-w)/2;return vp(M_(S),_)+u+vp(w_(S),_)},I.padEnd=function VF(u,f,_){u=Fn(u);var w=(f=un(f))?hr(u):0;return f&&wf){var w=u;u=f,f=w}if(_||u%1||f%1){var S=C_();return Zr(u+S*(f-u+Pe("1e-"+((S+"").length-1))),f)}return lh(u,f)},I.reduce=function d1(u,f,_){var w=sn(u)?g_:R0,S=arguments.length<3;return w(u,Nt(f,4),_,S,nl)},I.reduceRight=function u1(u,f,_){var w=sn(u)?JE:R0,S=arguments.length<3;return w(u,Nt(f,4),_,S,k_)},I.repeat=function Gi(u,f,_){return f=(_?Tr(u,f,_):f===z)?1:un(f),ch(Fn(u),f)},I.replace=function aD(){var u=arguments,f=Fn(u[0]);return u.length<3?f:f.replace(u[1],u[2])},I.result=function Y1(u,f,_){var w=-1,S=(f=wa(f,u)).length;for(S||(S=1,u=z);++wYa)return[];var _=fa,w=Zr(u,fa);f=Nt(f),u-=fa;for(var S=Ks(w,f);++_=P)return u;var Y=_-hr(w);if(Y<1)return w;var Q=$?Ic($,0,Y).join(""):u.slice(0,Y);if(S===z)return Q+w;if($&&(Y+=Q.length-Y),$p(S)){if(u.slice(Y).search(S)){var _e,ye=Q;for(S.global||(S=bc(S.source,Fn(w0.exec(S))+"g")),S.lastIndex=0;_e=S.exec(ye);)var be=_e.index;Q=Q.slice(0,be===z?Y:be)}}else if(u.indexOf(Js(S),Y)!=Y){var Xe=Q.lastIndexOf(S);Xe>-1&&(Q=Q.slice(0,Xe))}return Q+w},I.unescape=function uD(u){return(u=Fn(u))&&PE.test(u)?u.replace(f0,Kf):u},I.uniqueId=function ey(u){var f=++bi;return Fn(u)+f},I.upperCase=pw,I.upperFirst=Zd,I.each=bv,I.eachRight=zl,I.first=Dx,_w(I,function(){var u={};return ki(I,function(f,_){ri.call(I.prototype,_)||(u[_]=f)}),u}(),{chain:!1}),I.VERSION="4.17.21",Rn(["bind","bindKey","curry","curryRight","partial","partialRight"],function(u){I[u].placeholder=I}),Rn(["drop","take"],function(u,f){kn.prototype[u]=function(_){_=_===z?1:fr(un(_),0);var w=this.__filtered__&&!f?new kn(this):this.clone();return w.__filtered__?w.__takeCount__=Zr(_,w.__takeCount__):w.__views__.push({size:Zr(_,fa),type:u+(w.__dir__<0?"Right":"")}),w},kn.prototype[u+"Right"]=function(_){return this.reverse()[u](_).reverse()}}),Rn(["filter","map","takeWhile"],function(u,f){var _=f+1,w=1==_||3==_;kn.prototype[u]=function(S){var P=this.clone();return P.__iteratees__.push({iteratee:Nt(S,3),type:_}),P.__filtered__=P.__filtered__||w,P}}),Rn(["head","last"],function(u,f){var _="take"+(f?"Right":"");kn.prototype[u]=function(){return this[_](1).value()[0]}}),Rn(["initial","tail"],function(u,f){var _="drop"+(f?"":"Right");kn.prototype[u]=function(){return this.__filtered__?new kn(this):this[_](1)}}),kn.prototype.compact=function(){return this.filter(is)},kn.prototype.find=function(u){return this.filter(u).head()},kn.prototype.findLast=function(u){return this.reverse().find(u)},kn.prototype.invokeMap=pn(function(u,f){return"function"==typeof u?new kn(this):this.map(function(_){return ya(_,u,f)})}),kn.prototype.reject=function(u){return this.filter(Sv(Nt(u)))},kn.prototype.slice=function(u,f){u=un(u);var _=this;return _.__filtered__&&(u>0||f<0)?new kn(_):(u<0?_=_.takeRight(-u):u&&(_=_.drop(u)),f!==z&&(_=(f=un(f))<0?_.dropRight(-f):_.take(f-u)),_)},kn.prototype.takeRightWhile=function(u){return this.reverse().takeWhile(u).reverse()},kn.prototype.toArray=function(){return this.take(fa)},ki(kn.prototype,function(u,f){var _=/^(?:filter|find|map|reject)|While$/.test(f),w=/^(?:head|last)$/.test(f),S=I[w?"take"+("last"==f?"Right":""):f],P=w||/^find/.test(f);S&&(I.prototype[f]=function(){var $=this.__wrapped__,Y=w?[1]:arguments,Q=$ instanceof kn,_e=Y[0],ye=Q||sn($),be=function(An){var Ln=S.apply(I,Pl([An],Y));return w&&Xe?Ln[0]:Ln};ye&&_&&"function"==typeof _e&&1!=_e.length&&(Q=ye=!1);var Xe=this.__chain__,zt=P&&!Xe,mn=Q&&!this.__actions__.length;if(!P&&ye){$=mn?$:new kn(this);var Ht=u.apply($,Y);return Ht.__actions__.push({func:Rp,args:[be],thisArg:z}),new Ai(Ht,Xe)}return zt&&mn?u.apply(this,Y):(Ht=this.thru(be),zt?w?Ht.value()[0]:Ht.value():Ht)})}),Rn(["pop","push","shift","sort","splice","unshift"],function(u){var f=sr[u],_=/^(?:push|sort|unshift)$/.test(u)?"tap":"thru",w=/^(?:pop|shift)$/.test(u);I.prototype[u]=function(){var S=arguments;if(w&&!this.__chain__){var P=this.value();return f.apply(sn(P)?P:[],S)}return this[_](function($){return f.apply(sn($)?$:[],S)})}}),ki(kn.prototype,function(u,f){var _=I[f];if(_){var w=_.name+"";ri.call(kd,w)||(kd[w]=[]),kd[w].push({name:f,func:_})}}),kd[jd(z,ur).name]=[{name:"wrapper",func:z}],kn.prototype.clone=function U0(){var u=new kn(this.__wrapped__);return u.__actions__=eo(this.__actions__),u.__dir__=this.__dir__,u.__filtered__=this.__filtered__,u.__iteratees__=eo(this.__iteratees__),u.__takeCount__=this.__takeCount__,u.__views__=eo(this.__views__),u},kn.prototype.reverse=function Fd(){if(this.__filtered__){var u=new kn(this);u.__dir__=-1,u.__filtered__=!0}else(u=this.clone()).__dir__*=-1;return u},kn.prototype.value=function ws(){var u=this.__wrapped__.value(),f=this.__dir__,_=sn(u),w=f<0,S=_?u.length:0,P=function wp(u,f,_){for(var w=-1,S=_.length;++w=this.__values__.length;return{done:u,value:u?z:this.__values__[this.__index__++]}},I.prototype.plant=function t1(u){for(var f,_=this;_ instanceof wc;){var w=ns(_);w.__index__=0,w.__values__=z,f?S.__wrapped__=w:f=w;var S=w;_=_.__wrapped__}return S.__wrapped__=u,f},I.prototype.reverse=function n1(){var u=this.__wrapped__;if(u instanceof kn){var f=u;return this.__actions__.length&&(f=new kn(this)),(f=f.reverse()).__actions__.push({func:Rp,args:[dv],thisArg:z}),new Ai(f,this.__chain__)}return this.thru(dv)},I.prototype.toJSON=I.prototype.valueOf=I.prototype.value=function kF(){return xa(this.__wrapped__,this.__actions__)},I.prototype.first=I.prototype.head,ih&&(I.prototype[ih]=function Yd(){return this}),I}();Sr._=ys,(dn=function(){return ys}.call(Gs,ps,Gs,Bo))!==z&&(Bo.exports=dn)}.call(this)},738:function(Bo){var Gs;Bo.exports=((Gs=function(){function ps(Ci){return Br.appendChild(Ci.dom),Ci}function dn(Ci){for(var Si=0;SiQt+1e3&&(Dl.update(1e3*Un/(Ci-Qt),100),Qt=Ci,Un=0,Ws)){var Si=performance.memory;Ws.update(Si.usedJSHeapSize/1048576,Si.jsHeapSizeLimit/1048576)}return Ci},update:function(){Kr=this.end()},domElement:Br,setMode:dn}}).Panel=function(ps,dn,z){var Br=1/0,Kr=0,Qt=Math.round,Un=Qt(window.devicePixelRatio||1),Dl=80*Un,Ga=48*Un,Ws=3*Un,Ci=2*Un,Si=3*Un,ms=15*Un,js=74*Un,Ys=30*Un,Uo=document.createElement("canvas");Uo.width=Dl,Uo.height=Ga,Uo.style.cssText="width:80px;height:48px";var On=Uo.getContext("2d");return On.font="bold "+9*Un+"px Helvetica,Arial,sans-serif",On.textBaseline="top",On.fillStyle=z,On.fillRect(0,0,Dl,Ga),On.fillStyle=dn,On.fillText(ps,Ws,Ci),On.fillRect(Si,ms,js,Ys),On.fillStyle=z,On.globalAlpha=.9,On.fillRect(Si,ms,js,Ys),{dom:Uo,update:function(ur,mc){Br=Math.min(Br,ur),Kr=Math.max(Kr,ur),On.fillStyle=z,On.globalAlpha=1,On.fillRect(0,0,Dl,ms),On.fillStyle=dn,On.fillText(Qt(ur)+" "+ps+" ("+Qt(Br)+"-"+Qt(Kr)+")",Ws,Ci),On.drawImage(Uo,Si+Un,ms,js-Un,Ys,Si,ms,js-Un,Ys),On.fillRect(Si+js-Un,ms,Un,Ys),On.fillStyle=z,On.globalAlpha=.9,On.fillRect(Si+js-Un,ms,Un,Qt((1-ur/mc)*Ys))}}},Gs)}},Bo=>{Bo(Bo.s=360)}]); \ No newline at end of file +(self.webpackChunkgui=self.webpackChunkgui||[]).push([[179],{360:(Bo,Gs,ps)=>{"use strict";function dn(i){return"function"==typeof i}function z(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 Br=z(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 Kr(i,t){if(i){const e=i.indexOf(t);0<=e&&i.splice(e,1)}}class Qt{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(dn(n))try{n()}catch(s){t=s instanceof Br?s.errors:[s]}const{_finalizers:r}=this;if(r){this._finalizers=null;for(const s of r)try{Ga(s)}catch(o){t=t??[],o instanceof Br?t=[...t,...o.errors]:t.push(o)}}if(t)throw new Br(t)}}add(t){var e;if(t&&t!==this)if(this.closed)Ga(t);else{if(t instanceof Qt){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)&&Kr(e,t)}remove(t){const{_finalizers:e}=this;e&&Kr(e,t),t instanceof Qt&&t._removeParent(this)}}Qt.EMPTY=(()=>{const i=new Qt;return i.closed=!0,i})();const Un=Qt.EMPTY;function Dl(i){return i instanceof Qt||i&&"closed"in i&&dn(i.remove)&&dn(i.add)&&dn(i.unsubscribe)}function Ga(i){dn(i)?i():i.unsubscribe()}const Ws={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 Si(i){Ci.setTimeout(()=>{const{onUnhandledError:t}=Ws;if(!t)throw i;t(i)})}function ms(){}const js=On("C",void 0,void 0);function On(i,t,e){return{kind:i,value:t,error:e}}let ur=null;function mc(i){if(Ws.useDeprecatedSynchronousErrorHandling){const t=!ur;if(t&&(ur={errorThrown:!1,error:null}),i(),t){const{errorThrown:e,error:n}=ur;if(ur=null,e)throw n}}else i()}class Tl extends Qt{constructor(t){super(),this.isStopped=!1,t?(this.destination=t,Dl(t)&&t.add(this)):this.destination=ME}static create(t,e,n){return new fa(t,e,n)}next(t){this.isStopped?Xg(function Uo(i){return On("N",i,void 0)}(t),this):this._next(t)}error(t){this.isStopped?Xg(function Ys(i){return On("E",void 0,i)}(t),this):(this.isStopped=!0,this._error(t))}complete(){this.isStopped?Xg(js,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 ha=Function.prototype.bind;function Il(i,t){return ha.call(i,t)}class Wa{constructor(t){this.partialObserver=t}next(t){const{partialObserver:e}=this;if(e.next)try{e.next(t)}catch(n){md(n)}}error(t){const{partialObserver:e}=this;if(e.error)try{e.error(t)}catch(n){md(n)}else md(t)}complete(){const{partialObserver:t}=this;if(t.complete)try{t.complete()}catch(e){md(e)}}}class fa extends Tl{constructor(t,e,n){let r;if(super(),dn(t)||!t)r={next:t??void 0,error:e??void 0,complete:n??void 0};else{let s;this&&Ws.useDeprecatedNextContext?(s=Object.create(t),s.unsubscribe=()=>this.unsubscribe(),r={next:t.next&&Il(t.next,s),error:t.error&&Il(t.error,s),complete:t.complete&&Il(t.complete,s)}):r=t}this.destination=new Wa(r)}}function md(i){Ws.useDeprecatedSynchronousErrorHandling?function ua(i){Ws.useDeprecatedSynchronousErrorHandling&&ur&&(ur.errorThrown=!0,ur.error=i)}(i):Si(i)}function Xg(i,t){const{onStoppedNotification:e}=Ws;e&&Ci.setTimeout(()=>e(i,t))}const ME={closed:!0,next:ms,error:function wE(i){throw i},complete:ms},Kg="function"==typeof Symbol&&Symbol.observable||"@@observable";function ja(i){return i}function l0(i){return 0===i.length?ja:1===i.length?i[0]:function(e){return i.reduce((n,r)=>r(n),e)}}let In=(()=>{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 Tl||function SE(i){return i&&dn(i.next)&&dn(i.error)&&dn(i.complete)}(i)&&Dl(i)}(e)?e:new fa(e,n,r);return mc(()=>{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=Ya(n))((r,s)=>{const o=new fa({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)}[Kg](){return this}pipe(...e){return l0(e)(this)}toPromise(e){return new(e=Ya(e))((n,r)=>{let s;this.subscribe(o=>s=o,o=>r(o),()=>n(s))})}}return i.create=t=>new i(t),i})();function Ya(i){var t;return null!==(t=i??Ws.Promise)&&void 0!==t?t:Promise}const pa=z(i=>function(){i(this),this.name="ObjectUnsubscribedError",this.message="object unsubscribed"});let Te=(()=>{class i extends In{constructor(){super(),this.closed=!1,this.currentObservers=null,this.observers=[],this.isStopped=!1,this.hasError=!1,this.thrownError=null}lift(e){const n=new c0(this,this);return n.operator=e,n}_throwIfClosed(){if(this.closed)throw new pa}next(e){mc(()=>{if(this._throwIfClosed(),!this.isStopped){this.currentObservers||(this.currentObservers=Array.from(this.observers));for(const n of this.currentObservers)n.next(e)}})}error(e){mc(()=>{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(){mc(()=>{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?Un:(this.currentObservers=null,s.push(e),new Qt(()=>{this.currentObservers=null,Kr(s,e)}))}_checkFinalizedStatuses(e){const{hasError:n,thrownError:r,isStopped:s}=this;n?e.error(r):s&&e.complete()}asObservable(){const e=new In;return e.source=this,e}}return i.create=(t,e)=>new c0(t,e),i})();class c0 extends Te{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:Un}}function d0(i){return dn(i?.lift)}function ni(i){return t=>{if(d0(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 qn(i,t,e,n,r){return new EE(i,t,e,n,r)}class EE extends Tl{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 tt(i,t){return ni((e,n)=>{let r=0;e.subscribe(qn(n,s=>{n.next(i.call(t,s,r++))}))})}function ma(i){return this instanceof ma?(this.v=i,this):new ma(i)}function Bf(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 Zg(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 i_=i=>i&&"number"==typeof i.length&&"function"!=typeof i;function r_(i){return dn(i?.then)}function m0(i){return dn(i[Kg])}function g0(i){return Symbol.asyncIterator&&dn(i?.[Symbol.asyncIterator])}function _0(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 v0=function s_(){return"function"==typeof Symbol&&Symbol.iterator?Symbol.iterator:"@@iterator"}();function Uf(i){return dn(i?.[v0])}function y0(i){return function Nf(i,t,e){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var r,n=e.apply(i,t||[]),s=[];return r=Object.create(("function"==typeof AsyncIterator?AsyncIterator:Object).prototype),a("next"),a("throw"),a("return",function o(m){return function(g){return Promise.resolve(g).then(m,h)}}),r[Symbol.asyncIterator]=function(){return this},r;function a(m,g){n[m]&&(r[m]=function(b){return new Promise(function(v,y){s.push([m,b,v,y])>1||l(m,b)})},g&&(r[m]=g(r[m])))}function l(m,g){try{!function c(m){m.value instanceof ma?Promise.resolve(m.value.v).then(d,h):p(s[0][2],m)}(n[m](g))}catch(b){p(s[0][3],b)}}function d(m){l("next",m)}function h(m){l("throw",m)}function p(m,g){m(g),s.shift(),s.length&&l(s[0][0],s[0][1])}}(this,arguments,function*(){const e=i.getReader();try{for(;;){const{value:n,done:r}=yield ma(e.read());if(r)return yield ma(void 0);yield yield ma(n)}}finally{e.releaseLock()}})}function b0(i){return dn(i?.getReader)}function Mr(i){if(i instanceof In)return i;if(null!=i){if(m0(i))return function LE(i){return new In(t=>{const e=i[Kg]();if(dn(e.subscribe))return e.subscribe(t);throw new TypeError("Provided object does not correctly implement Symbol.observable")})}(i);if(i_(i))return function NE(i){return new In(t=>{for(let e=0;e{i.then(e=>{t.closed||(t.next(e),t.complete())},e=>t.error(e)).then(null,Si)})}(i);if(g0(i))return x0(i);if(Uf(i))return function UE(i){return new In(t=>{for(const e of i)if(t.next(e),t.closed)return;t.complete()})}(i);if(b0(i))return function w0(i){return x0(y0(i))}(i)}throw _0(i)}function x0(i){return new In(t=>{(function VE(i,t){var e,n,r,s;return function _d(i,t,e,n){return new(e||(e=Promise))(function(s,o){function a(d){try{c(n.next(d))}catch(h){o(h)}}function l(d){try{c(n.throw(d))}catch(h){o(h)}}function c(d){d.done?s(d.value):function r(s){return s instanceof e?s:new e(function(o){o(s)})}(d.value).then(a,l)}c((n=n.apply(i,t||[])).next())})}(this,void 0,void 0,function*(){try{for(e=Bf(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 Xa(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 rr(i,t,e=1/0){return dn(t)?rr((n,r)=>tt((s,o)=>t(n,s,r,o))(Mr(i(n,r))),e):("number"==typeof t&&(e=t),ni((n,r)=>function zE(i,t,e,n,r,s,o,a){const l=[];let c=0,d=0,h=!1;const p=()=>{h&&!l.length&&!c&&t.complete()},m=b=>c{s&&t.next(b),c++;let v=!1;Mr(e(b,d++)).subscribe(qn(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(qn(t,m,()=>{h=!0,p()})),()=>{a?.()}}(n,r,i,e)))}function bd(i=1/0){return rr(ja,i)}const _o=new In(i=>i.complete());function $u(i){return i&&dn(i.schedule)}function a_(i){return i[i.length-1]}function M0(i){return dn(a_(i))?i.pop():void 0}function Gu(i){return $u(a_(i))?i.pop():void 0}function l_(i,t=0){return ni((e,n)=>{e.subscribe(qn(n,r=>Xa(n,i,()=>n.next(r),t),()=>Xa(n,i,()=>n.complete(),t),r=>Xa(n,i,()=>n.error(r),t)))})}function c_(i,t=0){return ni((e,n)=>{n.add(i.schedule(()=>e.subscribe(n),t))})}function d_(i,t){if(!i)throw new Error("Iterable cannot be null");return new In(e=>{Xa(e,t,()=>{const n=i[Symbol.asyncIterator]();Xa(e,t,()=>{n.next().then(r=>{r.done?e.complete():e.next(r.value)})},0,!0)})})}function Ni(i,t){return t?function E0(i,t){if(null!=i){if(m0(i))return function $E(i,t){return Mr(i).pipe(c_(t),l_(t))}(i,t);if(i_(i))return function WE(i,t){return new In(e=>{let n=0;return t.schedule(function(){n===i.length?e.complete():(e.next(i[n++]),e.closed||this.schedule())})})}(i,t);if(r_(i))return function GE(i,t){return Mr(i).pipe(c_(t),l_(t))}(i,t);if(g0(i))return d_(i,t);if(Uf(i))return function jE(i,t){return new In(e=>{let n;return Xa(e,t,()=>{n=i[v0](),Xa(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)}),()=>dn(n?.return)&&n.return()})}(i,t);if(b0(i))return function S0(i,t){return d_(y0(i),t)}(i,t)}throw _0(i)}(i,t):Mr(i)}function Cr(...i){const t=Gu(i),e=function C0(i,t){return"number"==typeof a_(i)?i.pop():t}(i,1/0),n=i;return n.length?1===n.length?Mr(n[0]):bd(e)(Ni(n,t)):_o}function Vf(i={}){const{connector:t=(()=>new Te),resetOnError:e=!0,resetOnComplete:n=!0,resetOnRefCountZero:r=!0}=i;return s=>{let o,a,l,c=0,d=!1,h=!1;const p=()=>{a?.unsubscribe(),a=void 0},m=()=>{p(),o=l=void 0,d=h=!1},g=()=>{const b=o;m(),b?.unsubscribe()};return ni((b,v)=>{c++,!h&&!d&&p();const y=l=l??t();v.add(()=>{c--,0===c&&!h&&!d&&(a=xd(g,r))}),y.subscribe(v),!o&&c>0&&(o=new fa({next:M=>y.next(M),error:M=>{h=!0,p(),a=xd(m,e,M),y.error(M)},complete:()=>{d=!0,p(),a=xd(m,n),y.complete()}}),Mr(b).subscribe(o))})(s)}}function xd(i,t,...e){if(!0===t)return void i();if(!1===t)return;const n=new fa({next:()=>{n.unsubscribe(),i()}});return Mr(t(...e)).subscribe(n)}function ci(i){for(let t in i)if(i[t]===ci)return t;throw Error("Could not find renamed property on target object.")}function u_(i,t){for(const e in t)t.hasOwnProperty(e)&&!i.hasOwnProperty(e)&&(i[e]=t[e])}function mi(i){if("string"==typeof i)return i;if(Array.isArray(i))return"["+i.map(mi).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 zf(i,t){return null==i||""===i?null===t?"":t:null==t||""===t?i:i+" "+t}const h_=ci({__forward_ref__:ci});function Gn(i){return i.__forward_ref__=Gn,i.toString=function(){return mi(this())},i}function Ot(i){return Wu(i)?i():i}function Wu(i){return"function"==typeof i&&i.hasOwnProperty(h_)&&i.__forward_ref__===Gn}function ju(i){return i&&!!i.\u0275providers}const qu="https://g.co/ng/security#xss";class pe extends Error{constructor(t,e){super(Hf(t,e)),this.code=t}}function Hf(i,t){return`NG0${Math.abs(i)}${t?": "+t.trim():""}`}function Jt(i){return"string"==typeof i?i:null==i?"":String(i)}function $f(i,t){throw new pe(-201,!1)}function En(i,t){null==i&&function ii(i,t,e,n){throw new Error(`ASSERTION ERROR: ${i}`+(null==n?"":` [Expected=> ${e} ${n} ${t} <=Actual]`))}(t,i,null,"!=")}function Pe(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 f_(i,wd)||f_(i,m_)}function f_(i,t){return i.hasOwnProperty(t)?i[t]:null}function p_(i){return i&&(i.hasOwnProperty(gs)||i.hasOwnProperty(T0))?i[gs]:null}const wd=ci({\u0275prov:ci}),gs=ci({\u0275inj:ci}),m_=ci({ngInjectableDef:ci}),T0=ci({ngInjectorDef:ci});var Ft=(()=>((Ft=Ft||{})[Ft.Default=0]="Default",Ft[Ft.Host=1]="Host",Ft[Ft.Self=2]="Self",Ft[Ft.SkipSelf=4]="SkipSelf",Ft[Ft.Optional=8]="Optional",Ft))();let Wf;function Xs(i){const t=Wf;return Wf=i,t}function _s(i,t,e){const n=Gf(i);return n&&"root"==n.providedIn?void 0===n.value?n.value=n.factory():n.value:e&Ft.Optional?null:void 0!==t?t:void $f(mi(i))}const Rn=(()=>typeof globalThis<"u"&&globalThis||typeof global<"u"&&global||typeof window<"u"&&window||typeof self<"u"&&typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&self)(),kl={},Ku="__NG_DI_FLAG__",gi="ngTempTokenPath",Pl="ngTokenPath",g_=/\n/gm,eA="\u0275",jf="__source";let Zu;function Md(i){const t=Zu;return Zu=i,t}function tA(i,t=Ft.Default){if(void 0===Zu)throw new pe(-203,!1);return null===Zu?_s(i,void 0,t):Zu.get(i,t&Ft.Optional?null:void 0,t)}function ee(i,t=Ft.Default){return(function I0(){return Wf}()||tA)(Ot(i),t)}function Lt(i,t=Ft.Default){return ee(i,Yf(t))}function Yf(i){return typeof i>"u"||"number"==typeof i?i:0|(i.optional&&8)|(i.host&&1)|(i.self&&2)|(i.skipSelf&&4)}function qf(i){const t=[];for(let e=0;e((vo=vo||{})[vo.OnPush=0]="OnPush",vo[vo.Default=1]="Default",vo))(),Ks=(()=>{return(i=Ks||(Ks={}))[i.Emulated=0]="Emulated",i[i.None=2]="None",i[i.ShadowDom=3]="ShadowDom",Ks;var i})();const Za={},Wn=[],Ur=ci({\u0275cmp:ci}),Ju=ci({\u0275dir:ci}),yc=ci({\u0275pipe:ci}),y_=ci({\u0275mod:ci}),ga=ci({\u0275fac:ci}),eh=ci({__NG_ELEMENT_ID__:ci});let nA=0;function ot(i){return Ka(()=>{const t=yo(i),e={...t,decls:i.decls,vars:i.vars,template:i.template,consts:i.consts||null,ngContentSelectors:i.ngContentSelectors,onPush:i.changeDetection===vo.OnPush,directiveDefs:null,pipeDefs:null,dependencies:t.standalone&&i.dependencies||null,getStandaloneInjector:null,data:i.data||{},encapsulation:i.encapsulation||Ks.Emulated,id:"c"+nA++,styles:i.styles||Wn,_:null,schemas:i.schemas||null,tView:null};b_(e);const n=i.dependencies;return e.directiveDefs=Kf(n,!1),e.pipeDefs=Kf(n,!0),e})}function th(i,t,e){const n=i.\u0275cmp;n.directiveDefs=Kf(t,!1),n.pipeDefs=Kf(e,!0)}function iA(i){return Hn(i)||Vr(i)}function Sd(i){return null!==i}function en(i){return Ka(()=>({type:i.type,bootstrap:i.bootstrap||Wn,declarations:i.declarations||Wn,imports:i.imports||Wn,exports:i.exports||Wn,transitiveCompileScopes:null,schemas:i.schemas||null,id:i.id||null}))}function Xf(i,t){if(null==i)return Za;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 ve(i){return Ka(()=>{const t=yo(i);return b_(t),t})}function $i(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 Hn(i){return i[Ur]||null}function Vr(i){return i[Ju]||null}function vs(i){return i[yc]||null}function hr(i,t){const e=i[y_]||null;if(!e&&!0===t)throw new Error(`Type ${mi(i)} does not have '\u0275mod' property.`);return e}function yo(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||Wn,viewQuery:i.viewQuery||null,features:i.features||null,setInput:null,findHostDirectiveDefs:null,hostDirectives:null,inputs:Xf(i.inputs,t),outputs:Xf(i.outputs)}}function b_(i){i.features?.forEach(t=>t(i))}function Kf(i,t){if(!i)return null;const e=t?vs:iA;return()=>("function"==typeof i?i():i).map(n=>e(n)).filter(Sd)}const Qa=0,lt=1,fn=2,Bi=3,ys=4,X=5,he=6,ae=7,ze=8,jt=9,Vn=10,xt=11,ai=12,bc=13,k0=14,Er=15,sr=16,nh=17,Ho=18,Zs=19,Ol=20,ri=21,bi=22,Ad=1,P0=2,Zf=7,Qf=8,Ja=9,Ui=10;function bs(i){return Array.isArray(i)&&"object"==typeof i[Ad]}function xs(i){return Array.isArray(i)&&!0===i[Ad]}function Jf(i){return 0!=(4&i.flags)}function Dd(i){return i.componentOffset>-1}function xc(i){return 1==(1&i.flags)}function bo(i){return!!i.template}function ih(i){return 0!=(256&i[fn])}function el(i,t){return i.hasOwnProperty(ga)?i[ga]:null}class Id{constructor(t,e,n){this.previousValue=t,this.currentValue=e,this.firstChange=n}isFirstChange(){return this.firstChange}}function xi(){return Rd}function Rd(i){return i.type.prototype.ngOnChanges&&(i.setInput=kd),np}function np(){const i=B0(this),t=i?.current;if(t){const e=i.previous;if(e===Za)i.previous=t;else for(let n in t)e[n]=t[n];i.current=null,this.ngOnChanges(t)}}function kd(i,t,e,n){const r=this.declaredInputs[e],s=B0(i)||function lA(i,t){return i[N0]=t}(i,{previous:Za,current:null}),o=s.current||(s.current={}),a=s.previous,l=a[r];o[r]=new Id(l&&l.currentValue,t,a===Za),i[n]=t}xi.ngInherit=!0;const N0="__ngSimpleChanges__";function B0(i){return i[N0]||null}const Qr=function(i,t,e){},Pd="svg";function I(i){for(;Array.isArray(i);)i=i[Qa];return i}function wc(i,t){return I(t[i])}function Ai(i,t){return I(t[i.index])}function U0(i,t){return i.data[t]}function Fd(i,t){return i[t]}function ws(i,t){const e=t[i];return bs(e)?e:e[Qa]}function ip(i){return 64==(64&i[fn])}function Fl(i,t){return null==t?null:i[t]}function V0(i){i[Ho]=0}function A_(i,t){i[X]+=t;let e=i,n=i[Bi];for(;null!==n&&(1===t&&1===e[X]||-1===t&&0===e[X]);)n[X]+=t,e=n,n=n[Bi]}const Pt={lFrame:nl(null),bindingsEnabled:!0};function _a(){return Pt.bindingsEnabled}function Se(){return Pt.lFrame.lView}function zn(){return Pt.lFrame.tView}function Vt(i){return Pt.lFrame.contextLView=i,i[ze]}function Et(i){return Pt.lFrame.contextLView=null,i}function Ar(){let i=H0();for(;null!==i&&64===i.type;)i=i.parent;return i}function H0(){return Pt.lFrame.currentTNode}function va(i,t){const e=Pt.lFrame;e.currentTNode=i,e.isParent=t}function D_(){return Pt.lFrame.isParent}function T_(){Pt.lFrame.isParent=!1}function zr(){const i=Pt.lFrame;let t=i.bindingRootIndex;return-1===t&&(t=i.bindingRootIndex=i.tView.bindingStartIndex),t}function Ll(){return Pt.lFrame.bindingIndex++}function Qs(i){const t=Pt.lFrame,e=t.bindingIndex;return t.bindingIndex=t.bindingIndex+i,e}function W0(i,t){const e=Pt.lFrame;e.bindingIndex=e.bindingRootIndex=i,$o(t)}function $o(i){Pt.lFrame.currentDirectiveIndex=i}function rh(i){const t=Pt.lFrame.currentDirectiveIndex;return-1===t?null:i[t]}function Nl(){return Pt.lFrame.currentQueryIndex}function Ms(i){Pt.lFrame.currentQueryIndex=i}function vA(i){const t=i[lt];return 2===t.type?t.declTNode:1===t.type?i[he]:null}function R_(i,t,e){if(e&Ft.SkipSelf){let r=t,s=i;for(;!(r=r.parent,null!==r||e&Ft.Host||(r=vA(s),null===r||(s=s[Er],10&r.type))););if(null===r)return!1;t=r,i=s}const n=Pt.lFrame=Ld();return n.currentTNode=t,n.lView=i,!0}function sp(i){const t=Ld(),e=i[lt];Pt.lFrame=t,t.currentTNode=e.firstChild,t.lView=i,t.tView=e,t.contextLView=i,t.bindingIndex=e.bindingStartIndex,t.inI18n=!1}function Ld(){const i=Pt.lFrame,t=null===i?null:i.child;return null===t?nl(i):t}function nl(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 k_(){const i=Pt.lFrame;return Pt.lFrame=i.parent,i.currentTNode=null,i.lView=null,i}const j0=k_;function Nd(){const i=k_();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 Kn(){return Pt.lFrame.selectedIndex}function il(i){Pt.lFrame.selectedIndex=i}function Di(){const i=Pt.lFrame;return U0(i.tView,i.selectedIndex)}function ki(){Pt.lFrame.currentNamespace=Pd}function ya(){!function Cc(){Pt.lFrame.currentNamespace=null}()}function Bd(i,t){for(let e=t.directiveStart,n=t.directiveEnd;e=n)break}else t[l]<0&&(i[Ho]+=65536),(a>11>16&&(3&i[fn])===t){i[fn]+=2048,Qr(4,a,s);try{s.call(a)}finally{Qr(5,a,s)}}}else{Qr(4,a,s);try{s.call(a)}finally{Qr(5,a,s)}}}const ba=-1;class Ud{constructor(t,e,n){this.factory=t,this.resolving=!1,this.canSeeViewProviders=e,this.injectImpl=n}}function L_(i,t,e){let n=0;for(;nt){o=s-1;break}}}for(;s>16}(i),n=t;for(;e>0;)n=n[Er],e--;return n}let Vd=!0;function dp(i){const t=Vd;return Vd=i,t}const B_=255,Q0=5;let J0=0;const xa={};function ah(i,t){const e=ex(i,t);if(-1!==e)return e;const n=t[lt];n.firstCreatePass&&(i.injectorIndex=t.length,lh(n.data,i),lh(t,null),lh(n.blueprint,null));const r=ch(i,t),s=i.injectorIndex;if(cp(r)){const o=sh(r),a=oh(r,t),l=a[lt].data;for(let c=0;c<8;c++)t[s+c]=a[o+c]|l[o+c]}return t[s+8]=r,s}function lh(i,t){i.push(0,0,0,0,0,0,0,0,t)}function ex(i,t){return-1===i.injectorIndex||i.parent&&i.parent.injectorIndex===i.injectorIndex||null===t[i.injectorIndex+8]?-1:i.injectorIndex}function ch(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=uh(r),null===n)return ba;if(e++,r=r[Er],-1!==n.injectorIndex)return n.injectorIndex|e<<16}return ba}function pn(i,t,e){!function U_(i,t,e){let n;"string"==typeof e?n=e.charCodeAt(0)||0:e.hasOwnProperty(eh)&&(n=e[eh]),null==n&&(n=e[eh]=J0++);const r=n&B_;t.data[i+(r>>Q0)]|=1<=0?t&B_:Js:t}(e);if("function"==typeof s){if(!R_(t,i,n))return n&Ft.Host?tx(r,0,n):zd(t,e,n,r);try{const o=s(n);if(null!=o||n&Ft.Optional)return o;$f()}finally{j0()}}else if("number"==typeof s){let o=null,a=ex(i,t),l=ba,c=n&Ft.Host?t[sr][he]:null;for((-1===a||n&Ft.SkipSelf)&&(l=-1===a?ch(i,t):t[a+8],l!==ba&&z_(n,!1)?(o=t[lt],a=sh(l),t=oh(l,t)):a=-1);-1!==a;){const d=t[lt];if(hp(s,a,d.data)){const h=EA(a,t,e,o,n,c);if(h!==xa)return h}l=t[a+8],l!==ba&&z_(n,t[lt].data[a+8]===c)&&hp(s,a,t)?(o=d,a=sh(l),t=oh(l,t)):a=-1}}return r}function EA(i,t,e,n,r,s){const o=t[lt],a=o.data[i+8],d=ts(a,o,e,null==n?Dd(a)&&Vd:n!=o&&0!=(3&a.type),r&Ft.Host&&s===a);return null!==d?Ac(t,o,d,a):xa}function ts(i,t,e,n,r){const s=i.providerIndexes,o=t.data,a=1048575&s,l=i.directiveStart,d=s>>20,p=r?a+d:i.directiveEnd;for(let m=n?a:a+d;m=l&&g.type===e)return m}if(r){const m=o[l];if(m&&bo(m)&&m.type===e)return l}return null}function Ac(i,t,e,n){let r=i[e];const s=t.data;if(function xA(i){return i instanceof Ud}(r)){const o=r;o.resolving&&function A0(i,t){const e=t?`. Dependency path: ${t.join(" > ")} > ${i}`:"";throw new pe(-200,`Circular dependency in DI detected for ${i}${e}`)}(function Xn(i){return"function"==typeof i?i.name||i.toString():"object"==typeof i&&null!=i&&"function"==typeof i.type?i.type.name||i.type.toString():Jt(i)}(s[e]));const a=dp(o.canSeeViewProviders);o.resolving=!0;const l=o.injectImpl?Xs(o.injectImpl):null;R_(i,n,Ft.Default);try{r=i[e]=o.factory(void 0,s,i,n),t.firstCreatePass&&e>=n.directiveStart&&function es(i,t,e){const{ngOnChanges:n,ngOnInit:r,ngDoCheck:s}=t.type.prototype;if(n){const o=Rd(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&&Xs(l),dp(a),o.resolving=!1,j0()}}return r}function hp(i,t,e){return!!(e[t+(i>>Q0)]&1<{const t=i.prototype.constructor,e=t[ga]||dh(t),n=Object.prototype;let r=Object.getPrototypeOf(i.prototype).constructor;for(;r&&r!==n;){const s=r[ga]||dh(r);if(s&&s!==e)return s;r=Object.getPrototypeOf(r)}return s=>new s})}function dh(i){return Wu(i)?()=>{const t=dh(Ot(i));return t&&t()}:el(i)}function uh(i){const t=i[lt],e=t.type;return 2===e?t.declTNode:1===e?i[he]:null}function wa(i){return function SA(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 Ma(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,d){const h=l.hasOwnProperty(Tc)?l[Tc]:Object.defineProperty(l,Tc,{value:[]})[Tc];for(;h.length<=d;)h.push(null);return(h[d]=h[d]||[]).push(o),l}}return e&&(r.prototype=Object.create(e.prototype)),r.prototype.ngMetadataName=i,r.annotationCls=r,r})}class me{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=Pe({token:this,providedIn:e.providedIn||"root",factory:e.factory}))}get multi(){return this}toString(){return`InjectionToken ${this._desc}`}}function Vl(i,t){i.forEach(e=>Array.isArray(e)?Vl(e,t):t(e))}function $_(i,t,e){t>=i.length?i.push(e):i.splice(t,0,e)}function mp(i,t){return t>=i.length-1?i.pop():i.splice(t,1)[0]}function Gd(i,t){const e=[];for(let n=0;n=0?i[1|n]=e:(n=~n,function IA(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 jd(i,t){const e=Rc(i,t);if(e>=0)return i[1|e]}function Rc(i,t){return function _p(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),Ss=Cd(Hd("Optional"),8),Ca=Cd(Hd("SkipSelf"),4);var Es=(()=>((Es=Es||{})[Es.Important=1]="Important",Es[Es.DashCase=2]="DashCase",Es))();const Sp=new Map;let yx=0;const iv="__ngContext__";function $r(i,t){bs(t)?(i[iv]=t[Ol],function bx(i){Sp.set(i[Ol],i)}(t)):i[iv]=t}let sv;function ov(i,t){return sv(i,t)}function vh(i){const t=i[Bi];return xs(t)?t[Bi]:t}function av(i){return Tx(i[bc])}function lv(i){return Tx(i[ys])}function Tx(i){for(;null!==i&&!xs(i);)i=i[ys];return i}function Ir(i,t,e,n,r){if(null!=n){let s,o=!1;xs(n)?s=n:bs(n)&&(o=!0,n=n[Qa]);const a=I(n);0===i&&null!==e?null==r?Fx(t,e,a):Oc(t,e,a,r||null,!0):1===i&&null!==e?Oc(t,e,a,r||null,!0):2===i?function mv(i,t,e){const n=Dp(i,t);n&&function QA(i,t,e,n){i.removeChild(t,e,n)}(i,n,t,e)}(t,a,o):3===i&&t.destroyNode(a),null!=s&&function Hx(i,t,e,n,r){const s=e[Zf];s!==I(e)&&Ir(t,i,n,s,r);for(let a=Ui;a0&&(i[e-1][ys]=n[ys]);const s=mp(i,Ui+t);!function WA(i,t){bh(i,t,t[xt],2,null,null),t[Qa]=null,t[he]=null}(n[lt],n);const o=s[Zs];null!==o&&o.detachView(s[lt]),n[Bi]=null,n[ys]=null,n[fn]&=-65}return n}function kx(i,t){if(!(128&t[fn])){const e=t[xt];e.destroyNode&&bh(i,t,e,3,null,null),function qA(i){let t=i[bc];if(!t)return hv(i[lt],i);for(;t;){let e=null;if(bs(t))e=t[bc];else{const n=t[Ui];n&&(e=n)}if(!e){for(;t&&!t[ys]&&t!==i;)bs(t)&&hv(t[lt],t),t=t[Bi];null===t&&(t=i),bs(t)&&hv(t[lt],t),e=t&&t[ys]}t=e}}(t)}}function hv(i,t){if(!(128&t[fn])){t[fn]&=-65,t[fn]|=128,function ZA(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===Ks.None||s===Ks.Emulated)return null}return Ai(n,e)}}(i,t.parent,e)}function Oc(i,t,e,n,r){i.insertBefore(t,e,n,r)}function Fx(i,t,e){i.appendChild(t,e)}function Lx(i,t,e,n,r){null!==n?Oc(i,t,e,n,r):Fx(i,t,e)}function Dp(i,t){return i.parentNode(t)}function Nx(i,t,e){return Ux(i,t,e)}let fv,kp,vv,Ux=function Bx(i,t,e){return 40&i.type?Ai(i,e):null};function yh(i,t,e,n){const r=Px(i,n,t),s=t[xt],a=Nx(n.parent||t[he],n,t);if(null!=r)if(Array.isArray(e))for(let l=0;li,createScript:i=>i,createScriptURL:i=>i})}catch{}return kp}()?.createHTML(i)||i}class zl{constructor(t){this.changingThisBreaksApplicationSecurity=t}toString(){return`SafeValue must use [property]=binding: ${this.changingThisBreaksApplicationSecurity} (see ${qu})`}}class a1 extends zl{getTypeName(){return"HTML"}}class l1 extends zl{getTypeName(){return"Style"}}class c1 extends zl{getTypeName(){return"Script"}}class d1 extends zl{getTypeName(){return"URL"}}class Op extends zl{getTypeName(){return"ResourceURL"}}function to(i){return i instanceof zl?i.changingThisBreaksApplicationSecurity:i}function Ea(i,t){const e=function u1(i){return i instanceof zl&&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 ${qu})`)}return e===t}class _1{constructor(t){this.inertDocumentHelper=t}getInertBodyElement(t){t=""+t;try{const e=(new window.DOMParser).parseFromString(Yd(t),"text/html").body;return null===e?this.inertDocumentHelper.getInertBodyElement(t):(e.removeChild(e.firstChild),e)}catch{return null}}}class v1{constructor(t){this.defaultDoc=t,this.inertDocument=this.defaultDoc.implementation.createHTMLDocument("sanitization-inert")}getInertBodyElement(t){const e=this.inertDocument.createElement("template");return e.innerHTML=Yd(t),e}}const y1=/^(?!javascript:)(?:[a-z0-9+.-]+:|[^&:\/?#]*(?:[\/?#]|$))/i;function xh(i){return(i=String(i)).match(y1)?i:"unsafe:"+i}function Aa(i){const t={};for(const e of i.split(","))t[e]=!0;return t}function Fc(...i){const t={};for(const e of i)for(const n in e)e.hasOwnProperty(n)&&(t[n]=!0);return t}const xv=Aa("area,br,col,hr,img,wbr"),wv=Aa("colgroup,dd,dt,li,p,tbody,td,tfoot,th,thead,tr"),Mv=Aa("rp,rt"),Cv=Fc(xv,Fc(wv,Aa("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")),Fc(Mv,Aa("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")),Fc(Mv,wv)),qd=Aa("background,cite,href,itemtype,longdesc,poster,src,xlink:href"),Xx=Fc(qd,Aa("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"),Aa("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")),Ev=Aa("script,style,template");class Kx{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(!Cv.hasOwnProperty(e))return this.sanitizedSomething=!0,!Ev.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();Cv.hasOwnProperty(e)&&!xv.hasOwnProperty(e)&&(this.buf.push(""))}chars(t){this.buf.push(Zx(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 x1=/[\uD800-\uDBFF][\uDC00-\uDFFF]/g,w1=/([^\#-~ |!])/g;function Zx(i){return i.replace(/&/g,"&").replace(x1,function(t){return"&#"+(1024*(t.charCodeAt(0)-55296)+(t.charCodeAt(1)-56320)+65536)+";"}).replace(w1,function(t){return"&#"+t.charCodeAt(0)+";"}).replace(//g,">")}let Lp;function Qx(i,t){let e=null;try{Lp=Lp||function qx(i){const t=new v1(i);return function Fp(){try{return!!(new window.DOMParser).parseFromString(Yd(""),"text/html")}catch{return!1}}()?new _1(t):t}(i);let n=t?String(t):"";e=Lp.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=Lp.getInertBodyElement(n)}while(n!==s);return Yd((new Kx).sanitizeChildren(Av(e)||e))}finally{if(e){const n=Av(e)||e;for(;n.firstChild;)n.removeChild(n.firstChild)}}}function Av(i){return"content"in i&&function M1(i){return i.nodeType===Node.ELEMENT_NODE&&"TEMPLATE"===i.nodeName}(i)?i.content:null}var Zn=(()=>((Zn=Zn||{})[Zn.NONE=0]="NONE",Zn[Zn.HTML=1]="HTML",Zn[Zn.STYLE=2]="STYLE",Zn[Zn.SCRIPT=3]="SCRIPT",Zn[Zn.URL=4]="URL",Zn[Zn.RESOURCE_URL=5]="RESOURCE_URL",Zn))();function Np(i){const t=function wi(){const i=Se();return i&&i[ai]}();return t?t.sanitize(Zn.URL,i)||"":Ea(i,"URL")?to(i):xh(Jt(i))}const Bp=new me("ENVIRONMENT_INITIALIZER"),ol=new me("INJECTOR",-1),ew=new me("INJECTOR_DEF_TYPES");class tw{get(t,e=kl){if(e===kl){const n=new Error(`NullInjectorError: No provider for ${mi(t)}!`);throw n.name="NullInjectorError",n}return e}}function D1(...i){return{\u0275providers:nw(0,i),\u0275fromNgModule:!0}}function nw(i,...t){const e=[],n=new Set;let r;return Vl(t,s=>{const o=s;Dv(o,e,[],n)&&(r||(r=[]),r.push(o))}),void 0!==r&&Up(r,e),e}function Up(i,t){for(let e=0;e{t.push(s)})}}function Dv(i,t,e,n){if(!(i=Ot(i)))return!1;let r=null,s=p_(i);const o=!s&&Hn(i);if(s||o){if(o&&!o.standalone)return!1;r=i}else{const l=i.ngModule;if(s=p_(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)Dv(c,t,e,n)}}else{if(!s)return!1;{if(null!=s.imports&&!a){let c;n.add(r);try{Vl(s.imports,d=>{Dv(d,t,e,n)&&(c||(c=[]),c.push(d))})}finally{}void 0!==c&&Up(c,t)}if(!a){const c=el(r)||(()=>new r);t.push({provide:r,useFactory:c,deps:Wn},{provide:ew,useValue:r,multi:!0},{provide:Bp,useValue:()=>ee(r),multi:!0})}const l=s.providers;null==l||a||Vp(l,d=>{t.push(d)})}}return r!==i&&void 0!==i.providers}function Vp(i,t){for(let e of i)ju(e)&&(e=e.\u0275providers),Array.isArray(e)?Vp(e,t):t(e)}const zp=ci({provide:String,useValue:ci});function Mi(i){return null!==i&&"object"==typeof i&&zp in i}function Nc(i){return"function"==typeof i}const Iv=new me("Set Injector scope."),Hp={},I1={};let Rv;function wh(){return void 0===Rv&&(Rv=new tw),Rv}class io{}class $p extends io{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,Pv(t,o=>this.processProvider(o)),this.records.set(ol,jo(void 0,this)),r.has("environment")&&this.records.set(io,jo(void 0,this));const s=this.records.get(Iv);null!=s&&"string"==typeof s.value&&this.scopes.add(s.value),this.injectorDefTypes=new Set(this.get(ew.multi,Wn,Ft.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=Md(this),n=Xs(void 0);try{return t()}finally{Md(e),Xs(n)}}get(t,e=kl,n=Ft.Default){this.assertNotDestroyed(),n=Yf(n);const r=Md(this),s=Xs(void 0);try{if(!(n&Ft.SkipSelf)){let a=this.records.get(t);if(void 0===a){const l=function P1(i){return"function"==typeof i||"object"==typeof i&&i instanceof me}(t)&&Gf(t);a=l&&this.injectableDefInScope(l)?jo(kv(t),Hp):null,this.records.set(t,a)}if(null!=a)return this.hydrate(t,a)}return(n&Ft.Self?wh():this.parent).get(t,e=n&Ft.Optional&&e===kl?null:e)}catch(o){if("NullInjectorError"===o.name){if((o[gi]=o[gi]||[]).unshift(mi(t)),r)throw o;return function v_(i,t,e,n){const r=i[gi];throw t[jf]&&r.unshift(t[jf]),i.message=function R0(i,t,e,n=null){i=i&&"\n"===i.charAt(0)&&i.charAt(1)==eA?i.slice(2):i;let r=mi(t);if(Array.isArray(t))r=t.map(mi).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):mi(a)))}r=`{${s.join(", ")}}`}return`${e}${n?"("+n+")":""}[${r}]: ${i.replace(g_,"\n ")}`}("\n"+i.message,r,e,n),i[Pl]=r,i[gi]=null,i}(o,t,"R3InjectorError",this.source)}throw o}finally{Xs(s),Md(r)}}resolveInjectorInitializers(){const t=Md(this),e=Xs(void 0);try{const n=this.get(Bp.multi,Wn,Ft.Self);for(const r of n)r()}finally{Md(t),Xs(e)}}toString(){const t=[],e=this.records;for(const n of e.keys())t.push(mi(n));return`R3Injector[${t.join(", ")}]`}assertNotDestroyed(){if(this._destroyed)throw new pe(205,!1)}processProvider(t){let e=Nc(t=Ot(t))?t:Ot(t&&t.provide);const n=function Gp(i){return Mi(i)?jo(void 0,i.useValue):jo(As(i),Hp)}(t);if(Nc(t)||!0!==t.multi)this.records.get(e);else{let r=this.records.get(e);r||(r=jo(void 0,Hp,!0),r.factory=()=>qf(r.multi),this.records.set(e,r)),e=t,r.multi.push(t)}this.records.set(e,n)}hydrate(t,e){return e.value===Hp&&(e.value=I1,e.value=e.factory()),"object"==typeof e.value&&e.value&&function k1(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=Ot(t.providedIn);return"string"==typeof e?"any"===e||this.scopes.has(e):this.injectorDefTypes.has(e)}}function kv(i){const t=Gf(i),e=null!==t?t.factory:el(i);if(null!==e)return e;if(i instanceof me)throw new pe(204,!1);if(i instanceof Function)return function iw(i){const t=i.length;if(t>0)throw Gd(t,"?"),new pe(204,!1);const e=function Xu(i){return i&&(i[wd]||i[m_])||null}(i);return null!==e?()=>e.factory(i):()=>new i}(i);throw new pe(204,!1)}function As(i,t,e){let n;if(Nc(i)){const r=Ot(i);return el(r)||kv(r)}if(Mi(i))n=()=>Ot(i.useValue);else if(function Tv(i){return!(!i||!i.useFactory)}(i))n=()=>i.useFactory(...qf(i.deps||[]));else if(function Pi(i){return!(!i||!i.useExisting)}(i))n=()=>ee(Ot(i.useExisting));else{const r=Ot(i&&(i.useClass||i.provide));if(!function R1(i){return!!i.deps}(i))return el(r)||kv(r);n=()=>new r(...qf(i.deps))}return n}function jo(i,t,e=!1){return{factory:i,value:t,multi:e?[]:void 0}}function Pv(i,t){for(const e of i)Array.isArray(e)?Pv(e,t):e&&ju(e)?Pv(e.\u0275providers,t):t(e)}class O1{}class Ov{}class Mo{resolveComponentFactory(t){throw function al(i){const t=Error(`No component factory found for ${mi(i)}. Did you add it to @NgModule.entryComponents?`);return t.ngComponent=i,t}(t)}}let $l=(()=>{class i{}return i.NULL=new Mo,i})();function L1(){return Fn(Ar(),Se())}function Fn(i,t){return new vt(Ai(i,t))}let vt=(()=>{class i{constructor(e){this.nativeElement=e}}return i.__NG_ELEMENT_ID__=L1,i})();function rw(i){return i instanceof vt?i.nativeElement:i}class Gl{}let ll=(()=>{class i{}return i.__NG_ELEMENT_ID__=()=>function N1(){const i=Se(),e=ws(Ar().index,i);return(bs(e)?e:i)[xt]}(),i})(),B1=(()=>{class i{}return i.\u0275prov=Pe({token:i,providedIn:"root",factory:()=>null}),i})();class Bc{constructor(t){this.full=t,this.major=t.split(".")[0],this.minor=t.split(".")[1],this.patch=t.split(".").slice(2).join(".")}}const U1=new Bc("15.2.10"),Fv={},Lv="ngOriginalError";function Nv(i){return i[Lv]}class cl{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&&Nv(t);for(;e&&Nv(e);)e=Nv(e);return e||null}}function dl(i){return i instanceof Function?i():i}function ow(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 aw="ng-template";function Y1(i,t,e){let n=0,r=!0;for(;ns?"":r[h+1].toLowerCase();const m=8&n?p:null;if(m&&-1!==ow(m,c,0)||2&n&&c!==p){if(Yo(n))return!1;o=!0}}}}else{if(!o&&!Yo(n)&&!Yo(l))return!1;if(o&&Yo(l))continue;o=!1,n=l|1&n}}return Yo(n)||o}function Yo(i){return 0==(1&i)}function lw(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&&!Yo(o)&&(t+=Uc(s,r),r=""),n=o,s=s||!Yo(n);e++}return""!==r&&(t+=Uc(s,r)),t}const on={};function V(i){Hv(zn(),Se(),Kn()+i,!1)}function Hv(i,t,e,n){if(!n)if(3==(3&t[fn])){const s=i.preOrderCheckHooks;null!==s&&op(t,s,e)}else{const s=i.preOrderHooks;null!==s&&ap(t,s,0,e)}il(e)}function uw(i,t=null,e=null,n){const r=hw(i,t,e,n);return r.resolveInjectorInitializers(),r}function hw(i,t=null,e=null,n,r=new Set){const s=[e||Wn,D1(i)];return n=n||("object"==typeof i?void 0:mi(i)),new $p(s,t||wh(),n||null,r)}let Gi=(()=>{class i{static create(e,n){if(Array.isArray(e))return uw({name:""},n,e,"");{const r=e.name??"";return uw({name:r},e.parent,e.providers,r)}}}return i.THROW_IF_NOT_FOUND=kl,i.NULL=new tw,i.\u0275prov=Pe({token:i,providedIn:"any",factory:()=>ee(ol)}),i.__NG_ELEMENT_ID__=-1,i})();function E(i,t=Ft.Default){const e=Se();return null===e?ee(i,t):V_(Ar(),e,Ot(i),t)}function Co(){throw new Error("invalid")}function vw(i,t){const e=i.contentQueries;if(null!==e)for(let n=0;nbi&&Hv(i,t,bi,!1),Qr(o?2:0,r),e(n,r)}finally{il(s),Qr(o?3:1,r)}}function Zv(i,t,e){if(Jf(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,Ch(i,e,r.hostVars,on),r)}function be(i,t,e,n,r,s){const o=Ai(i,t);!function Xe(i,t,e,n,r,s,o){if(null==s)i.removeAttribute(t,r,e);else{const a=null==o?Jt(s):o(s,n||"",r);i.setAttribute(t,r,a,e)}}(t[xt],o,s,i.value,e,n,r)}function bt(i,t,e,n,r,s){const o=s[t];if(null!==o){const a=n.setInput;for(let l=0;l0&&rs(e)}}function rs(i){for(let n=av(i);null!==n;n=lv(n))for(let r=Ui;r0&&rs(s)}const e=i[lt].components;if(null!==e)for(let n=0;n0&&rs(r)}}function ss(i,t){const e=ws(t,i),n=e[lt];(function so(i,t){for(let e=t.length;e-1&&(uv(t,n),mp(e,n))}this._attachedToViewContainer=!1}kx(this._lView[lt],this._lView)}onDestroy(t){xw(this._lView[lt],this._lView,null,t)}markForCheck(){Ts(this._cdRefInjectingView||this._lView)}detach(){this._lView[fn]&=-65}reattach(){this._lView[fn]|=64}detectChanges(){So(this._lView[lt],this._lView,this.context)}checkNoChanges(){}attachToViewContainerRef(){if(this._appRef)throw new pe(902,!1);this._attachedToViewContainer=!0}detachFromAppRef(){this._appRef=null,function YA(i,t){bh(i,t,t[xt],2,null,null)}(this._lView[lt],this._lView)}attachToAppRef(t){if(this._attachedToViewContainer)throw new pe(902,!1);this._appRef=t}}class b8 extends ny{constructor(t){super(t),this._view=t}detectChanges(){const t=this._view;So(t[lt],t,t[ze],!1)}checkNoChanges(){}get context(){return null}}class ZF extends $l{constructor(t){super(),this.ngModule=t}resolveComponentFactory(t){const e=Hn(t);return new iy(e,this.ngModule)}}function QF(i){const t=[];for(let e in i)i.hasOwnProperty(e)&&t.push({propName:i[e],templateName:e});return t}class w8{constructor(t,e){this.injector=t,this.parentInjector=e}get(t,e,n){n=Yf(n);const r=this.injector.get(t,Fv,n);return r!==Fv||e===Fv?r:this.parentInjector.get(t,e,n)}}class iy extends Ov{get inputs(){return QF(this.componentDef.inputs)}get outputs(){return QF(this.componentDef.outputs)}constructor(t,e){super(),this.componentDef=t,this.ngModule=e,this.componentType=t.type,this.selector=function tD(i){return i.map(eD).join(",")}(t.selectors),this.ngContentSelectors=t.ngContentSelectors?t.ngContentSelectors:[],this.isBoundToModule=!!e}create(t,e,n,r){let s=(r=r||this.ngModule)instanceof io?r:r?.injector;s&&null!==this.componentDef.getStandaloneInjector&&(s=this.componentDef.getStandaloneInjector(s)||s);const o=s?new w8(t,s):t,a=o.get(Gl,null);if(null===a)throw new pe(407,!1);const l=o.get(B1,null),c=a.createRenderer(null,this.componentDef),d=this.componentDef.selectors[0][0]||"div",h=n?function MD(i,t,e){return i.selectRootElement(t,e===Ks.ShadowDom)}(c,n,this.componentDef.encapsulation):Ap(c,d,function x8(i){const t=i.toLowerCase();return"svg"===t?Pd:"math"===t?"math":null}(d)),p=this.componentDef.onPush?288:272,m=ey(0,null,null,1,0,null,null,null,null,null),g=Mh(null,m,null,p,null,null,a,c,l,o,null);let b,v;sp(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 C8(i,t){const e=i[lt],n=bi;return i[n]=t,Qd(e,n,2,"#host",null)}(g,h),F=function S8(i,t,e,n,r,s,o,a){const l=r[lt];!function E8(i,t,e,n){for(const r of i)t.mergedAttrs=Ec(t.mergedAttrs,r.hostAttrs);null!==t.mergedAttrs&&(Sw(t,t.mergedAttrs,!0),null!==e&&Gx(n,e,t))}(n,i,t,o);const c=s.createRenderer(t,e),d=Mh(r,bw(e),null,e.onPush?32:16,r[i.index],i,s,c,a||null,null,null);return l.firstCreatePass&&P(l,i,n.length-1),Ti(r,d),r[i.index]=d}(C,h,y,M,g,a,c);v=U0(m,bi),h&&function D8(i,t,e,n){if(n)L_(i,e,["ng-version",U1.full]);else{const{attrs:r,classes:s}=function nD(i){const t=[],e=[];let n=1,r=2;for(;n0&&$x(i,e,s.join(" "))}}(c,y,h,n),void 0!==e&&function T8(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=Ec(r.hostAttrs,e=Ec(e,r.hostAttrs))}}(n)}function PD(i){return i===Za?{}:i===Wn?[]:i}function k8(i,t){const e=i.viewQuery;i.viewQuery=e?(n,r)=>{t(n,r),e(n,r)}:t}function P8(i,t){const e=i.contentQueries;i.contentQueries=e?(n,r,s)=>{t(n,r,s),e(n,r,s)}:t}function O8(i,t){const e=i.hostBindings;i.hostBindings=e?(n,r)=>{t(n,r),e(n,r)}:t}function Aw(i){return!!OD(i)&&(Array.isArray(i)||!(i instanceof Map)&&Symbol.iterator in i)}function OD(i){return null!==i&&("function"==typeof i||"object"==typeof i)}function Wl(i,t,e){return i[t]=e}function Is(i,t,e){return!Object.is(i[t],e)&&(i[t]=e,!0)}function Eh(i,t,e,n){const r=Is(i,t,e);return Is(i,t+1,n)||r}function It(i,t,e,n){const r=Se();return Is(r,Ll(),t)&&(zn(),be(Di(),r,i,t,e,n)),It}function Yp(i,t,e,n){return Is(i,Ll(),e)?t+Jt(e)+n:on}function qp(i,t,e,n,r,s){const a=Eh(i,function tl(){return Pt.lFrame.bindingIndex}(),e,r);return Qs(2),a?t+Jt(e)+n+Jt(r)+s:on}function fe(i,t,e,n,r,s,o,a){const l=Se(),c=zn(),d=i+bi,h=c.firstCreatePass?function G8(i,t,e,n,r,s,o,a,l){const c=t.consts,d=Qd(t,i,4,o||null,Fl(c,a));ty(t,e,d,Fl(c,l)),Bd(t,d);const h=d.tView=ey(2,d,n,r,s,t.directiveRegistry,t.pipeRegistry,null,t.schemas,c);return null!==t.queries&&(t.queries.template(t,d),h.queries=t.queries.embeddedTView(d)),d}(d,c,l,t,e,n,r,s,o):c.data[d];va(h,!1);const p=l[xt].createComment("");yh(c,l,p,h),$r(p,l),Ti(l,l[d]=mn(p,l,p,h)),xc(h)&&Qv(c,l,h),null!=o&&Jv(l,h,a)}function Zi(i){return Fd(function gA(){return Pt.lFrame.contextLView}(),bi+i)}function U(i,t,e){const n=Se();return Is(n,Ll(),t)&&ro(zn(),Di(),n,i,t,n[xt],e,!1),U}function FD(i,t,e,n,r){const o=r?"class":"style";kD(i,e,t.inputs[o],o,n)}function G(i,t,e,n){const r=Se(),s=zn(),o=bi+i,a=r[xt],l=s.firstCreatePass?function j8(i,t,e,n,r,s){const o=t.consts,l=Qd(t,i,2,n,Fl(o,r));return ty(t,e,l,Fl(o,s)),null!==l.attrs&&Sw(l,l.attrs,!1),null!==l.mergedAttrs&&Sw(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]=Ap(a,t,function q0(){return Pt.lFrame.currentNamespace}()),d=xc(l);return va(l,!0),Gx(a,c,l),32!=(32&l.flags)&&yh(s,r,c,l),0===function uA(){return Pt.lFrame.elementDepthCount}()&&$r(c,r),function hA(){Pt.lFrame.elementDepthCount++}(),d&&(Qv(s,r,l),Zv(s,l,r)),null!==n&&Jv(r,l),G}function j(){let i=Ar();D_()?T_():(i=i.parent,va(i,!1));const t=i;!function fA(){Pt.lFrame.elementDepthCount--}();const e=zn();return e.firstCreatePass&&(Bd(e,i),Jf(i)&&e.queries.elementEnd(i)),null!=t.classesWithoutHost&&function wA(i){return 0!=(8&i.flags)}(t)&&FD(e,t,Se(),t.classesWithoutHost,!0),null!=t.stylesWithoutHost&&function F_(i){return 0!=(16&i.flags)}(t)&&FD(e,t,Se(),t.stylesWithoutHost,!1),j}function Ie(i,t,e,n){return G(i,t,e,n),j(),Ie}function Gr(i,t,e){const n=Se(),r=zn(),s=i+bi,o=r.firstCreatePass?function Y8(i,t,e,n,r){const s=t.consts,o=Fl(s,n),a=Qd(t,i,8,"ng-container",o);return null!==o&&Sw(a,o,!0),ty(t,e,a,Fl(s,r)),null!==t.queries&&t.queries.elementStart(t,a),a}(s,r,n,t,e):r.data[s];va(o,!0);const a=n[s]=n[xt].createComment("");return yh(r,n,a,o),$r(a,n),xc(o)&&(Qv(r,n,o),Zv(r,o,n)),null!=e&&Jv(n,o),Gr}function Wr(){let i=Ar();const t=zn();return D_()?T_():(i=i.parent,va(i,!1)),t.firstCreatePass&&(Bd(t,i),Jf(i)&&t.queries.elementEnd(i)),Wr}function sy(i,t,e){return Gr(i,t,e),Wr(),sy}function jn(){return Se()}function oy(i){return!!i&&"function"==typeof i.then}function hL(i){return!!i&&"function"==typeof i.subscribe}const LD=hL;function Oe(i,t,e,n){const r=Se(),s=zn(),o=Ar();return fL(s,r,r[xt],o,i,t,n),Oe}function ND(i,t){const e=Ar(),n=Se(),r=zn();return fL(r,n,XF(rh(r.data),e,n),e,i,t),ND}function fL(i,t,e,n,r,s,o){const a=xc(n),c=i.firstCreatePass&&qF(i),d=t[ze],h=YF(t);let p=!0;if(3&n.type||o){const b=Ai(n,t),v=o?o(b):b,y=h.length,M=o?C=>o(I(C[n.index])):n.index;let x=null;if(!o&&a&&(x=function q8(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=mL(n,t,d,s,!1);const C=e.listen(v,r,s);h.push(s,C),c&&c.push(r,M,y,y+1)}}else s=mL(n,t,d,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?ws(i.index,t):t);let l=pL(t,e,n,o),c=s.__ngNextListenerFn__;for(;c;)l=pL(t,e,c,o)&&l,c=c.__ngNextListenerFn__;return r&&!1===l&&(o.preventDefault(),o.returnValue=!1),l}}function re(i=1){return function yA(i){return(Pt.lFrame.contextLView=function Y0(i,t){for(;i>0;)t=t[Er],i--;return t}(i,Pt.lFrame.contextLView))[ze]}(i)}function X8(i,t){let e=null;const n=function K1(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 VD(i){return 2|i}function Ah(i){return(131068&i)>>2}function zD(i,t){return-131069&i|t<<2}function HD(i){return 1|i}function CL(i,t,e,n,r){const s=i[e+1],o=null===t;let a=n?eu(s):Ah(s),l=!1;for(;0!==a&&(!1===l||o);){const d=i[a+1];tW(i[a],t)&&(l=!0,i[a+1]=n?HD(d):VD(d)),a=n?eu(d):Ah(d)}l&&(i[e+1]=n?VD(s):HD(s))}function tW(i,t){return null===i||null==t||(Array.isArray(i)?i[1]:i)===t||!(!Array.isArray(i)||"string"!=typeof t)&&Rc(i,t)>=0}const Rr={textEnd:0,key:0,keyEnd:0,value:0,valueEnd:0};function SL(i){return i.substring(Rr.key,Rr.keyEnd)}function EL(i,t){const e=Rr.textEnd;return e===t?-1:(t=Rr.keyEnd=function sW(i,t,e){for(;t32;)t++;return t}(i,Rr.key=t,e),tm(i,t,e))}function tm(i,t,e){for(;t=0;e=EL(t,e))Cs(i,SL(t),!0)}function ul(i,t,e,n){const r=Se(),s=zn(),o=Qs(2);s.firstUpdatePass&&kL(s,i,o,n),t!==on&&Is(r,o,t)&&OL(s,s.data[Kn()],r,r[xt],i,r[o+1]=function _W(i,t){return null==i||""===i||("string"==typeof t?i+=t:"object"==typeof i&&(i=mi(to(i)))),i}(t,e),n,o)}function RL(i,t){return t>=i.expandoStartIndex}function kL(i,t,e,n){const r=i.data;if(null===r[e+1]){const s=r[Kn()],o=RL(i,e);LL(s,n)&&null===t&&!o&&(t=!1),t=function dW(i,t,e,n){const r=rh(i);let s=n?t.residualClasses:t.residualStyles;if(null===r)0===(n?t.classBindings:t.styleBindings)&&(e=ay(e=$D(null,i,t,e,n),t.attrs,n),s=null);else{const o=t.directiveStylingLast;if(-1===o||i[o]!==r)if(e=$D(r,i,t,e,n),null===s){let l=function uW(i,t,e){const n=e?t.classBindings:t.styleBindings;if(0!==Ah(n))return i[eu(n)]}(i,t,n);void 0!==l&&Array.isArray(l)&&(l=$D(null,i,t,l[1],n),l=ay(l,t.attrs,n),function hW(i,t,e,n){i[eu(e?t.classBindings:t.styleBindings)]=n}(i,t,n,l))}else s=function fW(i,t,e){let n;const r=t.directiveEnd;for(let s=1+t.directiveStylingLast;s0)&&(c=!0)):d=e,r)if(0!==l){const p=eu(i[a+1]);i[n+1]=Tw(p,a),0!==p&&(i[p+1]=zD(i[p+1],n)),i[a+1]=function Z8(i,t){return 131071&i|t<<17}(i[a+1],n)}else i[n+1]=Tw(a,0),0!==a&&(i[a+1]=zD(i[a+1],n)),a=n;else i[n+1]=Tw(l,0),0===a?a=n:i[l+1]=zD(i[l+1],n),l=n;c&&(i[n+1]=VD(i[n+1])),CL(i,d,n,!0),CL(i,d,n,!1),function eW(i,t,e,n,r){const s=r?i.residualClasses:i.residualStyles;null!=s&&"string"==typeof t&&Rc(s,t)>=0&&(e[n+1]=HD(e[n+1]))}(t,d,i,n,s),o=Tw(a,l),s?t.classBindings=o:t.styleBindings=o}(r,s,t,e,o,n)}}function $D(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),d=c?l[1]:l,h=null===d;let p=e[r+1];p===on&&(p=h?Wn:void 0);let m=h?jd(p,n):d===n?p:void 0;if(c&&!Iw(m)&&(m=jd(l,n)),Iw(m)&&(a=m,o))return a;const g=i[r+1];r=o?eu(g):Ah(g)}if(null!==t){let l=s?t.residualClasses:t.residualStyles;null!=l&&(a=jd(l,n))}return a}function Iw(i){return void 0!==i}function LL(i,t){return 0!=(i.flags&(t?8:16))}function Be(i,t=""){const e=Se(),n=zn(),r=i+bi,s=n.firstCreatePass?Qd(n,r,1,t,null):n.data[r],o=e[r]=function cv(i,t){return i.createText(t)}(e[xt],t);yh(n,e,o,s),va(s,!1)}function ui(i){return Qi("",i,""),ui}function Qi(i,t,e){const n=Se(),r=Yp(n,i,t,e);return r!==on&&Vc(n,Kn(),r),Qi}function Dh(i,t,e,n,r){const s=Se(),o=qp(s,i,t,e,n,r);return o!==on&&Vc(s,Kn(),o),Dh}function GL(i,t,e){!function hl(i,t,e,n){const r=zn(),s=Qs(2);r.firstUpdatePass&&kL(r,null,s,n);const o=Se();if(e!==on&&Is(o,s,e)){const a=r.data[Kn()];if(LL(a,n)&&!RL(r,s)){let l=n?a.classesWithoutHost:a.stylesWithoutHost;null!==l&&(e=zf(l,e||"")),FD(r,a,o,e,n)}else!function gW(i,t,e,n,r,s,o,a){r===on&&(r=Wn);let l=0,c=0,d=0((st=st||{})[st.LocaleId=0]="LocaleId",st[st.DayPeriodsFormat=1]="DayPeriodsFormat",st[st.DayPeriodsStandalone=2]="DayPeriodsStandalone",st[st.DaysFormat=3]="DaysFormat",st[st.DaysStandalone=4]="DaysStandalone",st[st.MonthsFormat=5]="MonthsFormat",st[st.MonthsStandalone=6]="MonthsStandalone",st[st.Eras=7]="Eras",st[st.FirstDayOfWeek=8]="FirstDayOfWeek",st[st.WeekendRange=9]="WeekendRange",st[st.DateFormat=10]="DateFormat",st[st.TimeFormat=11]="TimeFormat",st[st.DateTimeFormat=12]="DateTimeFormat",st[st.NumberSymbols=13]="NumberSymbols",st[st.NumberFormats=14]="NumberFormats",st[st.CurrencyCode=15]="CurrencyCode",st[st.CurrencySymbol=16]="CurrencySymbol",st[st.CurrencyName=17]="CurrencyName",st[st.Currencies=18]="Currencies",st[st.Directionality=19]="Directionality",st[st.PluralCase=20]="PluralCase",st[st.ExtraData=21]="ExtraData",st))();const im="en-US";let n2=im;function jD(i,t,e,n,r){if(i=Ot(i),Array.isArray(i))for(let s=0;s>20;if(Nc(i)||!i.multi){const m=new Ud(l,r,E),g=qD(a,t,r?d:d+p,h);-1===g?(pn(ah(c,o),s,a),YD(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=qD(a,t,d+p,h),g=qD(a,t,d,d+p),v=g>=0&&e[g];if(r&&!v||!r&&!(m>=0&&e[m])){pn(ah(c,o),s,a);const y=function Oj(i,t,e,n,r){const s=new Ud(i,e,E);return s.multi=[],s.index=t,s.componentProviders=0,D2(s,r,n&&!e),s}(r?Pj:kj,e.length,r,n,l);!r&&v&&(e[g].providerFactory=y),YD(s,i,t.length,0),t.push(a),c.directiveStart++,c.directiveEnd++,r&&(c.providerIndexes+=1048576),e.push(y),o.push(y)}else YD(s,i,m>-1?m:g,D2(e[r?g:m],l,!r&&n));!r&&n&&v&&e[g].componentProviders++}}}function YD(i,t,e,n){const r=Nc(t),s=function T1(i){return!!i.useClass}(t);if(r||s){const l=(s?Ot(t.useClass):t).prototype.ngOnDestroy;if(l){const c=i.destroyHooks||(i.destroyHooks=[]);if(!r&&t.multi){const d=c.indexOf(e);-1===d?c.push(e,[n,l]):c[d+1].push(n,l)}else c.push(e,l)}}}function D2(i,t,e){return e&&i.componentProviders++,i.multi.push(t)-1}function qD(i,t,e,n){for(let r=e;r{e.providersResolver=(n,r)=>function Rj(i,t,e){const n=zn();if(n.firstCreatePass){const r=bo(i);jD(e,n.data,n.blueprint,r,!0),jD(t,n.data,n.blueprint,r,!1)}}(n,r?r(i):i,t)}}class rm{}class T2{}class I2 extends rm{constructor(t,e){super(),this._parent=e,this._bootstrapComponents=[],this.destroyCbs=[],this.componentFactoryResolver=new ZF(this);const n=hr(t);this._bootstrapComponents=dl(n.bootstrap),this._r3Injector=hw(t,e,[{provide:rm,useValue:this},{provide:$l,useValue:this.componentFactoryResolver}],mi(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 KD extends T2{constructor(t){super(),this.moduleType=t}create(t){return new I2(this.moduleType,t)}}class Lj extends rm{constructor(t,e,n){super(),this.componentFactoryResolver=new ZF(this),this.instance=null;const r=new $p([...t,{provide:rm,useValue:this},{provide:$l,useValue:this.componentFactoryResolver}],e||wh(),n,new Set(["environment"]));this.injector=r,r.resolveInjectorInitializers()}destroy(){this.injector.destroy()}onDestroy(t){this.injector.onDestroy(t)}}function Lw(i,t,e=null){return new Lj(i,t,e).injector}let Nj=(()=>{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=nw(0,e.type),r=n.length>0?Lw([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=Pe({token:i,providedIn:"environment",factory:()=>new i(ee(io))}),i})();function ZD(i){i.getStandaloneInjector=t=>t.get(Nj).getOrCreateStandaloneInjector(i)}function Rs(i,t,e){const n=zr()+i,r=Se();return r[n]===on?Wl(r,n,e?t.call(e):t()):function ry(i,t){return i[t]}(r,n)}function sm(i,t,e,n){return B2(Se(),zr(),i,t,e,n)}function N2(i,t,e,n,r,s,o){return function z2(i,t,e,n,r,s,o,a,l){const c=t+e;return function Da(i,t,e,n,r,s){const o=Eh(i,t,e,n);return Eh(i,t+2,r,s)||o}(i,c,r,s,o,a)?Wl(i,c+4,l?n.call(l,r,s,o,a):n(r,s,o,a)):fy(i,c+4)}(Se(),zr(),i,t,e,n,r,s,o)}function fy(i,t){const e=i[t];return e===on?void 0:e}function B2(i,t,e,n,r,s){const o=t+e;return Is(i,o,r)?Wl(i,o+1,s?n.call(s,r):n(r)):fy(i,o+1)}function ct(i,t){const e=zn();let n;const r=i+bi;e.firstCreatePass?(n=function Jj(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=el(n.type)),o=Xs(E);try{const a=dp(!1),l=s();return dp(a),function W8(i,t,e,n){e>=i.data.length&&(i.data[e]=null,i.blueprint[e]=null),t[e]=n}(e,Se(),r,l),l}finally{Xs(o)}}function ut(i,t,e){const n=i+bi,r=Se(),s=Fd(r,n);return py(r,n)?B2(r,zr(),t,s.transform,e,s):s.transform(e)}function JD(i,t,e,n){const r=i+bi,s=Se(),o=Fd(s,r);return py(s,r)?function U2(i,t,e,n,r,s,o){const a=t+e;return Eh(i,a,r,s)?Wl(i,a+2,o?n.call(o,r,s):n(r,s)):fy(i,a+2)}(s,zr(),t,o.transform,e,n,o):o.transform(e,n)}function py(i,t){return i[lt].data[t].pure}function eT(i){return t=>{setTimeout(i,void 0,t)}}const $e=class r6 extends Te{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=eT(s),r&&(r=eT(r)),o&&(o=eT(o)));const a=super.subscribe({next:r,error:s,complete:o});return t instanceof Qt&&t.add(a),a}};function s6(){return this._results[Symbol.iterator]()}class om{get changes(){return this._changes||(this._changes=new $e)}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=om.prototype;e[Symbol.iterator]||(e[Symbol.iterator]=s6)}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 Dr(i){return i.flat(Number.POSITIVE_INFINITY)}(t);(this._changesDetected=!function pp(i,t,e){if(i.length!==t.length)return!1;for(let n=0;n{class i{}return i.__NG_ELEMENT_ID__=l6,i})();const o6=Eo,a6=class extends o6{constructor(t,e,n){super(),this._declarationLView=t,this._declarationTContainer=e,this.elementRef=n}createEmbeddedView(t,e){const n=this._declarationTContainer.tView,r=Mh(this._declarationLView,n,t,16,null,n.declTNode,null,null,null,null,e||null);r[nh]=this._declarationLView[this._declarationTContainer.index];const o=this._declarationLView[Zs];return null!==o&&(r[Zs]=o.createEmbeddedView(n)),Sh(n,r,t),new ny(r)}};function l6(){return Nw(Ar(),Se())}function Nw(i,t){return 4&i.type?new a6(t,i,Fn(i,t)):null}let jr=(()=>{class i{}return i.__NG_ELEMENT_ID__=c6,i})();function c6(){return W2(Ar(),Se())}const d6=jr,$2=class extends d6{constructor(t,e,n){super(),this._lContainer=t,this._hostTNode=e,this._hostLView=n}get element(){return Fn(this._hostTNode,this._hostLView)}get injector(){return new Dc(this._hostTNode,this._hostLView)}get parentInjector(){const t=ch(this._hostTNode,this._hostLView);if(cp(t)){const e=oh(t,this._hostLView),n=sh(t);return new Dc(e[lt].data[n+8],e)}return new Dc(null,this._hostLView)}clear(){for(;this.length>0;)this.remove(this.length-1)}get(t){const e=G2(this._lContainer);return null!==e&&e[t]||null}get length(){return this._lContainer.length-Ui}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 hh(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 iy(Hn(t)),c=n||this.parentInjector;if(!s&&null==l.ngModule){const p=(o?c:this.parentInjector).get(io,null);p&&(s=p)}const d=l.create(c,r,void 0,s);return this.insert(d.hostView,a),d}insert(t,e){const n=t._lView,r=n[lt];if(function dA(i){return xs(i[Bi])}(n)){const d=this.indexOf(t);if(-1!==d)this.detach(d);else{const h=n[Bi],p=new $2(h,h[he],h[Bi]);p.detach(p.indexOf(t))}}const s=this._adjustIndex(e),o=this._lContainer;!function dv(i,t,e,n){const r=Ui+n,s=e.length;n>0&&(e[r-1][ys]=t),n0)n.push(o[a/2]);else{const c=s[a+1],d=t[-l];for(let h=Ui;h{class i{constructor(e){this.appInits=e,this.resolve=Uw,this.reject=Uw,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)(ee(Vw,8))},i.\u0275prov=Pe({token:i,factory:i.\u0275fac,providedIn:"root"}),i})();const cm=new me("AppId",{providedIn:"root",factory:function pN(){return`${hT()}${hT()}${hT()}`}});function hT(){return String.fromCharCode(97+Math.floor(25*Math.random()))}const mN=new me("Platform Initializer"),fT=new me("Platform ID",{providedIn:"platform",factory:()=>"unknown"}),kr=new me("AnimationModuleType");let L6=(()=>{class i{log(e){console.log(e)}warn(e){console.warn(e)}}return i.\u0275fac=function(e){return new(e||i)},i.\u0275prov=Pe({token:i,factory:i.\u0275fac,providedIn:"platform"}),i})();const Xl=new me("LocaleId",{providedIn:"root",factory:()=>Lt(Xl,Ft.Optional|Ft.SkipSelf)||function N6(){return typeof $localize<"u"&&$localize.locale||im}()});class U6{constructor(t,e){this.ngModuleFactory=t,this.componentFactories=e}}let gN=(()=>{class i{compileModuleSync(e){return new KD(e)}compileModuleAsync(e){return Promise.resolve(this.compileModuleSync(e))}compileModuleAndAllComponentsSync(e){const n=this.compileModuleSync(e),s=dl(hr(e).declarations).reduce((o,a)=>{const l=Hn(a);return l&&o.push(new iy(l)),o},[]);return new U6(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=Pe({token:i,factory:i.\u0275fac,providedIn:"root"}),i})();const H6=(()=>Promise.resolve(0))();function pT(i){typeof Zone>"u"?H6.then(()=>{i&&i.apply(null,null)}):Zone.current.scheduleMicroTask("scheduleMicrotask",i)}class gt{constructor({enableLongStackTrace:t=!1,shouldCoalesceEventChangeDetection:e=!1,shouldCoalesceRunChangeDetection:n=!1}){if(this.hasPendingMacrotasks=!1,this.hasPendingMicrotasks=!1,this.isStable=!0,this.onUnstable=new $e(!1),this.onMicrotaskEmpty=new $e(!1),this.onStable=new $e(!1),this.onError=new $e(!1),typeof Zone>"u")throw new pe(908,!1);Zone.assertZonePatched();const r=this;r._nesting=0,r._outer=r._inner=Zone.current,Zone.TaskTrackingZoneSpec&&(r._inner=r._inner.fork(new Zone.TaskTrackingZoneSpec)),t&&Zone.longStackTraceZoneSpec&&(r._inner=r._inner.fork(Zone.longStackTraceZoneSpec)),r.shouldCoalesceEventChangeDetection=!n&&e,r.shouldCoalesceRunChangeDetection=n,r.lastRequestAnimationFrameId=-1,r.nativeRequestAnimationFrame=function $6(){let i=Rn.requestAnimationFrame,t=Rn.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 j6(i){const t=()=>{!function W6(i){i.isCheckStableRunning||-1!==i.lastRequestAnimationFrameId||(i.lastRequestAnimationFrameId=i.nativeRequestAnimationFrame.call(Rn,()=>{i.fakeTopEventTask||(i.fakeTopEventTask=Zone.root.scheduleEventTask("fakeTopEventTask",()=>{i.lastRequestAnimationFrameId=-1,gT(i),i.isCheckStableRunning=!0,mT(i),i.isCheckStableRunning=!1},void 0,()=>{},()=>{})),i.fakeTopEventTask.invoke()}),gT(i))}(i)};i._inner=i._inner.fork({name:"angular",properties:{isAngularZone:!0},onInvokeTask:(e,n,r,s,o,a)=>{try{return yN(i),e.invokeTask(r,s,o,a)}finally{(i.shouldCoalesceEventChangeDetection&&"eventTask"===s.type||i.shouldCoalesceRunChangeDetection)&&t(),bN(i)}},onInvoke:(e,n,r,s,o,a,l)=>{try{return yN(i),e.invoke(r,s,o,a,l)}finally{i.shouldCoalesceRunChangeDetection&&t(),bN(i)}},onHasTask:(e,n,r,s)=>{e.hasTask(r,s),n===r&&("microTask"==s.change?(i._hasPendingMicrotasks=s.microTask,gT(i),mT(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(!gt.isInAngularZone())throw new pe(909,!1)}static assertNotInAngularZone(){if(gt.isInAngularZone())throw new pe(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,G6,Uw,Uw);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 G6={};function mT(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 gT(i){i.hasPendingMicrotasks=!!(i._hasPendingMicrotasks||(i.shouldCoalesceEventChangeDetection||i.shouldCoalesceRunChangeDetection)&&-1!==i.lastRequestAnimationFrameId)}function yN(i){i._nesting++,i.isStable&&(i.isStable=!1,i.onUnstable.emit(null))}function bN(i){i._nesting--,mT(i)}class Y6{constructor(){this.hasPendingMicrotasks=!1,this.hasPendingMacrotasks=!1,this.isStable=!0,this.onUnstable=new $e,this.onMicrotaskEmpty=new $e,this.onStable=new $e,this.onError=new $e}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 xN=new me(""),Hw=new me("");let yT,_T=(()=>{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,yT||(function q6(i){yT=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:()=>{gt.assertNotInAngularZone(),pT(()=>{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())pT(()=>{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)(ee(gt),ee(vT),ee(Hw))},i.\u0275prov=Pe({token:i,factory:i.\u0275fac}),i})(),vT=(()=>{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 yT?.findTestabilityInTree(this,e,n)??null}}return i.\u0275fac=function(e){return new(e||i)},i.\u0275prov=Pe({token:i,factory:i.\u0275fac,providedIn:"platform"}),i})();const Hc=!1;let tu=null;const wN=new me("AllowMultipleToken"),bT=new me("PlatformDestroyListeners"),MN=new me("appBootstrapListener");class CN{constructor(t,e){this.name=t,this.token=e}}function EN(i,t,e=[]){const n=`Platform: ${t}`,r=new me(n);return(s=[])=>{let o=xT();if(!o||o.injector.get(wN,!1)){const a=[...e,...s,{provide:r,useValue:!0}];i?i(a):function Z6(i){if(tu&&!tu.get(wN,!1))throw new pe(400,!1);tu=i;const t=i.get(DN);(function SN(i){const t=i.get(mN,null);t&&t.forEach(e=>e())})(i)}(function AN(i=[],t){return Gi.create({name:t,providers:[{provide:Iv,useValue:"platform"},{provide:bT,useValue:new Set([()=>tu=null])},...i]})}(a,n))}return function J6(i){const t=xT();if(!t)throw new pe(401,!1);return t}()}}function xT(){return tu?.get(DN)??null}let DN=(()=>{class i{constructor(e){this._injector=e,this._modules=[],this._destroyListeners=[],this._destroyed=!1}bootstrapModuleFactory(e,n){const r=function IN(i,t){let e;return e="noop"===i?new Y6:("zone.js"===i?void 0:i)||new gt(t),e}(n?.ngZone,function TN(i){return{enableLongStackTrace:!1,shouldCoalesceEventChangeDetection:!(!i||!i.ngZoneEventCoalescing)||!1,shouldCoalesceRunChangeDetection:!(!i||!i.ngZoneRunCoalescing)||!1}}(n)),s=[{provide:gt,useValue:r}];return r.run(()=>{const o=Gi.create({providers:s,parent:this.injector,name:e.moduleType.name}),a=e.create(o),l=a.injector.get(cl,null);if(!l)throw new pe(402,!1);return r.runOutsideAngular(()=>{const c=r.onError.subscribe({next:d=>{l.handleError(d)}});a.onDestroy(()=>{$w(this._modules,a),c.unsubscribe()})}),function RN(i,t,e){try{const n=e();return oy(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(zw);return c.runInitializers(),c.donePromise.then(()=>(function r2(i){En(i,"Expected localeId to be defined"),"string"==typeof i&&(n2=i.toLowerCase().replace(/_/g,"-"))}(a.injector.get(Xl,im)||im),this._moduleDoBootstrap(a),a))})})}bootstrapModule(e,n=[]){const r=kN({},n);return function X6(i,t,e){const n=new KD(e);return Promise.resolve(n)}(0,0,e).then(s=>this.bootstrapModuleFactory(s,r))}_moduleDoBootstrap(e){const n=e.injector.get(dm);if(e._bootstrapComponents.length>0)e._bootstrapComponents.forEach(r=>n.bootstrap(r));else{if(!e.instance.ngDoBootstrap)throw new pe(-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 pe(404,!1);this._modules.slice().forEach(n=>n.destroy()),this._destroyListeners.forEach(n=>n());const e=this._injector.get(bT,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)(ee(Gi))},i.\u0275prov=Pe({token:i,factory:i.\u0275fac,providedIn:"platform"}),i})();function kN(i,t){return Array.isArray(t)?t.reduce(kN,i):{...i,...t}}let dm=(()=>{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 In(a=>{this._stable=this._zone.isStable&&!this._zone.hasPendingMacrotasks&&!this._zone.hasPendingMicrotasks,this._zone.runOutsideAngular(()=>{a.next(this._stable),a.complete()})}),o=new In(a=>{let l;this._zone.runOutsideAngular(()=>{l=this._zone.onStable.subscribe(()=>{gt.assertNotInAngularZone(),pT(()=>{!this._stable&&!this._zone.hasPendingMacrotasks&&!this._zone.hasPendingMicrotasks&&(this._stable=!0,a.next(!0))})})});const c=this._zone.onUnstable.subscribe(()=>{gt.assertInAngularZone(),this._stable&&(this._stable=!1,this._zone.runOutsideAngular(()=>{a.next(!1)}))});return()=>{l.unsubscribe(),c.unsubscribe()}});this.isStable=Cr(s,o.pipe(Vf()))}bootstrap(e,n){const r=e instanceof Ov;if(!this._injector.get(zw).done){!r&&function Ed(i){const t=Hn(i)||Vr(i)||vs(i);return null!==t&&t.standalone}(e);throw new pe(405,Hc)}let o;o=r?e:this._injector.get($l).resolveComponentFactory(e),this.componentTypes.push(o.componentType);const a=function K6(i){return i.isBoundToModule}(o)?void 0:this._injector.get(rm),c=o.create(Gi.NULL,[],n||o.selector,a),d=c.location.nativeElement,h=c.injector.get(xN,null);return h?.registerApplication(d),c.onDestroy(()=>{this.detachView(c.hostView),$w(this.components,c),h?.unregisterApplication(d)}),this._loadComponent(c),c}tick(){if(this._runningTick)throw new pe(101,!1);try{this._runningTick=!0;for(let e of this._views)e.detectChanges()}catch(e){this._zone.runOutsideAngular(()=>this._exceptionHandler.handleError(e))}finally{this._runningTick=!1}}attachView(e){const n=e;this._views.push(n),n.attachToAppRef(this)}detachView(e){const n=e;$w(this._views,n),n.detachFromAppRef()}_loadComponent(e){this.attachView(e.hostView),this.tick(),this.components.push(e);const n=this._injector.get(MN,[]);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),()=>$w(this._destroyListeners,e)}destroy(){if(this._destroyed)throw new pe(406,!1);const e=this._injector;e.destroy&&!e.destroyed&&e.destroy()}get viewCount(){return this._views.length}warnIfDestroyed(){}}return i.\u0275fac=function(e){return new(e||i)(ee(gt),ee(io),ee(cl))},i.\u0275prov=Pe({token:i,factory:i.\u0275fac,providedIn:"root"}),i})();function $w(i,t){const e=i.indexOf(t);e>-1&&i.splice(e,1)}let Qn=(()=>{class i{}return i.__NG_ELEMENT_ID__=t9,i})();function t9(i){return function n9(i,t,e){if(Dd(i)&&!e){const n=ws(i.index,t);return new ny(n,n)}return 47&i.type?new ny(t[sr],t):null}(Ar(),Se(),16==(16&i))}class NN{constructor(){}supports(t){return Aw(t)}create(t){return new c9(t)}}const l9=(i,t)=>t;class c9{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||l9}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 d9(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 BN),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 BN),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 d9{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 u9{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 BN{constructor(){this.map=new Map}put(t){const e=t.trackById;let n=this.map.get(e);n||(n=new u9,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 UN(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 f9(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 f9{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 zN(){return new jw([new NN])}let jw=(()=>{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||zN()),deps:[[i,new Ca,new Ss]]}}find(e){const n=this.factories.find(r=>r.supports(e));if(null!=n)return n;throw new pe(901,!1)}}return i.\u0275prov=Pe({token:i,providedIn:"root",factory:zN}),i})();function HN(){return new gy([new VN])}let gy=(()=>{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||HN()),deps:[[i,new Ca,new Ss]]}}find(e){const n=this.factories.find(r=>r.supports(e));if(n)return n;throw new pe(901,!1)}}return i.\u0275prov=Pe({token:i,providedIn:"root",factory:HN}),i})();const g9=EN(null,"core",[]);let _9=(()=>{class i{constructor(e){}}return i.\u0275fac=function(e){return new(e||i)(ee(dm))},i.\u0275mod=en({type:i}),i.\u0275inj=Wt({}),i})();let ET=null;function $c(){return ET}class b9{}const qt=new me("DocumentToken");let AT=(()=>{class i{historyGo(e){throw new Error("Not implemented")}}return i.\u0275fac=function(e){return new(e||i)},i.\u0275prov=Pe({token:i,factory:function(){return function x9(){return ee($N)}()},providedIn:"platform"}),i})();const w9=new me("Location Initialized");let $N=(()=>{class i extends AT{constructor(e){super(),this._doc=e,this._location=window.location,this._history=window.history}getBaseHrefFromDOM(){return $c().getBaseHref(this._doc)}onPopState(e){const n=$c().getGlobalEventTarget(this._doc,"window");return n.addEventListener("popstate",e,!1),()=>n.removeEventListener("popstate",e)}onHashChange(e){const n=$c().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){GN()?this._history.pushState(e,n,r):this._location.hash=r}replaceState(e,n,r){GN()?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)(ee(qt))},i.\u0275prov=Pe({token:i,factory:function(){return function M9(){return new $N(ee(qt))}()},providedIn:"platform"}),i})();function GN(){return!!window.history.pushState}function DT(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 WN(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 Gc(i){return i&&"?"!==i[0]?"?"+i:i}let Rh=(()=>{class i{historyGo(e){throw new Error("Not implemented")}}return i.\u0275fac=function(e){return new(e||i)},i.\u0275prov=Pe({token:i,factory:function(){return Lt(YN)},providedIn:"root"}),i})();const jN=new me("appBaseHref");let YN=(()=>{class i extends Rh{constructor(e,n){super(),this._platformLocation=e,this._removeListenerFns=[],this._baseHref=n??this._platformLocation.getBaseHrefFromDOM()??Lt(qt).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 DT(this._baseHref,e)}path(e=!1){const n=this._platformLocation.pathname+Gc(this._platformLocation.search),r=this._platformLocation.hash;return r&&e?`${n}${r}`:n}pushState(e,n,r,s){const o=this.prepareExternalUrl(r+Gc(s));this._platformLocation.pushState(e,n,o)}replaceState(e,n,r,s){const o=this.prepareExternalUrl(r+Gc(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)(ee(AT),ee(jN,8))},i.\u0275prov=Pe({token:i,factory:i.\u0275fac,providedIn:"root"}),i})(),C9=(()=>{class i extends Rh{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=DT(this._baseHref,e);return n.length>0?"#"+n:n}pushState(e,n,r,s){let o=this.prepareExternalUrl(r+Gc(s));0==o.length&&(o=this._platformLocation.pathname),this._platformLocation.pushState(e,n,o)}replaceState(e,n,r,s){let o=this.prepareExternalUrl(r+Gc(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)(ee(AT),ee(jN,8))},i.\u0275prov=Pe({token:i,factory:i.\u0275fac}),i})(),_y=(()=>{class i{constructor(e){this._subject=new $e,this._urlChangeListeners=[],this._urlChangeSubscription=null,this._locationStrategy=e;const n=this._locationStrategy.getBaseHref();this._basePath=function A9(i){if(new RegExp("^(https?:)?//").test(i)){const[,e]=i.split(/\/\/[^\/]+/);return e}return i}(WN(qN(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+Gc(n))}normalize(e){return i.stripTrailingSlash(function E9(i,t){if(!i||!t.startsWith(i))return t;const e=t.substring(i.length);return""===e||["/",";","?","#"].includes(e[0])?e:t}(this._basePath,qN(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+Gc(n)),r)}replaceState(e,n="",r=null){this._locationStrategy.replaceState(r,"",e,n),this._notifyUrlChangeListeners(this.prepareExternalUrl(e+Gc(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=Gc,i.joinWithSlash=DT,i.stripTrailingSlash=WN,i.\u0275fac=function(e){return new(e||i)(ee(Rh))},i.\u0275prov=Pe({token:i,factory:function(){return function S9(){return new _y(ee(Rh))}()},providedIn:"root"}),i})();function qN(i){return i.replace(/\/index.html$/,"")}var Ao=(()=>((Ao=Ao||{})[Ao.Decimal=0]="Decimal",Ao[Ao.Percent=1]="Percent",Ao[Ao.Currency=2]="Currency",Ao[Ao.Scientific=3]="Scientific",Ao))(),$t=(()=>(($t=$t||{})[$t.Decimal=0]="Decimal",$t[$t.Group=1]="Group",$t[$t.List=2]="List",$t[$t.PercentSign=3]="PercentSign",$t[$t.PlusSign=4]="PlusSign",$t[$t.MinusSign=5]="MinusSign",$t[$t.Exponential=6]="Exponential",$t[$t.SuperscriptingExponent=7]="SuperscriptingExponent",$t[$t.PerMille=8]="PerMille",$t[$t.Infinity=9]="Infinity",$t[$t.NaN=10]="NaN",$t[$t.TimeSeparator=11]="TimeSeparator",$t[$t.CurrencyDecimal=12]="CurrencyDecimal",$t[$t.CurrencyGroup=13]="CurrencyGroup",$t))();function Ta(i,t){const e=oo(i),n=e[st.NumberSymbols][t];if(typeof n>"u"){if(t===$t.CurrencyDecimal)return e[st.NumberSymbols][$t.Decimal];if(t===$t.CurrencyGroup)return e[st.NumberSymbols][$t.Group]}return n}const J9=/^(\d+)?\.((\d+)(-(\d+))?)?$/,eB=22,tM=".",yy="0",eY=";",tY=",",PT="#";function LT(i){const t=parseInt(i);if(isNaN(t))throw new Error("Invalid integer literal when parsing "+i);return t}const BT=/\s+/,iB=[];let hm=(()=>{class i{constructor(e,n,r,s){this._iterableDiffers=e,this._keyValueDiffers=n,this._ngEl=r,this._renderer=s,this.initialClasses=iB,this.stateMap=new Map}set klass(e){this.initialClasses=null!=e?e.trim().split(BT):iB}set ngClass(e){this.rawClass="string"==typeof e?e.trim().split(BT):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(BT).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)(E(jw),E(gy),E(vt),E(ll))},i.\u0275dir=ve({type:i,selectors:[["","ngClass",""]],inputs:{klass:["class","klass"],ngClass:"ngClass"},standalone:!0}),i})();class hY{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 lo=(()=>{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 hY(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),oB(a,r)}});for(let r=0,s=n.length;r{oB(n.get(r.currentIndex),r)})}static ngTemplateContextGuard(e,n){return!0}}return i.\u0275fac=function(e){return new(e||i)(E(jr),E(Eo),E(jw))},i.\u0275dir=ve({type:i,selectors:[["","ngFor","","ngForOf",""]],inputs:{ngForOf:"ngForOf",ngForTrackBy:"ngForTrackBy",ngForTemplate:"ngForTemplate"},standalone:!0}),i})();function oB(i,t){i.context.$implicit=t.item}let _i=(()=>{class i{constructor(e,n){this._viewContainer=e,this._context=new pY,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){aB("ngIfThen",e),this._thenTemplateRef=e,this._thenViewRef=null,this._updateView()}set ngIfElse(e){aB("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)(E(jr),E(Eo))},i.\u0275dir=ve({type:i,selectors:[["","ngIf",""]],inputs:{ngIf:"ngIf",ngIfThen:"ngIfThen",ngIfElse:"ngIfElse"},standalone:!0}),i})();class pY{constructor(){this.$implicit=null,this.ngIf=null}}function aB(i,t){if(t&&!t.createEmbeddedView)throw new Error(`${i} must be a TemplateRef, but received '${mi(t)}'.`)}class UT{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 by=(()=>{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=ve({type:i,selectors:[["","ngSwitch",""]],inputs:{ngSwitch:"ngSwitch"},standalone:!0}),i})(),VT=(()=>{class i{constructor(e,n,r){this.ngSwitch=r,r._addCase(),this._view=new UT(e,n)}ngDoCheck(){this._view.enforceState(this.ngSwitch._matchCase(this.ngSwitchCase))}}return i.\u0275fac=function(e){return new(e||i)(E(jr),E(Eo),E(by,9))},i.\u0275dir=ve({type:i,selectors:[["","ngSwitchCase",""]],inputs:{ngSwitchCase:"ngSwitchCase"},standalone:!0}),i})(),lB=(()=>{class i{constructor(e,n,r){r._addDefault(new UT(e,n))}}return i.\u0275fac=function(e){return new(e||i)(E(jr),E(Eo),E(by,9))},i.\u0275dir=ve({type:i,selectors:[["","ngSwitchDefault",""]],standalone:!0}),i})(),nM=(()=>{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:Es.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)(E(vt),E(gy),E(ll))},i.\u0275dir=ve({type:i,selectors:[["","ngStyle",""]],inputs:{ngStyle:"ngStyle"},standalone:!0}),i})(),xy=(()=>{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)(E(jr))},i.\u0275dir=ve({type:i,selectors:[["","ngTemplateOutlet",""]],inputs:{ngTemplateOutletContext:"ngTemplateOutletContext",ngTemplateOutlet:"ngTemplateOutlet",ngTemplateOutletInjector:"ngTemplateOutletInjector"},standalone:!0,features:[xi]}),i})();function ml(i,t){return new pe(2100,!1)}class gY{createSubscription(t,e){return t.subscribe({next:e,error:n=>{throw n}})}dispose(t){t.unsubscribe()}}class _Y{createSubscription(t,e){return t.then(e,n=>{throw n})}dispose(t){}}const vY=new _Y,yY=new gY;let Xo=(()=>{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(oy(e))return vY;if(hL(e))return yY;throw ml()}_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)(E(Qn,16))},i.\u0275pipe=$i({name:"async",type:i,pure:!1,standalone:!0}),i})(),dB=(()=>{class i{constructor(e){this.differs=e,this.keyValues=[],this.compareFn=uB}transform(e,n=uB){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 kY(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)(E(gy,16))},i.\u0275pipe=$i({name:"keyvalue",type:i,pure:!1,standalone:!0}),i})();function uB(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 zT(i){return!(null==i||""===i||i!=i)}(e))return null;r=r||this._locale;try{return function sY(i,t,e){return function OT(i,t,e,n,r,s,o=!1){let a="",l=!1;if(isFinite(i)){let c=function aY(i){let n,r,s,o,a,t=Math.abs(i)+"",e=0;for((r=t.indexOf(tM))>-1&&(t=t.replace(tM,"")),(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)===yy;s++);if(s===(a=t.length))n=[0],r=1;else{for(a--;t.charAt(a)===yy;)a--;for(r-=s,n=[],o=0;s<=a;s++,o++)n[o]=Number(t.charAt(s))}return r>eB&&(n=n.splice(0,eB-1),e=r-1,r=1),{digits:n,exponent:e,integerLen:r}}(i);o&&(c=function oY(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 d=t.minInt,h=t.minFrac,p=t.maxFrac;if(s){const M=s.match(J9);if(null===M)throw new Error(`${s} is not a valid digit info`);const x=M[1],C=M[3],F=M[5];null!=x&&(d=LT(x)),null!=C&&(h=LT(C)),null!=F?p=LT(F):null!=C&&h>p&&(p=h)}!function lY(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);d&&(n.unshift(d),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(Ta(e,n)),v.length&&(a+=Ta(e,r)+v.join("")),b&&(a+=Ta(e,$t.Exponential)+"+"+b)}else a=Ta(e,$t.Infinity);return a=i<0&&!l?t.negPre+a+t.negSuf:t.posPre+a+t.posSuf,a}(i,function FT(i,t="-"){const e={minInt:1,minFrac:0,maxFrac:0,posPre:"",posSuf:"",negPre:"",negSuf:"",gSize:0,lgSize:0},n=i.split(eY),r=n[0],s=n[1],o=-1!==r.indexOf(tM)?r.split(tM):[r.substring(0,r.lastIndexOf(yy)+1),r.substring(r.lastIndexOf(yy)+1)],a=o[0],l=o[1]||"";e.posPre=a.substring(0,a.indexOf(PT));for(let d=0;d{class i{}return i.\u0275fac=function(e){return new(e||i)},i.\u0275mod=en({type:i}),i.\u0275inj=Wt({}),i})();const fB="browser";let UY=(()=>{class i{}return i.\u0275prov=Pe({token:i,providedIn:"root",factory:()=>new VY(ee(qt),window)}),i})();class VY{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 zY(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=pB(this.window.history)||pB(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 pB(i){return Object.getOwnPropertyDescriptor(i,"scrollRestoration")}class m7 extends b9{constructor(){super(...arguments),this.supportsDOMEvents=!0}}class WT extends m7{static makeCurrent(){!function y9(i){ET||(ET=i)}(new WT)}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 g7(){return My=My||document.querySelector("base"),My?My.getAttribute("href"):null}();return null==e?null:function _7(i){sM=sM||document.createElement("a"),sM.setAttribute("href",i);const t=sM.pathname;return"/"===t.charAt(0)?t:`/${t}`}(e)}resetBaseElement(){My=null}getUserAgent(){return window.navigator.userAgent}getCookie(t){return function dY(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 sM,My=null;const yB=new me("TRANSITION_ID"),y7=[{provide:Vw,useFactory:function v7(i,t,e){return()=>{e.get(zw).donePromise.then(()=>{const n=$c(),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=Pe({token:i,factory:i.\u0275fac}),i})();const oM=new me("EventManagerPlugins");let aM=(()=>{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=Pe({token:i,factory:i.\u0275fac}),i})(),Cy=(()=>{class i extends xB{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)(ee(qt))},i.\u0275prov=Pe({token:i,factory:i.\u0275fac}),i})();const jT={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/"},YT=/%COMP%/g,CB=new me("RemoveStylesOnCompDestory",{providedIn:"root",factory:()=>!1});function SB(i,t){return t.flat(100).map(e=>e.replace(YT,i))}function EB(i){return t=>{if("__ngUnwrap__"===t)return i;!1===i(t)&&(t.preventDefault(),t.returnValue=!1)}}let lM=(()=>{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 qT(e)}createRenderer(e,n){if(!e||!n)return this.defaultRenderer;const r=this.getOrCreateRenderer(e,n);return r instanceof TB?r.applyToHost(e):r instanceof XT&&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 Ks.Emulated:s=new TB(o,a,n,this.appId,l);break;case Ks.ShadowDom:return new D7(o,a,e,n);default:s=new XT(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)(ee(aM),ee(Cy),ee(cm),ee(CB))},i.\u0275prov=Pe({token:i,factory:i.\u0275fac}),i})();class qT{constructor(t){this.eventManager=t,this.data=Object.create(null),this.destroyNode=null}destroy(){}createElement(t,e){return e?document.createElementNS(jT[e]||e,t):document.createElement(t)}createComment(t){return document.createComment(t)}createText(t){return document.createTextNode(t)}appendChild(t,e){(DB(t)?t.content:t).appendChild(e)}insertBefore(t,e,n){t&&(DB(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=jT[r];s?t.setAttributeNS(s,e,n):t.setAttribute(e,n)}else t.setAttribute(e,n)}removeAttribute(t,e,n){if(n){const r=jT[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&(Es.DashCase|Es.Important)?t.style.setProperty(e,n,r&Es.Important?"important":""):t.style[e]=n}removeStyle(t,e,n){n&Es.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,EB(n)):this.eventManager.addEventListener(t,e,EB(n))}}function DB(i){return"TEMPLATE"===i.tagName&&void 0!==i.content}class D7 extends qT{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=SB(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 XT extends qT{constructor(t,e,n,r,s=n.id){super(t),this.sharedStylesHost=e,this.removeStylesOnCompDestory=r,this.rendererUsageCount=0,this.styles=SB(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 TB extends XT{constructor(t,e,n,r,s){const o=r+"-"+n.id;super(t,e,n,s,o),this.contentAttr=function S7(i){return"_ngcontent-%COMP%".replace(YT,i)}(o),this.hostAttr=function E7(i){return"_nghost-%COMP%".replace(YT,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 T7=(()=>{class i extends bB{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)(ee(qt))},i.\u0275prov=Pe({token:i,factory:i.\u0275fac}),i})();const IB=["alt","control","meta","shift"],I7={"\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"},R7={alt:i=>i.altKey,control:i=>i.ctrlKey,meta:i=>i.metaKey,shift:i=>i.shiftKey};let k7=(()=>{class i extends bB{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(()=>$c().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."),IB.forEach(c=>{const d=n.indexOf(c);d>-1&&(n.splice(d,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=I7[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"),IB.forEach(o=>{o!==r&&(0,R7[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)(ee(qt))},i.\u0275prov=Pe({token:i,factory:i.\u0275fac}),i})();const L7=EN(g9,"browser",[{provide:fT,useValue:fB},{provide:mN,useValue:function P7(){WT.makeCurrent()},multi:!0},{provide:qt,useFactory:function F7(){return function o1(i){vv=i}(document),document},deps:[]}]),PB=new me(""),OB=[{provide:Hw,useClass:class b7{addToWindow(t){Rn.getAngularTestability=(n,r=!0)=>{const s=t.findTestabilityInTree(n,r);if(null==s)throw new Error("Could not find testability for element.");return s},Rn.getAllAngularTestabilities=()=>t.getAllTestabilities(),Rn.getAllAngularRootElements=()=>t.getAllRootElements(),Rn.frameworkStabilizers||(Rn.frameworkStabilizers=[]),Rn.frameworkStabilizers.push(n=>{const r=Rn.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?$c().isShadowRoot(e)?this.findTestabilityInTree(t,e.host,!0):this.findTestabilityInTree(t,e.parentElement,!0):null)}},deps:[]},{provide:xN,useClass:_T,deps:[gt,vT,Hw]},{provide:_T,useClass:_T,deps:[gt,vT,Hw]}],FB=[{provide:Iv,useValue:"root"},{provide:cl,useFactory:function O7(){return new cl},deps:[]},{provide:oM,useClass:T7,multi:!0,deps:[qt,gt,fT]},{provide:oM,useClass:k7,multi:!0,deps:[qt]},{provide:lM,useClass:lM,deps:[aM,Cy,cm,CB]},{provide:Gl,useExisting:lM},{provide:xB,useExisting:Cy},{provide:Cy,useClass:Cy,deps:[qt]},{provide:aM,useClass:aM,deps:[oM,gt]},{provide:class HY{},useClass:x7,deps:[]},[]];let LB=(()=>{class i{constructor(e){}static withServerTransition(e){return{ngModule:i,providers:[{provide:cm,useValue:e.appId},{provide:yB,useExisting:cm},y7]}}}return i.\u0275fac=function(e){return new(e||i)(ee(PB,12))},i.\u0275mod=en({type:i}),i.\u0275inj=Wt({providers:[...FB,...OB],imports:[co,_9]}),i})(),NB=(()=>{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)(ee(qt))},i.\u0275prov=Pe({token:i,factory:function(e){let n=null;return n=e?new e:function B7(){return new NB(ee(qt))}(),n},providedIn:"root"}),i})();typeof window<"u"&&window;let QT=(()=>{class i{}return i.\u0275fac=function(e){return new(e||i)},i.\u0275prov=Pe({token:i,factory:function(e){let n=null;return n=e?new(e||i):ee(VB),n},providedIn:"root"}),i})(),VB=(()=>{class i extends QT{constructor(e){super(),this._doc=e}sanitize(e,n){if(null==n)return null;switch(e){case Zn.NONE:return n;case Zn.HTML:return Ea(n,"HTML")?to(n):Qx(this._doc,String(n)).toString();case Zn.STYLE:return Ea(n,"Style")?to(n):n;case Zn.SCRIPT:if(Ea(n,"Script"))return to(n);throw new Error("unsafe value used in a script context");case Zn.URL:return Ea(n,"URL")?to(n):xh(String(n));case Zn.RESOURCE_URL:if(Ea(n,"ResourceURL"))return to(n);throw new Error(`unsafe value used in a resource URL context (see ${qu})`);default:throw new Error(`Unexpected SecurityContext ${e} (see ${qu})`)}}bypassSecurityTrustHtml(e){return function h1(i){return new a1(i)}(e)}bypassSecurityTrustStyle(e){return function f1(i){return new l1(i)}(e)}bypassSecurityTrustScript(e){return function p1(i){return new c1(i)}(e)}bypassSecurityTrustUrl(e){return function m1(i){return new d1(i)}(e)}bypassSecurityTrustResourceUrl(e){return function g1(i){return new Op(i)}(e)}}return i.\u0275fac=function(e){return new(e||i)(ee(qt))},i.\u0275prov=Pe({token:i,factory:function(e){let n=null;return n=e?new e:function $7(i){return new VB(i.get(qt))}(ee(Gi)),n},providedIn:"root"}),i})();function mt(...i){return Ni(i,Gu(i))}class Qe extends Te{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 fm=z(i=>function(){i(this),this.name="EmptyError",this.message="no elements in sequence"}),{isArray:G7}=Array,{getPrototypeOf:W7,prototype:j7,keys:Y7}=Object;function zB(i){if(1===i.length){const t=i[0];if(G7(t))return{args:t,keys:null};if(function q7(i){return i&&"object"==typeof i&&W7(i)===j7}(t)){const e=Y7(t);return{args:e.map(n=>t[n]),keys:e}}}return{args:i,keys:null}}const{isArray:X7}=Array;function JT(i){return tt(t=>function K7(i,t){return X7(t)?i(...t):i(t)}(i,t))}function HB(i,t){return i.reduce((e,n,r)=>(e[n]=t[r],e),{})}function Ra(...i){const t=Gu(i),e=M0(i),{args:n,keys:r}=zB(i);if(0===n.length)return Ni([],t);const s=new In(function Z7(i,t,e=ja){return n=>{$B(t,()=>{const{length:r}=i,s=new Array(r);let o=r,a=r;for(let l=0;l{const c=Ni(i[l],t);let d=!1;c.subscribe(qn(n,h=>{s[l]=h,d||(d=!0,a--),a||n.next(e(s.slice()))},()=>{--o||n.complete()}))},n)},n)}}(n,t,r?o=>HB(r,o):ja));return e?s.pipe(JT(e)):s}function $B(i,t,e){i?Xa(e,i,t):t()}function Sy(...i){return function Q7(){return bd(1)}()(Ni(i,Gu(i)))}function Ey(i){return new In(t=>{Mr(i()).subscribe(t)})}function pm(i,t){const e=dn(i)?i:()=>i,n=r=>r.error(e());return new In(t?r=>t.schedule(n,0,r):n)}function eI(){return ni((i,t)=>{let e=null;i._refCount++;const n=qn(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 GB extends In{constructor(t,e){super(),this.source=t,this.subjectFactory=e,this._subject=null,this._refCount=0,this._connection=null,d0(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 Qt;const e=this.getSubject();t.add(this.source.subscribe(qn(e,void 0,()=>{this._teardown(),e.complete()},n=>{this._teardown(),e.error(n)},()=>this._teardown()))),t.closed&&(this._connection=null,t=Qt.EMPTY)}return t}refCount(){return eI()(this)}}function ks(i,t){return ni((e,n)=>{let r=null,s=0,o=!1;const a=()=>o&&!r&&n.complete();e.subscribe(qn(n,l=>{r?.unsubscribe();let c=0;const d=s++;Mr(i(l,d)).subscribe(r=qn(n,h=>n.next(t?t(l,h,d,c++):h),()=>{r=null,a()}))},()=>{o=!0,a()}))})}function Oi(i){return i<=0?()=>_o:ni((t,e)=>{let n=0;t.subscribe(qn(e,r=>{++n<=i&&(e.next(r),i<=n&&e.complete())}))})}function Do(...i){const t=Gu(i);return ni((e,n)=>{(t?Sy(i,e,t):Sy(i,e)).subscribe(n)})}function gn(i,t){return ni((e,n)=>{let r=0;e.subscribe(qn(n,s=>i.call(t,s,r++)&&n.next(s)))})}function cM(i){return ni((t,e)=>{let n=!1;t.subscribe(qn(e,r=>{n=!0,e.next(r)},()=>{n||e.next(i),e.complete()}))})}function WB(i=J7){return ni((t,e)=>{let n=!1;t.subscribe(qn(e,r=>{n=!0,e.next(r)},()=>n?e.complete():e.error(i())))})}function J7(){return new fm}function iu(i,t){const e=arguments.length>=2;return n=>n.pipe(i?gn((r,s)=>i(r,s,n)):ja,Oi(1),e?cM(t):WB(()=>new fm))}function ru(i,t){return dn(t)?rr(i,t,1):rr(i,1)}function Vi(i,t,e){const n=dn(i)||t||e?{next:i,error:t,complete:e}:i;return n?ni((r,s)=>{var o;null===(o=n.subscribe)||void 0===o||o.call(n);let a=!0;r.subscribe(qn(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)}))}):ja}function jc(i){return ni((t,e)=>{let s,n=null,r=!1;n=t.subscribe(qn(e,void 0,void 0,o=>{s=Mr(i(o,jc(i)(t))),n?(n.unsubscribe(),n=null,s.subscribe(e)):r=!0})),r&&(n.unsubscribe(),n=null,s.subscribe(e))})}function tI(i,t){return ni(function eq(i,t,e,n,r){return(s,o)=>{let a=e,l=t,c=0;s.subscribe(qn(o,d=>{const h=c++;l=a?i(l,d,h):(a=!0,d),n&&o.next(l)},r&&(()=>{a&&o.next(l),o.complete()})))}}(i,t,arguments.length>=2,!0))}function nI(i){return i<=0?()=>_o:ni((t,e)=>{let n=[];t.subscribe(qn(e,r=>{n.push(r),i{for(const r of n)e.next(r);e.complete()},void 0,()=>{n=null}))})}function jB(i,t){const e=arguments.length>=2;return n=>n.pipe(i?gn((r,s)=>i(r,s,n)):ja,nI(1),e?cM(t):WB(()=>new fm))}function YB(i,t=!1){return ni((e,n)=>{let r=0;e.subscribe(qn(n,s=>{const o=i(s,r++);(o||t)&&n.next(s),!o&&n.complete()}))})}function qB(i){return tt(()=>i)}function su(i){return ni((t,e)=>{try{t.subscribe(e)}finally{e.add(i)}})}const _n="primary",Ay=Symbol("RouteTitle");class tq{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 tq(i)}function nq(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 KB(i){return Array.prototype.concat.apply([],i)}function ZB(i){return i.length>0?i[i.length-1]:null}function os(i,t){for(const e in i)i.hasOwnProperty(e)&&t(i[e],e)}function ou(i){return LD(i)?i:oy(i)?Ni(Promise.resolve(i)):mt(i)}const dM=!1,rq={exact:function e3(i,t,e){if(!kh(i.segments,t.segments)||!uM(i.segments,t.segments,e)||i.numberOfChildren!==t.numberOfChildren)return!1;for(const n in t.children)if(!i.children[n]||!e3(i.children[n],t.children[n],e))return!1;return!0},subset:t3},QB={exact:function sq(i,t){return Kl(i,t)},subset:function oq(i,t){return Object.keys(t).length<=Object.keys(i).length&&Object.keys(t).every(e=>XB(i[e],t[e]))},ignored:()=>!0};function JB(i,t,e){return rq[e.paths](i.root,t.root,e.matrixParams)&&QB[e.queryParams](i.queryParams,t.queryParams)&&!("exact"===e.fragment&&i.fragment!==t.fragment)}function t3(i,t,e){return n3(i,t,t.segments,e)}function n3(i,t,e,n){if(i.segments.length>e.length){const r=i.segments.slice(0,e.length);return!(!kh(r,e)||t.hasChildren()||!uM(r,e,n))}if(i.segments.length===e.length){if(!kh(i.segments,e)||!uM(i.segments,e,n))return!1;for(const r in t.children)if(!i.children[r]||!t3(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!!(kh(i.segments,r)&&uM(i.segments,r,n)&&i.children[_n])&&n3(i.children[_n],t,s,n)}}function uM(i,t,e){return t.every((n,r)=>QB[e](i[r].parameters,n.parameters))}class au{constructor(t=new Tn([],{}),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 cq.serialize(this)}}class Tn{constructor(t,e){this.segments=t,this.children=e,this.parent=null,os(e,(n,r)=>n.parent=this)}hasChildren(){return this.numberOfChildren>0}get numberOfChildren(){return Object.keys(this.children).length}toString(){return hM(this)}}class Dy{constructor(t,e){this.path=t,this.parameters=e}get parameterMap(){return this._parameterMap||(this._parameterMap=mm(this.parameters)),this._parameterMap}toString(){return o3(this)}}function kh(i,t){return i.length===t.length&&i.every((e,n)=>e.path===t[n].path)}let Ty=(()=>{class i{}return i.\u0275fac=function(e){return new(e||i)},i.\u0275prov=Pe({token:i,factory:function(){return new iI},providedIn:"root"}),i})();class iI{parse(t){const e=new vq(t);return new au(e.parseRootSegment(),e.parseQueryParams(),e.parseFragment())}serialize(t){const e=`/${Iy(t.root,!0)}`,n=function hq(i){const t=Object.keys(i).map(e=>{const n=i[e];return Array.isArray(n)?n.map(r=>`${fM(e)}=${fM(r)}`).join("&"):`${fM(e)}=${fM(n)}`}).filter(e=>!!e);return t.length?`?${t.join("&")}`:""}(t.queryParams);return`${e}${n}${"string"==typeof t.fragment?`#${function dq(i){return encodeURI(i)}(t.fragment)}`:""}`}}const cq=new iI;function hM(i){return i.segments.map(t=>o3(t)).join("/")}function Iy(i,t){if(!i.hasChildren())return hM(i);if(t){const e=i.children[_n]?Iy(i.children[_n],!1):"",n=[];return os(i.children,(r,s)=>{s!==_n&&n.push(`${s}:${Iy(r,!1)}`)}),n.length>0?`${e}(${n.join("//")})`:e}{const e=function lq(i,t){let e=[];return os(i.children,(n,r)=>{r===_n&&(e=e.concat(t(n,r)))}),os(i.children,(n,r)=>{r!==_n&&(e=e.concat(t(n,r)))}),e}(i,(n,r)=>r===_n?[Iy(i.children[_n],!1)]:[`${r}:${Iy(n,!1)}`]);return 1===Object.keys(i.children).length&&null!=i.children[_n]?`${hM(i)}/${e[0]}`:`${hM(i)}/(${e.join("//")})`}}function r3(i){return encodeURIComponent(i).replace(/%40/g,"@").replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",")}function fM(i){return r3(i).replace(/%3B/gi,";")}function rI(i){return r3(i).replace(/\(/g,"%28").replace(/\)/g,"%29").replace(/%26/gi,"&")}function pM(i){return decodeURIComponent(i)}function s3(i){return pM(i.replace(/\+/g,"%20"))}function o3(i){return`${rI(i.path)}${function uq(i){return Object.keys(i).map(t=>`;${rI(t)}=${rI(i[t])}`).join("")}(i.parameters)}`}const fq=/^[^\/()?;=#]+/;function mM(i){const t=i.match(fq);return t?t[0]:""}const pq=/^[^=?&#]+/,gq=/^[^&#]+/;class vq{constructor(t){this.url=t,this.remaining=t}parseRootSegment(){return this.consumeOptional("/"),""===this.remaining||this.peekStartsWith("?")||this.peekStartsWith("#")?new Tn([],{}):new Tn([],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[_n]=new Tn(t,e)),n}parseSegment(){const t=mM(this.remaining);if(""===t&&this.peekStartsWith(";"))throw new pe(4009,dM);return this.capture(t),new Dy(pM(t),this.parseMatrixParams())}parseMatrixParams(){const t={};for(;this.consumeOptional(";");)this.parseParam(t);return t}parseParam(t){const e=mM(this.remaining);if(!e)return;this.capture(e);let n="";if(this.consumeOptional("=")){const r=mM(this.remaining);r&&(n=r,this.capture(n))}t[pM(e)]=pM(n)}parseQueryParam(t){const e=function mq(i){const t=i.match(pq);return t?t[0]:""}(this.remaining);if(!e)return;this.capture(e);let n="";if(this.consumeOptional("=")){const o=function _q(i){const t=i.match(gq);return t?t[0]:""}(this.remaining);o&&(n=o,this.capture(n))}const r=s3(e),s=s3(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=mM(this.remaining),r=this.remaining[n.length];if("/"!==r&&")"!==r&&";"!==r)throw new pe(4010,dM);let s;n.indexOf(":")>-1?(s=n.slice(0,n.indexOf(":")),this.capture(s),this.capture(":")):t&&(s=_n);const o=this.parseChildren();e[s]=1===Object.keys(o).length?o[_n]:new Tn([],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 pe(4011,dM)}}function sI(i){return i.segments.length>0?new Tn([],{[_n]:i}):i}function gM(i){const t={};for(const n of Object.keys(i.children)){const s=gM(i.children[n]);(s.segments.length>0||s.hasChildren())&&(t[n]=s)}return function yq(i){if(1===i.numberOfChildren&&i.children[_n]){const t=i.children[_n];return new Tn(i.segments.concat(t.segments),t.children)}return i}(new Tn(i.segments,t))}function Ph(i){return i instanceof au}const oI=!1;function bq(i,t,e,n,r){if(0===e.length)return gm(t.root,t.root,t.root,n,r);const s=function u3(i){if("string"==typeof i[0]&&1===i.length&&"/"===i[0])return new d3(!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 os(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 d3(e,t,n)}(e);return s.toRoot()?gm(t.root,t.root,new Tn([],{}),n,r):function o(l){const c=function wq(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 h3(i,t,e){let n=i,r=t,s=e;for(;s>r;){if(s-=r,n=n.parent,!n)throw new pe(4005,oI&&"Invalid number of '../'");r=n.segments.length}return new _m(n,!1,r-s)}(e,n+(Ry(i.commands[0])?0:1),i.numberOfDoubleDots)}(s,t,i.snapshot?._urlSegment,l),d=c.processChildren?vm(c.segmentGroup,c.index,s.commands):aI(c.segmentGroup,c.index,s.commands);return gm(t.root,c.segmentGroup,d,n,r)}(i.snapshot?._lastPathIndex)}function Ry(i){return"object"==typeof i&&null!=i&&!i.outlets&&!i.segmentPath}function ky(i){return"object"==typeof i&&null!=i&&i.outlets}function gm(i,t,e,n,r){let o,s={};n&&os(n,(l,c)=>{s[c]=Array.isArray(l)?l.map(d=>`${d}`):`${l}`}),o=i===t?e:c3(i,t,e);const a=sI(gM(o));return new au(a,s,r)}function c3(i,t,e){const n={};return os(i.children,(r,s)=>{n[s]=r===t?e:c3(r,t,e)}),new Tn(i.segments,n)}class d3{constructor(t,e,n){if(this.isAbsolute=t,this.numberOfDoubleDots=e,this.commands=n,t&&n.length>0&&Ry(n[0]))throw new pe(4003,oI&&"Root segment cannot have matrix parameters");const r=n.find(ky);if(r&&r!==ZB(n))throw new pe(4004,oI&&"{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 aI(i,t,e){if(i||(i=new Tn([],{})),0===i.segments.length&&i.hasChildren())return vm(i,t,e);const n=function Cq(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(ky(a))break;const l=`${a}`,c=n0&&void 0===l)break;if(l&&c&&"object"==typeof c&&void 0===c.outlets){if(!p3(l,c,o))return s;n+=2}else{if(!p3(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]=aI(i.children[o],t,s))}),os(i.children,(s,o)=>{void 0===n[o]&&(r[o]=s)}),new Tn(i.segments,r)}}function lI(i,t,e){const n=i.segments.slice(0,t);let r=0;for(;r{"string"==typeof e&&(e=[e]),null!==e&&(t[n]=lI(new Tn([],{}),0,e))}),t}function f3(i){const t={};return os(i,(e,n)=>t[n]=`${e}`),t}function p3(i,t,e){return i==e.path&&Kl(t,e.parameters)}const Py="imperative";class Zl{constructor(t,e){this.id=t,this.url=e}}class cI extends Zl{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 Oh extends Zl{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 _M extends Zl{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 vM extends Zl{constructor(t,e,n,r){super(t,e),this.reason=n,this.code=r,this.type=16}}class dI extends Zl{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 Eq extends Zl{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 Aq extends Zl{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 Dq extends Zl{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 Tq extends Zl{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 Iq extends Zl{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 Rq{constructor(t){this.route=t,this.type=9}toString(){return`RouteConfigLoadStart(path: ${this.route.path})`}}class kq{constructor(t){this.route=t,this.type=10}toString(){return`RouteConfigLoadEnd(path: ${this.route.path})`}}class Pq{constructor(t){this.snapshot=t,this.type=11}toString(){return`ChildActivationStart(path: '${this.snapshot.routeConfig&&this.snapshot.routeConfig.path||""}')`}}class Oq{constructor(t){this.snapshot=t,this.type=12}toString(){return`ChildActivationEnd(path: '${this.snapshot.routeConfig&&this.snapshot.routeConfig.path||""}')`}}class Fq{constructor(t){this.snapshot=t,this.type=13}toString(){return`ActivationStart(path: '${this.snapshot.routeConfig&&this.snapshot.routeConfig.path||""}')`}}class Lq{constructor(t){this.snapshot=t,this.type=14}toString(){return`ActivationEnd(path: '${this.snapshot.routeConfig&&this.snapshot.routeConfig.path||""}')`}}class m3{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 Uq=(()=>{class i{createUrlTree(e,n,r,s,o,a){return bq(e||n.root,r,s,o,a)}}return i.\u0275fac=function(e){return new(e||i)},i.\u0275prov=Pe({token:i,factory:i.\u0275fac}),i})(),zq=(()=>{class i{}return i.\u0275fac=function(e){return new(e||i)},i.\u0275prov=Pe({token:i,factory:function(t){return Uq.\u0275fac(t)},providedIn:"root"}),i})();class g3{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=uI(t,this._root);return e?e.children.map(n=>n.value):[]}firstChild(t){const e=uI(t,this._root);return e&&e.children.length>0?e.children[0].value:null}siblings(t){const e=hI(t,this._root);return e.length<2?[]:e[e.length-2].children.map(r=>r.value).filter(r=>r!==t)}pathFromRoot(t){return hI(t,this._root).map(e=>e.value)}}function uI(i,t){if(i===t.value)return t;for(const e of t.children){const n=uI(i,e);if(n)return n}return null}function hI(i,t){if(i===t.value)return[t];for(const e of t.children){const n=hI(i,e);if(n.length)return n.unshift(t),n}return[]}class Yc{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 _3 extends g3{constructor(t,e){super(t),this.snapshot=e,fI(this,t)}toString(){return this.snapshot.toString()}}function v3(i,t){const e=function Hq(i,t){const o=new yM([],{},{},"",{},_n,t,null,i.root,-1,{});return new b3("",new Yc(o,[]))}(i,t),n=new Qe([new Dy("",{})]),r=new Qe({}),s=new Qe({}),o=new Qe({}),a=new Qe(""),l=new bm(n,r,o,a,s,_n,t,e.root);return l.snapshot=e.root,new _3(new Yc(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(tt(c=>c[Ay]))??mt(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(tt(t=>mm(t)))),this._paramMap}get queryParamMap(){return this._queryParamMap||(this._queryParamMap=this.queryParams.pipe(tt(t=>mm(t)))),this._queryParamMap}toString(){return this.snapshot?this.snapshot.toString():`Future(${this._futureSnapshot})`}}function y3(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 $q(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 yM{get title(){return this.data?.[Ay]}constructor(t,e,n,r,s,o,a,l,c,d,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=d,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 b3 extends g3{constructor(t,e){super(e),this.url=t,fI(this,e)}toString(){return x3(this._root)}}function fI(i,t){t.value._routerState=i,t.children.forEach(e=>fI(i,e))}function x3(i){const t=i.children.length>0?` { ${i.children.map(x3).join(", ")} } `:"";return`${i.value}${t}`}function pI(i){if(i.snapshot){const t=i.snapshot,e=i._futureSnapshot;i.snapshot=e,Kl(t.queryParams,e.queryParams)||i.queryParams.next(e.queryParams),t.fragment!==e.fragment&&i.fragment.next(e.fragment),Kl(t.params,e.params)||i.params.next(e.params),function iq(i,t){if(i.length!==t.length)return!1;for(let e=0;eKl(e.parameters,t[n].parameters))}(i.url,t.url);return e&&!(!i.parent!=!t.parent)&&(!i.parent||mI(i.parent,t.parent))}function Oy(i,t,e){if(e&&i.shouldReuseRoute(t.value,e.value.snapshot)){const n=e.value;n._futureSnapshot=t.value;const r=function Wq(i,t,e){return t.children.map(n=>{for(const r of e.children)if(i.shouldReuseRoute(n.value,r.value.snapshot))return Oy(i,n,r);return Oy(i,n)})}(i,t,e);return new Yc(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=>Oy(i,a)),o}}const n=function jq(i){return new bm(new Qe(i.url),new Qe(i.params),new Qe(i.queryParams),new Qe(i.fragment),new Qe(i.data),i.outlet,i.component,i)}(t.value),r=t.children.map(s=>Oy(i,s));return new Yc(n,r)}}const gI="ngNavigationCancelingError";function w3(i,t){const{redirectTo:e,navigationBehaviorOptions:n}=Ph(t)?{redirectTo:t,navigationBehaviorOptions:void 0}:t,r=M3(!1,0,t);return r.url=e,r.navigationBehaviorOptions=n,r}function M3(i,t,e){const n=new Error("NavigationCancelingError: "+(i||""));return n[gI]=!0,n.cancellationCode=t,e&&(n.url=e),n}function C3(i){return S3(i)&&Ph(i.url)}function S3(i){return i&&i[gI]}class Yq{constructor(){this.outlet=null,this.route=null,this.resolver=null,this.injector=null,this.children=new Fy,this.attachRef=null}}let Fy=(()=>{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 Yq,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=Pe({token:i,factory:i.\u0275fac,providedIn:"root"}),i})();const bM=!1;let E3=(()=>{class i{constructor(){this.activated=null,this._activatedRoute=null,this.name=_n,this.activateEvents=new $e,this.deactivateEvents=new $e,this.attachEvents=new $e,this.detachEvents=new $e,this.parentContexts=Lt(Fy),this.location=Lt(jr),this.changeDetector=Lt(Qn),this.environmentInjector=Lt(io)}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 pe(4012,bM);return this.activated.instance}get activatedRoute(){if(!this.activated)throw new pe(4012,bM);return this._activatedRoute}get activatedRouteData(){return this._activatedRoute?this._activatedRoute.snapshot.data:{}}detach(){if(!this.activated)throw new pe(4012,bM);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 pe(4013,bM);this._activatedRoute=e;const r=this.location,o=e.snapshot.component,a=this.parentContexts.getOrCreateContext(this.name).children,l=new qq(e,a,r.injector);if(n&&function Xq(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=ve({type:i,selectors:[["router-outlet"]],inputs:{name:"name"},outputs:{activateEvents:"activate",deactivateEvents:"deactivate",attachEvents:"attach",detachEvents:"detach"},exportAs:["outlet"],standalone:!0,features:[xi]}),i})();class qq{constructor(t,e,n){this.route=t,this.childContexts=e,this.parent=n}get(t,e){return t===bm?this.route:t===Fy?this.childContexts:this.parent.get(t,e)}}let _I=(()=>{class i{}return i.\u0275fac=function(e){return new(e||i)},i.\u0275cmp=ot({type:i,selectors:[["ng-component"]],standalone:!0,features:[ZD],decls:1,vars:0,template:function(e,n){1&e&&Ie(0,"router-outlet")},dependencies:[E3],encapsulation:2}),i})();function A3(i,t){return i.providers&&!i._injector&&(i._injector=Lw(i.providers,t,`Route: ${i.path}`)),i._injector??t}function yI(i){const t=i.children&&i.children.map(yI),e=t?{...i,children:t}:{...i};return!e.component&&!e.loadComponent&&(t||e.loadChildren)&&e.outlet&&e.outlet!==_n&&(e.component=_I),e}function ka(i){return i.outlet||_n}function D3(i,t){const e=i.filter(n=>ka(n)===t);return e.push(...i.filter(n=>ka(n)!==t)),e}function Ly(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 eX{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),pI(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]}),os(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 Lq(s.value.snapshot))}),t.children.length&&this.forwardEvent(new Oq(t.value.snapshot))}activateRoutes(t,e,n){const r=t.value,s=e?e.value:null;if(pI(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),pI(a.route.value),this.activateChildRoutes(t,null,o.children)}else{const a=Ly(r.snapshot),l=a?.get($l)??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 T3{constructor(t){this.path=t,this.route=this.path[this.path.length-1]}}class xM{constructor(t,e){this.component=t,this.route=e}}function tX(i,t,e){const n=i._root;return Ny(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 Sr(i){return null!==Gf(i)}(i)?t.get(i):i:n}function Ny(i,t,e,n,r={canDeactivateChecks:[],canActivateChecks:[]}){const s=ym(t);return i.children.forEach(o=>{(function iX(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 rX(i,t,e){if("function"==typeof e)return e(i,t);switch(e){case"pathParamsChange":return!kh(i.url,t.url);case"pathParamsOrQueryParamsChange":return!kh(i.url,t.url)||!Kl(i.queryParams,t.queryParams);case"always":return!0;case"paramsOrQueryParamsChange":return!mI(i,t)||!Kl(i.queryParams,t.queryParams);default:return!mI(i,t)}}(o,s,s.routeConfig.runGuardsAndResolvers);l?r.canActivateChecks.push(new T3(n)):(s.data=o.data,s._resolvedData=o._resolvedData),Ny(i,t,s.component?a?a.children:null:e,n,r),l&&a&&a.outlet&&a.outlet.isActivated&&r.canDeactivateChecks.push(new xM(a.outlet.component,o))}else o&&By(t,a,r),r.canActivateChecks.push(new T3(n)),Ny(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]}),os(s,(o,a)=>By(o,e.getContext(a),r)),r}function By(i,t,e){const n=ym(i),r=i.value;os(n,(s,o)=>{By(s,r.component?t?t.children.getContext(o):null:t,e)}),e.canDeactivateChecks.push(new xM(r.component&&t&&t.outlet&&t.outlet.isActivated?t.outlet.component:null,r))}function Uy(i){return"function"==typeof i}function bI(i){return i instanceof fm||"EmptyError"===i?.name}const wM=Symbol("INITIAL_VALUE");function wm(){return ks(i=>Ra(i.map(t=>t.pipe(Oi(1),Do(wM)))).pipe(tt(t=>{for(const e of t)if(!0!==e){if(e===wM)return wM;if(!1===e||e instanceof au)return e}return!0}),gn(t=>t!==wM),Oi(1)))}function I3(i){return function CE(...i){return l0(i)}(Vi(t=>{if(Ph(t))throw w3(0,t)}),tt(t=>!0===t))}const xI={matched:!1,consumedSegments:[],remainingSegments:[],parameters:{},positionalParamSegments:{}};function R3(i,t,e,n,r){const s=wI(i,t,e);return s.matched?function xX(i,t,e,n){const r=t.canMatch;return r&&0!==r.length?mt(r.map(o=>{const a=xm(o,i);return ou(function dX(i){return i&&Uy(i.canMatch)}(a)?a.canMatch(t,e):i.runInContext(()=>a(t,e)))})).pipe(wm(),I3()):mt(!0)}(n=A3(t,n),t,e).pipe(tt(o=>!0===o?s:{...xI})):mt(s)}function wI(i,t,e){if(""===t.path)return"full"===t.pathMatch&&(i.hasChildren()||e.length>0)?{...xI}:{matched:!0,consumedSegments:[],remainingSegments:e,parameters:{},positionalParamSegments:{}};const r=(t.matcher||nq)(e,i,t);if(!r)return{...xI};const s={};os(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 MM(i,t,e,n){if(e.length>0&&function CX(i,t,e){return e.some(n=>CM(i,t,n)&&ka(n)!==_n)}(i,e,n)){const s=new Tn(t,function MX(i,t,e,n){const r={};r[_n]=n,n._sourceSegment=i,n._segmentIndexShift=t.length;for(const s of e)if(""===s.path&&ka(s)!==_n){const o=new Tn([],{});o._sourceSegment=i,o._segmentIndexShift=t.length,r[ka(s)]=o}return r}(i,t,n,new Tn(e,i.children)));return s._sourceSegment=i,s._segmentIndexShift=t.length,{segmentGroup:s,slicedSegments:[]}}if(0===e.length&&function SX(i,t,e){return e.some(n=>CM(i,t,n))}(i,e,n)){const s=new Tn(i.segments,function wX(i,t,e,n,r){const s={};for(const o of n)if(CM(i,e,o)&&!r[ka(o)]){const a=new Tn([],{});a._sourceSegment=i,a._segmentIndexShift=t.length,s[ka(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 Tn(i.segments,i.children);return r._sourceSegment=i,r._segmentIndexShift=t.length,{segmentGroup:r,slicedSegments:e}}function CM(i,t,e){return(!(i.hasChildren()||t.length>0)||"full"!==e.pathMatch)&&""===e.path}function k3(i,t,e,n){return!!(ka(i)===n||n!==_n&&CM(t,e,i))&&("**"===i.path||wI(t,i,e).matched)}function P3(i,t,e){return 0===t.length&&!i.children[e]}const SM=!1;class EM{constructor(t){this.segmentGroup=t||null}}class O3{constructor(t){this.urlTree=t}}function Vy(i){return pm(new EM(i))}function F3(i){return pm(new O3(i))}class TX{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=MM(this.urlTree.root,[],[],this.config).segmentGroup,e=new Tn(t.segments,t.children);return this.expandSegmentGroup(this.injector,this.config,e,_n).pipe(tt(s=>this.createUrlTree(gM(s),this.urlTree.queryParams,this.urlTree.fragment))).pipe(jc(s=>{if(s instanceof O3)return this.allowRedirects=!1,this.match(s.urlTree);throw s instanceof EM?this.noMatchError(s):s}))}match(t){return this.expandSegmentGroup(this.injector,this.config,t.root,_n).pipe(tt(r=>this.createUrlTree(gM(r),t.queryParams,t.fragment))).pipe(jc(r=>{throw r instanceof EM?this.noMatchError(r):r}))}noMatchError(t){return new pe(4002,SM)}createUrlTree(t,e,n){const r=sI(t);return new au(r,e,n)}expandSegmentGroup(t,e,n,r){return 0===n.segments.length&&n.hasChildren()?this.expandChildren(t,e,n).pipe(tt(s=>new Tn([],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 Ni(r).pipe(ru(s=>{const o=n.children[s],a=D3(e,s);return this.expandSegmentGroup(t,a,o,s).pipe(tt(l=>({segment:l,outlet:s})))}),tI((s,o)=>(s[o.outlet]=o.segment,s),{}),jB())}expandSegment(t,e,n,r,s,o){return Ni(n).pipe(ru(a=>this.expandSegmentAgainstRoute(t,e,n,a,r,s,o).pipe(jc(c=>{if(c instanceof EM)return mt(null);throw c}))),iu(a=>!!a),jc((a,l)=>{if(bI(a))return P3(e,r,s)?mt(new Tn([],{})):Vy(e);throw a}))}expandSegmentAgainstRoute(t,e,n,r,s,o,a){return k3(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):Vy(e):Vy(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("/")?F3(s):this.lineralizeSegments(n,s).pipe(rr(o=>{const a=new Tn(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:d}=wI(e,r,s);if(!a)return Vy(e);const h=this.applyRedirectCommands(l,r.redirectTo,d);return r.redirectTo.startsWith("/")?F3(h):this.lineralizeSegments(r,h).pipe(rr(p=>this.expandSegment(t,e,n,p.concat(c),o,!1)))}matchSegmentAgainstRoute(t,e,n,r,s){return"**"===n.path?(t=A3(n,t),n.loadChildren?(n._loadedRoutes?mt({routes:n._loadedRoutes,injector:n._loadedInjector}):this.configLoader.loadChildren(t,n)).pipe(tt(a=>(n._loadedRoutes=a.routes,n._loadedInjector=a.injector,new Tn(r,{})))):mt(new Tn(r,{}))):R3(e,n,r,t).pipe(ks(({matched:o,consumedSegments:a,remainingSegments:l})=>o?this.getChildConfig(t=n._injector??t,n,r).pipe(rr(d=>{const h=d.injector??t,p=d.routes,{segmentGroup:m,slicedSegments:g}=MM(e,a,l,p),b=new Tn(m.segments,m.children);if(0===g.length&&b.hasChildren())return this.expandChildren(h,p,b).pipe(tt(x=>new Tn(a,x)));if(0===p.length&&0===g.length)return mt(new Tn(a,{}));const v=ka(n)===s;return this.expandSegment(h,b,p,g,v?_n:s,!0).pipe(tt(M=>new Tn(a.concat(M.segments),M.children)))})):Vy(e)))}getChildConfig(t,e,n){return e.children?mt({routes:e.children,injector:t}):e.loadChildren?void 0!==e._loadedRoutes?mt({routes:e._loadedRoutes,injector:e._loadedInjector}):function bX(i,t,e,n){const r=t.canLoad;return void 0===r||0===r.length?mt(!0):mt(r.map(o=>{const a=xm(o,i);return ou(function oX(i){return i&&Uy(i.canLoad)}(a)?a.canLoad(t,e):i.runInContext(()=>a(t,e)))})).pipe(wm(),I3())}(t,e,n).pipe(rr(r=>r?this.configLoader.loadChildren(t,e).pipe(Vi(s=>{e._loadedRoutes=s.routes,e._loadedInjector=s.injector})):function AX(i){return pm(M3(SM,3))}())):mt({routes:[],injector:t})}lineralizeSegments(t,e){let n=[],r=e.root;for(;;){if(n=n.concat(r.segments),0===r.numberOfChildren)return mt(n);if(r.numberOfChildren>1||!r.children[_n])return t.redirectTo,pm(new pe(4e3,SM));r=r.children[_n]}}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 au(s,this.createQueryParams(e.queryParams,this.urlTree.queryParams),e.fragment)}createQueryParams(t,e){const n={};return os(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 os(e.children,(a,l)=>{o[l]=this.createSegmentGroup(t,a,n,r)}),new Tn(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 pe(4001,SM);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 RX{}class OX{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=MM(this.urlTree.root,[],[],this.config.filter(e=>void 0===e.redirectTo)).segmentGroup;return this.processSegmentGroup(this.injector,this.config,t,_n).pipe(tt(e=>{if(null===e)return null;const n=new yM([],Object.freeze({}),Object.freeze({...this.urlTree.queryParams}),this.urlTree.fragment,{},_n,this.rootComponentType,null,this.urlTree.root,-1,{}),r=new Yc(n,e),s=new b3(this.url,r);return this.inheritParamsAndData(s._root),s}))}inheritParamsAndData(t){const e=t.value,n=y3(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 Ni(Object.keys(n.children)).pipe(ru(r=>{const s=n.children[r],o=D3(e,r);return this.processSegmentGroup(t,o,s,r)}),tI((r,s)=>r&&s?(r.push(...s),r):null),YB(r=>null!==r),cM(null),jB(),tt(r=>{if(null===r)return null;const s=N3(r);return function FX(i){i.sort((t,e)=>t.value.outlet===_n?-1:e.value.outlet===_n?1:t.value.outlet.localeCompare(e.value.outlet))}(s),s}))}processSegment(t,e,n,r,s){return Ni(e).pipe(ru(o=>this.processSegmentAgainstRoute(o._injector??t,o,n,r,s)),iu(o=>!!o),jc(o=>{if(bI(o))return P3(n,r,s)?mt([]):mt(null);throw o}))}processSegmentAgainstRoute(t,e,n,r,s){if(e.redirectTo||!k3(e,n,r,s))return mt(null);let o;if("**"===e.path){const a=r.length>0?ZB(r).parameters:{},l=U3(n)+r.length;o=mt({snapshot:new yM(r,a,Object.freeze({...this.urlTree.queryParams}),this.urlTree.fragment,V3(e),ka(e),e.component??e._loadedComponent??null,e,B3(n),l,z3(e)),consumedSegments:[],remainingSegments:[]})}else o=R3(n,e,r,t).pipe(tt(({matched:a,consumedSegments:l,remainingSegments:c,parameters:d})=>{if(!a)return null;const h=U3(n)+l.length;return{snapshot:new yM(l,d,Object.freeze({...this.urlTree.queryParams}),this.urlTree.fragment,V3(e),ka(e),e.component??e._loadedComponent??null,e,B3(n),h,z3(e)),consumedSegments:l,remainingSegments:c}}));return o.pipe(ks(a=>{if(null===a)return mt(null);const{snapshot:l,consumedSegments:c,remainingSegments:d}=a;t=e._injector??t;const h=e._loadedInjector??t,p=function LX(i){return i.children?i.children:i.loadChildren?i._loadedRoutes:[]}(e),{segmentGroup:m,slicedSegments:g}=MM(n,c,d,p.filter(v=>void 0===v.redirectTo));if(0===g.length&&m.hasChildren())return this.processChildren(h,p,m).pipe(tt(v=>null===v?null:[new Yc(l,v)]));if(0===p.length&&0===g.length)return mt([new Yc(l,[])]);const b=ka(e)===s;return this.processSegment(h,p,m,g,b?_n:s).pipe(tt(v=>null===v?null:[new Yc(l,v)]))}))}}function NX(i){const t=i.value.routeConfig;return t&&""===t.path&&void 0===t.redirectTo}function N3(i){const t=[],e=new Set;for(const n of i){if(!NX(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=N3(n.children);t.push(new Yc(n.value,r))}return t.filter(n=>!e.has(n))}function B3(i){let t=i;for(;t._sourceSegment;)t=t._sourceSegment;return t}function U3(i){let t=i,e=t._segmentIndexShift??0;for(;t._sourceSegment;)t=t._sourceSegment,e+=t._segmentIndexShift??0;return e-1}function V3(i){return i.data||{}}function z3(i){return i.resolve||{}}function H3(i){return"string"==typeof i.title||null===i.title}function MI(i){return ks(t=>{const e=i(t);return e?Ni(e).pipe(tt(()=>t)):mt(t)})}const Mm=new me("ROUTES");let CI=(()=>{class i{constructor(){this.componentLoaders=new WeakMap,this.childrenLoaders=new WeakMap,this.compiler=Lt(gN)}loadComponent(e){if(this.componentLoaders.get(e))return this.componentLoaders.get(e);if(e._loadedComponent)return mt(e._loadedComponent);this.onLoadStartListener&&this.onLoadStartListener(e);const n=ou(e.loadComponent()).pipe(tt(G3),Vi(s=>{this.onLoadEndListener&&this.onLoadEndListener(e),e._loadedComponent=s}),su(()=>{this.componentLoaders.delete(e)})),r=new GB(n,()=>new Te).pipe(eI());return this.componentLoaders.set(e,r),r}loadChildren(e,n){if(this.childrenLoaders.get(n))return this.childrenLoaders.get(n);if(n._loadedRoutes)return mt({routes:n._loadedRoutes,injector:n._loadedInjector});this.onLoadStartListener&&this.onLoadStartListener(n);const s=this.loadModuleFactoryOrRoutes(n.loadChildren).pipe(tt(a=>{this.onLoadEndListener&&this.onLoadEndListener(n);let l,c,d=!1;Array.isArray(a)?c=a:(l=a.create(e).injector,c=KB(l.get(Mm,[],Ft.Self|Ft.Optional)));return{routes:c.map(yI),injector:l}}),su(()=>{this.childrenLoaders.delete(n)})),o=new GB(s,()=>new Te).pipe(eI());return this.childrenLoaders.set(n,o),o}loadModuleFactoryOrRoutes(e){return ou(e()).pipe(tt(G3),rr(n=>n instanceof T2||Array.isArray(n)?mt(n):Ni(this.compiler.compileModuleAsync(n))))}}return i.\u0275fac=function(e){return new(e||i)},i.\u0275prov=Pe({token:i,factory:i.\u0275fac,providedIn:"root"}),i})();function G3(i){return function WX(i){return i&&"object"==typeof i&&"default"in i}(i)?i.default:i}let DM=(()=>{class i{get hasRequestedNavigation(){return 0!==this.navigationId}constructor(){this.currentNavigation=null,this.lastSuccessfulNavigation=null,this.events=new Te,this.configLoader=Lt(CI),this.environmentInjector=Lt(io),this.urlSerializer=Lt(Ty),this.rootContexts=Lt(Fy),this.navigationId=0,this.afterPreactivation=()=>mt(void 0),this.rootComponentType=null,this.configLoader.onLoadEndListener=r=>this.events.next(new kq(r)),this.configLoader.onLoadStartListener=r=>this.events.next(new Rq(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 Qe({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:Py,restoredState:null,currentSnapshot:e.routerState.snapshot,targetSnapshot:null,currentRouterState:e.routerState,targetRouterState:null,guards:{canActivateChecks:[],canDeactivateChecks:[]},guardsResult:null}),this.transitions.pipe(gn(n=>0!==n.id),tt(n=>({...n,extractedUrl:e.urlHandlingStrategy.extract(n.rawUrl)})),ks(n=>{let r=!1,s=!1;return mt(n).pipe(Vi(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}}),ks(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 d="";return this.events.next(new vM(o.id,e.serializeUrl(n.rawUrl),d,0)),e.rawUrlTree=o.rawUrl,o.resolve(null),_o}if(e.urlHandlingStrategy.shouldProcessUrl(o.rawUrl))return W3(o.source)&&(e.browserUrlTree=o.extractedUrl),mt(o).pipe(ks(d=>{const h=this.transitions?.getValue();return this.events.next(new cI(d.id,this.urlSerializer.serialize(d.extractedUrl),d.source,d.restoredState)),h!==this.transitions?.getValue()?_o:Promise.resolve(d)}),function IX(i,t,e,n){return ks(r=>function DX(i,t,e,n,r){return new TX(i,t,e,n,r).apply()}(i,t,e,r.extractedUrl,n).pipe(tt(s=>({...r,urlAfterRedirects:s}))))}(this.environmentInjector,this.configLoader,this.urlSerializer,e.config),Vi(d=>{this.currentNavigation={...this.currentNavigation,finalUrl:d.urlAfterRedirects},n.urlAfterRedirects=d.urlAfterRedirects}),function UX(i,t,e,n,r){return rr(s=>function PX(i,t,e,n,r,s,o="emptyOnly"){return new OX(i,t,e,n,r,o,s).recognize().pipe(ks(a=>null===a?function kX(i){return new In(t=>t.error(i))}(new RX):mt(a)))}(i,t,e,s.urlAfterRedirects,n.serialize(s.urlAfterRedirects),n,r).pipe(tt(o=>({...s,targetSnapshot:o}))))}(this.environmentInjector,this.rootComponentType,e.config,this.urlSerializer,e.paramsInheritanceStrategy),Vi(d=>{if(n.targetSnapshot=d.targetSnapshot,"eager"===e.urlUpdateStrategy){if(!d.extras.skipLocationChange){const p=e.urlHandlingStrategy.merge(d.urlAfterRedirects,d.rawUrl);e.setBrowserUrl(p,d)}e.browserUrlTree=d.urlAfterRedirects}const h=new Eq(d.id,this.urlSerializer.serialize(d.extractedUrl),this.urlSerializer.serialize(d.urlAfterRedirects),d.targetSnapshot);this.events.next(h)}));if(l&&e.urlHandlingStrategy.shouldProcessUrl(e.rawUrlTree)){const{id:d,extractedUrl:h,source:p,restoredState:m,extras:g}=o,b=new cI(d,this.urlSerializer.serialize(h),p,m);this.events.next(b);const v=v3(h,this.rootComponentType).snapshot;return mt(n={...o,targetSnapshot:v,urlAfterRedirects:h,extras:{...g,skipLocationChange:!1,replaceUrl:!1}})}{const d="";return this.events.next(new vM(o.id,e.serializeUrl(n.extractedUrl),d,1)),e.rawUrlTree=o.rawUrl,o.resolve(null),_o}}),Vi(o=>{const a=new Aq(o.id,this.urlSerializer.serialize(o.extractedUrl),this.urlSerializer.serialize(o.urlAfterRedirects),o.targetSnapshot);this.events.next(a)}),tt(o=>n={...o,guards:tX(o.targetSnapshot,o.currentSnapshot,this.rootContexts)}),function hX(i,t){return rr(e=>{const{targetSnapshot:n,currentSnapshot:r,guards:{canActivateChecks:s,canDeactivateChecks:o}}=e;return 0===o.length&&0===s.length?mt({...e,guardsResult:!0}):function fX(i,t,e,n){return Ni(i).pipe(rr(r=>function yX(i,t,e,n,r){const s=t&&t.routeConfig?t.routeConfig.canDeactivate:null;return s&&0!==s.length?mt(s.map(a=>{const l=Ly(t)??r,c=xm(a,l);return ou(function cX(i){return i&&Uy(i.canDeactivate)}(c)?c.canDeactivate(i,t,e,n):l.runInContext(()=>c(i,t,e,n))).pipe(iu())})).pipe(wm()):mt(!0)}(r.component,r.route,e,t,n)),iu(r=>!0!==r,!0))}(o,n,r,i).pipe(rr(a=>a&&function sX(i){return"boolean"==typeof i}(a)?function pX(i,t,e,n){return Ni(t).pipe(ru(r=>Sy(function gX(i,t){return null!==i&&t&&t(new Pq(i)),mt(!0)}(r.route.parent,n),function mX(i,t){return null!==i&&t&&t(new Fq(i)),mt(!0)}(r.route,n),function vX(i,t,e){const n=t[t.length-1],s=t.slice(0,t.length-1).reverse().map(o=>function nX(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=>Ey(()=>mt(o.guards.map(l=>{const c=Ly(o.node)??e,d=xm(l,c);return ou(function lX(i){return i&&Uy(i.canActivateChild)}(d)?d.canActivateChild(n,i):c.runInContext(()=>d(n,i))).pipe(iu())})).pipe(wm())));return mt(s).pipe(wm())}(i,r.path,e),function _X(i,t,e){const n=t.routeConfig?t.routeConfig.canActivate:null;if(!n||0===n.length)return mt(!0);const r=n.map(s=>Ey(()=>{const o=Ly(t)??e,a=xm(s,o);return ou(function aX(i){return i&&Uy(i.canActivate)}(a)?a.canActivate(t,i):o.runInContext(()=>a(t,i))).pipe(iu())}));return mt(r).pipe(wm())}(i,r.route,e))),iu(r=>!0!==r,!0))}(n,s,i,t):mt(a)),tt(a=>({...e,guardsResult:a})))})}(this.environmentInjector,o=>this.events.next(o)),Vi(o=>{if(n.guardsResult=o.guardsResult,Ph(o.guardsResult))throw w3(0,o.guardsResult);const a=new Dq(o.id,this.urlSerializer.serialize(o.extractedUrl),this.urlSerializer.serialize(o.urlAfterRedirects),o.targetSnapshot,!!o.guardsResult);this.events.next(a)}),gn(o=>!!o.guardsResult||(e.restoreHistory(o),this.cancelNavigationTransition(o,"",3),!1)),MI(o=>{if(o.guards.canActivateChecks.length)return mt(o).pipe(Vi(a=>{const l=new Tq(a.id,this.urlSerializer.serialize(a.extractedUrl),this.urlSerializer.serialize(a.urlAfterRedirects),a.targetSnapshot);this.events.next(l)}),ks(a=>{let l=!1;return mt(a).pipe(function VX(i,t){return rr(e=>{const{targetSnapshot:n,guards:{canActivateChecks:r}}=e;if(!r.length)return mt(e);let s=0;return Ni(r).pipe(ru(o=>function zX(i,t,e,n){const r=i.routeConfig,s=i._resolve;return void 0!==r?.title&&!H3(r)&&(s[Ay]=r.title),function HX(i,t,e,n){const r=function $X(i){return[...Object.keys(i),...Object.getOwnPropertySymbols(i)]}(i);if(0===r.length)return mt({});const s={};return Ni(r).pipe(rr(o=>function GX(i,t,e,n){const r=Ly(t)??n,s=xm(i,r);return ou(s.resolve?s.resolve(t,e):r.runInContext(()=>s(t,e)))}(i[o],t,e,n).pipe(iu(),Vi(a=>{s[o]=a}))),nI(1),qB(s),jc(o=>bI(o)?_o:pm(o)))}(s,i,t,n).pipe(tt(o=>(i._resolvedData=o,i.data=y3(i,e).resolve,r&&H3(r)&&(i.data[Ay]=r.title),null)))}(o.route,n,i,t)),Vi(()=>s++),nI(1),rr(o=>s===r.length?mt(e):_o))})}(e.paramsInheritanceStrategy,this.environmentInjector),Vi({next:()=>l=!0,complete:()=>{l||(e.restoreHistory(a),this.cancelNavigationTransition(a,"",2))}}))}),Vi(a=>{const l=new Iq(a.id,this.urlSerializer.serialize(a.extractedUrl),this.urlSerializer.serialize(a.urlAfterRedirects),a.targetSnapshot);this.events.next(l)}))}),MI(o=>{const a=l=>{const c=[];l.routeConfig?.loadComponent&&!l.routeConfig._loadedComponent&&c.push(this.configLoader.loadComponent(l.routeConfig).pipe(Vi(d=>{l.component=d}),tt(()=>{})));for(const d of l.children)c.push(...a(d));return c};return Ra(a(o.targetSnapshot.root)).pipe(cM(),Oi(1))}),MI(()=>this.afterPreactivation()),tt(o=>{const a=function Gq(i,t,e){const n=Oy(i,t._root,e?e._root:void 0);return new _3(n,t)}(e.routeReuseStrategy,o.targetSnapshot,o.currentRouterState);return n={...o,targetRouterState:a}}),Vi(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)=>tt(n=>(new eX(t,n.targetRouterState,n.currentRouterState,e).activate(i),n)))(this.rootContexts,e.routeReuseStrategy,o=>this.events.next(o)),Oi(1),Vi({next:o=>{r=!0,this.lastSuccessfulNavigation=this.currentNavigation,e.navigated=!0,this.events.next(new Oh(o.id,this.urlSerializer.serialize(o.extractedUrl),this.urlSerializer.serialize(e.currentUrlTree))),e.titleStrategy?.updateTitle(o.targetRouterState.snapshot),o.resolve(!0)},complete:()=>{r=!0}}),su(()=>{r||s||this.cancelNavigationTransition(n,"",1),this.currentNavigation?.id===n.id&&(this.currentNavigation=null)}),jc(o=>{if(s=!0,S3(o)){C3(o)||(e.navigated=!0,e.restoreHistory(n,!0));const a=new _M(n.id,this.urlSerializer.serialize(n.extractedUrl),o.message,o.cancellationCode);if(this.events.next(a),C3(o)){const l=e.urlHandlingStrategy.merge(o.url,e.rawUrlTree),c={skipLocationChange:n.extras.skipLocationChange,replaceUrl:"eager"===e.urlUpdateStrategy||W3(n.source)};e.scheduleNavigation(l,Py,null,c,{resolve:n.resolve,reject:n.reject,promise:n.promise})}else n.resolve(!1)}else{e.restoreHistory(n,!0);const a=new dI(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 _o}))}))}cancelNavigationTransition(e,n,r){const s=new _M(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=Pe({token:i,factory:i.\u0275fac,providedIn:"root"}),i})();function W3(i){return i!==Py}let j3=(()=>{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===_n);return n}getResolvedTitleForRoute(e){return e.data[Ay]}}return i.\u0275fac=function(e){return new(e||i)},i.\u0275prov=Pe({token:i,factory:function(){return Lt(jX)},providedIn:"root"}),i})(),jX=(()=>{class i extends j3{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)(ee(NB))},i.\u0275prov=Pe({token:i,factory:i.\u0275fac,providedIn:"root"}),i})(),YX=(()=>{class i{}return i.\u0275fac=function(e){return new(e||i)},i.\u0275prov=Pe({token:i,factory:function(){return Lt(XX)},providedIn:"root"}),i})();class qX{shouldDetach(t){return!1}store(t,e){}shouldAttach(t){return!1}retrieve(t){return null}shouldReuseRoute(t,e){return t.routeConfig===e.routeConfig}}let XX=(()=>{class i extends qX{}return i.\u0275fac=function(){let t;return function(n){return(t||(t=si(i)))(n||i)}}(),i.\u0275prov=Pe({token:i,factory:i.\u0275fac,providedIn:"root"}),i})();const TM=new me("",{providedIn:"root",factory:()=>({})});let ZX=(()=>{class i{}return i.\u0275fac=function(e){return new(e||i)},i.\u0275prov=Pe({token:i,factory:function(){return Lt(QX)},providedIn:"root"}),i})(),QX=(()=>{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=Pe({token:i,factory:i.\u0275fac,providedIn:"root"}),i})();function JX(i){throw i}function eK(i,t,e){return t.parse("/")}const tK={paths:"exact",fragment:"ignored",matrixParams:"ignored",queryParams:"exact"},nK={paths:"subset",fragment:"ignored",matrixParams:"ignored",queryParams:"subset"};let Ko=(()=>{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=Lt(L6),this.isNgZoneEnabled=!1,this.options=Lt(TM,{optional:!0})||{},this.errorHandler=this.options.errorHandler||JX,this.malformedUriErrorHandler=this.options.malformedUriErrorHandler||eK,this.navigated=!1,this.lastSuccessfulId=-1,this.urlHandlingStrategy=Lt(ZX),this.routeReuseStrategy=Lt(YX),this.urlCreationStrategy=Lt(zq),this.titleStrategy=Lt(j3),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=KB(Lt(Mm,{optional:!0})??[]),this.navigationTransitions=Lt(DM),this.urlSerializer=Lt(Ty),this.location=Lt(_y),this.isNgZoneEnabled=Lt(gt)instanceof gt&>.isInAngularZone(),this.resetConfig(this.config),this.currentUrlTree=new au,this.rawUrlTree=this.currentUrlTree,this.browserUrlTree=this.currentUrlTree,this.routerState=v3(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),Py,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(yI),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 d=null;switch(a){case"merge":d={...this.currentUrlTree.queryParams,...s};break;case"preserve":d=this.currentUrlTree.queryParams;break;default:d=s||null}return null!==d&&(d=this.removeEmptyProps(d)),this.urlCreationStrategy.createUrlTree(r,this.routerState,this.currentUrlTree,e,d,c??null)}navigateByUrl(e,n={skipLocationChange:!1}){const r=Ph(e)?e:this.parseUrl(e),s=this.urlHandlingStrategy.merge(r,this.rawUrlTree);return this.scheduleNavigation(s,Py,null,n)}navigate(e,n={skipLocationChange:!1}){return function iK(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,d;return o?(a=o.resolve,l=o.reject,c=o.promise):c=new Promise((h,p)=>{a=h,l=p}),d="computed"===this.canceledNavigationResolution?r&&r.\u0275routerPageId?r.\u0275routerPageId:(this.browserPageId??0)+1:0,this.navigationTransitions.handleNavigationRequest({targetPageId:d,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=Pe({token:i,factory:i.\u0275fac,providedIn:"root"}),i})();class Y3{}let oK=(()=>{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(gn(e=>e instanceof Oh),ru(()=>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=Lw(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 Ni(r).pipe(bd())}preloadConfig(e,n){return this.preloadingStrategy.preload(n,()=>{let r;r=n.loadChildren&&void 0===n.canLoad?this.loader.loadChildren(e,n):mt(null);const s=r.pipe(rr(o=>null===o?mt(void 0):(n._loadedRoutes=o.routes,n._loadedInjector=o.injector,this.processRoutes(o.injector??e,o.routes))));return n.loadComponent&&!n._loadedComponent?Ni([s,this.loader.loadComponent(n)]).pipe(bd()):s})}}return i.\u0275fac=function(e){return new(e||i)(ee(Ko),ee(gN),ee(io),ee(Y3),ee(CI))},i.\u0275prov=Pe({token:i,factory:i.\u0275fac,providedIn:"root"}),i})();const AI=new me("");let q3=(()=>{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 cI?(this.store[this.lastId]=this.viewportScroller.getScrollPosition(),this.lastSource=e.navigationTrigger,this.restoredId=e.restoredState?e.restoredState.navigationId:0):e instanceof Oh&&(this.lastId=e.id,this.scheduleScrollEvent(e,this.urlSerializer.parse(e.urlAfterRedirects).fragment))})}consumeScrollEvents(){return this.transitions.events.subscribe(e=>{e instanceof m3&&(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 m3(e,"popstate"===this.lastSource?this.store[this.restoredId]:null,n))})},0)})}ngOnDestroy(){this.routerEventsSubscription?.unsubscribe(),this.scrollEventsSubscription?.unsubscribe()}}return i.\u0275fac=function(e){Co()},i.\u0275prov=Pe({token:i,factory:i.\u0275fac}),i})();var Zo=(()=>((Zo=Zo||{})[Zo.COMPLETE=0]="COMPLETE",Zo[Zo.FAILED=1]="FAILED",Zo[Zo.REDIRECTING=2]="REDIRECTING",Zo))();const Cm=!1;function lu(i,t){return{\u0275kind:i,\u0275providers:t}}const DI=new me("",{providedIn:"root",factory:()=>!1});function K3(){const i=Lt(Gi);return t=>{const e=i.get(dm);if(t!==e.components[0])return;const n=i.get(Ko),r=i.get(Z3);1===i.get(TI)&&n.initialNavigation(),i.get(Q3,null,Ft.Optional)?.setUpPreloading(),i.get(AI,null,Ft.Optional)?.init(),n.resetRootComponentType(e.componentTypes[0]),r.closed||(r.next(),r.complete(),r.unsubscribe())}}const Z3=new me(Cm?"bootstrap done indicator":"",{factory:()=>new Te}),TI=new me(Cm?"initial navigation":"",{providedIn:"root",factory:()=>1});function uK(){let i=[];return i=Cm?[{provide:Bp,multi:!0,useFactory:()=>{const t=Lt(Ko);return()=>t.events.subscribe(e=>{console.group?.(`Router Event: ${e.constructor.name}`),console.log(function Nq(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?.()})}}]:[],lu(1,i)}const Q3=new me(Cm?"router preloader":"");function hK(i){return lu(0,[{provide:Q3,useExisting:oK},{provide:Y3,useExisting:i}])}const zy=!1,J3=new me(zy?"router duplicate forRoot guard":"ROUTER_FORROOT_GUARD"),fK=[_y,{provide:Ty,useClass:iI},Ko,Fy,{provide:bm,useFactory:function X3(i){return i.routerState.root},deps:[Ko]},CI,zy?{provide:DI,useValue:!0}:[]];function pK(){return new CN("Router",Ko)}let eU=(()=>{class i{constructor(e){}static forRoot(e,n){return{ngModule:i,providers:[fK,zy&&n?.enableTracing?uK().\u0275providers:[],{provide:Mm,multi:!0,useValue:e},{provide:J3,useFactory:vK,deps:[[Ko,new Ss,new Ca]]},{provide:TM,useValue:n||{}},n?.useHash?{provide:Rh,useClass:C9}:{provide:Rh,useClass:YN},{provide:AI,useFactory:()=>{const i=Lt(UY),t=Lt(gt),e=Lt(TM),n=Lt(DM),r=Lt(Ty);return e.scrollOffset&&i.setOffset(e.scrollOffset),new q3(r,n,i,t,e)}},n?.preloadingStrategy?hK(n.preloadingStrategy).\u0275providers:[],{provide:CN,multi:!0,useFactory:pK},n?.initialNavigation?yK(n):[],[{provide:tU,useFactory:K3},{provide:MN,multi:!0,useExisting:tU}]]}}static forChild(e){return{ngModule:i,providers:[{provide:Mm,multi:!0,useValue:e}]}}}return i.\u0275fac=function(e){return new(e||i)(ee(J3,8))},i.\u0275mod=en({type:i}),i.\u0275inj=Wt({imports:[_I]}),i})();function vK(i){if(zy&&i)throw new pe(4007,"The Router was provided more than once. This can happen if 'forRoot' is used outside of the root injector. Lazy loaded modules should use RouterModule.forChild() instead.");return"guarded"}function yK(i){return["disabled"===i.initialNavigation?lu(3,[{provide:Vw,multi:!0,useFactory:()=>{const t=Lt(Ko);return()=>{t.setUpLocationChangeListener()}}},{provide:TI,useValue:2}]).\u0275providers:[],"enabledBlocking"===i.initialNavigation?lu(2,[{provide:TI,useValue:0},{provide:Vw,multi:!0,deps:[Gi],useFactory:t=>{const e=t.get(w9,Promise.resolve());return()=>e.then(()=>new Promise(n=>{const r=t.get(Ko),s=t.get(Z3);(function aK(i,t){i.events.pipe(gn(e=>e instanceof Oh||e instanceof _M||e instanceof dI||e instanceof vM),tt(e=>e instanceof Oh||e instanceof vM?Zo.COMPLETE:e instanceof _M&&(0===e.code||1===e.code)?Zo.REDIRECTING:Zo.FAILED),gn(e=>e!==Zo.REDIRECTING),Oi(1)).subscribe(()=>{t()})})(r,()=>{n(!0)}),t.get(DM).afterPreactivation=()=>(n(!0),s.closed?mt(void 0):s),r.initialNavigation()}))}}]).\u0275providers:[]]}const tU=new me(zy?"Router Initializer":""),xK=[];let wK=(()=>{class i{}return i.\u0275fac=function(e){return new(e||i)},i.\u0275mod=en({type:i}),i.\u0275inj=Wt({imports:[eU.forRoot(xK),eU]}),i})();function nU(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 nt(i){return function(){var t=this,e=arguments;return new Promise(function(n,r){var s=i.apply(t,e);function o(l){nU(s,n,r,o,a,"next",l)}function a(l){nU(s,n,r,o,a,"throw",l)}o(void 0)})}}function tn(i){return null!=i&&"false"!=`${i}`}function Ps(i,t=0){return function MK(i){return!isNaN(parseFloat(i))&&!isNaN(Number(i))}(i)?Number(i):t}function IM(i){return Array.isArray(i)?i:[i]}function _r(i){return null==i?"":"string"==typeof i?i:`${i}px`}function qc(i){return i instanceof vt?i.nativeElement:i}const CK=["addListener","removeListener"],SK=["addEventListener","removeEventListener"],EK=["on","off"];function To(i,t,e,n){if(dn(e)&&(n=e,e=void 0),n)return To(i,t,e).pipe(JT(n));const[r,s]=function TK(i){return dn(i.addEventListener)&&dn(i.removeEventListener)}(i)?SK.map(o=>a=>i[o](t,a,e)):function AK(i){return dn(i.addListener)&&dn(i.removeListener)}(i)?CK.map(iU(i,t)):function DK(i){return dn(i.on)&&dn(i.off)}(i)?EK.map(iU(i,t)):[];if(!r&&i_(i))return rr(o=>To(o,t,e))(Mr(i));if(!r)throw new TypeError("Invalid event target");return new In(o=>{const a=(...l)=>o.next(1s(a)})}function iU(i,t){return e=>n=>i[e](t,n)}class IK extends Qt{constructor(t,e){super()}schedule(t,e=0){return this}}const RM={setInterval(i,t,...e){const{delegate:n}=RM;return n?.setInterval?n.setInterval(i,t,...e):setInterval(i,t,...e)},clearInterval(i){const{delegate:t}=RM;return(t?.clearInterval||clearInterval)(i)},delegate:void 0};class II extends IK{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 RM.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&&RM.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,Kr(n,this),null!=t&&(this.id=this.recycleAsyncId(e,t,null)),this.delay=null,super.unsubscribe()}}}const Hy={schedule(i){let t=requestAnimationFrame,e=cancelAnimationFrame;const{delegate:n}=Hy;n&&(t=n.requestAnimationFrame,e=n.cancelAnimationFrame);const r=t(s=>{e=void 0,i(s)});return new Qt(()=>e?.(r))},requestAnimationFrame(...i){const{delegate:t}=Hy;return(t?.requestAnimationFrame||requestAnimationFrame)(...i)},cancelAnimationFrame(...i){const{delegate:t}=Hy;return(t?.cancelAnimationFrame||cancelAnimationFrame)(...i)},delegate:void 0},rU={now:()=>(rU.delegate||Date).now(),delegate:void 0};class $y{constructor(t,e=$y.now){this.schedulerActionCtor=t,this.now=e}schedule(t,e=0,n){return new this.schedulerActionCtor(this,t).schedule(n,e)}}$y.now=rU.now;class RI extends $y{constructor(t,e=$y.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 PK=new class kK extends RI{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 RK extends II{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=Hy.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&&(Hy.cancelAnimationFrame(e),t._scheduled=void 0)}});let kI,OK=1;const kM={};function sU(i){return i in kM&&(delete kM[i],!0)}const FK={setImmediate(i){const t=OK++;return kM[t]=!0,kI||(kI=Promise.resolve()),kI.then(()=>sU(t)&&i()),t},clearImmediate(i){sU(i)}},{setImmediate:LK,clearImmediate:NK}=FK,PM={setImmediate(...i){const{delegate:t}=PM;return(t?.setImmediate||LK)(...i)},clearImmediate(i){const{delegate:t}=PM;return(t?.clearImmediate||NK)(i)},delegate:void 0},PI=new class UK extends RI{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 BK extends II{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=PM.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&&(PM.clearImmediate(e),t._scheduled===e&&(t._scheduled=void 0))}}),Gy=new RI(II),VK=Gy;function OI(i=0,t,e=VK){let n=-1;return null!=t&&($u(t)?e=t:n=t),new In(r=>{let s=function HK(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 Wy(i,t=Gy){return function zK(i){return ni((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(qn(e,c=>{n=!0,r=c,s||Mr(i(c)).subscribe(s=qn(e,a,l))},()=>{o=!0,(!n||!s||s.closed)&&e.complete()}))})}(()=>OI(i,t))}function Ue(i){return ni((t,e)=>{Mr(i).subscribe(qn(e,()=>e.complete(),ms)),!e.closed&&t.subscribe(e)})}let FI;try{FI=typeof Intl<"u"&&Intl.v8BreakIterator}catch{FI=!1}let Sm,zi=(()=>{class i{constructor(e){this._platformId=e,this.isBrowser=this._platformId?function BY(i){return i===fB}(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&&!FI)&&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)(ee(fT))},i.\u0275prov=Pe({token:i,factory:i.\u0275fac,providedIn:"root"}),i})();const oU=["color","button","checkbox","date","datetime-local","email","file","hidden","image","month","number","password","radio","range","reset","search","submit","tel","text","time","url","week"];function aU(){if(Sm)return Sm;if("object"!=typeof document||!document)return Sm=new Set(oU),Sm;let i=document.createElement("input");return Sm=new Set(oU.filter(t=>(i.setAttribute("type",t),i.type===t))),Sm}let jy,OM,Lh,LI;function Fh(i){return function $K(){if(null==jy&&typeof window<"u")try{window.addEventListener("test",null,Object.defineProperty({},"passive",{get:()=>jy=!0}))}finally{jy=jy||!1}return jy}()?i:!!i.capture}function lU(){if(null==Lh){if("object"!=typeof document||!document||"function"!=typeof Element||!Element)return Lh=!1,Lh;if("scrollBehavior"in document.documentElement.style)Lh=!0;else{const i=Element.prototype.scrollTo;Lh=!!i&&!/\{\s*\[native code\]\s*\}/.test(i.toString())}}return Lh}function Yy(){if("object"!=typeof document||!document)return 0;if(null==OM){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),OM=0,0===i.scrollLeft&&(i.scrollLeft=1,OM=0===i.scrollLeft?1:2),i.remove()}return OM}function FM(){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 cu(i){return i.composedPath?i.composedPath()[0]:i.target}function NI(){return typeof __karma__<"u"&&!!__karma__||typeof jasmine<"u"&&!!jasmine||typeof jest<"u"&&!!jest||typeof Mocha<"u"&&!!Mocha}const jK=new me("cdk-dir-doc",{providedIn:"root",factory:function YK(){return Lt(qt)}}),qK=/^(ar|ckb|dv|he|iw|fa|nqo|ps|sd|ug|ur|yi|.*[-_](Adlm|Arab|Hebr|Nkoo|Rohg|Thaa))(?!.*[-_](Latn|Cyrl)($|-|_))($|-|_)/i;let Pa=(()=>{class i{constructor(e){this.value="ltr",this.change=new $e,e&&(this.value=function XK(i){const t=i?.toLowerCase()||"";return"auto"===t&&typeof navigator<"u"&&navigator?.language?qK.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)(ee(jK,8))},i.\u0275prov=Pe({token:i,factory:i.\u0275fac,providedIn:"root"}),i})(),qy=(()=>{class i{}return i.\u0275fac=function(e){return new(e||i)},i.\u0275mod=en({type:i}),i.\u0275inj=Wt({}),i})();const KK=["contentWrapper"],ZK=["*"],QK=new me("VIRTUAL_SCROLL_STRATEGY");let Xy=(()=>{class i{constructor(e,n,r){this._ngZone=e,this._platform=n,this._scrolled=new Te,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 In(n=>{this._globalSubscription||this._addGlobalListener();const r=e>0?this._scrolled.pipe(Wy(e)).subscribe(n):this._scrolled.subscribe(n);return this._scrolledCount++,()=>{r.unsubscribe(),this._scrolledCount--,this._scrolledCount||this._removeGlobalListener()}}):mt()}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(gn(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=qc(n),s=e.getElementRef().nativeElement;do{if(r==s)return!0}while(r=r.parentElement);return!1}_addGlobalListener(){this._globalSubscription=this._ngZone.runOutsideAngular(()=>To(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)(ee(gt),ee(zi),ee(qt,8))},i.\u0275prov=Pe({token:i,factory:i.\u0275fac,providedIn:"root"}),i})(),cU=(()=>{class i{constructor(e,n,r,s){this.elementRef=e,this.scrollDispatcher=n,this.ngZone=r,this.dir=s,this._destroyed=new Te,this._elementScrolled=new In(o=>this.ngZone.runOutsideAngular(()=>To(this.elementRef.nativeElement,"scroll").pipe(Ue(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!=Yy()?(null!=e.left&&(e.right=n.scrollWidth-n.clientWidth-e.left),2==Yy()?e.left=e.right:1==Yy()&&(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;lU()?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==Yy()?e==n?s.scrollWidth-s.clientWidth-s.scrollLeft:s.scrollLeft:o&&1==Yy()?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)(E(vt),E(Xy),E(gt),E(Pa,8))},i.\u0275dir=ve({type:i,selectors:[["","cdk-scrollable",""],["","cdkScrollable",""]],standalone:!0}),i})(),LM=(()=>{class i{constructor(e,n,r){this._platform=e,this._change=new Te,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(Wy(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)(ee(zi),ee(gt),ee(qt,8))},i.\u0275prov=Pe({token:i,factory:i.\u0275fac,providedIn:"root"}),i})();const dU=new me("VIRTUAL_SCROLLABLE");let tZ=(()=>{class i extends cU{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)(E(vt),E(Xy),E(gt),E(Pa,8))},i.\u0275dir=ve({type:i,features:[dt]}),i})();const iZ=typeof requestAnimationFrame<"u"?PK:PI;let rZ=(()=>{class i extends tZ{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=tn(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=Lt(zi),this._detachedSubject=new Te,this._renderedRangeSubject=new Te,this._orientation="vertical",this._appendOnly=!1,this.scrolledIndexChange=new In(d=>this._scrollStrategy.scrolledIndexChange.subscribe(h=>Promise.resolve().then(()=>this.ngZone.run(()=>d.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=Qt.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(Do(null),Wy(0,iZ)).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(Ue(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 nZ(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)(E(vt),E(Qn),E(gt),E(QK,8),E(Pa,8),E(Xy),E(LM),E(dU,8))},i.\u0275cmp=ot({type:i,selectors:[["cdk-virtual-scroll-viewport"]],viewQuery:function(e,n){if(1&e&&$n(KK,7),2&e){let r;At(r=Dt())&&(n._contentWrapper=r.first)}},hostAttrs:[1,"cdk-virtual-scroll-viewport"],hostVars:4,hostBindings:function(e,n){2&e&&ln("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:[Dn([{provide:cU,useFactory:(t,e)=>t||e,deps:[[new Ss,new xo(dU)],i]}]),dt,ZD],ngContentSelectors:ZK,decls:4,vars:4,consts:[[1,"cdk-virtual-scroll-content-wrapper"],["contentWrapper",""],[1,"cdk-virtual-scroll-spacer"]],template:function(e,n){1&e&&(or(),G(0,"div",0,1),Yt(2),j(),Ie(3,"div",2)),2&e&&(V(3),qo("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})(),Ky=(()=>{class i{}return i.\u0275fac=function(e){return new(e||i)},i.\u0275mod=en({type:i}),i.\u0275inj=Wt({}),i})(),uU=(()=>{class i{}return i.\u0275fac=function(e){return new(e||i)},i.\u0275mod=en({type:i}),i.\u0275inj=Wt({imports:[qy,Ky,rZ,qy,Ky]}),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 Nh 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 sZ extends BI{constructor(t){super(),this.element=t instanceof vt?t.nativeElement:t}}class NM{constructor(){this._isDisposed=!1,this.attachDomPortal=null}hasAttached(){return!!this._attachedPortal}attach(t){return t instanceof Nh?(this._attachedPortal=t,this.attachComponentPortal(t)):t instanceof Em?(this._attachedPortal=t,this.attachTemplatePortal(t)):this.attachDomPortal&&t instanceof sZ?(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 oZ extends NM{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||Gi.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 NM{constructor(e,n,r){super(),this._componentFactoryResolver=e,this._viewContainerRef=n,this._isInitialized=!1,this.attached=new $e,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)(E($l),E(jr),E(qt))},i.\u0275dir=ve({type:i,selectors:[["","cdkPortalOutlet",""]],inputs:{portal:["cdkPortalOutlet","portal"]},outputs:{attached:"attached"},exportAs:["cdkPortalOutlet"],features:[dt]}),i})(),Bh=(()=>{class i{}return i.\u0275fac=function(e){return new(e||i)},i.\u0275mod=en({type:i}),i.\u0275inj=Wt({}),i})();function Qo(i,...t){return t.length?t.some(e=>i[e]):i.altKey||i.shiftKey||i.ctrlKey||i.metaKey}const hU=lU();class bZ{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=_r(-this._previousScrollPosition.left),t.style.top=_r(-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"),hU&&(n.scrollBehavior=r.scrollBehavior="auto"),window.scroll(this._previousScrollPosition.left,this._previousScrollPosition.top),hU&&(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 xZ{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(gn(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 fU{enable(){}disable(){}attach(){}}function VI(i,t){return t.some(e=>i.bottome.bottom||i.righte.right)}function pU(i,t){return t.some(e=>i.tope.bottom||i.lefte.right)}class wZ{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();VI(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 MZ=(()=>{class i{constructor(e,n,r,s){this._scrollDispatcher=e,this._viewportRuler=n,this._ngZone=r,this.noop=()=>new fU,this.close=o=>new xZ(this._scrollDispatcher,this._ngZone,this._viewportRuler,o),this.block=()=>new bZ(this._viewportRuler,this._document),this.reposition=o=>new wZ(this._scrollDispatcher,this._viewportRuler,this._ngZone,o),this._document=s}}return i.\u0275fac=function(e){return new(e||i)(ee(Xy),ee(LM),ee(gt),ee(qt))},i.\u0275prov=Pe({token:i,factory:i.\u0275fac,providedIn:"root"}),i})();class km{constructor(t){if(this.scrollStrategy=new fU,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 CZ{constructor(t,e){this.connectionPair=t,this.scrollableViewProperties=e}}let mU=(()=>{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)(ee(qt))},i.\u0275prov=Pe({token:i,factory:i.\u0275fac,providedIn:"root"}),i})(),SZ=(()=>{class i extends mU{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)(ee(qt),ee(gt,8))},i.\u0275prov=Pe({token:i,factory:i.\u0275fac,providedIn:"root"}),i})(),EZ=(()=>{class i extends mU{constructor(e,n,r){super(e),this._platform=n,this._ngZone=r,this._cursorStyleIsSet=!1,this._pointerDownListener=s=>{this._pointerDownEventTarget=cu(s)},this._clickListener=s=>{const o=cu(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 d=l[c];if(d._outsidePointerEvents.observers.length<1||!d.hasAttached())continue;if(d.overlayElement.contains(o)||d.overlayElement.contains(a))break;const h=d._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)(ee(qt),ee(zi),ee(gt,8))},i.\u0275prov=Pe({token:i,factory:i.\u0275fac,providedIn:"root"}),i})(),VM=(()=>{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||NI()){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 Te,this._outsidePointerEvents=new Te,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(Oi(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=_r(this._config.width),t.height=_r(this._config.height),t.minWidth=_r(this._config.minWidth),t.minHeight=_r(this._config.minHeight),t.maxWidth=_r(this._config.maxWidth),t.maxHeight=_r(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=IM(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(Ue(Cr(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 gU="cdk-overlay-connected-position-bounding-box",AZ=/([A-Za-z%]+)$/;class DZ{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 Te,this._resizeSubscription=Qt.EMPTY,this._offsetX=0,this._offsetY=0,this._appliedPanelClasses=[],this.positionChanges=this._positionChanges,this.setOrigin(t)}attach(t){this._validatePositions(),t.hostElement.classList.add(gU),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),d=this._getOverlayFit(c,e,n,a);if(d.isCompletelyWithinViewport)return this._isPushed=!1,void this._applyPosition(a,l);this._canFitWithFlexibleDimensions(d,c,n)?s.push({position:a,origin:l,overlayRect:e,boundingBoxRect:this._calculateBoundingBoxRect(l,a)}):(!o||o.overlayFit.visibleAreal&&(l=d,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&&Uh(this._boundingBox.style,{top:"",left:"",right:"",bottom:"",height:"",width:"",alignItems:"",justifyContent:""}),this._pane&&this._resetOverlayElementStyles(),this._overlayRef&&this._overlayRef.hostElement.classList.remove(gU),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=vU(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=_U(this._overlayRef.getConfig().minHeight),a=_U(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=vU(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 d=0,h=0;return d=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,d=t.x-this._viewportMargin;else if("start"===e.overlayX&&!r||"end"===e.overlayX&&r)h=t.x,d=n.right-t.x;else{const m=Math.min(n.right-t.x+n.left,t.x),g=this._lastBoundingBoxSize.width;d=2*m,h=t.x-m,d>g&&!this._isInitialRender&&!this._growAfterOpen&&(h=t.x-g/2)}return{top:o,left:h,bottom:a,right:p,width:d,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=_r(n.height),r.top=_r(n.top),r.bottom=_r(n.bottom),r.width=_r(n.width),r.left=_r(n.left),r.right=_r(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=_r(s)),o&&(r.maxWidth=_r(o))}this._lastBoundingBoxSize=n,Uh(this._boundingBox.style,r)}_resetBoundingBoxStyles(){Uh(this._boundingBox.style,{top:"0",left:"0",right:"0",bottom:"0",height:"",width:"",alignItems:"",justifyContent:""})}_resetOverlayElementStyles(){Uh(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 d=this._viewportRuler.getViewportScrollPosition();Uh(n,this._getExactOverlayY(e,t,d)),Uh(n,this._getExactOverlayX(e,t,d))}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=_r(o.maxHeight):s&&(n.maxHeight="")),o.maxWidth&&(r?n.maxWidth=_r(o.maxWidth):s&&(n.maxWidth="")),Uh(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=_r(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=_r(s.x),r}_getScrollVisibility(){const t=this._getOriginRect(),e=this._pane.getBoundingClientRect(),n=this._scrollables.map(r=>r.getElementRef().nativeElement.getBoundingClientRect());return{isOriginClipped:pU(t,n),isOriginOutsideView:VI(t,n),isOverlayClipped:pU(e,n),isOverlayOutsideView:VI(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&&IM(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 vt)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 Uh(i,t){for(let e in t)t.hasOwnProperty(e)&&(i[e]=t[e]);return i}function _U(i){if("number"!=typeof i&&null!=i){const[t,e]=i.split(AZ);return e&&"px"!==e?null:parseFloat(t)}return i||null}function vU(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 yU="cdk-global-overlay-wrapper";class bU{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(yU),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),d=this._xPosition,h=this._xOffset,p="rtl"===this._overlayRef.getConfig().direction;let m="",g="",b="";l?b="flex-start":"center"===d?(b="center",p?g=h:m=h):p?"left"===d||"end"===d?(b="flex-end",m=h):("right"===d||"start"===d)&&(b="flex-start",g=h):"left"===d||"start"===d?(b="flex-start",m=h):("right"===d||"end"===d)&&(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(yU),n.justifyContent=n.alignItems=t.marginTop=t.marginBottom=t.marginLeft=t.marginRight=t.position="",this._overlayRef=null,this._isDisposed=!0}}let TZ=(()=>{class i{constructor(e,n,r,s){this._viewportRuler=e,this._document=n,this._platform=r,this._overlayContainer=s}global(){return new bU}flexibleConnectedTo(e){return new DZ(e,this._viewportRuler,this._document,this._platform,this._overlayContainer)}}return i.\u0275fac=function(e){return new(e||i)(ee(LM),ee(qt),ee(zi),ee(VM))},i.\u0275prov=Pe({token:i,factory:i.\u0275fac,providedIn:"root"}),i})(),IZ=0,as=(()=>{class i{constructor(e,n,r,s,o,a,l,c,d,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=d,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 Qy(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-"+IZ++,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(dm)),new oZ(e,this._componentFactoryResolver,this._appRef,this._injector,this._document)}}return i.\u0275fac=function(e){return new(e||i)(ee(MZ),ee(VM),ee($l),ee(TZ),ee(SZ),ee(Gi),ee(gt),ee(qt),ee(Pa),ee(_y),ee(EZ),ee(kr,8))},i.\u0275prov=Pe({token:i,factory:i.\u0275fac,providedIn:"root"}),i})();const RZ=[{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"}],xU=new me("cdk-connected-overlay-scroll-strategy");let zI=(()=>{class i{constructor(e){this.elementRef=e}}return i.\u0275fac=function(e){return new(e||i)(E(vt))},i.\u0275dir=ve({type:i,selectors:[["","cdk-overlay-origin",""],["","overlay-origin",""],["","cdkOverlayOrigin",""]],exportAs:["cdkOverlayOrigin"],standalone:!0}),i})(),wU=(()=>{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=tn(e)}get lockPosition(){return this._lockPosition}set lockPosition(e){this._lockPosition=tn(e)}get flexibleDimensions(){return this._flexibleDimensions}set flexibleDimensions(e){this._flexibleDimensions=tn(e)}get growAfterOpen(){return this._growAfterOpen}set growAfterOpen(e){this._growAfterOpen=tn(e)}get push(){return this._push}set push(e){this._push=tn(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=Qt.EMPTY,this._attachSubscription=Qt.EMPTY,this._detachSubscription=Qt.EMPTY,this._positionSubscription=Qt.EMPTY,this.viewportMargin=0,this.open=!1,this.disableClose=!1,this.backdropClick=new $e,this.positionChange=new $e,this.attach=new $e,this.detach=new $e,this.overlayKeydown=new $e,this.overlayOutsideClick=new $e,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=RZ);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&&!Qo(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 zI?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(YB(()=>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)(E(as),E(Eo),E(jr),E(xU),E(Pa,8))},i.\u0275dir=ve({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:[xi]}),i})();const PZ={provide:xU,deps:[as],useFactory:function kZ(i){return()=>i.scrollStrategies.reposition()}};let Pm=(()=>{class i{}return i.\u0275fac=function(e){return new(e||i)},i.\u0275mod=en({type:i}),i.\u0275inj=Wt({providers:[as,PZ],imports:[qy,Bh,uU,uU]}),i})();function gl(i,t=Gy){return ni((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,d=t.now();if(d{s=c,o=t.now(),r||(r=t.schedule(l,i),n.add(r))},()=>{a(),n.complete()},void 0,()=>{s=r=null}))})}function MU(i){return gn((t,e)=>i<=e)}function Ql(i,t=ja){return i=i??OZ,ni((e,n)=>{let r,s=!0;e.subscribe(qn(n,o=>{const a=t(o);(s||!i(r,a))&&(s=!1,r=a,n.next(o))}))})}function OZ(i,t){return i===t}let CU=(()=>{class i{create(e){return typeof MutationObserver>"u"?null:new MutationObserver(e)}}return i.\u0275fac=function(e){return new(e||i)},i.\u0275prov=Pe({token:i,factory:i.\u0275fac,providedIn:"root"}),i})(),FZ=(()=>{class i{constructor(e){this._mutationObserverFactory=e,this._observedElements=new Map}ngOnDestroy(){this._observedElements.forEach((e,n)=>this._cleanupObserver(n))}observe(e){const n=qc(e);return new In(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 Te,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)(ee(CU))},i.\u0275prov=Pe({token:i,factory:i.\u0275fac,providedIn:"root"}),i})(),SU=(()=>{class i{get disabled(){return this._disabled}set disabled(e){this._disabled=tn(e),this._disabled?this._unsubscribe():this._subscribe()}get debounce(){return this._debounce}set debounce(e){this._debounce=Ps(e),this._subscribe()}constructor(e,n,r){this._contentObserver=e,this._elementRef=n,this._ngZone=r,this.event=new $e,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(gl(this.debounce)):e).subscribe(this.event)})}_unsubscribe(){this._currentSubscription?.unsubscribe()}}return i.\u0275fac=function(e){return new(e||i)(E(FZ),E(vt),E(gt))},i.\u0275dir=ve({type:i,selectors:[["","cdkObserveContent",""]],inputs:{disabled:["cdkObserveContentDisabled","disabled"],debounce:"debounce"},outputs:{event:"cdkObserveContent"},exportAs:["cdkObserveContent"]}),i})(),HI=(()=>{class i{}return i.\u0275fac=function(e){return new(e||i)},i.\u0275mod=en({type:i}),i.\u0275inj=Wt({providers:[CU]}),i})();const EU=new Set;let Om,LZ=(()=>{class i{constructor(e){this._platform=e,this._matchMedia=this._platform.isBrowser&&window.matchMedia?window.matchMedia.bind(window):BZ}matchMedia(e){return(this._platform.WEBKIT||this._platform.BLINK)&&function NZ(i){if(!EU.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),EU.add(i))}catch(t){console.error(t)}}(e),this._matchMedia(e)}}return i.\u0275fac=function(e){return new(e||i)(ee(zi))},i.\u0275prov=Pe({token:i,factory:i.\u0275fac,providedIn:"root"}),i})();function BZ(i){return{matches:"all"===i||""===i,media:i,addListener:()=>{},removeListener:()=>{}}}let $I=(()=>{class i{constructor(e,n){this._mediaMatcher=e,this._zone=n,this._queries=new Map,this._destroySubject=new Te}ngOnDestroy(){this._destroySubject.next(),this._destroySubject.complete()}isMatched(e){return AU(IM(e)).some(r=>this._registerQuery(r).mql.matches)}observe(e){let s=Ra(AU(IM(e)).map(o=>this._registerQuery(o).observable));return s=Sy(s.pipe(Oi(1)),s.pipe(MU(1),gl(0))),s.pipe(tt(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 In(o=>{const a=l=>this._zone.run(()=>o.next(l));return n.addListener(a),()=>{n.removeListener(a)}}).pipe(Do(n),tt(({matches:o})=>({query:e,matches:o})),Ue(this._destroySubject)),mql:n};return this._queries.set(e,s),s}}return i.\u0275fac=function(e){return new(e||i)(ee(LZ),ee(gt))},i.\u0275prov=Pe({token:i,factory:i.\u0275fac,providedIn:"root"}),i})();function AU(i){return i.map(t=>t.split(",")).reduce((t,e)=>t.concat(e)).map(t=>t.trim())}function zM(i,t){return(i.getAttribute(t)||"").match(/\S+/g)||[]}const TU="cdk-describedby-message",HM="cdk-describedby-host";let GI=0,HZ=(()=>{class i{constructor(e,n){this._platform=n,this._messageRegistry=new Map,this._messagesContainer=null,this._id=""+GI++,this._document=e,this._id=Lt(cm)+"-"+GI++}describe(e,n,r){if(!this._canBeDescribed(e,n))return;const s=WI(n,r);"string"!=typeof n?(IU(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=WI(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(`[${HM}="${this._id}"]`);for(let n=0;n0!=r.indexOf(TU));e.setAttribute("aria-describedby",n.join(" "))}_addMessageReference(e,n){const r=this._messageRegistry.get(n);(function VZ(i,t,e){const n=zM(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(HM,this._id),r.referenceCount++}_removeMessageReference(e,n){const r=this._messageRegistry.get(n);r.referenceCount--,function zZ(i,t,e){const r=zM(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(HM)}_isElementDescribedByMessage(e,n){const r=zM(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)(ee(qt),ee(zi))},i.\u0275prov=Pe({token:i,factory:i.\u0275fac,providedIn:"root"}),i})();function WI(i,t){return"string"==typeof i?`${t||""}/${i}`:i}function IU(i,t){i.id||(i.id=`${TU}-${t}-${GI++}`)}class RU{constructor(t){this._items=t,this._activeItemIndex=-1,this._activeItem=null,this._wrap=!1,this._letterKeyStream=new Te,this._typeaheadSubscription=Qt.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 Te,this.change=new Te,t instanceof om&&(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(Vi(e=>this._pressedLetters.push(e)),gl(t),gn(()=>this._pressedLetters.length>0),tt(()=>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 om?this._items.toArray():this._items}}class $Z extends RU{setActiveItem(t){this.activeItem&&this.activeItem.setInactiveStyles(),super.setActiveItem(t),this.activeItem&&this.activeItem.setActiveStyles()}}class kU extends RU{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 $M=(()=>{class i{constructor(e){this._platform=e}isDisabled(e){return e.hasAttribute("disabled")}isVisible(e){return function WZ(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 GZ(i){try{return i.frameElement}catch{return null}}(function JZ(i){return i.ownerDocument&&i.ownerDocument.defaultView||window}(e));if(n&&(-1===OU(n)||!this.isVisible(n)))return!1;let r=e.nodeName.toLowerCase(),s=OU(e);return e.hasAttribute("contenteditable")?-1!==s:!("iframe"===r||"object"===r||this._platform.WEBKIT&&this._platform.IOS&&!function ZZ(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 QZ(i){return!function YZ(i){return function XZ(i){return"input"==i.nodeName.toLowerCase()}(i)&&"hidden"==i.type}(i)&&(function jZ(i){let t=i.nodeName.toLowerCase();return"input"===t||"select"===t||"button"===t||"textarea"===t}(i)||function qZ(i){return function KZ(i){return"a"==i.nodeName.toLowerCase()}(i)&&i.hasAttribute("href")}(i)||i.hasAttribute("contenteditable")||PU(i))}(e)&&!this.isDisabled(e)&&(n?.ignoreVisibility||this.isVisible(e))}}return i.\u0275fac=function(e){return new(e||i)(ee(zi))},i.\u0275prov=Pe({token:i,factory:i.\u0275fac,providedIn:"root"}),i})();function PU(i){if(!i.hasAttribute("tabindex")||void 0===i.tabIndex)return!1;let t=i.getAttribute("tabindex");return!(!t||isNaN(parseInt(t,10)))}function OU(i){if(!PU(i))return null;const t=parseInt(i.getAttribute("tabindex")||"",10);return isNaN(t)?-1:t}class eQ{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(Oi(1)).subscribe(t)}}let jI=(()=>{class i{constructor(e,n,r){this._checker=e,this._ngZone=n,this._document=r}create(e,n=!1){return new eQ(e,this._checker,this._ngZone,this._document,n)}}return i.\u0275fac=function(e){return new(e||i)(ee($M),ee(gt),ee(qt))},i.\u0275prov=Pe({token:i,factory:i.\u0275fac,providedIn:"root"}),i})();function YI(i){return 0===i.buttons||0===i.offsetX&&0===i.offsetY}function qI(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 tQ=new me("cdk-input-modality-detector-options"),nQ={ignoreKeys:[18,17,224,91,16]},Fm=Fh({passive:!0,capture:!0});let iQ=(()=>{class i{get mostRecentModality(){return this._modality.value}constructor(e,n,r,s){this._platform=e,this._mostRecentTarget=null,this._modality=new Qe(null),this._lastTouchMs=0,this._onKeydown=o=>{this._options?.ignoreKeys?.some(a=>a===o.keyCode)||(this._modality.next("keyboard"),this._mostRecentTarget=cu(o))},this._onMousedown=o=>{Date.now()-this._lastTouchMs<650||(this._modality.next(YI(o)?"keyboard":"mouse"),this._mostRecentTarget=cu(o))},this._onTouchstart=o=>{qI(o)?this._modality.next("keyboard"):(this._lastTouchMs=Date.now(),this._modality.next("touch"),this._mostRecentTarget=cu(o))},this._options={...nQ,...s},this.modalityDetected=this._modality.pipe(MU(1)),this.modalityChanged=this.modalityDetected.pipe(Ql()),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)(ee(zi),ee(gt),ee(qt),ee(tQ,8))},i.\u0275prov=Pe({token:i,factory:i.\u0275fac,providedIn:"root"}),i})();const rQ=new me("liveAnnouncerElement",{providedIn:"root",factory:function sQ(){return null}}),oQ=new me("LIVE_ANNOUNCER_DEFAULT_OPTIONS");let aQ=0,XI=(()=>{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 Te,this._rootNodeFocusAndBlurListener=a=>{for(let c=cu(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=qc(e);if(!this._platform.isBrowser||1!==r.nodeType)return mt(null);const s=function WK(i){if(function GK(){if(null==LI){const i=typeof document<"u"?document.head:null;LI=!(!i||!i.createShadowRoot&&!i.attachShadow)}return LI}()){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 Te,rootNode:s};return this._elementInfo.set(r,a),this._registerGlobalListeners(a),a.subject}stopMonitoring(e){const n=qc(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=qc(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=cu(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,GM),n.addEventListener("blur",this._rootNodeFocusAndBlurListener,GM)}),this._rootNodeFocusListenerCount.set(n,r+1),1==++this._monitoredElementCount&&(this._ngZone.runOutsideAngular(()=>{this._getWindow().addEventListener("focus",this._windowFocusListener)}),this._inputModalityDetector.modalityDetected.pipe(Ue(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,GM),n.removeEventListener("blur",this._rootNodeFocusAndBlurListener,GM),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=Lt($I).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,LU,NU),this._hasCheckedHighContrastMode=!0;const n=this.getHighContrastMode();1===n?e.add(KI,LU):2===n&&e.add(KI,NU)}}}return i.\u0275fac=function(e){return new(e||i)(ee(zi),ee(qt))},i.\u0275prov=Pe({token:i,factory:i.\u0275fac,providedIn:"root"}),i})(),UU=(()=>{class i{constructor(e){e._applyBodyHighContrastModeCssClasses()}}return i.\u0275fac=function(e){return new(e||i)(ee(BU))},i.\u0275mod=en({type:i}),i.\u0275inj=Wt({imports:[HI]}),i})();function cQ(i,t){}class WM{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 VU=(()=>{class i extends NM{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=d=>{this._portalOutlet.hasAttached();const h=this._portalOutlet.attachDomPortal(d);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=FM(),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=FM();return e===n||e.contains(n)}_initializeFocusTrap(){this._focusTrap=this._focusTrapFactory.create(this._elementRef.nativeElement),this._document&&(this._elementFocusedBeforeDialogWasOpened=FM())}_handleBackdropClicks(){this._overlayRef.backdropClick().subscribe(()=>{this._config.disableClose&&this._recaptureFocus()})}}return i.\u0275fac=function(e){return new(e||i)(E(vt),E(jI),E(qt,8),E(WM),E($M),E(gt),E(Qy),E(Xc))},i.\u0275cmp=ot({type:i,selectors:[["cdk-dialog-container"]],viewQuery:function(e,n){if(1&e&&$n(Am,7),2&e){let r;At(r=Dt())&&(n._portalOutlet=r.first)}},hostAttrs:["tabindex","-1",1,"cdk-dialog-container"],hostVars:6,hostBindings:function(e,n){2&e&&It("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:[dt],decls:1,vars:0,consts:[["cdkPortalOutlet",""]],template:function(e,n){1&e&&fe(0,cQ,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 ZI{constructor(t,e){this.overlayRef=t,this.config=e,this.closed=new Te,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&&!Qo(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 zU=new me("DialogScrollStrategy"),dQ=new me("DialogData"),uQ=new me("DefaultDialogConfig"),fQ={provide:zU,deps:[as],useFactory:function hQ(i){return()=>i.scrollStrategies.block()}};let pQ=0,HU=(()=>{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 Te,this._afterOpenedAtThisLevel=new Te,this._ariaHiddenElements=new Map,this.afterAllClosed=Ey(()=>this.openDialogs.length?this._getAfterAllClosed():this._getAfterAllClosed().pipe(Do(void 0))),this._scrollStrategy=a}open(e,n){(n={...this._defaultOptions||new WM,...n}).id=n.id||"cdk-dialog-"+pQ++,n.id&&this.getDialogById(n.id);const s=this._getOverlayConfig(n),o=this._overlay.create(s),a=new ZI(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(){QI(this.openDialogs,e=>e.close())}getDialogById(e){return this.openDialogs.find(n=>n.id===e)}ngOnDestroy(){QI(this._openDialogsAtThisLevel,e=>{!1===e.config.closeOnDestroy&&this._removeOpenDialog(e,!1)}),QI(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:WM,useValue:r},{provide:ZI,useValue:n},{provide:Qy,useValue:e}];let a;r.container?"function"==typeof r.container?a=r.container:(a=r.container.type,o.push(...r.container.providers(r))):a=VU;const l=new Nh(a,r.viewContainerRef,Gi.create({parent:s||this._injector,providers:o}),r.componentFactoryResolver);return e.attach(l).instance}_attachDialogContent(e,n,r,s){if(e instanceof Eo){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 Nh(e,s.viewContainerRef,o,s.componentFactoryResolver));n.componentInstance=a.instance}}_createInjector(e,n,r,s){const o=e.injector||e.viewContainerRef?.injector,a=[{provide:dQ,useValue:e.data},{provide:ZI,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(Pa,null,{optional:!0}))&&a.push({provide:Pa,useValue:{value:e.direction,change:mt()}}),Gi.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)(ee(as),ee(Gi),ee(uQ,8),ee(i,12),ee(VM),ee(zU))},i.\u0275prov=Pe({token:i,factory:i.\u0275fac}),i})();function QI(i,t){let e=i.length;for(;e--;)t(i[e])}let mQ=(()=>{class i{}return i.\u0275fac=function(e){return new(e||i)},i.\u0275mod=en({type:i}),i.\u0275inj=Wt({providers:[HU,fQ],imports:[Pm,Bh,UU,Bh]}),i})();const gQ=["text"];function _Q(i,t){if(1&i&&Ie(0,"mat-pseudo-checkbox",6),2&i){const e=re();U("state",e.selected?"checked":"unchecked")("disabled",e.disabled)}}function vQ(i,t){1&i&&Ie(0,"mat-pseudo-checkbox",7),2&i&&U("disabled",re().disabled)}function yQ(i,t){if(1&i&&(G(0,"span",8),Be(1),j()),2&i){const e=re();V(1),Qi("(",e.group.label,")")}}const bQ=[[["mat-icon"]],"*"],xQ=["mat-icon","*"],MQ=new me("mat-sanity-checks",{providedIn:"root",factory:function wQ(){return!0}});let Jn=(()=>{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!NI()&&("boolean"==typeof this._sanityChecks?this._sanityChecks:!!this._sanityChecks[e])}}return i.\u0275fac=function(e){return new(e||i)(ee(BU),ee(MQ,8),ee(qt))},i.\u0275mod=en({type:i}),i.\u0275inj=Wt({imports:[qy,qy]}),i})();function jM(i){return class extends i{get disabled(){return this._disabled}set disabled(t){this._disabled=tn(t)}constructor(...t){super(...t),this._disabled=!1}}}function Jy(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 YM(i){return class extends i{get disableRipple(){return this._disableRipple}set disableRipple(t){this._disableRipple=tn(t)}constructor(...t){super(...t),this._disableRipple=!1}}}function JI(i,t=0){return class extends i{get tabIndex(){return this.disabled?-1:this._tabIndex}set tabIndex(e){this._tabIndex=null!=e?Ps(e):this.defaultTabIndex}constructor(...e){super(...e),this._tabIndex=t,this.defaultTabIndex=t}}}function WU(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 CQ(i){return class extends i{constructor(...t){super(...t),this._isInitialized=!1,this._pendingSubscribers=[],this.initialized=new In(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 YU=(()=>{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=Pe({token:i,factory:i.\u0275fac,providedIn:"root"}),i})();class EQ{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 qU=Fh({passive:!0,capture:!0});class AQ{constructor(){this._events=new Map,this._delegateEventHandler=t=>{const e=cu(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,qU)})}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,qU)))}}const XU={enterDuration:225,exitDuration:150},KU=Fh({passive:!0,capture:!0}),ZU=["mousedown","touchstart"],QU=["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=qc(n))}fadeInRipple(t,e,n={}){const r=this._containerRect=this._containerRect||this._containerElement.getBoundingClientRect(),s={...XU,...n.animation};n.centered&&(t=r.left+r.width/2,e=r.top+r.height/2);const o=n.radius||function TQ(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,d=document.createElement("div");d.classList.add("mat-ripple-element"),d.style.left=a-o+"px",d.style.top=l-o+"px",d.style.height=2*o+"px",d.style.width=2*o+"px",null!=n.color&&(d.style.backgroundColor=n.color),d.style.transitionDuration=`${c}ms`,this._containerElement.appendChild(d);const h=window.getComputedStyle(d),m=h.transitionDuration,g="none"===h.transitionProperty||"0s"===m||"0s, 0s"===m||0===r.width&&0===r.height,b=new EQ(this,d,n,g);d.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);d.addEventListener("transitionend",y),d.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={...XU,...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=qc(t);!this._platform.isBrowser||!e||e===this._triggerElement||(this._removeTriggerEvents(),this._triggerElement=e,ZU.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(()=>{QU.forEach(e=>{this._triggerElement.addEventListener(e,this,KU)})}),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=YI(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&&(ZU.forEach(e=>Lm._eventManager.removeHandler(e,t,this)),this._pointerUpEventsRegistered&&QU.forEach(e=>t.removeEventListener(e,this,KU)))}}Lm._eventManager=new AQ;const eR=new me("mat-ripple-global-options");let Vh=(()=>{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)(E(vt),E(gt),E(zi),E(eR,8),E(kr,8))},i.\u0275dir=ve({type:i,selectors:[["","mat-ripple",""],["","matRipple",""]],hostAttrs:[1,"mat-ripple"],hostVars:2,hostBindings:function(e,n){2&e&&ln("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})(),tb=(()=>{class i{}return i.\u0275fac=function(e){return new(e||i)},i.\u0275mod=en({type:i}),i.\u0275inj=Wt({imports:[Jn,Jn]}),i})(),IQ=(()=>{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)(E(kr,8))},i.\u0275cmp=ot({type:i,selectors:[["mat-pseudo-checkbox"]],hostAttrs:[1,"mat-pseudo-checkbox"],hostVars:12,hostBindings:function(e,n){2&e&&ln("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})(),JU=(()=>{class i{}return i.\u0275fac=function(e){return new(e||i)},i.\u0275mod=en({type:i}),i.\u0275inj=Wt({imports:[Jn]}),i})();const eV=new me("MAT_OPTION_PARENT_COMPONENT"),tV=new me("MatOptgroup");let RQ=0;class kQ{constructor(t,e=!1){this.source=t,this.isUserInput=e}}let PQ=(()=>{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=tn(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-"+RQ++,this.onSelectionChange=new $e,this._stateChanges=new Te}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)&&!Qo(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 kQ(this,e))}}return i.\u0275fac=function(e){Co()},i.\u0275dir=ve({type:i,viewQuery:function(e,n){if(1&e&&$n(gQ,7),2&e){let r;At(r=Dt())&&(n._text=r.first)}},inputs:{value:"value",id:"id",disabled:"disabled"},outputs:{onSelectionChange:"onSelectionChange"}}),i})(),Nm=(()=>{class i extends PQ{constructor(e,n,r,s){super(e,n,r,s)}}return i.\u0275fac=function(e){return new(e||i)(E(vt),E(Qn),E(eV,8),E(tV,8))},i.\u0275cmp=ot({type:i,selectors:[["mat-option"]],hostAttrs:["role","option",1,"mat-mdc-option","mdc-list-item"],hostVars:11,hostBindings:function(e,n){1&e&&Oe("click",function(){return n._selectViaInteraction()})("keydown",function(s){return n._handleKeydown(s)}),2&e&&(ql("id",n.id),It("aria-selected",n.selected)("aria-disabled",n.disabled.toString()),ln("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:[dt],ngContentSelectors:xQ,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&&(or(bQ),fe(0,_Q,1,2,"mat-pseudo-checkbox",0),Yt(1),G(2,"span",1,2),Yt(4,1),j(),fe(5,vQ,1,1,"mat-pseudo-checkbox",3),fe(6,yQ,2,1,"span",4),Ie(7,"div",5)),2&e&&(U("ngIf",n.multiple),V(5),U("ngIf",!n.multiple&&n.selected&&!n.hideSingleSelectionIndicator),V(1),U("ngIf",n.group&&n.group._inert),V(1),U("matRippleTrigger",n._getHostElement())("matRippleDisabled",n.disabled||n.disableRipple))},dependencies:[Vh,_i,IQ],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})(),tR=(()=>{class i{}return i.\u0275fac=function(e){return new(e||i)},i.\u0275mod=en({type:i}),i.\u0275inj=Wt({imports:[tb,co,Jn,JU]}),i})();class nV{}class LQ{}const Kc="*";function Oa(i,t){return{type:7,name:i,definitions:t,options:{}}}function Yr(i,t=null){return{type:4,styles:t,timings:i}}function rV(i,t=null){return{type:2,steps:i,options:t}}function oi(i){return{type:6,styles:i,offset:null}}function Os(i,t,e){return{type:0,name:i,styles:t,options:e}}function sV(i){return{type:5,steps:i}}function Or(i,t,e=null){return{type:1,expr:i,animation:t,options:e}}function nR(i=null){return{type:9,options:i}}function iR(i,t,e=null){return{type:11,selector:i,animation:t,options:e}}function oV(i){Promise.resolve().then(i)}class nb{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(){oV(()=>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 aV{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?oV(()=>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 rR="!";function NQ(i,t){}class qM{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 sR="mdc-dialog--open",lV="mdc-dialog--opening",cV="mdc-dialog--closing";let VQ=(()=>{class i extends VU{constructor(e,n,r,s,o,a,l,c){super(e,n,r,s,o,a,l,c),this._animationStateChanged=new $e}_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)(E(vt),E(jI),E(qt,8),E(qM),E($M),E(gt),E(Qy),E(Xc))},i.\u0275cmp=ot({type:i,selectors:[["ng-component"]],features:[dt],decls:0,vars:0,template:function(e,n){},encapsulation:2}),i})();const dV="--mat-dialog-transition-duration";function uV(i){return null==i?null:"number"==typeof i?i:i.endsWith("ms")?Ps(i.substring(0,i.length-2)):i.endsWith("s")?1e3*Ps(i.substring(0,i.length-1)):"0"===i?0:null}let zQ=(()=>{class i extends VQ{constructor(e,n,r,s,o,a,l,c,d){super(e,n,r,s,o,a,l,d),this._animationMode=c,this._animationsEnabled="NoopAnimations"!==this._animationMode,this._hostElement=this._elementRef.nativeElement,this._openAnimationDuration=this._animationsEnabled?uV(this._config.enterAnimationDuration)??150:0,this._closeAnimationDuration=this._animationsEnabled?uV(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(dV,`${this._openAnimationDuration}ms`),this._requestAnimationFrame(()=>this._hostElement.classList.add(lV,sR)),this._waitForAnimationToComplete(this._openAnimationDuration,this._finishDialogOpen)):(this._hostElement.classList.add(sR),Promise.resolve().then(()=>this._finishDialogOpen()))}_startExitAnimation(){this._animationStateChanged.emit({state:"closing",totalTime:this._closeAnimationDuration}),this._hostElement.classList.remove(sR),this._animationsEnabled?(this._hostElement.style.setProperty(dV,`${this._openAnimationDuration}ms`),this._requestAnimationFrame(()=>this._hostElement.classList.add(cV)),this._waitForAnimationToComplete(this._closeAnimationDuration,this._finishDialogClose)):Promise.resolve().then(()=>this._finishDialogClose())}_clearAnimationClasses(){this._hostElement.classList.remove(lV,cV)}_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)(E(vt),E(jI),E(qt,8),E(qM),E($M),E(gt),E(Qy),E(kr,8),E(Xc))},i.\u0275cmp=ot({type:i,selectors:[["mat-dialog-container"]],hostAttrs:["tabindex","-1",1,"mat-mdc-dialog-container","mdc-dialog"],hostVars:8,hostBindings:function(e,n){2&e&&(ql("id",n._config.id),It("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),ln("_mat-animation-noopable",!n._animationsEnabled))},features:[dt],decls:3,vars:0,consts:[[1,"mdc-dialog__container"],[1,"mat-mdc-dialog-surface","mdc-dialog__surface"],["cdkPortalOutlet",""]],template:function(e,n){1&e&&(G(0,"div",0)(1,"div",1),fe(2,NQ,0,0,"ng-template",2),j()())},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 ib{constructor(t,e,n){this._ref=t,this._containerInstance=n,this._afterOpened=new Te,this._beforeClosed=new Te,this._state=0,this.disableClose=e.disableClose,this.id=t.id,n._animationStateChanged.pipe(gn(r=>"opened"===r.state),Oi(1)).subscribe(()=>{this._afterOpened.next(),this._afterOpened.complete()}),n._animationStateChanged.pipe(gn(r=>"closed"===r.state),Oi(1)).subscribe(()=>{clearTimeout(this._closeFallbackTimeout),this._finishDialogClose()}),t.overlayRef.detachments().subscribe(()=>{this._beforeClosed.next(this._result),this._beforeClosed.complete(),this._finishDialogClose()}),Cr(this.backdropClick(),this.keydownEvents().pipe(gn(r=>27===r.keyCode&&!this.disableClose&&!Qo(r)))).subscribe(r=>{this.disableClose||(r.preventDefault(),hV(this,"keydown"===r.type?"keyboard":"mouse"))})}close(t){this._result=t,this._containerInstance._animationStateChanged.pipe(gn(e=>"closing"===e.state),Oi(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 hV(i,t,e){return i._closeInteractionType=t,i.close(e)}const oR=new me("MatMdcDialogData"),HQ=new me("mat-mdc-dialog-default-options"),fV=new me("mat-mdc-dialog-scroll-strategy"),GQ={provide:fV,deps:[as],useFactory:function $Q(i){return()=>i.scrollStrategies.block()}};let WQ=0,jQ=(()=>{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,d,h){this._overlay=e,this._defaultOptions=r,this._parentDialog=s,this._dialogRefConstructor=l,this._dialogContainerType=c,this._dialogDataToken=d,this._openDialogsAtThisLevel=[],this._afterAllClosedAtThisLevel=new Te,this._afterOpenedAtThisLevel=new Te,this._idPrefix="mat-dialog-",this.dialogConfigClass=qM,this.afterAllClosed=Ey(()=>this.openDialogs.length?this._getAfterAllClosed():this._getAfterAllClosed().pipe(Do(void 0))),this._scrollStrategy=a,this._dialog=n.get(HU)}open(e,n){let r;(n={...this._defaultOptions||new qM,...n}).id=n.id||`${this._idPrefix}${WQ++}`,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:WM,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){Co()},i.\u0275prov=Pe({token:i,factory:i.\u0275fac}),i})(),Bm=(()=>{class i extends jQ{constructor(e,n,r,s,o,a,l,c){super(e,n,s,a,l,o,ib,zQ,oR,c),this._idPrefix="mat-mdc-dialog-"}}return i.\u0275fac=function(e){return new(e||i)(ee(as),ee(Gi),ee(_y,8),ee(HQ,8),ee(fV),ee(i,12),ee(VM),ee(kr,8))},i.\u0275prov=Pe({token:i,factory:i.\u0275fac}),i})(),YQ=0,qQ=(()=>{class i{constructor(e,n,r){this.dialogRef=e,this._elementRef=n,this._dialog=r,this.type="button"}ngOnInit(){this.dialogRef||(this.dialogRef=_V(this._elementRef,this._dialog.openDialogs))}ngOnChanges(e){const n=e._matDialogClose||e._matDialogCloseResult;n&&(this.dialogResult=n.currentValue)}_onButtonClick(e){hV(this.dialogRef,0===e.screenX&&0===e.screenY?"keyboard":"mouse",this.dialogResult)}}return i.\u0275fac=function(e){return new(e||i)(E(ib,8),E(vt),E(Bm))},i.\u0275dir=ve({type:i,selectors:[["","mat-dialog-close",""],["","matDialogClose",""]],hostVars:2,hostBindings:function(e,n){1&e&&Oe("click",function(s){return n._onButtonClick(s)}),2&e&&It("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:[xi]}),i})(),pV=(()=>{class i{constructor(e,n,r){this._dialogRef=e,this._elementRef=n,this._dialog=r,this.id="mat-mdc-dialog-title-"+YQ++}ngOnInit(){this._dialogRef||(this._dialogRef=_V(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)(E(ib,8),E(vt),E(Bm))},i.\u0275dir=ve({type:i,selectors:[["","mat-dialog-title",""],["","matDialogTitle",""]],hostAttrs:[1,"mat-mdc-dialog-title","mdc-dialog__title"],hostVars:1,hostBindings:function(e,n){2&e&&ql("id",n.id)},inputs:{id:"id"},exportAs:["matDialogTitle"]}),i})(),mV=(()=>{class i{}return i.\u0275fac=function(e){return new(e||i)},i.\u0275dir=ve({type:i,selectors:[["","mat-dialog-content",""],["mat-dialog-content"],["","matDialogContent",""]],hostAttrs:[1,"mat-mdc-dialog-content","mdc-dialog__content"]}),i})(),gV=(()=>{class i{constructor(){this.align="start"}}return i.\u0275fac=function(e){return new(e||i)},i.\u0275dir=ve({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&&ln("mat-mdc-dialog-actions-align-center","center"===n.align)("mat-mdc-dialog-actions-align-end","end"===n.align)},inputs:{align:"align"}}),i})();function _V(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 vV=(()=>{class i{}return i.\u0275fac=function(e){return new(e||i)},i.\u0275mod=en({type:i}),i.\u0275inj=Wt({providers:[Bm,GQ],imports:[mQ,Pm,Bh,Jn,Jn]}),i})();const XQ=["mat-button",""],bV=[[["",8,"material-icons",3,"iconPositionEnd",""],["mat-icon",3,"iconPositionEnd",""],["","matButtonIcon","",3,"iconPositionEnd",""]],"*",[["","iconPositionEnd","",8,"material-icons"],["mat-icon","iconPositionEnd",""],["","matButtonIcon","","iconPositionEnd",""]]],xV=[".material-icons:not([iconPositionEnd]), mat-icon:not([iconPositionEnd]), [matButtonIcon]:not([iconPositionEnd])","*",".material-icons[iconPositionEnd], mat-icon[iconPositionEnd], [matButtonIcon][iconPositionEnd]"],ZQ=["mat-mini-fab",""],JQ=["mat-icon-button",""],eJ=["*"],tJ=[{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"]}],nJ=Jy(jM(YM(class{constructor(i){this._elementRef=i}})));let aR=(()=>{class i extends nJ{constructor(e,n,r,s){super(e),this._platform=n,this._ngZone=r,this._animationMode=s,this._focusMonitor=Lt(Xc),this._isFab=!1;const o=e.nativeElement.classList;for(const a of tJ)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){Co()},i.\u0275dir=ve({type:i,viewQuery:function(e,n){if(1&e&&$n(Vh,5),2&e){let r;At(r=Dt())&&(n.ripple=r.first)}},features:[dt]}),i})(),rb=(()=>{class i extends aR{constructor(e,n,r,s){super(e,n,r,s)}}return i.\u0275fac=function(e){return new(e||i)(E(vt),E(zi),E(gt),E(kr,8))},i.\u0275cmp=ot({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&&(It("disabled",n.disabled||null),ln("_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:[dt],attrs:XQ,ngContentSelectors:xV,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&&(or(bV),Ie(0,"span",0),Yt(1),G(2,"span",1),Yt(3,1),j(),Yt(4,2),Ie(5,"span",2)(6,"span",3)(7,"span",4)),2&e&&(ln("mdc-button__ripple",!n._isFab)("mdc-fab__ripple",n._isFab),V(6),U("matRippleDisabled",n._isRippleDisabled())("matRippleTrigger",n._elementRef.nativeElement))},dependencies:[Vh],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 rJ=new me("mat-mdc-fab-default-options",{providedIn:"root",factory:wV});function wV(){return{color:"accent"}}const MV=wV();let CV=(()=>{class i extends aR{constructor(e,n,r,s,o){super(e,n,r,s),this._options=o,this._isFab=!0,this._options=this._options||MV,this.color=this.defaultColor=this._options.color||MV.color}}return i.\u0275fac=function(e){return new(e||i)(E(vt),E(zi),E(gt),E(kr,8),E(rJ,8))},i.\u0275cmp=ot({type:i,selectors:[["button","mat-mini-fab",""]],hostVars:7,hostBindings:function(e,n){2&e&&(It("disabled",n.disabled||null),ln("_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:[dt],attrs:ZQ,ngContentSelectors:xV,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&&(or(bV),Ie(0,"span",0),Yt(1),G(2,"span",1),Yt(3,1),j(),Yt(4,2),Ie(5,"span",2)(6,"span",3)(7,"span",4)),2&e&&(ln("mdc-button__ripple",!n._isFab)("mdc-fab__ripple",n._isFab),V(6),U("matRippleDisabled",n._isRippleDisabled())("matRippleTrigger",n._elementRef.nativeElement))},dependencies:[Vh],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})(),XM=(()=>{class i extends aR{constructor(e,n,r,s){super(e,n,r,s)}}return i.\u0275fac=function(e){return new(e||i)(E(vt),E(zi),E(gt),E(kr,8))},i.\u0275cmp=ot({type:i,selectors:[["button","mat-icon-button",""]],hostVars:7,hostBindings:function(e,n){2&e&&(It("disabled",n.disabled||null),ln("_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:[dt],attrs:JQ,ngContentSelectors:eJ,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&&(or(),Ie(0,"span",0),Yt(1),Ie(2,"span",1)(3,"span",2)(4,"span",3)),2&e&&(V(3),U("matRippleDisabled",n._isRippleDisabled())("matRippleCentered",!0)("matRippleTrigger",n._elementRef.nativeElement))},dependencies:[Vh],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})(),KM=(()=>{class i{}return i.\u0275fac=function(e){return new(e||i)},i.\u0275mod=en({type:i}),i.\u0275inj=Wt({imports:[Jn,tb,Jn]}),i})();const sJ=["class","dialog"];let SV=(()=>{class i{constructor(e,n){this.dialogRef=e,this.data=n}}return i.\u0275fac=function(e){return new(e||i)(E(ib),E(oR))},i.\u0275cmp=ot({type:i,selectors:[["app-confirm",8,"dialog"]],attrs:sJ,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&&(G(0,"h1",0),Be(1,"Confirmation"),j(),G(2,"div",1)(3,"p"),Be(4),j()(),G(5,"div",2)(6,"button",3),Oe("click",function(){return n.dialogRef.close()}),Be(7,"Cancel"),j(),G(8,"button",4),Be(9,"Yes"),j()()),2&e&&(V(4),ui(n.data.text),V(4),U("mat-dialog-close",!0))},dependencies:[rb,qQ,pV,mV,gV]}),i})();function lR(i,t){const e="object"==typeof t;return new Promise((n,r)=>{const s=new fa({next:o=>{n(o),s.unsubscribe()},error:r,complete:()=>{e?n(t.defaultValue):r(new fm)}});i.subscribe(s)})}let Jl=(()=>{class i{constructor(e){this.ngZone=e,this.openedResource$=new Qe(null),this.openedResourcePath$=new Qe(null),eel.expose(this.wrapHandler(this.openFile),"open_file"),eel.on_angular_ready(),setTimeout(nt(function*(){for(;;){if(eel._websocket){eel._websocket.onclose=()=>window.close();break}yield new Promise(n=>setTimeout(n,0))}}),0)}wrapHandler(e){return(...n)=>{try{gt.assertInAngularZone(),e.bind(this)(...n)}catch{this.ngZone.run(e,this,n)}}}openFile(e,n=!1){var r=this;return nt(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 nt(function*(){yield eel.open_file_with_system_app(e)()})()}retrieveValue(e){return nt(function*(){return yield eel.retrieve_value(e)()})()}runCustomAction(e,n,r){return nt(function*(){return eel.run_custom_action(e,n,r)()})()}saveFile(e){var n=this;return nt(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 nt(function*(){return eel.serialize_resource(e,n)()})()}serializeResourceTmp(e,n,r={}){return nt(function*(){return eel.serialize_resource_tmp(e,n,r)()})()}serializeReversible(e,n){return nt(function*(){return eel.serialize_reversible(e,n)()})()}deserializeResource(e){return nt(function*(){return eel.deserialize_resource(e)()})()}}return i.\u0275fac=function(e){return new(e||i)(ee(gt))},i.\u0275prov=Pe({token:i,factory:i.\u0275fac,providedIn:"root"}),i})();var cR=ps(489);const EV=i=>!(!i||"object"!=typeof i),AV=(i={},t,e,n=[])=>{const r=[];if(EV(i)){const s=Object.entries(i);for(let o=0;o{class i{constructor(e){var n=this;this.eelDelegate=e,this._hasUnsavedChanges$=new Qe(!1),this.resource$=new Qe(null),this.error$=new Qe(null),this.customActionRunning$=new Qe(!1),this.changedDataBlocks={},this.dataBlockChange$=new Te,this.hideHiddenFields$=new Qe(!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=AV(r.schema,"is_recursive_ref",!0);for(const[o,a]of s){const l=o.block_class_mro;let c=r.schema,d=c.block_class_mro===l?c:void 0;for(const h of a.slice(0,a.length-1))!d&&c[h]?.block_class_mro===l&&(d=c[h]),c=c[h];c[a[a.length-1]]=d}this.resource$.next(r),this.error$.next(null)}else this.resource$.next(null),this.error$.next(null)}),this.dataBlockChange$.subscribe(function(){var r=nt(function*([s,o]){n.changedDataBlocks[s]=o,n.updateUnsavedChanges();const a=yield n.eelDelegate.retrieveValue(s);n.changedDataBlocks[s]==o&&((0,cR.isNumber)(o)?Math.abs(o-a)<1e-10:(0,cR.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 nt(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 nt(function*(){return s.processExternalChanges(e,()=>s.eelDelegate.runCustomAction(e,n,r))})()}deserializeResource(e){var n=this;return nt(function*(){return n.processExternalChanges(e,()=>n.eelDelegate.deserializeResource(e))})()}reloadResource(){var e=this;return nt(function*(){const n=e.eelDelegate.openedResourcePath$.getValue();n&&e.eelDelegate.openFile(n,!0).then()})()}saveResource(){var e=this;return nt(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)(ee(Jl))},i.\u0275prov=Pe({token:i,factory:i.\u0275fac,providedIn:"root"}),i})();function oJ(i,t){if(1&i){const e=jn();G(0,"div",2)(1,"button",3),Oe("click",function(){return Vt(e),Et(re().action())}),Be(2),j()()}if(2&i){const e=re();V(2),Qi(" ",e.data.action," ")}}const aJ=["label"];function lJ(i,t){}const cJ=Math.pow(2,31)-1;class dR{constructor(t,e){this._overlayRef=e,this._afterDismissed=new Te,this._afterOpened=new Te,this._onAction=new Te,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,cJ))}_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 DV=new me("MatSnackBarData");class ZM{constructor(){this.politeness="assertive",this.announcementMessage="",this.duration=0,this.data=null,this.horizontalPosition="center",this.verticalPosition="bottom"}}let dJ=(()=>{class i{}return i.\u0275fac=function(e){return new(e||i)},i.\u0275dir=ve({type:i,selectors:[["","matSnackBarLabel",""]],hostAttrs:[1,"mat-mdc-snack-bar-label","mdc-snackbar__label"]}),i})(),uJ=(()=>{class i{}return i.\u0275fac=function(e){return new(e||i)},i.\u0275dir=ve({type:i,selectors:[["","matSnackBarActions",""]],hostAttrs:[1,"mat-mdc-snack-bar-actions","mdc-snackbar__actions"]}),i})(),hJ=(()=>{class i{}return i.\u0275fac=function(e){return new(e||i)},i.\u0275dir=ve({type:i,selectors:[["","matSnackBarAction",""]],hostAttrs:[1,"mat-mdc-snack-bar-action","mdc-snackbar__action"]}),i})(),fJ=(()=>{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)(E(dR),E(DV))},i.\u0275cmp=ot({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&&(G(0,"div",0),Be(1),j(),fe(2,oJ,3,1,"div",1)),2&e&&(V(1),Qi(" ",n.data.message,"\n"),V(1),U("ngIf",n.hasAction))},dependencies:[_i,rb,dJ,uJ,hJ],styles:[".mat-mdc-simple-snack-bar{display:flex}"],encapsulation:2,changeDetection:0}),i})();const pJ={snackBarState:Oa("state",[Os("void, hidden",oi({transform:"scale(0.8)",opacity:0})),Os("visible",oi({transform:"scale(1)",opacity:1})),Or("* => visible",Yr("150ms cubic-bezier(0, 0, 0.2, 1)")),Or("* => void, * => hidden",Yr("75ms cubic-bezier(0.4, 0.0, 1, 1)",oi({opacity:0})))])};let mJ=0,gJ=(()=>{class i extends NM{constructor(e,n,r,s,o){super(),this._ngZone=e,this._elementRef=n,this._changeDetectorRef=r,this._platform=s,this.snackBarConfig=o,this._document=Lt(qt),this._trackedModals=new Set,this._announceDelay=150,this._destroyed=!1,this._onAnnounce=new Te,this._onExit=new Te,this._onEnter=new Te,this._animationState="void",this._liveElementId="mat-snack-bar-container-live-"+mJ++,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(Oi(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)(E(gt),E(vt),E(Qn),E(zi),E(ZM))},i.\u0275dir=ve({type:i,viewQuery:function(e,n){if(1&e&&$n(Am,7),2&e){let r;At(r=Dt())&&(n._portalOutlet=r.first)}},features:[dt]}),i})(),_J=(()=>{class i extends gJ{_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=si(i)))(n||i)}}(),i.\u0275cmp=ot({type:i,selectors:[["mat-snack-bar-container"]],viewQuery:function(e,n){if(1&e&&$n(aJ,7),2&e){let r;At(r=Dt())&&(n._label=r.first)}},hostAttrs:[1,"mdc-snackbar","mat-mdc-snack-bar-container","mdc-snackbar--open"],hostVars:1,hostBindings:function(e,n){1&e&&ND("@state.done",function(s){return n.onAnimationEnd(s)}),2&e&&Rw("@state",n._animationState)},features:[dt],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&&(G(0,"div",0)(1,"div",1,2)(3,"div",3),fe(4,lJ,0,0,"ng-template",4),j(),Ie(5,"div"),j()()),2&e&&(V(5),It("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:[pJ.snackBarState]}}),i})(),TV=(()=>{class i{}return i.\u0275fac=function(e){return new(e||i)},i.\u0275mod=en({type:i}),i.\u0275inj=Wt({imports:[Pm,Bh,co,KM,Jn,Jn]}),i})();const IV=new me("mat-snack-bar-default-options",{providedIn:"root",factory:function vJ(){return new ZM}});let yJ=(()=>{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=Gi.create({parent:n&&n.viewContainerRef&&n.viewContainerRef.injector||this._injector,providers:[{provide:ZM,useValue:n}]}),o=new Nh(this.snackBarContainerComponent,n.viewContainerRef,s),a=e.attach(o);return a.instance.snackBarConfig=n,a.instance}_attach(e,n){const r={...new ZM,...this._defaultConfig,...n},s=this._createOverlay(r),o=this._attachSnackBarContainer(s,r),a=new dR(o,s);if(e instanceof Eo){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 Nh(e,void 0,l),d=o.attachComponentPortal(c);a.instance=d.instance}return this._breakpointObserver.observe("(max-width: 599.98px) and (orientation: portrait)").pipe(Ue(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 Gi.create({parent:e&&e.viewContainerRef&&e.viewContainerRef.injector||this._injector,providers:[{provide:dR,useValue:n},{provide:DV,useValue:e.data}]})}}return i.\u0275fac=function(e){return new(e||i)(ee(as),ee(XI),ee(Gi),ee($I),ee(i,12),ee(IV))},i.\u0275prov=Pe({token:i,factory:i.\u0275fac}),i})(),RV=(()=>{class i extends yJ{constructor(e,n,r,s,o,a){super(e,n,r,s,o,a),this.simpleSnackBarComponent=fJ,this.snackBarContainerComponent=_J,this.handsetCssClass="mat-mdc-snack-bar-handset"}}return i.\u0275fac=function(e){return new(e||i)(ee(as),ee(XI),ee(Gi),ee($I),ee(i,12),ee(IV))},i.\u0275prov=Pe({token:i,factory:i.\u0275fac,providedIn:TV}),i})();const bJ=["*",[["mat-toolbar-row"]]],xJ=["*","mat-toolbar-row"],wJ=Jy(class{constructor(i){this._elementRef=i}});let MJ=(()=>{class i{}return i.\u0275fac=function(e){return new(e||i)},i.\u0275dir=ve({type:i,selectors:[["mat-toolbar-row"]],hostAttrs:[1,"mat-toolbar-row"],exportAs:["matToolbarRow"]}),i})(),CJ=(()=>{class i extends wJ{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)(E(vt),E(zi),E(qt))},i.\u0275cmp=ot({type:i,selectors:[["mat-toolbar"]],contentQueries:function(e,n,r){if(1&e&&Wi(r,MJ,5),2&e){let s;At(s=Dt())&&(n._toolbarRows=s)}},hostAttrs:[1,"mat-toolbar"],hostVars:4,hostBindings:function(e,n){2&e&&ln("mat-toolbar-multiple-rows",n._toolbarRows.length>0)("mat-toolbar-single-row",0===n._toolbarRows.length)},inputs:{color:"color"},exportAs:["matToolbar"],features:[dt],ngContentSelectors:xJ,decls:2,vars:0,template:function(e,n){1&e&&(or(bJ),Yt(0),Yt(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})(),SJ=(()=>{class i{}return i.\u0275fac=function(e){return new(e||i)},i.\u0275mod=en({type:i}),i.\u0275inj=Wt({imports:[Jn,Jn]}),i})(),EJ=(()=>{class i{constructor(){this._vertical=!1,this._inset=!1}get vertical(){return this._vertical}set vertical(e){this._vertical=tn(e)}get inset(){return this._inset}set inset(e){this._inset=tn(e)}}return i.\u0275fac=function(e){return new(e||i)},i.\u0275cmp=ot({type:i,selectors:[["mat-divider"]],hostAttrs:["role","separator",1,"mat-divider"],hostVars:7,hostBindings:function(e,n){2&e&&(It("aria-orientation",n.vertical?"vertical":"horizontal"),ln("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})(),kV=(()=>{class i{}return i.\u0275fac=function(e){return new(e||i)},i.\u0275mod=en({type:i}),i.\u0275inj=Wt({imports:[Jn,Jn]}),i})();const AJ=["tooltip"],PV=new me("mat-tooltip-scroll-strategy"),IJ={provide:PV,deps:[as],useFactory:function TJ(i){return()=>i.scrollStrategies.reposition({scrollThrottle:20})}},kJ=new me("mat-tooltip-default-options",{providedIn:"root",factory:function RJ(){return{showDelay:0,hideDelay:0,touchendHideDelay:1500}}}),OV="tooltip-panel",FV=Fh({passive:!0});let BJ=(()=>{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=tn(e),this._detach(),this._overlayRef=null}get disabled(){return this._disabled}set disabled(e){this._disabled=tn(e),this._disabled?this.hide(0):this._setupPointerEnterEventsIfNeeded()}get showDelay(){return this._showDelay}set showDelay(e){this._showDelay=Ps(e)}get hideDelay(){return this._hideDelay}set hideDelay(e){this._hideDelay=Ps(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,d,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 Te,this._scrollStrategy=d,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(Ue(this._destroyed)).subscribe(()=>{this._overlayRef&&this._updatePosition(this._overlayRef)})}ngAfterViewInit(){this._viewInitialized=!0,this._setupPointerEnterEventsIfNeeded(),this._focusMonitor.monitor(this._elementRef).pipe(Ue(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,FV)}),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 Nh(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(Ue(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 vt)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(Ue(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}-${OV}`,scrollStrategy:this._scrollStrategy()}),this._updatePosition(this._overlayRef),this._overlayRef.detachments().pipe(Ue(this._destroyed)).subscribe(()=>this._detach()),this._overlayRef.outsidePointerEvents().pipe(Ue(this._destroyed)).subscribe(()=>this._tooltipInstance?._handleBodyInteraction()),this._overlayRef.keydownEvents().pipe(Ue(this._destroyed)).subscribe(s=>{this._isTooltipVisible()&&27===s.keyCode&&!Qo(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(Oi(1),Ue(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}-${OV}-`;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,FV)})}_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){Co()},i.\u0275dir=ve({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})(),Fs=(()=>{class i extends BJ{constructor(e,n,r,s,o,a,l,c,d,h,p,m){super(e,n,r,s,o,a,l,c,d,h,p,m),this._tooltipComponent=VJ,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)(E(as),E(vt),E(Xy),E(jr),E(gt),E(zi),E(HZ),E(Xc),E(PV),E(Pa,8),E(kJ,8),E(qt))},i.\u0275dir=ve({type:i,selectors:[["","matTooltip",""]],hostAttrs:[1,"mat-mdc-tooltip-trigger"],exportAs:["matTooltip"],features:[dt]}),i})(),UJ=(()=>{class i{constructor(e,n){this._changeDetectorRef=e,this._closeOnInteraction=!1,this._isVisible=!1,this._onHide=new Te,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)(E(Qn),E(kr,8))},i.\u0275dir=ve({type:i}),i})(),VJ=(()=>{class i extends UJ{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)(E(Qn),E(vt),E(kr,8))},i.\u0275cmp=ot({type:i,selectors:[["mat-tooltip-component"]],viewQuery:function(e,n){if(1&e&&$n(AJ,7),2&e){let r;At(r=Dt())&&(n._tooltip=r.first)}},hostAttrs:["aria-hidden","true"],hostVars:2,hostBindings:function(e,n){1&e&&Oe("mouseleave",function(s){return n._handleMouseLeave(s)}),2&e&&qo("zoom",n.isVisible()?1:null)},features:[dt],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&&(G(0,"div",0,1),Oe("animationend",function(s){return n._handleAnimationEnd(s)}),G(2,"div",2),Be(3),j()()),2&e&&(ln("mdc-tooltip--multiline",n._isMultiline),U("ngClass",n.tooltipClass),V(3),ui(n.message))},dependencies:[hm],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})(),LV=(()=>{class i{}return i.\u0275fac=function(e){return new(e||i)},i.\u0275mod=en({type:i}),i.\u0275inj=Wt({providers:[IJ],imports:[UU,co,Pm,Jn,Jn,Ky]}),i})();function NV(...i){const t=M0(i),{args:e,keys:n}=zB(i),r=new In(s=>{const{length:o}=e;if(!o)return void s.complete();const a=new Array(o);let l=o,c=o;for(let d=0;d{h||(h=!0,c--),a[d]=p},()=>l--,void 0,()=>{(!l||!h)&&(c||s.next(n?HB(n,a):a),s.complete())}))}});return t?r.pipe(JT(t)):r}class uR{}class uu{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 uu?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 uu;return e.lazyInit=this.lazyInit&&this.lazyInit instanceof uu?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 zJ{encodeKey(t){return UV(t)}encodeValue(t){return UV(t)}decodeKey(t){return decodeURIComponent(t)}decodeValue(t){return decodeURIComponent(t)}}const $J=/%(\d[a-f0-9])/gi,GJ={40:"@","3A":":",24:"$","2C":",","3B":";","3D":"=","3F":"?","2F":"/"};function UV(i){return encodeURIComponent(i).replace($J,(t,e)=>GJ[e]??t)}function QM(i){return`${i}`}class hu{constructor(t={}){if(this.updates=null,this.cloneFrom=null,this.encoder=t.encoder||new zJ,t.fromString){if(t.fromObject)throw new Error("Cannot specify both fromString and fromObject.");this.map=function HJ(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 hu({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 WJ{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 VV(i){return typeof ArrayBuffer<"u"&&i instanceof ArrayBuffer}function zV(i){return typeof Blob<"u"&&i instanceof Blob}function HV(i){return typeof FormData<"u"&&i instanceof FormData}class sb{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 jJ(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 uu),this.context||(this.context=new WJ),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 sb(e,n,s,{params:c,headers:l,context:d,reportProgress:a,responseType:r,withCredentials:o})}}var ls=(()=>((ls=ls||{})[ls.Sent=0]="Sent",ls[ls.UploadProgress=1]="UploadProgress",ls[ls.ResponseHeader=2]="ResponseHeader",ls[ls.DownloadProgress=3]="DownloadProgress",ls[ls.Response=4]="Response",ls[ls.User=5]="User",ls))();class qJ{constructor(t,e=200,n="OK"){this.headers=t.headers||new uu,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 hR extends qJ{constructor(t={}){super(t),this.type=ls.Response,this.body=void 0!==t.body?t.body:null}clone(t={}){return new hR({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 fR(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 pR=(()=>{class i{constructor(e){this.handler=e}request(e,n,r={}){let s;if(e instanceof sb)s=e;else{let l,c;l=r.headers instanceof uu?r.headers:new uu(r.headers),r.params&&(c=r.params instanceof hu?r.params:new hu({fromObject:r.params})),s=new sb(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=mt(s).pipe(ru(l=>this.handler.handle(l)));if(e instanceof sb||"events"===r.observe)return o;const a=o.pipe(gn(l=>l instanceof hR));switch(r.observe||"body"){case"body":switch(s.responseType){case"arraybuffer":return a.pipe(tt(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(tt(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(tt(l=>{if(null!==l.body&&"string"!=typeof l.body)throw new Error("Response is not a string.");return l.body}));default:return a.pipe(tt(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 hu).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,fR(r,n))}post(e,n,r={}){return this.request("POST",e,fR(r,n))}put(e,n,r={}){return this.request("PUT",e,fR(r,n))}}return i.\u0275fac=function(e){return new(e||i)(ee(uR))},i.\u0275prov=Pe({token:i,factory:i.\u0275fac}),i})();const aee=["*"];let eC;function ob(i){return function lee(){if(void 0===eC&&(eC=null,typeof window<"u")){const i=window;void 0!==i.trustedTypes&&(eC=i.trustedTypes.createPolicy("angular#components",{createHTML:t=>t}))}return eC}()?.createHTML(i)||i}function KV(i){return Error(`Unable to find icon with the name "${i}"`)}function ZV(i){return Error(`The URL provided to MatIconRegistry was not trusted as a resource URL via Angular's DomSanitizer. Attempted URL was "${i}".`)}function QV(i){return Error(`The literal provided to MatIconRegistry was not trusted as safe HTML by Angular's DomSanitizer. Attempted literal was "${i}".`)}class zh{constructor(t,e,n){this.url=t,this.svgText=e,this.options=n}}let tC=(()=>{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 zh(r,null,s))}addSvgIconResolver(e){return this._resolvers.push(e),this}addSvgIconLiteralInNamespace(e,n,r,s){const o=this._sanitizer.sanitize(Zn.HTML,r);if(!o)throw QV(r);const a=ob(o);return this._addSvgIconConfig(e,n,new zh("",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 zh(n,null,r))}addSvgIconSetLiteralInNamespace(e,n,r){const s=this._sanitizer.sanitize(Zn.HTML,n);if(!s)throw QV(n);const o=ob(s);return this._addSvgIconSetConfig(e,new zh("",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(Zn.RESOURCE_URL,e);if(!n)throw ZV(e);const r=this._cachedIconsByUrl.get(n);return r?mt(nC(r)):this._loadSvgIconFromConfig(new zh(e,null)).pipe(Vi(s=>this._cachedIconsByUrl.set(n,s)),tt(s=>nC(s)))}getNamedSvgIcon(e,n=""){const r=JV(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(KV(r))}ngOnDestroy(){this._resolvers=[],this._svgIconConfigs.clear(),this._iconSetConfigs.clear(),this._cachedIconsByUrl.clear()}_getSvgFromConfig(e){return e.svgText?mt(nC(this._svgElementFromConfig(e))):this._loadSvgIconFromConfig(e).pipe(tt(n=>nC(n)))}_getSvgFromIconSetConfigs(e,n){const r=this._extractIconWithNameFromAnySet(e,n);return r?mt(r):NV(n.filter(o=>!o.svgText).map(o=>this._loadSvgIconSetFromConfig(o).pipe(jc(a=>{const c=`Loading icon set URL: ${this._sanitizer.sanitize(Zn.RESOURCE_URL,o.url)} failed: ${a.message}`;return this._errorHandler.handleError(new Error(c)),mt(null)})))).pipe(tt(()=>{const o=this._extractIconWithNameFromAnySet(e,n);if(!o)throw KV(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(Vi(n=>e.svgText=n),tt(()=>this._svgElementFromConfig(e)))}_loadSvgIconSetFromConfig(e){return e.svgText?mt(null):this._fetchIcon(e).pipe(Vi(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(ob(""));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(ob("")),r=e.attributes;for(let s=0;sob(c)),su(()=>this._inProgressUrlFetches.delete(o)),Vf());return this._inProgressUrlFetches.set(o,l),l}_addSvgIconConfig(e,n,r){return this._svgIconConfigs.set(JV(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:""}}}),ez=["clip-path","color-profile","src","cursor","fill","filter","marker","marker-start","marker-mid","marker-end","mask","stroke"],gee=ez.map(i=>`[${i}]`).join(", "),_ee=/^url\(['"]?#(.*?)['"]?\)$/;let gR=(()=>{class i extends hee{get inline(){return this._inline}set inline(e){this._inline=tn(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=Qt.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(gee),r=this._elementsWithExternalReferences=this._elementsWithExternalReferences||new Map;for(let s=0;s{const a=n[s],l=a.getAttribute(o),c=l?l.match(_ee):null;if(c){let d=r.get(a);d||(d=[],r.set(a,d)),d.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(Oi(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)(E(vt),E(tC),wa("aria-hidden"),E(pee),E(cl),E(fee,8))},i.\u0275cmp=ot({type:i,selectors:[["mat-icon"]],hostAttrs:["role","img",1,"mat-icon","notranslate"],hostVars:8,hostBindings:function(e,n){2&e&&(It("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),ln("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:[dt],ngContentSelectors:aee,decls:1,vars:0,template:function(e,n){1&e&&(or(),Yt(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})(),tz=(()=>{class i{}return i.\u0275fac=function(e){return new(e||i)},i.\u0275mod=en({type:i}),i.\u0275inj=Wt({imports:[Jn,Jn]}),i})(),nz=(()=>{class i{constructor(e){this.viewContainerRef=e}}return i.\u0275fac=function(e){return new(e||i)(E(jr))},i.\u0275dir=ve({type:i,selectors:[["","dataBlockUI",""]]}),i})(),vee=(()=>{class i{constructor(){this.resource=null,this.name="",this.resourceDescription="",this.changed=new $e}}return i.\u0275fac=function(e){return new(e||i)},i.\u0275cmp=ot({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&&(G(0,"p",0),Be(1),j()),2&e&&(U("matTooltip",n.resourceDescription),V(1),Dh("",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:[Fs],changeDetection:0}),i})();function yee(i,t){if(1&i&&(G(0,"h2",4),Be(1),j()),2&i){const e=re();U("matTooltip",e.resourceDescription),V(1),ui(e.name)}}function bee(i,t){1&i&&Ie(0,"app-block-actions",5),2&i&&U("resource",re().resource)}const xee=function(i,t,e,n){return{id:i,name:t,data:e,schema:n}};function wee(i,t){if(1&i&&Ie(0,"app-editor",7),2&i){const e=re().$implicit,n=re();U("resource",N2(3,xee,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 Mee(i,t){if(1&i&&(Gr(0),fe(1,wee,1,8,"app-editor",6),ct(2,"async"),Wr()),2&i){const e=t.$implicit,n=re();V(1),U("ngIf",!(ut(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 ec=(()=>{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 $e,this.destroyed$=new Te}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(Ue(this.destroyed$),gn(([n,r])=>!!this.resource&&n.startsWith(this.resource.id)&&!n.substring(this.resource.id.length+1).includes("/"))).subscribe(function(){var n=nt(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)(E(Fa))},i.\u0275cmp=ot({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&&(fe(0,yee,2,2,"h2",0),ct(1,"async"),fe(2,bee,1,1,"app-block-actions",1),G(3,"div",2),fe(4,Mee,3,3,"ng-container",3),j()),2&e){let r;U("ngIf",n.name&&n.name!=(null==(r=ut(1,4,n.main.resource$))?null:r.name)),V(2),U("ngIf",!n.hideBlockActions),V(2),U("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})(),iz=(()=>{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)(E(ll),E(vt))},i.\u0275dir=ve({type:i}),i})(),Hh=(()=>{class i extends iz{}return i.\u0275fac=function(){let t;return function(n){return(t||(t=si(i)))(n||i)}}(),i.\u0275dir=ve({type:i,features:[dt]}),i})();const Io=new me("NgValueAccessor"),See={provide:Io,useExisting:Gn(()=>_l),multi:!0},Aee=new me("CompositionEventMode");let _l=(()=>{class i extends iz{constructor(e,n,r){super(e,n),this._compositionMode=r,this._composing=!1,null==this._compositionMode&&(this._compositionMode=!function Eee(){const i=$c()?$c().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)(E(ll),E(vt),E(Aee,8))},i.\u0275dir=ve({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&&Oe("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:[Dn([See]),dt]}),i})();const Dee=!1;function fu(i){return null==i||("string"==typeof i||Array.isArray(i))&&0===i.length}function sz(i){return null!=i&&"number"==typeof i.length}const qr=new me("NgValidators"),pu=new me("NgAsyncValidators"),Tee=/^(?=.{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 vl{static min(t){return oz(t)}static max(t){return az(t)}static required(t){return function lz(i){return fu(i.value)?{required:!0}:null}(t)}static requiredTrue(t){return function cz(i){return!0===i.value?null:{required:!0}}(t)}static email(t){return function dz(i){return fu(i.value)||Tee.test(i.value)?null:{email:!0}}(t)}static minLength(t){return uz(t)}static maxLength(t){return hz(t)}static pattern(t){return function fz(i){if(!i)return iC;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(fu(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 yz(t)}static composeAsync(t){return bz(t)}}function oz(i){return t=>{if(fu(t.value)||fu(i))return null;const e=parseFloat(t.value);return!isNaN(e)&&e{if(fu(t.value)||fu(i))return null;const e=parseFloat(t.value);return!isNaN(e)&&e>i?{max:{max:i,actual:t.value}}:null}}function uz(i){return t=>fu(t.value)||!sz(t.value)?null:t.value.lengthsz(t.value)&&t.value.length>i?{maxlength:{requiredLength:i,actualLength:t.value.length}}:null}function iC(i){return null}function pz(i){return null!=i}function mz(i){const t=oy(i)?Ni(i):i;if(Dee&&!LD(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 pe(-1101,e)}return t}function gz(i){let t={};return i.forEach(e=>{t=null!=e?{...t,...e}:t}),0===Object.keys(t).length?null:t}function _z(i,t){return t.map(e=>e(i))}function vz(i){return i.map(t=>function Iee(i){return!i.validate}(t)?t:e=>t.validate(e))}function yz(i){if(!i)return null;const t=i.filter(pz);return 0==t.length?null:function(e){return gz(_z(e,t))}}function _R(i){return null!=i?yz(vz(i)):null}function bz(i){if(!i)return null;const t=i.filter(pz);return 0==t.length?null:function(e){return NV(_z(e,t).map(mz)).pipe(tt(gz))}}function vR(i){return null!=i?bz(vz(i)):null}function xz(i,t){return null===i?[t]:Array.isArray(i)?[...i,t]:[i,t]}function wz(i){return i._rawValidators}function Mz(i){return i._rawAsyncValidators}function yR(i){return i?Array.isArray(i)?i:[i]:[]}function rC(i,t){return Array.isArray(i)?i.includes(t):i===t}function Cz(i,t){const e=yR(t);return yR(i).forEach(r=>{rC(e,r)||e.push(r)}),e}function Sz(i,t){return yR(t).filter(e=>!rC(i,e))}class Ez{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=_R(this._rawValidators)}_setAsyncValidators(t){this._rawAsyncValidators=t||[],this._composedAsyncValidatorFn=vR(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 uo extends Ez{get formDirective(){return null}get path(){return null}}class tc extends Ez{constructor(){super(...arguments),this._parent=null,this.name=null,this.valueAccessor=null}}class Az{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 nc=(()=>{class i extends Az{constructor(e){super(e)}}return i.\u0275fac=function(e){return new(e||i)(E(tc,2))},i.\u0275dir=ve({type:i,selectors:[["","formControlName",""],["","ngModel",""],["","formControl",""]],hostVars:14,hostBindings:function(e,n){2&e&&ln("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:[dt]}),i})(),bR=(()=>{class i extends Az{constructor(e){super(e)}}return i.\u0275fac=function(e){return new(e||i)(E(uo,10))},i.\u0275dir=ve({type:i,selectors:[["","formGroupName",""],["","formArrayName",""],["","ngModelGroup",""],["","formGroup",""],["form",3,"ngNoForm",""],["","ngForm",""]],hostVars:16,hostBindings:function(e,n){2&e&&ln("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:[dt]}),i})();function Dz(i,t){return i?`with name: '${t}'`:`at index: ${t}`}const MR=!1,ab="VALID",oC="INVALID",zm="PENDING",lb="DISABLED";function CR(i){return(aC(i)?i.validators:i)||null}function SR(i,t){return(aC(t)?t.asyncValidators:i)||null}function aC(i){return null!=i&&!Array.isArray(i)&&"object"==typeof i}function Tz(i,t,e){const n=i.controls;if(!(t?Object.keys(n):n).length)throw new pe(1e3,MR?function Oee(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 pe(1001,MR?function Fee(i,t){return`Cannot find form control ${Dz(i,t)}`}(t,e):"")}function Iz(i,t,e){i._forEachChild((n,r)=>{if(void 0===e[r])throw new pe(1002,MR?function Lee(i,t){return`Must supply a value for form control ${Dz(i,t)}`}(t,r):"")})}class lC{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===ab}get invalid(){return this.status===oC}get pending(){return this.status==zm}get disabled(){return this.status===lb}get enabled(){return this.status!==lb}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(Cz(t,this._rawValidators))}addAsyncValidators(t){this.setAsyncValidators(Cz(t,this._rawAsyncValidators))}removeValidators(t){this.setValidators(Sz(t,this._rawValidators))}removeAsyncValidators(t){this.setAsyncValidators(Sz(t,this._rawAsyncValidators))}hasValidator(t){return rC(this._rawValidators,t)}hasAsyncValidator(t){return rC(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=lb,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=ab,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===ab||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()?lb:ab}_runValidator(){return this.validator?this.validator(this):null}_runAsyncValidator(t){if(this.asyncValidator){this.status=zm,this._hasOwnPendingAsyncValidator=!0;const e=mz(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 $e,this.statusChanges=new $e}_calculateStatus(){return this._allControlsDisabled()?lb:this.errors?oC:this._hasOwnPendingAsyncValidator||this._anyControlsHaveStatus(zm)?zm:this._anyControlsHaveStatus(oC)?oC:ab}_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){aC(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 Nee(i){return Array.isArray(i)?_R(i):i||null}(this._rawValidators)}_assignAsyncValidators(t){this._rawAsyncValidators=Array.isArray(t)?t.slice():t,this._composedAsyncValidatorFn=function Bee(i){return Array.isArray(i)?vR(i):i||null}(this._rawAsyncValidators)}}class Hm extends lC{constructor(t,e,n){super(CR(e),SR(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={}){Iz(this,!0,t),Object.keys(t).forEach(n=>{Tz(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 Rz extends Hm{}const $h=new me("CallSetDisabledState",{providedIn:"root",factory:()=>cb}),cb="always";function cC(i,t){return[...t.path,i]}function db(i,t,e=cb){ER(i,t),t.valueAccessor.writeValue(i.value),(i.disabled||"always"===e)&&t.valueAccessor.setDisabledState?.(i.disabled),function Vee(i,t){t.valueAccessor.registerOnChange(e=>{i._pendingValue=e,i._pendingChange=!0,i._pendingDirty=!0,"change"===i.updateOn&&kz(i,t)})}(i,t),function Hee(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 zee(i,t){t.valueAccessor.registerOnTouched(()=>{i._pendingTouched=!0,"blur"===i.updateOn&&i._pendingChange&&kz(i,t),"submit"!==i.updateOn&&i.markAsTouched()})}(i,t),function Uee(i,t){if(t.valueAccessor.setDisabledState){const e=n=>{t.valueAccessor.setDisabledState(n)};i.registerOnDisabledChange(e),t._registerOnDestroy(()=>{i._unregisterOnDisabledChange(e)})}}(i,t)}function dC(i,t,e=!0){const n=()=>{};t.valueAccessor&&(t.valueAccessor.registerOnChange(n),t.valueAccessor.registerOnTouched(n)),hC(i,t),i&&(t._invokeOnDestroyCallbacks(),i._registerOnCollectionChange(()=>{}))}function uC(i,t){i.forEach(e=>{e.registerOnValidatorChange&&e.registerOnValidatorChange(t)})}function ER(i,t){const e=wz(i);null!==t.validator?i.setValidators(xz(e,t.validator)):"function"==typeof e&&i.setValidators([e]);const n=Mz(i);null!==t.asyncValidator?i.setAsyncValidators(xz(n,t.asyncValidator)):"function"==typeof n&&i.setAsyncValidators([n]);const r=()=>i.updateValueAndValidity();uC(t._rawValidators,r),uC(t._rawAsyncValidators,r)}function hC(i,t){let e=!1;if(null!==i){if(null!==t.validator){const r=wz(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=Mz(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 uC(t._rawValidators,n),uC(t._rawAsyncValidators,n),e}function kz(i,t){i._pendingDirty&&i.markAsDirty(),i.setValue(i._pendingValue,{emitModelToViewChange:!1}),t.viewToModelUpdate(i._pendingValue),i._pendingChange=!1}function Pz(i,t){ER(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 Oz(i,t){i._syncPendingControls(),t.forEach(e=>{const n=e.control;"submit"===n.updateOn&&n._pendingChange&&(e.viewToModelUpdate(n._pendingValue),n._pendingChange=!1)})}function TR(i,t){if(!t)return null;let e,n,r;return Array.isArray(t),t.forEach(s=>{s.constructor===_l?e=s:function Wee(i){return Object.getPrototypeOf(i.constructor)===Hh}(s)?n=s:r=s}),r||n||e||null}const Yee={provide:uo,useExisting:Gn(()=>hb)},ub=(()=>Promise.resolve())();let hb=(()=>{class i extends uo{constructor(e,n,r){super(),this.callSetDisabledState=r,this.submitted=!1,this._directives=new Set,this.ngSubmit=new $e,this.form=new Hm({},_R(e),vR(n))}ngAfterViewInit(){this._setUpdateStrategy()}get formDirective(){return this}get control(){return this.form}get path(){return[]}get controls(){return this.form.controls}addControl(e){ub.then(()=>{const n=this._findContainer(e.path);e.control=n.registerControl(e.name,e.control),db(e.control,e,this.callSetDisabledState),e.control.updateValueAndValidity({emitEvent:!1}),this._directives.add(e)})}getControl(e){return this.form.get(e.path)}removeControl(e){ub.then(()=>{const n=this._findContainer(e.path);n&&n.removeControl(e.name),this._directives.delete(e)})}addFormGroup(e){ub.then(()=>{const n=this._findContainer(e.path),r=new Hm({});Pz(r,e),n.registerControl(e.name,r),r.updateValueAndValidity({emitEvent:!1})})}removeFormGroup(e){ub.then(()=>{const n=this._findContainer(e.path);n&&n.removeControl(e.name)})}getFormGroup(e){return this.form.get(e.path)}updateModel(e,n){ub.then(()=>{this.form.get(e.path).setValue(n)})}setValue(e){this.control.setValue(e)}onSubmit(e){return this.submitted=!0,Oz(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)(E(qr,10),E(pu,10),E($h,8))},i.\u0275dir=ve({type:i,selectors:[["form",3,"ngNoForm","",3,"formGroup",""],["ng-form"],["","ngForm",""]],hostBindings:function(e,n){1&e&&Oe("submit",function(s){return n.onSubmit(s)})("reset",function(){return n.onReset()})},inputs:{options:["ngFormOptions","options"]},outputs:{ngSubmit:"ngSubmit"},exportAs:["ngForm"],features:[Dn([Yee]),dt]}),i})();function Fz(i,t){const e=i.indexOf(t);e>-1&&i.splice(e,1)}function Lz(i){return"object"==typeof i&&null!==i&&2===Object.keys(i).length&&"value"in i&&"disabled"in i}const ic=class extends lC{constructor(t=null,e,n){super(CR(e),SR(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}),aC(e)&&(e.nonNullable||e.initialValueIsDefault)&&(this.defaultValue=Lz(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){Fz(this._onChange,t)}registerOnDisabledChange(t){this._onDisabledChange.push(t)}_unregisterOnDisabledChange(t){Fz(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){Lz(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}},Kee={provide:tc,useExisting:Gn(()=>Zc)},Uz=(()=>Promise.resolve())();let Zc=(()=>{class i extends tc{constructor(e,n,r,s,o,a){super(),this._changeDetectorRef=o,this.callSetDisabledState=a,this.control=new ic,this._registered=!1,this.update=new $e,this._parent=e,this._setValidators(n),this._setAsyncValidators(r),this.valueAccessor=TR(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(){db(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){Uz.then(()=>{this.control.setValue(e,{emitViewToModelChange:!1}),this._changeDetectorRef?.markForCheck()})}_updateDisabled(e){const n=e.isDisabled.currentValue,r=0!==n&&function um(i){return"boolean"==typeof i?i:null!=i&&"false"!==i}(n);Uz.then(()=>{r&&!this.control.disabled?this.control.disable():!r&&this.control.disabled&&this.control.enable(),this._changeDetectorRef?.markForCheck()})}_getPath(e){return this._parent?cC(e,this._parent):[e]}}return i.\u0275fac=function(e){return new(e||i)(E(uo,9),E(qr,10),E(pu,10),E(Io,10),E(Qn,8),E($h,8))},i.\u0275dir=ve({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:[Dn([Kee]),dt,xi]}),i})(),IR=(()=>{class i{}return i.\u0275fac=function(e){return new(e||i)},i.\u0275dir=ve({type:i,selectors:[["form",3,"ngNoForm","",3,"ngNativeValidate",""]],hostAttrs:["novalidate",""]}),i})();const Zee={provide:Io,useExisting:Gn(()=>mu),multi:!0};let mu=(()=>{class i extends Hh{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=si(i)))(n||i)}}(),i.\u0275dir=ve({type:i,selectors:[["input","type","number","formControlName",""],["input","type","number","formControl",""],["input","type","number","ngModel",""]],hostBindings:function(e,n){1&e&&Oe("input",function(s){return n.onChange(s.target.value)})("blur",function(){return n.onTouched()})},features:[Dn([Zee]),dt]}),i})(),Vz=(()=>{class i{}return i.\u0275fac=function(e){return new(e||i)},i.\u0275mod=en({type:i}),i.\u0275inj=Wt({}),i})();const RR=new me("NgModelWithFormControlWarning"),nte={provide:uo,useExisting:Gn(()=>Gh)};let Gh=(()=>{class i extends uo{constructor(e,n,r){super(),this.callSetDisabledState=r,this.submitted=!1,this._onCollectionChange=()=>this._updateDomValue(),this.directives=[],this.form=null,this.ngSubmit=new $e,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&&(hC(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 db(n,e,this.callSetDisabledState),n.updateValueAndValidity({emitEvent:!1}),this.directives.push(e),n}getControl(e){return this.form.get(e.path)}removeControl(e){dC(e.control||null,e,!1),function jee(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,Oz(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&&(dC(n||null,e),(i=>i instanceof ic)(r)&&(db(r,e,this.callSetDisabledState),e.control=r))}),this.form._updateTreeValidity({emitEvent:!1})}_setUpFormContainer(e){const n=this.form.get(e.path);Pz(n,e),n.updateValueAndValidity({emitEvent:!1})}_cleanUpFormContainer(e){if(this.form){const n=this.form.get(e.path);n&&function $ee(i,t){return hC(i,t)}(n,e)&&n.updateValueAndValidity({emitEvent:!1})}}_updateRegistrations(){this.form._registerOnCollectionChange(this._onCollectionChange),this._oldForm&&this._oldForm._registerOnCollectionChange(()=>{})}_updateValidators(){ER(this.form,this),this._oldForm&&hC(this._oldForm,this)}_checkFormPresent(){}}return i.\u0275fac=function(e){return new(e||i)(E(qr,10),E(pu,10),E($h,8))},i.\u0275dir=ve({type:i,selectors:[["","formGroup",""]],hostBindings:function(e,n){1&e&&Oe("submit",function(s){return n.onSubmit(s)})("reset",function(){return n.onReset()})},inputs:{form:["formGroup","form"]},outputs:{ngSubmit:"ngSubmit"},exportAs:["ngForm"],features:[Dn([nte]),dt,xi]}),i})();const ste={provide:tc,useExisting:Gn(()=>fC)};let fC=(()=>{class i extends tc{set isDisabled(e){}constructor(e,n,r,s,o){super(),this._ngModelWarningConfig=o,this._added=!1,this.update=new $e,this._ngModelWarningSent=!1,this._parent=e,this._setValidators(n),this._setAsyncValidators(r),this.valueAccessor=TR(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 cC(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)(E(uo,13),E(qr,10),E(pu,10),E(Io,10),E(RR,8))},i.\u0275dir=ve({type:i,selectors:[["","formControlName",""]],inputs:{name:["formControlName","name"],isDisabled:["disabled","isDisabled"],model:["ngModel","model"]},outputs:{update:"ngModelChange"},features:[Dn([ste]),dt,xi]}),i})();function Yz(i){return"number"==typeof i?i:parseInt(i,10)}function qz(i){return"number"==typeof i?i:parseFloat(i)}let Wh=(()=>{class i{constructor(){this._validator=iC}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):iC,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=ve({type:i,features:[xi]}),i})();const hte={provide:qr,useExisting:Gn(()=>gu),multi:!0};let gu=(()=>{class i extends Wh{constructor(){super(...arguments),this.inputName="max",this.normalizeInput=e=>qz(e),this.createValidator=e=>az(e)}}return i.\u0275fac=function(){let t;return function(n){return(t||(t=si(i)))(n||i)}}(),i.\u0275dir=ve({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&&It("max",n._enabled?n.max:null)},inputs:{max:"max"},features:[Dn([hte]),dt]}),i})();const fte={provide:qr,useExisting:Gn(()=>_u),multi:!0};let _u=(()=>{class i extends Wh{constructor(){super(...arguments),this.inputName="min",this.normalizeInput=e=>qz(e),this.createValidator=e=>oz(e)}}return i.\u0275fac=function(){let t;return function(n){return(t||(t=si(i)))(n||i)}}(),i.\u0275dir=ve({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&&It("min",n._enabled?n.min:null)},inputs:{min:"min"},features:[Dn([fte]),dt]}),i})();const _te={provide:qr,useExisting:Gn(()=>NR),multi:!0};let NR=(()=>{class i extends Wh{constructor(){super(...arguments),this.inputName="minlength",this.normalizeInput=e=>Yz(e),this.createValidator=e=>uz(e)}}return i.\u0275fac=function(){let t;return function(n){return(t||(t=si(i)))(n||i)}}(),i.\u0275dir=ve({type:i,selectors:[["","minlength","","formControlName",""],["","minlength","","formControl",""],["","minlength","","ngModel",""]],hostVars:1,hostBindings:function(e,n){2&e&&It("minlength",n._enabled?n.minlength:null)},inputs:{minlength:"minlength"},features:[Dn([_te]),dt]}),i})();const vte={provide:qr,useExisting:Gn(()=>BR),multi:!0};let BR=(()=>{class i extends Wh{constructor(){super(...arguments),this.inputName="maxlength",this.normalizeInput=e=>Yz(e),this.createValidator=e=>hz(e)}}return i.\u0275fac=function(){let t;return function(n){return(t||(t=si(i)))(n||i)}}(),i.\u0275dir=ve({type:i,selectors:[["","maxlength","","formControlName",""],["","maxlength","","formControl",""],["","maxlength","","ngModel",""]],hostVars:1,hostBindings:function(e,n){2&e&&It("maxlength",n._enabled?n.maxlength:null)},inputs:{maxlength:"maxlength"},features:[Dn([vte]),dt]}),i})(),Qz=(()=>{class i{}return i.\u0275fac=function(e){return new(e||i)},i.\u0275mod=en({type:i}),i.\u0275inj=Wt({imports:[Vz]}),i})();class Jz extends lC{constructor(t,e,n){super(CR(e),SR(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={}){Iz(this,!1,t),t.forEach((n,r)=>{Tz(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 eH(i){return!!i&&(void 0!==i.asyncValidators||void 0!==i.validators||void 0!==i.updateOn)}let bte=(()=>{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 eH(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 Rz(r,n)}control(e,n,r){let s={};return this.useNonNullable?(eH(n)?s=n:(s.validators=n,s.asyncValidators=r),new ic(e,{...s,nonNullable:!0})):new ic(e,n,r)}array(e,n,r){const s=e.map(o=>this._createControl(o));return new Jz(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 ic||e instanceof lC?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=Pe({token:i,factory:i.\u0275fac,providedIn:"root"}),i})(),tH=(()=>{class i{static withConfig(e){return{ngModule:i,providers:[{provide:$h,useValue:e.callSetDisabledState??cb}]}}}return i.\u0275fac=function(e){return new(e||i)},i.\u0275mod=en({type:i}),i.\u0275inj=Wt({imports:[Qz]}),i})(),nH=(()=>{class i{static withConfig(e){return{ngModule:i,providers:[{provide:RR,useValue:e.warnOnNgModelWithFormControl??"always"},{provide:$h,useValue:e.callSetDisabledState??cb}]}}}return i.\u0275fac=function(e){return new(e||i)},i.\u0275mod=en({type:i}),i.\u0275inj=Wt({imports:[Qz]}),i})();const xte=["matFormFieldNotchedOutline",""],wte=["*"],Mte=["textField"],Cte=["iconPrefixContainer"],Ste=["textPrefixContainer"];function Ete(i,t){1&i&&Ie(0,"span",19)}function Ate(i,t){if(1&i){const e=jn();G(0,"label",17),Oe("cdkObserveContent",function(){return Vt(e),Et(re(2)._refreshOutlineNotchWidth())}),Yt(1,1),fe(2,Ete,1,0,"span",18),j()}if(2&i){const e=re(2);U("floating",e._shouldLabelFloat())("cdkObserveContentDisabled",!e._hasOutline())("id",e._labelId),It("for",e._control.id)("aria-owns",e._control.id),V(2),U("ngIf",!e.hideRequiredMarker&&e._control.required)}}function Dte(i,t){1&i&&fe(0,Ate,3,6,"label",16),2&i&&U("ngIf",re()._hasFloatingLabel())}function Tte(i,t){1&i&&Ie(0,"div",20)}function Ite(i,t){}function Rte(i,t){1&i&&fe(0,Ite,0,0,"ng-template",22),2&i&&(re(2),U("ngTemplateOutlet",Zi(1)))}function kte(i,t){if(1&i&&(G(0,"div",21),fe(1,Rte,1,1,"ng-template",9),j()),2&i){const e=re();U("matFormFieldNotchedOutlineOpen",e._shouldLabelFloat())("matFormFieldNotchedOutlineLabelWidth",e._labelWidth),V(1),U("ngIf",!e._forceDisplayInfixLabel())}}function Pte(i,t){1&i&&(G(0,"div",23,24),Yt(2,2),j())}function Ote(i,t){1&i&&(G(0,"div",25,26),Yt(2,3),j())}function Fte(i,t){}function Lte(i,t){1&i&&fe(0,Fte,0,0,"ng-template",22),2&i&&(re(),U("ngTemplateOutlet",Zi(1)))}function Nte(i,t){1&i&&(G(0,"div",27),Yt(1,4),j())}function Bte(i,t){1&i&&(G(0,"div",28),Yt(1,5),j())}function Ute(i,t){1&i&&Ie(0,"div",29)}function Vte(i,t){1&i&&(G(0,"div",30),Yt(1,6),j()),2&i&&U("@transitionMessages",re()._subscriptAnimationState)}function zte(i,t){if(1&i&&(G(0,"mat-hint",34),Be(1),j()),2&i){const e=re(2);U("id",e._hintLabelId),V(1),ui(e.hintLabel)}}function Hte(i,t){if(1&i&&(G(0,"div",31),fe(1,zte,2,2,"mat-hint",32),Yt(2,7),Ie(3,"div",33),Yt(4,8),j()),2&i){const e=re();U("@transitionMessages",e._subscriptAnimationState),V(1),U("ngIf",e.hintLabel)}}const $te=["*",[["mat-label"]],[["","matPrefix",""],["","matIconPrefix",""]],[["","matTextPrefix",""]],[["","matTextSuffix",""]],[["","matSuffix",""],["","matIconSuffix",""]],[["mat-error"],["","matError",""]],[["mat-hint",3,"align","end"]],[["mat-hint","align","end"]]],Gte=["*","mat-label","[matPrefix], [matIconPrefix]","[matTextPrefix]","[matTextSuffix]","[matSuffix], [matIconSuffix]","mat-error, [matError]","mat-hint:not([align='end'])","mat-hint[align='end']"];let Ro=(()=>{class i{}return i.\u0275fac=function(e){return new(e||i)},i.\u0275dir=ve({type:i,selectors:[["mat-label"]]}),i})(),Wte=0;const iH=new me("MatError");let jte=(()=>{class i{constructor(e,n){this.id="mat-mdc-error-"+Wte++,e||n.nativeElement.setAttribute("aria-live","polite")}}return i.\u0275fac=function(e){return new(e||i)(wa("aria-live"),E(vt))},i.\u0275dir=ve({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&&ql("id",n.id)},inputs:{id:"id"},features:[Dn([{provide:iH,useExisting:i}])]}),i})(),Yte=0,rH=(()=>{class i{constructor(){this.align="start",this.id="mat-mdc-hint-"+Yte++}}return i.\u0275fac=function(e){return new(e||i)},i.\u0275dir=ve({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&&(ql("id",n.id),It("align",null),ln("mat-mdc-form-field-hint-end","end"===n.align))},inputs:{align:"align",id:"id"}}),i})();const sH=new me("MatPrefix");let qte=(()=>{class i{constructor(){this._isText=!1}set _isTextSelector(e){this._isText=!0}}return i.\u0275fac=function(e){return new(e||i)},i.\u0275dir=ve({type:i,selectors:[["","matPrefix",""],["","matIconPrefix",""],["","matTextPrefix",""]],inputs:{_isTextSelector:["matTextPrefix","_isTextSelector"]},features:[Dn([{provide:sH,useExisting:i}])]}),i})();const oH=new me("MatSuffix");let Xte=(()=>{class i{constructor(){this._isText=!1}set _isTextSelector(e){this._isText=!0}}return i.\u0275fac=function(e){return new(e||i)},i.\u0275dir=ve({type:i,selectors:[["","matSuffix",""],["","matIconSuffix",""],["","matTextSuffix",""]],inputs:{_isTextSelector:["matTextSuffix","_isTextSelector"]},features:[Dn([{provide:oH,useExisting:i}])]}),i})(),aH=(()=>{class i{constructor(e){this._elementRef=e,this.floating=!1}getWidth(){return function Kte(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)(E(vt))},i.\u0275dir=ve({type:i,selectors:[["label","matFormFieldFloatingLabel",""]],hostAttrs:[1,"mdc-floating-label","mat-mdc-floating-label"],hostVars:2,hostBindings:function(e,n){2&e&&ln("mdc-floating-label--float-above",n.floating)},inputs:{floating:"floating"}}),i})();const lH="mdc-line-ripple--active",pC="mdc-line-ripple--deactivating";let cH=(()=>{class i{constructor(e,n){this._elementRef=e,this._handleTransitionEnd=r=>{const s=this._elementRef.nativeElement.classList,o=s.contains(pC);"opacity"===r.propertyName&&o&&s.remove(lH,pC)},n.runOutsideAngular(()=>{e.nativeElement.addEventListener("transitionend",this._handleTransitionEnd)})}activate(){const e=this._elementRef.nativeElement.classList;e.remove(pC),e.add(lH)}deactivate(){this._elementRef.nativeElement.classList.add(pC)}ngOnDestroy(){this._elementRef.nativeElement.removeEventListener("transitionend",this._handleTransitionEnd)}}return i.\u0275fac=function(e){return new(e||i)(E(vt),E(gt))},i.\u0275dir=ve({type:i,selectors:[["div","matFormFieldLineRipple",""]],hostAttrs:[1,"mdc-line-ripple"]}),i})(),dH=(()=>{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)(E(vt),E(gt))},i.\u0275cmp=ot({type:i,selectors:[["div","matFormFieldNotchedOutline",""]],hostAttrs:[1,"mdc-notched-outline"],hostVars:2,hostBindings:function(e,n){2&e&&ln("mdc-notched-outline--notched",n.open)},inputs:{labelWidth:["matFormFieldNotchedOutlineLabelWidth","labelWidth"],open:["matFormFieldNotchedOutlineOpen","open"]},attrs:xte,ngContentSelectors:wte,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&&(or(),Ie(0,"div",0),G(1,"div",1),Yt(2),j(),Ie(3,"div",2)),2&e&&(V(1),qo("width",n._getNotchWidth()))},encapsulation:2,changeDetection:0}),i})();const Zte={transitionMessages:Oa("transitionMessages",[Os("enter",oi({opacity:1,transform:"translateY(0%)"})),Or("void => enter",[oi({opacity:0,transform:"translateY(-5px)"}),Yr("300ms cubic-bezier(0.55, 0, 0.55, 0.2)")])])};let UR=(()=>{class i{}return i.\u0275fac=function(e){return new(e||i)},i.\u0275dir=ve({type:i}),i})();const mC=new me("MatFormField"),Qte=new me("MAT_FORM_FIELD_DEFAULT_OPTIONS");let uH=0,yl=(()=>{class i{get hideRequiredMarker(){return this._hideRequiredMarker}set hideRequiredMarker(e){this._hideRequiredMarker=tn(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-"+uH++,this._hintLabelId="mat-mdc-hint-"+uH++,this._subscriptAnimationState="",this._labelWidth=0,this._destroyed=new Te,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(Ue(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(),Cr(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(Ue(this._destroyed)).subscribe(()=>{this._needsOutlineLabelOffsetUpdateOnStable&&(this._needsOutlineLabelOffsetUpdateOnStable=!1,this._updateOutlineLabelOffset())})}),this._dir.change.pipe(Ue(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)(E(vt),E(Qn),E(gt),E(Pa),E(zi),E(Qte,8),E(kr,8),E(qt))},i.\u0275cmp=ot({type:i,selectors:[["mat-form-field"]],contentQueries:function(e,n,r){if(1&e&&(Wi(r,Ro,5),Wi(r,Ro,7),Wi(r,UR,5),Wi(r,sH,5),Wi(r,oH,5),Wi(r,iH,5),Wi(r,rH,5)),2&e){let s;At(s=Dt())&&(n._labelChildNonStatic=s.first),At(s=Dt())&&(n._labelChildStatic=s.first),At(s=Dt())&&(n._formFieldControl=s.first),At(s=Dt())&&(n._prefixChildren=s),At(s=Dt())&&(n._suffixChildren=s),At(s=Dt())&&(n._errorChildren=s),At(s=Dt())&&(n._hintChildren=s)}},viewQuery:function(e,n){if(1&e&&($n(Mte,5),$n(Cte,5),$n(Ste,5),$n(aH,5),$n(dH,5),$n(cH,5)),2&e){let r;At(r=Dt())&&(n._textField=r.first),At(r=Dt())&&(n._iconPrefixContainer=r.first),At(r=Dt())&&(n._textPrefixContainer=r.first),At(r=Dt())&&(n._floatingLabel=r.first),At(r=Dt())&&(n._notchedOutline=r.first),At(r=Dt())&&(n._lineRipple=r.first)}},hostAttrs:[1,"mat-mdc-form-field"],hostVars:42,hostBindings:function(e,n){2&e&&ln("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:[Dn([{provide:mC,useExisting:i}])],ngContentSelectors:Gte,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&&(or($te),fe(0,Dte,1,1,"ng-template",null,0,zc),G(2,"div",1,2),Oe("click",function(s){return n._control.onContainerClick&&n._control.onContainerClick(s)}),fe(4,Tte,1,0,"div",3),G(5,"div",4),fe(6,kte,2,3,"div",5),fe(7,Pte,3,0,"div",6),fe(8,Ote,3,0,"div",7),G(9,"div",8),fe(10,Lte,1,1,"ng-template",9),Yt(11),j(),fe(12,Nte,2,0,"div",10),fe(13,Bte,2,0,"div",11),j(),fe(14,Ute,1,0,"div",12),j(),G(15,"div",13),fe(16,Vte,2,1,"div",14),fe(17,Hte,5,2,"div",15),j()),2&e&&(V(2),ln("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),V(2),U("ngIf",!n._hasOutline()&&!n._control.disabled),V(2),U("ngIf",n._hasOutline()),V(1),U("ngIf",n._hasIconPrefix),V(1),U("ngIf",n._hasTextPrefix),V(2),U("ngIf",!n._hasOutline()||n._forceDisplayInfixLabel()),V(2),U("ngIf",n._hasTextSuffix),V(1),U("ngIf",n._hasIconSuffix),V(1),U("ngIf",!n._hasOutline()),V(1),ln("mat-mdc-form-field-subscript-dynamic-size","dynamic"===n.subscriptSizing),U("ngSwitch",n._getDisplayedMessages()),V(1),U("ngSwitchCase","error"),V(1),U("ngSwitchCase","hint"))},dependencies:[_i,xy,by,VT,SU,rH,aH,dH,cH],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:[Zte.transitionMessages]},changeDetection:0}),i})(),gC=(()=>{class i{}return i.\u0275fac=function(e){return new(e||i)},i.\u0275mod=en({type:i}),i.\u0275inj=Wt({imports:[Jn,co,HI,Jn]}),i})();const pH=Fh({passive:!0});let tne=(()=>{class i{constructor(e,n){this._platform=e,this._ngZone=n,this._monitoredElements=new Map}monitor(e){if(!this._platform.isBrowser)return _o;const n=qc(e),r=this._monitoredElements.get(n);if(r)return r.subject;const s=new Te,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,pH),n.classList.add("cdk-text-field-autofill-monitored")}),this._monitoredElements.set(n,{subject:s,unlisten:()=>{n.removeEventListener("animationstart",a,pH)}}),s}stopMonitoring(e){const n=qc(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)(ee(zi),ee(gt))},i.\u0275prov=Pe({token:i,factory:i.\u0275fac,providedIn:"root"}),i})(),nne=(()=>{class i{}return i.\u0275fac=function(e){return new(e||i)},i.\u0275mod=en({type:i}),i.\u0275inj=Wt({}),i})();const VR=new me("MAT_INPUT_VALUE_ACCESSOR"),ine=["button","checkbox","file","hidden","image","radio","range","reset","submit"];let rne=0;const sne=WU(class{constructor(i,t,e,n){this._defaultErrorStateMatcher=i,this._parentForm=t,this._parentFormGroup=e,this.ngControl=n,this.stateChanges=new Te}});let rc=(()=>{class i extends sne{get disabled(){return this._disabled}set disabled(e){this._disabled=tn(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(vl.required)??!1}set required(e){this._required=tn(e)}get type(){return this._type}set type(e){this._type=e||"text",this._validateType(),!this._isTextarea&&aU().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=tn(e)}constructor(e,n,r,s,o,a,l,c,d,h){super(a,s,o,r),this._elementRef=e,this._platform=n,this._autofillMonitor=c,this._formField=h,this._uid="mat-input-"+rne++,this.focused=!1,this.stateChanges=new Te,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=>aU().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&&d.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(){ine.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)(E(vt),E(zi),E(tc,10),E(hb,8),E(Gh,8),E(YU),E(VR,10),E(tne),E(gt),E(mC,8))},i.\u0275dir=ve({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&&Oe("focus",function(){return n._focusChanged(!0)})("blur",function(){return n._focusChanged(!1)})("input",function(){return n._onInput()}),2&e&&(ql("id",n.id)("disabled",n.disabled)("required",n.required),It("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),ln("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:[Dn([{provide:UR,useExisting:i}]),dt,xi]}),i})(),mH=(()=>{class i{}return i.\u0275fac=function(e){return new(e||i)},i.\u0275mod=en({type:i}),i.\u0275inj=Wt({imports:[Jn,gC,gC,nne,Jn]}),i})();function one(i,t){if(1&i&&(G(0,"mat-label"),Be(1),j()),2&i){const e=re(2);V(1),ui(e.resource.name)}}function ane(i,t){if(1&i){const e=jn();G(0,"mat-form-field",1),fe(1,one,2,1,"mat-label",2),G(2,"input",3),Oe("ngModelChange",function(r){return Vt(e),Et(re().resource.data=r)})("change",function(){return Vt(e),Et(re().changed.emit())}),j()()}if(2&i){const e=re();U("matTooltip",e.resourceDescription),V(1),U("ngIf",e.resource.name),V(1),U("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 lne=(()=>{class i{constructor(){this.resource=null,this.resourceDescription="",this.disabled=!1,this.changed=new $e}}return i.\u0275fac=function(e){return new(e||i)},i.\u0275cmp=ot({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&&fe(0,ane,3,7,"mat-form-field",0),2&e&&U("ngIf",n.resource)},dependencies:[_i,_l,mu,nc,_u,gu,Zc,yl,Ro,rc,Fs],changeDetection:0}),i})();function cne(i,t){if(1&i&&(G(0,"mat-label"),Be(1),j()),2&i){const e=re(2);V(1),ui(e.resource.name)}}function dne(i,t){if(1&i){const e=jn();G(0,"mat-form-field",1),fe(1,cne,2,1,"mat-label",2),G(2,"input",3),Oe("ngModelChange",function(r){return Vt(e),Et(re().resource.data=r)})("change",function(){return Vt(e),Et(re().changed.emit())}),j()()}if(2&i){const e=re();U("matTooltip",e.resourceDescription),V(1),U("ngIf",e.resource.name),V(1),U("disabled",e.disabled||void 0!==e.resource.schema.required_value)("maxlength",e.maxLength)("minlength",e.minLength)("ngModel",e.resource.data)}}let gH=(()=>{class i{constructor(){this._resource=null,this.resourceDescription="",this.disabled=!1,this.changed=new $e,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=ot({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&&fe(0,dne,3,6,"mat-form-field",0),2&e&&U("ngIf",n.resource)},dependencies:[_i,_l,nc,NR,BR,Zc,yl,Ro,rc,Fs],changeDetection:0}),i})();const sc=(i,t)=>i+(i.includes("__")?"/":"__")+t,jh=function(){return[]};function une(i,t){if(1&i&&(G(0,"mat-panel-description"),Be(1," Click to view items ("),G(2,"b"),Be(3),j(),Be(4,") "),j()),2&i){const e=re(2);V(3),ui((e.resourceData||Rs(1,jh)).length)}}function hne(i,t){1&i&&(G(0,"mat-panel-description"),Be(1," Empty array "),j())}function fne(i,t){}function pne(i,t){if(1&i){const e=jn();G(0,"mat-expansion-panel",4),Oe("opened",function(){return Vt(e),Et(re().onContentsTrigger(!0))})("closed",function(){return Vt(e),Et(re().onContentsTrigger(!1))}),G(1,"mat-expansion-panel-header",5)(2,"mat-panel-title"),Be(3),j(),fe(4,une,5,2,"mat-panel-description",1),fe(5,hne,2,0,"mat-panel-description",1),j(),fe(6,fne,0,0,"ng-template",6),j()}if(2&i){const e=re(),n=Zi(3);V(1),U("matTooltip",e.resourceDescription),V(2),Qi(" ",e.name," "),V(1),U("ngIf",(e.resourceData||Rs(5,jh)).length>0),V(1),U("ngIf",0==(e.resourceData||Rs(6,jh)).length),V(1),U("ngTemplateOutlet",n)}}function mne(i,t){}function gne(i,t){if(1&i&&(Gr(0),G(1,"h2",5),Be(2),j(),G(3,"div",7),fe(4,mne,0,0,"ng-template",6),j(),Wr()),2&i){const e=re(),n=Zi(3);V(1),U("matTooltip",e.resourceDescription),V(1),ui(e.name),V(2),U("ngTemplateOutlet",n)}}function _ne(i,t){}function vne(i,t){if(1&i&&Ie(0,"app-editor",10),2&i){const e=re().$implicit,n=re(3);U("resource",n.children[n.pageIndex*n.pageSize+e])("disabled",n.disabled)}}function yne(i,t){if(1&i&&(Gr(0),fe(1,vne,1,2,"app-editor",9),Wr()),2&i){const e=t.$implicit,n=re(3);V(1),U("ngIf",n.pageIndex*n.pageSize+e0)}let zR=(()=>{class i{constructor(e,n){this.main=e,this.cdr=n,this._resource=null,this.resourceDescription="",this.disabled=!1,this.changed=new $e,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 Te}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:sc(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(Ue(this.destroyed$),gn(([n,r])=>!!this.resource&&n.startsWith(this.resource.id)&&!n.substring(this.resource.id.length+1).includes("/"))).subscribe(function(){var n=nt(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 Qe(null),this.imageUrl$=new Qe(null),this.destroyed$=new Te,this.changed=new $e}set resource(e){this._resource$.next(e)}get resource(){return this._resource$.getValue()}ngAfterViewInit(){var e=this;return nt(function*(){e._resource$.pipe(Ue(e.destroyed$)).subscribe(function(){var n=nt(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)(E(Jl),E(Fa))},i.\u0275cmp=ot({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&&(Ie(0,"app-compound-block-ui",0),ct(1,"async"),fe(2,Dne,2,3,"img",1),ct(3,"async")),2&e&&(U("resource",ut(1,3,n._resource$))("fieldBlacklist",Rs(7,Tne)),V(2),U("ngIf",ut(3,5,n.imageUrl$)))},dependencies:[_i,ec,Xo],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 Rne=["*"],Lne=new me("MAT_CARD_CONFIG");let _H=(()=>{class i{constructor(e){this.appearance=e?.appearance||"raised"}}return i.\u0275fac=function(e){return new(e||i)(E(Lne,8))},i.\u0275cmp=ot({type:i,selectors:[["mat-card"]],hostAttrs:[1,"mat-mdc-card","mdc-card"],hostVars:4,hostBindings:function(e,n){2&e&&ln("mat-mdc-card-outlined","outlined"===n.appearance)("mdc-card--outlined","outlined"===n.appearance)},inputs:{appearance:"appearance"},exportAs:["matCard"],ngContentSelectors:Rne,decls:1,vars:0,template:function(e,n){1&e&&(or(),Yt(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})(),vH=(()=>{class i{}return i.\u0275fac=function(e){return new(e||i)},i.\u0275mod=en({type:i}),i.\u0275inj=Wt({imports:[Jn,co,Jn]}),i})();class HR{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 Te,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 $R=(()=>{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=Pe({token:i,factory:i.\u0275fac,providedIn:"root"}),i})(),aie=(()=>{class i{}return i.\u0275fac=function(e){return new(e||i)},i.\u0275mod=en({type:i}),i.\u0275inj=Wt({imports:[Jn,co,tb,Jn]}),i})();const CH={transformPanel:Oa("transformPanel",[Or("void => enter-dropdown",Yr("120ms cubic-bezier(0, 0, 0.2, 1)",sV([oi({opacity:0,transform:"scale(1, 0.8)"}),oi({opacity:1,transform:"scale(1, 1)"})]))),Or("void => enter-dialog",Yr("150ms cubic-bezier(0, 0, 0.2, 1)",sV([oi({opacity:0,transform:"scale(0.7)"}),oi({transform:"none",opacity:1})]))),Or("* => void",Yr("100ms linear",oi({opacity:0})))]),fadeInCalendar:Oa("fadeInCalendar",[Os("void",oi({opacity:0})),Os("enter",oi({opacity:1})),Or("void => *",Yr("120ms 100ms cubic-bezier(0.55, 0, 0.55, 0.2)"))])},AH=function(i){return{active:i}};function Sie(i,t){if(1&i){const e=jn();G(0,"button",2),Oe("click",function(){const s=Vt(e).$implicit;return Et(re().select(s))}),j()}if(2&i){const e=t.$implicit,n=re();qo("background-color",e),U("ngClass",sm(3,AH,n.selectedColor===e))}}function Eie(i,t){if(1&i){const e=jn();G(0,"button",2),Oe("click",function(){const s=Vt(e).$implicit;return Et(re().select(s))}),j()}if(2&i){const e=t.$implicit,n=re();qo("background-color",e),U("ngClass",sm(3,AH,n.selectedColor===e))}}const Aie=["button"],Die=/^\s+/,Tie=/\s+$/,Gm=Math.round,Iie=(Math,Math,Math,/[^0-9]/g),DH=["#ffffff","#ffff00","#ff00ff","#ff0000","#c0c0c0","#808080","#808000","#800080","#800000","#00ffff","#00ff00","#008080","#008000","#0000ff","#000080","#000000"];function TH(i,t,e){const n=i.getImageData(t,e,1,1).data;return{r:n[0],g:n[1],b:n[2]}}function Yh(i){return 1==i.length?"0"+i:""+i}function kie(i){return Math.round(255*parseFloat(i)).toString(16)}function IH(i){return Jo(i)/255}function Jo(i){return parseInt(i,16)}function RH(i,t,e,n){var r=[Yh(Gm(i).toString(16)),Yh(Gm(t).toString(16)),Yh(Gm(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 vu="(?:[-\\+]?\\d*\\.\\d+%?)|(?:[-\\+]?\\d+%?)",jR="[\\s|\\(]+("+vu+")[,|\\s]+("+vu+")[,|\\s]+("+vu+")\\s*\\)?",YR="[\\s|\\(]+("+vu+")[,|\\s]+("+vu+")[,|\\s]+("+vu+")[,|\\s]+("+vu+")\\s*\\)?",qh={CSS_UNIT:new RegExp(vu),rgb:new RegExp("rgb"+jR),rgba:new RegExp("rgba"+YR),hsl:new RegExp("hsl"+jR),hsla:new RegExp("hsla"+YR),hsv:new RegExp("hsv"+jR),hsva:new RegExp("hsva"+YR),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 qR(i){let t;return i=i.replace(Die,"").replace(Tie,"").toLowerCase(),(t=qh.rgb.exec(i))?{r:t[1],g:t[2],b:t[3],a:1}:(t=qh.rgba.exec(i))?{r:t[1],g:t[2],b:t[3],a:t[4]}:(t=qh.hex8.exec(i))?{r:Jo(t[1]),g:Jo(t[2]),b:Jo(t[3]),a:IH(t[4])}:(t=qh.hex6.exec(i))?{r:Jo(t[1]),g:Jo(t[2]),b:Jo(t[3]),a:1}:(t=qh.hex4.exec(i))?{r:Jo(t[1]+""+t[1]),g:Jo(t[2]+""+t[2]),b:Jo(t[3]+""+t[3]),a:IH(t[4]+""+t[4])}:(t=qh.hex3.exec(i))?{r:Jo(t[1]+""+t[1]),g:Jo(t[2]+""+t[2]),b:Jo(t[3]+""+t[3]),a:1}:null}class Xh{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=RH(this.r,this.g,this.b),this.rgba=this.toRgba()}toHex(t){return RH(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 Rie(i,t,e,n,r){var s=[Yh(Gm(i).toString(16)),Yh(Gm(t).toString(16)),Yh(Gm(e).toString(16)),Yh(kie(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 kH=(()=>{class i{constructor(e,n){this.zone=e,this.colorChanged=new $e,this.x=0,this.y=0,this.drag=!1,this._destroyed=new Te,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){Co()},i.\u0275dir=ve({type:i,inputs:{color:"color"},outputs:{colorChanged:"colorChanged"}}),i})(),Fie=(()=>{class i extends kH{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}=TH(this.ctx,e.offsetX,e.offsetY);this.emitChange(new Xh(n,r,s))}}return i.\u0275fac=function(e){return new(e||i)(E(gt))},i.\u0275cmp=ot({type:i,selectors:[["ngx-mat-color-slider"]],features:[dt],decls:1,vars:0,consts:[["id","color-strip","width","15","height","234",1,"zone-strip",3,"mousedown","mouseup"]],template:function(e,n){1&e&&(G(0,"canvas",0),Oe("mousedown",function(s){return n.onMousedown(s)})("mouseup",function(s){return n.onMouseup(s)}),j())}}),i})(),Lie=(()=>{class i{constructor(){}onInput(e){this._formatInput(e.target)}_formatInput(e){let n=Number(e.value.replace(Iie,""));n=isNaN(n)?0:n,e.value=n}}return i.\u0275fac=function(e){return new(e||i)},i.\u0275dir=ve({type:i,selectors:[["","ngxMatNumericColorInput",""]],hostBindings:function(e,n){1&e&&Oe("input",function(s){return n.onInput(s)})}}),i})(),Bie=(()=>{class i extends kH{constructor(e){super(e,"color-block"),this.zone=e,this._resetBaseColor=!0,this.formGroup=new Hm({r:new ic(null,[vl.required]),g:new ic(null,[vl.required]),b:new ic(null,[vl.required]),a:new ic(null,[vl.required]),hex:new ic(null,[vl.required,vl.pattern(qh.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(){Cr(this.rCtrl.valueChanges,this.gCtrl.valueChanges,this.bCtrl.valueChanges,this.aCtrl.valueChanges).pipe(Ue(this._destroyed),gl(400)).subscribe(r=>{const s=new Xh(Number(this.rCtrl.value),Number(this.gCtrl.value),Number(this.bCtrl.value),Number(this.aCtrl.value));this.emitChange(s)}),this.hexCtrl.valueChanges.pipe(Ue(this._destroyed),gl(400),Ql()).subscribe(r=>{const s=qR(r);if(null!=s){const o=new Xh(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}=TH(this.ctx,e.offsetX,e.offsetY);this.emitChange(new Xh(n,r,s))}}return i.\u0275fac=function(e){return new(e||i)(E(gt))},i.\u0275cmp=ot({type:i,selectors:[["ngx-mat-color-canvas"]],hostAttrs:[1,"ngx-mat-color-canvas"],features:[dt,xi],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&&(G(0,"form",0)(1,"div",1)(2,"div",2)(3,"canvas",3),Oe("mousedown",function(s){return n.onMousedown(s)})("mouseup",function(s){return n.onMouseup(s)}),j(),G(4,"ngx-mat-color-slider",4),Oe("colorChanged",function(s){return n.onSliderColorChanged(s)}),j()(),G(5,"div",5)(6,"mat-form-field")(7,"mat-label"),Be(8,"R"),j(),Ie(9,"input",6),j(),G(10,"mat-form-field")(11,"mat-label"),Be(12,"G"),j(),Ie(13,"input",7),j(),G(14,"mat-form-field")(15,"mat-label"),Be(16,"B"),j(),Ie(17,"input",8),j()()(),G(18,"div",1),Ie(19,"button",9),G(20,"mat-form-field")(21,"mat-label"),Be(22,"HEX6"),j(),G(23,"mat-label",10),Be(24,"#\xa0"),j(),Ie(25,"input",11),j(),G(26,"mat-form-field",12)(27,"mat-label"),Be(28,"A"),j(),Ie(29,"input",13),j()()()),2&e&&(U("formGroup",n.formGroup),V(19),qo("background-color",(null==n.color?null:n.color.rgba)||"transparent"))},dependencies:[rc,yl,Ro,qte,CV,IR,_l,mu,nc,bR,_u,gu,Gh,fC,Fie,Lie],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})(),Uie=(()=>{class i{constructor(){this.colorChanged=new $e,this.colors1=DH.slice(0,8),this.colors2=DH.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}=qR(e);this.colorChanged.emit(new Xh(n,r,s,o))}}return i.\u0275fac=function(e){return new(e||i)},i.\u0275cmp=ot({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&&(G(0,"div",0),fe(1,Sie,1,5,"button",1),j(),G(2,"div",0),fe(3,Eie,1,5,"button",1),j()),2&e&&(V(1),U("ngForOf",n.colors1),V(2),U("ngForOf",n.colors2))},dependencies:[hm,lo,CV],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})(),PH=(()=>{class i{constructor(){this.colorChanged=new $e}ngOnInit(){}handleColorChanged(e){this.colorChanged.emit(e)}}return i.\u0275fac=function(e){return new(e||i)},i.\u0275cmp=ot({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&&(G(0,"ngx-mat-color-canvas",0),Oe("colorChanged",function(s){return n.handleColorChanged(s)}),j(),G(1,"ngx-mat-color-collection",0),Oe("colorChanged",function(s){return n.handleColorChanged(s)}),j()),2&e&&(U("color",n.color),V(1),U("color",n.color))},dependencies:[Bie,Uie],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})(),XR=(()=>{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=qR(e);return n?new Xh(n.r,n.g,n.b,n.a):null}}return i.\u0275fac=function(e){return new(e||i)},i.\u0275prov=Pe({token:i,factory:i.\u0275fac}),i})();const Vie={display:{colorInput:"hex"}},OH=new me("mat-color-formats"),FH=new me("ngx-mat-colorpicker-scroll-strategy"),Hie={provide:FH,deps:[as],useFactory:function zie(i){return()=>i.scrollStrategies.reposition()}},$ie=Jy(class{constructor(i){this._elementRef=i}});let LH=(()=>{class i extends $ie{constructor(e){super(e)}}return i.\u0275fac=function(e){return new(e||i)(E(vt))},i.\u0275cmp=ot({type:i,selectors:[["ngx-mat-color-picker-content"]],viewQuery:function(e,n){if(1&e&&$n(PH,5),2&e){let r;At(r=Dt())&&(n._palette=r.first)}},hostAttrs:[1,"ngx-mat-colorpicker-content"],hostVars:3,hostBindings:function(e,n){2&e&&(Rw("@transformPanel","enter"),ln("ngx-mat-colorpicker-content-touch",n.picker.touchUi))},inputs:{color:"color"},exportAs:["ngxMatColorPickerContent"],features:[dt],decls:1,vars:1,consts:[[3,"color","colorChanged"]],template:function(e,n){1&e&&(G(0,"ngx-mat-color-palette",0),Oe("colorChanged",function(s){return n.picker.select(s)}),j()),2&e&&U("color",n.picker._selected)},dependencies:[PH],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:[CH.transformPanel,CH.fadeInCalendar]},changeDetection:0}),i})(),NH=(()=>{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 $e,this.closedStream=new $e,this._touchUi=!1,this._opened=!1,this._defaultColor="primary",this._validSelected=null,this._disabledChange=new Te,this._focusedElementBeforeOpen=null,this._inputSubscription=Qt.EMPTY,this._selectedChanged=new Te,this._scrollStrategy=a}get disabled(){return void 0===this._disabled&&this._pickerInput?this._pickerInput.disabled:!!this._disabled}set disabled(e){const n=tn(e);n!==this._disabled&&(this._disabled=n,this._disabledChange.next(n))}get touchUi(){return this._touchUi}set touchUi(e){this._touchUi=tn(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(LH,{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 Nh(LH,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(Oi(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"),Cr(this._popupRef.backdropClick(),this._popupRef.detachments(),this._popupRef.keydownEvents().pipe(gn(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)(E(Bm),E(as),E(gt),E(XR),E(Pa,8),E(FH),E(qt,8),E(jr))},i.\u0275cmp=ot({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 yC{constructor(t,e){this.target=t,this.targetElement=e,this.value=this.target.value}}const Gie={provide:Io,useExisting:Gn(()=>bC),multi:!0},Wie={provide:qr,useExisting:Gn(()=>bC),multi:!0};let bC=(()=>{class i{constructor(e,n,r,s){if(this._elementRef=e,this._formField=n,this._colorFormats=r,this._adapter=s,this.colorChange=new $e,this.colorInput=new $e,this._disabledChange=new $e,this._valueChange=new $e,this._onTouched=()=>{},this._cvaOnChange=()=>{},this._validatorOnChange=()=>{},this._pickerSubscription=Qt.EMPTY,this._validator=vl.compose([]),this._lastValueValid=!1,!this._colorFormats)throw function Oie(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 yC(this,this._elementRef.nativeElement)),this.colorChange.emit(new yC(this,this._elementRef.nativeElement))}))}get disabled(){return!!this._disabled}set disabled(e){const n=tn(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 yC(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 yC(this,this._elementRef.nativeElement)))}}return i.\u0275fac=function(e){return new(e||i)(E(vt),E(yl,8),E(OH,8),E(XR))},i.\u0275dir=ve({type:i,selectors:[["input","ngxMatColorPicker",""]],hostVars:3,hostBindings:function(e,n){1&e&&Oe("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&&(ql("disabled",n.disabled),It("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:[Dn([Gie,Wie,{provide:VR,useExisting:i}])]}),i})(),jie=(()=>{class i{constructor(e){this._cd=e,this._stateChanges=Qt.EMPTY}get disabled(){if(null==this._disabled&&this.picker)return this.picker.disabled}set disabled(e){this._disabled=e}ngOnInit(){}ngOnChanges(e){e.picker&&this._watchStateChanges()}ngOnDestroy(){this._stateChanges.unsubscribe()}ngAfterContentInit(){this._watchStateChanges()}open(e){this.picker&&!this.disabled&&(this.picker.open(),e.stopPropagation())}_watchStateChanges(){const e=this.picker?this.picker._disabledChange:mt(),n=this.picker&&this.picker._pickerInput?this.picker._pickerInput._disabledChange:mt(),r=this.picker?Cr(this.picker.openedStream,this.picker.closedStream):mt();this._stateChanges.unsubscribe(),this._stateChanges=Cr(e,n,r).subscribe(()=>this._cd.markForCheck())}}return i.\u0275fac=function(e){return new(e||i)(E(Qn))},i.\u0275cmp=ot({type:i,selectors:[["ngx-mat-color-toggle"]],viewQuery:function(e,n){if(1&e&&$n(Aie,5),2&e){let r;At(r=Dt())&&(n._button=r.first)}},hostAttrs:[1,"ngx-mat-color-toggle"],hostVars:7,hostBindings:function(e,n){1&e&&Oe("focus",function(){return n._button.focus()}),2&e&&(It("tabindex",-1),ln("ngx-mat-color-toggle-active",n.picker&&n.picker.opened)("mat-accent",n.picker&&"accent"===n.picker.color)("mat-warn",n.picker&&"warn"===n.picker.color))},inputs:{picker:["for","picker"],tabIndex:"tabIndex",disabled:"disabled"},exportAs:["ngxMatColorPickerToggle"],features:[xi],decls:4,vars:5,consts:[["mat-icon-button","","type","button",3,"disabled","click"],["button",""]],template:function(e,n){1&e&&(G(0,"button",0,1),Oe("click",function(s){return n.open(s)}),G(2,"mat-icon"),Be(3,"palette"),j()()),2&e&&(U("disabled",n.disabled),It("aria-haspopup",n.picker?"dialog":null)("tabindex",n.disabled?-1:n.tabIndex),V(2),qo("color",null==n.picker||null==n.picker._selected?null:n.picker._selected.rgba))},dependencies:[XM,gR],styles:[".mat-form-field-appearance .mat-form-field-prefix .ngx-mat-color-toggle-default-icon,.mat-form-field-appearance .mat-form-field-suffix .ngx-mat-color-toggle-default-icon{width:1em}.mat-form-field:not(.mat-form-field-appearance) .mat-form-field-prefix .ngx-mat-color-toggle-default-icon,.mat-form-field:not(.mat-form-field-appearance) .mat-form-field-suffix .ngx-mat-color-toggle-default-icon{display:block;width:1.5em;height:1.5em}.mat-form-field:not(.mat-form-field-appearance) .mat-form-field-prefix .mat-icon-button .ngx-mat-color-toggle-default-icon,.mat-form-field:not(.mat-form-field-appearance) .mat-form-field-suffix .mat-icon-button .ngx-mat-color-toggle-default-icon{margin:auto}\n"],encapsulation:2}),i})(),Yie=(()=>{class i{}return i.\u0275fac=function(e){return new(e||i)},i.\u0275mod=en({type:i}),i.\u0275inj=Wt({providers:[XR,Hie],imports:[co,mH,KM,vH,aie,tH,nH,vV,Bh,tz]}),i})();const qie=["picker"],Xie=function(i){return{"background-color":i}};function Kie(i,t){if(1&i){const e=jn();G(0,"div",5),Oe("click",function(r){const o=Vt(e).index;return Et(re().onColorClicked(r.currentTarget,o))}),j()}if(2&i){const e=t.$implicit,n=t.index,r=re();U("ngStyle",sm(2,Xie,"#"+r.lpad(e.toString(16),"0",8)))("matTooltip",n+": #"+e.toString(16))}}const Zie=function(){return["colors"]};let Qie=(()=>{class i{constructor(){this.resource=null,this.changed=new $e,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 bU;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=ot({type:i,selectors:[["app-palette-block-ui"]],viewQuery:function(e,n){if(1&e&&$n(qie,5),2&e){let r;At(r=Dt())&&(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&&(Ie(0,"app-compound-block-ui",0),G(1,"div",1),fe(2,Kie,1,4,"div",2),j(),G(3,"input",3),Oe("colorChange",function(s){return n.onColorChange(s.value)}),j(),Ie(4,"ngx-mat-color-picker",null,4)),2&e){const r=Zi(5);U("resource",n.resource)("fieldBlacklist",Rs(4,Zie)),V(2),U("ngForOf",null==n.resourceData?null:n.resourceData.colors),V(1),U("ngxMatColorPicker",r)}},dependencies:[lo,nM,rc,Fs,bC,NH,ec],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 Jie=["editorBody"];function ere(i,t){if(1&i&&(G(0,"div",11),Be(1),j()),2&i){const e=re().$implicit;V(1),ui(e.offset)}}function tre(i,t){if(1&i){const e=jn();G(0,"input",12),Oe("input",function(r){const o=Vt(e).index,a=re().index;return Et(re().onHexInput(r,a,o))})("focus",function(r){const o=Vt(e).index;return Et(re(2).onHexFocus(r,o))})("blur",function(r){return Vt(e),Et(re(2).onHexBlur(r))}),j()}if(2&i){const e=t.$implicit,n=t.index;U("id","hex_input__"+re().index+"__"+n)("value",e[0])("disabled",null===e[0])}}function nre(i,t){1&i&&Ie(0,"div",3)}function ire(i,t){if(1&i){const e=jn();G(0,"span",15),Oe("click",function(){const s=Vt(e).index,o=re(2).index;return Et(re().blurInput(o,s))}),Be(1),j()}if(2&i){const e=t.$implicit,n=t.index;U("id","utf_char__"+re(2).index+"__"+n),V(1),ui(e[1])}}function rre(i,t){if(1&i&&(G(0,"div",13),fe(1,ire,2,2,"span",14),j()),2&i){const e=re().$implicit,n=re();V(1),U("ngForOf",e.values)("ngForTrackBy",n.trackByIndex)}}function sre(i,t){if(1&i&&(G(0,"div",5),fe(1,ere,2,1,"div",6),ct(2,"async"),G(3,"div",7),fe(4,tre,1,3,"input",8),j(),fe(5,nre,1,0,"div",9),ct(6,"async"),ct(7,"async"),fe(8,rre,2,2,"div",10),ct(9,"async"),j()),2&i){const e=t.$implicit,n=t.index,r=re();ln("gray",n%2!=0),V(1),U("ngIf",ut(2,7,r._showOffsets$)),V(3),U("ngForOf",e.values)("ngForTrackBy",r.trackByIndex),V(1),U("ngIf",ut(6,9,r._showOffsets$)||ut(7,11,r._showUtf8$)),V(3),U("ngIf",ut(9,13,r._showUtf8$))}}function ore(i,t){if(1&i){const e=jn();G(0,"div",16)(1,"button",17),Oe("click",function(){return Vt(e),Et(re().changePage(-1))}),ct(2,"async"),Be(3,"Previous"),j(),G(4,"span"),Be(5),ct(6,"async"),ct(7,"async"),j(),G(8,"button",17),Oe("click",function(){return Vt(e),Et(re().changePage(1))}),ct(9,"async"),ct(10,"async"),Be(11," Next "),j()()}if(2&i){const e=re();V(1),U("disabled",0===ut(2,4,e.currentPage$)),V(4),Dh("Page ",(ut(6,6,e.currentPage$)||0)+1," of ",ut(7,8,e.totalPages$),""),V(3),U("disabled",(ut(9,10,e.currentPage$)||0)>=(ut(10,12,e.totalPages$)||0)-1)}}let are=(()=>{class i{set maxColumns(e){this._maxColumns$.next(e)}set maxRows(e){this._maxRows$.next(e)}set showOffsets(e){this._showOffsets$.next(e)}set showUtf8(e){this._showUtf8$.next(e)}set data(e){if(e!==this._data$.value){if(e.length===this._data$.value.length){for(let n=0;n=32&&e<=126?String.fromCharCode(e):"."]}ngAfterViewInit(){new ResizeObserver(e=>{for(const n of e)this.viewportSize$.next([n.contentRect.width,n.contentRect.height])}).observe(this.editorBody.nativeElement),Ra([this.viewportSize$,this._maxColumns$,this._maxRows$,this._showOffsets$,this._showUtf8$]).pipe(Ue(this.destroyed$),Wy(50)).subscribe(([[e,n],r,s,o,a])=>{let l=e-8;o&&(l-=68);let c=34;a&&(l-=8,c+=10);let h=Math.floor(l/c);r>0&&h>r&&(h=r);let p=this.pageSize$.value[0];h===p+1&&l/c%1<.5&&(h=p),h=Math.max(1,h);let m=Math.floor(n/28);s>0&&m>s&&(m=s),m=Math.max(1,m),(h!=this.pageSize$.value[0]||m!==this.pageSize$.value[1])&&this.pageSize$.next([h,m])}),Ra([this._data$,this.currentPage$,this.pageSize$]).pipe(Ue(this.destroyed$)).subscribe(([e,n,r])=>{if(0===r[0]||0===r[1])return;let s=Math.max(1,Math.ceil(Math.ceil(e.length/r[0])/r[1]));if(this.totalPages$.value!==s&&this.totalPages$.next(s),n>=s)return void this.currentPage$.next(n=s-1);const o=[];for(let a=n*r[0]*r[1];a=0&&a<=255&&(this.data[(this.currentPage$.value*this.pageSize$.value[1]+n)*this.pageSize$.value[0]+r]=a,this.renderedRows$.value[n].values[r]=this.renderValue(a),this.cdr.detectChanges(),this.dataChange.emit(this.data),this.goToNextInput(s.id))}}onHexFocus(e,n){const r=e.target,s=r.closest(".row");s&&s.querySelectorAll(".utf8-values span").forEach((a,l)=>{a.classList.toggle("highlight",l===n)}),r.select()}onHexBlur(e){const r=e.target.closest(".row");r&&r.querySelectorAll(".utf8-values span").forEach(o=>{o.classList.remove("highlight")})}}return i.\u0275fac=function(e){return new(e||i)(E(Qn))},i.\u0275cmp=ot({type:i,selectors:[["hex-editor"]],viewQuery:function(e,n){if(1&e&&$n(Jie,5),2&e){let r;At(r=Dt())&&(n.editorBody=r.first)}},inputs:{maxColumns:"maxColumns",maxRows:"maxRows",showOffsets:"showOffsets",showUtf8:"showUtf8",data:"data",readOnly:"readOnly"},outputs:{dataChange:"dataChange"},decls:7,vars:7,consts:[[1,"editor-body"],["editorBody",""],["class","row",3,"gray",4,"ngFor","ngForOf","ngForTrackBy"],[1,"flex-spacer"],["class","pagination",4,"ngIf"],[1,"row"],["class","offset",4,"ngIf"],[1,"hex-values"],["maxlength","2",3,"id","value","disabled","input","focus","blur",4,"ngFor","ngForOf","ngForTrackBy"],["class","flex-spacer",4,"ngIf"],["class","utf8-values",4,"ngIf"],[1,"offset"],["maxlength","2",3,"id","value","disabled","input","focus","blur"],[1,"utf8-values"],[3,"id","click",4,"ngFor","ngForOf","ngForTrackBy"],[3,"id","click"],[1,"pagination"],[3,"disabled","click"]],template:function(e,n){1&e&&(G(0,"div",0,1),fe(2,sre,10,15,"div",2),ct(3,"async"),Ie(4,"div",3),j(),fe(5,ore,12,14,"div",4),ct(6,"async")),2&e&&(V(2),U("ngForOf",ut(3,3,n.renderedRows$))("ngForTrackBy",n.trackByIndex),V(3),U("ngIf",(ut(6,5,n.totalPages$)||0)>1))},dependencies:[lo,_i,Xo],styles:["[_nghost-%COMP%]{display:flex;flex-direction:column;font-family:monospace}.editor-body[_ngcontent-%COMP%]{display:flex;flex-grow:1;flex-direction:column;overflow-y:hidden}.row[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:center;height:24px;margin-bottom:4px}.row.gray[_ngcontent-%COMP%]{background-color:#d3d3d3}.offset[_ngcontent-%COMP%]{width:60px;text-align:left;margin-right:8px}.hex-values[_ngcontent-%COMP%]{display:flex;gap:2px;flex-shrink:1;overflow-x:clip}.hex-values[_ngcontent-%COMP%] input[_ngcontent-%COMP%]{width:32px;text-align:center;box-sizing:border-box}.utf8-values[_ngcontent-%COMP%]{margin-left:8px}.utf8-values[_ngcontent-%COMP%] span[_ngcontent-%COMP%]{display:inline-block;width:8px;margin-left:2px;color:#000}.utf8-values[_ngcontent-%COMP%] span.highlight[_ngcontent-%COMP%]{background-color:#ff0}.pagination[_ngcontent-%COMP%]{display:flex;justify-content:space-between;align-items:center;margin-top:1em}.flex-spacer[_ngcontent-%COMP%]{flex-grow:1}"],changeDetection:0}),i})(),lre=(()=>{class i{}return i.\u0275fac=function(e){return new(e||i)},i.\u0275mod=en({type:i}),i.\u0275inj=Wt({imports:[co]}),i})();const cre=["editor"];let dre=(()=>{class i{constructor(){this._resource=null,this.empty=new Uint8Array,this.data$=new Qe(new Uint8Array),this.resourceDescription="",this.disabled=!1,this.changed=new $e}get resource(){return this._resource}set resource(e){this._resource=e,this.data$.next(new Uint8Array(e?e.data:0))}onDataChange(e){this._resource.data=Array.from(e),this.changed.emit()}}return i.\u0275fac=function(e){return new(e||i)},i.\u0275cmp=ot({type:i,selectors:[["app-binary-block-ui"]],viewQuery:function(e,n){if(1&e&&$n(cre,5),2&e){let r;At(r=Dt())&&(n.editorDiv=r.first)}},inputs:{resource:"resource",resourceDescription:"resourceDescription",disabled:"disabled"},outputs:{changed:"changed"},decls:5,vars:10,consts:[["matTooltipPosition","above",3,"matTooltip"],[3,"data","maxColumns","showOffsets","readOnly","dataChange"]],template:function(e,n){1&e&&(G(0,"h2",0),Be(1),j(),G(2,"hex-editor",1),Oe("dataChange",function(s){return n.onDataChange(s)}),ct(3,"async"),ct(4,"async"),j()),2&e&&(U("matTooltip",n.resourceDescription),V(1),ui(null==n.resource?null:n.resource.name),V(1),U("data",ut(3,6,n.data$)||n.empty)("maxColumns",8)("showOffsets",(ut(4,8,n.data$)||n.empty).length>16)("readOnly",n.disabled))},dependencies:[Fs,are,Xo],changeDetection:0}),i})();const ure=["picker"];function hre(i,t){if(1&i&&(G(0,"mat-label",8),Be(1),j()),2&i){const e=re();V(1),ui(null==e.resource?null:e.resource.name)}}const fre=function(i){return{transform:i}};let pre=(()=>{class i{constructor(e){this.cdr=e,this.resource=null,this.resourceDescription="",this.changed=new $e,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)(E(Qn))},i.\u0275cmp=ot({type:i,selectors:[["app-angle-block-ui"]],viewQuery:function(e,n){if(1&e&&$n(ure,5),2&e){let r;At(r=Dt())&&(n.picker=r.first)}},hostBindings:function(e,n){1&e&&Oe("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&&(G(0,"div",0)(1,"div",1,2)(3,"div",3),Ie(4,"div",4)(5,"div",5),j()(),G(6,"div",6),fe(7,hre,2,1,"mat-label",7),G(8,"mat-label"),Be(9),ct(10,"number"),j(),G(11,"mat-label"),Be(12),ct(13,"number"),j()()()),2&e&&(U("matTooltip",n.resourceDescription),V(3),U("ngStyle",sm(11,fre,"rotate("+((null==n.resource?null:n.resource.data)||0)+"rad)")),V(4),U("ngIf",null==n.resource?null:n.resource.name),V(2),Qi("",JD(10,5,180*(null==n.resource?null:n.resource.data)/n.pi||0,"1.2-2")," deg"),V(3),Qi("",JD(13,8,(null==n.resource?null:n.resource.data)||0,"1.2-2")," rad"))},dependencies:[_i,nM,Ro,Fs,hB],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 KR{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,d=new Set;for(const h of e)!0===Array.isArray(h)?a.add(h):"object"==typeof h?l.add(h):"function"==typeof h?d.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===d.size){h=!0;for(const p of o)if(!1===d.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 mre(i,t){if(1&i&&(G(0,"mat-list-option",3),Be(1),j()),2&i){const e=t.$implicit,n=re();U("value",e)("selected",n.selectedValue==e),V(1),Qi(" ",e," ")}}function gre(i,t){if(1&i&&(G(0,"mat-card"),Ie(1,"app-editor",4),j()),2&i){const e=re();V(1),U("resource",e.resources[e.selectedValue])}}let xC=(()=>{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)(E(KR))},i.\u0275cmp=ot({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&&(G(0,"mat-selection-list",0),Oe("selectionChange",function(s){return n.selectedValue=s.source.selectedOptions.selected[0].value}),fe(1,mre,2,3,"mat-list-option",1),j(),fe(2,gre,2,1,"mat-card",2)),2&e&&(U("multiple",!1),V(1),U("ngForOf",n.keys),V(1),U("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})(),_re=(()=>{class i{constructor(){this._resource=null,this.resourceMap={},this.changed=new $e}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",iR("@transformPanel",[nR()],{optional:!0}))]),transformPanel:Oa("transformPanel",[Os("void",oi({opacity:0,transform:"scale(1, 0.8)"})),Or("void => showing",Yr("120ms cubic-bezier(0, 0, 0.2, 1)",oi({opacity:1,transform:"scale(1, 1)"}))),Or("* => void",Yr("100ms linear",oi({opacity:0})))])};let BH=0;const UH=new me("mat-select-scroll-strategy"),Tre=new me("MAT_SELECT_CONFIG"),Ire={provide:UH,deps:[as],useFactory:function Dre(i){return()=>i.scrollStrategies.reposition()}},Rre=new me("MatSelectTrigger");class kre{constructor(t,e){this.source=t,this.value=e}}const Pre=YM(JI(jM(WU(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 Te}}))));let Ore=(()=>{class i extends Pre{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(vl.required)??!1}set required(e){this._required=tn(e),this.stateChanges.next()}get multiple(){return this._multiple}set multiple(e){this._multiple=tn(e)}get disableOptionCentering(){return this._disableOptionCentering}set disableOptionCentering(e){this._disableOptionCentering=tn(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=Ps(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,d,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=d,this._liveAnnouncer=g,this._defaultOptions=b,this._panelOpen=!1,this._compareWith=(v,y)=>v===y,this._uid="mat-select-"+BH++,this._triggerAriaLabelledBy=null,this._destroy=new Te,this._onChange=()=>{},this._onTouched=()=>{},this._valueId="mat-select-value-"+BH++,this._panelDoneAnimatingStream=new Te,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=Ey(()=>{const v=this.options;return v?v.changes.pipe(Do(v),ks(()=>Cr(...v.map(y=>y.onSelectionChange)))):this._ngZone.onStable.pipe(Oi(1),ks(()=>this.optionSelectionChanges))}),this.openedChange=new $e,this._openedStream=this.openedChange.pipe(gn(v=>v),tt(()=>{})),this._closedStream=this.openedChange.pipe(gn(v=>!v),tt(()=>{})),this.selectionChange=new $e,this.valueChange=new $e,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 HR(this.multiple),this.stateChanges.next(),this._panelDoneAnimatingStream.pipe(Ql(),Ue(this._destroy)).subscribe(()=>this._panelDoneAnimating(this.panelOpen))}ngAfterContentInit(){this._initKeyManager(),this._selectionModel.changed.pipe(Ue(this._destroy)).subscribe(e=>{e.added.forEach(n=>n.select()),e.removed.forEach(n=>n.deselect())}),this.options.changes.pipe(Do(null),Ue(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&&!Qo(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||Qo(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(Oi(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 $Z(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=Cr(this.options.changes,this._destroy);this.optionSelectionChanges.pipe(Ue(e)).subscribe(n=>{this._onSelect(n.source,n.isUserInput),n.isUserInput&&!this.multiple&&this._panelOpen&&(this.close(),this.focus())}),Cr(...this.options.map(n=>n._stateChanges)).pipe(Ue(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)(E(LM),E(Qn),E(gt),E(YU),E(vt),E(Pa,8),E(hb,8),E(Gh,8),E(mC,8),E(tc,10),wa("tabindex"),E(UH),E(XI),E(Tre,8))},i.\u0275dir=ve({type:i,viewQuery:function(e,n){if(1&e&&($n(vre,5),$n(yre,5),$n(wU,5)),2&e){let r;At(r=Dt())&&(n.trigger=r.first),At(r=Dt())&&(n.panel=r.first),At(r=Dt())&&(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:[dt,xi]}),i})(),pb=(()=>{class i extends Ore{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(Ue(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 OQ(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 kre(this,e)}_getOverlayWidth(){return(this._preferredOverlayOrigin instanceof zI?this._preferredOverlayOrigin.elementRef:this._preferredOverlayOrigin||this._elementRef).nativeElement.getBoundingClientRect().width}get hideSingleSelectionIndicator(){return this._hideSingleSelectionIndicator}set hideSingleSelectionIndicator(e){this._hideSingleSelectionIndicator=tn(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=si(i)))(n||i)}}(),i.\u0275cmp=ot({type:i,selectors:[["mat-select"]],contentQueries:function(e,n,r){if(1&e&&(Wi(r,Rre,5),Wi(r,Nm,5),Wi(r,tV,5)),2&e){let s;At(s=Dt())&&(n.customTrigger=s.first),At(s=Dt())&&(n.options=s),At(s=Dt())&&(n.optionGroups=s)}},hostAttrs:["role","combobox","aria-autocomplete","none","aria-haspopup","listbox",1,"mat-mdc-select"],hostVars:19,hostBindings:function(e,n){1&e&&Oe("keydown",function(s){return n._handleKeydown(s)})("focus",function(){return n._onFocus()})("blur",function(){return n._onBlur()}),2&e&&(It("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()),ln("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:[Dn([{provide:UR,useExisting:i},{provide:eV,useExisting:i}]),dt],ngContentSelectors:Ere,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&&(or(Sre),G(0,"div",0,1),Oe("click",function(){return n.toggle()}),G(3,"div",2),fe(4,bre,2,1,"span",3),fe(5,Mre,3,2,"span",4),j(),G(6,"div",5)(7,"div",6),ki(),G(8,"svg",7),Ie(9,"path",8),j()()()(),fe(10,Cre,3,9,"ng-template",9),Oe("backdropClick",function(){return n.close()})("attach",function(){return n._onAttached()})("detach",function(){return n.close()})),2&e){const r=Zi(1);It("aria-owns",n.panelOpen?n.id+"-panel":null),V(3),U("ngSwitch",n.empty),It("id",n._valueId),V(1),U("ngSwitchCase",!0),V(1),U("ngSwitchCase",!1),V(5),U("cdkConnectedOverlayPanelClass",n._overlayPanelClass)("cdkConnectedOverlayScrollStrategy",n._scrollStrategy)("cdkConnectedOverlayOrigin",n._preferredOverlayOrigin||r)("cdkConnectedOverlayOpen",n.panelOpen)("cdkConnectedOverlayPositions",n._positions)("cdkConnectedOverlayWidth",n._overlayWidth)}},dependencies:[hm,by,VT,lB,wU,zI],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:[Are.transformPanel]},changeDetection:0}),i})(),VH=(()=>{class i{}return i.\u0275fac=function(e){return new(e||i)},i.\u0275mod=en({type:i}),i.\u0275inj=Wt({providers:[Ire],imports:[co,Pm,tR,Jn,Ky,gC,tR,Jn]}),i})();function Fre(i,t){if(1&i&&(G(0,"mat-label"),Be(1),j()),2&i){const e=re(3);V(1),ui(e.resource.name)}}function Lre(i,t){if(1&i&&(G(0,"mat-option",6),Be(1),j()),2&i){const e=t.$implicit,n=re(3);U("value",e[1])("disabled",n.disabled),V(1),Qi(" ",e[1]," ")}}function Nre(i,t){if(1&i){const e=jn();G(0,"mat-form-field",3),fe(1,Fre,2,1,"mat-label",0),G(2,"mat-select",4),Oe("valueChange",function(r){return Vt(e),Et(re(2).resource.data=r)})("selectionChange",function(){return Vt(e),Et(re(2).changed.emit())}),fe(3,Lre,2,3,"mat-option",5),j()()}if(2&i){const e=re(2);U("matTooltip",e.resourceDescription),V(1),U("ngIf",e.resource.name),V(1),U("value",e.resource.data)("disabled",e.disabled),V(1),U("ngForOf",e.resource.schema.enum_names)}}function Bre(i,t){if(1&i&&(G(0,"mat-label"),Be(1),j()),2&i){const e=re(3);V(1),ui(e.resource.name)}}function Ure(i,t){if(1&i){const e=jn();G(0,"mat-form-field",3),fe(1,Bre,2,1,"mat-label",0),G(2,"input",7),Oe("ngModelChange",function(r){return Vt(e),Et(re(2).resource.data=r)})("change",function(){return Vt(e),Et(re(2).changed.emit())}),j()()}if(2&i){const e=re(2);U("matTooltip",e.resourceDescription),V(1),U("ngIf",e.resource.name),V(1),U("min",0)("max",256*(e.resource.schema.length||1)-1)("ngModel",e.resource.data)}}function Vre(i,t){if(1&i&&(Gr(0),fe(1,Nre,4,5,"mat-form-field",1),fe(2,Ure,3,5,"ng-template",null,2,zc),Wr()),2&i){const e=Zi(3),n=re();V(1),U("ngIf",n.isKnownEnumValue(n.resource.data))("ngIfElse",e)}}let zre=(()=>{class i{constructor(){this.resource=null,this.resourceDescription="",this.disabled=!1,this.changed=new $e}isKnownEnumValue(e){return!!this.resource?.schema.enum_names.find(([n,r])=>r==e)}}return i.\u0275fac=function(e){return new(e||i)},i.\u0275cmp=ot({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&&fe(0,Vre,4,2,"ng-container",0),2&e&&U("ngIf",n.resource)},dependencies:[lo,_i,_l,mu,nc,_u,gu,Zc,yl,Ro,rc,Fs,pb,Nm],changeDetection:0}),i})();const Hre=["*"],Gre=["unscopedContent"];function Wre(i,t){1&i&&Yt(0,4)}function jre(i,t){if(1&i&&(G(0,"div",11),Ie(1,"input",12),G(2,"div",13),ki(),G(3,"svg",14),Ie(4,"path",15),j(),ya(),Ie(5,"div",16),j()()),2&i){const e=re();ln("mdc-checkbox--disabled",e.disabled),V(1),U("checked",e.selected)("disabled",e.disabled)}}function Yre(i,t){if(1&i&&(G(0,"div",17),Ie(1,"input",18),G(2,"div",19),Ie(3,"div",20)(4,"div",21),j()()),2&i){const e=re();ln("mdc-radio--disabled",e.disabled),V(1),U("checked",e.selected)("disabled",e.disabled)}}function qre(i,t){}function Xre(i,t){if(1&i&&(G(0,"span",22),fe(1,qre,0,0,"ng-template",23),j()),2&i){re();const e=Zi(3);V(1),U("ngTemplateOutlet",e)}}function Kre(i,t){}function Zre(i,t){if(1&i&&(G(0,"span",24),fe(1,Kre,0,0,"ng-template",23),j()),2&i){re();const e=Zi(5);V(1),U("ngTemplateOutlet",e)}}function Qre(i,t){}function Jre(i,t){1&i&&fe(0,Qre,0,0,"ng-template",23),2&i&&(re(),U("ngTemplateOutlet",Zi(1)))}function ese(i,t){}function tse(i,t){if(1&i&&(G(0,"span",25),fe(1,ese,0,0,"ng-template",23),j()),2&i){re();const e=Zi(3);V(1),U("ngTemplateOutlet",e)}}function nse(i,t){}function ise(i,t){if(1&i&&(G(0,"span",25),fe(1,nse,0,0,"ng-template",23),j()),2&i){re();const e=Zi(5);V(1),U("ngTemplateOutlet",e)}}function rse(i,t){}function sse(i,t){1&i&&fe(0,rse,0,0,"ng-template",23),2&i&&(re(),U("ngTemplateOutlet",Zi(1)))}const ose=[[["","matListItemTitle",""]],[["","matListItemLine",""]],"*",[["mat-divider"]],[["","matListItemAvatar",""],["","matListItemIcon",""]]],ase=["[matListItemTitle]","[matListItemLine]","*","mat-divider","[matListItemAvatar],[matListItemIcon]"],zH=new me("ListOption");let lse=(()=>{class i{constructor(e){this._elementRef=e}}return i.\u0275fac=function(e){return new(e||i)(E(vt))},i.\u0275dir=ve({type:i,selectors:[["","matListItemTitle",""]],hostAttrs:[1,"mat-mdc-list-item-title","mdc-list-item__primary-text"]}),i})(),cse=(()=>{class i{constructor(e){this._elementRef=e}}return i.\u0275fac=function(e){return new(e||i)(E(vt))},i.\u0275dir=ve({type:i,selectors:[["","matListItemLine",""]],hostAttrs:[1,"mat-mdc-list-item-line","mdc-list-item__secondary-text"]}),i})(),HH=(()=>{class i{constructor(e){this._listOption=e}_isAlignedAtStart(){return!this._listOption||"after"===this._listOption?._getTogglePosition()}}return i.\u0275fac=function(e){return new(e||i)(E(zH,8))},i.\u0275dir=ve({type:i,hostVars:4,hostBindings:function(e,n){2&e&&ln("mdc-list-item__start",n._isAlignedAtStart())("mdc-list-item__end",!n._isAlignedAtStart())}}),i})(),dse=(()=>{class i extends HH{}return i.\u0275fac=function(){let t;return function(n){return(t||(t=si(i)))(n||i)}}(),i.\u0275dir=ve({type:i,selectors:[["","matListItemAvatar",""]],hostAttrs:[1,"mat-mdc-list-item-avatar"],features:[dt]}),i})(),use=(()=>{class i extends HH{}return i.\u0275fac=function(){let t;return function(n){return(t||(t=si(i)))(n||i)}}(),i.\u0275dir=ve({type:i,selectors:[["","matListItemIcon",""]],hostAttrs:[1,"mat-mdc-list-item-icon"],features:[dt]}),i})();const hse=new me("MAT_LIST_CONFIG");let ZR=(()=>{class i{constructor(){this._isNonInteractive=!0,this._disableRipple=!1,this._disabled=!1,this._defaultOptions=Lt(hse,{optional:!0})}get disableRipple(){return this._disableRipple}set disableRipple(e){this._disableRipple=tn(e)}get disabled(){return this._disabled}set disabled(e){this._disabled=tn(e)}}return i.\u0275fac=function(e){return new(e||i)},i.\u0275dir=ve({type:i,hostVars:1,hostBindings:function(e,n){2&e&&It("aria-disabled",n.disabled)},inputs:{disableRipple:"disableRipple",disabled:"disabled"}}),i})(),$H=(()=>{class i{set lines(e){this._explicitLines=Ps(e,null),this._updateItemLines(!1)}get disableRipple(){return this.disabled||this._disableRipple||this._noopAnimations||!!this._listBase?.disableRipple}set disableRipple(e){this._disableRipple=tn(e)}get disabled(){return this._disabled||!!this._listBase?.disabled}set disabled(e){this._disabled=tn(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 Qt,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(Cr(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)(E(vt),E(gt),E(ZR,8),E(zi),E(eR,8),E(kr,8))},i.\u0275dir=ve({type:i,contentQueries:function(e,n,r){if(1&e&&(Wi(r,dse,4),Wi(r,use,4)),2&e){let s;At(s=Dt())&&(n._avatars=s),At(s=Dt())&&(n._icons=s)}},hostVars:4,hostBindings:function(e,n){2&e&&(It("aria-disabled",n.disabled)("disabled",n._isButtonElement&&n.disabled||null),ln("mdc-list-item--disabled",n.disabled))},inputs:{lines:"lines",disableRipple:"disableRipple",disabled:"disabled"}}),i})();const GH=new me("SelectionList");let wC=(()=>{class i extends $H{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=tn(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 $e,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)(E(vt),E(gt),E(GH),E(zi),E(Qn),E(eR,8),E(kr,8))},i.\u0275cmp=ot({type:i,selectors:[["mat-list-option"]],contentQueries:function(e,n,r){if(1&e&&(Wi(r,cse,5),Wi(r,lse,5)),2&e){let s;At(s=Dt())&&(n._lines=s),At(s=Dt())&&(n._titles=s)}},viewQuery:function(e,n){if(1&e&&$n(Gre,5),2&e){let r;At(r=Dt())&&(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&&Oe("blur",function(){return n._handleBlur()})("click",function(){return n._toggleOnInteraction()}),2&e&&(It("aria-selected",n.selected),ln("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:[Dn([{provide:$H,useExisting:i},{provide:zH,useExisting:i}]),dt],ngContentSelectors:ase,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&&(or(ose),fe(0,Wre,1,0,"ng-template",null,0,zc),fe(2,jre,6,4,"ng-template",null,1,zc),fe(4,Yre,5,4,"ng-template",null,2,zc),fe(6,Xre,2,1,"span",3),fe(7,Zre,2,1,"span",4),fe(8,Jre,1,1,"ng-template",5),G(9,"span",6),Yt(10),Yt(11,1),G(12,"span",7,8),Oe("cdkObserveContent",function(){return n._updateItemLines(!0)}),Yt(14,2),j()(),fe(15,tse,2,1,"span",9),fe(16,ise,2,1,"span",9),fe(17,sse,1,1,"ng-template",5),Yt(18,3),Ie(19,"div",10)),2&e&&(V(6),U("ngIf",n._hasCheckboxAt("before")),V(1),U("ngIf",n._hasRadioAt("before")),V(1),U("ngIf",n._hasIconsOrAvatarsAt("before")),V(7),U("ngIf",n._hasCheckboxAt("after")),V(1),U("ngIf",n._hasRadioAt("after")),V(1),U("ngIf",n._hasIconsOrAvatarsAt("after")))},dependencies:[SU,_i,xy],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 fse={provide:Io,useExisting:Gn(()=>MC),multi:!0};class pse{constructor(t,e){this.source=t,this.options=e}}let MC=(()=>{class i extends ZR{get multiple(){return this._multiple}set multiple(e){const n=tn(e);n!==this._multiple&&(this._multiple=n,this.selectedOptions=new HR(this._multiple,this.selectedOptions.selected))}get hideSingleSelectionIndicator(){return this._hideSingleSelectionIndicator}set hideSingleSelectionIndicator(e){this._hideSingleSelectionIndicator=tn(e)}constructor(e,n){super(),this._element=e,this._ngZone=n,this._initialized=!1,this._destroyed=new Te,this._onChange=r=>{},this.selectionChange=new $e,this.color="accent",this.compareWith=(r,s)=>r===s,this._multiple=!0,this._hideSingleSelectionIndicator=this._defaultOptions?.hideSingleSelectionIndicator??!1,this.selectedOptions=new HR(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 pse(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=tn(e),this._selectionListDisabled&&this._keyManager?.setActiveItem(-1)}registerOnChange(e){this._onChange=e}registerOnTouched(e){this._onTouched=e}_watchForSelectionChange(){this.selectedOptions.changed.pipe(Ue(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()&&Qo(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 kU(this._items).withHomeAndEnd().withTypeAhead().withWrap().skipPredicate(()=>this.disabled),this._resetActiveOption(),this._keyManager.change.subscribe(e=>this._setActiveOption(e)),this._items.changes.pipe(Ue(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=FM();return e&&this._element.nativeElement.contains(e)}}return i.\u0275fac=function(e){return new(e||i)(E(vt),E(gt))},i.\u0275cmp=ot({type:i,selectors:[["mat-selection-list"]],contentQueries:function(e,n,r){if(1&e&&Wi(r,wC,5),2&e){let s;At(s=Dt())&&(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&&Oe("keydown",function(s){return n._handleKeydown(s)}),2&e&&It("aria-multiselectable",n.multiple)},inputs:{color:"color",compareWith:"compareWith",multiple:"multiple",hideSingleSelectionIndicator:"hideSingleSelectionIndicator",disabled:"disabled"},outputs:{selectionChange:"selectionChange"},exportAs:["matSelectionList"],features:[Dn([fse,{provide:ZR,useExisting:i},{provide:GH,useExisting:i}]),dt,xi],ngContentSelectors:Hre,decls:1,vars:0,template:function(e,n){1&e&&(or(),Yt(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})(),mse=(()=>{class i{}return i.\u0275fac=function(e){return new(e||i)},i.\u0275mod=en({type:i}),i.\u0275inj=Wt({imports:[HI,co,Jn,tb,JU,kV]}),i})();function gse(i,t){if(1&i&&(G(0,"mat-label"),Be(1),j()),2&i){const e=re(2);V(1),ui(e.resource.name)}}function _se(i,t){if(1&i&&(G(0,"mat-list-option",5),Be(1),j()),2&i){const e=t.$implicit,n=re(2);U("value",e.key)("selected",n.resource.data[e.key])("disabled",n.disabled),V(1),Qi(" ",e.key," ")}}function vse(i,t){if(1&i){const e=jn();Gr(0,1),fe(1,gse,2,1,"mat-label",2),G(2,"mat-selection-list",3),Oe("selectionChange",function(r){return Vt(e),Et(re().onSelection(r))}),fe(3,_se,2,4,"mat-list-option",4),ct(4,"keyvalue"),j(),Wr()}if(2&i){const e=re();U("matTooltip",e.resourceDescription),V(1),U("ngIf",e.resource.name),V(1),U("disabled",e.disabled),V(1),U("ngForOf",ut(4,4,e.resource.data))}}let yse=(()=>{class i{constructor(){this.resource=null,this.resourceDescription="",this.disabled=!1,this.changed=new $e}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=ot({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&&fe(0,vse,5,6,"ng-container",0),2&e&&U("ngIf",n.resource)},dependencies:[lo,_i,Ro,Fs,MC,wC,dB],styles:["[_nghost-%COMP%]{padding-bottom:1.34375em}"],changeDetection:0}),i})();class WH{get tick$(){return this._tick$.asObservable()}get children(){return[...this._children]}constructor(t){this.parent=t,this._tick$=new Te,this._children=[],t&&t.addChild(this)}addChild(t){if(t.parent!==this)throw new Error("Incorrect child clock");this._children.includes(t)||this._children.push(t)}removeChild(t){if(t.parent!==this)throw new Error("Incorrect child clock");this._children=this._children.filter(e=>e!==t)}dispose(){this.parent&&this.parent.removeChild(this);for(const t of this._children)t.dispose();this._tick$.complete()}}const xse=typeof performance>"u"?()=>Date.now():()=>performance.now();class jm extends WH{static get instance(){return jm._instance||(jm._instance=new jm),jm._instance}get elapsedTime(){return xse()}constructor(){super(null);let t=this.elapsedTime;const e=()=>{requestAnimationFrame(e);const n=t,r=this.elapsedTime;t=r,this._tick$.next([n,r-n])};requestAnimationFrame(e)}dispose(){throw new Error("Cannot dispose global clock")}}class jH extends WH{get isRunning(){return!!this.tickSub}get isPaused(){return-1!==this.pausedAt}get isStopped(){return-1===this.startedAt}get timeScale(){return this._timeScale}set timeScale(t){if(t!==this._timeScale||this.pausedByTimescale&&0!==t){if(0===t)return void(this.isPaused||(this.pause(),this.pausedByTimescale=!0));if(this.isPaused&&this.pausedByTimescale&&(this.resume(),this.pausedByTimescale=!1),!this.isStopped){const e=this.isPaused?this.pausedAt:this.parentClock.elapsedTime;this.startedAt=e-(e-this.startedAt)*this.timeScale/t}this._timeScale=t}}get elapsedTime(){return this.isStopped?this.lastStopElapsed:this.isPaused?this._timeScale*(this.pausedAt-this.startedAt):this._timeScale*(this.parentClock.elapsedTime-this.startedAt)}constructor(t=!1,e=jm.instance){super(e),this.parentClock=e,this.tickSub=null,this._internalTick$=new Te,this.tickRateLimit=0,this.paused$=new Te,this.startedAt=-1,this.oldRelativeTime=0,this.pausedAt=-1,this.lastStopElapsed=0,this._timeScale=1,this.pausedByTimescale=!1,this.lastFiredTickElapsed=0,t&&this.start(),this._internalTick$.pipe(tt(([n,r])=>[r,r-this.lastFiredTickElapsed]),gn(([n])=>!this.tickRateLimit||Math.floor(this.lastFiredTickElapsed*this.tickRateLimit/1e3)this.lastFiredTickElapsed=n)).subscribe(this._tick$)}start(){this.isRunning||(this.oldRelativeTime=0,this.startedAt=this.parentClock.elapsedTime,this.startListeningTicks())}stop(){this.stopListeningTicks(),this.lastStopElapsed=this.elapsedTime,this.startedAt=this.pausedAt=-1}pause(){this.stopListeningTicks(),this.pausedAt=this.parentClock.elapsedTime,this.pausedByTimescale=!1,this.paused$.next(!0)}resume(){this.isRunning||-1==this.pausedAt||(this.startedAt+=this.parentClock.elapsedTime-this.pausedAt,this.pausedAt=-1,this.startListeningTicks(),this.paused$.next(!1))}startListeningTicks(){if(this.tickSub)throw new Error("Clock is already ticking!");this.tickSub=this.parentClock.tick$.pipe(tt(([t,e])=>[this.oldRelativeTime,this.oldRelativeTime+e*this.timeScale]),Vi(([t,e])=>this.oldRelativeTime=e)).subscribe(this._internalTick$)}stopListeningTicks(){var t;null===(t=this.tickSub)||void 0===t||t.unsubscribe(),this.tickSub=null}dispose(){this.stopListeningTicks(),this._internalTick$.complete(),super.dispose()}}const wse={transparent:!1,background:0,size:"fullscreen",antialias:!0};class Mse{constructor(t,e,n={}){this.scene=t,this.canvas=e,this.entity=null,this.rendererOptions=Object.assign(Object.assign({},wse),n||{})}}class mb{static fromArray(t,e=!1){const n=new mb(t[0]);let r=n;for(let s=1;sn.map(r=>new mb(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]}constructor(t){this.data=t,this.adjacent=new Set}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(d=>!e.has(d));for(const d of c)e.add(d),r.push([d,a-1])}}return n}nodes(){return Array.from(this.walkRead(-1))}}var oc=(()=>{return(i=oc||(oc={}))[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",oc;var i})();let Kh=(()=>{class i{constructor(){this.tick$=new Te,this._world=null,this._name="e0x"+(i.default_name_counter++).toString(16),this._selfActive=!0,this.parent=null,this._children=[],this._components=[],this._onSpawned$=new Te,this._onRemoved$=new Te}get world(){return this._world}get name(){return this._name}set name(e){this._name=e}get active(){return this._selfActive&&(!this.parent||this.parent.active)}set active(e){this._selfActive=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 Cse extends Kh{constructor(t){super(),this.tickOrder=t}}function Ym(i,t=oc.CONTROLLERS,e){const n=new Cse(t);return e&&(n.name=e),i.addEntity(n),n.tick$.pipe(su(()=>{i.removeEntity(n,!0)}))}class QR extends Kh{get rendererSize$(){return this._rendererSize$.asObservable()}get rendererSize(){return this._rendererSize$.getValue()}get rendererOptions(){return this.renderer.rendererOptions}get physicsDebugViewActive(){return this.renderer.physicsDebugViewActive}set physicsDebugViewActive(t){this.renderer.physicsDebugViewActive=t}constructor(t){super(),this.renderer=t,this.tickOrder=oc.RENDERING,this._rendererSize$=new Qe(null),this.addComponents(t),this.tick$.subscribe(()=>{this.renderer.render()})}onSpawned(t){this._rendererSize$.next(null),"fullscreen"==this.rendererOptions.size||"function"==typeof this.rendererOptions.size?(this.renderer.canvas&&(this.renderer.canvas.style.position="absolute"),Cr(To(window,"resize").pipe(Wy(100)),To(window,"orientationchange")).pipe(Ue(this._onRemoved$),tt(()=>({x:window.innerWidth,y:window.innerHeight})),Do({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 In||void 0!==this.rendererOptions.size.subscribe&&void 0!==this.rendererOptions.size.pipe?this.rendererOptions.size.pipe(Ue(this._onRemoved$)).subscribe(e=>{this._rendererSize$.next(e)}):this._rendererSize$.next(this.rendererOptions.size),this._rendererSize$.pipe(Ue(this._onRemoved$),Ql((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 JR=i=>{i.updateVisibility?i.updateVisibility():YH(i)},YH=i=>{for(const t of i.children)JR(t)};class Sse extends Kh{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(){YH(this)}addChildren(...t){super.addChildren(...t);for(const e of t)JR(e)}removeChildren(t,e=!1){if(super.removeChildren(t,e),!e)for(const n of t)JR(n)}}class ek{constructor(){this._running=!1,this.stop$=new Te}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 Ese extends ek{get output$(){return this._output$.asObservable()}constructor(t,e){super(),this.keyboard=t,this.keymap=e,this._output$=new Te}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")),Ra(t.map(e=>this.keyboard.bindMany(...e))).pipe(Ue(this.stop$),tt(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 tk=new In(ms);class CC extends ek{constructor(){super(),this.bindings={},this.skipKeyDownsOnExternalFocus=!0,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 Qe(!1);return this.bindings[t].push(e),e.pipe(Ql(),su(()=>{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"),tk;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 Qe(!1);this.bindings[n].push(r),e.push(r)}return Ra(e).pipe(su(()=>{for(let n=0;nn.includes(!0)),Ql())}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 CC.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)}}CC.externalFocusBlacklist=[HTMLInputElement,HTMLTextAreaElement,HTMLSelectElement,HTMLButtonElement];class yi{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 yi.len(yi.sub(t,e))}static norm(t){const e=yi.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 Dse={pointerLock:!1};var Ls=(()=>{return(i=Ls||(Ls={}))[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",Ls;var i})();class qm extends ek{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$=To(this._element,"wheel",{passive:!1}).pipe(Ue(this.stopped$),su(()=>this._wheel$=null),Vi(t=>t.preventDefault()),tt(t=>t.deltaY),Vf())),this._wheel$}get isPointerLocked(){return!!document.pointerLockElement}get isPointerLocked$(){return To(document,"pointerlockchange").pipe(tt(()=>this.isPointerLocked))}get state(){return this._state$.getValue()}get state$(){return this._state$.asObservable()}get multiTouchPositions$(){return this._multiTouchPositions$.asObservable()}get twoTouchGestureDelta$(){return this.state$.pipe(ks(t=>t==Ls.DRAG_TOUCH_TWO_FINGERS?this.multiTouchPositions$:tk),tt(t=>t.map(e=>({x:e.x,y:e.y}))),function Ase(){return ni((i,t)=>{let e,n=!1;i.subscribe(qn(t,r=>{const s=e;e=r,n&&t.next([s,r]),n=!0}))})}(),gn(([t,e])=>t.length>1&&e.length>1),tt(([t,e])=>({centerPointDelta:yi.sub(yi.scalarMult(e.reduce((n,r)=>yi.add(n,r),yi.O),1/e.length),yi.scalarMult(t.reduce((n,r)=>yi.add(n,r),yi.O),1/e.length)),angleDelta:yi.angle(e[1],e[0])-yi.angle(t[1],t[0]),distanceDelta:yi.dist(e[1],e[0])-yi.dist(t[1],t[0])})))}get _element(){return this.options.canvas||window}constructor(t={}){super(),this._wheel$=null,this._delta$=new Te,this._position$=new Qe(yi.O),this._multiTouchPositions$=new Qe([]),this.stopped$=new Te,this._state$=new Qe(Ls.NONE),this.options=Object.assign(Object.assign({},Dse),t),this.canvasClickListener=this.canvasClickListener.bind(this)}startInternal(){this.options.canvas&&(this.options.canvas.style.touchAction="none"),this._state$.next(Ls.NONE);const t=[Ls.DRAG,Ls.DRAG_MIDDLE_BUTTON,Ls.DRAG_RIGHT_BUTTON],e=[Ls.NONE,Ls.DRAG,Ls.DRAG_TOUCH_TWO_FINGERS],n=[],r={};To(this._element,"mousemove").pipe(Ue(this.stopped$)).subscribe(o=>{this._delta$.next({x:o.movementX,y:o.movementY})}),To(this._element,"pointermove").pipe(Ue(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})}),!qm.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{if(0===n.length)try{this.options.canvas&&this.options.canvas.setPointerCapture(o.pointerId),window.addEventListener("pointerup",s),this._element.addEventListener("pointercancel",s)}catch(a){console.error(a)}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]||Ls.NONE)}),To(this._element,"contextmenu").pipe(Ue(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 Tse{static lookAt(t,e,n){let r=Re.sub(t,e);r=0===Re.lenSq(r)?Object.assign(Object.assign({},r),{z:1}):Re.norm(r);let s=Re.cross(n,r);0===Re.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=Re.norm(r),s=Re.cross(n,r)),s=Re.norm(s);let o=Re.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 Yi{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,d=t.w*Math.sin((1-n)*s)/o+e.w*Math.sin(n*s)/o;return isNaN(a)||isNaN(l)||isNaN(c)||isNaN(d)?Yi.clone(t):{x:a,y:l,z:c,w:d}}static fromAngle(t,e){const n=e/2,r=Math.sin(n);return Object.assign(Object.assign({},Re.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],d=t[10],h=e+o+d;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>d){const p=2*Math.sqrt(1+e-o-d);return{x:.25*p,y:(n+s)/p,z:(r+l)/p,w:(c-a)/p}}if(o>d){const p=2*Math.sqrt(1+o-e-d);return{x:(n+s)/p,y:.25*p,z:(a+c)/p,w:(r-l)/p}}{const p=2*Math.sqrt(1+d-e-o);return{x:(r+l)/p,y:(a+c)/p,z:.25*p,w:(s-n)/p}}}static fromMatrix3(t){const e=t[0][0]+t[1][1]+t[2][2];let n,r,s,o;if(e>0){const a=.5/Math.sqrt(e+1);n=.25/a,r=(t[2][1]-t[1][2])*a,s=(t[0][2]-t[2][0])*a,o=(t[1][0]-t[0][1])*a}else if(t[0][0]>t[1][1]&&t[0][0]>t[2][2]){const a=2*Math.sqrt(1+t[0][0]-t[1][1]-t[2][2]);n=(t[2][1]-t[1][2])/a,r=.25*a,s=(t[0][1]+t[1][0])/a,o=(t[0][2]+t[2][0])/a}else if(t[1][1]>t[2][2]){const a=2*Math.sqrt(1+t[1][1]-t[0][0]-t[2][2]);n=(t[0][2]-t[2][0])/a,r=(t[0][1]+t[1][0])/a,s=.25*a,o=(t[1][2]+t[2][1])/a}else{const a=2*Math.sqrt(1+t[2][2]-t[0][0]-t[1][1]);n=(t[1][0]-t[0][1])/a,r=(t[0][2]+t[2][0])/a,s=(t[1][2]+t[2][1])/a,o=.25*a}return{w:n,x:r,y:s,z:o}}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),d=Math.sin(.5*e);return{w:c*a*s+d*l*o,x:d*a*s-c*l*o,y:c*l*s+d*a*o,z:c*a*o-d*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=Re.Z){return this.fromMatrix4(Tse.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 Re{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 Re.len(Re.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=Re.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,Yi.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)}}}function nk(i,t,e,n){return r=>r.pipe(tI((s,o)=>{var a;return{targetValue:o,currentValue:null!==(a=s.currentValue)&&void 0!==a?a:o,hasReachedTarget:!1}},{targetValue:null,currentValue:null,hasReachedTarget:!1}),ks(s=>i.pipe(tt(([o,a])=>{if(null===s.targetValue||null===s.currentValue)return s.currentValue;if(s.hasReachedTarget)return;const l=1-Math.exp(-a/t),c=e(s.currentValue,s.targetValue,l);return s.currentValue=c,n(c,s.targetValue)?(s.hasReachedTarget=!0,s.targetValue):c}))),tt(s=>void 0!==s?s:null),gn(s=>null!==s))}ps(738);class kse extends Kh{get avgReport(){return this._avgReport}get peakReport(){return this._peakReport}constructor(t=60,e=15){super(),this.maxSamples=t,this.maxRows=e,this.tickOrder=Number.MAX_SAFE_INTEGER,this.sampleIndex=0,this.collectedData=new Map,this._avgReport={totalTime:0,entries:[]},this._peakReport={totalTime:0,entries:[]}}onSpawned(t){super.onSpawned(t),this.sampleIndex=0;const e=()=>(typeof performance>"u"?Date:performance).now();this.world.tickForwardTo$.pipe(Ue(this.onRemoved$)).subscribe(n=>{n!==this&&(this.collectedData.has(n)?this.collectedData.get(n).push([this.sampleIndex,e(),0]):this.collectedData.set(n,[[this.sampleIndex,e(),0]]))}),this.world.tickForwardedTo$.pipe(Ue(this.onRemoved$)).subscribe(n=>{if(n===this)return;const r=this.collectedData.get(n);r[r.length-1][2]=e()}),this.tick$.pipe(Ue(this.onRemoved$)).subscribe(()=>{this.sampleIndex++;const n=Array.from(this.collectedData.entries());for(const[h,p]of n){for(;p.length>0&&p[0][0]h instanceof Kh?""===h.name?h.constructor.name:h.name:"PHYSICS_WORLD"===h?"Physics simulation":h,s=h=>{let p=0,m=0;for(;mh.length-m+1){m--;break}p+=h[h.length-m-1][1]}return m>1&&(h=h.slice(0,h.length-m)).push([`Rest (${m})`,p]),h};let o=0,a=Array.from(this.collectedData.entries()).map(([h,p])=>{const m=p.reduce((g,[b,v,y])=>g+y-v,0)/this.maxSamples;return o+=m,[r(h),m]}).sort((h,p)=>p[1]-h[1]);a=s(a),this._avgReport={totalTime:o,entries:a};let l=new Map,c=Array.from(this.collectedData.entries()).map(([h,p])=>{let m=0;for(const[g,b,v]of p){const y=v-b;m=Math.max(m,y),l.set(g,y+(l.get(g)||0))}return[r(h),m]}).sort((h,p)=>p[1]-h[1]);c=s(c);let d=Array.from(l.values()).reduce((h,p)=>Math.max(h,p),0);this._peakReport={totalTime:d,entries:c}})}onRemoved(){super.onRemoved(),this.collectedData=new Map,this._avgReport={totalTime:0,entries:[]},this._peakReport={totalTime:0,entries:[]}}}var Xm=function(i,t,e,n){return new(e||(e=Promise))(function(s,o){function a(d){try{c(n.next(d))}catch(h){o(h)}}function l(d){try{c(n.throw(d))}catch(h){o(h)}}function c(d){d.done?s(d.value):function r(s){return s instanceof e?s:new e(function(o){o(s)})}(d.value).then(a,l)}c((n=n.apply(i,t||[])).next())})};class bl{static get documentWorlds(){return[...bl._documentWorlds]}constructor(t,e){this.visualScene=t,this.physicsWorld=e,this.worldClock=new jH(!1),this.keyboardInput=new CC,this.name="w0x"+(bl.default_name_counter++).toString(16),this.children=[],this.tickListeners=[],this.tickStarted$=new Te,this.tickForwardTo$=new Te,this.tickForwardedTo$=new Te,this.paused$=new Te,this.disposed$=new Te,this.keyboardInput.start(),window.ggstatic?this.registerConsoleCommands(window.ggstatic):(this.onGgStaticInitialized=this.onGgStaticInitialized.bind(this),window.addEventListener("ggstatic_added",this.onGgStaticInitialized)),this.worldClock.paused$.subscribe(this.paused$),bl._documentWorlds.push(this),bl.worldCreated$.next(this)}init(){return Xm(this,void 0,void 0,function*(){yield Promise.all([this.physicsWorld.init(),this.visualScene.init()]);const t=(e,n,r)=>{e.active&&(this.tickForwardTo$.next(e),e.tick$.next([n,r]),this.tickForwardedTo$.next(e))};this.worldClock.tick$.subscribe(([e,n])=>{this.tickStarted$.next();let r=0;for(;r=oc.PHYSICS_SIMULATION);r++)t(this.tickListeners[r],e,n);for(this.tickForwardTo$.next("PHYSICS_WORLD"),this.physicsWorld.simulate(n),this.tickForwardedTo$.next("PHYSICS_WORLD");re.tickOrder-n.tickOrder),t.onSpawned(this))}removeEntity(t,e=!1){if(t.world){if(t.world!==this)throw new Error("Entity is not a part of this world");this.children.splice(this.children.findIndex(n=>n===t),1),this.tickListeners.splice(this.tickListeners.findIndex(n=>n===t),1),t.onRemoved()}e&&t.dispose()}onGgStaticInitialized(){window.removeEventListener("ggstatic_added",this.onGgStaticInitialized),this.registerConsoleCommands(window.ggstatic)}registerConsoleCommands(t){t.registerConsoleCommand(this,"timescale",(...e)=>Xm(this,void 0,void 0,function*(){return isNaN(+e[0])||(this.worldClock.timeScale=+e[0]),this.worldClock.timeScale.toString()}),"args: [ float? ]; Get current time scale of selected world clock or set it. Default value is 1.0 (no time scale applied)"),t.registerConsoleCommand(this,"fps_limit",(...e)=>Xm(this,void 0,void 0,function*(){return isNaN(+e[0])||(this.worldClock.tickRateLimit=+e[0]),this.worldClock.tickRateLimit.toString()}),"args: [ int? ]; Get current tick rate limit of selected world clock or set it. 0 means no limit applied"),t.registerConsoleCommand(this,"renderers",()=>Xm(this,void 0,void 0,function*(){return this.children.filter(e=>e instanceof QR).map(e=>e.name).join("\n")}),"no args; Print all renderers in selected world"),t.registerConsoleCommand(this,"debug_view",(...e)=>Xm(this,void 0,void 0,function*(){let r,n="toggle";for(let o of e)["1","0"].includes(o)?n="1"===o:r=o;let s=this.children.find(o=>o instanceof QR&&(!r||o.name===r));if(s)return s.physicsDebugViewActive="toggle"===n?!s.physicsDebugViewActive:n,s.physicsDebugViewActive?"1":"0";throw r?new Error(`Renderer with name "${r}" not found`):new Error("No renderer found")}),'args: [ 0|1?, string? ]; Turn on/off physics debug view, skip first argument to toggle value. Second argument expects renderer name, if not provided first renderer will be picked. Use "renderers" to get list of renderers in the world'),t.registerConsoleCommand(this,"performance",(...e)=>Xm(this,void 0,void 0,function*(){let n="avg",r=20;for(let d of e)["avg","peak"].includes(d)?n=d:isNaN(+d)||(r=+d);const s=new kse(r,250);this.addEntity(s),yield function Ise(i,t){const e="object"==typeof t;return new Promise((n,r)=>{let o,s=!1;i.subscribe({next:a=>{o=a,s=!0},error:r,complete:()=>{s?n(o):e?n(t.defaultValue):r(new fm)}})})}(this.worldClock.tick$.pipe(Oi(r)));const o="avg"===n?s.avgReport:s.peakReport;this.removeEntity(s);const a=o.entries.map(([d,h])=>`${d}:`+new Array(Math.max(0,26-d.length)).join(" ")+`${h.toFixed(2)} ms`+("avg"===n?` (${(100*h/o.totalTime).toFixed(2)}%)`:""));let l="lightgreen";o.totalTime>12&&(l=o.totalTime<16?"yellow":"red");const c=("avg"===n?"Average":"Peak")+" Frame time";return a.unshift(c+":"+new Array(Math.max(0,26-c.length)).join(" ")+`${o.totalTime.toFixed(2)} ms`),a.unshift(`Performance report (${r} samples)`),a.join("\n")}),'args: [ int?, avg|peak? ]; Measure how much time was spent per entity in world. Arguments are samples amount (20 by default) and "peak" or "avg" choice, both arguments are optional. "avg" report sorts entities by average time consumed, "peak" records highest value for each entity')}}bl.default_name_counter=0,bl._documentWorlds=[],bl.worldCreated$=new Te;class Lse extends Mse{}class XH extends Sse{constructor(){super(...arguments),this._world=null}get world(){return this._world}}class ea extends XH{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}constructor(t){super(),this.tickOrder=oc.OBJECTS_BINDING,this._position=Re.O,this._rotation=Yi.O,this.object3D=null,this.objectBody=null,t.objectBody&&(this.objectBody=t.objectBody,this.name=this.objectBody.name,this.addComponents(this.objectBody)),t.object3D&&(this.object3D=t.object3D,t.objectBody||(this._position=this.object3D.position,this._rotation=this.object3D.rotation,this.name=this.object3D.name),this.addComponents(this.object3D)),this.objectBody&&(this.tick$.subscribe(()=>{this.runTransformBinding(this.objectBody,this.object3D)}),this.runTransformBinding(this.objectBody,this.object3D))}}class Km extends mb{static fromMapArray(t,e=!1){const n=new Km(t[0]);let r=n;for(let s=1;sn.map(r=>new Km(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));othis.mapGraph.getNearestDummy(this.mapGraphNodes,this.loaderCursor$.getValue())),Ql(),Vi(r=>this._nearestDummy$.next(r))).subscribe(r=>{let o,s=new Set;if(this.options.inertia>0){o=new Set;const a=r.walkReadPreserveDepth(this.options.loadDepth+this.options.inertia);for(let l=0;lo.add(c.data)),l<=this.options.loadDepth&&a[l].forEach(c=>s.add(c.data))}else r.walkRead(this.options.loadDepth).forEach(a=>s.add(a.data)),o=s;for(const a of this.loaded.keys())o.has(a)?s.delete(a):n.includes(a)||n.push(a);for(let a of Array.from(s.keys()))e.includes(a)||e.push(a)}),this.tick$.pipe(Do(null),Ue(this._onRemoved$)).subscribe(()=>{if(n.length){for(const r of n)this.disposeChunk(r);n=[]}if(e.length)if(this._initialLoadComplete$.value&&e.length>this.options.maxNodesLoadingPerTick){let r=e.slice(0,this.options.maxNodesLoadingPerTick);e=e.slice(this.options.maxNodesLoadingPerTick),Promise.all(r.map(s=>this.loadChunk(s))).then()}else Promise.all(e.map(r=>this.loadChunk(r))).then(()=>{this._initialLoadComplete$.value||this._initialLoadComplete$.next(!0)}),e=[]})}onRemoved(){super.onRemoved(),this.loadClock&&(this.loadClock.stop(),this.loadClock=null),this.loaderCursor$.next(Re.O)}loadChunk(t){return function(i,t,e,n){return new(e||(e=Promise))(function(s,o){function a(d){try{c(n.next(d))}catch(h){o(h)}}function l(d){try{c(n.throw(d))}catch(h){o(h)}}function c(d){d.done?s(d.value):function r(s){return s instanceof e?s:new e(function(o){o(s)})}(d.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||Yi.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||Yi.O}]),[n,e]})}disposeChunk(t){this.loaded.has(t)&&(this.removeChildren(this.loaded.get(t),!0),this.loaded.delete(t))}}class Use extends QR{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 e4=function(i,t,e,n){return new(e||(e=Promise))(function(s,o){function a(d){try{c(n.next(d))}catch(h){o(h)}}function l(d){try{c(n.throw(d))}catch(h){o(h)}}function c(d){d.done?s(d.value):function r(s){return s instanceof e?s:new e(function(o){o(s)})}(d.value).then(a,l)}c((n=n.apply(i,t||[])).next())})};const t4={keymap:"wasd",cameraLinearSpeed:20,cameraMovementElasticity:0,cameraBoostMultiplier:2.5,cameraRotationSensitivity:1,cameraRotationElasticity:0,mouseOptions:{},ignoreMouseUnlessPointerLocked:!1,ignoreKeyboardUnlessPointerLocked:!1};class n4 extends Kh{get active(){return super.active}set active(t){!super.active&&t&&this.reset(),super.active=t}get spherical(){return this._spherical}set spherical(t){this._spherical.phi=Math.max(1e-6,Math.min(Math.PI-1e-6,t.phi)),this._spherical.theta=t.theta,this.resetMotion$.next()}constructor(t,e,n={}){super(),this.keyboard=t,this.camera=e,this.tickOrder=oc.INPUT_CONTROLLERS,this._spherical={phi:0,radius:1,theta:0},this.resetMotion$=new Te,this.options=Object.assign(Object.assign({},t4),n),n.mouseOptions&&(this.options.mouseOptions=Object.assign(Object.assign({},t4.mouseOptions),n.mouseOptions)),this.mouseInput=new qm(this.options.mouseOptions),this.directionsInput=new Ese(t,this.options.keymap)}reset(){this._spherical=Re.toSpherical(Re.rot({x:0,y:0,z:-1},this.camera.rotation)),this.resetMotion$.next()}onSpawned(t){const e=Object.create(null,{onSpawned:{get:()=>super.onSpawned}});return e4(this,void 0,void 0,function*(){yield e.onSpawned.call(this,t),this._spherical=Re.toSpherical(Re.rot({x:0,y:0,z:-1},this.camera.rotation));const n=["KeyE","KeyQ"];this.camera.camera.supportsFov&&n.push("KeyZ","KeyC"),n.push("ShiftLeft");let r=Ra([this.directionsInput.output$,...n.map(c=>this.keyboard.bind(c))]).pipe(Ue(this._onRemoved$),tt(([c,...d])=>{let h={direction:{},rest:[]};(!this.options.ignoreKeyboardUnlessPointerLocked||this.mouseInput.isPointerLocked)&&(h={direction:c,rest:d});let p=Object.assign({},Re.O);const[m,g,b,v,y]=h.rest;void 0!==h.direction.upDown&&(p.z=h.direction.upDown?-1:1),void 0!==h.direction.leftRight&&(p.x=h.direction.leftRight?-1:1),m!=g&&(p.y=g?-1:1);let M=0;return b!=v&&(M=b?1:-1),p=Re.norm(p),y&&(p=Re.scalarMult(p,this.options.cameraBoostMultiplier)),[p,M]}));this.options.cameraMovementElasticity>0&&(r=r.pipe(nk(this.camera.tick$,this.options.cameraMovementElasticity,([c,d],[h,p],m)=>[Re.lerp(c,h,m),p],([c,d],[h,p])=>d==p&&Re.dist(c,h)<.001)));let s=Re.O,o=0;r.subscribe(([c,d])=>{s=c,o=d});let a=qm.isTouchDevice(),l=this.mouseInput.delta$.pipe(Ue(this._onRemoved$),gn(()=>this.active&&(a||!this.options.ignoreMouseUnlessPointerLocked||this.mouseInput.isPointerLocked)));if(this.options.cameraRotationElasticity>0){const c=new Qe(this._spherical);l.subscribe(h=>{const p=c.getValue();c.next({phi:Math.max(1e-6,Math.min(Math.PI-1e-6,p.phi+h.y*this.options.cameraRotationSensitivity/1e3)),theta:p.theta-h.x*this.options.cameraRotationSensitivity/1e3,radius:1})});const d=()=>{c.pipe(Ue(this._onRemoved$),nk(this.tick$,this.options.cameraRotationElasticity,(h,p,m)=>({phi:h.phi+m*(p.phi-h.phi),theta:h.theta+m*(p.theta-h.theta),radius:1}),(h,p)=>yi.dist({x:h.phi,y:h.theta},{x:p.phi,y:p.theta})<1e-4),Ue(this.resetMotion$)).subscribe(h=>{this._spherical.theta=h.theta,this._spherical.phi=h.phi})};this.resetMotion$.pipe(Ue(this._onRemoved$)).subscribe(()=>{c.next(this._spherical),d()}),d()}else l.subscribe(c=>{this._spherical.theta-=c.x*this.options.cameraRotationSensitivity/1e3,this._spherical.phi+=c.y*this.options.cameraRotationSensitivity/1e3,this._spherical.phi=Math.max(1e-6,Math.min(Math.PI-1e-6,this._spherical.phi))});this.camera.tick$.pipe(Ue(this._onRemoved$),gn(()=>this.active)).subscribe(([c,d])=>{this.camera.camera.fov+=o,this.camera.position=Re.add(this.camera.position,Re.rot(Re.scalarMult(s,this.options.cameraLinearSpeed*d/1e3),this.camera.rotation)),this.camera.rotation=Yi.lookAt(this.camera.position,Re.add(this.camera.position,Re.fromSpherical(this._spherical)))}),this.mouseInput.start(),this.directionsInput.start()})}onRemoved(){const t=Object.create(null,{onRemoved:{get:()=>super.onRemoved}});return e4(this,void 0,void 0,function*(){yield t.onRemoved.call(this),yield this.mouseInput.stop(!0),yield this.directionsInput.stop()})}}var i4=function(i,t,e,n){return new(e||(e=Promise))(function(s,o){function a(d){try{c(n.next(d))}catch(h){o(h)}}function l(d){try{c(n.throw(d))}catch(h){o(h)}}function c(d){d.done?s(d.value):function r(s){return s instanceof e?s:new e(function(o){o(s)})}(d.value).then(a,l)}c((n=n.apply(i,t||[])).next())})};const zse={mouseOptions:{},orbiting:{sensitivityX:1,sensitivityY:1},orbitingElasticity:0,zooming:{sensitivity:1},panning:{sensitivityX:1,sensitivityY:1},dollying:{sensitivity:1}};class Hse extends Kh{get active(){return super.active}set active(t){!super.active&&t&&this.reset(),super.active=t}get spherical(){return this._spherical}set spherical(t){this._spherical.phi=Math.max(1e-6,Math.min(Math.PI-1e-6,t.phi)),this._spherical.theta=t.theta,this._spherical.radius=t.radius,this.resetMotion$.next()}constructor(t,e={}){super(),this.camera=t,this.tickOrder=oc.INPUT_CONTROLLERS,this._spherical={phi:0,radius:10,theta:0},this.target=Re.O,this.resetMotion$=new Te,this.options=Object.assign(Object.assign({},zse),e),this.mouseInput=new qm(this.options.mouseOptions)}reset(){let t=Re.dist(this.target,this.camera.position);this.target=Re.add(this.camera.position,Re.rot({x:0,y:0,z:-t},this.camera.rotation)),this._spherical=Re.toSpherical(Re.sub(this.camera.position,this.target)),this.resetMotion$.next()}onSpawned(t){const e=Object.create(null,{onSpawned:{get:()=>super.onSpawned}});return i4(this,void 0,void 0,function*(){if(yield e.onSpawned.call(this,t),this._spherical=Re.toSpherical(Re.sub(this.camera.position,this.target)),this.options.orbiting){let r=this.mouseInput.delta$.pipe(Ue(this._onRemoved$),gn(()=>this.active&&this.mouseInput.state==Ls.DRAG));if(this.options.orbitingElasticity>0){const s=new Qe(this._spherical);r.subscribe(a=>{const l=s.getValue();s.next({phi:Math.max(1e-6,Math.min(Math.PI-1e-6,l.phi-a.y*this.options.orbiting.sensitivityY/1e3)),theta:l.theta-a.x*this.options.orbiting.sensitivityX/1e3,radius:1})});const o=()=>{s.pipe(Ue(this._onRemoved$),nk(this.tick$,this.options.orbitingElasticity,(a,l,c)=>({phi:a.phi+c*(l.phi-a.phi),theta:a.theta+c*(l.theta-a.theta),radius:1}),(a,l)=>yi.dist({x:a.phi,y:a.theta},{x:l.phi,y:l.theta})<1e-4),Ue(this.resetMotion$)).subscribe(a=>{this._spherical.theta=a.theta,this._spherical.phi=a.phi})};this.resetMotion$.pipe(Ue(this._onRemoved$)).subscribe(()=>{s.next(this._spherical),o()}),o()}else r.subscribe(s=>{this._spherical.theta-=s.x*this.options.orbiting.sensitivityX/1e3,this._spherical.phi-=s.y*this.options.orbiting.sensitivityY/1e3,this._spherical.phi=Math.max(1e-6,Math.min(Math.PI-1e-6,this._spherical.phi))})}this.options.zooming&&this.mouseInput.wheel$.pipe(Ue(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=Re.fromSpherical(this._spherical),o=Re.rotAround(s,{x:-Math.sin(this._spherical.theta),y:Math.cos(this._spherical.theta),z:0},Math.PI/2),a=Re.rotAround(s,Re.norm(o),Math.PI/2);this.target=Re.add(this.target,Re.add(Re.scalarMult(o,-this.options.panning.sensitivityY*r.y/1e3),Re.scalarMult(a,this.options.panning.sensitivityX*r.x/1e3)))};this.options.panning&&this.mouseInput.delta$.pipe(Ue(this._onRemoved$),gn(()=>this.mouseInput.state==Ls.DRAG_RIGHT_BUTTON)).subscribe(r=>{n(r)}),this.options.dollying&&this.mouseInput.delta$.pipe(Ue(this._onRemoved$),gn(()=>this.mouseInput.state==Ls.DRAG_MIDDLE_BUTTON)).subscribe(r=>{this._spherical.radius*=Math.pow(.95,-this.options.dollying.sensitivity*r.y/10)}),qm.isTouchDevice()&&(this.options.dollying||this.options.panning)&&this.mouseInput.twoTouchGestureDelta$.pipe(Ue(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(Ue(this._onRemoved$),gn(()=>this.active),tt(()=>this._spherical)).subscribe(r=>{this.camera.position=Re.add(this.target,Re.fromSpherical(r)),this.camera.rotation=Yi.lookAt(this.camera.position,this.target)}),yield this.mouseInput.start()})}onRemoved(){const t=Object.create(null,{onRemoved:{get:()=>super.onRemoved}});return i4(this,void 0,void 0,function*(){yield t.onRemoved.call(this),yield this.mouseInput.stop(!0)})}}class Gse{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 sk=function(i,t,e,n){return new(e||(e=Promise))(function(s,o){function a(d){try{c(n.next(d))}catch(h){o(h)}}function l(d){try{c(n.throw(d))}catch(h){o(h)}}function c(d){d.done?s(d.value):function r(s){return s instanceof e?s:new e(function(o){o(s)})}(d.value).then(a,l)}c((n=n.apply(i,t||[])).next())})},yu=(()=>{return(i=yu||(yu={}))[i.Nothing=0]="Nothing",i[i.Files=1]="Files",i[i.Entities=2]="Entities",yu;var i})();const r4={cachingStrategy:yu.Nothing,position:Re.O,rotation:Yi.O,loadProps:!0},s4=i=>({meta:i.meta,resources:i.resources.map(({object3D:t,body:e})=>({object3D:t&&t.clone(),body:e&&e.clone()}))});class Wse{constructor(t){this.world=t,this.filesCache=new Map,this.loadResultCache=new Map}loadGgGlbFiles(t){return sk(this,arguments,void 0,function*(e,n=!1){if(n&&this.filesCache.has(e))return this.filesCache.get(e);const r=Promise.all([fetch(`${e}.glb`).then(o=>o.arrayBuffer()),fetch(`${e}.meta`).then(o=>o.text()).then(o=>JSON.parse(o))]);n&&this.filesCache.set(e,r);const s=yield r;return n&&this.filesCache.set(e,s),s})}loadGgGlbResources(t){return sk(this,arguments,void 0,function*(e,n=yu.Nothing){if(n==yu.Entities&&this.loadResultCache.has(e)){const c=this.loadResultCache.get(e),d=c instanceof Promise?yield c:c;return s4(d)}const[r,s]=yield this.loadGgGlbFiles(e,n==yu.Files);if(!r)throw new Error("GLB not found");const[o,a]=yield Promise.all([this.world.visualScene.loader.loadFromGgGlb(r,s),this.world.physicsWorld.loader.loadFromGgGlb(r,s)]),l={resources:[],meta:s};if(!o)return l;if(0==a.length)l.resources.push({object3D:o,body:null});else if(1==a.length)l.resources.push({object3D:o,body:a[0]});else{for(const c of a)l.resources.push({object3D:o.popChild(c.name),body:c});o.isEmpty()||l.resources.push({object3D:o,body:null})}return n==yu.Entities&&this.loadResultCache.set(e,s4(l)),l})}loadGgGlb(t){return sk(this,arguments,void 0,function*(e,n=r4){const r=Object.assign(Object.assign({},r4),n),{resources:s,meta:o}=yield this.loadGgGlbResources(e,r.cachingStrategy),a={entities:s.map(l=>new ea({object3D:l.object3D,objectBody:l.body})),meta:o};return r.loadProps&&(a.props=yield Promise.all(o.dummies.filter(l=>l.is_prop||l.is_scene).map(l=>this.loadGgGlb(l.is_prop?(r.propsPath||e.substring(0,e.lastIndexOf("/")+1))+l.prop_id:l.scene_id,{loadProps:!!l.is_scene,position:Re.add(Re.rot(l.position,r.rotation),r.position),rotation:Yi.combineRotations(l.rotation,r.rotation)})))),a.entities.forEach(l=>{l.position=Re.add(Re.rot(Re.clone(l.position),r.rotation),r.position),l.rotation=Yi.mult(Yi.clone(l.rotation),r.rotation)}),a})}}class ok extends bl{constructor(t,e){super(t,e),this.visualScene=t,this.physicsWorld=e,this.loader=new Wse(this)}addPrimitiveRigidBody(t,e=Re.O,n=Yi.O,r={}){const s=new ea({object3D:this.visualScene.factory.createPrimitive(t.shape,r),objectBody:this.physicsWorld.factory.createRigidBody(t)});return s.position=e,s.rotation=n,this.addEntity(s),s}addRenderer(t,e,n){const r=new Use(this.visualScene.createRenderer(t,e,n));return this.addEntity(r),r}registerConsoleCommands(t){super.registerConsoleCommands(t),t.registerConsoleCommand(this,"gravity",(...e)=>function(i,t,e,n){return new(e||(e=Promise))(function(s,o){function a(d){try{c(n.next(d))}catch(h){o(h)}}function l(d){try{c(n.throw(d))}catch(h){o(h)}}function c(d){d.done?s(d.value):function r(s){return s instanceof e?s:new e(function(o){o(s)})}(d.value).then(a,l)}c((n=n.apply(i,t||[])).next())})}(this,void 0,void 0,function*(){if(1==e.length&&(e=["0","0",""+-+e[0]]),e.length>0){if(isNaN(+e[0])||isNaN(+e[1])||isNaN(+e[2]))throw new Error("Wrong arguments");this.physicsWorld.gravity={x:+e[0],y:+e[1],z:+e[2]}}return JSON.stringify(this.physicsWorld.gravity)}),'args: [ ?float, ?float, ?float ]; Get or set 3D world gravity vector. 1 argument sets vector {x: 0, y: 0, z: -value}, 3 arguments set the whole vector. Default value is "9.82" or "0 0 -9.82"')}}function o4(i,t=Gy,e){const n=OI(i,t);return function Yse(i,t){return ni((e,n)=>{const{leading:r=!0,trailing:s=!1}=t??{};let o=!1,a=null,l=null,c=!1;const d=()=>{l?.unsubscribe(),l=null,s&&(m(),c&&n.complete())},h=()=>{l=null,c&&n.complete()},p=g=>l=Mr(i(g)).subscribe(qn(n,d,h)),m=()=>{if(o){o=!1;const g=a;a=null,n.next(g),!c&&p(g)}};e.subscribe(qn(n,g=>{o=!0,a=g,(!l||l.closed)&&(r?m():p(g))},()=>{c=!0,(!(s&&o&&l)||l.closed)&&n.complete()}))})}(()=>n,e)}window.gg_version="0.0.56";const qse=0,a4=1,Xse=2,l4=1,c4=2,Qc=3,lc=0,ko=1,Ns=2,Jc=0,Zm=1,d4=2,u4=3,h4=4,Kse=5,Zh=100,Zse=101,Qse=102,Jse=103,eoe=104,toe=200,noe=201,ioe=202,roe=203,lk=204,ck=205,soe=206,ooe=207,aoe=208,loe=209,coe=210,doe=211,uoe=212,hoe=213,foe=214,poe=0,moe=1,goe=2,SC=3,_oe=4,voe=5,yoe=6,boe=7,EC=0,xoe=1,woe=2,bu=0,Moe=1,Coe=2,Soe=3,Eoe=4,Aoe=5,Doe=6,Toe=7,f4="attached",cc=301,Qh=302,AC=303,DC=304,gb=306,Bs=1e3,er=1001,_b=1002,vr=1003,uk=1004,Qm=1005,cr=1006,vb=1007,xl=1008,ed=1009,p4=1010,m4=1011,yb=1012,hk=1013,xu=1014,ta=1015,Jm=1016,fk=1017,pk=1018,eg=1020,g4=35902,_4=1021,v4=1022,Po=1023,y4=1024,b4=1025,tg=1026,ng=1027,mk=1028,TC=1029,x4=1030,gk=1031,_k=1033,IC=33776,RC=33777,kC=33778,PC=33779,vk=35840,yk=35841,bk=35842,xk=35843,wk=36196,Mk=37492,Ck=37496,Sk=37808,Ek=37809,Ak=37810,Dk=37811,Tk=37812,Ik=37813,Rk=37814,kk=37815,Pk=37816,Ok=37817,Fk=37818,Lk=37819,Nk=37820,Bk=37821,OC=36492,Uk=36494,Vk=36495,w4=36283,zk=36284,Hk=36285,$k=36286,bb=2300,xb=2301,Ooe=0,C4=1,jk=2,Loe=3201,Jh=0,Noe=1,wu="",cs="srgb",ds="srgb-linear",Yk="display-p3",LC="display-p3-linear",NC="linear",Fi="srgb",BC="rec709",UC="p3",sg=7680,Boe=512,Uoe=513,Voe=514,E4=515,zoe=516,Hoe=517,$oe=518,Goe=519,A4="300 es",td=2e3;class og{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]+Us[i>>16&255]+Us[i>>24&255]+"-"+Us[255&t]+Us[t>>8&255]+"-"+Us[t>>16&15|64]+Us[t>>24&255]+"-"+Us[63&e|128]+Us[e>>8&255]+"-"+Us[e>>16&255]+Us[e>>24&255]+Us[255&n]+Us[n>>8&255]+Us[n>>16&255]+Us[n>>24&255]).toLowerCase()}function tr(i,t,e){return Math.max(t,Math.min(e,i))}function qk(i,t){return(i%t+t)%t}function wb(i,t,e){return(1-e)*i+e*t}function ho(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 yn(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 aae_radToDeg=function nae(i){return i*ag};class xe{constructor(t=0,e=0){xe.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(tr(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 wn{constructor(t,e,n,r,s,o,a,l,c){wn.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 d=this.elements;return d[0]=t,d[1]=r,d[2]=a,d[3]=e,d[4]=s,d[5]=l,d[6]=n,d[7]=o,d[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],d=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],F=r[2],D=r[5],k=r[8];return s[0]=o*b+a*M+l*F,s[3]=o*v+a*x+l*D,s[6]=o*y+a*C+l*k,s[1]=c*b+d*M+h*F,s[4]=c*v+d*x+h*D,s[7]=c*y+d*C+h*k,s[2]=p*b+m*M+g*F,s[5]=p*v+m*x+g*D,s[8]=p*y+m*C+g*k,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],d=t[8];return e*o*d-e*a*c-n*s*d+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],d=t[8],h=d*o-a*c,p=a*l-d*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-d*n)*b,t[2]=(a*n-r*o)*b,t[3]=p*b,t[4]=(d*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(Xk.makeScale(t,e)),this}rotate(t){return this.premultiply(Xk.makeRotation(-t)),this}translate(t,e){return this.premultiply(Xk.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 Xk=new wn;function T4(i){for(let t=i.length-1;t>=0;--t)if(i[t]>=65535)return!0;return!1}function Mb(i){return document.createElementNS("http://www.w3.org/1999/xhtml",i)}function cae(){const i=Mb("canvas");return i.style.display="block",i}Int8Array,Uint8Array,Uint8ClampedArray,Int16Array,Uint16Array,Int32Array,Uint32Array,Float32Array,Float64Array;const I4={};function cg(i){i in I4||(I4[i]=!0,console.warn(i))}const R4=(new wn).set(.8224621,.177538,0,.0331941,.9668058,0,.0170827,.0723974,.9105199),k4=(new wn).set(1.2249401,-.2249404,0,-.0420569,1.0420571,0,-.0196376,-.0786361,1.0982735),Cb={[ds]:{transfer:NC,primaries:BC,luminanceCoefficients:[.2126,.7152,.0722],toReference:i=>i,fromReference:i=>i},[cs]:{transfer:Fi,primaries:BC,luminanceCoefficients:[.2126,.7152,.0722],toReference:i=>i.convertSRGBToLinear(),fromReference:i=>i.convertLinearToSRGB()},[LC]:{transfer:NC,primaries:UC,luminanceCoefficients:[.2289,.6917,.0793],toReference:i=>i.applyMatrix3(k4),fromReference:i=>i.applyMatrix3(R4)},[Yk]:{transfer:Fi,primaries:UC,luminanceCoefficients:[.2289,.6917,.0793],toReference:i=>i.convertSRGBToLinear().applyMatrix3(k4),fromReference:i=>i.applyMatrix3(R4).convertLinearToSRGB()}},uae=new Set([ds,LC]),ei={enabled:!0,_workingColorSpace:ds,get workingColorSpace(){return this._workingColorSpace},set workingColorSpace(i){if(!uae.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,Cb[e].fromReference)((0,Cb[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 Cb[i].primaries},getTransfer:function(i){return i===wu?NC:Cb[i].transfer},getLuminanceCoefficients:function(i,t=this._workingColorSpace){return i.fromArray(Cb[t].luminanceCoefficients)}};function dg(i){return i<.04045?.0773993808*i:Math.pow(.9478672986*i+.0521327014,2.4)}function Kk(i){return i<.0031308?12.92*i:1.055*Math.pow(i,.41666)-.055}let ug;class hae{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===ug&&(ug=Mb("canvas")),ug.width=t.width,ug.height=t.height;const n=ug.getContext("2d");t instanceof ImageData?n.putImageData(t,0,0):n.drawImage(t,0,0,t.width,t.height),e=ug}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=Mb("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 og{constructor(e=i.DEFAULT_IMAGE,n=i.DEFAULT_MAPPING,r=er,s=er,o=cr,a=xl,l=Po,c=ed,d=i.DEFAULT_ANISOTROPY,h=wu){super(),this.isTexture=!0,Object.defineProperty(this,"id",{value:pae++}),this.uuid=na(),this.name="",this.source=new hg(e),this.mipmaps=[],this.mapping=n,this.channel=0,this.wrapS=r,this.wrapT=s,this.magFilter=o,this.minFilter=a,this.anisotropy=d,this.format=l,this.internalFormat=null,this.type=c,this.offset=new xe(0,0),this.repeat=new xe(1,1),this.center=new xe(0,0),this.rotation=0,this.matrixAutoUpdate=!0,this.matrix=new wn,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 Bs:e.x=e.x-Math.floor(e.x);break;case er:e.x=e.x<0?0:1;break;case _b: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 Bs:e.y=e.y-Math.floor(e.y);break;case er:e.y=e.y<0?0:1;break;case _b: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 vi{constructor(t=0,e=0,n=0,r=1){vi.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],d=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(d-p)<.01&&Math.abs(h-b)<.01&&Math.abs(g-v)<.01){if(Math.abs(d+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,F=(y+1)/2,D=(d+p)/4,k=(h+b)/4,B=(g+v)/4;return x>C&&x>F?x<.01?(n=0,r=.707106781,s=.707106781):(n=Math.sqrt(x),r=D/n,s=k/n):C>F?C<.01?(n=.707106781,r=0,s=.707106781):(r=Math.sqrt(C),n=D/r,s=B/r):F<.01?(n=.707106781,r=.707106781,s=0):(s=Math.sqrt(F),n=k/s,r=B/s),this.set(n,r,s,e),this}let M=Math.sqrt((v-g)*(v-g)+(h-b)*(h-b)+(p-d)*(p-d));return Math.abs(M)<.001&&(M=1),this.x=(v-g)/M,this.y=(h-b)/M,this.z=(p-d)/M,this.w=Math.acos((c+m+y-1)/2),this}setFromMatrixPosition(t){const e=t.elements;return this.x=e[12],this.y=e[13],this.z=e[14],this.w=e[15],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 mae extends og{constructor(t=1,e=1,n={}){super(),this.isRenderTarget=!0,this.width=t,this.height=e,this.depth=1,this.scissor=new vi(0,0,t,e),this.scissorTest=!1,this.viewport=new vi(0,0,t,e);const r={width:t,height:e,depth:1};n=Object.assign({generateMipmaps:!1,internalFormat:null,minFilter:cr,depthBuffer:!0,stencilBuffer:!1,resolveDepthBuffer:!0,resolveStencilBuffer:!0,depthTexture:null,samples:0,count:1},n);const s=new Oo(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 F=Math.sqrt(x),D=Math.atan2(F,y*M);v=Math.sin(v*D)/F,a=Math.sin(a*D)/F}const C=a*M;if(l=l*v+p*C,c=c*v+m*C,d=d*v+g*C,h=h*v+b*C,v===1-a){const F=1/Math.sqrt(l*l+c*c+d*d+h*h);l*=F,c*=F,d*=F,h*=F}}t[e]=l,t[e+1]=c,t[e+2]=d,t[e+3]=h}static multiplyQuaternionsFlat(t,e,n,r,s,o){const a=n[r],l=n[r+1],c=n[r+2],d=n[r+3],h=s[o],p=s[o+1],m=s[o+2],g=s[o+3];return t[e]=a*g+d*h+l*m-c*p,t[e+1]=l*g+d*p+c*h-a*m,t[e+2]=c*g+d*m+a*p-l*h,t[e+3]=d*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),d=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*d*h+c*m*g,this._y=c*m*h-p*d*g,this._z=c*d*g+p*m*h,this._w=c*d*h-p*m*g;break;case"YXZ":this._x=p*d*h+c*m*g,this._y=c*m*h-p*d*g,this._z=c*d*g-p*m*h,this._w=c*d*h+p*m*g;break;case"ZXY":this._x=p*d*h-c*m*g,this._y=c*m*h+p*d*g,this._z=c*d*g+p*m*h,this._w=c*d*h-p*m*g;break;case"ZYX":this._x=p*d*h-c*m*g,this._y=c*m*h+p*d*g,this._z=c*d*g-p*m*h,this._w=c*d*h+p*m*g;break;case"YZX":this._x=p*d*h+c*m*g,this._y=c*m*h+p*d*g,this._z=c*d*g-p*m*h,this._w=c*d*h-p*m*g;break;case"XZY":this._x=p*d*h-c*m*g,this._y=c*m*h-p*d*g,this._z=c*d*g+p*m*h,this._w=c*d*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],d=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=(d-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=(d-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+d)/m}else{const m=2*Math.sqrt(1+h-n-a);this._w=(o-r)/m,this._x=(s+c)/m,this._y=(l+d)/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(tr(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,d=e._w;return this._x=n*d+o*a+r*c-s*l,this._y=r*d+o*l+s*a-n*c,this._z=s*d+o*c+n*l-r*a,this._w=o*d-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),d=Math.atan2(c,a),h=Math.sin((1-e)*d)/c,p=Math.sin(e*d)/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 O{constructor(t=0,e=0,n=0){O.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(O4.setFromEuler(t))}applyAxisAngle(t,e){return this.applyQuaternion(O4.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),d=2*(a*e-s*r),h=2*(s*n-o*e);return this.x=e+l*c+o*h-a*d,this.y=n+l*d+a*c-s*h,this.z=r+l*h+s*d-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 Jk.copy(this).projectOnVector(t),this.sub(Jk)}reflect(t){return this.sub(Jk.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(tr(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 Jk=new O,O4=new fo;class Vs{constructor(t=new O(1/0,1/0,1/0),e=new O(-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;e=this.min.x&&t.x<=this.max.x&&t.y>=this.min.y&&t.y<=this.max.y&&t.z>=this.min.z&&t.z<=this.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.x>=this.min.x&&t.min.x<=this.max.x&&t.max.y>=this.min.y&&t.min.y<=this.max.y&&t.max.z>=this.min.z&&t.min.z<=this.max.z}intersectsSphere(t){return this.clampPoint(t.center,wl),wl.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(Sb),$C.subVectors(this.max,Sb),fg.subVectors(t.a,Sb),pg.subVectors(t.b,Sb),mg.subVectors(t.c,Sb),Cu.subVectors(pg,fg),Su.subVectors(mg,pg),tf.subVectors(fg,mg);let e=[0,-Cu.z,Cu.y,0,-Su.z,Su.y,0,-tf.z,tf.y,Cu.z,0,-Cu.x,Su.z,0,-Su.x,tf.z,0,-tf.x,-Cu.y,Cu.x,0,-Su.y,Su.x,0,-tf.y,tf.x,0];return!(!eP(e,fg,pg,mg,$C)||(e=[1,0,0,0,1,0,0,0,1],!eP(e,fg,pg,mg,$C)))&&(GC.crossVectors(Cu,Su),e=[GC.x,GC.y,GC.z],eP(e,fg,pg,mg,$C))}clampPoint(t,e){return e.copy(t).clamp(this.min,this.max)}distanceToPoint(t){return this.clampPoint(t,wl).distanceTo(t)}getBoundingSphere(t){return this.isEmpty()?t.makeEmpty():(this.getCenter(t.center),t.radius=.5*this.getSize(wl).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()||(nd[0].set(this.min.x,this.min.y,this.min.z).applyMatrix4(t),nd[1].set(this.min.x,this.min.y,this.max.z).applyMatrix4(t),nd[2].set(this.min.x,this.max.y,this.min.z).applyMatrix4(t),nd[3].set(this.min.x,this.max.y,this.max.z).applyMatrix4(t),nd[4].set(this.max.x,this.min.y,this.min.z).applyMatrix4(t),nd[5].set(this.max.x,this.min.y,this.max.z).applyMatrix4(t),nd[6].set(this.max.x,this.max.y,this.min.z).applyMatrix4(t),nd[7].set(this.max.x,this.max.y,this.max.z).applyMatrix4(t),this.setFromPoints(nd)),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 nd=[new O,new O,new O,new O,new O,new O,new O,new O],wl=new O,HC=new Vs,fg=new O,pg=new O,mg=new O,Cu=new O,Su=new O,tf=new O,Sb=new O,$C=new O,GC=new O,nf=new O;function eP(i,t,e,n,r){for(let s=0,o=i.length-3;s<=o;s+=3){nf.fromArray(i,s);const a=r.x*Math.abs(nf.x)+r.y*Math.abs(nf.y)+r.z*Math.abs(nf.z),l=t.dot(nf),c=e.dot(nf),d=n.dot(nf);if(Math.max(-Math.max(l,c,d),Math.min(l,c,d))>a)return!1}return!0}const gae=new Vs,Eb=new O,tP=new O;class zs{constructor(t=new O,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):gae.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;Eb.subVectors(t,this.center);const e=Eb.lengthSq();if(e>this.radius*this.radius){const n=Math.sqrt(e),r=.5*(n-this.radius);this.center.addScaledVector(Eb,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):(tP.subVectors(t.center,this.center).setLength(t.radius),this.expandByPoint(Eb.copy(t.center).add(tP)),this.expandByPoint(Eb.copy(t.center).sub(tP))),this)}equals(t){return t.center.equals(this.center)&&t.radius===this.radius}clone(){return(new this.constructor).copy(this)}}const id=new O,nP=new O,WC=new O,Eu=new O,iP=new O,jC=new O,rP=new O;class Ab{constructor(t=new O,e=new O(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,id)),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=id.subVectors(t,this.origin).dot(this.direction);return e<0?this.origin.distanceToSquared(t):(id.copy(this.origin).addScaledVector(this.direction,e),id.distanceToSquared(t))}distanceSqToSegment(t,e,n,r){nP.copy(t).add(e).multiplyScalar(.5),WC.copy(e).sub(t).normalize(),Eu.copy(this.origin).sub(nP);const s=.5*t.distanceTo(e),o=-this.direction.dot(WC),a=Eu.dot(this.direction),l=-Eu.dot(WC),c=Eu.lengthSq(),d=Math.abs(1-o*o);let h,p,m,g;if(d>0)if(h=o*l-a,p=o*a-l,g=s*d,h>=0)if(p>=-g)if(p<=g){const b=1/d;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(nP).addScaledVector(WC,p),m}intersectSphere(t,e){id.subVectors(t.center,this.origin);const n=id.dot(this.direction),r=id.dot(id)-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,d=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),d>=0?(s=(t.min.y-p.y)*d,o=(t.max.y-p.y)*d):(s=(t.max.y-p.y)*d,o=(t.min.y-p.y)*d),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,id)}intersectTriangle(t,e,n,r,s){iP.subVectors(e,t),jC.subVectors(n,t),rP.crossVectors(iP,jC);let a,o=this.direction.dot(rP);if(o>0){if(r)return null;a=1}else{if(!(o<0))return null;a=-1,o=-o}Eu.subVectors(this.origin,t);const l=a*this.direction.dot(jC.crossVectors(Eu,jC));if(l<0)return null;const c=a*this.direction.dot(iP.cross(Eu));if(c<0||l+c>o)return null;const d=-a*Eu.dot(rP);return d<0?null:this.at(d/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 Bt{constructor(t,e,n,r,s,o,a,l,c,d,h,p,m,g,b,v){Bt.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,d,h,p,m,g,b,v)}set(t,e,n,r,s,o,a,l,c,d,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]=d,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 Bt).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/gg.setFromMatrixColumn(t,0).length(),s=1/gg.setFromMatrixColumn(t,1).length(),o=1/gg.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),d=Math.cos(s),h=Math.sin(s);if("XYZ"===t.order){const p=o*d,m=o*h,g=a*d,b=a*h;e[0]=l*d,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*d,m=l*h,g=c*d,b=c*h;e[0]=p+b*a,e[4]=g*a-m,e[8]=o*c,e[1]=o*h,e[5]=o*d,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*d,m=l*h,g=c*d,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*d,e[9]=b-p*a,e[2]=-o*c,e[6]=a,e[10]=o*l}else if("ZYX"===t.order){const p=o*d,m=o*h,g=a*d,b=a*h;e[0]=l*d,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*d,e[4]=b-p*h,e[8]=g*h+m,e[1]=h,e[5]=o*d,e[9]=-a*d,e[2]=-c*d,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*d,e[4]=-h,e[8]=c*d,e[1]=p*h+b,e[5]=o*d,e[9]=m*h-g,e[2]=g*h-m,e[6]=a*d,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(_ae,t,vae)}lookAt(t,e,n){const r=this.elements;return ia.subVectors(t,e),0===ia.lengthSq()&&(ia.z=1),ia.normalize(),Au.crossVectors(n,ia),0===Au.lengthSq()&&(1===Math.abs(n.z)?ia.x+=1e-4:ia.z+=1e-4,ia.normalize(),Au.crossVectors(n,ia)),Au.normalize(),YC.crossVectors(ia,Au),r[0]=Au.x,r[4]=YC.x,r[8]=ia.x,r[1]=Au.y,r[5]=YC.y,r[9]=ia.y,r[2]=Au.z,r[6]=YC.z,r[10]=ia.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],d=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],F=n[15],D=r[0],k=r[4],B=r[8],T=r[12],A=r[1],W=r[5],ie=r[9],ne=r[13],oe=r[2],ge=r[6],q=r[10],se=r[14],J=r[3],we=r[7],Ve=r[11],Ye=r[15];return s[0]=o*D+a*A+l*oe+c*J,s[4]=o*k+a*W+l*ge+c*we,s[8]=o*B+a*ie+l*q+c*Ve,s[12]=o*T+a*ne+l*se+c*Ye,s[1]=d*D+h*A+p*oe+m*J,s[5]=d*k+h*W+p*ge+m*we,s[9]=d*B+h*ie+p*q+m*Ve,s[13]=d*T+h*ne+p*se+m*Ye,s[2]=g*D+b*A+v*oe+y*J,s[6]=g*k+b*W+v*ge+y*we,s[10]=g*B+b*ie+v*q+y*Ve,s[14]=g*T+b*ne+v*se+y*Ye,s[3]=M*D+x*A+C*oe+F*J,s[7]=M*k+x*W+C*ge+F*we,s[11]=M*B+x*ie+C*q+F*Ve,s[15]=M*T+x*ne+C*se+F*Ye,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],d=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*d-s*l*d)+t[11]*(+e*c*h-e*a*m-s*o*h+n*o*m+s*a*d-n*c*d)+t[15]*(-r*a*d-e*l*h+e*a*p+r*o*h-n*o*p+n*l*d)}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],d=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-d*v*c-g*l*m+o*v*m+d*l*y-o*p*y,C=d*b*c-g*h*c+g*a*m-o*b*m-d*a*y+o*h*y,F=g*h*l-d*b*l-g*a*p+o*b*p+d*a*v-o*h*v,D=e*M+n*x+r*C+s*F;if(0===D)return this.set(0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0);const k=1/D;return t[0]=M*k,t[1]=(b*p*s-h*v*s-b*r*m+n*v*m+h*r*y-n*p*y)*k,t[2]=(a*v*s-b*l*s+b*r*c-n*v*c-a*r*y+n*l*y)*k,t[3]=(h*l*s-a*p*s-h*r*c+n*p*c+a*r*m-n*l*m)*k,t[4]=x*k,t[5]=(d*v*s-g*p*s+g*r*m-e*v*m-d*r*y+e*p*y)*k,t[6]=(g*l*s-o*v*s-g*r*c+e*v*c+o*r*y-e*l*y)*k,t[7]=(o*p*s-d*l*s+d*r*c-e*p*c-o*r*m+e*l*m)*k,t[8]=C*k,t[9]=(g*h*s-d*b*s-g*n*m+e*b*m+d*n*y-e*h*y)*k,t[10]=(o*b*s-g*a*s+g*n*c-e*b*c-o*n*y+e*a*y)*k,t[11]=(d*a*s-o*h*s-d*n*c+e*h*c+o*n*m-e*a*m)*k,t[12]=F*k,t[13]=(d*b*r-g*h*r+g*n*p-e*b*p-d*n*v+e*h*v)*k,t[14]=(g*a*r-o*b*r-g*n*l+e*b*l+o*n*v-e*a*v)*k,t[15]=(o*h*r-d*a*r+d*n*l-e*h*l-o*n*p+e*a*p)*k,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,d=s*a;return this.set(c*o+n,c*a-r*l,c*l+r*a,0,c*a+r*l,d*a+n,d*l-r*o,0,c*l-r*a,d*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,d=o+o,h=a+a,p=s*c,m=s*d,g=s*h,b=o*d,v=o*h,y=a*h,M=l*c,x=l*d,C=l*h,F=n.x,D=n.y,k=n.z;return r[0]=(1-(b+y))*F,r[1]=(m+C)*F,r[2]=(g-x)*F,r[3]=0,r[4]=(m-C)*D,r[5]=(1-(p+y))*D,r[6]=(v+M)*D,r[7]=0,r[8]=(g+x)*k,r[9]=(v-M)*k,r[10]=(1-(p+b))*k,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=gg.set(r[0],r[1],r[2]).length();const o=gg.set(r[4],r[5],r[6]).length(),a=gg.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],Ml.copy(this);const c=1/s,d=1/o,h=1/a;return Ml.elements[0]*=c,Ml.elements[1]*=c,Ml.elements[2]*=c,Ml.elements[4]*=d,Ml.elements[5]*=d,Ml.elements[6]*=d,Ml.elements[8]*=h,Ml.elements[9]*=h,Ml.elements[10]*=h,e.setFromRotationMatrix(Ml),n.x=s,n.y=o,n.z=a,this}makePerspective(t,e,n,r,s,o,a=td){const l=this.elements,c=2*s/(e-t),d=2*s/(n-r),h=(e+t)/(e-t),p=(n+r)/(n-r);let m,g;if(a===td)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]=d,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=td){const l=this.elements,c=1/(e-t),d=1/(n-r),h=1/(o-s),p=(e+t)*c,m=(n+r)*d;let g,b;if(a===td)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*d,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 gg=new O,Ml=new Bt,_ae=new O(0,0,0),vae=new O(1,1,1),Au=new O,YC=new O,ia=new O,F4=new Bt,L4=new fo;let rd=(()=>{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],d=s[5],h=s[9],p=s[2],m=s[6],g=s[10];switch(n){case"XYZ":this._y=Math.asin(tr(l,-1,1)),Math.abs(l)<.9999999?(this._x=Math.atan2(-h,g),this._z=Math.atan2(-a,o)):(this._x=Math.atan2(m,d),this._z=0);break;case"YXZ":this._x=Math.asin(-tr(h,-1,1)),Math.abs(h)<.9999999?(this._y=Math.atan2(l,g),this._z=Math.atan2(c,d)):(this._y=Math.atan2(-p,o),this._z=0);break;case"ZXY":this._x=Math.asin(tr(m,-1,1)),Math.abs(m)<.9999999?(this._y=Math.atan2(-p,g),this._z=Math.atan2(-a,d)):(this._y=0,this._z=Math.atan2(c,o));break;case"ZYX":this._y=Math.asin(-tr(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,d));break;case"YZX":this._z=Math.asin(tr(c,-1,1)),Math.abs(c)<.9999999?(this._x=Math.atan2(-h,d),this._y=Math.atan2(-p,o)):(this._x=0,this._y=Math.atan2(l,g));break;case"XZY":this._z=Math.asin(-tr(a,-1,1)),Math.abs(a)<.9999999?(this._x=Math.atan2(m,d),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 F4.makeRotationFromQuaternion(e),this.setFromRotationMatrix(F4,n,r)}setFromVector3(e,n=this._order){return this.set(e.x,e.y,e.z,n)}reorder(e){return L4.setFromEuler(this),this.setFromQuaternion(L4,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 sP{constructor(){this.mask=1}set(t){this.mask=(1<>>0}enable(t){this.mask|=1<{class i extends og{constructor(){super(),this.isObject3D=!0,Object.defineProperty(this,"id",{value:yae++}),this.uuid=na(),this.name="",this.type="Object3D",this.parent=null,this.children=[],this.up=i.DEFAULT_UP.clone();const e=new O,n=new rd,r=new fo,s=new O(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 Bt},normalMatrix:{value:new wn}}),this.matrix=new Bt,this.matrixWorld=new Bt,this.matrixAutoUpdate=i.DEFAULT_MATRIX_AUTO_UPDATE,this.matrixWorldAutoUpdate=i.DEFAULT_MATRIX_WORLD_AUTO_UPDATE,this.matrixWorldNeedsUpdate=!1,this.layers=new sP,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 _g.setFromAxisAngle(e,n),this.quaternion.multiply(_g),this}rotateOnWorldAxis(e,n){return _g.setFromAxisAngle(e,n),this.quaternion.premultiply(_g),this}rotateX(e){return this.rotateOnAxis(B4,e)}rotateY(e){return this.rotateOnAxis(U4,e)}rotateZ(e){return this.rotateOnAxis(V4,e)}translateOnAxis(e,n){return N4.copy(e).applyQuaternion(this.quaternion),this.position.add(N4.multiplyScalar(n)),this}translateX(e){return this.translateOnAxis(B4,e)}translateY(e){return this.translateOnAxis(U4,e)}translateZ(e){return this.translateOnAxis(V4,e)}localToWorld(e){return this.updateWorldMatrix(!0,!1),e.applyMatrix4(this.matrixWorld)}worldToLocal(e){return this.updateWorldMatrix(!0,!1),e.applyMatrix4(sd.copy(this.matrixWorld).invert())}lookAt(e,n,r){e.isVector3?qC.copy(e):qC.set(e,n,r);const s=this.parent;this.updateWorldMatrix(!0,!1),Db.setFromMatrixPosition(this.matrixWorld),this.isCamera||this.isLight?sd.lookAt(Db,qC,this.up):sd.lookAt(qC,Db,this.up),this.quaternion.setFromRotationMatrix(sd),s&&(sd.extractRotation(s.matrixWorld),_g.setFromRotationMatrix(sd),this.quaternion.premultiply(_g.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.maxInstanceCount=this._maxInstanceCount,s.maxVertexCount=this._maxVertexCount,s.maxIndexCount=this._maxIndexCount,s.geometryInitialized=this._geometryInitialized,s.geometryCount=this._geometryCount,s.matricesTexture=this._matricesTexture.toJSON(e),null!==this._colorsTexture&&(s.colorsTexture=this._colorsTexture.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 d=0,h=c.length;d0){s.children=[];for(let l=0;l0){s.animations=[];for(let l=0;l0&&(r.geometries=l),c.length>0&&(r.materials=c),d.length>0&&(r.textures=d),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 d in l){const h=l[d];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){Cl.subVectors(r,e),od.subVectors(n,e),aP.subVectors(t,e);const o=Cl.dot(Cl),a=Cl.dot(od),l=Cl.dot(aP),c=od.dot(od),d=od.dot(aP),h=o*c-a*a;if(0===h)return s.set(0,0,0),null;const p=1/h,m=(c*l-a*d)*p,g=(o*d-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,ad)&&ad.x>=0&&ad.y>=0&&ad.x+ad.y<=1}static getInterpolation(t,e,n,r,s,o,a,l){return null===this.getBarycoord(t,e,n,r,ad)?(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,ad.x),l.addScaledVector(o,ad.y),l.addScaledVector(a,ad.z),l)}static isFrontFacing(t,e,n,r){return Cl.subVectors(n,e),od.subVectors(t,e),Cl.cross(od).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 Cl.subVectors(this.c,this.b),od.subVectors(this.a,this.b),.5*Cl.cross(od).length()}getMidpoint(t){return t.addVectors(this.a,this.b).add(this.c).multiplyScalar(1/3)}getNormal(t){return La.getNormal(this.a,this.b,this.c,t)}getPlane(t){return t.setFromCoplanarPoints(this.a,this.b,this.c)}getBarycoord(t,e){return La.getBarycoord(t,this.a,this.b,this.c,e)}getInterpolation(t,e,n,r,s){return La.getInterpolation(t,this.a,this.b,this.c,e,n,r,s)}containsPoint(t){return La.containsPoint(t,this.a,this.b,this.c)}isFrontFacing(t){return La.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;yg.subVectors(r,n),bg.subVectors(s,n),lP.subVectors(t,n);const l=yg.dot(lP),c=bg.dot(lP);if(l<=0&&c<=0)return e.copy(n);cP.subVectors(t,r);const d=yg.dot(cP),h=bg.dot(cP);if(d>=0&&h<=d)return e.copy(r);const p=l*h-d*c;if(p<=0&&l>=0&&d<=0)return o=l/(l-d),e.copy(n).addScaledVector(yg,o);dP.subVectors(t,s);const m=yg.dot(dP),g=bg.dot(dP);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(bg,a);const v=d*g-m*h;if(v<=0&&h-d>=0&&m-g>=0)return H4.subVectors(s,r),a=(h-d)/(h-d+(m-g)),e.copy(r).addScaledVector(H4,a);const y=1/(v+b+p);return o=b*y,a=p*y,e.copy(n).addScaledVector(yg,o).addScaledVector(bg,a)}equals(t){return t.a.equals(this.a)&&t.b.equals(this.b)&&t.c.equals(this.c)}}const $4={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},Du={h:0,s:0,l:0},XC={h:0,s:0,l:0};function uP(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 qe{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=cs){return t=Math.floor(t),this.r=(t>>16&255)/255,this.g=(t>>8&255)/255,this.b=(255&t)/255,ei.toWorkingColorSpace(this,e),this}setRGB(t,e,n,r=ei.workingColorSpace){return this.r=t,this.g=e,this.b=n,ei.toWorkingColorSpace(this,r),this}setHSL(t,e,n,r=ei.workingColorSpace){if(t=qk(t,1),e=tr(e,0,1),n=tr(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=uP(o,s,t+1/3),this.g=uP(o,s,t),this.b=uP(o,s,t-1/3)}return ei.toWorkingColorSpace(this,r),this}setStyle(t,e=cs){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=cs){const n=$4[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=dg(t.r),this.g=dg(t.g),this.b=dg(t.b),this}copyLinearToSRGB(t){return this.r=Kk(t.r),this.g=Kk(t.g),this.b=Kk(t.b),this}convertSRGBToLinear(){return this.copySRGBToLinear(this),this}convertLinearToSRGB(){return this.copyLinearToSRGB(this),this}getHex(t=cs){return ei.fromWorkingColorSpace(Hs.copy(this),t),65536*Math.round(tr(255*Hs.r,0,255))+256*Math.round(tr(255*Hs.g,0,255))+Math.round(tr(255*Hs.b,0,255))}getHexString(t=cs){return("000000"+this.getHex(t).toString(16)).slice(-6)}getHSL(t,e=ei.workingColorSpace){ei.fromWorkingColorSpace(Hs.copy(this),e);const n=Hs.r,r=Hs.g,s=Hs.b,o=Math.max(n,r,s),a=Math.min(n,r,s);let l,c;const d=(a+o)/2;if(a===o)l=0,c=0;else{const h=o-a;switch(c=d<=.5?h/(o+a):h/(2-o-a),o){case n:l=(r-s)/h+(r0!=t>0&&this.version++,this._alphaTest=t}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.dispersion&&(n.dispersion=this.dispersion),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!==Zm&&(n.blending=this.blending),this.side!==lc&&(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!==lk&&(n.blendSrc=this.blendSrc),this.blendDst!==ck&&(n.blendDst=this.blendDst),this.blendEquation!==Zh&&(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!==SC&&(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!==sg&&(n.stencilFail=this.stencilFail),this.stencilZFail!==sg&&(n.stencilZFail=this.stencilZFail),this.stencilZPass!==sg&&(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++}onBuild(){console.warn("Material: onBuild() has been removed.")}onBeforeRender(){console.warn("Material: onBeforeRender() has been removed.")}}class qi extends Fo{constructor(t){super(),this.isMeshBasicMaterial=!0,this.type="MeshBasicMaterial",this.color=new qe(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 rd,this.combine=EC,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 yr=new O,KC=new xe;class Hi{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=ta,this.version=0}onUploadCallback(){}set needsUpdate(t){!0===t&&this.version++}get updateRange(){return cg("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],d=[];for(let h=0,p=c.length;h0&&(r[l]=d,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 d=[],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))&&(j4.copy(s).invert(),rf.copy(t.ray).applyMatrix4(j4),(null===n.boundingBox||!1!==rf.intersectsBox(n.boundingBox))&&this._computeIntersections(t,e,rf)))}_computeIntersections(t,e,n){let r;const s=this.geometry,o=this.material,a=s.index,l=s.attributes.position,c=s.attributes.uv,d=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:iS.clone(),object:i}}(i,t,e,n,wg,Mg,Cg,nS);if(d){r&&(JC.fromBufferAttribute(r,a),eS.fromBufferAttribute(r,l),tS.fromBufferAttribute(r,c),d.uv=La.getInterpolation(nS,wg,Mg,Cg,JC,eS,tS,new xe)),s&&(JC.fromBufferAttribute(s,a),eS.fromBufferAttribute(s,l),tS.fromBufferAttribute(s,c),d.uv1=La.getInterpolation(nS,wg,Mg,Cg,JC,eS,tS,new xe)),o&&(q4.fromBufferAttribute(o,a),X4.fromBufferAttribute(o,l),K4.fromBufferAttribute(o,c),d.normal=La.getInterpolation(nS,wg,Mg,Cg,q4,X4,K4,new O),d.normal.dot(n.direction)>0&&d.normal.multiplyScalar(-1));const h={a,b:l,c,normal:new O,materialIndex:0};La.getNormal(wg,Mg,Cg,h.normal),d.face=h}return d}class sf 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=[],d=[],h=[];let p=0,m=0;function g(b,v,y,M,x,C,F,D,k,B,T){const A=C/k,W=F/B,ie=C/2,ne=F/2,oe=D/2,ge=k+1,q=B+1;let se=0,J=0;const we=new O;for(let Ve=0;Ve0?1:-1,d.push(we.x,we.y,we.z),h.push(Rt/k),h.push(1-Ve/B),se+=1}for(let Ve=0;Ve0&&(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 pP extends Fr{constructor(){super(),this.isCamera=!0,this.type="Camera",this.matrixWorldInverse=new Bt,this.projectionMatrix=new Bt,this.projectionMatrixInverse=new Bt,this.coordinateSystem=td}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 Tu=new O,J4=new xe,e5=new xe;class br extends pP{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*ag*Math.atan(e),this.updateProjectionMatrix()}getFocalLength(){const t=Math.tan(.5*ef*this.fov);return.5*this.getFilmHeight()/t}getEffectiveFOV(){return 2*ag*Math.atan(Math.tan(.5*ef*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){Tu.set(-1,-1,.5).applyMatrix4(this.projectionMatrixInverse),e.set(Tu.x,Tu.y).multiplyScalar(-t/Tu.z),Tu.set(1,1,.5).applyMatrix4(this.projectionMatrixInverse),n.set(Tu.x,Tu.y).multiplyScalar(-t/Tu.z)}getViewSize(t,e){return this.getViewBounds(t,J4,e5),e.subVectors(e5,J4)}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*ef*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 Iae extends Fr{constructor(t,e,n){super(),this.type="CubeCamera",this.renderTarget=n,this.coordinateSystem=null,this.activeMipmapLevel=0;const r=new br(-90,1,t,e);r.layers=this.layers,this.add(r);const s=new br(-90,1,t,e);s.layers=this.layers,this.add(s);const o=new br(-90,1,t,e);o.layers=this.layers,this.add(o);const a=new br(-90,1,t,e);a.layers=this.layers,this.add(a);const l=new br(-90,1,t,e);l.layers=this.layers,this.add(l);const c=new br(-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===td)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,d]=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,d),t.setRenderTarget(h,p,m),t.xr.enabled=g,n.texture.needsPMREMUpdate=!0}}class sS extends Oo{constructor(t,e,n,r,s,o,a,l,c,d){super(t=void 0!==t?t:[],e=void 0!==e?e:cc,n,r,s,o,a,l,c,d),this.isCubeTexture=!0,this.flipY=!1}get images(){return this.image}set images(t){this.image=t}}class Rae extends Mu{constructor(t=1,e={}){super(t,t,e),this.isWebGLCubeRenderTarget=!0;const n={width:t,height:t,depth:1};this.texture=new sS([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:cr}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 sf(5,5,5),s=new Sl({name:"CubemapFromEquirect",uniforms:Sg(n_uniforms),vertexShader:n_vertexShader,fragmentShader:n_fragmentShader,side:ko,blending:Jc});s.uniforms.tEquirect.value=e;const o=new Mn(r,s),a=e.minFilter;return e.minFilter===xl&&(e.minFilter=cr),new Iae(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 mP=new O,kae=new O,Pae=new wn;class af{constructor(t=new O(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=mP.subVectors(n,e).cross(kae.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(mP),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||Pae.getNormalMatrix(t),r=this.coplanarPoint(mP).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 lf=new zs,oS=new O;class aS{constructor(t=new af,e=new af,n=new af,r=new af,s=new af,o=new af){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=td){const n=this.planes,r=t.elements,s=r[0],o=r[1],a=r[2],l=r[3],c=r[4],d=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+d,v+g,C+M).normalize(),n[3].setComponents(l-o,p-d,v-g,C-M).normalize(),n[4].setComponents(l-a,p-h,v-b,C-x).normalize(),e===td)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(),lf.copy(t.boundingSphere).applyMatrix4(t.matrixWorld);else{const e=t.geometry;null===e.boundingSphere&&e.computeBoundingSphere(),lf.copy(e.boundingSphere).applyMatrix4(t.matrixWorld)}return this.intersectsSphere(lf)}intersectsSprite(t){return lf.center.set(0,0,0),lf.radius=.7071067811865476,lf.applyMatrix4(t.matrixWorld),this.intersectsSphere(lf)}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,oS.y=r.normal.y>0?t.max.y:t.min.y,oS.z=r.normal.z>0?t.max.z:t.min.z,r.distanceToPoint(oS)<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 t5(){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 Oae(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.isInterleavedBufferAttribute&&(a=a.data),a.isGLBufferAttribute){const d=t.get(a);return void((!d||d.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 ) || defined( USE_BATCHING_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 ) || defined( USE_BATCHING_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\n#ifdef USE_BATCHING_COLOR\n\tvec3 batchingColor = getBatchingColor( getIndirectIndex( gl_DrawID ) );\n\tvColor.xyz *= batchingColor.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}\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}",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_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\tfloat distanceFalloff = 1.0 / max( pow( lightDistance, decayExponent ), 0.01 );\n\tif ( cutoffDistance > 0.0 ) {\n\t\tdistanceFalloff *= pow2( saturate( 1.0 - pow4( lightDistance / cutoffDistance ) ) );\n\t}\n\treturn distanceFalloff;\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_DISPERSION\n\tmaterial.dispersion = dispersion;\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\tfloat dispersion;\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.shadowIntensity, 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.shadowIntensity, 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.shadowIntensity, 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 )\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\tfor ( int i = 0; i < MORPHTARGETS_COUNT; i ++ ) {\n\t\tif ( morphTargetInfluences[ i ] != 0.0 ) objectNormal += getMorph( gl_VertexID, i, 1 ).xyz * morphTargetInfluences[ i ];\n\t}\n#endif",morphtarget_pars_vertex:"#ifdef USE_MORPHTARGETS\n\t#ifndef USE_INSTANCING_MORPH\n\t\tuniform float morphTargetBaseInfluence;\n\t\tuniform float morphTargetInfluences[ MORPHTARGETS_COUNT ];\n\t#endif\n\tuniform sampler2DArray morphTargetsTexture;\n\tuniform ivec2 morphTargetsTextureSize;\n\tvec4 getMorph( const in int vertexIndex, const in int morphTargetIndex, const in int offset ) {\n\t\tint texelIndex = vertexIndex * MORPHTARGETS_TEXTURE_STRIDE + offset;\n\t\tint y = texelIndex / morphTargetsTextureSize.x;\n\t\tint x = texelIndex - y * morphTargetsTextureSize.x;\n\t\tivec3 morphUV = ivec3( x, y, morphTargetIndex );\n\t\treturn texelFetch( morphTargetsTexture, morphUV, 0 );\n\t}\n#endif",morphtarget_vertex:"#ifdef USE_MORPHTARGETS\n\ttransformed *= morphTargetBaseInfluence;\n\tfor ( int i = 0; i < MORPHTARGETS_COUNT; i ++ ) {\n\t\tif ( morphTargetInfluences[ i ] != 0.0 ) transformed += getMorph( gl_VertexID, i, 0 ).xyz * morphTargetInfluences[ i ];\n\t}\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.;const float ShiftRight8 = 1. / 256.;\nconst float Inv255 = 1. / 255.;\nconst vec4 PackFactors = vec4( 1.0, 256.0, 256.0 * 256.0, 256.0 * 256.0 * 256.0 );\nconst vec2 UnpackFactors2 = vec2( UnpackDownscale, 1.0 / PackFactors.g );\nconst vec3 UnpackFactors3 = vec3( UnpackDownscale / PackFactors.rg, 1.0 / PackFactors.b );\nconst vec4 UnpackFactors4 = vec4( UnpackDownscale / PackFactors.rgb, 1.0 / PackFactors.a );\nvec4 packDepthToRGBA( const in float v ) {\n\tif( v <= 0.0 )\n\t\treturn vec4( 0., 0., 0., 0. );\n\tif( v >= 1.0 )\n\t\treturn vec4( 1., 1., 1., 1. );\n\tfloat vuf;\n\tfloat af = modf( v * PackFactors.a, vuf );\n\tfloat bf = modf( vuf * ShiftRight8, vuf );\n\tfloat gf = modf( vuf * ShiftRight8, vuf );\n\treturn vec4( vuf * Inv255, gf * PackUpscale, bf * PackUpscale, af );\n}\nvec3 packDepthToRGB( const in float v ) {\n\tif( v <= 0.0 )\n\t\treturn vec3( 0., 0., 0. );\n\tif( v >= 1.0 )\n\t\treturn vec3( 1., 1., 1. );\n\tfloat vuf;\n\tfloat bf = modf( v * PackFactors.b, vuf );\n\tfloat gf = modf( vuf * ShiftRight8, vuf );\n\treturn vec3( vuf * Inv255, gf * PackUpscale, bf );\n}\nvec2 packDepthToRG( const in float v ) {\n\tif( v <= 0.0 )\n\t\treturn vec2( 0., 0. );\n\tif( v >= 1.0 )\n\t\treturn vec2( 1., 1. );\n\tfloat vuf;\n\tfloat gf = modf( v * 256., vuf );\n\treturn vec2( vuf * Inv255, gf );\n}\nfloat unpackRGBAToDepth( const in vec4 v ) {\n\treturn dot( v, UnpackFactors4 );\n}\nfloat unpackRGBToDepth( const in vec3 v ) {\n\treturn dot( v, UnpackFactors3 );\n}\nfloat unpackRGToDepth( const in vec2 v ) {\n\treturn v.r * UnpackFactors2.r + v.g * UnpackFactors2.g;\n}\nvec4 pack2HalfToRGBA( const in 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( const in 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 shadowIntensity;\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 shadowIntensity;\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 shadowIntensity;\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 shadowIntensity, 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 mix( 1.0, shadow, shadowIntensity );\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 shadowIntensity, 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 mix( 1.0, shadow, shadowIntensity );\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 shadowIntensity;\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 shadowIntensity;\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 shadowIntensity;\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.shadowIntensity, 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.shadowIntensity, 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.shadowIntensity, 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\tconst float StartCompression = 0.8 - 0.04;\n\tconst float 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, vec3( newPeak ), 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.dispersion, 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 dispersion, const in float ior, const in float thickness,\n\t\tconst in vec3 attenuationColor, const in float attenuationDistance ) {\n\t\tvec4 transmittedLight;\n\t\tvec3 transmittance;\n\t\t#ifdef USE_DISPERSION\n\t\t\tfloat halfSpread = ( ior - 1.0 ) * 0.025 * dispersion;\n\t\t\tvec3 iors = vec3( ior - halfSpread, ior, ior + halfSpread );\n\t\t\tfor ( int i = 0; i < 3; i ++ ) {\n\t\t\t\tvec3 transmissionRay = getVolumeTransmissionRay( n, v, thickness, iors[ i ], modelMatrix );\n\t\t\t\tvec3 refractedRayExit = position + transmissionRay;\n\t\t\n\t\t\t\tvec4 ndcPos = projMatrix * viewMatrix * vec4( refractedRayExit, 1.0 );\n\t\t\t\tvec2 refractionCoords = ndcPos.xy / ndcPos.w;\n\t\t\t\trefractionCoords += 1.0;\n\t\t\t\trefractionCoords /= 2.0;\n\t\t\n\t\t\t\tvec4 transmissionSample = getTransmissionSample( refractionCoords, roughness, iors[ i ] );\n\t\t\t\ttransmittedLight[ i ] = transmissionSample[ i ];\n\t\t\t\ttransmittedLight.a += transmissionSample.a;\n\t\t\t\ttransmittance[ i ] = diffuseColor[ i ] * volumeAttenuation( length( transmissionRay ), attenuationColor, attenuationDistance )[ i ];\n\t\t\t}\n\t\t\ttransmittedLight.a /= 3.0;\n\t\t\n\t\t#else\n\t\t\n\t\t\tvec3 transmissionRay = getVolumeTransmissionRay( n, v, thickness, ior, modelMatrix );\n\t\t\tvec3 refractedRayExit = position + transmissionRay;\n\t\t\tvec4 ndcPos = projMatrix * viewMatrix * vec4( refractedRayExit, 1.0 );\n\t\t\tvec2 refractionCoords = ndcPos.xy / ndcPos.w;\n\t\t\trefractionCoords += 1.0;\n\t\t\trefractionCoords /= 2.0;\n\t\t\ttransmittedLight = getTransmissionSample( refractionCoords, roughness, ior );\n\t\t\ttransmittance = diffuseColor * volumeAttenuation( length( transmissionRay ), attenuationColor, attenuationDistance );\n\t\t\n\t\t#endif\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#elif DEPTH_PACKING == 3202\n\t\tgl_FragColor = vec4( packDepthToRGB( fragCoordZ ), 1.0 );\n\t#elif DEPTH_PACKING == 3203\n\t\tgl_FragColor = vec4( packDepthToRG( fragCoordZ ), 0.0, 1.0 );\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_DISPERSION\n\tuniform float dispersion;\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}"},Je={common:{diffuse:{value:new qe(16777215)},opacity:{value:1},map:{value:null},mapTransform:{value:new wn},alphaMap:{value:null},alphaMapTransform:{value:new wn},alphaTest:{value:0}},specularmap:{specularMap:{value:null},specularMapTransform:{value:new wn}},envmap:{envMap:{value:null},envMapRotation:{value:new wn},flipEnvMap:{value:-1},reflectivity:{value:1},ior:{value:1.5},refractionRatio:{value:.98}},aomap:{aoMap:{value:null},aoMapIntensity:{value:1},aoMapTransform:{value:new wn}},lightmap:{lightMap:{value:null},lightMapIntensity:{value:1},lightMapTransform:{value:new wn}},bumpmap:{bumpMap:{value:null},bumpMapTransform:{value:new wn},bumpScale:{value:1}},normalmap:{normalMap:{value:null},normalMapTransform:{value:new wn},normalScale:{value:new xe(1,1)}},displacementmap:{displacementMap:{value:null},displacementMapTransform:{value:new wn},displacementScale:{value:1},displacementBias:{value:0}},emissivemap:{emissiveMap:{value:null},emissiveMapTransform:{value:new wn}},metalnessmap:{metalnessMap:{value:null},metalnessMapTransform:{value:new wn}},roughnessmap:{roughnessMap:{value:null},roughnessMapTransform:{value:new wn}},gradientmap:{gradientMap:{value:null}},fog:{fogDensity:{value:25e-5},fogNear:{value:1},fogFar:{value:2e3},fogColor:{value:new qe(16777215)}},lights:{ambientLightColor:{value:[]},lightProbe:{value:[]},directionalLights:{value:[],properties:{direction:{},color:{}}},directionalLightShadows:{value:[],properties:{shadowIntensity:1,shadowBias:{},shadowNormalBias:{},shadowRadius:{},shadowMapSize:{}}},directionalShadowMap:{value:[]},directionalShadowMatrix:{value:[]},spotLights:{value:[],properties:{color:{},position:{},direction:{},distance:{},coneCos:{},penumbraCos:{},decay:{}}},spotLightShadows:{value:[],properties:{shadowIntensity:1,shadowBias:{},shadowNormalBias:{},shadowRadius:{},shadowMapSize:{}}},spotLightMap:{value:[]},spotShadowMap:{value:[]},spotLightMatrix:{value:[]},pointLights:{value:[],properties:{color:{},position:{},decay:{},distance:{}}},pointLightShadows:{value:[],properties:{shadowIntensity:1,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 qe(16777215)},opacity:{value:1},size:{value:1},scale:{value:1},map:{value:null},alphaMap:{value:null},alphaMapTransform:{value:new wn},alphaTest:{value:0},uvTransform:{value:new wn}},sprite:{diffuse:{value:new qe(16777215)},opacity:{value:1},center:{value:new xe(.5,.5)},rotation:{value:0},map:{value:null},mapTransform:{value:new wn},alphaMap:{value:null},alphaMapTransform:{value:new wn},alphaTest:{value:0}}},dc={basic:{uniforms:po([Je.common,Je.specularmap,Je.envmap,Je.aomap,Je.lightmap,Je.fog]),vertexShader:Cn.meshbasic_vert,fragmentShader:Cn.meshbasic_frag},lambert:{uniforms:po([Je.common,Je.specularmap,Je.envmap,Je.aomap,Je.lightmap,Je.emissivemap,Je.bumpmap,Je.normalmap,Je.displacementmap,Je.fog,Je.lights,{emissive:{value:new qe(0)}}]),vertexShader:Cn.meshlambert_vert,fragmentShader:Cn.meshlambert_frag},phong:{uniforms:po([Je.common,Je.specularmap,Je.envmap,Je.aomap,Je.lightmap,Je.emissivemap,Je.bumpmap,Je.normalmap,Je.displacementmap,Je.fog,Je.lights,{emissive:{value:new qe(0)},specular:{value:new qe(1118481)},shininess:{value:30}}]),vertexShader:Cn.meshphong_vert,fragmentShader:Cn.meshphong_frag},standard:{uniforms:po([Je.common,Je.envmap,Je.aomap,Je.lightmap,Je.emissivemap,Je.bumpmap,Je.normalmap,Je.displacementmap,Je.roughnessmap,Je.metalnessmap,Je.fog,Je.lights,{emissive:{value:new qe(0)},roughness:{value:1},metalness:{value:0},envMapIntensity:{value:1}}]),vertexShader:Cn.meshphysical_vert,fragmentShader:Cn.meshphysical_frag},toon:{uniforms:po([Je.common,Je.aomap,Je.lightmap,Je.emissivemap,Je.bumpmap,Je.normalmap,Je.displacementmap,Je.gradientmap,Je.fog,Je.lights,{emissive:{value:new qe(0)}}]),vertexShader:Cn.meshtoon_vert,fragmentShader:Cn.meshtoon_frag},matcap:{uniforms:po([Je.common,Je.bumpmap,Je.normalmap,Je.displacementmap,Je.fog,{matcap:{value:null}}]),vertexShader:Cn.meshmatcap_vert,fragmentShader:Cn.meshmatcap_frag},points:{uniforms:po([Je.points,Je.fog]),vertexShader:Cn.points_vert,fragmentShader:Cn.points_frag},dashed:{uniforms:po([Je.common,Je.fog,{scale:{value:1},dashSize:{value:1},totalSize:{value:2}}]),vertexShader:Cn.linedashed_vert,fragmentShader:Cn.linedashed_frag},depth:{uniforms:po([Je.common,Je.displacementmap]),vertexShader:Cn.depth_vert,fragmentShader:Cn.depth_frag},normal:{uniforms:po([Je.common,Je.bumpmap,Je.normalmap,Je.displacementmap,{opacity:{value:1}}]),vertexShader:Cn.meshnormal_vert,fragmentShader:Cn.meshnormal_frag},sprite:{uniforms:po([Je.sprite,Je.fog]),vertexShader:Cn.sprite_vert,fragmentShader:Cn.sprite_frag},background:{uniforms:{uvTransform:{value:new wn},t2D:{value:null},backgroundIntensity:{value:1}},vertexShader:Cn.background_vert,fragmentShader:Cn.background_frag},backgroundCube:{uniforms:{envMap:{value:null},flipEnvMap:{value:-1},backgroundBlurriness:{value:0},backgroundIntensity:{value:1},backgroundRotation:{value:new wn}},vertexShader:Cn.backgroundCube_vert,fragmentShader:Cn.backgroundCube_frag},cube:{uniforms:{tCube:{value:null},tFlip:{value:-1},opacity:{value:1}},vertexShader:Cn.cube_vert,fragmentShader:Cn.cube_frag},equirect:{uniforms:{tEquirect:{value:null}},vertexShader:Cn.equirect_vert,fragmentShader:Cn.equirect_frag},distanceRGBA:{uniforms:po([Je.common,Je.displacementmap,{referencePosition:{value:new O},nearDistance:{value:1},farDistance:{value:1e3}}]),vertexShader:Cn.distanceRGBA_vert,fragmentShader:Cn.distanceRGBA_frag},shadow:{uniforms:po([Je.lights,Je.fog,{color:{value:new qe(0)},opacity:{value:1}}]),vertexShader:Cn.shadow_vert,fragmentShader:Cn.shadow_frag}};dc.physical={uniforms:po([dc.standard.uniforms,{clearcoat:{value:0},clearcoatMap:{value:null},clearcoatMapTransform:{value:new wn},clearcoatNormalMap:{value:null},clearcoatNormalMapTransform:{value:new wn},clearcoatNormalScale:{value:new xe(1,1)},clearcoatRoughness:{value:0},clearcoatRoughnessMap:{value:null},clearcoatRoughnessMapTransform:{value:new wn},dispersion:{value:0},iridescence:{value:0},iridescenceMap:{value:null},iridescenceMapTransform:{value:new wn},iridescenceIOR:{value:1.3},iridescenceThicknessMinimum:{value:100},iridescenceThicknessMaximum:{value:400},iridescenceThicknessMap:{value:null},iridescenceThicknessMapTransform:{value:new wn},sheen:{value:0},sheenColor:{value:new qe(0)},sheenColorMap:{value:null},sheenColorMapTransform:{value:new wn},sheenRoughness:{value:1},sheenRoughnessMap:{value:null},sheenRoughnessMapTransform:{value:new wn},transmission:{value:0},transmissionMap:{value:null},transmissionMapTransform:{value:new wn},transmissionSamplerSize:{value:new xe},transmissionSamplerMap:{value:null},thickness:{value:0},thicknessMap:{value:null},thicknessMapTransform:{value:new wn},attenuationDistance:{value:0},attenuationColor:{value:new qe(0)},specularColor:{value:new qe(1,1,1)},specularColorMap:{value:null},specularColorMapTransform:{value:new wn},specularIntensity:{value:1},specularIntensityMap:{value:null},specularIntensityMapTransform:{value:new wn},anisotropyVector:{value:new xe},anisotropyMap:{value:null},anisotropyMapTransform:{value:new wn}}]),vertexShader:Cn.meshphysical_vert,fragmentShader:Cn.meshphysical_frag};const lS={r:0,b:0,g:0},cf=new rd,Oce=new Bt;function Fce(i,t,e,n,r,s,o){const a=new qe(0);let c,d,l=!0===s?0:1,h=null,p=0,m=null;function g(M){let x=!0===M.isScene?M.background:null;return x&&x.isTexture&&(x=(M.backgroundBlurriness>0?e:t).get(x)),x}function y(M,x){M.getRGB(lS,Z4(i)),n.buffers.color.setClear(lS.r,lS.g,lS.b,x,o)}return{getClearColor:function(){return a},setClearColor:function(M,x=1){a.set(M),l=x,y(a,l)},getClearAlpha:function(){return l},setClearAlpha:function(M){l=M,y(a,l)},render:function b(M){let x=!1;const C=g(M);null===C?y(a,l):C&&C.isColor&&(y(C,1),x=!0);const F=i.xr.getEnvironmentBlendMode();"additive"===F?n.buffers.color.setClear(0,0,0,1,o):"alpha-blend"===F&&n.buffers.color.setClear(0,0,0,0,o),(i.autoClear||x)&&(n.buffers.depth.setTest(!0),n.buffers.depth.setMask(!0),n.buffers.color.setMask(!0),i.clear(i.autoClearColor,i.autoClearDepth,i.autoClearStencil))},addToRenderList:function v(M,x){const C=g(x);C&&(C.isCubeTexture||C.mapping===gb)?(void 0===d&&(d=new Mn(new sf(1,1,1),new Sl({name:"BackgroundCubeMaterial",uniforms:Sg(dc.backgroundCube.uniforms),vertexShader:dc.backgroundCube.vertexShader,fragmentShader:dc.backgroundCube.fragmentShader,side:ko,depthTest:!1,depthWrite:!1,fog:!1})),d.geometry.deleteAttribute("normal"),d.geometry.deleteAttribute("uv"),d.onBeforeRender=function(F,D,k){this.matrixWorld.copyPosition(k.matrixWorld)},Object.defineProperty(d.material,"envMap",{get:function(){return this.uniforms.envMap.value}}),r.update(d)),cf.copy(x.backgroundRotation),cf.x*=-1,cf.y*=-1,cf.z*=-1,C.isCubeTexture&&!1===C.isRenderTargetTexture&&(cf.y*=-1,cf.z*=-1),d.material.uniforms.envMap.value=C,d.material.uniforms.flipEnvMap.value=C.isCubeTexture&&!1===C.isRenderTargetTexture?-1:1,d.material.uniforms.backgroundBlurriness.value=x.backgroundBlurriness,d.material.uniforms.backgroundIntensity.value=x.backgroundIntensity,d.material.uniforms.backgroundRotation.value.setFromMatrix4(Oce.makeRotationFromEuler(cf)),d.material.toneMapped=ei.getTransfer(C.colorSpace)!==Fi,(h!==C||p!==C.version||m!==i.toneMapping)&&(d.material.needsUpdate=!0,h=C,p=C.version,m=i.toneMapping),d.layers.enableAll(),M.unshift(d,d.geometry,d.material,0,0,null)):C&&C.isTexture&&(void 0===c&&(c=new Mn(new Iu(2,2),new Sl({name:"BackgroundMaterial",uniforms:Sg(dc.background.uniforms),vertexShader:dc.background.vertexShader,fragmentShader:dc.background.fragmentShader,side:lc,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=C,c.material.uniforms.backgroundIntensity.value=x.backgroundIntensity,c.material.toneMapped=ei.getTransfer(C.colorSpace)!==Fi,!0===C.matrixAutoUpdate&&C.updateMatrix(),c.material.uniforms.uvTransform.value.copy(C.matrix),(h!==C||p!==C.version||m!==i.toneMapping)&&(c.material.needsUpdate=!0,h=C,p=C.version,m=i.toneMapping),c.layers.enableAll(),M.unshift(c,c.geometry,c.material,0,0,null))}}}function Lce(i,t){const e=i.getParameter(i.MAX_VERTEX_ATTRIBS),n={},r=p(null);let s=r,o=!1;function c(A){return i.bindVertexArray(A)}function d(A){return i.deleteVertexArray(A)}function p(A){const W=[],ie=[],ne=[];for(let oe=0;oe=0){const Ve=oe[J];let Ye=ge[J];if(void 0===Ye&&("instanceMatrix"===J&&A.instanceMatrix&&(Ye=A.instanceMatrix),"instanceColor"===J&&A.instanceColor&&(Ye=A.instanceColor)),void 0===Ve||Ve.attribute!==Ye||Ye&&Ve.data!==Ye.data)return!0;q++}return s.attributesNum!==q||s.index!==ne}(A,ne,ie,oe),ge&&function g(A,W,ie,ne){const oe={},ge=W.attributes;let q=0;const se=ie.getAttributes();for(const J in se)if(se[J].location>=0){let Ve=ge[J];void 0===Ve&&("instanceMatrix"===J&&A.instanceMatrix&&(Ve=A.instanceMatrix),"instanceColor"===J&&A.instanceColor&&(Ve=A.instanceColor));const Ye={};Ye.attribute=Ve,Ve&&Ve.data&&(Ye.data=Ve.data),oe[J]=Ye,q++}s.attributes=oe,s.attributesNum=q,s.index=ne}(A,ne,ie,oe),null!==oe&&t.update(oe,i.ELEMENT_ARRAY_BUFFER),(ge||o)&&(o=!1,function C(A,W,ie,ne){b();const oe=ne.attributes,ge=ie.getAttributes(),q=W.defaultAttributeValues;for(const se in ge){const J=ge[se];if(J.location>=0){let we=oe[se];if(void 0===we&&("instanceMatrix"===se&&A.instanceMatrix&&(we=A.instanceMatrix),"instanceColor"===se&&A.instanceColor&&(we=A.instanceColor)),void 0!==we){const Ve=we.normalized,Ye=we.itemSize,Rt=t.get(we);if(void 0===Rt)continue;const nn=Rt.buffer,le=Rt.type,Fe=Rt.bytesPerElement,Ze=le===i.INT||le===i.UNSIGNED_INT||we.gpuType===hk;if(we.isInterleavedBufferAttribute){const Le=we.data,wt=Le.stride,Tt=we.offset;if(Le.isInstancedInterleavedBuffer){for(let St=0;St0&&i.getShaderPrecisionFormat(i.FRAGMENT_SHADER,i.HIGH_FLOAT).precision>0)return"highp";D="mediump"}return"mediump"===D&&i.getShaderPrecisionFormat(i.VERTEX_SHADER,i.MEDIUM_FLOAT).precision>0&&i.getShaderPrecisionFormat(i.FRAGMENT_SHADER,i.MEDIUM_FLOAT).precision>0?"mediump":"lowp"}let c=void 0!==e.precision?e.precision:"highp";const d=l(c);d!==c&&(console.warn("THREE.WebGLRenderer:",c,"not supported, using",d,"instead."),c=d);const h=!0===e.logarithmicDepthBuffer,p=i.getParameter(i.MAX_TEXTURE_IMAGE_UNITS),m=i.getParameter(i.MAX_VERTEX_TEXTURE_IMAGE_UNITS);return{isWebGL2:!0,getMaxAnisotropy:function s(){if(void 0!==r)return r;if(!0===t.has("EXT_texture_filter_anisotropic")){const D=t.get("EXT_texture_filter_anisotropic");r=i.getParameter(D.MAX_TEXTURE_MAX_ANISOTROPY_EXT)}else r=0;return r},getMaxPrecision:l,textureFormatReadable:function o(D){return!(D!==Po&&n.convert(D)!==i.getParameter(i.IMPLEMENTATION_COLOR_READ_FORMAT))},textureTypeReadable:function a(D){const k=D===Jm&&(t.has("EXT_color_buffer_half_float")||t.has("EXT_color_buffer_float"));return!(D!==ed&&n.convert(D)!==i.getParameter(i.IMPLEMENTATION_COLOR_READ_TYPE)&&D!==ta&&!k)},precision:c,logarithmicDepthBuffer:h,maxTextures:p,maxVertexTextures:m,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:m>0,maxSamples:i.getParameter(i.MAX_SAMPLES)}}function Uce(i){const t=this;let e=null,n=0,r=!1,s=!1;const o=new af,a=new wn,l={value:null,needsUpdate:!1};function d(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=d(g,p,x,m);for(let F=0;F!==x;++F)C[F]=e[F];y.clippingState=C,this.numIntersection=b?this.numPlanes:0,this.numPlanes+=M}}}function Vce(i){let t=new WeakMap;function e(o,a){return a===AC?o.mapping=cc:a===DC&&(o.mapping=Qh),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===AC||a===DC){if(t.has(o))return e(t.get(o).texture,o.mapping);{const l=o.image;if(l&&l.height>0){const c=new Rae(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 Rb extends pP{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,d=(this.top-this.bottom)/this.view.fullHeight/this.zoom;s+=c*this.view.offsetX,o=s+c*this.view.width,a-=d*this.view.offsetY,l=a-d*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 n5=[.125,.215,.35,.446,.526,.582],gP=new Rb,r5=new qe;let _P=null,vP=0,yP=0,bP=!1;const uf=(1+Math.sqrt(5))/2,Tg=1/uf,s5=[new O(-uf,Tg,0),new O(uf,Tg,0),new O(-Tg,0,uf),new O(Tg,0,uf),new O(0,uf,-Tg),new O(0,uf,Tg),new O(-1,1,-1),new O(1,1,-1),new O(-1,1,1),new O(1,1,1)];class o5{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){_P=this._renderer.getRenderTarget(),vP=this._renderer.getActiveCubeFace(),yP=this._renderer.getActiveMipmapLevel(),bP=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=c5(),this._compileMaterial(this._cubemapMaterial))}compileEquirectangularShader(){null===this._equirectMaterial&&(this._equirectMaterial=l5(),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=n5[o-i+4-1]:0===o&&(l=0),n.push(l);const c=1/(a-2),d=-c,h=1+c,p=[d,d,h,d,h,h,d,d,h,h,d,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 D=0;D2?0:-1;M.set([k,B,0,k+2/3,B,0,k+2/3,B+1,0,k,B,0,k+2/3,B+1,0,k,B+1,0],b*g*D),x.set(p,v*g*D),C.set([D,D,D,D,D,D],y*g*D)}const F=new hn;F.setAttribute("position",new Hi(M,b)),F.setAttribute("uv",new Hi(x,v)),F.setAttribute("faceIndex",new Hi(C,y)),t.push(F),r>4&&r--}return{lodPlanes:t,sizeLods:e,sigmas:n}}(s)),this._blurMaterial=function Hce(i,t,e){const n=new Float32Array(20),r=new O(0,1,0);return new Sl({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:Jc,depthTest:!1,depthWrite:!1})}(s,t,e)}return r}_compileMaterial(t){const e=new Mn(this._lodPlanes[0],t);this._renderer.compile(e,gP)}_sceneToCubeUV(t,e,n,r){const a=new br(90,1,e,n),l=[1,-1,1,1,1,1],c=[1,1,1,-1,-1,-1],d=this._renderer,h=d.autoClear,p=d.toneMapping;d.getClearColor(r5),d.toneMapping=bu,d.autoClear=!1;const m=new qi({name:"PMREM.Background",side:ko,depthWrite:!1,depthTest:!1}),g=new Mn(new sf,m);let b=!1;const v=t.background;v?v.isColor&&(m.color.copy(v),t.background=null,b=!0):(m.color.copy(r5),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;cS(r,M*x,y>2?x:0,x,x),d.setRenderTarget(r),b&&d.render(g,a),d.render(t,a)}g.geometry.dispose(),g.material.dispose(),d.toneMapping=p,d.autoClear=h,t.background=v}_textureToCubeUV(t,e){const n=this._renderer,r=t.mapping===cc||t.mapping===Qh;r?(null===this._cubemapMaterial&&(this._cubemapMaterial=c5()),this._cubemapMaterial.uniforms.flipEnvMap.value=!1===t.isRenderTargetTexture?-1:1):null===this._equirectMaterial&&(this._equirectMaterial=l5());const s=r?this._cubemapMaterial:this._equirectMaterial,o=new Mn(this._lodPlanes[0],s);s.uniforms.envMap.value=t;const l=this._cubeSize;cS(e,0,0,3*l,2*l),n.setRenderTarget(e),n.render(o,gP)}_applyPMREM(t){const e=this._renderer,n=e.autoClear;e.autoClear=!1;const r=this._lodPlanes.length;for(let s=1;s20&&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 k=0;k<20;++k){const B=k/b,T=Math.exp(-B*B/2);y.push(T),0===k?M+=T:kx-4?r-x+4:0),4*(this._cubeSize-C),3*C,2*C),l.setRenderTarget(e),l.render(h,gP)}}function a5(i,t,e){const n=new Mu(i,t,e);return n.texture.mapping=gb,n.texture.name="PMREM.cubeUv",n.scissorTest=!0,n}function cS(i,t,e,n,r){i.viewport.set(t,e,n,r),i.scissor.set(t,e,n,r)}function l5(){return new Sl({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:Jc,depthTest:!1,depthWrite:!1})}function c5(){return new Sl({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:Jc,depthTest:!1,depthWrite:!1})}function $ce(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===AC||l===DC,d=l===cc||l===Qh;if(c||d){let h=t.get(a);if(a.isRenderTargetTexture&&a.pmremVersion!==(void 0!==h?h.texture.pmremVersion:0))return null===e&&(e=new o5(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||d&&m&&function r(a){let l=0;for(let d=0;d<6;d++)void 0!==a[d]&&l++;return 6===l}(m)?(null===e&&(e=new o5(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 Gce(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&&cg("THREE.WebGLRenderer: "+n+" extension not supported."),r}}}function Wce(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&&(F=Math.ceil(C/t.maxTextureSize),C=t.maxTextureSize);const D=new Float32Array(C*F*4*h),k=new Qk(D,C,F,h);k.type=ta,k.needsUpdate=!0;const B=4*x;for(let A=0;A0)return i;const r=t*e;let s=g5[r];if(void 0===s&&(s=new Float32Array(r),g5[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 Lr(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 Gde(i,t){const e=function $de(i){const t=ei.getPrimaries(ei.workingColorSpace),e=ei.getPrimaries(i);let n;switch(t===e?n="":t===UC&&e===BC?n="LinearDisplayP3ToLinearSRGB":t===BC&&e===UC&&(n="LinearSRGBToLinearDisplayP3"),i){case ds:case LC:return[n,"LinearTransferOETF"];case cs:case Yk: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 Wde(i,t){let e;switch(t){case Moe:e="Linear";break;case Coe:e="Reinhard";break;case Soe:e="OptimizedCineon";break;case Eoe:e="ACESFilmic";break;case Doe:e="AgX";break;case Toe:e="Neutral";break;case Aoe:e="Custom";break;default:console.warn("THREE.WebGLProgram: Unsupported toneMapping:",t),e="Linear"}return"vec3 "+i+"( vec3 color ) { return "+e+"ToneMapping( color ); }"}const hS=new O;function kb(i){return""!==i}function C5(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 S5(i,t){return i.replace(/NUM_CLIPPING_PLANES/g,t.numClippingPlanes).replace(/UNION_CLIPPING_PLANES/g,t.numClippingPlanes-t.numClipIntersection)}const Kde=/^[ \t]*#include +<([\w\d./]+)>/gm;function MP(i){return i.replace(Kde,Qde)}const Zde=new Map;function Qde(i,t){let e=Cn[t];if(void 0===e){const n=Zde.get(t);if(void 0===n)throw new Error("Can not resolve #include <"+t+">");e=Cn[n],console.warn('THREE.WebGLRenderer: Shader chunk "%s" has been deprecated. Use "%s" instead.',t,n)}return MP(e)}const Jde=/#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 E5(i){return i.replace(Jde,eue)}function eue(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(kb).join("\n"),y.length>0&&(y+="\n")):(v=[A5(e),"#define SHADER_TYPE "+e.shaderType,"#define SHADER_NAME "+e.shaderName,g,e.extensionClipCullDistance?"#define USE_CLIP_DISTANCE":"",e.batching?"#define USE_BATCHING":"",e.batchingColor?"#define USE_BATCHING_COLOR":"",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 "+d:"",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_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.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","#ifdef USE_SKINNING","\tattribute vec4 skinIndex;","\tattribute vec4 skinWeight;","#endif","\n"].filter(kb).join("\n"),y=[A5(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 "+d:"",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.dispersion?"#define USE_DISPERSION":"",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||e.batchingColor?"#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.decodeVideoTexture?"#define DECODE_VIDEO_TEXTURE":"",e.logarithmicDepthBuffer?"#define USE_LOGDEPTHBUF":"","uniform mat4 viewMatrix;","uniform vec3 cameraPosition;","uniform bool isOrthographic;",e.toneMapping!==bu?"#define TONE_MAPPING":"",e.toneMapping!==bu?Cn.tonemapping_pars_fragment:"",e.toneMapping!==bu?Wde("toneMapping",e.toneMapping):"",e.dithering?"#define DITHERING":"",e.opaque?"#define OPAQUE":"",Cn.colorspace_pars_fragment,Gde("linearToOutputTexel",e.outputColorSpace),(ei.getLuminanceCoefficients(hS),["float luminance( const in vec3 rgb ) {",`\tconst vec3 weights = vec3( ${hS.x.toFixed(4)}, ${hS.y.toFixed(4)}, ${hS.z.toFixed(4)} );`,"\treturn dot( weights, rgb );","}"].join("\n")),e.useDepthPacking?"#define DEPTH_PACKING "+e.depthPacking:"","\n"].filter(kb).join("\n")),o=MP(o),o=C5(o,e),o=S5(o,e),a=MP(a),a=C5(a,e),a=S5(a,e),o=E5(o),a=E5(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===A4?"":"layout(location = 0) out highp vec4 pc_fragColor;",e.glslVersion===A4?"":"#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,F=w5(r,r.VERTEX_SHADER,M+v+o),D=w5(r,r.FRAGMENT_SHADER,C);function k(W){if(i.debug.checkShaderErrors){const ie=r.getProgramInfoLog(b).trim(),ne=r.getShaderInfoLog(F).trim(),oe=r.getShaderInfoLog(D).trim();let ge=!0,q=!0;if(!1===r.getProgramParameter(b,r.LINK_STATUS))if(ge=!1,"function"==typeof i.debug.onShaderError)i.debug.onShaderError(r,b,F,D);else{const se=M5(r,F,"vertex"),J=M5(r,D,"fragment");console.error("THREE.WebGLProgram: Shader Error "+r.getError()+" - VALIDATE_STATUS "+r.getProgramParameter(b,r.VALIDATE_STATUS)+"\n\nMaterial Name: "+W.name+"\nMaterial Type: "+W.type+"\n\nProgram Info Log: "+ie+"\n"+se+"\n"+J)}else""!==ie?console.warn("THREE.WebGLProgram: Program Info Log:",ie):(""===ne||""===oe)&&(q=!1);q&&(W.diagnostics={runnable:ge,programLog:ie,vertexShader:{log:ne,prefix:v},fragmentShader:{log:oe,prefix:y}})}r.deleteShader(F),r.deleteShader(D),B=new uS(r,b),T=function Xde(i,t){const e={},n=i.getProgramParameter(t,i.ACTIVE_ATTRIBUTES);for(let r=0;r0,de=T.clearcoat>0,De=T.iridescence>0,Ae=T.sheen>0,Ut=T.transmission>0,et=R&&!!T.anisotropyMap,pt=de&&!!T.clearcoatMap,bn=de&&!!T.clearcoatNormalMap,He=de&&!!T.clearcoatRoughnessMap,ft=De&&!!T.iridescenceMap,Yn=De&&!!T.iridescenceThicknessMap,cn=Ae&&!!T.sheenColorMap,yt=Ae&&!!T.sheenRoughnessMap,vn=!!T.specularMap,Pn=!!T.specularColorMap,Ki=!!T.specularIntensityMap,Z=Ut&&!!T.transmissionMap,We=Ut&&!!T.thicknessMap,Ee=!!T.alphaMap,ti=!!T.extensions;let xr=bu;T.toneMapped&&(null===Le||!0===Le.isXRRenderTarget)&&(xr=i.toneMapping);const hs={shaderID:we,shaderType:T.type,shaderName:T.name,vertexShader:nn,fragmentShader:le,defines:T.defines,customVertexShaderID:Fe,customFragmentShaderID:Ze,isRawShaderMaterial:!0===T.isRawShaderMaterial,glslVersion:T.glslVersion,precision:m,batching:Tt,batchingColor:Tt&&null!==ne._colorsTexture,instancing:wt,instancingColor:wt&&null!==ne.instanceColor,instancingMorph:wt&&null!==ne.morphTexture,supportsVertexTextures:p,outputColorSpace:null===Le?i.outputColorSpace:!0===Le.isXRRenderTarget?Le.texture.colorSpace:ds,alphaToCoverage:!!T.alphaToCoverage,map:St,matcap:!!T.matcap,envMap:N,envMapMode:N&&se.mapping,envMapCubeUVHeight:J,aoMap:Ge,lightMap:Ne,bumpMap:it,normalMap:Me,displacementMap:p&&Gt,emissiveMap:rt,normalMapObjectSpace:Me&&T.normalMapType===Noe,normalMapTangentSpace:Me&&T.normalMapType===Jh,metalnessMap:_t,roughnessMap:H,anisotropy:R,anisotropyMap:et,clearcoat:de,clearcoatMap:pt,clearcoatNormalMap:bn,clearcoatRoughnessMap:He,dispersion:T.dispersion>0,iridescence:De,iridescenceMap:ft,iridescenceThicknessMap:Yn,sheen:Ae,sheenColorMap:cn,sheenRoughnessMap:yt,specularMap:vn,specularColorMap:Pn,specularIntensityMap:Ki,transmission:Ut,transmissionMap:Z,thicknessMap:We,gradientMap:!!T.gradientMap,opaque:!1===T.transparent&&T.blending===Zm&&!1===T.alphaToCoverage,alphaMap:Ee,alphaTest:T.alphaTest>0,alphaHash:!!T.alphaHash,combine:T.combine,mapUv:St&&b(T.map.channel),aoMapUv:Ge&&b(T.aoMap.channel),lightMapUv:Ne&&b(T.lightMap.channel),bumpMapUv:it&&b(T.bumpMap.channel),normalMapUv:Me&&b(T.normalMap.channel),displacementMapUv:Gt&&b(T.displacementMap.channel),emissiveMapUv:rt&&b(T.emissiveMap.channel),metalnessMapUv:_t&&b(T.metalnessMap.channel),roughnessMapUv:H&&b(T.roughnessMap.channel),anisotropyMapUv:et&&b(T.anisotropyMap.channel),clearcoatMapUv:pt&&b(T.clearcoatMap.channel),clearcoatNormalMapUv:bn&&b(T.clearcoatNormalMap.channel),clearcoatRoughnessMapUv:He&&b(T.clearcoatRoughnessMap.channel),iridescenceMapUv:ft&&b(T.iridescenceMap.channel),iridescenceThicknessMapUv:Yn&&b(T.iridescenceThicknessMap.channel),sheenColorMapUv:cn&&b(T.sheenColorMap.channel),sheenRoughnessMapUv:yt&&b(T.sheenRoughnessMap.channel),specularMapUv:vn&&b(T.specularMap.channel),specularColorMapUv:Pn&&b(T.specularColorMap.channel),specularIntensityMapUv:Ki&&b(T.specularIntensityMap.channel),transmissionMapUv:Z&&b(T.transmissionMap.channel),thicknessMapUv:We&&b(T.thicknessMap.channel),alphaMapUv:Ee&&b(T.alphaMap.channel),vertexTangents:!!ge.attributes.tangent&&(Me||R),vertexColors:T.vertexColors,vertexAlphas:!0===T.vertexColors&&!!ge.attributes.color&&4===ge.attributes.color.itemSize,pointsUvs:!0===ne.isPoints&&!!ge.attributes.uv&&(St||Ee),fog:!!oe,useFog:!0===T.fog,fogExp2:!!oe&&oe.isFogExp2,flatShading:!0===T.flatShading,sizeAttenuation:!0===T.sizeAttenuation,logarithmicDepthBuffer:h,skinning:!0===ne.isSkinnedMesh,morphTargets:void 0!==ge.morphAttributes.position,morphNormals:void 0!==ge.morphAttributes.normal,morphColors:void 0!==ge.morphAttributes.color,morphTargetsCount:Ye,morphTextureStride:Rt,numDirLights:A.directional.length,numPointLights:A.point.length,numSpotLights:A.spot.length,numSpotLightMaps:A.spotLightMap.length,numRectAreaLights:A.rectArea.length,numHemiLights:A.hemi.length,numDirLightShadows:A.directionalShadowMap.length,numPointLightShadows:A.pointShadowMap.length,numSpotLightShadows:A.spotShadowMap.length,numSpotLightShadowsWithMaps:A.numSpotLightShadowsWithMaps,numLightProbes:A.numLightProbes,numClippingPlanes:o.numPlanes,numClipIntersection:o.numIntersection,dithering:T.dithering,shadowMapEnabled:i.shadowMap.enabled&&W.length>0,shadowMapType:i.shadowMap.type,toneMapping:xr,decodeVideoTexture:St&&!0===T.map.isVideoTexture&&ei.getTransfer(T.map.colorSpace)===Fi,premultipliedAlpha:T.premultipliedAlpha,doubleSided:T.side===Ns,flipSided:T.side===ko,useDepthPacking:T.depthPacking>=0,depthPacking:T.depthPacking||0,index0AttributeName:T.index0AttributeName,extensionClipCullDistance:ti&&!0===T.extensions.clipCullDistance&&n.has("WEBGL_clip_cull_distance"),extensionMultiDraw:(ti&&!0===T.extensions.multiDraw||Tt)&&n.has("WEBGL_multi_draw"),rendererExtensionParallelShaderCompile:n.has("KHR_parallel_shader_compile"),customProgramCacheKey:T.customProgramCacheKey()};return hs.vertexUv1s=c.has(1),hs.vertexUv2s=c.has(2),hs.vertexUv3s=c.has(3),c.clear(),hs},getProgramCacheKey:function y(T){const A=[];if(T.shaderID?A.push(T.shaderID):(A.push(T.customVertexShaderID),A.push(T.customFragmentShaderID)),void 0!==T.defines)for(const W in T.defines)A.push(W),A.push(T.defines[W]);return!1===T.isRawShaderMaterial&&(function M(T,A){T.push(A.precision),T.push(A.outputColorSpace),T.push(A.envMapMode),T.push(A.envMapCubeUVHeight),T.push(A.mapUv),T.push(A.alphaMapUv),T.push(A.lightMapUv),T.push(A.aoMapUv),T.push(A.bumpMapUv),T.push(A.normalMapUv),T.push(A.displacementMapUv),T.push(A.emissiveMapUv),T.push(A.metalnessMapUv),T.push(A.roughnessMapUv),T.push(A.anisotropyMapUv),T.push(A.clearcoatMapUv),T.push(A.clearcoatNormalMapUv),T.push(A.clearcoatRoughnessMapUv),T.push(A.iridescenceMapUv),T.push(A.iridescenceThicknessMapUv),T.push(A.sheenColorMapUv),T.push(A.sheenRoughnessMapUv),T.push(A.specularMapUv),T.push(A.specularColorMapUv),T.push(A.specularIntensityMapUv),T.push(A.transmissionMapUv),T.push(A.thicknessMapUv),T.push(A.combine),T.push(A.fogExp2),T.push(A.sizeAttenuation),T.push(A.morphTargetsCount),T.push(A.morphAttributeCount),T.push(A.numDirLights),T.push(A.numPointLights),T.push(A.numSpotLights),T.push(A.numSpotLightMaps),T.push(A.numHemiLights),T.push(A.numRectAreaLights),T.push(A.numDirLightShadows),T.push(A.numPointLightShadows),T.push(A.numSpotLightShadows),T.push(A.numSpotLightShadowsWithMaps),T.push(A.numLightProbes),T.push(A.shadowMapType),T.push(A.toneMapping),T.push(A.numClippingPlanes),T.push(A.numClipIntersection),T.push(A.depthPacking)}(A,T),function x(T,A){a.disableAll(),A.supportsVertexTextures&&a.enable(0),A.instancing&&a.enable(1),A.instancingColor&&a.enable(2),A.instancingMorph&&a.enable(3),A.matcap&&a.enable(4),A.envMap&&a.enable(5),A.normalMapObjectSpace&&a.enable(6),A.normalMapTangentSpace&&a.enable(7),A.clearcoat&&a.enable(8),A.iridescence&&a.enable(9),A.alphaTest&&a.enable(10),A.vertexColors&&a.enable(11),A.vertexAlphas&&a.enable(12),A.vertexUv1s&&a.enable(13),A.vertexUv2s&&a.enable(14),A.vertexUv3s&&a.enable(15),A.vertexTangents&&a.enable(16),A.anisotropy&&a.enable(17),A.alphaHash&&a.enable(18),A.batching&&a.enable(19),A.dispersion&&a.enable(20),A.batchingColor&&a.enable(21),T.push(a.mask),a.disableAll(),A.fog&&a.enable(0),A.useFog&&a.enable(1),A.flatShading&&a.enable(2),A.logarithmicDepthBuffer&&a.enable(3),A.skinning&&a.enable(4),A.morphTargets&&a.enable(5),A.morphNormals&&a.enable(6),A.morphColors&&a.enable(7),A.premultipliedAlpha&&a.enable(8),A.shadowMapEnabled&&a.enable(9),A.doubleSided&&a.enable(10),A.flipSided&&a.enable(11),A.useDepthPacking&&a.enable(12),A.dithering&&a.enable(13),A.transmission&&a.enable(14),A.sheen&&a.enable(15),A.opaque&&a.enable(16),A.pointsUvs&&a.enable(17),A.decodeVideoTexture&&a.enable(18),A.alphaToCoverage&&a.enable(19),T.push(a.mask)}(A,T),A.push(i.outputColorSpace)),A.push(T.customProgramCacheKey),A.join()},getUniforms:function C(T){const A=g[T.type];let W;return W=A?Q4.clone(dc[A].uniforms):T.uniforms,W},acquireProgram:function F(T,A){let W;for(let ie=0,ne=d.length;ie0?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 d(){for(let h=t,p=i.length;h1&&e.sort(h||hue),n.length>1&&n.sort(p||D5),r.length>1&&r.sort(p||D5)}}}function fue(){let i=new WeakMap;return{get:function t(n,r){const s=i.get(n);let o;return void 0===s?(o=new T5,i.set(n,[o])):r>=s.length?(o=new T5,s.push(o)):o=s[r],o},dispose:function e(){i=new WeakMap}}}function pue(){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 O,color:new qe};break;case"SpotLight":e={position:new O,direction:new O,color:new qe,distance:0,coneCos:0,penumbraCos:0,decay:0};break;case"PointLight":e={position:new O,color:new qe,distance:0,decay:0};break;case"HemisphereLight":e={direction:new O,skyColor:new qe,groundColor:new qe};break;case"RectAreaLight":e={color:new qe,position:new O,halfWidth:new O,halfHeight:new O}}return i[t.id]=e,e}}}let gue=0;function _ue(i,t){return(t.castShadow?2:0)-(i.castShadow?2:0)+(t.map?1:0)-(i.map?1:0)}function vue(i){const t=new pue,e=function mue(){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={shadowIntensity:1,shadowBias:0,shadowNormalBias:0,shadowRadius:1,shadowMapSize:new xe};break;case"PointLight":e={shadowIntensity:1,shadowBias:0,shadowNormalBias:0,shadowRadius:1,shadowMapSize:new xe,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 O);const r=new O,s=new Bt,o=new Bt;return{setup:function a(c){let d=0,h=0,p=0;for(let T=0;T<9;T++)n.probe[T].set(0,0,0);let m=0,g=0,b=0,v=0,y=0,M=0,x=0,C=0,F=0,D=0,k=0;c.sort(_ue);for(let T=0,A=c.length;T0&&(!0===i.has("OES_texture_float_linear")?(n.rectAreaLTC1=Je.LTC_FLOAT_1,n.rectAreaLTC2=Je.LTC_FLOAT_2):(n.rectAreaLTC1=Je.LTC_HALF_1,n.rectAreaLTC2=Je.LTC_HALF_2)),n.ambient[0]=d,n.ambient[1]=h,n.ambient[2]=p;const B=n.hash;(B.directionalLength!==m||B.pointLength!==g||B.spotLength!==b||B.rectAreaLength!==v||B.hemiLength!==y||B.numDirectionalShadows!==M||B.numPointShadows!==x||B.numSpotShadows!==C||B.numSpotMaps!==F||B.numLightProbes!==k)&&(n.directional.length=m,n.spot.length=b,n.rectArea.length=v,n.point.length=g,n.hemi.length=y,n.directionalShadow.length=M,n.directionalShadowMap.length=M,n.pointShadow.length=x,n.pointShadowMap.length=x,n.spotShadow.length=C,n.spotShadowMap.length=C,n.directionalShadowMatrix.length=M,n.pointShadowMatrix.length=x,n.spotLightMatrix.length=C+F-D,n.spotLightMap.length=F,n.numSpotLightShadowsWithMaps=D,n.numLightProbes=k,B.directionalLength=m,B.pointLength=g,B.spotLength=b,B.rectAreaLength=v,B.hemiLength=y,B.numDirectionalShadows=M,B.numPointShadows=x,B.numSpotShadows=C,B.numSpotMaps=F,B.numLightProbes=k,n.version=gue++)},setupView:function l(c,d){let h=0,p=0,m=0,g=0,b=0;const v=d.matrixWorldInverse;for(let y=0,M=c.length;y=o.length?(a=new I5(i),o.push(a)):a=o[s],a},dispose:function n(){t=new WeakMap}}}class R5 extends Fo{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 k5 extends Fo{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 bue="void main() {\n\tgl_Position = vec4( position, 1.0 );\n}",xue="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 wue(i,t,e){let n=new aS;const r=new xe,s=new xe,o=new vi,a=new R5({depthPacking:Loe}),l=new k5,c={},d=e.maxTextureSize,h={[lc]:ko,[ko]:lc,[Ns]:Ns},p=new Sl({defines:{VSM_SAMPLES:8},uniforms:{shadow_pass:{value:null},resolution:{value:new xe},radius:{value:4}},vertexShader:bue,fragmentShader:xue}),m=p.clone();m.defines.HORIZONTAL_PASS=1;const g=new hn;g.setAttribute("position",new Hi(new Float32Array([-1,-1,.5,3,-1,.5,-1,3,.5]),3));const b=new Mn(g,p),v=this;this.enabled=!1,this.autoUpdate=!0,this.needsUpdate=!1,this.type=l4;let y=this.type;function M(D,k){const B=t.update(b);p.defines.VSM_SAMPLES!==D.blurSamples&&(p.defines.VSM_SAMPLES=D.blurSamples,m.defines.VSM_SAMPLES=D.blurSamples,p.needsUpdate=!0,m.needsUpdate=!0),null===D.mapPass&&(D.mapPass=new Mu(r.x,r.y)),p.uniforms.shadow_pass.value=D.map.texture,p.uniforms.resolution.value=D.mapSize,p.uniforms.radius.value=D.radius,i.setRenderTarget(D.mapPass),i.clear(),i.renderBufferDirect(k,null,B,p,b,null),m.uniforms.shadow_pass.value=D.mapPass.texture,m.uniforms.resolution.value=D.mapSize,m.uniforms.radius.value=D.radius,i.setRenderTarget(D.map),i.clear(),i.renderBufferDirect(k,null,B,m,b,null)}function x(D,k,B,T){let A=null;const W=!0===B.isPointLight?D.customDistanceMaterial:D.customDepthMaterial;if(void 0!==W)A=W;else if(A=!0===B.isPointLight?l:a,i.localClippingEnabled&&!0===k.clipShadows&&Array.isArray(k.clippingPlanes)&&0!==k.clippingPlanes.length||k.displacementMap&&0!==k.displacementScale||k.alphaMap&&k.alphaTest>0||k.map&&k.alphaTest>0){const ie=A.uuid,ne=k.uuid;let oe=c[ie];void 0===oe&&(oe={},c[ie]=oe);let ge=oe[ne];void 0===ge&&(ge=A.clone(),oe[ne]=ge,k.addEventListener("dispose",F)),A=ge}return A.visible=k.visible,A.wireframe=k.wireframe,A.side=T===Qc?null!==k.shadowSide?k.shadowSide:k.side:null!==k.shadowSide?k.shadowSide:h[k.side],A.alphaMap=k.alphaMap,A.alphaTest=k.alphaTest,A.map=k.map,A.clipShadows=k.clipShadows,A.clippingPlanes=k.clippingPlanes,A.clipIntersection=k.clipIntersection,A.displacementMap=k.displacementMap,A.displacementScale=k.displacementScale,A.displacementBias=k.displacementBias,A.wireframeLinewidth=k.wireframeLinewidth,A.linewidth=k.linewidth,!0===B.isPointLight&&!0===A.isMeshDistanceMaterial&&(i.properties.get(A).light=B),A}function C(D,k,B,T,A){if(!1===D.visible)return;if(D.layers.test(k.layers)&&(D.isMesh||D.isLine||D.isPoints)&&(D.castShadow||D.receiveShadow&&A===Qc)&&(!D.frustumCulled||n.intersectsObject(D))){D.modelViewMatrix.multiplyMatrices(B.matrixWorldInverse,D.matrixWorld);const ne=t.update(D),oe=D.material;if(Array.isArray(oe)){const ge=ne.groups;for(let q=0,se=ge.length;qd||r.y>d)&&(r.x>d&&(s.x=Math.floor(d/we.x),r.x=s.x*we.x,J.mapSize.x=s.x),r.y>d&&(s.y=Math.floor(d/we.y),r.y=s.y*we.y,J.mapSize.y=s.y)),null===J.map||!0===ne||!0===oe){const Ye=this.type!==Qc?{minFilter:vr,magFilter:vr}:{};null!==J.map&&J.map.dispose(),J.map=new Mu(r.x,r.y,Ye),J.map.texture.name=se.name+".shadowMap",J.camera.updateProjectionMatrix()}i.setRenderTarget(J.map),i.clear();const Ve=J.getViewportCount();for(let Ye=0;Ye=1):-1!==se.indexOf("OpenGL ES")&&(q=parseFloat(/^OpenGL ES (\d)/.exec(se)[1]),ge=q>=2);let J=null,we={};const Ve=i.getParameter(i.SCISSOR_BOX),Ye=i.getParameter(i.VIEWPORT),Rt=(new vi).fromArray(Ve),nn=(new vi).fromArray(Ye);function le(Z,We,Ce,Ee){const Ke=new Uint8Array(4),rn=i.createTexture();i.bindTexture(Z,rn),i.texParameteri(Z,i.TEXTURE_MIN_FILTER,i.NEAREST),i.texParameteri(Z,i.TEXTURE_MAG_FILTER,i.NEAREST);for(let ti=0;ti"u")&&/OculusBrowser/g.test(navigator.userAgent),c=new xe,d=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(H,R){return m?new OffscreenCanvas(H,R):Mb("canvas")}function b(H,R,de){let ke=1;const De=_t(H);if((De.width>de||De.height>de)&&(ke=de/Math.max(De.width,De.height)),ke<1){if(typeof HTMLImageElement<"u"&&H instanceof HTMLImageElement||typeof HTMLCanvasElement<"u"&&H instanceof HTMLCanvasElement||typeof ImageBitmap<"u"&&H instanceof ImageBitmap||typeof VideoFrame<"u"&&H instanceof VideoFrame){const Ae=Math.floor(ke*De.width),Ut=Math.floor(ke*De.height);void 0===h&&(h=g(Ae,Ut));const et=R?g(Ae,Ut):h;return et.width=Ae,et.height=Ut,et.getContext("2d").drawImage(H,0,0,Ae,Ut),console.warn("THREE.WebGLRenderer: Texture has been resized from ("+De.width+"x"+De.height+") to ("+Ae+"x"+Ut+")."),et}return"data"in H&&console.warn("THREE.WebGLRenderer: Image in DataTexture is too big ("+De.width+"x"+De.height+")."),H}return H}function v(H){return H.generateMipmaps&&H.minFilter!==vr&&H.minFilter!==cr}function y(H){i.generateMipmap(H)}function M(H,R,de,ke,De=!1){if(null!==H){if(void 0!==i[H])return i[H];console.warn("THREE.WebGLRenderer: Attempt to use non-existing WebGL internal format '"+H+"'")}let Ae=R;if(R===i.RED&&(de===i.FLOAT&&(Ae=i.R32F),de===i.HALF_FLOAT&&(Ae=i.R16F),de===i.UNSIGNED_BYTE&&(Ae=i.R8)),R===i.RED_INTEGER&&(de===i.UNSIGNED_BYTE&&(Ae=i.R8UI),de===i.UNSIGNED_SHORT&&(Ae=i.R16UI),de===i.UNSIGNED_INT&&(Ae=i.R32UI),de===i.BYTE&&(Ae=i.R8I),de===i.SHORT&&(Ae=i.R16I),de===i.INT&&(Ae=i.R32I)),R===i.RG&&(de===i.FLOAT&&(Ae=i.RG32F),de===i.HALF_FLOAT&&(Ae=i.RG16F),de===i.UNSIGNED_BYTE&&(Ae=i.RG8)),R===i.RG_INTEGER&&(de===i.UNSIGNED_BYTE&&(Ae=i.RG8UI),de===i.UNSIGNED_SHORT&&(Ae=i.RG16UI),de===i.UNSIGNED_INT&&(Ae=i.RG32UI),de===i.BYTE&&(Ae=i.RG8I),de===i.SHORT&&(Ae=i.RG16I),de===i.INT&&(Ae=i.RG32I)),R===i.RGB&&de===i.UNSIGNED_INT_5_9_9_9_REV&&(Ae=i.RGB9_E5),R===i.RGBA){const Ut=De?NC:ei.getTransfer(ke);de===i.FLOAT&&(Ae=i.RGBA32F),de===i.HALF_FLOAT&&(Ae=i.RGBA16F),de===i.UNSIGNED_BYTE&&(Ae=Ut===Fi?i.SRGB8_ALPHA8:i.RGBA8),de===i.UNSIGNED_SHORT_4_4_4_4&&(Ae=i.RGBA4),de===i.UNSIGNED_SHORT_5_5_5_1&&(Ae=i.RGB5_A1)}return(Ae===i.R16F||Ae===i.R32F||Ae===i.RG16F||Ae===i.RG32F||Ae===i.RGBA16F||Ae===i.RGBA32F)&&t.get("EXT_color_buffer_float"),Ae}function x(H,R){let de;return H?null===R||R===xu||R===eg?de=i.DEPTH24_STENCIL8:R===ta?de=i.DEPTH32F_STENCIL8:R===yb&&(de=i.DEPTH24_STENCIL8,console.warn("DepthTexture: 16 bit depth attachment is not supported with stencil. Using 24-bit attachment.")):null===R||R===xu||R===eg?de=i.DEPTH_COMPONENT24:R===ta?de=i.DEPTH_COMPONENT32F:R===yb&&(de=i.DEPTH_COMPONENT16),de}function C(H,R){return!0===v(H)||H.isFramebufferTexture&&H.minFilter!==vr&&H.minFilter!==cr?Math.log2(Math.max(R.width,R.height))+1:void 0!==H.mipmaps&&H.mipmaps.length>0?H.mipmaps.length:H.isCompressedTexture&&Array.isArray(H.image)?R.mipmaps.length:1}function F(H){const R=H.target;R.removeEventListener("dispose",F),function k(H){const R=n.get(H);if(void 0===R.__webglInit)return;const de=H.source,ke=p.get(de);if(ke){const De=ke[R.__cacheKey];De.usedTimes--,0===De.usedTimes&&B(H),0===Object.keys(ke).length&&p.delete(de)}n.remove(H)}(R),R.isVideoTexture&&d.delete(R)}function D(H){const R=H.target;R.removeEventListener("dispose",D),function T(H){const R=n.get(H);if(H.depthTexture&&H.depthTexture.dispose(),H.isWebGLCubeRenderTarget)for(let ke=0;ke<6;ke++){if(Array.isArray(R.__webglFramebuffer[ke]))for(let De=0;De0&&de.__version!==H.version){const ke=H.image;if(null===ke)console.warn("THREE.WebGLRenderer: Texture marked for update but no image data found.");else{if(!1!==ke.complete)return void nn(de,H,R);console.warn("THREE.WebGLRenderer: Texture marked for update but image is incomplete")}}e.bindTexture(i.TEXTURE_2D,de.__webglTexture,i.TEXTURE0+R)}const J={[Bs]:i.REPEAT,[er]:i.CLAMP_TO_EDGE,[_b]:i.MIRRORED_REPEAT},we={[vr]:i.NEAREST,[uk]:i.NEAREST_MIPMAP_NEAREST,[Qm]:i.NEAREST_MIPMAP_LINEAR,[cr]:i.LINEAR,[vb]:i.LINEAR_MIPMAP_NEAREST,[xl]:i.LINEAR_MIPMAP_LINEAR},Ve={[Boe]:i.NEVER,[Goe]:i.ALWAYS,[Uoe]:i.LESS,[E4]:i.LEQUAL,[Voe]:i.EQUAL,[$oe]:i.GEQUAL,[zoe]:i.GREATER,[Hoe]:i.NOTEQUAL};function Ye(H,R){if(R.type===ta&&!1===t.has("OES_texture_float_linear")&&(R.magFilter===cr||R.magFilter===vb||R.magFilter===Qm||R.magFilter===xl||R.minFilter===cr||R.minFilter===vb||R.minFilter===Qm||R.minFilter===xl)&&console.warn("THREE.WebGLRenderer: Unable to use linear filtering with floating point textures. OES_texture_float_linear not supported on this device."),i.texParameteri(H,i.TEXTURE_WRAP_S,J[R.wrapS]),i.texParameteri(H,i.TEXTURE_WRAP_T,J[R.wrapT]),(H===i.TEXTURE_3D||H===i.TEXTURE_2D_ARRAY)&&i.texParameteri(H,i.TEXTURE_WRAP_R,J[R.wrapR]),i.texParameteri(H,i.TEXTURE_MAG_FILTER,we[R.magFilter]),i.texParameteri(H,i.TEXTURE_MIN_FILTER,we[R.minFilter]),R.compareFunction&&(i.texParameteri(H,i.TEXTURE_COMPARE_MODE,i.COMPARE_REF_TO_TEXTURE),i.texParameteri(H,i.TEXTURE_COMPARE_FUNC,Ve[R.compareFunction])),!0===t.has("EXT_texture_filter_anisotropic")){if(R.magFilter===vr||R.minFilter!==Qm&&R.minFilter!==xl||R.type===ta&&!1===t.has("OES_texture_float_linear"))return;if(R.anisotropy>1||n.get(R).__currentAnisotropy){const de=t.get("EXT_texture_filter_anisotropic");i.texParameterf(H,de.TEXTURE_MAX_ANISOTROPY_EXT,Math.min(R.anisotropy,r.getMaxAnisotropy())),n.get(R).__currentAnisotropy=R.anisotropy}}}function Rt(H,R){let de=!1;void 0===H.__webglInit&&(H.__webglInit=!0,R.addEventListener("dispose",F));const ke=R.source;let De=p.get(ke);void 0===De&&(De={},p.set(ke,De));const Ae=function ne(H){const R=[];return R.push(H.wrapS),R.push(H.wrapT),R.push(H.wrapR||0),R.push(H.magFilter),R.push(H.minFilter),R.push(H.anisotropy),R.push(H.internalFormat),R.push(H.format),R.push(H.type),R.push(H.generateMipmaps),R.push(H.premultiplyAlpha),R.push(H.flipY),R.push(H.unpackAlignment),R.push(H.colorSpace),R.join()}(R);if(Ae!==H.__cacheKey){void 0===De[Ae]&&(De[Ae]={texture:i.createTexture(),usedTimes:0},o.memory.textures++,de=!0),De[Ae].usedTimes++;const Ut=De[H.__cacheKey];void 0!==Ut&&(De[H.__cacheKey].usedTimes--,0===Ut.usedTimes&&B(R)),H.__cacheKey=Ae,H.__webglTexture=De[Ae].texture}return de}function nn(H,R,de){let ke=i.TEXTURE_2D;(R.isDataArrayTexture||R.isCompressedArrayTexture)&&(ke=i.TEXTURE_2D_ARRAY),R.isData3DTexture&&(ke=i.TEXTURE_3D);const De=Rt(H,R),Ae=R.source;e.bindTexture(ke,H.__webglTexture,i.TEXTURE0+de);const Ut=n.get(Ae);if(Ae.version!==Ut.__version||!0===De){e.activeTexture(i.TEXTURE0+de);const et=ei.getPrimaries(ei.workingColorSpace),pt=R.colorSpace===wu?null:ei.getPrimaries(R.colorSpace),bn=R.colorSpace===wu||et===pt?i.NONE:i.BROWSER_DEFAULT_WEBGL;i.pixelStorei(i.UNPACK_FLIP_Y_WEBGL,R.flipY),i.pixelStorei(i.UNPACK_PREMULTIPLY_ALPHA_WEBGL,R.premultiplyAlpha),i.pixelStorei(i.UNPACK_ALIGNMENT,R.unpackAlignment),i.pixelStorei(i.UNPACK_COLORSPACE_CONVERSION_WEBGL,bn);let He=b(R.image,!1,r.maxTextureSize);He=rt(R,He);const ft=s.convert(R.format,R.colorSpace),Yn=s.convert(R.type);let yt,cn=M(R.internalFormat,ft,Yn,R.colorSpace,R.isVideoTexture);Ye(ke,R);const vn=R.mipmaps,Pn=!0!==R.isVideoTexture,Ki=void 0===Ut.__version||!0===De,Z=Ae.dataReady,We=C(R,He);if(R.isDepthTexture)cn=x(R.format===ng,R.type),Ki&&(Pn?e.texStorage2D(i.TEXTURE_2D,1,cn,He.width,He.height):e.texImage2D(i.TEXTURE_2D,0,cn,He.width,He.height,0,ft,Yn,null));else if(R.isDataTexture)if(vn.length>0){Pn&&Ki&&e.texStorage2D(i.TEXTURE_2D,We,cn,vn[0].width,vn[0].height);for(let Ce=0,Ee=vn.length;Ce0){const Ke=CP(yt.width,yt.height,R.format,R.type);for(const rn of R.layerUpdates){const ti=yt.data.subarray(rn*Ke/yt.data.BYTES_PER_ELEMENT,(rn+1)*Ke/yt.data.BYTES_PER_ELEMENT);e.compressedTexSubImage3D(i.TEXTURE_2D_ARRAY,Ce,0,0,rn,yt.width,yt.height,1,ft,ti,0,0)}R.clearLayerUpdates()}else e.compressedTexSubImage3D(i.TEXTURE_2D_ARRAY,Ce,0,0,0,yt.width,yt.height,He.depth,ft,yt.data,0,0)}else e.compressedTexImage3D(i.TEXTURE_2D_ARRAY,Ce,cn,yt.width,yt.height,He.depth,0,yt.data,0,0);else console.warn("THREE.WebGLRenderer: Attempt to load unsupported compressed texture format in .uploadTexture()");else Pn?Z&&e.texSubImage3D(i.TEXTURE_2D_ARRAY,Ce,0,0,0,yt.width,yt.height,He.depth,ft,Yn,yt.data):e.texImage3D(i.TEXTURE_2D_ARRAY,Ce,cn,yt.width,yt.height,He.depth,0,ft,Yn,yt.data)}else{Pn&&Ki&&e.texStorage2D(i.TEXTURE_2D,We,cn,vn[0].width,vn[0].height);for(let Ce=0,Ee=vn.length;Ce0){const Ce=CP(He.width,He.height,R.format,R.type);for(const Ee of R.layerUpdates){const Ke=He.data.subarray(Ee*Ce/He.data.BYTES_PER_ELEMENT,(Ee+1)*Ce/He.data.BYTES_PER_ELEMENT);e.texSubImage3D(i.TEXTURE_2D_ARRAY,0,0,0,Ee,He.width,He.height,1,ft,Yn,Ke)}R.clearLayerUpdates()}else e.texSubImage3D(i.TEXTURE_2D_ARRAY,0,0,0,0,He.width,He.height,He.depth,ft,Yn,He.data)}else e.texImage3D(i.TEXTURE_2D_ARRAY,0,cn,He.width,He.height,He.depth,0,ft,Yn,He.data);else if(R.isData3DTexture)Pn?(Ki&&e.texStorage3D(i.TEXTURE_3D,We,cn,He.width,He.height,He.depth),Z&&e.texSubImage3D(i.TEXTURE_3D,0,0,0,0,He.width,He.height,He.depth,ft,Yn,He.data)):e.texImage3D(i.TEXTURE_3D,0,cn,He.width,He.height,He.depth,0,ft,Yn,He.data);else if(R.isFramebufferTexture){if(Ki)if(Pn)e.texStorage2D(i.TEXTURE_2D,We,cn,He.width,He.height);else{let Ce=He.width,Ee=He.height;for(let Ke=0;Ke>=1,Ee>>=1}}else if(vn.length>0){if(Pn&&Ki){const Ce=_t(vn[0]);e.texStorage2D(i.TEXTURE_2D,We,cn,Ce.width,Ce.height)}for(let Ce=0,Ee=vn.length;Ce>Ae),ft=Math.max(1,R.height>>Ae);De===i.TEXTURE_3D||De===i.TEXTURE_2D_ARRAY?e.texImage3D(De,Ae,pt,He,ft,R.depth,0,Ut,et,null):e.texImage2D(De,Ae,pt,He,ft,0,Ut,et,null)}e.bindFramebuffer(i.FRAMEBUFFER,H),Me(R)?a.framebufferTexture2DMultisampleEXT(i.FRAMEBUFFER,ke,De,n.get(de).__webglTexture,0,it(R)):(De===i.TEXTURE_2D||De>=i.TEXTURE_CUBE_MAP_POSITIVE_X&&De<=i.TEXTURE_CUBE_MAP_NEGATIVE_Z)&&i.framebufferTexture2D(i.FRAMEBUFFER,ke,De,n.get(de).__webglTexture,Ae),e.bindFramebuffer(i.FRAMEBUFFER,null)}function Ze(H,R,de){if(i.bindRenderbuffer(i.RENDERBUFFER,H),R.depthBuffer){const ke=R.depthTexture,Ae=x(R.stencilBuffer,ke&&ke.isDepthTexture?ke.type:null),Ut=R.stencilBuffer?i.DEPTH_STENCIL_ATTACHMENT:i.DEPTH_ATTACHMENT,et=it(R);Me(R)?a.renderbufferStorageMultisampleEXT(i.RENDERBUFFER,et,Ae,R.width,R.height):de?i.renderbufferStorageMultisample(i.RENDERBUFFER,et,Ae,R.width,R.height):i.renderbufferStorage(i.RENDERBUFFER,Ae,R.width,R.height),i.framebufferRenderbuffer(i.FRAMEBUFFER,Ut,i.RENDERBUFFER,H)}else{const ke=R.textures;for(let De=0;De0&&!0===t.has("WEBGL_multisampled_render_to_texture")&&!1!==R.__useRenderToTexture}function rt(H,R){const de=H.colorSpace,ke=H.format,De=H.type;return!0===H.isCompressedTexture||!0===H.isVideoTexture||de!==ds&&de!==wu&&(ei.getTransfer(de)===Fi?(ke!==Po||De!==ed)&&console.warn("THREE.WebGLTextures: sRGB encoded textures have to use RGBAFormat and UnsignedByteType."):console.error("THREE.WebGLTextures: Unsupported texture color space:",de)),R}function _t(H){return typeof HTMLImageElement<"u"&&H instanceof HTMLImageElement?(c.width=H.naturalWidth||H.width,c.height=H.naturalHeight||H.height):typeof VideoFrame<"u"&&H instanceof VideoFrame?(c.width=H.displayWidth,c.height=H.displayHeight):(c.width=H.width,c.height=H.height),c}this.allocateTextureUnit=function ie(){const H=A;return H>=r.maxTextures&&console.warn("THREE.WebGLTextures: Trying to use "+H+" texture units while this GPU supports only "+r.maxTextures),A+=1,H},this.resetTextureUnits=function W(){A=0},this.setTexture2D=oe,this.setTexture2DArray=function ge(H,R){const de=n.get(H);H.version>0&&de.__version!==H.version?nn(de,H,R):e.bindTexture(i.TEXTURE_2D_ARRAY,de.__webglTexture,i.TEXTURE0+R)},this.setTexture3D=function q(H,R){const de=n.get(H);H.version>0&&de.__version!==H.version?nn(de,H,R):e.bindTexture(i.TEXTURE_3D,de.__webglTexture,i.TEXTURE0+R)},this.setTextureCube=function se(H,R){const de=n.get(H);H.version>0&&de.__version!==H.version?function le(H,R,de){if(6!==R.image.length)return;const ke=Rt(H,R),De=R.source;e.bindTexture(i.TEXTURE_CUBE_MAP,H.__webglTexture,i.TEXTURE0+de);const Ae=n.get(De);if(De.version!==Ae.__version||!0===ke){e.activeTexture(i.TEXTURE0+de);const Ut=ei.getPrimaries(ei.workingColorSpace),et=R.colorSpace===wu?null:ei.getPrimaries(R.colorSpace),pt=R.colorSpace===wu||Ut===et?i.NONE:i.BROWSER_DEFAULT_WEBGL;i.pixelStorei(i.UNPACK_FLIP_Y_WEBGL,R.flipY),i.pixelStorei(i.UNPACK_PREMULTIPLY_ALPHA_WEBGL,R.premultiplyAlpha),i.pixelStorei(i.UNPACK_ALIGNMENT,R.unpackAlignment),i.pixelStorei(i.UNPACK_COLORSPACE_CONVERSION_WEBGL,pt);const bn=R.isCompressedTexture||R.image[0].isCompressedTexture,He=R.image[0]&&R.image[0].isDataTexture,ft=[];for(let Ee=0;Ee<6;Ee++)ft[Ee]=bn||He?He?R.image[Ee].image:R.image[Ee]:b(R.image[Ee],!0,r.maxCubemapSize),ft[Ee]=rt(R,ft[Ee]);const Yn=ft[0],cn=s.convert(R.format,R.colorSpace),yt=s.convert(R.type),vn=M(R.internalFormat,cn,yt,R.colorSpace),Pn=!0!==R.isVideoTexture,Ki=void 0===Ae.__version||!0===ke,Z=De.dataReady;let Ce,We=C(R,Yn);if(Ye(i.TEXTURE_CUBE_MAP,R),bn){Pn&&Ki&&e.texStorage2D(i.TEXTURE_CUBE_MAP,We,vn,Yn.width,Yn.height);for(let Ee=0;Ee<6;Ee++){Ce=ft[Ee].mipmaps;for(let Ke=0;Ke0&&We++;const Ee=_t(ft[0]);e.texStorage2D(i.TEXTURE_CUBE_MAP,We,vn,Ee.width,Ee.height)}for(let Ee=0;Ee<6;Ee++)if(He){Pn?Z&&e.texSubImage2D(i.TEXTURE_CUBE_MAP_POSITIVE_X+Ee,0,0,0,ft[Ee].width,ft[Ee].height,cn,yt,ft[Ee].data):e.texImage2D(i.TEXTURE_CUBE_MAP_POSITIVE_X+Ee,0,vn,ft[Ee].width,ft[Ee].height,0,cn,yt,ft[Ee].data);for(let Ke=0;Ke1;if(Ut||(void 0===ke.__webglTexture&&(ke.__webglTexture=i.createTexture()),ke.__version=R.version,o.memory.textures++),Ae){de.__webglFramebuffer=[];for(let et=0;et<6;et++)if(R.mipmaps&&R.mipmaps.length>0){de.__webglFramebuffer[et]=[];for(let pt=0;pt0){de.__webglFramebuffer=[];for(let et=0;et0&&!1===Me(H)){de.__webglMultisampledFramebuffer=i.createFramebuffer(),de.__webglColorRenderbuffer=[],e.bindFramebuffer(i.FRAMEBUFFER,de.__webglMultisampledFramebuffer);for(let et=0;et0)for(let pt=0;pt0)for(let pt=0;pt0)if(!1===Me(H)){const R=H.textures,de=H.width,ke=H.height;let De=i.COLOR_BUFFER_BIT;const Ae=H.stencilBuffer?i.DEPTH_STENCIL_ATTACHMENT:i.DEPTH_ATTACHMENT,Ut=n.get(H),et=R.length>1;if(et)for(let pt=0;ptm+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(Rue)))}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 No;n.matrixAutoUpdate=!1,n.visible=!1,t.joints[e.jointName]=n,t.add(n)}return t.joints[e.jointName]}}class Oue{constructor(){this.texture=null,this.mesh=null,this.depthNear=0,this.depthFar=0}init(t,e,n){if(null===this.texture){const r=new Oo;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}}getMesh(t){if(null!==this.texture&&null===this.mesh){const e=t.cameras[0].viewport,n=new Sl({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:e.z},depthHeight:{value:e.w}}});this.mesh=new Mn(new Iu(20,20),n)}return this.mesh}reset(){this.texture=null,this.mesh=null}getDepthTexture(){return this.texture}}class Fue extends og{constructor(t,e){super();const n=this;let r=null,s=1,o=null,a="local-floor",l=1,c=null,d=null,h=null,p=null,m=null,g=null;const b=new Oue,v=e.getContextAttributes();let y=null,M=null;const x=[],C=[],F=new xe;let D=null;const k=new br;k.layers.enable(1),k.viewport=new vi;const B=new br;B.layers.enable(2),B.viewport=new vi;const T=[k,B],A=new Iue;A.layers.enable(1),A.layers.enable(2);let W=null,ie=null;function ne(le){const Fe=C.indexOf(le.inputSource);if(-1===Fe)return;const Ze=x[Fe];void 0!==Ze&&(Ze.update(le.inputSource,le.frame,c||o),Ze.dispatchEvent({type:le.type,data:le.inputSource}))}function oe(){r.removeEventListener("select",ne),r.removeEventListener("selectstart",ne),r.removeEventListener("selectend",ne),r.removeEventListener("squeeze",ne),r.removeEventListener("squeezestart",ne),r.removeEventListener("squeezeend",ne),r.removeEventListener("end",oe),r.removeEventListener("inputsourceschange",ge);for(let le=0;le=0&&(C[Le]=null,x[Le].disconnect(Ze))}for(let Fe=0;Fe=C.length){C.push(Ze),Le=Tt;break}if(null===C[Tt]){C[Tt]=Ze,Le=Tt;break}}if(-1===Le)break}const wt=x[Le];wt&&wt.connect(Ze)}}this.cameraAutoUpdate=!0,this.enabled=!1,this.isPresenting=!1,this.getController=function(le){let Fe=x[le];return void 0===Fe&&(Fe=new SP,x[le]=Fe),Fe.getTargetRaySpace()},this.getControllerGrip=function(le){let Fe=x[le];return void 0===Fe&&(Fe=new SP,x[le]=Fe),Fe.getGripSpace()},this.getHand=function(le){let Fe=x[le];return void 0===Fe&&(Fe=new SP,x[le]=Fe),Fe.getHandSpace()},this.setFramebufferScaleFactor=function(le){s=le,!0===n.isPresenting&&console.warn("THREE.WebXRManager: Cannot change framebuffer scale while presenting.")},this.setReferenceSpaceType=function(le){a=le,!0===n.isPresenting&&console.warn("THREE.WebXRManager: Cannot change reference space type while presenting.")},this.getReferenceSpace=function(){return c||o},this.setReferenceSpace=function(le){c=le},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 le=nt(function*(Fe){if(r=Fe,null!==r){if(y=t.getRenderTarget(),r.addEventListener("select",ne),r.addEventListener("selectstart",ne),r.addEventListener("selectend",ne),r.addEventListener("squeeze",ne),r.addEventListener("squeezestart",ne),r.addEventListener("squeezeend",ne),r.addEventListener("end",oe),r.addEventListener("inputsourceschange",ge),!0!==v.xrCompatible&&(yield e.makeXRCompatible()),D=t.getPixelRatio(),t.getSize(F),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 Mu(m.framebufferWidth,m.framebufferHeight,{format:Po,type:ed,colorSpace:t.outputColorSpace,stencilBuffer:v.stencil});else{let Ze=null,Le=null,wt=null;v.depth&&(wt=v.stencil?e.DEPTH24_STENCIL8:e.DEPTH_COMPONENT24,Ze=v.stencil?ng:tg,Le=v.stencil?eg:xu);const Tt={colorFormat:e.RGBA8,depthFormat:wt,scaleFactor:s};h=new XRWebGLBinding(r,e),p=h.createProjectionLayer(Tt),r.updateRenderState({layers:[p]}),t.setPixelRatio(1),t.setSize(p.textureWidth,p.textureHeight,!1),M=new Mu(p.textureWidth,p.textureHeight,{format:Po,type:ed,depthTexture:new d5(p.textureWidth,p.textureHeight,Le,void 0,void 0,void 0,void 0,void 0,void 0,Ze),stencilBuffer:v.stencil,colorSpace:t.outputColorSpace,samples:v.antialias?4:0,resolveDepthBuffer:!1===p.ignoreDepthValues})}M.isXRRenderTarget=!0,this.setFoveation(l),c=null,o=yield r.requestReferenceSpace(a),nn.setContext(r),nn.start(),n.isPresenting=!0,n.dispatchEvent({type:"sessionstart"})}});return function(Fe){return le.apply(this,arguments)}}(),this.getEnvironmentBlendMode=function(){if(null!==r)return r.environmentBlendMode},this.getDepthTexture=function(){return b.getDepthTexture()};const q=new O,se=new O;function we(le,Fe){null===Fe?le.matrixWorld.copy(le.matrix):le.matrixWorld.multiplyMatrices(Fe.matrixWorld,le.matrix),le.matrixWorldInverse.copy(le.matrixWorld).invert()}this.updateCamera=function(le){if(null===r)return;null!==b.texture&&(le.near=b.depthNear,le.far=b.depthFar),A.near=B.near=k.near=le.near,A.far=B.far=k.far=le.far,(W!==A.near||ie!==A.far)&&(r.updateRenderState({depthNear:A.near,depthFar:A.far}),W=A.near,ie=A.far,k.near=W,k.far=ie,B.near=W,B.far=ie,k.updateProjectionMatrix(),B.updateProjectionMatrix(),le.updateProjectionMatrix());const Fe=le.parent,Ze=A.cameras;we(A,Fe);for(let Le=0;Le0&&(v.alphaTest.value=y.alphaTest);const M=t.get(y),x=M.envMap,C=M.envMapRotation;x&&(v.envMap.value=x,hf.copy(C),hf.x*=-1,hf.y*=-1,hf.z*=-1,x.isCubeTexture&&!1===x.isRenderTargetTexture&&(hf.y*=-1,hf.z*=-1),v.envMapRotation.value.setFromMatrix4(Lue.makeRotationFromEuler(hf)),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,v.lightMapIntensity.value=y.lightMapIntensity,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,Z4(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 d(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===ko&&v.clearcoatNormalScale.value.negate())),y.dispersion>0&&(v.dispersion.value=y.dispersion),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 Bue(i,t,e,n){let r={},s={},o=[];const a=i.getParameter(i.MAX_UNIFORM_BUFFER_BINDINGS);function m(M,x,C,F){const D=M.value,k=x+"_"+C;if(void 0===F[k])return F[k]="number"==typeof D||"boolean"==typeof D?D:D.clone(),!0;{const B=F[k];if("number"==typeof D||"boolean"==typeof D){if(B!==D)return F[k]=D,!0}else if(!1===B.equals(D))return B.copy(D),!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 k=0,B=x.length;k0&&(C+=16-D),M.__size=C,M.__cache={}}(M),C=function d(M){const x=function h(){for(let M=0;M0),Zt=!!ce.morphAttributes.position,li=!!ce.morphAttributes.normal,Li=!!ce.morphAttributes.color;let ir=bu;ue.toneMapped&&(null===k||!0===k.isXRRenderTarget)&&(ir=x.toneMapping);const ca=ce.morphAttributes.position||ce.morphAttributes.normal||ce.morphAttributes.color,fi=void 0!==ca?ca.length:0,kt=rt.get(ue),fs=v.state.lights;!0!==le||!0!==Fe&&L===T||bn.setState(ue,L,L===T&&ue.id===B);let pi=!1;ue.version===kt.__version?(kt.needsLights&&kt.lightsStateVersion!==fs.state.version||kt.outputColorSpace!==Mt||te.isBatchedMesh&&!1===kt.batching||!te.isBatchedMesh&&!0===kt.batching||te.isBatchedMesh&&!0===kt.batchingColor&&null===te.colorTexture||te.isBatchedMesh&&!1===kt.batchingColor&&null!==te.colorTexture||te.isInstancedMesh&&!1===kt.instancing||!te.isInstancedMesh&&!0===kt.instancing||te.isSkinnedMesh&&!1===kt.skinning||!te.isSkinnedMesh&&!0===kt.skinning||te.isInstancedMesh&&!0===kt.instancingColor&&null===te.instanceColor||te.isInstancedMesh&&!1===kt.instancingColor&&null!==te.instanceColor||te.isInstancedMesh&&!0===kt.instancingMorph&&null===te.morphTexture||te.isInstancedMesh&&!1===kt.instancingMorph&&null!==te.morphTexture||kt.envMap!==Ct||!0===ue.fog&&kt.fog!==je||void 0!==kt.numClippingPlanes&&(kt.numClippingPlanes!==bn.numPlanes||kt.numIntersection!==bn.numIntersection)||kt.vertexAlphas!==Kt||kt.vertexTangents!==an||kt.morphTargets!==Zt||kt.morphNormals!==li||kt.morphColors!==Li||kt.toneMapping!==ir||kt.morphTargetsCount!==fi)&&(pi=!0):(pi=!0,kt.__version=ue.version);let Al=kt.currentProgram;!0===pi&&(Al=xE(ue,K,te));let qg=!1,da=!1,XO=!1;const wr=Al.getUniforms(),Uu=kt.uniforms;if(Me.useProgram(Al.program)&&(qg=!0,da=!0,XO=!0),ue.id!==B&&(B=ue.id,da=!0),qg||T!==L){wr.setValue(N,"projectionMatrix",L.projectionMatrix),wr.setValue(N,"viewMatrix",L.matrixWorldInverse);const $a=wr.map.cameraPosition;void 0!==$a&&$a.setValue(N,Le.setFromMatrixPosition(L.matrixWorld)),it.logarithmicDepthBuffer&&wr.setValue(N,"logDepthBufFC",2/(Math.log(L.far+1)/Math.LN2)),(ue.isMeshPhongMaterial||ue.isMeshToonMaterial||ue.isMeshLambertMaterial||ue.isMeshBasicMaterial||ue.isMeshStandardMaterial||ue.isShaderMaterial)&&wr.setValue(N,"isOrthographic",!0===L.isOrthographicCamera),T!==L&&(T=L,da=!0,XO=!0)}if(te.isSkinnedMesh){wr.setOptional(N,te,"bindMatrix"),wr.setOptional(N,te,"bindMatrixInverse");const $a=te.skeleton;$a&&(null===$a.boneTexture&&$a.computeBoneTexture(),wr.setValue(N,"boneTexture",$a.boneTexture,_t))}te.isBatchedMesh&&(wr.setOptional(N,te,"batchingTexture"),wr.setValue(N,"batchingTexture",te._matricesTexture,_t),wr.setOptional(N,te,"batchingIdTexture"),wr.setValue(N,"batchingIdTexture",te._indirectTexture,_t),wr.setOptional(N,te,"batchingColorTexture"),null!==te._colorsTexture&&wr.setValue(N,"batchingColorTexture",te._colorsTexture,_t));const KO=ce.morphAttributes;if((void 0!==KO.position||void 0!==KO.normal||void 0!==KO.color)&&Yn.update(te,ce,Al),(da||kt.receiveShadow!==te.receiveShadow)&&(kt.receiveShadow=te.receiveShadow,wr.setValue(N,"receiveShadow",te.receiveShadow)),ue.isMeshGouraudMaterial&&null!==ue.envMap&&(Uu.envMap.value=Ct,Uu.flipEnvMap.value=Ct.isCubeTexture&&!1===Ct.isRenderTargetTexture?-1:1),ue.isMeshStandardMaterial&&null===ue.envMap&&null!==K.environment&&(Uu.envMapIntensity.value=K.environmentIntensity),da&&(wr.setValue(N,"toneMappingExposure",x.toneMappingExposure),kt.needsLights&&function Gve(L,K){L.ambientLightColor.needsUpdate=K,L.lightProbe.needsUpdate=K,L.directionalLights.needsUpdate=K,L.directionalLightShadows.needsUpdate=K,L.pointLights.needsUpdate=K,L.pointLightShadows.needsUpdate=K,L.spotLights.needsUpdate=K,L.spotLightShadows.needsUpdate=K,L.rectAreaLights.needsUpdate=K,L.hemisphereLights.needsUpdate=K}(Uu,XO),je&&!0===ue.fog&&Ut.refreshFogUniforms(Uu,je),Ut.refreshMaterialUniforms(Uu,ue,se,q,v.state.transmissionRenderTarget[L.id]),uS.upload(N,_8(kt),Uu,_t)),ue.isShaderMaterial&&!0===ue.uniformsNeedUpdate&&(uS.upload(N,_8(kt),Uu,_t),ue.uniformsNeedUpdate=!1),ue.isSpriteMaterial&&wr.setValue(N,"center",te.center),wr.setValue(N,"modelViewMatrix",te.modelViewMatrix),wr.setValue(N,"normalMatrix",te.normalMatrix),wr.setValue(N,"modelMatrix",te.matrixWorld),ue.isShaderMaterial||ue.isRawShaderMaterial){const $a=ue.uniformsGroups;for(let ZO=0,jve=$a.length;ZO{function je(){ue.forEach(function(at){rt.get(at).currentProgram.isReady()&&ue.delete(at)}),0!==ue.size?setTimeout(je,10):te(L)}null!==Ne.get("KHR_parallel_shader_compile")?je():setTimeout(je,10)})};let hi=null;function pc(){Pf.stop()}function f8(){Pf.start()}const Pf=new t5;function qO(L,K,ce,ue){if(!1===L.visible)return;if(L.layers.test(K.layers))if(L.isGroup)ce=L.renderOrder;else if(L.isLOD)!0===L.autoUpdate&&L.update(K);else if(L.isLight)v.pushLight(L),L.castShadow&&v.pushShadow(L);else if(L.isSprite){if(!L.frustumCulled||nn.intersectsSprite(L)){ue&&wt.setFromMatrixPosition(L.matrixWorld).applyMatrix4(Ze);const at=De.update(L),Mt=L.material;Mt.visible&&b.push(L,at,Mt,ce,wt.z,null)}}else if((L.isMesh||L.isLine||L.isPoints)&&(!L.frustumCulled||nn.intersectsObject(L))){const at=De.update(L),Mt=L.material;if(ue&&(void 0!==L.boundingSphere?(null===L.boundingSphere&&L.computeBoundingSphere(),wt.copy(L.boundingSphere.center)):(null===at.boundingSphere&&at.computeBoundingSphere(),wt.copy(at.boundingSphere.center)),wt.applyMatrix4(L.matrixWorld).applyMatrix4(Ze)),Array.isArray(Mt)){const Ct=at.groups;for(let Kt=0,an=Ct.length;Kt0&&bE(te,K,ce),je.length>0&&bE(je,K,ce),at.length>0&&bE(at,K,ce),Me.buffers.depth.setTest(!0),Me.buffers.depth.setMask(!0),Me.buffers.color.setMask(!0),Me.setPolygonOffset(!1)}function m8(L,K,ce,ue){if(null!==(!0===ce.isScene?ce.overrideMaterial:null))return;void 0===v.state.transmissionRenderTarget[ue.id]&&(v.state.transmissionRenderTarget[ue.id]=new Mu(1,1,{generateMipmaps:!0,type:Ne.has("EXT_color_buffer_half_float")||Ne.has("EXT_color_buffer_float")?Jm:ed,minFilter:xl,samples:4,stencilBuffer:s,resolveDepthBuffer:!1,resolveStencilBuffer:!1,colorSpace:ei.workingColorSpace}));const je=v.state.transmissionRenderTarget[ue.id],at=ue.viewport||A;je.setSize(at.z,at.w);const Mt=x.getRenderTarget();x.setRenderTarget(je),x.getClearColor(ne),oe=x.getClearAlpha(),oe<1&&x.setClearColor(16777215,.5),x.clear(),St&&ft.render(ce);const Ct=x.toneMapping;x.toneMapping=bu;const Kt=ue.viewport;if(void 0!==ue.viewport&&(ue.viewport=void 0),v.setupLightsView(ue),!0===le&&bn.setGlobalState(x.clippingPlanes,ue),bE(L,ce,ue),_t.updateMultisampleRenderTarget(je),_t.updateRenderTargetMipmap(je),!1===Ne.has("WEBGL_multisampled_render_to_texture")){let an=!1;for(let Zt=0,li=K.length;Zt0)for(let at=0,Mt=je.length;at0&&m8(ue,te,L,K),St&&ft.render(L),p8(b,L,K);null!==k&&(_t.updateMultisampleRenderTarget(k),_t.updateRenderTargetMipmap(k)),!0===L.isScene&&L.onAfterRender(x,L,K),Pn.resetDefaultState(),B=-1,T=null,M.pop(),M.length>0?(v=M[M.length-1],!0===le&&bn.setGlobalState(x.clippingPlanes,v.state.camera)):v=null,y.pop(),b=y.length>0?y[y.length-1]:null},this.getActiveCubeFace=function(){return F},this.getActiveMipmapLevel=function(){return D},this.getRenderTarget=function(){return k},this.setRenderTargetTextures=function(L,K,ce){rt.get(L.texture).__webglTexture=K,rt.get(L.depthTexture).__webglTexture=ce;const ue=rt.get(L);ue.__hasExternalTextures=!0,ue.__autoAllocateDepthBuffer=void 0===ce,ue.__autoAllocateDepthBuffer||!0===Ne.has("WEBGL_multisampled_render_to_texture")&&(console.warn("THREE.WebGLRenderer: Render-to-texture extension was disabled because an external texture was provided"),ue.__useRenderToTexture=!1)},this.setRenderTargetFramebuffer=function(L,K){const ce=rt.get(L);ce.__webglFramebuffer=K,ce.__useDefaultFramebuffer=void 0===K},this.setRenderTarget=function(L,K=0,ce=0){k=L,F=K,D=ce;let ue=!0,te=null,je=!1,at=!1;if(L){const Ct=rt.get(L);void 0!==Ct.__useDefaultFramebuffer?(Me.bindFramebuffer(N.FRAMEBUFFER,null),ue=!1):void 0===Ct.__webglFramebuffer?_t.setupRenderTarget(L):Ct.__hasExternalTextures&&_t.rebindTextures(L,rt.get(L.texture).__webglTexture,rt.get(L.depthTexture).__webglTexture);const Kt=L.texture;(Kt.isData3DTexture||Kt.isDataArrayTexture||Kt.isCompressedArrayTexture)&&(at=!0);const an=rt.get(L).__webglFramebuffer;L.isWebGLCubeRenderTarget?(te=Array.isArray(an[K])?an[K][ce]:an[K],je=!0):te=L.samples>0&&!1===_t.useMultisampledRTT(L)?rt.get(L).__webglMultisampledFramebuffer:Array.isArray(an)?an[ce]:an,A.copy(L.viewport),W.copy(L.scissor),ie=L.scissorTest}else A.copy(Ve).multiplyScalar(se).floor(),W.copy(Ye).multiplyScalar(se).floor(),ie=Rt;if(Me.bindFramebuffer(N.FRAMEBUFFER,te)&&ue&&Me.drawBuffers(L,te),Me.viewport(A),Me.scissor(W),Me.setScissorTest(ie),je){const Ct=rt.get(L.texture);N.framebufferTexture2D(N.FRAMEBUFFER,N.COLOR_ATTACHMENT0,N.TEXTURE_CUBE_MAP_POSITIVE_X+K,Ct.__webglTexture,ce)}else if(at){const Ct=rt.get(L.texture);N.framebufferTextureLayer(N.FRAMEBUFFER,N.COLOR_ATTACHMENT0,Ct.__webglTexture,ce||0,K||0)}B=-1},this.readRenderTargetPixels=function(L,K,ce,ue,te,je,at){if(!L||!L.isWebGLRenderTarget)return void console.error("THREE.WebGLRenderer.readRenderTargetPixels: renderTarget is not THREE.WebGLRenderTarget.");let Mt=rt.get(L).__webglFramebuffer;if(L.isWebGLCubeRenderTarget&&void 0!==at&&(Mt=Mt[at]),Mt){Me.bindFramebuffer(N.FRAMEBUFFER,Mt);try{const Ct=L.texture,Kt=Ct.format,an=Ct.type;if(!it.textureFormatReadable(Kt))return void console.error("THREE.WebGLRenderer.readRenderTargetPixels: renderTarget is not in RGBA or implementation defined format.");if(!it.textureTypeReadable(an))return void console.error("THREE.WebGLRenderer.readRenderTargetPixels: renderTarget is not in UnsignedByteType or implementation defined type.");K>=0&&K<=L.width-ue&&ce>=0&&ce<=L.height-te&&N.readPixels(K,ce,ue,te,vn.convert(Kt),vn.convert(an),je)}finally{const Ct=null!==k?rt.get(k).__webglFramebuffer:null;Me.bindFramebuffer(N.FRAMEBUFFER,Ct)}}},this.readRenderTargetPixelsAsync=function(){var L=nt(function*(K,ce,ue,te,je,at,Mt){if(!K||!K.isWebGLRenderTarget)throw new Error("THREE.WebGLRenderer.readRenderTargetPixels: renderTarget is not THREE.WebGLRenderTarget.");let Ct=rt.get(K).__webglFramebuffer;if(K.isWebGLCubeRenderTarget&&void 0!==Mt&&(Ct=Ct[Mt]),Ct){Me.bindFramebuffer(N.FRAMEBUFFER,Ct);try{const Kt=K.texture,an=Kt.format,Zt=Kt.type;if(!it.textureFormatReadable(an))throw new Error("THREE.WebGLRenderer.readRenderTargetPixelsAsync: renderTarget is not in RGBA or implementation defined format.");if(!it.textureTypeReadable(Zt))throw new Error("THREE.WebGLRenderer.readRenderTargetPixelsAsync: renderTarget is not in UnsignedByteType or implementation defined type.");if(ce>=0&&ce<=K.width-te&&ue>=0&&ue<=K.height-je){const li=N.createBuffer();N.bindBuffer(N.PIXEL_PACK_BUFFER,li),N.bufferData(N.PIXEL_PACK_BUFFER,at.byteLength,N.STREAM_READ),N.readPixels(ce,ue,te,je,vn.convert(an),vn.convert(Zt),0),N.flush();const Li=N.fenceSync(N.SYNC_GPU_COMMANDS_COMPLETE,0);yield function dae(i,t,e){return new Promise(function(n,r){setTimeout(function s(){switch(i.clientWaitSync(t,i.SYNC_FLUSH_COMMANDS_BIT,0)){case i.WAIT_FAILED:r();break;case i.TIMEOUT_EXPIRED:setTimeout(s,e);break;default:n()}},e)})}(N,Li,4);try{N.bindBuffer(N.PIXEL_PACK_BUFFER,li),N.getBufferSubData(N.PIXEL_PACK_BUFFER,0,at)}finally{N.deleteBuffer(li),N.deleteSync(Li)}return at}}finally{const Kt=null!==k?rt.get(k).__webglFramebuffer:null;Me.bindFramebuffer(N.FRAMEBUFFER,Kt)}}});return function(K,ce,ue,te,je,at,Mt){return L.apply(this,arguments)}}(),this.copyFramebufferToTexture=function(L,K=null,ce=0){!0!==L.isTexture&&(cg("WebGLRenderer: copyFramebufferToTexture function signature has changed."),K=arguments[0]||null,L=arguments[1]);const ue=Math.pow(2,-ce),te=Math.floor(L.image.width*ue),je=Math.floor(L.image.height*ue),at=null!==K?K.x:0,Mt=null!==K?K.y:0;_t.setTexture2D(L,0),N.copyTexSubImage2D(N.TEXTURE_2D,ce,0,0,at,Mt,te,je),Me.unbindTexture()},this.copyTextureToTexture=function(L,K,ce=null,ue=null,te=0){let je,at,Mt,Ct,Kt,an;!0!==L.isTexture&&(cg("WebGLRenderer: copyTextureToTexture function signature has changed."),ue=arguments[0]||null,L=arguments[1],K=arguments[2],te=arguments[3]||0,ce=null),null!==ce?(je=ce.max.x-ce.min.x,at=ce.max.y-ce.min.y,Mt=ce.min.x,Ct=ce.min.y):(je=L.image.width,at=L.image.height,Mt=0,Ct=0),null!==ue?(Kt=ue.x,an=ue.y):(Kt=0,an=0);const Zt=vn.convert(K.format),li=vn.convert(K.type);_t.setTexture2D(K,0),N.pixelStorei(N.UNPACK_FLIP_Y_WEBGL,K.flipY),N.pixelStorei(N.UNPACK_PREMULTIPLY_ALPHA_WEBGL,K.premultiplyAlpha),N.pixelStorei(N.UNPACK_ALIGNMENT,K.unpackAlignment);const Li=N.getParameter(N.UNPACK_ROW_LENGTH),ir=N.getParameter(N.UNPACK_IMAGE_HEIGHT),ca=N.getParameter(N.UNPACK_SKIP_PIXELS),fi=N.getParameter(N.UNPACK_SKIP_ROWS),kt=N.getParameter(N.UNPACK_SKIP_IMAGES),fs=L.isCompressedTexture?L.mipmaps[te]:L.image;N.pixelStorei(N.UNPACK_ROW_LENGTH,fs.width),N.pixelStorei(N.UNPACK_IMAGE_HEIGHT,fs.height),N.pixelStorei(N.UNPACK_SKIP_PIXELS,Mt),N.pixelStorei(N.UNPACK_SKIP_ROWS,Ct),L.isDataTexture?N.texSubImage2D(N.TEXTURE_2D,te,Kt,an,je,at,Zt,li,fs.data):L.isCompressedTexture?N.compressedTexSubImage2D(N.TEXTURE_2D,te,Kt,an,fs.width,fs.height,Zt,fs.data):N.texSubImage2D(N.TEXTURE_2D,te,Kt,an,je,at,Zt,li,fs),N.pixelStorei(N.UNPACK_ROW_LENGTH,Li),N.pixelStorei(N.UNPACK_IMAGE_HEIGHT,ir),N.pixelStorei(N.UNPACK_SKIP_PIXELS,ca),N.pixelStorei(N.UNPACK_SKIP_ROWS,fi),N.pixelStorei(N.UNPACK_SKIP_IMAGES,kt),0===te&&K.generateMipmaps&&N.generateMipmap(N.TEXTURE_2D),Me.unbindTexture()},this.copyTextureToTexture3D=function(L,K,ce=null,ue=null,te=0){let je,at,Mt,Ct,Kt,an,Zt,li,Li;!0!==L.isTexture&&(cg("WebGLRenderer: copyTextureToTexture3D function signature has changed."),ce=arguments[0]||null,ue=arguments[1]||null,L=arguments[2],K=arguments[3],te=arguments[4]||0);const ir=L.isCompressedTexture?L.mipmaps[te]:L.image;null!==ce?(je=ce.max.x-ce.min.x,at=ce.max.y-ce.min.y,Mt=ce.max.z-ce.min.z,Ct=ce.min.x,Kt=ce.min.y,an=ce.min.z):(je=ir.width,at=ir.height,Mt=ir.depth,Ct=0,Kt=0,an=0),null!==ue?(Zt=ue.x,li=ue.y,Li=ue.z):(Zt=0,li=0,Li=0);const ca=vn.convert(K.format),fi=vn.convert(K.type);let kt;if(K.isData3DTexture)_t.setTexture3D(K,0),kt=N.TEXTURE_3D;else{if(!K.isDataArrayTexture&&!K.isCompressedArrayTexture)return void console.warn("THREE.WebGLRenderer.copyTextureToTexture3D: only supports THREE.DataTexture3D and THREE.DataTexture2DArray.");_t.setTexture2DArray(K,0),kt=N.TEXTURE_2D_ARRAY}N.pixelStorei(N.UNPACK_FLIP_Y_WEBGL,K.flipY),N.pixelStorei(N.UNPACK_PREMULTIPLY_ALPHA_WEBGL,K.premultiplyAlpha),N.pixelStorei(N.UNPACK_ALIGNMENT,K.unpackAlignment);const fs=N.getParameter(N.UNPACK_ROW_LENGTH),pi=N.getParameter(N.UNPACK_IMAGE_HEIGHT),Al=N.getParameter(N.UNPACK_SKIP_PIXELS),qg=N.getParameter(N.UNPACK_SKIP_ROWS),da=N.getParameter(N.UNPACK_SKIP_IMAGES);N.pixelStorei(N.UNPACK_ROW_LENGTH,ir.width),N.pixelStorei(N.UNPACK_IMAGE_HEIGHT,ir.height),N.pixelStorei(N.UNPACK_SKIP_PIXELS,Ct),N.pixelStorei(N.UNPACK_SKIP_ROWS,Kt),N.pixelStorei(N.UNPACK_SKIP_IMAGES,an),L.isDataTexture||L.isData3DTexture?N.texSubImage3D(kt,te,Zt,li,Li,je,at,Mt,ca,fi,ir.data):K.isCompressedArrayTexture?N.compressedTexSubImage3D(kt,te,Zt,li,Li,je,at,Mt,ca,ir.data):N.texSubImage3D(kt,te,Zt,li,Li,je,at,Mt,ca,fi,ir),N.pixelStorei(N.UNPACK_ROW_LENGTH,fs),N.pixelStorei(N.UNPACK_IMAGE_HEIGHT,pi),N.pixelStorei(N.UNPACK_SKIP_PIXELS,Al),N.pixelStorei(N.UNPACK_SKIP_ROWS,qg),N.pixelStorei(N.UNPACK_SKIP_IMAGES,da),0===te&&K.generateMipmaps&&N.generateMipmap(kt),Me.unbindTexture()},this.initRenderTarget=function(L){void 0===rt.get(L).__webglFramebuffer&&_t.setupRenderTarget(L)},this.initTexture=function(L){L.isCubeTexture?_t.setTextureCube(L,0):L.isData3DTexture?_t.setTexture3D(L,0):L.isDataArrayTexture||L.isCompressedArrayTexture?_t.setTexture2DArray(L,0):_t.setTexture2D(L,0),Me.unbindTexture()},this.resetState=function(){F=0,D=0,k=null,Me.reset(),Pn.reset()},typeof __THREE_DEVTOOLS__<"u"&&__THREE_DEVTOOLS__.dispatchEvent(new CustomEvent("observe",{detail:this}))}get coordinateSystem(){return td}get outputColorSpace(){return this._outputColorSpace}set outputColorSpace(t){this._outputColorSpace=t;const e=this.getContext();e.drawingBufferColorSpace=t===Yk?"display-p3":"srgb",e.unpackColorSpace=ei.workingColorSpace===LC?"display-p3":"srgb"}}class Pb extends Fr{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 rd,this.environmentIntensity=1,this.environmentRotation=new rd,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 DP{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=na()}onUploadCallback(){}set needsUpdate(t){!0===t&&this.version++}get updateRange(){return cg("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;r0){const r=e[n[0]];if(void 0!==r){this.morphTargetInfluences=[],this.morphTargetDictionary={};for(let s=0,o=r.length;sn)return;LP.applyMatrix4(i.matrixWorld);const l=t.ray.origin.distanceTo(LP);return lt.far?void 0:{distance:l,point:Z5.clone().applyMatrix4(i.matrixWorld),index:r,face:null,faceIndex:null,object:i}}const Q5=new O,J5=new O;class Ng extends mf{constructor(t,e){super(t,e),this.isLineSegments=!0,this.type="LineSegments"}computeLineDistances(){const t=this.geometry;if(null===t.index){const e=t.attributes.position,n=[];for(let r=0,s=e.count;r0){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 uc{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 d=n[r];return(r+(o-d)/(n[r+1]-d))/(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 xe:new O);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 O,r=[],s=[],o=[],a=new O,l=new Bt;for(let m=0;m<=t;m++)r[m]=this.getTangentAt(m/t,new O);s[0]=new O,o[0]=new O;let c=Number.MAX_VALUE;const d=Math.abs(r[0].x),h=Math.abs(r[0].y),p=Math.abs(r[0].z);d<=c&&(c=d,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(tr(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(tr(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 BP extends uc{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 xe){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(i$(a,l.x,c.x,d.x,h.x),i$(a,l.y,c.y,d.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]:(DS.subVectors(r[0],r[1]).add(r[0]),c=DS);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 d=c.getPoint(1);return this.currentPoint.copy(d),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 RS extends hn{constructor(t=[new xe(0,-.5),new xe(.5,0),new xe(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=tr(r,0,2*Math.PI);const s=[],o=[],a=[],l=[],c=[],d=1/e,h=new O,p=new xe,m=new O,g=new O,b=new O;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*d*r,C=Math.sin(x),F=Math.cos(x);for(let D=0;D<=t.length-1;D++)h.x=t[D].x*C,h.y=t[D].y,h.z=t[D].x*F,o.push(h.x,h.y,h.z),p.x=M/e,p.y=D/(t.length-1),a.push(p.x,p.y),c.push(l[3*D+0]*C,l[3*D+1],l[3*D+0]*F)}for(let M=0;M0&&x(!0),e>0&&x(!1)),this.setIndex(d),this.setAttribute("position",new ht(h,3)),this.setAttribute("normal",new ht(p,3)),this.setAttribute("uv",new ht(m,2))}copy(t){return super.copy(t),this.parameters=Object.assign({},t.parameters),this}static fromJSON(t){return new Bg(t.radiusTop,t.radiusBottom,t.height,t.radialSegments,t.heightSegments,t.openEnded,t.thetaStart,t.thetaLength)}}class PS extends Bg{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 PS(t.radius,t.height,t.radialSegments,t.heightSegments,t.openEnded,t.thetaStart,t.thetaLength)}}class Yb 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 d=[],h=new O,p=new O,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 F=0;F<=e;F++){const D=F/e;h.x=-t*Math.cos(r+D*s)*Math.sin(o+x*a),h.y=t*Math.cos(o+x*a),h.z=t*Math.sin(r+D*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(D+C,1-x),M.push(c++)}d.push(M)}for(let y=0;y0)&&m.push(d[y][M+1],C,D),(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 dispersion(){return this._dispersion}set dispersion(t){this._dispersion>0!=t>0&&this.version++,this._dispersion=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.dispersion=t.dispersion,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 zS extends Fo{constructor(t){super(),this.isMeshPhongMaterial=!0,this.type="MeshPhongMaterial",this.color=new qe(16777215),this.specular=new qe(1118481),this.shininess=30,this.map=null,this.lightMap=null,this.lightMapIntensity=1,this.aoMap=null,this.aoMapIntensity=1,this.emissive=new qe(0),this.emissiveIntensity=1,this.emissiveMap=null,this.bumpMap=null,this.bumpScale=1,this.normalMap=null,this.normalMapType=Jh,this.normalScale=new xe(1,1),this.displacementMap=null,this.displacementScale=1,this.displacementBias=0,this.specularMap=null,this.alphaMap=null,this.envMap=null,this.envMapRotation=new rd,this.combine=EC,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 v$(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 nO(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 iO(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 Xb{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 _$(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}}hc.prototype.TimeBufferType=Float32Array,hc.prototype.ValueBufferType=Float32Array,hc.prototype.DefaultInterpolation=xb;class zg extends hc{constructor(t,e,n){super(t,e,n)}}zg.prototype.ValueTypeName="bool",zg.prototype.ValueBufferType=Array,zg.prototype.DefaultInterpolation=bb,zg.prototype.InterpolantFactoryMethodLinear=void 0,zg.prototype.InterpolantFactoryMethodSmooth=void 0;class b$ extends hc{}b$.prototype.ValueTypeName="color";class Hg extends hc{}Hg.prototype.ValueTypeName="number";class Whe extends Xb{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 d=c+a;c!==d;c+=4)fo.slerpFlat(s,0,o,c-a,o,c,l);return s}}class $g extends hc{InterpolantFactoryMethodLinear(t){return new Whe(this.times,this.values,this.getValueSize(),t)}}$g.prototype.ValueTypeName="quaternion",$g.prototype.InterpolantFactoryMethodSmooth=void 0;class Gg extends hc{constructor(t,e,n){super(t,e,n)}}Gg.prototype.ValueTypeName="string",Gg.prototype.ValueBufferType=Array,Gg.prototype.DefaultInterpolation=bb,Gg.prototype.InterpolantFactoryMethodLinear=void 0,Gg.prototype.InterpolantFactoryMethodSmooth=void 0;class Wg extends hc{}Wg.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=na(),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(Yhe(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(hc.toJSON(n[s]));return r}static CreateFromMorphTargetSequence(t,e,n,r){const s=e.length,o=[];for(let a=0;a1){const h=d[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=[];iO(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:w$,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 ud={};class qhe extends Error{constructor(t,e){super(t),this.response=e}}class Ba extends bf{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=ku.get(t);if(void 0!==s)return this.manager.itemStart(t),setTimeout(()=>{e&&e(s),this.manager.itemEnd(t)},0),s;if(void 0!==ud[t])return void ud[t].push({onLoad:e,onProgress:n,onError:r});ud[t]=[],ud[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 d=ud[t],h=c.body.getReader(),p=c.headers.get("X-File-Size")||c.headers.get("Content-Length"),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 F=new ProgressEvent("progress",{lengthComputable:g,loaded:b,total:m});for(let D=0,k=d.length;D{y.error(x)})}()}});return new Response(v)}throw new qhe(`fetch for "${c.url}" responded with ${c.status}: ${c.statusText}`,c)}).then(c=>{switch(l){case"arraybuffer":return c.arrayBuffer();case"blob":return c.blob();case"document":return c.text().then(d=>(new DOMParser).parseFromString(d,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=>{ku.add(t,c);const d=ud[t];delete ud[t];for(let h=0,p=d.length;h{const d=ud[t];if(void 0===d)throw this.manager.itemError(t),c;delete ud[t];for(let h=0,p=d.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 HS extends bf{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=ku.get(t);if(void 0!==o)return s.manager.itemStart(t),setTimeout(function(){e&&e(o),s.manager.itemEnd(t)},0),o;const a=Mb("img");function l(){d(),ku.add(t,this),e&&e(this),s.manager.itemEnd(t)}function c(h){d(),r&&r(h),s.manager.itemError(t),s.manager.itemEnd(t)}function d(){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 Pu extends bf{constructor(t){super(t)}load(t,e,n,r){const s=new Oo,o=new HS(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 $S extends Fr{constructor(t,e=1){super(),this.isLight=!0,this.type="Light",this.color=new qe(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()),void 0!==this.target&&(e.object.target=this.target.uuid),e}}const rO=new Bt,M$=new O,C$=new O;class sO{constructor(t){this.camera=t,this.intensity=1,this.bias=0,this.normalBias=0,this.radius=1,this.blurSamples=8,this.mapSize=new xe(512,512),this.map=null,this.mapPass=null,this.matrix=new Bt,this.autoUpdate=!0,this.needsUpdate=!1,this._frustum=new aS,this._frameExtents=new xe(1,1),this._viewportCount=1,this._viewports=[new vi(0,0,1,1)]}getViewportCount(){return this._viewportCount}getFrustum(){return this._frustum}updateMatrices(t){const e=this.camera,n=this.matrix;M$.setFromMatrixPosition(t.matrixWorld),e.position.copy(M$),C$.setFromMatrixPosition(t.target.matrixWorld),e.lookAt(C$),e.updateMatrixWorld(),rO.multiplyMatrices(e.projectionMatrix,e.matrixWorldInverse),this._frustum.setFromProjectionMatrix(rO),n.set(.5,0,0,.5,0,.5,0,.5,0,0,.5,.5,0,0,0,1),n.multiply(rO)}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.intensity=t.intensity,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 1!==this.intensity&&(t.intensity=this.intensity),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 Khe extends sO{constructor(){super(new br(50,1,.5,500)),this.isSpotLightShadow=!0,this.focus=1}updateMatrices(t){const e=this.camera,n=2*ag*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 S$ extends $S{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(Fr.DEFAULT_UP),this.updateMatrix(),this.target=new Fr,this.distance=n,this.angle=r,this.penumbra=s,this.decay=o,this.map=null,this.shadow=new Khe}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 E$=new Bt,Zb=new O,oO=new O;class Zhe extends sO{constructor(){super(new br(90,1,.5,500)),this.isPointLightShadow=!0,this._frameExtents=new xe(4,2),this._viewportCount=6,this._viewports=[new vi(2,1,1,1),new vi(0,1,1,1),new vi(3,1,1,1),new vi(1,1,1,1),new vi(3,0,1,1),new vi(1,0,1,1)],this._cubeDirections=[new O(1,0,0),new O(-1,0,0),new O(0,0,1),new O(0,0,-1),new O(0,1,0),new O(0,-1,0)],this._cubeUps=[new O(0,1,0),new O(0,1,0),new O(0,1,0),new O(0,1,0),new O(0,0,1),new O(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()),Zb.setFromMatrixPosition(t.matrixWorld),n.position.copy(Zb),oO.copy(n.position),oO.add(this._cubeDirections[e]),n.up.copy(this._cubeUps[e]),n.lookAt(oO),n.updateMatrixWorld(),r.makeTranslation(-Zb.x,-Zb.y,-Zb.z),E$.multiplyMatrices(n.projectionMatrix,n.matrixWorldInverse),this._frustum.setFromProjectionMatrix(E$)}}class A$ extends $S{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 Zhe}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 Qhe extends sO{constructor(){super(new Rb(-5,5,5,-5,.5,500)),this.isDirectionalLightShadow=!0}}class D$ extends $S{constructor(t,e){super(t,e),this.isDirectionalLight=!0,this.type="DirectionalLight",this.position.copy(Fr.DEFAULT_UP),this.updateMatrix(),this.target=new Fr,this.shadow=new Qhe}dispose(){this.shadow.dispose()}copy(t){return super.copy(t),this.target=t.target.clone(),this.shadow=t.shadow.clone(),this}}class GS extends $S{constructor(t,e){super(t,e),this.isAmbientLight=!0,this.type="AmbientLight"}}class Ou{static decodeText(t){if(console.warn("THREE.LoaderUtils: decodeText() has been deprecated with r165 and will be removed with r175. Use TextDecoder instead."),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=ku.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 ku.add(t,c),e&&e(c),s.manager.itemEnd(t),c}).catch(function(c){r&&r(c),ku.remove(t),s.manager.itemError(t),s.manager.itemEnd(t)});ku.add(t,l),s.manager.itemStart(t)}}class O${constructor(t=!0){this.autoStart=t,this.startTime=0,this.oldTime=0,this.elapsedTime=0,this.running=!1}start(){this.startTime=F$(),this.oldTime=this.startTime,this.elapsedTime=0,this.running=!0}stop(){this.getElapsedTime(),this.running=!1,this.autoStart=!1}getElapsedTime(){return this.getDelta(),this.elapsedTime}getDelta(){let t=0;if(this.autoStart&&!this.running)return this.start(),0;if(this.running){const e=F$();t=(e-this.oldTime)/1e3,this.oldTime=e,this.elapsedTime+=t}return t}}function F$(){return(typeof performance>"u"?Date:performance).now()}const lO="\\[\\]\\.:\\/",cfe=new RegExp("["+lO+"]","g"),cO="[^"+lO+"]",dfe="[^"+lO.replace("\\.","")+"]",mfe=new RegExp("^"+/((?:WC+[\/:])*)/.source.replace("WC",cO)+/(WCOD+)?/.source.replace("WCOD",dfe)+/(?:\.(WC+)(?:\[(.+)\])?)?/.source.replace("WC",cO)+/\.(WC+)(?:\[(.+)\])?/.source.replace("WC",cO)+"$"),gfe=["material","materials","bones","map"];class _fe{constructor(t,e,n){const r=n||Ri.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 Ri=(()=>{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(cfe,"")}static parseTrackName(e){const n=mfe.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!==gfe.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;an.name===t||n.userData.name===t);return e?(e.removeFromParent(),new sa(e)):null}getBoundings(){return(new Vs).setFromObject(this.nativeMesh)}clone(){return new sa(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 Mn&&this.disposeMesh(t)}),this.nativeMesh instanceof Mn&&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 wfe extends sa{get supportsFov(){return this.nativeCamera instanceof br||"PerspectiveCamera"==this.nativeCamera.type}get fov(){return this.nativeCamera.fov||NaN}set fov(t){this.supportsFov&&(this.nativeCamera.fov=t,this.nativeCamera.updateProjectionMatrix())}constructor(t){super(t),this.nativeCamera=t}}class Mfe extends Gse{createMaterial(t){let e={};t.color?e={color:t.color}:t.diffuse||(e={color:super.randomColor()});let n=t.shading||"unlit";switch(n){case"unlit":return new qi(Object.assign(Object.assign({},e),{map:t.diffuse||null}));case"standart":return new qb(Object.assign(Object.assign({},e),{map:t.diffuse||null}));case"phong":return new zS(Object.assign(Object.assign({},e),{map:t.diffuse||null}));case"wireframe":return new qi(Object.assign(Object.assign({},e),{wireframe:!0}));default:throw new Error(`"${n}" shading not implemented for three.js`)}}transformPrimitiveZUp(t){t.geometry.rotateX(Math.PI/2)}createPrimitive(t,e={}){var n,r,s,o;let a=null,l=this.createMaterial(e);switch(t.shape){case"PLANE":a=new Mn(new Iu((null===(n=t.dimensions)||void 0===n?void 0:n.x)||1e4,(null===(r=t.dimensions)||void 0===r?void 0:r.y)||1e4,null===(s=t.segments)||void 0===s?void 0:s.x,null===(o=t.segments)||void 0===o?void 0:o.y),l);break;case"BOX":a=new Mn(new sf(...Re.spr(t.dimensions),...t.segments?Re.spr(t.segments):[]),l);break;case"CAPSULE":a=new Mn(new kS(t.radius,t.centersDistance,t.capSegments,t.radialSegments),l),this.transformPrimitiveZUp(a);break;case"CYLINDER":a=new Mn(new Bg(t.radius,t.radius,t.height,t.radialSegments,t.heightSegments),l),this.transformPrimitiveZUp(a);break;case"CONE":a=new Mn(new PS(t.radius,t.height,t.radialSegments,t.heightSegments),l),this.transformPrimitiveZUp(a);break;case"SPHERE":a=new Mn(new Yb(t.radius,t.widthSegments,t.heightSegments),l),this.transformPrimitiveZUp(a);break;case"COMPOUND":a=new No;for(const{position:d,rotation:h,shape:p}of t.children){const m=this.createPrimitive(p,e).nativeMesh;d&&m.position.set(...Re.spr(d)),h&&m.quaternion.set(...Yi.spr(h)),a.add(m)}break;case"MESH":const c=new hn;c.setFromPoints(t.vertices.map(d=>new O(...Re.spr(d)))),c.setIndex(t.faces.reduce((d,h)=>(d.push(...h),d),[])),a=new Mn(c,l)}if(!a)throw new Error(`Primitive with shape "${t.shape}" not implemented`);return void 0!==e.castShadow&&(a.castShadow=e.castShadow),void 0!==e.receiveShadow&&(a.receiveShadow=e.receiveShadow),new sa(a)}createPerspectiveCamera(t={}){return new wfe(new br(t.fov||75,t.aspectRatio||1,t.frustrum?t.frustrum.near:1,t.frustrum?t.frustrum.far:1e4))}}function Q$(i,t){if(t===Ooe)return console.warn("THREE.BufferGeometryUtils.toTrianglesDrawMode(): Geometry already defined as triangles."),i;if(t===jk||t===C4){let e=i.getIndex();if(null===e){const o=[],a=i.getAttribute("position");if(void 0===a)return console.error("THREE.BufferGeometryUtils.toTrianglesDrawMode(): Undefined position attribute. Processing not possible."),i;for(let l=0;l=2.0 are supported.")));const c=new ipe(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 d=0;d=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 Sfe(){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 Bn={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_DISPERSION:"KHR_materials_dispersion",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 Efe{constructor(t){this.parser=t,this.name=Bn.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 Vfe{constructor(t){this.parser=t,this.name=Bn.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 zfe{constructor(t){this.parser=t,this.name=Bn.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 Hfe{constructor(t){this.name=Bn.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 d=r.count,h=r.byteStride,p=new Uint8Array(a,r.byteOffset||0,r.byteLength||0);return o.decodeGltfBufferAsync?o.decodeGltfBufferAsync(d,h,p,r.mode,r.filter).then(function(m){return m.buffer}):o.ready.then(function(){const m=new ArrayBuffer(d*h);return o.decodeGltfBuffer(new Uint8Array(m),d,h,p,r.mode,r.filter),m})})}return null}}class $fe{constructor(t){this.name=Bn.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!==Ua.TRIANGLES&&c.mode!==Ua.TRIANGLE_STRIP&&c.mode!==Ua.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(d=>(l[c]=d,l[c])));return a.length<1?null:(a.push(this.parser.createNodeMesh(t)),Promise.all(a).then(c=>{const d=c.pop(),h=d.isGroup?d.children:[d],p=c[0].count,m=[];for(const g of h){const b=new Bt,v=new O,y=new fo,M=new O(1,1,1),x=new Y5(g.geometry,g.material,p);for(let C=0;C-1,o=s?a.match(/Firefox\/([0-9]+)\./)[1]:-1}this.textureLoader=typeof createImageBitmap>"u"||n&&r<17||s&&o<98?new Pu(this.options.manager):new sfe(this.options.manager),this.textureLoader.setCrossOrigin(this.options.crossOrigin),this.textureLoader.setRequestHeader(this.options.requestHeader),this.fileLoader=new Ba(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 Ef(s,a,r),hd(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,d]of o.children.entries())s(d,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(T,D[k*l+1]),l>=3&&v.setZ(T,D[k*l+2]),l>=4&&v.setW(T,D[k*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(d){d.flipY=!1,d.name=o.name||a.name||"",""===d.name&&"string"==typeof a.uri&&!1===a.uri.startsWith("data:image/")&&(d.name=a.uri);const p=(s.samplers||{})[o.sampler]||{};return d.magFilter=nG[p.magFilter]||cr,d.minFilter=nG[p.minFilter]||xl,d.wrapS=iG[p.wrapS]||Bs,d.wrapT=iG[p.wrapT]||Bs,r.associations.set(d,{textures:t}),d}).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 d=Promise.resolve(l).then(function(h){return new Promise(function(p,m){let g=p;!0===e.isImageBitmapLoader&&(g=function(b){const v=new Oo(b);v.needsUpdate=!0,p(v)}),e.load(Ou.resolveURL(h,s.path),g,void 0,m)})}).then(function(h){return!0===c&&a.revokeObjectURL(l),hd(h,o),h.userData.mimeType=o.mimeType||function tpe(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]=d,d}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[Bn.KHR_TEXTURE_TRANSFORM]){const a=void 0!==n.extensions?n.extensions[Bn.KHR_TEXTURE_TRANSFORM]:void 0;if(a){const l=s.associations.get(o);o=s.extensions[Bn.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,Fo.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 us,Fo.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 qb}loadMaterial(t){const e=this,r=this.extensions,s=this.json.materials[t];let o;const a={},c=[];if((s.extensions||{})[Bn.KHR_MATERIALS_UNLIT]){const h=r[Bn.KHR_MATERIALS_UNLIT];o=h.getMaterialType(),c.push(h.extendParams(a,s,e))}else{const h=s.pbrMetallicRoughness||{};if(a.color=new qe(1,1,1),a.opacity=1,Array.isArray(h.baseColorFactor)){const p=h.baseColorFactor;a.color.setRGB(p[0],p[1],p[2],ds),a.opacity=p[3]}void 0!==h.baseColorTexture&&c.push(e.assignTexture(a,"map",h.baseColorTexture,cs)),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=Ns);const d=s.alphaMode||"OPAQUE";if("BLEND"===d?(a.transparent=!0,a.depthWrite=!1):(a.transparent=!1,"MASK"===d&&(a.alphaTest=void 0!==s.alphaCutoff?s.alphaCutoff:.5)),void 0!==s.normalTexture&&o!==qi&&(c.push(e.assignTexture(a,"normalMap",s.normalTexture)),a.normalScale=new xe(1,1),void 0!==s.normalTexture.scale)){const h=s.normalTexture.scale;a.normalScale.set(h,h)}if(void 0!==s.occlusionTexture&&o!==qi&&(c.push(e.assignTexture(a,"aoMap",s.occlusionTexture)),void 0!==s.occlusionTexture.strength&&(a.aoMapIntensity=s.occlusionTexture.strength)),void 0!==s.emissiveFactor&&o!==qi){const h=s.emissiveFactor;a.emissive=(new qe).setRGB(h[0],h[1],h[2],ds)}return void 0!==s.emissiveTexture&&o!==qi&&c.push(e.assignTexture(a,"emissiveMap",s.emissiveTexture,cs)),Promise.all(c).then(function(){const h=new o(a);return s.name&&(h.name=s.name),hd(h,s),e.associations.set(h,{materials:t}),s.extensions&&Ef(r,h,s),h})}createUniqueName(t){const e=Ri.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[Bn.KHR_DRACO_MESH_COMPRESSION].decodePrimitive(a,e).then(function(l){return rG(l,a,e)})}const o=[];for(let a=0,l=t.length;a0&&Jfe(y,s),y.name=e.createUniqueName(s.name||"mesh_"+t),hd(y,s),v.extensions&&Ef(r,y,v),e.assignFinalMaterial(y),h.push(y)}for(let m=0,g=h.length;m1?new No:1===c.length?c[0]:new Fr,d!==c[0])for(let h=0,p=c.length;h{const h=new Map;for(const[p,m]of r.associations)(p instanceof Fo||p instanceof Oo)&&h.set(p,m);return d.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(Lu[s.path]===Lu.weights?t.traverse(function(p){p.morphTargetInfluences&&l.push(p.name?p.name:p.uuid)}):l.push(a),Lu[s.path]){case Lu.weights:c=Hg;break;case Lu.rotation:c=$g;break;case Lu.position:case Lu.scale:c=Wg;break;default:c=1===n.itemSize?Hg:Wg}const d=void 0!==r.interpolation?Kfe[r.interpolation]:xb,h=this._getArrayFromAccessor(n);for(let p=0,m=l.length;p{r.type.endsWith("Light")&&(console.warn("WORKAROUND: light intensity from GLB divided by 200."),r.intensity*=.005)}),new sa(n.scene)})}}const go=(i,t)=>Array(i).fill(null).map((e,n)=>t(n));class Af{static startDebugView(t,e){let n=this.activeDebugViews.get(t);return n?n.renderers.includes(e)||n.renderers.push(e):(n={view:new Af(t),renderers:[e]},this.activeDebugViews.set(t,n)),n.view}static stopDebugView(t,e){const n=t.world,r=this.activeDebugViews.get(n);r&&(r.renderers=r.renderers.filter(s=>s!==e),0===r.renderers.length&&(r.view.dispose(),this.activeDebugViews.delete(n)))}constructor(t){this.world=t,this.debugScene=null,this.aSub=null,this.rSub=null,this.syncMap=new Map,this.debugScene=new Pb;const e=n=>{var r,s;const o=n.debugBodySettings;let c,l=this.lineSegmentPointsForShape(o.shape);c=l?new Ng((new hn).setFromPoints(l)):null===(r=this.world)||void 0===r?void 0:r.visualScene.factory.createPrimitive(o.shape,{shading:"wireframe",color:0}).nativeMesh,this.syncMap.set(n,c),null===(s=this.debugScene)||void 0===s||s.add(c)};for(const n of this.world.physicsWorld.children)e(n);this.aSub=this.world.physicsWorld.added$.subscribe(n=>e(n)),this.rSub=this.world.physicsWorld.removed$.subscribe(n=>{var r;const s=this.syncMap.get(n);s&&(this.syncMap.delete(n),null===(r=this.debugScene)||void 0===r||r.remove(s))})}get scene(){return this.debugScene}render(t,e){for(const[r,s]of this.syncMap.entries()){const o=r.debugBodySettings;if(o.ignoreTransform||(s.position.set(...Re.spr(r.position)),s.quaternion.set(...Yi.spr(r.rotation))),s.material){let a=16777215;switch(o.type){case"RIGID_DYNAMIC":a=o.sleeping?255:16711680;break;case"RIGID_STATIC":a=65280;break;case"TRIGGER":a=16776960}s.material.color.set(a),s.material.needsUpdate=!0}}const n=t.autoClearColor;n&&(t.autoClearColor=!1),t.render(this.debugScene,e),n&&(t.autoClearColor=!0)}lineSegmentPointsForShape(t){if("BOX"===t.shape){const e=Re.scalarMult(t.dimensions,.5);return[...go(8,n=>new O(n<4?e.x:-e.x,n%4<2?e.y:-e.y,n%2?e.z:-e.z)),...go(8,n=>new O(n%2?e.x:-e.x,n<4?e.y:-e.y,n%4<2?e.z:-e.z)),...go(8,n=>new O(n%4<2?e.x:-e.x,n%2?e.y:-e.y,n<4?e.z:-e.z))]}if("CYLINDER"===t.shape)return[...go(32,e=>new O(t.radius*Math.sin(Math.floor((e+1)/2)*Math.PI/8),t.radius*Math.cos(Math.floor((e+1)/2)*Math.PI/8),-t.height/2)),...go(32,e=>new O(t.radius*Math.sin(Math.floor((e+1)/2)*Math.PI/8),t.radius*Math.cos(Math.floor((e+1)/2)*Math.PI/8),t.height/2)),...go(8,e=>new O(Math.floor(e/2)%2?0:e<4?t.radius:-t.radius,Math.floor(e/2)%2?e<4?t.radius:-t.radius:0,e%2?t.height/2:-t.height/2)),new O(0,0,-t.height/2),new O(0,0,t.height/2)];if("CONE"===t.shape)return[...go(32,e=>new O(t.radius*Math.sin(Math.floor((e+1)/2)*Math.PI/8),t.radius*Math.cos(Math.floor((e+1)/2)*Math.PI/8),-t.height/2)),...go(8,e=>new O(e%2||Math.floor(e/2)%2?0:e<4?t.radius:-t.radius,e%2?0:Math.floor(e/2)%2?e<4?t.radius:-t.radius:0,e%2?t.height/2:-t.height/2)),new O(0,0,-t.height/2),new O(0,0,t.height/2)];if("SPHERE"===t.shape)return[...go(32,e=>new O(t.radius*Math.sin(Math.floor((e+1)/2)*Math.PI/8),t.radius*Math.cos(Math.floor((e+1)/2)*Math.PI/8),0)),...go(32,e=>new O(t.radius*Math.sin(Math.floor((e+1)/2)*Math.PI/8),0,t.radius*Math.cos(Math.floor((e+1)/2)*Math.PI/8))),...go(32,e=>new O(0,t.radius*Math.sin(Math.floor((e+1)/2)*Math.PI/8),t.radius*Math.cos(Math.floor((e+1)/2)*Math.PI/8)))];if("CAPSULE"===t.shape)return[...this.lineSegmentPointsForShape({shape:"CYLINDER",radius:t.radius,height:t.centersDistance}),...go(16,e=>new O(t.radius*Math.cos(Math.floor((e+1)/2)*Math.PI/8),0,t.radius*Math.sin(Math.floor((e+1)/2)*Math.PI/8)+t.centersDistance/2)),...go(16,e=>new O(t.radius*Math.cos(Math.floor((e+1)/2)*Math.PI/8),0,-t.radius*Math.sin(Math.floor((e+1)/2)*Math.PI/8)-t.centersDistance/2)),...go(16,e=>new O(0,t.radius*Math.cos(Math.floor((e+1)/2)*Math.PI/8),t.radius*Math.sin(Math.floor((e+1)/2)*Math.PI/8)+t.centersDistance/2)),...go(16,e=>new O(0,t.radius*Math.cos(Math.floor((e+1)/2)*Math.PI/8),-t.radius*Math.sin(Math.floor((e+1)/2)*Math.PI/8)-t.centersDistance/2))];if("CONVEX_HULL"===t.shape)return[...t.vertices.map(n=>[new O(n.x-.05,n.y,n.z),new O(n.x+.05,n.y,n.z),new O(n.x,n.y-.05,n.z),new O(n.x,n.y+.05,n.z),new O(n.x,n.y,n.z-.05),new O(n.x,n.y,n.z+.05)]).reduce((n,r)=>(n.push(...r),n),[])];if("COMPOUND"===t.shape){const e=[];for(const{position:n,shape:r,rotation:s}of t.children){let o=this.lineSegmentPointsForShape(r);if(!o)return null;e.push(...o.map(a=>new O(...Re.spr(Re.add(n||Re.O,Re.rot(a,s||Yi.O))))))}return e}return null}dispose(){var t,e;this.debugScene=null,null===(t=this.aSub)||void 0===t||t.unsubscribe(),null===(e=this.rSub)||void 0===e||e.unsubscribe(),this.syncMap=new Map}}Af.activeDebugViews=new Map;class sG extends Lse{get physicsDebugViewActive(){return this._physicsDebugViewActive}set physicsDebugViewActive(t){this._physicsDebugViewActive!=t&&(this._physicsDebugViewActive=t,this.world&&(t?this.debugView=Af.startDebugView(this.world,this):(Af.stopDebugView(this.debugView,this),this.debugView=null)))}constructor(t,e,n,r={}){super(t,n,r),this.scene=t,this.camera=e,this.canvas=n,this.world=null,this.debugView=null,this._physicsDebugViewActive=!1,this.nativeRenderer=new Uue(Object.assign({canvas:n,alpha:this.rendererOptions.transparent},this.rendererOptions)),this.nativeRenderer.shadowMap.enabled=!0,this.nativeRenderer.setClearColor(this.rendererOptions.background),this.nativeRenderer.shadowMap.type=c4,this.nativeRenderer.setPixelRatio(this.rendererOptions.forceResolution||devicePixelRatio)}addToWorld(t){this.world=t,this.physicsDebugViewActive&&(this.debugView=Af.startDebugView(this.world,this))}removeFromWorld(t){this.physicsDebugViewActive&&(Af.stopDebugView(this.debugView,this),this.debugView=null),this.world=null}resizeRenderer(t){this.nativeRenderer.setSize(t.x,t.y),(this.camera.nativeCamera instanceof br||"PerspectiveCamera"==this.camera.nativeCamera.type)&&Math.abs(this.camera.nativeCamera.aspect-t.x/t.y)>.01&&(this.camera.nativeCamera.aspect=t.x/t.y,this.camera.nativeCamera.updateProjectionMatrix())}render(){this.nativeRenderer.render(this.scene.nativeScene,this.camera.nativeCamera),this.physicsDebugViewActive&&this.debugView.render(this.nativeRenderer,this.camera.nativeCamera)}dispose(){this.camera.dispose(),this.nativeRenderer.clear(),this.nativeRenderer.dispose(),this.nativeRenderer.domElement=null}}const ape={name:"CopyShader",uniforms:{tDiffuse:{value:null},opacity:{value:1}},vertexShader:"\n\n\t\tvarying vec2 vUv;\n\n\t\tvoid main() {\n\n\t\t\tvUv = uv;\n\t\t\tgl_Position = projectionMatrix * modelViewMatrix * vec4( position, 1.0 );\n\n\t\t}",fragmentShader:"\n\n\t\tuniform float opacity;\n\n\t\tuniform sampler2D tDiffuse;\n\n\t\tvarying vec2 vUv;\n\n\t\tvoid main() {\n\n\t\t\tvec4 texel = texture2D( tDiffuse, vUv );\n\t\t\tgl_FragColor = opacity * texel;\n\n\n\t\t}"};class QS{constructor(){this.isPass=!0,this.enabled=!0,this.needsSwap=!0,this.clear=!1,this.renderToScreen=!1}setSize(){}render(){console.error("THREE.Pass: .render() must be implemented in derived pass.")}dispose(){}}const lpe=new Rb(-1,1,1,-1,0,1),dpe=new class cpe extends hn{constructor(){super(),this.setAttribute("position",new ht([-1,3,0,-1,-1,0,3,-1,0],3)),this.setAttribute("uv",new ht([0,2,0,0,2,0],2))}};class upe{constructor(t){this._mesh=new Mn(dpe,t)}dispose(){this._mesh.geometry.dispose()}render(t){t.render(this._mesh,lpe)}get material(){return this._mesh.material}set material(t){this._mesh.material=t}}class hpe extends QS{constructor(t,e){super(),this.textureID=void 0!==e?e:"tDiffuse",t instanceof Sl?(this.uniforms=t.uniforms,this.material=t):t&&(this.uniforms=Q4.clone(t.uniforms),this.material=new Sl({name:void 0!==t.name?t.name:"unspecified",defines:Object.assign({},t.defines),uniforms:this.uniforms,vertexShader:t.vertexShader,fragmentShader:t.fragmentShader})),this.fsQuad=new upe(this.material)}render(t,e,n){this.uniforms[this.textureID]&&(this.uniforms[this.textureID].value=n.texture),this.fsQuad.material=this.material,this.renderToScreen?(t.setRenderTarget(null),this.fsQuad.render(t)):(t.setRenderTarget(e),this.clear&&t.clear(t.autoClearColor,t.autoClearDepth,t.autoClearStencil),this.fsQuad.render(t))}dispose(){this.material.dispose(),this.fsQuad.dispose()}}class oG extends QS{constructor(t,e){super(),this.scene=t,this.camera=e,this.clear=!0,this.needsSwap=!1,this.inverse=!1}render(t,e,n){const r=t.getContext(),s=t.state;let o,a;s.buffers.color.setMask(!1),s.buffers.depth.setMask(!1),s.buffers.color.setLocked(!0),s.buffers.depth.setLocked(!0),this.inverse?(o=0,a=1):(o=1,a=0),s.buffers.stencil.setTest(!0),s.buffers.stencil.setOp(r.REPLACE,r.REPLACE,r.REPLACE),s.buffers.stencil.setFunc(r.ALWAYS,o,4294967295),s.buffers.stencil.setClear(a),s.buffers.stencil.setLocked(!0),t.setRenderTarget(n),this.clear&&t.clear(),t.render(this.scene,this.camera),t.setRenderTarget(e),this.clear&&t.clear(),t.render(this.scene,this.camera),s.buffers.color.setLocked(!1),s.buffers.depth.setLocked(!1),s.buffers.color.setMask(!0),s.buffers.depth.setMask(!0),s.buffers.stencil.setLocked(!1),s.buffers.stencil.setFunc(r.EQUAL,1,4294967295),s.buffers.stencil.setOp(r.KEEP,r.KEEP,r.KEEP),s.buffers.stencil.setLocked(!0)}}class fpe extends QS{constructor(){super(),this.needsSwap=!1}render(t){t.state.buffers.stencil.setLocked(!1),t.state.buffers.stencil.setTest(!1)}}class ppe{constructor(t,e){if(this.renderer=t,this._pixelRatio=t.getPixelRatio(),void 0===e){const n=t.getSize(new xe);this._width=n.width,this._height=n.height,(e=new Mu(this._width*this._pixelRatio,this._height*this._pixelRatio,{type:Jm})).texture.name="EffectComposer.rt1"}else this._width=e.width,this._height=e.height;this.renderTarget1=e,this.renderTarget2=e.clone(),this.renderTarget2.texture.name="EffectComposer.rt2",this.writeBuffer=this.renderTarget1,this.readBuffer=this.renderTarget2,this.renderToScreen=!0,this.passes=[],this.copyPass=new hpe(ape),this.copyPass.material.blending=Jc,this.clock=new O$}swapBuffers(){const t=this.readBuffer;this.readBuffer=this.writeBuffer,this.writeBuffer=t}addPass(t){this.passes.push(t),t.setSize(this._width*this._pixelRatio,this._height*this._pixelRatio)}insertPass(t,e){this.passes.splice(e,0,t),t.setSize(this._width*this._pixelRatio,this._height*this._pixelRatio)}removePass(t){const e=this.passes.indexOf(t);-1!==e&&this.passes.splice(e,1)}isLastEnabledPass(t){for(let e=t+1;e0?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;lG.fromArray(r,t),bO.fromArray(r,e),cG.fromArray(r,n),Va.subVectors(cG,bO),dG.subVectors(lG,bO),Va.cross(dG),Va.normalize(),s.push(Va.x,Va.y,Va.z),s.push(Va.x,Va.y,Va.z),s.push(Va.x,Va.y,Va.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 d=this.vertices.length;let h=this.parseVertexIndex(t,d),p=this.parseVertexIndex(e,d),m=this.parseVertexIndex(n,d);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?(JS.setRGB(parseFloat(h[4]),parseFloat(h[5]),parseFloat(h[6])).convertSRGBToLinear(),e.colors.push(JS.r,JS.g,JS.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"===d){const p=c.slice(1).trim().split(aG),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 No;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 ht(d.normals,3)),d.colors.length>0&&(g=!0,b.setAttribute("color",new ht(d.colors,3))),!0===d.hasUVIndices&&b.setAttribute("uv",new ht(d.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 ht(e.vertices,3)),e.colors.length>0&&void 0!==e.colors[0]&&(l.setAttribute("color",new ht(e.colors,3)),a.vertexColors=!0);const c=new zb(l,a);s.add(c)}return s}}class xO extends bf{constructor(t){super(t)}load(t,e,n,r){const s=this,o=""===this.path?Ou.extractUrlBase(t):this.path,a=new Ba(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,d):c;h=h.toLowerCase();let p=d>=0?c.substring(d+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 Mpe(this.resourcePath||e,this.materialOptions);return a.setCrossOrigin(this.crossOrigin),a.setManager(this.manager),a.setMaterials(o),a}}class Mpe{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:lc,this.wrap=void 0!==this.options.wrap?this.options.wrap:Bs}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),d=e.loadTexture(function s(a,l){return"string"!=typeof l||""===l?"":/^https?:\/\//i.test(l)?l:a+l}(e.baseUrl,c.url));d.repeat.copy(c.scale),d.offset.copy(c.offset),d.wrapS=e.wrap,d.wrapT=e.wrap,("map"===a||"emissiveMap"===a)&&(d.colorSpace=cs),r[a]=d}for(const a in n){const l=n[a];let c;if(""!==l)switch(a.toLowerCase()){case"kd":r.color=(new qe).fromArray(l).convertSRGBToLinear();break;case"ks":r.specular=(new qe).fromArray(l).convertSRGBToLinear();break;case"ke":r.emissive=(new qe).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 zS(r),this.materials[t]}getTextureParams(t,e){const n={scale:new xe(1,1),offset:new xe(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:w$;let a=o.getHandler(t);null===a&&(a=new Pu(o)),a.setCrossOrigin&&a.setCrossOrigin(this.crossOrigin);const l=a.load(t,n,r,s);return void 0!==e&&(l.mapping=e),l}}const Cpe=["determinateSpinner"];function Spe(i,t){if(1&i&&(ki(),G(0,"svg",11),Ie(1,"circle",12),j()),2&i){const e=re();It("viewBox",e._viewBox()),V(1),qo("stroke-dasharray",e._strokeCircumference(),"px")("stroke-dashoffset",e._strokeCircumference()/2,"px")("stroke-width",e._circleStrokeWidth(),"%"),It("r",e._circleRadius())}}const Epe=Jy(class{constructor(i){this._elementRef=i}},"primary"),Ape=new me("mat-progress-spinner-default-options",{providedIn:"root",factory:function Dpe(){return{diameter:uG}}}),uG=100;let e0=(()=>{class i extends Epe{constructor(e,n,r){super(e),this.mode="mat-spinner"===this._elementRef.nativeElement.nodeName.toLowerCase()?"indeterminate":"determinate",this._value=0,this._diameter=uG,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,Ps(e)))}get diameter(){return this._diameter}set diameter(e){this._diameter=Ps(e)}get strokeWidth(){return this._strokeWidth??this.diameter/10}set strokeWidth(e){this._strokeWidth=Ps(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)(E(vt),E(kr,8),E(Ape))},i.\u0275cmp=ot({type:i,selectors:[["mat-progress-spinner"],["mat-spinner"]],viewQuery:function(e,n){if(1&e&&$n(Cpe,5),2&e){let r;At(r=Dt())&&(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&&(It("aria-valuemin",0)("aria-valuemax",100)("aria-valuenow","determinate"===n.mode?n.value:null)("mode",n.mode),qo("width",n.diameter,"px")("height",n.diameter,"px"),ln("_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:[dt],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&&(fe(0,Spe,2,8,"ng-template",null,0,zc),G(2,"div",1,2),ki(),G(4,"svg",3),Ie(5,"circle",4),j()(),ya(),G(6,"div",5)(7,"div",6)(8,"div",7),sy(9,8),j(),G(10,"div",9),sy(11,8),j(),G(12,"div",10),sy(13,8),j()()()),2&e){const r=Zi(1);V(4),It("viewBox",n._viewBox()),V(1),qo("stroke-dasharray",n._strokeCircumference(),"px")("stroke-dashoffset",n._strokeDashOffset(),"px")("stroke-width",n._circleStrokeWidth(),"%"),It("r",n._circleRadius()),V(4),U("ngTemplateOutlet",r),V(2),U("ngTemplateOutlet",r),V(2),U("ngTemplateOutlet",r)}},dependencies:[xy],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})(),Ipe=(()=>{class i{}return i.\u0275fac=function(e){return new(e||i)},i.\u0275mod=en({type:i}),i.\u0275inj=Wt({imports:[co,Jn]}),i})();const Rpe=["previewCanvasContainer"],kpe=["previewCanvas"];function Ppe(i,t){if(1&i){const e=jn();Gr(0),G(1,"label",11),Be(2),j(),G(3,"input",12),Oe("change",function(r){Vt(e);const s=re().$implicit;return s.value=r.currentTarget.checked,Et(s.change(s.value))}),j(),Wr()}if(2&i){const e=re(),n=e.index,r=e.$implicit,s=re().index;V(1),U("for","custom_control_"+s+"_"+n),V(1),ui(r.label),V(1),U("id","custom_control_"+s+"_"+n)("type",r.type)("checked",r.value)}}function Ope(i,t){if(1&i){const e=jn();G(0,"div",9)(1,"label",11),Be(2),j(),G(3,"input",14),Oe("change",function(){const s=Vt(e).$implicit,o=re(2).$implicit;return o.value=s,Et(o.change(o.value))}),j()()}if(2&i){const e=t.$implicit,n=re(2),r=n.index,s=n.$implicit,o=re().index;V(1),U("for","custom_control_"+o+"_"+r+"_"+e),V(1),ui(e),V(1),U("id","custom_control_"+o+"_"+r+"_"+e)("checked",s.value===e)}}function Fpe(i,t){if(1&i&&(G(0,"div",13)(1,"label"),Be(2),j(),fe(3,Ope,4,4,"div",8),j()),2&i){const e=re().$implicit;V(2),ui(e.label),V(1),U("ngForOf",e.options)}}function Lpe(i,t){if(1&i){const e=jn();Gr(0),G(1,"label",11),Be(2),j(),G(3,"input",15),Oe("colorChange",function(r){Vt(e);const s=re().$implicit,o=re(2);return s.value=o.toRGB(r.value),Et(s.change(s.value))}),j(),Ie(4,"ngx-mat-color-toggle",16)(5,"ngx-mat-color-picker",null,17),Wr()}if(2&i){const e=Zi(6),n=re(),r=n.index,s=n.$implicit,o=re().index;V(1),U("for","custom_control_"+o+"_"+r),V(1),ui(s.label),V(1),U("ngxMatColorPicker",e),V(1),U("for",e)}}function Npe(i,t){if(1&i){const e=jn();Gr(0),G(1,"label",11),Be(2),j(),G(3,"input",18),Oe("change",function(r){Vt(e);const s=re().$implicit;return s.value=r.currentTarget.value,Et(s.change(s.value))}),j(),Wr()}if(2&i){const e=re(),n=e.index,r=e.$implicit,s=re().index;V(1),U("for","custom_control_"+s+"_"+n),V(1),ui(r.label),V(1),U("id","custom_control_"+s+"_"+n)("min",r.minValue)("max",r.maxValue)("step",r.valueStep)("value",r.value)}}function Bpe(i,t){if(1&i&&(G(0,"div",9),fe(1,Ppe,4,5,"ng-container",6),fe(2,Fpe,4,2,"div",10),fe(3,Lpe,7,4,"ng-container",6),fe(4,Npe,4,7,"ng-container",6),j()),2&i){const e=t.$implicit;V(1),U("ngIf","checkbox"===e.type),V(1),U("ngIf","radio"===e.type),V(1),U("ngIf","color"===e.type),V(1),U("ngIf","slider"===e.type)}}function Upe(i,t){if(1&i&&(Gr(0),G(1,"h4"),Be(2),j(),fe(3,Bpe,5,4,"div",8),Wr()),2&i){const e=t.$implicit;V(2),ui(e.title),V(1),U("ngForOf",e.controls)}}function Vpe(i,t){if(1&i){const e=jn();G(0,"div",9)(1,"label",11),Be(2),j(),G(3,"input",19),Oe("change",function(r){return Et(Vt(e).$implicit.visible=r.currentTarget.checked)}),j()()}if(2&i){const e=t.$implicit;V(1),U("for","visibility_"+e.name),V(1),ui(e.name),V(1),U("id","visibility_"+e.name)("checked",e.visible)}}function zpe(i,t){if(1&i&&(Gr(0),G(1,"h4"),Be(2,"Objects visibility"),j(),fe(3,Vpe,4,4,"div",8),Wr()),2&i){const e=re();V(3),U("ngForOf",e.meshes)}}function Hpe(i,t){1&i&&Ie(0,"mat-spinner",20)}const oa=i=>{i.colorSpace="srgb",i.anisotropy=8,i.magFilter=vr,i.minFilter=vr};let hG=(()=>{class i{constructor(e){this.cdr=e,this.visibilityControls=!0,this.groupFunction=null,this.customControls=[],this.onObjectLoaded=new $e,this._paths$=new Qe(null),this.destroyed$=new Te,this.entity=null,this.meshes=[]}get paths(){return this._paths$.getValue()}set paths(e){this._paths$.next(e)}ngAfterViewInit(){var e=this;return nt(function*(){var s;e.world=new ok(new yO,{init:(s=nt(function*(){}),function(){return s.apply(this,arguments)}),simulate:()=>{}}),yield e.world.init(),e.world.visualScene.nativeScene.add(new GS(16777215,2));let n=new Qe({x:1,y:1});e.renderer=e.world.addRenderer(e.world.visualScene.factory.createPerspectiveCamera({frustrum:{near:.01,far:1e4}}),e.previewCanvas.nativeElement,{size:n.asObservable(),background:11184810}),e.controller=new Hse(e.renderer,{mouseOptions:{canvas:e.previewCanvas.nativeElement},orbiting:{sensitivityX:2,sensitivityY:2},orbitingElasticity:30}),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(Ue(e.destroyed$)).subscribe(function(){var s=nt(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 Jb,h=yield(new xO).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 No;y.add(...b[v]),y.name=v,p.remove(...b[v]),p.add(y)}}e.meshes=p.children,e.meshes.sort((b,v)=>b.name>v.name?1:-1),p.traverse(b=>{if(b instanceof Mn){const v=b.material instanceof Array?b.material:[b.material];for(const y of v)y.transparent=!0,y.alphaTest=.5,y instanceof qi&&y.map&&(y.map.wrapS=er,y.map.wrapT=er,oa(y.map),y.map.needsUpdate=!0)}}),e.onObjectLoaded.next(p),e.entity=new ea({object3D:new sa(p)}),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=Re.scalarMult(Re.add(m.min,m.max),.5),e.controller.spherical={phi:1.22,theta:-1.32,radius:Re.dist(m.min,m.max)},e.cdr.markForCheck()}});return function(o){return s.apply(this,arguments)}}())})()}toRGB(e){return(e?.r||0)<<16|(e?.g||0)<<8|(e?.b||0)}ngOnDestroy(){this.destroyed$.next(),this.destroyed$.complete()}}return i.\u0275fac=function(e){return new(e||i)(E(Qn))},i.\u0275cmp=ot({type:i,selectors:[["app-obj-viewer"]],viewQuery:function(e,n){if(1&e&&($n(Rpe,5),$n(kpe,5)),2&e){let r;At(r=Dt())&&(n.previewCanvasContainer=r.first),At(r=Dt())&&(n.previewCanvas=r.first)}},inputs:{paths:"paths",visibilityControls:"visibilityControls",groupFunction:"groupFunction",customControls:"customControls"},outputs:{onObjectLoaded:"onObjectLoaded"},decls:8,vars:3,consts:[[1,"previewCanvasContainer"],["previewCanvasContainer",""],["width","640","height","480"],["previewCanvas",""],["id","controls"],[4,"ngFor","ngForOf"],[4,"ngIf"],["mode","indeterminate",4,"ngIf"],["class","controls-list",4,"ngFor","ngForOf"],[1,"controls-list"],["style","width: 100%",4,"ngIf"],[3,"for"],[3,"id","type","checked","change"],[2,"width","100%"],["type","radio",3,"id","checked","change"],["matInput","",1,"hidden",3,"ngxMatColorPicker","colorChange"],["matSuffix","",3,"for"],["picker",""],["type","range",3,"id","min","max","step","value","change"],["type","checkbox",3,"id","checked","change"],["mode","indeterminate"]],template:function(e,n){1&e&&(G(0,"div",0,1),Ie(2,"canvas",2,3),G(4,"div",4),fe(5,Upe,4,2,"ng-container",5),fe(6,zpe,4,1,"ng-container",6),j(),fe(7,Hpe,1,0,"mat-spinner",7),j()),2&e&&(V(5),U("ngForOf",n.customControls),V(1),U("ngIf",n.visibilityControls),V(1),U("ngIf",!n.entity))},dependencies:[lo,_i,Xte,rc,e0,jie,bC,NH],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%] > h4[_ngcontent-%COMP%]{margin:0}.previewCanvasContainer[_ngcontent-%COMP%] #controls[_ngcontent-%COMP%] .controls-list[_ngcontent-%COMP%]{width:100%;display:flex;-webkit-user-select:none;user-select:none;align-items:center}.previewCanvasContainer[_ngcontent-%COMP%] #controls[_ngcontent-%COMP%] .controls-list[_ngcontent-%COMP%] > span[_ngcontent-%COMP%]{flex-grow:1}.previewCanvasContainer[_ngcontent-%COMP%] #controls[_ngcontent-%COMP%] .controls-list[_ngcontent-%COMP%] > label[_ngcontent-%COMP%]{flex-grow:1}"],changeDetection:0}),i})();function $pe(i,t){if(1&i){const e=jn();ki(),G(0,"circle",5),Oe("mousedown",function(r){return Vt(e),Et(re().startDrag(r))}),ct(1,"async"),ct(2,"async"),j()}if(2&i){const e=re();let n,r;It("cx",(null==(n=ut(1,3,e.mapPointer$))?null:n.x)||0)("cy",(null==(r=ut(2,5,e.mapPointer$))?null:r.y)||0)("r",10)}}const Gpe=function(){return{"stroke-width":3}};let fG=(()=>{class i{constructor(e){this.ref=e,this._roadSpline$=new Qe([]),this._pointer$=new Qe(null),this._projection$=new Qe("nz"),this._roadSplineProjected$=new Qe([]),this._pointerProjected$=new Qe(yi.O),this.splineClosed=!1,this.pointerChange=new $e,this.svgSize$=new Qe({x:100,y:100}),this.scalingSquare$=new Qe({x:0,y:0,width:100,height:100}),this.mapPolyline$=new Qe(""),this.mapPointer$=new Qe(null),this.isShiftPressed=!1,this.destroyed$=new Te,this.isDragging=!1}set roadSpline(e){this._roadSpline$.next(e)}set pointer(e){this._pointer$.next(e)}set projection(e){this._projection$.next(e)}get trackLength$(){return this._roadSpline$.pipe(tt(e=>{let n=0;for(let r=1;r{"Shift"===n.key&&(this.isShiftPressed=!0)}),To(window,"keyup").pipe(Ue(this.destroyed$)).subscribe(n=>{"Shift"===n.key&&(this.isShiftPressed=!1)}),Ra([this._roadSpline$,this._projection$]).pipe(Ue(this.destroyed$)).subscribe(([n,r])=>{this._roadSplineProjected$.next(n.map(s=>this.project(s)))}),Ra([this._pointer$,this._projection$]).pipe(Ue(this.destroyed$)).subscribe(([n,r])=>{this._pointerProjected$.next(this.project(n||Re.O))}),this._roadSplineProjected$.pipe(Ue(this.destroyed$),tt(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.y)},s={x:Math.max(s.x,a.x),y:Math.max(s.y,a.y)}});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$),Ra([this._roadSplineProjected$,this.scalingSquare$,this.svgSize$]).pipe(Ue(this.destroyed$),tt(([n,r,s])=>{const o=n.map(a=>({x:(a.x-r.x)*s.x/r.width,y:(r.y-a.y)*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$),Ra([this._pointerProjected$,this.scalingSquare$.asObservable(),this.svgSize$]).pipe(Ue(this.destroyed$),tt(([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()}startDrag(e){this.isDragging=!0,this.updatePointer(e)}drag(e){this.isDragging&&this.updatePointer(e)}endDrag(){this.isDragging=!1}getClosestProjectedLineIndex(e){const n=this._roadSplineProjected$.getValue();let r=-1,s=Number.MAX_SAFE_INTEGER;for(let d=1;d{return(i=Df||(Df={})).ThreeModel="model",i.Bitmap="bitmap",i.TwoSidedBitmap="two_sided_bitmap",Df;var i})();class Qpe extends QH{constructor(t,e,n){super(t,{loadDepth:40,inertia:2}),this.mapGraph=t,this.famPath=e,this.hideUnknownEntities$=n,this.textureLoader=new Pu,this.terrainMaterials={},this.objLoader=new Jb,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(Ql(),Ue(this._onRemoved$)).subscribe(e=>{for(const n of this.unknownEntities)n.visible=!e})}getPlaceholderTexture(){var t=this;return nt(function*(){return t._placeholder?t._placeholder:(t._placeholderPromise||(t._placeholderPromise=t.textureLoader.loadAsync("assets/placeholder_texture.png")),t._placeholderPromise)})()}getPlaceholderTerrainTexture(){var t=this;return nt(function*(){return t._placeholderTerrain?t._placeholderTerrain:(t._placeholderTerrainPromise||(t._placeholderTerrainPromise=t.textureLoader.loadAsync("assets/placeholder_texture.png").then(e=>(e.wrapS=Bs,e.wrapT=er,oa(e),e.flipY=!0,e))),t._placeholderTerrainPromise)})()}loadChunk(t){var e=this;return nt(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 Mn&&(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:Re.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:Yi.fromAngle(Re.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 ea({object3D:new sa(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 qi({side:Ns,transparent:!0,visible:!1}),this.famPath?this.textureLoader.loadAsync(`${this.famPath}/background/${t}.png`).then(e=>{e.wrapS=Bs,e.wrapT=er,oa(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 nt(function*(){let n=!1;if(t.type==Df.ThreeModel){let r;try{if(!e.famPath)throw new Error;const o=new xO,a=new Jb,l=yield o.loadAsync(`${e.famPath}/props/${t.data.data.resource_id}/0/material.mtl`);l.preload(),a.setMaterials(l),r=new sa(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 Mn){const a=o.material instanceof Array?o.material:[o.material];for(const l of a)l.transparent=!0,l.alphaTest=.5,l instanceof qi&&l.map&&(l.map.wrapS=er,l.map.wrapT=er,oa(l.map),l.map.needsUpdate=!0)}});const s=new ea({object3D: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,d)=>new Array(d).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 No,[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,d]=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 ea({object3D:new sa(s)});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 nt(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=>(oa(h),new qi({map:h,alphaTest:.5,transparent:!0,side:Ns}))),d=new Mn(new Iu(e.x,e.y),c[0]);if(d.rotateX(Math.PI/2),d.position.set(0,0,e.y/2),c.length>1){let h=-1;Ym(r.world).pipe(o4(n&&!isNaN(+n)?1e3*+n:250)).subscribe(()=>{h=(h+1)%c.length,d.material=c[h]})}return[d,a]})()}}let Jpe=(()=>{class i{constructor(e,n,r){this.eelDelegate=e,this.cdr=n,this.mainService=r,this._resource$=new Qe(null),this.changed=new $e,this.previewLoading$=new Qe(!0),this.previewFamLocation$=new Qe(null),this.previewFamLoading$=new Qe(!1),this.pointer$=new Qe(null),this.selectedSplineIndex$=new Qe(0),this.selectedSplineItem$=new Qe(null),this.selectedAiInfoItem$=new Qe(null),this.selectedTerrainItem$=new Qe(null),this.famPath=null,this.name="",this.renderer=null,this.map=null,this.isOpenedTrack=!0,this.roadPath=null,this.destroyed$=new Te}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=>({x:e.position.x,y:e.position.z,z:e.position.y}))||[]}ngAfterViewInit(){var e=this;return nt(function*(){var s;e.world=new ok(new yO,{init:(s=nt(function*(){}),function(){return s.apply(this,arguments)}),simulate:()=>{},loader:{loadFromGgGlb:function(){var s=nt(function*(...o){return[]});return function(){return s.apply(this,arguments)}}()}}),yield e.world.init(),e.skySphere=new ea({object3D:e.world.visualScene.factory.createPrimitive({shape:"SPHERE",radius:1e3},{color:16777215})}),e.skySphere.object3D.nativeMesh.material.side=Ns,e.world.addEntity(e.skySphere),e.selectionSphere=new ea({object3D: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 GS(16777215,2));let n=new Qe({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=Yi.lookAt(e.renderer.camera.position,Re.add(e.renderer.camera.position,Re.Y),Re.Z),Ym(e.world).pipe(Ue(e.destroyed$)).subscribe(()=>{e.renderer&&(e.skySphere.position=e.renderer.camera.position,e.pointer$.next(e.renderer.camera.position))}),e.controller=new n4(e.world.keyboardInput,e.renderer,{mouseOptions:{canvas:e.previewCanvas.nativeElement,pointerLock:!0},keymap:"wasd+arrows",cameraLinearSpeed:40,cameraBoostMultiplier:4,cameraMovementElasticity:100,cameraRotationElasticity:30,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(Ue(e.destroyed$)).subscribe(function(){var s=nt(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(Ue(e.destroyed$),gn(([s,o])=>!!e.resource&&s.startsWith(e.resource.id)),gl(3e3)).subscribe(nt(function*(){e.previewLoading$.next(!0),yield e.postTmpUpdates(e.resource?.id),yield e.loadPreview(),e.previewLoading$.next(!1)})),e.selectedSplineIndex$.pipe(Ue(e.destroyed$),gl(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=Re.add(a,Re.rotAround({x:10,y:-12,z:5},{x:0,y:0,z:1},-e.resource.data.road_spline[s].orientation)),e.renderer.rotation=Yi.lookAt(e.renderer.position,a,{x:0,y:0,z:1}),e.controller.reset())}e.selectedSplineItem$.next({id:sc(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:sc(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:sc(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 nt(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 Pu,o=r.find(a=>a.endsWith("spherical.png"));if(o){const a=yield s.loadAsync(o);a.colorSpace="srgb",a.mapping=cc,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 nt(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})()}onPointerChange(e){this.renderer&&(this.renderer.position=e)}loadPreview(){var e=this;return nt(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=Km.fromMapArray(e.roadPath.map((r,s)=>({path:`${e.terrainChunksObjLocation}terrain_chunk_${s}`,position:r,loadOptions:{}}))||[],!e.isOpenedTrack);e.unloadPreview(),e.map=new Qpe(n,e.famPath&&"resources/"+e.famPath,e.mainService.hideHiddenFields$),e.map.resource=e.resource,e.map.isOpenedTrack=e.isOpenedTrack,Ym(e.world).pipe(Ue(e.destroyed$)).subscribe(()=>{e.map&&e.renderer&&e.map.loaderCursor$.next(e.renderer.position)}),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 nt(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)(E(Jl),E(Qn),E(Fa))},i.\u0275cmp=ot({type:i,selectors:[["app-tri-map-block-ui"]],viewQuery:function(e,n){if(1&e&&($n(Wpe,5),$n(jpe,5)),2&e){let r;At(r=Dt())&&(n.previewCanvasContainer=r.first),At(r=Dt())&&(n.previewCanvas=r.first)}},inputs:{resource:"resource"},outputs:{changed:"changed"},decls:49,vars:44,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","projection","pointerChange"],[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&&(G(0,"div",0)(1,"h4"),Be(2,"Preview *.FAM file"),j(),G(3,"mat-form-field",1)(4,"mat-label"),Be(5,"Current preview FAM"),j(),G(6,"mat-select",2,3),Oe("valueChange",function(s){return n.onFamSelected(s)}),ct(8,"async"),ct(9,"async"),fe(10,Ype,2,2,"mat-option",4),G(11,"mat-option",5),Be(12,"custom"),j()()(),fe(13,qpe,9,3,"ng-container",6),fe(14,Xpe,1,1,"mat-spinner",7),ct(15,"async"),j(),G(16,"div",8)(17,"div",9,10),Ie(19,"canvas",11,12),fe(21,Kpe,1,0,"mat-spinner",13),ct(22,"async"),j(),G(23,"div",14,10)(25,"mat-form-field",1)(26,"mat-label"),Be(27,"Spline item"),j(),G(28,"input",15),Oe("ngModelChange",function(s){return n.selectedSplineIndex$.next(s)}),ct(29,"async"),ct(30,"async"),j()(),G(31,"app-minimap",16),Oe("pointerChange",function(s){return n.onPointerChange(s)}),ct(32,"async"),j()()(),G(33,"h4"),Be(34,"Road spline item"),j(),Ie(35,"app-compound-block-ui",17),ct(36,"async"),G(37,"h4"),Be(38,"AI info (block for 4 spline items)"),j(),Ie(39,"app-compound-block-ui",17),ct(40,"async"),G(41,"h4"),Be(42,"Terrain (block for 4 spline items)"),j(),Ie(43,"app-compound-block-ui",17),ct(44,"async"),G(45,"h4"),Be(46,"Common"),j(),Ie(47,"app-compound-block-ui",18),ct(48,"async")),2&e){const r=Zi(7);let s;V(6),U("value",n.previewFamPossibleLocations.includes(ut(8,21,n.previewFamLocation$))?ut(9,23,n.previewFamLocation$):"custom"),V(4),U("ngForOf",n.previewFamPossibleLocations),V(3),U("ngIf","custom"==r.value),V(1),U("ngIf",ut(15,25,n.previewFamLoading$)),V(7),U("ngIf",ut(22,27,n.previewLoading$)),V(7),U("min",0)("max",4*(null==(s=ut(29,29,n._resource$))?null:s.data.num_chunks)-1)("ngModel",ut(30,31,n.selectedSplineIndex$)),V(3),U("roadSpline",n.roadSpline)("pointer",ut(32,33,n.pointer$))("splineClosed",!n.isOpenedTrack)("projection","nz"),V(4),U("resource",ut(36,35,n.selectedSplineItem$))("hideBlockActions",!0),V(4),U("resource",ut(40,37,n.selectedAiInfoItem$))("hideBlockActions",!0),V(4),U("resource",ut(44,39,n.selectedTerrainItem$))("hideBlockActions",!0),V(4),U("resource",ut(48,41,n._resource$))("hideBlockActions",!0)("fieldWhitelist",Rs(43,Zpe))}},dependencies:[lo,_i,_l,mu,nc,_u,gu,Zc,yl,Ro,rc,rb,pb,Nm,e0,ec,fG,Xo],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-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})();const pG=i=>new Promise(t=>setTimeout(t,i)),mG=(i,t,e=null)=>{const n=document.createElement("canvas"),r=n.getContext("2d",{willReadFrequently:!0}),s=i.width,o=i.height;n.width=s,n.height=o,r.drawImage(i,0,0,s,o);const a=r.getImageData(0,0,s,o);for(let l=0;l{if(!(o instanceof Mn))return;let a=-1;if(o.name.startsWith("lbl__rt_frnt")?a=0:o.name.startsWith("lbl__lt_frnt")?a=1:o.name.startsWith("lbl__rt_rear")?a=2:o.name.startsWith("lbl__lt_rear")&&(a=3),a>-1){this.wheels[a]=o,a<2&&(this.frontWheels[a]=o),o.geometry.boundingBox||o.geometry.computeBoundingBox();const l=Re.avg(o.geometry.boundingBox.min,o.geometry.boundingBox.max);o.geometry.translate(...Re.spr(Re.neg(l))),o.position.set(...Re.spr(l)),this.wheelIdlePositions[a]=l}(o.name.includes("rsid")||o.name.includes("lite"))&&(r.push(o),this.originalTexWithTailLights=o.material.map)}),!this.originalTexWithTailLights)throw new Error("Not a driveable NFS1 car");this.tailLightColors=n.includes("TRAFFC.CFM")?[9509903,16711680]:[3212546,16258068],this.texWithTailLightsImg=document.createElement("img"),this.texWithTailLights=new Oo(this.texWithTailLightsImg),this.texWithTailLights.flipY=this.originalTexWithTailLights.flipY,oa(this.texWithTailLights),this.recolorTailLights(this.tailLightColors[0]).then();for(const o of r)o.material.map=this.texWithTailLights;const s=new Pu;this.tyreTextures=[1,2,3,4].map(o=>s.load(`${n}/tyr${o}.png`));for(const o of this.tyreTextures)oa(o);this.tyreMaterial=new qi({map:this.tyreTextures[0]}),this.tyreMaterial.transparent=!0,this.tyreMaterial.alphaTest=.5,this.tyreMaterial.map.wrapS=er,this.tyreMaterial.map.wrapT=er,this.tyreMaterial.polygonOffset=!0,this.tyreMaterial.polygonOffsetFactor=-4;for(const o of this.wheels)o.material=this.tyreMaterial}get tailLightsOn(){return this._tailLightsOn}set tailLightsOn(t){t!==this._tailLightsOn&&(this._tailLightsOn=t,this.recolorTailLights(this.tailLightColors[t?1:0]))}get speed(){return this._speed}set speed(t){if(t!==this._speed){switch(this._speed=t,this.tyreTextureUpdateTimer&&clearInterval(this.tyreTextureUpdateTimer),t){case"idle":this.tyreMaterial.map=this.tyreTextures[0];break;case"slow":let e=!0;this.tyreTextureUpdateTimer=setInterval(()=>{this.tyreMaterial.map=this.tyreTextures[e?1:2],this.tyreMaterial.needsUpdate=!0,e=!e},16);break;case"fast":this.tyreMaterial.map=this.tyreTextures[3]}this.tyreMaterial.needsUpdate=!0}}get steeringAngle(){return this._steeringAngle}set steeringAngle(t){if(t!==this._steeringAngle){this._steeringAngle=t;for(const e of this.frontWheels)e.rotation.set(0,0,t)}}recolorTailLights(t){var e=this;return nt(function*(){if(e.originalTexWithTailLights&&e.texWithTailLights&&e.texWithTailLightsImg){for(let n=100;n>0&&!e.originalTexWithTailLights.source.data;n--)yield pG(50);((i,t,e,n=null)=>{const[r,s,o]=[t>>16,t>>8&255,255&t],[a,l,c]=[e>>16,e>>8&255,255&e];mG(i,(d,h)=>{d[h]==r&&d[h+1]==s&&d[h+2]==o&&(d[h]=a,d[h+1]=l,d[h+2]=c)},n)})(e.originalTexWithTailLights.source.data,e.tailLightsTexColor,t,e.texWithTailLightsImg),e.texWithTailLights.needsUpdate=!0}})()}dispose(){this.texWithTailLightsImg&&(this.texWithTailLightsImg.remove(),this.texWithTailLightsImg=null),this.texWithTailLights&&(this.texWithTailLights.dispose(),this.texWithTailLights=null),this.tyreTextureUpdateTimer&&clearInterval(this.tyreTextureUpdateTimer),this.tyreMaterial&&(this.tyreMaterial.dispose(),this.tyreMaterial=null)}}let nme=(()=>{class i{constructor(e,n,r){this.eelDelegate=e,this.mainService=n,this.cdr=r,this._resource$=new Qe(null),this.changed=new $e,this.previewPaths$=new Qe(null),this.destroyed$=new Te,this.customControls=[],this.serializerSettings={geometry__save_obj:!0,geometry__save_blend:!1,geometry__export_to_gg_web_engine:!1}}get resource(){return this._resource$.getValue()}set resource(e){this._resource$.next(e)}ngAfterViewInit(){var e=this;return nt(function*(){e._resource$.pipe(Ue(e.destroyed$)).subscribe(function(){var n=nt(function*(r){e.previewPaths$.next(yield e.loadPreviewFilePaths(r?.id))});return function(r){return n.apply(this,arguments)}}()),e.mainService.dataBlockChange$.pipe(Ue(e.destroyed$),gn(([n,r])=>!!e.resource&&n.startsWith(e.resource.id)),gl(1500)).subscribe(nt(function*(){e.previewPaths$.next(null),e.previewPaths$.next(yield e.postTmpUpdates(e.resource?.id))}))})()}onObjectLoaded(e){var n=this;return nt(function*(){if((n._resource$.value?.id||"").includes(".CFM__"))try{const r=n.resource?.id.split("/");r.pop(),r[r.length-1]=""+(+r[r.length-1]+1);const s=yield n.eelDelegate.retrieveValue(r.join("/")+"/data"),o=s.children_aliases.findIndex(l=>"!PAL"===l);if(-1==o)throw new Error("Not a car");const a=new tme(e,s.children[o].data.colors[254]>>>8,n.previewPaths$.value[0].substring(0,n.previewPaths$.value[0].lastIndexOf("/"))+"/assets");n.customControls=[{title:"TNFS car features",controls:[{label:"Brake lights on",type:"checkbox",value:!1,change:l=>{a.tailLightsOn=l}},{label:"Car speed",type:"radio",options:["idle","slow","fast"],value:"idle",change:l=>{a.speed=l}},{label:"Steering angle",type:"slider",minValue:-.7,maxValue:.7,valueStep:.05,value:0,change:l=>{a.steeringAngle=l}}]}],n.cdr.markForCheck()}catch{}})()}postTmpUpdates(e){var n=this;return nt(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 nt(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)(E(Jl),E(Fa),E(Qn))},i.\u0275cmp=ot({type:i,selectors:[["app-orip-geometry-block-ui"]],inputs:{resource:"resource"},outputs:{changed:"changed"},decls:4,vars:7,consts:[[3,"paths","customControls","onObjectLoaded"],[3,"resource"]],template:function(e,n){1&e&&(G(0,"app-obj-viewer",0),Oe("onObjectLoaded",function(s){return n.onObjectLoaded(s)}),ct(1,"async"),j(),Ie(2,"app-compound-block-ui",1),ct(3,"async")),2&e&&(U("paths",ut(1,3,n.previewPaths$))("customControls",n.customControls),V(2),U("resource",ut(3,5,n._resource$)))},dependencies:[ec,hG,Xo],changeDetection:0}),i})();const gG=i=>{let t=i.block_class_mro.split("__")[0];return"ArrayBlock"===t?gG(i.child_schema)+"[]":t},ime=["class","block-ui"];function rme(i,t){if(1&i&&(G(0,"mat-label",7),Be(1),j()),2&i){const e=re(2);U("matTooltip",e.resourceDescription),V(1),Qi("",null==e.resource?null:e.resource.name," ")}}function sme(i,t){if(1&i&&(G(0,"mat-option",8),Be(1),j()),2&i){const e=t.$implicit,n=t.index,r=re(2);U("value",n)("disabled",r.disabled),V(1),Qi(" ",r.blockClassStr(e)," ")}}function ome(i,t){if(1&i){const e=jn();Gr(0),fe(1,rme,2,2,"mat-label",1),ct(2,"async"),G(3,"div",2)(4,"mat-label"),Be(5,"Resource type:"),j(),G(6,"mat-select",3),Oe("selectionChange",function(r){return Vt(e),Et(re().setChoiceIndex(r.value))}),fe(7,sme,2,3,"mat-option",4),j(),Ie(8,"app-block-actions",5),j(),Ie(9,"app-editor",6),Wr()}if(2&i){const e=re();let n;V(1),U("ngIf",(null==e.resource?null:e.resource.name)&&(null==e.resource?null:e.resource.name)!=(null==(n=ut(2,8,e.main.resource$))?null:n.name)),V(5),U("value",e.resourceData.choice_index)("disabled",e.disabled),V(1),U("ngForOf",e.resource.schema.possible_resource_schemas),V(1),U("resource",e.childResource),V(1),U("resource",e.childResource)("hideBlockActions",!0)("disabled",e.disabled)}}let _G=(()=>{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 $e,this.blockClassStr=gG}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:sc(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)(E(Fa))},i.\u0275cmp=ot({type:i,selectors:[["app-delegate",8,"block-ui"]],inputs:{resource:"resource",resourceDescription:"resourceDescription",hideBlockActions:"hideBlockActions",disabled:"disabled"},outputs:{changed:"changed"},attrs:ime,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"],[3,"resource","hideBlockActions","disabled"],["matTooltipPosition","above",3,"matTooltip"],[3,"value","disabled"]],template:function(e,n){1&e&&fe(0,ome,10,10,"ng-container",0),2&e&&U("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 ame=["class","block-ui"];function lme(i,t){if(1&i&&(G(0,"mat-label",7),Be(1),j()),2&i){const e=re(2);U("matTooltip",e.resourceDescription),V(1),Qi(" ",e.resource.name," ")}}function cme(i,t){if(1&i){const e=jn();Gr(0),fe(1,lme,2,2,"mat-label",1),G(2,"mat-selection-list",2),Oe("selectionChange",function(r){return Vt(e),Et(re().onSelection(r))}),G(3,"mat-list-option",3),Be(4," Left "),j(),G(5,"mat-list-option",4),Be(6," Right "),j()(),G(7,"mat-form-field",5)(8,"mat-label"),Be(9,"Texture ID"),j(),G(10,"input",6),Oe("ngModelChange",function(r){return Vt(e),Et(re().resource.data.texture_id=r)})("change",function(){return Vt(e),Et(re().changed.emit())}),j()(),Wr()}if(2&i){const e=re();V(1),U("ngIf",e.resource.name),V(2),U("selected",e.resource.data.has_left_fence),V(2),U("selected",e.resource.data.has_right_fence),V(5),U("max",63)("min",0)("step",1)("ngModel",e.resource.data.texture_id)}}let dme=(()=>{class i{constructor(){this.resource=null,this.resourceDescription="",this.changed=new $e}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=ot({type:i,selectors:[["app-fence-type",8,"block-ui"]],inputs:{resource:"resource",resourceDescription:"resourceDescription"},outputs:{changed:"changed"},attrs:ame,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&&fe(0,cme,11,7,"ng-container",0),2&e&&U("ngIf",n.resource)},dependencies:[_i,_l,mu,nc,_u,gu,Zc,yl,Ro,rc,Fs,MC,wC],changeDetection:0}),i})(),ume=(()=>{class i{constructor(){this._resource=null,this.resourceMap={},this.changed=new $e}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]=["",vl.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)(E(ib),E(bte),E(oR))},i.\u0275cmp=ot({type:i,selectors:[["app-run-custom-action",8,"dialog"]],attrs:hme,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&&(G(0,"h1",0),Be(1),j(),G(2,"div",1)(3,"p"),Be(4),j()(),G(5,"form",2),fe(6,fme,4,4,"mat-form-field",3),j(),G(7,"div",4)(8,"button",5),Oe("click",function(){return n.dialogRef.close()}),Be(9,"Cancel"),j(),G(10,"button",6),Oe("click",function(){return n.submit()}),Be(11,"Run"),j()()),2&e&&(V(1),Qi('Run action "',n.data.title,'"'),V(3),ui(n.data.description),V(1),U("formGroup",n.argsForm),V(1),U("ngForOf",n.data.args),V(4),U("disabled",n.argsForm.invalid))},dependencies:[lo,IR,_l,nc,bR,yl,Ro,rc,rb,pV,mV,gV,Gh,fC],styles:["form[_ngcontent-%COMP%]{padding:0 24px}"]}),i})();function vG(i,t){return t?e=>Sy(t.pipe(Oi(1),function mme(){return ni((i,t)=>{i.subscribe(qn(t,ms))})}()),e.pipe(vG(i))):rr((e,n)=>Mr(i(e,n)).pipe(Oi(1),qB(e)))}function yG(i,t=Gy){const e=OI(i,t);return vG(()=>e)}const gme=["mat-menu-item",""];function _me(i,t){1&i&&(ki(),G(0,"svg",3),Ie(1,"polygon",4),j())}const vme=[[["mat-icon"],["","matMenuItemIcon",""]],"*"],yme=["mat-icon, [matMenuItemIcon]","*"];function bme(i,t){if(1&i){const e=jn();G(0,"div",0),Oe("keydown",function(r){return Vt(e),Et(re()._handleKeydown(r))})("click",function(){return Vt(e),Et(re().closed.emit("click"))})("@transformMenu.start",function(r){return Vt(e),Et(re()._onAnimationStart(r))})("@transformMenu.done",function(r){return Vt(e),Et(re()._onAnimationDone(r))}),G(1,"div",1),Yt(2),j()()}if(2&i){const e=re();U("id",e.panelId)("ngClass",e._classList)("@transformMenu",e._panelAnimationState),It("aria-label",e.ariaLabel||null)("aria-labelledby",e.ariaLabelledby||null)("aria-describedby",e.ariaDescribedby||null)}}const xme=["*"],wO=new me("MAT_MENU_PANEL"),wme=YM(jM(class{}));let eE=(()=>{class i extends wme{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 Te,this._focused=new Te,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",Yr("120ms cubic-bezier(0, 0, 0.2, 1)",oi({opacity:1,transform:"scale(1)"}))),Or("* => void",Yr("100ms 25ms linear",oi({opacity:0})))]),fadeInItems:Oa("fadeInItems",[Os("showing",oi({opacity:1})),Or("void => *",[oi({opacity:0}),Yr("400ms 100ms cubic-bezier(0.55, 0, 0.55, 0.2)")])])};let Cme=0;const bG=new me("mat-menu-default-options",{providedIn:"root",factory:function Sme(){return{overlapTrigger:!1,xPosition:"after",yPosition:"below",backdropClass:"cdk-overlay-transparent-backdrop"}}});let t0=(()=>{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=tn(e)}get hasBackdrop(){return this._hasBackdrop}set hasBackdrop(e){this._hasBackdrop=tn(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 om,this._classList={},this._panelAnimationState="void",this._animationDone=new Te,this.overlayPanelClass=this._defaultOptions.overlayPanelClass||"",this.backdropClass=this._defaultOptions.backdropClass,this._overlapTrigger=this._defaultOptions.overlapTrigger,this._hasBackdrop=this._defaultOptions.hasBackdrop,this.closed=new $e,this.close=this.closed,this.panelId="mat-menu-panel-"+Cme++}ngOnInit(){this.setPositionClasses()}ngAfterContentInit(){this._updateDirectDescendants(),this._keyManager=new kU(this._directDescendantItems).withWrap().withTypeAhead().withHomeAndEnd(),this._keyManager.tabOut.subscribe(()=>this.closed.emit("tab")),this._directDescendantItems.changes.pipe(Do(this._directDescendantItems),ks(e=>Cr(...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(Do(this._directDescendantItems),ks(n=>Cr(...n.map(r=>r._hovered))))}addItem(e){}removeItem(e){}_handleKeydown(e){const n=e.keyCode,r=this._keyManager;switch(n){case 27:Qo(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(Oi(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(Do(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)(E(vt),E(gt),E(bG),E(Qn))},i.\u0275dir=ve({type:i,contentQueries:function(e,n,r){if(1&e&&(Wi(r,Mme,5),Wi(r,eE,5),Wi(r,eE,4)),2&e){let s;At(s=Dt())&&(n.lazyContent=s.first),At(s=Dt())&&(n._allItems=s),At(s=Dt())&&(n.items=s)}},viewQuery:function(e,n){if(1&e&&$n(Eo,5),2&e){let r;At(r=Dt())&&(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})(),Eme=(()=>{class i extends t0{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)(E(vt),E(gt),E(bG),E(Qn))},i.\u0275cmp=ot({type:i,selectors:[["mat-menu"]],hostVars:3,hostBindings:function(e,n){2&e&&It("aria-label",null)("aria-labelledby",null)("aria-describedby",null)},exportAs:["matMenu"],features:[Dn([{provide:wO,useExisting:i}]),dt],ngContentSelectors:xme,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&&(or(),fe(0,bme,3,6,"ng-template"))},dependencies:[hm],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:[tE.transformMenu,tE.fadeInItems]},changeDetection:0}),i})();const xG=new me("mat-menu-scroll-strategy"),Dme={provide:xG,deps:[as],useFactory:function Ame(i){return()=>i.scrollStrategies.reposition()}},wG=Fh({passive:!0});let Tme=(()=>{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,d){this._overlay=e,this._element=n,this._viewContainerRef=r,this._menuItemInstance=a,this._dir=l,this._focusMonitor=c,this._ngZone=d,this._overlayRef=null,this._menuOpen=!1,this._closingActionsSubscription=Qt.EMPTY,this._hoverSubscription=Qt.EMPTY,this._menuCloseSubscription=Qt.EMPTY,this._changeDetectorRef=Lt(Qn),this._handleTouchStart=h=>{qI(h)||(this._openedBy="touch")},this._openedBy=void 0,this.restoreFocus=!0,this.menuOpened=new $e,this.onMenuOpen=this.menuOpened,this.menuClosed=new $e,this.onMenuClose=this.menuClosed,this._scrollStrategy=s,this._parentMaterialMenu=o instanceof t0?o:void 0,n.nativeElement.addEventListener("touchstart",this._handleTouchStart,wG)}ngAfterContentInit(){this._handleHover()}ngOnDestroy(){this._overlayRef&&(this._overlayRef.dispose(),this._overlayRef=null),this._element.nativeElement.removeEventListener("touchstart",this._handleTouchStart,wG),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 t0&&(e._startAnimation(),e._directDescendantItems.changes.pipe(Ue(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 t0?(n._resetAnimation(),n.lazyContent?n._animationDone.pipe(gn(r=>"void"===r.toState),Oi(1),Ue(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],[d,h]=[r,s],p=0;if(this.triggersSubmenu()){if(h=r="before"===e.xPosition?"start":"end",s=d="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:d,overlayY:o,offsetY:p},{originX:s,originY:l,overlayX:h,overlayY:o,offsetY:p},{originX:r,originY:c,overlayX:d,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 Cr(e,this._parentMaterialMenu?this._parentMaterialMenu.closed:mt(),this._parentMaterialMenu?this._parentMaterialMenu._hovered().pipe(gn(o=>o!==this._menuItemInstance),gn(()=>this._menuOpen)):mt(),n)}_handleMousedown(e){YI(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(gn(e=>e===this._menuItemInstance&&!e.disabled),yG(0,PI)).subscribe(()=>{this._openedBy="mouse",this.menu instanceof t0&&this.menu._isAnimating?this.menu._animationDone.pipe(Oi(1),yG(0,PI),Ue(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)(E(as),E(vt),E(jr),E(xG),E(wO,8),E(eE,10),E(Pa,8),E(Xc),E(gt))},i.\u0275dir=ve({type:i,hostVars:3,hostBindings:function(e,n){1&e&&Oe("click",function(s){return n._handleClick(s)})("mousedown",function(s){return n._handleMousedown(s)})("keydown",function(s){return n._handleKeydown(s)}),2&e&&It("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})(),Ime=(()=>{class i extends Tme{}return i.\u0275fac=function(){let t;return function(n){return(t||(t=si(i)))(n||i)}}(),i.\u0275dir=ve({type:i,selectors:[["","mat-menu-trigger-for",""],["","matMenuTriggerFor",""]],hostAttrs:[1,"mat-mdc-menu-trigger"],exportAs:["matMenuTrigger"],features:[dt]}),i})(),Rme=(()=>{class i{}return i.\u0275fac=function(e){return new(e||i)},i.\u0275mod=en({type:i}),i.\u0275inj=Wt({providers:[Dme],imports:[co,tb,Jn,Pm,Ky,Jn]}),i})();function kme(i,t){if(1&i){const e=jn();G(0,"button",7),Oe("click",function(){return Vt(e),Et(re(2).deserialize())}),Ie(1,"mat-icon",8),j()}}function Pme(i,t){if(1&i){const e=jn();Gr(0),fe(1,kme,2,0,"button",4),G(2,"button",5),Oe("click",function(){return Vt(e),Et(re().serializeBlockReversible())}),Ie(3,"mat-icon",6),j(),Wr()}if(2&i){const e=re();V(1),U("ngIf",e.isInReversibleSerializationState),V(1),U("disabled",e.isInReversibleSerializationState)}}function Ome(i,t){1&i&&(G(0,"button",9),Ie(1,"mat-icon",10),j()),2&i&&(re(),U("matMenuTriggerFor",Zi(3)))}function Fme(i,t){if(1&i){const e=jn();G(0,"button",11),Oe("click",function(){const s=Vt(e).$implicit;return Et(re().runCustomAction(s))}),G(1,"span"),Be(2),j()()}if(2&i){const e=t.$implicit;V(2),ui(e.title)}}const Lme=function(){return[]};let nE=(()=>{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 nt(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)(E(Fa),E(Jl),E(Qn),E(Bm),E(RV))},i.\u0275cmp=ot({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&&(fe(0,Pme,4,2,"ng-container",0),fe(1,Ome,2,1,"button",1),G(2,"mat-menu",null,2),fe(4,Fme,3,1,"button",3),j()),2&e&&(U("ngIf",null==n.resource||null==n.resource.schema?null:n.resource.schema.serializable_to_disc),V(1),U("ngIf",(null==n.resource||null==n.resource.schema.custom_actions?null:n.resource.schema.custom_actions.length)>0),V(3),U("ngForOf",(null==n.resource?null:n.resource.schema.custom_actions)||Rs(3,Lme)))},dependencies:[lo,_i,Fs,XM,gR,Eme,eE,Ime],styles:["[_nghost-%COMP%]{display:flex}"]}),i})();const Nme=["class","block-ui"];function Bme(i,t){if(1&i&&(G(0,"mat-label",7),Be(1),j()),2&i){const e=re();U("matTooltip",e.resourceDescription),V(1),Qi("",null==e.resource?null:e.resource.name," ")}}function Ume(i,t){if(1&i&&(G(0,"audio",8),Ie(1,"source",9),ct(2,"async"),Be(3," Your browser does not support the audio element. "),j()),2&i){const e=re();V(1),U("src",ut(2,1,e.audioUrl$),Np)}}function Vme(i,t){1&i&&Ie(0,"mat-spinner",10)}function zme(i,t){1&i&&Ie(0,"app-block-actions",11),2&i&&U("resource",re().resource)}const Hme=function(){return["wave_data"]};let $me=(()=>{class i{constructor(e,n){this.eelDelegate=e,this.main=n,this._resource$=new Qe(null),this.audioUrl$=new Qe(null),this.resourceDescription="",this.hideBlockActions=!1,this.destroyed$=new Te,this.changed=new $e}set resource(e){this._resource$.next(e)}get resource(){return this._resource$.getValue()}ngAfterViewInit(){var e=this;return nt(function*(){e._resource$.pipe(Ue(e.destroyed$)).subscribe(function(){var n=nt(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)(E(Jl),E(Fa))},i.\u0275cmp=ot({type:i,selectors:[["app-eacs-audio",8,"block-ui"]],inputs:{resource:"resource",resourceDescription:"resourceDescription",hideBlockActions:"hideBlockActions"},outputs:{changed:"changed"},attrs:Nme,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&&(G(0,"div",0),fe(1,Bme,2,2,"mat-label",1),ct(2,"async"),fe(3,Ume,4,3,"audio",2),ct(4,"async"),fe(5,Vme,1,0,"mat-spinner",3),ct(6,"async"),Ie(7,"div",4),fe(8,zme,1,1,"app-block-actions",5),j(),Ie(9,"app-compound-block-ui",6),ct(10,"async")),2&e){let r;V(1),U("ngIf",(null==n.resource?null:n.resource.name)&&(null==n.resource?null:n.resource.name)!=(null==(r=ut(2,7,n.main.resource$))?null:r.name)),V(2),U("ngIf",ut(4,9,n.audioUrl$)),V(2),U("ngIf",n.resource&&!ut(6,11,n.audioUrl$)),V(3),U("ngIf",!n.hideBlockActions),V(1),U("resource",ut(10,13,n._resource$))("hideBlockActions",!0)("fieldBlacklist",Rs(15,Hme))}},dependencies:[_i,Ro,Fs,e0,ec,nE,Xo],styles:["#header[_ngcontent-%COMP%]{display:flex}"]}),i})();class Gme{constructor(t,e){this.mesh=t,this.assetsPath=e,this.textures=[],this.tyreTextureUpdateTimer=void 0,this.tyreMaterial=null,this.tyreTextures=[],this._color=65280,this._speed="idle",this._steeringAngle=0,this.wheels=[],this.wheelIdlePositions=[],this.frontWheels=[];let n=new Set;if(t.traverse(r=>{if(!(r instanceof Mn))return;let s=-1;if(r.name.startsWith("part_hp_12")?s=0:r.name.startsWith("part_hp_14")?s=1:r.name.startsWith("part_hp_16")?s=2:r.name.startsWith("part_hp_18")&&(s=3),s>-1){r.geometry.boundingBox||r.geometry.computeBoundingBox();let a=Re.avg(r.geometry.boundingBox.min,r.geometry.boundingBox.max);return(0==s||2==s)&&(a={x:a.x,y:a.y,z:a.z+1.5}),r.geometry.translate(...Re.spr(Re.neg(a))),r.position.set(...Re.spr(a)),this.wheelIdlePositions[s]=a,this.wheels.push(r),void(s<2&&this.frontWheels.push(r))}const o=r.material.map;o&&n.add(o)}),this.textures=Array.from(n).map(r=>{const s=new Oo(document.createElement("img"));return s.flipY=r.flipY,oa(s),[r,s]}),t.traverse(r=>{if(!(r instanceof Mn))return;const s=r.material.map;if(s){const o=this.textures.find(([a,l])=>a===s);o&&(r.material.map=o[1])}}),this.hasWheels){const r=new Pu;this.tyreTextures=[0,1,2,3].map(s=>r.load(`${e}/m${s}00.png`));for(const s of this.tyreTextures)oa(s);this.tyreMaterial=new qi({map:this.tyreTextures[0]}),this.tyreMaterial.transparent=!0,this.tyreMaterial.alphaTest=.5,this.tyreMaterial.map.wrapS=er,this.tyreMaterial.map.wrapT=er,this.tyreMaterial.polygonOffset=!0,this.tyreMaterial.polygonOffsetFactor=-4;for(const s of this.wheels)s.material=this.tyreMaterial}this.color=65280,this.recolorCar().then()}get color(){return this._color}set color(t){t!==this._color&&(this._color=t,this.recolorCar().then())}get speed(){return this._speed}set speed(t){if(t!==this._speed){switch(this._speed=t,this.tyreTextureUpdateTimer&&clearInterval(this.tyreTextureUpdateTimer),t){case"idle":this.tyreMaterial.map=this.tyreTextures[0];break;case"slow":let e=!0;this.tyreTextureUpdateTimer=setInterval(()=>{this.tyreMaterial.map=this.tyreTextures[e?1:2],this.tyreMaterial.needsUpdate=!0,e=!e},16);break;case"fast":this.tyreMaterial.map=this.tyreTextures[3]}this.tyreMaterial.needsUpdate=!0}}get steeringAngle(){return this._steeringAngle}set steeringAngle(t){if(t!==this._steeringAngle){this._steeringAngle=t;for(const e of this.frontWheels)e.rotation.set(0,0,t)}}get hasWheels(){return this.wheels.length>0}recolorCar(){var t=this;return nt(function*(){const[e,n,r]=[t.color>>16,t.color>>8&255,255&t.color];for(const[s,o]of t.textures){for(let a=100;a>0&&!s.source.data;a--)yield pG(50);mG(s.source.data,(a,l)=>{if(a[l]+a[l+2]{class i{constructor(e,n,r){this.eelDelegate=e,this.main=n,this.cdr=r,this._resource$=new Qe(null),this.changed=new $e,this.customControls=[],this.previewPaths$=new Qe(null),this.destroyed$=new Te,this.serializerSettings={geometry__save_obj:!0,geometry__save_blend:!1,geometry__export_to_gg_web_engine:!1}}get resource(){return this._resource$.getValue()}set resource(e){this._resource$.next(e)}ngAfterViewInit(){var e=this;return nt(function*(){e._resource$.pipe(Ue(e.destroyed$)).subscribe(function(){var n=nt(function*(r){e.previewPaths$.next(yield e.loadPreviewFilePaths(r?.id))});return function(r){return n.apply(this,arguments)}}()),e.main.dataBlockChange$.pipe(Ue(e.destroyed$),gn(([n,r])=>!!e.resource&&n.startsWith(e.resource.id)),gl(1500)).subscribe(nt(function*(){e.previewPaths$.next(null),e.previewPaths$.next(yield e.postTmpUpdates(e.resource?.id))}))})()}onObjectLoaded(e){var n=this;return nt(function*(){try{const r=new Gme(e,n.previewPaths$.value[0].substring(0,n.previewPaths$.value[0].lastIndexOf("/"))+"/assets");let s=null;const o=a=>{s&&clearTimeout(s),s=setTimeout(()=>r.color=a,50)};n.customControls=[{title:"NFS2 car features",controls:[{label:"Car color",type:"color",value:65280,change:a=>o(a)}]}],r.hasWheels&&n.customControls[0].controls.push({label:"Car speed",type:"radio",options:["idle","slow","fast"],value:"idle",change:a=>{r.speed=a}},{label:"Steering angle",type:"slider",minValue:-.7,maxValue:.7,valueStep:.05,value:0,change:a=>{r.steeringAngle=a}}),n.cdr.markForCheck()}catch(r){console.error(r)}})()}postTmpUpdates(e){var n=this;return nt(function*(){if(e){const r=yield n.eelDelegate.serializeResourceTmp(e,Object.entries(n.main.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 nt(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)(E(Jl),E(Fa),E(Qn))},i.\u0275cmp=ot({type:i,selectors:[["app-geo-geometry",8,"block-ui"]],inputs:{resource:"resource"},outputs:{changed:"changed"},attrs:Wme,decls:4,vars:8,consts:[[3,"paths","groupFunction","customControls","onObjectLoaded"],[3,"resource",4,"ngIf"],[3,"resource"]],template:function(e,n){1&e&&(G(0,"app-obj-viewer",0),Oe("onObjectLoaded",function(s){return n.onObjectLoaded(s)}),ct(1,"async"),j(),fe(2,jme,2,3,"app-compound-block-ui",1),ct(3,"async")),2&e&&(U("paths",ut(1,4,n.previewPaths$))("groupFunction",n.previewObjectGroupFunc)("customControls",n.customControls),V(2),U("ngIf",!ut(3,6,n.main.hideHiddenFields$)))},dependencies:[_i,ec,hG,Xo],changeDetection:0}),i})();const qme=function(){return["children","items_descr"]};let Xme=(()=>{class i{constructor(){this._resource=null,this.hideBlockActions=!1,this.resourceMap={},this.changed=new $e}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:sc(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=ot({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&&Ie(0,"app-compound-block-ui",0)(1,"app-sidenav-res-list",1),2&e&&(U("resource",n.resource)("hideBlockActions",n.hideBlockActions)("fieldBlacklist",Rs(4,qme)),V(1),U("resources",n.resourceMap))},dependencies:[ec,xC],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})();const Kme=["previewCanvasContainer"],Zme=["previewCanvas"];function Qme(i,t){1&i&&Ie(0,"mat-spinner",16),2&i&&U("diameter",40)}function Jme(i,t){1&i&&Ie(0,"mat-spinner",17)}const ege=function(){return[]};var Tf=(()=>{return(i=Tf||(Tf={})).ThreeModel="model",i.Bitmap="bitmap",i.TwoSidedBitmap="two_sided_bitmap",Tf;var i})();class tge extends QH{constructor(t,e,n){super(t,{loadDepth:40,inertia:2}),this.mapGraph=t,this.qfsPath=e,this.hideUnknownEntities$=n,this.textureLoader=new Pu,this.terrainMaterials={},this.objLoader=new Jb,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(Ql(),Ue(this._onRemoved$)).subscribe(e=>{for(const n of this.unknownEntities)n.visible=!e})}getPlaceholderTexture(){var t=this;return nt(function*(){return t._placeholder?t._placeholder:(t._placeholderPromise||(t._placeholderPromise=t.textureLoader.loadAsync("assets/placeholder_texture.png")),t._placeholderPromise)})()}getPlaceholderTerrainTexture(){var t=this;return nt(function*(){return t._placeholderTerrain?t._placeholderTerrain:(t._placeholderTerrainPromise||(t._placeholderTerrainPromise=t.textureLoader.loadAsync("assets/placeholder_texture.png").then(e=>(e.wrapS=Bs,e.wrapT=Bs,oa(e),e))),t._placeholderTerrainPromise)})()}loadChunk(t){var e=this;return nt(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 Mn&&(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:Re.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:Yi.fromAngle(Re.nZ,l.rotation)}));const o=(yield Promise.all(s.map(l=>e.loadPropInternal(l)))).filter(l=>!!l),a=new ea({object3D:new sa(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 qi({side:Ns,transparent:!0,visible:!1}),this.qfsPath?this.textureLoader.loadAsync(`${this.qfsPath}/${t}.png`).then(e=>{e.wrapS=Bs,e.wrapT=Bs,oa(e),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 nt(function*(){let n=!1;if(t.type==Tf.ThreeModel){let r;try{if(!e.qfsPath)throw new Error;const o=new xO,a=new Jb,l=yield o.loadAsync(`${e.qfsPath}/props/${t.data.data.resource_id}/0/material.mtl`);l.preload(),a.setMaterials(l),r=new sa(yield a.loadAsync(`${e.qfsPath}/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 Mn){const a=o.material instanceof Array?o.material:[o.material];for(const l of a)l.transparent=!0,l.alphaTest=.5,l instanceof qi&&l.map&&(l.map.wrapS=Bs,l.map.wrapT=Bs,oa(l.map),l.map.needsUpdate=!0)}});const s=new ea({object3D: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==Tf.Bitmap||t.type==Tf.TwoSidedBitmap){const r=(c,d)=>new Array(d).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 No,[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==Tf.TwoSidedBitmap){const[c,d]=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 ea({object3D:new sa(s)});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 nt(function*(){const s=t.split(";"),o=yield r.getPlaceholderTexture();let a=!1,l=[];r.qfsPath?l=yield Promise.all(s.map(h=>r.textureLoader.loadAsync(`${r.qfsPath}/foreground/${h}.png`).catch(()=>(a=!0,o)))):(a=!0,l=s.map(()=>o));const c=l.map(h=>(oa(h),new qi({map:h,alphaTest:.5,transparent:!0,side:Ns}))),d=new Mn(new Iu(e.x,e.y),c[0]);if(d.rotateX(Math.PI/2),d.position.set(0,0,e.y/2),c.length>1){let h=-1;Ym(r.world).pipe(o4(n&&!isNaN(+n)?1e3*+n:250)).subscribe(()=>{h=(h+1)%c.length,d.material=c[h]})}return[d,a]})()}}let nge=(()=>{class i{constructor(e,n,r){this.eelDelegate=e,this.cdr=n,this.mainService=r,this._resource$=new Qe(null),this.changed=new $e,this.previewLoading$=new Qe(!0),this.previewQfsLocation$=new Qe(null),this.previewQfsLoading$=new Qe(!1),this.pointer$=new Qe(null),this.selectedSplineIndex$=new Qe(0),this.qfsPath=null,this.name="",this.renderer=null,this.map=null,this.roadPath=null,this.destroyed$=new Te}get resource(){return this._resource$.getValue()}set resource(e){this._resource$.next(e)}ngAfterViewInit(){var e=this;return nt(function*(){var s;e.world=new ok(new yO,{init:(s=nt(function*(){}),function(){return s.apply(this,arguments)}),simulate:()=>{},loader:{loadFromGgGlb:function(){var s=nt(function*(...o){return[]});return function(){return s.apply(this,arguments)}}()}}),yield e.world.init(),e.skySphere=new ea({object3D:e.world.visualScene.factory.createPrimitive({shape:"SPHERE",radius:1e3},{color:16777215})}),e.skySphere.object3D.nativeMesh.material.side=Ns,e.world.addEntity(e.skySphere),e.selectionSphere=new ea({object3D: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 GS(16777215,2));let n=new Qe({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=Yi.lookAt(e.renderer.camera.position,Re.add(e.renderer.camera.position,Re.Y),Re.Z),Ym(e.world).pipe(Ue(e.destroyed$)).subscribe(()=>{e.renderer&&(e.skySphere.position=e.renderer.camera.position,e.pointer$.next(e.renderer.camera.position))}),e.controller=new n4(e.world.keyboardInput,e.renderer,{mouseOptions:{canvas:e.previewCanvas.nativeElement,pointerLock:!0},keymap:"wasd+arrows",cameraLinearSpeed:40,cameraBoostMultiplier:4,cameraMovementElasticity:100,cameraRotationElasticity:30,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(Ue(e.destroyed$)).subscribe(function(){var s=nt(function*(o){e.roadPath=e.resource?.data.block_positions.map(a=>({x:a.x,y:a.z,z:a.y})),e.previewLoading$.next(!0),o?(e.previewQfsLocation$.next(o.id.substring(0,o.id.indexOf(".TRK"))+"0.QFS"),yield e.loadTerrainChunks(o.id),yield e.onQfsSelected(e.previewQfsLocation$.value)):(yield e.loadTerrainChunks(),yield e.loadPreview()),e.previewLoading$.next(!1)});return function(o){return s.apply(this,arguments)}}()),e.mainService.dataBlockChange$.pipe(Ue(e.destroyed$),gn(([s,o])=>!!e.resource&&s.startsWith(e.resource.id)),gl(3e3)).subscribe(nt(function*(){e.roadPath=e.resource?.data.block_positions.map(s=>({x:s.x,y:s.z,z:s.y})),e.previewLoading$.next(!0),yield e.postTmpUpdates(e.resource?.id),yield e.loadPreview(),e.previewLoading$.next(!1)})),e.selectedSplineIndex$.pipe(Ue(e.destroyed$),gl(250)).subscribe(s=>{if(e.resource){let o=e.resource.data.block_positions[s];if(!o)return;o={x:o.x,y:o.z,z:o.y},e.selectionSphere.position=o,e.renderer&&(e.renderer.position=Re.add(o,Re.rotAround({x:10,y:-12,z:5},{x:0,y:0,z:1},-0)),e.renderer.rotation=Yi.lookAt(e.renderer.position,o,{x:0,y:0,z:1}),e.controller.reset())}})})()}onQfsSelected(e){var n=this;return nt(function*(){if(n.qfsPath!=e){n.previewQfsLoading$.next(!0);try{const r=yield n.eelDelegate.serializeResource(e),s=new Pu,o=r.find(a=>a.endsWith("spherical.png"));if(o){const a=yield s.loadAsync(o);a.colorSpace="srgb",a.mapping=cc,n.skySphere.object3D.nativeMesh.material.map=a}else n.skySphere.object3D.nativeMesh.material.map=null;n.skySphere.object3D.nativeMesh.material.needsUpdate=!0,n.qfsPath=e}catch{n.skySphere.object3D.nativeMesh.material.map=null,n.skySphere.object3D.nativeMesh.material.needsUpdate=!0,n.qfsPath=null}finally{n.previewQfsLoading$.next(!1)}yield n.loadPreview()}})()}loadTerrainChunks(e){var n=this;return nt(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})()}onPointerChange(e){this.renderer&&(this.renderer.position=e)}loadPreview(){var e=this;return nt(function*(){if(!e.terrainChunksObjLocation||!e.roadPath)return;const n=Km.fromMapArray(e.roadPath.map((r,s)=>({path:`${e.terrainChunksObjLocation}terrain_chunk_${s}`,position:r,loadOptions:{}}))||[],!0);e.unloadPreview(),e.map=new tge(n,e.qfsPath&&"resources/"+e.qfsPath,e.mainService.hideHiddenFields$),e.map.resource=e.resource,e.map.isOpenedTrack=!1,Ym(e.world).pipe(Ue(e.destroyed$)).subscribe(()=>{e.map&&e.renderer&&e.map.loaderCursor$.next(e.renderer.position)}),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 nt(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)(E(Jl),E(Qn),E(Fa))},i.\u0275cmp=ot({type:i,selectors:[["app-trk-map-block-ui"]],viewQuery:function(e,n){if(1&e&&($n(Kme,5),$n(Zme,5)),2&e){let r;At(r=Dt())&&(n.previewCanvasContainer=r.first),At(r=Dt())&&(n.previewCanvas=r.first)}},inputs:{resource:"resource"},outputs:{changed:"changed"},decls:32,vars:26,consts:[[1,"qfsSelector"],["appearance","fill"],["matInput","","type","text",3,"value"],["customQfsInput",""],["mat-button","",3,"click"],["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","projection","pointerChange"],[3,"resource"],["mode","indeterminate",3,"diameter"],["mode","indeterminate"]],template:function(e,n){if(1&e){const r=jn();G(0,"div",0)(1,"h4"),Be(2,"Preview QFS file"),j(),G(3,"mat-form-field",1)(4,"mat-label"),Be(5,"Custom QFS path"),j(),Ie(6,"input",2,3),ct(8,"async"),j(),G(9,"button",4),Oe("click",function(){Vt(r);const o=Zi(7);return Et(n.onQfsSelected(o.value))}),Be(10,"LOAD"),j(),fe(11,Qme,1,1,"mat-spinner",5),ct(12,"async"),j(),G(13,"div",6)(14,"div",7,8),Ie(16,"canvas",9,10),fe(18,Jme,1,0,"mat-spinner",11),ct(19,"async"),j(),G(20,"div",12,8)(22,"mat-form-field",1)(23,"mat-label"),Be(24,"Spline item"),j(),G(25,"input",13),Oe("ngModelChange",function(o){return n.selectedSplineIndex$.next(o)}),ct(26,"async"),ct(27,"async"),j()(),G(28,"app-minimap",14),Oe("pointerChange",function(o){return n.onPointerChange(o)}),ct(29,"async"),j()()(),Ie(30,"app-compound-block-ui",15),ct(31,"async")}if(2&e){let r;V(6),U("value",ut(8,11,n.previewQfsLocation$)),V(5),U("ngIf",ut(12,13,n.previewQfsLoading$)),V(7),U("ngIf",ut(19,15,n.previewLoading$)),V(7),U("min",0)("max",4*(null==(r=ut(26,17,n._resource$))?null:r.data.num_blocks)-1)("ngModel",ut(27,19,n.selectedSplineIndex$)),V(3),U("roadSpline",n.roadPath||Rs(25,ege))("pointer",ut(29,21,n.pointer$))("splineClosed",!0)("projection","nz"),V(2),U("resource",ut(31,23,n._resource$))}},dependencies:[_i,_l,mu,nc,_u,gu,Zc,yl,Ro,rc,rb,e0,ec,fG,Xo],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-minimap[_ngcontent-%COMP%]{flex-grow:1;display:flex}.qfsSelector[_ngcontent-%COMP%]{display:flex;align-items:center;width:100%;column-gap:1rem}.qfsSelector[_ngcontent-%COMP%] h4[_ngcontent-%COMP%]{min-width:-moz-fit-content;min-width:fit-content}.qfsSelector[_ngcontent-%COMP%] mat-form-field[_ngcontent-%COMP%]{flex-grow:1}.qfsSelector[_ngcontent-%COMP%] mat-spinner[_ngcontent-%COMP%], .qfsSelector[_ngcontent-%COMP%] button[_ngcontent-%COMP%]{margin-bottom:1.34375em}"],changeDetection:0}),i})();function ige(i,t){if(1&i&&(G(0,"mat-error"),Be(1),j()),2&i){const e=re(2);V(1),Dh(" ",e.resourceError.data.error_class,": ",e.resourceError.data.error_text," ")}}function rge(i,t){1&i&&Ie(0,"mat-spinner",5)}function sge(i,t){if(1&i&&(G(0,"div",2),fe(1,ige,2,2,"mat-error",3),fe(2,rge,1,0,"mat-spinner",4),j()),2&i){const e=re();V(1),U("ngIf",e.resourceError),V(1),U("ngIf",!e.resourceError)}}function oge(i,t){}let n0=(()=>{class i{constructor(e,n){this.mainService=e,this.deep=n,this._component=null,this._componentChangedSub=null,this.destroyed$=new Te,this.resourceSet$=new Te,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)}resourceEqual(e,n){return e&&n?e.id===n.id&&this.deep.deepEquals(e.data,n.data):!e==!n}set resource(e){if(!this.resourceEqual(e,this._resourceError||this._resource)&&(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(Ue(this.destroyed$),Ue(this.resourceSet$)).subscribe(()=>{const s=this._resource.id,o=this._resource.data;if(o instanceof Array)if(this._resource.schema.block_class_mro.startsWith("BytesBlock"))this.mainService.dataBlockChange$.next([s,o]);else 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 age(i,t){1&i&&Ie(0,"mat-icon",17)}function lge(i,t){1&i&&Ie(0,"mat-icon",18)}let cge=(()=>{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 nt(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 nt(function*(){if(e.mainService.hasUnsavedChanges){let n=e.dialog.open(SV,{data:{text:"There are unsaved changes, which will be lost. Are you sure you want to reload file?"}});if(!(yield lR(n.afterClosed())))return}yield e.mainService.reloadResource(),e.cdr.markForCheck()})()}}return i.\u0275fac=function(e){return new(e||i)(E(Jl),E(Fa),E(Bm),E(RV),E(Qn))},i.\u0275cmp=ot({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&&(G(0,"mat-toolbar",0)(1,"span"),Be(2),ct(3,"async"),ct(4,"async"),j(),Ie(5,"span",1),G(6,"button",2),Oe("click",function(){return n.toggleUnknownsVisibility()}),fe(7,age,1,0,"mat-icon",3),ct(8,"async"),fe(9,lge,1,0,"mat-icon",4),ct(10,"async"),j(),Ie(11,"mat-divider",5)(12,"app-block-actions",6),ct(13,"async"),G(14,"button",7),Oe("click",function(){return n.reloadResource()}),ct(15,"async"),Ie(16,"mat-icon",8),j(),Ie(17,"mat-divider",5),G(18,"button",9),Oe("click",function(){return n.saveResource()}),ct(19,"async"),ct(20,"async"),Ie(21,"mat-icon",10),j()(),G(22,"div",11),Ie(23,"div",12)(24,"app-editor",13),ct(25,"async"),ct(26,"async"),ct(27,"async"),G(28,"div",14)(29,"a",15),Ie(30,"img",16),j()(),Ie(31,"div",12),j()),2&e){let r;V(2),Dh("",(null==(r=ut(3,9,n.mainService.resource$))?null:r.name)||"...","",ut(4,11,n.mainService.hasUnsavedChanges$)?"*":"",""),V(5),U("ngIf",ut(8,13,n.mainService.hideHiddenFields$)),V(2),U("ngIf",!ut(10,15,n.mainService.hideHiddenFields$)),V(3),U("resource",ut(13,17,n.mainService.resource$)),V(2),U("disabled",!ut(15,19,n.mainService.eelDelegate.openedResourcePath$)),V(4),U("disabled",!ut(19,21,n.mainService.resource$)||!ut(20,23,n.mainService.hasUnsavedChanges$)),V(6),U("resource",ut(25,25,n.mainService.customActionRunning$)?null:ut(26,27,n.mainService.resource$)||ut(27,29,n.mainService.error$))("hideBlockActions",!0)}},dependencies:[_i,CJ,EJ,Fs,XM,gR,n0,nE,Xo],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 MG(i){return new pe(3e3,!1)}function Gge(){return typeof window<"u"&&typeof window.document<"u"}function MO(){return typeof process<"u"&&"[object process]"==={}.toString.call(process)}function Nu(i){switch(i.length){case 0:return new nb;case 1:return i[0];default:return new aV(i)}}function CG(i,t,e,n,r=new Map,s=new Map){const o=[],a=[];let l=-1,c=null;if(n.forEach(d=>{const h=d.get("offset"),p=h==l,m=p&&c||new Map;d.forEach((g,b)=>{let v=b,y=g;if("offset"!==b)switch(v=t.normalizePropertyName(v,o),y){case rR:y=r.get(b);break;case Kc: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 kge(i){return new pe(3502,!1)}();return a}function CO(i,t,e,n){switch(t){case"start":i.onStart(()=>n(e&&SO(e,"start",i)));break;case"done":i.onDone(()=>n(e&&SO(e,"done",i)));break;case"destroy":i.onDestroy(()=>n(e&&SO(e,"destroy",i)))}}function SO(i,t,e){const s=EO(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 EO(i,t,e,n,r="",s=0,o){return{element:i,triggerName:t,fromState:e,toState:n,phaseName:r,totalTime:s,disabled:!!o}}function aa(i,t,e){let n=i.get(t);return n||i.set(t,n=e),n}function SG(i){const t=i.indexOf(":");return[i.substring(1,t),i.slice(t+1)]}let AO=(i,t)=>!1,EG=(i,t,e)=>[],AG=null;function DO(i){const t=i.parentNode||i.host;return t===AG?null:t}(MO()||typeof Element<"u")&&(Gge()?(AG=(()=>document.documentElement)(),AO=(i,t)=>{for(;t;){if(t===i)return!0;t=DO(t)}return!1}):AO=(i,t)=>i.contains(t),EG=(i,t,e)=>{if(e)return Array.from(i.querySelectorAll(t));const n=i.querySelector(t);return n?[n]:[]});let If=null,DG=!1;const TG=AO,IG=EG;let RG=(()=>{class i{validateStyleProperty(e){return function jge(i){If||(If=function Yge(){return typeof document<"u"?document.body:null}()||{},DG=!!If.style&&"WebkitAppearance"in If.style);let t=!0;return If.style&&!function Wge(i){return"ebkit"==i.substring(1,6)}(i)&&(t=i in If.style,!t&&DG&&(t="Webkit"+i.charAt(0).toUpperCase()+i.slice(1)in If.style)),t}(e)}matchesElement(e,n){return!1}containsElement(e,n){return TG(e,n)}getParentElement(e){return DO(e)}query(e,n,r){return IG(e,n,r)}computeStyle(e,n,r){return r||""}animate(e,n,r,s,o,a=[],l){return new nb(r,s)}}return i.\u0275fac=function(e){return new(e||i)},i.\u0275prov=Pe({token:i,factory:i.\u0275fac}),i})(),TO=(()=>{class i{}return i.NOOP=new RG,i})();const qge=1e3,IO="ng-enter",iE="ng-leave",rE="ng-trigger",sE=".ng-trigger",PG="ng-animating",RO=".ng-animating";function fd(i){if("number"==typeof i)return i;const t=i.match(/^(-?[\.\d]+)(m?s)/);return!t||t.length<2?0:kO(parseFloat(t[1]),t[2])}function kO(i,t){return"s"===t?i*qge:i}function oE(i,t,e){return i.hasOwnProperty("duration")?i:function Kge(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(MG()),{duration:0,delay:0,easing:""};r=kO(parseFloat(a[1]),a[2]);const l=a[3];null!=l&&(s=kO(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 dge(){return new pe(3100,!1)}()),a=!0),s<0&&(t.push(function uge(){return new pe(3101,!1)}()),a=!0),a&&t.splice(l,0,MG())}return{duration:r,delay:s,easing:o}}(i,t,e)}function r0(i,t={}){return Object.keys(i).forEach(e=>{t[e]=i[e]}),t}function OG(i){const t=new Map;return Object.keys(i).forEach(e=>{t.set(e,i[e])}),t}function Bu(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 LG(i,t,e){return e?t+":"+e+";":""}function NG(i){let t="";for(let e=0;e{const s=OO(r);e&&!e.has(r)&&e.set(r,i.style[s]),i.style[s]=n}),MO()&&NG(i))}function Rf(i,t){i.style&&(t.forEach((e,n)=>{const r=OO(n);i.style[r]=""}),MO()&&NG(i))}function s0(i){return Array.isArray(i)?1==i.length?i[0]:rV(i):i}const PO=new RegExp("{{\\s*(.+?)\\s*}}","g");function BG(i){let t=[];if("string"==typeof i){let e;for(;e=PO.exec(i);)t.push(e[1]);PO.lastIndex=0}return t}function o0(i,t,e){const n=i.toString(),r=n.replace(PO,(s,o)=>{let a=t[o];return null==a&&(e.push(function fge(i){return new pe(3003,!1)}()),a=""),a.toString()});return r==n?i:r}function aE(i){const t=[];let e=i.next();for(;!e.done;)t.push(e.value),e=i.next();return t}const Jge=/-+([a-z0-9])/g;function OO(i){return i.replace(Jge,(...t)=>t[1].toUpperCase())}function e_e(i){return i.replace(/([a-z])([A-Z])/g,"$1-$2").toLowerCase()}function la(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 pge(i){return new pe(3004,!1)}()}}function UG(i,t){return window.getComputedStyle(i)[t]}const dE="*";function o_e(i,t){const e=[];return"string"==typeof i?i.split(/\s*,\s*/).forEach(n=>function a_e(i,t,e){if(":"==i[0]){const l=function l_e(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 Age(i){return new pe(3015,!1)}()),t;const r=n[1],s=n[2],o=n[3];t.push(VG(r,o));"<"==s[0]&&!(r==dE&&o==dE)&&t.push(VG(o,r))}(n,e,t)):e.push(i),e}const uE=new Set(["true","1"]),hE=new Set(["false","0"]);function VG(i,t){const e=uE.has(i)||hE.has(i),n=uE.has(t)||hE.has(t);return(r,s)=>{let o=i==dE||i==r,a=t==dE||t==s;return!o&&e&&"boolean"==typeof r&&(o=r?uE.has(i):hE.has(i)),!a&&n&&"boolean"==typeof s&&(a=s?uE.has(t):hE.has(t)),o&&a}}const c_e=new RegExp("s*:selfs*,?","g");function FO(i,t,e,n){return new d_e(i).build(t,e,n)}class d_e{constructor(t){this._driver=t}build(t,e,n){const r=new f_e(e);return this._resetContextStyleTimingState(r),la(this,s0(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 gge(){return new pe(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(d=>{l.name=d,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 _ge(){return new pe(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=>{BG(l).forEach(c=>{o.hasOwnProperty(c)||s.add(c)})})}),s.size&&(aE(s.values()),e.errors.push(function vge(i,t){return new pe(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=la(this,s0(t.animation),e);return{type:1,matchers:o_e(t.expr,e.errors),animation:n,queryCount:e.queryCount,depCount:e.depCount,options:kf(t.options)}}visitSequence(t,e){return{type:2,steps:t.steps.map(n=>la(this,n,e)),options:kf(t.options)}}visitGroup(t,e){const n=e.currentTime;let r=0;const s=t.steps.map(o=>{e.currentTime=n;const a=la(this,o,e);return r=Math.max(r,e.currentTime),a});return e.currentTime=r,{type:3,steps:s,options:kf(t.options)}}visitAnimate(t,e){const n=function m_e(i,t){if(i.hasOwnProperty("duration"))return i;if("number"==typeof i)return LO(oE(i,t).duration,0,"");const e=i;if(e.split(/\s+/).some(s=>"{"==s.charAt(0)&&"{"==s.charAt(1))){const s=LO(0,0,"");return s.dynamic=!0,s.strValue=e,s}const r=oE(e,t);return LO(r.duration,r.delay,r.easing)}(t.timings,e.errors);e.currentAnimateTimings=n;let r,s=t.styles?t.styles:oi({});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=oi(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===Kc?n.push(a):e.errors.push(new pe(3002,!1)):n.push(OG(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),d=c.get(l);let h=!0;d&&(s!=r&&s>=d.startTime&&r<=d.endTime&&(e.errors.push(function bge(i,t,e,n,r){return new pe(3010,!1)}()),h=!1),s=d.startTime),h&&c.set(l,{startTime:s,endTime:r}),e.options&&function Qge(i,t,e){const n=t.params||{},r=BG(i);r.length&&r.forEach(s=>{n.hasOwnProperty(s)||e.push(function hge(i){return new pe(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 xge(){return new pe(3011,!1)}()),n;let s=0;const o=[];let a=!1,l=!1,c=0;const d=t.steps.map(y=>{const M=this._makeStyleAst(y,e);let x=null!=M.offset?M.offset:function p_e(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:la(this,s0(t.animation),e),options:kf(t.options)}}visitAnimateChild(t,e){return e.depCount++,{type:9,options:kf(t.options)}}visitAnimateRef(t,e){return{type:10,animation:this.visitReference(t.animation,e),options:kf(t.options)}}visitQuery(t,e){const n=e.currentQuerySelector,r=t.options||{};e.queryCount++,e.currentQuery=t;const[s,o]=function u_e(i){const t=!!i.split(/\s*,\s*/).find(e=>":self"==e);return t&&(i=i.replace(c_e,"")),i=i.replace(/@\*/g,sE).replace(/@\w+/g,e=>sE+"-"+e.slice(1)).replace(/:animating/g,RO),[i,t]}(t.selector);e.currentQuerySelector=n.length?n+" "+s:s,aa(e.collectedStyles,e.currentQuerySelector,new Map);const a=la(this,s0(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:kf(t.options)}}visitStagger(t,e){e.currentQuery||e.errors.push(function Sge(){return new pe(3013,!1)}());const n="full"===t.timings?{duration:0,delay:0,easing:"full"}:oE(t.timings,e.errors,!0);return{type:12,animation:la(this,s0(t.animation),e),timings:n,options:null}}}class f_e{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 kf(i){return i?(i=r0(i)).params&&(i.params=function h_e(i){return i?r0(i):null}(i.params)):i={},i}function LO(i,t,e){return{duration:i,delay:t,easing:e}}function NO(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 fE{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 v_e=new RegExp(":enter","g"),b_e=new RegExp(":leave","g");function BO(i,t,e,n,r,s=new Map,o=new Map,a,l,c=[]){return(new x_e).buildKeyframes(i,t,e,n,r,s,o,a,l,c)}class x_e{buildKeyframes(t,e,n,r,s,o,a,l,c,d=[]){c=c||new fE;const h=new UO(t,e,c,r,s,d,[]);h.options=l;const p=l.delay?fd(l.delay):0;h.currentTimeline.delayNextStep(p),h.currentTimeline.setStyles([o],null,h.errors,l),la(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()):[NO(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:fd(o0(s,r?.params??{},e.errors));n.delayNextStep(o)}}}_visitSubInstructions(t,e,n){let s=e.currentTimeline.currentTime;const o=null!=n.duration?fd(n.duration):null,a=null!=n.delay?fd(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),la(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=pE);const o=fd(s.delay);r.delayNextStep(o)}t.steps.length&&(t.steps.forEach(o=>la(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?fd(t.options.delay):0;t.steps.forEach(o=>{const a=e.createSubContext(t.options);s&&a.delayNextStep(s),la(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 oE(e.params?o0(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?fd(r.delay):0;s&&(6===e.previousNode.type||0==n&&e.currentTimeline.hasCurrentStyleProperties())&&(e.currentTimeline.snapshotCurrentStyles(),e.previousNode=pE);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,d)=>{e.currentQueryIndex=d;const h=e.createSubContext(t.options,c);s&&h.delayNextStep(s),c===e.element&&(l=h.currentTimeline),la(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 d=e.currentTimeline;l&&d.delayNextStep(l);const h=d.currentTime;la(this,t.animation,e),e.previousNode=t,n.currentStaggerTime=r.currentTime-h+(r.startTime-n.currentTimeline.startTime)}}const pE={};class UO{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=pE,this.subContextCount=0,this.options={},this.currentQueryIndex=0,this.currentQueryTotal=0,this.currentStaggerTime=0,this.currentTimeline=l||new mE(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=fd(n.duration)),null!=n.delay&&(r.delay=fd(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]=o0(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 UO(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=pE,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 w_e(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(v_e,"."+this._enterClassName)).replace(b_e,"."+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 Ege(i){return new pe(3014,!1)}()),a}}class mE{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 mE(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||Kc),this._currentKeyframe.set(e,Kc);this._currentEmptyStepKeyframe=this._currentKeyframe}setStyles(t,e,n,r){e&&this._previousKeyframe.set("easing",e);const s=r&&r.params||{},o=function M_e(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,Kc)}else Bu(r,e)}),e}(t,this._globalTimelineStyles);for(let[a,l]of o){const c=o0(l,s,n);this._pendingStyles.set(a,c),this._localTimelineStyles.has(a)||this._backFill.set(a,this._globalTimelineStyles.get(a)??Kc),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=Bu(a,new Map,this._backFill);c.forEach((d,h)=>{d===rR?t.add(h):d===Kc&&e.add(h)}),n||c.set("offset",l/this.duration),r.push(c)});const s=t.size?aE(t.values()):[],o=e.size?aE(e.values()):[];if(n){const a=r[0],l=new Map(a);a.set("offset",0),l.set("offset",1),r=[a,l]}return NO(this.element,r,s,o,this.duration,this.startTime,this.easing,!1)}}class w_e extends mE{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=Bu(t[0]);l.set("offset",0),s.push(l);const c=Bu(t[0]);c.set("offset",$G(a)),s.push(c);const d=t.length-1;for(let h=1;h<=d;h++){let p=Bu(t[h]);const m=p.get("offset");p.set("offset",$G((e+m*n)/o)),s.push(p)}n=o,e=0,r="",t=s}return NO(this.element,t,this.preStyleProps,this.postStyleProps,n,e,r,!0)}}function $G(i,t=3){const e=Math.pow(10,t-1);return Math.round(i*e)/e}class VO{}const C_e=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 S_e extends VO{normalizePropertyName(t,e){return OO(t)}normalizeStyleValue(t,e,n,r){let s="";const o=n.toString().trim();if(C_e.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 mge(i,t){return new pe(3005,!1)}())}return o+s}}function GG(i,t,e,n,r,s,o,a,l,c,d,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:d,totalTime:h,errors:p}}const zO={};class WG{constructor(t,e,n){this._triggerName=t,this.ast=e,this._stateStyles=n}match(t,e,n,r){return function E_e(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,d){const h=[],p=this.ast.options&&this.ast.options.params||zO,g=this.buildStyles(n,a&&a.params||zO,h),b=l&&l.params||zO,v=this.buildStyles(r,b,h),y=new Set,M=new Map,x=new Map,C="void"===r,F={params:A_e(b,p),delay:this.ast.options?.delay},D=d?[]:BO(t,e,this.ast.animation,s,o,g,v,F,c,h);let k=0;if(D.forEach(T=>{k=Math.max(T.duration+T.delay,k)}),h.length)return GG(e,this._triggerName,n,r,C,g,v,[],[],M,x,k,h);D.forEach(T=>{const A=T.element,W=aa(M,A,new Set);T.preStyleProps.forEach(ne=>W.add(ne));const ie=aa(x,A,new Set);T.postStyleProps.forEach(ne=>ie.add(ne)),A!==e&&y.add(A)});const B=aE(y.values());return GG(e,this._triggerName,n,r,C,g,v,D,B,M,x,k)}}function A_e(i,t){const e=r0(t);for(const n in i)i.hasOwnProperty(n)&&null!=i[n]&&(e[n]=i[n]);return e}class D_e{constructor(t,e,n){this.styles=t,this.defaultParams=e,this.normalizer=n}buildStyles(t,e){const n=new Map,r=r0(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=o0(o,r,e));const l=this.normalizer.normalizePropertyName(a,e);o=this.normalizer.normalizeStyleValue(a,l,o,e),n.set(a,o)})}),n}}class I_e{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 D_e(r.style,r.options&&r.options.params||{},n))}),jG(this.states,"true","1"),jG(this.states,"false","0"),e.transitions.forEach(r=>{this.transitionFactories.push(new WG(t,r,this.states))}),this.fallbackTransition=function R_e(i,t,e){return new WG(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 jG(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 k_e=new fE;class P_e{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=FO(this._driver,e,n,r);if(n.length)throw function Pge(i){return new pe(3503,!1)}();this._animations.set(t,s)}_buildPlayer(t,e,n){const r=t.element,s=CG(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=BO(this._driver,e,s,IO,iE,new Map,new Map,n,k_e,r),o.forEach(d=>{const h=aa(a,d.element,new Map);d.postStyleProps.forEach(p=>h.set(p,null))})):(r.push(function Oge(){return new pe(3300,!1)}()),o=[]),r.length)throw function Fge(i){return new pe(3504,!1)}();a.forEach((d,h)=>{d.forEach((p,m)=>{d.set(m,this._driver.computeStyle(h,m,Kc))})});const c=Nu(o.map(d=>{const h=a.get(d.element);return this._buildPlayer(d,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 Lge(i){return new pe(3301,!1)}();return e}listen(t,e,n,r){const s=EO(e,"","","");return CO(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 YG="ng-animate-queued",HO="ng-animate-disabled",B_e=[],qG={namespaceId:"",setForRemoval:!1,setForMove:!1,hasAnimation:!1,removedBeforeQueried:!1},U_e={namespaceId:"",setForMove:!1,setForRemoval:!1,hasAnimation:!1,removedBeforeQueried:!0},za="__ng_removed";class $O{get params(){return this.options.params}constructor(t,e=""){this.namespaceId=e;const n=t&&t.hasOwnProperty("value");if(this.value=function $_e(i){return i??null}(n?t.value:t),n){const s=r0(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 a0="void",GO=new $O(a0);class V_e{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,Ha(e,this._hostClassName)}listen(t,e,n,r){if(!this._triggers.has(e))throw function Nge(i,t){return new pe(3302,!1)}();if(null==n||0==n.length)throw function Bge(i){return new pe(3303,!1)}();if(!function G_e(i){return"start"==i||"done"==i}(n))throw function Uge(i,t){return new pe(3400,!1)}();const s=aa(this._elementListeners,t,[]),o={name:e,phase:n,callback:r};s.push(o);const a=aa(this._engine.statesByElement,t,new Map);return a.has(e)||(Ha(t,rE),Ha(t,rE+"-"+e),a.set(e,GO)),()=>{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 Vge(i){return new pe(3401,!1)}();return e}trigger(t,e,n,r=!0){const s=this._getTrigger(e),o=new WO(this.id,e,t);let a=this._engine.statesByElement.get(t);a||(Ha(t,rE),Ha(t,rE+"-"+e),this._engine.statesByElement.set(t,a=new Map));let l=a.get(e);const c=new $O(n,this.id);if(!(n&&n.hasOwnProperty("value"))&&l&&c.absorbOptions(l.options),a.set(e,c),l||(l=GO),c.value!==a0&&l.value===c.value){if(!function Y_e(i,t){const e=Object.keys(i),n=Object.keys(t);if(e.length!=n.length)return!1;for(let r=0;r{Rf(t,v),fc(t,y)})}return}const p=aa(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||(Ha(t,YG),o.onStart(()=>{Yg(t,YG)})),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,sE,!0);n.forEach(r=>{if(r[za])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 d=this.trigger(t,c,a0,r);d&&a.push(d)}}),a.length)return this._engine.markElementAsRemoved(this.id,t,!0,e,o),n&&Nu(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)||GO,d=new $O(a0),h=new WO(this.id,o,t);this._engine.totalQueuedPlayers++,this._queue.push({element:t,triggerName:o,transition:l,fromState:c,toState:d,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[za];(!s||s===qG)&&(n.afterFlush(()=>this.clearElementCache(t)),n.destroyInnerAnimations(t),n._onRemovalComplete(t,e))}}insertNode(t,e){Ha(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=EO(s,n.triggerName,n.fromState.value,n.toState.value);l._data=t,CO(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 z_e{_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 V_e(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(gE(e)){const s=this._fetchNamespace(t);if(s)return s.trigger(e,n,r),!0}return!1}insertNode(t,e,n,r){if(!gE(e))return;const s=e[za];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),Ha(t,HO)):this.disabledNodes.has(t)&&(this.disabledNodes.delete(t),Yg(t,HO))}removeNode(t,e,n,r){if(gE(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[za]={namespaceId:t,setForRemoval:r,hasAnimation:n,removedBeforeQueried:!1,previousTriggersValues:s}}listen(t,e,n,r,s){return gE(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,sE,!0);e.forEach(n=>this.destroyActiveAnimationsForElement(n)),0!=this.playersByQueriedElement.size&&(e=this.driver.query(t,RO,!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 Nu(this.players).onDone(()=>t());t()})}processLeaveNode(t){const e=t[za];if(e&&e.setForRemoval){if(t[za]=qG,e.namespaceId){this.destroyInnerAnimations(t);const n=this._fetchNamespace(e.namespaceId);n&&n.clearElementCache(t)}this._onRemovalComplete(t,e.setForRemoval)}t.classList?.contains(HO)&&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?Nu(e).onDone(()=>{n.forEach(r=>r())}):n.forEach(r=>r())}}reportError(t){throw function zge(i){return new pe(3402,!1)}()}_flushAnimations(t,e){const n=new fE,r=[],s=new Map,o=[],a=new Map,l=new Map,c=new Map,d=new Set;this.disabledNodes.forEach(q=>{d.add(q);const se=this.driver.query(q,".ng-animate-queued",!0);for(let J=0;J{const J=IO+b++;g.set(se,J),q.forEach(we=>Ha(we,J))});const v=[],y=new Set,M=new Set;for(let q=0;qy.add(we)):M.add(se))}const x=new Map,C=ZG(p,Array.from(y));C.forEach((q,se)=>{const J=iE+b++;x.set(se,J),q.forEach(we=>Ha(we,J))}),t.push(()=>{m.forEach((q,se)=>{const J=g.get(se);q.forEach(we=>Yg(we,J))}),C.forEach((q,se)=>{const J=x.get(se);q.forEach(we=>Yg(we,J))}),v.forEach(q=>{this.processLeaveNode(q)})});const F=[],D=[];for(let q=this._namespaceList.length-1;q>=0;q--)this._namespaceList[q].drainQueuedTransitions(e).forEach(J=>{const we=J.player,Ve=J.element;if(F.push(we),this.collectedEnterElements.length){const Le=Ve[za];if(Le&&Le.setForMove){if(Le.previousTriggersValues&&Le.previousTriggersValues.has(J.triggerName)){const wt=Le.previousTriggersValues.get(J.triggerName),Tt=this.statesByElement.get(J.element);if(Tt&&Tt.has(J.triggerName)){const St=Tt.get(J.triggerName);St.value=wt,Tt.set(J.triggerName,St)}}return void we.destroy()}}const Ye=!h||!this.driver.containsElement(h,Ve),Rt=x.get(Ve),nn=g.get(Ve),le=this._buildInstruction(J,n,nn,Rt,Ye);if(le.errors&&le.errors.length)return void D.push(le);if(Ye)return we.onStart(()=>Rf(Ve,le.fromStyles)),we.onDestroy(()=>fc(Ve,le.toStyles)),void r.push(we);if(J.isFallbackTransition)return we.onStart(()=>Rf(Ve,le.fromStyles)),we.onDestroy(()=>fc(Ve,le.toStyles)),void r.push(we);const Fe=[];le.timelines.forEach(Le=>{Le.stretchStartingKeyframe=!0,this.disabledNodes.has(Le.element)||Fe.push(Le)}),le.timelines=Fe,n.append(Ve,le.timelines),o.push({instruction:le,player:we,element:Ve}),le.queriedElements.forEach(Le=>aa(a,Le,[]).push(we)),le.preStyleProps.forEach((Le,wt)=>{if(Le.size){let Tt=l.get(wt);Tt||l.set(wt,Tt=new Set),Le.forEach((St,Sn)=>Tt.add(Sn))}}),le.postStyleProps.forEach((Le,wt)=>{let Tt=c.get(wt);Tt||c.set(wt,Tt=new Set),Le.forEach((St,Sn)=>Tt.add(Sn))})});if(D.length){const q=[];D.forEach(se=>{q.push(function Hge(i,t){return new pe(3505,!1)}())}),F.forEach(se=>se.destroy()),this.reportError(q)}const k=new Map,B=new Map;o.forEach(q=>{const se=q.element;n.has(se)&&(B.set(se,se),this._beforeAnimationBuild(q.player.namespaceId,q.instruction,k))}),r.forEach(q=>{const se=q.element;this._getPreviousPlayers(se,!1,q.namespaceId,q.triggerName,null).forEach(we=>{aa(k,se,[]).push(we),we.destroy()})});const T=v.filter(q=>JG(q,l,c)),A=new Map;KG(A,this.driver,M,c,Kc).forEach(q=>{JG(q,l,c)&&T.push(q)});const ie=new Map;m.forEach((q,se)=>{KG(ie,this.driver,new Set(q),l,rR)}),T.forEach(q=>{const se=A.get(q),J=ie.get(q);A.set(q,new Map([...Array.from(se?.entries()??[]),...Array.from(J?.entries()??[])]))});const ne=[],oe=[],ge={};o.forEach(q=>{const{element:se,player:J,instruction:we}=q;if(n.has(se)){if(d.has(se))return J.onDestroy(()=>fc(se,we.toStyles)),J.disabled=!0,J.overrideTotalTime(we.totalTime),void r.push(J);let Ve=ge;if(B.size>1){let Rt=se;const nn=[];for(;Rt=Rt.parentNode;){const le=B.get(Rt);if(le){Ve=le;break}nn.push(Rt)}nn.forEach(le=>B.set(le,Ve))}const Ye=this._buildAnimation(J.namespaceId,we,k,s,ie,A);if(J.setRealPlayer(Ye),Ve===ge)ne.push(J);else{const Rt=this.playersByElement.get(Ve);Rt&&Rt.length&&(J.parentPlayer=Nu(Rt)),r.push(J)}}else Rf(se,we.fromStyles),J.onDestroy(()=>fc(se,we.toStyles)),oe.push(J),d.has(se)&&r.push(J)}),oe.forEach(q=>{const se=s.get(q.element);if(se&&se.length){const J=Nu(se);q.setRealPlayer(J)}}),r.forEach(q=>{q.parentPlayer?q.syncPlayerEvents(q.parentPlayer):q.destroy()});for(let q=0;q!Ye.destroyed);Ve.length?W_e(this,se,Ve):this.processLeaveNode(se)}return v.length=0,ne.forEach(q=>{this.players.push(q),q.onDone(()=>{q.destroy();const se=this.players.indexOf(q);this.players.splice(se,1)}),q.play()}),ne}elementContainsData(t,e){let n=!1;const r=e[za];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==a0;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,d=c!==s,h=aa(n,c,[]);this._getPreviousPlayers(c,d,o,a,e.toState).forEach(m=>{const g=m.getRealPlayer();g.beforeDestroy&&g.beforeDestroy(),m.destroy(),h.push(m)})}Rf(s,e.fromStyles)}_buildAnimation(t,e,n,r,s,o){const a=e.triggerName,l=e.element,c=[],d=new Set,h=new Set,p=e.timelines.map(g=>{const b=g.element;d.add(b);const v=b[za];if(v&&v.removedBeforeQueried)return new nb(g.duration,g.delay);const y=b!==l,M=function j_e(i){const t=[];return QG(i,t),t}((n.get(b)||B_e).map(k=>k.getRealPlayer())).filter(k=>!!k.element&&k.element===b),x=s.get(b),C=o.get(b),F=CG(0,this._normalizer,0,g.keyframes,x,C),D=this._buildPlayer(g,F,M);if(g.subTimeline&&r&&h.add(b),y){const k=new WO(t,a,b);k.setRealPlayer(D),c.push(k)}return D});c.forEach(g=>{aa(this.playersByQueriedElement,g.element,[]).push(g),g.onDone(()=>function H_e(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))}),d.forEach(g=>Ha(g,PG));const m=Nu(p);return m.onDestroy(()=>{d.forEach(g=>Yg(g,PG)),fc(l,e.toStyles)}),h.forEach(g=>{aa(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 nb(t.duration,t.delay)}}class WO{constructor(t,e,n){this.namespaceId=t,this.triggerName=e,this.element=n,this._player=new nb,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=>CO(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){aa(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 gE(i){return i&&1===i.nodeType}function XG(i,t){const e=i.style.display;return i.style.display=t??"none",e}function KG(i,t,e,n,r){const s=[];e.forEach(l=>s.push(XG(l)));const o=[];n.forEach((l,c)=>{const d=new Map;l.forEach(h=>{const p=t.computeStyle(c,h,r);d.set(h,p),(!p||0==p.length)&&(c[za]=U_e,o.push(c))}),i.set(c,d)});let a=0;return e.forEach(l=>XG(l,s[a++])),o}function ZG(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 Ha(i,t){i.classList?.add(t)}function Yg(i,t){i.classList?.remove(t)}function W_e(i,t,e){Nu(e).onDone(()=>i.processLeaveNode(t))}function QG(i,t){for(let e=0;er.add(s)):t.set(i,n),e.delete(i),!0}class _E{constructor(t,e,n){this.bodyNode=t,this._driver=e,this._normalizer=n,this._triggerCache={},this.onRemovalComplete=(r,s)=>{},this._transitionEngine=new z_e(t,e,n),this._timelineEngine=new P_e(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=[],d=FO(this._driver,s,l,c);if(l.length)throw function Rge(i,t){return new pe(3404,!1)}();a=function T_e(i,t,e){return new I_e(i,t,e)}(r,d,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]=SG(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]=SG(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 X_e=(()=>{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&&fc(this._element,this._startStyles,this._initialStyles),this._state=1)}finish(){this.start(),this._state<2&&(fc(this._element,this._initialStyles),this._endStyles&&(fc(this._element,this._endStyles),this._endStyles=null),this._state=1)}destroy(){this.finish(),this._state<3&&(i.initialStylesByElement.delete(this._element),this._startStyles&&(Rf(this._element,this._startStyles),this._endStyles=null),this._endStyles&&(Rf(this._element,this._endStyles),this._endStyles=null),fc(this._element,this._initialStyles),this._state=3)}}return i.initialStylesByElement=new WeakMap,i})();function jO(i){let t=null;return i.forEach((e,n)=>{(function K_e(i){return"display"===i||"position"===i})(n)&&(t=t||new Map,t.set(n,e))}),t}class e8{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:UG(this.element,r))}),this.currentSnapshot=t}triggerCallback(t){const e="start"===t?this._onStartFns:this._onDoneFns;e.forEach(n=>n()),e.length=0}}class Z_e{validateStyleProperty(t){return!0}validateAnimatableStyleProperty(t){return!0}matchesElement(t,e){return!1}containsElement(t,e){return TG(t,e)}getParentElement(t){return DO(t)}query(t,e,n){return IG(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,d=o.filter(m=>m instanceof e8);(function t_e(i,t){return 0===i||0===t})(n,r)&&d.forEach(m=>{m.currentSnapshot.forEach((g,b)=>c.set(b,g))});let h=function Zge(i){return i.length?i[0]instanceof Map?i:i.map(t=>OG(t)):[]}(e).map(m=>Bu(m));h=function n_e(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,UG(i,a)))}}return t}(t,h,c);const p=function q_e(i,t){let e=null,n=null;return Array.isArray(t)&&t.length?(e=jO(t[0]),t.length>1&&(n=jO(t[t.length-1]))):t instanceof Map&&(e=jO(t)),e||n?new X_e(i,e,n):null}(t,h);return new e8(t,h,l,p)}}let Q_e=(()=>{class i extends nV{constructor(e,n){super(),this._nextAnimationId=0,this._renderer=e.createRenderer(n.body,{id:"0",encapsulation:Ks.None,styles:[],data:{animation:[]}})}build(e){const n=this._nextAnimationId.toString();this._nextAnimationId++;const r=Array.isArray(e)?rV(e):e;return t8(this._renderer,null,n,"register",[r]),new J_e(n,this._renderer)}}return i.\u0275fac=function(e){return new(e||i)(ee(Gl),ee(qt))},i.\u0275prov=Pe({token:i,factory:i.\u0275fac}),i})();class J_e extends LQ{constructor(t,e){super(),this._id=t,this._renderer=e}create(t,e){return new eve(this._id,t,e||{},this._renderer)}}class eve{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 t8(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 t8(i,t,e,n,r){return i.setProperty(t,`@@${e}:${n}`,r)}const n8="@.disabled";let tve=(()=>{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 d=this._rendererCache.get(s);return d||(d=new i8("",s,this.engine,()=>this._rendererCache.delete(s)),this._rendererCache.set(s,d)),d}const o=n.id,a=n.id+"-"+this._currentId;this._currentId++,this.engine.register(a,e);const l=d=>{Array.isArray(d)?d.forEach(l):this.engine.registerTrigger(o,a,e,d.name,d)};return n.data.animation.forEach(l),new nve(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)(ee(Gl),ee(_E),ee(gt))},i.\u0275prov=Pe({token:i,factory:i.\u0275fac}),i})();class i8{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==n8?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 nve extends i8{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==n8?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 ive(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 rve(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 r8=[{provide:nV,useClass:Q_e},{provide:VO,useFactory:function ove(){return new S_e}},{provide:_E,useClass:(()=>{class i extends _E{constructor(e,n,r,s){super(e.body,n,r)}ngOnDestroy(){this.flush()}}return i.\u0275fac=function(e){return new(e||i)(ee(qt),ee(TO),ee(VO),ee(dm))},i.\u0275prov=Pe({token:i,factory:i.\u0275fac}),i})()},{provide:Gl,useFactory:function ave(i,t,e){return new tve(i,t,e)},deps:[lM,_E,gt]}],YO=[{provide:TO,useFactory:()=>new Z_e},{provide:kr,useValue:"BrowserAnimations"},...r8],s8=[{provide:TO,useClass:RG},{provide:kr,useValue:"NoopAnimations"},...r8];let lve=(()=>{class i{static withConfig(e){return{ngModule:i,providers:e.disableAnimations?s8:YO}}}return i.\u0275fac=function(e){return new(e||i)},i.\u0275mod=en({type:i}),i.\u0275inj=Wt({providers:YO,imports:[LB]}),i})();const o8=new me("CdkAccordion");let cve=0,dve=(()=>{class i{get expanded(){return this._expanded}set expanded(e){e=tn(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=tn(e)}constructor(e,n,r){this.accordion=e,this._changeDetectorRef=n,this._expansionDispatcher=r,this._openCloseAllSubscription=Qt.EMPTY,this.closed=new $e,this.opened=new $e,this.destroyed=new $e,this.expandedChange=new $e,this.id="cdk-accordion-child-"+cve++,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)(E(o8,12),E(Qn),E($R))},i.\u0275dir=ve({type:i,selectors:[["cdk-accordion-item"],["","cdkAccordionItem",""]],inputs:{expanded:"expanded",disabled:"disabled"},outputs:{closed:"closed",opened:"opened",destroyed:"destroyed",expandedChange:"expandedChange"},exportAs:["cdkAccordionItem"],features:[Dn([{provide:o8,useValue:void 0}])]}),i})(),uve=(()=>{class i{}return i.\u0275fac=function(e){return new(e||i)},i.\u0275mod=en({type:i}),i.\u0275inj=Wt({}),i})();const hve=["body"];function fve(i,t){}const pve=[[["mat-expansion-panel-header"]],"*",[["mat-action-row"]]],mve=["mat-expansion-panel-header","*","mat-action-row"];function gve(i,t){1&i&&Ie(0,"span",2),2&i&&U("@indicatorRotate",re()._getExpandedState())}const _ve=[[["mat-panel-title"]],[["mat-panel-description"]],"*"],vve=["mat-panel-title","mat-panel-description","*"],a8=new me("MAT_ACCORDION"),l8="225ms cubic-bezier(0.4,0.0,0.2,1)",c8={indicatorRotate:Oa("indicatorRotate",[Os("collapsed, void",oi({transform:"rotate(0deg)"})),Os("expanded",oi({transform:"rotate(180deg)"})),Or("expanded <=> collapsed, void => collapsed",Yr(l8))]),bodyExpansion:Oa("bodyExpansion",[Os("collapsed, void",oi({height:"0px",visibility:"hidden"})),Os("expanded",oi({height:"*",visibility:"visible"})),Or("expanded <=> collapsed, void => collapsed",Yr(l8))])},d8=new me("MAT_EXPANSION_PANEL");let yve=(()=>{class i{constructor(e,n){this._template=e,this._expansionPanel=n}}return i.\u0275fac=function(e){return new(e||i)(E(Eo),E(d8,8))},i.\u0275dir=ve({type:i,selectors:[["ng-template","matExpansionPanelContent",""]]}),i})(),bve=0;const u8=new me("MAT_EXPANSION_PANEL_DEFAULT_OPTIONS");let h8=(()=>{class i extends dve{get hideToggle(){return this._hideToggle||this.accordion&&this.accordion.hideToggle}set hideToggle(e){this._hideToggle=tn(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 $e,this.afterCollapse=new $e,this._inputChanges=new Te,this._headerId="mat-expansion-panel-header-"+bve++,this._bodyAnimationDone=new Te,this.accordion=e,this._document=o,this._bodyAnimationDone.pipe(Ql((c,d)=>c.fromState===d.fromState&&c.toState===d.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(Do(null),gn(()=>this.expanded&&!this._portal),Oi(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)(E(a8,12),E(Qn),E($R),E(jr),E(qt),E(kr,8),E(u8,8))},i.\u0275cmp=ot({type:i,selectors:[["mat-expansion-panel"]],contentQueries:function(e,n,r){if(1&e&&Wi(r,yve,5),2&e){let s;At(s=Dt())&&(n._lazyContent=s.first)}},viewQuery:function(e,n){if(1&e&&$n(hve,5),2&e){let r;At(r=Dt())&&(n._body=r.first)}},hostAttrs:[1,"mat-expansion-panel"],hostVars:6,hostBindings:function(e,n){2&e&&ln("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:[Dn([{provide:a8,useValue:void 0},{provide:d8,useExisting:i}]),dt,xi],ngContentSelectors:mve,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&&(or(pve),Yt(0),G(1,"div",0,1),Oe("@bodyExpansion.done",function(s){return n._bodyAnimationDone.next(s)}),G(3,"div",2),Yt(4,1),fe(5,fve,0,0,"ng-template",3),j(),Yt(6,2),j()),2&e&&(V(1),U("@bodyExpansion",n._getExpandedState())("id",n.id),It("aria-labelledby",n._headerId),V(4),U("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:[c8.bodyExpansion]},changeDetection:0}),i})();class xve{}const wve=JI(xve);let Mve=(()=>{class i extends wve{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=Qt.EMPTY;const c=e.accordion?e.accordion._stateChanges.pipe(gn(d=>!(!d.hideToggle&&!d.togglePosition))):_o;this.tabIndex=parseInt(l||"")||0,this._parentChangeSubscription=Cr(e.opened,e.closed,c,e._inputChanges.pipe(gn(d=>!!(d.hideToggle||d.disabled||d.togglePosition)))).subscribe(()=>this._changeDetectorRef.markForCheck()),e.closed.pipe(gn(()=>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:Qo(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)(E(h8,1),E(vt),E(Xc),E(Qn),E(u8,8),E(kr,8),wa("tabindex"))},i.\u0275cmp=ot({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&&Oe("click",function(){return n._toggle()})("keydown",function(s){return n._keydown(s)}),2&e&&(It("id",n.panel._headerId)("tabindex",n.tabIndex)("aria-controls",n._getPanelId())("aria-expanded",n._isExpanded())("aria-disabled",n.panel.disabled),qo("height",n._getHeaderHeight()),ln("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:[dt],ngContentSelectors:vve,decls:5,vars:3,consts:[[1,"mat-content"],["class","mat-expansion-indicator",4,"ngIf"],[1,"mat-expansion-indicator"]],template:function(e,n){1&e&&(or(_ve),G(0,"span",0),Yt(1),Yt(2,1),Yt(3,2),j(),fe(4,gve,1,1,"span",1)),2&e&&(ln("mat-content-hide-toggle",!n._showToggle()),V(4),U("ngIf",n._showToggle()))},dependencies:[_i],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:[c8.indicatorRotate]},changeDetection:0}),i})(),Cve=(()=>{class i{}return i.\u0275fac=function(e){return new(e||i)},i.\u0275dir=ve({type:i,selectors:[["mat-panel-description"]],hostAttrs:[1,"mat-expansion-panel-header-description"]}),i})(),Sve=(()=>{class i{}return i.\u0275fac=function(e){return new(e||i)},i.\u0275dir=ve({type:i,selectors:[["mat-panel-title"]],hostAttrs:[1,"mat-expansion-panel-header-title"]}),i})(),Eve=(()=>{class i{}return i.\u0275fac=function(e){return new(e||i)},i.\u0275mod=en({type:i}),i.\u0275inj=Wt({imports:[co,Jn,uve,Bh]}),i})();function Ave(i,t){if(1&i&&(G(0,"mat-option",19),Be(1),j()),2&i){const e=t.$implicit;U("value",e),V(1),Qi(" ",e," ")}}function Dve(i,t){if(1&i){const e=jn();G(0,"mat-form-field",16)(1,"mat-select",17),Oe("selectionChange",function(r){return Vt(e),Et(re(2)._changePageSize(r.value))}),fe(2,Ave,2,2,"mat-option",18),j()()}if(2&i){const e=re(2);U("appearance",e._formFieldAppearance)("color",e.color),V(1),U("value",e.pageSize)("disabled",e.disabled)("aria-labelledby",e._pageSizeLabelId)("panelClass",e.selectConfig.panelClass||"")("disableOptionCentering",e.selectConfig.disableOptionCentering),V(1),U("ngForOf",e._displayedPageSizeOptions)}}function Tve(i,t){if(1&i&&(G(0,"div",20),Be(1),j()),2&i){const e=re(2);V(1),ui(e.pageSize)}}function Ive(i,t){if(1&i&&(G(0,"div",12)(1,"div",13),Be(2),j(),fe(3,Dve,3,8,"mat-form-field",14),fe(4,Tve,2,1,"div",15),j()),2&i){const e=re();V(1),BD("id",e._pageSizeLabelId),V(1),Qi(" ",e._intl.itemsPerPageLabel," "),V(1),U("ngIf",e._displayedPageSizeOptions.length>1),V(1),U("ngIf",e._displayedPageSizeOptions.length<=1)}}function Rve(i,t){if(1&i){const e=jn();G(0,"button",21),Oe("click",function(){return Vt(e),Et(re().firstPage())}),ki(),G(1,"svg",7),Ie(2,"path",22),j()()}if(2&i){const e=re();U("matTooltip",e._intl.firstPageLabel)("matTooltipDisabled",e._previousButtonsDisabled())("matTooltipPosition","above")("disabled",e._previousButtonsDisabled()),It("aria-label",e._intl.firstPageLabel)}}function kve(i,t){if(1&i){const e=jn();ki(),ya(),G(0,"button",23),Oe("click",function(){return Vt(e),Et(re().lastPage())}),ki(),G(1,"svg",7),Ie(2,"path",24),j()()}if(2&i){const e=re();U("matTooltip",e._intl.lastPageLabel)("matTooltipDisabled",e._nextButtonsDisabled())("matTooltipPosition","above")("disabled",e._nextButtonsDisabled()),It("aria-label",e._intl.lastPageLabel)}}let yE=(()=>{class i{constructor(){this.changes=new Te,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=Pe({token:i,factory:i.\u0275fac,providedIn:"root"}),i})();const Ove={provide:yE,deps:[[new Ss,new Ca,yE]],useFactory:function Pve(i){return i||new yE}},Lve=new me("MAT_PAGINATOR_DEFAULT_OPTIONS"),Nve=jM(CQ(class{}));let Bve=(()=>{class i extends Nve{get pageIndex(){return this._pageIndex}set pageIndex(e){this._pageIndex=Math.max(Ps(e),0),this._changeDetectorRef.markForCheck()}get length(){return this._length}set length(e){this._length=Ps(e),this._changeDetectorRef.markForCheck()}get pageSize(){return this._pageSize}set pageSize(e){this._pageSize=Math.max(Ps(e),0),this._updateDisplayedPageSizeOptions()}get pageSizeOptions(){return this._pageSizeOptions}set pageSizeOptions(e){this._pageSizeOptions=(e||[]).map(n=>Ps(n)),this._updateDisplayedPageSizeOptions()}get hidePageSize(){return this._hidePageSize}set hidePageSize(e){this._hidePageSize=tn(e)}get showFirstLastButtons(){return this._showFirstLastButtons}set showFirstLastButtons(e){this._showFirstLastButtons=tn(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 $e,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){Co()},i.\u0275dir=ve({type:i,inputs:{color:"color",pageIndex:"pageIndex",length:"length",pageSize:"pageSize",pageSizeOptions:"pageSizeOptions",hidePageSize:"hidePageSize",showFirstLastButtons:"showFirstLastButtons",selectConfig:"selectConfig"},outputs:{page:"page"},features:[dt]}),i})(),Uve=0,Vve=(()=>{class i extends Bve{constructor(e,n,r){super(e,n,r),this._pageSizeLabelId="mat-paginator-page-size-label-"+Uve++,this._formFieldAppearance=r?.formFieldAppearance||"outline"}}return i.\u0275fac=function(e){return new(e||i)(E(yE),E(Qn),E(Lve,8))},i.\u0275cmp=ot({type:i,selectors:[["mat-paginator"]],hostAttrs:["role","group",1,"mat-mdc-paginator"],inputs:{disabled:"disabled"},exportAs:["matPaginator"],features:[dt],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&&(G(0,"div",0)(1,"div",1),fe(2,Ive,5,4,"div",2),G(3,"div",3)(4,"div",4),Be(5),j(),fe(6,Rve,3,5,"button",5),G(7,"button",6),Oe("click",function(){return n.previousPage()}),ki(),G(8,"svg",7),Ie(9,"path",8),j()(),ya(),G(10,"button",9),Oe("click",function(){return n.nextPage()}),ki(),G(11,"svg",7),Ie(12,"path",10),j()(),fe(13,kve,3,5,"button",11),j()()()),2&e&&(V(2),U("ngIf",!n.hidePageSize),V(3),Qi(" ",n._intl.getRangeLabel(n.pageIndex,n.pageSize,n.length)," "),V(1),U("ngIf",n.showFirstLastButtons),V(1),U("matTooltip",n._intl.previousPageLabel)("matTooltipDisabled",n._previousButtonsDisabled())("matTooltipPosition","above")("disabled",n._previousButtonsDisabled()),It("aria-label",n._intl.previousPageLabel),V(3),U("matTooltip",n._intl.nextPageLabel)("matTooltipDisabled",n._nextButtonsDisabled())("matTooltipPosition","above")("disabled",n._nextButtonsDisabled()),It("aria-label",n._intl.nextPageLabel),V(3),U("ngIf",n.showFirstLastButtons))},dependencies:[lo,_i,XM,yl,pb,Nm,Fs],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})(),zve=(()=>{class i{}return i.\u0275fac=function(e){return new(e||i)},i.\u0275mod=en({type:i}),i.\u0275inj=Wt({providers:[Ove],imports:[co,KM,VH,LV]}),i})(),Hve=(()=>{class i{}return i.\u0275fac=function(e){return new(e||i)},i.\u0275mod=en({type:i,bootstrap:[cge]}),i.\u0275inj=Wt({providers:[Jl,KR,{provide:OH,useValue:Vie}],imports:[LB,wK,lve,tH,SJ,gC,mH,Eve,TV,kV,LV,KM,tz,zve,mse,vH,VH,vV,Ipe,Rme,nH,tR,Yie,lre]}),i})();th(ec,[lo,_i,Fs,n0,nE],[Xo]),th(zR,[hm,lo,_i,xy,nc,Zc,yl,h8,Mve,Sve,Cve,Fs,Vve,pb,Nm,n0],[]),th(xC,[lo,_i,MC,wC,_H,n0],[]),th(_G,[lo,_i,Ro,Fs,pb,Nm,n0,nE],[Xo]),L7().bootstrapModule(Hve).catch(i=>console.error(i))},489:function(Bo,Gs,ps){var dn;Bo=ps.nmd(Bo),function(){var z,Kr=200,Un="Expected a function",Ga="__lodash_hash_undefined__",Ci="__lodash_placeholder__",Si=1,ms=2,js=4,Ys=1,Uo=2,On=1,ur=2,mc=4,ua=8,Tl=16,ha=32,Il=64,Wa=128,fa=256,md=512,ME=800,Kg=16,In=1/0,Ya=9007199254740991,SE=17976931348623157e292,Of=NaN,pa=4294967295,Te=pa-1,c0=pa>>>1,d0=[["ary",Wa],["bind",On],["bindKey",ur],["curry",ua],["curryRight",Tl],["flip",md],["partial",ha],["partialRight",Il],["rearg",fa]],ni="[object Arguments]",qn="[object Array]",EE="[object AsyncFunction]",tt="[object Boolean]",gc="[object Date]",AE="[object DOMException]",gd="[object Error]",Ff="[object Function]",u0="[object GeneratorFunction]",Vo="[object Map]",Vu="[object Number]",DE="[object Null]",qa="[object Object]",h0="[object Promise]",TE="[object Proxy]",_d="[object RegExp]",zo="[object Set]",_c="[object String]",Lf="[object Symbol]",Zg="[object Undefined]",vd="[object WeakMap]",zu="[object ArrayBuffer]",yd="[object DataView]",ma="[object Float32Array]",Nf="[object Float64Array]",Qg="[object Int8Array]",Bf="[object Int16Array]",Jg="[object Int32Array]",e_="[object Uint8Array]",Hu="[object Uint8ClampedArray]",t_="[object Uint16Array]",n_="[object Uint32Array]",RE=/\b__p \+= '';/g,kE=/\b(__p \+=) '' \+/g,PE=/(__e\(.*?\)|\b__t\)) \+\n'';/g,f0=/&(?:amp|lt|gt|quot|#39);/g,p0=/[&<>"']/g,OE=RegExp(f0.source),FE=RegExp(p0.source),QO=/<%-([\s\S]+?)%>/g,i_=/<%([\s\S]+?)%>/g,r_=/<%=([\s\S]+?)%>/g,m0=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,g0=/^\w*$/,_0=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,s_=/[\\^$.*+?()[\]{}|]/g,v0=RegExp(s_.source),Uf=/^\s+/,y0=/\s/,b0=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,Mr=/\{\n\/\* \[wrapped with (.+)\] \*/,LE=/,? & /,NE=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,BE=/[()=,{}\[\]\/\s]/,UE=/\\(\\)?/g,x0=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,w0=/\w*$/,VE=/^[-+]0x[0-9a-f]+$/i,Xa=/^0b[01]+$/i,zE=/^\[object .+?Constructor\]$/,rr=/^0o[0-7]+$/i,bd=/^(?:0|[1-9]\d*)$/,_o=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,o_=/($^)/,HE=/['\n\r\u2028\u2029\\]/g,$u="\\ud800-\\udfff",C0="\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff",l_="\\u2700-\\u27bf",c_="a-z\\xdf-\\xf6\\xf8-\\xff",d_="A-Z\\xc0-\\xd6\\xd8-\\xde",S0="\\ufe0e\\ufe0f",E0="\\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",Cr="["+$u+"]",Vf="["+E0+"]",xd="["+C0+"]",ci="\\d+",u_="["+l_+"]",mi="["+c_+"]",zf="[^"+$u+E0+ci+l_+c_+d_+"]",h_="\\ud83c[\\udffb-\\udfff]",Ot="[^"+$u+"]",Wu="(?:\\ud83c[\\udde6-\\uddff]){2}",ju="[\\ud800-\\udbff][\\udc00-\\udfff]",Yu="["+d_+"]",pe="(?:"+mi+"|"+zf+")",Hf="(?:"+Yu+"|"+zf+")",Jt="(?:['\u2019](?:d|ll|m|re|s|t|ve))?",Xn="(?:['\u2019](?:D|LL|M|RE|S|T|VE))?",A0="(?:"+xd+"|"+h_+")?",YE="["+S0+"]?",XE=YE+A0+"(?:\\u200d(?:"+[Ot,Wu,ju].join("|")+")"+YE+A0+")*",KE="(?:"+[u_,Wu,ju].join("|")+")"+XE,JO="(?:"+[Ot+xd+"?",xd,Wu,ju,Cr].join("|")+")",Rl=RegExp("['\u2019]","g"),eF=RegExp(xd,"g"),D0=RegExp(h_+"(?="+h_+")|"+JO+XE,"g"),tF=RegExp([Yu+"?"+mi+"+"+Jt+"(?="+[Vf,Yu,"$"].join("|")+")",Hf+"+"+Xn+"(?="+[Vf,Yu+pe,"$"].join("|")+")",Yu+"?"+pe+"+"+Jt,Yu+"+"+Xn,"\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])","\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",ci,KE].join("|"),"g"),nF=RegExp("[\\u200d"+$u+C0+S0+"]"),ZE=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,iF=["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"],QE=-1,Ei={};Ei[ma]=Ei[Nf]=Ei[Qg]=Ei[Bf]=Ei[Jg]=Ei[e_]=Ei[Hu]=Ei[t_]=Ei[n_]=!0,Ei[ni]=Ei[qn]=Ei[zu]=Ei[tt]=Ei[yd]=Ei[gc]=Ei[gd]=Ei[Ff]=Ei[Vo]=Ei[Vu]=Ei[qa]=Ei[_d]=Ei[zo]=Ei[_c]=Ei[vd]=!1;var En={};En[ni]=En[qn]=En[zu]=En[yd]=En[tt]=En[gc]=En[ma]=En[Nf]=En[Qg]=En[Bf]=En[Jg]=En[Vo]=En[Vu]=En[qa]=En[_d]=En[zo]=En[_c]=En[Lf]=En[e_]=En[Hu]=En[t_]=En[n_]=!0,En[gd]=En[Ff]=En[vd]=!1;var oF={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},Pe=parseFloat,aF=parseInt,Wt="object"==typeof global&&global&&global.Object===Object&&global,Gf="object"==typeof self&&self&&self.Object===Object&&self,Sr=Wt||Gf||Function("return this")(),f_=Gs&&!Gs.nodeType&&Gs,Xu=f_&&Bo&&!Bo.nodeType&&Bo,p_=Xu&&Xu.exports===f_,wd=p_&&Wt.process,gs=function(){try{return Xu&&Xu.require&&Xu.require("util").types||wd&&wd.binding&&wd.binding("util")}catch{}}(),m_=gs&&gs.isArrayBuffer,T0=gs&&gs.isDate,Ft=gs&&gs.isMap,Wf=gs&&gs.isRegExp,I0=gs&&gs.isSet,Xs=gs&&gs.isTypedArray;function _s(X,he,ae){switch(ae.length){case 0:return X.call(he);case 1:return X.call(he,ae[0]);case 2:return X.call(he,ae[0],ae[1]);case 3:return X.call(he,ae[0],ae[1],ae[2])}return X.apply(he,ae)}function lF(X,he,ae,ze){for(var jt=-1,Vn=null==X?0:X.length;++jt-1}function Ku(X,he,ae){for(var ze=-1,jt=null==X?0:X.length;++ze-1;);return ae}function ga(X,he){for(var ae=X.length;ae--&&Lt(he,X[ae],0)>-1;);return ae}var nA=v_({\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"}),ot=v_({"&":"&","<":"<",">":">",'"':""","'":"'"});function th(X){return"\\"+oF[X]}function Sd(X){return nF.test(X)}function Xf(X){var he=-1,ae=Array(X.size);return X.forEach(function(ze,jt){ae[++he]=[jt,ze]}),ae}function ve(X,he){return function(ae){return X(he(ae))}}function $i(X,he){for(var ae=-1,ze=X.length,jt=0,Vn=[];++ae",""":'"',"'":"'"}),ys=function X(he){var u,ae=(he=null==he?Sr:ys.defaults(Sr.Object(),he,ys.pick(Sr,iF))).Array,ze=he.Date,jt=he.Error,Vn=he.Function,xt=he.Math,ai=he.Object,bc=he.RegExp,k0=he.String,Er=he.TypeError,sr=ae.prototype,Ho=ai.prototype,Zs=he["__core-js_shared__"],Ol=Vn.prototype.toString,ri=Ho.hasOwnProperty,bi=0,sA=(u=/[^.]+$/.exec(Zs&&Zs.keys&&Zs.keys.IE_PROTO||""))?"Symbol(src)_1."+u:"",Ad=Ho.toString,P0=Ol.call(ai),Zf=Sr._,Qf=bc("^"+Ol.call(ri).replace(s_,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),Ja=p_?he.Buffer:z,Ui=he.Symbol,x_=he.Uint8Array,bs=Ja?Ja.allocUnsafe:z,xs=ve(ai.getPrototypeOf,ai),Jf=ai.create,Dd=Ho.propertyIsEnumerable,xc=sr.splice,bo=Ui?Ui.isConcatSpreadable:z,ih=Ui?Ui.iterator:z,Td=Ui?Ui.toStringTag:z,ep=function(){try{var u=kc(ai,"defineProperty");return u({},"",{}),u}catch{}}(),oA=he.clearTimeout!==Sr.clearTimeout&&he.clearTimeout,dF=ze&&ze.now!==Sr.Date.now&&ze.now,uF=he.setTimeout!==Sr.setTimeout&&he.setTimeout,w_=xt.ceil,M_=xt.floor,O0=ai.getOwnPropertySymbols,hF=Ja?Ja.isBuffer:z,aA=he.isFinite,fF=sr.join,pF=ve(ai.keys,ai),fr=xt.max,Zr=xt.min,mF=ze.now,F0=he.parseInt,C_=xt.random,gF=sr.reverse,L0=kc(he,"DataView"),tp=kc(he,"Map"),el=kc(he,"Promise"),Id=kc(he,"Set"),xi=kc(he,"WeakMap"),Rd=kc(ai,"create"),np=xi&&new xi,kd={},N0=Pc(L0),B0=Pc(tp),lA=Pc(el),S_=Pc(Id),cA=Pc(xi),Qr=Ui?Ui.prototype:z,Pd=Qr?Qr.valueOf:z,E_=Qr?Qr.toString:z;function I(u){if(Pi(u)&&!sn(u)&&!(u instanceof kn)){if(u instanceof Ai)return u;if(ri.call(u,"__wrapped__"))return ns(u)}return new Ai(u)}var Od=function(){function u(){}return function(f){if(!Mi(f))return{};if(Jf)return Jf(f);u.prototype=f;var _=new u;return u.prototype=z,_}}();function wc(){}function Ai(u,f){this.__wrapped__=u,this.__actions__=[],this.__chain__=!!f,this.__index__=0,this.__values__=z}function kn(u){this.__wrapped__=u,this.__actions__=[],this.__dir__=1,this.__filtered__=!1,this.__iteratees__=[],this.__takeCount__=pa,this.__views__=[]}function Mc(u){var f=-1,_=null==u?0:u.length;for(this.clear();++f<_;){var w=u[f];this.set(w[0],w[1])}}function Pt(u){var f=-1,_=null==u?0:u.length;for(this.clear();++f<_;){var w=u[f];this.set(w[0],w[1])}}function _a(u){var f=-1,_=null==u?0:u.length;for(this.clear();++f<_;){var w=u[f];this.set(w[0],w[1])}}function Et(u){var f=-1,_=null==u?0:u.length;for(this.__data__=new _a;++f<_;)this.add(u[f])}function Jr(u){var f=this.__data__=new Pt(u);this.size=f.size}function I_(u,f){var _=sn(u),w=!_&&Lc(u),S=!_&&!w&&ol(u),P=!_&&!w&&!S&&jo(u),$=_||w||S||P,Y=$?Ks(u.length,k0):[],Q=Y.length;for(var _e in u)(f||ri.call(u,_e))&&(!$||!("length"==_e||S&&("offset"==_e||"parent"==_e)||P&&("buffer"==_e||"byteLength"==_e||"byteOffset"==_e)||sl(_e,Q)))&&Y.push(_e);return Y}function zr(u){var f=u.length;return f?u[lh(0,f-1)]:z}function tl(u,f){return Ep(eo(u),Nl(f,0,u.length))}function $0(u){return Ep(eo(u))}function Ll(u,f,_){(_!==z&&!Wo(u[f],_)||_===z&&!(f in u))&&$o(u,f,_)}function Qs(u,f,_){var w=u[f];(!ri.call(u,f)||!Wo(w,_)||_===z&&!(f in u))&&$o(u,f,_)}function rp(u,f){for(var _=u.length;_--;)if(Wo(u[_][0],f))return _;return-1}function G0(u,f,_,w){return nl(u,function(S,P,$){f(w,S,_(S),$)}),w}function W0(u,f){return u&&di(f,pr(f),u)}function $o(u,f,_){"__proto__"==f&&ep?ep(u,f,{configurable:!0,enumerable:!0,value:_,writable:!0}):u[f]=_}function rh(u,f){for(var _=-1,w=f.length,S=ae(w),P=null==u;++_=f?u:f)),u}function Ms(u,f,_,w,S,P){var $,Y=f&Si,Q=f&ms,_e=f&js;if(_&&($=S?_(u,w,S,P):_(u)),$!==z)return $;if(!Mi(u))return u;var ye=sn(u);if(ye){if($=function fx(u){var f=u.length,_=new u.constructor(f);return f&&"string"==typeof u[0]&&ri.call(u,"index")&&(_.index=u.index,_.input=u.input),_}(u),!Y)return eo(u,$)}else{var be=Hr(u),Xe=be==Ff||be==u0;if(ol(u))return me(u,Y);if(be==qa||be==ni||Xe&&!S){if($=Q||Xe?{}:PA(u),!Y)return Q?function hh(u,f){return di(u,dx(u),f)}(u,function _A(u,f){return u&&di(f,Ds(f),u)}($,u)):function H_(u,f){return di(u,Z_(u),f)}(u,W0($,u))}else{if(!En[be])return S?u:{};$=function px(u,f,_){var w=u.constructor;switch(f){case zu:return sx(u);case tt:case gc:return new w(+u);case yd:return function wF(u,f){var _=f?sx(u.buffer):u.buffer;return new u.constructor(_,u.byteOffset,u.byteLength)}(u,_);case ma:case Nf:case Qg:case Bf:case Jg:case e_:case Hu:case t_:case n_:return AA(u,_);case Vo:return new w;case Vu:case _c:return new w(u);case _d:return function MF(u){var f=new u.constructor(u.source,w0.exec(u));return f.lastIndex=u.lastIndex,f}(u);case zo:return new w;case Lf:return function CF(u){return Pd?ai(Pd.call(u)):{}}(u)}}(u,be,Y)}}P||(P=new Jr);var bt=P.get(u);if(bt)return bt;P.set(u,$),iw(u)?u.forEach(function(Ht){$.add(Ms(Ht,f,_,Ht,u,P))}):Tv(u)&&u.forEach(function(Ht,An){$.set(An,Ms(Ht,f,_,An,u,P))});var mn=ye?z:(_e?Q?q_:bp:Q?Ds:pr)(u);return Rn(mn||u,function(Ht,An){mn&&(Ht=u[An=Ht]),Qs($,An,Ms(Ht,f,_,An,u,P))}),$}function R_(u,f,_){var w=_.length;if(null==u)return!w;for(u=ai(u);w--;){var S=_[w],$=u[S];if($===z&&!(S in u)||!(0,f[S])($))return!1}return!0}function sp(u,f,_){if("function"!=typeof u)throw new Er(Un);return gh(function(){u.apply(z,_)},f)}function Ld(u,f,_,w){var S=-1,P=kl,$=!0,Y=u.length,Q=[],_e=f.length;if(!Y)return Q;_&&(f=gi(f,Ur(_))),w?(P=Ku,$=!1):f.length>=Kr&&(P=yc,$=!1,f=new Et(f));e:for(;++S-1},Pt.prototype.set=function fA(u,f){var _=this.__data__,w=rp(_,u);return w<0?(++this.size,_.push([u,f])):_[w][1]=f,this},_a.prototype.clear=function pA(){this.size=0,this.__data__={hash:new Mc,map:new(tp||Pt),string:new Mc}},_a.prototype.delete=function mA(u){var f=K_(this,u).delete(u);return this.size-=f?1:0,f},_a.prototype.get=function Se(u){return K_(this,u).get(u)},_a.prototype.has=function zn(u){return K_(this,u).has(u)},_a.prototype.set=function Vt(u,f){var _=K_(this,u),w=_.size;return _.set(u,f),this.size+=_.size==w?0:1,this},Et.prototype.add=Et.prototype.push=function Ar(u){return this.__data__.set(u,Ga),this},Et.prototype.has=function H0(u){return this.__data__.has(u)},Jr.prototype.clear=function va(){this.__data__=new Pt,this.size=0},Jr.prototype.delete=function D_(u){var f=this.__data__,_=f.delete(u);return this.size=f.size,_},Jr.prototype.get=function T_(u){return this.__data__.get(u)},Jr.prototype.has=function gA(u){return this.__data__.has(u)},Jr.prototype.set=function vF(u,f){var _=this.__data__;if(_ instanceof Pt){var w=_.__data__;if(!tp||w.length0&&_(Y)?f>1?Kn(Y,f-1,_,w,S):Pl(S,Y):w||(S[S.length]=Y)}return S}var il=$_(),Di=$_(!0);function ki(u,f){return u&&il(u,f,pr)}function P_(u,f){return u&&Di(u,f,pr)}function ya(u,f){return vc(f,function(_){return Hl(u[_])})}function Cc(u,f){for(var _=0,w=(f=Ma(f,u)).length;null!=u&&_f}function op(u,f){return null!=u&&ri.call(u,f)}function ap(u,f){return null!=u&&f in ai(u)}function lp(u,f,_){for(var w=_?Ku:kl,S=u[0].length,P=u.length,$=P,Y=ae(P),Q=1/0,_e=[];$--;){var ye=u[$];$&&f&&(ye=gi(ye,Ur(f))),Q=Zr(ye.length,Q),Y[$]=!_&&(f||S>=120&&ye.length>=120)?new Et($&&ye):z}ye=u[0];var be=-1,Xe=Y[0];e:for(;++be=Y?Q:Q*("desc"==_[w]?-1:1)}return u.index-f.index}(P,$,_)})}function J0(u,f,_){for(var w=-1,S=f.length,P={};++w-1;)Y!==u&&xc.call(Y,Q,1),xc.call(u,Q,1);return u}function ah(u,f){for(var _=u?f.length:0,w=_-1;_--;){var S=f[_];if(_==w||S!==P){var P=S;sl(S)?xc.call(u,S,1):dh(u,S)}}return u}function lh(u,f){return u+M_(C_()*(f-u+1))}function ch(u,f){var _="";if(!u||f<1||f>Ya)return _;do{f%2&&(_+=u),(f=M_(f/2))&&(u+=u)}while(f);return _}function pn(u,f){return Cp(J_(u,f,is),u+"")}function SA(u){return zr(Uc(u))}function tx(u,f){var _=Uc(u);return Ep(_,Nl(f,0,_.length))}function zd(u,f,_,w){if(!Mi(u))return u;for(var S=-1,P=(f=Ma(f,u)).length,$=P-1,Y=u;null!=Y&&++SS?0:S+f),(_=_>S?S:_)<0&&(_+=S),S=f>_?0:_-f>>>0,f>>>=0;for(var P=ae(S);++w>>1,$=u[P];null!==$&&!As($)&&(_?$<=f:$=Kr){var _e=f?null:j_(u);if(_e)return Hn(_e);$=!1,S=yc,Q=new Et}else Q=f?[]:Y;e:for(;++w=w?u:ts(u,f,_)}var rx=oA||function(u){return Sr.clearTimeout(u)};function me(u,f){if(f)return u.slice();var _=u.length,w=bs?bs(_):new u.constructor(_);return u.copy(w),w}function sx(u){var f=new u.constructor(u.byteLength);return new x_(f).set(new x_(u)),f}function AA(u,f){var _=f?sx(u.buffer):u.buffer;return new u.constructor(_,u.byteOffset,u.length)}function DA(u,f){if(u!==f){var _=u!==z,w=null===u,S=u==u,P=As(u),$=f!==z,Y=null===f,Q=f==f,_e=As(f);if(!Y&&!_e&&!P&&u>f||P&&$&&Q&&!Y&&!_e||w&&$&&Q||!_&&Q||!S)return 1;if(!w&&!P&&!_e&&u1?_[S-1]:z,$=S>2?_[2]:z;for(P=u.length>3&&"function"==typeof P?(S--,P):z,$&&Tr(_[0],_[1],$)&&(P=S<3?z:P,S=1),f=ai(f);++w-1?S[P?f[$]:$]:z}}function Cs(u){return wo(function(f){var _=f.length,w=_,S=Ai.prototype.thru;for(u&&f.reverse();w--;){var P=f[w];if("function"!=typeof P)throw new Er(Un);if(S&&!$&&"wrapper"==rl(P))var $=new Ai([],!0)}for(w=$?w:_;++w<_;){var Y=rl(P=f[w]),Q="wrapper"==Y?X_(P):z;$=Q&&mh(Q[0])&&Q[1]==(Wa|ua|ha|fa)&&!Q[4].length&&1==Q[9]?$[rl(Q[0])].apply($,Q[3]):1==P.length&&mh(P)?$[Y]():$.thru(P)}return function(){var _e=arguments,ye=_e[0];if($&&1==_e.length&&sn(ye))return $.plant(ye).value();for(var be=0,Xe=_?f[be].apply(this,_e):ye;++be<_;)Xe=f[be].call(this,Xe);return Xe}})}function jd(u,f,_,w,S,P,$,Y,Q,_e){var ye=f&Wa,be=f&On,Xe=f&ur,bt=f&(ua|Tl),zt=f&md,mn=Xe?z:gp(u);return function Ht(){for(var An=arguments.length,Ln=ae(An),rs=An;rs--;)Ln[rs]=arguments[rs];if(bt)var ss=Sa(Ht),so=function eh(X,he){for(var ae=X.length,ze=0;ae--;)X[ae]===he&&++ze;return ze}(Ln,ss);if(w&&(Ln=$d(Ln,w,S,bt)),P&&(Ln=TA(Ln,P,$,bt)),An-=so,bt&&An<_e){var Ti=$i(Ln,ss);return ax(u,f,jd,Ht.placeholder,_,Ln,Ti,Y,Q,_e-An)}var Ts=be?_:this,So=Xe?Ts[u]:u;return An=Ln.length,Y?Ln=function Es(u,f){for(var _=u.length,w=Zr(f.length,_),S=eo(u);w--;){var P=f[w];u[w]=sl(P,_)?S[P]:z}return u}(Ln,Y):zt&&An>1&&Ln.reverse(),ye&&QY))return!1;var _e=P.get(u),ye=P.get(f);if(_e&&ye)return _e==f&&ye==u;var be=-1,Xe=!0,bt=_&Uo?new Et:z;for(P.set(u,f),P.set(f,u);++be-1&&u%1==0&&u1?"& ":"")+f[w],f=f.join(_>2?", ":" "),u.replace(b0,"{\n/* [wrapped with "+f+"] */\n")}(w,function BA(u,f){return Rn(d0,function(_){var w="_."+_[0];f&_[1]&&!kl(u,w)&&u.push(w)}),u.sort()}(function ux(u){var f=u.match(Mr);return f?f[1].split(LE):[]}(w),_)))}function yx(u){var f=0,_=0;return function(){var w=mF(),S=Kg-(w-_);if(_=w,S>0){if(++f>=ME)return arguments[0]}else f=0;return u.apply(z,arguments)}}function Ep(u,f){var _=-1,w=u.length,S=w-1;for(f=f===z?w:f;++_1?u[f-1]:z;return _="function"==typeof _?(u.pop(),_):z,yh(u,_)});function Hx(u){var f=I(u);return f.__chain__=!0,f}function Rp(u,f){return f(u)}var $x=wo(function(u){var f=u.length,_=f?u[0]:0,w=this.__wrapped__,S=function(P){return rh(P,u)};return!(f>1||this.__actions__.length)&&w instanceof kn&&sl(_)?((w=w.slice(_,+_+(f?1:0))).__actions__.push({func:Rp,args:[S],thisArg:z}),new Ai(w,this.__chain__).thru(function(P){return f&&!P.length&&P.push(z),P})):this.thru(S)}),s1=pp(function(u,f,_){ri.call(u,_)?++u[_]:$o(u,_,1)}),Wx=RA(Ex),Pp=RA(rv);function bv(u,f){return(sn(u)?Rn:nl)(u,Nt(f,3))}function zl(u,f){return(sn(u)?cF:k_)(u,Nt(f,3))}var a1=pp(function(u,f,_){ri.call(u,_)?u[_].push(f):$o(u,_,[f])}),c1=pn(function(u,f,_){var w=-1,S="function"==typeof f,P=no(u)?ae(u.length):[];return nl(u,function($){P[++w]=S?_s(f,$,_):ba($,f,_)}),P}),d1=pp(function(u,f,_){$o(u,_,f)});function Op(u,f){return(sn(u)?gi:sh)(u,Nt(f,3))}var Ea=pp(function(u,f,_){u[_?0:1].push(f)},function(){return[[],[]]}),v1=pn(function(u,f){if(null==u)return[];var _=f.length;return _>1&&Tr(u,f[0],f[1])?f=[]:_>2&&Tr(f[0],f[1],f[2])&&(f=[f[0]]),B_(u,Kn(f,1),[])}),Fp=dF||function(){return Sr.Date.now()};function xh(u,f,_){return f=_?z:f,xo(u,Wa,z,z,z,z,f=u&&null==f?u.length:f)}function Aa(u,f){var _;if("function"!=typeof f)throw new Er(Un);return u=un(u),function(){return--u>0&&(_=f.apply(this,arguments)),u<=1&&(f=z),_}}var Fc=pn(function(u,f,_){var w=On;if(_.length){var S=$i(_,Sa(Fc));w|=ha}return xo(u,w,f,_,S)}),xv=pn(function(u,f,_){var w=On|ur;if(_.length){var S=$i(_,Sa(xv));w|=ha}return xo(f,w,u,_,S)});function b1(u,f,_){var w,S,P,$,Y,Q,_e=0,ye=!1,be=!1,Xe=!0;if("function"!=typeof u)throw new Er(Un);function bt(Ti){var Ts=w,So=S;return w=S=z,_e=Ti,$=u.apply(So,Ts)}function Ht(Ti){var Ts=Ti-Q;return Q===z||Ts>=f||Ts<0||be&&Ti-_e>=P}function An(){var Ti=Fp();if(Ht(Ti))return Ln(Ti);Y=gh(An,function mn(Ti){var ID=f-(Ti-Q);return be?Zr(ID,P-(Ti-_e)):ID}(Ti))}function Ln(Ti){return Y=z,Xe&&w?bt(Ti):(w=S=z,$)}function so(){var Ti=Fp(),Ts=Ht(Ti);if(w=arguments,S=this,Q=Ti,Ts){if(Y===z)return function zt(Ti){return _e=Ti,Y=gh(An,f),ye?bt(Ti):$}(Q);if(be)return rx(Y),Y=gh(An,f),bt(Q)}return Y===z&&(Y=gh(An,f)),$}return f=Mo(f)||0,Mi(_)&&(ye=!!_.leading,P=(be="maxWait"in _)?fr(Mo(_.maxWait)||0,f):P,Xe="trailing"in _?!!_.trailing:Xe),so.cancel=function rs(){Y!==z&&rx(Y),_e=0,w=Q=S=Y=z},so.flush=function ss(){return Y===z?$:Ln(Fp())},so}var PF=pn(function(u,f){return sp(u,1,f)}),OF=pn(function(u,f,_){return sp(u,Mo(f)||0,_)});function qd(u,f){if("function"!=typeof u||null!=f&&"function"!=typeof f)throw new Er(Un);var _=function(){var w=arguments,S=f?f.apply(this,w):w[0],P=_.cache;if(P.has(S))return P.get(S);var $=u.apply(this,w);return _.cache=P.set(S,$)||P,$};return _.cache=new(qd.Cache||_a),_}function Sv(u){if("function"!=typeof u)throw new Er(Un);return function(){var f=arguments;switch(f.length){case 0:return!u.call(this);case 1:return!u.call(this,f[0]);case 2:return!u.call(this,f[0],f[1]);case 3:return!u.call(this,f[0],f[1],f[2])}return!u.apply(this,f)}}qd.Cache=_a;var Xx=Hd(function(u,f){var _=(f=1==f.length&&sn(f[0])?gi(f[0],Ur(Nt())):gi(Kn(f,1),Ur(Nt()))).length;return pn(function(w){for(var S=-1,P=Zr(w.length,_);++S=f}),Lc=Ud(function(){return arguments}())?Ud:function(u){return Pi(u)&&ri.call(u,"callee")&&!Dd.call(u,"callee")},sn=ae.isArray,LF=m_?Ur(m_):function xA(u){return Pi(u)&&es(u)==zu};function no(u){return null!=u&&zp(u.length)&&!Hl(u)}function wi(u){return Pi(u)&&no(u)}var ol=hF||Jd,ew=T0?Ur(T0):function yF(u){return Pi(u)&&es(u)==gc};function Up(u){if(!Pi(u))return!1;var f=es(u);return f==gd||f==AE||"string"==typeof u.message&&"string"==typeof u.name&&!io(u)}function Hl(u){if(!Mi(u))return!1;var f=es(u);return f==Ff||f==u0||f==EE||f==TE}function Vp(u){return"number"==typeof u&&u==un(u)}function zp(u){return"number"==typeof u&&u>-1&&u%1==0&&u<=Ya}function Mi(u){var f=typeof u;return null!=u&&("object"==f||"function"==f)}function Pi(u){return null!=u&&"object"==typeof u}var Tv=Ft?Ur(Ft):function wA(u){return Pi(u)&&Hr(u)==Vo};function wh(u){return"number"==typeof u||Pi(u)&&es(u)==Vu}function io(u){if(!Pi(u)||es(u)!=qa)return!1;var f=xs(u);if(null===f)return!0;var _=ri.call(f,"constructor")&&f.constructor;return"function"==typeof _&&_ instanceof _&&Ol.call(_)==P0}var $p=Wf?Ur(Wf):function xF(u){return Pi(u)&&es(u)==_d},iw=I0?Ur(I0):function L_(u){return Pi(u)&&Hr(u)==zo};function Gp(u){return"string"==typeof u||!sn(u)&&Pi(u)&&es(u)==_c}function As(u){return"symbol"==typeof u||Pi(u)&&es(u)==Lf}var jo=Xs?Ur(Xs):function X0(u){return Pi(u)&&zp(u.length)&&!!Ei[es(u)]},Pv=yp(cp),O1=yp(function(u,f){return u<=f});function Ov(u){if(!u)return[];if(no(u))return Gp(u)?yo(u):eo(u);if(ih&&u[ih])return function rA(X){for(var he,ae=[];!(he=X.next()).done;)ae.push(he.value);return ae}(u[ih]());var f=Hr(u);return(f==Vo?Xf:f==zo?Hn:Uc)(u)}function al(u){return u?(u=Mo(u))===In||u===-In?(u<0?-1:1)*SE:u==u?u:0:0===u?u:0}function un(u){var f=al(u),_=f%1;return f==f?_?f-_:f:0}function F1(u){return u?Nl(un(u),0,pa):0}function Mo(u){if("number"==typeof u)return u;if(As(u))return Of;if(Mi(u)){var f="function"==typeof u.valueOf?u.valueOf():u;u=Mi(f)?f+"":f}if("string"!=typeof u)return 0===u?u:+u;u=Wn(u);var _=Xa.test(u);return _||rr.test(u)?aF(u.slice(2),_?2:8):VE.test(u)?Of:+u}function $l(u){return di(u,Ds(u))}function Fn(u){return null==u?"":Js(u)}var vt=Dr(function(u,f){if(Mp(f)||no(f))di(f,pr(f),u);else for(var _ in f)ri.call(f,_)&&Qs(u,_,f[_])}),rw=Dr(function(u,f){di(f,Ds(f),u)}),Gl=Dr(function(u,f,_,w){di(f,Ds(f),u,w)}),ll=Dr(function(u,f,_,w){di(f,pr(f),u,w)}),N1=wo(rh),Bc=pn(function(u,f){u=ai(u);var _=-1,w=f.length,S=w>2?f[2]:z;for(S&&Tr(f[0],f[1],S)&&(w=1);++_1),P}),di(u,q_(u),_),w&&(_=Ms(_,Si|ms|js,Ca));for(var S=f.length;S--;)dh(_,f[S]);return _}),Y1=wo(function(u,f){return null==u?{}:function Q0(u,f){return J0(u,f,function(_,w){return Uv(u,w)})}(u,f)});function Vv(u,f){if(null==u)return{};var _=gi(q_(u),function(w){return[w]});return f=Nt(f),J0(u,_,function(w,S){return f(w,S[0])})}var lw=fh(pr),zv=fh(Ds);function Uc(u){return null==u?[]:Ju(u,pr(u))}var V=Wd(function(u,f,_){return f=f.toLowerCase(),u+(_?Hv(f):f)});function Hv(u){return Zd(Fn(u).toLowerCase())}function $v(u){return(u=Fn(u))&&u.replace(_o,nA).replace(eF,"")}var sD=Wd(function(u,f,_){return u+(_?"-":"")+f.toLowerCase()}),dw=Wd(function(u,f,_){return u+(_?" ":"")+f.toLowerCase()}),oD=Gd("toLowerCase"),Gv=Wd(function(u,f,_){return u+(_?"_":"")+f.toLowerCase()}),cD=Wd(function(u,f,_){return u+(_?" ":"")+Zd(f)}),pw=Wd(function(u,f,_){return u+(_?" ":"")+f.toUpperCase()}),Zd=Gd("toUpperCase");function mw(u,f,_){return u=Fn(u),(f=_?z:f)===z?function en(X){return ZE.test(X)}(u)?function fn(X){return X.match(tF)||[]}(u):function tA(X){return X.match(NE)||[]}(u):u.match(f)||[]}var jv=pn(function(u,f){try{return _s(u,z,f)}catch(_){return Up(_)?_:new jt(_)}}),fD=wo(function(u,f){return Rn(f,function(_){_=Go(_),$o(u,_,Fc(u[_],u))}),u});function Yv(u){return function(){return u}}var gw=Cs(),_D=Cs(!0);function is(u){return u}function Wp(u){return N_("function"==typeof u?u:Ms(u,Si))}var Xv=pn(function(u,f){return function(_){return ba(_,u,f)}}),vD=pn(function(u,f){return function(_){return ba(u,_,f)}});function _w(u,f,_){var w=pr(f),S=ya(f,w);null==_&&(!Mi(f)||!S.length&&w.length)&&(_=f,f=u,u=this,S=ya(f,pr(f)));var P=!(Mi(_)&&"chain"in _&&!_.chain),$=Hl(u);return Rn(S,function(Y){var Q=f[Y];u[Y]=Q,$&&(u.prototype[Y]=function(){var _e=this.__chain__;if(P||_e){var ye=u(this.__wrapped__);return(ye.__actions__=eo(this.__actions__)).push({func:Q,args:arguments,thisArg:u}),ye.__chain__=_e,ye}return Q.apply(u,Pl([this.value()],arguments))})}),u}function Co(){}var vw=_p(gi),bD=_p(JE),xD=_p(jf);function Mh(u){return mx(u)?__(Go(u)):function xa(u){return function(f){return Cc(f,u)}}(u)}var Kv=ox(),Ch=ox(!0);function Sh(){return[]}function Jd(){return!1}var wD=G_(function(u,f){return u+f},0),MD=W_("ceil"),xw=G_(function(u,f){return u/f},1),CD=W_("floor"),DD=G_(function(u,f){return u*f},1),jF=W_("round"),ty=G_(function(u,f){return u-f},0);return I.after=function y1(u,f){if("function"!=typeof f)throw new Er(Un);return u=un(u),function(){if(--u<1)return f.apply(this,arguments)}},I.ary=xh,I.assign=vt,I.assignIn=rw,I.assignInWith=Gl,I.assignWith=ll,I.at=N1,I.before=Aa,I.bind=Fc,I.bindAll=fD,I.bindKey=xv,I.castArray=function M1(){if(!arguments.length)return[];var u=arguments[0];return sn(u)?u:[u]},I.chain=Hx,I.chunk=function nv(u,f,_){f=(_?Tr(u,f,_):f===z)?1:fr(un(f),0);var w=null==u?0:u.length;if(!w||f<1)return[];for(var S=0,P=0,$=ae(w_(w/f));SS?0:S+_),(w=w===z||w>S?S:un(w))<0&&(w+=S),w=_>w?0:F1(w);_>>0)?(u=Fn(u))&&("string"==typeof f||null!=f&&!$p(f))&&!(f=Js(f))&&Sd(u)?Ic(yo(u),0,_):u.split(f,_):[]},I.spread=function Zx(u,f){if("function"!=typeof u)throw new Er(Un);return f=null==f?0:fr(un(f),0),pn(function(_){var w=_[f],S=Ic(_,0,f);return w&&Pl(S,w),_s(u,this,S)})},I.tail=function Oc(u){var f=null==u?0:u.length;return f?ts(u,1,f):[]},I.take=function Fx(u,f,_){return u&&u.length?ts(u,0,(f=_||f===z?1:un(f))<0?0:f):[]},I.takeRight=function Lx(u,f,_){var w=null==u?0:u.length;return w?ts(u,(f=w-(f=_||f===z?1:un(f)))<0?0:f,w):[]},I.takeRightWhile=function QA(u,f){return u&&u.length?uh(u,Nt(f,3),!1,!0):[]},I.takeWhile=function RF(u,f){return u&&u.length?uh(u,Nt(f,3)):[]},I.tap=function t1(u,f){return f(u),u},I.throttle=function Lp(u,f,_){var w=!0,S=!0;if("function"!=typeof u)throw new Er(Un);return Mi(_)&&(w="leading"in _?!!_.leading:w,S="trailing"in _?!!_.trailing:S),b1(u,f,{leading:w,maxWait:f,trailing:S})},I.thru=Rp,I.toArray=Ov,I.toPairs=lw,I.toPairsIn=zv,I.toPath=function bw(u){return sn(u)?gi(u,Go):As(u)?[u]:eo(bx(Fn(u)))},I.toPlainObject=$l,I.transform=function K1(u,f,_){var w=sn(u),S=w||ol(u)||jo(u);if(f=Nt(f,4),null==_){var P=u&&u.constructor;_=S?w?new P:[]:Mi(u)&&Hl(P)?Od(xs(u)):{}}return(S?Rn:ki)(u,function($,Y,Q){return f(_,$,Y,Q)}),_},I.unary=function Qx(u){return xh(u,1)},I.union=Dp,I.unionBy=JA,I.unionWith=Nx,I.uniq=function Bx(u){return u&&u.length?si(u):[]},I.uniqBy=function Ux(u,f){return u&&u.length?si(u,Nt(f,2)):[]},I.uniqWith=function fv(u,f){return f="function"==typeof f?f:z,u&&u.length?si(u,z,f):[]},I.unset=function Z1(u,f){return null==u||dh(u,f)},I.unzip=Tp,I.unzipWith=yh,I.update=function Q1(u,f,_){return null==u?u:ix(u,f,fp(_))},I.updateWith=function J1(u,f,_,w){return w="function"==typeof w?w:z,null==u?u:ix(u,f,fp(_),w)},I.values=Uc,I.valuesIn=function eD(u){return null==u?[]:Ju(u,Ds(u))},I.without=Ip,I.words=mw,I.wrap=function Av(u,f){return Ev(fp(f),u)},I.xor=Vx,I.xorBy=pv,I.xorWith=mv,I.zip=gv,I.zipObject=function bh(u,f){return Tc(u||[],f||[],Qs)},I.zipObjectDeep=function e1(u,f){return Tc(u||[],f||[],zd)},I.zipWith=zx,I.entries=lw,I.entriesIn=zv,I.extend=rw,I.extendWith=Gl,_w(I,I),I.add=wD,I.attempt=jv,I.camelCase=V,I.capitalize=Hv,I.ceil=MD,I.clamp=function tD(u,f,_){return _===z&&(_=f,f=z),_!==z&&(_=(_=Mo(_))==_?_:0),f!==z&&(f=(f=Mo(f))==f?f:0),Nl(Mo(u),f,_)},I.clone=function Zn(u){return Ms(u,js)},I.cloneDeep=function S1(u){return Ms(u,Si|js)},I.cloneDeepWith=function Np(u,f){return Ms(u,Si|js,f="function"==typeof f?f:z)},I.cloneWith=function C1(u,f){return Ms(u,js,f="function"==typeof f?f:z)},I.conformsTo=function Jx(u,f){return null==f||R_(u,f,pr(f))},I.deburr=$v,I.defaultTo=function gD(u,f){return null==u||u!=u?f:u},I.divide=xw,I.endsWith=function iD(u,f,_){u=Fn(u),f=Js(f);var w=u.length,S=_=_===z?w:Nl(un(_),0,w);return(_-=f.length)>=0&&u.slice(_,S)==f},I.eq=Wo,I.escape=function rD(u){return(u=Fn(u))&&FE.test(u)?u.replace(p0,ot):u},I.escapeRegExp=function cw(u){return(u=Fn(u))&&v0.test(u)?u.replace(s_,"\\$&"):u},I.every=function vv(u,f,_){var w=sn(u)?JE:j0;return _&&Tr(u,f,_)&&(f=z),w(u,Nt(f,3))},I.find=Wx,I.findIndex=Ex,I.findKey=function Fv(u,f){return ee(u,Nt(f,3),ki)},I.findLast=Pp,I.findLastIndex=rv,I.findLastKey=function Lv(u,f){return ee(u,Nt(f,3),P_)},I.floor=CD,I.forEach=bv,I.forEachRight=zl,I.forIn=function V1(u,f){return null==u?u:il(u,Nt(f,3),Ds)},I.forInRight=function Nv(u,f){return null==u?u:Di(u,Nt(f,3),Ds)},I.forOwn=function cl(u,f){return u&&ki(u,Nt(f,3))},I.forOwnRight=function z1(u,f){return u&&P_(u,Nt(f,3))},I.get=Bv,I.gt=E1,I.gte=A1,I.has=function G1(u,f){return null!=u&&hx(u,f,op)},I.hasIn=Uv,I.head=Dx,I.identity=is,I.includes=function l1(u,f,_,w){u=no(u)?u:Uc(u),_=_&&!w?un(_):0;var S=u.length;return _<0&&(_=fr(S+_,0)),Gp(u)?_<=S&&u.indexOf(f,_)>-1:!!S&&Lt(u,f,_)>-1},I.indexOf=function vh(u,f,_){var w=null==u?0:u.length;if(!w)return-1;var S=null==_?0:un(_);return S<0&&(S=fr(w+S,0)),Lt(u,f,S)},I.inRange=function nD(u,f,_){return f=al(f),_===z?(_=f,f=0):_=al(_),function O_(u,f,_){return u>=Zr(f,_)&&u=-Ya&&u<=Ya},I.isSet=iw,I.isString=Gp,I.isSymbol=As,I.isTypedArray=jo,I.isUndefined=function R1(u){return u===z},I.isWeakMap=function k1(u){return Pi(u)&&Hr(u)==vd},I.isWeakSet=function P1(u){return Pi(u)&&"[object WeakSet]"==es(u)},I.join=function Tx(u,f){return null==u?"":fF.call(u,f)},I.kebabCase=sD,I.last=Ir,I.lastIndexOf=function cv(u,f,_){var w=null==u?0:u.length;if(!w)return-1;var S=w;return _!==z&&(S=(S=un(_))<0?fr(w+S,0):Zr(S,w-1)),f==f?function Ed(X,he,ae){for(var ze=ae+1;ze--;)if(X[ze]===he)return ze;return ze}(u,f,S):Qu(u,qf,S,!0)},I.lowerCase=dw,I.lowerFirst=oD,I.lt=Pv,I.lte=O1,I.max=function ww(u){return u&&u.length?Nd(u,is,Bd):z},I.maxBy=function Mw(u,f){return u&&u.length?Nd(u,Nt(f,2),Bd):z},I.mean=function SD(u){return Cd(u,is)},I.meanBy=function ED(u,f){return Cd(u,Nt(f,2))},I.min=function ro(u){return u&&u.length?Nd(u,is,cp):z},I.minBy=function AD(u,f){return u&&u.length?Nd(u,Nt(f,2),cp):z},I.stubArray=Sh,I.stubFalse=Jd,I.stubObject=function yw(){return{}},I.stubString=function Zv(){return""},I.stubTrue=function Qv(){return!0},I.multiply=DD,I.nth=function Ix(u,f){return u&&u.length?CA(u,un(f)):z},I.noConflict=function E(){return Sr._===this&&(Sr._=Zf),this},I.noop=Co,I.now=Fp,I.pad=function aD(u,f,_){u=Fn(u);var w=(f=un(f))?hr(u):0;if(!f||w>=f)return u;var S=(f-w)/2;return vp(M_(S),_)+u+vp(w_(S),_)},I.padEnd=function VF(u,f,_){u=Fn(u);var w=(f=un(f))?hr(u):0;return f&&wf){var w=u;u=f,f=w}if(_||u%1||f%1){var S=C_();return Zr(u+S*(f-u+Pe("1e-"+((S+"").length-1))),f)}return lh(u,f)},I.reduce=function u1(u,f,_){var w=sn(u)?g_:R0,S=arguments.length<3;return w(u,Nt(f,4),_,S,nl)},I.reduceRight=function h1(u,f,_){var w=sn(u)?eA:R0,S=arguments.length<3;return w(u,Nt(f,4),_,S,k_)},I.repeat=function Gi(u,f,_){return f=(_?Tr(u,f,_):f===z)?1:un(f),ch(Fn(u),f)},I.replace=function lD(){var u=arguments,f=Fn(u[0]);return u.length<3?f:f.replace(u[1],u[2])},I.result=function q1(u,f,_){var w=-1,S=(f=Ma(f,u)).length;for(S||(S=1,u=z);++wYa)return[];var _=pa,w=Zr(u,pa);f=Nt(f),u-=pa;for(var S=Ks(w,f);++_=P)return u;var Y=_-hr(w);if(Y<1)return w;var Q=$?Ic($,0,Y).join(""):u.slice(0,Y);if(S===z)return Q+w;if($&&(Y+=Q.length-Y),$p(S)){if(u.slice(Y).search(S)){var _e,ye=Q;for(S.global||(S=bc(S.source,Fn(w0.exec(S))+"g")),S.lastIndex=0;_e=S.exec(ye);)var be=_e.index;Q=Q.slice(0,be===z?Y:be)}}else if(u.indexOf(Js(S),Y)!=Y){var Xe=Q.lastIndexOf(S);Xe>-1&&(Q=Q.slice(0,Xe))}return Q+w},I.unescape=function hD(u){return(u=Fn(u))&&OE.test(u)?u.replace(f0,Kf):u},I.uniqueId=function ey(u){var f=++bi;return Fn(u)+f},I.upperCase=pw,I.upperFirst=Zd,I.each=bv,I.eachRight=zl,I.first=Dx,_w(I,function(){var u={};return ki(I,function(f,_){ri.call(I.prototype,_)||(u[_]=f)}),u}(),{chain:!1}),I.VERSION="4.17.21",Rn(["bind","bindKey","curry","curryRight","partial","partialRight"],function(u){I[u].placeholder=I}),Rn(["drop","take"],function(u,f){kn.prototype[u]=function(_){_=_===z?1:fr(un(_),0);var w=this.__filtered__&&!f?new kn(this):this.clone();return w.__filtered__?w.__takeCount__=Zr(_,w.__takeCount__):w.__views__.push({size:Zr(_,pa),type:u+(w.__dir__<0?"Right":"")}),w},kn.prototype[u+"Right"]=function(_){return this.reverse()[u](_).reverse()}}),Rn(["filter","map","takeWhile"],function(u,f){var _=f+1,w=1==_||3==_;kn.prototype[u]=function(S){var P=this.clone();return P.__iteratees__.push({iteratee:Nt(S,3),type:_}),P.__filtered__=P.__filtered__||w,P}}),Rn(["head","last"],function(u,f){var _="take"+(f?"Right":"");kn.prototype[u]=function(){return this[_](1).value()[0]}}),Rn(["initial","tail"],function(u,f){var _="drop"+(f?"":"Right");kn.prototype[u]=function(){return this.__filtered__?new kn(this):this[_](1)}}),kn.prototype.compact=function(){return this.filter(is)},kn.prototype.find=function(u){return this.filter(u).head()},kn.prototype.findLast=function(u){return this.reverse().find(u)},kn.prototype.invokeMap=pn(function(u,f){return"function"==typeof u?new kn(this):this.map(function(_){return ba(_,u,f)})}),kn.prototype.reject=function(u){return this.filter(Sv(Nt(u)))},kn.prototype.slice=function(u,f){u=un(u);var _=this;return _.__filtered__&&(u>0||f<0)?new kn(_):(u<0?_=_.takeRight(-u):u&&(_=_.drop(u)),f!==z&&(_=(f=un(f))<0?_.dropRight(-f):_.take(f-u)),_)},kn.prototype.takeRightWhile=function(u){return this.reverse().takeWhile(u).reverse()},kn.prototype.toArray=function(){return this.take(pa)},ki(kn.prototype,function(u,f){var _=/^(?:filter|find|map|reject)|While$/.test(f),w=/^(?:head|last)$/.test(f),S=I[w?"take"+("last"==f?"Right":""):f],P=w||/^find/.test(f);S&&(I.prototype[f]=function(){var $=this.__wrapped__,Y=w?[1]:arguments,Q=$ instanceof kn,_e=Y[0],ye=Q||sn($),be=function(An){var Ln=S.apply(I,Pl([An],Y));return w&&Xe?Ln[0]:Ln};ye&&_&&"function"==typeof _e&&1!=_e.length&&(Q=ye=!1);var Xe=this.__chain__,zt=P&&!Xe,mn=Q&&!this.__actions__.length;if(!P&&ye){$=mn?$:new kn(this);var Ht=u.apply($,Y);return Ht.__actions__.push({func:Rp,args:[be],thisArg:z}),new Ai(Ht,Xe)}return zt&&mn?u.apply(this,Y):(Ht=this.thru(be),zt?w?Ht.value()[0]:Ht.value():Ht)})}),Rn(["pop","push","shift","sort","splice","unshift"],function(u){var f=sr[u],_=/^(?:push|sort|unshift)$/.test(u)?"tap":"thru",w=/^(?:pop|shift)$/.test(u);I.prototype[u]=function(){var S=arguments;if(w&&!this.__chain__){var P=this.value();return f.apply(sn(P)?P:[],S)}return this[_](function($){return f.apply(sn($)?$:[],S)})}}),ki(kn.prototype,function(u,f){var _=I[f];if(_){var w=_.name+"";ri.call(kd,w)||(kd[w]=[]),kd[w].push({name:f,func:_})}}),kd[jd(z,ur).name]=[{name:"wrapper",func:z}],kn.prototype.clone=function U0(){var u=new kn(this.__wrapped__);return u.__actions__=eo(this.__actions__),u.__dir__=this.__dir__,u.__filtered__=this.__filtered__,u.__iteratees__=eo(this.__iteratees__),u.__takeCount__=this.__takeCount__,u.__views__=eo(this.__views__),u},kn.prototype.reverse=function Fd(){if(this.__filtered__){var u=new kn(this);u.__dir__=-1,u.__filtered__=!0}else(u=this.clone()).__dir__*=-1;return u},kn.prototype.value=function ws(){var u=this.__wrapped__.value(),f=this.__dir__,_=sn(u),w=f<0,S=_?u.length:0,P=function wp(u,f,_){for(var w=-1,S=_.length;++w=this.__values__.length;return{done:u,value:u?z:this.__values__[this.__index__++]}},I.prototype.plant=function n1(u){for(var f,_=this;_ instanceof wc;){var w=ns(_);w.__index__=0,w.__values__=z,f?S.__wrapped__=w:f=w;var S=w;_=_.__wrapped__}return S.__wrapped__=u,f},I.prototype.reverse=function r1(){var u=this.__wrapped__;if(u instanceof kn){var f=u;return this.__actions__.length&&(f=new kn(this)),(f=f.reverse()).__actions__.push({func:Rp,args:[dv],thisArg:z}),new Ai(f,this.__chain__)}return this.thru(dv)},I.prototype.toJSON=I.prototype.valueOf=I.prototype.value=function kF(){return wa(this.__wrapped__,this.__actions__)},I.prototype.first=I.prototype.head,ih&&(I.prototype[ih]=function Yd(){return this}),I}();Sr._=ys,(dn=function(){return ys}.call(Gs,ps,Gs,Bo))!==z&&(Bo.exports=dn)}.call(this)},738:function(Bo){var Gs;Bo.exports=((Gs=function(){function ps(Ci){return Br.appendChild(Ci.dom),Ci}function dn(Ci){for(var Si=0;SiQt+1e3&&(Dl.update(1e3*Un/(Ci-Qt),100),Qt=Ci,Un=0,Ws)){var Si=performance.memory;Ws.update(Si.usedJSHeapSize/1048576,Si.jsHeapSizeLimit/1048576)}return Ci},update:function(){Kr=this.end()},domElement:Br,setMode:dn}}).Panel=function(ps,dn,z){var Br=1/0,Kr=0,Qt=Math.round,Un=Qt(window.devicePixelRatio||1),Dl=80*Un,Ga=48*Un,Ws=3*Un,Ci=2*Un,Si=3*Un,ms=15*Un,js=74*Un,Ys=30*Un,Uo=document.createElement("canvas");Uo.width=Dl,Uo.height=Ga,Uo.style.cssText="width:80px;height:48px";var On=Uo.getContext("2d");return On.font="bold "+9*Un+"px Helvetica,Arial,sans-serif",On.textBaseline="top",On.fillStyle=z,On.fillRect(0,0,Dl,Ga),On.fillStyle=dn,On.fillText(ps,Ws,Ci),On.fillRect(Si,ms,js,Ys),On.fillStyle=z,On.globalAlpha=.9,On.fillRect(Si,ms,js,Ys),{dom:Uo,update:function(ur,mc){Br=Math.min(Br,ur),Kr=Math.max(Kr,ur),On.fillStyle=z,On.globalAlpha=1,On.fillRect(0,0,Dl,ms),On.fillStyle=dn,On.fillText(Qt(ur)+" "+ps+" ("+Qt(Br)+"-"+Qt(Kr)+")",Ws,Ci),On.drawImage(Uo,Si+Un,ms,js-Un,Ys,Si,ms,js-Un,Ys),On.fillRect(Si+js-Un,ms,Un,Ys),On.fillStyle=z,On.globalAlpha=.9,On.fillRect(Si+js-Un,ms,Un,Qt((1-ur/mc)*Ys))}}},Gs)}},Bo=>{Bo(Bo.s=360)}]); \ No newline at end of file diff --git a/frontend/dist/gui/main.7bd3d1f4f0e0326e.js b/frontend/dist/gui/main.7bd3d1f4f0e0326e.js deleted file mode 100644 index e62a635..0000000 --- a/frontend/dist/gui/main.7bd3d1f4f0e0326e.js +++ /dev/null @@ -1 +0,0 @@ -(self.webpackChunkgui=self.webpackChunkgui||[]).push([[179],{651:(Oo,zs,ps)=>{"use strict";function dn(i){return"function"==typeof i}function z(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 Br=z(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 Kr(i,t){if(i){const e=i.indexOf(t);0<=e&&i.splice(e,1)}}class Qt{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(dn(n))try{n()}catch(s){t=s instanceof Br?s.errors:[s]}const{_finalizers:r}=this;if(r){this._finalizers=null;for(const s of r)try{Ua(s)}catch(o){t=t??[],o instanceof Br?t=[...t,...o.errors]:t.push(o)}}if(t)throw new Br(t)}}add(t){var e;if(t&&t!==this)if(this.closed)Ua(t);else{if(t instanceof Qt){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)&&Kr(e,t)}remove(t){const{_finalizers:e}=this;e&&Kr(e,t),t instanceof Qt&&t._removeParent(this)}}Qt.EMPTY=(()=>{const i=new Qt;return i.closed=!0,i})();const Un=Qt.EMPTY;function xl(i){return i instanceof Qt||i&&"closed"in i&&dn(i.remove)&&dn(i.add)&&dn(i.unsubscribe)}function Ua(i){dn(i)?i():i.unsubscribe()}const Hs={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 Si(i){Ci.setTimeout(()=>{const{onUnhandledError:t}=Hs;if(!t)throw i;t(i)})}function ms(){}const Gs=Pn("C",void 0,void 0);function Pn(i,t,e){return{kind:i,value:t,error:e}}let cr=null;function oc(i){if(Hs.useDeprecatedSynchronousErrorHandling){const t=!cr;if(t&&(cr={errorThrown:!1,error:null}),i(),t){const{errorThrown:e,error:n}=cr;if(cr=null,e)throw n}}else i()}class wl extends Qt{constructor(t){super(),this.isStopped=!1,t?(this.destination=t,xl(t)&&t.add(this)):this.destination=yE}static create(t,e,n){return new la(t,e,n)}next(t){this.isStopped?jg(function Fo(i){return Pn("N",i,void 0)}(t),this):this._next(t)}error(t){this.isStopped?jg(function $s(i){return Pn("E",void 0,i)}(t),this):(this.isStopped=!0,this._error(t))}complete(){this.isStopped?jg(Gs,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 aa=Function.prototype.bind;function Ml(i,t){return aa.call(i,t)}class Va{constructor(t){this.partialObserver=t}next(t){const{partialObserver:e}=this;if(e.next)try{e.next(t)}catch(n){fd(n)}}error(t){const{partialObserver:e}=this;if(e.error)try{e.error(t)}catch(n){fd(n)}else fd(t)}complete(){const{partialObserver:t}=this;if(t.complete)try{t.complete()}catch(e){fd(e)}}}class la extends wl{constructor(t,e,n){let r;if(super(),dn(t)||!t)r={next:t??void 0,error:e??void 0,complete:n??void 0};else{let s;this&&Hs.useDeprecatedNextContext?(s=Object.create(t),s.unsubscribe=()=>this.unsubscribe(),r={next:t.next&&Ml(t.next,s),error:t.error&&Ml(t.error,s),complete:t.complete&&Ml(t.complete,s)}):r=t}this.destination=new Va(r)}}function fd(i){Hs.useDeprecatedSynchronousErrorHandling?function oa(i){Hs.useDeprecatedSynchronousErrorHandling&&cr&&(cr.errorThrown=!0,cr.error=i)}(i):Si(i)}function jg(i,t){const{onStoppedNotification:e}=Hs;e&&Ci.setTimeout(()=>e(i,t))}const yE={closed:!0,next:ms,error:function vE(i){throw i},complete:ms},Yg="function"==typeof Symbol&&Symbol.observable||"@@observable";function za(i){return i}function n0(i){return 0===i.length?za:1===i.length?i[0]:function(e){return i.reduce((n,r)=>r(n),e)}}let Tn=(()=>{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 kf(i){return i&&i instanceof wl||function xE(i){return i&&dn(i.next)&&dn(i.error)&&dn(i.complete)}(i)&&xl(i)}(e)?e:new la(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=Ha(n))((r,s)=>{const o=new la({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)}[Yg](){return this}pipe(...e){return n0(e)(this)}toPromise(e){return new(e=Ha(e))((n,r)=>{let s;this.subscribe(o=>s=o,o=>r(o),()=>n(s))})}}return i.create=t=>new i(t),i})();function Ha(i){var t;return null!==(t=i??Hs.Promise)&&void 0!==t?t:Promise}const ca=z(i=>function(){i(this),this.name="ObjectUnsubscribedError",this.message="object unsubscribed"});let Ie=(()=>{class i extends Tn{constructor(){super(),this.closed=!1,this.currentObservers=null,this.observers=[],this.isStopped=!1,this.hasError=!1,this.thrownError=null}lift(e){const n=new r0(this,this);return n.operator=e,n}_throwIfClosed(){if(this.closed)throw new ca}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?Un:(this.currentObservers=null,s.push(e),new Qt(()=>{this.currentObservers=null,Kr(s,e)}))}_checkFinalizedStatuses(e){const{hasError:n,thrownError:r,isStopped:s}=this;n?e.error(r):s&&e.complete()}asObservable(){const e=new Tn;return e.source=this,e}}return i.create=(t,e)=>new r0(t,e),i})();class r0 extends Ie{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:Un}}function s0(i){return dn(i?.lift)}function ti(i){return t=>{if(s0(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 jn(i,t,e,n,r){return new wE(i,t,e,n,r)}class wE extends wl{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 et(i,t){return ti((e,n)=>{let r=0;e.subscribe(jn(n,s=>{n.next(i.call(t,s,r++))}))})}function da(i){return this instanceof da?(this.v=i,this):new da(i)}function Lf(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 qg(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 e_=i=>i&&"number"==typeof i.length&&"function"!=typeof i;function t_(i){return dn(i?.then)}function d0(i){return dn(i[Yg])}function u0(i){return Symbol.asyncIterator&&dn(i?.[Symbol.asyncIterator])}function h0(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 f0=function n_(){return"function"==typeof Symbol&&Symbol.iterator?Symbol.iterator:"@@iterator"}();function Nf(i){return dn(i?.[f0])}function p0(i){return function Ff(i,t,e){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var r,n=e.apply(i,t||[]),s=[];return r=Object.create(("function"==typeof AsyncIterator?AsyncIterator:Object).prototype),a("next"),a("throw"),a("return",function o(m){return function(g){return Promise.resolve(g).then(m,h)}}),r[Symbol.asyncIterator]=function(){return this},r;function a(m,g){n[m]&&(r[m]=function(b){return new Promise(function(v,y){s.push([m,b,v,y])>1||l(m,b)})},g&&(r[m]=g(r[m])))}function l(m,g){try{!function c(m){m.value instanceof da?Promise.resolve(m.value.v).then(d,h):p(s[0][2],m)}(n[m](g))}catch(b){p(s[0][3],b)}}function d(m){l("next",m)}function h(m){l("throw",m)}function p(m,g){m(g),s.shift(),s.length&&l(s[0][0],s[0][1])}}(this,arguments,function*(){const e=i.getReader();try{for(;;){const{value:n,done:r}=yield da(e.read());if(r)return yield da(void 0);yield yield da(n)}}finally{e.releaseLock()}})}function m0(i){return dn(i?.getReader)}function Mr(i){if(i instanceof Tn)return i;if(null!=i){if(d0(i))return function kE(i){return new Tn(t=>{const e=i[Yg]();if(dn(e.subscribe))return e.subscribe(t);throw new TypeError("Provided object does not correctly implement Symbol.observable")})}(i);if(e_(i))return function PE(i){return new Tn(t=>{for(let e=0;e{i.then(e=>{t.closed||(t.next(e),t.complete())},e=>t.error(e)).then(null,Si)})}(i);if(u0(i))return g0(i);if(Nf(i))return function FE(i){return new Tn(t=>{for(const e of i)if(t.next(e),t.closed)return;t.complete()})}(i);if(m0(i))return function _0(i){return g0(p0(i))}(i)}throw h0(i)}function g0(i){return new Tn(t=>{(function LE(i,t){var e,n,r,s;return function md(i,t,e,n){return new(e||(e=Promise))(function(s,o){function a(d){try{c(n.next(d))}catch(h){o(h)}}function l(d){try{c(n.throw(d))}catch(h){o(h)}}function c(d){d.done?s(d.value):function r(s){return s instanceof e?s:new e(function(o){o(s)})}(d.value).then(a,l)}c((n=n.apply(i,t||[])).next())})}(this,void 0,void 0,function*(){try{for(e=Lf(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 $a(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 tr(i,t,e=1/0){return dn(t)?tr((n,r)=>et((s,o)=>t(n,s,r,o))(Mr(i(n,r))),e):("number"==typeof t&&(e=t),ti((n,r)=>function NE(i,t,e,n,r,s,o,a){const l=[];let c=0,d=0,h=!1;const p=()=>{h&&!l.length&&!c&&t.complete()},m=b=>c{s&&t.next(b),c++;let v=!1;Mr(e(b,d++)).subscribe(jn(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(jn(t,m,()=>{h=!0,p()})),()=>{a?.()}}(n,r,i,e)))}function vd(i=1/0){return tr(za,i)}const mo=new Tn(i=>i.complete());function Bu(i){return i&&dn(i.schedule)}function r_(i){return i[i.length-1]}function v0(i){return dn(r_(i))?i.pop():void 0}function Uu(i){return Bu(r_(i))?i.pop():void 0}function s_(i,t=0){return ti((e,n)=>{e.subscribe(jn(n,r=>$a(n,i,()=>n.next(r),t),()=>$a(n,i,()=>n.complete(),t),r=>$a(n,i,()=>n.error(r),t)))})}function o_(i,t=0){return ti((e,n)=>{n.add(i.schedule(()=>e.subscribe(n),t))})}function a_(i,t){if(!i)throw new Error("Iterable cannot be null");return new Tn(e=>{$a(e,t,()=>{const n=i[Symbol.asyncIterator]();$a(e,t,()=>{n.next().then(r=>{r.done?e.complete():e.next(r.value)})},0,!0)})})}function Ni(i,t){return t?function x0(i,t){if(null!=i){if(d0(i))return function UE(i,t){return Mr(i).pipe(o_(t),s_(t))}(i,t);if(e_(i))return function zE(i,t){return new Tn(e=>{let n=0;return t.schedule(function(){n===i.length?e.complete():(e.next(i[n++]),e.closed||this.schedule())})})}(i,t);if(t_(i))return function VE(i,t){return Mr(i).pipe(o_(t),s_(t))}(i,t);if(u0(i))return a_(i,t);if(Nf(i))return function HE(i,t){return new Tn(e=>{let n;return $a(e,t,()=>{n=i[f0](),$a(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)}),()=>dn(n?.return)&&n.return()})}(i,t);if(m0(i))return function b0(i,t){return a_(p0(i),t)}(i,t)}throw h0(i)}(i,t):Mr(i)}function Cr(...i){const t=Uu(i),e=function y0(i,t){return"number"==typeof r_(i)?i.pop():t}(i,1/0),n=i;return n.length?1===n.length?Mr(n[0]):vd(e)(Ni(n,t)):mo}function Bf(i={}){const{connector:t=(()=>new Ie),resetOnError:e=!0,resetOnComplete:n=!0,resetOnRefCountZero:r=!0}=i;return s=>{let o,a,l,c=0,d=!1,h=!1;const p=()=>{a?.unsubscribe(),a=void 0},m=()=>{p(),o=l=void 0,d=h=!1},g=()=>{const b=o;m(),b?.unsubscribe()};return ti((b,v)=>{c++,!h&&!d&&p();const y=l=l??t();v.add(()=>{c--,0===c&&!h&&!d&&(a=yd(g,r))}),y.subscribe(v),!o&&c>0&&(o=new la({next:M=>y.next(M),error:M=>{h=!0,p(),a=yd(m,e,M),y.error(M)},complete:()=>{d=!0,p(),a=yd(m,n),y.complete()}}),Mr(b).subscribe(o))})(s)}}function yd(i,t,...e){if(!0===t)return void i();if(!1===t)return;const n=new la({next:()=>{n.unsubscribe(),i()}});return Mr(t(...e)).subscribe(n)}function ci(i){for(let t in i)if(i[t]===ci)return t;throw Error("Could not find renamed property on target object.")}function l_(i,t){for(const e in t)t.hasOwnProperty(e)&&!i.hasOwnProperty(e)&&(i[e]=t[e])}function mi(i){if("string"==typeof i)return i;if(Array.isArray(i))return"["+i.map(mi).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 Uf(i,t){return null==i||""===i?null===t?"":t:null==t||""===t?i:i+" "+t}const c_=ci({__forward_ref__:ci});function Gn(i){return i.__forward_ref__=Gn,i.toString=function(){return mi(this())},i}function Ot(i){return Vu(i)?i():i}function Vu(i){return"function"==typeof i&&i.hasOwnProperty(c_)&&i.__forward_ref__===Gn}function zu(i){return i&&!!i.\u0275providers}const Gu="https://g.co/ng/security#xss";class pe extends Error{constructor(t,e){super(Vf(t,e)),this.code=t}}function Vf(i,t){return`NG0${Math.abs(i)}${t?": "+t.trim():""}`}function Jt(i){return"string"==typeof i?i:null==i?"":String(i)}function zf(i,t){throw new pe(-201,!1)}function Sn(i,t){null==i&&function ni(i,t,e,n){throw new Error(`ASSERTION ERROR: ${i}`+(null==n?"":` [Expected=> ${e} ${n} ${t} <=Actual]`))}(t,i,null,"!=")}function Re(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 Hf(i){return d_(i,bd)||d_(i,h_)}function d_(i,t){return i.hasOwnProperty(t)?i[t]:null}function u_(i){return i&&(i.hasOwnProperty(gs)||i.hasOwnProperty(C0))?i[gs]:null}const bd=ci({\u0275prov:ci}),gs=ci({\u0275inj:ci}),h_=ci({ngInjectableDef:ci}),C0=ci({ngInjectorDef:ci});var Ft=(()=>((Ft=Ft||{})[Ft.Default=0]="Default",Ft[Ft.Host=1]="Host",Ft[Ft.Self=2]="Self",Ft[Ft.SkipSelf=4]="SkipSelf",Ft[Ft.Optional=8]="Optional",Ft))();let Gf;function js(i){const t=Gf;return Gf=i,t}function _s(i,t,e){const n=Hf(i);return n&&"root"==n.providedIn?void 0===n.value?n.value=n.factory():n.value:e&Ft.Optional?null:void 0!==t?t:void zf(mi(i))}const In=(()=>typeof globalThis<"u"&&globalThis||typeof global<"u"&&global||typeof window<"u"&&window||typeof self<"u"&&typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&self)(),Sl={},Wu="__NG_DI_FLAG__",gi="ngTempTokenPath",El="ngTokenPath",f_=/\n/gm,KE="\u0275",$f="__source";let ju;function xd(i){const t=ju;return ju=i,t}function ZE(i,t=Ft.Default){if(void 0===ju)throw new pe(-203,!1);return null===ju?_s(i,void 0,t):ju.get(i,t&Ft.Optional?null:void 0,t)}function ee(i,t=Ft.Default){return(function S0(){return Gf}()||ZE)(Ot(i),t)}function Lt(i,t=Ft.Default){return ee(i,Wf(t))}function Wf(i){return typeof i>"u"||"number"==typeof i?i:0|(i.optional&&8)|(i.host&&1)|(i.self&&2)|(i.skipSelf&&4)}function jf(i){const t=[];for(let e=0;e((go=go||{})[go.OnPush=0]="OnPush",go[go.Default=1]="Default",go))(),Ys=(()=>{return(i=Ys||(Ys={}))[i.Emulated=0]="Emulated",i[i.None=2]="None",i[i.ShadowDom=3]="ShadowDom",Ys;var i})();const ja={},$n=[],Ur=ci({\u0275cmp:ci}),qu=ci({\u0275dir:ci}),dc=ci({\u0275pipe:ci}),g_=ci({\u0275mod:ci}),ua=ci({\u0275fac:ci}),Xu=ci({__NG_ELEMENT_ID__:ci});let QE=0;function st(i){return Wa(()=>{const t=_o(i),e={...t,decls:i.decls,vars:i.vars,template:i.template,consts:i.consts||null,ngContentSelectors:i.ngContentSelectors,onPush:i.changeDetection===go.OnPush,directiveDefs:null,pipeDefs:null,dependencies:t.standalone&&i.dependencies||null,getStandaloneInjector:null,data:i.data||{},encapsulation:i.encapsulation||Ys.Emulated,id:"c"+QE++,styles:i.styles||$n,_:null,schemas:i.schemas||null,tView:null};__(e);const n=i.dependencies;return e.directiveDefs=qf(n,!1),e.pipeDefs=qf(n,!0),e})}function Ku(i,t,e){const n=i.\u0275cmp;n.directiveDefs=qf(t,!1),n.pipeDefs=qf(e,!0)}function JE(i){return Hn(i)||Vr(i)}function Md(i){return null!==i}function en(i){return Wa(()=>({type:i.type,bootstrap:i.bootstrap||$n,declarations:i.declarations||$n,imports:i.imports||$n,exports:i.exports||$n,transitiveCompileScopes:null,schemas:i.schemas||null,id:i.id||null}))}function Yf(i,t){if(null==i)return ja;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 ve(i){return Wa(()=>{const t=_o(i);return __(t),t})}function Gi(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 Hn(i){return i[Ur]||null}function Vr(i){return i[qu]||null}function vs(i){return i[dc]||null}function dr(i,t){const e=i[g_]||null;if(!e&&!0===t)throw new Error(`Type ${mi(i)} does not have '\u0275mod' property.`);return e}function _o(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||$n,viewQuery:i.viewQuery||null,features:i.features||null,setInput:null,findHostDirectiveDefs:null,hostDirectives:null,inputs:Yf(i.inputs,t),outputs:Yf(i.outputs)}}function __(i){i.features?.forEach(t=>t(i))}function qf(i,t){if(!i)return null;const e=t?vs:JE;return()=>("function"==typeof i?i():i).map(n=>e(n)).filter(Md)}const Ya=0,ot=1,fn=2,Bi=3,ys=4,X=5,he=6,ae=7,Ue=8,jt=9,Vn=10,bt=11,ai=12,uc=13,A0=14,Er=15,nr=16,Zu=17,Bo=18,qs=19,Al=20,ii=21,bi=22,Sd=1,D0=2,Xf=7,Kf=8,qa=9,Ui=10;function bs(i){return Array.isArray(i)&&"object"==typeof i[Sd]}function xs(i){return Array.isArray(i)&&!0===i[Sd]}function Zf(i){return 0!=(4&i.flags)}function Ed(i){return i.componentOffset>-1}function hc(i){return 1==(1&i.flags)}function vo(i){return!!i.template}function Qu(i){return 0!=(256&i[fn])}function Xa(i,t){return i.hasOwnProperty(ua)?i[ua]:null}class Dd{constructor(t,e,n){this.previousValue=t,this.currentValue=e,this.firstChange=n}isFirstChange(){return this.firstChange}}function xi(){return Td}function Td(i){return i.type.prototype.ngOnChanges&&(i.setInput=Id),ep}function ep(){const i=P0(this),t=i?.current;if(t){const e=i.previous;if(e===ja)i.previous=t;else for(let n in t)e[n]=t[n];i.current=null,this.ngOnChanges(t)}}function Id(i,t,e,n){const r=this.declaredInputs[e],s=P0(i)||function rA(i,t){return i[k0]=t}(i,{previous:ja,current:null}),o=s.current||(s.current={}),a=s.previous,l=a[r];o[r]=new Dd(l&&l.currentValue,t,a===ja),i[n]=t}xi.ngInherit=!0;const k0="__ngSimpleChanges__";function P0(i){return i[k0]||null}const Qr=function(i,t,e){},Rd="svg";function I(i){for(;Array.isArray(i);)i=i[Ya];return i}function fc(i,t){return I(t[i])}function Ai(i,t){return I(t[i.index])}function O0(i,t){return i.data[t]}function Pd(i,t){return i[t]}function ws(i,t){const e=t[i];return bs(e)?e:e[Ya]}function tp(i){return 64==(64&i[fn])}function Dl(i,t){return null==t?null:i[t]}function F0(i){i[Bo]=0}function C_(i,t){i[X]+=t;let e=i,n=i[Bi];for(;null!==n&&(1===t&&1===e[X]||-1===t&&0===e[X]);)n[X]+=t,e=n,n=n[Bi]}const Pt={lFrame:Za(null),bindingsEnabled:!0};function ha(){return Pt.bindingsEnabled}function Se(){return Pt.lFrame.lView}function zn(){return Pt.lFrame.tView}function Ht(i){return Pt.lFrame.contextLView=i,i[Ue]}function Et(i){return Pt.lFrame.contextLView=null,i}function Ar(){let i=N0();for(;null!==i&&64===i.type;)i=i.parent;return i}function N0(){return Pt.lFrame.currentTNode}function fa(i,t){const e=Pt.lFrame;e.currentTNode=i,e.isParent=t}function S_(){return Pt.lFrame.isParent}function E_(){Pt.lFrame.isParent=!1}function zr(){const i=Pt.lFrame;let t=i.bindingRootIndex;return-1===t&&(t=i.bindingRootIndex=i.tView.bindingStartIndex),t}function Tl(){return Pt.lFrame.bindingIndex++}function Xs(i){const t=Pt.lFrame,e=t.bindingIndex;return t.bindingIndex=t.bindingIndex+i,e}function V0(i,t){const e=Pt.lFrame;e.bindingIndex=e.bindingRootIndex=i,Uo(t)}function Uo(i){Pt.lFrame.currentDirectiveIndex=i}function Ju(i){const t=Pt.lFrame.currentDirectiveIndex;return-1===t?null:i[t]}function Il(){return Pt.lFrame.currentQueryIndex}function Ms(i){Pt.lFrame.currentQueryIndex=i}function pA(i){const t=i[ot];return 2===t.type?t.declTNode:1===t.type?i[he]:null}function D_(i,t,e){if(e&Ft.SkipSelf){let r=t,s=i;for(;!(r=r.parent,null!==r||e&Ft.Host||(r=pA(s),null===r||(s=s[Er],10&r.type))););if(null===r)return!1;t=r,i=s}const n=Pt.lFrame=Od();return n.currentTNode=t,n.lView=i,!0}function ip(i){const t=Od(),e=i[ot];Pt.lFrame=t,t.currentTNode=e.firstChild,t.lView=i,t.tView=e,t.contextLView=i,t.bindingIndex=e.bindingStartIndex,t.inI18n=!1}function Od(){const i=Pt.lFrame,t=null===i?null:i.child;return null===t?Za(i):t}function Za(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 T_(){const i=Pt.lFrame;return Pt.lFrame=i.parent,i.currentTNode=null,i.lView=null,i}const z0=T_;function Fd(){const i=T_();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 qn(){return Pt.lFrame.selectedIndex}function Qa(i){Pt.lFrame.selectedIndex=i}function Di(){const i=Pt.lFrame;return O0(i.tView,i.selectedIndex)}function ki(){Pt.lFrame.currentNamespace=Rd}function pa(){!function mc(){Pt.lFrame.currentNamespace=null}()}function Ld(i,t){for(let e=t.directiveStart,n=t.directiveEnd;e=n)break}else t[l]<0&&(i[Bo]+=65536),(a>11>16&&(3&i[fn])===t){i[fn]+=2048,Qr(4,a,s);try{s.call(a)}finally{Qr(5,a,s)}}}else{Qr(4,a,s);try{s.call(a)}finally{Qr(5,a,s)}}}const ma=-1;class Nd{constructor(t,e,n){this.factory=t,this.resolving=!1,this.canSeeViewProviders=e,this.injectImpl=n}}function P_(i,t,e){let n=0;for(;nt){o=s-1;break}}}for(;s>16}(i),n=t;for(;e>0;)n=n[Er],e--;return n}let Bd=!0;function lp(i){const t=Bd;return Bd=i,t}const F_=255,Y0=5;let q0=0;const ga={};function nh(i,t){const e=X0(i,t);if(-1!==e)return e;const n=t[ot];n.firstCreatePass&&(i.injectorIndex=t.length,ih(n.data,i),ih(t,null),ih(n.blueprint,null));const r=rh(i,t),s=i.injectorIndex;if(ap(r)){const o=eh(r),a=th(r,t),l=a[ot].data;for(let c=0;c<8;c++)t[s+c]=a[o+c]|l[o+c]}return t[s+8]=r,s}function ih(i,t){i.push(0,0,0,0,0,0,0,0,t)}function X0(i,t){return-1===i.injectorIndex||i.parent&&i.parent.injectorIndex===i.injectorIndex||null===t[i.injectorIndex+8]?-1:i.injectorIndex}function rh(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=oh(r),null===n)return ma;if(e++,r=r[Er],-1!==n.injectorIndex)return n.injectorIndex|e<<16}return ma}function pn(i,t,e){!function L_(i,t,e){let n;"string"==typeof e?n=e.charCodeAt(0)||0:e.hasOwnProperty(Xu)&&(n=e[Xu]),null==n&&(n=e[Xu]=q0++);const r=n&F_;t.data[i+(r>>Y0)]|=1<=0?t&F_:Ks:t}(e);if("function"==typeof s){if(!D_(t,i,n))return n&Ft.Host?K0(r,0,n):Ud(t,e,n,r);try{const o=s(n);if(null!=o||n&Ft.Optional)return o;zf()}finally{z0()}}else if("number"==typeof s){let o=null,a=X0(i,t),l=ma,c=n&Ft.Host?t[nr][he]:null;for((-1===a||n&Ft.SkipSelf)&&(l=-1===a?rh(i,t):t[a+8],l!==ma&&B_(n,!1)?(o=t[ot],a=eh(l),t=th(l,t)):a=-1);-1!==a;){const d=t[ot];if(dp(s,a,d.data)){const h=wA(a,t,e,o,n,c);if(h!==ga)return h}l=t[a+8],l!==ma&&B_(n,t[ot].data[a+8]===c)&&dp(s,a,t)?(o=d,a=eh(l),t=th(l,t)):a=-1}}return r}function wA(i,t,e,n,r,s){const o=t[ot],a=o.data[i+8],d=ts(a,o,e,null==n?Ed(a)&&Bd:n!=o&&0!=(3&a.type),r&Ft.Host&&s===a);return null!==d?vc(t,o,d,a):ga}function ts(i,t,e,n,r){const s=i.providerIndexes,o=t.data,a=1048575&s,l=i.directiveStart,d=s>>20,p=r?a+d:i.directiveEnd;for(let m=n?a:a+d;m=l&&g.type===e)return m}if(r){const m=o[l];if(m&&vo(m)&&m.type===e)return l}return null}function vc(i,t,e,n){let r=i[e];const s=t.data;if(function _A(i){return i instanceof Nd}(r)){const o=r;o.resolving&&function w0(i,t){const e=t?`. Dependency path: ${t.join(" > ")} > ${i}`:"";throw new pe(-200,`Circular dependency in DI detected for ${i}${e}`)}(function Yn(i){return"function"==typeof i?i.name||i.toString():"object"==typeof i&&null!=i&&"function"==typeof i.type?i.type.name||i.type.toString():Jt(i)}(s[e]));const a=lp(o.canSeeViewProviders);o.resolving=!0;const l=o.injectImpl?js(o.injectImpl):null;D_(i,n,Ft.Default);try{r=i[e]=o.factory(void 0,s,i,n),t.firstCreatePass&&e>=n.directiveStart&&function es(i,t,e){const{ngOnChanges:n,ngOnInit:r,ngDoCheck:s}=t.type.prototype;if(n){const o=Td(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&&js(l),lp(a),o.resolving=!1,z0()}}return r}function dp(i,t,e){return!!(e[t+(i>>Y0)]&1<{const t=i.prototype.constructor,e=t[ua]||sh(t),n=Object.prototype;let r=Object.getPrototypeOf(i.prototype).constructor;for(;r&&r!==n;){const s=r[ua]||sh(r);if(s&&s!==e)return s;r=Object.getPrototypeOf(r)}return s=>new s})}function sh(i){return Vu(i)?()=>{const t=sh(Ot(i));return t&&t()}:Xa(i)}function oh(i){const t=i[ot],e=t.type;return 2===e?t.declTNode:1===e?i[he]:null}function _a(i){return function xA(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 va(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,d){const h=l.hasOwnProperty(bc)?l[bc]:Object.defineProperty(l,bc,{value:[]})[bc];for(;h.length<=d;)h.push(null);return(h[d]=h[d]||[]).push(o),l}}return e&&(r.prototype=Object.create(e.prototype)),r.prototype.ngMetadataName=i,r.annotationCls=r,r})}class me{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=Re({token:this,providedIn:e.providedIn||"root",factory:e.factory}))}get multi(){return this}toString(){return`InjectionToken ${this._desc}`}}function Pl(i,t){i.forEach(e=>Array.isArray(e)?Pl(e,t):t(e))}function V_(i,t,e){t>=i.length?i.push(e):i.splice(t,0,e)}function fp(i,t){return t>=i.length-1?i.pop():i.splice(t,1)[0]}function Hd(i,t){const e=[];for(let n=0;n=0?i[1|n]=e:(n=~n,function EA(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 $d(i,t){const e=wc(i,t);if(e>=0)return i[1|e]}function wc(i,t){return function mp(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),Ss=wd(Vd("Optional"),8),ya=wd(Vd("SkipSelf"),4);var Es=(()=>((Es=Es||{})[Es.Important=1]="Important",Es[Es.DashCase=2]="DashCase",Es))();const Mp=new Map;let px=0;const ev="__ngContext__";function Gr(i,t){bs(t)?(i[ev]=t[Al],function mx(i){Mp.set(i[Al],i)}(t)):i[ev]=t}let nv;function iv(i,t){return nv(i,t)}function fh(i){const t=i[Bi];return xs(t)?t[Bi]:t}function rv(i){return Cx(i[uc])}function sv(i){return Cx(i[ys])}function Cx(i){for(;null!==i&&!xs(i);)i=i[ys];return i}function Ir(i,t,e,n,r){if(null!=n){let s,o=!1;xs(n)?s=n:bs(n)&&(o=!0,n=n[Ya]);const a=I(n);0===i&&null!==e?null==r?Ix(t,e,a):Sc(t,e,a,r||null,!0):1===i&&null!==e?Sc(t,e,a,r||null,!0):2===i?function hv(i,t,e){const n=Ep(i,t);n&&function qA(i,t,e,n){i.removeChild(t,e,n)}(i,n,t,e)}(t,a,o):3===i&&t.destroyNode(a),null!=s&&function Nx(i,t,e,n,r){const s=e[Xf];s!==I(e)&&Ir(t,i,n,s,r);for(let a=Ui;a0&&(i[e-1][ys]=n[ys]);const s=fp(i,Ui+t);!function zA(i,t){mh(i,t,t[bt],2,null,null),t[Ya]=null,t[he]=null}(n[ot],n);const o=s[qs];null!==o&&o.detachView(s[ot]),n[Bi]=null,n[ys]=null,n[fn]&=-65}return n}function Ax(i,t){if(!(128&t[fn])){const e=t[bt];e.destroyNode&&mh(i,t,e,3,null,null),function $A(i){let t=i[uc];if(!t)return cv(i[ot],i);for(;t;){let e=null;if(bs(t))e=t[uc];else{const n=t[Ui];n&&(e=n)}if(!e){for(;t&&!t[ys]&&t!==i;)bs(t)&&cv(t[ot],t),t=t[Bi];null===t&&(t=i),bs(t)&&cv(t[ot],t),e=t&&t[ys]}t=e}}(t)}}function cv(i,t){if(!(128&t[fn])){t[fn]&=-65,t[fn]|=128,function YA(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===Ys.None||s===Ys.Emulated)return null}return Ai(n,e)}}(i,t.parent,e)}function Sc(i,t,e,n,r){i.insertBefore(t,e,n,r)}function Ix(i,t,e){i.appendChild(t,e)}function Rx(i,t,e,n,r){null!==n?Sc(i,t,e,n,r):Ix(i,t,e)}function Ep(i,t){return i.parentNode(t)}function kx(i,t,e){return Ox(i,t,e)}let dv,Ip,mv,Ox=function Px(i,t,e){return 40&i.type?Ai(i,e):null};function ph(i,t,e,n){const r=Dx(i,n,t),s=t[bt],a=kx(n.parent||t[he],n,t);if(null!=r)if(Array.isArray(e))for(let l=0;li,createScript:i=>i,createScriptURL:i=>i})}catch{}return Ip}()?.createHTML(i)||i}class Ol{constructor(t){this.changingThisBreaksApplicationSecurity=t}toString(){return`SafeValue must use [property]=binding: ${this.changingThisBreaksApplicationSecurity} (see ${Gu})`}}class n1 extends Ol{getTypeName(){return"HTML"}}class r1 extends Ol{getTypeName(){return"Style"}}class s1 extends Ol{getTypeName(){return"Script"}}class o1 extends Ol{getTypeName(){return"URL"}}class kp extends Ol{getTypeName(){return"ResourceURL"}}function Qs(i){return i instanceof Ol?i.changingThisBreaksApplicationSecurity:i}function xa(i,t){const e=function a1(i){return i instanceof Ol&&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 ${Gu})`)}return e===t}class f1{constructor(t){this.inertDocumentHelper=t}getInertBodyElement(t){t=""+t;try{const e=(new window.DOMParser).parseFromString(Wd(t),"text/html").body;return null===e?this.inertDocumentHelper.getInertBodyElement(t):(e.removeChild(e.firstChild),e)}catch{return null}}}class p1{constructor(t){this.defaultDoc=t,this.inertDocument=this.defaultDoc.implementation.createHTMLDocument("sanitization-inert")}getInertBodyElement(t){const e=this.inertDocument.createElement("template");return e.innerHTML=Wd(t),e}}const m1=/^(?!javascript:)(?:[a-z0-9+.-]+:|[^&:\/?#]*(?:[\/?#]|$))/i;function gh(i){return(i=String(i)).match(m1)?i:"unsafe:"+i}function wa(i){const t={};for(const e of i.split(","))t[e]=!0;return t}function Ec(...i){const t={};for(const e of i)for(const n in e)e.hasOwnProperty(n)&&(t[n]=!0);return t}const vv=wa("area,br,col,hr,img,wbr"),yv=wa("colgroup,dd,dt,li,p,tbody,td,tfoot,th,thead,tr"),bv=wa("rp,rt"),xv=Ec(vv,Ec(yv,wa("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")),Ec(bv,wa("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")),Ec(bv,yv)),jd=wa("background,cite,href,itemtype,longdesc,poster,src,xlink:href"),$x=Ec(jd,wa("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"),wa("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")),Mv=wa("script,style,template");class Wx{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(!xv.hasOwnProperty(e))return this.sanitizedSomething=!0,!Mv.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();xv.hasOwnProperty(e)&&!vv.hasOwnProperty(e)&&(this.buf.push(""))}chars(t){this.buf.push(jx(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 _1=/[\uD800-\uDBFF][\uDC00-\uDFFF]/g,v1=/([^\#-~ |!])/g;function jx(i){return i.replace(/&/g,"&").replace(_1,function(t){return"&#"+(1024*(t.charCodeAt(0)-55296)+(t.charCodeAt(1)-56320)+65536)+";"}).replace(v1,function(t){return"&#"+t.charCodeAt(0)+";"}).replace(//g,">")}let Op;function Yx(i,t){let e=null;try{Op=Op||function Gx(i){const t=new p1(i);return function Pp(){try{return!!(new window.DOMParser).parseFromString(Wd(""),"text/html")}catch{return!1}}()?new f1(t):t}(i);let n=t?String(t):"";e=Op.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=Op.getInertBodyElement(n)}while(n!==s);return Wd((new Wx).sanitizeChildren(Cv(e)||e))}finally{if(e){const n=Cv(e)||e;for(;n.firstChild;)n.removeChild(n.firstChild)}}}function Cv(i){return"content"in i&&function y1(i){return i.nodeType===Node.ELEMENT_NODE&&"TEMPLATE"===i.nodeName}(i)?i.content:null}var Xn=(()=>((Xn=Xn||{})[Xn.NONE=0]="NONE",Xn[Xn.HTML=1]="HTML",Xn[Xn.STYLE=2]="STYLE",Xn[Xn.SCRIPT=3]="SCRIPT",Xn[Xn.URL=4]="URL",Xn[Xn.RESOURCE_URL=5]="RESOURCE_URL",Xn))();function Fp(i){const t=function wi(){const i=Se();return i&&i[ai]}();return t?t.sanitize(Xn.URL,i)||"":xa(i,"URL")?Qs(i):gh(Jt(i))}const Lp=new me("ENVIRONMENT_INITIALIZER"),tl=new me("INJECTOR",-1),Xx=new me("INJECTOR_DEF_TYPES");class Kx{get(t,e=Sl){if(e===Sl){const n=new Error(`NullInjectorError: No provider for ${mi(t)}!`);throw n.name="NullInjectorError",n}return e}}function C1(...i){return{\u0275providers:Zx(0,i),\u0275fromNgModule:!0}}function Zx(i,...t){const e=[],n=new Set;let r;return Pl(t,s=>{const o=s;Sv(o,e,[],n)&&(r||(r=[]),r.push(o))}),void 0!==r&&Np(r,e),e}function Np(i,t){for(let e=0;e{t.push(s)})}}function Sv(i,t,e,n){if(!(i=Ot(i)))return!1;let r=null,s=u_(i);const o=!s&&Hn(i);if(s||o){if(o&&!o.standalone)return!1;r=i}else{const l=i.ngModule;if(s=u_(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)Sv(c,t,e,n)}}else{if(!s)return!1;{if(null!=s.imports&&!a){let c;n.add(r);try{Pl(s.imports,d=>{Sv(d,t,e,n)&&(c||(c=[]),c.push(d))})}finally{}void 0!==c&&Np(c,t)}if(!a){const c=Xa(r)||(()=>new r);t.push({provide:r,useFactory:c,deps:$n},{provide:Xx,useValue:r,multi:!0},{provide:Lp,useValue:()=>ee(r),multi:!0})}const l=s.providers;null==l||a||Bp(l,d=>{t.push(d)})}}return r!==i&&void 0!==i.providers}function Bp(i,t){for(let e of i)zu(e)&&(e=e.\u0275providers),Array.isArray(e)?Bp(e,t):t(e)}const Up=ci({provide:String,useValue:ci});function Mi(i){return null!==i&&"object"==typeof i&&Up in i}function Dc(i){return"function"==typeof i}const Av=new me("Set Injector scope."),Vp={},E1={};let Dv;function _h(){return void 0===Dv&&(Dv=new Kx),Dv}class eo{}class zp extends eo{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,Iv(t,o=>this.processProvider(o)),this.records.set(tl,Ho(void 0,this)),r.has("environment")&&this.records.set(eo,Ho(void 0,this));const s=this.records.get(Av);null!=s&&"string"==typeof s.value&&this.scopes.add(s.value),this.injectorDefTypes=new Set(this.get(Xx.multi,$n,Ft.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=xd(this),n=js(void 0);try{return t()}finally{xd(e),js(n)}}get(t,e=Sl,n=Ft.Default){this.assertNotDestroyed(),n=Wf(n);const r=xd(this),s=js(void 0);try{if(!(n&Ft.SkipSelf)){let a=this.records.get(t);if(void 0===a){const l=function T1(i){return"function"==typeof i||"object"==typeof i&&i instanceof me}(t)&&Hf(t);a=l&&this.injectableDefInScope(l)?Ho(Tv(t),Vp):null,this.records.set(t,a)}if(null!=a)return this.hydrate(t,a)}return(n&Ft.Self?_h():this.parent).get(t,e=n&Ft.Optional&&e===Sl?null:e)}catch(o){if("NullInjectorError"===o.name){if((o[gi]=o[gi]||[]).unshift(mi(t)),r)throw o;return function m_(i,t,e,n){const r=i[gi];throw t[$f]&&r.unshift(t[$f]),i.message=function E0(i,t,e,n=null){i=i&&"\n"===i.charAt(0)&&i.charAt(1)==KE?i.slice(2):i;let r=mi(t);if(Array.isArray(t))r=t.map(mi).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):mi(a)))}r=`{${s.join(", ")}}`}return`${e}${n?"("+n+")":""}[${r}]: ${i.replace(f_,"\n ")}`}("\n"+i.message,r,e,n),i[El]=r,i[gi]=null,i}(o,t,"R3InjectorError",this.source)}throw o}finally{js(s),xd(r)}}resolveInjectorInitializers(){const t=xd(this),e=js(void 0);try{const n=this.get(Lp.multi,$n,Ft.Self);for(const r of n)r()}finally{xd(t),js(e)}}toString(){const t=[],e=this.records;for(const n of e.keys())t.push(mi(n));return`R3Injector[${t.join(", ")}]`}assertNotDestroyed(){if(this._destroyed)throw new pe(205,!1)}processProvider(t){let e=Dc(t=Ot(t))?t:Ot(t&&t.provide);const n=function Hp(i){return Mi(i)?Ho(void 0,i.useValue):Ho(As(i),Vp)}(t);if(Dc(t)||!0!==t.multi)this.records.get(e);else{let r=this.records.get(e);r||(r=Ho(void 0,Vp,!0),r.factory=()=>jf(r.multi),this.records.set(e,r)),e=t,r.multi.push(t)}this.records.set(e,n)}hydrate(t,e){return e.value===Vp&&(e.value=E1,e.value=e.factory()),"object"==typeof e.value&&e.value&&function D1(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=Ot(t.providedIn);return"string"==typeof e?"any"===e||this.scopes.has(e):this.injectorDefTypes.has(e)}}function Tv(i){const t=Hf(i),e=null!==t?t.factory:Xa(i);if(null!==e)return e;if(i instanceof me)throw new pe(204,!1);if(i instanceof Function)return function Qx(i){const t=i.length;if(t>0)throw Hd(t,"?"),new pe(204,!1);const e=function $u(i){return i&&(i[bd]||i[h_])||null}(i);return null!==e?()=>e.factory(i):()=>new i}(i);throw new pe(204,!1)}function As(i,t,e){let n;if(Dc(i)){const r=Ot(i);return Xa(r)||Tv(r)}if(Mi(i))n=()=>Ot(i.useValue);else if(function Ev(i){return!(!i||!i.useFactory)}(i))n=()=>i.useFactory(...jf(i.deps||[]));else if(function Pi(i){return!(!i||!i.useExisting)}(i))n=()=>ee(Ot(i.useExisting));else{const r=Ot(i&&(i.useClass||i.provide));if(!function A1(i){return!!i.deps}(i))return Xa(r)||Tv(r);n=()=>new r(...jf(i.deps))}return n}function Ho(i,t,e=!1){return{factory:i,value:t,multi:e?[]:void 0}}function Iv(i,t){for(const e of i)Array.isArray(e)?Iv(e,t):e&&zu(e)?Iv(e.\u0275providers,t):t(e)}class I1{}class Rv{}class xo{resolveComponentFactory(t){throw function nl(i){const t=Error(`No component factory found for ${mi(i)}. Did you add it to @NgModule.entryComponents?`);return t.ngComponent=i,t}(t)}}let Ll=(()=>{class i{}return i.NULL=new xo,i})();function k1(){return On(Ar(),Se())}function On(i,t){return new mt(Ai(i,t))}let mt=(()=>{class i{constructor(e){this.nativeElement=e}}return i.__NG_ELEMENT_ID__=k1,i})();function Jx(i){return i instanceof mt?i.nativeElement:i}class Nl{}let il=(()=>{class i{}return i.__NG_ELEMENT_ID__=()=>function P1(){const i=Se(),e=ws(Ar().index,i);return(bs(e)?e:i)[bt]}(),i})(),O1=(()=>{class i{}return i.\u0275prov=Re({token:i,providedIn:"root",factory:()=>null}),i})();class Tc{constructor(t){this.full=t,this.major=t.split(".")[0],this.minor=t.split(".")[1],this.patch=t.split(".").slice(2).join(".")}}const F1=new Tc("15.2.10"),kv={},Pv="ngOriginalError";function Ov(i){return i[Pv]}class rl{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&&Ov(t);for(;e&&Ov(e);)e=Ov(e);return e||null}}function sl(i){return i instanceof Function?i():i}function tw(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 nw="ng-template";function G1(i,t,e){let n=0,r=!0;for(;ns?"":r[h+1].toLowerCase();const m=8&n?p:null;if(m&&-1!==tw(m,c,0)||2&n&&c!==p){if(Go(n))return!1;o=!0}}}}else{if(!o&&!Go(n)&&!Go(l))return!1;if(o&&Go(l))continue;o=!1,n=l|1&n}}return Go(n)||o}function Go(i){return 0==(1&i)}function iw(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&&!Go(o)&&(t+=Ic(s,r),r=""),n=o,s=s||!Go(n);e++}return""!==r&&(t+=Ic(s,r)),t}const on={};function V(i){Uv(zn(),Se(),qn()+i,!1)}function Uv(i,t,e,n){if(!n)if(3==(3&t[fn])){const s=i.preOrderCheckHooks;null!==s&&rp(t,s,e)}else{const s=i.preOrderHooks;null!==s&&sp(t,s,0,e)}Qa(e)}function ow(i,t=null,e=null,n){const r=aw(i,t,e,n);return r.resolveInjectorInitializers(),r}function aw(i,t=null,e=null,n,r=new Set){const s=[e||$n,C1(i)];return n=n||("object"==typeof i?void 0:mi(i)),new zp(s,t||_h(),n||null,r)}let $i=(()=>{class i{static create(e,n){if(Array.isArray(e))return ow({name:""},n,e,"");{const r=e.name??"";return ow({name:r},e.parent,e.providers,r)}}}return i.THROW_IF_NOT_FOUND=Sl,i.NULL=new Kx,i.\u0275prov=Re({token:i,providedIn:"any",factory:()=>ee(tl)}),i.__NG_ELEMENT_ID__=-1,i})();function E(i,t=Ft.Default){const e=Se();return null===e?ee(i,t):N_(Ar(),e,Ot(i),t)}function wo(){throw new Error("invalid")}function fw(i,t){const e=i.contentQueries;if(null!==e)for(let n=0;nbi&&Uv(i,t,bi,!1),Qr(o?2:0,r),e(n,r)}finally{Qa(s),Qr(o?3:1,r)}}function qv(i,t,e){if(Zf(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,on),r)}function be(i,t,e,n,r,s){const o=Ai(i,t);!function Xe(i,t,e,n,r,s,o){if(null==s)i.removeAttribute(t,r,e);else{const a=null==o?Jt(s):o(s,n||"",r);i.setAttribute(t,r,a,e)}}(t[bt],o,s,i.value,e,n,r)}function vt(i,t,e,n,r,s){const o=s[t];if(null!==o){const a=n.setInput;for(let l=0;l0&&rs(e)}}function rs(i){for(let n=rv(i);null!==n;n=sv(n))for(let r=Ui;r0&&rs(s)}const e=i[ot].components;if(null!==e)for(let n=0;n0&&rs(r)}}function ss(i,t){const e=ws(t,i),n=e[ot];(function no(i,t){for(let e=t.length;e-1&&(lv(t,n),fp(e,n))}this._attachedToViewContainer=!1}Ax(this._lView[ot],this._lView)}onDestroy(t){gw(this._lView[ot],this._lView,null,t)}markForCheck(){Ts(this._cdRefInjectingView||this._lView)}detach(){this._lView[fn]&=-65}reattach(){this._lView[fn]|=64}detectChanges(){Mo(this._lView[ot],this._lView,this.context)}checkNoChanges(){}attachToViewContainerRef(){if(this._appRef)throw new pe(902,!1);this._attachedToViewContainer=!0}detachFromAppRef(){this._appRef=null,function GA(i,t){mh(i,t,t[bt],2,null,null)}(this._lView[ot],this._lView)}attachToAppRef(t){if(this._attachedToViewContainer)throw new pe(902,!1);this._appRef=t}}class m8 extends Jv{constructor(t){super(t),this._view=t}detectChanges(){const t=this._view;Mo(t[ot],t,t[Ue],!1)}checkNoChanges(){}get context(){return null}}class YF extends Ll{constructor(t){super(),this.ngModule=t}resolveComponentFactory(t){const e=Hn(t);return new ey(e,this.ngModule)}}function qF(i){const t=[];for(let e in i)i.hasOwnProperty(e)&&t.push({propName:i[e],templateName:e});return t}class _8{constructor(t,e){this.injector=t,this.parentInjector=e}get(t,e,n){n=Wf(n);const r=this.injector.get(t,kv,n);return r!==kv||e===kv?r:this.parentInjector.get(t,e,n)}}class ey extends Rv{get inputs(){return qF(this.componentDef.inputs)}get outputs(){return qF(this.componentDef.outputs)}constructor(t,e){super(),this.componentDef=t,this.ngModule=e,this.componentType=t.type,this.selector=function Z1(i){return i.map(K1).join(",")}(t.selectors),this.ngContentSelectors=t.ngContentSelectors?t.ngContentSelectors:[],this.isBoundToModule=!!e}create(t,e,n,r){let s=(r=r||this.ngModule)instanceof eo?r:r?.injector;s&&null!==this.componentDef.getStandaloneInjector&&(s=this.componentDef.getStandaloneInjector(s)||s);const o=s?new _8(t,s):t,a=o.get(Nl,null);if(null===a)throw new pe(407,!1);const l=o.get(O1,null),c=a.createRenderer(null,this.componentDef),d=this.componentDef.selectors[0][0]||"div",h=n?function yD(i,t,e){return i.selectRootElement(t,e===Ys.ShadowDom)}(c,n,this.componentDef.encapsulation):Sp(c,d,function g8(i){const t=i.toLowerCase();return"svg"===t?Rd:"math"===t?"math":null}(d)),p=this.componentDef.onPush?288:272,m=Zv(0,null,null,1,0,null,null,null,null,null),g=vh(null,m,null,p,null,null,a,c,l,o,null);let b,v;ip(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 y8(i,t){const e=i[ot],n=bi;return i[n]=t,Kd(e,n,2,"#host",null)}(g,h),F=function b8(i,t,e,n,r,s,o,a){const l=r[ot];!function x8(i,t,e,n){for(const r of i)t.mergedAttrs=_c(t.mergedAttrs,r.hostAttrs);null!==t.mergedAttrs&&(bw(t,t.mergedAttrs,!0),null!==e&&Ux(n,e,t))}(n,i,t,o);const c=s.createRenderer(t,e),d=vh(r,mw(e),null,e.onPush?32:16,r[i.index],i,s,c,a||null,null,null);return l.firstCreatePass&&P(l,i,n.length-1),Ti(r,d),r[i.index]=d}(C,h,y,M,g,a,c);v=O0(m,bi),h&&function M8(i,t,e,n){if(n)P_(i,e,["ng-version",F1.full]);else{const{attrs:r,classes:s}=function Q1(i){const t=[],e=[];let n=1,r=2;for(;n0&&Bx(i,e,s.join(" "))}}(c,y,h,n),void 0!==e&&function C8(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=_c(r.hostAttrs,e=_c(e,r.hostAttrs))}}(n)}function TD(i){return i===ja?{}:i===$n?[]:i}function A8(i,t){const e=i.viewQuery;i.viewQuery=e?(n,r)=>{t(n,r),e(n,r)}:t}function D8(i,t){const e=i.contentQueries;i.contentQueries=e?(n,r,s)=>{t(n,r,s),e(n,r,s)}:t}function T8(i,t){const e=i.hostBindings;i.hostBindings=e?(n,r)=>{t(n,r),e(n,r)}:t}function ww(i){return!!ID(i)&&(Array.isArray(i)||!(i instanceof Map)&&Symbol.iterator in i)}function ID(i){return null!==i&&("function"==typeof i||"object"==typeof i)}function Bl(i,t,e){return i[t]=e}function Is(i,t,e){return!Object.is(i[t],e)&&(i[t]=e,!0)}function xh(i,t,e,n){const r=Is(i,t,e);return Is(i,t+1,n)||r}function Dt(i,t,e,n){const r=Se();return Is(r,Tl(),t)&&(zn(),be(Di(),r,i,t,e,n)),Dt}function Wp(i,t,e,n){return Is(i,Tl(),e)?t+Jt(e)+n:on}function jp(i,t,e,n,r,s){const a=xh(i,function Ka(){return Pt.lFrame.bindingIndex}(),e,r);return Xs(2),a?t+Jt(e)+n+Jt(r)+s:on}function fe(i,t,e,n,r,s,o,a){const l=Se(),c=zn(),d=i+bi,h=c.firstCreatePass?function U8(i,t,e,n,r,s,o,a,l){const c=t.consts,d=Kd(t,i,4,o||null,Dl(c,a));Qv(t,e,d,Dl(c,l)),Ld(t,d);const h=d.tView=Zv(2,d,n,r,s,t.directiveRegistry,t.pipeRegistry,null,t.schemas,c);return null!==t.queries&&(t.queries.template(t,d),h.queries=t.queries.embeddedTView(d)),d}(d,c,l,t,e,n,r,s,o):c.data[d];fa(h,!1);const p=l[bt].createComment("");ph(c,l,p,h),Gr(p,l),Ti(l,l[d]=mn(p,l,p,h)),hc(h)&&Xv(c,l,h),null!=o&&Kv(l,h,a)}function ir(i){return Pd(function hA(){return Pt.lFrame.contextLView}(),bi+i)}function U(i,t,e){const n=Se();return Is(n,Tl(),t)&&to(zn(),Di(),n,i,t,n[bt],e,!1),U}function RD(i,t,e,n,r){const o=r?"class":"style";DD(i,e,t.inputs[o],o,n)}function $(i,t,e,n){const r=Se(),s=zn(),o=bi+i,a=r[bt],l=s.firstCreatePass?function z8(i,t,e,n,r,s){const o=t.consts,l=Kd(t,i,2,n,Dl(o,r));return Qv(t,e,l,Dl(o,s)),null!==l.attrs&&bw(l,l.attrs,!1),null!==l.mergedAttrs&&bw(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]=Sp(a,t,function G0(){return Pt.lFrame.currentNamespace}()),d=hc(l);return fa(l,!0),Ux(a,c,l),32!=(32&l.flags)&&ph(s,r,c,l),0===function aA(){return Pt.lFrame.elementDepthCount}()&&Gr(c,r),function lA(){Pt.lFrame.elementDepthCount++}(),d&&(Xv(s,r,l),qv(s,l,r)),null!==n&&Kv(r,l),$}function j(){let i=Ar();S_()?E_():(i=i.parent,fa(i,!1));const t=i;!function cA(){Pt.lFrame.elementDepthCount--}();const e=zn();return e.firstCreatePass&&(Ld(e,i),Zf(i)&&e.queries.elementEnd(i)),null!=t.classesWithoutHost&&function vA(i){return 0!=(8&i.flags)}(t)&&RD(e,t,Se(),t.classesWithoutHost,!0),null!=t.stylesWithoutHost&&function k_(i){return 0!=(16&i.flags)}(t)&&RD(e,t,Se(),t.stylesWithoutHost,!1),j}function Oe(i,t,e,n){return $(i,t,e,n),j(),Oe}function $r(i,t,e){const n=Se(),r=zn(),s=i+bi,o=r.firstCreatePass?function H8(i,t,e,n,r){const s=t.consts,o=Dl(s,n),a=Kd(t,i,8,"ng-container",o);return null!==o&&bw(a,o,!0),Qv(t,e,a,Dl(s,r)),null!==t.queries&&t.queries.elementStart(t,a),a}(s,r,n,t,e):r.data[s];fa(o,!0);const a=n[s]=n[bt].createComment("");return ph(r,n,a,o),Gr(a,n),hc(o)&&(Xv(r,n,o),qv(r,o,n)),null!=e&&Kv(n,o),$r}function Wr(){let i=Ar();const t=zn();return S_()?E_():(i=i.parent,fa(i,!1)),t.firstCreatePass&&(Ld(t,i),Zf(i)&&t.queries.elementEnd(i)),Wr}function ny(i,t,e){return $r(i,t,e),Wr(),ny}function Kn(){return Se()}function iy(i){return!!i&&"function"==typeof i.then}function lL(i){return!!i&&"function"==typeof i.subscribe}const kD=lL;function ke(i,t,e,n){const r=Se(),s=zn(),o=Ar();return cL(s,r,r[bt],o,i,t,n),ke}function PD(i,t){const e=Ar(),n=Se(),r=zn();return cL(r,n,WF(Ju(r.data),e,n),e,i,t),PD}function cL(i,t,e,n,r,s,o){const a=hc(n),c=i.firstCreatePass&&$F(i),d=t[Ue],h=GF(t);let p=!0;if(3&n.type||o){const b=Ai(n,t),v=o?o(b):b,y=h.length,M=o?C=>o(I(C[n.index])):n.index;let x=null;if(!o&&a&&(x=function G8(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=uL(n,t,d,s,!1);const C=e.listen(v,r,s);h.push(s,C),c&&c.push(r,M,y,y+1)}}else s=uL(n,t,d,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?ws(i.index,t):t);let l=dL(t,e,n,o),c=s.__ngNextListenerFn__;for(;c;)l=dL(t,e,c,o)&&l,c=c.__ngNextListenerFn__;return r&&!1===l&&(o.preventDefault(),o.returnValue=!1),l}}function re(i=1){return function mA(i){return(Pt.lFrame.contextLView=function H0(i,t){for(;i>0;)t=t[Er],i--;return t}(i,Pt.lFrame.contextLView))[Ue]}(i)}function $8(i,t){let e=null;const n=function j1(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 LD(i){return 2|i}function wh(i){return(131068&i)>>2}function ND(i,t){return-131069&i|t<<2}function BD(i){return 1|i}function bL(i,t,e,n,r){const s=i[e+1],o=null===t;let a=n?Qd(s):wh(s),l=!1;for(;0!==a&&(!1===l||o);){const d=i[a+1];K8(i[a],t)&&(l=!0,i[a+1]=n?BD(d):LD(d)),a=n?Qd(d):wh(d)}l&&(i[e+1]=n?LD(s):BD(s))}function K8(i,t){return null===i||null==t||(Array.isArray(i)?i[1]:i)===t||!(!Array.isArray(i)||"string"!=typeof t)&&wc(i,t)>=0}const Rr={textEnd:0,key:0,keyEnd:0,value:0,valueEnd:0};function xL(i){return i.substring(Rr.key,Rr.keyEnd)}function wL(i,t){const e=Rr.textEnd;return e===t?-1:(t=Rr.keyEnd=function eW(i,t,e){for(;t32;)t++;return t}(i,Rr.key=t,e),Jp(i,t,e))}function Jp(i,t,e){for(;t=0;e=wL(t,e))Cs(i,xL(t),!0)}function ol(i,t,e,n){const r=Se(),s=zn(),o=Xs(2);s.firstUpdatePass&&DL(s,i,o,n),t!==on&&Is(r,o,t)&&IL(s,s.data[qn()],r,r[bt],i,r[o+1]=function hW(i,t){return null==i||""===i||("string"==typeof t?i+=t:"object"==typeof i&&(i=mi(Qs(i)))),i}(t,e),n,o)}function AL(i,t){return t>=i.expandoStartIndex}function DL(i,t,e,n){const r=i.data;if(null===r[e+1]){const s=r[qn()],o=AL(i,e);kL(s,n)&&null===t&&!o&&(t=!1),t=function sW(i,t,e,n){const r=Ju(i);let s=n?t.residualClasses:t.residualStyles;if(null===r)0===(n?t.classBindings:t.styleBindings)&&(e=ry(e=UD(null,i,t,e,n),t.attrs,n),s=null);else{const o=t.directiveStylingLast;if(-1===o||i[o]!==r)if(e=UD(r,i,t,e,n),null===s){let l=function oW(i,t,e){const n=e?t.classBindings:t.styleBindings;if(0!==wh(n))return i[Qd(n)]}(i,t,n);void 0!==l&&Array.isArray(l)&&(l=UD(null,i,t,l[1],n),l=ry(l,t.attrs,n),function aW(i,t,e,n){i[Qd(e?t.classBindings:t.styleBindings)]=n}(i,t,n,l))}else s=function lW(i,t,e){let n;const r=t.directiveEnd;for(let s=1+t.directiveStylingLast;s0)&&(c=!0)):d=e,r)if(0!==l){const p=Qd(i[a+1]);i[n+1]=Cw(p,a),0!==p&&(i[p+1]=ND(i[p+1],n)),i[a+1]=function j8(i,t){return 131071&i|t<<17}(i[a+1],n)}else i[n+1]=Cw(a,0),0!==a&&(i[a+1]=ND(i[a+1],n)),a=n;else i[n+1]=Cw(l,0),0===a?a=n:i[l+1]=ND(i[l+1],n),l=n;c&&(i[n+1]=LD(i[n+1])),bL(i,d,n,!0),bL(i,d,n,!1),function X8(i,t,e,n,r){const s=r?i.residualClasses:i.residualStyles;null!=s&&"string"==typeof t&&wc(s,t)>=0&&(e[n+1]=BD(e[n+1]))}(t,d,i,n,s),o=Cw(a,l),s?t.classBindings=o:t.styleBindings=o}(r,s,t,e,o,n)}}function UD(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),d=c?l[1]:l,h=null===d;let p=e[r+1];p===on&&(p=h?$n:void 0);let m=h?$d(p,n):d===n?p:void 0;if(c&&!Sw(m)&&(m=$d(l,n)),Sw(m)&&(a=m,o))return a;const g=i[r+1];r=o?Qd(g):wh(g)}if(null!==t){let l=s?t.residualClasses:t.residualStyles;null!=l&&(a=$d(l,n))}return a}function Sw(i){return void 0!==i}function kL(i,t){return 0!=(i.flags&(t?8:16))}function Ve(i,t=""){const e=Se(),n=zn(),r=i+bi,s=n.firstCreatePass?Kd(n,r,1,t,null):n.data[r],o=e[r]=function ov(i,t){return i.createText(t)}(e[bt],t);ph(n,e,o,s),fa(s,!1)}function ui(i){return Xi("",i,""),ui}function Xi(i,t,e){const n=Se(),r=Wp(n,i,t,e);return r!==on&&Rc(n,qn(),r),Xi}function Mh(i,t,e,n,r){const s=Se(),o=jp(s,i,t,e,n,r);return o!==on&&Rc(s,qn(),o),Mh}function VL(i,t,e){!function al(i,t,e,n){const r=zn(),s=Xs(2);r.firstUpdatePass&&DL(r,null,s,n);const o=Se();if(e!==on&&Is(o,s,e)){const a=r.data[qn()];if(kL(a,n)&&!AL(r,s)){let l=n?a.classesWithoutHost:a.stylesWithoutHost;null!==l&&(e=Uf(l,e||"")),RD(r,a,o,e,n)}else!function uW(i,t,e,n,r,s,o,a){r===on&&(r=$n);let l=0,c=0,d=0((it=it||{})[it.LocaleId=0]="LocaleId",it[it.DayPeriodsFormat=1]="DayPeriodsFormat",it[it.DayPeriodsStandalone=2]="DayPeriodsStandalone",it[it.DaysFormat=3]="DaysFormat",it[it.DaysStandalone=4]="DaysStandalone",it[it.MonthsFormat=5]="MonthsFormat",it[it.MonthsStandalone=6]="MonthsStandalone",it[it.Eras=7]="Eras",it[it.FirstDayOfWeek=8]="FirstDayOfWeek",it[it.WeekendRange=9]="WeekendRange",it[it.DateFormat=10]="DateFormat",it[it.TimeFormat=11]="TimeFormat",it[it.DateTimeFormat=12]="DateTimeFormat",it[it.NumberSymbols=13]="NumberSymbols",it[it.NumberFormats=14]="NumberFormats",it[it.CurrencyCode=15]="CurrencyCode",it[it.CurrencySymbol=16]="CurrencySymbol",it[it.CurrencyName=17]="CurrencyName",it[it.Currencies=18]="Currencies",it[it.Directionality=19]="Directionality",it[it.PluralCase=20]="PluralCase",it[it.ExtraData=21]="ExtraData",it))();const tm="en-US";let QL=tm;function HD(i,t,e,n,r){if(i=Ot(i),Array.isArray(i))for(let s=0;s>20;if(Dc(i)||!i.multi){const m=new Nd(l,r,E),g=$D(a,t,r?d:d+p,h);-1===g?(pn(nh(c,o),s,a),GD(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=$D(a,t,d+p,h),g=$D(a,t,d,d+p),v=g>=0&&e[g];if(r&&!v||!r&&!(m>=0&&e[m])){pn(nh(c,o),s,a);const y=function Tj(i,t,e,n,r){const s=new Nd(i,e,E);return s.multi=[],s.index=t,s.componentProviders=0,C2(s,r,n&&!e),s}(r?Dj:Aj,e.length,r,n,l);!r&&v&&(e[g].providerFactory=y),GD(s,i,t.length,0),t.push(a),c.directiveStart++,c.directiveEnd++,r&&(c.providerIndexes+=1048576),e.push(y),o.push(y)}else GD(s,i,m>-1?m:g,C2(e[r?g:m],l,!r&&n));!r&&n&&v&&e[g].componentProviders++}}}function GD(i,t,e,n){const r=Dc(t),s=function S1(i){return!!i.useClass}(t);if(r||s){const l=(s?Ot(t.useClass):t).prototype.ngOnDestroy;if(l){const c=i.destroyHooks||(i.destroyHooks=[]);if(!r&&t.multi){const d=c.indexOf(e);-1===d?c.push(e,[n,l]):c[d+1].push(n,l)}else c.push(e,l)}}}function C2(i,t,e){return e&&i.componentProviders++,i.multi.push(t)-1}function $D(i,t,e,n){for(let r=e;r{e.providersResolver=(n,r)=>function Ej(i,t,e){const n=zn();if(n.firstCreatePass){const r=vo(i);HD(e,n.data,n.blueprint,r,!0),HD(t,n.data,n.blueprint,r,!1)}}(n,r?r(i):i,t)}}class nm{}class S2{}class E2 extends nm{constructor(t,e){super(),this._parent=e,this._bootstrapComponents=[],this.destroyCbs=[],this.componentFactoryResolver=new YF(this);const n=dr(t);this._bootstrapComponents=sl(n.bootstrap),this._r3Injector=aw(t,e,[{provide:nm,useValue:this},{provide:Ll,useValue:this.componentFactoryResolver}],mi(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 jD extends S2{constructor(t){super(),this.moduleType=t}create(t){return new E2(this.moduleType,t)}}class Rj extends nm{constructor(t,e,n){super(),this.componentFactoryResolver=new YF(this),this.instance=null;const r=new zp([...t,{provide:nm,useValue:this},{provide:Ll,useValue:this.componentFactoryResolver}],e||_h(),n,new Set(["environment"]));this.injector=r,r.resolveInjectorInitializers()}destroy(){this.injector.destroy()}onDestroy(t){this.injector.onDestroy(t)}}function Rw(i,t,e=null){return new Rj(i,t,e).injector}let kj=(()=>{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=Zx(0,e.type),r=n.length>0?Rw([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=Re({token:i,providedIn:"environment",factory:()=>new i(ee(eo))}),i})();function YD(i){i.getStandaloneInjector=t=>t.get(kj).getOrCreateStandaloneInjector(i)}function ro(i,t,e){const n=zr()+i,r=Se();return r[n]===on?Bl(r,n,e?t.call(e):t()):function ty(i,t){return i[t]}(r,n)}function im(i,t,e,n){return O2(Se(),zr(),i,t,e,n)}function P2(i,t,e,n,r,s,o){return function N2(i,t,e,n,r,s,o,a,l){const c=t+e;return function Ma(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)?Bl(i,c+4,l?n.call(l,r,s,o,a):n(r,s,o,a)):dy(i,c+4)}(Se(),zr(),i,t,e,n,r,s,o)}function dy(i,t){const e=i[t];return e===on?void 0:e}function O2(i,t,e,n,r,s){const o=t+e;return Is(i,o,r)?Bl(i,o+1,s?n.call(s,r):n(r)):dy(i,o+1)}function gt(i,t){const e=zn();let n;const r=i+bi;e.firstCreatePass?(n=function qj(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=Xa(n.type)),o=js(E);try{const a=lp(!1),l=s();return lp(a),function V8(i,t,e,n){e>=i.data.length&&(i.data[e]=null,i.blueprint[e]=null),t[e]=n}(e,Se(),r,l),l}finally{js(o)}}function yt(i,t,e){const n=i+bi,r=Se(),s=Pd(r,n);return uy(r,n)?O2(r,zr(),t,s.transform,e,s):s.transform(e)}function XD(i,t,e,n){const r=i+bi,s=Se(),o=Pd(s,r);return uy(s,r)?function F2(i,t,e,n,r,s,o){const a=t+e;return xh(i,a,r,s)?Bl(i,a+2,o?n.call(o,r,s):n(r,s)):dy(i,a+2)}(s,zr(),t,o.transform,e,n,o):o.transform(e,n)}function uy(i,t){return i[ot].data[t].pure}function KD(i){return t=>{setTimeout(i,void 0,t)}}const $e=class Qj extends Ie{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=KD(s),r&&(r=KD(r)),o&&(o=KD(o)));const a=super.subscribe({next:r,error:s,complete:o});return t instanceof Qt&&t.add(a),a}};function Jj(){return this._results[Symbol.iterator]()}class rm{get changes(){return this._changes||(this._changes=new $e)}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=rm.prototype;e[Symbol.iterator]||(e[Symbol.iterator]=Jj)}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 Dr(i){return i.flat(Number.POSITIVE_INFINITY)}(t);(this._changesDetected=!function hp(i,t,e){if(i.length!==t.length)return!1;for(let n=0;n{class i{}return i.__NG_ELEMENT_ID__=n6,i})();const e6=Co,t6=class extends e6{constructor(t,e,n){super(),this._declarationLView=t,this._declarationTContainer=e,this.elementRef=n}createEmbeddedView(t,e){const n=this._declarationTContainer.tView,r=vh(this._declarationLView,n,t,16,null,n.declTNode,null,null,null,null,e||null);r[Zu]=this._declarationLView[this._declarationTContainer.index];const o=this._declarationLView[qs];return null!==o&&(r[qs]=o.createEmbeddedView(n)),bh(n,r,t),new Jv(r)}};function n6(){return kw(Ar(),Se())}function kw(i,t){return 4&i.type?new t6(t,i,On(i,t)):null}let jr=(()=>{class i{}return i.__NG_ELEMENT_ID__=r6,i})();function r6(){return z2(Ar(),Se())}const s6=jr,U2=class extends s6{constructor(t,e,n){super(),this._lContainer=t,this._hostTNode=e,this._hostLView=n}get element(){return On(this._hostTNode,this._hostLView)}get injector(){return new yc(this._hostTNode,this._hostLView)}get parentInjector(){const t=rh(this._hostTNode,this._hostLView);if(ap(t)){const e=th(t,this._hostLView),n=eh(t);return new yc(e[ot].data[n+8],e)}return new yc(null,this._hostLView)}clear(){for(;this.length>0;)this.remove(this.length-1)}get(t){const e=V2(this._lContainer);return null!==e&&e[t]||null}get length(){return this._lContainer.length-Ui}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 ah(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 ey(Hn(t)),c=n||this.parentInjector;if(!s&&null==l.ngModule){const p=(o?c:this.parentInjector).get(eo,null);p&&(s=p)}const d=l.create(c,r,void 0,s);return this.insert(d.hostView,a),d}insert(t,e){const n=t._lView,r=n[ot];if(function oA(i){return xs(i[Bi])}(n)){const d=this.indexOf(t);if(-1!==d)this.detach(d);else{const h=n[Bi],p=new U2(h,h[he],h[Bi]);p.detach(p.indexOf(t))}}const s=this._adjustIndex(e),o=this._lContainer;!function av(i,t,e,n){const r=Ui+n,s=e.length;n>0&&(e[r-1][ys]=t),n0)n.push(o[a/2]);else{const c=s[a+1],d=t[-l];for(let h=Ui;h{class i{constructor(e){this.appInits=e,this.resolve=Ow,this.reject=Ow,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)(ee(Fw,8))},i.\u0275prov=Re({token:i,factory:i.\u0275fac,providedIn:"root"}),i})();const am=new me("AppId",{providedIn:"root",factory:function dN(){return`${lT()}${lT()}${lT()}`}});function lT(){return String.fromCharCode(97+Math.floor(25*Math.random()))}const uN=new me("Platform Initializer"),cT=new me("Platform ID",{providedIn:"platform",factory:()=>"unknown"}),kr=new me("AnimationModuleType");let R6=(()=>{class i{log(e){console.log(e)}warn(e){console.warn(e)}}return i.\u0275fac=function(e){return new(e||i)},i.\u0275prov=Re({token:i,factory:i.\u0275fac,providedIn:"platform"}),i})();const Hl=new me("LocaleId",{providedIn:"root",factory:()=>Lt(Hl,Ft.Optional|Ft.SkipSelf)||function k6(){return typeof $localize<"u"&&$localize.locale||tm}()});class O6{constructor(t,e){this.ngModuleFactory=t,this.componentFactories=e}}let hN=(()=>{class i{compileModuleSync(e){return new jD(e)}compileModuleAsync(e){return Promise.resolve(this.compileModuleSync(e))}compileModuleAndAllComponentsSync(e){const n=this.compileModuleSync(e),s=sl(dr(e).declarations).reduce((o,a)=>{const l=Hn(a);return l&&o.push(new ey(l)),o},[]);return new O6(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=Re({token:i,factory:i.\u0275fac,providedIn:"root"}),i})();const N6=(()=>Promise.resolve(0))();function dT(i){typeof Zone>"u"?N6.then(()=>{i&&i.apply(null,null)}):Zone.current.scheduleMicroTask("scheduleMicrotask",i)}class ft{constructor({enableLongStackTrace:t=!1,shouldCoalesceEventChangeDetection:e=!1,shouldCoalesceRunChangeDetection:n=!1}){if(this.hasPendingMacrotasks=!1,this.hasPendingMicrotasks=!1,this.isStable=!0,this.onUnstable=new $e(!1),this.onMicrotaskEmpty=new $e(!1),this.onStable=new $e(!1),this.onError=new $e(!1),typeof Zone>"u")throw new pe(908,!1);Zone.assertZonePatched();const r=this;r._nesting=0,r._outer=r._inner=Zone.current,Zone.TaskTrackingZoneSpec&&(r._inner=r._inner.fork(new Zone.TaskTrackingZoneSpec)),t&&Zone.longStackTraceZoneSpec&&(r._inner=r._inner.fork(Zone.longStackTraceZoneSpec)),r.shouldCoalesceEventChangeDetection=!n&&e,r.shouldCoalesceRunChangeDetection=n,r.lastRequestAnimationFrameId=-1,r.nativeRequestAnimationFrame=function B6(){let i=In.requestAnimationFrame,t=In.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 z6(i){const t=()=>{!function V6(i){i.isCheckStableRunning||-1!==i.lastRequestAnimationFrameId||(i.lastRequestAnimationFrameId=i.nativeRequestAnimationFrame.call(In,()=>{i.fakeTopEventTask||(i.fakeTopEventTask=Zone.root.scheduleEventTask("fakeTopEventTask",()=>{i.lastRequestAnimationFrameId=-1,hT(i),i.isCheckStableRunning=!0,uT(i),i.isCheckStableRunning=!1},void 0,()=>{},()=>{})),i.fakeTopEventTask.invoke()}),hT(i))}(i)};i._inner=i._inner.fork({name:"angular",properties:{isAngularZone:!0},onInvokeTask:(e,n,r,s,o,a)=>{try{return mN(i),e.invokeTask(r,s,o,a)}finally{(i.shouldCoalesceEventChangeDetection&&"eventTask"===s.type||i.shouldCoalesceRunChangeDetection)&&t(),gN(i)}},onInvoke:(e,n,r,s,o,a,l)=>{try{return mN(i),e.invoke(r,s,o,a,l)}finally{i.shouldCoalesceRunChangeDetection&&t(),gN(i)}},onHasTask:(e,n,r,s)=>{e.hasTask(r,s),n===r&&("microTask"==s.change?(i._hasPendingMicrotasks=s.microTask,hT(i),uT(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(!ft.isInAngularZone())throw new pe(909,!1)}static assertNotInAngularZone(){if(ft.isInAngularZone())throw new pe(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,U6,Ow,Ow);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 U6={};function uT(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 hT(i){i.hasPendingMicrotasks=!!(i._hasPendingMicrotasks||(i.shouldCoalesceEventChangeDetection||i.shouldCoalesceRunChangeDetection)&&-1!==i.lastRequestAnimationFrameId)}function mN(i){i._nesting++,i.isStable&&(i.isStable=!1,i.onUnstable.emit(null))}function gN(i){i._nesting--,uT(i)}class H6{constructor(){this.hasPendingMicrotasks=!1,this.hasPendingMacrotasks=!1,this.isStable=!0,this.onUnstable=new $e,this.onMicrotaskEmpty=new $e,this.onStable=new $e,this.onError=new $e}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 _N=new me(""),Nw=new me("");let mT,fT=(()=>{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,mT||(function G6(i){mT=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:()=>{ft.assertNotInAngularZone(),dT(()=>{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())dT(()=>{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)(ee(ft),ee(pT),ee(Nw))},i.\u0275prov=Re({token:i,factory:i.\u0275fac}),i})(),pT=(()=>{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 mT?.findTestabilityInTree(this,e,n)??null}}return i.\u0275fac=function(e){return new(e||i)},i.\u0275prov=Re({token:i,factory:i.\u0275fac,providedIn:"platform"}),i})();const Pc=!1;let Jd=null;const vN=new me("AllowMultipleToken"),gT=new me("PlatformDestroyListeners"),yN=new me("appBootstrapListener");class bN{constructor(t,e){this.name=t,this.token=e}}function wN(i,t,e=[]){const n=`Platform: ${t}`,r=new me(n);return(s=[])=>{let o=_T();if(!o||o.injector.get(vN,!1)){const a=[...e,...s,{provide:r,useValue:!0}];i?i(a):function j6(i){if(Jd&&!Jd.get(vN,!1))throw new pe(400,!1);Jd=i;const t=i.get(CN);(function xN(i){const t=i.get(uN,null);t&&t.forEach(e=>e())})(i)}(function MN(i=[],t){return $i.create({name:t,providers:[{provide:Av,useValue:"platform"},{provide:gT,useValue:new Set([()=>Jd=null])},...i]})}(a,n))}return function q6(i){const t=_T();if(!t)throw new pe(401,!1);return t}()}}function _T(){return Jd?.get(CN)??null}let CN=(()=>{class i{constructor(e){this._injector=e,this._modules=[],this._destroyListeners=[],this._destroyed=!1}bootstrapModuleFactory(e,n){const r=function EN(i,t){let e;return e="noop"===i?new H6:("zone.js"===i?void 0:i)||new ft(t),e}(n?.ngZone,function SN(i){return{enableLongStackTrace:!1,shouldCoalesceEventChangeDetection:!(!i||!i.ngZoneEventCoalescing)||!1,shouldCoalesceRunChangeDetection:!(!i||!i.ngZoneRunCoalescing)||!1}}(n)),s=[{provide:ft,useValue:r}];return r.run(()=>{const o=$i.create({providers:s,parent:this.injector,name:e.moduleType.name}),a=e.create(o),l=a.injector.get(rl,null);if(!l)throw new pe(402,!1);return r.runOutsideAngular(()=>{const c=r.onError.subscribe({next:d=>{l.handleError(d)}});a.onDestroy(()=>{Bw(this._modules,a),c.unsubscribe()})}),function AN(i,t,e){try{const n=e();return iy(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(Lw);return c.runInitializers(),c.donePromise.then(()=>(function JL(i){Sn(i,"Expected localeId to be defined"),"string"==typeof i&&(QL=i.toLowerCase().replace(/_/g,"-"))}(a.injector.get(Hl,tm)||tm),this._moduleDoBootstrap(a),a))})})}bootstrapModule(e,n=[]){const r=DN({},n);return function $6(i,t,e){const n=new jD(e);return Promise.resolve(n)}(0,0,e).then(s=>this.bootstrapModuleFactory(s,r))}_moduleDoBootstrap(e){const n=e.injector.get(lm);if(e._bootstrapComponents.length>0)e._bootstrapComponents.forEach(r=>n.bootstrap(r));else{if(!e.instance.ngDoBootstrap)throw new pe(-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 pe(404,!1);this._modules.slice().forEach(n=>n.destroy()),this._destroyListeners.forEach(n=>n());const e=this._injector.get(gT,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)(ee($i))},i.\u0275prov=Re({token:i,factory:i.\u0275fac,providedIn:"platform"}),i})();function DN(i,t){return Array.isArray(t)?t.reduce(DN,i):{...i,...t}}let lm=(()=>{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 Tn(a=>{this._stable=this._zone.isStable&&!this._zone.hasPendingMacrotasks&&!this._zone.hasPendingMicrotasks,this._zone.runOutsideAngular(()=>{a.next(this._stable),a.complete()})}),o=new Tn(a=>{let l;this._zone.runOutsideAngular(()=>{l=this._zone.onStable.subscribe(()=>{ft.assertNotInAngularZone(),dT(()=>{!this._stable&&!this._zone.hasPendingMacrotasks&&!this._zone.hasPendingMicrotasks&&(this._stable=!0,a.next(!0))})})});const c=this._zone.onUnstable.subscribe(()=>{ft.assertInAngularZone(),this._stable&&(this._stable=!1,this._zone.runOutsideAngular(()=>{a.next(!1)}))});return()=>{l.unsubscribe(),c.unsubscribe()}});this.isStable=Cr(s,o.pipe(Bf()))}bootstrap(e,n){const r=e instanceof Rv;if(!this._injector.get(Lw).done){!r&&function Cd(i){const t=Hn(i)||Vr(i)||vs(i);return null!==t&&t.standalone}(e);throw new pe(405,Pc)}let o;o=r?e:this._injector.get(Ll).resolveComponentFactory(e),this.componentTypes.push(o.componentType);const a=function W6(i){return i.isBoundToModule}(o)?void 0:this._injector.get(nm),c=o.create($i.NULL,[],n||o.selector,a),d=c.location.nativeElement,h=c.injector.get(_N,null);return h?.registerApplication(d),c.onDestroy(()=>{this.detachView(c.hostView),Bw(this.components,c),h?.unregisterApplication(d)}),this._loadComponent(c),c}tick(){if(this._runningTick)throw new pe(101,!1);try{this._runningTick=!0;for(let e of this._views)e.detectChanges()}catch(e){this._zone.runOutsideAngular(()=>this._exceptionHandler.handleError(e))}finally{this._runningTick=!1}}attachView(e){const n=e;this._views.push(n),n.attachToAppRef(this)}detachView(e){const n=e;Bw(this._views,n),n.detachFromAppRef()}_loadComponent(e){this.attachView(e.hostView),this.tick(),this.components.push(e);const n=this._injector.get(yN,[]);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),()=>Bw(this._destroyListeners,e)}destroy(){if(this._destroyed)throw new pe(406,!1);const e=this._injector;e.destroy&&!e.destroyed&&e.destroy()}get viewCount(){return this._views.length}warnIfDestroyed(){}}return i.\u0275fac=function(e){return new(e||i)(ee(ft),ee(eo),ee(rl))},i.\u0275prov=Re({token:i,factory:i.\u0275fac,providedIn:"root"}),i})();function Bw(i,t){const e=i.indexOf(t);e>-1&&i.splice(e,1)}let si=(()=>{class i{}return i.__NG_ELEMENT_ID__=K6,i})();function K6(i){return function Z6(i,t,e){if(Ed(i)&&!e){const n=ws(i.index,t);return new Jv(n,n)}return 47&i.type?new Jv(t[nr],t):null}(Ar(),Se(),16==(16&i))}class PN{constructor(){}supports(t){return ww(t)}create(t){return new r9(t)}}const n9=(i,t)=>t;class r9{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||n9}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 s9(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 ON),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 ON),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 s9{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 o9{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 ON{constructor(){this.map=new Map}put(t){const e=t.trackById;let n=this.map.get(e);n||(n=new o9,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 FN(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 l9(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 l9{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 NN(){return new zw([new PN])}let zw=(()=>{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||NN()),deps:[[i,new ya,new Ss]]}}find(e){const n=this.factories.find(r=>r.supports(e));if(null!=n)return n;throw new pe(901,!1)}}return i.\u0275prov=Re({token:i,providedIn:"root",factory:NN}),i})();function BN(){return new fy([new LN])}let fy=(()=>{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||BN()),deps:[[i,new ya,new Ss]]}}find(e){const n=this.factories.find(r=>r.supports(e));if(n)return n;throw new pe(901,!1)}}return i.\u0275prov=Re({token:i,providedIn:"root",factory:BN}),i})();const u9=wN(null,"core",[]);let h9=(()=>{class i{constructor(e){}}return i.\u0275fac=function(e){return new(e||i)(ee(lm))},i.\u0275mod=en({type:i}),i.\u0275inj=Wt({}),i})();let wT=null;function Oc(){return wT}class m9{}const qt=new me("DocumentToken");let MT=(()=>{class i{historyGo(e){throw new Error("Not implemented")}}return i.\u0275fac=function(e){return new(e||i)},i.\u0275prov=Re({token:i,factory:function(){return function g9(){return ee(UN)}()},providedIn:"platform"}),i})();const _9=new me("Location Initialized");let UN=(()=>{class i extends MT{constructor(e){super(),this._doc=e,this._location=window.location,this._history=window.history}getBaseHrefFromDOM(){return Oc().getBaseHref(this._doc)}onPopState(e){const n=Oc().getGlobalEventTarget(this._doc,"window");return n.addEventListener("popstate",e,!1),()=>n.removeEventListener("popstate",e)}onHashChange(e){const n=Oc().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){VN()?this._history.pushState(e,n,r):this._location.hash=r}replaceState(e,n,r){VN()?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)(ee(qt))},i.\u0275prov=Re({token:i,factory:function(){return function v9(){return new UN(ee(qt))}()},providedIn:"platform"}),i})();function VN(){return!!window.history.pushState}function CT(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 zN(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 Fc(i){return i&&"?"!==i[0]?"?"+i:i}let Eh=(()=>{class i{historyGo(e){throw new Error("Not implemented")}}return i.\u0275fac=function(e){return new(e||i)},i.\u0275prov=Re({token:i,factory:function(){return Lt(GN)},providedIn:"root"}),i})();const HN=new me("appBaseHref");let GN=(()=>{class i extends Eh{constructor(e,n){super(),this._platformLocation=e,this._removeListenerFns=[],this._baseHref=n??this._platformLocation.getBaseHrefFromDOM()??Lt(qt).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 CT(this._baseHref,e)}path(e=!1){const n=this._platformLocation.pathname+Fc(this._platformLocation.search),r=this._platformLocation.hash;return r&&e?`${n}${r}`:n}pushState(e,n,r,s){const o=this.prepareExternalUrl(r+Fc(s));this._platformLocation.pushState(e,n,o)}replaceState(e,n,r,s){const o=this.prepareExternalUrl(r+Fc(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)(ee(MT),ee(HN,8))},i.\u0275prov=Re({token:i,factory:i.\u0275fac,providedIn:"root"}),i})(),y9=(()=>{class i extends Eh{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=CT(this._baseHref,e);return n.length>0?"#"+n:n}pushState(e,n,r,s){let o=this.prepareExternalUrl(r+Fc(s));0==o.length&&(o=this._platformLocation.pathname),this._platformLocation.pushState(e,n,o)}replaceState(e,n,r,s){let o=this.prepareExternalUrl(r+Fc(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)(ee(MT),ee(HN,8))},i.\u0275prov=Re({token:i,factory:i.\u0275fac}),i})(),py=(()=>{class i{constructor(e){this._subject=new $e,this._urlChangeListeners=[],this._urlChangeSubscription=null,this._locationStrategy=e;const n=this._locationStrategy.getBaseHref();this._basePath=function w9(i){if(new RegExp("^(https?:)?//").test(i)){const[,e]=i.split(/\/\/[^\/]+/);return e}return i}(zN($N(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+Fc(n))}normalize(e){return i.stripTrailingSlash(function x9(i,t){if(!i||!t.startsWith(i))return t;const e=t.substring(i.length);return""===e||["/",";","?","#"].includes(e[0])?e:t}(this._basePath,$N(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+Fc(n)),r)}replaceState(e,n="",r=null){this._locationStrategy.replaceState(r,"",e,n),this._notifyUrlChangeListeners(this.prepareExternalUrl(e+Fc(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=Fc,i.joinWithSlash=CT,i.stripTrailingSlash=zN,i.\u0275fac=function(e){return new(e||i)(ee(Eh))},i.\u0275prov=Re({token:i,factory:function(){return function b9(){return new py(ee(Eh))}()},providedIn:"root"}),i})();function $N(i){return i.replace(/\/index.html$/,"")}var So=(()=>((So=So||{})[So.Decimal=0]="Decimal",So[So.Percent=1]="Percent",So[So.Currency=2]="Currency",So[So.Scientific=3]="Scientific",So))(),Gt=(()=>((Gt=Gt||{})[Gt.Decimal=0]="Decimal",Gt[Gt.Group=1]="Group",Gt[Gt.List=2]="List",Gt[Gt.PercentSign=3]="PercentSign",Gt[Gt.PlusSign=4]="PlusSign",Gt[Gt.MinusSign=5]="MinusSign",Gt[Gt.Exponential=6]="Exponential",Gt[Gt.SuperscriptingExponent=7]="SuperscriptingExponent",Gt[Gt.PerMille=8]="PerMille",Gt[Gt.Infinity=9]="Infinity",Gt[Gt.NaN=10]="NaN",Gt[Gt.TimeSeparator=11]="TimeSeparator",Gt[Gt.CurrencyDecimal=12]="CurrencyDecimal",Gt[Gt.CurrencyGroup=13]="CurrencyGroup",Gt))();function Ca(i,t){const e=io(i),n=e[it.NumberSymbols][t];if(typeof n>"u"){if(t===Gt.CurrencyDecimal)return e[it.NumberSymbols][Gt.Decimal];if(t===Gt.CurrencyGroup)return e[it.NumberSymbols][Gt.Group]}return n}const q9=/^(\d+)?\.((\d+)(-(\d+))?)?$/,KN=22,Kw=".",gy="0",X9=";",K9=",",TT="#";function kT(i){const t=parseInt(i);if(isNaN(t))throw new Error("Invalid integer literal when parsing "+i);return t}const OT=/\s+/,JN=[];let dm=(()=>{class i{constructor(e,n,r,s){this._iterableDiffers=e,this._keyValueDiffers=n,this._ngEl=r,this._renderer=s,this.initialClasses=JN,this.stateMap=new Map}set klass(e){this.initialClasses=null!=e?e.trim().split(OT):JN}set ngClass(e){this.rawClass="string"==typeof e?e.trim().split(OT):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(OT).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)(E(zw),E(fy),E(mt),E(il))},i.\u0275dir=ve({type:i,selectors:[["","ngClass",""]],inputs:{klass:["class","klass"],ngClass:"ngClass"},standalone:!0}),i})();class aY{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 oo=(()=>{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 aY(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),nB(a,r)}});for(let r=0,s=n.length;r{nB(n.get(r.currentIndex),r)})}static ngTemplateContextGuard(e,n){return!0}}return i.\u0275fac=function(e){return new(e||i)(E(jr),E(Co),E(zw))},i.\u0275dir=ve({type:i,selectors:[["","ngFor","","ngForOf",""]],inputs:{ngForOf:"ngForOf",ngForTrackBy:"ngForTrackBy",ngForTemplate:"ngForTemplate"},standalone:!0}),i})();function nB(i,t){i.context.$implicit=t.item}let vi=(()=>{class i{constructor(e,n){this._viewContainer=e,this._context=new cY,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){iB("ngIfThen",e),this._thenTemplateRef=e,this._thenViewRef=null,this._updateView()}set ngIfElse(e){iB("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)(E(jr),E(Co))},i.\u0275dir=ve({type:i,selectors:[["","ngIf",""]],inputs:{ngIf:"ngIf",ngIfThen:"ngIfThen",ngIfElse:"ngIfElse"},standalone:!0}),i})();class cY{constructor(){this.$implicit=null,this.ngIf=null}}function iB(i,t){if(t&&!t.createEmbeddedView)throw new Error(`${i} must be a TemplateRef, but received '${mi(t)}'.`)}class FT{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 _y=(()=>{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=ve({type:i,selectors:[["","ngSwitch",""]],inputs:{ngSwitch:"ngSwitch"},standalone:!0}),i})(),LT=(()=>{class i{constructor(e,n,r){this.ngSwitch=r,r._addCase(),this._view=new FT(e,n)}ngDoCheck(){this._view.enforceState(this.ngSwitch._matchCase(this.ngSwitchCase))}}return i.\u0275fac=function(e){return new(e||i)(E(jr),E(Co),E(_y,9))},i.\u0275dir=ve({type:i,selectors:[["","ngSwitchCase",""]],inputs:{ngSwitchCase:"ngSwitchCase"},standalone:!0}),i})(),rB=(()=>{class i{constructor(e,n,r){r._addDefault(new FT(e,n))}}return i.\u0275fac=function(e){return new(e||i)(E(jr),E(Co),E(_y,9))},i.\u0275dir=ve({type:i,selectors:[["","ngSwitchDefault",""]],standalone:!0}),i})(),Zw=(()=>{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:Es.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)(E(mt),E(fy),E(il))},i.\u0275dir=ve({type:i,selectors:[["","ngStyle",""]],inputs:{ngStyle:"ngStyle"},standalone:!0}),i})(),vy=(()=>{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)(E(jr))},i.\u0275dir=ve({type:i,selectors:[["","ngTemplateOutlet",""]],inputs:{ngTemplateOutletContext:"ngTemplateOutletContext",ngTemplateOutlet:"ngTemplateOutlet",ngTemplateOutletInjector:"ngTemplateOutletInjector"},standalone:!0,features:[xi]}),i})();function dl(i,t){return new pe(2100,!1)}class uY{createSubscription(t,e){return t.subscribe({next:e,error:n=>{throw n}})}dispose(t){t.unsubscribe()}}class hY{createSubscription(t,e){return t.then(e,n=>{throw n})}dispose(t){}}const fY=new hY,pY=new uY;let Ea=(()=>{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(iy(e))return fY;if(lL(e))return pY;throw dl()}_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)(E(si,16))},i.\u0275pipe=Gi({name:"async",type:i,pure:!1,standalone:!0}),i})(),oB=(()=>{class i{constructor(e){this.differs=e,this.keyValues=[],this.compareFn=aB}transform(e,n=aB){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 AY(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)(E(fy,16))},i.\u0275pipe=Gi({name:"keyvalue",type:i,pure:!1,standalone:!0}),i})();function aB(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 NT(i){return!(null==i||""===i||i!=i)}(e))return null;r=r||this._locale;try{return function eY(i,t,e){return function IT(i,t,e,n,r,s,o=!1){let a="",l=!1;if(isFinite(i)){let c=function nY(i){let n,r,s,o,a,t=Math.abs(i)+"",e=0;for((r=t.indexOf(Kw))>-1&&(t=t.replace(Kw,"")),(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)===gy;s++);if(s===(a=t.length))n=[0],r=1;else{for(a--;t.charAt(a)===gy;)a--;for(r-=s,n=[],o=0;s<=a;s++,o++)n[o]=Number(t.charAt(s))}return r>KN&&(n=n.splice(0,KN-1),e=r-1,r=1),{digits:n,exponent:e,integerLen:r}}(i);o&&(c=function tY(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 d=t.minInt,h=t.minFrac,p=t.maxFrac;if(s){const M=s.match(q9);if(null===M)throw new Error(`${s} is not a valid digit info`);const x=M[1],C=M[3],F=M[5];null!=x&&(d=kT(x)),null!=C&&(h=kT(C)),null!=F?p=kT(F):null!=C&&h>p&&(p=h)}!function iY(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);d&&(n.unshift(d),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(Ca(e,n)),v.length&&(a+=Ca(e,r)+v.join("")),b&&(a+=Ca(e,Gt.Exponential)+"+"+b)}else a=Ca(e,Gt.Infinity);return a=i<0&&!l?t.negPre+a+t.negSuf:t.posPre+a+t.posSuf,a}(i,function RT(i,t="-"){const e={minInt:1,minFrac:0,maxFrac:0,posPre:"",posSuf:"",negPre:"",negSuf:"",gSize:0,lgSize:0},n=i.split(X9),r=n[0],s=n[1],o=-1!==r.indexOf(Kw)?r.split(Kw):[r.substring(0,r.lastIndexOf(gy)+1),r.substring(r.lastIndexOf(gy)+1)],a=o[0],l=o[1]||"";e.posPre=a.substring(0,a.indexOf(TT));for(let d=0;d{class i{}return i.\u0275fac=function(e){return new(e||i)},i.\u0275mod=en({type:i}),i.\u0275inj=Wt({}),i})();const cB="browser";let OY=(()=>{class i{}return i.\u0275prov=Re({token:i,providedIn:"root",factory:()=>new FY(ee(qt),window)}),i})();class FY{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 LY(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=dB(this.window.history)||dB(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 dB(i){return Object.getOwnPropertyDescriptor(i,"scrollRestoration")}class d7 extends m9{constructor(){super(...arguments),this.supportsDOMEvents=!0}}class zT extends d7{static makeCurrent(){!function p9(i){wT||(wT=i)}(new zT)}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 u7(){return by=by||document.querySelector("base"),by?by.getAttribute("href"):null}();return null==e?null:function h7(i){eM=eM||document.createElement("a"),eM.setAttribute("href",i);const t=eM.pathname;return"/"===t.charAt(0)?t:`/${t}`}(e)}resetBaseElement(){by=null}getUserAgent(){return window.navigator.userAgent}getCookie(t){return function sY(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 eM,by=null;const mB=new me("TRANSITION_ID"),p7=[{provide:Fw,useFactory:function f7(i,t,e){return()=>{e.get(Lw).donePromise.then(()=>{const n=Oc(),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=Re({token:i,factory:i.\u0275fac}),i})();const tM=new me("EventManagerPlugins");let nM=(()=>{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=Re({token:i,factory:i.\u0275fac}),i})(),xy=(()=>{class i extends _B{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)(ee(qt))},i.\u0275prov=Re({token:i,factory:i.\u0275fac}),i})();const HT={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/"},GT=/%COMP%/g,bB=new me("RemoveStylesOnCompDestory",{providedIn:"root",factory:()=>!1});function xB(i,t){return t.flat(100).map(e=>e.replace(GT,i))}function wB(i){return t=>{if("__ngUnwrap__"===t)return i;!1===i(t)&&(t.preventDefault(),t.returnValue=!1)}}let iM=(()=>{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 $T(e)}createRenderer(e,n){if(!e||!n)return this.defaultRenderer;const r=this.getOrCreateRenderer(e,n);return r instanceof SB?r.applyToHost(e):r instanceof WT&&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 Ys.Emulated:s=new SB(o,a,n,this.appId,l);break;case Ys.ShadowDom:return new M7(o,a,e,n);default:s=new WT(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)(ee(nM),ee(xy),ee(am),ee(bB))},i.\u0275prov=Re({token:i,factory:i.\u0275fac}),i})();class $T{constructor(t){this.eventManager=t,this.data=Object.create(null),this.destroyNode=null}destroy(){}createElement(t,e){return e?document.createElementNS(HT[e]||e,t):document.createElement(t)}createComment(t){return document.createComment(t)}createText(t){return document.createTextNode(t)}appendChild(t,e){(CB(t)?t.content:t).appendChild(e)}insertBefore(t,e,n){t&&(CB(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=HT[r];s?t.setAttributeNS(s,e,n):t.setAttribute(e,n)}else t.setAttribute(e,n)}removeAttribute(t,e,n){if(n){const r=HT[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&(Es.DashCase|Es.Important)?t.style.setProperty(e,n,r&Es.Important?"important":""):t.style[e]=n}removeStyle(t,e,n){n&Es.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,wB(n)):this.eventManager.addEventListener(t,e,wB(n))}}function CB(i){return"TEMPLATE"===i.tagName&&void 0!==i.content}class M7 extends $T{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=xB(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 WT extends $T{constructor(t,e,n,r,s=n.id){super(t),this.sharedStylesHost=e,this.removeStylesOnCompDestory=r,this.rendererUsageCount=0,this.styles=xB(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 SB extends WT{constructor(t,e,n,r,s){const o=r+"-"+n.id;super(t,e,n,s,o),this.contentAttr=function b7(i){return"_ngcontent-%COMP%".replace(GT,i)}(o),this.hostAttr=function x7(i){return"_nghost-%COMP%".replace(GT,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 C7=(()=>{class i extends gB{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)(ee(qt))},i.\u0275prov=Re({token:i,factory:i.\u0275fac}),i})();const EB=["alt","control","meta","shift"],S7={"\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"},E7={alt:i=>i.altKey,control:i=>i.ctrlKey,meta:i=>i.metaKey,shift:i=>i.shiftKey};let A7=(()=>{class i extends gB{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(()=>Oc().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."),EB.forEach(c=>{const d=n.indexOf(c);d>-1&&(n.splice(d,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=S7[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"),EB.forEach(o=>{o!==r&&(0,E7[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)(ee(qt))},i.\u0275prov=Re({token:i,factory:i.\u0275fac}),i})();const R7=wN(u9,"browser",[{provide:cT,useValue:cB},{provide:uN,useValue:function D7(){zT.makeCurrent()},multi:!0},{provide:qt,useFactory:function I7(){return function t1(i){mv=i}(document),document},deps:[]}]),TB=new me(""),IB=[{provide:Nw,useClass:class m7{addToWindow(t){In.getAngularTestability=(n,r=!0)=>{const s=t.findTestabilityInTree(n,r);if(null==s)throw new Error("Could not find testability for element.");return s},In.getAllAngularTestabilities=()=>t.getAllTestabilities(),In.getAllAngularRootElements=()=>t.getAllRootElements(),In.frameworkStabilizers||(In.frameworkStabilizers=[]),In.frameworkStabilizers.push(n=>{const r=In.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?Oc().isShadowRoot(e)?this.findTestabilityInTree(t,e.host,!0):this.findTestabilityInTree(t,e.parentElement,!0):null)}},deps:[]},{provide:_N,useClass:fT,deps:[ft,pT,Nw]},{provide:fT,useClass:fT,deps:[ft,pT,Nw]}],RB=[{provide:Av,useValue:"root"},{provide:rl,useFactory:function T7(){return new rl},deps:[]},{provide:tM,useClass:C7,multi:!0,deps:[qt,ft,cT]},{provide:tM,useClass:A7,multi:!0,deps:[qt]},{provide:iM,useClass:iM,deps:[nM,xy,am,bB]},{provide:Nl,useExisting:iM},{provide:_B,useExisting:xy},{provide:xy,useClass:xy,deps:[qt]},{provide:nM,useClass:nM,deps:[tM,ft]},{provide:class NY{},useClass:g7,deps:[]},[]];let kB=(()=>{class i{constructor(e){}static withServerTransition(e){return{ngModule:i,providers:[{provide:am,useValue:e.appId},{provide:mB,useExisting:am},p7]}}}return i.\u0275fac=function(e){return new(e||i)(ee(TB,12))},i.\u0275mod=en({type:i}),i.\u0275inj=Wt({providers:[...RB,...IB],imports:[ao,h9]}),i})(),PB=(()=>{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)(ee(qt))},i.\u0275prov=Re({token:i,factory:function(e){let n=null;return n=e?new e:function P7(){return new PB(ee(qt))}(),n},providedIn:"root"}),i})();typeof window<"u"&&window;let qT=(()=>{class i{}return i.\u0275fac=function(e){return new(e||i)},i.\u0275prov=Re({token:i,factory:function(e){let n=null;return n=e?new(e||i):ee(LB),n},providedIn:"root"}),i})(),LB=(()=>{class i extends qT{constructor(e){super(),this._doc=e}sanitize(e,n){if(null==n)return null;switch(e){case Xn.NONE:return n;case Xn.HTML:return xa(n,"HTML")?Qs(n):Yx(this._doc,String(n)).toString();case Xn.STYLE:return xa(n,"Style")?Qs(n):n;case Xn.SCRIPT:if(xa(n,"Script"))return Qs(n);throw new Error("unsafe value used in a script context");case Xn.URL:return xa(n,"URL")?Qs(n):gh(String(n));case Xn.RESOURCE_URL:if(xa(n,"ResourceURL"))return Qs(n);throw new Error(`unsafe value used in a resource URL context (see ${Gu})`);default:throw new Error(`Unexpected SecurityContext ${e} (see ${Gu})`)}}bypassSecurityTrustHtml(e){return function l1(i){return new n1(i)}(e)}bypassSecurityTrustStyle(e){return function c1(i){return new r1(i)}(e)}bypassSecurityTrustScript(e){return function d1(i){return new s1(i)}(e)}bypassSecurityTrustUrl(e){return function u1(i){return new o1(i)}(e)}bypassSecurityTrustResourceUrl(e){return function h1(i){return new kp(i)}(e)}}return i.\u0275fac=function(e){return new(e||i)(ee(qt))},i.\u0275prov=Re({token:i,factory:function(e){let n=null;return n=e?new e:function B7(i){return new LB(i.get(qt))}(ee($i)),n},providedIn:"root"}),i})();function ht(...i){return Ni(i,Uu(i))}class at extends Ie{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 um=z(i=>function(){i(this),this.name="EmptyError",this.message="no elements in sequence"}),{isArray:U7}=Array,{getPrototypeOf:V7,prototype:z7,keys:H7}=Object;function NB(i){if(1===i.length){const t=i[0];if(U7(t))return{args:t,keys:null};if(function G7(i){return i&&"object"==typeof i&&V7(i)===z7}(t)){const e=H7(t);return{args:e.map(n=>t[n]),keys:e}}}return{args:i,keys:null}}const{isArray:$7}=Array;function XT(i){return et(t=>function W7(i,t){return $7(t)?i(...t):i(t)}(i,t))}function BB(i,t){return i.reduce((e,n,r)=>(e[n]=t[r],e),{})}function Aa(...i){const t=Uu(i),e=v0(i),{args:n,keys:r}=NB(i);if(0===n.length)return Ni([],t);const s=new Tn(function j7(i,t,e=za){return n=>{UB(t,()=>{const{length:r}=i,s=new Array(r);let o=r,a=r;for(let l=0;l{const c=Ni(i[l],t);let d=!1;c.subscribe(jn(n,h=>{s[l]=h,d||(d=!0,a--),a||n.next(e(s.slice()))},()=>{--o||n.complete()}))},n)},n)}}(n,t,r?o=>BB(r,o):za));return e?s.pipe(XT(e)):s}function UB(i,t,e){i?$a(e,i,t):t()}function wy(...i){return function Y7(){return vd(1)}()(Ni(i,Uu(i)))}function My(i){return new Tn(t=>{Mr(i()).subscribe(t)})}function hm(i,t){const e=dn(i)?i:()=>i,n=r=>r.error(e());return new Tn(t?r=>t.schedule(n,0,r):n)}function KT(){return ti((i,t)=>{let e=null;i._refCount++;const n=jn(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 VB extends Tn{constructor(t,e){super(),this.source=t,this.subjectFactory=e,this._subject=null,this._refCount=0,this._connection=null,s0(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 Qt;const e=this.getSubject();t.add(this.source.subscribe(jn(e,void 0,()=>{this._teardown(),e.complete()},n=>{this._teardown(),e.error(n)},()=>this._teardown()))),t.closed&&(this._connection=null,t=Qt.EMPTY)}return t}refCount(){return KT()(this)}}function Rs(i,t){return ti((e,n)=>{let r=null,s=0,o=!1;const a=()=>o&&!r&&n.complete();e.subscribe(jn(n,l=>{r?.unsubscribe();let c=0;const d=s++;Mr(i(l,d)).subscribe(r=jn(n,h=>n.next(t?t(l,h,d,c++):h),()=>{r=null,a()}))},()=>{o=!0,a()}))})}function Oi(i){return i<=0?()=>mo:ti((t,e)=>{let n=0;t.subscribe(jn(e,r=>{++n<=i&&(e.next(r),i<=n&&e.complete())}))})}function Eo(...i){const t=Uu(i);return ti((e,n)=>{(t?wy(i,e,t):wy(i,e)).subscribe(n)})}function vn(i,t){return ti((e,n)=>{let r=0;e.subscribe(jn(n,s=>i.call(t,s,r++)&&n.next(s)))})}function rM(i){return ti((t,e)=>{let n=!1;t.subscribe(jn(e,r=>{n=!0,e.next(r)},()=>{n||e.next(i),e.complete()}))})}function zB(i=q7){return ti((t,e)=>{let n=!1;t.subscribe(jn(e,r=>{n=!0,e.next(r)},()=>n?e.complete():e.error(i())))})}function q7(){return new um}function tu(i,t){const e=arguments.length>=2;return n=>n.pipe(i?vn((r,s)=>i(r,s,n)):za,Oi(1),e?rM(t):zB(()=>new um))}function nu(i,t){return dn(t)?tr(i,t,1):tr(i,1)}function Vi(i,t,e){const n=dn(i)||t||e?{next:i,error:t,complete:e}:i;return n?ti((r,s)=>{var o;null===(o=n.subscribe)||void 0===o||o.call(n);let a=!0;r.subscribe(jn(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)}))}):za}function Nc(i){return ti((t,e)=>{let s,n=null,r=!1;n=t.subscribe(jn(e,void 0,void 0,o=>{s=Mr(i(o,Nc(i)(t))),n?(n.unsubscribe(),n=null,s.subscribe(e)):r=!0})),r&&(n.unsubscribe(),n=null,s.subscribe(e))})}function ZT(i,t){return ti(function X7(i,t,e,n,r){return(s,o)=>{let a=e,l=t,c=0;s.subscribe(jn(o,d=>{const h=c++;l=a?i(l,d,h):(a=!0,d),n&&o.next(l)},r&&(()=>{a&&o.next(l),o.complete()})))}}(i,t,arguments.length>=2,!0))}function QT(i){return i<=0?()=>mo:ti((t,e)=>{let n=[];t.subscribe(jn(e,r=>{n.push(r),i{for(const r of n)e.next(r);e.complete()},void 0,()=>{n=null}))})}function HB(i,t){const e=arguments.length>=2;return n=>n.pipe(i?vn((r,s)=>i(r,s,n)):za,QT(1),e?rM(t):zB(()=>new um))}function GB(i,t=!1){return ti((e,n)=>{let r=0;e.subscribe(jn(n,s=>{const o=i(s,r++);(o||t)&&n.next(s),!o&&n.complete()}))})}function $B(i){return et(()=>i)}function iu(i){return ti((t,e)=>{try{t.subscribe(e)}finally{e.add(i)}})}const gn="primary",Cy=Symbol("RouteTitle");class K7{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 fm(i){return new K7(i)}function Z7(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 jB(i){return Array.prototype.concat.apply([],i)}function YB(i){return i.length>0?i[i.length-1]:null}function os(i,t){for(const e in i)i.hasOwnProperty(e)&&t(i[e],e)}function ru(i){return kD(i)?i:iy(i)?Ni(Promise.resolve(i)):ht(i)}const sM=!1,J7={exact:function KB(i,t,e){if(!Ah(i.segments,t.segments)||!oM(i.segments,t.segments,e)||i.numberOfChildren!==t.numberOfChildren)return!1;for(const n in t.children)if(!i.children[n]||!KB(i.children[n],t.children[n],e))return!1;return!0},subset:ZB},qB={exact:function eq(i,t){return Gl(i,t)},subset:function tq(i,t){return Object.keys(t).length<=Object.keys(i).length&&Object.keys(t).every(e=>WB(i[e],t[e]))},ignored:()=>!0};function XB(i,t,e){return J7[e.paths](i.root,t.root,e.matrixParams)&&qB[e.queryParams](i.queryParams,t.queryParams)&&!("exact"===e.fragment&&i.fragment!==t.fragment)}function ZB(i,t,e){return QB(i,t,t.segments,e)}function QB(i,t,e,n){if(i.segments.length>e.length){const r=i.segments.slice(0,e.length);return!(!Ah(r,e)||t.hasChildren()||!oM(r,e,n))}if(i.segments.length===e.length){if(!Ah(i.segments,e)||!oM(i.segments,e,n))return!1;for(const r in t.children)if(!i.children[r]||!ZB(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!!(Ah(i.segments,r)&&oM(i.segments,r,n)&&i.children[gn])&&QB(i.children[gn],t,s,n)}}function oM(i,t,e){return t.every((n,r)=>qB[e](i[r].parameters,n.parameters))}class su{constructor(t=new Dn([],{}),e={},n=null){this.root=t,this.queryParams=e,this.fragment=n}get queryParamMap(){return this._queryParamMap||(this._queryParamMap=fm(this.queryParams)),this._queryParamMap}toString(){return rq.serialize(this)}}class Dn{constructor(t,e){this.segments=t,this.children=e,this.parent=null,os(e,(n,r)=>n.parent=this)}hasChildren(){return this.numberOfChildren>0}get numberOfChildren(){return Object.keys(this.children).length}toString(){return aM(this)}}class Sy{constructor(t,e){this.path=t,this.parameters=e}get parameterMap(){return this._parameterMap||(this._parameterMap=fm(this.parameters)),this._parameterMap}toString(){return t3(this)}}function Ah(i,t){return i.length===t.length&&i.every((e,n)=>e.path===t[n].path)}let Ey=(()=>{class i{}return i.\u0275fac=function(e){return new(e||i)},i.\u0275prov=Re({token:i,factory:function(){return new JT},providedIn:"root"}),i})();class JT{parse(t){const e=new fq(t);return new su(e.parseRootSegment(),e.parseQueryParams(),e.parseFragment())}serialize(t){const e=`/${Ay(t.root,!0)}`,n=function aq(i){const t=Object.keys(i).map(e=>{const n=i[e];return Array.isArray(n)?n.map(r=>`${lM(e)}=${lM(r)}`).join("&"):`${lM(e)}=${lM(n)}`}).filter(e=>!!e);return t.length?`?${t.join("&")}`:""}(t.queryParams);return`${e}${n}${"string"==typeof t.fragment?`#${function sq(i){return encodeURI(i)}(t.fragment)}`:""}`}}const rq=new JT;function aM(i){return i.segments.map(t=>t3(t)).join("/")}function Ay(i,t){if(!i.hasChildren())return aM(i);if(t){const e=i.children[gn]?Ay(i.children[gn],!1):"",n=[];return os(i.children,(r,s)=>{s!==gn&&n.push(`${s}:${Ay(r,!1)}`)}),n.length>0?`${e}(${n.join("//")})`:e}{const e=function iq(i,t){let e=[];return os(i.children,(n,r)=>{r===gn&&(e=e.concat(t(n,r)))}),os(i.children,(n,r)=>{r!==gn&&(e=e.concat(t(n,r)))}),e}(i,(n,r)=>r===gn?[Ay(i.children[gn],!1)]:[`${r}:${Ay(n,!1)}`]);return 1===Object.keys(i.children).length&&null!=i.children[gn]?`${aM(i)}/${e[0]}`:`${aM(i)}/(${e.join("//")})`}}function JB(i){return encodeURIComponent(i).replace(/%40/g,"@").replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",")}function lM(i){return JB(i).replace(/%3B/gi,";")}function eI(i){return JB(i).replace(/\(/g,"%28").replace(/\)/g,"%29").replace(/%26/gi,"&")}function cM(i){return decodeURIComponent(i)}function e3(i){return cM(i.replace(/\+/g,"%20"))}function t3(i){return`${eI(i.path)}${function oq(i){return Object.keys(i).map(t=>`;${eI(t)}=${eI(i[t])}`).join("")}(i.parameters)}`}const lq=/^[^\/()?;=#]+/;function dM(i){const t=i.match(lq);return t?t[0]:""}const cq=/^[^=?&#]+/,uq=/^[^&#]+/;class fq{constructor(t){this.url=t,this.remaining=t}parseRootSegment(){return this.consumeOptional("/"),""===this.remaining||this.peekStartsWith("?")||this.peekStartsWith("#")?new Dn([],{}):new Dn([],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[gn]=new Dn(t,e)),n}parseSegment(){const t=dM(this.remaining);if(""===t&&this.peekStartsWith(";"))throw new pe(4009,sM);return this.capture(t),new Sy(cM(t),this.parseMatrixParams())}parseMatrixParams(){const t={};for(;this.consumeOptional(";");)this.parseParam(t);return t}parseParam(t){const e=dM(this.remaining);if(!e)return;this.capture(e);let n="";if(this.consumeOptional("=")){const r=dM(this.remaining);r&&(n=r,this.capture(n))}t[cM(e)]=cM(n)}parseQueryParam(t){const e=function dq(i){const t=i.match(cq);return t?t[0]:""}(this.remaining);if(!e)return;this.capture(e);let n="";if(this.consumeOptional("=")){const o=function hq(i){const t=i.match(uq);return t?t[0]:""}(this.remaining);o&&(n=o,this.capture(n))}const r=e3(e),s=e3(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=dM(this.remaining),r=this.remaining[n.length];if("/"!==r&&")"!==r&&";"!==r)throw new pe(4010,sM);let s;n.indexOf(":")>-1?(s=n.slice(0,n.indexOf(":")),this.capture(s),this.capture(":")):t&&(s=gn);const o=this.parseChildren();e[s]=1===Object.keys(o).length?o[gn]:new Dn([],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 pe(4011,sM)}}function tI(i){return i.segments.length>0?new Dn([],{[gn]:i}):i}function uM(i){const t={};for(const n of Object.keys(i.children)){const s=uM(i.children[n]);(s.segments.length>0||s.hasChildren())&&(t[n]=s)}return function pq(i){if(1===i.numberOfChildren&&i.children[gn]){const t=i.children[gn];return new Dn(i.segments.concat(t.segments),t.children)}return i}(new Dn(i.segments,t))}function Dh(i){return i instanceof su}const nI=!1;function mq(i,t,e,n,r){if(0===e.length)return pm(t.root,t.root,t.root,n,r);const s=function a3(i){if("string"==typeof i[0]&&1===i.length&&"/"===i[0])return new o3(!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 os(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 o3(e,t,n)}(e);return s.toRoot()?pm(t.root,t.root,new Dn([],{}),n,r):function o(l){const c=function _q(i,t,e,n){if(i.isAbsolute)return new mm(t.root,!0,0);if(-1===n)return new mm(e,e===t.root,0);return function l3(i,t,e){let n=i,r=t,s=e;for(;s>r;){if(s-=r,n=n.parent,!n)throw new pe(4005,nI&&"Invalid number of '../'");r=n.segments.length}return new mm(n,!1,r-s)}(e,n+(Dy(i.commands[0])?0:1),i.numberOfDoubleDots)}(s,t,i.snapshot?._urlSegment,l),d=c.processChildren?gm(c.segmentGroup,c.index,s.commands):iI(c.segmentGroup,c.index,s.commands);return pm(t.root,c.segmentGroup,d,n,r)}(i.snapshot?._lastPathIndex)}function Dy(i){return"object"==typeof i&&null!=i&&!i.outlets&&!i.segmentPath}function Ty(i){return"object"==typeof i&&null!=i&&i.outlets}function pm(i,t,e,n,r){let o,s={};n&&os(n,(l,c)=>{s[c]=Array.isArray(l)?l.map(d=>`${d}`):`${l}`}),o=i===t?e:s3(i,t,e);const a=tI(uM(o));return new su(a,s,r)}function s3(i,t,e){const n={};return os(i.children,(r,s)=>{n[s]=r===t?e:s3(r,t,e)}),new Dn(i.segments,n)}class o3{constructor(t,e,n){if(this.isAbsolute=t,this.numberOfDoubleDots=e,this.commands=n,t&&n.length>0&&Dy(n[0]))throw new pe(4003,nI&&"Root segment cannot have matrix parameters");const r=n.find(Ty);if(r&&r!==YB(n))throw new pe(4004,nI&&"{outlets:{}} has to be the last command")}toRoot(){return this.isAbsolute&&1===this.commands.length&&"/"==this.commands[0]}}class mm{constructor(t,e,n){this.segmentGroup=t,this.processChildren=e,this.index=n}}function iI(i,t,e){if(i||(i=new Dn([],{})),0===i.segments.length&&i.hasChildren())return gm(i,t,e);const n=function yq(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(Ty(a))break;const l=`${a}`,c=n0&&void 0===l)break;if(l&&c&&"object"==typeof c&&void 0===c.outlets){if(!d3(l,c,o))return s;n+=2}else{if(!d3(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]=iI(i.children[o],t,s))}),os(i.children,(s,o)=>{void 0===n[o]&&(r[o]=s)}),new Dn(i.segments,r)}}function rI(i,t,e){const n=i.segments.slice(0,t);let r=0;for(;r{"string"==typeof e&&(e=[e]),null!==e&&(t[n]=rI(new Dn([],{}),0,e))}),t}function c3(i){const t={};return os(i,(e,n)=>t[n]=`${e}`),t}function d3(i,t,e){return i==e.path&&Gl(t,e.parameters)}const Iy="imperative";class $l{constructor(t,e){this.id=t,this.url=e}}class sI 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 Th 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 hM 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 fM extends $l{constructor(t,e,n,r){super(t,e),this.reason=n,this.code=r,this.type=16}}class oI 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 xq 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 wq 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 Mq 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 Cq 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 Sq 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 Eq{constructor(t){this.route=t,this.type=9}toString(){return`RouteConfigLoadStart(path: ${this.route.path})`}}class Aq{constructor(t){this.route=t,this.type=10}toString(){return`RouteConfigLoadEnd(path: ${this.route.path})`}}class Dq{constructor(t){this.snapshot=t,this.type=11}toString(){return`ChildActivationStart(path: '${this.snapshot.routeConfig&&this.snapshot.routeConfig.path||""}')`}}class Tq{constructor(t){this.snapshot=t,this.type=12}toString(){return`ChildActivationEnd(path: '${this.snapshot.routeConfig&&this.snapshot.routeConfig.path||""}')`}}class Iq{constructor(t){this.snapshot=t,this.type=13}toString(){return`ActivationStart(path: '${this.snapshot.routeConfig&&this.snapshot.routeConfig.path||""}')`}}class Rq{constructor(t){this.snapshot=t,this.type=14}toString(){return`ActivationEnd(path: '${this.snapshot.routeConfig&&this.snapshot.routeConfig.path||""}')`}}class u3{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 Oq=(()=>{class i{createUrlTree(e,n,r,s,o,a){return mq(e||n.root,r,s,o,a)}}return i.\u0275fac=function(e){return new(e||i)},i.\u0275prov=Re({token:i,factory:i.\u0275fac}),i})(),Lq=(()=>{class i{}return i.\u0275fac=function(e){return new(e||i)},i.\u0275prov=Re({token:i,factory:function(t){return Oq.\u0275fac(t)},providedIn:"root"}),i})();class h3{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=aI(t,this._root);return e?e.children.map(n=>n.value):[]}firstChild(t){const e=aI(t,this._root);return e&&e.children.length>0?e.children[0].value:null}siblings(t){const e=lI(t,this._root);return e.length<2?[]:e[e.length-2].children.map(r=>r.value).filter(r=>r!==t)}pathFromRoot(t){return lI(t,this._root).map(e=>e.value)}}function aI(i,t){if(i===t.value)return t;for(const e of t.children){const n=aI(i,e);if(n)return n}return null}function lI(i,t){if(i===t.value)return[t];for(const e of t.children){const n=lI(i,e);if(n.length)return n.unshift(t),n}return[]}class Bc{constructor(t,e){this.value=t,this.children=e}toString(){return`TreeNode(${this.value})`}}function _m(i){const t={};return i&&i.children.forEach(e=>t[e.value.outlet]=e),t}class f3 extends h3{constructor(t,e){super(t),this.snapshot=e,cI(this,t)}toString(){return this.snapshot.toString()}}function p3(i,t){const e=function Nq(i,t){const o=new pM([],{},{},"",{},gn,t,null,i.root,-1,{});return new g3("",new Bc(o,[]))}(i,t),n=new at([new Sy("",{})]),r=new at({}),s=new at({}),o=new at({}),a=new at(""),l=new vm(n,r,o,a,s,gn,t,e.root);return l.snapshot=e.root,new f3(new Bc(l,[]),e)}class vm{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(et(c=>c[Cy]))??ht(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(et(t=>fm(t)))),this._paramMap}get queryParamMap(){return this._queryParamMap||(this._queryParamMap=this.queryParams.pipe(et(t=>fm(t)))),this._queryParamMap}toString(){return this.snapshot?this.snapshot.toString():`Future(${this._futureSnapshot})`}}function m3(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 Bq(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 pM{get title(){return this.data?.[Cy]}constructor(t,e,n,r,s,o,a,l,c,d,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=d,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=fm(this.params)),this._paramMap}get queryParamMap(){return this._queryParamMap||(this._queryParamMap=fm(this.queryParams)),this._queryParamMap}toString(){return`Route(url:'${this.url.map(n=>n.toString()).join("/")}', path:'${this.routeConfig?this.routeConfig.path:""}')`}}class g3 extends h3{constructor(t,e){super(e),this.url=t,cI(this,e)}toString(){return _3(this._root)}}function cI(i,t){t.value._routerState=i,t.children.forEach(e=>cI(i,e))}function _3(i){const t=i.children.length>0?` { ${i.children.map(_3).join(", ")} } `:"";return`${i.value}${t}`}function dI(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 Q7(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||uI(i.parent,t.parent))}function Ry(i,t,e){if(e&&i.shouldReuseRoute(t.value,e.value.snapshot)){const n=e.value;n._futureSnapshot=t.value;const r=function Vq(i,t,e){return t.children.map(n=>{for(const r of e.children)if(i.shouldReuseRoute(n.value,r.value.snapshot))return Ry(i,n,r);return Ry(i,n)})}(i,t,e);return new Bc(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=>Ry(i,a)),o}}const n=function zq(i){return new vm(new at(i.url),new at(i.params),new at(i.queryParams),new at(i.fragment),new at(i.data),i.outlet,i.component,i)}(t.value),r=t.children.map(s=>Ry(i,s));return new Bc(n,r)}}const hI="ngNavigationCancelingError";function v3(i,t){const{redirectTo:e,navigationBehaviorOptions:n}=Dh(t)?{redirectTo:t,navigationBehaviorOptions:void 0}:t,r=y3(!1,0,t);return r.url=e,r.navigationBehaviorOptions=n,r}function y3(i,t,e){const n=new Error("NavigationCancelingError: "+(i||""));return n[hI]=!0,n.cancellationCode=t,e&&(n.url=e),n}function b3(i){return x3(i)&&Dh(i.url)}function x3(i){return i&&i[hI]}class Hq{constructor(){this.outlet=null,this.route=null,this.resolver=null,this.injector=null,this.children=new ky,this.attachRef=null}}let ky=(()=>{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 Hq,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=Re({token:i,factory:i.\u0275fac,providedIn:"root"}),i})();const mM=!1;let w3=(()=>{class i{constructor(){this.activated=null,this._activatedRoute=null,this.name=gn,this.activateEvents=new $e,this.deactivateEvents=new $e,this.attachEvents=new $e,this.detachEvents=new $e,this.parentContexts=Lt(ky),this.location=Lt(jr),this.changeDetector=Lt(si),this.environmentInjector=Lt(eo)}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 pe(4012,mM);return this.activated.instance}get activatedRoute(){if(!this.activated)throw new pe(4012,mM);return this._activatedRoute}get activatedRouteData(){return this._activatedRoute?this._activatedRoute.snapshot.data:{}}detach(){if(!this.activated)throw new pe(4012,mM);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 pe(4013,mM);this._activatedRoute=e;const r=this.location,o=e.snapshot.component,a=this.parentContexts.getOrCreateContext(this.name).children,l=new Gq(e,a,r.injector);if(n&&function $q(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=ve({type:i,selectors:[["router-outlet"]],inputs:{name:"name"},outputs:{activateEvents:"activate",deactivateEvents:"deactivate",attachEvents:"attach",detachEvents:"detach"},exportAs:["outlet"],standalone:!0,features:[xi]}),i})();class Gq{constructor(t,e,n){this.route=t,this.childContexts=e,this.parent=n}get(t,e){return t===vm?this.route:t===ky?this.childContexts:this.parent.get(t,e)}}let fI=(()=>{class i{}return i.\u0275fac=function(e){return new(e||i)},i.\u0275cmp=st({type:i,selectors:[["ng-component"]],standalone:!0,features:[YD],decls:1,vars:0,template:function(e,n){1&e&&Oe(0,"router-outlet")},dependencies:[w3],encapsulation:2}),i})();function M3(i,t){return i.providers&&!i._injector&&(i._injector=Rw(i.providers,t,`Route: ${i.path}`)),i._injector??t}function mI(i){const t=i.children&&i.children.map(mI),e=t?{...i,children:t}:{...i};return!e.component&&!e.loadComponent&&(t||e.loadChildren)&&e.outlet&&e.outlet!==gn&&(e.component=fI),e}function Da(i){return i.outlet||gn}function C3(i,t){const e=i.filter(n=>Da(n)===t);return e.push(...i.filter(n=>Da(n)!==t)),e}function Py(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 Xq{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),dI(this.futureState.root),this.activateChildRoutes(e,n,t)}deactivateChildRoutes(t,e,n){const r=_m(e);t.children.forEach(s=>{const o=s.value.outlet;this.deactivateRoutes(s,r[o],n),delete r[o]}),os(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=_m(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=_m(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=_m(e);t.children.forEach(s=>{this.activateRoutes(s,r[s.value.outlet],n),this.forwardEvent(new Rq(s.value.snapshot))}),t.children.length&&this.forwardEvent(new Tq(t.value.snapshot))}activateRoutes(t,e,n){const r=t.value,s=e?e.value:null;if(dI(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),dI(a.route.value),this.activateChildRoutes(t,null,o.children)}else{const a=Py(r.snapshot),l=a?.get(Ll)??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 S3{constructor(t){this.path=t,this.route=this.path[this.path.length-1]}}class gM{constructor(t,e){this.component=t,this.route=e}}function Kq(i,t,e){const n=i._root;return Oy(n,t?t._root:null,e,[n.value])}function ym(i,t){const e=Symbol(),n=t.get(i,e);return n===e?"function"!=typeof i||function Sr(i){return null!==Hf(i)}(i)?t.get(i):i:n}function Oy(i,t,e,n,r={canDeactivateChecks:[],canActivateChecks:[]}){const s=_m(t);return i.children.forEach(o=>{(function Qq(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 Jq(i,t,e){if("function"==typeof e)return e(i,t);switch(e){case"pathParamsChange":return!Ah(i.url,t.url);case"pathParamsOrQueryParamsChange":return!Ah(i.url,t.url)||!Gl(i.queryParams,t.queryParams);case"always":return!0;case"paramsOrQueryParamsChange":return!uI(i,t)||!Gl(i.queryParams,t.queryParams);default:return!uI(i,t)}}(o,s,s.routeConfig.runGuardsAndResolvers);l?r.canActivateChecks.push(new S3(n)):(s.data=o.data,s._resolvedData=o._resolvedData),Oy(i,t,s.component?a?a.children:null:e,n,r),l&&a&&a.outlet&&a.outlet.isActivated&&r.canDeactivateChecks.push(new gM(a.outlet.component,o))}else o&&Fy(t,a,r),r.canActivateChecks.push(new S3(n)),Oy(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]}),os(s,(o,a)=>Fy(o,e.getContext(a),r)),r}function Fy(i,t,e){const n=_m(i),r=i.value;os(n,(s,o)=>{Fy(s,r.component?t?t.children.getContext(o):null:t,e)}),e.canDeactivateChecks.push(new gM(r.component&&t&&t.outlet&&t.outlet.isActivated?t.outlet.component:null,r))}function Ly(i){return"function"==typeof i}function gI(i){return i instanceof um||"EmptyError"===i?.name}const _M=Symbol("INITIAL_VALUE");function bm(){return Rs(i=>Aa(i.map(t=>t.pipe(Oi(1),Eo(_M)))).pipe(et(t=>{for(const e of t)if(!0!==e){if(e===_M)return _M;if(!1===e||e instanceof su)return e}return!0}),vn(t=>t!==_M),Oi(1)))}function E3(i){return function bE(...i){return n0(i)}(Vi(t=>{if(Dh(t))throw v3(0,t)}),et(t=>!0===t))}const _I={matched:!1,consumedSegments:[],remainingSegments:[],parameters:{},positionalParamSegments:{}};function A3(i,t,e,n,r){const s=vI(i,t,e);return s.matched?function gX(i,t,e,n){const r=t.canMatch;return r&&0!==r.length?ht(r.map(o=>{const a=ym(o,i);return ru(function sX(i){return i&&Ly(i.canMatch)}(a)?a.canMatch(t,e):i.runInContext(()=>a(t,e)))})).pipe(bm(),E3()):ht(!0)}(n=M3(t,n),t,e).pipe(et(o=>!0===o?s:{..._I})):ht(s)}function vI(i,t,e){if(""===t.path)return"full"===t.pathMatch&&(i.hasChildren()||e.length>0)?{..._I}:{matched:!0,consumedSegments:[],remainingSegments:e,parameters:{},positionalParamSegments:{}};const r=(t.matcher||Z7)(e,i,t);if(!r)return{..._I};const s={};os(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 vM(i,t,e,n){if(e.length>0&&function yX(i,t,e){return e.some(n=>yM(i,t,n)&&Da(n)!==gn)}(i,e,n)){const s=new Dn(t,function vX(i,t,e,n){const r={};r[gn]=n,n._sourceSegment=i,n._segmentIndexShift=t.length;for(const s of e)if(""===s.path&&Da(s)!==gn){const o=new Dn([],{});o._sourceSegment=i,o._segmentIndexShift=t.length,r[Da(s)]=o}return r}(i,t,n,new Dn(e,i.children)));return s._sourceSegment=i,s._segmentIndexShift=t.length,{segmentGroup:s,slicedSegments:[]}}if(0===e.length&&function bX(i,t,e){return e.some(n=>yM(i,t,n))}(i,e,n)){const s=new Dn(i.segments,function _X(i,t,e,n,r){const s={};for(const o of n)if(yM(i,e,o)&&!r[Da(o)]){const a=new Dn([],{});a._sourceSegment=i,a._segmentIndexShift=t.length,s[Da(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 Dn(i.segments,i.children);return r._sourceSegment=i,r._segmentIndexShift=t.length,{segmentGroup:r,slicedSegments:e}}function yM(i,t,e){return(!(i.hasChildren()||t.length>0)||"full"!==e.pathMatch)&&""===e.path}function D3(i,t,e,n){return!!(Da(i)===n||n!==gn&&yM(t,e,i))&&("**"===i.path||vI(t,i,e).matched)}function T3(i,t,e){return 0===t.length&&!i.children[e]}const bM=!1;class xM{constructor(t){this.segmentGroup=t||null}}class I3{constructor(t){this.urlTree=t}}function Ny(i){return hm(new xM(i))}function R3(i){return hm(new I3(i))}class CX{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=vM(this.urlTree.root,[],[],this.config).segmentGroup,e=new Dn(t.segments,t.children);return this.expandSegmentGroup(this.injector,this.config,e,gn).pipe(et(s=>this.createUrlTree(uM(s),this.urlTree.queryParams,this.urlTree.fragment))).pipe(Nc(s=>{if(s instanceof I3)return this.allowRedirects=!1,this.match(s.urlTree);throw s instanceof xM?this.noMatchError(s):s}))}match(t){return this.expandSegmentGroup(this.injector,this.config,t.root,gn).pipe(et(r=>this.createUrlTree(uM(r),t.queryParams,t.fragment))).pipe(Nc(r=>{throw r instanceof xM?this.noMatchError(r):r}))}noMatchError(t){return new pe(4002,bM)}createUrlTree(t,e,n){const r=tI(t);return new su(r,e,n)}expandSegmentGroup(t,e,n,r){return 0===n.segments.length&&n.hasChildren()?this.expandChildren(t,e,n).pipe(et(s=>new Dn([],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 Ni(r).pipe(nu(s=>{const o=n.children[s],a=C3(e,s);return this.expandSegmentGroup(t,a,o,s).pipe(et(l=>({segment:l,outlet:s})))}),ZT((s,o)=>(s[o.outlet]=o.segment,s),{}),HB())}expandSegment(t,e,n,r,s,o){return Ni(n).pipe(nu(a=>this.expandSegmentAgainstRoute(t,e,n,a,r,s,o).pipe(Nc(c=>{if(c instanceof xM)return ht(null);throw c}))),tu(a=>!!a),Nc((a,l)=>{if(gI(a))return T3(e,r,s)?ht(new Dn([],{})):Ny(e);throw a}))}expandSegmentAgainstRoute(t,e,n,r,s,o,a){return D3(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):Ny(e):Ny(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("/")?R3(s):this.lineralizeSegments(n,s).pipe(tr(o=>{const a=new Dn(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:d}=vI(e,r,s);if(!a)return Ny(e);const h=this.applyRedirectCommands(l,r.redirectTo,d);return r.redirectTo.startsWith("/")?R3(h):this.lineralizeSegments(r,h).pipe(tr(p=>this.expandSegment(t,e,n,p.concat(c),o,!1)))}matchSegmentAgainstRoute(t,e,n,r,s){return"**"===n.path?(t=M3(n,t),n.loadChildren?(n._loadedRoutes?ht({routes:n._loadedRoutes,injector:n._loadedInjector}):this.configLoader.loadChildren(t,n)).pipe(et(a=>(n._loadedRoutes=a.routes,n._loadedInjector=a.injector,new Dn(r,{})))):ht(new Dn(r,{}))):A3(e,n,r,t).pipe(Rs(({matched:o,consumedSegments:a,remainingSegments:l})=>o?this.getChildConfig(t=n._injector??t,n,r).pipe(tr(d=>{const h=d.injector??t,p=d.routes,{segmentGroup:m,slicedSegments:g}=vM(e,a,l,p),b=new Dn(m.segments,m.children);if(0===g.length&&b.hasChildren())return this.expandChildren(h,p,b).pipe(et(x=>new Dn(a,x)));if(0===p.length&&0===g.length)return ht(new Dn(a,{}));const v=Da(n)===s;return this.expandSegment(h,b,p,g,v?gn:s,!0).pipe(et(M=>new Dn(a.concat(M.segments),M.children)))})):Ny(e)))}getChildConfig(t,e,n){return e.children?ht({routes:e.children,injector:t}):e.loadChildren?void 0!==e._loadedRoutes?ht({routes:e._loadedRoutes,injector:e._loadedInjector}):function mX(i,t,e,n){const r=t.canLoad;return void 0===r||0===r.length?ht(!0):ht(r.map(o=>{const a=ym(o,i);return ru(function tX(i){return i&&Ly(i.canLoad)}(a)?a.canLoad(t,e):i.runInContext(()=>a(t,e)))})).pipe(bm(),E3())}(t,e,n).pipe(tr(r=>r?this.configLoader.loadChildren(t,e).pipe(Vi(s=>{e._loadedRoutes=s.routes,e._loadedInjector=s.injector})):function wX(i){return hm(y3(bM,3))}())):ht({routes:[],injector:t})}lineralizeSegments(t,e){let n=[],r=e.root;for(;;){if(n=n.concat(r.segments),0===r.numberOfChildren)return ht(n);if(r.numberOfChildren>1||!r.children[gn])return t.redirectTo,hm(new pe(4e3,bM));r=r.children[gn]}}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 su(s,this.createQueryParams(e.queryParams,this.urlTree.queryParams),e.fragment)}createQueryParams(t,e){const n={};return os(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 os(e.children,(a,l)=>{o[l]=this.createSegmentGroup(t,a,n,r)}),new Dn(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 pe(4001,bM);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 EX{}class TX{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=vM(this.urlTree.root,[],[],this.config.filter(e=>void 0===e.redirectTo)).segmentGroup;return this.processSegmentGroup(this.injector,this.config,t,gn).pipe(et(e=>{if(null===e)return null;const n=new pM([],Object.freeze({}),Object.freeze({...this.urlTree.queryParams}),this.urlTree.fragment,{},gn,this.rootComponentType,null,this.urlTree.root,-1,{}),r=new Bc(n,e),s=new g3(this.url,r);return this.inheritParamsAndData(s._root),s}))}inheritParamsAndData(t){const e=t.value,n=m3(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 Ni(Object.keys(n.children)).pipe(nu(r=>{const s=n.children[r],o=C3(e,r);return this.processSegmentGroup(t,o,s,r)}),ZT((r,s)=>r&&s?(r.push(...s),r):null),GB(r=>null!==r),rM(null),HB(),et(r=>{if(null===r)return null;const s=P3(r);return function IX(i){i.sort((t,e)=>t.value.outlet===gn?-1:e.value.outlet===gn?1:t.value.outlet.localeCompare(e.value.outlet))}(s),s}))}processSegment(t,e,n,r,s){return Ni(e).pipe(nu(o=>this.processSegmentAgainstRoute(o._injector??t,o,n,r,s)),tu(o=>!!o),Nc(o=>{if(gI(o))return T3(n,r,s)?ht([]):ht(null);throw o}))}processSegmentAgainstRoute(t,e,n,r,s){if(e.redirectTo||!D3(e,n,r,s))return ht(null);let o;if("**"===e.path){const a=r.length>0?YB(r).parameters:{},l=F3(n)+r.length;o=ht({snapshot:new pM(r,a,Object.freeze({...this.urlTree.queryParams}),this.urlTree.fragment,L3(e),Da(e),e.component??e._loadedComponent??null,e,O3(n),l,N3(e)),consumedSegments:[],remainingSegments:[]})}else o=A3(n,e,r,t).pipe(et(({matched:a,consumedSegments:l,remainingSegments:c,parameters:d})=>{if(!a)return null;const h=F3(n)+l.length;return{snapshot:new pM(l,d,Object.freeze({...this.urlTree.queryParams}),this.urlTree.fragment,L3(e),Da(e),e.component??e._loadedComponent??null,e,O3(n),h,N3(e)),consumedSegments:l,remainingSegments:c}}));return o.pipe(Rs(a=>{if(null===a)return ht(null);const{snapshot:l,consumedSegments:c,remainingSegments:d}=a;t=e._injector??t;const h=e._loadedInjector??t,p=function RX(i){return i.children?i.children:i.loadChildren?i._loadedRoutes:[]}(e),{segmentGroup:m,slicedSegments:g}=vM(n,c,d,p.filter(v=>void 0===v.redirectTo));if(0===g.length&&m.hasChildren())return this.processChildren(h,p,m).pipe(et(v=>null===v?null:[new Bc(l,v)]));if(0===p.length&&0===g.length)return ht([new Bc(l,[])]);const b=Da(e)===s;return this.processSegment(h,p,m,g,b?gn:s).pipe(et(v=>null===v?null:[new Bc(l,v)]))}))}}function kX(i){const t=i.value.routeConfig;return t&&""===t.path&&void 0===t.redirectTo}function P3(i){const t=[],e=new Set;for(const n of i){if(!kX(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=P3(n.children);t.push(new Bc(n.value,r))}return t.filter(n=>!e.has(n))}function O3(i){let t=i;for(;t._sourceSegment;)t=t._sourceSegment;return t}function F3(i){let t=i,e=t._segmentIndexShift??0;for(;t._sourceSegment;)t=t._sourceSegment,e+=t._segmentIndexShift??0;return e-1}function L3(i){return i.data||{}}function N3(i){return i.resolve||{}}function B3(i){return"string"==typeof i.title||null===i.title}function yI(i){return Rs(t=>{const e=i(t);return e?Ni(e).pipe(et(()=>t)):ht(t)})}const xm=new me("ROUTES");let bI=(()=>{class i{constructor(){this.componentLoaders=new WeakMap,this.childrenLoaders=new WeakMap,this.compiler=Lt(hN)}loadComponent(e){if(this.componentLoaders.get(e))return this.componentLoaders.get(e);if(e._loadedComponent)return ht(e._loadedComponent);this.onLoadStartListener&&this.onLoadStartListener(e);const n=ru(e.loadComponent()).pipe(et(V3),Vi(s=>{this.onLoadEndListener&&this.onLoadEndListener(e),e._loadedComponent=s}),iu(()=>{this.componentLoaders.delete(e)})),r=new VB(n,()=>new Ie).pipe(KT());return this.componentLoaders.set(e,r),r}loadChildren(e,n){if(this.childrenLoaders.get(n))return this.childrenLoaders.get(n);if(n._loadedRoutes)return ht({routes:n._loadedRoutes,injector:n._loadedInjector});this.onLoadStartListener&&this.onLoadStartListener(n);const s=this.loadModuleFactoryOrRoutes(n.loadChildren).pipe(et(a=>{this.onLoadEndListener&&this.onLoadEndListener(n);let l,c,d=!1;Array.isArray(a)?c=a:(l=a.create(e).injector,c=jB(l.get(xm,[],Ft.Self|Ft.Optional)));return{routes:c.map(mI),injector:l}}),iu(()=>{this.childrenLoaders.delete(n)})),o=new VB(s,()=>new Ie).pipe(KT());return this.childrenLoaders.set(n,o),o}loadModuleFactoryOrRoutes(e){return ru(e()).pipe(et(V3),tr(n=>n instanceof S2||Array.isArray(n)?ht(n):Ni(this.compiler.compileModuleAsync(n))))}}return i.\u0275fac=function(e){return new(e||i)},i.\u0275prov=Re({token:i,factory:i.\u0275fac,providedIn:"root"}),i})();function V3(i){return function VX(i){return i&&"object"==typeof i&&"default"in i}(i)?i.default:i}let MM=(()=>{class i{get hasRequestedNavigation(){return 0!==this.navigationId}constructor(){this.currentNavigation=null,this.lastSuccessfulNavigation=null,this.events=new Ie,this.configLoader=Lt(bI),this.environmentInjector=Lt(eo),this.urlSerializer=Lt(Ey),this.rootContexts=Lt(ky),this.navigationId=0,this.afterPreactivation=()=>ht(void 0),this.rootComponentType=null,this.configLoader.onLoadEndListener=r=>this.events.next(new Aq(r)),this.configLoader.onLoadStartListener=r=>this.events.next(new Eq(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 at({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:Iy,restoredState:null,currentSnapshot:e.routerState.snapshot,targetSnapshot:null,currentRouterState:e.routerState,targetRouterState:null,guards:{canActivateChecks:[],canDeactivateChecks:[]},guardsResult:null}),this.transitions.pipe(vn(n=>0!==n.id),et(n=>({...n,extractedUrl:e.urlHandlingStrategy.extract(n.rawUrl)})),Rs(n=>{let r=!1,s=!1;return ht(n).pipe(Vi(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}}),Rs(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 d="";return this.events.next(new fM(o.id,e.serializeUrl(n.rawUrl),d,0)),e.rawUrlTree=o.rawUrl,o.resolve(null),mo}if(e.urlHandlingStrategy.shouldProcessUrl(o.rawUrl))return z3(o.source)&&(e.browserUrlTree=o.extractedUrl),ht(o).pipe(Rs(d=>{const h=this.transitions?.getValue();return this.events.next(new sI(d.id,this.urlSerializer.serialize(d.extractedUrl),d.source,d.restoredState)),h!==this.transitions?.getValue()?mo:Promise.resolve(d)}),function SX(i,t,e,n){return Rs(r=>function MX(i,t,e,n,r){return new CX(i,t,e,n,r).apply()}(i,t,e,r.extractedUrl,n).pipe(et(s=>({...r,urlAfterRedirects:s}))))}(this.environmentInjector,this.configLoader,this.urlSerializer,e.config),Vi(d=>{this.currentNavigation={...this.currentNavigation,finalUrl:d.urlAfterRedirects},n.urlAfterRedirects=d.urlAfterRedirects}),function OX(i,t,e,n,r){return tr(s=>function DX(i,t,e,n,r,s,o="emptyOnly"){return new TX(i,t,e,n,r,o,s).recognize().pipe(Rs(a=>null===a?function AX(i){return new Tn(t=>t.error(i))}(new EX):ht(a)))}(i,t,e,s.urlAfterRedirects,n.serialize(s.urlAfterRedirects),n,r).pipe(et(o=>({...s,targetSnapshot:o}))))}(this.environmentInjector,this.rootComponentType,e.config,this.urlSerializer,e.paramsInheritanceStrategy),Vi(d=>{if(n.targetSnapshot=d.targetSnapshot,"eager"===e.urlUpdateStrategy){if(!d.extras.skipLocationChange){const p=e.urlHandlingStrategy.merge(d.urlAfterRedirects,d.rawUrl);e.setBrowserUrl(p,d)}e.browserUrlTree=d.urlAfterRedirects}const h=new xq(d.id,this.urlSerializer.serialize(d.extractedUrl),this.urlSerializer.serialize(d.urlAfterRedirects),d.targetSnapshot);this.events.next(h)}));if(l&&e.urlHandlingStrategy.shouldProcessUrl(e.rawUrlTree)){const{id:d,extractedUrl:h,source:p,restoredState:m,extras:g}=o,b=new sI(d,this.urlSerializer.serialize(h),p,m);this.events.next(b);const v=p3(h,this.rootComponentType).snapshot;return ht(n={...o,targetSnapshot:v,urlAfterRedirects:h,extras:{...g,skipLocationChange:!1,replaceUrl:!1}})}{const d="";return this.events.next(new fM(o.id,e.serializeUrl(n.extractedUrl),d,1)),e.rawUrlTree=o.rawUrl,o.resolve(null),mo}}),Vi(o=>{const a=new wq(o.id,this.urlSerializer.serialize(o.extractedUrl),this.urlSerializer.serialize(o.urlAfterRedirects),o.targetSnapshot);this.events.next(a)}),et(o=>n={...o,guards:Kq(o.targetSnapshot,o.currentSnapshot,this.rootContexts)}),function aX(i,t){return tr(e=>{const{targetSnapshot:n,currentSnapshot:r,guards:{canActivateChecks:s,canDeactivateChecks:o}}=e;return 0===o.length&&0===s.length?ht({...e,guardsResult:!0}):function lX(i,t,e,n){return Ni(i).pipe(tr(r=>function pX(i,t,e,n,r){const s=t&&t.routeConfig?t.routeConfig.canDeactivate:null;return s&&0!==s.length?ht(s.map(a=>{const l=Py(t)??r,c=ym(a,l);return ru(function rX(i){return i&&Ly(i.canDeactivate)}(c)?c.canDeactivate(i,t,e,n):l.runInContext(()=>c(i,t,e,n))).pipe(tu())})).pipe(bm()):ht(!0)}(r.component,r.route,e,t,n)),tu(r=>!0!==r,!0))}(o,n,r,i).pipe(tr(a=>a&&function eX(i){return"boolean"==typeof i}(a)?function cX(i,t,e,n){return Ni(t).pipe(nu(r=>wy(function uX(i,t){return null!==i&&t&&t(new Dq(i)),ht(!0)}(r.route.parent,n),function dX(i,t){return null!==i&&t&&t(new Iq(i)),ht(!0)}(r.route,n),function fX(i,t,e){const n=t[t.length-1],s=t.slice(0,t.length-1).reverse().map(o=>function Zq(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=>My(()=>ht(o.guards.map(l=>{const c=Py(o.node)??e,d=ym(l,c);return ru(function iX(i){return i&&Ly(i.canActivateChild)}(d)?d.canActivateChild(n,i):c.runInContext(()=>d(n,i))).pipe(tu())})).pipe(bm())));return ht(s).pipe(bm())}(i,r.path,e),function hX(i,t,e){const n=t.routeConfig?t.routeConfig.canActivate:null;if(!n||0===n.length)return ht(!0);const r=n.map(s=>My(()=>{const o=Py(t)??e,a=ym(s,o);return ru(function nX(i){return i&&Ly(i.canActivate)}(a)?a.canActivate(t,i):o.runInContext(()=>a(t,i))).pipe(tu())}));return ht(r).pipe(bm())}(i,r.route,e))),tu(r=>!0!==r,!0))}(n,s,i,t):ht(a)),et(a=>({...e,guardsResult:a})))})}(this.environmentInjector,o=>this.events.next(o)),Vi(o=>{if(n.guardsResult=o.guardsResult,Dh(o.guardsResult))throw v3(0,o.guardsResult);const a=new Mq(o.id,this.urlSerializer.serialize(o.extractedUrl),this.urlSerializer.serialize(o.urlAfterRedirects),o.targetSnapshot,!!o.guardsResult);this.events.next(a)}),vn(o=>!!o.guardsResult||(e.restoreHistory(o),this.cancelNavigationTransition(o,"",3),!1)),yI(o=>{if(o.guards.canActivateChecks.length)return ht(o).pipe(Vi(a=>{const l=new Cq(a.id,this.urlSerializer.serialize(a.extractedUrl),this.urlSerializer.serialize(a.urlAfterRedirects),a.targetSnapshot);this.events.next(l)}),Rs(a=>{let l=!1;return ht(a).pipe(function FX(i,t){return tr(e=>{const{targetSnapshot:n,guards:{canActivateChecks:r}}=e;if(!r.length)return ht(e);let s=0;return Ni(r).pipe(nu(o=>function LX(i,t,e,n){const r=i.routeConfig,s=i._resolve;return void 0!==r?.title&&!B3(r)&&(s[Cy]=r.title),function NX(i,t,e,n){const r=function BX(i){return[...Object.keys(i),...Object.getOwnPropertySymbols(i)]}(i);if(0===r.length)return ht({});const s={};return Ni(r).pipe(tr(o=>function UX(i,t,e,n){const r=Py(t)??n,s=ym(i,r);return ru(s.resolve?s.resolve(t,e):r.runInContext(()=>s(t,e)))}(i[o],t,e,n).pipe(tu(),Vi(a=>{s[o]=a}))),QT(1),$B(s),Nc(o=>gI(o)?mo:hm(o)))}(s,i,t,n).pipe(et(o=>(i._resolvedData=o,i.data=m3(i,e).resolve,r&&B3(r)&&(i.data[Cy]=r.title),null)))}(o.route,n,i,t)),Vi(()=>s++),QT(1),tr(o=>s===r.length?ht(e):mo))})}(e.paramsInheritanceStrategy,this.environmentInjector),Vi({next:()=>l=!0,complete:()=>{l||(e.restoreHistory(a),this.cancelNavigationTransition(a,"",2))}}))}),Vi(a=>{const l=new Sq(a.id,this.urlSerializer.serialize(a.extractedUrl),this.urlSerializer.serialize(a.urlAfterRedirects),a.targetSnapshot);this.events.next(l)}))}),yI(o=>{const a=l=>{const c=[];l.routeConfig?.loadComponent&&!l.routeConfig._loadedComponent&&c.push(this.configLoader.loadComponent(l.routeConfig).pipe(Vi(d=>{l.component=d}),et(()=>{})));for(const d of l.children)c.push(...a(d));return c};return Aa(a(o.targetSnapshot.root)).pipe(rM(),Oi(1))}),yI(()=>this.afterPreactivation()),et(o=>{const a=function Uq(i,t,e){const n=Ry(i,t._root,e?e._root:void 0);return new f3(n,t)}(e.routeReuseStrategy,o.targetSnapshot,o.currentRouterState);return n={...o,targetRouterState:a}}),Vi(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)=>et(n=>(new Xq(t,n.targetRouterState,n.currentRouterState,e).activate(i),n)))(this.rootContexts,e.routeReuseStrategy,o=>this.events.next(o)),Oi(1),Vi({next:o=>{r=!0,this.lastSuccessfulNavigation=this.currentNavigation,e.navigated=!0,this.events.next(new Th(o.id,this.urlSerializer.serialize(o.extractedUrl),this.urlSerializer.serialize(e.currentUrlTree))),e.titleStrategy?.updateTitle(o.targetRouterState.snapshot),o.resolve(!0)},complete:()=>{r=!0}}),iu(()=>{r||s||this.cancelNavigationTransition(n,"",1),this.currentNavigation?.id===n.id&&(this.currentNavigation=null)}),Nc(o=>{if(s=!0,x3(o)){b3(o)||(e.navigated=!0,e.restoreHistory(n,!0));const a=new hM(n.id,this.urlSerializer.serialize(n.extractedUrl),o.message,o.cancellationCode);if(this.events.next(a),b3(o)){const l=e.urlHandlingStrategy.merge(o.url,e.rawUrlTree),c={skipLocationChange:n.extras.skipLocationChange,replaceUrl:"eager"===e.urlUpdateStrategy||z3(n.source)};e.scheduleNavigation(l,Iy,null,c,{resolve:n.resolve,reject:n.reject,promise:n.promise})}else n.resolve(!1)}else{e.restoreHistory(n,!0);const a=new oI(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 mo}))}))}cancelNavigationTransition(e,n,r){const s=new hM(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=Re({token:i,factory:i.\u0275fac,providedIn:"root"}),i})();function z3(i){return i!==Iy}let H3=(()=>{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===gn);return n}getResolvedTitleForRoute(e){return e.data[Cy]}}return i.\u0275fac=function(e){return new(e||i)},i.\u0275prov=Re({token:i,factory:function(){return Lt(zX)},providedIn:"root"}),i})(),zX=(()=>{class i extends H3{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)(ee(PB))},i.\u0275prov=Re({token:i,factory:i.\u0275fac,providedIn:"root"}),i})(),HX=(()=>{class i{}return i.\u0275fac=function(e){return new(e||i)},i.\u0275prov=Re({token:i,factory:function(){return Lt($X)},providedIn:"root"}),i})();class GX{shouldDetach(t){return!1}store(t,e){}shouldAttach(t){return!1}retrieve(t){return null}shouldReuseRoute(t,e){return t.routeConfig===e.routeConfig}}let $X=(()=>{class i extends GX{}return i.\u0275fac=function(){let t;return function(n){return(t||(t=ri(i)))(n||i)}}(),i.\u0275prov=Re({token:i,factory:i.\u0275fac,providedIn:"root"}),i})();const CM=new me("",{providedIn:"root",factory:()=>({})});let jX=(()=>{class i{}return i.\u0275fac=function(e){return new(e||i)},i.\u0275prov=Re({token:i,factory:function(){return Lt(YX)},providedIn:"root"}),i})(),YX=(()=>{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=Re({token:i,factory:i.\u0275fac,providedIn:"root"}),i})();function qX(i){throw i}function XX(i,t,e){return t.parse("/")}const KX={paths:"exact",fragment:"ignored",matrixParams:"ignored",queryParams:"exact"},ZX={paths:"subset",fragment:"ignored",matrixParams:"ignored",queryParams:"subset"};let Wo=(()=>{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=Lt(R6),this.isNgZoneEnabled=!1,this.options=Lt(CM,{optional:!0})||{},this.errorHandler=this.options.errorHandler||qX,this.malformedUriErrorHandler=this.options.malformedUriErrorHandler||XX,this.navigated=!1,this.lastSuccessfulId=-1,this.urlHandlingStrategy=Lt(jX),this.routeReuseStrategy=Lt(HX),this.urlCreationStrategy=Lt(Lq),this.titleStrategy=Lt(H3),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=jB(Lt(xm,{optional:!0})??[]),this.navigationTransitions=Lt(MM),this.urlSerializer=Lt(Ey),this.location=Lt(py),this.isNgZoneEnabled=Lt(ft)instanceof ft&&ft.isInAngularZone(),this.resetConfig(this.config),this.currentUrlTree=new su,this.rawUrlTree=this.currentUrlTree,this.browserUrlTree=this.currentUrlTree,this.routerState=p3(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),Iy,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(mI),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 d=null;switch(a){case"merge":d={...this.currentUrlTree.queryParams,...s};break;case"preserve":d=this.currentUrlTree.queryParams;break;default:d=s||null}return null!==d&&(d=this.removeEmptyProps(d)),this.urlCreationStrategy.createUrlTree(r,this.routerState,this.currentUrlTree,e,d,c??null)}navigateByUrl(e,n={skipLocationChange:!1}){const r=Dh(e)?e:this.parseUrl(e),s=this.urlHandlingStrategy.merge(r,this.rawUrlTree);return this.scheduleNavigation(s,Iy,null,n)}navigate(e,n={skipLocationChange:!1}){return function QX(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,d;return o?(a=o.resolve,l=o.reject,c=o.promise):c=new Promise((h,p)=>{a=h,l=p}),d="computed"===this.canceledNavigationResolution?r&&r.\u0275routerPageId?r.\u0275routerPageId:(this.browserPageId??0)+1:0,this.navigationTransitions.handleNavigationRequest({targetPageId:d,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=Re({token:i,factory:i.\u0275fac,providedIn:"root"}),i})();class G3{}let tK=(()=>{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(vn(e=>e instanceof Th),nu(()=>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=Rw(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 Ni(r).pipe(vd())}preloadConfig(e,n){return this.preloadingStrategy.preload(n,()=>{let r;r=n.loadChildren&&void 0===n.canLoad?this.loader.loadChildren(e,n):ht(null);const s=r.pipe(tr(o=>null===o?ht(void 0):(n._loadedRoutes=o.routes,n._loadedInjector=o.injector,this.processRoutes(o.injector??e,o.routes))));return n.loadComponent&&!n._loadedComponent?Ni([s,this.loader.loadComponent(n)]).pipe(vd()):s})}}return i.\u0275fac=function(e){return new(e||i)(ee(Wo),ee(hN),ee(eo),ee(G3),ee(bI))},i.\u0275prov=Re({token:i,factory:i.\u0275fac,providedIn:"root"}),i})();const MI=new me("");let $3=(()=>{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 sI?(this.store[this.lastId]=this.viewportScroller.getScrollPosition(),this.lastSource=e.navigationTrigger,this.restoredId=e.restoredState?e.restoredState.navigationId:0):e instanceof Th&&(this.lastId=e.id,this.scheduleScrollEvent(e,this.urlSerializer.parse(e.urlAfterRedirects).fragment))})}consumeScrollEvents(){return this.transitions.events.subscribe(e=>{e instanceof u3&&(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 u3(e,"popstate"===this.lastSource?this.store[this.restoredId]:null,n))})},0)})}ngOnDestroy(){this.routerEventsSubscription?.unsubscribe(),this.scrollEventsSubscription?.unsubscribe()}}return i.\u0275fac=function(e){wo()},i.\u0275prov=Re({token:i,factory:i.\u0275fac}),i})();var jo=(()=>((jo=jo||{})[jo.COMPLETE=0]="COMPLETE",jo[jo.FAILED=1]="FAILED",jo[jo.REDIRECTING=2]="REDIRECTING",jo))();const wm=!1;function ou(i,t){return{\u0275kind:i,\u0275providers:t}}const CI=new me("",{providedIn:"root",factory:()=>!1});function j3(){const i=Lt($i);return t=>{const e=i.get(lm);if(t!==e.components[0])return;const n=i.get(Wo),r=i.get(Y3);1===i.get(SI)&&n.initialNavigation(),i.get(q3,null,Ft.Optional)?.setUpPreloading(),i.get(MI,null,Ft.Optional)?.init(),n.resetRootComponentType(e.componentTypes[0]),r.closed||(r.next(),r.complete(),r.unsubscribe())}}const Y3=new me(wm?"bootstrap done indicator":"",{factory:()=>new Ie}),SI=new me(wm?"initial navigation":"",{providedIn:"root",factory:()=>1});function oK(){let i=[];return i=wm?[{provide:Lp,multi:!0,useFactory:()=>{const t=Lt(Wo);return()=>t.events.subscribe(e=>{console.group?.(`Router Event: ${e.constructor.name}`),console.log(function kq(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?.()})}}]:[],ou(1,i)}const q3=new me(wm?"router preloader":"");function aK(i){return ou(0,[{provide:q3,useExisting:tK},{provide:G3,useExisting:i}])}const By=!1,X3=new me(By?"router duplicate forRoot guard":"ROUTER_FORROOT_GUARD"),lK=[py,{provide:Ey,useClass:JT},Wo,ky,{provide:vm,useFactory:function W3(i){return i.routerState.root},deps:[Wo]},bI,By?{provide:CI,useValue:!0}:[]];function cK(){return new bN("Router",Wo)}let K3=(()=>{class i{constructor(e){}static forRoot(e,n){return{ngModule:i,providers:[lK,By&&n?.enableTracing?oK().\u0275providers:[],{provide:xm,multi:!0,useValue:e},{provide:X3,useFactory:fK,deps:[[Wo,new Ss,new ya]]},{provide:CM,useValue:n||{}},n?.useHash?{provide:Eh,useClass:y9}:{provide:Eh,useClass:GN},{provide:MI,useFactory:()=>{const i=Lt(OY),t=Lt(ft),e=Lt(CM),n=Lt(MM),r=Lt(Ey);return e.scrollOffset&&i.setOffset(e.scrollOffset),new $3(r,n,i,t,e)}},n?.preloadingStrategy?aK(n.preloadingStrategy).\u0275providers:[],{provide:bN,multi:!0,useFactory:cK},n?.initialNavigation?pK(n):[],[{provide:Z3,useFactory:j3},{provide:yN,multi:!0,useExisting:Z3}]]}}static forChild(e){return{ngModule:i,providers:[{provide:xm,multi:!0,useValue:e}]}}}return i.\u0275fac=function(e){return new(e||i)(ee(X3,8))},i.\u0275mod=en({type:i}),i.\u0275inj=Wt({imports:[fI]}),i})();function fK(i){if(By&&i)throw new pe(4007,"The Router was provided more than once. This can happen if 'forRoot' is used outside of the root injector. Lazy loaded modules should use RouterModule.forChild() instead.");return"guarded"}function pK(i){return["disabled"===i.initialNavigation?ou(3,[{provide:Fw,multi:!0,useFactory:()=>{const t=Lt(Wo);return()=>{t.setUpLocationChangeListener()}}},{provide:SI,useValue:2}]).\u0275providers:[],"enabledBlocking"===i.initialNavigation?ou(2,[{provide:SI,useValue:0},{provide:Fw,multi:!0,deps:[$i],useFactory:t=>{const e=t.get(_9,Promise.resolve());return()=>e.then(()=>new Promise(n=>{const r=t.get(Wo),s=t.get(Y3);(function nK(i,t){i.events.pipe(vn(e=>e instanceof Th||e instanceof hM||e instanceof oI||e instanceof fM),et(e=>e instanceof Th||e instanceof fM?jo.COMPLETE:e instanceof hM&&(0===e.code||1===e.code)?jo.REDIRECTING:jo.FAILED),vn(e=>e!==jo.REDIRECTING),Oi(1)).subscribe(()=>{t()})})(r,()=>{n(!0)}),t.get(MM).afterPreactivation=()=>(n(!0),s.closed?ht(void 0):s),r.initialNavigation()}))}}]).\u0275providers:[]]}const Z3=new me(By?"Router Initializer":""),gK=[];let _K=(()=>{class i{}return i.\u0275fac=function(e){return new(e||i)},i.\u0275mod=en({type:i}),i.\u0275inj=Wt({imports:[K3.forRoot(gK),K3]}),i})();function Q3(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 xt(i){return function(){var t=this,e=arguments;return new Promise(function(n,r){var s=i.apply(t,e);function o(l){Q3(s,n,r,o,a,"next",l)}function a(l){Q3(s,n,r,o,a,"throw",l)}o(void 0)})}}function tn(i){return null!=i&&"false"!=`${i}`}function ks(i,t=0){return function vK(i){return!isNaN(parseFloat(i))&&!isNaN(Number(i))}(i)?Number(i):t}function SM(i){return Array.isArray(i)?i:[i]}function mr(i){return null==i?"":"string"==typeof i?i:`${i}px`}function Uc(i){return i instanceof mt?i.nativeElement:i}const yK=["addListener","removeListener"],bK=["addEventListener","removeEventListener"],xK=["on","off"];function Ao(i,t,e,n){if(dn(e)&&(n=e,e=void 0),n)return Ao(i,t,e).pipe(XT(n));const[r,s]=function CK(i){return dn(i.addEventListener)&&dn(i.removeEventListener)}(i)?bK.map(o=>a=>i[o](t,a,e)):function wK(i){return dn(i.addListener)&&dn(i.removeListener)}(i)?yK.map(J3(i,t)):function MK(i){return dn(i.on)&&dn(i.off)}(i)?xK.map(J3(i,t)):[];if(!r&&e_(i))return tr(o=>Ao(o,t,e))(Mr(i));if(!r)throw new TypeError("Invalid event target");return new Tn(o=>{const a=(...l)=>o.next(1s(a)})}function J3(i,t){return e=>n=>i[e](t,n)}class SK extends Qt{constructor(t,e){super()}schedule(t,e=0){return this}}const EM={setInterval(i,t,...e){const{delegate:n}=EM;return n?.setInterval?n.setInterval(i,t,...e):setInterval(i,t,...e)},clearInterval(i){const{delegate:t}=EM;return(t?.clearInterval||clearInterval)(i)},delegate:void 0};class EI extends SK{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 EM.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&&EM.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,Kr(n,this),null!=t&&(this.id=this.recycleAsyncId(e,t,null)),this.delay=null,super.unsubscribe()}}}const Uy={schedule(i){let t=requestAnimationFrame,e=cancelAnimationFrame;const{delegate:n}=Uy;n&&(t=n.requestAnimationFrame,e=n.cancelAnimationFrame);const r=t(s=>{e=void 0,i(s)});return new Qt(()=>e?.(r))},requestAnimationFrame(...i){const{delegate:t}=Uy;return(t?.requestAnimationFrame||requestAnimationFrame)(...i)},cancelAnimationFrame(...i){const{delegate:t}=Uy;return(t?.cancelAnimationFrame||cancelAnimationFrame)(...i)},delegate:void 0},eU={now:()=>(eU.delegate||Date).now(),delegate:void 0};class Vy{constructor(t,e=Vy.now){this.schedulerActionCtor=t,this.now=e}schedule(t,e=0,n){return new this.schedulerActionCtor(this,t).schedule(n,e)}}Vy.now=eU.now;class AI extends Vy{constructor(t,e=Vy.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 DK=new class AK extends AI{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 EK extends EI{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=Uy.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&&(Uy.cancelAnimationFrame(e),t._scheduled=void 0)}});let DI,TK=1;const AM={};function tU(i){return i in AM&&(delete AM[i],!0)}const IK={setImmediate(i){const t=TK++;return AM[t]=!0,DI||(DI=Promise.resolve()),DI.then(()=>tU(t)&&i()),t},clearImmediate(i){tU(i)}},{setImmediate:RK,clearImmediate:kK}=IK,DM={setImmediate(...i){const{delegate:t}=DM;return(t?.setImmediate||RK)(...i)},clearImmediate(i){const{delegate:t}=DM;return(t?.clearImmediate||kK)(i)},delegate:void 0},TI=new class OK extends AI{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 PK extends EI{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=DM.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&&(DM.clearImmediate(e),t._scheduled===e&&(t._scheduled=void 0))}}),zy=new AI(EI),FK=zy;function II(i=0,t,e=FK){let n=-1;return null!=t&&(Bu(t)?e=t:n=t),new Tn(r=>{let s=function NK(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 Hy(i,t=zy){return function LK(i){return ti((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(jn(e,c=>{n=!0,r=c,s||Mr(i(c)).subscribe(s=jn(e,a,l))},()=>{o=!0,(!n||!s||s.closed)&&e.complete()}))})}(()=>II(i,t))}function He(i){return ti((t,e)=>{Mr(i).subscribe(jn(e,()=>e.complete(),ms)),!e.closed&&t.subscribe(e)})}let RI;try{RI=typeof Intl<"u"&&Intl.v8BreakIterator}catch{RI=!1}let Mm,zi=(()=>{class i{constructor(e){this._platformId=e,this.isBrowser=this._platformId?function PY(i){return i===cB}(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&&!RI)&&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)(ee(cT))},i.\u0275prov=Re({token:i,factory:i.\u0275fac,providedIn:"root"}),i})();const nU=["color","button","checkbox","date","datetime-local","email","file","hidden","image","month","number","password","radio","range","reset","search","submit","tel","text","time","url","week"];function iU(){if(Mm)return Mm;if("object"!=typeof document||!document)return Mm=new Set(nU),Mm;let i=document.createElement("input");return Mm=new Set(nU.filter(t=>(i.setAttribute("type",t),i.type===t))),Mm}let Gy,TM,Rh,kI;function Ih(i){return function BK(){if(null==Gy&&typeof window<"u")try{window.addEventListener("test",null,Object.defineProperty({},"passive",{get:()=>Gy=!0}))}finally{Gy=Gy||!1}return Gy}()?i:!!i.capture}function rU(){if(null==Rh){if("object"!=typeof document||!document||"function"!=typeof Element||!Element)return Rh=!1,Rh;if("scrollBehavior"in document.documentElement.style)Rh=!0;else{const i=Element.prototype.scrollTo;Rh=!!i&&!/\{\s*\[native code\]\s*\}/.test(i.toString())}}return Rh}function $y(){if("object"!=typeof document||!document)return 0;if(null==TM){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),TM=0,0===i.scrollLeft&&(i.scrollLeft=1,TM=0===i.scrollLeft?1:2),i.remove()}return TM}function IM(){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 au(i){return i.composedPath?i.composedPath()[0]:i.target}function PI(){return typeof __karma__<"u"&&!!__karma__||typeof jasmine<"u"&&!!jasmine||typeof jest<"u"&&!!jest||typeof Mocha<"u"&&!!Mocha}const zK=new me("cdk-dir-doc",{providedIn:"root",factory:function HK(){return Lt(qt)}}),GK=/^(ar|ckb|dv|he|iw|fa|nqo|ps|sd|ug|ur|yi|.*[-_](Adlm|Arab|Hebr|Nkoo|Rohg|Thaa))(?!.*[-_](Latn|Cyrl)($|-|_))($|-|_)/i;let Ta=(()=>{class i{constructor(e){this.value="ltr",this.change=new $e,e&&(this.value=function $K(i){const t=i?.toLowerCase()||"";return"auto"===t&&typeof navigator<"u"&&navigator?.language?GK.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)(ee(zK,8))},i.\u0275prov=Re({token:i,factory:i.\u0275fac,providedIn:"root"}),i})(),Wy=(()=>{class i{}return i.\u0275fac=function(e){return new(e||i)},i.\u0275mod=en({type:i}),i.\u0275inj=Wt({}),i})();const WK=["contentWrapper"],jK=["*"],YK=new me("VIRTUAL_SCROLL_STRATEGY");let jy=(()=>{class i{constructor(e,n,r){this._ngZone=e,this._platform=n,this._scrolled=new Ie,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 Tn(n=>{this._globalSubscription||this._addGlobalListener();const r=e>0?this._scrolled.pipe(Hy(e)).subscribe(n):this._scrolled.subscribe(n);return this._scrolledCount++,()=>{r.unsubscribe(),this._scrolledCount--,this._scrolledCount||this._removeGlobalListener()}}):ht()}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(vn(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=Uc(n),s=e.getElementRef().nativeElement;do{if(r==s)return!0}while(r=r.parentElement);return!1}_addGlobalListener(){this._globalSubscription=this._ngZone.runOutsideAngular(()=>Ao(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)(ee(ft),ee(zi),ee(qt,8))},i.\u0275prov=Re({token:i,factory:i.\u0275fac,providedIn:"root"}),i})(),sU=(()=>{class i{constructor(e,n,r,s){this.elementRef=e,this.scrollDispatcher=n,this.ngZone=r,this.dir=s,this._destroyed=new Ie,this._elementScrolled=new Tn(o=>this.ngZone.runOutsideAngular(()=>Ao(this.elementRef.nativeElement,"scroll").pipe(He(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!=$y()?(null!=e.left&&(e.right=n.scrollWidth-n.clientWidth-e.left),2==$y()?e.left=e.right:1==$y()&&(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;rU()?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==$y()?e==n?s.scrollWidth-s.clientWidth-s.scrollLeft:s.scrollLeft:o&&1==$y()?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)(E(mt),E(jy),E(ft),E(Ta,8))},i.\u0275dir=ve({type:i,selectors:[["","cdk-scrollable",""],["","cdkScrollable",""]],standalone:!0}),i})(),RM=(()=>{class i{constructor(e,n,r){this._platform=e,this._change=new Ie,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(Hy(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)(ee(zi),ee(ft),ee(qt,8))},i.\u0275prov=Re({token:i,factory:i.\u0275fac,providedIn:"root"}),i})();const oU=new me("VIRTUAL_SCROLLABLE");let KK=(()=>{class i extends sU{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)(E(mt),E(jy),E(ft),E(Ta,8))},i.\u0275dir=ve({type:i,features:[lt]}),i})();const QK=typeof requestAnimationFrame<"u"?DK:TI;let JK=(()=>{class i extends KK{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=tn(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=Lt(zi),this._detachedSubject=new Ie,this._renderedRangeSubject=new Ie,this._orientation="vertical",this._appendOnly=!1,this.scrolledIndexChange=new Tn(d=>this._scrollStrategy.scrolledIndexChange.subscribe(h=>Promise.resolve().then(()=>this.ngZone.run(()=>d.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=Qt.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(Eo(null),Hy(0,QK)).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(He(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 ZK(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)(E(mt),E(si),E(ft),E(YK,8),E(Ta,8),E(jy),E(RM),E(oU,8))},i.\u0275cmp=st({type:i,selectors:[["cdk-virtual-scroll-viewport"]],viewQuery:function(e,n){if(1&e&&Zn(WK,7),2&e){let r;Tt(r=It())&&(n._contentWrapper=r.first)}},hostAttrs:[1,"cdk-virtual-scroll-viewport"],hostVars:4,hostBindings:function(e,n){2&e&&ln("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:sU,useFactory:(t,e)=>t||e,deps:[[new Ss,new yo(oU)],i]}]),lt,YD],ngContentSelectors:jK,decls:4,vars:4,consts:[[1,"cdk-virtual-scroll-content-wrapper"],["contentWrapper",""],[1,"cdk-virtual-scroll-spacer"]],template:function(e,n){1&e&&(rr(),$(0,"div",0,1),Yt(2),j(),Oe(3,"div",2)),2&e&&(V(3),$o("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})(),Yy=(()=>{class i{}return i.\u0275fac=function(e){return new(e||i)},i.\u0275mod=en({type:i}),i.\u0275inj=Wt({}),i})(),aU=(()=>{class i{}return i.\u0275fac=function(e){return new(e||i)},i.\u0275mod=en({type:i}),i.\u0275inj=Wt({imports:[Wy,Yy,JK,Wy,Yy]}),i})();class OI{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 kh extends OI{constructor(t,e,n,r,s){super(),this.component=t,this.viewContainerRef=e,this.injector=n,this.componentFactoryResolver=r,this.projectableNodes=s}}class Cm extends OI{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 eZ extends OI{constructor(t){super(),this.element=t instanceof mt?t.nativeElement:t}}class kM{constructor(){this._isDisposed=!1,this.attachDomPortal=null}hasAttached(){return!!this._attachedPortal}attach(t){return t instanceof kh?(this._attachedPortal=t,this.attachComponentPortal(t)):t instanceof Cm?(this._attachedPortal=t,this.attachTemplatePortal(t)):this.attachDomPortal&&t instanceof eZ?(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 tZ extends kM{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||$i.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 Sm=(()=>{class i extends kM{constructor(e,n,r){super(),this._componentFactoryResolver=e,this._viewContainerRef=n,this._isInitialized=!1,this.attached=new $e,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)(E(Ll),E(jr),E(qt))},i.\u0275dir=ve({type:i,selectors:[["","cdkPortalOutlet",""]],inputs:{portal:["cdkPortalOutlet","portal"]},outputs:{attached:"attached"},exportAs:["cdkPortalOutlet"],features:[lt]}),i})(),Ph=(()=>{class i{}return i.\u0275fac=function(e){return new(e||i)},i.\u0275mod=en({type:i}),i.\u0275inj=Wt({}),i})();function Yo(i,...t){return t.length?t.some(e=>i[e]):i.altKey||i.shiftKey||i.ctrlKey||i.metaKey}const lU=rU();class mZ{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=mr(-this._previousScrollPosition.left),t.style.top=mr(-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"),lU&&(n.scrollBehavior=r.scrollBehavior="auto"),window.scroll(this._previousScrollPosition.left,this._previousScrollPosition.top),lU&&(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 gZ{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(vn(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 cU{enable(){}disable(){}attach(){}}function LI(i,t){return t.some(e=>i.bottome.bottom||i.righte.right)}function dU(i,t){return t.some(e=>i.tope.bottom||i.lefte.right)}class _Z{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();LI(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 vZ=(()=>{class i{constructor(e,n,r,s){this._scrollDispatcher=e,this._viewportRuler=n,this._ngZone=r,this.noop=()=>new cU,this.close=o=>new gZ(this._scrollDispatcher,this._ngZone,this._viewportRuler,o),this.block=()=>new mZ(this._viewportRuler,this._document),this.reposition=o=>new _Z(this._scrollDispatcher,this._viewportRuler,this._ngZone,o),this._document=s}}return i.\u0275fac=function(e){return new(e||i)(ee(jy),ee(RM),ee(ft),ee(qt))},i.\u0275prov=Re({token:i,factory:i.\u0275fac,providedIn:"root"}),i})();class Im{constructor(t){if(this.scrollStrategy=new cU,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 yZ{constructor(t,e){this.connectionPair=t,this.scrollableViewProperties=e}}let uU=(()=>{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)(ee(qt))},i.\u0275prov=Re({token:i,factory:i.\u0275fac,providedIn:"root"}),i})(),bZ=(()=>{class i extends uU{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)(ee(qt),ee(ft,8))},i.\u0275prov=Re({token:i,factory:i.\u0275fac,providedIn:"root"}),i})(),xZ=(()=>{class i extends uU{constructor(e,n,r){super(e),this._platform=n,this._ngZone=r,this._cursorStyleIsSet=!1,this._pointerDownListener=s=>{this._pointerDownEventTarget=au(s)},this._clickListener=s=>{const o=au(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 d=l[c];if(d._outsidePointerEvents.observers.length<1||!d.hasAttached())continue;if(d.overlayElement.contains(o)||d.overlayElement.contains(a))break;const h=d._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)(ee(qt),ee(zi),ee(ft,8))},i.\u0275prov=Re({token:i,factory:i.\u0275fac,providedIn:"root"}),i})(),FM=(()=>{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||PI()){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 Ie,this._outsidePointerEvents=new Ie,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(Oi(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=mr(this._config.width),t.height=mr(this._config.height),t.minWidth=mr(this._config.minWidth),t.minHeight=mr(this._config.minHeight),t.maxWidth=mr(this._config.maxWidth),t.maxHeight=mr(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=SM(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(He(Cr(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 hU="cdk-overlay-connected-position-bounding-box",wZ=/([A-Za-z%]+)$/;class MZ{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 Ie,this._resizeSubscription=Qt.EMPTY,this._offsetX=0,this._offsetY=0,this._appliedPanelClasses=[],this.positionChanges=this._positionChanges,this.setOrigin(t)}attach(t){this._validatePositions(),t.hostElement.classList.add(hU),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),d=this._getOverlayFit(c,e,n,a);if(d.isCompletelyWithinViewport)return this._isPushed=!1,void this._applyPosition(a,l);this._canFitWithFlexibleDimensions(d,c,n)?s.push({position:a,origin:l,overlayRect:e,boundingBoxRect:this._calculateBoundingBoxRect(l,a)}):(!o||o.overlayFit.visibleAreal&&(l=d,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&&Oh(this._boundingBox.style,{top:"",left:"",right:"",bottom:"",height:"",width:"",alignItems:"",justifyContent:""}),this._pane&&this._resetOverlayElementStyles(),this._overlayRef&&this._overlayRef.hostElement.classList.remove(hU),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=pU(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=fU(this._overlayRef.getConfig().minHeight),a=fU(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=pU(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 d=0,h=0;return d=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,d=t.x-this._viewportMargin;else if("start"===e.overlayX&&!r||"end"===e.overlayX&&r)h=t.x,d=n.right-t.x;else{const m=Math.min(n.right-t.x+n.left,t.x),g=this._lastBoundingBoxSize.width;d=2*m,h=t.x-m,d>g&&!this._isInitialRender&&!this._growAfterOpen&&(h=t.x-g/2)}return{top:o,left:h,bottom:a,right:p,width:d,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=mr(n.height),r.top=mr(n.top),r.bottom=mr(n.bottom),r.width=mr(n.width),r.left=mr(n.left),r.right=mr(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=mr(s)),o&&(r.maxWidth=mr(o))}this._lastBoundingBoxSize=n,Oh(this._boundingBox.style,r)}_resetBoundingBoxStyles(){Oh(this._boundingBox.style,{top:"0",left:"0",right:"0",bottom:"0",height:"",width:"",alignItems:"",justifyContent:""})}_resetOverlayElementStyles(){Oh(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 d=this._viewportRuler.getViewportScrollPosition();Oh(n,this._getExactOverlayY(e,t,d)),Oh(n,this._getExactOverlayX(e,t,d))}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=mr(o.maxHeight):s&&(n.maxHeight="")),o.maxWidth&&(r?n.maxWidth=mr(o.maxWidth):s&&(n.maxWidth="")),Oh(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=mr(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=mr(s.x),r}_getScrollVisibility(){const t=this._getOriginRect(),e=this._pane.getBoundingClientRect(),n=this._scrollables.map(r=>r.getElementRef().nativeElement.getBoundingClientRect());return{isOriginClipped:dU(t,n),isOriginOutsideView:LI(t,n),isOverlayClipped:dU(e,n),isOverlayOutsideView:LI(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&&SM(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 mt)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 Oh(i,t){for(let e in t)t.hasOwnProperty(e)&&(i[e]=t[e]);return i}function fU(i){if("number"!=typeof i&&null!=i){const[t,e]=i.split(wZ);return e&&"px"!==e?null:parseFloat(t)}return i||null}function pU(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 mU="cdk-global-overlay-wrapper";class gU{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(mU),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),d=this._xPosition,h=this._xOffset,p="rtl"===this._overlayRef.getConfig().direction;let m="",g="",b="";l?b="flex-start":"center"===d?(b="center",p?g=h:m=h):p?"left"===d||"end"===d?(b="flex-end",m=h):("right"===d||"start"===d)&&(b="flex-start",g=h):"left"===d||"start"===d?(b="flex-start",m=h):("right"===d||"end"===d)&&(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(mU),n.justifyContent=n.alignItems=t.marginTop=t.marginBottom=t.marginLeft=t.marginRight=t.position="",this._overlayRef=null,this._isDisposed=!0}}let CZ=(()=>{class i{constructor(e,n,r,s){this._viewportRuler=e,this._document=n,this._platform=r,this._overlayContainer=s}global(){return new gU}flexibleConnectedTo(e){return new MZ(e,this._viewportRuler,this._document,this._platform,this._overlayContainer)}}return i.\u0275fac=function(e){return new(e||i)(ee(RM),ee(qt),ee(zi),ee(FM))},i.\u0275prov=Re({token:i,factory:i.\u0275fac,providedIn:"root"}),i})(),SZ=0,as=(()=>{class i{constructor(e,n,r,s,o,a,l,c,d,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=d,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 Im(e);return o.direction=o.direction||this._directionality.value,new Xy(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-"+SZ++,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(lm)),new tZ(e,this._componentFactoryResolver,this._appRef,this._injector,this._document)}}return i.\u0275fac=function(e){return new(e||i)(ee(vZ),ee(FM),ee(Ll),ee(CZ),ee(bZ),ee($i),ee(ft),ee(qt),ee(Ta),ee(py),ee(xZ),ee(kr,8))},i.\u0275prov=Re({token:i,factory:i.\u0275fac,providedIn:"root"}),i})();const EZ=[{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"}],_U=new me("cdk-connected-overlay-scroll-strategy");let NI=(()=>{class i{constructor(e){this.elementRef=e}}return i.\u0275fac=function(e){return new(e||i)(E(mt))},i.\u0275dir=ve({type:i,selectors:[["","cdk-overlay-origin",""],["","overlay-origin",""],["","cdkOverlayOrigin",""]],exportAs:["cdkOverlayOrigin"],standalone:!0}),i})(),vU=(()=>{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=tn(e)}get lockPosition(){return this._lockPosition}set lockPosition(e){this._lockPosition=tn(e)}get flexibleDimensions(){return this._flexibleDimensions}set flexibleDimensions(e){this._flexibleDimensions=tn(e)}get growAfterOpen(){return this._growAfterOpen}set growAfterOpen(e){this._growAfterOpen=tn(e)}get push(){return this._push}set push(e){this._push=tn(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=Qt.EMPTY,this._attachSubscription=Qt.EMPTY,this._detachSubscription=Qt.EMPTY,this._positionSubscription=Qt.EMPTY,this.viewportMargin=0,this.open=!1,this.disableClose=!1,this.backdropClick=new $e,this.positionChange=new $e,this.attach=new $e,this.detach=new $e,this.overlayKeydown=new $e,this.overlayOutsideClick=new $e,this._templatePortal=new Cm(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=EZ);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&&!Yo(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 Im({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 NI?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(GB(()=>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)(E(as),E(Co),E(jr),E(_U),E(Ta,8))},i.\u0275dir=ve({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:[xi]}),i})();const DZ={provide:_U,deps:[as],useFactory:function AZ(i){return()=>i.scrollStrategies.reposition()}};let Rm=(()=>{class i{}return i.\u0275fac=function(e){return new(e||i)},i.\u0275mod=en({type:i}),i.\u0275inj=Wt({providers:[as,DZ],imports:[Wy,Ph,aU,aU]}),i})();function Vc(i,t=zy){return ti((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,d=t.now();if(d{s=c,o=t.now(),r||(r=t.schedule(l,i),n.add(r))},()=>{a(),n.complete()},void 0,()=>{s=r=null}))})}function yU(i){return vn((t,e)=>i<=e)}function zc(i,t=za){return i=i??TZ,ti((e,n)=>{let r,s=!0;e.subscribe(jn(n,o=>{const a=t(o);(s||!i(r,a))&&(s=!1,r=a,n.next(o))}))})}function TZ(i,t){return i===t}let bU=(()=>{class i{create(e){return typeof MutationObserver>"u"?null:new MutationObserver(e)}}return i.\u0275fac=function(e){return new(e||i)},i.\u0275prov=Re({token:i,factory:i.\u0275fac,providedIn:"root"}),i})(),IZ=(()=>{class i{constructor(e){this._mutationObserverFactory=e,this._observedElements=new Map}ngOnDestroy(){this._observedElements.forEach((e,n)=>this._cleanupObserver(n))}observe(e){const n=Uc(e);return new Tn(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 Ie,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)(ee(bU))},i.\u0275prov=Re({token:i,factory:i.\u0275fac,providedIn:"root"}),i})(),xU=(()=>{class i{get disabled(){return this._disabled}set disabled(e){this._disabled=tn(e),this._disabled?this._unsubscribe():this._subscribe()}get debounce(){return this._debounce}set debounce(e){this._debounce=ks(e),this._subscribe()}constructor(e,n,r){this._contentObserver=e,this._elementRef=n,this._ngZone=r,this.event=new $e,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(Vc(this.debounce)):e).subscribe(this.event)})}_unsubscribe(){this._currentSubscription?.unsubscribe()}}return i.\u0275fac=function(e){return new(e||i)(E(IZ),E(mt),E(ft))},i.\u0275dir=ve({type:i,selectors:[["","cdkObserveContent",""]],inputs:{disabled:["cdkObserveContentDisabled","disabled"],debounce:"debounce"},outputs:{event:"cdkObserveContent"},exportAs:["cdkObserveContent"]}),i})(),BI=(()=>{class i{}return i.\u0275fac=function(e){return new(e||i)},i.\u0275mod=en({type:i}),i.\u0275inj=Wt({providers:[bU]}),i})();const wU=new Set;let km,RZ=(()=>{class i{constructor(e){this._platform=e,this._matchMedia=this._platform.isBrowser&&window.matchMedia?window.matchMedia.bind(window):PZ}matchMedia(e){return(this._platform.WEBKIT||this._platform.BLINK)&&function kZ(i){if(!wU.has(i))try{km||(km=document.createElement("style"),km.setAttribute("type","text/css"),document.head.appendChild(km)),km.sheet&&(km.sheet.insertRule(`@media ${i} {body{ }}`,0),wU.add(i))}catch(t){console.error(t)}}(e),this._matchMedia(e)}}return i.\u0275fac=function(e){return new(e||i)(ee(zi))},i.\u0275prov=Re({token:i,factory:i.\u0275fac,providedIn:"root"}),i})();function PZ(i){return{matches:"all"===i||""===i,media:i,addListener:()=>{},removeListener:()=>{}}}let UI=(()=>{class i{constructor(e,n){this._mediaMatcher=e,this._zone=n,this._queries=new Map,this._destroySubject=new Ie}ngOnDestroy(){this._destroySubject.next(),this._destroySubject.complete()}isMatched(e){return MU(SM(e)).some(r=>this._registerQuery(r).mql.matches)}observe(e){let s=Aa(MU(SM(e)).map(o=>this._registerQuery(o).observable));return s=wy(s.pipe(Oi(1)),s.pipe(yU(1),Vc(0))),s.pipe(et(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 Tn(o=>{const a=l=>this._zone.run(()=>o.next(l));return n.addListener(a),()=>{n.removeListener(a)}}).pipe(Eo(n),et(({matches:o})=>({query:e,matches:o})),He(this._destroySubject)),mql:n};return this._queries.set(e,s),s}}return i.\u0275fac=function(e){return new(e||i)(ee(RZ),ee(ft))},i.\u0275prov=Re({token:i,factory:i.\u0275fac,providedIn:"root"}),i})();function MU(i){return i.map(t=>t.split(",")).reduce((t,e)=>t.concat(e)).map(t=>t.trim())}function LM(i,t){return(i.getAttribute(t)||"").match(/\S+/g)||[]}const SU="cdk-describedby-message",NM="cdk-describedby-host";let VI=0,NZ=(()=>{class i{constructor(e,n){this._platform=n,this._messageRegistry=new Map,this._messagesContainer=null,this._id=""+VI++,this._document=e,this._id=Lt(am)+"-"+VI++}describe(e,n,r){if(!this._canBeDescribed(e,n))return;const s=zI(n,r);"string"!=typeof n?(EU(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=zI(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(`[${NM}="${this._id}"]`);for(let n=0;n0!=r.indexOf(SU));e.setAttribute("aria-describedby",n.join(" "))}_addMessageReference(e,n){const r=this._messageRegistry.get(n);(function FZ(i,t,e){const n=LM(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(NM,this._id),r.referenceCount++}_removeMessageReference(e,n){const r=this._messageRegistry.get(n);r.referenceCount--,function LZ(i,t,e){const r=LM(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(NM)}_isElementDescribedByMessage(e,n){const r=LM(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)(ee(qt),ee(zi))},i.\u0275prov=Re({token:i,factory:i.\u0275fac,providedIn:"root"}),i})();function zI(i,t){return"string"==typeof i?`${t||""}/${i}`:i}function EU(i,t){i.id||(i.id=`${SU}-${t}-${VI++}`)}class AU{constructor(t){this._items=t,this._activeItemIndex=-1,this._activeItem=null,this._wrap=!1,this._letterKeyStream=new Ie,this._typeaheadSubscription=Qt.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 Ie,this.change=new Ie,t instanceof rm&&(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(Vi(e=>this._pressedLetters.push(e)),Vc(t),vn(()=>this._pressedLetters.length>0),et(()=>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 rm?this._items.toArray():this._items}}class BZ extends AU{setActiveItem(t){this.activeItem&&this.activeItem.setInactiveStyles(),super.setActiveItem(t),this.activeItem&&this.activeItem.setActiveStyles()}}class DU extends AU{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 BM=(()=>{class i{constructor(e){this._platform=e}isDisabled(e){return e.hasAttribute("disabled")}isVisible(e){return function VZ(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 UZ(i){try{return i.frameElement}catch{return null}}(function qZ(i){return i.ownerDocument&&i.ownerDocument.defaultView||window}(e));if(n&&(-1===IU(n)||!this.isVisible(n)))return!1;let r=e.nodeName.toLowerCase(),s=IU(e);return e.hasAttribute("contenteditable")?-1!==s:!("iframe"===r||"object"===r||this._platform.WEBKIT&&this._platform.IOS&&!function jZ(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 YZ(i){return!function HZ(i){return function $Z(i){return"input"==i.nodeName.toLowerCase()}(i)&&"hidden"==i.type}(i)&&(function zZ(i){let t=i.nodeName.toLowerCase();return"input"===t||"select"===t||"button"===t||"textarea"===t}(i)||function GZ(i){return function WZ(i){return"a"==i.nodeName.toLowerCase()}(i)&&i.hasAttribute("href")}(i)||i.hasAttribute("contenteditable")||TU(i))}(e)&&!this.isDisabled(e)&&(n?.ignoreVisibility||this.isVisible(e))}}return i.\u0275fac=function(e){return new(e||i)(ee(zi))},i.\u0275prov=Re({token:i,factory:i.\u0275fac,providedIn:"root"}),i})();function TU(i){if(!i.hasAttribute("tabindex")||void 0===i.tabIndex)return!1;let t=i.getAttribute("tabindex");return!(!t||isNaN(parseInt(t,10)))}function IU(i){if(!TU(i))return null;const t=parseInt(i.getAttribute("tabindex")||"",10);return isNaN(t)?-1:t}class XZ{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(Oi(1)).subscribe(t)}}let HI=(()=>{class i{constructor(e,n,r){this._checker=e,this._ngZone=n,this._document=r}create(e,n=!1){return new XZ(e,this._checker,this._ngZone,this._document,n)}}return i.\u0275fac=function(e){return new(e||i)(ee(BM),ee(ft),ee(qt))},i.\u0275prov=Re({token:i,factory:i.\u0275fac,providedIn:"root"}),i})();function GI(i){return 0===i.buttons||0===i.offsetX&&0===i.offsetY}function $I(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 KZ=new me("cdk-input-modality-detector-options"),ZZ={ignoreKeys:[18,17,224,91,16]},Pm=Ih({passive:!0,capture:!0});let QZ=(()=>{class i{get mostRecentModality(){return this._modality.value}constructor(e,n,r,s){this._platform=e,this._mostRecentTarget=null,this._modality=new at(null),this._lastTouchMs=0,this._onKeydown=o=>{this._options?.ignoreKeys?.some(a=>a===o.keyCode)||(this._modality.next("keyboard"),this._mostRecentTarget=au(o))},this._onMousedown=o=>{Date.now()-this._lastTouchMs<650||(this._modality.next(GI(o)?"keyboard":"mouse"),this._mostRecentTarget=au(o))},this._onTouchstart=o=>{$I(o)?this._modality.next("keyboard"):(this._lastTouchMs=Date.now(),this._modality.next("touch"),this._mostRecentTarget=au(o))},this._options={...ZZ,...s},this.modalityDetected=this._modality.pipe(yU(1)),this.modalityChanged=this.modalityDetected.pipe(zc()),e.isBrowser&&n.runOutsideAngular(()=>{r.addEventListener("keydown",this._onKeydown,Pm),r.addEventListener("mousedown",this._onMousedown,Pm),r.addEventListener("touchstart",this._onTouchstart,Pm)})}ngOnDestroy(){this._modality.complete(),this._platform.isBrowser&&(document.removeEventListener("keydown",this._onKeydown,Pm),document.removeEventListener("mousedown",this._onMousedown,Pm),document.removeEventListener("touchstart",this._onTouchstart,Pm))}}return i.\u0275fac=function(e){return new(e||i)(ee(zi),ee(ft),ee(qt),ee(KZ,8))},i.\u0275prov=Re({token:i,factory:i.\u0275fac,providedIn:"root"}),i})();const JZ=new me("liveAnnouncerElement",{providedIn:"root",factory:function eQ(){return null}}),tQ=new me("LIVE_ANNOUNCER_DEFAULT_OPTIONS");let nQ=0,WI=(()=>{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 Ie,this._rootNodeFocusAndBlurListener=a=>{for(let c=au(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=Uc(e);if(!this._platform.isBrowser||1!==r.nodeType)return ht(null);const s=function VK(i){if(function UK(){if(null==kI){const i=typeof document<"u"?document.head:null;kI=!(!i||!i.createShadowRoot&&!i.attachShadow)}return kI}()){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 Ie,rootNode:s};return this._elementInfo.set(r,a),this._registerGlobalListeners(a),a.subject}stopMonitoring(e){const n=Uc(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=Uc(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=au(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,UM),n.addEventListener("blur",this._rootNodeFocusAndBlurListener,UM)}),this._rootNodeFocusListenerCount.set(n,r+1),1==++this._monitoredElementCount&&(this._ngZone.runOutsideAngular(()=>{this._getWindow().addEventListener("focus",this._windowFocusListener)}),this._inputModalityDetector.modalityDetected.pipe(He(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,UM),n.removeEventListener("blur",this._rootNodeFocusAndBlurListener,UM),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=Lt(UI).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(jI,kU,PU),this._hasCheckedHighContrastMode=!0;const n=this.getHighContrastMode();1===n?e.add(jI,kU):2===n&&e.add(jI,PU)}}}return i.\u0275fac=function(e){return new(e||i)(ee(zi),ee(qt))},i.\u0275prov=Re({token:i,factory:i.\u0275fac,providedIn:"root"}),i})(),FU=(()=>{class i{constructor(e){e._applyBodyHighContrastModeCssClasses()}}return i.\u0275fac=function(e){return new(e||i)(ee(OU))},i.\u0275mod=en({type:i}),i.\u0275inj=Wt({imports:[BI]}),i})();function rQ(i,t){}class VM{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 LU=(()=>{class i extends kM{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=d=>{this._portalOutlet.hasAttached();const h=this._portalOutlet.attachDomPortal(d);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=IM(),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=IM();return e===n||e.contains(n)}_initializeFocusTrap(){this._focusTrap=this._focusTrapFactory.create(this._elementRef.nativeElement),this._document&&(this._elementFocusedBeforeDialogWasOpened=IM())}_handleBackdropClicks(){this._overlayRef.backdropClick().subscribe(()=>{this._config.disableClose&&this._recaptureFocus()})}}return i.\u0275fac=function(e){return new(e||i)(E(mt),E(HI),E(qt,8),E(VM),E(BM),E(ft),E(Xy),E(Hc))},i.\u0275cmp=st({type:i,selectors:[["cdk-dialog-container"]],viewQuery:function(e,n){if(1&e&&Zn(Sm,7),2&e){let r;Tt(r=It())&&(n._portalOutlet=r.first)}},hostAttrs:["tabindex","-1",1,"cdk-dialog-container"],hostVars:6,hostBindings:function(e,n){2&e&&Dt("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:[lt],decls:1,vars:0,consts:[["cdkPortalOutlet",""]],template:function(e,n){1&e&&fe(0,rQ,0,0,"ng-template",0)},dependencies:[Sm],styles:[".cdk-dialog-container{display:block;width:100%;height:100%;min-height:inherit;max-height:inherit}"],encapsulation:2}),i})();class YI{constructor(t,e){this.overlayRef=t,this.config=e,this.closed=new Ie,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&&!Yo(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 NU=new me("DialogScrollStrategy"),sQ=new me("DialogData"),oQ=new me("DefaultDialogConfig"),lQ={provide:NU,deps:[as],useFactory:function aQ(i){return()=>i.scrollStrategies.block()}};let cQ=0,BU=(()=>{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 Ie,this._afterOpenedAtThisLevel=new Ie,this._ariaHiddenElements=new Map,this.afterAllClosed=My(()=>this.openDialogs.length?this._getAfterAllClosed():this._getAfterAllClosed().pipe(Eo(void 0))),this._scrollStrategy=a}open(e,n){(n={...this._defaultOptions||new VM,...n}).id=n.id||"cdk-dialog-"+cQ++,n.id&&this.getDialogById(n.id);const s=this._getOverlayConfig(n),o=this._overlay.create(s),a=new YI(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(){qI(this.openDialogs,e=>e.close())}getDialogById(e){return this.openDialogs.find(n=>n.id===e)}ngOnDestroy(){qI(this._openDialogsAtThisLevel,e=>{!1===e.config.closeOnDestroy&&this._removeOpenDialog(e,!1)}),qI(this._openDialogsAtThisLevel,e=>e.close()),this._afterAllClosedAtThisLevel.complete(),this._afterOpenedAtThisLevel.complete(),this._openDialogsAtThisLevel=[]}_getOverlayConfig(e){const n=new Im({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:VM,useValue:r},{provide:YI,useValue:n},{provide:Xy,useValue:e}];let a;r.container?"function"==typeof r.container?a=r.container:(a=r.container.type,o.push(...r.container.providers(r))):a=LU;const l=new kh(a,r.viewContainerRef,$i.create({parent:s||this._injector,providers:o}),r.componentFactoryResolver);return e.attach(l).instance}_attachDialogContent(e,n,r,s){if(e instanceof Co){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 Cm(e,null,a,o))}else{const o=this._createInjector(s,n,r,this._injector),a=r.attachComponentPortal(new kh(e,s.viewContainerRef,o,s.componentFactoryResolver));n.componentInstance=a.instance}}_createInjector(e,n,r,s){const o=e.injector||e.viewContainerRef?.injector,a=[{provide:sQ,useValue:e.data},{provide:YI,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(Ta,null,{optional:!0}))&&a.push({provide:Ta,useValue:{value:e.direction,change:ht()}}),$i.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)(ee(as),ee($i),ee(oQ,8),ee(i,12),ee(FM),ee(NU))},i.\u0275prov=Re({token:i,factory:i.\u0275fac}),i})();function qI(i,t){let e=i.length;for(;e--;)t(i[e])}let dQ=(()=>{class i{}return i.\u0275fac=function(e){return new(e||i)},i.\u0275mod=en({type:i}),i.\u0275inj=Wt({providers:[BU,lQ],imports:[Rm,Ph,FU,Ph]}),i})();const uQ=["text"];function hQ(i,t){if(1&i&&Oe(0,"mat-pseudo-checkbox",6),2&i){const e=re();U("state",e.selected?"checked":"unchecked")("disabled",e.disabled)}}function fQ(i,t){1&i&&Oe(0,"mat-pseudo-checkbox",7),2&i&&U("disabled",re().disabled)}function pQ(i,t){if(1&i&&($(0,"span",8),Ve(1),j()),2&i){const e=re();V(1),Xi("(",e.group.label,")")}}const mQ=[[["mat-icon"]],"*"],gQ=["mat-icon","*"],vQ=new me("mat-sanity-checks",{providedIn:"root",factory:function _Q(){return!0}});let Qn=(()=>{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!PI()&&("boolean"==typeof this._sanityChecks?this._sanityChecks:!!this._sanityChecks[e])}}return i.\u0275fac=function(e){return new(e||i)(ee(OU),ee(vQ,8),ee(qt))},i.\u0275mod=en({type:i}),i.\u0275inj=Wt({imports:[Wy,Wy]}),i})();function zM(i){return class extends i{get disabled(){return this._disabled}set disabled(t){this._disabled=tn(t)}constructor(...t){super(...t),this._disabled=!1}}}function Ky(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 HM(i){return class extends i{get disableRipple(){return this._disableRipple}set disableRipple(t){this._disableRipple=tn(t)}constructor(...t){super(...t),this._disableRipple=!1}}}function XI(i,t=0){return class extends i{get tabIndex(){return this.disabled?-1:this._tabIndex}set tabIndex(e){this._tabIndex=null!=e?ks(e):this.defaultTabIndex}constructor(...e){super(...e),this._tabIndex=t,this.defaultTabIndex=t}}}function zU(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 yQ(i){return class extends i{constructor(...t){super(...t),this._isInitialized=!1,this._pendingSubscribers=[],this.initialized=new Tn(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 GU=(()=>{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=Re({token:i,factory:i.\u0275fac,providedIn:"root"}),i})();class xQ{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 $U=Ih({passive:!0,capture:!0});class wQ{constructor(){this._events=new Map,this._delegateEventHandler=t=>{const e=au(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,$U)})}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,$U)))}}const WU={enterDuration:225,exitDuration:150},jU=Ih({passive:!0,capture:!0}),YU=["mousedown","touchstart"],qU=["mouseup","mouseleave","touchend","touchcancel"];class Om{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=Uc(n))}fadeInRipple(t,e,n={}){const r=this._containerRect=this._containerRect||this._containerElement.getBoundingClientRect(),s={...WU,...n.animation};n.centered&&(t=r.left+r.width/2,e=r.top+r.height/2);const o=n.radius||function CQ(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,d=document.createElement("div");d.classList.add("mat-ripple-element"),d.style.left=a-o+"px",d.style.top=l-o+"px",d.style.height=2*o+"px",d.style.width=2*o+"px",null!=n.color&&(d.style.backgroundColor=n.color),d.style.transitionDuration=`${c}ms`,this._containerElement.appendChild(d);const h=window.getComputedStyle(d),m=h.transitionDuration,g="none"===h.transitionProperty||"0s"===m||"0s, 0s"===m||0===r.width&&0===r.height,b=new xQ(this,d,n,g);d.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);d.addEventListener("transitionend",y),d.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={...WU,...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=Uc(t);!this._platform.isBrowser||!e||e===this._triggerElement||(this._removeTriggerEvents(),this._triggerElement=e,YU.forEach(n=>{Om._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(()=>{qU.forEach(e=>{this._triggerElement.addEventListener(e,this,jU)})}),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=GI(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&&(YU.forEach(e=>Om._eventManager.removeHandler(e,t,this)),this._pointerUpEventsRegistered&&qU.forEach(e=>t.removeEventListener(e,this,jU)))}}Om._eventManager=new wQ;const KI=new me("mat-ripple-global-options");let Fh=(()=>{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 Om(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)(E(mt),E(ft),E(zi),E(KI,8),E(kr,8))},i.\u0275dir=ve({type:i,selectors:[["","mat-ripple",""],["","matRipple",""]],hostAttrs:[1,"mat-ripple"],hostVars:2,hostBindings:function(e,n){2&e&&ln("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})(),Qy=(()=>{class i{}return i.\u0275fac=function(e){return new(e||i)},i.\u0275mod=en({type:i}),i.\u0275inj=Wt({imports:[Qn,Qn]}),i})(),SQ=(()=>{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)(E(kr,8))},i.\u0275cmp=st({type:i,selectors:[["mat-pseudo-checkbox"]],hostAttrs:[1,"mat-pseudo-checkbox"],hostVars:12,hostBindings:function(e,n){2&e&&ln("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})(),XU=(()=>{class i{}return i.\u0275fac=function(e){return new(e||i)},i.\u0275mod=en({type:i}),i.\u0275inj=Wt({imports:[Qn]}),i})();const KU=new me("MAT_OPTION_PARENT_COMPONENT"),ZU=new me("MatOptgroup");let EQ=0;class AQ{constructor(t,e=!1){this.source=t,this.isUserInput=e}}let DQ=(()=>{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=tn(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-"+EQ++,this.onSelectionChange=new $e,this._stateChanges=new Ie}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)&&!Yo(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 AQ(this,e))}}return i.\u0275fac=function(e){wo()},i.\u0275dir=ve({type:i,viewQuery:function(e,n){if(1&e&&Zn(uQ,7),2&e){let r;Tt(r=It())&&(n._text=r.first)}},inputs:{value:"value",id:"id",disabled:"disabled"},outputs:{onSelectionChange:"onSelectionChange"}}),i})(),Fm=(()=>{class i extends DQ{constructor(e,n,r,s){super(e,n,r,s)}}return i.\u0275fac=function(e){return new(e||i)(E(mt),E(si),E(KU,8),E(ZU,8))},i.\u0275cmp=st({type:i,selectors:[["mat-option"]],hostAttrs:["role","option",1,"mat-mdc-option","mdc-list-item"],hostVars:11,hostBindings:function(e,n){1&e&&ke("click",function(){return n._selectViaInteraction()})("keydown",function(s){return n._handleKeydown(s)}),2&e&&(zl("id",n.id),Dt("aria-selected",n.selected)("aria-disabled",n.disabled.toString()),ln("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:[lt],ngContentSelectors:gQ,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&&(rr(mQ),fe(0,hQ,1,2,"mat-pseudo-checkbox",0),Yt(1),$(2,"span",1,2),Yt(4,1),j(),fe(5,fQ,1,1,"mat-pseudo-checkbox",3),fe(6,pQ,2,1,"span",4),Oe(7,"div",5)),2&e&&(U("ngIf",n.multiple),V(5),U("ngIf",!n.multiple&&n.selected&&!n.hideSingleSelectionIndicator),V(1),U("ngIf",n.group&&n.group._inert),V(1),U("matRippleTrigger",n._getHostElement())("matRippleDisabled",n.disabled||n.disableRipple))},dependencies:[Fh,vi,SQ],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})(),ZI=(()=>{class i{}return i.\u0275fac=function(e){return new(e||i)},i.\u0275mod=en({type:i}),i.\u0275inj=Wt({imports:[Qy,ao,Qn,XU]}),i})();class QU{}class RQ{}const Gc="*";function Ia(i,t){return{type:7,name:i,definitions:t,options:{}}}function Yr(i,t=null){return{type:4,styles:t,timings:i}}function eV(i,t=null){return{type:2,steps:i,options:t}}function oi(i){return{type:6,styles:i,offset:null}}function Ps(i,t,e){return{type:0,name:i,styles:t,options:e}}function tV(i){return{type:5,steps:i}}function Or(i,t,e=null){return{type:1,expr:i,animation:t,options:e}}function QI(i=null){return{type:9,options:i}}function JI(i,t,e=null){return{type:11,selector:i,animation:t,options:e}}function nV(i){Promise.resolve().then(i)}class Jy{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(){nV(()=>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 iV{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?nV(()=>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 eR="!";function kQ(i,t){}class GM{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 tR="mdc-dialog--open",rV="mdc-dialog--opening",sV="mdc-dialog--closing";let FQ=(()=>{class i extends LU{constructor(e,n,r,s,o,a,l,c){super(e,n,r,s,o,a,l,c),this._animationStateChanged=new $e}_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)(E(mt),E(HI),E(qt,8),E(GM),E(BM),E(ft),E(Xy),E(Hc))},i.\u0275cmp=st({type:i,selectors:[["ng-component"]],features:[lt],decls:0,vars:0,template:function(e,n){},encapsulation:2}),i})();const oV="--mat-dialog-transition-duration";function aV(i){return null==i?null:"number"==typeof i?i:i.endsWith("ms")?ks(i.substring(0,i.length-2)):i.endsWith("s")?1e3*ks(i.substring(0,i.length-1)):"0"===i?0:null}let LQ=(()=>{class i extends FQ{constructor(e,n,r,s,o,a,l,c,d){super(e,n,r,s,o,a,l,d),this._animationMode=c,this._animationsEnabled="NoopAnimations"!==this._animationMode,this._hostElement=this._elementRef.nativeElement,this._openAnimationDuration=this._animationsEnabled?aV(this._config.enterAnimationDuration)??150:0,this._closeAnimationDuration=this._animationsEnabled?aV(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(oV,`${this._openAnimationDuration}ms`),this._requestAnimationFrame(()=>this._hostElement.classList.add(rV,tR)),this._waitForAnimationToComplete(this._openAnimationDuration,this._finishDialogOpen)):(this._hostElement.classList.add(tR),Promise.resolve().then(()=>this._finishDialogOpen()))}_startExitAnimation(){this._animationStateChanged.emit({state:"closing",totalTime:this._closeAnimationDuration}),this._hostElement.classList.remove(tR),this._animationsEnabled?(this._hostElement.style.setProperty(oV,`${this._openAnimationDuration}ms`),this._requestAnimationFrame(()=>this._hostElement.classList.add(sV)),this._waitForAnimationToComplete(this._closeAnimationDuration,this._finishDialogClose)):Promise.resolve().then(()=>this._finishDialogClose())}_clearAnimationClasses(){this._hostElement.classList.remove(rV,sV)}_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)(E(mt),E(HI),E(qt,8),E(GM),E(BM),E(ft),E(Xy),E(kr,8),E(Hc))},i.\u0275cmp=st({type:i,selectors:[["mat-dialog-container"]],hostAttrs:["tabindex","-1",1,"mat-mdc-dialog-container","mdc-dialog"],hostVars:8,hostBindings:function(e,n){2&e&&(zl("id",n._config.id),Dt("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),ln("_mat-animation-noopable",!n._animationsEnabled))},features:[lt],decls:3,vars:0,consts:[[1,"mdc-dialog__container"],[1,"mat-mdc-dialog-surface","mdc-dialog__surface"],["cdkPortalOutlet",""]],template:function(e,n){1&e&&($(0,"div",0)(1,"div",1),fe(2,kQ,0,0,"ng-template",2),j()())},dependencies:[Sm],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 eb{constructor(t,e,n){this._ref=t,this._containerInstance=n,this._afterOpened=new Ie,this._beforeClosed=new Ie,this._state=0,this.disableClose=e.disableClose,this.id=t.id,n._animationStateChanged.pipe(vn(r=>"opened"===r.state),Oi(1)).subscribe(()=>{this._afterOpened.next(),this._afterOpened.complete()}),n._animationStateChanged.pipe(vn(r=>"closed"===r.state),Oi(1)).subscribe(()=>{clearTimeout(this._closeFallbackTimeout),this._finishDialogClose()}),t.overlayRef.detachments().subscribe(()=>{this._beforeClosed.next(this._result),this._beforeClosed.complete(),this._finishDialogClose()}),Cr(this.backdropClick(),this.keydownEvents().pipe(vn(r=>27===r.keyCode&&!this.disableClose&&!Yo(r)))).subscribe(r=>{this.disableClose||(r.preventDefault(),lV(this,"keydown"===r.type?"keyboard":"mouse"))})}close(t){this._result=t,this._containerInstance._animationStateChanged.pipe(vn(e=>"closing"===e.state),Oi(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 lV(i,t,e){return i._closeInteractionType=t,i.close(e)}const nR=new me("MatMdcDialogData"),NQ=new me("mat-mdc-dialog-default-options"),cV=new me("mat-mdc-dialog-scroll-strategy"),UQ={provide:cV,deps:[as],useFactory:function BQ(i){return()=>i.scrollStrategies.block()}};let VQ=0,zQ=(()=>{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,d,h){this._overlay=e,this._defaultOptions=r,this._parentDialog=s,this._dialogRefConstructor=l,this._dialogContainerType=c,this._dialogDataToken=d,this._openDialogsAtThisLevel=[],this._afterAllClosedAtThisLevel=new Ie,this._afterOpenedAtThisLevel=new Ie,this._idPrefix="mat-dialog-",this.dialogConfigClass=GM,this.afterAllClosed=My(()=>this.openDialogs.length?this._getAfterAllClosed():this._getAfterAllClosed().pipe(Eo(void 0))),this._scrollStrategy=a,this._dialog=n.get(BU)}open(e,n){let r;(n={...this._defaultOptions||new GM,...n}).id=n.id||`${this._idPrefix}${VQ++}`,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:VM,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){wo()},i.\u0275prov=Re({token:i,factory:i.\u0275fac}),i})(),Lm=(()=>{class i extends zQ{constructor(e,n,r,s,o,a,l,c){super(e,n,s,a,l,o,eb,LQ,nR,c),this._idPrefix="mat-mdc-dialog-"}}return i.\u0275fac=function(e){return new(e||i)(ee(as),ee($i),ee(py,8),ee(NQ,8),ee(cV),ee(i,12),ee(FM),ee(kr,8))},i.\u0275prov=Re({token:i,factory:i.\u0275fac}),i})(),HQ=0,GQ=(()=>{class i{constructor(e,n,r){this.dialogRef=e,this._elementRef=n,this._dialog=r,this.type="button"}ngOnInit(){this.dialogRef||(this.dialogRef=fV(this._elementRef,this._dialog.openDialogs))}ngOnChanges(e){const n=e._matDialogClose||e._matDialogCloseResult;n&&(this.dialogResult=n.currentValue)}_onButtonClick(e){lV(this.dialogRef,0===e.screenX&&0===e.screenY?"keyboard":"mouse",this.dialogResult)}}return i.\u0275fac=function(e){return new(e||i)(E(eb,8),E(mt),E(Lm))},i.\u0275dir=ve({type:i,selectors:[["","mat-dialog-close",""],["","matDialogClose",""]],hostVars:2,hostBindings:function(e,n){1&e&&ke("click",function(s){return n._onButtonClick(s)}),2&e&&Dt("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:[xi]}),i})(),dV=(()=>{class i{constructor(e,n,r){this._dialogRef=e,this._elementRef=n,this._dialog=r,this.id="mat-mdc-dialog-title-"+HQ++}ngOnInit(){this._dialogRef||(this._dialogRef=fV(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)(E(eb,8),E(mt),E(Lm))},i.\u0275dir=ve({type:i,selectors:[["","mat-dialog-title",""],["","matDialogTitle",""]],hostAttrs:[1,"mat-mdc-dialog-title","mdc-dialog__title"],hostVars:1,hostBindings:function(e,n){2&e&&zl("id",n.id)},inputs:{id:"id"},exportAs:["matDialogTitle"]}),i})(),uV=(()=>{class i{}return i.\u0275fac=function(e){return new(e||i)},i.\u0275dir=ve({type:i,selectors:[["","mat-dialog-content",""],["mat-dialog-content"],["","matDialogContent",""]],hostAttrs:[1,"mat-mdc-dialog-content","mdc-dialog__content"]}),i})(),hV=(()=>{class i{constructor(){this.align="start"}}return i.\u0275fac=function(e){return new(e||i)},i.\u0275dir=ve({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&&ln("mat-mdc-dialog-actions-align-center","center"===n.align)("mat-mdc-dialog-actions-align-end","end"===n.align)},inputs:{align:"align"}}),i})();function fV(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 pV=(()=>{class i{}return i.\u0275fac=function(e){return new(e||i)},i.\u0275mod=en({type:i}),i.\u0275inj=Wt({providers:[Lm,UQ],imports:[dQ,Rm,Ph,Qn,Qn]}),i})();const $Q=["mat-button",""],gV=[[["",8,"material-icons",3,"iconPositionEnd",""],["mat-icon",3,"iconPositionEnd",""],["","matButtonIcon","",3,"iconPositionEnd",""]],"*",[["","iconPositionEnd","",8,"material-icons"],["mat-icon","iconPositionEnd",""],["","matButtonIcon","","iconPositionEnd",""]]],_V=[".material-icons:not([iconPositionEnd]), mat-icon:not([iconPositionEnd]), [matButtonIcon]:not([iconPositionEnd])","*",".material-icons[iconPositionEnd], mat-icon[iconPositionEnd], [matButtonIcon][iconPositionEnd]"],jQ=["mat-mini-fab",""],qQ=["mat-icon-button",""],XQ=["*"],KQ=[{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"]}],ZQ=Ky(zM(HM(class{constructor(i){this._elementRef=i}})));let iR=(()=>{class i extends ZQ{constructor(e,n,r,s){super(e),this._platform=n,this._ngZone=r,this._animationMode=s,this._focusMonitor=Lt(Hc),this._isFab=!1;const o=e.nativeElement.classList;for(const a of KQ)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){wo()},i.\u0275dir=ve({type:i,viewQuery:function(e,n){if(1&e&&Zn(Fh,5),2&e){let r;Tt(r=It())&&(n.ripple=r.first)}},features:[lt]}),i})(),$M=(()=>{class i extends iR{constructor(e,n,r,s){super(e,n,r,s)}}return i.\u0275fac=function(e){return new(e||i)(E(mt),E(zi),E(ft),E(kr,8))},i.\u0275cmp=st({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&&(Dt("disabled",n.disabled||null),ln("_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:[lt],attrs:$Q,ngContentSelectors:_V,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&&(rr(gV),Oe(0,"span",0),Yt(1),$(2,"span",1),Yt(3,1),j(),Yt(4,2),Oe(5,"span",2)(6,"span",3)(7,"span",4)),2&e&&(ln("mdc-button__ripple",!n._isFab)("mdc-fab__ripple",n._isFab),V(6),U("matRippleDisabled",n._isRippleDisabled())("matRippleTrigger",n._elementRef.nativeElement))},dependencies:[Fh],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 JQ=new me("mat-mdc-fab-default-options",{providedIn:"root",factory:vV});function vV(){return{color:"accent"}}const yV=vV();let bV=(()=>{class i extends iR{constructor(e,n,r,s,o){super(e,n,r,s),this._options=o,this._isFab=!0,this._options=this._options||yV,this.color=this.defaultColor=this._options.color||yV.color}}return i.\u0275fac=function(e){return new(e||i)(E(mt),E(zi),E(ft),E(kr,8),E(JQ,8))},i.\u0275cmp=st({type:i,selectors:[["button","mat-mini-fab",""]],hostVars:7,hostBindings:function(e,n){2&e&&(Dt("disabled",n.disabled||null),ln("_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:[lt],attrs:jQ,ngContentSelectors:_V,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&&(rr(gV),Oe(0,"span",0),Yt(1),$(2,"span",1),Yt(3,1),j(),Yt(4,2),Oe(5,"span",2)(6,"span",3)(7,"span",4)),2&e&&(ln("mdc-button__ripple",!n._isFab)("mdc-fab__ripple",n._isFab),V(6),U("matRippleDisabled",n._isRippleDisabled())("matRippleTrigger",n._elementRef.nativeElement))},dependencies:[Fh],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})(),WM=(()=>{class i extends iR{constructor(e,n,r,s){super(e,n,r,s)}}return i.\u0275fac=function(e){return new(e||i)(E(mt),E(zi),E(ft),E(kr,8))},i.\u0275cmp=st({type:i,selectors:[["button","mat-icon-button",""]],hostVars:7,hostBindings:function(e,n){2&e&&(Dt("disabled",n.disabled||null),ln("_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:[lt],attrs:qQ,ngContentSelectors:XQ,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&&(rr(),Oe(0,"span",0),Yt(1),Oe(2,"span",1)(3,"span",2)(4,"span",3)),2&e&&(V(3),U("matRippleDisabled",n._isRippleDisabled())("matRippleCentered",!0)("matRippleTrigger",n._elementRef.nativeElement))},dependencies:[Fh],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=en({type:i}),i.\u0275inj=Wt({imports:[Qn,Qy,Qn]}),i})();const eJ=["class","dialog"];let xV=(()=>{class i{constructor(e,n){this.dialogRef=e,this.data=n}}return i.\u0275fac=function(e){return new(e||i)(E(eb),E(nR))},i.\u0275cmp=st({type:i,selectors:[["app-confirm",8,"dialog"]],attrs:eJ,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&&($(0,"h1",0),Ve(1,"Confirmation"),j(),$(2,"div",1)(3,"p"),Ve(4),j()(),$(5,"div",2)(6,"button",3),ke("click",function(){return n.dialogRef.close()}),Ve(7,"Cancel"),j(),$(8,"button",4),Ve(9,"Yes"),j()()),2&e&&(V(4),ui(n.data.text),V(4),U("mat-dialog-close",!0))},dependencies:[$M,GQ,dV,uV,hV]}),i})();function rR(i,t){const e="object"==typeof t;return new Promise((n,r)=>{const s=new la({next:o=>{n(o),s.unsubscribe()},error:r,complete:()=>{e?n(t.defaultValue):r(new um)}});i.subscribe(s)})}let $c=(()=>{class i{constructor(e){this.ngZone=e,this.openedResource$=new at(null),this.openedResourcePath$=new at(null),eel.expose(this.wrapHandler(this.openFile),"open_file"),eel.on_angular_ready(),setTimeout(xt(function*(){for(;;){if(eel._websocket){eel._websocket.onclose=()=>window.close();break}yield new Promise(n=>setTimeout(n,0))}}),0)}wrapHandler(e){return(...n)=>{try{ft.assertInAngularZone(),e.bind(this)(...n)}catch{this.ngZone.run(e,this,n)}}}openFile(e,n=!1){var r=this;return xt(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 xt(function*(){yield eel.open_file_with_system_app(e)()})()}retrieveValue(e){return xt(function*(){return yield eel.retrieve_value(e)()})()}runCustomAction(e,n,r){return xt(function*(){return eel.run_custom_action(e,n,r)()})()}saveFile(e){var n=this;return xt(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 xt(function*(){return eel.serialize_resource(e,n)()})()}serializeResourceTmp(e,n,r={}){return xt(function*(){return eel.serialize_resource_tmp(e,n,r)()})()}serializeReversible(e,n){return xt(function*(){return eel.serialize_reversible(e,n)()})()}deserializeResource(e){return xt(function*(){return eel.deserialize_resource(e)()})()}}return i.\u0275fac=function(e){return new(e||i)(ee(ft))},i.\u0275prov=Re({token:i,factory:i.\u0275fac,providedIn:"root"}),i})();var sR=ps(489);const wV=i=>!(!i||"object"!=typeof i),MV=(i={},t,e,n=[])=>{const r=[];if(wV(i)){const s=Object.entries(i);for(let o=0;o{class i{constructor(e){var n=this;this.eelDelegate=e,this._hasUnsavedChanges$=new at(!1),this.resource$=new at(null),this.error$=new at(null),this.customActionRunning$=new at(!1),this.changedDataBlocks={},this.dataBlockChange$=new Ie,this.hideHiddenFields$=new at(!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=MV(r.schema,"is_recursive_ref",!0);for(const[o,a]of s){const l=o.block_class_mro;let c=r.schema,d=c.block_class_mro===l?c:void 0;for(const h of a.slice(0,a.length-1))!d&&c[h]?.block_class_mro===l&&(d=c[h]),c=c[h];c[a[a.length-1]]=d}this.resource$.next(r),this.error$.next(null)}else this.resource$.next(null),this.error$.next(null)}),this.dataBlockChange$.subscribe(function(){var r=xt(function*([s,o]){n.changedDataBlocks[s]=o,n.updateUnsavedChanges();const a=yield n.eelDelegate.retrieveValue(s);n.changedDataBlocks[s]==o&&((0,sR.isNumber)(o)?Math.abs(o-a)<1e-10:(0,sR.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 xt(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 xt(function*(){return s.processExternalChanges(e,()=>s.eelDelegate.runCustomAction(e,n,r))})()}deserializeResource(e){var n=this;return xt(function*(){return n.processExternalChanges(e,()=>n.eelDelegate.deserializeResource(e))})()}reloadResource(){var e=this;return xt(function*(){const n=e.eelDelegate.openedResourcePath$.getValue();n&&e.eelDelegate.openFile(n,!0).then()})()}saveResource(){var e=this;return xt(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)(ee($c))},i.\u0275prov=Re({token:i,factory:i.\u0275fac,providedIn:"root"}),i})();function tJ(i,t){if(1&i){const e=Kn();$(0,"div",2)(1,"button",3),ke("click",function(){return Ht(e),Et(re().action())}),Ve(2),j()()}if(2&i){const e=re();V(2),Xi(" ",e.data.action," ")}}const nJ=["label"];function iJ(i,t){}const rJ=Math.pow(2,31)-1;class oR{constructor(t,e){this._overlayRef=e,this._afterDismissed=new Ie,this._afterOpened=new Ie,this._onAction=new Ie,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,rJ))}_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 CV=new me("MatSnackBarData");class YM{constructor(){this.politeness="assertive",this.announcementMessage="",this.duration=0,this.data=null,this.horizontalPosition="center",this.verticalPosition="bottom"}}let sJ=(()=>{class i{}return i.\u0275fac=function(e){return new(e||i)},i.\u0275dir=ve({type:i,selectors:[["","matSnackBarLabel",""]],hostAttrs:[1,"mat-mdc-snack-bar-label","mdc-snackbar__label"]}),i})(),oJ=(()=>{class i{}return i.\u0275fac=function(e){return new(e||i)},i.\u0275dir=ve({type:i,selectors:[["","matSnackBarActions",""]],hostAttrs:[1,"mat-mdc-snack-bar-actions","mdc-snackbar__actions"]}),i})(),aJ=(()=>{class i{}return i.\u0275fac=function(e){return new(e||i)},i.\u0275dir=ve({type:i,selectors:[["","matSnackBarAction",""]],hostAttrs:[1,"mat-mdc-snack-bar-action","mdc-snackbar__action"]}),i})(),lJ=(()=>{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)(E(oR),E(CV))},i.\u0275cmp=st({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&&($(0,"div",0),Ve(1),j(),fe(2,tJ,3,1,"div",1)),2&e&&(V(1),Xi(" ",n.data.message,"\n"),V(1),U("ngIf",n.hasAction))},dependencies:[vi,$M,sJ,oJ,aJ],styles:[".mat-mdc-simple-snack-bar{display:flex}"],encapsulation:2,changeDetection:0}),i})();const cJ={snackBarState:Ia("state",[Ps("void, hidden",oi({transform:"scale(0.8)",opacity:0})),Ps("visible",oi({transform:"scale(1)",opacity:1})),Or("* => visible",Yr("150ms cubic-bezier(0, 0, 0.2, 1)")),Or("* => void, * => hidden",Yr("75ms cubic-bezier(0.4, 0.0, 1, 1)",oi({opacity:0})))])};let dJ=0,uJ=(()=>{class i extends kM{constructor(e,n,r,s,o){super(),this._ngZone=e,this._elementRef=n,this._changeDetectorRef=r,this._platform=s,this.snackBarConfig=o,this._document=Lt(qt),this._trackedModals=new Set,this._announceDelay=150,this._destroyed=!1,this._onAnnounce=new Ie,this._onExit=new Ie,this._onEnter=new Ie,this._animationState="void",this._liveElementId="mat-snack-bar-container-live-"+dJ++,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(Oi(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)(E(ft),E(mt),E(si),E(zi),E(YM))},i.\u0275dir=ve({type:i,viewQuery:function(e,n){if(1&e&&Zn(Sm,7),2&e){let r;Tt(r=It())&&(n._portalOutlet=r.first)}},features:[lt]}),i})(),hJ=(()=>{class i extends uJ{_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=ri(i)))(n||i)}}(),i.\u0275cmp=st({type:i,selectors:[["mat-snack-bar-container"]],viewQuery:function(e,n){if(1&e&&Zn(nJ,7),2&e){let r;Tt(r=It())&&(n._label=r.first)}},hostAttrs:[1,"mdc-snackbar","mat-mdc-snack-bar-container","mdc-snackbar--open"],hostVars:1,hostBindings:function(e,n){1&e&&PD("@state.done",function(s){return n.onAnimationEnd(s)}),2&e&&Ew("@state",n._animationState)},features:[lt],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&&($(0,"div",0)(1,"div",1,2)(3,"div",3),fe(4,iJ,0,0,"ng-template",4),j(),Oe(5,"div"),j()()),2&e&&(V(5),Dt("aria-live",n._live)("role",n._role)("id",n._liveElementId))},dependencies:[Sm],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:[cJ.snackBarState]}}),i})(),SV=(()=>{class i{}return i.\u0275fac=function(e){return new(e||i)},i.\u0275mod=en({type:i}),i.\u0275inj=Wt({imports:[Rm,Ph,ao,jM,Qn,Qn]}),i})();const EV=new me("mat-snack-bar-default-options",{providedIn:"root",factory:function fJ(){return new YM}});let pJ=(()=>{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=$i.create({parent:n&&n.viewContainerRef&&n.viewContainerRef.injector||this._injector,providers:[{provide:YM,useValue:n}]}),o=new kh(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 oR(o,s);if(e instanceof Co){const l=new Cm(e,null,{$implicit:r.data,snackBarRef:a});a.instance=o.attachTemplatePortal(l)}else{const l=this._createInjector(r,a),c=new kh(e,void 0,l),d=o.attachComponentPortal(c);a.instance=d.instance}return this._breakpointObserver.observe("(max-width: 599.98px) and (orientation: portrait)").pipe(He(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 Im;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 $i.create({parent:e&&e.viewContainerRef&&e.viewContainerRef.injector||this._injector,providers:[{provide:oR,useValue:n},{provide:CV,useValue:e.data}]})}}return i.\u0275fac=function(e){return new(e||i)(ee(as),ee(WI),ee($i),ee(UI),ee(i,12),ee(EV))},i.\u0275prov=Re({token:i,factory:i.\u0275fac}),i})(),AV=(()=>{class i extends pJ{constructor(e,n,r,s,o,a){super(e,n,r,s,o,a),this.simpleSnackBarComponent=lJ,this.snackBarContainerComponent=hJ,this.handsetCssClass="mat-mdc-snack-bar-handset"}}return i.\u0275fac=function(e){return new(e||i)(ee(as),ee(WI),ee($i),ee(UI),ee(i,12),ee(EV))},i.\u0275prov=Re({token:i,factory:i.\u0275fac,providedIn:SV}),i})();const mJ=["*",[["mat-toolbar-row"]]],gJ=["*","mat-toolbar-row"],_J=Ky(class{constructor(i){this._elementRef=i}});let vJ=(()=>{class i{}return i.\u0275fac=function(e){return new(e||i)},i.\u0275dir=ve({type:i,selectors:[["mat-toolbar-row"]],hostAttrs:[1,"mat-toolbar-row"],exportAs:["matToolbarRow"]}),i})(),yJ=(()=>{class i extends _J{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)(E(mt),E(zi),E(qt))},i.\u0275cmp=st({type:i,selectors:[["mat-toolbar"]],contentQueries:function(e,n,r){if(1&e&&Wi(r,vJ,5),2&e){let s;Tt(s=It())&&(n._toolbarRows=s)}},hostAttrs:[1,"mat-toolbar"],hostVars:4,hostBindings:function(e,n){2&e&&ln("mat-toolbar-multiple-rows",n._toolbarRows.length>0)("mat-toolbar-single-row",0===n._toolbarRows.length)},inputs:{color:"color"},exportAs:["matToolbar"],features:[lt],ngContentSelectors:gJ,decls:2,vars:0,template:function(e,n){1&e&&(rr(mJ),Yt(0),Yt(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})(),bJ=(()=>{class i{}return i.\u0275fac=function(e){return new(e||i)},i.\u0275mod=en({type:i}),i.\u0275inj=Wt({imports:[Qn,Qn]}),i})(),xJ=(()=>{class i{constructor(){this._vertical=!1,this._inset=!1}get vertical(){return this._vertical}set vertical(e){this._vertical=tn(e)}get inset(){return this._inset}set inset(e){this._inset=tn(e)}}return i.\u0275fac=function(e){return new(e||i)},i.\u0275cmp=st({type:i,selectors:[["mat-divider"]],hostAttrs:["role","separator",1,"mat-divider"],hostVars:7,hostBindings:function(e,n){2&e&&(Dt("aria-orientation",n.vertical?"vertical":"horizontal"),ln("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})(),DV=(()=>{class i{}return i.\u0275fac=function(e){return new(e||i)},i.\u0275mod=en({type:i}),i.\u0275inj=Wt({imports:[Qn,Qn]}),i})();const wJ=["tooltip"],TV=new me("mat-tooltip-scroll-strategy"),SJ={provide:TV,deps:[as],useFactory:function CJ(i){return()=>i.scrollStrategies.reposition({scrollThrottle:20})}},AJ=new me("mat-tooltip-default-options",{providedIn:"root",factory:function EJ(){return{showDelay:0,hideDelay:0,touchendHideDelay:1500}}}),IV="tooltip-panel",RV=Ih({passive:!0});let PJ=(()=>{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=tn(e),this._detach(),this._overlayRef=null}get disabled(){return this._disabled}set disabled(e){this._disabled=tn(e),this._disabled?this.hide(0):this._setupPointerEnterEventsIfNeeded()}get showDelay(){return this._showDelay}set showDelay(e){this._showDelay=ks(e)}get hideDelay(){return this._hideDelay}set hideDelay(e){this._hideDelay=ks(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,d,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 Ie,this._scrollStrategy=d,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(He(this._destroyed)).subscribe(()=>{this._overlayRef&&this._updatePosition(this._overlayRef)})}ngAfterViewInit(){this._viewInitialized=!0,this._setupPointerEnterEventsIfNeeded(),this._focusMonitor.monitor(this._elementRef).pipe(He(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,RV)}),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 kh(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(He(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 mt)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(He(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}-${IV}`,scrollStrategy:this._scrollStrategy()}),this._updatePosition(this._overlayRef),this._overlayRef.detachments().pipe(He(this._destroyed)).subscribe(()=>this._detach()),this._overlayRef.outsidePointerEvents().pipe(He(this._destroyed)).subscribe(()=>this._tooltipInstance?._handleBodyInteraction()),this._overlayRef.keydownEvents().pipe(He(this._destroyed)).subscribe(s=>{this._isTooltipVisible()&&27===s.keyCode&&!Yo(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(Oi(1),He(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}-${IV}-`;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,RV)})}_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){wo()},i.\u0275dir=ve({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})(),Os=(()=>{class i extends PJ{constructor(e,n,r,s,o,a,l,c,d,h,p,m){super(e,n,r,s,o,a,l,c,d,h,p,m),this._tooltipComponent=FJ,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)(E(as),E(mt),E(jy),E(jr),E(ft),E(zi),E(NZ),E(Hc),E(TV),E(Ta,8),E(AJ,8),E(qt))},i.\u0275dir=ve({type:i,selectors:[["","matTooltip",""]],hostAttrs:[1,"mat-mdc-tooltip-trigger"],exportAs:["matTooltip"],features:[lt]}),i})(),OJ=(()=>{class i{constructor(e,n){this._changeDetectorRef=e,this._closeOnInteraction=!1,this._isVisible=!1,this._onHide=new Ie,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)(E(si),E(kr,8))},i.\u0275dir=ve({type:i}),i})(),FJ=(()=>{class i extends OJ{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)(E(si),E(mt),E(kr,8))},i.\u0275cmp=st({type:i,selectors:[["mat-tooltip-component"]],viewQuery:function(e,n){if(1&e&&Zn(wJ,7),2&e){let r;Tt(r=It())&&(n._tooltip=r.first)}},hostAttrs:["aria-hidden","true"],hostVars:2,hostBindings:function(e,n){1&e&&ke("mouseleave",function(s){return n._handleMouseLeave(s)}),2&e&&$o("zoom",n.isVisible()?1:null)},features:[lt],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&&($(0,"div",0,1),ke("animationend",function(s){return n._handleAnimationEnd(s)}),$(2,"div",2),Ve(3),j()()),2&e&&(ln("mdc-tooltip--multiline",n._isMultiline),U("ngClass",n.tooltipClass),V(3),ui(n.message))},dependencies:[dm],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})(),kV=(()=>{class i{}return i.\u0275fac=function(e){return new(e||i)},i.\u0275mod=en({type:i}),i.\u0275inj=Wt({providers:[SJ],imports:[FU,ao,Rm,Qn,Qn,Yy]}),i})();function PV(...i){const t=v0(i),{args:e,keys:n}=NB(i),r=new Tn(s=>{const{length:o}=e;if(!o)return void s.complete();const a=new Array(o);let l=o,c=o;for(let d=0;d{h||(h=!0,c--),a[d]=p},()=>l--,void 0,()=>{(!l||!h)&&(c||s.next(n?BB(n,a):a),s.complete())}))}});return t?r.pipe(XT(t)):r}class aR{}class cu{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 cu?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 cu;return e.lazyInit=this.lazyInit&&this.lazyInit instanceof cu?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 LJ{encodeKey(t){return FV(t)}encodeValue(t){return FV(t)}decodeKey(t){return decodeURIComponent(t)}decodeValue(t){return decodeURIComponent(t)}}const BJ=/%(\d[a-f0-9])/gi,UJ={40:"@","3A":":",24:"$","2C":",","3B":";","3D":"=","3F":"?","2F":"/"};function FV(i){return encodeURIComponent(i).replace(BJ,(t,e)=>UJ[e]??t)}function qM(i){return`${i}`}class du{constructor(t={}){if(this.updates=null,this.cloneFrom=null,this.encoder=t.encoder||new LJ,t.fromString){if(t.fromObject)throw new Error("Cannot specify both fromString and fromObject.");this.map=function NJ(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 du({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 VJ{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 LV(i){return typeof ArrayBuffer<"u"&&i instanceof ArrayBuffer}function NV(i){return typeof Blob<"u"&&i instanceof Blob}function BV(i){return typeof FormData<"u"&&i instanceof FormData}class tb{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 zJ(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 cu),this.context||(this.context=new VJ),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 tb(e,n,s,{params:c,headers:l,context:d,reportProgress:a,responseType:r,withCredentials:o})}}var ls=(()=>((ls=ls||{})[ls.Sent=0]="Sent",ls[ls.UploadProgress=1]="UploadProgress",ls[ls.ResponseHeader=2]="ResponseHeader",ls[ls.DownloadProgress=3]="DownloadProgress",ls[ls.Response=4]="Response",ls[ls.User=5]="User",ls))();class GJ{constructor(t,e=200,n="OK"){this.headers=t.headers||new cu,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 lR extends GJ{constructor(t={}){super(t),this.type=ls.Response,this.body=void 0!==t.body?t.body:null}clone(t={}){return new lR({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 cR(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 dR=(()=>{class i{constructor(e){this.handler=e}request(e,n,r={}){let s;if(e instanceof tb)s=e;else{let l,c;l=r.headers instanceof cu?r.headers:new cu(r.headers),r.params&&(c=r.params instanceof du?r.params:new du({fromObject:r.params})),s=new tb(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=ht(s).pipe(nu(l=>this.handler.handle(l)));if(e instanceof tb||"events"===r.observe)return o;const a=o.pipe(vn(l=>l instanceof lR));switch(r.observe||"body"){case"body":switch(s.responseType){case"arraybuffer":return a.pipe(et(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(et(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(et(l=>{if(null!==l.body&&"string"!=typeof l.body)throw new Error("Response is not a string.");return l.body}));default:return a.pipe(et(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 du).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,cR(r,n))}post(e,n,r={}){return this.request("POST",e,cR(r,n))}put(e,n,r={}){return this.request("PUT",e,cR(r,n))}}return i.\u0275fac=function(e){return new(e||i)(ee(aR))},i.\u0275prov=Re({token:i,factory:i.\u0275fac}),i})();const nee=["*"];let KM;function nb(i){return function iee(){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 jV(i){return Error(`Unable to find icon with the name "${i}"`)}function YV(i){return Error(`The URL provided to MatIconRegistry was not trusted as a resource URL via Angular's DomSanitizer. Attempted URL was "${i}".`)}function qV(i){return Error(`The literal provided to MatIconRegistry was not trusted as safe HTML by Angular's DomSanitizer. Attempted literal was "${i}".`)}class Lh{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 Lh(r,null,s))}addSvgIconResolver(e){return this._resolvers.push(e),this}addSvgIconLiteralInNamespace(e,n,r,s){const o=this._sanitizer.sanitize(Xn.HTML,r);if(!o)throw qV(r);const a=nb(o);return this._addSvgIconConfig(e,n,new Lh("",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 Lh(n,null,r))}addSvgIconSetLiteralInNamespace(e,n,r){const s=this._sanitizer.sanitize(Xn.HTML,n);if(!s)throw qV(n);const o=nb(s);return this._addSvgIconSetConfig(e,new Lh("",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(Xn.RESOURCE_URL,e);if(!n)throw YV(e);const r=this._cachedIconsByUrl.get(n);return r?ht(QM(r)):this._loadSvgIconFromConfig(new Lh(e,null)).pipe(Vi(s=>this._cachedIconsByUrl.set(n,s)),et(s=>QM(s)))}getNamedSvgIcon(e,n=""){const r=XV(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):hm(jV(r))}ngOnDestroy(){this._resolvers=[],this._svgIconConfigs.clear(),this._iconSetConfigs.clear(),this._cachedIconsByUrl.clear()}_getSvgFromConfig(e){return e.svgText?ht(QM(this._svgElementFromConfig(e))):this._loadSvgIconFromConfig(e).pipe(et(n=>QM(n)))}_getSvgFromIconSetConfigs(e,n){const r=this._extractIconWithNameFromAnySet(e,n);return r?ht(r):PV(n.filter(o=>!o.svgText).map(o=>this._loadSvgIconSetFromConfig(o).pipe(Nc(a=>{const c=`Loading icon set URL: ${this._sanitizer.sanitize(Xn.RESOURCE_URL,o.url)} failed: ${a.message}`;return this._errorHandler.handleError(new Error(c)),ht(null)})))).pipe(et(()=>{const o=this._extractIconWithNameFromAnySet(e,n);if(!o)throw jV(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(Vi(n=>e.svgText=n),et(()=>this._svgElementFromConfig(e)))}_loadSvgIconSetFromConfig(e){return e.svgText?ht(null):this._fetchIcon(e).pipe(Vi(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(nb(""));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(nb("")),r=e.attributes;for(let s=0;snb(c)),iu(()=>this._inProgressUrlFetches.delete(o)),Bf());return this._inProgressUrlFetches.set(o,l),l}_addSvgIconConfig(e,n,r){return this._svgIconConfigs.set(XV(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:""}}}),KV=["clip-path","color-profile","src","cursor","fill","filter","marker","marker-start","marker-mid","marker-end","mask","stroke"],uee=KV.map(i=>`[${i}]`).join(", "),hee=/^url\(['"]?#(.*?)['"]?\)$/;let hR=(()=>{class i extends aee{get inline(){return this._inline}set inline(e){this._inline=tn(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=Qt.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(uee),r=this._elementsWithExternalReferences=this._elementsWithExternalReferences||new Map;for(let s=0;s{const a=n[s],l=a.getAttribute(o),c=l?l.match(hee):null;if(c){let d=r.get(a);d||(d=[],r.set(a,d)),d.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(Oi(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)(E(mt),E(ZM),_a("aria-hidden"),E(cee),E(rl),E(lee,8))},i.\u0275cmp=st({type:i,selectors:[["mat-icon"]],hostAttrs:["role","img",1,"mat-icon","notranslate"],hostVars:8,hostBindings:function(e,n){2&e&&(Dt("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),ln("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:[lt],ngContentSelectors:nee,decls:1,vars:0,template:function(e,n){1&e&&(rr(),Yt(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})(),ZV=(()=>{class i{}return i.\u0275fac=function(e){return new(e||i)},i.\u0275mod=en({type:i}),i.\u0275inj=Wt({imports:[Qn,Qn]}),i})(),QV=(()=>{class i{constructor(e){this.viewContainerRef=e}}return i.\u0275fac=function(e){return new(e||i)(E(jr))},i.\u0275dir=ve({type:i,selectors:[["","dataBlockUI",""]]}),i})(),fee=(()=>{class i{constructor(){this.resource=null,this.name="",this.resourceDescription="",this.changed=new $e}}return i.\u0275fac=function(e){return new(e||i)},i.\u0275cmp=st({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&&($(0,"p",0),Ve(1),j()),2&e&&(U("matTooltip",n.resourceDescription),V(1),Mh("",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:[Os],changeDetection:0}),i})();function pee(i,t){if(1&i&&($(0,"h2",4),Ve(1),j()),2&i){const e=re();U("matTooltip",e.resourceDescription),V(1),ui(e.name)}}function mee(i,t){1&i&&Oe(0,"app-block-actions",5),2&i&&U("resource",re().resource)}const gee=function(i,t,e,n){return{id:i,name:t,data:e,schema:n}};function _ee(i,t){if(1&i&&Oe(0,"app-editor",7),2&i){const e=re().$implicit,n=re();U("resource",P2(3,gee,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 vee(i,t){if(1&i&&($r(0),fe(1,_ee,1,8,"app-editor",6),gt(2,"async"),Wr()),2&i){const e=t.$implicit,n=re();V(1),U("ngIf",!(yt(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 Wc=(()=>{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 $e,this.destroyed$=new Ie}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(He(this.destroyed$),vn(([n,r])=>!!this.resource&&n.startsWith(this.resource.id)&&!n.substring(this.resource.id.length+1).includes("/"))).subscribe(function(){var n=xt(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)(E(ul))},i.\u0275cmp=st({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&&(fe(0,pee,2,2,"h2",0),gt(1,"async"),fe(2,mee,1,1,"app-block-actions",1),$(3,"div",2),fe(4,vee,3,3,"ng-container",3),j()),2&e){let r;U("ngIf",n.name&&n.name!=(null==(r=yt(1,4,n.main.resource$))?null:r.name)),V(2),U("ngIf",!n.hideBlockActions),V(2),U("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})(),JV=(()=>{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)(E(il),E(mt))},i.\u0275dir=ve({type:i}),i})(),Nh=(()=>{class i extends JV{}return i.\u0275fac=function(){let t;return function(n){return(t||(t=ri(i)))(n||i)}}(),i.\u0275dir=ve({type:i,features:[lt]}),i})();const Do=new me("NgValueAccessor"),bee={provide:Do,useExisting:Gn(()=>Wl),multi:!0},wee=new me("CompositionEventMode");let Wl=(()=>{class i extends JV{constructor(e,n,r){super(e,n),this._compositionMode=r,this._composing=!1,null==this._compositionMode&&(this._compositionMode=!function xee(){const i=Oc()?Oc().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)(E(il),E(mt),E(wee,8))},i.\u0275dir=ve({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&&ke("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([bee]),lt]}),i})();const Mee=!1;function uu(i){return null==i||("string"==typeof i||Array.isArray(i))&&0===i.length}function tz(i){return null!=i&&"number"==typeof i.length}const qr=new me("NgValidators"),hu=new me("NgAsyncValidators"),Cee=/^(?=.{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 hl{static min(t){return nz(t)}static max(t){return iz(t)}static required(t){return function rz(i){return uu(i.value)?{required:!0}:null}(t)}static requiredTrue(t){return function sz(i){return!0===i.value?null:{required:!0}}(t)}static email(t){return function oz(i){return uu(i.value)||Cee.test(i.value)?null:{email:!0}}(t)}static minLength(t){return az(t)}static maxLength(t){return lz(t)}static pattern(t){return function cz(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(uu(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 mz(t)}static composeAsync(t){return gz(t)}}function nz(i){return t=>{if(uu(t.value)||uu(i))return null;const e=parseFloat(t.value);return!isNaN(e)&&e{if(uu(t.value)||uu(i))return null;const e=parseFloat(t.value);return!isNaN(e)&&e>i?{max:{max:i,actual:t.value}}:null}}function az(i){return t=>uu(t.value)||!tz(t.value)?null:t.value.lengthtz(t.value)&&t.value.length>i?{maxlength:{requiredLength:i,actualLength:t.value.length}}:null}function JM(i){return null}function dz(i){return null!=i}function uz(i){const t=iy(i)?Ni(i):i;if(Mee&&!kD(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 pe(-1101,e)}return t}function hz(i){let t={};return i.forEach(e=>{t=null!=e?{...t,...e}:t}),0===Object.keys(t).length?null:t}function fz(i,t){return t.map(e=>e(i))}function pz(i){return i.map(t=>function See(i){return!i.validate}(t)?t:e=>t.validate(e))}function mz(i){if(!i)return null;const t=i.filter(dz);return 0==t.length?null:function(e){return hz(fz(e,t))}}function fR(i){return null!=i?mz(pz(i)):null}function gz(i){if(!i)return null;const t=i.filter(dz);return 0==t.length?null:function(e){return PV(fz(e,t).map(uz)).pipe(et(hz))}}function pR(i){return null!=i?gz(pz(i)):null}function _z(i,t){return null===i?[t]:Array.isArray(i)?[...i,t]:[i,t]}function vz(i){return i._rawValidators}function yz(i){return i._rawAsyncValidators}function mR(i){return i?Array.isArray(i)?i:[i]:[]}function eC(i,t){return Array.isArray(i)?i.includes(t):i===t}function bz(i,t){const e=mR(t);return mR(i).forEach(r=>{eC(e,r)||e.push(r)}),e}function xz(i,t){return mR(t).filter(e=>!eC(i,e))}class wz{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=fR(this._rawValidators)}_setAsyncValidators(t){this._rawAsyncValidators=t||[],this._composedAsyncValidatorFn=pR(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 lo extends wz{get formDirective(){return null}get path(){return null}}class jl extends wz{constructor(){super(...arguments),this._parent=null,this.name=null,this.valueAccessor=null}}class Mz{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 jc=(()=>{class i extends Mz{constructor(e){super(e)}}return i.\u0275fac=function(e){return new(e||i)(E(jl,2))},i.\u0275dir=ve({type:i,selectors:[["","formControlName",""],["","ngModel",""],["","formControl",""]],hostVars:14,hostBindings:function(e,n){2&e&&ln("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:[lt]}),i})(),gR=(()=>{class i extends Mz{constructor(e){super(e)}}return i.\u0275fac=function(e){return new(e||i)(E(lo,10))},i.\u0275dir=ve({type:i,selectors:[["","formGroupName",""],["","formArrayName",""],["","ngModelGroup",""],["","formGroup",""],["form",3,"ngNoForm",""],["","ngForm",""]],hostVars:16,hostBindings:function(e,n){2&e&&ln("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:[lt]}),i})();function Cz(i,t){return i?`with name: '${t}'`:`at index: ${t}`}const yR=!1,ib="VALID",nC="INVALID",Um="PENDING",rb="DISABLED";function bR(i){return(iC(i)?i.validators:i)||null}function xR(i,t){return(iC(t)?t.asyncValidators:i)||null}function iC(i){return null!=i&&!Array.isArray(i)&&"object"==typeof i}function Sz(i,t,e){const n=i.controls;if(!(t?Object.keys(n):n).length)throw new pe(1e3,yR?function Tee(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 pe(1001,yR?function Iee(i,t){return`Cannot find form control ${Cz(i,t)}`}(t,e):"")}function Ez(i,t,e){i._forEachChild((n,r)=>{if(void 0===e[r])throw new pe(1002,yR?function Ree(i,t){return`Must supply a value for form control ${Cz(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===ib}get invalid(){return this.status===nC}get pending(){return this.status==Um}get disabled(){return this.status===rb}get enabled(){return this.status!==rb}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(bz(t,this._rawValidators))}addAsyncValidators(t){this.setAsyncValidators(bz(t,this._rawAsyncValidators))}removeValidators(t){this.setValidators(xz(t,this._rawValidators))}removeAsyncValidators(t){this.setAsyncValidators(xz(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=Um,!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=rb,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=ib,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===ib||this.status===Um)&&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()?rb:ib}_runValidator(){return this.validator?this.validator(this):null}_runAsyncValidator(t){if(this.asyncValidator){this.status=Um,this._hasOwnPendingAsyncValidator=!0;const e=uz(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 $e,this.statusChanges=new $e}_calculateStatus(){return this._allControlsDisabled()?rb:this.errors?nC:this._hasOwnPendingAsyncValidator||this._anyControlsHaveStatus(Um)?Um:this._anyControlsHaveStatus(nC)?nC:ib}_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 kee(i){return Array.isArray(i)?fR(i):i||null}(this._rawValidators)}_assignAsyncValidators(t){this._rawAsyncValidators=Array.isArray(t)?t.slice():t,this._composedAsyncValidatorFn=function Pee(i){return Array.isArray(i)?pR(i):i||null}(this._rawAsyncValidators)}}class Vm extends rC{constructor(t,e,n){super(bR(e),xR(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={}){Ez(this,!0,t),Object.keys(t).forEach(n=>{Sz(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 Az extends Vm{}const Bh=new me("CallSetDisabledState",{providedIn:"root",factory:()=>sb}),sb="always";function sC(i,t){return[...t.path,i]}function ob(i,t,e=sb){wR(i,t),t.valueAccessor.writeValue(i.value),(i.disabled||"always"===e)&&t.valueAccessor.setDisabledState?.(i.disabled),function Fee(i,t){t.valueAccessor.registerOnChange(e=>{i._pendingValue=e,i._pendingChange=!0,i._pendingDirty=!0,"change"===i.updateOn&&Dz(i,t)})}(i,t),function Nee(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 Lee(i,t){t.valueAccessor.registerOnTouched(()=>{i._pendingTouched=!0,"blur"===i.updateOn&&i._pendingChange&&Dz(i,t),"submit"!==i.updateOn&&i.markAsTouched()})}(i,t),function Oee(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 wR(i,t){const e=vz(i);null!==t.validator?i.setValidators(_z(e,t.validator)):"function"==typeof e&&i.setValidators([e]);const n=yz(i);null!==t.asyncValidator?i.setAsyncValidators(_z(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=vz(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=yz(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 Dz(i,t){i._pendingDirty&&i.markAsDirty(),i.setValue(i._pendingValue,{emitModelToViewChange:!1}),t.viewToModelUpdate(i._pendingValue),i._pendingChange=!1}function Tz(i,t){wR(i,t)}function CR(i,t){if(!i.hasOwnProperty("model"))return!1;const e=i.model;return!!e.isFirstChange()||!Object.is(t,e.currentValue)}function Iz(i,t){i._syncPendingControls(),t.forEach(e=>{const n=e.control;"submit"===n.updateOn&&n._pendingChange&&(e.viewToModelUpdate(n._pendingValue),n._pendingChange=!1)})}function SR(i,t){if(!t)return null;let e,n,r;return Array.isArray(t),t.forEach(s=>{s.constructor===Wl?e=s:function Vee(i){return Object.getPrototypeOf(i.constructor)===Nh}(s)?n=s:r=s}),r||n||e||null}const Hee={provide:lo,useExisting:Gn(()=>lb)},ab=(()=>Promise.resolve())();let lb=(()=>{class i extends lo{constructor(e,n,r){super(),this.callSetDisabledState=r,this.submitted=!1,this._directives=new Set,this.ngSubmit=new $e,this.form=new Vm({},fR(e),pR(n))}ngAfterViewInit(){this._setUpdateStrategy()}get formDirective(){return this}get control(){return this.form}get path(){return[]}get controls(){return this.form.controls}addControl(e){ab.then(()=>{const n=this._findContainer(e.path);e.control=n.registerControl(e.name,e.control),ob(e.control,e,this.callSetDisabledState),e.control.updateValueAndValidity({emitEvent:!1}),this._directives.add(e)})}getControl(e){return this.form.get(e.path)}removeControl(e){ab.then(()=>{const n=this._findContainer(e.path);n&&n.removeControl(e.name),this._directives.delete(e)})}addFormGroup(e){ab.then(()=>{const n=this._findContainer(e.path),r=new Vm({});Tz(r,e),n.registerControl(e.name,r),r.updateValueAndValidity({emitEvent:!1})})}removeFormGroup(e){ab.then(()=>{const n=this._findContainer(e.path);n&&n.removeControl(e.name)})}getFormGroup(e){return this.form.get(e.path)}updateModel(e,n){ab.then(()=>{this.form.get(e.path).setValue(n)})}setValue(e){this.control.setValue(e)}onSubmit(e){return this.submitted=!0,Iz(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)(E(qr,10),E(hu,10),E(Bh,8))},i.\u0275dir=ve({type:i,selectors:[["form",3,"ngNoForm","",3,"formGroup",""],["ng-form"],["","ngForm",""]],hostBindings:function(e,n){1&e&&ke("submit",function(s){return n.onSubmit(s)})("reset",function(){return n.onReset()})},inputs:{options:["ngFormOptions","options"]},outputs:{ngSubmit:"ngSubmit"},exportAs:["ngForm"],features:[An([Hee]),lt]}),i})();function Rz(i,t){const e=i.indexOf(t);e>-1&&i.splice(e,1)}function kz(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(bR(e),xR(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=kz(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){Rz(this._onChange,t)}registerOnDisabledChange(t){this._onDisabledChange.push(t)}_unregisterOnDisabledChange(t){Rz(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){kz(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}},Wee={provide:jl,useExisting:Gn(()=>fu)},Fz=(()=>Promise.resolve())();let fu=(()=>{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 $e,this._parent=e,this._setValidators(n),this._setAsyncValidators(r),this.valueAccessor=SR(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),CR(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(){ob(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){Fz.then(()=>{this.control.setValue(e,{emitViewToModelChange:!1}),this._changeDetectorRef?.markForCheck()})}_updateDisabled(e){const n=e.isDisabled.currentValue,r=0!==n&&function cm(i){return"boolean"==typeof i?i:null!=i&&"false"!==i}(n);Fz.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)(E(lo,9),E(qr,10),E(hu,10),E(Do,10),E(si,8),E(Bh,8))},i.\u0275dir=ve({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([Wee]),lt,xi]}),i})(),ER=(()=>{class i{}return i.\u0275fac=function(e){return new(e||i)},i.\u0275dir=ve({type:i,selectors:[["form",3,"ngNoForm","",3,"ngNativeValidate",""]],hostAttrs:["novalidate",""]}),i})();const jee={provide:Do,useExisting:Gn(()=>Uh),multi:!0};let Uh=(()=>{class i extends Nh{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=ri(i)))(n||i)}}(),i.\u0275dir=ve({type:i,selectors:[["input","type","number","formControlName",""],["input","type","number","formControl",""],["input","type","number","ngModel",""]],hostBindings:function(e,n){1&e&&ke("input",function(s){return n.onChange(s.target.value)})("blur",function(){return n.onTouched()})},features:[An([jee]),lt]}),i})(),Lz=(()=>{class i{}return i.\u0275fac=function(e){return new(e||i)},i.\u0275mod=en({type:i}),i.\u0275inj=Wt({}),i})();const AR=new me("NgModelWithFormControlWarning"),Zee={provide:lo,useExisting:Gn(()=>Vh)};let Vh=(()=>{class i extends lo{constructor(e,n,r){super(),this.callSetDisabledState=r,this.submitted=!1,this._onCollectionChange=()=>this._updateDomValue(),this.directives=[],this.form=null,this.ngSubmit=new $e,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 ob(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 zee(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,Iz(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)&&(ob(r,e,this.callSetDisabledState),e.control=r))}),this.form._updateTreeValidity({emitEvent:!1})}_setUpFormContainer(e){const n=this.form.get(e.path);Tz(n,e),n.updateValueAndValidity({emitEvent:!1})}_cleanUpFormContainer(e){if(this.form){const n=this.form.get(e.path);n&&function Bee(i,t){return lC(i,t)}(n,e)&&n.updateValueAndValidity({emitEvent:!1})}}_updateRegistrations(){this.form._registerOnCollectionChange(this._onCollectionChange),this._oldForm&&this._oldForm._registerOnCollectionChange(()=>{})}_updateValidators(){wR(this.form,this),this._oldForm&&lC(this._oldForm,this)}_checkFormPresent(){}}return i.\u0275fac=function(e){return new(e||i)(E(qr,10),E(hu,10),E(Bh,8))},i.\u0275dir=ve({type:i,selectors:[["","formGroup",""]],hostBindings:function(e,n){1&e&&ke("submit",function(s){return n.onSubmit(s)})("reset",function(){return n.onReset()})},inputs:{form:["formGroup","form"]},outputs:{ngSubmit:"ngSubmit"},exportAs:["ngForm"],features:[An([Zee]),lt,xi]}),i})();const ete={provide:jl,useExisting:Gn(()=>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 $e,this._ngModelWarningSent=!1,this._parent=e,this._setValidators(n),this._setAsyncValidators(r),this.valueAccessor=SR(0,s)}ngOnChanges(e){this._added||this._setUpControl(),CR(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)(E(lo,13),E(qr,10),E(hu,10),E(Do,10),E(AR,8))},i.\u0275dir=ve({type:i,selectors:[["","formControlName",""]],inputs:{name:["formControlName","name"],isDisabled:["disabled","isDisabled"],model:["ngModel","model"]},outputs:{update:"ngModelChange"},features:[An([ete]),lt,xi]}),i})();function Gz(i){return"number"==typeof i?i:parseInt(i,10)}function $z(i){return"number"==typeof i?i:parseFloat(i)}let zh=(()=>{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=ve({type:i,features:[xi]}),i})();const ate={provide:qr,useExisting:Gn(()=>Hh),multi:!0};let Hh=(()=>{class i extends zh{constructor(){super(...arguments),this.inputName="max",this.normalizeInput=e=>$z(e),this.createValidator=e=>iz(e)}}return i.\u0275fac=function(){let t;return function(n){return(t||(t=ri(i)))(n||i)}}(),i.\u0275dir=ve({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&&Dt("max",n._enabled?n.max:null)},inputs:{max:"max"},features:[An([ate]),lt]}),i})();const lte={provide:qr,useExisting:Gn(()=>Gh),multi:!0};let Gh=(()=>{class i extends zh{constructor(){super(...arguments),this.inputName="min",this.normalizeInput=e=>$z(e),this.createValidator=e=>nz(e)}}return i.\u0275fac=function(){let t;return function(n){return(t||(t=ri(i)))(n||i)}}(),i.\u0275dir=ve({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&&Dt("min",n._enabled?n.min:null)},inputs:{min:"min"},features:[An([lte]),lt]}),i})();const hte={provide:qr,useExisting:Gn(()=>PR),multi:!0};let PR=(()=>{class i extends zh{constructor(){super(...arguments),this.inputName="minlength",this.normalizeInput=e=>Gz(e),this.createValidator=e=>az(e)}}return i.\u0275fac=function(){let t;return function(n){return(t||(t=ri(i)))(n||i)}}(),i.\u0275dir=ve({type:i,selectors:[["","minlength","","formControlName",""],["","minlength","","formControl",""],["","minlength","","ngModel",""]],hostVars:1,hostBindings:function(e,n){2&e&&Dt("minlength",n._enabled?n.minlength:null)},inputs:{minlength:"minlength"},features:[An([hte]),lt]}),i})();const fte={provide:qr,useExisting:Gn(()=>OR),multi:!0};let OR=(()=>{class i extends zh{constructor(){super(...arguments),this.inputName="maxlength",this.normalizeInput=e=>Gz(e),this.createValidator=e=>lz(e)}}return i.\u0275fac=function(){let t;return function(n){return(t||(t=ri(i)))(n||i)}}(),i.\u0275dir=ve({type:i,selectors:[["","maxlength","","formControlName",""],["","maxlength","","formControl",""],["","maxlength","","ngModel",""]],hostVars:1,hostBindings:function(e,n){2&e&&Dt("maxlength",n._enabled?n.maxlength:null)},inputs:{maxlength:"maxlength"},features:[An([fte]),lt]}),i})(),qz=(()=>{class i{}return i.\u0275fac=function(e){return new(e||i)},i.\u0275mod=en({type:i}),i.\u0275inj=Wt({imports:[Lz]}),i})();class Xz extends rC{constructor(t,e,n){super(bR(e),xR(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={}){Ez(this,!1,t),t.forEach((n,r)=>{Sz(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 Kz(i){return!!i&&(void 0!==i.asyncValidators||void 0!==i.validators||void 0!==i.updateOn)}let mte=(()=>{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 Kz(n)?s=n:null!==n&&(s.validators=n.validator,s.asyncValidators=n.asyncValidator),new Vm(r,s)}record(e,n=null){const r=this._reduceControls(e);return new Az(r,n)}control(e,n,r){let s={};return this.useNonNullable?(Kz(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 Xz(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=Re({token:i,factory:i.\u0275fac,providedIn:"root"}),i})(),Zz=(()=>{class i{static withConfig(e){return{ngModule:i,providers:[{provide:Bh,useValue:e.callSetDisabledState??sb}]}}}return i.\u0275fac=function(e){return new(e||i)},i.\u0275mod=en({type:i}),i.\u0275inj=Wt({imports:[qz]}),i})(),Qz=(()=>{class i{static withConfig(e){return{ngModule:i,providers:[{provide:AR,useValue:e.warnOnNgModelWithFormControl??"always"},{provide:Bh,useValue:e.callSetDisabledState??sb}]}}}return i.\u0275fac=function(e){return new(e||i)},i.\u0275mod=en({type:i}),i.\u0275inj=Wt({imports:[qz]}),i})();const gte=["matFormFieldNotchedOutline",""],_te=["*"],vte=["textField"],yte=["iconPrefixContainer"],bte=["textPrefixContainer"];function xte(i,t){1&i&&Oe(0,"span",19)}function wte(i,t){if(1&i){const e=Kn();$(0,"label",17),ke("cdkObserveContent",function(){return Ht(e),Et(re(2)._refreshOutlineNotchWidth())}),Yt(1,1),fe(2,xte,1,0,"span",18),j()}if(2&i){const e=re(2);U("floating",e._shouldLabelFloat())("cdkObserveContentDisabled",!e._hasOutline())("id",e._labelId),Dt("for",e._control.id)("aria-owns",e._control.id),V(2),U("ngIf",!e.hideRequiredMarker&&e._control.required)}}function Mte(i,t){1&i&&fe(0,wte,3,6,"label",16),2&i&&U("ngIf",re()._hasFloatingLabel())}function Cte(i,t){1&i&&Oe(0,"div",20)}function Ste(i,t){}function Ete(i,t){1&i&&fe(0,Ste,0,0,"ng-template",22),2&i&&(re(2),U("ngTemplateOutlet",ir(1)))}function Ate(i,t){if(1&i&&($(0,"div",21),fe(1,Ete,1,1,"ng-template",9),j()),2&i){const e=re();U("matFormFieldNotchedOutlineOpen",e._shouldLabelFloat())("matFormFieldNotchedOutlineLabelWidth",e._labelWidth),V(1),U("ngIf",!e._forceDisplayInfixLabel())}}function Dte(i,t){1&i&&($(0,"div",23,24),Yt(2,2),j())}function Tte(i,t){1&i&&($(0,"div",25,26),Yt(2,3),j())}function Ite(i,t){}function Rte(i,t){1&i&&fe(0,Ite,0,0,"ng-template",22),2&i&&(re(),U("ngTemplateOutlet",ir(1)))}function kte(i,t){1&i&&($(0,"div",27),Yt(1,4),j())}function Pte(i,t){1&i&&($(0,"div",28),Yt(1,5),j())}function Ote(i,t){1&i&&Oe(0,"div",29)}function Fte(i,t){1&i&&($(0,"div",30),Yt(1,6),j()),2&i&&U("@transitionMessages",re()._subscriptAnimationState)}function Lte(i,t){if(1&i&&($(0,"mat-hint",34),Ve(1),j()),2&i){const e=re(2);U("id",e._hintLabelId),V(1),ui(e.hintLabel)}}function Nte(i,t){if(1&i&&($(0,"div",31),fe(1,Lte,2,2,"mat-hint",32),Yt(2,7),Oe(3,"div",33),Yt(4,8),j()),2&i){const e=re();U("@transitionMessages",e._subscriptAnimationState),V(1),U("ngIf",e.hintLabel)}}const Bte=["*",[["mat-label"]],[["","matPrefix",""],["","matIconPrefix",""]],[["","matTextPrefix",""]],[["","matTextSuffix",""]],[["","matSuffix",""],["","matIconSuffix",""]],[["mat-error"],["","matError",""]],[["mat-hint",3,"align","end"]],[["mat-hint","align","end"]]],Ute=["*","mat-label","[matPrefix], [matIconPrefix]","[matTextPrefix]","[matTextSuffix]","[matSuffix], [matIconSuffix]","mat-error, [matError]","mat-hint:not([align='end'])","mat-hint[align='end']"];let qo=(()=>{class i{}return i.\u0275fac=function(e){return new(e||i)},i.\u0275dir=ve({type:i,selectors:[["mat-label"]]}),i})(),Vte=0;const Jz=new me("MatError");let zte=(()=>{class i{constructor(e,n){this.id="mat-mdc-error-"+Vte++,e||n.nativeElement.setAttribute("aria-live","polite")}}return i.\u0275fac=function(e){return new(e||i)(_a("aria-live"),E(mt))},i.\u0275dir=ve({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&&zl("id",n.id)},inputs:{id:"id"},features:[An([{provide:Jz,useExisting:i}])]}),i})(),Hte=0,eH=(()=>{class i{constructor(){this.align="start",this.id="mat-mdc-hint-"+Hte++}}return i.\u0275fac=function(e){return new(e||i)},i.\u0275dir=ve({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&&(zl("id",n.id),Dt("align",null),ln("mat-mdc-form-field-hint-end","end"===n.align))},inputs:{align:"align",id:"id"}}),i})();const tH=new me("MatPrefix");let Gte=(()=>{class i{constructor(){this._isText=!1}set _isTextSelector(e){this._isText=!0}}return i.\u0275fac=function(e){return new(e||i)},i.\u0275dir=ve({type:i,selectors:[["","matPrefix",""],["","matIconPrefix",""],["","matTextPrefix",""]],inputs:{_isTextSelector:["matTextPrefix","_isTextSelector"]},features:[An([{provide:tH,useExisting:i}])]}),i})();const nH=new me("MatSuffix");let $te=(()=>{class i{constructor(){this._isText=!1}set _isTextSelector(e){this._isText=!0}}return i.\u0275fac=function(e){return new(e||i)},i.\u0275dir=ve({type:i,selectors:[["","matSuffix",""],["","matIconSuffix",""],["","matTextSuffix",""]],inputs:{_isTextSelector:["matTextSuffix","_isTextSelector"]},features:[An([{provide:nH,useExisting:i}])]}),i})(),iH=(()=>{class i{constructor(e){this._elementRef=e,this.floating=!1}getWidth(){return function Wte(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)(E(mt))},i.\u0275dir=ve({type:i,selectors:[["label","matFormFieldFloatingLabel",""]],hostAttrs:[1,"mdc-floating-label","mat-mdc-floating-label"],hostVars:2,hostBindings:function(e,n){2&e&&ln("mdc-floating-label--float-above",n.floating)},inputs:{floating:"floating"}}),i})();const rH="mdc-line-ripple--active",dC="mdc-line-ripple--deactivating";let sH=(()=>{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(rH,dC)},n.runOutsideAngular(()=>{e.nativeElement.addEventListener("transitionend",this._handleTransitionEnd)})}activate(){const e=this._elementRef.nativeElement.classList;e.remove(dC),e.add(rH)}deactivate(){this._elementRef.nativeElement.classList.add(dC)}ngOnDestroy(){this._elementRef.nativeElement.removeEventListener("transitionend",this._handleTransitionEnd)}}return i.\u0275fac=function(e){return new(e||i)(E(mt),E(ft))},i.\u0275dir=ve({type:i,selectors:[["div","matFormFieldLineRipple",""]],hostAttrs:[1,"mdc-line-ripple"]}),i})(),oH=(()=>{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)(E(mt),E(ft))},i.\u0275cmp=st({type:i,selectors:[["div","matFormFieldNotchedOutline",""]],hostAttrs:[1,"mdc-notched-outline"],hostVars:2,hostBindings:function(e,n){2&e&&ln("mdc-notched-outline--notched",n.open)},inputs:{labelWidth:["matFormFieldNotchedOutlineLabelWidth","labelWidth"],open:["matFormFieldNotchedOutlineOpen","open"]},attrs:gte,ngContentSelectors:_te,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&&(rr(),Oe(0,"div",0),$(1,"div",1),Yt(2),j(),Oe(3,"div",2)),2&e&&(V(1),$o("width",n._getNotchWidth()))},encapsulation:2,changeDetection:0}),i})();const jte={transitionMessages:Ia("transitionMessages",[Ps("enter",oi({opacity:1,transform:"translateY(0%)"})),Or("void => enter",[oi({opacity:0,transform:"translateY(-5px)"}),Yr("300ms cubic-bezier(0.55, 0, 0.55, 0.2)")])])};let FR=(()=>{class i{}return i.\u0275fac=function(e){return new(e||i)},i.\u0275dir=ve({type:i}),i})();const uC=new me("MatFormField"),Yte=new me("MAT_FORM_FIELD_DEFAULT_OPTIONS");let aH=0,ql=(()=>{class i{get hideRequiredMarker(){return this._hideRequiredMarker}set hideRequiredMarker(e){this._hideRequiredMarker=tn(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-"+aH++,this._hintLabelId="mat-mdc-hint-"+aH++,this._subscriptAnimationState="",this._labelWidth=0,this._destroyed=new Ie,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(He(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(),Cr(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(He(this._destroyed)).subscribe(()=>{this._needsOutlineLabelOffsetUpdateOnStable&&(this._needsOutlineLabelOffsetUpdateOnStable=!1,this._updateOutlineLabelOffset())})}),this._dir.change.pipe(He(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)(E(mt),E(si),E(ft),E(Ta),E(zi),E(Yte,8),E(kr,8),E(qt))},i.\u0275cmp=st({type:i,selectors:[["mat-form-field"]],contentQueries:function(e,n,r){if(1&e&&(Wi(r,qo,5),Wi(r,qo,7),Wi(r,FR,5),Wi(r,tH,5),Wi(r,nH,5),Wi(r,Jz,5),Wi(r,eH,5)),2&e){let s;Tt(s=It())&&(n._labelChildNonStatic=s.first),Tt(s=It())&&(n._labelChildStatic=s.first),Tt(s=It())&&(n._formFieldControl=s.first),Tt(s=It())&&(n._prefixChildren=s),Tt(s=It())&&(n._suffixChildren=s),Tt(s=It())&&(n._errorChildren=s),Tt(s=It())&&(n._hintChildren=s)}},viewQuery:function(e,n){if(1&e&&(Zn(vte,5),Zn(yte,5),Zn(bte,5),Zn(iH,5),Zn(oH,5),Zn(sH,5)),2&e){let r;Tt(r=It())&&(n._textField=r.first),Tt(r=It())&&(n._iconPrefixContainer=r.first),Tt(r=It())&&(n._textPrefixContainer=r.first),Tt(r=It())&&(n._floatingLabel=r.first),Tt(r=It())&&(n._notchedOutline=r.first),Tt(r=It())&&(n._lineRipple=r.first)}},hostAttrs:[1,"mat-mdc-form-field"],hostVars:42,hostBindings:function(e,n){2&e&&ln("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:Ute,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&&(rr(Bte),fe(0,Mte,1,1,"ng-template",null,0,kc),$(2,"div",1,2),ke("click",function(s){return n._control.onContainerClick&&n._control.onContainerClick(s)}),fe(4,Cte,1,0,"div",3),$(5,"div",4),fe(6,Ate,2,3,"div",5),fe(7,Dte,3,0,"div",6),fe(8,Tte,3,0,"div",7),$(9,"div",8),fe(10,Rte,1,1,"ng-template",9),Yt(11),j(),fe(12,kte,2,0,"div",10),fe(13,Pte,2,0,"div",11),j(),fe(14,Ote,1,0,"div",12),j(),$(15,"div",13),fe(16,Fte,2,1,"div",14),fe(17,Nte,5,2,"div",15),j()),2&e&&(V(2),ln("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),V(2),U("ngIf",!n._hasOutline()&&!n._control.disabled),V(2),U("ngIf",n._hasOutline()),V(1),U("ngIf",n._hasIconPrefix),V(1),U("ngIf",n._hasTextPrefix),V(2),U("ngIf",!n._hasOutline()||n._forceDisplayInfixLabel()),V(2),U("ngIf",n._hasTextSuffix),V(1),U("ngIf",n._hasIconSuffix),V(1),U("ngIf",!n._hasOutline()),V(1),ln("mat-mdc-form-field-subscript-dynamic-size","dynamic"===n.subscriptSizing),U("ngSwitch",n._getDisplayedMessages()),V(1),U("ngSwitchCase","error"),V(1),U("ngSwitchCase","hint"))},dependencies:[vi,vy,_y,LT,xU,eH,iH,oH,sH],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:[jte.transitionMessages]},changeDetection:0}),i})(),hC=(()=>{class i{}return i.\u0275fac=function(e){return new(e||i)},i.\u0275mod=en({type:i}),i.\u0275inj=Wt({imports:[Qn,ao,BI,Qn]}),i})();const dH=Ih({passive:!0});let Kte=(()=>{class i{constructor(e,n){this._platform=e,this._ngZone=n,this._monitoredElements=new Map}monitor(e){if(!this._platform.isBrowser)return mo;const n=Uc(e),r=this._monitoredElements.get(n);if(r)return r.subject;const s=new Ie,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,dH),n.classList.add("cdk-text-field-autofill-monitored")}),this._monitoredElements.set(n,{subject:s,unlisten:()=>{n.removeEventListener("animationstart",a,dH)}}),s}stopMonitoring(e){const n=Uc(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)(ee(zi),ee(ft))},i.\u0275prov=Re({token:i,factory:i.\u0275fac,providedIn:"root"}),i})(),Zte=(()=>{class i{}return i.\u0275fac=function(e){return new(e||i)},i.\u0275mod=en({type:i}),i.\u0275inj=Wt({}),i})();const LR=new me("MAT_INPUT_VALUE_ACCESSOR"),Qte=["button","checkbox","file","hidden","image","radio","range","reset","submit"];let Jte=0;const ene=zU(class{constructor(i,t,e,n){this._defaultErrorStateMatcher=i,this._parentForm=t,this._parentFormGroup=e,this.ngControl=n,this.stateChanges=new Ie}});let Yc=(()=>{class i extends ene{get disabled(){return this._disabled}set disabled(e){this._disabled=tn(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(hl.required)??!1}set required(e){this._required=tn(e)}get type(){return this._type}set type(e){this._type=e||"text",this._validateType(),!this._isTextarea&&iU().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=tn(e)}constructor(e,n,r,s,o,a,l,c,d,h){super(a,s,o,r),this._elementRef=e,this._platform=n,this._autofillMonitor=c,this._formField=h,this._uid="mat-input-"+Jte++,this.focused=!1,this.stateChanges=new Ie,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=>iU().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&&d.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(){Qte.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)(E(mt),E(zi),E(jl,10),E(lb,8),E(Vh,8),E(GU),E(LR,10),E(Kte),E(ft),E(uC,8))},i.\u0275dir=ve({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&&ke("focus",function(){return n._focusChanged(!0)})("blur",function(){return n._focusChanged(!1)})("input",function(){return n._onInput()}),2&e&&(zl("id",n.id)("disabled",n.disabled)("required",n.required),Dt("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),ln("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:FR,useExisting:i}]),lt,xi]}),i})(),uH=(()=>{class i{}return i.\u0275fac=function(e){return new(e||i)},i.\u0275mod=en({type:i}),i.\u0275inj=Wt({imports:[Qn,hC,hC,Zte,Qn]}),i})();function tne(i,t){if(1&i&&($(0,"mat-label"),Ve(1),j()),2&i){const e=re(2);V(1),ui(e.resource.name)}}function nne(i,t){if(1&i){const e=Kn();$(0,"mat-form-field",1),fe(1,tne,2,1,"mat-label",2),$(2,"input",3),ke("ngModelChange",function(r){return Ht(e),Et(re().resource.data=r)})("change",function(){return Ht(e),Et(re().changed.emit())}),j()()}if(2&i){const e=re();U("matTooltip",e.resourceDescription),V(1),U("ngIf",e.resource.name),V(1),U("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 ine=(()=>{class i{constructor(){this.resource=null,this.resourceDescription="",this.disabled=!1,this.changed=new $e}}return i.\u0275fac=function(e){return new(e||i)},i.\u0275cmp=st({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&&fe(0,nne,3,7,"mat-form-field",0),2&e&&U("ngIf",n.resource)},dependencies:[vi,Wl,Uh,jc,Gh,Hh,fu,ql,qo,Yc,Os],changeDetection:0}),i})();function rne(i,t){if(1&i&&($(0,"mat-label"),Ve(1),j()),2&i){const e=re(2);V(1),ui(e.resource.name)}}function sne(i,t){if(1&i){const e=Kn();$(0,"mat-form-field",1),fe(1,rne,2,1,"mat-label",2),$(2,"input",3),ke("ngModelChange",function(r){return Ht(e),Et(re().resource.data=r)})("change",function(){return Ht(e),Et(re().changed.emit())}),j()()}if(2&i){const e=re();U("matTooltip",e.resourceDescription),V(1),U("ngIf",e.resource.name),V(1),U("disabled",e.disabled||void 0!==e.resource.schema.required_value)("maxlength",e.maxLength)("minlength",e.minLength)("ngModel",e.resource.data)}}let hH=(()=>{class i{constructor(){this._resource=null,this.resourceDescription="",this.disabled=!1,this.changed=new $e,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=st({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&&fe(0,sne,3,6,"mat-form-field",0),2&e&&U("ngIf",n.resource)},dependencies:[vi,Wl,jc,PR,OR,fu,ql,qo,Yc,Os],changeDetection:0}),i})();const Xl=(i,t)=>i+(i.includes("__")?"/":"__")+t,$h=function(){return[]};function one(i,t){if(1&i&&($(0,"mat-panel-description"),Ve(1," Click to view items ("),$(2,"b"),Ve(3),j(),Ve(4,") "),j()),2&i){const e=re(2);V(3),ui((e.resourceData||ro(1,$h)).length)}}function ane(i,t){1&i&&($(0,"mat-panel-description"),Ve(1," Empty array "),j())}function lne(i,t){}function cne(i,t){if(1&i){const e=Kn();$(0,"mat-expansion-panel",4),ke("opened",function(){return Ht(e),Et(re().onContentsTrigger(!0))})("closed",function(){return Ht(e),Et(re().onContentsTrigger(!1))}),$(1,"mat-expansion-panel-header",5)(2,"mat-panel-title"),Ve(3),j(),fe(4,one,5,2,"mat-panel-description",1),fe(5,ane,2,0,"mat-panel-description",1),j(),fe(6,lne,0,0,"ng-template",6),j()}if(2&i){const e=re(),n=ir(3);V(1),U("matTooltip",e.resourceDescription),V(2),Xi(" ",e.name," "),V(1),U("ngIf",(e.resourceData||ro(5,$h)).length>0),V(1),U("ngIf",0==(e.resourceData||ro(6,$h)).length),V(1),U("ngTemplateOutlet",n)}}function dne(i,t){}function une(i,t){if(1&i&&($r(0),$(1,"h2",5),Ve(2),j(),$(3,"div",7),fe(4,dne,0,0,"ng-template",6),j(),Wr()),2&i){const e=re(),n=ir(3);V(1),U("matTooltip",e.resourceDescription),V(1),ui(e.name),V(2),U("ngTemplateOutlet",n)}}function hne(i,t){}function fne(i,t){if(1&i&&Oe(0,"app-editor",10),2&i){const e=re().$implicit,n=re(3);U("resource",n.children[n.pageIndex*n.pageSize+e])("disabled",n.disabled)}}function pne(i,t){if(1&i&&($r(0),fe(1,fne,1,2,"app-editor",9),Wr()),2&i){const e=t.$implicit,n=re(3);V(1),U("ngIf",n.pageIndex*n.pageSize+e0)}let NR=(()=>{class i{constructor(e,n){this.main=e,this.cdr=n,this._resource=null,this.resourceDescription="",this.disabled=!1,this.changed=new $e,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 Ie}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(He(this.destroyed$),vn(([n,r])=>!!this.resource&&n.startsWith(this.resource.id)&&!n.substring(this.resource.id.length+1).includes("/"))).subscribe(function(){var n=xt(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 at(null),this.imageUrl$=new at(null),this.destroyed$=new Ie,this.changed=new $e}set resource(e){this._resource$.next(e)}get resource(){return this._resource$.getValue()}ngAfterViewInit(){var e=this;return xt(function*(){e._resource$.pipe(He(e.destroyed$)).subscribe(function(){var n=xt(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)(E($c),E(ul))},i.\u0275cmp=st({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&&(Oe(0,"app-compound-block-ui",0),gt(1,"async"),fe(2,Mne,2,3,"img",1),gt(3,"async")),2&e&&(U("resource",yt(1,3,n._resource$))("fieldBlacklist",ro(7,Cne)),V(2),U("ngIf",yt(3,5,n.imageUrl$)))},dependencies:[vi,Wc,Ea],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 Ene=["*"],Rne=new me("MAT_CARD_CONFIG");let fH=(()=>{class i{constructor(e){this.appearance=e?.appearance||"raised"}}return i.\u0275fac=function(e){return new(e||i)(E(Rne,8))},i.\u0275cmp=st({type:i,selectors:[["mat-card"]],hostAttrs:[1,"mat-mdc-card","mdc-card"],hostVars:4,hostBindings:function(e,n){2&e&&ln("mat-mdc-card-outlined","outlined"===n.appearance)("mdc-card--outlined","outlined"===n.appearance)},inputs:{appearance:"appearance"},exportAs:["matCard"],ngContentSelectors:Ene,decls:1,vars:0,template:function(e,n){1&e&&(rr(),Yt(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})(),pH=(()=>{class i{}return i.\u0275fac=function(e){return new(e||i)},i.\u0275mod=en({type:i}),i.\u0275inj=Wt({imports:[Qn,ao,Qn]}),i})();class BR{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 Ie,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 UR=(()=>{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=Re({token:i,factory:i.\u0275fac,providedIn:"root"}),i})(),nie=(()=>{class i{}return i.\u0275fac=function(e){return new(e||i)},i.\u0275mod=en({type:i}),i.\u0275inj=Wt({imports:[Qn,ao,Qy,Qn]}),i})();const bH={transformPanel:Ia("transformPanel",[Or("void => enter-dropdown",Yr("120ms cubic-bezier(0, 0, 0.2, 1)",tV([oi({opacity:0,transform:"scale(1, 0.8)"}),oi({opacity:1,transform:"scale(1, 1)"})]))),Or("void => enter-dialog",Yr("150ms cubic-bezier(0, 0, 0.2, 1)",tV([oi({opacity:0,transform:"scale(0.7)"}),oi({transform:"none",opacity:1})]))),Or("* => void",Yr("100ms linear",oi({opacity:0})))]),fadeInCalendar:Ia("fadeInCalendar",[Ps("void",oi({opacity:0})),Ps("enter",oi({opacity:1})),Or("void => *",Yr("120ms 100ms cubic-bezier(0.55, 0, 0.55, 0.2)"))])},MH=function(i){return{active:i}};function bie(i,t){if(1&i){const e=Kn();$(0,"button",2),ke("click",function(){const s=Ht(e).$implicit;return Et(re().select(s))}),j()}if(2&i){const e=t.$implicit,n=re();$o("background-color",e),U("ngClass",im(3,MH,n.selectedColor===e))}}function xie(i,t){if(1&i){const e=Kn();$(0,"button",2),ke("click",function(){const s=Ht(e).$implicit;return Et(re().select(s))}),j()}if(2&i){const e=t.$implicit,n=re();$o("background-color",e),U("ngClass",im(3,MH,n.selectedColor===e))}}const wie=["button"],Mie=/^\s+/,Cie=/\s+$/,Hm=Math.round,Sie=(Math,Math,Math,/[^0-9]/g),CH=["#ffffff","#ffff00","#ff00ff","#ff0000","#c0c0c0","#808080","#808000","#800080","#800000","#00ffff","#00ff00","#008080","#008000","#0000ff","#000080","#000000"];function SH(i,t,e){const n=i.getImageData(t,e,1,1).data;return{r:n[0],g:n[1],b:n[2]}}function Wh(i){return 1==i.length?"0"+i:""+i}function Aie(i){return Math.round(255*parseFloat(i)).toString(16)}function EH(i){return Xo(i)/255}function Xo(i){return parseInt(i,16)}function AH(i,t,e,n){var r=[Wh(Hm(i).toString(16)),Wh(Hm(t).toString(16)),Wh(Hm(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 pu="(?:[-\\+]?\\d*\\.\\d+%?)|(?:[-\\+]?\\d+%?)",HR="[\\s|\\(]+("+pu+")[,|\\s]+("+pu+")[,|\\s]+("+pu+")\\s*\\)?",GR="[\\s|\\(]+("+pu+")[,|\\s]+("+pu+")[,|\\s]+("+pu+")[,|\\s]+("+pu+")\\s*\\)?",jh={CSS_UNIT:new RegExp(pu),rgb:new RegExp("rgb"+HR),rgba:new RegExp("rgba"+GR),hsl:new RegExp("hsl"+HR),hsla:new RegExp("hsla"+GR),hsv:new RegExp("hsv"+HR),hsva:new RegExp("hsva"+GR),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 $R(i){let t;return i=i.replace(Mie,"").replace(Cie,"").toLowerCase(),(t=jh.rgb.exec(i))?{r:t[1],g:t[2],b:t[3],a:1}:(t=jh.rgba.exec(i))?{r:t[1],g:t[2],b:t[3],a:t[4]}:(t=jh.hex8.exec(i))?{r:Xo(t[1]),g:Xo(t[2]),b:Xo(t[3]),a:EH(t[4])}:(t=jh.hex6.exec(i))?{r:Xo(t[1]),g:Xo(t[2]),b:Xo(t[3]),a:1}:(t=jh.hex4.exec(i))?{r:Xo(t[1]+""+t[1]),g:Xo(t[2]+""+t[2]),b:Xo(t[3]+""+t[3]),a:EH(t[4]+""+t[4])}:(t=jh.hex3.exec(i))?{r:Xo(t[1]+""+t[1]),g:Xo(t[2]+""+t[2]),b:Xo(t[3]+""+t[3]),a:1}:null}class Yh{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=AH(this.r,this.g,this.b),this.rgba=this.toRgba()}toHex(t){return AH(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 Eie(i,t,e,n,r){var s=[Wh(Hm(i).toString(16)),Wh(Hm(t).toString(16)),Wh(Hm(e).toString(16)),Wh(Aie(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 DH=(()=>{class i{constructor(e,n){this.zone=e,this.colorChanged=new $e,this.x=0,this.y=0,this.drag=!1,this._destroyed=new Ie,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){wo()},i.\u0275dir=ve({type:i,inputs:{color:"color"},outputs:{colorChanged:"colorChanged"}}),i})(),Iie=(()=>{class i extends DH{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}=SH(this.ctx,e.offsetX,e.offsetY);this.emitChange(new Yh(n,r,s))}}return i.\u0275fac=function(e){return new(e||i)(E(ft))},i.\u0275cmp=st({type:i,selectors:[["ngx-mat-color-slider"]],features:[lt],decls:1,vars:0,consts:[["id","color-strip","width","15","height","234",1,"zone-strip",3,"mousedown","mouseup"]],template:function(e,n){1&e&&($(0,"canvas",0),ke("mousedown",function(s){return n.onMousedown(s)})("mouseup",function(s){return n.onMouseup(s)}),j())}}),i})(),Rie=(()=>{class i{constructor(){}onInput(e){this._formatInput(e.target)}_formatInput(e){let n=Number(e.value.replace(Sie,""));n=isNaN(n)?0:n,e.value=n}}return i.\u0275fac=function(e){return new(e||i)},i.\u0275dir=ve({type:i,selectors:[["","ngxMatNumericColorInput",""]],hostBindings:function(e,n){1&e&&ke("input",function(s){return n.onInput(s)})}}),i})(),Pie=(()=>{class i extends DH{constructor(e){super(e,"color-block"),this.zone=e,this._resetBaseColor=!0,this.formGroup=new Vm({r:new Yl(null,[hl.required]),g:new Yl(null,[hl.required]),b:new Yl(null,[hl.required]),a:new Yl(null,[hl.required]),hex:new Yl(null,[hl.required,hl.pattern(jh.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(){Cr(this.rCtrl.valueChanges,this.gCtrl.valueChanges,this.bCtrl.valueChanges,this.aCtrl.valueChanges).pipe(He(this._destroyed),Vc(400)).subscribe(r=>{const s=new Yh(Number(this.rCtrl.value),Number(this.gCtrl.value),Number(this.bCtrl.value),Number(this.aCtrl.value));this.emitChange(s)}),this.hexCtrl.valueChanges.pipe(He(this._destroyed),Vc(400),zc()).subscribe(r=>{const s=$R(r);if(null!=s){const o=new Yh(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}=SH(this.ctx,e.offsetX,e.offsetY);this.emitChange(new Yh(n,r,s))}}return i.\u0275fac=function(e){return new(e||i)(E(ft))},i.\u0275cmp=st({type:i,selectors:[["ngx-mat-color-canvas"]],hostAttrs:[1,"ngx-mat-color-canvas"],features:[lt,xi],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&&($(0,"form",0)(1,"div",1)(2,"div",2)(3,"canvas",3),ke("mousedown",function(s){return n.onMousedown(s)})("mouseup",function(s){return n.onMouseup(s)}),j(),$(4,"ngx-mat-color-slider",4),ke("colorChanged",function(s){return n.onSliderColorChanged(s)}),j()(),$(5,"div",5)(6,"mat-form-field")(7,"mat-label"),Ve(8,"R"),j(),Oe(9,"input",6),j(),$(10,"mat-form-field")(11,"mat-label"),Ve(12,"G"),j(),Oe(13,"input",7),j(),$(14,"mat-form-field")(15,"mat-label"),Ve(16,"B"),j(),Oe(17,"input",8),j()()(),$(18,"div",1),Oe(19,"button",9),$(20,"mat-form-field")(21,"mat-label"),Ve(22,"HEX6"),j(),$(23,"mat-label",10),Ve(24,"#\xa0"),j(),Oe(25,"input",11),j(),$(26,"mat-form-field",12)(27,"mat-label"),Ve(28,"A"),j(),Oe(29,"input",13),j()()()),2&e&&(U("formGroup",n.formGroup),V(19),$o("background-color",(null==n.color?null:n.color.rgba)||"transparent"))},dependencies:[Yc,ql,qo,Gte,bV,ER,Wl,Uh,jc,gR,Gh,Hh,Vh,cC,Iie,Rie],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})(),Oie=(()=>{class i{constructor(){this.colorChanged=new $e,this.colors1=CH.slice(0,8),this.colors2=CH.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}=$R(e);this.colorChanged.emit(new Yh(n,r,s,o))}}return i.\u0275fac=function(e){return new(e||i)},i.\u0275cmp=st({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&&($(0,"div",0),fe(1,bie,1,5,"button",1),j(),$(2,"div",0),fe(3,xie,1,5,"button",1),j()),2&e&&(V(1),U("ngForOf",n.colors1),V(2),U("ngForOf",n.colors2))},dependencies:[dm,oo,bV],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})(),TH=(()=>{class i{constructor(){this.colorChanged=new $e}ngOnInit(){}handleColorChanged(e){this.colorChanged.emit(e)}}return i.\u0275fac=function(e){return new(e||i)},i.\u0275cmp=st({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&&($(0,"ngx-mat-color-canvas",0),ke("colorChanged",function(s){return n.handleColorChanged(s)}),j(),$(1,"ngx-mat-color-collection",0),ke("colorChanged",function(s){return n.handleColorChanged(s)}),j()),2&e&&(U("color",n.color),V(1),U("color",n.color))},dependencies:[Pie,Oie],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})(),WR=(()=>{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=$R(e);return n?new Yh(n.r,n.g,n.b,n.a):null}}return i.\u0275fac=function(e){return new(e||i)},i.\u0275prov=Re({token:i,factory:i.\u0275fac}),i})();const Fie={display:{colorInput:"hex"}},IH=new me("mat-color-formats"),RH=new me("ngx-mat-colorpicker-scroll-strategy"),Nie={provide:RH,deps:[as],useFactory:function Lie(i){return()=>i.scrollStrategies.reposition()}},Bie=Ky(class{constructor(i){this._elementRef=i}});let kH=(()=>{class i extends Bie{constructor(e){super(e)}}return i.\u0275fac=function(e){return new(e||i)(E(mt))},i.\u0275cmp=st({type:i,selectors:[["ngx-mat-color-picker-content"]],viewQuery:function(e,n){if(1&e&&Zn(TH,5),2&e){let r;Tt(r=It())&&(n._palette=r.first)}},hostAttrs:[1,"ngx-mat-colorpicker-content"],hostVars:3,hostBindings:function(e,n){2&e&&(Ew("@transformPanel","enter"),ln("ngx-mat-colorpicker-content-touch",n.picker.touchUi))},inputs:{color:"color"},exportAs:["ngxMatColorPickerContent"],features:[lt],decls:1,vars:1,consts:[[3,"color","colorChanged"]],template:function(e,n){1&e&&($(0,"ngx-mat-color-palette",0),ke("colorChanged",function(s){return n.picker.select(s)}),j()),2&e&&U("color",n.picker._selected)},dependencies:[TH],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:[bH.transformPanel,bH.fadeInCalendar]},changeDetection:0}),i})(),PH=(()=>{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 $e,this.closedStream=new $e,this._touchUi=!1,this._opened=!1,this._defaultColor="primary",this._validSelected=null,this._disabledChange=new Ie,this._focusedElementBeforeOpen=null,this._inputSubscription=Qt.EMPTY,this._selectedChanged=new Ie,this._scrollStrategy=a}get disabled(){return void 0===this._disabled&&this._pickerInput?this._pickerInput.disabled:!!this._disabled}set disabled(e){const n=tn(e);n!==this._disabled&&(this._disabled=n,this._disabledChange.next(n))}get touchUi(){return this._touchUi}set touchUi(e){this._touchUi=tn(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(kH,{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 kh(kH,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(Oi(1)).subscribe(()=>{this._popupRef.updatePosition()}))}_createPopup(){const e=new Im({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"),Cr(this._popupRef.backdropClick(),this._popupRef.detachments(),this._popupRef.keydownEvents().pipe(vn(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)(E(Lm),E(as),E(ft),E(WR),E(Ta,8),E(RH),E(qt,8),E(jr))},i.\u0275cmp=st({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 Uie={provide:Do,useExisting:Gn(()=>gC),multi:!0},Vie={provide:qr,useExisting:Gn(()=>gC),multi:!0};let gC=(()=>{class i{constructor(e,n,r,s){if(this._elementRef=e,this._formField=n,this._colorFormats=r,this._adapter=s,this.colorChange=new $e,this.colorInput=new $e,this._disabledChange=new $e,this._valueChange=new $e,this._onTouched=()=>{},this._cvaOnChange=()=>{},this._validatorOnChange=()=>{},this._pickerSubscription=Qt.EMPTY,this._validator=hl.compose([]),this._lastValueValid=!1,!this._colorFormats)throw function Tie(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=tn(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)(E(mt),E(ql,8),E(IH,8),E(WR))},i.\u0275dir=ve({type:i,selectors:[["input","ngxMatColorPicker",""]],hostVars:3,hostBindings:function(e,n){1&e&&ke("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&&(zl("disabled",n.disabled),Dt("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([Uie,Vie,{provide:LR,useExisting:i}])]}),i})(),zie=(()=>{class i{constructor(e){this._cd=e,this._stateChanges=Qt.EMPTY}get disabled(){if(null==this._disabled&&this.picker)return this.picker.disabled}set disabled(e){this._disabled=e}ngOnInit(){}ngOnChanges(e){e.picker&&this._watchStateChanges()}ngOnDestroy(){this._stateChanges.unsubscribe()}ngAfterContentInit(){this._watchStateChanges()}open(e){this.picker&&!this.disabled&&(this.picker.open(),e.stopPropagation())}_watchStateChanges(){const e=this.picker?this.picker._disabledChange:ht(),n=this.picker&&this.picker._pickerInput?this.picker._pickerInput._disabledChange:ht(),r=this.picker?Cr(this.picker.openedStream,this.picker.closedStream):ht();this._stateChanges.unsubscribe(),this._stateChanges=Cr(e,n,r).subscribe(()=>this._cd.markForCheck())}}return i.\u0275fac=function(e){return new(e||i)(E(si))},i.\u0275cmp=st({type:i,selectors:[["ngx-mat-color-toggle"]],viewQuery:function(e,n){if(1&e&&Zn(wie,5),2&e){let r;Tt(r=It())&&(n._button=r.first)}},hostAttrs:[1,"ngx-mat-color-toggle"],hostVars:7,hostBindings:function(e,n){1&e&&ke("focus",function(){return n._button.focus()}),2&e&&(Dt("tabindex",-1),ln("ngx-mat-color-toggle-active",n.picker&&n.picker.opened)("mat-accent",n.picker&&"accent"===n.picker.color)("mat-warn",n.picker&&"warn"===n.picker.color))},inputs:{picker:["for","picker"],tabIndex:"tabIndex",disabled:"disabled"},exportAs:["ngxMatColorPickerToggle"],features:[xi],decls:4,vars:5,consts:[["mat-icon-button","","type","button",3,"disabled","click"],["button",""]],template:function(e,n){1&e&&($(0,"button",0,1),ke("click",function(s){return n.open(s)}),$(2,"mat-icon"),Ve(3,"palette"),j()()),2&e&&(U("disabled",n.disabled),Dt("aria-haspopup",n.picker?"dialog":null)("tabindex",n.disabled?-1:n.tabIndex),V(2),$o("color",null==n.picker||null==n.picker._selected?null:n.picker._selected.rgba))},dependencies:[WM,hR],styles:[".mat-form-field-appearance .mat-form-field-prefix .ngx-mat-color-toggle-default-icon,.mat-form-field-appearance .mat-form-field-suffix .ngx-mat-color-toggle-default-icon{width:1em}.mat-form-field:not(.mat-form-field-appearance) .mat-form-field-prefix .ngx-mat-color-toggle-default-icon,.mat-form-field:not(.mat-form-field-appearance) .mat-form-field-suffix .ngx-mat-color-toggle-default-icon{display:block;width:1.5em;height:1.5em}.mat-form-field:not(.mat-form-field-appearance) .mat-form-field-prefix .mat-icon-button .ngx-mat-color-toggle-default-icon,.mat-form-field:not(.mat-form-field-appearance) .mat-form-field-suffix .mat-icon-button .ngx-mat-color-toggle-default-icon{margin:auto}\n"],encapsulation:2}),i})(),Hie=(()=>{class i{}return i.\u0275fac=function(e){return new(e||i)},i.\u0275mod=en({type:i}),i.\u0275inj=Wt({providers:[WR,Nie],imports:[ao,uH,jM,pH,nie,Zz,Qz,pV,Ph,ZV]}),i})();const Gie=["picker"],$ie=function(i){return{"background-color":i}};function Wie(i,t){if(1&i){const e=Kn();$(0,"div",5),ke("click",function(r){const o=Ht(e).index;return Et(re().onColorClicked(r.currentTarget,o))}),j()}if(2&i){const e=t.$implicit,n=t.index,r=re();U("ngStyle",im(2,$ie,"#"+r.lpad(e.toString(16),"0",8)))("matTooltip",n+": #"+e.toString(16))}}const jie=function(){return["colors"]};let Yie=(()=>{class i{constructor(){this.resource=null,this.changed=new $e,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 gU;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=st({type:i,selectors:[["app-palette-block-ui"]],viewQuery:function(e,n){if(1&e&&Zn(Gie,5),2&e){let r;Tt(r=It())&&(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&&(Oe(0,"app-compound-block-ui",0),$(1,"div",1),fe(2,Wie,1,4,"div",2),j(),$(3,"input",3),ke("colorChange",function(s){return n.onColorChange(s.value)}),j(),Oe(4,"ngx-mat-color-picker",null,4)),2&e){const r=ir(5);U("resource",n.resource)("fieldBlacklist",ro(4,jie)),V(2),U("ngForOf",null==n.resourceData?null:n.resourceData.colors),V(1),U("ngxMatColorPicker",r)}},dependencies:[oo,Zw,Yc,Os,gC,PH,Wc],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 qie=["editorBody"];function Xie(i,t){if(1&i&&($(0,"div",11),Ve(1),j()),2&i){const e=re().$implicit;V(1),ui(e.offset)}}function Kie(i,t){if(1&i){const e=Kn();$(0,"input",12),ke("input",function(r){const o=Ht(e).index,a=re().index;return Et(re().onHexInput(r,a,o))})("focus",function(r){const o=Ht(e).index;return Et(re(2).onHexFocus(r,o))})("blur",function(r){return Ht(e),Et(re(2).onHexBlur(r))}),j()}if(2&i){const e=t.$implicit,n=t.index;U("id","hex_input__"+re().index+"__"+n)("value",e[0])("disabled",null===e[0])}}function Zie(i,t){1&i&&Oe(0,"div",3)}function Qie(i,t){if(1&i){const e=Kn();$(0,"span",15),ke("click",function(){const s=Ht(e).index,o=re(2).index;return Et(re().blurInput(o,s))}),Ve(1),j()}if(2&i){const e=t.$implicit,n=t.index;U("id","utf_char__"+re(2).index+"__"+n),V(1),ui(e[1])}}function Jie(i,t){if(1&i&&($(0,"div",13),fe(1,Qie,2,2,"span",14),j()),2&i){const e=re().$implicit,n=re();V(1),U("ngForOf",e.values)("ngForTrackBy",n.trackByIndex)}}function ere(i,t){if(1&i&&($(0,"div",5),fe(1,Xie,2,1,"div",6),gt(2,"async"),$(3,"div",7),fe(4,Kie,1,3,"input",8),j(),fe(5,Zie,1,0,"div",9),gt(6,"async"),gt(7,"async"),fe(8,Jie,2,2,"div",10),gt(9,"async"),j()),2&i){const e=t.$implicit,n=t.index,r=re();ln("gray",n%2!=0),V(1),U("ngIf",yt(2,7,r._showOffsets$)),V(3),U("ngForOf",e.values)("ngForTrackBy",r.trackByIndex),V(1),U("ngIf",yt(6,9,r._showOffsets$)||yt(7,11,r._showUtf8$)),V(3),U("ngIf",yt(9,13,r._showUtf8$))}}function tre(i,t){if(1&i){const e=Kn();$(0,"div",16)(1,"button",17),ke("click",function(){return Ht(e),Et(re().changePage(-1))}),gt(2,"async"),Ve(3,"Previous"),j(),$(4,"span"),Ve(5),gt(6,"async"),gt(7,"async"),j(),$(8,"button",17),ke("click",function(){return Ht(e),Et(re().changePage(1))}),gt(9,"async"),gt(10,"async"),Ve(11," Next "),j()()}if(2&i){const e=re();V(1),U("disabled",0===yt(2,4,e.currentPage$)),V(4),Mh("Page ",(yt(6,6,e.currentPage$)||0)+1," of ",yt(7,8,e.totalPages$),""),V(3),U("disabled",(yt(9,10,e.currentPage$)||0)>=(yt(10,12,e.totalPages$)||0)-1)}}let nre=(()=>{class i{set maxColumns(e){this._maxColumns$.next(e)}set maxRows(e){this._maxRows$.next(e)}set showOffsets(e){this._showOffsets$.next(e)}set showUtf8(e){this._showUtf8$.next(e)}set data(e){if(e!==this._data$.value){if(e.length===this._data$.value.length){for(let n=0;n=32&&e<=126?String.fromCharCode(e):"."]}ngAfterViewInit(){new ResizeObserver(e=>{for(const n of e)this.viewportSize$.next([n.contentRect.width,n.contentRect.height])}).observe(this.editorBody.nativeElement),Aa([this.viewportSize$,this._maxColumns$,this._maxRows$,this._showOffsets$,this._showUtf8$]).pipe(He(this.destroyed$),Hy(50)).subscribe(([[e,n],r,s,o,a])=>{let l=e-8;o&&(l-=68);let c=34;a&&(l-=8,c+=10);let h=Math.floor(l/c);r>0&&h>r&&(h=r);let p=this.pageSize$.value[0];h===p+1&&l/c%1<.5&&(h=p),h=Math.max(1,h);let m=Math.floor(n/28);s>0&&m>s&&(m=s),m=Math.max(1,m),(h!=this.pageSize$.value[0]||m!==this.pageSize$.value[1])&&this.pageSize$.next([h,m])}),Aa([this._data$,this.currentPage$,this.pageSize$]).pipe(He(this.destroyed$)).subscribe(([e,n,r])=>{if(0===r[0]||0===r[1])return;let s=Math.max(1,Math.ceil(Math.ceil(e.length/r[0])/r[1]));if(this.totalPages$.value!==s&&this.totalPages$.next(s),n>=s)return void this.currentPage$.next(n=s-1);const o=[];for(let a=n*r[0]*r[1];a=0&&a<=255&&(this.data[(this.currentPage$.value*this.pageSize$.value[1]+n)*this.pageSize$.value[0]+r]=a,this.renderedRows$.value[n].values[r]=this.renderValue(a),this.cdr.detectChanges(),this.dataChange.emit(this.data),this.goToNextInput(s.id))}}onHexFocus(e,n){const r=e.target,s=r.closest(".row");s&&s.querySelectorAll(".utf8-values span").forEach((a,l)=>{a.classList.toggle("highlight",l===n)}),r.select()}onHexBlur(e){const r=e.target.closest(".row");r&&r.querySelectorAll(".utf8-values span").forEach(o=>{o.classList.remove("highlight")})}}return i.\u0275fac=function(e){return new(e||i)(E(si))},i.\u0275cmp=st({type:i,selectors:[["hex-editor"]],viewQuery:function(e,n){if(1&e&&Zn(qie,5),2&e){let r;Tt(r=It())&&(n.editorBody=r.first)}},inputs:{maxColumns:"maxColumns",maxRows:"maxRows",showOffsets:"showOffsets",showUtf8:"showUtf8",data:"data",readOnly:"readOnly"},outputs:{dataChange:"dataChange"},decls:7,vars:7,consts:[[1,"editor-body"],["editorBody",""],["class","row",3,"gray",4,"ngFor","ngForOf","ngForTrackBy"],[1,"flex-spacer"],["class","pagination",4,"ngIf"],[1,"row"],["class","offset",4,"ngIf"],[1,"hex-values"],["maxlength","2",3,"id","value","disabled","input","focus","blur",4,"ngFor","ngForOf","ngForTrackBy"],["class","flex-spacer",4,"ngIf"],["class","utf8-values",4,"ngIf"],[1,"offset"],["maxlength","2",3,"id","value","disabled","input","focus","blur"],[1,"utf8-values"],[3,"id","click",4,"ngFor","ngForOf","ngForTrackBy"],[3,"id","click"],[1,"pagination"],[3,"disabled","click"]],template:function(e,n){1&e&&($(0,"div",0,1),fe(2,ere,10,15,"div",2),gt(3,"async"),Oe(4,"div",3),j(),fe(5,tre,12,14,"div",4),gt(6,"async")),2&e&&(V(2),U("ngForOf",yt(3,3,n.renderedRows$))("ngForTrackBy",n.trackByIndex),V(3),U("ngIf",(yt(6,5,n.totalPages$)||0)>1))},dependencies:[oo,vi,Ea],styles:["[_nghost-%COMP%]{display:flex;flex-direction:column;font-family:monospace}.editor-body[_ngcontent-%COMP%]{display:flex;flex-grow:1;flex-direction:column;overflow-y:hidden}.row[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:center;height:24px;margin-bottom:4px}.row.gray[_ngcontent-%COMP%]{background-color:#d3d3d3}.offset[_ngcontent-%COMP%]{width:60px;text-align:left;margin-right:8px}.hex-values[_ngcontent-%COMP%]{display:flex;gap:2px;flex-shrink:1;overflow-x:clip}.hex-values[_ngcontent-%COMP%] input[_ngcontent-%COMP%]{width:32px;text-align:center;box-sizing:border-box}.utf8-values[_ngcontent-%COMP%]{margin-left:8px}.utf8-values[_ngcontent-%COMP%] span[_ngcontent-%COMP%]{display:inline-block;width:8px;margin-left:2px;color:#000}.utf8-values[_ngcontent-%COMP%] span.highlight[_ngcontent-%COMP%]{background-color:#ff0}.pagination[_ngcontent-%COMP%]{display:flex;justify-content:space-between;align-items:center;margin-top:1em}.flex-spacer[_ngcontent-%COMP%]{flex-grow:1}"],changeDetection:0}),i})(),ire=(()=>{class i{}return i.\u0275fac=function(e){return new(e||i)},i.\u0275mod=en({type:i}),i.\u0275inj=Wt({imports:[ao]}),i})();const rre=["editor"];let sre=(()=>{class i{constructor(){this._resource=null,this.empty=new Uint8Array,this.data$=new at(new Uint8Array),this.resourceDescription="",this.disabled=!1,this.changed=new $e}get resource(){return this._resource}set resource(e){this._resource=e,this.data$.next(new Uint8Array(e?e.data:0))}onDataChange(e){this._resource.data=Array.from(e),this.changed.emit()}}return i.\u0275fac=function(e){return new(e||i)},i.\u0275cmp=st({type:i,selectors:[["app-binary-block-ui"]],viewQuery:function(e,n){if(1&e&&Zn(rre,5),2&e){let r;Tt(r=It())&&(n.editorDiv=r.first)}},inputs:{resource:"resource",resourceDescription:"resourceDescription",disabled:"disabled"},outputs:{changed:"changed"},decls:5,vars:10,consts:[["matTooltipPosition","above",3,"matTooltip"],[3,"data","maxColumns","showOffsets","readOnly","dataChange"]],template:function(e,n){1&e&&($(0,"h2",0),Ve(1),j(),$(2,"hex-editor",1),ke("dataChange",function(s){return n.onDataChange(s)}),gt(3,"async"),gt(4,"async"),j()),2&e&&(U("matTooltip",n.resourceDescription),V(1),ui(null==n.resource?null:n.resource.name),V(1),U("data",yt(3,6,n.data$)||n.empty)("maxColumns",8)("showOffsets",(yt(4,8,n.data$)||n.empty).length>16)("readOnly",n.disabled))},dependencies:[Os,nre,Ea],changeDetection:0}),i})();const ore=["picker"];function are(i,t){if(1&i&&($(0,"mat-label",8),Ve(1),j()),2&i){const e=re();V(1),ui(null==e.resource?null:e.resource.name)}}const lre=function(i){return{transform:i}};let cre=(()=>{class i{constructor(e){this.cdr=e,this.resource=null,this.resourceDescription="",this.changed=new $e,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)(E(si))},i.\u0275cmp=st({type:i,selectors:[["app-angle-block-ui"]],viewQuery:function(e,n){if(1&e&&Zn(ore,5),2&e){let r;Tt(r=It())&&(n.picker=r.first)}},hostBindings:function(e,n){1&e&&ke("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&&($(0,"div",0)(1,"div",1,2)(3,"div",3),Oe(4,"div",4)(5,"div",5),j()(),$(6,"div",6),fe(7,are,2,1,"mat-label",7),$(8,"mat-label"),Ve(9),gt(10,"number"),j(),$(11,"mat-label"),Ve(12),gt(13,"number"),j()()()),2&e&&(U("matTooltip",n.resourceDescription),V(3),U("ngStyle",im(11,lre,"rotate("+((null==n.resource?null:n.resource.data)||0)+"rad)")),V(4),U("ngIf",null==n.resource?null:n.resource.name),V(2),Xi("",XD(10,5,180*(null==n.resource?null:n.resource.data)/n.pi||0,"1.2-2")," deg"),V(3),Xi("",XD(13,8,(null==n.resource?null:n.resource.data)||0,"1.2-2")," rad"))},dependencies:[vi,Zw,qo,Os,lB],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 jR{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,d=new Set;for(const h of e)!0===Array.isArray(h)?a.add(h):"object"==typeof h?l.add(h):"function"==typeof h?d.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===d.size){h=!0;for(const p of o)if(!1===d.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 dre(i,t){if(1&i&&($(0,"mat-list-option",3),Ve(1),j()),2&i){const e=t.$implicit,n=re();U("value",e)("selected",n.selectedValue==e),V(1),Xi(" ",e," ")}}function ure(i,t){if(1&i&&($(0,"mat-card"),Oe(1,"app-editor",4),j()),2&i){const e=re();V(1),U("resource",e.resources[e.selectedValue])}}let _C=(()=>{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)(E(jR))},i.\u0275cmp=st({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&&($(0,"mat-selection-list",0),ke("selectionChange",function(s){return n.selectedValue=s.source.selectedOptions.selected[0].value}),fe(1,dre,2,3,"mat-list-option",1),j(),fe(2,ure,2,1,"mat-card",2)),2&e&&(U("multiple",!1),V(1),U("ngForOf",n.keys),V(1),U("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})(),hre=(()=>{class i{constructor(){this._resource=null,this.resourceMap={},this.changed=new $e}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",JI("@transformPanel",[QI()],{optional:!0}))]),transformPanel:Ia("transformPanel",[Ps("void",oi({opacity:0,transform:"scale(1, 0.8)"})),Or("void => showing",Yr("120ms cubic-bezier(0, 0, 0.2, 1)",oi({opacity:1,transform:"scale(1, 1)"}))),Or("* => void",Yr("100ms linear",oi({opacity:0})))])};let OH=0;const FH=new me("mat-select-scroll-strategy"),Cre=new me("MAT_SELECT_CONFIG"),Sre={provide:FH,deps:[as],useFactory:function Mre(i){return()=>i.scrollStrategies.reposition()}},Ere=new me("MatSelectTrigger");class Are{constructor(t,e){this.source=t,this.value=e}}const Dre=HM(XI(zM(zU(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 Ie}}))));let Tre=(()=>{class i extends Dre{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(hl.required)??!1}set required(e){this._required=tn(e),this.stateChanges.next()}get multiple(){return this._multiple}set multiple(e){this._multiple=tn(e)}get disableOptionCentering(){return this._disableOptionCentering}set disableOptionCentering(e){this._disableOptionCentering=tn(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=ks(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,d,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=d,this._liveAnnouncer=g,this._defaultOptions=b,this._panelOpen=!1,this._compareWith=(v,y)=>v===y,this._uid="mat-select-"+OH++,this._triggerAriaLabelledBy=null,this._destroy=new Ie,this._onChange=()=>{},this._onTouched=()=>{},this._valueId="mat-select-value-"+OH++,this._panelDoneAnimatingStream=new Ie,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=My(()=>{const v=this.options;return v?v.changes.pipe(Eo(v),Rs(()=>Cr(...v.map(y=>y.onSelectionChange)))):this._ngZone.onStable.pipe(Oi(1),Rs(()=>this.optionSelectionChanges))}),this.openedChange=new $e,this._openedStream=this.openedChange.pipe(vn(v=>v),et(()=>{})),this._closedStream=this.openedChange.pipe(vn(v=>!v),et(()=>{})),this.selectionChange=new $e,this.valueChange=new $e,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 BR(this.multiple),this.stateChanges.next(),this._panelDoneAnimatingStream.pipe(zc(),He(this._destroy)).subscribe(()=>this._panelDoneAnimating(this.panelOpen))}ngAfterContentInit(){this._initKeyManager(),this._selectionModel.changed.pipe(He(this._destroy)).subscribe(e=>{e.added.forEach(n=>n.select()),e.removed.forEach(n=>n.deselect())}),this.options.changes.pipe(Eo(null),He(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&&!Yo(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||Yo(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(Oi(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 BZ(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=Cr(this.options.changes,this._destroy);this.optionSelectionChanges.pipe(He(e)).subscribe(n=>{this._onSelect(n.source,n.isUserInput),n.isUserInput&&!this.multiple&&this._panelOpen&&(this.close(),this.focus())}),Cr(...this.options.map(n=>n._stateChanges)).pipe(He(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)(E(RM),E(si),E(ft),E(GU),E(mt),E(Ta,8),E(lb,8),E(Vh,8),E(uC,8),E(jl,10),_a("tabindex"),E(FH),E(WI),E(Cre,8))},i.\u0275dir=ve({type:i,viewQuery:function(e,n){if(1&e&&(Zn(fre,5),Zn(pre,5),Zn(vU,5)),2&e){let r;Tt(r=It())&&(n.trigger=r.first),Tt(r=It())&&(n.panel=r.first),Tt(r=It())&&(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:[lt,xi]}),i})(),db=(()=>{class i extends Tre{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(He(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 TQ(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 Are(this,e)}_getOverlayWidth(){return(this._preferredOverlayOrigin instanceof NI?this._preferredOverlayOrigin.elementRef:this._preferredOverlayOrigin||this._elementRef).nativeElement.getBoundingClientRect().width}get hideSingleSelectionIndicator(){return this._hideSingleSelectionIndicator}set hideSingleSelectionIndicator(e){this._hideSingleSelectionIndicator=tn(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=ri(i)))(n||i)}}(),i.\u0275cmp=st({type:i,selectors:[["mat-select"]],contentQueries:function(e,n,r){if(1&e&&(Wi(r,Ere,5),Wi(r,Fm,5),Wi(r,ZU,5)),2&e){let s;Tt(s=It())&&(n.customTrigger=s.first),Tt(s=It())&&(n.options=s),Tt(s=It())&&(n.optionGroups=s)}},hostAttrs:["role","combobox","aria-autocomplete","none","aria-haspopup","listbox",1,"mat-mdc-select"],hostVars:19,hostBindings:function(e,n){1&e&&ke("keydown",function(s){return n._handleKeydown(s)})("focus",function(){return n._onFocus()})("blur",function(){return n._onBlur()}),2&e&&(Dt("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()),ln("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:FR,useExisting:i},{provide:KU,useExisting:i}]),lt],ngContentSelectors:xre,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&&(rr(bre),$(0,"div",0,1),ke("click",function(){return n.toggle()}),$(3,"div",2),fe(4,mre,2,1,"span",3),fe(5,vre,3,2,"span",4),j(),$(6,"div",5)(7,"div",6),ki(),$(8,"svg",7),Oe(9,"path",8),j()()()(),fe(10,yre,3,9,"ng-template",9),ke("backdropClick",function(){return n.close()})("attach",function(){return n._onAttached()})("detach",function(){return n.close()})),2&e){const r=ir(1);Dt("aria-owns",n.panelOpen?n.id+"-panel":null),V(3),U("ngSwitch",n.empty),Dt("id",n._valueId),V(1),U("ngSwitchCase",!0),V(1),U("ngSwitchCase",!1),V(5),U("cdkConnectedOverlayPanelClass",n._overlayPanelClass)("cdkConnectedOverlayScrollStrategy",n._scrollStrategy)("cdkConnectedOverlayOrigin",n._preferredOverlayOrigin||r)("cdkConnectedOverlayOpen",n.panelOpen)("cdkConnectedOverlayPositions",n._positions)("cdkConnectedOverlayWidth",n._overlayWidth)}},dependencies:[dm,_y,LT,rB,vU,NI],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:[wre.transformPanel]},changeDetection:0}),i})(),LH=(()=>{class i{}return i.\u0275fac=function(e){return new(e||i)},i.\u0275mod=en({type:i}),i.\u0275inj=Wt({providers:[Sre],imports:[ao,Rm,ZI,Qn,Yy,hC,ZI,Qn]}),i})();function Ire(i,t){if(1&i&&($(0,"mat-label"),Ve(1),j()),2&i){const e=re(3);V(1),ui(e.resource.name)}}function Rre(i,t){if(1&i&&($(0,"mat-option",6),Ve(1),j()),2&i){const e=t.$implicit,n=re(3);U("value",e[1])("disabled",n.disabled),V(1),Xi(" ",e[1]," ")}}function kre(i,t){if(1&i){const e=Kn();$(0,"mat-form-field",3),fe(1,Ire,2,1,"mat-label",0),$(2,"mat-select",4),ke("valueChange",function(r){return Ht(e),Et(re(2).resource.data=r)})("selectionChange",function(){return Ht(e),Et(re(2).changed.emit())}),fe(3,Rre,2,3,"mat-option",5),j()()}if(2&i){const e=re(2);U("matTooltip",e.resourceDescription),V(1),U("ngIf",e.resource.name),V(1),U("value",e.resource.data)("disabled",e.disabled),V(1),U("ngForOf",e.resource.schema.enum_names)}}function Pre(i,t){if(1&i&&($(0,"mat-label"),Ve(1),j()),2&i){const e=re(3);V(1),ui(e.resource.name)}}function Ore(i,t){if(1&i){const e=Kn();$(0,"mat-form-field",3),fe(1,Pre,2,1,"mat-label",0),$(2,"input",7),ke("ngModelChange",function(r){return Ht(e),Et(re(2).resource.data=r)})("change",function(){return Ht(e),Et(re(2).changed.emit())}),j()()}if(2&i){const e=re(2);U("matTooltip",e.resourceDescription),V(1),U("ngIf",e.resource.name),V(1),U("min",0)("max",256*(e.resource.schema.length||1)-1)("ngModel",e.resource.data)}}function Fre(i,t){if(1&i&&($r(0),fe(1,kre,4,5,"mat-form-field",1),fe(2,Ore,3,5,"ng-template",null,2,kc),Wr()),2&i){const e=ir(3),n=re();V(1),U("ngIf",n.isKnownEnumValue(n.resource.data))("ngIfElse",e)}}let Lre=(()=>{class i{constructor(){this.resource=null,this.resourceDescription="",this.disabled=!1,this.changed=new $e}isKnownEnumValue(e){return!!this.resource?.schema.enum_names.find(([n,r])=>r==e)}}return i.\u0275fac=function(e){return new(e||i)},i.\u0275cmp=st({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&&fe(0,Fre,4,2,"ng-container",0),2&e&&U("ngIf",n.resource)},dependencies:[oo,vi,Wl,Uh,jc,Gh,Hh,fu,ql,qo,Yc,Os,db,Fm],changeDetection:0}),i})();const Nre=["*"],Ure=["unscopedContent"];function Vre(i,t){1&i&&Yt(0,4)}function zre(i,t){if(1&i&&($(0,"div",11),Oe(1,"input",12),$(2,"div",13),ki(),$(3,"svg",14),Oe(4,"path",15),j(),pa(),Oe(5,"div",16),j()()),2&i){const e=re();ln("mdc-checkbox--disabled",e.disabled),V(1),U("checked",e.selected)("disabled",e.disabled)}}function Hre(i,t){if(1&i&&($(0,"div",17),Oe(1,"input",18),$(2,"div",19),Oe(3,"div",20)(4,"div",21),j()()),2&i){const e=re();ln("mdc-radio--disabled",e.disabled),V(1),U("checked",e.selected)("disabled",e.disabled)}}function Gre(i,t){}function $re(i,t){if(1&i&&($(0,"span",22),fe(1,Gre,0,0,"ng-template",23),j()),2&i){re();const e=ir(3);V(1),U("ngTemplateOutlet",e)}}function Wre(i,t){}function jre(i,t){if(1&i&&($(0,"span",24),fe(1,Wre,0,0,"ng-template",23),j()),2&i){re();const e=ir(5);V(1),U("ngTemplateOutlet",e)}}function Yre(i,t){}function qre(i,t){1&i&&fe(0,Yre,0,0,"ng-template",23),2&i&&(re(),U("ngTemplateOutlet",ir(1)))}function Xre(i,t){}function Kre(i,t){if(1&i&&($(0,"span",25),fe(1,Xre,0,0,"ng-template",23),j()),2&i){re();const e=ir(3);V(1),U("ngTemplateOutlet",e)}}function Zre(i,t){}function Qre(i,t){if(1&i&&($(0,"span",25),fe(1,Zre,0,0,"ng-template",23),j()),2&i){re();const e=ir(5);V(1),U("ngTemplateOutlet",e)}}function Jre(i,t){}function ese(i,t){1&i&&fe(0,Jre,0,0,"ng-template",23),2&i&&(re(),U("ngTemplateOutlet",ir(1)))}const tse=[[["","matListItemTitle",""]],[["","matListItemLine",""]],"*",[["mat-divider"]],[["","matListItemAvatar",""],["","matListItemIcon",""]]],nse=["[matListItemTitle]","[matListItemLine]","*","mat-divider","[matListItemAvatar],[matListItemIcon]"],NH=new me("ListOption");let ise=(()=>{class i{constructor(e){this._elementRef=e}}return i.\u0275fac=function(e){return new(e||i)(E(mt))},i.\u0275dir=ve({type:i,selectors:[["","matListItemTitle",""]],hostAttrs:[1,"mat-mdc-list-item-title","mdc-list-item__primary-text"]}),i})(),rse=(()=>{class i{constructor(e){this._elementRef=e}}return i.\u0275fac=function(e){return new(e||i)(E(mt))},i.\u0275dir=ve({type:i,selectors:[["","matListItemLine",""]],hostAttrs:[1,"mat-mdc-list-item-line","mdc-list-item__secondary-text"]}),i})(),BH=(()=>{class i{constructor(e){this._listOption=e}_isAlignedAtStart(){return!this._listOption||"after"===this._listOption?._getTogglePosition()}}return i.\u0275fac=function(e){return new(e||i)(E(NH,8))},i.\u0275dir=ve({type:i,hostVars:4,hostBindings:function(e,n){2&e&&ln("mdc-list-item__start",n._isAlignedAtStart())("mdc-list-item__end",!n._isAlignedAtStart())}}),i})(),sse=(()=>{class i extends BH{}return i.\u0275fac=function(){let t;return function(n){return(t||(t=ri(i)))(n||i)}}(),i.\u0275dir=ve({type:i,selectors:[["","matListItemAvatar",""]],hostAttrs:[1,"mat-mdc-list-item-avatar"],features:[lt]}),i})(),ose=(()=>{class i extends BH{}return i.\u0275fac=function(){let t;return function(n){return(t||(t=ri(i)))(n||i)}}(),i.\u0275dir=ve({type:i,selectors:[["","matListItemIcon",""]],hostAttrs:[1,"mat-mdc-list-item-icon"],features:[lt]}),i})();const ase=new me("MAT_LIST_CONFIG");let YR=(()=>{class i{constructor(){this._isNonInteractive=!0,this._disableRipple=!1,this._disabled=!1,this._defaultOptions=Lt(ase,{optional:!0})}get disableRipple(){return this._disableRipple}set disableRipple(e){this._disableRipple=tn(e)}get disabled(){return this._disabled}set disabled(e){this._disabled=tn(e)}}return i.\u0275fac=function(e){return new(e||i)},i.\u0275dir=ve({type:i,hostVars:1,hostBindings:function(e,n){2&e&&Dt("aria-disabled",n.disabled)},inputs:{disableRipple:"disableRipple",disabled:"disabled"}}),i})(),UH=(()=>{class i{set lines(e){this._explicitLines=ks(e,null),this._updateItemLines(!1)}get disableRipple(){return this.disabled||this._disableRipple||this._noopAnimations||!!this._listBase?.disableRipple}set disableRipple(e){this._disableRipple=tn(e)}get disabled(){return this._disabled||!!this._listBase?.disabled}set disabled(e){this._disabled=tn(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 Qt,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 Om(this,this._ngZone,this._hostElement,this._platform),this._rippleRenderer.setupTriggerEvents(this._hostElement)}_monitorProjectedLinesAndTitle(){this._ngZone.runOutsideAngular(()=>{this._subscriptions.add(Cr(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)(E(mt),E(ft),E(YR,8),E(zi),E(KI,8),E(kr,8))},i.\u0275dir=ve({type:i,contentQueries:function(e,n,r){if(1&e&&(Wi(r,sse,4),Wi(r,ose,4)),2&e){let s;Tt(s=It())&&(n._avatars=s),Tt(s=It())&&(n._icons=s)}},hostVars:4,hostBindings:function(e,n){2&e&&(Dt("aria-disabled",n.disabled)("disabled",n._isButtonElement&&n.disabled||null),ln("mdc-list-item--disabled",n.disabled))},inputs:{lines:"lines",disableRipple:"disableRipple",disabled:"disabled"}}),i})();const VH=new me("SelectionList");let vC=(()=>{class i extends UH{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=tn(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 $e,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)(E(mt),E(ft),E(VH),E(zi),E(si),E(KI,8),E(kr,8))},i.\u0275cmp=st({type:i,selectors:[["mat-list-option"]],contentQueries:function(e,n,r){if(1&e&&(Wi(r,rse,5),Wi(r,ise,5)),2&e){let s;Tt(s=It())&&(n._lines=s),Tt(s=It())&&(n._titles=s)}},viewQuery:function(e,n){if(1&e&&Zn(Ure,5),2&e){let r;Tt(r=It())&&(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&&ke("blur",function(){return n._handleBlur()})("click",function(){return n._toggleOnInteraction()}),2&e&&(Dt("aria-selected",n.selected),ln("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:UH,useExisting:i},{provide:NH,useExisting:i}]),lt],ngContentSelectors:nse,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&&(rr(tse),fe(0,Vre,1,0,"ng-template",null,0,kc),fe(2,zre,6,4,"ng-template",null,1,kc),fe(4,Hre,5,4,"ng-template",null,2,kc),fe(6,$re,2,1,"span",3),fe(7,jre,2,1,"span",4),fe(8,qre,1,1,"ng-template",5),$(9,"span",6),Yt(10),Yt(11,1),$(12,"span",7,8),ke("cdkObserveContent",function(){return n._updateItemLines(!0)}),Yt(14,2),j()(),fe(15,Kre,2,1,"span",9),fe(16,Qre,2,1,"span",9),fe(17,ese,1,1,"ng-template",5),Yt(18,3),Oe(19,"div",10)),2&e&&(V(6),U("ngIf",n._hasCheckboxAt("before")),V(1),U("ngIf",n._hasRadioAt("before")),V(1),U("ngIf",n._hasIconsOrAvatarsAt("before")),V(7),U("ngIf",n._hasCheckboxAt("after")),V(1),U("ngIf",n._hasRadioAt("after")),V(1),U("ngIf",n._hasIconsOrAvatarsAt("after")))},dependencies:[xU,vi,vy],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 lse={provide:Do,useExisting:Gn(()=>yC),multi:!0};class cse{constructor(t,e){this.source=t,this.options=e}}let yC=(()=>{class i extends YR{get multiple(){return this._multiple}set multiple(e){const n=tn(e);n!==this._multiple&&(this._multiple=n,this.selectedOptions=new BR(this._multiple,this.selectedOptions.selected))}get hideSingleSelectionIndicator(){return this._hideSingleSelectionIndicator}set hideSingleSelectionIndicator(e){this._hideSingleSelectionIndicator=tn(e)}constructor(e,n){super(),this._element=e,this._ngZone=n,this._initialized=!1,this._destroyed=new Ie,this._onChange=r=>{},this.selectionChange=new $e,this.color="accent",this.compareWith=(r,s)=>r===s,this._multiple=!0,this._hideSingleSelectionIndicator=this._defaultOptions?.hideSingleSelectionIndicator??!1,this.selectedOptions=new BR(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 cse(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=tn(e),this._selectionListDisabled&&this._keyManager?.setActiveItem(-1)}registerOnChange(e){this._onChange=e}registerOnTouched(e){this._onTouched=e}_watchForSelectionChange(){this.selectedOptions.changed.pipe(He(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()&&Yo(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 DU(this._items).withHomeAndEnd().withTypeAhead().withWrap().skipPredicate(()=>this.disabled),this._resetActiveOption(),this._keyManager.change.subscribe(e=>this._setActiveOption(e)),this._items.changes.pipe(He(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=IM();return e&&this._element.nativeElement.contains(e)}}return i.\u0275fac=function(e){return new(e||i)(E(mt),E(ft))},i.\u0275cmp=st({type:i,selectors:[["mat-selection-list"]],contentQueries:function(e,n,r){if(1&e&&Wi(r,vC,5),2&e){let s;Tt(s=It())&&(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&&ke("keydown",function(s){return n._handleKeydown(s)}),2&e&&Dt("aria-multiselectable",n.multiple)},inputs:{color:"color",compareWith:"compareWith",multiple:"multiple",hideSingleSelectionIndicator:"hideSingleSelectionIndicator",disabled:"disabled"},outputs:{selectionChange:"selectionChange"},exportAs:["matSelectionList"],features:[An([lse,{provide:YR,useExisting:i},{provide:VH,useExisting:i}]),lt,xi],ngContentSelectors:Nre,decls:1,vars:0,template:function(e,n){1&e&&(rr(),Yt(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})(),dse=(()=>{class i{}return i.\u0275fac=function(e){return new(e||i)},i.\u0275mod=en({type:i}),i.\u0275inj=Wt({imports:[BI,ao,Qn,Qy,XU,DV]}),i})();function use(i,t){if(1&i&&($(0,"mat-label"),Ve(1),j()),2&i){const e=re(2);V(1),ui(e.resource.name)}}function hse(i,t){if(1&i&&($(0,"mat-list-option",5),Ve(1),j()),2&i){const e=t.$implicit,n=re(2);U("value",e.key)("selected",n.resource.data[e.key])("disabled",n.disabled),V(1),Xi(" ",e.key," ")}}function fse(i,t){if(1&i){const e=Kn();$r(0,1),fe(1,use,2,1,"mat-label",2),$(2,"mat-selection-list",3),ke("selectionChange",function(r){return Ht(e),Et(re().onSelection(r))}),fe(3,hse,2,4,"mat-list-option",4),gt(4,"keyvalue"),j(),Wr()}if(2&i){const e=re();U("matTooltip",e.resourceDescription),V(1),U("ngIf",e.resource.name),V(1),U("disabled",e.disabled),V(1),U("ngForOf",yt(4,4,e.resource.data))}}let pse=(()=>{class i{constructor(){this.resource=null,this.resourceDescription="",this.disabled=!1,this.changed=new $e}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=st({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&&fe(0,fse,5,6,"ng-container",0),2&e&&U("ngIf",n.resource)},dependencies:[oo,vi,qo,Os,yC,vC,oB],styles:["[_nghost-%COMP%]{padding-bottom:1.34375em}"],changeDetection:0}),i})();class zH{get tick$(){return this._tick$.asObservable()}get children(){return[...this._children]}constructor(t){this.parent=t,this._tick$=new Ie,this._children=[],t&&t.addChild(this)}addChild(t){if(t.parent!==this)throw new Error("Incorrect child clock");this._children.includes(t)||this._children.push(t)}removeChild(t){if(t.parent!==this)throw new Error("Incorrect child clock");this._children=this._children.filter(e=>e!==t)}dispose(){this.parent&&this.parent.removeChild(this);for(const t of this._children)t.dispose();this._tick$.complete()}}const gse=typeof performance>"u"?()=>Date.now():()=>performance.now();class $m extends zH{static get instance(){return $m._instance||($m._instance=new $m),$m._instance}get elapsedTime(){return gse()}constructor(){super(null);let t=this.elapsedTime;const e=()=>{requestAnimationFrame(e);const n=t,r=this.elapsedTime;t=r,this._tick$.next([n,r-n])};requestAnimationFrame(e)}dispose(){throw new Error("Cannot dispose global clock")}}class HH extends zH{get isRunning(){return!!this.tickSub}get isPaused(){return-1!==this.pausedAt}get isStopped(){return-1===this.startedAt}get timeScale(){return this._timeScale}set timeScale(t){if(t!==this._timeScale||this.pausedByTimescale&&0!==t){if(0===t)return void(this.isPaused||(this.pause(),this.pausedByTimescale=!0));if(this.isPaused&&this.pausedByTimescale&&(this.resume(),this.pausedByTimescale=!1),!this.isStopped){const e=this.isPaused?this.pausedAt:this.parentClock.elapsedTime;this.startedAt=e-(e-this.startedAt)*this.timeScale/t}this._timeScale=t}}get elapsedTime(){return this.isStopped?this.lastStopElapsed:this.isPaused?this._timeScale*(this.pausedAt-this.startedAt):this._timeScale*(this.parentClock.elapsedTime-this.startedAt)}constructor(t=!1,e=$m.instance){super(e),this.parentClock=e,this.tickSub=null,this._internalTick$=new Ie,this.tickRateLimit=0,this.paused$=new Ie,this.startedAt=-1,this.oldRelativeTime=0,this.pausedAt=-1,this.lastStopElapsed=0,this._timeScale=1,this.pausedByTimescale=!1,this.lastFiredTickElapsed=0,t&&this.start(),this._internalTick$.pipe(et(([n,r])=>[r,r-this.lastFiredTickElapsed]),vn(([n])=>!this.tickRateLimit||Math.floor(this.lastFiredTickElapsed*this.tickRateLimit/1e3)this.lastFiredTickElapsed=n)).subscribe(this._tick$)}start(){this.isRunning||(this.oldRelativeTime=0,this.startedAt=this.parentClock.elapsedTime,this.startListeningTicks())}stop(){this.stopListeningTicks(),this.lastStopElapsed=this.elapsedTime,this.startedAt=this.pausedAt=-1}pause(){this.stopListeningTicks(),this.pausedAt=this.parentClock.elapsedTime,this.pausedByTimescale=!1,this.paused$.next(!0)}resume(){this.isRunning||-1==this.pausedAt||(this.startedAt+=this.parentClock.elapsedTime-this.pausedAt,this.pausedAt=-1,this.startListeningTicks(),this.paused$.next(!1))}startListeningTicks(){if(this.tickSub)throw new Error("Clock is already ticking!");this.tickSub=this.parentClock.tick$.pipe(et(([t,e])=>[this.oldRelativeTime,this.oldRelativeTime+e*this.timeScale]),Vi(([t,e])=>this.oldRelativeTime=e)).subscribe(this._internalTick$)}stopListeningTicks(){var t;null===(t=this.tickSub)||void 0===t||t.unsubscribe(),this.tickSub=null}dispose(){this.stopListeningTicks(),this._internalTick$.complete(),super.dispose()}}const _se={transparent:!1,background:0,size:"fullscreen",antialias:!0};class vse{constructor(t,e,n={}){this.scene=t,this.canvas=e,this.entity=null,this.rendererOptions=Object.assign(Object.assign({},_se),n||{})}}class ub{static fromArray(t,e=!1){const n=new ub(t[0]);let r=n;for(let s=1;sn.map(r=>new ub(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]}constructor(t){this.data=t,this.adjacent=new Set}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(d=>!e.has(d));for(const d of c)e.add(d),r.push([d,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 qh=(()=>{class i{constructor(){this.tick$=new Ie,this._world=null,this._name="e0x"+(i.default_name_counter++).toString(16),this._selfActive=!0,this.parent=null,this._children=[],this._components=[],this._onSpawned$=new Ie,this._onRemoved$=new Ie}get world(){return this._world}get name(){return this._name}set name(e){this._name=e}get active(){return this._selfActive&&(!this.parent||this.parent.active)}set active(e){this._selfActive=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 yse extends qh{constructor(t){super(),this.tickOrder=t}}function qR(i,t=Kl.CONTROLLERS,e){const n=new yse(t);return e&&(n.name=e),i.addEntity(n),n.tick$.pipe(iu(()=>{i.removeEntity(n,!0)}))}class XR extends qh{get rendererSize$(){return this._rendererSize$.asObservable()}get rendererSize(){return this._rendererSize$.getValue()}get rendererOptions(){return this.renderer.rendererOptions}get physicsDebugViewActive(){return this.renderer.physicsDebugViewActive}set physicsDebugViewActive(t){this.renderer.physicsDebugViewActive=t}constructor(t){super(),this.renderer=t,this.tickOrder=Kl.RENDERING,this._rendererSize$=new at(null),this.addComponents(t),this.tick$.subscribe(()=>{this.renderer.render()})}onSpawned(t){this._rendererSize$.next(null),"fullscreen"==this.rendererOptions.size||"function"==typeof this.rendererOptions.size?(this.renderer.canvas&&(this.renderer.canvas.style.position="absolute"),Cr(Ao(window,"resize").pipe(Hy(100)),Ao(window,"orientationchange")).pipe(He(this._onRemoved$),et(()=>({x:window.innerWidth,y:window.innerHeight})),Eo({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 Tn||void 0!==this.rendererOptions.size.subscribe&&void 0!==this.rendererOptions.size.pipe?this.rendererOptions.size.pipe(He(this._onRemoved$)).subscribe(e=>{this._rendererSize$.next(e)}):this._rendererSize$.next(this.rendererOptions.size),this._rendererSize$.pipe(He(this._onRemoved$),zc((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 KR=i=>{i.updateVisibility?i.updateVisibility():GH(i)},GH=i=>{for(const t of i.children)KR(t)};class bse extends qh{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(){GH(this)}addChildren(...t){super.addChildren(...t);for(const e of t)KR(e)}removeChildren(t,e=!1){if(super.removeChildren(t,e),!e)for(const n of t)KR(n)}}class ZR{constructor(){this._running=!1,this.stop$=new Ie}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 xse extends ZR{get output$(){return this._output$.asObservable()}constructor(t,e){super(),this.keyboard=t,this.keymap=e,this._output$=new Ie}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")),Aa(t.map(e=>this.keyboard.bindMany(...e))).pipe(He(this.stop$),et(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 QR=new Tn(ms);class bC extends ZR{constructor(){super(),this.bindings={},this.skipKeyDownsOnExternalFocus=!0,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 at(!1);return this.bindings[t].push(e),e.pipe(zc(),iu(()=>{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"),QR;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 at(!1);this.bindings[n].push(r),e.push(r)}return Aa(e).pipe(iu(()=>{for(let n=0;nn.includes(!0)),zc())}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 bC.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)}}bC.externalFocusBlacklist=[HTMLInputElement,HTMLTextAreaElement,HTMLSelectElement,HTMLButtonElement];class yi{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 yi.len(yi.sub(t,e))}static norm(t){const e=yi.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 Mse={pointerLock:!1};var Fs=(()=>{return(i=Fs||(Fs={}))[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",Fs;var i})();class Wm extends ZR{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$=Ao(this._element,"wheel",{passive:!1}).pipe(He(this.stopped$),iu(()=>this._wheel$=null),Vi(t=>t.preventDefault()),et(t=>t.deltaY),Bf())),this._wheel$}get isPointerLocked(){return!!document.pointerLockElement}get isPointerLocked$(){return Ao(document,"pointerlockchange").pipe(et(()=>this.isPointerLocked))}get state(){return this._state$.getValue()}get state$(){return this._state$.asObservable()}get multiTouchPositions$(){return this._multiTouchPositions$.asObservable()}get twoTouchGestureDelta$(){return this.state$.pipe(Rs(t=>t==Fs.DRAG_TOUCH_TWO_FINGERS?this.multiTouchPositions$:QR),et(t=>t.map(e=>({x:e.x,y:e.y}))),function wse(){return ti((i,t)=>{let e,n=!1;i.subscribe(jn(t,r=>{const s=e;e=r,n&&t.next([s,r]),n=!0}))})}(),vn(([t,e])=>t.length>1&&e.length>1),et(([t,e])=>({centerPointDelta:yi.sub(yi.scalarMult(e.reduce((n,r)=>yi.add(n,r),yi.O),1/e.length),yi.scalarMult(t.reduce((n,r)=>yi.add(n,r),yi.O),1/e.length)),angleDelta:yi.angle(e[1],e[0])-yi.angle(t[1],t[0]),distanceDelta:yi.dist(e[1],e[0])-yi.dist(t[1],t[0])})))}get _element(){return this.options.canvas||window}constructor(t={}){super(),this._wheel$=null,this._delta$=new Ie,this._position$=new at(yi.O),this._multiTouchPositions$=new at([]),this.stopped$=new Ie,this._state$=new at(Fs.NONE),this.options=Object.assign(Object.assign({},Mse),t),this.canvasClickListener=this.canvasClickListener.bind(this)}startInternal(){this.options.canvas&&(this.options.canvas.style.touchAction="none"),this._state$.next(Fs.NONE);const t=[Fs.DRAG,Fs.DRAG_MIDDLE_BUTTON,Fs.DRAG_RIGHT_BUTTON],e=[Fs.NONE,Fs.DRAG,Fs.DRAG_TOUCH_TWO_FINGERS],n=[],r={};Ao(this._element,"mousemove").pipe(He(this.stopped$)).subscribe(o=>{this._delta$.next({x:o.movementX,y:o.movementY})}),Ao(this._element,"pointermove").pipe(He(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})}),!Wm.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{if(0===n.length)try{this.options.canvas&&this.options.canvas.setPointerCapture(o.pointerId),window.addEventListener("pointerup",s),this._element.addEventListener("pointercancel",s)}catch(a){console.error(a)}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]||Fs.NONE)}),Ao(this._element,"contextmenu").pipe(He(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 Cse{static lookAt(t,e,n){let r=Ne.sub(t,e);r=0===Ne.lenSq(r)?Object.assign(Object.assign({},r),{z:1}):Ne.norm(r);let s=Ne.cross(n,r);0===Ne.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=Ne.norm(r),s=Ne.cross(n,r)),s=Ne.norm(s);let o=Ne.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,d=t.w*Math.sin((1-n)*s)/o+e.w*Math.sin(n*s)/o;return isNaN(a)||isNaN(l)||isNaN(c)||isNaN(d)?gr.clone(t):{x:a,y:l,z:c,w:d}}static fromAngle(t,e){const n=e/2,r=Math.sin(n);return Object.assign(Object.assign({},Ne.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],d=t[10],h=e+o+d;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>d){const p=2*Math.sqrt(1+e-o-d);return{x:.25*p,y:(n+s)/p,z:(r+l)/p,w:(c-a)/p}}if(o>d){const p=2*Math.sqrt(1+o-e-d);return{x:(n+s)/p,y:.25*p,z:(a+c)/p,w:(r-l)/p}}{const p=2*Math.sqrt(1+d-e-o);return{x:(r+l)/p,y:(a+c)/p,z:.25*p,w:(s-n)/p}}}static fromMatrix3(t){const e=t[0][0]+t[1][1]+t[2][2];let n,r,s,o;if(e>0){const a=.5/Math.sqrt(e+1);n=.25/a,r=(t[2][1]-t[1][2])*a,s=(t[0][2]-t[2][0])*a,o=(t[1][0]-t[0][1])*a}else if(t[0][0]>t[1][1]&&t[0][0]>t[2][2]){const a=2*Math.sqrt(1+t[0][0]-t[1][1]-t[2][2]);n=(t[2][1]-t[1][2])/a,r=.25*a,s=(t[0][1]+t[1][0])/a,o=(t[0][2]+t[2][0])/a}else if(t[1][1]>t[2][2]){const a=2*Math.sqrt(1+t[1][1]-t[0][0]-t[2][2]);n=(t[0][2]-t[2][0])/a,r=(t[0][1]+t[1][0])/a,s=.25*a,o=(t[1][2]+t[2][1])/a}else{const a=2*Math.sqrt(1+t[2][2]-t[0][0]-t[1][1]);n=(t[1][0]-t[0][1])/a,r=(t[0][2]+t[2][0])/a,s=(t[1][2]+t[2][1])/a,o=.25*a}return{w:n,x:r,y:s,z:o}}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),d=Math.sin(.5*e);return{w:c*a*s+d*l*o,x:d*a*s-c*l*o,y:c*l*s+d*a*o,z:c*a*o-d*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=Ne.Z){return this.fromMatrix4(Cse.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 Ne{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 Ne.len(Ne.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=Ne.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)}}}function JR(i,t,e,n){return r=>r.pipe(ZT((s,o)=>{var a;return{targetValue:o,currentValue:null!==(a=s.currentValue)&&void 0!==a?a:o,hasReachedTarget:!1}},{targetValue:null,currentValue:null,hasReachedTarget:!1}),Rs(s=>i.pipe(et(([o,a])=>{if(null===s.targetValue||null===s.currentValue)return s.currentValue;if(s.hasReachedTarget)return;const l=1-Math.exp(-a/t),c=e(s.currentValue,s.targetValue,l);return s.currentValue=c,n(c,s.targetValue)?(s.hasReachedTarget=!0,s.targetValue):c}))),et(s=>void 0!==s?s:null),vn(s=>null!==s))}ps(738);class Ase extends qh{get avgReport(){return this._avgReport}get peakReport(){return this._peakReport}constructor(t=60,e=15){super(),this.maxSamples=t,this.maxRows=e,this.tickOrder=Number.MAX_SAFE_INTEGER,this.sampleIndex=0,this.collectedData=new Map,this._avgReport={totalTime:0,entries:[]},this._peakReport={totalTime:0,entries:[]}}onSpawned(t){super.onSpawned(t),this.sampleIndex=0;const e=()=>(typeof performance>"u"?Date:performance).now();this.world.tickForwardTo$.pipe(He(this.onRemoved$)).subscribe(n=>{n!==this&&(this.collectedData.has(n)?this.collectedData.get(n).push([this.sampleIndex,e(),0]):this.collectedData.set(n,[[this.sampleIndex,e(),0]]))}),this.world.tickForwardedTo$.pipe(He(this.onRemoved$)).subscribe(n=>{if(n===this)return;const r=this.collectedData.get(n);r[r.length-1][2]=e()}),this.tick$.pipe(He(this.onRemoved$)).subscribe(()=>{this.sampleIndex++;const n=Array.from(this.collectedData.entries());for(const[h,p]of n){for(;p.length>0&&p[0][0]h instanceof qh?""===h.name?h.constructor.name:h.name:"PHYSICS_WORLD"===h?"Physics simulation":h,s=h=>{let p=0,m=0;for(;mh.length-m+1){m--;break}p+=h[h.length-m-1][1]}return m>1&&(h=h.slice(0,h.length-m)).push([`Rest (${m})`,p]),h};let o=0,a=Array.from(this.collectedData.entries()).map(([h,p])=>{const m=p.reduce((g,[b,v,y])=>g+y-v,0)/this.maxSamples;return o+=m,[r(h),m]}).sort((h,p)=>p[1]-h[1]);a=s(a),this._avgReport={totalTime:o,entries:a};let l=new Map,c=Array.from(this.collectedData.entries()).map(([h,p])=>{let m=0;for(const[g,b,v]of p){const y=v-b;m=Math.max(m,y),l.set(g,y+(l.get(g)||0))}return[r(h),m]}).sort((h,p)=>p[1]-h[1]);c=s(c);let d=Array.from(l.values()).reduce((h,p)=>Math.max(h,p),0);this._peakReport={totalTime:d,entries:c}})}onRemoved(){super.onRemoved(),this.collectedData=new Map,this._avgReport={totalTime:0,entries:[]},this._peakReport={totalTime:0,entries:[]}}}var jm=function(i,t,e,n){return new(e||(e=Promise))(function(s,o){function a(d){try{c(n.next(d))}catch(h){o(h)}}function l(d){try{c(n.throw(d))}catch(h){o(h)}}function c(d){d.done?s(d.value):function r(s){return s instanceof e?s:new e(function(o){o(s)})}(d.value).then(a,l)}c((n=n.apply(i,t||[])).next())})};class fl{static get documentWorlds(){return[...fl._documentWorlds]}constructor(t,e){this.visualScene=t,this.physicsWorld=e,this.worldClock=new HH(!1),this.keyboardInput=new bC,this.name="w0x"+(fl.default_name_counter++).toString(16),this.children=[],this.tickListeners=[],this.tickStarted$=new Ie,this.tickForwardTo$=new Ie,this.tickForwardedTo$=new Ie,this.paused$=new Ie,this.disposed$=new Ie,this.keyboardInput.start(),window.ggstatic?this.registerConsoleCommands(window.ggstatic):(this.onGgStaticInitialized=this.onGgStaticInitialized.bind(this),window.addEventListener("ggstatic_added",this.onGgStaticInitialized)),this.worldClock.paused$.subscribe(this.paused$),fl._documentWorlds.push(this),fl.worldCreated$.next(this)}init(){return jm(this,void 0,void 0,function*(){yield Promise.all([this.physicsWorld.init(),this.visualScene.init()]);const t=(e,n,r)=>{e.active&&(this.tickForwardTo$.next(e),e.tick$.next([n,r]),this.tickForwardedTo$.next(e))};this.worldClock.tick$.subscribe(([e,n])=>{this.tickStarted$.next();let r=0;for(;r=Kl.PHYSICS_SIMULATION);r++)t(this.tickListeners[r],e,n);for(this.tickForwardTo$.next("PHYSICS_WORLD"),this.physicsWorld.simulate(n),this.tickForwardedTo$.next("PHYSICS_WORLD");re.tickOrder-n.tickOrder),t.onSpawned(this))}removeEntity(t,e=!1){if(t.world){if(t.world!==this)throw new Error("Entity is not a part of this world");this.children.splice(this.children.findIndex(n=>n===t),1),this.tickListeners.splice(this.tickListeners.findIndex(n=>n===t),1),t.onRemoved()}e&&t.dispose()}onGgStaticInitialized(){window.removeEventListener("ggstatic_added",this.onGgStaticInitialized),this.registerConsoleCommands(window.ggstatic)}registerConsoleCommands(t){t.registerConsoleCommand(this,"timescale",(...e)=>jm(this,void 0,void 0,function*(){return isNaN(+e[0])||(this.worldClock.timeScale=+e[0]),this.worldClock.timeScale.toString()}),"args: [ float? ]; Get current time scale of selected world clock or set it. Default value is 1.0 (no time scale applied)"),t.registerConsoleCommand(this,"fps_limit",(...e)=>jm(this,void 0,void 0,function*(){return isNaN(+e[0])||(this.worldClock.tickRateLimit=+e[0]),this.worldClock.tickRateLimit.toString()}),"args: [ int? ]; Get current tick rate limit of selected world clock or set it. 0 means no limit applied"),t.registerConsoleCommand(this,"renderers",()=>jm(this,void 0,void 0,function*(){return this.children.filter(e=>e instanceof XR).map(e=>e.name).join("\n")}),"no args; Print all renderers in selected world"),t.registerConsoleCommand(this,"debug_view",(...e)=>jm(this,void 0,void 0,function*(){let r,n="toggle";for(let o of e)["1","0"].includes(o)?n="1"===o:r=o;let s=this.children.find(o=>o instanceof XR&&(!r||o.name===r));if(s)return s.physicsDebugViewActive="toggle"===n?!s.physicsDebugViewActive:n,s.physicsDebugViewActive?"1":"0";throw r?new Error(`Renderer with name "${r}" not found`):new Error("No renderer found")}),'args: [ 0|1?, string? ]; Turn on/off physics debug view, skip first argument to toggle value. Second argument expects renderer name, if not provided first renderer will be picked. Use "renderers" to get list of renderers in the world'),t.registerConsoleCommand(this,"performance",(...e)=>jm(this,void 0,void 0,function*(){let n="avg",r=20;for(let d of e)["avg","peak"].includes(d)?n=d:isNaN(+d)||(r=+d);const s=new Ase(r,250);this.addEntity(s),yield function Sse(i,t){const e="object"==typeof t;return new Promise((n,r)=>{let o,s=!1;i.subscribe({next:a=>{o=a,s=!0},error:r,complete:()=>{s?n(o):e?n(t.defaultValue):r(new um)}})})}(this.worldClock.tick$.pipe(Oi(r)));const o="avg"===n?s.avgReport:s.peakReport;this.removeEntity(s);const a=o.entries.map(([d,h])=>`${d}:`+new Array(Math.max(0,26-d.length)).join(" ")+`${h.toFixed(2)} ms`+("avg"===n?` (${(100*h/o.totalTime).toFixed(2)}%)`:""));let l="lightgreen";o.totalTime>12&&(l=o.totalTime<16?"yellow":"red");const c=("avg"===n?"Average":"Peak")+" Frame time";return a.unshift(c+":"+new Array(Math.max(0,26-c.length)).join(" ")+`${o.totalTime.toFixed(2)} ms`),a.unshift(`Performance report (${r} samples)`),a.join("\n")}),'args: [ int?, avg|peak? ]; Measure how much time was spent per entity in world. Arguments are samples amount (20 by default) and "peak" or "avg" choice, both arguments are optional. "avg" report sorts entities by average time consumed, "peak" records highest value for each entity')}}fl.default_name_counter=0,fl._documentWorlds=[],fl.worldCreated$=new Ie;class Rse extends vse{}class WH extends bse{constructor(){super(...arguments),this._world=null}get world(){return this._world}}class mu extends WH{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}constructor(t){super(),this.tickOrder=Kl.OBJECTS_BINDING,this._position=Ne.O,this._rotation=gr.O,this.object3D=null,this.objectBody=null,t.objectBody&&(this.objectBody=t.objectBody,this.name=this.objectBody.name,this.addComponents(this.objectBody)),t.object3D&&(this.object3D=t.object3D,t.objectBody||(this._position=this.object3D.position,this._rotation=this.object3D.rotation,this.name=this.object3D.name),this.addComponents(this.object3D)),this.objectBody&&(this.tick$.subscribe(()=>{this.runTransformBinding(this.objectBody,this.object3D)}),this.runTransformBinding(this.objectBody,this.object3D))}}class hb extends ub{static fromMapArray(t,e=!1){const n=new hb(t[0]);let r=n;for(let s=1;sn.map(r=>new hb(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));othis.mapGraph.getNearestDummy(this.mapGraphNodes,this.loaderCursor$.getValue())),zc(),Vi(r=>this._nearestDummy$.next(r))).subscribe(r=>{let o,s=new Set;if(this.options.inertia>0){o=new Set;const a=r.walkReadPreserveDepth(this.options.loadDepth+this.options.inertia);for(let l=0;lo.add(c.data)),l<=this.options.loadDepth&&a[l].forEach(c=>s.add(c.data))}else r.walkRead(this.options.loadDepth).forEach(a=>s.add(a.data)),o=s;for(const a of this.loaded.keys())o.has(a)?s.delete(a):n.includes(a)||n.push(a);for(let a of Array.from(s.keys()))e.includes(a)||e.push(a)}),this.tick$.pipe(Eo(null),He(this._onRemoved$)).subscribe(()=>{if(n.length){for(const r of n)this.disposeChunk(r);n=[]}if(e.length)if(this._initialLoadComplete$.value&&e.length>this.options.maxNodesLoadingPerTick){let r=e.slice(0,this.options.maxNodesLoadingPerTick);e=e.slice(this.options.maxNodesLoadingPerTick),Promise.all(r.map(s=>this.loadChunk(s))).then()}else Promise.all(e.map(r=>this.loadChunk(r))).then(()=>{this._initialLoadComplete$.value||this._initialLoadComplete$.next(!0)}),e=[]})}onRemoved(){super.onRemoved(),this.loadClock&&(this.loadClock.stop(),this.loadClock=null),this.loaderCursor$.next(Ne.O)}loadChunk(t){return function(i,t,e,n){return new(e||(e=Promise))(function(s,o){function a(d){try{c(n.next(d))}catch(h){o(h)}}function l(d){try{c(n.throw(d))}catch(h){o(h)}}function c(d){d.done?s(d.value):function r(s){return s instanceof e?s:new e(function(o){o(s)})}(d.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 Fse extends XR{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 XH=function(i,t,e,n){return new(e||(e=Promise))(function(s,o){function a(d){try{c(n.next(d))}catch(h){o(h)}}function l(d){try{c(n.throw(d))}catch(h){o(h)}}function c(d){d.done?s(d.value):function r(s){return s instanceof e?s:new e(function(o){o(s)})}(d.value).then(a,l)}c((n=n.apply(i,t||[])).next())})};const KH={keymap:"wasd",cameraLinearSpeed:20,cameraMovementElasticity:0,cameraBoostMultiplier:2.5,cameraRotationSensitivity:1,cameraRotationElasticity:0,mouseOptions:{},ignoreMouseUnlessPointerLocked:!1,ignoreKeyboardUnlessPointerLocked:!1};class Nse extends qh{get active(){return super.active}set active(t){!super.active&&t&&this.reset(),super.active=t}get spherical(){return this._spherical}set spherical(t){this._spherical.phi=Math.max(1e-6,Math.min(Math.PI-1e-6,t.phi)),this._spherical.theta=t.theta,this.resetMotion$.next()}constructor(t,e,n={}){super(),this.keyboard=t,this.camera=e,this.tickOrder=Kl.INPUT_CONTROLLERS,this._spherical={phi:0,radius:1,theta:0},this.resetMotion$=new Ie,this.options=Object.assign(Object.assign({},KH),n),n.mouseOptions&&(this.options.mouseOptions=Object.assign(Object.assign({},KH.mouseOptions),n.mouseOptions)),this.mouseInput=new Wm(this.options.mouseOptions),this.directionsInput=new xse(t,this.options.keymap)}reset(){this._spherical=Ne.toSpherical(Ne.rot({x:0,y:0,z:-1},this.camera.rotation)),this.resetMotion$.next()}onSpawned(t){const e=Object.create(null,{onSpawned:{get:()=>super.onSpawned}});return XH(this,void 0,void 0,function*(){yield e.onSpawned.call(this,t),this._spherical=Ne.toSpherical(Ne.rot({x:0,y:0,z:-1},this.camera.rotation));const n=["KeyE","KeyQ"];this.camera.camera.supportsFov&&n.push("KeyZ","KeyC"),n.push("ShiftLeft");let r=Aa([this.directionsInput.output$,...n.map(c=>this.keyboard.bind(c))]).pipe(He(this._onRemoved$),et(([c,...d])=>{let h={direction:{},rest:[]};(!this.options.ignoreKeyboardUnlessPointerLocked||this.mouseInput.isPointerLocked)&&(h={direction:c,rest:d});let p=Object.assign({},Ne.O);const[m,g,b,v,y]=h.rest;void 0!==h.direction.upDown&&(p.z=h.direction.upDown?-1:1),void 0!==h.direction.leftRight&&(p.x=h.direction.leftRight?-1:1),m!=g&&(p.y=g?-1:1);let M=0;return b!=v&&(M=b?1:-1),p=Ne.norm(p),y&&(p=Ne.scalarMult(p,this.options.cameraBoostMultiplier)),[p,M]}));this.options.cameraMovementElasticity>0&&(r=r.pipe(JR(this.camera.tick$,this.options.cameraMovementElasticity,([c,d],[h,p],m)=>[Ne.lerp(c,h,m),p],([c,d],[h,p])=>d==p&&Ne.dist(c,h)<.001)));let s=Ne.O,o=0;r.subscribe(([c,d])=>{s=c,o=d});let a=Wm.isTouchDevice(),l=this.mouseInput.delta$.pipe(He(this._onRemoved$),vn(()=>this.active&&(a||!this.options.ignoreMouseUnlessPointerLocked||this.mouseInput.isPointerLocked)));if(this.options.cameraRotationElasticity>0){const c=new at(this._spherical);l.subscribe(h=>{const p=c.getValue();c.next({phi:Math.max(1e-6,Math.min(Math.PI-1e-6,p.phi+h.y*this.options.cameraRotationSensitivity/1e3)),theta:p.theta-h.x*this.options.cameraRotationSensitivity/1e3,radius:1})});const d=()=>{c.pipe(He(this._onRemoved$),JR(this.tick$,this.options.cameraRotationElasticity,(h,p,m)=>({phi:h.phi+m*(p.phi-h.phi),theta:h.theta+m*(p.theta-h.theta),radius:1}),(h,p)=>yi.dist({x:h.phi,y:h.theta},{x:p.phi,y:p.theta})<1e-4),He(this.resetMotion$)).subscribe(h=>{this._spherical.theta=h.theta,this._spherical.phi=h.phi})};this.resetMotion$.pipe(He(this._onRemoved$)).subscribe(()=>{c.next(this._spherical),d()}),d()}else l.subscribe(c=>{this._spherical.theta-=c.x*this.options.cameraRotationSensitivity/1e3,this._spherical.phi+=c.y*this.options.cameraRotationSensitivity/1e3,this._spherical.phi=Math.max(1e-6,Math.min(Math.PI-1e-6,this._spherical.phi))});this.camera.tick$.pipe(He(this._onRemoved$),vn(()=>this.active)).subscribe(([c,d])=>{this.camera.camera.fov+=o,this.camera.position=Ne.add(this.camera.position,Ne.rot(Ne.scalarMult(s,this.options.cameraLinearSpeed*d/1e3),this.camera.rotation)),this.camera.rotation=gr.lookAt(this.camera.position,Ne.add(this.camera.position,Ne.fromSpherical(this._spherical)))}),this.mouseInput.start(),this.directionsInput.start()})}onRemoved(){const t=Object.create(null,{onRemoved:{get:()=>super.onRemoved}});return XH(this,void 0,void 0,function*(){yield t.onRemoved.call(this),yield this.mouseInput.stop(!0),yield this.directionsInput.stop()})}}var ZH=function(i,t,e,n){return new(e||(e=Promise))(function(s,o){function a(d){try{c(n.next(d))}catch(h){o(h)}}function l(d){try{c(n.throw(d))}catch(h){o(h)}}function c(d){d.done?s(d.value):function r(s){return s instanceof e?s:new e(function(o){o(s)})}(d.value).then(a,l)}c((n=n.apply(i,t||[])).next())})};const Bse={mouseOptions:{},orbiting:{sensitivityX:1,sensitivityY:1},orbitingElasticity:0,zooming:{sensitivity:1},panning:{sensitivityX:1,sensitivityY:1},dollying:{sensitivity:1}};class Use extends qh{get active(){return super.active}set active(t){!super.active&&t&&this.reset(),super.active=t}get spherical(){return this._spherical}set spherical(t){this._spherical.phi=Math.max(1e-6,Math.min(Math.PI-1e-6,t.phi)),this._spherical.theta=t.theta,this._spherical.radius=t.radius,this.resetMotion$.next()}constructor(t,e={}){super(),this.camera=t,this.tickOrder=Kl.INPUT_CONTROLLERS,this._spherical={phi:0,radius:10,theta:0},this.target=Ne.O,this.resetMotion$=new Ie,this.options=Object.assign(Object.assign({},Bse),e),this.mouseInput=new Wm(this.options.mouseOptions)}reset(){let t=Ne.dist(this.target,this.camera.position);this.target=Ne.add(this.camera.position,Ne.rot({x:0,y:0,z:-t},this.camera.rotation)),this._spherical=Ne.toSpherical(Ne.sub(this.camera.position,this.target)),this.resetMotion$.next()}onSpawned(t){const e=Object.create(null,{onSpawned:{get:()=>super.onSpawned}});return ZH(this,void 0,void 0,function*(){if(yield e.onSpawned.call(this,t),this._spherical=Ne.toSpherical(Ne.sub(this.camera.position,this.target)),this.options.orbiting){let r=this.mouseInput.delta$.pipe(He(this._onRemoved$),vn(()=>this.active&&this.mouseInput.state==Fs.DRAG));if(this.options.orbitingElasticity>0){const s=new at(this._spherical);r.subscribe(a=>{const l=s.getValue();s.next({phi:Math.max(1e-6,Math.min(Math.PI-1e-6,l.phi-a.y*this.options.orbiting.sensitivityY/1e3)),theta:l.theta-a.x*this.options.orbiting.sensitivityX/1e3,radius:1})});const o=()=>{s.pipe(He(this._onRemoved$),JR(this.tick$,this.options.orbitingElasticity,(a,l,c)=>({phi:a.phi+c*(l.phi-a.phi),theta:a.theta+c*(l.theta-a.theta),radius:1}),(a,l)=>yi.dist({x:a.phi,y:a.theta},{x:l.phi,y:l.theta})<1e-4),He(this.resetMotion$)).subscribe(a=>{this._spherical.theta=a.theta,this._spherical.phi=a.phi})};this.resetMotion$.pipe(He(this._onRemoved$)).subscribe(()=>{s.next(this._spherical),o()}),o()}else r.subscribe(s=>{this._spherical.theta-=s.x*this.options.orbiting.sensitivityX/1e3,this._spherical.phi-=s.y*this.options.orbiting.sensitivityY/1e3,this._spherical.phi=Math.max(1e-6,Math.min(Math.PI-1e-6,this._spherical.phi))})}this.options.zooming&&this.mouseInput.wheel$.pipe(He(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=Ne.fromSpherical(this._spherical),o=Ne.rotAround(s,{x:-Math.sin(this._spherical.theta),y:Math.cos(this._spherical.theta),z:0},Math.PI/2),a=Ne.rotAround(s,Ne.norm(o),Math.PI/2);this.target=Ne.add(this.target,Ne.add(Ne.scalarMult(o,-this.options.panning.sensitivityY*r.y/1e3),Ne.scalarMult(a,this.options.panning.sensitivityX*r.x/1e3)))};this.options.panning&&this.mouseInput.delta$.pipe(He(this._onRemoved$),vn(()=>this.mouseInput.state==Fs.DRAG_RIGHT_BUTTON)).subscribe(r=>{n(r)}),this.options.dollying&&this.mouseInput.delta$.pipe(He(this._onRemoved$),vn(()=>this.mouseInput.state==Fs.DRAG_MIDDLE_BUTTON)).subscribe(r=>{this._spherical.radius*=Math.pow(.95,-this.options.dollying.sensitivity*r.y/10)}),Wm.isTouchDevice()&&(this.options.dollying||this.options.panning)&&this.mouseInput.twoTouchGestureDelta$.pipe(He(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(He(this._onRemoved$),vn(()=>this.active),et(()=>this._spherical)).subscribe(r=>{this.camera.position=Ne.add(this.target,Ne.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 ZH(this,void 0,void 0,function*(){yield t.onRemoved.call(this),yield this.mouseInput.stop(!0)})}}class zse{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 nk=function(i,t,e,n){return new(e||(e=Promise))(function(s,o){function a(d){try{c(n.next(d))}catch(h){o(h)}}function l(d){try{c(n.throw(d))}catch(h){o(h)}}function c(d){d.done?s(d.value):function r(s){return s instanceof e?s:new e(function(o){o(s)})}(d.value).then(a,l)}c((n=n.apply(i,t||[])).next())})},gu=(()=>{return(i=gu||(gu={}))[i.Nothing=0]="Nothing",i[i.Files=1]="Files",i[i.Entities=2]="Entities",gu;var i})();const QH={cachingStrategy:gu.Nothing,position:Ne.O,rotation:gr.O,loadProps:!0},JH=i=>({meta:i.meta,resources:i.resources.map(({object3D:t,body:e})=>({object3D:t&&t.clone(),body:e&&e.clone()}))});class Hse{constructor(t){this.world=t,this.filesCache=new Map,this.loadResultCache=new Map}loadGgGlbFiles(t){return nk(this,arguments,void 0,function*(e,n=!1){if(n&&this.filesCache.has(e))return this.filesCache.get(e);const r=Promise.all([fetch(`${e}.glb`).then(o=>o.arrayBuffer()),fetch(`${e}.meta`).then(o=>o.text()).then(o=>JSON.parse(o))]);n&&this.filesCache.set(e,r);const s=yield r;return n&&this.filesCache.set(e,s),s})}loadGgGlbResources(t){return nk(this,arguments,void 0,function*(e,n=gu.Nothing){if(n==gu.Entities&&this.loadResultCache.has(e)){const c=this.loadResultCache.get(e),d=c instanceof Promise?yield c:c;return JH(d)}const[r,s]=yield this.loadGgGlbFiles(e,n==gu.Files);if(!r)throw new Error("GLB not found");const[o,a]=yield Promise.all([this.world.visualScene.loader.loadFromGgGlb(r,s),this.world.physicsWorld.loader.loadFromGgGlb(r,s)]),l={resources:[],meta:s};if(!o)return l;if(0==a.length)l.resources.push({object3D:o,body:null});else if(1==a.length)l.resources.push({object3D:o,body:a[0]});else{for(const c of a)l.resources.push({object3D:o.popChild(c.name),body:c});o.isEmpty()||l.resources.push({object3D:o,body:null})}return n==gu.Entities&&this.loadResultCache.set(e,JH(l)),l})}loadGgGlb(t){return nk(this,arguments,void 0,function*(e,n=QH){const r=Object.assign(Object.assign({},QH),n),{resources:s,meta:o}=yield this.loadGgGlbResources(e,r.cachingStrategy),a={entities:s.map(l=>new mu({object3D:l.object3D,objectBody:l.body})),meta:o};return r.loadProps&&(a.props=yield Promise.all(o.dummies.filter(l=>l.is_prop||l.is_scene).map(l=>this.loadGgGlb(l.is_prop?(r.propsPath||e.substring(0,e.lastIndexOf("/")+1))+l.prop_id:l.scene_id,{loadProps:!!l.is_scene,position:Ne.add(Ne.rot(l.position,r.rotation),r.position),rotation:gr.combineRotations(l.rotation,r.rotation)})))),a.entities.forEach(l=>{l.position=Ne.add(Ne.rot(Ne.clone(l.position),r.rotation),r.position),l.rotation=gr.mult(gr.clone(l.rotation),r.rotation)}),a})}}class e4 extends fl{constructor(t,e){super(t,e),this.visualScene=t,this.physicsWorld=e,this.loader=new Hse(this)}addPrimitiveRigidBody(t,e=Ne.O,n=gr.O,r={}){const s=new mu({object3D:this.visualScene.factory.createPrimitive(t.shape,r),objectBody:this.physicsWorld.factory.createRigidBody(t)});return s.position=e,s.rotation=n,this.addEntity(s),s}addRenderer(t,e,n){const r=new Fse(this.visualScene.createRenderer(t,e,n));return this.addEntity(r),r}registerConsoleCommands(t){super.registerConsoleCommands(t),t.registerConsoleCommand(this,"gravity",(...e)=>function(i,t,e,n){return new(e||(e=Promise))(function(s,o){function a(d){try{c(n.next(d))}catch(h){o(h)}}function l(d){try{c(n.throw(d))}catch(h){o(h)}}function c(d){d.done?s(d.value):function r(s){return s instanceof e?s:new e(function(o){o(s)})}(d.value).then(a,l)}c((n=n.apply(i,t||[])).next())})}(this,void 0,void 0,function*(){if(1==e.length&&(e=["0","0",""+-+e[0]]),e.length>0){if(isNaN(+e[0])||isNaN(+e[1])||isNaN(+e[2]))throw new Error("Wrong arguments");this.physicsWorld.gravity={x:+e[0],y:+e[1],z:+e[2]}}return JSON.stringify(this.physicsWorld.gravity)}),'args: [ ?float, ?float, ?float ]; Get or set 3D world gravity vector. 1 argument sets vector {x: 0, y: 0, z: -value}, 3 arguments set the whole vector. Default value is "9.82" or "0 0 -9.82"')}}window.gg_version="0.0.56";const jse=0,t4=1,Yse=2,n4=1,i4=2,qc=3,Ql=0,To=1,Ko=2,Xc=0,Ym=1,r4=2,s4=3,o4=4,qse=5,Xh=100,Xse=101,Kse=102,Zse=103,Qse=104,Jse=200,eoe=201,toe=202,noe=203,rk=204,sk=205,ioe=206,roe=207,soe=208,ooe=209,aoe=210,loe=211,coe=212,doe=213,uoe=214,hoe=0,foe=1,poe=2,xC=3,moe=4,goe=5,_oe=6,voe=7,wC=0,yoe=1,boe=2,_u=0,xoe=1,woe=2,Moe=3,Coe=4,Soe=5,Eoe=6,Aoe=7,a4="attached",Kc=301,Kh=302,MC=303,CC=304,fb=306,Jl=1e3,Zi=1001,pb=1002,_r=1003,ak=1004,qm=1005,ar=1006,mb=1007,pl=1008,Zc=1009,l4=1010,c4=1011,gb=1012,lk=1013,vu=1014,Zo=1015,Xm=1016,ck=1017,dk=1018,Km=1020,d4=35902,u4=1021,h4=1022,Io=1023,f4=1024,p4=1025,Zm=1026,Qm=1027,uk=1028,SC=1029,m4=1030,hk=1031,fk=1033,EC=33776,AC=33777,DC=33778,TC=33779,pk=35840,mk=35841,gk=35842,_k=35843,vk=36196,yk=37492,bk=37496,xk=37808,wk=37809,Mk=37810,Ck=37811,Sk=37812,Ek=37813,Ak=37814,Dk=37815,Tk=37816,Ik=37817,Rk=37818,kk=37819,Pk=37820,Ok=37821,IC=36492,Fk=36494,Lk=36495,g4=36283,Nk=36284,Bk=36285,Uk=36286,_b=2300,vb=2301,koe=0,v4=1,Hk=2,Ooe=3201,Zh=0,Foe=1,yu="",cs="srgb",ds="srgb-linear",Gk="display-p3",kC="display-p3-linear",PC="linear",Fi="srgb",OC="rec709",FC="p3",tg=7680,Loe=512,Noe=513,Boe=514,b4=515,Uoe=516,Voe=517,zoe=518,Hoe=519,x4="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]+Ls[i>>16&255]+Ls[i>>24&255]+"-"+Ls[255&t]+Ls[t>>8&255]+"-"+Ls[t>>16&15|64]+Ls[t>>24&255]+"-"+Ls[63&e|128]+Ls[e>>8&255]+"-"+Ls[e>>16&255]+Ls[e>>24&255]+Ls[255&n]+Ls[n>>8&255]+Ls[n>>16&255]+Ls[n>>24&255]).toLowerCase()}function Qi(i,t,e){return Math.max(t,Math.min(e,i))}function $k(i,t){return(i%t+t)%t}function yb(i,t,e){return(1-e)*i+e*t}function co(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 yn(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 sae_radToDeg=function eae(i){return i*ig};class xe{constructor(t=0,e=0){xe.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(Qi(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 wn{constructor(t,e,n,r,s,o,a,l,c){wn.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 d=this.elements;return d[0]=t,d[1]=r,d[2]=a,d[3]=e,d[4]=s,d[5]=l,d[6]=n,d[7]=o,d[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],d=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],F=r[2],D=r[5],k=r[8];return s[0]=o*b+a*M+l*F,s[3]=o*v+a*x+l*D,s[6]=o*y+a*C+l*k,s[1]=c*b+d*M+h*F,s[4]=c*v+d*x+h*D,s[7]=c*y+d*C+h*k,s[2]=p*b+m*M+g*F,s[5]=p*v+m*x+g*D,s[8]=p*y+m*C+g*k,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],d=t[8];return e*o*d-e*a*c-n*s*d+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],d=t[8],h=d*o-a*c,p=a*l-d*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-d*n)*b,t[2]=(a*n-r*o)*b,t[3]=p*b,t[4]=(d*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(Wk.makeScale(t,e)),this}rotate(t){return this.premultiply(Wk.makeRotation(-t)),this}translate(t,e){return this.premultiply(Wk.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 Wk=new wn;function M4(i){for(let t=i.length-1;t>=0;--t)if(i[t]>=65535)return!0;return!1}function bb(i){return document.createElementNS("http://www.w3.org/1999/xhtml",i)}function aae(){const i=bb("canvas");return i.style.display="block",i}Int8Array,Uint8Array,Uint8ClampedArray,Int16Array,Uint16Array,Int32Array,Uint32Array,Float32Array,Float64Array;const C4={};function sg(i){i in C4||(C4[i]=!0,console.warn(i))}const S4=(new wn).set(.8224621,.177538,0,.0331941,.9668058,0,.0170827,.0723974,.9105199),E4=(new wn).set(1.2249401,-.2249404,0,-.0420569,1.0420571,0,-.0196376,-.0786361,1.0982735),xb={[ds]:{transfer:PC,primaries:OC,luminanceCoefficients:[.2126,.7152,.0722],toReference:i=>i,fromReference:i=>i},[cs]:{transfer:Fi,primaries:OC,luminanceCoefficients:[.2126,.7152,.0722],toReference:i=>i.convertSRGBToLinear(),fromReference:i=>i.convertLinearToSRGB()},[kC]:{transfer:PC,primaries:FC,luminanceCoefficients:[.2289,.6917,.0793],toReference:i=>i.applyMatrix3(E4),fromReference:i=>i.applyMatrix3(S4)},[Gk]:{transfer:Fi,primaries:FC,luminanceCoefficients:[.2289,.6917,.0793],toReference:i=>i.convertSRGBToLinear().applyMatrix3(E4),fromReference:i=>i.applyMatrix3(S4).convertLinearToSRGB()}},cae=new Set([ds,kC]),Jn={enabled:!0,_workingColorSpace:ds,get workingColorSpace(){return this._workingColorSpace},set workingColorSpace(i){if(!cae.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,xb[e].fromReference)((0,xb[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 xb[i].primaries},getTransfer:function(i){return i===yu?PC:xb[i].transfer},getLuminanceCoefficients:function(i,t=this._workingColorSpace){return i.fromArray(xb[t].luminanceCoefficients)}};function og(i){return i<.04045?.0773993808*i:Math.pow(.9478672986*i+.0521327014,2.4)}function jk(i){return i<.0031308?12.92*i:1.055*Math.pow(i,.41666)-.055}let ag;class dae{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===ag&&(ag=bb("canvas")),ag.width=t.width,ag.height=t.height;const n=ag.getContext("2d");t instanceof ImageData?n.putImageData(t,0,0):n.drawImage(t,0,0,t.width,t.height),e=ag}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=bb("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=Zi,s=Zi,o=ar,a=pl,l=Io,c=Zc,d=i.DEFAULT_ANISOTROPY,h=yu){super(),this.isTexture=!0,Object.defineProperty(this,"id",{value:hae++}),this.uuid=Qo(),this.name="",this.source=new lg(e),this.mipmaps=[],this.mapping=n,this.channel=0,this.wrapS=r,this.wrapT=s,this.magFilter=o,this.minFilter=a,this.anisotropy=d,this.format=l,this.internalFormat=null,this.type=c,this.offset=new xe(0,0),this.repeat=new xe(1,1),this.center=new xe(0,0),this.rotation=0,this.matrixAutoUpdate=!0,this.matrix=new wn,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 Jl:e.x=e.x-Math.floor(e.x);break;case Zi:e.x=e.x<0?0:1;break;case pb: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 Jl:e.y=e.y-Math.floor(e.y);break;case Zi:e.y=e.y<0?0:1;break;case pb: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 _i{constructor(t=0,e=0,n=0,r=1){_i.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],d=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(d-p)<.01&&Math.abs(h-b)<.01&&Math.abs(g-v)<.01){if(Math.abs(d+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,F=(y+1)/2,D=(d+p)/4,k=(h+b)/4,B=(g+v)/4;return x>C&&x>F?x<.01?(n=0,r=.707106781,s=.707106781):(n=Math.sqrt(x),r=D/n,s=k/n):C>F?C<.01?(n=.707106781,r=0,s=.707106781):(r=Math.sqrt(C),n=D/r,s=B/r):F<.01?(n=.707106781,r=.707106781,s=0):(s=Math.sqrt(F),n=k/s,r=B/s),this.set(n,r,s,e),this}let M=Math.sqrt((v-g)*(v-g)+(h-b)*(h-b)+(p-d)*(p-d));return Math.abs(M)<.001&&(M=1),this.x=(v-g)/M,this.y=(h-b)/M,this.z=(p-d)/M,this.w=Math.acos((c+m+y-1)/2),this}setFromMatrixPosition(t){const e=t.elements;return this.x=e[12],this.y=e[13],this.z=e[14],this.w=e[15],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 fae extends ng{constructor(t=1,e=1,n={}){super(),this.isRenderTarget=!0,this.width=t,this.height=e,this.depth=1,this.scissor=new _i(0,0,t,e),this.scissorTest=!1,this.viewport=new _i(0,0,t,e);const r={width:t,height:e,depth:1};n=Object.assign({generateMipmaps:!1,internalFormat:null,minFilter:ar,depthBuffer:!0,stencilBuffer:!1,resolveDepthBuffer:!0,resolveStencilBuffer:!0,depthTexture:null,samples:0,count:1},n);const s=new Ro(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 F=Math.sqrt(x),D=Math.atan2(F,y*M);v=Math.sin(v*D)/F,a=Math.sin(a*D)/F}const C=a*M;if(l=l*v+p*C,c=c*v+m*C,d=d*v+g*C,h=h*v+b*C,v===1-a){const F=1/Math.sqrt(l*l+c*c+d*d+h*h);l*=F,c*=F,d*=F,h*=F}}t[e]=l,t[e+1]=c,t[e+2]=d,t[e+3]=h}static multiplyQuaternionsFlat(t,e,n,r,s,o){const a=n[r],l=n[r+1],c=n[r+2],d=n[r+3],h=s[o],p=s[o+1],m=s[o+2],g=s[o+3];return t[e]=a*g+d*h+l*m-c*p,t[e+1]=l*g+d*p+c*h-a*m,t[e+2]=c*g+d*m+a*p-l*h,t[e+3]=d*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),d=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*d*h+c*m*g,this._y=c*m*h-p*d*g,this._z=c*d*g+p*m*h,this._w=c*d*h-p*m*g;break;case"YXZ":this._x=p*d*h+c*m*g,this._y=c*m*h-p*d*g,this._z=c*d*g-p*m*h,this._w=c*d*h+p*m*g;break;case"ZXY":this._x=p*d*h-c*m*g,this._y=c*m*h+p*d*g,this._z=c*d*g+p*m*h,this._w=c*d*h-p*m*g;break;case"ZYX":this._x=p*d*h-c*m*g,this._y=c*m*h+p*d*g,this._z=c*d*g-p*m*h,this._w=c*d*h+p*m*g;break;case"YZX":this._x=p*d*h+c*m*g,this._y=c*m*h+p*d*g,this._z=c*d*g-p*m*h,this._w=c*d*h-p*m*g;break;case"XZY":this._x=p*d*h-c*m*g,this._y=c*m*h-p*d*g,this._z=c*d*g+p*m*h,this._w=c*d*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],d=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=(d-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=(d-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+d)/m}else{const m=2*Math.sqrt(1+h-n-a);this._w=(o-r)/m,this._x=(s+c)/m,this._y=(l+d)/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(Qi(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,d=e._w;return this._x=n*d+o*a+r*c-s*l,this._y=r*d+o*l+s*a-n*c,this._z=s*d+o*c+n*l-r*a,this._w=o*d-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),d=Math.atan2(c,a),h=Math.sin((1-e)*d)/c,p=Math.sin(e*d)/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 O{constructor(t=0,e=0,n=0){O.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(D4.setFromEuler(t))}applyAxisAngle(t,e){return this.applyQuaternion(D4.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),d=2*(a*e-s*r),h=2*(s*n-o*e);return this.x=e+l*c+o*h-a*d,this.y=n+l*d+a*c-s*h,this.z=r+l*h+s*d-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 Xk.copy(this).projectOnVector(t),this.sub(Xk)}reflect(t){return this.sub(Xk.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(Qi(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 Xk=new O,D4=new uo;class Ns{constructor(t=new O(1/0,1/0,1/0),e=new O(-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;e=this.min.x&&t.x<=this.max.x&&t.y>=this.min.y&&t.y<=this.max.y&&t.z>=this.min.z&&t.z<=this.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.x>=this.min.x&&t.min.x<=this.max.x&&t.max.y>=this.min.y&&t.min.y<=this.max.y&&t.max.z>=this.min.z&&t.min.z<=this.max.z}intersectsSphere(t){return this.clampPoint(t.center,ml),ml.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(wb),UC.subVectors(this.max,wb),cg.subVectors(t.a,wb),dg.subVectors(t.b,wb),ug.subVectors(t.c,wb),xu.subVectors(dg,cg),wu.subVectors(ug,dg),Jh.subVectors(cg,ug);let e=[0,-xu.z,xu.y,0,-wu.z,wu.y,0,-Jh.z,Jh.y,xu.z,0,-xu.x,wu.z,0,-wu.x,Jh.z,0,-Jh.x,-xu.y,xu.x,0,-wu.y,wu.x,0,-Jh.y,Jh.x,0];return!(!Kk(e,cg,dg,ug,UC)||(e=[1,0,0,0,1,0,0,0,1],!Kk(e,cg,dg,ug,UC)))&&(VC.crossVectors(xu,wu),e=[VC.x,VC.y,VC.z],Kk(e,cg,dg,ug,UC))}clampPoint(t,e){return e.copy(t).clamp(this.min,this.max)}distanceToPoint(t){return this.clampPoint(t,ml).distanceTo(t)}getBoundingSphere(t){return this.isEmpty()?t.makeEmpty():(this.getCenter(t.center),t.radius=.5*this.getSize(ml).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 O,new O,new O,new O,new O,new O,new O,new O],ml=new O,BC=new Ns,cg=new O,dg=new O,ug=new O,xu=new O,wu=new O,Jh=new O,wb=new O,UC=new O,VC=new O,ef=new O;function Kk(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),d=n.dot(ef);if(Math.max(-Math.max(l,c,d),Math.min(l,c,d))>a)return!1}return!0}const pae=new Ns,Mb=new O,Zk=new O;class Bs{constructor(t=new O,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):pae.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;Mb.subVectors(t,this.center);const e=Mb.lengthSq();if(e>this.radius*this.radius){const n=Math.sqrt(e),r=.5*(n-this.radius);this.center.addScaledVector(Mb,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):(Zk.subVectors(t.center,this.center).setLength(t.radius),this.expandByPoint(Mb.copy(t.center).add(Zk)),this.expandByPoint(Mb.copy(t.center).sub(Zk))),this)}equals(t){return t.center.equals(this.center)&&t.radius===this.radius}clone(){return(new this.constructor).copy(this)}}const ed=new O,Qk=new O,zC=new O,Mu=new O,Jk=new O,HC=new O,eP=new O;class Cb{constructor(t=new O,e=new O(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){Qk.copy(t).add(e).multiplyScalar(.5),zC.copy(e).sub(t).normalize(),Mu.copy(this.origin).sub(Qk);const s=.5*t.distanceTo(e),o=-this.direction.dot(zC),a=Mu.dot(this.direction),l=-Mu.dot(zC),c=Mu.lengthSq(),d=Math.abs(1-o*o);let h,p,m,g;if(d>0)if(h=o*l-a,p=o*a-l,g=s*d,h>=0)if(p>=-g)if(p<=g){const b=1/d;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(Qk).addScaledVector(zC,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,d=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),d>=0?(s=(t.min.y-p.y)*d,o=(t.max.y-p.y)*d):(s=(t.max.y-p.y)*d,o=(t.min.y-p.y)*d),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){Jk.subVectors(e,t),HC.subVectors(n,t),eP.crossVectors(Jk,HC);let a,o=this.direction.dot(eP);if(o>0){if(r)return null;a=1}else{if(!(o<0))return null;a=-1,o=-o}Mu.subVectors(this.origin,t);const l=a*this.direction.dot(HC.crossVectors(Mu,HC));if(l<0)return null;const c=a*this.direction.dot(Jk.cross(Mu));if(c<0||l+c>o)return null;const d=-a*Mu.dot(eP);return d<0?null:this.at(d/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 Bt{constructor(t,e,n,r,s,o,a,l,c,d,h,p,m,g,b,v){Bt.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,d,h,p,m,g,b,v)}set(t,e,n,r,s,o,a,l,c,d,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]=d,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 Bt).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/hg.setFromMatrixColumn(t,0).length(),s=1/hg.setFromMatrixColumn(t,1).length(),o=1/hg.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),d=Math.cos(s),h=Math.sin(s);if("XYZ"===t.order){const p=o*d,m=o*h,g=a*d,b=a*h;e[0]=l*d,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*d,m=l*h,g=c*d,b=c*h;e[0]=p+b*a,e[4]=g*a-m,e[8]=o*c,e[1]=o*h,e[5]=o*d,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*d,m=l*h,g=c*d,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*d,e[9]=b-p*a,e[2]=-o*c,e[6]=a,e[10]=o*l}else if("ZYX"===t.order){const p=o*d,m=o*h,g=a*d,b=a*h;e[0]=l*d,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*d,e[4]=b-p*h,e[8]=g*h+m,e[1]=h,e[5]=o*d,e[9]=-a*d,e[2]=-c*d,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*d,e[4]=-h,e[8]=c*d,e[1]=p*h+b,e[5]=o*d,e[9]=m*h-g,e[2]=g*h-m,e[6]=a*d,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(mae,t,gae)}lookAt(t,e,n){const r=this.elements;return Jo.subVectors(t,e),0===Jo.lengthSq()&&(Jo.z=1),Jo.normalize(),Cu.crossVectors(n,Jo),0===Cu.lengthSq()&&(1===Math.abs(n.z)?Jo.x+=1e-4:Jo.z+=1e-4,Jo.normalize(),Cu.crossVectors(n,Jo)),Cu.normalize(),GC.crossVectors(Jo,Cu),r[0]=Cu.x,r[4]=GC.x,r[8]=Jo.x,r[1]=Cu.y,r[5]=GC.y,r[9]=Jo.y,r[2]=Cu.z,r[6]=GC.z,r[10]=Jo.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],d=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],F=n[15],D=r[0],k=r[4],B=r[8],T=r[12],A=r[1],W=r[5],ie=r[9],ne=r[13],oe=r[2],ge=r[6],q=r[10],se=r[14],J=r[3],we=r[7],Be=r[11],Ye=r[15];return s[0]=o*D+a*A+l*oe+c*J,s[4]=o*k+a*W+l*ge+c*we,s[8]=o*B+a*ie+l*q+c*Be,s[12]=o*T+a*ne+l*se+c*Ye,s[1]=d*D+h*A+p*oe+m*J,s[5]=d*k+h*W+p*ge+m*we,s[9]=d*B+h*ie+p*q+m*Be,s[13]=d*T+h*ne+p*se+m*Ye,s[2]=g*D+b*A+v*oe+y*J,s[6]=g*k+b*W+v*ge+y*we,s[10]=g*B+b*ie+v*q+y*Be,s[14]=g*T+b*ne+v*se+y*Ye,s[3]=M*D+x*A+C*oe+F*J,s[7]=M*k+x*W+C*ge+F*we,s[11]=M*B+x*ie+C*q+F*Be,s[15]=M*T+x*ne+C*se+F*Ye,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],d=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*d-s*l*d)+t[11]*(+e*c*h-e*a*m-s*o*h+n*o*m+s*a*d-n*c*d)+t[15]*(-r*a*d-e*l*h+e*a*p+r*o*h-n*o*p+n*l*d)}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],d=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-d*v*c-g*l*m+o*v*m+d*l*y-o*p*y,C=d*b*c-g*h*c+g*a*m-o*b*m-d*a*y+o*h*y,F=g*h*l-d*b*l-g*a*p+o*b*p+d*a*v-o*h*v,D=e*M+n*x+r*C+s*F;if(0===D)return this.set(0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0);const k=1/D;return t[0]=M*k,t[1]=(b*p*s-h*v*s-b*r*m+n*v*m+h*r*y-n*p*y)*k,t[2]=(a*v*s-b*l*s+b*r*c-n*v*c-a*r*y+n*l*y)*k,t[3]=(h*l*s-a*p*s-h*r*c+n*p*c+a*r*m-n*l*m)*k,t[4]=x*k,t[5]=(d*v*s-g*p*s+g*r*m-e*v*m-d*r*y+e*p*y)*k,t[6]=(g*l*s-o*v*s-g*r*c+e*v*c+o*r*y-e*l*y)*k,t[7]=(o*p*s-d*l*s+d*r*c-e*p*c-o*r*m+e*l*m)*k,t[8]=C*k,t[9]=(g*h*s-d*b*s-g*n*m+e*b*m+d*n*y-e*h*y)*k,t[10]=(o*b*s-g*a*s+g*n*c-e*b*c-o*n*y+e*a*y)*k,t[11]=(d*a*s-o*h*s-d*n*c+e*h*c+o*n*m-e*a*m)*k,t[12]=F*k,t[13]=(d*b*r-g*h*r+g*n*p-e*b*p-d*n*v+e*h*v)*k,t[14]=(g*a*r-o*b*r-g*n*l+e*b*l+o*n*v-e*a*v)*k,t[15]=(o*h*r-d*a*r+d*n*l-e*h*l-o*n*p+e*a*p)*k,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,d=s*a;return this.set(c*o+n,c*a-r*l,c*l+r*a,0,c*a+r*l,d*a+n,d*l-r*o,0,c*l-r*a,d*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,d=o+o,h=a+a,p=s*c,m=s*d,g=s*h,b=o*d,v=o*h,y=a*h,M=l*c,x=l*d,C=l*h,F=n.x,D=n.y,k=n.z;return r[0]=(1-(b+y))*F,r[1]=(m+C)*F,r[2]=(g-x)*F,r[3]=0,r[4]=(m-C)*D,r[5]=(1-(p+y))*D,r[6]=(v+M)*D,r[7]=0,r[8]=(g+x)*k,r[9]=(v-M)*k,r[10]=(1-(p+b))*k,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=hg.set(r[0],r[1],r[2]).length();const o=hg.set(r[4],r[5],r[6]).length(),a=hg.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],gl.copy(this);const c=1/s,d=1/o,h=1/a;return gl.elements[0]*=c,gl.elements[1]*=c,gl.elements[2]*=c,gl.elements[4]*=d,gl.elements[5]*=d,gl.elements[6]*=d,gl.elements[8]*=h,gl.elements[9]*=h,gl.elements[10]*=h,e.setFromRotationMatrix(gl),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),d=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]=d,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),d=1/(n-r),h=1/(o-s),p=(e+t)*c,m=(n+r)*d;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*d,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 hg=new O,gl=new Bt,mae=new O(0,0,0),gae=new O(1,1,1),Cu=new O,GC=new O,Jo=new O,T4=new Bt,I4=new uo;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],d=s[5],h=s[9],p=s[2],m=s[6],g=s[10];switch(n){case"XYZ":this._y=Math.asin(Qi(l,-1,1)),Math.abs(l)<.9999999?(this._x=Math.atan2(-h,g),this._z=Math.atan2(-a,o)):(this._x=Math.atan2(m,d),this._z=0);break;case"YXZ":this._x=Math.asin(-Qi(h,-1,1)),Math.abs(h)<.9999999?(this._y=Math.atan2(l,g),this._z=Math.atan2(c,d)):(this._y=Math.atan2(-p,o),this._z=0);break;case"ZXY":this._x=Math.asin(Qi(m,-1,1)),Math.abs(m)<.9999999?(this._y=Math.atan2(-p,g),this._z=Math.atan2(-a,d)):(this._y=0,this._z=Math.atan2(c,o));break;case"ZYX":this._y=Math.asin(-Qi(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,d));break;case"YZX":this._z=Math.asin(Qi(c,-1,1)),Math.abs(c)<.9999999?(this._x=Math.atan2(-h,d),this._y=Math.atan2(-p,o)):(this._x=0,this._y=Math.atan2(l,g));break;case"XZY":this._z=Math.asin(-Qi(a,-1,1)),Math.abs(a)<.9999999?(this._x=Math.atan2(m,d),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 T4.makeRotationFromQuaternion(e),this.setFromRotationMatrix(T4,n,r)}setFromVector3(e,n=this._order){return this.set(e.x,e.y,e.z,n)}reorder(e){return I4.setFromEuler(this),this.setFromQuaternion(I4,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 tP{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:_ae++}),this.uuid=Qo(),this.name="",this.type="Object3D",this.parent=null,this.children=[],this.up=i.DEFAULT_UP.clone();const e=new O,n=new td,r=new uo,s=new O(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 Bt},normalMatrix:{value:new wn}}),this.matrix=new Bt,this.matrixWorld=new Bt,this.matrixAutoUpdate=i.DEFAULT_MATRIX_AUTO_UPDATE,this.matrixWorldAutoUpdate=i.DEFAULT_MATRIX_WORLD_AUTO_UPDATE,this.matrixWorldNeedsUpdate=!1,this.layers=new tP,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 fg.setFromAxisAngle(e,n),this.quaternion.multiply(fg),this}rotateOnWorldAxis(e,n){return fg.setFromAxisAngle(e,n),this.quaternion.premultiply(fg),this}rotateX(e){return this.rotateOnAxis(k4,e)}rotateY(e){return this.rotateOnAxis(P4,e)}rotateZ(e){return this.rotateOnAxis(O4,e)}translateOnAxis(e,n){return R4.copy(e).applyQuaternion(this.quaternion),this.position.add(R4.multiplyScalar(n)),this}translateX(e){return this.translateOnAxis(k4,e)}translateY(e){return this.translateOnAxis(P4,e)}translateZ(e){return this.translateOnAxis(O4,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?$C.copy(e):$C.set(e,n,r);const s=this.parent;this.updateWorldMatrix(!0,!1),Sb.setFromMatrixPosition(this.matrixWorld),this.isCamera||this.isLight?nd.lookAt(Sb,$C,this.up):nd.lookAt($C,Sb,this.up),this.quaternion.setFromRotationMatrix(nd),s&&(nd.extractRotation(s.matrixWorld),fg.setFromRotationMatrix(nd),this.quaternion.premultiply(fg.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.maxInstanceCount=this._maxInstanceCount,s.maxVertexCount=this._maxVertexCount,s.maxIndexCount=this._maxIndexCount,s.geometryInitialized=this._geometryInitialized,s.geometryCount=this._geometryCount,s.matricesTexture=this._matricesTexture.toJSON(e),null!==this._colorsTexture&&(s.colorsTexture=this._colorsTexture.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 d=0,h=c.length;d0){s.children=[];for(let l=0;l0){s.animations=[];for(let l=0;l0&&(r.geometries=l),c.length>0&&(r.materials=c),d.length>0&&(r.textures=d),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 d in l){const h=l[d];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){_l.subVectors(r,e),id.subVectors(n,e),iP.subVectors(t,e);const o=_l.dot(_l),a=_l.dot(id),l=_l.dot(iP),c=id.dot(id),d=id.dot(iP),h=o*c-a*a;if(0===h)return s.set(0,0,0),null;const p=1/h,m=(c*l-a*d)*p,g=(o*d-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 _l.subVectors(n,e),id.subVectors(t,e),_l.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 _l.subVectors(this.c,this.b),id.subVectors(this.a,this.b),.5*_l.cross(id).length()}getMidpoint(t){return t.addVectors(this.a,this.b).add(this.c).multiplyScalar(1/3)}getNormal(t){return Ra.getNormal(this.a,this.b,this.c,t)}getPlane(t){return t.setFromCoplanarPoints(this.a,this.b,this.c)}getBarycoord(t,e){return Ra.getBarycoord(t,this.a,this.b,this.c,e)}getInterpolation(t,e,n,r,s){return Ra.getInterpolation(t,this.a,this.b,this.c,e,n,r,s)}containsPoint(t){return Ra.containsPoint(t,this.a,this.b,this.c)}isFrontFacing(t){return Ra.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;mg.subVectors(r,n),gg.subVectors(s,n),rP.subVectors(t,n);const l=mg.dot(rP),c=gg.dot(rP);if(l<=0&&c<=0)return e.copy(n);sP.subVectors(t,r);const d=mg.dot(sP),h=gg.dot(sP);if(d>=0&&h<=d)return e.copy(r);const p=l*h-d*c;if(p<=0&&l>=0&&d<=0)return o=l/(l-d),e.copy(n).addScaledVector(mg,o);oP.subVectors(t,s);const m=mg.dot(oP),g=gg.dot(oP);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(gg,a);const v=d*g-m*h;if(v<=0&&h-d>=0&&m-g>=0)return L4.subVectors(s,r),a=(h-d)/(h-d+(m-g)),e.copy(r).addScaledVector(L4,a);const y=1/(v+b+p);return o=b*y,a=p*y,e.copy(n).addScaledVector(mg,o).addScaledVector(gg,a)}equals(t){return t.a.equals(this.a)&&t.b.equals(this.b)&&t.c.equals(this.c)}}const N4={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},Su={h:0,s:0,l:0},WC={h:0,s:0,l:0};function aP(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 qe{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=cs){return t=Math.floor(t),this.r=(t>>16&255)/255,this.g=(t>>8&255)/255,this.b=(255&t)/255,Jn.toWorkingColorSpace(this,e),this}setRGB(t,e,n,r=Jn.workingColorSpace){return this.r=t,this.g=e,this.b=n,Jn.toWorkingColorSpace(this,r),this}setHSL(t,e,n,r=Jn.workingColorSpace){if(t=$k(t,1),e=Qi(e,0,1),n=Qi(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=aP(o,s,t+1/3),this.g=aP(o,s,t),this.b=aP(o,s,t-1/3)}return Jn.toWorkingColorSpace(this,r),this}setStyle(t,e=cs){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=cs){const n=N4[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=og(t.r),this.g=og(t.g),this.b=og(t.b),this}copyLinearToSRGB(t){return this.r=jk(t.r),this.g=jk(t.g),this.b=jk(t.b),this}convertSRGBToLinear(){return this.copySRGBToLinear(this),this}convertLinearToSRGB(){return this.copyLinearToSRGB(this),this}getHex(t=cs){return Jn.fromWorkingColorSpace(Us.copy(this),t),65536*Math.round(Qi(255*Us.r,0,255))+256*Math.round(Qi(255*Us.g,0,255))+Math.round(Qi(255*Us.b,0,255))}getHexString(t=cs){return("000000"+this.getHex(t).toString(16)).slice(-6)}getHSL(t,e=Jn.workingColorSpace){Jn.fromWorkingColorSpace(Us.copy(this),e);const n=Us.r,r=Us.g,s=Us.b,o=Math.max(n,r,s),a=Math.min(n,r,s);let l,c;const d=(a+o)/2;if(a===o)l=0,c=0;else{const h=o-a;switch(c=d<=.5?h/(o+a):h/(2-o-a),o){case n:l=(r-s)/h+(r0!=t>0&&this.version++,this._alphaTest=t}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.dispersion&&(n.dispersion=this.dispersion),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!==Ym&&(n.blending=this.blending),this.side!==Ql&&(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!==rk&&(n.blendSrc=this.blendSrc),this.blendDst!==sk&&(n.blendDst=this.blendDst),this.blendEquation!==Xh&&(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!==xC&&(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++}onBuild(){console.warn("Material: onBuild() has been removed.")}onBeforeRender(){console.warn("Material: onBeforeRender() has been removed.")}}class vr extends ko{constructor(t){super(),this.isMeshBasicMaterial=!0,this.type="MeshBasicMaterial",this.color=new qe(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=wC,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 yr=new O,jC=new xe;class Hi{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=Zo,this.version=0}onUploadCallback(){}set needsUpdate(t){!0===t&&this.version++}get updateRange(){return sg("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],d=[];for(let h=0,p=c.length;h0&&(r[l]=d,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 d=[],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))&&(V4.copy(s).invert(),tf.copy(t.ray).applyMatrix4(V4),(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,d=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:JC.clone(),object:i}}(i,t,e,n,vg,yg,bg,QC);if(d){r&&(XC.fromBufferAttribute(r,a),KC.fromBufferAttribute(r,l),ZC.fromBufferAttribute(r,c),d.uv=Ra.getInterpolation(QC,vg,yg,bg,XC,KC,ZC,new xe)),s&&(XC.fromBufferAttribute(s,a),KC.fromBufferAttribute(s,l),ZC.fromBufferAttribute(s,c),d.uv1=Ra.getInterpolation(QC,vg,yg,bg,XC,KC,ZC,new xe)),o&&(H4.fromBufferAttribute(o,a),G4.fromBufferAttribute(o,l),$4.fromBufferAttribute(o,c),d.normal=Ra.getInterpolation(QC,vg,yg,bg,H4,G4,$4,new O),d.normal.dot(n.direction)>0&&d.normal.multiplyScalar(-1));const h={a,b:l,c,normal:new O,materialIndex:0};Ra.getNormal(vg,yg,bg,h.normal),d.face=h}return d}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=[],d=[],h=[];let p=0,m=0;function g(b,v,y,M,x,C,F,D,k,B,T){const A=C/k,W=F/B,ie=C/2,ne=F/2,oe=D/2,ge=k+1,q=B+1;let se=0,J=0;const we=new O;for(let Be=0;Be0?1:-1,d.push(we.x,we.y,we.z),h.push(Rt/k),h.push(1-Be/B),se+=1}for(let Be=0;Be0&&(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 dP extends Fr{constructor(){super(),this.isCamera=!0,this.type="Camera",this.matrixWorldInverse=new Bt,this.projectionMatrix=new Bt,this.projectionMatrixInverse=new Bt,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 Eu=new O,Y4=new xe,q4=new xe;class br extends dP{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*Qh*this.fov);return.5*this.getFilmHeight()/t}getEffectiveFOV(){return 2*ig*Math.atan(Math.tan(.5*Qh*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){Eu.set(-1,-1,.5).applyMatrix4(this.projectionMatrixInverse),e.set(Eu.x,Eu.y).multiplyScalar(-t/Eu.z),Eu.set(1,1,.5).applyMatrix4(this.projectionMatrixInverse),n.set(Eu.x,Eu.y).multiplyScalar(-t/Eu.z)}getViewSize(t,e){return this.getViewBounds(t,Y4,q4),e.subVectors(q4,Y4)}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*Qh*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 Dae extends Fr{constructor(t,e,n){super(),this.type="CubeCamera",this.renderTarget=n,this.coordinateSystem=null,this.activeMipmapLevel=0;const r=new br(-90,1,t,e);r.layers=this.layers,this.add(r);const s=new br(-90,1,t,e);s.layers=this.layers,this.add(s);const o=new br(-90,1,t,e);o.layers=this.layers,this.add(o);const a=new br(-90,1,t,e);a.layers=this.layers,this.add(a);const l=new br(-90,1,t,e);l.layers=this.layers,this.add(l);const c=new br(-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,d]=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,d),t.setRenderTarget(h,p,m),t.xr.enabled=g,n.texture.needsPMREMUpdate=!0}}class tS extends Ro{constructor(t,e,n,r,s,o,a,l,c,d){super(t=void 0!==t?t:[],e=void 0!==e?e:Kc,n,r,s,o,a,l,c,d),this.isCubeTexture=!0,this.flipY=!1}get images(){return this.image}set images(t){this.image=t}}class Tae extends bu{constructor(t=1,e={}){super(t,t,e),this.isWebGLCubeRenderTarget=!0;const n={width:t,height:t,depth:1};this.texture=new tS([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:ar}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 vl({name:"CubemapFromEquirect",uniforms:xg(n_uniforms),vertexShader:n_vertexShader,fragmentShader:n_fragmentShader,side:To,blending:Xc});s.uniforms.tEquirect.value=e;const o=new Nn(r,s),a=e.minFilter;return e.minFilter===pl&&(e.minFilter=ar),new Dae(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 uP=new O,Iae=new O,Rae=new wn;class rf{constructor(t=new O(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=uP.subVectors(n,e).cross(Iae.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(uP),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||Rae.getNormalMatrix(t),r=this.coplanarPoint(uP).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 Bs,nS=new O;class iS{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],d=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+d,v+g,C+M).normalize(),n[3].setComponents(l-o,p-d,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,nS.y=r.normal.y>0?t.max.y:t.min.y,nS.z=r.normal.z>0?t.max.z:t.min.z,r.distanceToPoint(nS)<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 X4(){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 kae(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.isInterleavedBufferAttribute&&(a=a.data),a.isGLBufferAttribute){const d=t.get(a);return void((!d||d.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 ) || defined( USE_BATCHING_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 ) || defined( USE_BATCHING_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\n#ifdef USE_BATCHING_COLOR\n\tvec3 batchingColor = getBatchingColor( getIndirectIndex( gl_DrawID ) );\n\tvColor.xyz *= batchingColor.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}\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}",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_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\tfloat distanceFalloff = 1.0 / max( pow( lightDistance, decayExponent ), 0.01 );\n\tif ( cutoffDistance > 0.0 ) {\n\t\tdistanceFalloff *= pow2( saturate( 1.0 - pow4( lightDistance / cutoffDistance ) ) );\n\t}\n\treturn distanceFalloff;\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_DISPERSION\n\tmaterial.dispersion = dispersion;\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\tfloat dispersion;\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.shadowIntensity, 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.shadowIntensity, 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.shadowIntensity, 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 )\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\tfor ( int i = 0; i < MORPHTARGETS_COUNT; i ++ ) {\n\t\tif ( morphTargetInfluences[ i ] != 0.0 ) objectNormal += getMorph( gl_VertexID, i, 1 ).xyz * morphTargetInfluences[ i ];\n\t}\n#endif",morphtarget_pars_vertex:"#ifdef USE_MORPHTARGETS\n\t#ifndef USE_INSTANCING_MORPH\n\t\tuniform float morphTargetBaseInfluence;\n\t\tuniform float morphTargetInfluences[ MORPHTARGETS_COUNT ];\n\t#endif\n\tuniform sampler2DArray morphTargetsTexture;\n\tuniform ivec2 morphTargetsTextureSize;\n\tvec4 getMorph( const in int vertexIndex, const in int morphTargetIndex, const in int offset ) {\n\t\tint texelIndex = vertexIndex * MORPHTARGETS_TEXTURE_STRIDE + offset;\n\t\tint y = texelIndex / morphTargetsTextureSize.x;\n\t\tint x = texelIndex - y * morphTargetsTextureSize.x;\n\t\tivec3 morphUV = ivec3( x, y, morphTargetIndex );\n\t\treturn texelFetch( morphTargetsTexture, morphUV, 0 );\n\t}\n#endif",morphtarget_vertex:"#ifdef USE_MORPHTARGETS\n\ttransformed *= morphTargetBaseInfluence;\n\tfor ( int i = 0; i < MORPHTARGETS_COUNT; i ++ ) {\n\t\tif ( morphTargetInfluences[ i ] != 0.0 ) transformed += getMorph( gl_VertexID, i, 0 ).xyz * morphTargetInfluences[ i ];\n\t}\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.;const float ShiftRight8 = 1. / 256.;\nconst float Inv255 = 1. / 255.;\nconst vec4 PackFactors = vec4( 1.0, 256.0, 256.0 * 256.0, 256.0 * 256.0 * 256.0 );\nconst vec2 UnpackFactors2 = vec2( UnpackDownscale, 1.0 / PackFactors.g );\nconst vec3 UnpackFactors3 = vec3( UnpackDownscale / PackFactors.rg, 1.0 / PackFactors.b );\nconst vec4 UnpackFactors4 = vec4( UnpackDownscale / PackFactors.rgb, 1.0 / PackFactors.a );\nvec4 packDepthToRGBA( const in float v ) {\n\tif( v <= 0.0 )\n\t\treturn vec4( 0., 0., 0., 0. );\n\tif( v >= 1.0 )\n\t\treturn vec4( 1., 1., 1., 1. );\n\tfloat vuf;\n\tfloat af = modf( v * PackFactors.a, vuf );\n\tfloat bf = modf( vuf * ShiftRight8, vuf );\n\tfloat gf = modf( vuf * ShiftRight8, vuf );\n\treturn vec4( vuf * Inv255, gf * PackUpscale, bf * PackUpscale, af );\n}\nvec3 packDepthToRGB( const in float v ) {\n\tif( v <= 0.0 )\n\t\treturn vec3( 0., 0., 0. );\n\tif( v >= 1.0 )\n\t\treturn vec3( 1., 1., 1. );\n\tfloat vuf;\n\tfloat bf = modf( v * PackFactors.b, vuf );\n\tfloat gf = modf( vuf * ShiftRight8, vuf );\n\treturn vec3( vuf * Inv255, gf * PackUpscale, bf );\n}\nvec2 packDepthToRG( const in float v ) {\n\tif( v <= 0.0 )\n\t\treturn vec2( 0., 0. );\n\tif( v >= 1.0 )\n\t\treturn vec2( 1., 1. );\n\tfloat vuf;\n\tfloat gf = modf( v * 256., vuf );\n\treturn vec2( vuf * Inv255, gf );\n}\nfloat unpackRGBAToDepth( const in vec4 v ) {\n\treturn dot( v, UnpackFactors4 );\n}\nfloat unpackRGBToDepth( const in vec3 v ) {\n\treturn dot( v, UnpackFactors3 );\n}\nfloat unpackRGToDepth( const in vec2 v ) {\n\treturn v.r * UnpackFactors2.r + v.g * UnpackFactors2.g;\n}\nvec4 pack2HalfToRGBA( const in 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( const in 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 shadowIntensity;\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 shadowIntensity;\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 shadowIntensity;\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 shadowIntensity, 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 mix( 1.0, shadow, shadowIntensity );\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 shadowIntensity, 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 mix( 1.0, shadow, shadowIntensity );\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 shadowIntensity;\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 shadowIntensity;\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 shadowIntensity;\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.shadowIntensity, 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.shadowIntensity, 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.shadowIntensity, 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\tconst float StartCompression = 0.8 - 0.04;\n\tconst float 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, vec3( newPeak ), 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.dispersion, 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 dispersion, const in float ior, const in float thickness,\n\t\tconst in vec3 attenuationColor, const in float attenuationDistance ) {\n\t\tvec4 transmittedLight;\n\t\tvec3 transmittance;\n\t\t#ifdef USE_DISPERSION\n\t\t\tfloat halfSpread = ( ior - 1.0 ) * 0.025 * dispersion;\n\t\t\tvec3 iors = vec3( ior - halfSpread, ior, ior + halfSpread );\n\t\t\tfor ( int i = 0; i < 3; i ++ ) {\n\t\t\t\tvec3 transmissionRay = getVolumeTransmissionRay( n, v, thickness, iors[ i ], modelMatrix );\n\t\t\t\tvec3 refractedRayExit = position + transmissionRay;\n\t\t\n\t\t\t\tvec4 ndcPos = projMatrix * viewMatrix * vec4( refractedRayExit, 1.0 );\n\t\t\t\tvec2 refractionCoords = ndcPos.xy / ndcPos.w;\n\t\t\t\trefractionCoords += 1.0;\n\t\t\t\trefractionCoords /= 2.0;\n\t\t\n\t\t\t\tvec4 transmissionSample = getTransmissionSample( refractionCoords, roughness, iors[ i ] );\n\t\t\t\ttransmittedLight[ i ] = transmissionSample[ i ];\n\t\t\t\ttransmittedLight.a += transmissionSample.a;\n\t\t\t\ttransmittance[ i ] = diffuseColor[ i ] * volumeAttenuation( length( transmissionRay ), attenuationColor, attenuationDistance )[ i ];\n\t\t\t}\n\t\t\ttransmittedLight.a /= 3.0;\n\t\t\n\t\t#else\n\t\t\n\t\t\tvec3 transmissionRay = getVolumeTransmissionRay( n, v, thickness, ior, modelMatrix );\n\t\t\tvec3 refractedRayExit = position + transmissionRay;\n\t\t\tvec4 ndcPos = projMatrix * viewMatrix * vec4( refractedRayExit, 1.0 );\n\t\t\tvec2 refractionCoords = ndcPos.xy / ndcPos.w;\n\t\t\trefractionCoords += 1.0;\n\t\t\trefractionCoords /= 2.0;\n\t\t\ttransmittedLight = getTransmissionSample( refractionCoords, roughness, ior );\n\t\t\ttransmittance = diffuseColor * volumeAttenuation( length( transmissionRay ), attenuationColor, attenuationDistance );\n\t\t\n\t\t#endif\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#elif DEPTH_PACKING == 3202\n\t\tgl_FragColor = vec4( packDepthToRGB( fragCoordZ ), 1.0 );\n\t#elif DEPTH_PACKING == 3203\n\t\tgl_FragColor = vec4( packDepthToRG( fragCoordZ ), 0.0, 1.0 );\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_DISPERSION\n\tuniform float dispersion;\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}"},Qe={common:{diffuse:{value:new qe(16777215)},opacity:{value:1},map:{value:null},mapTransform:{value:new wn},alphaMap:{value:null},alphaMapTransform:{value:new wn},alphaTest:{value:0}},specularmap:{specularMap:{value:null},specularMapTransform:{value:new wn}},envmap:{envMap:{value:null},envMapRotation:{value:new wn},flipEnvMap:{value:-1},reflectivity:{value:1},ior:{value:1.5},refractionRatio:{value:.98}},aomap:{aoMap:{value:null},aoMapIntensity:{value:1},aoMapTransform:{value:new wn}},lightmap:{lightMap:{value:null},lightMapIntensity:{value:1},lightMapTransform:{value:new wn}},bumpmap:{bumpMap:{value:null},bumpMapTransform:{value:new wn},bumpScale:{value:1}},normalmap:{normalMap:{value:null},normalMapTransform:{value:new wn},normalScale:{value:new xe(1,1)}},displacementmap:{displacementMap:{value:null},displacementMapTransform:{value:new wn},displacementScale:{value:1},displacementBias:{value:0}},emissivemap:{emissiveMap:{value:null},emissiveMapTransform:{value:new wn}},metalnessmap:{metalnessMap:{value:null},metalnessMapTransform:{value:new wn}},roughnessmap:{roughnessMap:{value:null},roughnessMapTransform:{value:new wn}},gradientmap:{gradientMap:{value:null}},fog:{fogDensity:{value:25e-5},fogNear:{value:1},fogFar:{value:2e3},fogColor:{value:new qe(16777215)}},lights:{ambientLightColor:{value:[]},lightProbe:{value:[]},directionalLights:{value:[],properties:{direction:{},color:{}}},directionalLightShadows:{value:[],properties:{shadowIntensity:1,shadowBias:{},shadowNormalBias:{},shadowRadius:{},shadowMapSize:{}}},directionalShadowMap:{value:[]},directionalShadowMatrix:{value:[]},spotLights:{value:[],properties:{color:{},position:{},direction:{},distance:{},coneCos:{},penumbraCos:{},decay:{}}},spotLightShadows:{value:[],properties:{shadowIntensity:1,shadowBias:{},shadowNormalBias:{},shadowRadius:{},shadowMapSize:{}}},spotLightMap:{value:[]},spotShadowMap:{value:[]},spotLightMatrix:{value:[]},pointLights:{value:[],properties:{color:{},position:{},decay:{},distance:{}}},pointLightShadows:{value:[],properties:{shadowIntensity:1,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 qe(16777215)},opacity:{value:1},size:{value:1},scale:{value:1},map:{value:null},alphaMap:{value:null},alphaMapTransform:{value:new wn},alphaTest:{value:0},uvTransform:{value:new wn}},sprite:{diffuse:{value:new qe(16777215)},opacity:{value:1},center:{value:new xe(.5,.5)},rotation:{value:0},map:{value:null},mapTransform:{value:new wn},alphaMap:{value:null},alphaMapTransform:{value:new wn},alphaTest:{value:0}}},ec={basic:{uniforms:ho([Qe.common,Qe.specularmap,Qe.envmap,Qe.aomap,Qe.lightmap,Qe.fog]),vertexShader:Mn.meshbasic_vert,fragmentShader:Mn.meshbasic_frag},lambert:{uniforms:ho([Qe.common,Qe.specularmap,Qe.envmap,Qe.aomap,Qe.lightmap,Qe.emissivemap,Qe.bumpmap,Qe.normalmap,Qe.displacementmap,Qe.fog,Qe.lights,{emissive:{value:new qe(0)}}]),vertexShader:Mn.meshlambert_vert,fragmentShader:Mn.meshlambert_frag},phong:{uniforms:ho([Qe.common,Qe.specularmap,Qe.envmap,Qe.aomap,Qe.lightmap,Qe.emissivemap,Qe.bumpmap,Qe.normalmap,Qe.displacementmap,Qe.fog,Qe.lights,{emissive:{value:new qe(0)},specular:{value:new qe(1118481)},shininess:{value:30}}]),vertexShader:Mn.meshphong_vert,fragmentShader:Mn.meshphong_frag},standard:{uniforms:ho([Qe.common,Qe.envmap,Qe.aomap,Qe.lightmap,Qe.emissivemap,Qe.bumpmap,Qe.normalmap,Qe.displacementmap,Qe.roughnessmap,Qe.metalnessmap,Qe.fog,Qe.lights,{emissive:{value:new qe(0)},roughness:{value:1},metalness:{value:0},envMapIntensity:{value:1}}]),vertexShader:Mn.meshphysical_vert,fragmentShader:Mn.meshphysical_frag},toon:{uniforms:ho([Qe.common,Qe.aomap,Qe.lightmap,Qe.emissivemap,Qe.bumpmap,Qe.normalmap,Qe.displacementmap,Qe.gradientmap,Qe.fog,Qe.lights,{emissive:{value:new qe(0)}}]),vertexShader:Mn.meshtoon_vert,fragmentShader:Mn.meshtoon_frag},matcap:{uniforms:ho([Qe.common,Qe.bumpmap,Qe.normalmap,Qe.displacementmap,Qe.fog,{matcap:{value:null}}]),vertexShader:Mn.meshmatcap_vert,fragmentShader:Mn.meshmatcap_frag},points:{uniforms:ho([Qe.points,Qe.fog]),vertexShader:Mn.points_vert,fragmentShader:Mn.points_frag},dashed:{uniforms:ho([Qe.common,Qe.fog,{scale:{value:1},dashSize:{value:1},totalSize:{value:2}}]),vertexShader:Mn.linedashed_vert,fragmentShader:Mn.linedashed_frag},depth:{uniforms:ho([Qe.common,Qe.displacementmap]),vertexShader:Mn.depth_vert,fragmentShader:Mn.depth_frag},normal:{uniforms:ho([Qe.common,Qe.bumpmap,Qe.normalmap,Qe.displacementmap,{opacity:{value:1}}]),vertexShader:Mn.meshnormal_vert,fragmentShader:Mn.meshnormal_frag},sprite:{uniforms:ho([Qe.sprite,Qe.fog]),vertexShader:Mn.sprite_vert,fragmentShader:Mn.sprite_frag},background:{uniforms:{uvTransform:{value:new wn},t2D:{value:null},backgroundIntensity:{value:1}},vertexShader:Mn.background_vert,fragmentShader:Mn.background_frag},backgroundCube:{uniforms:{envMap:{value:null},flipEnvMap:{value:-1},backgroundBlurriness:{value:0},backgroundIntensity:{value:1},backgroundRotation:{value:new wn}},vertexShader:Mn.backgroundCube_vert,fragmentShader:Mn.backgroundCube_frag},cube:{uniforms:{tCube:{value:null},tFlip:{value:-1},opacity:{value:1}},vertexShader:Mn.cube_vert,fragmentShader:Mn.cube_frag},equirect:{uniforms:{tEquirect:{value:null}},vertexShader:Mn.equirect_vert,fragmentShader:Mn.equirect_frag},distanceRGBA:{uniforms:ho([Qe.common,Qe.displacementmap,{referencePosition:{value:new O},nearDistance:{value:1},farDistance:{value:1e3}}]),vertexShader:Mn.distanceRGBA_vert,fragmentShader:Mn.distanceRGBA_frag},shadow:{uniforms:ho([Qe.lights,Qe.fog,{color:{value:new qe(0)},opacity:{value:1}}]),vertexShader:Mn.shadow_vert,fragmentShader:Mn.shadow_frag}};ec.physical={uniforms:ho([ec.standard.uniforms,{clearcoat:{value:0},clearcoatMap:{value:null},clearcoatMapTransform:{value:new wn},clearcoatNormalMap:{value:null},clearcoatNormalMapTransform:{value:new wn},clearcoatNormalScale:{value:new xe(1,1)},clearcoatRoughness:{value:0},clearcoatRoughnessMap:{value:null},clearcoatRoughnessMapTransform:{value:new wn},dispersion:{value:0},iridescence:{value:0},iridescenceMap:{value:null},iridescenceMapTransform:{value:new wn},iridescenceIOR:{value:1.3},iridescenceThicknessMinimum:{value:100},iridescenceThicknessMaximum:{value:400},iridescenceThicknessMap:{value:null},iridescenceThicknessMapTransform:{value:new wn},sheen:{value:0},sheenColor:{value:new qe(0)},sheenColorMap:{value:null},sheenColorMapTransform:{value:new wn},sheenRoughness:{value:1},sheenRoughnessMap:{value:null},sheenRoughnessMapTransform:{value:new wn},transmission:{value:0},transmissionMap:{value:null},transmissionMapTransform:{value:new wn},transmissionSamplerSize:{value:new xe},transmissionSamplerMap:{value:null},thickness:{value:0},thicknessMap:{value:null},thicknessMapTransform:{value:new wn},attenuationDistance:{value:0},attenuationColor:{value:new qe(0)},specularColor:{value:new qe(1,1,1)},specularColorMap:{value:null},specularColorMapTransform:{value:new wn},specularIntensity:{value:1},specularIntensityMap:{value:null},specularIntensityMapTransform:{value:new wn},anisotropyVector:{value:new xe},anisotropyMap:{value:null},anisotropyMapTransform:{value:new wn}}]),vertexShader:Mn.meshphysical_vert,fragmentShader:Mn.meshphysical_frag};const rS={r:0,b:0,g:0},lf=new td,kce=new Bt;function Pce(i,t,e,n,r,s,o){const a=new qe(0);let c,d,l=!0===s?0:1,h=null,p=0,m=null;function g(M){let x=!0===M.isScene?M.background:null;return x&&x.isTexture&&(x=(M.backgroundBlurriness>0?e:t).get(x)),x}function y(M,x){M.getRGB(rS,W4(i)),n.buffers.color.setClear(rS.r,rS.g,rS.b,x,o)}return{getClearColor:function(){return a},setClearColor:function(M,x=1){a.set(M),l=x,y(a,l)},getClearAlpha:function(){return l},setClearAlpha:function(M){l=M,y(a,l)},render:function b(M){let x=!1;const C=g(M);null===C?y(a,l):C&&C.isColor&&(y(C,1),x=!0);const F=i.xr.getEnvironmentBlendMode();"additive"===F?n.buffers.color.setClear(0,0,0,1,o):"alpha-blend"===F&&n.buffers.color.setClear(0,0,0,0,o),(i.autoClear||x)&&(n.buffers.depth.setTest(!0),n.buffers.depth.setMask(!0),n.buffers.color.setMask(!0),i.clear(i.autoClearColor,i.autoClearDepth,i.autoClearStencil))},addToRenderList:function v(M,x){const C=g(x);C&&(C.isCubeTexture||C.mapping===fb)?(void 0===d&&(d=new Nn(new nf(1,1,1),new vl({name:"BackgroundCubeMaterial",uniforms:xg(ec.backgroundCube.uniforms),vertexShader:ec.backgroundCube.vertexShader,fragmentShader:ec.backgroundCube.fragmentShader,side:To,depthTest:!1,depthWrite:!1,fog:!1})),d.geometry.deleteAttribute("normal"),d.geometry.deleteAttribute("uv"),d.onBeforeRender=function(F,D,k){this.matrixWorld.copyPosition(k.matrixWorld)},Object.defineProperty(d.material,"envMap",{get:function(){return this.uniforms.envMap.value}}),r.update(d)),lf.copy(x.backgroundRotation),lf.x*=-1,lf.y*=-1,lf.z*=-1,C.isCubeTexture&&!1===C.isRenderTargetTexture&&(lf.y*=-1,lf.z*=-1),d.material.uniforms.envMap.value=C,d.material.uniforms.flipEnvMap.value=C.isCubeTexture&&!1===C.isRenderTargetTexture?-1:1,d.material.uniforms.backgroundBlurriness.value=x.backgroundBlurriness,d.material.uniforms.backgroundIntensity.value=x.backgroundIntensity,d.material.uniforms.backgroundRotation.value.setFromMatrix4(kce.makeRotationFromEuler(lf)),d.material.toneMapped=Jn.getTransfer(C.colorSpace)!==Fi,(h!==C||p!==C.version||m!==i.toneMapping)&&(d.material.needsUpdate=!0,h=C,p=C.version,m=i.toneMapping),d.layers.enableAll(),M.unshift(d,d.geometry,d.material,0,0,null)):C&&C.isTexture&&(void 0===c&&(c=new Nn(new af(2,2),new vl({name:"BackgroundMaterial",uniforms:xg(ec.background.uniforms),vertexShader:ec.background.vertexShader,fragmentShader:ec.background.fragmentShader,side:Ql,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=C,c.material.uniforms.backgroundIntensity.value=x.backgroundIntensity,c.material.toneMapped=Jn.getTransfer(C.colorSpace)!==Fi,!0===C.matrixAutoUpdate&&C.updateMatrix(),c.material.uniforms.uvTransform.value.copy(C.matrix),(h!==C||p!==C.version||m!==i.toneMapping)&&(c.material.needsUpdate=!0,h=C,p=C.version,m=i.toneMapping),c.layers.enableAll(),M.unshift(c,c.geometry,c.material,0,0,null))}}}function Oce(i,t){const e=i.getParameter(i.MAX_VERTEX_ATTRIBS),n={},r=p(null);let s=r,o=!1;function c(A){return i.bindVertexArray(A)}function d(A){return i.deleteVertexArray(A)}function p(A){const W=[],ie=[],ne=[];for(let oe=0;oe=0){const Be=oe[J];let Ye=ge[J];if(void 0===Ye&&("instanceMatrix"===J&&A.instanceMatrix&&(Ye=A.instanceMatrix),"instanceColor"===J&&A.instanceColor&&(Ye=A.instanceColor)),void 0===Be||Be.attribute!==Ye||Ye&&Be.data!==Ye.data)return!0;q++}return s.attributesNum!==q||s.index!==ne}(A,ne,ie,oe),ge&&function g(A,W,ie,ne){const oe={},ge=W.attributes;let q=0;const se=ie.getAttributes();for(const J in se)if(se[J].location>=0){let Be=ge[J];void 0===Be&&("instanceMatrix"===J&&A.instanceMatrix&&(Be=A.instanceMatrix),"instanceColor"===J&&A.instanceColor&&(Be=A.instanceColor));const Ye={};Ye.attribute=Be,Be&&Be.data&&(Ye.data=Be.data),oe[J]=Ye,q++}s.attributes=oe,s.attributesNum=q,s.index=ne}(A,ne,ie,oe),null!==oe&&t.update(oe,i.ELEMENT_ARRAY_BUFFER),(ge||o)&&(o=!1,function C(A,W,ie,ne){b();const oe=ne.attributes,ge=ie.getAttributes(),q=W.defaultAttributeValues;for(const se in ge){const J=ge[se];if(J.location>=0){let we=oe[se];if(void 0===we&&("instanceMatrix"===se&&A.instanceMatrix&&(we=A.instanceMatrix),"instanceColor"===se&&A.instanceColor&&(we=A.instanceColor)),void 0!==we){const Be=we.normalized,Ye=we.itemSize,Rt=t.get(we);if(void 0===Rt)continue;const nn=Rt.buffer,le=Rt.type,Pe=Rt.bytesPerElement,Ze=le===i.INT||le===i.UNSIGNED_INT||we.gpuType===lk;if(we.isInterleavedBufferAttribute){const Fe=we.data,wt=Fe.stride,At=we.offset;if(Fe.isInstancedInterleavedBuffer){for(let St=0;St0&&i.getShaderPrecisionFormat(i.FRAGMENT_SHADER,i.HIGH_FLOAT).precision>0)return"highp";D="mediump"}return"mediump"===D&&i.getShaderPrecisionFormat(i.VERTEX_SHADER,i.MEDIUM_FLOAT).precision>0&&i.getShaderPrecisionFormat(i.FRAGMENT_SHADER,i.MEDIUM_FLOAT).precision>0?"mediump":"lowp"}let c=void 0!==e.precision?e.precision:"highp";const d=l(c);d!==c&&(console.warn("THREE.WebGLRenderer:",c,"not supported, using",d,"instead."),c=d);const h=!0===e.logarithmicDepthBuffer,p=i.getParameter(i.MAX_TEXTURE_IMAGE_UNITS),m=i.getParameter(i.MAX_VERTEX_TEXTURE_IMAGE_UNITS);return{isWebGL2:!0,getMaxAnisotropy:function s(){if(void 0!==r)return r;if(!0===t.has("EXT_texture_filter_anisotropic")){const D=t.get("EXT_texture_filter_anisotropic");r=i.getParameter(D.MAX_TEXTURE_MAX_ANISOTROPY_EXT)}else r=0;return r},getMaxPrecision:l,textureFormatReadable:function o(D){return!(D!==Io&&n.convert(D)!==i.getParameter(i.IMPLEMENTATION_COLOR_READ_FORMAT))},textureTypeReadable:function a(D){const k=D===Xm&&(t.has("EXT_color_buffer_half_float")||t.has("EXT_color_buffer_float"));return!(D!==Zc&&n.convert(D)!==i.getParameter(i.IMPLEMENTATION_COLOR_READ_TYPE)&&D!==Zo&&!k)},precision:c,logarithmicDepthBuffer:h,maxTextures:p,maxVertexTextures:m,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:m>0,maxSamples:i.getParameter(i.MAX_SAMPLES)}}function Nce(i){const t=this;let e=null,n=0,r=!1,s=!1;const o=new rf,a=new wn,l={value:null,needsUpdate:!1};function d(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=d(g,p,x,m);for(let F=0;F!==x;++F)C[F]=e[F];y.clippingState=C,this.numIntersection=b?this.numPlanes:0,this.numPlanes+=M}}}function Bce(i){let t=new WeakMap;function e(o,a){return a===MC?o.mapping=Kc:a===CC&&(o.mapping=Kh),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===MC||a===CC){if(t.has(o))return e(t.get(o).texture,o.mapping);{const l=o.image;if(l&&l.height>0){const c=new Tae(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 Db extends dP{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,d=(this.top-this.bottom)/this.view.fullHeight/this.zoom;s+=c*this.view.offsetX,o=s+c*this.view.width,a-=d*this.view.offsetY,l=a-d*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 K4=[.125,.215,.35,.446,.526,.582],hP=new Db,Z4=new qe;let fP=null,pP=0,mP=0,gP=!1;const df=(1+Math.sqrt(5))/2,Sg=1/df,Q4=[new O(-df,Sg,0),new O(df,Sg,0),new O(-Sg,0,df),new O(Sg,0,df),new O(0,df,-Sg),new O(0,df,Sg),new O(-1,1,-1),new O(1,1,-1),new O(-1,1,1),new O(1,1,1)];class J4{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){fP=this._renderer.getRenderTarget(),pP=this._renderer.getActiveCubeFace(),mP=this._renderer.getActiveMipmapLevel(),gP=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=n5(),this._compileMaterial(this._cubemapMaterial))}compileEquirectangularShader(){null===this._equirectMaterial&&(this._equirectMaterial=t5(),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=K4[o-i+4-1]:0===o&&(l=0),n.push(l);const c=1/(a-2),d=-c,h=1+c,p=[d,d,h,d,h,h,d,d,h,h,d,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 D=0;D2?0:-1;M.set([k,B,0,k+2/3,B,0,k+2/3,B+1,0,k,B,0,k+2/3,B+1,0,k,B+1,0],b*g*D),x.set(p,v*g*D),C.set([D,D,D,D,D,D],y*g*D)}const F=new hn;F.setAttribute("position",new Hi(M,b)),F.setAttribute("uv",new Hi(x,v)),F.setAttribute("faceIndex",new Hi(C,y)),t.push(F),r>4&&r--}return{lodPlanes:t,sizeLods:e,sigmas:n}}(s)),this._blurMaterial=function Vce(i,t,e){const n=new Float32Array(20),r=new O(0,1,0);return new vl({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:Xc,depthTest:!1,depthWrite:!1})}(s,t,e)}return r}_compileMaterial(t){const e=new Nn(this._lodPlanes[0],t);this._renderer.compile(e,hP)}_sceneToCubeUV(t,e,n,r){const a=new br(90,1,e,n),l=[1,-1,1,1,1,1],c=[1,1,1,-1,-1,-1],d=this._renderer,h=d.autoClear,p=d.toneMapping;d.getClearColor(Z4),d.toneMapping=_u,d.autoClear=!1;const m=new vr({name:"PMREM.Background",side:To,depthWrite:!1,depthTest:!1}),g=new Nn(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(Z4),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;sS(r,M*x,y>2?x:0,x,x),d.setRenderTarget(r),b&&d.render(g,a),d.render(t,a)}g.geometry.dispose(),g.material.dispose(),d.toneMapping=p,d.autoClear=h,t.background=v}_textureToCubeUV(t,e){const n=this._renderer,r=t.mapping===Kc||t.mapping===Kh;r?(null===this._cubemapMaterial&&(this._cubemapMaterial=n5()),this._cubemapMaterial.uniforms.flipEnvMap.value=!1===t.isRenderTargetTexture?-1:1):null===this._equirectMaterial&&(this._equirectMaterial=t5());const s=r?this._cubemapMaterial:this._equirectMaterial,o=new Nn(this._lodPlanes[0],s);s.uniforms.envMap.value=t;const l=this._cubeSize;sS(e,0,0,3*l,2*l),n.setRenderTarget(e),n.render(o,hP)}_applyPMREM(t){const e=this._renderer,n=e.autoClear;e.autoClear=!1;const r=this._lodPlanes.length;for(let s=1;s20&&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 k=0;k<20;++k){const B=k/b,T=Math.exp(-B*B/2);y.push(T),0===k?M+=T:kx-4?r-x+4:0),4*(this._cubeSize-C),3*C,2*C),l.setRenderTarget(e),l.render(h,hP)}}function e5(i,t,e){const n=new bu(i,t,e);return n.texture.mapping=fb,n.texture.name="PMREM.cubeUv",n.scissorTest=!0,n}function sS(i,t,e,n,r){i.viewport.set(t,e,n,r),i.scissor.set(t,e,n,r)}function t5(){return new vl({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:Xc,depthTest:!1,depthWrite:!1})}function n5(){return new vl({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:Xc,depthTest:!1,depthWrite:!1})}function zce(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===MC||l===CC,d=l===Kc||l===Kh;if(c||d){let h=t.get(a);if(a.isRenderTargetTexture&&a.pmremVersion!==(void 0!==h?h.texture.pmremVersion:0))return null===e&&(e=new J4(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||d&&m&&function r(a){let l=0;for(let d=0;d<6;d++)void 0!==a[d]&&l++;return 6===l}(m)?(null===e&&(e=new J4(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 Hce(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&&sg("THREE.WebGLRenderer: "+n+" extension not supported."),r}}}function Gce(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&&(F=Math.ceil(C/t.maxTextureSize),C=t.maxTextureSize);const D=new Float32Array(C*F*4*h),k=new qk(D,C,F,h);k.type=Zo,k.needsUpdate=!0;const B=4*x;for(let A=0;A0)return i;const r=t*e;let s=d5[r];if(void 0===s&&(s=new Float32Array(r),d5[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 Lr(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 Hde(i,t){const e=function zde(i){const t=Jn.getPrimaries(Jn.workingColorSpace),e=Jn.getPrimaries(i);let n;switch(t===e?n="":t===FC&&e===OC?n="LinearDisplayP3ToLinearSRGB":t===OC&&e===FC&&(n="LinearSRGBToLinearDisplayP3"),i){case ds:case kC:return[n,"LinearTransferOETF"];case cs:case Gk: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 Gde(i,t){let e;switch(t){case xoe:e="Linear";break;case woe:e="Reinhard";break;case Moe:e="OptimizedCineon";break;case Coe:e="ACESFilmic";break;case Eoe:e="AgX";break;case Aoe:e="Neutral";break;case Soe:e="Custom";break;default:console.warn("THREE.WebGLProgram: Unsupported toneMapping:",t),e="Linear"}return"vec3 "+i+"( vec3 color ) { return "+e+"ToneMapping( color ); }"}const lS=new O;function Tb(i){return""!==i}function v5(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 y5(i,t){return i.replace(/NUM_CLIPPING_PLANES/g,t.numClippingPlanes).replace(/UNION_CLIPPING_PLANES/g,t.numClippingPlanes-t.numClipIntersection)}const qde=/^[ \t]*#include +<([\w\d./]+)>/gm;function yP(i){return i.replace(qde,Kde)}const Xde=new Map;function Kde(i,t){let e=Mn[t];if(void 0===e){const n=Xde.get(t);if(void 0===n)throw new Error("Can not resolve #include <"+t+">");e=Mn[n],console.warn('THREE.WebGLRenderer: Shader chunk "%s" has been deprecated. Use "%s" instead.',t,n)}return yP(e)}const Zde=/#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 b5(i){return i.replace(Zde,Qde)}function Qde(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(Tb).join("\n"),y.length>0&&(y+="\n")):(v=[x5(e),"#define SHADER_TYPE "+e.shaderType,"#define SHADER_NAME "+e.shaderName,g,e.extensionClipCullDistance?"#define USE_CLIP_DISTANCE":"",e.batching?"#define USE_BATCHING":"",e.batchingColor?"#define USE_BATCHING_COLOR":"",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 "+d:"",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_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.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","#ifdef USE_SKINNING","\tattribute vec4 skinIndex;","\tattribute vec4 skinWeight;","#endif","\n"].filter(Tb).join("\n"),y=[x5(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 "+d:"",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.dispersion?"#define USE_DISPERSION":"",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||e.batchingColor?"#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.decodeVideoTexture?"#define DECODE_VIDEO_TEXTURE":"",e.logarithmicDepthBuffer?"#define USE_LOGDEPTHBUF":"","uniform mat4 viewMatrix;","uniform vec3 cameraPosition;","uniform bool isOrthographic;",e.toneMapping!==_u?"#define TONE_MAPPING":"",e.toneMapping!==_u?Mn.tonemapping_pars_fragment:"",e.toneMapping!==_u?Gde("toneMapping",e.toneMapping):"",e.dithering?"#define DITHERING":"",e.opaque?"#define OPAQUE":"",Mn.colorspace_pars_fragment,Hde("linearToOutputTexel",e.outputColorSpace),(Jn.getLuminanceCoefficients(lS),["float luminance( const in vec3 rgb ) {",`\tconst vec3 weights = vec3( ${lS.x.toFixed(4)}, ${lS.y.toFixed(4)}, ${lS.z.toFixed(4)} );`,"\treturn dot( weights, rgb );","}"].join("\n")),e.useDepthPacking?"#define DEPTH_PACKING "+e.depthPacking:"","\n"].filter(Tb).join("\n")),o=yP(o),o=v5(o,e),o=y5(o,e),a=yP(a),a=v5(a,e),a=y5(a,e),o=b5(o),a=b5(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===x4?"":"layout(location = 0) out highp vec4 pc_fragColor;",e.glslVersion===x4?"":"#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,F=g5(r,r.VERTEX_SHADER,M+v+o),D=g5(r,r.FRAGMENT_SHADER,C);function k(W){if(i.debug.checkShaderErrors){const ie=r.getProgramInfoLog(b).trim(),ne=r.getShaderInfoLog(F).trim(),oe=r.getShaderInfoLog(D).trim();let ge=!0,q=!0;if(!1===r.getProgramParameter(b,r.LINK_STATUS))if(ge=!1,"function"==typeof i.debug.onShaderError)i.debug.onShaderError(r,b,F,D);else{const se=_5(r,F,"vertex"),J=_5(r,D,"fragment");console.error("THREE.WebGLProgram: Shader Error "+r.getError()+" - VALIDATE_STATUS "+r.getProgramParameter(b,r.VALIDATE_STATUS)+"\n\nMaterial Name: "+W.name+"\nMaterial Type: "+W.type+"\n\nProgram Info Log: "+ie+"\n"+se+"\n"+J)}else""!==ie?console.warn("THREE.WebGLProgram: Program Info Log:",ie):(""===ne||""===oe)&&(q=!1);q&&(W.diagnostics={runnable:ge,programLog:ie,vertexShader:{log:ne,prefix:v},fragmentShader:{log:oe,prefix:y}})}r.deleteShader(F),r.deleteShader(D),B=new aS(r,b),T=function Yde(i,t){const e={},n=i.getProgramParameter(t,i.ACTIVE_ATTRIBUTES);for(let r=0;r0,de=T.clearcoat>0,De=T.iridescence>0,Ae=T.sheen>0,Ut=T.transmission>0,Je=R&&!!T.anisotropyMap,ut=de&&!!T.clearcoatMap,bn=de&&!!T.clearcoatNormalMap,ze=de&&!!T.clearcoatRoughnessMap,dt=De&&!!T.iridescenceMap,Wn=De&&!!T.iridescenceThicknessMap,cn=Ae&&!!T.sheenColorMap,_t=Ae&&!!T.sheenRoughnessMap,_n=!!T.specularMap,kn=!!T.specularColorMap,qi=!!T.specularIntensityMap,Z=Ut&&!!T.transmissionMap,We=Ut&&!!T.thicknessMap,Ee=!!T.alphaMap,ei=!!T.extensions;let xr=_u;T.toneMapped&&(null===Fe||!0===Fe.isXRRenderTarget)&&(xr=i.toneMapping);const hs={shaderID:we,shaderType:T.type,shaderName:T.name,vertexShader:nn,fragmentShader:le,defines:T.defines,customVertexShaderID:Pe,customFragmentShaderID:Ze,isRawShaderMaterial:!0===T.isRawShaderMaterial,glslVersion:T.glslVersion,precision:m,batching:At,batchingColor:At&&null!==ne._colorsTexture,instancing:wt,instancingColor:wt&&null!==ne.instanceColor,instancingMorph:wt&&null!==ne.morphTexture,supportsVertexTextures:p,outputColorSpace:null===Fe?i.outputColorSpace:!0===Fe.isXRRenderTarget?Fe.texture.colorSpace:ds,alphaToCoverage:!!T.alphaToCoverage,map:St,matcap:!!T.matcap,envMap:N,envMapMode:N&&se.mapping,envMapCubeUVHeight:J,aoMap:Ge,lightMap:Le,bumpMap:tt,normalMap:Me,displacementMap:p&&$t,emissiveMap:nt,normalMapObjectSpace:Me&&T.normalMapType===Foe,normalMapTangentSpace:Me&&T.normalMapType===Zh,metalnessMap:pt,roughnessMap:H,anisotropy:R,anisotropyMap:Je,clearcoat:de,clearcoatMap:ut,clearcoatNormalMap:bn,clearcoatRoughnessMap:ze,dispersion:T.dispersion>0,iridescence:De,iridescenceMap:dt,iridescenceThicknessMap:Wn,sheen:Ae,sheenColorMap:cn,sheenRoughnessMap:_t,specularMap:_n,specularColorMap:kn,specularIntensityMap:qi,transmission:Ut,transmissionMap:Z,thicknessMap:We,gradientMap:!!T.gradientMap,opaque:!1===T.transparent&&T.blending===Ym&&!1===T.alphaToCoverage,alphaMap:Ee,alphaTest:T.alphaTest>0,alphaHash:!!T.alphaHash,combine:T.combine,mapUv:St&&b(T.map.channel),aoMapUv:Ge&&b(T.aoMap.channel),lightMapUv:Le&&b(T.lightMap.channel),bumpMapUv:tt&&b(T.bumpMap.channel),normalMapUv:Me&&b(T.normalMap.channel),displacementMapUv:$t&&b(T.displacementMap.channel),emissiveMapUv:nt&&b(T.emissiveMap.channel),metalnessMapUv:pt&&b(T.metalnessMap.channel),roughnessMapUv:H&&b(T.roughnessMap.channel),anisotropyMapUv:Je&&b(T.anisotropyMap.channel),clearcoatMapUv:ut&&b(T.clearcoatMap.channel),clearcoatNormalMapUv:bn&&b(T.clearcoatNormalMap.channel),clearcoatRoughnessMapUv:ze&&b(T.clearcoatRoughnessMap.channel),iridescenceMapUv:dt&&b(T.iridescenceMap.channel),iridescenceThicknessMapUv:Wn&&b(T.iridescenceThicknessMap.channel),sheenColorMapUv:cn&&b(T.sheenColorMap.channel),sheenRoughnessMapUv:_t&&b(T.sheenRoughnessMap.channel),specularMapUv:_n&&b(T.specularMap.channel),specularColorMapUv:kn&&b(T.specularColorMap.channel),specularIntensityMapUv:qi&&b(T.specularIntensityMap.channel),transmissionMapUv:Z&&b(T.transmissionMap.channel),thicknessMapUv:We&&b(T.thicknessMap.channel),alphaMapUv:Ee&&b(T.alphaMap.channel),vertexTangents:!!ge.attributes.tangent&&(Me||R),vertexColors:T.vertexColors,vertexAlphas:!0===T.vertexColors&&!!ge.attributes.color&&4===ge.attributes.color.itemSize,pointsUvs:!0===ne.isPoints&&!!ge.attributes.uv&&(St||Ee),fog:!!oe,useFog:!0===T.fog,fogExp2:!!oe&&oe.isFogExp2,flatShading:!0===T.flatShading,sizeAttenuation:!0===T.sizeAttenuation,logarithmicDepthBuffer:h,skinning:!0===ne.isSkinnedMesh,morphTargets:void 0!==ge.morphAttributes.position,morphNormals:void 0!==ge.morphAttributes.normal,morphColors:void 0!==ge.morphAttributes.color,morphTargetsCount:Ye,morphTextureStride:Rt,numDirLights:A.directional.length,numPointLights:A.point.length,numSpotLights:A.spot.length,numSpotLightMaps:A.spotLightMap.length,numRectAreaLights:A.rectArea.length,numHemiLights:A.hemi.length,numDirLightShadows:A.directionalShadowMap.length,numPointLightShadows:A.pointShadowMap.length,numSpotLightShadows:A.spotShadowMap.length,numSpotLightShadowsWithMaps:A.numSpotLightShadowsWithMaps,numLightProbes:A.numLightProbes,numClippingPlanes:o.numPlanes,numClipIntersection:o.numIntersection,dithering:T.dithering,shadowMapEnabled:i.shadowMap.enabled&&W.length>0,shadowMapType:i.shadowMap.type,toneMapping:xr,decodeVideoTexture:St&&!0===T.map.isVideoTexture&&Jn.getTransfer(T.map.colorSpace)===Fi,premultipliedAlpha:T.premultipliedAlpha,doubleSided:T.side===Ko,flipSided:T.side===To,useDepthPacking:T.depthPacking>=0,depthPacking:T.depthPacking||0,index0AttributeName:T.index0AttributeName,extensionClipCullDistance:ei&&!0===T.extensions.clipCullDistance&&n.has("WEBGL_clip_cull_distance"),extensionMultiDraw:(ei&&!0===T.extensions.multiDraw||At)&&n.has("WEBGL_multi_draw"),rendererExtensionParallelShaderCompile:n.has("KHR_parallel_shader_compile"),customProgramCacheKey:T.customProgramCacheKey()};return hs.vertexUv1s=c.has(1),hs.vertexUv2s=c.has(2),hs.vertexUv3s=c.has(3),c.clear(),hs},getProgramCacheKey:function y(T){const A=[];if(T.shaderID?A.push(T.shaderID):(A.push(T.customVertexShaderID),A.push(T.customFragmentShaderID)),void 0!==T.defines)for(const W in T.defines)A.push(W),A.push(T.defines[W]);return!1===T.isRawShaderMaterial&&(function M(T,A){T.push(A.precision),T.push(A.outputColorSpace),T.push(A.envMapMode),T.push(A.envMapCubeUVHeight),T.push(A.mapUv),T.push(A.alphaMapUv),T.push(A.lightMapUv),T.push(A.aoMapUv),T.push(A.bumpMapUv),T.push(A.normalMapUv),T.push(A.displacementMapUv),T.push(A.emissiveMapUv),T.push(A.metalnessMapUv),T.push(A.roughnessMapUv),T.push(A.anisotropyMapUv),T.push(A.clearcoatMapUv),T.push(A.clearcoatNormalMapUv),T.push(A.clearcoatRoughnessMapUv),T.push(A.iridescenceMapUv),T.push(A.iridescenceThicknessMapUv),T.push(A.sheenColorMapUv),T.push(A.sheenRoughnessMapUv),T.push(A.specularMapUv),T.push(A.specularColorMapUv),T.push(A.specularIntensityMapUv),T.push(A.transmissionMapUv),T.push(A.thicknessMapUv),T.push(A.combine),T.push(A.fogExp2),T.push(A.sizeAttenuation),T.push(A.morphTargetsCount),T.push(A.morphAttributeCount),T.push(A.numDirLights),T.push(A.numPointLights),T.push(A.numSpotLights),T.push(A.numSpotLightMaps),T.push(A.numHemiLights),T.push(A.numRectAreaLights),T.push(A.numDirLightShadows),T.push(A.numPointLightShadows),T.push(A.numSpotLightShadows),T.push(A.numSpotLightShadowsWithMaps),T.push(A.numLightProbes),T.push(A.shadowMapType),T.push(A.toneMapping),T.push(A.numClippingPlanes),T.push(A.numClipIntersection),T.push(A.depthPacking)}(A,T),function x(T,A){a.disableAll(),A.supportsVertexTextures&&a.enable(0),A.instancing&&a.enable(1),A.instancingColor&&a.enable(2),A.instancingMorph&&a.enable(3),A.matcap&&a.enable(4),A.envMap&&a.enable(5),A.normalMapObjectSpace&&a.enable(6),A.normalMapTangentSpace&&a.enable(7),A.clearcoat&&a.enable(8),A.iridescence&&a.enable(9),A.alphaTest&&a.enable(10),A.vertexColors&&a.enable(11),A.vertexAlphas&&a.enable(12),A.vertexUv1s&&a.enable(13),A.vertexUv2s&&a.enable(14),A.vertexUv3s&&a.enable(15),A.vertexTangents&&a.enable(16),A.anisotropy&&a.enable(17),A.alphaHash&&a.enable(18),A.batching&&a.enable(19),A.dispersion&&a.enable(20),A.batchingColor&&a.enable(21),T.push(a.mask),a.disableAll(),A.fog&&a.enable(0),A.useFog&&a.enable(1),A.flatShading&&a.enable(2),A.logarithmicDepthBuffer&&a.enable(3),A.skinning&&a.enable(4),A.morphTargets&&a.enable(5),A.morphNormals&&a.enable(6),A.morphColors&&a.enable(7),A.premultipliedAlpha&&a.enable(8),A.shadowMapEnabled&&a.enable(9),A.doubleSided&&a.enable(10),A.flipSided&&a.enable(11),A.useDepthPacking&&a.enable(12),A.dithering&&a.enable(13),A.transmission&&a.enable(14),A.sheen&&a.enable(15),A.opaque&&a.enable(16),A.pointsUvs&&a.enable(17),A.decodeVideoTexture&&a.enable(18),A.alphaToCoverage&&a.enable(19),T.push(a.mask)}(A,T),A.push(i.outputColorSpace)),A.push(T.customProgramCacheKey),A.join()},getUniforms:function C(T){const A=g[T.type];let W;return W=A?j4.clone(ec[A].uniforms):T.uniforms,W},acquireProgram:function F(T,A){let W;for(let ie=0,ne=d.length;ie0?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 d(){for(let h=t,p=i.length;h1&&e.sort(h||due),n.length>1&&n.sort(p||w5),r.length>1&&r.sort(p||w5)}}}function uue(){let i=new WeakMap;return{get:function t(n,r){const s=i.get(n);let o;return void 0===s?(o=new M5,i.set(n,[o])):r>=s.length?(o=new M5,s.push(o)):o=s[r],o},dispose:function e(){i=new WeakMap}}}function hue(){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 O,color:new qe};break;case"SpotLight":e={position:new O,direction:new O,color:new qe,distance:0,coneCos:0,penumbraCos:0,decay:0};break;case"PointLight":e={position:new O,color:new qe,distance:0,decay:0};break;case"HemisphereLight":e={direction:new O,skyColor:new qe,groundColor:new qe};break;case"RectAreaLight":e={color:new qe,position:new O,halfWidth:new O,halfHeight:new O}}return i[t.id]=e,e}}}let pue=0;function mue(i,t){return(t.castShadow?2:0)-(i.castShadow?2:0)+(t.map?1:0)-(i.map?1:0)}function gue(i){const t=new hue,e=function fue(){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={shadowIntensity:1,shadowBias:0,shadowNormalBias:0,shadowRadius:1,shadowMapSize:new xe};break;case"PointLight":e={shadowIntensity:1,shadowBias:0,shadowNormalBias:0,shadowRadius:1,shadowMapSize:new xe,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 O);const r=new O,s=new Bt,o=new Bt;return{setup:function a(c){let d=0,h=0,p=0;for(let T=0;T<9;T++)n.probe[T].set(0,0,0);let m=0,g=0,b=0,v=0,y=0,M=0,x=0,C=0,F=0,D=0,k=0;c.sort(mue);for(let T=0,A=c.length;T0&&(!0===i.has("OES_texture_float_linear")?(n.rectAreaLTC1=Qe.LTC_FLOAT_1,n.rectAreaLTC2=Qe.LTC_FLOAT_2):(n.rectAreaLTC1=Qe.LTC_HALF_1,n.rectAreaLTC2=Qe.LTC_HALF_2)),n.ambient[0]=d,n.ambient[1]=h,n.ambient[2]=p;const B=n.hash;(B.directionalLength!==m||B.pointLength!==g||B.spotLength!==b||B.rectAreaLength!==v||B.hemiLength!==y||B.numDirectionalShadows!==M||B.numPointShadows!==x||B.numSpotShadows!==C||B.numSpotMaps!==F||B.numLightProbes!==k)&&(n.directional.length=m,n.spot.length=b,n.rectArea.length=v,n.point.length=g,n.hemi.length=y,n.directionalShadow.length=M,n.directionalShadowMap.length=M,n.pointShadow.length=x,n.pointShadowMap.length=x,n.spotShadow.length=C,n.spotShadowMap.length=C,n.directionalShadowMatrix.length=M,n.pointShadowMatrix.length=x,n.spotLightMatrix.length=C+F-D,n.spotLightMap.length=F,n.numSpotLightShadowsWithMaps=D,n.numLightProbes=k,B.directionalLength=m,B.pointLength=g,B.spotLength=b,B.rectAreaLength=v,B.hemiLength=y,B.numDirectionalShadows=M,B.numPointShadows=x,B.numSpotShadows=C,B.numSpotMaps=F,B.numLightProbes=k,n.version=pue++)},setupView:function l(c,d){let h=0,p=0,m=0,g=0,b=0;const v=d.matrixWorldInverse;for(let y=0,M=c.length;y=o.length?(a=new C5(i),o.push(a)):a=o[s],a},dispose:function n(){t=new WeakMap}}}class S5 extends ko{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 E5 extends ko{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 vue="void main() {\n\tgl_Position = vec4( position, 1.0 );\n}",yue="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 bue(i,t,e){let n=new iS;const r=new xe,s=new xe,o=new _i,a=new S5({depthPacking:Ooe}),l=new E5,c={},d=e.maxTextureSize,h={[Ql]:To,[To]:Ql,[Ko]:Ko},p=new vl({defines:{VSM_SAMPLES:8},uniforms:{shadow_pass:{value:null},resolution:{value:new xe},radius:{value:4}},vertexShader:vue,fragmentShader:yue}),m=p.clone();m.defines.HORIZONTAL_PASS=1;const g=new hn;g.setAttribute("position",new Hi(new Float32Array([-1,-1,.5,3,-1,.5,-1,3,.5]),3));const b=new Nn(g,p),v=this;this.enabled=!1,this.autoUpdate=!0,this.needsUpdate=!1,this.type=n4;let y=this.type;function M(D,k){const B=t.update(b);p.defines.VSM_SAMPLES!==D.blurSamples&&(p.defines.VSM_SAMPLES=D.blurSamples,m.defines.VSM_SAMPLES=D.blurSamples,p.needsUpdate=!0,m.needsUpdate=!0),null===D.mapPass&&(D.mapPass=new bu(r.x,r.y)),p.uniforms.shadow_pass.value=D.map.texture,p.uniforms.resolution.value=D.mapSize,p.uniforms.radius.value=D.radius,i.setRenderTarget(D.mapPass),i.clear(),i.renderBufferDirect(k,null,B,p,b,null),m.uniforms.shadow_pass.value=D.mapPass.texture,m.uniforms.resolution.value=D.mapSize,m.uniforms.radius.value=D.radius,i.setRenderTarget(D.map),i.clear(),i.renderBufferDirect(k,null,B,m,b,null)}function x(D,k,B,T){let A=null;const W=!0===B.isPointLight?D.customDistanceMaterial:D.customDepthMaterial;if(void 0!==W)A=W;else if(A=!0===B.isPointLight?l:a,i.localClippingEnabled&&!0===k.clipShadows&&Array.isArray(k.clippingPlanes)&&0!==k.clippingPlanes.length||k.displacementMap&&0!==k.displacementScale||k.alphaMap&&k.alphaTest>0||k.map&&k.alphaTest>0){const ie=A.uuid,ne=k.uuid;let oe=c[ie];void 0===oe&&(oe={},c[ie]=oe);let ge=oe[ne];void 0===ge&&(ge=A.clone(),oe[ne]=ge,k.addEventListener("dispose",F)),A=ge}return A.visible=k.visible,A.wireframe=k.wireframe,A.side=T===qc?null!==k.shadowSide?k.shadowSide:k.side:null!==k.shadowSide?k.shadowSide:h[k.side],A.alphaMap=k.alphaMap,A.alphaTest=k.alphaTest,A.map=k.map,A.clipShadows=k.clipShadows,A.clippingPlanes=k.clippingPlanes,A.clipIntersection=k.clipIntersection,A.displacementMap=k.displacementMap,A.displacementScale=k.displacementScale,A.displacementBias=k.displacementBias,A.wireframeLinewidth=k.wireframeLinewidth,A.linewidth=k.linewidth,!0===B.isPointLight&&!0===A.isMeshDistanceMaterial&&(i.properties.get(A).light=B),A}function C(D,k,B,T,A){if(!1===D.visible)return;if(D.layers.test(k.layers)&&(D.isMesh||D.isLine||D.isPoints)&&(D.castShadow||D.receiveShadow&&A===qc)&&(!D.frustumCulled||n.intersectsObject(D))){D.modelViewMatrix.multiplyMatrices(B.matrixWorldInverse,D.matrixWorld);const ne=t.update(D),oe=D.material;if(Array.isArray(oe)){const ge=ne.groups;for(let q=0,se=ge.length;qd||r.y>d)&&(r.x>d&&(s.x=Math.floor(d/we.x),r.x=s.x*we.x,J.mapSize.x=s.x),r.y>d&&(s.y=Math.floor(d/we.y),r.y=s.y*we.y,J.mapSize.y=s.y)),null===J.map||!0===ne||!0===oe){const Ye=this.type!==qc?{minFilter:_r,magFilter:_r}:{};null!==J.map&&J.map.dispose(),J.map=new bu(r.x,r.y,Ye),J.map.texture.name=se.name+".shadowMap",J.camera.updateProjectionMatrix()}i.setRenderTarget(J.map),i.clear();const Be=J.getViewportCount();for(let Ye=0;Ye=1):-1!==se.indexOf("OpenGL ES")&&(q=parseFloat(/^OpenGL ES (\d)/.exec(se)[1]),ge=q>=2);let J=null,we={};const Be=i.getParameter(i.SCISSOR_BOX),Ye=i.getParameter(i.VIEWPORT),Rt=(new _i).fromArray(Be),nn=(new _i).fromArray(Ye);function le(Z,We,Ce,Ee){const Ke=new Uint8Array(4),rn=i.createTexture();i.bindTexture(Z,rn),i.texParameteri(Z,i.TEXTURE_MIN_FILTER,i.NEAREST),i.texParameteri(Z,i.TEXTURE_MAG_FILTER,i.NEAREST);for(let ei=0;ei"u")&&/OculusBrowser/g.test(navigator.userAgent),c=new xe,d=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(H,R){return m?new OffscreenCanvas(H,R):bb("canvas")}function b(H,R,de){let Te=1;const De=pt(H);if((De.width>de||De.height>de)&&(Te=de/Math.max(De.width,De.height)),Te<1){if(typeof HTMLImageElement<"u"&&H instanceof HTMLImageElement||typeof HTMLCanvasElement<"u"&&H instanceof HTMLCanvasElement||typeof ImageBitmap<"u"&&H instanceof ImageBitmap||typeof VideoFrame<"u"&&H instanceof VideoFrame){const Ae=Math.floor(Te*De.width),Ut=Math.floor(Te*De.height);void 0===h&&(h=g(Ae,Ut));const Je=R?g(Ae,Ut):h;return Je.width=Ae,Je.height=Ut,Je.getContext("2d").drawImage(H,0,0,Ae,Ut),console.warn("THREE.WebGLRenderer: Texture has been resized from ("+De.width+"x"+De.height+") to ("+Ae+"x"+Ut+")."),Je}return"data"in H&&console.warn("THREE.WebGLRenderer: Image in DataTexture is too big ("+De.width+"x"+De.height+")."),H}return H}function v(H){return H.generateMipmaps&&H.minFilter!==_r&&H.minFilter!==ar}function y(H){i.generateMipmap(H)}function M(H,R,de,Te,De=!1){if(null!==H){if(void 0!==i[H])return i[H];console.warn("THREE.WebGLRenderer: Attempt to use non-existing WebGL internal format '"+H+"'")}let Ae=R;if(R===i.RED&&(de===i.FLOAT&&(Ae=i.R32F),de===i.HALF_FLOAT&&(Ae=i.R16F),de===i.UNSIGNED_BYTE&&(Ae=i.R8)),R===i.RED_INTEGER&&(de===i.UNSIGNED_BYTE&&(Ae=i.R8UI),de===i.UNSIGNED_SHORT&&(Ae=i.R16UI),de===i.UNSIGNED_INT&&(Ae=i.R32UI),de===i.BYTE&&(Ae=i.R8I),de===i.SHORT&&(Ae=i.R16I),de===i.INT&&(Ae=i.R32I)),R===i.RG&&(de===i.FLOAT&&(Ae=i.RG32F),de===i.HALF_FLOAT&&(Ae=i.RG16F),de===i.UNSIGNED_BYTE&&(Ae=i.RG8)),R===i.RG_INTEGER&&(de===i.UNSIGNED_BYTE&&(Ae=i.RG8UI),de===i.UNSIGNED_SHORT&&(Ae=i.RG16UI),de===i.UNSIGNED_INT&&(Ae=i.RG32UI),de===i.BYTE&&(Ae=i.RG8I),de===i.SHORT&&(Ae=i.RG16I),de===i.INT&&(Ae=i.RG32I)),R===i.RGB&&de===i.UNSIGNED_INT_5_9_9_9_REV&&(Ae=i.RGB9_E5),R===i.RGBA){const Ut=De?PC:Jn.getTransfer(Te);de===i.FLOAT&&(Ae=i.RGBA32F),de===i.HALF_FLOAT&&(Ae=i.RGBA16F),de===i.UNSIGNED_BYTE&&(Ae=Ut===Fi?i.SRGB8_ALPHA8:i.RGBA8),de===i.UNSIGNED_SHORT_4_4_4_4&&(Ae=i.RGBA4),de===i.UNSIGNED_SHORT_5_5_5_1&&(Ae=i.RGB5_A1)}return(Ae===i.R16F||Ae===i.R32F||Ae===i.RG16F||Ae===i.RG32F||Ae===i.RGBA16F||Ae===i.RGBA32F)&&t.get("EXT_color_buffer_float"),Ae}function x(H,R){let de;return H?null===R||R===vu||R===Km?de=i.DEPTH24_STENCIL8:R===Zo?de=i.DEPTH32F_STENCIL8:R===gb&&(de=i.DEPTH24_STENCIL8,console.warn("DepthTexture: 16 bit depth attachment is not supported with stencil. Using 24-bit attachment.")):null===R||R===vu||R===Km?de=i.DEPTH_COMPONENT24:R===Zo?de=i.DEPTH_COMPONENT32F:R===gb&&(de=i.DEPTH_COMPONENT16),de}function C(H,R){return!0===v(H)||H.isFramebufferTexture&&H.minFilter!==_r&&H.minFilter!==ar?Math.log2(Math.max(R.width,R.height))+1:void 0!==H.mipmaps&&H.mipmaps.length>0?H.mipmaps.length:H.isCompressedTexture&&Array.isArray(H.image)?R.mipmaps.length:1}function F(H){const R=H.target;R.removeEventListener("dispose",F),function k(H){const R=n.get(H);if(void 0===R.__webglInit)return;const de=H.source,Te=p.get(de);if(Te){const De=Te[R.__cacheKey];De.usedTimes--,0===De.usedTimes&&B(H),0===Object.keys(Te).length&&p.delete(de)}n.remove(H)}(R),R.isVideoTexture&&d.delete(R)}function D(H){const R=H.target;R.removeEventListener("dispose",D),function T(H){const R=n.get(H);if(H.depthTexture&&H.depthTexture.dispose(),H.isWebGLCubeRenderTarget)for(let Te=0;Te<6;Te++){if(Array.isArray(R.__webglFramebuffer[Te]))for(let De=0;De0&&de.__version!==H.version){const Te=H.image;if(null===Te)console.warn("THREE.WebGLRenderer: Texture marked for update but no image data found.");else{if(!1!==Te.complete)return void nn(de,H,R);console.warn("THREE.WebGLRenderer: Texture marked for update but image is incomplete")}}e.bindTexture(i.TEXTURE_2D,de.__webglTexture,i.TEXTURE0+R)}const J={[Jl]:i.REPEAT,[Zi]:i.CLAMP_TO_EDGE,[pb]:i.MIRRORED_REPEAT},we={[_r]:i.NEAREST,[ak]:i.NEAREST_MIPMAP_NEAREST,[qm]:i.NEAREST_MIPMAP_LINEAR,[ar]:i.LINEAR,[mb]:i.LINEAR_MIPMAP_NEAREST,[pl]:i.LINEAR_MIPMAP_LINEAR},Be={[Loe]:i.NEVER,[Hoe]:i.ALWAYS,[Noe]:i.LESS,[b4]:i.LEQUAL,[Boe]:i.EQUAL,[zoe]:i.GEQUAL,[Uoe]:i.GREATER,[Voe]:i.NOTEQUAL};function Ye(H,R){if(R.type===Zo&&!1===t.has("OES_texture_float_linear")&&(R.magFilter===ar||R.magFilter===mb||R.magFilter===qm||R.magFilter===pl||R.minFilter===ar||R.minFilter===mb||R.minFilter===qm||R.minFilter===pl)&&console.warn("THREE.WebGLRenderer: Unable to use linear filtering with floating point textures. OES_texture_float_linear not supported on this device."),i.texParameteri(H,i.TEXTURE_WRAP_S,J[R.wrapS]),i.texParameteri(H,i.TEXTURE_WRAP_T,J[R.wrapT]),(H===i.TEXTURE_3D||H===i.TEXTURE_2D_ARRAY)&&i.texParameteri(H,i.TEXTURE_WRAP_R,J[R.wrapR]),i.texParameteri(H,i.TEXTURE_MAG_FILTER,we[R.magFilter]),i.texParameteri(H,i.TEXTURE_MIN_FILTER,we[R.minFilter]),R.compareFunction&&(i.texParameteri(H,i.TEXTURE_COMPARE_MODE,i.COMPARE_REF_TO_TEXTURE),i.texParameteri(H,i.TEXTURE_COMPARE_FUNC,Be[R.compareFunction])),!0===t.has("EXT_texture_filter_anisotropic")){if(R.magFilter===_r||R.minFilter!==qm&&R.minFilter!==pl||R.type===Zo&&!1===t.has("OES_texture_float_linear"))return;if(R.anisotropy>1||n.get(R).__currentAnisotropy){const de=t.get("EXT_texture_filter_anisotropic");i.texParameterf(H,de.TEXTURE_MAX_ANISOTROPY_EXT,Math.min(R.anisotropy,r.getMaxAnisotropy())),n.get(R).__currentAnisotropy=R.anisotropy}}}function Rt(H,R){let de=!1;void 0===H.__webglInit&&(H.__webglInit=!0,R.addEventListener("dispose",F));const Te=R.source;let De=p.get(Te);void 0===De&&(De={},p.set(Te,De));const Ae=function ne(H){const R=[];return R.push(H.wrapS),R.push(H.wrapT),R.push(H.wrapR||0),R.push(H.magFilter),R.push(H.minFilter),R.push(H.anisotropy),R.push(H.internalFormat),R.push(H.format),R.push(H.type),R.push(H.generateMipmaps),R.push(H.premultiplyAlpha),R.push(H.flipY),R.push(H.unpackAlignment),R.push(H.colorSpace),R.join()}(R);if(Ae!==H.__cacheKey){void 0===De[Ae]&&(De[Ae]={texture:i.createTexture(),usedTimes:0},o.memory.textures++,de=!0),De[Ae].usedTimes++;const Ut=De[H.__cacheKey];void 0!==Ut&&(De[H.__cacheKey].usedTimes--,0===Ut.usedTimes&&B(R)),H.__cacheKey=Ae,H.__webglTexture=De[Ae].texture}return de}function nn(H,R,de){let Te=i.TEXTURE_2D;(R.isDataArrayTexture||R.isCompressedArrayTexture)&&(Te=i.TEXTURE_2D_ARRAY),R.isData3DTexture&&(Te=i.TEXTURE_3D);const De=Rt(H,R),Ae=R.source;e.bindTexture(Te,H.__webglTexture,i.TEXTURE0+de);const Ut=n.get(Ae);if(Ae.version!==Ut.__version||!0===De){e.activeTexture(i.TEXTURE0+de);const Je=Jn.getPrimaries(Jn.workingColorSpace),ut=R.colorSpace===yu?null:Jn.getPrimaries(R.colorSpace),bn=R.colorSpace===yu||Je===ut?i.NONE:i.BROWSER_DEFAULT_WEBGL;i.pixelStorei(i.UNPACK_FLIP_Y_WEBGL,R.flipY),i.pixelStorei(i.UNPACK_PREMULTIPLY_ALPHA_WEBGL,R.premultiplyAlpha),i.pixelStorei(i.UNPACK_ALIGNMENT,R.unpackAlignment),i.pixelStorei(i.UNPACK_COLORSPACE_CONVERSION_WEBGL,bn);let ze=b(R.image,!1,r.maxTextureSize);ze=nt(R,ze);const dt=s.convert(R.format,R.colorSpace),Wn=s.convert(R.type);let _t,cn=M(R.internalFormat,dt,Wn,R.colorSpace,R.isVideoTexture);Ye(Te,R);const _n=R.mipmaps,kn=!0!==R.isVideoTexture,qi=void 0===Ut.__version||!0===De,Z=Ae.dataReady,We=C(R,ze);if(R.isDepthTexture)cn=x(R.format===Qm,R.type),qi&&(kn?e.texStorage2D(i.TEXTURE_2D,1,cn,ze.width,ze.height):e.texImage2D(i.TEXTURE_2D,0,cn,ze.width,ze.height,0,dt,Wn,null));else if(R.isDataTexture)if(_n.length>0){kn&&qi&&e.texStorage2D(i.TEXTURE_2D,We,cn,_n[0].width,_n[0].height);for(let Ce=0,Ee=_n.length;Ce0){const Ke=bP(_t.width,_t.height,R.format,R.type);for(const rn of R.layerUpdates){const ei=_t.data.subarray(rn*Ke/_t.data.BYTES_PER_ELEMENT,(rn+1)*Ke/_t.data.BYTES_PER_ELEMENT);e.compressedTexSubImage3D(i.TEXTURE_2D_ARRAY,Ce,0,0,rn,_t.width,_t.height,1,dt,ei,0,0)}R.clearLayerUpdates()}else e.compressedTexSubImage3D(i.TEXTURE_2D_ARRAY,Ce,0,0,0,_t.width,_t.height,ze.depth,dt,_t.data,0,0)}else e.compressedTexImage3D(i.TEXTURE_2D_ARRAY,Ce,cn,_t.width,_t.height,ze.depth,0,_t.data,0,0);else console.warn("THREE.WebGLRenderer: Attempt to load unsupported compressed texture format in .uploadTexture()");else kn?Z&&e.texSubImage3D(i.TEXTURE_2D_ARRAY,Ce,0,0,0,_t.width,_t.height,ze.depth,dt,Wn,_t.data):e.texImage3D(i.TEXTURE_2D_ARRAY,Ce,cn,_t.width,_t.height,ze.depth,0,dt,Wn,_t.data)}else{kn&&qi&&e.texStorage2D(i.TEXTURE_2D,We,cn,_n[0].width,_n[0].height);for(let Ce=0,Ee=_n.length;Ce0){const Ce=bP(ze.width,ze.height,R.format,R.type);for(const Ee of R.layerUpdates){const Ke=ze.data.subarray(Ee*Ce/ze.data.BYTES_PER_ELEMENT,(Ee+1)*Ce/ze.data.BYTES_PER_ELEMENT);e.texSubImage3D(i.TEXTURE_2D_ARRAY,0,0,0,Ee,ze.width,ze.height,1,dt,Wn,Ke)}R.clearLayerUpdates()}else e.texSubImage3D(i.TEXTURE_2D_ARRAY,0,0,0,0,ze.width,ze.height,ze.depth,dt,Wn,ze.data)}else e.texImage3D(i.TEXTURE_2D_ARRAY,0,cn,ze.width,ze.height,ze.depth,0,dt,Wn,ze.data);else if(R.isData3DTexture)kn?(qi&&e.texStorage3D(i.TEXTURE_3D,We,cn,ze.width,ze.height,ze.depth),Z&&e.texSubImage3D(i.TEXTURE_3D,0,0,0,0,ze.width,ze.height,ze.depth,dt,Wn,ze.data)):e.texImage3D(i.TEXTURE_3D,0,cn,ze.width,ze.height,ze.depth,0,dt,Wn,ze.data);else if(R.isFramebufferTexture){if(qi)if(kn)e.texStorage2D(i.TEXTURE_2D,We,cn,ze.width,ze.height);else{let Ce=ze.width,Ee=ze.height;for(let Ke=0;Ke>=1,Ee>>=1}}else if(_n.length>0){if(kn&&qi){const Ce=pt(_n[0]);e.texStorage2D(i.TEXTURE_2D,We,cn,Ce.width,Ce.height)}for(let Ce=0,Ee=_n.length;Ce>Ae),dt=Math.max(1,R.height>>Ae);De===i.TEXTURE_3D||De===i.TEXTURE_2D_ARRAY?e.texImage3D(De,Ae,ut,ze,dt,R.depth,0,Ut,Je,null):e.texImage2D(De,Ae,ut,ze,dt,0,Ut,Je,null)}e.bindFramebuffer(i.FRAMEBUFFER,H),Me(R)?a.framebufferTexture2DMultisampleEXT(i.FRAMEBUFFER,Te,De,n.get(de).__webglTexture,0,tt(R)):(De===i.TEXTURE_2D||De>=i.TEXTURE_CUBE_MAP_POSITIVE_X&&De<=i.TEXTURE_CUBE_MAP_NEGATIVE_Z)&&i.framebufferTexture2D(i.FRAMEBUFFER,Te,De,n.get(de).__webglTexture,Ae),e.bindFramebuffer(i.FRAMEBUFFER,null)}function Ze(H,R,de){if(i.bindRenderbuffer(i.RENDERBUFFER,H),R.depthBuffer){const Te=R.depthTexture,Ae=x(R.stencilBuffer,Te&&Te.isDepthTexture?Te.type:null),Ut=R.stencilBuffer?i.DEPTH_STENCIL_ATTACHMENT:i.DEPTH_ATTACHMENT,Je=tt(R);Me(R)?a.renderbufferStorageMultisampleEXT(i.RENDERBUFFER,Je,Ae,R.width,R.height):de?i.renderbufferStorageMultisample(i.RENDERBUFFER,Je,Ae,R.width,R.height):i.renderbufferStorage(i.RENDERBUFFER,Ae,R.width,R.height),i.framebufferRenderbuffer(i.FRAMEBUFFER,Ut,i.RENDERBUFFER,H)}else{const Te=R.textures;for(let De=0;De0&&!0===t.has("WEBGL_multisampled_render_to_texture")&&!1!==R.__useRenderToTexture}function nt(H,R){const de=H.colorSpace,Te=H.format,De=H.type;return!0===H.isCompressedTexture||!0===H.isVideoTexture||de!==ds&&de!==yu&&(Jn.getTransfer(de)===Fi?(Te!==Io||De!==Zc)&&console.warn("THREE.WebGLTextures: sRGB encoded textures have to use RGBAFormat and UnsignedByteType."):console.error("THREE.WebGLTextures: Unsupported texture color space:",de)),R}function pt(H){return typeof HTMLImageElement<"u"&&H instanceof HTMLImageElement?(c.width=H.naturalWidth||H.width,c.height=H.naturalHeight||H.height):typeof VideoFrame<"u"&&H instanceof VideoFrame?(c.width=H.displayWidth,c.height=H.displayHeight):(c.width=H.width,c.height=H.height),c}this.allocateTextureUnit=function ie(){const H=A;return H>=r.maxTextures&&console.warn("THREE.WebGLTextures: Trying to use "+H+" texture units while this GPU supports only "+r.maxTextures),A+=1,H},this.resetTextureUnits=function W(){A=0},this.setTexture2D=oe,this.setTexture2DArray=function ge(H,R){const de=n.get(H);H.version>0&&de.__version!==H.version?nn(de,H,R):e.bindTexture(i.TEXTURE_2D_ARRAY,de.__webglTexture,i.TEXTURE0+R)},this.setTexture3D=function q(H,R){const de=n.get(H);H.version>0&&de.__version!==H.version?nn(de,H,R):e.bindTexture(i.TEXTURE_3D,de.__webglTexture,i.TEXTURE0+R)},this.setTextureCube=function se(H,R){const de=n.get(H);H.version>0&&de.__version!==H.version?function le(H,R,de){if(6!==R.image.length)return;const Te=Rt(H,R),De=R.source;e.bindTexture(i.TEXTURE_CUBE_MAP,H.__webglTexture,i.TEXTURE0+de);const Ae=n.get(De);if(De.version!==Ae.__version||!0===Te){e.activeTexture(i.TEXTURE0+de);const Ut=Jn.getPrimaries(Jn.workingColorSpace),Je=R.colorSpace===yu?null:Jn.getPrimaries(R.colorSpace),ut=R.colorSpace===yu||Ut===Je?i.NONE:i.BROWSER_DEFAULT_WEBGL;i.pixelStorei(i.UNPACK_FLIP_Y_WEBGL,R.flipY),i.pixelStorei(i.UNPACK_PREMULTIPLY_ALPHA_WEBGL,R.premultiplyAlpha),i.pixelStorei(i.UNPACK_ALIGNMENT,R.unpackAlignment),i.pixelStorei(i.UNPACK_COLORSPACE_CONVERSION_WEBGL,ut);const bn=R.isCompressedTexture||R.image[0].isCompressedTexture,ze=R.image[0]&&R.image[0].isDataTexture,dt=[];for(let Ee=0;Ee<6;Ee++)dt[Ee]=bn||ze?ze?R.image[Ee].image:R.image[Ee]:b(R.image[Ee],!0,r.maxCubemapSize),dt[Ee]=nt(R,dt[Ee]);const Wn=dt[0],cn=s.convert(R.format,R.colorSpace),_t=s.convert(R.type),_n=M(R.internalFormat,cn,_t,R.colorSpace),kn=!0!==R.isVideoTexture,qi=void 0===Ae.__version||!0===Te,Z=De.dataReady;let Ce,We=C(R,Wn);if(Ye(i.TEXTURE_CUBE_MAP,R),bn){kn&&qi&&e.texStorage2D(i.TEXTURE_CUBE_MAP,We,_n,Wn.width,Wn.height);for(let Ee=0;Ee<6;Ee++){Ce=dt[Ee].mipmaps;for(let Ke=0;Ke0&&We++;const Ee=pt(dt[0]);e.texStorage2D(i.TEXTURE_CUBE_MAP,We,_n,Ee.width,Ee.height)}for(let Ee=0;Ee<6;Ee++)if(ze){kn?Z&&e.texSubImage2D(i.TEXTURE_CUBE_MAP_POSITIVE_X+Ee,0,0,0,dt[Ee].width,dt[Ee].height,cn,_t,dt[Ee].data):e.texImage2D(i.TEXTURE_CUBE_MAP_POSITIVE_X+Ee,0,_n,dt[Ee].width,dt[Ee].height,0,cn,_t,dt[Ee].data);for(let Ke=0;Ke1;if(Ut||(void 0===Te.__webglTexture&&(Te.__webglTexture=i.createTexture()),Te.__version=R.version,o.memory.textures++),Ae){de.__webglFramebuffer=[];for(let Je=0;Je<6;Je++)if(R.mipmaps&&R.mipmaps.length>0){de.__webglFramebuffer[Je]=[];for(let ut=0;ut0){de.__webglFramebuffer=[];for(let Je=0;Je0&&!1===Me(H)){de.__webglMultisampledFramebuffer=i.createFramebuffer(),de.__webglColorRenderbuffer=[],e.bindFramebuffer(i.FRAMEBUFFER,de.__webglMultisampledFramebuffer);for(let Je=0;Je0)for(let ut=0;ut0)for(let ut=0;ut0)if(!1===Me(H)){const R=H.textures,de=H.width,Te=H.height;let De=i.COLOR_BUFFER_BIT;const Ae=H.stencilBuffer?i.DEPTH_STENCIL_ATTACHMENT:i.DEPTH_ATTACHMENT,Ut=n.get(H),Je=R.length>1;if(Je)for(let ut=0;utm+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(Tue)))}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 ta;n.matrixAutoUpdate=!1,n.visible=!1,t.joints[e.jointName]=n,t.add(n)}return t.joints[e.jointName]}}class kue{constructor(){this.texture=null,this.mesh=null,this.depthNear=0,this.depthFar=0}init(t,e,n){if(null===this.texture){const r=new Ro;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}}getMesh(t){if(null!==this.texture&&null===this.mesh){const e=t.cameras[0].viewport,n=new vl({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:e.z},depthHeight:{value:e.w}}});this.mesh=new Nn(new af(20,20),n)}return this.mesh}reset(){this.texture=null,this.mesh=null}getDepthTexture(){return this.texture}}class Pue extends ng{constructor(t,e){super();const n=this;let r=null,s=1,o=null,a="local-floor",l=1,c=null,d=null,h=null,p=null,m=null,g=null;const b=new kue,v=e.getContextAttributes();let y=null,M=null;const x=[],C=[],F=new xe;let D=null;const k=new br;k.layers.enable(1),k.viewport=new _i;const B=new br;B.layers.enable(2),B.viewport=new _i;const T=[k,B],A=new Due;A.layers.enable(1),A.layers.enable(2);let W=null,ie=null;function ne(le){const Pe=C.indexOf(le.inputSource);if(-1===Pe)return;const Ze=x[Pe];void 0!==Ze&&(Ze.update(le.inputSource,le.frame,c||o),Ze.dispatchEvent({type:le.type,data:le.inputSource}))}function oe(){r.removeEventListener("select",ne),r.removeEventListener("selectstart",ne),r.removeEventListener("selectend",ne),r.removeEventListener("squeeze",ne),r.removeEventListener("squeezestart",ne),r.removeEventListener("squeezeend",ne),r.removeEventListener("end",oe),r.removeEventListener("inputsourceschange",ge);for(let le=0;le=0&&(C[Fe]=null,x[Fe].disconnect(Ze))}for(let Pe=0;Pe=C.length){C.push(Ze),Fe=At;break}if(null===C[At]){C[At]=Ze,Fe=At;break}}if(-1===Fe)break}const wt=x[Fe];wt&&wt.connect(Ze)}}this.cameraAutoUpdate=!0,this.enabled=!1,this.isPresenting=!1,this.getController=function(le){let Pe=x[le];return void 0===Pe&&(Pe=new xP,x[le]=Pe),Pe.getTargetRaySpace()},this.getControllerGrip=function(le){let Pe=x[le];return void 0===Pe&&(Pe=new xP,x[le]=Pe),Pe.getGripSpace()},this.getHand=function(le){let Pe=x[le];return void 0===Pe&&(Pe=new xP,x[le]=Pe),Pe.getHandSpace()},this.setFramebufferScaleFactor=function(le){s=le,!0===n.isPresenting&&console.warn("THREE.WebXRManager: Cannot change framebuffer scale while presenting.")},this.setReferenceSpaceType=function(le){a=le,!0===n.isPresenting&&console.warn("THREE.WebXRManager: Cannot change reference space type while presenting.")},this.getReferenceSpace=function(){return c||o},this.setReferenceSpace=function(le){c=le},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 le=xt(function*(Pe){if(r=Pe,null!==r){if(y=t.getRenderTarget(),r.addEventListener("select",ne),r.addEventListener("selectstart",ne),r.addEventListener("selectend",ne),r.addEventListener("squeeze",ne),r.addEventListener("squeezestart",ne),r.addEventListener("squeezeend",ne),r.addEventListener("end",oe),r.addEventListener("inputsourceschange",ge),!0!==v.xrCompatible&&(yield e.makeXRCompatible()),D=t.getPixelRatio(),t.getSize(F),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 bu(m.framebufferWidth,m.framebufferHeight,{format:Io,type:Zc,colorSpace:t.outputColorSpace,stencilBuffer:v.stencil});else{let Ze=null,Fe=null,wt=null;v.depth&&(wt=v.stencil?e.DEPTH24_STENCIL8:e.DEPTH_COMPONENT24,Ze=v.stencil?Qm:Zm,Fe=v.stencil?Km:vu);const At={colorFormat:e.RGBA8,depthFormat:wt,scaleFactor:s};h=new XRWebGLBinding(r,e),p=h.createProjectionLayer(At),r.updateRenderState({layers:[p]}),t.setPixelRatio(1),t.setSize(p.textureWidth,p.textureHeight,!1),M=new bu(p.textureWidth,p.textureHeight,{format:Io,type:Zc,depthTexture:new r5(p.textureWidth,p.textureHeight,Fe,void 0,void 0,void 0,void 0,void 0,void 0,Ze),stencilBuffer:v.stencil,colorSpace:t.outputColorSpace,samples:v.antialias?4:0,resolveDepthBuffer:!1===p.ignoreDepthValues})}M.isXRRenderTarget=!0,this.setFoveation(l),c=null,o=yield r.requestReferenceSpace(a),nn.setContext(r),nn.start(),n.isPresenting=!0,n.dispatchEvent({type:"sessionstart"})}});return function(Pe){return le.apply(this,arguments)}}(),this.getEnvironmentBlendMode=function(){if(null!==r)return r.environmentBlendMode},this.getDepthTexture=function(){return b.getDepthTexture()};const q=new O,se=new O;function we(le,Pe){null===Pe?le.matrixWorld.copy(le.matrix):le.matrixWorld.multiplyMatrices(Pe.matrixWorld,le.matrix),le.matrixWorldInverse.copy(le.matrixWorld).invert()}this.updateCamera=function(le){if(null===r)return;null!==b.texture&&(le.near=b.depthNear,le.far=b.depthFar),A.near=B.near=k.near=le.near,A.far=B.far=k.far=le.far,(W!==A.near||ie!==A.far)&&(r.updateRenderState({depthNear:A.near,depthFar:A.far}),W=A.near,ie=A.far,k.near=W,k.far=ie,B.near=W,B.far=ie,k.updateProjectionMatrix(),B.updateProjectionMatrix(),le.updateProjectionMatrix());const Pe=le.parent,Ze=A.cameras;we(A,Pe);for(let Fe=0;Fe0&&(v.alphaTest.value=y.alphaTest);const M=t.get(y),x=M.envMap,C=M.envMapRotation;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(Oue.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,v.lightMapIntensity.value=y.lightMapIntensity,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,W4(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 d(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===To&&v.clearcoatNormalScale.value.negate())),y.dispersion>0&&(v.dispersion.value=y.dispersion),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 Lue(i,t,e,n){let r={},s={},o=[];const a=i.getParameter(i.MAX_UNIFORM_BUFFER_BINDINGS);function m(M,x,C,F){const D=M.value,k=x+"_"+C;if(void 0===F[k])return F[k]="number"==typeof D||"boolean"==typeof D?D:D.clone(),!0;{const B=F[k];if("number"==typeof D||"boolean"==typeof D){if(B!==D)return F[k]=D,!0}else if(!1===B.equals(D))return B.copy(D),!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 k=0,B=x.length;k0&&(C+=16-D),M.__size=C,M.__cache={}}(M),C=function d(M){const x=function h(){for(let M=0;M0),Zt=!!ce.morphAttributes.position,li=!!ce.morphAttributes.normal,Li=!!ce.morphAttributes.color;let er=_u;ue.toneMapped&&(null===k||!0===k.isXRRenderTarget)&&(er=x.toneMapping);const ra=ce.morphAttributes.position||ce.morphAttributes.normal||ce.morphAttributes.color,fi=void 0!==ra?ra.length:0,kt=nt.get(ue),fs=v.state.lights;!0!==le||!0!==Pe&&L===T||bn.setState(ue,L,L===T&&ue.id===B);let pi=!1;ue.version===kt.__version?(kt.needsLights&&kt.lightsStateVersion!==fs.state.version||kt.outputColorSpace!==Mt||te.isBatchedMesh&&!1===kt.batching||!te.isBatchedMesh&&!0===kt.batching||te.isBatchedMesh&&!0===kt.batchingColor&&null===te.colorTexture||te.isBatchedMesh&&!1===kt.batchingColor&&null!==te.colorTexture||te.isInstancedMesh&&!1===kt.instancing||!te.isInstancedMesh&&!0===kt.instancing||te.isSkinnedMesh&&!1===kt.skinning||!te.isSkinnedMesh&&!0===kt.skinning||te.isInstancedMesh&&!0===kt.instancingColor&&null===te.instanceColor||te.isInstancedMesh&&!1===kt.instancingColor&&null!==te.instanceColor||te.isInstancedMesh&&!0===kt.instancingMorph&&null===te.morphTexture||te.isInstancedMesh&&!1===kt.instancingMorph&&null!==te.morphTexture||kt.envMap!==Ct||!0===ue.fog&&kt.fog!==je||void 0!==kt.numClippingPlanes&&(kt.numClippingPlanes!==bn.numPlanes||kt.numIntersection!==bn.numIntersection)||kt.vertexAlphas!==Kt||kt.vertexTangents!==an||kt.morphTargets!==Zt||kt.morphNormals!==li||kt.morphColors!==Li||kt.toneMapping!==er||kt.morphTargetsCount!==fi)&&(pi=!0):(pi=!0,kt.__version=ue.version);let bl=kt.currentProgram;!0===pi&&(bl=_E(ue,K,te));let Wg=!1,sa=!1,WO=!1;const wr=bl.getUniforms(),Ou=kt.uniforms;if(Me.useProgram(bl.program)&&(Wg=!0,sa=!0,WO=!0),ue.id!==B&&(B=ue.id,sa=!0),Wg||T!==L){wr.setValue(N,"projectionMatrix",L.projectionMatrix),wr.setValue(N,"viewMatrix",L.matrixWorldInverse);const Ba=wr.map.cameraPosition;void 0!==Ba&&Ba.setValue(N,Fe.setFromMatrixPosition(L.matrixWorld)),tt.logarithmicDepthBuffer&&wr.setValue(N,"logDepthBufFC",2/(Math.log(L.far+1)/Math.LN2)),(ue.isMeshPhongMaterial||ue.isMeshToonMaterial||ue.isMeshLambertMaterial||ue.isMeshBasicMaterial||ue.isMeshStandardMaterial||ue.isShaderMaterial)&&wr.setValue(N,"isOrthographic",!0===L.isOrthographicCamera),T!==L&&(T=L,sa=!0,WO=!0)}if(te.isSkinnedMesh){wr.setOptional(N,te,"bindMatrix"),wr.setOptional(N,te,"bindMatrixInverse");const Ba=te.skeleton;Ba&&(null===Ba.boneTexture&&Ba.computeBoneTexture(),wr.setValue(N,"boneTexture",Ba.boneTexture,pt))}te.isBatchedMesh&&(wr.setOptional(N,te,"batchingTexture"),wr.setValue(N,"batchingTexture",te._matricesTexture,pt),wr.setOptional(N,te,"batchingIdTexture"),wr.setValue(N,"batchingIdTexture",te._indirectTexture,pt),wr.setOptional(N,te,"batchingColorTexture"),null!==te._colorsTexture&&wr.setValue(N,"batchingColorTexture",te._colorsTexture,pt));const jO=ce.morphAttributes;if((void 0!==jO.position||void 0!==jO.normal||void 0!==jO.color)&&Wn.update(te,ce,bl),(sa||kt.receiveShadow!==te.receiveShadow)&&(kt.receiveShadow=te.receiveShadow,wr.setValue(N,"receiveShadow",te.receiveShadow)),ue.isMeshGouraudMaterial&&null!==ue.envMap&&(Ou.envMap.value=Ct,Ou.flipEnvMap.value=Ct.isCubeTexture&&!1===Ct.isRenderTargetTexture?-1:1),ue.isMeshStandardMaterial&&null===ue.envMap&&null!==K.environment&&(Ou.envMapIntensity.value=K.environmentIntensity),sa&&(wr.setValue(N,"toneMappingExposure",x.toneMappingExposure),kt.needsLights&&function Lve(L,K){L.ambientLightColor.needsUpdate=K,L.lightProbe.needsUpdate=K,L.directionalLights.needsUpdate=K,L.directionalLightShadows.needsUpdate=K,L.pointLights.needsUpdate=K,L.pointLightShadows.needsUpdate=K,L.spotLights.needsUpdate=K,L.spotLightShadows.needsUpdate=K,L.rectAreaLights.needsUpdate=K,L.hemisphereLights.needsUpdate=K}(Ou,WO),je&&!0===ue.fog&&Ut.refreshFogUniforms(Ou,je),Ut.refreshMaterialUniforms(Ou,ue,se,q,v.state.transmissionRenderTarget[L.id]),aS.upload(N,h8(kt),Ou,pt)),ue.isShaderMaterial&&!0===ue.uniformsNeedUpdate&&(aS.upload(N,h8(kt),Ou,pt),ue.uniformsNeedUpdate=!1),ue.isSpriteMaterial&&wr.setValue(N,"center",te.center),wr.setValue(N,"modelViewMatrix",te.modelViewMatrix),wr.setValue(N,"normalMatrix",te.normalMatrix),wr.setValue(N,"modelMatrix",te.matrixWorld),ue.isShaderMaterial||ue.isRawShaderMaterial){const Ba=ue.uniformsGroups;for(let YO=0,Bve=Ba.length;YO{function je(){ue.forEach(function(rt){nt.get(rt).currentProgram.isReady()&&ue.delete(rt)}),0!==ue.size?setTimeout(je,10):te(L)}null!==Le.get("KHR_parallel_shader_compile")?je():setTimeout(je,10)})};let hi=null;function sc(){Rf.stop()}function l8(){Rf.start()}const Rf=new X4;function $O(L,K,ce,ue){if(!1===L.visible)return;if(L.layers.test(K.layers))if(L.isGroup)ce=L.renderOrder;else if(L.isLOD)!0===L.autoUpdate&&L.update(K);else if(L.isLight)v.pushLight(L),L.castShadow&&v.pushShadow(L);else if(L.isSprite){if(!L.frustumCulled||nn.intersectsSprite(L)){ue&&wt.setFromMatrixPosition(L.matrixWorld).applyMatrix4(Ze);const rt=De.update(L),Mt=L.material;Mt.visible&&b.push(L,rt,Mt,ce,wt.z,null)}}else if((L.isMesh||L.isLine||L.isPoints)&&(!L.frustumCulled||nn.intersectsObject(L))){const rt=De.update(L),Mt=L.material;if(ue&&(void 0!==L.boundingSphere?(null===L.boundingSphere&&L.computeBoundingSphere(),wt.copy(L.boundingSphere.center)):(null===rt.boundingSphere&&rt.computeBoundingSphere(),wt.copy(rt.boundingSphere.center)),wt.applyMatrix4(L.matrixWorld).applyMatrix4(Ze)),Array.isArray(Mt)){const Ct=rt.groups;for(let Kt=0,an=Ct.length;Kt0&&gE(te,K,ce),je.length>0&&gE(je,K,ce),rt.length>0&&gE(rt,K,ce),Me.buffers.depth.setTest(!0),Me.buffers.depth.setMask(!0),Me.buffers.color.setMask(!0),Me.setPolygonOffset(!1)}function d8(L,K,ce,ue){if(null!==(!0===ce.isScene?ce.overrideMaterial:null))return;void 0===v.state.transmissionRenderTarget[ue.id]&&(v.state.transmissionRenderTarget[ue.id]=new bu(1,1,{generateMipmaps:!0,type:Le.has("EXT_color_buffer_half_float")||Le.has("EXT_color_buffer_float")?Xm:Zc,minFilter:pl,samples:4,stencilBuffer:s,resolveDepthBuffer:!1,resolveStencilBuffer:!1,colorSpace:Jn.workingColorSpace}));const je=v.state.transmissionRenderTarget[ue.id],rt=ue.viewport||A;je.setSize(rt.z,rt.w);const Mt=x.getRenderTarget();x.setRenderTarget(je),x.getClearColor(ne),oe=x.getClearAlpha(),oe<1&&x.setClearColor(16777215,.5),x.clear(),St&&dt.render(ce);const Ct=x.toneMapping;x.toneMapping=_u;const Kt=ue.viewport;if(void 0!==ue.viewport&&(ue.viewport=void 0),v.setupLightsView(ue),!0===le&&bn.setGlobalState(x.clippingPlanes,ue),gE(L,ce,ue),pt.updateMultisampleRenderTarget(je),pt.updateRenderTargetMipmap(je),!1===Le.has("WEBGL_multisampled_render_to_texture")){let an=!1;for(let Zt=0,li=K.length;Zt0)for(let rt=0,Mt=je.length;rt0&&d8(ue,te,L,K),St&&dt.render(L),c8(b,L,K);null!==k&&(pt.updateMultisampleRenderTarget(k),pt.updateRenderTargetMipmap(k)),!0===L.isScene&&L.onAfterRender(x,L,K),kn.resetDefaultState(),B=-1,T=null,M.pop(),M.length>0?(v=M[M.length-1],!0===le&&bn.setGlobalState(x.clippingPlanes,v.state.camera)):v=null,y.pop(),b=y.length>0?y[y.length-1]:null},this.getActiveCubeFace=function(){return F},this.getActiveMipmapLevel=function(){return D},this.getRenderTarget=function(){return k},this.setRenderTargetTextures=function(L,K,ce){nt.get(L.texture).__webglTexture=K,nt.get(L.depthTexture).__webglTexture=ce;const ue=nt.get(L);ue.__hasExternalTextures=!0,ue.__autoAllocateDepthBuffer=void 0===ce,ue.__autoAllocateDepthBuffer||!0===Le.has("WEBGL_multisampled_render_to_texture")&&(console.warn("THREE.WebGLRenderer: Render-to-texture extension was disabled because an external texture was provided"),ue.__useRenderToTexture=!1)},this.setRenderTargetFramebuffer=function(L,K){const ce=nt.get(L);ce.__webglFramebuffer=K,ce.__useDefaultFramebuffer=void 0===K},this.setRenderTarget=function(L,K=0,ce=0){k=L,F=K,D=ce;let ue=!0,te=null,je=!1,rt=!1;if(L){const Ct=nt.get(L);void 0!==Ct.__useDefaultFramebuffer?(Me.bindFramebuffer(N.FRAMEBUFFER,null),ue=!1):void 0===Ct.__webglFramebuffer?pt.setupRenderTarget(L):Ct.__hasExternalTextures&&pt.rebindTextures(L,nt.get(L.texture).__webglTexture,nt.get(L.depthTexture).__webglTexture);const Kt=L.texture;(Kt.isData3DTexture||Kt.isDataArrayTexture||Kt.isCompressedArrayTexture)&&(rt=!0);const an=nt.get(L).__webglFramebuffer;L.isWebGLCubeRenderTarget?(te=Array.isArray(an[K])?an[K][ce]:an[K],je=!0):te=L.samples>0&&!1===pt.useMultisampledRTT(L)?nt.get(L).__webglMultisampledFramebuffer:Array.isArray(an)?an[ce]:an,A.copy(L.viewport),W.copy(L.scissor),ie=L.scissorTest}else A.copy(Be).multiplyScalar(se).floor(),W.copy(Ye).multiplyScalar(se).floor(),ie=Rt;if(Me.bindFramebuffer(N.FRAMEBUFFER,te)&&ue&&Me.drawBuffers(L,te),Me.viewport(A),Me.scissor(W),Me.setScissorTest(ie),je){const Ct=nt.get(L.texture);N.framebufferTexture2D(N.FRAMEBUFFER,N.COLOR_ATTACHMENT0,N.TEXTURE_CUBE_MAP_POSITIVE_X+K,Ct.__webglTexture,ce)}else if(rt){const Ct=nt.get(L.texture);N.framebufferTextureLayer(N.FRAMEBUFFER,N.COLOR_ATTACHMENT0,Ct.__webglTexture,ce||0,K||0)}B=-1},this.readRenderTargetPixels=function(L,K,ce,ue,te,je,rt){if(!L||!L.isWebGLRenderTarget)return void console.error("THREE.WebGLRenderer.readRenderTargetPixels: renderTarget is not THREE.WebGLRenderTarget.");let Mt=nt.get(L).__webglFramebuffer;if(L.isWebGLCubeRenderTarget&&void 0!==rt&&(Mt=Mt[rt]),Mt){Me.bindFramebuffer(N.FRAMEBUFFER,Mt);try{const Ct=L.texture,Kt=Ct.format,an=Ct.type;if(!tt.textureFormatReadable(Kt))return void console.error("THREE.WebGLRenderer.readRenderTargetPixels: renderTarget is not in RGBA or implementation defined format.");if(!tt.textureTypeReadable(an))return void console.error("THREE.WebGLRenderer.readRenderTargetPixels: renderTarget is not in UnsignedByteType or implementation defined type.");K>=0&&K<=L.width-ue&&ce>=0&&ce<=L.height-te&&N.readPixels(K,ce,ue,te,_n.convert(Kt),_n.convert(an),je)}finally{const Ct=null!==k?nt.get(k).__webglFramebuffer:null;Me.bindFramebuffer(N.FRAMEBUFFER,Ct)}}},this.readRenderTargetPixelsAsync=function(){var L=xt(function*(K,ce,ue,te,je,rt,Mt){if(!K||!K.isWebGLRenderTarget)throw new Error("THREE.WebGLRenderer.readRenderTargetPixels: renderTarget is not THREE.WebGLRenderTarget.");let Ct=nt.get(K).__webglFramebuffer;if(K.isWebGLCubeRenderTarget&&void 0!==Mt&&(Ct=Ct[Mt]),Ct){Me.bindFramebuffer(N.FRAMEBUFFER,Ct);try{const Kt=K.texture,an=Kt.format,Zt=Kt.type;if(!tt.textureFormatReadable(an))throw new Error("THREE.WebGLRenderer.readRenderTargetPixelsAsync: renderTarget is not in RGBA or implementation defined format.");if(!tt.textureTypeReadable(Zt))throw new Error("THREE.WebGLRenderer.readRenderTargetPixelsAsync: renderTarget is not in UnsignedByteType or implementation defined type.");if(ce>=0&&ce<=K.width-te&&ue>=0&&ue<=K.height-je){const li=N.createBuffer();N.bindBuffer(N.PIXEL_PACK_BUFFER,li),N.bufferData(N.PIXEL_PACK_BUFFER,rt.byteLength,N.STREAM_READ),N.readPixels(ce,ue,te,je,_n.convert(an),_n.convert(Zt),0),N.flush();const Li=N.fenceSync(N.SYNC_GPU_COMMANDS_COMPLETE,0);yield function lae(i,t,e){return new Promise(function(n,r){setTimeout(function s(){switch(i.clientWaitSync(t,i.SYNC_FLUSH_COMMANDS_BIT,0)){case i.WAIT_FAILED:r();break;case i.TIMEOUT_EXPIRED:setTimeout(s,e);break;default:n()}},e)})}(N,Li,4);try{N.bindBuffer(N.PIXEL_PACK_BUFFER,li),N.getBufferSubData(N.PIXEL_PACK_BUFFER,0,rt)}finally{N.deleteBuffer(li),N.deleteSync(Li)}return rt}}finally{const Kt=null!==k?nt.get(k).__webglFramebuffer:null;Me.bindFramebuffer(N.FRAMEBUFFER,Kt)}}});return function(K,ce,ue,te,je,rt,Mt){return L.apply(this,arguments)}}(),this.copyFramebufferToTexture=function(L,K=null,ce=0){!0!==L.isTexture&&(sg("WebGLRenderer: copyFramebufferToTexture function signature has changed."),K=arguments[0]||null,L=arguments[1]);const ue=Math.pow(2,-ce),te=Math.floor(L.image.width*ue),je=Math.floor(L.image.height*ue),rt=null!==K?K.x:0,Mt=null!==K?K.y:0;pt.setTexture2D(L,0),N.copyTexSubImage2D(N.TEXTURE_2D,ce,0,0,rt,Mt,te,je),Me.unbindTexture()},this.copyTextureToTexture=function(L,K,ce=null,ue=null,te=0){let je,rt,Mt,Ct,Kt,an;!0!==L.isTexture&&(sg("WebGLRenderer: copyTextureToTexture function signature has changed."),ue=arguments[0]||null,L=arguments[1],K=arguments[2],te=arguments[3]||0,ce=null),null!==ce?(je=ce.max.x-ce.min.x,rt=ce.max.y-ce.min.y,Mt=ce.min.x,Ct=ce.min.y):(je=L.image.width,rt=L.image.height,Mt=0,Ct=0),null!==ue?(Kt=ue.x,an=ue.y):(Kt=0,an=0);const Zt=_n.convert(K.format),li=_n.convert(K.type);pt.setTexture2D(K,0),N.pixelStorei(N.UNPACK_FLIP_Y_WEBGL,K.flipY),N.pixelStorei(N.UNPACK_PREMULTIPLY_ALPHA_WEBGL,K.premultiplyAlpha),N.pixelStorei(N.UNPACK_ALIGNMENT,K.unpackAlignment);const Li=N.getParameter(N.UNPACK_ROW_LENGTH),er=N.getParameter(N.UNPACK_IMAGE_HEIGHT),ra=N.getParameter(N.UNPACK_SKIP_PIXELS),fi=N.getParameter(N.UNPACK_SKIP_ROWS),kt=N.getParameter(N.UNPACK_SKIP_IMAGES),fs=L.isCompressedTexture?L.mipmaps[te]:L.image;N.pixelStorei(N.UNPACK_ROW_LENGTH,fs.width),N.pixelStorei(N.UNPACK_IMAGE_HEIGHT,fs.height),N.pixelStorei(N.UNPACK_SKIP_PIXELS,Mt),N.pixelStorei(N.UNPACK_SKIP_ROWS,Ct),L.isDataTexture?N.texSubImage2D(N.TEXTURE_2D,te,Kt,an,je,rt,Zt,li,fs.data):L.isCompressedTexture?N.compressedTexSubImage2D(N.TEXTURE_2D,te,Kt,an,fs.width,fs.height,Zt,fs.data):N.texSubImage2D(N.TEXTURE_2D,te,Kt,an,je,rt,Zt,li,fs),N.pixelStorei(N.UNPACK_ROW_LENGTH,Li),N.pixelStorei(N.UNPACK_IMAGE_HEIGHT,er),N.pixelStorei(N.UNPACK_SKIP_PIXELS,ra),N.pixelStorei(N.UNPACK_SKIP_ROWS,fi),N.pixelStorei(N.UNPACK_SKIP_IMAGES,kt),0===te&&K.generateMipmaps&&N.generateMipmap(N.TEXTURE_2D),Me.unbindTexture()},this.copyTextureToTexture3D=function(L,K,ce=null,ue=null,te=0){let je,rt,Mt,Ct,Kt,an,Zt,li,Li;!0!==L.isTexture&&(sg("WebGLRenderer: copyTextureToTexture3D function signature has changed."),ce=arguments[0]||null,ue=arguments[1]||null,L=arguments[2],K=arguments[3],te=arguments[4]||0);const er=L.isCompressedTexture?L.mipmaps[te]:L.image;null!==ce?(je=ce.max.x-ce.min.x,rt=ce.max.y-ce.min.y,Mt=ce.max.z-ce.min.z,Ct=ce.min.x,Kt=ce.min.y,an=ce.min.z):(je=er.width,rt=er.height,Mt=er.depth,Ct=0,Kt=0,an=0),null!==ue?(Zt=ue.x,li=ue.y,Li=ue.z):(Zt=0,li=0,Li=0);const ra=_n.convert(K.format),fi=_n.convert(K.type);let kt;if(K.isData3DTexture)pt.setTexture3D(K,0),kt=N.TEXTURE_3D;else{if(!K.isDataArrayTexture&&!K.isCompressedArrayTexture)return void console.warn("THREE.WebGLRenderer.copyTextureToTexture3D: only supports THREE.DataTexture3D and THREE.DataTexture2DArray.");pt.setTexture2DArray(K,0),kt=N.TEXTURE_2D_ARRAY}N.pixelStorei(N.UNPACK_FLIP_Y_WEBGL,K.flipY),N.pixelStorei(N.UNPACK_PREMULTIPLY_ALPHA_WEBGL,K.premultiplyAlpha),N.pixelStorei(N.UNPACK_ALIGNMENT,K.unpackAlignment);const fs=N.getParameter(N.UNPACK_ROW_LENGTH),pi=N.getParameter(N.UNPACK_IMAGE_HEIGHT),bl=N.getParameter(N.UNPACK_SKIP_PIXELS),Wg=N.getParameter(N.UNPACK_SKIP_ROWS),sa=N.getParameter(N.UNPACK_SKIP_IMAGES);N.pixelStorei(N.UNPACK_ROW_LENGTH,er.width),N.pixelStorei(N.UNPACK_IMAGE_HEIGHT,er.height),N.pixelStorei(N.UNPACK_SKIP_PIXELS,Ct),N.pixelStorei(N.UNPACK_SKIP_ROWS,Kt),N.pixelStorei(N.UNPACK_SKIP_IMAGES,an),L.isDataTexture||L.isData3DTexture?N.texSubImage3D(kt,te,Zt,li,Li,je,rt,Mt,ra,fi,er.data):K.isCompressedArrayTexture?N.compressedTexSubImage3D(kt,te,Zt,li,Li,je,rt,Mt,ra,er.data):N.texSubImage3D(kt,te,Zt,li,Li,je,rt,Mt,ra,fi,er),N.pixelStorei(N.UNPACK_ROW_LENGTH,fs),N.pixelStorei(N.UNPACK_IMAGE_HEIGHT,pi),N.pixelStorei(N.UNPACK_SKIP_PIXELS,bl),N.pixelStorei(N.UNPACK_SKIP_ROWS,Wg),N.pixelStorei(N.UNPACK_SKIP_IMAGES,sa),0===te&&K.generateMipmaps&&N.generateMipmap(kt),Me.unbindTexture()},this.initRenderTarget=function(L){void 0===nt.get(L).__webglFramebuffer&&pt.setupRenderTarget(L)},this.initTexture=function(L){L.isCubeTexture?pt.setTextureCube(L,0):L.isData3DTexture?pt.setTexture3D(L,0):L.isDataArrayTexture||L.isCompressedArrayTexture?pt.setTexture2DArray(L,0):pt.setTexture2D(L,0),Me.unbindTexture()},this.resetState=function(){F=0,D=0,k=null,Me.reset(),kn.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===Gk?"display-p3":"srgb",e.unpackColorSpace=Jn.workingColorSpace===kC?"display-p3":"srgb"}}class Ib extends Fr{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 CP{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=Qo()}onUploadCallback(){}set needsUpdate(t){!0===t&&this.version++}get updateRange(){return sg("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;r0){const r=e[n[0]];if(void 0!==r){this.morphTargetInfluences=[],this.morphTargetDictionary={};for(let s=0,o=r.length;sn)return;kP.applyMatrix4(i.matrixWorld);const l=t.ray.origin.distanceTo(kP);return lt.far?void 0:{distance:l,point:W5.clone().applyMatrix4(i.matrixWorld),index:r,face:null,faceIndex:null,object:i}}const j5=new O,Y5=new O;class Pg extends pf{constructor(t,e){super(t,e),this.isLineSegments=!0,this.type="LineSegments"}computeLineDistances(){const t=this.geometry;if(null===t.index){const e=t.attributes.position,n=[];for(let r=0,s=e.count;r0){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 tc{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 d=n[r];return(r+(o-d)/(n[r+1]-d))/(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 xe:new O);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 O,r=[],s=[],o=[],a=new O,l=new Bt;for(let m=0;m<=t;m++)r[m]=this.getTangentAt(m/t,new O);s[0]=new O,o[0]=new O;let c=Number.MAX_VALUE;const d=Math.abs(r[0].x),h=Math.abs(r[0].y),p=Math.abs(r[0].z);d<=c&&(c=d,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(Qi(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(Qi(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 OP extends tc{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 xe){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(Z5(a,l.x,c.x,d.x,h.x),Z5(a,l.y,c.y,d.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]:(CS.subVectors(r[0],r[1]).add(r[0]),c=CS);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 d=c.getPoint(1);return this.currentPoint.copy(d),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 AS extends hn{constructor(t=[new xe(0,-.5),new xe(.5,0),new xe(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=Qi(r,0,2*Math.PI);const s=[],o=[],a=[],l=[],c=[],d=1/e,h=new O,p=new xe,m=new O,g=new O,b=new O;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*d*r,C=Math.sin(x),F=Math.cos(x);for(let D=0;D<=t.length-1;D++)h.x=t[D].x*C,h.y=t[D].y,h.z=t[D].x*F,o.push(h.x,h.y,h.z),p.x=M/e,p.y=D/(t.length-1),a.push(p.x,p.y),c.push(l[3*D+0]*C,l[3*D+1],l[3*D+0]*F)}for(let M=0;M0&&x(!0),e>0&&x(!1)),this.setIndex(d),this.setAttribute("position",new ct(h,3)),this.setAttribute("normal",new ct(p,3)),this.setAttribute("uv",new ct(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 TS 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 TS(t.radius,t.height,t.radialSegments,t.heightSegments,t.openEnded,t.thetaStart,t.thetaLength)}}class $b 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 d=[],h=new O,p=new O,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 F=0;F<=e;F++){const D=F/e;h.x=-t*Math.cos(r+D*s)*Math.sin(o+x*a),h.y=t*Math.cos(o+x*a),h.z=t*Math.sin(r+D*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(D+C,1-x),M.push(c++)}d.push(M)}for(let y=0;y0)&&m.push(d[y][M+1],C,D),(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 dispersion(){return this._dispersion}set dispersion(t){this._dispersion>0!=t>0&&this.version++,this._dispersion=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.dispersion=t.dispersion,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 NS extends ko{constructor(t){super(),this.isMeshPhongMaterial=!0,this.type="MeshPhongMaterial",this.color=new qe(16777215),this.specular=new qe(1118481),this.shininess=30,this.map=null,this.lightMap=null,this.lightMapIntensity=1,this.aoMap=null,this.aoMapIntensity=1,this.emissive=new qe(0),this.emissiveIntensity=1,this.emissiveMap=null,this.bumpMap=null,this.bumpScale=1,this.normalMap=null,this.normalMapType=Zh,this.normalScale=new xe(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=wC,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 vf(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 hG(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 QP(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 JP(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 jb{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 uG(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=vb;class Ng extends nc{constructor(t,e,n){super(t,e,n)}}Ng.prototype.ValueTypeName="bool",Ng.prototype.ValueBufferType=Array,Ng.prototype.DefaultInterpolation=_b,Ng.prototype.InterpolantFactoryMethodLinear=void 0,Ng.prototype.InterpolantFactoryMethodSmooth=void 0;class pG extends nc{}pG.prototype.ValueTypeName="color";class Bg extends nc{}Bg.prototype.ValueTypeName="number";class Ghe extends jb{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 d=c+a;c!==d;c+=4)uo.slerpFlat(s,0,o,c-a,o,c,l);return s}}class Ug extends nc{InterpolantFactoryMethodLinear(t){return new Ghe(this.times,this.values,this.getValueSize(),t)}}Ug.prototype.ValueTypeName="quaternion",Ug.prototype.InterpolantFactoryMethodSmooth=void 0;class Vg extends nc{constructor(t,e,n){super(t,e,n)}}Vg.prototype.ValueTypeName="string",Vg.prototype.ValueBufferType=Array,Vg.prototype.DefaultInterpolation=_b,Vg.prototype.InterpolantFactoryMethodLinear=void 0,Vg.prototype.InterpolantFactoryMethodSmooth=void 0;class zg extends nc{}zg.prototype.ValueTypeName="vector";class Yb{constructor(t="",e=-1,n=[],r=2500){this.name=t,this.tracks=n,this.duration=e,this.blendMode=r,this.uuid=Qo(),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(Whe(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=d[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=[];JP(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:gG,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 jhe extends Error{constructor(t,e){super(t),this.response=e}}class Pa extends yf{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=Du.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 d=ld[t],h=c.body.getReader(),p=c.headers.get("X-File-Size")||c.headers.get("Content-Length"),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 F=new ProgressEvent("progress",{lengthComputable:g,loaded:b,total:m});for(let D=0,k=d.length;D{y.error(x)})}()}});return new Response(v)}throw new jhe(`fetch for "${c.url}" responded with ${c.status}: ${c.statusText}`,c)}).then(c=>{switch(l){case"arraybuffer":return c.arrayBuffer();case"blob":return c.blob();case"document":return c.text().then(d=>(new DOMParser).parseFromString(d,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=>{Du.add(t,c);const d=ld[t];delete ld[t];for(let h=0,p=d.length;h{const d=ld[t];if(void 0===d)throw this.manager.itemError(t),c;delete ld[t];for(let h=0,p=d.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 BS extends yf{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=Du.get(t);if(void 0!==o)return s.manager.itemStart(t),setTimeout(function(){e&&e(o),s.manager.itemEnd(t)},0),o;const a=bb("img");function l(){d(),Du.add(t,this),e&&e(this),s.manager.itemEnd(t)}function c(h){d(),r&&r(h),s.manager.itemError(t),s.manager.itemEnd(t)}function d(){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 Hg extends yf{constructor(t){super(t)}load(t,e,n,r){const s=new Ro,o=new BS(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 US extends Fr{constructor(t,e=1){super(),this.isLight=!0,this.type="Light",this.color=new qe(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()),void 0!==this.target&&(e.object.target=this.target.uuid),e}}const eO=new Bt,_G=new O,vG=new O;class tO{constructor(t){this.camera=t,this.intensity=1,this.bias=0,this.normalBias=0,this.radius=1,this.blurSamples=8,this.mapSize=new xe(512,512),this.map=null,this.mapPass=null,this.matrix=new Bt,this.autoUpdate=!0,this.needsUpdate=!1,this._frustum=new iS,this._frameExtents=new xe(1,1),this._viewportCount=1,this._viewports=[new _i(0,0,1,1)]}getViewportCount(){return this._viewportCount}getFrustum(){return this._frustum}updateMatrices(t){const e=this.camera,n=this.matrix;_G.setFromMatrixPosition(t.matrixWorld),e.position.copy(_G),vG.setFromMatrixPosition(t.target.matrixWorld),e.lookAt(vG),e.updateMatrixWorld(),eO.multiplyMatrices(e.projectionMatrix,e.matrixWorldInverse),this._frustum.setFromProjectionMatrix(eO),n.set(.5,0,0,.5,0,.5,0,.5,0,0,.5,.5,0,0,0,1),n.multiply(eO)}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.intensity=t.intensity,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 1!==this.intensity&&(t.intensity=this.intensity),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 qhe extends tO{constructor(){super(new br(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 yG extends US{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(Fr.DEFAULT_UP),this.updateMatrix(),this.target=new Fr,this.distance=n,this.angle=r,this.penumbra=s,this.decay=o,this.map=null,this.shadow=new qhe}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 bG=new Bt,qb=new O,nO=new O;class Xhe extends tO{constructor(){super(new br(90,1,.5,500)),this.isPointLightShadow=!0,this._frameExtents=new xe(4,2),this._viewportCount=6,this._viewports=[new _i(2,1,1,1),new _i(0,1,1,1),new _i(3,1,1,1),new _i(1,1,1,1),new _i(3,0,1,1),new _i(1,0,1,1)],this._cubeDirections=[new O(1,0,0),new O(-1,0,0),new O(0,0,1),new O(0,0,-1),new O(0,1,0),new O(0,-1,0)],this._cubeUps=[new O(0,1,0),new O(0,1,0),new O(0,1,0),new O(0,1,0),new O(0,0,1),new O(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()),qb.setFromMatrixPosition(t.matrixWorld),n.position.copy(qb),nO.copy(n.position),nO.add(this._cubeDirections[e]),n.up.copy(this._cubeUps[e]),n.lookAt(nO),n.updateMatrixWorld(),r.makeTranslation(-qb.x,-qb.y,-qb.z),bG.multiplyMatrices(n.projectionMatrix,n.matrixWorldInverse),this._frustum.setFromProjectionMatrix(bG)}}class xG extends US{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 Xhe}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 Khe extends tO{constructor(){super(new Db(-5,5,5,-5,.5,500)),this.isDirectionalLightShadow=!0}}class wG extends US{constructor(t,e){super(t,e),this.isDirectionalLight=!0,this.type="DirectionalLight",this.position.copy(Fr.DEFAULT_UP),this.updateMatrix(),this.target=new Fr,this.shadow=new Khe}dispose(){this.shadow.dispose()}copy(t){return super.copy(t),this.target=t.target.clone(),this.shadow=t.shadow.clone(),this}}class iO extends US{constructor(t,e){super(t,e),this.isAmbientLight=!0,this.type="AmbientLight"}}class Tu{static decodeText(t){if(console.warn("THREE.LoaderUtils: decodeText() has been deprecated with r165 and will be removed with r175. Use TextDecoder instead."),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=Du.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 Du.add(t,c),e&&e(c),s.manager.itemEnd(t),c}).catch(function(c){r&&r(c),Du.remove(t),s.manager.itemError(t),s.manager.itemEnd(t)});Du.add(t,l),s.manager.itemStart(t)}}class DG{constructor(t=!0){this.autoStart=t,this.startTime=0,this.oldTime=0,this.elapsedTime=0,this.running=!1}start(){this.startTime=TG(),this.oldTime=this.startTime,this.elapsedTime=0,this.running=!0}stop(){this.getElapsedTime(),this.running=!1,this.autoStart=!1}getElapsedTime(){return this.getDelta(),this.elapsedTime}getDelta(){let t=0;if(this.autoStart&&!this.running)return this.start(),0;if(this.running){const e=TG();t=(e-this.oldTime)/1e3,this.oldTime=e,this.elapsedTime+=t}return t}}function TG(){return(typeof performance>"u"?Date:performance).now()}const sO="\\[\\]\\.:\\/",afe=new RegExp("["+sO+"]","g"),oO="[^"+sO+"]",lfe="[^"+sO.replace("\\.","")+"]",ffe=new RegExp("^"+/((?:WC+[\/:])*)/.source.replace("WC",oO)+/(WCOD+)?/.source.replace("WCOD",lfe)+/(?:\.(WC+)(?:\[(.+)\])?)?/.source.replace("WC",oO)+/\.(WC+)(?:\[(.+)\])?/.source.replace("WC",oO)+"$"),pfe=["material","materials","bones","map"];class mfe{constructor(t,e,n){const r=n||Ri.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 Ri=(()=>{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(afe,"")}static parseTrackName(e){const n=ffe.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!==pfe.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;an.name===t||n.userData.name===t);return e?(e.removeFromParent(),new ic(e)):null}getBoundings(){return(new Ns).setFromObject(this.nativeMesh)}clone(){return new ic(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 Nn&&this.disposeMesh(t)}),this.nativeMesh instanceof Nn&&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 bfe extends ic{get supportsFov(){return this.nativeCamera instanceof br||"PerspectiveCamera"==this.nativeCamera.type}get fov(){return this.nativeCamera.fov||NaN}set fov(t){this.supportsFov&&(this.nativeCamera.fov=t,this.nativeCamera.updateProjectionMatrix())}constructor(t){super(t),this.nativeCamera=t}}class xfe extends zse{createMaterial(t){let e={};t.color?e={color:t.color}:t.diffuse||(e={color:super.randomColor()});let n=t.shading||"unlit";switch(n){case"unlit":return new vr(Object.assign(Object.assign({},e),{map:t.diffuse||null}));case"standart":return new Wb(Object.assign(Object.assign({},e),{map:t.diffuse||null}));case"phong":return new NS(Object.assign(Object.assign({},e),{map:t.diffuse||null}));case"wireframe":return new vr(Object.assign(Object.assign({},e),{wireframe:!0}));default:throw new Error(`"${n}" shading not implemented for three.js`)}}transformPrimitiveZUp(t){t.geometry.rotateX(Math.PI/2)}createPrimitive(t,e={}){var n,r,s,o;let a=null,l=this.createMaterial(e);switch(t.shape){case"PLANE":a=new Nn(new af((null===(n=t.dimensions)||void 0===n?void 0:n.x)||1e4,(null===(r=t.dimensions)||void 0===r?void 0:r.y)||1e4,null===(s=t.segments)||void 0===s?void 0:s.x,null===(o=t.segments)||void 0===o?void 0:o.y),l);break;case"BOX":a=new Nn(new nf(...Ne.spr(t.dimensions),...t.segments?Ne.spr(t.segments):[]),l);break;case"CAPSULE":a=new Nn(new DS(t.radius,t.centersDistance,t.capSegments,t.radialSegments),l),this.transformPrimitiveZUp(a);break;case"CYLINDER":a=new Nn(new Og(t.radius,t.radius,t.height,t.radialSegments,t.heightSegments),l),this.transformPrimitiveZUp(a);break;case"CONE":a=new Nn(new TS(t.radius,t.height,t.radialSegments,t.heightSegments),l),this.transformPrimitiveZUp(a);break;case"SPHERE":a=new Nn(new $b(t.radius,t.widthSegments,t.heightSegments),l),this.transformPrimitiveZUp(a);break;case"COMPOUND":a=new ta;for(const{position:d,rotation:h,shape:p}of t.children){const m=this.createPrimitive(p,e).nativeMesh;d&&m.position.set(...Ne.spr(d)),h&&m.quaternion.set(...gr.spr(h)),a.add(m)}break;case"MESH":const c=new hn;c.setFromPoints(t.vertices.map(d=>new O(...Ne.spr(d)))),c.setIndex(t.faces.reduce((d,h)=>(d.push(...h),d),[])),a=new Nn(c,l)}if(!a)throw new Error(`Primitive with shape "${t.shape}" not implemented`);return void 0!==e.castShadow&&(a.castShadow=e.castShadow),void 0!==e.receiveShadow&&(a.receiveShadow=e.receiveShadow),new ic(a)}createPerspectiveCamera(t={}){return new bfe(new br(t.fov||75,t.aspectRatio||1,t.frustrum?t.frustrum.near:1,t.frustrum?t.frustrum.far:1e4))}}function jG(i,t){if(t===koe)return console.warn("THREE.BufferGeometryUtils.toTrianglesDrawMode(): Geometry already defined as triangles."),i;if(t===Hk||t===v4){let e=i.getIndex();if(null===e){const o=[],a=i.getAttribute("position");if(void 0===a)return console.error("THREE.BufferGeometryUtils.toTrianglesDrawMode(): Undefined position attribute. Processing not possible."),i;for(let l=0;l=2.0 are supported.")));const c=new tpe(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 d=0;d=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 Mfe(){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 Bn={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_DISPERSION:"KHR_materials_dispersion",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 Cfe{constructor(t){this.parser=t,this.name=Bn.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 Bfe{constructor(t){this.parser=t,this.name=Bn.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 Ufe{constructor(t){this.parser=t,this.name=Bn.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 Vfe{constructor(t){this.name=Bn.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 d=r.count,h=r.byteStride,p=new Uint8Array(a,r.byteOffset||0,r.byteLength||0);return o.decodeGltfBufferAsync?o.decodeGltfBufferAsync(d,h,p,r.mode,r.filter).then(function(m){return m.buffer}):o.ready.then(function(){const m=new ArrayBuffer(d*h);return o.decodeGltfBuffer(new Uint8Array(m),d,h,p,r.mode,r.filter),m})})}return null}}class zfe{constructor(t){this.name=Bn.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!==Oa.TRIANGLES&&c.mode!==Oa.TRIANGLE_STRIP&&c.mode!==Oa.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(d=>(l[c]=d,l[c])));return a.length<1?null:(a.push(this.parser.createNodeMesh(t)),Promise.all(a).then(c=>{const d=c.pop(),h=d.isGroup?d.children:[d],p=c[0].count,m=[];for(const g of h){const b=new Bt,v=new O,y=new uo,M=new O(1,1,1),x=new z5(g.geometry,g.material,p);for(let C=0;C-1,o=s?a.match(/Firefox\/([0-9]+)\./)[1]:-1}this.textureLoader=typeof createImageBitmap>"u"||n&&r<17||s&&o<98?new Hg(this.options.manager):new ife(this.options.manager),this.textureLoader.setCrossOrigin(this.options.crossOrigin),this.textureLoader.setRequestHeader(this.options.requestHeader),this.fileLoader=new Pa(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 Sf(s,a,r),cd(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,d]of o.children.entries())s(d,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(T,D[k*l+1]),l>=3&&v.setZ(T,D[k*l+2]),l>=4&&v.setW(T,D[k*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(d){d.flipY=!1,d.name=o.name||a.name||"",""===d.name&&"string"==typeof a.uri&&!1===a.uri.startsWith("data:image/")&&(d.name=a.uri);const p=(s.samplers||{})[o.sampler]||{};return d.magFilter=KG[p.magFilter]||ar,d.minFilter=KG[p.minFilter]||pl,d.wrapS=ZG[p.wrapS]||Jl,d.wrapT=ZG[p.wrapT]||Jl,r.associations.set(d,{textures:t}),d}).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 d=Promise.resolve(l).then(function(h){return new Promise(function(p,m){let g=p;!0===e.isImageBitmapLoader&&(g=function(b){const v=new Ro(b);v.needsUpdate=!0,p(v)}),e.load(Tu.resolveURL(h,s.path),g,void 0,m)})}).then(function(h){return!0===c&&a.revokeObjectURL(l),cd(h,o),h.userData.mimeType=o.mimeType||function Jfe(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]=d,d}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[Bn.KHR_TEXTURE_TRANSFORM]){const a=void 0!==n.extensions?n.extensions[Bn.KHR_TEXTURE_TRANSFORM]:void 0;if(a){const l=s.associations.get(o);o=s.extensions[Bn.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 mf,ko.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 us,ko.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 Wb}loadMaterial(t){const e=this,r=this.extensions,s=this.json.materials[t];let o;const a={},c=[];if((s.extensions||{})[Bn.KHR_MATERIALS_UNLIT]){const h=r[Bn.KHR_MATERIALS_UNLIT];o=h.getMaterialType(),c.push(h.extendParams(a,s,e))}else{const h=s.pbrMetallicRoughness||{};if(a.color=new qe(1,1,1),a.opacity=1,Array.isArray(h.baseColorFactor)){const p=h.baseColorFactor;a.color.setRGB(p[0],p[1],p[2],ds),a.opacity=p[3]}void 0!==h.baseColorTexture&&c.push(e.assignTexture(a,"map",h.baseColorTexture,cs)),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=Ko);const d=s.alphaMode||"OPAQUE";if("BLEND"===d?(a.transparent=!0,a.depthWrite=!1):(a.transparent=!1,"MASK"===d&&(a.alphaTest=void 0!==s.alphaCutoff?s.alphaCutoff:.5)),void 0!==s.normalTexture&&o!==vr&&(c.push(e.assignTexture(a,"normalMap",s.normalTexture)),a.normalScale=new xe(1,1),void 0!==s.normalTexture.scale)){const h=s.normalTexture.scale;a.normalScale.set(h,h)}if(void 0!==s.occlusionTexture&&o!==vr&&(c.push(e.assignTexture(a,"aoMap",s.occlusionTexture)),void 0!==s.occlusionTexture.strength&&(a.aoMapIntensity=s.occlusionTexture.strength)),void 0!==s.emissiveFactor&&o!==vr){const h=s.emissiveFactor;a.emissive=(new qe).setRGB(h[0],h[1],h[2],ds)}return void 0!==s.emissiveTexture&&o!==vr&&c.push(e.assignTexture(a,"emissiveMap",s.emissiveTexture,cs)),Promise.all(c).then(function(){const h=new o(a);return s.name&&(h.name=s.name),cd(h,s),e.associations.set(h,{materials:t}),s.extensions&&Sf(r,h,s),h})}createUniqueName(t){const e=Ri.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[Bn.KHR_DRACO_MESH_COMPRESSION].decodePrimitive(a,e).then(function(l){return QG(l,a,e)})}const o=[];for(let a=0,l=t.length;a0&&Zfe(y,s),y.name=e.createUniqueName(s.name||"mesh_"+t),cd(y,s),v.extensions&&Sf(r,y,v),e.assignFinalMaterial(y),h.push(y)}for(let m=0,g=h.length;m1?new ta:1===c.length?c[0]:new Fr,d!==c[0])for(let h=0,p=c.length;h{const h=new Map;for(const[p,m]of r.associations)(p instanceof ko||p instanceof Ro)&&h.set(p,m);return d.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(Ru[s.path]===Ru.weights?t.traverse(function(p){p.morphTargetInfluences&&l.push(p.name?p.name:p.uuid)}):l.push(a),Ru[s.path]){case Ru.weights:c=Bg;break;case Ru.rotation:c=Ug;break;case Ru.position:case Ru.scale:c=zg;break;default:c=1===n.itemSize?Bg:zg}const d=void 0!==r.interpolation?qfe[r.interpolation]:vb,h=this._getArrayFromAccessor(n);for(let p=0,m=l.length;p{r.type.endsWith("Light")&&(console.warn("WORKAROUND: light intensity from GLB divided by 200."),r.intensity*=.005)}),new ic(n.scene)})}}const po=(i,t)=>Array(i).fill(null).map((e,n)=>t(n));class Ef{static startDebugView(t,e){let n=this.activeDebugViews.get(t);return n?n.renderers.includes(e)||n.renderers.push(e):(n={view:new Ef(t),renderers:[e]},this.activeDebugViews.set(t,n)),n.view}static stopDebugView(t,e){const n=t.world,r=this.activeDebugViews.get(n);r&&(r.renderers=r.renderers.filter(s=>s!==e),0===r.renderers.length&&(r.view.dispose(),this.activeDebugViews.delete(n)))}constructor(t){this.world=t,this.debugScene=null,this.aSub=null,this.rSub=null,this.syncMap=new Map,this.debugScene=new Ib;const e=n=>{var r,s;const o=n.debugBodySettings;let c,l=this.lineSegmentPointsForShape(o.shape);c=l?new Pg((new hn).setFromPoints(l)):null===(r=this.world)||void 0===r?void 0:r.visualScene.factory.createPrimitive(o.shape,{shading:"wireframe",color:0}).nativeMesh,this.syncMap.set(n,c),null===(s=this.debugScene)||void 0===s||s.add(c)};for(const n of this.world.physicsWorld.children)e(n);this.aSub=this.world.physicsWorld.added$.subscribe(n=>e(n)),this.rSub=this.world.physicsWorld.removed$.subscribe(n=>{var r;const s=this.syncMap.get(n);s&&(this.syncMap.delete(n),null===(r=this.debugScene)||void 0===r||r.remove(s))})}get scene(){return this.debugScene}render(t,e){for(const[r,s]of this.syncMap.entries()){const o=r.debugBodySettings;if(o.ignoreTransform||(s.position.set(...Ne.spr(r.position)),s.quaternion.set(...gr.spr(r.rotation))),s.material){let a=16777215;switch(o.type){case"RIGID_DYNAMIC":a=o.sleeping?255:16711680;break;case"RIGID_STATIC":a=65280;break;case"TRIGGER":a=16776960}s.material.color.set(a),s.material.needsUpdate=!0}}const n=t.autoClearColor;n&&(t.autoClearColor=!1),t.render(this.debugScene,e),n&&(t.autoClearColor=!0)}lineSegmentPointsForShape(t){if("BOX"===t.shape){const e=Ne.scalarMult(t.dimensions,.5);return[...po(8,n=>new O(n<4?e.x:-e.x,n%4<2?e.y:-e.y,n%2?e.z:-e.z)),...po(8,n=>new O(n%2?e.x:-e.x,n<4?e.y:-e.y,n%4<2?e.z:-e.z)),...po(8,n=>new O(n%4<2?e.x:-e.x,n%2?e.y:-e.y,n<4?e.z:-e.z))]}if("CYLINDER"===t.shape)return[...po(32,e=>new O(t.radius*Math.sin(Math.floor((e+1)/2)*Math.PI/8),t.radius*Math.cos(Math.floor((e+1)/2)*Math.PI/8),-t.height/2)),...po(32,e=>new O(t.radius*Math.sin(Math.floor((e+1)/2)*Math.PI/8),t.radius*Math.cos(Math.floor((e+1)/2)*Math.PI/8),t.height/2)),...po(8,e=>new O(Math.floor(e/2)%2?0:e<4?t.radius:-t.radius,Math.floor(e/2)%2?e<4?t.radius:-t.radius:0,e%2?t.height/2:-t.height/2)),new O(0,0,-t.height/2),new O(0,0,t.height/2)];if("CONE"===t.shape)return[...po(32,e=>new O(t.radius*Math.sin(Math.floor((e+1)/2)*Math.PI/8),t.radius*Math.cos(Math.floor((e+1)/2)*Math.PI/8),-t.height/2)),...po(8,e=>new O(e%2||Math.floor(e/2)%2?0:e<4?t.radius:-t.radius,e%2?0:Math.floor(e/2)%2?e<4?t.radius:-t.radius:0,e%2?t.height/2:-t.height/2)),new O(0,0,-t.height/2),new O(0,0,t.height/2)];if("SPHERE"===t.shape)return[...po(32,e=>new O(t.radius*Math.sin(Math.floor((e+1)/2)*Math.PI/8),t.radius*Math.cos(Math.floor((e+1)/2)*Math.PI/8),0)),...po(32,e=>new O(t.radius*Math.sin(Math.floor((e+1)/2)*Math.PI/8),0,t.radius*Math.cos(Math.floor((e+1)/2)*Math.PI/8))),...po(32,e=>new O(0,t.radius*Math.sin(Math.floor((e+1)/2)*Math.PI/8),t.radius*Math.cos(Math.floor((e+1)/2)*Math.PI/8)))];if("CAPSULE"===t.shape)return[...this.lineSegmentPointsForShape({shape:"CYLINDER",radius:t.radius,height:t.centersDistance}),...po(16,e=>new O(t.radius*Math.cos(Math.floor((e+1)/2)*Math.PI/8),0,t.radius*Math.sin(Math.floor((e+1)/2)*Math.PI/8)+t.centersDistance/2)),...po(16,e=>new O(t.radius*Math.cos(Math.floor((e+1)/2)*Math.PI/8),0,-t.radius*Math.sin(Math.floor((e+1)/2)*Math.PI/8)-t.centersDistance/2)),...po(16,e=>new O(0,t.radius*Math.cos(Math.floor((e+1)/2)*Math.PI/8),t.radius*Math.sin(Math.floor((e+1)/2)*Math.PI/8)+t.centersDistance/2)),...po(16,e=>new O(0,t.radius*Math.cos(Math.floor((e+1)/2)*Math.PI/8),-t.radius*Math.sin(Math.floor((e+1)/2)*Math.PI/8)-t.centersDistance/2))];if("CONVEX_HULL"===t.shape)return[...t.vertices.map(n=>[new O(n.x-.05,n.y,n.z),new O(n.x+.05,n.y,n.z),new O(n.x,n.y-.05,n.z),new O(n.x,n.y+.05,n.z),new O(n.x,n.y,n.z-.05),new O(n.x,n.y,n.z+.05)]).reduce((n,r)=>(n.push(...r),n),[])];if("COMPOUND"===t.shape){const e=[];for(const{position:n,shape:r,rotation:s}of t.children){let o=this.lineSegmentPointsForShape(r);if(!o)return null;e.push(...o.map(a=>new O(...Ne.spr(Ne.add(n||Ne.O,Ne.rot(a,s||gr.O))))))}return e}return null}dispose(){var t,e;this.debugScene=null,null===(t=this.aSub)||void 0===t||t.unsubscribe(),null===(e=this.rSub)||void 0===e||e.unsubscribe(),this.syncMap=new Map}}Ef.activeDebugViews=new Map;class JG extends Rse{get physicsDebugViewActive(){return this._physicsDebugViewActive}set physicsDebugViewActive(t){this._physicsDebugViewActive!=t&&(this._physicsDebugViewActive=t,this.world&&(t?this.debugView=Ef.startDebugView(this.world,this):(Ef.stopDebugView(this.debugView,this),this.debugView=null)))}constructor(t,e,n,r={}){super(t,n,r),this.scene=t,this.camera=e,this.canvas=n,this.world=null,this.debugView=null,this._physicsDebugViewActive=!1,this.nativeRenderer=new Nue(Object.assign({canvas:n,alpha:this.rendererOptions.transparent},this.rendererOptions)),this.nativeRenderer.shadowMap.enabled=!0,this.nativeRenderer.setClearColor(this.rendererOptions.background),this.nativeRenderer.shadowMap.type=i4,this.nativeRenderer.setPixelRatio(this.rendererOptions.forceResolution||devicePixelRatio)}addToWorld(t){this.world=t,this.physicsDebugViewActive&&(this.debugView=Ef.startDebugView(this.world,this))}removeFromWorld(t){this.physicsDebugViewActive&&(Ef.stopDebugView(this.debugView,this),this.debugView=null),this.world=null}resizeRenderer(t){this.nativeRenderer.setSize(t.x,t.y),(this.camera.nativeCamera instanceof br||"PerspectiveCamera"==this.camera.nativeCamera.type)&&Math.abs(this.camera.nativeCamera.aspect-t.x/t.y)>.01&&(this.camera.nativeCamera.aspect=t.x/t.y,this.camera.nativeCamera.updateProjectionMatrix())}render(){this.nativeRenderer.render(this.scene.nativeScene,this.camera.nativeCamera),this.physicsDebugViewActive&&this.debugView.render(this.nativeRenderer,this.camera.nativeCamera)}dispose(){this.camera.dispose(),this.nativeRenderer.clear(),this.nativeRenderer.dispose(),this.nativeRenderer.domElement=null}}const spe={name:"CopyShader",uniforms:{tDiffuse:{value:null},opacity:{value:1}},vertexShader:"\n\n\t\tvarying vec2 vUv;\n\n\t\tvoid main() {\n\n\t\t\tvUv = uv;\n\t\t\tgl_Position = projectionMatrix * modelViewMatrix * vec4( position, 1.0 );\n\n\t\t}",fragmentShader:"\n\n\t\tuniform float opacity;\n\n\t\tuniform sampler2D tDiffuse;\n\n\t\tvarying vec2 vUv;\n\n\t\tvoid main() {\n\n\t\t\tvec4 texel = texture2D( tDiffuse, vUv );\n\t\t\tgl_FragColor = opacity * texel;\n\n\n\t\t}"};class YS{constructor(){this.isPass=!0,this.enabled=!0,this.needsSwap=!0,this.clear=!1,this.renderToScreen=!1}setSize(){}render(){console.error("THREE.Pass: .render() must be implemented in derived pass.")}dispose(){}}const ope=new Db(-1,1,1,-1,0,1),lpe=new class ape extends hn{constructor(){super(),this.setAttribute("position",new ct([-1,3,0,-1,-1,0,3,-1,0],3)),this.setAttribute("uv",new ct([0,2,0,0,2,0],2))}};class cpe{constructor(t){this._mesh=new Nn(lpe,t)}dispose(){this._mesh.geometry.dispose()}render(t){t.render(this._mesh,ope)}get material(){return this._mesh.material}set material(t){this._mesh.material=t}}class dpe extends YS{constructor(t,e){super(),this.textureID=void 0!==e?e:"tDiffuse",t instanceof vl?(this.uniforms=t.uniforms,this.material=t):t&&(this.uniforms=j4.clone(t.uniforms),this.material=new vl({name:void 0!==t.name?t.name:"unspecified",defines:Object.assign({},t.defines),uniforms:this.uniforms,vertexShader:t.vertexShader,fragmentShader:t.fragmentShader})),this.fsQuad=new cpe(this.material)}render(t,e,n){this.uniforms[this.textureID]&&(this.uniforms[this.textureID].value=n.texture),this.fsQuad.material=this.material,this.renderToScreen?(t.setRenderTarget(null),this.fsQuad.render(t)):(t.setRenderTarget(e),this.clear&&t.clear(t.autoClearColor,t.autoClearDepth,t.autoClearStencil),this.fsQuad.render(t))}dispose(){this.material.dispose(),this.fsQuad.dispose()}}class e$ extends YS{constructor(t,e){super(),this.scene=t,this.camera=e,this.clear=!0,this.needsSwap=!1,this.inverse=!1}render(t,e,n){const r=t.getContext(),s=t.state;let o,a;s.buffers.color.setMask(!1),s.buffers.depth.setMask(!1),s.buffers.color.setLocked(!0),s.buffers.depth.setLocked(!0),this.inverse?(o=0,a=1):(o=1,a=0),s.buffers.stencil.setTest(!0),s.buffers.stencil.setOp(r.REPLACE,r.REPLACE,r.REPLACE),s.buffers.stencil.setFunc(r.ALWAYS,o,4294967295),s.buffers.stencil.setClear(a),s.buffers.stencil.setLocked(!0),t.setRenderTarget(n),this.clear&&t.clear(),t.render(this.scene,this.camera),t.setRenderTarget(e),this.clear&&t.clear(),t.render(this.scene,this.camera),s.buffers.color.setLocked(!1),s.buffers.depth.setLocked(!1),s.buffers.color.setMask(!0),s.buffers.depth.setMask(!0),s.buffers.stencil.setLocked(!1),s.buffers.stencil.setFunc(r.EQUAL,1,4294967295),s.buffers.stencil.setOp(r.KEEP,r.KEEP,r.KEEP),s.buffers.stencil.setLocked(!0)}}class upe extends YS{constructor(){super(),this.needsSwap=!1}render(t){t.state.buffers.stencil.setLocked(!1),t.state.buffers.stencil.setTest(!1)}}class hpe{constructor(t,e){if(this.renderer=t,this._pixelRatio=t.getPixelRatio(),void 0===e){const n=t.getSize(new xe);this._width=n.width,this._height=n.height,(e=new bu(this._width*this._pixelRatio,this._height*this._pixelRatio,{type:Xm})).texture.name="EffectComposer.rt1"}else this._width=e.width,this._height=e.height;this.renderTarget1=e,this.renderTarget2=e.clone(),this.renderTarget2.texture.name="EffectComposer.rt2",this.writeBuffer=this.renderTarget1,this.readBuffer=this.renderTarget2,this.renderToScreen=!0,this.passes=[],this.copyPass=new dpe(spe),this.copyPass.material.blending=Xc,this.clock=new DG}swapBuffers(){const t=this.readBuffer;this.readBuffer=this.writeBuffer,this.writeBuffer=t}addPass(t){this.passes.push(t),t.setSize(this._width*this._pixelRatio,this._height*this._pixelRatio)}insertPass(t,e){this.passes.splice(e,0,t),t.setSize(this._width*this._pixelRatio,this._height*this._pixelRatio)}removePass(t){const e=this.passes.indexOf(t);-1!==e&&this.passes.splice(e,1)}isLastEnabledPass(t){for(let e=t+1;e0?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;i$.fromArray(r,t),gO.fromArray(r,e),r$.fromArray(r,n),Fa.subVectors(r$,gO),s$.subVectors(i$,gO),Fa.cross(s$),Fa.normalize(),s.push(Fa.x,Fa.y,Fa.z),s.push(Fa.x,Fa.y,Fa.z),s.push(Fa.x,Fa.y,Fa.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 d=this.vertices.length;let h=this.parseVertexIndex(t,d),p=this.parseVertexIndex(e,d),m=this.parseVertexIndex(n,d);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?(qS.setRGB(parseFloat(h[4]),parseFloat(h[5]),parseFloat(h[6])).convertSRGBToLinear(),e.colors.push(qS.r,qS.g,qS.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"===d){const p=c.slice(1).trim().split(n$),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 ta;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 ct(d.normals,3)),d.colors.length>0&&(g=!0,b.setAttribute("color",new ct(d.colors,3))),!0===d.hasUVIndices&&b.setAttribute("uv",new ct(d.uvs,2));const v=[];for(let M=0,x=h.length;M1){for(let M=0,x=h.length;M0){const a=new mf({size:1,sizeAttenuation:!1}),l=new hn;l.setAttribute("position",new ct(e.vertices,3)),e.colors.length>0&&void 0!==e.colors[0]&&(l.setAttribute("color",new ct(e.colors,3)),a.vertexColors=!0);const c=new Bb(l,a);s.add(c)}return s}}class o$ extends yf{constructor(t){super(t)}load(t,e,n,r){const s=this,o=""===this.path?Tu.extractUrlBase(t):this.path,a=new Pa(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,d):c;h=h.toLowerCase();let p=d>=0?c.substring(d+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 xpe(this.resourcePath||e,this.materialOptions);return a.setCrossOrigin(this.crossOrigin),a.setManager(this.manager),a.setMaterials(o),a}}class xpe{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:Ql,this.wrap=void 0!==this.options.wrap?this.options.wrap:Jl}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),d=e.loadTexture(function s(a,l){return"string"!=typeof l||""===l?"":/^https?:\/\//i.test(l)?l:a+l}(e.baseUrl,c.url));d.repeat.copy(c.scale),d.offset.copy(c.offset),d.wrapS=e.wrap,d.wrapT=e.wrap,("map"===a||"emissiveMap"===a)&&(d.colorSpace=cs),r[a]=d}for(const a in n){const l=n[a];let c;if(""!==l)switch(a.toLowerCase()){case"kd":r.color=(new qe).fromArray(l).convertSRGBToLinear();break;case"ks":r.specular=(new qe).fromArray(l).convertSRGBToLinear();break;case"ke":r.emissive=(new qe).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 NS(r),this.materials[t]}getTextureParams(t,e){const n={scale:new xe(1,1),offset:new xe(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:gG;let a=o.getHandler(t);null===a&&(a=new Hg(o)),a.setCrossOrigin&&a.setCrossOrigin(this.crossOrigin);const l=a.load(t,n,r,s);return void 0!==e&&(l.mapping=e),l}}const wpe=["determinateSpinner"];function Mpe(i,t){if(1&i&&(ki(),$(0,"svg",11),Oe(1,"circle",12),j()),2&i){const e=re();Dt("viewBox",e._viewBox()),V(1),$o("stroke-dasharray",e._strokeCircumference(),"px")("stroke-dashoffset",e._strokeCircumference()/2,"px")("stroke-width",e._circleStrokeWidth(),"%"),Dt("r",e._circleRadius())}}const Cpe=Ky(class{constructor(i){this._elementRef=i}},"primary"),Spe=new me("mat-progress-spinner-default-options",{providedIn:"root",factory:function Epe(){return{diameter:a$}}}),a$=100;let XS=(()=>{class i extends Cpe{constructor(e,n,r){super(e),this.mode="mat-spinner"===this._elementRef.nativeElement.nodeName.toLowerCase()?"indeterminate":"determinate",this._value=0,this._diameter=a$,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,ks(e)))}get diameter(){return this._diameter}set diameter(e){this._diameter=ks(e)}get strokeWidth(){return this._strokeWidth??this.diameter/10}set strokeWidth(e){this._strokeWidth=ks(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)(E(mt),E(kr,8),E(Spe))},i.\u0275cmp=st({type:i,selectors:[["mat-progress-spinner"],["mat-spinner"]],viewQuery:function(e,n){if(1&e&&Zn(wpe,5),2&e){let r;Tt(r=It())&&(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&&(Dt("aria-valuemin",0)("aria-valuemax",100)("aria-valuenow","determinate"===n.mode?n.value:null)("mode",n.mode),$o("width",n.diameter,"px")("height",n.diameter,"px"),ln("_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:[lt],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&&(fe(0,Mpe,2,8,"ng-template",null,0,kc),$(2,"div",1,2),ki(),$(4,"svg",3),Oe(5,"circle",4),j()(),pa(),$(6,"div",5)(7,"div",6)(8,"div",7),ny(9,8),j(),$(10,"div",9),ny(11,8),j(),$(12,"div",10),ny(13,8),j()()()),2&e){const r=ir(1);V(4),Dt("viewBox",n._viewBox()),V(1),$o("stroke-dasharray",n._strokeCircumference(),"px")("stroke-dashoffset",n._strokeDashOffset(),"px")("stroke-width",n._circleStrokeWidth(),"%"),Dt("r",n._circleRadius()),V(4),U("ngTemplateOutlet",r),V(2),U("ngTemplateOutlet",r),V(2),U("ngTemplateOutlet",r)}},dependencies:[vy],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})(),Dpe=(()=>{class i{}return i.\u0275fac=function(e){return new(e||i)},i.\u0275mod=en({type:i}),i.\u0275inj=Wt({imports:[ao,Qn]}),i})();const Tpe=["previewCanvasContainer"],Ipe=["previewCanvas"];function Rpe(i,t){if(1&i){const e=Kn();$r(0),$(1,"label",11),Ve(2),j(),$(3,"input",12),ke("change",function(r){Ht(e);const s=re().$implicit;return s.value=r.currentTarget.checked,Et(s.change(s.value))}),j(),Wr()}if(2&i){const e=re(),n=e.index,r=e.$implicit,s=re().index;V(1),U("for","custom_control_"+s+"_"+n),V(1),ui(r.label),V(1),U("id","custom_control_"+s+"_"+n)("type",r.type)("checked",r.value)}}function kpe(i,t){if(1&i){const e=Kn();$(0,"div",9)(1,"label",11),Ve(2),j(),$(3,"input",14),ke("change",function(){const s=Ht(e).$implicit,o=re(2).$implicit;return o.value=s,Et(o.change(o.value))}),j()()}if(2&i){const e=t.$implicit,n=re(2),r=n.index,s=n.$implicit,o=re().index;V(1),U("for","custom_control_"+o+"_"+r+"_"+e),V(1),ui(e),V(1),U("id","custom_control_"+o+"_"+r+"_"+e)("checked",s.value===e)}}function Ppe(i,t){if(1&i&&($(0,"div",13)(1,"label"),Ve(2),j(),fe(3,kpe,4,4,"div",8),j()),2&i){const e=re().$implicit;V(2),ui(e.label),V(1),U("ngForOf",e.options)}}function Ope(i,t){if(1&i){const e=Kn();$r(0),$(1,"label",11),Ve(2),j(),$(3,"input",15),ke("colorChange",function(r){Ht(e);const s=re().$implicit,o=re(2);return s.value=o.toRGB(r.value),Et(s.change(s.value))}),j(),Oe(4,"ngx-mat-color-toggle",16)(5,"ngx-mat-color-picker",null,17),Wr()}if(2&i){const e=ir(6),n=re(),r=n.index,s=n.$implicit,o=re().index;V(1),U("for","custom_control_"+o+"_"+r),V(1),ui(s.label),V(1),U("ngxMatColorPicker",e),V(1),U("for",e)}}function Fpe(i,t){if(1&i){const e=Kn();$r(0),$(1,"label",11),Ve(2),j(),$(3,"input",18),ke("change",function(r){Ht(e);const s=re().$implicit;return s.value=r.currentTarget.value,Et(s.change(s.value))}),j(),Wr()}if(2&i){const e=re(),n=e.index,r=e.$implicit,s=re().index;V(1),U("for","custom_control_"+s+"_"+n),V(1),ui(r.label),V(1),U("id","custom_control_"+s+"_"+n)("min",r.minValue)("max",r.maxValue)("step",r.valueStep)("value",r.value)}}function Lpe(i,t){if(1&i&&($(0,"div",9),fe(1,Rpe,4,5,"ng-container",6),fe(2,Ppe,4,2,"div",10),fe(3,Ope,7,4,"ng-container",6),fe(4,Fpe,4,7,"ng-container",6),j()),2&i){const e=t.$implicit;V(1),U("ngIf","checkbox"===e.type),V(1),U("ngIf","radio"===e.type),V(1),U("ngIf","color"===e.type),V(1),U("ngIf","slider"===e.type)}}function Npe(i,t){if(1&i&&($r(0),$(1,"h4"),Ve(2),j(),fe(3,Lpe,5,4,"div",8),Wr()),2&i){const e=t.$implicit;V(2),ui(e.title),V(1),U("ngForOf",e.controls)}}function Bpe(i,t){if(1&i){const e=Kn();$(0,"div",9)(1,"label",11),Ve(2),j(),$(3,"input",19),ke("change",function(r){return Et(Ht(e).$implicit.visible=r.currentTarget.checked)}),j()()}if(2&i){const e=t.$implicit;V(1),U("for","visibility_"+e.name),V(1),ui(e.name),V(1),U("id","visibility_"+e.name)("checked",e.visible)}}function Upe(i,t){if(1&i&&($r(0),$(1,"h4"),Ve(2,"Objects visibility"),j(),fe(3,Bpe,4,4,"div",8),Wr()),2&i){const e=re();V(3),U("ngForOf",e.meshes)}}function Vpe(i,t){1&i&&Oe(0,"mat-spinner",20)}const dd=i=>{i.colorSpace="srgb",i.anisotropy=8,i.magFilter=_r,i.minFilter=_r};let l$=(()=>{class i{constructor(e){this.cdr=e,this.visibilityControls=!0,this.groupFunction=null,this.customControls=[],this.onObjectLoaded=new $e,this._paths$=new at(null),this.destroyed$=new Ie,this.entity=null,this.meshes=[]}get paths(){return this._paths$.getValue()}set paths(e){this._paths$.next(e)}ngAfterViewInit(){var e=this;return xt(function*(){var s;e.world=new e4(new t$,{init:(s=xt(function*(){}),function(){return s.apply(this,arguments)}),simulate:()=>{}}),yield e.world.init(),e.world.visualScene.nativeScene.add(new iO(16777215,2));let n=new at({x:1,y:1});e.renderer=e.world.addRenderer(e.world.visualScene.factory.createPerspectiveCamera({frustrum:{near:.01,far:1e4}}),e.previewCanvas.nativeElement,{size:n.asObservable(),background:11184810}),e.controller=new Use(e.renderer,{mouseOptions:{canvas:e.previewCanvas.nativeElement},orbiting:{sensitivityX:2,sensitivityY:2},orbitingElasticity:30}),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(He(e.destroyed$)).subscribe(function(){var s=xt(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 _O,h=yield(new o$).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 ta;y.add(...b[v]),y.name=v,p.remove(...b[v]),p.add(y)}}e.meshes=p.children,e.meshes.sort((b,v)=>b.name>v.name?1:-1),p.traverse(b=>{if(b instanceof Nn){const v=b.material instanceof Array?b.material:[b.material];for(const y of v)y.transparent=!0,y.alphaTest=.5,y instanceof vr&&y.map&&(y.map.wrapS=Zi,y.map.wrapT=Zi,dd(y.map),y.map.needsUpdate=!0)}}),e.onObjectLoaded.next(p),e.entity=new mu({object3D:new ic(p)}),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=Ne.scalarMult(Ne.add(m.min,m.max),.5),e.controller.spherical={phi:1.22,theta:-1.32,radius:Ne.dist(m.min,m.max)},e.cdr.markForCheck()}});return function(o){return s.apply(this,arguments)}}())})()}toRGB(e){return(e?.r||0)<<16|(e?.g||0)<<8|(e?.b||0)}ngOnDestroy(){this.destroyed$.next(),this.destroyed$.complete()}}return i.\u0275fac=function(e){return new(e||i)(E(si))},i.\u0275cmp=st({type:i,selectors:[["app-obj-viewer"]],viewQuery:function(e,n){if(1&e&&(Zn(Tpe,5),Zn(Ipe,5)),2&e){let r;Tt(r=It())&&(n.previewCanvasContainer=r.first),Tt(r=It())&&(n.previewCanvas=r.first)}},inputs:{paths:"paths",visibilityControls:"visibilityControls",groupFunction:"groupFunction",customControls:"customControls"},outputs:{onObjectLoaded:"onObjectLoaded"},decls:8,vars:3,consts:[[1,"previewCanvasContainer"],["previewCanvasContainer",""],["width","640","height","480"],["previewCanvas",""],["id","controls"],[4,"ngFor","ngForOf"],[4,"ngIf"],["mode","indeterminate",4,"ngIf"],["class","controls-list",4,"ngFor","ngForOf"],[1,"controls-list"],["style","width: 100%",4,"ngIf"],[3,"for"],[3,"id","type","checked","change"],[2,"width","100%"],["type","radio",3,"id","checked","change"],["matInput","",1,"hidden",3,"ngxMatColorPicker","colorChange"],["matSuffix","",3,"for"],["picker",""],["type","range",3,"id","min","max","step","value","change"],["type","checkbox",3,"id","checked","change"],["mode","indeterminate"]],template:function(e,n){1&e&&($(0,"div",0,1),Oe(2,"canvas",2,3),$(4,"div",4),fe(5,Npe,4,2,"ng-container",5),fe(6,Upe,4,1,"ng-container",6),j(),fe(7,Vpe,1,0,"mat-spinner",7),j()),2&e&&(V(5),U("ngForOf",n.customControls),V(1),U("ngIf",n.visibilityControls),V(1),U("ngIf",!n.entity))},dependencies:[oo,vi,$te,Yc,XS,zie,gC,PH],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%] > h4[_ngcontent-%COMP%]{margin:0}.previewCanvasContainer[_ngcontent-%COMP%] #controls[_ngcontent-%COMP%] .controls-list[_ngcontent-%COMP%]{width:100%;display:flex;-webkit-user-select:none;user-select:none;align-items:center}.previewCanvasContainer[_ngcontent-%COMP%] #controls[_ngcontent-%COMP%] .controls-list[_ngcontent-%COMP%] > span[_ngcontent-%COMP%]{flex-grow:1}.previewCanvasContainer[_ngcontent-%COMP%] #controls[_ngcontent-%COMP%] .controls-list[_ngcontent-%COMP%] > label[_ngcontent-%COMP%]{flex-grow:1}"],changeDetection:0}),i})();function zpe(i,t){if(1&i){const e=Kn();ki(),$(0,"circle",5),ke("mousedown",function(r){return Ht(e),Et(re().startDrag(r))}),gt(1,"async"),gt(2,"async"),j()}if(2&i){const e=re();let n,r;Dt("cx",(null==(n=yt(1,3,e.mapPointer$))?null:n.x)||0)("cy",(null==(r=yt(2,5,e.mapPointer$))?null:r.y)||0)("r",10)}}const Hpe=function(){return{"stroke-width":3}};let Gpe=(()=>{class i{constructor(e){this.ref=e,this._roadSpline$=new at([]),this._pointer$=new at(null),this._projection$=new at("nz"),this._roadSplineProjected$=new at([]),this._pointerProjected$=new at(yi.O),this.splineClosed=!1,this.pointerChange=new $e,this.svgSize$=new at({x:100,y:100}),this.scalingSquare$=new at({x:0,y:0,width:100,height:100}),this.mapPolyline$=new at(""),this.mapPointer$=new at(null),this.isShiftPressed=!1,this.destroyed$=new Ie,this.isDragging=!1}set roadSpline(e){this._roadSpline$.next(e)}set pointer(e){this._pointer$.next(e)}set projection(e){this._projection$.next(e)}get trackLength$(){return this._roadSpline$.pipe(et(e=>{let n=0;for(let r=1;r{"Shift"===n.key&&(this.isShiftPressed=!0)}),Ao(window,"keyup").pipe(He(this.destroyed$)).subscribe(n=>{"Shift"===n.key&&(this.isShiftPressed=!1)}),Aa([this._roadSpline$,this._projection$]).pipe(He(this.destroyed$)).subscribe(([n,r])=>{this._roadSplineProjected$.next(n.map(s=>this.project(s)))}),Aa([this._pointer$,this._projection$]).pipe(He(this.destroyed$)).subscribe(([n,r])=>{this._pointerProjected$.next(this.project(n||Ne.O))}),this._roadSplineProjected$.pipe(He(this.destroyed$),et(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.y)},s={x:Math.max(s.x,a.x),y:Math.max(s.y,a.y)}});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$),Aa([this._roadSplineProjected$,this.scalingSquare$,this.svgSize$]).pipe(He(this.destroyed$),et(([n,r,s])=>{const o=n.map(a=>({x:(a.x-r.x)*s.x/r.width,y:(r.y-a.y)*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$),Aa([this._pointerProjected$,this.scalingSquare$.asObservable(),this.svgSize$]).pipe(He(this.destroyed$),et(([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()}startDrag(e){this.isDragging=!0,this.updatePointer(e)}drag(e){this.isDragging&&this.updatePointer(e)}endDrag(){this.isDragging=!1}getClosestProjectedLineIndex(e){const n=this._roadSplineProjected$.getValue();let r=0,s=Number.MAX_SAFE_INTEGER;for(let d=1;d{return(i=Af||(Af={})).ThreeModel="model",i.Bitmap="bitmap",i.TwoSidedBitmap="two_sided_bitmap",Af;var i})();class Zpe extends Ose{constructor(t,e,n){super(t,{loadDepth:40,inertia:2}),this.mapGraph=t,this.famPath=e,this.hideUnknownEntities$=n,this.textureLoader=new Hg,this.terrainMaterials={},this.objLoader=new _O,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(zc(),He(this._onRemoved$)).subscribe(e=>{for(const n of this.unknownEntities)n.visible=!e})}getPlaceholderTexture(){var t=this;return xt(function*(){return t._placeholder?t._placeholder:(t._placeholderPromise||(t._placeholderPromise=t.textureLoader.loadAsync("assets/placeholder_texture.png")),t._placeholderPromise)})()}getPlaceholderTerrainTexture(){var t=this;return xt(function*(){return t._placeholderTerrain?t._placeholderTerrain:(t._placeholderTerrainPromise||(t._placeholderTerrainPromise=t.textureLoader.loadAsync("assets/placeholder_texture.png").then(e=>(e.wrapS=Jl,e.wrapT=Zi,dd(e),e.flipY=!0,e))),t._placeholderTerrainPromise)})()}loadChunk(t){var e=this;return xt(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 Nn&&(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:Ne.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(Ne.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 mu({object3D:new ic(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 vr({side:Ko,transparent:!0,visible:!1}),this.famPath?this.textureLoader.loadAsync(`${this.famPath}/background/${t}.png`).then(e=>{e.wrapS=Jl,e.wrapT=Zi,dd(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 xt(function*(){let n=!1;if(t.type==Af.ThreeModel){let r;try{if(!e.famPath)throw new Error;const o=new o$,a=new _O,l=yield o.loadAsync(`${e.famPath}/props/${t.data.data.resource_id}/0/material.mtl`);l.preload(),a.setMaterials(l),r=new ic(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 Nn){const a=o.material instanceof Array?o.material:[o.material];for(const l of a)l.transparent=!0,l.alphaTest=.5,l instanceof vr&&l.map&&(l.map.wrapS=Zi,l.map.wrapT=Zi,dd(l.map),l.map.needsUpdate=!0)}});const s=new mu({object3D: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==Af.Bitmap||t.type==Af.TwoSidedBitmap){const r=(c,d)=>new Array(d).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 ta,[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==Af.TwoSidedBitmap){const[c,d]=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 mu({object3D:new ic(s)});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 xt(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=>(dd(h),new vr({map:h,alphaTest:.5,transparent:!0,side:Ko}))),d=new Nn(new af(e.x,e.y),c[0]);if(d.rotateX(Math.PI/2),d.position.set(0,0,e.y/2),c.length>1){let h=-1;qR(r.world).pipe(function Wse(i,t=zy,e){const n=II(i,t);return function $se(i,t){return ti((e,n)=>{const{leading:r=!0,trailing:s=!1}=t??{};let o=!1,a=null,l=null,c=!1;const d=()=>{l?.unsubscribe(),l=null,s&&(m(),c&&n.complete())},h=()=>{l=null,c&&n.complete()},p=g=>l=Mr(i(g)).subscribe(jn(n,d,h)),m=()=>{if(o){o=!1;const g=a;a=null,n.next(g),!c&&p(g)}};e.subscribe(jn(n,g=>{o=!0,a=g,(!l||l.closed)&&(r?m():p(g))},()=>{c=!0,(!(s&&o&&l)||l.closed)&&n.complete()}))})}(()=>n,e)}(n&&!isNaN(+n)?1e3*+n:250)).subscribe(()=>{h=(h+1)%c.length,d.material=c[h]})}return[d,a]})()}}let Qpe=(()=>{class i{constructor(e,n,r){this.eelDelegate=e,this.cdr=n,this.mainService=r,this._resource$=new at(null),this.changed=new $e,this.previewLoading$=new at(!0),this.previewFamLocation$=new at(null),this.previewFamLoading$=new at(!1),this.pointer$=new at(null),this.selectedSplineIndex$=new at(0),this.selectedSplineItem$=new at(null),this.selectedAiInfoItem$=new at(null),this.selectedTerrainItem$=new at(null),this.famPath=null,this.name="",this.renderer=null,this.map=null,this.isOpenedTrack=!0,this.roadPath=null,this.destroyed$=new Ie}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=>({x:e.position.x,y:e.position.z,z:e.position.y}))||[]}ngAfterViewInit(){var e=this;return xt(function*(){var s;e.world=new e4(new t$,{init:(s=xt(function*(){}),function(){return s.apply(this,arguments)}),simulate:()=>{},loader:{loadFromGgGlb:function(){var s=xt(function*(...o){return[]});return function(){return s.apply(this,arguments)}}()}}),yield e.world.init(),e.skySphere=new mu({object3D:e.world.visualScene.factory.createPrimitive({shape:"SPHERE",radius:1e3},{color:16777215})}),e.skySphere.object3D.nativeMesh.material.side=Ko,e.world.addEntity(e.skySphere),e.selectionSphere=new mu({object3D: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 iO(16777215,2));let n=new at({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,Ne.add(e.renderer.camera.position,Ne.Y),Ne.Z),qR(e.world).pipe(He(e.destroyed$)).subscribe(()=>{e.renderer&&(e.skySphere.position=e.renderer.camera.position,e.pointer$.next(e.renderer.camera.position))}),e.controller=new Nse(e.world.keyboardInput,e.renderer,{mouseOptions:{canvas:e.previewCanvas.nativeElement,pointerLock:!0},keymap:"wasd+arrows",cameraLinearSpeed:40,cameraBoostMultiplier:4,cameraMovementElasticity:100,cameraRotationElasticity:30,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(He(e.destroyed$)).subscribe(function(){var s=xt(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(He(e.destroyed$),vn(([s,o])=>!!e.resource&&s.startsWith(e.resource.id)),Vc(3e3)).subscribe(xt(function*(){e.previewLoading$.next(!0),yield e.postTmpUpdates(e.resource?.id),yield e.loadPreview(),e.previewLoading$.next(!1)})),e.selectedSplineIndex$.pipe(He(e.destroyed$),Vc(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=Ne.add(a,Ne.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.controller.reset())}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 xt(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 Hg,o=r.find(a=>a.endsWith("spherical.png"));if(o){const a=yield s.loadAsync(o);a.colorSpace="srgb",a.mapping=Kc,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 xt(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})()}onPointerChange(e){this.renderer&&(this.renderer.position=e)}loadPreview(){var e=this;return xt(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=hb.fromMapArray(e.roadPath.map((r,s)=>({path:`${e.terrainChunksObjLocation}terrain_chunk_${s}`,position:r,loadOptions:{}}))||[],!e.isOpenedTrack);e.unloadPreview(),e.map=new Zpe(n,e.famPath&&"resources/"+e.famPath,e.mainService.hideHiddenFields$),e.map.resource=e.resource,e.map.isOpenedTrack=e.isOpenedTrack,qR(e.world).pipe(He(e.destroyed$)).subscribe(()=>{e.map&&e.renderer&&e.map.loaderCursor$.next(e.renderer.position)}),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 xt(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)(E($c),E(si),E(ul))},i.\u0275cmp=st({type:i,selectors:[["app-tri-map-block-ui"]],viewQuery:function(e,n){if(1&e&&(Zn($pe,5),Zn(Wpe,5)),2&e){let r;Tt(r=It())&&(n.previewCanvasContainer=r.first),Tt(r=It())&&(n.previewCanvas=r.first)}},inputs:{resource:"resource"},outputs:{changed:"changed"},decls:49,vars:44,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","projection","pointerChange"],[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&&($(0,"div",0)(1,"h4"),Ve(2,"Preview *.FAM file"),j(),$(3,"mat-form-field",1)(4,"mat-label"),Ve(5,"Current preview FAM"),j(),$(6,"mat-select",2,3),ke("valueChange",function(s){return n.onFamSelected(s)}),gt(8,"async"),gt(9,"async"),fe(10,jpe,2,2,"mat-option",4),$(11,"mat-option",5),Ve(12,"custom"),j()()(),fe(13,Ype,9,3,"ng-container",6),fe(14,qpe,1,1,"mat-spinner",7),gt(15,"async"),j(),$(16,"div",8)(17,"div",9,10),Oe(19,"canvas",11,12),fe(21,Xpe,1,0,"mat-spinner",13),gt(22,"async"),j(),$(23,"div",14,10)(25,"mat-form-field",1)(26,"mat-label"),Ve(27,"Spline item"),j(),$(28,"input",15),ke("ngModelChange",function(s){return n.selectedSplineIndex$.next(s)}),gt(29,"async"),gt(30,"async"),j()(),$(31,"app-minimap",16),ke("pointerChange",function(s){return n.onPointerChange(s)}),gt(32,"async"),j()()(),$(33,"h4"),Ve(34,"Road spline item"),j(),Oe(35,"app-compound-block-ui",17),gt(36,"async"),$(37,"h4"),Ve(38,"AI info (block for 4 spline items)"),j(),Oe(39,"app-compound-block-ui",17),gt(40,"async"),$(41,"h4"),Ve(42,"Terrain (block for 4 spline items)"),j(),Oe(43,"app-compound-block-ui",17),gt(44,"async"),$(45,"h4"),Ve(46,"Common"),j(),Oe(47,"app-compound-block-ui",18),gt(48,"async")),2&e){const r=ir(7);let s;V(6),U("value",n.previewFamPossibleLocations.includes(yt(8,21,n.previewFamLocation$))?yt(9,23,n.previewFamLocation$):"custom"),V(4),U("ngForOf",n.previewFamPossibleLocations),V(3),U("ngIf","custom"==r.value),V(1),U("ngIf",yt(15,25,n.previewFamLoading$)),V(7),U("ngIf",yt(22,27,n.previewLoading$)),V(7),U("min",0)("max",4*(null==(s=yt(29,29,n._resource$))?null:s.data.num_chunks)-1)("ngModel",yt(30,31,n.selectedSplineIndex$)),V(3),U("roadSpline",n.roadSpline)("pointer",yt(32,33,n.pointer$))("splineClosed",!n.isOpenedTrack)("projection","nz"),V(4),U("resource",yt(36,35,n.selectedSplineItem$))("hideBlockActions",!0),V(4),U("resource",yt(40,37,n.selectedAiInfoItem$))("hideBlockActions",!0),V(4),U("resource",yt(44,39,n.selectedTerrainItem$))("hideBlockActions",!0),V(4),U("resource",yt(48,41,n._resource$))("hideBlockActions",!0)("fieldWhitelist",ro(43,Kpe))}},dependencies:[oo,vi,Wl,Uh,jc,Gh,Hh,fu,ql,qo,Yc,$M,db,Fm,XS,Wc,Gpe,Ea],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-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})();const c$=i=>new Promise(t=>setTimeout(t,i)),d$=(i,t,e=null)=>{const n=document.createElement("canvas"),r=n.getContext("2d",{willReadFrequently:!0}),s=i.width,o=i.height;n.width=s,n.height=o,r.drawImage(i,0,0,s,o);const a=r.getImageData(0,0,s,o);for(let l=0;l{if(!(o instanceof Nn))return;let a=-1;if(o.name.startsWith("lbl__rt_frnt")?a=0:o.name.startsWith("lbl__lt_frnt")?a=1:o.name.startsWith("lbl__rt_rear")?a=2:o.name.startsWith("lbl__lt_rear")&&(a=3),a>-1){this.wheels[a]=o,a<2&&(this.frontWheels[a]=o),o.geometry.boundingBox||o.geometry.computeBoundingBox();const l=Ne.avg(o.geometry.boundingBox.min,o.geometry.boundingBox.max);o.geometry.translate(...Ne.spr(Ne.neg(l))),o.position.set(...Ne.spr(l)),this.wheelIdlePositions[a]=l}(o.name.includes("rsid")||o.name.includes("lite"))&&(r.push(o),this.originalTexWithTailLights=o.material.map)}),!this.originalTexWithTailLights)throw new Error("Not a driveable NFS1 car");this.tailLightColors=n.includes("TRAFFC.CFM")?[9509903,16711680]:[3212546,16258068],this.texWithTailLightsImg=document.createElement("img"),this.texWithTailLights=new Ro(this.texWithTailLightsImg),this.texWithTailLights.flipY=this.originalTexWithTailLights.flipY,dd(this.texWithTailLights),this.recolorTailLights(this.tailLightColors[0]).then();for(const o of r)o.material.map=this.texWithTailLights;const s=new Hg;this.tyreTextures=[1,2,3,4].map(o=>s.load(`${n}/tyr${o}.png`));for(const o of this.tyreTextures)dd(o);this.tyreMaterial=new vr({map:this.tyreTextures[0]}),this.tyreMaterial.transparent=!0,this.tyreMaterial.alphaTest=.5,this.tyreMaterial.map.wrapS=Zi,this.tyreMaterial.map.wrapT=Zi,this.tyreMaterial.polygonOffset=!0,this.tyreMaterial.polygonOffsetFactor=-4;for(const o of this.wheels)o.material=this.tyreMaterial}get tailLightsOn(){return this._tailLightsOn}set tailLightsOn(t){t!==this._tailLightsOn&&(this._tailLightsOn=t,this.recolorTailLights(this.tailLightColors[t?1:0]))}get speed(){return this._speed}set speed(t){if(t!==this._speed){switch(this._speed=t,this.tyreTextureUpdateTimer&&clearInterval(this.tyreTextureUpdateTimer),t){case"idle":this.tyreMaterial.map=this.tyreTextures[0];break;case"slow":let e=!0;this.tyreTextureUpdateTimer=setInterval(()=>{this.tyreMaterial.map=this.tyreTextures[e?1:2],this.tyreMaterial.needsUpdate=!0,e=!e},16);break;case"fast":this.tyreMaterial.map=this.tyreTextures[3]}this.tyreMaterial.needsUpdate=!0}}get steeringAngle(){return this._steeringAngle}set steeringAngle(t){if(t!==this._steeringAngle){this._steeringAngle=t;for(const e of this.frontWheels)e.rotation.set(0,0,t)}}recolorTailLights(t){var e=this;return xt(function*(){if(e.originalTexWithTailLights&&e.texWithTailLights&&e.texWithTailLightsImg){for(let n=100;n>0&&!e.originalTexWithTailLights.source.data;n--)yield c$(50);((i,t,e,n=null)=>{const[r,s,o]=[t>>16,t>>8&255,255&t],[a,l,c]=[e>>16,e>>8&255,255&e];d$(i,(d,h)=>{d[h]==r&&d[h+1]==s&&d[h+2]==o&&(d[h]=a,d[h+1]=l,d[h+2]=c)},n)})(e.originalTexWithTailLights.source.data,e.tailLightsTexColor,t,e.texWithTailLightsImg),e.texWithTailLights.needsUpdate=!0}})()}dispose(){this.texWithTailLightsImg&&(this.texWithTailLightsImg.remove(),this.texWithTailLightsImg=null),this.texWithTailLights&&(this.texWithTailLights.dispose(),this.texWithTailLights=null),this.tyreTextureUpdateTimer&&clearInterval(this.tyreTextureUpdateTimer),this.tyreMaterial&&(this.tyreMaterial.dispose(),this.tyreMaterial=null)}}let tme=(()=>{class i{constructor(e,n,r){this.eelDelegate=e,this.mainService=n,this.cdr=r,this._resource$=new at(null),this.changed=new $e,this.previewPaths$=new at(null),this.destroyed$=new Ie,this.customControls=[],this.serializerSettings={geometry__save_obj:!0,geometry__save_blend:!1,geometry__export_to_gg_web_engine:!1}}get resource(){return this._resource$.getValue()}set resource(e){this._resource$.next(e)}ngAfterViewInit(){var e=this;return xt(function*(){e._resource$.pipe(He(e.destroyed$)).subscribe(function(){var n=xt(function*(r){e.previewPaths$.next(yield e.loadPreviewFilePaths(r?.id))});return function(r){return n.apply(this,arguments)}}()),e.mainService.dataBlockChange$.pipe(He(e.destroyed$),vn(([n,r])=>!!e.resource&&n.startsWith(e.resource.id)),Vc(1500)).subscribe(xt(function*(){e.previewPaths$.next(null),e.previewPaths$.next(yield e.postTmpUpdates(e.resource?.id))}))})()}onObjectLoaded(e){var n=this;return xt(function*(){if((n._resource$.value?.id||"").includes(".CFM__"))try{const r=n.resource?.id.split("/");r.pop(),r[r.length-1]=""+(+r[r.length-1]+1);const s=yield n.eelDelegate.retrieveValue(r.join("/")+"/data"),o=s.children_aliases.findIndex(l=>"!PAL"===l);if(-1==o)throw new Error("Not a car");const a=new eme(e,s.children[o].data.colors[254]>>>8,n.previewPaths$.value[0].substring(0,n.previewPaths$.value[0].lastIndexOf("/"))+"/assets");n.customControls=[{title:"TNFS car features",controls:[{label:"Brake lights on",type:"checkbox",value:!1,change:l=>{a.tailLightsOn=l}},{label:"Car speed",type:"radio",options:["idle","slow","fast"],value:"idle",change:l=>{a.speed=l}},{label:"Steering angle",type:"slider",minValue:-.7,maxValue:.7,valueStep:.05,value:0,change:l=>{a.steeringAngle=l}}]}],n.cdr.markForCheck()}catch{}})()}postTmpUpdates(e){var n=this;return xt(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 xt(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)(E($c),E(ul),E(si))},i.\u0275cmp=st({type:i,selectors:[["app-orip-geometry-block-ui"]],inputs:{resource:"resource"},outputs:{changed:"changed"},decls:4,vars:7,consts:[[3,"paths","customControls","onObjectLoaded"],[3,"resource"]],template:function(e,n){1&e&&($(0,"app-obj-viewer",0),ke("onObjectLoaded",function(s){return n.onObjectLoaded(s)}),gt(1,"async"),j(),Oe(2,"app-compound-block-ui",1),gt(3,"async")),2&e&&(U("paths",yt(1,3,n.previewPaths$))("customControls",n.customControls),V(2),U("resource",yt(3,5,n._resource$)))},dependencies:[Wc,l$,Ea],changeDetection:0}),i})();const u$=i=>{let t=i.block_class_mro.split("__")[0];return"ArrayBlock"===t?u$(i.child_schema)+"[]":t},nme=["class","block-ui"];function ime(i,t){if(1&i&&($(0,"mat-label",7),Ve(1),j()),2&i){const e=re(2);U("matTooltip",e.resourceDescription),V(1),Xi("",null==e.resource?null:e.resource.name," ")}}function rme(i,t){if(1&i&&($(0,"mat-option",8),Ve(1),j()),2&i){const e=t.$implicit,n=t.index,r=re(2);U("value",n)("disabled",r.disabled),V(1),Xi(" ",r.blockClassStr(e)," ")}}function sme(i,t){if(1&i){const e=Kn();$r(0),fe(1,ime,2,2,"mat-label",1),gt(2,"async"),$(3,"div",2)(4,"mat-label"),Ve(5,"Resource type:"),j(),$(6,"mat-select",3),ke("selectionChange",function(r){return Ht(e),Et(re().setChoiceIndex(r.value))}),fe(7,rme,2,3,"mat-option",4),j(),Oe(8,"app-block-actions",5),j(),Oe(9,"app-editor",6),Wr()}if(2&i){const e=re();let n;V(1),U("ngIf",(null==e.resource?null:e.resource.name)&&(null==e.resource?null:e.resource.name)!=(null==(n=yt(2,8,e.main.resource$))?null:n.name)),V(5),U("value",e.resourceData.choice_index)("disabled",e.disabled),V(1),U("ngForOf",e.resource.schema.possible_resource_schemas),V(1),U("resource",e.childResource),V(1),U("resource",e.childResource)("hideBlockActions",!0)("disabled",e.disabled)}}let h$=(()=>{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 $e,this.blockClassStr=u$}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)(E(ul))},i.\u0275cmp=st({type:i,selectors:[["app-delegate",8,"block-ui"]],inputs:{resource:"resource",resourceDescription:"resourceDescription",hideBlockActions:"hideBlockActions",disabled:"disabled"},outputs:{changed:"changed"},attrs:nme,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"],[3,"resource","hideBlockActions","disabled"],["matTooltipPosition","above",3,"matTooltip"],[3,"value","disabled"]],template:function(e,n){1&e&&fe(0,sme,10,10,"ng-container",0),2&e&&U("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 ome=["class","block-ui"];function ame(i,t){if(1&i&&($(0,"mat-label",7),Ve(1),j()),2&i){const e=re(2);U("matTooltip",e.resourceDescription),V(1),Xi(" ",e.resource.name," ")}}function lme(i,t){if(1&i){const e=Kn();$r(0),fe(1,ame,2,2,"mat-label",1),$(2,"mat-selection-list",2),ke("selectionChange",function(r){return Ht(e),Et(re().onSelection(r))}),$(3,"mat-list-option",3),Ve(4," Left "),j(),$(5,"mat-list-option",4),Ve(6," Right "),j()(),$(7,"mat-form-field",5)(8,"mat-label"),Ve(9,"Texture ID"),j(),$(10,"input",6),ke("ngModelChange",function(r){return Ht(e),Et(re().resource.data.texture_id=r)})("change",function(){return Ht(e),Et(re().changed.emit())}),j()(),Wr()}if(2&i){const e=re();V(1),U("ngIf",e.resource.name),V(2),U("selected",e.resource.data.has_left_fence),V(2),U("selected",e.resource.data.has_right_fence),V(5),U("max",63)("min",0)("step",1)("ngModel",e.resource.data.texture_id)}}let cme=(()=>{class i{constructor(){this.resource=null,this.resourceDescription="",this.changed=new $e}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=st({type:i,selectors:[["app-fence-type",8,"block-ui"]],inputs:{resource:"resource",resourceDescription:"resourceDescription"},outputs:{changed:"changed"},attrs:ome,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&&fe(0,lme,11,7,"ng-container",0),2&e&&U("ngIf",n.resource)},dependencies:[vi,Wl,Uh,jc,Gh,Hh,fu,ql,qo,Yc,Os,yC,vC],changeDetection:0}),i})(),dme=(()=>{class i{constructor(){this._resource=null,this.resourceMap={},this.changed=new $e}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]=["",hl.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)(E(eb),E(mte),E(nR))},i.\u0275cmp=st({type:i,selectors:[["app-run-custom-action",8,"dialog"]],attrs:ume,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&&($(0,"h1",0),Ve(1),j(),$(2,"div",1)(3,"p"),Ve(4),j()(),$(5,"form",2),fe(6,hme,4,4,"mat-form-field",3),j(),$(7,"div",4)(8,"button",5),ke("click",function(){return n.dialogRef.close()}),Ve(9,"Cancel"),j(),$(10,"button",6),ke("click",function(){return n.submit()}),Ve(11,"Run"),j()()),2&e&&(V(1),Xi('Run action "',n.data.title,'"'),V(3),ui(n.data.description),V(1),U("formGroup",n.argsForm),V(1),U("ngForOf",n.data.args),V(4),U("disabled",n.argsForm.invalid))},dependencies:[oo,ER,Wl,jc,gR,ql,qo,Yc,$M,dV,uV,hV,Vh,cC],styles:["form[_ngcontent-%COMP%]{padding:0 24px}"]}),i})();function f$(i,t){return t?e=>wy(t.pipe(Oi(1),function pme(){return ti((i,t)=>{i.subscribe(jn(t,ms))})}()),e.pipe(f$(i))):tr((e,n)=>Mr(i(e,n)).pipe(Oi(1),$B(e)))}function p$(i,t=zy){const e=II(i,t);return f$(()=>e)}const mme=["mat-menu-item",""];function gme(i,t){1&i&&(ki(),$(0,"svg",3),Oe(1,"polygon",4),j())}const _me=[[["mat-icon"],["","matMenuItemIcon",""]],"*"],vme=["mat-icon, [matMenuItemIcon]","*"];function yme(i,t){if(1&i){const e=Kn();$(0,"div",0),ke("keydown",function(r){return Ht(e),Et(re()._handleKeydown(r))})("click",function(){return Ht(e),Et(re().closed.emit("click"))})("@transformMenu.start",function(r){return Ht(e),Et(re()._onAnimationStart(r))})("@transformMenu.done",function(r){return Ht(e),Et(re()._onAnimationDone(r))}),$(1,"div",1),Yt(2),j()()}if(2&i){const e=re();U("id",e.panelId)("ngClass",e._classList)("@transformMenu",e._panelAnimationState),Dt("aria-label",e.ariaLabel||null)("aria-labelledby",e.ariaLabelledby||null)("aria-describedby",e.ariaDescribedby||null)}}const bme=["*"],vO=new me("MAT_MENU_PANEL"),xme=HM(zM(class{}));let KS=(()=>{class i extends xme{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 Ie,this._focused=new Ie,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",Yr("120ms cubic-bezier(0, 0, 0.2, 1)",oi({opacity:1,transform:"scale(1)"}))),Or("* => void",Yr("100ms 25ms linear",oi({opacity:0})))]),fadeInItems:Ia("fadeInItems",[Ps("showing",oi({opacity:1})),Or("void => *",[oi({opacity:0}),Yr("400ms 100ms cubic-bezier(0.55, 0, 0.55, 0.2)")])])};let Mme=0;const m$=new me("mat-menu-default-options",{providedIn:"root",factory:function Cme(){return{overlapTrigger:!1,xPosition:"after",yPosition:"below",backdropClass:"cdk-overlay-transparent-backdrop"}}});let Kb=(()=>{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=tn(e)}get hasBackdrop(){return this._hasBackdrop}set hasBackdrop(e){this._hasBackdrop=tn(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 rm,this._classList={},this._panelAnimationState="void",this._animationDone=new Ie,this.overlayPanelClass=this._defaultOptions.overlayPanelClass||"",this.backdropClass=this._defaultOptions.backdropClass,this._overlapTrigger=this._defaultOptions.overlapTrigger,this._hasBackdrop=this._defaultOptions.hasBackdrop,this.closed=new $e,this.close=this.closed,this.panelId="mat-menu-panel-"+Mme++}ngOnInit(){this.setPositionClasses()}ngAfterContentInit(){this._updateDirectDescendants(),this._keyManager=new DU(this._directDescendantItems).withWrap().withTypeAhead().withHomeAndEnd(),this._keyManager.tabOut.subscribe(()=>this.closed.emit("tab")),this._directDescendantItems.changes.pipe(Eo(this._directDescendantItems),Rs(e=>Cr(...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(Eo(this._directDescendantItems),Rs(n=>Cr(...n.map(r=>r._hovered))))}addItem(e){}removeItem(e){}_handleKeydown(e){const n=e.keyCode,r=this._keyManager;switch(n){case 27:Yo(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(Oi(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(Eo(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)(E(mt),E(ft),E(m$),E(si))},i.\u0275dir=ve({type:i,contentQueries:function(e,n,r){if(1&e&&(Wi(r,wme,5),Wi(r,KS,5),Wi(r,KS,4)),2&e){let s;Tt(s=It())&&(n.lazyContent=s.first),Tt(s=It())&&(n._allItems=s),Tt(s=It())&&(n.items=s)}},viewQuery:function(e,n){if(1&e&&Zn(Co,5),2&e){let r;Tt(r=It())&&(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})(),Sme=(()=>{class i extends Kb{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)(E(mt),E(ft),E(m$),E(si))},i.\u0275cmp=st({type:i,selectors:[["mat-menu"]],hostVars:3,hostBindings:function(e,n){2&e&&Dt("aria-label",null)("aria-labelledby",null)("aria-describedby",null)},exportAs:["matMenu"],features:[An([{provide:vO,useExisting:i}]),lt],ngContentSelectors:bme,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&&(rr(),fe(0,yme,3,6,"ng-template"))},dependencies:[dm],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:[ZS.transformMenu,ZS.fadeInItems]},changeDetection:0}),i})();const g$=new me("mat-menu-scroll-strategy"),Ame={provide:g$,deps:[as],useFactory:function Eme(i){return()=>i.scrollStrategies.reposition()}},_$=Ih({passive:!0});let Dme=(()=>{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,d){this._overlay=e,this._element=n,this._viewContainerRef=r,this._menuItemInstance=a,this._dir=l,this._focusMonitor=c,this._ngZone=d,this._overlayRef=null,this._menuOpen=!1,this._closingActionsSubscription=Qt.EMPTY,this._hoverSubscription=Qt.EMPTY,this._menuCloseSubscription=Qt.EMPTY,this._changeDetectorRef=Lt(si),this._handleTouchStart=h=>{$I(h)||(this._openedBy="touch")},this._openedBy=void 0,this.restoreFocus=!0,this.menuOpened=new $e,this.onMenuOpen=this.menuOpened,this.menuClosed=new $e,this.onMenuClose=this.menuClosed,this._scrollStrategy=s,this._parentMaterialMenu=o instanceof Kb?o:void 0,n.nativeElement.addEventListener("touchstart",this._handleTouchStart,_$)}ngAfterContentInit(){this._handleHover()}ngOnDestroy(){this._overlayRef&&(this._overlayRef.dispose(),this._overlayRef=null),this._element.nativeElement.removeEventListener("touchstart",this._handleTouchStart,_$),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 Kb&&(e._startAnimation(),e._directDescendantItems.changes.pipe(He(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 Kb?(n._resetAnimation(),n.lazyContent?n._animationDone.pipe(vn(r=>"void"===r.toState),Oi(1),He(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 Im({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],[d,h]=[r,s],p=0;if(this.triggersSubmenu()){if(h=r="before"===e.xPosition?"start":"end",s=d="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:d,overlayY:o,offsetY:p},{originX:s,originY:l,overlayX:h,overlayY:o,offsetY:p},{originX:r,originY:c,overlayX:d,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 Cr(e,this._parentMaterialMenu?this._parentMaterialMenu.closed:ht(),this._parentMaterialMenu?this._parentMaterialMenu._hovered().pipe(vn(o=>o!==this._menuItemInstance),vn(()=>this._menuOpen)):ht(),n)}_handleMousedown(e){GI(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(vn(e=>e===this._menuItemInstance&&!e.disabled),p$(0,TI)).subscribe(()=>{this._openedBy="mouse",this.menu instanceof Kb&&this.menu._isAnimating?this.menu._animationDone.pipe(Oi(1),p$(0,TI),He(this._parentMaterialMenu._hovered())).subscribe(()=>this.openMenu()):this.openMenu()}))}_getPortal(e){return(!this._portal||this._portal.templateRef!==e.templateRef)&&(this._portal=new Cm(e.templateRef,this._viewContainerRef)),this._portal}}return i.\u0275fac=function(e){return new(e||i)(E(as),E(mt),E(jr),E(g$),E(vO,8),E(KS,10),E(Ta,8),E(Hc),E(ft))},i.\u0275dir=ve({type:i,hostVars:3,hostBindings:function(e,n){1&e&&ke("click",function(s){return n._handleClick(s)})("mousedown",function(s){return n._handleMousedown(s)})("keydown",function(s){return n._handleKeydown(s)}),2&e&&Dt("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})(),Tme=(()=>{class i extends Dme{}return i.\u0275fac=function(){let t;return function(n){return(t||(t=ri(i)))(n||i)}}(),i.\u0275dir=ve({type:i,selectors:[["","mat-menu-trigger-for",""],["","matMenuTriggerFor",""]],hostAttrs:[1,"mat-mdc-menu-trigger"],exportAs:["matMenuTrigger"],features:[lt]}),i})(),Ime=(()=>{class i{}return i.\u0275fac=function(e){return new(e||i)},i.\u0275mod=en({type:i}),i.\u0275inj=Wt({providers:[Ame],imports:[ao,Qy,Qn,Rm,Yy,Qn]}),i})();function Rme(i,t){if(1&i){const e=Kn();$(0,"button",7),ke("click",function(){return Ht(e),Et(re(2).deserialize())}),Oe(1,"mat-icon",8),j()}}function kme(i,t){if(1&i){const e=Kn();$r(0),fe(1,Rme,2,0,"button",4),$(2,"button",5),ke("click",function(){return Ht(e),Et(re().serializeBlockReversible())}),Oe(3,"mat-icon",6),j(),Wr()}if(2&i){const e=re();V(1),U("ngIf",e.isInReversibleSerializationState),V(1),U("disabled",e.isInReversibleSerializationState)}}function Pme(i,t){1&i&&($(0,"button",9),Oe(1,"mat-icon",10),j()),2&i&&(re(),U("matMenuTriggerFor",ir(3)))}function Ome(i,t){if(1&i){const e=Kn();$(0,"button",11),ke("click",function(){const s=Ht(e).$implicit;return Et(re().runCustomAction(s))}),$(1,"span"),Ve(2),j()()}if(2&i){const e=t.$implicit;V(2),ui(e.title)}}const Fme=function(){return[]};let QS=(()=>{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 xt(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)(E(ul),E($c),E(si),E(Lm),E(AV))},i.\u0275cmp=st({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&&(fe(0,kme,4,2,"ng-container",0),fe(1,Pme,2,1,"button",1),$(2,"mat-menu",null,2),fe(4,Ome,3,1,"button",3),j()),2&e&&(U("ngIf",null==n.resource||null==n.resource.schema?null:n.resource.schema.serializable_to_disc),V(1),U("ngIf",(null==n.resource||null==n.resource.schema.custom_actions?null:n.resource.schema.custom_actions.length)>0),V(3),U("ngForOf",(null==n.resource?null:n.resource.schema.custom_actions)||ro(3,Fme)))},dependencies:[oo,vi,Os,WM,hR,Sme,KS,Tme],styles:["[_nghost-%COMP%]{display:flex}"]}),i})();const Lme=["class","block-ui"];function Nme(i,t){if(1&i&&($(0,"mat-label",7),Ve(1),j()),2&i){const e=re();U("matTooltip",e.resourceDescription),V(1),Xi("",null==e.resource?null:e.resource.name," ")}}function Bme(i,t){if(1&i&&($(0,"audio",8),Oe(1,"source",9),gt(2,"async"),Ve(3," Your browser does not support the audio element. "),j()),2&i){const e=re();V(1),U("src",yt(2,1,e.audioUrl$),Fp)}}function Ume(i,t){1&i&&Oe(0,"mat-spinner",10)}function Vme(i,t){1&i&&Oe(0,"app-block-actions",11),2&i&&U("resource",re().resource)}const zme=function(){return["wave_data"]};let Hme=(()=>{class i{constructor(e,n){this.eelDelegate=e,this.main=n,this._resource$=new at(null),this.audioUrl$=new at(null),this.resourceDescription="",this.hideBlockActions=!1,this.destroyed$=new Ie,this.changed=new $e}set resource(e){this._resource$.next(e)}get resource(){return this._resource$.getValue()}ngAfterViewInit(){var e=this;return xt(function*(){e._resource$.pipe(He(e.destroyed$)).subscribe(function(){var n=xt(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)(E($c),E(ul))},i.\u0275cmp=st({type:i,selectors:[["app-eacs-audio",8,"block-ui"]],inputs:{resource:"resource",resourceDescription:"resourceDescription",hideBlockActions:"hideBlockActions"},outputs:{changed:"changed"},attrs:Lme,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&&($(0,"div",0),fe(1,Nme,2,2,"mat-label",1),gt(2,"async"),fe(3,Bme,4,3,"audio",2),gt(4,"async"),fe(5,Ume,1,0,"mat-spinner",3),gt(6,"async"),Oe(7,"div",4),fe(8,Vme,1,1,"app-block-actions",5),j(),Oe(9,"app-compound-block-ui",6),gt(10,"async")),2&e){let r;V(1),U("ngIf",(null==n.resource?null:n.resource.name)&&(null==n.resource?null:n.resource.name)!=(null==(r=yt(2,7,n.main.resource$))?null:r.name)),V(2),U("ngIf",yt(4,9,n.audioUrl$)),V(2),U("ngIf",n.resource&&!yt(6,11,n.audioUrl$)),V(3),U("ngIf",!n.hideBlockActions),V(1),U("resource",yt(10,13,n._resource$))("hideBlockActions",!0)("fieldBlacklist",ro(15,zme))}},dependencies:[vi,qo,Os,XS,Wc,QS,Ea],styles:["#header[_ngcontent-%COMP%]{display:flex}"]}),i})();class Gme{constructor(t,e){this.mesh=t,this.assetsPath=e,this.textures=[],this.tyreTextureUpdateTimer=void 0,this.tyreMaterial=null,this.tyreTextures=[],this._color=65280,this._speed="idle",this._steeringAngle=0,this.wheels=[],this.wheelIdlePositions=[],this.frontWheels=[];let n=new Set;if(t.traverse(r=>{if(!(r instanceof Nn))return;let s=-1;if(r.name.startsWith("part_hp_12")?s=0:r.name.startsWith("part_hp_14")?s=1:r.name.startsWith("part_hp_16")?s=2:r.name.startsWith("part_hp_18")&&(s=3),s>-1){r.geometry.boundingBox||r.geometry.computeBoundingBox();let a=Ne.avg(r.geometry.boundingBox.min,r.geometry.boundingBox.max);return(0==s||2==s)&&(a={x:a.x,y:a.y,z:a.z+1.5}),r.geometry.translate(...Ne.spr(Ne.neg(a))),r.position.set(...Ne.spr(a)),this.wheelIdlePositions[s]=a,this.wheels.push(r),void(s<2&&this.frontWheels.push(r))}const o=r.material.map;o&&n.add(o)}),this.textures=Array.from(n).map(r=>{const s=new Ro(document.createElement("img"));return s.flipY=r.flipY,dd(s),[r,s]}),t.traverse(r=>{if(!(r instanceof Nn))return;const s=r.material.map;if(s){const o=this.textures.find(([a,l])=>a===s);o&&(r.material.map=o[1])}}),this.hasWheels){const r=new Hg;this.tyreTextures=[0,1,2,3].map(s=>r.load(`${e}/m${s}00.png`));for(const s of this.tyreTextures)dd(s);this.tyreMaterial=new vr({map:this.tyreTextures[0]}),this.tyreMaterial.transparent=!0,this.tyreMaterial.alphaTest=.5,this.tyreMaterial.map.wrapS=Zi,this.tyreMaterial.map.wrapT=Zi,this.tyreMaterial.polygonOffset=!0,this.tyreMaterial.polygonOffsetFactor=-4;for(const s of this.wheels)s.material=this.tyreMaterial}this.color=65280,this.recolorCar().then()}get color(){return this._color}set color(t){t!==this._color&&(this._color=t,this.recolorCar().then())}get speed(){return this._speed}set speed(t){if(t!==this._speed){switch(this._speed=t,this.tyreTextureUpdateTimer&&clearInterval(this.tyreTextureUpdateTimer),t){case"idle":this.tyreMaterial.map=this.tyreTextures[0];break;case"slow":let e=!0;this.tyreTextureUpdateTimer=setInterval(()=>{this.tyreMaterial.map=this.tyreTextures[e?1:2],this.tyreMaterial.needsUpdate=!0,e=!e},16);break;case"fast":this.tyreMaterial.map=this.tyreTextures[3]}this.tyreMaterial.needsUpdate=!0}}get steeringAngle(){return this._steeringAngle}set steeringAngle(t){if(t!==this._steeringAngle){this._steeringAngle=t;for(const e of this.frontWheels)e.rotation.set(0,0,t)}}get hasWheels(){return this.wheels.length>0}recolorCar(){var t=this;return xt(function*(){const[e,n,r]=[t.color>>16,t.color>>8&255,255&t.color];for(const[s,o]of t.textures){for(let a=100;a>0&&!s.source.data;a--)yield c$(50);d$(s.source.data,(a,l)=>{if(a[l]+a[l+2]{class i{constructor(e,n,r){this.eelDelegate=e,this.main=n,this.cdr=r,this._resource$=new at(null),this.changed=new $e,this.customControls=[],this.previewPaths$=new at(null),this.destroyed$=new Ie,this.serializerSettings={geometry__save_obj:!0,geometry__save_blend:!1,geometry__export_to_gg_web_engine:!1}}get resource(){return this._resource$.getValue()}set resource(e){this._resource$.next(e)}ngAfterViewInit(){var e=this;return xt(function*(){e._resource$.pipe(He(e.destroyed$)).subscribe(function(){var n=xt(function*(r){e.previewPaths$.next(yield e.loadPreviewFilePaths(r?.id))});return function(r){return n.apply(this,arguments)}}()),e.main.dataBlockChange$.pipe(He(e.destroyed$),vn(([n,r])=>!!e.resource&&n.startsWith(e.resource.id)),Vc(1500)).subscribe(xt(function*(){e.previewPaths$.next(null),e.previewPaths$.next(yield e.postTmpUpdates(e.resource?.id))}))})()}onObjectLoaded(e){var n=this;return xt(function*(){try{const r=new Gme(e,n.previewPaths$.value[0].substring(0,n.previewPaths$.value[0].lastIndexOf("/"))+"/assets");let s=null;const o=a=>{s&&clearTimeout(s),s=setTimeout(()=>r.color=a,50)};n.customControls=[{title:"NFS2 car features",controls:[{label:"Car color",type:"color",value:65280,change:a=>o(a)}]}],r.hasWheels&&n.customControls[0].controls.push({label:"Car speed",type:"radio",options:["idle","slow","fast"],value:"idle",change:a=>{r.speed=a}},{label:"Steering angle",type:"slider",minValue:-.7,maxValue:.7,valueStep:.05,value:0,change:a=>{r.steeringAngle=a}}),n.cdr.markForCheck()}catch(r){console.error(r)}})()}postTmpUpdates(e){var n=this;return xt(function*(){if(e){const r=yield n.eelDelegate.serializeResourceTmp(e,Object.entries(n.main.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 xt(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)(E($c),E(ul),E(si))},i.\u0275cmp=st({type:i,selectors:[["app-geo-geometry",8,"block-ui"]],inputs:{resource:"resource"},outputs:{changed:"changed"},attrs:$me,decls:4,vars:8,consts:[[3,"paths","groupFunction","customControls","onObjectLoaded"],[3,"resource",4,"ngIf"],[3,"resource"]],template:function(e,n){1&e&&($(0,"app-obj-viewer",0),ke("onObjectLoaded",function(s){return n.onObjectLoaded(s)}),gt(1,"async"),j(),fe(2,Wme,2,3,"app-compound-block-ui",1),gt(3,"async")),2&e&&(U("paths",yt(1,4,n.previewPaths$))("groupFunction",n.previewObjectGroupFunc)("customControls",n.customControls),V(2),U("ngIf",!yt(3,6,n.main.hideHiddenFields$)))},dependencies:[vi,Wc,l$,Ea],changeDetection:0}),i})();const Yme=function(){return["children","items_descr"]};let qme=(()=>{class i{constructor(){this._resource=null,this.hideBlockActions=!1,this.resourceMap={},this.changed=new $e}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=st({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&&Oe(0,"app-compound-block-ui",0)(1,"app-sidenav-res-list",1),2&e&&(U("resource",n.resource)("hideBlockActions",n.hideBlockActions)("fieldBlacklist",ro(4,Yme)),V(1),U("resources",n.resourceMap))},dependencies:[Wc,_C],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 Xme(i,t){if(1&i&&($(0,"mat-error"),Ve(1),j()),2&i){const e=re(2);V(1),Mh(" ",e.resourceError.data.error_class,": ",e.resourceError.data.error_text," ")}}function Kme(i,t){1&i&&Oe(0,"mat-spinner",5)}function Zme(i,t){if(1&i&&($(0,"div",2),fe(1,Xme,2,2,"mat-error",3),fe(2,Kme,1,0,"mat-spinner",4),j()),2&i){const e=re();V(1),U("ngIf",e.resourceError),V(1),U("ngIf",!e.resourceError)}}function Qme(i,t){}let Zb=(()=>{class i{constructor(e,n){this.mainService=e,this.deep=n,this._component=null,this._componentChangedSub=null,this.destroyed$=new Ie,this.resourceSet$=new Ie,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)}resourceEqual(e,n){return e&&n?e.id===n.id&&this.deep.deepEquals(e.data,n.data):!e==!n}set resource(e){if(!this.resourceEqual(e,this._resourceError||this._resource)&&(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(He(this.destroyed$),He(this.resourceSet$)).subscribe(()=>{const s=this._resource.id,o=this._resource.data;if(o instanceof Array)if(this._resource.schema.block_class_mro.startsWith("BytesBlock"))this.mainService.dataBlockChange$.next([s,o]);else 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 Jme(i,t){1&i&&Oe(0,"mat-icon",17)}function ege(i,t){1&i&&Oe(0,"mat-icon",18)}let tge=(()=>{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 xt(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 xt(function*(){if(e.mainService.hasUnsavedChanges){let n=e.dialog.open(xV,{data:{text:"There are unsaved changes, which will be lost. Are you sure you want to reload file?"}});if(!(yield rR(n.afterClosed())))return}yield e.mainService.reloadResource(),e.cdr.markForCheck()})()}}return i.\u0275fac=function(e){return new(e||i)(E($c),E(ul),E(Lm),E(AV),E(si))},i.\u0275cmp=st({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&&($(0,"mat-toolbar",0)(1,"span"),Ve(2),gt(3,"async"),gt(4,"async"),j(),Oe(5,"span",1),$(6,"button",2),ke("click",function(){return n.toggleUnknownsVisibility()}),fe(7,Jme,1,0,"mat-icon",3),gt(8,"async"),fe(9,ege,1,0,"mat-icon",4),gt(10,"async"),j(),Oe(11,"mat-divider",5)(12,"app-block-actions",6),gt(13,"async"),$(14,"button",7),ke("click",function(){return n.reloadResource()}),gt(15,"async"),Oe(16,"mat-icon",8),j(),Oe(17,"mat-divider",5),$(18,"button",9),ke("click",function(){return n.saveResource()}),gt(19,"async"),gt(20,"async"),Oe(21,"mat-icon",10),j()(),$(22,"div",11),Oe(23,"div",12)(24,"app-editor",13),gt(25,"async"),gt(26,"async"),gt(27,"async"),$(28,"div",14)(29,"a",15),Oe(30,"img",16),j()(),Oe(31,"div",12),j()),2&e){let r;V(2),Mh("",(null==(r=yt(3,9,n.mainService.resource$))?null:r.name)||"...","",yt(4,11,n.mainService.hasUnsavedChanges$)?"*":"",""),V(5),U("ngIf",yt(8,13,n.mainService.hideHiddenFields$)),V(2),U("ngIf",!yt(10,15,n.mainService.hideHiddenFields$)),V(3),U("resource",yt(13,17,n.mainService.resource$)),V(2),U("disabled",!yt(15,19,n.mainService.eelDelegate.openedResourcePath$)),V(4),U("disabled",!yt(19,21,n.mainService.resource$)||!yt(20,23,n.mainService.hasUnsavedChanges$)),V(6),U("resource",yt(25,25,n.mainService.customActionRunning$)?null:yt(26,27,n.mainService.resource$)||yt(27,29,n.mainService.error$))("hideBlockActions",!0)}},dependencies:[vi,yJ,xJ,Os,WM,hR,Zb,QS,Ea],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 v$(i){return new pe(3e3,!1)}function Lge(){return typeof window<"u"&&typeof window.document<"u"}function yO(){return typeof process<"u"&&"[object process]"==={}.toString.call(process)}function ku(i){switch(i.length){case 0:return new Jy;case 1:return i[0];default:return new iV(i)}}function y$(i,t,e,n,r=new Map,s=new Map){const o=[],a=[];let l=-1,c=null;if(n.forEach(d=>{const h=d.get("offset"),p=h==l,m=p&&c||new Map;d.forEach((g,b)=>{let v=b,y=g;if("offset"!==b)switch(v=t.normalizePropertyName(v,o),y){case eR:y=r.get(b);break;case Gc: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 Cge(i){return new pe(3502,!1)}();return a}function bO(i,t,e,n){switch(t){case"start":i.onStart(()=>n(e&&xO(e,"start",i)));break;case"done":i.onDone(()=>n(e&&xO(e,"done",i)));break;case"destroy":i.onDestroy(()=>n(e&&xO(e,"destroy",i)))}}function xO(i,t,e){const s=wO(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 wO(i,t,e,n,r="",s=0,o){return{element:i,triggerName:t,fromState:e,toState:n,phaseName:r,totalTime:s,disabled:!!o}}function na(i,t,e){let n=i.get(t);return n||i.set(t,n=e),n}function b$(i){const t=i.indexOf(":");return[i.substring(1,t),i.slice(t+1)]}let MO=(i,t)=>!1,x$=(i,t,e)=>[],w$=null;function CO(i){const t=i.parentNode||i.host;return t===w$?null:t}(yO()||typeof Element<"u")&&(Lge()?(w$=(()=>document.documentElement)(),MO=(i,t)=>{for(;t;){if(t===i)return!0;t=CO(t)}return!1}):MO=(i,t)=>i.contains(t),x$=(i,t,e)=>{if(e)return Array.from(i.querySelectorAll(t));const n=i.querySelector(t);return n?[n]:[]});let Df=null,M$=!1;const C$=MO,S$=x$;let E$=(()=>{class i{validateStyleProperty(e){return function Bge(i){Df||(Df=function Uge(){return typeof document<"u"?document.body:null}()||{},M$=!!Df.style&&"WebkitAppearance"in Df.style);let t=!0;return Df.style&&!function Nge(i){return"ebkit"==i.substring(1,6)}(i)&&(t=i in Df.style,!t&&M$&&(t="Webkit"+i.charAt(0).toUpperCase()+i.slice(1)in Df.style)),t}(e)}matchesElement(e,n){return!1}containsElement(e,n){return C$(e,n)}getParentElement(e){return CO(e)}query(e,n,r){return S$(e,n,r)}computeStyle(e,n,r){return r||""}animate(e,n,r,s,o,a=[],l){return new Jy(r,s)}}return i.\u0275fac=function(e){return new(e||i)},i.\u0275prov=Re({token:i,factory:i.\u0275fac}),i})(),SO=(()=>{class i{}return i.NOOP=new E$,i})();const Vge=1e3,EO="ng-enter",JS="ng-leave",eE="ng-trigger",tE=".ng-trigger",D$="ng-animating",AO=".ng-animating";function ud(i){if("number"==typeof i)return i;const t=i.match(/^(-?[\.\d]+)(m?s)/);return!t||t.length<2?0:DO(parseFloat(t[1]),t[2])}function DO(i,t){return"s"===t?i*Vge:i}function nE(i,t,e){return i.hasOwnProperty("duration")?i:function Hge(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(v$()),{duration:0,delay:0,easing:""};r=DO(parseFloat(a[1]),a[2]);const l=a[3];null!=l&&(s=DO(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 nge(){return new pe(3100,!1)}()),a=!0),s<0&&(t.push(function ige(){return new pe(3101,!1)}()),a=!0),a&&t.splice(l,0,v$())}return{duration:r,delay:s,easing:o}}(i,t,e)}function Qb(i,t={}){return Object.keys(i).forEach(e=>{t[e]=i[e]}),t}function T$(i){const t=new Map;return Object.keys(i).forEach(e=>{t.set(e,i[e])}),t}function Pu(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 R$(i,t,e){return e?t+":"+e+";":""}function k$(i){let t="";for(let e=0;e{const s=IO(r);e&&!e.has(r)&&e.set(r,i.style[s]),i.style[s]=n}),yO()&&k$(i))}function Tf(i,t){i.style&&(t.forEach((e,n)=>{const r=IO(n);i.style[r]=""}),yO()&&k$(i))}function Jb(i){return Array.isArray(i)?1==i.length?i[0]:eV(i):i}const TO=new RegExp("{{\\s*(.+?)\\s*}}","g");function P$(i){let t=[];if("string"==typeof i){let e;for(;e=TO.exec(i);)t.push(e[1]);TO.lastIndex=0}return t}function e0(i,t,e){const n=i.toString(),r=n.replace(TO,(s,o)=>{let a=t[o];return null==a&&(e.push(function sge(i){return new pe(3003,!1)}()),a=""),a.toString()});return r==n?i:r}function iE(i){const t=[];let e=i.next();for(;!e.done;)t.push(e.value),e=i.next();return t}const Wge=/-+([a-z0-9])/g;function IO(i){return i.replace(Wge,(...t)=>t[1].toUpperCase())}function jge(i){return i.replace(/([a-z])([A-Z])/g,"$1-$2").toLowerCase()}function ia(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 oge(i){return new pe(3004,!1)}()}}function O$(i,t){return window.getComputedStyle(i)[t]}const oE="*";function Qge(i,t){const e=[];return"string"==typeof i?i.split(/\s*,\s*/).forEach(n=>function Jge(i,t,e){if(":"==i[0]){const l=function e_e(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 yge(i){return new pe(3015,!1)}()),t;const r=n[1],s=n[2],o=n[3];t.push(F$(r,o));"<"==s[0]&&!(r==oE&&o==oE)&&t.push(F$(o,r))}(n,e,t)):e.push(i),e}const aE=new Set(["true","1"]),lE=new Set(["false","0"]);function F$(i,t){const e=aE.has(i)||lE.has(i),n=aE.has(t)||lE.has(t);return(r,s)=>{let o=i==oE||i==r,a=t==oE||t==s;return!o&&e&&"boolean"==typeof r&&(o=r?aE.has(i):lE.has(i)),!a&&n&&"boolean"==typeof s&&(a=s?aE.has(t):lE.has(t)),o&&a}}const t_e=new RegExp("s*:selfs*,?","g");function RO(i,t,e,n){return new n_e(i).build(t,e,n)}class n_e{constructor(t){this._driver=t}build(t,e,n){const r=new s_e(e);return this._resetContextStyleTimingState(r),ia(this,Jb(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 lge(){return new pe(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(d=>{l.name=d,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 cge(){return new pe(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=>{P$(l).forEach(c=>{o.hasOwnProperty(c)||s.add(c)})})}),s.size&&(iE(s.values()),e.errors.push(function dge(i,t){return new pe(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=ia(this,Jb(t.animation),e);return{type:1,matchers:Qge(t.expr,e.errors),animation:n,queryCount:e.queryCount,depCount:e.depCount,options:If(t.options)}}visitSequence(t,e){return{type:2,steps:t.steps.map(n=>ia(this,n,e)),options:If(t.options)}}visitGroup(t,e){const n=e.currentTime;let r=0;const s=t.steps.map(o=>{e.currentTime=n;const a=ia(this,o,e);return r=Math.max(r,e.currentTime),a});return e.currentTime=r,{type:3,steps:s,options:If(t.options)}}visitAnimate(t,e){const n=function a_e(i,t){if(i.hasOwnProperty("duration"))return i;if("number"==typeof i)return kO(nE(i,t).duration,0,"");const e=i;if(e.split(/\s+/).some(s=>"{"==s.charAt(0)&&"{"==s.charAt(1))){const s=kO(0,0,"");return s.dynamic=!0,s.strValue=e,s}const r=nE(e,t);return kO(r.duration,r.delay,r.easing)}(t.timings,e.errors);e.currentAnimateTimings=n;let r,s=t.styles?t.styles:oi({});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=oi(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===Gc?n.push(a):e.errors.push(new pe(3002,!1)):n.push(T$(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),d=c.get(l);let h=!0;d&&(s!=r&&s>=d.startTime&&r<=d.endTime&&(e.errors.push(function hge(i,t,e,n,r){return new pe(3010,!1)}()),h=!1),s=d.startTime),h&&c.set(l,{startTime:s,endTime:r}),e.options&&function $ge(i,t,e){const n=t.params||{},r=P$(i);r.length&&r.forEach(s=>{n.hasOwnProperty(s)||e.push(function rge(i){return new pe(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 fge(){return new pe(3011,!1)}()),n;let s=0;const o=[];let a=!1,l=!1,c=0;const d=t.steps.map(y=>{const M=this._makeStyleAst(y,e);let x=null!=M.offset?M.offset:function o_e(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:ia(this,Jb(t.animation),e),options:If(t.options)}}visitAnimateChild(t,e){return e.depCount++,{type:9,options:If(t.options)}}visitAnimateRef(t,e){return{type:10,animation:this.visitReference(t.animation,e),options:If(t.options)}}visitQuery(t,e){const n=e.currentQuerySelector,r=t.options||{};e.queryCount++,e.currentQuery=t;const[s,o]=function i_e(i){const t=!!i.split(/\s*,\s*/).find(e=>":self"==e);return t&&(i=i.replace(t_e,"")),i=i.replace(/@\*/g,tE).replace(/@\w+/g,e=>tE+"-"+e.slice(1)).replace(/:animating/g,AO),[i,t]}(t.selector);e.currentQuerySelector=n.length?n+" "+s:s,na(e.collectedStyles,e.currentQuerySelector,new Map);const a=ia(this,Jb(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:If(t.options)}}visitStagger(t,e){e.currentQuery||e.errors.push(function _ge(){return new pe(3013,!1)}());const n="full"===t.timings?{duration:0,delay:0,easing:"full"}:nE(t.timings,e.errors,!0);return{type:12,animation:ia(this,Jb(t.animation),e),timings:n,options:null}}}class s_e{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 If(i){return i?(i=Qb(i)).params&&(i.params=function r_e(i){return i?Qb(i):null}(i.params)):i={},i}function kO(i,t,e){return{duration:i,delay:t,easing:e}}function PO(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 cE{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 d_e=new RegExp(":enter","g"),h_e=new RegExp(":leave","g");function OO(i,t,e,n,r,s=new Map,o=new Map,a,l,c=[]){return(new f_e).buildKeyframes(i,t,e,n,r,s,o,a,l,c)}class f_e{buildKeyframes(t,e,n,r,s,o,a,l,c,d=[]){c=c||new cE;const h=new FO(t,e,c,r,s,d,[]);h.options=l;const p=l.delay?ud(l.delay):0;h.currentTimeline.delayNextStep(p),h.currentTimeline.setStyles([o],null,h.errors,l),ia(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()):[PO(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:ud(e0(s,r?.params??{},e.errors));n.delayNextStep(o)}}}_visitSubInstructions(t,e,n){let s=e.currentTimeline.currentTime;const o=null!=n.duration?ud(n.duration):null,a=null!=n.delay?ud(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),ia(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=dE);const o=ud(s.delay);r.delayNextStep(o)}t.steps.length&&(t.steps.forEach(o=>ia(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?ud(t.options.delay):0;t.steps.forEach(o=>{const a=e.createSubContext(t.options);s&&a.delayNextStep(s),ia(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 nE(e.params?e0(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?ud(r.delay):0;s&&(6===e.previousNode.type||0==n&&e.currentTimeline.hasCurrentStyleProperties())&&(e.currentTimeline.snapshotCurrentStyles(),e.previousNode=dE);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,d)=>{e.currentQueryIndex=d;const h=e.createSubContext(t.options,c);s&&h.delayNextStep(s),c===e.element&&(l=h.currentTimeline),ia(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 d=e.currentTimeline;l&&d.delayNextStep(l);const h=d.currentTime;ia(this,t.animation,e),e.previousNode=t,n.currentStaggerTime=r.currentTime-h+(r.startTime-n.currentTimeline.startTime)}}const dE={};class FO{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=dE,this.subContextCount=0,this.options={},this.currentQueryIndex=0,this.currentQueryTotal=0,this.currentStaggerTime=0,this.currentTimeline=l||new uE(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=ud(n.duration)),null!=n.delay&&(r.delay=ud(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]=e0(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 FO(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=dE,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 p_e(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(d_e,"."+this._enterClassName)).replace(h_e,"."+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 vge(i){return new pe(3014,!1)}()),a}}class uE{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 uE(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||Gc),this._currentKeyframe.set(e,Gc);this._currentEmptyStepKeyframe=this._currentKeyframe}setStyles(t,e,n,r){e&&this._previousKeyframe.set("easing",e);const s=r&&r.params||{},o=function m_e(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,Gc)}else Pu(r,e)}),e}(t,this._globalTimelineStyles);for(let[a,l]of o){const c=e0(l,s,n);this._pendingStyles.set(a,c),this._localTimelineStyles.has(a)||this._backFill.set(a,this._globalTimelineStyles.get(a)??Gc),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=Pu(a,new Map,this._backFill);c.forEach((d,h)=>{d===eR?t.add(h):d===Gc&&e.add(h)}),n||c.set("offset",l/this.duration),r.push(c)});const s=t.size?iE(t.values()):[],o=e.size?iE(e.values()):[];if(n){const a=r[0],l=new Map(a);a.set("offset",0),l.set("offset",1),r=[a,l]}return PO(this.element,r,s,o,this.duration,this.startTime,this.easing,!1)}}class p_e extends uE{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=Pu(t[0]);l.set("offset",0),s.push(l);const c=Pu(t[0]);c.set("offset",B$(a)),s.push(c);const d=t.length-1;for(let h=1;h<=d;h++){let p=Pu(t[h]);const m=p.get("offset");p.set("offset",B$((e+m*n)/o)),s.push(p)}n=o,e=0,r="",t=s}return PO(this.element,t,this.preStyleProps,this.postStyleProps,n,e,r,!0)}}function B$(i,t=3){const e=Math.pow(10,t-1);return Math.round(i*e)/e}class LO{}const g_e=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 __e extends LO{normalizePropertyName(t,e){return IO(t)}normalizeStyleValue(t,e,n,r){let s="";const o=n.toString().trim();if(g_e.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 age(i,t){return new pe(3005,!1)}())}return o+s}}function U$(i,t,e,n,r,s,o,a,l,c,d,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:d,totalTime:h,errors:p}}const NO={};class V${constructor(t,e,n){this._triggerName=t,this.ast=e,this._stateStyles=n}match(t,e,n,r){return function v_e(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,d){const h=[],p=this.ast.options&&this.ast.options.params||NO,g=this.buildStyles(n,a&&a.params||NO,h),b=l&&l.params||NO,v=this.buildStyles(r,b,h),y=new Set,M=new Map,x=new Map,C="void"===r,F={params:y_e(b,p),delay:this.ast.options?.delay},D=d?[]:OO(t,e,this.ast.animation,s,o,g,v,F,c,h);let k=0;if(D.forEach(T=>{k=Math.max(T.duration+T.delay,k)}),h.length)return U$(e,this._triggerName,n,r,C,g,v,[],[],M,x,k,h);D.forEach(T=>{const A=T.element,W=na(M,A,new Set);T.preStyleProps.forEach(ne=>W.add(ne));const ie=na(x,A,new Set);T.postStyleProps.forEach(ne=>ie.add(ne)),A!==e&&y.add(A)});const B=iE(y.values());return U$(e,this._triggerName,n,r,C,g,v,D,B,M,x,k)}}function y_e(i,t){const e=Qb(t);for(const n in i)i.hasOwnProperty(n)&&null!=i[n]&&(e[n]=i[n]);return e}class b_e{constructor(t,e,n){this.styles=t,this.defaultParams=e,this.normalizer=n}buildStyles(t,e){const n=new Map,r=Qb(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=e0(o,r,e));const l=this.normalizer.normalizePropertyName(a,e);o=this.normalizer.normalizeStyleValue(a,l,o,e),n.set(a,o)})}),n}}class w_e{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 b_e(r.style,r.options&&r.options.params||{},n))}),z$(this.states,"true","1"),z$(this.states,"false","0"),e.transitions.forEach(r=>{this.transitionFactories.push(new V$(t,r,this.states))}),this.fallbackTransition=function M_e(i,t,e){return new V$(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 z$(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 C_e=new cE;class S_e{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=RO(this._driver,e,n,r);if(n.length)throw function Sge(i){return new pe(3503,!1)}();this._animations.set(t,s)}_buildPlayer(t,e,n){const r=t.element,s=y$(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=OO(this._driver,e,s,EO,JS,new Map,new Map,n,C_e,r),o.forEach(d=>{const h=na(a,d.element,new Map);d.postStyleProps.forEach(p=>h.set(p,null))})):(r.push(function Ege(){return new pe(3300,!1)}()),o=[]),r.length)throw function Age(i){return new pe(3504,!1)}();a.forEach((d,h)=>{d.forEach((p,m)=>{d.set(m,this._driver.computeStyle(h,m,Gc))})});const c=ku(o.map(d=>{const h=a.get(d.element);return this._buildPlayer(d,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 Dge(i){return new pe(3301,!1)}();return e}listen(t,e,n,r){const s=wO(e,"","","");return bO(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 H$="ng-animate-queued",BO="ng-animate-disabled",I_e=[],G$={namespaceId:"",setForRemoval:!1,setForMove:!1,hasAnimation:!1,removedBeforeQueried:!1},R_e={namespaceId:"",setForMove:!1,setForRemoval:!1,hasAnimation:!1,removedBeforeQueried:!0},La="__ng_removed";class UO{get params(){return this.options.params}constructor(t,e=""){this.namespaceId=e;const n=t&&t.hasOwnProperty("value");if(this.value=function F_e(i){return i??null}(n?t.value:t),n){const s=Qb(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 t0="void",VO=new UO(t0);class k_e{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,Na(e,this._hostClassName)}listen(t,e,n,r){if(!this._triggers.has(e))throw function Tge(i,t){return new pe(3302,!1)}();if(null==n||0==n.length)throw function Ige(i){return new pe(3303,!1)}();if(!function L_e(i){return"start"==i||"done"==i}(n))throw function Rge(i,t){return new pe(3400,!1)}();const s=na(this._elementListeners,t,[]),o={name:e,phase:n,callback:r};s.push(o);const a=na(this._engine.statesByElement,t,new Map);return a.has(e)||(Na(t,eE),Na(t,eE+"-"+e),a.set(e,VO)),()=>{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 kge(i){return new pe(3401,!1)}();return e}trigger(t,e,n,r=!0){const s=this._getTrigger(e),o=new zO(this.id,e,t);let a=this._engine.statesByElement.get(t);a||(Na(t,eE),Na(t,eE+"-"+e),this._engine.statesByElement.set(t,a=new Map));let l=a.get(e);const c=new UO(n,this.id);if(!(n&&n.hasOwnProperty("value"))&&l&&c.absorbOptions(l.options),a.set(e,c),l||(l=VO),c.value!==t0&&l.value===c.value){if(!function U_e(i,t){const e=Object.keys(i),n=Object.keys(t);if(e.length!=n.length)return!1;for(let r=0;r{Tf(t,v),rc(t,y)})}return}const p=na(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||(Na(t,H$),o.onStart(()=>{$g(t,H$)})),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,tE,!0);n.forEach(r=>{if(r[La])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 d=this.trigger(t,c,t0,r);d&&a.push(d)}}),a.length)return this._engine.markElementAsRemoved(this.id,t,!0,e,o),n&&ku(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)||VO,d=new UO(t0),h=new zO(this.id,o,t);this._engine.totalQueuedPlayers++,this._queue.push({element:t,triggerName:o,transition:l,fromState:c,toState:d,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[La];(!s||s===G$)&&(n.afterFlush(()=>this.clearElementCache(t)),n.destroyInnerAnimations(t),n._onRemovalComplete(t,e))}}insertNode(t,e){Na(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=wO(s,n.triggerName,n.fromState.value,n.toState.value);l._data=t,bO(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 P_e{_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 k_e(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(hE(e)){const s=this._fetchNamespace(t);if(s)return s.trigger(e,n,r),!0}return!1}insertNode(t,e,n,r){if(!hE(e))return;const s=e[La];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),Na(t,BO)):this.disabledNodes.has(t)&&(this.disabledNodes.delete(t),$g(t,BO))}removeNode(t,e,n,r){if(hE(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[La]={namespaceId:t,setForRemoval:r,hasAnimation:n,removedBeforeQueried:!1,previousTriggersValues:s}}listen(t,e,n,r,s){return hE(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,tE,!0);e.forEach(n=>this.destroyActiveAnimationsForElement(n)),0!=this.playersByQueriedElement.size&&(e=this.driver.query(t,AO,!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 ku(this.players).onDone(()=>t());t()})}processLeaveNode(t){const e=t[La];if(e&&e.setForRemoval){if(t[La]=G$,e.namespaceId){this.destroyInnerAnimations(t);const n=this._fetchNamespace(e.namespaceId);n&&n.clearElementCache(t)}this._onRemovalComplete(t,e.setForRemoval)}t.classList?.contains(BO)&&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?ku(e).onDone(()=>{n.forEach(r=>r())}):n.forEach(r=>r())}}reportError(t){throw function Pge(i){return new pe(3402,!1)}()}_flushAnimations(t,e){const n=new cE,r=[],s=new Map,o=[],a=new Map,l=new Map,c=new Map,d=new Set;this.disabledNodes.forEach(q=>{d.add(q);const se=this.driver.query(q,".ng-animate-queued",!0);for(let J=0;J{const J=EO+b++;g.set(se,J),q.forEach(we=>Na(we,J))});const v=[],y=new Set,M=new Set;for(let q=0;qy.add(we)):M.add(se))}const x=new Map,C=j$(p,Array.from(y));C.forEach((q,se)=>{const J=JS+b++;x.set(se,J),q.forEach(we=>Na(we,J))}),t.push(()=>{m.forEach((q,se)=>{const J=g.get(se);q.forEach(we=>$g(we,J))}),C.forEach((q,se)=>{const J=x.get(se);q.forEach(we=>$g(we,J))}),v.forEach(q=>{this.processLeaveNode(q)})});const F=[],D=[];for(let q=this._namespaceList.length-1;q>=0;q--)this._namespaceList[q].drainQueuedTransitions(e).forEach(J=>{const we=J.player,Be=J.element;if(F.push(we),this.collectedEnterElements.length){const Fe=Be[La];if(Fe&&Fe.setForMove){if(Fe.previousTriggersValues&&Fe.previousTriggersValues.has(J.triggerName)){const wt=Fe.previousTriggersValues.get(J.triggerName),At=this.statesByElement.get(J.element);if(At&&At.has(J.triggerName)){const St=At.get(J.triggerName);St.value=wt,At.set(J.triggerName,St)}}return void we.destroy()}}const Ye=!h||!this.driver.containsElement(h,Be),Rt=x.get(Be),nn=g.get(Be),le=this._buildInstruction(J,n,nn,Rt,Ye);if(le.errors&&le.errors.length)return void D.push(le);if(Ye)return we.onStart(()=>Tf(Be,le.fromStyles)),we.onDestroy(()=>rc(Be,le.toStyles)),void r.push(we);if(J.isFallbackTransition)return we.onStart(()=>Tf(Be,le.fromStyles)),we.onDestroy(()=>rc(Be,le.toStyles)),void r.push(we);const Pe=[];le.timelines.forEach(Fe=>{Fe.stretchStartingKeyframe=!0,this.disabledNodes.has(Fe.element)||Pe.push(Fe)}),le.timelines=Pe,n.append(Be,le.timelines),o.push({instruction:le,player:we,element:Be}),le.queriedElements.forEach(Fe=>na(a,Fe,[]).push(we)),le.preStyleProps.forEach((Fe,wt)=>{if(Fe.size){let At=l.get(wt);At||l.set(wt,At=new Set),Fe.forEach((St,Cn)=>At.add(Cn))}}),le.postStyleProps.forEach((Fe,wt)=>{let At=c.get(wt);At||c.set(wt,At=new Set),Fe.forEach((St,Cn)=>At.add(Cn))})});if(D.length){const q=[];D.forEach(se=>{q.push(function Oge(i,t){return new pe(3505,!1)}())}),F.forEach(se=>se.destroy()),this.reportError(q)}const k=new Map,B=new Map;o.forEach(q=>{const se=q.element;n.has(se)&&(B.set(se,se),this._beforeAnimationBuild(q.player.namespaceId,q.instruction,k))}),r.forEach(q=>{const se=q.element;this._getPreviousPlayers(se,!1,q.namespaceId,q.triggerName,null).forEach(we=>{na(k,se,[]).push(we),we.destroy()})});const T=v.filter(q=>q$(q,l,c)),A=new Map;W$(A,this.driver,M,c,Gc).forEach(q=>{q$(q,l,c)&&T.push(q)});const ie=new Map;m.forEach((q,se)=>{W$(ie,this.driver,new Set(q),l,eR)}),T.forEach(q=>{const se=A.get(q),J=ie.get(q);A.set(q,new Map([...Array.from(se?.entries()??[]),...Array.from(J?.entries()??[])]))});const ne=[],oe=[],ge={};o.forEach(q=>{const{element:se,player:J,instruction:we}=q;if(n.has(se)){if(d.has(se))return J.onDestroy(()=>rc(se,we.toStyles)),J.disabled=!0,J.overrideTotalTime(we.totalTime),void r.push(J);let Be=ge;if(B.size>1){let Rt=se;const nn=[];for(;Rt=Rt.parentNode;){const le=B.get(Rt);if(le){Be=le;break}nn.push(Rt)}nn.forEach(le=>B.set(le,Be))}const Ye=this._buildAnimation(J.namespaceId,we,k,s,ie,A);if(J.setRealPlayer(Ye),Be===ge)ne.push(J);else{const Rt=this.playersByElement.get(Be);Rt&&Rt.length&&(J.parentPlayer=ku(Rt)),r.push(J)}}else Tf(se,we.fromStyles),J.onDestroy(()=>rc(se,we.toStyles)),oe.push(J),d.has(se)&&r.push(J)}),oe.forEach(q=>{const se=s.get(q.element);if(se&&se.length){const J=ku(se);q.setRealPlayer(J)}}),r.forEach(q=>{q.parentPlayer?q.syncPlayerEvents(q.parentPlayer):q.destroy()});for(let q=0;q!Ye.destroyed);Be.length?N_e(this,se,Be):this.processLeaveNode(se)}return v.length=0,ne.forEach(q=>{this.players.push(q),q.onDone(()=>{q.destroy();const se=this.players.indexOf(q);this.players.splice(se,1)}),q.play()}),ne}elementContainsData(t,e){let n=!1;const r=e[La];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==t0;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,d=c!==s,h=na(n,c,[]);this._getPreviousPlayers(c,d,o,a,e.toState).forEach(m=>{const g=m.getRealPlayer();g.beforeDestroy&&g.beforeDestroy(),m.destroy(),h.push(m)})}Tf(s,e.fromStyles)}_buildAnimation(t,e,n,r,s,o){const a=e.triggerName,l=e.element,c=[],d=new Set,h=new Set,p=e.timelines.map(g=>{const b=g.element;d.add(b);const v=b[La];if(v&&v.removedBeforeQueried)return new Jy(g.duration,g.delay);const y=b!==l,M=function B_e(i){const t=[];return Y$(i,t),t}((n.get(b)||I_e).map(k=>k.getRealPlayer())).filter(k=>!!k.element&&k.element===b),x=s.get(b),C=o.get(b),F=y$(0,this._normalizer,0,g.keyframes,x,C),D=this._buildPlayer(g,F,M);if(g.subTimeline&&r&&h.add(b),y){const k=new zO(t,a,b);k.setRealPlayer(D),c.push(k)}return D});c.forEach(g=>{na(this.playersByQueriedElement,g.element,[]).push(g),g.onDone(()=>function O_e(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))}),d.forEach(g=>Na(g,D$));const m=ku(p);return m.onDestroy(()=>{d.forEach(g=>$g(g,D$)),rc(l,e.toStyles)}),h.forEach(g=>{na(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 Jy(t.duration,t.delay)}}class zO{constructor(t,e,n){this.namespaceId=t,this.triggerName=e,this.element=n,this._player=new Jy,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=>bO(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){na(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 hE(i){return i&&1===i.nodeType}function $$(i,t){const e=i.style.display;return i.style.display=t??"none",e}function W$(i,t,e,n,r){const s=[];e.forEach(l=>s.push($$(l)));const o=[];n.forEach((l,c)=>{const d=new Map;l.forEach(h=>{const p=t.computeStyle(c,h,r);d.set(h,p),(!p||0==p.length)&&(c[La]=R_e,o.push(c))}),i.set(c,d)});let a=0;return e.forEach(l=>$$(l,s[a++])),o}function j$(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 Na(i,t){i.classList?.add(t)}function $g(i,t){i.classList?.remove(t)}function N_e(i,t,e){ku(e).onDone(()=>i.processLeaveNode(t))}function Y$(i,t){for(let e=0;er.add(s)):t.set(i,n),e.delete(i),!0}class fE{constructor(t,e,n){this.bodyNode=t,this._driver=e,this._normalizer=n,this._triggerCache={},this.onRemovalComplete=(r,s)=>{},this._transitionEngine=new P_e(t,e,n),this._timelineEngine=new S_e(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=[],d=RO(this._driver,s,l,c);if(l.length)throw function Mge(i,t){return new pe(3404,!1)}();a=function x_e(i,t,e){return new w_e(i,t,e)}(r,d,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]=b$(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]=b$(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 z_e=(()=>{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&&rc(this._element,this._startStyles,this._initialStyles),this._state=1)}finish(){this.start(),this._state<2&&(rc(this._element,this._initialStyles),this._endStyles&&(rc(this._element,this._endStyles),this._endStyles=null),this._state=1)}destroy(){this.finish(),this._state<3&&(i.initialStylesByElement.delete(this._element),this._startStyles&&(Tf(this._element,this._startStyles),this._endStyles=null),this._endStyles&&(Tf(this._element,this._endStyles),this._endStyles=null),rc(this._element,this._initialStyles),this._state=3)}}return i.initialStylesByElement=new WeakMap,i})();function HO(i){let t=null;return i.forEach((e,n)=>{(function H_e(i){return"display"===i||"position"===i})(n)&&(t=t||new Map,t.set(n,e))}),t}class X${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:O$(this.element,r))}),this.currentSnapshot=t}triggerCallback(t){const e="start"===t?this._onStartFns:this._onDoneFns;e.forEach(n=>n()),e.length=0}}class G_e{validateStyleProperty(t){return!0}validateAnimatableStyleProperty(t){return!0}matchesElement(t,e){return!1}containsElement(t,e){return C$(t,e)}getParentElement(t){return CO(t)}query(t,e,n){return S$(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,d=o.filter(m=>m instanceof X$);(function Yge(i,t){return 0===i||0===t})(n,r)&&d.forEach(m=>{m.currentSnapshot.forEach((g,b)=>c.set(b,g))});let h=function Gge(i){return i.length?i[0]instanceof Map?i:i.map(t=>T$(t)):[]}(e).map(m=>Pu(m));h=function qge(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,O$(i,a)))}}return t}(t,h,c);const p=function V_e(i,t){let e=null,n=null;return Array.isArray(t)&&t.length?(e=HO(t[0]),t.length>1&&(n=HO(t[t.length-1]))):t instanceof Map&&(e=HO(t)),e||n?new z_e(i,e,n):null}(t,h);return new X$(t,h,l,p)}}let $_e=(()=>{class i extends QU{constructor(e,n){super(),this._nextAnimationId=0,this._renderer=e.createRenderer(n.body,{id:"0",encapsulation:Ys.None,styles:[],data:{animation:[]}})}build(e){const n=this._nextAnimationId.toString();this._nextAnimationId++;const r=Array.isArray(e)?eV(e):e;return K$(this._renderer,null,n,"register",[r]),new W_e(n,this._renderer)}}return i.\u0275fac=function(e){return new(e||i)(ee(Nl),ee(qt))},i.\u0275prov=Re({token:i,factory:i.\u0275fac}),i})();class W_e extends RQ{constructor(t,e){super(),this._id=t,this._renderer=e}create(t,e){return new j_e(this._id,t,e||{},this._renderer)}}class j_e{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 K$(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 K$(i,t,e,n,r){return i.setProperty(t,`@@${e}:${n}`,r)}const Z$="@.disabled";let Y_e=(()=>{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 d=this._rendererCache.get(s);return d||(d=new Q$("",s,this.engine,()=>this._rendererCache.delete(s)),this._rendererCache.set(s,d)),d}const o=n.id,a=n.id+"-"+this._currentId;this._currentId++,this.engine.register(a,e);const l=d=>{Array.isArray(d)?d.forEach(l):this.engine.registerTrigger(o,a,e,d.name,d)};return n.data.animation.forEach(l),new q_e(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)(ee(Nl),ee(fE),ee(ft))},i.\u0275prov=Re({token:i,factory:i.\u0275fac}),i})();class Q${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==Z$?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 q_e extends Q${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==Z$?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 X_e(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 K_e(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 J$=[{provide:QU,useClass:$_e},{provide:LO,useFactory:function Q_e(){return new __e}},{provide:fE,useClass:(()=>{class i extends fE{constructor(e,n,r,s){super(e.body,n,r)}ngOnDestroy(){this.flush()}}return i.\u0275fac=function(e){return new(e||i)(ee(qt),ee(SO),ee(LO),ee(lm))},i.\u0275prov=Re({token:i,factory:i.\u0275fac}),i})()},{provide:Nl,useFactory:function J_e(i,t,e){return new Y_e(i,t,e)},deps:[iM,fE,ft]}],GO=[{provide:SO,useFactory:()=>new G_e},{provide:kr,useValue:"BrowserAnimations"},...J$],e8=[{provide:SO,useClass:E$},{provide:kr,useValue:"NoopAnimations"},...J$];let eve=(()=>{class i{static withConfig(e){return{ngModule:i,providers:e.disableAnimations?e8:GO}}}return i.\u0275fac=function(e){return new(e||i)},i.\u0275mod=en({type:i}),i.\u0275inj=Wt({providers:GO,imports:[kB]}),i})();const t8=new me("CdkAccordion");let tve=0,nve=(()=>{class i{get expanded(){return this._expanded}set expanded(e){e=tn(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=tn(e)}constructor(e,n,r){this.accordion=e,this._changeDetectorRef=n,this._expansionDispatcher=r,this._openCloseAllSubscription=Qt.EMPTY,this.closed=new $e,this.opened=new $e,this.destroyed=new $e,this.expandedChange=new $e,this.id="cdk-accordion-child-"+tve++,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)(E(t8,12),E(si),E(UR))},i.\u0275dir=ve({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:t8,useValue:void 0}])]}),i})(),ive=(()=>{class i{}return i.\u0275fac=function(e){return new(e||i)},i.\u0275mod=en({type:i}),i.\u0275inj=Wt({}),i})();const rve=["body"];function sve(i,t){}const ove=[[["mat-expansion-panel-header"]],"*",[["mat-action-row"]]],ave=["mat-expansion-panel-header","*","mat-action-row"];function lve(i,t){1&i&&Oe(0,"span",2),2&i&&U("@indicatorRotate",re()._getExpandedState())}const cve=[[["mat-panel-title"]],[["mat-panel-description"]],"*"],dve=["mat-panel-title","mat-panel-description","*"],n8=new me("MAT_ACCORDION"),i8="225ms cubic-bezier(0.4,0.0,0.2,1)",r8={indicatorRotate:Ia("indicatorRotate",[Ps("collapsed, void",oi({transform:"rotate(0deg)"})),Ps("expanded",oi({transform:"rotate(180deg)"})),Or("expanded <=> collapsed, void => collapsed",Yr(i8))]),bodyExpansion:Ia("bodyExpansion",[Ps("collapsed, void",oi({height:"0px",visibility:"hidden"})),Ps("expanded",oi({height:"*",visibility:"visible"})),Or("expanded <=> collapsed, void => collapsed",Yr(i8))])},s8=new me("MAT_EXPANSION_PANEL");let uve=(()=>{class i{constructor(e,n){this._template=e,this._expansionPanel=n}}return i.\u0275fac=function(e){return new(e||i)(E(Co),E(s8,8))},i.\u0275dir=ve({type:i,selectors:[["ng-template","matExpansionPanelContent",""]]}),i})(),hve=0;const o8=new me("MAT_EXPANSION_PANEL_DEFAULT_OPTIONS");let a8=(()=>{class i extends nve{get hideToggle(){return this._hideToggle||this.accordion&&this.accordion.hideToggle}set hideToggle(e){this._hideToggle=tn(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 $e,this.afterCollapse=new $e,this._inputChanges=new Ie,this._headerId="mat-expansion-panel-header-"+hve++,this._bodyAnimationDone=new Ie,this.accordion=e,this._document=o,this._bodyAnimationDone.pipe(zc((c,d)=>c.fromState===d.fromState&&c.toState===d.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(Eo(null),vn(()=>this.expanded&&!this._portal),Oi(1)).subscribe(()=>{this._portal=new Cm(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)(E(n8,12),E(si),E(UR),E(jr),E(qt),E(kr,8),E(o8,8))},i.\u0275cmp=st({type:i,selectors:[["mat-expansion-panel"]],contentQueries:function(e,n,r){if(1&e&&Wi(r,uve,5),2&e){let s;Tt(s=It())&&(n._lazyContent=s.first)}},viewQuery:function(e,n){if(1&e&&Zn(rve,5),2&e){let r;Tt(r=It())&&(n._body=r.first)}},hostAttrs:[1,"mat-expansion-panel"],hostVars:6,hostBindings:function(e,n){2&e&&ln("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:n8,useValue:void 0},{provide:s8,useExisting:i}]),lt,xi],ngContentSelectors:ave,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&&(rr(ove),Yt(0),$(1,"div",0,1),ke("@bodyExpansion.done",function(s){return n._bodyAnimationDone.next(s)}),$(3,"div",2),Yt(4,1),fe(5,sve,0,0,"ng-template",3),j(),Yt(6,2),j()),2&e&&(V(1),U("@bodyExpansion",n._getExpandedState())("id",n.id),Dt("aria-labelledby",n._headerId),V(4),U("cdkPortalOutlet",n._portal))},dependencies:[Sm],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:[r8.bodyExpansion]},changeDetection:0}),i})();class fve{}const pve=XI(fve);let mve=(()=>{class i extends pve{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=Qt.EMPTY;const c=e.accordion?e.accordion._stateChanges.pipe(vn(d=>!(!d.hideToggle&&!d.togglePosition))):mo;this.tabIndex=parseInt(l||"")||0,this._parentChangeSubscription=Cr(e.opened,e.closed,c,e._inputChanges.pipe(vn(d=>!!(d.hideToggle||d.disabled||d.togglePosition)))).subscribe(()=>this._changeDetectorRef.markForCheck()),e.closed.pipe(vn(()=>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:Yo(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)(E(a8,1),E(mt),E(Hc),E(si),E(o8,8),E(kr,8),_a("tabindex"))},i.\u0275cmp=st({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&&ke("click",function(){return n._toggle()})("keydown",function(s){return n._keydown(s)}),2&e&&(Dt("id",n.panel._headerId)("tabindex",n.tabIndex)("aria-controls",n._getPanelId())("aria-expanded",n._isExpanded())("aria-disabled",n.panel.disabled),$o("height",n._getHeaderHeight()),ln("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:[lt],ngContentSelectors:dve,decls:5,vars:3,consts:[[1,"mat-content"],["class","mat-expansion-indicator",4,"ngIf"],[1,"mat-expansion-indicator"]],template:function(e,n){1&e&&(rr(cve),$(0,"span",0),Yt(1),Yt(2,1),Yt(3,2),j(),fe(4,lve,1,1,"span",1)),2&e&&(ln("mat-content-hide-toggle",!n._showToggle()),V(4),U("ngIf",n._showToggle()))},dependencies:[vi],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:[r8.indicatorRotate]},changeDetection:0}),i})(),gve=(()=>{class i{}return i.\u0275fac=function(e){return new(e||i)},i.\u0275dir=ve({type:i,selectors:[["mat-panel-description"]],hostAttrs:[1,"mat-expansion-panel-header-description"]}),i})(),_ve=(()=>{class i{}return i.\u0275fac=function(e){return new(e||i)},i.\u0275dir=ve({type:i,selectors:[["mat-panel-title"]],hostAttrs:[1,"mat-expansion-panel-header-title"]}),i})(),vve=(()=>{class i{}return i.\u0275fac=function(e){return new(e||i)},i.\u0275mod=en({type:i}),i.\u0275inj=Wt({imports:[ao,Qn,ive,Ph]}),i})();function yve(i,t){if(1&i&&($(0,"mat-option",19),Ve(1),j()),2&i){const e=t.$implicit;U("value",e),V(1),Xi(" ",e," ")}}function bve(i,t){if(1&i){const e=Kn();$(0,"mat-form-field",16)(1,"mat-select",17),ke("selectionChange",function(r){return Ht(e),Et(re(2)._changePageSize(r.value))}),fe(2,yve,2,2,"mat-option",18),j()()}if(2&i){const e=re(2);U("appearance",e._formFieldAppearance)("color",e.color),V(1),U("value",e.pageSize)("disabled",e.disabled)("aria-labelledby",e._pageSizeLabelId)("panelClass",e.selectConfig.panelClass||"")("disableOptionCentering",e.selectConfig.disableOptionCentering),V(1),U("ngForOf",e._displayedPageSizeOptions)}}function xve(i,t){if(1&i&&($(0,"div",20),Ve(1),j()),2&i){const e=re(2);V(1),ui(e.pageSize)}}function wve(i,t){if(1&i&&($(0,"div",12)(1,"div",13),Ve(2),j(),fe(3,bve,3,8,"mat-form-field",14),fe(4,xve,2,1,"div",15),j()),2&i){const e=re();V(1),OD("id",e._pageSizeLabelId),V(1),Xi(" ",e._intl.itemsPerPageLabel," "),V(1),U("ngIf",e._displayedPageSizeOptions.length>1),V(1),U("ngIf",e._displayedPageSizeOptions.length<=1)}}function Mve(i,t){if(1&i){const e=Kn();$(0,"button",21),ke("click",function(){return Ht(e),Et(re().firstPage())}),ki(),$(1,"svg",7),Oe(2,"path",22),j()()}if(2&i){const e=re();U("matTooltip",e._intl.firstPageLabel)("matTooltipDisabled",e._previousButtonsDisabled())("matTooltipPosition","above")("disabled",e._previousButtonsDisabled()),Dt("aria-label",e._intl.firstPageLabel)}}function Cve(i,t){if(1&i){const e=Kn();ki(),pa(),$(0,"button",23),ke("click",function(){return Ht(e),Et(re().lastPage())}),ki(),$(1,"svg",7),Oe(2,"path",24),j()()}if(2&i){const e=re();U("matTooltip",e._intl.lastPageLabel)("matTooltipDisabled",e._nextButtonsDisabled())("matTooltipPosition","above")("disabled",e._nextButtonsDisabled()),Dt("aria-label",e._intl.lastPageLabel)}}let mE=(()=>{class i{constructor(){this.changes=new Ie,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=Re({token:i,factory:i.\u0275fac,providedIn:"root"}),i})();const Eve={provide:mE,deps:[[new Ss,new ya,mE]],useFactory:function Sve(i){return i||new mE}},Dve=new me("MAT_PAGINATOR_DEFAULT_OPTIONS"),Tve=zM(yQ(class{}));let Ive=(()=>{class i extends Tve{get pageIndex(){return this._pageIndex}set pageIndex(e){this._pageIndex=Math.max(ks(e),0),this._changeDetectorRef.markForCheck()}get length(){return this._length}set length(e){this._length=ks(e),this._changeDetectorRef.markForCheck()}get pageSize(){return this._pageSize}set pageSize(e){this._pageSize=Math.max(ks(e),0),this._updateDisplayedPageSizeOptions()}get pageSizeOptions(){return this._pageSizeOptions}set pageSizeOptions(e){this._pageSizeOptions=(e||[]).map(n=>ks(n)),this._updateDisplayedPageSizeOptions()}get hidePageSize(){return this._hidePageSize}set hidePageSize(e){this._hidePageSize=tn(e)}get showFirstLastButtons(){return this._showFirstLastButtons}set showFirstLastButtons(e){this._showFirstLastButtons=tn(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 $e,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){wo()},i.\u0275dir=ve({type:i,inputs:{color:"color",pageIndex:"pageIndex",length:"length",pageSize:"pageSize",pageSizeOptions:"pageSizeOptions",hidePageSize:"hidePageSize",showFirstLastButtons:"showFirstLastButtons",selectConfig:"selectConfig"},outputs:{page:"page"},features:[lt]}),i})(),Rve=0,kve=(()=>{class i extends Ive{constructor(e,n,r){super(e,n,r),this._pageSizeLabelId="mat-paginator-page-size-label-"+Rve++,this._formFieldAppearance=r?.formFieldAppearance||"outline"}}return i.\u0275fac=function(e){return new(e||i)(E(mE),E(si),E(Dve,8))},i.\u0275cmp=st({type:i,selectors:[["mat-paginator"]],hostAttrs:["role","group",1,"mat-mdc-paginator"],inputs:{disabled:"disabled"},exportAs:["matPaginator"],features:[lt],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&&($(0,"div",0)(1,"div",1),fe(2,wve,5,4,"div",2),$(3,"div",3)(4,"div",4),Ve(5),j(),fe(6,Mve,3,5,"button",5),$(7,"button",6),ke("click",function(){return n.previousPage()}),ki(),$(8,"svg",7),Oe(9,"path",8),j()(),pa(),$(10,"button",9),ke("click",function(){return n.nextPage()}),ki(),$(11,"svg",7),Oe(12,"path",10),j()(),fe(13,Cve,3,5,"button",11),j()()()),2&e&&(V(2),U("ngIf",!n.hidePageSize),V(3),Xi(" ",n._intl.getRangeLabel(n.pageIndex,n.pageSize,n.length)," "),V(1),U("ngIf",n.showFirstLastButtons),V(1),U("matTooltip",n._intl.previousPageLabel)("matTooltipDisabled",n._previousButtonsDisabled())("matTooltipPosition","above")("disabled",n._previousButtonsDisabled()),Dt("aria-label",n._intl.previousPageLabel),V(3),U("matTooltip",n._intl.nextPageLabel)("matTooltipDisabled",n._nextButtonsDisabled())("matTooltipPosition","above")("disabled",n._nextButtonsDisabled()),Dt("aria-label",n._intl.nextPageLabel),V(3),U("ngIf",n.showFirstLastButtons))},dependencies:[oo,vi,WM,ql,db,Fm,Os],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})(),Pve=(()=>{class i{}return i.\u0275fac=function(e){return new(e||i)},i.\u0275mod=en({type:i}),i.\u0275inj=Wt({providers:[Eve],imports:[ao,jM,LH,kV]}),i})(),Ove=(()=>{class i{}return i.\u0275fac=function(e){return new(e||i)},i.\u0275mod=en({type:i,bootstrap:[tge]}),i.\u0275inj=Wt({providers:[$c,jR,{provide:IH,useValue:Fie}],imports:[kB,_K,eve,Zz,bJ,hC,uH,vve,SV,DV,kV,jM,ZV,Pve,dse,pH,LH,pV,Dpe,Ime,Qz,ZI,Hie,ire]}),i})();Ku(Wc,[oo,vi,Os,Zb,QS],[Ea]),Ku(NR,[dm,oo,vi,vy,jc,fu,ql,a8,mve,_ve,gve,Os,kve,db,Fm,Zb],[]),Ku(_C,[oo,vi,yC,vC,fH,Zb],[]),Ku(h$,[oo,vi,qo,Os,db,Fm,Zb,QS],[Ea]),R7().bootstrapModule(Ove).catch(i=>console.error(i))},489:function(Oo,zs,ps){var dn;Oo=ps.nmd(Oo),function(){var z,Kr=200,Un="Expected a function",Ua="__lodash_hash_undefined__",Ci="__lodash_placeholder__",Si=1,ms=2,Gs=4,$s=1,Fo=2,Pn=1,cr=2,oc=4,oa=8,wl=16,aa=32,Ml=64,Va=128,la=256,fd=512,yE=800,Yg=16,Tn=1/0,Ha=9007199254740991,xE=17976931348623157e292,kf=NaN,ca=4294967295,Ie=ca-1,r0=ca>>>1,s0=[["ary",Va],["bind",Pn],["bindKey",cr],["curry",oa],["curryRight",wl],["flip",fd],["partial",aa],["partialRight",Ml],["rearg",la]],ti="[object Arguments]",jn="[object Array]",wE="[object AsyncFunction]",et="[object Boolean]",ac="[object Date]",ME="[object DOMException]",pd="[object Error]",Pf="[object Function]",o0="[object GeneratorFunction]",Lo="[object Map]",Fu="[object Number]",CE="[object Null]",Ga="[object Object]",a0="[object Promise]",SE="[object Proxy]",md="[object RegExp]",No="[object Set]",lc="[object String]",Of="[object Symbol]",qg="[object Undefined]",gd="[object WeakMap]",Lu="[object ArrayBuffer]",_d="[object DataView]",da="[object Float32Array]",Ff="[object Float64Array]",Xg="[object Int8Array]",Lf="[object Int16Array]",Kg="[object Int32Array]",Zg="[object Uint8Array]",Nu="[object Uint8ClampedArray]",Qg="[object Uint16Array]",Jg="[object Uint32Array]",AE=/\b__p \+= '';/g,DE=/\b(__p \+=) '' \+/g,TE=/(__e\(.*?\)|\b__t\)) \+\n'';/g,l0=/&(?:amp|lt|gt|quot|#39);/g,c0=/[&<>"']/g,IE=RegExp(l0.source),RE=RegExp(c0.source),qO=/<%-([\s\S]+?)%>/g,e_=/<%([\s\S]+?)%>/g,t_=/<%=([\s\S]+?)%>/g,d0=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,u0=/^\w*$/,h0=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,n_=/[\\^$.*+?()[\]{}|]/g,f0=RegExp(n_.source),Nf=/^\s+/,p0=/\s/,m0=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,Mr=/\{\n\/\* \[wrapped with (.+)\] \*/,kE=/,? & /,PE=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,OE=/[()=,{}\[\]\/\s]/,FE=/\\(\\)?/g,g0=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,_0=/\w*$/,LE=/^[-+]0x[0-9a-f]+$/i,$a=/^0b[01]+$/i,NE=/^\[object .+?Constructor\]$/,tr=/^0o[0-7]+$/i,vd=/^(?:0|[1-9]\d*)$/,mo=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,i_=/($^)/,BE=/['\n\r\u2028\u2029\\]/g,Bu="\\ud800-\\udfff",y0="\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff",s_="\\u2700-\\u27bf",o_="a-z\\xdf-\\xf6\\xf8-\\xff",a_="A-Z\\xc0-\\xd6\\xd8-\\xde",b0="\\ufe0e\\ufe0f",x0="\\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",Cr="["+Bu+"]",Bf="["+x0+"]",yd="["+y0+"]",ci="\\d+",l_="["+s_+"]",mi="["+o_+"]",Uf="[^"+Bu+x0+ci+s_+o_+a_+"]",c_="\\ud83c[\\udffb-\\udfff]",Ot="[^"+Bu+"]",Vu="(?:\\ud83c[\\udde6-\\uddff]){2}",zu="[\\ud800-\\udbff][\\udc00-\\udfff]",Hu="["+a_+"]",pe="(?:"+mi+"|"+Uf+")",Vf="(?:"+Hu+"|"+Uf+")",Jt="(?:['\u2019](?:d|ll|m|re|s|t|ve))?",Yn="(?:['\u2019](?:D|LL|M|RE|S|T|VE))?",w0="(?:"+yd+"|"+c_+")?",GE="["+b0+"]?",WE=GE+w0+"(?:\\u200d(?:"+[Ot,Vu,zu].join("|")+")"+GE+w0+")*",jE="(?:"+[l_,Vu,zu].join("|")+")"+WE,XO="(?:"+[Ot+yd+"?",yd,Vu,zu,Cr].join("|")+")",Cl=RegExp("['\u2019]","g"),KO=RegExp(yd,"g"),M0=RegExp(c_+"(?="+c_+")|"+XO+WE,"g"),ZO=RegExp([Hu+"?"+mi+"+"+Jt+"(?="+[Bf,Hu,"$"].join("|")+")",Vf+"+"+Yn+"(?="+[Bf,Hu+pe,"$"].join("|")+")",Hu+"?"+pe+"+"+Jt,Hu+"+"+Yn,"\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])","\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",ci,jE].join("|"),"g"),QO=RegExp("[\\u200d"+Bu+y0+b0+"]"),YE=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,JO=["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"],qE=-1,Ei={};Ei[da]=Ei[Ff]=Ei[Xg]=Ei[Lf]=Ei[Kg]=Ei[Zg]=Ei[Nu]=Ei[Qg]=Ei[Jg]=!0,Ei[ti]=Ei[jn]=Ei[Lu]=Ei[et]=Ei[_d]=Ei[ac]=Ei[pd]=Ei[Pf]=Ei[Lo]=Ei[Fu]=Ei[Ga]=Ei[md]=Ei[No]=Ei[lc]=Ei[gd]=!1;var Sn={};Sn[ti]=Sn[jn]=Sn[Lu]=Sn[_d]=Sn[et]=Sn[ac]=Sn[da]=Sn[Ff]=Sn[Xg]=Sn[Lf]=Sn[Kg]=Sn[Lo]=Sn[Fu]=Sn[Ga]=Sn[md]=Sn[No]=Sn[lc]=Sn[Of]=Sn[Zg]=Sn[Nu]=Sn[Qg]=Sn[Jg]=!0,Sn[pd]=Sn[Pf]=Sn[gd]=!1;var nF={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},Re=parseFloat,iF=parseInt,Wt="object"==typeof global&&global&&global.Object===Object&&global,Hf="object"==typeof self&&self&&self.Object===Object&&self,Sr=Wt||Hf||Function("return this")(),d_=zs&&!zs.nodeType&&zs,$u=d_&&Oo&&!Oo.nodeType&&Oo,u_=$u&&$u.exports===d_,bd=u_&&Wt.process,gs=function(){try{return $u&&$u.require&&$u.require("util").types||bd&&bd.binding&&bd.binding("util")}catch{}}(),h_=gs&&gs.isArrayBuffer,C0=gs&&gs.isDate,Ft=gs&&gs.isMap,Gf=gs&&gs.isRegExp,S0=gs&&gs.isSet,js=gs&&gs.isTypedArray;function _s(X,he,ae){switch(ae.length){case 0:return X.call(he);case 1:return X.call(he,ae[0]);case 2:return X.call(he,ae[0],ae[1]);case 3:return X.call(he,ae[0],ae[1],ae[2])}return X.apply(he,ae)}function rF(X,he,ae,Ue){for(var jt=-1,Vn=null==X?0:X.length;++jt-1}function Wu(X,he,ae){for(var Ue=-1,jt=null==X?0:X.length;++Ue-1;);return ae}function ua(X,he){for(var ae=X.length;ae--&&Lt(he,X[ae],0)>-1;);return ae}var QE=m_({\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"}),st=m_({"&":"&","<":"<",">":">",'"':""","'":"'"});function Ku(X){return"\\"+nF[X]}function Md(X){return QO.test(X)}function Yf(X){var he=-1,ae=Array(X.size);return X.forEach(function(Ue,jt){ae[++he]=[jt,Ue]}),ae}function ve(X,he){return function(ae){return X(he(ae))}}function Gi(X,he){for(var ae=-1,Ue=X.length,jt=0,Vn=[];++ae",""":'"',"'":"'"}),ys=function X(he){var u,ae=(he=null==he?Sr:ys.defaults(Sr.Object(),he,ys.pick(Sr,JO))).Array,Ue=he.Date,jt=he.Error,Vn=he.Function,bt=he.Math,ai=he.Object,uc=he.RegExp,A0=he.String,Er=he.TypeError,nr=ae.prototype,Bo=ai.prototype,qs=he["__core-js_shared__"],Al=Vn.prototype.toString,ii=Bo.hasOwnProperty,bi=0,tA=(u=/[^.]+$/.exec(qs&&qs.keys&&qs.keys.IE_PROTO||""))?"Symbol(src)_1."+u:"",Sd=Bo.toString,D0=Al.call(ai),Xf=Sr._,Kf=uc("^"+Al.call(ii).replace(n_,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),qa=u_?he.Buffer:z,Ui=he.Symbol,v_=he.Uint8Array,bs=qa?qa.allocUnsafe:z,xs=ve(ai.getPrototypeOf,ai),Zf=ai.create,Ed=Bo.propertyIsEnumerable,hc=nr.splice,vo=Ui?Ui.isConcatSpreadable:z,Qu=Ui?Ui.iterator:z,Ad=Ui?Ui.toStringTag:z,Qf=function(){try{var u=Mc(ai,"defineProperty");return u({},"",{}),u}catch{}}(),nA=he.clearTimeout!==Sr.clearTimeout&&he.clearTimeout,oF=Ue&&Ue.now!==Sr.Date.now&&Ue.now,aF=he.setTimeout!==Sr.setTimeout&&he.setTimeout,y_=bt.ceil,b_=bt.floor,T0=ai.getOwnPropertySymbols,lF=qa?qa.isBuffer:z,iA=he.isFinite,cF=nr.join,dF=ve(ai.keys,ai),ur=bt.max,Zr=bt.min,uF=Ue.now,I0=he.parseInt,x_=bt.random,hF=nr.reverse,R0=Mc(he,"DataView"),Jf=Mc(he,"Map"),Xa=Mc(he,"Promise"),Dd=Mc(he,"Set"),xi=Mc(he,"WeakMap"),Td=Mc(ai,"create"),ep=xi&&new xi,Id={},k0=Cc(R0),P0=Cc(Jf),rA=Cc(Xa),w_=Cc(Dd),sA=Cc(xi),Qr=Ui?Ui.prototype:z,Rd=Qr?Qr.valueOf:z,M_=Qr?Qr.toString:z;function I(u){if(Pi(u)&&!sn(u)&&!(u instanceof Rn)){if(u instanceof Ai)return u;if(ii.call(u,"__wrapped__"))return ns(u)}return new Ai(u)}var kd=function(){function u(){}return function(f){if(!Mi(f))return{};if(Zf)return Zf(f);u.prototype=f;var _=new u;return u.prototype=z,_}}();function fc(){}function Ai(u,f){this.__wrapped__=u,this.__actions__=[],this.__chain__=!!f,this.__index__=0,this.__values__=z}function Rn(u){this.__wrapped__=u,this.__actions__=[],this.__dir__=1,this.__filtered__=!1,this.__iteratees__=[],this.__takeCount__=ca,this.__views__=[]}function pc(u){var f=-1,_=null==u?0:u.length;for(this.clear();++f<_;){var w=u[f];this.set(w[0],w[1])}}function Pt(u){var f=-1,_=null==u?0:u.length;for(this.clear();++f<_;){var w=u[f];this.set(w[0],w[1])}}function ha(u){var f=-1,_=null==u?0:u.length;for(this.clear();++f<_;){var w=u[f];this.set(w[0],w[1])}}function Et(u){var f=-1,_=null==u?0:u.length;for(this.__data__=new ha;++f<_;)this.add(u[f])}function Jr(u){var f=this.__data__=new Pt(u);this.size=f.size}function A_(u,f){var _=sn(u),w=!_&&Ac(u),S=!_&&!w&&tl(u),P=!_&&!w&&!S&&Ho(u),G=_||w||S||P,Y=G?Ys(u.length,A0):[],Q=Y.length;for(var _e in u)(f||ii.call(u,_e))&&(!G||!("length"==_e||S&&("offset"==_e||"parent"==_e)||P&&("buffer"==_e||"byteLength"==_e||"byteOffset"==_e)||el(_e,Q)))&&Y.push(_e);return Y}function zr(u){var f=u.length;return f?u[ih(0,f-1)]:z}function Ka(u,f){return Cp(Zs(u),Il(f,0,u.length))}function B0(u){return Cp(Zs(u))}function Tl(u,f,_){(_!==z&&!zo(u[f],_)||_===z&&!(f in u))&&Uo(u,f,_)}function Xs(u,f,_){var w=u[f];(!ii.call(u,f)||!zo(w,_)||_===z&&!(f in u))&&Uo(u,f,_)}function np(u,f){for(var _=u.length;_--;)if(zo(u[_][0],f))return _;return-1}function U0(u,f,_,w){return Za(u,function(S,P,G){f(w,S,_(S),G)}),w}function V0(u,f){return u&&di(f,hr(f),u)}function Uo(u,f,_){"__proto__"==f&&Qf?Qf(u,f,{configurable:!0,enumerable:!0,value:_,writable:!0}):u[f]=_}function Ju(u,f){for(var _=-1,w=f.length,S=ae(w),P=null==u;++_=f?u:f)),u}function Ms(u,f,_,w,S,P){var G,Y=f&Si,Q=f&ms,_e=f&Gs;if(_&&(G=S?_(u,w,S,P):_(u)),G!==z)return G;if(!Mi(u))return u;var ye=sn(u);if(ye){if(G=function lx(u){var f=u.length,_=new u.constructor(f);return f&&"string"==typeof u[0]&&ii.call(u,"index")&&(_.index=u.index,_.input=u.input),_}(u),!Y)return Zs(u,G)}else{var be=Hr(u),Xe=be==Pf||be==o0;if(tl(u))return me(u,Y);if(be==Ga||be==ti||Xe&&!S){if(G=Q||Xe?{}:TA(u),!Y)return Q?function ah(u,f){return di(u,sx(u),f)}(u,function fA(u,f){return u&&di(f,Ds(f),u)}(G,u)):function U_(u,f){return di(u,q_(u),f)}(u,V0(G,u))}else{if(!Sn[be])return S?u:{};G=function cx(u,f,_){var w=u.constructor;switch(f){case Lu:return ex(u);case et:case ac:return new w(+u);case _d:return function vF(u,f){var _=f?ex(u.buffer):u.buffer;return new u.constructor(_,u.byteOffset,u.byteLength)}(u,_);case da:case Ff:case Xg:case Lf:case Kg:case Zg:case Nu:case Qg:case Jg:return MA(u,_);case Lo:return new w;case Fu:case lc:return new w(u);case md:return function yF(u){var f=new u.constructor(u.source,_0.exec(u));return f.lastIndex=u.lastIndex,f}(u);case No:return new w;case Of:return function bF(u){return Rd?ai(Rd.call(u)):{}}(u)}}(u,be,Y)}}P||(P=new Jr);var vt=P.get(u);if(vt)return vt;P.set(u,G),Qx(u)?u.forEach(function(zt){G.add(Ms(zt,f,_,zt,u,P))}):Ev(u)&&u.forEach(function(zt,En){G.set(En,Ms(zt,f,_,En,u,P))});var mn=ye?z:(_e?Q?W_:vp:Q?Ds:hr)(u);return In(mn||u,function(zt,En){mn&&(zt=u[En=zt]),Xs(G,En,Ms(zt,f,_,En,u,P))}),G}function D_(u,f,_){var w=_.length;if(null==u)return!w;for(u=ai(u);w--;){var S=_[w],G=u[S];if(G===z&&!(S in u)||!(0,f[S])(G))return!1}return!0}function ip(u,f,_){if("function"!=typeof u)throw new Er(Un);return uh(function(){u.apply(z,_)},f)}function Od(u,f,_,w){var S=-1,P=Sl,G=!0,Y=u.length,Q=[],_e=f.length;if(!Y)return Q;_&&(f=gi(f,Ur(_))),w?(P=Wu,G=!1):f.length>=Kr&&(P=dc,G=!1,f=new Et(f));e:for(;++S-1},Pt.prototype.set=function cA(u,f){var _=this.__data__,w=np(_,u);return w<0?(++this.size,_.push([u,f])):_[w][1]=f,this},ha.prototype.clear=function dA(){this.size=0,this.__data__={hash:new pc,map:new(Jf||Pt),string:new pc}},ha.prototype.delete=function uA(u){var f=Y_(this,u).delete(u);return this.size-=f?1:0,f},ha.prototype.get=function Se(u){return Y_(this,u).get(u)},ha.prototype.has=function zn(u){return Y_(this,u).has(u)},ha.prototype.set=function Ht(u,f){var _=Y_(this,u),w=_.size;return _.set(u,f),this.size+=_.size==w?0:1,this},Et.prototype.add=Et.prototype.push=function Ar(u){return this.__data__.set(u,Ua),this},Et.prototype.has=function N0(u){return this.__data__.has(u)},Jr.prototype.clear=function fa(){this.__data__=new Pt,this.size=0},Jr.prototype.delete=function S_(u){var f=this.__data__,_=f.delete(u);return this.size=f.size,_},Jr.prototype.get=function E_(u){return this.__data__.get(u)},Jr.prototype.has=function hA(u){return this.__data__.has(u)},Jr.prototype.set=function pF(u,f){var _=this.__data__;if(_ instanceof Pt){var w=_.__data__;if(!Jf||w.length0&&_(Y)?f>1?qn(Y,f-1,_,w,S):El(S,Y):w||(S[S.length]=Y)}return S}var Qa=V_(),Di=V_(!0);function ki(u,f){return u&&Qa(u,f,hr)}function I_(u,f){return u&&Di(u,f,hr)}function pa(u,f){return cc(f,function(_){return Fl(u[_])})}function mc(u,f){for(var _=0,w=(f=va(f,u)).length;null!=u&&_f}function rp(u,f){return null!=u&&ii.call(u,f)}function sp(u,f){return null!=u&&f in ai(u)}function op(u,f,_){for(var w=_?Wu:Sl,S=u[0].length,P=u.length,G=P,Y=ae(P),Q=1/0,_e=[];G--;){var ye=u[G];G&&f&&(ye=gi(ye,Ur(f))),Q=Zr(ye.length,Q),Y[G]=!_&&(f||S>=120&&ye.length>=120)?new Et(G&&ye):z}ye=u[0];var be=-1,Xe=Y[0];e:for(;++be=Y?Q:Q*("desc"==_[w]?-1:1)}return u.index-f.index}(P,G,_)})}function q0(u,f,_){for(var w=-1,S=f.length,P={};++w-1;)Y!==u&&hc.call(Y,Q,1),hc.call(u,Q,1);return u}function nh(u,f){for(var _=u?f.length:0,w=_-1;_--;){var S=f[_];if(_==w||S!==P){var P=S;el(S)?hc.call(u,S,1):sh(u,S)}}return u}function ih(u,f){return u+b_(x_()*(f-u+1))}function rh(u,f){var _="";if(!u||f<1||f>Ha)return _;do{f%2&&(_+=u),(f=b_(f/2))&&(u+=u)}while(f);return _}function pn(u,f){return wp(K_(u,f,is),u+"")}function xA(u){return zr(Ic(u))}function K0(u,f){var _=Ic(u);return Cp(_,Il(f,0,_.length))}function Ud(u,f,_,w){if(!Mi(u))return u;for(var S=-1,P=(f=va(f,u)).length,G=P-1,Y=u;null!=Y&&++SS?0:S+f),(_=_>S?S:_)<0&&(_+=S),S=f>_?0:_-f>>>0,f>>>=0;for(var P=ae(S);++w>>1,G=u[P];null!==G&&!As(G)&&(_?G<=f:G=Kr){var _e=f?null:G_(u);if(_e)return Hn(_e);G=!1,S=dc,Q=new Et}else Q=f?[]:Y;e:for(;++w=w?u:ts(u,f,_)}var J0=nA||function(u){return Sr.clearTimeout(u)};function me(u,f){if(f)return u.slice();var _=u.length,w=bs?bs(_):new u.constructor(_);return u.copy(w),w}function ex(u){var f=new u.constructor(u.byteLength);return new v_(f).set(new v_(u)),f}function MA(u,f){var _=f?ex(u.buffer):u.buffer;return new u.constructor(_,u.byteOffset,u.length)}function CA(u,f){if(u!==f){var _=u!==z,w=null===u,S=u==u,P=As(u),G=f!==z,Y=null===f,Q=f==f,_e=As(f);if(!Y&&!_e&&!P&&u>f||P&&G&&Q&&!Y&&!_e||w&&G&&Q||!_&&Q||!S)return 1;if(!w&&!P&&!_e&&u1?_[S-1]:z,G=S>2?_[2]:z;for(P=u.length>3&&"function"==typeof P?(S--,P):z,G&&Tr(_[0],_[1],G)&&(P=S<3?z:P,S=1),f=ai(f);++w-1?S[P?f[G]:G]:z}}function Cs(u){return bo(function(f){var _=f.length,w=_,S=Ai.prototype.thru;for(u&&f.reverse();w--;){var P=f[w];if("function"!=typeof P)throw new Er(Un);if(S&&!G&&"wrapper"==Ja(P))var G=new Ai([],!0)}for(w=G?w:_;++w<_;){var Y=Ja(P=f[w]),Q="wrapper"==Y?j_(P):z;G=Q&&dh(Q[0])&&Q[1]==(Va|oa|aa|la)&&!Q[4].length&&1==Q[9]?G[Ja(Q[0])].apply(G,Q[3]):1==P.length&&dh(P)?G[Y]():G.thru(P)}return function(){var _e=arguments,ye=_e[0];if(G&&1==_e.length&&sn(ye))return G.plant(ye).value();for(var be=0,Xe=_?f[be].apply(this,_e):ye;++be<_;)Xe=f[be].call(this,Xe);return Xe}})}function $d(u,f,_,w,S,P,G,Y,Q,_e){var ye=f&Va,be=f&Pn,Xe=f&cr,vt=f&(oa|wl),Vt=f&fd,mn=Xe?z:pp(u);return function zt(){for(var En=arguments.length,Fn=ae(En),rs=En;rs--;)Fn[rs]=arguments[rs];if(vt)var ss=ba(zt),no=function Xu(X,he){for(var ae=X.length,Ue=0;ae--;)X[ae]===he&&++Ue;return Ue}(Fn,ss);if(w&&(Fn=zd(Fn,w,S,vt)),P&&(Fn=SA(Fn,P,G,vt)),En-=no,vt&&En<_e){var Ti=Gi(Fn,ss);return nx(u,f,$d,zt.placeholder,_,Fn,Ti,Y,Q,_e-En)}var Ts=be?_:this,Mo=Xe?Ts[u]:u;return En=Fn.length,Y?Fn=function Es(u,f){for(var _=u.length,w=Zr(f.length,_),S=Zs(u);w--;){var P=f[w];u[w]=el(P,_)?S[P]:z}return u}(Fn,Y):Vt&&En>1&&Fn.reverse(),ye&&QY))return!1;var _e=P.get(u),ye=P.get(f);if(_e&&ye)return _e==f&&ye==u;var be=-1,Xe=!0,vt=_&Fo?new Et:z;for(P.set(u,f),P.set(f,u);++be-1&&u%1==0&&u1?"& ":"")+f[w],f=f.join(_>2?", ":" "),u.replace(m0,"{\n/* [wrapped with "+f+"] */\n")}(w,function OA(u,f){return In(s0,function(_){var w="_."+_[0];f&_[1]&&!Sl(u,w)&&u.push(w)}),u.sort()}(function ox(u){var f=u.match(Mr);return f?f[1].split(kE):[]}(w),_)))}function px(u){var f=0,_=0;return function(){var w=uF(),S=Yg-(w-_);if(_=w,S>0){if(++f>=yE)return arguments[0]}else f=0;return u.apply(z,arguments)}}function Cp(u,f){var _=-1,w=u.length,S=w-1;for(f=f===z?w:f;++_1?u[f-1]:z;return _="function"==typeof _?(u.pop(),_):z,ph(u,_)});function Nx(u){var f=I(u);return f.__chain__=!0,f}function Tp(u,f){return f(u)}var Bx=bo(function(u){var f=u.length,_=f?u[0]:0,w=this.__wrapped__,S=function(P){return Ju(P,u)};return!(f>1||this.__actions__.length)&&w instanceof Rn&&el(_)?((w=w.slice(_,+_+(f?1:0))).__actions__.push({func:Tp,args:[S],thisArg:z}),new Ai(w,this.__chain__).thru(function(P){return f&&!P.length&&P.push(z),P})):this.thru(S)}),e1=hp(function(u,f,_){ii.call(u,_)?++u[_]:Uo(u,_,1)}),Vx=AA(xx),Rp=AA(tv);function _v(u,f){return(sn(u)?In:Za)(u,Nt(f,3))}function Ol(u,f){return(sn(u)?sF:T_)(u,Nt(f,3))}var n1=hp(function(u,f,_){ii.call(u,_)?u[_].push(f):Uo(u,_,[f])}),s1=pn(function(u,f,_){var w=-1,S="function"==typeof f,P=Js(u)?ae(u.length):[];return Za(u,function(G){P[++w]=S?_s(f,G,_):ma(G,f,_)}),P}),o1=hp(function(u,f,_){Uo(u,_,f)});function kp(u,f){return(sn(u)?gi:eh)(u,Nt(f,3))}var xa=hp(function(u,f,_){u[_?0:1].push(f)},function(){return[[],[]]}),p1=pn(function(u,f){if(null==u)return[];var _=f.length;return _>1&&Tr(u,f[0],f[1])?f=[]:_>2&&Tr(f[0],f[1],f[2])&&(f=[f[0]]),F_(u,qn(f,1),[])}),Pp=oF||function(){return Sr.Date.now()};function gh(u,f,_){return f=_?z:f,yo(u,Va,z,z,z,z,f=u&&null==f?u.length:f)}function wa(u,f){var _;if("function"!=typeof f)throw new Er(Un);return u=un(u),function(){return--u>0&&(_=f.apply(this,arguments)),u<=1&&(f=z),_}}var Ec=pn(function(u,f,_){var w=Pn;if(_.length){var S=Gi(_,ba(Ec));w|=aa}return yo(u,w,f,_,S)}),vv=pn(function(u,f,_){var w=Pn|cr;if(_.length){var S=Gi(_,ba(vv));w|=aa}return yo(f,w,u,_,S)});function g1(u,f,_){var w,S,P,G,Y,Q,_e=0,ye=!1,be=!1,Xe=!0;if("function"!=typeof u)throw new Er(Un);function vt(Ti){var Ts=w,Mo=S;return w=S=z,_e=Ti,G=u.apply(Mo,Ts)}function zt(Ti){var Ts=Ti-Q;return Q===z||Ts>=f||Ts<0||be&&Ti-_e>=P}function En(){var Ti=Pp();if(zt(Ti))return Fn(Ti);Y=uh(En,function mn(Ti){var ED=f-(Ti-Q);return be?Zr(ED,P-(Ti-_e)):ED}(Ti))}function Fn(Ti){return Y=z,Xe&&w?vt(Ti):(w=S=z,G)}function no(){var Ti=Pp(),Ts=zt(Ti);if(w=arguments,S=this,Q=Ti,Ts){if(Y===z)return function Vt(Ti){return _e=Ti,Y=uh(En,f),ye?vt(Ti):G}(Q);if(be)return J0(Y),Y=uh(En,f),vt(Q)}return Y===z&&(Y=uh(En,f)),G}return f=xo(f)||0,Mi(_)&&(ye=!!_.leading,P=(be="maxWait"in _)?ur(xo(_.maxWait)||0,f):P,Xe="trailing"in _?!!_.trailing:Xe),no.cancel=function rs(){Y!==z&&J0(Y),_e=0,w=Q=S=Y=z},no.flush=function ss(){return Y===z?G:Fn(Pp())},no}var TF=pn(function(u,f){return ip(u,1,f)}),IF=pn(function(u,f,_){return ip(u,xo(f)||0,_)});function jd(u,f){if("function"!=typeof u||null!=f&&"function"!=typeof f)throw new Er(Un);var _=function(){var w=arguments,S=f?f.apply(this,w):w[0],P=_.cache;if(P.has(S))return P.get(S);var G=u.apply(this,w);return _.cache=P.set(S,G)||P,G};return _.cache=new(jd.Cache||ha),_}function wv(u){if("function"!=typeof u)throw new Er(Un);return function(){var f=arguments;switch(f.length){case 0:return!u.call(this);case 1:return!u.call(this,f[0]);case 2:return!u.call(this,f[0],f[1]);case 3:return!u.call(this,f[0],f[1],f[2])}return!u.apply(this,f)}}jd.Cache=ha;var $x=Vd(function(u,f){var _=(f=1==f.length&&sn(f[0])?gi(f[0],Ur(Nt())):gi(qn(f,1),Ur(Nt()))).length;return pn(function(w){for(var S=-1,P=Zr(w.length,_);++S=f}),Ac=Nd(function(){return arguments}())?Nd:function(u){return Pi(u)&&ii.call(u,"callee")&&!Ed.call(u,"callee")},sn=ae.isArray,kF=h_?Ur(h_):function _A(u){return Pi(u)&&es(u)==Lu};function Js(u){return null!=u&&Up(u.length)&&!Fl(u)}function wi(u){return Pi(u)&&Js(u)}var tl=lF||Zd,Xx=C0?Ur(C0):function mF(u){return Pi(u)&&es(u)==ac};function Np(u){if(!Pi(u))return!1;var f=es(u);return f==pd||f==ME||"string"==typeof u.message&&"string"==typeof u.name&&!eo(u)}function Fl(u){if(!Mi(u))return!1;var f=es(u);return f==Pf||f==o0||f==wE||f==SE}function Bp(u){return"number"==typeof u&&u==un(u)}function Up(u){return"number"==typeof u&&u>-1&&u%1==0&&u<=Ha}function Mi(u){var f=typeof u;return null!=u&&("object"==f||"function"==f)}function Pi(u){return null!=u&&"object"==typeof u}var Ev=Ft?Ur(Ft):function vA(u){return Pi(u)&&Hr(u)==Lo};function _h(u){return"number"==typeof u||Pi(u)&&es(u)==Fu}function eo(u){if(!Pi(u)||es(u)!=Ga)return!1;var f=xs(u);if(null===f)return!0;var _=ii.call(f,"constructor")&&f.constructor;return"function"==typeof _&&_ instanceof _&&Al.call(_)==D0}var zp=Gf?Ur(Gf):function _F(u){return Pi(u)&&es(u)==md},Qx=S0?Ur(S0):function P_(u){return Pi(u)&&Hr(u)==No};function Hp(u){return"string"==typeof u||!sn(u)&&Pi(u)&&es(u)==lc}function As(u){return"symbol"==typeof u||Pi(u)&&es(u)==Of}var Ho=js?Ur(js):function $0(u){return Pi(u)&&Up(u.length)&&!!Ei[es(u)]},Iv=_p(ap),I1=_p(function(u,f){return u<=f});function Rv(u){if(!u)return[];if(Js(u))return Hp(u)?_o(u):Zs(u);if(Qu&&u[Qu])return function eA(X){for(var he,ae=[];!(he=X.next()).done;)ae.push(he.value);return ae}(u[Qu]());var f=Hr(u);return(f==Lo?Yf:f==No?Hn:Ic)(u)}function nl(u){return u?(u=xo(u))===Tn||u===-Tn?(u<0?-1:1)*xE:u==u?u:0:0===u?u:0}function un(u){var f=nl(u),_=f%1;return f==f?_?f-_:f:0}function R1(u){return u?Il(un(u),0,ca):0}function xo(u){if("number"==typeof u)return u;if(As(u))return kf;if(Mi(u)){var f="function"==typeof u.valueOf?u.valueOf():u;u=Mi(f)?f+"":f}if("string"!=typeof u)return 0===u?u:+u;u=$n(u);var _=$a.test(u);return _||tr.test(u)?iF(u.slice(2),_?2:8):LE.test(u)?kf:+u}function Ll(u){return di(u,Ds(u))}function On(u){return null==u?"":Ks(u)}var mt=Dr(function(u,f){if(xp(f)||Js(f))di(f,hr(f),u);else for(var _ in f)ii.call(f,_)&&Xs(u,_,f[_])}),Jx=Dr(function(u,f){di(f,Ds(f),u)}),Nl=Dr(function(u,f,_,w){di(f,Ds(f),u,w)}),il=Dr(function(u,f,_,w){di(f,hr(f),u,w)}),P1=bo(Ju),Tc=pn(function(u,f){u=ai(u);var _=-1,w=f.length,S=w>2?f[2]:z;for(S&&Tr(f[0],f[1],S)&&(w=1);++_1),P}),di(u,W_(u),_),w&&(_=Ms(_,Si|ms|Gs,ya));for(var S=f.length;S--;)sh(_,f[S]);return _}),G1=bo(function(u,f){return null==u?{}:function Y0(u,f){return q0(u,f,function(_,w){return Lv(u,w)})}(u,f)});function Nv(u,f){if(null==u)return{};var _=gi(W_(u),function(w){return[w]});return f=Nt(f),q0(u,_,function(w,S){return f(w,S[0])})}var iw=lh(hr),Bv=lh(Ds);function Ic(u){return null==u?[]:qu(u,hr(u))}var V=Gd(function(u,f,_){return f=f.toLowerCase(),u+(_?Uv(f):f)});function Uv(u){return Xd(On(u).toLowerCase())}function Vv(u){return(u=On(u))&&u.replace(mo,QE).replace(KO,"")}var tD=Gd(function(u,f,_){return u+(_?"-":"")+f.toLowerCase()}),sw=Gd(function(u,f,_){return u+(_?" ":"")+f.toLowerCase()}),nD=Hd("toLowerCase"),zv=Gd(function(u,f,_){return u+(_?"_":"")+f.toLowerCase()}),sD=Gd(function(u,f,_){return u+(_?" ":"")+Xd(f)}),cw=Gd(function(u,f,_){return u+(_?" ":"")+f.toUpperCase()}),Xd=Hd("toUpperCase");function dw(u,f,_){return u=On(u),(f=_?z:f)===z?function en(X){return YE.test(X)}(u)?function fn(X){return X.match(ZO)||[]}(u):function ZE(X){return X.match(PE)||[]}(u):u.match(f)||[]}var Gv=pn(function(u,f){try{return _s(u,z,f)}catch(_){return Np(_)?_:new jt(_)}}),cD=bo(function(u,f){return In(f,function(_){_=Vo(_),Uo(u,_,Ec(u[_],u))}),u});function $v(u){return function(){return u}}var uw=Cs(),fD=Cs(!0);function is(u){return u}function Gp(u){return O_("function"==typeof u?u:Ms(u,Si))}var jv=pn(function(u,f){return function(_){return ma(_,u,f)}}),pD=pn(function(u,f){return function(_){return ma(u,_,f)}});function hw(u,f,_){var w=hr(f),S=pa(f,w);null==_&&(!Mi(f)||!S.length&&w.length)&&(_=f,f=u,u=this,S=pa(f,hr(f)));var P=!(Mi(_)&&"chain"in _&&!_.chain),G=Fl(u);return In(S,function(Y){var Q=f[Y];u[Y]=Q,G&&(u.prototype[Y]=function(){var _e=this.__chain__;if(P||_e){var ye=u(this.__wrapped__);return(ye.__actions__=Zs(this.__actions__)).push({func:Q,args:arguments,thisArg:u}),ye.__chain__=_e,ye}return Q.apply(u,El([this.value()],arguments))})}),u}function wo(){}var fw=mp(gi),gD=mp(XE),_D=mp($f);function vh(u){return dx(u)?p_(Vo(u)):function ga(u){return function(f){return mc(f,u)}}(u)}var Yv=tx(),yh=tx(!0);function bh(){return[]}function Zd(){return!1}var vD=z_(function(u,f){return u+f},0),yD=H_("ceil"),gw=z_(function(u,f){return u/f},1),bD=H_("floor"),CD=z_(function(u,f){return u*f},1),HF=H_("round"),Qv=z_(function(u,f){return u-f},0);return I.after=function m1(u,f){if("function"!=typeof f)throw new Er(Un);return u=un(u),function(){if(--u<1)return f.apply(this,arguments)}},I.ary=gh,I.assign=mt,I.assignIn=Jx,I.assignInWith=Nl,I.assignWith=il,I.at=P1,I.before=wa,I.bind=Ec,I.bindAll=cD,I.bindKey=vv,I.castArray=function y1(){if(!arguments.length)return[];var u=arguments[0];return sn(u)?u:[u]},I.chain=Nx,I.chunk=function J_(u,f,_){f=(_?Tr(u,f,_):f===z)?1:ur(un(f),0);var w=null==u?0:u.length;if(!w||f<1)return[];for(var S=0,P=0,G=ae(y_(w/f));SS?0:S+_),(w=w===z||w>S?S:un(w))<0&&(w+=S),w=_>w?0:R1(w);_>>0)?(u=On(u))&&("string"==typeof f||null!=f&&!zp(f))&&!(f=Ks(f))&&Md(u)?xc(_o(u),0,_):u.split(f,_):[]},I.spread=function jx(u,f){if("function"!=typeof u)throw new Er(Un);return f=null==f?0:ur(un(f),0),pn(function(_){var w=_[f],S=xc(_,0,f);return w&&El(S,w),_s(u,this,S)})},I.tail=function Sc(u){var f=null==u?0:u.length;return f?ts(u,1,f):[]},I.take=function Ix(u,f,_){return u&&u.length?ts(u,0,(f=_||f===z?1:un(f))<0?0:f):[]},I.takeRight=function Rx(u,f,_){var w=null==u?0:u.length;return w?ts(u,(f=w-(f=_||f===z?1:un(f)))<0?0:f,w):[]},I.takeRightWhile=function qA(u,f){return u&&u.length?oh(u,Nt(f,3),!1,!0):[]},I.takeWhile=function AF(u,f){return u&&u.length?oh(u,Nt(f,3)):[]},I.tap=function ZA(u,f){return f(u),u},I.throttle=function Op(u,f,_){var w=!0,S=!0;if("function"!=typeof u)throw new Er(Un);return Mi(_)&&(w="leading"in _?!!_.leading:w,S="trailing"in _?!!_.trailing:S),g1(u,f,{leading:w,maxWait:f,trailing:S})},I.thru=Tp,I.toArray=Rv,I.toPairs=iw,I.toPairsIn=Bv,I.toPath=function mw(u){return sn(u)?gi(u,Vo):As(u)?[u]:Zs(mx(On(u)))},I.toPlainObject=Ll,I.transform=function j1(u,f,_){var w=sn(u),S=w||tl(u)||Ho(u);if(f=Nt(f,4),null==_){var P=u&&u.constructor;_=S?w?new P:[]:Mi(u)&&Fl(P)?kd(xs(u)):{}}return(S?In:ki)(u,function(G,Y,Q){return f(_,G,Y,Q)}),_},I.unary=function Yx(u){return gh(u,1)},I.union=Ep,I.unionBy=XA,I.unionWith=kx,I.uniq=function Px(u){return u&&u.length?ri(u):[]},I.uniqBy=function Ox(u,f){return u&&u.length?ri(u,Nt(f,2)):[]},I.uniqWith=function dv(u,f){return f="function"==typeof f?f:z,u&&u.length?ri(u,z,f):[]},I.unset=function Y1(u,f){return null==u||sh(u,f)},I.unzip=Ap,I.unzipWith=ph,I.update=function q1(u,f,_){return null==u?u:Q0(u,f,up(_))},I.updateWith=function X1(u,f,_,w){return w="function"==typeof w?w:z,null==u?u:Q0(u,f,up(_),w)},I.values=Ic,I.valuesIn=function K1(u){return null==u?[]:qu(u,Ds(u))},I.without=Dp,I.words=dw,I.wrap=function Cv(u,f){return Mv(up(f),u)},I.xor=Fx,I.xorBy=uv,I.xorWith=hv,I.zip=fv,I.zipObject=function mh(u,f){return bc(u||[],f||[],Xs)},I.zipObjectDeep=function KA(u,f){return bc(u||[],f||[],Ud)},I.zipWith=Lx,I.entries=iw,I.entriesIn=Bv,I.extend=Jx,I.extendWith=Nl,hw(I,I),I.add=vD,I.attempt=Gv,I.camelCase=V,I.capitalize=Uv,I.ceil=yD,I.clamp=function Z1(u,f,_){return _===z&&(_=f,f=z),_!==z&&(_=(_=xo(_))==_?_:0),f!==z&&(f=(f=xo(f))==f?f:0),Il(xo(u),f,_)},I.clone=function Xn(u){return Ms(u,Gs)},I.cloneDeep=function x1(u){return Ms(u,Si|Gs)},I.cloneDeepWith=function Fp(u,f){return Ms(u,Si|Gs,f="function"==typeof f?f:z)},I.cloneWith=function b1(u,f){return Ms(u,Gs,f="function"==typeof f?f:z)},I.conformsTo=function qx(u,f){return null==f||D_(u,f,hr(f))},I.deburr=Vv,I.defaultTo=function hD(u,f){return null==u||u!=u?f:u},I.divide=gw,I.endsWith=function J1(u,f,_){u=On(u),f=Ks(f);var w=u.length,S=_=_===z?w:Il(un(_),0,w);return(_-=f.length)>=0&&u.slice(_,S)==f},I.eq=zo,I.escape=function eD(u){return(u=On(u))&&RE.test(u)?u.replace(c0,st):u},I.escapeRegExp=function rw(u){return(u=On(u))&&f0.test(u)?u.replace(n_,"\\$&"):u},I.every=function mv(u,f,_){var w=sn(u)?XE:z0;return _&&Tr(u,f,_)&&(f=z),w(u,Nt(f,3))},I.find=Vx,I.findIndex=xx,I.findKey=function kv(u,f){return ee(u,Nt(f,3),ki)},I.findLast=Rp,I.findLastIndex=tv,I.findLastKey=function Pv(u,f){return ee(u,Nt(f,3),I_)},I.floor=bD,I.forEach=_v,I.forEachRight=Ol,I.forIn=function L1(u,f){return null==u?u:Qa(u,Nt(f,3),Ds)},I.forInRight=function Ov(u,f){return null==u?u:Di(u,Nt(f,3),Ds)},I.forOwn=function rl(u,f){return u&&ki(u,Nt(f,3))},I.forOwnRight=function N1(u,f){return u&&I_(u,Nt(f,3))},I.get=Fv,I.gt=w1,I.gte=M1,I.has=function V1(u,f){return null!=u&&ax(u,f,rp)},I.hasIn=Lv,I.head=Mx,I.identity=is,I.includes=function r1(u,f,_,w){u=Js(u)?u:Ic(u),_=_&&!w?un(_):0;var S=u.length;return _<0&&(_=ur(S+_,0)),Hp(u)?_<=S&&u.indexOf(f,_)>-1:!!S&&Lt(u,f,_)>-1},I.indexOf=function fh(u,f,_){var w=null==u?0:u.length;if(!w)return-1;var S=null==_?0:un(_);return S<0&&(S=ur(w+S,0)),Lt(u,f,S)},I.inRange=function Q1(u,f,_){return f=nl(f),_===z?(_=f,f=0):_=nl(_),function R_(u,f,_){return u>=Zr(f,_)&&u=-Ha&&u<=Ha},I.isSet=Qx,I.isString=Hp,I.isSymbol=As,I.isTypedArray=Ho,I.isUndefined=function A1(u){return u===z},I.isWeakMap=function D1(u){return Pi(u)&&Hr(u)==gd},I.isWeakSet=function T1(u){return Pi(u)&&"[object WeakSet]"==es(u)},I.join=function Cx(u,f){return null==u?"":cF.call(u,f)},I.kebabCase=tD,I.last=Ir,I.lastIndexOf=function ov(u,f,_){var w=null==u?0:u.length;if(!w)return-1;var S=w;return _!==z&&(S=(S=un(_))<0?ur(w+S,0):Zr(S,w-1)),f==f?function Cd(X,he,ae){for(var Ue=ae+1;Ue--;)if(X[Ue]===he)return Ue;return Ue}(u,f,S):Yu(u,jf,S,!0)},I.lowerCase=sw,I.lowerFirst=nD,I.lt=Iv,I.lte=I1,I.max=function _w(u){return u&&u.length?Fd(u,is,Ld):z},I.maxBy=function vw(u,f){return u&&u.length?Fd(u,Nt(f,2),Ld):z},I.mean=function xD(u){return wd(u,is)},I.meanBy=function wD(u,f){return wd(u,Nt(f,2))},I.min=function to(u){return u&&u.length?Fd(u,is,ap):z},I.minBy=function MD(u,f){return u&&u.length?Fd(u,Nt(f,2),ap):z},I.stubArray=bh,I.stubFalse=Zd,I.stubObject=function pw(){return{}},I.stubString=function qv(){return""},I.stubTrue=function Xv(){return!0},I.multiply=CD,I.nth=function Sx(u,f){return u&&u.length?bA(u,un(f)):z},I.noConflict=function E(){return Sr._===this&&(Sr._=Xf),this},I.noop=wo,I.now=Pp,I.pad=function iD(u,f,_){u=On(u);var w=(f=un(f))?dr(u):0;if(!f||w>=f)return u;var S=(f-w)/2;return gp(b_(S),_)+u+gp(y_(S),_)},I.padEnd=function LF(u,f,_){u=On(u);var w=(f=un(f))?dr(u):0;return f&&wf){var w=u;u=f,f=w}if(_||u%1||f%1){var S=x_();return Zr(u+S*(f-u+Re("1e-"+((S+"").length-1))),f)}return ih(u,f)},I.reduce=function a1(u,f,_){var w=sn(u)?f_:E0,S=arguments.length<3;return w(u,Nt(f,4),_,S,Za)},I.reduceRight=function l1(u,f,_){var w=sn(u)?KE:E0,S=arguments.length<3;return w(u,Nt(f,4),_,S,T_)},I.repeat=function $i(u,f,_){return f=(_?Tr(u,f,_):f===z)?1:un(f),rh(On(u),f)},I.replace=function rD(){var u=arguments,f=On(u[0]);return u.length<3?f:f.replace(u[1],u[2])},I.result=function $1(u,f,_){var w=-1,S=(f=va(f,u)).length;for(S||(S=1,u=z);++wHa)return[];var _=ca,w=Zr(u,ca);f=Nt(f),u-=ca;for(var S=Ys(w,f);++_=P)return u;var Y=_-dr(w);if(Y<1)return w;var Q=G?xc(G,0,Y).join(""):u.slice(0,Y);if(S===z)return Q+w;if(G&&(Y+=Q.length-Y),zp(S)){if(u.slice(Y).search(S)){var _e,ye=Q;for(S.global||(S=uc(S.source,On(_0.exec(S))+"g")),S.lastIndex=0;_e=S.exec(ye);)var be=_e.index;Q=Q.slice(0,be===z?Y:be)}}else if(u.indexOf(Ks(S),Y)!=Y){var Xe=Q.lastIndexOf(S);Xe>-1&&(Q=Q.slice(0,Xe))}return Q+w},I.unescape=function lD(u){return(u=On(u))&&IE.test(u)?u.replace(l0,qf):u},I.uniqueId=function Zv(u){var f=++bi;return On(u)+f},I.upperCase=cw,I.upperFirst=Xd,I.each=_v,I.eachRight=Ol,I.first=Mx,hw(I,function(){var u={};return ki(I,function(f,_){ii.call(I.prototype,_)||(u[_]=f)}),u}(),{chain:!1}),I.VERSION="4.17.21",In(["bind","bindKey","curry","curryRight","partial","partialRight"],function(u){I[u].placeholder=I}),In(["drop","take"],function(u,f){Rn.prototype[u]=function(_){_=_===z?1:ur(un(_),0);var w=this.__filtered__&&!f?new Rn(this):this.clone();return w.__filtered__?w.__takeCount__=Zr(_,w.__takeCount__):w.__views__.push({size:Zr(_,ca),type:u+(w.__dir__<0?"Right":"")}),w},Rn.prototype[u+"Right"]=function(_){return this.reverse()[u](_).reverse()}}),In(["filter","map","takeWhile"],function(u,f){var _=f+1,w=1==_||3==_;Rn.prototype[u]=function(S){var P=this.clone();return P.__iteratees__.push({iteratee:Nt(S,3),type:_}),P.__filtered__=P.__filtered__||w,P}}),In(["head","last"],function(u,f){var _="take"+(f?"Right":"");Rn.prototype[u]=function(){return this[_](1).value()[0]}}),In(["initial","tail"],function(u,f){var _="drop"+(f?"":"Right");Rn.prototype[u]=function(){return this.__filtered__?new Rn(this):this[_](1)}}),Rn.prototype.compact=function(){return this.filter(is)},Rn.prototype.find=function(u){return this.filter(u).head()},Rn.prototype.findLast=function(u){return this.reverse().find(u)},Rn.prototype.invokeMap=pn(function(u,f){return"function"==typeof u?new Rn(this):this.map(function(_){return ma(_,u,f)})}),Rn.prototype.reject=function(u){return this.filter(wv(Nt(u)))},Rn.prototype.slice=function(u,f){u=un(u);var _=this;return _.__filtered__&&(u>0||f<0)?new Rn(_):(u<0?_=_.takeRight(-u):u&&(_=_.drop(u)),f!==z&&(_=(f=un(f))<0?_.dropRight(-f):_.take(f-u)),_)},Rn.prototype.takeRightWhile=function(u){return this.reverse().takeWhile(u).reverse()},Rn.prototype.toArray=function(){return this.take(ca)},ki(Rn.prototype,function(u,f){var _=/^(?:filter|find|map|reject)|While$/.test(f),w=/^(?:head|last)$/.test(f),S=I[w?"take"+("last"==f?"Right":""):f],P=w||/^find/.test(f);S&&(I.prototype[f]=function(){var G=this.__wrapped__,Y=w?[1]:arguments,Q=G instanceof Rn,_e=Y[0],ye=Q||sn(G),be=function(En){var Fn=S.apply(I,El([En],Y));return w&&Xe?Fn[0]:Fn};ye&&_&&"function"==typeof _e&&1!=_e.length&&(Q=ye=!1);var Xe=this.__chain__,Vt=P&&!Xe,mn=Q&&!this.__actions__.length;if(!P&&ye){G=mn?G:new Rn(this);var zt=u.apply(G,Y);return zt.__actions__.push({func:Tp,args:[be],thisArg:z}),new Ai(zt,Xe)}return Vt&&mn?u.apply(this,Y):(zt=this.thru(be),Vt?w?zt.value()[0]:zt.value():zt)})}),In(["pop","push","shift","sort","splice","unshift"],function(u){var f=nr[u],_=/^(?:push|sort|unshift)$/.test(u)?"tap":"thru",w=/^(?:pop|shift)$/.test(u);I.prototype[u]=function(){var S=arguments;if(w&&!this.__chain__){var P=this.value();return f.apply(sn(P)?P:[],S)}return this[_](function(G){return f.apply(sn(G)?G:[],S)})}}),ki(Rn.prototype,function(u,f){var _=I[f];if(_){var w=_.name+"";ii.call(Id,w)||(Id[w]=[]),Id[w].push({name:f,func:_})}}),Id[$d(z,cr).name]=[{name:"wrapper",func:z}],Rn.prototype.clone=function O0(){var u=new Rn(this.__wrapped__);return u.__actions__=Zs(this.__actions__),u.__dir__=this.__dir__,u.__filtered__=this.__filtered__,u.__iteratees__=Zs(this.__iteratees__),u.__takeCount__=this.__takeCount__,u.__views__=Zs(this.__views__),u},Rn.prototype.reverse=function Pd(){if(this.__filtered__){var u=new Rn(this);u.__dir__=-1,u.__filtered__=!0}else(u=this.clone()).__dir__*=-1;return u},Rn.prototype.value=function ws(){var u=this.__wrapped__.value(),f=this.__dir__,_=sn(u),w=f<0,S=_?u.length:0,P=function bp(u,f,_){for(var w=-1,S=_.length;++w=this.__values__.length;return{done:u,value:u?z:this.__values__[this.__index__++]}},I.prototype.plant=function QA(u){for(var f,_=this;_ instanceof fc;){var w=ns(_);w.__index__=0,w.__values__=z,f?S.__wrapped__=w:f=w;var S=w;_=_.__wrapped__}return S.__wrapped__=u,f},I.prototype.reverse=function JA(){var u=this.__wrapped__;if(u instanceof Rn){var f=u;return this.__actions__.length&&(f=new Rn(this)),(f=f.reverse()).__actions__.push({func:Tp,args:[av],thisArg:z}),new Ai(f,this.__chain__)}return this.thru(av)},I.prototype.toJSON=I.prototype.valueOf=I.prototype.value=function DF(){return _a(this.__wrapped__,this.__actions__)},I.prototype.first=I.prototype.head,Qu&&(I.prototype[Qu]=function Wd(){return this}),I}();Sr._=ys,(dn=function(){return ys}.call(zs,ps,zs,Oo))!==z&&(Oo.exports=dn)}.call(this)},738:function(Oo){var zs;Oo.exports=((zs=function(){function ps(Ci){return Br.appendChild(Ci.dom),Ci}function dn(Ci){for(var Si=0;SiQt+1e3&&(xl.update(1e3*Un/(Ci-Qt),100),Qt=Ci,Un=0,Hs)){var Si=performance.memory;Hs.update(Si.usedJSHeapSize/1048576,Si.jsHeapSizeLimit/1048576)}return Ci},update:function(){Kr=this.end()},domElement:Br,setMode:dn}}).Panel=function(ps,dn,z){var Br=1/0,Kr=0,Qt=Math.round,Un=Qt(window.devicePixelRatio||1),xl=80*Un,Ua=48*Un,Hs=3*Un,Ci=2*Un,Si=3*Un,ms=15*Un,Gs=74*Un,$s=30*Un,Fo=document.createElement("canvas");Fo.width=xl,Fo.height=Ua,Fo.style.cssText="width:80px;height:48px";var Pn=Fo.getContext("2d");return Pn.font="bold "+9*Un+"px Helvetica,Arial,sans-serif",Pn.textBaseline="top",Pn.fillStyle=z,Pn.fillRect(0,0,xl,Ua),Pn.fillStyle=dn,Pn.fillText(ps,Hs,Ci),Pn.fillRect(Si,ms,Gs,$s),Pn.fillStyle=z,Pn.globalAlpha=.9,Pn.fillRect(Si,ms,Gs,$s),{dom:Fo,update:function(cr,oc){Br=Math.min(Br,cr),Kr=Math.max(Kr,cr),Pn.fillStyle=z,Pn.globalAlpha=1,Pn.fillRect(0,0,xl,ms),Pn.fillStyle=dn,Pn.fillText(Qt(cr)+" "+ps+" ("+Qt(Br)+"-"+Qt(Kr)+")",Hs,Ci),Pn.drawImage(Fo,Si+Un,ms,Gs-Un,$s,Si,ms,Gs-Un,$s),Pn.fillRect(Si+Gs-Un,ms,Un,$s),Pn.fillStyle=z,Pn.globalAlpha=.9,Pn.fillRect(Si+Gs-Un,ms,Un,Qt((1-cr/oc)*$s))}}},zs)}},Oo=>{Oo(Oo.s=651)}]); \ No newline at end of file diff --git a/frontend/src/app/app.module.ts b/frontend/src/app/app.module.ts index a864706..891cbe8 100644 --- a/frontend/src/app/app.module.ts +++ b/frontend/src/app/app.module.ts @@ -40,12 +40,8 @@ import { MatProgressSpinnerModule } from '@angular/material/progress-spinner'; import { MatMenuModule } from '@angular/material/menu'; import { TriMapBlockUiComponent } from './components/editor/eac/tri-map.block-ui/tri-map.block-ui.component'; import { TrkMapBlockUiComponent } from './components/editor/eac/trk-map.block-ui/trk-map.block-ui.component'; -import { - RunCustomActionDialogComponent, -} from './components/run-custom-action.dialog/run-custom-action.dialog.component'; -import { - OripGeometryBlockUiComponent, -} from './components/editor/eac/orip-geometry.block-ui/orip-geometry.block-ui.component'; +import { RunCustomActionDialogComponent } from './components/run-custom-action.dialog/run-custom-action.dialog.component'; +import { OripGeometryBlockUiComponent } from './components/editor/eac/orip-geometry.block-ui/orip-geometry.block-ui.component'; import { MinimapComponent } from './components/editor/common/minimap/minimap.component'; import { DelegateBlockUiComponent } from './components/editor/library/delegate.block-ui/delegate.block-ui.component'; import { MatOptionModule } from '@angular/material/core'; @@ -53,13 +49,9 @@ import { FenceTypeBlockUiComponent } from './components/editor/eac/fence-type.bl import { BlockActionsComponent } from './components/editor/common/block-actions/block-actions.component'; import { SoundbankBlockUiComponent } from './components/editor/eac/soundbank.block-ui/soundbank.block-ui.component'; import { EacsAudioBlockUiComponent } from './components/editor/eac/eacs-audio.block-ui/eacs-audio.block-ui.component'; -import { - GeoGeometryBlockUiComponent, -} from './components/editor/eac/geo-geometry.block-ui/geo-geometry.block-ui.component'; +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 { BaseArchiveBlockUiComponent } from './components/editor/eac/base-archive.block-ui/base-archive.block-ui.component'; import { MAT_COLOR_FORMATS, NGX_MAT_COLOR_FORMATS, @@ -133,5 +125,4 @@ import { HexEditorModule } from 'ngx-hex-editor'; ], bootstrap: [AppComponent], }) -export class AppModule { -} +export class AppModule {} diff --git a/frontend/src/app/components/editor/editor.component.ts b/frontend/src/app/components/editor/editor.component.ts index f3827f0..71822e6 100644 --- a/frontend/src/app/components/editor/editor.component.ts +++ b/frontend/src/app/components/editor/editor.component.ts @@ -182,8 +182,7 @@ export class EditorComponent implements OnDestroy { } } - constructor(readonly mainService: MainService, - private readonly deep: NgxDeepEqualsPureService) {} + constructor(readonly mainService: MainService, private readonly deep: NgxDeepEqualsPureService) {} ngOnDestroy(): void { this.destroyed$.next(); From e9bd2079114202685a7c508494f996e683a171be Mon Sep 17 00:00:00 2001 From: andy Date: Thu, 9 Jan 2025 23:34:01 +0200 Subject: [PATCH 15/36] fixed shpi save problem --- library/context.py | 8 ++++---- library/read_blocks/smart_fields.py | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/library/context.py b/library/context.py index 48fb49c..f4a0f07 100644 --- a/library/context.py +++ b/library/context.py @@ -9,7 +9,7 @@ def ctx_path(self): def __init__(self, name: str = '', data=None, block=None, parent=None): self.name = name self._data = data - self._block = block + self.block = block self.parent = parent self.children = [] if self.parent: @@ -27,12 +27,12 @@ def data(self, local_path: str): entry = entry[p] return entry - def block(self, local_path: str): + def relative_block(self, local_path: str): block_path = local_path.split('/') - entry = self._block + entry = self.block for p in block_path: if p == '..': - return self.parent.block('/'.join(block_path[1:])) + return self.parent.relative_block('/'.join(block_path[1:])) entry = entry.get_child_block(p) return entry diff --git a/library/read_blocks/smart_fields.py b/library/read_blocks/smart_fields.py index 22ae9f0..9f549d1 100644 --- a/library/read_blocks/smart_fields.py +++ b/library/read_blocks/smart_fields.py @@ -140,7 +140,7 @@ def detect(self, ctx, name=None): def _enum_lookup(ctx, enum_field, fallback_index): try: - return [name for (_, name) in ctx.block(enum_field).enum_names].index(ctx.data(enum_field)) + return [name for (_, name) in ctx.relative_block(enum_field).enum_names].index(ctx.data(enum_field)) except Exception: if settings.print_errors: traceback.print_exc() From c1b8f194b7ad1922033d8474b63581652b83cc99 Mon Sep 17 00:00:00 2001 From: andy Date: Fri, 17 Jan 2025 14:29:36 +0200 Subject: [PATCH 16/36] abstractizing 3d scenes exporters --- library/read_blocks/smart_fields.py | 3 +- .../common/three_d_scenes.py | 104 +++++++++++++++ serializers/geometries.py | 125 +++++------------- serializers/maps.py | 72 +++++----- 4 files changed, 171 insertions(+), 133 deletions(-) rename library/utils/meshes.py => serializers/common/three_d_scenes.py (55%) diff --git a/library/read_blocks/smart_fields.py b/library/read_blocks/smart_fields.py index 9f549d1..b3209c0 100644 --- a/library/read_blocks/smart_fields.py +++ b/library/read_blocks/smart_fields.py @@ -151,7 +151,8 @@ class EnumLookupDelegateBlock(DelegateBlock): def __init__(self, enum_field: str, blocks: List[DataBlock], **kwargs): super().__init__(possible_blocks=blocks, - choice_index=lambda ctx, **_: _enum_lookup(ctx, enum_field, len(blocks) - 1), + choice_index=(lambda ctx, **_: _enum_lookup(ctx, enum_field, len(blocks) - 1), + f'According to enum {enum_field}'), **kwargs) self.enum_field = enum_field diff --git a/library/utils/meshes.py b/serializers/common/three_d_scenes.py similarity index 55% rename from library/utils/meshes.py rename to serializers/common/three_d_scenes.py index 45f9829..c3e5c73 100644 --- a/library/utils/meshes.py +++ b/serializers/common/three_d_scenes.py @@ -1,7 +1,13 @@ +import json import math +import os from abc import ABC, abstractmethod +from string import Template +from typing import Callable from typing import Tuple, List +from library.utils.blender_scripts import run_blender, get_blender_save_script + class BaseMesh(ABC): def __init__(self): @@ -130,3 +136,101 @@ def to_obj(self, face_index_increment, mtllib=None, pivot_offset=None) -> Tuple[ obj_texts.append(obj) face_index_increment += fii return '\n\n'.join(obj_texts), face_index_increment + + +class Scene: + sub_meshes: List[SubMesh] = [] + name: str = 'scene' + obj_name: str = 'geometry' + mtl_name: str = 'material' + external_mtl: bool = False + mtl_texture_names: List[str] = [] + mtl_texture_path_func: Callable[[str], str] = lambda x: x + dummies = [] + + +# TODO support existing map export logic here and use it +def export_scenes(scenes: List[Scene], output_path: str, settings): + mtl_entry_template = Template(""" + +newmtl $texture_name +Ka 1.000000 1.000000 1.000000 +Kd 1.000000 1.000000 1.000000 +Ks 0.000000 0.000000 0.000000 +illum 1 +Ns 0.000000 +map_Kd $texture_path""") + + import_template = Template(""" +import json +bpy.ops.wm.read_factory_settings(use_empty=True) +bpy.ops.import_scene.obj(filepath="$obj_file_path", axis_forward='Y', axis_up='Z') + +dummies = json.loads('$dummies') or [] +for dummy in dummies: + o = bpy.data.objects.new( dummy['name'], None ) + bpy.context.scene.collection.objects.link(o) + o.location = dummy.get('position', [0, 0, 0]) + o.rotation_mode = 'QUATERNION' + o.rotation_quaternion = Euler(tuple(dummy.get('rotation', [0, 0, 0])), 'XYZ').to_quaternion() + dummy_props = dummy.get('properties', {}) + for key, value in dummy_props.items(): + o[key] = value + +curves = json.loads('$curves') or [] +for curve in curves: + curveData = bpy.data.curves.new(curve['name'], type='CURVE') + curveData.dimensions = '3D' + curveData.resolution_u = 2 + polyline = curveData.splines.new('POLY') + polyline.points.add(len(curve['points']) - 1) + for i, [x,y,z] in enumerate(curve['points']): + polyline.points[i].co = (x, y, z, 1) + polyline.use_cyclic_u = curve.get('closed', False) + curveOB = bpy.data.objects.new(curve['name'], curveData) + bpy.context.collection.objects.link(curveOB) + curve_props = curve.get('properties', {}) + for (key, value) in curve_props.items(): + curveOB[key] = value + """) + + for scene in scenes: + with open(os.path.join(output_path, f'{scene.obj_name}.obj'), 'w') as f: + if scene.mtl_name: + f.write(f'mtllib {scene.mtl_name}.mtl') + face_index_increment = 1 + for sub_model in scene.sub_meshes: + obj, fii = sub_model.to_obj(face_index_increment) + f.write(obj) + face_index_increment += fii + if scene.mtl_name and not scene.external_mtl: + with open(os.path.join(output_path, f'{scene.mtl_name}.mtl'), 'w') as f: + for texture_name in scene.mtl_texture_names: + f.write(mtl_entry_template.substitute({ + 'texture_name': texture_name, + 'texture_path': scene.mtl_texture_path_func(texture_name), + })) + + if settings.geometry__export_to_gg_web_engine or settings.geometry__save_blend: + script = '' + for scene in scenes: + script += '\n\n' + import_template.substitute({ + 'obj_file_path': f'{scene.obj_name}.obj', + 'dummies': json.dumps(scene.dummies), + 'curves': json.dumps([]), + }) + if settings.geometry__export_to_gg_web_engine: + from serializers.misc.build_blender_scene import construct_blender_export_script + script += '\n' + construct_blender_export_script( + file_name=os.path.join(os.getcwd(), output_path, scene.name), + export_materials='EXPORT') + if settings.geometry__save_blend: + script += '\n\n' + get_blender_save_script( + out_blend_name=os.path.join(os.getcwd(), output_path, scene.name)) + run_blender(path=output_path, script=script) + + if not settings.geometry__save_obj: + for scene in scenes: + os.unlink(os.path.join(output_path, scene.obj_name + '.obj')) + if scene.mtl_name and not scene.external_mtl: + os.unlink(os.path.join(output_path, scene.mtl_name + '.mtl')) diff --git a/serializers/geometries.py b/serializers/geometries.py index 4069906..f5712fe 100644 --- a/serializers/geometries.py +++ b/serializers/geometries.py @@ -1,55 +1,12 @@ -import json import os from collections import defaultdict from os.path import join -from string import Template from library.exceptions import DataIntegrityException -from library.utils.blender_scripts import run_blender -from library.utils.meshes import SubMesh, Mesh from resources.eac.archives import ShpiBlock from resources.eac.bitmaps import AnyBitmapBlock from serializers import BaseFileSerializer - - -class ObjExporter: - blender_script = Template(""" -import json -bpy.ops.wm.read_factory_settings(use_empty=True) -bpy.ops.wm.obj_import(filepath="$obj_file_path", forward_axis='Y', up_axis='Z') - -dummies = json.loads('$dummies') -for dummy in dummies: - o = bpy.data.objects.new( dummy['name'], None ) - bpy.context.scene.collection.objects.link(o) - o.location = dummy['position'] - for key, value in dummy.items(): - if key in ['position', 'name']: - continue - o[key] = value - - """) - - def handle_obj(self, settings, path, obj_name='geometry.obj', mtl_name='material.mtl', dummies=None): - if dummies is None: - dummies = [] - script = self.blender_script.substitute({'obj_file_path': obj_name, - 'dummies': json.dumps(dummies)}) - if settings.geometry__export_to_gg_web_engine: - from serializers.misc.build_blender_scene import construct_blender_export_script - script += '\n' + construct_blender_export_script( - file_name=os.path.join(os.getcwd(), path, 'body'), - export_materials='EXPORT') - # skip running blender if it does not save anything - if settings.geometry__export_to_gg_web_engine or settings.geometry__save_blend: - run_blender(path=path, - script=script, - out_blend_name=os.path.join(os.getcwd(), path, 'body') - if settings.geometry__save_blend - else None) - if not settings.geometry__save_obj: - os.unlink(os.path.join(path, mtl_name)) - os.unlink(os.path.join(path, obj_name)) +from serializers.common.three_d_scenes import SubMesh, Mesh, export_scenes, Scene class OripGeometrySerializer(BaseFileSerializer): @@ -164,30 +121,24 @@ def _setup_polygon(offsets): def serialize(self, data: dict, path: str, id=None, block=None, **kwargs): super().serialize(data, path) shpi_id, textures_shpi_block, textures_shpi_data, sub_models = self.build_mesh(data, id) - with open(os.path.join(path, 'geometry.obj'), 'w') as f: - f.write('mtllib material.mtl') - face_index_increment = 1 - for sub_model in sub_models.values(): - obj, fii = sub_model.to_obj(face_index_increment) - f.write(obj) - face_index_increment += fii - with open(os.path.join(path, 'material.mtl'), 'w') as f: - for i, texture_name in enumerate(textures_shpi_data['children_aliases']): - texture_block = textures_shpi_block.field_blocks_map['children'].child.possible_blocks[ - textures_shpi_data['children'][i]['choice_index']] - if not isinstance(texture_block, AnyBitmapBlock): - continue - f.write(f"""\n\nnewmtl {texture_name} -Ka 1.000000 1.000000 1.000000 -Kd 1.000000 1.000000 1.000000 -Ks 0.000000 0.000000 0.000000 -illum 1 -Ns 0.000000 -map_Kd assets/{texture_name}.png""") + + scene = Scene() + scene.sub_meshes = [sm for sm in sub_models.values()] + scene.name = 'body' + scene.obj_name = 'geometry' + scene.mtl_name = 'material' + for i, texture_name in enumerate(textures_shpi_data['children_aliases']): + texture_block = textures_shpi_block.field_blocks_map['children'].child.possible_blocks[ + textures_shpi_data['children'][i]['choice_index']] + if not isinstance(texture_block, AnyBitmapBlock): + continue + scene.mtl_texture_names.append(texture_name) + scene.mtl_texture_path_func = lambda name: f'assets/{name}.png' + from serializers import ShpiArchiveSerializer - shpi_serializer = ShpiArchiveSerializer() - shpi_serializer.serialize(textures_shpi_data, os.path.join(path, 'assets/'), shpi_id, textures_shpi_block) - ObjExporter().handle_obj(settings=self.settings, path=path) + ShpiArchiveSerializer().serialize(textures_shpi_data, os.path.join(path, 'assets/'), shpi_id, + textures_shpi_block) + export_scenes([scene], path, self.settings) class GeoGeometrySerializer(BaseFileSerializer): @@ -259,27 +210,21 @@ def serialize(self, data: dict, path: str, id=None, block=None, **kwargs): mesh.change_axes(new_z='y', new_y='z') px, py, pz = mesh.pivot_offset mesh.pivot_offset = (px, pz, py) - with open(os.path.join(path, 'geometry.obj'), 'w') as f: - f.write('mtllib material.mtl') - face_index_increment = 1 - for mesh in meshes: - obj, fii = mesh.to_obj(face_index_increment) - f.write(obj) - face_index_increment += fii - with open(os.path.join(path, 'material.mtl'), 'w') as f: - for i, texture_name in enumerate(textures_shpi_data['children_aliases']): - texture_block = textures_shpi_block.field_blocks_map['children'].child.possible_blocks[ - textures_shpi_data['children'][i]['choice_index']] - if not isinstance(texture_block, AnyBitmapBlock): - continue - f.write(f"""\n\nnewmtl {texture_name} -Ka 1.000000 1.000000 1.000000 -Kd 1.000000 1.000000 1.000000 -Ks 0.000000 0.000000 0.000000 -illum 1 -Ns 0.000000 -map_Kd assets/{texture_name}.png""") + + scene = Scene() + scene.sub_meshes = meshes + scene.name = 'body' + scene.obj_name = 'geometry' + scene.mtl_name = 'material' + for i, texture_name in enumerate(textures_shpi_data['children_aliases']): + texture_block = textures_shpi_block.field_blocks_map['children'].child.possible_blocks[ + textures_shpi_data['children'][i]['choice_index']] + if not isinstance(texture_block, AnyBitmapBlock): + continue + scene.mtl_texture_names.append(texture_name) + scene.mtl_texture_path_func = lambda name: f'assets/{name}.png' + from serializers import ShpiArchiveSerializer - shpi_serializer = ShpiArchiveSerializer() - shpi_serializer.serialize(textures_shpi_data, os.path.join(path, 'assets/'), shpi_id, textures_shpi_block) - ObjExporter().handle_obj(settings=self.settings, path=path) + ShpiArchiveSerializer().serialize(textures_shpi_data, os.path.join(path, 'assets/'), shpi_id, + textures_shpi_block) + export_scenes([scene], path, self.settings) diff --git a/serializers/maps.py b/serializers/maps.py index 5fe891a..3f3d9c1 100644 --- a/serializers/maps.py +++ b/serializers/maps.py @@ -7,11 +7,10 @@ from typing import List, Dict from library.utils.blender_scripts import get_blender_save_script, run_blender -from library.utils.meshes import SubMesh, Mesh +from serializers.common.three_d_scenes import SubMesh, Mesh from resources.eac.maps import RoadSplinePoint from resources.eac.utils import rotate_list from serializers import BaseFileSerializer -from serializers.geometries import ObjExporter class TriMapSerializer(BaseFileSerializer): @@ -829,67 +828,56 @@ def get_texture(tex): else 0 ] model.pivot_offset = (pivot['x'], pivot['y'], pivot['z']) - model.vertices = [[v['x'], v['y'], v['z']] for v in block['vertices']] - model.vertex_uvs = [[0, 0] for _ in range(len(model.vertices))] - for v in model.vertices[:block['nv8']]: + vertices = [[v['x'], v['y'], v['z']] for v in block['vertices']] + for v in vertices[:block['nv8']]: v[0] += next_pivot['x'] - pivot['x'] v[1] += next_pivot['y'] - pivot['y'] v[2] += next_pivot['z'] - pivot['z'] - texture_alignments = [] for p in block['polygons'][(block['np4'] + block['np2']):]: texture_name, texture_alignment = get_texture(p['texture']) - model.polygons.append([p['vertices'][0], p['vertices'][1], p['vertices'][2], p['vertices'][3]]) + uvs = [[0, 1], [1, 1], [1, 0], [0, 0]] + rotate_i = (texture_alignment >> 9) & 1 + n_rotate = ((texture_alignment >> 11) & 3) - rotate_i + uvs = rotate_list(uvs, n_rotate) + base_idx = len(model.vertices) + for i, v_index in enumerate(p['vertices']): + model.vertices.append(vertices[v_index]) + model.vertex_uvs.append(uvs[i]) + model.polygons.append([base_idx, base_idx + 1, base_idx + 2, base_idx + 3]) model.texture_ids.append(texture_name) - texture_alignments.append(texture_alignment) sub_meshes = model.split_by_texture_ids() - # TODO UV-s are completely wrong - for submesh, _, polygon_idx_map in sub_meshes: - for i, polygon in enumerate(submesh.polygons): - uvs = [[0, 1], [1, 1], [1, 0], [0, 0]] - alignment = texture_alignments[polygon_idx_map[i]] - rotate_i = (alignment >> 9) & 1 - n_rotate = ((alignment >> 11) & 3) - rotate_i - uvs = rotate_list(uvs, n_rotate) - if i % 2: - uvs = uvs[::-1] # flip - for i, vi in enumerate(polygon): - submesh.vertex_uvs[vi] = uvs[i] + # TODO use dummies (proxy objects) generic logic here, export props separately proxies = [item for sublist in (eb['data_records']['data'] for eb in block['extrablocks'] if eb['type'] in ['props_7', 'props_18']) for item in sublist] if len(proxies) > 0: - proxy_descr_extrablock = next(eb['data_records']['data'] for eb in block['extrablocks'] if eb['type'] == 'prop_descriptions') + proxy_descr_extrablock = next( + eb['data_records']['data'] for eb in block['extrablocks'] if eb['type'] == 'prop_descriptions') for proxy in proxies: if proxy['type'] not in ['static_prop', 'animated_prop']: continue object = proxy_descr_extrablock[proxy['prop_descr_idx']] - position = proxy['position']['data'] if proxy['type'] == 'static_prop' else proxy['position']['data']['frames'][0]['position'] + position = proxy['position']['data'] \ + if proxy['type'] == 'static_prop' else \ + proxy['position']['data']['frames'][0]['position'] model = Mesh() model.pivot_offset = (position['x'], position['y'], position['z']) - model.vertices = [[v['x'], v['y'], v['z']] for v in object['vertices']] - model.vertex_uvs = [[0, 0] for _ in range(len(model.vertices))] - texture_alignments = [] for p in object['polygons']: texture_name, texture_alignment = get_texture(p['texture']) - model.polygons.append([p['vertices'][0], p['vertices'][1], p['vertices'][2], p['vertices'][3]]) + uvs = [[0, 1], [1, 1], [1, 0], [0, 0]] + rotate_i = (texture_alignment >> 9) & 1 + n_rotate = ((texture_alignment >> 11) & 3) - rotate_i + uvs = rotate_list(uvs, n_rotate) + base_idx = len(model.vertices) + for i, v_index in enumerate(p['vertices']): + v = object['vertices'][v_index] + model.vertices.append([v['x'], v['y'], v['z']]) + model.vertex_uvs.append(uvs[i]) + model.polygons.append([base_idx, base_idx + 1, base_idx + 2, base_idx + 3]) model.texture_ids.append(texture_name) - texture_alignments.append(texture_alignment) - prop_sub_meshes = model.split_by_texture_ids() - # TODO UV-s are completely wrong - for submesh, _, polygon_idx_map in prop_sub_meshes: - for i, polygon in enumerate(submesh.polygons): - uvs = [[0, 1], [1, 1], [1, 0], [0, 0]] - alignment = texture_alignments[polygon_idx_map[i]] - rotate_i = (alignment >> 9) & 1 - n_rotate = ((alignment >> 11) & 3) - rotate_i - uvs = rotate_list(uvs, n_rotate) - if i % 2: - uvs = uvs[::-1] # flip - for i, vi in enumerate(polygon): - submesh.vertex_uvs[vi] = uvs[i] - sub_meshes.extend(prop_sub_meshes) + sub_meshes.extend(model.split_by_texture_ids()) chunks.append([[m for m, _, _ in sub_meshes], (pivot['x'], pivot['y'], pivot['z'])]) for chunk in chunks: chunk[1] = (chunk[1][0], chunk[1][2], chunk[1][1]) @@ -923,4 +911,4 @@ def get_texture(tex): obj, fii = mesh.to_obj(face_index_increment) f.write(obj) face_index_increment += fii - ObjExporter().handle_obj(settings=self.settings, path=path, obj_name='terrain.obj') + # ObjExporter().handle_obj(settings=self.settings, path=path, obj_name='terrain.obj') From 9db9451ad03c377fbbcd9cd37647be5431f7a8f3 Mon Sep 17 00:00:00 2001 From: andy Date: Fri, 17 Jan 2025 19:19:00 +0200 Subject: [PATCH 17/36] regression bugfix --- serializers/common/three_d_scenes.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/serializers/common/three_d_scenes.py b/serializers/common/three_d_scenes.py index c3e5c73..0b2d3e7 100644 --- a/serializers/common/three_d_scenes.py +++ b/serializers/common/three_d_scenes.py @@ -152,7 +152,7 @@ class Scene: # TODO support existing map export logic here and use it def export_scenes(scenes: List[Scene], output_path: str, settings): mtl_entry_template = Template(""" - + newmtl $texture_name Ka 1.000000 1.000000 1.000000 Kd 1.000000 1.000000 1.000000 @@ -164,7 +164,7 @@ def export_scenes(scenes: List[Scene], output_path: str, settings): import_template = Template(""" import json bpy.ops.wm.read_factory_settings(use_empty=True) -bpy.ops.import_scene.obj(filepath="$obj_file_path", axis_forward='Y', axis_up='Z') +bpy.ops.wm.obj_import(filepath="$obj_file_path", forward_axis='Y', up_axis='Z') dummies = json.loads('$dummies') or [] for dummy in dummies: @@ -205,7 +205,7 @@ def export_scenes(scenes: List[Scene], output_path: str, settings): face_index_increment += fii if scene.mtl_name and not scene.external_mtl: with open(os.path.join(output_path, f'{scene.mtl_name}.mtl'), 'w') as f: - for texture_name in scene.mtl_texture_names: + for texture_name in {x for x in scene.mtl_texture_names}: f.write(mtl_entry_template.substitute({ 'texture_name': texture_name, 'texture_path': scene.mtl_texture_path_func(texture_name), From 8899de04989a9ba622ce3a9ab9ad54073b55ee82 Mon Sep 17 00:00:00 2001 From: andy Date: Wed, 22 Jan 2025 00:54:39 +0200 Subject: [PATCH 18/36] migrated TRI serializer to use new 3d scenes approach --- serializers/common/three_d_scenes.py | 41 +- serializers/maps.py | 578 ++++++++++++--------------- 2 files changed, 280 insertions(+), 339 deletions(-) diff --git a/serializers/common/three_d_scenes.py b/serializers/common/three_d_scenes.py index 0b2d3e7..b0aef5e 100644 --- a/serializers/common/three_d_scenes.py +++ b/serializers/common/three_d_scenes.py @@ -139,17 +139,31 @@ def to_obj(self, face_index_increment, mtllib=None, pivot_offset=None) -> Tuple[ class Scene: - sub_meshes: List[SubMesh] = [] - name: str = 'scene' - obj_name: str = 'geometry' - mtl_name: str = 'material' - external_mtl: bool = False - mtl_texture_names: List[str] = [] - mtl_texture_path_func: Callable[[str], str] = lambda x: x - dummies = [] + def __init__(self, + name: str = 'scene', + sub_meshes: List[SubMesh] = None, + obj_name: str = 'geometry', + mtl_name: str = 'material', + external_mtl: bool = False, + bake_textures: bool = True, + mtl_texture_names: List[str] = None, + mtl_texture_path_func: Callable[[str], str] = lambda x: x, + dummies: List[dict] = None, + curves: List[dict] = None, + extra_script: str = None): + self.name = name + self.sub_meshes = sub_meshes or [] + self.obj_name = obj_name + self.mtl_name = mtl_name + self.external_mtl = external_mtl + self.bake_textures = bake_textures + self.mtl_texture_names = mtl_texture_names or [] + self.mtl_texture_path_func = mtl_texture_path_func + self.dummies = dummies or [] + self.curves = curves or [] + self.extra_script = extra_script or "" -# TODO support existing map export logic here and use it def export_scenes(scenes: List[Scene], output_path: str, settings): mtl_entry_template = Template(""" @@ -163,6 +177,8 @@ def export_scenes(scenes: List[Scene], output_path: str, settings): import_template = Template(""" import json +from mathutils import Euler + bpy.ops.wm.read_factory_settings(use_empty=True) bpy.ops.wm.obj_import(filepath="$obj_file_path", forward_axis='Y', up_axis='Z') @@ -192,6 +208,8 @@ def export_scenes(scenes: List[Scene], output_path: str, settings): curve_props = curve.get('properties', {}) for (key, value) in curve_props.items(): curveOB[key] = value + +$extra_script """) for scene in scenes: @@ -217,13 +235,14 @@ def export_scenes(scenes: List[Scene], output_path: str, settings): script += '\n\n' + import_template.substitute({ 'obj_file_path': f'{scene.obj_name}.obj', 'dummies': json.dumps(scene.dummies), - 'curves': json.dumps([]), + 'curves': json.dumps(scene.curves), + 'extra_script': scene.extra_script, }) if settings.geometry__export_to_gg_web_engine: from serializers.misc.build_blender_scene import construct_blender_export_script script += '\n' + construct_blender_export_script( file_name=os.path.join(os.getcwd(), output_path, scene.name), - export_materials='EXPORT') + export_materials='EXPORT' if scene.bake_textures else 'NONE') if settings.geometry__save_blend: script += '\n\n' + get_blender_save_script( out_blend_name=os.path.join(os.getcwd(), output_path, scene.name)) diff --git a/serializers/maps.py b/serializers/maps.py index 3f3d9c1..56f315f 100644 --- a/serializers/maps.py +++ b/serializers/maps.py @@ -6,11 +6,10 @@ from string import Template from typing import List, Dict -from library.utils.blender_scripts import get_blender_save_script, run_blender -from serializers.common.three_d_scenes import SubMesh, Mesh from resources.eac.maps import RoadSplinePoint from resources.eac.utils import rotate_list from serializers import BaseFileSerializer +from serializers.common.three_d_scenes import SubMesh, Mesh, Scene, export_scenes class TriMapSerializer(BaseFileSerializer): @@ -150,13 +149,13 @@ def read_matrix(self, rows, reference_points: List[RoadSplinePoint]): self.reference_points = reference_points self.matrix = [None] * 4 for row_index in range(4): - A0 = rows[row_index][0] - A0['x'] += reference_points[row_index]['position']['x'] - A0['y'] += reference_points[row_index]['position']['y'] - A0['z'] += reference_points[row_index]['position']['z'] - - A15 = [rows[row_index][i + 1] for i in range(5)] - A610 = [rows[row_index][i + 6] for i in range(5)] + A0 = { + 'x': rows[row_index][0]['x'] + reference_points[row_index]['position']['x'], + 'y': rows[row_index][0]['y'] + reference_points[row_index]['position']['y'], + 'z': rows[row_index][0]['z'] + reference_points[row_index]['position']['z'], + } + A15 = [{**rows[row_index][i + 1]} for i in range(5)] + A610 = [{**rows[row_index][i + 6]} for i in range(5)] # Each point is relative to the previous point for i in range(5): for j in ['x', 'y', 'z']: @@ -270,134 +269,57 @@ def build_fence(self, counter, index): model.name = f'terrain_chunk_{counter}_{"left" if is_left else "right"}fence_{self.fence_texture_name}' return model - blender_map_script = Template(""" -import math -import json -from mathutils import Euler -if $new_file: - bpy.ops.wm.read_factory_settings(use_empty=True) - -# create road spline -print('building track spline...') -# create the Curve Datablock -curveData = bpy.data.curves.new('road_path', type='CURVE') -curveData.dimensions = '3D' -curveData.resolution_u = 2 - -# map coords to spline -polyline = curveData.splines.new('POLY') -coords = [$road_path_points] -polyline.points.add(len(coords) - 1) -for i, coord in enumerate(coords): - x,y,z = coord - polyline.points[i].co = (x, y, z, 1) -if not $is_opened_track: - polyline.use_cyclic_u = True -# create Object -curveOB = bpy.data.objects.new('road_path', curveData) -bpy.context.collection.objects.link(curveOB) -# settings -spline_properties = json.loads('$road_path_settings') -for (key, value) in spline_properties.items(): - curveOB[key] = value - -print('creating prop dummies...') -# map chunks dummies -for i in range(int(len(coords) / 4)): - o = bpy.data.objects.new( f"chunk_{i}", None ) - bpy.context.collection.objects.link(o) - o.location = coords[i * 4] - o['is_chunk'] = True - o['chunk'] = f'terrain_chunk_{i}' - if i < int(len(coords) / 4) - 1: - o['children'] = [f'chunk_{i + 1}'] - elif (i == int(len(coords) / 4) - 1) and not $is_opened_track: - o['children'] = ['chunk_0'] - -player_start_position = json.loads('$player_start') -o = bpy.data.objects.new( "player_start", None ) -bpy.context.collection.objects.link(o) -o.location = [player_start_position['x'], player_start_position['y'], player_start_position['z']] -o.rotation_mode = 'QUATERNION' -o.rotation_quaternion = Euler((player_start_position['rotation_x'], 0, 0), 'XYZ').to_quaternion() - - -# barriers collisions -if $save_invisible_wall_collisions: - print('defining wall collisions...') - left_barrier = json.loads('$left_barrier') - right_barrier = json.loads('$right_barrier') - wall_cube_names = [] - for barrier in [left_barrier, right_barrier]: - if not barrier: - continue - for i in range(len(barrier['middle_points'])): - rotation = barrier['orientations'][i] - if barrier == left_barrier: - rotation += math.pi - bpy.ops.mesh.primitive_cube_add(location=( - barrier['middle_points'][i][0] + math.cos(rotation), - barrier['middle_points'][i][1] - math.sin(rotation), - barrier['points'][i][2] + 100), - scale=(1, barrier['lengths'][i] / 2, 125), - rotation=(0, 0, -barrier['orientations'][i])) - cube = bpy.data.objects['Cube'] - cube.name = f"wall_collision_{'left' if barrier == left_barrier else 'right'}_{i}" - cube.hide_render = True - cube.display_bounds_type = 'BOX' - cube.display_type = 'BOUNDS' - wall_cube_names.append(cube.name) - bpy.ops.object.select_all(action='DESELECT') - for name in wall_cube_names: - bpy.data.objects[name].select_set(True) - bpy.ops.rigidbody.objects_add(type='PASSIVE') - for obj in bpy.context.selected_objects: - obj.rigid_body.collision_shape = 'BOX' - """) - - blender_chunk_script = Template(""" -import math -import json -from mathutils import Euler - -if $new_file: - bpy.ops.wm.read_factory_settings(use_empty=True) -bpy.ops.wm.obj_import(filepath="$obj_name", forward_axis='Y', up_axis='Z') - -# create props -props = json.loads('$props_json') -for index, prop in enumerate(props): - o = bpy.data.objects.new( f"proxy_{index}", None ) - bpy.context.collection.objects.link(o) - o.location = (prop['x'], prop['y'], prop['z']) - o.rotation_mode = 'QUATERNION' - o.rotation_quaternion = Euler((0, 0, prop['rotation_z']), 'XYZ').to_quaternion() - o['is_prop'] = True - for k, v in prop.items(): - if k in ['x', 'y', 'z', 'rotation_z']: - continue - o[k] = v - - + terrain_collisions_script = """ def find_terrain_chunks(): import re pattern = re.compile(f"^terrain_chunk") return [x for x in bpy.data.objects if pattern.match(x.name)] - -# terrain collisions -if $save_terrain_collisions: - bpy.ops.object.select_all(action='DESELECT') - is_active_set = False - objects = find_terrain_chunks() - for object in objects: - object.select_set(True) - if not is_active_set: - bpy.context.view_layer.objects.active = object - is_active_set = True + +bpy.ops.object.select_all(action='DESELECT') +is_active_set = False +objects = find_terrain_chunks() +for object in objects: + object.select_set(True) + if not is_active_set: + bpy.context.view_layer.objects.active = object + is_active_set = True +if len(objects) > 0: bpy.ops.rigidbody.objects_add(type='PASSIVE') - # for obj in bpy.context.selected_objects: - # obj.rigid_body.collision_shape = 'CONVEX_HULL' - """) +# for obj in bpy.context.selected_objects: +# obj.rigid_body.collision_shape = 'CONVEX_HULL' +""" + + wall_collisions_script = Template(""" +import math +left_barrier = json.loads('$left_barrier') +right_barrier = json.loads('$right_barrier') +wall_cube_names = [] +for barrier in [left_barrier, right_barrier]: + if not barrier: + continue + for i in range(len(barrier['middle_points'])): + rotation = barrier['orientations'][i] + if barrier == left_barrier: + rotation += math.pi + bpy.ops.mesh.primitive_cube_add(location=( + barrier['middle_points'][i][0] + math.cos(rotation), + barrier['middle_points'][i][1] - math.sin(rotation), + barrier['points'][i][2] + 100), + scale=(1, barrier['lengths'][i] / 2, 125), + rotation=(0, 0, -barrier['orientations'][i])) + cube = bpy.data.objects['Cube'] + cube.name = f"wall_collision_{'left' if barrier == left_barrier else 'right'}_{i}" + cube.hide_render = True + cube.display_bounds_type = 'BOX' + cube.display_type = 'BOUNDS' + wall_cube_names.append(cube.name) +bpy.ops.object.select_all(action='DESELECT') +for name in wall_cube_names: + bpy.data.objects[name].select_set(True) +bpy.ops.rigidbody.objects_add(type='PASSIVE') +for obj in bpy.context.selected_objects: + obj.rigid_body.collision_shape = 'BOX' +""") def _get_texture_name_from_id(self, is_opened_track, texture_id): if is_opened_track: @@ -418,24 +340,33 @@ def _prop_json(self, data: dict, instance, is_opened_track, spline_index = instance['road_point_idx'] road_spline_vertex = data['road_spline'][spline_index] res = { - 'type': prop_definition['type'], - 'road_index': spline_index, - 'x': instance['position']['x'] + road_spline_vertex['position']['x'], - 'y': instance['position']['y'] + road_spline_vertex['position']['y'], - 'z': instance['position']['z'] + road_spline_vertex['position']['z'], - 'rotation_z': instance['rotation'] + road_spline_vertex['orientation'], + 'name': f'proxy_', + 'position': [ + instance['position']['x'] + road_spline_vertex['position']['x'], + instance['position']['z'] + road_spline_vertex['position']['z'], + instance['position']['y'] + road_spline_vertex['position']['y'], + ], + 'rotation': [0, 0, instance['rotation'] + road_spline_vertex['orientation']], + 'properties': { + 'is_prop': True, + 'type': prop_definition['type'], + 'road_index': spline_index, + } } if use_local_coordinates: - for axis in ['x', 'y', 'z']: - res[axis] -= data['road_spline'][spline_index - (spline_index % 4)]['position'][axis] - if res['type'] == 'model': - res = { - **res, + res['position'] = [ + res['position'][0] - data['road_spline'][spline_index - (spline_index % 4)]['position']['x'], + res['position'][1] - data['road_spline'][spline_index - (spline_index % 4)]['position']['z'], + res['position'][2] - data['road_spline'][spline_index - (spline_index % 4)]['position']['y'], + ] + if prop_definition['type'] == 'model': + res['properties'] = { + **res['properties'], 'model_ref_id': prop_definition['data']['data']['resource_id'] } - elif res['type'] == 'bitmap': - res = { - **res, + elif prop_definition['type'] == 'bitmap': + res['properties'] = { + **res['properties'], 'texture': ';'.join(self._texture_ids( prop_definition['data']['data']['resource_id'], prop_definition['data']['data']['frame_count'] @@ -446,9 +377,9 @@ def _prop_json(self, data: dict, instance, is_opened_track, 'height': prop_definition['data']['data']['height'], 'animation_interval': prop_definition['data']['data']['animation_interval'] } - elif res['type'] == 'two_sided_bitmap': - res = { - **res, + elif prop_definition['type'] == 'two_sided_bitmap': + res['properties'] = { + **res['properties'], 'texture': ';'.join(self._texture_ids(prop_definition['data']['data']['resource_id'], 1, is_opened_track)), @@ -589,39 +520,140 @@ def position_mesh(mesh): def serialize(self, data: dict, path: str, id=None, block=None, **kwargs): super().serialize(data, path) # this serializer mutates data when exchanging axis to Z-up + original_data = data data = deepcopy(data) - is_opened_track = data['loop_chunk'] == 0 - - terrain_data = [] - for terrain_entry in data['terrain']: - res = dict() - res['texture_names'] = [self._get_texture_name_from_id(is_opened_track, tid) for tid in - terrain_entry['texture_ids']] - road_path_index = len(terrain_data) * 4 - res['chunk'] = self.TerrainChunk(id, block, data) - res['chunk'].read_matrix(terrain_entry['rows'], - data['road_spline'][road_path_index:road_path_index + 4]) + is_opened = data['loop_chunk'] == 0 + + map_scene = Scene(name='map') + scenes = [map_scene] + + assert data == original_data + + spline = data['road_spline'][:len(data['terrain']) * 4] + map_scene.curves.append({ + 'name': 'road_path', + 'closed': not is_opened, + 'points': [[x['position']['x'], x['position']['z'], x['position']['y']] + for x in spline], + 'properties': { + # 'orientation': [-x['orientation'] for x in spline], + 'slope': [x['slope'] for x in spline], + 'slant': [x['slant_a'] for x in spline], + 'left_barrier_distance': [x['left_barrier'] for x in spline], + 'right_barrier_distance': [x['right_barrier'] for x in spline], + 'left_verge_distance': [x['left_verge'] for x in spline], + 'right_verge_distance': [x['right_verge'] for x in spline], + 'lanes_backward': [x['num_lanes'][0] for x in spline], + 'lanes_forward': [x['num_lanes'][1] for x in spline], + 'max_ai_speed': [data['ai_info'][math.floor(i / 4)]['max_ai_speed'] for i in + range(len(data['terrain']) * 4)], + 'max_traffic_speed': [data['ai_info'][math.floor(i / 4)]['max_traffic_speed'] for i in + range(len(data['terrain']) * 4)], + # a terminal road path point: when go backwards, race ends after this point + 'start_point_index': 12 if is_opened else 0, + # a finish road path point + 'finish_point_index': data['num_chunks'] * 4 - (179 if is_opened else 1) + }, + }) + + assert data == original_data + + chunks = [] + for (i, terrain_entry) in enumerate(data['terrain']): + road_path_index = i * 4 + chunk = self.TerrainChunk(id, block, data) + chunk.read_matrix(terrain_entry['rows'], data['road_spline'][road_path_index:road_path_index + 4]) if terrain_entry['fence']['texture_id'] != 0 or terrain_entry['fence']['has_left_fence'] or \ terrain_entry['fence']['has_right_fence']: fence_texture_id = terrain_entry['fence']['texture_id'] - if is_opened_track: + if is_opened: if id.endswith('AL1.TRI') and fence_texture_id == 16: fence_texture_id = fence_texture_id * 3 - res['chunk'].fence_texture_name = self._get_texture_name_from_id(is_opened_track, fence_texture_id) + chunk.fence_texture_name = self._get_texture_name_from_id(is_opened, fence_texture_id) else: - res['chunk'].fence_texture_name = ('0/GA00' - if id.split('/')[-1] in ['TR3.TRI', 'TR4.TRI', 'TR5.TRI'] - else '0/ga00') - res['chunk'].has_left_fence = terrain_entry['fence']['has_left_fence'] - res['chunk'].has_right_fence = terrain_entry['fence']['has_right_fence'] - terrain_data.append(res) - for i, terrain_data_entry in enumerate(terrain_data): - terrain_data_entry['chunk'].next_chunk = terrain_data[i + 1]['chunk'] if ( - i < len(terrain_data) - 1) else (None - if is_opened_track - else terrain_data[0]['chunk']) - terrain_data_entry['meshes'] = terrain_data_entry['chunk'].build_models(i, - terrain_data_entry['texture_names']) + chunk.fence_texture_name = ('0/GA00' + if id.split('/')[-1] in ['TR3.TRI', 'TR4.TRI', 'TR5.TRI'] + else '0/ga00') + chunk.has_left_fence = terrain_entry['fence']['has_left_fence'] + chunk.has_right_fence = terrain_entry['fence']['has_right_fence'] + chunks.append(chunk) + + assert data == original_data + + for i, chunk in enumerate(chunks): + chunk.next_chunk = (chunks[i + 1] + if (i < len(chunks) - 1) + else (None if is_opened else chunks[0])) + + assert data == original_data + + for (i, terrain_entry) in enumerate(data['terrain']): + texture_names = [self._get_texture_name_from_id(is_opened, tid) for tid in terrain_entry['texture_ids']] + meshes = chunks[i].build_models(i, texture_names) + for mesh in meshes: + mesh.change_axes(new_z='y', new_y='z') + if self.settings.maps__save_as_chunked: + position = ( + data['road_spline'][i * 4]['position']['x'], + data['road_spline'][i * 4]['position']['z'], + data['road_spline'][i * 4]['position']['y'], + ) + dummy_children = [] + if i < int(len(data['terrain']) / 4) - 1: + dummy_children = [f'chunk_{i + 1}'] + elif not is_opened: + dummy_children = ['chunk_0'] + map_scene.dummies.append({ + 'name': f'chunk_{i}', + 'position': position, + 'properties': { + 'is_chunk': True, + 'chunk': f'terrain_chunk_{i}', + 'children': dummy_children + }, + }) + for mesh in meshes: + mesh.pivot_offset = position + scene = Scene(name=f'terrain_chunk_{i}', + sub_meshes=meshes, + obj_name=f'terrain_chunk_{i}', + bake_textures=False, + external_mtl=True) + scene.dummies = [self._prop_json(data, o, is_opened, True) + for o in data['props'] + if (i + 1) * 4 > o['road_point_idx'] >= i * 4] + for i, d in enumerate(scene.dummies): + d['name'] += str(i) + scenes.append(scene) + else: + map_scene.sub_meshes.extend(meshes) + + if self.settings.maps__save_terrain_collisions: + for scene in scenes: + scene.extra_script = self.terrain_collisions_script + + if not self.settings.maps__save_as_chunked: + prop_dummies = [self._prop_json(data, o, is_opened, False) + for o in data['props'] + if len(data['terrain']) * 4 > o['road_point_idx'] >= 0] + for i, d in enumerate(prop_dummies): + d['name'] += str(i) + map_scene.dummies.extend(prop_dummies) + + map_scene.dummies.append({ + 'name': 'player_start', + 'position': [ + # 0.8 is an approximate average car half width + max(data['road_spline'][18]['position']['x'] - data['road_spline'][18]['left_barrier'] + 0.8, + min(data['road_spline'][18]['position']['x'] + data['road_spline'][18]['right_barrier'] - 0.8, + 2.5)), + data['road_spline'][18]['position']['z'], + max(data['road_spline'][18]['position']['y'], 0), + ], + 'rotation': [data['road_spline'][18]['slope'], 0, 0] + }) + + assert data == original_data if self.settings.maps__save_invisible_wall_collisions: left_barrier_points = self.BarrierPath( @@ -634,165 +666,55 @@ def serialize(self, data: dict, path: str, id=None, block=None, **kwargs): rp['position']['y'], rp['position']['z'] - rp['right_barrier'] * math.sin(rp['orientation']) ] for rp in data['road_spline'][:len(data['terrain']) * 4]]) - if not is_opened_track: + if not is_opened: left_barrier_points.points += [left_barrier_points.points[0]] right_barrier_points.points += [right_barrier_points.points[0]] left_barrier_points.is_closed = right_barrier_points.is_closed = True + left_barrier_points.optimize() + left_barrier_points.points = [[p[0], p[2], p[1]] for p in left_barrier_points.points] + left_barrier_points.z_up = True right_barrier_points.optimize() - - # I use Z-up. Did not test exporter with Y-up, also prop rotations will not work, that's why it doesn't have - # own settings option. Also correct rotation is (new_z='y', new_y='-z'), but looks like NFS loads map mirrored - # So since we change y and z, we need to invert Y-rotation as well - for i, terrain_chunk in enumerate(terrain_data): - for sub_model in terrain_chunk['meshes']: - sub_model.change_axes(new_z='y', new_y='z') - for obj in data['props']: - (obj['position']['z'], obj['position']['y']) = (obj['position']['y'], obj['position']['z']) - obj['rotation'] = -obj['rotation'] - for spline_point in data['road_spline'][:len(data['terrain']) * 4]: - (spline_point['position']['z'], spline_point['position']['y']) = ( - spline_point['position']['y'], spline_point['position']['z']) - spline_point['orientation'] = -spline_point['orientation'] - if self.settings.maps__save_invisible_wall_collisions: - if right_barrier_points: - right_barrier_points.points = [[p[0], p[2], p[1]] for p in right_barrier_points.points] - right_barrier_points.z_up = True - if left_barrier_points: - left_barrier_points.points = [[p[0], p[2], p[1]] for p in left_barrier_points.points] - left_barrier_points.z_up = True - self._save_mtl(terrain_data, path, id.split('/')[-1]) - if self.settings.maps__add_props_to_obj: - self.mtl_append_foreground_textures(data, path, id.split('/')[-1]) - blender_script = "bpy.ops.wm.read_factory_settings(use_empty=True)" - if self.settings.maps__save_as_chunked: - for i, terrain_chunk in enumerate(terrain_data): - with open(os.path.join(path, f'terrain_chunk_{i}.obj'), 'w') as f: - face_index_increment = 1 - pivot = ( - data['road_spline'][i * 4]['position']['x'], - data['road_spline'][i * 4]['position']['y'], - data['road_spline'][i * 4]['position']['z'], - ) - for sub_model in terrain_chunk['meshes']: - obj, fii = sub_model.to_obj(face_index_increment, mtllib='terrain.mtl', pivot_offset=pivot) - f.write(obj) - face_index_increment += fii - if self.settings.maps__add_props_to_obj: - self.render_props_to_obj(id, f, path, data, face_index_increment, is_opened_track, i * 4, - i * 4 + 3, pivot) - blender_script += '\n\n\n' + self.blender_chunk_script.substitute({ - 'new_file': True, - 'save_invisible_wall_collisions': self.settings.maps__save_invisible_wall_collisions, - 'save_terrain_collisions': self.settings.maps__save_terrain_collisions, - 'obj_name': f'terrain_chunk_{i}.obj', - 'props_json': json.dumps( - [self._prop_json(data, o, is_opened_track, True) - for o in data['props'] - if (i + 1) * 4 > o['road_point_idx'] >= i * 4]), - }) - if self.settings.geometry__save_blend: - blender_script += get_blender_save_script( - out_blend_name=os.path.join(os.getcwd(), path, f'terrain_chunk_{i}').replace('\\', '/')) - if self.settings.geometry__export_to_gg_web_engine: - from serializers.misc.build_blender_scene import construct_blender_export_script - blender_script += '\n' + construct_blender_export_script( - file_name=os.path.join(os.getcwd(), path, f'terrain_chunk_{i}'), - export_materials='NONE') - else: - with open(os.path.join(path, 'terrain.obj'), 'w') as f: - face_index_increment = 1 - for i, terrain_chunk in enumerate(terrain_data): - for sub_model in terrain_chunk['meshes']: - obj, fii = sub_model.to_obj(face_index_increment, mtllib='terrain.mtl') - f.write(obj) - face_index_increment += fii - if self.settings.maps__add_props_to_obj: - self.render_props_to_obj(id, f, path, data, face_index_increment, is_opened_track, 0, - len(data['terrain']) * 4 - 1) - - blender_script += '\n\n\n' + self.blender_chunk_script.substitute({ - 'new_file': False, - 'save_invisible_wall_collisions': self.settings.maps__save_invisible_wall_collisions, - 'save_terrain_collisions': self.settings.maps__save_terrain_collisions, - 'obj_name': 'terrain.obj', - 'props_json': json.dumps( - [self._prop_json(data, o, is_opened_track, False) - for o in data['props'] - if len(data['terrain']) * 4 > o['road_point_idx'] >= 0]), + right_barrier_points.points = [[p[0], p[2], p[1]] for p in right_barrier_points.points] + right_barrier_points.z_up = True + + map_scene.extra_script += self.wall_collisions_script.substitute({ + 'left_barrier': json.dumps({ + 'points': left_barrier_points.points, + 'middle_points': left_barrier_points.middle_points, + 'lengths': left_barrier_points.lengths, + 'orientations': left_barrier_points.orientations, + }), + 'right_barrier': json.dumps({ + 'points': right_barrier_points.points, + 'middle_points': right_barrier_points.middle_points, + 'lengths': right_barrier_points.lengths, + 'orientations': right_barrier_points.orientations, + }), }) - spline = data['road_spline'][:len(data['terrain']) * 4] - road_path_settings = { - 'slope': [x['slope'] for x in spline], - 'slant': [x['slant_a'] for x in spline], - 'left_barrier_distance': [x['left_barrier'] for x in spline], - 'right_barrier_distance': [x['right_barrier'] for x in spline], - 'left_verge_distance': [x['left_verge'] for x in spline], - 'right_verge_distance': [x['right_verge'] for x in spline], - 'lanes_backward': [x['num_lanes'][0] for x in spline], - 'lanes_forward': [x['num_lanes'][1] for x in spline], - 'max_ai_speed': [data['ai_info'][math.floor(i / 4)]['max_ai_speed'] for i in - range(len(data['terrain']) * 4)], - 'max_traffic_speed': [data['ai_info'][math.floor(i / 4)]['max_traffic_speed'] for i in - range(len(data['terrain']) * 4)], - } - if is_opened_track: - # a terminal road path point: when go backwards, race ends after this point - road_path_settings['start_point_index'] = 12 - # a finish road path point - road_path_settings['finish_point_index'] = data['num_chunks'] * 4 - 179 - blender_script += '\n\n\n\n' + self.blender_map_script.substitute({ - 'new_file': self.settings.maps__save_as_chunked, - 'save_invisible_wall_collisions': self.settings.maps__save_invisible_wall_collisions, - 'save_terrain_collisions': self.settings.maps__save_terrain_collisions, - 'road_path_points': ', '.join( - [f"({block['position']['x']}, {block['position']['y']}, {block['position']['z']})" for block in - data['road_spline'][:len(data['terrain']) * 4]]), - 'road_path_settings': json.dumps(road_path_settings), - # AL1, CL1, CY1, BS, VR - looks ok - # RS (TR1), AV (TR2), Trans (TR7) - x should be a bit bigger - 'player_start': json.dumps({ - # 0.8 is an approximate average car half width - 'x': max( - data['road_spline'][18]['position']['x'] - data['road_spline'][18]['left_barrier'] + 0.8, - min(data['road_spline'][18]['position']['x'] + data['road_spline'][18]['right_barrier'] - 0.8, - 2.5)), - 'y': max(data['road_spline'][18]['position']['y'], 0), - 'z': data['road_spline'][18]['position']['z'], - 'rotation_x': data['road_spline'][18]['slope'], - }), - 'is_opened_track': is_opened_track, - 'left_barrier': json.dumps({ - 'points': left_barrier_points.points, - 'middle_points': left_barrier_points.middle_points, - 'lengths': left_barrier_points.lengths, - 'orientations': left_barrier_points.orientations, - }) if self.settings.maps__save_invisible_wall_collisions else 'null', - 'right_barrier': json.dumps({ - 'points': right_barrier_points.points, - 'middle_points': right_barrier_points.middle_points, - 'lengths': right_barrier_points.lengths, - 'orientations': right_barrier_points.orientations, - }) if self.settings.maps__save_invisible_wall_collisions else 'null', - }) - if self.settings.geometry__export_to_gg_web_engine: - from serializers.misc.build_blender_scene import construct_blender_export_script - blender_script += '\n' + construct_blender_export_script( - file_name=os.path.join(os.getcwd(), path, 'map'), - export_materials='NONE') - if self.settings.geometry__save_blend or self.settings.geometry__export_to_gg_web_engine: - run_blender(path=path, - script=blender_script, - out_blend_name=os.path.join( - os.getcwd(), path, 'map' - ).replace('\\', '/') if self.settings.geometry__save_blend else None) - if not self.settings.geometry__save_obj: - if self.settings.maps__save_as_chunked: - for i in range(len(terrain_data)): - os.unlink(os.path.join(os.getcwd(), path, f'terrain_chunk_{i}.obj')) - else: - os.unlink(os.path.join(os.getcwd(), path, 'terrain.obj')) - os.unlink(os.path.join(os.getcwd(), path, 'terrain.mtl')) + + assert data == original_data + + export_scenes(scenes, path, self.settings) + + assert data == original_data + + # if self.settings.maps__add_props_to_obj: + # self.mtl_append_foreground_textures(data, path, id.split('/')[-1]) + + # if self.settings.maps__add_props_to_obj: + # self.render_props_to_obj(id, f, path, data, face_index_increment, is_opened_track, i * 4, + # i * 4 + 3, pivot) + # blender_script += '\n\n\n' + self.blender_chunk_script.substitute({ + # 'new_file': True, + # 'save_invisible_wall_collisions': self.settings.maps__save_invisible_wall_collisions, + # 'save_terrain_collisions': self.settings.maps__save_terrain_collisions, + # 'obj_name': f'terrain_chunk_{i}.obj', + # 'props_json': json.dumps( + # [self._prop_json(data, o, is_opened_track, True) + # for o in data['props'] + # if (i + 1) * 4 > o['road_point_idx'] >= i * 4]), + # }) class TrkMapSerializer(BaseFileSerializer): From 7e56ded1038a0efbf5bda8facb0717d239312636 Mon Sep 17 00:00:00 2001 From: Andy Date: Wed, 22 Jan 2025 14:13:29 +0200 Subject: [PATCH 19/36] fix regressions --- serializers/common/three_d_scenes.py | 2 +- serializers/maps.py | 11 +++++++---- 2 files changed, 8 insertions(+), 5 deletions(-) diff --git a/serializers/common/three_d_scenes.py b/serializers/common/three_d_scenes.py index b0aef5e..d84340f 100644 --- a/serializers/common/three_d_scenes.py +++ b/serializers/common/three_d_scenes.py @@ -223,7 +223,7 @@ def export_scenes(scenes: List[Scene], output_path: str, settings): face_index_increment += fii if scene.mtl_name and not scene.external_mtl: with open(os.path.join(output_path, f'{scene.mtl_name}.mtl'), 'w') as f: - for texture_name in {x for x in scene.mtl_texture_names}: + for texture_name in sorted(list({x for x in scene.mtl_texture_names})): f.write(mtl_entry_template.substitute({ 'texture_name': texture_name, 'texture_path': scene.mtl_texture_path_func(texture_name), diff --git a/serializers/maps.py b/serializers/maps.py index 56f315f..f0ba2a3 100644 --- a/serializers/maps.py +++ b/serializers/maps.py @@ -346,7 +346,7 @@ def _prop_json(self, data: dict, instance, is_opened_track, instance['position']['z'] + road_spline_vertex['position']['z'], instance['position']['y'] + road_spline_vertex['position']['y'], ], - 'rotation': [0, 0, instance['rotation'] + road_spline_vertex['orientation']], + 'rotation': [0, 0, -(instance['rotation'] + road_spline_vertex['orientation'])], 'properties': { 'is_prop': True, 'type': prop_definition['type'], @@ -524,7 +524,9 @@ def serialize(self, data: dict, path: str, id=None, block=None, **kwargs): data = deepcopy(data) is_opened = data['loop_chunk'] == 0 - map_scene = Scene(name='map') + map_scene = Scene(name='map', + obj_name='map', + mtl_name='terrain') scenes = [map_scene] assert data == original_data @@ -598,8 +600,8 @@ def serialize(self, data: dict, path: str, id=None, block=None, **kwargs): data['road_spline'][i * 4]['position']['z'], data['road_spline'][i * 4]['position']['y'], ) - dummy_children = [] - if i < int(len(data['terrain']) / 4) - 1: + dummy_children = None + if i < len(data['terrain']) - 1: dummy_children = [f'chunk_{i + 1}'] elif not is_opened: dummy_children = ['chunk_0'] @@ -617,6 +619,7 @@ def serialize(self, data: dict, path: str, id=None, block=None, **kwargs): scene = Scene(name=f'terrain_chunk_{i}', sub_meshes=meshes, obj_name=f'terrain_chunk_{i}', + mtl_name='terrain', bake_textures=False, external_mtl=True) scene.dummies = [self._prop_json(data, o, is_opened, True) From 6049665b213eb322e7afd42126ce4fd04b1f3661 Mon Sep 17 00:00:00 2001 From: Andy Date: Wed, 22 Jan 2025 18:02:08 +0200 Subject: [PATCH 20/36] fix regressions --- serializers/common/three_d_scenes.py | 37 ++++++++------- serializers/maps.py | 70 +++++++++------------------- 2 files changed, 42 insertions(+), 65 deletions(-) diff --git a/serializers/common/three_d_scenes.py b/serializers/common/three_d_scenes.py index d84340f..a2f9b71 100644 --- a/serializers/common/three_d_scenes.py +++ b/serializers/common/three_d_scenes.py @@ -144,24 +144,26 @@ def __init__(self, sub_meshes: List[SubMesh] = None, obj_name: str = 'geometry', mtl_name: str = 'material', - external_mtl: bool = False, bake_textures: bool = True, mtl_texture_names: List[str] = None, mtl_texture_path_func: Callable[[str], str] = lambda x: x, dummies: List[dict] = None, curves: List[dict] = None, - extra_script: str = None): + extra_script: str = None, + skip_obj_export: bool = False, + skip_mtl_export: bool = False): self.name = name self.sub_meshes = sub_meshes or [] self.obj_name = obj_name self.mtl_name = mtl_name - self.external_mtl = external_mtl self.bake_textures = bake_textures self.mtl_texture_names = mtl_texture_names or [] self.mtl_texture_path_func = mtl_texture_path_func self.dummies = dummies or [] self.curves = curves or [] self.extra_script = extra_script or "" + self.skip_obj_export = skip_obj_export + self.skip_mtl_export = skip_mtl_export def export_scenes(scenes: List[Scene], output_path: str, settings): @@ -180,7 +182,8 @@ def export_scenes(scenes: List[Scene], output_path: str, settings): from mathutils import Euler bpy.ops.wm.read_factory_settings(use_empty=True) -bpy.ops.wm.obj_import(filepath="$obj_file_path", forward_axis='Y', up_axis='Z') +if "$obj_file_path": + bpy.ops.wm.obj_import(filepath="$obj_file_path", forward_axis='Y', up_axis='Z') dummies = json.loads('$dummies') or [] for dummy in dummies: @@ -213,15 +216,16 @@ def export_scenes(scenes: List[Scene], output_path: str, settings): """) for scene in scenes: - with open(os.path.join(output_path, f'{scene.obj_name}.obj'), 'w') as f: - if scene.mtl_name: - f.write(f'mtllib {scene.mtl_name}.mtl') - face_index_increment = 1 - for sub_model in scene.sub_meshes: - obj, fii = sub_model.to_obj(face_index_increment) - f.write(obj) - face_index_increment += fii - if scene.mtl_name and not scene.external_mtl: + if not scene.skip_obj_export: + with open(os.path.join(output_path, f'{scene.obj_name}.obj'), 'w') as f: + if scene.mtl_name: + f.write(f'mtllib {scene.mtl_name}.mtl') + face_index_increment = 1 + for sub_model in scene.sub_meshes: + obj, fii = sub_model.to_obj(face_index_increment) + f.write(obj) + face_index_increment += fii + if scene.mtl_name and not scene.skip_mtl_export: with open(os.path.join(output_path, f'{scene.mtl_name}.mtl'), 'w') as f: for texture_name in sorted(list({x for x in scene.mtl_texture_names})): f.write(mtl_entry_template.substitute({ @@ -233,7 +237,7 @@ def export_scenes(scenes: List[Scene], output_path: str, settings): script = '' for scene in scenes: script += '\n\n' + import_template.substitute({ - 'obj_file_path': f'{scene.obj_name}.obj', + 'obj_file_path': f'{scene.obj_name}.obj' if not scene.skip_obj_export else '', 'dummies': json.dumps(scene.dummies), 'curves': json.dumps(scene.curves), 'extra_script': scene.extra_script, @@ -250,6 +254,7 @@ def export_scenes(scenes: List[Scene], output_path: str, settings): if not settings.geometry__save_obj: for scene in scenes: - os.unlink(os.path.join(output_path, scene.obj_name + '.obj')) - if scene.mtl_name and not scene.external_mtl: + if not scene.skip_obj_export: + os.unlink(os.path.join(output_path, scene.obj_name + '.obj')) + if scene.mtl_name and not scene.skip_mtl_export: os.unlink(os.path.join(output_path, scene.mtl_name + '.mtl')) diff --git a/serializers/maps.py b/serializers/maps.py index f0ba2a3..3841163 100644 --- a/serializers/maps.py +++ b/serializers/maps.py @@ -392,22 +392,6 @@ def _prop_json(self, data: dict, instance, is_opened_track, } return res - def _save_mtl(self, terrain_data, path: str, name): - with open(os.path.join(path, 'terrain.mtl'), 'w') as f: - texture_names = list(set( - sum([x['texture_names'] for x in terrain_data], []) - + [x['chunk'].fence_texture_name for x in terrain_data if x['chunk'].fence_texture_name] - )) - texture_names.sort() - for texture_name in texture_names: - f.write(f"""\n\nnewmtl {texture_name} - Ka 1.000000 1.000000 1.000000 - Kd 1.000000 1.000000 1.000000 - Ks 0.000000 0.000000 0.000000 - illum 1 - Ns 0.000000 - map_Kd ../../ETRACKFM/{name[:3]}_001.FAM/background/{texture_name}.png""") - def mtl_append_foreground_textures(self, data, path, name): foreground_texture_names = list(set( ['foreground/' + self._texture_ids(x['data']['data']['resource_id'], @@ -519,20 +503,18 @@ def position_mesh(mesh): def serialize(self, data: dict, path: str, id=None, block=None, **kwargs): super().serialize(data, path) - # this serializer mutates data when exchanging axis to Z-up - original_data = data - data = deepcopy(data) is_opened = data['loop_chunk'] == 0 map_scene = Scene(name='map', obj_name='map', - mtl_name='terrain') + mtl_name='terrain', + mtl_texture_path_func=lambda + x: f'../../ETRACKFM/{id.split("/")[-1][:3]}_001.FAM/background/{x}.png', + skip_obj_export=self.settings.maps__save_as_chunked) scenes = [map_scene] - assert data == original_data - spline = data['road_spline'][:len(data['terrain']) * 4] - map_scene.curves.append({ + curve = { 'name': 'road_path', 'closed': not is_opened, 'points': [[x['position']['x'], x['position']['z'], x['position']['y']] @@ -551,14 +533,14 @@ def serialize(self, data: dict, path: str, id=None, block=None, **kwargs): range(len(data['terrain']) * 4)], 'max_traffic_speed': [data['ai_info'][math.floor(i / 4)]['max_traffic_speed'] for i in range(len(data['terrain']) * 4)], - # a terminal road path point: when go backwards, race ends after this point - 'start_point_index': 12 if is_opened else 0, - # a finish road path point - 'finish_point_index': data['num_chunks'] * 4 - (179 if is_opened else 1) }, - }) - - assert data == original_data + } + if is_opened: + # a terminal road path point: when go backwards, race ends after this point + curve['properties']['start_point_index'] = 12 + # a finish road path point + curve['properties']['finish_point_index'] = data['num_chunks'] * 4 - 179 + map_scene.curves.append(curve) chunks = [] for (i, terrain_entry) in enumerate(data['terrain']): @@ -580,17 +562,14 @@ def serialize(self, data: dict, path: str, id=None, block=None, **kwargs): chunk.has_right_fence = terrain_entry['fence']['has_right_fence'] chunks.append(chunk) - assert data == original_data - for i, chunk in enumerate(chunks): chunk.next_chunk = (chunks[i + 1] if (i < len(chunks) - 1) else (None if is_opened else chunks[0])) - assert data == original_data - for (i, terrain_entry) in enumerate(data['terrain']): texture_names = [self._get_texture_name_from_id(is_opened, tid) for tid in terrain_entry['texture_ids']] + map_scene.mtl_texture_names.extend(texture_names) meshes = chunks[i].build_models(i, texture_names) for mesh in meshes: mesh.change_axes(new_z='y', new_y='z') @@ -600,20 +579,19 @@ def serialize(self, data: dict, path: str, id=None, block=None, **kwargs): data['road_spline'][i * 4]['position']['z'], data['road_spline'][i * 4]['position']['y'], ) - dummy_children = None - if i < len(data['terrain']) - 1: - dummy_children = [f'chunk_{i + 1}'] - elif not is_opened: - dummy_children = ['chunk_0'] - map_scene.dummies.append({ + dummy = { 'name': f'chunk_{i}', 'position': position, 'properties': { 'is_chunk': True, 'chunk': f'terrain_chunk_{i}', - 'children': dummy_children }, - }) + } + if i < len(data['terrain']) - 1: + dummy['properties']['children'] = [f'chunk_{i + 1}'] + elif not is_opened: + dummy['properties']['children'] = ['chunk_0'] + map_scene.dummies.append(dummy) for mesh in meshes: mesh.pivot_offset = position scene = Scene(name=f'terrain_chunk_{i}', @@ -621,7 +599,7 @@ def serialize(self, data: dict, path: str, id=None, block=None, **kwargs): obj_name=f'terrain_chunk_{i}', mtl_name='terrain', bake_textures=False, - external_mtl=True) + skip_mtl_export=True) scene.dummies = [self._prop_json(data, o, is_opened, True) for o in data['props'] if (i + 1) * 4 > o['road_point_idx'] >= i * 4] @@ -656,8 +634,6 @@ def serialize(self, data: dict, path: str, id=None, block=None, **kwargs): 'rotation': [data['road_spline'][18]['slope'], 0, 0] }) - assert data == original_data - if self.settings.maps__save_invisible_wall_collisions: left_barrier_points = self.BarrierPath( [[rp['position']['x'] + rp['left_barrier'] * math.cos(rp['orientation'] + math.pi), @@ -696,12 +672,8 @@ def serialize(self, data: dict, path: str, id=None, block=None, **kwargs): }), }) - assert data == original_data - export_scenes(scenes, path, self.settings) - assert data == original_data - # if self.settings.maps__add_props_to_obj: # self.mtl_append_foreground_textures(data, path, id.split('/')[-1]) From a58e86f8ed8d7e32e796042c0753c6d2172898de Mon Sep 17 00:00:00 2001 From: Andy Date: Wed, 22 Jan 2025 19:08:03 +0200 Subject: [PATCH 21/36] fix regressions --- serializers/maps.py | 1 + 1 file changed, 1 insertion(+) diff --git a/serializers/maps.py b/serializers/maps.py index 3841163..e1036ec 100644 --- a/serializers/maps.py +++ b/serializers/maps.py @@ -560,6 +560,7 @@ def serialize(self, data: dict, path: str, id=None, block=None, **kwargs): else '0/ga00') chunk.has_left_fence = terrain_entry['fence']['has_left_fence'] chunk.has_right_fence = terrain_entry['fence']['has_right_fence'] + map_scene.mtl_texture_names.append(chunk.fence_texture_name) chunks.append(chunk) for i, chunk in enumerate(chunks): From 30c777799f2c2cc055213b4b3af4e36b4213012c Mon Sep 17 00:00:00 2001 From: andy Date: Fri, 24 Jan 2025 00:27:56 +0200 Subject: [PATCH 22/36] cleanup; returned back logic to bake props to tnfs track scene --- frontend/dist/gui/index.html | 2 +- ...653dd90918.js => main.77fc00c1ac1f64f1.js} | 2 +- .../tri-map.block-ui.component.ts | 2 +- serializers/common/three_d/__init__.py | 3 + .../common/three_d}/blender_scripts.py | 0 .../three_d}/build_blender_scene.py | 0 serializers/common/three_d/mesh.py | 132 +++++++++ serializers/common/three_d/scenes.py | 130 +++++++++ serializers/common/three_d/splines.py | 62 +++++ serializers/common/three_d_scenes.py | 260 ------------------ serializers/geometries.py | 2 +- serializers/maps.py | 240 +++++----------- 12 files changed, 406 insertions(+), 429 deletions(-) rename frontend/dist/gui/{main.03a91b653dd90918.js => main.77fc00c1ac1f64f1.js} (85%) create mode 100644 serializers/common/three_d/__init__.py rename {library/utils => serializers/common/three_d}/blender_scripts.py (100%) rename serializers/{misc => common/three_d}/build_blender_scene.py (100%) create mode 100644 serializers/common/three_d/mesh.py create mode 100644 serializers/common/three_d/scenes.py create mode 100644 serializers/common/three_d/splines.py delete mode 100644 serializers/common/three_d_scenes.py diff --git a/frontend/dist/gui/index.html b/frontend/dist/gui/index.html index e67095f..7a54de7 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.03a91b653dd90918.js b/frontend/dist/gui/main.77fc00c1ac1f64f1.js similarity index 85% rename from frontend/dist/gui/main.03a91b653dd90918.js rename to frontend/dist/gui/main.77fc00c1ac1f64f1.js index 0726be1..27569e7 100644 --- a/frontend/dist/gui/main.03a91b653dd90918.js +++ b/frontend/dist/gui/main.77fc00c1ac1f64f1.js @@ -1 +1 @@ -(self.webpackChunkgui=self.webpackChunkgui||[]).push([[179],{360:(Bo,Gs,ps)=>{"use strict";function dn(i){return"function"==typeof i}function z(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 Br=z(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 Kr(i,t){if(i){const e=i.indexOf(t);0<=e&&i.splice(e,1)}}class Qt{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(dn(n))try{n()}catch(s){t=s instanceof Br?s.errors:[s]}const{_finalizers:r}=this;if(r){this._finalizers=null;for(const s of r)try{Ga(s)}catch(o){t=t??[],o instanceof Br?t=[...t,...o.errors]:t.push(o)}}if(t)throw new Br(t)}}add(t){var e;if(t&&t!==this)if(this.closed)Ga(t);else{if(t instanceof Qt){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)&&Kr(e,t)}remove(t){const{_finalizers:e}=this;e&&Kr(e,t),t instanceof Qt&&t._removeParent(this)}}Qt.EMPTY=(()=>{const i=new Qt;return i.closed=!0,i})();const Un=Qt.EMPTY;function Dl(i){return i instanceof Qt||i&&"closed"in i&&dn(i.remove)&&dn(i.add)&&dn(i.unsubscribe)}function Ga(i){dn(i)?i():i.unsubscribe()}const Ws={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 Si(i){Ci.setTimeout(()=>{const{onUnhandledError:t}=Ws;if(!t)throw i;t(i)})}function ms(){}const js=On("C",void 0,void 0);function On(i,t,e){return{kind:i,value:t,error:e}}let ur=null;function mc(i){if(Ws.useDeprecatedSynchronousErrorHandling){const t=!ur;if(t&&(ur={errorThrown:!1,error:null}),i(),t){const{errorThrown:e,error:n}=ur;if(ur=null,e)throw n}}else i()}class Tl extends Qt{constructor(t){super(),this.isStopped=!1,t?(this.destination=t,Dl(t)&&t.add(this)):this.destination=ME}static create(t,e,n){return new fa(t,e,n)}next(t){this.isStopped?Xg(function Uo(i){return On("N",i,void 0)}(t),this):this._next(t)}error(t){this.isStopped?Xg(function Ys(i){return On("E",void 0,i)}(t),this):(this.isStopped=!0,this._error(t))}complete(){this.isStopped?Xg(js,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 ha=Function.prototype.bind;function Il(i,t){return ha.call(i,t)}class Wa{constructor(t){this.partialObserver=t}next(t){const{partialObserver:e}=this;if(e.next)try{e.next(t)}catch(n){md(n)}}error(t){const{partialObserver:e}=this;if(e.error)try{e.error(t)}catch(n){md(n)}else md(t)}complete(){const{partialObserver:t}=this;if(t.complete)try{t.complete()}catch(e){md(e)}}}class fa extends Tl{constructor(t,e,n){let r;if(super(),dn(t)||!t)r={next:t??void 0,error:e??void 0,complete:n??void 0};else{let s;this&&Ws.useDeprecatedNextContext?(s=Object.create(t),s.unsubscribe=()=>this.unsubscribe(),r={next:t.next&&Il(t.next,s),error:t.error&&Il(t.error,s),complete:t.complete&&Il(t.complete,s)}):r=t}this.destination=new Wa(r)}}function md(i){Ws.useDeprecatedSynchronousErrorHandling?function ua(i){Ws.useDeprecatedSynchronousErrorHandling&&ur&&(ur.errorThrown=!0,ur.error=i)}(i):Si(i)}function Xg(i,t){const{onStoppedNotification:e}=Ws;e&&Ci.setTimeout(()=>e(i,t))}const ME={closed:!0,next:ms,error:function wE(i){throw i},complete:ms},Kg="function"==typeof Symbol&&Symbol.observable||"@@observable";function ja(i){return i}function l0(i){return 0===i.length?ja:1===i.length?i[0]:function(e){return i.reduce((n,r)=>r(n),e)}}let In=(()=>{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 Tl||function SE(i){return i&&dn(i.next)&&dn(i.error)&&dn(i.complete)}(i)&&Dl(i)}(e)?e:new fa(e,n,r);return mc(()=>{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=Ya(n))((r,s)=>{const o=new fa({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)}[Kg](){return this}pipe(...e){return l0(e)(this)}toPromise(e){return new(e=Ya(e))((n,r)=>{let s;this.subscribe(o=>s=o,o=>r(o),()=>n(s))})}}return i.create=t=>new i(t),i})();function Ya(i){var t;return null!==(t=i??Ws.Promise)&&void 0!==t?t:Promise}const pa=z(i=>function(){i(this),this.name="ObjectUnsubscribedError",this.message="object unsubscribed"});let Te=(()=>{class i extends In{constructor(){super(),this.closed=!1,this.currentObservers=null,this.observers=[],this.isStopped=!1,this.hasError=!1,this.thrownError=null}lift(e){const n=new c0(this,this);return n.operator=e,n}_throwIfClosed(){if(this.closed)throw new pa}next(e){mc(()=>{if(this._throwIfClosed(),!this.isStopped){this.currentObservers||(this.currentObservers=Array.from(this.observers));for(const n of this.currentObservers)n.next(e)}})}error(e){mc(()=>{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(){mc(()=>{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?Un:(this.currentObservers=null,s.push(e),new Qt(()=>{this.currentObservers=null,Kr(s,e)}))}_checkFinalizedStatuses(e){const{hasError:n,thrownError:r,isStopped:s}=this;n?e.error(r):s&&e.complete()}asObservable(){const e=new In;return e.source=this,e}}return i.create=(t,e)=>new c0(t,e),i})();class c0 extends Te{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:Un}}function d0(i){return dn(i?.lift)}function ni(i){return t=>{if(d0(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 qn(i,t,e,n,r){return new EE(i,t,e,n,r)}class EE extends Tl{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 tt(i,t){return ni((e,n)=>{let r=0;e.subscribe(qn(n,s=>{n.next(i.call(t,s,r++))}))})}function ma(i){return this instanceof ma?(this.v=i,this):new ma(i)}function Bf(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 Zg(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 i_=i=>i&&"number"==typeof i.length&&"function"!=typeof i;function r_(i){return dn(i?.then)}function m0(i){return dn(i[Kg])}function g0(i){return Symbol.asyncIterator&&dn(i?.[Symbol.asyncIterator])}function _0(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 v0=function s_(){return"function"==typeof Symbol&&Symbol.iterator?Symbol.iterator:"@@iterator"}();function Uf(i){return dn(i?.[v0])}function y0(i){return function Nf(i,t,e){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var r,n=e.apply(i,t||[]),s=[];return r=Object.create(("function"==typeof AsyncIterator?AsyncIterator:Object).prototype),a("next"),a("throw"),a("return",function o(m){return function(g){return Promise.resolve(g).then(m,h)}}),r[Symbol.asyncIterator]=function(){return this},r;function a(m,g){n[m]&&(r[m]=function(b){return new Promise(function(v,y){s.push([m,b,v,y])>1||l(m,b)})},g&&(r[m]=g(r[m])))}function l(m,g){try{!function c(m){m.value instanceof ma?Promise.resolve(m.value.v).then(d,h):p(s[0][2],m)}(n[m](g))}catch(b){p(s[0][3],b)}}function d(m){l("next",m)}function h(m){l("throw",m)}function p(m,g){m(g),s.shift(),s.length&&l(s[0][0],s[0][1])}}(this,arguments,function*(){const e=i.getReader();try{for(;;){const{value:n,done:r}=yield ma(e.read());if(r)return yield ma(void 0);yield yield ma(n)}}finally{e.releaseLock()}})}function b0(i){return dn(i?.getReader)}function Mr(i){if(i instanceof In)return i;if(null!=i){if(m0(i))return function LE(i){return new In(t=>{const e=i[Kg]();if(dn(e.subscribe))return e.subscribe(t);throw new TypeError("Provided object does not correctly implement Symbol.observable")})}(i);if(i_(i))return function NE(i){return new In(t=>{for(let e=0;e{i.then(e=>{t.closed||(t.next(e),t.complete())},e=>t.error(e)).then(null,Si)})}(i);if(g0(i))return x0(i);if(Uf(i))return function UE(i){return new In(t=>{for(const e of i)if(t.next(e),t.closed)return;t.complete()})}(i);if(b0(i))return function w0(i){return x0(y0(i))}(i)}throw _0(i)}function x0(i){return new In(t=>{(function VE(i,t){var e,n,r,s;return function _d(i,t,e,n){return new(e||(e=Promise))(function(s,o){function a(d){try{c(n.next(d))}catch(h){o(h)}}function l(d){try{c(n.throw(d))}catch(h){o(h)}}function c(d){d.done?s(d.value):function r(s){return s instanceof e?s:new e(function(o){o(s)})}(d.value).then(a,l)}c((n=n.apply(i,t||[])).next())})}(this,void 0,void 0,function*(){try{for(e=Bf(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 Xa(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 rr(i,t,e=1/0){return dn(t)?rr((n,r)=>tt((s,o)=>t(n,s,r,o))(Mr(i(n,r))),e):("number"==typeof t&&(e=t),ni((n,r)=>function zE(i,t,e,n,r,s,o,a){const l=[];let c=0,d=0,h=!1;const p=()=>{h&&!l.length&&!c&&t.complete()},m=b=>c{s&&t.next(b),c++;let v=!1;Mr(e(b,d++)).subscribe(qn(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(qn(t,m,()=>{h=!0,p()})),()=>{a?.()}}(n,r,i,e)))}function bd(i=1/0){return rr(ja,i)}const _o=new In(i=>i.complete());function $u(i){return i&&dn(i.schedule)}function a_(i){return i[i.length-1]}function M0(i){return dn(a_(i))?i.pop():void 0}function Gu(i){return $u(a_(i))?i.pop():void 0}function l_(i,t=0){return ni((e,n)=>{e.subscribe(qn(n,r=>Xa(n,i,()=>n.next(r),t),()=>Xa(n,i,()=>n.complete(),t),r=>Xa(n,i,()=>n.error(r),t)))})}function c_(i,t=0){return ni((e,n)=>{n.add(i.schedule(()=>e.subscribe(n),t))})}function d_(i,t){if(!i)throw new Error("Iterable cannot be null");return new In(e=>{Xa(e,t,()=>{const n=i[Symbol.asyncIterator]();Xa(e,t,()=>{n.next().then(r=>{r.done?e.complete():e.next(r.value)})},0,!0)})})}function Ni(i,t){return t?function E0(i,t){if(null!=i){if(m0(i))return function $E(i,t){return Mr(i).pipe(c_(t),l_(t))}(i,t);if(i_(i))return function WE(i,t){return new In(e=>{let n=0;return t.schedule(function(){n===i.length?e.complete():(e.next(i[n++]),e.closed||this.schedule())})})}(i,t);if(r_(i))return function GE(i,t){return Mr(i).pipe(c_(t),l_(t))}(i,t);if(g0(i))return d_(i,t);if(Uf(i))return function jE(i,t){return new In(e=>{let n;return Xa(e,t,()=>{n=i[v0](),Xa(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)}),()=>dn(n?.return)&&n.return()})}(i,t);if(b0(i))return function S0(i,t){return d_(y0(i),t)}(i,t)}throw _0(i)}(i,t):Mr(i)}function Cr(...i){const t=Gu(i),e=function C0(i,t){return"number"==typeof a_(i)?i.pop():t}(i,1/0),n=i;return n.length?1===n.length?Mr(n[0]):bd(e)(Ni(n,t)):_o}function Vf(i={}){const{connector:t=(()=>new Te),resetOnError:e=!0,resetOnComplete:n=!0,resetOnRefCountZero:r=!0}=i;return s=>{let o,a,l,c=0,d=!1,h=!1;const p=()=>{a?.unsubscribe(),a=void 0},m=()=>{p(),o=l=void 0,d=h=!1},g=()=>{const b=o;m(),b?.unsubscribe()};return ni((b,v)=>{c++,!h&&!d&&p();const y=l=l??t();v.add(()=>{c--,0===c&&!h&&!d&&(a=xd(g,r))}),y.subscribe(v),!o&&c>0&&(o=new fa({next:M=>y.next(M),error:M=>{h=!0,p(),a=xd(m,e,M),y.error(M)},complete:()=>{d=!0,p(),a=xd(m,n),y.complete()}}),Mr(b).subscribe(o))})(s)}}function xd(i,t,...e){if(!0===t)return void i();if(!1===t)return;const n=new fa({next:()=>{n.unsubscribe(),i()}});return Mr(t(...e)).subscribe(n)}function ci(i){for(let t in i)if(i[t]===ci)return t;throw Error("Could not find renamed property on target object.")}function u_(i,t){for(const e in t)t.hasOwnProperty(e)&&!i.hasOwnProperty(e)&&(i[e]=t[e])}function mi(i){if("string"==typeof i)return i;if(Array.isArray(i))return"["+i.map(mi).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 zf(i,t){return null==i||""===i?null===t?"":t:null==t||""===t?i:i+" "+t}const h_=ci({__forward_ref__:ci});function Gn(i){return i.__forward_ref__=Gn,i.toString=function(){return mi(this())},i}function Ot(i){return Wu(i)?i():i}function Wu(i){return"function"==typeof i&&i.hasOwnProperty(h_)&&i.__forward_ref__===Gn}function ju(i){return i&&!!i.\u0275providers}const qu="https://g.co/ng/security#xss";class pe extends Error{constructor(t,e){super(Hf(t,e)),this.code=t}}function Hf(i,t){return`NG0${Math.abs(i)}${t?": "+t.trim():""}`}function Jt(i){return"string"==typeof i?i:null==i?"":String(i)}function $f(i,t){throw new pe(-201,!1)}function En(i,t){null==i&&function ii(i,t,e,n){throw new Error(`ASSERTION ERROR: ${i}`+(null==n?"":` [Expected=> ${e} ${n} ${t} <=Actual]`))}(t,i,null,"!=")}function Pe(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 f_(i,wd)||f_(i,m_)}function f_(i,t){return i.hasOwnProperty(t)?i[t]:null}function p_(i){return i&&(i.hasOwnProperty(gs)||i.hasOwnProperty(T0))?i[gs]:null}const wd=ci({\u0275prov:ci}),gs=ci({\u0275inj:ci}),m_=ci({ngInjectableDef:ci}),T0=ci({ngInjectorDef:ci});var Ft=(()=>((Ft=Ft||{})[Ft.Default=0]="Default",Ft[Ft.Host=1]="Host",Ft[Ft.Self=2]="Self",Ft[Ft.SkipSelf=4]="SkipSelf",Ft[Ft.Optional=8]="Optional",Ft))();let Wf;function Xs(i){const t=Wf;return Wf=i,t}function _s(i,t,e){const n=Gf(i);return n&&"root"==n.providedIn?void 0===n.value?n.value=n.factory():n.value:e&Ft.Optional?null:void 0!==t?t:void $f(mi(i))}const Rn=(()=>typeof globalThis<"u"&&globalThis||typeof global<"u"&&global||typeof window<"u"&&window||typeof self<"u"&&typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&self)(),kl={},Ku="__NG_DI_FLAG__",gi="ngTempTokenPath",Pl="ngTokenPath",g_=/\n/gm,eA="\u0275",jf="__source";let Zu;function Md(i){const t=Zu;return Zu=i,t}function tA(i,t=Ft.Default){if(void 0===Zu)throw new pe(-203,!1);return null===Zu?_s(i,void 0,t):Zu.get(i,t&Ft.Optional?null:void 0,t)}function ee(i,t=Ft.Default){return(function I0(){return Wf}()||tA)(Ot(i),t)}function Lt(i,t=Ft.Default){return ee(i,Yf(t))}function Yf(i){return typeof i>"u"||"number"==typeof i?i:0|(i.optional&&8)|(i.host&&1)|(i.self&&2)|(i.skipSelf&&4)}function qf(i){const t=[];for(let e=0;e((vo=vo||{})[vo.OnPush=0]="OnPush",vo[vo.Default=1]="Default",vo))(),Ks=(()=>{return(i=Ks||(Ks={}))[i.Emulated=0]="Emulated",i[i.None=2]="None",i[i.ShadowDom=3]="ShadowDom",Ks;var i})();const Za={},Wn=[],Ur=ci({\u0275cmp:ci}),Ju=ci({\u0275dir:ci}),yc=ci({\u0275pipe:ci}),y_=ci({\u0275mod:ci}),ga=ci({\u0275fac:ci}),eh=ci({__NG_ELEMENT_ID__:ci});let nA=0;function ot(i){return Ka(()=>{const t=yo(i),e={...t,decls:i.decls,vars:i.vars,template:i.template,consts:i.consts||null,ngContentSelectors:i.ngContentSelectors,onPush:i.changeDetection===vo.OnPush,directiveDefs:null,pipeDefs:null,dependencies:t.standalone&&i.dependencies||null,getStandaloneInjector:null,data:i.data||{},encapsulation:i.encapsulation||Ks.Emulated,id:"c"+nA++,styles:i.styles||Wn,_:null,schemas:i.schemas||null,tView:null};b_(e);const n=i.dependencies;return e.directiveDefs=Kf(n,!1),e.pipeDefs=Kf(n,!0),e})}function th(i,t,e){const n=i.\u0275cmp;n.directiveDefs=Kf(t,!1),n.pipeDefs=Kf(e,!0)}function iA(i){return Hn(i)||Vr(i)}function Sd(i){return null!==i}function en(i){return Ka(()=>({type:i.type,bootstrap:i.bootstrap||Wn,declarations:i.declarations||Wn,imports:i.imports||Wn,exports:i.exports||Wn,transitiveCompileScopes:null,schemas:i.schemas||null,id:i.id||null}))}function Xf(i,t){if(null==i)return Za;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 ve(i){return Ka(()=>{const t=yo(i);return b_(t),t})}function $i(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 Hn(i){return i[Ur]||null}function Vr(i){return i[Ju]||null}function vs(i){return i[yc]||null}function hr(i,t){const e=i[y_]||null;if(!e&&!0===t)throw new Error(`Type ${mi(i)} does not have '\u0275mod' property.`);return e}function yo(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||Wn,viewQuery:i.viewQuery||null,features:i.features||null,setInput:null,findHostDirectiveDefs:null,hostDirectives:null,inputs:Xf(i.inputs,t),outputs:Xf(i.outputs)}}function b_(i){i.features?.forEach(t=>t(i))}function Kf(i,t){if(!i)return null;const e=t?vs:iA;return()=>("function"==typeof i?i():i).map(n=>e(n)).filter(Sd)}const Qa=0,lt=1,fn=2,Bi=3,ys=4,X=5,he=6,ae=7,ze=8,jt=9,Vn=10,xt=11,ai=12,bc=13,k0=14,Er=15,sr=16,nh=17,Ho=18,Zs=19,Ol=20,ri=21,bi=22,Ad=1,P0=2,Zf=7,Qf=8,Ja=9,Ui=10;function bs(i){return Array.isArray(i)&&"object"==typeof i[Ad]}function xs(i){return Array.isArray(i)&&!0===i[Ad]}function Jf(i){return 0!=(4&i.flags)}function Dd(i){return i.componentOffset>-1}function xc(i){return 1==(1&i.flags)}function bo(i){return!!i.template}function ih(i){return 0!=(256&i[fn])}function el(i,t){return i.hasOwnProperty(ga)?i[ga]:null}class Id{constructor(t,e,n){this.previousValue=t,this.currentValue=e,this.firstChange=n}isFirstChange(){return this.firstChange}}function xi(){return Rd}function Rd(i){return i.type.prototype.ngOnChanges&&(i.setInput=kd),np}function np(){const i=B0(this),t=i?.current;if(t){const e=i.previous;if(e===Za)i.previous=t;else for(let n in t)e[n]=t[n];i.current=null,this.ngOnChanges(t)}}function kd(i,t,e,n){const r=this.declaredInputs[e],s=B0(i)||function lA(i,t){return i[N0]=t}(i,{previous:Za,current:null}),o=s.current||(s.current={}),a=s.previous,l=a[r];o[r]=new Id(l&&l.currentValue,t,a===Za),i[n]=t}xi.ngInherit=!0;const N0="__ngSimpleChanges__";function B0(i){return i[N0]||null}const Qr=function(i,t,e){},Pd="svg";function I(i){for(;Array.isArray(i);)i=i[Qa];return i}function wc(i,t){return I(t[i])}function Ai(i,t){return I(t[i.index])}function U0(i,t){return i.data[t]}function Fd(i,t){return i[t]}function ws(i,t){const e=t[i];return bs(e)?e:e[Qa]}function ip(i){return 64==(64&i[fn])}function Fl(i,t){return null==t?null:i[t]}function V0(i){i[Ho]=0}function A_(i,t){i[X]+=t;let e=i,n=i[Bi];for(;null!==n&&(1===t&&1===e[X]||-1===t&&0===e[X]);)n[X]+=t,e=n,n=n[Bi]}const Pt={lFrame:nl(null),bindingsEnabled:!0};function _a(){return Pt.bindingsEnabled}function Se(){return Pt.lFrame.lView}function zn(){return Pt.lFrame.tView}function Vt(i){return Pt.lFrame.contextLView=i,i[ze]}function Et(i){return Pt.lFrame.contextLView=null,i}function Ar(){let i=H0();for(;null!==i&&64===i.type;)i=i.parent;return i}function H0(){return Pt.lFrame.currentTNode}function va(i,t){const e=Pt.lFrame;e.currentTNode=i,e.isParent=t}function D_(){return Pt.lFrame.isParent}function T_(){Pt.lFrame.isParent=!1}function zr(){const i=Pt.lFrame;let t=i.bindingRootIndex;return-1===t&&(t=i.bindingRootIndex=i.tView.bindingStartIndex),t}function Ll(){return Pt.lFrame.bindingIndex++}function Qs(i){const t=Pt.lFrame,e=t.bindingIndex;return t.bindingIndex=t.bindingIndex+i,e}function W0(i,t){const e=Pt.lFrame;e.bindingIndex=e.bindingRootIndex=i,$o(t)}function $o(i){Pt.lFrame.currentDirectiveIndex=i}function rh(i){const t=Pt.lFrame.currentDirectiveIndex;return-1===t?null:i[t]}function Nl(){return Pt.lFrame.currentQueryIndex}function Ms(i){Pt.lFrame.currentQueryIndex=i}function vA(i){const t=i[lt];return 2===t.type?t.declTNode:1===t.type?i[he]:null}function R_(i,t,e){if(e&Ft.SkipSelf){let r=t,s=i;for(;!(r=r.parent,null!==r||e&Ft.Host||(r=vA(s),null===r||(s=s[Er],10&r.type))););if(null===r)return!1;t=r,i=s}const n=Pt.lFrame=Ld();return n.currentTNode=t,n.lView=i,!0}function sp(i){const t=Ld(),e=i[lt];Pt.lFrame=t,t.currentTNode=e.firstChild,t.lView=i,t.tView=e,t.contextLView=i,t.bindingIndex=e.bindingStartIndex,t.inI18n=!1}function Ld(){const i=Pt.lFrame,t=null===i?null:i.child;return null===t?nl(i):t}function nl(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 k_(){const i=Pt.lFrame;return Pt.lFrame=i.parent,i.currentTNode=null,i.lView=null,i}const j0=k_;function Nd(){const i=k_();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 Kn(){return Pt.lFrame.selectedIndex}function il(i){Pt.lFrame.selectedIndex=i}function Di(){const i=Pt.lFrame;return U0(i.tView,i.selectedIndex)}function ki(){Pt.lFrame.currentNamespace=Pd}function ya(){!function Cc(){Pt.lFrame.currentNamespace=null}()}function Bd(i,t){for(let e=t.directiveStart,n=t.directiveEnd;e=n)break}else t[l]<0&&(i[Ho]+=65536),(a>11>16&&(3&i[fn])===t){i[fn]+=2048,Qr(4,a,s);try{s.call(a)}finally{Qr(5,a,s)}}}else{Qr(4,a,s);try{s.call(a)}finally{Qr(5,a,s)}}}const ba=-1;class Ud{constructor(t,e,n){this.factory=t,this.resolving=!1,this.canSeeViewProviders=e,this.injectImpl=n}}function L_(i,t,e){let n=0;for(;nt){o=s-1;break}}}for(;s>16}(i),n=t;for(;e>0;)n=n[Er],e--;return n}let Vd=!0;function dp(i){const t=Vd;return Vd=i,t}const B_=255,Q0=5;let J0=0;const xa={};function ah(i,t){const e=ex(i,t);if(-1!==e)return e;const n=t[lt];n.firstCreatePass&&(i.injectorIndex=t.length,lh(n.data,i),lh(t,null),lh(n.blueprint,null));const r=ch(i,t),s=i.injectorIndex;if(cp(r)){const o=sh(r),a=oh(r,t),l=a[lt].data;for(let c=0;c<8;c++)t[s+c]=a[o+c]|l[o+c]}return t[s+8]=r,s}function lh(i,t){i.push(0,0,0,0,0,0,0,0,t)}function ex(i,t){return-1===i.injectorIndex||i.parent&&i.parent.injectorIndex===i.injectorIndex||null===t[i.injectorIndex+8]?-1:i.injectorIndex}function ch(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=uh(r),null===n)return ba;if(e++,r=r[Er],-1!==n.injectorIndex)return n.injectorIndex|e<<16}return ba}function pn(i,t,e){!function U_(i,t,e){let n;"string"==typeof e?n=e.charCodeAt(0)||0:e.hasOwnProperty(eh)&&(n=e[eh]),null==n&&(n=e[eh]=J0++);const r=n&B_;t.data[i+(r>>Q0)]|=1<=0?t&B_:Js:t}(e);if("function"==typeof s){if(!R_(t,i,n))return n&Ft.Host?tx(r,0,n):zd(t,e,n,r);try{const o=s(n);if(null!=o||n&Ft.Optional)return o;$f()}finally{j0()}}else if("number"==typeof s){let o=null,a=ex(i,t),l=ba,c=n&Ft.Host?t[sr][he]:null;for((-1===a||n&Ft.SkipSelf)&&(l=-1===a?ch(i,t):t[a+8],l!==ba&&z_(n,!1)?(o=t[lt],a=sh(l),t=oh(l,t)):a=-1);-1!==a;){const d=t[lt];if(hp(s,a,d.data)){const h=EA(a,t,e,o,n,c);if(h!==xa)return h}l=t[a+8],l!==ba&&z_(n,t[lt].data[a+8]===c)&&hp(s,a,t)?(o=d,a=sh(l),t=oh(l,t)):a=-1}}return r}function EA(i,t,e,n,r,s){const o=t[lt],a=o.data[i+8],d=ts(a,o,e,null==n?Dd(a)&&Vd:n!=o&&0!=(3&a.type),r&Ft.Host&&s===a);return null!==d?Ac(t,o,d,a):xa}function ts(i,t,e,n,r){const s=i.providerIndexes,o=t.data,a=1048575&s,l=i.directiveStart,d=s>>20,p=r?a+d:i.directiveEnd;for(let m=n?a:a+d;m=l&&g.type===e)return m}if(r){const m=o[l];if(m&&bo(m)&&m.type===e)return l}return null}function Ac(i,t,e,n){let r=i[e];const s=t.data;if(function xA(i){return i instanceof Ud}(r)){const o=r;o.resolving&&function A0(i,t){const e=t?`. Dependency path: ${t.join(" > ")} > ${i}`:"";throw new pe(-200,`Circular dependency in DI detected for ${i}${e}`)}(function Xn(i){return"function"==typeof i?i.name||i.toString():"object"==typeof i&&null!=i&&"function"==typeof i.type?i.type.name||i.type.toString():Jt(i)}(s[e]));const a=dp(o.canSeeViewProviders);o.resolving=!0;const l=o.injectImpl?Xs(o.injectImpl):null;R_(i,n,Ft.Default);try{r=i[e]=o.factory(void 0,s,i,n),t.firstCreatePass&&e>=n.directiveStart&&function es(i,t,e){const{ngOnChanges:n,ngOnInit:r,ngDoCheck:s}=t.type.prototype;if(n){const o=Rd(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&&Xs(l),dp(a),o.resolving=!1,j0()}}return r}function hp(i,t,e){return!!(e[t+(i>>Q0)]&1<{const t=i.prototype.constructor,e=t[ga]||dh(t),n=Object.prototype;let r=Object.getPrototypeOf(i.prototype).constructor;for(;r&&r!==n;){const s=r[ga]||dh(r);if(s&&s!==e)return s;r=Object.getPrototypeOf(r)}return s=>new s})}function dh(i){return Wu(i)?()=>{const t=dh(Ot(i));return t&&t()}:el(i)}function uh(i){const t=i[lt],e=t.type;return 2===e?t.declTNode:1===e?i[he]:null}function wa(i){return function SA(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 Ma(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,d){const h=l.hasOwnProperty(Tc)?l[Tc]:Object.defineProperty(l,Tc,{value:[]})[Tc];for(;h.length<=d;)h.push(null);return(h[d]=h[d]||[]).push(o),l}}return e&&(r.prototype=Object.create(e.prototype)),r.prototype.ngMetadataName=i,r.annotationCls=r,r})}class me{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=Pe({token:this,providedIn:e.providedIn||"root",factory:e.factory}))}get multi(){return this}toString(){return`InjectionToken ${this._desc}`}}function Vl(i,t){i.forEach(e=>Array.isArray(e)?Vl(e,t):t(e))}function $_(i,t,e){t>=i.length?i.push(e):i.splice(t,0,e)}function mp(i,t){return t>=i.length-1?i.pop():i.splice(t,1)[0]}function Gd(i,t){const e=[];for(let n=0;n=0?i[1|n]=e:(n=~n,function IA(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 jd(i,t){const e=Rc(i,t);if(e>=0)return i[1|e]}function Rc(i,t){return function _p(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),Ss=Cd(Hd("Optional"),8),Ca=Cd(Hd("SkipSelf"),4);var Es=(()=>((Es=Es||{})[Es.Important=1]="Important",Es[Es.DashCase=2]="DashCase",Es))();const Sp=new Map;let yx=0;const iv="__ngContext__";function $r(i,t){bs(t)?(i[iv]=t[Ol],function bx(i){Sp.set(i[Ol],i)}(t)):i[iv]=t}let sv;function ov(i,t){return sv(i,t)}function vh(i){const t=i[Bi];return xs(t)?t[Bi]:t}function av(i){return Tx(i[bc])}function lv(i){return Tx(i[ys])}function Tx(i){for(;null!==i&&!xs(i);)i=i[ys];return i}function Ir(i,t,e,n,r){if(null!=n){let s,o=!1;xs(n)?s=n:bs(n)&&(o=!0,n=n[Qa]);const a=I(n);0===i&&null!==e?null==r?Fx(t,e,a):Oc(t,e,a,r||null,!0):1===i&&null!==e?Oc(t,e,a,r||null,!0):2===i?function mv(i,t,e){const n=Dp(i,t);n&&function QA(i,t,e,n){i.removeChild(t,e,n)}(i,n,t,e)}(t,a,o):3===i&&t.destroyNode(a),null!=s&&function Hx(i,t,e,n,r){const s=e[Zf];s!==I(e)&&Ir(t,i,n,s,r);for(let a=Ui;a0&&(i[e-1][ys]=n[ys]);const s=mp(i,Ui+t);!function WA(i,t){bh(i,t,t[xt],2,null,null),t[Qa]=null,t[he]=null}(n[lt],n);const o=s[Zs];null!==o&&o.detachView(s[lt]),n[Bi]=null,n[ys]=null,n[fn]&=-65}return n}function kx(i,t){if(!(128&t[fn])){const e=t[xt];e.destroyNode&&bh(i,t,e,3,null,null),function qA(i){let t=i[bc];if(!t)return hv(i[lt],i);for(;t;){let e=null;if(bs(t))e=t[bc];else{const n=t[Ui];n&&(e=n)}if(!e){for(;t&&!t[ys]&&t!==i;)bs(t)&&hv(t[lt],t),t=t[Bi];null===t&&(t=i),bs(t)&&hv(t[lt],t),e=t&&t[ys]}t=e}}(t)}}function hv(i,t){if(!(128&t[fn])){t[fn]&=-65,t[fn]|=128,function ZA(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===Ks.None||s===Ks.Emulated)return null}return Ai(n,e)}}(i,t.parent,e)}function Oc(i,t,e,n,r){i.insertBefore(t,e,n,r)}function Fx(i,t,e){i.appendChild(t,e)}function Lx(i,t,e,n,r){null!==n?Oc(i,t,e,n,r):Fx(i,t,e)}function Dp(i,t){return i.parentNode(t)}function Nx(i,t,e){return Ux(i,t,e)}let fv,kp,vv,Ux=function Bx(i,t,e){return 40&i.type?Ai(i,e):null};function yh(i,t,e,n){const r=Px(i,n,t),s=t[xt],a=Nx(n.parent||t[he],n,t);if(null!=r)if(Array.isArray(e))for(let l=0;li,createScript:i=>i,createScriptURL:i=>i})}catch{}return kp}()?.createHTML(i)||i}class zl{constructor(t){this.changingThisBreaksApplicationSecurity=t}toString(){return`SafeValue must use [property]=binding: ${this.changingThisBreaksApplicationSecurity} (see ${qu})`}}class a1 extends zl{getTypeName(){return"HTML"}}class l1 extends zl{getTypeName(){return"Style"}}class c1 extends zl{getTypeName(){return"Script"}}class d1 extends zl{getTypeName(){return"URL"}}class Op extends zl{getTypeName(){return"ResourceURL"}}function to(i){return i instanceof zl?i.changingThisBreaksApplicationSecurity:i}function Ea(i,t){const e=function u1(i){return i instanceof zl&&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 ${qu})`)}return e===t}class _1{constructor(t){this.inertDocumentHelper=t}getInertBodyElement(t){t=""+t;try{const e=(new window.DOMParser).parseFromString(Yd(t),"text/html").body;return null===e?this.inertDocumentHelper.getInertBodyElement(t):(e.removeChild(e.firstChild),e)}catch{return null}}}class v1{constructor(t){this.defaultDoc=t,this.inertDocument=this.defaultDoc.implementation.createHTMLDocument("sanitization-inert")}getInertBodyElement(t){const e=this.inertDocument.createElement("template");return e.innerHTML=Yd(t),e}}const y1=/^(?!javascript:)(?:[a-z0-9+.-]+:|[^&:\/?#]*(?:[\/?#]|$))/i;function xh(i){return(i=String(i)).match(y1)?i:"unsafe:"+i}function Aa(i){const t={};for(const e of i.split(","))t[e]=!0;return t}function Fc(...i){const t={};for(const e of i)for(const n in e)e.hasOwnProperty(n)&&(t[n]=!0);return t}const xv=Aa("area,br,col,hr,img,wbr"),wv=Aa("colgroup,dd,dt,li,p,tbody,td,tfoot,th,thead,tr"),Mv=Aa("rp,rt"),Cv=Fc(xv,Fc(wv,Aa("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")),Fc(Mv,Aa("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")),Fc(Mv,wv)),qd=Aa("background,cite,href,itemtype,longdesc,poster,src,xlink:href"),Xx=Fc(qd,Aa("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"),Aa("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")),Ev=Aa("script,style,template");class Kx{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(!Cv.hasOwnProperty(e))return this.sanitizedSomething=!0,!Ev.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();Cv.hasOwnProperty(e)&&!xv.hasOwnProperty(e)&&(this.buf.push(""))}chars(t){this.buf.push(Zx(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 x1=/[\uD800-\uDBFF][\uDC00-\uDFFF]/g,w1=/([^\#-~ |!])/g;function Zx(i){return i.replace(/&/g,"&").replace(x1,function(t){return"&#"+(1024*(t.charCodeAt(0)-55296)+(t.charCodeAt(1)-56320)+65536)+";"}).replace(w1,function(t){return"&#"+t.charCodeAt(0)+";"}).replace(//g,">")}let Lp;function Qx(i,t){let e=null;try{Lp=Lp||function qx(i){const t=new v1(i);return function Fp(){try{return!!(new window.DOMParser).parseFromString(Yd(""),"text/html")}catch{return!1}}()?new _1(t):t}(i);let n=t?String(t):"";e=Lp.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=Lp.getInertBodyElement(n)}while(n!==s);return Yd((new Kx).sanitizeChildren(Av(e)||e))}finally{if(e){const n=Av(e)||e;for(;n.firstChild;)n.removeChild(n.firstChild)}}}function Av(i){return"content"in i&&function M1(i){return i.nodeType===Node.ELEMENT_NODE&&"TEMPLATE"===i.nodeName}(i)?i.content:null}var Zn=(()=>((Zn=Zn||{})[Zn.NONE=0]="NONE",Zn[Zn.HTML=1]="HTML",Zn[Zn.STYLE=2]="STYLE",Zn[Zn.SCRIPT=3]="SCRIPT",Zn[Zn.URL=4]="URL",Zn[Zn.RESOURCE_URL=5]="RESOURCE_URL",Zn))();function Np(i){const t=function wi(){const i=Se();return i&&i[ai]}();return t?t.sanitize(Zn.URL,i)||"":Ea(i,"URL")?to(i):xh(Jt(i))}const Bp=new me("ENVIRONMENT_INITIALIZER"),ol=new me("INJECTOR",-1),ew=new me("INJECTOR_DEF_TYPES");class tw{get(t,e=kl){if(e===kl){const n=new Error(`NullInjectorError: No provider for ${mi(t)}!`);throw n.name="NullInjectorError",n}return e}}function D1(...i){return{\u0275providers:nw(0,i),\u0275fromNgModule:!0}}function nw(i,...t){const e=[],n=new Set;let r;return Vl(t,s=>{const o=s;Dv(o,e,[],n)&&(r||(r=[]),r.push(o))}),void 0!==r&&Up(r,e),e}function Up(i,t){for(let e=0;e{t.push(s)})}}function Dv(i,t,e,n){if(!(i=Ot(i)))return!1;let r=null,s=p_(i);const o=!s&&Hn(i);if(s||o){if(o&&!o.standalone)return!1;r=i}else{const l=i.ngModule;if(s=p_(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)Dv(c,t,e,n)}}else{if(!s)return!1;{if(null!=s.imports&&!a){let c;n.add(r);try{Vl(s.imports,d=>{Dv(d,t,e,n)&&(c||(c=[]),c.push(d))})}finally{}void 0!==c&&Up(c,t)}if(!a){const c=el(r)||(()=>new r);t.push({provide:r,useFactory:c,deps:Wn},{provide:ew,useValue:r,multi:!0},{provide:Bp,useValue:()=>ee(r),multi:!0})}const l=s.providers;null==l||a||Vp(l,d=>{t.push(d)})}}return r!==i&&void 0!==i.providers}function Vp(i,t){for(let e of i)ju(e)&&(e=e.\u0275providers),Array.isArray(e)?Vp(e,t):t(e)}const zp=ci({provide:String,useValue:ci});function Mi(i){return null!==i&&"object"==typeof i&&zp in i}function Nc(i){return"function"==typeof i}const Iv=new me("Set Injector scope."),Hp={},I1={};let Rv;function wh(){return void 0===Rv&&(Rv=new tw),Rv}class io{}class $p extends io{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,Pv(t,o=>this.processProvider(o)),this.records.set(ol,jo(void 0,this)),r.has("environment")&&this.records.set(io,jo(void 0,this));const s=this.records.get(Iv);null!=s&&"string"==typeof s.value&&this.scopes.add(s.value),this.injectorDefTypes=new Set(this.get(ew.multi,Wn,Ft.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=Md(this),n=Xs(void 0);try{return t()}finally{Md(e),Xs(n)}}get(t,e=kl,n=Ft.Default){this.assertNotDestroyed(),n=Yf(n);const r=Md(this),s=Xs(void 0);try{if(!(n&Ft.SkipSelf)){let a=this.records.get(t);if(void 0===a){const l=function P1(i){return"function"==typeof i||"object"==typeof i&&i instanceof me}(t)&&Gf(t);a=l&&this.injectableDefInScope(l)?jo(kv(t),Hp):null,this.records.set(t,a)}if(null!=a)return this.hydrate(t,a)}return(n&Ft.Self?wh():this.parent).get(t,e=n&Ft.Optional&&e===kl?null:e)}catch(o){if("NullInjectorError"===o.name){if((o[gi]=o[gi]||[]).unshift(mi(t)),r)throw o;return function v_(i,t,e,n){const r=i[gi];throw t[jf]&&r.unshift(t[jf]),i.message=function R0(i,t,e,n=null){i=i&&"\n"===i.charAt(0)&&i.charAt(1)==eA?i.slice(2):i;let r=mi(t);if(Array.isArray(t))r=t.map(mi).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):mi(a)))}r=`{${s.join(", ")}}`}return`${e}${n?"("+n+")":""}[${r}]: ${i.replace(g_,"\n ")}`}("\n"+i.message,r,e,n),i[Pl]=r,i[gi]=null,i}(o,t,"R3InjectorError",this.source)}throw o}finally{Xs(s),Md(r)}}resolveInjectorInitializers(){const t=Md(this),e=Xs(void 0);try{const n=this.get(Bp.multi,Wn,Ft.Self);for(const r of n)r()}finally{Md(t),Xs(e)}}toString(){const t=[],e=this.records;for(const n of e.keys())t.push(mi(n));return`R3Injector[${t.join(", ")}]`}assertNotDestroyed(){if(this._destroyed)throw new pe(205,!1)}processProvider(t){let e=Nc(t=Ot(t))?t:Ot(t&&t.provide);const n=function Gp(i){return Mi(i)?jo(void 0,i.useValue):jo(As(i),Hp)}(t);if(Nc(t)||!0!==t.multi)this.records.get(e);else{let r=this.records.get(e);r||(r=jo(void 0,Hp,!0),r.factory=()=>qf(r.multi),this.records.set(e,r)),e=t,r.multi.push(t)}this.records.set(e,n)}hydrate(t,e){return e.value===Hp&&(e.value=I1,e.value=e.factory()),"object"==typeof e.value&&e.value&&function k1(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=Ot(t.providedIn);return"string"==typeof e?"any"===e||this.scopes.has(e):this.injectorDefTypes.has(e)}}function kv(i){const t=Gf(i),e=null!==t?t.factory:el(i);if(null!==e)return e;if(i instanceof me)throw new pe(204,!1);if(i instanceof Function)return function iw(i){const t=i.length;if(t>0)throw Gd(t,"?"),new pe(204,!1);const e=function Xu(i){return i&&(i[wd]||i[m_])||null}(i);return null!==e?()=>e.factory(i):()=>new i}(i);throw new pe(204,!1)}function As(i,t,e){let n;if(Nc(i)){const r=Ot(i);return el(r)||kv(r)}if(Mi(i))n=()=>Ot(i.useValue);else if(function Tv(i){return!(!i||!i.useFactory)}(i))n=()=>i.useFactory(...qf(i.deps||[]));else if(function Pi(i){return!(!i||!i.useExisting)}(i))n=()=>ee(Ot(i.useExisting));else{const r=Ot(i&&(i.useClass||i.provide));if(!function R1(i){return!!i.deps}(i))return el(r)||kv(r);n=()=>new r(...qf(i.deps))}return n}function jo(i,t,e=!1){return{factory:i,value:t,multi:e?[]:void 0}}function Pv(i,t){for(const e of i)Array.isArray(e)?Pv(e,t):e&&ju(e)?Pv(e.\u0275providers,t):t(e)}class O1{}class Ov{}class Mo{resolveComponentFactory(t){throw function al(i){const t=Error(`No component factory found for ${mi(i)}. Did you add it to @NgModule.entryComponents?`);return t.ngComponent=i,t}(t)}}let $l=(()=>{class i{}return i.NULL=new Mo,i})();function L1(){return Fn(Ar(),Se())}function Fn(i,t){return new vt(Ai(i,t))}let vt=(()=>{class i{constructor(e){this.nativeElement=e}}return i.__NG_ELEMENT_ID__=L1,i})();function rw(i){return i instanceof vt?i.nativeElement:i}class Gl{}let ll=(()=>{class i{}return i.__NG_ELEMENT_ID__=()=>function N1(){const i=Se(),e=ws(Ar().index,i);return(bs(e)?e:i)[xt]}(),i})(),B1=(()=>{class i{}return i.\u0275prov=Pe({token:i,providedIn:"root",factory:()=>null}),i})();class Bc{constructor(t){this.full=t,this.major=t.split(".")[0],this.minor=t.split(".")[1],this.patch=t.split(".").slice(2).join(".")}}const U1=new Bc("15.2.10"),Fv={},Lv="ngOriginalError";function Nv(i){return i[Lv]}class cl{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&&Nv(t);for(;e&&Nv(e);)e=Nv(e);return e||null}}function dl(i){return i instanceof Function?i():i}function ow(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 aw="ng-template";function Y1(i,t,e){let n=0,r=!0;for(;ns?"":r[h+1].toLowerCase();const m=8&n?p:null;if(m&&-1!==ow(m,c,0)||2&n&&c!==p){if(Yo(n))return!1;o=!0}}}}else{if(!o&&!Yo(n)&&!Yo(l))return!1;if(o&&Yo(l))continue;o=!1,n=l|1&n}}return Yo(n)||o}function Yo(i){return 0==(1&i)}function lw(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&&!Yo(o)&&(t+=Uc(s,r),r=""),n=o,s=s||!Yo(n);e++}return""!==r&&(t+=Uc(s,r)),t}const on={};function V(i){Hv(zn(),Se(),Kn()+i,!1)}function Hv(i,t,e,n){if(!n)if(3==(3&t[fn])){const s=i.preOrderCheckHooks;null!==s&&op(t,s,e)}else{const s=i.preOrderHooks;null!==s&&ap(t,s,0,e)}il(e)}function uw(i,t=null,e=null,n){const r=hw(i,t,e,n);return r.resolveInjectorInitializers(),r}function hw(i,t=null,e=null,n,r=new Set){const s=[e||Wn,D1(i)];return n=n||("object"==typeof i?void 0:mi(i)),new $p(s,t||wh(),n||null,r)}let Gi=(()=>{class i{static create(e,n){if(Array.isArray(e))return uw({name:""},n,e,"");{const r=e.name??"";return uw({name:r},e.parent,e.providers,r)}}}return i.THROW_IF_NOT_FOUND=kl,i.NULL=new tw,i.\u0275prov=Pe({token:i,providedIn:"any",factory:()=>ee(ol)}),i.__NG_ELEMENT_ID__=-1,i})();function E(i,t=Ft.Default){const e=Se();return null===e?ee(i,t):V_(Ar(),e,Ot(i),t)}function Co(){throw new Error("invalid")}function vw(i,t){const e=i.contentQueries;if(null!==e)for(let n=0;nbi&&Hv(i,t,bi,!1),Qr(o?2:0,r),e(n,r)}finally{il(s),Qr(o?3:1,r)}}function Zv(i,t,e){if(Jf(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,Ch(i,e,r.hostVars,on),r)}function be(i,t,e,n,r,s){const o=Ai(i,t);!function Xe(i,t,e,n,r,s,o){if(null==s)i.removeAttribute(t,r,e);else{const a=null==o?Jt(s):o(s,n||"",r);i.setAttribute(t,r,a,e)}}(t[xt],o,s,i.value,e,n,r)}function bt(i,t,e,n,r,s){const o=s[t];if(null!==o){const a=n.setInput;for(let l=0;l0&&rs(e)}}function rs(i){for(let n=av(i);null!==n;n=lv(n))for(let r=Ui;r0&&rs(s)}const e=i[lt].components;if(null!==e)for(let n=0;n0&&rs(r)}}function ss(i,t){const e=ws(t,i),n=e[lt];(function so(i,t){for(let e=t.length;e-1&&(uv(t,n),mp(e,n))}this._attachedToViewContainer=!1}kx(this._lView[lt],this._lView)}onDestroy(t){xw(this._lView[lt],this._lView,null,t)}markForCheck(){Ts(this._cdRefInjectingView||this._lView)}detach(){this._lView[fn]&=-65}reattach(){this._lView[fn]|=64}detectChanges(){So(this._lView[lt],this._lView,this.context)}checkNoChanges(){}attachToViewContainerRef(){if(this._appRef)throw new pe(902,!1);this._attachedToViewContainer=!0}detachFromAppRef(){this._appRef=null,function YA(i,t){bh(i,t,t[xt],2,null,null)}(this._lView[lt],this._lView)}attachToAppRef(t){if(this._attachedToViewContainer)throw new pe(902,!1);this._appRef=t}}class b8 extends ny{constructor(t){super(t),this._view=t}detectChanges(){const t=this._view;So(t[lt],t,t[ze],!1)}checkNoChanges(){}get context(){return null}}class ZF extends $l{constructor(t){super(),this.ngModule=t}resolveComponentFactory(t){const e=Hn(t);return new iy(e,this.ngModule)}}function QF(i){const t=[];for(let e in i)i.hasOwnProperty(e)&&t.push({propName:i[e],templateName:e});return t}class w8{constructor(t,e){this.injector=t,this.parentInjector=e}get(t,e,n){n=Yf(n);const r=this.injector.get(t,Fv,n);return r!==Fv||e===Fv?r:this.parentInjector.get(t,e,n)}}class iy extends Ov{get inputs(){return QF(this.componentDef.inputs)}get outputs(){return QF(this.componentDef.outputs)}constructor(t,e){super(),this.componentDef=t,this.ngModule=e,this.componentType=t.type,this.selector=function tD(i){return i.map(eD).join(",")}(t.selectors),this.ngContentSelectors=t.ngContentSelectors?t.ngContentSelectors:[],this.isBoundToModule=!!e}create(t,e,n,r){let s=(r=r||this.ngModule)instanceof io?r:r?.injector;s&&null!==this.componentDef.getStandaloneInjector&&(s=this.componentDef.getStandaloneInjector(s)||s);const o=s?new w8(t,s):t,a=o.get(Gl,null);if(null===a)throw new pe(407,!1);const l=o.get(B1,null),c=a.createRenderer(null,this.componentDef),d=this.componentDef.selectors[0][0]||"div",h=n?function MD(i,t,e){return i.selectRootElement(t,e===Ks.ShadowDom)}(c,n,this.componentDef.encapsulation):Ap(c,d,function x8(i){const t=i.toLowerCase();return"svg"===t?Pd:"math"===t?"math":null}(d)),p=this.componentDef.onPush?288:272,m=ey(0,null,null,1,0,null,null,null,null,null),g=Mh(null,m,null,p,null,null,a,c,l,o,null);let b,v;sp(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 C8(i,t){const e=i[lt],n=bi;return i[n]=t,Qd(e,n,2,"#host",null)}(g,h),F=function S8(i,t,e,n,r,s,o,a){const l=r[lt];!function E8(i,t,e,n){for(const r of i)t.mergedAttrs=Ec(t.mergedAttrs,r.hostAttrs);null!==t.mergedAttrs&&(Sw(t,t.mergedAttrs,!0),null!==e&&Gx(n,e,t))}(n,i,t,o);const c=s.createRenderer(t,e),d=Mh(r,bw(e),null,e.onPush?32:16,r[i.index],i,s,c,a||null,null,null);return l.firstCreatePass&&P(l,i,n.length-1),Ti(r,d),r[i.index]=d}(C,h,y,M,g,a,c);v=U0(m,bi),h&&function D8(i,t,e,n){if(n)L_(i,e,["ng-version",U1.full]);else{const{attrs:r,classes:s}=function nD(i){const t=[],e=[];let n=1,r=2;for(;n0&&$x(i,e,s.join(" "))}}(c,y,h,n),void 0!==e&&function T8(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=Ec(r.hostAttrs,e=Ec(e,r.hostAttrs))}}(n)}function PD(i){return i===Za?{}:i===Wn?[]:i}function k8(i,t){const e=i.viewQuery;i.viewQuery=e?(n,r)=>{t(n,r),e(n,r)}:t}function P8(i,t){const e=i.contentQueries;i.contentQueries=e?(n,r,s)=>{t(n,r,s),e(n,r,s)}:t}function O8(i,t){const e=i.hostBindings;i.hostBindings=e?(n,r)=>{t(n,r),e(n,r)}:t}function Aw(i){return!!OD(i)&&(Array.isArray(i)||!(i instanceof Map)&&Symbol.iterator in i)}function OD(i){return null!==i&&("function"==typeof i||"object"==typeof i)}function Wl(i,t,e){return i[t]=e}function Is(i,t,e){return!Object.is(i[t],e)&&(i[t]=e,!0)}function Eh(i,t,e,n){const r=Is(i,t,e);return Is(i,t+1,n)||r}function It(i,t,e,n){const r=Se();return Is(r,Ll(),t)&&(zn(),be(Di(),r,i,t,e,n)),It}function Yp(i,t,e,n){return Is(i,Ll(),e)?t+Jt(e)+n:on}function qp(i,t,e,n,r,s){const a=Eh(i,function tl(){return Pt.lFrame.bindingIndex}(),e,r);return Qs(2),a?t+Jt(e)+n+Jt(r)+s:on}function fe(i,t,e,n,r,s,o,a){const l=Se(),c=zn(),d=i+bi,h=c.firstCreatePass?function G8(i,t,e,n,r,s,o,a,l){const c=t.consts,d=Qd(t,i,4,o||null,Fl(c,a));ty(t,e,d,Fl(c,l)),Bd(t,d);const h=d.tView=ey(2,d,n,r,s,t.directiveRegistry,t.pipeRegistry,null,t.schemas,c);return null!==t.queries&&(t.queries.template(t,d),h.queries=t.queries.embeddedTView(d)),d}(d,c,l,t,e,n,r,s,o):c.data[d];va(h,!1);const p=l[xt].createComment("");yh(c,l,p,h),$r(p,l),Ti(l,l[d]=mn(p,l,p,h)),xc(h)&&Qv(c,l,h),null!=o&&Jv(l,h,a)}function Zi(i){return Fd(function gA(){return Pt.lFrame.contextLView}(),bi+i)}function U(i,t,e){const n=Se();return Is(n,Ll(),t)&&ro(zn(),Di(),n,i,t,n[xt],e,!1),U}function FD(i,t,e,n,r){const o=r?"class":"style";kD(i,e,t.inputs[o],o,n)}function G(i,t,e,n){const r=Se(),s=zn(),o=bi+i,a=r[xt],l=s.firstCreatePass?function j8(i,t,e,n,r,s){const o=t.consts,l=Qd(t,i,2,n,Fl(o,r));return ty(t,e,l,Fl(o,s)),null!==l.attrs&&Sw(l,l.attrs,!1),null!==l.mergedAttrs&&Sw(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]=Ap(a,t,function q0(){return Pt.lFrame.currentNamespace}()),d=xc(l);return va(l,!0),Gx(a,c,l),32!=(32&l.flags)&&yh(s,r,c,l),0===function uA(){return Pt.lFrame.elementDepthCount}()&&$r(c,r),function hA(){Pt.lFrame.elementDepthCount++}(),d&&(Qv(s,r,l),Zv(s,l,r)),null!==n&&Jv(r,l),G}function j(){let i=Ar();D_()?T_():(i=i.parent,va(i,!1));const t=i;!function fA(){Pt.lFrame.elementDepthCount--}();const e=zn();return e.firstCreatePass&&(Bd(e,i),Jf(i)&&e.queries.elementEnd(i)),null!=t.classesWithoutHost&&function wA(i){return 0!=(8&i.flags)}(t)&&FD(e,t,Se(),t.classesWithoutHost,!0),null!=t.stylesWithoutHost&&function F_(i){return 0!=(16&i.flags)}(t)&&FD(e,t,Se(),t.stylesWithoutHost,!1),j}function Ie(i,t,e,n){return G(i,t,e,n),j(),Ie}function Gr(i,t,e){const n=Se(),r=zn(),s=i+bi,o=r.firstCreatePass?function Y8(i,t,e,n,r){const s=t.consts,o=Fl(s,n),a=Qd(t,i,8,"ng-container",o);return null!==o&&Sw(a,o,!0),ty(t,e,a,Fl(s,r)),null!==t.queries&&t.queries.elementStart(t,a),a}(s,r,n,t,e):r.data[s];va(o,!0);const a=n[s]=n[xt].createComment("");return yh(r,n,a,o),$r(a,n),xc(o)&&(Qv(r,n,o),Zv(r,o,n)),null!=e&&Jv(n,o),Gr}function Wr(){let i=Ar();const t=zn();return D_()?T_():(i=i.parent,va(i,!1)),t.firstCreatePass&&(Bd(t,i),Jf(i)&&t.queries.elementEnd(i)),Wr}function sy(i,t,e){return Gr(i,t,e),Wr(),sy}function jn(){return Se()}function oy(i){return!!i&&"function"==typeof i.then}function hL(i){return!!i&&"function"==typeof i.subscribe}const LD=hL;function Oe(i,t,e,n){const r=Se(),s=zn(),o=Ar();return fL(s,r,r[xt],o,i,t,n),Oe}function ND(i,t){const e=Ar(),n=Se(),r=zn();return fL(r,n,XF(rh(r.data),e,n),e,i,t),ND}function fL(i,t,e,n,r,s,o){const a=xc(n),c=i.firstCreatePass&&qF(i),d=t[ze],h=YF(t);let p=!0;if(3&n.type||o){const b=Ai(n,t),v=o?o(b):b,y=h.length,M=o?C=>o(I(C[n.index])):n.index;let x=null;if(!o&&a&&(x=function q8(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=mL(n,t,d,s,!1);const C=e.listen(v,r,s);h.push(s,C),c&&c.push(r,M,y,y+1)}}else s=mL(n,t,d,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?ws(i.index,t):t);let l=pL(t,e,n,o),c=s.__ngNextListenerFn__;for(;c;)l=pL(t,e,c,o)&&l,c=c.__ngNextListenerFn__;return r&&!1===l&&(o.preventDefault(),o.returnValue=!1),l}}function re(i=1){return function yA(i){return(Pt.lFrame.contextLView=function Y0(i,t){for(;i>0;)t=t[Er],i--;return t}(i,Pt.lFrame.contextLView))[ze]}(i)}function X8(i,t){let e=null;const n=function K1(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 VD(i){return 2|i}function Ah(i){return(131068&i)>>2}function zD(i,t){return-131069&i|t<<2}function HD(i){return 1|i}function CL(i,t,e,n,r){const s=i[e+1],o=null===t;let a=n?eu(s):Ah(s),l=!1;for(;0!==a&&(!1===l||o);){const d=i[a+1];tW(i[a],t)&&(l=!0,i[a+1]=n?HD(d):VD(d)),a=n?eu(d):Ah(d)}l&&(i[e+1]=n?VD(s):HD(s))}function tW(i,t){return null===i||null==t||(Array.isArray(i)?i[1]:i)===t||!(!Array.isArray(i)||"string"!=typeof t)&&Rc(i,t)>=0}const Rr={textEnd:0,key:0,keyEnd:0,value:0,valueEnd:0};function SL(i){return i.substring(Rr.key,Rr.keyEnd)}function EL(i,t){const e=Rr.textEnd;return e===t?-1:(t=Rr.keyEnd=function sW(i,t,e){for(;t32;)t++;return t}(i,Rr.key=t,e),tm(i,t,e))}function tm(i,t,e){for(;t=0;e=EL(t,e))Cs(i,SL(t),!0)}function ul(i,t,e,n){const r=Se(),s=zn(),o=Qs(2);s.firstUpdatePass&&kL(s,i,o,n),t!==on&&Is(r,o,t)&&OL(s,s.data[Kn()],r,r[xt],i,r[o+1]=function _W(i,t){return null==i||""===i||("string"==typeof t?i+=t:"object"==typeof i&&(i=mi(to(i)))),i}(t,e),n,o)}function RL(i,t){return t>=i.expandoStartIndex}function kL(i,t,e,n){const r=i.data;if(null===r[e+1]){const s=r[Kn()],o=RL(i,e);LL(s,n)&&null===t&&!o&&(t=!1),t=function dW(i,t,e,n){const r=rh(i);let s=n?t.residualClasses:t.residualStyles;if(null===r)0===(n?t.classBindings:t.styleBindings)&&(e=ay(e=$D(null,i,t,e,n),t.attrs,n),s=null);else{const o=t.directiveStylingLast;if(-1===o||i[o]!==r)if(e=$D(r,i,t,e,n),null===s){let l=function uW(i,t,e){const n=e?t.classBindings:t.styleBindings;if(0!==Ah(n))return i[eu(n)]}(i,t,n);void 0!==l&&Array.isArray(l)&&(l=$D(null,i,t,l[1],n),l=ay(l,t.attrs,n),function hW(i,t,e,n){i[eu(e?t.classBindings:t.styleBindings)]=n}(i,t,n,l))}else s=function fW(i,t,e){let n;const r=t.directiveEnd;for(let s=1+t.directiveStylingLast;s0)&&(c=!0)):d=e,r)if(0!==l){const p=eu(i[a+1]);i[n+1]=Tw(p,a),0!==p&&(i[p+1]=zD(i[p+1],n)),i[a+1]=function Z8(i,t){return 131071&i|t<<17}(i[a+1],n)}else i[n+1]=Tw(a,0),0!==a&&(i[a+1]=zD(i[a+1],n)),a=n;else i[n+1]=Tw(l,0),0===a?a=n:i[l+1]=zD(i[l+1],n),l=n;c&&(i[n+1]=VD(i[n+1])),CL(i,d,n,!0),CL(i,d,n,!1),function eW(i,t,e,n,r){const s=r?i.residualClasses:i.residualStyles;null!=s&&"string"==typeof t&&Rc(s,t)>=0&&(e[n+1]=HD(e[n+1]))}(t,d,i,n,s),o=Tw(a,l),s?t.classBindings=o:t.styleBindings=o}(r,s,t,e,o,n)}}function $D(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),d=c?l[1]:l,h=null===d;let p=e[r+1];p===on&&(p=h?Wn:void 0);let m=h?jd(p,n):d===n?p:void 0;if(c&&!Iw(m)&&(m=jd(l,n)),Iw(m)&&(a=m,o))return a;const g=i[r+1];r=o?eu(g):Ah(g)}if(null!==t){let l=s?t.residualClasses:t.residualStyles;null!=l&&(a=jd(l,n))}return a}function Iw(i){return void 0!==i}function LL(i,t){return 0!=(i.flags&(t?8:16))}function Be(i,t=""){const e=Se(),n=zn(),r=i+bi,s=n.firstCreatePass?Qd(n,r,1,t,null):n.data[r],o=e[r]=function cv(i,t){return i.createText(t)}(e[xt],t);yh(n,e,o,s),va(s,!1)}function ui(i){return Qi("",i,""),ui}function Qi(i,t,e){const n=Se(),r=Yp(n,i,t,e);return r!==on&&Vc(n,Kn(),r),Qi}function Dh(i,t,e,n,r){const s=Se(),o=qp(s,i,t,e,n,r);return o!==on&&Vc(s,Kn(),o),Dh}function GL(i,t,e){!function hl(i,t,e,n){const r=zn(),s=Qs(2);r.firstUpdatePass&&kL(r,null,s,n);const o=Se();if(e!==on&&Is(o,s,e)){const a=r.data[Kn()];if(LL(a,n)&&!RL(r,s)){let l=n?a.classesWithoutHost:a.stylesWithoutHost;null!==l&&(e=zf(l,e||"")),FD(r,a,o,e,n)}else!function gW(i,t,e,n,r,s,o,a){r===on&&(r=Wn);let l=0,c=0,d=0((st=st||{})[st.LocaleId=0]="LocaleId",st[st.DayPeriodsFormat=1]="DayPeriodsFormat",st[st.DayPeriodsStandalone=2]="DayPeriodsStandalone",st[st.DaysFormat=3]="DaysFormat",st[st.DaysStandalone=4]="DaysStandalone",st[st.MonthsFormat=5]="MonthsFormat",st[st.MonthsStandalone=6]="MonthsStandalone",st[st.Eras=7]="Eras",st[st.FirstDayOfWeek=8]="FirstDayOfWeek",st[st.WeekendRange=9]="WeekendRange",st[st.DateFormat=10]="DateFormat",st[st.TimeFormat=11]="TimeFormat",st[st.DateTimeFormat=12]="DateTimeFormat",st[st.NumberSymbols=13]="NumberSymbols",st[st.NumberFormats=14]="NumberFormats",st[st.CurrencyCode=15]="CurrencyCode",st[st.CurrencySymbol=16]="CurrencySymbol",st[st.CurrencyName=17]="CurrencyName",st[st.Currencies=18]="Currencies",st[st.Directionality=19]="Directionality",st[st.PluralCase=20]="PluralCase",st[st.ExtraData=21]="ExtraData",st))();const im="en-US";let n2=im;function jD(i,t,e,n,r){if(i=Ot(i),Array.isArray(i))for(let s=0;s>20;if(Nc(i)||!i.multi){const m=new Ud(l,r,E),g=qD(a,t,r?d:d+p,h);-1===g?(pn(ah(c,o),s,a),YD(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=qD(a,t,d+p,h),g=qD(a,t,d,d+p),v=g>=0&&e[g];if(r&&!v||!r&&!(m>=0&&e[m])){pn(ah(c,o),s,a);const y=function Oj(i,t,e,n,r){const s=new Ud(i,e,E);return s.multi=[],s.index=t,s.componentProviders=0,D2(s,r,n&&!e),s}(r?Pj:kj,e.length,r,n,l);!r&&v&&(e[g].providerFactory=y),YD(s,i,t.length,0),t.push(a),c.directiveStart++,c.directiveEnd++,r&&(c.providerIndexes+=1048576),e.push(y),o.push(y)}else YD(s,i,m>-1?m:g,D2(e[r?g:m],l,!r&&n));!r&&n&&v&&e[g].componentProviders++}}}function YD(i,t,e,n){const r=Nc(t),s=function T1(i){return!!i.useClass}(t);if(r||s){const l=(s?Ot(t.useClass):t).prototype.ngOnDestroy;if(l){const c=i.destroyHooks||(i.destroyHooks=[]);if(!r&&t.multi){const d=c.indexOf(e);-1===d?c.push(e,[n,l]):c[d+1].push(n,l)}else c.push(e,l)}}}function D2(i,t,e){return e&&i.componentProviders++,i.multi.push(t)-1}function qD(i,t,e,n){for(let r=e;r{e.providersResolver=(n,r)=>function Rj(i,t,e){const n=zn();if(n.firstCreatePass){const r=bo(i);jD(e,n.data,n.blueprint,r,!0),jD(t,n.data,n.blueprint,r,!1)}}(n,r?r(i):i,t)}}class rm{}class T2{}class I2 extends rm{constructor(t,e){super(),this._parent=e,this._bootstrapComponents=[],this.destroyCbs=[],this.componentFactoryResolver=new ZF(this);const n=hr(t);this._bootstrapComponents=dl(n.bootstrap),this._r3Injector=hw(t,e,[{provide:rm,useValue:this},{provide:$l,useValue:this.componentFactoryResolver}],mi(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 KD extends T2{constructor(t){super(),this.moduleType=t}create(t){return new I2(this.moduleType,t)}}class Lj extends rm{constructor(t,e,n){super(),this.componentFactoryResolver=new ZF(this),this.instance=null;const r=new $p([...t,{provide:rm,useValue:this},{provide:$l,useValue:this.componentFactoryResolver}],e||wh(),n,new Set(["environment"]));this.injector=r,r.resolveInjectorInitializers()}destroy(){this.injector.destroy()}onDestroy(t){this.injector.onDestroy(t)}}function Lw(i,t,e=null){return new Lj(i,t,e).injector}let Nj=(()=>{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=nw(0,e.type),r=n.length>0?Lw([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=Pe({token:i,providedIn:"environment",factory:()=>new i(ee(io))}),i})();function ZD(i){i.getStandaloneInjector=t=>t.get(Nj).getOrCreateStandaloneInjector(i)}function Rs(i,t,e){const n=zr()+i,r=Se();return r[n]===on?Wl(r,n,e?t.call(e):t()):function ry(i,t){return i[t]}(r,n)}function sm(i,t,e,n){return B2(Se(),zr(),i,t,e,n)}function N2(i,t,e,n,r,s,o){return function z2(i,t,e,n,r,s,o,a,l){const c=t+e;return function Da(i,t,e,n,r,s){const o=Eh(i,t,e,n);return Eh(i,t+2,r,s)||o}(i,c,r,s,o,a)?Wl(i,c+4,l?n.call(l,r,s,o,a):n(r,s,o,a)):fy(i,c+4)}(Se(),zr(),i,t,e,n,r,s,o)}function fy(i,t){const e=i[t];return e===on?void 0:e}function B2(i,t,e,n,r,s){const o=t+e;return Is(i,o,r)?Wl(i,o+1,s?n.call(s,r):n(r)):fy(i,o+1)}function ct(i,t){const e=zn();let n;const r=i+bi;e.firstCreatePass?(n=function Jj(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=el(n.type)),o=Xs(E);try{const a=dp(!1),l=s();return dp(a),function W8(i,t,e,n){e>=i.data.length&&(i.data[e]=null,i.blueprint[e]=null),t[e]=n}(e,Se(),r,l),l}finally{Xs(o)}}function ut(i,t,e){const n=i+bi,r=Se(),s=Fd(r,n);return py(r,n)?B2(r,zr(),t,s.transform,e,s):s.transform(e)}function JD(i,t,e,n){const r=i+bi,s=Se(),o=Fd(s,r);return py(s,r)?function U2(i,t,e,n,r,s,o){const a=t+e;return Eh(i,a,r,s)?Wl(i,a+2,o?n.call(o,r,s):n(r,s)):fy(i,a+2)}(s,zr(),t,o.transform,e,n,o):o.transform(e,n)}function py(i,t){return i[lt].data[t].pure}function eT(i){return t=>{setTimeout(i,void 0,t)}}const $e=class r6 extends Te{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=eT(s),r&&(r=eT(r)),o&&(o=eT(o)));const a=super.subscribe({next:r,error:s,complete:o});return t instanceof Qt&&t.add(a),a}};function s6(){return this._results[Symbol.iterator]()}class om{get changes(){return this._changes||(this._changes=new $e)}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=om.prototype;e[Symbol.iterator]||(e[Symbol.iterator]=s6)}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 Dr(i){return i.flat(Number.POSITIVE_INFINITY)}(t);(this._changesDetected=!function pp(i,t,e){if(i.length!==t.length)return!1;for(let n=0;n{class i{}return i.__NG_ELEMENT_ID__=l6,i})();const o6=Eo,a6=class extends o6{constructor(t,e,n){super(),this._declarationLView=t,this._declarationTContainer=e,this.elementRef=n}createEmbeddedView(t,e){const n=this._declarationTContainer.tView,r=Mh(this._declarationLView,n,t,16,null,n.declTNode,null,null,null,null,e||null);r[nh]=this._declarationLView[this._declarationTContainer.index];const o=this._declarationLView[Zs];return null!==o&&(r[Zs]=o.createEmbeddedView(n)),Sh(n,r,t),new ny(r)}};function l6(){return Nw(Ar(),Se())}function Nw(i,t){return 4&i.type?new a6(t,i,Fn(i,t)):null}let jr=(()=>{class i{}return i.__NG_ELEMENT_ID__=c6,i})();function c6(){return W2(Ar(),Se())}const d6=jr,$2=class extends d6{constructor(t,e,n){super(),this._lContainer=t,this._hostTNode=e,this._hostLView=n}get element(){return Fn(this._hostTNode,this._hostLView)}get injector(){return new Dc(this._hostTNode,this._hostLView)}get parentInjector(){const t=ch(this._hostTNode,this._hostLView);if(cp(t)){const e=oh(t,this._hostLView),n=sh(t);return new Dc(e[lt].data[n+8],e)}return new Dc(null,this._hostLView)}clear(){for(;this.length>0;)this.remove(this.length-1)}get(t){const e=G2(this._lContainer);return null!==e&&e[t]||null}get length(){return this._lContainer.length-Ui}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 hh(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 iy(Hn(t)),c=n||this.parentInjector;if(!s&&null==l.ngModule){const p=(o?c:this.parentInjector).get(io,null);p&&(s=p)}const d=l.create(c,r,void 0,s);return this.insert(d.hostView,a),d}insert(t,e){const n=t._lView,r=n[lt];if(function dA(i){return xs(i[Bi])}(n)){const d=this.indexOf(t);if(-1!==d)this.detach(d);else{const h=n[Bi],p=new $2(h,h[he],h[Bi]);p.detach(p.indexOf(t))}}const s=this._adjustIndex(e),o=this._lContainer;!function dv(i,t,e,n){const r=Ui+n,s=e.length;n>0&&(e[r-1][ys]=t),n0)n.push(o[a/2]);else{const c=s[a+1],d=t[-l];for(let h=Ui;h{class i{constructor(e){this.appInits=e,this.resolve=Uw,this.reject=Uw,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)(ee(Vw,8))},i.\u0275prov=Pe({token:i,factory:i.\u0275fac,providedIn:"root"}),i})();const cm=new me("AppId",{providedIn:"root",factory:function pN(){return`${hT()}${hT()}${hT()}`}});function hT(){return String.fromCharCode(97+Math.floor(25*Math.random()))}const mN=new me("Platform Initializer"),fT=new me("Platform ID",{providedIn:"platform",factory:()=>"unknown"}),kr=new me("AnimationModuleType");let L6=(()=>{class i{log(e){console.log(e)}warn(e){console.warn(e)}}return i.\u0275fac=function(e){return new(e||i)},i.\u0275prov=Pe({token:i,factory:i.\u0275fac,providedIn:"platform"}),i})();const Xl=new me("LocaleId",{providedIn:"root",factory:()=>Lt(Xl,Ft.Optional|Ft.SkipSelf)||function N6(){return typeof $localize<"u"&&$localize.locale||im}()});class U6{constructor(t,e){this.ngModuleFactory=t,this.componentFactories=e}}let gN=(()=>{class i{compileModuleSync(e){return new KD(e)}compileModuleAsync(e){return Promise.resolve(this.compileModuleSync(e))}compileModuleAndAllComponentsSync(e){const n=this.compileModuleSync(e),s=dl(hr(e).declarations).reduce((o,a)=>{const l=Hn(a);return l&&o.push(new iy(l)),o},[]);return new U6(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=Pe({token:i,factory:i.\u0275fac,providedIn:"root"}),i})();const H6=(()=>Promise.resolve(0))();function pT(i){typeof Zone>"u"?H6.then(()=>{i&&i.apply(null,null)}):Zone.current.scheduleMicroTask("scheduleMicrotask",i)}class gt{constructor({enableLongStackTrace:t=!1,shouldCoalesceEventChangeDetection:e=!1,shouldCoalesceRunChangeDetection:n=!1}){if(this.hasPendingMacrotasks=!1,this.hasPendingMicrotasks=!1,this.isStable=!0,this.onUnstable=new $e(!1),this.onMicrotaskEmpty=new $e(!1),this.onStable=new $e(!1),this.onError=new $e(!1),typeof Zone>"u")throw new pe(908,!1);Zone.assertZonePatched();const r=this;r._nesting=0,r._outer=r._inner=Zone.current,Zone.TaskTrackingZoneSpec&&(r._inner=r._inner.fork(new Zone.TaskTrackingZoneSpec)),t&&Zone.longStackTraceZoneSpec&&(r._inner=r._inner.fork(Zone.longStackTraceZoneSpec)),r.shouldCoalesceEventChangeDetection=!n&&e,r.shouldCoalesceRunChangeDetection=n,r.lastRequestAnimationFrameId=-1,r.nativeRequestAnimationFrame=function $6(){let i=Rn.requestAnimationFrame,t=Rn.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 j6(i){const t=()=>{!function W6(i){i.isCheckStableRunning||-1!==i.lastRequestAnimationFrameId||(i.lastRequestAnimationFrameId=i.nativeRequestAnimationFrame.call(Rn,()=>{i.fakeTopEventTask||(i.fakeTopEventTask=Zone.root.scheduleEventTask("fakeTopEventTask",()=>{i.lastRequestAnimationFrameId=-1,gT(i),i.isCheckStableRunning=!0,mT(i),i.isCheckStableRunning=!1},void 0,()=>{},()=>{})),i.fakeTopEventTask.invoke()}),gT(i))}(i)};i._inner=i._inner.fork({name:"angular",properties:{isAngularZone:!0},onInvokeTask:(e,n,r,s,o,a)=>{try{return yN(i),e.invokeTask(r,s,o,a)}finally{(i.shouldCoalesceEventChangeDetection&&"eventTask"===s.type||i.shouldCoalesceRunChangeDetection)&&t(),bN(i)}},onInvoke:(e,n,r,s,o,a,l)=>{try{return yN(i),e.invoke(r,s,o,a,l)}finally{i.shouldCoalesceRunChangeDetection&&t(),bN(i)}},onHasTask:(e,n,r,s)=>{e.hasTask(r,s),n===r&&("microTask"==s.change?(i._hasPendingMicrotasks=s.microTask,gT(i),mT(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(!gt.isInAngularZone())throw new pe(909,!1)}static assertNotInAngularZone(){if(gt.isInAngularZone())throw new pe(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,G6,Uw,Uw);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 G6={};function mT(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 gT(i){i.hasPendingMicrotasks=!!(i._hasPendingMicrotasks||(i.shouldCoalesceEventChangeDetection||i.shouldCoalesceRunChangeDetection)&&-1!==i.lastRequestAnimationFrameId)}function yN(i){i._nesting++,i.isStable&&(i.isStable=!1,i.onUnstable.emit(null))}function bN(i){i._nesting--,mT(i)}class Y6{constructor(){this.hasPendingMicrotasks=!1,this.hasPendingMacrotasks=!1,this.isStable=!0,this.onUnstable=new $e,this.onMicrotaskEmpty=new $e,this.onStable=new $e,this.onError=new $e}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 xN=new me(""),Hw=new me("");let yT,_T=(()=>{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,yT||(function q6(i){yT=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:()=>{gt.assertNotInAngularZone(),pT(()=>{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())pT(()=>{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)(ee(gt),ee(vT),ee(Hw))},i.\u0275prov=Pe({token:i,factory:i.\u0275fac}),i})(),vT=(()=>{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 yT?.findTestabilityInTree(this,e,n)??null}}return i.\u0275fac=function(e){return new(e||i)},i.\u0275prov=Pe({token:i,factory:i.\u0275fac,providedIn:"platform"}),i})();const Hc=!1;let tu=null;const wN=new me("AllowMultipleToken"),bT=new me("PlatformDestroyListeners"),MN=new me("appBootstrapListener");class CN{constructor(t,e){this.name=t,this.token=e}}function EN(i,t,e=[]){const n=`Platform: ${t}`,r=new me(n);return(s=[])=>{let o=xT();if(!o||o.injector.get(wN,!1)){const a=[...e,...s,{provide:r,useValue:!0}];i?i(a):function Z6(i){if(tu&&!tu.get(wN,!1))throw new pe(400,!1);tu=i;const t=i.get(DN);(function SN(i){const t=i.get(mN,null);t&&t.forEach(e=>e())})(i)}(function AN(i=[],t){return Gi.create({name:t,providers:[{provide:Iv,useValue:"platform"},{provide:bT,useValue:new Set([()=>tu=null])},...i]})}(a,n))}return function J6(i){const t=xT();if(!t)throw new pe(401,!1);return t}()}}function xT(){return tu?.get(DN)??null}let DN=(()=>{class i{constructor(e){this._injector=e,this._modules=[],this._destroyListeners=[],this._destroyed=!1}bootstrapModuleFactory(e,n){const r=function IN(i,t){let e;return e="noop"===i?new Y6:("zone.js"===i?void 0:i)||new gt(t),e}(n?.ngZone,function TN(i){return{enableLongStackTrace:!1,shouldCoalesceEventChangeDetection:!(!i||!i.ngZoneEventCoalescing)||!1,shouldCoalesceRunChangeDetection:!(!i||!i.ngZoneRunCoalescing)||!1}}(n)),s=[{provide:gt,useValue:r}];return r.run(()=>{const o=Gi.create({providers:s,parent:this.injector,name:e.moduleType.name}),a=e.create(o),l=a.injector.get(cl,null);if(!l)throw new pe(402,!1);return r.runOutsideAngular(()=>{const c=r.onError.subscribe({next:d=>{l.handleError(d)}});a.onDestroy(()=>{$w(this._modules,a),c.unsubscribe()})}),function RN(i,t,e){try{const n=e();return oy(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(zw);return c.runInitializers(),c.donePromise.then(()=>(function r2(i){En(i,"Expected localeId to be defined"),"string"==typeof i&&(n2=i.toLowerCase().replace(/_/g,"-"))}(a.injector.get(Xl,im)||im),this._moduleDoBootstrap(a),a))})})}bootstrapModule(e,n=[]){const r=kN({},n);return function X6(i,t,e){const n=new KD(e);return Promise.resolve(n)}(0,0,e).then(s=>this.bootstrapModuleFactory(s,r))}_moduleDoBootstrap(e){const n=e.injector.get(dm);if(e._bootstrapComponents.length>0)e._bootstrapComponents.forEach(r=>n.bootstrap(r));else{if(!e.instance.ngDoBootstrap)throw new pe(-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 pe(404,!1);this._modules.slice().forEach(n=>n.destroy()),this._destroyListeners.forEach(n=>n());const e=this._injector.get(bT,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)(ee(Gi))},i.\u0275prov=Pe({token:i,factory:i.\u0275fac,providedIn:"platform"}),i})();function kN(i,t){return Array.isArray(t)?t.reduce(kN,i):{...i,...t}}let dm=(()=>{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 In(a=>{this._stable=this._zone.isStable&&!this._zone.hasPendingMacrotasks&&!this._zone.hasPendingMicrotasks,this._zone.runOutsideAngular(()=>{a.next(this._stable),a.complete()})}),o=new In(a=>{let l;this._zone.runOutsideAngular(()=>{l=this._zone.onStable.subscribe(()=>{gt.assertNotInAngularZone(),pT(()=>{!this._stable&&!this._zone.hasPendingMacrotasks&&!this._zone.hasPendingMicrotasks&&(this._stable=!0,a.next(!0))})})});const c=this._zone.onUnstable.subscribe(()=>{gt.assertInAngularZone(),this._stable&&(this._stable=!1,this._zone.runOutsideAngular(()=>{a.next(!1)}))});return()=>{l.unsubscribe(),c.unsubscribe()}});this.isStable=Cr(s,o.pipe(Vf()))}bootstrap(e,n){const r=e instanceof Ov;if(!this._injector.get(zw).done){!r&&function Ed(i){const t=Hn(i)||Vr(i)||vs(i);return null!==t&&t.standalone}(e);throw new pe(405,Hc)}let o;o=r?e:this._injector.get($l).resolveComponentFactory(e),this.componentTypes.push(o.componentType);const a=function K6(i){return i.isBoundToModule}(o)?void 0:this._injector.get(rm),c=o.create(Gi.NULL,[],n||o.selector,a),d=c.location.nativeElement,h=c.injector.get(xN,null);return h?.registerApplication(d),c.onDestroy(()=>{this.detachView(c.hostView),$w(this.components,c),h?.unregisterApplication(d)}),this._loadComponent(c),c}tick(){if(this._runningTick)throw new pe(101,!1);try{this._runningTick=!0;for(let e of this._views)e.detectChanges()}catch(e){this._zone.runOutsideAngular(()=>this._exceptionHandler.handleError(e))}finally{this._runningTick=!1}}attachView(e){const n=e;this._views.push(n),n.attachToAppRef(this)}detachView(e){const n=e;$w(this._views,n),n.detachFromAppRef()}_loadComponent(e){this.attachView(e.hostView),this.tick(),this.components.push(e);const n=this._injector.get(MN,[]);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),()=>$w(this._destroyListeners,e)}destroy(){if(this._destroyed)throw new pe(406,!1);const e=this._injector;e.destroy&&!e.destroyed&&e.destroy()}get viewCount(){return this._views.length}warnIfDestroyed(){}}return i.\u0275fac=function(e){return new(e||i)(ee(gt),ee(io),ee(cl))},i.\u0275prov=Pe({token:i,factory:i.\u0275fac,providedIn:"root"}),i})();function $w(i,t){const e=i.indexOf(t);e>-1&&i.splice(e,1)}let Qn=(()=>{class i{}return i.__NG_ELEMENT_ID__=t9,i})();function t9(i){return function n9(i,t,e){if(Dd(i)&&!e){const n=ws(i.index,t);return new ny(n,n)}return 47&i.type?new ny(t[sr],t):null}(Ar(),Se(),16==(16&i))}class NN{constructor(){}supports(t){return Aw(t)}create(t){return new c9(t)}}const l9=(i,t)=>t;class c9{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||l9}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 d9(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 BN),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 BN),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 d9{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 u9{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 BN{constructor(){this.map=new Map}put(t){const e=t.trackById;let n=this.map.get(e);n||(n=new u9,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 UN(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 f9(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 f9{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 zN(){return new jw([new NN])}let jw=(()=>{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||zN()),deps:[[i,new Ca,new Ss]]}}find(e){const n=this.factories.find(r=>r.supports(e));if(null!=n)return n;throw new pe(901,!1)}}return i.\u0275prov=Pe({token:i,providedIn:"root",factory:zN}),i})();function HN(){return new gy([new VN])}let gy=(()=>{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||HN()),deps:[[i,new Ca,new Ss]]}}find(e){const n=this.factories.find(r=>r.supports(e));if(n)return n;throw new pe(901,!1)}}return i.\u0275prov=Pe({token:i,providedIn:"root",factory:HN}),i})();const g9=EN(null,"core",[]);let _9=(()=>{class i{constructor(e){}}return i.\u0275fac=function(e){return new(e||i)(ee(dm))},i.\u0275mod=en({type:i}),i.\u0275inj=Wt({}),i})();let ET=null;function $c(){return ET}class b9{}const qt=new me("DocumentToken");let AT=(()=>{class i{historyGo(e){throw new Error("Not implemented")}}return i.\u0275fac=function(e){return new(e||i)},i.\u0275prov=Pe({token:i,factory:function(){return function x9(){return ee($N)}()},providedIn:"platform"}),i})();const w9=new me("Location Initialized");let $N=(()=>{class i extends AT{constructor(e){super(),this._doc=e,this._location=window.location,this._history=window.history}getBaseHrefFromDOM(){return $c().getBaseHref(this._doc)}onPopState(e){const n=$c().getGlobalEventTarget(this._doc,"window");return n.addEventListener("popstate",e,!1),()=>n.removeEventListener("popstate",e)}onHashChange(e){const n=$c().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){GN()?this._history.pushState(e,n,r):this._location.hash=r}replaceState(e,n,r){GN()?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)(ee(qt))},i.\u0275prov=Pe({token:i,factory:function(){return function M9(){return new $N(ee(qt))}()},providedIn:"platform"}),i})();function GN(){return!!window.history.pushState}function DT(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 WN(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 Gc(i){return i&&"?"!==i[0]?"?"+i:i}let Rh=(()=>{class i{historyGo(e){throw new Error("Not implemented")}}return i.\u0275fac=function(e){return new(e||i)},i.\u0275prov=Pe({token:i,factory:function(){return Lt(YN)},providedIn:"root"}),i})();const jN=new me("appBaseHref");let YN=(()=>{class i extends Rh{constructor(e,n){super(),this._platformLocation=e,this._removeListenerFns=[],this._baseHref=n??this._platformLocation.getBaseHrefFromDOM()??Lt(qt).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 DT(this._baseHref,e)}path(e=!1){const n=this._platformLocation.pathname+Gc(this._platformLocation.search),r=this._platformLocation.hash;return r&&e?`${n}${r}`:n}pushState(e,n,r,s){const o=this.prepareExternalUrl(r+Gc(s));this._platformLocation.pushState(e,n,o)}replaceState(e,n,r,s){const o=this.prepareExternalUrl(r+Gc(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)(ee(AT),ee(jN,8))},i.\u0275prov=Pe({token:i,factory:i.\u0275fac,providedIn:"root"}),i})(),C9=(()=>{class i extends Rh{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=DT(this._baseHref,e);return n.length>0?"#"+n:n}pushState(e,n,r,s){let o=this.prepareExternalUrl(r+Gc(s));0==o.length&&(o=this._platformLocation.pathname),this._platformLocation.pushState(e,n,o)}replaceState(e,n,r,s){let o=this.prepareExternalUrl(r+Gc(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)(ee(AT),ee(jN,8))},i.\u0275prov=Pe({token:i,factory:i.\u0275fac}),i})(),_y=(()=>{class i{constructor(e){this._subject=new $e,this._urlChangeListeners=[],this._urlChangeSubscription=null,this._locationStrategy=e;const n=this._locationStrategy.getBaseHref();this._basePath=function A9(i){if(new RegExp("^(https?:)?//").test(i)){const[,e]=i.split(/\/\/[^\/]+/);return e}return i}(WN(qN(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+Gc(n))}normalize(e){return i.stripTrailingSlash(function E9(i,t){if(!i||!t.startsWith(i))return t;const e=t.substring(i.length);return""===e||["/",";","?","#"].includes(e[0])?e:t}(this._basePath,qN(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+Gc(n)),r)}replaceState(e,n="",r=null){this._locationStrategy.replaceState(r,"",e,n),this._notifyUrlChangeListeners(this.prepareExternalUrl(e+Gc(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=Gc,i.joinWithSlash=DT,i.stripTrailingSlash=WN,i.\u0275fac=function(e){return new(e||i)(ee(Rh))},i.\u0275prov=Pe({token:i,factory:function(){return function S9(){return new _y(ee(Rh))}()},providedIn:"root"}),i})();function qN(i){return i.replace(/\/index.html$/,"")}var Ao=(()=>((Ao=Ao||{})[Ao.Decimal=0]="Decimal",Ao[Ao.Percent=1]="Percent",Ao[Ao.Currency=2]="Currency",Ao[Ao.Scientific=3]="Scientific",Ao))(),$t=(()=>(($t=$t||{})[$t.Decimal=0]="Decimal",$t[$t.Group=1]="Group",$t[$t.List=2]="List",$t[$t.PercentSign=3]="PercentSign",$t[$t.PlusSign=4]="PlusSign",$t[$t.MinusSign=5]="MinusSign",$t[$t.Exponential=6]="Exponential",$t[$t.SuperscriptingExponent=7]="SuperscriptingExponent",$t[$t.PerMille=8]="PerMille",$t[$t.Infinity=9]="Infinity",$t[$t.NaN=10]="NaN",$t[$t.TimeSeparator=11]="TimeSeparator",$t[$t.CurrencyDecimal=12]="CurrencyDecimal",$t[$t.CurrencyGroup=13]="CurrencyGroup",$t))();function Ta(i,t){const e=oo(i),n=e[st.NumberSymbols][t];if(typeof n>"u"){if(t===$t.CurrencyDecimal)return e[st.NumberSymbols][$t.Decimal];if(t===$t.CurrencyGroup)return e[st.NumberSymbols][$t.Group]}return n}const J9=/^(\d+)?\.((\d+)(-(\d+))?)?$/,eB=22,tM=".",yy="0",eY=";",tY=",",PT="#";function LT(i){const t=parseInt(i);if(isNaN(t))throw new Error("Invalid integer literal when parsing "+i);return t}const BT=/\s+/,iB=[];let hm=(()=>{class i{constructor(e,n,r,s){this._iterableDiffers=e,this._keyValueDiffers=n,this._ngEl=r,this._renderer=s,this.initialClasses=iB,this.stateMap=new Map}set klass(e){this.initialClasses=null!=e?e.trim().split(BT):iB}set ngClass(e){this.rawClass="string"==typeof e?e.trim().split(BT):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(BT).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)(E(jw),E(gy),E(vt),E(ll))},i.\u0275dir=ve({type:i,selectors:[["","ngClass",""]],inputs:{klass:["class","klass"],ngClass:"ngClass"},standalone:!0}),i})();class hY{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 lo=(()=>{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 hY(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),oB(a,r)}});for(let r=0,s=n.length;r{oB(n.get(r.currentIndex),r)})}static ngTemplateContextGuard(e,n){return!0}}return i.\u0275fac=function(e){return new(e||i)(E(jr),E(Eo),E(jw))},i.\u0275dir=ve({type:i,selectors:[["","ngFor","","ngForOf",""]],inputs:{ngForOf:"ngForOf",ngForTrackBy:"ngForTrackBy",ngForTemplate:"ngForTemplate"},standalone:!0}),i})();function oB(i,t){i.context.$implicit=t.item}let _i=(()=>{class i{constructor(e,n){this._viewContainer=e,this._context=new pY,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){aB("ngIfThen",e),this._thenTemplateRef=e,this._thenViewRef=null,this._updateView()}set ngIfElse(e){aB("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)(E(jr),E(Eo))},i.\u0275dir=ve({type:i,selectors:[["","ngIf",""]],inputs:{ngIf:"ngIf",ngIfThen:"ngIfThen",ngIfElse:"ngIfElse"},standalone:!0}),i})();class pY{constructor(){this.$implicit=null,this.ngIf=null}}function aB(i,t){if(t&&!t.createEmbeddedView)throw new Error(`${i} must be a TemplateRef, but received '${mi(t)}'.`)}class UT{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 by=(()=>{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=ve({type:i,selectors:[["","ngSwitch",""]],inputs:{ngSwitch:"ngSwitch"},standalone:!0}),i})(),VT=(()=>{class i{constructor(e,n,r){this.ngSwitch=r,r._addCase(),this._view=new UT(e,n)}ngDoCheck(){this._view.enforceState(this.ngSwitch._matchCase(this.ngSwitchCase))}}return i.\u0275fac=function(e){return new(e||i)(E(jr),E(Eo),E(by,9))},i.\u0275dir=ve({type:i,selectors:[["","ngSwitchCase",""]],inputs:{ngSwitchCase:"ngSwitchCase"},standalone:!0}),i})(),lB=(()=>{class i{constructor(e,n,r){r._addDefault(new UT(e,n))}}return i.\u0275fac=function(e){return new(e||i)(E(jr),E(Eo),E(by,9))},i.\u0275dir=ve({type:i,selectors:[["","ngSwitchDefault",""]],standalone:!0}),i})(),nM=(()=>{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:Es.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)(E(vt),E(gy),E(ll))},i.\u0275dir=ve({type:i,selectors:[["","ngStyle",""]],inputs:{ngStyle:"ngStyle"},standalone:!0}),i})(),xy=(()=>{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)(E(jr))},i.\u0275dir=ve({type:i,selectors:[["","ngTemplateOutlet",""]],inputs:{ngTemplateOutletContext:"ngTemplateOutletContext",ngTemplateOutlet:"ngTemplateOutlet",ngTemplateOutletInjector:"ngTemplateOutletInjector"},standalone:!0,features:[xi]}),i})();function ml(i,t){return new pe(2100,!1)}class gY{createSubscription(t,e){return t.subscribe({next:e,error:n=>{throw n}})}dispose(t){t.unsubscribe()}}class _Y{createSubscription(t,e){return t.then(e,n=>{throw n})}dispose(t){}}const vY=new _Y,yY=new gY;let Xo=(()=>{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(oy(e))return vY;if(hL(e))return yY;throw ml()}_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)(E(Qn,16))},i.\u0275pipe=$i({name:"async",type:i,pure:!1,standalone:!0}),i})(),dB=(()=>{class i{constructor(e){this.differs=e,this.keyValues=[],this.compareFn=uB}transform(e,n=uB){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 kY(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)(E(gy,16))},i.\u0275pipe=$i({name:"keyvalue",type:i,pure:!1,standalone:!0}),i})();function uB(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 zT(i){return!(null==i||""===i||i!=i)}(e))return null;r=r||this._locale;try{return function sY(i,t,e){return function OT(i,t,e,n,r,s,o=!1){let a="",l=!1;if(isFinite(i)){let c=function aY(i){let n,r,s,o,a,t=Math.abs(i)+"",e=0;for((r=t.indexOf(tM))>-1&&(t=t.replace(tM,"")),(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)===yy;s++);if(s===(a=t.length))n=[0],r=1;else{for(a--;t.charAt(a)===yy;)a--;for(r-=s,n=[],o=0;s<=a;s++,o++)n[o]=Number(t.charAt(s))}return r>eB&&(n=n.splice(0,eB-1),e=r-1,r=1),{digits:n,exponent:e,integerLen:r}}(i);o&&(c=function oY(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 d=t.minInt,h=t.minFrac,p=t.maxFrac;if(s){const M=s.match(J9);if(null===M)throw new Error(`${s} is not a valid digit info`);const x=M[1],C=M[3],F=M[5];null!=x&&(d=LT(x)),null!=C&&(h=LT(C)),null!=F?p=LT(F):null!=C&&h>p&&(p=h)}!function lY(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);d&&(n.unshift(d),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(Ta(e,n)),v.length&&(a+=Ta(e,r)+v.join("")),b&&(a+=Ta(e,$t.Exponential)+"+"+b)}else a=Ta(e,$t.Infinity);return a=i<0&&!l?t.negPre+a+t.negSuf:t.posPre+a+t.posSuf,a}(i,function FT(i,t="-"){const e={minInt:1,minFrac:0,maxFrac:0,posPre:"",posSuf:"",negPre:"",negSuf:"",gSize:0,lgSize:0},n=i.split(eY),r=n[0],s=n[1],o=-1!==r.indexOf(tM)?r.split(tM):[r.substring(0,r.lastIndexOf(yy)+1),r.substring(r.lastIndexOf(yy)+1)],a=o[0],l=o[1]||"";e.posPre=a.substring(0,a.indexOf(PT));for(let d=0;d{class i{}return i.\u0275fac=function(e){return new(e||i)},i.\u0275mod=en({type:i}),i.\u0275inj=Wt({}),i})();const fB="browser";let UY=(()=>{class i{}return i.\u0275prov=Pe({token:i,providedIn:"root",factory:()=>new VY(ee(qt),window)}),i})();class VY{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 zY(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=pB(this.window.history)||pB(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 pB(i){return Object.getOwnPropertyDescriptor(i,"scrollRestoration")}class m7 extends b9{constructor(){super(...arguments),this.supportsDOMEvents=!0}}class WT extends m7{static makeCurrent(){!function y9(i){ET||(ET=i)}(new WT)}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 g7(){return My=My||document.querySelector("base"),My?My.getAttribute("href"):null}();return null==e?null:function _7(i){sM=sM||document.createElement("a"),sM.setAttribute("href",i);const t=sM.pathname;return"/"===t.charAt(0)?t:`/${t}`}(e)}resetBaseElement(){My=null}getUserAgent(){return window.navigator.userAgent}getCookie(t){return function dY(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 sM,My=null;const yB=new me("TRANSITION_ID"),y7=[{provide:Vw,useFactory:function v7(i,t,e){return()=>{e.get(zw).donePromise.then(()=>{const n=$c(),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=Pe({token:i,factory:i.\u0275fac}),i})();const oM=new me("EventManagerPlugins");let aM=(()=>{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=Pe({token:i,factory:i.\u0275fac}),i})(),Cy=(()=>{class i extends xB{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)(ee(qt))},i.\u0275prov=Pe({token:i,factory:i.\u0275fac}),i})();const jT={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/"},YT=/%COMP%/g,CB=new me("RemoveStylesOnCompDestory",{providedIn:"root",factory:()=>!1});function SB(i,t){return t.flat(100).map(e=>e.replace(YT,i))}function EB(i){return t=>{if("__ngUnwrap__"===t)return i;!1===i(t)&&(t.preventDefault(),t.returnValue=!1)}}let lM=(()=>{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 qT(e)}createRenderer(e,n){if(!e||!n)return this.defaultRenderer;const r=this.getOrCreateRenderer(e,n);return r instanceof TB?r.applyToHost(e):r instanceof XT&&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 Ks.Emulated:s=new TB(o,a,n,this.appId,l);break;case Ks.ShadowDom:return new D7(o,a,e,n);default:s=new XT(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)(ee(aM),ee(Cy),ee(cm),ee(CB))},i.\u0275prov=Pe({token:i,factory:i.\u0275fac}),i})();class qT{constructor(t){this.eventManager=t,this.data=Object.create(null),this.destroyNode=null}destroy(){}createElement(t,e){return e?document.createElementNS(jT[e]||e,t):document.createElement(t)}createComment(t){return document.createComment(t)}createText(t){return document.createTextNode(t)}appendChild(t,e){(DB(t)?t.content:t).appendChild(e)}insertBefore(t,e,n){t&&(DB(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=jT[r];s?t.setAttributeNS(s,e,n):t.setAttribute(e,n)}else t.setAttribute(e,n)}removeAttribute(t,e,n){if(n){const r=jT[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&(Es.DashCase|Es.Important)?t.style.setProperty(e,n,r&Es.Important?"important":""):t.style[e]=n}removeStyle(t,e,n){n&Es.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,EB(n)):this.eventManager.addEventListener(t,e,EB(n))}}function DB(i){return"TEMPLATE"===i.tagName&&void 0!==i.content}class D7 extends qT{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=SB(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 XT extends qT{constructor(t,e,n,r,s=n.id){super(t),this.sharedStylesHost=e,this.removeStylesOnCompDestory=r,this.rendererUsageCount=0,this.styles=SB(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 TB extends XT{constructor(t,e,n,r,s){const o=r+"-"+n.id;super(t,e,n,s,o),this.contentAttr=function S7(i){return"_ngcontent-%COMP%".replace(YT,i)}(o),this.hostAttr=function E7(i){return"_nghost-%COMP%".replace(YT,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 T7=(()=>{class i extends bB{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)(ee(qt))},i.\u0275prov=Pe({token:i,factory:i.\u0275fac}),i})();const IB=["alt","control","meta","shift"],I7={"\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"},R7={alt:i=>i.altKey,control:i=>i.ctrlKey,meta:i=>i.metaKey,shift:i=>i.shiftKey};let k7=(()=>{class i extends bB{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(()=>$c().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."),IB.forEach(c=>{const d=n.indexOf(c);d>-1&&(n.splice(d,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=I7[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"),IB.forEach(o=>{o!==r&&(0,R7[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)(ee(qt))},i.\u0275prov=Pe({token:i,factory:i.\u0275fac}),i})();const L7=EN(g9,"browser",[{provide:fT,useValue:fB},{provide:mN,useValue:function P7(){WT.makeCurrent()},multi:!0},{provide:qt,useFactory:function F7(){return function o1(i){vv=i}(document),document},deps:[]}]),PB=new me(""),OB=[{provide:Hw,useClass:class b7{addToWindow(t){Rn.getAngularTestability=(n,r=!0)=>{const s=t.findTestabilityInTree(n,r);if(null==s)throw new Error("Could not find testability for element.");return s},Rn.getAllAngularTestabilities=()=>t.getAllTestabilities(),Rn.getAllAngularRootElements=()=>t.getAllRootElements(),Rn.frameworkStabilizers||(Rn.frameworkStabilizers=[]),Rn.frameworkStabilizers.push(n=>{const r=Rn.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?$c().isShadowRoot(e)?this.findTestabilityInTree(t,e.host,!0):this.findTestabilityInTree(t,e.parentElement,!0):null)}},deps:[]},{provide:xN,useClass:_T,deps:[gt,vT,Hw]},{provide:_T,useClass:_T,deps:[gt,vT,Hw]}],FB=[{provide:Iv,useValue:"root"},{provide:cl,useFactory:function O7(){return new cl},deps:[]},{provide:oM,useClass:T7,multi:!0,deps:[qt,gt,fT]},{provide:oM,useClass:k7,multi:!0,deps:[qt]},{provide:lM,useClass:lM,deps:[aM,Cy,cm,CB]},{provide:Gl,useExisting:lM},{provide:xB,useExisting:Cy},{provide:Cy,useClass:Cy,deps:[qt]},{provide:aM,useClass:aM,deps:[oM,gt]},{provide:class HY{},useClass:x7,deps:[]},[]];let LB=(()=>{class i{constructor(e){}static withServerTransition(e){return{ngModule:i,providers:[{provide:cm,useValue:e.appId},{provide:yB,useExisting:cm},y7]}}}return i.\u0275fac=function(e){return new(e||i)(ee(PB,12))},i.\u0275mod=en({type:i}),i.\u0275inj=Wt({providers:[...FB,...OB],imports:[co,_9]}),i})(),NB=(()=>{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)(ee(qt))},i.\u0275prov=Pe({token:i,factory:function(e){let n=null;return n=e?new e:function B7(){return new NB(ee(qt))}(),n},providedIn:"root"}),i})();typeof window<"u"&&window;let QT=(()=>{class i{}return i.\u0275fac=function(e){return new(e||i)},i.\u0275prov=Pe({token:i,factory:function(e){let n=null;return n=e?new(e||i):ee(VB),n},providedIn:"root"}),i})(),VB=(()=>{class i extends QT{constructor(e){super(),this._doc=e}sanitize(e,n){if(null==n)return null;switch(e){case Zn.NONE:return n;case Zn.HTML:return Ea(n,"HTML")?to(n):Qx(this._doc,String(n)).toString();case Zn.STYLE:return Ea(n,"Style")?to(n):n;case Zn.SCRIPT:if(Ea(n,"Script"))return to(n);throw new Error("unsafe value used in a script context");case Zn.URL:return Ea(n,"URL")?to(n):xh(String(n));case Zn.RESOURCE_URL:if(Ea(n,"ResourceURL"))return to(n);throw new Error(`unsafe value used in a resource URL context (see ${qu})`);default:throw new Error(`Unexpected SecurityContext ${e} (see ${qu})`)}}bypassSecurityTrustHtml(e){return function h1(i){return new a1(i)}(e)}bypassSecurityTrustStyle(e){return function f1(i){return new l1(i)}(e)}bypassSecurityTrustScript(e){return function p1(i){return new c1(i)}(e)}bypassSecurityTrustUrl(e){return function m1(i){return new d1(i)}(e)}bypassSecurityTrustResourceUrl(e){return function g1(i){return new Op(i)}(e)}}return i.\u0275fac=function(e){return new(e||i)(ee(qt))},i.\u0275prov=Pe({token:i,factory:function(e){let n=null;return n=e?new e:function $7(i){return new VB(i.get(qt))}(ee(Gi)),n},providedIn:"root"}),i})();function mt(...i){return Ni(i,Gu(i))}class Qe extends Te{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 fm=z(i=>function(){i(this),this.name="EmptyError",this.message="no elements in sequence"}),{isArray:G7}=Array,{getPrototypeOf:W7,prototype:j7,keys:Y7}=Object;function zB(i){if(1===i.length){const t=i[0];if(G7(t))return{args:t,keys:null};if(function q7(i){return i&&"object"==typeof i&&W7(i)===j7}(t)){const e=Y7(t);return{args:e.map(n=>t[n]),keys:e}}}return{args:i,keys:null}}const{isArray:X7}=Array;function JT(i){return tt(t=>function K7(i,t){return X7(t)?i(...t):i(t)}(i,t))}function HB(i,t){return i.reduce((e,n,r)=>(e[n]=t[r],e),{})}function Ra(...i){const t=Gu(i),e=M0(i),{args:n,keys:r}=zB(i);if(0===n.length)return Ni([],t);const s=new In(function Z7(i,t,e=ja){return n=>{$B(t,()=>{const{length:r}=i,s=new Array(r);let o=r,a=r;for(let l=0;l{const c=Ni(i[l],t);let d=!1;c.subscribe(qn(n,h=>{s[l]=h,d||(d=!0,a--),a||n.next(e(s.slice()))},()=>{--o||n.complete()}))},n)},n)}}(n,t,r?o=>HB(r,o):ja));return e?s.pipe(JT(e)):s}function $B(i,t,e){i?Xa(e,i,t):t()}function Sy(...i){return function Q7(){return bd(1)}()(Ni(i,Gu(i)))}function Ey(i){return new In(t=>{Mr(i()).subscribe(t)})}function pm(i,t){const e=dn(i)?i:()=>i,n=r=>r.error(e());return new In(t?r=>t.schedule(n,0,r):n)}function eI(){return ni((i,t)=>{let e=null;i._refCount++;const n=qn(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 GB extends In{constructor(t,e){super(),this.source=t,this.subjectFactory=e,this._subject=null,this._refCount=0,this._connection=null,d0(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 Qt;const e=this.getSubject();t.add(this.source.subscribe(qn(e,void 0,()=>{this._teardown(),e.complete()},n=>{this._teardown(),e.error(n)},()=>this._teardown()))),t.closed&&(this._connection=null,t=Qt.EMPTY)}return t}refCount(){return eI()(this)}}function ks(i,t){return ni((e,n)=>{let r=null,s=0,o=!1;const a=()=>o&&!r&&n.complete();e.subscribe(qn(n,l=>{r?.unsubscribe();let c=0;const d=s++;Mr(i(l,d)).subscribe(r=qn(n,h=>n.next(t?t(l,h,d,c++):h),()=>{r=null,a()}))},()=>{o=!0,a()}))})}function Oi(i){return i<=0?()=>_o:ni((t,e)=>{let n=0;t.subscribe(qn(e,r=>{++n<=i&&(e.next(r),i<=n&&e.complete())}))})}function Do(...i){const t=Gu(i);return ni((e,n)=>{(t?Sy(i,e,t):Sy(i,e)).subscribe(n)})}function gn(i,t){return ni((e,n)=>{let r=0;e.subscribe(qn(n,s=>i.call(t,s,r++)&&n.next(s)))})}function cM(i){return ni((t,e)=>{let n=!1;t.subscribe(qn(e,r=>{n=!0,e.next(r)},()=>{n||e.next(i),e.complete()}))})}function WB(i=J7){return ni((t,e)=>{let n=!1;t.subscribe(qn(e,r=>{n=!0,e.next(r)},()=>n?e.complete():e.error(i())))})}function J7(){return new fm}function iu(i,t){const e=arguments.length>=2;return n=>n.pipe(i?gn((r,s)=>i(r,s,n)):ja,Oi(1),e?cM(t):WB(()=>new fm))}function ru(i,t){return dn(t)?rr(i,t,1):rr(i,1)}function Vi(i,t,e){const n=dn(i)||t||e?{next:i,error:t,complete:e}:i;return n?ni((r,s)=>{var o;null===(o=n.subscribe)||void 0===o||o.call(n);let a=!0;r.subscribe(qn(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)}))}):ja}function jc(i){return ni((t,e)=>{let s,n=null,r=!1;n=t.subscribe(qn(e,void 0,void 0,o=>{s=Mr(i(o,jc(i)(t))),n?(n.unsubscribe(),n=null,s.subscribe(e)):r=!0})),r&&(n.unsubscribe(),n=null,s.subscribe(e))})}function tI(i,t){return ni(function eq(i,t,e,n,r){return(s,o)=>{let a=e,l=t,c=0;s.subscribe(qn(o,d=>{const h=c++;l=a?i(l,d,h):(a=!0,d),n&&o.next(l)},r&&(()=>{a&&o.next(l),o.complete()})))}}(i,t,arguments.length>=2,!0))}function nI(i){return i<=0?()=>_o:ni((t,e)=>{let n=[];t.subscribe(qn(e,r=>{n.push(r),i{for(const r of n)e.next(r);e.complete()},void 0,()=>{n=null}))})}function jB(i,t){const e=arguments.length>=2;return n=>n.pipe(i?gn((r,s)=>i(r,s,n)):ja,nI(1),e?cM(t):WB(()=>new fm))}function YB(i,t=!1){return ni((e,n)=>{let r=0;e.subscribe(qn(n,s=>{const o=i(s,r++);(o||t)&&n.next(s),!o&&n.complete()}))})}function qB(i){return tt(()=>i)}function su(i){return ni((t,e)=>{try{t.subscribe(e)}finally{e.add(i)}})}const _n="primary",Ay=Symbol("RouteTitle");class tq{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 tq(i)}function nq(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 KB(i){return Array.prototype.concat.apply([],i)}function ZB(i){return i.length>0?i[i.length-1]:null}function os(i,t){for(const e in i)i.hasOwnProperty(e)&&t(i[e],e)}function ou(i){return LD(i)?i:oy(i)?Ni(Promise.resolve(i)):mt(i)}const dM=!1,rq={exact:function e3(i,t,e){if(!kh(i.segments,t.segments)||!uM(i.segments,t.segments,e)||i.numberOfChildren!==t.numberOfChildren)return!1;for(const n in t.children)if(!i.children[n]||!e3(i.children[n],t.children[n],e))return!1;return!0},subset:t3},QB={exact:function sq(i,t){return Kl(i,t)},subset:function oq(i,t){return Object.keys(t).length<=Object.keys(i).length&&Object.keys(t).every(e=>XB(i[e],t[e]))},ignored:()=>!0};function JB(i,t,e){return rq[e.paths](i.root,t.root,e.matrixParams)&&QB[e.queryParams](i.queryParams,t.queryParams)&&!("exact"===e.fragment&&i.fragment!==t.fragment)}function t3(i,t,e){return n3(i,t,t.segments,e)}function n3(i,t,e,n){if(i.segments.length>e.length){const r=i.segments.slice(0,e.length);return!(!kh(r,e)||t.hasChildren()||!uM(r,e,n))}if(i.segments.length===e.length){if(!kh(i.segments,e)||!uM(i.segments,e,n))return!1;for(const r in t.children)if(!i.children[r]||!t3(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!!(kh(i.segments,r)&&uM(i.segments,r,n)&&i.children[_n])&&n3(i.children[_n],t,s,n)}}function uM(i,t,e){return t.every((n,r)=>QB[e](i[r].parameters,n.parameters))}class au{constructor(t=new Tn([],{}),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 cq.serialize(this)}}class Tn{constructor(t,e){this.segments=t,this.children=e,this.parent=null,os(e,(n,r)=>n.parent=this)}hasChildren(){return this.numberOfChildren>0}get numberOfChildren(){return Object.keys(this.children).length}toString(){return hM(this)}}class Dy{constructor(t,e){this.path=t,this.parameters=e}get parameterMap(){return this._parameterMap||(this._parameterMap=mm(this.parameters)),this._parameterMap}toString(){return o3(this)}}function kh(i,t){return i.length===t.length&&i.every((e,n)=>e.path===t[n].path)}let Ty=(()=>{class i{}return i.\u0275fac=function(e){return new(e||i)},i.\u0275prov=Pe({token:i,factory:function(){return new iI},providedIn:"root"}),i})();class iI{parse(t){const e=new vq(t);return new au(e.parseRootSegment(),e.parseQueryParams(),e.parseFragment())}serialize(t){const e=`/${Iy(t.root,!0)}`,n=function hq(i){const t=Object.keys(i).map(e=>{const n=i[e];return Array.isArray(n)?n.map(r=>`${fM(e)}=${fM(r)}`).join("&"):`${fM(e)}=${fM(n)}`}).filter(e=>!!e);return t.length?`?${t.join("&")}`:""}(t.queryParams);return`${e}${n}${"string"==typeof t.fragment?`#${function dq(i){return encodeURI(i)}(t.fragment)}`:""}`}}const cq=new iI;function hM(i){return i.segments.map(t=>o3(t)).join("/")}function Iy(i,t){if(!i.hasChildren())return hM(i);if(t){const e=i.children[_n]?Iy(i.children[_n],!1):"",n=[];return os(i.children,(r,s)=>{s!==_n&&n.push(`${s}:${Iy(r,!1)}`)}),n.length>0?`${e}(${n.join("//")})`:e}{const e=function lq(i,t){let e=[];return os(i.children,(n,r)=>{r===_n&&(e=e.concat(t(n,r)))}),os(i.children,(n,r)=>{r!==_n&&(e=e.concat(t(n,r)))}),e}(i,(n,r)=>r===_n?[Iy(i.children[_n],!1)]:[`${r}:${Iy(n,!1)}`]);return 1===Object.keys(i.children).length&&null!=i.children[_n]?`${hM(i)}/${e[0]}`:`${hM(i)}/(${e.join("//")})`}}function r3(i){return encodeURIComponent(i).replace(/%40/g,"@").replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",")}function fM(i){return r3(i).replace(/%3B/gi,";")}function rI(i){return r3(i).replace(/\(/g,"%28").replace(/\)/g,"%29").replace(/%26/gi,"&")}function pM(i){return decodeURIComponent(i)}function s3(i){return pM(i.replace(/\+/g,"%20"))}function o3(i){return`${rI(i.path)}${function uq(i){return Object.keys(i).map(t=>`;${rI(t)}=${rI(i[t])}`).join("")}(i.parameters)}`}const fq=/^[^\/()?;=#]+/;function mM(i){const t=i.match(fq);return t?t[0]:""}const pq=/^[^=?&#]+/,gq=/^[^&#]+/;class vq{constructor(t){this.url=t,this.remaining=t}parseRootSegment(){return this.consumeOptional("/"),""===this.remaining||this.peekStartsWith("?")||this.peekStartsWith("#")?new Tn([],{}):new Tn([],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[_n]=new Tn(t,e)),n}parseSegment(){const t=mM(this.remaining);if(""===t&&this.peekStartsWith(";"))throw new pe(4009,dM);return this.capture(t),new Dy(pM(t),this.parseMatrixParams())}parseMatrixParams(){const t={};for(;this.consumeOptional(";");)this.parseParam(t);return t}parseParam(t){const e=mM(this.remaining);if(!e)return;this.capture(e);let n="";if(this.consumeOptional("=")){const r=mM(this.remaining);r&&(n=r,this.capture(n))}t[pM(e)]=pM(n)}parseQueryParam(t){const e=function mq(i){const t=i.match(pq);return t?t[0]:""}(this.remaining);if(!e)return;this.capture(e);let n="";if(this.consumeOptional("=")){const o=function _q(i){const t=i.match(gq);return t?t[0]:""}(this.remaining);o&&(n=o,this.capture(n))}const r=s3(e),s=s3(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=mM(this.remaining),r=this.remaining[n.length];if("/"!==r&&")"!==r&&";"!==r)throw new pe(4010,dM);let s;n.indexOf(":")>-1?(s=n.slice(0,n.indexOf(":")),this.capture(s),this.capture(":")):t&&(s=_n);const o=this.parseChildren();e[s]=1===Object.keys(o).length?o[_n]:new Tn([],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 pe(4011,dM)}}function sI(i){return i.segments.length>0?new Tn([],{[_n]:i}):i}function gM(i){const t={};for(const n of Object.keys(i.children)){const s=gM(i.children[n]);(s.segments.length>0||s.hasChildren())&&(t[n]=s)}return function yq(i){if(1===i.numberOfChildren&&i.children[_n]){const t=i.children[_n];return new Tn(i.segments.concat(t.segments),t.children)}return i}(new Tn(i.segments,t))}function Ph(i){return i instanceof au}const oI=!1;function bq(i,t,e,n,r){if(0===e.length)return gm(t.root,t.root,t.root,n,r);const s=function u3(i){if("string"==typeof i[0]&&1===i.length&&"/"===i[0])return new d3(!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 os(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 d3(e,t,n)}(e);return s.toRoot()?gm(t.root,t.root,new Tn([],{}),n,r):function o(l){const c=function wq(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 h3(i,t,e){let n=i,r=t,s=e;for(;s>r;){if(s-=r,n=n.parent,!n)throw new pe(4005,oI&&"Invalid number of '../'");r=n.segments.length}return new _m(n,!1,r-s)}(e,n+(Ry(i.commands[0])?0:1),i.numberOfDoubleDots)}(s,t,i.snapshot?._urlSegment,l),d=c.processChildren?vm(c.segmentGroup,c.index,s.commands):aI(c.segmentGroup,c.index,s.commands);return gm(t.root,c.segmentGroup,d,n,r)}(i.snapshot?._lastPathIndex)}function Ry(i){return"object"==typeof i&&null!=i&&!i.outlets&&!i.segmentPath}function ky(i){return"object"==typeof i&&null!=i&&i.outlets}function gm(i,t,e,n,r){let o,s={};n&&os(n,(l,c)=>{s[c]=Array.isArray(l)?l.map(d=>`${d}`):`${l}`}),o=i===t?e:c3(i,t,e);const a=sI(gM(o));return new au(a,s,r)}function c3(i,t,e){const n={};return os(i.children,(r,s)=>{n[s]=r===t?e:c3(r,t,e)}),new Tn(i.segments,n)}class d3{constructor(t,e,n){if(this.isAbsolute=t,this.numberOfDoubleDots=e,this.commands=n,t&&n.length>0&&Ry(n[0]))throw new pe(4003,oI&&"Root segment cannot have matrix parameters");const r=n.find(ky);if(r&&r!==ZB(n))throw new pe(4004,oI&&"{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 aI(i,t,e){if(i||(i=new Tn([],{})),0===i.segments.length&&i.hasChildren())return vm(i,t,e);const n=function Cq(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(ky(a))break;const l=`${a}`,c=n0&&void 0===l)break;if(l&&c&&"object"==typeof c&&void 0===c.outlets){if(!p3(l,c,o))return s;n+=2}else{if(!p3(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]=aI(i.children[o],t,s))}),os(i.children,(s,o)=>{void 0===n[o]&&(r[o]=s)}),new Tn(i.segments,r)}}function lI(i,t,e){const n=i.segments.slice(0,t);let r=0;for(;r{"string"==typeof e&&(e=[e]),null!==e&&(t[n]=lI(new Tn([],{}),0,e))}),t}function f3(i){const t={};return os(i,(e,n)=>t[n]=`${e}`),t}function p3(i,t,e){return i==e.path&&Kl(t,e.parameters)}const Py="imperative";class Zl{constructor(t,e){this.id=t,this.url=e}}class cI extends Zl{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 Oh extends Zl{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 _M extends Zl{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 vM extends Zl{constructor(t,e,n,r){super(t,e),this.reason=n,this.code=r,this.type=16}}class dI extends Zl{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 Eq extends Zl{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 Aq extends Zl{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 Dq extends Zl{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 Tq extends Zl{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 Iq extends Zl{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 Rq{constructor(t){this.route=t,this.type=9}toString(){return`RouteConfigLoadStart(path: ${this.route.path})`}}class kq{constructor(t){this.route=t,this.type=10}toString(){return`RouteConfigLoadEnd(path: ${this.route.path})`}}class Pq{constructor(t){this.snapshot=t,this.type=11}toString(){return`ChildActivationStart(path: '${this.snapshot.routeConfig&&this.snapshot.routeConfig.path||""}')`}}class Oq{constructor(t){this.snapshot=t,this.type=12}toString(){return`ChildActivationEnd(path: '${this.snapshot.routeConfig&&this.snapshot.routeConfig.path||""}')`}}class Fq{constructor(t){this.snapshot=t,this.type=13}toString(){return`ActivationStart(path: '${this.snapshot.routeConfig&&this.snapshot.routeConfig.path||""}')`}}class Lq{constructor(t){this.snapshot=t,this.type=14}toString(){return`ActivationEnd(path: '${this.snapshot.routeConfig&&this.snapshot.routeConfig.path||""}')`}}class m3{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 Uq=(()=>{class i{createUrlTree(e,n,r,s,o,a){return bq(e||n.root,r,s,o,a)}}return i.\u0275fac=function(e){return new(e||i)},i.\u0275prov=Pe({token:i,factory:i.\u0275fac}),i})(),zq=(()=>{class i{}return i.\u0275fac=function(e){return new(e||i)},i.\u0275prov=Pe({token:i,factory:function(t){return Uq.\u0275fac(t)},providedIn:"root"}),i})();class g3{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=uI(t,this._root);return e?e.children.map(n=>n.value):[]}firstChild(t){const e=uI(t,this._root);return e&&e.children.length>0?e.children[0].value:null}siblings(t){const e=hI(t,this._root);return e.length<2?[]:e[e.length-2].children.map(r=>r.value).filter(r=>r!==t)}pathFromRoot(t){return hI(t,this._root).map(e=>e.value)}}function uI(i,t){if(i===t.value)return t;for(const e of t.children){const n=uI(i,e);if(n)return n}return null}function hI(i,t){if(i===t.value)return[t];for(const e of t.children){const n=hI(i,e);if(n.length)return n.unshift(t),n}return[]}class Yc{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 _3 extends g3{constructor(t,e){super(t),this.snapshot=e,fI(this,t)}toString(){return this.snapshot.toString()}}function v3(i,t){const e=function Hq(i,t){const o=new yM([],{},{},"",{},_n,t,null,i.root,-1,{});return new b3("",new Yc(o,[]))}(i,t),n=new Qe([new Dy("",{})]),r=new Qe({}),s=new Qe({}),o=new Qe({}),a=new Qe(""),l=new bm(n,r,o,a,s,_n,t,e.root);return l.snapshot=e.root,new _3(new Yc(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(tt(c=>c[Ay]))??mt(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(tt(t=>mm(t)))),this._paramMap}get queryParamMap(){return this._queryParamMap||(this._queryParamMap=this.queryParams.pipe(tt(t=>mm(t)))),this._queryParamMap}toString(){return this.snapshot?this.snapshot.toString():`Future(${this._futureSnapshot})`}}function y3(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 $q(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 yM{get title(){return this.data?.[Ay]}constructor(t,e,n,r,s,o,a,l,c,d,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=d,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 b3 extends g3{constructor(t,e){super(e),this.url=t,fI(this,e)}toString(){return x3(this._root)}}function fI(i,t){t.value._routerState=i,t.children.forEach(e=>fI(i,e))}function x3(i){const t=i.children.length>0?` { ${i.children.map(x3).join(", ")} } `:"";return`${i.value}${t}`}function pI(i){if(i.snapshot){const t=i.snapshot,e=i._futureSnapshot;i.snapshot=e,Kl(t.queryParams,e.queryParams)||i.queryParams.next(e.queryParams),t.fragment!==e.fragment&&i.fragment.next(e.fragment),Kl(t.params,e.params)||i.params.next(e.params),function iq(i,t){if(i.length!==t.length)return!1;for(let e=0;eKl(e.parameters,t[n].parameters))}(i.url,t.url);return e&&!(!i.parent!=!t.parent)&&(!i.parent||mI(i.parent,t.parent))}function Oy(i,t,e){if(e&&i.shouldReuseRoute(t.value,e.value.snapshot)){const n=e.value;n._futureSnapshot=t.value;const r=function Wq(i,t,e){return t.children.map(n=>{for(const r of e.children)if(i.shouldReuseRoute(n.value,r.value.snapshot))return Oy(i,n,r);return Oy(i,n)})}(i,t,e);return new Yc(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=>Oy(i,a)),o}}const n=function jq(i){return new bm(new Qe(i.url),new Qe(i.params),new Qe(i.queryParams),new Qe(i.fragment),new Qe(i.data),i.outlet,i.component,i)}(t.value),r=t.children.map(s=>Oy(i,s));return new Yc(n,r)}}const gI="ngNavigationCancelingError";function w3(i,t){const{redirectTo:e,navigationBehaviorOptions:n}=Ph(t)?{redirectTo:t,navigationBehaviorOptions:void 0}:t,r=M3(!1,0,t);return r.url=e,r.navigationBehaviorOptions=n,r}function M3(i,t,e){const n=new Error("NavigationCancelingError: "+(i||""));return n[gI]=!0,n.cancellationCode=t,e&&(n.url=e),n}function C3(i){return S3(i)&&Ph(i.url)}function S3(i){return i&&i[gI]}class Yq{constructor(){this.outlet=null,this.route=null,this.resolver=null,this.injector=null,this.children=new Fy,this.attachRef=null}}let Fy=(()=>{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 Yq,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=Pe({token:i,factory:i.\u0275fac,providedIn:"root"}),i})();const bM=!1;let E3=(()=>{class i{constructor(){this.activated=null,this._activatedRoute=null,this.name=_n,this.activateEvents=new $e,this.deactivateEvents=new $e,this.attachEvents=new $e,this.detachEvents=new $e,this.parentContexts=Lt(Fy),this.location=Lt(jr),this.changeDetector=Lt(Qn),this.environmentInjector=Lt(io)}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 pe(4012,bM);return this.activated.instance}get activatedRoute(){if(!this.activated)throw new pe(4012,bM);return this._activatedRoute}get activatedRouteData(){return this._activatedRoute?this._activatedRoute.snapshot.data:{}}detach(){if(!this.activated)throw new pe(4012,bM);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 pe(4013,bM);this._activatedRoute=e;const r=this.location,o=e.snapshot.component,a=this.parentContexts.getOrCreateContext(this.name).children,l=new qq(e,a,r.injector);if(n&&function Xq(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=ve({type:i,selectors:[["router-outlet"]],inputs:{name:"name"},outputs:{activateEvents:"activate",deactivateEvents:"deactivate",attachEvents:"attach",detachEvents:"detach"},exportAs:["outlet"],standalone:!0,features:[xi]}),i})();class qq{constructor(t,e,n){this.route=t,this.childContexts=e,this.parent=n}get(t,e){return t===bm?this.route:t===Fy?this.childContexts:this.parent.get(t,e)}}let _I=(()=>{class i{}return i.\u0275fac=function(e){return new(e||i)},i.\u0275cmp=ot({type:i,selectors:[["ng-component"]],standalone:!0,features:[ZD],decls:1,vars:0,template:function(e,n){1&e&&Ie(0,"router-outlet")},dependencies:[E3],encapsulation:2}),i})();function A3(i,t){return i.providers&&!i._injector&&(i._injector=Lw(i.providers,t,`Route: ${i.path}`)),i._injector??t}function yI(i){const t=i.children&&i.children.map(yI),e=t?{...i,children:t}:{...i};return!e.component&&!e.loadComponent&&(t||e.loadChildren)&&e.outlet&&e.outlet!==_n&&(e.component=_I),e}function ka(i){return i.outlet||_n}function D3(i,t){const e=i.filter(n=>ka(n)===t);return e.push(...i.filter(n=>ka(n)!==t)),e}function Ly(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 eX{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),pI(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]}),os(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 Lq(s.value.snapshot))}),t.children.length&&this.forwardEvent(new Oq(t.value.snapshot))}activateRoutes(t,e,n){const r=t.value,s=e?e.value:null;if(pI(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),pI(a.route.value),this.activateChildRoutes(t,null,o.children)}else{const a=Ly(r.snapshot),l=a?.get($l)??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 T3{constructor(t){this.path=t,this.route=this.path[this.path.length-1]}}class xM{constructor(t,e){this.component=t,this.route=e}}function tX(i,t,e){const n=i._root;return Ny(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 Sr(i){return null!==Gf(i)}(i)?t.get(i):i:n}function Ny(i,t,e,n,r={canDeactivateChecks:[],canActivateChecks:[]}){const s=ym(t);return i.children.forEach(o=>{(function iX(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 rX(i,t,e){if("function"==typeof e)return e(i,t);switch(e){case"pathParamsChange":return!kh(i.url,t.url);case"pathParamsOrQueryParamsChange":return!kh(i.url,t.url)||!Kl(i.queryParams,t.queryParams);case"always":return!0;case"paramsOrQueryParamsChange":return!mI(i,t)||!Kl(i.queryParams,t.queryParams);default:return!mI(i,t)}}(o,s,s.routeConfig.runGuardsAndResolvers);l?r.canActivateChecks.push(new T3(n)):(s.data=o.data,s._resolvedData=o._resolvedData),Ny(i,t,s.component?a?a.children:null:e,n,r),l&&a&&a.outlet&&a.outlet.isActivated&&r.canDeactivateChecks.push(new xM(a.outlet.component,o))}else o&&By(t,a,r),r.canActivateChecks.push(new T3(n)),Ny(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]}),os(s,(o,a)=>By(o,e.getContext(a),r)),r}function By(i,t,e){const n=ym(i),r=i.value;os(n,(s,o)=>{By(s,r.component?t?t.children.getContext(o):null:t,e)}),e.canDeactivateChecks.push(new xM(r.component&&t&&t.outlet&&t.outlet.isActivated?t.outlet.component:null,r))}function Uy(i){return"function"==typeof i}function bI(i){return i instanceof fm||"EmptyError"===i?.name}const wM=Symbol("INITIAL_VALUE");function wm(){return ks(i=>Ra(i.map(t=>t.pipe(Oi(1),Do(wM)))).pipe(tt(t=>{for(const e of t)if(!0!==e){if(e===wM)return wM;if(!1===e||e instanceof au)return e}return!0}),gn(t=>t!==wM),Oi(1)))}function I3(i){return function CE(...i){return l0(i)}(Vi(t=>{if(Ph(t))throw w3(0,t)}),tt(t=>!0===t))}const xI={matched:!1,consumedSegments:[],remainingSegments:[],parameters:{},positionalParamSegments:{}};function R3(i,t,e,n,r){const s=wI(i,t,e);return s.matched?function xX(i,t,e,n){const r=t.canMatch;return r&&0!==r.length?mt(r.map(o=>{const a=xm(o,i);return ou(function dX(i){return i&&Uy(i.canMatch)}(a)?a.canMatch(t,e):i.runInContext(()=>a(t,e)))})).pipe(wm(),I3()):mt(!0)}(n=A3(t,n),t,e).pipe(tt(o=>!0===o?s:{...xI})):mt(s)}function wI(i,t,e){if(""===t.path)return"full"===t.pathMatch&&(i.hasChildren()||e.length>0)?{...xI}:{matched:!0,consumedSegments:[],remainingSegments:e,parameters:{},positionalParamSegments:{}};const r=(t.matcher||nq)(e,i,t);if(!r)return{...xI};const s={};os(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 MM(i,t,e,n){if(e.length>0&&function CX(i,t,e){return e.some(n=>CM(i,t,n)&&ka(n)!==_n)}(i,e,n)){const s=new Tn(t,function MX(i,t,e,n){const r={};r[_n]=n,n._sourceSegment=i,n._segmentIndexShift=t.length;for(const s of e)if(""===s.path&&ka(s)!==_n){const o=new Tn([],{});o._sourceSegment=i,o._segmentIndexShift=t.length,r[ka(s)]=o}return r}(i,t,n,new Tn(e,i.children)));return s._sourceSegment=i,s._segmentIndexShift=t.length,{segmentGroup:s,slicedSegments:[]}}if(0===e.length&&function SX(i,t,e){return e.some(n=>CM(i,t,n))}(i,e,n)){const s=new Tn(i.segments,function wX(i,t,e,n,r){const s={};for(const o of n)if(CM(i,e,o)&&!r[ka(o)]){const a=new Tn([],{});a._sourceSegment=i,a._segmentIndexShift=t.length,s[ka(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 Tn(i.segments,i.children);return r._sourceSegment=i,r._segmentIndexShift=t.length,{segmentGroup:r,slicedSegments:e}}function CM(i,t,e){return(!(i.hasChildren()||t.length>0)||"full"!==e.pathMatch)&&""===e.path}function k3(i,t,e,n){return!!(ka(i)===n||n!==_n&&CM(t,e,i))&&("**"===i.path||wI(t,i,e).matched)}function P3(i,t,e){return 0===t.length&&!i.children[e]}const SM=!1;class EM{constructor(t){this.segmentGroup=t||null}}class O3{constructor(t){this.urlTree=t}}function Vy(i){return pm(new EM(i))}function F3(i){return pm(new O3(i))}class TX{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=MM(this.urlTree.root,[],[],this.config).segmentGroup,e=new Tn(t.segments,t.children);return this.expandSegmentGroup(this.injector,this.config,e,_n).pipe(tt(s=>this.createUrlTree(gM(s),this.urlTree.queryParams,this.urlTree.fragment))).pipe(jc(s=>{if(s instanceof O3)return this.allowRedirects=!1,this.match(s.urlTree);throw s instanceof EM?this.noMatchError(s):s}))}match(t){return this.expandSegmentGroup(this.injector,this.config,t.root,_n).pipe(tt(r=>this.createUrlTree(gM(r),t.queryParams,t.fragment))).pipe(jc(r=>{throw r instanceof EM?this.noMatchError(r):r}))}noMatchError(t){return new pe(4002,SM)}createUrlTree(t,e,n){const r=sI(t);return new au(r,e,n)}expandSegmentGroup(t,e,n,r){return 0===n.segments.length&&n.hasChildren()?this.expandChildren(t,e,n).pipe(tt(s=>new Tn([],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 Ni(r).pipe(ru(s=>{const o=n.children[s],a=D3(e,s);return this.expandSegmentGroup(t,a,o,s).pipe(tt(l=>({segment:l,outlet:s})))}),tI((s,o)=>(s[o.outlet]=o.segment,s),{}),jB())}expandSegment(t,e,n,r,s,o){return Ni(n).pipe(ru(a=>this.expandSegmentAgainstRoute(t,e,n,a,r,s,o).pipe(jc(c=>{if(c instanceof EM)return mt(null);throw c}))),iu(a=>!!a),jc((a,l)=>{if(bI(a))return P3(e,r,s)?mt(new Tn([],{})):Vy(e);throw a}))}expandSegmentAgainstRoute(t,e,n,r,s,o,a){return k3(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):Vy(e):Vy(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("/")?F3(s):this.lineralizeSegments(n,s).pipe(rr(o=>{const a=new Tn(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:d}=wI(e,r,s);if(!a)return Vy(e);const h=this.applyRedirectCommands(l,r.redirectTo,d);return r.redirectTo.startsWith("/")?F3(h):this.lineralizeSegments(r,h).pipe(rr(p=>this.expandSegment(t,e,n,p.concat(c),o,!1)))}matchSegmentAgainstRoute(t,e,n,r,s){return"**"===n.path?(t=A3(n,t),n.loadChildren?(n._loadedRoutes?mt({routes:n._loadedRoutes,injector:n._loadedInjector}):this.configLoader.loadChildren(t,n)).pipe(tt(a=>(n._loadedRoutes=a.routes,n._loadedInjector=a.injector,new Tn(r,{})))):mt(new Tn(r,{}))):R3(e,n,r,t).pipe(ks(({matched:o,consumedSegments:a,remainingSegments:l})=>o?this.getChildConfig(t=n._injector??t,n,r).pipe(rr(d=>{const h=d.injector??t,p=d.routes,{segmentGroup:m,slicedSegments:g}=MM(e,a,l,p),b=new Tn(m.segments,m.children);if(0===g.length&&b.hasChildren())return this.expandChildren(h,p,b).pipe(tt(x=>new Tn(a,x)));if(0===p.length&&0===g.length)return mt(new Tn(a,{}));const v=ka(n)===s;return this.expandSegment(h,b,p,g,v?_n:s,!0).pipe(tt(M=>new Tn(a.concat(M.segments),M.children)))})):Vy(e)))}getChildConfig(t,e,n){return e.children?mt({routes:e.children,injector:t}):e.loadChildren?void 0!==e._loadedRoutes?mt({routes:e._loadedRoutes,injector:e._loadedInjector}):function bX(i,t,e,n){const r=t.canLoad;return void 0===r||0===r.length?mt(!0):mt(r.map(o=>{const a=xm(o,i);return ou(function oX(i){return i&&Uy(i.canLoad)}(a)?a.canLoad(t,e):i.runInContext(()=>a(t,e)))})).pipe(wm(),I3())}(t,e,n).pipe(rr(r=>r?this.configLoader.loadChildren(t,e).pipe(Vi(s=>{e._loadedRoutes=s.routes,e._loadedInjector=s.injector})):function AX(i){return pm(M3(SM,3))}())):mt({routes:[],injector:t})}lineralizeSegments(t,e){let n=[],r=e.root;for(;;){if(n=n.concat(r.segments),0===r.numberOfChildren)return mt(n);if(r.numberOfChildren>1||!r.children[_n])return t.redirectTo,pm(new pe(4e3,SM));r=r.children[_n]}}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 au(s,this.createQueryParams(e.queryParams,this.urlTree.queryParams),e.fragment)}createQueryParams(t,e){const n={};return os(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 os(e.children,(a,l)=>{o[l]=this.createSegmentGroup(t,a,n,r)}),new Tn(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 pe(4001,SM);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 RX{}class OX{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=MM(this.urlTree.root,[],[],this.config.filter(e=>void 0===e.redirectTo)).segmentGroup;return this.processSegmentGroup(this.injector,this.config,t,_n).pipe(tt(e=>{if(null===e)return null;const n=new yM([],Object.freeze({}),Object.freeze({...this.urlTree.queryParams}),this.urlTree.fragment,{},_n,this.rootComponentType,null,this.urlTree.root,-1,{}),r=new Yc(n,e),s=new b3(this.url,r);return this.inheritParamsAndData(s._root),s}))}inheritParamsAndData(t){const e=t.value,n=y3(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 Ni(Object.keys(n.children)).pipe(ru(r=>{const s=n.children[r],o=D3(e,r);return this.processSegmentGroup(t,o,s,r)}),tI((r,s)=>r&&s?(r.push(...s),r):null),YB(r=>null!==r),cM(null),jB(),tt(r=>{if(null===r)return null;const s=N3(r);return function FX(i){i.sort((t,e)=>t.value.outlet===_n?-1:e.value.outlet===_n?1:t.value.outlet.localeCompare(e.value.outlet))}(s),s}))}processSegment(t,e,n,r,s){return Ni(e).pipe(ru(o=>this.processSegmentAgainstRoute(o._injector??t,o,n,r,s)),iu(o=>!!o),jc(o=>{if(bI(o))return P3(n,r,s)?mt([]):mt(null);throw o}))}processSegmentAgainstRoute(t,e,n,r,s){if(e.redirectTo||!k3(e,n,r,s))return mt(null);let o;if("**"===e.path){const a=r.length>0?ZB(r).parameters:{},l=U3(n)+r.length;o=mt({snapshot:new yM(r,a,Object.freeze({...this.urlTree.queryParams}),this.urlTree.fragment,V3(e),ka(e),e.component??e._loadedComponent??null,e,B3(n),l,z3(e)),consumedSegments:[],remainingSegments:[]})}else o=R3(n,e,r,t).pipe(tt(({matched:a,consumedSegments:l,remainingSegments:c,parameters:d})=>{if(!a)return null;const h=U3(n)+l.length;return{snapshot:new yM(l,d,Object.freeze({...this.urlTree.queryParams}),this.urlTree.fragment,V3(e),ka(e),e.component??e._loadedComponent??null,e,B3(n),h,z3(e)),consumedSegments:l,remainingSegments:c}}));return o.pipe(ks(a=>{if(null===a)return mt(null);const{snapshot:l,consumedSegments:c,remainingSegments:d}=a;t=e._injector??t;const h=e._loadedInjector??t,p=function LX(i){return i.children?i.children:i.loadChildren?i._loadedRoutes:[]}(e),{segmentGroup:m,slicedSegments:g}=MM(n,c,d,p.filter(v=>void 0===v.redirectTo));if(0===g.length&&m.hasChildren())return this.processChildren(h,p,m).pipe(tt(v=>null===v?null:[new Yc(l,v)]));if(0===p.length&&0===g.length)return mt([new Yc(l,[])]);const b=ka(e)===s;return this.processSegment(h,p,m,g,b?_n:s).pipe(tt(v=>null===v?null:[new Yc(l,v)]))}))}}function NX(i){const t=i.value.routeConfig;return t&&""===t.path&&void 0===t.redirectTo}function N3(i){const t=[],e=new Set;for(const n of i){if(!NX(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=N3(n.children);t.push(new Yc(n.value,r))}return t.filter(n=>!e.has(n))}function B3(i){let t=i;for(;t._sourceSegment;)t=t._sourceSegment;return t}function U3(i){let t=i,e=t._segmentIndexShift??0;for(;t._sourceSegment;)t=t._sourceSegment,e+=t._segmentIndexShift??0;return e-1}function V3(i){return i.data||{}}function z3(i){return i.resolve||{}}function H3(i){return"string"==typeof i.title||null===i.title}function MI(i){return ks(t=>{const e=i(t);return e?Ni(e).pipe(tt(()=>t)):mt(t)})}const Mm=new me("ROUTES");let CI=(()=>{class i{constructor(){this.componentLoaders=new WeakMap,this.childrenLoaders=new WeakMap,this.compiler=Lt(gN)}loadComponent(e){if(this.componentLoaders.get(e))return this.componentLoaders.get(e);if(e._loadedComponent)return mt(e._loadedComponent);this.onLoadStartListener&&this.onLoadStartListener(e);const n=ou(e.loadComponent()).pipe(tt(G3),Vi(s=>{this.onLoadEndListener&&this.onLoadEndListener(e),e._loadedComponent=s}),su(()=>{this.componentLoaders.delete(e)})),r=new GB(n,()=>new Te).pipe(eI());return this.componentLoaders.set(e,r),r}loadChildren(e,n){if(this.childrenLoaders.get(n))return this.childrenLoaders.get(n);if(n._loadedRoutes)return mt({routes:n._loadedRoutes,injector:n._loadedInjector});this.onLoadStartListener&&this.onLoadStartListener(n);const s=this.loadModuleFactoryOrRoutes(n.loadChildren).pipe(tt(a=>{this.onLoadEndListener&&this.onLoadEndListener(n);let l,c,d=!1;Array.isArray(a)?c=a:(l=a.create(e).injector,c=KB(l.get(Mm,[],Ft.Self|Ft.Optional)));return{routes:c.map(yI),injector:l}}),su(()=>{this.childrenLoaders.delete(n)})),o=new GB(s,()=>new Te).pipe(eI());return this.childrenLoaders.set(n,o),o}loadModuleFactoryOrRoutes(e){return ou(e()).pipe(tt(G3),rr(n=>n instanceof T2||Array.isArray(n)?mt(n):Ni(this.compiler.compileModuleAsync(n))))}}return i.\u0275fac=function(e){return new(e||i)},i.\u0275prov=Pe({token:i,factory:i.\u0275fac,providedIn:"root"}),i})();function G3(i){return function WX(i){return i&&"object"==typeof i&&"default"in i}(i)?i.default:i}let DM=(()=>{class i{get hasRequestedNavigation(){return 0!==this.navigationId}constructor(){this.currentNavigation=null,this.lastSuccessfulNavigation=null,this.events=new Te,this.configLoader=Lt(CI),this.environmentInjector=Lt(io),this.urlSerializer=Lt(Ty),this.rootContexts=Lt(Fy),this.navigationId=0,this.afterPreactivation=()=>mt(void 0),this.rootComponentType=null,this.configLoader.onLoadEndListener=r=>this.events.next(new kq(r)),this.configLoader.onLoadStartListener=r=>this.events.next(new Rq(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 Qe({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:Py,restoredState:null,currentSnapshot:e.routerState.snapshot,targetSnapshot:null,currentRouterState:e.routerState,targetRouterState:null,guards:{canActivateChecks:[],canDeactivateChecks:[]},guardsResult:null}),this.transitions.pipe(gn(n=>0!==n.id),tt(n=>({...n,extractedUrl:e.urlHandlingStrategy.extract(n.rawUrl)})),ks(n=>{let r=!1,s=!1;return mt(n).pipe(Vi(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}}),ks(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 d="";return this.events.next(new vM(o.id,e.serializeUrl(n.rawUrl),d,0)),e.rawUrlTree=o.rawUrl,o.resolve(null),_o}if(e.urlHandlingStrategy.shouldProcessUrl(o.rawUrl))return W3(o.source)&&(e.browserUrlTree=o.extractedUrl),mt(o).pipe(ks(d=>{const h=this.transitions?.getValue();return this.events.next(new cI(d.id,this.urlSerializer.serialize(d.extractedUrl),d.source,d.restoredState)),h!==this.transitions?.getValue()?_o:Promise.resolve(d)}),function IX(i,t,e,n){return ks(r=>function DX(i,t,e,n,r){return new TX(i,t,e,n,r).apply()}(i,t,e,r.extractedUrl,n).pipe(tt(s=>({...r,urlAfterRedirects:s}))))}(this.environmentInjector,this.configLoader,this.urlSerializer,e.config),Vi(d=>{this.currentNavigation={...this.currentNavigation,finalUrl:d.urlAfterRedirects},n.urlAfterRedirects=d.urlAfterRedirects}),function UX(i,t,e,n,r){return rr(s=>function PX(i,t,e,n,r,s,o="emptyOnly"){return new OX(i,t,e,n,r,o,s).recognize().pipe(ks(a=>null===a?function kX(i){return new In(t=>t.error(i))}(new RX):mt(a)))}(i,t,e,s.urlAfterRedirects,n.serialize(s.urlAfterRedirects),n,r).pipe(tt(o=>({...s,targetSnapshot:o}))))}(this.environmentInjector,this.rootComponentType,e.config,this.urlSerializer,e.paramsInheritanceStrategy),Vi(d=>{if(n.targetSnapshot=d.targetSnapshot,"eager"===e.urlUpdateStrategy){if(!d.extras.skipLocationChange){const p=e.urlHandlingStrategy.merge(d.urlAfterRedirects,d.rawUrl);e.setBrowserUrl(p,d)}e.browserUrlTree=d.urlAfterRedirects}const h=new Eq(d.id,this.urlSerializer.serialize(d.extractedUrl),this.urlSerializer.serialize(d.urlAfterRedirects),d.targetSnapshot);this.events.next(h)}));if(l&&e.urlHandlingStrategy.shouldProcessUrl(e.rawUrlTree)){const{id:d,extractedUrl:h,source:p,restoredState:m,extras:g}=o,b=new cI(d,this.urlSerializer.serialize(h),p,m);this.events.next(b);const v=v3(h,this.rootComponentType).snapshot;return mt(n={...o,targetSnapshot:v,urlAfterRedirects:h,extras:{...g,skipLocationChange:!1,replaceUrl:!1}})}{const d="";return this.events.next(new vM(o.id,e.serializeUrl(n.extractedUrl),d,1)),e.rawUrlTree=o.rawUrl,o.resolve(null),_o}}),Vi(o=>{const a=new Aq(o.id,this.urlSerializer.serialize(o.extractedUrl),this.urlSerializer.serialize(o.urlAfterRedirects),o.targetSnapshot);this.events.next(a)}),tt(o=>n={...o,guards:tX(o.targetSnapshot,o.currentSnapshot,this.rootContexts)}),function hX(i,t){return rr(e=>{const{targetSnapshot:n,currentSnapshot:r,guards:{canActivateChecks:s,canDeactivateChecks:o}}=e;return 0===o.length&&0===s.length?mt({...e,guardsResult:!0}):function fX(i,t,e,n){return Ni(i).pipe(rr(r=>function yX(i,t,e,n,r){const s=t&&t.routeConfig?t.routeConfig.canDeactivate:null;return s&&0!==s.length?mt(s.map(a=>{const l=Ly(t)??r,c=xm(a,l);return ou(function cX(i){return i&&Uy(i.canDeactivate)}(c)?c.canDeactivate(i,t,e,n):l.runInContext(()=>c(i,t,e,n))).pipe(iu())})).pipe(wm()):mt(!0)}(r.component,r.route,e,t,n)),iu(r=>!0!==r,!0))}(o,n,r,i).pipe(rr(a=>a&&function sX(i){return"boolean"==typeof i}(a)?function pX(i,t,e,n){return Ni(t).pipe(ru(r=>Sy(function gX(i,t){return null!==i&&t&&t(new Pq(i)),mt(!0)}(r.route.parent,n),function mX(i,t){return null!==i&&t&&t(new Fq(i)),mt(!0)}(r.route,n),function vX(i,t,e){const n=t[t.length-1],s=t.slice(0,t.length-1).reverse().map(o=>function nX(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=>Ey(()=>mt(o.guards.map(l=>{const c=Ly(o.node)??e,d=xm(l,c);return ou(function lX(i){return i&&Uy(i.canActivateChild)}(d)?d.canActivateChild(n,i):c.runInContext(()=>d(n,i))).pipe(iu())})).pipe(wm())));return mt(s).pipe(wm())}(i,r.path,e),function _X(i,t,e){const n=t.routeConfig?t.routeConfig.canActivate:null;if(!n||0===n.length)return mt(!0);const r=n.map(s=>Ey(()=>{const o=Ly(t)??e,a=xm(s,o);return ou(function aX(i){return i&&Uy(i.canActivate)}(a)?a.canActivate(t,i):o.runInContext(()=>a(t,i))).pipe(iu())}));return mt(r).pipe(wm())}(i,r.route,e))),iu(r=>!0!==r,!0))}(n,s,i,t):mt(a)),tt(a=>({...e,guardsResult:a})))})}(this.environmentInjector,o=>this.events.next(o)),Vi(o=>{if(n.guardsResult=o.guardsResult,Ph(o.guardsResult))throw w3(0,o.guardsResult);const a=new Dq(o.id,this.urlSerializer.serialize(o.extractedUrl),this.urlSerializer.serialize(o.urlAfterRedirects),o.targetSnapshot,!!o.guardsResult);this.events.next(a)}),gn(o=>!!o.guardsResult||(e.restoreHistory(o),this.cancelNavigationTransition(o,"",3),!1)),MI(o=>{if(o.guards.canActivateChecks.length)return mt(o).pipe(Vi(a=>{const l=new Tq(a.id,this.urlSerializer.serialize(a.extractedUrl),this.urlSerializer.serialize(a.urlAfterRedirects),a.targetSnapshot);this.events.next(l)}),ks(a=>{let l=!1;return mt(a).pipe(function VX(i,t){return rr(e=>{const{targetSnapshot:n,guards:{canActivateChecks:r}}=e;if(!r.length)return mt(e);let s=0;return Ni(r).pipe(ru(o=>function zX(i,t,e,n){const r=i.routeConfig,s=i._resolve;return void 0!==r?.title&&!H3(r)&&(s[Ay]=r.title),function HX(i,t,e,n){const r=function $X(i){return[...Object.keys(i),...Object.getOwnPropertySymbols(i)]}(i);if(0===r.length)return mt({});const s={};return Ni(r).pipe(rr(o=>function GX(i,t,e,n){const r=Ly(t)??n,s=xm(i,r);return ou(s.resolve?s.resolve(t,e):r.runInContext(()=>s(t,e)))}(i[o],t,e,n).pipe(iu(),Vi(a=>{s[o]=a}))),nI(1),qB(s),jc(o=>bI(o)?_o:pm(o)))}(s,i,t,n).pipe(tt(o=>(i._resolvedData=o,i.data=y3(i,e).resolve,r&&H3(r)&&(i.data[Ay]=r.title),null)))}(o.route,n,i,t)),Vi(()=>s++),nI(1),rr(o=>s===r.length?mt(e):_o))})}(e.paramsInheritanceStrategy,this.environmentInjector),Vi({next:()=>l=!0,complete:()=>{l||(e.restoreHistory(a),this.cancelNavigationTransition(a,"",2))}}))}),Vi(a=>{const l=new Iq(a.id,this.urlSerializer.serialize(a.extractedUrl),this.urlSerializer.serialize(a.urlAfterRedirects),a.targetSnapshot);this.events.next(l)}))}),MI(o=>{const a=l=>{const c=[];l.routeConfig?.loadComponent&&!l.routeConfig._loadedComponent&&c.push(this.configLoader.loadComponent(l.routeConfig).pipe(Vi(d=>{l.component=d}),tt(()=>{})));for(const d of l.children)c.push(...a(d));return c};return Ra(a(o.targetSnapshot.root)).pipe(cM(),Oi(1))}),MI(()=>this.afterPreactivation()),tt(o=>{const a=function Gq(i,t,e){const n=Oy(i,t._root,e?e._root:void 0);return new _3(n,t)}(e.routeReuseStrategy,o.targetSnapshot,o.currentRouterState);return n={...o,targetRouterState:a}}),Vi(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)=>tt(n=>(new eX(t,n.targetRouterState,n.currentRouterState,e).activate(i),n)))(this.rootContexts,e.routeReuseStrategy,o=>this.events.next(o)),Oi(1),Vi({next:o=>{r=!0,this.lastSuccessfulNavigation=this.currentNavigation,e.navigated=!0,this.events.next(new Oh(o.id,this.urlSerializer.serialize(o.extractedUrl),this.urlSerializer.serialize(e.currentUrlTree))),e.titleStrategy?.updateTitle(o.targetRouterState.snapshot),o.resolve(!0)},complete:()=>{r=!0}}),su(()=>{r||s||this.cancelNavigationTransition(n,"",1),this.currentNavigation?.id===n.id&&(this.currentNavigation=null)}),jc(o=>{if(s=!0,S3(o)){C3(o)||(e.navigated=!0,e.restoreHistory(n,!0));const a=new _M(n.id,this.urlSerializer.serialize(n.extractedUrl),o.message,o.cancellationCode);if(this.events.next(a),C3(o)){const l=e.urlHandlingStrategy.merge(o.url,e.rawUrlTree),c={skipLocationChange:n.extras.skipLocationChange,replaceUrl:"eager"===e.urlUpdateStrategy||W3(n.source)};e.scheduleNavigation(l,Py,null,c,{resolve:n.resolve,reject:n.reject,promise:n.promise})}else n.resolve(!1)}else{e.restoreHistory(n,!0);const a=new dI(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 _o}))}))}cancelNavigationTransition(e,n,r){const s=new _M(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=Pe({token:i,factory:i.\u0275fac,providedIn:"root"}),i})();function W3(i){return i!==Py}let j3=(()=>{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===_n);return n}getResolvedTitleForRoute(e){return e.data[Ay]}}return i.\u0275fac=function(e){return new(e||i)},i.\u0275prov=Pe({token:i,factory:function(){return Lt(jX)},providedIn:"root"}),i})(),jX=(()=>{class i extends j3{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)(ee(NB))},i.\u0275prov=Pe({token:i,factory:i.\u0275fac,providedIn:"root"}),i})(),YX=(()=>{class i{}return i.\u0275fac=function(e){return new(e||i)},i.\u0275prov=Pe({token:i,factory:function(){return Lt(XX)},providedIn:"root"}),i})();class qX{shouldDetach(t){return!1}store(t,e){}shouldAttach(t){return!1}retrieve(t){return null}shouldReuseRoute(t,e){return t.routeConfig===e.routeConfig}}let XX=(()=>{class i extends qX{}return i.\u0275fac=function(){let t;return function(n){return(t||(t=si(i)))(n||i)}}(),i.\u0275prov=Pe({token:i,factory:i.\u0275fac,providedIn:"root"}),i})();const TM=new me("",{providedIn:"root",factory:()=>({})});let ZX=(()=>{class i{}return i.\u0275fac=function(e){return new(e||i)},i.\u0275prov=Pe({token:i,factory:function(){return Lt(QX)},providedIn:"root"}),i})(),QX=(()=>{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=Pe({token:i,factory:i.\u0275fac,providedIn:"root"}),i})();function JX(i){throw i}function eK(i,t,e){return t.parse("/")}const tK={paths:"exact",fragment:"ignored",matrixParams:"ignored",queryParams:"exact"},nK={paths:"subset",fragment:"ignored",matrixParams:"ignored",queryParams:"subset"};let Ko=(()=>{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=Lt(L6),this.isNgZoneEnabled=!1,this.options=Lt(TM,{optional:!0})||{},this.errorHandler=this.options.errorHandler||JX,this.malformedUriErrorHandler=this.options.malformedUriErrorHandler||eK,this.navigated=!1,this.lastSuccessfulId=-1,this.urlHandlingStrategy=Lt(ZX),this.routeReuseStrategy=Lt(YX),this.urlCreationStrategy=Lt(zq),this.titleStrategy=Lt(j3),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=KB(Lt(Mm,{optional:!0})??[]),this.navigationTransitions=Lt(DM),this.urlSerializer=Lt(Ty),this.location=Lt(_y),this.isNgZoneEnabled=Lt(gt)instanceof gt&>.isInAngularZone(),this.resetConfig(this.config),this.currentUrlTree=new au,this.rawUrlTree=this.currentUrlTree,this.browserUrlTree=this.currentUrlTree,this.routerState=v3(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),Py,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(yI),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 d=null;switch(a){case"merge":d={...this.currentUrlTree.queryParams,...s};break;case"preserve":d=this.currentUrlTree.queryParams;break;default:d=s||null}return null!==d&&(d=this.removeEmptyProps(d)),this.urlCreationStrategy.createUrlTree(r,this.routerState,this.currentUrlTree,e,d,c??null)}navigateByUrl(e,n={skipLocationChange:!1}){const r=Ph(e)?e:this.parseUrl(e),s=this.urlHandlingStrategy.merge(r,this.rawUrlTree);return this.scheduleNavigation(s,Py,null,n)}navigate(e,n={skipLocationChange:!1}){return function iK(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,d;return o?(a=o.resolve,l=o.reject,c=o.promise):c=new Promise((h,p)=>{a=h,l=p}),d="computed"===this.canceledNavigationResolution?r&&r.\u0275routerPageId?r.\u0275routerPageId:(this.browserPageId??0)+1:0,this.navigationTransitions.handleNavigationRequest({targetPageId:d,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=Pe({token:i,factory:i.\u0275fac,providedIn:"root"}),i})();class Y3{}let oK=(()=>{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(gn(e=>e instanceof Oh),ru(()=>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=Lw(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 Ni(r).pipe(bd())}preloadConfig(e,n){return this.preloadingStrategy.preload(n,()=>{let r;r=n.loadChildren&&void 0===n.canLoad?this.loader.loadChildren(e,n):mt(null);const s=r.pipe(rr(o=>null===o?mt(void 0):(n._loadedRoutes=o.routes,n._loadedInjector=o.injector,this.processRoutes(o.injector??e,o.routes))));return n.loadComponent&&!n._loadedComponent?Ni([s,this.loader.loadComponent(n)]).pipe(bd()):s})}}return i.\u0275fac=function(e){return new(e||i)(ee(Ko),ee(gN),ee(io),ee(Y3),ee(CI))},i.\u0275prov=Pe({token:i,factory:i.\u0275fac,providedIn:"root"}),i})();const AI=new me("");let q3=(()=>{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 cI?(this.store[this.lastId]=this.viewportScroller.getScrollPosition(),this.lastSource=e.navigationTrigger,this.restoredId=e.restoredState?e.restoredState.navigationId:0):e instanceof Oh&&(this.lastId=e.id,this.scheduleScrollEvent(e,this.urlSerializer.parse(e.urlAfterRedirects).fragment))})}consumeScrollEvents(){return this.transitions.events.subscribe(e=>{e instanceof m3&&(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 m3(e,"popstate"===this.lastSource?this.store[this.restoredId]:null,n))})},0)})}ngOnDestroy(){this.routerEventsSubscription?.unsubscribe(),this.scrollEventsSubscription?.unsubscribe()}}return i.\u0275fac=function(e){Co()},i.\u0275prov=Pe({token:i,factory:i.\u0275fac}),i})();var Zo=(()=>((Zo=Zo||{})[Zo.COMPLETE=0]="COMPLETE",Zo[Zo.FAILED=1]="FAILED",Zo[Zo.REDIRECTING=2]="REDIRECTING",Zo))();const Cm=!1;function lu(i,t){return{\u0275kind:i,\u0275providers:t}}const DI=new me("",{providedIn:"root",factory:()=>!1});function K3(){const i=Lt(Gi);return t=>{const e=i.get(dm);if(t!==e.components[0])return;const n=i.get(Ko),r=i.get(Z3);1===i.get(TI)&&n.initialNavigation(),i.get(Q3,null,Ft.Optional)?.setUpPreloading(),i.get(AI,null,Ft.Optional)?.init(),n.resetRootComponentType(e.componentTypes[0]),r.closed||(r.next(),r.complete(),r.unsubscribe())}}const Z3=new me(Cm?"bootstrap done indicator":"",{factory:()=>new Te}),TI=new me(Cm?"initial navigation":"",{providedIn:"root",factory:()=>1});function uK(){let i=[];return i=Cm?[{provide:Bp,multi:!0,useFactory:()=>{const t=Lt(Ko);return()=>t.events.subscribe(e=>{console.group?.(`Router Event: ${e.constructor.name}`),console.log(function Nq(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?.()})}}]:[],lu(1,i)}const Q3=new me(Cm?"router preloader":"");function hK(i){return lu(0,[{provide:Q3,useExisting:oK},{provide:Y3,useExisting:i}])}const zy=!1,J3=new me(zy?"router duplicate forRoot guard":"ROUTER_FORROOT_GUARD"),fK=[_y,{provide:Ty,useClass:iI},Ko,Fy,{provide:bm,useFactory:function X3(i){return i.routerState.root},deps:[Ko]},CI,zy?{provide:DI,useValue:!0}:[]];function pK(){return new CN("Router",Ko)}let eU=(()=>{class i{constructor(e){}static forRoot(e,n){return{ngModule:i,providers:[fK,zy&&n?.enableTracing?uK().\u0275providers:[],{provide:Mm,multi:!0,useValue:e},{provide:J3,useFactory:vK,deps:[[Ko,new Ss,new Ca]]},{provide:TM,useValue:n||{}},n?.useHash?{provide:Rh,useClass:C9}:{provide:Rh,useClass:YN},{provide:AI,useFactory:()=>{const i=Lt(UY),t=Lt(gt),e=Lt(TM),n=Lt(DM),r=Lt(Ty);return e.scrollOffset&&i.setOffset(e.scrollOffset),new q3(r,n,i,t,e)}},n?.preloadingStrategy?hK(n.preloadingStrategy).\u0275providers:[],{provide:CN,multi:!0,useFactory:pK},n?.initialNavigation?yK(n):[],[{provide:tU,useFactory:K3},{provide:MN,multi:!0,useExisting:tU}]]}}static forChild(e){return{ngModule:i,providers:[{provide:Mm,multi:!0,useValue:e}]}}}return i.\u0275fac=function(e){return new(e||i)(ee(J3,8))},i.\u0275mod=en({type:i}),i.\u0275inj=Wt({imports:[_I]}),i})();function vK(i){if(zy&&i)throw new pe(4007,"The Router was provided more than once. This can happen if 'forRoot' is used outside of the root injector. Lazy loaded modules should use RouterModule.forChild() instead.");return"guarded"}function yK(i){return["disabled"===i.initialNavigation?lu(3,[{provide:Vw,multi:!0,useFactory:()=>{const t=Lt(Ko);return()=>{t.setUpLocationChangeListener()}}},{provide:TI,useValue:2}]).\u0275providers:[],"enabledBlocking"===i.initialNavigation?lu(2,[{provide:TI,useValue:0},{provide:Vw,multi:!0,deps:[Gi],useFactory:t=>{const e=t.get(w9,Promise.resolve());return()=>e.then(()=>new Promise(n=>{const r=t.get(Ko),s=t.get(Z3);(function aK(i,t){i.events.pipe(gn(e=>e instanceof Oh||e instanceof _M||e instanceof dI||e instanceof vM),tt(e=>e instanceof Oh||e instanceof vM?Zo.COMPLETE:e instanceof _M&&(0===e.code||1===e.code)?Zo.REDIRECTING:Zo.FAILED),gn(e=>e!==Zo.REDIRECTING),Oi(1)).subscribe(()=>{t()})})(r,()=>{n(!0)}),t.get(DM).afterPreactivation=()=>(n(!0),s.closed?mt(void 0):s),r.initialNavigation()}))}}]).\u0275providers:[]]}const tU=new me(zy?"Router Initializer":""),xK=[];let wK=(()=>{class i{}return i.\u0275fac=function(e){return new(e||i)},i.\u0275mod=en({type:i}),i.\u0275inj=Wt({imports:[eU.forRoot(xK),eU]}),i})();function nU(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 nt(i){return function(){var t=this,e=arguments;return new Promise(function(n,r){var s=i.apply(t,e);function o(l){nU(s,n,r,o,a,"next",l)}function a(l){nU(s,n,r,o,a,"throw",l)}o(void 0)})}}function tn(i){return null!=i&&"false"!=`${i}`}function Ps(i,t=0){return function MK(i){return!isNaN(parseFloat(i))&&!isNaN(Number(i))}(i)?Number(i):t}function IM(i){return Array.isArray(i)?i:[i]}function _r(i){return null==i?"":"string"==typeof i?i:`${i}px`}function qc(i){return i instanceof vt?i.nativeElement:i}const CK=["addListener","removeListener"],SK=["addEventListener","removeEventListener"],EK=["on","off"];function To(i,t,e,n){if(dn(e)&&(n=e,e=void 0),n)return To(i,t,e).pipe(JT(n));const[r,s]=function TK(i){return dn(i.addEventListener)&&dn(i.removeEventListener)}(i)?SK.map(o=>a=>i[o](t,a,e)):function AK(i){return dn(i.addListener)&&dn(i.removeListener)}(i)?CK.map(iU(i,t)):function DK(i){return dn(i.on)&&dn(i.off)}(i)?EK.map(iU(i,t)):[];if(!r&&i_(i))return rr(o=>To(o,t,e))(Mr(i));if(!r)throw new TypeError("Invalid event target");return new In(o=>{const a=(...l)=>o.next(1s(a)})}function iU(i,t){return e=>n=>i[e](t,n)}class IK extends Qt{constructor(t,e){super()}schedule(t,e=0){return this}}const RM={setInterval(i,t,...e){const{delegate:n}=RM;return n?.setInterval?n.setInterval(i,t,...e):setInterval(i,t,...e)},clearInterval(i){const{delegate:t}=RM;return(t?.clearInterval||clearInterval)(i)},delegate:void 0};class II extends IK{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 RM.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&&RM.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,Kr(n,this),null!=t&&(this.id=this.recycleAsyncId(e,t,null)),this.delay=null,super.unsubscribe()}}}const Hy={schedule(i){let t=requestAnimationFrame,e=cancelAnimationFrame;const{delegate:n}=Hy;n&&(t=n.requestAnimationFrame,e=n.cancelAnimationFrame);const r=t(s=>{e=void 0,i(s)});return new Qt(()=>e?.(r))},requestAnimationFrame(...i){const{delegate:t}=Hy;return(t?.requestAnimationFrame||requestAnimationFrame)(...i)},cancelAnimationFrame(...i){const{delegate:t}=Hy;return(t?.cancelAnimationFrame||cancelAnimationFrame)(...i)},delegate:void 0},rU={now:()=>(rU.delegate||Date).now(),delegate:void 0};class $y{constructor(t,e=$y.now){this.schedulerActionCtor=t,this.now=e}schedule(t,e=0,n){return new this.schedulerActionCtor(this,t).schedule(n,e)}}$y.now=rU.now;class RI extends $y{constructor(t,e=$y.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 PK=new class kK extends RI{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 RK extends II{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=Hy.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&&(Hy.cancelAnimationFrame(e),t._scheduled=void 0)}});let kI,OK=1;const kM={};function sU(i){return i in kM&&(delete kM[i],!0)}const FK={setImmediate(i){const t=OK++;return kM[t]=!0,kI||(kI=Promise.resolve()),kI.then(()=>sU(t)&&i()),t},clearImmediate(i){sU(i)}},{setImmediate:LK,clearImmediate:NK}=FK,PM={setImmediate(...i){const{delegate:t}=PM;return(t?.setImmediate||LK)(...i)},clearImmediate(i){const{delegate:t}=PM;return(t?.clearImmediate||NK)(i)},delegate:void 0},PI=new class UK extends RI{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 BK extends II{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=PM.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&&(PM.clearImmediate(e),t._scheduled===e&&(t._scheduled=void 0))}}),Gy=new RI(II),VK=Gy;function OI(i=0,t,e=VK){let n=-1;return null!=t&&($u(t)?e=t:n=t),new In(r=>{let s=function HK(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 Wy(i,t=Gy){return function zK(i){return ni((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(qn(e,c=>{n=!0,r=c,s||Mr(i(c)).subscribe(s=qn(e,a,l))},()=>{o=!0,(!n||!s||s.closed)&&e.complete()}))})}(()=>OI(i,t))}function Ue(i){return ni((t,e)=>{Mr(i).subscribe(qn(e,()=>e.complete(),ms)),!e.closed&&t.subscribe(e)})}let FI;try{FI=typeof Intl<"u"&&Intl.v8BreakIterator}catch{FI=!1}let Sm,zi=(()=>{class i{constructor(e){this._platformId=e,this.isBrowser=this._platformId?function BY(i){return i===fB}(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&&!FI)&&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)(ee(fT))},i.\u0275prov=Pe({token:i,factory:i.\u0275fac,providedIn:"root"}),i})();const oU=["color","button","checkbox","date","datetime-local","email","file","hidden","image","month","number","password","radio","range","reset","search","submit","tel","text","time","url","week"];function aU(){if(Sm)return Sm;if("object"!=typeof document||!document)return Sm=new Set(oU),Sm;let i=document.createElement("input");return Sm=new Set(oU.filter(t=>(i.setAttribute("type",t),i.type===t))),Sm}let jy,OM,Lh,LI;function Fh(i){return function $K(){if(null==jy&&typeof window<"u")try{window.addEventListener("test",null,Object.defineProperty({},"passive",{get:()=>jy=!0}))}finally{jy=jy||!1}return jy}()?i:!!i.capture}function lU(){if(null==Lh){if("object"!=typeof document||!document||"function"!=typeof Element||!Element)return Lh=!1,Lh;if("scrollBehavior"in document.documentElement.style)Lh=!0;else{const i=Element.prototype.scrollTo;Lh=!!i&&!/\{\s*\[native code\]\s*\}/.test(i.toString())}}return Lh}function Yy(){if("object"!=typeof document||!document)return 0;if(null==OM){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),OM=0,0===i.scrollLeft&&(i.scrollLeft=1,OM=0===i.scrollLeft?1:2),i.remove()}return OM}function FM(){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 cu(i){return i.composedPath?i.composedPath()[0]:i.target}function NI(){return typeof __karma__<"u"&&!!__karma__||typeof jasmine<"u"&&!!jasmine||typeof jest<"u"&&!!jest||typeof Mocha<"u"&&!!Mocha}const jK=new me("cdk-dir-doc",{providedIn:"root",factory:function YK(){return Lt(qt)}}),qK=/^(ar|ckb|dv|he|iw|fa|nqo|ps|sd|ug|ur|yi|.*[-_](Adlm|Arab|Hebr|Nkoo|Rohg|Thaa))(?!.*[-_](Latn|Cyrl)($|-|_))($|-|_)/i;let Pa=(()=>{class i{constructor(e){this.value="ltr",this.change=new $e,e&&(this.value=function XK(i){const t=i?.toLowerCase()||"";return"auto"===t&&typeof navigator<"u"&&navigator?.language?qK.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)(ee(jK,8))},i.\u0275prov=Pe({token:i,factory:i.\u0275fac,providedIn:"root"}),i})(),qy=(()=>{class i{}return i.\u0275fac=function(e){return new(e||i)},i.\u0275mod=en({type:i}),i.\u0275inj=Wt({}),i})();const KK=["contentWrapper"],ZK=["*"],QK=new me("VIRTUAL_SCROLL_STRATEGY");let Xy=(()=>{class i{constructor(e,n,r){this._ngZone=e,this._platform=n,this._scrolled=new Te,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 In(n=>{this._globalSubscription||this._addGlobalListener();const r=e>0?this._scrolled.pipe(Wy(e)).subscribe(n):this._scrolled.subscribe(n);return this._scrolledCount++,()=>{r.unsubscribe(),this._scrolledCount--,this._scrolledCount||this._removeGlobalListener()}}):mt()}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(gn(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=qc(n),s=e.getElementRef().nativeElement;do{if(r==s)return!0}while(r=r.parentElement);return!1}_addGlobalListener(){this._globalSubscription=this._ngZone.runOutsideAngular(()=>To(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)(ee(gt),ee(zi),ee(qt,8))},i.\u0275prov=Pe({token:i,factory:i.\u0275fac,providedIn:"root"}),i})(),cU=(()=>{class i{constructor(e,n,r,s){this.elementRef=e,this.scrollDispatcher=n,this.ngZone=r,this.dir=s,this._destroyed=new Te,this._elementScrolled=new In(o=>this.ngZone.runOutsideAngular(()=>To(this.elementRef.nativeElement,"scroll").pipe(Ue(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!=Yy()?(null!=e.left&&(e.right=n.scrollWidth-n.clientWidth-e.left),2==Yy()?e.left=e.right:1==Yy()&&(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;lU()?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==Yy()?e==n?s.scrollWidth-s.clientWidth-s.scrollLeft:s.scrollLeft:o&&1==Yy()?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)(E(vt),E(Xy),E(gt),E(Pa,8))},i.\u0275dir=ve({type:i,selectors:[["","cdk-scrollable",""],["","cdkScrollable",""]],standalone:!0}),i})(),LM=(()=>{class i{constructor(e,n,r){this._platform=e,this._change=new Te,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(Wy(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)(ee(zi),ee(gt),ee(qt,8))},i.\u0275prov=Pe({token:i,factory:i.\u0275fac,providedIn:"root"}),i})();const dU=new me("VIRTUAL_SCROLLABLE");let tZ=(()=>{class i extends cU{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)(E(vt),E(Xy),E(gt),E(Pa,8))},i.\u0275dir=ve({type:i,features:[dt]}),i})();const iZ=typeof requestAnimationFrame<"u"?PK:PI;let rZ=(()=>{class i extends tZ{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=tn(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=Lt(zi),this._detachedSubject=new Te,this._renderedRangeSubject=new Te,this._orientation="vertical",this._appendOnly=!1,this.scrolledIndexChange=new In(d=>this._scrollStrategy.scrolledIndexChange.subscribe(h=>Promise.resolve().then(()=>this.ngZone.run(()=>d.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=Qt.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(Do(null),Wy(0,iZ)).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(Ue(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 nZ(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)(E(vt),E(Qn),E(gt),E(QK,8),E(Pa,8),E(Xy),E(LM),E(dU,8))},i.\u0275cmp=ot({type:i,selectors:[["cdk-virtual-scroll-viewport"]],viewQuery:function(e,n){if(1&e&&$n(KK,7),2&e){let r;At(r=Dt())&&(n._contentWrapper=r.first)}},hostAttrs:[1,"cdk-virtual-scroll-viewport"],hostVars:4,hostBindings:function(e,n){2&e&&ln("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:[Dn([{provide:cU,useFactory:(t,e)=>t||e,deps:[[new Ss,new xo(dU)],i]}]),dt,ZD],ngContentSelectors:ZK,decls:4,vars:4,consts:[[1,"cdk-virtual-scroll-content-wrapper"],["contentWrapper",""],[1,"cdk-virtual-scroll-spacer"]],template:function(e,n){1&e&&(or(),G(0,"div",0,1),Yt(2),j(),Ie(3,"div",2)),2&e&&(V(3),qo("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})(),Ky=(()=>{class i{}return i.\u0275fac=function(e){return new(e||i)},i.\u0275mod=en({type:i}),i.\u0275inj=Wt({}),i})(),uU=(()=>{class i{}return i.\u0275fac=function(e){return new(e||i)},i.\u0275mod=en({type:i}),i.\u0275inj=Wt({imports:[qy,Ky,rZ,qy,Ky]}),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 Nh 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 sZ extends BI{constructor(t){super(),this.element=t instanceof vt?t.nativeElement:t}}class NM{constructor(){this._isDisposed=!1,this.attachDomPortal=null}hasAttached(){return!!this._attachedPortal}attach(t){return t instanceof Nh?(this._attachedPortal=t,this.attachComponentPortal(t)):t instanceof Em?(this._attachedPortal=t,this.attachTemplatePortal(t)):this.attachDomPortal&&t instanceof sZ?(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 oZ extends NM{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||Gi.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 NM{constructor(e,n,r){super(),this._componentFactoryResolver=e,this._viewContainerRef=n,this._isInitialized=!1,this.attached=new $e,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)(E($l),E(jr),E(qt))},i.\u0275dir=ve({type:i,selectors:[["","cdkPortalOutlet",""]],inputs:{portal:["cdkPortalOutlet","portal"]},outputs:{attached:"attached"},exportAs:["cdkPortalOutlet"],features:[dt]}),i})(),Bh=(()=>{class i{}return i.\u0275fac=function(e){return new(e||i)},i.\u0275mod=en({type:i}),i.\u0275inj=Wt({}),i})();function Qo(i,...t){return t.length?t.some(e=>i[e]):i.altKey||i.shiftKey||i.ctrlKey||i.metaKey}const hU=lU();class bZ{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=_r(-this._previousScrollPosition.left),t.style.top=_r(-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"),hU&&(n.scrollBehavior=r.scrollBehavior="auto"),window.scroll(this._previousScrollPosition.left,this._previousScrollPosition.top),hU&&(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 xZ{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(gn(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 fU{enable(){}disable(){}attach(){}}function VI(i,t){return t.some(e=>i.bottome.bottom||i.righte.right)}function pU(i,t){return t.some(e=>i.tope.bottom||i.lefte.right)}class wZ{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();VI(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 MZ=(()=>{class i{constructor(e,n,r,s){this._scrollDispatcher=e,this._viewportRuler=n,this._ngZone=r,this.noop=()=>new fU,this.close=o=>new xZ(this._scrollDispatcher,this._ngZone,this._viewportRuler,o),this.block=()=>new bZ(this._viewportRuler,this._document),this.reposition=o=>new wZ(this._scrollDispatcher,this._viewportRuler,this._ngZone,o),this._document=s}}return i.\u0275fac=function(e){return new(e||i)(ee(Xy),ee(LM),ee(gt),ee(qt))},i.\u0275prov=Pe({token:i,factory:i.\u0275fac,providedIn:"root"}),i})();class km{constructor(t){if(this.scrollStrategy=new fU,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 CZ{constructor(t,e){this.connectionPair=t,this.scrollableViewProperties=e}}let mU=(()=>{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)(ee(qt))},i.\u0275prov=Pe({token:i,factory:i.\u0275fac,providedIn:"root"}),i})(),SZ=(()=>{class i extends mU{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)(ee(qt),ee(gt,8))},i.\u0275prov=Pe({token:i,factory:i.\u0275fac,providedIn:"root"}),i})(),EZ=(()=>{class i extends mU{constructor(e,n,r){super(e),this._platform=n,this._ngZone=r,this._cursorStyleIsSet=!1,this._pointerDownListener=s=>{this._pointerDownEventTarget=cu(s)},this._clickListener=s=>{const o=cu(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 d=l[c];if(d._outsidePointerEvents.observers.length<1||!d.hasAttached())continue;if(d.overlayElement.contains(o)||d.overlayElement.contains(a))break;const h=d._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)(ee(qt),ee(zi),ee(gt,8))},i.\u0275prov=Pe({token:i,factory:i.\u0275fac,providedIn:"root"}),i})(),VM=(()=>{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||NI()){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 Te,this._outsidePointerEvents=new Te,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(Oi(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=_r(this._config.width),t.height=_r(this._config.height),t.minWidth=_r(this._config.minWidth),t.minHeight=_r(this._config.minHeight),t.maxWidth=_r(this._config.maxWidth),t.maxHeight=_r(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=IM(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(Ue(Cr(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 gU="cdk-overlay-connected-position-bounding-box",AZ=/([A-Za-z%]+)$/;class DZ{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 Te,this._resizeSubscription=Qt.EMPTY,this._offsetX=0,this._offsetY=0,this._appliedPanelClasses=[],this.positionChanges=this._positionChanges,this.setOrigin(t)}attach(t){this._validatePositions(),t.hostElement.classList.add(gU),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),d=this._getOverlayFit(c,e,n,a);if(d.isCompletelyWithinViewport)return this._isPushed=!1,void this._applyPosition(a,l);this._canFitWithFlexibleDimensions(d,c,n)?s.push({position:a,origin:l,overlayRect:e,boundingBoxRect:this._calculateBoundingBoxRect(l,a)}):(!o||o.overlayFit.visibleAreal&&(l=d,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&&Uh(this._boundingBox.style,{top:"",left:"",right:"",bottom:"",height:"",width:"",alignItems:"",justifyContent:""}),this._pane&&this._resetOverlayElementStyles(),this._overlayRef&&this._overlayRef.hostElement.classList.remove(gU),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=vU(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=_U(this._overlayRef.getConfig().minHeight),a=_U(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=vU(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 d=0,h=0;return d=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,d=t.x-this._viewportMargin;else if("start"===e.overlayX&&!r||"end"===e.overlayX&&r)h=t.x,d=n.right-t.x;else{const m=Math.min(n.right-t.x+n.left,t.x),g=this._lastBoundingBoxSize.width;d=2*m,h=t.x-m,d>g&&!this._isInitialRender&&!this._growAfterOpen&&(h=t.x-g/2)}return{top:o,left:h,bottom:a,right:p,width:d,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=_r(n.height),r.top=_r(n.top),r.bottom=_r(n.bottom),r.width=_r(n.width),r.left=_r(n.left),r.right=_r(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=_r(s)),o&&(r.maxWidth=_r(o))}this._lastBoundingBoxSize=n,Uh(this._boundingBox.style,r)}_resetBoundingBoxStyles(){Uh(this._boundingBox.style,{top:"0",left:"0",right:"0",bottom:"0",height:"",width:"",alignItems:"",justifyContent:""})}_resetOverlayElementStyles(){Uh(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 d=this._viewportRuler.getViewportScrollPosition();Uh(n,this._getExactOverlayY(e,t,d)),Uh(n,this._getExactOverlayX(e,t,d))}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=_r(o.maxHeight):s&&(n.maxHeight="")),o.maxWidth&&(r?n.maxWidth=_r(o.maxWidth):s&&(n.maxWidth="")),Uh(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=_r(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=_r(s.x),r}_getScrollVisibility(){const t=this._getOriginRect(),e=this._pane.getBoundingClientRect(),n=this._scrollables.map(r=>r.getElementRef().nativeElement.getBoundingClientRect());return{isOriginClipped:pU(t,n),isOriginOutsideView:VI(t,n),isOverlayClipped:pU(e,n),isOverlayOutsideView:VI(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&&IM(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 vt)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 Uh(i,t){for(let e in t)t.hasOwnProperty(e)&&(i[e]=t[e]);return i}function _U(i){if("number"!=typeof i&&null!=i){const[t,e]=i.split(AZ);return e&&"px"!==e?null:parseFloat(t)}return i||null}function vU(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 yU="cdk-global-overlay-wrapper";class bU{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(yU),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),d=this._xPosition,h=this._xOffset,p="rtl"===this._overlayRef.getConfig().direction;let m="",g="",b="";l?b="flex-start":"center"===d?(b="center",p?g=h:m=h):p?"left"===d||"end"===d?(b="flex-end",m=h):("right"===d||"start"===d)&&(b="flex-start",g=h):"left"===d||"start"===d?(b="flex-start",m=h):("right"===d||"end"===d)&&(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(yU),n.justifyContent=n.alignItems=t.marginTop=t.marginBottom=t.marginLeft=t.marginRight=t.position="",this._overlayRef=null,this._isDisposed=!0}}let TZ=(()=>{class i{constructor(e,n,r,s){this._viewportRuler=e,this._document=n,this._platform=r,this._overlayContainer=s}global(){return new bU}flexibleConnectedTo(e){return new DZ(e,this._viewportRuler,this._document,this._platform,this._overlayContainer)}}return i.\u0275fac=function(e){return new(e||i)(ee(LM),ee(qt),ee(zi),ee(VM))},i.\u0275prov=Pe({token:i,factory:i.\u0275fac,providedIn:"root"}),i})(),IZ=0,as=(()=>{class i{constructor(e,n,r,s,o,a,l,c,d,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=d,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 Qy(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-"+IZ++,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(dm)),new oZ(e,this._componentFactoryResolver,this._appRef,this._injector,this._document)}}return i.\u0275fac=function(e){return new(e||i)(ee(MZ),ee(VM),ee($l),ee(TZ),ee(SZ),ee(Gi),ee(gt),ee(qt),ee(Pa),ee(_y),ee(EZ),ee(kr,8))},i.\u0275prov=Pe({token:i,factory:i.\u0275fac,providedIn:"root"}),i})();const RZ=[{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"}],xU=new me("cdk-connected-overlay-scroll-strategy");let zI=(()=>{class i{constructor(e){this.elementRef=e}}return i.\u0275fac=function(e){return new(e||i)(E(vt))},i.\u0275dir=ve({type:i,selectors:[["","cdk-overlay-origin",""],["","overlay-origin",""],["","cdkOverlayOrigin",""]],exportAs:["cdkOverlayOrigin"],standalone:!0}),i})(),wU=(()=>{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=tn(e)}get lockPosition(){return this._lockPosition}set lockPosition(e){this._lockPosition=tn(e)}get flexibleDimensions(){return this._flexibleDimensions}set flexibleDimensions(e){this._flexibleDimensions=tn(e)}get growAfterOpen(){return this._growAfterOpen}set growAfterOpen(e){this._growAfterOpen=tn(e)}get push(){return this._push}set push(e){this._push=tn(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=Qt.EMPTY,this._attachSubscription=Qt.EMPTY,this._detachSubscription=Qt.EMPTY,this._positionSubscription=Qt.EMPTY,this.viewportMargin=0,this.open=!1,this.disableClose=!1,this.backdropClick=new $e,this.positionChange=new $e,this.attach=new $e,this.detach=new $e,this.overlayKeydown=new $e,this.overlayOutsideClick=new $e,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=RZ);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&&!Qo(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 zI?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(YB(()=>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)(E(as),E(Eo),E(jr),E(xU),E(Pa,8))},i.\u0275dir=ve({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:[xi]}),i})();const PZ={provide:xU,deps:[as],useFactory:function kZ(i){return()=>i.scrollStrategies.reposition()}};let Pm=(()=>{class i{}return i.\u0275fac=function(e){return new(e||i)},i.\u0275mod=en({type:i}),i.\u0275inj=Wt({providers:[as,PZ],imports:[qy,Bh,uU,uU]}),i})();function gl(i,t=Gy){return ni((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,d=t.now();if(d{s=c,o=t.now(),r||(r=t.schedule(l,i),n.add(r))},()=>{a(),n.complete()},void 0,()=>{s=r=null}))})}function MU(i){return gn((t,e)=>i<=e)}function Ql(i,t=ja){return i=i??OZ,ni((e,n)=>{let r,s=!0;e.subscribe(qn(n,o=>{const a=t(o);(s||!i(r,a))&&(s=!1,r=a,n.next(o))}))})}function OZ(i,t){return i===t}let CU=(()=>{class i{create(e){return typeof MutationObserver>"u"?null:new MutationObserver(e)}}return i.\u0275fac=function(e){return new(e||i)},i.\u0275prov=Pe({token:i,factory:i.\u0275fac,providedIn:"root"}),i})(),FZ=(()=>{class i{constructor(e){this._mutationObserverFactory=e,this._observedElements=new Map}ngOnDestroy(){this._observedElements.forEach((e,n)=>this._cleanupObserver(n))}observe(e){const n=qc(e);return new In(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 Te,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)(ee(CU))},i.\u0275prov=Pe({token:i,factory:i.\u0275fac,providedIn:"root"}),i})(),SU=(()=>{class i{get disabled(){return this._disabled}set disabled(e){this._disabled=tn(e),this._disabled?this._unsubscribe():this._subscribe()}get debounce(){return this._debounce}set debounce(e){this._debounce=Ps(e),this._subscribe()}constructor(e,n,r){this._contentObserver=e,this._elementRef=n,this._ngZone=r,this.event=new $e,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(gl(this.debounce)):e).subscribe(this.event)})}_unsubscribe(){this._currentSubscription?.unsubscribe()}}return i.\u0275fac=function(e){return new(e||i)(E(FZ),E(vt),E(gt))},i.\u0275dir=ve({type:i,selectors:[["","cdkObserveContent",""]],inputs:{disabled:["cdkObserveContentDisabled","disabled"],debounce:"debounce"},outputs:{event:"cdkObserveContent"},exportAs:["cdkObserveContent"]}),i})(),HI=(()=>{class i{}return i.\u0275fac=function(e){return new(e||i)},i.\u0275mod=en({type:i}),i.\u0275inj=Wt({providers:[CU]}),i})();const EU=new Set;let Om,LZ=(()=>{class i{constructor(e){this._platform=e,this._matchMedia=this._platform.isBrowser&&window.matchMedia?window.matchMedia.bind(window):BZ}matchMedia(e){return(this._platform.WEBKIT||this._platform.BLINK)&&function NZ(i){if(!EU.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),EU.add(i))}catch(t){console.error(t)}}(e),this._matchMedia(e)}}return i.\u0275fac=function(e){return new(e||i)(ee(zi))},i.\u0275prov=Pe({token:i,factory:i.\u0275fac,providedIn:"root"}),i})();function BZ(i){return{matches:"all"===i||""===i,media:i,addListener:()=>{},removeListener:()=>{}}}let $I=(()=>{class i{constructor(e,n){this._mediaMatcher=e,this._zone=n,this._queries=new Map,this._destroySubject=new Te}ngOnDestroy(){this._destroySubject.next(),this._destroySubject.complete()}isMatched(e){return AU(IM(e)).some(r=>this._registerQuery(r).mql.matches)}observe(e){let s=Ra(AU(IM(e)).map(o=>this._registerQuery(o).observable));return s=Sy(s.pipe(Oi(1)),s.pipe(MU(1),gl(0))),s.pipe(tt(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 In(o=>{const a=l=>this._zone.run(()=>o.next(l));return n.addListener(a),()=>{n.removeListener(a)}}).pipe(Do(n),tt(({matches:o})=>({query:e,matches:o})),Ue(this._destroySubject)),mql:n};return this._queries.set(e,s),s}}return i.\u0275fac=function(e){return new(e||i)(ee(LZ),ee(gt))},i.\u0275prov=Pe({token:i,factory:i.\u0275fac,providedIn:"root"}),i})();function AU(i){return i.map(t=>t.split(",")).reduce((t,e)=>t.concat(e)).map(t=>t.trim())}function zM(i,t){return(i.getAttribute(t)||"").match(/\S+/g)||[]}const TU="cdk-describedby-message",HM="cdk-describedby-host";let GI=0,HZ=(()=>{class i{constructor(e,n){this._platform=n,this._messageRegistry=new Map,this._messagesContainer=null,this._id=""+GI++,this._document=e,this._id=Lt(cm)+"-"+GI++}describe(e,n,r){if(!this._canBeDescribed(e,n))return;const s=WI(n,r);"string"!=typeof n?(IU(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=WI(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(`[${HM}="${this._id}"]`);for(let n=0;n0!=r.indexOf(TU));e.setAttribute("aria-describedby",n.join(" "))}_addMessageReference(e,n){const r=this._messageRegistry.get(n);(function VZ(i,t,e){const n=zM(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(HM,this._id),r.referenceCount++}_removeMessageReference(e,n){const r=this._messageRegistry.get(n);r.referenceCount--,function zZ(i,t,e){const r=zM(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(HM)}_isElementDescribedByMessage(e,n){const r=zM(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)(ee(qt),ee(zi))},i.\u0275prov=Pe({token:i,factory:i.\u0275fac,providedIn:"root"}),i})();function WI(i,t){return"string"==typeof i?`${t||""}/${i}`:i}function IU(i,t){i.id||(i.id=`${TU}-${t}-${GI++}`)}class RU{constructor(t){this._items=t,this._activeItemIndex=-1,this._activeItem=null,this._wrap=!1,this._letterKeyStream=new Te,this._typeaheadSubscription=Qt.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 Te,this.change=new Te,t instanceof om&&(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(Vi(e=>this._pressedLetters.push(e)),gl(t),gn(()=>this._pressedLetters.length>0),tt(()=>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 om?this._items.toArray():this._items}}class $Z extends RU{setActiveItem(t){this.activeItem&&this.activeItem.setInactiveStyles(),super.setActiveItem(t),this.activeItem&&this.activeItem.setActiveStyles()}}class kU extends RU{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 $M=(()=>{class i{constructor(e){this._platform=e}isDisabled(e){return e.hasAttribute("disabled")}isVisible(e){return function WZ(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 GZ(i){try{return i.frameElement}catch{return null}}(function JZ(i){return i.ownerDocument&&i.ownerDocument.defaultView||window}(e));if(n&&(-1===OU(n)||!this.isVisible(n)))return!1;let r=e.nodeName.toLowerCase(),s=OU(e);return e.hasAttribute("contenteditable")?-1!==s:!("iframe"===r||"object"===r||this._platform.WEBKIT&&this._platform.IOS&&!function ZZ(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 QZ(i){return!function YZ(i){return function XZ(i){return"input"==i.nodeName.toLowerCase()}(i)&&"hidden"==i.type}(i)&&(function jZ(i){let t=i.nodeName.toLowerCase();return"input"===t||"select"===t||"button"===t||"textarea"===t}(i)||function qZ(i){return function KZ(i){return"a"==i.nodeName.toLowerCase()}(i)&&i.hasAttribute("href")}(i)||i.hasAttribute("contenteditable")||PU(i))}(e)&&!this.isDisabled(e)&&(n?.ignoreVisibility||this.isVisible(e))}}return i.\u0275fac=function(e){return new(e||i)(ee(zi))},i.\u0275prov=Pe({token:i,factory:i.\u0275fac,providedIn:"root"}),i})();function PU(i){if(!i.hasAttribute("tabindex")||void 0===i.tabIndex)return!1;let t=i.getAttribute("tabindex");return!(!t||isNaN(parseInt(t,10)))}function OU(i){if(!PU(i))return null;const t=parseInt(i.getAttribute("tabindex")||"",10);return isNaN(t)?-1:t}class eQ{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(Oi(1)).subscribe(t)}}let jI=(()=>{class i{constructor(e,n,r){this._checker=e,this._ngZone=n,this._document=r}create(e,n=!1){return new eQ(e,this._checker,this._ngZone,this._document,n)}}return i.\u0275fac=function(e){return new(e||i)(ee($M),ee(gt),ee(qt))},i.\u0275prov=Pe({token:i,factory:i.\u0275fac,providedIn:"root"}),i})();function YI(i){return 0===i.buttons||0===i.offsetX&&0===i.offsetY}function qI(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 tQ=new me("cdk-input-modality-detector-options"),nQ={ignoreKeys:[18,17,224,91,16]},Fm=Fh({passive:!0,capture:!0});let iQ=(()=>{class i{get mostRecentModality(){return this._modality.value}constructor(e,n,r,s){this._platform=e,this._mostRecentTarget=null,this._modality=new Qe(null),this._lastTouchMs=0,this._onKeydown=o=>{this._options?.ignoreKeys?.some(a=>a===o.keyCode)||(this._modality.next("keyboard"),this._mostRecentTarget=cu(o))},this._onMousedown=o=>{Date.now()-this._lastTouchMs<650||(this._modality.next(YI(o)?"keyboard":"mouse"),this._mostRecentTarget=cu(o))},this._onTouchstart=o=>{qI(o)?this._modality.next("keyboard"):(this._lastTouchMs=Date.now(),this._modality.next("touch"),this._mostRecentTarget=cu(o))},this._options={...nQ,...s},this.modalityDetected=this._modality.pipe(MU(1)),this.modalityChanged=this.modalityDetected.pipe(Ql()),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)(ee(zi),ee(gt),ee(qt),ee(tQ,8))},i.\u0275prov=Pe({token:i,factory:i.\u0275fac,providedIn:"root"}),i})();const rQ=new me("liveAnnouncerElement",{providedIn:"root",factory:function sQ(){return null}}),oQ=new me("LIVE_ANNOUNCER_DEFAULT_OPTIONS");let aQ=0,XI=(()=>{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 Te,this._rootNodeFocusAndBlurListener=a=>{for(let c=cu(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=qc(e);if(!this._platform.isBrowser||1!==r.nodeType)return mt(null);const s=function WK(i){if(function GK(){if(null==LI){const i=typeof document<"u"?document.head:null;LI=!(!i||!i.createShadowRoot&&!i.attachShadow)}return LI}()){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 Te,rootNode:s};return this._elementInfo.set(r,a),this._registerGlobalListeners(a),a.subject}stopMonitoring(e){const n=qc(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=qc(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=cu(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,GM),n.addEventListener("blur",this._rootNodeFocusAndBlurListener,GM)}),this._rootNodeFocusListenerCount.set(n,r+1),1==++this._monitoredElementCount&&(this._ngZone.runOutsideAngular(()=>{this._getWindow().addEventListener("focus",this._windowFocusListener)}),this._inputModalityDetector.modalityDetected.pipe(Ue(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,GM),n.removeEventListener("blur",this._rootNodeFocusAndBlurListener,GM),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=Lt($I).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,LU,NU),this._hasCheckedHighContrastMode=!0;const n=this.getHighContrastMode();1===n?e.add(KI,LU):2===n&&e.add(KI,NU)}}}return i.\u0275fac=function(e){return new(e||i)(ee(zi),ee(qt))},i.\u0275prov=Pe({token:i,factory:i.\u0275fac,providedIn:"root"}),i})(),UU=(()=>{class i{constructor(e){e._applyBodyHighContrastModeCssClasses()}}return i.\u0275fac=function(e){return new(e||i)(ee(BU))},i.\u0275mod=en({type:i}),i.\u0275inj=Wt({imports:[HI]}),i})();function cQ(i,t){}class WM{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 VU=(()=>{class i extends NM{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=d=>{this._portalOutlet.hasAttached();const h=this._portalOutlet.attachDomPortal(d);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=FM(),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=FM();return e===n||e.contains(n)}_initializeFocusTrap(){this._focusTrap=this._focusTrapFactory.create(this._elementRef.nativeElement),this._document&&(this._elementFocusedBeforeDialogWasOpened=FM())}_handleBackdropClicks(){this._overlayRef.backdropClick().subscribe(()=>{this._config.disableClose&&this._recaptureFocus()})}}return i.\u0275fac=function(e){return new(e||i)(E(vt),E(jI),E(qt,8),E(WM),E($M),E(gt),E(Qy),E(Xc))},i.\u0275cmp=ot({type:i,selectors:[["cdk-dialog-container"]],viewQuery:function(e,n){if(1&e&&$n(Am,7),2&e){let r;At(r=Dt())&&(n._portalOutlet=r.first)}},hostAttrs:["tabindex","-1",1,"cdk-dialog-container"],hostVars:6,hostBindings:function(e,n){2&e&&It("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:[dt],decls:1,vars:0,consts:[["cdkPortalOutlet",""]],template:function(e,n){1&e&&fe(0,cQ,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 ZI{constructor(t,e){this.overlayRef=t,this.config=e,this.closed=new Te,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&&!Qo(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 zU=new me("DialogScrollStrategy"),dQ=new me("DialogData"),uQ=new me("DefaultDialogConfig"),fQ={provide:zU,deps:[as],useFactory:function hQ(i){return()=>i.scrollStrategies.block()}};let pQ=0,HU=(()=>{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 Te,this._afterOpenedAtThisLevel=new Te,this._ariaHiddenElements=new Map,this.afterAllClosed=Ey(()=>this.openDialogs.length?this._getAfterAllClosed():this._getAfterAllClosed().pipe(Do(void 0))),this._scrollStrategy=a}open(e,n){(n={...this._defaultOptions||new WM,...n}).id=n.id||"cdk-dialog-"+pQ++,n.id&&this.getDialogById(n.id);const s=this._getOverlayConfig(n),o=this._overlay.create(s),a=new ZI(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(){QI(this.openDialogs,e=>e.close())}getDialogById(e){return this.openDialogs.find(n=>n.id===e)}ngOnDestroy(){QI(this._openDialogsAtThisLevel,e=>{!1===e.config.closeOnDestroy&&this._removeOpenDialog(e,!1)}),QI(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:WM,useValue:r},{provide:ZI,useValue:n},{provide:Qy,useValue:e}];let a;r.container?"function"==typeof r.container?a=r.container:(a=r.container.type,o.push(...r.container.providers(r))):a=VU;const l=new Nh(a,r.viewContainerRef,Gi.create({parent:s||this._injector,providers:o}),r.componentFactoryResolver);return e.attach(l).instance}_attachDialogContent(e,n,r,s){if(e instanceof Eo){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 Nh(e,s.viewContainerRef,o,s.componentFactoryResolver));n.componentInstance=a.instance}}_createInjector(e,n,r,s){const o=e.injector||e.viewContainerRef?.injector,a=[{provide:dQ,useValue:e.data},{provide:ZI,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(Pa,null,{optional:!0}))&&a.push({provide:Pa,useValue:{value:e.direction,change:mt()}}),Gi.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)(ee(as),ee(Gi),ee(uQ,8),ee(i,12),ee(VM),ee(zU))},i.\u0275prov=Pe({token:i,factory:i.\u0275fac}),i})();function QI(i,t){let e=i.length;for(;e--;)t(i[e])}let mQ=(()=>{class i{}return i.\u0275fac=function(e){return new(e||i)},i.\u0275mod=en({type:i}),i.\u0275inj=Wt({providers:[HU,fQ],imports:[Pm,Bh,UU,Bh]}),i})();const gQ=["text"];function _Q(i,t){if(1&i&&Ie(0,"mat-pseudo-checkbox",6),2&i){const e=re();U("state",e.selected?"checked":"unchecked")("disabled",e.disabled)}}function vQ(i,t){1&i&&Ie(0,"mat-pseudo-checkbox",7),2&i&&U("disabled",re().disabled)}function yQ(i,t){if(1&i&&(G(0,"span",8),Be(1),j()),2&i){const e=re();V(1),Qi("(",e.group.label,")")}}const bQ=[[["mat-icon"]],"*"],xQ=["mat-icon","*"],MQ=new me("mat-sanity-checks",{providedIn:"root",factory:function wQ(){return!0}});let Jn=(()=>{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!NI()&&("boolean"==typeof this._sanityChecks?this._sanityChecks:!!this._sanityChecks[e])}}return i.\u0275fac=function(e){return new(e||i)(ee(BU),ee(MQ,8),ee(qt))},i.\u0275mod=en({type:i}),i.\u0275inj=Wt({imports:[qy,qy]}),i})();function jM(i){return class extends i{get disabled(){return this._disabled}set disabled(t){this._disabled=tn(t)}constructor(...t){super(...t),this._disabled=!1}}}function Jy(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 YM(i){return class extends i{get disableRipple(){return this._disableRipple}set disableRipple(t){this._disableRipple=tn(t)}constructor(...t){super(...t),this._disableRipple=!1}}}function JI(i,t=0){return class extends i{get tabIndex(){return this.disabled?-1:this._tabIndex}set tabIndex(e){this._tabIndex=null!=e?Ps(e):this.defaultTabIndex}constructor(...e){super(...e),this._tabIndex=t,this.defaultTabIndex=t}}}function WU(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 CQ(i){return class extends i{constructor(...t){super(...t),this._isInitialized=!1,this._pendingSubscribers=[],this.initialized=new In(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 YU=(()=>{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=Pe({token:i,factory:i.\u0275fac,providedIn:"root"}),i})();class EQ{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 qU=Fh({passive:!0,capture:!0});class AQ{constructor(){this._events=new Map,this._delegateEventHandler=t=>{const e=cu(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,qU)})}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,qU)))}}const XU={enterDuration:225,exitDuration:150},KU=Fh({passive:!0,capture:!0}),ZU=["mousedown","touchstart"],QU=["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=qc(n))}fadeInRipple(t,e,n={}){const r=this._containerRect=this._containerRect||this._containerElement.getBoundingClientRect(),s={...XU,...n.animation};n.centered&&(t=r.left+r.width/2,e=r.top+r.height/2);const o=n.radius||function TQ(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,d=document.createElement("div");d.classList.add("mat-ripple-element"),d.style.left=a-o+"px",d.style.top=l-o+"px",d.style.height=2*o+"px",d.style.width=2*o+"px",null!=n.color&&(d.style.backgroundColor=n.color),d.style.transitionDuration=`${c}ms`,this._containerElement.appendChild(d);const h=window.getComputedStyle(d),m=h.transitionDuration,g="none"===h.transitionProperty||"0s"===m||"0s, 0s"===m||0===r.width&&0===r.height,b=new EQ(this,d,n,g);d.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);d.addEventListener("transitionend",y),d.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={...XU,...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=qc(t);!this._platform.isBrowser||!e||e===this._triggerElement||(this._removeTriggerEvents(),this._triggerElement=e,ZU.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(()=>{QU.forEach(e=>{this._triggerElement.addEventListener(e,this,KU)})}),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=YI(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&&(ZU.forEach(e=>Lm._eventManager.removeHandler(e,t,this)),this._pointerUpEventsRegistered&&QU.forEach(e=>t.removeEventListener(e,this,KU)))}}Lm._eventManager=new AQ;const eR=new me("mat-ripple-global-options");let Vh=(()=>{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)(E(vt),E(gt),E(zi),E(eR,8),E(kr,8))},i.\u0275dir=ve({type:i,selectors:[["","mat-ripple",""],["","matRipple",""]],hostAttrs:[1,"mat-ripple"],hostVars:2,hostBindings:function(e,n){2&e&&ln("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})(),tb=(()=>{class i{}return i.\u0275fac=function(e){return new(e||i)},i.\u0275mod=en({type:i}),i.\u0275inj=Wt({imports:[Jn,Jn]}),i})(),IQ=(()=>{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)(E(kr,8))},i.\u0275cmp=ot({type:i,selectors:[["mat-pseudo-checkbox"]],hostAttrs:[1,"mat-pseudo-checkbox"],hostVars:12,hostBindings:function(e,n){2&e&&ln("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})(),JU=(()=>{class i{}return i.\u0275fac=function(e){return new(e||i)},i.\u0275mod=en({type:i}),i.\u0275inj=Wt({imports:[Jn]}),i})();const eV=new me("MAT_OPTION_PARENT_COMPONENT"),tV=new me("MatOptgroup");let RQ=0;class kQ{constructor(t,e=!1){this.source=t,this.isUserInput=e}}let PQ=(()=>{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=tn(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-"+RQ++,this.onSelectionChange=new $e,this._stateChanges=new Te}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)&&!Qo(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 kQ(this,e))}}return i.\u0275fac=function(e){Co()},i.\u0275dir=ve({type:i,viewQuery:function(e,n){if(1&e&&$n(gQ,7),2&e){let r;At(r=Dt())&&(n._text=r.first)}},inputs:{value:"value",id:"id",disabled:"disabled"},outputs:{onSelectionChange:"onSelectionChange"}}),i})(),Nm=(()=>{class i extends PQ{constructor(e,n,r,s){super(e,n,r,s)}}return i.\u0275fac=function(e){return new(e||i)(E(vt),E(Qn),E(eV,8),E(tV,8))},i.\u0275cmp=ot({type:i,selectors:[["mat-option"]],hostAttrs:["role","option",1,"mat-mdc-option","mdc-list-item"],hostVars:11,hostBindings:function(e,n){1&e&&Oe("click",function(){return n._selectViaInteraction()})("keydown",function(s){return n._handleKeydown(s)}),2&e&&(ql("id",n.id),It("aria-selected",n.selected)("aria-disabled",n.disabled.toString()),ln("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:[dt],ngContentSelectors:xQ,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&&(or(bQ),fe(0,_Q,1,2,"mat-pseudo-checkbox",0),Yt(1),G(2,"span",1,2),Yt(4,1),j(),fe(5,vQ,1,1,"mat-pseudo-checkbox",3),fe(6,yQ,2,1,"span",4),Ie(7,"div",5)),2&e&&(U("ngIf",n.multiple),V(5),U("ngIf",!n.multiple&&n.selected&&!n.hideSingleSelectionIndicator),V(1),U("ngIf",n.group&&n.group._inert),V(1),U("matRippleTrigger",n._getHostElement())("matRippleDisabled",n.disabled||n.disableRipple))},dependencies:[Vh,_i,IQ],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})(),tR=(()=>{class i{}return i.\u0275fac=function(e){return new(e||i)},i.\u0275mod=en({type:i}),i.\u0275inj=Wt({imports:[tb,co,Jn,JU]}),i})();class nV{}class LQ{}const Kc="*";function Oa(i,t){return{type:7,name:i,definitions:t,options:{}}}function Yr(i,t=null){return{type:4,styles:t,timings:i}}function rV(i,t=null){return{type:2,steps:i,options:t}}function oi(i){return{type:6,styles:i,offset:null}}function Os(i,t,e){return{type:0,name:i,styles:t,options:e}}function sV(i){return{type:5,steps:i}}function Or(i,t,e=null){return{type:1,expr:i,animation:t,options:e}}function nR(i=null){return{type:9,options:i}}function iR(i,t,e=null){return{type:11,selector:i,animation:t,options:e}}function oV(i){Promise.resolve().then(i)}class nb{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(){oV(()=>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 aV{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?oV(()=>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 rR="!";function NQ(i,t){}class qM{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 sR="mdc-dialog--open",lV="mdc-dialog--opening",cV="mdc-dialog--closing";let VQ=(()=>{class i extends VU{constructor(e,n,r,s,o,a,l,c){super(e,n,r,s,o,a,l,c),this._animationStateChanged=new $e}_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)(E(vt),E(jI),E(qt,8),E(qM),E($M),E(gt),E(Qy),E(Xc))},i.\u0275cmp=ot({type:i,selectors:[["ng-component"]],features:[dt],decls:0,vars:0,template:function(e,n){},encapsulation:2}),i})();const dV="--mat-dialog-transition-duration";function uV(i){return null==i?null:"number"==typeof i?i:i.endsWith("ms")?Ps(i.substring(0,i.length-2)):i.endsWith("s")?1e3*Ps(i.substring(0,i.length-1)):"0"===i?0:null}let zQ=(()=>{class i extends VQ{constructor(e,n,r,s,o,a,l,c,d){super(e,n,r,s,o,a,l,d),this._animationMode=c,this._animationsEnabled="NoopAnimations"!==this._animationMode,this._hostElement=this._elementRef.nativeElement,this._openAnimationDuration=this._animationsEnabled?uV(this._config.enterAnimationDuration)??150:0,this._closeAnimationDuration=this._animationsEnabled?uV(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(dV,`${this._openAnimationDuration}ms`),this._requestAnimationFrame(()=>this._hostElement.classList.add(lV,sR)),this._waitForAnimationToComplete(this._openAnimationDuration,this._finishDialogOpen)):(this._hostElement.classList.add(sR),Promise.resolve().then(()=>this._finishDialogOpen()))}_startExitAnimation(){this._animationStateChanged.emit({state:"closing",totalTime:this._closeAnimationDuration}),this._hostElement.classList.remove(sR),this._animationsEnabled?(this._hostElement.style.setProperty(dV,`${this._openAnimationDuration}ms`),this._requestAnimationFrame(()=>this._hostElement.classList.add(cV)),this._waitForAnimationToComplete(this._closeAnimationDuration,this._finishDialogClose)):Promise.resolve().then(()=>this._finishDialogClose())}_clearAnimationClasses(){this._hostElement.classList.remove(lV,cV)}_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)(E(vt),E(jI),E(qt,8),E(qM),E($M),E(gt),E(Qy),E(kr,8),E(Xc))},i.\u0275cmp=ot({type:i,selectors:[["mat-dialog-container"]],hostAttrs:["tabindex","-1",1,"mat-mdc-dialog-container","mdc-dialog"],hostVars:8,hostBindings:function(e,n){2&e&&(ql("id",n._config.id),It("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),ln("_mat-animation-noopable",!n._animationsEnabled))},features:[dt],decls:3,vars:0,consts:[[1,"mdc-dialog__container"],[1,"mat-mdc-dialog-surface","mdc-dialog__surface"],["cdkPortalOutlet",""]],template:function(e,n){1&e&&(G(0,"div",0)(1,"div",1),fe(2,NQ,0,0,"ng-template",2),j()())},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 ib{constructor(t,e,n){this._ref=t,this._containerInstance=n,this._afterOpened=new Te,this._beforeClosed=new Te,this._state=0,this.disableClose=e.disableClose,this.id=t.id,n._animationStateChanged.pipe(gn(r=>"opened"===r.state),Oi(1)).subscribe(()=>{this._afterOpened.next(),this._afterOpened.complete()}),n._animationStateChanged.pipe(gn(r=>"closed"===r.state),Oi(1)).subscribe(()=>{clearTimeout(this._closeFallbackTimeout),this._finishDialogClose()}),t.overlayRef.detachments().subscribe(()=>{this._beforeClosed.next(this._result),this._beforeClosed.complete(),this._finishDialogClose()}),Cr(this.backdropClick(),this.keydownEvents().pipe(gn(r=>27===r.keyCode&&!this.disableClose&&!Qo(r)))).subscribe(r=>{this.disableClose||(r.preventDefault(),hV(this,"keydown"===r.type?"keyboard":"mouse"))})}close(t){this._result=t,this._containerInstance._animationStateChanged.pipe(gn(e=>"closing"===e.state),Oi(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 hV(i,t,e){return i._closeInteractionType=t,i.close(e)}const oR=new me("MatMdcDialogData"),HQ=new me("mat-mdc-dialog-default-options"),fV=new me("mat-mdc-dialog-scroll-strategy"),GQ={provide:fV,deps:[as],useFactory:function $Q(i){return()=>i.scrollStrategies.block()}};let WQ=0,jQ=(()=>{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,d,h){this._overlay=e,this._defaultOptions=r,this._parentDialog=s,this._dialogRefConstructor=l,this._dialogContainerType=c,this._dialogDataToken=d,this._openDialogsAtThisLevel=[],this._afterAllClosedAtThisLevel=new Te,this._afterOpenedAtThisLevel=new Te,this._idPrefix="mat-dialog-",this.dialogConfigClass=qM,this.afterAllClosed=Ey(()=>this.openDialogs.length?this._getAfterAllClosed():this._getAfterAllClosed().pipe(Do(void 0))),this._scrollStrategy=a,this._dialog=n.get(HU)}open(e,n){let r;(n={...this._defaultOptions||new qM,...n}).id=n.id||`${this._idPrefix}${WQ++}`,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:WM,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){Co()},i.\u0275prov=Pe({token:i,factory:i.\u0275fac}),i})(),Bm=(()=>{class i extends jQ{constructor(e,n,r,s,o,a,l,c){super(e,n,s,a,l,o,ib,zQ,oR,c),this._idPrefix="mat-mdc-dialog-"}}return i.\u0275fac=function(e){return new(e||i)(ee(as),ee(Gi),ee(_y,8),ee(HQ,8),ee(fV),ee(i,12),ee(VM),ee(kr,8))},i.\u0275prov=Pe({token:i,factory:i.\u0275fac}),i})(),YQ=0,qQ=(()=>{class i{constructor(e,n,r){this.dialogRef=e,this._elementRef=n,this._dialog=r,this.type="button"}ngOnInit(){this.dialogRef||(this.dialogRef=_V(this._elementRef,this._dialog.openDialogs))}ngOnChanges(e){const n=e._matDialogClose||e._matDialogCloseResult;n&&(this.dialogResult=n.currentValue)}_onButtonClick(e){hV(this.dialogRef,0===e.screenX&&0===e.screenY?"keyboard":"mouse",this.dialogResult)}}return i.\u0275fac=function(e){return new(e||i)(E(ib,8),E(vt),E(Bm))},i.\u0275dir=ve({type:i,selectors:[["","mat-dialog-close",""],["","matDialogClose",""]],hostVars:2,hostBindings:function(e,n){1&e&&Oe("click",function(s){return n._onButtonClick(s)}),2&e&&It("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:[xi]}),i})(),pV=(()=>{class i{constructor(e,n,r){this._dialogRef=e,this._elementRef=n,this._dialog=r,this.id="mat-mdc-dialog-title-"+YQ++}ngOnInit(){this._dialogRef||(this._dialogRef=_V(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)(E(ib,8),E(vt),E(Bm))},i.\u0275dir=ve({type:i,selectors:[["","mat-dialog-title",""],["","matDialogTitle",""]],hostAttrs:[1,"mat-mdc-dialog-title","mdc-dialog__title"],hostVars:1,hostBindings:function(e,n){2&e&&ql("id",n.id)},inputs:{id:"id"},exportAs:["matDialogTitle"]}),i})(),mV=(()=>{class i{}return i.\u0275fac=function(e){return new(e||i)},i.\u0275dir=ve({type:i,selectors:[["","mat-dialog-content",""],["mat-dialog-content"],["","matDialogContent",""]],hostAttrs:[1,"mat-mdc-dialog-content","mdc-dialog__content"]}),i})(),gV=(()=>{class i{constructor(){this.align="start"}}return i.\u0275fac=function(e){return new(e||i)},i.\u0275dir=ve({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&&ln("mat-mdc-dialog-actions-align-center","center"===n.align)("mat-mdc-dialog-actions-align-end","end"===n.align)},inputs:{align:"align"}}),i})();function _V(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 vV=(()=>{class i{}return i.\u0275fac=function(e){return new(e||i)},i.\u0275mod=en({type:i}),i.\u0275inj=Wt({providers:[Bm,GQ],imports:[mQ,Pm,Bh,Jn,Jn]}),i})();const XQ=["mat-button",""],bV=[[["",8,"material-icons",3,"iconPositionEnd",""],["mat-icon",3,"iconPositionEnd",""],["","matButtonIcon","",3,"iconPositionEnd",""]],"*",[["","iconPositionEnd","",8,"material-icons"],["mat-icon","iconPositionEnd",""],["","matButtonIcon","","iconPositionEnd",""]]],xV=[".material-icons:not([iconPositionEnd]), mat-icon:not([iconPositionEnd]), [matButtonIcon]:not([iconPositionEnd])","*",".material-icons[iconPositionEnd], mat-icon[iconPositionEnd], [matButtonIcon][iconPositionEnd]"],ZQ=["mat-mini-fab",""],JQ=["mat-icon-button",""],eJ=["*"],tJ=[{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"]}],nJ=Jy(jM(YM(class{constructor(i){this._elementRef=i}})));let aR=(()=>{class i extends nJ{constructor(e,n,r,s){super(e),this._platform=n,this._ngZone=r,this._animationMode=s,this._focusMonitor=Lt(Xc),this._isFab=!1;const o=e.nativeElement.classList;for(const a of tJ)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){Co()},i.\u0275dir=ve({type:i,viewQuery:function(e,n){if(1&e&&$n(Vh,5),2&e){let r;At(r=Dt())&&(n.ripple=r.first)}},features:[dt]}),i})(),rb=(()=>{class i extends aR{constructor(e,n,r,s){super(e,n,r,s)}}return i.\u0275fac=function(e){return new(e||i)(E(vt),E(zi),E(gt),E(kr,8))},i.\u0275cmp=ot({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&&(It("disabled",n.disabled||null),ln("_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:[dt],attrs:XQ,ngContentSelectors:xV,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&&(or(bV),Ie(0,"span",0),Yt(1),G(2,"span",1),Yt(3,1),j(),Yt(4,2),Ie(5,"span",2)(6,"span",3)(7,"span",4)),2&e&&(ln("mdc-button__ripple",!n._isFab)("mdc-fab__ripple",n._isFab),V(6),U("matRippleDisabled",n._isRippleDisabled())("matRippleTrigger",n._elementRef.nativeElement))},dependencies:[Vh],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 rJ=new me("mat-mdc-fab-default-options",{providedIn:"root",factory:wV});function wV(){return{color:"accent"}}const MV=wV();let CV=(()=>{class i extends aR{constructor(e,n,r,s,o){super(e,n,r,s),this._options=o,this._isFab=!0,this._options=this._options||MV,this.color=this.defaultColor=this._options.color||MV.color}}return i.\u0275fac=function(e){return new(e||i)(E(vt),E(zi),E(gt),E(kr,8),E(rJ,8))},i.\u0275cmp=ot({type:i,selectors:[["button","mat-mini-fab",""]],hostVars:7,hostBindings:function(e,n){2&e&&(It("disabled",n.disabled||null),ln("_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:[dt],attrs:ZQ,ngContentSelectors:xV,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&&(or(bV),Ie(0,"span",0),Yt(1),G(2,"span",1),Yt(3,1),j(),Yt(4,2),Ie(5,"span",2)(6,"span",3)(7,"span",4)),2&e&&(ln("mdc-button__ripple",!n._isFab)("mdc-fab__ripple",n._isFab),V(6),U("matRippleDisabled",n._isRippleDisabled())("matRippleTrigger",n._elementRef.nativeElement))},dependencies:[Vh],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})(),XM=(()=>{class i extends aR{constructor(e,n,r,s){super(e,n,r,s)}}return i.\u0275fac=function(e){return new(e||i)(E(vt),E(zi),E(gt),E(kr,8))},i.\u0275cmp=ot({type:i,selectors:[["button","mat-icon-button",""]],hostVars:7,hostBindings:function(e,n){2&e&&(It("disabled",n.disabled||null),ln("_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:[dt],attrs:JQ,ngContentSelectors:eJ,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&&(or(),Ie(0,"span",0),Yt(1),Ie(2,"span",1)(3,"span",2)(4,"span",3)),2&e&&(V(3),U("matRippleDisabled",n._isRippleDisabled())("matRippleCentered",!0)("matRippleTrigger",n._elementRef.nativeElement))},dependencies:[Vh],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})(),KM=(()=>{class i{}return i.\u0275fac=function(e){return new(e||i)},i.\u0275mod=en({type:i}),i.\u0275inj=Wt({imports:[Jn,tb,Jn]}),i})();const sJ=["class","dialog"];let SV=(()=>{class i{constructor(e,n){this.dialogRef=e,this.data=n}}return i.\u0275fac=function(e){return new(e||i)(E(ib),E(oR))},i.\u0275cmp=ot({type:i,selectors:[["app-confirm",8,"dialog"]],attrs:sJ,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&&(G(0,"h1",0),Be(1,"Confirmation"),j(),G(2,"div",1)(3,"p"),Be(4),j()(),G(5,"div",2)(6,"button",3),Oe("click",function(){return n.dialogRef.close()}),Be(7,"Cancel"),j(),G(8,"button",4),Be(9,"Yes"),j()()),2&e&&(V(4),ui(n.data.text),V(4),U("mat-dialog-close",!0))},dependencies:[rb,qQ,pV,mV,gV]}),i})();function lR(i,t){const e="object"==typeof t;return new Promise((n,r)=>{const s=new fa({next:o=>{n(o),s.unsubscribe()},error:r,complete:()=>{e?n(t.defaultValue):r(new fm)}});i.subscribe(s)})}let Jl=(()=>{class i{constructor(e){this.ngZone=e,this.openedResource$=new Qe(null),this.openedResourcePath$=new Qe(null),eel.expose(this.wrapHandler(this.openFile),"open_file"),eel.on_angular_ready(),setTimeout(nt(function*(){for(;;){if(eel._websocket){eel._websocket.onclose=()=>window.close();break}yield new Promise(n=>setTimeout(n,0))}}),0)}wrapHandler(e){return(...n)=>{try{gt.assertInAngularZone(),e.bind(this)(...n)}catch{this.ngZone.run(e,this,n)}}}openFile(e,n=!1){var r=this;return nt(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 nt(function*(){yield eel.open_file_with_system_app(e)()})()}retrieveValue(e){return nt(function*(){return yield eel.retrieve_value(e)()})()}runCustomAction(e,n,r){return nt(function*(){return eel.run_custom_action(e,n,r)()})()}saveFile(e){var n=this;return nt(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 nt(function*(){return eel.serialize_resource(e,n)()})()}serializeResourceTmp(e,n,r={}){return nt(function*(){return eel.serialize_resource_tmp(e,n,r)()})()}serializeReversible(e,n){return nt(function*(){return eel.serialize_reversible(e,n)()})()}deserializeResource(e){return nt(function*(){return eel.deserialize_resource(e)()})()}}return i.\u0275fac=function(e){return new(e||i)(ee(gt))},i.\u0275prov=Pe({token:i,factory:i.\u0275fac,providedIn:"root"}),i})();var cR=ps(489);const EV=i=>!(!i||"object"!=typeof i),AV=(i={},t,e,n=[])=>{const r=[];if(EV(i)){const s=Object.entries(i);for(let o=0;o{class i{constructor(e){var n=this;this.eelDelegate=e,this._hasUnsavedChanges$=new Qe(!1),this.resource$=new Qe(null),this.error$=new Qe(null),this.customActionRunning$=new Qe(!1),this.changedDataBlocks={},this.dataBlockChange$=new Te,this.hideHiddenFields$=new Qe(!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=AV(r.schema,"is_recursive_ref",!0);for(const[o,a]of s){const l=o.block_class_mro;let c=r.schema,d=c.block_class_mro===l?c:void 0;for(const h of a.slice(0,a.length-1))!d&&c[h]?.block_class_mro===l&&(d=c[h]),c=c[h];c[a[a.length-1]]=d}this.resource$.next(r),this.error$.next(null)}else this.resource$.next(null),this.error$.next(null)}),this.dataBlockChange$.subscribe(function(){var r=nt(function*([s,o]){n.changedDataBlocks[s]=o,n.updateUnsavedChanges();const a=yield n.eelDelegate.retrieveValue(s);n.changedDataBlocks[s]==o&&((0,cR.isNumber)(o)?Math.abs(o-a)<1e-10:(0,cR.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 nt(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 nt(function*(){return s.processExternalChanges(e,()=>s.eelDelegate.runCustomAction(e,n,r))})()}deserializeResource(e){var n=this;return nt(function*(){return n.processExternalChanges(e,()=>n.eelDelegate.deserializeResource(e))})()}reloadResource(){var e=this;return nt(function*(){const n=e.eelDelegate.openedResourcePath$.getValue();n&&e.eelDelegate.openFile(n,!0).then()})()}saveResource(){var e=this;return nt(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)(ee(Jl))},i.\u0275prov=Pe({token:i,factory:i.\u0275fac,providedIn:"root"}),i})();function oJ(i,t){if(1&i){const e=jn();G(0,"div",2)(1,"button",3),Oe("click",function(){return Vt(e),Et(re().action())}),Be(2),j()()}if(2&i){const e=re();V(2),Qi(" ",e.data.action," ")}}const aJ=["label"];function lJ(i,t){}const cJ=Math.pow(2,31)-1;class dR{constructor(t,e){this._overlayRef=e,this._afterDismissed=new Te,this._afterOpened=new Te,this._onAction=new Te,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,cJ))}_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 DV=new me("MatSnackBarData");class ZM{constructor(){this.politeness="assertive",this.announcementMessage="",this.duration=0,this.data=null,this.horizontalPosition="center",this.verticalPosition="bottom"}}let dJ=(()=>{class i{}return i.\u0275fac=function(e){return new(e||i)},i.\u0275dir=ve({type:i,selectors:[["","matSnackBarLabel",""]],hostAttrs:[1,"mat-mdc-snack-bar-label","mdc-snackbar__label"]}),i})(),uJ=(()=>{class i{}return i.\u0275fac=function(e){return new(e||i)},i.\u0275dir=ve({type:i,selectors:[["","matSnackBarActions",""]],hostAttrs:[1,"mat-mdc-snack-bar-actions","mdc-snackbar__actions"]}),i})(),hJ=(()=>{class i{}return i.\u0275fac=function(e){return new(e||i)},i.\u0275dir=ve({type:i,selectors:[["","matSnackBarAction",""]],hostAttrs:[1,"mat-mdc-snack-bar-action","mdc-snackbar__action"]}),i})(),fJ=(()=>{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)(E(dR),E(DV))},i.\u0275cmp=ot({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&&(G(0,"div",0),Be(1),j(),fe(2,oJ,3,1,"div",1)),2&e&&(V(1),Qi(" ",n.data.message,"\n"),V(1),U("ngIf",n.hasAction))},dependencies:[_i,rb,dJ,uJ,hJ],styles:[".mat-mdc-simple-snack-bar{display:flex}"],encapsulation:2,changeDetection:0}),i})();const pJ={snackBarState:Oa("state",[Os("void, hidden",oi({transform:"scale(0.8)",opacity:0})),Os("visible",oi({transform:"scale(1)",opacity:1})),Or("* => visible",Yr("150ms cubic-bezier(0, 0, 0.2, 1)")),Or("* => void, * => hidden",Yr("75ms cubic-bezier(0.4, 0.0, 1, 1)",oi({opacity:0})))])};let mJ=0,gJ=(()=>{class i extends NM{constructor(e,n,r,s,o){super(),this._ngZone=e,this._elementRef=n,this._changeDetectorRef=r,this._platform=s,this.snackBarConfig=o,this._document=Lt(qt),this._trackedModals=new Set,this._announceDelay=150,this._destroyed=!1,this._onAnnounce=new Te,this._onExit=new Te,this._onEnter=new Te,this._animationState="void",this._liveElementId="mat-snack-bar-container-live-"+mJ++,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(Oi(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)(E(gt),E(vt),E(Qn),E(zi),E(ZM))},i.\u0275dir=ve({type:i,viewQuery:function(e,n){if(1&e&&$n(Am,7),2&e){let r;At(r=Dt())&&(n._portalOutlet=r.first)}},features:[dt]}),i})(),_J=(()=>{class i extends gJ{_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=si(i)))(n||i)}}(),i.\u0275cmp=ot({type:i,selectors:[["mat-snack-bar-container"]],viewQuery:function(e,n){if(1&e&&$n(aJ,7),2&e){let r;At(r=Dt())&&(n._label=r.first)}},hostAttrs:[1,"mdc-snackbar","mat-mdc-snack-bar-container","mdc-snackbar--open"],hostVars:1,hostBindings:function(e,n){1&e&&ND("@state.done",function(s){return n.onAnimationEnd(s)}),2&e&&Rw("@state",n._animationState)},features:[dt],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&&(G(0,"div",0)(1,"div",1,2)(3,"div",3),fe(4,lJ,0,0,"ng-template",4),j(),Ie(5,"div"),j()()),2&e&&(V(5),It("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:[pJ.snackBarState]}}),i})(),TV=(()=>{class i{}return i.\u0275fac=function(e){return new(e||i)},i.\u0275mod=en({type:i}),i.\u0275inj=Wt({imports:[Pm,Bh,co,KM,Jn,Jn]}),i})();const IV=new me("mat-snack-bar-default-options",{providedIn:"root",factory:function vJ(){return new ZM}});let yJ=(()=>{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=Gi.create({parent:n&&n.viewContainerRef&&n.viewContainerRef.injector||this._injector,providers:[{provide:ZM,useValue:n}]}),o=new Nh(this.snackBarContainerComponent,n.viewContainerRef,s),a=e.attach(o);return a.instance.snackBarConfig=n,a.instance}_attach(e,n){const r={...new ZM,...this._defaultConfig,...n},s=this._createOverlay(r),o=this._attachSnackBarContainer(s,r),a=new dR(o,s);if(e instanceof Eo){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 Nh(e,void 0,l),d=o.attachComponentPortal(c);a.instance=d.instance}return this._breakpointObserver.observe("(max-width: 599.98px) and (orientation: portrait)").pipe(Ue(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 Gi.create({parent:e&&e.viewContainerRef&&e.viewContainerRef.injector||this._injector,providers:[{provide:dR,useValue:n},{provide:DV,useValue:e.data}]})}}return i.\u0275fac=function(e){return new(e||i)(ee(as),ee(XI),ee(Gi),ee($I),ee(i,12),ee(IV))},i.\u0275prov=Pe({token:i,factory:i.\u0275fac}),i})(),RV=(()=>{class i extends yJ{constructor(e,n,r,s,o,a){super(e,n,r,s,o,a),this.simpleSnackBarComponent=fJ,this.snackBarContainerComponent=_J,this.handsetCssClass="mat-mdc-snack-bar-handset"}}return i.\u0275fac=function(e){return new(e||i)(ee(as),ee(XI),ee(Gi),ee($I),ee(i,12),ee(IV))},i.\u0275prov=Pe({token:i,factory:i.\u0275fac,providedIn:TV}),i})();const bJ=["*",[["mat-toolbar-row"]]],xJ=["*","mat-toolbar-row"],wJ=Jy(class{constructor(i){this._elementRef=i}});let MJ=(()=>{class i{}return i.\u0275fac=function(e){return new(e||i)},i.\u0275dir=ve({type:i,selectors:[["mat-toolbar-row"]],hostAttrs:[1,"mat-toolbar-row"],exportAs:["matToolbarRow"]}),i})(),CJ=(()=>{class i extends wJ{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)(E(vt),E(zi),E(qt))},i.\u0275cmp=ot({type:i,selectors:[["mat-toolbar"]],contentQueries:function(e,n,r){if(1&e&&Wi(r,MJ,5),2&e){let s;At(s=Dt())&&(n._toolbarRows=s)}},hostAttrs:[1,"mat-toolbar"],hostVars:4,hostBindings:function(e,n){2&e&&ln("mat-toolbar-multiple-rows",n._toolbarRows.length>0)("mat-toolbar-single-row",0===n._toolbarRows.length)},inputs:{color:"color"},exportAs:["matToolbar"],features:[dt],ngContentSelectors:xJ,decls:2,vars:0,template:function(e,n){1&e&&(or(bJ),Yt(0),Yt(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})(),SJ=(()=>{class i{}return i.\u0275fac=function(e){return new(e||i)},i.\u0275mod=en({type:i}),i.\u0275inj=Wt({imports:[Jn,Jn]}),i})(),EJ=(()=>{class i{constructor(){this._vertical=!1,this._inset=!1}get vertical(){return this._vertical}set vertical(e){this._vertical=tn(e)}get inset(){return this._inset}set inset(e){this._inset=tn(e)}}return i.\u0275fac=function(e){return new(e||i)},i.\u0275cmp=ot({type:i,selectors:[["mat-divider"]],hostAttrs:["role","separator",1,"mat-divider"],hostVars:7,hostBindings:function(e,n){2&e&&(It("aria-orientation",n.vertical?"vertical":"horizontal"),ln("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})(),kV=(()=>{class i{}return i.\u0275fac=function(e){return new(e||i)},i.\u0275mod=en({type:i}),i.\u0275inj=Wt({imports:[Jn,Jn]}),i})();const AJ=["tooltip"],PV=new me("mat-tooltip-scroll-strategy"),IJ={provide:PV,deps:[as],useFactory:function TJ(i){return()=>i.scrollStrategies.reposition({scrollThrottle:20})}},kJ=new me("mat-tooltip-default-options",{providedIn:"root",factory:function RJ(){return{showDelay:0,hideDelay:0,touchendHideDelay:1500}}}),OV="tooltip-panel",FV=Fh({passive:!0});let BJ=(()=>{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=tn(e),this._detach(),this._overlayRef=null}get disabled(){return this._disabled}set disabled(e){this._disabled=tn(e),this._disabled?this.hide(0):this._setupPointerEnterEventsIfNeeded()}get showDelay(){return this._showDelay}set showDelay(e){this._showDelay=Ps(e)}get hideDelay(){return this._hideDelay}set hideDelay(e){this._hideDelay=Ps(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,d,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 Te,this._scrollStrategy=d,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(Ue(this._destroyed)).subscribe(()=>{this._overlayRef&&this._updatePosition(this._overlayRef)})}ngAfterViewInit(){this._viewInitialized=!0,this._setupPointerEnterEventsIfNeeded(),this._focusMonitor.monitor(this._elementRef).pipe(Ue(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,FV)}),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 Nh(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(Ue(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 vt)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(Ue(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}-${OV}`,scrollStrategy:this._scrollStrategy()}),this._updatePosition(this._overlayRef),this._overlayRef.detachments().pipe(Ue(this._destroyed)).subscribe(()=>this._detach()),this._overlayRef.outsidePointerEvents().pipe(Ue(this._destroyed)).subscribe(()=>this._tooltipInstance?._handleBodyInteraction()),this._overlayRef.keydownEvents().pipe(Ue(this._destroyed)).subscribe(s=>{this._isTooltipVisible()&&27===s.keyCode&&!Qo(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(Oi(1),Ue(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}-${OV}-`;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,FV)})}_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){Co()},i.\u0275dir=ve({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})(),Fs=(()=>{class i extends BJ{constructor(e,n,r,s,o,a,l,c,d,h,p,m){super(e,n,r,s,o,a,l,c,d,h,p,m),this._tooltipComponent=VJ,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)(E(as),E(vt),E(Xy),E(jr),E(gt),E(zi),E(HZ),E(Xc),E(PV),E(Pa,8),E(kJ,8),E(qt))},i.\u0275dir=ve({type:i,selectors:[["","matTooltip",""]],hostAttrs:[1,"mat-mdc-tooltip-trigger"],exportAs:["matTooltip"],features:[dt]}),i})(),UJ=(()=>{class i{constructor(e,n){this._changeDetectorRef=e,this._closeOnInteraction=!1,this._isVisible=!1,this._onHide=new Te,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)(E(Qn),E(kr,8))},i.\u0275dir=ve({type:i}),i})(),VJ=(()=>{class i extends UJ{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)(E(Qn),E(vt),E(kr,8))},i.\u0275cmp=ot({type:i,selectors:[["mat-tooltip-component"]],viewQuery:function(e,n){if(1&e&&$n(AJ,7),2&e){let r;At(r=Dt())&&(n._tooltip=r.first)}},hostAttrs:["aria-hidden","true"],hostVars:2,hostBindings:function(e,n){1&e&&Oe("mouseleave",function(s){return n._handleMouseLeave(s)}),2&e&&qo("zoom",n.isVisible()?1:null)},features:[dt],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&&(G(0,"div",0,1),Oe("animationend",function(s){return n._handleAnimationEnd(s)}),G(2,"div",2),Be(3),j()()),2&e&&(ln("mdc-tooltip--multiline",n._isMultiline),U("ngClass",n.tooltipClass),V(3),ui(n.message))},dependencies:[hm],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})(),LV=(()=>{class i{}return i.\u0275fac=function(e){return new(e||i)},i.\u0275mod=en({type:i}),i.\u0275inj=Wt({providers:[IJ],imports:[UU,co,Pm,Jn,Jn,Ky]}),i})();function NV(...i){const t=M0(i),{args:e,keys:n}=zB(i),r=new In(s=>{const{length:o}=e;if(!o)return void s.complete();const a=new Array(o);let l=o,c=o;for(let d=0;d{h||(h=!0,c--),a[d]=p},()=>l--,void 0,()=>{(!l||!h)&&(c||s.next(n?HB(n,a):a),s.complete())}))}});return t?r.pipe(JT(t)):r}class uR{}class uu{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 uu?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 uu;return e.lazyInit=this.lazyInit&&this.lazyInit instanceof uu?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 zJ{encodeKey(t){return UV(t)}encodeValue(t){return UV(t)}decodeKey(t){return decodeURIComponent(t)}decodeValue(t){return decodeURIComponent(t)}}const $J=/%(\d[a-f0-9])/gi,GJ={40:"@","3A":":",24:"$","2C":",","3B":";","3D":"=","3F":"?","2F":"/"};function UV(i){return encodeURIComponent(i).replace($J,(t,e)=>GJ[e]??t)}function QM(i){return`${i}`}class hu{constructor(t={}){if(this.updates=null,this.cloneFrom=null,this.encoder=t.encoder||new zJ,t.fromString){if(t.fromObject)throw new Error("Cannot specify both fromString and fromObject.");this.map=function HJ(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 hu({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 WJ{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 VV(i){return typeof ArrayBuffer<"u"&&i instanceof ArrayBuffer}function zV(i){return typeof Blob<"u"&&i instanceof Blob}function HV(i){return typeof FormData<"u"&&i instanceof FormData}class sb{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 jJ(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 uu),this.context||(this.context=new WJ),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 sb(e,n,s,{params:c,headers:l,context:d,reportProgress:a,responseType:r,withCredentials:o})}}var ls=(()=>((ls=ls||{})[ls.Sent=0]="Sent",ls[ls.UploadProgress=1]="UploadProgress",ls[ls.ResponseHeader=2]="ResponseHeader",ls[ls.DownloadProgress=3]="DownloadProgress",ls[ls.Response=4]="Response",ls[ls.User=5]="User",ls))();class qJ{constructor(t,e=200,n="OK"){this.headers=t.headers||new uu,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 hR extends qJ{constructor(t={}){super(t),this.type=ls.Response,this.body=void 0!==t.body?t.body:null}clone(t={}){return new hR({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 fR(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 pR=(()=>{class i{constructor(e){this.handler=e}request(e,n,r={}){let s;if(e instanceof sb)s=e;else{let l,c;l=r.headers instanceof uu?r.headers:new uu(r.headers),r.params&&(c=r.params instanceof hu?r.params:new hu({fromObject:r.params})),s=new sb(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=mt(s).pipe(ru(l=>this.handler.handle(l)));if(e instanceof sb||"events"===r.observe)return o;const a=o.pipe(gn(l=>l instanceof hR));switch(r.observe||"body"){case"body":switch(s.responseType){case"arraybuffer":return a.pipe(tt(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(tt(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(tt(l=>{if(null!==l.body&&"string"!=typeof l.body)throw new Error("Response is not a string.");return l.body}));default:return a.pipe(tt(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 hu).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,fR(r,n))}post(e,n,r={}){return this.request("POST",e,fR(r,n))}put(e,n,r={}){return this.request("PUT",e,fR(r,n))}}return i.\u0275fac=function(e){return new(e||i)(ee(uR))},i.\u0275prov=Pe({token:i,factory:i.\u0275fac}),i})();const aee=["*"];let eC;function ob(i){return function lee(){if(void 0===eC&&(eC=null,typeof window<"u")){const i=window;void 0!==i.trustedTypes&&(eC=i.trustedTypes.createPolicy("angular#components",{createHTML:t=>t}))}return eC}()?.createHTML(i)||i}function KV(i){return Error(`Unable to find icon with the name "${i}"`)}function ZV(i){return Error(`The URL provided to MatIconRegistry was not trusted as a resource URL via Angular's DomSanitizer. Attempted URL was "${i}".`)}function QV(i){return Error(`The literal provided to MatIconRegistry was not trusted as safe HTML by Angular's DomSanitizer. Attempted literal was "${i}".`)}class zh{constructor(t,e,n){this.url=t,this.svgText=e,this.options=n}}let tC=(()=>{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 zh(r,null,s))}addSvgIconResolver(e){return this._resolvers.push(e),this}addSvgIconLiteralInNamespace(e,n,r,s){const o=this._sanitizer.sanitize(Zn.HTML,r);if(!o)throw QV(r);const a=ob(o);return this._addSvgIconConfig(e,n,new zh("",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 zh(n,null,r))}addSvgIconSetLiteralInNamespace(e,n,r){const s=this._sanitizer.sanitize(Zn.HTML,n);if(!s)throw QV(n);const o=ob(s);return this._addSvgIconSetConfig(e,new zh("",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(Zn.RESOURCE_URL,e);if(!n)throw ZV(e);const r=this._cachedIconsByUrl.get(n);return r?mt(nC(r)):this._loadSvgIconFromConfig(new zh(e,null)).pipe(Vi(s=>this._cachedIconsByUrl.set(n,s)),tt(s=>nC(s)))}getNamedSvgIcon(e,n=""){const r=JV(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(KV(r))}ngOnDestroy(){this._resolvers=[],this._svgIconConfigs.clear(),this._iconSetConfigs.clear(),this._cachedIconsByUrl.clear()}_getSvgFromConfig(e){return e.svgText?mt(nC(this._svgElementFromConfig(e))):this._loadSvgIconFromConfig(e).pipe(tt(n=>nC(n)))}_getSvgFromIconSetConfigs(e,n){const r=this._extractIconWithNameFromAnySet(e,n);return r?mt(r):NV(n.filter(o=>!o.svgText).map(o=>this._loadSvgIconSetFromConfig(o).pipe(jc(a=>{const c=`Loading icon set URL: ${this._sanitizer.sanitize(Zn.RESOURCE_URL,o.url)} failed: ${a.message}`;return this._errorHandler.handleError(new Error(c)),mt(null)})))).pipe(tt(()=>{const o=this._extractIconWithNameFromAnySet(e,n);if(!o)throw KV(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(Vi(n=>e.svgText=n),tt(()=>this._svgElementFromConfig(e)))}_loadSvgIconSetFromConfig(e){return e.svgText?mt(null):this._fetchIcon(e).pipe(Vi(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(ob(""));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(ob("")),r=e.attributes;for(let s=0;sob(c)),su(()=>this._inProgressUrlFetches.delete(o)),Vf());return this._inProgressUrlFetches.set(o,l),l}_addSvgIconConfig(e,n,r){return this._svgIconConfigs.set(JV(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:""}}}),ez=["clip-path","color-profile","src","cursor","fill","filter","marker","marker-start","marker-mid","marker-end","mask","stroke"],gee=ez.map(i=>`[${i}]`).join(", "),_ee=/^url\(['"]?#(.*?)['"]?\)$/;let gR=(()=>{class i extends hee{get inline(){return this._inline}set inline(e){this._inline=tn(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=Qt.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(gee),r=this._elementsWithExternalReferences=this._elementsWithExternalReferences||new Map;for(let s=0;s{const a=n[s],l=a.getAttribute(o),c=l?l.match(_ee):null;if(c){let d=r.get(a);d||(d=[],r.set(a,d)),d.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(Oi(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)(E(vt),E(tC),wa("aria-hidden"),E(pee),E(cl),E(fee,8))},i.\u0275cmp=ot({type:i,selectors:[["mat-icon"]],hostAttrs:["role","img",1,"mat-icon","notranslate"],hostVars:8,hostBindings:function(e,n){2&e&&(It("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),ln("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:[dt],ngContentSelectors:aee,decls:1,vars:0,template:function(e,n){1&e&&(or(),Yt(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})(),tz=(()=>{class i{}return i.\u0275fac=function(e){return new(e||i)},i.\u0275mod=en({type:i}),i.\u0275inj=Wt({imports:[Jn,Jn]}),i})(),nz=(()=>{class i{constructor(e){this.viewContainerRef=e}}return i.\u0275fac=function(e){return new(e||i)(E(jr))},i.\u0275dir=ve({type:i,selectors:[["","dataBlockUI",""]]}),i})(),vee=(()=>{class i{constructor(){this.resource=null,this.name="",this.resourceDescription="",this.changed=new $e}}return i.\u0275fac=function(e){return new(e||i)},i.\u0275cmp=ot({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&&(G(0,"p",0),Be(1),j()),2&e&&(U("matTooltip",n.resourceDescription),V(1),Dh("",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:[Fs],changeDetection:0}),i})();function yee(i,t){if(1&i&&(G(0,"h2",4),Be(1),j()),2&i){const e=re();U("matTooltip",e.resourceDescription),V(1),ui(e.name)}}function bee(i,t){1&i&&Ie(0,"app-block-actions",5),2&i&&U("resource",re().resource)}const xee=function(i,t,e,n){return{id:i,name:t,data:e,schema:n}};function wee(i,t){if(1&i&&Ie(0,"app-editor",7),2&i){const e=re().$implicit,n=re();U("resource",N2(3,xee,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 Mee(i,t){if(1&i&&(Gr(0),fe(1,wee,1,8,"app-editor",6),ct(2,"async"),Wr()),2&i){const e=t.$implicit,n=re();V(1),U("ngIf",!(ut(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 ec=(()=>{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 $e,this.destroyed$=new Te}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(Ue(this.destroyed$),gn(([n,r])=>!!this.resource&&n.startsWith(this.resource.id)&&!n.substring(this.resource.id.length+1).includes("/"))).subscribe(function(){var n=nt(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)(E(Fa))},i.\u0275cmp=ot({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&&(fe(0,yee,2,2,"h2",0),ct(1,"async"),fe(2,bee,1,1,"app-block-actions",1),G(3,"div",2),fe(4,Mee,3,3,"ng-container",3),j()),2&e){let r;U("ngIf",n.name&&n.name!=(null==(r=ut(1,4,n.main.resource$))?null:r.name)),V(2),U("ngIf",!n.hideBlockActions),V(2),U("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})(),iz=(()=>{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)(E(ll),E(vt))},i.\u0275dir=ve({type:i}),i})(),Hh=(()=>{class i extends iz{}return i.\u0275fac=function(){let t;return function(n){return(t||(t=si(i)))(n||i)}}(),i.\u0275dir=ve({type:i,features:[dt]}),i})();const Io=new me("NgValueAccessor"),See={provide:Io,useExisting:Gn(()=>_l),multi:!0},Aee=new me("CompositionEventMode");let _l=(()=>{class i extends iz{constructor(e,n,r){super(e,n),this._compositionMode=r,this._composing=!1,null==this._compositionMode&&(this._compositionMode=!function Eee(){const i=$c()?$c().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)(E(ll),E(vt),E(Aee,8))},i.\u0275dir=ve({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&&Oe("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:[Dn([See]),dt]}),i})();const Dee=!1;function fu(i){return null==i||("string"==typeof i||Array.isArray(i))&&0===i.length}function sz(i){return null!=i&&"number"==typeof i.length}const qr=new me("NgValidators"),pu=new me("NgAsyncValidators"),Tee=/^(?=.{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 vl{static min(t){return oz(t)}static max(t){return az(t)}static required(t){return function lz(i){return fu(i.value)?{required:!0}:null}(t)}static requiredTrue(t){return function cz(i){return!0===i.value?null:{required:!0}}(t)}static email(t){return function dz(i){return fu(i.value)||Tee.test(i.value)?null:{email:!0}}(t)}static minLength(t){return uz(t)}static maxLength(t){return hz(t)}static pattern(t){return function fz(i){if(!i)return iC;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(fu(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 yz(t)}static composeAsync(t){return bz(t)}}function oz(i){return t=>{if(fu(t.value)||fu(i))return null;const e=parseFloat(t.value);return!isNaN(e)&&e{if(fu(t.value)||fu(i))return null;const e=parseFloat(t.value);return!isNaN(e)&&e>i?{max:{max:i,actual:t.value}}:null}}function uz(i){return t=>fu(t.value)||!sz(t.value)?null:t.value.lengthsz(t.value)&&t.value.length>i?{maxlength:{requiredLength:i,actualLength:t.value.length}}:null}function iC(i){return null}function pz(i){return null!=i}function mz(i){const t=oy(i)?Ni(i):i;if(Dee&&!LD(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 pe(-1101,e)}return t}function gz(i){let t={};return i.forEach(e=>{t=null!=e?{...t,...e}:t}),0===Object.keys(t).length?null:t}function _z(i,t){return t.map(e=>e(i))}function vz(i){return i.map(t=>function Iee(i){return!i.validate}(t)?t:e=>t.validate(e))}function yz(i){if(!i)return null;const t=i.filter(pz);return 0==t.length?null:function(e){return gz(_z(e,t))}}function _R(i){return null!=i?yz(vz(i)):null}function bz(i){if(!i)return null;const t=i.filter(pz);return 0==t.length?null:function(e){return NV(_z(e,t).map(mz)).pipe(tt(gz))}}function vR(i){return null!=i?bz(vz(i)):null}function xz(i,t){return null===i?[t]:Array.isArray(i)?[...i,t]:[i,t]}function wz(i){return i._rawValidators}function Mz(i){return i._rawAsyncValidators}function yR(i){return i?Array.isArray(i)?i:[i]:[]}function rC(i,t){return Array.isArray(i)?i.includes(t):i===t}function Cz(i,t){const e=yR(t);return yR(i).forEach(r=>{rC(e,r)||e.push(r)}),e}function Sz(i,t){return yR(t).filter(e=>!rC(i,e))}class Ez{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=_R(this._rawValidators)}_setAsyncValidators(t){this._rawAsyncValidators=t||[],this._composedAsyncValidatorFn=vR(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 uo extends Ez{get formDirective(){return null}get path(){return null}}class tc extends Ez{constructor(){super(...arguments),this._parent=null,this.name=null,this.valueAccessor=null}}class Az{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 nc=(()=>{class i extends Az{constructor(e){super(e)}}return i.\u0275fac=function(e){return new(e||i)(E(tc,2))},i.\u0275dir=ve({type:i,selectors:[["","formControlName",""],["","ngModel",""],["","formControl",""]],hostVars:14,hostBindings:function(e,n){2&e&&ln("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:[dt]}),i})(),bR=(()=>{class i extends Az{constructor(e){super(e)}}return i.\u0275fac=function(e){return new(e||i)(E(uo,10))},i.\u0275dir=ve({type:i,selectors:[["","formGroupName",""],["","formArrayName",""],["","ngModelGroup",""],["","formGroup",""],["form",3,"ngNoForm",""],["","ngForm",""]],hostVars:16,hostBindings:function(e,n){2&e&&ln("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:[dt]}),i})();function Dz(i,t){return i?`with name: '${t}'`:`at index: ${t}`}const MR=!1,ab="VALID",oC="INVALID",zm="PENDING",lb="DISABLED";function CR(i){return(aC(i)?i.validators:i)||null}function SR(i,t){return(aC(t)?t.asyncValidators:i)||null}function aC(i){return null!=i&&!Array.isArray(i)&&"object"==typeof i}function Tz(i,t,e){const n=i.controls;if(!(t?Object.keys(n):n).length)throw new pe(1e3,MR?function Oee(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 pe(1001,MR?function Fee(i,t){return`Cannot find form control ${Dz(i,t)}`}(t,e):"")}function Iz(i,t,e){i._forEachChild((n,r)=>{if(void 0===e[r])throw new pe(1002,MR?function Lee(i,t){return`Must supply a value for form control ${Dz(i,t)}`}(t,r):"")})}class lC{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===ab}get invalid(){return this.status===oC}get pending(){return this.status==zm}get disabled(){return this.status===lb}get enabled(){return this.status!==lb}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(Cz(t,this._rawValidators))}addAsyncValidators(t){this.setAsyncValidators(Cz(t,this._rawAsyncValidators))}removeValidators(t){this.setValidators(Sz(t,this._rawValidators))}removeAsyncValidators(t){this.setAsyncValidators(Sz(t,this._rawAsyncValidators))}hasValidator(t){return rC(this._rawValidators,t)}hasAsyncValidator(t){return rC(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=lb,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=ab,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===ab||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()?lb:ab}_runValidator(){return this.validator?this.validator(this):null}_runAsyncValidator(t){if(this.asyncValidator){this.status=zm,this._hasOwnPendingAsyncValidator=!0;const e=mz(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 $e,this.statusChanges=new $e}_calculateStatus(){return this._allControlsDisabled()?lb:this.errors?oC:this._hasOwnPendingAsyncValidator||this._anyControlsHaveStatus(zm)?zm:this._anyControlsHaveStatus(oC)?oC:ab}_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){aC(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 Nee(i){return Array.isArray(i)?_R(i):i||null}(this._rawValidators)}_assignAsyncValidators(t){this._rawAsyncValidators=Array.isArray(t)?t.slice():t,this._composedAsyncValidatorFn=function Bee(i){return Array.isArray(i)?vR(i):i||null}(this._rawAsyncValidators)}}class Hm extends lC{constructor(t,e,n){super(CR(e),SR(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={}){Iz(this,!0,t),Object.keys(t).forEach(n=>{Tz(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 Rz extends Hm{}const $h=new me("CallSetDisabledState",{providedIn:"root",factory:()=>cb}),cb="always";function cC(i,t){return[...t.path,i]}function db(i,t,e=cb){ER(i,t),t.valueAccessor.writeValue(i.value),(i.disabled||"always"===e)&&t.valueAccessor.setDisabledState?.(i.disabled),function Vee(i,t){t.valueAccessor.registerOnChange(e=>{i._pendingValue=e,i._pendingChange=!0,i._pendingDirty=!0,"change"===i.updateOn&&kz(i,t)})}(i,t),function Hee(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 zee(i,t){t.valueAccessor.registerOnTouched(()=>{i._pendingTouched=!0,"blur"===i.updateOn&&i._pendingChange&&kz(i,t),"submit"!==i.updateOn&&i.markAsTouched()})}(i,t),function Uee(i,t){if(t.valueAccessor.setDisabledState){const e=n=>{t.valueAccessor.setDisabledState(n)};i.registerOnDisabledChange(e),t._registerOnDestroy(()=>{i._unregisterOnDisabledChange(e)})}}(i,t)}function dC(i,t,e=!0){const n=()=>{};t.valueAccessor&&(t.valueAccessor.registerOnChange(n),t.valueAccessor.registerOnTouched(n)),hC(i,t),i&&(t._invokeOnDestroyCallbacks(),i._registerOnCollectionChange(()=>{}))}function uC(i,t){i.forEach(e=>{e.registerOnValidatorChange&&e.registerOnValidatorChange(t)})}function ER(i,t){const e=wz(i);null!==t.validator?i.setValidators(xz(e,t.validator)):"function"==typeof e&&i.setValidators([e]);const n=Mz(i);null!==t.asyncValidator?i.setAsyncValidators(xz(n,t.asyncValidator)):"function"==typeof n&&i.setAsyncValidators([n]);const r=()=>i.updateValueAndValidity();uC(t._rawValidators,r),uC(t._rawAsyncValidators,r)}function hC(i,t){let e=!1;if(null!==i){if(null!==t.validator){const r=wz(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=Mz(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 uC(t._rawValidators,n),uC(t._rawAsyncValidators,n),e}function kz(i,t){i._pendingDirty&&i.markAsDirty(),i.setValue(i._pendingValue,{emitModelToViewChange:!1}),t.viewToModelUpdate(i._pendingValue),i._pendingChange=!1}function Pz(i,t){ER(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 Oz(i,t){i._syncPendingControls(),t.forEach(e=>{const n=e.control;"submit"===n.updateOn&&n._pendingChange&&(e.viewToModelUpdate(n._pendingValue),n._pendingChange=!1)})}function TR(i,t){if(!t)return null;let e,n,r;return Array.isArray(t),t.forEach(s=>{s.constructor===_l?e=s:function Wee(i){return Object.getPrototypeOf(i.constructor)===Hh}(s)?n=s:r=s}),r||n||e||null}const Yee={provide:uo,useExisting:Gn(()=>hb)},ub=(()=>Promise.resolve())();let hb=(()=>{class i extends uo{constructor(e,n,r){super(),this.callSetDisabledState=r,this.submitted=!1,this._directives=new Set,this.ngSubmit=new $e,this.form=new Hm({},_R(e),vR(n))}ngAfterViewInit(){this._setUpdateStrategy()}get formDirective(){return this}get control(){return this.form}get path(){return[]}get controls(){return this.form.controls}addControl(e){ub.then(()=>{const n=this._findContainer(e.path);e.control=n.registerControl(e.name,e.control),db(e.control,e,this.callSetDisabledState),e.control.updateValueAndValidity({emitEvent:!1}),this._directives.add(e)})}getControl(e){return this.form.get(e.path)}removeControl(e){ub.then(()=>{const n=this._findContainer(e.path);n&&n.removeControl(e.name),this._directives.delete(e)})}addFormGroup(e){ub.then(()=>{const n=this._findContainer(e.path),r=new Hm({});Pz(r,e),n.registerControl(e.name,r),r.updateValueAndValidity({emitEvent:!1})})}removeFormGroup(e){ub.then(()=>{const n=this._findContainer(e.path);n&&n.removeControl(e.name)})}getFormGroup(e){return this.form.get(e.path)}updateModel(e,n){ub.then(()=>{this.form.get(e.path).setValue(n)})}setValue(e){this.control.setValue(e)}onSubmit(e){return this.submitted=!0,Oz(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)(E(qr,10),E(pu,10),E($h,8))},i.\u0275dir=ve({type:i,selectors:[["form",3,"ngNoForm","",3,"formGroup",""],["ng-form"],["","ngForm",""]],hostBindings:function(e,n){1&e&&Oe("submit",function(s){return n.onSubmit(s)})("reset",function(){return n.onReset()})},inputs:{options:["ngFormOptions","options"]},outputs:{ngSubmit:"ngSubmit"},exportAs:["ngForm"],features:[Dn([Yee]),dt]}),i})();function Fz(i,t){const e=i.indexOf(t);e>-1&&i.splice(e,1)}function Lz(i){return"object"==typeof i&&null!==i&&2===Object.keys(i).length&&"value"in i&&"disabled"in i}const ic=class extends lC{constructor(t=null,e,n){super(CR(e),SR(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}),aC(e)&&(e.nonNullable||e.initialValueIsDefault)&&(this.defaultValue=Lz(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){Fz(this._onChange,t)}registerOnDisabledChange(t){this._onDisabledChange.push(t)}_unregisterOnDisabledChange(t){Fz(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){Lz(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}},Kee={provide:tc,useExisting:Gn(()=>Zc)},Uz=(()=>Promise.resolve())();let Zc=(()=>{class i extends tc{constructor(e,n,r,s,o,a){super(),this._changeDetectorRef=o,this.callSetDisabledState=a,this.control=new ic,this._registered=!1,this.update=new $e,this._parent=e,this._setValidators(n),this._setAsyncValidators(r),this.valueAccessor=TR(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(){db(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){Uz.then(()=>{this.control.setValue(e,{emitViewToModelChange:!1}),this._changeDetectorRef?.markForCheck()})}_updateDisabled(e){const n=e.isDisabled.currentValue,r=0!==n&&function um(i){return"boolean"==typeof i?i:null!=i&&"false"!==i}(n);Uz.then(()=>{r&&!this.control.disabled?this.control.disable():!r&&this.control.disabled&&this.control.enable(),this._changeDetectorRef?.markForCheck()})}_getPath(e){return this._parent?cC(e,this._parent):[e]}}return i.\u0275fac=function(e){return new(e||i)(E(uo,9),E(qr,10),E(pu,10),E(Io,10),E(Qn,8),E($h,8))},i.\u0275dir=ve({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:[Dn([Kee]),dt,xi]}),i})(),IR=(()=>{class i{}return i.\u0275fac=function(e){return new(e||i)},i.\u0275dir=ve({type:i,selectors:[["form",3,"ngNoForm","",3,"ngNativeValidate",""]],hostAttrs:["novalidate",""]}),i})();const Zee={provide:Io,useExisting:Gn(()=>mu),multi:!0};let mu=(()=>{class i extends Hh{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=si(i)))(n||i)}}(),i.\u0275dir=ve({type:i,selectors:[["input","type","number","formControlName",""],["input","type","number","formControl",""],["input","type","number","ngModel",""]],hostBindings:function(e,n){1&e&&Oe("input",function(s){return n.onChange(s.target.value)})("blur",function(){return n.onTouched()})},features:[Dn([Zee]),dt]}),i})(),Vz=(()=>{class i{}return i.\u0275fac=function(e){return new(e||i)},i.\u0275mod=en({type:i}),i.\u0275inj=Wt({}),i})();const RR=new me("NgModelWithFormControlWarning"),nte={provide:uo,useExisting:Gn(()=>Gh)};let Gh=(()=>{class i extends uo{constructor(e,n,r){super(),this.callSetDisabledState=r,this.submitted=!1,this._onCollectionChange=()=>this._updateDomValue(),this.directives=[],this.form=null,this.ngSubmit=new $e,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&&(hC(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 db(n,e,this.callSetDisabledState),n.updateValueAndValidity({emitEvent:!1}),this.directives.push(e),n}getControl(e){return this.form.get(e.path)}removeControl(e){dC(e.control||null,e,!1),function jee(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,Oz(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&&(dC(n||null,e),(i=>i instanceof ic)(r)&&(db(r,e,this.callSetDisabledState),e.control=r))}),this.form._updateTreeValidity({emitEvent:!1})}_setUpFormContainer(e){const n=this.form.get(e.path);Pz(n,e),n.updateValueAndValidity({emitEvent:!1})}_cleanUpFormContainer(e){if(this.form){const n=this.form.get(e.path);n&&function $ee(i,t){return hC(i,t)}(n,e)&&n.updateValueAndValidity({emitEvent:!1})}}_updateRegistrations(){this.form._registerOnCollectionChange(this._onCollectionChange),this._oldForm&&this._oldForm._registerOnCollectionChange(()=>{})}_updateValidators(){ER(this.form,this),this._oldForm&&hC(this._oldForm,this)}_checkFormPresent(){}}return i.\u0275fac=function(e){return new(e||i)(E(qr,10),E(pu,10),E($h,8))},i.\u0275dir=ve({type:i,selectors:[["","formGroup",""]],hostBindings:function(e,n){1&e&&Oe("submit",function(s){return n.onSubmit(s)})("reset",function(){return n.onReset()})},inputs:{form:["formGroup","form"]},outputs:{ngSubmit:"ngSubmit"},exportAs:["ngForm"],features:[Dn([nte]),dt,xi]}),i})();const ste={provide:tc,useExisting:Gn(()=>fC)};let fC=(()=>{class i extends tc{set isDisabled(e){}constructor(e,n,r,s,o){super(),this._ngModelWarningConfig=o,this._added=!1,this.update=new $e,this._ngModelWarningSent=!1,this._parent=e,this._setValidators(n),this._setAsyncValidators(r),this.valueAccessor=TR(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 cC(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)(E(uo,13),E(qr,10),E(pu,10),E(Io,10),E(RR,8))},i.\u0275dir=ve({type:i,selectors:[["","formControlName",""]],inputs:{name:["formControlName","name"],isDisabled:["disabled","isDisabled"],model:["ngModel","model"]},outputs:{update:"ngModelChange"},features:[Dn([ste]),dt,xi]}),i})();function Yz(i){return"number"==typeof i?i:parseInt(i,10)}function qz(i){return"number"==typeof i?i:parseFloat(i)}let Wh=(()=>{class i{constructor(){this._validator=iC}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):iC,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=ve({type:i,features:[xi]}),i})();const hte={provide:qr,useExisting:Gn(()=>gu),multi:!0};let gu=(()=>{class i extends Wh{constructor(){super(...arguments),this.inputName="max",this.normalizeInput=e=>qz(e),this.createValidator=e=>az(e)}}return i.\u0275fac=function(){let t;return function(n){return(t||(t=si(i)))(n||i)}}(),i.\u0275dir=ve({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&&It("max",n._enabled?n.max:null)},inputs:{max:"max"},features:[Dn([hte]),dt]}),i})();const fte={provide:qr,useExisting:Gn(()=>_u),multi:!0};let _u=(()=>{class i extends Wh{constructor(){super(...arguments),this.inputName="min",this.normalizeInput=e=>qz(e),this.createValidator=e=>oz(e)}}return i.\u0275fac=function(){let t;return function(n){return(t||(t=si(i)))(n||i)}}(),i.\u0275dir=ve({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&&It("min",n._enabled?n.min:null)},inputs:{min:"min"},features:[Dn([fte]),dt]}),i})();const _te={provide:qr,useExisting:Gn(()=>NR),multi:!0};let NR=(()=>{class i extends Wh{constructor(){super(...arguments),this.inputName="minlength",this.normalizeInput=e=>Yz(e),this.createValidator=e=>uz(e)}}return i.\u0275fac=function(){let t;return function(n){return(t||(t=si(i)))(n||i)}}(),i.\u0275dir=ve({type:i,selectors:[["","minlength","","formControlName",""],["","minlength","","formControl",""],["","minlength","","ngModel",""]],hostVars:1,hostBindings:function(e,n){2&e&&It("minlength",n._enabled?n.minlength:null)},inputs:{minlength:"minlength"},features:[Dn([_te]),dt]}),i})();const vte={provide:qr,useExisting:Gn(()=>BR),multi:!0};let BR=(()=>{class i extends Wh{constructor(){super(...arguments),this.inputName="maxlength",this.normalizeInput=e=>Yz(e),this.createValidator=e=>hz(e)}}return i.\u0275fac=function(){let t;return function(n){return(t||(t=si(i)))(n||i)}}(),i.\u0275dir=ve({type:i,selectors:[["","maxlength","","formControlName",""],["","maxlength","","formControl",""],["","maxlength","","ngModel",""]],hostVars:1,hostBindings:function(e,n){2&e&&It("maxlength",n._enabled?n.maxlength:null)},inputs:{maxlength:"maxlength"},features:[Dn([vte]),dt]}),i})(),Qz=(()=>{class i{}return i.\u0275fac=function(e){return new(e||i)},i.\u0275mod=en({type:i}),i.\u0275inj=Wt({imports:[Vz]}),i})();class Jz extends lC{constructor(t,e,n){super(CR(e),SR(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={}){Iz(this,!1,t),t.forEach((n,r)=>{Tz(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 eH(i){return!!i&&(void 0!==i.asyncValidators||void 0!==i.validators||void 0!==i.updateOn)}let bte=(()=>{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 eH(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 Rz(r,n)}control(e,n,r){let s={};return this.useNonNullable?(eH(n)?s=n:(s.validators=n,s.asyncValidators=r),new ic(e,{...s,nonNullable:!0})):new ic(e,n,r)}array(e,n,r){const s=e.map(o=>this._createControl(o));return new Jz(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 ic||e instanceof lC?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=Pe({token:i,factory:i.\u0275fac,providedIn:"root"}),i})(),tH=(()=>{class i{static withConfig(e){return{ngModule:i,providers:[{provide:$h,useValue:e.callSetDisabledState??cb}]}}}return i.\u0275fac=function(e){return new(e||i)},i.\u0275mod=en({type:i}),i.\u0275inj=Wt({imports:[Qz]}),i})(),nH=(()=>{class i{static withConfig(e){return{ngModule:i,providers:[{provide:RR,useValue:e.warnOnNgModelWithFormControl??"always"},{provide:$h,useValue:e.callSetDisabledState??cb}]}}}return i.\u0275fac=function(e){return new(e||i)},i.\u0275mod=en({type:i}),i.\u0275inj=Wt({imports:[Qz]}),i})();const xte=["matFormFieldNotchedOutline",""],wte=["*"],Mte=["textField"],Cte=["iconPrefixContainer"],Ste=["textPrefixContainer"];function Ete(i,t){1&i&&Ie(0,"span",19)}function Ate(i,t){if(1&i){const e=jn();G(0,"label",17),Oe("cdkObserveContent",function(){return Vt(e),Et(re(2)._refreshOutlineNotchWidth())}),Yt(1,1),fe(2,Ete,1,0,"span",18),j()}if(2&i){const e=re(2);U("floating",e._shouldLabelFloat())("cdkObserveContentDisabled",!e._hasOutline())("id",e._labelId),It("for",e._control.id)("aria-owns",e._control.id),V(2),U("ngIf",!e.hideRequiredMarker&&e._control.required)}}function Dte(i,t){1&i&&fe(0,Ate,3,6,"label",16),2&i&&U("ngIf",re()._hasFloatingLabel())}function Tte(i,t){1&i&&Ie(0,"div",20)}function Ite(i,t){}function Rte(i,t){1&i&&fe(0,Ite,0,0,"ng-template",22),2&i&&(re(2),U("ngTemplateOutlet",Zi(1)))}function kte(i,t){if(1&i&&(G(0,"div",21),fe(1,Rte,1,1,"ng-template",9),j()),2&i){const e=re();U("matFormFieldNotchedOutlineOpen",e._shouldLabelFloat())("matFormFieldNotchedOutlineLabelWidth",e._labelWidth),V(1),U("ngIf",!e._forceDisplayInfixLabel())}}function Pte(i,t){1&i&&(G(0,"div",23,24),Yt(2,2),j())}function Ote(i,t){1&i&&(G(0,"div",25,26),Yt(2,3),j())}function Fte(i,t){}function Lte(i,t){1&i&&fe(0,Fte,0,0,"ng-template",22),2&i&&(re(),U("ngTemplateOutlet",Zi(1)))}function Nte(i,t){1&i&&(G(0,"div",27),Yt(1,4),j())}function Bte(i,t){1&i&&(G(0,"div",28),Yt(1,5),j())}function Ute(i,t){1&i&&Ie(0,"div",29)}function Vte(i,t){1&i&&(G(0,"div",30),Yt(1,6),j()),2&i&&U("@transitionMessages",re()._subscriptAnimationState)}function zte(i,t){if(1&i&&(G(0,"mat-hint",34),Be(1),j()),2&i){const e=re(2);U("id",e._hintLabelId),V(1),ui(e.hintLabel)}}function Hte(i,t){if(1&i&&(G(0,"div",31),fe(1,zte,2,2,"mat-hint",32),Yt(2,7),Ie(3,"div",33),Yt(4,8),j()),2&i){const e=re();U("@transitionMessages",e._subscriptAnimationState),V(1),U("ngIf",e.hintLabel)}}const $te=["*",[["mat-label"]],[["","matPrefix",""],["","matIconPrefix",""]],[["","matTextPrefix",""]],[["","matTextSuffix",""]],[["","matSuffix",""],["","matIconSuffix",""]],[["mat-error"],["","matError",""]],[["mat-hint",3,"align","end"]],[["mat-hint","align","end"]]],Gte=["*","mat-label","[matPrefix], [matIconPrefix]","[matTextPrefix]","[matTextSuffix]","[matSuffix], [matIconSuffix]","mat-error, [matError]","mat-hint:not([align='end'])","mat-hint[align='end']"];let Ro=(()=>{class i{}return i.\u0275fac=function(e){return new(e||i)},i.\u0275dir=ve({type:i,selectors:[["mat-label"]]}),i})(),Wte=0;const iH=new me("MatError");let jte=(()=>{class i{constructor(e,n){this.id="mat-mdc-error-"+Wte++,e||n.nativeElement.setAttribute("aria-live","polite")}}return i.\u0275fac=function(e){return new(e||i)(wa("aria-live"),E(vt))},i.\u0275dir=ve({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&&ql("id",n.id)},inputs:{id:"id"},features:[Dn([{provide:iH,useExisting:i}])]}),i})(),Yte=0,rH=(()=>{class i{constructor(){this.align="start",this.id="mat-mdc-hint-"+Yte++}}return i.\u0275fac=function(e){return new(e||i)},i.\u0275dir=ve({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&&(ql("id",n.id),It("align",null),ln("mat-mdc-form-field-hint-end","end"===n.align))},inputs:{align:"align",id:"id"}}),i})();const sH=new me("MatPrefix");let qte=(()=>{class i{constructor(){this._isText=!1}set _isTextSelector(e){this._isText=!0}}return i.\u0275fac=function(e){return new(e||i)},i.\u0275dir=ve({type:i,selectors:[["","matPrefix",""],["","matIconPrefix",""],["","matTextPrefix",""]],inputs:{_isTextSelector:["matTextPrefix","_isTextSelector"]},features:[Dn([{provide:sH,useExisting:i}])]}),i})();const oH=new me("MatSuffix");let Xte=(()=>{class i{constructor(){this._isText=!1}set _isTextSelector(e){this._isText=!0}}return i.\u0275fac=function(e){return new(e||i)},i.\u0275dir=ve({type:i,selectors:[["","matSuffix",""],["","matIconSuffix",""],["","matTextSuffix",""]],inputs:{_isTextSelector:["matTextSuffix","_isTextSelector"]},features:[Dn([{provide:oH,useExisting:i}])]}),i})(),aH=(()=>{class i{constructor(e){this._elementRef=e,this.floating=!1}getWidth(){return function Kte(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)(E(vt))},i.\u0275dir=ve({type:i,selectors:[["label","matFormFieldFloatingLabel",""]],hostAttrs:[1,"mdc-floating-label","mat-mdc-floating-label"],hostVars:2,hostBindings:function(e,n){2&e&&ln("mdc-floating-label--float-above",n.floating)},inputs:{floating:"floating"}}),i})();const lH="mdc-line-ripple--active",pC="mdc-line-ripple--deactivating";let cH=(()=>{class i{constructor(e,n){this._elementRef=e,this._handleTransitionEnd=r=>{const s=this._elementRef.nativeElement.classList,o=s.contains(pC);"opacity"===r.propertyName&&o&&s.remove(lH,pC)},n.runOutsideAngular(()=>{e.nativeElement.addEventListener("transitionend",this._handleTransitionEnd)})}activate(){const e=this._elementRef.nativeElement.classList;e.remove(pC),e.add(lH)}deactivate(){this._elementRef.nativeElement.classList.add(pC)}ngOnDestroy(){this._elementRef.nativeElement.removeEventListener("transitionend",this._handleTransitionEnd)}}return i.\u0275fac=function(e){return new(e||i)(E(vt),E(gt))},i.\u0275dir=ve({type:i,selectors:[["div","matFormFieldLineRipple",""]],hostAttrs:[1,"mdc-line-ripple"]}),i})(),dH=(()=>{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)(E(vt),E(gt))},i.\u0275cmp=ot({type:i,selectors:[["div","matFormFieldNotchedOutline",""]],hostAttrs:[1,"mdc-notched-outline"],hostVars:2,hostBindings:function(e,n){2&e&&ln("mdc-notched-outline--notched",n.open)},inputs:{labelWidth:["matFormFieldNotchedOutlineLabelWidth","labelWidth"],open:["matFormFieldNotchedOutlineOpen","open"]},attrs:xte,ngContentSelectors:wte,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&&(or(),Ie(0,"div",0),G(1,"div",1),Yt(2),j(),Ie(3,"div",2)),2&e&&(V(1),qo("width",n._getNotchWidth()))},encapsulation:2,changeDetection:0}),i})();const Zte={transitionMessages:Oa("transitionMessages",[Os("enter",oi({opacity:1,transform:"translateY(0%)"})),Or("void => enter",[oi({opacity:0,transform:"translateY(-5px)"}),Yr("300ms cubic-bezier(0.55, 0, 0.55, 0.2)")])])};let UR=(()=>{class i{}return i.\u0275fac=function(e){return new(e||i)},i.\u0275dir=ve({type:i}),i})();const mC=new me("MatFormField"),Qte=new me("MAT_FORM_FIELD_DEFAULT_OPTIONS");let uH=0,yl=(()=>{class i{get hideRequiredMarker(){return this._hideRequiredMarker}set hideRequiredMarker(e){this._hideRequiredMarker=tn(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-"+uH++,this._hintLabelId="mat-mdc-hint-"+uH++,this._subscriptAnimationState="",this._labelWidth=0,this._destroyed=new Te,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(Ue(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(),Cr(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(Ue(this._destroyed)).subscribe(()=>{this._needsOutlineLabelOffsetUpdateOnStable&&(this._needsOutlineLabelOffsetUpdateOnStable=!1,this._updateOutlineLabelOffset())})}),this._dir.change.pipe(Ue(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)(E(vt),E(Qn),E(gt),E(Pa),E(zi),E(Qte,8),E(kr,8),E(qt))},i.\u0275cmp=ot({type:i,selectors:[["mat-form-field"]],contentQueries:function(e,n,r){if(1&e&&(Wi(r,Ro,5),Wi(r,Ro,7),Wi(r,UR,5),Wi(r,sH,5),Wi(r,oH,5),Wi(r,iH,5),Wi(r,rH,5)),2&e){let s;At(s=Dt())&&(n._labelChildNonStatic=s.first),At(s=Dt())&&(n._labelChildStatic=s.first),At(s=Dt())&&(n._formFieldControl=s.first),At(s=Dt())&&(n._prefixChildren=s),At(s=Dt())&&(n._suffixChildren=s),At(s=Dt())&&(n._errorChildren=s),At(s=Dt())&&(n._hintChildren=s)}},viewQuery:function(e,n){if(1&e&&($n(Mte,5),$n(Cte,5),$n(Ste,5),$n(aH,5),$n(dH,5),$n(cH,5)),2&e){let r;At(r=Dt())&&(n._textField=r.first),At(r=Dt())&&(n._iconPrefixContainer=r.first),At(r=Dt())&&(n._textPrefixContainer=r.first),At(r=Dt())&&(n._floatingLabel=r.first),At(r=Dt())&&(n._notchedOutline=r.first),At(r=Dt())&&(n._lineRipple=r.first)}},hostAttrs:[1,"mat-mdc-form-field"],hostVars:42,hostBindings:function(e,n){2&e&&ln("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:[Dn([{provide:mC,useExisting:i}])],ngContentSelectors:Gte,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&&(or($te),fe(0,Dte,1,1,"ng-template",null,0,zc),G(2,"div",1,2),Oe("click",function(s){return n._control.onContainerClick&&n._control.onContainerClick(s)}),fe(4,Tte,1,0,"div",3),G(5,"div",4),fe(6,kte,2,3,"div",5),fe(7,Pte,3,0,"div",6),fe(8,Ote,3,0,"div",7),G(9,"div",8),fe(10,Lte,1,1,"ng-template",9),Yt(11),j(),fe(12,Nte,2,0,"div",10),fe(13,Bte,2,0,"div",11),j(),fe(14,Ute,1,0,"div",12),j(),G(15,"div",13),fe(16,Vte,2,1,"div",14),fe(17,Hte,5,2,"div",15),j()),2&e&&(V(2),ln("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),V(2),U("ngIf",!n._hasOutline()&&!n._control.disabled),V(2),U("ngIf",n._hasOutline()),V(1),U("ngIf",n._hasIconPrefix),V(1),U("ngIf",n._hasTextPrefix),V(2),U("ngIf",!n._hasOutline()||n._forceDisplayInfixLabel()),V(2),U("ngIf",n._hasTextSuffix),V(1),U("ngIf",n._hasIconSuffix),V(1),U("ngIf",!n._hasOutline()),V(1),ln("mat-mdc-form-field-subscript-dynamic-size","dynamic"===n.subscriptSizing),U("ngSwitch",n._getDisplayedMessages()),V(1),U("ngSwitchCase","error"),V(1),U("ngSwitchCase","hint"))},dependencies:[_i,xy,by,VT,SU,rH,aH,dH,cH],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:[Zte.transitionMessages]},changeDetection:0}),i})(),gC=(()=>{class i{}return i.\u0275fac=function(e){return new(e||i)},i.\u0275mod=en({type:i}),i.\u0275inj=Wt({imports:[Jn,co,HI,Jn]}),i})();const pH=Fh({passive:!0});let tne=(()=>{class i{constructor(e,n){this._platform=e,this._ngZone=n,this._monitoredElements=new Map}monitor(e){if(!this._platform.isBrowser)return _o;const n=qc(e),r=this._monitoredElements.get(n);if(r)return r.subject;const s=new Te,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,pH),n.classList.add("cdk-text-field-autofill-monitored")}),this._monitoredElements.set(n,{subject:s,unlisten:()=>{n.removeEventListener("animationstart",a,pH)}}),s}stopMonitoring(e){const n=qc(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)(ee(zi),ee(gt))},i.\u0275prov=Pe({token:i,factory:i.\u0275fac,providedIn:"root"}),i})(),nne=(()=>{class i{}return i.\u0275fac=function(e){return new(e||i)},i.\u0275mod=en({type:i}),i.\u0275inj=Wt({}),i})();const VR=new me("MAT_INPUT_VALUE_ACCESSOR"),ine=["button","checkbox","file","hidden","image","radio","range","reset","submit"];let rne=0;const sne=WU(class{constructor(i,t,e,n){this._defaultErrorStateMatcher=i,this._parentForm=t,this._parentFormGroup=e,this.ngControl=n,this.stateChanges=new Te}});let rc=(()=>{class i extends sne{get disabled(){return this._disabled}set disabled(e){this._disabled=tn(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(vl.required)??!1}set required(e){this._required=tn(e)}get type(){return this._type}set type(e){this._type=e||"text",this._validateType(),!this._isTextarea&&aU().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=tn(e)}constructor(e,n,r,s,o,a,l,c,d,h){super(a,s,o,r),this._elementRef=e,this._platform=n,this._autofillMonitor=c,this._formField=h,this._uid="mat-input-"+rne++,this.focused=!1,this.stateChanges=new Te,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=>aU().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&&d.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(){ine.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)(E(vt),E(zi),E(tc,10),E(hb,8),E(Gh,8),E(YU),E(VR,10),E(tne),E(gt),E(mC,8))},i.\u0275dir=ve({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&&Oe("focus",function(){return n._focusChanged(!0)})("blur",function(){return n._focusChanged(!1)})("input",function(){return n._onInput()}),2&e&&(ql("id",n.id)("disabled",n.disabled)("required",n.required),It("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),ln("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:[Dn([{provide:UR,useExisting:i}]),dt,xi]}),i})(),mH=(()=>{class i{}return i.\u0275fac=function(e){return new(e||i)},i.\u0275mod=en({type:i}),i.\u0275inj=Wt({imports:[Jn,gC,gC,nne,Jn]}),i})();function one(i,t){if(1&i&&(G(0,"mat-label"),Be(1),j()),2&i){const e=re(2);V(1),ui(e.resource.name)}}function ane(i,t){if(1&i){const e=jn();G(0,"mat-form-field",1),fe(1,one,2,1,"mat-label",2),G(2,"input",3),Oe("ngModelChange",function(r){return Vt(e),Et(re().resource.data=r)})("change",function(){return Vt(e),Et(re().changed.emit())}),j()()}if(2&i){const e=re();U("matTooltip",e.resourceDescription),V(1),U("ngIf",e.resource.name),V(1),U("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 lne=(()=>{class i{constructor(){this.resource=null,this.resourceDescription="",this.disabled=!1,this.changed=new $e}}return i.\u0275fac=function(e){return new(e||i)},i.\u0275cmp=ot({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&&fe(0,ane,3,7,"mat-form-field",0),2&e&&U("ngIf",n.resource)},dependencies:[_i,_l,mu,nc,_u,gu,Zc,yl,Ro,rc,Fs],changeDetection:0}),i})();function cne(i,t){if(1&i&&(G(0,"mat-label"),Be(1),j()),2&i){const e=re(2);V(1),ui(e.resource.name)}}function dne(i,t){if(1&i){const e=jn();G(0,"mat-form-field",1),fe(1,cne,2,1,"mat-label",2),G(2,"input",3),Oe("ngModelChange",function(r){return Vt(e),Et(re().resource.data=r)})("change",function(){return Vt(e),Et(re().changed.emit())}),j()()}if(2&i){const e=re();U("matTooltip",e.resourceDescription),V(1),U("ngIf",e.resource.name),V(1),U("disabled",e.disabled||void 0!==e.resource.schema.required_value)("maxlength",e.maxLength)("minlength",e.minLength)("ngModel",e.resource.data)}}let gH=(()=>{class i{constructor(){this._resource=null,this.resourceDescription="",this.disabled=!1,this.changed=new $e,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=ot({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&&fe(0,dne,3,6,"mat-form-field",0),2&e&&U("ngIf",n.resource)},dependencies:[_i,_l,nc,NR,BR,Zc,yl,Ro,rc,Fs],changeDetection:0}),i})();const sc=(i,t)=>i+(i.includes("__")?"/":"__")+t,jh=function(){return[]};function une(i,t){if(1&i&&(G(0,"mat-panel-description"),Be(1," Click to view items ("),G(2,"b"),Be(3),j(),Be(4,") "),j()),2&i){const e=re(2);V(3),ui((e.resourceData||Rs(1,jh)).length)}}function hne(i,t){1&i&&(G(0,"mat-panel-description"),Be(1," Empty array "),j())}function fne(i,t){}function pne(i,t){if(1&i){const e=jn();G(0,"mat-expansion-panel",4),Oe("opened",function(){return Vt(e),Et(re().onContentsTrigger(!0))})("closed",function(){return Vt(e),Et(re().onContentsTrigger(!1))}),G(1,"mat-expansion-panel-header",5)(2,"mat-panel-title"),Be(3),j(),fe(4,une,5,2,"mat-panel-description",1),fe(5,hne,2,0,"mat-panel-description",1),j(),fe(6,fne,0,0,"ng-template",6),j()}if(2&i){const e=re(),n=Zi(3);V(1),U("matTooltip",e.resourceDescription),V(2),Qi(" ",e.name," "),V(1),U("ngIf",(e.resourceData||Rs(5,jh)).length>0),V(1),U("ngIf",0==(e.resourceData||Rs(6,jh)).length),V(1),U("ngTemplateOutlet",n)}}function mne(i,t){}function gne(i,t){if(1&i&&(Gr(0),G(1,"h2",5),Be(2),j(),G(3,"div",7),fe(4,mne,0,0,"ng-template",6),j(),Wr()),2&i){const e=re(),n=Zi(3);V(1),U("matTooltip",e.resourceDescription),V(1),ui(e.name),V(2),U("ngTemplateOutlet",n)}}function _ne(i,t){}function vne(i,t){if(1&i&&Ie(0,"app-editor",10),2&i){const e=re().$implicit,n=re(3);U("resource",n.children[n.pageIndex*n.pageSize+e])("disabled",n.disabled)}}function yne(i,t){if(1&i&&(Gr(0),fe(1,vne,1,2,"app-editor",9),Wr()),2&i){const e=t.$implicit,n=re(3);V(1),U("ngIf",n.pageIndex*n.pageSize+e0)}let zR=(()=>{class i{constructor(e,n){this.main=e,this.cdr=n,this._resource=null,this.resourceDescription="",this.disabled=!1,this.changed=new $e,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 Te}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:sc(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(Ue(this.destroyed$),gn(([n,r])=>!!this.resource&&n.startsWith(this.resource.id)&&!n.substring(this.resource.id.length+1).includes("/"))).subscribe(function(){var n=nt(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 Qe(null),this.imageUrl$=new Qe(null),this.destroyed$=new Te,this.changed=new $e}set resource(e){this._resource$.next(e)}get resource(){return this._resource$.getValue()}ngAfterViewInit(){var e=this;return nt(function*(){e._resource$.pipe(Ue(e.destroyed$)).subscribe(function(){var n=nt(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)(E(Jl),E(Fa))},i.\u0275cmp=ot({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&&(Ie(0,"app-compound-block-ui",0),ct(1,"async"),fe(2,Dne,2,3,"img",1),ct(3,"async")),2&e&&(U("resource",ut(1,3,n._resource$))("fieldBlacklist",Rs(7,Tne)),V(2),U("ngIf",ut(3,5,n.imageUrl$)))},dependencies:[_i,ec,Xo],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 Rne=["*"],Lne=new me("MAT_CARD_CONFIG");let _H=(()=>{class i{constructor(e){this.appearance=e?.appearance||"raised"}}return i.\u0275fac=function(e){return new(e||i)(E(Lne,8))},i.\u0275cmp=ot({type:i,selectors:[["mat-card"]],hostAttrs:[1,"mat-mdc-card","mdc-card"],hostVars:4,hostBindings:function(e,n){2&e&&ln("mat-mdc-card-outlined","outlined"===n.appearance)("mdc-card--outlined","outlined"===n.appearance)},inputs:{appearance:"appearance"},exportAs:["matCard"],ngContentSelectors:Rne,decls:1,vars:0,template:function(e,n){1&e&&(or(),Yt(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})(),vH=(()=>{class i{}return i.\u0275fac=function(e){return new(e||i)},i.\u0275mod=en({type:i}),i.\u0275inj=Wt({imports:[Jn,co,Jn]}),i})();class HR{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 Te,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 $R=(()=>{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=Pe({token:i,factory:i.\u0275fac,providedIn:"root"}),i})(),aie=(()=>{class i{}return i.\u0275fac=function(e){return new(e||i)},i.\u0275mod=en({type:i}),i.\u0275inj=Wt({imports:[Jn,co,tb,Jn]}),i})();const CH={transformPanel:Oa("transformPanel",[Or("void => enter-dropdown",Yr("120ms cubic-bezier(0, 0, 0.2, 1)",sV([oi({opacity:0,transform:"scale(1, 0.8)"}),oi({opacity:1,transform:"scale(1, 1)"})]))),Or("void => enter-dialog",Yr("150ms cubic-bezier(0, 0, 0.2, 1)",sV([oi({opacity:0,transform:"scale(0.7)"}),oi({transform:"none",opacity:1})]))),Or("* => void",Yr("100ms linear",oi({opacity:0})))]),fadeInCalendar:Oa("fadeInCalendar",[Os("void",oi({opacity:0})),Os("enter",oi({opacity:1})),Or("void => *",Yr("120ms 100ms cubic-bezier(0.55, 0, 0.55, 0.2)"))])},AH=function(i){return{active:i}};function Sie(i,t){if(1&i){const e=jn();G(0,"button",2),Oe("click",function(){const s=Vt(e).$implicit;return Et(re().select(s))}),j()}if(2&i){const e=t.$implicit,n=re();qo("background-color",e),U("ngClass",sm(3,AH,n.selectedColor===e))}}function Eie(i,t){if(1&i){const e=jn();G(0,"button",2),Oe("click",function(){const s=Vt(e).$implicit;return Et(re().select(s))}),j()}if(2&i){const e=t.$implicit,n=re();qo("background-color",e),U("ngClass",sm(3,AH,n.selectedColor===e))}}const Aie=["button"],Die=/^\s+/,Tie=/\s+$/,Gm=Math.round,Iie=(Math,Math,Math,/[^0-9]/g),DH=["#ffffff","#ffff00","#ff00ff","#ff0000","#c0c0c0","#808080","#808000","#800080","#800000","#00ffff","#00ff00","#008080","#008000","#0000ff","#000080","#000000"];function TH(i,t,e){const n=i.getImageData(t,e,1,1).data;return{r:n[0],g:n[1],b:n[2]}}function Yh(i){return 1==i.length?"0"+i:""+i}function kie(i){return Math.round(255*parseFloat(i)).toString(16)}function IH(i){return Jo(i)/255}function Jo(i){return parseInt(i,16)}function RH(i,t,e,n){var r=[Yh(Gm(i).toString(16)),Yh(Gm(t).toString(16)),Yh(Gm(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 vu="(?:[-\\+]?\\d*\\.\\d+%?)|(?:[-\\+]?\\d+%?)",jR="[\\s|\\(]+("+vu+")[,|\\s]+("+vu+")[,|\\s]+("+vu+")\\s*\\)?",YR="[\\s|\\(]+("+vu+")[,|\\s]+("+vu+")[,|\\s]+("+vu+")[,|\\s]+("+vu+")\\s*\\)?",qh={CSS_UNIT:new RegExp(vu),rgb:new RegExp("rgb"+jR),rgba:new RegExp("rgba"+YR),hsl:new RegExp("hsl"+jR),hsla:new RegExp("hsla"+YR),hsv:new RegExp("hsv"+jR),hsva:new RegExp("hsva"+YR),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 qR(i){let t;return i=i.replace(Die,"").replace(Tie,"").toLowerCase(),(t=qh.rgb.exec(i))?{r:t[1],g:t[2],b:t[3],a:1}:(t=qh.rgba.exec(i))?{r:t[1],g:t[2],b:t[3],a:t[4]}:(t=qh.hex8.exec(i))?{r:Jo(t[1]),g:Jo(t[2]),b:Jo(t[3]),a:IH(t[4])}:(t=qh.hex6.exec(i))?{r:Jo(t[1]),g:Jo(t[2]),b:Jo(t[3]),a:1}:(t=qh.hex4.exec(i))?{r:Jo(t[1]+""+t[1]),g:Jo(t[2]+""+t[2]),b:Jo(t[3]+""+t[3]),a:IH(t[4]+""+t[4])}:(t=qh.hex3.exec(i))?{r:Jo(t[1]+""+t[1]),g:Jo(t[2]+""+t[2]),b:Jo(t[3]+""+t[3]),a:1}:null}class Xh{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=RH(this.r,this.g,this.b),this.rgba=this.toRgba()}toHex(t){return RH(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 Rie(i,t,e,n,r){var s=[Yh(Gm(i).toString(16)),Yh(Gm(t).toString(16)),Yh(Gm(e).toString(16)),Yh(kie(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 kH=(()=>{class i{constructor(e,n){this.zone=e,this.colorChanged=new $e,this.x=0,this.y=0,this.drag=!1,this._destroyed=new Te,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){Co()},i.\u0275dir=ve({type:i,inputs:{color:"color"},outputs:{colorChanged:"colorChanged"}}),i})(),Fie=(()=>{class i extends kH{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}=TH(this.ctx,e.offsetX,e.offsetY);this.emitChange(new Xh(n,r,s))}}return i.\u0275fac=function(e){return new(e||i)(E(gt))},i.\u0275cmp=ot({type:i,selectors:[["ngx-mat-color-slider"]],features:[dt],decls:1,vars:0,consts:[["id","color-strip","width","15","height","234",1,"zone-strip",3,"mousedown","mouseup"]],template:function(e,n){1&e&&(G(0,"canvas",0),Oe("mousedown",function(s){return n.onMousedown(s)})("mouseup",function(s){return n.onMouseup(s)}),j())}}),i})(),Lie=(()=>{class i{constructor(){}onInput(e){this._formatInput(e.target)}_formatInput(e){let n=Number(e.value.replace(Iie,""));n=isNaN(n)?0:n,e.value=n}}return i.\u0275fac=function(e){return new(e||i)},i.\u0275dir=ve({type:i,selectors:[["","ngxMatNumericColorInput",""]],hostBindings:function(e,n){1&e&&Oe("input",function(s){return n.onInput(s)})}}),i})(),Bie=(()=>{class i extends kH{constructor(e){super(e,"color-block"),this.zone=e,this._resetBaseColor=!0,this.formGroup=new Hm({r:new ic(null,[vl.required]),g:new ic(null,[vl.required]),b:new ic(null,[vl.required]),a:new ic(null,[vl.required]),hex:new ic(null,[vl.required,vl.pattern(qh.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(){Cr(this.rCtrl.valueChanges,this.gCtrl.valueChanges,this.bCtrl.valueChanges,this.aCtrl.valueChanges).pipe(Ue(this._destroyed),gl(400)).subscribe(r=>{const s=new Xh(Number(this.rCtrl.value),Number(this.gCtrl.value),Number(this.bCtrl.value),Number(this.aCtrl.value));this.emitChange(s)}),this.hexCtrl.valueChanges.pipe(Ue(this._destroyed),gl(400),Ql()).subscribe(r=>{const s=qR(r);if(null!=s){const o=new Xh(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}=TH(this.ctx,e.offsetX,e.offsetY);this.emitChange(new Xh(n,r,s))}}return i.\u0275fac=function(e){return new(e||i)(E(gt))},i.\u0275cmp=ot({type:i,selectors:[["ngx-mat-color-canvas"]],hostAttrs:[1,"ngx-mat-color-canvas"],features:[dt,xi],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&&(G(0,"form",0)(1,"div",1)(2,"div",2)(3,"canvas",3),Oe("mousedown",function(s){return n.onMousedown(s)})("mouseup",function(s){return n.onMouseup(s)}),j(),G(4,"ngx-mat-color-slider",4),Oe("colorChanged",function(s){return n.onSliderColorChanged(s)}),j()(),G(5,"div",5)(6,"mat-form-field")(7,"mat-label"),Be(8,"R"),j(),Ie(9,"input",6),j(),G(10,"mat-form-field")(11,"mat-label"),Be(12,"G"),j(),Ie(13,"input",7),j(),G(14,"mat-form-field")(15,"mat-label"),Be(16,"B"),j(),Ie(17,"input",8),j()()(),G(18,"div",1),Ie(19,"button",9),G(20,"mat-form-field")(21,"mat-label"),Be(22,"HEX6"),j(),G(23,"mat-label",10),Be(24,"#\xa0"),j(),Ie(25,"input",11),j(),G(26,"mat-form-field",12)(27,"mat-label"),Be(28,"A"),j(),Ie(29,"input",13),j()()()),2&e&&(U("formGroup",n.formGroup),V(19),qo("background-color",(null==n.color?null:n.color.rgba)||"transparent"))},dependencies:[rc,yl,Ro,qte,CV,IR,_l,mu,nc,bR,_u,gu,Gh,fC,Fie,Lie],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})(),Uie=(()=>{class i{constructor(){this.colorChanged=new $e,this.colors1=DH.slice(0,8),this.colors2=DH.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}=qR(e);this.colorChanged.emit(new Xh(n,r,s,o))}}return i.\u0275fac=function(e){return new(e||i)},i.\u0275cmp=ot({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&&(G(0,"div",0),fe(1,Sie,1,5,"button",1),j(),G(2,"div",0),fe(3,Eie,1,5,"button",1),j()),2&e&&(V(1),U("ngForOf",n.colors1),V(2),U("ngForOf",n.colors2))},dependencies:[hm,lo,CV],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})(),PH=(()=>{class i{constructor(){this.colorChanged=new $e}ngOnInit(){}handleColorChanged(e){this.colorChanged.emit(e)}}return i.\u0275fac=function(e){return new(e||i)},i.\u0275cmp=ot({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&&(G(0,"ngx-mat-color-canvas",0),Oe("colorChanged",function(s){return n.handleColorChanged(s)}),j(),G(1,"ngx-mat-color-collection",0),Oe("colorChanged",function(s){return n.handleColorChanged(s)}),j()),2&e&&(U("color",n.color),V(1),U("color",n.color))},dependencies:[Bie,Uie],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})(),XR=(()=>{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=qR(e);return n?new Xh(n.r,n.g,n.b,n.a):null}}return i.\u0275fac=function(e){return new(e||i)},i.\u0275prov=Pe({token:i,factory:i.\u0275fac}),i})();const Vie={display:{colorInput:"hex"}},OH=new me("mat-color-formats"),FH=new me("ngx-mat-colorpicker-scroll-strategy"),Hie={provide:FH,deps:[as],useFactory:function zie(i){return()=>i.scrollStrategies.reposition()}},$ie=Jy(class{constructor(i){this._elementRef=i}});let LH=(()=>{class i extends $ie{constructor(e){super(e)}}return i.\u0275fac=function(e){return new(e||i)(E(vt))},i.\u0275cmp=ot({type:i,selectors:[["ngx-mat-color-picker-content"]],viewQuery:function(e,n){if(1&e&&$n(PH,5),2&e){let r;At(r=Dt())&&(n._palette=r.first)}},hostAttrs:[1,"ngx-mat-colorpicker-content"],hostVars:3,hostBindings:function(e,n){2&e&&(Rw("@transformPanel","enter"),ln("ngx-mat-colorpicker-content-touch",n.picker.touchUi))},inputs:{color:"color"},exportAs:["ngxMatColorPickerContent"],features:[dt],decls:1,vars:1,consts:[[3,"color","colorChanged"]],template:function(e,n){1&e&&(G(0,"ngx-mat-color-palette",0),Oe("colorChanged",function(s){return n.picker.select(s)}),j()),2&e&&U("color",n.picker._selected)},dependencies:[PH],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:[CH.transformPanel,CH.fadeInCalendar]},changeDetection:0}),i})(),NH=(()=>{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 $e,this.closedStream=new $e,this._touchUi=!1,this._opened=!1,this._defaultColor="primary",this._validSelected=null,this._disabledChange=new Te,this._focusedElementBeforeOpen=null,this._inputSubscription=Qt.EMPTY,this._selectedChanged=new Te,this._scrollStrategy=a}get disabled(){return void 0===this._disabled&&this._pickerInput?this._pickerInput.disabled:!!this._disabled}set disabled(e){const n=tn(e);n!==this._disabled&&(this._disabled=n,this._disabledChange.next(n))}get touchUi(){return this._touchUi}set touchUi(e){this._touchUi=tn(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(LH,{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 Nh(LH,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(Oi(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"),Cr(this._popupRef.backdropClick(),this._popupRef.detachments(),this._popupRef.keydownEvents().pipe(gn(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)(E(Bm),E(as),E(gt),E(XR),E(Pa,8),E(FH),E(qt,8),E(jr))},i.\u0275cmp=ot({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 yC{constructor(t,e){this.target=t,this.targetElement=e,this.value=this.target.value}}const Gie={provide:Io,useExisting:Gn(()=>bC),multi:!0},Wie={provide:qr,useExisting:Gn(()=>bC),multi:!0};let bC=(()=>{class i{constructor(e,n,r,s){if(this._elementRef=e,this._formField=n,this._colorFormats=r,this._adapter=s,this.colorChange=new $e,this.colorInput=new $e,this._disabledChange=new $e,this._valueChange=new $e,this._onTouched=()=>{},this._cvaOnChange=()=>{},this._validatorOnChange=()=>{},this._pickerSubscription=Qt.EMPTY,this._validator=vl.compose([]),this._lastValueValid=!1,!this._colorFormats)throw function Oie(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 yC(this,this._elementRef.nativeElement)),this.colorChange.emit(new yC(this,this._elementRef.nativeElement))}))}get disabled(){return!!this._disabled}set disabled(e){const n=tn(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 yC(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 yC(this,this._elementRef.nativeElement)))}}return i.\u0275fac=function(e){return new(e||i)(E(vt),E(yl,8),E(OH,8),E(XR))},i.\u0275dir=ve({type:i,selectors:[["input","ngxMatColorPicker",""]],hostVars:3,hostBindings:function(e,n){1&e&&Oe("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&&(ql("disabled",n.disabled),It("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:[Dn([Gie,Wie,{provide:VR,useExisting:i}])]}),i})(),jie=(()=>{class i{constructor(e){this._cd=e,this._stateChanges=Qt.EMPTY}get disabled(){if(null==this._disabled&&this.picker)return this.picker.disabled}set disabled(e){this._disabled=e}ngOnInit(){}ngOnChanges(e){e.picker&&this._watchStateChanges()}ngOnDestroy(){this._stateChanges.unsubscribe()}ngAfterContentInit(){this._watchStateChanges()}open(e){this.picker&&!this.disabled&&(this.picker.open(),e.stopPropagation())}_watchStateChanges(){const e=this.picker?this.picker._disabledChange:mt(),n=this.picker&&this.picker._pickerInput?this.picker._pickerInput._disabledChange:mt(),r=this.picker?Cr(this.picker.openedStream,this.picker.closedStream):mt();this._stateChanges.unsubscribe(),this._stateChanges=Cr(e,n,r).subscribe(()=>this._cd.markForCheck())}}return i.\u0275fac=function(e){return new(e||i)(E(Qn))},i.\u0275cmp=ot({type:i,selectors:[["ngx-mat-color-toggle"]],viewQuery:function(e,n){if(1&e&&$n(Aie,5),2&e){let r;At(r=Dt())&&(n._button=r.first)}},hostAttrs:[1,"ngx-mat-color-toggle"],hostVars:7,hostBindings:function(e,n){1&e&&Oe("focus",function(){return n._button.focus()}),2&e&&(It("tabindex",-1),ln("ngx-mat-color-toggle-active",n.picker&&n.picker.opened)("mat-accent",n.picker&&"accent"===n.picker.color)("mat-warn",n.picker&&"warn"===n.picker.color))},inputs:{picker:["for","picker"],tabIndex:"tabIndex",disabled:"disabled"},exportAs:["ngxMatColorPickerToggle"],features:[xi],decls:4,vars:5,consts:[["mat-icon-button","","type","button",3,"disabled","click"],["button",""]],template:function(e,n){1&e&&(G(0,"button",0,1),Oe("click",function(s){return n.open(s)}),G(2,"mat-icon"),Be(3,"palette"),j()()),2&e&&(U("disabled",n.disabled),It("aria-haspopup",n.picker?"dialog":null)("tabindex",n.disabled?-1:n.tabIndex),V(2),qo("color",null==n.picker||null==n.picker._selected?null:n.picker._selected.rgba))},dependencies:[XM,gR],styles:[".mat-form-field-appearance .mat-form-field-prefix .ngx-mat-color-toggle-default-icon,.mat-form-field-appearance .mat-form-field-suffix .ngx-mat-color-toggle-default-icon{width:1em}.mat-form-field:not(.mat-form-field-appearance) .mat-form-field-prefix .ngx-mat-color-toggle-default-icon,.mat-form-field:not(.mat-form-field-appearance) .mat-form-field-suffix .ngx-mat-color-toggle-default-icon{display:block;width:1.5em;height:1.5em}.mat-form-field:not(.mat-form-field-appearance) .mat-form-field-prefix .mat-icon-button .ngx-mat-color-toggle-default-icon,.mat-form-field:not(.mat-form-field-appearance) .mat-form-field-suffix .mat-icon-button .ngx-mat-color-toggle-default-icon{margin:auto}\n"],encapsulation:2}),i})(),Yie=(()=>{class i{}return i.\u0275fac=function(e){return new(e||i)},i.\u0275mod=en({type:i}),i.\u0275inj=Wt({providers:[XR,Hie],imports:[co,mH,KM,vH,aie,tH,nH,vV,Bh,tz]}),i})();const qie=["picker"],Xie=function(i){return{"background-color":i}};function Kie(i,t){if(1&i){const e=jn();G(0,"div",5),Oe("click",function(r){const o=Vt(e).index;return Et(re().onColorClicked(r.currentTarget,o))}),j()}if(2&i){const e=t.$implicit,n=t.index,r=re();U("ngStyle",sm(2,Xie,"#"+r.lpad(e.toString(16),"0",8)))("matTooltip",n+": #"+e.toString(16))}}const Zie=function(){return["colors"]};let Qie=(()=>{class i{constructor(){this.resource=null,this.changed=new $e,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 bU;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=ot({type:i,selectors:[["app-palette-block-ui"]],viewQuery:function(e,n){if(1&e&&$n(qie,5),2&e){let r;At(r=Dt())&&(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&&(Ie(0,"app-compound-block-ui",0),G(1,"div",1),fe(2,Kie,1,4,"div",2),j(),G(3,"input",3),Oe("colorChange",function(s){return n.onColorChange(s.value)}),j(),Ie(4,"ngx-mat-color-picker",null,4)),2&e){const r=Zi(5);U("resource",n.resource)("fieldBlacklist",Rs(4,Zie)),V(2),U("ngForOf",null==n.resourceData?null:n.resourceData.colors),V(1),U("ngxMatColorPicker",r)}},dependencies:[lo,nM,rc,Fs,bC,NH,ec],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 Jie=["editorBody"];function ere(i,t){if(1&i&&(G(0,"div",11),Be(1),j()),2&i){const e=re().$implicit;V(1),ui(e.offset)}}function tre(i,t){if(1&i){const e=jn();G(0,"input",12),Oe("input",function(r){const o=Vt(e).index,a=re().index;return Et(re().onHexInput(r,a,o))})("focus",function(r){const o=Vt(e).index;return Et(re(2).onHexFocus(r,o))})("blur",function(r){return Vt(e),Et(re(2).onHexBlur(r))}),j()}if(2&i){const e=t.$implicit,n=t.index;U("id","hex_input__"+re().index+"__"+n)("value",e[0])("disabled",null===e[0])}}function nre(i,t){1&i&&Ie(0,"div",3)}function ire(i,t){if(1&i){const e=jn();G(0,"span",15),Oe("click",function(){const s=Vt(e).index,o=re(2).index;return Et(re().blurInput(o,s))}),Be(1),j()}if(2&i){const e=t.$implicit,n=t.index;U("id","utf_char__"+re(2).index+"__"+n),V(1),ui(e[1])}}function rre(i,t){if(1&i&&(G(0,"div",13),fe(1,ire,2,2,"span",14),j()),2&i){const e=re().$implicit,n=re();V(1),U("ngForOf",e.values)("ngForTrackBy",n.trackByIndex)}}function sre(i,t){if(1&i&&(G(0,"div",5),fe(1,ere,2,1,"div",6),ct(2,"async"),G(3,"div",7),fe(4,tre,1,3,"input",8),j(),fe(5,nre,1,0,"div",9),ct(6,"async"),ct(7,"async"),fe(8,rre,2,2,"div",10),ct(9,"async"),j()),2&i){const e=t.$implicit,n=t.index,r=re();ln("gray",n%2!=0),V(1),U("ngIf",ut(2,7,r._showOffsets$)),V(3),U("ngForOf",e.values)("ngForTrackBy",r.trackByIndex),V(1),U("ngIf",ut(6,9,r._showOffsets$)||ut(7,11,r._showUtf8$)),V(3),U("ngIf",ut(9,13,r._showUtf8$))}}function ore(i,t){if(1&i){const e=jn();G(0,"div",16)(1,"button",17),Oe("click",function(){return Vt(e),Et(re().changePage(-1))}),ct(2,"async"),Be(3,"Previous"),j(),G(4,"span"),Be(5),ct(6,"async"),ct(7,"async"),j(),G(8,"button",17),Oe("click",function(){return Vt(e),Et(re().changePage(1))}),ct(9,"async"),ct(10,"async"),Be(11," Next "),j()()}if(2&i){const e=re();V(1),U("disabled",0===ut(2,4,e.currentPage$)),V(4),Dh("Page ",(ut(6,6,e.currentPage$)||0)+1," of ",ut(7,8,e.totalPages$),""),V(3),U("disabled",(ut(9,10,e.currentPage$)||0)>=(ut(10,12,e.totalPages$)||0)-1)}}let are=(()=>{class i{set maxColumns(e){this._maxColumns$.next(e)}set maxRows(e){this._maxRows$.next(e)}set showOffsets(e){this._showOffsets$.next(e)}set showUtf8(e){this._showUtf8$.next(e)}set data(e){if(e!==this._data$.value){if(e.length===this._data$.value.length){for(let n=0;n=32&&e<=126?String.fromCharCode(e):"."]}ngAfterViewInit(){new ResizeObserver(e=>{for(const n of e)this.viewportSize$.next([n.contentRect.width,n.contentRect.height])}).observe(this.editorBody.nativeElement),Ra([this.viewportSize$,this._maxColumns$,this._maxRows$,this._showOffsets$,this._showUtf8$]).pipe(Ue(this.destroyed$),Wy(50)).subscribe(([[e,n],r,s,o,a])=>{let l=e-8;o&&(l-=68);let c=34;a&&(l-=8,c+=10);let h=Math.floor(l/c);r>0&&h>r&&(h=r);let p=this.pageSize$.value[0];h===p+1&&l/c%1<.5&&(h=p),h=Math.max(1,h);let m=Math.floor(n/28);s>0&&m>s&&(m=s),m=Math.max(1,m),(h!=this.pageSize$.value[0]||m!==this.pageSize$.value[1])&&this.pageSize$.next([h,m])}),Ra([this._data$,this.currentPage$,this.pageSize$]).pipe(Ue(this.destroyed$)).subscribe(([e,n,r])=>{if(0===r[0]||0===r[1])return;let s=Math.max(1,Math.ceil(Math.ceil(e.length/r[0])/r[1]));if(this.totalPages$.value!==s&&this.totalPages$.next(s),n>=s)return void this.currentPage$.next(n=s-1);const o=[];for(let a=n*r[0]*r[1];a=0&&a<=255&&(this.data[(this.currentPage$.value*this.pageSize$.value[1]+n)*this.pageSize$.value[0]+r]=a,this.renderedRows$.value[n].values[r]=this.renderValue(a),this.cdr.detectChanges(),this.dataChange.emit(this.data),this.goToNextInput(s.id))}}onHexFocus(e,n){const r=e.target,s=r.closest(".row");s&&s.querySelectorAll(".utf8-values span").forEach((a,l)=>{a.classList.toggle("highlight",l===n)}),r.select()}onHexBlur(e){const r=e.target.closest(".row");r&&r.querySelectorAll(".utf8-values span").forEach(o=>{o.classList.remove("highlight")})}}return i.\u0275fac=function(e){return new(e||i)(E(Qn))},i.\u0275cmp=ot({type:i,selectors:[["hex-editor"]],viewQuery:function(e,n){if(1&e&&$n(Jie,5),2&e){let r;At(r=Dt())&&(n.editorBody=r.first)}},inputs:{maxColumns:"maxColumns",maxRows:"maxRows",showOffsets:"showOffsets",showUtf8:"showUtf8",data:"data",readOnly:"readOnly"},outputs:{dataChange:"dataChange"},decls:7,vars:7,consts:[[1,"editor-body"],["editorBody",""],["class","row",3,"gray",4,"ngFor","ngForOf","ngForTrackBy"],[1,"flex-spacer"],["class","pagination",4,"ngIf"],[1,"row"],["class","offset",4,"ngIf"],[1,"hex-values"],["maxlength","2",3,"id","value","disabled","input","focus","blur",4,"ngFor","ngForOf","ngForTrackBy"],["class","flex-spacer",4,"ngIf"],["class","utf8-values",4,"ngIf"],[1,"offset"],["maxlength","2",3,"id","value","disabled","input","focus","blur"],[1,"utf8-values"],[3,"id","click",4,"ngFor","ngForOf","ngForTrackBy"],[3,"id","click"],[1,"pagination"],[3,"disabled","click"]],template:function(e,n){1&e&&(G(0,"div",0,1),fe(2,sre,10,15,"div",2),ct(3,"async"),Ie(4,"div",3),j(),fe(5,ore,12,14,"div",4),ct(6,"async")),2&e&&(V(2),U("ngForOf",ut(3,3,n.renderedRows$))("ngForTrackBy",n.trackByIndex),V(3),U("ngIf",(ut(6,5,n.totalPages$)||0)>1))},dependencies:[lo,_i,Xo],styles:["[_nghost-%COMP%]{display:flex;flex-direction:column;font-family:monospace}.editor-body[_ngcontent-%COMP%]{display:flex;flex-grow:1;flex-direction:column;overflow-y:hidden}.row[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:center;height:24px;margin-bottom:4px}.row.gray[_ngcontent-%COMP%]{background-color:#d3d3d3}.offset[_ngcontent-%COMP%]{width:60px;text-align:left;margin-right:8px}.hex-values[_ngcontent-%COMP%]{display:flex;gap:2px;flex-shrink:1;overflow-x:clip}.hex-values[_ngcontent-%COMP%] input[_ngcontent-%COMP%]{width:32px;text-align:center;box-sizing:border-box}.utf8-values[_ngcontent-%COMP%]{margin-left:8px}.utf8-values[_ngcontent-%COMP%] span[_ngcontent-%COMP%]{display:inline-block;width:8px;margin-left:2px;color:#000}.utf8-values[_ngcontent-%COMP%] span.highlight[_ngcontent-%COMP%]{background-color:#ff0}.pagination[_ngcontent-%COMP%]{display:flex;justify-content:space-between;align-items:center;margin-top:1em}.flex-spacer[_ngcontent-%COMP%]{flex-grow:1}"],changeDetection:0}),i})(),lre=(()=>{class i{}return i.\u0275fac=function(e){return new(e||i)},i.\u0275mod=en({type:i}),i.\u0275inj=Wt({imports:[co]}),i})();const cre=["editor"];let dre=(()=>{class i{constructor(){this._resource=null,this.empty=new Uint8Array,this.data$=new Qe(new Uint8Array),this.resourceDescription="",this.disabled=!1,this.changed=new $e}get resource(){return this._resource}set resource(e){this._resource=e,this.data$.next(new Uint8Array(e?e.data:0))}onDataChange(e){this._resource.data=Array.from(e),this.changed.emit()}}return i.\u0275fac=function(e){return new(e||i)},i.\u0275cmp=ot({type:i,selectors:[["app-binary-block-ui"]],viewQuery:function(e,n){if(1&e&&$n(cre,5),2&e){let r;At(r=Dt())&&(n.editorDiv=r.first)}},inputs:{resource:"resource",resourceDescription:"resourceDescription",disabled:"disabled"},outputs:{changed:"changed"},decls:5,vars:10,consts:[["matTooltipPosition","above",3,"matTooltip"],[3,"data","maxColumns","showOffsets","readOnly","dataChange"]],template:function(e,n){1&e&&(G(0,"h2",0),Be(1),j(),G(2,"hex-editor",1),Oe("dataChange",function(s){return n.onDataChange(s)}),ct(3,"async"),ct(4,"async"),j()),2&e&&(U("matTooltip",n.resourceDescription),V(1),ui(null==n.resource?null:n.resource.name),V(1),U("data",ut(3,6,n.data$)||n.empty)("maxColumns",8)("showOffsets",(ut(4,8,n.data$)||n.empty).length>16)("readOnly",n.disabled))},dependencies:[Fs,are,Xo],changeDetection:0}),i})();const ure=["picker"];function hre(i,t){if(1&i&&(G(0,"mat-label",8),Be(1),j()),2&i){const e=re();V(1),ui(null==e.resource?null:e.resource.name)}}const fre=function(i){return{transform:i}};let pre=(()=>{class i{constructor(e){this.cdr=e,this.resource=null,this.resourceDescription="",this.changed=new $e,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)(E(Qn))},i.\u0275cmp=ot({type:i,selectors:[["app-angle-block-ui"]],viewQuery:function(e,n){if(1&e&&$n(ure,5),2&e){let r;At(r=Dt())&&(n.picker=r.first)}},hostBindings:function(e,n){1&e&&Oe("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&&(G(0,"div",0)(1,"div",1,2)(3,"div",3),Ie(4,"div",4)(5,"div",5),j()(),G(6,"div",6),fe(7,hre,2,1,"mat-label",7),G(8,"mat-label"),Be(9),ct(10,"number"),j(),G(11,"mat-label"),Be(12),ct(13,"number"),j()()()),2&e&&(U("matTooltip",n.resourceDescription),V(3),U("ngStyle",sm(11,fre,"rotate("+((null==n.resource?null:n.resource.data)||0)+"rad)")),V(4),U("ngIf",null==n.resource?null:n.resource.name),V(2),Qi("",JD(10,5,180*(null==n.resource?null:n.resource.data)/n.pi||0,"1.2-2")," deg"),V(3),Qi("",JD(13,8,(null==n.resource?null:n.resource.data)||0,"1.2-2")," rad"))},dependencies:[_i,nM,Ro,Fs,hB],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 KR{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,d=new Set;for(const h of e)!0===Array.isArray(h)?a.add(h):"object"==typeof h?l.add(h):"function"==typeof h?d.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===d.size){h=!0;for(const p of o)if(!1===d.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 mre(i,t){if(1&i&&(G(0,"mat-list-option",3),Be(1),j()),2&i){const e=t.$implicit,n=re();U("value",e)("selected",n.selectedValue==e),V(1),Qi(" ",e," ")}}function gre(i,t){if(1&i&&(G(0,"mat-card"),Ie(1,"app-editor",4),j()),2&i){const e=re();V(1),U("resource",e.resources[e.selectedValue])}}let xC=(()=>{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)(E(KR))},i.\u0275cmp=ot({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&&(G(0,"mat-selection-list",0),Oe("selectionChange",function(s){return n.selectedValue=s.source.selectedOptions.selected[0].value}),fe(1,mre,2,3,"mat-list-option",1),j(),fe(2,gre,2,1,"mat-card",2)),2&e&&(U("multiple",!1),V(1),U("ngForOf",n.keys),V(1),U("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})(),_re=(()=>{class i{constructor(){this._resource=null,this.resourceMap={},this.changed=new $e}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",iR("@transformPanel",[nR()],{optional:!0}))]),transformPanel:Oa("transformPanel",[Os("void",oi({opacity:0,transform:"scale(1, 0.8)"})),Or("void => showing",Yr("120ms cubic-bezier(0, 0, 0.2, 1)",oi({opacity:1,transform:"scale(1, 1)"}))),Or("* => void",Yr("100ms linear",oi({opacity:0})))])};let BH=0;const UH=new me("mat-select-scroll-strategy"),Tre=new me("MAT_SELECT_CONFIG"),Ire={provide:UH,deps:[as],useFactory:function Dre(i){return()=>i.scrollStrategies.reposition()}},Rre=new me("MatSelectTrigger");class kre{constructor(t,e){this.source=t,this.value=e}}const Pre=YM(JI(jM(WU(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 Te}}))));let Ore=(()=>{class i extends Pre{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(vl.required)??!1}set required(e){this._required=tn(e),this.stateChanges.next()}get multiple(){return this._multiple}set multiple(e){this._multiple=tn(e)}get disableOptionCentering(){return this._disableOptionCentering}set disableOptionCentering(e){this._disableOptionCentering=tn(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=Ps(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,d,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=d,this._liveAnnouncer=g,this._defaultOptions=b,this._panelOpen=!1,this._compareWith=(v,y)=>v===y,this._uid="mat-select-"+BH++,this._triggerAriaLabelledBy=null,this._destroy=new Te,this._onChange=()=>{},this._onTouched=()=>{},this._valueId="mat-select-value-"+BH++,this._panelDoneAnimatingStream=new Te,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=Ey(()=>{const v=this.options;return v?v.changes.pipe(Do(v),ks(()=>Cr(...v.map(y=>y.onSelectionChange)))):this._ngZone.onStable.pipe(Oi(1),ks(()=>this.optionSelectionChanges))}),this.openedChange=new $e,this._openedStream=this.openedChange.pipe(gn(v=>v),tt(()=>{})),this._closedStream=this.openedChange.pipe(gn(v=>!v),tt(()=>{})),this.selectionChange=new $e,this.valueChange=new $e,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 HR(this.multiple),this.stateChanges.next(),this._panelDoneAnimatingStream.pipe(Ql(),Ue(this._destroy)).subscribe(()=>this._panelDoneAnimating(this.panelOpen))}ngAfterContentInit(){this._initKeyManager(),this._selectionModel.changed.pipe(Ue(this._destroy)).subscribe(e=>{e.added.forEach(n=>n.select()),e.removed.forEach(n=>n.deselect())}),this.options.changes.pipe(Do(null),Ue(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&&!Qo(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||Qo(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(Oi(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 $Z(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=Cr(this.options.changes,this._destroy);this.optionSelectionChanges.pipe(Ue(e)).subscribe(n=>{this._onSelect(n.source,n.isUserInput),n.isUserInput&&!this.multiple&&this._panelOpen&&(this.close(),this.focus())}),Cr(...this.options.map(n=>n._stateChanges)).pipe(Ue(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)(E(LM),E(Qn),E(gt),E(YU),E(vt),E(Pa,8),E(hb,8),E(Gh,8),E(mC,8),E(tc,10),wa("tabindex"),E(UH),E(XI),E(Tre,8))},i.\u0275dir=ve({type:i,viewQuery:function(e,n){if(1&e&&($n(vre,5),$n(yre,5),$n(wU,5)),2&e){let r;At(r=Dt())&&(n.trigger=r.first),At(r=Dt())&&(n.panel=r.first),At(r=Dt())&&(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:[dt,xi]}),i})(),pb=(()=>{class i extends Ore{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(Ue(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 OQ(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 kre(this,e)}_getOverlayWidth(){return(this._preferredOverlayOrigin instanceof zI?this._preferredOverlayOrigin.elementRef:this._preferredOverlayOrigin||this._elementRef).nativeElement.getBoundingClientRect().width}get hideSingleSelectionIndicator(){return this._hideSingleSelectionIndicator}set hideSingleSelectionIndicator(e){this._hideSingleSelectionIndicator=tn(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=si(i)))(n||i)}}(),i.\u0275cmp=ot({type:i,selectors:[["mat-select"]],contentQueries:function(e,n,r){if(1&e&&(Wi(r,Rre,5),Wi(r,Nm,5),Wi(r,tV,5)),2&e){let s;At(s=Dt())&&(n.customTrigger=s.first),At(s=Dt())&&(n.options=s),At(s=Dt())&&(n.optionGroups=s)}},hostAttrs:["role","combobox","aria-autocomplete","none","aria-haspopup","listbox",1,"mat-mdc-select"],hostVars:19,hostBindings:function(e,n){1&e&&Oe("keydown",function(s){return n._handleKeydown(s)})("focus",function(){return n._onFocus()})("blur",function(){return n._onBlur()}),2&e&&(It("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()),ln("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:[Dn([{provide:UR,useExisting:i},{provide:eV,useExisting:i}]),dt],ngContentSelectors:Ere,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&&(or(Sre),G(0,"div",0,1),Oe("click",function(){return n.toggle()}),G(3,"div",2),fe(4,bre,2,1,"span",3),fe(5,Mre,3,2,"span",4),j(),G(6,"div",5)(7,"div",6),ki(),G(8,"svg",7),Ie(9,"path",8),j()()()(),fe(10,Cre,3,9,"ng-template",9),Oe("backdropClick",function(){return n.close()})("attach",function(){return n._onAttached()})("detach",function(){return n.close()})),2&e){const r=Zi(1);It("aria-owns",n.panelOpen?n.id+"-panel":null),V(3),U("ngSwitch",n.empty),It("id",n._valueId),V(1),U("ngSwitchCase",!0),V(1),U("ngSwitchCase",!1),V(5),U("cdkConnectedOverlayPanelClass",n._overlayPanelClass)("cdkConnectedOverlayScrollStrategy",n._scrollStrategy)("cdkConnectedOverlayOrigin",n._preferredOverlayOrigin||r)("cdkConnectedOverlayOpen",n.panelOpen)("cdkConnectedOverlayPositions",n._positions)("cdkConnectedOverlayWidth",n._overlayWidth)}},dependencies:[hm,by,VT,lB,wU,zI],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:[Are.transformPanel]},changeDetection:0}),i})(),VH=(()=>{class i{}return i.\u0275fac=function(e){return new(e||i)},i.\u0275mod=en({type:i}),i.\u0275inj=Wt({providers:[Ire],imports:[co,Pm,tR,Jn,Ky,gC,tR,Jn]}),i})();function Fre(i,t){if(1&i&&(G(0,"mat-label"),Be(1),j()),2&i){const e=re(3);V(1),ui(e.resource.name)}}function Lre(i,t){if(1&i&&(G(0,"mat-option",6),Be(1),j()),2&i){const e=t.$implicit,n=re(3);U("value",e[1])("disabled",n.disabled),V(1),Qi(" ",e[1]," ")}}function Nre(i,t){if(1&i){const e=jn();G(0,"mat-form-field",3),fe(1,Fre,2,1,"mat-label",0),G(2,"mat-select",4),Oe("valueChange",function(r){return Vt(e),Et(re(2).resource.data=r)})("selectionChange",function(){return Vt(e),Et(re(2).changed.emit())}),fe(3,Lre,2,3,"mat-option",5),j()()}if(2&i){const e=re(2);U("matTooltip",e.resourceDescription),V(1),U("ngIf",e.resource.name),V(1),U("value",e.resource.data)("disabled",e.disabled),V(1),U("ngForOf",e.resource.schema.enum_names)}}function Bre(i,t){if(1&i&&(G(0,"mat-label"),Be(1),j()),2&i){const e=re(3);V(1),ui(e.resource.name)}}function Ure(i,t){if(1&i){const e=jn();G(0,"mat-form-field",3),fe(1,Bre,2,1,"mat-label",0),G(2,"input",7),Oe("ngModelChange",function(r){return Vt(e),Et(re(2).resource.data=r)})("change",function(){return Vt(e),Et(re(2).changed.emit())}),j()()}if(2&i){const e=re(2);U("matTooltip",e.resourceDescription),V(1),U("ngIf",e.resource.name),V(1),U("min",0)("max",256*(e.resource.schema.length||1)-1)("ngModel",e.resource.data)}}function Vre(i,t){if(1&i&&(Gr(0),fe(1,Nre,4,5,"mat-form-field",1),fe(2,Ure,3,5,"ng-template",null,2,zc),Wr()),2&i){const e=Zi(3),n=re();V(1),U("ngIf",n.isKnownEnumValue(n.resource.data))("ngIfElse",e)}}let zre=(()=>{class i{constructor(){this.resource=null,this.resourceDescription="",this.disabled=!1,this.changed=new $e}isKnownEnumValue(e){return!!this.resource?.schema.enum_names.find(([n,r])=>r==e)}}return i.\u0275fac=function(e){return new(e||i)},i.\u0275cmp=ot({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&&fe(0,Vre,4,2,"ng-container",0),2&e&&U("ngIf",n.resource)},dependencies:[lo,_i,_l,mu,nc,_u,gu,Zc,yl,Ro,rc,Fs,pb,Nm],changeDetection:0}),i})();const Hre=["*"],Gre=["unscopedContent"];function Wre(i,t){1&i&&Yt(0,4)}function jre(i,t){if(1&i&&(G(0,"div",11),Ie(1,"input",12),G(2,"div",13),ki(),G(3,"svg",14),Ie(4,"path",15),j(),ya(),Ie(5,"div",16),j()()),2&i){const e=re();ln("mdc-checkbox--disabled",e.disabled),V(1),U("checked",e.selected)("disabled",e.disabled)}}function Yre(i,t){if(1&i&&(G(0,"div",17),Ie(1,"input",18),G(2,"div",19),Ie(3,"div",20)(4,"div",21),j()()),2&i){const e=re();ln("mdc-radio--disabled",e.disabled),V(1),U("checked",e.selected)("disabled",e.disabled)}}function qre(i,t){}function Xre(i,t){if(1&i&&(G(0,"span",22),fe(1,qre,0,0,"ng-template",23),j()),2&i){re();const e=Zi(3);V(1),U("ngTemplateOutlet",e)}}function Kre(i,t){}function Zre(i,t){if(1&i&&(G(0,"span",24),fe(1,Kre,0,0,"ng-template",23),j()),2&i){re();const e=Zi(5);V(1),U("ngTemplateOutlet",e)}}function Qre(i,t){}function Jre(i,t){1&i&&fe(0,Qre,0,0,"ng-template",23),2&i&&(re(),U("ngTemplateOutlet",Zi(1)))}function ese(i,t){}function tse(i,t){if(1&i&&(G(0,"span",25),fe(1,ese,0,0,"ng-template",23),j()),2&i){re();const e=Zi(3);V(1),U("ngTemplateOutlet",e)}}function nse(i,t){}function ise(i,t){if(1&i&&(G(0,"span",25),fe(1,nse,0,0,"ng-template",23),j()),2&i){re();const e=Zi(5);V(1),U("ngTemplateOutlet",e)}}function rse(i,t){}function sse(i,t){1&i&&fe(0,rse,0,0,"ng-template",23),2&i&&(re(),U("ngTemplateOutlet",Zi(1)))}const ose=[[["","matListItemTitle",""]],[["","matListItemLine",""]],"*",[["mat-divider"]],[["","matListItemAvatar",""],["","matListItemIcon",""]]],ase=["[matListItemTitle]","[matListItemLine]","*","mat-divider","[matListItemAvatar],[matListItemIcon]"],zH=new me("ListOption");let lse=(()=>{class i{constructor(e){this._elementRef=e}}return i.\u0275fac=function(e){return new(e||i)(E(vt))},i.\u0275dir=ve({type:i,selectors:[["","matListItemTitle",""]],hostAttrs:[1,"mat-mdc-list-item-title","mdc-list-item__primary-text"]}),i})(),cse=(()=>{class i{constructor(e){this._elementRef=e}}return i.\u0275fac=function(e){return new(e||i)(E(vt))},i.\u0275dir=ve({type:i,selectors:[["","matListItemLine",""]],hostAttrs:[1,"mat-mdc-list-item-line","mdc-list-item__secondary-text"]}),i})(),HH=(()=>{class i{constructor(e){this._listOption=e}_isAlignedAtStart(){return!this._listOption||"after"===this._listOption?._getTogglePosition()}}return i.\u0275fac=function(e){return new(e||i)(E(zH,8))},i.\u0275dir=ve({type:i,hostVars:4,hostBindings:function(e,n){2&e&&ln("mdc-list-item__start",n._isAlignedAtStart())("mdc-list-item__end",!n._isAlignedAtStart())}}),i})(),dse=(()=>{class i extends HH{}return i.\u0275fac=function(){let t;return function(n){return(t||(t=si(i)))(n||i)}}(),i.\u0275dir=ve({type:i,selectors:[["","matListItemAvatar",""]],hostAttrs:[1,"mat-mdc-list-item-avatar"],features:[dt]}),i})(),use=(()=>{class i extends HH{}return i.\u0275fac=function(){let t;return function(n){return(t||(t=si(i)))(n||i)}}(),i.\u0275dir=ve({type:i,selectors:[["","matListItemIcon",""]],hostAttrs:[1,"mat-mdc-list-item-icon"],features:[dt]}),i})();const hse=new me("MAT_LIST_CONFIG");let ZR=(()=>{class i{constructor(){this._isNonInteractive=!0,this._disableRipple=!1,this._disabled=!1,this._defaultOptions=Lt(hse,{optional:!0})}get disableRipple(){return this._disableRipple}set disableRipple(e){this._disableRipple=tn(e)}get disabled(){return this._disabled}set disabled(e){this._disabled=tn(e)}}return i.\u0275fac=function(e){return new(e||i)},i.\u0275dir=ve({type:i,hostVars:1,hostBindings:function(e,n){2&e&&It("aria-disabled",n.disabled)},inputs:{disableRipple:"disableRipple",disabled:"disabled"}}),i})(),$H=(()=>{class i{set lines(e){this._explicitLines=Ps(e,null),this._updateItemLines(!1)}get disableRipple(){return this.disabled||this._disableRipple||this._noopAnimations||!!this._listBase?.disableRipple}set disableRipple(e){this._disableRipple=tn(e)}get disabled(){return this._disabled||!!this._listBase?.disabled}set disabled(e){this._disabled=tn(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 Qt,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(Cr(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)(E(vt),E(gt),E(ZR,8),E(zi),E(eR,8),E(kr,8))},i.\u0275dir=ve({type:i,contentQueries:function(e,n,r){if(1&e&&(Wi(r,dse,4),Wi(r,use,4)),2&e){let s;At(s=Dt())&&(n._avatars=s),At(s=Dt())&&(n._icons=s)}},hostVars:4,hostBindings:function(e,n){2&e&&(It("aria-disabled",n.disabled)("disabled",n._isButtonElement&&n.disabled||null),ln("mdc-list-item--disabled",n.disabled))},inputs:{lines:"lines",disableRipple:"disableRipple",disabled:"disabled"}}),i})();const GH=new me("SelectionList");let wC=(()=>{class i extends $H{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=tn(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 $e,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)(E(vt),E(gt),E(GH),E(zi),E(Qn),E(eR,8),E(kr,8))},i.\u0275cmp=ot({type:i,selectors:[["mat-list-option"]],contentQueries:function(e,n,r){if(1&e&&(Wi(r,cse,5),Wi(r,lse,5)),2&e){let s;At(s=Dt())&&(n._lines=s),At(s=Dt())&&(n._titles=s)}},viewQuery:function(e,n){if(1&e&&$n(Gre,5),2&e){let r;At(r=Dt())&&(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&&Oe("blur",function(){return n._handleBlur()})("click",function(){return n._toggleOnInteraction()}),2&e&&(It("aria-selected",n.selected),ln("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:[Dn([{provide:$H,useExisting:i},{provide:zH,useExisting:i}]),dt],ngContentSelectors:ase,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&&(or(ose),fe(0,Wre,1,0,"ng-template",null,0,zc),fe(2,jre,6,4,"ng-template",null,1,zc),fe(4,Yre,5,4,"ng-template",null,2,zc),fe(6,Xre,2,1,"span",3),fe(7,Zre,2,1,"span",4),fe(8,Jre,1,1,"ng-template",5),G(9,"span",6),Yt(10),Yt(11,1),G(12,"span",7,8),Oe("cdkObserveContent",function(){return n._updateItemLines(!0)}),Yt(14,2),j()(),fe(15,tse,2,1,"span",9),fe(16,ise,2,1,"span",9),fe(17,sse,1,1,"ng-template",5),Yt(18,3),Ie(19,"div",10)),2&e&&(V(6),U("ngIf",n._hasCheckboxAt("before")),V(1),U("ngIf",n._hasRadioAt("before")),V(1),U("ngIf",n._hasIconsOrAvatarsAt("before")),V(7),U("ngIf",n._hasCheckboxAt("after")),V(1),U("ngIf",n._hasRadioAt("after")),V(1),U("ngIf",n._hasIconsOrAvatarsAt("after")))},dependencies:[SU,_i,xy],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 fse={provide:Io,useExisting:Gn(()=>MC),multi:!0};class pse{constructor(t,e){this.source=t,this.options=e}}let MC=(()=>{class i extends ZR{get multiple(){return this._multiple}set multiple(e){const n=tn(e);n!==this._multiple&&(this._multiple=n,this.selectedOptions=new HR(this._multiple,this.selectedOptions.selected))}get hideSingleSelectionIndicator(){return this._hideSingleSelectionIndicator}set hideSingleSelectionIndicator(e){this._hideSingleSelectionIndicator=tn(e)}constructor(e,n){super(),this._element=e,this._ngZone=n,this._initialized=!1,this._destroyed=new Te,this._onChange=r=>{},this.selectionChange=new $e,this.color="accent",this.compareWith=(r,s)=>r===s,this._multiple=!0,this._hideSingleSelectionIndicator=this._defaultOptions?.hideSingleSelectionIndicator??!1,this.selectedOptions=new HR(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 pse(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=tn(e),this._selectionListDisabled&&this._keyManager?.setActiveItem(-1)}registerOnChange(e){this._onChange=e}registerOnTouched(e){this._onTouched=e}_watchForSelectionChange(){this.selectedOptions.changed.pipe(Ue(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()&&Qo(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 kU(this._items).withHomeAndEnd().withTypeAhead().withWrap().skipPredicate(()=>this.disabled),this._resetActiveOption(),this._keyManager.change.subscribe(e=>this._setActiveOption(e)),this._items.changes.pipe(Ue(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=FM();return e&&this._element.nativeElement.contains(e)}}return i.\u0275fac=function(e){return new(e||i)(E(vt),E(gt))},i.\u0275cmp=ot({type:i,selectors:[["mat-selection-list"]],contentQueries:function(e,n,r){if(1&e&&Wi(r,wC,5),2&e){let s;At(s=Dt())&&(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&&Oe("keydown",function(s){return n._handleKeydown(s)}),2&e&&It("aria-multiselectable",n.multiple)},inputs:{color:"color",compareWith:"compareWith",multiple:"multiple",hideSingleSelectionIndicator:"hideSingleSelectionIndicator",disabled:"disabled"},outputs:{selectionChange:"selectionChange"},exportAs:["matSelectionList"],features:[Dn([fse,{provide:ZR,useExisting:i},{provide:GH,useExisting:i}]),dt,xi],ngContentSelectors:Hre,decls:1,vars:0,template:function(e,n){1&e&&(or(),Yt(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})(),mse=(()=>{class i{}return i.\u0275fac=function(e){return new(e||i)},i.\u0275mod=en({type:i}),i.\u0275inj=Wt({imports:[HI,co,Jn,tb,JU,kV]}),i})();function gse(i,t){if(1&i&&(G(0,"mat-label"),Be(1),j()),2&i){const e=re(2);V(1),ui(e.resource.name)}}function _se(i,t){if(1&i&&(G(0,"mat-list-option",5),Be(1),j()),2&i){const e=t.$implicit,n=re(2);U("value",e.key)("selected",n.resource.data[e.key])("disabled",n.disabled),V(1),Qi(" ",e.key," ")}}function vse(i,t){if(1&i){const e=jn();Gr(0,1),fe(1,gse,2,1,"mat-label",2),G(2,"mat-selection-list",3),Oe("selectionChange",function(r){return Vt(e),Et(re().onSelection(r))}),fe(3,_se,2,4,"mat-list-option",4),ct(4,"keyvalue"),j(),Wr()}if(2&i){const e=re();U("matTooltip",e.resourceDescription),V(1),U("ngIf",e.resource.name),V(1),U("disabled",e.disabled),V(1),U("ngForOf",ut(4,4,e.resource.data))}}let yse=(()=>{class i{constructor(){this.resource=null,this.resourceDescription="",this.disabled=!1,this.changed=new $e}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=ot({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&&fe(0,vse,5,6,"ng-container",0),2&e&&U("ngIf",n.resource)},dependencies:[lo,_i,Ro,Fs,MC,wC,dB],styles:["[_nghost-%COMP%]{padding-bottom:1.34375em}"],changeDetection:0}),i})();class WH{get tick$(){return this._tick$.asObservable()}get children(){return[...this._children]}constructor(t){this.parent=t,this._tick$=new Te,this._children=[],t&&t.addChild(this)}addChild(t){if(t.parent!==this)throw new Error("Incorrect child clock");this._children.includes(t)||this._children.push(t)}removeChild(t){if(t.parent!==this)throw new Error("Incorrect child clock");this._children=this._children.filter(e=>e!==t)}dispose(){this.parent&&this.parent.removeChild(this);for(const t of this._children)t.dispose();this._tick$.complete()}}const xse=typeof performance>"u"?()=>Date.now():()=>performance.now();class jm extends WH{static get instance(){return jm._instance||(jm._instance=new jm),jm._instance}get elapsedTime(){return xse()}constructor(){super(null);let t=this.elapsedTime;const e=()=>{requestAnimationFrame(e);const n=t,r=this.elapsedTime;t=r,this._tick$.next([n,r-n])};requestAnimationFrame(e)}dispose(){throw new Error("Cannot dispose global clock")}}class jH extends WH{get isRunning(){return!!this.tickSub}get isPaused(){return-1!==this.pausedAt}get isStopped(){return-1===this.startedAt}get timeScale(){return this._timeScale}set timeScale(t){if(t!==this._timeScale||this.pausedByTimescale&&0!==t){if(0===t)return void(this.isPaused||(this.pause(),this.pausedByTimescale=!0));if(this.isPaused&&this.pausedByTimescale&&(this.resume(),this.pausedByTimescale=!1),!this.isStopped){const e=this.isPaused?this.pausedAt:this.parentClock.elapsedTime;this.startedAt=e-(e-this.startedAt)*this.timeScale/t}this._timeScale=t}}get elapsedTime(){return this.isStopped?this.lastStopElapsed:this.isPaused?this._timeScale*(this.pausedAt-this.startedAt):this._timeScale*(this.parentClock.elapsedTime-this.startedAt)}constructor(t=!1,e=jm.instance){super(e),this.parentClock=e,this.tickSub=null,this._internalTick$=new Te,this.tickRateLimit=0,this.paused$=new Te,this.startedAt=-1,this.oldRelativeTime=0,this.pausedAt=-1,this.lastStopElapsed=0,this._timeScale=1,this.pausedByTimescale=!1,this.lastFiredTickElapsed=0,t&&this.start(),this._internalTick$.pipe(tt(([n,r])=>[r,r-this.lastFiredTickElapsed]),gn(([n])=>!this.tickRateLimit||Math.floor(this.lastFiredTickElapsed*this.tickRateLimit/1e3)this.lastFiredTickElapsed=n)).subscribe(this._tick$)}start(){this.isRunning||(this.oldRelativeTime=0,this.startedAt=this.parentClock.elapsedTime,this.startListeningTicks())}stop(){this.stopListeningTicks(),this.lastStopElapsed=this.elapsedTime,this.startedAt=this.pausedAt=-1}pause(){this.stopListeningTicks(),this.pausedAt=this.parentClock.elapsedTime,this.pausedByTimescale=!1,this.paused$.next(!0)}resume(){this.isRunning||-1==this.pausedAt||(this.startedAt+=this.parentClock.elapsedTime-this.pausedAt,this.pausedAt=-1,this.startListeningTicks(),this.paused$.next(!1))}startListeningTicks(){if(this.tickSub)throw new Error("Clock is already ticking!");this.tickSub=this.parentClock.tick$.pipe(tt(([t,e])=>[this.oldRelativeTime,this.oldRelativeTime+e*this.timeScale]),Vi(([t,e])=>this.oldRelativeTime=e)).subscribe(this._internalTick$)}stopListeningTicks(){var t;null===(t=this.tickSub)||void 0===t||t.unsubscribe(),this.tickSub=null}dispose(){this.stopListeningTicks(),this._internalTick$.complete(),super.dispose()}}const wse={transparent:!1,background:0,size:"fullscreen",antialias:!0};class Mse{constructor(t,e,n={}){this.scene=t,this.canvas=e,this.entity=null,this.rendererOptions=Object.assign(Object.assign({},wse),n||{})}}class mb{static fromArray(t,e=!1){const n=new mb(t[0]);let r=n;for(let s=1;sn.map(r=>new mb(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]}constructor(t){this.data=t,this.adjacent=new Set}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(d=>!e.has(d));for(const d of c)e.add(d),r.push([d,a-1])}}return n}nodes(){return Array.from(this.walkRead(-1))}}var oc=(()=>{return(i=oc||(oc={}))[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",oc;var i})();let Kh=(()=>{class i{constructor(){this.tick$=new Te,this._world=null,this._name="e0x"+(i.default_name_counter++).toString(16),this._selfActive=!0,this.parent=null,this._children=[],this._components=[],this._onSpawned$=new Te,this._onRemoved$=new Te}get world(){return this._world}get name(){return this._name}set name(e){this._name=e}get active(){return this._selfActive&&(!this.parent||this.parent.active)}set active(e){this._selfActive=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 Cse extends Kh{constructor(t){super(),this.tickOrder=t}}function Ym(i,t=oc.CONTROLLERS,e){const n=new Cse(t);return e&&(n.name=e),i.addEntity(n),n.tick$.pipe(su(()=>{i.removeEntity(n,!0)}))}class QR extends Kh{get rendererSize$(){return this._rendererSize$.asObservable()}get rendererSize(){return this._rendererSize$.getValue()}get rendererOptions(){return this.renderer.rendererOptions}get physicsDebugViewActive(){return this.renderer.physicsDebugViewActive}set physicsDebugViewActive(t){this.renderer.physicsDebugViewActive=t}constructor(t){super(),this.renderer=t,this.tickOrder=oc.RENDERING,this._rendererSize$=new Qe(null),this.addComponents(t),this.tick$.subscribe(()=>{this.renderer.render()})}onSpawned(t){this._rendererSize$.next(null),"fullscreen"==this.rendererOptions.size||"function"==typeof this.rendererOptions.size?(this.renderer.canvas&&(this.renderer.canvas.style.position="absolute"),Cr(To(window,"resize").pipe(Wy(100)),To(window,"orientationchange")).pipe(Ue(this._onRemoved$),tt(()=>({x:window.innerWidth,y:window.innerHeight})),Do({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 In||void 0!==this.rendererOptions.size.subscribe&&void 0!==this.rendererOptions.size.pipe?this.rendererOptions.size.pipe(Ue(this._onRemoved$)).subscribe(e=>{this._rendererSize$.next(e)}):this._rendererSize$.next(this.rendererOptions.size),this._rendererSize$.pipe(Ue(this._onRemoved$),Ql((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 JR=i=>{i.updateVisibility?i.updateVisibility():YH(i)},YH=i=>{for(const t of i.children)JR(t)};class Sse extends Kh{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(){YH(this)}addChildren(...t){super.addChildren(...t);for(const e of t)JR(e)}removeChildren(t,e=!1){if(super.removeChildren(t,e),!e)for(const n of t)JR(n)}}class ek{constructor(){this._running=!1,this.stop$=new Te}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 Ese extends ek{get output$(){return this._output$.asObservable()}constructor(t,e){super(),this.keyboard=t,this.keymap=e,this._output$=new Te}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")),Ra(t.map(e=>this.keyboard.bindMany(...e))).pipe(Ue(this.stop$),tt(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 tk=new In(ms);class CC extends ek{constructor(){super(),this.bindings={},this.skipKeyDownsOnExternalFocus=!0,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 Qe(!1);return this.bindings[t].push(e),e.pipe(Ql(),su(()=>{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"),tk;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 Qe(!1);this.bindings[n].push(r),e.push(r)}return Ra(e).pipe(su(()=>{for(let n=0;nn.includes(!0)),Ql())}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 CC.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)}}CC.externalFocusBlacklist=[HTMLInputElement,HTMLTextAreaElement,HTMLSelectElement,HTMLButtonElement];class yi{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 yi.len(yi.sub(t,e))}static norm(t){const e=yi.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 Dse={pointerLock:!1};var Ls=(()=>{return(i=Ls||(Ls={}))[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",Ls;var i})();class qm extends ek{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$=To(this._element,"wheel",{passive:!1}).pipe(Ue(this.stopped$),su(()=>this._wheel$=null),Vi(t=>t.preventDefault()),tt(t=>t.deltaY),Vf())),this._wheel$}get isPointerLocked(){return!!document.pointerLockElement}get isPointerLocked$(){return To(document,"pointerlockchange").pipe(tt(()=>this.isPointerLocked))}get state(){return this._state$.getValue()}get state$(){return this._state$.asObservable()}get multiTouchPositions$(){return this._multiTouchPositions$.asObservable()}get twoTouchGestureDelta$(){return this.state$.pipe(ks(t=>t==Ls.DRAG_TOUCH_TWO_FINGERS?this.multiTouchPositions$:tk),tt(t=>t.map(e=>({x:e.x,y:e.y}))),function Ase(){return ni((i,t)=>{let e,n=!1;i.subscribe(qn(t,r=>{const s=e;e=r,n&&t.next([s,r]),n=!0}))})}(),gn(([t,e])=>t.length>1&&e.length>1),tt(([t,e])=>({centerPointDelta:yi.sub(yi.scalarMult(e.reduce((n,r)=>yi.add(n,r),yi.O),1/e.length),yi.scalarMult(t.reduce((n,r)=>yi.add(n,r),yi.O),1/e.length)),angleDelta:yi.angle(e[1],e[0])-yi.angle(t[1],t[0]),distanceDelta:yi.dist(e[1],e[0])-yi.dist(t[1],t[0])})))}get _element(){return this.options.canvas||window}constructor(t={}){super(),this._wheel$=null,this._delta$=new Te,this._position$=new Qe(yi.O),this._multiTouchPositions$=new Qe([]),this.stopped$=new Te,this._state$=new Qe(Ls.NONE),this.options=Object.assign(Object.assign({},Dse),t),this.canvasClickListener=this.canvasClickListener.bind(this)}startInternal(){this.options.canvas&&(this.options.canvas.style.touchAction="none"),this._state$.next(Ls.NONE);const t=[Ls.DRAG,Ls.DRAG_MIDDLE_BUTTON,Ls.DRAG_RIGHT_BUTTON],e=[Ls.NONE,Ls.DRAG,Ls.DRAG_TOUCH_TWO_FINGERS],n=[],r={};To(this._element,"mousemove").pipe(Ue(this.stopped$)).subscribe(o=>{this._delta$.next({x:o.movementX,y:o.movementY})}),To(this._element,"pointermove").pipe(Ue(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})}),!qm.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{if(0===n.length)try{this.options.canvas&&this.options.canvas.setPointerCapture(o.pointerId),window.addEventListener("pointerup",s),this._element.addEventListener("pointercancel",s)}catch(a){console.error(a)}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]||Ls.NONE)}),To(this._element,"contextmenu").pipe(Ue(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 Tse{static lookAt(t,e,n){let r=Re.sub(t,e);r=0===Re.lenSq(r)?Object.assign(Object.assign({},r),{z:1}):Re.norm(r);let s=Re.cross(n,r);0===Re.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=Re.norm(r),s=Re.cross(n,r)),s=Re.norm(s);let o=Re.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 Yi{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,d=t.w*Math.sin((1-n)*s)/o+e.w*Math.sin(n*s)/o;return isNaN(a)||isNaN(l)||isNaN(c)||isNaN(d)?Yi.clone(t):{x:a,y:l,z:c,w:d}}static fromAngle(t,e){const n=e/2,r=Math.sin(n);return Object.assign(Object.assign({},Re.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],d=t[10],h=e+o+d;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>d){const p=2*Math.sqrt(1+e-o-d);return{x:.25*p,y:(n+s)/p,z:(r+l)/p,w:(c-a)/p}}if(o>d){const p=2*Math.sqrt(1+o-e-d);return{x:(n+s)/p,y:.25*p,z:(a+c)/p,w:(r-l)/p}}{const p=2*Math.sqrt(1+d-e-o);return{x:(r+l)/p,y:(a+c)/p,z:.25*p,w:(s-n)/p}}}static fromMatrix3(t){const e=t[0][0]+t[1][1]+t[2][2];let n,r,s,o;if(e>0){const a=.5/Math.sqrt(e+1);n=.25/a,r=(t[2][1]-t[1][2])*a,s=(t[0][2]-t[2][0])*a,o=(t[1][0]-t[0][1])*a}else if(t[0][0]>t[1][1]&&t[0][0]>t[2][2]){const a=2*Math.sqrt(1+t[0][0]-t[1][1]-t[2][2]);n=(t[2][1]-t[1][2])/a,r=.25*a,s=(t[0][1]+t[1][0])/a,o=(t[0][2]+t[2][0])/a}else if(t[1][1]>t[2][2]){const a=2*Math.sqrt(1+t[1][1]-t[0][0]-t[2][2]);n=(t[0][2]-t[2][0])/a,r=(t[0][1]+t[1][0])/a,s=.25*a,o=(t[1][2]+t[2][1])/a}else{const a=2*Math.sqrt(1+t[2][2]-t[0][0]-t[1][1]);n=(t[1][0]-t[0][1])/a,r=(t[0][2]+t[2][0])/a,s=(t[1][2]+t[2][1])/a,o=.25*a}return{w:n,x:r,y:s,z:o}}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),d=Math.sin(.5*e);return{w:c*a*s+d*l*o,x:d*a*s-c*l*o,y:c*l*s+d*a*o,z:c*a*o-d*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=Re.Z){return this.fromMatrix4(Tse.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 Re{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 Re.len(Re.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=Re.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,Yi.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)}}}function nk(i,t,e,n){return r=>r.pipe(tI((s,o)=>{var a;return{targetValue:o,currentValue:null!==(a=s.currentValue)&&void 0!==a?a:o,hasReachedTarget:!1}},{targetValue:null,currentValue:null,hasReachedTarget:!1}),ks(s=>i.pipe(tt(([o,a])=>{if(null===s.targetValue||null===s.currentValue)return s.currentValue;if(s.hasReachedTarget)return;const l=1-Math.exp(-a/t),c=e(s.currentValue,s.targetValue,l);return s.currentValue=c,n(c,s.targetValue)?(s.hasReachedTarget=!0,s.targetValue):c}))),tt(s=>void 0!==s?s:null),gn(s=>null!==s))}ps(738);class kse extends Kh{get avgReport(){return this._avgReport}get peakReport(){return this._peakReport}constructor(t=60,e=15){super(),this.maxSamples=t,this.maxRows=e,this.tickOrder=Number.MAX_SAFE_INTEGER,this.sampleIndex=0,this.collectedData=new Map,this._avgReport={totalTime:0,entries:[]},this._peakReport={totalTime:0,entries:[]}}onSpawned(t){super.onSpawned(t),this.sampleIndex=0;const e=()=>(typeof performance>"u"?Date:performance).now();this.world.tickForwardTo$.pipe(Ue(this.onRemoved$)).subscribe(n=>{n!==this&&(this.collectedData.has(n)?this.collectedData.get(n).push([this.sampleIndex,e(),0]):this.collectedData.set(n,[[this.sampleIndex,e(),0]]))}),this.world.tickForwardedTo$.pipe(Ue(this.onRemoved$)).subscribe(n=>{if(n===this)return;const r=this.collectedData.get(n);r[r.length-1][2]=e()}),this.tick$.pipe(Ue(this.onRemoved$)).subscribe(()=>{this.sampleIndex++;const n=Array.from(this.collectedData.entries());for(const[h,p]of n){for(;p.length>0&&p[0][0]h instanceof Kh?""===h.name?h.constructor.name:h.name:"PHYSICS_WORLD"===h?"Physics simulation":h,s=h=>{let p=0,m=0;for(;mh.length-m+1){m--;break}p+=h[h.length-m-1][1]}return m>1&&(h=h.slice(0,h.length-m)).push([`Rest (${m})`,p]),h};let o=0,a=Array.from(this.collectedData.entries()).map(([h,p])=>{const m=p.reduce((g,[b,v,y])=>g+y-v,0)/this.maxSamples;return o+=m,[r(h),m]}).sort((h,p)=>p[1]-h[1]);a=s(a),this._avgReport={totalTime:o,entries:a};let l=new Map,c=Array.from(this.collectedData.entries()).map(([h,p])=>{let m=0;for(const[g,b,v]of p){const y=v-b;m=Math.max(m,y),l.set(g,y+(l.get(g)||0))}return[r(h),m]}).sort((h,p)=>p[1]-h[1]);c=s(c);let d=Array.from(l.values()).reduce((h,p)=>Math.max(h,p),0);this._peakReport={totalTime:d,entries:c}})}onRemoved(){super.onRemoved(),this.collectedData=new Map,this._avgReport={totalTime:0,entries:[]},this._peakReport={totalTime:0,entries:[]}}}var Xm=function(i,t,e,n){return new(e||(e=Promise))(function(s,o){function a(d){try{c(n.next(d))}catch(h){o(h)}}function l(d){try{c(n.throw(d))}catch(h){o(h)}}function c(d){d.done?s(d.value):function r(s){return s instanceof e?s:new e(function(o){o(s)})}(d.value).then(a,l)}c((n=n.apply(i,t||[])).next())})};class bl{static get documentWorlds(){return[...bl._documentWorlds]}constructor(t,e){this.visualScene=t,this.physicsWorld=e,this.worldClock=new jH(!1),this.keyboardInput=new CC,this.name="w0x"+(bl.default_name_counter++).toString(16),this.children=[],this.tickListeners=[],this.tickStarted$=new Te,this.tickForwardTo$=new Te,this.tickForwardedTo$=new Te,this.paused$=new Te,this.disposed$=new Te,this.keyboardInput.start(),window.ggstatic?this.registerConsoleCommands(window.ggstatic):(this.onGgStaticInitialized=this.onGgStaticInitialized.bind(this),window.addEventListener("ggstatic_added",this.onGgStaticInitialized)),this.worldClock.paused$.subscribe(this.paused$),bl._documentWorlds.push(this),bl.worldCreated$.next(this)}init(){return Xm(this,void 0,void 0,function*(){yield Promise.all([this.physicsWorld.init(),this.visualScene.init()]);const t=(e,n,r)=>{e.active&&(this.tickForwardTo$.next(e),e.tick$.next([n,r]),this.tickForwardedTo$.next(e))};this.worldClock.tick$.subscribe(([e,n])=>{this.tickStarted$.next();let r=0;for(;r=oc.PHYSICS_SIMULATION);r++)t(this.tickListeners[r],e,n);for(this.tickForwardTo$.next("PHYSICS_WORLD"),this.physicsWorld.simulate(n),this.tickForwardedTo$.next("PHYSICS_WORLD");re.tickOrder-n.tickOrder),t.onSpawned(this))}removeEntity(t,e=!1){if(t.world){if(t.world!==this)throw new Error("Entity is not a part of this world");this.children.splice(this.children.findIndex(n=>n===t),1),this.tickListeners.splice(this.tickListeners.findIndex(n=>n===t),1),t.onRemoved()}e&&t.dispose()}onGgStaticInitialized(){window.removeEventListener("ggstatic_added",this.onGgStaticInitialized),this.registerConsoleCommands(window.ggstatic)}registerConsoleCommands(t){t.registerConsoleCommand(this,"timescale",(...e)=>Xm(this,void 0,void 0,function*(){return isNaN(+e[0])||(this.worldClock.timeScale=+e[0]),this.worldClock.timeScale.toString()}),"args: [ float? ]; Get current time scale of selected world clock or set it. Default value is 1.0 (no time scale applied)"),t.registerConsoleCommand(this,"fps_limit",(...e)=>Xm(this,void 0,void 0,function*(){return isNaN(+e[0])||(this.worldClock.tickRateLimit=+e[0]),this.worldClock.tickRateLimit.toString()}),"args: [ int? ]; Get current tick rate limit of selected world clock or set it. 0 means no limit applied"),t.registerConsoleCommand(this,"renderers",()=>Xm(this,void 0,void 0,function*(){return this.children.filter(e=>e instanceof QR).map(e=>e.name).join("\n")}),"no args; Print all renderers in selected world"),t.registerConsoleCommand(this,"debug_view",(...e)=>Xm(this,void 0,void 0,function*(){let r,n="toggle";for(let o of e)["1","0"].includes(o)?n="1"===o:r=o;let s=this.children.find(o=>o instanceof QR&&(!r||o.name===r));if(s)return s.physicsDebugViewActive="toggle"===n?!s.physicsDebugViewActive:n,s.physicsDebugViewActive?"1":"0";throw r?new Error(`Renderer with name "${r}" not found`):new Error("No renderer found")}),'args: [ 0|1?, string? ]; Turn on/off physics debug view, skip first argument to toggle value. Second argument expects renderer name, if not provided first renderer will be picked. Use "renderers" to get list of renderers in the world'),t.registerConsoleCommand(this,"performance",(...e)=>Xm(this,void 0,void 0,function*(){let n="avg",r=20;for(let d of e)["avg","peak"].includes(d)?n=d:isNaN(+d)||(r=+d);const s=new kse(r,250);this.addEntity(s),yield function Ise(i,t){const e="object"==typeof t;return new Promise((n,r)=>{let o,s=!1;i.subscribe({next:a=>{o=a,s=!0},error:r,complete:()=>{s?n(o):e?n(t.defaultValue):r(new fm)}})})}(this.worldClock.tick$.pipe(Oi(r)));const o="avg"===n?s.avgReport:s.peakReport;this.removeEntity(s);const a=o.entries.map(([d,h])=>`${d}:`+new Array(Math.max(0,26-d.length)).join(" ")+`${h.toFixed(2)} ms`+("avg"===n?` (${(100*h/o.totalTime).toFixed(2)}%)`:""));let l="lightgreen";o.totalTime>12&&(l=o.totalTime<16?"yellow":"red");const c=("avg"===n?"Average":"Peak")+" Frame time";return a.unshift(c+":"+new Array(Math.max(0,26-c.length)).join(" ")+`${o.totalTime.toFixed(2)} ms`),a.unshift(`Performance report (${r} samples)`),a.join("\n")}),'args: [ int?, avg|peak? ]; Measure how much time was spent per entity in world. Arguments are samples amount (20 by default) and "peak" or "avg" choice, both arguments are optional. "avg" report sorts entities by average time consumed, "peak" records highest value for each entity')}}bl.default_name_counter=0,bl._documentWorlds=[],bl.worldCreated$=new Te;class Lse extends Mse{}class XH extends Sse{constructor(){super(...arguments),this._world=null}get world(){return this._world}}class ea extends XH{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}constructor(t){super(),this.tickOrder=oc.OBJECTS_BINDING,this._position=Re.O,this._rotation=Yi.O,this.object3D=null,this.objectBody=null,t.objectBody&&(this.objectBody=t.objectBody,this.name=this.objectBody.name,this.addComponents(this.objectBody)),t.object3D&&(this.object3D=t.object3D,t.objectBody||(this._position=this.object3D.position,this._rotation=this.object3D.rotation,this.name=this.object3D.name),this.addComponents(this.object3D)),this.objectBody&&(this.tick$.subscribe(()=>{this.runTransformBinding(this.objectBody,this.object3D)}),this.runTransformBinding(this.objectBody,this.object3D))}}class Km extends mb{static fromMapArray(t,e=!1){const n=new Km(t[0]);let r=n;for(let s=1;sn.map(r=>new Km(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));othis.mapGraph.getNearestDummy(this.mapGraphNodes,this.loaderCursor$.getValue())),Ql(),Vi(r=>this._nearestDummy$.next(r))).subscribe(r=>{let o,s=new Set;if(this.options.inertia>0){o=new Set;const a=r.walkReadPreserveDepth(this.options.loadDepth+this.options.inertia);for(let l=0;lo.add(c.data)),l<=this.options.loadDepth&&a[l].forEach(c=>s.add(c.data))}else r.walkRead(this.options.loadDepth).forEach(a=>s.add(a.data)),o=s;for(const a of this.loaded.keys())o.has(a)?s.delete(a):n.includes(a)||n.push(a);for(let a of Array.from(s.keys()))e.includes(a)||e.push(a)}),this.tick$.pipe(Do(null),Ue(this._onRemoved$)).subscribe(()=>{if(n.length){for(const r of n)this.disposeChunk(r);n=[]}if(e.length)if(this._initialLoadComplete$.value&&e.length>this.options.maxNodesLoadingPerTick){let r=e.slice(0,this.options.maxNodesLoadingPerTick);e=e.slice(this.options.maxNodesLoadingPerTick),Promise.all(r.map(s=>this.loadChunk(s))).then()}else Promise.all(e.map(r=>this.loadChunk(r))).then(()=>{this._initialLoadComplete$.value||this._initialLoadComplete$.next(!0)}),e=[]})}onRemoved(){super.onRemoved(),this.loadClock&&(this.loadClock.stop(),this.loadClock=null),this.loaderCursor$.next(Re.O)}loadChunk(t){return function(i,t,e,n){return new(e||(e=Promise))(function(s,o){function a(d){try{c(n.next(d))}catch(h){o(h)}}function l(d){try{c(n.throw(d))}catch(h){o(h)}}function c(d){d.done?s(d.value):function r(s){return s instanceof e?s:new e(function(o){o(s)})}(d.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||Yi.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||Yi.O}]),[n,e]})}disposeChunk(t){this.loaded.has(t)&&(this.removeChildren(this.loaded.get(t),!0),this.loaded.delete(t))}}class Use extends QR{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 e4=function(i,t,e,n){return new(e||(e=Promise))(function(s,o){function a(d){try{c(n.next(d))}catch(h){o(h)}}function l(d){try{c(n.throw(d))}catch(h){o(h)}}function c(d){d.done?s(d.value):function r(s){return s instanceof e?s:new e(function(o){o(s)})}(d.value).then(a,l)}c((n=n.apply(i,t||[])).next())})};const t4={keymap:"wasd",cameraLinearSpeed:20,cameraMovementElasticity:0,cameraBoostMultiplier:2.5,cameraRotationSensitivity:1,cameraRotationElasticity:0,mouseOptions:{},ignoreMouseUnlessPointerLocked:!1,ignoreKeyboardUnlessPointerLocked:!1};class n4 extends Kh{get active(){return super.active}set active(t){!super.active&&t&&this.reset(),super.active=t}get spherical(){return this._spherical}set spherical(t){this._spherical.phi=Math.max(1e-6,Math.min(Math.PI-1e-6,t.phi)),this._spherical.theta=t.theta,this.resetMotion$.next()}constructor(t,e,n={}){super(),this.keyboard=t,this.camera=e,this.tickOrder=oc.INPUT_CONTROLLERS,this._spherical={phi:0,radius:1,theta:0},this.resetMotion$=new Te,this.options=Object.assign(Object.assign({},t4),n),n.mouseOptions&&(this.options.mouseOptions=Object.assign(Object.assign({},t4.mouseOptions),n.mouseOptions)),this.mouseInput=new qm(this.options.mouseOptions),this.directionsInput=new Ese(t,this.options.keymap)}reset(){this._spherical=Re.toSpherical(Re.rot({x:0,y:0,z:-1},this.camera.rotation)),this.resetMotion$.next()}onSpawned(t){const e=Object.create(null,{onSpawned:{get:()=>super.onSpawned}});return e4(this,void 0,void 0,function*(){yield e.onSpawned.call(this,t),this._spherical=Re.toSpherical(Re.rot({x:0,y:0,z:-1},this.camera.rotation));const n=["KeyE","KeyQ"];this.camera.camera.supportsFov&&n.push("KeyZ","KeyC"),n.push("ShiftLeft");let r=Ra([this.directionsInput.output$,...n.map(c=>this.keyboard.bind(c))]).pipe(Ue(this._onRemoved$),tt(([c,...d])=>{let h={direction:{},rest:[]};(!this.options.ignoreKeyboardUnlessPointerLocked||this.mouseInput.isPointerLocked)&&(h={direction:c,rest:d});let p=Object.assign({},Re.O);const[m,g,b,v,y]=h.rest;void 0!==h.direction.upDown&&(p.z=h.direction.upDown?-1:1),void 0!==h.direction.leftRight&&(p.x=h.direction.leftRight?-1:1),m!=g&&(p.y=g?-1:1);let M=0;return b!=v&&(M=b?1:-1),p=Re.norm(p),y&&(p=Re.scalarMult(p,this.options.cameraBoostMultiplier)),[p,M]}));this.options.cameraMovementElasticity>0&&(r=r.pipe(nk(this.camera.tick$,this.options.cameraMovementElasticity,([c,d],[h,p],m)=>[Re.lerp(c,h,m),p],([c,d],[h,p])=>d==p&&Re.dist(c,h)<.001)));let s=Re.O,o=0;r.subscribe(([c,d])=>{s=c,o=d});let a=qm.isTouchDevice(),l=this.mouseInput.delta$.pipe(Ue(this._onRemoved$),gn(()=>this.active&&(a||!this.options.ignoreMouseUnlessPointerLocked||this.mouseInput.isPointerLocked)));if(this.options.cameraRotationElasticity>0){const c=new Qe(this._spherical);l.subscribe(h=>{const p=c.getValue();c.next({phi:Math.max(1e-6,Math.min(Math.PI-1e-6,p.phi+h.y*this.options.cameraRotationSensitivity/1e3)),theta:p.theta-h.x*this.options.cameraRotationSensitivity/1e3,radius:1})});const d=()=>{c.pipe(Ue(this._onRemoved$),nk(this.tick$,this.options.cameraRotationElasticity,(h,p,m)=>({phi:h.phi+m*(p.phi-h.phi),theta:h.theta+m*(p.theta-h.theta),radius:1}),(h,p)=>yi.dist({x:h.phi,y:h.theta},{x:p.phi,y:p.theta})<1e-4),Ue(this.resetMotion$)).subscribe(h=>{this._spherical.theta=h.theta,this._spherical.phi=h.phi})};this.resetMotion$.pipe(Ue(this._onRemoved$)).subscribe(()=>{c.next(this._spherical),d()}),d()}else l.subscribe(c=>{this._spherical.theta-=c.x*this.options.cameraRotationSensitivity/1e3,this._spherical.phi+=c.y*this.options.cameraRotationSensitivity/1e3,this._spherical.phi=Math.max(1e-6,Math.min(Math.PI-1e-6,this._spherical.phi))});this.camera.tick$.pipe(Ue(this._onRemoved$),gn(()=>this.active)).subscribe(([c,d])=>{this.camera.camera.fov+=o,this.camera.position=Re.add(this.camera.position,Re.rot(Re.scalarMult(s,this.options.cameraLinearSpeed*d/1e3),this.camera.rotation)),this.camera.rotation=Yi.lookAt(this.camera.position,Re.add(this.camera.position,Re.fromSpherical(this._spherical)))}),this.mouseInput.start(),this.directionsInput.start()})}onRemoved(){const t=Object.create(null,{onRemoved:{get:()=>super.onRemoved}});return e4(this,void 0,void 0,function*(){yield t.onRemoved.call(this),yield this.mouseInput.stop(!0),yield this.directionsInput.stop()})}}var i4=function(i,t,e,n){return new(e||(e=Promise))(function(s,o){function a(d){try{c(n.next(d))}catch(h){o(h)}}function l(d){try{c(n.throw(d))}catch(h){o(h)}}function c(d){d.done?s(d.value):function r(s){return s instanceof e?s:new e(function(o){o(s)})}(d.value).then(a,l)}c((n=n.apply(i,t||[])).next())})};const zse={mouseOptions:{},orbiting:{sensitivityX:1,sensitivityY:1},orbitingElasticity:0,zooming:{sensitivity:1},panning:{sensitivityX:1,sensitivityY:1},dollying:{sensitivity:1}};class Hse extends Kh{get active(){return super.active}set active(t){!super.active&&t&&this.reset(),super.active=t}get spherical(){return this._spherical}set spherical(t){this._spherical.phi=Math.max(1e-6,Math.min(Math.PI-1e-6,t.phi)),this._spherical.theta=t.theta,this._spherical.radius=t.radius,this.resetMotion$.next()}constructor(t,e={}){super(),this.camera=t,this.tickOrder=oc.INPUT_CONTROLLERS,this._spherical={phi:0,radius:10,theta:0},this.target=Re.O,this.resetMotion$=new Te,this.options=Object.assign(Object.assign({},zse),e),this.mouseInput=new qm(this.options.mouseOptions)}reset(){let t=Re.dist(this.target,this.camera.position);this.target=Re.add(this.camera.position,Re.rot({x:0,y:0,z:-t},this.camera.rotation)),this._spherical=Re.toSpherical(Re.sub(this.camera.position,this.target)),this.resetMotion$.next()}onSpawned(t){const e=Object.create(null,{onSpawned:{get:()=>super.onSpawned}});return i4(this,void 0,void 0,function*(){if(yield e.onSpawned.call(this,t),this._spherical=Re.toSpherical(Re.sub(this.camera.position,this.target)),this.options.orbiting){let r=this.mouseInput.delta$.pipe(Ue(this._onRemoved$),gn(()=>this.active&&this.mouseInput.state==Ls.DRAG));if(this.options.orbitingElasticity>0){const s=new Qe(this._spherical);r.subscribe(a=>{const l=s.getValue();s.next({phi:Math.max(1e-6,Math.min(Math.PI-1e-6,l.phi-a.y*this.options.orbiting.sensitivityY/1e3)),theta:l.theta-a.x*this.options.orbiting.sensitivityX/1e3,radius:1})});const o=()=>{s.pipe(Ue(this._onRemoved$),nk(this.tick$,this.options.orbitingElasticity,(a,l,c)=>({phi:a.phi+c*(l.phi-a.phi),theta:a.theta+c*(l.theta-a.theta),radius:1}),(a,l)=>yi.dist({x:a.phi,y:a.theta},{x:l.phi,y:l.theta})<1e-4),Ue(this.resetMotion$)).subscribe(a=>{this._spherical.theta=a.theta,this._spherical.phi=a.phi})};this.resetMotion$.pipe(Ue(this._onRemoved$)).subscribe(()=>{s.next(this._spherical),o()}),o()}else r.subscribe(s=>{this._spherical.theta-=s.x*this.options.orbiting.sensitivityX/1e3,this._spherical.phi-=s.y*this.options.orbiting.sensitivityY/1e3,this._spherical.phi=Math.max(1e-6,Math.min(Math.PI-1e-6,this._spherical.phi))})}this.options.zooming&&this.mouseInput.wheel$.pipe(Ue(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=Re.fromSpherical(this._spherical),o=Re.rotAround(s,{x:-Math.sin(this._spherical.theta),y:Math.cos(this._spherical.theta),z:0},Math.PI/2),a=Re.rotAround(s,Re.norm(o),Math.PI/2);this.target=Re.add(this.target,Re.add(Re.scalarMult(o,-this.options.panning.sensitivityY*r.y/1e3),Re.scalarMult(a,this.options.panning.sensitivityX*r.x/1e3)))};this.options.panning&&this.mouseInput.delta$.pipe(Ue(this._onRemoved$),gn(()=>this.mouseInput.state==Ls.DRAG_RIGHT_BUTTON)).subscribe(r=>{n(r)}),this.options.dollying&&this.mouseInput.delta$.pipe(Ue(this._onRemoved$),gn(()=>this.mouseInput.state==Ls.DRAG_MIDDLE_BUTTON)).subscribe(r=>{this._spherical.radius*=Math.pow(.95,-this.options.dollying.sensitivity*r.y/10)}),qm.isTouchDevice()&&(this.options.dollying||this.options.panning)&&this.mouseInput.twoTouchGestureDelta$.pipe(Ue(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(Ue(this._onRemoved$),gn(()=>this.active),tt(()=>this._spherical)).subscribe(r=>{this.camera.position=Re.add(this.target,Re.fromSpherical(r)),this.camera.rotation=Yi.lookAt(this.camera.position,this.target)}),yield this.mouseInput.start()})}onRemoved(){const t=Object.create(null,{onRemoved:{get:()=>super.onRemoved}});return i4(this,void 0,void 0,function*(){yield t.onRemoved.call(this),yield this.mouseInput.stop(!0)})}}class Gse{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 sk=function(i,t,e,n){return new(e||(e=Promise))(function(s,o){function a(d){try{c(n.next(d))}catch(h){o(h)}}function l(d){try{c(n.throw(d))}catch(h){o(h)}}function c(d){d.done?s(d.value):function r(s){return s instanceof e?s:new e(function(o){o(s)})}(d.value).then(a,l)}c((n=n.apply(i,t||[])).next())})},yu=(()=>{return(i=yu||(yu={}))[i.Nothing=0]="Nothing",i[i.Files=1]="Files",i[i.Entities=2]="Entities",yu;var i})();const r4={cachingStrategy:yu.Nothing,position:Re.O,rotation:Yi.O,loadProps:!0},s4=i=>({meta:i.meta,resources:i.resources.map(({object3D:t,body:e})=>({object3D:t&&t.clone(),body:e&&e.clone()}))});class Wse{constructor(t){this.world=t,this.filesCache=new Map,this.loadResultCache=new Map}loadGgGlbFiles(t){return sk(this,arguments,void 0,function*(e,n=!1){if(n&&this.filesCache.has(e))return this.filesCache.get(e);const r=Promise.all([fetch(`${e}.glb`).then(o=>o.arrayBuffer()),fetch(`${e}.meta`).then(o=>o.text()).then(o=>JSON.parse(o))]);n&&this.filesCache.set(e,r);const s=yield r;return n&&this.filesCache.set(e,s),s})}loadGgGlbResources(t){return sk(this,arguments,void 0,function*(e,n=yu.Nothing){if(n==yu.Entities&&this.loadResultCache.has(e)){const c=this.loadResultCache.get(e),d=c instanceof Promise?yield c:c;return s4(d)}const[r,s]=yield this.loadGgGlbFiles(e,n==yu.Files);if(!r)throw new Error("GLB not found");const[o,a]=yield Promise.all([this.world.visualScene.loader.loadFromGgGlb(r,s),this.world.physicsWorld.loader.loadFromGgGlb(r,s)]),l={resources:[],meta:s};if(!o)return l;if(0==a.length)l.resources.push({object3D:o,body:null});else if(1==a.length)l.resources.push({object3D:o,body:a[0]});else{for(const c of a)l.resources.push({object3D:o.popChild(c.name),body:c});o.isEmpty()||l.resources.push({object3D:o,body:null})}return n==yu.Entities&&this.loadResultCache.set(e,s4(l)),l})}loadGgGlb(t){return sk(this,arguments,void 0,function*(e,n=r4){const r=Object.assign(Object.assign({},r4),n),{resources:s,meta:o}=yield this.loadGgGlbResources(e,r.cachingStrategy),a={entities:s.map(l=>new ea({object3D:l.object3D,objectBody:l.body})),meta:o};return r.loadProps&&(a.props=yield Promise.all(o.dummies.filter(l=>l.is_prop||l.is_scene).map(l=>this.loadGgGlb(l.is_prop?(r.propsPath||e.substring(0,e.lastIndexOf("/")+1))+l.prop_id:l.scene_id,{loadProps:!!l.is_scene,position:Re.add(Re.rot(l.position,r.rotation),r.position),rotation:Yi.combineRotations(l.rotation,r.rotation)})))),a.entities.forEach(l=>{l.position=Re.add(Re.rot(Re.clone(l.position),r.rotation),r.position),l.rotation=Yi.mult(Yi.clone(l.rotation),r.rotation)}),a})}}class ok extends bl{constructor(t,e){super(t,e),this.visualScene=t,this.physicsWorld=e,this.loader=new Wse(this)}addPrimitiveRigidBody(t,e=Re.O,n=Yi.O,r={}){const s=new ea({object3D:this.visualScene.factory.createPrimitive(t.shape,r),objectBody:this.physicsWorld.factory.createRigidBody(t)});return s.position=e,s.rotation=n,this.addEntity(s),s}addRenderer(t,e,n){const r=new Use(this.visualScene.createRenderer(t,e,n));return this.addEntity(r),r}registerConsoleCommands(t){super.registerConsoleCommands(t),t.registerConsoleCommand(this,"gravity",(...e)=>function(i,t,e,n){return new(e||(e=Promise))(function(s,o){function a(d){try{c(n.next(d))}catch(h){o(h)}}function l(d){try{c(n.throw(d))}catch(h){o(h)}}function c(d){d.done?s(d.value):function r(s){return s instanceof e?s:new e(function(o){o(s)})}(d.value).then(a,l)}c((n=n.apply(i,t||[])).next())})}(this,void 0,void 0,function*(){if(1==e.length&&(e=["0","0",""+-+e[0]]),e.length>0){if(isNaN(+e[0])||isNaN(+e[1])||isNaN(+e[2]))throw new Error("Wrong arguments");this.physicsWorld.gravity={x:+e[0],y:+e[1],z:+e[2]}}return JSON.stringify(this.physicsWorld.gravity)}),'args: [ ?float, ?float, ?float ]; Get or set 3D world gravity vector. 1 argument sets vector {x: 0, y: 0, z: -value}, 3 arguments set the whole vector. Default value is "9.82" or "0 0 -9.82"')}}function o4(i,t=Gy,e){const n=OI(i,t);return function Yse(i,t){return ni((e,n)=>{const{leading:r=!0,trailing:s=!1}=t??{};let o=!1,a=null,l=null,c=!1;const d=()=>{l?.unsubscribe(),l=null,s&&(m(),c&&n.complete())},h=()=>{l=null,c&&n.complete()},p=g=>l=Mr(i(g)).subscribe(qn(n,d,h)),m=()=>{if(o){o=!1;const g=a;a=null,n.next(g),!c&&p(g)}};e.subscribe(qn(n,g=>{o=!0,a=g,(!l||l.closed)&&(r?m():p(g))},()=>{c=!0,(!(s&&o&&l)||l.closed)&&n.complete()}))})}(()=>n,e)}window.gg_version="0.0.56";const qse=0,a4=1,Xse=2,l4=1,c4=2,Qc=3,lc=0,ko=1,Ns=2,Jc=0,Zm=1,d4=2,u4=3,h4=4,Kse=5,Zh=100,Zse=101,Qse=102,Jse=103,eoe=104,toe=200,noe=201,ioe=202,roe=203,lk=204,ck=205,soe=206,ooe=207,aoe=208,loe=209,coe=210,doe=211,uoe=212,hoe=213,foe=214,poe=0,moe=1,goe=2,SC=3,_oe=4,voe=5,yoe=6,boe=7,EC=0,xoe=1,woe=2,bu=0,Moe=1,Coe=2,Soe=3,Eoe=4,Aoe=5,Doe=6,Toe=7,f4="attached",cc=301,Qh=302,AC=303,DC=304,gb=306,Bs=1e3,er=1001,_b=1002,vr=1003,uk=1004,Qm=1005,cr=1006,vb=1007,xl=1008,ed=1009,p4=1010,m4=1011,yb=1012,hk=1013,xu=1014,ta=1015,Jm=1016,fk=1017,pk=1018,eg=1020,g4=35902,_4=1021,v4=1022,Po=1023,y4=1024,b4=1025,tg=1026,ng=1027,mk=1028,TC=1029,x4=1030,gk=1031,_k=1033,IC=33776,RC=33777,kC=33778,PC=33779,vk=35840,yk=35841,bk=35842,xk=35843,wk=36196,Mk=37492,Ck=37496,Sk=37808,Ek=37809,Ak=37810,Dk=37811,Tk=37812,Ik=37813,Rk=37814,kk=37815,Pk=37816,Ok=37817,Fk=37818,Lk=37819,Nk=37820,Bk=37821,OC=36492,Uk=36494,Vk=36495,w4=36283,zk=36284,Hk=36285,$k=36286,bb=2300,xb=2301,Ooe=0,C4=1,jk=2,Loe=3201,Jh=0,Noe=1,wu="",cs="srgb",ds="srgb-linear",Yk="display-p3",LC="display-p3-linear",NC="linear",Fi="srgb",BC="rec709",UC="p3",sg=7680,Boe=512,Uoe=513,Voe=514,E4=515,zoe=516,Hoe=517,$oe=518,Goe=519,A4="300 es",td=2e3;class og{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]+Us[i>>16&255]+Us[i>>24&255]+"-"+Us[255&t]+Us[t>>8&255]+"-"+Us[t>>16&15|64]+Us[t>>24&255]+"-"+Us[63&e|128]+Us[e>>8&255]+"-"+Us[e>>16&255]+Us[e>>24&255]+Us[255&n]+Us[n>>8&255]+Us[n>>16&255]+Us[n>>24&255]).toLowerCase()}function tr(i,t,e){return Math.max(t,Math.min(e,i))}function qk(i,t){return(i%t+t)%t}function wb(i,t,e){return(1-e)*i+e*t}function ho(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 yn(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 aae_radToDeg=function nae(i){return i*ag};class xe{constructor(t=0,e=0){xe.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(tr(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 wn{constructor(t,e,n,r,s,o,a,l,c){wn.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 d=this.elements;return d[0]=t,d[1]=r,d[2]=a,d[3]=e,d[4]=s,d[5]=l,d[6]=n,d[7]=o,d[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],d=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],F=r[2],D=r[5],k=r[8];return s[0]=o*b+a*M+l*F,s[3]=o*v+a*x+l*D,s[6]=o*y+a*C+l*k,s[1]=c*b+d*M+h*F,s[4]=c*v+d*x+h*D,s[7]=c*y+d*C+h*k,s[2]=p*b+m*M+g*F,s[5]=p*v+m*x+g*D,s[8]=p*y+m*C+g*k,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],d=t[8];return e*o*d-e*a*c-n*s*d+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],d=t[8],h=d*o-a*c,p=a*l-d*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-d*n)*b,t[2]=(a*n-r*o)*b,t[3]=p*b,t[4]=(d*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(Xk.makeScale(t,e)),this}rotate(t){return this.premultiply(Xk.makeRotation(-t)),this}translate(t,e){return this.premultiply(Xk.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 Xk=new wn;function T4(i){for(let t=i.length-1;t>=0;--t)if(i[t]>=65535)return!0;return!1}function Mb(i){return document.createElementNS("http://www.w3.org/1999/xhtml",i)}function cae(){const i=Mb("canvas");return i.style.display="block",i}Int8Array,Uint8Array,Uint8ClampedArray,Int16Array,Uint16Array,Int32Array,Uint32Array,Float32Array,Float64Array;const I4={};function cg(i){i in I4||(I4[i]=!0,console.warn(i))}const R4=(new wn).set(.8224621,.177538,0,.0331941,.9668058,0,.0170827,.0723974,.9105199),k4=(new wn).set(1.2249401,-.2249404,0,-.0420569,1.0420571,0,-.0196376,-.0786361,1.0982735),Cb={[ds]:{transfer:NC,primaries:BC,luminanceCoefficients:[.2126,.7152,.0722],toReference:i=>i,fromReference:i=>i},[cs]:{transfer:Fi,primaries:BC,luminanceCoefficients:[.2126,.7152,.0722],toReference:i=>i.convertSRGBToLinear(),fromReference:i=>i.convertLinearToSRGB()},[LC]:{transfer:NC,primaries:UC,luminanceCoefficients:[.2289,.6917,.0793],toReference:i=>i.applyMatrix3(k4),fromReference:i=>i.applyMatrix3(R4)},[Yk]:{transfer:Fi,primaries:UC,luminanceCoefficients:[.2289,.6917,.0793],toReference:i=>i.convertSRGBToLinear().applyMatrix3(k4),fromReference:i=>i.applyMatrix3(R4).convertLinearToSRGB()}},uae=new Set([ds,LC]),ei={enabled:!0,_workingColorSpace:ds,get workingColorSpace(){return this._workingColorSpace},set workingColorSpace(i){if(!uae.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,Cb[e].fromReference)((0,Cb[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 Cb[i].primaries},getTransfer:function(i){return i===wu?NC:Cb[i].transfer},getLuminanceCoefficients:function(i,t=this._workingColorSpace){return i.fromArray(Cb[t].luminanceCoefficients)}};function dg(i){return i<.04045?.0773993808*i:Math.pow(.9478672986*i+.0521327014,2.4)}function Kk(i){return i<.0031308?12.92*i:1.055*Math.pow(i,.41666)-.055}let ug;class hae{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===ug&&(ug=Mb("canvas")),ug.width=t.width,ug.height=t.height;const n=ug.getContext("2d");t instanceof ImageData?n.putImageData(t,0,0):n.drawImage(t,0,0,t.width,t.height),e=ug}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=Mb("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 og{constructor(e=i.DEFAULT_IMAGE,n=i.DEFAULT_MAPPING,r=er,s=er,o=cr,a=xl,l=Po,c=ed,d=i.DEFAULT_ANISOTROPY,h=wu){super(),this.isTexture=!0,Object.defineProperty(this,"id",{value:pae++}),this.uuid=na(),this.name="",this.source=new hg(e),this.mipmaps=[],this.mapping=n,this.channel=0,this.wrapS=r,this.wrapT=s,this.magFilter=o,this.minFilter=a,this.anisotropy=d,this.format=l,this.internalFormat=null,this.type=c,this.offset=new xe(0,0),this.repeat=new xe(1,1),this.center=new xe(0,0),this.rotation=0,this.matrixAutoUpdate=!0,this.matrix=new wn,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 Bs:e.x=e.x-Math.floor(e.x);break;case er:e.x=e.x<0?0:1;break;case _b: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 Bs:e.y=e.y-Math.floor(e.y);break;case er:e.y=e.y<0?0:1;break;case _b: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 vi{constructor(t=0,e=0,n=0,r=1){vi.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],d=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(d-p)<.01&&Math.abs(h-b)<.01&&Math.abs(g-v)<.01){if(Math.abs(d+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,F=(y+1)/2,D=(d+p)/4,k=(h+b)/4,B=(g+v)/4;return x>C&&x>F?x<.01?(n=0,r=.707106781,s=.707106781):(n=Math.sqrt(x),r=D/n,s=k/n):C>F?C<.01?(n=.707106781,r=0,s=.707106781):(r=Math.sqrt(C),n=D/r,s=B/r):F<.01?(n=.707106781,r=.707106781,s=0):(s=Math.sqrt(F),n=k/s,r=B/s),this.set(n,r,s,e),this}let M=Math.sqrt((v-g)*(v-g)+(h-b)*(h-b)+(p-d)*(p-d));return Math.abs(M)<.001&&(M=1),this.x=(v-g)/M,this.y=(h-b)/M,this.z=(p-d)/M,this.w=Math.acos((c+m+y-1)/2),this}setFromMatrixPosition(t){const e=t.elements;return this.x=e[12],this.y=e[13],this.z=e[14],this.w=e[15],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 mae extends og{constructor(t=1,e=1,n={}){super(),this.isRenderTarget=!0,this.width=t,this.height=e,this.depth=1,this.scissor=new vi(0,0,t,e),this.scissorTest=!1,this.viewport=new vi(0,0,t,e);const r={width:t,height:e,depth:1};n=Object.assign({generateMipmaps:!1,internalFormat:null,minFilter:cr,depthBuffer:!0,stencilBuffer:!1,resolveDepthBuffer:!0,resolveStencilBuffer:!0,depthTexture:null,samples:0,count:1},n);const s=new Oo(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 F=Math.sqrt(x),D=Math.atan2(F,y*M);v=Math.sin(v*D)/F,a=Math.sin(a*D)/F}const C=a*M;if(l=l*v+p*C,c=c*v+m*C,d=d*v+g*C,h=h*v+b*C,v===1-a){const F=1/Math.sqrt(l*l+c*c+d*d+h*h);l*=F,c*=F,d*=F,h*=F}}t[e]=l,t[e+1]=c,t[e+2]=d,t[e+3]=h}static multiplyQuaternionsFlat(t,e,n,r,s,o){const a=n[r],l=n[r+1],c=n[r+2],d=n[r+3],h=s[o],p=s[o+1],m=s[o+2],g=s[o+3];return t[e]=a*g+d*h+l*m-c*p,t[e+1]=l*g+d*p+c*h-a*m,t[e+2]=c*g+d*m+a*p-l*h,t[e+3]=d*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),d=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*d*h+c*m*g,this._y=c*m*h-p*d*g,this._z=c*d*g+p*m*h,this._w=c*d*h-p*m*g;break;case"YXZ":this._x=p*d*h+c*m*g,this._y=c*m*h-p*d*g,this._z=c*d*g-p*m*h,this._w=c*d*h+p*m*g;break;case"ZXY":this._x=p*d*h-c*m*g,this._y=c*m*h+p*d*g,this._z=c*d*g+p*m*h,this._w=c*d*h-p*m*g;break;case"ZYX":this._x=p*d*h-c*m*g,this._y=c*m*h+p*d*g,this._z=c*d*g-p*m*h,this._w=c*d*h+p*m*g;break;case"YZX":this._x=p*d*h+c*m*g,this._y=c*m*h+p*d*g,this._z=c*d*g-p*m*h,this._w=c*d*h-p*m*g;break;case"XZY":this._x=p*d*h-c*m*g,this._y=c*m*h-p*d*g,this._z=c*d*g+p*m*h,this._w=c*d*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],d=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=(d-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=(d-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+d)/m}else{const m=2*Math.sqrt(1+h-n-a);this._w=(o-r)/m,this._x=(s+c)/m,this._y=(l+d)/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(tr(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,d=e._w;return this._x=n*d+o*a+r*c-s*l,this._y=r*d+o*l+s*a-n*c,this._z=s*d+o*c+n*l-r*a,this._w=o*d-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),d=Math.atan2(c,a),h=Math.sin((1-e)*d)/c,p=Math.sin(e*d)/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 O{constructor(t=0,e=0,n=0){O.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(O4.setFromEuler(t))}applyAxisAngle(t,e){return this.applyQuaternion(O4.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),d=2*(a*e-s*r),h=2*(s*n-o*e);return this.x=e+l*c+o*h-a*d,this.y=n+l*d+a*c-s*h,this.z=r+l*h+s*d-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 Jk.copy(this).projectOnVector(t),this.sub(Jk)}reflect(t){return this.sub(Jk.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(tr(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 Jk=new O,O4=new fo;class Vs{constructor(t=new O(1/0,1/0,1/0),e=new O(-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;e=this.min.x&&t.x<=this.max.x&&t.y>=this.min.y&&t.y<=this.max.y&&t.z>=this.min.z&&t.z<=this.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.x>=this.min.x&&t.min.x<=this.max.x&&t.max.y>=this.min.y&&t.min.y<=this.max.y&&t.max.z>=this.min.z&&t.min.z<=this.max.z}intersectsSphere(t){return this.clampPoint(t.center,wl),wl.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(Sb),$C.subVectors(this.max,Sb),fg.subVectors(t.a,Sb),pg.subVectors(t.b,Sb),mg.subVectors(t.c,Sb),Cu.subVectors(pg,fg),Su.subVectors(mg,pg),tf.subVectors(fg,mg);let e=[0,-Cu.z,Cu.y,0,-Su.z,Su.y,0,-tf.z,tf.y,Cu.z,0,-Cu.x,Su.z,0,-Su.x,tf.z,0,-tf.x,-Cu.y,Cu.x,0,-Su.y,Su.x,0,-tf.y,tf.x,0];return!(!eP(e,fg,pg,mg,$C)||(e=[1,0,0,0,1,0,0,0,1],!eP(e,fg,pg,mg,$C)))&&(GC.crossVectors(Cu,Su),e=[GC.x,GC.y,GC.z],eP(e,fg,pg,mg,$C))}clampPoint(t,e){return e.copy(t).clamp(this.min,this.max)}distanceToPoint(t){return this.clampPoint(t,wl).distanceTo(t)}getBoundingSphere(t){return this.isEmpty()?t.makeEmpty():(this.getCenter(t.center),t.radius=.5*this.getSize(wl).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()||(nd[0].set(this.min.x,this.min.y,this.min.z).applyMatrix4(t),nd[1].set(this.min.x,this.min.y,this.max.z).applyMatrix4(t),nd[2].set(this.min.x,this.max.y,this.min.z).applyMatrix4(t),nd[3].set(this.min.x,this.max.y,this.max.z).applyMatrix4(t),nd[4].set(this.max.x,this.min.y,this.min.z).applyMatrix4(t),nd[5].set(this.max.x,this.min.y,this.max.z).applyMatrix4(t),nd[6].set(this.max.x,this.max.y,this.min.z).applyMatrix4(t),nd[7].set(this.max.x,this.max.y,this.max.z).applyMatrix4(t),this.setFromPoints(nd)),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 nd=[new O,new O,new O,new O,new O,new O,new O,new O],wl=new O,HC=new Vs,fg=new O,pg=new O,mg=new O,Cu=new O,Su=new O,tf=new O,Sb=new O,$C=new O,GC=new O,nf=new O;function eP(i,t,e,n,r){for(let s=0,o=i.length-3;s<=o;s+=3){nf.fromArray(i,s);const a=r.x*Math.abs(nf.x)+r.y*Math.abs(nf.y)+r.z*Math.abs(nf.z),l=t.dot(nf),c=e.dot(nf),d=n.dot(nf);if(Math.max(-Math.max(l,c,d),Math.min(l,c,d))>a)return!1}return!0}const gae=new Vs,Eb=new O,tP=new O;class zs{constructor(t=new O,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):gae.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;Eb.subVectors(t,this.center);const e=Eb.lengthSq();if(e>this.radius*this.radius){const n=Math.sqrt(e),r=.5*(n-this.radius);this.center.addScaledVector(Eb,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):(tP.subVectors(t.center,this.center).setLength(t.radius),this.expandByPoint(Eb.copy(t.center).add(tP)),this.expandByPoint(Eb.copy(t.center).sub(tP))),this)}equals(t){return t.center.equals(this.center)&&t.radius===this.radius}clone(){return(new this.constructor).copy(this)}}const id=new O,nP=new O,WC=new O,Eu=new O,iP=new O,jC=new O,rP=new O;class Ab{constructor(t=new O,e=new O(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,id)),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=id.subVectors(t,this.origin).dot(this.direction);return e<0?this.origin.distanceToSquared(t):(id.copy(this.origin).addScaledVector(this.direction,e),id.distanceToSquared(t))}distanceSqToSegment(t,e,n,r){nP.copy(t).add(e).multiplyScalar(.5),WC.copy(e).sub(t).normalize(),Eu.copy(this.origin).sub(nP);const s=.5*t.distanceTo(e),o=-this.direction.dot(WC),a=Eu.dot(this.direction),l=-Eu.dot(WC),c=Eu.lengthSq(),d=Math.abs(1-o*o);let h,p,m,g;if(d>0)if(h=o*l-a,p=o*a-l,g=s*d,h>=0)if(p>=-g)if(p<=g){const b=1/d;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(nP).addScaledVector(WC,p),m}intersectSphere(t,e){id.subVectors(t.center,this.origin);const n=id.dot(this.direction),r=id.dot(id)-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,d=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),d>=0?(s=(t.min.y-p.y)*d,o=(t.max.y-p.y)*d):(s=(t.max.y-p.y)*d,o=(t.min.y-p.y)*d),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,id)}intersectTriangle(t,e,n,r,s){iP.subVectors(e,t),jC.subVectors(n,t),rP.crossVectors(iP,jC);let a,o=this.direction.dot(rP);if(o>0){if(r)return null;a=1}else{if(!(o<0))return null;a=-1,o=-o}Eu.subVectors(this.origin,t);const l=a*this.direction.dot(jC.crossVectors(Eu,jC));if(l<0)return null;const c=a*this.direction.dot(iP.cross(Eu));if(c<0||l+c>o)return null;const d=-a*Eu.dot(rP);return d<0?null:this.at(d/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 Bt{constructor(t,e,n,r,s,o,a,l,c,d,h,p,m,g,b,v){Bt.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,d,h,p,m,g,b,v)}set(t,e,n,r,s,o,a,l,c,d,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]=d,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 Bt).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/gg.setFromMatrixColumn(t,0).length(),s=1/gg.setFromMatrixColumn(t,1).length(),o=1/gg.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),d=Math.cos(s),h=Math.sin(s);if("XYZ"===t.order){const p=o*d,m=o*h,g=a*d,b=a*h;e[0]=l*d,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*d,m=l*h,g=c*d,b=c*h;e[0]=p+b*a,e[4]=g*a-m,e[8]=o*c,e[1]=o*h,e[5]=o*d,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*d,m=l*h,g=c*d,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*d,e[9]=b-p*a,e[2]=-o*c,e[6]=a,e[10]=o*l}else if("ZYX"===t.order){const p=o*d,m=o*h,g=a*d,b=a*h;e[0]=l*d,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*d,e[4]=b-p*h,e[8]=g*h+m,e[1]=h,e[5]=o*d,e[9]=-a*d,e[2]=-c*d,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*d,e[4]=-h,e[8]=c*d,e[1]=p*h+b,e[5]=o*d,e[9]=m*h-g,e[2]=g*h-m,e[6]=a*d,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(_ae,t,vae)}lookAt(t,e,n){const r=this.elements;return ia.subVectors(t,e),0===ia.lengthSq()&&(ia.z=1),ia.normalize(),Au.crossVectors(n,ia),0===Au.lengthSq()&&(1===Math.abs(n.z)?ia.x+=1e-4:ia.z+=1e-4,ia.normalize(),Au.crossVectors(n,ia)),Au.normalize(),YC.crossVectors(ia,Au),r[0]=Au.x,r[4]=YC.x,r[8]=ia.x,r[1]=Au.y,r[5]=YC.y,r[9]=ia.y,r[2]=Au.z,r[6]=YC.z,r[10]=ia.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],d=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],F=n[15],D=r[0],k=r[4],B=r[8],T=r[12],A=r[1],W=r[5],ie=r[9],ne=r[13],oe=r[2],ge=r[6],q=r[10],se=r[14],J=r[3],we=r[7],Ve=r[11],Ye=r[15];return s[0]=o*D+a*A+l*oe+c*J,s[4]=o*k+a*W+l*ge+c*we,s[8]=o*B+a*ie+l*q+c*Ve,s[12]=o*T+a*ne+l*se+c*Ye,s[1]=d*D+h*A+p*oe+m*J,s[5]=d*k+h*W+p*ge+m*we,s[9]=d*B+h*ie+p*q+m*Ve,s[13]=d*T+h*ne+p*se+m*Ye,s[2]=g*D+b*A+v*oe+y*J,s[6]=g*k+b*W+v*ge+y*we,s[10]=g*B+b*ie+v*q+y*Ve,s[14]=g*T+b*ne+v*se+y*Ye,s[3]=M*D+x*A+C*oe+F*J,s[7]=M*k+x*W+C*ge+F*we,s[11]=M*B+x*ie+C*q+F*Ve,s[15]=M*T+x*ne+C*se+F*Ye,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],d=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*d-s*l*d)+t[11]*(+e*c*h-e*a*m-s*o*h+n*o*m+s*a*d-n*c*d)+t[15]*(-r*a*d-e*l*h+e*a*p+r*o*h-n*o*p+n*l*d)}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],d=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-d*v*c-g*l*m+o*v*m+d*l*y-o*p*y,C=d*b*c-g*h*c+g*a*m-o*b*m-d*a*y+o*h*y,F=g*h*l-d*b*l-g*a*p+o*b*p+d*a*v-o*h*v,D=e*M+n*x+r*C+s*F;if(0===D)return this.set(0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0);const k=1/D;return t[0]=M*k,t[1]=(b*p*s-h*v*s-b*r*m+n*v*m+h*r*y-n*p*y)*k,t[2]=(a*v*s-b*l*s+b*r*c-n*v*c-a*r*y+n*l*y)*k,t[3]=(h*l*s-a*p*s-h*r*c+n*p*c+a*r*m-n*l*m)*k,t[4]=x*k,t[5]=(d*v*s-g*p*s+g*r*m-e*v*m-d*r*y+e*p*y)*k,t[6]=(g*l*s-o*v*s-g*r*c+e*v*c+o*r*y-e*l*y)*k,t[7]=(o*p*s-d*l*s+d*r*c-e*p*c-o*r*m+e*l*m)*k,t[8]=C*k,t[9]=(g*h*s-d*b*s-g*n*m+e*b*m+d*n*y-e*h*y)*k,t[10]=(o*b*s-g*a*s+g*n*c-e*b*c-o*n*y+e*a*y)*k,t[11]=(d*a*s-o*h*s-d*n*c+e*h*c+o*n*m-e*a*m)*k,t[12]=F*k,t[13]=(d*b*r-g*h*r+g*n*p-e*b*p-d*n*v+e*h*v)*k,t[14]=(g*a*r-o*b*r-g*n*l+e*b*l+o*n*v-e*a*v)*k,t[15]=(o*h*r-d*a*r+d*n*l-e*h*l-o*n*p+e*a*p)*k,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,d=s*a;return this.set(c*o+n,c*a-r*l,c*l+r*a,0,c*a+r*l,d*a+n,d*l-r*o,0,c*l-r*a,d*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,d=o+o,h=a+a,p=s*c,m=s*d,g=s*h,b=o*d,v=o*h,y=a*h,M=l*c,x=l*d,C=l*h,F=n.x,D=n.y,k=n.z;return r[0]=(1-(b+y))*F,r[1]=(m+C)*F,r[2]=(g-x)*F,r[3]=0,r[4]=(m-C)*D,r[5]=(1-(p+y))*D,r[6]=(v+M)*D,r[7]=0,r[8]=(g+x)*k,r[9]=(v-M)*k,r[10]=(1-(p+b))*k,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=gg.set(r[0],r[1],r[2]).length();const o=gg.set(r[4],r[5],r[6]).length(),a=gg.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],Ml.copy(this);const c=1/s,d=1/o,h=1/a;return Ml.elements[0]*=c,Ml.elements[1]*=c,Ml.elements[2]*=c,Ml.elements[4]*=d,Ml.elements[5]*=d,Ml.elements[6]*=d,Ml.elements[8]*=h,Ml.elements[9]*=h,Ml.elements[10]*=h,e.setFromRotationMatrix(Ml),n.x=s,n.y=o,n.z=a,this}makePerspective(t,e,n,r,s,o,a=td){const l=this.elements,c=2*s/(e-t),d=2*s/(n-r),h=(e+t)/(e-t),p=(n+r)/(n-r);let m,g;if(a===td)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]=d,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=td){const l=this.elements,c=1/(e-t),d=1/(n-r),h=1/(o-s),p=(e+t)*c,m=(n+r)*d;let g,b;if(a===td)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*d,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 gg=new O,Ml=new Bt,_ae=new O(0,0,0),vae=new O(1,1,1),Au=new O,YC=new O,ia=new O,F4=new Bt,L4=new fo;let rd=(()=>{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],d=s[5],h=s[9],p=s[2],m=s[6],g=s[10];switch(n){case"XYZ":this._y=Math.asin(tr(l,-1,1)),Math.abs(l)<.9999999?(this._x=Math.atan2(-h,g),this._z=Math.atan2(-a,o)):(this._x=Math.atan2(m,d),this._z=0);break;case"YXZ":this._x=Math.asin(-tr(h,-1,1)),Math.abs(h)<.9999999?(this._y=Math.atan2(l,g),this._z=Math.atan2(c,d)):(this._y=Math.atan2(-p,o),this._z=0);break;case"ZXY":this._x=Math.asin(tr(m,-1,1)),Math.abs(m)<.9999999?(this._y=Math.atan2(-p,g),this._z=Math.atan2(-a,d)):(this._y=0,this._z=Math.atan2(c,o));break;case"ZYX":this._y=Math.asin(-tr(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,d));break;case"YZX":this._z=Math.asin(tr(c,-1,1)),Math.abs(c)<.9999999?(this._x=Math.atan2(-h,d),this._y=Math.atan2(-p,o)):(this._x=0,this._y=Math.atan2(l,g));break;case"XZY":this._z=Math.asin(-tr(a,-1,1)),Math.abs(a)<.9999999?(this._x=Math.atan2(m,d),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 F4.makeRotationFromQuaternion(e),this.setFromRotationMatrix(F4,n,r)}setFromVector3(e,n=this._order){return this.set(e.x,e.y,e.z,n)}reorder(e){return L4.setFromEuler(this),this.setFromQuaternion(L4,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 sP{constructor(){this.mask=1}set(t){this.mask=(1<>>0}enable(t){this.mask|=1<{class i extends og{constructor(){super(),this.isObject3D=!0,Object.defineProperty(this,"id",{value:yae++}),this.uuid=na(),this.name="",this.type="Object3D",this.parent=null,this.children=[],this.up=i.DEFAULT_UP.clone();const e=new O,n=new rd,r=new fo,s=new O(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 Bt},normalMatrix:{value:new wn}}),this.matrix=new Bt,this.matrixWorld=new Bt,this.matrixAutoUpdate=i.DEFAULT_MATRIX_AUTO_UPDATE,this.matrixWorldAutoUpdate=i.DEFAULT_MATRIX_WORLD_AUTO_UPDATE,this.matrixWorldNeedsUpdate=!1,this.layers=new sP,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 _g.setFromAxisAngle(e,n),this.quaternion.multiply(_g),this}rotateOnWorldAxis(e,n){return _g.setFromAxisAngle(e,n),this.quaternion.premultiply(_g),this}rotateX(e){return this.rotateOnAxis(B4,e)}rotateY(e){return this.rotateOnAxis(U4,e)}rotateZ(e){return this.rotateOnAxis(V4,e)}translateOnAxis(e,n){return N4.copy(e).applyQuaternion(this.quaternion),this.position.add(N4.multiplyScalar(n)),this}translateX(e){return this.translateOnAxis(B4,e)}translateY(e){return this.translateOnAxis(U4,e)}translateZ(e){return this.translateOnAxis(V4,e)}localToWorld(e){return this.updateWorldMatrix(!0,!1),e.applyMatrix4(this.matrixWorld)}worldToLocal(e){return this.updateWorldMatrix(!0,!1),e.applyMatrix4(sd.copy(this.matrixWorld).invert())}lookAt(e,n,r){e.isVector3?qC.copy(e):qC.set(e,n,r);const s=this.parent;this.updateWorldMatrix(!0,!1),Db.setFromMatrixPosition(this.matrixWorld),this.isCamera||this.isLight?sd.lookAt(Db,qC,this.up):sd.lookAt(qC,Db,this.up),this.quaternion.setFromRotationMatrix(sd),s&&(sd.extractRotation(s.matrixWorld),_g.setFromRotationMatrix(sd),this.quaternion.premultiply(_g.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.maxInstanceCount=this._maxInstanceCount,s.maxVertexCount=this._maxVertexCount,s.maxIndexCount=this._maxIndexCount,s.geometryInitialized=this._geometryInitialized,s.geometryCount=this._geometryCount,s.matricesTexture=this._matricesTexture.toJSON(e),null!==this._colorsTexture&&(s.colorsTexture=this._colorsTexture.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 d=0,h=c.length;d0){s.children=[];for(let l=0;l0){s.animations=[];for(let l=0;l0&&(r.geometries=l),c.length>0&&(r.materials=c),d.length>0&&(r.textures=d),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 d in l){const h=l[d];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){Cl.subVectors(r,e),od.subVectors(n,e),aP.subVectors(t,e);const o=Cl.dot(Cl),a=Cl.dot(od),l=Cl.dot(aP),c=od.dot(od),d=od.dot(aP),h=o*c-a*a;if(0===h)return s.set(0,0,0),null;const p=1/h,m=(c*l-a*d)*p,g=(o*d-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,ad)&&ad.x>=0&&ad.y>=0&&ad.x+ad.y<=1}static getInterpolation(t,e,n,r,s,o,a,l){return null===this.getBarycoord(t,e,n,r,ad)?(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,ad.x),l.addScaledVector(o,ad.y),l.addScaledVector(a,ad.z),l)}static isFrontFacing(t,e,n,r){return Cl.subVectors(n,e),od.subVectors(t,e),Cl.cross(od).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 Cl.subVectors(this.c,this.b),od.subVectors(this.a,this.b),.5*Cl.cross(od).length()}getMidpoint(t){return t.addVectors(this.a,this.b).add(this.c).multiplyScalar(1/3)}getNormal(t){return La.getNormal(this.a,this.b,this.c,t)}getPlane(t){return t.setFromCoplanarPoints(this.a,this.b,this.c)}getBarycoord(t,e){return La.getBarycoord(t,this.a,this.b,this.c,e)}getInterpolation(t,e,n,r,s){return La.getInterpolation(t,this.a,this.b,this.c,e,n,r,s)}containsPoint(t){return La.containsPoint(t,this.a,this.b,this.c)}isFrontFacing(t){return La.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;yg.subVectors(r,n),bg.subVectors(s,n),lP.subVectors(t,n);const l=yg.dot(lP),c=bg.dot(lP);if(l<=0&&c<=0)return e.copy(n);cP.subVectors(t,r);const d=yg.dot(cP),h=bg.dot(cP);if(d>=0&&h<=d)return e.copy(r);const p=l*h-d*c;if(p<=0&&l>=0&&d<=0)return o=l/(l-d),e.copy(n).addScaledVector(yg,o);dP.subVectors(t,s);const m=yg.dot(dP),g=bg.dot(dP);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(bg,a);const v=d*g-m*h;if(v<=0&&h-d>=0&&m-g>=0)return H4.subVectors(s,r),a=(h-d)/(h-d+(m-g)),e.copy(r).addScaledVector(H4,a);const y=1/(v+b+p);return o=b*y,a=p*y,e.copy(n).addScaledVector(yg,o).addScaledVector(bg,a)}equals(t){return t.a.equals(this.a)&&t.b.equals(this.b)&&t.c.equals(this.c)}}const $4={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},Du={h:0,s:0,l:0},XC={h:0,s:0,l:0};function uP(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 qe{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=cs){return t=Math.floor(t),this.r=(t>>16&255)/255,this.g=(t>>8&255)/255,this.b=(255&t)/255,ei.toWorkingColorSpace(this,e),this}setRGB(t,e,n,r=ei.workingColorSpace){return this.r=t,this.g=e,this.b=n,ei.toWorkingColorSpace(this,r),this}setHSL(t,e,n,r=ei.workingColorSpace){if(t=qk(t,1),e=tr(e,0,1),n=tr(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=uP(o,s,t+1/3),this.g=uP(o,s,t),this.b=uP(o,s,t-1/3)}return ei.toWorkingColorSpace(this,r),this}setStyle(t,e=cs){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=cs){const n=$4[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=dg(t.r),this.g=dg(t.g),this.b=dg(t.b),this}copyLinearToSRGB(t){return this.r=Kk(t.r),this.g=Kk(t.g),this.b=Kk(t.b),this}convertSRGBToLinear(){return this.copySRGBToLinear(this),this}convertLinearToSRGB(){return this.copyLinearToSRGB(this),this}getHex(t=cs){return ei.fromWorkingColorSpace(Hs.copy(this),t),65536*Math.round(tr(255*Hs.r,0,255))+256*Math.round(tr(255*Hs.g,0,255))+Math.round(tr(255*Hs.b,0,255))}getHexString(t=cs){return("000000"+this.getHex(t).toString(16)).slice(-6)}getHSL(t,e=ei.workingColorSpace){ei.fromWorkingColorSpace(Hs.copy(this),e);const n=Hs.r,r=Hs.g,s=Hs.b,o=Math.max(n,r,s),a=Math.min(n,r,s);let l,c;const d=(a+o)/2;if(a===o)l=0,c=0;else{const h=o-a;switch(c=d<=.5?h/(o+a):h/(2-o-a),o){case n:l=(r-s)/h+(r0!=t>0&&this.version++,this._alphaTest=t}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.dispersion&&(n.dispersion=this.dispersion),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!==Zm&&(n.blending=this.blending),this.side!==lc&&(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!==lk&&(n.blendSrc=this.blendSrc),this.blendDst!==ck&&(n.blendDst=this.blendDst),this.blendEquation!==Zh&&(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!==SC&&(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!==sg&&(n.stencilFail=this.stencilFail),this.stencilZFail!==sg&&(n.stencilZFail=this.stencilZFail),this.stencilZPass!==sg&&(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++}onBuild(){console.warn("Material: onBuild() has been removed.")}onBeforeRender(){console.warn("Material: onBeforeRender() has been removed.")}}class qi extends Fo{constructor(t){super(),this.isMeshBasicMaterial=!0,this.type="MeshBasicMaterial",this.color=new qe(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 rd,this.combine=EC,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 yr=new O,KC=new xe;class Hi{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=ta,this.version=0}onUploadCallback(){}set needsUpdate(t){!0===t&&this.version++}get updateRange(){return cg("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],d=[];for(let h=0,p=c.length;h0&&(r[l]=d,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 d=[],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))&&(j4.copy(s).invert(),rf.copy(t.ray).applyMatrix4(j4),(null===n.boundingBox||!1!==rf.intersectsBox(n.boundingBox))&&this._computeIntersections(t,e,rf)))}_computeIntersections(t,e,n){let r;const s=this.geometry,o=this.material,a=s.index,l=s.attributes.position,c=s.attributes.uv,d=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:iS.clone(),object:i}}(i,t,e,n,wg,Mg,Cg,nS);if(d){r&&(JC.fromBufferAttribute(r,a),eS.fromBufferAttribute(r,l),tS.fromBufferAttribute(r,c),d.uv=La.getInterpolation(nS,wg,Mg,Cg,JC,eS,tS,new xe)),s&&(JC.fromBufferAttribute(s,a),eS.fromBufferAttribute(s,l),tS.fromBufferAttribute(s,c),d.uv1=La.getInterpolation(nS,wg,Mg,Cg,JC,eS,tS,new xe)),o&&(q4.fromBufferAttribute(o,a),X4.fromBufferAttribute(o,l),K4.fromBufferAttribute(o,c),d.normal=La.getInterpolation(nS,wg,Mg,Cg,q4,X4,K4,new O),d.normal.dot(n.direction)>0&&d.normal.multiplyScalar(-1));const h={a,b:l,c,normal:new O,materialIndex:0};La.getNormal(wg,Mg,Cg,h.normal),d.face=h}return d}class sf 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=[],d=[],h=[];let p=0,m=0;function g(b,v,y,M,x,C,F,D,k,B,T){const A=C/k,W=F/B,ie=C/2,ne=F/2,oe=D/2,ge=k+1,q=B+1;let se=0,J=0;const we=new O;for(let Ve=0;Ve0?1:-1,d.push(we.x,we.y,we.z),h.push(Rt/k),h.push(1-Ve/B),se+=1}for(let Ve=0;Ve0&&(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 pP extends Fr{constructor(){super(),this.isCamera=!0,this.type="Camera",this.matrixWorldInverse=new Bt,this.projectionMatrix=new Bt,this.projectionMatrixInverse=new Bt,this.coordinateSystem=td}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 Tu=new O,J4=new xe,e5=new xe;class br extends pP{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*ag*Math.atan(e),this.updateProjectionMatrix()}getFocalLength(){const t=Math.tan(.5*ef*this.fov);return.5*this.getFilmHeight()/t}getEffectiveFOV(){return 2*ag*Math.atan(Math.tan(.5*ef*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){Tu.set(-1,-1,.5).applyMatrix4(this.projectionMatrixInverse),e.set(Tu.x,Tu.y).multiplyScalar(-t/Tu.z),Tu.set(1,1,.5).applyMatrix4(this.projectionMatrixInverse),n.set(Tu.x,Tu.y).multiplyScalar(-t/Tu.z)}getViewSize(t,e){return this.getViewBounds(t,J4,e5),e.subVectors(e5,J4)}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*ef*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 Iae extends Fr{constructor(t,e,n){super(),this.type="CubeCamera",this.renderTarget=n,this.coordinateSystem=null,this.activeMipmapLevel=0;const r=new br(-90,1,t,e);r.layers=this.layers,this.add(r);const s=new br(-90,1,t,e);s.layers=this.layers,this.add(s);const o=new br(-90,1,t,e);o.layers=this.layers,this.add(o);const a=new br(-90,1,t,e);a.layers=this.layers,this.add(a);const l=new br(-90,1,t,e);l.layers=this.layers,this.add(l);const c=new br(-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===td)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,d]=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,d),t.setRenderTarget(h,p,m),t.xr.enabled=g,n.texture.needsPMREMUpdate=!0}}class sS extends Oo{constructor(t,e,n,r,s,o,a,l,c,d){super(t=void 0!==t?t:[],e=void 0!==e?e:cc,n,r,s,o,a,l,c,d),this.isCubeTexture=!0,this.flipY=!1}get images(){return this.image}set images(t){this.image=t}}class Rae extends Mu{constructor(t=1,e={}){super(t,t,e),this.isWebGLCubeRenderTarget=!0;const n={width:t,height:t,depth:1};this.texture=new sS([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:cr}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 sf(5,5,5),s=new Sl({name:"CubemapFromEquirect",uniforms:Sg(n_uniforms),vertexShader:n_vertexShader,fragmentShader:n_fragmentShader,side:ko,blending:Jc});s.uniforms.tEquirect.value=e;const o=new Mn(r,s),a=e.minFilter;return e.minFilter===xl&&(e.minFilter=cr),new Iae(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 mP=new O,kae=new O,Pae=new wn;class af{constructor(t=new O(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=mP.subVectors(n,e).cross(kae.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(mP),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||Pae.getNormalMatrix(t),r=this.coplanarPoint(mP).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 lf=new zs,oS=new O;class aS{constructor(t=new af,e=new af,n=new af,r=new af,s=new af,o=new af){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=td){const n=this.planes,r=t.elements,s=r[0],o=r[1],a=r[2],l=r[3],c=r[4],d=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+d,v+g,C+M).normalize(),n[3].setComponents(l-o,p-d,v-g,C-M).normalize(),n[4].setComponents(l-a,p-h,v-b,C-x).normalize(),e===td)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(),lf.copy(t.boundingSphere).applyMatrix4(t.matrixWorld);else{const e=t.geometry;null===e.boundingSphere&&e.computeBoundingSphere(),lf.copy(e.boundingSphere).applyMatrix4(t.matrixWorld)}return this.intersectsSphere(lf)}intersectsSprite(t){return lf.center.set(0,0,0),lf.radius=.7071067811865476,lf.applyMatrix4(t.matrixWorld),this.intersectsSphere(lf)}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,oS.y=r.normal.y>0?t.max.y:t.min.y,oS.z=r.normal.z>0?t.max.z:t.min.z,r.distanceToPoint(oS)<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 t5(){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 Oae(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.isInterleavedBufferAttribute&&(a=a.data),a.isGLBufferAttribute){const d=t.get(a);return void((!d||d.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 ) || defined( USE_BATCHING_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 ) || defined( USE_BATCHING_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\n#ifdef USE_BATCHING_COLOR\n\tvec3 batchingColor = getBatchingColor( getIndirectIndex( gl_DrawID ) );\n\tvColor.xyz *= batchingColor.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}\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}",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_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\tfloat distanceFalloff = 1.0 / max( pow( lightDistance, decayExponent ), 0.01 );\n\tif ( cutoffDistance > 0.0 ) {\n\t\tdistanceFalloff *= pow2( saturate( 1.0 - pow4( lightDistance / cutoffDistance ) ) );\n\t}\n\treturn distanceFalloff;\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_DISPERSION\n\tmaterial.dispersion = dispersion;\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\tfloat dispersion;\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.shadowIntensity, 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.shadowIntensity, 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.shadowIntensity, 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 )\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\tfor ( int i = 0; i < MORPHTARGETS_COUNT; i ++ ) {\n\t\tif ( morphTargetInfluences[ i ] != 0.0 ) objectNormal += getMorph( gl_VertexID, i, 1 ).xyz * morphTargetInfluences[ i ];\n\t}\n#endif",morphtarget_pars_vertex:"#ifdef USE_MORPHTARGETS\n\t#ifndef USE_INSTANCING_MORPH\n\t\tuniform float morphTargetBaseInfluence;\n\t\tuniform float morphTargetInfluences[ MORPHTARGETS_COUNT ];\n\t#endif\n\tuniform sampler2DArray morphTargetsTexture;\n\tuniform ivec2 morphTargetsTextureSize;\n\tvec4 getMorph( const in int vertexIndex, const in int morphTargetIndex, const in int offset ) {\n\t\tint texelIndex = vertexIndex * MORPHTARGETS_TEXTURE_STRIDE + offset;\n\t\tint y = texelIndex / morphTargetsTextureSize.x;\n\t\tint x = texelIndex - y * morphTargetsTextureSize.x;\n\t\tivec3 morphUV = ivec3( x, y, morphTargetIndex );\n\t\treturn texelFetch( morphTargetsTexture, morphUV, 0 );\n\t}\n#endif",morphtarget_vertex:"#ifdef USE_MORPHTARGETS\n\ttransformed *= morphTargetBaseInfluence;\n\tfor ( int i = 0; i < MORPHTARGETS_COUNT; i ++ ) {\n\t\tif ( morphTargetInfluences[ i ] != 0.0 ) transformed += getMorph( gl_VertexID, i, 0 ).xyz * morphTargetInfluences[ i ];\n\t}\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.;const float ShiftRight8 = 1. / 256.;\nconst float Inv255 = 1. / 255.;\nconst vec4 PackFactors = vec4( 1.0, 256.0, 256.0 * 256.0, 256.0 * 256.0 * 256.0 );\nconst vec2 UnpackFactors2 = vec2( UnpackDownscale, 1.0 / PackFactors.g );\nconst vec3 UnpackFactors3 = vec3( UnpackDownscale / PackFactors.rg, 1.0 / PackFactors.b );\nconst vec4 UnpackFactors4 = vec4( UnpackDownscale / PackFactors.rgb, 1.0 / PackFactors.a );\nvec4 packDepthToRGBA( const in float v ) {\n\tif( v <= 0.0 )\n\t\treturn vec4( 0., 0., 0., 0. );\n\tif( v >= 1.0 )\n\t\treturn vec4( 1., 1., 1., 1. );\n\tfloat vuf;\n\tfloat af = modf( v * PackFactors.a, vuf );\n\tfloat bf = modf( vuf * ShiftRight8, vuf );\n\tfloat gf = modf( vuf * ShiftRight8, vuf );\n\treturn vec4( vuf * Inv255, gf * PackUpscale, bf * PackUpscale, af );\n}\nvec3 packDepthToRGB( const in float v ) {\n\tif( v <= 0.0 )\n\t\treturn vec3( 0., 0., 0. );\n\tif( v >= 1.0 )\n\t\treturn vec3( 1., 1., 1. );\n\tfloat vuf;\n\tfloat bf = modf( v * PackFactors.b, vuf );\n\tfloat gf = modf( vuf * ShiftRight8, vuf );\n\treturn vec3( vuf * Inv255, gf * PackUpscale, bf );\n}\nvec2 packDepthToRG( const in float v ) {\n\tif( v <= 0.0 )\n\t\treturn vec2( 0., 0. );\n\tif( v >= 1.0 )\n\t\treturn vec2( 1., 1. );\n\tfloat vuf;\n\tfloat gf = modf( v * 256., vuf );\n\treturn vec2( vuf * Inv255, gf );\n}\nfloat unpackRGBAToDepth( const in vec4 v ) {\n\treturn dot( v, UnpackFactors4 );\n}\nfloat unpackRGBToDepth( const in vec3 v ) {\n\treturn dot( v, UnpackFactors3 );\n}\nfloat unpackRGToDepth( const in vec2 v ) {\n\treturn v.r * UnpackFactors2.r + v.g * UnpackFactors2.g;\n}\nvec4 pack2HalfToRGBA( const in 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( const in 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 shadowIntensity;\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 shadowIntensity;\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 shadowIntensity;\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 shadowIntensity, 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 mix( 1.0, shadow, shadowIntensity );\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 shadowIntensity, 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 mix( 1.0, shadow, shadowIntensity );\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 shadowIntensity;\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 shadowIntensity;\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 shadowIntensity;\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.shadowIntensity, 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.shadowIntensity, 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.shadowIntensity, 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\tconst float StartCompression = 0.8 - 0.04;\n\tconst float 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, vec3( newPeak ), 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.dispersion, 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 dispersion, const in float ior, const in float thickness,\n\t\tconst in vec3 attenuationColor, const in float attenuationDistance ) {\n\t\tvec4 transmittedLight;\n\t\tvec3 transmittance;\n\t\t#ifdef USE_DISPERSION\n\t\t\tfloat halfSpread = ( ior - 1.0 ) * 0.025 * dispersion;\n\t\t\tvec3 iors = vec3( ior - halfSpread, ior, ior + halfSpread );\n\t\t\tfor ( int i = 0; i < 3; i ++ ) {\n\t\t\t\tvec3 transmissionRay = getVolumeTransmissionRay( n, v, thickness, iors[ i ], modelMatrix );\n\t\t\t\tvec3 refractedRayExit = position + transmissionRay;\n\t\t\n\t\t\t\tvec4 ndcPos = projMatrix * viewMatrix * vec4( refractedRayExit, 1.0 );\n\t\t\t\tvec2 refractionCoords = ndcPos.xy / ndcPos.w;\n\t\t\t\trefractionCoords += 1.0;\n\t\t\t\trefractionCoords /= 2.0;\n\t\t\n\t\t\t\tvec4 transmissionSample = getTransmissionSample( refractionCoords, roughness, iors[ i ] );\n\t\t\t\ttransmittedLight[ i ] = transmissionSample[ i ];\n\t\t\t\ttransmittedLight.a += transmissionSample.a;\n\t\t\t\ttransmittance[ i ] = diffuseColor[ i ] * volumeAttenuation( length( transmissionRay ), attenuationColor, attenuationDistance )[ i ];\n\t\t\t}\n\t\t\ttransmittedLight.a /= 3.0;\n\t\t\n\t\t#else\n\t\t\n\t\t\tvec3 transmissionRay = getVolumeTransmissionRay( n, v, thickness, ior, modelMatrix );\n\t\t\tvec3 refractedRayExit = position + transmissionRay;\n\t\t\tvec4 ndcPos = projMatrix * viewMatrix * vec4( refractedRayExit, 1.0 );\n\t\t\tvec2 refractionCoords = ndcPos.xy / ndcPos.w;\n\t\t\trefractionCoords += 1.0;\n\t\t\trefractionCoords /= 2.0;\n\t\t\ttransmittedLight = getTransmissionSample( refractionCoords, roughness, ior );\n\t\t\ttransmittance = diffuseColor * volumeAttenuation( length( transmissionRay ), attenuationColor, attenuationDistance );\n\t\t\n\t\t#endif\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#elif DEPTH_PACKING == 3202\n\t\tgl_FragColor = vec4( packDepthToRGB( fragCoordZ ), 1.0 );\n\t#elif DEPTH_PACKING == 3203\n\t\tgl_FragColor = vec4( packDepthToRG( fragCoordZ ), 0.0, 1.0 );\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_DISPERSION\n\tuniform float dispersion;\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}"},Je={common:{diffuse:{value:new qe(16777215)},opacity:{value:1},map:{value:null},mapTransform:{value:new wn},alphaMap:{value:null},alphaMapTransform:{value:new wn},alphaTest:{value:0}},specularmap:{specularMap:{value:null},specularMapTransform:{value:new wn}},envmap:{envMap:{value:null},envMapRotation:{value:new wn},flipEnvMap:{value:-1},reflectivity:{value:1},ior:{value:1.5},refractionRatio:{value:.98}},aomap:{aoMap:{value:null},aoMapIntensity:{value:1},aoMapTransform:{value:new wn}},lightmap:{lightMap:{value:null},lightMapIntensity:{value:1},lightMapTransform:{value:new wn}},bumpmap:{bumpMap:{value:null},bumpMapTransform:{value:new wn},bumpScale:{value:1}},normalmap:{normalMap:{value:null},normalMapTransform:{value:new wn},normalScale:{value:new xe(1,1)}},displacementmap:{displacementMap:{value:null},displacementMapTransform:{value:new wn},displacementScale:{value:1},displacementBias:{value:0}},emissivemap:{emissiveMap:{value:null},emissiveMapTransform:{value:new wn}},metalnessmap:{metalnessMap:{value:null},metalnessMapTransform:{value:new wn}},roughnessmap:{roughnessMap:{value:null},roughnessMapTransform:{value:new wn}},gradientmap:{gradientMap:{value:null}},fog:{fogDensity:{value:25e-5},fogNear:{value:1},fogFar:{value:2e3},fogColor:{value:new qe(16777215)}},lights:{ambientLightColor:{value:[]},lightProbe:{value:[]},directionalLights:{value:[],properties:{direction:{},color:{}}},directionalLightShadows:{value:[],properties:{shadowIntensity:1,shadowBias:{},shadowNormalBias:{},shadowRadius:{},shadowMapSize:{}}},directionalShadowMap:{value:[]},directionalShadowMatrix:{value:[]},spotLights:{value:[],properties:{color:{},position:{},direction:{},distance:{},coneCos:{},penumbraCos:{},decay:{}}},spotLightShadows:{value:[],properties:{shadowIntensity:1,shadowBias:{},shadowNormalBias:{},shadowRadius:{},shadowMapSize:{}}},spotLightMap:{value:[]},spotShadowMap:{value:[]},spotLightMatrix:{value:[]},pointLights:{value:[],properties:{color:{},position:{},decay:{},distance:{}}},pointLightShadows:{value:[],properties:{shadowIntensity:1,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 qe(16777215)},opacity:{value:1},size:{value:1},scale:{value:1},map:{value:null},alphaMap:{value:null},alphaMapTransform:{value:new wn},alphaTest:{value:0},uvTransform:{value:new wn}},sprite:{diffuse:{value:new qe(16777215)},opacity:{value:1},center:{value:new xe(.5,.5)},rotation:{value:0},map:{value:null},mapTransform:{value:new wn},alphaMap:{value:null},alphaMapTransform:{value:new wn},alphaTest:{value:0}}},dc={basic:{uniforms:po([Je.common,Je.specularmap,Je.envmap,Je.aomap,Je.lightmap,Je.fog]),vertexShader:Cn.meshbasic_vert,fragmentShader:Cn.meshbasic_frag},lambert:{uniforms:po([Je.common,Je.specularmap,Je.envmap,Je.aomap,Je.lightmap,Je.emissivemap,Je.bumpmap,Je.normalmap,Je.displacementmap,Je.fog,Je.lights,{emissive:{value:new qe(0)}}]),vertexShader:Cn.meshlambert_vert,fragmentShader:Cn.meshlambert_frag},phong:{uniforms:po([Je.common,Je.specularmap,Je.envmap,Je.aomap,Je.lightmap,Je.emissivemap,Je.bumpmap,Je.normalmap,Je.displacementmap,Je.fog,Je.lights,{emissive:{value:new qe(0)},specular:{value:new qe(1118481)},shininess:{value:30}}]),vertexShader:Cn.meshphong_vert,fragmentShader:Cn.meshphong_frag},standard:{uniforms:po([Je.common,Je.envmap,Je.aomap,Je.lightmap,Je.emissivemap,Je.bumpmap,Je.normalmap,Je.displacementmap,Je.roughnessmap,Je.metalnessmap,Je.fog,Je.lights,{emissive:{value:new qe(0)},roughness:{value:1},metalness:{value:0},envMapIntensity:{value:1}}]),vertexShader:Cn.meshphysical_vert,fragmentShader:Cn.meshphysical_frag},toon:{uniforms:po([Je.common,Je.aomap,Je.lightmap,Je.emissivemap,Je.bumpmap,Je.normalmap,Je.displacementmap,Je.gradientmap,Je.fog,Je.lights,{emissive:{value:new qe(0)}}]),vertexShader:Cn.meshtoon_vert,fragmentShader:Cn.meshtoon_frag},matcap:{uniforms:po([Je.common,Je.bumpmap,Je.normalmap,Je.displacementmap,Je.fog,{matcap:{value:null}}]),vertexShader:Cn.meshmatcap_vert,fragmentShader:Cn.meshmatcap_frag},points:{uniforms:po([Je.points,Je.fog]),vertexShader:Cn.points_vert,fragmentShader:Cn.points_frag},dashed:{uniforms:po([Je.common,Je.fog,{scale:{value:1},dashSize:{value:1},totalSize:{value:2}}]),vertexShader:Cn.linedashed_vert,fragmentShader:Cn.linedashed_frag},depth:{uniforms:po([Je.common,Je.displacementmap]),vertexShader:Cn.depth_vert,fragmentShader:Cn.depth_frag},normal:{uniforms:po([Je.common,Je.bumpmap,Je.normalmap,Je.displacementmap,{opacity:{value:1}}]),vertexShader:Cn.meshnormal_vert,fragmentShader:Cn.meshnormal_frag},sprite:{uniforms:po([Je.sprite,Je.fog]),vertexShader:Cn.sprite_vert,fragmentShader:Cn.sprite_frag},background:{uniforms:{uvTransform:{value:new wn},t2D:{value:null},backgroundIntensity:{value:1}},vertexShader:Cn.background_vert,fragmentShader:Cn.background_frag},backgroundCube:{uniforms:{envMap:{value:null},flipEnvMap:{value:-1},backgroundBlurriness:{value:0},backgroundIntensity:{value:1},backgroundRotation:{value:new wn}},vertexShader:Cn.backgroundCube_vert,fragmentShader:Cn.backgroundCube_frag},cube:{uniforms:{tCube:{value:null},tFlip:{value:-1},opacity:{value:1}},vertexShader:Cn.cube_vert,fragmentShader:Cn.cube_frag},equirect:{uniforms:{tEquirect:{value:null}},vertexShader:Cn.equirect_vert,fragmentShader:Cn.equirect_frag},distanceRGBA:{uniforms:po([Je.common,Je.displacementmap,{referencePosition:{value:new O},nearDistance:{value:1},farDistance:{value:1e3}}]),vertexShader:Cn.distanceRGBA_vert,fragmentShader:Cn.distanceRGBA_frag},shadow:{uniforms:po([Je.lights,Je.fog,{color:{value:new qe(0)},opacity:{value:1}}]),vertexShader:Cn.shadow_vert,fragmentShader:Cn.shadow_frag}};dc.physical={uniforms:po([dc.standard.uniforms,{clearcoat:{value:0},clearcoatMap:{value:null},clearcoatMapTransform:{value:new wn},clearcoatNormalMap:{value:null},clearcoatNormalMapTransform:{value:new wn},clearcoatNormalScale:{value:new xe(1,1)},clearcoatRoughness:{value:0},clearcoatRoughnessMap:{value:null},clearcoatRoughnessMapTransform:{value:new wn},dispersion:{value:0},iridescence:{value:0},iridescenceMap:{value:null},iridescenceMapTransform:{value:new wn},iridescenceIOR:{value:1.3},iridescenceThicknessMinimum:{value:100},iridescenceThicknessMaximum:{value:400},iridescenceThicknessMap:{value:null},iridescenceThicknessMapTransform:{value:new wn},sheen:{value:0},sheenColor:{value:new qe(0)},sheenColorMap:{value:null},sheenColorMapTransform:{value:new wn},sheenRoughness:{value:1},sheenRoughnessMap:{value:null},sheenRoughnessMapTransform:{value:new wn},transmission:{value:0},transmissionMap:{value:null},transmissionMapTransform:{value:new wn},transmissionSamplerSize:{value:new xe},transmissionSamplerMap:{value:null},thickness:{value:0},thicknessMap:{value:null},thicknessMapTransform:{value:new wn},attenuationDistance:{value:0},attenuationColor:{value:new qe(0)},specularColor:{value:new qe(1,1,1)},specularColorMap:{value:null},specularColorMapTransform:{value:new wn},specularIntensity:{value:1},specularIntensityMap:{value:null},specularIntensityMapTransform:{value:new wn},anisotropyVector:{value:new xe},anisotropyMap:{value:null},anisotropyMapTransform:{value:new wn}}]),vertexShader:Cn.meshphysical_vert,fragmentShader:Cn.meshphysical_frag};const lS={r:0,b:0,g:0},cf=new rd,Oce=new Bt;function Fce(i,t,e,n,r,s,o){const a=new qe(0);let c,d,l=!0===s?0:1,h=null,p=0,m=null;function g(M){let x=!0===M.isScene?M.background:null;return x&&x.isTexture&&(x=(M.backgroundBlurriness>0?e:t).get(x)),x}function y(M,x){M.getRGB(lS,Z4(i)),n.buffers.color.setClear(lS.r,lS.g,lS.b,x,o)}return{getClearColor:function(){return a},setClearColor:function(M,x=1){a.set(M),l=x,y(a,l)},getClearAlpha:function(){return l},setClearAlpha:function(M){l=M,y(a,l)},render:function b(M){let x=!1;const C=g(M);null===C?y(a,l):C&&C.isColor&&(y(C,1),x=!0);const F=i.xr.getEnvironmentBlendMode();"additive"===F?n.buffers.color.setClear(0,0,0,1,o):"alpha-blend"===F&&n.buffers.color.setClear(0,0,0,0,o),(i.autoClear||x)&&(n.buffers.depth.setTest(!0),n.buffers.depth.setMask(!0),n.buffers.color.setMask(!0),i.clear(i.autoClearColor,i.autoClearDepth,i.autoClearStencil))},addToRenderList:function v(M,x){const C=g(x);C&&(C.isCubeTexture||C.mapping===gb)?(void 0===d&&(d=new Mn(new sf(1,1,1),new Sl({name:"BackgroundCubeMaterial",uniforms:Sg(dc.backgroundCube.uniforms),vertexShader:dc.backgroundCube.vertexShader,fragmentShader:dc.backgroundCube.fragmentShader,side:ko,depthTest:!1,depthWrite:!1,fog:!1})),d.geometry.deleteAttribute("normal"),d.geometry.deleteAttribute("uv"),d.onBeforeRender=function(F,D,k){this.matrixWorld.copyPosition(k.matrixWorld)},Object.defineProperty(d.material,"envMap",{get:function(){return this.uniforms.envMap.value}}),r.update(d)),cf.copy(x.backgroundRotation),cf.x*=-1,cf.y*=-1,cf.z*=-1,C.isCubeTexture&&!1===C.isRenderTargetTexture&&(cf.y*=-1,cf.z*=-1),d.material.uniforms.envMap.value=C,d.material.uniforms.flipEnvMap.value=C.isCubeTexture&&!1===C.isRenderTargetTexture?-1:1,d.material.uniforms.backgroundBlurriness.value=x.backgroundBlurriness,d.material.uniforms.backgroundIntensity.value=x.backgroundIntensity,d.material.uniforms.backgroundRotation.value.setFromMatrix4(Oce.makeRotationFromEuler(cf)),d.material.toneMapped=ei.getTransfer(C.colorSpace)!==Fi,(h!==C||p!==C.version||m!==i.toneMapping)&&(d.material.needsUpdate=!0,h=C,p=C.version,m=i.toneMapping),d.layers.enableAll(),M.unshift(d,d.geometry,d.material,0,0,null)):C&&C.isTexture&&(void 0===c&&(c=new Mn(new Iu(2,2),new Sl({name:"BackgroundMaterial",uniforms:Sg(dc.background.uniforms),vertexShader:dc.background.vertexShader,fragmentShader:dc.background.fragmentShader,side:lc,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=C,c.material.uniforms.backgroundIntensity.value=x.backgroundIntensity,c.material.toneMapped=ei.getTransfer(C.colorSpace)!==Fi,!0===C.matrixAutoUpdate&&C.updateMatrix(),c.material.uniforms.uvTransform.value.copy(C.matrix),(h!==C||p!==C.version||m!==i.toneMapping)&&(c.material.needsUpdate=!0,h=C,p=C.version,m=i.toneMapping),c.layers.enableAll(),M.unshift(c,c.geometry,c.material,0,0,null))}}}function Lce(i,t){const e=i.getParameter(i.MAX_VERTEX_ATTRIBS),n={},r=p(null);let s=r,o=!1;function c(A){return i.bindVertexArray(A)}function d(A){return i.deleteVertexArray(A)}function p(A){const W=[],ie=[],ne=[];for(let oe=0;oe=0){const Ve=oe[J];let Ye=ge[J];if(void 0===Ye&&("instanceMatrix"===J&&A.instanceMatrix&&(Ye=A.instanceMatrix),"instanceColor"===J&&A.instanceColor&&(Ye=A.instanceColor)),void 0===Ve||Ve.attribute!==Ye||Ye&&Ve.data!==Ye.data)return!0;q++}return s.attributesNum!==q||s.index!==ne}(A,ne,ie,oe),ge&&function g(A,W,ie,ne){const oe={},ge=W.attributes;let q=0;const se=ie.getAttributes();for(const J in se)if(se[J].location>=0){let Ve=ge[J];void 0===Ve&&("instanceMatrix"===J&&A.instanceMatrix&&(Ve=A.instanceMatrix),"instanceColor"===J&&A.instanceColor&&(Ve=A.instanceColor));const Ye={};Ye.attribute=Ve,Ve&&Ve.data&&(Ye.data=Ve.data),oe[J]=Ye,q++}s.attributes=oe,s.attributesNum=q,s.index=ne}(A,ne,ie,oe),null!==oe&&t.update(oe,i.ELEMENT_ARRAY_BUFFER),(ge||o)&&(o=!1,function C(A,W,ie,ne){b();const oe=ne.attributes,ge=ie.getAttributes(),q=W.defaultAttributeValues;for(const se in ge){const J=ge[se];if(J.location>=0){let we=oe[se];if(void 0===we&&("instanceMatrix"===se&&A.instanceMatrix&&(we=A.instanceMatrix),"instanceColor"===se&&A.instanceColor&&(we=A.instanceColor)),void 0!==we){const Ve=we.normalized,Ye=we.itemSize,Rt=t.get(we);if(void 0===Rt)continue;const nn=Rt.buffer,le=Rt.type,Fe=Rt.bytesPerElement,Ze=le===i.INT||le===i.UNSIGNED_INT||we.gpuType===hk;if(we.isInterleavedBufferAttribute){const Le=we.data,wt=Le.stride,Tt=we.offset;if(Le.isInstancedInterleavedBuffer){for(let St=0;St0&&i.getShaderPrecisionFormat(i.FRAGMENT_SHADER,i.HIGH_FLOAT).precision>0)return"highp";D="mediump"}return"mediump"===D&&i.getShaderPrecisionFormat(i.VERTEX_SHADER,i.MEDIUM_FLOAT).precision>0&&i.getShaderPrecisionFormat(i.FRAGMENT_SHADER,i.MEDIUM_FLOAT).precision>0?"mediump":"lowp"}let c=void 0!==e.precision?e.precision:"highp";const d=l(c);d!==c&&(console.warn("THREE.WebGLRenderer:",c,"not supported, using",d,"instead."),c=d);const h=!0===e.logarithmicDepthBuffer,p=i.getParameter(i.MAX_TEXTURE_IMAGE_UNITS),m=i.getParameter(i.MAX_VERTEX_TEXTURE_IMAGE_UNITS);return{isWebGL2:!0,getMaxAnisotropy:function s(){if(void 0!==r)return r;if(!0===t.has("EXT_texture_filter_anisotropic")){const D=t.get("EXT_texture_filter_anisotropic");r=i.getParameter(D.MAX_TEXTURE_MAX_ANISOTROPY_EXT)}else r=0;return r},getMaxPrecision:l,textureFormatReadable:function o(D){return!(D!==Po&&n.convert(D)!==i.getParameter(i.IMPLEMENTATION_COLOR_READ_FORMAT))},textureTypeReadable:function a(D){const k=D===Jm&&(t.has("EXT_color_buffer_half_float")||t.has("EXT_color_buffer_float"));return!(D!==ed&&n.convert(D)!==i.getParameter(i.IMPLEMENTATION_COLOR_READ_TYPE)&&D!==ta&&!k)},precision:c,logarithmicDepthBuffer:h,maxTextures:p,maxVertexTextures:m,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:m>0,maxSamples:i.getParameter(i.MAX_SAMPLES)}}function Uce(i){const t=this;let e=null,n=0,r=!1,s=!1;const o=new af,a=new wn,l={value:null,needsUpdate:!1};function d(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=d(g,p,x,m);for(let F=0;F!==x;++F)C[F]=e[F];y.clippingState=C,this.numIntersection=b?this.numPlanes:0,this.numPlanes+=M}}}function Vce(i){let t=new WeakMap;function e(o,a){return a===AC?o.mapping=cc:a===DC&&(o.mapping=Qh),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===AC||a===DC){if(t.has(o))return e(t.get(o).texture,o.mapping);{const l=o.image;if(l&&l.height>0){const c=new Rae(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 Rb extends pP{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,d=(this.top-this.bottom)/this.view.fullHeight/this.zoom;s+=c*this.view.offsetX,o=s+c*this.view.width,a-=d*this.view.offsetY,l=a-d*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 n5=[.125,.215,.35,.446,.526,.582],gP=new Rb,r5=new qe;let _P=null,vP=0,yP=0,bP=!1;const uf=(1+Math.sqrt(5))/2,Tg=1/uf,s5=[new O(-uf,Tg,0),new O(uf,Tg,0),new O(-Tg,0,uf),new O(Tg,0,uf),new O(0,uf,-Tg),new O(0,uf,Tg),new O(-1,1,-1),new O(1,1,-1),new O(-1,1,1),new O(1,1,1)];class o5{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){_P=this._renderer.getRenderTarget(),vP=this._renderer.getActiveCubeFace(),yP=this._renderer.getActiveMipmapLevel(),bP=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=c5(),this._compileMaterial(this._cubemapMaterial))}compileEquirectangularShader(){null===this._equirectMaterial&&(this._equirectMaterial=l5(),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=n5[o-i+4-1]:0===o&&(l=0),n.push(l);const c=1/(a-2),d=-c,h=1+c,p=[d,d,h,d,h,h,d,d,h,h,d,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 D=0;D2?0:-1;M.set([k,B,0,k+2/3,B,0,k+2/3,B+1,0,k,B,0,k+2/3,B+1,0,k,B+1,0],b*g*D),x.set(p,v*g*D),C.set([D,D,D,D,D,D],y*g*D)}const F=new hn;F.setAttribute("position",new Hi(M,b)),F.setAttribute("uv",new Hi(x,v)),F.setAttribute("faceIndex",new Hi(C,y)),t.push(F),r>4&&r--}return{lodPlanes:t,sizeLods:e,sigmas:n}}(s)),this._blurMaterial=function Hce(i,t,e){const n=new Float32Array(20),r=new O(0,1,0);return new Sl({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:Jc,depthTest:!1,depthWrite:!1})}(s,t,e)}return r}_compileMaterial(t){const e=new Mn(this._lodPlanes[0],t);this._renderer.compile(e,gP)}_sceneToCubeUV(t,e,n,r){const a=new br(90,1,e,n),l=[1,-1,1,1,1,1],c=[1,1,1,-1,-1,-1],d=this._renderer,h=d.autoClear,p=d.toneMapping;d.getClearColor(r5),d.toneMapping=bu,d.autoClear=!1;const m=new qi({name:"PMREM.Background",side:ko,depthWrite:!1,depthTest:!1}),g=new Mn(new sf,m);let b=!1;const v=t.background;v?v.isColor&&(m.color.copy(v),t.background=null,b=!0):(m.color.copy(r5),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;cS(r,M*x,y>2?x:0,x,x),d.setRenderTarget(r),b&&d.render(g,a),d.render(t,a)}g.geometry.dispose(),g.material.dispose(),d.toneMapping=p,d.autoClear=h,t.background=v}_textureToCubeUV(t,e){const n=this._renderer,r=t.mapping===cc||t.mapping===Qh;r?(null===this._cubemapMaterial&&(this._cubemapMaterial=c5()),this._cubemapMaterial.uniforms.flipEnvMap.value=!1===t.isRenderTargetTexture?-1:1):null===this._equirectMaterial&&(this._equirectMaterial=l5());const s=r?this._cubemapMaterial:this._equirectMaterial,o=new Mn(this._lodPlanes[0],s);s.uniforms.envMap.value=t;const l=this._cubeSize;cS(e,0,0,3*l,2*l),n.setRenderTarget(e),n.render(o,gP)}_applyPMREM(t){const e=this._renderer,n=e.autoClear;e.autoClear=!1;const r=this._lodPlanes.length;for(let s=1;s20&&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 k=0;k<20;++k){const B=k/b,T=Math.exp(-B*B/2);y.push(T),0===k?M+=T:kx-4?r-x+4:0),4*(this._cubeSize-C),3*C,2*C),l.setRenderTarget(e),l.render(h,gP)}}function a5(i,t,e){const n=new Mu(i,t,e);return n.texture.mapping=gb,n.texture.name="PMREM.cubeUv",n.scissorTest=!0,n}function cS(i,t,e,n,r){i.viewport.set(t,e,n,r),i.scissor.set(t,e,n,r)}function l5(){return new Sl({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:Jc,depthTest:!1,depthWrite:!1})}function c5(){return new Sl({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:Jc,depthTest:!1,depthWrite:!1})}function $ce(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===AC||l===DC,d=l===cc||l===Qh;if(c||d){let h=t.get(a);if(a.isRenderTargetTexture&&a.pmremVersion!==(void 0!==h?h.texture.pmremVersion:0))return null===e&&(e=new o5(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||d&&m&&function r(a){let l=0;for(let d=0;d<6;d++)void 0!==a[d]&&l++;return 6===l}(m)?(null===e&&(e=new o5(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 Gce(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&&cg("THREE.WebGLRenderer: "+n+" extension not supported."),r}}}function Wce(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&&(F=Math.ceil(C/t.maxTextureSize),C=t.maxTextureSize);const D=new Float32Array(C*F*4*h),k=new Qk(D,C,F,h);k.type=ta,k.needsUpdate=!0;const B=4*x;for(let A=0;A0)return i;const r=t*e;let s=g5[r];if(void 0===s&&(s=new Float32Array(r),g5[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 Lr(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 Gde(i,t){const e=function $de(i){const t=ei.getPrimaries(ei.workingColorSpace),e=ei.getPrimaries(i);let n;switch(t===e?n="":t===UC&&e===BC?n="LinearDisplayP3ToLinearSRGB":t===BC&&e===UC&&(n="LinearSRGBToLinearDisplayP3"),i){case ds:case LC:return[n,"LinearTransferOETF"];case cs:case Yk: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 Wde(i,t){let e;switch(t){case Moe:e="Linear";break;case Coe:e="Reinhard";break;case Soe:e="OptimizedCineon";break;case Eoe:e="ACESFilmic";break;case Doe:e="AgX";break;case Toe:e="Neutral";break;case Aoe:e="Custom";break;default:console.warn("THREE.WebGLProgram: Unsupported toneMapping:",t),e="Linear"}return"vec3 "+i+"( vec3 color ) { return "+e+"ToneMapping( color ); }"}const hS=new O;function kb(i){return""!==i}function C5(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 S5(i,t){return i.replace(/NUM_CLIPPING_PLANES/g,t.numClippingPlanes).replace(/UNION_CLIPPING_PLANES/g,t.numClippingPlanes-t.numClipIntersection)}const Kde=/^[ \t]*#include +<([\w\d./]+)>/gm;function MP(i){return i.replace(Kde,Qde)}const Zde=new Map;function Qde(i,t){let e=Cn[t];if(void 0===e){const n=Zde.get(t);if(void 0===n)throw new Error("Can not resolve #include <"+t+">");e=Cn[n],console.warn('THREE.WebGLRenderer: Shader chunk "%s" has been deprecated. Use "%s" instead.',t,n)}return MP(e)}const Jde=/#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 E5(i){return i.replace(Jde,eue)}function eue(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(kb).join("\n"),y.length>0&&(y+="\n")):(v=[A5(e),"#define SHADER_TYPE "+e.shaderType,"#define SHADER_NAME "+e.shaderName,g,e.extensionClipCullDistance?"#define USE_CLIP_DISTANCE":"",e.batching?"#define USE_BATCHING":"",e.batchingColor?"#define USE_BATCHING_COLOR":"",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 "+d:"",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_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.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","#ifdef USE_SKINNING","\tattribute vec4 skinIndex;","\tattribute vec4 skinWeight;","#endif","\n"].filter(kb).join("\n"),y=[A5(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 "+d:"",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.dispersion?"#define USE_DISPERSION":"",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||e.batchingColor?"#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.decodeVideoTexture?"#define DECODE_VIDEO_TEXTURE":"",e.logarithmicDepthBuffer?"#define USE_LOGDEPTHBUF":"","uniform mat4 viewMatrix;","uniform vec3 cameraPosition;","uniform bool isOrthographic;",e.toneMapping!==bu?"#define TONE_MAPPING":"",e.toneMapping!==bu?Cn.tonemapping_pars_fragment:"",e.toneMapping!==bu?Wde("toneMapping",e.toneMapping):"",e.dithering?"#define DITHERING":"",e.opaque?"#define OPAQUE":"",Cn.colorspace_pars_fragment,Gde("linearToOutputTexel",e.outputColorSpace),(ei.getLuminanceCoefficients(hS),["float luminance( const in vec3 rgb ) {",`\tconst vec3 weights = vec3( ${hS.x.toFixed(4)}, ${hS.y.toFixed(4)}, ${hS.z.toFixed(4)} );`,"\treturn dot( weights, rgb );","}"].join("\n")),e.useDepthPacking?"#define DEPTH_PACKING "+e.depthPacking:"","\n"].filter(kb).join("\n")),o=MP(o),o=C5(o,e),o=S5(o,e),a=MP(a),a=C5(a,e),a=S5(a,e),o=E5(o),a=E5(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===A4?"":"layout(location = 0) out highp vec4 pc_fragColor;",e.glslVersion===A4?"":"#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,F=w5(r,r.VERTEX_SHADER,M+v+o),D=w5(r,r.FRAGMENT_SHADER,C);function k(W){if(i.debug.checkShaderErrors){const ie=r.getProgramInfoLog(b).trim(),ne=r.getShaderInfoLog(F).trim(),oe=r.getShaderInfoLog(D).trim();let ge=!0,q=!0;if(!1===r.getProgramParameter(b,r.LINK_STATUS))if(ge=!1,"function"==typeof i.debug.onShaderError)i.debug.onShaderError(r,b,F,D);else{const se=M5(r,F,"vertex"),J=M5(r,D,"fragment");console.error("THREE.WebGLProgram: Shader Error "+r.getError()+" - VALIDATE_STATUS "+r.getProgramParameter(b,r.VALIDATE_STATUS)+"\n\nMaterial Name: "+W.name+"\nMaterial Type: "+W.type+"\n\nProgram Info Log: "+ie+"\n"+se+"\n"+J)}else""!==ie?console.warn("THREE.WebGLProgram: Program Info Log:",ie):(""===ne||""===oe)&&(q=!1);q&&(W.diagnostics={runnable:ge,programLog:ie,vertexShader:{log:ne,prefix:v},fragmentShader:{log:oe,prefix:y}})}r.deleteShader(F),r.deleteShader(D),B=new uS(r,b),T=function Xde(i,t){const e={},n=i.getProgramParameter(t,i.ACTIVE_ATTRIBUTES);for(let r=0;r0,de=T.clearcoat>0,De=T.iridescence>0,Ae=T.sheen>0,Ut=T.transmission>0,et=R&&!!T.anisotropyMap,pt=de&&!!T.clearcoatMap,bn=de&&!!T.clearcoatNormalMap,He=de&&!!T.clearcoatRoughnessMap,ft=De&&!!T.iridescenceMap,Yn=De&&!!T.iridescenceThicknessMap,cn=Ae&&!!T.sheenColorMap,yt=Ae&&!!T.sheenRoughnessMap,vn=!!T.specularMap,Pn=!!T.specularColorMap,Ki=!!T.specularIntensityMap,Z=Ut&&!!T.transmissionMap,We=Ut&&!!T.thicknessMap,Ee=!!T.alphaMap,ti=!!T.extensions;let xr=bu;T.toneMapped&&(null===Le||!0===Le.isXRRenderTarget)&&(xr=i.toneMapping);const hs={shaderID:we,shaderType:T.type,shaderName:T.name,vertexShader:nn,fragmentShader:le,defines:T.defines,customVertexShaderID:Fe,customFragmentShaderID:Ze,isRawShaderMaterial:!0===T.isRawShaderMaterial,glslVersion:T.glslVersion,precision:m,batching:Tt,batchingColor:Tt&&null!==ne._colorsTexture,instancing:wt,instancingColor:wt&&null!==ne.instanceColor,instancingMorph:wt&&null!==ne.morphTexture,supportsVertexTextures:p,outputColorSpace:null===Le?i.outputColorSpace:!0===Le.isXRRenderTarget?Le.texture.colorSpace:ds,alphaToCoverage:!!T.alphaToCoverage,map:St,matcap:!!T.matcap,envMap:N,envMapMode:N&&se.mapping,envMapCubeUVHeight:J,aoMap:Ge,lightMap:Ne,bumpMap:it,normalMap:Me,displacementMap:p&&Gt,emissiveMap:rt,normalMapObjectSpace:Me&&T.normalMapType===Noe,normalMapTangentSpace:Me&&T.normalMapType===Jh,metalnessMap:_t,roughnessMap:H,anisotropy:R,anisotropyMap:et,clearcoat:de,clearcoatMap:pt,clearcoatNormalMap:bn,clearcoatRoughnessMap:He,dispersion:T.dispersion>0,iridescence:De,iridescenceMap:ft,iridescenceThicknessMap:Yn,sheen:Ae,sheenColorMap:cn,sheenRoughnessMap:yt,specularMap:vn,specularColorMap:Pn,specularIntensityMap:Ki,transmission:Ut,transmissionMap:Z,thicknessMap:We,gradientMap:!!T.gradientMap,opaque:!1===T.transparent&&T.blending===Zm&&!1===T.alphaToCoverage,alphaMap:Ee,alphaTest:T.alphaTest>0,alphaHash:!!T.alphaHash,combine:T.combine,mapUv:St&&b(T.map.channel),aoMapUv:Ge&&b(T.aoMap.channel),lightMapUv:Ne&&b(T.lightMap.channel),bumpMapUv:it&&b(T.bumpMap.channel),normalMapUv:Me&&b(T.normalMap.channel),displacementMapUv:Gt&&b(T.displacementMap.channel),emissiveMapUv:rt&&b(T.emissiveMap.channel),metalnessMapUv:_t&&b(T.metalnessMap.channel),roughnessMapUv:H&&b(T.roughnessMap.channel),anisotropyMapUv:et&&b(T.anisotropyMap.channel),clearcoatMapUv:pt&&b(T.clearcoatMap.channel),clearcoatNormalMapUv:bn&&b(T.clearcoatNormalMap.channel),clearcoatRoughnessMapUv:He&&b(T.clearcoatRoughnessMap.channel),iridescenceMapUv:ft&&b(T.iridescenceMap.channel),iridescenceThicknessMapUv:Yn&&b(T.iridescenceThicknessMap.channel),sheenColorMapUv:cn&&b(T.sheenColorMap.channel),sheenRoughnessMapUv:yt&&b(T.sheenRoughnessMap.channel),specularMapUv:vn&&b(T.specularMap.channel),specularColorMapUv:Pn&&b(T.specularColorMap.channel),specularIntensityMapUv:Ki&&b(T.specularIntensityMap.channel),transmissionMapUv:Z&&b(T.transmissionMap.channel),thicknessMapUv:We&&b(T.thicknessMap.channel),alphaMapUv:Ee&&b(T.alphaMap.channel),vertexTangents:!!ge.attributes.tangent&&(Me||R),vertexColors:T.vertexColors,vertexAlphas:!0===T.vertexColors&&!!ge.attributes.color&&4===ge.attributes.color.itemSize,pointsUvs:!0===ne.isPoints&&!!ge.attributes.uv&&(St||Ee),fog:!!oe,useFog:!0===T.fog,fogExp2:!!oe&&oe.isFogExp2,flatShading:!0===T.flatShading,sizeAttenuation:!0===T.sizeAttenuation,logarithmicDepthBuffer:h,skinning:!0===ne.isSkinnedMesh,morphTargets:void 0!==ge.morphAttributes.position,morphNormals:void 0!==ge.morphAttributes.normal,morphColors:void 0!==ge.morphAttributes.color,morphTargetsCount:Ye,morphTextureStride:Rt,numDirLights:A.directional.length,numPointLights:A.point.length,numSpotLights:A.spot.length,numSpotLightMaps:A.spotLightMap.length,numRectAreaLights:A.rectArea.length,numHemiLights:A.hemi.length,numDirLightShadows:A.directionalShadowMap.length,numPointLightShadows:A.pointShadowMap.length,numSpotLightShadows:A.spotShadowMap.length,numSpotLightShadowsWithMaps:A.numSpotLightShadowsWithMaps,numLightProbes:A.numLightProbes,numClippingPlanes:o.numPlanes,numClipIntersection:o.numIntersection,dithering:T.dithering,shadowMapEnabled:i.shadowMap.enabled&&W.length>0,shadowMapType:i.shadowMap.type,toneMapping:xr,decodeVideoTexture:St&&!0===T.map.isVideoTexture&&ei.getTransfer(T.map.colorSpace)===Fi,premultipliedAlpha:T.premultipliedAlpha,doubleSided:T.side===Ns,flipSided:T.side===ko,useDepthPacking:T.depthPacking>=0,depthPacking:T.depthPacking||0,index0AttributeName:T.index0AttributeName,extensionClipCullDistance:ti&&!0===T.extensions.clipCullDistance&&n.has("WEBGL_clip_cull_distance"),extensionMultiDraw:(ti&&!0===T.extensions.multiDraw||Tt)&&n.has("WEBGL_multi_draw"),rendererExtensionParallelShaderCompile:n.has("KHR_parallel_shader_compile"),customProgramCacheKey:T.customProgramCacheKey()};return hs.vertexUv1s=c.has(1),hs.vertexUv2s=c.has(2),hs.vertexUv3s=c.has(3),c.clear(),hs},getProgramCacheKey:function y(T){const A=[];if(T.shaderID?A.push(T.shaderID):(A.push(T.customVertexShaderID),A.push(T.customFragmentShaderID)),void 0!==T.defines)for(const W in T.defines)A.push(W),A.push(T.defines[W]);return!1===T.isRawShaderMaterial&&(function M(T,A){T.push(A.precision),T.push(A.outputColorSpace),T.push(A.envMapMode),T.push(A.envMapCubeUVHeight),T.push(A.mapUv),T.push(A.alphaMapUv),T.push(A.lightMapUv),T.push(A.aoMapUv),T.push(A.bumpMapUv),T.push(A.normalMapUv),T.push(A.displacementMapUv),T.push(A.emissiveMapUv),T.push(A.metalnessMapUv),T.push(A.roughnessMapUv),T.push(A.anisotropyMapUv),T.push(A.clearcoatMapUv),T.push(A.clearcoatNormalMapUv),T.push(A.clearcoatRoughnessMapUv),T.push(A.iridescenceMapUv),T.push(A.iridescenceThicknessMapUv),T.push(A.sheenColorMapUv),T.push(A.sheenRoughnessMapUv),T.push(A.specularMapUv),T.push(A.specularColorMapUv),T.push(A.specularIntensityMapUv),T.push(A.transmissionMapUv),T.push(A.thicknessMapUv),T.push(A.combine),T.push(A.fogExp2),T.push(A.sizeAttenuation),T.push(A.morphTargetsCount),T.push(A.morphAttributeCount),T.push(A.numDirLights),T.push(A.numPointLights),T.push(A.numSpotLights),T.push(A.numSpotLightMaps),T.push(A.numHemiLights),T.push(A.numRectAreaLights),T.push(A.numDirLightShadows),T.push(A.numPointLightShadows),T.push(A.numSpotLightShadows),T.push(A.numSpotLightShadowsWithMaps),T.push(A.numLightProbes),T.push(A.shadowMapType),T.push(A.toneMapping),T.push(A.numClippingPlanes),T.push(A.numClipIntersection),T.push(A.depthPacking)}(A,T),function x(T,A){a.disableAll(),A.supportsVertexTextures&&a.enable(0),A.instancing&&a.enable(1),A.instancingColor&&a.enable(2),A.instancingMorph&&a.enable(3),A.matcap&&a.enable(4),A.envMap&&a.enable(5),A.normalMapObjectSpace&&a.enable(6),A.normalMapTangentSpace&&a.enable(7),A.clearcoat&&a.enable(8),A.iridescence&&a.enable(9),A.alphaTest&&a.enable(10),A.vertexColors&&a.enable(11),A.vertexAlphas&&a.enable(12),A.vertexUv1s&&a.enable(13),A.vertexUv2s&&a.enable(14),A.vertexUv3s&&a.enable(15),A.vertexTangents&&a.enable(16),A.anisotropy&&a.enable(17),A.alphaHash&&a.enable(18),A.batching&&a.enable(19),A.dispersion&&a.enable(20),A.batchingColor&&a.enable(21),T.push(a.mask),a.disableAll(),A.fog&&a.enable(0),A.useFog&&a.enable(1),A.flatShading&&a.enable(2),A.logarithmicDepthBuffer&&a.enable(3),A.skinning&&a.enable(4),A.morphTargets&&a.enable(5),A.morphNormals&&a.enable(6),A.morphColors&&a.enable(7),A.premultipliedAlpha&&a.enable(8),A.shadowMapEnabled&&a.enable(9),A.doubleSided&&a.enable(10),A.flipSided&&a.enable(11),A.useDepthPacking&&a.enable(12),A.dithering&&a.enable(13),A.transmission&&a.enable(14),A.sheen&&a.enable(15),A.opaque&&a.enable(16),A.pointsUvs&&a.enable(17),A.decodeVideoTexture&&a.enable(18),A.alphaToCoverage&&a.enable(19),T.push(a.mask)}(A,T),A.push(i.outputColorSpace)),A.push(T.customProgramCacheKey),A.join()},getUniforms:function C(T){const A=g[T.type];let W;return W=A?Q4.clone(dc[A].uniforms):T.uniforms,W},acquireProgram:function F(T,A){let W;for(let ie=0,ne=d.length;ie0?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 d(){for(let h=t,p=i.length;h1&&e.sort(h||hue),n.length>1&&n.sort(p||D5),r.length>1&&r.sort(p||D5)}}}function fue(){let i=new WeakMap;return{get:function t(n,r){const s=i.get(n);let o;return void 0===s?(o=new T5,i.set(n,[o])):r>=s.length?(o=new T5,s.push(o)):o=s[r],o},dispose:function e(){i=new WeakMap}}}function pue(){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 O,color:new qe};break;case"SpotLight":e={position:new O,direction:new O,color:new qe,distance:0,coneCos:0,penumbraCos:0,decay:0};break;case"PointLight":e={position:new O,color:new qe,distance:0,decay:0};break;case"HemisphereLight":e={direction:new O,skyColor:new qe,groundColor:new qe};break;case"RectAreaLight":e={color:new qe,position:new O,halfWidth:new O,halfHeight:new O}}return i[t.id]=e,e}}}let gue=0;function _ue(i,t){return(t.castShadow?2:0)-(i.castShadow?2:0)+(t.map?1:0)-(i.map?1:0)}function vue(i){const t=new pue,e=function mue(){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={shadowIntensity:1,shadowBias:0,shadowNormalBias:0,shadowRadius:1,shadowMapSize:new xe};break;case"PointLight":e={shadowIntensity:1,shadowBias:0,shadowNormalBias:0,shadowRadius:1,shadowMapSize:new xe,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 O);const r=new O,s=new Bt,o=new Bt;return{setup:function a(c){let d=0,h=0,p=0;for(let T=0;T<9;T++)n.probe[T].set(0,0,0);let m=0,g=0,b=0,v=0,y=0,M=0,x=0,C=0,F=0,D=0,k=0;c.sort(_ue);for(let T=0,A=c.length;T0&&(!0===i.has("OES_texture_float_linear")?(n.rectAreaLTC1=Je.LTC_FLOAT_1,n.rectAreaLTC2=Je.LTC_FLOAT_2):(n.rectAreaLTC1=Je.LTC_HALF_1,n.rectAreaLTC2=Je.LTC_HALF_2)),n.ambient[0]=d,n.ambient[1]=h,n.ambient[2]=p;const B=n.hash;(B.directionalLength!==m||B.pointLength!==g||B.spotLength!==b||B.rectAreaLength!==v||B.hemiLength!==y||B.numDirectionalShadows!==M||B.numPointShadows!==x||B.numSpotShadows!==C||B.numSpotMaps!==F||B.numLightProbes!==k)&&(n.directional.length=m,n.spot.length=b,n.rectArea.length=v,n.point.length=g,n.hemi.length=y,n.directionalShadow.length=M,n.directionalShadowMap.length=M,n.pointShadow.length=x,n.pointShadowMap.length=x,n.spotShadow.length=C,n.spotShadowMap.length=C,n.directionalShadowMatrix.length=M,n.pointShadowMatrix.length=x,n.spotLightMatrix.length=C+F-D,n.spotLightMap.length=F,n.numSpotLightShadowsWithMaps=D,n.numLightProbes=k,B.directionalLength=m,B.pointLength=g,B.spotLength=b,B.rectAreaLength=v,B.hemiLength=y,B.numDirectionalShadows=M,B.numPointShadows=x,B.numSpotShadows=C,B.numSpotMaps=F,B.numLightProbes=k,n.version=gue++)},setupView:function l(c,d){let h=0,p=0,m=0,g=0,b=0;const v=d.matrixWorldInverse;for(let y=0,M=c.length;y=o.length?(a=new I5(i),o.push(a)):a=o[s],a},dispose:function n(){t=new WeakMap}}}class R5 extends Fo{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 k5 extends Fo{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 bue="void main() {\n\tgl_Position = vec4( position, 1.0 );\n}",xue="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 wue(i,t,e){let n=new aS;const r=new xe,s=new xe,o=new vi,a=new R5({depthPacking:Loe}),l=new k5,c={},d=e.maxTextureSize,h={[lc]:ko,[ko]:lc,[Ns]:Ns},p=new Sl({defines:{VSM_SAMPLES:8},uniforms:{shadow_pass:{value:null},resolution:{value:new xe},radius:{value:4}},vertexShader:bue,fragmentShader:xue}),m=p.clone();m.defines.HORIZONTAL_PASS=1;const g=new hn;g.setAttribute("position",new Hi(new Float32Array([-1,-1,.5,3,-1,.5,-1,3,.5]),3));const b=new Mn(g,p),v=this;this.enabled=!1,this.autoUpdate=!0,this.needsUpdate=!1,this.type=l4;let y=this.type;function M(D,k){const B=t.update(b);p.defines.VSM_SAMPLES!==D.blurSamples&&(p.defines.VSM_SAMPLES=D.blurSamples,m.defines.VSM_SAMPLES=D.blurSamples,p.needsUpdate=!0,m.needsUpdate=!0),null===D.mapPass&&(D.mapPass=new Mu(r.x,r.y)),p.uniforms.shadow_pass.value=D.map.texture,p.uniforms.resolution.value=D.mapSize,p.uniforms.radius.value=D.radius,i.setRenderTarget(D.mapPass),i.clear(),i.renderBufferDirect(k,null,B,p,b,null),m.uniforms.shadow_pass.value=D.mapPass.texture,m.uniforms.resolution.value=D.mapSize,m.uniforms.radius.value=D.radius,i.setRenderTarget(D.map),i.clear(),i.renderBufferDirect(k,null,B,m,b,null)}function x(D,k,B,T){let A=null;const W=!0===B.isPointLight?D.customDistanceMaterial:D.customDepthMaterial;if(void 0!==W)A=W;else if(A=!0===B.isPointLight?l:a,i.localClippingEnabled&&!0===k.clipShadows&&Array.isArray(k.clippingPlanes)&&0!==k.clippingPlanes.length||k.displacementMap&&0!==k.displacementScale||k.alphaMap&&k.alphaTest>0||k.map&&k.alphaTest>0){const ie=A.uuid,ne=k.uuid;let oe=c[ie];void 0===oe&&(oe={},c[ie]=oe);let ge=oe[ne];void 0===ge&&(ge=A.clone(),oe[ne]=ge,k.addEventListener("dispose",F)),A=ge}return A.visible=k.visible,A.wireframe=k.wireframe,A.side=T===Qc?null!==k.shadowSide?k.shadowSide:k.side:null!==k.shadowSide?k.shadowSide:h[k.side],A.alphaMap=k.alphaMap,A.alphaTest=k.alphaTest,A.map=k.map,A.clipShadows=k.clipShadows,A.clippingPlanes=k.clippingPlanes,A.clipIntersection=k.clipIntersection,A.displacementMap=k.displacementMap,A.displacementScale=k.displacementScale,A.displacementBias=k.displacementBias,A.wireframeLinewidth=k.wireframeLinewidth,A.linewidth=k.linewidth,!0===B.isPointLight&&!0===A.isMeshDistanceMaterial&&(i.properties.get(A).light=B),A}function C(D,k,B,T,A){if(!1===D.visible)return;if(D.layers.test(k.layers)&&(D.isMesh||D.isLine||D.isPoints)&&(D.castShadow||D.receiveShadow&&A===Qc)&&(!D.frustumCulled||n.intersectsObject(D))){D.modelViewMatrix.multiplyMatrices(B.matrixWorldInverse,D.matrixWorld);const ne=t.update(D),oe=D.material;if(Array.isArray(oe)){const ge=ne.groups;for(let q=0,se=ge.length;qd||r.y>d)&&(r.x>d&&(s.x=Math.floor(d/we.x),r.x=s.x*we.x,J.mapSize.x=s.x),r.y>d&&(s.y=Math.floor(d/we.y),r.y=s.y*we.y,J.mapSize.y=s.y)),null===J.map||!0===ne||!0===oe){const Ye=this.type!==Qc?{minFilter:vr,magFilter:vr}:{};null!==J.map&&J.map.dispose(),J.map=new Mu(r.x,r.y,Ye),J.map.texture.name=se.name+".shadowMap",J.camera.updateProjectionMatrix()}i.setRenderTarget(J.map),i.clear();const Ve=J.getViewportCount();for(let Ye=0;Ye=1):-1!==se.indexOf("OpenGL ES")&&(q=parseFloat(/^OpenGL ES (\d)/.exec(se)[1]),ge=q>=2);let J=null,we={};const Ve=i.getParameter(i.SCISSOR_BOX),Ye=i.getParameter(i.VIEWPORT),Rt=(new vi).fromArray(Ve),nn=(new vi).fromArray(Ye);function le(Z,We,Ce,Ee){const Ke=new Uint8Array(4),rn=i.createTexture();i.bindTexture(Z,rn),i.texParameteri(Z,i.TEXTURE_MIN_FILTER,i.NEAREST),i.texParameteri(Z,i.TEXTURE_MAG_FILTER,i.NEAREST);for(let ti=0;ti"u")&&/OculusBrowser/g.test(navigator.userAgent),c=new xe,d=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(H,R){return m?new OffscreenCanvas(H,R):Mb("canvas")}function b(H,R,de){let ke=1;const De=_t(H);if((De.width>de||De.height>de)&&(ke=de/Math.max(De.width,De.height)),ke<1){if(typeof HTMLImageElement<"u"&&H instanceof HTMLImageElement||typeof HTMLCanvasElement<"u"&&H instanceof HTMLCanvasElement||typeof ImageBitmap<"u"&&H instanceof ImageBitmap||typeof VideoFrame<"u"&&H instanceof VideoFrame){const Ae=Math.floor(ke*De.width),Ut=Math.floor(ke*De.height);void 0===h&&(h=g(Ae,Ut));const et=R?g(Ae,Ut):h;return et.width=Ae,et.height=Ut,et.getContext("2d").drawImage(H,0,0,Ae,Ut),console.warn("THREE.WebGLRenderer: Texture has been resized from ("+De.width+"x"+De.height+") to ("+Ae+"x"+Ut+")."),et}return"data"in H&&console.warn("THREE.WebGLRenderer: Image in DataTexture is too big ("+De.width+"x"+De.height+")."),H}return H}function v(H){return H.generateMipmaps&&H.minFilter!==vr&&H.minFilter!==cr}function y(H){i.generateMipmap(H)}function M(H,R,de,ke,De=!1){if(null!==H){if(void 0!==i[H])return i[H];console.warn("THREE.WebGLRenderer: Attempt to use non-existing WebGL internal format '"+H+"'")}let Ae=R;if(R===i.RED&&(de===i.FLOAT&&(Ae=i.R32F),de===i.HALF_FLOAT&&(Ae=i.R16F),de===i.UNSIGNED_BYTE&&(Ae=i.R8)),R===i.RED_INTEGER&&(de===i.UNSIGNED_BYTE&&(Ae=i.R8UI),de===i.UNSIGNED_SHORT&&(Ae=i.R16UI),de===i.UNSIGNED_INT&&(Ae=i.R32UI),de===i.BYTE&&(Ae=i.R8I),de===i.SHORT&&(Ae=i.R16I),de===i.INT&&(Ae=i.R32I)),R===i.RG&&(de===i.FLOAT&&(Ae=i.RG32F),de===i.HALF_FLOAT&&(Ae=i.RG16F),de===i.UNSIGNED_BYTE&&(Ae=i.RG8)),R===i.RG_INTEGER&&(de===i.UNSIGNED_BYTE&&(Ae=i.RG8UI),de===i.UNSIGNED_SHORT&&(Ae=i.RG16UI),de===i.UNSIGNED_INT&&(Ae=i.RG32UI),de===i.BYTE&&(Ae=i.RG8I),de===i.SHORT&&(Ae=i.RG16I),de===i.INT&&(Ae=i.RG32I)),R===i.RGB&&de===i.UNSIGNED_INT_5_9_9_9_REV&&(Ae=i.RGB9_E5),R===i.RGBA){const Ut=De?NC:ei.getTransfer(ke);de===i.FLOAT&&(Ae=i.RGBA32F),de===i.HALF_FLOAT&&(Ae=i.RGBA16F),de===i.UNSIGNED_BYTE&&(Ae=Ut===Fi?i.SRGB8_ALPHA8:i.RGBA8),de===i.UNSIGNED_SHORT_4_4_4_4&&(Ae=i.RGBA4),de===i.UNSIGNED_SHORT_5_5_5_1&&(Ae=i.RGB5_A1)}return(Ae===i.R16F||Ae===i.R32F||Ae===i.RG16F||Ae===i.RG32F||Ae===i.RGBA16F||Ae===i.RGBA32F)&&t.get("EXT_color_buffer_float"),Ae}function x(H,R){let de;return H?null===R||R===xu||R===eg?de=i.DEPTH24_STENCIL8:R===ta?de=i.DEPTH32F_STENCIL8:R===yb&&(de=i.DEPTH24_STENCIL8,console.warn("DepthTexture: 16 bit depth attachment is not supported with stencil. Using 24-bit attachment.")):null===R||R===xu||R===eg?de=i.DEPTH_COMPONENT24:R===ta?de=i.DEPTH_COMPONENT32F:R===yb&&(de=i.DEPTH_COMPONENT16),de}function C(H,R){return!0===v(H)||H.isFramebufferTexture&&H.minFilter!==vr&&H.minFilter!==cr?Math.log2(Math.max(R.width,R.height))+1:void 0!==H.mipmaps&&H.mipmaps.length>0?H.mipmaps.length:H.isCompressedTexture&&Array.isArray(H.image)?R.mipmaps.length:1}function F(H){const R=H.target;R.removeEventListener("dispose",F),function k(H){const R=n.get(H);if(void 0===R.__webglInit)return;const de=H.source,ke=p.get(de);if(ke){const De=ke[R.__cacheKey];De.usedTimes--,0===De.usedTimes&&B(H),0===Object.keys(ke).length&&p.delete(de)}n.remove(H)}(R),R.isVideoTexture&&d.delete(R)}function D(H){const R=H.target;R.removeEventListener("dispose",D),function T(H){const R=n.get(H);if(H.depthTexture&&H.depthTexture.dispose(),H.isWebGLCubeRenderTarget)for(let ke=0;ke<6;ke++){if(Array.isArray(R.__webglFramebuffer[ke]))for(let De=0;De0&&de.__version!==H.version){const ke=H.image;if(null===ke)console.warn("THREE.WebGLRenderer: Texture marked for update but no image data found.");else{if(!1!==ke.complete)return void nn(de,H,R);console.warn("THREE.WebGLRenderer: Texture marked for update but image is incomplete")}}e.bindTexture(i.TEXTURE_2D,de.__webglTexture,i.TEXTURE0+R)}const J={[Bs]:i.REPEAT,[er]:i.CLAMP_TO_EDGE,[_b]:i.MIRRORED_REPEAT},we={[vr]:i.NEAREST,[uk]:i.NEAREST_MIPMAP_NEAREST,[Qm]:i.NEAREST_MIPMAP_LINEAR,[cr]:i.LINEAR,[vb]:i.LINEAR_MIPMAP_NEAREST,[xl]:i.LINEAR_MIPMAP_LINEAR},Ve={[Boe]:i.NEVER,[Goe]:i.ALWAYS,[Uoe]:i.LESS,[E4]:i.LEQUAL,[Voe]:i.EQUAL,[$oe]:i.GEQUAL,[zoe]:i.GREATER,[Hoe]:i.NOTEQUAL};function Ye(H,R){if(R.type===ta&&!1===t.has("OES_texture_float_linear")&&(R.magFilter===cr||R.magFilter===vb||R.magFilter===Qm||R.magFilter===xl||R.minFilter===cr||R.minFilter===vb||R.minFilter===Qm||R.minFilter===xl)&&console.warn("THREE.WebGLRenderer: Unable to use linear filtering with floating point textures. OES_texture_float_linear not supported on this device."),i.texParameteri(H,i.TEXTURE_WRAP_S,J[R.wrapS]),i.texParameteri(H,i.TEXTURE_WRAP_T,J[R.wrapT]),(H===i.TEXTURE_3D||H===i.TEXTURE_2D_ARRAY)&&i.texParameteri(H,i.TEXTURE_WRAP_R,J[R.wrapR]),i.texParameteri(H,i.TEXTURE_MAG_FILTER,we[R.magFilter]),i.texParameteri(H,i.TEXTURE_MIN_FILTER,we[R.minFilter]),R.compareFunction&&(i.texParameteri(H,i.TEXTURE_COMPARE_MODE,i.COMPARE_REF_TO_TEXTURE),i.texParameteri(H,i.TEXTURE_COMPARE_FUNC,Ve[R.compareFunction])),!0===t.has("EXT_texture_filter_anisotropic")){if(R.magFilter===vr||R.minFilter!==Qm&&R.minFilter!==xl||R.type===ta&&!1===t.has("OES_texture_float_linear"))return;if(R.anisotropy>1||n.get(R).__currentAnisotropy){const de=t.get("EXT_texture_filter_anisotropic");i.texParameterf(H,de.TEXTURE_MAX_ANISOTROPY_EXT,Math.min(R.anisotropy,r.getMaxAnisotropy())),n.get(R).__currentAnisotropy=R.anisotropy}}}function Rt(H,R){let de=!1;void 0===H.__webglInit&&(H.__webglInit=!0,R.addEventListener("dispose",F));const ke=R.source;let De=p.get(ke);void 0===De&&(De={},p.set(ke,De));const Ae=function ne(H){const R=[];return R.push(H.wrapS),R.push(H.wrapT),R.push(H.wrapR||0),R.push(H.magFilter),R.push(H.minFilter),R.push(H.anisotropy),R.push(H.internalFormat),R.push(H.format),R.push(H.type),R.push(H.generateMipmaps),R.push(H.premultiplyAlpha),R.push(H.flipY),R.push(H.unpackAlignment),R.push(H.colorSpace),R.join()}(R);if(Ae!==H.__cacheKey){void 0===De[Ae]&&(De[Ae]={texture:i.createTexture(),usedTimes:0},o.memory.textures++,de=!0),De[Ae].usedTimes++;const Ut=De[H.__cacheKey];void 0!==Ut&&(De[H.__cacheKey].usedTimes--,0===Ut.usedTimes&&B(R)),H.__cacheKey=Ae,H.__webglTexture=De[Ae].texture}return de}function nn(H,R,de){let ke=i.TEXTURE_2D;(R.isDataArrayTexture||R.isCompressedArrayTexture)&&(ke=i.TEXTURE_2D_ARRAY),R.isData3DTexture&&(ke=i.TEXTURE_3D);const De=Rt(H,R),Ae=R.source;e.bindTexture(ke,H.__webglTexture,i.TEXTURE0+de);const Ut=n.get(Ae);if(Ae.version!==Ut.__version||!0===De){e.activeTexture(i.TEXTURE0+de);const et=ei.getPrimaries(ei.workingColorSpace),pt=R.colorSpace===wu?null:ei.getPrimaries(R.colorSpace),bn=R.colorSpace===wu||et===pt?i.NONE:i.BROWSER_DEFAULT_WEBGL;i.pixelStorei(i.UNPACK_FLIP_Y_WEBGL,R.flipY),i.pixelStorei(i.UNPACK_PREMULTIPLY_ALPHA_WEBGL,R.premultiplyAlpha),i.pixelStorei(i.UNPACK_ALIGNMENT,R.unpackAlignment),i.pixelStorei(i.UNPACK_COLORSPACE_CONVERSION_WEBGL,bn);let He=b(R.image,!1,r.maxTextureSize);He=rt(R,He);const ft=s.convert(R.format,R.colorSpace),Yn=s.convert(R.type);let yt,cn=M(R.internalFormat,ft,Yn,R.colorSpace,R.isVideoTexture);Ye(ke,R);const vn=R.mipmaps,Pn=!0!==R.isVideoTexture,Ki=void 0===Ut.__version||!0===De,Z=Ae.dataReady,We=C(R,He);if(R.isDepthTexture)cn=x(R.format===ng,R.type),Ki&&(Pn?e.texStorage2D(i.TEXTURE_2D,1,cn,He.width,He.height):e.texImage2D(i.TEXTURE_2D,0,cn,He.width,He.height,0,ft,Yn,null));else if(R.isDataTexture)if(vn.length>0){Pn&&Ki&&e.texStorage2D(i.TEXTURE_2D,We,cn,vn[0].width,vn[0].height);for(let Ce=0,Ee=vn.length;Ce0){const Ke=CP(yt.width,yt.height,R.format,R.type);for(const rn of R.layerUpdates){const ti=yt.data.subarray(rn*Ke/yt.data.BYTES_PER_ELEMENT,(rn+1)*Ke/yt.data.BYTES_PER_ELEMENT);e.compressedTexSubImage3D(i.TEXTURE_2D_ARRAY,Ce,0,0,rn,yt.width,yt.height,1,ft,ti,0,0)}R.clearLayerUpdates()}else e.compressedTexSubImage3D(i.TEXTURE_2D_ARRAY,Ce,0,0,0,yt.width,yt.height,He.depth,ft,yt.data,0,0)}else e.compressedTexImage3D(i.TEXTURE_2D_ARRAY,Ce,cn,yt.width,yt.height,He.depth,0,yt.data,0,0);else console.warn("THREE.WebGLRenderer: Attempt to load unsupported compressed texture format in .uploadTexture()");else Pn?Z&&e.texSubImage3D(i.TEXTURE_2D_ARRAY,Ce,0,0,0,yt.width,yt.height,He.depth,ft,Yn,yt.data):e.texImage3D(i.TEXTURE_2D_ARRAY,Ce,cn,yt.width,yt.height,He.depth,0,ft,Yn,yt.data)}else{Pn&&Ki&&e.texStorage2D(i.TEXTURE_2D,We,cn,vn[0].width,vn[0].height);for(let Ce=0,Ee=vn.length;Ce0){const Ce=CP(He.width,He.height,R.format,R.type);for(const Ee of R.layerUpdates){const Ke=He.data.subarray(Ee*Ce/He.data.BYTES_PER_ELEMENT,(Ee+1)*Ce/He.data.BYTES_PER_ELEMENT);e.texSubImage3D(i.TEXTURE_2D_ARRAY,0,0,0,Ee,He.width,He.height,1,ft,Yn,Ke)}R.clearLayerUpdates()}else e.texSubImage3D(i.TEXTURE_2D_ARRAY,0,0,0,0,He.width,He.height,He.depth,ft,Yn,He.data)}else e.texImage3D(i.TEXTURE_2D_ARRAY,0,cn,He.width,He.height,He.depth,0,ft,Yn,He.data);else if(R.isData3DTexture)Pn?(Ki&&e.texStorage3D(i.TEXTURE_3D,We,cn,He.width,He.height,He.depth),Z&&e.texSubImage3D(i.TEXTURE_3D,0,0,0,0,He.width,He.height,He.depth,ft,Yn,He.data)):e.texImage3D(i.TEXTURE_3D,0,cn,He.width,He.height,He.depth,0,ft,Yn,He.data);else if(R.isFramebufferTexture){if(Ki)if(Pn)e.texStorage2D(i.TEXTURE_2D,We,cn,He.width,He.height);else{let Ce=He.width,Ee=He.height;for(let Ke=0;Ke>=1,Ee>>=1}}else if(vn.length>0){if(Pn&&Ki){const Ce=_t(vn[0]);e.texStorage2D(i.TEXTURE_2D,We,cn,Ce.width,Ce.height)}for(let Ce=0,Ee=vn.length;Ce>Ae),ft=Math.max(1,R.height>>Ae);De===i.TEXTURE_3D||De===i.TEXTURE_2D_ARRAY?e.texImage3D(De,Ae,pt,He,ft,R.depth,0,Ut,et,null):e.texImage2D(De,Ae,pt,He,ft,0,Ut,et,null)}e.bindFramebuffer(i.FRAMEBUFFER,H),Me(R)?a.framebufferTexture2DMultisampleEXT(i.FRAMEBUFFER,ke,De,n.get(de).__webglTexture,0,it(R)):(De===i.TEXTURE_2D||De>=i.TEXTURE_CUBE_MAP_POSITIVE_X&&De<=i.TEXTURE_CUBE_MAP_NEGATIVE_Z)&&i.framebufferTexture2D(i.FRAMEBUFFER,ke,De,n.get(de).__webglTexture,Ae),e.bindFramebuffer(i.FRAMEBUFFER,null)}function Ze(H,R,de){if(i.bindRenderbuffer(i.RENDERBUFFER,H),R.depthBuffer){const ke=R.depthTexture,Ae=x(R.stencilBuffer,ke&&ke.isDepthTexture?ke.type:null),Ut=R.stencilBuffer?i.DEPTH_STENCIL_ATTACHMENT:i.DEPTH_ATTACHMENT,et=it(R);Me(R)?a.renderbufferStorageMultisampleEXT(i.RENDERBUFFER,et,Ae,R.width,R.height):de?i.renderbufferStorageMultisample(i.RENDERBUFFER,et,Ae,R.width,R.height):i.renderbufferStorage(i.RENDERBUFFER,Ae,R.width,R.height),i.framebufferRenderbuffer(i.FRAMEBUFFER,Ut,i.RENDERBUFFER,H)}else{const ke=R.textures;for(let De=0;De0&&!0===t.has("WEBGL_multisampled_render_to_texture")&&!1!==R.__useRenderToTexture}function rt(H,R){const de=H.colorSpace,ke=H.format,De=H.type;return!0===H.isCompressedTexture||!0===H.isVideoTexture||de!==ds&&de!==wu&&(ei.getTransfer(de)===Fi?(ke!==Po||De!==ed)&&console.warn("THREE.WebGLTextures: sRGB encoded textures have to use RGBAFormat and UnsignedByteType."):console.error("THREE.WebGLTextures: Unsupported texture color space:",de)),R}function _t(H){return typeof HTMLImageElement<"u"&&H instanceof HTMLImageElement?(c.width=H.naturalWidth||H.width,c.height=H.naturalHeight||H.height):typeof VideoFrame<"u"&&H instanceof VideoFrame?(c.width=H.displayWidth,c.height=H.displayHeight):(c.width=H.width,c.height=H.height),c}this.allocateTextureUnit=function ie(){const H=A;return H>=r.maxTextures&&console.warn("THREE.WebGLTextures: Trying to use "+H+" texture units while this GPU supports only "+r.maxTextures),A+=1,H},this.resetTextureUnits=function W(){A=0},this.setTexture2D=oe,this.setTexture2DArray=function ge(H,R){const de=n.get(H);H.version>0&&de.__version!==H.version?nn(de,H,R):e.bindTexture(i.TEXTURE_2D_ARRAY,de.__webglTexture,i.TEXTURE0+R)},this.setTexture3D=function q(H,R){const de=n.get(H);H.version>0&&de.__version!==H.version?nn(de,H,R):e.bindTexture(i.TEXTURE_3D,de.__webglTexture,i.TEXTURE0+R)},this.setTextureCube=function se(H,R){const de=n.get(H);H.version>0&&de.__version!==H.version?function le(H,R,de){if(6!==R.image.length)return;const ke=Rt(H,R),De=R.source;e.bindTexture(i.TEXTURE_CUBE_MAP,H.__webglTexture,i.TEXTURE0+de);const Ae=n.get(De);if(De.version!==Ae.__version||!0===ke){e.activeTexture(i.TEXTURE0+de);const Ut=ei.getPrimaries(ei.workingColorSpace),et=R.colorSpace===wu?null:ei.getPrimaries(R.colorSpace),pt=R.colorSpace===wu||Ut===et?i.NONE:i.BROWSER_DEFAULT_WEBGL;i.pixelStorei(i.UNPACK_FLIP_Y_WEBGL,R.flipY),i.pixelStorei(i.UNPACK_PREMULTIPLY_ALPHA_WEBGL,R.premultiplyAlpha),i.pixelStorei(i.UNPACK_ALIGNMENT,R.unpackAlignment),i.pixelStorei(i.UNPACK_COLORSPACE_CONVERSION_WEBGL,pt);const bn=R.isCompressedTexture||R.image[0].isCompressedTexture,He=R.image[0]&&R.image[0].isDataTexture,ft=[];for(let Ee=0;Ee<6;Ee++)ft[Ee]=bn||He?He?R.image[Ee].image:R.image[Ee]:b(R.image[Ee],!0,r.maxCubemapSize),ft[Ee]=rt(R,ft[Ee]);const Yn=ft[0],cn=s.convert(R.format,R.colorSpace),yt=s.convert(R.type),vn=M(R.internalFormat,cn,yt,R.colorSpace),Pn=!0!==R.isVideoTexture,Ki=void 0===Ae.__version||!0===ke,Z=De.dataReady;let Ce,We=C(R,Yn);if(Ye(i.TEXTURE_CUBE_MAP,R),bn){Pn&&Ki&&e.texStorage2D(i.TEXTURE_CUBE_MAP,We,vn,Yn.width,Yn.height);for(let Ee=0;Ee<6;Ee++){Ce=ft[Ee].mipmaps;for(let Ke=0;Ke0&&We++;const Ee=_t(ft[0]);e.texStorage2D(i.TEXTURE_CUBE_MAP,We,vn,Ee.width,Ee.height)}for(let Ee=0;Ee<6;Ee++)if(He){Pn?Z&&e.texSubImage2D(i.TEXTURE_CUBE_MAP_POSITIVE_X+Ee,0,0,0,ft[Ee].width,ft[Ee].height,cn,yt,ft[Ee].data):e.texImage2D(i.TEXTURE_CUBE_MAP_POSITIVE_X+Ee,0,vn,ft[Ee].width,ft[Ee].height,0,cn,yt,ft[Ee].data);for(let Ke=0;Ke1;if(Ut||(void 0===ke.__webglTexture&&(ke.__webglTexture=i.createTexture()),ke.__version=R.version,o.memory.textures++),Ae){de.__webglFramebuffer=[];for(let et=0;et<6;et++)if(R.mipmaps&&R.mipmaps.length>0){de.__webglFramebuffer[et]=[];for(let pt=0;pt0){de.__webglFramebuffer=[];for(let et=0;et0&&!1===Me(H)){de.__webglMultisampledFramebuffer=i.createFramebuffer(),de.__webglColorRenderbuffer=[],e.bindFramebuffer(i.FRAMEBUFFER,de.__webglMultisampledFramebuffer);for(let et=0;et0)for(let pt=0;pt0)for(let pt=0;pt0)if(!1===Me(H)){const R=H.textures,de=H.width,ke=H.height;let De=i.COLOR_BUFFER_BIT;const Ae=H.stencilBuffer?i.DEPTH_STENCIL_ATTACHMENT:i.DEPTH_ATTACHMENT,Ut=n.get(H),et=R.length>1;if(et)for(let pt=0;ptm+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(Rue)))}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 No;n.matrixAutoUpdate=!1,n.visible=!1,t.joints[e.jointName]=n,t.add(n)}return t.joints[e.jointName]}}class Oue{constructor(){this.texture=null,this.mesh=null,this.depthNear=0,this.depthFar=0}init(t,e,n){if(null===this.texture){const r=new Oo;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}}getMesh(t){if(null!==this.texture&&null===this.mesh){const e=t.cameras[0].viewport,n=new Sl({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:e.z},depthHeight:{value:e.w}}});this.mesh=new Mn(new Iu(20,20),n)}return this.mesh}reset(){this.texture=null,this.mesh=null}getDepthTexture(){return this.texture}}class Fue extends og{constructor(t,e){super();const n=this;let r=null,s=1,o=null,a="local-floor",l=1,c=null,d=null,h=null,p=null,m=null,g=null;const b=new Oue,v=e.getContextAttributes();let y=null,M=null;const x=[],C=[],F=new xe;let D=null;const k=new br;k.layers.enable(1),k.viewport=new vi;const B=new br;B.layers.enable(2),B.viewport=new vi;const T=[k,B],A=new Iue;A.layers.enable(1),A.layers.enable(2);let W=null,ie=null;function ne(le){const Fe=C.indexOf(le.inputSource);if(-1===Fe)return;const Ze=x[Fe];void 0!==Ze&&(Ze.update(le.inputSource,le.frame,c||o),Ze.dispatchEvent({type:le.type,data:le.inputSource}))}function oe(){r.removeEventListener("select",ne),r.removeEventListener("selectstart",ne),r.removeEventListener("selectend",ne),r.removeEventListener("squeeze",ne),r.removeEventListener("squeezestart",ne),r.removeEventListener("squeezeend",ne),r.removeEventListener("end",oe),r.removeEventListener("inputsourceschange",ge);for(let le=0;le=0&&(C[Le]=null,x[Le].disconnect(Ze))}for(let Fe=0;Fe=C.length){C.push(Ze),Le=Tt;break}if(null===C[Tt]){C[Tt]=Ze,Le=Tt;break}}if(-1===Le)break}const wt=x[Le];wt&&wt.connect(Ze)}}this.cameraAutoUpdate=!0,this.enabled=!1,this.isPresenting=!1,this.getController=function(le){let Fe=x[le];return void 0===Fe&&(Fe=new SP,x[le]=Fe),Fe.getTargetRaySpace()},this.getControllerGrip=function(le){let Fe=x[le];return void 0===Fe&&(Fe=new SP,x[le]=Fe),Fe.getGripSpace()},this.getHand=function(le){let Fe=x[le];return void 0===Fe&&(Fe=new SP,x[le]=Fe),Fe.getHandSpace()},this.setFramebufferScaleFactor=function(le){s=le,!0===n.isPresenting&&console.warn("THREE.WebXRManager: Cannot change framebuffer scale while presenting.")},this.setReferenceSpaceType=function(le){a=le,!0===n.isPresenting&&console.warn("THREE.WebXRManager: Cannot change reference space type while presenting.")},this.getReferenceSpace=function(){return c||o},this.setReferenceSpace=function(le){c=le},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 le=nt(function*(Fe){if(r=Fe,null!==r){if(y=t.getRenderTarget(),r.addEventListener("select",ne),r.addEventListener("selectstart",ne),r.addEventListener("selectend",ne),r.addEventListener("squeeze",ne),r.addEventListener("squeezestart",ne),r.addEventListener("squeezeend",ne),r.addEventListener("end",oe),r.addEventListener("inputsourceschange",ge),!0!==v.xrCompatible&&(yield e.makeXRCompatible()),D=t.getPixelRatio(),t.getSize(F),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 Mu(m.framebufferWidth,m.framebufferHeight,{format:Po,type:ed,colorSpace:t.outputColorSpace,stencilBuffer:v.stencil});else{let Ze=null,Le=null,wt=null;v.depth&&(wt=v.stencil?e.DEPTH24_STENCIL8:e.DEPTH_COMPONENT24,Ze=v.stencil?ng:tg,Le=v.stencil?eg:xu);const Tt={colorFormat:e.RGBA8,depthFormat:wt,scaleFactor:s};h=new XRWebGLBinding(r,e),p=h.createProjectionLayer(Tt),r.updateRenderState({layers:[p]}),t.setPixelRatio(1),t.setSize(p.textureWidth,p.textureHeight,!1),M=new Mu(p.textureWidth,p.textureHeight,{format:Po,type:ed,depthTexture:new d5(p.textureWidth,p.textureHeight,Le,void 0,void 0,void 0,void 0,void 0,void 0,Ze),stencilBuffer:v.stencil,colorSpace:t.outputColorSpace,samples:v.antialias?4:0,resolveDepthBuffer:!1===p.ignoreDepthValues})}M.isXRRenderTarget=!0,this.setFoveation(l),c=null,o=yield r.requestReferenceSpace(a),nn.setContext(r),nn.start(),n.isPresenting=!0,n.dispatchEvent({type:"sessionstart"})}});return function(Fe){return le.apply(this,arguments)}}(),this.getEnvironmentBlendMode=function(){if(null!==r)return r.environmentBlendMode},this.getDepthTexture=function(){return b.getDepthTexture()};const q=new O,se=new O;function we(le,Fe){null===Fe?le.matrixWorld.copy(le.matrix):le.matrixWorld.multiplyMatrices(Fe.matrixWorld,le.matrix),le.matrixWorldInverse.copy(le.matrixWorld).invert()}this.updateCamera=function(le){if(null===r)return;null!==b.texture&&(le.near=b.depthNear,le.far=b.depthFar),A.near=B.near=k.near=le.near,A.far=B.far=k.far=le.far,(W!==A.near||ie!==A.far)&&(r.updateRenderState({depthNear:A.near,depthFar:A.far}),W=A.near,ie=A.far,k.near=W,k.far=ie,B.near=W,B.far=ie,k.updateProjectionMatrix(),B.updateProjectionMatrix(),le.updateProjectionMatrix());const Fe=le.parent,Ze=A.cameras;we(A,Fe);for(let Le=0;Le0&&(v.alphaTest.value=y.alphaTest);const M=t.get(y),x=M.envMap,C=M.envMapRotation;x&&(v.envMap.value=x,hf.copy(C),hf.x*=-1,hf.y*=-1,hf.z*=-1,x.isCubeTexture&&!1===x.isRenderTargetTexture&&(hf.y*=-1,hf.z*=-1),v.envMapRotation.value.setFromMatrix4(Lue.makeRotationFromEuler(hf)),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,v.lightMapIntensity.value=y.lightMapIntensity,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,Z4(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 d(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===ko&&v.clearcoatNormalScale.value.negate())),y.dispersion>0&&(v.dispersion.value=y.dispersion),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 Bue(i,t,e,n){let r={},s={},o=[];const a=i.getParameter(i.MAX_UNIFORM_BUFFER_BINDINGS);function m(M,x,C,F){const D=M.value,k=x+"_"+C;if(void 0===F[k])return F[k]="number"==typeof D||"boolean"==typeof D?D:D.clone(),!0;{const B=F[k];if("number"==typeof D||"boolean"==typeof D){if(B!==D)return F[k]=D,!0}else if(!1===B.equals(D))return B.copy(D),!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 k=0,B=x.length;k0&&(C+=16-D),M.__size=C,M.__cache={}}(M),C=function d(M){const x=function h(){for(let M=0;M0),Zt=!!ce.morphAttributes.position,li=!!ce.morphAttributes.normal,Li=!!ce.morphAttributes.color;let ir=bu;ue.toneMapped&&(null===k||!0===k.isXRRenderTarget)&&(ir=x.toneMapping);const ca=ce.morphAttributes.position||ce.morphAttributes.normal||ce.morphAttributes.color,fi=void 0!==ca?ca.length:0,kt=rt.get(ue),fs=v.state.lights;!0!==le||!0!==Fe&&L===T||bn.setState(ue,L,L===T&&ue.id===B);let pi=!1;ue.version===kt.__version?(kt.needsLights&&kt.lightsStateVersion!==fs.state.version||kt.outputColorSpace!==Mt||te.isBatchedMesh&&!1===kt.batching||!te.isBatchedMesh&&!0===kt.batching||te.isBatchedMesh&&!0===kt.batchingColor&&null===te.colorTexture||te.isBatchedMesh&&!1===kt.batchingColor&&null!==te.colorTexture||te.isInstancedMesh&&!1===kt.instancing||!te.isInstancedMesh&&!0===kt.instancing||te.isSkinnedMesh&&!1===kt.skinning||!te.isSkinnedMesh&&!0===kt.skinning||te.isInstancedMesh&&!0===kt.instancingColor&&null===te.instanceColor||te.isInstancedMesh&&!1===kt.instancingColor&&null!==te.instanceColor||te.isInstancedMesh&&!0===kt.instancingMorph&&null===te.morphTexture||te.isInstancedMesh&&!1===kt.instancingMorph&&null!==te.morphTexture||kt.envMap!==Ct||!0===ue.fog&&kt.fog!==je||void 0!==kt.numClippingPlanes&&(kt.numClippingPlanes!==bn.numPlanes||kt.numIntersection!==bn.numIntersection)||kt.vertexAlphas!==Kt||kt.vertexTangents!==an||kt.morphTargets!==Zt||kt.morphNormals!==li||kt.morphColors!==Li||kt.toneMapping!==ir||kt.morphTargetsCount!==fi)&&(pi=!0):(pi=!0,kt.__version=ue.version);let Al=kt.currentProgram;!0===pi&&(Al=xE(ue,K,te));let qg=!1,da=!1,XO=!1;const wr=Al.getUniforms(),Uu=kt.uniforms;if(Me.useProgram(Al.program)&&(qg=!0,da=!0,XO=!0),ue.id!==B&&(B=ue.id,da=!0),qg||T!==L){wr.setValue(N,"projectionMatrix",L.projectionMatrix),wr.setValue(N,"viewMatrix",L.matrixWorldInverse);const $a=wr.map.cameraPosition;void 0!==$a&&$a.setValue(N,Le.setFromMatrixPosition(L.matrixWorld)),it.logarithmicDepthBuffer&&wr.setValue(N,"logDepthBufFC",2/(Math.log(L.far+1)/Math.LN2)),(ue.isMeshPhongMaterial||ue.isMeshToonMaterial||ue.isMeshLambertMaterial||ue.isMeshBasicMaterial||ue.isMeshStandardMaterial||ue.isShaderMaterial)&&wr.setValue(N,"isOrthographic",!0===L.isOrthographicCamera),T!==L&&(T=L,da=!0,XO=!0)}if(te.isSkinnedMesh){wr.setOptional(N,te,"bindMatrix"),wr.setOptional(N,te,"bindMatrixInverse");const $a=te.skeleton;$a&&(null===$a.boneTexture&&$a.computeBoneTexture(),wr.setValue(N,"boneTexture",$a.boneTexture,_t))}te.isBatchedMesh&&(wr.setOptional(N,te,"batchingTexture"),wr.setValue(N,"batchingTexture",te._matricesTexture,_t),wr.setOptional(N,te,"batchingIdTexture"),wr.setValue(N,"batchingIdTexture",te._indirectTexture,_t),wr.setOptional(N,te,"batchingColorTexture"),null!==te._colorsTexture&&wr.setValue(N,"batchingColorTexture",te._colorsTexture,_t));const KO=ce.morphAttributes;if((void 0!==KO.position||void 0!==KO.normal||void 0!==KO.color)&&Yn.update(te,ce,Al),(da||kt.receiveShadow!==te.receiveShadow)&&(kt.receiveShadow=te.receiveShadow,wr.setValue(N,"receiveShadow",te.receiveShadow)),ue.isMeshGouraudMaterial&&null!==ue.envMap&&(Uu.envMap.value=Ct,Uu.flipEnvMap.value=Ct.isCubeTexture&&!1===Ct.isRenderTargetTexture?-1:1),ue.isMeshStandardMaterial&&null===ue.envMap&&null!==K.environment&&(Uu.envMapIntensity.value=K.environmentIntensity),da&&(wr.setValue(N,"toneMappingExposure",x.toneMappingExposure),kt.needsLights&&function Gve(L,K){L.ambientLightColor.needsUpdate=K,L.lightProbe.needsUpdate=K,L.directionalLights.needsUpdate=K,L.directionalLightShadows.needsUpdate=K,L.pointLights.needsUpdate=K,L.pointLightShadows.needsUpdate=K,L.spotLights.needsUpdate=K,L.spotLightShadows.needsUpdate=K,L.rectAreaLights.needsUpdate=K,L.hemisphereLights.needsUpdate=K}(Uu,XO),je&&!0===ue.fog&&Ut.refreshFogUniforms(Uu,je),Ut.refreshMaterialUniforms(Uu,ue,se,q,v.state.transmissionRenderTarget[L.id]),uS.upload(N,_8(kt),Uu,_t)),ue.isShaderMaterial&&!0===ue.uniformsNeedUpdate&&(uS.upload(N,_8(kt),Uu,_t),ue.uniformsNeedUpdate=!1),ue.isSpriteMaterial&&wr.setValue(N,"center",te.center),wr.setValue(N,"modelViewMatrix",te.modelViewMatrix),wr.setValue(N,"normalMatrix",te.normalMatrix),wr.setValue(N,"modelMatrix",te.matrixWorld),ue.isShaderMaterial||ue.isRawShaderMaterial){const $a=ue.uniformsGroups;for(let ZO=0,jve=$a.length;ZO{function je(){ue.forEach(function(at){rt.get(at).currentProgram.isReady()&&ue.delete(at)}),0!==ue.size?setTimeout(je,10):te(L)}null!==Ne.get("KHR_parallel_shader_compile")?je():setTimeout(je,10)})};let hi=null;function pc(){Pf.stop()}function f8(){Pf.start()}const Pf=new t5;function qO(L,K,ce,ue){if(!1===L.visible)return;if(L.layers.test(K.layers))if(L.isGroup)ce=L.renderOrder;else if(L.isLOD)!0===L.autoUpdate&&L.update(K);else if(L.isLight)v.pushLight(L),L.castShadow&&v.pushShadow(L);else if(L.isSprite){if(!L.frustumCulled||nn.intersectsSprite(L)){ue&&wt.setFromMatrixPosition(L.matrixWorld).applyMatrix4(Ze);const at=De.update(L),Mt=L.material;Mt.visible&&b.push(L,at,Mt,ce,wt.z,null)}}else if((L.isMesh||L.isLine||L.isPoints)&&(!L.frustumCulled||nn.intersectsObject(L))){const at=De.update(L),Mt=L.material;if(ue&&(void 0!==L.boundingSphere?(null===L.boundingSphere&&L.computeBoundingSphere(),wt.copy(L.boundingSphere.center)):(null===at.boundingSphere&&at.computeBoundingSphere(),wt.copy(at.boundingSphere.center)),wt.applyMatrix4(L.matrixWorld).applyMatrix4(Ze)),Array.isArray(Mt)){const Ct=at.groups;for(let Kt=0,an=Ct.length;Kt0&&bE(te,K,ce),je.length>0&&bE(je,K,ce),at.length>0&&bE(at,K,ce),Me.buffers.depth.setTest(!0),Me.buffers.depth.setMask(!0),Me.buffers.color.setMask(!0),Me.setPolygonOffset(!1)}function m8(L,K,ce,ue){if(null!==(!0===ce.isScene?ce.overrideMaterial:null))return;void 0===v.state.transmissionRenderTarget[ue.id]&&(v.state.transmissionRenderTarget[ue.id]=new Mu(1,1,{generateMipmaps:!0,type:Ne.has("EXT_color_buffer_half_float")||Ne.has("EXT_color_buffer_float")?Jm:ed,minFilter:xl,samples:4,stencilBuffer:s,resolveDepthBuffer:!1,resolveStencilBuffer:!1,colorSpace:ei.workingColorSpace}));const je=v.state.transmissionRenderTarget[ue.id],at=ue.viewport||A;je.setSize(at.z,at.w);const Mt=x.getRenderTarget();x.setRenderTarget(je),x.getClearColor(ne),oe=x.getClearAlpha(),oe<1&&x.setClearColor(16777215,.5),x.clear(),St&&ft.render(ce);const Ct=x.toneMapping;x.toneMapping=bu;const Kt=ue.viewport;if(void 0!==ue.viewport&&(ue.viewport=void 0),v.setupLightsView(ue),!0===le&&bn.setGlobalState(x.clippingPlanes,ue),bE(L,ce,ue),_t.updateMultisampleRenderTarget(je),_t.updateRenderTargetMipmap(je),!1===Ne.has("WEBGL_multisampled_render_to_texture")){let an=!1;for(let Zt=0,li=K.length;Zt0)for(let at=0,Mt=je.length;at0&&m8(ue,te,L,K),St&&ft.render(L),p8(b,L,K);null!==k&&(_t.updateMultisampleRenderTarget(k),_t.updateRenderTargetMipmap(k)),!0===L.isScene&&L.onAfterRender(x,L,K),Pn.resetDefaultState(),B=-1,T=null,M.pop(),M.length>0?(v=M[M.length-1],!0===le&&bn.setGlobalState(x.clippingPlanes,v.state.camera)):v=null,y.pop(),b=y.length>0?y[y.length-1]:null},this.getActiveCubeFace=function(){return F},this.getActiveMipmapLevel=function(){return D},this.getRenderTarget=function(){return k},this.setRenderTargetTextures=function(L,K,ce){rt.get(L.texture).__webglTexture=K,rt.get(L.depthTexture).__webglTexture=ce;const ue=rt.get(L);ue.__hasExternalTextures=!0,ue.__autoAllocateDepthBuffer=void 0===ce,ue.__autoAllocateDepthBuffer||!0===Ne.has("WEBGL_multisampled_render_to_texture")&&(console.warn("THREE.WebGLRenderer: Render-to-texture extension was disabled because an external texture was provided"),ue.__useRenderToTexture=!1)},this.setRenderTargetFramebuffer=function(L,K){const ce=rt.get(L);ce.__webglFramebuffer=K,ce.__useDefaultFramebuffer=void 0===K},this.setRenderTarget=function(L,K=0,ce=0){k=L,F=K,D=ce;let ue=!0,te=null,je=!1,at=!1;if(L){const Ct=rt.get(L);void 0!==Ct.__useDefaultFramebuffer?(Me.bindFramebuffer(N.FRAMEBUFFER,null),ue=!1):void 0===Ct.__webglFramebuffer?_t.setupRenderTarget(L):Ct.__hasExternalTextures&&_t.rebindTextures(L,rt.get(L.texture).__webglTexture,rt.get(L.depthTexture).__webglTexture);const Kt=L.texture;(Kt.isData3DTexture||Kt.isDataArrayTexture||Kt.isCompressedArrayTexture)&&(at=!0);const an=rt.get(L).__webglFramebuffer;L.isWebGLCubeRenderTarget?(te=Array.isArray(an[K])?an[K][ce]:an[K],je=!0):te=L.samples>0&&!1===_t.useMultisampledRTT(L)?rt.get(L).__webglMultisampledFramebuffer:Array.isArray(an)?an[ce]:an,A.copy(L.viewport),W.copy(L.scissor),ie=L.scissorTest}else A.copy(Ve).multiplyScalar(se).floor(),W.copy(Ye).multiplyScalar(se).floor(),ie=Rt;if(Me.bindFramebuffer(N.FRAMEBUFFER,te)&&ue&&Me.drawBuffers(L,te),Me.viewport(A),Me.scissor(W),Me.setScissorTest(ie),je){const Ct=rt.get(L.texture);N.framebufferTexture2D(N.FRAMEBUFFER,N.COLOR_ATTACHMENT0,N.TEXTURE_CUBE_MAP_POSITIVE_X+K,Ct.__webglTexture,ce)}else if(at){const Ct=rt.get(L.texture);N.framebufferTextureLayer(N.FRAMEBUFFER,N.COLOR_ATTACHMENT0,Ct.__webglTexture,ce||0,K||0)}B=-1},this.readRenderTargetPixels=function(L,K,ce,ue,te,je,at){if(!L||!L.isWebGLRenderTarget)return void console.error("THREE.WebGLRenderer.readRenderTargetPixels: renderTarget is not THREE.WebGLRenderTarget.");let Mt=rt.get(L).__webglFramebuffer;if(L.isWebGLCubeRenderTarget&&void 0!==at&&(Mt=Mt[at]),Mt){Me.bindFramebuffer(N.FRAMEBUFFER,Mt);try{const Ct=L.texture,Kt=Ct.format,an=Ct.type;if(!it.textureFormatReadable(Kt))return void console.error("THREE.WebGLRenderer.readRenderTargetPixels: renderTarget is not in RGBA or implementation defined format.");if(!it.textureTypeReadable(an))return void console.error("THREE.WebGLRenderer.readRenderTargetPixels: renderTarget is not in UnsignedByteType or implementation defined type.");K>=0&&K<=L.width-ue&&ce>=0&&ce<=L.height-te&&N.readPixels(K,ce,ue,te,vn.convert(Kt),vn.convert(an),je)}finally{const Ct=null!==k?rt.get(k).__webglFramebuffer:null;Me.bindFramebuffer(N.FRAMEBUFFER,Ct)}}},this.readRenderTargetPixelsAsync=function(){var L=nt(function*(K,ce,ue,te,je,at,Mt){if(!K||!K.isWebGLRenderTarget)throw new Error("THREE.WebGLRenderer.readRenderTargetPixels: renderTarget is not THREE.WebGLRenderTarget.");let Ct=rt.get(K).__webglFramebuffer;if(K.isWebGLCubeRenderTarget&&void 0!==Mt&&(Ct=Ct[Mt]),Ct){Me.bindFramebuffer(N.FRAMEBUFFER,Ct);try{const Kt=K.texture,an=Kt.format,Zt=Kt.type;if(!it.textureFormatReadable(an))throw new Error("THREE.WebGLRenderer.readRenderTargetPixelsAsync: renderTarget is not in RGBA or implementation defined format.");if(!it.textureTypeReadable(Zt))throw new Error("THREE.WebGLRenderer.readRenderTargetPixelsAsync: renderTarget is not in UnsignedByteType or implementation defined type.");if(ce>=0&&ce<=K.width-te&&ue>=0&&ue<=K.height-je){const li=N.createBuffer();N.bindBuffer(N.PIXEL_PACK_BUFFER,li),N.bufferData(N.PIXEL_PACK_BUFFER,at.byteLength,N.STREAM_READ),N.readPixels(ce,ue,te,je,vn.convert(an),vn.convert(Zt),0),N.flush();const Li=N.fenceSync(N.SYNC_GPU_COMMANDS_COMPLETE,0);yield function dae(i,t,e){return new Promise(function(n,r){setTimeout(function s(){switch(i.clientWaitSync(t,i.SYNC_FLUSH_COMMANDS_BIT,0)){case i.WAIT_FAILED:r();break;case i.TIMEOUT_EXPIRED:setTimeout(s,e);break;default:n()}},e)})}(N,Li,4);try{N.bindBuffer(N.PIXEL_PACK_BUFFER,li),N.getBufferSubData(N.PIXEL_PACK_BUFFER,0,at)}finally{N.deleteBuffer(li),N.deleteSync(Li)}return at}}finally{const Kt=null!==k?rt.get(k).__webglFramebuffer:null;Me.bindFramebuffer(N.FRAMEBUFFER,Kt)}}});return function(K,ce,ue,te,je,at,Mt){return L.apply(this,arguments)}}(),this.copyFramebufferToTexture=function(L,K=null,ce=0){!0!==L.isTexture&&(cg("WebGLRenderer: copyFramebufferToTexture function signature has changed."),K=arguments[0]||null,L=arguments[1]);const ue=Math.pow(2,-ce),te=Math.floor(L.image.width*ue),je=Math.floor(L.image.height*ue),at=null!==K?K.x:0,Mt=null!==K?K.y:0;_t.setTexture2D(L,0),N.copyTexSubImage2D(N.TEXTURE_2D,ce,0,0,at,Mt,te,je),Me.unbindTexture()},this.copyTextureToTexture=function(L,K,ce=null,ue=null,te=0){let je,at,Mt,Ct,Kt,an;!0!==L.isTexture&&(cg("WebGLRenderer: copyTextureToTexture function signature has changed."),ue=arguments[0]||null,L=arguments[1],K=arguments[2],te=arguments[3]||0,ce=null),null!==ce?(je=ce.max.x-ce.min.x,at=ce.max.y-ce.min.y,Mt=ce.min.x,Ct=ce.min.y):(je=L.image.width,at=L.image.height,Mt=0,Ct=0),null!==ue?(Kt=ue.x,an=ue.y):(Kt=0,an=0);const Zt=vn.convert(K.format),li=vn.convert(K.type);_t.setTexture2D(K,0),N.pixelStorei(N.UNPACK_FLIP_Y_WEBGL,K.flipY),N.pixelStorei(N.UNPACK_PREMULTIPLY_ALPHA_WEBGL,K.premultiplyAlpha),N.pixelStorei(N.UNPACK_ALIGNMENT,K.unpackAlignment);const Li=N.getParameter(N.UNPACK_ROW_LENGTH),ir=N.getParameter(N.UNPACK_IMAGE_HEIGHT),ca=N.getParameter(N.UNPACK_SKIP_PIXELS),fi=N.getParameter(N.UNPACK_SKIP_ROWS),kt=N.getParameter(N.UNPACK_SKIP_IMAGES),fs=L.isCompressedTexture?L.mipmaps[te]:L.image;N.pixelStorei(N.UNPACK_ROW_LENGTH,fs.width),N.pixelStorei(N.UNPACK_IMAGE_HEIGHT,fs.height),N.pixelStorei(N.UNPACK_SKIP_PIXELS,Mt),N.pixelStorei(N.UNPACK_SKIP_ROWS,Ct),L.isDataTexture?N.texSubImage2D(N.TEXTURE_2D,te,Kt,an,je,at,Zt,li,fs.data):L.isCompressedTexture?N.compressedTexSubImage2D(N.TEXTURE_2D,te,Kt,an,fs.width,fs.height,Zt,fs.data):N.texSubImage2D(N.TEXTURE_2D,te,Kt,an,je,at,Zt,li,fs),N.pixelStorei(N.UNPACK_ROW_LENGTH,Li),N.pixelStorei(N.UNPACK_IMAGE_HEIGHT,ir),N.pixelStorei(N.UNPACK_SKIP_PIXELS,ca),N.pixelStorei(N.UNPACK_SKIP_ROWS,fi),N.pixelStorei(N.UNPACK_SKIP_IMAGES,kt),0===te&&K.generateMipmaps&&N.generateMipmap(N.TEXTURE_2D),Me.unbindTexture()},this.copyTextureToTexture3D=function(L,K,ce=null,ue=null,te=0){let je,at,Mt,Ct,Kt,an,Zt,li,Li;!0!==L.isTexture&&(cg("WebGLRenderer: copyTextureToTexture3D function signature has changed."),ce=arguments[0]||null,ue=arguments[1]||null,L=arguments[2],K=arguments[3],te=arguments[4]||0);const ir=L.isCompressedTexture?L.mipmaps[te]:L.image;null!==ce?(je=ce.max.x-ce.min.x,at=ce.max.y-ce.min.y,Mt=ce.max.z-ce.min.z,Ct=ce.min.x,Kt=ce.min.y,an=ce.min.z):(je=ir.width,at=ir.height,Mt=ir.depth,Ct=0,Kt=0,an=0),null!==ue?(Zt=ue.x,li=ue.y,Li=ue.z):(Zt=0,li=0,Li=0);const ca=vn.convert(K.format),fi=vn.convert(K.type);let kt;if(K.isData3DTexture)_t.setTexture3D(K,0),kt=N.TEXTURE_3D;else{if(!K.isDataArrayTexture&&!K.isCompressedArrayTexture)return void console.warn("THREE.WebGLRenderer.copyTextureToTexture3D: only supports THREE.DataTexture3D and THREE.DataTexture2DArray.");_t.setTexture2DArray(K,0),kt=N.TEXTURE_2D_ARRAY}N.pixelStorei(N.UNPACK_FLIP_Y_WEBGL,K.flipY),N.pixelStorei(N.UNPACK_PREMULTIPLY_ALPHA_WEBGL,K.premultiplyAlpha),N.pixelStorei(N.UNPACK_ALIGNMENT,K.unpackAlignment);const fs=N.getParameter(N.UNPACK_ROW_LENGTH),pi=N.getParameter(N.UNPACK_IMAGE_HEIGHT),Al=N.getParameter(N.UNPACK_SKIP_PIXELS),qg=N.getParameter(N.UNPACK_SKIP_ROWS),da=N.getParameter(N.UNPACK_SKIP_IMAGES);N.pixelStorei(N.UNPACK_ROW_LENGTH,ir.width),N.pixelStorei(N.UNPACK_IMAGE_HEIGHT,ir.height),N.pixelStorei(N.UNPACK_SKIP_PIXELS,Ct),N.pixelStorei(N.UNPACK_SKIP_ROWS,Kt),N.pixelStorei(N.UNPACK_SKIP_IMAGES,an),L.isDataTexture||L.isData3DTexture?N.texSubImage3D(kt,te,Zt,li,Li,je,at,Mt,ca,fi,ir.data):K.isCompressedArrayTexture?N.compressedTexSubImage3D(kt,te,Zt,li,Li,je,at,Mt,ca,ir.data):N.texSubImage3D(kt,te,Zt,li,Li,je,at,Mt,ca,fi,ir),N.pixelStorei(N.UNPACK_ROW_LENGTH,fs),N.pixelStorei(N.UNPACK_IMAGE_HEIGHT,pi),N.pixelStorei(N.UNPACK_SKIP_PIXELS,Al),N.pixelStorei(N.UNPACK_SKIP_ROWS,qg),N.pixelStorei(N.UNPACK_SKIP_IMAGES,da),0===te&&K.generateMipmaps&&N.generateMipmap(kt),Me.unbindTexture()},this.initRenderTarget=function(L){void 0===rt.get(L).__webglFramebuffer&&_t.setupRenderTarget(L)},this.initTexture=function(L){L.isCubeTexture?_t.setTextureCube(L,0):L.isData3DTexture?_t.setTexture3D(L,0):L.isDataArrayTexture||L.isCompressedArrayTexture?_t.setTexture2DArray(L,0):_t.setTexture2D(L,0),Me.unbindTexture()},this.resetState=function(){F=0,D=0,k=null,Me.reset(),Pn.reset()},typeof __THREE_DEVTOOLS__<"u"&&__THREE_DEVTOOLS__.dispatchEvent(new CustomEvent("observe",{detail:this}))}get coordinateSystem(){return td}get outputColorSpace(){return this._outputColorSpace}set outputColorSpace(t){this._outputColorSpace=t;const e=this.getContext();e.drawingBufferColorSpace=t===Yk?"display-p3":"srgb",e.unpackColorSpace=ei.workingColorSpace===LC?"display-p3":"srgb"}}class Pb extends Fr{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 rd,this.environmentIntensity=1,this.environmentRotation=new rd,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 DP{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=na()}onUploadCallback(){}set needsUpdate(t){!0===t&&this.version++}get updateRange(){return cg("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;r0){const r=e[n[0]];if(void 0!==r){this.morphTargetInfluences=[],this.morphTargetDictionary={};for(let s=0,o=r.length;sn)return;LP.applyMatrix4(i.matrixWorld);const l=t.ray.origin.distanceTo(LP);return lt.far?void 0:{distance:l,point:Z5.clone().applyMatrix4(i.matrixWorld),index:r,face:null,faceIndex:null,object:i}}const Q5=new O,J5=new O;class Ng extends mf{constructor(t,e){super(t,e),this.isLineSegments=!0,this.type="LineSegments"}computeLineDistances(){const t=this.geometry;if(null===t.index){const e=t.attributes.position,n=[];for(let r=0,s=e.count;r0){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 uc{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 d=n[r];return(r+(o-d)/(n[r+1]-d))/(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 xe:new O);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 O,r=[],s=[],o=[],a=new O,l=new Bt;for(let m=0;m<=t;m++)r[m]=this.getTangentAt(m/t,new O);s[0]=new O,o[0]=new O;let c=Number.MAX_VALUE;const d=Math.abs(r[0].x),h=Math.abs(r[0].y),p=Math.abs(r[0].z);d<=c&&(c=d,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(tr(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(tr(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 BP extends uc{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 xe){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(i$(a,l.x,c.x,d.x,h.x),i$(a,l.y,c.y,d.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]:(DS.subVectors(r[0],r[1]).add(r[0]),c=DS);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 d=c.getPoint(1);return this.currentPoint.copy(d),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 RS extends hn{constructor(t=[new xe(0,-.5),new xe(.5,0),new xe(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=tr(r,0,2*Math.PI);const s=[],o=[],a=[],l=[],c=[],d=1/e,h=new O,p=new xe,m=new O,g=new O,b=new O;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*d*r,C=Math.sin(x),F=Math.cos(x);for(let D=0;D<=t.length-1;D++)h.x=t[D].x*C,h.y=t[D].y,h.z=t[D].x*F,o.push(h.x,h.y,h.z),p.x=M/e,p.y=D/(t.length-1),a.push(p.x,p.y),c.push(l[3*D+0]*C,l[3*D+1],l[3*D+0]*F)}for(let M=0;M0&&x(!0),e>0&&x(!1)),this.setIndex(d),this.setAttribute("position",new ht(h,3)),this.setAttribute("normal",new ht(p,3)),this.setAttribute("uv",new ht(m,2))}copy(t){return super.copy(t),this.parameters=Object.assign({},t.parameters),this}static fromJSON(t){return new Bg(t.radiusTop,t.radiusBottom,t.height,t.radialSegments,t.heightSegments,t.openEnded,t.thetaStart,t.thetaLength)}}class PS extends Bg{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 PS(t.radius,t.height,t.radialSegments,t.heightSegments,t.openEnded,t.thetaStart,t.thetaLength)}}class Yb 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 d=[],h=new O,p=new O,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 F=0;F<=e;F++){const D=F/e;h.x=-t*Math.cos(r+D*s)*Math.sin(o+x*a),h.y=t*Math.cos(o+x*a),h.z=t*Math.sin(r+D*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(D+C,1-x),M.push(c++)}d.push(M)}for(let y=0;y0)&&m.push(d[y][M+1],C,D),(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 dispersion(){return this._dispersion}set dispersion(t){this._dispersion>0!=t>0&&this.version++,this._dispersion=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.dispersion=t.dispersion,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 zS extends Fo{constructor(t){super(),this.isMeshPhongMaterial=!0,this.type="MeshPhongMaterial",this.color=new qe(16777215),this.specular=new qe(1118481),this.shininess=30,this.map=null,this.lightMap=null,this.lightMapIntensity=1,this.aoMap=null,this.aoMapIntensity=1,this.emissive=new qe(0),this.emissiveIntensity=1,this.emissiveMap=null,this.bumpMap=null,this.bumpScale=1,this.normalMap=null,this.normalMapType=Jh,this.normalScale=new xe(1,1),this.displacementMap=null,this.displacementScale=1,this.displacementBias=0,this.specularMap=null,this.alphaMap=null,this.envMap=null,this.envMapRotation=new rd,this.combine=EC,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 v$(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 nO(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 iO(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 Xb{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 _$(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}}hc.prototype.TimeBufferType=Float32Array,hc.prototype.ValueBufferType=Float32Array,hc.prototype.DefaultInterpolation=xb;class zg extends hc{constructor(t,e,n){super(t,e,n)}}zg.prototype.ValueTypeName="bool",zg.prototype.ValueBufferType=Array,zg.prototype.DefaultInterpolation=bb,zg.prototype.InterpolantFactoryMethodLinear=void 0,zg.prototype.InterpolantFactoryMethodSmooth=void 0;class b$ extends hc{}b$.prototype.ValueTypeName="color";class Hg extends hc{}Hg.prototype.ValueTypeName="number";class Whe extends Xb{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 d=c+a;c!==d;c+=4)fo.slerpFlat(s,0,o,c-a,o,c,l);return s}}class $g extends hc{InterpolantFactoryMethodLinear(t){return new Whe(this.times,this.values,this.getValueSize(),t)}}$g.prototype.ValueTypeName="quaternion",$g.prototype.InterpolantFactoryMethodSmooth=void 0;class Gg extends hc{constructor(t,e,n){super(t,e,n)}}Gg.prototype.ValueTypeName="string",Gg.prototype.ValueBufferType=Array,Gg.prototype.DefaultInterpolation=bb,Gg.prototype.InterpolantFactoryMethodLinear=void 0,Gg.prototype.InterpolantFactoryMethodSmooth=void 0;class Wg extends hc{}Wg.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=na(),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(Yhe(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(hc.toJSON(n[s]));return r}static CreateFromMorphTargetSequence(t,e,n,r){const s=e.length,o=[];for(let a=0;a1){const h=d[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=[];iO(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:w$,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 ud={};class qhe extends Error{constructor(t,e){super(t),this.response=e}}class Ba extends bf{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=ku.get(t);if(void 0!==s)return this.manager.itemStart(t),setTimeout(()=>{e&&e(s),this.manager.itemEnd(t)},0),s;if(void 0!==ud[t])return void ud[t].push({onLoad:e,onProgress:n,onError:r});ud[t]=[],ud[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 d=ud[t],h=c.body.getReader(),p=c.headers.get("X-File-Size")||c.headers.get("Content-Length"),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 F=new ProgressEvent("progress",{lengthComputable:g,loaded:b,total:m});for(let D=0,k=d.length;D{y.error(x)})}()}});return new Response(v)}throw new qhe(`fetch for "${c.url}" responded with ${c.status}: ${c.statusText}`,c)}).then(c=>{switch(l){case"arraybuffer":return c.arrayBuffer();case"blob":return c.blob();case"document":return c.text().then(d=>(new DOMParser).parseFromString(d,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=>{ku.add(t,c);const d=ud[t];delete ud[t];for(let h=0,p=d.length;h{const d=ud[t];if(void 0===d)throw this.manager.itemError(t),c;delete ud[t];for(let h=0,p=d.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 HS extends bf{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=ku.get(t);if(void 0!==o)return s.manager.itemStart(t),setTimeout(function(){e&&e(o),s.manager.itemEnd(t)},0),o;const a=Mb("img");function l(){d(),ku.add(t,this),e&&e(this),s.manager.itemEnd(t)}function c(h){d(),r&&r(h),s.manager.itemError(t),s.manager.itemEnd(t)}function d(){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 Pu extends bf{constructor(t){super(t)}load(t,e,n,r){const s=new Oo,o=new HS(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 $S extends Fr{constructor(t,e=1){super(),this.isLight=!0,this.type="Light",this.color=new qe(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()),void 0!==this.target&&(e.object.target=this.target.uuid),e}}const rO=new Bt,M$=new O,C$=new O;class sO{constructor(t){this.camera=t,this.intensity=1,this.bias=0,this.normalBias=0,this.radius=1,this.blurSamples=8,this.mapSize=new xe(512,512),this.map=null,this.mapPass=null,this.matrix=new Bt,this.autoUpdate=!0,this.needsUpdate=!1,this._frustum=new aS,this._frameExtents=new xe(1,1),this._viewportCount=1,this._viewports=[new vi(0,0,1,1)]}getViewportCount(){return this._viewportCount}getFrustum(){return this._frustum}updateMatrices(t){const e=this.camera,n=this.matrix;M$.setFromMatrixPosition(t.matrixWorld),e.position.copy(M$),C$.setFromMatrixPosition(t.target.matrixWorld),e.lookAt(C$),e.updateMatrixWorld(),rO.multiplyMatrices(e.projectionMatrix,e.matrixWorldInverse),this._frustum.setFromProjectionMatrix(rO),n.set(.5,0,0,.5,0,.5,0,.5,0,0,.5,.5,0,0,0,1),n.multiply(rO)}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.intensity=t.intensity,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 1!==this.intensity&&(t.intensity=this.intensity),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 Khe extends sO{constructor(){super(new br(50,1,.5,500)),this.isSpotLightShadow=!0,this.focus=1}updateMatrices(t){const e=this.camera,n=2*ag*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 S$ extends $S{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(Fr.DEFAULT_UP),this.updateMatrix(),this.target=new Fr,this.distance=n,this.angle=r,this.penumbra=s,this.decay=o,this.map=null,this.shadow=new Khe}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 E$=new Bt,Zb=new O,oO=new O;class Zhe extends sO{constructor(){super(new br(90,1,.5,500)),this.isPointLightShadow=!0,this._frameExtents=new xe(4,2),this._viewportCount=6,this._viewports=[new vi(2,1,1,1),new vi(0,1,1,1),new vi(3,1,1,1),new vi(1,1,1,1),new vi(3,0,1,1),new vi(1,0,1,1)],this._cubeDirections=[new O(1,0,0),new O(-1,0,0),new O(0,0,1),new O(0,0,-1),new O(0,1,0),new O(0,-1,0)],this._cubeUps=[new O(0,1,0),new O(0,1,0),new O(0,1,0),new O(0,1,0),new O(0,0,1),new O(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()),Zb.setFromMatrixPosition(t.matrixWorld),n.position.copy(Zb),oO.copy(n.position),oO.add(this._cubeDirections[e]),n.up.copy(this._cubeUps[e]),n.lookAt(oO),n.updateMatrixWorld(),r.makeTranslation(-Zb.x,-Zb.y,-Zb.z),E$.multiplyMatrices(n.projectionMatrix,n.matrixWorldInverse),this._frustum.setFromProjectionMatrix(E$)}}class A$ extends $S{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 Zhe}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 Qhe extends sO{constructor(){super(new Rb(-5,5,5,-5,.5,500)),this.isDirectionalLightShadow=!0}}class D$ extends $S{constructor(t,e){super(t,e),this.isDirectionalLight=!0,this.type="DirectionalLight",this.position.copy(Fr.DEFAULT_UP),this.updateMatrix(),this.target=new Fr,this.shadow=new Qhe}dispose(){this.shadow.dispose()}copy(t){return super.copy(t),this.target=t.target.clone(),this.shadow=t.shadow.clone(),this}}class GS extends $S{constructor(t,e){super(t,e),this.isAmbientLight=!0,this.type="AmbientLight"}}class Ou{static decodeText(t){if(console.warn("THREE.LoaderUtils: decodeText() has been deprecated with r165 and will be removed with r175. Use TextDecoder instead."),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=ku.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 ku.add(t,c),e&&e(c),s.manager.itemEnd(t),c}).catch(function(c){r&&r(c),ku.remove(t),s.manager.itemError(t),s.manager.itemEnd(t)});ku.add(t,l),s.manager.itemStart(t)}}class O${constructor(t=!0){this.autoStart=t,this.startTime=0,this.oldTime=0,this.elapsedTime=0,this.running=!1}start(){this.startTime=F$(),this.oldTime=this.startTime,this.elapsedTime=0,this.running=!0}stop(){this.getElapsedTime(),this.running=!1,this.autoStart=!1}getElapsedTime(){return this.getDelta(),this.elapsedTime}getDelta(){let t=0;if(this.autoStart&&!this.running)return this.start(),0;if(this.running){const e=F$();t=(e-this.oldTime)/1e3,this.oldTime=e,this.elapsedTime+=t}return t}}function F$(){return(typeof performance>"u"?Date:performance).now()}const lO="\\[\\]\\.:\\/",cfe=new RegExp("["+lO+"]","g"),cO="[^"+lO+"]",dfe="[^"+lO.replace("\\.","")+"]",mfe=new RegExp("^"+/((?:WC+[\/:])*)/.source.replace("WC",cO)+/(WCOD+)?/.source.replace("WCOD",dfe)+/(?:\.(WC+)(?:\[(.+)\])?)?/.source.replace("WC",cO)+/\.(WC+)(?:\[(.+)\])?/.source.replace("WC",cO)+"$"),gfe=["material","materials","bones","map"];class _fe{constructor(t,e,n){const r=n||Ri.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 Ri=(()=>{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(cfe,"")}static parseTrackName(e){const n=mfe.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!==gfe.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;an.name===t||n.userData.name===t);return e?(e.removeFromParent(),new sa(e)):null}getBoundings(){return(new Vs).setFromObject(this.nativeMesh)}clone(){return new sa(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 Mn&&this.disposeMesh(t)}),this.nativeMesh instanceof Mn&&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 wfe extends sa{get supportsFov(){return this.nativeCamera instanceof br||"PerspectiveCamera"==this.nativeCamera.type}get fov(){return this.nativeCamera.fov||NaN}set fov(t){this.supportsFov&&(this.nativeCamera.fov=t,this.nativeCamera.updateProjectionMatrix())}constructor(t){super(t),this.nativeCamera=t}}class Mfe extends Gse{createMaterial(t){let e={};t.color?e={color:t.color}:t.diffuse||(e={color:super.randomColor()});let n=t.shading||"unlit";switch(n){case"unlit":return new qi(Object.assign(Object.assign({},e),{map:t.diffuse||null}));case"standart":return new qb(Object.assign(Object.assign({},e),{map:t.diffuse||null}));case"phong":return new zS(Object.assign(Object.assign({},e),{map:t.diffuse||null}));case"wireframe":return new qi(Object.assign(Object.assign({},e),{wireframe:!0}));default:throw new Error(`"${n}" shading not implemented for three.js`)}}transformPrimitiveZUp(t){t.geometry.rotateX(Math.PI/2)}createPrimitive(t,e={}){var n,r,s,o;let a=null,l=this.createMaterial(e);switch(t.shape){case"PLANE":a=new Mn(new Iu((null===(n=t.dimensions)||void 0===n?void 0:n.x)||1e4,(null===(r=t.dimensions)||void 0===r?void 0:r.y)||1e4,null===(s=t.segments)||void 0===s?void 0:s.x,null===(o=t.segments)||void 0===o?void 0:o.y),l);break;case"BOX":a=new Mn(new sf(...Re.spr(t.dimensions),...t.segments?Re.spr(t.segments):[]),l);break;case"CAPSULE":a=new Mn(new kS(t.radius,t.centersDistance,t.capSegments,t.radialSegments),l),this.transformPrimitiveZUp(a);break;case"CYLINDER":a=new Mn(new Bg(t.radius,t.radius,t.height,t.radialSegments,t.heightSegments),l),this.transformPrimitiveZUp(a);break;case"CONE":a=new Mn(new PS(t.radius,t.height,t.radialSegments,t.heightSegments),l),this.transformPrimitiveZUp(a);break;case"SPHERE":a=new Mn(new Yb(t.radius,t.widthSegments,t.heightSegments),l),this.transformPrimitiveZUp(a);break;case"COMPOUND":a=new No;for(const{position:d,rotation:h,shape:p}of t.children){const m=this.createPrimitive(p,e).nativeMesh;d&&m.position.set(...Re.spr(d)),h&&m.quaternion.set(...Yi.spr(h)),a.add(m)}break;case"MESH":const c=new hn;c.setFromPoints(t.vertices.map(d=>new O(...Re.spr(d)))),c.setIndex(t.faces.reduce((d,h)=>(d.push(...h),d),[])),a=new Mn(c,l)}if(!a)throw new Error(`Primitive with shape "${t.shape}" not implemented`);return void 0!==e.castShadow&&(a.castShadow=e.castShadow),void 0!==e.receiveShadow&&(a.receiveShadow=e.receiveShadow),new sa(a)}createPerspectiveCamera(t={}){return new wfe(new br(t.fov||75,t.aspectRatio||1,t.frustrum?t.frustrum.near:1,t.frustrum?t.frustrum.far:1e4))}}function Q$(i,t){if(t===Ooe)return console.warn("THREE.BufferGeometryUtils.toTrianglesDrawMode(): Geometry already defined as triangles."),i;if(t===jk||t===C4){let e=i.getIndex();if(null===e){const o=[],a=i.getAttribute("position");if(void 0===a)return console.error("THREE.BufferGeometryUtils.toTrianglesDrawMode(): Undefined position attribute. Processing not possible."),i;for(let l=0;l=2.0 are supported.")));const c=new ipe(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 d=0;d=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 Sfe(){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 Bn={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_DISPERSION:"KHR_materials_dispersion",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 Efe{constructor(t){this.parser=t,this.name=Bn.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 Vfe{constructor(t){this.parser=t,this.name=Bn.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 zfe{constructor(t){this.parser=t,this.name=Bn.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 Hfe{constructor(t){this.name=Bn.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 d=r.count,h=r.byteStride,p=new Uint8Array(a,r.byteOffset||0,r.byteLength||0);return o.decodeGltfBufferAsync?o.decodeGltfBufferAsync(d,h,p,r.mode,r.filter).then(function(m){return m.buffer}):o.ready.then(function(){const m=new ArrayBuffer(d*h);return o.decodeGltfBuffer(new Uint8Array(m),d,h,p,r.mode,r.filter),m})})}return null}}class $fe{constructor(t){this.name=Bn.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!==Ua.TRIANGLES&&c.mode!==Ua.TRIANGLE_STRIP&&c.mode!==Ua.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(d=>(l[c]=d,l[c])));return a.length<1?null:(a.push(this.parser.createNodeMesh(t)),Promise.all(a).then(c=>{const d=c.pop(),h=d.isGroup?d.children:[d],p=c[0].count,m=[];for(const g of h){const b=new Bt,v=new O,y=new fo,M=new O(1,1,1),x=new Y5(g.geometry,g.material,p);for(let C=0;C-1,o=s?a.match(/Firefox\/([0-9]+)\./)[1]:-1}this.textureLoader=typeof createImageBitmap>"u"||n&&r<17||s&&o<98?new Pu(this.options.manager):new sfe(this.options.manager),this.textureLoader.setCrossOrigin(this.options.crossOrigin),this.textureLoader.setRequestHeader(this.options.requestHeader),this.fileLoader=new Ba(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 Ef(s,a,r),hd(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,d]of o.children.entries())s(d,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(T,D[k*l+1]),l>=3&&v.setZ(T,D[k*l+2]),l>=4&&v.setW(T,D[k*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(d){d.flipY=!1,d.name=o.name||a.name||"",""===d.name&&"string"==typeof a.uri&&!1===a.uri.startsWith("data:image/")&&(d.name=a.uri);const p=(s.samplers||{})[o.sampler]||{};return d.magFilter=nG[p.magFilter]||cr,d.minFilter=nG[p.minFilter]||xl,d.wrapS=iG[p.wrapS]||Bs,d.wrapT=iG[p.wrapT]||Bs,r.associations.set(d,{textures:t}),d}).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 d=Promise.resolve(l).then(function(h){return new Promise(function(p,m){let g=p;!0===e.isImageBitmapLoader&&(g=function(b){const v=new Oo(b);v.needsUpdate=!0,p(v)}),e.load(Ou.resolveURL(h,s.path),g,void 0,m)})}).then(function(h){return!0===c&&a.revokeObjectURL(l),hd(h,o),h.userData.mimeType=o.mimeType||function tpe(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]=d,d}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[Bn.KHR_TEXTURE_TRANSFORM]){const a=void 0!==n.extensions?n.extensions[Bn.KHR_TEXTURE_TRANSFORM]:void 0;if(a){const l=s.associations.get(o);o=s.extensions[Bn.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,Fo.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 us,Fo.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 qb}loadMaterial(t){const e=this,r=this.extensions,s=this.json.materials[t];let o;const a={},c=[];if((s.extensions||{})[Bn.KHR_MATERIALS_UNLIT]){const h=r[Bn.KHR_MATERIALS_UNLIT];o=h.getMaterialType(),c.push(h.extendParams(a,s,e))}else{const h=s.pbrMetallicRoughness||{};if(a.color=new qe(1,1,1),a.opacity=1,Array.isArray(h.baseColorFactor)){const p=h.baseColorFactor;a.color.setRGB(p[0],p[1],p[2],ds),a.opacity=p[3]}void 0!==h.baseColorTexture&&c.push(e.assignTexture(a,"map",h.baseColorTexture,cs)),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=Ns);const d=s.alphaMode||"OPAQUE";if("BLEND"===d?(a.transparent=!0,a.depthWrite=!1):(a.transparent=!1,"MASK"===d&&(a.alphaTest=void 0!==s.alphaCutoff?s.alphaCutoff:.5)),void 0!==s.normalTexture&&o!==qi&&(c.push(e.assignTexture(a,"normalMap",s.normalTexture)),a.normalScale=new xe(1,1),void 0!==s.normalTexture.scale)){const h=s.normalTexture.scale;a.normalScale.set(h,h)}if(void 0!==s.occlusionTexture&&o!==qi&&(c.push(e.assignTexture(a,"aoMap",s.occlusionTexture)),void 0!==s.occlusionTexture.strength&&(a.aoMapIntensity=s.occlusionTexture.strength)),void 0!==s.emissiveFactor&&o!==qi){const h=s.emissiveFactor;a.emissive=(new qe).setRGB(h[0],h[1],h[2],ds)}return void 0!==s.emissiveTexture&&o!==qi&&c.push(e.assignTexture(a,"emissiveMap",s.emissiveTexture,cs)),Promise.all(c).then(function(){const h=new o(a);return s.name&&(h.name=s.name),hd(h,s),e.associations.set(h,{materials:t}),s.extensions&&Ef(r,h,s),h})}createUniqueName(t){const e=Ri.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[Bn.KHR_DRACO_MESH_COMPRESSION].decodePrimitive(a,e).then(function(l){return rG(l,a,e)})}const o=[];for(let a=0,l=t.length;a0&&Jfe(y,s),y.name=e.createUniqueName(s.name||"mesh_"+t),hd(y,s),v.extensions&&Ef(r,y,v),e.assignFinalMaterial(y),h.push(y)}for(let m=0,g=h.length;m1?new No:1===c.length?c[0]:new Fr,d!==c[0])for(let h=0,p=c.length;h{const h=new Map;for(const[p,m]of r.associations)(p instanceof Fo||p instanceof Oo)&&h.set(p,m);return d.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(Lu[s.path]===Lu.weights?t.traverse(function(p){p.morphTargetInfluences&&l.push(p.name?p.name:p.uuid)}):l.push(a),Lu[s.path]){case Lu.weights:c=Hg;break;case Lu.rotation:c=$g;break;case Lu.position:case Lu.scale:c=Wg;break;default:c=1===n.itemSize?Hg:Wg}const d=void 0!==r.interpolation?Kfe[r.interpolation]:xb,h=this._getArrayFromAccessor(n);for(let p=0,m=l.length;p{r.type.endsWith("Light")&&(console.warn("WORKAROUND: light intensity from GLB divided by 200."),r.intensity*=.005)}),new sa(n.scene)})}}const go=(i,t)=>Array(i).fill(null).map((e,n)=>t(n));class Af{static startDebugView(t,e){let n=this.activeDebugViews.get(t);return n?n.renderers.includes(e)||n.renderers.push(e):(n={view:new Af(t),renderers:[e]},this.activeDebugViews.set(t,n)),n.view}static stopDebugView(t,e){const n=t.world,r=this.activeDebugViews.get(n);r&&(r.renderers=r.renderers.filter(s=>s!==e),0===r.renderers.length&&(r.view.dispose(),this.activeDebugViews.delete(n)))}constructor(t){this.world=t,this.debugScene=null,this.aSub=null,this.rSub=null,this.syncMap=new Map,this.debugScene=new Pb;const e=n=>{var r,s;const o=n.debugBodySettings;let c,l=this.lineSegmentPointsForShape(o.shape);c=l?new Ng((new hn).setFromPoints(l)):null===(r=this.world)||void 0===r?void 0:r.visualScene.factory.createPrimitive(o.shape,{shading:"wireframe",color:0}).nativeMesh,this.syncMap.set(n,c),null===(s=this.debugScene)||void 0===s||s.add(c)};for(const n of this.world.physicsWorld.children)e(n);this.aSub=this.world.physicsWorld.added$.subscribe(n=>e(n)),this.rSub=this.world.physicsWorld.removed$.subscribe(n=>{var r;const s=this.syncMap.get(n);s&&(this.syncMap.delete(n),null===(r=this.debugScene)||void 0===r||r.remove(s))})}get scene(){return this.debugScene}render(t,e){for(const[r,s]of this.syncMap.entries()){const o=r.debugBodySettings;if(o.ignoreTransform||(s.position.set(...Re.spr(r.position)),s.quaternion.set(...Yi.spr(r.rotation))),s.material){let a=16777215;switch(o.type){case"RIGID_DYNAMIC":a=o.sleeping?255:16711680;break;case"RIGID_STATIC":a=65280;break;case"TRIGGER":a=16776960}s.material.color.set(a),s.material.needsUpdate=!0}}const n=t.autoClearColor;n&&(t.autoClearColor=!1),t.render(this.debugScene,e),n&&(t.autoClearColor=!0)}lineSegmentPointsForShape(t){if("BOX"===t.shape){const e=Re.scalarMult(t.dimensions,.5);return[...go(8,n=>new O(n<4?e.x:-e.x,n%4<2?e.y:-e.y,n%2?e.z:-e.z)),...go(8,n=>new O(n%2?e.x:-e.x,n<4?e.y:-e.y,n%4<2?e.z:-e.z)),...go(8,n=>new O(n%4<2?e.x:-e.x,n%2?e.y:-e.y,n<4?e.z:-e.z))]}if("CYLINDER"===t.shape)return[...go(32,e=>new O(t.radius*Math.sin(Math.floor((e+1)/2)*Math.PI/8),t.radius*Math.cos(Math.floor((e+1)/2)*Math.PI/8),-t.height/2)),...go(32,e=>new O(t.radius*Math.sin(Math.floor((e+1)/2)*Math.PI/8),t.radius*Math.cos(Math.floor((e+1)/2)*Math.PI/8),t.height/2)),...go(8,e=>new O(Math.floor(e/2)%2?0:e<4?t.radius:-t.radius,Math.floor(e/2)%2?e<4?t.radius:-t.radius:0,e%2?t.height/2:-t.height/2)),new O(0,0,-t.height/2),new O(0,0,t.height/2)];if("CONE"===t.shape)return[...go(32,e=>new O(t.radius*Math.sin(Math.floor((e+1)/2)*Math.PI/8),t.radius*Math.cos(Math.floor((e+1)/2)*Math.PI/8),-t.height/2)),...go(8,e=>new O(e%2||Math.floor(e/2)%2?0:e<4?t.radius:-t.radius,e%2?0:Math.floor(e/2)%2?e<4?t.radius:-t.radius:0,e%2?t.height/2:-t.height/2)),new O(0,0,-t.height/2),new O(0,0,t.height/2)];if("SPHERE"===t.shape)return[...go(32,e=>new O(t.radius*Math.sin(Math.floor((e+1)/2)*Math.PI/8),t.radius*Math.cos(Math.floor((e+1)/2)*Math.PI/8),0)),...go(32,e=>new O(t.radius*Math.sin(Math.floor((e+1)/2)*Math.PI/8),0,t.radius*Math.cos(Math.floor((e+1)/2)*Math.PI/8))),...go(32,e=>new O(0,t.radius*Math.sin(Math.floor((e+1)/2)*Math.PI/8),t.radius*Math.cos(Math.floor((e+1)/2)*Math.PI/8)))];if("CAPSULE"===t.shape)return[...this.lineSegmentPointsForShape({shape:"CYLINDER",radius:t.radius,height:t.centersDistance}),...go(16,e=>new O(t.radius*Math.cos(Math.floor((e+1)/2)*Math.PI/8),0,t.radius*Math.sin(Math.floor((e+1)/2)*Math.PI/8)+t.centersDistance/2)),...go(16,e=>new O(t.radius*Math.cos(Math.floor((e+1)/2)*Math.PI/8),0,-t.radius*Math.sin(Math.floor((e+1)/2)*Math.PI/8)-t.centersDistance/2)),...go(16,e=>new O(0,t.radius*Math.cos(Math.floor((e+1)/2)*Math.PI/8),t.radius*Math.sin(Math.floor((e+1)/2)*Math.PI/8)+t.centersDistance/2)),...go(16,e=>new O(0,t.radius*Math.cos(Math.floor((e+1)/2)*Math.PI/8),-t.radius*Math.sin(Math.floor((e+1)/2)*Math.PI/8)-t.centersDistance/2))];if("CONVEX_HULL"===t.shape)return[...t.vertices.map(n=>[new O(n.x-.05,n.y,n.z),new O(n.x+.05,n.y,n.z),new O(n.x,n.y-.05,n.z),new O(n.x,n.y+.05,n.z),new O(n.x,n.y,n.z-.05),new O(n.x,n.y,n.z+.05)]).reduce((n,r)=>(n.push(...r),n),[])];if("COMPOUND"===t.shape){const e=[];for(const{position:n,shape:r,rotation:s}of t.children){let o=this.lineSegmentPointsForShape(r);if(!o)return null;e.push(...o.map(a=>new O(...Re.spr(Re.add(n||Re.O,Re.rot(a,s||Yi.O))))))}return e}return null}dispose(){var t,e;this.debugScene=null,null===(t=this.aSub)||void 0===t||t.unsubscribe(),null===(e=this.rSub)||void 0===e||e.unsubscribe(),this.syncMap=new Map}}Af.activeDebugViews=new Map;class sG extends Lse{get physicsDebugViewActive(){return this._physicsDebugViewActive}set physicsDebugViewActive(t){this._physicsDebugViewActive!=t&&(this._physicsDebugViewActive=t,this.world&&(t?this.debugView=Af.startDebugView(this.world,this):(Af.stopDebugView(this.debugView,this),this.debugView=null)))}constructor(t,e,n,r={}){super(t,n,r),this.scene=t,this.camera=e,this.canvas=n,this.world=null,this.debugView=null,this._physicsDebugViewActive=!1,this.nativeRenderer=new Uue(Object.assign({canvas:n,alpha:this.rendererOptions.transparent},this.rendererOptions)),this.nativeRenderer.shadowMap.enabled=!0,this.nativeRenderer.setClearColor(this.rendererOptions.background),this.nativeRenderer.shadowMap.type=c4,this.nativeRenderer.setPixelRatio(this.rendererOptions.forceResolution||devicePixelRatio)}addToWorld(t){this.world=t,this.physicsDebugViewActive&&(this.debugView=Af.startDebugView(this.world,this))}removeFromWorld(t){this.physicsDebugViewActive&&(Af.stopDebugView(this.debugView,this),this.debugView=null),this.world=null}resizeRenderer(t){this.nativeRenderer.setSize(t.x,t.y),(this.camera.nativeCamera instanceof br||"PerspectiveCamera"==this.camera.nativeCamera.type)&&Math.abs(this.camera.nativeCamera.aspect-t.x/t.y)>.01&&(this.camera.nativeCamera.aspect=t.x/t.y,this.camera.nativeCamera.updateProjectionMatrix())}render(){this.nativeRenderer.render(this.scene.nativeScene,this.camera.nativeCamera),this.physicsDebugViewActive&&this.debugView.render(this.nativeRenderer,this.camera.nativeCamera)}dispose(){this.camera.dispose(),this.nativeRenderer.clear(),this.nativeRenderer.dispose(),this.nativeRenderer.domElement=null}}const ape={name:"CopyShader",uniforms:{tDiffuse:{value:null},opacity:{value:1}},vertexShader:"\n\n\t\tvarying vec2 vUv;\n\n\t\tvoid main() {\n\n\t\t\tvUv = uv;\n\t\t\tgl_Position = projectionMatrix * modelViewMatrix * vec4( position, 1.0 );\n\n\t\t}",fragmentShader:"\n\n\t\tuniform float opacity;\n\n\t\tuniform sampler2D tDiffuse;\n\n\t\tvarying vec2 vUv;\n\n\t\tvoid main() {\n\n\t\t\tvec4 texel = texture2D( tDiffuse, vUv );\n\t\t\tgl_FragColor = opacity * texel;\n\n\n\t\t}"};class QS{constructor(){this.isPass=!0,this.enabled=!0,this.needsSwap=!0,this.clear=!1,this.renderToScreen=!1}setSize(){}render(){console.error("THREE.Pass: .render() must be implemented in derived pass.")}dispose(){}}const lpe=new Rb(-1,1,1,-1,0,1),dpe=new class cpe extends hn{constructor(){super(),this.setAttribute("position",new ht([-1,3,0,-1,-1,0,3,-1,0],3)),this.setAttribute("uv",new ht([0,2,0,0,2,0],2))}};class upe{constructor(t){this._mesh=new Mn(dpe,t)}dispose(){this._mesh.geometry.dispose()}render(t){t.render(this._mesh,lpe)}get material(){return this._mesh.material}set material(t){this._mesh.material=t}}class hpe extends QS{constructor(t,e){super(),this.textureID=void 0!==e?e:"tDiffuse",t instanceof Sl?(this.uniforms=t.uniforms,this.material=t):t&&(this.uniforms=Q4.clone(t.uniforms),this.material=new Sl({name:void 0!==t.name?t.name:"unspecified",defines:Object.assign({},t.defines),uniforms:this.uniforms,vertexShader:t.vertexShader,fragmentShader:t.fragmentShader})),this.fsQuad=new upe(this.material)}render(t,e,n){this.uniforms[this.textureID]&&(this.uniforms[this.textureID].value=n.texture),this.fsQuad.material=this.material,this.renderToScreen?(t.setRenderTarget(null),this.fsQuad.render(t)):(t.setRenderTarget(e),this.clear&&t.clear(t.autoClearColor,t.autoClearDepth,t.autoClearStencil),this.fsQuad.render(t))}dispose(){this.material.dispose(),this.fsQuad.dispose()}}class oG extends QS{constructor(t,e){super(),this.scene=t,this.camera=e,this.clear=!0,this.needsSwap=!1,this.inverse=!1}render(t,e,n){const r=t.getContext(),s=t.state;let o,a;s.buffers.color.setMask(!1),s.buffers.depth.setMask(!1),s.buffers.color.setLocked(!0),s.buffers.depth.setLocked(!0),this.inverse?(o=0,a=1):(o=1,a=0),s.buffers.stencil.setTest(!0),s.buffers.stencil.setOp(r.REPLACE,r.REPLACE,r.REPLACE),s.buffers.stencil.setFunc(r.ALWAYS,o,4294967295),s.buffers.stencil.setClear(a),s.buffers.stencil.setLocked(!0),t.setRenderTarget(n),this.clear&&t.clear(),t.render(this.scene,this.camera),t.setRenderTarget(e),this.clear&&t.clear(),t.render(this.scene,this.camera),s.buffers.color.setLocked(!1),s.buffers.depth.setLocked(!1),s.buffers.color.setMask(!0),s.buffers.depth.setMask(!0),s.buffers.stencil.setLocked(!1),s.buffers.stencil.setFunc(r.EQUAL,1,4294967295),s.buffers.stencil.setOp(r.KEEP,r.KEEP,r.KEEP),s.buffers.stencil.setLocked(!0)}}class fpe extends QS{constructor(){super(),this.needsSwap=!1}render(t){t.state.buffers.stencil.setLocked(!1),t.state.buffers.stencil.setTest(!1)}}class ppe{constructor(t,e){if(this.renderer=t,this._pixelRatio=t.getPixelRatio(),void 0===e){const n=t.getSize(new xe);this._width=n.width,this._height=n.height,(e=new Mu(this._width*this._pixelRatio,this._height*this._pixelRatio,{type:Jm})).texture.name="EffectComposer.rt1"}else this._width=e.width,this._height=e.height;this.renderTarget1=e,this.renderTarget2=e.clone(),this.renderTarget2.texture.name="EffectComposer.rt2",this.writeBuffer=this.renderTarget1,this.readBuffer=this.renderTarget2,this.renderToScreen=!0,this.passes=[],this.copyPass=new hpe(ape),this.copyPass.material.blending=Jc,this.clock=new O$}swapBuffers(){const t=this.readBuffer;this.readBuffer=this.writeBuffer,this.writeBuffer=t}addPass(t){this.passes.push(t),t.setSize(this._width*this._pixelRatio,this._height*this._pixelRatio)}insertPass(t,e){this.passes.splice(e,0,t),t.setSize(this._width*this._pixelRatio,this._height*this._pixelRatio)}removePass(t){const e=this.passes.indexOf(t);-1!==e&&this.passes.splice(e,1)}isLastEnabledPass(t){for(let e=t+1;e0?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;lG.fromArray(r,t),bO.fromArray(r,e),cG.fromArray(r,n),Va.subVectors(cG,bO),dG.subVectors(lG,bO),Va.cross(dG),Va.normalize(),s.push(Va.x,Va.y,Va.z),s.push(Va.x,Va.y,Va.z),s.push(Va.x,Va.y,Va.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 d=this.vertices.length;let h=this.parseVertexIndex(t,d),p=this.parseVertexIndex(e,d),m=this.parseVertexIndex(n,d);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?(JS.setRGB(parseFloat(h[4]),parseFloat(h[5]),parseFloat(h[6])).convertSRGBToLinear(),e.colors.push(JS.r,JS.g,JS.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"===d){const p=c.slice(1).trim().split(aG),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 No;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 ht(d.normals,3)),d.colors.length>0&&(g=!0,b.setAttribute("color",new ht(d.colors,3))),!0===d.hasUVIndices&&b.setAttribute("uv",new ht(d.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 ht(e.vertices,3)),e.colors.length>0&&void 0!==e.colors[0]&&(l.setAttribute("color",new ht(e.colors,3)),a.vertexColors=!0);const c=new zb(l,a);s.add(c)}return s}}class xO extends bf{constructor(t){super(t)}load(t,e,n,r){const s=this,o=""===this.path?Ou.extractUrlBase(t):this.path,a=new Ba(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,d):c;h=h.toLowerCase();let p=d>=0?c.substring(d+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 Mpe(this.resourcePath||e,this.materialOptions);return a.setCrossOrigin(this.crossOrigin),a.setManager(this.manager),a.setMaterials(o),a}}class Mpe{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:lc,this.wrap=void 0!==this.options.wrap?this.options.wrap:Bs}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),d=e.loadTexture(function s(a,l){return"string"!=typeof l||""===l?"":/^https?:\/\//i.test(l)?l:a+l}(e.baseUrl,c.url));d.repeat.copy(c.scale),d.offset.copy(c.offset),d.wrapS=e.wrap,d.wrapT=e.wrap,("map"===a||"emissiveMap"===a)&&(d.colorSpace=cs),r[a]=d}for(const a in n){const l=n[a];let c;if(""!==l)switch(a.toLowerCase()){case"kd":r.color=(new qe).fromArray(l).convertSRGBToLinear();break;case"ks":r.specular=(new qe).fromArray(l).convertSRGBToLinear();break;case"ke":r.emissive=(new qe).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 zS(r),this.materials[t]}getTextureParams(t,e){const n={scale:new xe(1,1),offset:new xe(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:w$;let a=o.getHandler(t);null===a&&(a=new Pu(o)),a.setCrossOrigin&&a.setCrossOrigin(this.crossOrigin);const l=a.load(t,n,r,s);return void 0!==e&&(l.mapping=e),l}}const Cpe=["determinateSpinner"];function Spe(i,t){if(1&i&&(ki(),G(0,"svg",11),Ie(1,"circle",12),j()),2&i){const e=re();It("viewBox",e._viewBox()),V(1),qo("stroke-dasharray",e._strokeCircumference(),"px")("stroke-dashoffset",e._strokeCircumference()/2,"px")("stroke-width",e._circleStrokeWidth(),"%"),It("r",e._circleRadius())}}const Epe=Jy(class{constructor(i){this._elementRef=i}},"primary"),Ape=new me("mat-progress-spinner-default-options",{providedIn:"root",factory:function Dpe(){return{diameter:uG}}}),uG=100;let e0=(()=>{class i extends Epe{constructor(e,n,r){super(e),this.mode="mat-spinner"===this._elementRef.nativeElement.nodeName.toLowerCase()?"indeterminate":"determinate",this._value=0,this._diameter=uG,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,Ps(e)))}get diameter(){return this._diameter}set diameter(e){this._diameter=Ps(e)}get strokeWidth(){return this._strokeWidth??this.diameter/10}set strokeWidth(e){this._strokeWidth=Ps(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)(E(vt),E(kr,8),E(Ape))},i.\u0275cmp=ot({type:i,selectors:[["mat-progress-spinner"],["mat-spinner"]],viewQuery:function(e,n){if(1&e&&$n(Cpe,5),2&e){let r;At(r=Dt())&&(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&&(It("aria-valuemin",0)("aria-valuemax",100)("aria-valuenow","determinate"===n.mode?n.value:null)("mode",n.mode),qo("width",n.diameter,"px")("height",n.diameter,"px"),ln("_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:[dt],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&&(fe(0,Spe,2,8,"ng-template",null,0,zc),G(2,"div",1,2),ki(),G(4,"svg",3),Ie(5,"circle",4),j()(),ya(),G(6,"div",5)(7,"div",6)(8,"div",7),sy(9,8),j(),G(10,"div",9),sy(11,8),j(),G(12,"div",10),sy(13,8),j()()()),2&e){const r=Zi(1);V(4),It("viewBox",n._viewBox()),V(1),qo("stroke-dasharray",n._strokeCircumference(),"px")("stroke-dashoffset",n._strokeDashOffset(),"px")("stroke-width",n._circleStrokeWidth(),"%"),It("r",n._circleRadius()),V(4),U("ngTemplateOutlet",r),V(2),U("ngTemplateOutlet",r),V(2),U("ngTemplateOutlet",r)}},dependencies:[xy],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})(),Ipe=(()=>{class i{}return i.\u0275fac=function(e){return new(e||i)},i.\u0275mod=en({type:i}),i.\u0275inj=Wt({imports:[co,Jn]}),i})();const Rpe=["previewCanvasContainer"],kpe=["previewCanvas"];function Ppe(i,t){if(1&i){const e=jn();Gr(0),G(1,"label",11),Be(2),j(),G(3,"input",12),Oe("change",function(r){Vt(e);const s=re().$implicit;return s.value=r.currentTarget.checked,Et(s.change(s.value))}),j(),Wr()}if(2&i){const e=re(),n=e.index,r=e.$implicit,s=re().index;V(1),U("for","custom_control_"+s+"_"+n),V(1),ui(r.label),V(1),U("id","custom_control_"+s+"_"+n)("type",r.type)("checked",r.value)}}function Ope(i,t){if(1&i){const e=jn();G(0,"div",9)(1,"label",11),Be(2),j(),G(3,"input",14),Oe("change",function(){const s=Vt(e).$implicit,o=re(2).$implicit;return o.value=s,Et(o.change(o.value))}),j()()}if(2&i){const e=t.$implicit,n=re(2),r=n.index,s=n.$implicit,o=re().index;V(1),U("for","custom_control_"+o+"_"+r+"_"+e),V(1),ui(e),V(1),U("id","custom_control_"+o+"_"+r+"_"+e)("checked",s.value===e)}}function Fpe(i,t){if(1&i&&(G(0,"div",13)(1,"label"),Be(2),j(),fe(3,Ope,4,4,"div",8),j()),2&i){const e=re().$implicit;V(2),ui(e.label),V(1),U("ngForOf",e.options)}}function Lpe(i,t){if(1&i){const e=jn();Gr(0),G(1,"label",11),Be(2),j(),G(3,"input",15),Oe("colorChange",function(r){Vt(e);const s=re().$implicit,o=re(2);return s.value=o.toRGB(r.value),Et(s.change(s.value))}),j(),Ie(4,"ngx-mat-color-toggle",16)(5,"ngx-mat-color-picker",null,17),Wr()}if(2&i){const e=Zi(6),n=re(),r=n.index,s=n.$implicit,o=re().index;V(1),U("for","custom_control_"+o+"_"+r),V(1),ui(s.label),V(1),U("ngxMatColorPicker",e),V(1),U("for",e)}}function Npe(i,t){if(1&i){const e=jn();Gr(0),G(1,"label",11),Be(2),j(),G(3,"input",18),Oe("change",function(r){Vt(e);const s=re().$implicit;return s.value=r.currentTarget.value,Et(s.change(s.value))}),j(),Wr()}if(2&i){const e=re(),n=e.index,r=e.$implicit,s=re().index;V(1),U("for","custom_control_"+s+"_"+n),V(1),ui(r.label),V(1),U("id","custom_control_"+s+"_"+n)("min",r.minValue)("max",r.maxValue)("step",r.valueStep)("value",r.value)}}function Bpe(i,t){if(1&i&&(G(0,"div",9),fe(1,Ppe,4,5,"ng-container",6),fe(2,Fpe,4,2,"div",10),fe(3,Lpe,7,4,"ng-container",6),fe(4,Npe,4,7,"ng-container",6),j()),2&i){const e=t.$implicit;V(1),U("ngIf","checkbox"===e.type),V(1),U("ngIf","radio"===e.type),V(1),U("ngIf","color"===e.type),V(1),U("ngIf","slider"===e.type)}}function Upe(i,t){if(1&i&&(Gr(0),G(1,"h4"),Be(2),j(),fe(3,Bpe,5,4,"div",8),Wr()),2&i){const e=t.$implicit;V(2),ui(e.title),V(1),U("ngForOf",e.controls)}}function Vpe(i,t){if(1&i){const e=jn();G(0,"div",9)(1,"label",11),Be(2),j(),G(3,"input",19),Oe("change",function(r){return Et(Vt(e).$implicit.visible=r.currentTarget.checked)}),j()()}if(2&i){const e=t.$implicit;V(1),U("for","visibility_"+e.name),V(1),ui(e.name),V(1),U("id","visibility_"+e.name)("checked",e.visible)}}function zpe(i,t){if(1&i&&(Gr(0),G(1,"h4"),Be(2,"Objects visibility"),j(),fe(3,Vpe,4,4,"div",8),Wr()),2&i){const e=re();V(3),U("ngForOf",e.meshes)}}function Hpe(i,t){1&i&&Ie(0,"mat-spinner",20)}const oa=i=>{i.colorSpace="srgb",i.anisotropy=8,i.magFilter=vr,i.minFilter=vr};let hG=(()=>{class i{constructor(e){this.cdr=e,this.visibilityControls=!0,this.groupFunction=null,this.customControls=[],this.onObjectLoaded=new $e,this._paths$=new Qe(null),this.destroyed$=new Te,this.entity=null,this.meshes=[]}get paths(){return this._paths$.getValue()}set paths(e){this._paths$.next(e)}ngAfterViewInit(){var e=this;return nt(function*(){var s;e.world=new ok(new yO,{init:(s=nt(function*(){}),function(){return s.apply(this,arguments)}),simulate:()=>{}}),yield e.world.init(),e.world.visualScene.nativeScene.add(new GS(16777215,2));let n=new Qe({x:1,y:1});e.renderer=e.world.addRenderer(e.world.visualScene.factory.createPerspectiveCamera({frustrum:{near:.01,far:1e4}}),e.previewCanvas.nativeElement,{size:n.asObservable(),background:11184810}),e.controller=new Hse(e.renderer,{mouseOptions:{canvas:e.previewCanvas.nativeElement},orbiting:{sensitivityX:2,sensitivityY:2},orbitingElasticity:30}),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(Ue(e.destroyed$)).subscribe(function(){var s=nt(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 Jb,h=yield(new xO).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 No;y.add(...b[v]),y.name=v,p.remove(...b[v]),p.add(y)}}e.meshes=p.children,e.meshes.sort((b,v)=>b.name>v.name?1:-1),p.traverse(b=>{if(b instanceof Mn){const v=b.material instanceof Array?b.material:[b.material];for(const y of v)y.transparent=!0,y.alphaTest=.5,y instanceof qi&&y.map&&(y.map.wrapS=er,y.map.wrapT=er,oa(y.map),y.map.needsUpdate=!0)}}),e.onObjectLoaded.next(p),e.entity=new ea({object3D:new sa(p)}),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=Re.scalarMult(Re.add(m.min,m.max),.5),e.controller.spherical={phi:1.22,theta:-1.32,radius:Re.dist(m.min,m.max)},e.cdr.markForCheck()}});return function(o){return s.apply(this,arguments)}}())})()}toRGB(e){return(e?.r||0)<<16|(e?.g||0)<<8|(e?.b||0)}ngOnDestroy(){this.destroyed$.next(),this.destroyed$.complete()}}return i.\u0275fac=function(e){return new(e||i)(E(Qn))},i.\u0275cmp=ot({type:i,selectors:[["app-obj-viewer"]],viewQuery:function(e,n){if(1&e&&($n(Rpe,5),$n(kpe,5)),2&e){let r;At(r=Dt())&&(n.previewCanvasContainer=r.first),At(r=Dt())&&(n.previewCanvas=r.first)}},inputs:{paths:"paths",visibilityControls:"visibilityControls",groupFunction:"groupFunction",customControls:"customControls"},outputs:{onObjectLoaded:"onObjectLoaded"},decls:8,vars:3,consts:[[1,"previewCanvasContainer"],["previewCanvasContainer",""],["width","640","height","480"],["previewCanvas",""],["id","controls"],[4,"ngFor","ngForOf"],[4,"ngIf"],["mode","indeterminate",4,"ngIf"],["class","controls-list",4,"ngFor","ngForOf"],[1,"controls-list"],["style","width: 100%",4,"ngIf"],[3,"for"],[3,"id","type","checked","change"],[2,"width","100%"],["type","radio",3,"id","checked","change"],["matInput","",1,"hidden",3,"ngxMatColorPicker","colorChange"],["matSuffix","",3,"for"],["picker",""],["type","range",3,"id","min","max","step","value","change"],["type","checkbox",3,"id","checked","change"],["mode","indeterminate"]],template:function(e,n){1&e&&(G(0,"div",0,1),Ie(2,"canvas",2,3),G(4,"div",4),fe(5,Upe,4,2,"ng-container",5),fe(6,zpe,4,1,"ng-container",6),j(),fe(7,Hpe,1,0,"mat-spinner",7),j()),2&e&&(V(5),U("ngForOf",n.customControls),V(1),U("ngIf",n.visibilityControls),V(1),U("ngIf",!n.entity))},dependencies:[lo,_i,Xte,rc,e0,jie,bC,NH],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%] > h4[_ngcontent-%COMP%]{margin:0}.previewCanvasContainer[_ngcontent-%COMP%] #controls[_ngcontent-%COMP%] .controls-list[_ngcontent-%COMP%]{width:100%;display:flex;-webkit-user-select:none;user-select:none;align-items:center}.previewCanvasContainer[_ngcontent-%COMP%] #controls[_ngcontent-%COMP%] .controls-list[_ngcontent-%COMP%] > span[_ngcontent-%COMP%]{flex-grow:1}.previewCanvasContainer[_ngcontent-%COMP%] #controls[_ngcontent-%COMP%] .controls-list[_ngcontent-%COMP%] > label[_ngcontent-%COMP%]{flex-grow:1}"],changeDetection:0}),i})();function $pe(i,t){if(1&i){const e=jn();ki(),G(0,"circle",5),Oe("mousedown",function(r){return Vt(e),Et(re().startDrag(r))}),ct(1,"async"),ct(2,"async"),j()}if(2&i){const e=re();let n,r;It("cx",(null==(n=ut(1,3,e.mapPointer$))?null:n.x)||0)("cy",(null==(r=ut(2,5,e.mapPointer$))?null:r.y)||0)("r",10)}}const Gpe=function(){return{"stroke-width":3}};let fG=(()=>{class i{constructor(e){this.ref=e,this._roadSpline$=new Qe([]),this._pointer$=new Qe(null),this._projection$=new Qe("nz"),this._roadSplineProjected$=new Qe([]),this._pointerProjected$=new Qe(yi.O),this.splineClosed=!1,this.pointerChange=new $e,this.svgSize$=new Qe({x:100,y:100}),this.scalingSquare$=new Qe({x:0,y:0,width:100,height:100}),this.mapPolyline$=new Qe(""),this.mapPointer$=new Qe(null),this.isShiftPressed=!1,this.destroyed$=new Te,this.isDragging=!1}set roadSpline(e){this._roadSpline$.next(e)}set pointer(e){this._pointer$.next(e)}set projection(e){this._projection$.next(e)}get trackLength$(){return this._roadSpline$.pipe(tt(e=>{let n=0;for(let r=1;r{"Shift"===n.key&&(this.isShiftPressed=!0)}),To(window,"keyup").pipe(Ue(this.destroyed$)).subscribe(n=>{"Shift"===n.key&&(this.isShiftPressed=!1)}),Ra([this._roadSpline$,this._projection$]).pipe(Ue(this.destroyed$)).subscribe(([n,r])=>{this._roadSplineProjected$.next(n.map(s=>this.project(s)))}),Ra([this._pointer$,this._projection$]).pipe(Ue(this.destroyed$)).subscribe(([n,r])=>{this._pointerProjected$.next(this.project(n||Re.O))}),this._roadSplineProjected$.pipe(Ue(this.destroyed$),tt(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.y)},s={x:Math.max(s.x,a.x),y:Math.max(s.y,a.y)}});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$),Ra([this._roadSplineProjected$,this.scalingSquare$,this.svgSize$]).pipe(Ue(this.destroyed$),tt(([n,r,s])=>{const o=n.map(a=>({x:(a.x-r.x)*s.x/r.width,y:(r.y-a.y)*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$),Ra([this._pointerProjected$,this.scalingSquare$.asObservable(),this.svgSize$]).pipe(Ue(this.destroyed$),tt(([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()}startDrag(e){this.isDragging=!0,this.updatePointer(e)}drag(e){this.isDragging&&this.updatePointer(e)}endDrag(){this.isDragging=!1}getClosestProjectedLineIndex(e){const n=this._roadSplineProjected$.getValue();let r=-1,s=Number.MAX_SAFE_INTEGER;for(let d=1;d{return(i=Df||(Df={})).ThreeModel="model",i.Bitmap="bitmap",i.TwoSidedBitmap="two_sided_bitmap",Df;var i})();class Qpe extends QH{constructor(t,e,n){super(t,{loadDepth:40,inertia:2}),this.mapGraph=t,this.famPath=e,this.hideUnknownEntities$=n,this.textureLoader=new Pu,this.terrainMaterials={},this.objLoader=new Jb,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(Ql(),Ue(this._onRemoved$)).subscribe(e=>{for(const n of this.unknownEntities)n.visible=!e})}getPlaceholderTexture(){var t=this;return nt(function*(){return t._placeholder?t._placeholder:(t._placeholderPromise||(t._placeholderPromise=t.textureLoader.loadAsync("assets/placeholder_texture.png")),t._placeholderPromise)})()}getPlaceholderTerrainTexture(){var t=this;return nt(function*(){return t._placeholderTerrain?t._placeholderTerrain:(t._placeholderTerrainPromise||(t._placeholderTerrainPromise=t.textureLoader.loadAsync("assets/placeholder_texture.png").then(e=>(e.wrapS=Bs,e.wrapT=er,oa(e),e.flipY=!0,e))),t._placeholderTerrainPromise)})()}loadChunk(t){var e=this;return nt(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 Mn&&(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:Re.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:Yi.fromAngle(Re.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 ea({object3D:new sa(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 qi({side:Ns,transparent:!0,visible:!1}),this.famPath?this.textureLoader.loadAsync(`${this.famPath}/background/${t}.png`).then(e=>{e.wrapS=Bs,e.wrapT=er,oa(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 nt(function*(){let n=!1;if(t.type==Df.ThreeModel){let r;try{if(!e.famPath)throw new Error;const o=new xO,a=new Jb,l=yield o.loadAsync(`${e.famPath}/props/${t.data.data.resource_id}/0/material.mtl`);l.preload(),a.setMaterials(l),r=new sa(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 Mn){const a=o.material instanceof Array?o.material:[o.material];for(const l of a)l.transparent=!0,l.alphaTest=.5,l instanceof qi&&l.map&&(l.map.wrapS=er,l.map.wrapT=er,oa(l.map),l.map.needsUpdate=!0)}});const s=new ea({object3D: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,d)=>new Array(d).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 No,[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,d]=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 ea({object3D:new sa(s)});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 nt(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=>(oa(h),new qi({map:h,alphaTest:.5,transparent:!0,side:Ns}))),d=new Mn(new Iu(e.x,e.y),c[0]);if(d.rotateX(Math.PI/2),d.position.set(0,0,e.y/2),c.length>1){let h=-1;Ym(r.world).pipe(o4(n&&!isNaN(+n)?1e3*+n:250)).subscribe(()=>{h=(h+1)%c.length,d.material=c[h]})}return[d,a]})()}}let Jpe=(()=>{class i{constructor(e,n,r){this.eelDelegate=e,this.cdr=n,this.mainService=r,this._resource$=new Qe(null),this.changed=new $e,this.previewLoading$=new Qe(!0),this.previewFamLocation$=new Qe(null),this.previewFamLoading$=new Qe(!1),this.pointer$=new Qe(null),this.selectedSplineIndex$=new Qe(0),this.selectedSplineItem$=new Qe(null),this.selectedAiInfoItem$=new Qe(null),this.selectedTerrainItem$=new Qe(null),this.famPath=null,this.name="",this.renderer=null,this.map=null,this.isOpenedTrack=!0,this.roadPath=null,this.destroyed$=new Te}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=>({x:e.position.x,y:e.position.z,z:e.position.y}))||[]}ngAfterViewInit(){var e=this;return nt(function*(){var s;e.world=new ok(new yO,{init:(s=nt(function*(){}),function(){return s.apply(this,arguments)}),simulate:()=>{},loader:{loadFromGgGlb:function(){var s=nt(function*(...o){return[]});return function(){return s.apply(this,arguments)}}()}}),yield e.world.init(),e.skySphere=new ea({object3D:e.world.visualScene.factory.createPrimitive({shape:"SPHERE",radius:1e3},{color:16777215})}),e.skySphere.object3D.nativeMesh.material.side=Ns,e.world.addEntity(e.skySphere),e.selectionSphere=new ea({object3D: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 GS(16777215,2));let n=new Qe({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=Yi.lookAt(e.renderer.camera.position,Re.add(e.renderer.camera.position,Re.Y),Re.Z),Ym(e.world).pipe(Ue(e.destroyed$)).subscribe(()=>{e.renderer&&(e.skySphere.position=e.renderer.camera.position,e.pointer$.next(e.renderer.camera.position))}),e.controller=new n4(e.world.keyboardInput,e.renderer,{mouseOptions:{canvas:e.previewCanvas.nativeElement,pointerLock:!0},keymap:"wasd+arrows",cameraLinearSpeed:40,cameraBoostMultiplier:4,cameraMovementElasticity:100,cameraRotationElasticity:30,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(Ue(e.destroyed$)).subscribe(function(){var s=nt(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(Ue(e.destroyed$),gn(([s,o])=>!!e.resource&&s.startsWith(e.resource.id)),gl(3e3)).subscribe(nt(function*(){e.previewLoading$.next(!0),yield e.postTmpUpdates(e.resource?.id),yield e.loadPreview(),e.previewLoading$.next(!1)})),e.selectedSplineIndex$.pipe(Ue(e.destroyed$),gl(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=Re.add(a,Re.rotAround({x:10,y:-12,z:5},{x:0,y:0,z:1},-e.resource.data.road_spline[s].orientation)),e.renderer.rotation=Yi.lookAt(e.renderer.position,a,{x:0,y:0,z:1}),e.controller.reset())}e.selectedSplineItem$.next({id:sc(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:sc(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:sc(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 nt(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 Pu,o=r.find(a=>a.endsWith("spherical.png"));if(o){const a=yield s.loadAsync(o);a.colorSpace="srgb",a.mapping=cc,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 nt(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})()}onPointerChange(e){this.renderer&&(this.renderer.position=e)}loadPreview(){var e=this;return nt(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=Km.fromMapArray(e.roadPath.map((r,s)=>({path:`${e.terrainChunksObjLocation}terrain_chunk_${s}`,position:r,loadOptions:{}}))||[],!e.isOpenedTrack);e.unloadPreview(),e.map=new Qpe(n,e.famPath&&"resources/"+e.famPath,e.mainService.hideHiddenFields$),e.map.resource=e.resource,e.map.isOpenedTrack=e.isOpenedTrack,Ym(e.world).pipe(Ue(e.destroyed$)).subscribe(()=>{e.map&&e.renderer&&e.map.loaderCursor$.next(e.renderer.position)}),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 nt(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)(E(Jl),E(Qn),E(Fa))},i.\u0275cmp=ot({type:i,selectors:[["app-tri-map-block-ui"]],viewQuery:function(e,n){if(1&e&&($n(Wpe,5),$n(jpe,5)),2&e){let r;At(r=Dt())&&(n.previewCanvasContainer=r.first),At(r=Dt())&&(n.previewCanvas=r.first)}},inputs:{resource:"resource"},outputs:{changed:"changed"},decls:49,vars:44,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","projection","pointerChange"],[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&&(G(0,"div",0)(1,"h4"),Be(2,"Preview *.FAM file"),j(),G(3,"mat-form-field",1)(4,"mat-label"),Be(5,"Current preview FAM"),j(),G(6,"mat-select",2,3),Oe("valueChange",function(s){return n.onFamSelected(s)}),ct(8,"async"),ct(9,"async"),fe(10,Ype,2,2,"mat-option",4),G(11,"mat-option",5),Be(12,"custom"),j()()(),fe(13,qpe,9,3,"ng-container",6),fe(14,Xpe,1,1,"mat-spinner",7),ct(15,"async"),j(),G(16,"div",8)(17,"div",9,10),Ie(19,"canvas",11,12),fe(21,Kpe,1,0,"mat-spinner",13),ct(22,"async"),j(),G(23,"div",14,10)(25,"mat-form-field",1)(26,"mat-label"),Be(27,"Spline item"),j(),G(28,"input",15),Oe("ngModelChange",function(s){return n.selectedSplineIndex$.next(s)}),ct(29,"async"),ct(30,"async"),j()(),G(31,"app-minimap",16),Oe("pointerChange",function(s){return n.onPointerChange(s)}),ct(32,"async"),j()()(),G(33,"h4"),Be(34,"Road spline item"),j(),Ie(35,"app-compound-block-ui",17),ct(36,"async"),G(37,"h4"),Be(38,"AI info (block for 4 spline items)"),j(),Ie(39,"app-compound-block-ui",17),ct(40,"async"),G(41,"h4"),Be(42,"Terrain (block for 4 spline items)"),j(),Ie(43,"app-compound-block-ui",17),ct(44,"async"),G(45,"h4"),Be(46,"Common"),j(),Ie(47,"app-compound-block-ui",18),ct(48,"async")),2&e){const r=Zi(7);let s;V(6),U("value",n.previewFamPossibleLocations.includes(ut(8,21,n.previewFamLocation$))?ut(9,23,n.previewFamLocation$):"custom"),V(4),U("ngForOf",n.previewFamPossibleLocations),V(3),U("ngIf","custom"==r.value),V(1),U("ngIf",ut(15,25,n.previewFamLoading$)),V(7),U("ngIf",ut(22,27,n.previewLoading$)),V(7),U("min",0)("max",4*(null==(s=ut(29,29,n._resource$))?null:s.data.num_chunks)-1)("ngModel",ut(30,31,n.selectedSplineIndex$)),V(3),U("roadSpline",n.roadSpline)("pointer",ut(32,33,n.pointer$))("splineClosed",!n.isOpenedTrack)("projection","nz"),V(4),U("resource",ut(36,35,n.selectedSplineItem$))("hideBlockActions",!0),V(4),U("resource",ut(40,37,n.selectedAiInfoItem$))("hideBlockActions",!0),V(4),U("resource",ut(44,39,n.selectedTerrainItem$))("hideBlockActions",!0),V(4),U("resource",ut(48,41,n._resource$))("hideBlockActions",!0)("fieldWhitelist",Rs(43,Zpe))}},dependencies:[lo,_i,_l,mu,nc,_u,gu,Zc,yl,Ro,rc,rb,pb,Nm,e0,ec,fG,Xo],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-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})();const pG=i=>new Promise(t=>setTimeout(t,i)),mG=(i,t,e=null)=>{const n=document.createElement("canvas"),r=n.getContext("2d",{willReadFrequently:!0}),s=i.width,o=i.height;n.width=s,n.height=o,r.drawImage(i,0,0,s,o);const a=r.getImageData(0,0,s,o);for(let l=0;l{if(!(o instanceof Mn))return;let a=-1;if(o.name.startsWith("lbl__rt_frnt")?a=0:o.name.startsWith("lbl__lt_frnt")?a=1:o.name.startsWith("lbl__rt_rear")?a=2:o.name.startsWith("lbl__lt_rear")&&(a=3),a>-1){this.wheels[a]=o,a<2&&(this.frontWheels[a]=o),o.geometry.boundingBox||o.geometry.computeBoundingBox();const l=Re.avg(o.geometry.boundingBox.min,o.geometry.boundingBox.max);o.geometry.translate(...Re.spr(Re.neg(l))),o.position.set(...Re.spr(l)),this.wheelIdlePositions[a]=l}(o.name.includes("rsid")||o.name.includes("lite"))&&(r.push(o),this.originalTexWithTailLights=o.material.map)}),!this.originalTexWithTailLights)throw new Error("Not a driveable NFS1 car");this.tailLightColors=n.includes("TRAFFC.CFM")?[9509903,16711680]:[3212546,16258068],this.texWithTailLightsImg=document.createElement("img"),this.texWithTailLights=new Oo(this.texWithTailLightsImg),this.texWithTailLights.flipY=this.originalTexWithTailLights.flipY,oa(this.texWithTailLights),this.recolorTailLights(this.tailLightColors[0]).then();for(const o of r)o.material.map=this.texWithTailLights;const s=new Pu;this.tyreTextures=[1,2,3,4].map(o=>s.load(`${n}/tyr${o}.png`));for(const o of this.tyreTextures)oa(o);this.tyreMaterial=new qi({map:this.tyreTextures[0]}),this.tyreMaterial.transparent=!0,this.tyreMaterial.alphaTest=.5,this.tyreMaterial.map.wrapS=er,this.tyreMaterial.map.wrapT=er,this.tyreMaterial.polygonOffset=!0,this.tyreMaterial.polygonOffsetFactor=-4;for(const o of this.wheels)o.material=this.tyreMaterial}get tailLightsOn(){return this._tailLightsOn}set tailLightsOn(t){t!==this._tailLightsOn&&(this._tailLightsOn=t,this.recolorTailLights(this.tailLightColors[t?1:0]))}get speed(){return this._speed}set speed(t){if(t!==this._speed){switch(this._speed=t,this.tyreTextureUpdateTimer&&clearInterval(this.tyreTextureUpdateTimer),t){case"idle":this.tyreMaterial.map=this.tyreTextures[0];break;case"slow":let e=!0;this.tyreTextureUpdateTimer=setInterval(()=>{this.tyreMaterial.map=this.tyreTextures[e?1:2],this.tyreMaterial.needsUpdate=!0,e=!e},16);break;case"fast":this.tyreMaterial.map=this.tyreTextures[3]}this.tyreMaterial.needsUpdate=!0}}get steeringAngle(){return this._steeringAngle}set steeringAngle(t){if(t!==this._steeringAngle){this._steeringAngle=t;for(const e of this.frontWheels)e.rotation.set(0,0,t)}}recolorTailLights(t){var e=this;return nt(function*(){if(e.originalTexWithTailLights&&e.texWithTailLights&&e.texWithTailLightsImg){for(let n=100;n>0&&!e.originalTexWithTailLights.source.data;n--)yield pG(50);((i,t,e,n=null)=>{const[r,s,o]=[t>>16,t>>8&255,255&t],[a,l,c]=[e>>16,e>>8&255,255&e];mG(i,(d,h)=>{d[h]==r&&d[h+1]==s&&d[h+2]==o&&(d[h]=a,d[h+1]=l,d[h+2]=c)},n)})(e.originalTexWithTailLights.source.data,e.tailLightsTexColor,t,e.texWithTailLightsImg),e.texWithTailLights.needsUpdate=!0}})()}dispose(){this.texWithTailLightsImg&&(this.texWithTailLightsImg.remove(),this.texWithTailLightsImg=null),this.texWithTailLights&&(this.texWithTailLights.dispose(),this.texWithTailLights=null),this.tyreTextureUpdateTimer&&clearInterval(this.tyreTextureUpdateTimer),this.tyreMaterial&&(this.tyreMaterial.dispose(),this.tyreMaterial=null)}}let nme=(()=>{class i{constructor(e,n,r){this.eelDelegate=e,this.mainService=n,this.cdr=r,this._resource$=new Qe(null),this.changed=new $e,this.previewPaths$=new Qe(null),this.destroyed$=new Te,this.customControls=[],this.serializerSettings={geometry__save_obj:!0,geometry__save_blend:!1,geometry__export_to_gg_web_engine:!1}}get resource(){return this._resource$.getValue()}set resource(e){this._resource$.next(e)}ngAfterViewInit(){var e=this;return nt(function*(){e._resource$.pipe(Ue(e.destroyed$)).subscribe(function(){var n=nt(function*(r){e.previewPaths$.next(yield e.loadPreviewFilePaths(r?.id))});return function(r){return n.apply(this,arguments)}}()),e.mainService.dataBlockChange$.pipe(Ue(e.destroyed$),gn(([n,r])=>!!e.resource&&n.startsWith(e.resource.id)),gl(1500)).subscribe(nt(function*(){e.previewPaths$.next(null),e.previewPaths$.next(yield e.postTmpUpdates(e.resource?.id))}))})()}onObjectLoaded(e){var n=this;return nt(function*(){if((n._resource$.value?.id||"").includes(".CFM__"))try{const r=n.resource?.id.split("/");r.pop(),r[r.length-1]=""+(+r[r.length-1]+1);const s=yield n.eelDelegate.retrieveValue(r.join("/")+"/data"),o=s.children_aliases.findIndex(l=>"!PAL"===l);if(-1==o)throw new Error("Not a car");const a=new tme(e,s.children[o].data.colors[254]>>>8,n.previewPaths$.value[0].substring(0,n.previewPaths$.value[0].lastIndexOf("/"))+"/assets");n.customControls=[{title:"TNFS car features",controls:[{label:"Brake lights on",type:"checkbox",value:!1,change:l=>{a.tailLightsOn=l}},{label:"Car speed",type:"radio",options:["idle","slow","fast"],value:"idle",change:l=>{a.speed=l}},{label:"Steering angle",type:"slider",minValue:-.7,maxValue:.7,valueStep:.05,value:0,change:l=>{a.steeringAngle=l}}]}],n.cdr.markForCheck()}catch{}})()}postTmpUpdates(e){var n=this;return nt(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 nt(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)(E(Jl),E(Fa),E(Qn))},i.\u0275cmp=ot({type:i,selectors:[["app-orip-geometry-block-ui"]],inputs:{resource:"resource"},outputs:{changed:"changed"},decls:4,vars:7,consts:[[3,"paths","customControls","onObjectLoaded"],[3,"resource"]],template:function(e,n){1&e&&(G(0,"app-obj-viewer",0),Oe("onObjectLoaded",function(s){return n.onObjectLoaded(s)}),ct(1,"async"),j(),Ie(2,"app-compound-block-ui",1),ct(3,"async")),2&e&&(U("paths",ut(1,3,n.previewPaths$))("customControls",n.customControls),V(2),U("resource",ut(3,5,n._resource$)))},dependencies:[ec,hG,Xo],changeDetection:0}),i})();const gG=i=>{let t=i.block_class_mro.split("__")[0];return"ArrayBlock"===t?gG(i.child_schema)+"[]":t},ime=["class","block-ui"];function rme(i,t){if(1&i&&(G(0,"mat-label",7),Be(1),j()),2&i){const e=re(2);U("matTooltip",e.resourceDescription),V(1),Qi("",null==e.resource?null:e.resource.name," ")}}function sme(i,t){if(1&i&&(G(0,"mat-option",8),Be(1),j()),2&i){const e=t.$implicit,n=t.index,r=re(2);U("value",n)("disabled",r.disabled),V(1),Qi(" ",r.blockClassStr(e)," ")}}function ome(i,t){if(1&i){const e=jn();Gr(0),fe(1,rme,2,2,"mat-label",1),ct(2,"async"),G(3,"div",2)(4,"mat-label"),Be(5,"Resource type:"),j(),G(6,"mat-select",3),Oe("selectionChange",function(r){return Vt(e),Et(re().setChoiceIndex(r.value))}),fe(7,sme,2,3,"mat-option",4),j(),Ie(8,"app-block-actions",5),j(),Ie(9,"app-editor",6),Wr()}if(2&i){const e=re();let n;V(1),U("ngIf",(null==e.resource?null:e.resource.name)&&(null==e.resource?null:e.resource.name)!=(null==(n=ut(2,8,e.main.resource$))?null:n.name)),V(5),U("value",e.resourceData.choice_index)("disabled",e.disabled),V(1),U("ngForOf",e.resource.schema.possible_resource_schemas),V(1),U("resource",e.childResource),V(1),U("resource",e.childResource)("hideBlockActions",!0)("disabled",e.disabled)}}let _G=(()=>{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 $e,this.blockClassStr=gG}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:sc(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)(E(Fa))},i.\u0275cmp=ot({type:i,selectors:[["app-delegate",8,"block-ui"]],inputs:{resource:"resource",resourceDescription:"resourceDescription",hideBlockActions:"hideBlockActions",disabled:"disabled"},outputs:{changed:"changed"},attrs:ime,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"],[3,"resource","hideBlockActions","disabled"],["matTooltipPosition","above",3,"matTooltip"],[3,"value","disabled"]],template:function(e,n){1&e&&fe(0,ome,10,10,"ng-container",0),2&e&&U("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 ame=["class","block-ui"];function lme(i,t){if(1&i&&(G(0,"mat-label",7),Be(1),j()),2&i){const e=re(2);U("matTooltip",e.resourceDescription),V(1),Qi(" ",e.resource.name," ")}}function cme(i,t){if(1&i){const e=jn();Gr(0),fe(1,lme,2,2,"mat-label",1),G(2,"mat-selection-list",2),Oe("selectionChange",function(r){return Vt(e),Et(re().onSelection(r))}),G(3,"mat-list-option",3),Be(4," Left "),j(),G(5,"mat-list-option",4),Be(6," Right "),j()(),G(7,"mat-form-field",5)(8,"mat-label"),Be(9,"Texture ID"),j(),G(10,"input",6),Oe("ngModelChange",function(r){return Vt(e),Et(re().resource.data.texture_id=r)})("change",function(){return Vt(e),Et(re().changed.emit())}),j()(),Wr()}if(2&i){const e=re();V(1),U("ngIf",e.resource.name),V(2),U("selected",e.resource.data.has_left_fence),V(2),U("selected",e.resource.data.has_right_fence),V(5),U("max",63)("min",0)("step",1)("ngModel",e.resource.data.texture_id)}}let dme=(()=>{class i{constructor(){this.resource=null,this.resourceDescription="",this.changed=new $e}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=ot({type:i,selectors:[["app-fence-type",8,"block-ui"]],inputs:{resource:"resource",resourceDescription:"resourceDescription"},outputs:{changed:"changed"},attrs:ame,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&&fe(0,cme,11,7,"ng-container",0),2&e&&U("ngIf",n.resource)},dependencies:[_i,_l,mu,nc,_u,gu,Zc,yl,Ro,rc,Fs,MC,wC],changeDetection:0}),i})(),ume=(()=>{class i{constructor(){this._resource=null,this.resourceMap={},this.changed=new $e}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]=["",vl.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)(E(ib),E(bte),E(oR))},i.\u0275cmp=ot({type:i,selectors:[["app-run-custom-action",8,"dialog"]],attrs:hme,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&&(G(0,"h1",0),Be(1),j(),G(2,"div",1)(3,"p"),Be(4),j()(),G(5,"form",2),fe(6,fme,4,4,"mat-form-field",3),j(),G(7,"div",4)(8,"button",5),Oe("click",function(){return n.dialogRef.close()}),Be(9,"Cancel"),j(),G(10,"button",6),Oe("click",function(){return n.submit()}),Be(11,"Run"),j()()),2&e&&(V(1),Qi('Run action "',n.data.title,'"'),V(3),ui(n.data.description),V(1),U("formGroup",n.argsForm),V(1),U("ngForOf",n.data.args),V(4),U("disabled",n.argsForm.invalid))},dependencies:[lo,IR,_l,nc,bR,yl,Ro,rc,rb,pV,mV,gV,Gh,fC],styles:["form[_ngcontent-%COMP%]{padding:0 24px}"]}),i})();function vG(i,t){return t?e=>Sy(t.pipe(Oi(1),function mme(){return ni((i,t)=>{i.subscribe(qn(t,ms))})}()),e.pipe(vG(i))):rr((e,n)=>Mr(i(e,n)).pipe(Oi(1),qB(e)))}function yG(i,t=Gy){const e=OI(i,t);return vG(()=>e)}const gme=["mat-menu-item",""];function _me(i,t){1&i&&(ki(),G(0,"svg",3),Ie(1,"polygon",4),j())}const vme=[[["mat-icon"],["","matMenuItemIcon",""]],"*"],yme=["mat-icon, [matMenuItemIcon]","*"];function bme(i,t){if(1&i){const e=jn();G(0,"div",0),Oe("keydown",function(r){return Vt(e),Et(re()._handleKeydown(r))})("click",function(){return Vt(e),Et(re().closed.emit("click"))})("@transformMenu.start",function(r){return Vt(e),Et(re()._onAnimationStart(r))})("@transformMenu.done",function(r){return Vt(e),Et(re()._onAnimationDone(r))}),G(1,"div",1),Yt(2),j()()}if(2&i){const e=re();U("id",e.panelId)("ngClass",e._classList)("@transformMenu",e._panelAnimationState),It("aria-label",e.ariaLabel||null)("aria-labelledby",e.ariaLabelledby||null)("aria-describedby",e.ariaDescribedby||null)}}const xme=["*"],wO=new me("MAT_MENU_PANEL"),wme=YM(jM(class{}));let eE=(()=>{class i extends wme{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 Te,this._focused=new Te,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",Yr("120ms cubic-bezier(0, 0, 0.2, 1)",oi({opacity:1,transform:"scale(1)"}))),Or("* => void",Yr("100ms 25ms linear",oi({opacity:0})))]),fadeInItems:Oa("fadeInItems",[Os("showing",oi({opacity:1})),Or("void => *",[oi({opacity:0}),Yr("400ms 100ms cubic-bezier(0.55, 0, 0.55, 0.2)")])])};let Cme=0;const bG=new me("mat-menu-default-options",{providedIn:"root",factory:function Sme(){return{overlapTrigger:!1,xPosition:"after",yPosition:"below",backdropClass:"cdk-overlay-transparent-backdrop"}}});let t0=(()=>{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=tn(e)}get hasBackdrop(){return this._hasBackdrop}set hasBackdrop(e){this._hasBackdrop=tn(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 om,this._classList={},this._panelAnimationState="void",this._animationDone=new Te,this.overlayPanelClass=this._defaultOptions.overlayPanelClass||"",this.backdropClass=this._defaultOptions.backdropClass,this._overlapTrigger=this._defaultOptions.overlapTrigger,this._hasBackdrop=this._defaultOptions.hasBackdrop,this.closed=new $e,this.close=this.closed,this.panelId="mat-menu-panel-"+Cme++}ngOnInit(){this.setPositionClasses()}ngAfterContentInit(){this._updateDirectDescendants(),this._keyManager=new kU(this._directDescendantItems).withWrap().withTypeAhead().withHomeAndEnd(),this._keyManager.tabOut.subscribe(()=>this.closed.emit("tab")),this._directDescendantItems.changes.pipe(Do(this._directDescendantItems),ks(e=>Cr(...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(Do(this._directDescendantItems),ks(n=>Cr(...n.map(r=>r._hovered))))}addItem(e){}removeItem(e){}_handleKeydown(e){const n=e.keyCode,r=this._keyManager;switch(n){case 27:Qo(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(Oi(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(Do(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)(E(vt),E(gt),E(bG),E(Qn))},i.\u0275dir=ve({type:i,contentQueries:function(e,n,r){if(1&e&&(Wi(r,Mme,5),Wi(r,eE,5),Wi(r,eE,4)),2&e){let s;At(s=Dt())&&(n.lazyContent=s.first),At(s=Dt())&&(n._allItems=s),At(s=Dt())&&(n.items=s)}},viewQuery:function(e,n){if(1&e&&$n(Eo,5),2&e){let r;At(r=Dt())&&(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})(),Eme=(()=>{class i extends t0{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)(E(vt),E(gt),E(bG),E(Qn))},i.\u0275cmp=ot({type:i,selectors:[["mat-menu"]],hostVars:3,hostBindings:function(e,n){2&e&&It("aria-label",null)("aria-labelledby",null)("aria-describedby",null)},exportAs:["matMenu"],features:[Dn([{provide:wO,useExisting:i}]),dt],ngContentSelectors:xme,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&&(or(),fe(0,bme,3,6,"ng-template"))},dependencies:[hm],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:[tE.transformMenu,tE.fadeInItems]},changeDetection:0}),i})();const xG=new me("mat-menu-scroll-strategy"),Dme={provide:xG,deps:[as],useFactory:function Ame(i){return()=>i.scrollStrategies.reposition()}},wG=Fh({passive:!0});let Tme=(()=>{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,d){this._overlay=e,this._element=n,this._viewContainerRef=r,this._menuItemInstance=a,this._dir=l,this._focusMonitor=c,this._ngZone=d,this._overlayRef=null,this._menuOpen=!1,this._closingActionsSubscription=Qt.EMPTY,this._hoverSubscription=Qt.EMPTY,this._menuCloseSubscription=Qt.EMPTY,this._changeDetectorRef=Lt(Qn),this._handleTouchStart=h=>{qI(h)||(this._openedBy="touch")},this._openedBy=void 0,this.restoreFocus=!0,this.menuOpened=new $e,this.onMenuOpen=this.menuOpened,this.menuClosed=new $e,this.onMenuClose=this.menuClosed,this._scrollStrategy=s,this._parentMaterialMenu=o instanceof t0?o:void 0,n.nativeElement.addEventListener("touchstart",this._handleTouchStart,wG)}ngAfterContentInit(){this._handleHover()}ngOnDestroy(){this._overlayRef&&(this._overlayRef.dispose(),this._overlayRef=null),this._element.nativeElement.removeEventListener("touchstart",this._handleTouchStart,wG),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 t0&&(e._startAnimation(),e._directDescendantItems.changes.pipe(Ue(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 t0?(n._resetAnimation(),n.lazyContent?n._animationDone.pipe(gn(r=>"void"===r.toState),Oi(1),Ue(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],[d,h]=[r,s],p=0;if(this.triggersSubmenu()){if(h=r="before"===e.xPosition?"start":"end",s=d="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:d,overlayY:o,offsetY:p},{originX:s,originY:l,overlayX:h,overlayY:o,offsetY:p},{originX:r,originY:c,overlayX:d,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 Cr(e,this._parentMaterialMenu?this._parentMaterialMenu.closed:mt(),this._parentMaterialMenu?this._parentMaterialMenu._hovered().pipe(gn(o=>o!==this._menuItemInstance),gn(()=>this._menuOpen)):mt(),n)}_handleMousedown(e){YI(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(gn(e=>e===this._menuItemInstance&&!e.disabled),yG(0,PI)).subscribe(()=>{this._openedBy="mouse",this.menu instanceof t0&&this.menu._isAnimating?this.menu._animationDone.pipe(Oi(1),yG(0,PI),Ue(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)(E(as),E(vt),E(jr),E(xG),E(wO,8),E(eE,10),E(Pa,8),E(Xc),E(gt))},i.\u0275dir=ve({type:i,hostVars:3,hostBindings:function(e,n){1&e&&Oe("click",function(s){return n._handleClick(s)})("mousedown",function(s){return n._handleMousedown(s)})("keydown",function(s){return n._handleKeydown(s)}),2&e&&It("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})(),Ime=(()=>{class i extends Tme{}return i.\u0275fac=function(){let t;return function(n){return(t||(t=si(i)))(n||i)}}(),i.\u0275dir=ve({type:i,selectors:[["","mat-menu-trigger-for",""],["","matMenuTriggerFor",""]],hostAttrs:[1,"mat-mdc-menu-trigger"],exportAs:["matMenuTrigger"],features:[dt]}),i})(),Rme=(()=>{class i{}return i.\u0275fac=function(e){return new(e||i)},i.\u0275mod=en({type:i}),i.\u0275inj=Wt({providers:[Dme],imports:[co,tb,Jn,Pm,Ky,Jn]}),i})();function kme(i,t){if(1&i){const e=jn();G(0,"button",7),Oe("click",function(){return Vt(e),Et(re(2).deserialize())}),Ie(1,"mat-icon",8),j()}}function Pme(i,t){if(1&i){const e=jn();Gr(0),fe(1,kme,2,0,"button",4),G(2,"button",5),Oe("click",function(){return Vt(e),Et(re().serializeBlockReversible())}),Ie(3,"mat-icon",6),j(),Wr()}if(2&i){const e=re();V(1),U("ngIf",e.isInReversibleSerializationState),V(1),U("disabled",e.isInReversibleSerializationState)}}function Ome(i,t){1&i&&(G(0,"button",9),Ie(1,"mat-icon",10),j()),2&i&&(re(),U("matMenuTriggerFor",Zi(3)))}function Fme(i,t){if(1&i){const e=jn();G(0,"button",11),Oe("click",function(){const s=Vt(e).$implicit;return Et(re().runCustomAction(s))}),G(1,"span"),Be(2),j()()}if(2&i){const e=t.$implicit;V(2),ui(e.title)}}const Lme=function(){return[]};let nE=(()=>{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 nt(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)(E(Fa),E(Jl),E(Qn),E(Bm),E(RV))},i.\u0275cmp=ot({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&&(fe(0,Pme,4,2,"ng-container",0),fe(1,Ome,2,1,"button",1),G(2,"mat-menu",null,2),fe(4,Fme,3,1,"button",3),j()),2&e&&(U("ngIf",null==n.resource||null==n.resource.schema?null:n.resource.schema.serializable_to_disc),V(1),U("ngIf",(null==n.resource||null==n.resource.schema.custom_actions?null:n.resource.schema.custom_actions.length)>0),V(3),U("ngForOf",(null==n.resource?null:n.resource.schema.custom_actions)||Rs(3,Lme)))},dependencies:[lo,_i,Fs,XM,gR,Eme,eE,Ime],styles:["[_nghost-%COMP%]{display:flex}"]}),i})();const Nme=["class","block-ui"];function Bme(i,t){if(1&i&&(G(0,"mat-label",7),Be(1),j()),2&i){const e=re();U("matTooltip",e.resourceDescription),V(1),Qi("",null==e.resource?null:e.resource.name," ")}}function Ume(i,t){if(1&i&&(G(0,"audio",8),Ie(1,"source",9),ct(2,"async"),Be(3," Your browser does not support the audio element. "),j()),2&i){const e=re();V(1),U("src",ut(2,1,e.audioUrl$),Np)}}function Vme(i,t){1&i&&Ie(0,"mat-spinner",10)}function zme(i,t){1&i&&Ie(0,"app-block-actions",11),2&i&&U("resource",re().resource)}const Hme=function(){return["wave_data"]};let $me=(()=>{class i{constructor(e,n){this.eelDelegate=e,this.main=n,this._resource$=new Qe(null),this.audioUrl$=new Qe(null),this.resourceDescription="",this.hideBlockActions=!1,this.destroyed$=new Te,this.changed=new $e}set resource(e){this._resource$.next(e)}get resource(){return this._resource$.getValue()}ngAfterViewInit(){var e=this;return nt(function*(){e._resource$.pipe(Ue(e.destroyed$)).subscribe(function(){var n=nt(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)(E(Jl),E(Fa))},i.\u0275cmp=ot({type:i,selectors:[["app-eacs-audio",8,"block-ui"]],inputs:{resource:"resource",resourceDescription:"resourceDescription",hideBlockActions:"hideBlockActions"},outputs:{changed:"changed"},attrs:Nme,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&&(G(0,"div",0),fe(1,Bme,2,2,"mat-label",1),ct(2,"async"),fe(3,Ume,4,3,"audio",2),ct(4,"async"),fe(5,Vme,1,0,"mat-spinner",3),ct(6,"async"),Ie(7,"div",4),fe(8,zme,1,1,"app-block-actions",5),j(),Ie(9,"app-compound-block-ui",6),ct(10,"async")),2&e){let r;V(1),U("ngIf",(null==n.resource?null:n.resource.name)&&(null==n.resource?null:n.resource.name)!=(null==(r=ut(2,7,n.main.resource$))?null:r.name)),V(2),U("ngIf",ut(4,9,n.audioUrl$)),V(2),U("ngIf",n.resource&&!ut(6,11,n.audioUrl$)),V(3),U("ngIf",!n.hideBlockActions),V(1),U("resource",ut(10,13,n._resource$))("hideBlockActions",!0)("fieldBlacklist",Rs(15,Hme))}},dependencies:[_i,Ro,Fs,e0,ec,nE,Xo],styles:["#header[_ngcontent-%COMP%]{display:flex}"]}),i})();class Gme{constructor(t,e){this.mesh=t,this.assetsPath=e,this.textures=[],this.tyreTextureUpdateTimer=void 0,this.tyreMaterial=null,this.tyreTextures=[],this._color=65280,this._speed="idle",this._steeringAngle=0,this.wheels=[],this.wheelIdlePositions=[],this.frontWheels=[];let n=new Set;if(t.traverse(r=>{if(!(r instanceof Mn))return;let s=-1;if(r.name.startsWith("part_hp_12")?s=0:r.name.startsWith("part_hp_14")?s=1:r.name.startsWith("part_hp_16")?s=2:r.name.startsWith("part_hp_18")&&(s=3),s>-1){r.geometry.boundingBox||r.geometry.computeBoundingBox();let a=Re.avg(r.geometry.boundingBox.min,r.geometry.boundingBox.max);return(0==s||2==s)&&(a={x:a.x,y:a.y,z:a.z+1.5}),r.geometry.translate(...Re.spr(Re.neg(a))),r.position.set(...Re.spr(a)),this.wheelIdlePositions[s]=a,this.wheels.push(r),void(s<2&&this.frontWheels.push(r))}const o=r.material.map;o&&n.add(o)}),this.textures=Array.from(n).map(r=>{const s=new Oo(document.createElement("img"));return s.flipY=r.flipY,oa(s),[r,s]}),t.traverse(r=>{if(!(r instanceof Mn))return;const s=r.material.map;if(s){const o=this.textures.find(([a,l])=>a===s);o&&(r.material.map=o[1])}}),this.hasWheels){const r=new Pu;this.tyreTextures=[0,1,2,3].map(s=>r.load(`${e}/m${s}00.png`));for(const s of this.tyreTextures)oa(s);this.tyreMaterial=new qi({map:this.tyreTextures[0]}),this.tyreMaterial.transparent=!0,this.tyreMaterial.alphaTest=.5,this.tyreMaterial.map.wrapS=er,this.tyreMaterial.map.wrapT=er,this.tyreMaterial.polygonOffset=!0,this.tyreMaterial.polygonOffsetFactor=-4;for(const s of this.wheels)s.material=this.tyreMaterial}this.color=65280,this.recolorCar().then()}get color(){return this._color}set color(t){t!==this._color&&(this._color=t,this.recolorCar().then())}get speed(){return this._speed}set speed(t){if(t!==this._speed){switch(this._speed=t,this.tyreTextureUpdateTimer&&clearInterval(this.tyreTextureUpdateTimer),t){case"idle":this.tyreMaterial.map=this.tyreTextures[0];break;case"slow":let e=!0;this.tyreTextureUpdateTimer=setInterval(()=>{this.tyreMaterial.map=this.tyreTextures[e?1:2],this.tyreMaterial.needsUpdate=!0,e=!e},16);break;case"fast":this.tyreMaterial.map=this.tyreTextures[3]}this.tyreMaterial.needsUpdate=!0}}get steeringAngle(){return this._steeringAngle}set steeringAngle(t){if(t!==this._steeringAngle){this._steeringAngle=t;for(const e of this.frontWheels)e.rotation.set(0,0,t)}}get hasWheels(){return this.wheels.length>0}recolorCar(){var t=this;return nt(function*(){const[e,n,r]=[t.color>>16,t.color>>8&255,255&t.color];for(const[s,o]of t.textures){for(let a=100;a>0&&!s.source.data;a--)yield pG(50);mG(s.source.data,(a,l)=>{if(a[l]+a[l+2]{class i{constructor(e,n,r){this.eelDelegate=e,this.main=n,this.cdr=r,this._resource$=new Qe(null),this.changed=new $e,this.customControls=[],this.previewPaths$=new Qe(null),this.destroyed$=new Te,this.serializerSettings={geometry__save_obj:!0,geometry__save_blend:!1,geometry__export_to_gg_web_engine:!1}}get resource(){return this._resource$.getValue()}set resource(e){this._resource$.next(e)}ngAfterViewInit(){var e=this;return nt(function*(){e._resource$.pipe(Ue(e.destroyed$)).subscribe(function(){var n=nt(function*(r){e.previewPaths$.next(yield e.loadPreviewFilePaths(r?.id))});return function(r){return n.apply(this,arguments)}}()),e.main.dataBlockChange$.pipe(Ue(e.destroyed$),gn(([n,r])=>!!e.resource&&n.startsWith(e.resource.id)),gl(1500)).subscribe(nt(function*(){e.previewPaths$.next(null),e.previewPaths$.next(yield e.postTmpUpdates(e.resource?.id))}))})()}onObjectLoaded(e){var n=this;return nt(function*(){try{const r=new Gme(e,n.previewPaths$.value[0].substring(0,n.previewPaths$.value[0].lastIndexOf("/"))+"/assets");let s=null;const o=a=>{s&&clearTimeout(s),s=setTimeout(()=>r.color=a,50)};n.customControls=[{title:"NFS2 car features",controls:[{label:"Car color",type:"color",value:65280,change:a=>o(a)}]}],r.hasWheels&&n.customControls[0].controls.push({label:"Car speed",type:"radio",options:["idle","slow","fast"],value:"idle",change:a=>{r.speed=a}},{label:"Steering angle",type:"slider",minValue:-.7,maxValue:.7,valueStep:.05,value:0,change:a=>{r.steeringAngle=a}}),n.cdr.markForCheck()}catch(r){console.error(r)}})()}postTmpUpdates(e){var n=this;return nt(function*(){if(e){const r=yield n.eelDelegate.serializeResourceTmp(e,Object.entries(n.main.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 nt(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)(E(Jl),E(Fa),E(Qn))},i.\u0275cmp=ot({type:i,selectors:[["app-geo-geometry",8,"block-ui"]],inputs:{resource:"resource"},outputs:{changed:"changed"},attrs:Wme,decls:4,vars:8,consts:[[3,"paths","groupFunction","customControls","onObjectLoaded"],[3,"resource",4,"ngIf"],[3,"resource"]],template:function(e,n){1&e&&(G(0,"app-obj-viewer",0),Oe("onObjectLoaded",function(s){return n.onObjectLoaded(s)}),ct(1,"async"),j(),fe(2,jme,2,3,"app-compound-block-ui",1),ct(3,"async")),2&e&&(U("paths",ut(1,4,n.previewPaths$))("groupFunction",n.previewObjectGroupFunc)("customControls",n.customControls),V(2),U("ngIf",!ut(3,6,n.main.hideHiddenFields$)))},dependencies:[_i,ec,hG,Xo],changeDetection:0}),i})();const qme=function(){return["children","items_descr"]};let Xme=(()=>{class i{constructor(){this._resource=null,this.hideBlockActions=!1,this.resourceMap={},this.changed=new $e}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:sc(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=ot({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&&Ie(0,"app-compound-block-ui",0)(1,"app-sidenav-res-list",1),2&e&&(U("resource",n.resource)("hideBlockActions",n.hideBlockActions)("fieldBlacklist",Rs(4,qme)),V(1),U("resources",n.resourceMap))},dependencies:[ec,xC],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})();const Kme=["previewCanvasContainer"],Zme=["previewCanvas"];function Qme(i,t){1&i&&Ie(0,"mat-spinner",16),2&i&&U("diameter",40)}function Jme(i,t){1&i&&Ie(0,"mat-spinner",17)}const ege=function(){return[]};var Tf=(()=>{return(i=Tf||(Tf={})).ThreeModel="model",i.Bitmap="bitmap",i.TwoSidedBitmap="two_sided_bitmap",Tf;var i})();class tge extends QH{constructor(t,e,n){super(t,{loadDepth:40,inertia:2}),this.mapGraph=t,this.qfsPath=e,this.hideUnknownEntities$=n,this.textureLoader=new Pu,this.terrainMaterials={},this.objLoader=new Jb,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(Ql(),Ue(this._onRemoved$)).subscribe(e=>{for(const n of this.unknownEntities)n.visible=!e})}getPlaceholderTexture(){var t=this;return nt(function*(){return t._placeholder?t._placeholder:(t._placeholderPromise||(t._placeholderPromise=t.textureLoader.loadAsync("assets/placeholder_texture.png")),t._placeholderPromise)})()}getPlaceholderTerrainTexture(){var t=this;return nt(function*(){return t._placeholderTerrain?t._placeholderTerrain:(t._placeholderTerrainPromise||(t._placeholderTerrainPromise=t.textureLoader.loadAsync("assets/placeholder_texture.png").then(e=>(e.wrapS=Bs,e.wrapT=Bs,oa(e),e))),t._placeholderTerrainPromise)})()}loadChunk(t){var e=this;return nt(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 Mn&&(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:Re.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:Yi.fromAngle(Re.nZ,l.rotation)}));const o=(yield Promise.all(s.map(l=>e.loadPropInternal(l)))).filter(l=>!!l),a=new ea({object3D:new sa(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 qi({side:Ns,transparent:!0,visible:!1}),this.qfsPath?this.textureLoader.loadAsync(`${this.qfsPath}/${t}.png`).then(e=>{e.wrapS=Bs,e.wrapT=Bs,oa(e),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 nt(function*(){let n=!1;if(t.type==Tf.ThreeModel){let r;try{if(!e.qfsPath)throw new Error;const o=new xO,a=new Jb,l=yield o.loadAsync(`${e.qfsPath}/props/${t.data.data.resource_id}/0/material.mtl`);l.preload(),a.setMaterials(l),r=new sa(yield a.loadAsync(`${e.qfsPath}/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 Mn){const a=o.material instanceof Array?o.material:[o.material];for(const l of a)l.transparent=!0,l.alphaTest=.5,l instanceof qi&&l.map&&(l.map.wrapS=Bs,l.map.wrapT=Bs,oa(l.map),l.map.needsUpdate=!0)}});const s=new ea({object3D: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==Tf.Bitmap||t.type==Tf.TwoSidedBitmap){const r=(c,d)=>new Array(d).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 No,[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==Tf.TwoSidedBitmap){const[c,d]=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 ea({object3D:new sa(s)});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 nt(function*(){const s=t.split(";"),o=yield r.getPlaceholderTexture();let a=!1,l=[];r.qfsPath?l=yield Promise.all(s.map(h=>r.textureLoader.loadAsync(`${r.qfsPath}/foreground/${h}.png`).catch(()=>(a=!0,o)))):(a=!0,l=s.map(()=>o));const c=l.map(h=>(oa(h),new qi({map:h,alphaTest:.5,transparent:!0,side:Ns}))),d=new Mn(new Iu(e.x,e.y),c[0]);if(d.rotateX(Math.PI/2),d.position.set(0,0,e.y/2),c.length>1){let h=-1;Ym(r.world).pipe(o4(n&&!isNaN(+n)?1e3*+n:250)).subscribe(()=>{h=(h+1)%c.length,d.material=c[h]})}return[d,a]})()}}let nge=(()=>{class i{constructor(e,n,r){this.eelDelegate=e,this.cdr=n,this.mainService=r,this._resource$=new Qe(null),this.changed=new $e,this.previewLoading$=new Qe(!0),this.previewQfsLocation$=new Qe(null),this.previewQfsLoading$=new Qe(!1),this.pointer$=new Qe(null),this.selectedSplineIndex$=new Qe(0),this.qfsPath=null,this.name="",this.renderer=null,this.map=null,this.roadPath=null,this.destroyed$=new Te}get resource(){return this._resource$.getValue()}set resource(e){this._resource$.next(e)}ngAfterViewInit(){var e=this;return nt(function*(){var s;e.world=new ok(new yO,{init:(s=nt(function*(){}),function(){return s.apply(this,arguments)}),simulate:()=>{},loader:{loadFromGgGlb:function(){var s=nt(function*(...o){return[]});return function(){return s.apply(this,arguments)}}()}}),yield e.world.init(),e.skySphere=new ea({object3D:e.world.visualScene.factory.createPrimitive({shape:"SPHERE",radius:1e3},{color:16777215})}),e.skySphere.object3D.nativeMesh.material.side=Ns,e.world.addEntity(e.skySphere),e.selectionSphere=new ea({object3D: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 GS(16777215,2));let n=new Qe({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=Yi.lookAt(e.renderer.camera.position,Re.add(e.renderer.camera.position,Re.Y),Re.Z),Ym(e.world).pipe(Ue(e.destroyed$)).subscribe(()=>{e.renderer&&(e.skySphere.position=e.renderer.camera.position,e.pointer$.next(e.renderer.camera.position))}),e.controller=new n4(e.world.keyboardInput,e.renderer,{mouseOptions:{canvas:e.previewCanvas.nativeElement,pointerLock:!0},keymap:"wasd+arrows",cameraLinearSpeed:40,cameraBoostMultiplier:4,cameraMovementElasticity:100,cameraRotationElasticity:30,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(Ue(e.destroyed$)).subscribe(function(){var s=nt(function*(o){e.roadPath=e.resource?.data.block_positions.map(a=>({x:a.x,y:a.z,z:a.y})),e.previewLoading$.next(!0),o?(e.previewQfsLocation$.next(o.id.substring(0,o.id.indexOf(".TRK"))+"0.QFS"),yield e.loadTerrainChunks(o.id),yield e.onQfsSelected(e.previewQfsLocation$.value)):(yield e.loadTerrainChunks(),yield e.loadPreview()),e.previewLoading$.next(!1)});return function(o){return s.apply(this,arguments)}}()),e.mainService.dataBlockChange$.pipe(Ue(e.destroyed$),gn(([s,o])=>!!e.resource&&s.startsWith(e.resource.id)),gl(3e3)).subscribe(nt(function*(){e.roadPath=e.resource?.data.block_positions.map(s=>({x:s.x,y:s.z,z:s.y})),e.previewLoading$.next(!0),yield e.postTmpUpdates(e.resource?.id),yield e.loadPreview(),e.previewLoading$.next(!1)})),e.selectedSplineIndex$.pipe(Ue(e.destroyed$),gl(250)).subscribe(s=>{if(e.resource){let o=e.resource.data.block_positions[s];if(!o)return;o={x:o.x,y:o.z,z:o.y},e.selectionSphere.position=o,e.renderer&&(e.renderer.position=Re.add(o,Re.rotAround({x:10,y:-12,z:5},{x:0,y:0,z:1},-0)),e.renderer.rotation=Yi.lookAt(e.renderer.position,o,{x:0,y:0,z:1}),e.controller.reset())}})})()}onQfsSelected(e){var n=this;return nt(function*(){if(n.qfsPath!=e){n.previewQfsLoading$.next(!0);try{const r=yield n.eelDelegate.serializeResource(e),s=new Pu,o=r.find(a=>a.endsWith("spherical.png"));if(o){const a=yield s.loadAsync(o);a.colorSpace="srgb",a.mapping=cc,n.skySphere.object3D.nativeMesh.material.map=a}else n.skySphere.object3D.nativeMesh.material.map=null;n.skySphere.object3D.nativeMesh.material.needsUpdate=!0,n.qfsPath=e}catch{n.skySphere.object3D.nativeMesh.material.map=null,n.skySphere.object3D.nativeMesh.material.needsUpdate=!0,n.qfsPath=null}finally{n.previewQfsLoading$.next(!1)}yield n.loadPreview()}})()}loadTerrainChunks(e){var n=this;return nt(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})()}onPointerChange(e){this.renderer&&(this.renderer.position=e)}loadPreview(){var e=this;return nt(function*(){if(!e.terrainChunksObjLocation||!e.roadPath)return;const n=Km.fromMapArray(e.roadPath.map((r,s)=>({path:`${e.terrainChunksObjLocation}terrain_chunk_${s}`,position:r,loadOptions:{}}))||[],!0);e.unloadPreview(),e.map=new tge(n,e.qfsPath&&"resources/"+e.qfsPath,e.mainService.hideHiddenFields$),e.map.resource=e.resource,e.map.isOpenedTrack=!1,Ym(e.world).pipe(Ue(e.destroyed$)).subscribe(()=>{e.map&&e.renderer&&e.map.loaderCursor$.next(e.renderer.position)}),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 nt(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)(E(Jl),E(Qn),E(Fa))},i.\u0275cmp=ot({type:i,selectors:[["app-trk-map-block-ui"]],viewQuery:function(e,n){if(1&e&&($n(Kme,5),$n(Zme,5)),2&e){let r;At(r=Dt())&&(n.previewCanvasContainer=r.first),At(r=Dt())&&(n.previewCanvas=r.first)}},inputs:{resource:"resource"},outputs:{changed:"changed"},decls:32,vars:26,consts:[[1,"qfsSelector"],["appearance","fill"],["matInput","","type","text",3,"value"],["customQfsInput",""],["mat-button","",3,"click"],["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","projection","pointerChange"],[3,"resource"],["mode","indeterminate",3,"diameter"],["mode","indeterminate"]],template:function(e,n){if(1&e){const r=jn();G(0,"div",0)(1,"h4"),Be(2,"Preview QFS file"),j(),G(3,"mat-form-field",1)(4,"mat-label"),Be(5,"Custom QFS path"),j(),Ie(6,"input",2,3),ct(8,"async"),j(),G(9,"button",4),Oe("click",function(){Vt(r);const o=Zi(7);return Et(n.onQfsSelected(o.value))}),Be(10,"LOAD"),j(),fe(11,Qme,1,1,"mat-spinner",5),ct(12,"async"),j(),G(13,"div",6)(14,"div",7,8),Ie(16,"canvas",9,10),fe(18,Jme,1,0,"mat-spinner",11),ct(19,"async"),j(),G(20,"div",12,8)(22,"mat-form-field",1)(23,"mat-label"),Be(24,"Spline item"),j(),G(25,"input",13),Oe("ngModelChange",function(o){return n.selectedSplineIndex$.next(o)}),ct(26,"async"),ct(27,"async"),j()(),G(28,"app-minimap",14),Oe("pointerChange",function(o){return n.onPointerChange(o)}),ct(29,"async"),j()()(),Ie(30,"app-compound-block-ui",15),ct(31,"async")}if(2&e){let r;V(6),U("value",ut(8,11,n.previewQfsLocation$)),V(5),U("ngIf",ut(12,13,n.previewQfsLoading$)),V(7),U("ngIf",ut(19,15,n.previewLoading$)),V(7),U("min",0)("max",4*(null==(r=ut(26,17,n._resource$))?null:r.data.num_blocks)-1)("ngModel",ut(27,19,n.selectedSplineIndex$)),V(3),U("roadSpline",n.roadPath||Rs(25,ege))("pointer",ut(29,21,n.pointer$))("splineClosed",!0)("projection","nz"),V(2),U("resource",ut(31,23,n._resource$))}},dependencies:[_i,_l,mu,nc,_u,gu,Zc,yl,Ro,rc,rb,e0,ec,fG,Xo],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-minimap[_ngcontent-%COMP%]{flex-grow:1;display:flex}.qfsSelector[_ngcontent-%COMP%]{display:flex;align-items:center;width:100%;column-gap:1rem}.qfsSelector[_ngcontent-%COMP%] h4[_ngcontent-%COMP%]{min-width:-moz-fit-content;min-width:fit-content}.qfsSelector[_ngcontent-%COMP%] mat-form-field[_ngcontent-%COMP%]{flex-grow:1}.qfsSelector[_ngcontent-%COMP%] mat-spinner[_ngcontent-%COMP%], .qfsSelector[_ngcontent-%COMP%] button[_ngcontent-%COMP%]{margin-bottom:1.34375em}"],changeDetection:0}),i})();function ige(i,t){if(1&i&&(G(0,"mat-error"),Be(1),j()),2&i){const e=re(2);V(1),Dh(" ",e.resourceError.data.error_class,": ",e.resourceError.data.error_text," ")}}function rge(i,t){1&i&&Ie(0,"mat-spinner",5)}function sge(i,t){if(1&i&&(G(0,"div",2),fe(1,ige,2,2,"mat-error",3),fe(2,rge,1,0,"mat-spinner",4),j()),2&i){const e=re();V(1),U("ngIf",e.resourceError),V(1),U("ngIf",!e.resourceError)}}function oge(i,t){}let n0=(()=>{class i{constructor(e,n){this.mainService=e,this.deep=n,this._component=null,this._componentChangedSub=null,this.destroyed$=new Te,this.resourceSet$=new Te,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)}resourceEqual(e,n){return e&&n?e.id===n.id&&this.deep.deepEquals(e.data,n.data):!e==!n}set resource(e){if(!this.resourceEqual(e,this._resourceError||this._resource)&&(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(Ue(this.destroyed$),Ue(this.resourceSet$)).subscribe(()=>{const s=this._resource.id,o=this._resource.data;if(o instanceof Array)if(this._resource.schema.block_class_mro.startsWith("BytesBlock"))this.mainService.dataBlockChange$.next([s,o]);else 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 age(i,t){1&i&&Ie(0,"mat-icon",17)}function lge(i,t){1&i&&Ie(0,"mat-icon",18)}let cge=(()=>{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 nt(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 nt(function*(){if(e.mainService.hasUnsavedChanges){let n=e.dialog.open(SV,{data:{text:"There are unsaved changes, which will be lost. Are you sure you want to reload file?"}});if(!(yield lR(n.afterClosed())))return}yield e.mainService.reloadResource(),e.cdr.markForCheck()})()}}return i.\u0275fac=function(e){return new(e||i)(E(Jl),E(Fa),E(Bm),E(RV),E(Qn))},i.\u0275cmp=ot({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&&(G(0,"mat-toolbar",0)(1,"span"),Be(2),ct(3,"async"),ct(4,"async"),j(),Ie(5,"span",1),G(6,"button",2),Oe("click",function(){return n.toggleUnknownsVisibility()}),fe(7,age,1,0,"mat-icon",3),ct(8,"async"),fe(9,lge,1,0,"mat-icon",4),ct(10,"async"),j(),Ie(11,"mat-divider",5)(12,"app-block-actions",6),ct(13,"async"),G(14,"button",7),Oe("click",function(){return n.reloadResource()}),ct(15,"async"),Ie(16,"mat-icon",8),j(),Ie(17,"mat-divider",5),G(18,"button",9),Oe("click",function(){return n.saveResource()}),ct(19,"async"),ct(20,"async"),Ie(21,"mat-icon",10),j()(),G(22,"div",11),Ie(23,"div",12)(24,"app-editor",13),ct(25,"async"),ct(26,"async"),ct(27,"async"),G(28,"div",14)(29,"a",15),Ie(30,"img",16),j()(),Ie(31,"div",12),j()),2&e){let r;V(2),Dh("",(null==(r=ut(3,9,n.mainService.resource$))?null:r.name)||"...","",ut(4,11,n.mainService.hasUnsavedChanges$)?"*":"",""),V(5),U("ngIf",ut(8,13,n.mainService.hideHiddenFields$)),V(2),U("ngIf",!ut(10,15,n.mainService.hideHiddenFields$)),V(3),U("resource",ut(13,17,n.mainService.resource$)),V(2),U("disabled",!ut(15,19,n.mainService.eelDelegate.openedResourcePath$)),V(4),U("disabled",!ut(19,21,n.mainService.resource$)||!ut(20,23,n.mainService.hasUnsavedChanges$)),V(6),U("resource",ut(25,25,n.mainService.customActionRunning$)?null:ut(26,27,n.mainService.resource$)||ut(27,29,n.mainService.error$))("hideBlockActions",!0)}},dependencies:[_i,CJ,EJ,Fs,XM,gR,n0,nE,Xo],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 MG(i){return new pe(3e3,!1)}function Gge(){return typeof window<"u"&&typeof window.document<"u"}function MO(){return typeof process<"u"&&"[object process]"==={}.toString.call(process)}function Nu(i){switch(i.length){case 0:return new nb;case 1:return i[0];default:return new aV(i)}}function CG(i,t,e,n,r=new Map,s=new Map){const o=[],a=[];let l=-1,c=null;if(n.forEach(d=>{const h=d.get("offset"),p=h==l,m=p&&c||new Map;d.forEach((g,b)=>{let v=b,y=g;if("offset"!==b)switch(v=t.normalizePropertyName(v,o),y){case rR:y=r.get(b);break;case Kc: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 kge(i){return new pe(3502,!1)}();return a}function CO(i,t,e,n){switch(t){case"start":i.onStart(()=>n(e&&SO(e,"start",i)));break;case"done":i.onDone(()=>n(e&&SO(e,"done",i)));break;case"destroy":i.onDestroy(()=>n(e&&SO(e,"destroy",i)))}}function SO(i,t,e){const s=EO(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 EO(i,t,e,n,r="",s=0,o){return{element:i,triggerName:t,fromState:e,toState:n,phaseName:r,totalTime:s,disabled:!!o}}function aa(i,t,e){let n=i.get(t);return n||i.set(t,n=e),n}function SG(i){const t=i.indexOf(":");return[i.substring(1,t),i.slice(t+1)]}let AO=(i,t)=>!1,EG=(i,t,e)=>[],AG=null;function DO(i){const t=i.parentNode||i.host;return t===AG?null:t}(MO()||typeof Element<"u")&&(Gge()?(AG=(()=>document.documentElement)(),AO=(i,t)=>{for(;t;){if(t===i)return!0;t=DO(t)}return!1}):AO=(i,t)=>i.contains(t),EG=(i,t,e)=>{if(e)return Array.from(i.querySelectorAll(t));const n=i.querySelector(t);return n?[n]:[]});let If=null,DG=!1;const TG=AO,IG=EG;let RG=(()=>{class i{validateStyleProperty(e){return function jge(i){If||(If=function Yge(){return typeof document<"u"?document.body:null}()||{},DG=!!If.style&&"WebkitAppearance"in If.style);let t=!0;return If.style&&!function Wge(i){return"ebkit"==i.substring(1,6)}(i)&&(t=i in If.style,!t&&DG&&(t="Webkit"+i.charAt(0).toUpperCase()+i.slice(1)in If.style)),t}(e)}matchesElement(e,n){return!1}containsElement(e,n){return TG(e,n)}getParentElement(e){return DO(e)}query(e,n,r){return IG(e,n,r)}computeStyle(e,n,r){return r||""}animate(e,n,r,s,o,a=[],l){return new nb(r,s)}}return i.\u0275fac=function(e){return new(e||i)},i.\u0275prov=Pe({token:i,factory:i.\u0275fac}),i})(),TO=(()=>{class i{}return i.NOOP=new RG,i})();const qge=1e3,IO="ng-enter",iE="ng-leave",rE="ng-trigger",sE=".ng-trigger",PG="ng-animating",RO=".ng-animating";function fd(i){if("number"==typeof i)return i;const t=i.match(/^(-?[\.\d]+)(m?s)/);return!t||t.length<2?0:kO(parseFloat(t[1]),t[2])}function kO(i,t){return"s"===t?i*qge:i}function oE(i,t,e){return i.hasOwnProperty("duration")?i:function Kge(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(MG()),{duration:0,delay:0,easing:""};r=kO(parseFloat(a[1]),a[2]);const l=a[3];null!=l&&(s=kO(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 dge(){return new pe(3100,!1)}()),a=!0),s<0&&(t.push(function uge(){return new pe(3101,!1)}()),a=!0),a&&t.splice(l,0,MG())}return{duration:r,delay:s,easing:o}}(i,t,e)}function r0(i,t={}){return Object.keys(i).forEach(e=>{t[e]=i[e]}),t}function OG(i){const t=new Map;return Object.keys(i).forEach(e=>{t.set(e,i[e])}),t}function Bu(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 LG(i,t,e){return e?t+":"+e+";":""}function NG(i){let t="";for(let e=0;e{const s=OO(r);e&&!e.has(r)&&e.set(r,i.style[s]),i.style[s]=n}),MO()&&NG(i))}function Rf(i,t){i.style&&(t.forEach((e,n)=>{const r=OO(n);i.style[r]=""}),MO()&&NG(i))}function s0(i){return Array.isArray(i)?1==i.length?i[0]:rV(i):i}const PO=new RegExp("{{\\s*(.+?)\\s*}}","g");function BG(i){let t=[];if("string"==typeof i){let e;for(;e=PO.exec(i);)t.push(e[1]);PO.lastIndex=0}return t}function o0(i,t,e){const n=i.toString(),r=n.replace(PO,(s,o)=>{let a=t[o];return null==a&&(e.push(function fge(i){return new pe(3003,!1)}()),a=""),a.toString()});return r==n?i:r}function aE(i){const t=[];let e=i.next();for(;!e.done;)t.push(e.value),e=i.next();return t}const Jge=/-+([a-z0-9])/g;function OO(i){return i.replace(Jge,(...t)=>t[1].toUpperCase())}function e_e(i){return i.replace(/([a-z])([A-Z])/g,"$1-$2").toLowerCase()}function la(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 pge(i){return new pe(3004,!1)}()}}function UG(i,t){return window.getComputedStyle(i)[t]}const dE="*";function o_e(i,t){const e=[];return"string"==typeof i?i.split(/\s*,\s*/).forEach(n=>function a_e(i,t,e){if(":"==i[0]){const l=function l_e(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 Age(i){return new pe(3015,!1)}()),t;const r=n[1],s=n[2],o=n[3];t.push(VG(r,o));"<"==s[0]&&!(r==dE&&o==dE)&&t.push(VG(o,r))}(n,e,t)):e.push(i),e}const uE=new Set(["true","1"]),hE=new Set(["false","0"]);function VG(i,t){const e=uE.has(i)||hE.has(i),n=uE.has(t)||hE.has(t);return(r,s)=>{let o=i==dE||i==r,a=t==dE||t==s;return!o&&e&&"boolean"==typeof r&&(o=r?uE.has(i):hE.has(i)),!a&&n&&"boolean"==typeof s&&(a=s?uE.has(t):hE.has(t)),o&&a}}const c_e=new RegExp("s*:selfs*,?","g");function FO(i,t,e,n){return new d_e(i).build(t,e,n)}class d_e{constructor(t){this._driver=t}build(t,e,n){const r=new f_e(e);return this._resetContextStyleTimingState(r),la(this,s0(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 gge(){return new pe(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(d=>{l.name=d,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 _ge(){return new pe(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=>{BG(l).forEach(c=>{o.hasOwnProperty(c)||s.add(c)})})}),s.size&&(aE(s.values()),e.errors.push(function vge(i,t){return new pe(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=la(this,s0(t.animation),e);return{type:1,matchers:o_e(t.expr,e.errors),animation:n,queryCount:e.queryCount,depCount:e.depCount,options:kf(t.options)}}visitSequence(t,e){return{type:2,steps:t.steps.map(n=>la(this,n,e)),options:kf(t.options)}}visitGroup(t,e){const n=e.currentTime;let r=0;const s=t.steps.map(o=>{e.currentTime=n;const a=la(this,o,e);return r=Math.max(r,e.currentTime),a});return e.currentTime=r,{type:3,steps:s,options:kf(t.options)}}visitAnimate(t,e){const n=function m_e(i,t){if(i.hasOwnProperty("duration"))return i;if("number"==typeof i)return LO(oE(i,t).duration,0,"");const e=i;if(e.split(/\s+/).some(s=>"{"==s.charAt(0)&&"{"==s.charAt(1))){const s=LO(0,0,"");return s.dynamic=!0,s.strValue=e,s}const r=oE(e,t);return LO(r.duration,r.delay,r.easing)}(t.timings,e.errors);e.currentAnimateTimings=n;let r,s=t.styles?t.styles:oi({});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=oi(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===Kc?n.push(a):e.errors.push(new pe(3002,!1)):n.push(OG(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),d=c.get(l);let h=!0;d&&(s!=r&&s>=d.startTime&&r<=d.endTime&&(e.errors.push(function bge(i,t,e,n,r){return new pe(3010,!1)}()),h=!1),s=d.startTime),h&&c.set(l,{startTime:s,endTime:r}),e.options&&function Qge(i,t,e){const n=t.params||{},r=BG(i);r.length&&r.forEach(s=>{n.hasOwnProperty(s)||e.push(function hge(i){return new pe(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 xge(){return new pe(3011,!1)}()),n;let s=0;const o=[];let a=!1,l=!1,c=0;const d=t.steps.map(y=>{const M=this._makeStyleAst(y,e);let x=null!=M.offset?M.offset:function p_e(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:la(this,s0(t.animation),e),options:kf(t.options)}}visitAnimateChild(t,e){return e.depCount++,{type:9,options:kf(t.options)}}visitAnimateRef(t,e){return{type:10,animation:this.visitReference(t.animation,e),options:kf(t.options)}}visitQuery(t,e){const n=e.currentQuerySelector,r=t.options||{};e.queryCount++,e.currentQuery=t;const[s,o]=function u_e(i){const t=!!i.split(/\s*,\s*/).find(e=>":self"==e);return t&&(i=i.replace(c_e,"")),i=i.replace(/@\*/g,sE).replace(/@\w+/g,e=>sE+"-"+e.slice(1)).replace(/:animating/g,RO),[i,t]}(t.selector);e.currentQuerySelector=n.length?n+" "+s:s,aa(e.collectedStyles,e.currentQuerySelector,new Map);const a=la(this,s0(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:kf(t.options)}}visitStagger(t,e){e.currentQuery||e.errors.push(function Sge(){return new pe(3013,!1)}());const n="full"===t.timings?{duration:0,delay:0,easing:"full"}:oE(t.timings,e.errors,!0);return{type:12,animation:la(this,s0(t.animation),e),timings:n,options:null}}}class f_e{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 kf(i){return i?(i=r0(i)).params&&(i.params=function h_e(i){return i?r0(i):null}(i.params)):i={},i}function LO(i,t,e){return{duration:i,delay:t,easing:e}}function NO(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 fE{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 v_e=new RegExp(":enter","g"),b_e=new RegExp(":leave","g");function BO(i,t,e,n,r,s=new Map,o=new Map,a,l,c=[]){return(new x_e).buildKeyframes(i,t,e,n,r,s,o,a,l,c)}class x_e{buildKeyframes(t,e,n,r,s,o,a,l,c,d=[]){c=c||new fE;const h=new UO(t,e,c,r,s,d,[]);h.options=l;const p=l.delay?fd(l.delay):0;h.currentTimeline.delayNextStep(p),h.currentTimeline.setStyles([o],null,h.errors,l),la(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()):[NO(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:fd(o0(s,r?.params??{},e.errors));n.delayNextStep(o)}}}_visitSubInstructions(t,e,n){let s=e.currentTimeline.currentTime;const o=null!=n.duration?fd(n.duration):null,a=null!=n.delay?fd(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),la(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=pE);const o=fd(s.delay);r.delayNextStep(o)}t.steps.length&&(t.steps.forEach(o=>la(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?fd(t.options.delay):0;t.steps.forEach(o=>{const a=e.createSubContext(t.options);s&&a.delayNextStep(s),la(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 oE(e.params?o0(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?fd(r.delay):0;s&&(6===e.previousNode.type||0==n&&e.currentTimeline.hasCurrentStyleProperties())&&(e.currentTimeline.snapshotCurrentStyles(),e.previousNode=pE);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,d)=>{e.currentQueryIndex=d;const h=e.createSubContext(t.options,c);s&&h.delayNextStep(s),c===e.element&&(l=h.currentTimeline),la(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 d=e.currentTimeline;l&&d.delayNextStep(l);const h=d.currentTime;la(this,t.animation,e),e.previousNode=t,n.currentStaggerTime=r.currentTime-h+(r.startTime-n.currentTimeline.startTime)}}const pE={};class UO{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=pE,this.subContextCount=0,this.options={},this.currentQueryIndex=0,this.currentQueryTotal=0,this.currentStaggerTime=0,this.currentTimeline=l||new mE(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=fd(n.duration)),null!=n.delay&&(r.delay=fd(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]=o0(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 UO(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=pE,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 w_e(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(v_e,"."+this._enterClassName)).replace(b_e,"."+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 Ege(i){return new pe(3014,!1)}()),a}}class mE{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 mE(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||Kc),this._currentKeyframe.set(e,Kc);this._currentEmptyStepKeyframe=this._currentKeyframe}setStyles(t,e,n,r){e&&this._previousKeyframe.set("easing",e);const s=r&&r.params||{},o=function M_e(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,Kc)}else Bu(r,e)}),e}(t,this._globalTimelineStyles);for(let[a,l]of o){const c=o0(l,s,n);this._pendingStyles.set(a,c),this._localTimelineStyles.has(a)||this._backFill.set(a,this._globalTimelineStyles.get(a)??Kc),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=Bu(a,new Map,this._backFill);c.forEach((d,h)=>{d===rR?t.add(h):d===Kc&&e.add(h)}),n||c.set("offset",l/this.duration),r.push(c)});const s=t.size?aE(t.values()):[],o=e.size?aE(e.values()):[];if(n){const a=r[0],l=new Map(a);a.set("offset",0),l.set("offset",1),r=[a,l]}return NO(this.element,r,s,o,this.duration,this.startTime,this.easing,!1)}}class w_e extends mE{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=Bu(t[0]);l.set("offset",0),s.push(l);const c=Bu(t[0]);c.set("offset",$G(a)),s.push(c);const d=t.length-1;for(let h=1;h<=d;h++){let p=Bu(t[h]);const m=p.get("offset");p.set("offset",$G((e+m*n)/o)),s.push(p)}n=o,e=0,r="",t=s}return NO(this.element,t,this.preStyleProps,this.postStyleProps,n,e,r,!0)}}function $G(i,t=3){const e=Math.pow(10,t-1);return Math.round(i*e)/e}class VO{}const C_e=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 S_e extends VO{normalizePropertyName(t,e){return OO(t)}normalizeStyleValue(t,e,n,r){let s="";const o=n.toString().trim();if(C_e.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 mge(i,t){return new pe(3005,!1)}())}return o+s}}function GG(i,t,e,n,r,s,o,a,l,c,d,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:d,totalTime:h,errors:p}}const zO={};class WG{constructor(t,e,n){this._triggerName=t,this.ast=e,this._stateStyles=n}match(t,e,n,r){return function E_e(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,d){const h=[],p=this.ast.options&&this.ast.options.params||zO,g=this.buildStyles(n,a&&a.params||zO,h),b=l&&l.params||zO,v=this.buildStyles(r,b,h),y=new Set,M=new Map,x=new Map,C="void"===r,F={params:A_e(b,p),delay:this.ast.options?.delay},D=d?[]:BO(t,e,this.ast.animation,s,o,g,v,F,c,h);let k=0;if(D.forEach(T=>{k=Math.max(T.duration+T.delay,k)}),h.length)return GG(e,this._triggerName,n,r,C,g,v,[],[],M,x,k,h);D.forEach(T=>{const A=T.element,W=aa(M,A,new Set);T.preStyleProps.forEach(ne=>W.add(ne));const ie=aa(x,A,new Set);T.postStyleProps.forEach(ne=>ie.add(ne)),A!==e&&y.add(A)});const B=aE(y.values());return GG(e,this._triggerName,n,r,C,g,v,D,B,M,x,k)}}function A_e(i,t){const e=r0(t);for(const n in i)i.hasOwnProperty(n)&&null!=i[n]&&(e[n]=i[n]);return e}class D_e{constructor(t,e,n){this.styles=t,this.defaultParams=e,this.normalizer=n}buildStyles(t,e){const n=new Map,r=r0(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=o0(o,r,e));const l=this.normalizer.normalizePropertyName(a,e);o=this.normalizer.normalizeStyleValue(a,l,o,e),n.set(a,o)})}),n}}class I_e{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 D_e(r.style,r.options&&r.options.params||{},n))}),jG(this.states,"true","1"),jG(this.states,"false","0"),e.transitions.forEach(r=>{this.transitionFactories.push(new WG(t,r,this.states))}),this.fallbackTransition=function R_e(i,t,e){return new WG(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 jG(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 k_e=new fE;class P_e{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=FO(this._driver,e,n,r);if(n.length)throw function Pge(i){return new pe(3503,!1)}();this._animations.set(t,s)}_buildPlayer(t,e,n){const r=t.element,s=CG(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=BO(this._driver,e,s,IO,iE,new Map,new Map,n,k_e,r),o.forEach(d=>{const h=aa(a,d.element,new Map);d.postStyleProps.forEach(p=>h.set(p,null))})):(r.push(function Oge(){return new pe(3300,!1)}()),o=[]),r.length)throw function Fge(i){return new pe(3504,!1)}();a.forEach((d,h)=>{d.forEach((p,m)=>{d.set(m,this._driver.computeStyle(h,m,Kc))})});const c=Nu(o.map(d=>{const h=a.get(d.element);return this._buildPlayer(d,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 Lge(i){return new pe(3301,!1)}();return e}listen(t,e,n,r){const s=EO(e,"","","");return CO(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 YG="ng-animate-queued",HO="ng-animate-disabled",B_e=[],qG={namespaceId:"",setForRemoval:!1,setForMove:!1,hasAnimation:!1,removedBeforeQueried:!1},U_e={namespaceId:"",setForMove:!1,setForRemoval:!1,hasAnimation:!1,removedBeforeQueried:!0},za="__ng_removed";class $O{get params(){return this.options.params}constructor(t,e=""){this.namespaceId=e;const n=t&&t.hasOwnProperty("value");if(this.value=function $_e(i){return i??null}(n?t.value:t),n){const s=r0(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 a0="void",GO=new $O(a0);class V_e{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,Ha(e,this._hostClassName)}listen(t,e,n,r){if(!this._triggers.has(e))throw function Nge(i,t){return new pe(3302,!1)}();if(null==n||0==n.length)throw function Bge(i){return new pe(3303,!1)}();if(!function G_e(i){return"start"==i||"done"==i}(n))throw function Uge(i,t){return new pe(3400,!1)}();const s=aa(this._elementListeners,t,[]),o={name:e,phase:n,callback:r};s.push(o);const a=aa(this._engine.statesByElement,t,new Map);return a.has(e)||(Ha(t,rE),Ha(t,rE+"-"+e),a.set(e,GO)),()=>{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 Vge(i){return new pe(3401,!1)}();return e}trigger(t,e,n,r=!0){const s=this._getTrigger(e),o=new WO(this.id,e,t);let a=this._engine.statesByElement.get(t);a||(Ha(t,rE),Ha(t,rE+"-"+e),this._engine.statesByElement.set(t,a=new Map));let l=a.get(e);const c=new $O(n,this.id);if(!(n&&n.hasOwnProperty("value"))&&l&&c.absorbOptions(l.options),a.set(e,c),l||(l=GO),c.value!==a0&&l.value===c.value){if(!function Y_e(i,t){const e=Object.keys(i),n=Object.keys(t);if(e.length!=n.length)return!1;for(let r=0;r{Rf(t,v),fc(t,y)})}return}const p=aa(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||(Ha(t,YG),o.onStart(()=>{Yg(t,YG)})),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,sE,!0);n.forEach(r=>{if(r[za])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 d=this.trigger(t,c,a0,r);d&&a.push(d)}}),a.length)return this._engine.markElementAsRemoved(this.id,t,!0,e,o),n&&Nu(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)||GO,d=new $O(a0),h=new WO(this.id,o,t);this._engine.totalQueuedPlayers++,this._queue.push({element:t,triggerName:o,transition:l,fromState:c,toState:d,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[za];(!s||s===qG)&&(n.afterFlush(()=>this.clearElementCache(t)),n.destroyInnerAnimations(t),n._onRemovalComplete(t,e))}}insertNode(t,e){Ha(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=EO(s,n.triggerName,n.fromState.value,n.toState.value);l._data=t,CO(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 z_e{_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 V_e(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(gE(e)){const s=this._fetchNamespace(t);if(s)return s.trigger(e,n,r),!0}return!1}insertNode(t,e,n,r){if(!gE(e))return;const s=e[za];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),Ha(t,HO)):this.disabledNodes.has(t)&&(this.disabledNodes.delete(t),Yg(t,HO))}removeNode(t,e,n,r){if(gE(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[za]={namespaceId:t,setForRemoval:r,hasAnimation:n,removedBeforeQueried:!1,previousTriggersValues:s}}listen(t,e,n,r,s){return gE(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,sE,!0);e.forEach(n=>this.destroyActiveAnimationsForElement(n)),0!=this.playersByQueriedElement.size&&(e=this.driver.query(t,RO,!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 Nu(this.players).onDone(()=>t());t()})}processLeaveNode(t){const e=t[za];if(e&&e.setForRemoval){if(t[za]=qG,e.namespaceId){this.destroyInnerAnimations(t);const n=this._fetchNamespace(e.namespaceId);n&&n.clearElementCache(t)}this._onRemovalComplete(t,e.setForRemoval)}t.classList?.contains(HO)&&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?Nu(e).onDone(()=>{n.forEach(r=>r())}):n.forEach(r=>r())}}reportError(t){throw function zge(i){return new pe(3402,!1)}()}_flushAnimations(t,e){const n=new fE,r=[],s=new Map,o=[],a=new Map,l=new Map,c=new Map,d=new Set;this.disabledNodes.forEach(q=>{d.add(q);const se=this.driver.query(q,".ng-animate-queued",!0);for(let J=0;J{const J=IO+b++;g.set(se,J),q.forEach(we=>Ha(we,J))});const v=[],y=new Set,M=new Set;for(let q=0;qy.add(we)):M.add(se))}const x=new Map,C=ZG(p,Array.from(y));C.forEach((q,se)=>{const J=iE+b++;x.set(se,J),q.forEach(we=>Ha(we,J))}),t.push(()=>{m.forEach((q,se)=>{const J=g.get(se);q.forEach(we=>Yg(we,J))}),C.forEach((q,se)=>{const J=x.get(se);q.forEach(we=>Yg(we,J))}),v.forEach(q=>{this.processLeaveNode(q)})});const F=[],D=[];for(let q=this._namespaceList.length-1;q>=0;q--)this._namespaceList[q].drainQueuedTransitions(e).forEach(J=>{const we=J.player,Ve=J.element;if(F.push(we),this.collectedEnterElements.length){const Le=Ve[za];if(Le&&Le.setForMove){if(Le.previousTriggersValues&&Le.previousTriggersValues.has(J.triggerName)){const wt=Le.previousTriggersValues.get(J.triggerName),Tt=this.statesByElement.get(J.element);if(Tt&&Tt.has(J.triggerName)){const St=Tt.get(J.triggerName);St.value=wt,Tt.set(J.triggerName,St)}}return void we.destroy()}}const Ye=!h||!this.driver.containsElement(h,Ve),Rt=x.get(Ve),nn=g.get(Ve),le=this._buildInstruction(J,n,nn,Rt,Ye);if(le.errors&&le.errors.length)return void D.push(le);if(Ye)return we.onStart(()=>Rf(Ve,le.fromStyles)),we.onDestroy(()=>fc(Ve,le.toStyles)),void r.push(we);if(J.isFallbackTransition)return we.onStart(()=>Rf(Ve,le.fromStyles)),we.onDestroy(()=>fc(Ve,le.toStyles)),void r.push(we);const Fe=[];le.timelines.forEach(Le=>{Le.stretchStartingKeyframe=!0,this.disabledNodes.has(Le.element)||Fe.push(Le)}),le.timelines=Fe,n.append(Ve,le.timelines),o.push({instruction:le,player:we,element:Ve}),le.queriedElements.forEach(Le=>aa(a,Le,[]).push(we)),le.preStyleProps.forEach((Le,wt)=>{if(Le.size){let Tt=l.get(wt);Tt||l.set(wt,Tt=new Set),Le.forEach((St,Sn)=>Tt.add(Sn))}}),le.postStyleProps.forEach((Le,wt)=>{let Tt=c.get(wt);Tt||c.set(wt,Tt=new Set),Le.forEach((St,Sn)=>Tt.add(Sn))})});if(D.length){const q=[];D.forEach(se=>{q.push(function Hge(i,t){return new pe(3505,!1)}())}),F.forEach(se=>se.destroy()),this.reportError(q)}const k=new Map,B=new Map;o.forEach(q=>{const se=q.element;n.has(se)&&(B.set(se,se),this._beforeAnimationBuild(q.player.namespaceId,q.instruction,k))}),r.forEach(q=>{const se=q.element;this._getPreviousPlayers(se,!1,q.namespaceId,q.triggerName,null).forEach(we=>{aa(k,se,[]).push(we),we.destroy()})});const T=v.filter(q=>JG(q,l,c)),A=new Map;KG(A,this.driver,M,c,Kc).forEach(q=>{JG(q,l,c)&&T.push(q)});const ie=new Map;m.forEach((q,se)=>{KG(ie,this.driver,new Set(q),l,rR)}),T.forEach(q=>{const se=A.get(q),J=ie.get(q);A.set(q,new Map([...Array.from(se?.entries()??[]),...Array.from(J?.entries()??[])]))});const ne=[],oe=[],ge={};o.forEach(q=>{const{element:se,player:J,instruction:we}=q;if(n.has(se)){if(d.has(se))return J.onDestroy(()=>fc(se,we.toStyles)),J.disabled=!0,J.overrideTotalTime(we.totalTime),void r.push(J);let Ve=ge;if(B.size>1){let Rt=se;const nn=[];for(;Rt=Rt.parentNode;){const le=B.get(Rt);if(le){Ve=le;break}nn.push(Rt)}nn.forEach(le=>B.set(le,Ve))}const Ye=this._buildAnimation(J.namespaceId,we,k,s,ie,A);if(J.setRealPlayer(Ye),Ve===ge)ne.push(J);else{const Rt=this.playersByElement.get(Ve);Rt&&Rt.length&&(J.parentPlayer=Nu(Rt)),r.push(J)}}else Rf(se,we.fromStyles),J.onDestroy(()=>fc(se,we.toStyles)),oe.push(J),d.has(se)&&r.push(J)}),oe.forEach(q=>{const se=s.get(q.element);if(se&&se.length){const J=Nu(se);q.setRealPlayer(J)}}),r.forEach(q=>{q.parentPlayer?q.syncPlayerEvents(q.parentPlayer):q.destroy()});for(let q=0;q!Ye.destroyed);Ve.length?W_e(this,se,Ve):this.processLeaveNode(se)}return v.length=0,ne.forEach(q=>{this.players.push(q),q.onDone(()=>{q.destroy();const se=this.players.indexOf(q);this.players.splice(se,1)}),q.play()}),ne}elementContainsData(t,e){let n=!1;const r=e[za];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==a0;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,d=c!==s,h=aa(n,c,[]);this._getPreviousPlayers(c,d,o,a,e.toState).forEach(m=>{const g=m.getRealPlayer();g.beforeDestroy&&g.beforeDestroy(),m.destroy(),h.push(m)})}Rf(s,e.fromStyles)}_buildAnimation(t,e,n,r,s,o){const a=e.triggerName,l=e.element,c=[],d=new Set,h=new Set,p=e.timelines.map(g=>{const b=g.element;d.add(b);const v=b[za];if(v&&v.removedBeforeQueried)return new nb(g.duration,g.delay);const y=b!==l,M=function j_e(i){const t=[];return QG(i,t),t}((n.get(b)||B_e).map(k=>k.getRealPlayer())).filter(k=>!!k.element&&k.element===b),x=s.get(b),C=o.get(b),F=CG(0,this._normalizer,0,g.keyframes,x,C),D=this._buildPlayer(g,F,M);if(g.subTimeline&&r&&h.add(b),y){const k=new WO(t,a,b);k.setRealPlayer(D),c.push(k)}return D});c.forEach(g=>{aa(this.playersByQueriedElement,g.element,[]).push(g),g.onDone(()=>function H_e(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))}),d.forEach(g=>Ha(g,PG));const m=Nu(p);return m.onDestroy(()=>{d.forEach(g=>Yg(g,PG)),fc(l,e.toStyles)}),h.forEach(g=>{aa(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 nb(t.duration,t.delay)}}class WO{constructor(t,e,n){this.namespaceId=t,this.triggerName=e,this.element=n,this._player=new nb,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=>CO(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){aa(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 gE(i){return i&&1===i.nodeType}function XG(i,t){const e=i.style.display;return i.style.display=t??"none",e}function KG(i,t,e,n,r){const s=[];e.forEach(l=>s.push(XG(l)));const o=[];n.forEach((l,c)=>{const d=new Map;l.forEach(h=>{const p=t.computeStyle(c,h,r);d.set(h,p),(!p||0==p.length)&&(c[za]=U_e,o.push(c))}),i.set(c,d)});let a=0;return e.forEach(l=>XG(l,s[a++])),o}function ZG(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 Ha(i,t){i.classList?.add(t)}function Yg(i,t){i.classList?.remove(t)}function W_e(i,t,e){Nu(e).onDone(()=>i.processLeaveNode(t))}function QG(i,t){for(let e=0;er.add(s)):t.set(i,n),e.delete(i),!0}class _E{constructor(t,e,n){this.bodyNode=t,this._driver=e,this._normalizer=n,this._triggerCache={},this.onRemovalComplete=(r,s)=>{},this._transitionEngine=new z_e(t,e,n),this._timelineEngine=new P_e(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=[],d=FO(this._driver,s,l,c);if(l.length)throw function Rge(i,t){return new pe(3404,!1)}();a=function T_e(i,t,e){return new I_e(i,t,e)}(r,d,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]=SG(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]=SG(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 X_e=(()=>{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&&fc(this._element,this._startStyles,this._initialStyles),this._state=1)}finish(){this.start(),this._state<2&&(fc(this._element,this._initialStyles),this._endStyles&&(fc(this._element,this._endStyles),this._endStyles=null),this._state=1)}destroy(){this.finish(),this._state<3&&(i.initialStylesByElement.delete(this._element),this._startStyles&&(Rf(this._element,this._startStyles),this._endStyles=null),this._endStyles&&(Rf(this._element,this._endStyles),this._endStyles=null),fc(this._element,this._initialStyles),this._state=3)}}return i.initialStylesByElement=new WeakMap,i})();function jO(i){let t=null;return i.forEach((e,n)=>{(function K_e(i){return"display"===i||"position"===i})(n)&&(t=t||new Map,t.set(n,e))}),t}class e8{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:UG(this.element,r))}),this.currentSnapshot=t}triggerCallback(t){const e="start"===t?this._onStartFns:this._onDoneFns;e.forEach(n=>n()),e.length=0}}class Z_e{validateStyleProperty(t){return!0}validateAnimatableStyleProperty(t){return!0}matchesElement(t,e){return!1}containsElement(t,e){return TG(t,e)}getParentElement(t){return DO(t)}query(t,e,n){return IG(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,d=o.filter(m=>m instanceof e8);(function t_e(i,t){return 0===i||0===t})(n,r)&&d.forEach(m=>{m.currentSnapshot.forEach((g,b)=>c.set(b,g))});let h=function Zge(i){return i.length?i[0]instanceof Map?i:i.map(t=>OG(t)):[]}(e).map(m=>Bu(m));h=function n_e(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,UG(i,a)))}}return t}(t,h,c);const p=function q_e(i,t){let e=null,n=null;return Array.isArray(t)&&t.length?(e=jO(t[0]),t.length>1&&(n=jO(t[t.length-1]))):t instanceof Map&&(e=jO(t)),e||n?new X_e(i,e,n):null}(t,h);return new e8(t,h,l,p)}}let Q_e=(()=>{class i extends nV{constructor(e,n){super(),this._nextAnimationId=0,this._renderer=e.createRenderer(n.body,{id:"0",encapsulation:Ks.None,styles:[],data:{animation:[]}})}build(e){const n=this._nextAnimationId.toString();this._nextAnimationId++;const r=Array.isArray(e)?rV(e):e;return t8(this._renderer,null,n,"register",[r]),new J_e(n,this._renderer)}}return i.\u0275fac=function(e){return new(e||i)(ee(Gl),ee(qt))},i.\u0275prov=Pe({token:i,factory:i.\u0275fac}),i})();class J_e extends LQ{constructor(t,e){super(),this._id=t,this._renderer=e}create(t,e){return new eve(this._id,t,e||{},this._renderer)}}class eve{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 t8(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 t8(i,t,e,n,r){return i.setProperty(t,`@@${e}:${n}`,r)}const n8="@.disabled";let tve=(()=>{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 d=this._rendererCache.get(s);return d||(d=new i8("",s,this.engine,()=>this._rendererCache.delete(s)),this._rendererCache.set(s,d)),d}const o=n.id,a=n.id+"-"+this._currentId;this._currentId++,this.engine.register(a,e);const l=d=>{Array.isArray(d)?d.forEach(l):this.engine.registerTrigger(o,a,e,d.name,d)};return n.data.animation.forEach(l),new nve(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)(ee(Gl),ee(_E),ee(gt))},i.\u0275prov=Pe({token:i,factory:i.\u0275fac}),i})();class i8{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==n8?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 nve extends i8{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==n8?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 ive(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 rve(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 r8=[{provide:nV,useClass:Q_e},{provide:VO,useFactory:function ove(){return new S_e}},{provide:_E,useClass:(()=>{class i extends _E{constructor(e,n,r,s){super(e.body,n,r)}ngOnDestroy(){this.flush()}}return i.\u0275fac=function(e){return new(e||i)(ee(qt),ee(TO),ee(VO),ee(dm))},i.\u0275prov=Pe({token:i,factory:i.\u0275fac}),i})()},{provide:Gl,useFactory:function ave(i,t,e){return new tve(i,t,e)},deps:[lM,_E,gt]}],YO=[{provide:TO,useFactory:()=>new Z_e},{provide:kr,useValue:"BrowserAnimations"},...r8],s8=[{provide:TO,useClass:RG},{provide:kr,useValue:"NoopAnimations"},...r8];let lve=(()=>{class i{static withConfig(e){return{ngModule:i,providers:e.disableAnimations?s8:YO}}}return i.\u0275fac=function(e){return new(e||i)},i.\u0275mod=en({type:i}),i.\u0275inj=Wt({providers:YO,imports:[LB]}),i})();const o8=new me("CdkAccordion");let cve=0,dve=(()=>{class i{get expanded(){return this._expanded}set expanded(e){e=tn(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=tn(e)}constructor(e,n,r){this.accordion=e,this._changeDetectorRef=n,this._expansionDispatcher=r,this._openCloseAllSubscription=Qt.EMPTY,this.closed=new $e,this.opened=new $e,this.destroyed=new $e,this.expandedChange=new $e,this.id="cdk-accordion-child-"+cve++,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)(E(o8,12),E(Qn),E($R))},i.\u0275dir=ve({type:i,selectors:[["cdk-accordion-item"],["","cdkAccordionItem",""]],inputs:{expanded:"expanded",disabled:"disabled"},outputs:{closed:"closed",opened:"opened",destroyed:"destroyed",expandedChange:"expandedChange"},exportAs:["cdkAccordionItem"],features:[Dn([{provide:o8,useValue:void 0}])]}),i})(),uve=(()=>{class i{}return i.\u0275fac=function(e){return new(e||i)},i.\u0275mod=en({type:i}),i.\u0275inj=Wt({}),i})();const hve=["body"];function fve(i,t){}const pve=[[["mat-expansion-panel-header"]],"*",[["mat-action-row"]]],mve=["mat-expansion-panel-header","*","mat-action-row"];function gve(i,t){1&i&&Ie(0,"span",2),2&i&&U("@indicatorRotate",re()._getExpandedState())}const _ve=[[["mat-panel-title"]],[["mat-panel-description"]],"*"],vve=["mat-panel-title","mat-panel-description","*"],a8=new me("MAT_ACCORDION"),l8="225ms cubic-bezier(0.4,0.0,0.2,1)",c8={indicatorRotate:Oa("indicatorRotate",[Os("collapsed, void",oi({transform:"rotate(0deg)"})),Os("expanded",oi({transform:"rotate(180deg)"})),Or("expanded <=> collapsed, void => collapsed",Yr(l8))]),bodyExpansion:Oa("bodyExpansion",[Os("collapsed, void",oi({height:"0px",visibility:"hidden"})),Os("expanded",oi({height:"*",visibility:"visible"})),Or("expanded <=> collapsed, void => collapsed",Yr(l8))])},d8=new me("MAT_EXPANSION_PANEL");let yve=(()=>{class i{constructor(e,n){this._template=e,this._expansionPanel=n}}return i.\u0275fac=function(e){return new(e||i)(E(Eo),E(d8,8))},i.\u0275dir=ve({type:i,selectors:[["ng-template","matExpansionPanelContent",""]]}),i})(),bve=0;const u8=new me("MAT_EXPANSION_PANEL_DEFAULT_OPTIONS");let h8=(()=>{class i extends dve{get hideToggle(){return this._hideToggle||this.accordion&&this.accordion.hideToggle}set hideToggle(e){this._hideToggle=tn(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 $e,this.afterCollapse=new $e,this._inputChanges=new Te,this._headerId="mat-expansion-panel-header-"+bve++,this._bodyAnimationDone=new Te,this.accordion=e,this._document=o,this._bodyAnimationDone.pipe(Ql((c,d)=>c.fromState===d.fromState&&c.toState===d.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(Do(null),gn(()=>this.expanded&&!this._portal),Oi(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)(E(a8,12),E(Qn),E($R),E(jr),E(qt),E(kr,8),E(u8,8))},i.\u0275cmp=ot({type:i,selectors:[["mat-expansion-panel"]],contentQueries:function(e,n,r){if(1&e&&Wi(r,yve,5),2&e){let s;At(s=Dt())&&(n._lazyContent=s.first)}},viewQuery:function(e,n){if(1&e&&$n(hve,5),2&e){let r;At(r=Dt())&&(n._body=r.first)}},hostAttrs:[1,"mat-expansion-panel"],hostVars:6,hostBindings:function(e,n){2&e&&ln("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:[Dn([{provide:a8,useValue:void 0},{provide:d8,useExisting:i}]),dt,xi],ngContentSelectors:mve,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&&(or(pve),Yt(0),G(1,"div",0,1),Oe("@bodyExpansion.done",function(s){return n._bodyAnimationDone.next(s)}),G(3,"div",2),Yt(4,1),fe(5,fve,0,0,"ng-template",3),j(),Yt(6,2),j()),2&e&&(V(1),U("@bodyExpansion",n._getExpandedState())("id",n.id),It("aria-labelledby",n._headerId),V(4),U("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:[c8.bodyExpansion]},changeDetection:0}),i})();class xve{}const wve=JI(xve);let Mve=(()=>{class i extends wve{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=Qt.EMPTY;const c=e.accordion?e.accordion._stateChanges.pipe(gn(d=>!(!d.hideToggle&&!d.togglePosition))):_o;this.tabIndex=parseInt(l||"")||0,this._parentChangeSubscription=Cr(e.opened,e.closed,c,e._inputChanges.pipe(gn(d=>!!(d.hideToggle||d.disabled||d.togglePosition)))).subscribe(()=>this._changeDetectorRef.markForCheck()),e.closed.pipe(gn(()=>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:Qo(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)(E(h8,1),E(vt),E(Xc),E(Qn),E(u8,8),E(kr,8),wa("tabindex"))},i.\u0275cmp=ot({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&&Oe("click",function(){return n._toggle()})("keydown",function(s){return n._keydown(s)}),2&e&&(It("id",n.panel._headerId)("tabindex",n.tabIndex)("aria-controls",n._getPanelId())("aria-expanded",n._isExpanded())("aria-disabled",n.panel.disabled),qo("height",n._getHeaderHeight()),ln("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:[dt],ngContentSelectors:vve,decls:5,vars:3,consts:[[1,"mat-content"],["class","mat-expansion-indicator",4,"ngIf"],[1,"mat-expansion-indicator"]],template:function(e,n){1&e&&(or(_ve),G(0,"span",0),Yt(1),Yt(2,1),Yt(3,2),j(),fe(4,gve,1,1,"span",1)),2&e&&(ln("mat-content-hide-toggle",!n._showToggle()),V(4),U("ngIf",n._showToggle()))},dependencies:[_i],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:[c8.indicatorRotate]},changeDetection:0}),i})(),Cve=(()=>{class i{}return i.\u0275fac=function(e){return new(e||i)},i.\u0275dir=ve({type:i,selectors:[["mat-panel-description"]],hostAttrs:[1,"mat-expansion-panel-header-description"]}),i})(),Sve=(()=>{class i{}return i.\u0275fac=function(e){return new(e||i)},i.\u0275dir=ve({type:i,selectors:[["mat-panel-title"]],hostAttrs:[1,"mat-expansion-panel-header-title"]}),i})(),Eve=(()=>{class i{}return i.\u0275fac=function(e){return new(e||i)},i.\u0275mod=en({type:i}),i.\u0275inj=Wt({imports:[co,Jn,uve,Bh]}),i})();function Ave(i,t){if(1&i&&(G(0,"mat-option",19),Be(1),j()),2&i){const e=t.$implicit;U("value",e),V(1),Qi(" ",e," ")}}function Dve(i,t){if(1&i){const e=jn();G(0,"mat-form-field",16)(1,"mat-select",17),Oe("selectionChange",function(r){return Vt(e),Et(re(2)._changePageSize(r.value))}),fe(2,Ave,2,2,"mat-option",18),j()()}if(2&i){const e=re(2);U("appearance",e._formFieldAppearance)("color",e.color),V(1),U("value",e.pageSize)("disabled",e.disabled)("aria-labelledby",e._pageSizeLabelId)("panelClass",e.selectConfig.panelClass||"")("disableOptionCentering",e.selectConfig.disableOptionCentering),V(1),U("ngForOf",e._displayedPageSizeOptions)}}function Tve(i,t){if(1&i&&(G(0,"div",20),Be(1),j()),2&i){const e=re(2);V(1),ui(e.pageSize)}}function Ive(i,t){if(1&i&&(G(0,"div",12)(1,"div",13),Be(2),j(),fe(3,Dve,3,8,"mat-form-field",14),fe(4,Tve,2,1,"div",15),j()),2&i){const e=re();V(1),BD("id",e._pageSizeLabelId),V(1),Qi(" ",e._intl.itemsPerPageLabel," "),V(1),U("ngIf",e._displayedPageSizeOptions.length>1),V(1),U("ngIf",e._displayedPageSizeOptions.length<=1)}}function Rve(i,t){if(1&i){const e=jn();G(0,"button",21),Oe("click",function(){return Vt(e),Et(re().firstPage())}),ki(),G(1,"svg",7),Ie(2,"path",22),j()()}if(2&i){const e=re();U("matTooltip",e._intl.firstPageLabel)("matTooltipDisabled",e._previousButtonsDisabled())("matTooltipPosition","above")("disabled",e._previousButtonsDisabled()),It("aria-label",e._intl.firstPageLabel)}}function kve(i,t){if(1&i){const e=jn();ki(),ya(),G(0,"button",23),Oe("click",function(){return Vt(e),Et(re().lastPage())}),ki(),G(1,"svg",7),Ie(2,"path",24),j()()}if(2&i){const e=re();U("matTooltip",e._intl.lastPageLabel)("matTooltipDisabled",e._nextButtonsDisabled())("matTooltipPosition","above")("disabled",e._nextButtonsDisabled()),It("aria-label",e._intl.lastPageLabel)}}let yE=(()=>{class i{constructor(){this.changes=new Te,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=Pe({token:i,factory:i.\u0275fac,providedIn:"root"}),i})();const Ove={provide:yE,deps:[[new Ss,new Ca,yE]],useFactory:function Pve(i){return i||new yE}},Lve=new me("MAT_PAGINATOR_DEFAULT_OPTIONS"),Nve=jM(CQ(class{}));let Bve=(()=>{class i extends Nve{get pageIndex(){return this._pageIndex}set pageIndex(e){this._pageIndex=Math.max(Ps(e),0),this._changeDetectorRef.markForCheck()}get length(){return this._length}set length(e){this._length=Ps(e),this._changeDetectorRef.markForCheck()}get pageSize(){return this._pageSize}set pageSize(e){this._pageSize=Math.max(Ps(e),0),this._updateDisplayedPageSizeOptions()}get pageSizeOptions(){return this._pageSizeOptions}set pageSizeOptions(e){this._pageSizeOptions=(e||[]).map(n=>Ps(n)),this._updateDisplayedPageSizeOptions()}get hidePageSize(){return this._hidePageSize}set hidePageSize(e){this._hidePageSize=tn(e)}get showFirstLastButtons(){return this._showFirstLastButtons}set showFirstLastButtons(e){this._showFirstLastButtons=tn(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 $e,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){Co()},i.\u0275dir=ve({type:i,inputs:{color:"color",pageIndex:"pageIndex",length:"length",pageSize:"pageSize",pageSizeOptions:"pageSizeOptions",hidePageSize:"hidePageSize",showFirstLastButtons:"showFirstLastButtons",selectConfig:"selectConfig"},outputs:{page:"page"},features:[dt]}),i})(),Uve=0,Vve=(()=>{class i extends Bve{constructor(e,n,r){super(e,n,r),this._pageSizeLabelId="mat-paginator-page-size-label-"+Uve++,this._formFieldAppearance=r?.formFieldAppearance||"outline"}}return i.\u0275fac=function(e){return new(e||i)(E(yE),E(Qn),E(Lve,8))},i.\u0275cmp=ot({type:i,selectors:[["mat-paginator"]],hostAttrs:["role","group",1,"mat-mdc-paginator"],inputs:{disabled:"disabled"},exportAs:["matPaginator"],features:[dt],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&&(G(0,"div",0)(1,"div",1),fe(2,Ive,5,4,"div",2),G(3,"div",3)(4,"div",4),Be(5),j(),fe(6,Rve,3,5,"button",5),G(7,"button",6),Oe("click",function(){return n.previousPage()}),ki(),G(8,"svg",7),Ie(9,"path",8),j()(),ya(),G(10,"button",9),Oe("click",function(){return n.nextPage()}),ki(),G(11,"svg",7),Ie(12,"path",10),j()(),fe(13,kve,3,5,"button",11),j()()()),2&e&&(V(2),U("ngIf",!n.hidePageSize),V(3),Qi(" ",n._intl.getRangeLabel(n.pageIndex,n.pageSize,n.length)," "),V(1),U("ngIf",n.showFirstLastButtons),V(1),U("matTooltip",n._intl.previousPageLabel)("matTooltipDisabled",n._previousButtonsDisabled())("matTooltipPosition","above")("disabled",n._previousButtonsDisabled()),It("aria-label",n._intl.previousPageLabel),V(3),U("matTooltip",n._intl.nextPageLabel)("matTooltipDisabled",n._nextButtonsDisabled())("matTooltipPosition","above")("disabled",n._nextButtonsDisabled()),It("aria-label",n._intl.nextPageLabel),V(3),U("ngIf",n.showFirstLastButtons))},dependencies:[lo,_i,XM,yl,pb,Nm,Fs],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})(),zve=(()=>{class i{}return i.\u0275fac=function(e){return new(e||i)},i.\u0275mod=en({type:i}),i.\u0275inj=Wt({providers:[Ove],imports:[co,KM,VH,LV]}),i})(),Hve=(()=>{class i{}return i.\u0275fac=function(e){return new(e||i)},i.\u0275mod=en({type:i,bootstrap:[cge]}),i.\u0275inj=Wt({providers:[Jl,KR,{provide:OH,useValue:Vie}],imports:[LB,wK,lve,tH,SJ,gC,mH,Eve,TV,kV,LV,KM,tz,zve,mse,vH,VH,vV,Ipe,Rme,nH,tR,Yie,lre]}),i})();th(ec,[lo,_i,Fs,n0,nE],[Xo]),th(zR,[hm,lo,_i,xy,nc,Zc,yl,h8,Mve,Sve,Cve,Fs,Vve,pb,Nm,n0],[]),th(xC,[lo,_i,MC,wC,_H,n0],[]),th(_G,[lo,_i,Ro,Fs,pb,Nm,n0,nE],[Xo]),L7().bootstrapModule(Hve).catch(i=>console.error(i))},489:function(Bo,Gs,ps){var dn;Bo=ps.nmd(Bo),function(){var z,Kr=200,Un="Expected a function",Ga="__lodash_hash_undefined__",Ci="__lodash_placeholder__",Si=1,ms=2,js=4,Ys=1,Uo=2,On=1,ur=2,mc=4,ua=8,Tl=16,ha=32,Il=64,Wa=128,fa=256,md=512,ME=800,Kg=16,In=1/0,Ya=9007199254740991,SE=17976931348623157e292,Of=NaN,pa=4294967295,Te=pa-1,c0=pa>>>1,d0=[["ary",Wa],["bind",On],["bindKey",ur],["curry",ua],["curryRight",Tl],["flip",md],["partial",ha],["partialRight",Il],["rearg",fa]],ni="[object Arguments]",qn="[object Array]",EE="[object AsyncFunction]",tt="[object Boolean]",gc="[object Date]",AE="[object DOMException]",gd="[object Error]",Ff="[object Function]",u0="[object GeneratorFunction]",Vo="[object Map]",Vu="[object Number]",DE="[object Null]",qa="[object Object]",h0="[object Promise]",TE="[object Proxy]",_d="[object RegExp]",zo="[object Set]",_c="[object String]",Lf="[object Symbol]",Zg="[object Undefined]",vd="[object WeakMap]",zu="[object ArrayBuffer]",yd="[object DataView]",ma="[object Float32Array]",Nf="[object Float64Array]",Qg="[object Int8Array]",Bf="[object Int16Array]",Jg="[object Int32Array]",e_="[object Uint8Array]",Hu="[object Uint8ClampedArray]",t_="[object Uint16Array]",n_="[object Uint32Array]",RE=/\b__p \+= '';/g,kE=/\b(__p \+=) '' \+/g,PE=/(__e\(.*?\)|\b__t\)) \+\n'';/g,f0=/&(?:amp|lt|gt|quot|#39);/g,p0=/[&<>"']/g,OE=RegExp(f0.source),FE=RegExp(p0.source),QO=/<%-([\s\S]+?)%>/g,i_=/<%([\s\S]+?)%>/g,r_=/<%=([\s\S]+?)%>/g,m0=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,g0=/^\w*$/,_0=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,s_=/[\\^$.*+?()[\]{}|]/g,v0=RegExp(s_.source),Uf=/^\s+/,y0=/\s/,b0=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,Mr=/\{\n\/\* \[wrapped with (.+)\] \*/,LE=/,? & /,NE=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,BE=/[()=,{}\[\]\/\s]/,UE=/\\(\\)?/g,x0=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,w0=/\w*$/,VE=/^[-+]0x[0-9a-f]+$/i,Xa=/^0b[01]+$/i,zE=/^\[object .+?Constructor\]$/,rr=/^0o[0-7]+$/i,bd=/^(?:0|[1-9]\d*)$/,_o=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,o_=/($^)/,HE=/['\n\r\u2028\u2029\\]/g,$u="\\ud800-\\udfff",C0="\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff",l_="\\u2700-\\u27bf",c_="a-z\\xdf-\\xf6\\xf8-\\xff",d_="A-Z\\xc0-\\xd6\\xd8-\\xde",S0="\\ufe0e\\ufe0f",E0="\\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",Cr="["+$u+"]",Vf="["+E0+"]",xd="["+C0+"]",ci="\\d+",u_="["+l_+"]",mi="["+c_+"]",zf="[^"+$u+E0+ci+l_+c_+d_+"]",h_="\\ud83c[\\udffb-\\udfff]",Ot="[^"+$u+"]",Wu="(?:\\ud83c[\\udde6-\\uddff]){2}",ju="[\\ud800-\\udbff][\\udc00-\\udfff]",Yu="["+d_+"]",pe="(?:"+mi+"|"+zf+")",Hf="(?:"+Yu+"|"+zf+")",Jt="(?:['\u2019](?:d|ll|m|re|s|t|ve))?",Xn="(?:['\u2019](?:D|LL|M|RE|S|T|VE))?",A0="(?:"+xd+"|"+h_+")?",YE="["+S0+"]?",XE=YE+A0+"(?:\\u200d(?:"+[Ot,Wu,ju].join("|")+")"+YE+A0+")*",KE="(?:"+[u_,Wu,ju].join("|")+")"+XE,JO="(?:"+[Ot+xd+"?",xd,Wu,ju,Cr].join("|")+")",Rl=RegExp("['\u2019]","g"),eF=RegExp(xd,"g"),D0=RegExp(h_+"(?="+h_+")|"+JO+XE,"g"),tF=RegExp([Yu+"?"+mi+"+"+Jt+"(?="+[Vf,Yu,"$"].join("|")+")",Hf+"+"+Xn+"(?="+[Vf,Yu+pe,"$"].join("|")+")",Yu+"?"+pe+"+"+Jt,Yu+"+"+Xn,"\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])","\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",ci,KE].join("|"),"g"),nF=RegExp("[\\u200d"+$u+C0+S0+"]"),ZE=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,iF=["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"],QE=-1,Ei={};Ei[ma]=Ei[Nf]=Ei[Qg]=Ei[Bf]=Ei[Jg]=Ei[e_]=Ei[Hu]=Ei[t_]=Ei[n_]=!0,Ei[ni]=Ei[qn]=Ei[zu]=Ei[tt]=Ei[yd]=Ei[gc]=Ei[gd]=Ei[Ff]=Ei[Vo]=Ei[Vu]=Ei[qa]=Ei[_d]=Ei[zo]=Ei[_c]=Ei[vd]=!1;var En={};En[ni]=En[qn]=En[zu]=En[yd]=En[tt]=En[gc]=En[ma]=En[Nf]=En[Qg]=En[Bf]=En[Jg]=En[Vo]=En[Vu]=En[qa]=En[_d]=En[zo]=En[_c]=En[Lf]=En[e_]=En[Hu]=En[t_]=En[n_]=!0,En[gd]=En[Ff]=En[vd]=!1;var oF={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},Pe=parseFloat,aF=parseInt,Wt="object"==typeof global&&global&&global.Object===Object&&global,Gf="object"==typeof self&&self&&self.Object===Object&&self,Sr=Wt||Gf||Function("return this")(),f_=Gs&&!Gs.nodeType&&Gs,Xu=f_&&Bo&&!Bo.nodeType&&Bo,p_=Xu&&Xu.exports===f_,wd=p_&&Wt.process,gs=function(){try{return Xu&&Xu.require&&Xu.require("util").types||wd&&wd.binding&&wd.binding("util")}catch{}}(),m_=gs&&gs.isArrayBuffer,T0=gs&&gs.isDate,Ft=gs&&gs.isMap,Wf=gs&&gs.isRegExp,I0=gs&&gs.isSet,Xs=gs&&gs.isTypedArray;function _s(X,he,ae){switch(ae.length){case 0:return X.call(he);case 1:return X.call(he,ae[0]);case 2:return X.call(he,ae[0],ae[1]);case 3:return X.call(he,ae[0],ae[1],ae[2])}return X.apply(he,ae)}function lF(X,he,ae,ze){for(var jt=-1,Vn=null==X?0:X.length;++jt-1}function Ku(X,he,ae){for(var ze=-1,jt=null==X?0:X.length;++ze-1;);return ae}function ga(X,he){for(var ae=X.length;ae--&&Lt(he,X[ae],0)>-1;);return ae}var nA=v_({\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"}),ot=v_({"&":"&","<":"<",">":">",'"':""","'":"'"});function th(X){return"\\"+oF[X]}function Sd(X){return nF.test(X)}function Xf(X){var he=-1,ae=Array(X.size);return X.forEach(function(ze,jt){ae[++he]=[jt,ze]}),ae}function ve(X,he){return function(ae){return X(he(ae))}}function $i(X,he){for(var ae=-1,ze=X.length,jt=0,Vn=[];++ae",""":'"',"'":"'"}),ys=function X(he){var u,ae=(he=null==he?Sr:ys.defaults(Sr.Object(),he,ys.pick(Sr,iF))).Array,ze=he.Date,jt=he.Error,Vn=he.Function,xt=he.Math,ai=he.Object,bc=he.RegExp,k0=he.String,Er=he.TypeError,sr=ae.prototype,Ho=ai.prototype,Zs=he["__core-js_shared__"],Ol=Vn.prototype.toString,ri=Ho.hasOwnProperty,bi=0,sA=(u=/[^.]+$/.exec(Zs&&Zs.keys&&Zs.keys.IE_PROTO||""))?"Symbol(src)_1."+u:"",Ad=Ho.toString,P0=Ol.call(ai),Zf=Sr._,Qf=bc("^"+Ol.call(ri).replace(s_,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),Ja=p_?he.Buffer:z,Ui=he.Symbol,x_=he.Uint8Array,bs=Ja?Ja.allocUnsafe:z,xs=ve(ai.getPrototypeOf,ai),Jf=ai.create,Dd=Ho.propertyIsEnumerable,xc=sr.splice,bo=Ui?Ui.isConcatSpreadable:z,ih=Ui?Ui.iterator:z,Td=Ui?Ui.toStringTag:z,ep=function(){try{var u=kc(ai,"defineProperty");return u({},"",{}),u}catch{}}(),oA=he.clearTimeout!==Sr.clearTimeout&&he.clearTimeout,dF=ze&&ze.now!==Sr.Date.now&&ze.now,uF=he.setTimeout!==Sr.setTimeout&&he.setTimeout,w_=xt.ceil,M_=xt.floor,O0=ai.getOwnPropertySymbols,hF=Ja?Ja.isBuffer:z,aA=he.isFinite,fF=sr.join,pF=ve(ai.keys,ai),fr=xt.max,Zr=xt.min,mF=ze.now,F0=he.parseInt,C_=xt.random,gF=sr.reverse,L0=kc(he,"DataView"),tp=kc(he,"Map"),el=kc(he,"Promise"),Id=kc(he,"Set"),xi=kc(he,"WeakMap"),Rd=kc(ai,"create"),np=xi&&new xi,kd={},N0=Pc(L0),B0=Pc(tp),lA=Pc(el),S_=Pc(Id),cA=Pc(xi),Qr=Ui?Ui.prototype:z,Pd=Qr?Qr.valueOf:z,E_=Qr?Qr.toString:z;function I(u){if(Pi(u)&&!sn(u)&&!(u instanceof kn)){if(u instanceof Ai)return u;if(ri.call(u,"__wrapped__"))return ns(u)}return new Ai(u)}var Od=function(){function u(){}return function(f){if(!Mi(f))return{};if(Jf)return Jf(f);u.prototype=f;var _=new u;return u.prototype=z,_}}();function wc(){}function Ai(u,f){this.__wrapped__=u,this.__actions__=[],this.__chain__=!!f,this.__index__=0,this.__values__=z}function kn(u){this.__wrapped__=u,this.__actions__=[],this.__dir__=1,this.__filtered__=!1,this.__iteratees__=[],this.__takeCount__=pa,this.__views__=[]}function Mc(u){var f=-1,_=null==u?0:u.length;for(this.clear();++f<_;){var w=u[f];this.set(w[0],w[1])}}function Pt(u){var f=-1,_=null==u?0:u.length;for(this.clear();++f<_;){var w=u[f];this.set(w[0],w[1])}}function _a(u){var f=-1,_=null==u?0:u.length;for(this.clear();++f<_;){var w=u[f];this.set(w[0],w[1])}}function Et(u){var f=-1,_=null==u?0:u.length;for(this.__data__=new _a;++f<_;)this.add(u[f])}function Jr(u){var f=this.__data__=new Pt(u);this.size=f.size}function I_(u,f){var _=sn(u),w=!_&&Lc(u),S=!_&&!w&&ol(u),P=!_&&!w&&!S&&jo(u),$=_||w||S||P,Y=$?Ks(u.length,k0):[],Q=Y.length;for(var _e in u)(f||ri.call(u,_e))&&(!$||!("length"==_e||S&&("offset"==_e||"parent"==_e)||P&&("buffer"==_e||"byteLength"==_e||"byteOffset"==_e)||sl(_e,Q)))&&Y.push(_e);return Y}function zr(u){var f=u.length;return f?u[lh(0,f-1)]:z}function tl(u,f){return Ep(eo(u),Nl(f,0,u.length))}function $0(u){return Ep(eo(u))}function Ll(u,f,_){(_!==z&&!Wo(u[f],_)||_===z&&!(f in u))&&$o(u,f,_)}function Qs(u,f,_){var w=u[f];(!ri.call(u,f)||!Wo(w,_)||_===z&&!(f in u))&&$o(u,f,_)}function rp(u,f){for(var _=u.length;_--;)if(Wo(u[_][0],f))return _;return-1}function G0(u,f,_,w){return nl(u,function(S,P,$){f(w,S,_(S),$)}),w}function W0(u,f){return u&&di(f,pr(f),u)}function $o(u,f,_){"__proto__"==f&&ep?ep(u,f,{configurable:!0,enumerable:!0,value:_,writable:!0}):u[f]=_}function rh(u,f){for(var _=-1,w=f.length,S=ae(w),P=null==u;++_=f?u:f)),u}function Ms(u,f,_,w,S,P){var $,Y=f&Si,Q=f&ms,_e=f&js;if(_&&($=S?_(u,w,S,P):_(u)),$!==z)return $;if(!Mi(u))return u;var ye=sn(u);if(ye){if($=function fx(u){var f=u.length,_=new u.constructor(f);return f&&"string"==typeof u[0]&&ri.call(u,"index")&&(_.index=u.index,_.input=u.input),_}(u),!Y)return eo(u,$)}else{var be=Hr(u),Xe=be==Ff||be==u0;if(ol(u))return me(u,Y);if(be==qa||be==ni||Xe&&!S){if($=Q||Xe?{}:PA(u),!Y)return Q?function hh(u,f){return di(u,dx(u),f)}(u,function _A(u,f){return u&&di(f,Ds(f),u)}($,u)):function H_(u,f){return di(u,Z_(u),f)}(u,W0($,u))}else{if(!En[be])return S?u:{};$=function px(u,f,_){var w=u.constructor;switch(f){case zu:return sx(u);case tt:case gc:return new w(+u);case yd:return function wF(u,f){var _=f?sx(u.buffer):u.buffer;return new u.constructor(_,u.byteOffset,u.byteLength)}(u,_);case ma:case Nf:case Qg:case Bf:case Jg:case e_:case Hu:case t_:case n_:return AA(u,_);case Vo:return new w;case Vu:case _c:return new w(u);case _d:return function MF(u){var f=new u.constructor(u.source,w0.exec(u));return f.lastIndex=u.lastIndex,f}(u);case zo:return new w;case Lf:return function CF(u){return Pd?ai(Pd.call(u)):{}}(u)}}(u,be,Y)}}P||(P=new Jr);var bt=P.get(u);if(bt)return bt;P.set(u,$),iw(u)?u.forEach(function(Ht){$.add(Ms(Ht,f,_,Ht,u,P))}):Tv(u)&&u.forEach(function(Ht,An){$.set(An,Ms(Ht,f,_,An,u,P))});var mn=ye?z:(_e?Q?q_:bp:Q?Ds:pr)(u);return Rn(mn||u,function(Ht,An){mn&&(Ht=u[An=Ht]),Qs($,An,Ms(Ht,f,_,An,u,P))}),$}function R_(u,f,_){var w=_.length;if(null==u)return!w;for(u=ai(u);w--;){var S=_[w],$=u[S];if($===z&&!(S in u)||!(0,f[S])($))return!1}return!0}function sp(u,f,_){if("function"!=typeof u)throw new Er(Un);return gh(function(){u.apply(z,_)},f)}function Ld(u,f,_,w){var S=-1,P=kl,$=!0,Y=u.length,Q=[],_e=f.length;if(!Y)return Q;_&&(f=gi(f,Ur(_))),w?(P=Ku,$=!1):f.length>=Kr&&(P=yc,$=!1,f=new Et(f));e:for(;++S-1},Pt.prototype.set=function fA(u,f){var _=this.__data__,w=rp(_,u);return w<0?(++this.size,_.push([u,f])):_[w][1]=f,this},_a.prototype.clear=function pA(){this.size=0,this.__data__={hash:new Mc,map:new(tp||Pt),string:new Mc}},_a.prototype.delete=function mA(u){var f=K_(this,u).delete(u);return this.size-=f?1:0,f},_a.prototype.get=function Se(u){return K_(this,u).get(u)},_a.prototype.has=function zn(u){return K_(this,u).has(u)},_a.prototype.set=function Vt(u,f){var _=K_(this,u),w=_.size;return _.set(u,f),this.size+=_.size==w?0:1,this},Et.prototype.add=Et.prototype.push=function Ar(u){return this.__data__.set(u,Ga),this},Et.prototype.has=function H0(u){return this.__data__.has(u)},Jr.prototype.clear=function va(){this.__data__=new Pt,this.size=0},Jr.prototype.delete=function D_(u){var f=this.__data__,_=f.delete(u);return this.size=f.size,_},Jr.prototype.get=function T_(u){return this.__data__.get(u)},Jr.prototype.has=function gA(u){return this.__data__.has(u)},Jr.prototype.set=function vF(u,f){var _=this.__data__;if(_ instanceof Pt){var w=_.__data__;if(!tp||w.length0&&_(Y)?f>1?Kn(Y,f-1,_,w,S):Pl(S,Y):w||(S[S.length]=Y)}return S}var il=$_(),Di=$_(!0);function ki(u,f){return u&&il(u,f,pr)}function P_(u,f){return u&&Di(u,f,pr)}function ya(u,f){return vc(f,function(_){return Hl(u[_])})}function Cc(u,f){for(var _=0,w=(f=Ma(f,u)).length;null!=u&&_f}function op(u,f){return null!=u&&ri.call(u,f)}function ap(u,f){return null!=u&&f in ai(u)}function lp(u,f,_){for(var w=_?Ku:kl,S=u[0].length,P=u.length,$=P,Y=ae(P),Q=1/0,_e=[];$--;){var ye=u[$];$&&f&&(ye=gi(ye,Ur(f))),Q=Zr(ye.length,Q),Y[$]=!_&&(f||S>=120&&ye.length>=120)?new Et($&&ye):z}ye=u[0];var be=-1,Xe=Y[0];e:for(;++be=Y?Q:Q*("desc"==_[w]?-1:1)}return u.index-f.index}(P,$,_)})}function J0(u,f,_){for(var w=-1,S=f.length,P={};++w-1;)Y!==u&&xc.call(Y,Q,1),xc.call(u,Q,1);return u}function ah(u,f){for(var _=u?f.length:0,w=_-1;_--;){var S=f[_];if(_==w||S!==P){var P=S;sl(S)?xc.call(u,S,1):dh(u,S)}}return u}function lh(u,f){return u+M_(C_()*(f-u+1))}function ch(u,f){var _="";if(!u||f<1||f>Ya)return _;do{f%2&&(_+=u),(f=M_(f/2))&&(u+=u)}while(f);return _}function pn(u,f){return Cp(J_(u,f,is),u+"")}function SA(u){return zr(Uc(u))}function tx(u,f){var _=Uc(u);return Ep(_,Nl(f,0,_.length))}function zd(u,f,_,w){if(!Mi(u))return u;for(var S=-1,P=(f=Ma(f,u)).length,$=P-1,Y=u;null!=Y&&++SS?0:S+f),(_=_>S?S:_)<0&&(_+=S),S=f>_?0:_-f>>>0,f>>>=0;for(var P=ae(S);++w>>1,$=u[P];null!==$&&!As($)&&(_?$<=f:$=Kr){var _e=f?null:j_(u);if(_e)return Hn(_e);$=!1,S=yc,Q=new Et}else Q=f?[]:Y;e:for(;++w=w?u:ts(u,f,_)}var rx=oA||function(u){return Sr.clearTimeout(u)};function me(u,f){if(f)return u.slice();var _=u.length,w=bs?bs(_):new u.constructor(_);return u.copy(w),w}function sx(u){var f=new u.constructor(u.byteLength);return new x_(f).set(new x_(u)),f}function AA(u,f){var _=f?sx(u.buffer):u.buffer;return new u.constructor(_,u.byteOffset,u.length)}function DA(u,f){if(u!==f){var _=u!==z,w=null===u,S=u==u,P=As(u),$=f!==z,Y=null===f,Q=f==f,_e=As(f);if(!Y&&!_e&&!P&&u>f||P&&$&&Q&&!Y&&!_e||w&&$&&Q||!_&&Q||!S)return 1;if(!w&&!P&&!_e&&u1?_[S-1]:z,$=S>2?_[2]:z;for(P=u.length>3&&"function"==typeof P?(S--,P):z,$&&Tr(_[0],_[1],$)&&(P=S<3?z:P,S=1),f=ai(f);++w-1?S[P?f[$]:$]:z}}function Cs(u){return wo(function(f){var _=f.length,w=_,S=Ai.prototype.thru;for(u&&f.reverse();w--;){var P=f[w];if("function"!=typeof P)throw new Er(Un);if(S&&!$&&"wrapper"==rl(P))var $=new Ai([],!0)}for(w=$?w:_;++w<_;){var Y=rl(P=f[w]),Q="wrapper"==Y?X_(P):z;$=Q&&mh(Q[0])&&Q[1]==(Wa|ua|ha|fa)&&!Q[4].length&&1==Q[9]?$[rl(Q[0])].apply($,Q[3]):1==P.length&&mh(P)?$[Y]():$.thru(P)}return function(){var _e=arguments,ye=_e[0];if($&&1==_e.length&&sn(ye))return $.plant(ye).value();for(var be=0,Xe=_?f[be].apply(this,_e):ye;++be<_;)Xe=f[be].call(this,Xe);return Xe}})}function jd(u,f,_,w,S,P,$,Y,Q,_e){var ye=f&Wa,be=f&On,Xe=f&ur,bt=f&(ua|Tl),zt=f&md,mn=Xe?z:gp(u);return function Ht(){for(var An=arguments.length,Ln=ae(An),rs=An;rs--;)Ln[rs]=arguments[rs];if(bt)var ss=Sa(Ht),so=function eh(X,he){for(var ae=X.length,ze=0;ae--;)X[ae]===he&&++ze;return ze}(Ln,ss);if(w&&(Ln=$d(Ln,w,S,bt)),P&&(Ln=TA(Ln,P,$,bt)),An-=so,bt&&An<_e){var Ti=$i(Ln,ss);return ax(u,f,jd,Ht.placeholder,_,Ln,Ti,Y,Q,_e-An)}var Ts=be?_:this,So=Xe?Ts[u]:u;return An=Ln.length,Y?Ln=function Es(u,f){for(var _=u.length,w=Zr(f.length,_),S=eo(u);w--;){var P=f[w];u[w]=sl(P,_)?S[P]:z}return u}(Ln,Y):zt&&An>1&&Ln.reverse(),ye&&QY))return!1;var _e=P.get(u),ye=P.get(f);if(_e&&ye)return _e==f&&ye==u;var be=-1,Xe=!0,bt=_&Uo?new Et:z;for(P.set(u,f),P.set(f,u);++be-1&&u%1==0&&u1?"& ":"")+f[w],f=f.join(_>2?", ":" "),u.replace(b0,"{\n/* [wrapped with "+f+"] */\n")}(w,function BA(u,f){return Rn(d0,function(_){var w="_."+_[0];f&_[1]&&!kl(u,w)&&u.push(w)}),u.sort()}(function ux(u){var f=u.match(Mr);return f?f[1].split(LE):[]}(w),_)))}function yx(u){var f=0,_=0;return function(){var w=mF(),S=Kg-(w-_);if(_=w,S>0){if(++f>=ME)return arguments[0]}else f=0;return u.apply(z,arguments)}}function Ep(u,f){var _=-1,w=u.length,S=w-1;for(f=f===z?w:f;++_1?u[f-1]:z;return _="function"==typeof _?(u.pop(),_):z,yh(u,_)});function Hx(u){var f=I(u);return f.__chain__=!0,f}function Rp(u,f){return f(u)}var $x=wo(function(u){var f=u.length,_=f?u[0]:0,w=this.__wrapped__,S=function(P){return rh(P,u)};return!(f>1||this.__actions__.length)&&w instanceof kn&&sl(_)?((w=w.slice(_,+_+(f?1:0))).__actions__.push({func:Rp,args:[S],thisArg:z}),new Ai(w,this.__chain__).thru(function(P){return f&&!P.length&&P.push(z),P})):this.thru(S)}),s1=pp(function(u,f,_){ri.call(u,_)?++u[_]:$o(u,_,1)}),Wx=RA(Ex),Pp=RA(rv);function bv(u,f){return(sn(u)?Rn:nl)(u,Nt(f,3))}function zl(u,f){return(sn(u)?cF:k_)(u,Nt(f,3))}var a1=pp(function(u,f,_){ri.call(u,_)?u[_].push(f):$o(u,_,[f])}),c1=pn(function(u,f,_){var w=-1,S="function"==typeof f,P=no(u)?ae(u.length):[];return nl(u,function($){P[++w]=S?_s(f,$,_):ba($,f,_)}),P}),d1=pp(function(u,f,_){$o(u,_,f)});function Op(u,f){return(sn(u)?gi:sh)(u,Nt(f,3))}var Ea=pp(function(u,f,_){u[_?0:1].push(f)},function(){return[[],[]]}),v1=pn(function(u,f){if(null==u)return[];var _=f.length;return _>1&&Tr(u,f[0],f[1])?f=[]:_>2&&Tr(f[0],f[1],f[2])&&(f=[f[0]]),B_(u,Kn(f,1),[])}),Fp=dF||function(){return Sr.Date.now()};function xh(u,f,_){return f=_?z:f,xo(u,Wa,z,z,z,z,f=u&&null==f?u.length:f)}function Aa(u,f){var _;if("function"!=typeof f)throw new Er(Un);return u=un(u),function(){return--u>0&&(_=f.apply(this,arguments)),u<=1&&(f=z),_}}var Fc=pn(function(u,f,_){var w=On;if(_.length){var S=$i(_,Sa(Fc));w|=ha}return xo(u,w,f,_,S)}),xv=pn(function(u,f,_){var w=On|ur;if(_.length){var S=$i(_,Sa(xv));w|=ha}return xo(f,w,u,_,S)});function b1(u,f,_){var w,S,P,$,Y,Q,_e=0,ye=!1,be=!1,Xe=!0;if("function"!=typeof u)throw new Er(Un);function bt(Ti){var Ts=w,So=S;return w=S=z,_e=Ti,$=u.apply(So,Ts)}function Ht(Ti){var Ts=Ti-Q;return Q===z||Ts>=f||Ts<0||be&&Ti-_e>=P}function An(){var Ti=Fp();if(Ht(Ti))return Ln(Ti);Y=gh(An,function mn(Ti){var ID=f-(Ti-Q);return be?Zr(ID,P-(Ti-_e)):ID}(Ti))}function Ln(Ti){return Y=z,Xe&&w?bt(Ti):(w=S=z,$)}function so(){var Ti=Fp(),Ts=Ht(Ti);if(w=arguments,S=this,Q=Ti,Ts){if(Y===z)return function zt(Ti){return _e=Ti,Y=gh(An,f),ye?bt(Ti):$}(Q);if(be)return rx(Y),Y=gh(An,f),bt(Q)}return Y===z&&(Y=gh(An,f)),$}return f=Mo(f)||0,Mi(_)&&(ye=!!_.leading,P=(be="maxWait"in _)?fr(Mo(_.maxWait)||0,f):P,Xe="trailing"in _?!!_.trailing:Xe),so.cancel=function rs(){Y!==z&&rx(Y),_e=0,w=Q=S=Y=z},so.flush=function ss(){return Y===z?$:Ln(Fp())},so}var PF=pn(function(u,f){return sp(u,1,f)}),OF=pn(function(u,f,_){return sp(u,Mo(f)||0,_)});function qd(u,f){if("function"!=typeof u||null!=f&&"function"!=typeof f)throw new Er(Un);var _=function(){var w=arguments,S=f?f.apply(this,w):w[0],P=_.cache;if(P.has(S))return P.get(S);var $=u.apply(this,w);return _.cache=P.set(S,$)||P,$};return _.cache=new(qd.Cache||_a),_}function Sv(u){if("function"!=typeof u)throw new Er(Un);return function(){var f=arguments;switch(f.length){case 0:return!u.call(this);case 1:return!u.call(this,f[0]);case 2:return!u.call(this,f[0],f[1]);case 3:return!u.call(this,f[0],f[1],f[2])}return!u.apply(this,f)}}qd.Cache=_a;var Xx=Hd(function(u,f){var _=(f=1==f.length&&sn(f[0])?gi(f[0],Ur(Nt())):gi(Kn(f,1),Ur(Nt()))).length;return pn(function(w){for(var S=-1,P=Zr(w.length,_);++S=f}),Lc=Ud(function(){return arguments}())?Ud:function(u){return Pi(u)&&ri.call(u,"callee")&&!Dd.call(u,"callee")},sn=ae.isArray,LF=m_?Ur(m_):function xA(u){return Pi(u)&&es(u)==zu};function no(u){return null!=u&&zp(u.length)&&!Hl(u)}function wi(u){return Pi(u)&&no(u)}var ol=hF||Jd,ew=T0?Ur(T0):function yF(u){return Pi(u)&&es(u)==gc};function Up(u){if(!Pi(u))return!1;var f=es(u);return f==gd||f==AE||"string"==typeof u.message&&"string"==typeof u.name&&!io(u)}function Hl(u){if(!Mi(u))return!1;var f=es(u);return f==Ff||f==u0||f==EE||f==TE}function Vp(u){return"number"==typeof u&&u==un(u)}function zp(u){return"number"==typeof u&&u>-1&&u%1==0&&u<=Ya}function Mi(u){var f=typeof u;return null!=u&&("object"==f||"function"==f)}function Pi(u){return null!=u&&"object"==typeof u}var Tv=Ft?Ur(Ft):function wA(u){return Pi(u)&&Hr(u)==Vo};function wh(u){return"number"==typeof u||Pi(u)&&es(u)==Vu}function io(u){if(!Pi(u)||es(u)!=qa)return!1;var f=xs(u);if(null===f)return!0;var _=ri.call(f,"constructor")&&f.constructor;return"function"==typeof _&&_ instanceof _&&Ol.call(_)==P0}var $p=Wf?Ur(Wf):function xF(u){return Pi(u)&&es(u)==_d},iw=I0?Ur(I0):function L_(u){return Pi(u)&&Hr(u)==zo};function Gp(u){return"string"==typeof u||!sn(u)&&Pi(u)&&es(u)==_c}function As(u){return"symbol"==typeof u||Pi(u)&&es(u)==Lf}var jo=Xs?Ur(Xs):function X0(u){return Pi(u)&&zp(u.length)&&!!Ei[es(u)]},Pv=yp(cp),O1=yp(function(u,f){return u<=f});function Ov(u){if(!u)return[];if(no(u))return Gp(u)?yo(u):eo(u);if(ih&&u[ih])return function rA(X){for(var he,ae=[];!(he=X.next()).done;)ae.push(he.value);return ae}(u[ih]());var f=Hr(u);return(f==Vo?Xf:f==zo?Hn:Uc)(u)}function al(u){return u?(u=Mo(u))===In||u===-In?(u<0?-1:1)*SE:u==u?u:0:0===u?u:0}function un(u){var f=al(u),_=f%1;return f==f?_?f-_:f:0}function F1(u){return u?Nl(un(u),0,pa):0}function Mo(u){if("number"==typeof u)return u;if(As(u))return Of;if(Mi(u)){var f="function"==typeof u.valueOf?u.valueOf():u;u=Mi(f)?f+"":f}if("string"!=typeof u)return 0===u?u:+u;u=Wn(u);var _=Xa.test(u);return _||rr.test(u)?aF(u.slice(2),_?2:8):VE.test(u)?Of:+u}function $l(u){return di(u,Ds(u))}function Fn(u){return null==u?"":Js(u)}var vt=Dr(function(u,f){if(Mp(f)||no(f))di(f,pr(f),u);else for(var _ in f)ri.call(f,_)&&Qs(u,_,f[_])}),rw=Dr(function(u,f){di(f,Ds(f),u)}),Gl=Dr(function(u,f,_,w){di(f,Ds(f),u,w)}),ll=Dr(function(u,f,_,w){di(f,pr(f),u,w)}),N1=wo(rh),Bc=pn(function(u,f){u=ai(u);var _=-1,w=f.length,S=w>2?f[2]:z;for(S&&Tr(f[0],f[1],S)&&(w=1);++_1),P}),di(u,q_(u),_),w&&(_=Ms(_,Si|ms|js,Ca));for(var S=f.length;S--;)dh(_,f[S]);return _}),Y1=wo(function(u,f){return null==u?{}:function Q0(u,f){return J0(u,f,function(_,w){return Uv(u,w)})}(u,f)});function Vv(u,f){if(null==u)return{};var _=gi(q_(u),function(w){return[w]});return f=Nt(f),J0(u,_,function(w,S){return f(w,S[0])})}var lw=fh(pr),zv=fh(Ds);function Uc(u){return null==u?[]:Ju(u,pr(u))}var V=Wd(function(u,f,_){return f=f.toLowerCase(),u+(_?Hv(f):f)});function Hv(u){return Zd(Fn(u).toLowerCase())}function $v(u){return(u=Fn(u))&&u.replace(_o,nA).replace(eF,"")}var sD=Wd(function(u,f,_){return u+(_?"-":"")+f.toLowerCase()}),dw=Wd(function(u,f,_){return u+(_?" ":"")+f.toLowerCase()}),oD=Gd("toLowerCase"),Gv=Wd(function(u,f,_){return u+(_?"_":"")+f.toLowerCase()}),cD=Wd(function(u,f,_){return u+(_?" ":"")+Zd(f)}),pw=Wd(function(u,f,_){return u+(_?" ":"")+f.toUpperCase()}),Zd=Gd("toUpperCase");function mw(u,f,_){return u=Fn(u),(f=_?z:f)===z?function en(X){return ZE.test(X)}(u)?function fn(X){return X.match(tF)||[]}(u):function tA(X){return X.match(NE)||[]}(u):u.match(f)||[]}var jv=pn(function(u,f){try{return _s(u,z,f)}catch(_){return Up(_)?_:new jt(_)}}),fD=wo(function(u,f){return Rn(f,function(_){_=Go(_),$o(u,_,Fc(u[_],u))}),u});function Yv(u){return function(){return u}}var gw=Cs(),_D=Cs(!0);function is(u){return u}function Wp(u){return N_("function"==typeof u?u:Ms(u,Si))}var Xv=pn(function(u,f){return function(_){return ba(_,u,f)}}),vD=pn(function(u,f){return function(_){return ba(u,_,f)}});function _w(u,f,_){var w=pr(f),S=ya(f,w);null==_&&(!Mi(f)||!S.length&&w.length)&&(_=f,f=u,u=this,S=ya(f,pr(f)));var P=!(Mi(_)&&"chain"in _&&!_.chain),$=Hl(u);return Rn(S,function(Y){var Q=f[Y];u[Y]=Q,$&&(u.prototype[Y]=function(){var _e=this.__chain__;if(P||_e){var ye=u(this.__wrapped__);return(ye.__actions__=eo(this.__actions__)).push({func:Q,args:arguments,thisArg:u}),ye.__chain__=_e,ye}return Q.apply(u,Pl([this.value()],arguments))})}),u}function Co(){}var vw=_p(gi),bD=_p(JE),xD=_p(jf);function Mh(u){return mx(u)?__(Go(u)):function xa(u){return function(f){return Cc(f,u)}}(u)}var Kv=ox(),Ch=ox(!0);function Sh(){return[]}function Jd(){return!1}var wD=G_(function(u,f){return u+f},0),MD=W_("ceil"),xw=G_(function(u,f){return u/f},1),CD=W_("floor"),DD=G_(function(u,f){return u*f},1),jF=W_("round"),ty=G_(function(u,f){return u-f},0);return I.after=function y1(u,f){if("function"!=typeof f)throw new Er(Un);return u=un(u),function(){if(--u<1)return f.apply(this,arguments)}},I.ary=xh,I.assign=vt,I.assignIn=rw,I.assignInWith=Gl,I.assignWith=ll,I.at=N1,I.before=Aa,I.bind=Fc,I.bindAll=fD,I.bindKey=xv,I.castArray=function M1(){if(!arguments.length)return[];var u=arguments[0];return sn(u)?u:[u]},I.chain=Hx,I.chunk=function nv(u,f,_){f=(_?Tr(u,f,_):f===z)?1:fr(un(f),0);var w=null==u?0:u.length;if(!w||f<1)return[];for(var S=0,P=0,$=ae(w_(w/f));SS?0:S+_),(w=w===z||w>S?S:un(w))<0&&(w+=S),w=_>w?0:F1(w);_>>0)?(u=Fn(u))&&("string"==typeof f||null!=f&&!$p(f))&&!(f=Js(f))&&Sd(u)?Ic(yo(u),0,_):u.split(f,_):[]},I.spread=function Zx(u,f){if("function"!=typeof u)throw new Er(Un);return f=null==f?0:fr(un(f),0),pn(function(_){var w=_[f],S=Ic(_,0,f);return w&&Pl(S,w),_s(u,this,S)})},I.tail=function Oc(u){var f=null==u?0:u.length;return f?ts(u,1,f):[]},I.take=function Fx(u,f,_){return u&&u.length?ts(u,0,(f=_||f===z?1:un(f))<0?0:f):[]},I.takeRight=function Lx(u,f,_){var w=null==u?0:u.length;return w?ts(u,(f=w-(f=_||f===z?1:un(f)))<0?0:f,w):[]},I.takeRightWhile=function QA(u,f){return u&&u.length?uh(u,Nt(f,3),!1,!0):[]},I.takeWhile=function RF(u,f){return u&&u.length?uh(u,Nt(f,3)):[]},I.tap=function t1(u,f){return f(u),u},I.throttle=function Lp(u,f,_){var w=!0,S=!0;if("function"!=typeof u)throw new Er(Un);return Mi(_)&&(w="leading"in _?!!_.leading:w,S="trailing"in _?!!_.trailing:S),b1(u,f,{leading:w,maxWait:f,trailing:S})},I.thru=Rp,I.toArray=Ov,I.toPairs=lw,I.toPairsIn=zv,I.toPath=function bw(u){return sn(u)?gi(u,Go):As(u)?[u]:eo(bx(Fn(u)))},I.toPlainObject=$l,I.transform=function K1(u,f,_){var w=sn(u),S=w||ol(u)||jo(u);if(f=Nt(f,4),null==_){var P=u&&u.constructor;_=S?w?new P:[]:Mi(u)&&Hl(P)?Od(xs(u)):{}}return(S?Rn:ki)(u,function($,Y,Q){return f(_,$,Y,Q)}),_},I.unary=function Qx(u){return xh(u,1)},I.union=Dp,I.unionBy=JA,I.unionWith=Nx,I.uniq=function Bx(u){return u&&u.length?si(u):[]},I.uniqBy=function Ux(u,f){return u&&u.length?si(u,Nt(f,2)):[]},I.uniqWith=function fv(u,f){return f="function"==typeof f?f:z,u&&u.length?si(u,z,f):[]},I.unset=function Z1(u,f){return null==u||dh(u,f)},I.unzip=Tp,I.unzipWith=yh,I.update=function Q1(u,f,_){return null==u?u:ix(u,f,fp(_))},I.updateWith=function J1(u,f,_,w){return w="function"==typeof w?w:z,null==u?u:ix(u,f,fp(_),w)},I.values=Uc,I.valuesIn=function eD(u){return null==u?[]:Ju(u,Ds(u))},I.without=Ip,I.words=mw,I.wrap=function Av(u,f){return Ev(fp(f),u)},I.xor=Vx,I.xorBy=pv,I.xorWith=mv,I.zip=gv,I.zipObject=function bh(u,f){return Tc(u||[],f||[],Qs)},I.zipObjectDeep=function e1(u,f){return Tc(u||[],f||[],zd)},I.zipWith=zx,I.entries=lw,I.entriesIn=zv,I.extend=rw,I.extendWith=Gl,_w(I,I),I.add=wD,I.attempt=jv,I.camelCase=V,I.capitalize=Hv,I.ceil=MD,I.clamp=function tD(u,f,_){return _===z&&(_=f,f=z),_!==z&&(_=(_=Mo(_))==_?_:0),f!==z&&(f=(f=Mo(f))==f?f:0),Nl(Mo(u),f,_)},I.clone=function Zn(u){return Ms(u,js)},I.cloneDeep=function S1(u){return Ms(u,Si|js)},I.cloneDeepWith=function Np(u,f){return Ms(u,Si|js,f="function"==typeof f?f:z)},I.cloneWith=function C1(u,f){return Ms(u,js,f="function"==typeof f?f:z)},I.conformsTo=function Jx(u,f){return null==f||R_(u,f,pr(f))},I.deburr=$v,I.defaultTo=function gD(u,f){return null==u||u!=u?f:u},I.divide=xw,I.endsWith=function iD(u,f,_){u=Fn(u),f=Js(f);var w=u.length,S=_=_===z?w:Nl(un(_),0,w);return(_-=f.length)>=0&&u.slice(_,S)==f},I.eq=Wo,I.escape=function rD(u){return(u=Fn(u))&&FE.test(u)?u.replace(p0,ot):u},I.escapeRegExp=function cw(u){return(u=Fn(u))&&v0.test(u)?u.replace(s_,"\\$&"):u},I.every=function vv(u,f,_){var w=sn(u)?JE:j0;return _&&Tr(u,f,_)&&(f=z),w(u,Nt(f,3))},I.find=Wx,I.findIndex=Ex,I.findKey=function Fv(u,f){return ee(u,Nt(f,3),ki)},I.findLast=Pp,I.findLastIndex=rv,I.findLastKey=function Lv(u,f){return ee(u,Nt(f,3),P_)},I.floor=CD,I.forEach=bv,I.forEachRight=zl,I.forIn=function V1(u,f){return null==u?u:il(u,Nt(f,3),Ds)},I.forInRight=function Nv(u,f){return null==u?u:Di(u,Nt(f,3),Ds)},I.forOwn=function cl(u,f){return u&&ki(u,Nt(f,3))},I.forOwnRight=function z1(u,f){return u&&P_(u,Nt(f,3))},I.get=Bv,I.gt=E1,I.gte=A1,I.has=function G1(u,f){return null!=u&&hx(u,f,op)},I.hasIn=Uv,I.head=Dx,I.identity=is,I.includes=function l1(u,f,_,w){u=no(u)?u:Uc(u),_=_&&!w?un(_):0;var S=u.length;return _<0&&(_=fr(S+_,0)),Gp(u)?_<=S&&u.indexOf(f,_)>-1:!!S&&Lt(u,f,_)>-1},I.indexOf=function vh(u,f,_){var w=null==u?0:u.length;if(!w)return-1;var S=null==_?0:un(_);return S<0&&(S=fr(w+S,0)),Lt(u,f,S)},I.inRange=function nD(u,f,_){return f=al(f),_===z?(_=f,f=0):_=al(_),function O_(u,f,_){return u>=Zr(f,_)&&u=-Ya&&u<=Ya},I.isSet=iw,I.isString=Gp,I.isSymbol=As,I.isTypedArray=jo,I.isUndefined=function R1(u){return u===z},I.isWeakMap=function k1(u){return Pi(u)&&Hr(u)==vd},I.isWeakSet=function P1(u){return Pi(u)&&"[object WeakSet]"==es(u)},I.join=function Tx(u,f){return null==u?"":fF.call(u,f)},I.kebabCase=sD,I.last=Ir,I.lastIndexOf=function cv(u,f,_){var w=null==u?0:u.length;if(!w)return-1;var S=w;return _!==z&&(S=(S=un(_))<0?fr(w+S,0):Zr(S,w-1)),f==f?function Ed(X,he,ae){for(var ze=ae+1;ze--;)if(X[ze]===he)return ze;return ze}(u,f,S):Qu(u,qf,S,!0)},I.lowerCase=dw,I.lowerFirst=oD,I.lt=Pv,I.lte=O1,I.max=function ww(u){return u&&u.length?Nd(u,is,Bd):z},I.maxBy=function Mw(u,f){return u&&u.length?Nd(u,Nt(f,2),Bd):z},I.mean=function SD(u){return Cd(u,is)},I.meanBy=function ED(u,f){return Cd(u,Nt(f,2))},I.min=function ro(u){return u&&u.length?Nd(u,is,cp):z},I.minBy=function AD(u,f){return u&&u.length?Nd(u,Nt(f,2),cp):z},I.stubArray=Sh,I.stubFalse=Jd,I.stubObject=function yw(){return{}},I.stubString=function Zv(){return""},I.stubTrue=function Qv(){return!0},I.multiply=DD,I.nth=function Ix(u,f){return u&&u.length?CA(u,un(f)):z},I.noConflict=function E(){return Sr._===this&&(Sr._=Zf),this},I.noop=Co,I.now=Fp,I.pad=function aD(u,f,_){u=Fn(u);var w=(f=un(f))?hr(u):0;if(!f||w>=f)return u;var S=(f-w)/2;return vp(M_(S),_)+u+vp(w_(S),_)},I.padEnd=function VF(u,f,_){u=Fn(u);var w=(f=un(f))?hr(u):0;return f&&wf){var w=u;u=f,f=w}if(_||u%1||f%1){var S=C_();return Zr(u+S*(f-u+Pe("1e-"+((S+"").length-1))),f)}return lh(u,f)},I.reduce=function u1(u,f,_){var w=sn(u)?g_:R0,S=arguments.length<3;return w(u,Nt(f,4),_,S,nl)},I.reduceRight=function h1(u,f,_){var w=sn(u)?eA:R0,S=arguments.length<3;return w(u,Nt(f,4),_,S,k_)},I.repeat=function Gi(u,f,_){return f=(_?Tr(u,f,_):f===z)?1:un(f),ch(Fn(u),f)},I.replace=function lD(){var u=arguments,f=Fn(u[0]);return u.length<3?f:f.replace(u[1],u[2])},I.result=function q1(u,f,_){var w=-1,S=(f=Ma(f,u)).length;for(S||(S=1,u=z);++wYa)return[];var _=pa,w=Zr(u,pa);f=Nt(f),u-=pa;for(var S=Ks(w,f);++_=P)return u;var Y=_-hr(w);if(Y<1)return w;var Q=$?Ic($,0,Y).join(""):u.slice(0,Y);if(S===z)return Q+w;if($&&(Y+=Q.length-Y),$p(S)){if(u.slice(Y).search(S)){var _e,ye=Q;for(S.global||(S=bc(S.source,Fn(w0.exec(S))+"g")),S.lastIndex=0;_e=S.exec(ye);)var be=_e.index;Q=Q.slice(0,be===z?Y:be)}}else if(u.indexOf(Js(S),Y)!=Y){var Xe=Q.lastIndexOf(S);Xe>-1&&(Q=Q.slice(0,Xe))}return Q+w},I.unescape=function hD(u){return(u=Fn(u))&&OE.test(u)?u.replace(f0,Kf):u},I.uniqueId=function ey(u){var f=++bi;return Fn(u)+f},I.upperCase=pw,I.upperFirst=Zd,I.each=bv,I.eachRight=zl,I.first=Dx,_w(I,function(){var u={};return ki(I,function(f,_){ri.call(I.prototype,_)||(u[_]=f)}),u}(),{chain:!1}),I.VERSION="4.17.21",Rn(["bind","bindKey","curry","curryRight","partial","partialRight"],function(u){I[u].placeholder=I}),Rn(["drop","take"],function(u,f){kn.prototype[u]=function(_){_=_===z?1:fr(un(_),0);var w=this.__filtered__&&!f?new kn(this):this.clone();return w.__filtered__?w.__takeCount__=Zr(_,w.__takeCount__):w.__views__.push({size:Zr(_,pa),type:u+(w.__dir__<0?"Right":"")}),w},kn.prototype[u+"Right"]=function(_){return this.reverse()[u](_).reverse()}}),Rn(["filter","map","takeWhile"],function(u,f){var _=f+1,w=1==_||3==_;kn.prototype[u]=function(S){var P=this.clone();return P.__iteratees__.push({iteratee:Nt(S,3),type:_}),P.__filtered__=P.__filtered__||w,P}}),Rn(["head","last"],function(u,f){var _="take"+(f?"Right":"");kn.prototype[u]=function(){return this[_](1).value()[0]}}),Rn(["initial","tail"],function(u,f){var _="drop"+(f?"":"Right");kn.prototype[u]=function(){return this.__filtered__?new kn(this):this[_](1)}}),kn.prototype.compact=function(){return this.filter(is)},kn.prototype.find=function(u){return this.filter(u).head()},kn.prototype.findLast=function(u){return this.reverse().find(u)},kn.prototype.invokeMap=pn(function(u,f){return"function"==typeof u?new kn(this):this.map(function(_){return ba(_,u,f)})}),kn.prototype.reject=function(u){return this.filter(Sv(Nt(u)))},kn.prototype.slice=function(u,f){u=un(u);var _=this;return _.__filtered__&&(u>0||f<0)?new kn(_):(u<0?_=_.takeRight(-u):u&&(_=_.drop(u)),f!==z&&(_=(f=un(f))<0?_.dropRight(-f):_.take(f-u)),_)},kn.prototype.takeRightWhile=function(u){return this.reverse().takeWhile(u).reverse()},kn.prototype.toArray=function(){return this.take(pa)},ki(kn.prototype,function(u,f){var _=/^(?:filter|find|map|reject)|While$/.test(f),w=/^(?:head|last)$/.test(f),S=I[w?"take"+("last"==f?"Right":""):f],P=w||/^find/.test(f);S&&(I.prototype[f]=function(){var $=this.__wrapped__,Y=w?[1]:arguments,Q=$ instanceof kn,_e=Y[0],ye=Q||sn($),be=function(An){var Ln=S.apply(I,Pl([An],Y));return w&&Xe?Ln[0]:Ln};ye&&_&&"function"==typeof _e&&1!=_e.length&&(Q=ye=!1);var Xe=this.__chain__,zt=P&&!Xe,mn=Q&&!this.__actions__.length;if(!P&&ye){$=mn?$:new kn(this);var Ht=u.apply($,Y);return Ht.__actions__.push({func:Rp,args:[be],thisArg:z}),new Ai(Ht,Xe)}return zt&&mn?u.apply(this,Y):(Ht=this.thru(be),zt?w?Ht.value()[0]:Ht.value():Ht)})}),Rn(["pop","push","shift","sort","splice","unshift"],function(u){var f=sr[u],_=/^(?:push|sort|unshift)$/.test(u)?"tap":"thru",w=/^(?:pop|shift)$/.test(u);I.prototype[u]=function(){var S=arguments;if(w&&!this.__chain__){var P=this.value();return f.apply(sn(P)?P:[],S)}return this[_](function($){return f.apply(sn($)?$:[],S)})}}),ki(kn.prototype,function(u,f){var _=I[f];if(_){var w=_.name+"";ri.call(kd,w)||(kd[w]=[]),kd[w].push({name:f,func:_})}}),kd[jd(z,ur).name]=[{name:"wrapper",func:z}],kn.prototype.clone=function U0(){var u=new kn(this.__wrapped__);return u.__actions__=eo(this.__actions__),u.__dir__=this.__dir__,u.__filtered__=this.__filtered__,u.__iteratees__=eo(this.__iteratees__),u.__takeCount__=this.__takeCount__,u.__views__=eo(this.__views__),u},kn.prototype.reverse=function Fd(){if(this.__filtered__){var u=new kn(this);u.__dir__=-1,u.__filtered__=!0}else(u=this.clone()).__dir__*=-1;return u},kn.prototype.value=function ws(){var u=this.__wrapped__.value(),f=this.__dir__,_=sn(u),w=f<0,S=_?u.length:0,P=function wp(u,f,_){for(var w=-1,S=_.length;++w=this.__values__.length;return{done:u,value:u?z:this.__values__[this.__index__++]}},I.prototype.plant=function n1(u){for(var f,_=this;_ instanceof wc;){var w=ns(_);w.__index__=0,w.__values__=z,f?S.__wrapped__=w:f=w;var S=w;_=_.__wrapped__}return S.__wrapped__=u,f},I.prototype.reverse=function r1(){var u=this.__wrapped__;if(u instanceof kn){var f=u;return this.__actions__.length&&(f=new kn(this)),(f=f.reverse()).__actions__.push({func:Rp,args:[dv],thisArg:z}),new Ai(f,this.__chain__)}return this.thru(dv)},I.prototype.toJSON=I.prototype.valueOf=I.prototype.value=function kF(){return wa(this.__wrapped__,this.__actions__)},I.prototype.first=I.prototype.head,ih&&(I.prototype[ih]=function Yd(){return this}),I}();Sr._=ys,(dn=function(){return ys}.call(Gs,ps,Gs,Bo))!==z&&(Bo.exports=dn)}.call(this)},738:function(Bo){var Gs;Bo.exports=((Gs=function(){function ps(Ci){return Br.appendChild(Ci.dom),Ci}function dn(Ci){for(var Si=0;SiQt+1e3&&(Dl.update(1e3*Un/(Ci-Qt),100),Qt=Ci,Un=0,Ws)){var Si=performance.memory;Ws.update(Si.usedJSHeapSize/1048576,Si.jsHeapSizeLimit/1048576)}return Ci},update:function(){Kr=this.end()},domElement:Br,setMode:dn}}).Panel=function(ps,dn,z){var Br=1/0,Kr=0,Qt=Math.round,Un=Qt(window.devicePixelRatio||1),Dl=80*Un,Ga=48*Un,Ws=3*Un,Ci=2*Un,Si=3*Un,ms=15*Un,js=74*Un,Ys=30*Un,Uo=document.createElement("canvas");Uo.width=Dl,Uo.height=Ga,Uo.style.cssText="width:80px;height:48px";var On=Uo.getContext("2d");return On.font="bold "+9*Un+"px Helvetica,Arial,sans-serif",On.textBaseline="top",On.fillStyle=z,On.fillRect(0,0,Dl,Ga),On.fillStyle=dn,On.fillText(ps,Ws,Ci),On.fillRect(Si,ms,js,Ys),On.fillStyle=z,On.globalAlpha=.9,On.fillRect(Si,ms,js,Ys),{dom:Uo,update:function(ur,mc){Br=Math.min(Br,ur),Kr=Math.max(Kr,ur),On.fillStyle=z,On.globalAlpha=1,On.fillRect(0,0,Dl,ms),On.fillStyle=dn,On.fillText(Qt(ur)+" "+ps+" ("+Qt(Br)+"-"+Qt(Kr)+")",Ws,Ci),On.drawImage(Uo,Si+Un,ms,js-Un,Ys,Si,ms,js-Un,Ys),On.fillRect(Si+js-Un,ms,Un,Ys),On.fillStyle=z,On.globalAlpha=.9,On.fillRect(Si+js-Un,ms,Un,Qt((1-ur/mc)*Ys))}}},Gs)}},Bo=>{Bo(Bo.s=360)}]); \ No newline at end of file +(self.webpackChunkgui=self.webpackChunkgui||[]).push([[179],{360:(Bo,Gs,ps)=>{"use strict";function dn(i){return"function"==typeof i}function z(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 Br=z(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 Kr(i,t){if(i){const e=i.indexOf(t);0<=e&&i.splice(e,1)}}class Qt{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(dn(n))try{n()}catch(s){t=s instanceof Br?s.errors:[s]}const{_finalizers:r}=this;if(r){this._finalizers=null;for(const s of r)try{Ga(s)}catch(o){t=t??[],o instanceof Br?t=[...t,...o.errors]:t.push(o)}}if(t)throw new Br(t)}}add(t){var e;if(t&&t!==this)if(this.closed)Ga(t);else{if(t instanceof Qt){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)&&Kr(e,t)}remove(t){const{_finalizers:e}=this;e&&Kr(e,t),t instanceof Qt&&t._removeParent(this)}}Qt.EMPTY=(()=>{const i=new Qt;return i.closed=!0,i})();const Un=Qt.EMPTY;function Dl(i){return i instanceof Qt||i&&"closed"in i&&dn(i.remove)&&dn(i.add)&&dn(i.unsubscribe)}function Ga(i){dn(i)?i():i.unsubscribe()}const Ws={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 Si(i){Ci.setTimeout(()=>{const{onUnhandledError:t}=Ws;if(!t)throw i;t(i)})}function ms(){}const js=On("C",void 0,void 0);function On(i,t,e){return{kind:i,value:t,error:e}}let ur=null;function mc(i){if(Ws.useDeprecatedSynchronousErrorHandling){const t=!ur;if(t&&(ur={errorThrown:!1,error:null}),i(),t){const{errorThrown:e,error:n}=ur;if(ur=null,e)throw n}}else i()}class Tl extends Qt{constructor(t){super(),this.isStopped=!1,t?(this.destination=t,Dl(t)&&t.add(this)):this.destination=ME}static create(t,e,n){return new fa(t,e,n)}next(t){this.isStopped?Xg(function Uo(i){return On("N",i,void 0)}(t),this):this._next(t)}error(t){this.isStopped?Xg(function Ys(i){return On("E",void 0,i)}(t),this):(this.isStopped=!0,this._error(t))}complete(){this.isStopped?Xg(js,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 ha=Function.prototype.bind;function Il(i,t){return ha.call(i,t)}class Wa{constructor(t){this.partialObserver=t}next(t){const{partialObserver:e}=this;if(e.next)try{e.next(t)}catch(n){md(n)}}error(t){const{partialObserver:e}=this;if(e.error)try{e.error(t)}catch(n){md(n)}else md(t)}complete(){const{partialObserver:t}=this;if(t.complete)try{t.complete()}catch(e){md(e)}}}class fa extends Tl{constructor(t,e,n){let r;if(super(),dn(t)||!t)r={next:t??void 0,error:e??void 0,complete:n??void 0};else{let s;this&&Ws.useDeprecatedNextContext?(s=Object.create(t),s.unsubscribe=()=>this.unsubscribe(),r={next:t.next&&Il(t.next,s),error:t.error&&Il(t.error,s),complete:t.complete&&Il(t.complete,s)}):r=t}this.destination=new Wa(r)}}function md(i){Ws.useDeprecatedSynchronousErrorHandling?function ua(i){Ws.useDeprecatedSynchronousErrorHandling&&ur&&(ur.errorThrown=!0,ur.error=i)}(i):Si(i)}function Xg(i,t){const{onStoppedNotification:e}=Ws;e&&Ci.setTimeout(()=>e(i,t))}const ME={closed:!0,next:ms,error:function wE(i){throw i},complete:ms},Kg="function"==typeof Symbol&&Symbol.observable||"@@observable";function ja(i){return i}function l0(i){return 0===i.length?ja:1===i.length?i[0]:function(e){return i.reduce((n,r)=>r(n),e)}}let In=(()=>{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 Tl||function SE(i){return i&&dn(i.next)&&dn(i.error)&&dn(i.complete)}(i)&&Dl(i)}(e)?e:new fa(e,n,r);return mc(()=>{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=Ya(n))((r,s)=>{const o=new fa({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)}[Kg](){return this}pipe(...e){return l0(e)(this)}toPromise(e){return new(e=Ya(e))((n,r)=>{let s;this.subscribe(o=>s=o,o=>r(o),()=>n(s))})}}return i.create=t=>new i(t),i})();function Ya(i){var t;return null!==(t=i??Ws.Promise)&&void 0!==t?t:Promise}const pa=z(i=>function(){i(this),this.name="ObjectUnsubscribedError",this.message="object unsubscribed"});let Te=(()=>{class i extends In{constructor(){super(),this.closed=!1,this.currentObservers=null,this.observers=[],this.isStopped=!1,this.hasError=!1,this.thrownError=null}lift(e){const n=new c0(this,this);return n.operator=e,n}_throwIfClosed(){if(this.closed)throw new pa}next(e){mc(()=>{if(this._throwIfClosed(),!this.isStopped){this.currentObservers||(this.currentObservers=Array.from(this.observers));for(const n of this.currentObservers)n.next(e)}})}error(e){mc(()=>{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(){mc(()=>{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?Un:(this.currentObservers=null,s.push(e),new Qt(()=>{this.currentObservers=null,Kr(s,e)}))}_checkFinalizedStatuses(e){const{hasError:n,thrownError:r,isStopped:s}=this;n?e.error(r):s&&e.complete()}asObservable(){const e=new In;return e.source=this,e}}return i.create=(t,e)=>new c0(t,e),i})();class c0 extends Te{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:Un}}function d0(i){return dn(i?.lift)}function ni(i){return t=>{if(d0(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 qn(i,t,e,n,r){return new EE(i,t,e,n,r)}class EE extends Tl{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 tt(i,t){return ni((e,n)=>{let r=0;e.subscribe(qn(n,s=>{n.next(i.call(t,s,r++))}))})}function ma(i){return this instanceof ma?(this.v=i,this):new ma(i)}function Bf(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 Zg(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 i_=i=>i&&"number"==typeof i.length&&"function"!=typeof i;function r_(i){return dn(i?.then)}function m0(i){return dn(i[Kg])}function g0(i){return Symbol.asyncIterator&&dn(i?.[Symbol.asyncIterator])}function _0(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 v0=function s_(){return"function"==typeof Symbol&&Symbol.iterator?Symbol.iterator:"@@iterator"}();function Uf(i){return dn(i?.[v0])}function y0(i){return function Nf(i,t,e){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var r,n=e.apply(i,t||[]),s=[];return r=Object.create(("function"==typeof AsyncIterator?AsyncIterator:Object).prototype),a("next"),a("throw"),a("return",function o(m){return function(g){return Promise.resolve(g).then(m,h)}}),r[Symbol.asyncIterator]=function(){return this},r;function a(m,g){n[m]&&(r[m]=function(b){return new Promise(function(v,y){s.push([m,b,v,y])>1||l(m,b)})},g&&(r[m]=g(r[m])))}function l(m,g){try{!function c(m){m.value instanceof ma?Promise.resolve(m.value.v).then(d,h):p(s[0][2],m)}(n[m](g))}catch(b){p(s[0][3],b)}}function d(m){l("next",m)}function h(m){l("throw",m)}function p(m,g){m(g),s.shift(),s.length&&l(s[0][0],s[0][1])}}(this,arguments,function*(){const e=i.getReader();try{for(;;){const{value:n,done:r}=yield ma(e.read());if(r)return yield ma(void 0);yield yield ma(n)}}finally{e.releaseLock()}})}function b0(i){return dn(i?.getReader)}function Mr(i){if(i instanceof In)return i;if(null!=i){if(m0(i))return function LE(i){return new In(t=>{const e=i[Kg]();if(dn(e.subscribe))return e.subscribe(t);throw new TypeError("Provided object does not correctly implement Symbol.observable")})}(i);if(i_(i))return function NE(i){return new In(t=>{for(let e=0;e{i.then(e=>{t.closed||(t.next(e),t.complete())},e=>t.error(e)).then(null,Si)})}(i);if(g0(i))return x0(i);if(Uf(i))return function UE(i){return new In(t=>{for(const e of i)if(t.next(e),t.closed)return;t.complete()})}(i);if(b0(i))return function w0(i){return x0(y0(i))}(i)}throw _0(i)}function x0(i){return new In(t=>{(function VE(i,t){var e,n,r,s;return function _d(i,t,e,n){return new(e||(e=Promise))(function(s,o){function a(d){try{c(n.next(d))}catch(h){o(h)}}function l(d){try{c(n.throw(d))}catch(h){o(h)}}function c(d){d.done?s(d.value):function r(s){return s instanceof e?s:new e(function(o){o(s)})}(d.value).then(a,l)}c((n=n.apply(i,t||[])).next())})}(this,void 0,void 0,function*(){try{for(e=Bf(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 Xa(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 rr(i,t,e=1/0){return dn(t)?rr((n,r)=>tt((s,o)=>t(n,s,r,o))(Mr(i(n,r))),e):("number"==typeof t&&(e=t),ni((n,r)=>function zE(i,t,e,n,r,s,o,a){const l=[];let c=0,d=0,h=!1;const p=()=>{h&&!l.length&&!c&&t.complete()},m=b=>c{s&&t.next(b),c++;let v=!1;Mr(e(b,d++)).subscribe(qn(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(qn(t,m,()=>{h=!0,p()})),()=>{a?.()}}(n,r,i,e)))}function bd(i=1/0){return rr(ja,i)}const _o=new In(i=>i.complete());function $u(i){return i&&dn(i.schedule)}function a_(i){return i[i.length-1]}function M0(i){return dn(a_(i))?i.pop():void 0}function Gu(i){return $u(a_(i))?i.pop():void 0}function l_(i,t=0){return ni((e,n)=>{e.subscribe(qn(n,r=>Xa(n,i,()=>n.next(r),t),()=>Xa(n,i,()=>n.complete(),t),r=>Xa(n,i,()=>n.error(r),t)))})}function c_(i,t=0){return ni((e,n)=>{n.add(i.schedule(()=>e.subscribe(n),t))})}function d_(i,t){if(!i)throw new Error("Iterable cannot be null");return new In(e=>{Xa(e,t,()=>{const n=i[Symbol.asyncIterator]();Xa(e,t,()=>{n.next().then(r=>{r.done?e.complete():e.next(r.value)})},0,!0)})})}function Ni(i,t){return t?function E0(i,t){if(null!=i){if(m0(i))return function $E(i,t){return Mr(i).pipe(c_(t),l_(t))}(i,t);if(i_(i))return function WE(i,t){return new In(e=>{let n=0;return t.schedule(function(){n===i.length?e.complete():(e.next(i[n++]),e.closed||this.schedule())})})}(i,t);if(r_(i))return function GE(i,t){return Mr(i).pipe(c_(t),l_(t))}(i,t);if(g0(i))return d_(i,t);if(Uf(i))return function jE(i,t){return new In(e=>{let n;return Xa(e,t,()=>{n=i[v0](),Xa(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)}),()=>dn(n?.return)&&n.return()})}(i,t);if(b0(i))return function S0(i,t){return d_(y0(i),t)}(i,t)}throw _0(i)}(i,t):Mr(i)}function Cr(...i){const t=Gu(i),e=function C0(i,t){return"number"==typeof a_(i)?i.pop():t}(i,1/0),n=i;return n.length?1===n.length?Mr(n[0]):bd(e)(Ni(n,t)):_o}function Vf(i={}){const{connector:t=(()=>new Te),resetOnError:e=!0,resetOnComplete:n=!0,resetOnRefCountZero:r=!0}=i;return s=>{let o,a,l,c=0,d=!1,h=!1;const p=()=>{a?.unsubscribe(),a=void 0},m=()=>{p(),o=l=void 0,d=h=!1},g=()=>{const b=o;m(),b?.unsubscribe()};return ni((b,v)=>{c++,!h&&!d&&p();const y=l=l??t();v.add(()=>{c--,0===c&&!h&&!d&&(a=xd(g,r))}),y.subscribe(v),!o&&c>0&&(o=new fa({next:M=>y.next(M),error:M=>{h=!0,p(),a=xd(m,e,M),y.error(M)},complete:()=>{d=!0,p(),a=xd(m,n),y.complete()}}),Mr(b).subscribe(o))})(s)}}function xd(i,t,...e){if(!0===t)return void i();if(!1===t)return;const n=new fa({next:()=>{n.unsubscribe(),i()}});return Mr(t(...e)).subscribe(n)}function ci(i){for(let t in i)if(i[t]===ci)return t;throw Error("Could not find renamed property on target object.")}function u_(i,t){for(const e in t)t.hasOwnProperty(e)&&!i.hasOwnProperty(e)&&(i[e]=t[e])}function mi(i){if("string"==typeof i)return i;if(Array.isArray(i))return"["+i.map(mi).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 zf(i,t){return null==i||""===i?null===t?"":t:null==t||""===t?i:i+" "+t}const h_=ci({__forward_ref__:ci});function Gn(i){return i.__forward_ref__=Gn,i.toString=function(){return mi(this())},i}function Ot(i){return Wu(i)?i():i}function Wu(i){return"function"==typeof i&&i.hasOwnProperty(h_)&&i.__forward_ref__===Gn}function ju(i){return i&&!!i.\u0275providers}const qu="https://g.co/ng/security#xss";class pe extends Error{constructor(t,e){super(Hf(t,e)),this.code=t}}function Hf(i,t){return`NG0${Math.abs(i)}${t?": "+t.trim():""}`}function Jt(i){return"string"==typeof i?i:null==i?"":String(i)}function $f(i,t){throw new pe(-201,!1)}function En(i,t){null==i&&function ii(i,t,e,n){throw new Error(`ASSERTION ERROR: ${i}`+(null==n?"":` [Expected=> ${e} ${n} ${t} <=Actual]`))}(t,i,null,"!=")}function Pe(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 f_(i,wd)||f_(i,m_)}function f_(i,t){return i.hasOwnProperty(t)?i[t]:null}function p_(i){return i&&(i.hasOwnProperty(gs)||i.hasOwnProperty(T0))?i[gs]:null}const wd=ci({\u0275prov:ci}),gs=ci({\u0275inj:ci}),m_=ci({ngInjectableDef:ci}),T0=ci({ngInjectorDef:ci});var Ft=(()=>((Ft=Ft||{})[Ft.Default=0]="Default",Ft[Ft.Host=1]="Host",Ft[Ft.Self=2]="Self",Ft[Ft.SkipSelf=4]="SkipSelf",Ft[Ft.Optional=8]="Optional",Ft))();let Wf;function Xs(i){const t=Wf;return Wf=i,t}function _s(i,t,e){const n=Gf(i);return n&&"root"==n.providedIn?void 0===n.value?n.value=n.factory():n.value:e&Ft.Optional?null:void 0!==t?t:void $f(mi(i))}const Rn=(()=>typeof globalThis<"u"&&globalThis||typeof global<"u"&&global||typeof window<"u"&&window||typeof self<"u"&&typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&self)(),kl={},Ku="__NG_DI_FLAG__",gi="ngTempTokenPath",Pl="ngTokenPath",g_=/\n/gm,eA="\u0275",jf="__source";let Zu;function Md(i){const t=Zu;return Zu=i,t}function tA(i,t=Ft.Default){if(void 0===Zu)throw new pe(-203,!1);return null===Zu?_s(i,void 0,t):Zu.get(i,t&Ft.Optional?null:void 0,t)}function ee(i,t=Ft.Default){return(function I0(){return Wf}()||tA)(Ot(i),t)}function Lt(i,t=Ft.Default){return ee(i,Yf(t))}function Yf(i){return typeof i>"u"||"number"==typeof i?i:0|(i.optional&&8)|(i.host&&1)|(i.self&&2)|(i.skipSelf&&4)}function qf(i){const t=[];for(let e=0;e((vo=vo||{})[vo.OnPush=0]="OnPush",vo[vo.Default=1]="Default",vo))(),Ks=(()=>{return(i=Ks||(Ks={}))[i.Emulated=0]="Emulated",i[i.None=2]="None",i[i.ShadowDom=3]="ShadowDom",Ks;var i})();const Za={},Wn=[],Ur=ci({\u0275cmp:ci}),Ju=ci({\u0275dir:ci}),yc=ci({\u0275pipe:ci}),y_=ci({\u0275mod:ci}),ga=ci({\u0275fac:ci}),eh=ci({__NG_ELEMENT_ID__:ci});let nA=0;function ot(i){return Ka(()=>{const t=yo(i),e={...t,decls:i.decls,vars:i.vars,template:i.template,consts:i.consts||null,ngContentSelectors:i.ngContentSelectors,onPush:i.changeDetection===vo.OnPush,directiveDefs:null,pipeDefs:null,dependencies:t.standalone&&i.dependencies||null,getStandaloneInjector:null,data:i.data||{},encapsulation:i.encapsulation||Ks.Emulated,id:"c"+nA++,styles:i.styles||Wn,_:null,schemas:i.schemas||null,tView:null};b_(e);const n=i.dependencies;return e.directiveDefs=Kf(n,!1),e.pipeDefs=Kf(n,!0),e})}function th(i,t,e){const n=i.\u0275cmp;n.directiveDefs=Kf(t,!1),n.pipeDefs=Kf(e,!0)}function iA(i){return Hn(i)||Vr(i)}function Sd(i){return null!==i}function en(i){return Ka(()=>({type:i.type,bootstrap:i.bootstrap||Wn,declarations:i.declarations||Wn,imports:i.imports||Wn,exports:i.exports||Wn,transitiveCompileScopes:null,schemas:i.schemas||null,id:i.id||null}))}function Xf(i,t){if(null==i)return Za;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 ve(i){return Ka(()=>{const t=yo(i);return b_(t),t})}function $i(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 Hn(i){return i[Ur]||null}function Vr(i){return i[Ju]||null}function vs(i){return i[yc]||null}function hr(i,t){const e=i[y_]||null;if(!e&&!0===t)throw new Error(`Type ${mi(i)} does not have '\u0275mod' property.`);return e}function yo(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||Wn,viewQuery:i.viewQuery||null,features:i.features||null,setInput:null,findHostDirectiveDefs:null,hostDirectives:null,inputs:Xf(i.inputs,t),outputs:Xf(i.outputs)}}function b_(i){i.features?.forEach(t=>t(i))}function Kf(i,t){if(!i)return null;const e=t?vs:iA;return()=>("function"==typeof i?i():i).map(n=>e(n)).filter(Sd)}const Qa=0,lt=1,fn=2,Bi=3,ys=4,X=5,he=6,ae=7,ze=8,jt=9,Vn=10,xt=11,ai=12,bc=13,k0=14,Er=15,sr=16,nh=17,Ho=18,Zs=19,Ol=20,ri=21,bi=22,Ad=1,P0=2,Zf=7,Qf=8,Ja=9,Ui=10;function bs(i){return Array.isArray(i)&&"object"==typeof i[Ad]}function xs(i){return Array.isArray(i)&&!0===i[Ad]}function Jf(i){return 0!=(4&i.flags)}function Dd(i){return i.componentOffset>-1}function xc(i){return 1==(1&i.flags)}function bo(i){return!!i.template}function ih(i){return 0!=(256&i[fn])}function el(i,t){return i.hasOwnProperty(ga)?i[ga]:null}class Id{constructor(t,e,n){this.previousValue=t,this.currentValue=e,this.firstChange=n}isFirstChange(){return this.firstChange}}function xi(){return Rd}function Rd(i){return i.type.prototype.ngOnChanges&&(i.setInput=kd),np}function np(){const i=B0(this),t=i?.current;if(t){const e=i.previous;if(e===Za)i.previous=t;else for(let n in t)e[n]=t[n];i.current=null,this.ngOnChanges(t)}}function kd(i,t,e,n){const r=this.declaredInputs[e],s=B0(i)||function lA(i,t){return i[N0]=t}(i,{previous:Za,current:null}),o=s.current||(s.current={}),a=s.previous,l=a[r];o[r]=new Id(l&&l.currentValue,t,a===Za),i[n]=t}xi.ngInherit=!0;const N0="__ngSimpleChanges__";function B0(i){return i[N0]||null}const Qr=function(i,t,e){},Pd="svg";function I(i){for(;Array.isArray(i);)i=i[Qa];return i}function wc(i,t){return I(t[i])}function Ai(i,t){return I(t[i.index])}function U0(i,t){return i.data[t]}function Fd(i,t){return i[t]}function ws(i,t){const e=t[i];return bs(e)?e:e[Qa]}function ip(i){return 64==(64&i[fn])}function Fl(i,t){return null==t?null:i[t]}function V0(i){i[Ho]=0}function A_(i,t){i[X]+=t;let e=i,n=i[Bi];for(;null!==n&&(1===t&&1===e[X]||-1===t&&0===e[X]);)n[X]+=t,e=n,n=n[Bi]}const Pt={lFrame:nl(null),bindingsEnabled:!0};function _a(){return Pt.bindingsEnabled}function Se(){return Pt.lFrame.lView}function zn(){return Pt.lFrame.tView}function Vt(i){return Pt.lFrame.contextLView=i,i[ze]}function Et(i){return Pt.lFrame.contextLView=null,i}function Ar(){let i=H0();for(;null!==i&&64===i.type;)i=i.parent;return i}function H0(){return Pt.lFrame.currentTNode}function va(i,t){const e=Pt.lFrame;e.currentTNode=i,e.isParent=t}function D_(){return Pt.lFrame.isParent}function T_(){Pt.lFrame.isParent=!1}function zr(){const i=Pt.lFrame;let t=i.bindingRootIndex;return-1===t&&(t=i.bindingRootIndex=i.tView.bindingStartIndex),t}function Ll(){return Pt.lFrame.bindingIndex++}function Qs(i){const t=Pt.lFrame,e=t.bindingIndex;return t.bindingIndex=t.bindingIndex+i,e}function W0(i,t){const e=Pt.lFrame;e.bindingIndex=e.bindingRootIndex=i,$o(t)}function $o(i){Pt.lFrame.currentDirectiveIndex=i}function rh(i){const t=Pt.lFrame.currentDirectiveIndex;return-1===t?null:i[t]}function Nl(){return Pt.lFrame.currentQueryIndex}function Ms(i){Pt.lFrame.currentQueryIndex=i}function vA(i){const t=i[lt];return 2===t.type?t.declTNode:1===t.type?i[he]:null}function R_(i,t,e){if(e&Ft.SkipSelf){let r=t,s=i;for(;!(r=r.parent,null!==r||e&Ft.Host||(r=vA(s),null===r||(s=s[Er],10&r.type))););if(null===r)return!1;t=r,i=s}const n=Pt.lFrame=Ld();return n.currentTNode=t,n.lView=i,!0}function sp(i){const t=Ld(),e=i[lt];Pt.lFrame=t,t.currentTNode=e.firstChild,t.lView=i,t.tView=e,t.contextLView=i,t.bindingIndex=e.bindingStartIndex,t.inI18n=!1}function Ld(){const i=Pt.lFrame,t=null===i?null:i.child;return null===t?nl(i):t}function nl(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 k_(){const i=Pt.lFrame;return Pt.lFrame=i.parent,i.currentTNode=null,i.lView=null,i}const j0=k_;function Nd(){const i=k_();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 Kn(){return Pt.lFrame.selectedIndex}function il(i){Pt.lFrame.selectedIndex=i}function Di(){const i=Pt.lFrame;return U0(i.tView,i.selectedIndex)}function ki(){Pt.lFrame.currentNamespace=Pd}function ya(){!function Cc(){Pt.lFrame.currentNamespace=null}()}function Bd(i,t){for(let e=t.directiveStart,n=t.directiveEnd;e=n)break}else t[l]<0&&(i[Ho]+=65536),(a>11>16&&(3&i[fn])===t){i[fn]+=2048,Qr(4,a,s);try{s.call(a)}finally{Qr(5,a,s)}}}else{Qr(4,a,s);try{s.call(a)}finally{Qr(5,a,s)}}}const ba=-1;class Ud{constructor(t,e,n){this.factory=t,this.resolving=!1,this.canSeeViewProviders=e,this.injectImpl=n}}function L_(i,t,e){let n=0;for(;nt){o=s-1;break}}}for(;s>16}(i),n=t;for(;e>0;)n=n[Er],e--;return n}let Vd=!0;function dp(i){const t=Vd;return Vd=i,t}const B_=255,Q0=5;let J0=0;const xa={};function ah(i,t){const e=ex(i,t);if(-1!==e)return e;const n=t[lt];n.firstCreatePass&&(i.injectorIndex=t.length,lh(n.data,i),lh(t,null),lh(n.blueprint,null));const r=ch(i,t),s=i.injectorIndex;if(cp(r)){const o=sh(r),a=oh(r,t),l=a[lt].data;for(let c=0;c<8;c++)t[s+c]=a[o+c]|l[o+c]}return t[s+8]=r,s}function lh(i,t){i.push(0,0,0,0,0,0,0,0,t)}function ex(i,t){return-1===i.injectorIndex||i.parent&&i.parent.injectorIndex===i.injectorIndex||null===t[i.injectorIndex+8]?-1:i.injectorIndex}function ch(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=uh(r),null===n)return ba;if(e++,r=r[Er],-1!==n.injectorIndex)return n.injectorIndex|e<<16}return ba}function pn(i,t,e){!function U_(i,t,e){let n;"string"==typeof e?n=e.charCodeAt(0)||0:e.hasOwnProperty(eh)&&(n=e[eh]),null==n&&(n=e[eh]=J0++);const r=n&B_;t.data[i+(r>>Q0)]|=1<=0?t&B_:Js:t}(e);if("function"==typeof s){if(!R_(t,i,n))return n&Ft.Host?tx(r,0,n):zd(t,e,n,r);try{const o=s(n);if(null!=o||n&Ft.Optional)return o;$f()}finally{j0()}}else if("number"==typeof s){let o=null,a=ex(i,t),l=ba,c=n&Ft.Host?t[sr][he]:null;for((-1===a||n&Ft.SkipSelf)&&(l=-1===a?ch(i,t):t[a+8],l!==ba&&z_(n,!1)?(o=t[lt],a=sh(l),t=oh(l,t)):a=-1);-1!==a;){const d=t[lt];if(hp(s,a,d.data)){const h=EA(a,t,e,o,n,c);if(h!==xa)return h}l=t[a+8],l!==ba&&z_(n,t[lt].data[a+8]===c)&&hp(s,a,t)?(o=d,a=sh(l),t=oh(l,t)):a=-1}}return r}function EA(i,t,e,n,r,s){const o=t[lt],a=o.data[i+8],d=ts(a,o,e,null==n?Dd(a)&&Vd:n!=o&&0!=(3&a.type),r&Ft.Host&&s===a);return null!==d?Ac(t,o,d,a):xa}function ts(i,t,e,n,r){const s=i.providerIndexes,o=t.data,a=1048575&s,l=i.directiveStart,d=s>>20,p=r?a+d:i.directiveEnd;for(let m=n?a:a+d;m=l&&g.type===e)return m}if(r){const m=o[l];if(m&&bo(m)&&m.type===e)return l}return null}function Ac(i,t,e,n){let r=i[e];const s=t.data;if(function xA(i){return i instanceof Ud}(r)){const o=r;o.resolving&&function A0(i,t){const e=t?`. Dependency path: ${t.join(" > ")} > ${i}`:"";throw new pe(-200,`Circular dependency in DI detected for ${i}${e}`)}(function Xn(i){return"function"==typeof i?i.name||i.toString():"object"==typeof i&&null!=i&&"function"==typeof i.type?i.type.name||i.type.toString():Jt(i)}(s[e]));const a=dp(o.canSeeViewProviders);o.resolving=!0;const l=o.injectImpl?Xs(o.injectImpl):null;R_(i,n,Ft.Default);try{r=i[e]=o.factory(void 0,s,i,n),t.firstCreatePass&&e>=n.directiveStart&&function es(i,t,e){const{ngOnChanges:n,ngOnInit:r,ngDoCheck:s}=t.type.prototype;if(n){const o=Rd(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&&Xs(l),dp(a),o.resolving=!1,j0()}}return r}function hp(i,t,e){return!!(e[t+(i>>Q0)]&1<{const t=i.prototype.constructor,e=t[ga]||dh(t),n=Object.prototype;let r=Object.getPrototypeOf(i.prototype).constructor;for(;r&&r!==n;){const s=r[ga]||dh(r);if(s&&s!==e)return s;r=Object.getPrototypeOf(r)}return s=>new s})}function dh(i){return Wu(i)?()=>{const t=dh(Ot(i));return t&&t()}:el(i)}function uh(i){const t=i[lt],e=t.type;return 2===e?t.declTNode:1===e?i[he]:null}function wa(i){return function SA(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 Ma(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,d){const h=l.hasOwnProperty(Tc)?l[Tc]:Object.defineProperty(l,Tc,{value:[]})[Tc];for(;h.length<=d;)h.push(null);return(h[d]=h[d]||[]).push(o),l}}return e&&(r.prototype=Object.create(e.prototype)),r.prototype.ngMetadataName=i,r.annotationCls=r,r})}class me{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=Pe({token:this,providedIn:e.providedIn||"root",factory:e.factory}))}get multi(){return this}toString(){return`InjectionToken ${this._desc}`}}function Vl(i,t){i.forEach(e=>Array.isArray(e)?Vl(e,t):t(e))}function $_(i,t,e){t>=i.length?i.push(e):i.splice(t,0,e)}function mp(i,t){return t>=i.length-1?i.pop():i.splice(t,1)[0]}function Gd(i,t){const e=[];for(let n=0;n=0?i[1|n]=e:(n=~n,function IA(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 jd(i,t){const e=Rc(i,t);if(e>=0)return i[1|e]}function Rc(i,t){return function _p(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),Ss=Cd(Hd("Optional"),8),Ca=Cd(Hd("SkipSelf"),4);var Es=(()=>((Es=Es||{})[Es.Important=1]="Important",Es[Es.DashCase=2]="DashCase",Es))();const Sp=new Map;let yx=0;const iv="__ngContext__";function $r(i,t){bs(t)?(i[iv]=t[Ol],function bx(i){Sp.set(i[Ol],i)}(t)):i[iv]=t}let sv;function ov(i,t){return sv(i,t)}function vh(i){const t=i[Bi];return xs(t)?t[Bi]:t}function av(i){return Tx(i[bc])}function lv(i){return Tx(i[ys])}function Tx(i){for(;null!==i&&!xs(i);)i=i[ys];return i}function Ir(i,t,e,n,r){if(null!=n){let s,o=!1;xs(n)?s=n:bs(n)&&(o=!0,n=n[Qa]);const a=I(n);0===i&&null!==e?null==r?Fx(t,e,a):Oc(t,e,a,r||null,!0):1===i&&null!==e?Oc(t,e,a,r||null,!0):2===i?function mv(i,t,e){const n=Dp(i,t);n&&function QA(i,t,e,n){i.removeChild(t,e,n)}(i,n,t,e)}(t,a,o):3===i&&t.destroyNode(a),null!=s&&function Hx(i,t,e,n,r){const s=e[Zf];s!==I(e)&&Ir(t,i,n,s,r);for(let a=Ui;a0&&(i[e-1][ys]=n[ys]);const s=mp(i,Ui+t);!function WA(i,t){bh(i,t,t[xt],2,null,null),t[Qa]=null,t[he]=null}(n[lt],n);const o=s[Zs];null!==o&&o.detachView(s[lt]),n[Bi]=null,n[ys]=null,n[fn]&=-65}return n}function kx(i,t){if(!(128&t[fn])){const e=t[xt];e.destroyNode&&bh(i,t,e,3,null,null),function qA(i){let t=i[bc];if(!t)return hv(i[lt],i);for(;t;){let e=null;if(bs(t))e=t[bc];else{const n=t[Ui];n&&(e=n)}if(!e){for(;t&&!t[ys]&&t!==i;)bs(t)&&hv(t[lt],t),t=t[Bi];null===t&&(t=i),bs(t)&&hv(t[lt],t),e=t&&t[ys]}t=e}}(t)}}function hv(i,t){if(!(128&t[fn])){t[fn]&=-65,t[fn]|=128,function ZA(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===Ks.None||s===Ks.Emulated)return null}return Ai(n,e)}}(i,t.parent,e)}function Oc(i,t,e,n,r){i.insertBefore(t,e,n,r)}function Fx(i,t,e){i.appendChild(t,e)}function Lx(i,t,e,n,r){null!==n?Oc(i,t,e,n,r):Fx(i,t,e)}function Dp(i,t){return i.parentNode(t)}function Nx(i,t,e){return Ux(i,t,e)}let fv,kp,vv,Ux=function Bx(i,t,e){return 40&i.type?Ai(i,e):null};function yh(i,t,e,n){const r=Px(i,n,t),s=t[xt],a=Nx(n.parent||t[he],n,t);if(null!=r)if(Array.isArray(e))for(let l=0;li,createScript:i=>i,createScriptURL:i=>i})}catch{}return kp}()?.createHTML(i)||i}class zl{constructor(t){this.changingThisBreaksApplicationSecurity=t}toString(){return`SafeValue must use [property]=binding: ${this.changingThisBreaksApplicationSecurity} (see ${qu})`}}class a1 extends zl{getTypeName(){return"HTML"}}class l1 extends zl{getTypeName(){return"Style"}}class c1 extends zl{getTypeName(){return"Script"}}class d1 extends zl{getTypeName(){return"URL"}}class Op extends zl{getTypeName(){return"ResourceURL"}}function to(i){return i instanceof zl?i.changingThisBreaksApplicationSecurity:i}function Ea(i,t){const e=function u1(i){return i instanceof zl&&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 ${qu})`)}return e===t}class _1{constructor(t){this.inertDocumentHelper=t}getInertBodyElement(t){t=""+t;try{const e=(new window.DOMParser).parseFromString(Yd(t),"text/html").body;return null===e?this.inertDocumentHelper.getInertBodyElement(t):(e.removeChild(e.firstChild),e)}catch{return null}}}class v1{constructor(t){this.defaultDoc=t,this.inertDocument=this.defaultDoc.implementation.createHTMLDocument("sanitization-inert")}getInertBodyElement(t){const e=this.inertDocument.createElement("template");return e.innerHTML=Yd(t),e}}const y1=/^(?!javascript:)(?:[a-z0-9+.-]+:|[^&:\/?#]*(?:[\/?#]|$))/i;function xh(i){return(i=String(i)).match(y1)?i:"unsafe:"+i}function Aa(i){const t={};for(const e of i.split(","))t[e]=!0;return t}function Fc(...i){const t={};for(const e of i)for(const n in e)e.hasOwnProperty(n)&&(t[n]=!0);return t}const xv=Aa("area,br,col,hr,img,wbr"),wv=Aa("colgroup,dd,dt,li,p,tbody,td,tfoot,th,thead,tr"),Mv=Aa("rp,rt"),Cv=Fc(xv,Fc(wv,Aa("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")),Fc(Mv,Aa("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")),Fc(Mv,wv)),qd=Aa("background,cite,href,itemtype,longdesc,poster,src,xlink:href"),Xx=Fc(qd,Aa("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"),Aa("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")),Ev=Aa("script,style,template");class Kx{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(!Cv.hasOwnProperty(e))return this.sanitizedSomething=!0,!Ev.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();Cv.hasOwnProperty(e)&&!xv.hasOwnProperty(e)&&(this.buf.push(""))}chars(t){this.buf.push(Zx(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 x1=/[\uD800-\uDBFF][\uDC00-\uDFFF]/g,w1=/([^\#-~ |!])/g;function Zx(i){return i.replace(/&/g,"&").replace(x1,function(t){return"&#"+(1024*(t.charCodeAt(0)-55296)+(t.charCodeAt(1)-56320)+65536)+";"}).replace(w1,function(t){return"&#"+t.charCodeAt(0)+";"}).replace(//g,">")}let Lp;function Qx(i,t){let e=null;try{Lp=Lp||function qx(i){const t=new v1(i);return function Fp(){try{return!!(new window.DOMParser).parseFromString(Yd(""),"text/html")}catch{return!1}}()?new _1(t):t}(i);let n=t?String(t):"";e=Lp.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=Lp.getInertBodyElement(n)}while(n!==s);return Yd((new Kx).sanitizeChildren(Av(e)||e))}finally{if(e){const n=Av(e)||e;for(;n.firstChild;)n.removeChild(n.firstChild)}}}function Av(i){return"content"in i&&function M1(i){return i.nodeType===Node.ELEMENT_NODE&&"TEMPLATE"===i.nodeName}(i)?i.content:null}var Zn=(()=>((Zn=Zn||{})[Zn.NONE=0]="NONE",Zn[Zn.HTML=1]="HTML",Zn[Zn.STYLE=2]="STYLE",Zn[Zn.SCRIPT=3]="SCRIPT",Zn[Zn.URL=4]="URL",Zn[Zn.RESOURCE_URL=5]="RESOURCE_URL",Zn))();function Np(i){const t=function wi(){const i=Se();return i&&i[ai]}();return t?t.sanitize(Zn.URL,i)||"":Ea(i,"URL")?to(i):xh(Jt(i))}const Bp=new me("ENVIRONMENT_INITIALIZER"),ol=new me("INJECTOR",-1),ew=new me("INJECTOR_DEF_TYPES");class tw{get(t,e=kl){if(e===kl){const n=new Error(`NullInjectorError: No provider for ${mi(t)}!`);throw n.name="NullInjectorError",n}return e}}function D1(...i){return{\u0275providers:nw(0,i),\u0275fromNgModule:!0}}function nw(i,...t){const e=[],n=new Set;let r;return Vl(t,s=>{const o=s;Dv(o,e,[],n)&&(r||(r=[]),r.push(o))}),void 0!==r&&Up(r,e),e}function Up(i,t){for(let e=0;e{t.push(s)})}}function Dv(i,t,e,n){if(!(i=Ot(i)))return!1;let r=null,s=p_(i);const o=!s&&Hn(i);if(s||o){if(o&&!o.standalone)return!1;r=i}else{const l=i.ngModule;if(s=p_(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)Dv(c,t,e,n)}}else{if(!s)return!1;{if(null!=s.imports&&!a){let c;n.add(r);try{Vl(s.imports,d=>{Dv(d,t,e,n)&&(c||(c=[]),c.push(d))})}finally{}void 0!==c&&Up(c,t)}if(!a){const c=el(r)||(()=>new r);t.push({provide:r,useFactory:c,deps:Wn},{provide:ew,useValue:r,multi:!0},{provide:Bp,useValue:()=>ee(r),multi:!0})}const l=s.providers;null==l||a||Vp(l,d=>{t.push(d)})}}return r!==i&&void 0!==i.providers}function Vp(i,t){for(let e of i)ju(e)&&(e=e.\u0275providers),Array.isArray(e)?Vp(e,t):t(e)}const zp=ci({provide:String,useValue:ci});function Mi(i){return null!==i&&"object"==typeof i&&zp in i}function Nc(i){return"function"==typeof i}const Iv=new me("Set Injector scope."),Hp={},I1={};let Rv;function wh(){return void 0===Rv&&(Rv=new tw),Rv}class io{}class $p extends io{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,Pv(t,o=>this.processProvider(o)),this.records.set(ol,jo(void 0,this)),r.has("environment")&&this.records.set(io,jo(void 0,this));const s=this.records.get(Iv);null!=s&&"string"==typeof s.value&&this.scopes.add(s.value),this.injectorDefTypes=new Set(this.get(ew.multi,Wn,Ft.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=Md(this),n=Xs(void 0);try{return t()}finally{Md(e),Xs(n)}}get(t,e=kl,n=Ft.Default){this.assertNotDestroyed(),n=Yf(n);const r=Md(this),s=Xs(void 0);try{if(!(n&Ft.SkipSelf)){let a=this.records.get(t);if(void 0===a){const l=function P1(i){return"function"==typeof i||"object"==typeof i&&i instanceof me}(t)&&Gf(t);a=l&&this.injectableDefInScope(l)?jo(kv(t),Hp):null,this.records.set(t,a)}if(null!=a)return this.hydrate(t,a)}return(n&Ft.Self?wh():this.parent).get(t,e=n&Ft.Optional&&e===kl?null:e)}catch(o){if("NullInjectorError"===o.name){if((o[gi]=o[gi]||[]).unshift(mi(t)),r)throw o;return function v_(i,t,e,n){const r=i[gi];throw t[jf]&&r.unshift(t[jf]),i.message=function R0(i,t,e,n=null){i=i&&"\n"===i.charAt(0)&&i.charAt(1)==eA?i.slice(2):i;let r=mi(t);if(Array.isArray(t))r=t.map(mi).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):mi(a)))}r=`{${s.join(", ")}}`}return`${e}${n?"("+n+")":""}[${r}]: ${i.replace(g_,"\n ")}`}("\n"+i.message,r,e,n),i[Pl]=r,i[gi]=null,i}(o,t,"R3InjectorError",this.source)}throw o}finally{Xs(s),Md(r)}}resolveInjectorInitializers(){const t=Md(this),e=Xs(void 0);try{const n=this.get(Bp.multi,Wn,Ft.Self);for(const r of n)r()}finally{Md(t),Xs(e)}}toString(){const t=[],e=this.records;for(const n of e.keys())t.push(mi(n));return`R3Injector[${t.join(", ")}]`}assertNotDestroyed(){if(this._destroyed)throw new pe(205,!1)}processProvider(t){let e=Nc(t=Ot(t))?t:Ot(t&&t.provide);const n=function Gp(i){return Mi(i)?jo(void 0,i.useValue):jo(As(i),Hp)}(t);if(Nc(t)||!0!==t.multi)this.records.get(e);else{let r=this.records.get(e);r||(r=jo(void 0,Hp,!0),r.factory=()=>qf(r.multi),this.records.set(e,r)),e=t,r.multi.push(t)}this.records.set(e,n)}hydrate(t,e){return e.value===Hp&&(e.value=I1,e.value=e.factory()),"object"==typeof e.value&&e.value&&function k1(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=Ot(t.providedIn);return"string"==typeof e?"any"===e||this.scopes.has(e):this.injectorDefTypes.has(e)}}function kv(i){const t=Gf(i),e=null!==t?t.factory:el(i);if(null!==e)return e;if(i instanceof me)throw new pe(204,!1);if(i instanceof Function)return function iw(i){const t=i.length;if(t>0)throw Gd(t,"?"),new pe(204,!1);const e=function Xu(i){return i&&(i[wd]||i[m_])||null}(i);return null!==e?()=>e.factory(i):()=>new i}(i);throw new pe(204,!1)}function As(i,t,e){let n;if(Nc(i)){const r=Ot(i);return el(r)||kv(r)}if(Mi(i))n=()=>Ot(i.useValue);else if(function Tv(i){return!(!i||!i.useFactory)}(i))n=()=>i.useFactory(...qf(i.deps||[]));else if(function Pi(i){return!(!i||!i.useExisting)}(i))n=()=>ee(Ot(i.useExisting));else{const r=Ot(i&&(i.useClass||i.provide));if(!function R1(i){return!!i.deps}(i))return el(r)||kv(r);n=()=>new r(...qf(i.deps))}return n}function jo(i,t,e=!1){return{factory:i,value:t,multi:e?[]:void 0}}function Pv(i,t){for(const e of i)Array.isArray(e)?Pv(e,t):e&&ju(e)?Pv(e.\u0275providers,t):t(e)}class O1{}class Ov{}class Mo{resolveComponentFactory(t){throw function al(i){const t=Error(`No component factory found for ${mi(i)}. Did you add it to @NgModule.entryComponents?`);return t.ngComponent=i,t}(t)}}let $l=(()=>{class i{}return i.NULL=new Mo,i})();function L1(){return Fn(Ar(),Se())}function Fn(i,t){return new vt(Ai(i,t))}let vt=(()=>{class i{constructor(e){this.nativeElement=e}}return i.__NG_ELEMENT_ID__=L1,i})();function rw(i){return i instanceof vt?i.nativeElement:i}class Gl{}let ll=(()=>{class i{}return i.__NG_ELEMENT_ID__=()=>function N1(){const i=Se(),e=ws(Ar().index,i);return(bs(e)?e:i)[xt]}(),i})(),B1=(()=>{class i{}return i.\u0275prov=Pe({token:i,providedIn:"root",factory:()=>null}),i})();class Bc{constructor(t){this.full=t,this.major=t.split(".")[0],this.minor=t.split(".")[1],this.patch=t.split(".").slice(2).join(".")}}const U1=new Bc("15.2.10"),Fv={},Lv="ngOriginalError";function Nv(i){return i[Lv]}class cl{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&&Nv(t);for(;e&&Nv(e);)e=Nv(e);return e||null}}function dl(i){return i instanceof Function?i():i}function ow(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 aw="ng-template";function Y1(i,t,e){let n=0,r=!0;for(;ns?"":r[h+1].toLowerCase();const m=8&n?p:null;if(m&&-1!==ow(m,c,0)||2&n&&c!==p){if(Yo(n))return!1;o=!0}}}}else{if(!o&&!Yo(n)&&!Yo(l))return!1;if(o&&Yo(l))continue;o=!1,n=l|1&n}}return Yo(n)||o}function Yo(i){return 0==(1&i)}function lw(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&&!Yo(o)&&(t+=Uc(s,r),r=""),n=o,s=s||!Yo(n);e++}return""!==r&&(t+=Uc(s,r)),t}const on={};function V(i){Hv(zn(),Se(),Kn()+i,!1)}function Hv(i,t,e,n){if(!n)if(3==(3&t[fn])){const s=i.preOrderCheckHooks;null!==s&&op(t,s,e)}else{const s=i.preOrderHooks;null!==s&&ap(t,s,0,e)}il(e)}function uw(i,t=null,e=null,n){const r=hw(i,t,e,n);return r.resolveInjectorInitializers(),r}function hw(i,t=null,e=null,n,r=new Set){const s=[e||Wn,D1(i)];return n=n||("object"==typeof i?void 0:mi(i)),new $p(s,t||wh(),n||null,r)}let Gi=(()=>{class i{static create(e,n){if(Array.isArray(e))return uw({name:""},n,e,"");{const r=e.name??"";return uw({name:r},e.parent,e.providers,r)}}}return i.THROW_IF_NOT_FOUND=kl,i.NULL=new tw,i.\u0275prov=Pe({token:i,providedIn:"any",factory:()=>ee(ol)}),i.__NG_ELEMENT_ID__=-1,i})();function E(i,t=Ft.Default){const e=Se();return null===e?ee(i,t):V_(Ar(),e,Ot(i),t)}function Co(){throw new Error("invalid")}function vw(i,t){const e=i.contentQueries;if(null!==e)for(let n=0;nbi&&Hv(i,t,bi,!1),Qr(o?2:0,r),e(n,r)}finally{il(s),Qr(o?3:1,r)}}function Zv(i,t,e){if(Jf(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,Ch(i,e,r.hostVars,on),r)}function be(i,t,e,n,r,s){const o=Ai(i,t);!function Xe(i,t,e,n,r,s,o){if(null==s)i.removeAttribute(t,r,e);else{const a=null==o?Jt(s):o(s,n||"",r);i.setAttribute(t,r,a,e)}}(t[xt],o,s,i.value,e,n,r)}function bt(i,t,e,n,r,s){const o=s[t];if(null!==o){const a=n.setInput;for(let l=0;l0&&rs(e)}}function rs(i){for(let n=av(i);null!==n;n=lv(n))for(let r=Ui;r0&&rs(s)}const e=i[lt].components;if(null!==e)for(let n=0;n0&&rs(r)}}function ss(i,t){const e=ws(t,i),n=e[lt];(function so(i,t){for(let e=t.length;e-1&&(uv(t,n),mp(e,n))}this._attachedToViewContainer=!1}kx(this._lView[lt],this._lView)}onDestroy(t){xw(this._lView[lt],this._lView,null,t)}markForCheck(){Ts(this._cdRefInjectingView||this._lView)}detach(){this._lView[fn]&=-65}reattach(){this._lView[fn]|=64}detectChanges(){So(this._lView[lt],this._lView,this.context)}checkNoChanges(){}attachToViewContainerRef(){if(this._appRef)throw new pe(902,!1);this._attachedToViewContainer=!0}detachFromAppRef(){this._appRef=null,function YA(i,t){bh(i,t,t[xt],2,null,null)}(this._lView[lt],this._lView)}attachToAppRef(t){if(this._attachedToViewContainer)throw new pe(902,!1);this._appRef=t}}class b8 extends ny{constructor(t){super(t),this._view=t}detectChanges(){const t=this._view;So(t[lt],t,t[ze],!1)}checkNoChanges(){}get context(){return null}}class ZF extends $l{constructor(t){super(),this.ngModule=t}resolveComponentFactory(t){const e=Hn(t);return new iy(e,this.ngModule)}}function QF(i){const t=[];for(let e in i)i.hasOwnProperty(e)&&t.push({propName:i[e],templateName:e});return t}class w8{constructor(t,e){this.injector=t,this.parentInjector=e}get(t,e,n){n=Yf(n);const r=this.injector.get(t,Fv,n);return r!==Fv||e===Fv?r:this.parentInjector.get(t,e,n)}}class iy extends Ov{get inputs(){return QF(this.componentDef.inputs)}get outputs(){return QF(this.componentDef.outputs)}constructor(t,e){super(),this.componentDef=t,this.ngModule=e,this.componentType=t.type,this.selector=function tD(i){return i.map(eD).join(",")}(t.selectors),this.ngContentSelectors=t.ngContentSelectors?t.ngContentSelectors:[],this.isBoundToModule=!!e}create(t,e,n,r){let s=(r=r||this.ngModule)instanceof io?r:r?.injector;s&&null!==this.componentDef.getStandaloneInjector&&(s=this.componentDef.getStandaloneInjector(s)||s);const o=s?new w8(t,s):t,a=o.get(Gl,null);if(null===a)throw new pe(407,!1);const l=o.get(B1,null),c=a.createRenderer(null,this.componentDef),d=this.componentDef.selectors[0][0]||"div",h=n?function MD(i,t,e){return i.selectRootElement(t,e===Ks.ShadowDom)}(c,n,this.componentDef.encapsulation):Ap(c,d,function x8(i){const t=i.toLowerCase();return"svg"===t?Pd:"math"===t?"math":null}(d)),p=this.componentDef.onPush?288:272,m=ey(0,null,null,1,0,null,null,null,null,null),g=Mh(null,m,null,p,null,null,a,c,l,o,null);let b,v;sp(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 C8(i,t){const e=i[lt],n=bi;return i[n]=t,Qd(e,n,2,"#host",null)}(g,h),F=function S8(i,t,e,n,r,s,o,a){const l=r[lt];!function E8(i,t,e,n){for(const r of i)t.mergedAttrs=Ec(t.mergedAttrs,r.hostAttrs);null!==t.mergedAttrs&&(Sw(t,t.mergedAttrs,!0),null!==e&&Gx(n,e,t))}(n,i,t,o);const c=s.createRenderer(t,e),d=Mh(r,bw(e),null,e.onPush?32:16,r[i.index],i,s,c,a||null,null,null);return l.firstCreatePass&&P(l,i,n.length-1),Ti(r,d),r[i.index]=d}(C,h,y,M,g,a,c);v=U0(m,bi),h&&function D8(i,t,e,n){if(n)L_(i,e,["ng-version",U1.full]);else{const{attrs:r,classes:s}=function nD(i){const t=[],e=[];let n=1,r=2;for(;n0&&$x(i,e,s.join(" "))}}(c,y,h,n),void 0!==e&&function T8(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=Ec(r.hostAttrs,e=Ec(e,r.hostAttrs))}}(n)}function PD(i){return i===Za?{}:i===Wn?[]:i}function k8(i,t){const e=i.viewQuery;i.viewQuery=e?(n,r)=>{t(n,r),e(n,r)}:t}function P8(i,t){const e=i.contentQueries;i.contentQueries=e?(n,r,s)=>{t(n,r,s),e(n,r,s)}:t}function O8(i,t){const e=i.hostBindings;i.hostBindings=e?(n,r)=>{t(n,r),e(n,r)}:t}function Aw(i){return!!OD(i)&&(Array.isArray(i)||!(i instanceof Map)&&Symbol.iterator in i)}function OD(i){return null!==i&&("function"==typeof i||"object"==typeof i)}function Wl(i,t,e){return i[t]=e}function Is(i,t,e){return!Object.is(i[t],e)&&(i[t]=e,!0)}function Eh(i,t,e,n){const r=Is(i,t,e);return Is(i,t+1,n)||r}function It(i,t,e,n){const r=Se();return Is(r,Ll(),t)&&(zn(),be(Di(),r,i,t,e,n)),It}function Yp(i,t,e,n){return Is(i,Ll(),e)?t+Jt(e)+n:on}function qp(i,t,e,n,r,s){const a=Eh(i,function tl(){return Pt.lFrame.bindingIndex}(),e,r);return Qs(2),a?t+Jt(e)+n+Jt(r)+s:on}function fe(i,t,e,n,r,s,o,a){const l=Se(),c=zn(),d=i+bi,h=c.firstCreatePass?function G8(i,t,e,n,r,s,o,a,l){const c=t.consts,d=Qd(t,i,4,o||null,Fl(c,a));ty(t,e,d,Fl(c,l)),Bd(t,d);const h=d.tView=ey(2,d,n,r,s,t.directiveRegistry,t.pipeRegistry,null,t.schemas,c);return null!==t.queries&&(t.queries.template(t,d),h.queries=t.queries.embeddedTView(d)),d}(d,c,l,t,e,n,r,s,o):c.data[d];va(h,!1);const p=l[xt].createComment("");yh(c,l,p,h),$r(p,l),Ti(l,l[d]=mn(p,l,p,h)),xc(h)&&Qv(c,l,h),null!=o&&Jv(l,h,a)}function Zi(i){return Fd(function gA(){return Pt.lFrame.contextLView}(),bi+i)}function U(i,t,e){const n=Se();return Is(n,Ll(),t)&&ro(zn(),Di(),n,i,t,n[xt],e,!1),U}function FD(i,t,e,n,r){const o=r?"class":"style";kD(i,e,t.inputs[o],o,n)}function G(i,t,e,n){const r=Se(),s=zn(),o=bi+i,a=r[xt],l=s.firstCreatePass?function j8(i,t,e,n,r,s){const o=t.consts,l=Qd(t,i,2,n,Fl(o,r));return ty(t,e,l,Fl(o,s)),null!==l.attrs&&Sw(l,l.attrs,!1),null!==l.mergedAttrs&&Sw(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]=Ap(a,t,function q0(){return Pt.lFrame.currentNamespace}()),d=xc(l);return va(l,!0),Gx(a,c,l),32!=(32&l.flags)&&yh(s,r,c,l),0===function uA(){return Pt.lFrame.elementDepthCount}()&&$r(c,r),function hA(){Pt.lFrame.elementDepthCount++}(),d&&(Qv(s,r,l),Zv(s,l,r)),null!==n&&Jv(r,l),G}function j(){let i=Ar();D_()?T_():(i=i.parent,va(i,!1));const t=i;!function fA(){Pt.lFrame.elementDepthCount--}();const e=zn();return e.firstCreatePass&&(Bd(e,i),Jf(i)&&e.queries.elementEnd(i)),null!=t.classesWithoutHost&&function wA(i){return 0!=(8&i.flags)}(t)&&FD(e,t,Se(),t.classesWithoutHost,!0),null!=t.stylesWithoutHost&&function F_(i){return 0!=(16&i.flags)}(t)&&FD(e,t,Se(),t.stylesWithoutHost,!1),j}function Ie(i,t,e,n){return G(i,t,e,n),j(),Ie}function Gr(i,t,e){const n=Se(),r=zn(),s=i+bi,o=r.firstCreatePass?function Y8(i,t,e,n,r){const s=t.consts,o=Fl(s,n),a=Qd(t,i,8,"ng-container",o);return null!==o&&Sw(a,o,!0),ty(t,e,a,Fl(s,r)),null!==t.queries&&t.queries.elementStart(t,a),a}(s,r,n,t,e):r.data[s];va(o,!0);const a=n[s]=n[xt].createComment("");return yh(r,n,a,o),$r(a,n),xc(o)&&(Qv(r,n,o),Zv(r,o,n)),null!=e&&Jv(n,o),Gr}function Wr(){let i=Ar();const t=zn();return D_()?T_():(i=i.parent,va(i,!1)),t.firstCreatePass&&(Bd(t,i),Jf(i)&&t.queries.elementEnd(i)),Wr}function sy(i,t,e){return Gr(i,t,e),Wr(),sy}function jn(){return Se()}function oy(i){return!!i&&"function"==typeof i.then}function hL(i){return!!i&&"function"==typeof i.subscribe}const LD=hL;function Oe(i,t,e,n){const r=Se(),s=zn(),o=Ar();return fL(s,r,r[xt],o,i,t,n),Oe}function ND(i,t){const e=Ar(),n=Se(),r=zn();return fL(r,n,XF(rh(r.data),e,n),e,i,t),ND}function fL(i,t,e,n,r,s,o){const a=xc(n),c=i.firstCreatePass&&qF(i),d=t[ze],h=YF(t);let p=!0;if(3&n.type||o){const b=Ai(n,t),v=o?o(b):b,y=h.length,M=o?C=>o(I(C[n.index])):n.index;let x=null;if(!o&&a&&(x=function q8(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=mL(n,t,d,s,!1);const C=e.listen(v,r,s);h.push(s,C),c&&c.push(r,M,y,y+1)}}else s=mL(n,t,d,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?ws(i.index,t):t);let l=pL(t,e,n,o),c=s.__ngNextListenerFn__;for(;c;)l=pL(t,e,c,o)&&l,c=c.__ngNextListenerFn__;return r&&!1===l&&(o.preventDefault(),o.returnValue=!1),l}}function re(i=1){return function yA(i){return(Pt.lFrame.contextLView=function Y0(i,t){for(;i>0;)t=t[Er],i--;return t}(i,Pt.lFrame.contextLView))[ze]}(i)}function X8(i,t){let e=null;const n=function K1(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 VD(i){return 2|i}function Ah(i){return(131068&i)>>2}function zD(i,t){return-131069&i|t<<2}function HD(i){return 1|i}function CL(i,t,e,n,r){const s=i[e+1],o=null===t;let a=n?eu(s):Ah(s),l=!1;for(;0!==a&&(!1===l||o);){const d=i[a+1];tW(i[a],t)&&(l=!0,i[a+1]=n?HD(d):VD(d)),a=n?eu(d):Ah(d)}l&&(i[e+1]=n?VD(s):HD(s))}function tW(i,t){return null===i||null==t||(Array.isArray(i)?i[1]:i)===t||!(!Array.isArray(i)||"string"!=typeof t)&&Rc(i,t)>=0}const Rr={textEnd:0,key:0,keyEnd:0,value:0,valueEnd:0};function SL(i){return i.substring(Rr.key,Rr.keyEnd)}function EL(i,t){const e=Rr.textEnd;return e===t?-1:(t=Rr.keyEnd=function sW(i,t,e){for(;t32;)t++;return t}(i,Rr.key=t,e),tm(i,t,e))}function tm(i,t,e){for(;t=0;e=EL(t,e))Cs(i,SL(t),!0)}function ul(i,t,e,n){const r=Se(),s=zn(),o=Qs(2);s.firstUpdatePass&&kL(s,i,o,n),t!==on&&Is(r,o,t)&&OL(s,s.data[Kn()],r,r[xt],i,r[o+1]=function _W(i,t){return null==i||""===i||("string"==typeof t?i+=t:"object"==typeof i&&(i=mi(to(i)))),i}(t,e),n,o)}function RL(i,t){return t>=i.expandoStartIndex}function kL(i,t,e,n){const r=i.data;if(null===r[e+1]){const s=r[Kn()],o=RL(i,e);LL(s,n)&&null===t&&!o&&(t=!1),t=function dW(i,t,e,n){const r=rh(i);let s=n?t.residualClasses:t.residualStyles;if(null===r)0===(n?t.classBindings:t.styleBindings)&&(e=ay(e=$D(null,i,t,e,n),t.attrs,n),s=null);else{const o=t.directiveStylingLast;if(-1===o||i[o]!==r)if(e=$D(r,i,t,e,n),null===s){let l=function uW(i,t,e){const n=e?t.classBindings:t.styleBindings;if(0!==Ah(n))return i[eu(n)]}(i,t,n);void 0!==l&&Array.isArray(l)&&(l=$D(null,i,t,l[1],n),l=ay(l,t.attrs,n),function hW(i,t,e,n){i[eu(e?t.classBindings:t.styleBindings)]=n}(i,t,n,l))}else s=function fW(i,t,e){let n;const r=t.directiveEnd;for(let s=1+t.directiveStylingLast;s0)&&(c=!0)):d=e,r)if(0!==l){const p=eu(i[a+1]);i[n+1]=Tw(p,a),0!==p&&(i[p+1]=zD(i[p+1],n)),i[a+1]=function Z8(i,t){return 131071&i|t<<17}(i[a+1],n)}else i[n+1]=Tw(a,0),0!==a&&(i[a+1]=zD(i[a+1],n)),a=n;else i[n+1]=Tw(l,0),0===a?a=n:i[l+1]=zD(i[l+1],n),l=n;c&&(i[n+1]=VD(i[n+1])),CL(i,d,n,!0),CL(i,d,n,!1),function eW(i,t,e,n,r){const s=r?i.residualClasses:i.residualStyles;null!=s&&"string"==typeof t&&Rc(s,t)>=0&&(e[n+1]=HD(e[n+1]))}(t,d,i,n,s),o=Tw(a,l),s?t.classBindings=o:t.styleBindings=o}(r,s,t,e,o,n)}}function $D(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),d=c?l[1]:l,h=null===d;let p=e[r+1];p===on&&(p=h?Wn:void 0);let m=h?jd(p,n):d===n?p:void 0;if(c&&!Iw(m)&&(m=jd(l,n)),Iw(m)&&(a=m,o))return a;const g=i[r+1];r=o?eu(g):Ah(g)}if(null!==t){let l=s?t.residualClasses:t.residualStyles;null!=l&&(a=jd(l,n))}return a}function Iw(i){return void 0!==i}function LL(i,t){return 0!=(i.flags&(t?8:16))}function Be(i,t=""){const e=Se(),n=zn(),r=i+bi,s=n.firstCreatePass?Qd(n,r,1,t,null):n.data[r],o=e[r]=function cv(i,t){return i.createText(t)}(e[xt],t);yh(n,e,o,s),va(s,!1)}function ui(i){return Qi("",i,""),ui}function Qi(i,t,e){const n=Se(),r=Yp(n,i,t,e);return r!==on&&Vc(n,Kn(),r),Qi}function Dh(i,t,e,n,r){const s=Se(),o=qp(s,i,t,e,n,r);return o!==on&&Vc(s,Kn(),o),Dh}function GL(i,t,e){!function hl(i,t,e,n){const r=zn(),s=Qs(2);r.firstUpdatePass&&kL(r,null,s,n);const o=Se();if(e!==on&&Is(o,s,e)){const a=r.data[Kn()];if(LL(a,n)&&!RL(r,s)){let l=n?a.classesWithoutHost:a.stylesWithoutHost;null!==l&&(e=zf(l,e||"")),FD(r,a,o,e,n)}else!function gW(i,t,e,n,r,s,o,a){r===on&&(r=Wn);let l=0,c=0,d=0((st=st||{})[st.LocaleId=0]="LocaleId",st[st.DayPeriodsFormat=1]="DayPeriodsFormat",st[st.DayPeriodsStandalone=2]="DayPeriodsStandalone",st[st.DaysFormat=3]="DaysFormat",st[st.DaysStandalone=4]="DaysStandalone",st[st.MonthsFormat=5]="MonthsFormat",st[st.MonthsStandalone=6]="MonthsStandalone",st[st.Eras=7]="Eras",st[st.FirstDayOfWeek=8]="FirstDayOfWeek",st[st.WeekendRange=9]="WeekendRange",st[st.DateFormat=10]="DateFormat",st[st.TimeFormat=11]="TimeFormat",st[st.DateTimeFormat=12]="DateTimeFormat",st[st.NumberSymbols=13]="NumberSymbols",st[st.NumberFormats=14]="NumberFormats",st[st.CurrencyCode=15]="CurrencyCode",st[st.CurrencySymbol=16]="CurrencySymbol",st[st.CurrencyName=17]="CurrencyName",st[st.Currencies=18]="Currencies",st[st.Directionality=19]="Directionality",st[st.PluralCase=20]="PluralCase",st[st.ExtraData=21]="ExtraData",st))();const im="en-US";let n2=im;function jD(i,t,e,n,r){if(i=Ot(i),Array.isArray(i))for(let s=0;s>20;if(Nc(i)||!i.multi){const m=new Ud(l,r,E),g=qD(a,t,r?d:d+p,h);-1===g?(pn(ah(c,o),s,a),YD(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=qD(a,t,d+p,h),g=qD(a,t,d,d+p),v=g>=0&&e[g];if(r&&!v||!r&&!(m>=0&&e[m])){pn(ah(c,o),s,a);const y=function Oj(i,t,e,n,r){const s=new Ud(i,e,E);return s.multi=[],s.index=t,s.componentProviders=0,D2(s,r,n&&!e),s}(r?Pj:kj,e.length,r,n,l);!r&&v&&(e[g].providerFactory=y),YD(s,i,t.length,0),t.push(a),c.directiveStart++,c.directiveEnd++,r&&(c.providerIndexes+=1048576),e.push(y),o.push(y)}else YD(s,i,m>-1?m:g,D2(e[r?g:m],l,!r&&n));!r&&n&&v&&e[g].componentProviders++}}}function YD(i,t,e,n){const r=Nc(t),s=function T1(i){return!!i.useClass}(t);if(r||s){const l=(s?Ot(t.useClass):t).prototype.ngOnDestroy;if(l){const c=i.destroyHooks||(i.destroyHooks=[]);if(!r&&t.multi){const d=c.indexOf(e);-1===d?c.push(e,[n,l]):c[d+1].push(n,l)}else c.push(e,l)}}}function D2(i,t,e){return e&&i.componentProviders++,i.multi.push(t)-1}function qD(i,t,e,n){for(let r=e;r{e.providersResolver=(n,r)=>function Rj(i,t,e){const n=zn();if(n.firstCreatePass){const r=bo(i);jD(e,n.data,n.blueprint,r,!0),jD(t,n.data,n.blueprint,r,!1)}}(n,r?r(i):i,t)}}class rm{}class T2{}class I2 extends rm{constructor(t,e){super(),this._parent=e,this._bootstrapComponents=[],this.destroyCbs=[],this.componentFactoryResolver=new ZF(this);const n=hr(t);this._bootstrapComponents=dl(n.bootstrap),this._r3Injector=hw(t,e,[{provide:rm,useValue:this},{provide:$l,useValue:this.componentFactoryResolver}],mi(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 KD extends T2{constructor(t){super(),this.moduleType=t}create(t){return new I2(this.moduleType,t)}}class Lj extends rm{constructor(t,e,n){super(),this.componentFactoryResolver=new ZF(this),this.instance=null;const r=new $p([...t,{provide:rm,useValue:this},{provide:$l,useValue:this.componentFactoryResolver}],e||wh(),n,new Set(["environment"]));this.injector=r,r.resolveInjectorInitializers()}destroy(){this.injector.destroy()}onDestroy(t){this.injector.onDestroy(t)}}function Lw(i,t,e=null){return new Lj(i,t,e).injector}let Nj=(()=>{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=nw(0,e.type),r=n.length>0?Lw([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=Pe({token:i,providedIn:"environment",factory:()=>new i(ee(io))}),i})();function ZD(i){i.getStandaloneInjector=t=>t.get(Nj).getOrCreateStandaloneInjector(i)}function Rs(i,t,e){const n=zr()+i,r=Se();return r[n]===on?Wl(r,n,e?t.call(e):t()):function ry(i,t){return i[t]}(r,n)}function sm(i,t,e,n){return B2(Se(),zr(),i,t,e,n)}function N2(i,t,e,n,r,s,o){return function z2(i,t,e,n,r,s,o,a,l){const c=t+e;return function Da(i,t,e,n,r,s){const o=Eh(i,t,e,n);return Eh(i,t+2,r,s)||o}(i,c,r,s,o,a)?Wl(i,c+4,l?n.call(l,r,s,o,a):n(r,s,o,a)):fy(i,c+4)}(Se(),zr(),i,t,e,n,r,s,o)}function fy(i,t){const e=i[t];return e===on?void 0:e}function B2(i,t,e,n,r,s){const o=t+e;return Is(i,o,r)?Wl(i,o+1,s?n.call(s,r):n(r)):fy(i,o+1)}function ct(i,t){const e=zn();let n;const r=i+bi;e.firstCreatePass?(n=function Jj(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=el(n.type)),o=Xs(E);try{const a=dp(!1),l=s();return dp(a),function W8(i,t,e,n){e>=i.data.length&&(i.data[e]=null,i.blueprint[e]=null),t[e]=n}(e,Se(),r,l),l}finally{Xs(o)}}function ut(i,t,e){const n=i+bi,r=Se(),s=Fd(r,n);return py(r,n)?B2(r,zr(),t,s.transform,e,s):s.transform(e)}function JD(i,t,e,n){const r=i+bi,s=Se(),o=Fd(s,r);return py(s,r)?function U2(i,t,e,n,r,s,o){const a=t+e;return Eh(i,a,r,s)?Wl(i,a+2,o?n.call(o,r,s):n(r,s)):fy(i,a+2)}(s,zr(),t,o.transform,e,n,o):o.transform(e,n)}function py(i,t){return i[lt].data[t].pure}function eT(i){return t=>{setTimeout(i,void 0,t)}}const $e=class r6 extends Te{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=eT(s),r&&(r=eT(r)),o&&(o=eT(o)));const a=super.subscribe({next:r,error:s,complete:o});return t instanceof Qt&&t.add(a),a}};function s6(){return this._results[Symbol.iterator]()}class om{get changes(){return this._changes||(this._changes=new $e)}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=om.prototype;e[Symbol.iterator]||(e[Symbol.iterator]=s6)}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 Dr(i){return i.flat(Number.POSITIVE_INFINITY)}(t);(this._changesDetected=!function pp(i,t,e){if(i.length!==t.length)return!1;for(let n=0;n{class i{}return i.__NG_ELEMENT_ID__=l6,i})();const o6=Eo,a6=class extends o6{constructor(t,e,n){super(),this._declarationLView=t,this._declarationTContainer=e,this.elementRef=n}createEmbeddedView(t,e){const n=this._declarationTContainer.tView,r=Mh(this._declarationLView,n,t,16,null,n.declTNode,null,null,null,null,e||null);r[nh]=this._declarationLView[this._declarationTContainer.index];const o=this._declarationLView[Zs];return null!==o&&(r[Zs]=o.createEmbeddedView(n)),Sh(n,r,t),new ny(r)}};function l6(){return Nw(Ar(),Se())}function Nw(i,t){return 4&i.type?new a6(t,i,Fn(i,t)):null}let jr=(()=>{class i{}return i.__NG_ELEMENT_ID__=c6,i})();function c6(){return W2(Ar(),Se())}const d6=jr,$2=class extends d6{constructor(t,e,n){super(),this._lContainer=t,this._hostTNode=e,this._hostLView=n}get element(){return Fn(this._hostTNode,this._hostLView)}get injector(){return new Dc(this._hostTNode,this._hostLView)}get parentInjector(){const t=ch(this._hostTNode,this._hostLView);if(cp(t)){const e=oh(t,this._hostLView),n=sh(t);return new Dc(e[lt].data[n+8],e)}return new Dc(null,this._hostLView)}clear(){for(;this.length>0;)this.remove(this.length-1)}get(t){const e=G2(this._lContainer);return null!==e&&e[t]||null}get length(){return this._lContainer.length-Ui}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 hh(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 iy(Hn(t)),c=n||this.parentInjector;if(!s&&null==l.ngModule){const p=(o?c:this.parentInjector).get(io,null);p&&(s=p)}const d=l.create(c,r,void 0,s);return this.insert(d.hostView,a),d}insert(t,e){const n=t._lView,r=n[lt];if(function dA(i){return xs(i[Bi])}(n)){const d=this.indexOf(t);if(-1!==d)this.detach(d);else{const h=n[Bi],p=new $2(h,h[he],h[Bi]);p.detach(p.indexOf(t))}}const s=this._adjustIndex(e),o=this._lContainer;!function dv(i,t,e,n){const r=Ui+n,s=e.length;n>0&&(e[r-1][ys]=t),n0)n.push(o[a/2]);else{const c=s[a+1],d=t[-l];for(let h=Ui;h{class i{constructor(e){this.appInits=e,this.resolve=Uw,this.reject=Uw,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)(ee(Vw,8))},i.\u0275prov=Pe({token:i,factory:i.\u0275fac,providedIn:"root"}),i})();const cm=new me("AppId",{providedIn:"root",factory:function pN(){return`${hT()}${hT()}${hT()}`}});function hT(){return String.fromCharCode(97+Math.floor(25*Math.random()))}const mN=new me("Platform Initializer"),fT=new me("Platform ID",{providedIn:"platform",factory:()=>"unknown"}),kr=new me("AnimationModuleType");let L6=(()=>{class i{log(e){console.log(e)}warn(e){console.warn(e)}}return i.\u0275fac=function(e){return new(e||i)},i.\u0275prov=Pe({token:i,factory:i.\u0275fac,providedIn:"platform"}),i})();const Xl=new me("LocaleId",{providedIn:"root",factory:()=>Lt(Xl,Ft.Optional|Ft.SkipSelf)||function N6(){return typeof $localize<"u"&&$localize.locale||im}()});class U6{constructor(t,e){this.ngModuleFactory=t,this.componentFactories=e}}let gN=(()=>{class i{compileModuleSync(e){return new KD(e)}compileModuleAsync(e){return Promise.resolve(this.compileModuleSync(e))}compileModuleAndAllComponentsSync(e){const n=this.compileModuleSync(e),s=dl(hr(e).declarations).reduce((o,a)=>{const l=Hn(a);return l&&o.push(new iy(l)),o},[]);return new U6(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=Pe({token:i,factory:i.\u0275fac,providedIn:"root"}),i})();const H6=(()=>Promise.resolve(0))();function pT(i){typeof Zone>"u"?H6.then(()=>{i&&i.apply(null,null)}):Zone.current.scheduleMicroTask("scheduleMicrotask",i)}class gt{constructor({enableLongStackTrace:t=!1,shouldCoalesceEventChangeDetection:e=!1,shouldCoalesceRunChangeDetection:n=!1}){if(this.hasPendingMacrotasks=!1,this.hasPendingMicrotasks=!1,this.isStable=!0,this.onUnstable=new $e(!1),this.onMicrotaskEmpty=new $e(!1),this.onStable=new $e(!1),this.onError=new $e(!1),typeof Zone>"u")throw new pe(908,!1);Zone.assertZonePatched();const r=this;r._nesting=0,r._outer=r._inner=Zone.current,Zone.TaskTrackingZoneSpec&&(r._inner=r._inner.fork(new Zone.TaskTrackingZoneSpec)),t&&Zone.longStackTraceZoneSpec&&(r._inner=r._inner.fork(Zone.longStackTraceZoneSpec)),r.shouldCoalesceEventChangeDetection=!n&&e,r.shouldCoalesceRunChangeDetection=n,r.lastRequestAnimationFrameId=-1,r.nativeRequestAnimationFrame=function $6(){let i=Rn.requestAnimationFrame,t=Rn.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 j6(i){const t=()=>{!function W6(i){i.isCheckStableRunning||-1!==i.lastRequestAnimationFrameId||(i.lastRequestAnimationFrameId=i.nativeRequestAnimationFrame.call(Rn,()=>{i.fakeTopEventTask||(i.fakeTopEventTask=Zone.root.scheduleEventTask("fakeTopEventTask",()=>{i.lastRequestAnimationFrameId=-1,gT(i),i.isCheckStableRunning=!0,mT(i),i.isCheckStableRunning=!1},void 0,()=>{},()=>{})),i.fakeTopEventTask.invoke()}),gT(i))}(i)};i._inner=i._inner.fork({name:"angular",properties:{isAngularZone:!0},onInvokeTask:(e,n,r,s,o,a)=>{try{return yN(i),e.invokeTask(r,s,o,a)}finally{(i.shouldCoalesceEventChangeDetection&&"eventTask"===s.type||i.shouldCoalesceRunChangeDetection)&&t(),bN(i)}},onInvoke:(e,n,r,s,o,a,l)=>{try{return yN(i),e.invoke(r,s,o,a,l)}finally{i.shouldCoalesceRunChangeDetection&&t(),bN(i)}},onHasTask:(e,n,r,s)=>{e.hasTask(r,s),n===r&&("microTask"==s.change?(i._hasPendingMicrotasks=s.microTask,gT(i),mT(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(!gt.isInAngularZone())throw new pe(909,!1)}static assertNotInAngularZone(){if(gt.isInAngularZone())throw new pe(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,G6,Uw,Uw);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 G6={};function mT(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 gT(i){i.hasPendingMicrotasks=!!(i._hasPendingMicrotasks||(i.shouldCoalesceEventChangeDetection||i.shouldCoalesceRunChangeDetection)&&-1!==i.lastRequestAnimationFrameId)}function yN(i){i._nesting++,i.isStable&&(i.isStable=!1,i.onUnstable.emit(null))}function bN(i){i._nesting--,mT(i)}class Y6{constructor(){this.hasPendingMicrotasks=!1,this.hasPendingMacrotasks=!1,this.isStable=!0,this.onUnstable=new $e,this.onMicrotaskEmpty=new $e,this.onStable=new $e,this.onError=new $e}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 xN=new me(""),Hw=new me("");let yT,_T=(()=>{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,yT||(function q6(i){yT=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:()=>{gt.assertNotInAngularZone(),pT(()=>{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())pT(()=>{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)(ee(gt),ee(vT),ee(Hw))},i.\u0275prov=Pe({token:i,factory:i.\u0275fac}),i})(),vT=(()=>{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 yT?.findTestabilityInTree(this,e,n)??null}}return i.\u0275fac=function(e){return new(e||i)},i.\u0275prov=Pe({token:i,factory:i.\u0275fac,providedIn:"platform"}),i})();const Hc=!1;let tu=null;const wN=new me("AllowMultipleToken"),bT=new me("PlatformDestroyListeners"),MN=new me("appBootstrapListener");class CN{constructor(t,e){this.name=t,this.token=e}}function EN(i,t,e=[]){const n=`Platform: ${t}`,r=new me(n);return(s=[])=>{let o=xT();if(!o||o.injector.get(wN,!1)){const a=[...e,...s,{provide:r,useValue:!0}];i?i(a):function Z6(i){if(tu&&!tu.get(wN,!1))throw new pe(400,!1);tu=i;const t=i.get(DN);(function SN(i){const t=i.get(mN,null);t&&t.forEach(e=>e())})(i)}(function AN(i=[],t){return Gi.create({name:t,providers:[{provide:Iv,useValue:"platform"},{provide:bT,useValue:new Set([()=>tu=null])},...i]})}(a,n))}return function J6(i){const t=xT();if(!t)throw new pe(401,!1);return t}()}}function xT(){return tu?.get(DN)??null}let DN=(()=>{class i{constructor(e){this._injector=e,this._modules=[],this._destroyListeners=[],this._destroyed=!1}bootstrapModuleFactory(e,n){const r=function IN(i,t){let e;return e="noop"===i?new Y6:("zone.js"===i?void 0:i)||new gt(t),e}(n?.ngZone,function TN(i){return{enableLongStackTrace:!1,shouldCoalesceEventChangeDetection:!(!i||!i.ngZoneEventCoalescing)||!1,shouldCoalesceRunChangeDetection:!(!i||!i.ngZoneRunCoalescing)||!1}}(n)),s=[{provide:gt,useValue:r}];return r.run(()=>{const o=Gi.create({providers:s,parent:this.injector,name:e.moduleType.name}),a=e.create(o),l=a.injector.get(cl,null);if(!l)throw new pe(402,!1);return r.runOutsideAngular(()=>{const c=r.onError.subscribe({next:d=>{l.handleError(d)}});a.onDestroy(()=>{$w(this._modules,a),c.unsubscribe()})}),function RN(i,t,e){try{const n=e();return oy(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(zw);return c.runInitializers(),c.donePromise.then(()=>(function r2(i){En(i,"Expected localeId to be defined"),"string"==typeof i&&(n2=i.toLowerCase().replace(/_/g,"-"))}(a.injector.get(Xl,im)||im),this._moduleDoBootstrap(a),a))})})}bootstrapModule(e,n=[]){const r=kN({},n);return function X6(i,t,e){const n=new KD(e);return Promise.resolve(n)}(0,0,e).then(s=>this.bootstrapModuleFactory(s,r))}_moduleDoBootstrap(e){const n=e.injector.get(dm);if(e._bootstrapComponents.length>0)e._bootstrapComponents.forEach(r=>n.bootstrap(r));else{if(!e.instance.ngDoBootstrap)throw new pe(-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 pe(404,!1);this._modules.slice().forEach(n=>n.destroy()),this._destroyListeners.forEach(n=>n());const e=this._injector.get(bT,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)(ee(Gi))},i.\u0275prov=Pe({token:i,factory:i.\u0275fac,providedIn:"platform"}),i})();function kN(i,t){return Array.isArray(t)?t.reduce(kN,i):{...i,...t}}let dm=(()=>{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 In(a=>{this._stable=this._zone.isStable&&!this._zone.hasPendingMacrotasks&&!this._zone.hasPendingMicrotasks,this._zone.runOutsideAngular(()=>{a.next(this._stable),a.complete()})}),o=new In(a=>{let l;this._zone.runOutsideAngular(()=>{l=this._zone.onStable.subscribe(()=>{gt.assertNotInAngularZone(),pT(()=>{!this._stable&&!this._zone.hasPendingMacrotasks&&!this._zone.hasPendingMicrotasks&&(this._stable=!0,a.next(!0))})})});const c=this._zone.onUnstable.subscribe(()=>{gt.assertInAngularZone(),this._stable&&(this._stable=!1,this._zone.runOutsideAngular(()=>{a.next(!1)}))});return()=>{l.unsubscribe(),c.unsubscribe()}});this.isStable=Cr(s,o.pipe(Vf()))}bootstrap(e,n){const r=e instanceof Ov;if(!this._injector.get(zw).done){!r&&function Ed(i){const t=Hn(i)||Vr(i)||vs(i);return null!==t&&t.standalone}(e);throw new pe(405,Hc)}let o;o=r?e:this._injector.get($l).resolveComponentFactory(e),this.componentTypes.push(o.componentType);const a=function K6(i){return i.isBoundToModule}(o)?void 0:this._injector.get(rm),c=o.create(Gi.NULL,[],n||o.selector,a),d=c.location.nativeElement,h=c.injector.get(xN,null);return h?.registerApplication(d),c.onDestroy(()=>{this.detachView(c.hostView),$w(this.components,c),h?.unregisterApplication(d)}),this._loadComponent(c),c}tick(){if(this._runningTick)throw new pe(101,!1);try{this._runningTick=!0;for(let e of this._views)e.detectChanges()}catch(e){this._zone.runOutsideAngular(()=>this._exceptionHandler.handleError(e))}finally{this._runningTick=!1}}attachView(e){const n=e;this._views.push(n),n.attachToAppRef(this)}detachView(e){const n=e;$w(this._views,n),n.detachFromAppRef()}_loadComponent(e){this.attachView(e.hostView),this.tick(),this.components.push(e);const n=this._injector.get(MN,[]);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),()=>$w(this._destroyListeners,e)}destroy(){if(this._destroyed)throw new pe(406,!1);const e=this._injector;e.destroy&&!e.destroyed&&e.destroy()}get viewCount(){return this._views.length}warnIfDestroyed(){}}return i.\u0275fac=function(e){return new(e||i)(ee(gt),ee(io),ee(cl))},i.\u0275prov=Pe({token:i,factory:i.\u0275fac,providedIn:"root"}),i})();function $w(i,t){const e=i.indexOf(t);e>-1&&i.splice(e,1)}let Qn=(()=>{class i{}return i.__NG_ELEMENT_ID__=t9,i})();function t9(i){return function n9(i,t,e){if(Dd(i)&&!e){const n=ws(i.index,t);return new ny(n,n)}return 47&i.type?new ny(t[sr],t):null}(Ar(),Se(),16==(16&i))}class NN{constructor(){}supports(t){return Aw(t)}create(t){return new c9(t)}}const l9=(i,t)=>t;class c9{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||l9}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 d9(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 BN),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 BN),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 d9{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 u9{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 BN{constructor(){this.map=new Map}put(t){const e=t.trackById;let n=this.map.get(e);n||(n=new u9,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 UN(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 f9(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 f9{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 zN(){return new jw([new NN])}let jw=(()=>{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||zN()),deps:[[i,new Ca,new Ss]]}}find(e){const n=this.factories.find(r=>r.supports(e));if(null!=n)return n;throw new pe(901,!1)}}return i.\u0275prov=Pe({token:i,providedIn:"root",factory:zN}),i})();function HN(){return new gy([new VN])}let gy=(()=>{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||HN()),deps:[[i,new Ca,new Ss]]}}find(e){const n=this.factories.find(r=>r.supports(e));if(n)return n;throw new pe(901,!1)}}return i.\u0275prov=Pe({token:i,providedIn:"root",factory:HN}),i})();const g9=EN(null,"core",[]);let _9=(()=>{class i{constructor(e){}}return i.\u0275fac=function(e){return new(e||i)(ee(dm))},i.\u0275mod=en({type:i}),i.\u0275inj=Wt({}),i})();let ET=null;function $c(){return ET}class b9{}const qt=new me("DocumentToken");let AT=(()=>{class i{historyGo(e){throw new Error("Not implemented")}}return i.\u0275fac=function(e){return new(e||i)},i.\u0275prov=Pe({token:i,factory:function(){return function x9(){return ee($N)}()},providedIn:"platform"}),i})();const w9=new me("Location Initialized");let $N=(()=>{class i extends AT{constructor(e){super(),this._doc=e,this._location=window.location,this._history=window.history}getBaseHrefFromDOM(){return $c().getBaseHref(this._doc)}onPopState(e){const n=$c().getGlobalEventTarget(this._doc,"window");return n.addEventListener("popstate",e,!1),()=>n.removeEventListener("popstate",e)}onHashChange(e){const n=$c().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){GN()?this._history.pushState(e,n,r):this._location.hash=r}replaceState(e,n,r){GN()?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)(ee(qt))},i.\u0275prov=Pe({token:i,factory:function(){return function M9(){return new $N(ee(qt))}()},providedIn:"platform"}),i})();function GN(){return!!window.history.pushState}function DT(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 WN(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 Gc(i){return i&&"?"!==i[0]?"?"+i:i}let Rh=(()=>{class i{historyGo(e){throw new Error("Not implemented")}}return i.\u0275fac=function(e){return new(e||i)},i.\u0275prov=Pe({token:i,factory:function(){return Lt(YN)},providedIn:"root"}),i})();const jN=new me("appBaseHref");let YN=(()=>{class i extends Rh{constructor(e,n){super(),this._platformLocation=e,this._removeListenerFns=[],this._baseHref=n??this._platformLocation.getBaseHrefFromDOM()??Lt(qt).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 DT(this._baseHref,e)}path(e=!1){const n=this._platformLocation.pathname+Gc(this._platformLocation.search),r=this._platformLocation.hash;return r&&e?`${n}${r}`:n}pushState(e,n,r,s){const o=this.prepareExternalUrl(r+Gc(s));this._platformLocation.pushState(e,n,o)}replaceState(e,n,r,s){const o=this.prepareExternalUrl(r+Gc(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)(ee(AT),ee(jN,8))},i.\u0275prov=Pe({token:i,factory:i.\u0275fac,providedIn:"root"}),i})(),C9=(()=>{class i extends Rh{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=DT(this._baseHref,e);return n.length>0?"#"+n:n}pushState(e,n,r,s){let o=this.prepareExternalUrl(r+Gc(s));0==o.length&&(o=this._platformLocation.pathname),this._platformLocation.pushState(e,n,o)}replaceState(e,n,r,s){let o=this.prepareExternalUrl(r+Gc(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)(ee(AT),ee(jN,8))},i.\u0275prov=Pe({token:i,factory:i.\u0275fac}),i})(),_y=(()=>{class i{constructor(e){this._subject=new $e,this._urlChangeListeners=[],this._urlChangeSubscription=null,this._locationStrategy=e;const n=this._locationStrategy.getBaseHref();this._basePath=function A9(i){if(new RegExp("^(https?:)?//").test(i)){const[,e]=i.split(/\/\/[^\/]+/);return e}return i}(WN(qN(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+Gc(n))}normalize(e){return i.stripTrailingSlash(function E9(i,t){if(!i||!t.startsWith(i))return t;const e=t.substring(i.length);return""===e||["/",";","?","#"].includes(e[0])?e:t}(this._basePath,qN(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+Gc(n)),r)}replaceState(e,n="",r=null){this._locationStrategy.replaceState(r,"",e,n),this._notifyUrlChangeListeners(this.prepareExternalUrl(e+Gc(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=Gc,i.joinWithSlash=DT,i.stripTrailingSlash=WN,i.\u0275fac=function(e){return new(e||i)(ee(Rh))},i.\u0275prov=Pe({token:i,factory:function(){return function S9(){return new _y(ee(Rh))}()},providedIn:"root"}),i})();function qN(i){return i.replace(/\/index.html$/,"")}var Ao=(()=>((Ao=Ao||{})[Ao.Decimal=0]="Decimal",Ao[Ao.Percent=1]="Percent",Ao[Ao.Currency=2]="Currency",Ao[Ao.Scientific=3]="Scientific",Ao))(),$t=(()=>(($t=$t||{})[$t.Decimal=0]="Decimal",$t[$t.Group=1]="Group",$t[$t.List=2]="List",$t[$t.PercentSign=3]="PercentSign",$t[$t.PlusSign=4]="PlusSign",$t[$t.MinusSign=5]="MinusSign",$t[$t.Exponential=6]="Exponential",$t[$t.SuperscriptingExponent=7]="SuperscriptingExponent",$t[$t.PerMille=8]="PerMille",$t[$t.Infinity=9]="Infinity",$t[$t.NaN=10]="NaN",$t[$t.TimeSeparator=11]="TimeSeparator",$t[$t.CurrencyDecimal=12]="CurrencyDecimal",$t[$t.CurrencyGroup=13]="CurrencyGroup",$t))();function Ta(i,t){const e=oo(i),n=e[st.NumberSymbols][t];if(typeof n>"u"){if(t===$t.CurrencyDecimal)return e[st.NumberSymbols][$t.Decimal];if(t===$t.CurrencyGroup)return e[st.NumberSymbols][$t.Group]}return n}const J9=/^(\d+)?\.((\d+)(-(\d+))?)?$/,eB=22,tM=".",yy="0",eY=";",tY=",",PT="#";function LT(i){const t=parseInt(i);if(isNaN(t))throw new Error("Invalid integer literal when parsing "+i);return t}const BT=/\s+/,iB=[];let hm=(()=>{class i{constructor(e,n,r,s){this._iterableDiffers=e,this._keyValueDiffers=n,this._ngEl=r,this._renderer=s,this.initialClasses=iB,this.stateMap=new Map}set klass(e){this.initialClasses=null!=e?e.trim().split(BT):iB}set ngClass(e){this.rawClass="string"==typeof e?e.trim().split(BT):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(BT).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)(E(jw),E(gy),E(vt),E(ll))},i.\u0275dir=ve({type:i,selectors:[["","ngClass",""]],inputs:{klass:["class","klass"],ngClass:"ngClass"},standalone:!0}),i})();class hY{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 lo=(()=>{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 hY(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),oB(a,r)}});for(let r=0,s=n.length;r{oB(n.get(r.currentIndex),r)})}static ngTemplateContextGuard(e,n){return!0}}return i.\u0275fac=function(e){return new(e||i)(E(jr),E(Eo),E(jw))},i.\u0275dir=ve({type:i,selectors:[["","ngFor","","ngForOf",""]],inputs:{ngForOf:"ngForOf",ngForTrackBy:"ngForTrackBy",ngForTemplate:"ngForTemplate"},standalone:!0}),i})();function oB(i,t){i.context.$implicit=t.item}let _i=(()=>{class i{constructor(e,n){this._viewContainer=e,this._context=new pY,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){aB("ngIfThen",e),this._thenTemplateRef=e,this._thenViewRef=null,this._updateView()}set ngIfElse(e){aB("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)(E(jr),E(Eo))},i.\u0275dir=ve({type:i,selectors:[["","ngIf",""]],inputs:{ngIf:"ngIf",ngIfThen:"ngIfThen",ngIfElse:"ngIfElse"},standalone:!0}),i})();class pY{constructor(){this.$implicit=null,this.ngIf=null}}function aB(i,t){if(t&&!t.createEmbeddedView)throw new Error(`${i} must be a TemplateRef, but received '${mi(t)}'.`)}class UT{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 by=(()=>{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=ve({type:i,selectors:[["","ngSwitch",""]],inputs:{ngSwitch:"ngSwitch"},standalone:!0}),i})(),VT=(()=>{class i{constructor(e,n,r){this.ngSwitch=r,r._addCase(),this._view=new UT(e,n)}ngDoCheck(){this._view.enforceState(this.ngSwitch._matchCase(this.ngSwitchCase))}}return i.\u0275fac=function(e){return new(e||i)(E(jr),E(Eo),E(by,9))},i.\u0275dir=ve({type:i,selectors:[["","ngSwitchCase",""]],inputs:{ngSwitchCase:"ngSwitchCase"},standalone:!0}),i})(),lB=(()=>{class i{constructor(e,n,r){r._addDefault(new UT(e,n))}}return i.\u0275fac=function(e){return new(e||i)(E(jr),E(Eo),E(by,9))},i.\u0275dir=ve({type:i,selectors:[["","ngSwitchDefault",""]],standalone:!0}),i})(),nM=(()=>{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:Es.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)(E(vt),E(gy),E(ll))},i.\u0275dir=ve({type:i,selectors:[["","ngStyle",""]],inputs:{ngStyle:"ngStyle"},standalone:!0}),i})(),xy=(()=>{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)(E(jr))},i.\u0275dir=ve({type:i,selectors:[["","ngTemplateOutlet",""]],inputs:{ngTemplateOutletContext:"ngTemplateOutletContext",ngTemplateOutlet:"ngTemplateOutlet",ngTemplateOutletInjector:"ngTemplateOutletInjector"},standalone:!0,features:[xi]}),i})();function ml(i,t){return new pe(2100,!1)}class gY{createSubscription(t,e){return t.subscribe({next:e,error:n=>{throw n}})}dispose(t){t.unsubscribe()}}class _Y{createSubscription(t,e){return t.then(e,n=>{throw n})}dispose(t){}}const vY=new _Y,yY=new gY;let Xo=(()=>{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(oy(e))return vY;if(hL(e))return yY;throw ml()}_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)(E(Qn,16))},i.\u0275pipe=$i({name:"async",type:i,pure:!1,standalone:!0}),i})(),dB=(()=>{class i{constructor(e){this.differs=e,this.keyValues=[],this.compareFn=uB}transform(e,n=uB){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 kY(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)(E(gy,16))},i.\u0275pipe=$i({name:"keyvalue",type:i,pure:!1,standalone:!0}),i})();function uB(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 zT(i){return!(null==i||""===i||i!=i)}(e))return null;r=r||this._locale;try{return function sY(i,t,e){return function OT(i,t,e,n,r,s,o=!1){let a="",l=!1;if(isFinite(i)){let c=function aY(i){let n,r,s,o,a,t=Math.abs(i)+"",e=0;for((r=t.indexOf(tM))>-1&&(t=t.replace(tM,"")),(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)===yy;s++);if(s===(a=t.length))n=[0],r=1;else{for(a--;t.charAt(a)===yy;)a--;for(r-=s,n=[],o=0;s<=a;s++,o++)n[o]=Number(t.charAt(s))}return r>eB&&(n=n.splice(0,eB-1),e=r-1,r=1),{digits:n,exponent:e,integerLen:r}}(i);o&&(c=function oY(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 d=t.minInt,h=t.minFrac,p=t.maxFrac;if(s){const M=s.match(J9);if(null===M)throw new Error(`${s} is not a valid digit info`);const x=M[1],C=M[3],F=M[5];null!=x&&(d=LT(x)),null!=C&&(h=LT(C)),null!=F?p=LT(F):null!=C&&h>p&&(p=h)}!function lY(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);d&&(n.unshift(d),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(Ta(e,n)),v.length&&(a+=Ta(e,r)+v.join("")),b&&(a+=Ta(e,$t.Exponential)+"+"+b)}else a=Ta(e,$t.Infinity);return a=i<0&&!l?t.negPre+a+t.negSuf:t.posPre+a+t.posSuf,a}(i,function FT(i,t="-"){const e={minInt:1,minFrac:0,maxFrac:0,posPre:"",posSuf:"",negPre:"",negSuf:"",gSize:0,lgSize:0},n=i.split(eY),r=n[0],s=n[1],o=-1!==r.indexOf(tM)?r.split(tM):[r.substring(0,r.lastIndexOf(yy)+1),r.substring(r.lastIndexOf(yy)+1)],a=o[0],l=o[1]||"";e.posPre=a.substring(0,a.indexOf(PT));for(let d=0;d{class i{}return i.\u0275fac=function(e){return new(e||i)},i.\u0275mod=en({type:i}),i.\u0275inj=Wt({}),i})();const fB="browser";let UY=(()=>{class i{}return i.\u0275prov=Pe({token:i,providedIn:"root",factory:()=>new VY(ee(qt),window)}),i})();class VY{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 zY(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=pB(this.window.history)||pB(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 pB(i){return Object.getOwnPropertyDescriptor(i,"scrollRestoration")}class m7 extends b9{constructor(){super(...arguments),this.supportsDOMEvents=!0}}class WT extends m7{static makeCurrent(){!function y9(i){ET||(ET=i)}(new WT)}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 g7(){return My=My||document.querySelector("base"),My?My.getAttribute("href"):null}();return null==e?null:function _7(i){sM=sM||document.createElement("a"),sM.setAttribute("href",i);const t=sM.pathname;return"/"===t.charAt(0)?t:`/${t}`}(e)}resetBaseElement(){My=null}getUserAgent(){return window.navigator.userAgent}getCookie(t){return function dY(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 sM,My=null;const yB=new me("TRANSITION_ID"),y7=[{provide:Vw,useFactory:function v7(i,t,e){return()=>{e.get(zw).donePromise.then(()=>{const n=$c(),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=Pe({token:i,factory:i.\u0275fac}),i})();const oM=new me("EventManagerPlugins");let aM=(()=>{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=Pe({token:i,factory:i.\u0275fac}),i})(),Cy=(()=>{class i extends xB{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)(ee(qt))},i.\u0275prov=Pe({token:i,factory:i.\u0275fac}),i})();const jT={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/"},YT=/%COMP%/g,CB=new me("RemoveStylesOnCompDestory",{providedIn:"root",factory:()=>!1});function SB(i,t){return t.flat(100).map(e=>e.replace(YT,i))}function EB(i){return t=>{if("__ngUnwrap__"===t)return i;!1===i(t)&&(t.preventDefault(),t.returnValue=!1)}}let lM=(()=>{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 qT(e)}createRenderer(e,n){if(!e||!n)return this.defaultRenderer;const r=this.getOrCreateRenderer(e,n);return r instanceof TB?r.applyToHost(e):r instanceof XT&&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 Ks.Emulated:s=new TB(o,a,n,this.appId,l);break;case Ks.ShadowDom:return new D7(o,a,e,n);default:s=new XT(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)(ee(aM),ee(Cy),ee(cm),ee(CB))},i.\u0275prov=Pe({token:i,factory:i.\u0275fac}),i})();class qT{constructor(t){this.eventManager=t,this.data=Object.create(null),this.destroyNode=null}destroy(){}createElement(t,e){return e?document.createElementNS(jT[e]||e,t):document.createElement(t)}createComment(t){return document.createComment(t)}createText(t){return document.createTextNode(t)}appendChild(t,e){(DB(t)?t.content:t).appendChild(e)}insertBefore(t,e,n){t&&(DB(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=jT[r];s?t.setAttributeNS(s,e,n):t.setAttribute(e,n)}else t.setAttribute(e,n)}removeAttribute(t,e,n){if(n){const r=jT[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&(Es.DashCase|Es.Important)?t.style.setProperty(e,n,r&Es.Important?"important":""):t.style[e]=n}removeStyle(t,e,n){n&Es.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,EB(n)):this.eventManager.addEventListener(t,e,EB(n))}}function DB(i){return"TEMPLATE"===i.tagName&&void 0!==i.content}class D7 extends qT{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=SB(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 XT extends qT{constructor(t,e,n,r,s=n.id){super(t),this.sharedStylesHost=e,this.removeStylesOnCompDestory=r,this.rendererUsageCount=0,this.styles=SB(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 TB extends XT{constructor(t,e,n,r,s){const o=r+"-"+n.id;super(t,e,n,s,o),this.contentAttr=function S7(i){return"_ngcontent-%COMP%".replace(YT,i)}(o),this.hostAttr=function E7(i){return"_nghost-%COMP%".replace(YT,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 T7=(()=>{class i extends bB{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)(ee(qt))},i.\u0275prov=Pe({token:i,factory:i.\u0275fac}),i})();const IB=["alt","control","meta","shift"],I7={"\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"},R7={alt:i=>i.altKey,control:i=>i.ctrlKey,meta:i=>i.metaKey,shift:i=>i.shiftKey};let k7=(()=>{class i extends bB{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(()=>$c().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."),IB.forEach(c=>{const d=n.indexOf(c);d>-1&&(n.splice(d,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=I7[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"),IB.forEach(o=>{o!==r&&(0,R7[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)(ee(qt))},i.\u0275prov=Pe({token:i,factory:i.\u0275fac}),i})();const L7=EN(g9,"browser",[{provide:fT,useValue:fB},{provide:mN,useValue:function P7(){WT.makeCurrent()},multi:!0},{provide:qt,useFactory:function F7(){return function o1(i){vv=i}(document),document},deps:[]}]),PB=new me(""),OB=[{provide:Hw,useClass:class b7{addToWindow(t){Rn.getAngularTestability=(n,r=!0)=>{const s=t.findTestabilityInTree(n,r);if(null==s)throw new Error("Could not find testability for element.");return s},Rn.getAllAngularTestabilities=()=>t.getAllTestabilities(),Rn.getAllAngularRootElements=()=>t.getAllRootElements(),Rn.frameworkStabilizers||(Rn.frameworkStabilizers=[]),Rn.frameworkStabilizers.push(n=>{const r=Rn.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?$c().isShadowRoot(e)?this.findTestabilityInTree(t,e.host,!0):this.findTestabilityInTree(t,e.parentElement,!0):null)}},deps:[]},{provide:xN,useClass:_T,deps:[gt,vT,Hw]},{provide:_T,useClass:_T,deps:[gt,vT,Hw]}],FB=[{provide:Iv,useValue:"root"},{provide:cl,useFactory:function O7(){return new cl},deps:[]},{provide:oM,useClass:T7,multi:!0,deps:[qt,gt,fT]},{provide:oM,useClass:k7,multi:!0,deps:[qt]},{provide:lM,useClass:lM,deps:[aM,Cy,cm,CB]},{provide:Gl,useExisting:lM},{provide:xB,useExisting:Cy},{provide:Cy,useClass:Cy,deps:[qt]},{provide:aM,useClass:aM,deps:[oM,gt]},{provide:class HY{},useClass:x7,deps:[]},[]];let LB=(()=>{class i{constructor(e){}static withServerTransition(e){return{ngModule:i,providers:[{provide:cm,useValue:e.appId},{provide:yB,useExisting:cm},y7]}}}return i.\u0275fac=function(e){return new(e||i)(ee(PB,12))},i.\u0275mod=en({type:i}),i.\u0275inj=Wt({providers:[...FB,...OB],imports:[co,_9]}),i})(),NB=(()=>{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)(ee(qt))},i.\u0275prov=Pe({token:i,factory:function(e){let n=null;return n=e?new e:function B7(){return new NB(ee(qt))}(),n},providedIn:"root"}),i})();typeof window<"u"&&window;let QT=(()=>{class i{}return i.\u0275fac=function(e){return new(e||i)},i.\u0275prov=Pe({token:i,factory:function(e){let n=null;return n=e?new(e||i):ee(VB),n},providedIn:"root"}),i})(),VB=(()=>{class i extends QT{constructor(e){super(),this._doc=e}sanitize(e,n){if(null==n)return null;switch(e){case Zn.NONE:return n;case Zn.HTML:return Ea(n,"HTML")?to(n):Qx(this._doc,String(n)).toString();case Zn.STYLE:return Ea(n,"Style")?to(n):n;case Zn.SCRIPT:if(Ea(n,"Script"))return to(n);throw new Error("unsafe value used in a script context");case Zn.URL:return Ea(n,"URL")?to(n):xh(String(n));case Zn.RESOURCE_URL:if(Ea(n,"ResourceURL"))return to(n);throw new Error(`unsafe value used in a resource URL context (see ${qu})`);default:throw new Error(`Unexpected SecurityContext ${e} (see ${qu})`)}}bypassSecurityTrustHtml(e){return function h1(i){return new a1(i)}(e)}bypassSecurityTrustStyle(e){return function f1(i){return new l1(i)}(e)}bypassSecurityTrustScript(e){return function p1(i){return new c1(i)}(e)}bypassSecurityTrustUrl(e){return function m1(i){return new d1(i)}(e)}bypassSecurityTrustResourceUrl(e){return function g1(i){return new Op(i)}(e)}}return i.\u0275fac=function(e){return new(e||i)(ee(qt))},i.\u0275prov=Pe({token:i,factory:function(e){let n=null;return n=e?new e:function $7(i){return new VB(i.get(qt))}(ee(Gi)),n},providedIn:"root"}),i})();function mt(...i){return Ni(i,Gu(i))}class Qe extends Te{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 fm=z(i=>function(){i(this),this.name="EmptyError",this.message="no elements in sequence"}),{isArray:G7}=Array,{getPrototypeOf:W7,prototype:j7,keys:Y7}=Object;function zB(i){if(1===i.length){const t=i[0];if(G7(t))return{args:t,keys:null};if(function q7(i){return i&&"object"==typeof i&&W7(i)===j7}(t)){const e=Y7(t);return{args:e.map(n=>t[n]),keys:e}}}return{args:i,keys:null}}const{isArray:X7}=Array;function JT(i){return tt(t=>function K7(i,t){return X7(t)?i(...t):i(t)}(i,t))}function HB(i,t){return i.reduce((e,n,r)=>(e[n]=t[r],e),{})}function Ra(...i){const t=Gu(i),e=M0(i),{args:n,keys:r}=zB(i);if(0===n.length)return Ni([],t);const s=new In(function Z7(i,t,e=ja){return n=>{$B(t,()=>{const{length:r}=i,s=new Array(r);let o=r,a=r;for(let l=0;l{const c=Ni(i[l],t);let d=!1;c.subscribe(qn(n,h=>{s[l]=h,d||(d=!0,a--),a||n.next(e(s.slice()))},()=>{--o||n.complete()}))},n)},n)}}(n,t,r?o=>HB(r,o):ja));return e?s.pipe(JT(e)):s}function $B(i,t,e){i?Xa(e,i,t):t()}function Sy(...i){return function Q7(){return bd(1)}()(Ni(i,Gu(i)))}function Ey(i){return new In(t=>{Mr(i()).subscribe(t)})}function pm(i,t){const e=dn(i)?i:()=>i,n=r=>r.error(e());return new In(t?r=>t.schedule(n,0,r):n)}function eI(){return ni((i,t)=>{let e=null;i._refCount++;const n=qn(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 GB extends In{constructor(t,e){super(),this.source=t,this.subjectFactory=e,this._subject=null,this._refCount=0,this._connection=null,d0(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 Qt;const e=this.getSubject();t.add(this.source.subscribe(qn(e,void 0,()=>{this._teardown(),e.complete()},n=>{this._teardown(),e.error(n)},()=>this._teardown()))),t.closed&&(this._connection=null,t=Qt.EMPTY)}return t}refCount(){return eI()(this)}}function ks(i,t){return ni((e,n)=>{let r=null,s=0,o=!1;const a=()=>o&&!r&&n.complete();e.subscribe(qn(n,l=>{r?.unsubscribe();let c=0;const d=s++;Mr(i(l,d)).subscribe(r=qn(n,h=>n.next(t?t(l,h,d,c++):h),()=>{r=null,a()}))},()=>{o=!0,a()}))})}function Oi(i){return i<=0?()=>_o:ni((t,e)=>{let n=0;t.subscribe(qn(e,r=>{++n<=i&&(e.next(r),i<=n&&e.complete())}))})}function Do(...i){const t=Gu(i);return ni((e,n)=>{(t?Sy(i,e,t):Sy(i,e)).subscribe(n)})}function gn(i,t){return ni((e,n)=>{let r=0;e.subscribe(qn(n,s=>i.call(t,s,r++)&&n.next(s)))})}function cM(i){return ni((t,e)=>{let n=!1;t.subscribe(qn(e,r=>{n=!0,e.next(r)},()=>{n||e.next(i),e.complete()}))})}function WB(i=J7){return ni((t,e)=>{let n=!1;t.subscribe(qn(e,r=>{n=!0,e.next(r)},()=>n?e.complete():e.error(i())))})}function J7(){return new fm}function iu(i,t){const e=arguments.length>=2;return n=>n.pipe(i?gn((r,s)=>i(r,s,n)):ja,Oi(1),e?cM(t):WB(()=>new fm))}function ru(i,t){return dn(t)?rr(i,t,1):rr(i,1)}function Vi(i,t,e){const n=dn(i)||t||e?{next:i,error:t,complete:e}:i;return n?ni((r,s)=>{var o;null===(o=n.subscribe)||void 0===o||o.call(n);let a=!0;r.subscribe(qn(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)}))}):ja}function jc(i){return ni((t,e)=>{let s,n=null,r=!1;n=t.subscribe(qn(e,void 0,void 0,o=>{s=Mr(i(o,jc(i)(t))),n?(n.unsubscribe(),n=null,s.subscribe(e)):r=!0})),r&&(n.unsubscribe(),n=null,s.subscribe(e))})}function tI(i,t){return ni(function eq(i,t,e,n,r){return(s,o)=>{let a=e,l=t,c=0;s.subscribe(qn(o,d=>{const h=c++;l=a?i(l,d,h):(a=!0,d),n&&o.next(l)},r&&(()=>{a&&o.next(l),o.complete()})))}}(i,t,arguments.length>=2,!0))}function nI(i){return i<=0?()=>_o:ni((t,e)=>{let n=[];t.subscribe(qn(e,r=>{n.push(r),i{for(const r of n)e.next(r);e.complete()},void 0,()=>{n=null}))})}function jB(i,t){const e=arguments.length>=2;return n=>n.pipe(i?gn((r,s)=>i(r,s,n)):ja,nI(1),e?cM(t):WB(()=>new fm))}function YB(i,t=!1){return ni((e,n)=>{let r=0;e.subscribe(qn(n,s=>{const o=i(s,r++);(o||t)&&n.next(s),!o&&n.complete()}))})}function qB(i){return tt(()=>i)}function su(i){return ni((t,e)=>{try{t.subscribe(e)}finally{e.add(i)}})}const _n="primary",Ay=Symbol("RouteTitle");class tq{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 tq(i)}function nq(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 KB(i){return Array.prototype.concat.apply([],i)}function ZB(i){return i.length>0?i[i.length-1]:null}function os(i,t){for(const e in i)i.hasOwnProperty(e)&&t(i[e],e)}function ou(i){return LD(i)?i:oy(i)?Ni(Promise.resolve(i)):mt(i)}const dM=!1,rq={exact:function e3(i,t,e){if(!kh(i.segments,t.segments)||!uM(i.segments,t.segments,e)||i.numberOfChildren!==t.numberOfChildren)return!1;for(const n in t.children)if(!i.children[n]||!e3(i.children[n],t.children[n],e))return!1;return!0},subset:t3},QB={exact:function sq(i,t){return Kl(i,t)},subset:function oq(i,t){return Object.keys(t).length<=Object.keys(i).length&&Object.keys(t).every(e=>XB(i[e],t[e]))},ignored:()=>!0};function JB(i,t,e){return rq[e.paths](i.root,t.root,e.matrixParams)&&QB[e.queryParams](i.queryParams,t.queryParams)&&!("exact"===e.fragment&&i.fragment!==t.fragment)}function t3(i,t,e){return n3(i,t,t.segments,e)}function n3(i,t,e,n){if(i.segments.length>e.length){const r=i.segments.slice(0,e.length);return!(!kh(r,e)||t.hasChildren()||!uM(r,e,n))}if(i.segments.length===e.length){if(!kh(i.segments,e)||!uM(i.segments,e,n))return!1;for(const r in t.children)if(!i.children[r]||!t3(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!!(kh(i.segments,r)&&uM(i.segments,r,n)&&i.children[_n])&&n3(i.children[_n],t,s,n)}}function uM(i,t,e){return t.every((n,r)=>QB[e](i[r].parameters,n.parameters))}class au{constructor(t=new Tn([],{}),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 cq.serialize(this)}}class Tn{constructor(t,e){this.segments=t,this.children=e,this.parent=null,os(e,(n,r)=>n.parent=this)}hasChildren(){return this.numberOfChildren>0}get numberOfChildren(){return Object.keys(this.children).length}toString(){return hM(this)}}class Dy{constructor(t,e){this.path=t,this.parameters=e}get parameterMap(){return this._parameterMap||(this._parameterMap=mm(this.parameters)),this._parameterMap}toString(){return o3(this)}}function kh(i,t){return i.length===t.length&&i.every((e,n)=>e.path===t[n].path)}let Ty=(()=>{class i{}return i.\u0275fac=function(e){return new(e||i)},i.\u0275prov=Pe({token:i,factory:function(){return new iI},providedIn:"root"}),i})();class iI{parse(t){const e=new vq(t);return new au(e.parseRootSegment(),e.parseQueryParams(),e.parseFragment())}serialize(t){const e=`/${Iy(t.root,!0)}`,n=function hq(i){const t=Object.keys(i).map(e=>{const n=i[e];return Array.isArray(n)?n.map(r=>`${fM(e)}=${fM(r)}`).join("&"):`${fM(e)}=${fM(n)}`}).filter(e=>!!e);return t.length?`?${t.join("&")}`:""}(t.queryParams);return`${e}${n}${"string"==typeof t.fragment?`#${function dq(i){return encodeURI(i)}(t.fragment)}`:""}`}}const cq=new iI;function hM(i){return i.segments.map(t=>o3(t)).join("/")}function Iy(i,t){if(!i.hasChildren())return hM(i);if(t){const e=i.children[_n]?Iy(i.children[_n],!1):"",n=[];return os(i.children,(r,s)=>{s!==_n&&n.push(`${s}:${Iy(r,!1)}`)}),n.length>0?`${e}(${n.join("//")})`:e}{const e=function lq(i,t){let e=[];return os(i.children,(n,r)=>{r===_n&&(e=e.concat(t(n,r)))}),os(i.children,(n,r)=>{r!==_n&&(e=e.concat(t(n,r)))}),e}(i,(n,r)=>r===_n?[Iy(i.children[_n],!1)]:[`${r}:${Iy(n,!1)}`]);return 1===Object.keys(i.children).length&&null!=i.children[_n]?`${hM(i)}/${e[0]}`:`${hM(i)}/(${e.join("//")})`}}function r3(i){return encodeURIComponent(i).replace(/%40/g,"@").replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",")}function fM(i){return r3(i).replace(/%3B/gi,";")}function rI(i){return r3(i).replace(/\(/g,"%28").replace(/\)/g,"%29").replace(/%26/gi,"&")}function pM(i){return decodeURIComponent(i)}function s3(i){return pM(i.replace(/\+/g,"%20"))}function o3(i){return`${rI(i.path)}${function uq(i){return Object.keys(i).map(t=>`;${rI(t)}=${rI(i[t])}`).join("")}(i.parameters)}`}const fq=/^[^\/()?;=#]+/;function mM(i){const t=i.match(fq);return t?t[0]:""}const pq=/^[^=?&#]+/,gq=/^[^&#]+/;class vq{constructor(t){this.url=t,this.remaining=t}parseRootSegment(){return this.consumeOptional("/"),""===this.remaining||this.peekStartsWith("?")||this.peekStartsWith("#")?new Tn([],{}):new Tn([],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[_n]=new Tn(t,e)),n}parseSegment(){const t=mM(this.remaining);if(""===t&&this.peekStartsWith(";"))throw new pe(4009,dM);return this.capture(t),new Dy(pM(t),this.parseMatrixParams())}parseMatrixParams(){const t={};for(;this.consumeOptional(";");)this.parseParam(t);return t}parseParam(t){const e=mM(this.remaining);if(!e)return;this.capture(e);let n="";if(this.consumeOptional("=")){const r=mM(this.remaining);r&&(n=r,this.capture(n))}t[pM(e)]=pM(n)}parseQueryParam(t){const e=function mq(i){const t=i.match(pq);return t?t[0]:""}(this.remaining);if(!e)return;this.capture(e);let n="";if(this.consumeOptional("=")){const o=function _q(i){const t=i.match(gq);return t?t[0]:""}(this.remaining);o&&(n=o,this.capture(n))}const r=s3(e),s=s3(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=mM(this.remaining),r=this.remaining[n.length];if("/"!==r&&")"!==r&&";"!==r)throw new pe(4010,dM);let s;n.indexOf(":")>-1?(s=n.slice(0,n.indexOf(":")),this.capture(s),this.capture(":")):t&&(s=_n);const o=this.parseChildren();e[s]=1===Object.keys(o).length?o[_n]:new Tn([],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 pe(4011,dM)}}function sI(i){return i.segments.length>0?new Tn([],{[_n]:i}):i}function gM(i){const t={};for(const n of Object.keys(i.children)){const s=gM(i.children[n]);(s.segments.length>0||s.hasChildren())&&(t[n]=s)}return function yq(i){if(1===i.numberOfChildren&&i.children[_n]){const t=i.children[_n];return new Tn(i.segments.concat(t.segments),t.children)}return i}(new Tn(i.segments,t))}function Ph(i){return i instanceof au}const oI=!1;function bq(i,t,e,n,r){if(0===e.length)return gm(t.root,t.root,t.root,n,r);const s=function u3(i){if("string"==typeof i[0]&&1===i.length&&"/"===i[0])return new d3(!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 os(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 d3(e,t,n)}(e);return s.toRoot()?gm(t.root,t.root,new Tn([],{}),n,r):function o(l){const c=function wq(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 h3(i,t,e){let n=i,r=t,s=e;for(;s>r;){if(s-=r,n=n.parent,!n)throw new pe(4005,oI&&"Invalid number of '../'");r=n.segments.length}return new _m(n,!1,r-s)}(e,n+(Ry(i.commands[0])?0:1),i.numberOfDoubleDots)}(s,t,i.snapshot?._urlSegment,l),d=c.processChildren?vm(c.segmentGroup,c.index,s.commands):aI(c.segmentGroup,c.index,s.commands);return gm(t.root,c.segmentGroup,d,n,r)}(i.snapshot?._lastPathIndex)}function Ry(i){return"object"==typeof i&&null!=i&&!i.outlets&&!i.segmentPath}function ky(i){return"object"==typeof i&&null!=i&&i.outlets}function gm(i,t,e,n,r){let o,s={};n&&os(n,(l,c)=>{s[c]=Array.isArray(l)?l.map(d=>`${d}`):`${l}`}),o=i===t?e:c3(i,t,e);const a=sI(gM(o));return new au(a,s,r)}function c3(i,t,e){const n={};return os(i.children,(r,s)=>{n[s]=r===t?e:c3(r,t,e)}),new Tn(i.segments,n)}class d3{constructor(t,e,n){if(this.isAbsolute=t,this.numberOfDoubleDots=e,this.commands=n,t&&n.length>0&&Ry(n[0]))throw new pe(4003,oI&&"Root segment cannot have matrix parameters");const r=n.find(ky);if(r&&r!==ZB(n))throw new pe(4004,oI&&"{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 aI(i,t,e){if(i||(i=new Tn([],{})),0===i.segments.length&&i.hasChildren())return vm(i,t,e);const n=function Cq(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(ky(a))break;const l=`${a}`,c=n0&&void 0===l)break;if(l&&c&&"object"==typeof c&&void 0===c.outlets){if(!p3(l,c,o))return s;n+=2}else{if(!p3(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]=aI(i.children[o],t,s))}),os(i.children,(s,o)=>{void 0===n[o]&&(r[o]=s)}),new Tn(i.segments,r)}}function lI(i,t,e){const n=i.segments.slice(0,t);let r=0;for(;r{"string"==typeof e&&(e=[e]),null!==e&&(t[n]=lI(new Tn([],{}),0,e))}),t}function f3(i){const t={};return os(i,(e,n)=>t[n]=`${e}`),t}function p3(i,t,e){return i==e.path&&Kl(t,e.parameters)}const Py="imperative";class Zl{constructor(t,e){this.id=t,this.url=e}}class cI extends Zl{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 Oh extends Zl{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 _M extends Zl{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 vM extends Zl{constructor(t,e,n,r){super(t,e),this.reason=n,this.code=r,this.type=16}}class dI extends Zl{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 Eq extends Zl{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 Aq extends Zl{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 Dq extends Zl{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 Tq extends Zl{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 Iq extends Zl{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 Rq{constructor(t){this.route=t,this.type=9}toString(){return`RouteConfigLoadStart(path: ${this.route.path})`}}class kq{constructor(t){this.route=t,this.type=10}toString(){return`RouteConfigLoadEnd(path: ${this.route.path})`}}class Pq{constructor(t){this.snapshot=t,this.type=11}toString(){return`ChildActivationStart(path: '${this.snapshot.routeConfig&&this.snapshot.routeConfig.path||""}')`}}class Oq{constructor(t){this.snapshot=t,this.type=12}toString(){return`ChildActivationEnd(path: '${this.snapshot.routeConfig&&this.snapshot.routeConfig.path||""}')`}}class Fq{constructor(t){this.snapshot=t,this.type=13}toString(){return`ActivationStart(path: '${this.snapshot.routeConfig&&this.snapshot.routeConfig.path||""}')`}}class Lq{constructor(t){this.snapshot=t,this.type=14}toString(){return`ActivationEnd(path: '${this.snapshot.routeConfig&&this.snapshot.routeConfig.path||""}')`}}class m3{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 Uq=(()=>{class i{createUrlTree(e,n,r,s,o,a){return bq(e||n.root,r,s,o,a)}}return i.\u0275fac=function(e){return new(e||i)},i.\u0275prov=Pe({token:i,factory:i.\u0275fac}),i})(),zq=(()=>{class i{}return i.\u0275fac=function(e){return new(e||i)},i.\u0275prov=Pe({token:i,factory:function(t){return Uq.\u0275fac(t)},providedIn:"root"}),i})();class g3{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=uI(t,this._root);return e?e.children.map(n=>n.value):[]}firstChild(t){const e=uI(t,this._root);return e&&e.children.length>0?e.children[0].value:null}siblings(t){const e=hI(t,this._root);return e.length<2?[]:e[e.length-2].children.map(r=>r.value).filter(r=>r!==t)}pathFromRoot(t){return hI(t,this._root).map(e=>e.value)}}function uI(i,t){if(i===t.value)return t;for(const e of t.children){const n=uI(i,e);if(n)return n}return null}function hI(i,t){if(i===t.value)return[t];for(const e of t.children){const n=hI(i,e);if(n.length)return n.unshift(t),n}return[]}class Yc{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 _3 extends g3{constructor(t,e){super(t),this.snapshot=e,fI(this,t)}toString(){return this.snapshot.toString()}}function v3(i,t){const e=function Hq(i,t){const o=new yM([],{},{},"",{},_n,t,null,i.root,-1,{});return new b3("",new Yc(o,[]))}(i,t),n=new Qe([new Dy("",{})]),r=new Qe({}),s=new Qe({}),o=new Qe({}),a=new Qe(""),l=new bm(n,r,o,a,s,_n,t,e.root);return l.snapshot=e.root,new _3(new Yc(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(tt(c=>c[Ay]))??mt(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(tt(t=>mm(t)))),this._paramMap}get queryParamMap(){return this._queryParamMap||(this._queryParamMap=this.queryParams.pipe(tt(t=>mm(t)))),this._queryParamMap}toString(){return this.snapshot?this.snapshot.toString():`Future(${this._futureSnapshot})`}}function y3(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 $q(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 yM{get title(){return this.data?.[Ay]}constructor(t,e,n,r,s,o,a,l,c,d,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=d,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 b3 extends g3{constructor(t,e){super(e),this.url=t,fI(this,e)}toString(){return x3(this._root)}}function fI(i,t){t.value._routerState=i,t.children.forEach(e=>fI(i,e))}function x3(i){const t=i.children.length>0?` { ${i.children.map(x3).join(", ")} } `:"";return`${i.value}${t}`}function pI(i){if(i.snapshot){const t=i.snapshot,e=i._futureSnapshot;i.snapshot=e,Kl(t.queryParams,e.queryParams)||i.queryParams.next(e.queryParams),t.fragment!==e.fragment&&i.fragment.next(e.fragment),Kl(t.params,e.params)||i.params.next(e.params),function iq(i,t){if(i.length!==t.length)return!1;for(let e=0;eKl(e.parameters,t[n].parameters))}(i.url,t.url);return e&&!(!i.parent!=!t.parent)&&(!i.parent||mI(i.parent,t.parent))}function Oy(i,t,e){if(e&&i.shouldReuseRoute(t.value,e.value.snapshot)){const n=e.value;n._futureSnapshot=t.value;const r=function Wq(i,t,e){return t.children.map(n=>{for(const r of e.children)if(i.shouldReuseRoute(n.value,r.value.snapshot))return Oy(i,n,r);return Oy(i,n)})}(i,t,e);return new Yc(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=>Oy(i,a)),o}}const n=function jq(i){return new bm(new Qe(i.url),new Qe(i.params),new Qe(i.queryParams),new Qe(i.fragment),new Qe(i.data),i.outlet,i.component,i)}(t.value),r=t.children.map(s=>Oy(i,s));return new Yc(n,r)}}const gI="ngNavigationCancelingError";function w3(i,t){const{redirectTo:e,navigationBehaviorOptions:n}=Ph(t)?{redirectTo:t,navigationBehaviorOptions:void 0}:t,r=M3(!1,0,t);return r.url=e,r.navigationBehaviorOptions=n,r}function M3(i,t,e){const n=new Error("NavigationCancelingError: "+(i||""));return n[gI]=!0,n.cancellationCode=t,e&&(n.url=e),n}function C3(i){return S3(i)&&Ph(i.url)}function S3(i){return i&&i[gI]}class Yq{constructor(){this.outlet=null,this.route=null,this.resolver=null,this.injector=null,this.children=new Fy,this.attachRef=null}}let Fy=(()=>{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 Yq,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=Pe({token:i,factory:i.\u0275fac,providedIn:"root"}),i})();const bM=!1;let E3=(()=>{class i{constructor(){this.activated=null,this._activatedRoute=null,this.name=_n,this.activateEvents=new $e,this.deactivateEvents=new $e,this.attachEvents=new $e,this.detachEvents=new $e,this.parentContexts=Lt(Fy),this.location=Lt(jr),this.changeDetector=Lt(Qn),this.environmentInjector=Lt(io)}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 pe(4012,bM);return this.activated.instance}get activatedRoute(){if(!this.activated)throw new pe(4012,bM);return this._activatedRoute}get activatedRouteData(){return this._activatedRoute?this._activatedRoute.snapshot.data:{}}detach(){if(!this.activated)throw new pe(4012,bM);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 pe(4013,bM);this._activatedRoute=e;const r=this.location,o=e.snapshot.component,a=this.parentContexts.getOrCreateContext(this.name).children,l=new qq(e,a,r.injector);if(n&&function Xq(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=ve({type:i,selectors:[["router-outlet"]],inputs:{name:"name"},outputs:{activateEvents:"activate",deactivateEvents:"deactivate",attachEvents:"attach",detachEvents:"detach"},exportAs:["outlet"],standalone:!0,features:[xi]}),i})();class qq{constructor(t,e,n){this.route=t,this.childContexts=e,this.parent=n}get(t,e){return t===bm?this.route:t===Fy?this.childContexts:this.parent.get(t,e)}}let _I=(()=>{class i{}return i.\u0275fac=function(e){return new(e||i)},i.\u0275cmp=ot({type:i,selectors:[["ng-component"]],standalone:!0,features:[ZD],decls:1,vars:0,template:function(e,n){1&e&&Ie(0,"router-outlet")},dependencies:[E3],encapsulation:2}),i})();function A3(i,t){return i.providers&&!i._injector&&(i._injector=Lw(i.providers,t,`Route: ${i.path}`)),i._injector??t}function yI(i){const t=i.children&&i.children.map(yI),e=t?{...i,children:t}:{...i};return!e.component&&!e.loadComponent&&(t||e.loadChildren)&&e.outlet&&e.outlet!==_n&&(e.component=_I),e}function ka(i){return i.outlet||_n}function D3(i,t){const e=i.filter(n=>ka(n)===t);return e.push(...i.filter(n=>ka(n)!==t)),e}function Ly(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 eX{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),pI(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]}),os(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 Lq(s.value.snapshot))}),t.children.length&&this.forwardEvent(new Oq(t.value.snapshot))}activateRoutes(t,e,n){const r=t.value,s=e?e.value:null;if(pI(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),pI(a.route.value),this.activateChildRoutes(t,null,o.children)}else{const a=Ly(r.snapshot),l=a?.get($l)??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 T3{constructor(t){this.path=t,this.route=this.path[this.path.length-1]}}class xM{constructor(t,e){this.component=t,this.route=e}}function tX(i,t,e){const n=i._root;return Ny(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 Sr(i){return null!==Gf(i)}(i)?t.get(i):i:n}function Ny(i,t,e,n,r={canDeactivateChecks:[],canActivateChecks:[]}){const s=ym(t);return i.children.forEach(o=>{(function iX(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 rX(i,t,e){if("function"==typeof e)return e(i,t);switch(e){case"pathParamsChange":return!kh(i.url,t.url);case"pathParamsOrQueryParamsChange":return!kh(i.url,t.url)||!Kl(i.queryParams,t.queryParams);case"always":return!0;case"paramsOrQueryParamsChange":return!mI(i,t)||!Kl(i.queryParams,t.queryParams);default:return!mI(i,t)}}(o,s,s.routeConfig.runGuardsAndResolvers);l?r.canActivateChecks.push(new T3(n)):(s.data=o.data,s._resolvedData=o._resolvedData),Ny(i,t,s.component?a?a.children:null:e,n,r),l&&a&&a.outlet&&a.outlet.isActivated&&r.canDeactivateChecks.push(new xM(a.outlet.component,o))}else o&&By(t,a,r),r.canActivateChecks.push(new T3(n)),Ny(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]}),os(s,(o,a)=>By(o,e.getContext(a),r)),r}function By(i,t,e){const n=ym(i),r=i.value;os(n,(s,o)=>{By(s,r.component?t?t.children.getContext(o):null:t,e)}),e.canDeactivateChecks.push(new xM(r.component&&t&&t.outlet&&t.outlet.isActivated?t.outlet.component:null,r))}function Uy(i){return"function"==typeof i}function bI(i){return i instanceof fm||"EmptyError"===i?.name}const wM=Symbol("INITIAL_VALUE");function wm(){return ks(i=>Ra(i.map(t=>t.pipe(Oi(1),Do(wM)))).pipe(tt(t=>{for(const e of t)if(!0!==e){if(e===wM)return wM;if(!1===e||e instanceof au)return e}return!0}),gn(t=>t!==wM),Oi(1)))}function I3(i){return function CE(...i){return l0(i)}(Vi(t=>{if(Ph(t))throw w3(0,t)}),tt(t=>!0===t))}const xI={matched:!1,consumedSegments:[],remainingSegments:[],parameters:{},positionalParamSegments:{}};function R3(i,t,e,n,r){const s=wI(i,t,e);return s.matched?function xX(i,t,e,n){const r=t.canMatch;return r&&0!==r.length?mt(r.map(o=>{const a=xm(o,i);return ou(function dX(i){return i&&Uy(i.canMatch)}(a)?a.canMatch(t,e):i.runInContext(()=>a(t,e)))})).pipe(wm(),I3()):mt(!0)}(n=A3(t,n),t,e).pipe(tt(o=>!0===o?s:{...xI})):mt(s)}function wI(i,t,e){if(""===t.path)return"full"===t.pathMatch&&(i.hasChildren()||e.length>0)?{...xI}:{matched:!0,consumedSegments:[],remainingSegments:e,parameters:{},positionalParamSegments:{}};const r=(t.matcher||nq)(e,i,t);if(!r)return{...xI};const s={};os(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 MM(i,t,e,n){if(e.length>0&&function CX(i,t,e){return e.some(n=>CM(i,t,n)&&ka(n)!==_n)}(i,e,n)){const s=new Tn(t,function MX(i,t,e,n){const r={};r[_n]=n,n._sourceSegment=i,n._segmentIndexShift=t.length;for(const s of e)if(""===s.path&&ka(s)!==_n){const o=new Tn([],{});o._sourceSegment=i,o._segmentIndexShift=t.length,r[ka(s)]=o}return r}(i,t,n,new Tn(e,i.children)));return s._sourceSegment=i,s._segmentIndexShift=t.length,{segmentGroup:s,slicedSegments:[]}}if(0===e.length&&function SX(i,t,e){return e.some(n=>CM(i,t,n))}(i,e,n)){const s=new Tn(i.segments,function wX(i,t,e,n,r){const s={};for(const o of n)if(CM(i,e,o)&&!r[ka(o)]){const a=new Tn([],{});a._sourceSegment=i,a._segmentIndexShift=t.length,s[ka(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 Tn(i.segments,i.children);return r._sourceSegment=i,r._segmentIndexShift=t.length,{segmentGroup:r,slicedSegments:e}}function CM(i,t,e){return(!(i.hasChildren()||t.length>0)||"full"!==e.pathMatch)&&""===e.path}function k3(i,t,e,n){return!!(ka(i)===n||n!==_n&&CM(t,e,i))&&("**"===i.path||wI(t,i,e).matched)}function P3(i,t,e){return 0===t.length&&!i.children[e]}const SM=!1;class EM{constructor(t){this.segmentGroup=t||null}}class O3{constructor(t){this.urlTree=t}}function Vy(i){return pm(new EM(i))}function F3(i){return pm(new O3(i))}class TX{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=MM(this.urlTree.root,[],[],this.config).segmentGroup,e=new Tn(t.segments,t.children);return this.expandSegmentGroup(this.injector,this.config,e,_n).pipe(tt(s=>this.createUrlTree(gM(s),this.urlTree.queryParams,this.urlTree.fragment))).pipe(jc(s=>{if(s instanceof O3)return this.allowRedirects=!1,this.match(s.urlTree);throw s instanceof EM?this.noMatchError(s):s}))}match(t){return this.expandSegmentGroup(this.injector,this.config,t.root,_n).pipe(tt(r=>this.createUrlTree(gM(r),t.queryParams,t.fragment))).pipe(jc(r=>{throw r instanceof EM?this.noMatchError(r):r}))}noMatchError(t){return new pe(4002,SM)}createUrlTree(t,e,n){const r=sI(t);return new au(r,e,n)}expandSegmentGroup(t,e,n,r){return 0===n.segments.length&&n.hasChildren()?this.expandChildren(t,e,n).pipe(tt(s=>new Tn([],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 Ni(r).pipe(ru(s=>{const o=n.children[s],a=D3(e,s);return this.expandSegmentGroup(t,a,o,s).pipe(tt(l=>({segment:l,outlet:s})))}),tI((s,o)=>(s[o.outlet]=o.segment,s),{}),jB())}expandSegment(t,e,n,r,s,o){return Ni(n).pipe(ru(a=>this.expandSegmentAgainstRoute(t,e,n,a,r,s,o).pipe(jc(c=>{if(c instanceof EM)return mt(null);throw c}))),iu(a=>!!a),jc((a,l)=>{if(bI(a))return P3(e,r,s)?mt(new Tn([],{})):Vy(e);throw a}))}expandSegmentAgainstRoute(t,e,n,r,s,o,a){return k3(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):Vy(e):Vy(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("/")?F3(s):this.lineralizeSegments(n,s).pipe(rr(o=>{const a=new Tn(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:d}=wI(e,r,s);if(!a)return Vy(e);const h=this.applyRedirectCommands(l,r.redirectTo,d);return r.redirectTo.startsWith("/")?F3(h):this.lineralizeSegments(r,h).pipe(rr(p=>this.expandSegment(t,e,n,p.concat(c),o,!1)))}matchSegmentAgainstRoute(t,e,n,r,s){return"**"===n.path?(t=A3(n,t),n.loadChildren?(n._loadedRoutes?mt({routes:n._loadedRoutes,injector:n._loadedInjector}):this.configLoader.loadChildren(t,n)).pipe(tt(a=>(n._loadedRoutes=a.routes,n._loadedInjector=a.injector,new Tn(r,{})))):mt(new Tn(r,{}))):R3(e,n,r,t).pipe(ks(({matched:o,consumedSegments:a,remainingSegments:l})=>o?this.getChildConfig(t=n._injector??t,n,r).pipe(rr(d=>{const h=d.injector??t,p=d.routes,{segmentGroup:m,slicedSegments:g}=MM(e,a,l,p),b=new Tn(m.segments,m.children);if(0===g.length&&b.hasChildren())return this.expandChildren(h,p,b).pipe(tt(x=>new Tn(a,x)));if(0===p.length&&0===g.length)return mt(new Tn(a,{}));const v=ka(n)===s;return this.expandSegment(h,b,p,g,v?_n:s,!0).pipe(tt(M=>new Tn(a.concat(M.segments),M.children)))})):Vy(e)))}getChildConfig(t,e,n){return e.children?mt({routes:e.children,injector:t}):e.loadChildren?void 0!==e._loadedRoutes?mt({routes:e._loadedRoutes,injector:e._loadedInjector}):function bX(i,t,e,n){const r=t.canLoad;return void 0===r||0===r.length?mt(!0):mt(r.map(o=>{const a=xm(o,i);return ou(function oX(i){return i&&Uy(i.canLoad)}(a)?a.canLoad(t,e):i.runInContext(()=>a(t,e)))})).pipe(wm(),I3())}(t,e,n).pipe(rr(r=>r?this.configLoader.loadChildren(t,e).pipe(Vi(s=>{e._loadedRoutes=s.routes,e._loadedInjector=s.injector})):function AX(i){return pm(M3(SM,3))}())):mt({routes:[],injector:t})}lineralizeSegments(t,e){let n=[],r=e.root;for(;;){if(n=n.concat(r.segments),0===r.numberOfChildren)return mt(n);if(r.numberOfChildren>1||!r.children[_n])return t.redirectTo,pm(new pe(4e3,SM));r=r.children[_n]}}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 au(s,this.createQueryParams(e.queryParams,this.urlTree.queryParams),e.fragment)}createQueryParams(t,e){const n={};return os(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 os(e.children,(a,l)=>{o[l]=this.createSegmentGroup(t,a,n,r)}),new Tn(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 pe(4001,SM);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 RX{}class OX{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=MM(this.urlTree.root,[],[],this.config.filter(e=>void 0===e.redirectTo)).segmentGroup;return this.processSegmentGroup(this.injector,this.config,t,_n).pipe(tt(e=>{if(null===e)return null;const n=new yM([],Object.freeze({}),Object.freeze({...this.urlTree.queryParams}),this.urlTree.fragment,{},_n,this.rootComponentType,null,this.urlTree.root,-1,{}),r=new Yc(n,e),s=new b3(this.url,r);return this.inheritParamsAndData(s._root),s}))}inheritParamsAndData(t){const e=t.value,n=y3(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 Ni(Object.keys(n.children)).pipe(ru(r=>{const s=n.children[r],o=D3(e,r);return this.processSegmentGroup(t,o,s,r)}),tI((r,s)=>r&&s?(r.push(...s),r):null),YB(r=>null!==r),cM(null),jB(),tt(r=>{if(null===r)return null;const s=N3(r);return function FX(i){i.sort((t,e)=>t.value.outlet===_n?-1:e.value.outlet===_n?1:t.value.outlet.localeCompare(e.value.outlet))}(s),s}))}processSegment(t,e,n,r,s){return Ni(e).pipe(ru(o=>this.processSegmentAgainstRoute(o._injector??t,o,n,r,s)),iu(o=>!!o),jc(o=>{if(bI(o))return P3(n,r,s)?mt([]):mt(null);throw o}))}processSegmentAgainstRoute(t,e,n,r,s){if(e.redirectTo||!k3(e,n,r,s))return mt(null);let o;if("**"===e.path){const a=r.length>0?ZB(r).parameters:{},l=U3(n)+r.length;o=mt({snapshot:new yM(r,a,Object.freeze({...this.urlTree.queryParams}),this.urlTree.fragment,V3(e),ka(e),e.component??e._loadedComponent??null,e,B3(n),l,z3(e)),consumedSegments:[],remainingSegments:[]})}else o=R3(n,e,r,t).pipe(tt(({matched:a,consumedSegments:l,remainingSegments:c,parameters:d})=>{if(!a)return null;const h=U3(n)+l.length;return{snapshot:new yM(l,d,Object.freeze({...this.urlTree.queryParams}),this.urlTree.fragment,V3(e),ka(e),e.component??e._loadedComponent??null,e,B3(n),h,z3(e)),consumedSegments:l,remainingSegments:c}}));return o.pipe(ks(a=>{if(null===a)return mt(null);const{snapshot:l,consumedSegments:c,remainingSegments:d}=a;t=e._injector??t;const h=e._loadedInjector??t,p=function LX(i){return i.children?i.children:i.loadChildren?i._loadedRoutes:[]}(e),{segmentGroup:m,slicedSegments:g}=MM(n,c,d,p.filter(v=>void 0===v.redirectTo));if(0===g.length&&m.hasChildren())return this.processChildren(h,p,m).pipe(tt(v=>null===v?null:[new Yc(l,v)]));if(0===p.length&&0===g.length)return mt([new Yc(l,[])]);const b=ka(e)===s;return this.processSegment(h,p,m,g,b?_n:s).pipe(tt(v=>null===v?null:[new Yc(l,v)]))}))}}function NX(i){const t=i.value.routeConfig;return t&&""===t.path&&void 0===t.redirectTo}function N3(i){const t=[],e=new Set;for(const n of i){if(!NX(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=N3(n.children);t.push(new Yc(n.value,r))}return t.filter(n=>!e.has(n))}function B3(i){let t=i;for(;t._sourceSegment;)t=t._sourceSegment;return t}function U3(i){let t=i,e=t._segmentIndexShift??0;for(;t._sourceSegment;)t=t._sourceSegment,e+=t._segmentIndexShift??0;return e-1}function V3(i){return i.data||{}}function z3(i){return i.resolve||{}}function H3(i){return"string"==typeof i.title||null===i.title}function MI(i){return ks(t=>{const e=i(t);return e?Ni(e).pipe(tt(()=>t)):mt(t)})}const Mm=new me("ROUTES");let CI=(()=>{class i{constructor(){this.componentLoaders=new WeakMap,this.childrenLoaders=new WeakMap,this.compiler=Lt(gN)}loadComponent(e){if(this.componentLoaders.get(e))return this.componentLoaders.get(e);if(e._loadedComponent)return mt(e._loadedComponent);this.onLoadStartListener&&this.onLoadStartListener(e);const n=ou(e.loadComponent()).pipe(tt(G3),Vi(s=>{this.onLoadEndListener&&this.onLoadEndListener(e),e._loadedComponent=s}),su(()=>{this.componentLoaders.delete(e)})),r=new GB(n,()=>new Te).pipe(eI());return this.componentLoaders.set(e,r),r}loadChildren(e,n){if(this.childrenLoaders.get(n))return this.childrenLoaders.get(n);if(n._loadedRoutes)return mt({routes:n._loadedRoutes,injector:n._loadedInjector});this.onLoadStartListener&&this.onLoadStartListener(n);const s=this.loadModuleFactoryOrRoutes(n.loadChildren).pipe(tt(a=>{this.onLoadEndListener&&this.onLoadEndListener(n);let l,c,d=!1;Array.isArray(a)?c=a:(l=a.create(e).injector,c=KB(l.get(Mm,[],Ft.Self|Ft.Optional)));return{routes:c.map(yI),injector:l}}),su(()=>{this.childrenLoaders.delete(n)})),o=new GB(s,()=>new Te).pipe(eI());return this.childrenLoaders.set(n,o),o}loadModuleFactoryOrRoutes(e){return ou(e()).pipe(tt(G3),rr(n=>n instanceof T2||Array.isArray(n)?mt(n):Ni(this.compiler.compileModuleAsync(n))))}}return i.\u0275fac=function(e){return new(e||i)},i.\u0275prov=Pe({token:i,factory:i.\u0275fac,providedIn:"root"}),i})();function G3(i){return function WX(i){return i&&"object"==typeof i&&"default"in i}(i)?i.default:i}let DM=(()=>{class i{get hasRequestedNavigation(){return 0!==this.navigationId}constructor(){this.currentNavigation=null,this.lastSuccessfulNavigation=null,this.events=new Te,this.configLoader=Lt(CI),this.environmentInjector=Lt(io),this.urlSerializer=Lt(Ty),this.rootContexts=Lt(Fy),this.navigationId=0,this.afterPreactivation=()=>mt(void 0),this.rootComponentType=null,this.configLoader.onLoadEndListener=r=>this.events.next(new kq(r)),this.configLoader.onLoadStartListener=r=>this.events.next(new Rq(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 Qe({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:Py,restoredState:null,currentSnapshot:e.routerState.snapshot,targetSnapshot:null,currentRouterState:e.routerState,targetRouterState:null,guards:{canActivateChecks:[],canDeactivateChecks:[]},guardsResult:null}),this.transitions.pipe(gn(n=>0!==n.id),tt(n=>({...n,extractedUrl:e.urlHandlingStrategy.extract(n.rawUrl)})),ks(n=>{let r=!1,s=!1;return mt(n).pipe(Vi(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}}),ks(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 d="";return this.events.next(new vM(o.id,e.serializeUrl(n.rawUrl),d,0)),e.rawUrlTree=o.rawUrl,o.resolve(null),_o}if(e.urlHandlingStrategy.shouldProcessUrl(o.rawUrl))return W3(o.source)&&(e.browserUrlTree=o.extractedUrl),mt(o).pipe(ks(d=>{const h=this.transitions?.getValue();return this.events.next(new cI(d.id,this.urlSerializer.serialize(d.extractedUrl),d.source,d.restoredState)),h!==this.transitions?.getValue()?_o:Promise.resolve(d)}),function IX(i,t,e,n){return ks(r=>function DX(i,t,e,n,r){return new TX(i,t,e,n,r).apply()}(i,t,e,r.extractedUrl,n).pipe(tt(s=>({...r,urlAfterRedirects:s}))))}(this.environmentInjector,this.configLoader,this.urlSerializer,e.config),Vi(d=>{this.currentNavigation={...this.currentNavigation,finalUrl:d.urlAfterRedirects},n.urlAfterRedirects=d.urlAfterRedirects}),function UX(i,t,e,n,r){return rr(s=>function PX(i,t,e,n,r,s,o="emptyOnly"){return new OX(i,t,e,n,r,o,s).recognize().pipe(ks(a=>null===a?function kX(i){return new In(t=>t.error(i))}(new RX):mt(a)))}(i,t,e,s.urlAfterRedirects,n.serialize(s.urlAfterRedirects),n,r).pipe(tt(o=>({...s,targetSnapshot:o}))))}(this.environmentInjector,this.rootComponentType,e.config,this.urlSerializer,e.paramsInheritanceStrategy),Vi(d=>{if(n.targetSnapshot=d.targetSnapshot,"eager"===e.urlUpdateStrategy){if(!d.extras.skipLocationChange){const p=e.urlHandlingStrategy.merge(d.urlAfterRedirects,d.rawUrl);e.setBrowserUrl(p,d)}e.browserUrlTree=d.urlAfterRedirects}const h=new Eq(d.id,this.urlSerializer.serialize(d.extractedUrl),this.urlSerializer.serialize(d.urlAfterRedirects),d.targetSnapshot);this.events.next(h)}));if(l&&e.urlHandlingStrategy.shouldProcessUrl(e.rawUrlTree)){const{id:d,extractedUrl:h,source:p,restoredState:m,extras:g}=o,b=new cI(d,this.urlSerializer.serialize(h),p,m);this.events.next(b);const v=v3(h,this.rootComponentType).snapshot;return mt(n={...o,targetSnapshot:v,urlAfterRedirects:h,extras:{...g,skipLocationChange:!1,replaceUrl:!1}})}{const d="";return this.events.next(new vM(o.id,e.serializeUrl(n.extractedUrl),d,1)),e.rawUrlTree=o.rawUrl,o.resolve(null),_o}}),Vi(o=>{const a=new Aq(o.id,this.urlSerializer.serialize(o.extractedUrl),this.urlSerializer.serialize(o.urlAfterRedirects),o.targetSnapshot);this.events.next(a)}),tt(o=>n={...o,guards:tX(o.targetSnapshot,o.currentSnapshot,this.rootContexts)}),function hX(i,t){return rr(e=>{const{targetSnapshot:n,currentSnapshot:r,guards:{canActivateChecks:s,canDeactivateChecks:o}}=e;return 0===o.length&&0===s.length?mt({...e,guardsResult:!0}):function fX(i,t,e,n){return Ni(i).pipe(rr(r=>function yX(i,t,e,n,r){const s=t&&t.routeConfig?t.routeConfig.canDeactivate:null;return s&&0!==s.length?mt(s.map(a=>{const l=Ly(t)??r,c=xm(a,l);return ou(function cX(i){return i&&Uy(i.canDeactivate)}(c)?c.canDeactivate(i,t,e,n):l.runInContext(()=>c(i,t,e,n))).pipe(iu())})).pipe(wm()):mt(!0)}(r.component,r.route,e,t,n)),iu(r=>!0!==r,!0))}(o,n,r,i).pipe(rr(a=>a&&function sX(i){return"boolean"==typeof i}(a)?function pX(i,t,e,n){return Ni(t).pipe(ru(r=>Sy(function gX(i,t){return null!==i&&t&&t(new Pq(i)),mt(!0)}(r.route.parent,n),function mX(i,t){return null!==i&&t&&t(new Fq(i)),mt(!0)}(r.route,n),function vX(i,t,e){const n=t[t.length-1],s=t.slice(0,t.length-1).reverse().map(o=>function nX(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=>Ey(()=>mt(o.guards.map(l=>{const c=Ly(o.node)??e,d=xm(l,c);return ou(function lX(i){return i&&Uy(i.canActivateChild)}(d)?d.canActivateChild(n,i):c.runInContext(()=>d(n,i))).pipe(iu())})).pipe(wm())));return mt(s).pipe(wm())}(i,r.path,e),function _X(i,t,e){const n=t.routeConfig?t.routeConfig.canActivate:null;if(!n||0===n.length)return mt(!0);const r=n.map(s=>Ey(()=>{const o=Ly(t)??e,a=xm(s,o);return ou(function aX(i){return i&&Uy(i.canActivate)}(a)?a.canActivate(t,i):o.runInContext(()=>a(t,i))).pipe(iu())}));return mt(r).pipe(wm())}(i,r.route,e))),iu(r=>!0!==r,!0))}(n,s,i,t):mt(a)),tt(a=>({...e,guardsResult:a})))})}(this.environmentInjector,o=>this.events.next(o)),Vi(o=>{if(n.guardsResult=o.guardsResult,Ph(o.guardsResult))throw w3(0,o.guardsResult);const a=new Dq(o.id,this.urlSerializer.serialize(o.extractedUrl),this.urlSerializer.serialize(o.urlAfterRedirects),o.targetSnapshot,!!o.guardsResult);this.events.next(a)}),gn(o=>!!o.guardsResult||(e.restoreHistory(o),this.cancelNavigationTransition(o,"",3),!1)),MI(o=>{if(o.guards.canActivateChecks.length)return mt(o).pipe(Vi(a=>{const l=new Tq(a.id,this.urlSerializer.serialize(a.extractedUrl),this.urlSerializer.serialize(a.urlAfterRedirects),a.targetSnapshot);this.events.next(l)}),ks(a=>{let l=!1;return mt(a).pipe(function VX(i,t){return rr(e=>{const{targetSnapshot:n,guards:{canActivateChecks:r}}=e;if(!r.length)return mt(e);let s=0;return Ni(r).pipe(ru(o=>function zX(i,t,e,n){const r=i.routeConfig,s=i._resolve;return void 0!==r?.title&&!H3(r)&&(s[Ay]=r.title),function HX(i,t,e,n){const r=function $X(i){return[...Object.keys(i),...Object.getOwnPropertySymbols(i)]}(i);if(0===r.length)return mt({});const s={};return Ni(r).pipe(rr(o=>function GX(i,t,e,n){const r=Ly(t)??n,s=xm(i,r);return ou(s.resolve?s.resolve(t,e):r.runInContext(()=>s(t,e)))}(i[o],t,e,n).pipe(iu(),Vi(a=>{s[o]=a}))),nI(1),qB(s),jc(o=>bI(o)?_o:pm(o)))}(s,i,t,n).pipe(tt(o=>(i._resolvedData=o,i.data=y3(i,e).resolve,r&&H3(r)&&(i.data[Ay]=r.title),null)))}(o.route,n,i,t)),Vi(()=>s++),nI(1),rr(o=>s===r.length?mt(e):_o))})}(e.paramsInheritanceStrategy,this.environmentInjector),Vi({next:()=>l=!0,complete:()=>{l||(e.restoreHistory(a),this.cancelNavigationTransition(a,"",2))}}))}),Vi(a=>{const l=new Iq(a.id,this.urlSerializer.serialize(a.extractedUrl),this.urlSerializer.serialize(a.urlAfterRedirects),a.targetSnapshot);this.events.next(l)}))}),MI(o=>{const a=l=>{const c=[];l.routeConfig?.loadComponent&&!l.routeConfig._loadedComponent&&c.push(this.configLoader.loadComponent(l.routeConfig).pipe(Vi(d=>{l.component=d}),tt(()=>{})));for(const d of l.children)c.push(...a(d));return c};return Ra(a(o.targetSnapshot.root)).pipe(cM(),Oi(1))}),MI(()=>this.afterPreactivation()),tt(o=>{const a=function Gq(i,t,e){const n=Oy(i,t._root,e?e._root:void 0);return new _3(n,t)}(e.routeReuseStrategy,o.targetSnapshot,o.currentRouterState);return n={...o,targetRouterState:a}}),Vi(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)=>tt(n=>(new eX(t,n.targetRouterState,n.currentRouterState,e).activate(i),n)))(this.rootContexts,e.routeReuseStrategy,o=>this.events.next(o)),Oi(1),Vi({next:o=>{r=!0,this.lastSuccessfulNavigation=this.currentNavigation,e.navigated=!0,this.events.next(new Oh(o.id,this.urlSerializer.serialize(o.extractedUrl),this.urlSerializer.serialize(e.currentUrlTree))),e.titleStrategy?.updateTitle(o.targetRouterState.snapshot),o.resolve(!0)},complete:()=>{r=!0}}),su(()=>{r||s||this.cancelNavigationTransition(n,"",1),this.currentNavigation?.id===n.id&&(this.currentNavigation=null)}),jc(o=>{if(s=!0,S3(o)){C3(o)||(e.navigated=!0,e.restoreHistory(n,!0));const a=new _M(n.id,this.urlSerializer.serialize(n.extractedUrl),o.message,o.cancellationCode);if(this.events.next(a),C3(o)){const l=e.urlHandlingStrategy.merge(o.url,e.rawUrlTree),c={skipLocationChange:n.extras.skipLocationChange,replaceUrl:"eager"===e.urlUpdateStrategy||W3(n.source)};e.scheduleNavigation(l,Py,null,c,{resolve:n.resolve,reject:n.reject,promise:n.promise})}else n.resolve(!1)}else{e.restoreHistory(n,!0);const a=new dI(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 _o}))}))}cancelNavigationTransition(e,n,r){const s=new _M(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=Pe({token:i,factory:i.\u0275fac,providedIn:"root"}),i})();function W3(i){return i!==Py}let j3=(()=>{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===_n);return n}getResolvedTitleForRoute(e){return e.data[Ay]}}return i.\u0275fac=function(e){return new(e||i)},i.\u0275prov=Pe({token:i,factory:function(){return Lt(jX)},providedIn:"root"}),i})(),jX=(()=>{class i extends j3{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)(ee(NB))},i.\u0275prov=Pe({token:i,factory:i.\u0275fac,providedIn:"root"}),i})(),YX=(()=>{class i{}return i.\u0275fac=function(e){return new(e||i)},i.\u0275prov=Pe({token:i,factory:function(){return Lt(XX)},providedIn:"root"}),i})();class qX{shouldDetach(t){return!1}store(t,e){}shouldAttach(t){return!1}retrieve(t){return null}shouldReuseRoute(t,e){return t.routeConfig===e.routeConfig}}let XX=(()=>{class i extends qX{}return i.\u0275fac=function(){let t;return function(n){return(t||(t=si(i)))(n||i)}}(),i.\u0275prov=Pe({token:i,factory:i.\u0275fac,providedIn:"root"}),i})();const TM=new me("",{providedIn:"root",factory:()=>({})});let ZX=(()=>{class i{}return i.\u0275fac=function(e){return new(e||i)},i.\u0275prov=Pe({token:i,factory:function(){return Lt(QX)},providedIn:"root"}),i})(),QX=(()=>{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=Pe({token:i,factory:i.\u0275fac,providedIn:"root"}),i})();function JX(i){throw i}function eK(i,t,e){return t.parse("/")}const tK={paths:"exact",fragment:"ignored",matrixParams:"ignored",queryParams:"exact"},nK={paths:"subset",fragment:"ignored",matrixParams:"ignored",queryParams:"subset"};let Ko=(()=>{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=Lt(L6),this.isNgZoneEnabled=!1,this.options=Lt(TM,{optional:!0})||{},this.errorHandler=this.options.errorHandler||JX,this.malformedUriErrorHandler=this.options.malformedUriErrorHandler||eK,this.navigated=!1,this.lastSuccessfulId=-1,this.urlHandlingStrategy=Lt(ZX),this.routeReuseStrategy=Lt(YX),this.urlCreationStrategy=Lt(zq),this.titleStrategy=Lt(j3),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=KB(Lt(Mm,{optional:!0})??[]),this.navigationTransitions=Lt(DM),this.urlSerializer=Lt(Ty),this.location=Lt(_y),this.isNgZoneEnabled=Lt(gt)instanceof gt&>.isInAngularZone(),this.resetConfig(this.config),this.currentUrlTree=new au,this.rawUrlTree=this.currentUrlTree,this.browserUrlTree=this.currentUrlTree,this.routerState=v3(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),Py,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(yI),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 d=null;switch(a){case"merge":d={...this.currentUrlTree.queryParams,...s};break;case"preserve":d=this.currentUrlTree.queryParams;break;default:d=s||null}return null!==d&&(d=this.removeEmptyProps(d)),this.urlCreationStrategy.createUrlTree(r,this.routerState,this.currentUrlTree,e,d,c??null)}navigateByUrl(e,n={skipLocationChange:!1}){const r=Ph(e)?e:this.parseUrl(e),s=this.urlHandlingStrategy.merge(r,this.rawUrlTree);return this.scheduleNavigation(s,Py,null,n)}navigate(e,n={skipLocationChange:!1}){return function iK(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,d;return o?(a=o.resolve,l=o.reject,c=o.promise):c=new Promise((h,p)=>{a=h,l=p}),d="computed"===this.canceledNavigationResolution?r&&r.\u0275routerPageId?r.\u0275routerPageId:(this.browserPageId??0)+1:0,this.navigationTransitions.handleNavigationRequest({targetPageId:d,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=Pe({token:i,factory:i.\u0275fac,providedIn:"root"}),i})();class Y3{}let oK=(()=>{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(gn(e=>e instanceof Oh),ru(()=>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=Lw(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 Ni(r).pipe(bd())}preloadConfig(e,n){return this.preloadingStrategy.preload(n,()=>{let r;r=n.loadChildren&&void 0===n.canLoad?this.loader.loadChildren(e,n):mt(null);const s=r.pipe(rr(o=>null===o?mt(void 0):(n._loadedRoutes=o.routes,n._loadedInjector=o.injector,this.processRoutes(o.injector??e,o.routes))));return n.loadComponent&&!n._loadedComponent?Ni([s,this.loader.loadComponent(n)]).pipe(bd()):s})}}return i.\u0275fac=function(e){return new(e||i)(ee(Ko),ee(gN),ee(io),ee(Y3),ee(CI))},i.\u0275prov=Pe({token:i,factory:i.\u0275fac,providedIn:"root"}),i})();const AI=new me("");let q3=(()=>{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 cI?(this.store[this.lastId]=this.viewportScroller.getScrollPosition(),this.lastSource=e.navigationTrigger,this.restoredId=e.restoredState?e.restoredState.navigationId:0):e instanceof Oh&&(this.lastId=e.id,this.scheduleScrollEvent(e,this.urlSerializer.parse(e.urlAfterRedirects).fragment))})}consumeScrollEvents(){return this.transitions.events.subscribe(e=>{e instanceof m3&&(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 m3(e,"popstate"===this.lastSource?this.store[this.restoredId]:null,n))})},0)})}ngOnDestroy(){this.routerEventsSubscription?.unsubscribe(),this.scrollEventsSubscription?.unsubscribe()}}return i.\u0275fac=function(e){Co()},i.\u0275prov=Pe({token:i,factory:i.\u0275fac}),i})();var Zo=(()=>((Zo=Zo||{})[Zo.COMPLETE=0]="COMPLETE",Zo[Zo.FAILED=1]="FAILED",Zo[Zo.REDIRECTING=2]="REDIRECTING",Zo))();const Cm=!1;function lu(i,t){return{\u0275kind:i,\u0275providers:t}}const DI=new me("",{providedIn:"root",factory:()=>!1});function K3(){const i=Lt(Gi);return t=>{const e=i.get(dm);if(t!==e.components[0])return;const n=i.get(Ko),r=i.get(Z3);1===i.get(TI)&&n.initialNavigation(),i.get(Q3,null,Ft.Optional)?.setUpPreloading(),i.get(AI,null,Ft.Optional)?.init(),n.resetRootComponentType(e.componentTypes[0]),r.closed||(r.next(),r.complete(),r.unsubscribe())}}const Z3=new me(Cm?"bootstrap done indicator":"",{factory:()=>new Te}),TI=new me(Cm?"initial navigation":"",{providedIn:"root",factory:()=>1});function uK(){let i=[];return i=Cm?[{provide:Bp,multi:!0,useFactory:()=>{const t=Lt(Ko);return()=>t.events.subscribe(e=>{console.group?.(`Router Event: ${e.constructor.name}`),console.log(function Nq(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?.()})}}]:[],lu(1,i)}const Q3=new me(Cm?"router preloader":"");function hK(i){return lu(0,[{provide:Q3,useExisting:oK},{provide:Y3,useExisting:i}])}const zy=!1,J3=new me(zy?"router duplicate forRoot guard":"ROUTER_FORROOT_GUARD"),fK=[_y,{provide:Ty,useClass:iI},Ko,Fy,{provide:bm,useFactory:function X3(i){return i.routerState.root},deps:[Ko]},CI,zy?{provide:DI,useValue:!0}:[]];function pK(){return new CN("Router",Ko)}let eU=(()=>{class i{constructor(e){}static forRoot(e,n){return{ngModule:i,providers:[fK,zy&&n?.enableTracing?uK().\u0275providers:[],{provide:Mm,multi:!0,useValue:e},{provide:J3,useFactory:vK,deps:[[Ko,new Ss,new Ca]]},{provide:TM,useValue:n||{}},n?.useHash?{provide:Rh,useClass:C9}:{provide:Rh,useClass:YN},{provide:AI,useFactory:()=>{const i=Lt(UY),t=Lt(gt),e=Lt(TM),n=Lt(DM),r=Lt(Ty);return e.scrollOffset&&i.setOffset(e.scrollOffset),new q3(r,n,i,t,e)}},n?.preloadingStrategy?hK(n.preloadingStrategy).\u0275providers:[],{provide:CN,multi:!0,useFactory:pK},n?.initialNavigation?yK(n):[],[{provide:tU,useFactory:K3},{provide:MN,multi:!0,useExisting:tU}]]}}static forChild(e){return{ngModule:i,providers:[{provide:Mm,multi:!0,useValue:e}]}}}return i.\u0275fac=function(e){return new(e||i)(ee(J3,8))},i.\u0275mod=en({type:i}),i.\u0275inj=Wt({imports:[_I]}),i})();function vK(i){if(zy&&i)throw new pe(4007,"The Router was provided more than once. This can happen if 'forRoot' is used outside of the root injector. Lazy loaded modules should use RouterModule.forChild() instead.");return"guarded"}function yK(i){return["disabled"===i.initialNavigation?lu(3,[{provide:Vw,multi:!0,useFactory:()=>{const t=Lt(Ko);return()=>{t.setUpLocationChangeListener()}}},{provide:TI,useValue:2}]).\u0275providers:[],"enabledBlocking"===i.initialNavigation?lu(2,[{provide:TI,useValue:0},{provide:Vw,multi:!0,deps:[Gi],useFactory:t=>{const e=t.get(w9,Promise.resolve());return()=>e.then(()=>new Promise(n=>{const r=t.get(Ko),s=t.get(Z3);(function aK(i,t){i.events.pipe(gn(e=>e instanceof Oh||e instanceof _M||e instanceof dI||e instanceof vM),tt(e=>e instanceof Oh||e instanceof vM?Zo.COMPLETE:e instanceof _M&&(0===e.code||1===e.code)?Zo.REDIRECTING:Zo.FAILED),gn(e=>e!==Zo.REDIRECTING),Oi(1)).subscribe(()=>{t()})})(r,()=>{n(!0)}),t.get(DM).afterPreactivation=()=>(n(!0),s.closed?mt(void 0):s),r.initialNavigation()}))}}]).\u0275providers:[]]}const tU=new me(zy?"Router Initializer":""),xK=[];let wK=(()=>{class i{}return i.\u0275fac=function(e){return new(e||i)},i.\u0275mod=en({type:i}),i.\u0275inj=Wt({imports:[eU.forRoot(xK),eU]}),i})();function nU(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 nt(i){return function(){var t=this,e=arguments;return new Promise(function(n,r){var s=i.apply(t,e);function o(l){nU(s,n,r,o,a,"next",l)}function a(l){nU(s,n,r,o,a,"throw",l)}o(void 0)})}}function tn(i){return null!=i&&"false"!=`${i}`}function Ps(i,t=0){return function MK(i){return!isNaN(parseFloat(i))&&!isNaN(Number(i))}(i)?Number(i):t}function IM(i){return Array.isArray(i)?i:[i]}function _r(i){return null==i?"":"string"==typeof i?i:`${i}px`}function qc(i){return i instanceof vt?i.nativeElement:i}const CK=["addListener","removeListener"],SK=["addEventListener","removeEventListener"],EK=["on","off"];function To(i,t,e,n){if(dn(e)&&(n=e,e=void 0),n)return To(i,t,e).pipe(JT(n));const[r,s]=function TK(i){return dn(i.addEventListener)&&dn(i.removeEventListener)}(i)?SK.map(o=>a=>i[o](t,a,e)):function AK(i){return dn(i.addListener)&&dn(i.removeListener)}(i)?CK.map(iU(i,t)):function DK(i){return dn(i.on)&&dn(i.off)}(i)?EK.map(iU(i,t)):[];if(!r&&i_(i))return rr(o=>To(o,t,e))(Mr(i));if(!r)throw new TypeError("Invalid event target");return new In(o=>{const a=(...l)=>o.next(1s(a)})}function iU(i,t){return e=>n=>i[e](t,n)}class IK extends Qt{constructor(t,e){super()}schedule(t,e=0){return this}}const RM={setInterval(i,t,...e){const{delegate:n}=RM;return n?.setInterval?n.setInterval(i,t,...e):setInterval(i,t,...e)},clearInterval(i){const{delegate:t}=RM;return(t?.clearInterval||clearInterval)(i)},delegate:void 0};class II extends IK{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 RM.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&&RM.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,Kr(n,this),null!=t&&(this.id=this.recycleAsyncId(e,t,null)),this.delay=null,super.unsubscribe()}}}const Hy={schedule(i){let t=requestAnimationFrame,e=cancelAnimationFrame;const{delegate:n}=Hy;n&&(t=n.requestAnimationFrame,e=n.cancelAnimationFrame);const r=t(s=>{e=void 0,i(s)});return new Qt(()=>e?.(r))},requestAnimationFrame(...i){const{delegate:t}=Hy;return(t?.requestAnimationFrame||requestAnimationFrame)(...i)},cancelAnimationFrame(...i){const{delegate:t}=Hy;return(t?.cancelAnimationFrame||cancelAnimationFrame)(...i)},delegate:void 0},rU={now:()=>(rU.delegate||Date).now(),delegate:void 0};class $y{constructor(t,e=$y.now){this.schedulerActionCtor=t,this.now=e}schedule(t,e=0,n){return new this.schedulerActionCtor(this,t).schedule(n,e)}}$y.now=rU.now;class RI extends $y{constructor(t,e=$y.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 PK=new class kK extends RI{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 RK extends II{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=Hy.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&&(Hy.cancelAnimationFrame(e),t._scheduled=void 0)}});let kI,OK=1;const kM={};function sU(i){return i in kM&&(delete kM[i],!0)}const FK={setImmediate(i){const t=OK++;return kM[t]=!0,kI||(kI=Promise.resolve()),kI.then(()=>sU(t)&&i()),t},clearImmediate(i){sU(i)}},{setImmediate:LK,clearImmediate:NK}=FK,PM={setImmediate(...i){const{delegate:t}=PM;return(t?.setImmediate||LK)(...i)},clearImmediate(i){const{delegate:t}=PM;return(t?.clearImmediate||NK)(i)},delegate:void 0},PI=new class UK extends RI{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 BK extends II{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=PM.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&&(PM.clearImmediate(e),t._scheduled===e&&(t._scheduled=void 0))}}),Gy=new RI(II),VK=Gy;function OI(i=0,t,e=VK){let n=-1;return null!=t&&($u(t)?e=t:n=t),new In(r=>{let s=function HK(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 Wy(i,t=Gy){return function zK(i){return ni((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(qn(e,c=>{n=!0,r=c,s||Mr(i(c)).subscribe(s=qn(e,a,l))},()=>{o=!0,(!n||!s||s.closed)&&e.complete()}))})}(()=>OI(i,t))}function Ue(i){return ni((t,e)=>{Mr(i).subscribe(qn(e,()=>e.complete(),ms)),!e.closed&&t.subscribe(e)})}let FI;try{FI=typeof Intl<"u"&&Intl.v8BreakIterator}catch{FI=!1}let Sm,zi=(()=>{class i{constructor(e){this._platformId=e,this.isBrowser=this._platformId?function BY(i){return i===fB}(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&&!FI)&&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)(ee(fT))},i.\u0275prov=Pe({token:i,factory:i.\u0275fac,providedIn:"root"}),i})();const oU=["color","button","checkbox","date","datetime-local","email","file","hidden","image","month","number","password","radio","range","reset","search","submit","tel","text","time","url","week"];function aU(){if(Sm)return Sm;if("object"!=typeof document||!document)return Sm=new Set(oU),Sm;let i=document.createElement("input");return Sm=new Set(oU.filter(t=>(i.setAttribute("type",t),i.type===t))),Sm}let jy,OM,Lh,LI;function Fh(i){return function $K(){if(null==jy&&typeof window<"u")try{window.addEventListener("test",null,Object.defineProperty({},"passive",{get:()=>jy=!0}))}finally{jy=jy||!1}return jy}()?i:!!i.capture}function lU(){if(null==Lh){if("object"!=typeof document||!document||"function"!=typeof Element||!Element)return Lh=!1,Lh;if("scrollBehavior"in document.documentElement.style)Lh=!0;else{const i=Element.prototype.scrollTo;Lh=!!i&&!/\{\s*\[native code\]\s*\}/.test(i.toString())}}return Lh}function Yy(){if("object"!=typeof document||!document)return 0;if(null==OM){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),OM=0,0===i.scrollLeft&&(i.scrollLeft=1,OM=0===i.scrollLeft?1:2),i.remove()}return OM}function FM(){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 cu(i){return i.composedPath?i.composedPath()[0]:i.target}function NI(){return typeof __karma__<"u"&&!!__karma__||typeof jasmine<"u"&&!!jasmine||typeof jest<"u"&&!!jest||typeof Mocha<"u"&&!!Mocha}const jK=new me("cdk-dir-doc",{providedIn:"root",factory:function YK(){return Lt(qt)}}),qK=/^(ar|ckb|dv|he|iw|fa|nqo|ps|sd|ug|ur|yi|.*[-_](Adlm|Arab|Hebr|Nkoo|Rohg|Thaa))(?!.*[-_](Latn|Cyrl)($|-|_))($|-|_)/i;let Pa=(()=>{class i{constructor(e){this.value="ltr",this.change=new $e,e&&(this.value=function XK(i){const t=i?.toLowerCase()||"";return"auto"===t&&typeof navigator<"u"&&navigator?.language?qK.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)(ee(jK,8))},i.\u0275prov=Pe({token:i,factory:i.\u0275fac,providedIn:"root"}),i})(),qy=(()=>{class i{}return i.\u0275fac=function(e){return new(e||i)},i.\u0275mod=en({type:i}),i.\u0275inj=Wt({}),i})();const KK=["contentWrapper"],ZK=["*"],QK=new me("VIRTUAL_SCROLL_STRATEGY");let Xy=(()=>{class i{constructor(e,n,r){this._ngZone=e,this._platform=n,this._scrolled=new Te,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 In(n=>{this._globalSubscription||this._addGlobalListener();const r=e>0?this._scrolled.pipe(Wy(e)).subscribe(n):this._scrolled.subscribe(n);return this._scrolledCount++,()=>{r.unsubscribe(),this._scrolledCount--,this._scrolledCount||this._removeGlobalListener()}}):mt()}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(gn(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=qc(n),s=e.getElementRef().nativeElement;do{if(r==s)return!0}while(r=r.parentElement);return!1}_addGlobalListener(){this._globalSubscription=this._ngZone.runOutsideAngular(()=>To(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)(ee(gt),ee(zi),ee(qt,8))},i.\u0275prov=Pe({token:i,factory:i.\u0275fac,providedIn:"root"}),i})(),cU=(()=>{class i{constructor(e,n,r,s){this.elementRef=e,this.scrollDispatcher=n,this.ngZone=r,this.dir=s,this._destroyed=new Te,this._elementScrolled=new In(o=>this.ngZone.runOutsideAngular(()=>To(this.elementRef.nativeElement,"scroll").pipe(Ue(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!=Yy()?(null!=e.left&&(e.right=n.scrollWidth-n.clientWidth-e.left),2==Yy()?e.left=e.right:1==Yy()&&(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;lU()?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==Yy()?e==n?s.scrollWidth-s.clientWidth-s.scrollLeft:s.scrollLeft:o&&1==Yy()?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)(E(vt),E(Xy),E(gt),E(Pa,8))},i.\u0275dir=ve({type:i,selectors:[["","cdk-scrollable",""],["","cdkScrollable",""]],standalone:!0}),i})(),LM=(()=>{class i{constructor(e,n,r){this._platform=e,this._change=new Te,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(Wy(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)(ee(zi),ee(gt),ee(qt,8))},i.\u0275prov=Pe({token:i,factory:i.\u0275fac,providedIn:"root"}),i})();const dU=new me("VIRTUAL_SCROLLABLE");let tZ=(()=>{class i extends cU{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)(E(vt),E(Xy),E(gt),E(Pa,8))},i.\u0275dir=ve({type:i,features:[dt]}),i})();const iZ=typeof requestAnimationFrame<"u"?PK:PI;let rZ=(()=>{class i extends tZ{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=tn(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=Lt(zi),this._detachedSubject=new Te,this._renderedRangeSubject=new Te,this._orientation="vertical",this._appendOnly=!1,this.scrolledIndexChange=new In(d=>this._scrollStrategy.scrolledIndexChange.subscribe(h=>Promise.resolve().then(()=>this.ngZone.run(()=>d.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=Qt.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(Do(null),Wy(0,iZ)).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(Ue(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 nZ(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)(E(vt),E(Qn),E(gt),E(QK,8),E(Pa,8),E(Xy),E(LM),E(dU,8))},i.\u0275cmp=ot({type:i,selectors:[["cdk-virtual-scroll-viewport"]],viewQuery:function(e,n){if(1&e&&$n(KK,7),2&e){let r;At(r=Dt())&&(n._contentWrapper=r.first)}},hostAttrs:[1,"cdk-virtual-scroll-viewport"],hostVars:4,hostBindings:function(e,n){2&e&&ln("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:[Dn([{provide:cU,useFactory:(t,e)=>t||e,deps:[[new Ss,new xo(dU)],i]}]),dt,ZD],ngContentSelectors:ZK,decls:4,vars:4,consts:[[1,"cdk-virtual-scroll-content-wrapper"],["contentWrapper",""],[1,"cdk-virtual-scroll-spacer"]],template:function(e,n){1&e&&(or(),G(0,"div",0,1),Yt(2),j(),Ie(3,"div",2)),2&e&&(V(3),qo("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})(),Ky=(()=>{class i{}return i.\u0275fac=function(e){return new(e||i)},i.\u0275mod=en({type:i}),i.\u0275inj=Wt({}),i})(),uU=(()=>{class i{}return i.\u0275fac=function(e){return new(e||i)},i.\u0275mod=en({type:i}),i.\u0275inj=Wt({imports:[qy,Ky,rZ,qy,Ky]}),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 Nh 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 sZ extends BI{constructor(t){super(),this.element=t instanceof vt?t.nativeElement:t}}class NM{constructor(){this._isDisposed=!1,this.attachDomPortal=null}hasAttached(){return!!this._attachedPortal}attach(t){return t instanceof Nh?(this._attachedPortal=t,this.attachComponentPortal(t)):t instanceof Em?(this._attachedPortal=t,this.attachTemplatePortal(t)):this.attachDomPortal&&t instanceof sZ?(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 oZ extends NM{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||Gi.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 NM{constructor(e,n,r){super(),this._componentFactoryResolver=e,this._viewContainerRef=n,this._isInitialized=!1,this.attached=new $e,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)(E($l),E(jr),E(qt))},i.\u0275dir=ve({type:i,selectors:[["","cdkPortalOutlet",""]],inputs:{portal:["cdkPortalOutlet","portal"]},outputs:{attached:"attached"},exportAs:["cdkPortalOutlet"],features:[dt]}),i})(),Bh=(()=>{class i{}return i.\u0275fac=function(e){return new(e||i)},i.\u0275mod=en({type:i}),i.\u0275inj=Wt({}),i})();function Qo(i,...t){return t.length?t.some(e=>i[e]):i.altKey||i.shiftKey||i.ctrlKey||i.metaKey}const hU=lU();class bZ{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=_r(-this._previousScrollPosition.left),t.style.top=_r(-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"),hU&&(n.scrollBehavior=r.scrollBehavior="auto"),window.scroll(this._previousScrollPosition.left,this._previousScrollPosition.top),hU&&(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 xZ{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(gn(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 fU{enable(){}disable(){}attach(){}}function VI(i,t){return t.some(e=>i.bottome.bottom||i.righte.right)}function pU(i,t){return t.some(e=>i.tope.bottom||i.lefte.right)}class wZ{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();VI(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 MZ=(()=>{class i{constructor(e,n,r,s){this._scrollDispatcher=e,this._viewportRuler=n,this._ngZone=r,this.noop=()=>new fU,this.close=o=>new xZ(this._scrollDispatcher,this._ngZone,this._viewportRuler,o),this.block=()=>new bZ(this._viewportRuler,this._document),this.reposition=o=>new wZ(this._scrollDispatcher,this._viewportRuler,this._ngZone,o),this._document=s}}return i.\u0275fac=function(e){return new(e||i)(ee(Xy),ee(LM),ee(gt),ee(qt))},i.\u0275prov=Pe({token:i,factory:i.\u0275fac,providedIn:"root"}),i})();class km{constructor(t){if(this.scrollStrategy=new fU,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 CZ{constructor(t,e){this.connectionPair=t,this.scrollableViewProperties=e}}let mU=(()=>{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)(ee(qt))},i.\u0275prov=Pe({token:i,factory:i.\u0275fac,providedIn:"root"}),i})(),SZ=(()=>{class i extends mU{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)(ee(qt),ee(gt,8))},i.\u0275prov=Pe({token:i,factory:i.\u0275fac,providedIn:"root"}),i})(),EZ=(()=>{class i extends mU{constructor(e,n,r){super(e),this._platform=n,this._ngZone=r,this._cursorStyleIsSet=!1,this._pointerDownListener=s=>{this._pointerDownEventTarget=cu(s)},this._clickListener=s=>{const o=cu(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 d=l[c];if(d._outsidePointerEvents.observers.length<1||!d.hasAttached())continue;if(d.overlayElement.contains(o)||d.overlayElement.contains(a))break;const h=d._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)(ee(qt),ee(zi),ee(gt,8))},i.\u0275prov=Pe({token:i,factory:i.\u0275fac,providedIn:"root"}),i})(),VM=(()=>{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||NI()){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 Te,this._outsidePointerEvents=new Te,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(Oi(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=_r(this._config.width),t.height=_r(this._config.height),t.minWidth=_r(this._config.minWidth),t.minHeight=_r(this._config.minHeight),t.maxWidth=_r(this._config.maxWidth),t.maxHeight=_r(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=IM(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(Ue(Cr(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 gU="cdk-overlay-connected-position-bounding-box",AZ=/([A-Za-z%]+)$/;class DZ{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 Te,this._resizeSubscription=Qt.EMPTY,this._offsetX=0,this._offsetY=0,this._appliedPanelClasses=[],this.positionChanges=this._positionChanges,this.setOrigin(t)}attach(t){this._validatePositions(),t.hostElement.classList.add(gU),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),d=this._getOverlayFit(c,e,n,a);if(d.isCompletelyWithinViewport)return this._isPushed=!1,void this._applyPosition(a,l);this._canFitWithFlexibleDimensions(d,c,n)?s.push({position:a,origin:l,overlayRect:e,boundingBoxRect:this._calculateBoundingBoxRect(l,a)}):(!o||o.overlayFit.visibleAreal&&(l=d,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&&Uh(this._boundingBox.style,{top:"",left:"",right:"",bottom:"",height:"",width:"",alignItems:"",justifyContent:""}),this._pane&&this._resetOverlayElementStyles(),this._overlayRef&&this._overlayRef.hostElement.classList.remove(gU),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=vU(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=_U(this._overlayRef.getConfig().minHeight),a=_U(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=vU(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 d=0,h=0;return d=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,d=t.x-this._viewportMargin;else if("start"===e.overlayX&&!r||"end"===e.overlayX&&r)h=t.x,d=n.right-t.x;else{const m=Math.min(n.right-t.x+n.left,t.x),g=this._lastBoundingBoxSize.width;d=2*m,h=t.x-m,d>g&&!this._isInitialRender&&!this._growAfterOpen&&(h=t.x-g/2)}return{top:o,left:h,bottom:a,right:p,width:d,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=_r(n.height),r.top=_r(n.top),r.bottom=_r(n.bottom),r.width=_r(n.width),r.left=_r(n.left),r.right=_r(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=_r(s)),o&&(r.maxWidth=_r(o))}this._lastBoundingBoxSize=n,Uh(this._boundingBox.style,r)}_resetBoundingBoxStyles(){Uh(this._boundingBox.style,{top:"0",left:"0",right:"0",bottom:"0",height:"",width:"",alignItems:"",justifyContent:""})}_resetOverlayElementStyles(){Uh(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 d=this._viewportRuler.getViewportScrollPosition();Uh(n,this._getExactOverlayY(e,t,d)),Uh(n,this._getExactOverlayX(e,t,d))}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=_r(o.maxHeight):s&&(n.maxHeight="")),o.maxWidth&&(r?n.maxWidth=_r(o.maxWidth):s&&(n.maxWidth="")),Uh(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=_r(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=_r(s.x),r}_getScrollVisibility(){const t=this._getOriginRect(),e=this._pane.getBoundingClientRect(),n=this._scrollables.map(r=>r.getElementRef().nativeElement.getBoundingClientRect());return{isOriginClipped:pU(t,n),isOriginOutsideView:VI(t,n),isOverlayClipped:pU(e,n),isOverlayOutsideView:VI(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&&IM(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 vt)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 Uh(i,t){for(let e in t)t.hasOwnProperty(e)&&(i[e]=t[e]);return i}function _U(i){if("number"!=typeof i&&null!=i){const[t,e]=i.split(AZ);return e&&"px"!==e?null:parseFloat(t)}return i||null}function vU(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 yU="cdk-global-overlay-wrapper";class bU{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(yU),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),d=this._xPosition,h=this._xOffset,p="rtl"===this._overlayRef.getConfig().direction;let m="",g="",b="";l?b="flex-start":"center"===d?(b="center",p?g=h:m=h):p?"left"===d||"end"===d?(b="flex-end",m=h):("right"===d||"start"===d)&&(b="flex-start",g=h):"left"===d||"start"===d?(b="flex-start",m=h):("right"===d||"end"===d)&&(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(yU),n.justifyContent=n.alignItems=t.marginTop=t.marginBottom=t.marginLeft=t.marginRight=t.position="",this._overlayRef=null,this._isDisposed=!0}}let TZ=(()=>{class i{constructor(e,n,r,s){this._viewportRuler=e,this._document=n,this._platform=r,this._overlayContainer=s}global(){return new bU}flexibleConnectedTo(e){return new DZ(e,this._viewportRuler,this._document,this._platform,this._overlayContainer)}}return i.\u0275fac=function(e){return new(e||i)(ee(LM),ee(qt),ee(zi),ee(VM))},i.\u0275prov=Pe({token:i,factory:i.\u0275fac,providedIn:"root"}),i})(),IZ=0,as=(()=>{class i{constructor(e,n,r,s,o,a,l,c,d,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=d,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 Qy(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-"+IZ++,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(dm)),new oZ(e,this._componentFactoryResolver,this._appRef,this._injector,this._document)}}return i.\u0275fac=function(e){return new(e||i)(ee(MZ),ee(VM),ee($l),ee(TZ),ee(SZ),ee(Gi),ee(gt),ee(qt),ee(Pa),ee(_y),ee(EZ),ee(kr,8))},i.\u0275prov=Pe({token:i,factory:i.\u0275fac,providedIn:"root"}),i})();const RZ=[{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"}],xU=new me("cdk-connected-overlay-scroll-strategy");let zI=(()=>{class i{constructor(e){this.elementRef=e}}return i.\u0275fac=function(e){return new(e||i)(E(vt))},i.\u0275dir=ve({type:i,selectors:[["","cdk-overlay-origin",""],["","overlay-origin",""],["","cdkOverlayOrigin",""]],exportAs:["cdkOverlayOrigin"],standalone:!0}),i})(),wU=(()=>{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=tn(e)}get lockPosition(){return this._lockPosition}set lockPosition(e){this._lockPosition=tn(e)}get flexibleDimensions(){return this._flexibleDimensions}set flexibleDimensions(e){this._flexibleDimensions=tn(e)}get growAfterOpen(){return this._growAfterOpen}set growAfterOpen(e){this._growAfterOpen=tn(e)}get push(){return this._push}set push(e){this._push=tn(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=Qt.EMPTY,this._attachSubscription=Qt.EMPTY,this._detachSubscription=Qt.EMPTY,this._positionSubscription=Qt.EMPTY,this.viewportMargin=0,this.open=!1,this.disableClose=!1,this.backdropClick=new $e,this.positionChange=new $e,this.attach=new $e,this.detach=new $e,this.overlayKeydown=new $e,this.overlayOutsideClick=new $e,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=RZ);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&&!Qo(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 zI?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(YB(()=>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)(E(as),E(Eo),E(jr),E(xU),E(Pa,8))},i.\u0275dir=ve({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:[xi]}),i})();const PZ={provide:xU,deps:[as],useFactory:function kZ(i){return()=>i.scrollStrategies.reposition()}};let Pm=(()=>{class i{}return i.\u0275fac=function(e){return new(e||i)},i.\u0275mod=en({type:i}),i.\u0275inj=Wt({providers:[as,PZ],imports:[qy,Bh,uU,uU]}),i})();function gl(i,t=Gy){return ni((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,d=t.now();if(d{s=c,o=t.now(),r||(r=t.schedule(l,i),n.add(r))},()=>{a(),n.complete()},void 0,()=>{s=r=null}))})}function MU(i){return gn((t,e)=>i<=e)}function Ql(i,t=ja){return i=i??OZ,ni((e,n)=>{let r,s=!0;e.subscribe(qn(n,o=>{const a=t(o);(s||!i(r,a))&&(s=!1,r=a,n.next(o))}))})}function OZ(i,t){return i===t}let CU=(()=>{class i{create(e){return typeof MutationObserver>"u"?null:new MutationObserver(e)}}return i.\u0275fac=function(e){return new(e||i)},i.\u0275prov=Pe({token:i,factory:i.\u0275fac,providedIn:"root"}),i})(),FZ=(()=>{class i{constructor(e){this._mutationObserverFactory=e,this._observedElements=new Map}ngOnDestroy(){this._observedElements.forEach((e,n)=>this._cleanupObserver(n))}observe(e){const n=qc(e);return new In(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 Te,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)(ee(CU))},i.\u0275prov=Pe({token:i,factory:i.\u0275fac,providedIn:"root"}),i})(),SU=(()=>{class i{get disabled(){return this._disabled}set disabled(e){this._disabled=tn(e),this._disabled?this._unsubscribe():this._subscribe()}get debounce(){return this._debounce}set debounce(e){this._debounce=Ps(e),this._subscribe()}constructor(e,n,r){this._contentObserver=e,this._elementRef=n,this._ngZone=r,this.event=new $e,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(gl(this.debounce)):e).subscribe(this.event)})}_unsubscribe(){this._currentSubscription?.unsubscribe()}}return i.\u0275fac=function(e){return new(e||i)(E(FZ),E(vt),E(gt))},i.\u0275dir=ve({type:i,selectors:[["","cdkObserveContent",""]],inputs:{disabled:["cdkObserveContentDisabled","disabled"],debounce:"debounce"},outputs:{event:"cdkObserveContent"},exportAs:["cdkObserveContent"]}),i})(),HI=(()=>{class i{}return i.\u0275fac=function(e){return new(e||i)},i.\u0275mod=en({type:i}),i.\u0275inj=Wt({providers:[CU]}),i})();const EU=new Set;let Om,LZ=(()=>{class i{constructor(e){this._platform=e,this._matchMedia=this._platform.isBrowser&&window.matchMedia?window.matchMedia.bind(window):BZ}matchMedia(e){return(this._platform.WEBKIT||this._platform.BLINK)&&function NZ(i){if(!EU.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),EU.add(i))}catch(t){console.error(t)}}(e),this._matchMedia(e)}}return i.\u0275fac=function(e){return new(e||i)(ee(zi))},i.\u0275prov=Pe({token:i,factory:i.\u0275fac,providedIn:"root"}),i})();function BZ(i){return{matches:"all"===i||""===i,media:i,addListener:()=>{},removeListener:()=>{}}}let $I=(()=>{class i{constructor(e,n){this._mediaMatcher=e,this._zone=n,this._queries=new Map,this._destroySubject=new Te}ngOnDestroy(){this._destroySubject.next(),this._destroySubject.complete()}isMatched(e){return AU(IM(e)).some(r=>this._registerQuery(r).mql.matches)}observe(e){let s=Ra(AU(IM(e)).map(o=>this._registerQuery(o).observable));return s=Sy(s.pipe(Oi(1)),s.pipe(MU(1),gl(0))),s.pipe(tt(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 In(o=>{const a=l=>this._zone.run(()=>o.next(l));return n.addListener(a),()=>{n.removeListener(a)}}).pipe(Do(n),tt(({matches:o})=>({query:e,matches:o})),Ue(this._destroySubject)),mql:n};return this._queries.set(e,s),s}}return i.\u0275fac=function(e){return new(e||i)(ee(LZ),ee(gt))},i.\u0275prov=Pe({token:i,factory:i.\u0275fac,providedIn:"root"}),i})();function AU(i){return i.map(t=>t.split(",")).reduce((t,e)=>t.concat(e)).map(t=>t.trim())}function zM(i,t){return(i.getAttribute(t)||"").match(/\S+/g)||[]}const TU="cdk-describedby-message",HM="cdk-describedby-host";let GI=0,HZ=(()=>{class i{constructor(e,n){this._platform=n,this._messageRegistry=new Map,this._messagesContainer=null,this._id=""+GI++,this._document=e,this._id=Lt(cm)+"-"+GI++}describe(e,n,r){if(!this._canBeDescribed(e,n))return;const s=WI(n,r);"string"!=typeof n?(IU(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=WI(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(`[${HM}="${this._id}"]`);for(let n=0;n0!=r.indexOf(TU));e.setAttribute("aria-describedby",n.join(" "))}_addMessageReference(e,n){const r=this._messageRegistry.get(n);(function VZ(i,t,e){const n=zM(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(HM,this._id),r.referenceCount++}_removeMessageReference(e,n){const r=this._messageRegistry.get(n);r.referenceCount--,function zZ(i,t,e){const r=zM(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(HM)}_isElementDescribedByMessage(e,n){const r=zM(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)(ee(qt),ee(zi))},i.\u0275prov=Pe({token:i,factory:i.\u0275fac,providedIn:"root"}),i})();function WI(i,t){return"string"==typeof i?`${t||""}/${i}`:i}function IU(i,t){i.id||(i.id=`${TU}-${t}-${GI++}`)}class RU{constructor(t){this._items=t,this._activeItemIndex=-1,this._activeItem=null,this._wrap=!1,this._letterKeyStream=new Te,this._typeaheadSubscription=Qt.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 Te,this.change=new Te,t instanceof om&&(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(Vi(e=>this._pressedLetters.push(e)),gl(t),gn(()=>this._pressedLetters.length>0),tt(()=>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 om?this._items.toArray():this._items}}class $Z extends RU{setActiveItem(t){this.activeItem&&this.activeItem.setInactiveStyles(),super.setActiveItem(t),this.activeItem&&this.activeItem.setActiveStyles()}}class kU extends RU{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 $M=(()=>{class i{constructor(e){this._platform=e}isDisabled(e){return e.hasAttribute("disabled")}isVisible(e){return function WZ(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 GZ(i){try{return i.frameElement}catch{return null}}(function JZ(i){return i.ownerDocument&&i.ownerDocument.defaultView||window}(e));if(n&&(-1===OU(n)||!this.isVisible(n)))return!1;let r=e.nodeName.toLowerCase(),s=OU(e);return e.hasAttribute("contenteditable")?-1!==s:!("iframe"===r||"object"===r||this._platform.WEBKIT&&this._platform.IOS&&!function ZZ(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 QZ(i){return!function YZ(i){return function XZ(i){return"input"==i.nodeName.toLowerCase()}(i)&&"hidden"==i.type}(i)&&(function jZ(i){let t=i.nodeName.toLowerCase();return"input"===t||"select"===t||"button"===t||"textarea"===t}(i)||function qZ(i){return function KZ(i){return"a"==i.nodeName.toLowerCase()}(i)&&i.hasAttribute("href")}(i)||i.hasAttribute("contenteditable")||PU(i))}(e)&&!this.isDisabled(e)&&(n?.ignoreVisibility||this.isVisible(e))}}return i.\u0275fac=function(e){return new(e||i)(ee(zi))},i.\u0275prov=Pe({token:i,factory:i.\u0275fac,providedIn:"root"}),i})();function PU(i){if(!i.hasAttribute("tabindex")||void 0===i.tabIndex)return!1;let t=i.getAttribute("tabindex");return!(!t||isNaN(parseInt(t,10)))}function OU(i){if(!PU(i))return null;const t=parseInt(i.getAttribute("tabindex")||"",10);return isNaN(t)?-1:t}class eQ{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(Oi(1)).subscribe(t)}}let jI=(()=>{class i{constructor(e,n,r){this._checker=e,this._ngZone=n,this._document=r}create(e,n=!1){return new eQ(e,this._checker,this._ngZone,this._document,n)}}return i.\u0275fac=function(e){return new(e||i)(ee($M),ee(gt),ee(qt))},i.\u0275prov=Pe({token:i,factory:i.\u0275fac,providedIn:"root"}),i})();function YI(i){return 0===i.buttons||0===i.offsetX&&0===i.offsetY}function qI(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 tQ=new me("cdk-input-modality-detector-options"),nQ={ignoreKeys:[18,17,224,91,16]},Fm=Fh({passive:!0,capture:!0});let iQ=(()=>{class i{get mostRecentModality(){return this._modality.value}constructor(e,n,r,s){this._platform=e,this._mostRecentTarget=null,this._modality=new Qe(null),this._lastTouchMs=0,this._onKeydown=o=>{this._options?.ignoreKeys?.some(a=>a===o.keyCode)||(this._modality.next("keyboard"),this._mostRecentTarget=cu(o))},this._onMousedown=o=>{Date.now()-this._lastTouchMs<650||(this._modality.next(YI(o)?"keyboard":"mouse"),this._mostRecentTarget=cu(o))},this._onTouchstart=o=>{qI(o)?this._modality.next("keyboard"):(this._lastTouchMs=Date.now(),this._modality.next("touch"),this._mostRecentTarget=cu(o))},this._options={...nQ,...s},this.modalityDetected=this._modality.pipe(MU(1)),this.modalityChanged=this.modalityDetected.pipe(Ql()),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)(ee(zi),ee(gt),ee(qt),ee(tQ,8))},i.\u0275prov=Pe({token:i,factory:i.\u0275fac,providedIn:"root"}),i})();const rQ=new me("liveAnnouncerElement",{providedIn:"root",factory:function sQ(){return null}}),oQ=new me("LIVE_ANNOUNCER_DEFAULT_OPTIONS");let aQ=0,XI=(()=>{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 Te,this._rootNodeFocusAndBlurListener=a=>{for(let c=cu(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=qc(e);if(!this._platform.isBrowser||1!==r.nodeType)return mt(null);const s=function WK(i){if(function GK(){if(null==LI){const i=typeof document<"u"?document.head:null;LI=!(!i||!i.createShadowRoot&&!i.attachShadow)}return LI}()){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 Te,rootNode:s};return this._elementInfo.set(r,a),this._registerGlobalListeners(a),a.subject}stopMonitoring(e){const n=qc(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=qc(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=cu(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,GM),n.addEventListener("blur",this._rootNodeFocusAndBlurListener,GM)}),this._rootNodeFocusListenerCount.set(n,r+1),1==++this._monitoredElementCount&&(this._ngZone.runOutsideAngular(()=>{this._getWindow().addEventListener("focus",this._windowFocusListener)}),this._inputModalityDetector.modalityDetected.pipe(Ue(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,GM),n.removeEventListener("blur",this._rootNodeFocusAndBlurListener,GM),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=Lt($I).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,LU,NU),this._hasCheckedHighContrastMode=!0;const n=this.getHighContrastMode();1===n?e.add(KI,LU):2===n&&e.add(KI,NU)}}}return i.\u0275fac=function(e){return new(e||i)(ee(zi),ee(qt))},i.\u0275prov=Pe({token:i,factory:i.\u0275fac,providedIn:"root"}),i})(),UU=(()=>{class i{constructor(e){e._applyBodyHighContrastModeCssClasses()}}return i.\u0275fac=function(e){return new(e||i)(ee(BU))},i.\u0275mod=en({type:i}),i.\u0275inj=Wt({imports:[HI]}),i})();function cQ(i,t){}class WM{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 VU=(()=>{class i extends NM{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=d=>{this._portalOutlet.hasAttached();const h=this._portalOutlet.attachDomPortal(d);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=FM(),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=FM();return e===n||e.contains(n)}_initializeFocusTrap(){this._focusTrap=this._focusTrapFactory.create(this._elementRef.nativeElement),this._document&&(this._elementFocusedBeforeDialogWasOpened=FM())}_handleBackdropClicks(){this._overlayRef.backdropClick().subscribe(()=>{this._config.disableClose&&this._recaptureFocus()})}}return i.\u0275fac=function(e){return new(e||i)(E(vt),E(jI),E(qt,8),E(WM),E($M),E(gt),E(Qy),E(Xc))},i.\u0275cmp=ot({type:i,selectors:[["cdk-dialog-container"]],viewQuery:function(e,n){if(1&e&&$n(Am,7),2&e){let r;At(r=Dt())&&(n._portalOutlet=r.first)}},hostAttrs:["tabindex","-1",1,"cdk-dialog-container"],hostVars:6,hostBindings:function(e,n){2&e&&It("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:[dt],decls:1,vars:0,consts:[["cdkPortalOutlet",""]],template:function(e,n){1&e&&fe(0,cQ,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 ZI{constructor(t,e){this.overlayRef=t,this.config=e,this.closed=new Te,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&&!Qo(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 zU=new me("DialogScrollStrategy"),dQ=new me("DialogData"),uQ=new me("DefaultDialogConfig"),fQ={provide:zU,deps:[as],useFactory:function hQ(i){return()=>i.scrollStrategies.block()}};let pQ=0,HU=(()=>{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 Te,this._afterOpenedAtThisLevel=new Te,this._ariaHiddenElements=new Map,this.afterAllClosed=Ey(()=>this.openDialogs.length?this._getAfterAllClosed():this._getAfterAllClosed().pipe(Do(void 0))),this._scrollStrategy=a}open(e,n){(n={...this._defaultOptions||new WM,...n}).id=n.id||"cdk-dialog-"+pQ++,n.id&&this.getDialogById(n.id);const s=this._getOverlayConfig(n),o=this._overlay.create(s),a=new ZI(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(){QI(this.openDialogs,e=>e.close())}getDialogById(e){return this.openDialogs.find(n=>n.id===e)}ngOnDestroy(){QI(this._openDialogsAtThisLevel,e=>{!1===e.config.closeOnDestroy&&this._removeOpenDialog(e,!1)}),QI(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:WM,useValue:r},{provide:ZI,useValue:n},{provide:Qy,useValue:e}];let a;r.container?"function"==typeof r.container?a=r.container:(a=r.container.type,o.push(...r.container.providers(r))):a=VU;const l=new Nh(a,r.viewContainerRef,Gi.create({parent:s||this._injector,providers:o}),r.componentFactoryResolver);return e.attach(l).instance}_attachDialogContent(e,n,r,s){if(e instanceof Eo){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 Nh(e,s.viewContainerRef,o,s.componentFactoryResolver));n.componentInstance=a.instance}}_createInjector(e,n,r,s){const o=e.injector||e.viewContainerRef?.injector,a=[{provide:dQ,useValue:e.data},{provide:ZI,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(Pa,null,{optional:!0}))&&a.push({provide:Pa,useValue:{value:e.direction,change:mt()}}),Gi.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)(ee(as),ee(Gi),ee(uQ,8),ee(i,12),ee(VM),ee(zU))},i.\u0275prov=Pe({token:i,factory:i.\u0275fac}),i})();function QI(i,t){let e=i.length;for(;e--;)t(i[e])}let mQ=(()=>{class i{}return i.\u0275fac=function(e){return new(e||i)},i.\u0275mod=en({type:i}),i.\u0275inj=Wt({providers:[HU,fQ],imports:[Pm,Bh,UU,Bh]}),i})();const gQ=["text"];function _Q(i,t){if(1&i&&Ie(0,"mat-pseudo-checkbox",6),2&i){const e=re();U("state",e.selected?"checked":"unchecked")("disabled",e.disabled)}}function vQ(i,t){1&i&&Ie(0,"mat-pseudo-checkbox",7),2&i&&U("disabled",re().disabled)}function yQ(i,t){if(1&i&&(G(0,"span",8),Be(1),j()),2&i){const e=re();V(1),Qi("(",e.group.label,")")}}const bQ=[[["mat-icon"]],"*"],xQ=["mat-icon","*"],MQ=new me("mat-sanity-checks",{providedIn:"root",factory:function wQ(){return!0}});let Jn=(()=>{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!NI()&&("boolean"==typeof this._sanityChecks?this._sanityChecks:!!this._sanityChecks[e])}}return i.\u0275fac=function(e){return new(e||i)(ee(BU),ee(MQ,8),ee(qt))},i.\u0275mod=en({type:i}),i.\u0275inj=Wt({imports:[qy,qy]}),i})();function jM(i){return class extends i{get disabled(){return this._disabled}set disabled(t){this._disabled=tn(t)}constructor(...t){super(...t),this._disabled=!1}}}function Jy(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 YM(i){return class extends i{get disableRipple(){return this._disableRipple}set disableRipple(t){this._disableRipple=tn(t)}constructor(...t){super(...t),this._disableRipple=!1}}}function JI(i,t=0){return class extends i{get tabIndex(){return this.disabled?-1:this._tabIndex}set tabIndex(e){this._tabIndex=null!=e?Ps(e):this.defaultTabIndex}constructor(...e){super(...e),this._tabIndex=t,this.defaultTabIndex=t}}}function WU(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 CQ(i){return class extends i{constructor(...t){super(...t),this._isInitialized=!1,this._pendingSubscribers=[],this.initialized=new In(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 YU=(()=>{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=Pe({token:i,factory:i.\u0275fac,providedIn:"root"}),i})();class EQ{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 qU=Fh({passive:!0,capture:!0});class AQ{constructor(){this._events=new Map,this._delegateEventHandler=t=>{const e=cu(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,qU)})}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,qU)))}}const XU={enterDuration:225,exitDuration:150},KU=Fh({passive:!0,capture:!0}),ZU=["mousedown","touchstart"],QU=["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=qc(n))}fadeInRipple(t,e,n={}){const r=this._containerRect=this._containerRect||this._containerElement.getBoundingClientRect(),s={...XU,...n.animation};n.centered&&(t=r.left+r.width/2,e=r.top+r.height/2);const o=n.radius||function TQ(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,d=document.createElement("div");d.classList.add("mat-ripple-element"),d.style.left=a-o+"px",d.style.top=l-o+"px",d.style.height=2*o+"px",d.style.width=2*o+"px",null!=n.color&&(d.style.backgroundColor=n.color),d.style.transitionDuration=`${c}ms`,this._containerElement.appendChild(d);const h=window.getComputedStyle(d),m=h.transitionDuration,g="none"===h.transitionProperty||"0s"===m||"0s, 0s"===m||0===r.width&&0===r.height,b=new EQ(this,d,n,g);d.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);d.addEventListener("transitionend",y),d.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={...XU,...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=qc(t);!this._platform.isBrowser||!e||e===this._triggerElement||(this._removeTriggerEvents(),this._triggerElement=e,ZU.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(()=>{QU.forEach(e=>{this._triggerElement.addEventListener(e,this,KU)})}),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=YI(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&&(ZU.forEach(e=>Lm._eventManager.removeHandler(e,t,this)),this._pointerUpEventsRegistered&&QU.forEach(e=>t.removeEventListener(e,this,KU)))}}Lm._eventManager=new AQ;const eR=new me("mat-ripple-global-options");let Vh=(()=>{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)(E(vt),E(gt),E(zi),E(eR,8),E(kr,8))},i.\u0275dir=ve({type:i,selectors:[["","mat-ripple",""],["","matRipple",""]],hostAttrs:[1,"mat-ripple"],hostVars:2,hostBindings:function(e,n){2&e&&ln("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})(),tb=(()=>{class i{}return i.\u0275fac=function(e){return new(e||i)},i.\u0275mod=en({type:i}),i.\u0275inj=Wt({imports:[Jn,Jn]}),i})(),IQ=(()=>{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)(E(kr,8))},i.\u0275cmp=ot({type:i,selectors:[["mat-pseudo-checkbox"]],hostAttrs:[1,"mat-pseudo-checkbox"],hostVars:12,hostBindings:function(e,n){2&e&&ln("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})(),JU=(()=>{class i{}return i.\u0275fac=function(e){return new(e||i)},i.\u0275mod=en({type:i}),i.\u0275inj=Wt({imports:[Jn]}),i})();const eV=new me("MAT_OPTION_PARENT_COMPONENT"),tV=new me("MatOptgroup");let RQ=0;class kQ{constructor(t,e=!1){this.source=t,this.isUserInput=e}}let PQ=(()=>{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=tn(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-"+RQ++,this.onSelectionChange=new $e,this._stateChanges=new Te}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)&&!Qo(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 kQ(this,e))}}return i.\u0275fac=function(e){Co()},i.\u0275dir=ve({type:i,viewQuery:function(e,n){if(1&e&&$n(gQ,7),2&e){let r;At(r=Dt())&&(n._text=r.first)}},inputs:{value:"value",id:"id",disabled:"disabled"},outputs:{onSelectionChange:"onSelectionChange"}}),i})(),Nm=(()=>{class i extends PQ{constructor(e,n,r,s){super(e,n,r,s)}}return i.\u0275fac=function(e){return new(e||i)(E(vt),E(Qn),E(eV,8),E(tV,8))},i.\u0275cmp=ot({type:i,selectors:[["mat-option"]],hostAttrs:["role","option",1,"mat-mdc-option","mdc-list-item"],hostVars:11,hostBindings:function(e,n){1&e&&Oe("click",function(){return n._selectViaInteraction()})("keydown",function(s){return n._handleKeydown(s)}),2&e&&(ql("id",n.id),It("aria-selected",n.selected)("aria-disabled",n.disabled.toString()),ln("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:[dt],ngContentSelectors:xQ,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&&(or(bQ),fe(0,_Q,1,2,"mat-pseudo-checkbox",0),Yt(1),G(2,"span",1,2),Yt(4,1),j(),fe(5,vQ,1,1,"mat-pseudo-checkbox",3),fe(6,yQ,2,1,"span",4),Ie(7,"div",5)),2&e&&(U("ngIf",n.multiple),V(5),U("ngIf",!n.multiple&&n.selected&&!n.hideSingleSelectionIndicator),V(1),U("ngIf",n.group&&n.group._inert),V(1),U("matRippleTrigger",n._getHostElement())("matRippleDisabled",n.disabled||n.disableRipple))},dependencies:[Vh,_i,IQ],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})(),tR=(()=>{class i{}return i.\u0275fac=function(e){return new(e||i)},i.\u0275mod=en({type:i}),i.\u0275inj=Wt({imports:[tb,co,Jn,JU]}),i})();class nV{}class LQ{}const Kc="*";function Oa(i,t){return{type:7,name:i,definitions:t,options:{}}}function Yr(i,t=null){return{type:4,styles:t,timings:i}}function rV(i,t=null){return{type:2,steps:i,options:t}}function oi(i){return{type:6,styles:i,offset:null}}function Os(i,t,e){return{type:0,name:i,styles:t,options:e}}function sV(i){return{type:5,steps:i}}function Or(i,t,e=null){return{type:1,expr:i,animation:t,options:e}}function nR(i=null){return{type:9,options:i}}function iR(i,t,e=null){return{type:11,selector:i,animation:t,options:e}}function oV(i){Promise.resolve().then(i)}class nb{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(){oV(()=>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 aV{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?oV(()=>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 rR="!";function NQ(i,t){}class qM{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 sR="mdc-dialog--open",lV="mdc-dialog--opening",cV="mdc-dialog--closing";let VQ=(()=>{class i extends VU{constructor(e,n,r,s,o,a,l,c){super(e,n,r,s,o,a,l,c),this._animationStateChanged=new $e}_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)(E(vt),E(jI),E(qt,8),E(qM),E($M),E(gt),E(Qy),E(Xc))},i.\u0275cmp=ot({type:i,selectors:[["ng-component"]],features:[dt],decls:0,vars:0,template:function(e,n){},encapsulation:2}),i})();const dV="--mat-dialog-transition-duration";function uV(i){return null==i?null:"number"==typeof i?i:i.endsWith("ms")?Ps(i.substring(0,i.length-2)):i.endsWith("s")?1e3*Ps(i.substring(0,i.length-1)):"0"===i?0:null}let zQ=(()=>{class i extends VQ{constructor(e,n,r,s,o,a,l,c,d){super(e,n,r,s,o,a,l,d),this._animationMode=c,this._animationsEnabled="NoopAnimations"!==this._animationMode,this._hostElement=this._elementRef.nativeElement,this._openAnimationDuration=this._animationsEnabled?uV(this._config.enterAnimationDuration)??150:0,this._closeAnimationDuration=this._animationsEnabled?uV(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(dV,`${this._openAnimationDuration}ms`),this._requestAnimationFrame(()=>this._hostElement.classList.add(lV,sR)),this._waitForAnimationToComplete(this._openAnimationDuration,this._finishDialogOpen)):(this._hostElement.classList.add(sR),Promise.resolve().then(()=>this._finishDialogOpen()))}_startExitAnimation(){this._animationStateChanged.emit({state:"closing",totalTime:this._closeAnimationDuration}),this._hostElement.classList.remove(sR),this._animationsEnabled?(this._hostElement.style.setProperty(dV,`${this._openAnimationDuration}ms`),this._requestAnimationFrame(()=>this._hostElement.classList.add(cV)),this._waitForAnimationToComplete(this._closeAnimationDuration,this._finishDialogClose)):Promise.resolve().then(()=>this._finishDialogClose())}_clearAnimationClasses(){this._hostElement.classList.remove(lV,cV)}_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)(E(vt),E(jI),E(qt,8),E(qM),E($M),E(gt),E(Qy),E(kr,8),E(Xc))},i.\u0275cmp=ot({type:i,selectors:[["mat-dialog-container"]],hostAttrs:["tabindex","-1",1,"mat-mdc-dialog-container","mdc-dialog"],hostVars:8,hostBindings:function(e,n){2&e&&(ql("id",n._config.id),It("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),ln("_mat-animation-noopable",!n._animationsEnabled))},features:[dt],decls:3,vars:0,consts:[[1,"mdc-dialog__container"],[1,"mat-mdc-dialog-surface","mdc-dialog__surface"],["cdkPortalOutlet",""]],template:function(e,n){1&e&&(G(0,"div",0)(1,"div",1),fe(2,NQ,0,0,"ng-template",2),j()())},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 ib{constructor(t,e,n){this._ref=t,this._containerInstance=n,this._afterOpened=new Te,this._beforeClosed=new Te,this._state=0,this.disableClose=e.disableClose,this.id=t.id,n._animationStateChanged.pipe(gn(r=>"opened"===r.state),Oi(1)).subscribe(()=>{this._afterOpened.next(),this._afterOpened.complete()}),n._animationStateChanged.pipe(gn(r=>"closed"===r.state),Oi(1)).subscribe(()=>{clearTimeout(this._closeFallbackTimeout),this._finishDialogClose()}),t.overlayRef.detachments().subscribe(()=>{this._beforeClosed.next(this._result),this._beforeClosed.complete(),this._finishDialogClose()}),Cr(this.backdropClick(),this.keydownEvents().pipe(gn(r=>27===r.keyCode&&!this.disableClose&&!Qo(r)))).subscribe(r=>{this.disableClose||(r.preventDefault(),hV(this,"keydown"===r.type?"keyboard":"mouse"))})}close(t){this._result=t,this._containerInstance._animationStateChanged.pipe(gn(e=>"closing"===e.state),Oi(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 hV(i,t,e){return i._closeInteractionType=t,i.close(e)}const oR=new me("MatMdcDialogData"),HQ=new me("mat-mdc-dialog-default-options"),fV=new me("mat-mdc-dialog-scroll-strategy"),GQ={provide:fV,deps:[as],useFactory:function $Q(i){return()=>i.scrollStrategies.block()}};let WQ=0,jQ=(()=>{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,d,h){this._overlay=e,this._defaultOptions=r,this._parentDialog=s,this._dialogRefConstructor=l,this._dialogContainerType=c,this._dialogDataToken=d,this._openDialogsAtThisLevel=[],this._afterAllClosedAtThisLevel=new Te,this._afterOpenedAtThisLevel=new Te,this._idPrefix="mat-dialog-",this.dialogConfigClass=qM,this.afterAllClosed=Ey(()=>this.openDialogs.length?this._getAfterAllClosed():this._getAfterAllClosed().pipe(Do(void 0))),this._scrollStrategy=a,this._dialog=n.get(HU)}open(e,n){let r;(n={...this._defaultOptions||new qM,...n}).id=n.id||`${this._idPrefix}${WQ++}`,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:WM,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){Co()},i.\u0275prov=Pe({token:i,factory:i.\u0275fac}),i})(),Bm=(()=>{class i extends jQ{constructor(e,n,r,s,o,a,l,c){super(e,n,s,a,l,o,ib,zQ,oR,c),this._idPrefix="mat-mdc-dialog-"}}return i.\u0275fac=function(e){return new(e||i)(ee(as),ee(Gi),ee(_y,8),ee(HQ,8),ee(fV),ee(i,12),ee(VM),ee(kr,8))},i.\u0275prov=Pe({token:i,factory:i.\u0275fac}),i})(),YQ=0,qQ=(()=>{class i{constructor(e,n,r){this.dialogRef=e,this._elementRef=n,this._dialog=r,this.type="button"}ngOnInit(){this.dialogRef||(this.dialogRef=_V(this._elementRef,this._dialog.openDialogs))}ngOnChanges(e){const n=e._matDialogClose||e._matDialogCloseResult;n&&(this.dialogResult=n.currentValue)}_onButtonClick(e){hV(this.dialogRef,0===e.screenX&&0===e.screenY?"keyboard":"mouse",this.dialogResult)}}return i.\u0275fac=function(e){return new(e||i)(E(ib,8),E(vt),E(Bm))},i.\u0275dir=ve({type:i,selectors:[["","mat-dialog-close",""],["","matDialogClose",""]],hostVars:2,hostBindings:function(e,n){1&e&&Oe("click",function(s){return n._onButtonClick(s)}),2&e&&It("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:[xi]}),i})(),pV=(()=>{class i{constructor(e,n,r){this._dialogRef=e,this._elementRef=n,this._dialog=r,this.id="mat-mdc-dialog-title-"+YQ++}ngOnInit(){this._dialogRef||(this._dialogRef=_V(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)(E(ib,8),E(vt),E(Bm))},i.\u0275dir=ve({type:i,selectors:[["","mat-dialog-title",""],["","matDialogTitle",""]],hostAttrs:[1,"mat-mdc-dialog-title","mdc-dialog__title"],hostVars:1,hostBindings:function(e,n){2&e&&ql("id",n.id)},inputs:{id:"id"},exportAs:["matDialogTitle"]}),i})(),mV=(()=>{class i{}return i.\u0275fac=function(e){return new(e||i)},i.\u0275dir=ve({type:i,selectors:[["","mat-dialog-content",""],["mat-dialog-content"],["","matDialogContent",""]],hostAttrs:[1,"mat-mdc-dialog-content","mdc-dialog__content"]}),i})(),gV=(()=>{class i{constructor(){this.align="start"}}return i.\u0275fac=function(e){return new(e||i)},i.\u0275dir=ve({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&&ln("mat-mdc-dialog-actions-align-center","center"===n.align)("mat-mdc-dialog-actions-align-end","end"===n.align)},inputs:{align:"align"}}),i})();function _V(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 vV=(()=>{class i{}return i.\u0275fac=function(e){return new(e||i)},i.\u0275mod=en({type:i}),i.\u0275inj=Wt({providers:[Bm,GQ],imports:[mQ,Pm,Bh,Jn,Jn]}),i})();const XQ=["mat-button",""],bV=[[["",8,"material-icons",3,"iconPositionEnd",""],["mat-icon",3,"iconPositionEnd",""],["","matButtonIcon","",3,"iconPositionEnd",""]],"*",[["","iconPositionEnd","",8,"material-icons"],["mat-icon","iconPositionEnd",""],["","matButtonIcon","","iconPositionEnd",""]]],xV=[".material-icons:not([iconPositionEnd]), mat-icon:not([iconPositionEnd]), [matButtonIcon]:not([iconPositionEnd])","*",".material-icons[iconPositionEnd], mat-icon[iconPositionEnd], [matButtonIcon][iconPositionEnd]"],ZQ=["mat-mini-fab",""],JQ=["mat-icon-button",""],eJ=["*"],tJ=[{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"]}],nJ=Jy(jM(YM(class{constructor(i){this._elementRef=i}})));let aR=(()=>{class i extends nJ{constructor(e,n,r,s){super(e),this._platform=n,this._ngZone=r,this._animationMode=s,this._focusMonitor=Lt(Xc),this._isFab=!1;const o=e.nativeElement.classList;for(const a of tJ)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){Co()},i.\u0275dir=ve({type:i,viewQuery:function(e,n){if(1&e&&$n(Vh,5),2&e){let r;At(r=Dt())&&(n.ripple=r.first)}},features:[dt]}),i})(),rb=(()=>{class i extends aR{constructor(e,n,r,s){super(e,n,r,s)}}return i.\u0275fac=function(e){return new(e||i)(E(vt),E(zi),E(gt),E(kr,8))},i.\u0275cmp=ot({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&&(It("disabled",n.disabled||null),ln("_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:[dt],attrs:XQ,ngContentSelectors:xV,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&&(or(bV),Ie(0,"span",0),Yt(1),G(2,"span",1),Yt(3,1),j(),Yt(4,2),Ie(5,"span",2)(6,"span",3)(7,"span",4)),2&e&&(ln("mdc-button__ripple",!n._isFab)("mdc-fab__ripple",n._isFab),V(6),U("matRippleDisabled",n._isRippleDisabled())("matRippleTrigger",n._elementRef.nativeElement))},dependencies:[Vh],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 rJ=new me("mat-mdc-fab-default-options",{providedIn:"root",factory:wV});function wV(){return{color:"accent"}}const MV=wV();let CV=(()=>{class i extends aR{constructor(e,n,r,s,o){super(e,n,r,s),this._options=o,this._isFab=!0,this._options=this._options||MV,this.color=this.defaultColor=this._options.color||MV.color}}return i.\u0275fac=function(e){return new(e||i)(E(vt),E(zi),E(gt),E(kr,8),E(rJ,8))},i.\u0275cmp=ot({type:i,selectors:[["button","mat-mini-fab",""]],hostVars:7,hostBindings:function(e,n){2&e&&(It("disabled",n.disabled||null),ln("_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:[dt],attrs:ZQ,ngContentSelectors:xV,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&&(or(bV),Ie(0,"span",0),Yt(1),G(2,"span",1),Yt(3,1),j(),Yt(4,2),Ie(5,"span",2)(6,"span",3)(7,"span",4)),2&e&&(ln("mdc-button__ripple",!n._isFab)("mdc-fab__ripple",n._isFab),V(6),U("matRippleDisabled",n._isRippleDisabled())("matRippleTrigger",n._elementRef.nativeElement))},dependencies:[Vh],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})(),XM=(()=>{class i extends aR{constructor(e,n,r,s){super(e,n,r,s)}}return i.\u0275fac=function(e){return new(e||i)(E(vt),E(zi),E(gt),E(kr,8))},i.\u0275cmp=ot({type:i,selectors:[["button","mat-icon-button",""]],hostVars:7,hostBindings:function(e,n){2&e&&(It("disabled",n.disabled||null),ln("_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:[dt],attrs:JQ,ngContentSelectors:eJ,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&&(or(),Ie(0,"span",0),Yt(1),Ie(2,"span",1)(3,"span",2)(4,"span",3)),2&e&&(V(3),U("matRippleDisabled",n._isRippleDisabled())("matRippleCentered",!0)("matRippleTrigger",n._elementRef.nativeElement))},dependencies:[Vh],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})(),KM=(()=>{class i{}return i.\u0275fac=function(e){return new(e||i)},i.\u0275mod=en({type:i}),i.\u0275inj=Wt({imports:[Jn,tb,Jn]}),i})();const sJ=["class","dialog"];let SV=(()=>{class i{constructor(e,n){this.dialogRef=e,this.data=n}}return i.\u0275fac=function(e){return new(e||i)(E(ib),E(oR))},i.\u0275cmp=ot({type:i,selectors:[["app-confirm",8,"dialog"]],attrs:sJ,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&&(G(0,"h1",0),Be(1,"Confirmation"),j(),G(2,"div",1)(3,"p"),Be(4),j()(),G(5,"div",2)(6,"button",3),Oe("click",function(){return n.dialogRef.close()}),Be(7,"Cancel"),j(),G(8,"button",4),Be(9,"Yes"),j()()),2&e&&(V(4),ui(n.data.text),V(4),U("mat-dialog-close",!0))},dependencies:[rb,qQ,pV,mV,gV]}),i})();function lR(i,t){const e="object"==typeof t;return new Promise((n,r)=>{const s=new fa({next:o=>{n(o),s.unsubscribe()},error:r,complete:()=>{e?n(t.defaultValue):r(new fm)}});i.subscribe(s)})}let Jl=(()=>{class i{constructor(e){this.ngZone=e,this.openedResource$=new Qe(null),this.openedResourcePath$=new Qe(null),eel.expose(this.wrapHandler(this.openFile),"open_file"),eel.on_angular_ready(),setTimeout(nt(function*(){for(;;){if(eel._websocket){eel._websocket.onclose=()=>window.close();break}yield new Promise(n=>setTimeout(n,0))}}),0)}wrapHandler(e){return(...n)=>{try{gt.assertInAngularZone(),e.bind(this)(...n)}catch{this.ngZone.run(e,this,n)}}}openFile(e,n=!1){var r=this;return nt(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 nt(function*(){yield eel.open_file_with_system_app(e)()})()}retrieveValue(e){return nt(function*(){return yield eel.retrieve_value(e)()})()}runCustomAction(e,n,r){return nt(function*(){return eel.run_custom_action(e,n,r)()})()}saveFile(e){var n=this;return nt(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 nt(function*(){return eel.serialize_resource(e,n)()})()}serializeResourceTmp(e,n,r={}){return nt(function*(){return eel.serialize_resource_tmp(e,n,r)()})()}serializeReversible(e,n){return nt(function*(){return eel.serialize_reversible(e,n)()})()}deserializeResource(e){return nt(function*(){return eel.deserialize_resource(e)()})()}}return i.\u0275fac=function(e){return new(e||i)(ee(gt))},i.\u0275prov=Pe({token:i,factory:i.\u0275fac,providedIn:"root"}),i})();var cR=ps(489);const EV=i=>!(!i||"object"!=typeof i),AV=(i={},t,e,n=[])=>{const r=[];if(EV(i)){const s=Object.entries(i);for(let o=0;o{class i{constructor(e){var n=this;this.eelDelegate=e,this._hasUnsavedChanges$=new Qe(!1),this.resource$=new Qe(null),this.error$=new Qe(null),this.customActionRunning$=new Qe(!1),this.changedDataBlocks={},this.dataBlockChange$=new Te,this.hideHiddenFields$=new Qe(!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=AV(r.schema,"is_recursive_ref",!0);for(const[o,a]of s){const l=o.block_class_mro;let c=r.schema,d=c.block_class_mro===l?c:void 0;for(const h of a.slice(0,a.length-1))!d&&c[h]?.block_class_mro===l&&(d=c[h]),c=c[h];c[a[a.length-1]]=d}this.resource$.next(r),this.error$.next(null)}else this.resource$.next(null),this.error$.next(null)}),this.dataBlockChange$.subscribe(function(){var r=nt(function*([s,o]){n.changedDataBlocks[s]=o,n.updateUnsavedChanges();const a=yield n.eelDelegate.retrieveValue(s);n.changedDataBlocks[s]==o&&((0,cR.isNumber)(o)?Math.abs(o-a)<1e-10:(0,cR.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 nt(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 nt(function*(){return s.processExternalChanges(e,()=>s.eelDelegate.runCustomAction(e,n,r))})()}deserializeResource(e){var n=this;return nt(function*(){return n.processExternalChanges(e,()=>n.eelDelegate.deserializeResource(e))})()}reloadResource(){var e=this;return nt(function*(){const n=e.eelDelegate.openedResourcePath$.getValue();n&&e.eelDelegate.openFile(n,!0).then()})()}saveResource(){var e=this;return nt(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)(ee(Jl))},i.\u0275prov=Pe({token:i,factory:i.\u0275fac,providedIn:"root"}),i})();function oJ(i,t){if(1&i){const e=jn();G(0,"div",2)(1,"button",3),Oe("click",function(){return Vt(e),Et(re().action())}),Be(2),j()()}if(2&i){const e=re();V(2),Qi(" ",e.data.action," ")}}const aJ=["label"];function lJ(i,t){}const cJ=Math.pow(2,31)-1;class dR{constructor(t,e){this._overlayRef=e,this._afterDismissed=new Te,this._afterOpened=new Te,this._onAction=new Te,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,cJ))}_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 DV=new me("MatSnackBarData");class ZM{constructor(){this.politeness="assertive",this.announcementMessage="",this.duration=0,this.data=null,this.horizontalPosition="center",this.verticalPosition="bottom"}}let dJ=(()=>{class i{}return i.\u0275fac=function(e){return new(e||i)},i.\u0275dir=ve({type:i,selectors:[["","matSnackBarLabel",""]],hostAttrs:[1,"mat-mdc-snack-bar-label","mdc-snackbar__label"]}),i})(),uJ=(()=>{class i{}return i.\u0275fac=function(e){return new(e||i)},i.\u0275dir=ve({type:i,selectors:[["","matSnackBarActions",""]],hostAttrs:[1,"mat-mdc-snack-bar-actions","mdc-snackbar__actions"]}),i})(),hJ=(()=>{class i{}return i.\u0275fac=function(e){return new(e||i)},i.\u0275dir=ve({type:i,selectors:[["","matSnackBarAction",""]],hostAttrs:[1,"mat-mdc-snack-bar-action","mdc-snackbar__action"]}),i})(),fJ=(()=>{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)(E(dR),E(DV))},i.\u0275cmp=ot({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&&(G(0,"div",0),Be(1),j(),fe(2,oJ,3,1,"div",1)),2&e&&(V(1),Qi(" ",n.data.message,"\n"),V(1),U("ngIf",n.hasAction))},dependencies:[_i,rb,dJ,uJ,hJ],styles:[".mat-mdc-simple-snack-bar{display:flex}"],encapsulation:2,changeDetection:0}),i})();const pJ={snackBarState:Oa("state",[Os("void, hidden",oi({transform:"scale(0.8)",opacity:0})),Os("visible",oi({transform:"scale(1)",opacity:1})),Or("* => visible",Yr("150ms cubic-bezier(0, 0, 0.2, 1)")),Or("* => void, * => hidden",Yr("75ms cubic-bezier(0.4, 0.0, 1, 1)",oi({opacity:0})))])};let mJ=0,gJ=(()=>{class i extends NM{constructor(e,n,r,s,o){super(),this._ngZone=e,this._elementRef=n,this._changeDetectorRef=r,this._platform=s,this.snackBarConfig=o,this._document=Lt(qt),this._trackedModals=new Set,this._announceDelay=150,this._destroyed=!1,this._onAnnounce=new Te,this._onExit=new Te,this._onEnter=new Te,this._animationState="void",this._liveElementId="mat-snack-bar-container-live-"+mJ++,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(Oi(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)(E(gt),E(vt),E(Qn),E(zi),E(ZM))},i.\u0275dir=ve({type:i,viewQuery:function(e,n){if(1&e&&$n(Am,7),2&e){let r;At(r=Dt())&&(n._portalOutlet=r.first)}},features:[dt]}),i})(),_J=(()=>{class i extends gJ{_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=si(i)))(n||i)}}(),i.\u0275cmp=ot({type:i,selectors:[["mat-snack-bar-container"]],viewQuery:function(e,n){if(1&e&&$n(aJ,7),2&e){let r;At(r=Dt())&&(n._label=r.first)}},hostAttrs:[1,"mdc-snackbar","mat-mdc-snack-bar-container","mdc-snackbar--open"],hostVars:1,hostBindings:function(e,n){1&e&&ND("@state.done",function(s){return n.onAnimationEnd(s)}),2&e&&Rw("@state",n._animationState)},features:[dt],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&&(G(0,"div",0)(1,"div",1,2)(3,"div",3),fe(4,lJ,0,0,"ng-template",4),j(),Ie(5,"div"),j()()),2&e&&(V(5),It("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:[pJ.snackBarState]}}),i})(),TV=(()=>{class i{}return i.\u0275fac=function(e){return new(e||i)},i.\u0275mod=en({type:i}),i.\u0275inj=Wt({imports:[Pm,Bh,co,KM,Jn,Jn]}),i})();const IV=new me("mat-snack-bar-default-options",{providedIn:"root",factory:function vJ(){return new ZM}});let yJ=(()=>{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=Gi.create({parent:n&&n.viewContainerRef&&n.viewContainerRef.injector||this._injector,providers:[{provide:ZM,useValue:n}]}),o=new Nh(this.snackBarContainerComponent,n.viewContainerRef,s),a=e.attach(o);return a.instance.snackBarConfig=n,a.instance}_attach(e,n){const r={...new ZM,...this._defaultConfig,...n},s=this._createOverlay(r),o=this._attachSnackBarContainer(s,r),a=new dR(o,s);if(e instanceof Eo){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 Nh(e,void 0,l),d=o.attachComponentPortal(c);a.instance=d.instance}return this._breakpointObserver.observe("(max-width: 599.98px) and (orientation: portrait)").pipe(Ue(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 Gi.create({parent:e&&e.viewContainerRef&&e.viewContainerRef.injector||this._injector,providers:[{provide:dR,useValue:n},{provide:DV,useValue:e.data}]})}}return i.\u0275fac=function(e){return new(e||i)(ee(as),ee(XI),ee(Gi),ee($I),ee(i,12),ee(IV))},i.\u0275prov=Pe({token:i,factory:i.\u0275fac}),i})(),RV=(()=>{class i extends yJ{constructor(e,n,r,s,o,a){super(e,n,r,s,o,a),this.simpleSnackBarComponent=fJ,this.snackBarContainerComponent=_J,this.handsetCssClass="mat-mdc-snack-bar-handset"}}return i.\u0275fac=function(e){return new(e||i)(ee(as),ee(XI),ee(Gi),ee($I),ee(i,12),ee(IV))},i.\u0275prov=Pe({token:i,factory:i.\u0275fac,providedIn:TV}),i})();const bJ=["*",[["mat-toolbar-row"]]],xJ=["*","mat-toolbar-row"],wJ=Jy(class{constructor(i){this._elementRef=i}});let MJ=(()=>{class i{}return i.\u0275fac=function(e){return new(e||i)},i.\u0275dir=ve({type:i,selectors:[["mat-toolbar-row"]],hostAttrs:[1,"mat-toolbar-row"],exportAs:["matToolbarRow"]}),i})(),CJ=(()=>{class i extends wJ{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)(E(vt),E(zi),E(qt))},i.\u0275cmp=ot({type:i,selectors:[["mat-toolbar"]],contentQueries:function(e,n,r){if(1&e&&Wi(r,MJ,5),2&e){let s;At(s=Dt())&&(n._toolbarRows=s)}},hostAttrs:[1,"mat-toolbar"],hostVars:4,hostBindings:function(e,n){2&e&&ln("mat-toolbar-multiple-rows",n._toolbarRows.length>0)("mat-toolbar-single-row",0===n._toolbarRows.length)},inputs:{color:"color"},exportAs:["matToolbar"],features:[dt],ngContentSelectors:xJ,decls:2,vars:0,template:function(e,n){1&e&&(or(bJ),Yt(0),Yt(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})(),SJ=(()=>{class i{}return i.\u0275fac=function(e){return new(e||i)},i.\u0275mod=en({type:i}),i.\u0275inj=Wt({imports:[Jn,Jn]}),i})(),EJ=(()=>{class i{constructor(){this._vertical=!1,this._inset=!1}get vertical(){return this._vertical}set vertical(e){this._vertical=tn(e)}get inset(){return this._inset}set inset(e){this._inset=tn(e)}}return i.\u0275fac=function(e){return new(e||i)},i.\u0275cmp=ot({type:i,selectors:[["mat-divider"]],hostAttrs:["role","separator",1,"mat-divider"],hostVars:7,hostBindings:function(e,n){2&e&&(It("aria-orientation",n.vertical?"vertical":"horizontal"),ln("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})(),kV=(()=>{class i{}return i.\u0275fac=function(e){return new(e||i)},i.\u0275mod=en({type:i}),i.\u0275inj=Wt({imports:[Jn,Jn]}),i})();const AJ=["tooltip"],PV=new me("mat-tooltip-scroll-strategy"),IJ={provide:PV,deps:[as],useFactory:function TJ(i){return()=>i.scrollStrategies.reposition({scrollThrottle:20})}},kJ=new me("mat-tooltip-default-options",{providedIn:"root",factory:function RJ(){return{showDelay:0,hideDelay:0,touchendHideDelay:1500}}}),OV="tooltip-panel",FV=Fh({passive:!0});let BJ=(()=>{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=tn(e),this._detach(),this._overlayRef=null}get disabled(){return this._disabled}set disabled(e){this._disabled=tn(e),this._disabled?this.hide(0):this._setupPointerEnterEventsIfNeeded()}get showDelay(){return this._showDelay}set showDelay(e){this._showDelay=Ps(e)}get hideDelay(){return this._hideDelay}set hideDelay(e){this._hideDelay=Ps(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,d,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 Te,this._scrollStrategy=d,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(Ue(this._destroyed)).subscribe(()=>{this._overlayRef&&this._updatePosition(this._overlayRef)})}ngAfterViewInit(){this._viewInitialized=!0,this._setupPointerEnterEventsIfNeeded(),this._focusMonitor.monitor(this._elementRef).pipe(Ue(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,FV)}),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 Nh(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(Ue(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 vt)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(Ue(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}-${OV}`,scrollStrategy:this._scrollStrategy()}),this._updatePosition(this._overlayRef),this._overlayRef.detachments().pipe(Ue(this._destroyed)).subscribe(()=>this._detach()),this._overlayRef.outsidePointerEvents().pipe(Ue(this._destroyed)).subscribe(()=>this._tooltipInstance?._handleBodyInteraction()),this._overlayRef.keydownEvents().pipe(Ue(this._destroyed)).subscribe(s=>{this._isTooltipVisible()&&27===s.keyCode&&!Qo(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(Oi(1),Ue(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}-${OV}-`;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,FV)})}_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){Co()},i.\u0275dir=ve({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})(),Fs=(()=>{class i extends BJ{constructor(e,n,r,s,o,a,l,c,d,h,p,m){super(e,n,r,s,o,a,l,c,d,h,p,m),this._tooltipComponent=VJ,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)(E(as),E(vt),E(Xy),E(jr),E(gt),E(zi),E(HZ),E(Xc),E(PV),E(Pa,8),E(kJ,8),E(qt))},i.\u0275dir=ve({type:i,selectors:[["","matTooltip",""]],hostAttrs:[1,"mat-mdc-tooltip-trigger"],exportAs:["matTooltip"],features:[dt]}),i})(),UJ=(()=>{class i{constructor(e,n){this._changeDetectorRef=e,this._closeOnInteraction=!1,this._isVisible=!1,this._onHide=new Te,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)(E(Qn),E(kr,8))},i.\u0275dir=ve({type:i}),i})(),VJ=(()=>{class i extends UJ{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)(E(Qn),E(vt),E(kr,8))},i.\u0275cmp=ot({type:i,selectors:[["mat-tooltip-component"]],viewQuery:function(e,n){if(1&e&&$n(AJ,7),2&e){let r;At(r=Dt())&&(n._tooltip=r.first)}},hostAttrs:["aria-hidden","true"],hostVars:2,hostBindings:function(e,n){1&e&&Oe("mouseleave",function(s){return n._handleMouseLeave(s)}),2&e&&qo("zoom",n.isVisible()?1:null)},features:[dt],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&&(G(0,"div",0,1),Oe("animationend",function(s){return n._handleAnimationEnd(s)}),G(2,"div",2),Be(3),j()()),2&e&&(ln("mdc-tooltip--multiline",n._isMultiline),U("ngClass",n.tooltipClass),V(3),ui(n.message))},dependencies:[hm],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})(),LV=(()=>{class i{}return i.\u0275fac=function(e){return new(e||i)},i.\u0275mod=en({type:i}),i.\u0275inj=Wt({providers:[IJ],imports:[UU,co,Pm,Jn,Jn,Ky]}),i})();function NV(...i){const t=M0(i),{args:e,keys:n}=zB(i),r=new In(s=>{const{length:o}=e;if(!o)return void s.complete();const a=new Array(o);let l=o,c=o;for(let d=0;d{h||(h=!0,c--),a[d]=p},()=>l--,void 0,()=>{(!l||!h)&&(c||s.next(n?HB(n,a):a),s.complete())}))}});return t?r.pipe(JT(t)):r}class uR{}class uu{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 uu?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 uu;return e.lazyInit=this.lazyInit&&this.lazyInit instanceof uu?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 zJ{encodeKey(t){return UV(t)}encodeValue(t){return UV(t)}decodeKey(t){return decodeURIComponent(t)}decodeValue(t){return decodeURIComponent(t)}}const $J=/%(\d[a-f0-9])/gi,GJ={40:"@","3A":":",24:"$","2C":",","3B":";","3D":"=","3F":"?","2F":"/"};function UV(i){return encodeURIComponent(i).replace($J,(t,e)=>GJ[e]??t)}function QM(i){return`${i}`}class hu{constructor(t={}){if(this.updates=null,this.cloneFrom=null,this.encoder=t.encoder||new zJ,t.fromString){if(t.fromObject)throw new Error("Cannot specify both fromString and fromObject.");this.map=function HJ(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 hu({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 WJ{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 VV(i){return typeof ArrayBuffer<"u"&&i instanceof ArrayBuffer}function zV(i){return typeof Blob<"u"&&i instanceof Blob}function HV(i){return typeof FormData<"u"&&i instanceof FormData}class sb{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 jJ(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 uu),this.context||(this.context=new WJ),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 sb(e,n,s,{params:c,headers:l,context:d,reportProgress:a,responseType:r,withCredentials:o})}}var ls=(()=>((ls=ls||{})[ls.Sent=0]="Sent",ls[ls.UploadProgress=1]="UploadProgress",ls[ls.ResponseHeader=2]="ResponseHeader",ls[ls.DownloadProgress=3]="DownloadProgress",ls[ls.Response=4]="Response",ls[ls.User=5]="User",ls))();class qJ{constructor(t,e=200,n="OK"){this.headers=t.headers||new uu,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 hR extends qJ{constructor(t={}){super(t),this.type=ls.Response,this.body=void 0!==t.body?t.body:null}clone(t={}){return new hR({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 fR(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 pR=(()=>{class i{constructor(e){this.handler=e}request(e,n,r={}){let s;if(e instanceof sb)s=e;else{let l,c;l=r.headers instanceof uu?r.headers:new uu(r.headers),r.params&&(c=r.params instanceof hu?r.params:new hu({fromObject:r.params})),s=new sb(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=mt(s).pipe(ru(l=>this.handler.handle(l)));if(e instanceof sb||"events"===r.observe)return o;const a=o.pipe(gn(l=>l instanceof hR));switch(r.observe||"body"){case"body":switch(s.responseType){case"arraybuffer":return a.pipe(tt(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(tt(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(tt(l=>{if(null!==l.body&&"string"!=typeof l.body)throw new Error("Response is not a string.");return l.body}));default:return a.pipe(tt(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 hu).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,fR(r,n))}post(e,n,r={}){return this.request("POST",e,fR(r,n))}put(e,n,r={}){return this.request("PUT",e,fR(r,n))}}return i.\u0275fac=function(e){return new(e||i)(ee(uR))},i.\u0275prov=Pe({token:i,factory:i.\u0275fac}),i})();const aee=["*"];let eC;function ob(i){return function lee(){if(void 0===eC&&(eC=null,typeof window<"u")){const i=window;void 0!==i.trustedTypes&&(eC=i.trustedTypes.createPolicy("angular#components",{createHTML:t=>t}))}return eC}()?.createHTML(i)||i}function KV(i){return Error(`Unable to find icon with the name "${i}"`)}function ZV(i){return Error(`The URL provided to MatIconRegistry was not trusted as a resource URL via Angular's DomSanitizer. Attempted URL was "${i}".`)}function QV(i){return Error(`The literal provided to MatIconRegistry was not trusted as safe HTML by Angular's DomSanitizer. Attempted literal was "${i}".`)}class zh{constructor(t,e,n){this.url=t,this.svgText=e,this.options=n}}let tC=(()=>{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 zh(r,null,s))}addSvgIconResolver(e){return this._resolvers.push(e),this}addSvgIconLiteralInNamespace(e,n,r,s){const o=this._sanitizer.sanitize(Zn.HTML,r);if(!o)throw QV(r);const a=ob(o);return this._addSvgIconConfig(e,n,new zh("",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 zh(n,null,r))}addSvgIconSetLiteralInNamespace(e,n,r){const s=this._sanitizer.sanitize(Zn.HTML,n);if(!s)throw QV(n);const o=ob(s);return this._addSvgIconSetConfig(e,new zh("",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(Zn.RESOURCE_URL,e);if(!n)throw ZV(e);const r=this._cachedIconsByUrl.get(n);return r?mt(nC(r)):this._loadSvgIconFromConfig(new zh(e,null)).pipe(Vi(s=>this._cachedIconsByUrl.set(n,s)),tt(s=>nC(s)))}getNamedSvgIcon(e,n=""){const r=JV(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(KV(r))}ngOnDestroy(){this._resolvers=[],this._svgIconConfigs.clear(),this._iconSetConfigs.clear(),this._cachedIconsByUrl.clear()}_getSvgFromConfig(e){return e.svgText?mt(nC(this._svgElementFromConfig(e))):this._loadSvgIconFromConfig(e).pipe(tt(n=>nC(n)))}_getSvgFromIconSetConfigs(e,n){const r=this._extractIconWithNameFromAnySet(e,n);return r?mt(r):NV(n.filter(o=>!o.svgText).map(o=>this._loadSvgIconSetFromConfig(o).pipe(jc(a=>{const c=`Loading icon set URL: ${this._sanitizer.sanitize(Zn.RESOURCE_URL,o.url)} failed: ${a.message}`;return this._errorHandler.handleError(new Error(c)),mt(null)})))).pipe(tt(()=>{const o=this._extractIconWithNameFromAnySet(e,n);if(!o)throw KV(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(Vi(n=>e.svgText=n),tt(()=>this._svgElementFromConfig(e)))}_loadSvgIconSetFromConfig(e){return e.svgText?mt(null):this._fetchIcon(e).pipe(Vi(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(ob(""));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(ob("")),r=e.attributes;for(let s=0;sob(c)),su(()=>this._inProgressUrlFetches.delete(o)),Vf());return this._inProgressUrlFetches.set(o,l),l}_addSvgIconConfig(e,n,r){return this._svgIconConfigs.set(JV(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:""}}}),ez=["clip-path","color-profile","src","cursor","fill","filter","marker","marker-start","marker-mid","marker-end","mask","stroke"],gee=ez.map(i=>`[${i}]`).join(", "),_ee=/^url\(['"]?#(.*?)['"]?\)$/;let gR=(()=>{class i extends hee{get inline(){return this._inline}set inline(e){this._inline=tn(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=Qt.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(gee),r=this._elementsWithExternalReferences=this._elementsWithExternalReferences||new Map;for(let s=0;s{const a=n[s],l=a.getAttribute(o),c=l?l.match(_ee):null;if(c){let d=r.get(a);d||(d=[],r.set(a,d)),d.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(Oi(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)(E(vt),E(tC),wa("aria-hidden"),E(pee),E(cl),E(fee,8))},i.\u0275cmp=ot({type:i,selectors:[["mat-icon"]],hostAttrs:["role","img",1,"mat-icon","notranslate"],hostVars:8,hostBindings:function(e,n){2&e&&(It("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),ln("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:[dt],ngContentSelectors:aee,decls:1,vars:0,template:function(e,n){1&e&&(or(),Yt(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})(),tz=(()=>{class i{}return i.\u0275fac=function(e){return new(e||i)},i.\u0275mod=en({type:i}),i.\u0275inj=Wt({imports:[Jn,Jn]}),i})(),nz=(()=>{class i{constructor(e){this.viewContainerRef=e}}return i.\u0275fac=function(e){return new(e||i)(E(jr))},i.\u0275dir=ve({type:i,selectors:[["","dataBlockUI",""]]}),i})(),vee=(()=>{class i{constructor(){this.resource=null,this.name="",this.resourceDescription="",this.changed=new $e}}return i.\u0275fac=function(e){return new(e||i)},i.\u0275cmp=ot({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&&(G(0,"p",0),Be(1),j()),2&e&&(U("matTooltip",n.resourceDescription),V(1),Dh("",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:[Fs],changeDetection:0}),i})();function yee(i,t){if(1&i&&(G(0,"h2",4),Be(1),j()),2&i){const e=re();U("matTooltip",e.resourceDescription),V(1),ui(e.name)}}function bee(i,t){1&i&&Ie(0,"app-block-actions",5),2&i&&U("resource",re().resource)}const xee=function(i,t,e,n){return{id:i,name:t,data:e,schema:n}};function wee(i,t){if(1&i&&Ie(0,"app-editor",7),2&i){const e=re().$implicit,n=re();U("resource",N2(3,xee,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 Mee(i,t){if(1&i&&(Gr(0),fe(1,wee,1,8,"app-editor",6),ct(2,"async"),Wr()),2&i){const e=t.$implicit,n=re();V(1),U("ngIf",!(ut(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 ec=(()=>{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 $e,this.destroyed$=new Te}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(Ue(this.destroyed$),gn(([n,r])=>!!this.resource&&n.startsWith(this.resource.id)&&!n.substring(this.resource.id.length+1).includes("/"))).subscribe(function(){var n=nt(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)(E(Fa))},i.\u0275cmp=ot({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&&(fe(0,yee,2,2,"h2",0),ct(1,"async"),fe(2,bee,1,1,"app-block-actions",1),G(3,"div",2),fe(4,Mee,3,3,"ng-container",3),j()),2&e){let r;U("ngIf",n.name&&n.name!=(null==(r=ut(1,4,n.main.resource$))?null:r.name)),V(2),U("ngIf",!n.hideBlockActions),V(2),U("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})(),iz=(()=>{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)(E(ll),E(vt))},i.\u0275dir=ve({type:i}),i})(),Hh=(()=>{class i extends iz{}return i.\u0275fac=function(){let t;return function(n){return(t||(t=si(i)))(n||i)}}(),i.\u0275dir=ve({type:i,features:[dt]}),i})();const Io=new me("NgValueAccessor"),See={provide:Io,useExisting:Gn(()=>_l),multi:!0},Aee=new me("CompositionEventMode");let _l=(()=>{class i extends iz{constructor(e,n,r){super(e,n),this._compositionMode=r,this._composing=!1,null==this._compositionMode&&(this._compositionMode=!function Eee(){const i=$c()?$c().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)(E(ll),E(vt),E(Aee,8))},i.\u0275dir=ve({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&&Oe("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:[Dn([See]),dt]}),i})();const Dee=!1;function fu(i){return null==i||("string"==typeof i||Array.isArray(i))&&0===i.length}function sz(i){return null!=i&&"number"==typeof i.length}const qr=new me("NgValidators"),pu=new me("NgAsyncValidators"),Tee=/^(?=.{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 vl{static min(t){return oz(t)}static max(t){return az(t)}static required(t){return function lz(i){return fu(i.value)?{required:!0}:null}(t)}static requiredTrue(t){return function cz(i){return!0===i.value?null:{required:!0}}(t)}static email(t){return function dz(i){return fu(i.value)||Tee.test(i.value)?null:{email:!0}}(t)}static minLength(t){return uz(t)}static maxLength(t){return hz(t)}static pattern(t){return function fz(i){if(!i)return iC;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(fu(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 yz(t)}static composeAsync(t){return bz(t)}}function oz(i){return t=>{if(fu(t.value)||fu(i))return null;const e=parseFloat(t.value);return!isNaN(e)&&e{if(fu(t.value)||fu(i))return null;const e=parseFloat(t.value);return!isNaN(e)&&e>i?{max:{max:i,actual:t.value}}:null}}function uz(i){return t=>fu(t.value)||!sz(t.value)?null:t.value.lengthsz(t.value)&&t.value.length>i?{maxlength:{requiredLength:i,actualLength:t.value.length}}:null}function iC(i){return null}function pz(i){return null!=i}function mz(i){const t=oy(i)?Ni(i):i;if(Dee&&!LD(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 pe(-1101,e)}return t}function gz(i){let t={};return i.forEach(e=>{t=null!=e?{...t,...e}:t}),0===Object.keys(t).length?null:t}function _z(i,t){return t.map(e=>e(i))}function vz(i){return i.map(t=>function Iee(i){return!i.validate}(t)?t:e=>t.validate(e))}function yz(i){if(!i)return null;const t=i.filter(pz);return 0==t.length?null:function(e){return gz(_z(e,t))}}function _R(i){return null!=i?yz(vz(i)):null}function bz(i){if(!i)return null;const t=i.filter(pz);return 0==t.length?null:function(e){return NV(_z(e,t).map(mz)).pipe(tt(gz))}}function vR(i){return null!=i?bz(vz(i)):null}function xz(i,t){return null===i?[t]:Array.isArray(i)?[...i,t]:[i,t]}function wz(i){return i._rawValidators}function Mz(i){return i._rawAsyncValidators}function yR(i){return i?Array.isArray(i)?i:[i]:[]}function rC(i,t){return Array.isArray(i)?i.includes(t):i===t}function Cz(i,t){const e=yR(t);return yR(i).forEach(r=>{rC(e,r)||e.push(r)}),e}function Sz(i,t){return yR(t).filter(e=>!rC(i,e))}class Ez{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=_R(this._rawValidators)}_setAsyncValidators(t){this._rawAsyncValidators=t||[],this._composedAsyncValidatorFn=vR(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 uo extends Ez{get formDirective(){return null}get path(){return null}}class tc extends Ez{constructor(){super(...arguments),this._parent=null,this.name=null,this.valueAccessor=null}}class Az{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 nc=(()=>{class i extends Az{constructor(e){super(e)}}return i.\u0275fac=function(e){return new(e||i)(E(tc,2))},i.\u0275dir=ve({type:i,selectors:[["","formControlName",""],["","ngModel",""],["","formControl",""]],hostVars:14,hostBindings:function(e,n){2&e&&ln("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:[dt]}),i})(),bR=(()=>{class i extends Az{constructor(e){super(e)}}return i.\u0275fac=function(e){return new(e||i)(E(uo,10))},i.\u0275dir=ve({type:i,selectors:[["","formGroupName",""],["","formArrayName",""],["","ngModelGroup",""],["","formGroup",""],["form",3,"ngNoForm",""],["","ngForm",""]],hostVars:16,hostBindings:function(e,n){2&e&&ln("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:[dt]}),i})();function Dz(i,t){return i?`with name: '${t}'`:`at index: ${t}`}const MR=!1,ab="VALID",oC="INVALID",zm="PENDING",lb="DISABLED";function CR(i){return(aC(i)?i.validators:i)||null}function SR(i,t){return(aC(t)?t.asyncValidators:i)||null}function aC(i){return null!=i&&!Array.isArray(i)&&"object"==typeof i}function Tz(i,t,e){const n=i.controls;if(!(t?Object.keys(n):n).length)throw new pe(1e3,MR?function Oee(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 pe(1001,MR?function Fee(i,t){return`Cannot find form control ${Dz(i,t)}`}(t,e):"")}function Iz(i,t,e){i._forEachChild((n,r)=>{if(void 0===e[r])throw new pe(1002,MR?function Lee(i,t){return`Must supply a value for form control ${Dz(i,t)}`}(t,r):"")})}class lC{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===ab}get invalid(){return this.status===oC}get pending(){return this.status==zm}get disabled(){return this.status===lb}get enabled(){return this.status!==lb}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(Cz(t,this._rawValidators))}addAsyncValidators(t){this.setAsyncValidators(Cz(t,this._rawAsyncValidators))}removeValidators(t){this.setValidators(Sz(t,this._rawValidators))}removeAsyncValidators(t){this.setAsyncValidators(Sz(t,this._rawAsyncValidators))}hasValidator(t){return rC(this._rawValidators,t)}hasAsyncValidator(t){return rC(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=lb,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=ab,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===ab||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()?lb:ab}_runValidator(){return this.validator?this.validator(this):null}_runAsyncValidator(t){if(this.asyncValidator){this.status=zm,this._hasOwnPendingAsyncValidator=!0;const e=mz(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 $e,this.statusChanges=new $e}_calculateStatus(){return this._allControlsDisabled()?lb:this.errors?oC:this._hasOwnPendingAsyncValidator||this._anyControlsHaveStatus(zm)?zm:this._anyControlsHaveStatus(oC)?oC:ab}_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){aC(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 Nee(i){return Array.isArray(i)?_R(i):i||null}(this._rawValidators)}_assignAsyncValidators(t){this._rawAsyncValidators=Array.isArray(t)?t.slice():t,this._composedAsyncValidatorFn=function Bee(i){return Array.isArray(i)?vR(i):i||null}(this._rawAsyncValidators)}}class Hm extends lC{constructor(t,e,n){super(CR(e),SR(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={}){Iz(this,!0,t),Object.keys(t).forEach(n=>{Tz(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 Rz extends Hm{}const $h=new me("CallSetDisabledState",{providedIn:"root",factory:()=>cb}),cb="always";function cC(i,t){return[...t.path,i]}function db(i,t,e=cb){ER(i,t),t.valueAccessor.writeValue(i.value),(i.disabled||"always"===e)&&t.valueAccessor.setDisabledState?.(i.disabled),function Vee(i,t){t.valueAccessor.registerOnChange(e=>{i._pendingValue=e,i._pendingChange=!0,i._pendingDirty=!0,"change"===i.updateOn&&kz(i,t)})}(i,t),function Hee(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 zee(i,t){t.valueAccessor.registerOnTouched(()=>{i._pendingTouched=!0,"blur"===i.updateOn&&i._pendingChange&&kz(i,t),"submit"!==i.updateOn&&i.markAsTouched()})}(i,t),function Uee(i,t){if(t.valueAccessor.setDisabledState){const e=n=>{t.valueAccessor.setDisabledState(n)};i.registerOnDisabledChange(e),t._registerOnDestroy(()=>{i._unregisterOnDisabledChange(e)})}}(i,t)}function dC(i,t,e=!0){const n=()=>{};t.valueAccessor&&(t.valueAccessor.registerOnChange(n),t.valueAccessor.registerOnTouched(n)),hC(i,t),i&&(t._invokeOnDestroyCallbacks(),i._registerOnCollectionChange(()=>{}))}function uC(i,t){i.forEach(e=>{e.registerOnValidatorChange&&e.registerOnValidatorChange(t)})}function ER(i,t){const e=wz(i);null!==t.validator?i.setValidators(xz(e,t.validator)):"function"==typeof e&&i.setValidators([e]);const n=Mz(i);null!==t.asyncValidator?i.setAsyncValidators(xz(n,t.asyncValidator)):"function"==typeof n&&i.setAsyncValidators([n]);const r=()=>i.updateValueAndValidity();uC(t._rawValidators,r),uC(t._rawAsyncValidators,r)}function hC(i,t){let e=!1;if(null!==i){if(null!==t.validator){const r=wz(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=Mz(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 uC(t._rawValidators,n),uC(t._rawAsyncValidators,n),e}function kz(i,t){i._pendingDirty&&i.markAsDirty(),i.setValue(i._pendingValue,{emitModelToViewChange:!1}),t.viewToModelUpdate(i._pendingValue),i._pendingChange=!1}function Pz(i,t){ER(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 Oz(i,t){i._syncPendingControls(),t.forEach(e=>{const n=e.control;"submit"===n.updateOn&&n._pendingChange&&(e.viewToModelUpdate(n._pendingValue),n._pendingChange=!1)})}function TR(i,t){if(!t)return null;let e,n,r;return Array.isArray(t),t.forEach(s=>{s.constructor===_l?e=s:function Wee(i){return Object.getPrototypeOf(i.constructor)===Hh}(s)?n=s:r=s}),r||n||e||null}const Yee={provide:uo,useExisting:Gn(()=>hb)},ub=(()=>Promise.resolve())();let hb=(()=>{class i extends uo{constructor(e,n,r){super(),this.callSetDisabledState=r,this.submitted=!1,this._directives=new Set,this.ngSubmit=new $e,this.form=new Hm({},_R(e),vR(n))}ngAfterViewInit(){this._setUpdateStrategy()}get formDirective(){return this}get control(){return this.form}get path(){return[]}get controls(){return this.form.controls}addControl(e){ub.then(()=>{const n=this._findContainer(e.path);e.control=n.registerControl(e.name,e.control),db(e.control,e,this.callSetDisabledState),e.control.updateValueAndValidity({emitEvent:!1}),this._directives.add(e)})}getControl(e){return this.form.get(e.path)}removeControl(e){ub.then(()=>{const n=this._findContainer(e.path);n&&n.removeControl(e.name),this._directives.delete(e)})}addFormGroup(e){ub.then(()=>{const n=this._findContainer(e.path),r=new Hm({});Pz(r,e),n.registerControl(e.name,r),r.updateValueAndValidity({emitEvent:!1})})}removeFormGroup(e){ub.then(()=>{const n=this._findContainer(e.path);n&&n.removeControl(e.name)})}getFormGroup(e){return this.form.get(e.path)}updateModel(e,n){ub.then(()=>{this.form.get(e.path).setValue(n)})}setValue(e){this.control.setValue(e)}onSubmit(e){return this.submitted=!0,Oz(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)(E(qr,10),E(pu,10),E($h,8))},i.\u0275dir=ve({type:i,selectors:[["form",3,"ngNoForm","",3,"formGroup",""],["ng-form"],["","ngForm",""]],hostBindings:function(e,n){1&e&&Oe("submit",function(s){return n.onSubmit(s)})("reset",function(){return n.onReset()})},inputs:{options:["ngFormOptions","options"]},outputs:{ngSubmit:"ngSubmit"},exportAs:["ngForm"],features:[Dn([Yee]),dt]}),i})();function Fz(i,t){const e=i.indexOf(t);e>-1&&i.splice(e,1)}function Lz(i){return"object"==typeof i&&null!==i&&2===Object.keys(i).length&&"value"in i&&"disabled"in i}const ic=class extends lC{constructor(t=null,e,n){super(CR(e),SR(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}),aC(e)&&(e.nonNullable||e.initialValueIsDefault)&&(this.defaultValue=Lz(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){Fz(this._onChange,t)}registerOnDisabledChange(t){this._onDisabledChange.push(t)}_unregisterOnDisabledChange(t){Fz(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){Lz(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}},Kee={provide:tc,useExisting:Gn(()=>Zc)},Uz=(()=>Promise.resolve())();let Zc=(()=>{class i extends tc{constructor(e,n,r,s,o,a){super(),this._changeDetectorRef=o,this.callSetDisabledState=a,this.control=new ic,this._registered=!1,this.update=new $e,this._parent=e,this._setValidators(n),this._setAsyncValidators(r),this.valueAccessor=TR(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(){db(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){Uz.then(()=>{this.control.setValue(e,{emitViewToModelChange:!1}),this._changeDetectorRef?.markForCheck()})}_updateDisabled(e){const n=e.isDisabled.currentValue,r=0!==n&&function um(i){return"boolean"==typeof i?i:null!=i&&"false"!==i}(n);Uz.then(()=>{r&&!this.control.disabled?this.control.disable():!r&&this.control.disabled&&this.control.enable(),this._changeDetectorRef?.markForCheck()})}_getPath(e){return this._parent?cC(e,this._parent):[e]}}return i.\u0275fac=function(e){return new(e||i)(E(uo,9),E(qr,10),E(pu,10),E(Io,10),E(Qn,8),E($h,8))},i.\u0275dir=ve({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:[Dn([Kee]),dt,xi]}),i})(),IR=(()=>{class i{}return i.\u0275fac=function(e){return new(e||i)},i.\u0275dir=ve({type:i,selectors:[["form",3,"ngNoForm","",3,"ngNativeValidate",""]],hostAttrs:["novalidate",""]}),i})();const Zee={provide:Io,useExisting:Gn(()=>mu),multi:!0};let mu=(()=>{class i extends Hh{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=si(i)))(n||i)}}(),i.\u0275dir=ve({type:i,selectors:[["input","type","number","formControlName",""],["input","type","number","formControl",""],["input","type","number","ngModel",""]],hostBindings:function(e,n){1&e&&Oe("input",function(s){return n.onChange(s.target.value)})("blur",function(){return n.onTouched()})},features:[Dn([Zee]),dt]}),i})(),Vz=(()=>{class i{}return i.\u0275fac=function(e){return new(e||i)},i.\u0275mod=en({type:i}),i.\u0275inj=Wt({}),i})();const RR=new me("NgModelWithFormControlWarning"),nte={provide:uo,useExisting:Gn(()=>Gh)};let Gh=(()=>{class i extends uo{constructor(e,n,r){super(),this.callSetDisabledState=r,this.submitted=!1,this._onCollectionChange=()=>this._updateDomValue(),this.directives=[],this.form=null,this.ngSubmit=new $e,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&&(hC(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 db(n,e,this.callSetDisabledState),n.updateValueAndValidity({emitEvent:!1}),this.directives.push(e),n}getControl(e){return this.form.get(e.path)}removeControl(e){dC(e.control||null,e,!1),function jee(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,Oz(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&&(dC(n||null,e),(i=>i instanceof ic)(r)&&(db(r,e,this.callSetDisabledState),e.control=r))}),this.form._updateTreeValidity({emitEvent:!1})}_setUpFormContainer(e){const n=this.form.get(e.path);Pz(n,e),n.updateValueAndValidity({emitEvent:!1})}_cleanUpFormContainer(e){if(this.form){const n=this.form.get(e.path);n&&function $ee(i,t){return hC(i,t)}(n,e)&&n.updateValueAndValidity({emitEvent:!1})}}_updateRegistrations(){this.form._registerOnCollectionChange(this._onCollectionChange),this._oldForm&&this._oldForm._registerOnCollectionChange(()=>{})}_updateValidators(){ER(this.form,this),this._oldForm&&hC(this._oldForm,this)}_checkFormPresent(){}}return i.\u0275fac=function(e){return new(e||i)(E(qr,10),E(pu,10),E($h,8))},i.\u0275dir=ve({type:i,selectors:[["","formGroup",""]],hostBindings:function(e,n){1&e&&Oe("submit",function(s){return n.onSubmit(s)})("reset",function(){return n.onReset()})},inputs:{form:["formGroup","form"]},outputs:{ngSubmit:"ngSubmit"},exportAs:["ngForm"],features:[Dn([nte]),dt,xi]}),i})();const ste={provide:tc,useExisting:Gn(()=>fC)};let fC=(()=>{class i extends tc{set isDisabled(e){}constructor(e,n,r,s,o){super(),this._ngModelWarningConfig=o,this._added=!1,this.update=new $e,this._ngModelWarningSent=!1,this._parent=e,this._setValidators(n),this._setAsyncValidators(r),this.valueAccessor=TR(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 cC(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)(E(uo,13),E(qr,10),E(pu,10),E(Io,10),E(RR,8))},i.\u0275dir=ve({type:i,selectors:[["","formControlName",""]],inputs:{name:["formControlName","name"],isDisabled:["disabled","isDisabled"],model:["ngModel","model"]},outputs:{update:"ngModelChange"},features:[Dn([ste]),dt,xi]}),i})();function Yz(i){return"number"==typeof i?i:parseInt(i,10)}function qz(i){return"number"==typeof i?i:parseFloat(i)}let Wh=(()=>{class i{constructor(){this._validator=iC}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):iC,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=ve({type:i,features:[xi]}),i})();const hte={provide:qr,useExisting:Gn(()=>gu),multi:!0};let gu=(()=>{class i extends Wh{constructor(){super(...arguments),this.inputName="max",this.normalizeInput=e=>qz(e),this.createValidator=e=>az(e)}}return i.\u0275fac=function(){let t;return function(n){return(t||(t=si(i)))(n||i)}}(),i.\u0275dir=ve({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&&It("max",n._enabled?n.max:null)},inputs:{max:"max"},features:[Dn([hte]),dt]}),i})();const fte={provide:qr,useExisting:Gn(()=>_u),multi:!0};let _u=(()=>{class i extends Wh{constructor(){super(...arguments),this.inputName="min",this.normalizeInput=e=>qz(e),this.createValidator=e=>oz(e)}}return i.\u0275fac=function(){let t;return function(n){return(t||(t=si(i)))(n||i)}}(),i.\u0275dir=ve({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&&It("min",n._enabled?n.min:null)},inputs:{min:"min"},features:[Dn([fte]),dt]}),i})();const _te={provide:qr,useExisting:Gn(()=>NR),multi:!0};let NR=(()=>{class i extends Wh{constructor(){super(...arguments),this.inputName="minlength",this.normalizeInput=e=>Yz(e),this.createValidator=e=>uz(e)}}return i.\u0275fac=function(){let t;return function(n){return(t||(t=si(i)))(n||i)}}(),i.\u0275dir=ve({type:i,selectors:[["","minlength","","formControlName",""],["","minlength","","formControl",""],["","minlength","","ngModel",""]],hostVars:1,hostBindings:function(e,n){2&e&&It("minlength",n._enabled?n.minlength:null)},inputs:{minlength:"minlength"},features:[Dn([_te]),dt]}),i})();const vte={provide:qr,useExisting:Gn(()=>BR),multi:!0};let BR=(()=>{class i extends Wh{constructor(){super(...arguments),this.inputName="maxlength",this.normalizeInput=e=>Yz(e),this.createValidator=e=>hz(e)}}return i.\u0275fac=function(){let t;return function(n){return(t||(t=si(i)))(n||i)}}(),i.\u0275dir=ve({type:i,selectors:[["","maxlength","","formControlName",""],["","maxlength","","formControl",""],["","maxlength","","ngModel",""]],hostVars:1,hostBindings:function(e,n){2&e&&It("maxlength",n._enabled?n.maxlength:null)},inputs:{maxlength:"maxlength"},features:[Dn([vte]),dt]}),i})(),Qz=(()=>{class i{}return i.\u0275fac=function(e){return new(e||i)},i.\u0275mod=en({type:i}),i.\u0275inj=Wt({imports:[Vz]}),i})();class Jz extends lC{constructor(t,e,n){super(CR(e),SR(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={}){Iz(this,!1,t),t.forEach((n,r)=>{Tz(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 eH(i){return!!i&&(void 0!==i.asyncValidators||void 0!==i.validators||void 0!==i.updateOn)}let bte=(()=>{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 eH(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 Rz(r,n)}control(e,n,r){let s={};return this.useNonNullable?(eH(n)?s=n:(s.validators=n,s.asyncValidators=r),new ic(e,{...s,nonNullable:!0})):new ic(e,n,r)}array(e,n,r){const s=e.map(o=>this._createControl(o));return new Jz(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 ic||e instanceof lC?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=Pe({token:i,factory:i.\u0275fac,providedIn:"root"}),i})(),tH=(()=>{class i{static withConfig(e){return{ngModule:i,providers:[{provide:$h,useValue:e.callSetDisabledState??cb}]}}}return i.\u0275fac=function(e){return new(e||i)},i.\u0275mod=en({type:i}),i.\u0275inj=Wt({imports:[Qz]}),i})(),nH=(()=>{class i{static withConfig(e){return{ngModule:i,providers:[{provide:RR,useValue:e.warnOnNgModelWithFormControl??"always"},{provide:$h,useValue:e.callSetDisabledState??cb}]}}}return i.\u0275fac=function(e){return new(e||i)},i.\u0275mod=en({type:i}),i.\u0275inj=Wt({imports:[Qz]}),i})();const xte=["matFormFieldNotchedOutline",""],wte=["*"],Mte=["textField"],Cte=["iconPrefixContainer"],Ste=["textPrefixContainer"];function Ete(i,t){1&i&&Ie(0,"span",19)}function Ate(i,t){if(1&i){const e=jn();G(0,"label",17),Oe("cdkObserveContent",function(){return Vt(e),Et(re(2)._refreshOutlineNotchWidth())}),Yt(1,1),fe(2,Ete,1,0,"span",18),j()}if(2&i){const e=re(2);U("floating",e._shouldLabelFloat())("cdkObserveContentDisabled",!e._hasOutline())("id",e._labelId),It("for",e._control.id)("aria-owns",e._control.id),V(2),U("ngIf",!e.hideRequiredMarker&&e._control.required)}}function Dte(i,t){1&i&&fe(0,Ate,3,6,"label",16),2&i&&U("ngIf",re()._hasFloatingLabel())}function Tte(i,t){1&i&&Ie(0,"div",20)}function Ite(i,t){}function Rte(i,t){1&i&&fe(0,Ite,0,0,"ng-template",22),2&i&&(re(2),U("ngTemplateOutlet",Zi(1)))}function kte(i,t){if(1&i&&(G(0,"div",21),fe(1,Rte,1,1,"ng-template",9),j()),2&i){const e=re();U("matFormFieldNotchedOutlineOpen",e._shouldLabelFloat())("matFormFieldNotchedOutlineLabelWidth",e._labelWidth),V(1),U("ngIf",!e._forceDisplayInfixLabel())}}function Pte(i,t){1&i&&(G(0,"div",23,24),Yt(2,2),j())}function Ote(i,t){1&i&&(G(0,"div",25,26),Yt(2,3),j())}function Fte(i,t){}function Lte(i,t){1&i&&fe(0,Fte,0,0,"ng-template",22),2&i&&(re(),U("ngTemplateOutlet",Zi(1)))}function Nte(i,t){1&i&&(G(0,"div",27),Yt(1,4),j())}function Bte(i,t){1&i&&(G(0,"div",28),Yt(1,5),j())}function Ute(i,t){1&i&&Ie(0,"div",29)}function Vte(i,t){1&i&&(G(0,"div",30),Yt(1,6),j()),2&i&&U("@transitionMessages",re()._subscriptAnimationState)}function zte(i,t){if(1&i&&(G(0,"mat-hint",34),Be(1),j()),2&i){const e=re(2);U("id",e._hintLabelId),V(1),ui(e.hintLabel)}}function Hte(i,t){if(1&i&&(G(0,"div",31),fe(1,zte,2,2,"mat-hint",32),Yt(2,7),Ie(3,"div",33),Yt(4,8),j()),2&i){const e=re();U("@transitionMessages",e._subscriptAnimationState),V(1),U("ngIf",e.hintLabel)}}const $te=["*",[["mat-label"]],[["","matPrefix",""],["","matIconPrefix",""]],[["","matTextPrefix",""]],[["","matTextSuffix",""]],[["","matSuffix",""],["","matIconSuffix",""]],[["mat-error"],["","matError",""]],[["mat-hint",3,"align","end"]],[["mat-hint","align","end"]]],Gte=["*","mat-label","[matPrefix], [matIconPrefix]","[matTextPrefix]","[matTextSuffix]","[matSuffix], [matIconSuffix]","mat-error, [matError]","mat-hint:not([align='end'])","mat-hint[align='end']"];let Ro=(()=>{class i{}return i.\u0275fac=function(e){return new(e||i)},i.\u0275dir=ve({type:i,selectors:[["mat-label"]]}),i})(),Wte=0;const iH=new me("MatError");let jte=(()=>{class i{constructor(e,n){this.id="mat-mdc-error-"+Wte++,e||n.nativeElement.setAttribute("aria-live","polite")}}return i.\u0275fac=function(e){return new(e||i)(wa("aria-live"),E(vt))},i.\u0275dir=ve({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&&ql("id",n.id)},inputs:{id:"id"},features:[Dn([{provide:iH,useExisting:i}])]}),i})(),Yte=0,rH=(()=>{class i{constructor(){this.align="start",this.id="mat-mdc-hint-"+Yte++}}return i.\u0275fac=function(e){return new(e||i)},i.\u0275dir=ve({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&&(ql("id",n.id),It("align",null),ln("mat-mdc-form-field-hint-end","end"===n.align))},inputs:{align:"align",id:"id"}}),i})();const sH=new me("MatPrefix");let qte=(()=>{class i{constructor(){this._isText=!1}set _isTextSelector(e){this._isText=!0}}return i.\u0275fac=function(e){return new(e||i)},i.\u0275dir=ve({type:i,selectors:[["","matPrefix",""],["","matIconPrefix",""],["","matTextPrefix",""]],inputs:{_isTextSelector:["matTextPrefix","_isTextSelector"]},features:[Dn([{provide:sH,useExisting:i}])]}),i})();const oH=new me("MatSuffix");let Xte=(()=>{class i{constructor(){this._isText=!1}set _isTextSelector(e){this._isText=!0}}return i.\u0275fac=function(e){return new(e||i)},i.\u0275dir=ve({type:i,selectors:[["","matSuffix",""],["","matIconSuffix",""],["","matTextSuffix",""]],inputs:{_isTextSelector:["matTextSuffix","_isTextSelector"]},features:[Dn([{provide:oH,useExisting:i}])]}),i})(),aH=(()=>{class i{constructor(e){this._elementRef=e,this.floating=!1}getWidth(){return function Kte(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)(E(vt))},i.\u0275dir=ve({type:i,selectors:[["label","matFormFieldFloatingLabel",""]],hostAttrs:[1,"mdc-floating-label","mat-mdc-floating-label"],hostVars:2,hostBindings:function(e,n){2&e&&ln("mdc-floating-label--float-above",n.floating)},inputs:{floating:"floating"}}),i})();const lH="mdc-line-ripple--active",pC="mdc-line-ripple--deactivating";let cH=(()=>{class i{constructor(e,n){this._elementRef=e,this._handleTransitionEnd=r=>{const s=this._elementRef.nativeElement.classList,o=s.contains(pC);"opacity"===r.propertyName&&o&&s.remove(lH,pC)},n.runOutsideAngular(()=>{e.nativeElement.addEventListener("transitionend",this._handleTransitionEnd)})}activate(){const e=this._elementRef.nativeElement.classList;e.remove(pC),e.add(lH)}deactivate(){this._elementRef.nativeElement.classList.add(pC)}ngOnDestroy(){this._elementRef.nativeElement.removeEventListener("transitionend",this._handleTransitionEnd)}}return i.\u0275fac=function(e){return new(e||i)(E(vt),E(gt))},i.\u0275dir=ve({type:i,selectors:[["div","matFormFieldLineRipple",""]],hostAttrs:[1,"mdc-line-ripple"]}),i})(),dH=(()=>{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)(E(vt),E(gt))},i.\u0275cmp=ot({type:i,selectors:[["div","matFormFieldNotchedOutline",""]],hostAttrs:[1,"mdc-notched-outline"],hostVars:2,hostBindings:function(e,n){2&e&&ln("mdc-notched-outline--notched",n.open)},inputs:{labelWidth:["matFormFieldNotchedOutlineLabelWidth","labelWidth"],open:["matFormFieldNotchedOutlineOpen","open"]},attrs:xte,ngContentSelectors:wte,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&&(or(),Ie(0,"div",0),G(1,"div",1),Yt(2),j(),Ie(3,"div",2)),2&e&&(V(1),qo("width",n._getNotchWidth()))},encapsulation:2,changeDetection:0}),i})();const Zte={transitionMessages:Oa("transitionMessages",[Os("enter",oi({opacity:1,transform:"translateY(0%)"})),Or("void => enter",[oi({opacity:0,transform:"translateY(-5px)"}),Yr("300ms cubic-bezier(0.55, 0, 0.55, 0.2)")])])};let UR=(()=>{class i{}return i.\u0275fac=function(e){return new(e||i)},i.\u0275dir=ve({type:i}),i})();const mC=new me("MatFormField"),Qte=new me("MAT_FORM_FIELD_DEFAULT_OPTIONS");let uH=0,yl=(()=>{class i{get hideRequiredMarker(){return this._hideRequiredMarker}set hideRequiredMarker(e){this._hideRequiredMarker=tn(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-"+uH++,this._hintLabelId="mat-mdc-hint-"+uH++,this._subscriptAnimationState="",this._labelWidth=0,this._destroyed=new Te,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(Ue(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(),Cr(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(Ue(this._destroyed)).subscribe(()=>{this._needsOutlineLabelOffsetUpdateOnStable&&(this._needsOutlineLabelOffsetUpdateOnStable=!1,this._updateOutlineLabelOffset())})}),this._dir.change.pipe(Ue(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)(E(vt),E(Qn),E(gt),E(Pa),E(zi),E(Qte,8),E(kr,8),E(qt))},i.\u0275cmp=ot({type:i,selectors:[["mat-form-field"]],contentQueries:function(e,n,r){if(1&e&&(Wi(r,Ro,5),Wi(r,Ro,7),Wi(r,UR,5),Wi(r,sH,5),Wi(r,oH,5),Wi(r,iH,5),Wi(r,rH,5)),2&e){let s;At(s=Dt())&&(n._labelChildNonStatic=s.first),At(s=Dt())&&(n._labelChildStatic=s.first),At(s=Dt())&&(n._formFieldControl=s.first),At(s=Dt())&&(n._prefixChildren=s),At(s=Dt())&&(n._suffixChildren=s),At(s=Dt())&&(n._errorChildren=s),At(s=Dt())&&(n._hintChildren=s)}},viewQuery:function(e,n){if(1&e&&($n(Mte,5),$n(Cte,5),$n(Ste,5),$n(aH,5),$n(dH,5),$n(cH,5)),2&e){let r;At(r=Dt())&&(n._textField=r.first),At(r=Dt())&&(n._iconPrefixContainer=r.first),At(r=Dt())&&(n._textPrefixContainer=r.first),At(r=Dt())&&(n._floatingLabel=r.first),At(r=Dt())&&(n._notchedOutline=r.first),At(r=Dt())&&(n._lineRipple=r.first)}},hostAttrs:[1,"mat-mdc-form-field"],hostVars:42,hostBindings:function(e,n){2&e&&ln("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:[Dn([{provide:mC,useExisting:i}])],ngContentSelectors:Gte,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&&(or($te),fe(0,Dte,1,1,"ng-template",null,0,zc),G(2,"div",1,2),Oe("click",function(s){return n._control.onContainerClick&&n._control.onContainerClick(s)}),fe(4,Tte,1,0,"div",3),G(5,"div",4),fe(6,kte,2,3,"div",5),fe(7,Pte,3,0,"div",6),fe(8,Ote,3,0,"div",7),G(9,"div",8),fe(10,Lte,1,1,"ng-template",9),Yt(11),j(),fe(12,Nte,2,0,"div",10),fe(13,Bte,2,0,"div",11),j(),fe(14,Ute,1,0,"div",12),j(),G(15,"div",13),fe(16,Vte,2,1,"div",14),fe(17,Hte,5,2,"div",15),j()),2&e&&(V(2),ln("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),V(2),U("ngIf",!n._hasOutline()&&!n._control.disabled),V(2),U("ngIf",n._hasOutline()),V(1),U("ngIf",n._hasIconPrefix),V(1),U("ngIf",n._hasTextPrefix),V(2),U("ngIf",!n._hasOutline()||n._forceDisplayInfixLabel()),V(2),U("ngIf",n._hasTextSuffix),V(1),U("ngIf",n._hasIconSuffix),V(1),U("ngIf",!n._hasOutline()),V(1),ln("mat-mdc-form-field-subscript-dynamic-size","dynamic"===n.subscriptSizing),U("ngSwitch",n._getDisplayedMessages()),V(1),U("ngSwitchCase","error"),V(1),U("ngSwitchCase","hint"))},dependencies:[_i,xy,by,VT,SU,rH,aH,dH,cH],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:[Zte.transitionMessages]},changeDetection:0}),i})(),gC=(()=>{class i{}return i.\u0275fac=function(e){return new(e||i)},i.\u0275mod=en({type:i}),i.\u0275inj=Wt({imports:[Jn,co,HI,Jn]}),i})();const pH=Fh({passive:!0});let tne=(()=>{class i{constructor(e,n){this._platform=e,this._ngZone=n,this._monitoredElements=new Map}monitor(e){if(!this._platform.isBrowser)return _o;const n=qc(e),r=this._monitoredElements.get(n);if(r)return r.subject;const s=new Te,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,pH),n.classList.add("cdk-text-field-autofill-monitored")}),this._monitoredElements.set(n,{subject:s,unlisten:()=>{n.removeEventListener("animationstart",a,pH)}}),s}stopMonitoring(e){const n=qc(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)(ee(zi),ee(gt))},i.\u0275prov=Pe({token:i,factory:i.\u0275fac,providedIn:"root"}),i})(),nne=(()=>{class i{}return i.\u0275fac=function(e){return new(e||i)},i.\u0275mod=en({type:i}),i.\u0275inj=Wt({}),i})();const VR=new me("MAT_INPUT_VALUE_ACCESSOR"),ine=["button","checkbox","file","hidden","image","radio","range","reset","submit"];let rne=0;const sne=WU(class{constructor(i,t,e,n){this._defaultErrorStateMatcher=i,this._parentForm=t,this._parentFormGroup=e,this.ngControl=n,this.stateChanges=new Te}});let rc=(()=>{class i extends sne{get disabled(){return this._disabled}set disabled(e){this._disabled=tn(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(vl.required)??!1}set required(e){this._required=tn(e)}get type(){return this._type}set type(e){this._type=e||"text",this._validateType(),!this._isTextarea&&aU().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=tn(e)}constructor(e,n,r,s,o,a,l,c,d,h){super(a,s,o,r),this._elementRef=e,this._platform=n,this._autofillMonitor=c,this._formField=h,this._uid="mat-input-"+rne++,this.focused=!1,this.stateChanges=new Te,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=>aU().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&&d.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(){ine.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)(E(vt),E(zi),E(tc,10),E(hb,8),E(Gh,8),E(YU),E(VR,10),E(tne),E(gt),E(mC,8))},i.\u0275dir=ve({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&&Oe("focus",function(){return n._focusChanged(!0)})("blur",function(){return n._focusChanged(!1)})("input",function(){return n._onInput()}),2&e&&(ql("id",n.id)("disabled",n.disabled)("required",n.required),It("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),ln("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:[Dn([{provide:UR,useExisting:i}]),dt,xi]}),i})(),mH=(()=>{class i{}return i.\u0275fac=function(e){return new(e||i)},i.\u0275mod=en({type:i}),i.\u0275inj=Wt({imports:[Jn,gC,gC,nne,Jn]}),i})();function one(i,t){if(1&i&&(G(0,"mat-label"),Be(1),j()),2&i){const e=re(2);V(1),ui(e.resource.name)}}function ane(i,t){if(1&i){const e=jn();G(0,"mat-form-field",1),fe(1,one,2,1,"mat-label",2),G(2,"input",3),Oe("ngModelChange",function(r){return Vt(e),Et(re().resource.data=r)})("change",function(){return Vt(e),Et(re().changed.emit())}),j()()}if(2&i){const e=re();U("matTooltip",e.resourceDescription),V(1),U("ngIf",e.resource.name),V(1),U("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 lne=(()=>{class i{constructor(){this.resource=null,this.resourceDescription="",this.disabled=!1,this.changed=new $e}}return i.\u0275fac=function(e){return new(e||i)},i.\u0275cmp=ot({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&&fe(0,ane,3,7,"mat-form-field",0),2&e&&U("ngIf",n.resource)},dependencies:[_i,_l,mu,nc,_u,gu,Zc,yl,Ro,rc,Fs],changeDetection:0}),i})();function cne(i,t){if(1&i&&(G(0,"mat-label"),Be(1),j()),2&i){const e=re(2);V(1),ui(e.resource.name)}}function dne(i,t){if(1&i){const e=jn();G(0,"mat-form-field",1),fe(1,cne,2,1,"mat-label",2),G(2,"input",3),Oe("ngModelChange",function(r){return Vt(e),Et(re().resource.data=r)})("change",function(){return Vt(e),Et(re().changed.emit())}),j()()}if(2&i){const e=re();U("matTooltip",e.resourceDescription),V(1),U("ngIf",e.resource.name),V(1),U("disabled",e.disabled||void 0!==e.resource.schema.required_value)("maxlength",e.maxLength)("minlength",e.minLength)("ngModel",e.resource.data)}}let gH=(()=>{class i{constructor(){this._resource=null,this.resourceDescription="",this.disabled=!1,this.changed=new $e,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=ot({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&&fe(0,dne,3,6,"mat-form-field",0),2&e&&U("ngIf",n.resource)},dependencies:[_i,_l,nc,NR,BR,Zc,yl,Ro,rc,Fs],changeDetection:0}),i})();const sc=(i,t)=>i+(i.includes("__")?"/":"__")+t,jh=function(){return[]};function une(i,t){if(1&i&&(G(0,"mat-panel-description"),Be(1," Click to view items ("),G(2,"b"),Be(3),j(),Be(4,") "),j()),2&i){const e=re(2);V(3),ui((e.resourceData||Rs(1,jh)).length)}}function hne(i,t){1&i&&(G(0,"mat-panel-description"),Be(1," Empty array "),j())}function fne(i,t){}function pne(i,t){if(1&i){const e=jn();G(0,"mat-expansion-panel",4),Oe("opened",function(){return Vt(e),Et(re().onContentsTrigger(!0))})("closed",function(){return Vt(e),Et(re().onContentsTrigger(!1))}),G(1,"mat-expansion-panel-header",5)(2,"mat-panel-title"),Be(3),j(),fe(4,une,5,2,"mat-panel-description",1),fe(5,hne,2,0,"mat-panel-description",1),j(),fe(6,fne,0,0,"ng-template",6),j()}if(2&i){const e=re(),n=Zi(3);V(1),U("matTooltip",e.resourceDescription),V(2),Qi(" ",e.name," "),V(1),U("ngIf",(e.resourceData||Rs(5,jh)).length>0),V(1),U("ngIf",0==(e.resourceData||Rs(6,jh)).length),V(1),U("ngTemplateOutlet",n)}}function mne(i,t){}function gne(i,t){if(1&i&&(Gr(0),G(1,"h2",5),Be(2),j(),G(3,"div",7),fe(4,mne,0,0,"ng-template",6),j(),Wr()),2&i){const e=re(),n=Zi(3);V(1),U("matTooltip",e.resourceDescription),V(1),ui(e.name),V(2),U("ngTemplateOutlet",n)}}function _ne(i,t){}function vne(i,t){if(1&i&&Ie(0,"app-editor",10),2&i){const e=re().$implicit,n=re(3);U("resource",n.children[n.pageIndex*n.pageSize+e])("disabled",n.disabled)}}function yne(i,t){if(1&i&&(Gr(0),fe(1,vne,1,2,"app-editor",9),Wr()),2&i){const e=t.$implicit,n=re(3);V(1),U("ngIf",n.pageIndex*n.pageSize+e0)}let zR=(()=>{class i{constructor(e,n){this.main=e,this.cdr=n,this._resource=null,this.resourceDescription="",this.disabled=!1,this.changed=new $e,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 Te}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:sc(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(Ue(this.destroyed$),gn(([n,r])=>!!this.resource&&n.startsWith(this.resource.id)&&!n.substring(this.resource.id.length+1).includes("/"))).subscribe(function(){var n=nt(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 Qe(null),this.imageUrl$=new Qe(null),this.destroyed$=new Te,this.changed=new $e}set resource(e){this._resource$.next(e)}get resource(){return this._resource$.getValue()}ngAfterViewInit(){var e=this;return nt(function*(){e._resource$.pipe(Ue(e.destroyed$)).subscribe(function(){var n=nt(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)(E(Jl),E(Fa))},i.\u0275cmp=ot({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&&(Ie(0,"app-compound-block-ui",0),ct(1,"async"),fe(2,Dne,2,3,"img",1),ct(3,"async")),2&e&&(U("resource",ut(1,3,n._resource$))("fieldBlacklist",Rs(7,Tne)),V(2),U("ngIf",ut(3,5,n.imageUrl$)))},dependencies:[_i,ec,Xo],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 Rne=["*"],Lne=new me("MAT_CARD_CONFIG");let _H=(()=>{class i{constructor(e){this.appearance=e?.appearance||"raised"}}return i.\u0275fac=function(e){return new(e||i)(E(Lne,8))},i.\u0275cmp=ot({type:i,selectors:[["mat-card"]],hostAttrs:[1,"mat-mdc-card","mdc-card"],hostVars:4,hostBindings:function(e,n){2&e&&ln("mat-mdc-card-outlined","outlined"===n.appearance)("mdc-card--outlined","outlined"===n.appearance)},inputs:{appearance:"appearance"},exportAs:["matCard"],ngContentSelectors:Rne,decls:1,vars:0,template:function(e,n){1&e&&(or(),Yt(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})(),vH=(()=>{class i{}return i.\u0275fac=function(e){return new(e||i)},i.\u0275mod=en({type:i}),i.\u0275inj=Wt({imports:[Jn,co,Jn]}),i})();class HR{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 Te,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 $R=(()=>{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=Pe({token:i,factory:i.\u0275fac,providedIn:"root"}),i})(),aie=(()=>{class i{}return i.\u0275fac=function(e){return new(e||i)},i.\u0275mod=en({type:i}),i.\u0275inj=Wt({imports:[Jn,co,tb,Jn]}),i})();const CH={transformPanel:Oa("transformPanel",[Or("void => enter-dropdown",Yr("120ms cubic-bezier(0, 0, 0.2, 1)",sV([oi({opacity:0,transform:"scale(1, 0.8)"}),oi({opacity:1,transform:"scale(1, 1)"})]))),Or("void => enter-dialog",Yr("150ms cubic-bezier(0, 0, 0.2, 1)",sV([oi({opacity:0,transform:"scale(0.7)"}),oi({transform:"none",opacity:1})]))),Or("* => void",Yr("100ms linear",oi({opacity:0})))]),fadeInCalendar:Oa("fadeInCalendar",[Os("void",oi({opacity:0})),Os("enter",oi({opacity:1})),Or("void => *",Yr("120ms 100ms cubic-bezier(0.55, 0, 0.55, 0.2)"))])},AH=function(i){return{active:i}};function Sie(i,t){if(1&i){const e=jn();G(0,"button",2),Oe("click",function(){const s=Vt(e).$implicit;return Et(re().select(s))}),j()}if(2&i){const e=t.$implicit,n=re();qo("background-color",e),U("ngClass",sm(3,AH,n.selectedColor===e))}}function Eie(i,t){if(1&i){const e=jn();G(0,"button",2),Oe("click",function(){const s=Vt(e).$implicit;return Et(re().select(s))}),j()}if(2&i){const e=t.$implicit,n=re();qo("background-color",e),U("ngClass",sm(3,AH,n.selectedColor===e))}}const Aie=["button"],Die=/^\s+/,Tie=/\s+$/,Gm=Math.round,Iie=(Math,Math,Math,/[^0-9]/g),DH=["#ffffff","#ffff00","#ff00ff","#ff0000","#c0c0c0","#808080","#808000","#800080","#800000","#00ffff","#00ff00","#008080","#008000","#0000ff","#000080","#000000"];function TH(i,t,e){const n=i.getImageData(t,e,1,1).data;return{r:n[0],g:n[1],b:n[2]}}function Yh(i){return 1==i.length?"0"+i:""+i}function kie(i){return Math.round(255*parseFloat(i)).toString(16)}function IH(i){return Jo(i)/255}function Jo(i){return parseInt(i,16)}function RH(i,t,e,n){var r=[Yh(Gm(i).toString(16)),Yh(Gm(t).toString(16)),Yh(Gm(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 vu="(?:[-\\+]?\\d*\\.\\d+%?)|(?:[-\\+]?\\d+%?)",jR="[\\s|\\(]+("+vu+")[,|\\s]+("+vu+")[,|\\s]+("+vu+")\\s*\\)?",YR="[\\s|\\(]+("+vu+")[,|\\s]+("+vu+")[,|\\s]+("+vu+")[,|\\s]+("+vu+")\\s*\\)?",qh={CSS_UNIT:new RegExp(vu),rgb:new RegExp("rgb"+jR),rgba:new RegExp("rgba"+YR),hsl:new RegExp("hsl"+jR),hsla:new RegExp("hsla"+YR),hsv:new RegExp("hsv"+jR),hsva:new RegExp("hsva"+YR),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 qR(i){let t;return i=i.replace(Die,"").replace(Tie,"").toLowerCase(),(t=qh.rgb.exec(i))?{r:t[1],g:t[2],b:t[3],a:1}:(t=qh.rgba.exec(i))?{r:t[1],g:t[2],b:t[3],a:t[4]}:(t=qh.hex8.exec(i))?{r:Jo(t[1]),g:Jo(t[2]),b:Jo(t[3]),a:IH(t[4])}:(t=qh.hex6.exec(i))?{r:Jo(t[1]),g:Jo(t[2]),b:Jo(t[3]),a:1}:(t=qh.hex4.exec(i))?{r:Jo(t[1]+""+t[1]),g:Jo(t[2]+""+t[2]),b:Jo(t[3]+""+t[3]),a:IH(t[4]+""+t[4])}:(t=qh.hex3.exec(i))?{r:Jo(t[1]+""+t[1]),g:Jo(t[2]+""+t[2]),b:Jo(t[3]+""+t[3]),a:1}:null}class Xh{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=RH(this.r,this.g,this.b),this.rgba=this.toRgba()}toHex(t){return RH(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 Rie(i,t,e,n,r){var s=[Yh(Gm(i).toString(16)),Yh(Gm(t).toString(16)),Yh(Gm(e).toString(16)),Yh(kie(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 kH=(()=>{class i{constructor(e,n){this.zone=e,this.colorChanged=new $e,this.x=0,this.y=0,this.drag=!1,this._destroyed=new Te,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){Co()},i.\u0275dir=ve({type:i,inputs:{color:"color"},outputs:{colorChanged:"colorChanged"}}),i})(),Fie=(()=>{class i extends kH{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}=TH(this.ctx,e.offsetX,e.offsetY);this.emitChange(new Xh(n,r,s))}}return i.\u0275fac=function(e){return new(e||i)(E(gt))},i.\u0275cmp=ot({type:i,selectors:[["ngx-mat-color-slider"]],features:[dt],decls:1,vars:0,consts:[["id","color-strip","width","15","height","234",1,"zone-strip",3,"mousedown","mouseup"]],template:function(e,n){1&e&&(G(0,"canvas",0),Oe("mousedown",function(s){return n.onMousedown(s)})("mouseup",function(s){return n.onMouseup(s)}),j())}}),i})(),Lie=(()=>{class i{constructor(){}onInput(e){this._formatInput(e.target)}_formatInput(e){let n=Number(e.value.replace(Iie,""));n=isNaN(n)?0:n,e.value=n}}return i.\u0275fac=function(e){return new(e||i)},i.\u0275dir=ve({type:i,selectors:[["","ngxMatNumericColorInput",""]],hostBindings:function(e,n){1&e&&Oe("input",function(s){return n.onInput(s)})}}),i})(),Bie=(()=>{class i extends kH{constructor(e){super(e,"color-block"),this.zone=e,this._resetBaseColor=!0,this.formGroup=new Hm({r:new ic(null,[vl.required]),g:new ic(null,[vl.required]),b:new ic(null,[vl.required]),a:new ic(null,[vl.required]),hex:new ic(null,[vl.required,vl.pattern(qh.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(){Cr(this.rCtrl.valueChanges,this.gCtrl.valueChanges,this.bCtrl.valueChanges,this.aCtrl.valueChanges).pipe(Ue(this._destroyed),gl(400)).subscribe(r=>{const s=new Xh(Number(this.rCtrl.value),Number(this.gCtrl.value),Number(this.bCtrl.value),Number(this.aCtrl.value));this.emitChange(s)}),this.hexCtrl.valueChanges.pipe(Ue(this._destroyed),gl(400),Ql()).subscribe(r=>{const s=qR(r);if(null!=s){const o=new Xh(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}=TH(this.ctx,e.offsetX,e.offsetY);this.emitChange(new Xh(n,r,s))}}return i.\u0275fac=function(e){return new(e||i)(E(gt))},i.\u0275cmp=ot({type:i,selectors:[["ngx-mat-color-canvas"]],hostAttrs:[1,"ngx-mat-color-canvas"],features:[dt,xi],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&&(G(0,"form",0)(1,"div",1)(2,"div",2)(3,"canvas",3),Oe("mousedown",function(s){return n.onMousedown(s)})("mouseup",function(s){return n.onMouseup(s)}),j(),G(4,"ngx-mat-color-slider",4),Oe("colorChanged",function(s){return n.onSliderColorChanged(s)}),j()(),G(5,"div",5)(6,"mat-form-field")(7,"mat-label"),Be(8,"R"),j(),Ie(9,"input",6),j(),G(10,"mat-form-field")(11,"mat-label"),Be(12,"G"),j(),Ie(13,"input",7),j(),G(14,"mat-form-field")(15,"mat-label"),Be(16,"B"),j(),Ie(17,"input",8),j()()(),G(18,"div",1),Ie(19,"button",9),G(20,"mat-form-field")(21,"mat-label"),Be(22,"HEX6"),j(),G(23,"mat-label",10),Be(24,"#\xa0"),j(),Ie(25,"input",11),j(),G(26,"mat-form-field",12)(27,"mat-label"),Be(28,"A"),j(),Ie(29,"input",13),j()()()),2&e&&(U("formGroup",n.formGroup),V(19),qo("background-color",(null==n.color?null:n.color.rgba)||"transparent"))},dependencies:[rc,yl,Ro,qte,CV,IR,_l,mu,nc,bR,_u,gu,Gh,fC,Fie,Lie],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})(),Uie=(()=>{class i{constructor(){this.colorChanged=new $e,this.colors1=DH.slice(0,8),this.colors2=DH.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}=qR(e);this.colorChanged.emit(new Xh(n,r,s,o))}}return i.\u0275fac=function(e){return new(e||i)},i.\u0275cmp=ot({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&&(G(0,"div",0),fe(1,Sie,1,5,"button",1),j(),G(2,"div",0),fe(3,Eie,1,5,"button",1),j()),2&e&&(V(1),U("ngForOf",n.colors1),V(2),U("ngForOf",n.colors2))},dependencies:[hm,lo,CV],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})(),PH=(()=>{class i{constructor(){this.colorChanged=new $e}ngOnInit(){}handleColorChanged(e){this.colorChanged.emit(e)}}return i.\u0275fac=function(e){return new(e||i)},i.\u0275cmp=ot({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&&(G(0,"ngx-mat-color-canvas",0),Oe("colorChanged",function(s){return n.handleColorChanged(s)}),j(),G(1,"ngx-mat-color-collection",0),Oe("colorChanged",function(s){return n.handleColorChanged(s)}),j()),2&e&&(U("color",n.color),V(1),U("color",n.color))},dependencies:[Bie,Uie],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})(),XR=(()=>{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=qR(e);return n?new Xh(n.r,n.g,n.b,n.a):null}}return i.\u0275fac=function(e){return new(e||i)},i.\u0275prov=Pe({token:i,factory:i.\u0275fac}),i})();const Vie={display:{colorInput:"hex"}},OH=new me("mat-color-formats"),FH=new me("ngx-mat-colorpicker-scroll-strategy"),Hie={provide:FH,deps:[as],useFactory:function zie(i){return()=>i.scrollStrategies.reposition()}},$ie=Jy(class{constructor(i){this._elementRef=i}});let LH=(()=>{class i extends $ie{constructor(e){super(e)}}return i.\u0275fac=function(e){return new(e||i)(E(vt))},i.\u0275cmp=ot({type:i,selectors:[["ngx-mat-color-picker-content"]],viewQuery:function(e,n){if(1&e&&$n(PH,5),2&e){let r;At(r=Dt())&&(n._palette=r.first)}},hostAttrs:[1,"ngx-mat-colorpicker-content"],hostVars:3,hostBindings:function(e,n){2&e&&(Rw("@transformPanel","enter"),ln("ngx-mat-colorpicker-content-touch",n.picker.touchUi))},inputs:{color:"color"},exportAs:["ngxMatColorPickerContent"],features:[dt],decls:1,vars:1,consts:[[3,"color","colorChanged"]],template:function(e,n){1&e&&(G(0,"ngx-mat-color-palette",0),Oe("colorChanged",function(s){return n.picker.select(s)}),j()),2&e&&U("color",n.picker._selected)},dependencies:[PH],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:[CH.transformPanel,CH.fadeInCalendar]},changeDetection:0}),i})(),NH=(()=>{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 $e,this.closedStream=new $e,this._touchUi=!1,this._opened=!1,this._defaultColor="primary",this._validSelected=null,this._disabledChange=new Te,this._focusedElementBeforeOpen=null,this._inputSubscription=Qt.EMPTY,this._selectedChanged=new Te,this._scrollStrategy=a}get disabled(){return void 0===this._disabled&&this._pickerInput?this._pickerInput.disabled:!!this._disabled}set disabled(e){const n=tn(e);n!==this._disabled&&(this._disabled=n,this._disabledChange.next(n))}get touchUi(){return this._touchUi}set touchUi(e){this._touchUi=tn(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(LH,{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 Nh(LH,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(Oi(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"),Cr(this._popupRef.backdropClick(),this._popupRef.detachments(),this._popupRef.keydownEvents().pipe(gn(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)(E(Bm),E(as),E(gt),E(XR),E(Pa,8),E(FH),E(qt,8),E(jr))},i.\u0275cmp=ot({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 yC{constructor(t,e){this.target=t,this.targetElement=e,this.value=this.target.value}}const Gie={provide:Io,useExisting:Gn(()=>bC),multi:!0},Wie={provide:qr,useExisting:Gn(()=>bC),multi:!0};let bC=(()=>{class i{constructor(e,n,r,s){if(this._elementRef=e,this._formField=n,this._colorFormats=r,this._adapter=s,this.colorChange=new $e,this.colorInput=new $e,this._disabledChange=new $e,this._valueChange=new $e,this._onTouched=()=>{},this._cvaOnChange=()=>{},this._validatorOnChange=()=>{},this._pickerSubscription=Qt.EMPTY,this._validator=vl.compose([]),this._lastValueValid=!1,!this._colorFormats)throw function Oie(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 yC(this,this._elementRef.nativeElement)),this.colorChange.emit(new yC(this,this._elementRef.nativeElement))}))}get disabled(){return!!this._disabled}set disabled(e){const n=tn(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 yC(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 yC(this,this._elementRef.nativeElement)))}}return i.\u0275fac=function(e){return new(e||i)(E(vt),E(yl,8),E(OH,8),E(XR))},i.\u0275dir=ve({type:i,selectors:[["input","ngxMatColorPicker",""]],hostVars:3,hostBindings:function(e,n){1&e&&Oe("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&&(ql("disabled",n.disabled),It("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:[Dn([Gie,Wie,{provide:VR,useExisting:i}])]}),i})(),jie=(()=>{class i{constructor(e){this._cd=e,this._stateChanges=Qt.EMPTY}get disabled(){if(null==this._disabled&&this.picker)return this.picker.disabled}set disabled(e){this._disabled=e}ngOnInit(){}ngOnChanges(e){e.picker&&this._watchStateChanges()}ngOnDestroy(){this._stateChanges.unsubscribe()}ngAfterContentInit(){this._watchStateChanges()}open(e){this.picker&&!this.disabled&&(this.picker.open(),e.stopPropagation())}_watchStateChanges(){const e=this.picker?this.picker._disabledChange:mt(),n=this.picker&&this.picker._pickerInput?this.picker._pickerInput._disabledChange:mt(),r=this.picker?Cr(this.picker.openedStream,this.picker.closedStream):mt();this._stateChanges.unsubscribe(),this._stateChanges=Cr(e,n,r).subscribe(()=>this._cd.markForCheck())}}return i.\u0275fac=function(e){return new(e||i)(E(Qn))},i.\u0275cmp=ot({type:i,selectors:[["ngx-mat-color-toggle"]],viewQuery:function(e,n){if(1&e&&$n(Aie,5),2&e){let r;At(r=Dt())&&(n._button=r.first)}},hostAttrs:[1,"ngx-mat-color-toggle"],hostVars:7,hostBindings:function(e,n){1&e&&Oe("focus",function(){return n._button.focus()}),2&e&&(It("tabindex",-1),ln("ngx-mat-color-toggle-active",n.picker&&n.picker.opened)("mat-accent",n.picker&&"accent"===n.picker.color)("mat-warn",n.picker&&"warn"===n.picker.color))},inputs:{picker:["for","picker"],tabIndex:"tabIndex",disabled:"disabled"},exportAs:["ngxMatColorPickerToggle"],features:[xi],decls:4,vars:5,consts:[["mat-icon-button","","type","button",3,"disabled","click"],["button",""]],template:function(e,n){1&e&&(G(0,"button",0,1),Oe("click",function(s){return n.open(s)}),G(2,"mat-icon"),Be(3,"palette"),j()()),2&e&&(U("disabled",n.disabled),It("aria-haspopup",n.picker?"dialog":null)("tabindex",n.disabled?-1:n.tabIndex),V(2),qo("color",null==n.picker||null==n.picker._selected?null:n.picker._selected.rgba))},dependencies:[XM,gR],styles:[".mat-form-field-appearance .mat-form-field-prefix .ngx-mat-color-toggle-default-icon,.mat-form-field-appearance .mat-form-field-suffix .ngx-mat-color-toggle-default-icon{width:1em}.mat-form-field:not(.mat-form-field-appearance) .mat-form-field-prefix .ngx-mat-color-toggle-default-icon,.mat-form-field:not(.mat-form-field-appearance) .mat-form-field-suffix .ngx-mat-color-toggle-default-icon{display:block;width:1.5em;height:1.5em}.mat-form-field:not(.mat-form-field-appearance) .mat-form-field-prefix .mat-icon-button .ngx-mat-color-toggle-default-icon,.mat-form-field:not(.mat-form-field-appearance) .mat-form-field-suffix .mat-icon-button .ngx-mat-color-toggle-default-icon{margin:auto}\n"],encapsulation:2}),i})(),Yie=(()=>{class i{}return i.\u0275fac=function(e){return new(e||i)},i.\u0275mod=en({type:i}),i.\u0275inj=Wt({providers:[XR,Hie],imports:[co,mH,KM,vH,aie,tH,nH,vV,Bh,tz]}),i})();const qie=["picker"],Xie=function(i){return{"background-color":i}};function Kie(i,t){if(1&i){const e=jn();G(0,"div",5),Oe("click",function(r){const o=Vt(e).index;return Et(re().onColorClicked(r.currentTarget,o))}),j()}if(2&i){const e=t.$implicit,n=t.index,r=re();U("ngStyle",sm(2,Xie,"#"+r.lpad(e.toString(16),"0",8)))("matTooltip",n+": #"+e.toString(16))}}const Zie=function(){return["colors"]};let Qie=(()=>{class i{constructor(){this.resource=null,this.changed=new $e,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 bU;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=ot({type:i,selectors:[["app-palette-block-ui"]],viewQuery:function(e,n){if(1&e&&$n(qie,5),2&e){let r;At(r=Dt())&&(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&&(Ie(0,"app-compound-block-ui",0),G(1,"div",1),fe(2,Kie,1,4,"div",2),j(),G(3,"input",3),Oe("colorChange",function(s){return n.onColorChange(s.value)}),j(),Ie(4,"ngx-mat-color-picker",null,4)),2&e){const r=Zi(5);U("resource",n.resource)("fieldBlacklist",Rs(4,Zie)),V(2),U("ngForOf",null==n.resourceData?null:n.resourceData.colors),V(1),U("ngxMatColorPicker",r)}},dependencies:[lo,nM,rc,Fs,bC,NH,ec],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 Jie=["editorBody"];function ere(i,t){if(1&i&&(G(0,"div",11),Be(1),j()),2&i){const e=re().$implicit;V(1),ui(e.offset)}}function tre(i,t){if(1&i){const e=jn();G(0,"input",12),Oe("input",function(r){const o=Vt(e).index,a=re().index;return Et(re().onHexInput(r,a,o))})("focus",function(r){const o=Vt(e).index;return Et(re(2).onHexFocus(r,o))})("blur",function(r){return Vt(e),Et(re(2).onHexBlur(r))}),j()}if(2&i){const e=t.$implicit,n=t.index;U("id","hex_input__"+re().index+"__"+n)("value",e[0])("disabled",null===e[0])}}function nre(i,t){1&i&&Ie(0,"div",3)}function ire(i,t){if(1&i){const e=jn();G(0,"span",15),Oe("click",function(){const s=Vt(e).index,o=re(2).index;return Et(re().blurInput(o,s))}),Be(1),j()}if(2&i){const e=t.$implicit,n=t.index;U("id","utf_char__"+re(2).index+"__"+n),V(1),ui(e[1])}}function rre(i,t){if(1&i&&(G(0,"div",13),fe(1,ire,2,2,"span",14),j()),2&i){const e=re().$implicit,n=re();V(1),U("ngForOf",e.values)("ngForTrackBy",n.trackByIndex)}}function sre(i,t){if(1&i&&(G(0,"div",5),fe(1,ere,2,1,"div",6),ct(2,"async"),G(3,"div",7),fe(4,tre,1,3,"input",8),j(),fe(5,nre,1,0,"div",9),ct(6,"async"),ct(7,"async"),fe(8,rre,2,2,"div",10),ct(9,"async"),j()),2&i){const e=t.$implicit,n=t.index,r=re();ln("gray",n%2!=0),V(1),U("ngIf",ut(2,7,r._showOffsets$)),V(3),U("ngForOf",e.values)("ngForTrackBy",r.trackByIndex),V(1),U("ngIf",ut(6,9,r._showOffsets$)||ut(7,11,r._showUtf8$)),V(3),U("ngIf",ut(9,13,r._showUtf8$))}}function ore(i,t){if(1&i){const e=jn();G(0,"div",16)(1,"button",17),Oe("click",function(){return Vt(e),Et(re().changePage(-1))}),ct(2,"async"),Be(3,"Previous"),j(),G(4,"span"),Be(5),ct(6,"async"),ct(7,"async"),j(),G(8,"button",17),Oe("click",function(){return Vt(e),Et(re().changePage(1))}),ct(9,"async"),ct(10,"async"),Be(11," Next "),j()()}if(2&i){const e=re();V(1),U("disabled",0===ut(2,4,e.currentPage$)),V(4),Dh("Page ",(ut(6,6,e.currentPage$)||0)+1," of ",ut(7,8,e.totalPages$),""),V(3),U("disabled",(ut(9,10,e.currentPage$)||0)>=(ut(10,12,e.totalPages$)||0)-1)}}let are=(()=>{class i{set maxColumns(e){this._maxColumns$.next(e)}set maxRows(e){this._maxRows$.next(e)}set showOffsets(e){this._showOffsets$.next(e)}set showUtf8(e){this._showUtf8$.next(e)}set data(e){if(e!==this._data$.value){if(e.length===this._data$.value.length){for(let n=0;n=32&&e<=126?String.fromCharCode(e):"."]}ngAfterViewInit(){new ResizeObserver(e=>{for(const n of e)this.viewportSize$.next([n.contentRect.width,n.contentRect.height])}).observe(this.editorBody.nativeElement),Ra([this.viewportSize$,this._maxColumns$,this._maxRows$,this._showOffsets$,this._showUtf8$]).pipe(Ue(this.destroyed$),Wy(50)).subscribe(([[e,n],r,s,o,a])=>{let l=e-8;o&&(l-=68);let c=34;a&&(l-=8,c+=10);let h=Math.floor(l/c);r>0&&h>r&&(h=r);let p=this.pageSize$.value[0];h===p+1&&l/c%1<.5&&(h=p),h=Math.max(1,h);let m=Math.floor(n/28);s>0&&m>s&&(m=s),m=Math.max(1,m),(h!=this.pageSize$.value[0]||m!==this.pageSize$.value[1])&&this.pageSize$.next([h,m])}),Ra([this._data$,this.currentPage$,this.pageSize$]).pipe(Ue(this.destroyed$)).subscribe(([e,n,r])=>{if(0===r[0]||0===r[1])return;let s=Math.max(1,Math.ceil(Math.ceil(e.length/r[0])/r[1]));if(this.totalPages$.value!==s&&this.totalPages$.next(s),n>=s)return void this.currentPage$.next(n=s-1);const o=[];for(let a=n*r[0]*r[1];a=0&&a<=255&&(this.data[(this.currentPage$.value*this.pageSize$.value[1]+n)*this.pageSize$.value[0]+r]=a,this.renderedRows$.value[n].values[r]=this.renderValue(a),this.cdr.detectChanges(),this.dataChange.emit(this.data),this.goToNextInput(s.id))}}onHexFocus(e,n){const r=e.target,s=r.closest(".row");s&&s.querySelectorAll(".utf8-values span").forEach((a,l)=>{a.classList.toggle("highlight",l===n)}),r.select()}onHexBlur(e){const r=e.target.closest(".row");r&&r.querySelectorAll(".utf8-values span").forEach(o=>{o.classList.remove("highlight")})}}return i.\u0275fac=function(e){return new(e||i)(E(Qn))},i.\u0275cmp=ot({type:i,selectors:[["hex-editor"]],viewQuery:function(e,n){if(1&e&&$n(Jie,5),2&e){let r;At(r=Dt())&&(n.editorBody=r.first)}},inputs:{maxColumns:"maxColumns",maxRows:"maxRows",showOffsets:"showOffsets",showUtf8:"showUtf8",data:"data",readOnly:"readOnly"},outputs:{dataChange:"dataChange"},decls:7,vars:7,consts:[[1,"editor-body"],["editorBody",""],["class","row",3,"gray",4,"ngFor","ngForOf","ngForTrackBy"],[1,"flex-spacer"],["class","pagination",4,"ngIf"],[1,"row"],["class","offset",4,"ngIf"],[1,"hex-values"],["maxlength","2",3,"id","value","disabled","input","focus","blur",4,"ngFor","ngForOf","ngForTrackBy"],["class","flex-spacer",4,"ngIf"],["class","utf8-values",4,"ngIf"],[1,"offset"],["maxlength","2",3,"id","value","disabled","input","focus","blur"],[1,"utf8-values"],[3,"id","click",4,"ngFor","ngForOf","ngForTrackBy"],[3,"id","click"],[1,"pagination"],[3,"disabled","click"]],template:function(e,n){1&e&&(G(0,"div",0,1),fe(2,sre,10,15,"div",2),ct(3,"async"),Ie(4,"div",3),j(),fe(5,ore,12,14,"div",4),ct(6,"async")),2&e&&(V(2),U("ngForOf",ut(3,3,n.renderedRows$))("ngForTrackBy",n.trackByIndex),V(3),U("ngIf",(ut(6,5,n.totalPages$)||0)>1))},dependencies:[lo,_i,Xo],styles:["[_nghost-%COMP%]{display:flex;flex-direction:column;font-family:monospace}.editor-body[_ngcontent-%COMP%]{display:flex;flex-grow:1;flex-direction:column;overflow-y:hidden}.row[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:center;height:24px;margin-bottom:4px}.row.gray[_ngcontent-%COMP%]{background-color:#d3d3d3}.offset[_ngcontent-%COMP%]{width:60px;text-align:left;margin-right:8px}.hex-values[_ngcontent-%COMP%]{display:flex;gap:2px;flex-shrink:1;overflow-x:clip}.hex-values[_ngcontent-%COMP%] input[_ngcontent-%COMP%]{width:32px;text-align:center;box-sizing:border-box}.utf8-values[_ngcontent-%COMP%]{margin-left:8px}.utf8-values[_ngcontent-%COMP%] span[_ngcontent-%COMP%]{display:inline-block;width:8px;margin-left:2px;color:#000}.utf8-values[_ngcontent-%COMP%] span.highlight[_ngcontent-%COMP%]{background-color:#ff0}.pagination[_ngcontent-%COMP%]{display:flex;justify-content:space-between;align-items:center;margin-top:1em}.flex-spacer[_ngcontent-%COMP%]{flex-grow:1}"],changeDetection:0}),i})(),lre=(()=>{class i{}return i.\u0275fac=function(e){return new(e||i)},i.\u0275mod=en({type:i}),i.\u0275inj=Wt({imports:[co]}),i})();const cre=["editor"];let dre=(()=>{class i{constructor(){this._resource=null,this.empty=new Uint8Array,this.data$=new Qe(new Uint8Array),this.resourceDescription="",this.disabled=!1,this.changed=new $e}get resource(){return this._resource}set resource(e){this._resource=e,this.data$.next(new Uint8Array(e?e.data:0))}onDataChange(e){this._resource.data=Array.from(e),this.changed.emit()}}return i.\u0275fac=function(e){return new(e||i)},i.\u0275cmp=ot({type:i,selectors:[["app-binary-block-ui"]],viewQuery:function(e,n){if(1&e&&$n(cre,5),2&e){let r;At(r=Dt())&&(n.editorDiv=r.first)}},inputs:{resource:"resource",resourceDescription:"resourceDescription",disabled:"disabled"},outputs:{changed:"changed"},decls:5,vars:10,consts:[["matTooltipPosition","above",3,"matTooltip"],[3,"data","maxColumns","showOffsets","readOnly","dataChange"]],template:function(e,n){1&e&&(G(0,"h2",0),Be(1),j(),G(2,"hex-editor",1),Oe("dataChange",function(s){return n.onDataChange(s)}),ct(3,"async"),ct(4,"async"),j()),2&e&&(U("matTooltip",n.resourceDescription),V(1),ui(null==n.resource?null:n.resource.name),V(1),U("data",ut(3,6,n.data$)||n.empty)("maxColumns",8)("showOffsets",(ut(4,8,n.data$)||n.empty).length>16)("readOnly",n.disabled))},dependencies:[Fs,are,Xo],changeDetection:0}),i})();const ure=["picker"];function hre(i,t){if(1&i&&(G(0,"mat-label",8),Be(1),j()),2&i){const e=re();V(1),ui(null==e.resource?null:e.resource.name)}}const fre=function(i){return{transform:i}};let pre=(()=>{class i{constructor(e){this.cdr=e,this.resource=null,this.resourceDescription="",this.changed=new $e,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)(E(Qn))},i.\u0275cmp=ot({type:i,selectors:[["app-angle-block-ui"]],viewQuery:function(e,n){if(1&e&&$n(ure,5),2&e){let r;At(r=Dt())&&(n.picker=r.first)}},hostBindings:function(e,n){1&e&&Oe("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&&(G(0,"div",0)(1,"div",1,2)(3,"div",3),Ie(4,"div",4)(5,"div",5),j()(),G(6,"div",6),fe(7,hre,2,1,"mat-label",7),G(8,"mat-label"),Be(9),ct(10,"number"),j(),G(11,"mat-label"),Be(12),ct(13,"number"),j()()()),2&e&&(U("matTooltip",n.resourceDescription),V(3),U("ngStyle",sm(11,fre,"rotate("+((null==n.resource?null:n.resource.data)||0)+"rad)")),V(4),U("ngIf",null==n.resource?null:n.resource.name),V(2),Qi("",JD(10,5,180*(null==n.resource?null:n.resource.data)/n.pi||0,"1.2-2")," deg"),V(3),Qi("",JD(13,8,(null==n.resource?null:n.resource.data)||0,"1.2-2")," rad"))},dependencies:[_i,nM,Ro,Fs,hB],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 KR{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,d=new Set;for(const h of e)!0===Array.isArray(h)?a.add(h):"object"==typeof h?l.add(h):"function"==typeof h?d.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===d.size){h=!0;for(const p of o)if(!1===d.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 mre(i,t){if(1&i&&(G(0,"mat-list-option",3),Be(1),j()),2&i){const e=t.$implicit,n=re();U("value",e)("selected",n.selectedValue==e),V(1),Qi(" ",e," ")}}function gre(i,t){if(1&i&&(G(0,"mat-card"),Ie(1,"app-editor",4),j()),2&i){const e=re();V(1),U("resource",e.resources[e.selectedValue])}}let xC=(()=>{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)(E(KR))},i.\u0275cmp=ot({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&&(G(0,"mat-selection-list",0),Oe("selectionChange",function(s){return n.selectedValue=s.source.selectedOptions.selected[0].value}),fe(1,mre,2,3,"mat-list-option",1),j(),fe(2,gre,2,1,"mat-card",2)),2&e&&(U("multiple",!1),V(1),U("ngForOf",n.keys),V(1),U("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})(),_re=(()=>{class i{constructor(){this._resource=null,this.resourceMap={},this.changed=new $e}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",iR("@transformPanel",[nR()],{optional:!0}))]),transformPanel:Oa("transformPanel",[Os("void",oi({opacity:0,transform:"scale(1, 0.8)"})),Or("void => showing",Yr("120ms cubic-bezier(0, 0, 0.2, 1)",oi({opacity:1,transform:"scale(1, 1)"}))),Or("* => void",Yr("100ms linear",oi({opacity:0})))])};let BH=0;const UH=new me("mat-select-scroll-strategy"),Tre=new me("MAT_SELECT_CONFIG"),Ire={provide:UH,deps:[as],useFactory:function Dre(i){return()=>i.scrollStrategies.reposition()}},Rre=new me("MatSelectTrigger");class kre{constructor(t,e){this.source=t,this.value=e}}const Pre=YM(JI(jM(WU(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 Te}}))));let Ore=(()=>{class i extends Pre{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(vl.required)??!1}set required(e){this._required=tn(e),this.stateChanges.next()}get multiple(){return this._multiple}set multiple(e){this._multiple=tn(e)}get disableOptionCentering(){return this._disableOptionCentering}set disableOptionCentering(e){this._disableOptionCentering=tn(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=Ps(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,d,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=d,this._liveAnnouncer=g,this._defaultOptions=b,this._panelOpen=!1,this._compareWith=(v,y)=>v===y,this._uid="mat-select-"+BH++,this._triggerAriaLabelledBy=null,this._destroy=new Te,this._onChange=()=>{},this._onTouched=()=>{},this._valueId="mat-select-value-"+BH++,this._panelDoneAnimatingStream=new Te,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=Ey(()=>{const v=this.options;return v?v.changes.pipe(Do(v),ks(()=>Cr(...v.map(y=>y.onSelectionChange)))):this._ngZone.onStable.pipe(Oi(1),ks(()=>this.optionSelectionChanges))}),this.openedChange=new $e,this._openedStream=this.openedChange.pipe(gn(v=>v),tt(()=>{})),this._closedStream=this.openedChange.pipe(gn(v=>!v),tt(()=>{})),this.selectionChange=new $e,this.valueChange=new $e,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 HR(this.multiple),this.stateChanges.next(),this._panelDoneAnimatingStream.pipe(Ql(),Ue(this._destroy)).subscribe(()=>this._panelDoneAnimating(this.panelOpen))}ngAfterContentInit(){this._initKeyManager(),this._selectionModel.changed.pipe(Ue(this._destroy)).subscribe(e=>{e.added.forEach(n=>n.select()),e.removed.forEach(n=>n.deselect())}),this.options.changes.pipe(Do(null),Ue(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&&!Qo(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||Qo(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(Oi(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 $Z(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=Cr(this.options.changes,this._destroy);this.optionSelectionChanges.pipe(Ue(e)).subscribe(n=>{this._onSelect(n.source,n.isUserInput),n.isUserInput&&!this.multiple&&this._panelOpen&&(this.close(),this.focus())}),Cr(...this.options.map(n=>n._stateChanges)).pipe(Ue(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)(E(LM),E(Qn),E(gt),E(YU),E(vt),E(Pa,8),E(hb,8),E(Gh,8),E(mC,8),E(tc,10),wa("tabindex"),E(UH),E(XI),E(Tre,8))},i.\u0275dir=ve({type:i,viewQuery:function(e,n){if(1&e&&($n(vre,5),$n(yre,5),$n(wU,5)),2&e){let r;At(r=Dt())&&(n.trigger=r.first),At(r=Dt())&&(n.panel=r.first),At(r=Dt())&&(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:[dt,xi]}),i})(),pb=(()=>{class i extends Ore{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(Ue(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 OQ(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 kre(this,e)}_getOverlayWidth(){return(this._preferredOverlayOrigin instanceof zI?this._preferredOverlayOrigin.elementRef:this._preferredOverlayOrigin||this._elementRef).nativeElement.getBoundingClientRect().width}get hideSingleSelectionIndicator(){return this._hideSingleSelectionIndicator}set hideSingleSelectionIndicator(e){this._hideSingleSelectionIndicator=tn(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=si(i)))(n||i)}}(),i.\u0275cmp=ot({type:i,selectors:[["mat-select"]],contentQueries:function(e,n,r){if(1&e&&(Wi(r,Rre,5),Wi(r,Nm,5),Wi(r,tV,5)),2&e){let s;At(s=Dt())&&(n.customTrigger=s.first),At(s=Dt())&&(n.options=s),At(s=Dt())&&(n.optionGroups=s)}},hostAttrs:["role","combobox","aria-autocomplete","none","aria-haspopup","listbox",1,"mat-mdc-select"],hostVars:19,hostBindings:function(e,n){1&e&&Oe("keydown",function(s){return n._handleKeydown(s)})("focus",function(){return n._onFocus()})("blur",function(){return n._onBlur()}),2&e&&(It("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()),ln("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:[Dn([{provide:UR,useExisting:i},{provide:eV,useExisting:i}]),dt],ngContentSelectors:Ere,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&&(or(Sre),G(0,"div",0,1),Oe("click",function(){return n.toggle()}),G(3,"div",2),fe(4,bre,2,1,"span",3),fe(5,Mre,3,2,"span",4),j(),G(6,"div",5)(7,"div",6),ki(),G(8,"svg",7),Ie(9,"path",8),j()()()(),fe(10,Cre,3,9,"ng-template",9),Oe("backdropClick",function(){return n.close()})("attach",function(){return n._onAttached()})("detach",function(){return n.close()})),2&e){const r=Zi(1);It("aria-owns",n.panelOpen?n.id+"-panel":null),V(3),U("ngSwitch",n.empty),It("id",n._valueId),V(1),U("ngSwitchCase",!0),V(1),U("ngSwitchCase",!1),V(5),U("cdkConnectedOverlayPanelClass",n._overlayPanelClass)("cdkConnectedOverlayScrollStrategy",n._scrollStrategy)("cdkConnectedOverlayOrigin",n._preferredOverlayOrigin||r)("cdkConnectedOverlayOpen",n.panelOpen)("cdkConnectedOverlayPositions",n._positions)("cdkConnectedOverlayWidth",n._overlayWidth)}},dependencies:[hm,by,VT,lB,wU,zI],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:[Are.transformPanel]},changeDetection:0}),i})(),VH=(()=>{class i{}return i.\u0275fac=function(e){return new(e||i)},i.\u0275mod=en({type:i}),i.\u0275inj=Wt({providers:[Ire],imports:[co,Pm,tR,Jn,Ky,gC,tR,Jn]}),i})();function Fre(i,t){if(1&i&&(G(0,"mat-label"),Be(1),j()),2&i){const e=re(3);V(1),ui(e.resource.name)}}function Lre(i,t){if(1&i&&(G(0,"mat-option",6),Be(1),j()),2&i){const e=t.$implicit,n=re(3);U("value",e[1])("disabled",n.disabled),V(1),Qi(" ",e[1]," ")}}function Nre(i,t){if(1&i){const e=jn();G(0,"mat-form-field",3),fe(1,Fre,2,1,"mat-label",0),G(2,"mat-select",4),Oe("valueChange",function(r){return Vt(e),Et(re(2).resource.data=r)})("selectionChange",function(){return Vt(e),Et(re(2).changed.emit())}),fe(3,Lre,2,3,"mat-option",5),j()()}if(2&i){const e=re(2);U("matTooltip",e.resourceDescription),V(1),U("ngIf",e.resource.name),V(1),U("value",e.resource.data)("disabled",e.disabled),V(1),U("ngForOf",e.resource.schema.enum_names)}}function Bre(i,t){if(1&i&&(G(0,"mat-label"),Be(1),j()),2&i){const e=re(3);V(1),ui(e.resource.name)}}function Ure(i,t){if(1&i){const e=jn();G(0,"mat-form-field",3),fe(1,Bre,2,1,"mat-label",0),G(2,"input",7),Oe("ngModelChange",function(r){return Vt(e),Et(re(2).resource.data=r)})("change",function(){return Vt(e),Et(re(2).changed.emit())}),j()()}if(2&i){const e=re(2);U("matTooltip",e.resourceDescription),V(1),U("ngIf",e.resource.name),V(1),U("min",0)("max",256*(e.resource.schema.length||1)-1)("ngModel",e.resource.data)}}function Vre(i,t){if(1&i&&(Gr(0),fe(1,Nre,4,5,"mat-form-field",1),fe(2,Ure,3,5,"ng-template",null,2,zc),Wr()),2&i){const e=Zi(3),n=re();V(1),U("ngIf",n.isKnownEnumValue(n.resource.data))("ngIfElse",e)}}let zre=(()=>{class i{constructor(){this.resource=null,this.resourceDescription="",this.disabled=!1,this.changed=new $e}isKnownEnumValue(e){return!!this.resource?.schema.enum_names.find(([n,r])=>r==e)}}return i.\u0275fac=function(e){return new(e||i)},i.\u0275cmp=ot({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&&fe(0,Vre,4,2,"ng-container",0),2&e&&U("ngIf",n.resource)},dependencies:[lo,_i,_l,mu,nc,_u,gu,Zc,yl,Ro,rc,Fs,pb,Nm],changeDetection:0}),i})();const Hre=["*"],Gre=["unscopedContent"];function Wre(i,t){1&i&&Yt(0,4)}function jre(i,t){if(1&i&&(G(0,"div",11),Ie(1,"input",12),G(2,"div",13),ki(),G(3,"svg",14),Ie(4,"path",15),j(),ya(),Ie(5,"div",16),j()()),2&i){const e=re();ln("mdc-checkbox--disabled",e.disabled),V(1),U("checked",e.selected)("disabled",e.disabled)}}function Yre(i,t){if(1&i&&(G(0,"div",17),Ie(1,"input",18),G(2,"div",19),Ie(3,"div",20)(4,"div",21),j()()),2&i){const e=re();ln("mdc-radio--disabled",e.disabled),V(1),U("checked",e.selected)("disabled",e.disabled)}}function qre(i,t){}function Xre(i,t){if(1&i&&(G(0,"span",22),fe(1,qre,0,0,"ng-template",23),j()),2&i){re();const e=Zi(3);V(1),U("ngTemplateOutlet",e)}}function Kre(i,t){}function Zre(i,t){if(1&i&&(G(0,"span",24),fe(1,Kre,0,0,"ng-template",23),j()),2&i){re();const e=Zi(5);V(1),U("ngTemplateOutlet",e)}}function Qre(i,t){}function Jre(i,t){1&i&&fe(0,Qre,0,0,"ng-template",23),2&i&&(re(),U("ngTemplateOutlet",Zi(1)))}function ese(i,t){}function tse(i,t){if(1&i&&(G(0,"span",25),fe(1,ese,0,0,"ng-template",23),j()),2&i){re();const e=Zi(3);V(1),U("ngTemplateOutlet",e)}}function nse(i,t){}function ise(i,t){if(1&i&&(G(0,"span",25),fe(1,nse,0,0,"ng-template",23),j()),2&i){re();const e=Zi(5);V(1),U("ngTemplateOutlet",e)}}function rse(i,t){}function sse(i,t){1&i&&fe(0,rse,0,0,"ng-template",23),2&i&&(re(),U("ngTemplateOutlet",Zi(1)))}const ose=[[["","matListItemTitle",""]],[["","matListItemLine",""]],"*",[["mat-divider"]],[["","matListItemAvatar",""],["","matListItemIcon",""]]],ase=["[matListItemTitle]","[matListItemLine]","*","mat-divider","[matListItemAvatar],[matListItemIcon]"],zH=new me("ListOption");let lse=(()=>{class i{constructor(e){this._elementRef=e}}return i.\u0275fac=function(e){return new(e||i)(E(vt))},i.\u0275dir=ve({type:i,selectors:[["","matListItemTitle",""]],hostAttrs:[1,"mat-mdc-list-item-title","mdc-list-item__primary-text"]}),i})(),cse=(()=>{class i{constructor(e){this._elementRef=e}}return i.\u0275fac=function(e){return new(e||i)(E(vt))},i.\u0275dir=ve({type:i,selectors:[["","matListItemLine",""]],hostAttrs:[1,"mat-mdc-list-item-line","mdc-list-item__secondary-text"]}),i})(),HH=(()=>{class i{constructor(e){this._listOption=e}_isAlignedAtStart(){return!this._listOption||"after"===this._listOption?._getTogglePosition()}}return i.\u0275fac=function(e){return new(e||i)(E(zH,8))},i.\u0275dir=ve({type:i,hostVars:4,hostBindings:function(e,n){2&e&&ln("mdc-list-item__start",n._isAlignedAtStart())("mdc-list-item__end",!n._isAlignedAtStart())}}),i})(),dse=(()=>{class i extends HH{}return i.\u0275fac=function(){let t;return function(n){return(t||(t=si(i)))(n||i)}}(),i.\u0275dir=ve({type:i,selectors:[["","matListItemAvatar",""]],hostAttrs:[1,"mat-mdc-list-item-avatar"],features:[dt]}),i})(),use=(()=>{class i extends HH{}return i.\u0275fac=function(){let t;return function(n){return(t||(t=si(i)))(n||i)}}(),i.\u0275dir=ve({type:i,selectors:[["","matListItemIcon",""]],hostAttrs:[1,"mat-mdc-list-item-icon"],features:[dt]}),i})();const hse=new me("MAT_LIST_CONFIG");let ZR=(()=>{class i{constructor(){this._isNonInteractive=!0,this._disableRipple=!1,this._disabled=!1,this._defaultOptions=Lt(hse,{optional:!0})}get disableRipple(){return this._disableRipple}set disableRipple(e){this._disableRipple=tn(e)}get disabled(){return this._disabled}set disabled(e){this._disabled=tn(e)}}return i.\u0275fac=function(e){return new(e||i)},i.\u0275dir=ve({type:i,hostVars:1,hostBindings:function(e,n){2&e&&It("aria-disabled",n.disabled)},inputs:{disableRipple:"disableRipple",disabled:"disabled"}}),i})(),$H=(()=>{class i{set lines(e){this._explicitLines=Ps(e,null),this._updateItemLines(!1)}get disableRipple(){return this.disabled||this._disableRipple||this._noopAnimations||!!this._listBase?.disableRipple}set disableRipple(e){this._disableRipple=tn(e)}get disabled(){return this._disabled||!!this._listBase?.disabled}set disabled(e){this._disabled=tn(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 Qt,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(Cr(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)(E(vt),E(gt),E(ZR,8),E(zi),E(eR,8),E(kr,8))},i.\u0275dir=ve({type:i,contentQueries:function(e,n,r){if(1&e&&(Wi(r,dse,4),Wi(r,use,4)),2&e){let s;At(s=Dt())&&(n._avatars=s),At(s=Dt())&&(n._icons=s)}},hostVars:4,hostBindings:function(e,n){2&e&&(It("aria-disabled",n.disabled)("disabled",n._isButtonElement&&n.disabled||null),ln("mdc-list-item--disabled",n.disabled))},inputs:{lines:"lines",disableRipple:"disableRipple",disabled:"disabled"}}),i})();const GH=new me("SelectionList");let wC=(()=>{class i extends $H{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=tn(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 $e,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)(E(vt),E(gt),E(GH),E(zi),E(Qn),E(eR,8),E(kr,8))},i.\u0275cmp=ot({type:i,selectors:[["mat-list-option"]],contentQueries:function(e,n,r){if(1&e&&(Wi(r,cse,5),Wi(r,lse,5)),2&e){let s;At(s=Dt())&&(n._lines=s),At(s=Dt())&&(n._titles=s)}},viewQuery:function(e,n){if(1&e&&$n(Gre,5),2&e){let r;At(r=Dt())&&(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&&Oe("blur",function(){return n._handleBlur()})("click",function(){return n._toggleOnInteraction()}),2&e&&(It("aria-selected",n.selected),ln("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:[Dn([{provide:$H,useExisting:i},{provide:zH,useExisting:i}]),dt],ngContentSelectors:ase,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&&(or(ose),fe(0,Wre,1,0,"ng-template",null,0,zc),fe(2,jre,6,4,"ng-template",null,1,zc),fe(4,Yre,5,4,"ng-template",null,2,zc),fe(6,Xre,2,1,"span",3),fe(7,Zre,2,1,"span",4),fe(8,Jre,1,1,"ng-template",5),G(9,"span",6),Yt(10),Yt(11,1),G(12,"span",7,8),Oe("cdkObserveContent",function(){return n._updateItemLines(!0)}),Yt(14,2),j()(),fe(15,tse,2,1,"span",9),fe(16,ise,2,1,"span",9),fe(17,sse,1,1,"ng-template",5),Yt(18,3),Ie(19,"div",10)),2&e&&(V(6),U("ngIf",n._hasCheckboxAt("before")),V(1),U("ngIf",n._hasRadioAt("before")),V(1),U("ngIf",n._hasIconsOrAvatarsAt("before")),V(7),U("ngIf",n._hasCheckboxAt("after")),V(1),U("ngIf",n._hasRadioAt("after")),V(1),U("ngIf",n._hasIconsOrAvatarsAt("after")))},dependencies:[SU,_i,xy],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 fse={provide:Io,useExisting:Gn(()=>MC),multi:!0};class pse{constructor(t,e){this.source=t,this.options=e}}let MC=(()=>{class i extends ZR{get multiple(){return this._multiple}set multiple(e){const n=tn(e);n!==this._multiple&&(this._multiple=n,this.selectedOptions=new HR(this._multiple,this.selectedOptions.selected))}get hideSingleSelectionIndicator(){return this._hideSingleSelectionIndicator}set hideSingleSelectionIndicator(e){this._hideSingleSelectionIndicator=tn(e)}constructor(e,n){super(),this._element=e,this._ngZone=n,this._initialized=!1,this._destroyed=new Te,this._onChange=r=>{},this.selectionChange=new $e,this.color="accent",this.compareWith=(r,s)=>r===s,this._multiple=!0,this._hideSingleSelectionIndicator=this._defaultOptions?.hideSingleSelectionIndicator??!1,this.selectedOptions=new HR(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 pse(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=tn(e),this._selectionListDisabled&&this._keyManager?.setActiveItem(-1)}registerOnChange(e){this._onChange=e}registerOnTouched(e){this._onTouched=e}_watchForSelectionChange(){this.selectedOptions.changed.pipe(Ue(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()&&Qo(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 kU(this._items).withHomeAndEnd().withTypeAhead().withWrap().skipPredicate(()=>this.disabled),this._resetActiveOption(),this._keyManager.change.subscribe(e=>this._setActiveOption(e)),this._items.changes.pipe(Ue(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=FM();return e&&this._element.nativeElement.contains(e)}}return i.\u0275fac=function(e){return new(e||i)(E(vt),E(gt))},i.\u0275cmp=ot({type:i,selectors:[["mat-selection-list"]],contentQueries:function(e,n,r){if(1&e&&Wi(r,wC,5),2&e){let s;At(s=Dt())&&(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&&Oe("keydown",function(s){return n._handleKeydown(s)}),2&e&&It("aria-multiselectable",n.multiple)},inputs:{color:"color",compareWith:"compareWith",multiple:"multiple",hideSingleSelectionIndicator:"hideSingleSelectionIndicator",disabled:"disabled"},outputs:{selectionChange:"selectionChange"},exportAs:["matSelectionList"],features:[Dn([fse,{provide:ZR,useExisting:i},{provide:GH,useExisting:i}]),dt,xi],ngContentSelectors:Hre,decls:1,vars:0,template:function(e,n){1&e&&(or(),Yt(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})(),mse=(()=>{class i{}return i.\u0275fac=function(e){return new(e||i)},i.\u0275mod=en({type:i}),i.\u0275inj=Wt({imports:[HI,co,Jn,tb,JU,kV]}),i})();function gse(i,t){if(1&i&&(G(0,"mat-label"),Be(1),j()),2&i){const e=re(2);V(1),ui(e.resource.name)}}function _se(i,t){if(1&i&&(G(0,"mat-list-option",5),Be(1),j()),2&i){const e=t.$implicit,n=re(2);U("value",e.key)("selected",n.resource.data[e.key])("disabled",n.disabled),V(1),Qi(" ",e.key," ")}}function vse(i,t){if(1&i){const e=jn();Gr(0,1),fe(1,gse,2,1,"mat-label",2),G(2,"mat-selection-list",3),Oe("selectionChange",function(r){return Vt(e),Et(re().onSelection(r))}),fe(3,_se,2,4,"mat-list-option",4),ct(4,"keyvalue"),j(),Wr()}if(2&i){const e=re();U("matTooltip",e.resourceDescription),V(1),U("ngIf",e.resource.name),V(1),U("disabled",e.disabled),V(1),U("ngForOf",ut(4,4,e.resource.data))}}let yse=(()=>{class i{constructor(){this.resource=null,this.resourceDescription="",this.disabled=!1,this.changed=new $e}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=ot({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&&fe(0,vse,5,6,"ng-container",0),2&e&&U("ngIf",n.resource)},dependencies:[lo,_i,Ro,Fs,MC,wC,dB],styles:["[_nghost-%COMP%]{padding-bottom:1.34375em}"],changeDetection:0}),i})();class WH{get tick$(){return this._tick$.asObservable()}get children(){return[...this._children]}constructor(t){this.parent=t,this._tick$=new Te,this._children=[],t&&t.addChild(this)}addChild(t){if(t.parent!==this)throw new Error("Incorrect child clock");this._children.includes(t)||this._children.push(t)}removeChild(t){if(t.parent!==this)throw new Error("Incorrect child clock");this._children=this._children.filter(e=>e!==t)}dispose(){this.parent&&this.parent.removeChild(this);for(const t of this._children)t.dispose();this._tick$.complete()}}const xse=typeof performance>"u"?()=>Date.now():()=>performance.now();class jm extends WH{static get instance(){return jm._instance||(jm._instance=new jm),jm._instance}get elapsedTime(){return xse()}constructor(){super(null);let t=this.elapsedTime;const e=()=>{requestAnimationFrame(e);const n=t,r=this.elapsedTime;t=r,this._tick$.next([n,r-n])};requestAnimationFrame(e)}dispose(){throw new Error("Cannot dispose global clock")}}class jH extends WH{get isRunning(){return!!this.tickSub}get isPaused(){return-1!==this.pausedAt}get isStopped(){return-1===this.startedAt}get timeScale(){return this._timeScale}set timeScale(t){if(t!==this._timeScale||this.pausedByTimescale&&0!==t){if(0===t)return void(this.isPaused||(this.pause(),this.pausedByTimescale=!0));if(this.isPaused&&this.pausedByTimescale&&(this.resume(),this.pausedByTimescale=!1),!this.isStopped){const e=this.isPaused?this.pausedAt:this.parentClock.elapsedTime;this.startedAt=e-(e-this.startedAt)*this.timeScale/t}this._timeScale=t}}get elapsedTime(){return this.isStopped?this.lastStopElapsed:this.isPaused?this._timeScale*(this.pausedAt-this.startedAt):this._timeScale*(this.parentClock.elapsedTime-this.startedAt)}constructor(t=!1,e=jm.instance){super(e),this.parentClock=e,this.tickSub=null,this._internalTick$=new Te,this.tickRateLimit=0,this.paused$=new Te,this.startedAt=-1,this.oldRelativeTime=0,this.pausedAt=-1,this.lastStopElapsed=0,this._timeScale=1,this.pausedByTimescale=!1,this.lastFiredTickElapsed=0,t&&this.start(),this._internalTick$.pipe(tt(([n,r])=>[r,r-this.lastFiredTickElapsed]),gn(([n])=>!this.tickRateLimit||Math.floor(this.lastFiredTickElapsed*this.tickRateLimit/1e3)this.lastFiredTickElapsed=n)).subscribe(this._tick$)}start(){this.isRunning||(this.oldRelativeTime=0,this.startedAt=this.parentClock.elapsedTime,this.startListeningTicks())}stop(){this.stopListeningTicks(),this.lastStopElapsed=this.elapsedTime,this.startedAt=this.pausedAt=-1}pause(){this.stopListeningTicks(),this.pausedAt=this.parentClock.elapsedTime,this.pausedByTimescale=!1,this.paused$.next(!0)}resume(){this.isRunning||-1==this.pausedAt||(this.startedAt+=this.parentClock.elapsedTime-this.pausedAt,this.pausedAt=-1,this.startListeningTicks(),this.paused$.next(!1))}startListeningTicks(){if(this.tickSub)throw new Error("Clock is already ticking!");this.tickSub=this.parentClock.tick$.pipe(tt(([t,e])=>[this.oldRelativeTime,this.oldRelativeTime+e*this.timeScale]),Vi(([t,e])=>this.oldRelativeTime=e)).subscribe(this._internalTick$)}stopListeningTicks(){var t;null===(t=this.tickSub)||void 0===t||t.unsubscribe(),this.tickSub=null}dispose(){this.stopListeningTicks(),this._internalTick$.complete(),super.dispose()}}const wse={transparent:!1,background:0,size:"fullscreen",antialias:!0};class Mse{constructor(t,e,n={}){this.scene=t,this.canvas=e,this.entity=null,this.rendererOptions=Object.assign(Object.assign({},wse),n||{})}}class mb{static fromArray(t,e=!1){const n=new mb(t[0]);let r=n;for(let s=1;sn.map(r=>new mb(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]}constructor(t){this.data=t,this.adjacent=new Set}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(d=>!e.has(d));for(const d of c)e.add(d),r.push([d,a-1])}}return n}nodes(){return Array.from(this.walkRead(-1))}}var oc=(()=>{return(i=oc||(oc={}))[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",oc;var i})();let Kh=(()=>{class i{constructor(){this.tick$=new Te,this._world=null,this._name="e0x"+(i.default_name_counter++).toString(16),this._selfActive=!0,this.parent=null,this._children=[],this._components=[],this._onSpawned$=new Te,this._onRemoved$=new Te}get world(){return this._world}get name(){return this._name}set name(e){this._name=e}get active(){return this._selfActive&&(!this.parent||this.parent.active)}set active(e){this._selfActive=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 Cse extends Kh{constructor(t){super(),this.tickOrder=t}}function Ym(i,t=oc.CONTROLLERS,e){const n=new Cse(t);return e&&(n.name=e),i.addEntity(n),n.tick$.pipe(su(()=>{i.removeEntity(n,!0)}))}class QR extends Kh{get rendererSize$(){return this._rendererSize$.asObservable()}get rendererSize(){return this._rendererSize$.getValue()}get rendererOptions(){return this.renderer.rendererOptions}get physicsDebugViewActive(){return this.renderer.physicsDebugViewActive}set physicsDebugViewActive(t){this.renderer.physicsDebugViewActive=t}constructor(t){super(),this.renderer=t,this.tickOrder=oc.RENDERING,this._rendererSize$=new Qe(null),this.addComponents(t),this.tick$.subscribe(()=>{this.renderer.render()})}onSpawned(t){this._rendererSize$.next(null),"fullscreen"==this.rendererOptions.size||"function"==typeof this.rendererOptions.size?(this.renderer.canvas&&(this.renderer.canvas.style.position="absolute"),Cr(To(window,"resize").pipe(Wy(100)),To(window,"orientationchange")).pipe(Ue(this._onRemoved$),tt(()=>({x:window.innerWidth,y:window.innerHeight})),Do({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 In||void 0!==this.rendererOptions.size.subscribe&&void 0!==this.rendererOptions.size.pipe?this.rendererOptions.size.pipe(Ue(this._onRemoved$)).subscribe(e=>{this._rendererSize$.next(e)}):this._rendererSize$.next(this.rendererOptions.size),this._rendererSize$.pipe(Ue(this._onRemoved$),Ql((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 JR=i=>{i.updateVisibility?i.updateVisibility():YH(i)},YH=i=>{for(const t of i.children)JR(t)};class Sse extends Kh{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(){YH(this)}addChildren(...t){super.addChildren(...t);for(const e of t)JR(e)}removeChildren(t,e=!1){if(super.removeChildren(t,e),!e)for(const n of t)JR(n)}}class ek{constructor(){this._running=!1,this.stop$=new Te}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 Ese extends ek{get output$(){return this._output$.asObservable()}constructor(t,e){super(),this.keyboard=t,this.keymap=e,this._output$=new Te}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")),Ra(t.map(e=>this.keyboard.bindMany(...e))).pipe(Ue(this.stop$),tt(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 tk=new In(ms);class CC extends ek{constructor(){super(),this.bindings={},this.skipKeyDownsOnExternalFocus=!0,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 Qe(!1);return this.bindings[t].push(e),e.pipe(Ql(),su(()=>{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"),tk;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 Qe(!1);this.bindings[n].push(r),e.push(r)}return Ra(e).pipe(su(()=>{for(let n=0;nn.includes(!0)),Ql())}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 CC.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)}}CC.externalFocusBlacklist=[HTMLInputElement,HTMLTextAreaElement,HTMLSelectElement,HTMLButtonElement];class yi{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 yi.len(yi.sub(t,e))}static norm(t){const e=yi.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 Dse={pointerLock:!1};var Ls=(()=>{return(i=Ls||(Ls={}))[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",Ls;var i})();class qm extends ek{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$=To(this._element,"wheel",{passive:!1}).pipe(Ue(this.stopped$),su(()=>this._wheel$=null),Vi(t=>t.preventDefault()),tt(t=>t.deltaY),Vf())),this._wheel$}get isPointerLocked(){return!!document.pointerLockElement}get isPointerLocked$(){return To(document,"pointerlockchange").pipe(tt(()=>this.isPointerLocked))}get state(){return this._state$.getValue()}get state$(){return this._state$.asObservable()}get multiTouchPositions$(){return this._multiTouchPositions$.asObservable()}get twoTouchGestureDelta$(){return this.state$.pipe(ks(t=>t==Ls.DRAG_TOUCH_TWO_FINGERS?this.multiTouchPositions$:tk),tt(t=>t.map(e=>({x:e.x,y:e.y}))),function Ase(){return ni((i,t)=>{let e,n=!1;i.subscribe(qn(t,r=>{const s=e;e=r,n&&t.next([s,r]),n=!0}))})}(),gn(([t,e])=>t.length>1&&e.length>1),tt(([t,e])=>({centerPointDelta:yi.sub(yi.scalarMult(e.reduce((n,r)=>yi.add(n,r),yi.O),1/e.length),yi.scalarMult(t.reduce((n,r)=>yi.add(n,r),yi.O),1/e.length)),angleDelta:yi.angle(e[1],e[0])-yi.angle(t[1],t[0]),distanceDelta:yi.dist(e[1],e[0])-yi.dist(t[1],t[0])})))}get _element(){return this.options.canvas||window}constructor(t={}){super(),this._wheel$=null,this._delta$=new Te,this._position$=new Qe(yi.O),this._multiTouchPositions$=new Qe([]),this.stopped$=new Te,this._state$=new Qe(Ls.NONE),this.options=Object.assign(Object.assign({},Dse),t),this.canvasClickListener=this.canvasClickListener.bind(this)}startInternal(){this.options.canvas&&(this.options.canvas.style.touchAction="none"),this._state$.next(Ls.NONE);const t=[Ls.DRAG,Ls.DRAG_MIDDLE_BUTTON,Ls.DRAG_RIGHT_BUTTON],e=[Ls.NONE,Ls.DRAG,Ls.DRAG_TOUCH_TWO_FINGERS],n=[],r={};To(this._element,"mousemove").pipe(Ue(this.stopped$)).subscribe(o=>{this._delta$.next({x:o.movementX,y:o.movementY})}),To(this._element,"pointermove").pipe(Ue(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})}),!qm.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{if(0===n.length)try{this.options.canvas&&this.options.canvas.setPointerCapture(o.pointerId),window.addEventListener("pointerup",s),this._element.addEventListener("pointercancel",s)}catch(a){console.error(a)}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]||Ls.NONE)}),To(this._element,"contextmenu").pipe(Ue(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 Tse{static lookAt(t,e,n){let r=Re.sub(t,e);r=0===Re.lenSq(r)?Object.assign(Object.assign({},r),{z:1}):Re.norm(r);let s=Re.cross(n,r);0===Re.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=Re.norm(r),s=Re.cross(n,r)),s=Re.norm(s);let o=Re.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 Yi{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,d=t.w*Math.sin((1-n)*s)/o+e.w*Math.sin(n*s)/o;return isNaN(a)||isNaN(l)||isNaN(c)||isNaN(d)?Yi.clone(t):{x:a,y:l,z:c,w:d}}static fromAngle(t,e){const n=e/2,r=Math.sin(n);return Object.assign(Object.assign({},Re.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],d=t[10],h=e+o+d;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>d){const p=2*Math.sqrt(1+e-o-d);return{x:.25*p,y:(n+s)/p,z:(r+l)/p,w:(c-a)/p}}if(o>d){const p=2*Math.sqrt(1+o-e-d);return{x:(n+s)/p,y:.25*p,z:(a+c)/p,w:(r-l)/p}}{const p=2*Math.sqrt(1+d-e-o);return{x:(r+l)/p,y:(a+c)/p,z:.25*p,w:(s-n)/p}}}static fromMatrix3(t){const e=t[0][0]+t[1][1]+t[2][2];let n,r,s,o;if(e>0){const a=.5/Math.sqrt(e+1);n=.25/a,r=(t[2][1]-t[1][2])*a,s=(t[0][2]-t[2][0])*a,o=(t[1][0]-t[0][1])*a}else if(t[0][0]>t[1][1]&&t[0][0]>t[2][2]){const a=2*Math.sqrt(1+t[0][0]-t[1][1]-t[2][2]);n=(t[2][1]-t[1][2])/a,r=.25*a,s=(t[0][1]+t[1][0])/a,o=(t[0][2]+t[2][0])/a}else if(t[1][1]>t[2][2]){const a=2*Math.sqrt(1+t[1][1]-t[0][0]-t[2][2]);n=(t[0][2]-t[2][0])/a,r=(t[0][1]+t[1][0])/a,s=.25*a,o=(t[1][2]+t[2][1])/a}else{const a=2*Math.sqrt(1+t[2][2]-t[0][0]-t[1][1]);n=(t[1][0]-t[0][1])/a,r=(t[0][2]+t[2][0])/a,s=(t[1][2]+t[2][1])/a,o=.25*a}return{w:n,x:r,y:s,z:o}}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),d=Math.sin(.5*e);return{w:c*a*s+d*l*o,x:d*a*s-c*l*o,y:c*l*s+d*a*o,z:c*a*o-d*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=Re.Z){return this.fromMatrix4(Tse.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 Re{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 Re.len(Re.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=Re.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,Yi.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)}}}function nk(i,t,e,n){return r=>r.pipe(tI((s,o)=>{var a;return{targetValue:o,currentValue:null!==(a=s.currentValue)&&void 0!==a?a:o,hasReachedTarget:!1}},{targetValue:null,currentValue:null,hasReachedTarget:!1}),ks(s=>i.pipe(tt(([o,a])=>{if(null===s.targetValue||null===s.currentValue)return s.currentValue;if(s.hasReachedTarget)return;const l=1-Math.exp(-a/t),c=e(s.currentValue,s.targetValue,l);return s.currentValue=c,n(c,s.targetValue)?(s.hasReachedTarget=!0,s.targetValue):c}))),tt(s=>void 0!==s?s:null),gn(s=>null!==s))}ps(738);class kse extends Kh{get avgReport(){return this._avgReport}get peakReport(){return this._peakReport}constructor(t=60,e=15){super(),this.maxSamples=t,this.maxRows=e,this.tickOrder=Number.MAX_SAFE_INTEGER,this.sampleIndex=0,this.collectedData=new Map,this._avgReport={totalTime:0,entries:[]},this._peakReport={totalTime:0,entries:[]}}onSpawned(t){super.onSpawned(t),this.sampleIndex=0;const e=()=>(typeof performance>"u"?Date:performance).now();this.world.tickForwardTo$.pipe(Ue(this.onRemoved$)).subscribe(n=>{n!==this&&(this.collectedData.has(n)?this.collectedData.get(n).push([this.sampleIndex,e(),0]):this.collectedData.set(n,[[this.sampleIndex,e(),0]]))}),this.world.tickForwardedTo$.pipe(Ue(this.onRemoved$)).subscribe(n=>{if(n===this)return;const r=this.collectedData.get(n);r[r.length-1][2]=e()}),this.tick$.pipe(Ue(this.onRemoved$)).subscribe(()=>{this.sampleIndex++;const n=Array.from(this.collectedData.entries());for(const[h,p]of n){for(;p.length>0&&p[0][0]h instanceof Kh?""===h.name?h.constructor.name:h.name:"PHYSICS_WORLD"===h?"Physics simulation":h,s=h=>{let p=0,m=0;for(;mh.length-m+1){m--;break}p+=h[h.length-m-1][1]}return m>1&&(h=h.slice(0,h.length-m)).push([`Rest (${m})`,p]),h};let o=0,a=Array.from(this.collectedData.entries()).map(([h,p])=>{const m=p.reduce((g,[b,v,y])=>g+y-v,0)/this.maxSamples;return o+=m,[r(h),m]}).sort((h,p)=>p[1]-h[1]);a=s(a),this._avgReport={totalTime:o,entries:a};let l=new Map,c=Array.from(this.collectedData.entries()).map(([h,p])=>{let m=0;for(const[g,b,v]of p){const y=v-b;m=Math.max(m,y),l.set(g,y+(l.get(g)||0))}return[r(h),m]}).sort((h,p)=>p[1]-h[1]);c=s(c);let d=Array.from(l.values()).reduce((h,p)=>Math.max(h,p),0);this._peakReport={totalTime:d,entries:c}})}onRemoved(){super.onRemoved(),this.collectedData=new Map,this._avgReport={totalTime:0,entries:[]},this._peakReport={totalTime:0,entries:[]}}}var Xm=function(i,t,e,n){return new(e||(e=Promise))(function(s,o){function a(d){try{c(n.next(d))}catch(h){o(h)}}function l(d){try{c(n.throw(d))}catch(h){o(h)}}function c(d){d.done?s(d.value):function r(s){return s instanceof e?s:new e(function(o){o(s)})}(d.value).then(a,l)}c((n=n.apply(i,t||[])).next())})};class bl{static get documentWorlds(){return[...bl._documentWorlds]}constructor(t,e){this.visualScene=t,this.physicsWorld=e,this.worldClock=new jH(!1),this.keyboardInput=new CC,this.name="w0x"+(bl.default_name_counter++).toString(16),this.children=[],this.tickListeners=[],this.tickStarted$=new Te,this.tickForwardTo$=new Te,this.tickForwardedTo$=new Te,this.paused$=new Te,this.disposed$=new Te,this.keyboardInput.start(),window.ggstatic?this.registerConsoleCommands(window.ggstatic):(this.onGgStaticInitialized=this.onGgStaticInitialized.bind(this),window.addEventListener("ggstatic_added",this.onGgStaticInitialized)),this.worldClock.paused$.subscribe(this.paused$),bl._documentWorlds.push(this),bl.worldCreated$.next(this)}init(){return Xm(this,void 0,void 0,function*(){yield Promise.all([this.physicsWorld.init(),this.visualScene.init()]);const t=(e,n,r)=>{e.active&&(this.tickForwardTo$.next(e),e.tick$.next([n,r]),this.tickForwardedTo$.next(e))};this.worldClock.tick$.subscribe(([e,n])=>{this.tickStarted$.next();let r=0;for(;r=oc.PHYSICS_SIMULATION);r++)t(this.tickListeners[r],e,n);for(this.tickForwardTo$.next("PHYSICS_WORLD"),this.physicsWorld.simulate(n),this.tickForwardedTo$.next("PHYSICS_WORLD");re.tickOrder-n.tickOrder),t.onSpawned(this))}removeEntity(t,e=!1){if(t.world){if(t.world!==this)throw new Error("Entity is not a part of this world");this.children.splice(this.children.findIndex(n=>n===t),1),this.tickListeners.splice(this.tickListeners.findIndex(n=>n===t),1),t.onRemoved()}e&&t.dispose()}onGgStaticInitialized(){window.removeEventListener("ggstatic_added",this.onGgStaticInitialized),this.registerConsoleCommands(window.ggstatic)}registerConsoleCommands(t){t.registerConsoleCommand(this,"timescale",(...e)=>Xm(this,void 0,void 0,function*(){return isNaN(+e[0])||(this.worldClock.timeScale=+e[0]),this.worldClock.timeScale.toString()}),"args: [ float? ]; Get current time scale of selected world clock or set it. Default value is 1.0 (no time scale applied)"),t.registerConsoleCommand(this,"fps_limit",(...e)=>Xm(this,void 0,void 0,function*(){return isNaN(+e[0])||(this.worldClock.tickRateLimit=+e[0]),this.worldClock.tickRateLimit.toString()}),"args: [ int? ]; Get current tick rate limit of selected world clock or set it. 0 means no limit applied"),t.registerConsoleCommand(this,"renderers",()=>Xm(this,void 0,void 0,function*(){return this.children.filter(e=>e instanceof QR).map(e=>e.name).join("\n")}),"no args; Print all renderers in selected world"),t.registerConsoleCommand(this,"debug_view",(...e)=>Xm(this,void 0,void 0,function*(){let r,n="toggle";for(let o of e)["1","0"].includes(o)?n="1"===o:r=o;let s=this.children.find(o=>o instanceof QR&&(!r||o.name===r));if(s)return s.physicsDebugViewActive="toggle"===n?!s.physicsDebugViewActive:n,s.physicsDebugViewActive?"1":"0";throw r?new Error(`Renderer with name "${r}" not found`):new Error("No renderer found")}),'args: [ 0|1?, string? ]; Turn on/off physics debug view, skip first argument to toggle value. Second argument expects renderer name, if not provided first renderer will be picked. Use "renderers" to get list of renderers in the world'),t.registerConsoleCommand(this,"performance",(...e)=>Xm(this,void 0,void 0,function*(){let n="avg",r=20;for(let d of e)["avg","peak"].includes(d)?n=d:isNaN(+d)||(r=+d);const s=new kse(r,250);this.addEntity(s),yield function Ise(i,t){const e="object"==typeof t;return new Promise((n,r)=>{let o,s=!1;i.subscribe({next:a=>{o=a,s=!0},error:r,complete:()=>{s?n(o):e?n(t.defaultValue):r(new fm)}})})}(this.worldClock.tick$.pipe(Oi(r)));const o="avg"===n?s.avgReport:s.peakReport;this.removeEntity(s);const a=o.entries.map(([d,h])=>`${d}:`+new Array(Math.max(0,26-d.length)).join(" ")+`${h.toFixed(2)} ms`+("avg"===n?` (${(100*h/o.totalTime).toFixed(2)}%)`:""));let l="lightgreen";o.totalTime>12&&(l=o.totalTime<16?"yellow":"red");const c=("avg"===n?"Average":"Peak")+" Frame time";return a.unshift(c+":"+new Array(Math.max(0,26-c.length)).join(" ")+`${o.totalTime.toFixed(2)} ms`),a.unshift(`Performance report (${r} samples)`),a.join("\n")}),'args: [ int?, avg|peak? ]; Measure how much time was spent per entity in world. Arguments are samples amount (20 by default) and "peak" or "avg" choice, both arguments are optional. "avg" report sorts entities by average time consumed, "peak" records highest value for each entity')}}bl.default_name_counter=0,bl._documentWorlds=[],bl.worldCreated$=new Te;class Lse extends Mse{}class XH extends Sse{constructor(){super(...arguments),this._world=null}get world(){return this._world}}class ea extends XH{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}constructor(t){super(),this.tickOrder=oc.OBJECTS_BINDING,this._position=Re.O,this._rotation=Yi.O,this.object3D=null,this.objectBody=null,t.objectBody&&(this.objectBody=t.objectBody,this.name=this.objectBody.name,this.addComponents(this.objectBody)),t.object3D&&(this.object3D=t.object3D,t.objectBody||(this._position=this.object3D.position,this._rotation=this.object3D.rotation,this.name=this.object3D.name),this.addComponents(this.object3D)),this.objectBody&&(this.tick$.subscribe(()=>{this.runTransformBinding(this.objectBody,this.object3D)}),this.runTransformBinding(this.objectBody,this.object3D))}}class Km extends mb{static fromMapArray(t,e=!1){const n=new Km(t[0]);let r=n;for(let s=1;sn.map(r=>new Km(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));othis.mapGraph.getNearestDummy(this.mapGraphNodes,this.loaderCursor$.getValue())),Ql(),Vi(r=>this._nearestDummy$.next(r))).subscribe(r=>{let o,s=new Set;if(this.options.inertia>0){o=new Set;const a=r.walkReadPreserveDepth(this.options.loadDepth+this.options.inertia);for(let l=0;lo.add(c.data)),l<=this.options.loadDepth&&a[l].forEach(c=>s.add(c.data))}else r.walkRead(this.options.loadDepth).forEach(a=>s.add(a.data)),o=s;for(const a of this.loaded.keys())o.has(a)?s.delete(a):n.includes(a)||n.push(a);for(let a of Array.from(s.keys()))e.includes(a)||e.push(a)}),this.tick$.pipe(Do(null),Ue(this._onRemoved$)).subscribe(()=>{if(n.length){for(const r of n)this.disposeChunk(r);n=[]}if(e.length)if(this._initialLoadComplete$.value&&e.length>this.options.maxNodesLoadingPerTick){let r=e.slice(0,this.options.maxNodesLoadingPerTick);e=e.slice(this.options.maxNodesLoadingPerTick),Promise.all(r.map(s=>this.loadChunk(s))).then()}else Promise.all(e.map(r=>this.loadChunk(r))).then(()=>{this._initialLoadComplete$.value||this._initialLoadComplete$.next(!0)}),e=[]})}onRemoved(){super.onRemoved(),this.loadClock&&(this.loadClock.stop(),this.loadClock=null),this.loaderCursor$.next(Re.O)}loadChunk(t){return function(i,t,e,n){return new(e||(e=Promise))(function(s,o){function a(d){try{c(n.next(d))}catch(h){o(h)}}function l(d){try{c(n.throw(d))}catch(h){o(h)}}function c(d){d.done?s(d.value):function r(s){return s instanceof e?s:new e(function(o){o(s)})}(d.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||Yi.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||Yi.O}]),[n,e]})}disposeChunk(t){this.loaded.has(t)&&(this.removeChildren(this.loaded.get(t),!0),this.loaded.delete(t))}}class Use extends QR{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 e4=function(i,t,e,n){return new(e||(e=Promise))(function(s,o){function a(d){try{c(n.next(d))}catch(h){o(h)}}function l(d){try{c(n.throw(d))}catch(h){o(h)}}function c(d){d.done?s(d.value):function r(s){return s instanceof e?s:new e(function(o){o(s)})}(d.value).then(a,l)}c((n=n.apply(i,t||[])).next())})};const t4={keymap:"wasd",cameraLinearSpeed:20,cameraMovementElasticity:0,cameraBoostMultiplier:2.5,cameraRotationSensitivity:1,cameraRotationElasticity:0,mouseOptions:{},ignoreMouseUnlessPointerLocked:!1,ignoreKeyboardUnlessPointerLocked:!1};class n4 extends Kh{get active(){return super.active}set active(t){!super.active&&t&&this.reset(),super.active=t}get spherical(){return this._spherical}set spherical(t){this._spherical.phi=Math.max(1e-6,Math.min(Math.PI-1e-6,t.phi)),this._spherical.theta=t.theta,this.resetMotion$.next()}constructor(t,e,n={}){super(),this.keyboard=t,this.camera=e,this.tickOrder=oc.INPUT_CONTROLLERS,this._spherical={phi:0,radius:1,theta:0},this.resetMotion$=new Te,this.options=Object.assign(Object.assign({},t4),n),n.mouseOptions&&(this.options.mouseOptions=Object.assign(Object.assign({},t4.mouseOptions),n.mouseOptions)),this.mouseInput=new qm(this.options.mouseOptions),this.directionsInput=new Ese(t,this.options.keymap)}reset(){this._spherical=Re.toSpherical(Re.rot({x:0,y:0,z:-1},this.camera.rotation)),this.resetMotion$.next()}onSpawned(t){const e=Object.create(null,{onSpawned:{get:()=>super.onSpawned}});return e4(this,void 0,void 0,function*(){yield e.onSpawned.call(this,t),this._spherical=Re.toSpherical(Re.rot({x:0,y:0,z:-1},this.camera.rotation));const n=["KeyE","KeyQ"];this.camera.camera.supportsFov&&n.push("KeyZ","KeyC"),n.push("ShiftLeft");let r=Ra([this.directionsInput.output$,...n.map(c=>this.keyboard.bind(c))]).pipe(Ue(this._onRemoved$),tt(([c,...d])=>{let h={direction:{},rest:[]};(!this.options.ignoreKeyboardUnlessPointerLocked||this.mouseInput.isPointerLocked)&&(h={direction:c,rest:d});let p=Object.assign({},Re.O);const[m,g,b,v,y]=h.rest;void 0!==h.direction.upDown&&(p.z=h.direction.upDown?-1:1),void 0!==h.direction.leftRight&&(p.x=h.direction.leftRight?-1:1),m!=g&&(p.y=g?-1:1);let M=0;return b!=v&&(M=b?1:-1),p=Re.norm(p),y&&(p=Re.scalarMult(p,this.options.cameraBoostMultiplier)),[p,M]}));this.options.cameraMovementElasticity>0&&(r=r.pipe(nk(this.camera.tick$,this.options.cameraMovementElasticity,([c,d],[h,p],m)=>[Re.lerp(c,h,m),p],([c,d],[h,p])=>d==p&&Re.dist(c,h)<.001)));let s=Re.O,o=0;r.subscribe(([c,d])=>{s=c,o=d});let a=qm.isTouchDevice(),l=this.mouseInput.delta$.pipe(Ue(this._onRemoved$),gn(()=>this.active&&(a||!this.options.ignoreMouseUnlessPointerLocked||this.mouseInput.isPointerLocked)));if(this.options.cameraRotationElasticity>0){const c=new Qe(this._spherical);l.subscribe(h=>{const p=c.getValue();c.next({phi:Math.max(1e-6,Math.min(Math.PI-1e-6,p.phi+h.y*this.options.cameraRotationSensitivity/1e3)),theta:p.theta-h.x*this.options.cameraRotationSensitivity/1e3,radius:1})});const d=()=>{c.pipe(Ue(this._onRemoved$),nk(this.tick$,this.options.cameraRotationElasticity,(h,p,m)=>({phi:h.phi+m*(p.phi-h.phi),theta:h.theta+m*(p.theta-h.theta),radius:1}),(h,p)=>yi.dist({x:h.phi,y:h.theta},{x:p.phi,y:p.theta})<1e-4),Ue(this.resetMotion$)).subscribe(h=>{this._spherical.theta=h.theta,this._spherical.phi=h.phi})};this.resetMotion$.pipe(Ue(this._onRemoved$)).subscribe(()=>{c.next(this._spherical),d()}),d()}else l.subscribe(c=>{this._spherical.theta-=c.x*this.options.cameraRotationSensitivity/1e3,this._spherical.phi+=c.y*this.options.cameraRotationSensitivity/1e3,this._spherical.phi=Math.max(1e-6,Math.min(Math.PI-1e-6,this._spherical.phi))});this.camera.tick$.pipe(Ue(this._onRemoved$),gn(()=>this.active)).subscribe(([c,d])=>{this.camera.camera.fov+=o,this.camera.position=Re.add(this.camera.position,Re.rot(Re.scalarMult(s,this.options.cameraLinearSpeed*d/1e3),this.camera.rotation)),this.camera.rotation=Yi.lookAt(this.camera.position,Re.add(this.camera.position,Re.fromSpherical(this._spherical)))}),this.mouseInput.start(),this.directionsInput.start()})}onRemoved(){const t=Object.create(null,{onRemoved:{get:()=>super.onRemoved}});return e4(this,void 0,void 0,function*(){yield t.onRemoved.call(this),yield this.mouseInput.stop(!0),yield this.directionsInput.stop()})}}var i4=function(i,t,e,n){return new(e||(e=Promise))(function(s,o){function a(d){try{c(n.next(d))}catch(h){o(h)}}function l(d){try{c(n.throw(d))}catch(h){o(h)}}function c(d){d.done?s(d.value):function r(s){return s instanceof e?s:new e(function(o){o(s)})}(d.value).then(a,l)}c((n=n.apply(i,t||[])).next())})};const zse={mouseOptions:{},orbiting:{sensitivityX:1,sensitivityY:1},orbitingElasticity:0,zooming:{sensitivity:1},panning:{sensitivityX:1,sensitivityY:1},dollying:{sensitivity:1}};class Hse extends Kh{get active(){return super.active}set active(t){!super.active&&t&&this.reset(),super.active=t}get spherical(){return this._spherical}set spherical(t){this._spherical.phi=Math.max(1e-6,Math.min(Math.PI-1e-6,t.phi)),this._spherical.theta=t.theta,this._spherical.radius=t.radius,this.resetMotion$.next()}constructor(t,e={}){super(),this.camera=t,this.tickOrder=oc.INPUT_CONTROLLERS,this._spherical={phi:0,radius:10,theta:0},this.target=Re.O,this.resetMotion$=new Te,this.options=Object.assign(Object.assign({},zse),e),this.mouseInput=new qm(this.options.mouseOptions)}reset(){let t=Re.dist(this.target,this.camera.position);this.target=Re.add(this.camera.position,Re.rot({x:0,y:0,z:-t},this.camera.rotation)),this._spherical=Re.toSpherical(Re.sub(this.camera.position,this.target)),this.resetMotion$.next()}onSpawned(t){const e=Object.create(null,{onSpawned:{get:()=>super.onSpawned}});return i4(this,void 0,void 0,function*(){if(yield e.onSpawned.call(this,t),this._spherical=Re.toSpherical(Re.sub(this.camera.position,this.target)),this.options.orbiting){let r=this.mouseInput.delta$.pipe(Ue(this._onRemoved$),gn(()=>this.active&&this.mouseInput.state==Ls.DRAG));if(this.options.orbitingElasticity>0){const s=new Qe(this._spherical);r.subscribe(a=>{const l=s.getValue();s.next({phi:Math.max(1e-6,Math.min(Math.PI-1e-6,l.phi-a.y*this.options.orbiting.sensitivityY/1e3)),theta:l.theta-a.x*this.options.orbiting.sensitivityX/1e3,radius:1})});const o=()=>{s.pipe(Ue(this._onRemoved$),nk(this.tick$,this.options.orbitingElasticity,(a,l,c)=>({phi:a.phi+c*(l.phi-a.phi),theta:a.theta+c*(l.theta-a.theta),radius:1}),(a,l)=>yi.dist({x:a.phi,y:a.theta},{x:l.phi,y:l.theta})<1e-4),Ue(this.resetMotion$)).subscribe(a=>{this._spherical.theta=a.theta,this._spherical.phi=a.phi})};this.resetMotion$.pipe(Ue(this._onRemoved$)).subscribe(()=>{s.next(this._spherical),o()}),o()}else r.subscribe(s=>{this._spherical.theta-=s.x*this.options.orbiting.sensitivityX/1e3,this._spherical.phi-=s.y*this.options.orbiting.sensitivityY/1e3,this._spherical.phi=Math.max(1e-6,Math.min(Math.PI-1e-6,this._spherical.phi))})}this.options.zooming&&this.mouseInput.wheel$.pipe(Ue(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=Re.fromSpherical(this._spherical),o=Re.rotAround(s,{x:-Math.sin(this._spherical.theta),y:Math.cos(this._spherical.theta),z:0},Math.PI/2),a=Re.rotAround(s,Re.norm(o),Math.PI/2);this.target=Re.add(this.target,Re.add(Re.scalarMult(o,-this.options.panning.sensitivityY*r.y/1e3),Re.scalarMult(a,this.options.panning.sensitivityX*r.x/1e3)))};this.options.panning&&this.mouseInput.delta$.pipe(Ue(this._onRemoved$),gn(()=>this.mouseInput.state==Ls.DRAG_RIGHT_BUTTON)).subscribe(r=>{n(r)}),this.options.dollying&&this.mouseInput.delta$.pipe(Ue(this._onRemoved$),gn(()=>this.mouseInput.state==Ls.DRAG_MIDDLE_BUTTON)).subscribe(r=>{this._spherical.radius*=Math.pow(.95,-this.options.dollying.sensitivity*r.y/10)}),qm.isTouchDevice()&&(this.options.dollying||this.options.panning)&&this.mouseInput.twoTouchGestureDelta$.pipe(Ue(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(Ue(this._onRemoved$),gn(()=>this.active),tt(()=>this._spherical)).subscribe(r=>{this.camera.position=Re.add(this.target,Re.fromSpherical(r)),this.camera.rotation=Yi.lookAt(this.camera.position,this.target)}),yield this.mouseInput.start()})}onRemoved(){const t=Object.create(null,{onRemoved:{get:()=>super.onRemoved}});return i4(this,void 0,void 0,function*(){yield t.onRemoved.call(this),yield this.mouseInput.stop(!0)})}}class Gse{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 sk=function(i,t,e,n){return new(e||(e=Promise))(function(s,o){function a(d){try{c(n.next(d))}catch(h){o(h)}}function l(d){try{c(n.throw(d))}catch(h){o(h)}}function c(d){d.done?s(d.value):function r(s){return s instanceof e?s:new e(function(o){o(s)})}(d.value).then(a,l)}c((n=n.apply(i,t||[])).next())})},yu=(()=>{return(i=yu||(yu={}))[i.Nothing=0]="Nothing",i[i.Files=1]="Files",i[i.Entities=2]="Entities",yu;var i})();const r4={cachingStrategy:yu.Nothing,position:Re.O,rotation:Yi.O,loadProps:!0},s4=i=>({meta:i.meta,resources:i.resources.map(({object3D:t,body:e})=>({object3D:t&&t.clone(),body:e&&e.clone()}))});class Wse{constructor(t){this.world=t,this.filesCache=new Map,this.loadResultCache=new Map}loadGgGlbFiles(t){return sk(this,arguments,void 0,function*(e,n=!1){if(n&&this.filesCache.has(e))return this.filesCache.get(e);const r=Promise.all([fetch(`${e}.glb`).then(o=>o.arrayBuffer()),fetch(`${e}.meta`).then(o=>o.text()).then(o=>JSON.parse(o))]);n&&this.filesCache.set(e,r);const s=yield r;return n&&this.filesCache.set(e,s),s})}loadGgGlbResources(t){return sk(this,arguments,void 0,function*(e,n=yu.Nothing){if(n==yu.Entities&&this.loadResultCache.has(e)){const c=this.loadResultCache.get(e),d=c instanceof Promise?yield c:c;return s4(d)}const[r,s]=yield this.loadGgGlbFiles(e,n==yu.Files);if(!r)throw new Error("GLB not found");const[o,a]=yield Promise.all([this.world.visualScene.loader.loadFromGgGlb(r,s),this.world.physicsWorld.loader.loadFromGgGlb(r,s)]),l={resources:[],meta:s};if(!o)return l;if(0==a.length)l.resources.push({object3D:o,body:null});else if(1==a.length)l.resources.push({object3D:o,body:a[0]});else{for(const c of a)l.resources.push({object3D:o.popChild(c.name),body:c});o.isEmpty()||l.resources.push({object3D:o,body:null})}return n==yu.Entities&&this.loadResultCache.set(e,s4(l)),l})}loadGgGlb(t){return sk(this,arguments,void 0,function*(e,n=r4){const r=Object.assign(Object.assign({},r4),n),{resources:s,meta:o}=yield this.loadGgGlbResources(e,r.cachingStrategy),a={entities:s.map(l=>new ea({object3D:l.object3D,objectBody:l.body})),meta:o};return r.loadProps&&(a.props=yield Promise.all(o.dummies.filter(l=>l.is_prop||l.is_scene).map(l=>this.loadGgGlb(l.is_prop?(r.propsPath||e.substring(0,e.lastIndexOf("/")+1))+l.prop_id:l.scene_id,{loadProps:!!l.is_scene,position:Re.add(Re.rot(l.position,r.rotation),r.position),rotation:Yi.combineRotations(l.rotation,r.rotation)})))),a.entities.forEach(l=>{l.position=Re.add(Re.rot(Re.clone(l.position),r.rotation),r.position),l.rotation=Yi.mult(Yi.clone(l.rotation),r.rotation)}),a})}}class ok extends bl{constructor(t,e){super(t,e),this.visualScene=t,this.physicsWorld=e,this.loader=new Wse(this)}addPrimitiveRigidBody(t,e=Re.O,n=Yi.O,r={}){const s=new ea({object3D:this.visualScene.factory.createPrimitive(t.shape,r),objectBody:this.physicsWorld.factory.createRigidBody(t)});return s.position=e,s.rotation=n,this.addEntity(s),s}addRenderer(t,e,n){const r=new Use(this.visualScene.createRenderer(t,e,n));return this.addEntity(r),r}registerConsoleCommands(t){super.registerConsoleCommands(t),t.registerConsoleCommand(this,"gravity",(...e)=>function(i,t,e,n){return new(e||(e=Promise))(function(s,o){function a(d){try{c(n.next(d))}catch(h){o(h)}}function l(d){try{c(n.throw(d))}catch(h){o(h)}}function c(d){d.done?s(d.value):function r(s){return s instanceof e?s:new e(function(o){o(s)})}(d.value).then(a,l)}c((n=n.apply(i,t||[])).next())})}(this,void 0,void 0,function*(){if(1==e.length&&(e=["0","0",""+-+e[0]]),e.length>0){if(isNaN(+e[0])||isNaN(+e[1])||isNaN(+e[2]))throw new Error("Wrong arguments");this.physicsWorld.gravity={x:+e[0],y:+e[1],z:+e[2]}}return JSON.stringify(this.physicsWorld.gravity)}),'args: [ ?float, ?float, ?float ]; Get or set 3D world gravity vector. 1 argument sets vector {x: 0, y: 0, z: -value}, 3 arguments set the whole vector. Default value is "9.82" or "0 0 -9.82"')}}function o4(i,t=Gy,e){const n=OI(i,t);return function Yse(i,t){return ni((e,n)=>{const{leading:r=!0,trailing:s=!1}=t??{};let o=!1,a=null,l=null,c=!1;const d=()=>{l?.unsubscribe(),l=null,s&&(m(),c&&n.complete())},h=()=>{l=null,c&&n.complete()},p=g=>l=Mr(i(g)).subscribe(qn(n,d,h)),m=()=>{if(o){o=!1;const g=a;a=null,n.next(g),!c&&p(g)}};e.subscribe(qn(n,g=>{o=!0,a=g,(!l||l.closed)&&(r?m():p(g))},()=>{c=!0,(!(s&&o&&l)||l.closed)&&n.complete()}))})}(()=>n,e)}window.gg_version="0.0.56";const qse=0,a4=1,Xse=2,l4=1,c4=2,Qc=3,lc=0,ko=1,Ns=2,Jc=0,Zm=1,d4=2,u4=3,h4=4,Kse=5,Zh=100,Zse=101,Qse=102,Jse=103,eoe=104,toe=200,noe=201,ioe=202,roe=203,lk=204,ck=205,soe=206,ooe=207,aoe=208,loe=209,coe=210,doe=211,uoe=212,hoe=213,foe=214,poe=0,moe=1,goe=2,SC=3,_oe=4,voe=5,yoe=6,boe=7,EC=0,xoe=1,woe=2,bu=0,Moe=1,Coe=2,Soe=3,Eoe=4,Aoe=5,Doe=6,Toe=7,f4="attached",cc=301,Qh=302,AC=303,DC=304,gb=306,Bs=1e3,er=1001,_b=1002,vr=1003,uk=1004,Qm=1005,cr=1006,vb=1007,xl=1008,ed=1009,p4=1010,m4=1011,yb=1012,hk=1013,xu=1014,ta=1015,Jm=1016,fk=1017,pk=1018,eg=1020,g4=35902,_4=1021,v4=1022,Po=1023,y4=1024,b4=1025,tg=1026,ng=1027,mk=1028,TC=1029,x4=1030,gk=1031,_k=1033,IC=33776,RC=33777,kC=33778,PC=33779,vk=35840,yk=35841,bk=35842,xk=35843,wk=36196,Mk=37492,Ck=37496,Sk=37808,Ek=37809,Ak=37810,Dk=37811,Tk=37812,Ik=37813,Rk=37814,kk=37815,Pk=37816,Ok=37817,Fk=37818,Lk=37819,Nk=37820,Bk=37821,OC=36492,Uk=36494,Vk=36495,w4=36283,zk=36284,Hk=36285,$k=36286,bb=2300,xb=2301,Ooe=0,C4=1,jk=2,Loe=3201,Jh=0,Noe=1,wu="",cs="srgb",ds="srgb-linear",Yk="display-p3",LC="display-p3-linear",NC="linear",Fi="srgb",BC="rec709",UC="p3",sg=7680,Boe=512,Uoe=513,Voe=514,E4=515,zoe=516,Hoe=517,$oe=518,Goe=519,A4="300 es",td=2e3;class og{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]+Us[i>>16&255]+Us[i>>24&255]+"-"+Us[255&t]+Us[t>>8&255]+"-"+Us[t>>16&15|64]+Us[t>>24&255]+"-"+Us[63&e|128]+Us[e>>8&255]+"-"+Us[e>>16&255]+Us[e>>24&255]+Us[255&n]+Us[n>>8&255]+Us[n>>16&255]+Us[n>>24&255]).toLowerCase()}function tr(i,t,e){return Math.max(t,Math.min(e,i))}function qk(i,t){return(i%t+t)%t}function wb(i,t,e){return(1-e)*i+e*t}function ho(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 yn(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 aae_radToDeg=function nae(i){return i*ag};class xe{constructor(t=0,e=0){xe.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(tr(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 wn{constructor(t,e,n,r,s,o,a,l,c){wn.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 d=this.elements;return d[0]=t,d[1]=r,d[2]=a,d[3]=e,d[4]=s,d[5]=l,d[6]=n,d[7]=o,d[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],d=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],F=r[2],D=r[5],k=r[8];return s[0]=o*b+a*M+l*F,s[3]=o*v+a*x+l*D,s[6]=o*y+a*C+l*k,s[1]=c*b+d*M+h*F,s[4]=c*v+d*x+h*D,s[7]=c*y+d*C+h*k,s[2]=p*b+m*M+g*F,s[5]=p*v+m*x+g*D,s[8]=p*y+m*C+g*k,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],d=t[8];return e*o*d-e*a*c-n*s*d+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],d=t[8],h=d*o-a*c,p=a*l-d*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-d*n)*b,t[2]=(a*n-r*o)*b,t[3]=p*b,t[4]=(d*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(Xk.makeScale(t,e)),this}rotate(t){return this.premultiply(Xk.makeRotation(-t)),this}translate(t,e){return this.premultiply(Xk.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 Xk=new wn;function T4(i){for(let t=i.length-1;t>=0;--t)if(i[t]>=65535)return!0;return!1}function Mb(i){return document.createElementNS("http://www.w3.org/1999/xhtml",i)}function cae(){const i=Mb("canvas");return i.style.display="block",i}Int8Array,Uint8Array,Uint8ClampedArray,Int16Array,Uint16Array,Int32Array,Uint32Array,Float32Array,Float64Array;const I4={};function cg(i){i in I4||(I4[i]=!0,console.warn(i))}const R4=(new wn).set(.8224621,.177538,0,.0331941,.9668058,0,.0170827,.0723974,.9105199),k4=(new wn).set(1.2249401,-.2249404,0,-.0420569,1.0420571,0,-.0196376,-.0786361,1.0982735),Cb={[ds]:{transfer:NC,primaries:BC,luminanceCoefficients:[.2126,.7152,.0722],toReference:i=>i,fromReference:i=>i},[cs]:{transfer:Fi,primaries:BC,luminanceCoefficients:[.2126,.7152,.0722],toReference:i=>i.convertSRGBToLinear(),fromReference:i=>i.convertLinearToSRGB()},[LC]:{transfer:NC,primaries:UC,luminanceCoefficients:[.2289,.6917,.0793],toReference:i=>i.applyMatrix3(k4),fromReference:i=>i.applyMatrix3(R4)},[Yk]:{transfer:Fi,primaries:UC,luminanceCoefficients:[.2289,.6917,.0793],toReference:i=>i.convertSRGBToLinear().applyMatrix3(k4),fromReference:i=>i.applyMatrix3(R4).convertLinearToSRGB()}},uae=new Set([ds,LC]),ei={enabled:!0,_workingColorSpace:ds,get workingColorSpace(){return this._workingColorSpace},set workingColorSpace(i){if(!uae.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,Cb[e].fromReference)((0,Cb[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 Cb[i].primaries},getTransfer:function(i){return i===wu?NC:Cb[i].transfer},getLuminanceCoefficients:function(i,t=this._workingColorSpace){return i.fromArray(Cb[t].luminanceCoefficients)}};function dg(i){return i<.04045?.0773993808*i:Math.pow(.9478672986*i+.0521327014,2.4)}function Kk(i){return i<.0031308?12.92*i:1.055*Math.pow(i,.41666)-.055}let ug;class hae{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===ug&&(ug=Mb("canvas")),ug.width=t.width,ug.height=t.height;const n=ug.getContext("2d");t instanceof ImageData?n.putImageData(t,0,0):n.drawImage(t,0,0,t.width,t.height),e=ug}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=Mb("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 og{constructor(e=i.DEFAULT_IMAGE,n=i.DEFAULT_MAPPING,r=er,s=er,o=cr,a=xl,l=Po,c=ed,d=i.DEFAULT_ANISOTROPY,h=wu){super(),this.isTexture=!0,Object.defineProperty(this,"id",{value:pae++}),this.uuid=na(),this.name="",this.source=new hg(e),this.mipmaps=[],this.mapping=n,this.channel=0,this.wrapS=r,this.wrapT=s,this.magFilter=o,this.minFilter=a,this.anisotropy=d,this.format=l,this.internalFormat=null,this.type=c,this.offset=new xe(0,0),this.repeat=new xe(1,1),this.center=new xe(0,0),this.rotation=0,this.matrixAutoUpdate=!0,this.matrix=new wn,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 Bs:e.x=e.x-Math.floor(e.x);break;case er:e.x=e.x<0?0:1;break;case _b: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 Bs:e.y=e.y-Math.floor(e.y);break;case er:e.y=e.y<0?0:1;break;case _b: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 vi{constructor(t=0,e=0,n=0,r=1){vi.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],d=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(d-p)<.01&&Math.abs(h-b)<.01&&Math.abs(g-v)<.01){if(Math.abs(d+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,F=(y+1)/2,D=(d+p)/4,k=(h+b)/4,B=(g+v)/4;return x>C&&x>F?x<.01?(n=0,r=.707106781,s=.707106781):(n=Math.sqrt(x),r=D/n,s=k/n):C>F?C<.01?(n=.707106781,r=0,s=.707106781):(r=Math.sqrt(C),n=D/r,s=B/r):F<.01?(n=.707106781,r=.707106781,s=0):(s=Math.sqrt(F),n=k/s,r=B/s),this.set(n,r,s,e),this}let M=Math.sqrt((v-g)*(v-g)+(h-b)*(h-b)+(p-d)*(p-d));return Math.abs(M)<.001&&(M=1),this.x=(v-g)/M,this.y=(h-b)/M,this.z=(p-d)/M,this.w=Math.acos((c+m+y-1)/2),this}setFromMatrixPosition(t){const e=t.elements;return this.x=e[12],this.y=e[13],this.z=e[14],this.w=e[15],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 mae extends og{constructor(t=1,e=1,n={}){super(),this.isRenderTarget=!0,this.width=t,this.height=e,this.depth=1,this.scissor=new vi(0,0,t,e),this.scissorTest=!1,this.viewport=new vi(0,0,t,e);const r={width:t,height:e,depth:1};n=Object.assign({generateMipmaps:!1,internalFormat:null,minFilter:cr,depthBuffer:!0,stencilBuffer:!1,resolveDepthBuffer:!0,resolveStencilBuffer:!0,depthTexture:null,samples:0,count:1},n);const s=new Oo(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 F=Math.sqrt(x),D=Math.atan2(F,y*M);v=Math.sin(v*D)/F,a=Math.sin(a*D)/F}const C=a*M;if(l=l*v+p*C,c=c*v+m*C,d=d*v+g*C,h=h*v+b*C,v===1-a){const F=1/Math.sqrt(l*l+c*c+d*d+h*h);l*=F,c*=F,d*=F,h*=F}}t[e]=l,t[e+1]=c,t[e+2]=d,t[e+3]=h}static multiplyQuaternionsFlat(t,e,n,r,s,o){const a=n[r],l=n[r+1],c=n[r+2],d=n[r+3],h=s[o],p=s[o+1],m=s[o+2],g=s[o+3];return t[e]=a*g+d*h+l*m-c*p,t[e+1]=l*g+d*p+c*h-a*m,t[e+2]=c*g+d*m+a*p-l*h,t[e+3]=d*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),d=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*d*h+c*m*g,this._y=c*m*h-p*d*g,this._z=c*d*g+p*m*h,this._w=c*d*h-p*m*g;break;case"YXZ":this._x=p*d*h+c*m*g,this._y=c*m*h-p*d*g,this._z=c*d*g-p*m*h,this._w=c*d*h+p*m*g;break;case"ZXY":this._x=p*d*h-c*m*g,this._y=c*m*h+p*d*g,this._z=c*d*g+p*m*h,this._w=c*d*h-p*m*g;break;case"ZYX":this._x=p*d*h-c*m*g,this._y=c*m*h+p*d*g,this._z=c*d*g-p*m*h,this._w=c*d*h+p*m*g;break;case"YZX":this._x=p*d*h+c*m*g,this._y=c*m*h+p*d*g,this._z=c*d*g-p*m*h,this._w=c*d*h-p*m*g;break;case"XZY":this._x=p*d*h-c*m*g,this._y=c*m*h-p*d*g,this._z=c*d*g+p*m*h,this._w=c*d*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],d=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=(d-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=(d-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+d)/m}else{const m=2*Math.sqrt(1+h-n-a);this._w=(o-r)/m,this._x=(s+c)/m,this._y=(l+d)/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(tr(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,d=e._w;return this._x=n*d+o*a+r*c-s*l,this._y=r*d+o*l+s*a-n*c,this._z=s*d+o*c+n*l-r*a,this._w=o*d-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),d=Math.atan2(c,a),h=Math.sin((1-e)*d)/c,p=Math.sin(e*d)/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 O{constructor(t=0,e=0,n=0){O.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(O4.setFromEuler(t))}applyAxisAngle(t,e){return this.applyQuaternion(O4.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),d=2*(a*e-s*r),h=2*(s*n-o*e);return this.x=e+l*c+o*h-a*d,this.y=n+l*d+a*c-s*h,this.z=r+l*h+s*d-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 Jk.copy(this).projectOnVector(t),this.sub(Jk)}reflect(t){return this.sub(Jk.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(tr(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 Jk=new O,O4=new fo;class Vs{constructor(t=new O(1/0,1/0,1/0),e=new O(-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;e=this.min.x&&t.x<=this.max.x&&t.y>=this.min.y&&t.y<=this.max.y&&t.z>=this.min.z&&t.z<=this.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.x>=this.min.x&&t.min.x<=this.max.x&&t.max.y>=this.min.y&&t.min.y<=this.max.y&&t.max.z>=this.min.z&&t.min.z<=this.max.z}intersectsSphere(t){return this.clampPoint(t.center,wl),wl.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(Sb),$C.subVectors(this.max,Sb),fg.subVectors(t.a,Sb),pg.subVectors(t.b,Sb),mg.subVectors(t.c,Sb),Cu.subVectors(pg,fg),Su.subVectors(mg,pg),tf.subVectors(fg,mg);let e=[0,-Cu.z,Cu.y,0,-Su.z,Su.y,0,-tf.z,tf.y,Cu.z,0,-Cu.x,Su.z,0,-Su.x,tf.z,0,-tf.x,-Cu.y,Cu.x,0,-Su.y,Su.x,0,-tf.y,tf.x,0];return!(!eP(e,fg,pg,mg,$C)||(e=[1,0,0,0,1,0,0,0,1],!eP(e,fg,pg,mg,$C)))&&(GC.crossVectors(Cu,Su),e=[GC.x,GC.y,GC.z],eP(e,fg,pg,mg,$C))}clampPoint(t,e){return e.copy(t).clamp(this.min,this.max)}distanceToPoint(t){return this.clampPoint(t,wl).distanceTo(t)}getBoundingSphere(t){return this.isEmpty()?t.makeEmpty():(this.getCenter(t.center),t.radius=.5*this.getSize(wl).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()||(nd[0].set(this.min.x,this.min.y,this.min.z).applyMatrix4(t),nd[1].set(this.min.x,this.min.y,this.max.z).applyMatrix4(t),nd[2].set(this.min.x,this.max.y,this.min.z).applyMatrix4(t),nd[3].set(this.min.x,this.max.y,this.max.z).applyMatrix4(t),nd[4].set(this.max.x,this.min.y,this.min.z).applyMatrix4(t),nd[5].set(this.max.x,this.min.y,this.max.z).applyMatrix4(t),nd[6].set(this.max.x,this.max.y,this.min.z).applyMatrix4(t),nd[7].set(this.max.x,this.max.y,this.max.z).applyMatrix4(t),this.setFromPoints(nd)),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 nd=[new O,new O,new O,new O,new O,new O,new O,new O],wl=new O,HC=new Vs,fg=new O,pg=new O,mg=new O,Cu=new O,Su=new O,tf=new O,Sb=new O,$C=new O,GC=new O,nf=new O;function eP(i,t,e,n,r){for(let s=0,o=i.length-3;s<=o;s+=3){nf.fromArray(i,s);const a=r.x*Math.abs(nf.x)+r.y*Math.abs(nf.y)+r.z*Math.abs(nf.z),l=t.dot(nf),c=e.dot(nf),d=n.dot(nf);if(Math.max(-Math.max(l,c,d),Math.min(l,c,d))>a)return!1}return!0}const gae=new Vs,Eb=new O,tP=new O;class zs{constructor(t=new O,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):gae.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;Eb.subVectors(t,this.center);const e=Eb.lengthSq();if(e>this.radius*this.radius){const n=Math.sqrt(e),r=.5*(n-this.radius);this.center.addScaledVector(Eb,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):(tP.subVectors(t.center,this.center).setLength(t.radius),this.expandByPoint(Eb.copy(t.center).add(tP)),this.expandByPoint(Eb.copy(t.center).sub(tP))),this)}equals(t){return t.center.equals(this.center)&&t.radius===this.radius}clone(){return(new this.constructor).copy(this)}}const id=new O,nP=new O,WC=new O,Eu=new O,iP=new O,jC=new O,rP=new O;class Ab{constructor(t=new O,e=new O(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,id)),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=id.subVectors(t,this.origin).dot(this.direction);return e<0?this.origin.distanceToSquared(t):(id.copy(this.origin).addScaledVector(this.direction,e),id.distanceToSquared(t))}distanceSqToSegment(t,e,n,r){nP.copy(t).add(e).multiplyScalar(.5),WC.copy(e).sub(t).normalize(),Eu.copy(this.origin).sub(nP);const s=.5*t.distanceTo(e),o=-this.direction.dot(WC),a=Eu.dot(this.direction),l=-Eu.dot(WC),c=Eu.lengthSq(),d=Math.abs(1-o*o);let h,p,m,g;if(d>0)if(h=o*l-a,p=o*a-l,g=s*d,h>=0)if(p>=-g)if(p<=g){const b=1/d;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(nP).addScaledVector(WC,p),m}intersectSphere(t,e){id.subVectors(t.center,this.origin);const n=id.dot(this.direction),r=id.dot(id)-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,d=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),d>=0?(s=(t.min.y-p.y)*d,o=(t.max.y-p.y)*d):(s=(t.max.y-p.y)*d,o=(t.min.y-p.y)*d),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,id)}intersectTriangle(t,e,n,r,s){iP.subVectors(e,t),jC.subVectors(n,t),rP.crossVectors(iP,jC);let a,o=this.direction.dot(rP);if(o>0){if(r)return null;a=1}else{if(!(o<0))return null;a=-1,o=-o}Eu.subVectors(this.origin,t);const l=a*this.direction.dot(jC.crossVectors(Eu,jC));if(l<0)return null;const c=a*this.direction.dot(iP.cross(Eu));if(c<0||l+c>o)return null;const d=-a*Eu.dot(rP);return d<0?null:this.at(d/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 Bt{constructor(t,e,n,r,s,o,a,l,c,d,h,p,m,g,b,v){Bt.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,d,h,p,m,g,b,v)}set(t,e,n,r,s,o,a,l,c,d,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]=d,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 Bt).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/gg.setFromMatrixColumn(t,0).length(),s=1/gg.setFromMatrixColumn(t,1).length(),o=1/gg.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),d=Math.cos(s),h=Math.sin(s);if("XYZ"===t.order){const p=o*d,m=o*h,g=a*d,b=a*h;e[0]=l*d,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*d,m=l*h,g=c*d,b=c*h;e[0]=p+b*a,e[4]=g*a-m,e[8]=o*c,e[1]=o*h,e[5]=o*d,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*d,m=l*h,g=c*d,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*d,e[9]=b-p*a,e[2]=-o*c,e[6]=a,e[10]=o*l}else if("ZYX"===t.order){const p=o*d,m=o*h,g=a*d,b=a*h;e[0]=l*d,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*d,e[4]=b-p*h,e[8]=g*h+m,e[1]=h,e[5]=o*d,e[9]=-a*d,e[2]=-c*d,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*d,e[4]=-h,e[8]=c*d,e[1]=p*h+b,e[5]=o*d,e[9]=m*h-g,e[2]=g*h-m,e[6]=a*d,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(_ae,t,vae)}lookAt(t,e,n){const r=this.elements;return ia.subVectors(t,e),0===ia.lengthSq()&&(ia.z=1),ia.normalize(),Au.crossVectors(n,ia),0===Au.lengthSq()&&(1===Math.abs(n.z)?ia.x+=1e-4:ia.z+=1e-4,ia.normalize(),Au.crossVectors(n,ia)),Au.normalize(),YC.crossVectors(ia,Au),r[0]=Au.x,r[4]=YC.x,r[8]=ia.x,r[1]=Au.y,r[5]=YC.y,r[9]=ia.y,r[2]=Au.z,r[6]=YC.z,r[10]=ia.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],d=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],F=n[15],D=r[0],k=r[4],B=r[8],T=r[12],A=r[1],W=r[5],ie=r[9],ne=r[13],oe=r[2],ge=r[6],q=r[10],se=r[14],J=r[3],we=r[7],Ve=r[11],Ye=r[15];return s[0]=o*D+a*A+l*oe+c*J,s[4]=o*k+a*W+l*ge+c*we,s[8]=o*B+a*ie+l*q+c*Ve,s[12]=o*T+a*ne+l*se+c*Ye,s[1]=d*D+h*A+p*oe+m*J,s[5]=d*k+h*W+p*ge+m*we,s[9]=d*B+h*ie+p*q+m*Ve,s[13]=d*T+h*ne+p*se+m*Ye,s[2]=g*D+b*A+v*oe+y*J,s[6]=g*k+b*W+v*ge+y*we,s[10]=g*B+b*ie+v*q+y*Ve,s[14]=g*T+b*ne+v*se+y*Ye,s[3]=M*D+x*A+C*oe+F*J,s[7]=M*k+x*W+C*ge+F*we,s[11]=M*B+x*ie+C*q+F*Ve,s[15]=M*T+x*ne+C*se+F*Ye,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],d=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*d-s*l*d)+t[11]*(+e*c*h-e*a*m-s*o*h+n*o*m+s*a*d-n*c*d)+t[15]*(-r*a*d-e*l*h+e*a*p+r*o*h-n*o*p+n*l*d)}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],d=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-d*v*c-g*l*m+o*v*m+d*l*y-o*p*y,C=d*b*c-g*h*c+g*a*m-o*b*m-d*a*y+o*h*y,F=g*h*l-d*b*l-g*a*p+o*b*p+d*a*v-o*h*v,D=e*M+n*x+r*C+s*F;if(0===D)return this.set(0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0);const k=1/D;return t[0]=M*k,t[1]=(b*p*s-h*v*s-b*r*m+n*v*m+h*r*y-n*p*y)*k,t[2]=(a*v*s-b*l*s+b*r*c-n*v*c-a*r*y+n*l*y)*k,t[3]=(h*l*s-a*p*s-h*r*c+n*p*c+a*r*m-n*l*m)*k,t[4]=x*k,t[5]=(d*v*s-g*p*s+g*r*m-e*v*m-d*r*y+e*p*y)*k,t[6]=(g*l*s-o*v*s-g*r*c+e*v*c+o*r*y-e*l*y)*k,t[7]=(o*p*s-d*l*s+d*r*c-e*p*c-o*r*m+e*l*m)*k,t[8]=C*k,t[9]=(g*h*s-d*b*s-g*n*m+e*b*m+d*n*y-e*h*y)*k,t[10]=(o*b*s-g*a*s+g*n*c-e*b*c-o*n*y+e*a*y)*k,t[11]=(d*a*s-o*h*s-d*n*c+e*h*c+o*n*m-e*a*m)*k,t[12]=F*k,t[13]=(d*b*r-g*h*r+g*n*p-e*b*p-d*n*v+e*h*v)*k,t[14]=(g*a*r-o*b*r-g*n*l+e*b*l+o*n*v-e*a*v)*k,t[15]=(o*h*r-d*a*r+d*n*l-e*h*l-o*n*p+e*a*p)*k,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,d=s*a;return this.set(c*o+n,c*a-r*l,c*l+r*a,0,c*a+r*l,d*a+n,d*l-r*o,0,c*l-r*a,d*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,d=o+o,h=a+a,p=s*c,m=s*d,g=s*h,b=o*d,v=o*h,y=a*h,M=l*c,x=l*d,C=l*h,F=n.x,D=n.y,k=n.z;return r[0]=(1-(b+y))*F,r[1]=(m+C)*F,r[2]=(g-x)*F,r[3]=0,r[4]=(m-C)*D,r[5]=(1-(p+y))*D,r[6]=(v+M)*D,r[7]=0,r[8]=(g+x)*k,r[9]=(v-M)*k,r[10]=(1-(p+b))*k,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=gg.set(r[0],r[1],r[2]).length();const o=gg.set(r[4],r[5],r[6]).length(),a=gg.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],Ml.copy(this);const c=1/s,d=1/o,h=1/a;return Ml.elements[0]*=c,Ml.elements[1]*=c,Ml.elements[2]*=c,Ml.elements[4]*=d,Ml.elements[5]*=d,Ml.elements[6]*=d,Ml.elements[8]*=h,Ml.elements[9]*=h,Ml.elements[10]*=h,e.setFromRotationMatrix(Ml),n.x=s,n.y=o,n.z=a,this}makePerspective(t,e,n,r,s,o,a=td){const l=this.elements,c=2*s/(e-t),d=2*s/(n-r),h=(e+t)/(e-t),p=(n+r)/(n-r);let m,g;if(a===td)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]=d,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=td){const l=this.elements,c=1/(e-t),d=1/(n-r),h=1/(o-s),p=(e+t)*c,m=(n+r)*d;let g,b;if(a===td)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*d,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 gg=new O,Ml=new Bt,_ae=new O(0,0,0),vae=new O(1,1,1),Au=new O,YC=new O,ia=new O,F4=new Bt,L4=new fo;let rd=(()=>{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],d=s[5],h=s[9],p=s[2],m=s[6],g=s[10];switch(n){case"XYZ":this._y=Math.asin(tr(l,-1,1)),Math.abs(l)<.9999999?(this._x=Math.atan2(-h,g),this._z=Math.atan2(-a,o)):(this._x=Math.atan2(m,d),this._z=0);break;case"YXZ":this._x=Math.asin(-tr(h,-1,1)),Math.abs(h)<.9999999?(this._y=Math.atan2(l,g),this._z=Math.atan2(c,d)):(this._y=Math.atan2(-p,o),this._z=0);break;case"ZXY":this._x=Math.asin(tr(m,-1,1)),Math.abs(m)<.9999999?(this._y=Math.atan2(-p,g),this._z=Math.atan2(-a,d)):(this._y=0,this._z=Math.atan2(c,o));break;case"ZYX":this._y=Math.asin(-tr(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,d));break;case"YZX":this._z=Math.asin(tr(c,-1,1)),Math.abs(c)<.9999999?(this._x=Math.atan2(-h,d),this._y=Math.atan2(-p,o)):(this._x=0,this._y=Math.atan2(l,g));break;case"XZY":this._z=Math.asin(-tr(a,-1,1)),Math.abs(a)<.9999999?(this._x=Math.atan2(m,d),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 F4.makeRotationFromQuaternion(e),this.setFromRotationMatrix(F4,n,r)}setFromVector3(e,n=this._order){return this.set(e.x,e.y,e.z,n)}reorder(e){return L4.setFromEuler(this),this.setFromQuaternion(L4,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 sP{constructor(){this.mask=1}set(t){this.mask=(1<>>0}enable(t){this.mask|=1<{class i extends og{constructor(){super(),this.isObject3D=!0,Object.defineProperty(this,"id",{value:yae++}),this.uuid=na(),this.name="",this.type="Object3D",this.parent=null,this.children=[],this.up=i.DEFAULT_UP.clone();const e=new O,n=new rd,r=new fo,s=new O(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 Bt},normalMatrix:{value:new wn}}),this.matrix=new Bt,this.matrixWorld=new Bt,this.matrixAutoUpdate=i.DEFAULT_MATRIX_AUTO_UPDATE,this.matrixWorldAutoUpdate=i.DEFAULT_MATRIX_WORLD_AUTO_UPDATE,this.matrixWorldNeedsUpdate=!1,this.layers=new sP,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 _g.setFromAxisAngle(e,n),this.quaternion.multiply(_g),this}rotateOnWorldAxis(e,n){return _g.setFromAxisAngle(e,n),this.quaternion.premultiply(_g),this}rotateX(e){return this.rotateOnAxis(B4,e)}rotateY(e){return this.rotateOnAxis(U4,e)}rotateZ(e){return this.rotateOnAxis(V4,e)}translateOnAxis(e,n){return N4.copy(e).applyQuaternion(this.quaternion),this.position.add(N4.multiplyScalar(n)),this}translateX(e){return this.translateOnAxis(B4,e)}translateY(e){return this.translateOnAxis(U4,e)}translateZ(e){return this.translateOnAxis(V4,e)}localToWorld(e){return this.updateWorldMatrix(!0,!1),e.applyMatrix4(this.matrixWorld)}worldToLocal(e){return this.updateWorldMatrix(!0,!1),e.applyMatrix4(sd.copy(this.matrixWorld).invert())}lookAt(e,n,r){e.isVector3?qC.copy(e):qC.set(e,n,r);const s=this.parent;this.updateWorldMatrix(!0,!1),Db.setFromMatrixPosition(this.matrixWorld),this.isCamera||this.isLight?sd.lookAt(Db,qC,this.up):sd.lookAt(qC,Db,this.up),this.quaternion.setFromRotationMatrix(sd),s&&(sd.extractRotation(s.matrixWorld),_g.setFromRotationMatrix(sd),this.quaternion.premultiply(_g.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.maxInstanceCount=this._maxInstanceCount,s.maxVertexCount=this._maxVertexCount,s.maxIndexCount=this._maxIndexCount,s.geometryInitialized=this._geometryInitialized,s.geometryCount=this._geometryCount,s.matricesTexture=this._matricesTexture.toJSON(e),null!==this._colorsTexture&&(s.colorsTexture=this._colorsTexture.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 d=0,h=c.length;d0){s.children=[];for(let l=0;l0){s.animations=[];for(let l=0;l0&&(r.geometries=l),c.length>0&&(r.materials=c),d.length>0&&(r.textures=d),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 d in l){const h=l[d];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){Cl.subVectors(r,e),od.subVectors(n,e),aP.subVectors(t,e);const o=Cl.dot(Cl),a=Cl.dot(od),l=Cl.dot(aP),c=od.dot(od),d=od.dot(aP),h=o*c-a*a;if(0===h)return s.set(0,0,0),null;const p=1/h,m=(c*l-a*d)*p,g=(o*d-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,ad)&&ad.x>=0&&ad.y>=0&&ad.x+ad.y<=1}static getInterpolation(t,e,n,r,s,o,a,l){return null===this.getBarycoord(t,e,n,r,ad)?(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,ad.x),l.addScaledVector(o,ad.y),l.addScaledVector(a,ad.z),l)}static isFrontFacing(t,e,n,r){return Cl.subVectors(n,e),od.subVectors(t,e),Cl.cross(od).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 Cl.subVectors(this.c,this.b),od.subVectors(this.a,this.b),.5*Cl.cross(od).length()}getMidpoint(t){return t.addVectors(this.a,this.b).add(this.c).multiplyScalar(1/3)}getNormal(t){return La.getNormal(this.a,this.b,this.c,t)}getPlane(t){return t.setFromCoplanarPoints(this.a,this.b,this.c)}getBarycoord(t,e){return La.getBarycoord(t,this.a,this.b,this.c,e)}getInterpolation(t,e,n,r,s){return La.getInterpolation(t,this.a,this.b,this.c,e,n,r,s)}containsPoint(t){return La.containsPoint(t,this.a,this.b,this.c)}isFrontFacing(t){return La.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;yg.subVectors(r,n),bg.subVectors(s,n),lP.subVectors(t,n);const l=yg.dot(lP),c=bg.dot(lP);if(l<=0&&c<=0)return e.copy(n);cP.subVectors(t,r);const d=yg.dot(cP),h=bg.dot(cP);if(d>=0&&h<=d)return e.copy(r);const p=l*h-d*c;if(p<=0&&l>=0&&d<=0)return o=l/(l-d),e.copy(n).addScaledVector(yg,o);dP.subVectors(t,s);const m=yg.dot(dP),g=bg.dot(dP);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(bg,a);const v=d*g-m*h;if(v<=0&&h-d>=0&&m-g>=0)return H4.subVectors(s,r),a=(h-d)/(h-d+(m-g)),e.copy(r).addScaledVector(H4,a);const y=1/(v+b+p);return o=b*y,a=p*y,e.copy(n).addScaledVector(yg,o).addScaledVector(bg,a)}equals(t){return t.a.equals(this.a)&&t.b.equals(this.b)&&t.c.equals(this.c)}}const $4={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},Du={h:0,s:0,l:0},XC={h:0,s:0,l:0};function uP(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 qe{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=cs){return t=Math.floor(t),this.r=(t>>16&255)/255,this.g=(t>>8&255)/255,this.b=(255&t)/255,ei.toWorkingColorSpace(this,e),this}setRGB(t,e,n,r=ei.workingColorSpace){return this.r=t,this.g=e,this.b=n,ei.toWorkingColorSpace(this,r),this}setHSL(t,e,n,r=ei.workingColorSpace){if(t=qk(t,1),e=tr(e,0,1),n=tr(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=uP(o,s,t+1/3),this.g=uP(o,s,t),this.b=uP(o,s,t-1/3)}return ei.toWorkingColorSpace(this,r),this}setStyle(t,e=cs){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=cs){const n=$4[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=dg(t.r),this.g=dg(t.g),this.b=dg(t.b),this}copyLinearToSRGB(t){return this.r=Kk(t.r),this.g=Kk(t.g),this.b=Kk(t.b),this}convertSRGBToLinear(){return this.copySRGBToLinear(this),this}convertLinearToSRGB(){return this.copyLinearToSRGB(this),this}getHex(t=cs){return ei.fromWorkingColorSpace(Hs.copy(this),t),65536*Math.round(tr(255*Hs.r,0,255))+256*Math.round(tr(255*Hs.g,0,255))+Math.round(tr(255*Hs.b,0,255))}getHexString(t=cs){return("000000"+this.getHex(t).toString(16)).slice(-6)}getHSL(t,e=ei.workingColorSpace){ei.fromWorkingColorSpace(Hs.copy(this),e);const n=Hs.r,r=Hs.g,s=Hs.b,o=Math.max(n,r,s),a=Math.min(n,r,s);let l,c;const d=(a+o)/2;if(a===o)l=0,c=0;else{const h=o-a;switch(c=d<=.5?h/(o+a):h/(2-o-a),o){case n:l=(r-s)/h+(r0!=t>0&&this.version++,this._alphaTest=t}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.dispersion&&(n.dispersion=this.dispersion),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!==Zm&&(n.blending=this.blending),this.side!==lc&&(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!==lk&&(n.blendSrc=this.blendSrc),this.blendDst!==ck&&(n.blendDst=this.blendDst),this.blendEquation!==Zh&&(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!==SC&&(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!==sg&&(n.stencilFail=this.stencilFail),this.stencilZFail!==sg&&(n.stencilZFail=this.stencilZFail),this.stencilZPass!==sg&&(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++}onBuild(){console.warn("Material: onBuild() has been removed.")}onBeforeRender(){console.warn("Material: onBeforeRender() has been removed.")}}class qi extends Fo{constructor(t){super(),this.isMeshBasicMaterial=!0,this.type="MeshBasicMaterial",this.color=new qe(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 rd,this.combine=EC,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 yr=new O,KC=new xe;class Hi{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=ta,this.version=0}onUploadCallback(){}set needsUpdate(t){!0===t&&this.version++}get updateRange(){return cg("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],d=[];for(let h=0,p=c.length;h0&&(r[l]=d,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 d=[],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))&&(j4.copy(s).invert(),rf.copy(t.ray).applyMatrix4(j4),(null===n.boundingBox||!1!==rf.intersectsBox(n.boundingBox))&&this._computeIntersections(t,e,rf)))}_computeIntersections(t,e,n){let r;const s=this.geometry,o=this.material,a=s.index,l=s.attributes.position,c=s.attributes.uv,d=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:iS.clone(),object:i}}(i,t,e,n,wg,Mg,Cg,nS);if(d){r&&(JC.fromBufferAttribute(r,a),eS.fromBufferAttribute(r,l),tS.fromBufferAttribute(r,c),d.uv=La.getInterpolation(nS,wg,Mg,Cg,JC,eS,tS,new xe)),s&&(JC.fromBufferAttribute(s,a),eS.fromBufferAttribute(s,l),tS.fromBufferAttribute(s,c),d.uv1=La.getInterpolation(nS,wg,Mg,Cg,JC,eS,tS,new xe)),o&&(q4.fromBufferAttribute(o,a),X4.fromBufferAttribute(o,l),K4.fromBufferAttribute(o,c),d.normal=La.getInterpolation(nS,wg,Mg,Cg,q4,X4,K4,new O),d.normal.dot(n.direction)>0&&d.normal.multiplyScalar(-1));const h={a,b:l,c,normal:new O,materialIndex:0};La.getNormal(wg,Mg,Cg,h.normal),d.face=h}return d}class sf 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=[],d=[],h=[];let p=0,m=0;function g(b,v,y,M,x,C,F,D,k,B,T){const A=C/k,W=F/B,ie=C/2,ne=F/2,oe=D/2,ge=k+1,q=B+1;let se=0,J=0;const we=new O;for(let Ve=0;Ve0?1:-1,d.push(we.x,we.y,we.z),h.push(Rt/k),h.push(1-Ve/B),se+=1}for(let Ve=0;Ve0&&(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 pP extends Fr{constructor(){super(),this.isCamera=!0,this.type="Camera",this.matrixWorldInverse=new Bt,this.projectionMatrix=new Bt,this.projectionMatrixInverse=new Bt,this.coordinateSystem=td}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 Tu=new O,J4=new xe,e5=new xe;class br extends pP{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*ag*Math.atan(e),this.updateProjectionMatrix()}getFocalLength(){const t=Math.tan(.5*ef*this.fov);return.5*this.getFilmHeight()/t}getEffectiveFOV(){return 2*ag*Math.atan(Math.tan(.5*ef*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){Tu.set(-1,-1,.5).applyMatrix4(this.projectionMatrixInverse),e.set(Tu.x,Tu.y).multiplyScalar(-t/Tu.z),Tu.set(1,1,.5).applyMatrix4(this.projectionMatrixInverse),n.set(Tu.x,Tu.y).multiplyScalar(-t/Tu.z)}getViewSize(t,e){return this.getViewBounds(t,J4,e5),e.subVectors(e5,J4)}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*ef*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 Iae extends Fr{constructor(t,e,n){super(),this.type="CubeCamera",this.renderTarget=n,this.coordinateSystem=null,this.activeMipmapLevel=0;const r=new br(-90,1,t,e);r.layers=this.layers,this.add(r);const s=new br(-90,1,t,e);s.layers=this.layers,this.add(s);const o=new br(-90,1,t,e);o.layers=this.layers,this.add(o);const a=new br(-90,1,t,e);a.layers=this.layers,this.add(a);const l=new br(-90,1,t,e);l.layers=this.layers,this.add(l);const c=new br(-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===td)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,d]=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,d),t.setRenderTarget(h,p,m),t.xr.enabled=g,n.texture.needsPMREMUpdate=!0}}class sS extends Oo{constructor(t,e,n,r,s,o,a,l,c,d){super(t=void 0!==t?t:[],e=void 0!==e?e:cc,n,r,s,o,a,l,c,d),this.isCubeTexture=!0,this.flipY=!1}get images(){return this.image}set images(t){this.image=t}}class Rae extends Mu{constructor(t=1,e={}){super(t,t,e),this.isWebGLCubeRenderTarget=!0;const n={width:t,height:t,depth:1};this.texture=new sS([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:cr}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 sf(5,5,5),s=new Sl({name:"CubemapFromEquirect",uniforms:Sg(n_uniforms),vertexShader:n_vertexShader,fragmentShader:n_fragmentShader,side:ko,blending:Jc});s.uniforms.tEquirect.value=e;const o=new Mn(r,s),a=e.minFilter;return e.minFilter===xl&&(e.minFilter=cr),new Iae(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 mP=new O,kae=new O,Pae=new wn;class af{constructor(t=new O(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=mP.subVectors(n,e).cross(kae.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(mP),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||Pae.getNormalMatrix(t),r=this.coplanarPoint(mP).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 lf=new zs,oS=new O;class aS{constructor(t=new af,e=new af,n=new af,r=new af,s=new af,o=new af){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=td){const n=this.planes,r=t.elements,s=r[0],o=r[1],a=r[2],l=r[3],c=r[4],d=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+d,v+g,C+M).normalize(),n[3].setComponents(l-o,p-d,v-g,C-M).normalize(),n[4].setComponents(l-a,p-h,v-b,C-x).normalize(),e===td)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(),lf.copy(t.boundingSphere).applyMatrix4(t.matrixWorld);else{const e=t.geometry;null===e.boundingSphere&&e.computeBoundingSphere(),lf.copy(e.boundingSphere).applyMatrix4(t.matrixWorld)}return this.intersectsSphere(lf)}intersectsSprite(t){return lf.center.set(0,0,0),lf.radius=.7071067811865476,lf.applyMatrix4(t.matrixWorld),this.intersectsSphere(lf)}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,oS.y=r.normal.y>0?t.max.y:t.min.y,oS.z=r.normal.z>0?t.max.z:t.min.z,r.distanceToPoint(oS)<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 t5(){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 Oae(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.isInterleavedBufferAttribute&&(a=a.data),a.isGLBufferAttribute){const d=t.get(a);return void((!d||d.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 ) || defined( USE_BATCHING_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 ) || defined( USE_BATCHING_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\n#ifdef USE_BATCHING_COLOR\n\tvec3 batchingColor = getBatchingColor( getIndirectIndex( gl_DrawID ) );\n\tvColor.xyz *= batchingColor.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}\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}",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_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\tfloat distanceFalloff = 1.0 / max( pow( lightDistance, decayExponent ), 0.01 );\n\tif ( cutoffDistance > 0.0 ) {\n\t\tdistanceFalloff *= pow2( saturate( 1.0 - pow4( lightDistance / cutoffDistance ) ) );\n\t}\n\treturn distanceFalloff;\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_DISPERSION\n\tmaterial.dispersion = dispersion;\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\tfloat dispersion;\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.shadowIntensity, 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.shadowIntensity, 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.shadowIntensity, 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 )\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\tfor ( int i = 0; i < MORPHTARGETS_COUNT; i ++ ) {\n\t\tif ( morphTargetInfluences[ i ] != 0.0 ) objectNormal += getMorph( gl_VertexID, i, 1 ).xyz * morphTargetInfluences[ i ];\n\t}\n#endif",morphtarget_pars_vertex:"#ifdef USE_MORPHTARGETS\n\t#ifndef USE_INSTANCING_MORPH\n\t\tuniform float morphTargetBaseInfluence;\n\t\tuniform float morphTargetInfluences[ MORPHTARGETS_COUNT ];\n\t#endif\n\tuniform sampler2DArray morphTargetsTexture;\n\tuniform ivec2 morphTargetsTextureSize;\n\tvec4 getMorph( const in int vertexIndex, const in int morphTargetIndex, const in int offset ) {\n\t\tint texelIndex = vertexIndex * MORPHTARGETS_TEXTURE_STRIDE + offset;\n\t\tint y = texelIndex / morphTargetsTextureSize.x;\n\t\tint x = texelIndex - y * morphTargetsTextureSize.x;\n\t\tivec3 morphUV = ivec3( x, y, morphTargetIndex );\n\t\treturn texelFetch( morphTargetsTexture, morphUV, 0 );\n\t}\n#endif",morphtarget_vertex:"#ifdef USE_MORPHTARGETS\n\ttransformed *= morphTargetBaseInfluence;\n\tfor ( int i = 0; i < MORPHTARGETS_COUNT; i ++ ) {\n\t\tif ( morphTargetInfluences[ i ] != 0.0 ) transformed += getMorph( gl_VertexID, i, 0 ).xyz * morphTargetInfluences[ i ];\n\t}\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.;const float ShiftRight8 = 1. / 256.;\nconst float Inv255 = 1. / 255.;\nconst vec4 PackFactors = vec4( 1.0, 256.0, 256.0 * 256.0, 256.0 * 256.0 * 256.0 );\nconst vec2 UnpackFactors2 = vec2( UnpackDownscale, 1.0 / PackFactors.g );\nconst vec3 UnpackFactors3 = vec3( UnpackDownscale / PackFactors.rg, 1.0 / PackFactors.b );\nconst vec4 UnpackFactors4 = vec4( UnpackDownscale / PackFactors.rgb, 1.0 / PackFactors.a );\nvec4 packDepthToRGBA( const in float v ) {\n\tif( v <= 0.0 )\n\t\treturn vec4( 0., 0., 0., 0. );\n\tif( v >= 1.0 )\n\t\treturn vec4( 1., 1., 1., 1. );\n\tfloat vuf;\n\tfloat af = modf( v * PackFactors.a, vuf );\n\tfloat bf = modf( vuf * ShiftRight8, vuf );\n\tfloat gf = modf( vuf * ShiftRight8, vuf );\n\treturn vec4( vuf * Inv255, gf * PackUpscale, bf * PackUpscale, af );\n}\nvec3 packDepthToRGB( const in float v ) {\n\tif( v <= 0.0 )\n\t\treturn vec3( 0., 0., 0. );\n\tif( v >= 1.0 )\n\t\treturn vec3( 1., 1., 1. );\n\tfloat vuf;\n\tfloat bf = modf( v * PackFactors.b, vuf );\n\tfloat gf = modf( vuf * ShiftRight8, vuf );\n\treturn vec3( vuf * Inv255, gf * PackUpscale, bf );\n}\nvec2 packDepthToRG( const in float v ) {\n\tif( v <= 0.0 )\n\t\treturn vec2( 0., 0. );\n\tif( v >= 1.0 )\n\t\treturn vec2( 1., 1. );\n\tfloat vuf;\n\tfloat gf = modf( v * 256., vuf );\n\treturn vec2( vuf * Inv255, gf );\n}\nfloat unpackRGBAToDepth( const in vec4 v ) {\n\treturn dot( v, UnpackFactors4 );\n}\nfloat unpackRGBToDepth( const in vec3 v ) {\n\treturn dot( v, UnpackFactors3 );\n}\nfloat unpackRGToDepth( const in vec2 v ) {\n\treturn v.r * UnpackFactors2.r + v.g * UnpackFactors2.g;\n}\nvec4 pack2HalfToRGBA( const in 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( const in 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 shadowIntensity;\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 shadowIntensity;\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 shadowIntensity;\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 shadowIntensity, 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 mix( 1.0, shadow, shadowIntensity );\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 shadowIntensity, 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 mix( 1.0, shadow, shadowIntensity );\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 shadowIntensity;\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 shadowIntensity;\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 shadowIntensity;\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.shadowIntensity, 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.shadowIntensity, 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.shadowIntensity, 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\tconst float StartCompression = 0.8 - 0.04;\n\tconst float 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, vec3( newPeak ), 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.dispersion, 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 dispersion, const in float ior, const in float thickness,\n\t\tconst in vec3 attenuationColor, const in float attenuationDistance ) {\n\t\tvec4 transmittedLight;\n\t\tvec3 transmittance;\n\t\t#ifdef USE_DISPERSION\n\t\t\tfloat halfSpread = ( ior - 1.0 ) * 0.025 * dispersion;\n\t\t\tvec3 iors = vec3( ior - halfSpread, ior, ior + halfSpread );\n\t\t\tfor ( int i = 0; i < 3; i ++ ) {\n\t\t\t\tvec3 transmissionRay = getVolumeTransmissionRay( n, v, thickness, iors[ i ], modelMatrix );\n\t\t\t\tvec3 refractedRayExit = position + transmissionRay;\n\t\t\n\t\t\t\tvec4 ndcPos = projMatrix * viewMatrix * vec4( refractedRayExit, 1.0 );\n\t\t\t\tvec2 refractionCoords = ndcPos.xy / ndcPos.w;\n\t\t\t\trefractionCoords += 1.0;\n\t\t\t\trefractionCoords /= 2.0;\n\t\t\n\t\t\t\tvec4 transmissionSample = getTransmissionSample( refractionCoords, roughness, iors[ i ] );\n\t\t\t\ttransmittedLight[ i ] = transmissionSample[ i ];\n\t\t\t\ttransmittedLight.a += transmissionSample.a;\n\t\t\t\ttransmittance[ i ] = diffuseColor[ i ] * volumeAttenuation( length( transmissionRay ), attenuationColor, attenuationDistance )[ i ];\n\t\t\t}\n\t\t\ttransmittedLight.a /= 3.0;\n\t\t\n\t\t#else\n\t\t\n\t\t\tvec3 transmissionRay = getVolumeTransmissionRay( n, v, thickness, ior, modelMatrix );\n\t\t\tvec3 refractedRayExit = position + transmissionRay;\n\t\t\tvec4 ndcPos = projMatrix * viewMatrix * vec4( refractedRayExit, 1.0 );\n\t\t\tvec2 refractionCoords = ndcPos.xy / ndcPos.w;\n\t\t\trefractionCoords += 1.0;\n\t\t\trefractionCoords /= 2.0;\n\t\t\ttransmittedLight = getTransmissionSample( refractionCoords, roughness, ior );\n\t\t\ttransmittance = diffuseColor * volumeAttenuation( length( transmissionRay ), attenuationColor, attenuationDistance );\n\t\t\n\t\t#endif\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#elif DEPTH_PACKING == 3202\n\t\tgl_FragColor = vec4( packDepthToRGB( fragCoordZ ), 1.0 );\n\t#elif DEPTH_PACKING == 3203\n\t\tgl_FragColor = vec4( packDepthToRG( fragCoordZ ), 0.0, 1.0 );\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_DISPERSION\n\tuniform float dispersion;\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}"},Je={common:{diffuse:{value:new qe(16777215)},opacity:{value:1},map:{value:null},mapTransform:{value:new wn},alphaMap:{value:null},alphaMapTransform:{value:new wn},alphaTest:{value:0}},specularmap:{specularMap:{value:null},specularMapTransform:{value:new wn}},envmap:{envMap:{value:null},envMapRotation:{value:new wn},flipEnvMap:{value:-1},reflectivity:{value:1},ior:{value:1.5},refractionRatio:{value:.98}},aomap:{aoMap:{value:null},aoMapIntensity:{value:1},aoMapTransform:{value:new wn}},lightmap:{lightMap:{value:null},lightMapIntensity:{value:1},lightMapTransform:{value:new wn}},bumpmap:{bumpMap:{value:null},bumpMapTransform:{value:new wn},bumpScale:{value:1}},normalmap:{normalMap:{value:null},normalMapTransform:{value:new wn},normalScale:{value:new xe(1,1)}},displacementmap:{displacementMap:{value:null},displacementMapTransform:{value:new wn},displacementScale:{value:1},displacementBias:{value:0}},emissivemap:{emissiveMap:{value:null},emissiveMapTransform:{value:new wn}},metalnessmap:{metalnessMap:{value:null},metalnessMapTransform:{value:new wn}},roughnessmap:{roughnessMap:{value:null},roughnessMapTransform:{value:new wn}},gradientmap:{gradientMap:{value:null}},fog:{fogDensity:{value:25e-5},fogNear:{value:1},fogFar:{value:2e3},fogColor:{value:new qe(16777215)}},lights:{ambientLightColor:{value:[]},lightProbe:{value:[]},directionalLights:{value:[],properties:{direction:{},color:{}}},directionalLightShadows:{value:[],properties:{shadowIntensity:1,shadowBias:{},shadowNormalBias:{},shadowRadius:{},shadowMapSize:{}}},directionalShadowMap:{value:[]},directionalShadowMatrix:{value:[]},spotLights:{value:[],properties:{color:{},position:{},direction:{},distance:{},coneCos:{},penumbraCos:{},decay:{}}},spotLightShadows:{value:[],properties:{shadowIntensity:1,shadowBias:{},shadowNormalBias:{},shadowRadius:{},shadowMapSize:{}}},spotLightMap:{value:[]},spotShadowMap:{value:[]},spotLightMatrix:{value:[]},pointLights:{value:[],properties:{color:{},position:{},decay:{},distance:{}}},pointLightShadows:{value:[],properties:{shadowIntensity:1,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 qe(16777215)},opacity:{value:1},size:{value:1},scale:{value:1},map:{value:null},alphaMap:{value:null},alphaMapTransform:{value:new wn},alphaTest:{value:0},uvTransform:{value:new wn}},sprite:{diffuse:{value:new qe(16777215)},opacity:{value:1},center:{value:new xe(.5,.5)},rotation:{value:0},map:{value:null},mapTransform:{value:new wn},alphaMap:{value:null},alphaMapTransform:{value:new wn},alphaTest:{value:0}}},dc={basic:{uniforms:po([Je.common,Je.specularmap,Je.envmap,Je.aomap,Je.lightmap,Je.fog]),vertexShader:Cn.meshbasic_vert,fragmentShader:Cn.meshbasic_frag},lambert:{uniforms:po([Je.common,Je.specularmap,Je.envmap,Je.aomap,Je.lightmap,Je.emissivemap,Je.bumpmap,Je.normalmap,Je.displacementmap,Je.fog,Je.lights,{emissive:{value:new qe(0)}}]),vertexShader:Cn.meshlambert_vert,fragmentShader:Cn.meshlambert_frag},phong:{uniforms:po([Je.common,Je.specularmap,Je.envmap,Je.aomap,Je.lightmap,Je.emissivemap,Je.bumpmap,Je.normalmap,Je.displacementmap,Je.fog,Je.lights,{emissive:{value:new qe(0)},specular:{value:new qe(1118481)},shininess:{value:30}}]),vertexShader:Cn.meshphong_vert,fragmentShader:Cn.meshphong_frag},standard:{uniforms:po([Je.common,Je.envmap,Je.aomap,Je.lightmap,Je.emissivemap,Je.bumpmap,Je.normalmap,Je.displacementmap,Je.roughnessmap,Je.metalnessmap,Je.fog,Je.lights,{emissive:{value:new qe(0)},roughness:{value:1},metalness:{value:0},envMapIntensity:{value:1}}]),vertexShader:Cn.meshphysical_vert,fragmentShader:Cn.meshphysical_frag},toon:{uniforms:po([Je.common,Je.aomap,Je.lightmap,Je.emissivemap,Je.bumpmap,Je.normalmap,Je.displacementmap,Je.gradientmap,Je.fog,Je.lights,{emissive:{value:new qe(0)}}]),vertexShader:Cn.meshtoon_vert,fragmentShader:Cn.meshtoon_frag},matcap:{uniforms:po([Je.common,Je.bumpmap,Je.normalmap,Je.displacementmap,Je.fog,{matcap:{value:null}}]),vertexShader:Cn.meshmatcap_vert,fragmentShader:Cn.meshmatcap_frag},points:{uniforms:po([Je.points,Je.fog]),vertexShader:Cn.points_vert,fragmentShader:Cn.points_frag},dashed:{uniforms:po([Je.common,Je.fog,{scale:{value:1},dashSize:{value:1},totalSize:{value:2}}]),vertexShader:Cn.linedashed_vert,fragmentShader:Cn.linedashed_frag},depth:{uniforms:po([Je.common,Je.displacementmap]),vertexShader:Cn.depth_vert,fragmentShader:Cn.depth_frag},normal:{uniforms:po([Je.common,Je.bumpmap,Je.normalmap,Je.displacementmap,{opacity:{value:1}}]),vertexShader:Cn.meshnormal_vert,fragmentShader:Cn.meshnormal_frag},sprite:{uniforms:po([Je.sprite,Je.fog]),vertexShader:Cn.sprite_vert,fragmentShader:Cn.sprite_frag},background:{uniforms:{uvTransform:{value:new wn},t2D:{value:null},backgroundIntensity:{value:1}},vertexShader:Cn.background_vert,fragmentShader:Cn.background_frag},backgroundCube:{uniforms:{envMap:{value:null},flipEnvMap:{value:-1},backgroundBlurriness:{value:0},backgroundIntensity:{value:1},backgroundRotation:{value:new wn}},vertexShader:Cn.backgroundCube_vert,fragmentShader:Cn.backgroundCube_frag},cube:{uniforms:{tCube:{value:null},tFlip:{value:-1},opacity:{value:1}},vertexShader:Cn.cube_vert,fragmentShader:Cn.cube_frag},equirect:{uniforms:{tEquirect:{value:null}},vertexShader:Cn.equirect_vert,fragmentShader:Cn.equirect_frag},distanceRGBA:{uniforms:po([Je.common,Je.displacementmap,{referencePosition:{value:new O},nearDistance:{value:1},farDistance:{value:1e3}}]),vertexShader:Cn.distanceRGBA_vert,fragmentShader:Cn.distanceRGBA_frag},shadow:{uniforms:po([Je.lights,Je.fog,{color:{value:new qe(0)},opacity:{value:1}}]),vertexShader:Cn.shadow_vert,fragmentShader:Cn.shadow_frag}};dc.physical={uniforms:po([dc.standard.uniforms,{clearcoat:{value:0},clearcoatMap:{value:null},clearcoatMapTransform:{value:new wn},clearcoatNormalMap:{value:null},clearcoatNormalMapTransform:{value:new wn},clearcoatNormalScale:{value:new xe(1,1)},clearcoatRoughness:{value:0},clearcoatRoughnessMap:{value:null},clearcoatRoughnessMapTransform:{value:new wn},dispersion:{value:0},iridescence:{value:0},iridescenceMap:{value:null},iridescenceMapTransform:{value:new wn},iridescenceIOR:{value:1.3},iridescenceThicknessMinimum:{value:100},iridescenceThicknessMaximum:{value:400},iridescenceThicknessMap:{value:null},iridescenceThicknessMapTransform:{value:new wn},sheen:{value:0},sheenColor:{value:new qe(0)},sheenColorMap:{value:null},sheenColorMapTransform:{value:new wn},sheenRoughness:{value:1},sheenRoughnessMap:{value:null},sheenRoughnessMapTransform:{value:new wn},transmission:{value:0},transmissionMap:{value:null},transmissionMapTransform:{value:new wn},transmissionSamplerSize:{value:new xe},transmissionSamplerMap:{value:null},thickness:{value:0},thicknessMap:{value:null},thicknessMapTransform:{value:new wn},attenuationDistance:{value:0},attenuationColor:{value:new qe(0)},specularColor:{value:new qe(1,1,1)},specularColorMap:{value:null},specularColorMapTransform:{value:new wn},specularIntensity:{value:1},specularIntensityMap:{value:null},specularIntensityMapTransform:{value:new wn},anisotropyVector:{value:new xe},anisotropyMap:{value:null},anisotropyMapTransform:{value:new wn}}]),vertexShader:Cn.meshphysical_vert,fragmentShader:Cn.meshphysical_frag};const lS={r:0,b:0,g:0},cf=new rd,Oce=new Bt;function Fce(i,t,e,n,r,s,o){const a=new qe(0);let c,d,l=!0===s?0:1,h=null,p=0,m=null;function g(M){let x=!0===M.isScene?M.background:null;return x&&x.isTexture&&(x=(M.backgroundBlurriness>0?e:t).get(x)),x}function y(M,x){M.getRGB(lS,Z4(i)),n.buffers.color.setClear(lS.r,lS.g,lS.b,x,o)}return{getClearColor:function(){return a},setClearColor:function(M,x=1){a.set(M),l=x,y(a,l)},getClearAlpha:function(){return l},setClearAlpha:function(M){l=M,y(a,l)},render:function b(M){let x=!1;const C=g(M);null===C?y(a,l):C&&C.isColor&&(y(C,1),x=!0);const F=i.xr.getEnvironmentBlendMode();"additive"===F?n.buffers.color.setClear(0,0,0,1,o):"alpha-blend"===F&&n.buffers.color.setClear(0,0,0,0,o),(i.autoClear||x)&&(n.buffers.depth.setTest(!0),n.buffers.depth.setMask(!0),n.buffers.color.setMask(!0),i.clear(i.autoClearColor,i.autoClearDepth,i.autoClearStencil))},addToRenderList:function v(M,x){const C=g(x);C&&(C.isCubeTexture||C.mapping===gb)?(void 0===d&&(d=new Mn(new sf(1,1,1),new Sl({name:"BackgroundCubeMaterial",uniforms:Sg(dc.backgroundCube.uniforms),vertexShader:dc.backgroundCube.vertexShader,fragmentShader:dc.backgroundCube.fragmentShader,side:ko,depthTest:!1,depthWrite:!1,fog:!1})),d.geometry.deleteAttribute("normal"),d.geometry.deleteAttribute("uv"),d.onBeforeRender=function(F,D,k){this.matrixWorld.copyPosition(k.matrixWorld)},Object.defineProperty(d.material,"envMap",{get:function(){return this.uniforms.envMap.value}}),r.update(d)),cf.copy(x.backgroundRotation),cf.x*=-1,cf.y*=-1,cf.z*=-1,C.isCubeTexture&&!1===C.isRenderTargetTexture&&(cf.y*=-1,cf.z*=-1),d.material.uniforms.envMap.value=C,d.material.uniforms.flipEnvMap.value=C.isCubeTexture&&!1===C.isRenderTargetTexture?-1:1,d.material.uniforms.backgroundBlurriness.value=x.backgroundBlurriness,d.material.uniforms.backgroundIntensity.value=x.backgroundIntensity,d.material.uniforms.backgroundRotation.value.setFromMatrix4(Oce.makeRotationFromEuler(cf)),d.material.toneMapped=ei.getTransfer(C.colorSpace)!==Fi,(h!==C||p!==C.version||m!==i.toneMapping)&&(d.material.needsUpdate=!0,h=C,p=C.version,m=i.toneMapping),d.layers.enableAll(),M.unshift(d,d.geometry,d.material,0,0,null)):C&&C.isTexture&&(void 0===c&&(c=new Mn(new Iu(2,2),new Sl({name:"BackgroundMaterial",uniforms:Sg(dc.background.uniforms),vertexShader:dc.background.vertexShader,fragmentShader:dc.background.fragmentShader,side:lc,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=C,c.material.uniforms.backgroundIntensity.value=x.backgroundIntensity,c.material.toneMapped=ei.getTransfer(C.colorSpace)!==Fi,!0===C.matrixAutoUpdate&&C.updateMatrix(),c.material.uniforms.uvTransform.value.copy(C.matrix),(h!==C||p!==C.version||m!==i.toneMapping)&&(c.material.needsUpdate=!0,h=C,p=C.version,m=i.toneMapping),c.layers.enableAll(),M.unshift(c,c.geometry,c.material,0,0,null))}}}function Lce(i,t){const e=i.getParameter(i.MAX_VERTEX_ATTRIBS),n={},r=p(null);let s=r,o=!1;function c(A){return i.bindVertexArray(A)}function d(A){return i.deleteVertexArray(A)}function p(A){const W=[],ie=[],ne=[];for(let oe=0;oe=0){const Ve=oe[J];let Ye=ge[J];if(void 0===Ye&&("instanceMatrix"===J&&A.instanceMatrix&&(Ye=A.instanceMatrix),"instanceColor"===J&&A.instanceColor&&(Ye=A.instanceColor)),void 0===Ve||Ve.attribute!==Ye||Ye&&Ve.data!==Ye.data)return!0;q++}return s.attributesNum!==q||s.index!==ne}(A,ne,ie,oe),ge&&function g(A,W,ie,ne){const oe={},ge=W.attributes;let q=0;const se=ie.getAttributes();for(const J in se)if(se[J].location>=0){let Ve=ge[J];void 0===Ve&&("instanceMatrix"===J&&A.instanceMatrix&&(Ve=A.instanceMatrix),"instanceColor"===J&&A.instanceColor&&(Ve=A.instanceColor));const Ye={};Ye.attribute=Ve,Ve&&Ve.data&&(Ye.data=Ve.data),oe[J]=Ye,q++}s.attributes=oe,s.attributesNum=q,s.index=ne}(A,ne,ie,oe),null!==oe&&t.update(oe,i.ELEMENT_ARRAY_BUFFER),(ge||o)&&(o=!1,function C(A,W,ie,ne){b();const oe=ne.attributes,ge=ie.getAttributes(),q=W.defaultAttributeValues;for(const se in ge){const J=ge[se];if(J.location>=0){let we=oe[se];if(void 0===we&&("instanceMatrix"===se&&A.instanceMatrix&&(we=A.instanceMatrix),"instanceColor"===se&&A.instanceColor&&(we=A.instanceColor)),void 0!==we){const Ve=we.normalized,Ye=we.itemSize,Rt=t.get(we);if(void 0===Rt)continue;const nn=Rt.buffer,le=Rt.type,Fe=Rt.bytesPerElement,Ze=le===i.INT||le===i.UNSIGNED_INT||we.gpuType===hk;if(we.isInterleavedBufferAttribute){const Le=we.data,wt=Le.stride,Tt=we.offset;if(Le.isInstancedInterleavedBuffer){for(let St=0;St0&&i.getShaderPrecisionFormat(i.FRAGMENT_SHADER,i.HIGH_FLOAT).precision>0)return"highp";D="mediump"}return"mediump"===D&&i.getShaderPrecisionFormat(i.VERTEX_SHADER,i.MEDIUM_FLOAT).precision>0&&i.getShaderPrecisionFormat(i.FRAGMENT_SHADER,i.MEDIUM_FLOAT).precision>0?"mediump":"lowp"}let c=void 0!==e.precision?e.precision:"highp";const d=l(c);d!==c&&(console.warn("THREE.WebGLRenderer:",c,"not supported, using",d,"instead."),c=d);const h=!0===e.logarithmicDepthBuffer,p=i.getParameter(i.MAX_TEXTURE_IMAGE_UNITS),m=i.getParameter(i.MAX_VERTEX_TEXTURE_IMAGE_UNITS);return{isWebGL2:!0,getMaxAnisotropy:function s(){if(void 0!==r)return r;if(!0===t.has("EXT_texture_filter_anisotropic")){const D=t.get("EXT_texture_filter_anisotropic");r=i.getParameter(D.MAX_TEXTURE_MAX_ANISOTROPY_EXT)}else r=0;return r},getMaxPrecision:l,textureFormatReadable:function o(D){return!(D!==Po&&n.convert(D)!==i.getParameter(i.IMPLEMENTATION_COLOR_READ_FORMAT))},textureTypeReadable:function a(D){const k=D===Jm&&(t.has("EXT_color_buffer_half_float")||t.has("EXT_color_buffer_float"));return!(D!==ed&&n.convert(D)!==i.getParameter(i.IMPLEMENTATION_COLOR_READ_TYPE)&&D!==ta&&!k)},precision:c,logarithmicDepthBuffer:h,maxTextures:p,maxVertexTextures:m,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:m>0,maxSamples:i.getParameter(i.MAX_SAMPLES)}}function Uce(i){const t=this;let e=null,n=0,r=!1,s=!1;const o=new af,a=new wn,l={value:null,needsUpdate:!1};function d(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=d(g,p,x,m);for(let F=0;F!==x;++F)C[F]=e[F];y.clippingState=C,this.numIntersection=b?this.numPlanes:0,this.numPlanes+=M}}}function Vce(i){let t=new WeakMap;function e(o,a){return a===AC?o.mapping=cc:a===DC&&(o.mapping=Qh),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===AC||a===DC){if(t.has(o))return e(t.get(o).texture,o.mapping);{const l=o.image;if(l&&l.height>0){const c=new Rae(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 Rb extends pP{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,d=(this.top-this.bottom)/this.view.fullHeight/this.zoom;s+=c*this.view.offsetX,o=s+c*this.view.width,a-=d*this.view.offsetY,l=a-d*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 n5=[.125,.215,.35,.446,.526,.582],gP=new Rb,r5=new qe;let _P=null,vP=0,yP=0,bP=!1;const uf=(1+Math.sqrt(5))/2,Tg=1/uf,s5=[new O(-uf,Tg,0),new O(uf,Tg,0),new O(-Tg,0,uf),new O(Tg,0,uf),new O(0,uf,-Tg),new O(0,uf,Tg),new O(-1,1,-1),new O(1,1,-1),new O(-1,1,1),new O(1,1,1)];class o5{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){_P=this._renderer.getRenderTarget(),vP=this._renderer.getActiveCubeFace(),yP=this._renderer.getActiveMipmapLevel(),bP=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=c5(),this._compileMaterial(this._cubemapMaterial))}compileEquirectangularShader(){null===this._equirectMaterial&&(this._equirectMaterial=l5(),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=n5[o-i+4-1]:0===o&&(l=0),n.push(l);const c=1/(a-2),d=-c,h=1+c,p=[d,d,h,d,h,h,d,d,h,h,d,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 D=0;D2?0:-1;M.set([k,B,0,k+2/3,B,0,k+2/3,B+1,0,k,B,0,k+2/3,B+1,0,k,B+1,0],b*g*D),x.set(p,v*g*D),C.set([D,D,D,D,D,D],y*g*D)}const F=new hn;F.setAttribute("position",new Hi(M,b)),F.setAttribute("uv",new Hi(x,v)),F.setAttribute("faceIndex",new Hi(C,y)),t.push(F),r>4&&r--}return{lodPlanes:t,sizeLods:e,sigmas:n}}(s)),this._blurMaterial=function Hce(i,t,e){const n=new Float32Array(20),r=new O(0,1,0);return new Sl({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:Jc,depthTest:!1,depthWrite:!1})}(s,t,e)}return r}_compileMaterial(t){const e=new Mn(this._lodPlanes[0],t);this._renderer.compile(e,gP)}_sceneToCubeUV(t,e,n,r){const a=new br(90,1,e,n),l=[1,-1,1,1,1,1],c=[1,1,1,-1,-1,-1],d=this._renderer,h=d.autoClear,p=d.toneMapping;d.getClearColor(r5),d.toneMapping=bu,d.autoClear=!1;const m=new qi({name:"PMREM.Background",side:ko,depthWrite:!1,depthTest:!1}),g=new Mn(new sf,m);let b=!1;const v=t.background;v?v.isColor&&(m.color.copy(v),t.background=null,b=!0):(m.color.copy(r5),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;cS(r,M*x,y>2?x:0,x,x),d.setRenderTarget(r),b&&d.render(g,a),d.render(t,a)}g.geometry.dispose(),g.material.dispose(),d.toneMapping=p,d.autoClear=h,t.background=v}_textureToCubeUV(t,e){const n=this._renderer,r=t.mapping===cc||t.mapping===Qh;r?(null===this._cubemapMaterial&&(this._cubemapMaterial=c5()),this._cubemapMaterial.uniforms.flipEnvMap.value=!1===t.isRenderTargetTexture?-1:1):null===this._equirectMaterial&&(this._equirectMaterial=l5());const s=r?this._cubemapMaterial:this._equirectMaterial,o=new Mn(this._lodPlanes[0],s);s.uniforms.envMap.value=t;const l=this._cubeSize;cS(e,0,0,3*l,2*l),n.setRenderTarget(e),n.render(o,gP)}_applyPMREM(t){const e=this._renderer,n=e.autoClear;e.autoClear=!1;const r=this._lodPlanes.length;for(let s=1;s20&&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 k=0;k<20;++k){const B=k/b,T=Math.exp(-B*B/2);y.push(T),0===k?M+=T:kx-4?r-x+4:0),4*(this._cubeSize-C),3*C,2*C),l.setRenderTarget(e),l.render(h,gP)}}function a5(i,t,e){const n=new Mu(i,t,e);return n.texture.mapping=gb,n.texture.name="PMREM.cubeUv",n.scissorTest=!0,n}function cS(i,t,e,n,r){i.viewport.set(t,e,n,r),i.scissor.set(t,e,n,r)}function l5(){return new Sl({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:Jc,depthTest:!1,depthWrite:!1})}function c5(){return new Sl({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:Jc,depthTest:!1,depthWrite:!1})}function $ce(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===AC||l===DC,d=l===cc||l===Qh;if(c||d){let h=t.get(a);if(a.isRenderTargetTexture&&a.pmremVersion!==(void 0!==h?h.texture.pmremVersion:0))return null===e&&(e=new o5(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||d&&m&&function r(a){let l=0;for(let d=0;d<6;d++)void 0!==a[d]&&l++;return 6===l}(m)?(null===e&&(e=new o5(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 Gce(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&&cg("THREE.WebGLRenderer: "+n+" extension not supported."),r}}}function Wce(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&&(F=Math.ceil(C/t.maxTextureSize),C=t.maxTextureSize);const D=new Float32Array(C*F*4*h),k=new Qk(D,C,F,h);k.type=ta,k.needsUpdate=!0;const B=4*x;for(let A=0;A0)return i;const r=t*e;let s=g5[r];if(void 0===s&&(s=new Float32Array(r),g5[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 Lr(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 Gde(i,t){const e=function $de(i){const t=ei.getPrimaries(ei.workingColorSpace),e=ei.getPrimaries(i);let n;switch(t===e?n="":t===UC&&e===BC?n="LinearDisplayP3ToLinearSRGB":t===BC&&e===UC&&(n="LinearSRGBToLinearDisplayP3"),i){case ds:case LC:return[n,"LinearTransferOETF"];case cs:case Yk: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 Wde(i,t){let e;switch(t){case Moe:e="Linear";break;case Coe:e="Reinhard";break;case Soe:e="OptimizedCineon";break;case Eoe:e="ACESFilmic";break;case Doe:e="AgX";break;case Toe:e="Neutral";break;case Aoe:e="Custom";break;default:console.warn("THREE.WebGLProgram: Unsupported toneMapping:",t),e="Linear"}return"vec3 "+i+"( vec3 color ) { return "+e+"ToneMapping( color ); }"}const hS=new O;function kb(i){return""!==i}function C5(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 S5(i,t){return i.replace(/NUM_CLIPPING_PLANES/g,t.numClippingPlanes).replace(/UNION_CLIPPING_PLANES/g,t.numClippingPlanes-t.numClipIntersection)}const Kde=/^[ \t]*#include +<([\w\d./]+)>/gm;function MP(i){return i.replace(Kde,Qde)}const Zde=new Map;function Qde(i,t){let e=Cn[t];if(void 0===e){const n=Zde.get(t);if(void 0===n)throw new Error("Can not resolve #include <"+t+">");e=Cn[n],console.warn('THREE.WebGLRenderer: Shader chunk "%s" has been deprecated. Use "%s" instead.',t,n)}return MP(e)}const Jde=/#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 E5(i){return i.replace(Jde,eue)}function eue(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(kb).join("\n"),y.length>0&&(y+="\n")):(v=[A5(e),"#define SHADER_TYPE "+e.shaderType,"#define SHADER_NAME "+e.shaderName,g,e.extensionClipCullDistance?"#define USE_CLIP_DISTANCE":"",e.batching?"#define USE_BATCHING":"",e.batchingColor?"#define USE_BATCHING_COLOR":"",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 "+d:"",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_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.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","#ifdef USE_SKINNING","\tattribute vec4 skinIndex;","\tattribute vec4 skinWeight;","#endif","\n"].filter(kb).join("\n"),y=[A5(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 "+d:"",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.dispersion?"#define USE_DISPERSION":"",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||e.batchingColor?"#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.decodeVideoTexture?"#define DECODE_VIDEO_TEXTURE":"",e.logarithmicDepthBuffer?"#define USE_LOGDEPTHBUF":"","uniform mat4 viewMatrix;","uniform vec3 cameraPosition;","uniform bool isOrthographic;",e.toneMapping!==bu?"#define TONE_MAPPING":"",e.toneMapping!==bu?Cn.tonemapping_pars_fragment:"",e.toneMapping!==bu?Wde("toneMapping",e.toneMapping):"",e.dithering?"#define DITHERING":"",e.opaque?"#define OPAQUE":"",Cn.colorspace_pars_fragment,Gde("linearToOutputTexel",e.outputColorSpace),(ei.getLuminanceCoefficients(hS),["float luminance( const in vec3 rgb ) {",`\tconst vec3 weights = vec3( ${hS.x.toFixed(4)}, ${hS.y.toFixed(4)}, ${hS.z.toFixed(4)} );`,"\treturn dot( weights, rgb );","}"].join("\n")),e.useDepthPacking?"#define DEPTH_PACKING "+e.depthPacking:"","\n"].filter(kb).join("\n")),o=MP(o),o=C5(o,e),o=S5(o,e),a=MP(a),a=C5(a,e),a=S5(a,e),o=E5(o),a=E5(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===A4?"":"layout(location = 0) out highp vec4 pc_fragColor;",e.glslVersion===A4?"":"#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,F=w5(r,r.VERTEX_SHADER,M+v+o),D=w5(r,r.FRAGMENT_SHADER,C);function k(W){if(i.debug.checkShaderErrors){const ie=r.getProgramInfoLog(b).trim(),ne=r.getShaderInfoLog(F).trim(),oe=r.getShaderInfoLog(D).trim();let ge=!0,q=!0;if(!1===r.getProgramParameter(b,r.LINK_STATUS))if(ge=!1,"function"==typeof i.debug.onShaderError)i.debug.onShaderError(r,b,F,D);else{const se=M5(r,F,"vertex"),J=M5(r,D,"fragment");console.error("THREE.WebGLProgram: Shader Error "+r.getError()+" - VALIDATE_STATUS "+r.getProgramParameter(b,r.VALIDATE_STATUS)+"\n\nMaterial Name: "+W.name+"\nMaterial Type: "+W.type+"\n\nProgram Info Log: "+ie+"\n"+se+"\n"+J)}else""!==ie?console.warn("THREE.WebGLProgram: Program Info Log:",ie):(""===ne||""===oe)&&(q=!1);q&&(W.diagnostics={runnable:ge,programLog:ie,vertexShader:{log:ne,prefix:v},fragmentShader:{log:oe,prefix:y}})}r.deleteShader(F),r.deleteShader(D),B=new uS(r,b),T=function Xde(i,t){const e={},n=i.getProgramParameter(t,i.ACTIVE_ATTRIBUTES);for(let r=0;r0,de=T.clearcoat>0,De=T.iridescence>0,Ae=T.sheen>0,Ut=T.transmission>0,et=R&&!!T.anisotropyMap,pt=de&&!!T.clearcoatMap,bn=de&&!!T.clearcoatNormalMap,He=de&&!!T.clearcoatRoughnessMap,ft=De&&!!T.iridescenceMap,Yn=De&&!!T.iridescenceThicknessMap,cn=Ae&&!!T.sheenColorMap,yt=Ae&&!!T.sheenRoughnessMap,vn=!!T.specularMap,Pn=!!T.specularColorMap,Ki=!!T.specularIntensityMap,Z=Ut&&!!T.transmissionMap,We=Ut&&!!T.thicknessMap,Ee=!!T.alphaMap,ti=!!T.extensions;let xr=bu;T.toneMapped&&(null===Le||!0===Le.isXRRenderTarget)&&(xr=i.toneMapping);const hs={shaderID:we,shaderType:T.type,shaderName:T.name,vertexShader:nn,fragmentShader:le,defines:T.defines,customVertexShaderID:Fe,customFragmentShaderID:Ze,isRawShaderMaterial:!0===T.isRawShaderMaterial,glslVersion:T.glslVersion,precision:m,batching:Tt,batchingColor:Tt&&null!==ne._colorsTexture,instancing:wt,instancingColor:wt&&null!==ne.instanceColor,instancingMorph:wt&&null!==ne.morphTexture,supportsVertexTextures:p,outputColorSpace:null===Le?i.outputColorSpace:!0===Le.isXRRenderTarget?Le.texture.colorSpace:ds,alphaToCoverage:!!T.alphaToCoverage,map:St,matcap:!!T.matcap,envMap:N,envMapMode:N&&se.mapping,envMapCubeUVHeight:J,aoMap:Ge,lightMap:Ne,bumpMap:it,normalMap:Me,displacementMap:p&&Gt,emissiveMap:rt,normalMapObjectSpace:Me&&T.normalMapType===Noe,normalMapTangentSpace:Me&&T.normalMapType===Jh,metalnessMap:_t,roughnessMap:H,anisotropy:R,anisotropyMap:et,clearcoat:de,clearcoatMap:pt,clearcoatNormalMap:bn,clearcoatRoughnessMap:He,dispersion:T.dispersion>0,iridescence:De,iridescenceMap:ft,iridescenceThicknessMap:Yn,sheen:Ae,sheenColorMap:cn,sheenRoughnessMap:yt,specularMap:vn,specularColorMap:Pn,specularIntensityMap:Ki,transmission:Ut,transmissionMap:Z,thicknessMap:We,gradientMap:!!T.gradientMap,opaque:!1===T.transparent&&T.blending===Zm&&!1===T.alphaToCoverage,alphaMap:Ee,alphaTest:T.alphaTest>0,alphaHash:!!T.alphaHash,combine:T.combine,mapUv:St&&b(T.map.channel),aoMapUv:Ge&&b(T.aoMap.channel),lightMapUv:Ne&&b(T.lightMap.channel),bumpMapUv:it&&b(T.bumpMap.channel),normalMapUv:Me&&b(T.normalMap.channel),displacementMapUv:Gt&&b(T.displacementMap.channel),emissiveMapUv:rt&&b(T.emissiveMap.channel),metalnessMapUv:_t&&b(T.metalnessMap.channel),roughnessMapUv:H&&b(T.roughnessMap.channel),anisotropyMapUv:et&&b(T.anisotropyMap.channel),clearcoatMapUv:pt&&b(T.clearcoatMap.channel),clearcoatNormalMapUv:bn&&b(T.clearcoatNormalMap.channel),clearcoatRoughnessMapUv:He&&b(T.clearcoatRoughnessMap.channel),iridescenceMapUv:ft&&b(T.iridescenceMap.channel),iridescenceThicknessMapUv:Yn&&b(T.iridescenceThicknessMap.channel),sheenColorMapUv:cn&&b(T.sheenColorMap.channel),sheenRoughnessMapUv:yt&&b(T.sheenRoughnessMap.channel),specularMapUv:vn&&b(T.specularMap.channel),specularColorMapUv:Pn&&b(T.specularColorMap.channel),specularIntensityMapUv:Ki&&b(T.specularIntensityMap.channel),transmissionMapUv:Z&&b(T.transmissionMap.channel),thicknessMapUv:We&&b(T.thicknessMap.channel),alphaMapUv:Ee&&b(T.alphaMap.channel),vertexTangents:!!ge.attributes.tangent&&(Me||R),vertexColors:T.vertexColors,vertexAlphas:!0===T.vertexColors&&!!ge.attributes.color&&4===ge.attributes.color.itemSize,pointsUvs:!0===ne.isPoints&&!!ge.attributes.uv&&(St||Ee),fog:!!oe,useFog:!0===T.fog,fogExp2:!!oe&&oe.isFogExp2,flatShading:!0===T.flatShading,sizeAttenuation:!0===T.sizeAttenuation,logarithmicDepthBuffer:h,skinning:!0===ne.isSkinnedMesh,morphTargets:void 0!==ge.morphAttributes.position,morphNormals:void 0!==ge.morphAttributes.normal,morphColors:void 0!==ge.morphAttributes.color,morphTargetsCount:Ye,morphTextureStride:Rt,numDirLights:A.directional.length,numPointLights:A.point.length,numSpotLights:A.spot.length,numSpotLightMaps:A.spotLightMap.length,numRectAreaLights:A.rectArea.length,numHemiLights:A.hemi.length,numDirLightShadows:A.directionalShadowMap.length,numPointLightShadows:A.pointShadowMap.length,numSpotLightShadows:A.spotShadowMap.length,numSpotLightShadowsWithMaps:A.numSpotLightShadowsWithMaps,numLightProbes:A.numLightProbes,numClippingPlanes:o.numPlanes,numClipIntersection:o.numIntersection,dithering:T.dithering,shadowMapEnabled:i.shadowMap.enabled&&W.length>0,shadowMapType:i.shadowMap.type,toneMapping:xr,decodeVideoTexture:St&&!0===T.map.isVideoTexture&&ei.getTransfer(T.map.colorSpace)===Fi,premultipliedAlpha:T.premultipliedAlpha,doubleSided:T.side===Ns,flipSided:T.side===ko,useDepthPacking:T.depthPacking>=0,depthPacking:T.depthPacking||0,index0AttributeName:T.index0AttributeName,extensionClipCullDistance:ti&&!0===T.extensions.clipCullDistance&&n.has("WEBGL_clip_cull_distance"),extensionMultiDraw:(ti&&!0===T.extensions.multiDraw||Tt)&&n.has("WEBGL_multi_draw"),rendererExtensionParallelShaderCompile:n.has("KHR_parallel_shader_compile"),customProgramCacheKey:T.customProgramCacheKey()};return hs.vertexUv1s=c.has(1),hs.vertexUv2s=c.has(2),hs.vertexUv3s=c.has(3),c.clear(),hs},getProgramCacheKey:function y(T){const A=[];if(T.shaderID?A.push(T.shaderID):(A.push(T.customVertexShaderID),A.push(T.customFragmentShaderID)),void 0!==T.defines)for(const W in T.defines)A.push(W),A.push(T.defines[W]);return!1===T.isRawShaderMaterial&&(function M(T,A){T.push(A.precision),T.push(A.outputColorSpace),T.push(A.envMapMode),T.push(A.envMapCubeUVHeight),T.push(A.mapUv),T.push(A.alphaMapUv),T.push(A.lightMapUv),T.push(A.aoMapUv),T.push(A.bumpMapUv),T.push(A.normalMapUv),T.push(A.displacementMapUv),T.push(A.emissiveMapUv),T.push(A.metalnessMapUv),T.push(A.roughnessMapUv),T.push(A.anisotropyMapUv),T.push(A.clearcoatMapUv),T.push(A.clearcoatNormalMapUv),T.push(A.clearcoatRoughnessMapUv),T.push(A.iridescenceMapUv),T.push(A.iridescenceThicknessMapUv),T.push(A.sheenColorMapUv),T.push(A.sheenRoughnessMapUv),T.push(A.specularMapUv),T.push(A.specularColorMapUv),T.push(A.specularIntensityMapUv),T.push(A.transmissionMapUv),T.push(A.thicknessMapUv),T.push(A.combine),T.push(A.fogExp2),T.push(A.sizeAttenuation),T.push(A.morphTargetsCount),T.push(A.morphAttributeCount),T.push(A.numDirLights),T.push(A.numPointLights),T.push(A.numSpotLights),T.push(A.numSpotLightMaps),T.push(A.numHemiLights),T.push(A.numRectAreaLights),T.push(A.numDirLightShadows),T.push(A.numPointLightShadows),T.push(A.numSpotLightShadows),T.push(A.numSpotLightShadowsWithMaps),T.push(A.numLightProbes),T.push(A.shadowMapType),T.push(A.toneMapping),T.push(A.numClippingPlanes),T.push(A.numClipIntersection),T.push(A.depthPacking)}(A,T),function x(T,A){a.disableAll(),A.supportsVertexTextures&&a.enable(0),A.instancing&&a.enable(1),A.instancingColor&&a.enable(2),A.instancingMorph&&a.enable(3),A.matcap&&a.enable(4),A.envMap&&a.enable(5),A.normalMapObjectSpace&&a.enable(6),A.normalMapTangentSpace&&a.enable(7),A.clearcoat&&a.enable(8),A.iridescence&&a.enable(9),A.alphaTest&&a.enable(10),A.vertexColors&&a.enable(11),A.vertexAlphas&&a.enable(12),A.vertexUv1s&&a.enable(13),A.vertexUv2s&&a.enable(14),A.vertexUv3s&&a.enable(15),A.vertexTangents&&a.enable(16),A.anisotropy&&a.enable(17),A.alphaHash&&a.enable(18),A.batching&&a.enable(19),A.dispersion&&a.enable(20),A.batchingColor&&a.enable(21),T.push(a.mask),a.disableAll(),A.fog&&a.enable(0),A.useFog&&a.enable(1),A.flatShading&&a.enable(2),A.logarithmicDepthBuffer&&a.enable(3),A.skinning&&a.enable(4),A.morphTargets&&a.enable(5),A.morphNormals&&a.enable(6),A.morphColors&&a.enable(7),A.premultipliedAlpha&&a.enable(8),A.shadowMapEnabled&&a.enable(9),A.doubleSided&&a.enable(10),A.flipSided&&a.enable(11),A.useDepthPacking&&a.enable(12),A.dithering&&a.enable(13),A.transmission&&a.enable(14),A.sheen&&a.enable(15),A.opaque&&a.enable(16),A.pointsUvs&&a.enable(17),A.decodeVideoTexture&&a.enable(18),A.alphaToCoverage&&a.enable(19),T.push(a.mask)}(A,T),A.push(i.outputColorSpace)),A.push(T.customProgramCacheKey),A.join()},getUniforms:function C(T){const A=g[T.type];let W;return W=A?Q4.clone(dc[A].uniforms):T.uniforms,W},acquireProgram:function F(T,A){let W;for(let ie=0,ne=d.length;ie0?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 d(){for(let h=t,p=i.length;h1&&e.sort(h||hue),n.length>1&&n.sort(p||D5),r.length>1&&r.sort(p||D5)}}}function fue(){let i=new WeakMap;return{get:function t(n,r){const s=i.get(n);let o;return void 0===s?(o=new T5,i.set(n,[o])):r>=s.length?(o=new T5,s.push(o)):o=s[r],o},dispose:function e(){i=new WeakMap}}}function pue(){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 O,color:new qe};break;case"SpotLight":e={position:new O,direction:new O,color:new qe,distance:0,coneCos:0,penumbraCos:0,decay:0};break;case"PointLight":e={position:new O,color:new qe,distance:0,decay:0};break;case"HemisphereLight":e={direction:new O,skyColor:new qe,groundColor:new qe};break;case"RectAreaLight":e={color:new qe,position:new O,halfWidth:new O,halfHeight:new O}}return i[t.id]=e,e}}}let gue=0;function _ue(i,t){return(t.castShadow?2:0)-(i.castShadow?2:0)+(t.map?1:0)-(i.map?1:0)}function vue(i){const t=new pue,e=function mue(){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={shadowIntensity:1,shadowBias:0,shadowNormalBias:0,shadowRadius:1,shadowMapSize:new xe};break;case"PointLight":e={shadowIntensity:1,shadowBias:0,shadowNormalBias:0,shadowRadius:1,shadowMapSize:new xe,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 O);const r=new O,s=new Bt,o=new Bt;return{setup:function a(c){let d=0,h=0,p=0;for(let T=0;T<9;T++)n.probe[T].set(0,0,0);let m=0,g=0,b=0,v=0,y=0,M=0,x=0,C=0,F=0,D=0,k=0;c.sort(_ue);for(let T=0,A=c.length;T0&&(!0===i.has("OES_texture_float_linear")?(n.rectAreaLTC1=Je.LTC_FLOAT_1,n.rectAreaLTC2=Je.LTC_FLOAT_2):(n.rectAreaLTC1=Je.LTC_HALF_1,n.rectAreaLTC2=Je.LTC_HALF_2)),n.ambient[0]=d,n.ambient[1]=h,n.ambient[2]=p;const B=n.hash;(B.directionalLength!==m||B.pointLength!==g||B.spotLength!==b||B.rectAreaLength!==v||B.hemiLength!==y||B.numDirectionalShadows!==M||B.numPointShadows!==x||B.numSpotShadows!==C||B.numSpotMaps!==F||B.numLightProbes!==k)&&(n.directional.length=m,n.spot.length=b,n.rectArea.length=v,n.point.length=g,n.hemi.length=y,n.directionalShadow.length=M,n.directionalShadowMap.length=M,n.pointShadow.length=x,n.pointShadowMap.length=x,n.spotShadow.length=C,n.spotShadowMap.length=C,n.directionalShadowMatrix.length=M,n.pointShadowMatrix.length=x,n.spotLightMatrix.length=C+F-D,n.spotLightMap.length=F,n.numSpotLightShadowsWithMaps=D,n.numLightProbes=k,B.directionalLength=m,B.pointLength=g,B.spotLength=b,B.rectAreaLength=v,B.hemiLength=y,B.numDirectionalShadows=M,B.numPointShadows=x,B.numSpotShadows=C,B.numSpotMaps=F,B.numLightProbes=k,n.version=gue++)},setupView:function l(c,d){let h=0,p=0,m=0,g=0,b=0;const v=d.matrixWorldInverse;for(let y=0,M=c.length;y=o.length?(a=new I5(i),o.push(a)):a=o[s],a},dispose:function n(){t=new WeakMap}}}class R5 extends Fo{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 k5 extends Fo{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 bue="void main() {\n\tgl_Position = vec4( position, 1.0 );\n}",xue="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 wue(i,t,e){let n=new aS;const r=new xe,s=new xe,o=new vi,a=new R5({depthPacking:Loe}),l=new k5,c={},d=e.maxTextureSize,h={[lc]:ko,[ko]:lc,[Ns]:Ns},p=new Sl({defines:{VSM_SAMPLES:8},uniforms:{shadow_pass:{value:null},resolution:{value:new xe},radius:{value:4}},vertexShader:bue,fragmentShader:xue}),m=p.clone();m.defines.HORIZONTAL_PASS=1;const g=new hn;g.setAttribute("position",new Hi(new Float32Array([-1,-1,.5,3,-1,.5,-1,3,.5]),3));const b=new Mn(g,p),v=this;this.enabled=!1,this.autoUpdate=!0,this.needsUpdate=!1,this.type=l4;let y=this.type;function M(D,k){const B=t.update(b);p.defines.VSM_SAMPLES!==D.blurSamples&&(p.defines.VSM_SAMPLES=D.blurSamples,m.defines.VSM_SAMPLES=D.blurSamples,p.needsUpdate=!0,m.needsUpdate=!0),null===D.mapPass&&(D.mapPass=new Mu(r.x,r.y)),p.uniforms.shadow_pass.value=D.map.texture,p.uniforms.resolution.value=D.mapSize,p.uniforms.radius.value=D.radius,i.setRenderTarget(D.mapPass),i.clear(),i.renderBufferDirect(k,null,B,p,b,null),m.uniforms.shadow_pass.value=D.mapPass.texture,m.uniforms.resolution.value=D.mapSize,m.uniforms.radius.value=D.radius,i.setRenderTarget(D.map),i.clear(),i.renderBufferDirect(k,null,B,m,b,null)}function x(D,k,B,T){let A=null;const W=!0===B.isPointLight?D.customDistanceMaterial:D.customDepthMaterial;if(void 0!==W)A=W;else if(A=!0===B.isPointLight?l:a,i.localClippingEnabled&&!0===k.clipShadows&&Array.isArray(k.clippingPlanes)&&0!==k.clippingPlanes.length||k.displacementMap&&0!==k.displacementScale||k.alphaMap&&k.alphaTest>0||k.map&&k.alphaTest>0){const ie=A.uuid,ne=k.uuid;let oe=c[ie];void 0===oe&&(oe={},c[ie]=oe);let ge=oe[ne];void 0===ge&&(ge=A.clone(),oe[ne]=ge,k.addEventListener("dispose",F)),A=ge}return A.visible=k.visible,A.wireframe=k.wireframe,A.side=T===Qc?null!==k.shadowSide?k.shadowSide:k.side:null!==k.shadowSide?k.shadowSide:h[k.side],A.alphaMap=k.alphaMap,A.alphaTest=k.alphaTest,A.map=k.map,A.clipShadows=k.clipShadows,A.clippingPlanes=k.clippingPlanes,A.clipIntersection=k.clipIntersection,A.displacementMap=k.displacementMap,A.displacementScale=k.displacementScale,A.displacementBias=k.displacementBias,A.wireframeLinewidth=k.wireframeLinewidth,A.linewidth=k.linewidth,!0===B.isPointLight&&!0===A.isMeshDistanceMaterial&&(i.properties.get(A).light=B),A}function C(D,k,B,T,A){if(!1===D.visible)return;if(D.layers.test(k.layers)&&(D.isMesh||D.isLine||D.isPoints)&&(D.castShadow||D.receiveShadow&&A===Qc)&&(!D.frustumCulled||n.intersectsObject(D))){D.modelViewMatrix.multiplyMatrices(B.matrixWorldInverse,D.matrixWorld);const ne=t.update(D),oe=D.material;if(Array.isArray(oe)){const ge=ne.groups;for(let q=0,se=ge.length;qd||r.y>d)&&(r.x>d&&(s.x=Math.floor(d/we.x),r.x=s.x*we.x,J.mapSize.x=s.x),r.y>d&&(s.y=Math.floor(d/we.y),r.y=s.y*we.y,J.mapSize.y=s.y)),null===J.map||!0===ne||!0===oe){const Ye=this.type!==Qc?{minFilter:vr,magFilter:vr}:{};null!==J.map&&J.map.dispose(),J.map=new Mu(r.x,r.y,Ye),J.map.texture.name=se.name+".shadowMap",J.camera.updateProjectionMatrix()}i.setRenderTarget(J.map),i.clear();const Ve=J.getViewportCount();for(let Ye=0;Ye=1):-1!==se.indexOf("OpenGL ES")&&(q=parseFloat(/^OpenGL ES (\d)/.exec(se)[1]),ge=q>=2);let J=null,we={};const Ve=i.getParameter(i.SCISSOR_BOX),Ye=i.getParameter(i.VIEWPORT),Rt=(new vi).fromArray(Ve),nn=(new vi).fromArray(Ye);function le(Z,We,Ce,Ee){const Ke=new Uint8Array(4),rn=i.createTexture();i.bindTexture(Z,rn),i.texParameteri(Z,i.TEXTURE_MIN_FILTER,i.NEAREST),i.texParameteri(Z,i.TEXTURE_MAG_FILTER,i.NEAREST);for(let ti=0;ti"u")&&/OculusBrowser/g.test(navigator.userAgent),c=new xe,d=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(H,R){return m?new OffscreenCanvas(H,R):Mb("canvas")}function b(H,R,de){let ke=1;const De=_t(H);if((De.width>de||De.height>de)&&(ke=de/Math.max(De.width,De.height)),ke<1){if(typeof HTMLImageElement<"u"&&H instanceof HTMLImageElement||typeof HTMLCanvasElement<"u"&&H instanceof HTMLCanvasElement||typeof ImageBitmap<"u"&&H instanceof ImageBitmap||typeof VideoFrame<"u"&&H instanceof VideoFrame){const Ae=Math.floor(ke*De.width),Ut=Math.floor(ke*De.height);void 0===h&&(h=g(Ae,Ut));const et=R?g(Ae,Ut):h;return et.width=Ae,et.height=Ut,et.getContext("2d").drawImage(H,0,0,Ae,Ut),console.warn("THREE.WebGLRenderer: Texture has been resized from ("+De.width+"x"+De.height+") to ("+Ae+"x"+Ut+")."),et}return"data"in H&&console.warn("THREE.WebGLRenderer: Image in DataTexture is too big ("+De.width+"x"+De.height+")."),H}return H}function v(H){return H.generateMipmaps&&H.minFilter!==vr&&H.minFilter!==cr}function y(H){i.generateMipmap(H)}function M(H,R,de,ke,De=!1){if(null!==H){if(void 0!==i[H])return i[H];console.warn("THREE.WebGLRenderer: Attempt to use non-existing WebGL internal format '"+H+"'")}let Ae=R;if(R===i.RED&&(de===i.FLOAT&&(Ae=i.R32F),de===i.HALF_FLOAT&&(Ae=i.R16F),de===i.UNSIGNED_BYTE&&(Ae=i.R8)),R===i.RED_INTEGER&&(de===i.UNSIGNED_BYTE&&(Ae=i.R8UI),de===i.UNSIGNED_SHORT&&(Ae=i.R16UI),de===i.UNSIGNED_INT&&(Ae=i.R32UI),de===i.BYTE&&(Ae=i.R8I),de===i.SHORT&&(Ae=i.R16I),de===i.INT&&(Ae=i.R32I)),R===i.RG&&(de===i.FLOAT&&(Ae=i.RG32F),de===i.HALF_FLOAT&&(Ae=i.RG16F),de===i.UNSIGNED_BYTE&&(Ae=i.RG8)),R===i.RG_INTEGER&&(de===i.UNSIGNED_BYTE&&(Ae=i.RG8UI),de===i.UNSIGNED_SHORT&&(Ae=i.RG16UI),de===i.UNSIGNED_INT&&(Ae=i.RG32UI),de===i.BYTE&&(Ae=i.RG8I),de===i.SHORT&&(Ae=i.RG16I),de===i.INT&&(Ae=i.RG32I)),R===i.RGB&&de===i.UNSIGNED_INT_5_9_9_9_REV&&(Ae=i.RGB9_E5),R===i.RGBA){const Ut=De?NC:ei.getTransfer(ke);de===i.FLOAT&&(Ae=i.RGBA32F),de===i.HALF_FLOAT&&(Ae=i.RGBA16F),de===i.UNSIGNED_BYTE&&(Ae=Ut===Fi?i.SRGB8_ALPHA8:i.RGBA8),de===i.UNSIGNED_SHORT_4_4_4_4&&(Ae=i.RGBA4),de===i.UNSIGNED_SHORT_5_5_5_1&&(Ae=i.RGB5_A1)}return(Ae===i.R16F||Ae===i.R32F||Ae===i.RG16F||Ae===i.RG32F||Ae===i.RGBA16F||Ae===i.RGBA32F)&&t.get("EXT_color_buffer_float"),Ae}function x(H,R){let de;return H?null===R||R===xu||R===eg?de=i.DEPTH24_STENCIL8:R===ta?de=i.DEPTH32F_STENCIL8:R===yb&&(de=i.DEPTH24_STENCIL8,console.warn("DepthTexture: 16 bit depth attachment is not supported with stencil. Using 24-bit attachment.")):null===R||R===xu||R===eg?de=i.DEPTH_COMPONENT24:R===ta?de=i.DEPTH_COMPONENT32F:R===yb&&(de=i.DEPTH_COMPONENT16),de}function C(H,R){return!0===v(H)||H.isFramebufferTexture&&H.minFilter!==vr&&H.minFilter!==cr?Math.log2(Math.max(R.width,R.height))+1:void 0!==H.mipmaps&&H.mipmaps.length>0?H.mipmaps.length:H.isCompressedTexture&&Array.isArray(H.image)?R.mipmaps.length:1}function F(H){const R=H.target;R.removeEventListener("dispose",F),function k(H){const R=n.get(H);if(void 0===R.__webglInit)return;const de=H.source,ke=p.get(de);if(ke){const De=ke[R.__cacheKey];De.usedTimes--,0===De.usedTimes&&B(H),0===Object.keys(ke).length&&p.delete(de)}n.remove(H)}(R),R.isVideoTexture&&d.delete(R)}function D(H){const R=H.target;R.removeEventListener("dispose",D),function T(H){const R=n.get(H);if(H.depthTexture&&H.depthTexture.dispose(),H.isWebGLCubeRenderTarget)for(let ke=0;ke<6;ke++){if(Array.isArray(R.__webglFramebuffer[ke]))for(let De=0;De0&&de.__version!==H.version){const ke=H.image;if(null===ke)console.warn("THREE.WebGLRenderer: Texture marked for update but no image data found.");else{if(!1!==ke.complete)return void nn(de,H,R);console.warn("THREE.WebGLRenderer: Texture marked for update but image is incomplete")}}e.bindTexture(i.TEXTURE_2D,de.__webglTexture,i.TEXTURE0+R)}const J={[Bs]:i.REPEAT,[er]:i.CLAMP_TO_EDGE,[_b]:i.MIRRORED_REPEAT},we={[vr]:i.NEAREST,[uk]:i.NEAREST_MIPMAP_NEAREST,[Qm]:i.NEAREST_MIPMAP_LINEAR,[cr]:i.LINEAR,[vb]:i.LINEAR_MIPMAP_NEAREST,[xl]:i.LINEAR_MIPMAP_LINEAR},Ve={[Boe]:i.NEVER,[Goe]:i.ALWAYS,[Uoe]:i.LESS,[E4]:i.LEQUAL,[Voe]:i.EQUAL,[$oe]:i.GEQUAL,[zoe]:i.GREATER,[Hoe]:i.NOTEQUAL};function Ye(H,R){if(R.type===ta&&!1===t.has("OES_texture_float_linear")&&(R.magFilter===cr||R.magFilter===vb||R.magFilter===Qm||R.magFilter===xl||R.minFilter===cr||R.minFilter===vb||R.minFilter===Qm||R.minFilter===xl)&&console.warn("THREE.WebGLRenderer: Unable to use linear filtering with floating point textures. OES_texture_float_linear not supported on this device."),i.texParameteri(H,i.TEXTURE_WRAP_S,J[R.wrapS]),i.texParameteri(H,i.TEXTURE_WRAP_T,J[R.wrapT]),(H===i.TEXTURE_3D||H===i.TEXTURE_2D_ARRAY)&&i.texParameteri(H,i.TEXTURE_WRAP_R,J[R.wrapR]),i.texParameteri(H,i.TEXTURE_MAG_FILTER,we[R.magFilter]),i.texParameteri(H,i.TEXTURE_MIN_FILTER,we[R.minFilter]),R.compareFunction&&(i.texParameteri(H,i.TEXTURE_COMPARE_MODE,i.COMPARE_REF_TO_TEXTURE),i.texParameteri(H,i.TEXTURE_COMPARE_FUNC,Ve[R.compareFunction])),!0===t.has("EXT_texture_filter_anisotropic")){if(R.magFilter===vr||R.minFilter!==Qm&&R.minFilter!==xl||R.type===ta&&!1===t.has("OES_texture_float_linear"))return;if(R.anisotropy>1||n.get(R).__currentAnisotropy){const de=t.get("EXT_texture_filter_anisotropic");i.texParameterf(H,de.TEXTURE_MAX_ANISOTROPY_EXT,Math.min(R.anisotropy,r.getMaxAnisotropy())),n.get(R).__currentAnisotropy=R.anisotropy}}}function Rt(H,R){let de=!1;void 0===H.__webglInit&&(H.__webglInit=!0,R.addEventListener("dispose",F));const ke=R.source;let De=p.get(ke);void 0===De&&(De={},p.set(ke,De));const Ae=function ne(H){const R=[];return R.push(H.wrapS),R.push(H.wrapT),R.push(H.wrapR||0),R.push(H.magFilter),R.push(H.minFilter),R.push(H.anisotropy),R.push(H.internalFormat),R.push(H.format),R.push(H.type),R.push(H.generateMipmaps),R.push(H.premultiplyAlpha),R.push(H.flipY),R.push(H.unpackAlignment),R.push(H.colorSpace),R.join()}(R);if(Ae!==H.__cacheKey){void 0===De[Ae]&&(De[Ae]={texture:i.createTexture(),usedTimes:0},o.memory.textures++,de=!0),De[Ae].usedTimes++;const Ut=De[H.__cacheKey];void 0!==Ut&&(De[H.__cacheKey].usedTimes--,0===Ut.usedTimes&&B(R)),H.__cacheKey=Ae,H.__webglTexture=De[Ae].texture}return de}function nn(H,R,de){let ke=i.TEXTURE_2D;(R.isDataArrayTexture||R.isCompressedArrayTexture)&&(ke=i.TEXTURE_2D_ARRAY),R.isData3DTexture&&(ke=i.TEXTURE_3D);const De=Rt(H,R),Ae=R.source;e.bindTexture(ke,H.__webglTexture,i.TEXTURE0+de);const Ut=n.get(Ae);if(Ae.version!==Ut.__version||!0===De){e.activeTexture(i.TEXTURE0+de);const et=ei.getPrimaries(ei.workingColorSpace),pt=R.colorSpace===wu?null:ei.getPrimaries(R.colorSpace),bn=R.colorSpace===wu||et===pt?i.NONE:i.BROWSER_DEFAULT_WEBGL;i.pixelStorei(i.UNPACK_FLIP_Y_WEBGL,R.flipY),i.pixelStorei(i.UNPACK_PREMULTIPLY_ALPHA_WEBGL,R.premultiplyAlpha),i.pixelStorei(i.UNPACK_ALIGNMENT,R.unpackAlignment),i.pixelStorei(i.UNPACK_COLORSPACE_CONVERSION_WEBGL,bn);let He=b(R.image,!1,r.maxTextureSize);He=rt(R,He);const ft=s.convert(R.format,R.colorSpace),Yn=s.convert(R.type);let yt,cn=M(R.internalFormat,ft,Yn,R.colorSpace,R.isVideoTexture);Ye(ke,R);const vn=R.mipmaps,Pn=!0!==R.isVideoTexture,Ki=void 0===Ut.__version||!0===De,Z=Ae.dataReady,We=C(R,He);if(R.isDepthTexture)cn=x(R.format===ng,R.type),Ki&&(Pn?e.texStorage2D(i.TEXTURE_2D,1,cn,He.width,He.height):e.texImage2D(i.TEXTURE_2D,0,cn,He.width,He.height,0,ft,Yn,null));else if(R.isDataTexture)if(vn.length>0){Pn&&Ki&&e.texStorage2D(i.TEXTURE_2D,We,cn,vn[0].width,vn[0].height);for(let Ce=0,Ee=vn.length;Ce0){const Ke=CP(yt.width,yt.height,R.format,R.type);for(const rn of R.layerUpdates){const ti=yt.data.subarray(rn*Ke/yt.data.BYTES_PER_ELEMENT,(rn+1)*Ke/yt.data.BYTES_PER_ELEMENT);e.compressedTexSubImage3D(i.TEXTURE_2D_ARRAY,Ce,0,0,rn,yt.width,yt.height,1,ft,ti,0,0)}R.clearLayerUpdates()}else e.compressedTexSubImage3D(i.TEXTURE_2D_ARRAY,Ce,0,0,0,yt.width,yt.height,He.depth,ft,yt.data,0,0)}else e.compressedTexImage3D(i.TEXTURE_2D_ARRAY,Ce,cn,yt.width,yt.height,He.depth,0,yt.data,0,0);else console.warn("THREE.WebGLRenderer: Attempt to load unsupported compressed texture format in .uploadTexture()");else Pn?Z&&e.texSubImage3D(i.TEXTURE_2D_ARRAY,Ce,0,0,0,yt.width,yt.height,He.depth,ft,Yn,yt.data):e.texImage3D(i.TEXTURE_2D_ARRAY,Ce,cn,yt.width,yt.height,He.depth,0,ft,Yn,yt.data)}else{Pn&&Ki&&e.texStorage2D(i.TEXTURE_2D,We,cn,vn[0].width,vn[0].height);for(let Ce=0,Ee=vn.length;Ce0){const Ce=CP(He.width,He.height,R.format,R.type);for(const Ee of R.layerUpdates){const Ke=He.data.subarray(Ee*Ce/He.data.BYTES_PER_ELEMENT,(Ee+1)*Ce/He.data.BYTES_PER_ELEMENT);e.texSubImage3D(i.TEXTURE_2D_ARRAY,0,0,0,Ee,He.width,He.height,1,ft,Yn,Ke)}R.clearLayerUpdates()}else e.texSubImage3D(i.TEXTURE_2D_ARRAY,0,0,0,0,He.width,He.height,He.depth,ft,Yn,He.data)}else e.texImage3D(i.TEXTURE_2D_ARRAY,0,cn,He.width,He.height,He.depth,0,ft,Yn,He.data);else if(R.isData3DTexture)Pn?(Ki&&e.texStorage3D(i.TEXTURE_3D,We,cn,He.width,He.height,He.depth),Z&&e.texSubImage3D(i.TEXTURE_3D,0,0,0,0,He.width,He.height,He.depth,ft,Yn,He.data)):e.texImage3D(i.TEXTURE_3D,0,cn,He.width,He.height,He.depth,0,ft,Yn,He.data);else if(R.isFramebufferTexture){if(Ki)if(Pn)e.texStorage2D(i.TEXTURE_2D,We,cn,He.width,He.height);else{let Ce=He.width,Ee=He.height;for(let Ke=0;Ke>=1,Ee>>=1}}else if(vn.length>0){if(Pn&&Ki){const Ce=_t(vn[0]);e.texStorage2D(i.TEXTURE_2D,We,cn,Ce.width,Ce.height)}for(let Ce=0,Ee=vn.length;Ce>Ae),ft=Math.max(1,R.height>>Ae);De===i.TEXTURE_3D||De===i.TEXTURE_2D_ARRAY?e.texImage3D(De,Ae,pt,He,ft,R.depth,0,Ut,et,null):e.texImage2D(De,Ae,pt,He,ft,0,Ut,et,null)}e.bindFramebuffer(i.FRAMEBUFFER,H),Me(R)?a.framebufferTexture2DMultisampleEXT(i.FRAMEBUFFER,ke,De,n.get(de).__webglTexture,0,it(R)):(De===i.TEXTURE_2D||De>=i.TEXTURE_CUBE_MAP_POSITIVE_X&&De<=i.TEXTURE_CUBE_MAP_NEGATIVE_Z)&&i.framebufferTexture2D(i.FRAMEBUFFER,ke,De,n.get(de).__webglTexture,Ae),e.bindFramebuffer(i.FRAMEBUFFER,null)}function Ze(H,R,de){if(i.bindRenderbuffer(i.RENDERBUFFER,H),R.depthBuffer){const ke=R.depthTexture,Ae=x(R.stencilBuffer,ke&&ke.isDepthTexture?ke.type:null),Ut=R.stencilBuffer?i.DEPTH_STENCIL_ATTACHMENT:i.DEPTH_ATTACHMENT,et=it(R);Me(R)?a.renderbufferStorageMultisampleEXT(i.RENDERBUFFER,et,Ae,R.width,R.height):de?i.renderbufferStorageMultisample(i.RENDERBUFFER,et,Ae,R.width,R.height):i.renderbufferStorage(i.RENDERBUFFER,Ae,R.width,R.height),i.framebufferRenderbuffer(i.FRAMEBUFFER,Ut,i.RENDERBUFFER,H)}else{const ke=R.textures;for(let De=0;De0&&!0===t.has("WEBGL_multisampled_render_to_texture")&&!1!==R.__useRenderToTexture}function rt(H,R){const de=H.colorSpace,ke=H.format,De=H.type;return!0===H.isCompressedTexture||!0===H.isVideoTexture||de!==ds&&de!==wu&&(ei.getTransfer(de)===Fi?(ke!==Po||De!==ed)&&console.warn("THREE.WebGLTextures: sRGB encoded textures have to use RGBAFormat and UnsignedByteType."):console.error("THREE.WebGLTextures: Unsupported texture color space:",de)),R}function _t(H){return typeof HTMLImageElement<"u"&&H instanceof HTMLImageElement?(c.width=H.naturalWidth||H.width,c.height=H.naturalHeight||H.height):typeof VideoFrame<"u"&&H instanceof VideoFrame?(c.width=H.displayWidth,c.height=H.displayHeight):(c.width=H.width,c.height=H.height),c}this.allocateTextureUnit=function ie(){const H=A;return H>=r.maxTextures&&console.warn("THREE.WebGLTextures: Trying to use "+H+" texture units while this GPU supports only "+r.maxTextures),A+=1,H},this.resetTextureUnits=function W(){A=0},this.setTexture2D=oe,this.setTexture2DArray=function ge(H,R){const de=n.get(H);H.version>0&&de.__version!==H.version?nn(de,H,R):e.bindTexture(i.TEXTURE_2D_ARRAY,de.__webglTexture,i.TEXTURE0+R)},this.setTexture3D=function q(H,R){const de=n.get(H);H.version>0&&de.__version!==H.version?nn(de,H,R):e.bindTexture(i.TEXTURE_3D,de.__webglTexture,i.TEXTURE0+R)},this.setTextureCube=function se(H,R){const de=n.get(H);H.version>0&&de.__version!==H.version?function le(H,R,de){if(6!==R.image.length)return;const ke=Rt(H,R),De=R.source;e.bindTexture(i.TEXTURE_CUBE_MAP,H.__webglTexture,i.TEXTURE0+de);const Ae=n.get(De);if(De.version!==Ae.__version||!0===ke){e.activeTexture(i.TEXTURE0+de);const Ut=ei.getPrimaries(ei.workingColorSpace),et=R.colorSpace===wu?null:ei.getPrimaries(R.colorSpace),pt=R.colorSpace===wu||Ut===et?i.NONE:i.BROWSER_DEFAULT_WEBGL;i.pixelStorei(i.UNPACK_FLIP_Y_WEBGL,R.flipY),i.pixelStorei(i.UNPACK_PREMULTIPLY_ALPHA_WEBGL,R.premultiplyAlpha),i.pixelStorei(i.UNPACK_ALIGNMENT,R.unpackAlignment),i.pixelStorei(i.UNPACK_COLORSPACE_CONVERSION_WEBGL,pt);const bn=R.isCompressedTexture||R.image[0].isCompressedTexture,He=R.image[0]&&R.image[0].isDataTexture,ft=[];for(let Ee=0;Ee<6;Ee++)ft[Ee]=bn||He?He?R.image[Ee].image:R.image[Ee]:b(R.image[Ee],!0,r.maxCubemapSize),ft[Ee]=rt(R,ft[Ee]);const Yn=ft[0],cn=s.convert(R.format,R.colorSpace),yt=s.convert(R.type),vn=M(R.internalFormat,cn,yt,R.colorSpace),Pn=!0!==R.isVideoTexture,Ki=void 0===Ae.__version||!0===ke,Z=De.dataReady;let Ce,We=C(R,Yn);if(Ye(i.TEXTURE_CUBE_MAP,R),bn){Pn&&Ki&&e.texStorage2D(i.TEXTURE_CUBE_MAP,We,vn,Yn.width,Yn.height);for(let Ee=0;Ee<6;Ee++){Ce=ft[Ee].mipmaps;for(let Ke=0;Ke0&&We++;const Ee=_t(ft[0]);e.texStorage2D(i.TEXTURE_CUBE_MAP,We,vn,Ee.width,Ee.height)}for(let Ee=0;Ee<6;Ee++)if(He){Pn?Z&&e.texSubImage2D(i.TEXTURE_CUBE_MAP_POSITIVE_X+Ee,0,0,0,ft[Ee].width,ft[Ee].height,cn,yt,ft[Ee].data):e.texImage2D(i.TEXTURE_CUBE_MAP_POSITIVE_X+Ee,0,vn,ft[Ee].width,ft[Ee].height,0,cn,yt,ft[Ee].data);for(let Ke=0;Ke1;if(Ut||(void 0===ke.__webglTexture&&(ke.__webglTexture=i.createTexture()),ke.__version=R.version,o.memory.textures++),Ae){de.__webglFramebuffer=[];for(let et=0;et<6;et++)if(R.mipmaps&&R.mipmaps.length>0){de.__webglFramebuffer[et]=[];for(let pt=0;pt0){de.__webglFramebuffer=[];for(let et=0;et0&&!1===Me(H)){de.__webglMultisampledFramebuffer=i.createFramebuffer(),de.__webglColorRenderbuffer=[],e.bindFramebuffer(i.FRAMEBUFFER,de.__webglMultisampledFramebuffer);for(let et=0;et0)for(let pt=0;pt0)for(let pt=0;pt0)if(!1===Me(H)){const R=H.textures,de=H.width,ke=H.height;let De=i.COLOR_BUFFER_BIT;const Ae=H.stencilBuffer?i.DEPTH_STENCIL_ATTACHMENT:i.DEPTH_ATTACHMENT,Ut=n.get(H),et=R.length>1;if(et)for(let pt=0;ptm+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(Rue)))}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 No;n.matrixAutoUpdate=!1,n.visible=!1,t.joints[e.jointName]=n,t.add(n)}return t.joints[e.jointName]}}class Oue{constructor(){this.texture=null,this.mesh=null,this.depthNear=0,this.depthFar=0}init(t,e,n){if(null===this.texture){const r=new Oo;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}}getMesh(t){if(null!==this.texture&&null===this.mesh){const e=t.cameras[0].viewport,n=new Sl({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:e.z},depthHeight:{value:e.w}}});this.mesh=new Mn(new Iu(20,20),n)}return this.mesh}reset(){this.texture=null,this.mesh=null}getDepthTexture(){return this.texture}}class Fue extends og{constructor(t,e){super();const n=this;let r=null,s=1,o=null,a="local-floor",l=1,c=null,d=null,h=null,p=null,m=null,g=null;const b=new Oue,v=e.getContextAttributes();let y=null,M=null;const x=[],C=[],F=new xe;let D=null;const k=new br;k.layers.enable(1),k.viewport=new vi;const B=new br;B.layers.enable(2),B.viewport=new vi;const T=[k,B],A=new Iue;A.layers.enable(1),A.layers.enable(2);let W=null,ie=null;function ne(le){const Fe=C.indexOf(le.inputSource);if(-1===Fe)return;const Ze=x[Fe];void 0!==Ze&&(Ze.update(le.inputSource,le.frame,c||o),Ze.dispatchEvent({type:le.type,data:le.inputSource}))}function oe(){r.removeEventListener("select",ne),r.removeEventListener("selectstart",ne),r.removeEventListener("selectend",ne),r.removeEventListener("squeeze",ne),r.removeEventListener("squeezestart",ne),r.removeEventListener("squeezeend",ne),r.removeEventListener("end",oe),r.removeEventListener("inputsourceschange",ge);for(let le=0;le=0&&(C[Le]=null,x[Le].disconnect(Ze))}for(let Fe=0;Fe=C.length){C.push(Ze),Le=Tt;break}if(null===C[Tt]){C[Tt]=Ze,Le=Tt;break}}if(-1===Le)break}const wt=x[Le];wt&&wt.connect(Ze)}}this.cameraAutoUpdate=!0,this.enabled=!1,this.isPresenting=!1,this.getController=function(le){let Fe=x[le];return void 0===Fe&&(Fe=new SP,x[le]=Fe),Fe.getTargetRaySpace()},this.getControllerGrip=function(le){let Fe=x[le];return void 0===Fe&&(Fe=new SP,x[le]=Fe),Fe.getGripSpace()},this.getHand=function(le){let Fe=x[le];return void 0===Fe&&(Fe=new SP,x[le]=Fe),Fe.getHandSpace()},this.setFramebufferScaleFactor=function(le){s=le,!0===n.isPresenting&&console.warn("THREE.WebXRManager: Cannot change framebuffer scale while presenting.")},this.setReferenceSpaceType=function(le){a=le,!0===n.isPresenting&&console.warn("THREE.WebXRManager: Cannot change reference space type while presenting.")},this.getReferenceSpace=function(){return c||o},this.setReferenceSpace=function(le){c=le},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 le=nt(function*(Fe){if(r=Fe,null!==r){if(y=t.getRenderTarget(),r.addEventListener("select",ne),r.addEventListener("selectstart",ne),r.addEventListener("selectend",ne),r.addEventListener("squeeze",ne),r.addEventListener("squeezestart",ne),r.addEventListener("squeezeend",ne),r.addEventListener("end",oe),r.addEventListener("inputsourceschange",ge),!0!==v.xrCompatible&&(yield e.makeXRCompatible()),D=t.getPixelRatio(),t.getSize(F),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 Mu(m.framebufferWidth,m.framebufferHeight,{format:Po,type:ed,colorSpace:t.outputColorSpace,stencilBuffer:v.stencil});else{let Ze=null,Le=null,wt=null;v.depth&&(wt=v.stencil?e.DEPTH24_STENCIL8:e.DEPTH_COMPONENT24,Ze=v.stencil?ng:tg,Le=v.stencil?eg:xu);const Tt={colorFormat:e.RGBA8,depthFormat:wt,scaleFactor:s};h=new XRWebGLBinding(r,e),p=h.createProjectionLayer(Tt),r.updateRenderState({layers:[p]}),t.setPixelRatio(1),t.setSize(p.textureWidth,p.textureHeight,!1),M=new Mu(p.textureWidth,p.textureHeight,{format:Po,type:ed,depthTexture:new d5(p.textureWidth,p.textureHeight,Le,void 0,void 0,void 0,void 0,void 0,void 0,Ze),stencilBuffer:v.stencil,colorSpace:t.outputColorSpace,samples:v.antialias?4:0,resolveDepthBuffer:!1===p.ignoreDepthValues})}M.isXRRenderTarget=!0,this.setFoveation(l),c=null,o=yield r.requestReferenceSpace(a),nn.setContext(r),nn.start(),n.isPresenting=!0,n.dispatchEvent({type:"sessionstart"})}});return function(Fe){return le.apply(this,arguments)}}(),this.getEnvironmentBlendMode=function(){if(null!==r)return r.environmentBlendMode},this.getDepthTexture=function(){return b.getDepthTexture()};const q=new O,se=new O;function we(le,Fe){null===Fe?le.matrixWorld.copy(le.matrix):le.matrixWorld.multiplyMatrices(Fe.matrixWorld,le.matrix),le.matrixWorldInverse.copy(le.matrixWorld).invert()}this.updateCamera=function(le){if(null===r)return;null!==b.texture&&(le.near=b.depthNear,le.far=b.depthFar),A.near=B.near=k.near=le.near,A.far=B.far=k.far=le.far,(W!==A.near||ie!==A.far)&&(r.updateRenderState({depthNear:A.near,depthFar:A.far}),W=A.near,ie=A.far,k.near=W,k.far=ie,B.near=W,B.far=ie,k.updateProjectionMatrix(),B.updateProjectionMatrix(),le.updateProjectionMatrix());const Fe=le.parent,Ze=A.cameras;we(A,Fe);for(let Le=0;Le0&&(v.alphaTest.value=y.alphaTest);const M=t.get(y),x=M.envMap,C=M.envMapRotation;x&&(v.envMap.value=x,hf.copy(C),hf.x*=-1,hf.y*=-1,hf.z*=-1,x.isCubeTexture&&!1===x.isRenderTargetTexture&&(hf.y*=-1,hf.z*=-1),v.envMapRotation.value.setFromMatrix4(Lue.makeRotationFromEuler(hf)),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,v.lightMapIntensity.value=y.lightMapIntensity,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,Z4(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 d(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===ko&&v.clearcoatNormalScale.value.negate())),y.dispersion>0&&(v.dispersion.value=y.dispersion),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 Bue(i,t,e,n){let r={},s={},o=[];const a=i.getParameter(i.MAX_UNIFORM_BUFFER_BINDINGS);function m(M,x,C,F){const D=M.value,k=x+"_"+C;if(void 0===F[k])return F[k]="number"==typeof D||"boolean"==typeof D?D:D.clone(),!0;{const B=F[k];if("number"==typeof D||"boolean"==typeof D){if(B!==D)return F[k]=D,!0}else if(!1===B.equals(D))return B.copy(D),!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 k=0,B=x.length;k0&&(C+=16-D),M.__size=C,M.__cache={}}(M),C=function d(M){const x=function h(){for(let M=0;M0),Zt=!!ce.morphAttributes.position,li=!!ce.morphAttributes.normal,Li=!!ce.morphAttributes.color;let ir=bu;ue.toneMapped&&(null===k||!0===k.isXRRenderTarget)&&(ir=x.toneMapping);const ca=ce.morphAttributes.position||ce.morphAttributes.normal||ce.morphAttributes.color,fi=void 0!==ca?ca.length:0,kt=rt.get(ue),fs=v.state.lights;!0!==le||!0!==Fe&&L===T||bn.setState(ue,L,L===T&&ue.id===B);let pi=!1;ue.version===kt.__version?(kt.needsLights&&kt.lightsStateVersion!==fs.state.version||kt.outputColorSpace!==Mt||te.isBatchedMesh&&!1===kt.batching||!te.isBatchedMesh&&!0===kt.batching||te.isBatchedMesh&&!0===kt.batchingColor&&null===te.colorTexture||te.isBatchedMesh&&!1===kt.batchingColor&&null!==te.colorTexture||te.isInstancedMesh&&!1===kt.instancing||!te.isInstancedMesh&&!0===kt.instancing||te.isSkinnedMesh&&!1===kt.skinning||!te.isSkinnedMesh&&!0===kt.skinning||te.isInstancedMesh&&!0===kt.instancingColor&&null===te.instanceColor||te.isInstancedMesh&&!1===kt.instancingColor&&null!==te.instanceColor||te.isInstancedMesh&&!0===kt.instancingMorph&&null===te.morphTexture||te.isInstancedMesh&&!1===kt.instancingMorph&&null!==te.morphTexture||kt.envMap!==Ct||!0===ue.fog&&kt.fog!==je||void 0!==kt.numClippingPlanes&&(kt.numClippingPlanes!==bn.numPlanes||kt.numIntersection!==bn.numIntersection)||kt.vertexAlphas!==Kt||kt.vertexTangents!==an||kt.morphTargets!==Zt||kt.morphNormals!==li||kt.morphColors!==Li||kt.toneMapping!==ir||kt.morphTargetsCount!==fi)&&(pi=!0):(pi=!0,kt.__version=ue.version);let Al=kt.currentProgram;!0===pi&&(Al=xE(ue,K,te));let qg=!1,da=!1,XO=!1;const wr=Al.getUniforms(),Uu=kt.uniforms;if(Me.useProgram(Al.program)&&(qg=!0,da=!0,XO=!0),ue.id!==B&&(B=ue.id,da=!0),qg||T!==L){wr.setValue(N,"projectionMatrix",L.projectionMatrix),wr.setValue(N,"viewMatrix",L.matrixWorldInverse);const $a=wr.map.cameraPosition;void 0!==$a&&$a.setValue(N,Le.setFromMatrixPosition(L.matrixWorld)),it.logarithmicDepthBuffer&&wr.setValue(N,"logDepthBufFC",2/(Math.log(L.far+1)/Math.LN2)),(ue.isMeshPhongMaterial||ue.isMeshToonMaterial||ue.isMeshLambertMaterial||ue.isMeshBasicMaterial||ue.isMeshStandardMaterial||ue.isShaderMaterial)&&wr.setValue(N,"isOrthographic",!0===L.isOrthographicCamera),T!==L&&(T=L,da=!0,XO=!0)}if(te.isSkinnedMesh){wr.setOptional(N,te,"bindMatrix"),wr.setOptional(N,te,"bindMatrixInverse");const $a=te.skeleton;$a&&(null===$a.boneTexture&&$a.computeBoneTexture(),wr.setValue(N,"boneTexture",$a.boneTexture,_t))}te.isBatchedMesh&&(wr.setOptional(N,te,"batchingTexture"),wr.setValue(N,"batchingTexture",te._matricesTexture,_t),wr.setOptional(N,te,"batchingIdTexture"),wr.setValue(N,"batchingIdTexture",te._indirectTexture,_t),wr.setOptional(N,te,"batchingColorTexture"),null!==te._colorsTexture&&wr.setValue(N,"batchingColorTexture",te._colorsTexture,_t));const KO=ce.morphAttributes;if((void 0!==KO.position||void 0!==KO.normal||void 0!==KO.color)&&Yn.update(te,ce,Al),(da||kt.receiveShadow!==te.receiveShadow)&&(kt.receiveShadow=te.receiveShadow,wr.setValue(N,"receiveShadow",te.receiveShadow)),ue.isMeshGouraudMaterial&&null!==ue.envMap&&(Uu.envMap.value=Ct,Uu.flipEnvMap.value=Ct.isCubeTexture&&!1===Ct.isRenderTargetTexture?-1:1),ue.isMeshStandardMaterial&&null===ue.envMap&&null!==K.environment&&(Uu.envMapIntensity.value=K.environmentIntensity),da&&(wr.setValue(N,"toneMappingExposure",x.toneMappingExposure),kt.needsLights&&function Gve(L,K){L.ambientLightColor.needsUpdate=K,L.lightProbe.needsUpdate=K,L.directionalLights.needsUpdate=K,L.directionalLightShadows.needsUpdate=K,L.pointLights.needsUpdate=K,L.pointLightShadows.needsUpdate=K,L.spotLights.needsUpdate=K,L.spotLightShadows.needsUpdate=K,L.rectAreaLights.needsUpdate=K,L.hemisphereLights.needsUpdate=K}(Uu,XO),je&&!0===ue.fog&&Ut.refreshFogUniforms(Uu,je),Ut.refreshMaterialUniforms(Uu,ue,se,q,v.state.transmissionRenderTarget[L.id]),uS.upload(N,_8(kt),Uu,_t)),ue.isShaderMaterial&&!0===ue.uniformsNeedUpdate&&(uS.upload(N,_8(kt),Uu,_t),ue.uniformsNeedUpdate=!1),ue.isSpriteMaterial&&wr.setValue(N,"center",te.center),wr.setValue(N,"modelViewMatrix",te.modelViewMatrix),wr.setValue(N,"normalMatrix",te.normalMatrix),wr.setValue(N,"modelMatrix",te.matrixWorld),ue.isShaderMaterial||ue.isRawShaderMaterial){const $a=ue.uniformsGroups;for(let ZO=0,jve=$a.length;ZO{function je(){ue.forEach(function(at){rt.get(at).currentProgram.isReady()&&ue.delete(at)}),0!==ue.size?setTimeout(je,10):te(L)}null!==Ne.get("KHR_parallel_shader_compile")?je():setTimeout(je,10)})};let hi=null;function pc(){Pf.stop()}function f8(){Pf.start()}const Pf=new t5;function qO(L,K,ce,ue){if(!1===L.visible)return;if(L.layers.test(K.layers))if(L.isGroup)ce=L.renderOrder;else if(L.isLOD)!0===L.autoUpdate&&L.update(K);else if(L.isLight)v.pushLight(L),L.castShadow&&v.pushShadow(L);else if(L.isSprite){if(!L.frustumCulled||nn.intersectsSprite(L)){ue&&wt.setFromMatrixPosition(L.matrixWorld).applyMatrix4(Ze);const at=De.update(L),Mt=L.material;Mt.visible&&b.push(L,at,Mt,ce,wt.z,null)}}else if((L.isMesh||L.isLine||L.isPoints)&&(!L.frustumCulled||nn.intersectsObject(L))){const at=De.update(L),Mt=L.material;if(ue&&(void 0!==L.boundingSphere?(null===L.boundingSphere&&L.computeBoundingSphere(),wt.copy(L.boundingSphere.center)):(null===at.boundingSphere&&at.computeBoundingSphere(),wt.copy(at.boundingSphere.center)),wt.applyMatrix4(L.matrixWorld).applyMatrix4(Ze)),Array.isArray(Mt)){const Ct=at.groups;for(let Kt=0,an=Ct.length;Kt0&&bE(te,K,ce),je.length>0&&bE(je,K,ce),at.length>0&&bE(at,K,ce),Me.buffers.depth.setTest(!0),Me.buffers.depth.setMask(!0),Me.buffers.color.setMask(!0),Me.setPolygonOffset(!1)}function m8(L,K,ce,ue){if(null!==(!0===ce.isScene?ce.overrideMaterial:null))return;void 0===v.state.transmissionRenderTarget[ue.id]&&(v.state.transmissionRenderTarget[ue.id]=new Mu(1,1,{generateMipmaps:!0,type:Ne.has("EXT_color_buffer_half_float")||Ne.has("EXT_color_buffer_float")?Jm:ed,minFilter:xl,samples:4,stencilBuffer:s,resolveDepthBuffer:!1,resolveStencilBuffer:!1,colorSpace:ei.workingColorSpace}));const je=v.state.transmissionRenderTarget[ue.id],at=ue.viewport||A;je.setSize(at.z,at.w);const Mt=x.getRenderTarget();x.setRenderTarget(je),x.getClearColor(ne),oe=x.getClearAlpha(),oe<1&&x.setClearColor(16777215,.5),x.clear(),St&&ft.render(ce);const Ct=x.toneMapping;x.toneMapping=bu;const Kt=ue.viewport;if(void 0!==ue.viewport&&(ue.viewport=void 0),v.setupLightsView(ue),!0===le&&bn.setGlobalState(x.clippingPlanes,ue),bE(L,ce,ue),_t.updateMultisampleRenderTarget(je),_t.updateRenderTargetMipmap(je),!1===Ne.has("WEBGL_multisampled_render_to_texture")){let an=!1;for(let Zt=0,li=K.length;Zt0)for(let at=0,Mt=je.length;at0&&m8(ue,te,L,K),St&&ft.render(L),p8(b,L,K);null!==k&&(_t.updateMultisampleRenderTarget(k),_t.updateRenderTargetMipmap(k)),!0===L.isScene&&L.onAfterRender(x,L,K),Pn.resetDefaultState(),B=-1,T=null,M.pop(),M.length>0?(v=M[M.length-1],!0===le&&bn.setGlobalState(x.clippingPlanes,v.state.camera)):v=null,y.pop(),b=y.length>0?y[y.length-1]:null},this.getActiveCubeFace=function(){return F},this.getActiveMipmapLevel=function(){return D},this.getRenderTarget=function(){return k},this.setRenderTargetTextures=function(L,K,ce){rt.get(L.texture).__webglTexture=K,rt.get(L.depthTexture).__webglTexture=ce;const ue=rt.get(L);ue.__hasExternalTextures=!0,ue.__autoAllocateDepthBuffer=void 0===ce,ue.__autoAllocateDepthBuffer||!0===Ne.has("WEBGL_multisampled_render_to_texture")&&(console.warn("THREE.WebGLRenderer: Render-to-texture extension was disabled because an external texture was provided"),ue.__useRenderToTexture=!1)},this.setRenderTargetFramebuffer=function(L,K){const ce=rt.get(L);ce.__webglFramebuffer=K,ce.__useDefaultFramebuffer=void 0===K},this.setRenderTarget=function(L,K=0,ce=0){k=L,F=K,D=ce;let ue=!0,te=null,je=!1,at=!1;if(L){const Ct=rt.get(L);void 0!==Ct.__useDefaultFramebuffer?(Me.bindFramebuffer(N.FRAMEBUFFER,null),ue=!1):void 0===Ct.__webglFramebuffer?_t.setupRenderTarget(L):Ct.__hasExternalTextures&&_t.rebindTextures(L,rt.get(L.texture).__webglTexture,rt.get(L.depthTexture).__webglTexture);const Kt=L.texture;(Kt.isData3DTexture||Kt.isDataArrayTexture||Kt.isCompressedArrayTexture)&&(at=!0);const an=rt.get(L).__webglFramebuffer;L.isWebGLCubeRenderTarget?(te=Array.isArray(an[K])?an[K][ce]:an[K],je=!0):te=L.samples>0&&!1===_t.useMultisampledRTT(L)?rt.get(L).__webglMultisampledFramebuffer:Array.isArray(an)?an[ce]:an,A.copy(L.viewport),W.copy(L.scissor),ie=L.scissorTest}else A.copy(Ve).multiplyScalar(se).floor(),W.copy(Ye).multiplyScalar(se).floor(),ie=Rt;if(Me.bindFramebuffer(N.FRAMEBUFFER,te)&&ue&&Me.drawBuffers(L,te),Me.viewport(A),Me.scissor(W),Me.setScissorTest(ie),je){const Ct=rt.get(L.texture);N.framebufferTexture2D(N.FRAMEBUFFER,N.COLOR_ATTACHMENT0,N.TEXTURE_CUBE_MAP_POSITIVE_X+K,Ct.__webglTexture,ce)}else if(at){const Ct=rt.get(L.texture);N.framebufferTextureLayer(N.FRAMEBUFFER,N.COLOR_ATTACHMENT0,Ct.__webglTexture,ce||0,K||0)}B=-1},this.readRenderTargetPixels=function(L,K,ce,ue,te,je,at){if(!L||!L.isWebGLRenderTarget)return void console.error("THREE.WebGLRenderer.readRenderTargetPixels: renderTarget is not THREE.WebGLRenderTarget.");let Mt=rt.get(L).__webglFramebuffer;if(L.isWebGLCubeRenderTarget&&void 0!==at&&(Mt=Mt[at]),Mt){Me.bindFramebuffer(N.FRAMEBUFFER,Mt);try{const Ct=L.texture,Kt=Ct.format,an=Ct.type;if(!it.textureFormatReadable(Kt))return void console.error("THREE.WebGLRenderer.readRenderTargetPixels: renderTarget is not in RGBA or implementation defined format.");if(!it.textureTypeReadable(an))return void console.error("THREE.WebGLRenderer.readRenderTargetPixels: renderTarget is not in UnsignedByteType or implementation defined type.");K>=0&&K<=L.width-ue&&ce>=0&&ce<=L.height-te&&N.readPixels(K,ce,ue,te,vn.convert(Kt),vn.convert(an),je)}finally{const Ct=null!==k?rt.get(k).__webglFramebuffer:null;Me.bindFramebuffer(N.FRAMEBUFFER,Ct)}}},this.readRenderTargetPixelsAsync=function(){var L=nt(function*(K,ce,ue,te,je,at,Mt){if(!K||!K.isWebGLRenderTarget)throw new Error("THREE.WebGLRenderer.readRenderTargetPixels: renderTarget is not THREE.WebGLRenderTarget.");let Ct=rt.get(K).__webglFramebuffer;if(K.isWebGLCubeRenderTarget&&void 0!==Mt&&(Ct=Ct[Mt]),Ct){Me.bindFramebuffer(N.FRAMEBUFFER,Ct);try{const Kt=K.texture,an=Kt.format,Zt=Kt.type;if(!it.textureFormatReadable(an))throw new Error("THREE.WebGLRenderer.readRenderTargetPixelsAsync: renderTarget is not in RGBA or implementation defined format.");if(!it.textureTypeReadable(Zt))throw new Error("THREE.WebGLRenderer.readRenderTargetPixelsAsync: renderTarget is not in UnsignedByteType or implementation defined type.");if(ce>=0&&ce<=K.width-te&&ue>=0&&ue<=K.height-je){const li=N.createBuffer();N.bindBuffer(N.PIXEL_PACK_BUFFER,li),N.bufferData(N.PIXEL_PACK_BUFFER,at.byteLength,N.STREAM_READ),N.readPixels(ce,ue,te,je,vn.convert(an),vn.convert(Zt),0),N.flush();const Li=N.fenceSync(N.SYNC_GPU_COMMANDS_COMPLETE,0);yield function dae(i,t,e){return new Promise(function(n,r){setTimeout(function s(){switch(i.clientWaitSync(t,i.SYNC_FLUSH_COMMANDS_BIT,0)){case i.WAIT_FAILED:r();break;case i.TIMEOUT_EXPIRED:setTimeout(s,e);break;default:n()}},e)})}(N,Li,4);try{N.bindBuffer(N.PIXEL_PACK_BUFFER,li),N.getBufferSubData(N.PIXEL_PACK_BUFFER,0,at)}finally{N.deleteBuffer(li),N.deleteSync(Li)}return at}}finally{const Kt=null!==k?rt.get(k).__webglFramebuffer:null;Me.bindFramebuffer(N.FRAMEBUFFER,Kt)}}});return function(K,ce,ue,te,je,at,Mt){return L.apply(this,arguments)}}(),this.copyFramebufferToTexture=function(L,K=null,ce=0){!0!==L.isTexture&&(cg("WebGLRenderer: copyFramebufferToTexture function signature has changed."),K=arguments[0]||null,L=arguments[1]);const ue=Math.pow(2,-ce),te=Math.floor(L.image.width*ue),je=Math.floor(L.image.height*ue),at=null!==K?K.x:0,Mt=null!==K?K.y:0;_t.setTexture2D(L,0),N.copyTexSubImage2D(N.TEXTURE_2D,ce,0,0,at,Mt,te,je),Me.unbindTexture()},this.copyTextureToTexture=function(L,K,ce=null,ue=null,te=0){let je,at,Mt,Ct,Kt,an;!0!==L.isTexture&&(cg("WebGLRenderer: copyTextureToTexture function signature has changed."),ue=arguments[0]||null,L=arguments[1],K=arguments[2],te=arguments[3]||0,ce=null),null!==ce?(je=ce.max.x-ce.min.x,at=ce.max.y-ce.min.y,Mt=ce.min.x,Ct=ce.min.y):(je=L.image.width,at=L.image.height,Mt=0,Ct=0),null!==ue?(Kt=ue.x,an=ue.y):(Kt=0,an=0);const Zt=vn.convert(K.format),li=vn.convert(K.type);_t.setTexture2D(K,0),N.pixelStorei(N.UNPACK_FLIP_Y_WEBGL,K.flipY),N.pixelStorei(N.UNPACK_PREMULTIPLY_ALPHA_WEBGL,K.premultiplyAlpha),N.pixelStorei(N.UNPACK_ALIGNMENT,K.unpackAlignment);const Li=N.getParameter(N.UNPACK_ROW_LENGTH),ir=N.getParameter(N.UNPACK_IMAGE_HEIGHT),ca=N.getParameter(N.UNPACK_SKIP_PIXELS),fi=N.getParameter(N.UNPACK_SKIP_ROWS),kt=N.getParameter(N.UNPACK_SKIP_IMAGES),fs=L.isCompressedTexture?L.mipmaps[te]:L.image;N.pixelStorei(N.UNPACK_ROW_LENGTH,fs.width),N.pixelStorei(N.UNPACK_IMAGE_HEIGHT,fs.height),N.pixelStorei(N.UNPACK_SKIP_PIXELS,Mt),N.pixelStorei(N.UNPACK_SKIP_ROWS,Ct),L.isDataTexture?N.texSubImage2D(N.TEXTURE_2D,te,Kt,an,je,at,Zt,li,fs.data):L.isCompressedTexture?N.compressedTexSubImage2D(N.TEXTURE_2D,te,Kt,an,fs.width,fs.height,Zt,fs.data):N.texSubImage2D(N.TEXTURE_2D,te,Kt,an,je,at,Zt,li,fs),N.pixelStorei(N.UNPACK_ROW_LENGTH,Li),N.pixelStorei(N.UNPACK_IMAGE_HEIGHT,ir),N.pixelStorei(N.UNPACK_SKIP_PIXELS,ca),N.pixelStorei(N.UNPACK_SKIP_ROWS,fi),N.pixelStorei(N.UNPACK_SKIP_IMAGES,kt),0===te&&K.generateMipmaps&&N.generateMipmap(N.TEXTURE_2D),Me.unbindTexture()},this.copyTextureToTexture3D=function(L,K,ce=null,ue=null,te=0){let je,at,Mt,Ct,Kt,an,Zt,li,Li;!0!==L.isTexture&&(cg("WebGLRenderer: copyTextureToTexture3D function signature has changed."),ce=arguments[0]||null,ue=arguments[1]||null,L=arguments[2],K=arguments[3],te=arguments[4]||0);const ir=L.isCompressedTexture?L.mipmaps[te]:L.image;null!==ce?(je=ce.max.x-ce.min.x,at=ce.max.y-ce.min.y,Mt=ce.max.z-ce.min.z,Ct=ce.min.x,Kt=ce.min.y,an=ce.min.z):(je=ir.width,at=ir.height,Mt=ir.depth,Ct=0,Kt=0,an=0),null!==ue?(Zt=ue.x,li=ue.y,Li=ue.z):(Zt=0,li=0,Li=0);const ca=vn.convert(K.format),fi=vn.convert(K.type);let kt;if(K.isData3DTexture)_t.setTexture3D(K,0),kt=N.TEXTURE_3D;else{if(!K.isDataArrayTexture&&!K.isCompressedArrayTexture)return void console.warn("THREE.WebGLRenderer.copyTextureToTexture3D: only supports THREE.DataTexture3D and THREE.DataTexture2DArray.");_t.setTexture2DArray(K,0),kt=N.TEXTURE_2D_ARRAY}N.pixelStorei(N.UNPACK_FLIP_Y_WEBGL,K.flipY),N.pixelStorei(N.UNPACK_PREMULTIPLY_ALPHA_WEBGL,K.premultiplyAlpha),N.pixelStorei(N.UNPACK_ALIGNMENT,K.unpackAlignment);const fs=N.getParameter(N.UNPACK_ROW_LENGTH),pi=N.getParameter(N.UNPACK_IMAGE_HEIGHT),Al=N.getParameter(N.UNPACK_SKIP_PIXELS),qg=N.getParameter(N.UNPACK_SKIP_ROWS),da=N.getParameter(N.UNPACK_SKIP_IMAGES);N.pixelStorei(N.UNPACK_ROW_LENGTH,ir.width),N.pixelStorei(N.UNPACK_IMAGE_HEIGHT,ir.height),N.pixelStorei(N.UNPACK_SKIP_PIXELS,Ct),N.pixelStorei(N.UNPACK_SKIP_ROWS,Kt),N.pixelStorei(N.UNPACK_SKIP_IMAGES,an),L.isDataTexture||L.isData3DTexture?N.texSubImage3D(kt,te,Zt,li,Li,je,at,Mt,ca,fi,ir.data):K.isCompressedArrayTexture?N.compressedTexSubImage3D(kt,te,Zt,li,Li,je,at,Mt,ca,ir.data):N.texSubImage3D(kt,te,Zt,li,Li,je,at,Mt,ca,fi,ir),N.pixelStorei(N.UNPACK_ROW_LENGTH,fs),N.pixelStorei(N.UNPACK_IMAGE_HEIGHT,pi),N.pixelStorei(N.UNPACK_SKIP_PIXELS,Al),N.pixelStorei(N.UNPACK_SKIP_ROWS,qg),N.pixelStorei(N.UNPACK_SKIP_IMAGES,da),0===te&&K.generateMipmaps&&N.generateMipmap(kt),Me.unbindTexture()},this.initRenderTarget=function(L){void 0===rt.get(L).__webglFramebuffer&&_t.setupRenderTarget(L)},this.initTexture=function(L){L.isCubeTexture?_t.setTextureCube(L,0):L.isData3DTexture?_t.setTexture3D(L,0):L.isDataArrayTexture||L.isCompressedArrayTexture?_t.setTexture2DArray(L,0):_t.setTexture2D(L,0),Me.unbindTexture()},this.resetState=function(){F=0,D=0,k=null,Me.reset(),Pn.reset()},typeof __THREE_DEVTOOLS__<"u"&&__THREE_DEVTOOLS__.dispatchEvent(new CustomEvent("observe",{detail:this}))}get coordinateSystem(){return td}get outputColorSpace(){return this._outputColorSpace}set outputColorSpace(t){this._outputColorSpace=t;const e=this.getContext();e.drawingBufferColorSpace=t===Yk?"display-p3":"srgb",e.unpackColorSpace=ei.workingColorSpace===LC?"display-p3":"srgb"}}class Pb extends Fr{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 rd,this.environmentIntensity=1,this.environmentRotation=new rd,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 DP{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=na()}onUploadCallback(){}set needsUpdate(t){!0===t&&this.version++}get updateRange(){return cg("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;r0){const r=e[n[0]];if(void 0!==r){this.morphTargetInfluences=[],this.morphTargetDictionary={};for(let s=0,o=r.length;sn)return;LP.applyMatrix4(i.matrixWorld);const l=t.ray.origin.distanceTo(LP);return lt.far?void 0:{distance:l,point:Z5.clone().applyMatrix4(i.matrixWorld),index:r,face:null,faceIndex:null,object:i}}const Q5=new O,J5=new O;class Ng extends mf{constructor(t,e){super(t,e),this.isLineSegments=!0,this.type="LineSegments"}computeLineDistances(){const t=this.geometry;if(null===t.index){const e=t.attributes.position,n=[];for(let r=0,s=e.count;r0){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 uc{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 d=n[r];return(r+(o-d)/(n[r+1]-d))/(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 xe:new O);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 O,r=[],s=[],o=[],a=new O,l=new Bt;for(let m=0;m<=t;m++)r[m]=this.getTangentAt(m/t,new O);s[0]=new O,o[0]=new O;let c=Number.MAX_VALUE;const d=Math.abs(r[0].x),h=Math.abs(r[0].y),p=Math.abs(r[0].z);d<=c&&(c=d,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(tr(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(tr(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 BP extends uc{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 xe){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(i$(a,l.x,c.x,d.x,h.x),i$(a,l.y,c.y,d.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]:(DS.subVectors(r[0],r[1]).add(r[0]),c=DS);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 d=c.getPoint(1);return this.currentPoint.copy(d),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 RS extends hn{constructor(t=[new xe(0,-.5),new xe(.5,0),new xe(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=tr(r,0,2*Math.PI);const s=[],o=[],a=[],l=[],c=[],d=1/e,h=new O,p=new xe,m=new O,g=new O,b=new O;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*d*r,C=Math.sin(x),F=Math.cos(x);for(let D=0;D<=t.length-1;D++)h.x=t[D].x*C,h.y=t[D].y,h.z=t[D].x*F,o.push(h.x,h.y,h.z),p.x=M/e,p.y=D/(t.length-1),a.push(p.x,p.y),c.push(l[3*D+0]*C,l[3*D+1],l[3*D+0]*F)}for(let M=0;M0&&x(!0),e>0&&x(!1)),this.setIndex(d),this.setAttribute("position",new ht(h,3)),this.setAttribute("normal",new ht(p,3)),this.setAttribute("uv",new ht(m,2))}copy(t){return super.copy(t),this.parameters=Object.assign({},t.parameters),this}static fromJSON(t){return new Bg(t.radiusTop,t.radiusBottom,t.height,t.radialSegments,t.heightSegments,t.openEnded,t.thetaStart,t.thetaLength)}}class PS extends Bg{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 PS(t.radius,t.height,t.radialSegments,t.heightSegments,t.openEnded,t.thetaStart,t.thetaLength)}}class Yb 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 d=[],h=new O,p=new O,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 F=0;F<=e;F++){const D=F/e;h.x=-t*Math.cos(r+D*s)*Math.sin(o+x*a),h.y=t*Math.cos(o+x*a),h.z=t*Math.sin(r+D*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(D+C,1-x),M.push(c++)}d.push(M)}for(let y=0;y0)&&m.push(d[y][M+1],C,D),(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 dispersion(){return this._dispersion}set dispersion(t){this._dispersion>0!=t>0&&this.version++,this._dispersion=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.dispersion=t.dispersion,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 zS extends Fo{constructor(t){super(),this.isMeshPhongMaterial=!0,this.type="MeshPhongMaterial",this.color=new qe(16777215),this.specular=new qe(1118481),this.shininess=30,this.map=null,this.lightMap=null,this.lightMapIntensity=1,this.aoMap=null,this.aoMapIntensity=1,this.emissive=new qe(0),this.emissiveIntensity=1,this.emissiveMap=null,this.bumpMap=null,this.bumpScale=1,this.normalMap=null,this.normalMapType=Jh,this.normalScale=new xe(1,1),this.displacementMap=null,this.displacementScale=1,this.displacementBias=0,this.specularMap=null,this.alphaMap=null,this.envMap=null,this.envMapRotation=new rd,this.combine=EC,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 v$(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 nO(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 iO(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 Xb{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 _$(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}}hc.prototype.TimeBufferType=Float32Array,hc.prototype.ValueBufferType=Float32Array,hc.prototype.DefaultInterpolation=xb;class zg extends hc{constructor(t,e,n){super(t,e,n)}}zg.prototype.ValueTypeName="bool",zg.prototype.ValueBufferType=Array,zg.prototype.DefaultInterpolation=bb,zg.prototype.InterpolantFactoryMethodLinear=void 0,zg.prototype.InterpolantFactoryMethodSmooth=void 0;class b$ extends hc{}b$.prototype.ValueTypeName="color";class Hg extends hc{}Hg.prototype.ValueTypeName="number";class Whe extends Xb{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 d=c+a;c!==d;c+=4)fo.slerpFlat(s,0,o,c-a,o,c,l);return s}}class $g extends hc{InterpolantFactoryMethodLinear(t){return new Whe(this.times,this.values,this.getValueSize(),t)}}$g.prototype.ValueTypeName="quaternion",$g.prototype.InterpolantFactoryMethodSmooth=void 0;class Gg extends hc{constructor(t,e,n){super(t,e,n)}}Gg.prototype.ValueTypeName="string",Gg.prototype.ValueBufferType=Array,Gg.prototype.DefaultInterpolation=bb,Gg.prototype.InterpolantFactoryMethodLinear=void 0,Gg.prototype.InterpolantFactoryMethodSmooth=void 0;class Wg extends hc{}Wg.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=na(),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(Yhe(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(hc.toJSON(n[s]));return r}static CreateFromMorphTargetSequence(t,e,n,r){const s=e.length,o=[];for(let a=0;a1){const h=d[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=[];iO(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:w$,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 ud={};class qhe extends Error{constructor(t,e){super(t),this.response=e}}class Ba extends bf{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=ku.get(t);if(void 0!==s)return this.manager.itemStart(t),setTimeout(()=>{e&&e(s),this.manager.itemEnd(t)},0),s;if(void 0!==ud[t])return void ud[t].push({onLoad:e,onProgress:n,onError:r});ud[t]=[],ud[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 d=ud[t],h=c.body.getReader(),p=c.headers.get("X-File-Size")||c.headers.get("Content-Length"),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 F=new ProgressEvent("progress",{lengthComputable:g,loaded:b,total:m});for(let D=0,k=d.length;D{y.error(x)})}()}});return new Response(v)}throw new qhe(`fetch for "${c.url}" responded with ${c.status}: ${c.statusText}`,c)}).then(c=>{switch(l){case"arraybuffer":return c.arrayBuffer();case"blob":return c.blob();case"document":return c.text().then(d=>(new DOMParser).parseFromString(d,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=>{ku.add(t,c);const d=ud[t];delete ud[t];for(let h=0,p=d.length;h{const d=ud[t];if(void 0===d)throw this.manager.itemError(t),c;delete ud[t];for(let h=0,p=d.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 HS extends bf{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=ku.get(t);if(void 0!==o)return s.manager.itemStart(t),setTimeout(function(){e&&e(o),s.manager.itemEnd(t)},0),o;const a=Mb("img");function l(){d(),ku.add(t,this),e&&e(this),s.manager.itemEnd(t)}function c(h){d(),r&&r(h),s.manager.itemError(t),s.manager.itemEnd(t)}function d(){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 Pu extends bf{constructor(t){super(t)}load(t,e,n,r){const s=new Oo,o=new HS(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 $S extends Fr{constructor(t,e=1){super(),this.isLight=!0,this.type="Light",this.color=new qe(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()),void 0!==this.target&&(e.object.target=this.target.uuid),e}}const rO=new Bt,M$=new O,C$=new O;class sO{constructor(t){this.camera=t,this.intensity=1,this.bias=0,this.normalBias=0,this.radius=1,this.blurSamples=8,this.mapSize=new xe(512,512),this.map=null,this.mapPass=null,this.matrix=new Bt,this.autoUpdate=!0,this.needsUpdate=!1,this._frustum=new aS,this._frameExtents=new xe(1,1),this._viewportCount=1,this._viewports=[new vi(0,0,1,1)]}getViewportCount(){return this._viewportCount}getFrustum(){return this._frustum}updateMatrices(t){const e=this.camera,n=this.matrix;M$.setFromMatrixPosition(t.matrixWorld),e.position.copy(M$),C$.setFromMatrixPosition(t.target.matrixWorld),e.lookAt(C$),e.updateMatrixWorld(),rO.multiplyMatrices(e.projectionMatrix,e.matrixWorldInverse),this._frustum.setFromProjectionMatrix(rO),n.set(.5,0,0,.5,0,.5,0,.5,0,0,.5,.5,0,0,0,1),n.multiply(rO)}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.intensity=t.intensity,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 1!==this.intensity&&(t.intensity=this.intensity),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 Khe extends sO{constructor(){super(new br(50,1,.5,500)),this.isSpotLightShadow=!0,this.focus=1}updateMatrices(t){const e=this.camera,n=2*ag*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 S$ extends $S{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(Fr.DEFAULT_UP),this.updateMatrix(),this.target=new Fr,this.distance=n,this.angle=r,this.penumbra=s,this.decay=o,this.map=null,this.shadow=new Khe}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 E$=new Bt,Zb=new O,oO=new O;class Zhe extends sO{constructor(){super(new br(90,1,.5,500)),this.isPointLightShadow=!0,this._frameExtents=new xe(4,2),this._viewportCount=6,this._viewports=[new vi(2,1,1,1),new vi(0,1,1,1),new vi(3,1,1,1),new vi(1,1,1,1),new vi(3,0,1,1),new vi(1,0,1,1)],this._cubeDirections=[new O(1,0,0),new O(-1,0,0),new O(0,0,1),new O(0,0,-1),new O(0,1,0),new O(0,-1,0)],this._cubeUps=[new O(0,1,0),new O(0,1,0),new O(0,1,0),new O(0,1,0),new O(0,0,1),new O(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()),Zb.setFromMatrixPosition(t.matrixWorld),n.position.copy(Zb),oO.copy(n.position),oO.add(this._cubeDirections[e]),n.up.copy(this._cubeUps[e]),n.lookAt(oO),n.updateMatrixWorld(),r.makeTranslation(-Zb.x,-Zb.y,-Zb.z),E$.multiplyMatrices(n.projectionMatrix,n.matrixWorldInverse),this._frustum.setFromProjectionMatrix(E$)}}class A$ extends $S{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 Zhe}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 Qhe extends sO{constructor(){super(new Rb(-5,5,5,-5,.5,500)),this.isDirectionalLightShadow=!0}}class D$ extends $S{constructor(t,e){super(t,e),this.isDirectionalLight=!0,this.type="DirectionalLight",this.position.copy(Fr.DEFAULT_UP),this.updateMatrix(),this.target=new Fr,this.shadow=new Qhe}dispose(){this.shadow.dispose()}copy(t){return super.copy(t),this.target=t.target.clone(),this.shadow=t.shadow.clone(),this}}class GS extends $S{constructor(t,e){super(t,e),this.isAmbientLight=!0,this.type="AmbientLight"}}class Ou{static decodeText(t){if(console.warn("THREE.LoaderUtils: decodeText() has been deprecated with r165 and will be removed with r175. Use TextDecoder instead."),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=ku.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 ku.add(t,c),e&&e(c),s.manager.itemEnd(t),c}).catch(function(c){r&&r(c),ku.remove(t),s.manager.itemError(t),s.manager.itemEnd(t)});ku.add(t,l),s.manager.itemStart(t)}}class O${constructor(t=!0){this.autoStart=t,this.startTime=0,this.oldTime=0,this.elapsedTime=0,this.running=!1}start(){this.startTime=F$(),this.oldTime=this.startTime,this.elapsedTime=0,this.running=!0}stop(){this.getElapsedTime(),this.running=!1,this.autoStart=!1}getElapsedTime(){return this.getDelta(),this.elapsedTime}getDelta(){let t=0;if(this.autoStart&&!this.running)return this.start(),0;if(this.running){const e=F$();t=(e-this.oldTime)/1e3,this.oldTime=e,this.elapsedTime+=t}return t}}function F$(){return(typeof performance>"u"?Date:performance).now()}const lO="\\[\\]\\.:\\/",cfe=new RegExp("["+lO+"]","g"),cO="[^"+lO+"]",dfe="[^"+lO.replace("\\.","")+"]",mfe=new RegExp("^"+/((?:WC+[\/:])*)/.source.replace("WC",cO)+/(WCOD+)?/.source.replace("WCOD",dfe)+/(?:\.(WC+)(?:\[(.+)\])?)?/.source.replace("WC",cO)+/\.(WC+)(?:\[(.+)\])?/.source.replace("WC",cO)+"$"),gfe=["material","materials","bones","map"];class _fe{constructor(t,e,n){const r=n||Ri.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 Ri=(()=>{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(cfe,"")}static parseTrackName(e){const n=mfe.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!==gfe.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;an.name===t||n.userData.name===t);return e?(e.removeFromParent(),new sa(e)):null}getBoundings(){return(new Vs).setFromObject(this.nativeMesh)}clone(){return new sa(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 Mn&&this.disposeMesh(t)}),this.nativeMesh instanceof Mn&&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 wfe extends sa{get supportsFov(){return this.nativeCamera instanceof br||"PerspectiveCamera"==this.nativeCamera.type}get fov(){return this.nativeCamera.fov||NaN}set fov(t){this.supportsFov&&(this.nativeCamera.fov=t,this.nativeCamera.updateProjectionMatrix())}constructor(t){super(t),this.nativeCamera=t}}class Mfe extends Gse{createMaterial(t){let e={};t.color?e={color:t.color}:t.diffuse||(e={color:super.randomColor()});let n=t.shading||"unlit";switch(n){case"unlit":return new qi(Object.assign(Object.assign({},e),{map:t.diffuse||null}));case"standart":return new qb(Object.assign(Object.assign({},e),{map:t.diffuse||null}));case"phong":return new zS(Object.assign(Object.assign({},e),{map:t.diffuse||null}));case"wireframe":return new qi(Object.assign(Object.assign({},e),{wireframe:!0}));default:throw new Error(`"${n}" shading not implemented for three.js`)}}transformPrimitiveZUp(t){t.geometry.rotateX(Math.PI/2)}createPrimitive(t,e={}){var n,r,s,o;let a=null,l=this.createMaterial(e);switch(t.shape){case"PLANE":a=new Mn(new Iu((null===(n=t.dimensions)||void 0===n?void 0:n.x)||1e4,(null===(r=t.dimensions)||void 0===r?void 0:r.y)||1e4,null===(s=t.segments)||void 0===s?void 0:s.x,null===(o=t.segments)||void 0===o?void 0:o.y),l);break;case"BOX":a=new Mn(new sf(...Re.spr(t.dimensions),...t.segments?Re.spr(t.segments):[]),l);break;case"CAPSULE":a=new Mn(new kS(t.radius,t.centersDistance,t.capSegments,t.radialSegments),l),this.transformPrimitiveZUp(a);break;case"CYLINDER":a=new Mn(new Bg(t.radius,t.radius,t.height,t.radialSegments,t.heightSegments),l),this.transformPrimitiveZUp(a);break;case"CONE":a=new Mn(new PS(t.radius,t.height,t.radialSegments,t.heightSegments),l),this.transformPrimitiveZUp(a);break;case"SPHERE":a=new Mn(new Yb(t.radius,t.widthSegments,t.heightSegments),l),this.transformPrimitiveZUp(a);break;case"COMPOUND":a=new No;for(const{position:d,rotation:h,shape:p}of t.children){const m=this.createPrimitive(p,e).nativeMesh;d&&m.position.set(...Re.spr(d)),h&&m.quaternion.set(...Yi.spr(h)),a.add(m)}break;case"MESH":const c=new hn;c.setFromPoints(t.vertices.map(d=>new O(...Re.spr(d)))),c.setIndex(t.faces.reduce((d,h)=>(d.push(...h),d),[])),a=new Mn(c,l)}if(!a)throw new Error(`Primitive with shape "${t.shape}" not implemented`);return void 0!==e.castShadow&&(a.castShadow=e.castShadow),void 0!==e.receiveShadow&&(a.receiveShadow=e.receiveShadow),new sa(a)}createPerspectiveCamera(t={}){return new wfe(new br(t.fov||75,t.aspectRatio||1,t.frustrum?t.frustrum.near:1,t.frustrum?t.frustrum.far:1e4))}}function Q$(i,t){if(t===Ooe)return console.warn("THREE.BufferGeometryUtils.toTrianglesDrawMode(): Geometry already defined as triangles."),i;if(t===jk||t===C4){let e=i.getIndex();if(null===e){const o=[],a=i.getAttribute("position");if(void 0===a)return console.error("THREE.BufferGeometryUtils.toTrianglesDrawMode(): Undefined position attribute. Processing not possible."),i;for(let l=0;l=2.0 are supported.")));const c=new ipe(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 d=0;d=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 Sfe(){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 Bn={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_DISPERSION:"KHR_materials_dispersion",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 Efe{constructor(t){this.parser=t,this.name=Bn.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 Vfe{constructor(t){this.parser=t,this.name=Bn.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 zfe{constructor(t){this.parser=t,this.name=Bn.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 Hfe{constructor(t){this.name=Bn.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 d=r.count,h=r.byteStride,p=new Uint8Array(a,r.byteOffset||0,r.byteLength||0);return o.decodeGltfBufferAsync?o.decodeGltfBufferAsync(d,h,p,r.mode,r.filter).then(function(m){return m.buffer}):o.ready.then(function(){const m=new ArrayBuffer(d*h);return o.decodeGltfBuffer(new Uint8Array(m),d,h,p,r.mode,r.filter),m})})}return null}}class $fe{constructor(t){this.name=Bn.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!==Ua.TRIANGLES&&c.mode!==Ua.TRIANGLE_STRIP&&c.mode!==Ua.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(d=>(l[c]=d,l[c])));return a.length<1?null:(a.push(this.parser.createNodeMesh(t)),Promise.all(a).then(c=>{const d=c.pop(),h=d.isGroup?d.children:[d],p=c[0].count,m=[];for(const g of h){const b=new Bt,v=new O,y=new fo,M=new O(1,1,1),x=new Y5(g.geometry,g.material,p);for(let C=0;C-1,o=s?a.match(/Firefox\/([0-9]+)\./)[1]:-1}this.textureLoader=typeof createImageBitmap>"u"||n&&r<17||s&&o<98?new Pu(this.options.manager):new sfe(this.options.manager),this.textureLoader.setCrossOrigin(this.options.crossOrigin),this.textureLoader.setRequestHeader(this.options.requestHeader),this.fileLoader=new Ba(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 Ef(s,a,r),hd(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,d]of o.children.entries())s(d,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(T,D[k*l+1]),l>=3&&v.setZ(T,D[k*l+2]),l>=4&&v.setW(T,D[k*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(d){d.flipY=!1,d.name=o.name||a.name||"",""===d.name&&"string"==typeof a.uri&&!1===a.uri.startsWith("data:image/")&&(d.name=a.uri);const p=(s.samplers||{})[o.sampler]||{};return d.magFilter=nG[p.magFilter]||cr,d.minFilter=nG[p.minFilter]||xl,d.wrapS=iG[p.wrapS]||Bs,d.wrapT=iG[p.wrapT]||Bs,r.associations.set(d,{textures:t}),d}).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 d=Promise.resolve(l).then(function(h){return new Promise(function(p,m){let g=p;!0===e.isImageBitmapLoader&&(g=function(b){const v=new Oo(b);v.needsUpdate=!0,p(v)}),e.load(Ou.resolveURL(h,s.path),g,void 0,m)})}).then(function(h){return!0===c&&a.revokeObjectURL(l),hd(h,o),h.userData.mimeType=o.mimeType||function tpe(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]=d,d}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[Bn.KHR_TEXTURE_TRANSFORM]){const a=void 0!==n.extensions?n.extensions[Bn.KHR_TEXTURE_TRANSFORM]:void 0;if(a){const l=s.associations.get(o);o=s.extensions[Bn.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,Fo.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 us,Fo.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 qb}loadMaterial(t){const e=this,r=this.extensions,s=this.json.materials[t];let o;const a={},c=[];if((s.extensions||{})[Bn.KHR_MATERIALS_UNLIT]){const h=r[Bn.KHR_MATERIALS_UNLIT];o=h.getMaterialType(),c.push(h.extendParams(a,s,e))}else{const h=s.pbrMetallicRoughness||{};if(a.color=new qe(1,1,1),a.opacity=1,Array.isArray(h.baseColorFactor)){const p=h.baseColorFactor;a.color.setRGB(p[0],p[1],p[2],ds),a.opacity=p[3]}void 0!==h.baseColorTexture&&c.push(e.assignTexture(a,"map",h.baseColorTexture,cs)),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=Ns);const d=s.alphaMode||"OPAQUE";if("BLEND"===d?(a.transparent=!0,a.depthWrite=!1):(a.transparent=!1,"MASK"===d&&(a.alphaTest=void 0!==s.alphaCutoff?s.alphaCutoff:.5)),void 0!==s.normalTexture&&o!==qi&&(c.push(e.assignTexture(a,"normalMap",s.normalTexture)),a.normalScale=new xe(1,1),void 0!==s.normalTexture.scale)){const h=s.normalTexture.scale;a.normalScale.set(h,h)}if(void 0!==s.occlusionTexture&&o!==qi&&(c.push(e.assignTexture(a,"aoMap",s.occlusionTexture)),void 0!==s.occlusionTexture.strength&&(a.aoMapIntensity=s.occlusionTexture.strength)),void 0!==s.emissiveFactor&&o!==qi){const h=s.emissiveFactor;a.emissive=(new qe).setRGB(h[0],h[1],h[2],ds)}return void 0!==s.emissiveTexture&&o!==qi&&c.push(e.assignTexture(a,"emissiveMap",s.emissiveTexture,cs)),Promise.all(c).then(function(){const h=new o(a);return s.name&&(h.name=s.name),hd(h,s),e.associations.set(h,{materials:t}),s.extensions&&Ef(r,h,s),h})}createUniqueName(t){const e=Ri.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[Bn.KHR_DRACO_MESH_COMPRESSION].decodePrimitive(a,e).then(function(l){return rG(l,a,e)})}const o=[];for(let a=0,l=t.length;a0&&Jfe(y,s),y.name=e.createUniqueName(s.name||"mesh_"+t),hd(y,s),v.extensions&&Ef(r,y,v),e.assignFinalMaterial(y),h.push(y)}for(let m=0,g=h.length;m1?new No:1===c.length?c[0]:new Fr,d!==c[0])for(let h=0,p=c.length;h{const h=new Map;for(const[p,m]of r.associations)(p instanceof Fo||p instanceof Oo)&&h.set(p,m);return d.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(Lu[s.path]===Lu.weights?t.traverse(function(p){p.morphTargetInfluences&&l.push(p.name?p.name:p.uuid)}):l.push(a),Lu[s.path]){case Lu.weights:c=Hg;break;case Lu.rotation:c=$g;break;case Lu.position:case Lu.scale:c=Wg;break;default:c=1===n.itemSize?Hg:Wg}const d=void 0!==r.interpolation?Kfe[r.interpolation]:xb,h=this._getArrayFromAccessor(n);for(let p=0,m=l.length;p{r.type.endsWith("Light")&&(console.warn("WORKAROUND: light intensity from GLB divided by 200."),r.intensity*=.005)}),new sa(n.scene)})}}const go=(i,t)=>Array(i).fill(null).map((e,n)=>t(n));class Af{static startDebugView(t,e){let n=this.activeDebugViews.get(t);return n?n.renderers.includes(e)||n.renderers.push(e):(n={view:new Af(t),renderers:[e]},this.activeDebugViews.set(t,n)),n.view}static stopDebugView(t,e){const n=t.world,r=this.activeDebugViews.get(n);r&&(r.renderers=r.renderers.filter(s=>s!==e),0===r.renderers.length&&(r.view.dispose(),this.activeDebugViews.delete(n)))}constructor(t){this.world=t,this.debugScene=null,this.aSub=null,this.rSub=null,this.syncMap=new Map,this.debugScene=new Pb;const e=n=>{var r,s;const o=n.debugBodySettings;let c,l=this.lineSegmentPointsForShape(o.shape);c=l?new Ng((new hn).setFromPoints(l)):null===(r=this.world)||void 0===r?void 0:r.visualScene.factory.createPrimitive(o.shape,{shading:"wireframe",color:0}).nativeMesh,this.syncMap.set(n,c),null===(s=this.debugScene)||void 0===s||s.add(c)};for(const n of this.world.physicsWorld.children)e(n);this.aSub=this.world.physicsWorld.added$.subscribe(n=>e(n)),this.rSub=this.world.physicsWorld.removed$.subscribe(n=>{var r;const s=this.syncMap.get(n);s&&(this.syncMap.delete(n),null===(r=this.debugScene)||void 0===r||r.remove(s))})}get scene(){return this.debugScene}render(t,e){for(const[r,s]of this.syncMap.entries()){const o=r.debugBodySettings;if(o.ignoreTransform||(s.position.set(...Re.spr(r.position)),s.quaternion.set(...Yi.spr(r.rotation))),s.material){let a=16777215;switch(o.type){case"RIGID_DYNAMIC":a=o.sleeping?255:16711680;break;case"RIGID_STATIC":a=65280;break;case"TRIGGER":a=16776960}s.material.color.set(a),s.material.needsUpdate=!0}}const n=t.autoClearColor;n&&(t.autoClearColor=!1),t.render(this.debugScene,e),n&&(t.autoClearColor=!0)}lineSegmentPointsForShape(t){if("BOX"===t.shape){const e=Re.scalarMult(t.dimensions,.5);return[...go(8,n=>new O(n<4?e.x:-e.x,n%4<2?e.y:-e.y,n%2?e.z:-e.z)),...go(8,n=>new O(n%2?e.x:-e.x,n<4?e.y:-e.y,n%4<2?e.z:-e.z)),...go(8,n=>new O(n%4<2?e.x:-e.x,n%2?e.y:-e.y,n<4?e.z:-e.z))]}if("CYLINDER"===t.shape)return[...go(32,e=>new O(t.radius*Math.sin(Math.floor((e+1)/2)*Math.PI/8),t.radius*Math.cos(Math.floor((e+1)/2)*Math.PI/8),-t.height/2)),...go(32,e=>new O(t.radius*Math.sin(Math.floor((e+1)/2)*Math.PI/8),t.radius*Math.cos(Math.floor((e+1)/2)*Math.PI/8),t.height/2)),...go(8,e=>new O(Math.floor(e/2)%2?0:e<4?t.radius:-t.radius,Math.floor(e/2)%2?e<4?t.radius:-t.radius:0,e%2?t.height/2:-t.height/2)),new O(0,0,-t.height/2),new O(0,0,t.height/2)];if("CONE"===t.shape)return[...go(32,e=>new O(t.radius*Math.sin(Math.floor((e+1)/2)*Math.PI/8),t.radius*Math.cos(Math.floor((e+1)/2)*Math.PI/8),-t.height/2)),...go(8,e=>new O(e%2||Math.floor(e/2)%2?0:e<4?t.radius:-t.radius,e%2?0:Math.floor(e/2)%2?e<4?t.radius:-t.radius:0,e%2?t.height/2:-t.height/2)),new O(0,0,-t.height/2),new O(0,0,t.height/2)];if("SPHERE"===t.shape)return[...go(32,e=>new O(t.radius*Math.sin(Math.floor((e+1)/2)*Math.PI/8),t.radius*Math.cos(Math.floor((e+1)/2)*Math.PI/8),0)),...go(32,e=>new O(t.radius*Math.sin(Math.floor((e+1)/2)*Math.PI/8),0,t.radius*Math.cos(Math.floor((e+1)/2)*Math.PI/8))),...go(32,e=>new O(0,t.radius*Math.sin(Math.floor((e+1)/2)*Math.PI/8),t.radius*Math.cos(Math.floor((e+1)/2)*Math.PI/8)))];if("CAPSULE"===t.shape)return[...this.lineSegmentPointsForShape({shape:"CYLINDER",radius:t.radius,height:t.centersDistance}),...go(16,e=>new O(t.radius*Math.cos(Math.floor((e+1)/2)*Math.PI/8),0,t.radius*Math.sin(Math.floor((e+1)/2)*Math.PI/8)+t.centersDistance/2)),...go(16,e=>new O(t.radius*Math.cos(Math.floor((e+1)/2)*Math.PI/8),0,-t.radius*Math.sin(Math.floor((e+1)/2)*Math.PI/8)-t.centersDistance/2)),...go(16,e=>new O(0,t.radius*Math.cos(Math.floor((e+1)/2)*Math.PI/8),t.radius*Math.sin(Math.floor((e+1)/2)*Math.PI/8)+t.centersDistance/2)),...go(16,e=>new O(0,t.radius*Math.cos(Math.floor((e+1)/2)*Math.PI/8),-t.radius*Math.sin(Math.floor((e+1)/2)*Math.PI/8)-t.centersDistance/2))];if("CONVEX_HULL"===t.shape)return[...t.vertices.map(n=>[new O(n.x-.05,n.y,n.z),new O(n.x+.05,n.y,n.z),new O(n.x,n.y-.05,n.z),new O(n.x,n.y+.05,n.z),new O(n.x,n.y,n.z-.05),new O(n.x,n.y,n.z+.05)]).reduce((n,r)=>(n.push(...r),n),[])];if("COMPOUND"===t.shape){const e=[];for(const{position:n,shape:r,rotation:s}of t.children){let o=this.lineSegmentPointsForShape(r);if(!o)return null;e.push(...o.map(a=>new O(...Re.spr(Re.add(n||Re.O,Re.rot(a,s||Yi.O))))))}return e}return null}dispose(){var t,e;this.debugScene=null,null===(t=this.aSub)||void 0===t||t.unsubscribe(),null===(e=this.rSub)||void 0===e||e.unsubscribe(),this.syncMap=new Map}}Af.activeDebugViews=new Map;class sG extends Lse{get physicsDebugViewActive(){return this._physicsDebugViewActive}set physicsDebugViewActive(t){this._physicsDebugViewActive!=t&&(this._physicsDebugViewActive=t,this.world&&(t?this.debugView=Af.startDebugView(this.world,this):(Af.stopDebugView(this.debugView,this),this.debugView=null)))}constructor(t,e,n,r={}){super(t,n,r),this.scene=t,this.camera=e,this.canvas=n,this.world=null,this.debugView=null,this._physicsDebugViewActive=!1,this.nativeRenderer=new Uue(Object.assign({canvas:n,alpha:this.rendererOptions.transparent},this.rendererOptions)),this.nativeRenderer.shadowMap.enabled=!0,this.nativeRenderer.setClearColor(this.rendererOptions.background),this.nativeRenderer.shadowMap.type=c4,this.nativeRenderer.setPixelRatio(this.rendererOptions.forceResolution||devicePixelRatio)}addToWorld(t){this.world=t,this.physicsDebugViewActive&&(this.debugView=Af.startDebugView(this.world,this))}removeFromWorld(t){this.physicsDebugViewActive&&(Af.stopDebugView(this.debugView,this),this.debugView=null),this.world=null}resizeRenderer(t){this.nativeRenderer.setSize(t.x,t.y),(this.camera.nativeCamera instanceof br||"PerspectiveCamera"==this.camera.nativeCamera.type)&&Math.abs(this.camera.nativeCamera.aspect-t.x/t.y)>.01&&(this.camera.nativeCamera.aspect=t.x/t.y,this.camera.nativeCamera.updateProjectionMatrix())}render(){this.nativeRenderer.render(this.scene.nativeScene,this.camera.nativeCamera),this.physicsDebugViewActive&&this.debugView.render(this.nativeRenderer,this.camera.nativeCamera)}dispose(){this.camera.dispose(),this.nativeRenderer.clear(),this.nativeRenderer.dispose(),this.nativeRenderer.domElement=null}}const ape={name:"CopyShader",uniforms:{tDiffuse:{value:null},opacity:{value:1}},vertexShader:"\n\n\t\tvarying vec2 vUv;\n\n\t\tvoid main() {\n\n\t\t\tvUv = uv;\n\t\t\tgl_Position = projectionMatrix * modelViewMatrix * vec4( position, 1.0 );\n\n\t\t}",fragmentShader:"\n\n\t\tuniform float opacity;\n\n\t\tuniform sampler2D tDiffuse;\n\n\t\tvarying vec2 vUv;\n\n\t\tvoid main() {\n\n\t\t\tvec4 texel = texture2D( tDiffuse, vUv );\n\t\t\tgl_FragColor = opacity * texel;\n\n\n\t\t}"};class QS{constructor(){this.isPass=!0,this.enabled=!0,this.needsSwap=!0,this.clear=!1,this.renderToScreen=!1}setSize(){}render(){console.error("THREE.Pass: .render() must be implemented in derived pass.")}dispose(){}}const lpe=new Rb(-1,1,1,-1,0,1),dpe=new class cpe extends hn{constructor(){super(),this.setAttribute("position",new ht([-1,3,0,-1,-1,0,3,-1,0],3)),this.setAttribute("uv",new ht([0,2,0,0,2,0],2))}};class upe{constructor(t){this._mesh=new Mn(dpe,t)}dispose(){this._mesh.geometry.dispose()}render(t){t.render(this._mesh,lpe)}get material(){return this._mesh.material}set material(t){this._mesh.material=t}}class hpe extends QS{constructor(t,e){super(),this.textureID=void 0!==e?e:"tDiffuse",t instanceof Sl?(this.uniforms=t.uniforms,this.material=t):t&&(this.uniforms=Q4.clone(t.uniforms),this.material=new Sl({name:void 0!==t.name?t.name:"unspecified",defines:Object.assign({},t.defines),uniforms:this.uniforms,vertexShader:t.vertexShader,fragmentShader:t.fragmentShader})),this.fsQuad=new upe(this.material)}render(t,e,n){this.uniforms[this.textureID]&&(this.uniforms[this.textureID].value=n.texture),this.fsQuad.material=this.material,this.renderToScreen?(t.setRenderTarget(null),this.fsQuad.render(t)):(t.setRenderTarget(e),this.clear&&t.clear(t.autoClearColor,t.autoClearDepth,t.autoClearStencil),this.fsQuad.render(t))}dispose(){this.material.dispose(),this.fsQuad.dispose()}}class oG extends QS{constructor(t,e){super(),this.scene=t,this.camera=e,this.clear=!0,this.needsSwap=!1,this.inverse=!1}render(t,e,n){const r=t.getContext(),s=t.state;let o,a;s.buffers.color.setMask(!1),s.buffers.depth.setMask(!1),s.buffers.color.setLocked(!0),s.buffers.depth.setLocked(!0),this.inverse?(o=0,a=1):(o=1,a=0),s.buffers.stencil.setTest(!0),s.buffers.stencil.setOp(r.REPLACE,r.REPLACE,r.REPLACE),s.buffers.stencil.setFunc(r.ALWAYS,o,4294967295),s.buffers.stencil.setClear(a),s.buffers.stencil.setLocked(!0),t.setRenderTarget(n),this.clear&&t.clear(),t.render(this.scene,this.camera),t.setRenderTarget(e),this.clear&&t.clear(),t.render(this.scene,this.camera),s.buffers.color.setLocked(!1),s.buffers.depth.setLocked(!1),s.buffers.color.setMask(!0),s.buffers.depth.setMask(!0),s.buffers.stencil.setLocked(!1),s.buffers.stencil.setFunc(r.EQUAL,1,4294967295),s.buffers.stencil.setOp(r.KEEP,r.KEEP,r.KEEP),s.buffers.stencil.setLocked(!0)}}class fpe extends QS{constructor(){super(),this.needsSwap=!1}render(t){t.state.buffers.stencil.setLocked(!1),t.state.buffers.stencil.setTest(!1)}}class ppe{constructor(t,e){if(this.renderer=t,this._pixelRatio=t.getPixelRatio(),void 0===e){const n=t.getSize(new xe);this._width=n.width,this._height=n.height,(e=new Mu(this._width*this._pixelRatio,this._height*this._pixelRatio,{type:Jm})).texture.name="EffectComposer.rt1"}else this._width=e.width,this._height=e.height;this.renderTarget1=e,this.renderTarget2=e.clone(),this.renderTarget2.texture.name="EffectComposer.rt2",this.writeBuffer=this.renderTarget1,this.readBuffer=this.renderTarget2,this.renderToScreen=!0,this.passes=[],this.copyPass=new hpe(ape),this.copyPass.material.blending=Jc,this.clock=new O$}swapBuffers(){const t=this.readBuffer;this.readBuffer=this.writeBuffer,this.writeBuffer=t}addPass(t){this.passes.push(t),t.setSize(this._width*this._pixelRatio,this._height*this._pixelRatio)}insertPass(t,e){this.passes.splice(e,0,t),t.setSize(this._width*this._pixelRatio,this._height*this._pixelRatio)}removePass(t){const e=this.passes.indexOf(t);-1!==e&&this.passes.splice(e,1)}isLastEnabledPass(t){for(let e=t+1;e0?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;lG.fromArray(r,t),bO.fromArray(r,e),cG.fromArray(r,n),Va.subVectors(cG,bO),dG.subVectors(lG,bO),Va.cross(dG),Va.normalize(),s.push(Va.x,Va.y,Va.z),s.push(Va.x,Va.y,Va.z),s.push(Va.x,Va.y,Va.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 d=this.vertices.length;let h=this.parseVertexIndex(t,d),p=this.parseVertexIndex(e,d),m=this.parseVertexIndex(n,d);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?(JS.setRGB(parseFloat(h[4]),parseFloat(h[5]),parseFloat(h[6])).convertSRGBToLinear(),e.colors.push(JS.r,JS.g,JS.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"===d){const p=c.slice(1).trim().split(aG),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 No;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 ht(d.normals,3)),d.colors.length>0&&(g=!0,b.setAttribute("color",new ht(d.colors,3))),!0===d.hasUVIndices&&b.setAttribute("uv",new ht(d.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 ht(e.vertices,3)),e.colors.length>0&&void 0!==e.colors[0]&&(l.setAttribute("color",new ht(e.colors,3)),a.vertexColors=!0);const c=new zb(l,a);s.add(c)}return s}}class xO extends bf{constructor(t){super(t)}load(t,e,n,r){const s=this,o=""===this.path?Ou.extractUrlBase(t):this.path,a=new Ba(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,d):c;h=h.toLowerCase();let p=d>=0?c.substring(d+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 Mpe(this.resourcePath||e,this.materialOptions);return a.setCrossOrigin(this.crossOrigin),a.setManager(this.manager),a.setMaterials(o),a}}class Mpe{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:lc,this.wrap=void 0!==this.options.wrap?this.options.wrap:Bs}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),d=e.loadTexture(function s(a,l){return"string"!=typeof l||""===l?"":/^https?:\/\//i.test(l)?l:a+l}(e.baseUrl,c.url));d.repeat.copy(c.scale),d.offset.copy(c.offset),d.wrapS=e.wrap,d.wrapT=e.wrap,("map"===a||"emissiveMap"===a)&&(d.colorSpace=cs),r[a]=d}for(const a in n){const l=n[a];let c;if(""!==l)switch(a.toLowerCase()){case"kd":r.color=(new qe).fromArray(l).convertSRGBToLinear();break;case"ks":r.specular=(new qe).fromArray(l).convertSRGBToLinear();break;case"ke":r.emissive=(new qe).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 zS(r),this.materials[t]}getTextureParams(t,e){const n={scale:new xe(1,1),offset:new xe(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:w$;let a=o.getHandler(t);null===a&&(a=new Pu(o)),a.setCrossOrigin&&a.setCrossOrigin(this.crossOrigin);const l=a.load(t,n,r,s);return void 0!==e&&(l.mapping=e),l}}const Cpe=["determinateSpinner"];function Spe(i,t){if(1&i&&(ki(),G(0,"svg",11),Ie(1,"circle",12),j()),2&i){const e=re();It("viewBox",e._viewBox()),V(1),qo("stroke-dasharray",e._strokeCircumference(),"px")("stroke-dashoffset",e._strokeCircumference()/2,"px")("stroke-width",e._circleStrokeWidth(),"%"),It("r",e._circleRadius())}}const Epe=Jy(class{constructor(i){this._elementRef=i}},"primary"),Ape=new me("mat-progress-spinner-default-options",{providedIn:"root",factory:function Dpe(){return{diameter:uG}}}),uG=100;let e0=(()=>{class i extends Epe{constructor(e,n,r){super(e),this.mode="mat-spinner"===this._elementRef.nativeElement.nodeName.toLowerCase()?"indeterminate":"determinate",this._value=0,this._diameter=uG,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,Ps(e)))}get diameter(){return this._diameter}set diameter(e){this._diameter=Ps(e)}get strokeWidth(){return this._strokeWidth??this.diameter/10}set strokeWidth(e){this._strokeWidth=Ps(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)(E(vt),E(kr,8),E(Ape))},i.\u0275cmp=ot({type:i,selectors:[["mat-progress-spinner"],["mat-spinner"]],viewQuery:function(e,n){if(1&e&&$n(Cpe,5),2&e){let r;At(r=Dt())&&(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&&(It("aria-valuemin",0)("aria-valuemax",100)("aria-valuenow","determinate"===n.mode?n.value:null)("mode",n.mode),qo("width",n.diameter,"px")("height",n.diameter,"px"),ln("_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:[dt],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&&(fe(0,Spe,2,8,"ng-template",null,0,zc),G(2,"div",1,2),ki(),G(4,"svg",3),Ie(5,"circle",4),j()(),ya(),G(6,"div",5)(7,"div",6)(8,"div",7),sy(9,8),j(),G(10,"div",9),sy(11,8),j(),G(12,"div",10),sy(13,8),j()()()),2&e){const r=Zi(1);V(4),It("viewBox",n._viewBox()),V(1),qo("stroke-dasharray",n._strokeCircumference(),"px")("stroke-dashoffset",n._strokeDashOffset(),"px")("stroke-width",n._circleStrokeWidth(),"%"),It("r",n._circleRadius()),V(4),U("ngTemplateOutlet",r),V(2),U("ngTemplateOutlet",r),V(2),U("ngTemplateOutlet",r)}},dependencies:[xy],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})(),Ipe=(()=>{class i{}return i.\u0275fac=function(e){return new(e||i)},i.\u0275mod=en({type:i}),i.\u0275inj=Wt({imports:[co,Jn]}),i})();const Rpe=["previewCanvasContainer"],kpe=["previewCanvas"];function Ppe(i,t){if(1&i){const e=jn();Gr(0),G(1,"label",11),Be(2),j(),G(3,"input",12),Oe("change",function(r){Vt(e);const s=re().$implicit;return s.value=r.currentTarget.checked,Et(s.change(s.value))}),j(),Wr()}if(2&i){const e=re(),n=e.index,r=e.$implicit,s=re().index;V(1),U("for","custom_control_"+s+"_"+n),V(1),ui(r.label),V(1),U("id","custom_control_"+s+"_"+n)("type",r.type)("checked",r.value)}}function Ope(i,t){if(1&i){const e=jn();G(0,"div",9)(1,"label",11),Be(2),j(),G(3,"input",14),Oe("change",function(){const s=Vt(e).$implicit,o=re(2).$implicit;return o.value=s,Et(o.change(o.value))}),j()()}if(2&i){const e=t.$implicit,n=re(2),r=n.index,s=n.$implicit,o=re().index;V(1),U("for","custom_control_"+o+"_"+r+"_"+e),V(1),ui(e),V(1),U("id","custom_control_"+o+"_"+r+"_"+e)("checked",s.value===e)}}function Fpe(i,t){if(1&i&&(G(0,"div",13)(1,"label"),Be(2),j(),fe(3,Ope,4,4,"div",8),j()),2&i){const e=re().$implicit;V(2),ui(e.label),V(1),U("ngForOf",e.options)}}function Lpe(i,t){if(1&i){const e=jn();Gr(0),G(1,"label",11),Be(2),j(),G(3,"input",15),Oe("colorChange",function(r){Vt(e);const s=re().$implicit,o=re(2);return s.value=o.toRGB(r.value),Et(s.change(s.value))}),j(),Ie(4,"ngx-mat-color-toggle",16)(5,"ngx-mat-color-picker",null,17),Wr()}if(2&i){const e=Zi(6),n=re(),r=n.index,s=n.$implicit,o=re().index;V(1),U("for","custom_control_"+o+"_"+r),V(1),ui(s.label),V(1),U("ngxMatColorPicker",e),V(1),U("for",e)}}function Npe(i,t){if(1&i){const e=jn();Gr(0),G(1,"label",11),Be(2),j(),G(3,"input",18),Oe("change",function(r){Vt(e);const s=re().$implicit;return s.value=r.currentTarget.value,Et(s.change(s.value))}),j(),Wr()}if(2&i){const e=re(),n=e.index,r=e.$implicit,s=re().index;V(1),U("for","custom_control_"+s+"_"+n),V(1),ui(r.label),V(1),U("id","custom_control_"+s+"_"+n)("min",r.minValue)("max",r.maxValue)("step",r.valueStep)("value",r.value)}}function Bpe(i,t){if(1&i&&(G(0,"div",9),fe(1,Ppe,4,5,"ng-container",6),fe(2,Fpe,4,2,"div",10),fe(3,Lpe,7,4,"ng-container",6),fe(4,Npe,4,7,"ng-container",6),j()),2&i){const e=t.$implicit;V(1),U("ngIf","checkbox"===e.type),V(1),U("ngIf","radio"===e.type),V(1),U("ngIf","color"===e.type),V(1),U("ngIf","slider"===e.type)}}function Upe(i,t){if(1&i&&(Gr(0),G(1,"h4"),Be(2),j(),fe(3,Bpe,5,4,"div",8),Wr()),2&i){const e=t.$implicit;V(2),ui(e.title),V(1),U("ngForOf",e.controls)}}function Vpe(i,t){if(1&i){const e=jn();G(0,"div",9)(1,"label",11),Be(2),j(),G(3,"input",19),Oe("change",function(r){return Et(Vt(e).$implicit.visible=r.currentTarget.checked)}),j()()}if(2&i){const e=t.$implicit;V(1),U("for","visibility_"+e.name),V(1),ui(e.name),V(1),U("id","visibility_"+e.name)("checked",e.visible)}}function zpe(i,t){if(1&i&&(Gr(0),G(1,"h4"),Be(2,"Objects visibility"),j(),fe(3,Vpe,4,4,"div",8),Wr()),2&i){const e=re();V(3),U("ngForOf",e.meshes)}}function Hpe(i,t){1&i&&Ie(0,"mat-spinner",20)}const oa=i=>{i.colorSpace="srgb",i.anisotropy=8,i.magFilter=vr,i.minFilter=vr};let hG=(()=>{class i{constructor(e){this.cdr=e,this.visibilityControls=!0,this.groupFunction=null,this.customControls=[],this.onObjectLoaded=new $e,this._paths$=new Qe(null),this.destroyed$=new Te,this.entity=null,this.meshes=[]}get paths(){return this._paths$.getValue()}set paths(e){this._paths$.next(e)}ngAfterViewInit(){var e=this;return nt(function*(){var s;e.world=new ok(new yO,{init:(s=nt(function*(){}),function(){return s.apply(this,arguments)}),simulate:()=>{}}),yield e.world.init(),e.world.visualScene.nativeScene.add(new GS(16777215,2));let n=new Qe({x:1,y:1});e.renderer=e.world.addRenderer(e.world.visualScene.factory.createPerspectiveCamera({frustrum:{near:.01,far:1e4}}),e.previewCanvas.nativeElement,{size:n.asObservable(),background:11184810}),e.controller=new Hse(e.renderer,{mouseOptions:{canvas:e.previewCanvas.nativeElement},orbiting:{sensitivityX:2,sensitivityY:2},orbitingElasticity:30}),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(Ue(e.destroyed$)).subscribe(function(){var s=nt(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 Jb,h=yield(new xO).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 No;y.add(...b[v]),y.name=v,p.remove(...b[v]),p.add(y)}}e.meshes=p.children,e.meshes.sort((b,v)=>b.name>v.name?1:-1),p.traverse(b=>{if(b instanceof Mn){const v=b.material instanceof Array?b.material:[b.material];for(const y of v)y.transparent=!0,y.alphaTest=.5,y instanceof qi&&y.map&&(y.map.wrapS=er,y.map.wrapT=er,oa(y.map),y.map.needsUpdate=!0)}}),e.onObjectLoaded.next(p),e.entity=new ea({object3D:new sa(p)}),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=Re.scalarMult(Re.add(m.min,m.max),.5),e.controller.spherical={phi:1.22,theta:-1.32,radius:Re.dist(m.min,m.max)},e.cdr.markForCheck()}});return function(o){return s.apply(this,arguments)}}())})()}toRGB(e){return(e?.r||0)<<16|(e?.g||0)<<8|(e?.b||0)}ngOnDestroy(){this.destroyed$.next(),this.destroyed$.complete()}}return i.\u0275fac=function(e){return new(e||i)(E(Qn))},i.\u0275cmp=ot({type:i,selectors:[["app-obj-viewer"]],viewQuery:function(e,n){if(1&e&&($n(Rpe,5),$n(kpe,5)),2&e){let r;At(r=Dt())&&(n.previewCanvasContainer=r.first),At(r=Dt())&&(n.previewCanvas=r.first)}},inputs:{paths:"paths",visibilityControls:"visibilityControls",groupFunction:"groupFunction",customControls:"customControls"},outputs:{onObjectLoaded:"onObjectLoaded"},decls:8,vars:3,consts:[[1,"previewCanvasContainer"],["previewCanvasContainer",""],["width","640","height","480"],["previewCanvas",""],["id","controls"],[4,"ngFor","ngForOf"],[4,"ngIf"],["mode","indeterminate",4,"ngIf"],["class","controls-list",4,"ngFor","ngForOf"],[1,"controls-list"],["style","width: 100%",4,"ngIf"],[3,"for"],[3,"id","type","checked","change"],[2,"width","100%"],["type","radio",3,"id","checked","change"],["matInput","",1,"hidden",3,"ngxMatColorPicker","colorChange"],["matSuffix","",3,"for"],["picker",""],["type","range",3,"id","min","max","step","value","change"],["type","checkbox",3,"id","checked","change"],["mode","indeterminate"]],template:function(e,n){1&e&&(G(0,"div",0,1),Ie(2,"canvas",2,3),G(4,"div",4),fe(5,Upe,4,2,"ng-container",5),fe(6,zpe,4,1,"ng-container",6),j(),fe(7,Hpe,1,0,"mat-spinner",7),j()),2&e&&(V(5),U("ngForOf",n.customControls),V(1),U("ngIf",n.visibilityControls),V(1),U("ngIf",!n.entity))},dependencies:[lo,_i,Xte,rc,e0,jie,bC,NH],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%] > h4[_ngcontent-%COMP%]{margin:0}.previewCanvasContainer[_ngcontent-%COMP%] #controls[_ngcontent-%COMP%] .controls-list[_ngcontent-%COMP%]{width:100%;display:flex;-webkit-user-select:none;user-select:none;align-items:center}.previewCanvasContainer[_ngcontent-%COMP%] #controls[_ngcontent-%COMP%] .controls-list[_ngcontent-%COMP%] > span[_ngcontent-%COMP%]{flex-grow:1}.previewCanvasContainer[_ngcontent-%COMP%] #controls[_ngcontent-%COMP%] .controls-list[_ngcontent-%COMP%] > label[_ngcontent-%COMP%]{flex-grow:1}"],changeDetection:0}),i})();function $pe(i,t){if(1&i){const e=jn();ki(),G(0,"circle",5),Oe("mousedown",function(r){return Vt(e),Et(re().startDrag(r))}),ct(1,"async"),ct(2,"async"),j()}if(2&i){const e=re();let n,r;It("cx",(null==(n=ut(1,3,e.mapPointer$))?null:n.x)||0)("cy",(null==(r=ut(2,5,e.mapPointer$))?null:r.y)||0)("r",10)}}const Gpe=function(){return{"stroke-width":3}};let fG=(()=>{class i{constructor(e){this.ref=e,this._roadSpline$=new Qe([]),this._pointer$=new Qe(null),this._projection$=new Qe("nz"),this._roadSplineProjected$=new Qe([]),this._pointerProjected$=new Qe(yi.O),this.splineClosed=!1,this.pointerChange=new $e,this.svgSize$=new Qe({x:100,y:100}),this.scalingSquare$=new Qe({x:0,y:0,width:100,height:100}),this.mapPolyline$=new Qe(""),this.mapPointer$=new Qe(null),this.isShiftPressed=!1,this.destroyed$=new Te,this.isDragging=!1}set roadSpline(e){this._roadSpline$.next(e)}set pointer(e){this._pointer$.next(e)}set projection(e){this._projection$.next(e)}get trackLength$(){return this._roadSpline$.pipe(tt(e=>{let n=0;for(let r=1;r{"Shift"===n.key&&(this.isShiftPressed=!0)}),To(window,"keyup").pipe(Ue(this.destroyed$)).subscribe(n=>{"Shift"===n.key&&(this.isShiftPressed=!1)}),Ra([this._roadSpline$,this._projection$]).pipe(Ue(this.destroyed$)).subscribe(([n,r])=>{this._roadSplineProjected$.next(n.map(s=>this.project(s)))}),Ra([this._pointer$,this._projection$]).pipe(Ue(this.destroyed$)).subscribe(([n,r])=>{this._pointerProjected$.next(this.project(n||Re.O))}),this._roadSplineProjected$.pipe(Ue(this.destroyed$),tt(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.y)},s={x:Math.max(s.x,a.x),y:Math.max(s.y,a.y)}});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$),Ra([this._roadSplineProjected$,this.scalingSquare$,this.svgSize$]).pipe(Ue(this.destroyed$),tt(([n,r,s])=>{const o=n.map(a=>({x:(a.x-r.x)*s.x/r.width,y:(r.y-a.y)*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$),Ra([this._pointerProjected$,this.scalingSquare$.asObservable(),this.svgSize$]).pipe(Ue(this.destroyed$),tt(([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()}startDrag(e){this.isDragging=!0,this.updatePointer(e)}drag(e){this.isDragging&&this.updatePointer(e)}endDrag(){this.isDragging=!1}getClosestProjectedLineIndex(e){const n=this._roadSplineProjected$.getValue();let r=-1,s=Number.MAX_SAFE_INTEGER;for(let d=1;d{return(i=Df||(Df={})).ThreeModel="model",i.Bitmap="bitmap",i.TwoSidedBitmap="two_sided_bitmap",Df;var i})();class Qpe extends QH{constructor(t,e,n){super(t,{loadDepth:40,inertia:2}),this.mapGraph=t,this.famPath=e,this.hideUnknownEntities$=n,this.textureLoader=new Pu,this.terrainMaterials={},this.objLoader=new Jb,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(Ql(),Ue(this._onRemoved$)).subscribe(e=>{for(const n of this.unknownEntities)n.visible=!e})}getPlaceholderTexture(){var t=this;return nt(function*(){return t._placeholder?t._placeholder:(t._placeholderPromise||(t._placeholderPromise=t.textureLoader.loadAsync("assets/placeholder_texture.png")),t._placeholderPromise)})()}getPlaceholderTerrainTexture(){var t=this;return nt(function*(){return t._placeholderTerrain?t._placeholderTerrain:(t._placeholderTerrainPromise||(t._placeholderTerrainPromise=t.textureLoader.loadAsync("assets/placeholder_texture.png").then(e=>(e.wrapS=Bs,e.wrapT=er,oa(e),e.flipY=!0,e))),t._placeholderTerrainPromise)})()}loadChunk(t){var e=this;return nt(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 Mn&&(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:Re.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:Yi.fromAngle(Re.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 ea({object3D:new sa(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 qi({side:Ns,transparent:!0,visible:!1}),this.famPath?this.textureLoader.loadAsync(`${this.famPath}/${t}.png`).then(e=>{e.wrapS=Bs,e.wrapT=er,oa(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 nt(function*(){let n=!1;if(t.type==Df.ThreeModel){let r;try{if(!e.famPath)throw new Error;const o=new xO,a=new Jb,l=yield o.loadAsync(`${e.famPath}/props/${t.data.data.resource_id}/0/material.mtl`);l.preload(),a.setMaterials(l),r=new sa(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 Mn){const a=o.material instanceof Array?o.material:[o.material];for(const l of a)l.transparent=!0,l.alphaTest=.5,l instanceof qi&&l.map&&(l.map.wrapS=er,l.map.wrapT=er,oa(l.map),l.map.needsUpdate=!0)}});const s=new ea({object3D: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,d)=>new Array(d).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 No,[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,d]=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 ea({object3D:new sa(s)});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 nt(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=>(oa(h),new qi({map:h,alphaTest:.5,transparent:!0,side:Ns}))),d=new Mn(new Iu(e.x,e.y),c[0]);if(d.rotateX(Math.PI/2),d.position.set(0,0,e.y/2),c.length>1){let h=-1;Ym(r.world).pipe(o4(n&&!isNaN(+n)?1e3*+n:250)).subscribe(()=>{h=(h+1)%c.length,d.material=c[h]})}return[d,a]})()}}let Jpe=(()=>{class i{constructor(e,n,r){this.eelDelegate=e,this.cdr=n,this.mainService=r,this._resource$=new Qe(null),this.changed=new $e,this.previewLoading$=new Qe(!0),this.previewFamLocation$=new Qe(null),this.previewFamLoading$=new Qe(!1),this.pointer$=new Qe(null),this.selectedSplineIndex$=new Qe(0),this.selectedSplineItem$=new Qe(null),this.selectedAiInfoItem$=new Qe(null),this.selectedTerrainItem$=new Qe(null),this.famPath=null,this.name="",this.renderer=null,this.map=null,this.isOpenedTrack=!0,this.roadPath=null,this.destroyed$=new Te}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=>({x:e.position.x,y:e.position.z,z:e.position.y}))||[]}ngAfterViewInit(){var e=this;return nt(function*(){var s;e.world=new ok(new yO,{init:(s=nt(function*(){}),function(){return s.apply(this,arguments)}),simulate:()=>{},loader:{loadFromGgGlb:function(){var s=nt(function*(...o){return[]});return function(){return s.apply(this,arguments)}}()}}),yield e.world.init(),e.skySphere=new ea({object3D:e.world.visualScene.factory.createPrimitive({shape:"SPHERE",radius:1e3},{color:16777215})}),e.skySphere.object3D.nativeMesh.material.side=Ns,e.world.addEntity(e.skySphere),e.selectionSphere=new ea({object3D: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 GS(16777215,2));let n=new Qe({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=Yi.lookAt(e.renderer.camera.position,Re.add(e.renderer.camera.position,Re.Y),Re.Z),Ym(e.world).pipe(Ue(e.destroyed$)).subscribe(()=>{e.renderer&&(e.skySphere.position=e.renderer.camera.position,e.pointer$.next(e.renderer.camera.position))}),e.controller=new n4(e.world.keyboardInput,e.renderer,{mouseOptions:{canvas:e.previewCanvas.nativeElement,pointerLock:!0},keymap:"wasd+arrows",cameraLinearSpeed:40,cameraBoostMultiplier:4,cameraMovementElasticity:100,cameraRotationElasticity:30,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(Ue(e.destroyed$)).subscribe(function(){var s=nt(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(Ue(e.destroyed$),gn(([s,o])=>!!e.resource&&s.startsWith(e.resource.id)),gl(3e3)).subscribe(nt(function*(){e.previewLoading$.next(!0),yield e.postTmpUpdates(e.resource?.id),yield e.loadPreview(),e.previewLoading$.next(!1)})),e.selectedSplineIndex$.pipe(Ue(e.destroyed$),gl(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=Re.add(a,Re.rotAround({x:10,y:-12,z:5},{x:0,y:0,z:1},-e.resource.data.road_spline[s].orientation)),e.renderer.rotation=Yi.lookAt(e.renderer.position,a,{x:0,y:0,z:1}),e.controller.reset())}e.selectedSplineItem$.next({id:sc(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:sc(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:sc(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 nt(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 Pu,o=r.find(a=>a.endsWith("spherical.png"));if(o){const a=yield s.loadAsync(o);a.colorSpace="srgb",a.mapping=cc,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 nt(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})()}onPointerChange(e){this.renderer&&(this.renderer.position=e)}loadPreview(){var e=this;return nt(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=Km.fromMapArray(e.roadPath.map((r,s)=>({path:`${e.terrainChunksObjLocation}terrain_chunk_${s}`,position:r,loadOptions:{}}))||[],!e.isOpenedTrack);e.unloadPreview(),e.map=new Qpe(n,e.famPath&&"resources/"+e.famPath,e.mainService.hideHiddenFields$),e.map.resource=e.resource,e.map.isOpenedTrack=e.isOpenedTrack,Ym(e.world).pipe(Ue(e.destroyed$)).subscribe(()=>{e.map&&e.renderer&&e.map.loaderCursor$.next(e.renderer.position)}),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 nt(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)(E(Jl),E(Qn),E(Fa))},i.\u0275cmp=ot({type:i,selectors:[["app-tri-map-block-ui"]],viewQuery:function(e,n){if(1&e&&($n(Wpe,5),$n(jpe,5)),2&e){let r;At(r=Dt())&&(n.previewCanvasContainer=r.first),At(r=Dt())&&(n.previewCanvas=r.first)}},inputs:{resource:"resource"},outputs:{changed:"changed"},decls:49,vars:44,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","projection","pointerChange"],[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&&(G(0,"div",0)(1,"h4"),Be(2,"Preview *.FAM file"),j(),G(3,"mat-form-field",1)(4,"mat-label"),Be(5,"Current preview FAM"),j(),G(6,"mat-select",2,3),Oe("valueChange",function(s){return n.onFamSelected(s)}),ct(8,"async"),ct(9,"async"),fe(10,Ype,2,2,"mat-option",4),G(11,"mat-option",5),Be(12,"custom"),j()()(),fe(13,qpe,9,3,"ng-container",6),fe(14,Xpe,1,1,"mat-spinner",7),ct(15,"async"),j(),G(16,"div",8)(17,"div",9,10),Ie(19,"canvas",11,12),fe(21,Kpe,1,0,"mat-spinner",13),ct(22,"async"),j(),G(23,"div",14,10)(25,"mat-form-field",1)(26,"mat-label"),Be(27,"Spline item"),j(),G(28,"input",15),Oe("ngModelChange",function(s){return n.selectedSplineIndex$.next(s)}),ct(29,"async"),ct(30,"async"),j()(),G(31,"app-minimap",16),Oe("pointerChange",function(s){return n.onPointerChange(s)}),ct(32,"async"),j()()(),G(33,"h4"),Be(34,"Road spline item"),j(),Ie(35,"app-compound-block-ui",17),ct(36,"async"),G(37,"h4"),Be(38,"AI info (block for 4 spline items)"),j(),Ie(39,"app-compound-block-ui",17),ct(40,"async"),G(41,"h4"),Be(42,"Terrain (block for 4 spline items)"),j(),Ie(43,"app-compound-block-ui",17),ct(44,"async"),G(45,"h4"),Be(46,"Common"),j(),Ie(47,"app-compound-block-ui",18),ct(48,"async")),2&e){const r=Zi(7);let s;V(6),U("value",n.previewFamPossibleLocations.includes(ut(8,21,n.previewFamLocation$))?ut(9,23,n.previewFamLocation$):"custom"),V(4),U("ngForOf",n.previewFamPossibleLocations),V(3),U("ngIf","custom"==r.value),V(1),U("ngIf",ut(15,25,n.previewFamLoading$)),V(7),U("ngIf",ut(22,27,n.previewLoading$)),V(7),U("min",0)("max",4*(null==(s=ut(29,29,n._resource$))?null:s.data.num_chunks)-1)("ngModel",ut(30,31,n.selectedSplineIndex$)),V(3),U("roadSpline",n.roadSpline)("pointer",ut(32,33,n.pointer$))("splineClosed",!n.isOpenedTrack)("projection","nz"),V(4),U("resource",ut(36,35,n.selectedSplineItem$))("hideBlockActions",!0),V(4),U("resource",ut(40,37,n.selectedAiInfoItem$))("hideBlockActions",!0),V(4),U("resource",ut(44,39,n.selectedTerrainItem$))("hideBlockActions",!0),V(4),U("resource",ut(48,41,n._resource$))("hideBlockActions",!0)("fieldWhitelist",Rs(43,Zpe))}},dependencies:[lo,_i,_l,mu,nc,_u,gu,Zc,yl,Ro,rc,rb,pb,Nm,e0,ec,fG,Xo],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-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})();const pG=i=>new Promise(t=>setTimeout(t,i)),mG=(i,t,e=null)=>{const n=document.createElement("canvas"),r=n.getContext("2d",{willReadFrequently:!0}),s=i.width,o=i.height;n.width=s,n.height=o,r.drawImage(i,0,0,s,o);const a=r.getImageData(0,0,s,o);for(let l=0;l{if(!(o instanceof Mn))return;let a=-1;if(o.name.startsWith("lbl__rt_frnt")?a=0:o.name.startsWith("lbl__lt_frnt")?a=1:o.name.startsWith("lbl__rt_rear")?a=2:o.name.startsWith("lbl__lt_rear")&&(a=3),a>-1){this.wheels[a]=o,a<2&&(this.frontWheels[a]=o),o.geometry.boundingBox||o.geometry.computeBoundingBox();const l=Re.avg(o.geometry.boundingBox.min,o.geometry.boundingBox.max);o.geometry.translate(...Re.spr(Re.neg(l))),o.position.set(...Re.spr(l)),this.wheelIdlePositions[a]=l}(o.name.includes("rsid")||o.name.includes("lite"))&&(r.push(o),this.originalTexWithTailLights=o.material.map)}),!this.originalTexWithTailLights)throw new Error("Not a driveable NFS1 car");this.tailLightColors=n.includes("TRAFFC.CFM")?[9509903,16711680]:[3212546,16258068],this.texWithTailLightsImg=document.createElement("img"),this.texWithTailLights=new Oo(this.texWithTailLightsImg),this.texWithTailLights.flipY=this.originalTexWithTailLights.flipY,oa(this.texWithTailLights),this.recolorTailLights(this.tailLightColors[0]).then();for(const o of r)o.material.map=this.texWithTailLights;const s=new Pu;this.tyreTextures=[1,2,3,4].map(o=>s.load(`${n}/tyr${o}.png`));for(const o of this.tyreTextures)oa(o);this.tyreMaterial=new qi({map:this.tyreTextures[0]}),this.tyreMaterial.transparent=!0,this.tyreMaterial.alphaTest=.5,this.tyreMaterial.map.wrapS=er,this.tyreMaterial.map.wrapT=er,this.tyreMaterial.polygonOffset=!0,this.tyreMaterial.polygonOffsetFactor=-4;for(const o of this.wheels)o.material=this.tyreMaterial}get tailLightsOn(){return this._tailLightsOn}set tailLightsOn(t){t!==this._tailLightsOn&&(this._tailLightsOn=t,this.recolorTailLights(this.tailLightColors[t?1:0]))}get speed(){return this._speed}set speed(t){if(t!==this._speed){switch(this._speed=t,this.tyreTextureUpdateTimer&&clearInterval(this.tyreTextureUpdateTimer),t){case"idle":this.tyreMaterial.map=this.tyreTextures[0];break;case"slow":let e=!0;this.tyreTextureUpdateTimer=setInterval(()=>{this.tyreMaterial.map=this.tyreTextures[e?1:2],this.tyreMaterial.needsUpdate=!0,e=!e},16);break;case"fast":this.tyreMaterial.map=this.tyreTextures[3]}this.tyreMaterial.needsUpdate=!0}}get steeringAngle(){return this._steeringAngle}set steeringAngle(t){if(t!==this._steeringAngle){this._steeringAngle=t;for(const e of this.frontWheels)e.rotation.set(0,0,t)}}recolorTailLights(t){var e=this;return nt(function*(){if(e.originalTexWithTailLights&&e.texWithTailLights&&e.texWithTailLightsImg){for(let n=100;n>0&&!e.originalTexWithTailLights.source.data;n--)yield pG(50);((i,t,e,n=null)=>{const[r,s,o]=[t>>16,t>>8&255,255&t],[a,l,c]=[e>>16,e>>8&255,255&e];mG(i,(d,h)=>{d[h]==r&&d[h+1]==s&&d[h+2]==o&&(d[h]=a,d[h+1]=l,d[h+2]=c)},n)})(e.originalTexWithTailLights.source.data,e.tailLightsTexColor,t,e.texWithTailLightsImg),e.texWithTailLights.needsUpdate=!0}})()}dispose(){this.texWithTailLightsImg&&(this.texWithTailLightsImg.remove(),this.texWithTailLightsImg=null),this.texWithTailLights&&(this.texWithTailLights.dispose(),this.texWithTailLights=null),this.tyreTextureUpdateTimer&&clearInterval(this.tyreTextureUpdateTimer),this.tyreMaterial&&(this.tyreMaterial.dispose(),this.tyreMaterial=null)}}let nme=(()=>{class i{constructor(e,n,r){this.eelDelegate=e,this.mainService=n,this.cdr=r,this._resource$=new Qe(null),this.changed=new $e,this.previewPaths$=new Qe(null),this.destroyed$=new Te,this.customControls=[],this.serializerSettings={geometry__save_obj:!0,geometry__save_blend:!1,geometry__export_to_gg_web_engine:!1}}get resource(){return this._resource$.getValue()}set resource(e){this._resource$.next(e)}ngAfterViewInit(){var e=this;return nt(function*(){e._resource$.pipe(Ue(e.destroyed$)).subscribe(function(){var n=nt(function*(r){e.previewPaths$.next(yield e.loadPreviewFilePaths(r?.id))});return function(r){return n.apply(this,arguments)}}()),e.mainService.dataBlockChange$.pipe(Ue(e.destroyed$),gn(([n,r])=>!!e.resource&&n.startsWith(e.resource.id)),gl(1500)).subscribe(nt(function*(){e.previewPaths$.next(null),e.previewPaths$.next(yield e.postTmpUpdates(e.resource?.id))}))})()}onObjectLoaded(e){var n=this;return nt(function*(){if((n._resource$.value?.id||"").includes(".CFM__"))try{const r=n.resource?.id.split("/");r.pop(),r[r.length-1]=""+(+r[r.length-1]+1);const s=yield n.eelDelegate.retrieveValue(r.join("/")+"/data"),o=s.children_aliases.findIndex(l=>"!PAL"===l);if(-1==o)throw new Error("Not a car");const a=new tme(e,s.children[o].data.colors[254]>>>8,n.previewPaths$.value[0].substring(0,n.previewPaths$.value[0].lastIndexOf("/"))+"/assets");n.customControls=[{title:"TNFS car features",controls:[{label:"Brake lights on",type:"checkbox",value:!1,change:l=>{a.tailLightsOn=l}},{label:"Car speed",type:"radio",options:["idle","slow","fast"],value:"idle",change:l=>{a.speed=l}},{label:"Steering angle",type:"slider",minValue:-.7,maxValue:.7,valueStep:.05,value:0,change:l=>{a.steeringAngle=l}}]}],n.cdr.markForCheck()}catch{}})()}postTmpUpdates(e){var n=this;return nt(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 nt(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)(E(Jl),E(Fa),E(Qn))},i.\u0275cmp=ot({type:i,selectors:[["app-orip-geometry-block-ui"]],inputs:{resource:"resource"},outputs:{changed:"changed"},decls:4,vars:7,consts:[[3,"paths","customControls","onObjectLoaded"],[3,"resource"]],template:function(e,n){1&e&&(G(0,"app-obj-viewer",0),Oe("onObjectLoaded",function(s){return n.onObjectLoaded(s)}),ct(1,"async"),j(),Ie(2,"app-compound-block-ui",1),ct(3,"async")),2&e&&(U("paths",ut(1,3,n.previewPaths$))("customControls",n.customControls),V(2),U("resource",ut(3,5,n._resource$)))},dependencies:[ec,hG,Xo],changeDetection:0}),i})();const gG=i=>{let t=i.block_class_mro.split("__")[0];return"ArrayBlock"===t?gG(i.child_schema)+"[]":t},ime=["class","block-ui"];function rme(i,t){if(1&i&&(G(0,"mat-label",7),Be(1),j()),2&i){const e=re(2);U("matTooltip",e.resourceDescription),V(1),Qi("",null==e.resource?null:e.resource.name," ")}}function sme(i,t){if(1&i&&(G(0,"mat-option",8),Be(1),j()),2&i){const e=t.$implicit,n=t.index,r=re(2);U("value",n)("disabled",r.disabled),V(1),Qi(" ",r.blockClassStr(e)," ")}}function ome(i,t){if(1&i){const e=jn();Gr(0),fe(1,rme,2,2,"mat-label",1),ct(2,"async"),G(3,"div",2)(4,"mat-label"),Be(5,"Resource type:"),j(),G(6,"mat-select",3),Oe("selectionChange",function(r){return Vt(e),Et(re().setChoiceIndex(r.value))}),fe(7,sme,2,3,"mat-option",4),j(),Ie(8,"app-block-actions",5),j(),Ie(9,"app-editor",6),Wr()}if(2&i){const e=re();let n;V(1),U("ngIf",(null==e.resource?null:e.resource.name)&&(null==e.resource?null:e.resource.name)!=(null==(n=ut(2,8,e.main.resource$))?null:n.name)),V(5),U("value",e.resourceData.choice_index)("disabled",e.disabled),V(1),U("ngForOf",e.resource.schema.possible_resource_schemas),V(1),U("resource",e.childResource),V(1),U("resource",e.childResource)("hideBlockActions",!0)("disabled",e.disabled)}}let _G=(()=>{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 $e,this.blockClassStr=gG}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:sc(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)(E(Fa))},i.\u0275cmp=ot({type:i,selectors:[["app-delegate",8,"block-ui"]],inputs:{resource:"resource",resourceDescription:"resourceDescription",hideBlockActions:"hideBlockActions",disabled:"disabled"},outputs:{changed:"changed"},attrs:ime,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"],[3,"resource","hideBlockActions","disabled"],["matTooltipPosition","above",3,"matTooltip"],[3,"value","disabled"]],template:function(e,n){1&e&&fe(0,ome,10,10,"ng-container",0),2&e&&U("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 ame=["class","block-ui"];function lme(i,t){if(1&i&&(G(0,"mat-label",7),Be(1),j()),2&i){const e=re(2);U("matTooltip",e.resourceDescription),V(1),Qi(" ",e.resource.name," ")}}function cme(i,t){if(1&i){const e=jn();Gr(0),fe(1,lme,2,2,"mat-label",1),G(2,"mat-selection-list",2),Oe("selectionChange",function(r){return Vt(e),Et(re().onSelection(r))}),G(3,"mat-list-option",3),Be(4," Left "),j(),G(5,"mat-list-option",4),Be(6," Right "),j()(),G(7,"mat-form-field",5)(8,"mat-label"),Be(9,"Texture ID"),j(),G(10,"input",6),Oe("ngModelChange",function(r){return Vt(e),Et(re().resource.data.texture_id=r)})("change",function(){return Vt(e),Et(re().changed.emit())}),j()(),Wr()}if(2&i){const e=re();V(1),U("ngIf",e.resource.name),V(2),U("selected",e.resource.data.has_left_fence),V(2),U("selected",e.resource.data.has_right_fence),V(5),U("max",63)("min",0)("step",1)("ngModel",e.resource.data.texture_id)}}let dme=(()=>{class i{constructor(){this.resource=null,this.resourceDescription="",this.changed=new $e}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=ot({type:i,selectors:[["app-fence-type",8,"block-ui"]],inputs:{resource:"resource",resourceDescription:"resourceDescription"},outputs:{changed:"changed"},attrs:ame,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&&fe(0,cme,11,7,"ng-container",0),2&e&&U("ngIf",n.resource)},dependencies:[_i,_l,mu,nc,_u,gu,Zc,yl,Ro,rc,Fs,MC,wC],changeDetection:0}),i})(),ume=(()=>{class i{constructor(){this._resource=null,this.resourceMap={},this.changed=new $e}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]=["",vl.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)(E(ib),E(bte),E(oR))},i.\u0275cmp=ot({type:i,selectors:[["app-run-custom-action",8,"dialog"]],attrs:hme,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&&(G(0,"h1",0),Be(1),j(),G(2,"div",1)(3,"p"),Be(4),j()(),G(5,"form",2),fe(6,fme,4,4,"mat-form-field",3),j(),G(7,"div",4)(8,"button",5),Oe("click",function(){return n.dialogRef.close()}),Be(9,"Cancel"),j(),G(10,"button",6),Oe("click",function(){return n.submit()}),Be(11,"Run"),j()()),2&e&&(V(1),Qi('Run action "',n.data.title,'"'),V(3),ui(n.data.description),V(1),U("formGroup",n.argsForm),V(1),U("ngForOf",n.data.args),V(4),U("disabled",n.argsForm.invalid))},dependencies:[lo,IR,_l,nc,bR,yl,Ro,rc,rb,pV,mV,gV,Gh,fC],styles:["form[_ngcontent-%COMP%]{padding:0 24px}"]}),i})();function vG(i,t){return t?e=>Sy(t.pipe(Oi(1),function mme(){return ni((i,t)=>{i.subscribe(qn(t,ms))})}()),e.pipe(vG(i))):rr((e,n)=>Mr(i(e,n)).pipe(Oi(1),qB(e)))}function yG(i,t=Gy){const e=OI(i,t);return vG(()=>e)}const gme=["mat-menu-item",""];function _me(i,t){1&i&&(ki(),G(0,"svg",3),Ie(1,"polygon",4),j())}const vme=[[["mat-icon"],["","matMenuItemIcon",""]],"*"],yme=["mat-icon, [matMenuItemIcon]","*"];function bme(i,t){if(1&i){const e=jn();G(0,"div",0),Oe("keydown",function(r){return Vt(e),Et(re()._handleKeydown(r))})("click",function(){return Vt(e),Et(re().closed.emit("click"))})("@transformMenu.start",function(r){return Vt(e),Et(re()._onAnimationStart(r))})("@transformMenu.done",function(r){return Vt(e),Et(re()._onAnimationDone(r))}),G(1,"div",1),Yt(2),j()()}if(2&i){const e=re();U("id",e.panelId)("ngClass",e._classList)("@transformMenu",e._panelAnimationState),It("aria-label",e.ariaLabel||null)("aria-labelledby",e.ariaLabelledby||null)("aria-describedby",e.ariaDescribedby||null)}}const xme=["*"],wO=new me("MAT_MENU_PANEL"),wme=YM(jM(class{}));let eE=(()=>{class i extends wme{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 Te,this._focused=new Te,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",Yr("120ms cubic-bezier(0, 0, 0.2, 1)",oi({opacity:1,transform:"scale(1)"}))),Or("* => void",Yr("100ms 25ms linear",oi({opacity:0})))]),fadeInItems:Oa("fadeInItems",[Os("showing",oi({opacity:1})),Or("void => *",[oi({opacity:0}),Yr("400ms 100ms cubic-bezier(0.55, 0, 0.55, 0.2)")])])};let Cme=0;const bG=new me("mat-menu-default-options",{providedIn:"root",factory:function Sme(){return{overlapTrigger:!1,xPosition:"after",yPosition:"below",backdropClass:"cdk-overlay-transparent-backdrop"}}});let t0=(()=>{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=tn(e)}get hasBackdrop(){return this._hasBackdrop}set hasBackdrop(e){this._hasBackdrop=tn(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 om,this._classList={},this._panelAnimationState="void",this._animationDone=new Te,this.overlayPanelClass=this._defaultOptions.overlayPanelClass||"",this.backdropClass=this._defaultOptions.backdropClass,this._overlapTrigger=this._defaultOptions.overlapTrigger,this._hasBackdrop=this._defaultOptions.hasBackdrop,this.closed=new $e,this.close=this.closed,this.panelId="mat-menu-panel-"+Cme++}ngOnInit(){this.setPositionClasses()}ngAfterContentInit(){this._updateDirectDescendants(),this._keyManager=new kU(this._directDescendantItems).withWrap().withTypeAhead().withHomeAndEnd(),this._keyManager.tabOut.subscribe(()=>this.closed.emit("tab")),this._directDescendantItems.changes.pipe(Do(this._directDescendantItems),ks(e=>Cr(...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(Do(this._directDescendantItems),ks(n=>Cr(...n.map(r=>r._hovered))))}addItem(e){}removeItem(e){}_handleKeydown(e){const n=e.keyCode,r=this._keyManager;switch(n){case 27:Qo(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(Oi(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(Do(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)(E(vt),E(gt),E(bG),E(Qn))},i.\u0275dir=ve({type:i,contentQueries:function(e,n,r){if(1&e&&(Wi(r,Mme,5),Wi(r,eE,5),Wi(r,eE,4)),2&e){let s;At(s=Dt())&&(n.lazyContent=s.first),At(s=Dt())&&(n._allItems=s),At(s=Dt())&&(n.items=s)}},viewQuery:function(e,n){if(1&e&&$n(Eo,5),2&e){let r;At(r=Dt())&&(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})(),Eme=(()=>{class i extends t0{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)(E(vt),E(gt),E(bG),E(Qn))},i.\u0275cmp=ot({type:i,selectors:[["mat-menu"]],hostVars:3,hostBindings:function(e,n){2&e&&It("aria-label",null)("aria-labelledby",null)("aria-describedby",null)},exportAs:["matMenu"],features:[Dn([{provide:wO,useExisting:i}]),dt],ngContentSelectors:xme,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&&(or(),fe(0,bme,3,6,"ng-template"))},dependencies:[hm],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:[tE.transformMenu,tE.fadeInItems]},changeDetection:0}),i})();const xG=new me("mat-menu-scroll-strategy"),Dme={provide:xG,deps:[as],useFactory:function Ame(i){return()=>i.scrollStrategies.reposition()}},wG=Fh({passive:!0});let Tme=(()=>{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,d){this._overlay=e,this._element=n,this._viewContainerRef=r,this._menuItemInstance=a,this._dir=l,this._focusMonitor=c,this._ngZone=d,this._overlayRef=null,this._menuOpen=!1,this._closingActionsSubscription=Qt.EMPTY,this._hoverSubscription=Qt.EMPTY,this._menuCloseSubscription=Qt.EMPTY,this._changeDetectorRef=Lt(Qn),this._handleTouchStart=h=>{qI(h)||(this._openedBy="touch")},this._openedBy=void 0,this.restoreFocus=!0,this.menuOpened=new $e,this.onMenuOpen=this.menuOpened,this.menuClosed=new $e,this.onMenuClose=this.menuClosed,this._scrollStrategy=s,this._parentMaterialMenu=o instanceof t0?o:void 0,n.nativeElement.addEventListener("touchstart",this._handleTouchStart,wG)}ngAfterContentInit(){this._handleHover()}ngOnDestroy(){this._overlayRef&&(this._overlayRef.dispose(),this._overlayRef=null),this._element.nativeElement.removeEventListener("touchstart",this._handleTouchStart,wG),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 t0&&(e._startAnimation(),e._directDescendantItems.changes.pipe(Ue(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 t0?(n._resetAnimation(),n.lazyContent?n._animationDone.pipe(gn(r=>"void"===r.toState),Oi(1),Ue(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],[d,h]=[r,s],p=0;if(this.triggersSubmenu()){if(h=r="before"===e.xPosition?"start":"end",s=d="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:d,overlayY:o,offsetY:p},{originX:s,originY:l,overlayX:h,overlayY:o,offsetY:p},{originX:r,originY:c,overlayX:d,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 Cr(e,this._parentMaterialMenu?this._parentMaterialMenu.closed:mt(),this._parentMaterialMenu?this._parentMaterialMenu._hovered().pipe(gn(o=>o!==this._menuItemInstance),gn(()=>this._menuOpen)):mt(),n)}_handleMousedown(e){YI(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(gn(e=>e===this._menuItemInstance&&!e.disabled),yG(0,PI)).subscribe(()=>{this._openedBy="mouse",this.menu instanceof t0&&this.menu._isAnimating?this.menu._animationDone.pipe(Oi(1),yG(0,PI),Ue(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)(E(as),E(vt),E(jr),E(xG),E(wO,8),E(eE,10),E(Pa,8),E(Xc),E(gt))},i.\u0275dir=ve({type:i,hostVars:3,hostBindings:function(e,n){1&e&&Oe("click",function(s){return n._handleClick(s)})("mousedown",function(s){return n._handleMousedown(s)})("keydown",function(s){return n._handleKeydown(s)}),2&e&&It("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})(),Ime=(()=>{class i extends Tme{}return i.\u0275fac=function(){let t;return function(n){return(t||(t=si(i)))(n||i)}}(),i.\u0275dir=ve({type:i,selectors:[["","mat-menu-trigger-for",""],["","matMenuTriggerFor",""]],hostAttrs:[1,"mat-mdc-menu-trigger"],exportAs:["matMenuTrigger"],features:[dt]}),i})(),Rme=(()=>{class i{}return i.\u0275fac=function(e){return new(e||i)},i.\u0275mod=en({type:i}),i.\u0275inj=Wt({providers:[Dme],imports:[co,tb,Jn,Pm,Ky,Jn]}),i})();function kme(i,t){if(1&i){const e=jn();G(0,"button",7),Oe("click",function(){return Vt(e),Et(re(2).deserialize())}),Ie(1,"mat-icon",8),j()}}function Pme(i,t){if(1&i){const e=jn();Gr(0),fe(1,kme,2,0,"button",4),G(2,"button",5),Oe("click",function(){return Vt(e),Et(re().serializeBlockReversible())}),Ie(3,"mat-icon",6),j(),Wr()}if(2&i){const e=re();V(1),U("ngIf",e.isInReversibleSerializationState),V(1),U("disabled",e.isInReversibleSerializationState)}}function Ome(i,t){1&i&&(G(0,"button",9),Ie(1,"mat-icon",10),j()),2&i&&(re(),U("matMenuTriggerFor",Zi(3)))}function Fme(i,t){if(1&i){const e=jn();G(0,"button",11),Oe("click",function(){const s=Vt(e).$implicit;return Et(re().runCustomAction(s))}),G(1,"span"),Be(2),j()()}if(2&i){const e=t.$implicit;V(2),ui(e.title)}}const Lme=function(){return[]};let nE=(()=>{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 nt(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)(E(Fa),E(Jl),E(Qn),E(Bm),E(RV))},i.\u0275cmp=ot({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&&(fe(0,Pme,4,2,"ng-container",0),fe(1,Ome,2,1,"button",1),G(2,"mat-menu",null,2),fe(4,Fme,3,1,"button",3),j()),2&e&&(U("ngIf",null==n.resource||null==n.resource.schema?null:n.resource.schema.serializable_to_disc),V(1),U("ngIf",(null==n.resource||null==n.resource.schema.custom_actions?null:n.resource.schema.custom_actions.length)>0),V(3),U("ngForOf",(null==n.resource?null:n.resource.schema.custom_actions)||Rs(3,Lme)))},dependencies:[lo,_i,Fs,XM,gR,Eme,eE,Ime],styles:["[_nghost-%COMP%]{display:flex}"]}),i})();const Nme=["class","block-ui"];function Bme(i,t){if(1&i&&(G(0,"mat-label",7),Be(1),j()),2&i){const e=re();U("matTooltip",e.resourceDescription),V(1),Qi("",null==e.resource?null:e.resource.name," ")}}function Ume(i,t){if(1&i&&(G(0,"audio",8),Ie(1,"source",9),ct(2,"async"),Be(3," Your browser does not support the audio element. "),j()),2&i){const e=re();V(1),U("src",ut(2,1,e.audioUrl$),Np)}}function Vme(i,t){1&i&&Ie(0,"mat-spinner",10)}function zme(i,t){1&i&&Ie(0,"app-block-actions",11),2&i&&U("resource",re().resource)}const Hme=function(){return["wave_data"]};let $me=(()=>{class i{constructor(e,n){this.eelDelegate=e,this.main=n,this._resource$=new Qe(null),this.audioUrl$=new Qe(null),this.resourceDescription="",this.hideBlockActions=!1,this.destroyed$=new Te,this.changed=new $e}set resource(e){this._resource$.next(e)}get resource(){return this._resource$.getValue()}ngAfterViewInit(){var e=this;return nt(function*(){e._resource$.pipe(Ue(e.destroyed$)).subscribe(function(){var n=nt(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)(E(Jl),E(Fa))},i.\u0275cmp=ot({type:i,selectors:[["app-eacs-audio",8,"block-ui"]],inputs:{resource:"resource",resourceDescription:"resourceDescription",hideBlockActions:"hideBlockActions"},outputs:{changed:"changed"},attrs:Nme,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&&(G(0,"div",0),fe(1,Bme,2,2,"mat-label",1),ct(2,"async"),fe(3,Ume,4,3,"audio",2),ct(4,"async"),fe(5,Vme,1,0,"mat-spinner",3),ct(6,"async"),Ie(7,"div",4),fe(8,zme,1,1,"app-block-actions",5),j(),Ie(9,"app-compound-block-ui",6),ct(10,"async")),2&e){let r;V(1),U("ngIf",(null==n.resource?null:n.resource.name)&&(null==n.resource?null:n.resource.name)!=(null==(r=ut(2,7,n.main.resource$))?null:r.name)),V(2),U("ngIf",ut(4,9,n.audioUrl$)),V(2),U("ngIf",n.resource&&!ut(6,11,n.audioUrl$)),V(3),U("ngIf",!n.hideBlockActions),V(1),U("resource",ut(10,13,n._resource$))("hideBlockActions",!0)("fieldBlacklist",Rs(15,Hme))}},dependencies:[_i,Ro,Fs,e0,ec,nE,Xo],styles:["#header[_ngcontent-%COMP%]{display:flex}"]}),i})();class Gme{constructor(t,e){this.mesh=t,this.assetsPath=e,this.textures=[],this.tyreTextureUpdateTimer=void 0,this.tyreMaterial=null,this.tyreTextures=[],this._color=65280,this._speed="idle",this._steeringAngle=0,this.wheels=[],this.wheelIdlePositions=[],this.frontWheels=[];let n=new Set;if(t.traverse(r=>{if(!(r instanceof Mn))return;let s=-1;if(r.name.startsWith("part_hp_12")?s=0:r.name.startsWith("part_hp_14")?s=1:r.name.startsWith("part_hp_16")?s=2:r.name.startsWith("part_hp_18")&&(s=3),s>-1){r.geometry.boundingBox||r.geometry.computeBoundingBox();let a=Re.avg(r.geometry.boundingBox.min,r.geometry.boundingBox.max);return(0==s||2==s)&&(a={x:a.x,y:a.y,z:a.z+1.5}),r.geometry.translate(...Re.spr(Re.neg(a))),r.position.set(...Re.spr(a)),this.wheelIdlePositions[s]=a,this.wheels.push(r),void(s<2&&this.frontWheels.push(r))}const o=r.material.map;o&&n.add(o)}),this.textures=Array.from(n).map(r=>{const s=new Oo(document.createElement("img"));return s.flipY=r.flipY,oa(s),[r,s]}),t.traverse(r=>{if(!(r instanceof Mn))return;const s=r.material.map;if(s){const o=this.textures.find(([a,l])=>a===s);o&&(r.material.map=o[1])}}),this.hasWheels){const r=new Pu;this.tyreTextures=[0,1,2,3].map(s=>r.load(`${e}/m${s}00.png`));for(const s of this.tyreTextures)oa(s);this.tyreMaterial=new qi({map:this.tyreTextures[0]}),this.tyreMaterial.transparent=!0,this.tyreMaterial.alphaTest=.5,this.tyreMaterial.map.wrapS=er,this.tyreMaterial.map.wrapT=er,this.tyreMaterial.polygonOffset=!0,this.tyreMaterial.polygonOffsetFactor=-4;for(const s of this.wheels)s.material=this.tyreMaterial}this.color=65280,this.recolorCar().then()}get color(){return this._color}set color(t){t!==this._color&&(this._color=t,this.recolorCar().then())}get speed(){return this._speed}set speed(t){if(t!==this._speed){switch(this._speed=t,this.tyreTextureUpdateTimer&&clearInterval(this.tyreTextureUpdateTimer),t){case"idle":this.tyreMaterial.map=this.tyreTextures[0];break;case"slow":let e=!0;this.tyreTextureUpdateTimer=setInterval(()=>{this.tyreMaterial.map=this.tyreTextures[e?1:2],this.tyreMaterial.needsUpdate=!0,e=!e},16);break;case"fast":this.tyreMaterial.map=this.tyreTextures[3]}this.tyreMaterial.needsUpdate=!0}}get steeringAngle(){return this._steeringAngle}set steeringAngle(t){if(t!==this._steeringAngle){this._steeringAngle=t;for(const e of this.frontWheels)e.rotation.set(0,0,t)}}get hasWheels(){return this.wheels.length>0}recolorCar(){var t=this;return nt(function*(){const[e,n,r]=[t.color>>16,t.color>>8&255,255&t.color];for(const[s,o]of t.textures){for(let a=100;a>0&&!s.source.data;a--)yield pG(50);mG(s.source.data,(a,l)=>{if(a[l]+a[l+2]{class i{constructor(e,n,r){this.eelDelegate=e,this.main=n,this.cdr=r,this._resource$=new Qe(null),this.changed=new $e,this.customControls=[],this.previewPaths$=new Qe(null),this.destroyed$=new Te,this.serializerSettings={geometry__save_obj:!0,geometry__save_blend:!1,geometry__export_to_gg_web_engine:!1}}get resource(){return this._resource$.getValue()}set resource(e){this._resource$.next(e)}ngAfterViewInit(){var e=this;return nt(function*(){e._resource$.pipe(Ue(e.destroyed$)).subscribe(function(){var n=nt(function*(r){e.previewPaths$.next(yield e.loadPreviewFilePaths(r?.id))});return function(r){return n.apply(this,arguments)}}()),e.main.dataBlockChange$.pipe(Ue(e.destroyed$),gn(([n,r])=>!!e.resource&&n.startsWith(e.resource.id)),gl(1500)).subscribe(nt(function*(){e.previewPaths$.next(null),e.previewPaths$.next(yield e.postTmpUpdates(e.resource?.id))}))})()}onObjectLoaded(e){var n=this;return nt(function*(){try{const r=new Gme(e,n.previewPaths$.value[0].substring(0,n.previewPaths$.value[0].lastIndexOf("/"))+"/assets");let s=null;const o=a=>{s&&clearTimeout(s),s=setTimeout(()=>r.color=a,50)};n.customControls=[{title:"NFS2 car features",controls:[{label:"Car color",type:"color",value:65280,change:a=>o(a)}]}],r.hasWheels&&n.customControls[0].controls.push({label:"Car speed",type:"radio",options:["idle","slow","fast"],value:"idle",change:a=>{r.speed=a}},{label:"Steering angle",type:"slider",minValue:-.7,maxValue:.7,valueStep:.05,value:0,change:a=>{r.steeringAngle=a}}),n.cdr.markForCheck()}catch(r){console.error(r)}})()}postTmpUpdates(e){var n=this;return nt(function*(){if(e){const r=yield n.eelDelegate.serializeResourceTmp(e,Object.entries(n.main.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 nt(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)(E(Jl),E(Fa),E(Qn))},i.\u0275cmp=ot({type:i,selectors:[["app-geo-geometry",8,"block-ui"]],inputs:{resource:"resource"},outputs:{changed:"changed"},attrs:Wme,decls:4,vars:8,consts:[[3,"paths","groupFunction","customControls","onObjectLoaded"],[3,"resource",4,"ngIf"],[3,"resource"]],template:function(e,n){1&e&&(G(0,"app-obj-viewer",0),Oe("onObjectLoaded",function(s){return n.onObjectLoaded(s)}),ct(1,"async"),j(),fe(2,jme,2,3,"app-compound-block-ui",1),ct(3,"async")),2&e&&(U("paths",ut(1,4,n.previewPaths$))("groupFunction",n.previewObjectGroupFunc)("customControls",n.customControls),V(2),U("ngIf",!ut(3,6,n.main.hideHiddenFields$)))},dependencies:[_i,ec,hG,Xo],changeDetection:0}),i})();const qme=function(){return["children","items_descr"]};let Xme=(()=>{class i{constructor(){this._resource=null,this.hideBlockActions=!1,this.resourceMap={},this.changed=new $e}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:sc(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=ot({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&&Ie(0,"app-compound-block-ui",0)(1,"app-sidenav-res-list",1),2&e&&(U("resource",n.resource)("hideBlockActions",n.hideBlockActions)("fieldBlacklist",Rs(4,qme)),V(1),U("resources",n.resourceMap))},dependencies:[ec,xC],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})();const Kme=["previewCanvasContainer"],Zme=["previewCanvas"];function Qme(i,t){1&i&&Ie(0,"mat-spinner",16),2&i&&U("diameter",40)}function Jme(i,t){1&i&&Ie(0,"mat-spinner",17)}const ege=function(){return[]};var Tf=(()=>{return(i=Tf||(Tf={})).ThreeModel="model",i.Bitmap="bitmap",i.TwoSidedBitmap="two_sided_bitmap",Tf;var i})();class tge extends QH{constructor(t,e,n){super(t,{loadDepth:40,inertia:2}),this.mapGraph=t,this.qfsPath=e,this.hideUnknownEntities$=n,this.textureLoader=new Pu,this.terrainMaterials={},this.objLoader=new Jb,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(Ql(),Ue(this._onRemoved$)).subscribe(e=>{for(const n of this.unknownEntities)n.visible=!e})}getPlaceholderTexture(){var t=this;return nt(function*(){return t._placeholder?t._placeholder:(t._placeholderPromise||(t._placeholderPromise=t.textureLoader.loadAsync("assets/placeholder_texture.png")),t._placeholderPromise)})()}getPlaceholderTerrainTexture(){var t=this;return nt(function*(){return t._placeholderTerrain?t._placeholderTerrain:(t._placeholderTerrainPromise||(t._placeholderTerrainPromise=t.textureLoader.loadAsync("assets/placeholder_texture.png").then(e=>(e.wrapS=Bs,e.wrapT=Bs,oa(e),e))),t._placeholderTerrainPromise)})()}loadChunk(t){var e=this;return nt(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 Mn&&(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:Re.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:Yi.fromAngle(Re.nZ,l.rotation)}));const o=(yield Promise.all(s.map(l=>e.loadPropInternal(l)))).filter(l=>!!l),a=new ea({object3D:new sa(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 qi({side:Ns,transparent:!0,visible:!1}),this.qfsPath?this.textureLoader.loadAsync(`${this.qfsPath}/${t}.png`).then(e=>{e.wrapS=Bs,e.wrapT=Bs,oa(e),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 nt(function*(){let n=!1;if(t.type==Tf.ThreeModel){let r;try{if(!e.qfsPath)throw new Error;const o=new xO,a=new Jb,l=yield o.loadAsync(`${e.qfsPath}/props/${t.data.data.resource_id}/0/material.mtl`);l.preload(),a.setMaterials(l),r=new sa(yield a.loadAsync(`${e.qfsPath}/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 Mn){const a=o.material instanceof Array?o.material:[o.material];for(const l of a)l.transparent=!0,l.alphaTest=.5,l instanceof qi&&l.map&&(l.map.wrapS=Bs,l.map.wrapT=Bs,oa(l.map),l.map.needsUpdate=!0)}});const s=new ea({object3D: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==Tf.Bitmap||t.type==Tf.TwoSidedBitmap){const r=(c,d)=>new Array(d).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 No,[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==Tf.TwoSidedBitmap){const[c,d]=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 ea({object3D:new sa(s)});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 nt(function*(){const s=t.split(";"),o=yield r.getPlaceholderTexture();let a=!1,l=[];r.qfsPath?l=yield Promise.all(s.map(h=>r.textureLoader.loadAsync(`${r.qfsPath}/foreground/${h}.png`).catch(()=>(a=!0,o)))):(a=!0,l=s.map(()=>o));const c=l.map(h=>(oa(h),new qi({map:h,alphaTest:.5,transparent:!0,side:Ns}))),d=new Mn(new Iu(e.x,e.y),c[0]);if(d.rotateX(Math.PI/2),d.position.set(0,0,e.y/2),c.length>1){let h=-1;Ym(r.world).pipe(o4(n&&!isNaN(+n)?1e3*+n:250)).subscribe(()=>{h=(h+1)%c.length,d.material=c[h]})}return[d,a]})()}}let nge=(()=>{class i{constructor(e,n,r){this.eelDelegate=e,this.cdr=n,this.mainService=r,this._resource$=new Qe(null),this.changed=new $e,this.previewLoading$=new Qe(!0),this.previewQfsLocation$=new Qe(null),this.previewQfsLoading$=new Qe(!1),this.pointer$=new Qe(null),this.selectedSplineIndex$=new Qe(0),this.qfsPath=null,this.name="",this.renderer=null,this.map=null,this.roadPath=null,this.destroyed$=new Te}get resource(){return this._resource$.getValue()}set resource(e){this._resource$.next(e)}ngAfterViewInit(){var e=this;return nt(function*(){var s;e.world=new ok(new yO,{init:(s=nt(function*(){}),function(){return s.apply(this,arguments)}),simulate:()=>{},loader:{loadFromGgGlb:function(){var s=nt(function*(...o){return[]});return function(){return s.apply(this,arguments)}}()}}),yield e.world.init(),e.skySphere=new ea({object3D:e.world.visualScene.factory.createPrimitive({shape:"SPHERE",radius:1e3},{color:16777215})}),e.skySphere.object3D.nativeMesh.material.side=Ns,e.world.addEntity(e.skySphere),e.selectionSphere=new ea({object3D: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 GS(16777215,2));let n=new Qe({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=Yi.lookAt(e.renderer.camera.position,Re.add(e.renderer.camera.position,Re.Y),Re.Z),Ym(e.world).pipe(Ue(e.destroyed$)).subscribe(()=>{e.renderer&&(e.skySphere.position=e.renderer.camera.position,e.pointer$.next(e.renderer.camera.position))}),e.controller=new n4(e.world.keyboardInput,e.renderer,{mouseOptions:{canvas:e.previewCanvas.nativeElement,pointerLock:!0},keymap:"wasd+arrows",cameraLinearSpeed:40,cameraBoostMultiplier:4,cameraMovementElasticity:100,cameraRotationElasticity:30,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(Ue(e.destroyed$)).subscribe(function(){var s=nt(function*(o){e.roadPath=e.resource?.data.block_positions.map(a=>({x:a.x,y:a.z,z:a.y})),e.previewLoading$.next(!0),o?(e.previewQfsLocation$.next(o.id.substring(0,o.id.indexOf(".TRK"))+"0.QFS"),yield e.loadTerrainChunks(o.id),yield e.onQfsSelected(e.previewQfsLocation$.value)):(yield e.loadTerrainChunks(),yield e.loadPreview()),e.previewLoading$.next(!1)});return function(o){return s.apply(this,arguments)}}()),e.mainService.dataBlockChange$.pipe(Ue(e.destroyed$),gn(([s,o])=>!!e.resource&&s.startsWith(e.resource.id)),gl(3e3)).subscribe(nt(function*(){e.roadPath=e.resource?.data.block_positions.map(s=>({x:s.x,y:s.z,z:s.y})),e.previewLoading$.next(!0),yield e.postTmpUpdates(e.resource?.id),yield e.loadPreview(),e.previewLoading$.next(!1)})),e.selectedSplineIndex$.pipe(Ue(e.destroyed$),gl(250)).subscribe(s=>{if(e.resource){let o=e.resource.data.block_positions[s];if(!o)return;o={x:o.x,y:o.z,z:o.y},e.selectionSphere.position=o,e.renderer&&(e.renderer.position=Re.add(o,Re.rotAround({x:10,y:-12,z:5},{x:0,y:0,z:1},-0)),e.renderer.rotation=Yi.lookAt(e.renderer.position,o,{x:0,y:0,z:1}),e.controller.reset())}})})()}onQfsSelected(e){var n=this;return nt(function*(){if(n.qfsPath!=e){n.previewQfsLoading$.next(!0);try{const r=yield n.eelDelegate.serializeResource(e),s=new Pu,o=r.find(a=>a.endsWith("spherical.png"));if(o){const a=yield s.loadAsync(o);a.colorSpace="srgb",a.mapping=cc,n.skySphere.object3D.nativeMesh.material.map=a}else n.skySphere.object3D.nativeMesh.material.map=null;n.skySphere.object3D.nativeMesh.material.needsUpdate=!0,n.qfsPath=e}catch{n.skySphere.object3D.nativeMesh.material.map=null,n.skySphere.object3D.nativeMesh.material.needsUpdate=!0,n.qfsPath=null}finally{n.previewQfsLoading$.next(!1)}yield n.loadPreview()}})()}loadTerrainChunks(e){var n=this;return nt(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})()}onPointerChange(e){this.renderer&&(this.renderer.position=e)}loadPreview(){var e=this;return nt(function*(){if(!e.terrainChunksObjLocation||!e.roadPath)return;const n=Km.fromMapArray(e.roadPath.map((r,s)=>({path:`${e.terrainChunksObjLocation}terrain_chunk_${s}`,position:r,loadOptions:{}}))||[],!0);e.unloadPreview(),e.map=new tge(n,e.qfsPath&&"resources/"+e.qfsPath,e.mainService.hideHiddenFields$),e.map.resource=e.resource,e.map.isOpenedTrack=!1,Ym(e.world).pipe(Ue(e.destroyed$)).subscribe(()=>{e.map&&e.renderer&&e.map.loaderCursor$.next(e.renderer.position)}),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 nt(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)(E(Jl),E(Qn),E(Fa))},i.\u0275cmp=ot({type:i,selectors:[["app-trk-map-block-ui"]],viewQuery:function(e,n){if(1&e&&($n(Kme,5),$n(Zme,5)),2&e){let r;At(r=Dt())&&(n.previewCanvasContainer=r.first),At(r=Dt())&&(n.previewCanvas=r.first)}},inputs:{resource:"resource"},outputs:{changed:"changed"},decls:32,vars:26,consts:[[1,"qfsSelector"],["appearance","fill"],["matInput","","type","text",3,"value"],["customQfsInput",""],["mat-button","",3,"click"],["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","projection","pointerChange"],[3,"resource"],["mode","indeterminate",3,"diameter"],["mode","indeterminate"]],template:function(e,n){if(1&e){const r=jn();G(0,"div",0)(1,"h4"),Be(2,"Preview QFS file"),j(),G(3,"mat-form-field",1)(4,"mat-label"),Be(5,"Custom QFS path"),j(),Ie(6,"input",2,3),ct(8,"async"),j(),G(9,"button",4),Oe("click",function(){Vt(r);const o=Zi(7);return Et(n.onQfsSelected(o.value))}),Be(10,"LOAD"),j(),fe(11,Qme,1,1,"mat-spinner",5),ct(12,"async"),j(),G(13,"div",6)(14,"div",7,8),Ie(16,"canvas",9,10),fe(18,Jme,1,0,"mat-spinner",11),ct(19,"async"),j(),G(20,"div",12,8)(22,"mat-form-field",1)(23,"mat-label"),Be(24,"Spline item"),j(),G(25,"input",13),Oe("ngModelChange",function(o){return n.selectedSplineIndex$.next(o)}),ct(26,"async"),ct(27,"async"),j()(),G(28,"app-minimap",14),Oe("pointerChange",function(o){return n.onPointerChange(o)}),ct(29,"async"),j()()(),Ie(30,"app-compound-block-ui",15),ct(31,"async")}if(2&e){let r;V(6),U("value",ut(8,11,n.previewQfsLocation$)),V(5),U("ngIf",ut(12,13,n.previewQfsLoading$)),V(7),U("ngIf",ut(19,15,n.previewLoading$)),V(7),U("min",0)("max",4*(null==(r=ut(26,17,n._resource$))?null:r.data.num_blocks)-1)("ngModel",ut(27,19,n.selectedSplineIndex$)),V(3),U("roadSpline",n.roadPath||Rs(25,ege))("pointer",ut(29,21,n.pointer$))("splineClosed",!0)("projection","nz"),V(2),U("resource",ut(31,23,n._resource$))}},dependencies:[_i,_l,mu,nc,_u,gu,Zc,yl,Ro,rc,rb,e0,ec,fG,Xo],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-minimap[_ngcontent-%COMP%]{flex-grow:1;display:flex}.qfsSelector[_ngcontent-%COMP%]{display:flex;align-items:center;width:100%;column-gap:1rem}.qfsSelector[_ngcontent-%COMP%] h4[_ngcontent-%COMP%]{min-width:-moz-fit-content;min-width:fit-content}.qfsSelector[_ngcontent-%COMP%] mat-form-field[_ngcontent-%COMP%]{flex-grow:1}.qfsSelector[_ngcontent-%COMP%] mat-spinner[_ngcontent-%COMP%], .qfsSelector[_ngcontent-%COMP%] button[_ngcontent-%COMP%]{margin-bottom:1.34375em}"],changeDetection:0}),i})();function ige(i,t){if(1&i&&(G(0,"mat-error"),Be(1),j()),2&i){const e=re(2);V(1),Dh(" ",e.resourceError.data.error_class,": ",e.resourceError.data.error_text," ")}}function rge(i,t){1&i&&Ie(0,"mat-spinner",5)}function sge(i,t){if(1&i&&(G(0,"div",2),fe(1,ige,2,2,"mat-error",3),fe(2,rge,1,0,"mat-spinner",4),j()),2&i){const e=re();V(1),U("ngIf",e.resourceError),V(1),U("ngIf",!e.resourceError)}}function oge(i,t){}let n0=(()=>{class i{constructor(e,n){this.mainService=e,this.deep=n,this._component=null,this._componentChangedSub=null,this.destroyed$=new Te,this.resourceSet$=new Te,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)}resourceEqual(e,n){return e&&n?e.id===n.id&&this.deep.deepEquals(e.data,n.data):!e==!n}set resource(e){if(!this.resourceEqual(e,this._resourceError||this._resource)&&(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(Ue(this.destroyed$),Ue(this.resourceSet$)).subscribe(()=>{const s=this._resource.id,o=this._resource.data;if(o instanceof Array)if(this._resource.schema.block_class_mro.startsWith("BytesBlock"))this.mainService.dataBlockChange$.next([s,o]);else 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 age(i,t){1&i&&Ie(0,"mat-icon",17)}function lge(i,t){1&i&&Ie(0,"mat-icon",18)}let cge=(()=>{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 nt(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 nt(function*(){if(e.mainService.hasUnsavedChanges){let n=e.dialog.open(SV,{data:{text:"There are unsaved changes, which will be lost. Are you sure you want to reload file?"}});if(!(yield lR(n.afterClosed())))return}yield e.mainService.reloadResource(),e.cdr.markForCheck()})()}}return i.\u0275fac=function(e){return new(e||i)(E(Jl),E(Fa),E(Bm),E(RV),E(Qn))},i.\u0275cmp=ot({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&&(G(0,"mat-toolbar",0)(1,"span"),Be(2),ct(3,"async"),ct(4,"async"),j(),Ie(5,"span",1),G(6,"button",2),Oe("click",function(){return n.toggleUnknownsVisibility()}),fe(7,age,1,0,"mat-icon",3),ct(8,"async"),fe(9,lge,1,0,"mat-icon",4),ct(10,"async"),j(),Ie(11,"mat-divider",5)(12,"app-block-actions",6),ct(13,"async"),G(14,"button",7),Oe("click",function(){return n.reloadResource()}),ct(15,"async"),Ie(16,"mat-icon",8),j(),Ie(17,"mat-divider",5),G(18,"button",9),Oe("click",function(){return n.saveResource()}),ct(19,"async"),ct(20,"async"),Ie(21,"mat-icon",10),j()(),G(22,"div",11),Ie(23,"div",12)(24,"app-editor",13),ct(25,"async"),ct(26,"async"),ct(27,"async"),G(28,"div",14)(29,"a",15),Ie(30,"img",16),j()(),Ie(31,"div",12),j()),2&e){let r;V(2),Dh("",(null==(r=ut(3,9,n.mainService.resource$))?null:r.name)||"...","",ut(4,11,n.mainService.hasUnsavedChanges$)?"*":"",""),V(5),U("ngIf",ut(8,13,n.mainService.hideHiddenFields$)),V(2),U("ngIf",!ut(10,15,n.mainService.hideHiddenFields$)),V(3),U("resource",ut(13,17,n.mainService.resource$)),V(2),U("disabled",!ut(15,19,n.mainService.eelDelegate.openedResourcePath$)),V(4),U("disabled",!ut(19,21,n.mainService.resource$)||!ut(20,23,n.mainService.hasUnsavedChanges$)),V(6),U("resource",ut(25,25,n.mainService.customActionRunning$)?null:ut(26,27,n.mainService.resource$)||ut(27,29,n.mainService.error$))("hideBlockActions",!0)}},dependencies:[_i,CJ,EJ,Fs,XM,gR,n0,nE,Xo],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 MG(i){return new pe(3e3,!1)}function Gge(){return typeof window<"u"&&typeof window.document<"u"}function MO(){return typeof process<"u"&&"[object process]"==={}.toString.call(process)}function Nu(i){switch(i.length){case 0:return new nb;case 1:return i[0];default:return new aV(i)}}function CG(i,t,e,n,r=new Map,s=new Map){const o=[],a=[];let l=-1,c=null;if(n.forEach(d=>{const h=d.get("offset"),p=h==l,m=p&&c||new Map;d.forEach((g,b)=>{let v=b,y=g;if("offset"!==b)switch(v=t.normalizePropertyName(v,o),y){case rR:y=r.get(b);break;case Kc: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 kge(i){return new pe(3502,!1)}();return a}function CO(i,t,e,n){switch(t){case"start":i.onStart(()=>n(e&&SO(e,"start",i)));break;case"done":i.onDone(()=>n(e&&SO(e,"done",i)));break;case"destroy":i.onDestroy(()=>n(e&&SO(e,"destroy",i)))}}function SO(i,t,e){const s=EO(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 EO(i,t,e,n,r="",s=0,o){return{element:i,triggerName:t,fromState:e,toState:n,phaseName:r,totalTime:s,disabled:!!o}}function aa(i,t,e){let n=i.get(t);return n||i.set(t,n=e),n}function SG(i){const t=i.indexOf(":");return[i.substring(1,t),i.slice(t+1)]}let AO=(i,t)=>!1,EG=(i,t,e)=>[],AG=null;function DO(i){const t=i.parentNode||i.host;return t===AG?null:t}(MO()||typeof Element<"u")&&(Gge()?(AG=(()=>document.documentElement)(),AO=(i,t)=>{for(;t;){if(t===i)return!0;t=DO(t)}return!1}):AO=(i,t)=>i.contains(t),EG=(i,t,e)=>{if(e)return Array.from(i.querySelectorAll(t));const n=i.querySelector(t);return n?[n]:[]});let If=null,DG=!1;const TG=AO,IG=EG;let RG=(()=>{class i{validateStyleProperty(e){return function jge(i){If||(If=function Yge(){return typeof document<"u"?document.body:null}()||{},DG=!!If.style&&"WebkitAppearance"in If.style);let t=!0;return If.style&&!function Wge(i){return"ebkit"==i.substring(1,6)}(i)&&(t=i in If.style,!t&&DG&&(t="Webkit"+i.charAt(0).toUpperCase()+i.slice(1)in If.style)),t}(e)}matchesElement(e,n){return!1}containsElement(e,n){return TG(e,n)}getParentElement(e){return DO(e)}query(e,n,r){return IG(e,n,r)}computeStyle(e,n,r){return r||""}animate(e,n,r,s,o,a=[],l){return new nb(r,s)}}return i.\u0275fac=function(e){return new(e||i)},i.\u0275prov=Pe({token:i,factory:i.\u0275fac}),i})(),TO=(()=>{class i{}return i.NOOP=new RG,i})();const qge=1e3,IO="ng-enter",iE="ng-leave",rE="ng-trigger",sE=".ng-trigger",PG="ng-animating",RO=".ng-animating";function fd(i){if("number"==typeof i)return i;const t=i.match(/^(-?[\.\d]+)(m?s)/);return!t||t.length<2?0:kO(parseFloat(t[1]),t[2])}function kO(i,t){return"s"===t?i*qge:i}function oE(i,t,e){return i.hasOwnProperty("duration")?i:function Kge(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(MG()),{duration:0,delay:0,easing:""};r=kO(parseFloat(a[1]),a[2]);const l=a[3];null!=l&&(s=kO(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 dge(){return new pe(3100,!1)}()),a=!0),s<0&&(t.push(function uge(){return new pe(3101,!1)}()),a=!0),a&&t.splice(l,0,MG())}return{duration:r,delay:s,easing:o}}(i,t,e)}function r0(i,t={}){return Object.keys(i).forEach(e=>{t[e]=i[e]}),t}function OG(i){const t=new Map;return Object.keys(i).forEach(e=>{t.set(e,i[e])}),t}function Bu(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 LG(i,t,e){return e?t+":"+e+";":""}function NG(i){let t="";for(let e=0;e{const s=OO(r);e&&!e.has(r)&&e.set(r,i.style[s]),i.style[s]=n}),MO()&&NG(i))}function Rf(i,t){i.style&&(t.forEach((e,n)=>{const r=OO(n);i.style[r]=""}),MO()&&NG(i))}function s0(i){return Array.isArray(i)?1==i.length?i[0]:rV(i):i}const PO=new RegExp("{{\\s*(.+?)\\s*}}","g");function BG(i){let t=[];if("string"==typeof i){let e;for(;e=PO.exec(i);)t.push(e[1]);PO.lastIndex=0}return t}function o0(i,t,e){const n=i.toString(),r=n.replace(PO,(s,o)=>{let a=t[o];return null==a&&(e.push(function fge(i){return new pe(3003,!1)}()),a=""),a.toString()});return r==n?i:r}function aE(i){const t=[];let e=i.next();for(;!e.done;)t.push(e.value),e=i.next();return t}const Jge=/-+([a-z0-9])/g;function OO(i){return i.replace(Jge,(...t)=>t[1].toUpperCase())}function e_e(i){return i.replace(/([a-z])([A-Z])/g,"$1-$2").toLowerCase()}function la(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 pge(i){return new pe(3004,!1)}()}}function UG(i,t){return window.getComputedStyle(i)[t]}const dE="*";function o_e(i,t){const e=[];return"string"==typeof i?i.split(/\s*,\s*/).forEach(n=>function a_e(i,t,e){if(":"==i[0]){const l=function l_e(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 Age(i){return new pe(3015,!1)}()),t;const r=n[1],s=n[2],o=n[3];t.push(VG(r,o));"<"==s[0]&&!(r==dE&&o==dE)&&t.push(VG(o,r))}(n,e,t)):e.push(i),e}const uE=new Set(["true","1"]),hE=new Set(["false","0"]);function VG(i,t){const e=uE.has(i)||hE.has(i),n=uE.has(t)||hE.has(t);return(r,s)=>{let o=i==dE||i==r,a=t==dE||t==s;return!o&&e&&"boolean"==typeof r&&(o=r?uE.has(i):hE.has(i)),!a&&n&&"boolean"==typeof s&&(a=s?uE.has(t):hE.has(t)),o&&a}}const c_e=new RegExp("s*:selfs*,?","g");function FO(i,t,e,n){return new d_e(i).build(t,e,n)}class d_e{constructor(t){this._driver=t}build(t,e,n){const r=new f_e(e);return this._resetContextStyleTimingState(r),la(this,s0(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 gge(){return new pe(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(d=>{l.name=d,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 _ge(){return new pe(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=>{BG(l).forEach(c=>{o.hasOwnProperty(c)||s.add(c)})})}),s.size&&(aE(s.values()),e.errors.push(function vge(i,t){return new pe(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=la(this,s0(t.animation),e);return{type:1,matchers:o_e(t.expr,e.errors),animation:n,queryCount:e.queryCount,depCount:e.depCount,options:kf(t.options)}}visitSequence(t,e){return{type:2,steps:t.steps.map(n=>la(this,n,e)),options:kf(t.options)}}visitGroup(t,e){const n=e.currentTime;let r=0;const s=t.steps.map(o=>{e.currentTime=n;const a=la(this,o,e);return r=Math.max(r,e.currentTime),a});return e.currentTime=r,{type:3,steps:s,options:kf(t.options)}}visitAnimate(t,e){const n=function m_e(i,t){if(i.hasOwnProperty("duration"))return i;if("number"==typeof i)return LO(oE(i,t).duration,0,"");const e=i;if(e.split(/\s+/).some(s=>"{"==s.charAt(0)&&"{"==s.charAt(1))){const s=LO(0,0,"");return s.dynamic=!0,s.strValue=e,s}const r=oE(e,t);return LO(r.duration,r.delay,r.easing)}(t.timings,e.errors);e.currentAnimateTimings=n;let r,s=t.styles?t.styles:oi({});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=oi(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===Kc?n.push(a):e.errors.push(new pe(3002,!1)):n.push(OG(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),d=c.get(l);let h=!0;d&&(s!=r&&s>=d.startTime&&r<=d.endTime&&(e.errors.push(function bge(i,t,e,n,r){return new pe(3010,!1)}()),h=!1),s=d.startTime),h&&c.set(l,{startTime:s,endTime:r}),e.options&&function Qge(i,t,e){const n=t.params||{},r=BG(i);r.length&&r.forEach(s=>{n.hasOwnProperty(s)||e.push(function hge(i){return new pe(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 xge(){return new pe(3011,!1)}()),n;let s=0;const o=[];let a=!1,l=!1,c=0;const d=t.steps.map(y=>{const M=this._makeStyleAst(y,e);let x=null!=M.offset?M.offset:function p_e(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:la(this,s0(t.animation),e),options:kf(t.options)}}visitAnimateChild(t,e){return e.depCount++,{type:9,options:kf(t.options)}}visitAnimateRef(t,e){return{type:10,animation:this.visitReference(t.animation,e),options:kf(t.options)}}visitQuery(t,e){const n=e.currentQuerySelector,r=t.options||{};e.queryCount++,e.currentQuery=t;const[s,o]=function u_e(i){const t=!!i.split(/\s*,\s*/).find(e=>":self"==e);return t&&(i=i.replace(c_e,"")),i=i.replace(/@\*/g,sE).replace(/@\w+/g,e=>sE+"-"+e.slice(1)).replace(/:animating/g,RO),[i,t]}(t.selector);e.currentQuerySelector=n.length?n+" "+s:s,aa(e.collectedStyles,e.currentQuerySelector,new Map);const a=la(this,s0(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:kf(t.options)}}visitStagger(t,e){e.currentQuery||e.errors.push(function Sge(){return new pe(3013,!1)}());const n="full"===t.timings?{duration:0,delay:0,easing:"full"}:oE(t.timings,e.errors,!0);return{type:12,animation:la(this,s0(t.animation),e),timings:n,options:null}}}class f_e{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 kf(i){return i?(i=r0(i)).params&&(i.params=function h_e(i){return i?r0(i):null}(i.params)):i={},i}function LO(i,t,e){return{duration:i,delay:t,easing:e}}function NO(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 fE{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 v_e=new RegExp(":enter","g"),b_e=new RegExp(":leave","g");function BO(i,t,e,n,r,s=new Map,o=new Map,a,l,c=[]){return(new x_e).buildKeyframes(i,t,e,n,r,s,o,a,l,c)}class x_e{buildKeyframes(t,e,n,r,s,o,a,l,c,d=[]){c=c||new fE;const h=new UO(t,e,c,r,s,d,[]);h.options=l;const p=l.delay?fd(l.delay):0;h.currentTimeline.delayNextStep(p),h.currentTimeline.setStyles([o],null,h.errors,l),la(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()):[NO(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:fd(o0(s,r?.params??{},e.errors));n.delayNextStep(o)}}}_visitSubInstructions(t,e,n){let s=e.currentTimeline.currentTime;const o=null!=n.duration?fd(n.duration):null,a=null!=n.delay?fd(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),la(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=pE);const o=fd(s.delay);r.delayNextStep(o)}t.steps.length&&(t.steps.forEach(o=>la(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?fd(t.options.delay):0;t.steps.forEach(o=>{const a=e.createSubContext(t.options);s&&a.delayNextStep(s),la(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 oE(e.params?o0(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?fd(r.delay):0;s&&(6===e.previousNode.type||0==n&&e.currentTimeline.hasCurrentStyleProperties())&&(e.currentTimeline.snapshotCurrentStyles(),e.previousNode=pE);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,d)=>{e.currentQueryIndex=d;const h=e.createSubContext(t.options,c);s&&h.delayNextStep(s),c===e.element&&(l=h.currentTimeline),la(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 d=e.currentTimeline;l&&d.delayNextStep(l);const h=d.currentTime;la(this,t.animation,e),e.previousNode=t,n.currentStaggerTime=r.currentTime-h+(r.startTime-n.currentTimeline.startTime)}}const pE={};class UO{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=pE,this.subContextCount=0,this.options={},this.currentQueryIndex=0,this.currentQueryTotal=0,this.currentStaggerTime=0,this.currentTimeline=l||new mE(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=fd(n.duration)),null!=n.delay&&(r.delay=fd(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]=o0(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 UO(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=pE,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 w_e(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(v_e,"."+this._enterClassName)).replace(b_e,"."+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 Ege(i){return new pe(3014,!1)}()),a}}class mE{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 mE(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||Kc),this._currentKeyframe.set(e,Kc);this._currentEmptyStepKeyframe=this._currentKeyframe}setStyles(t,e,n,r){e&&this._previousKeyframe.set("easing",e);const s=r&&r.params||{},o=function M_e(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,Kc)}else Bu(r,e)}),e}(t,this._globalTimelineStyles);for(let[a,l]of o){const c=o0(l,s,n);this._pendingStyles.set(a,c),this._localTimelineStyles.has(a)||this._backFill.set(a,this._globalTimelineStyles.get(a)??Kc),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=Bu(a,new Map,this._backFill);c.forEach((d,h)=>{d===rR?t.add(h):d===Kc&&e.add(h)}),n||c.set("offset",l/this.duration),r.push(c)});const s=t.size?aE(t.values()):[],o=e.size?aE(e.values()):[];if(n){const a=r[0],l=new Map(a);a.set("offset",0),l.set("offset",1),r=[a,l]}return NO(this.element,r,s,o,this.duration,this.startTime,this.easing,!1)}}class w_e extends mE{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=Bu(t[0]);l.set("offset",0),s.push(l);const c=Bu(t[0]);c.set("offset",$G(a)),s.push(c);const d=t.length-1;for(let h=1;h<=d;h++){let p=Bu(t[h]);const m=p.get("offset");p.set("offset",$G((e+m*n)/o)),s.push(p)}n=o,e=0,r="",t=s}return NO(this.element,t,this.preStyleProps,this.postStyleProps,n,e,r,!0)}}function $G(i,t=3){const e=Math.pow(10,t-1);return Math.round(i*e)/e}class VO{}const C_e=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 S_e extends VO{normalizePropertyName(t,e){return OO(t)}normalizeStyleValue(t,e,n,r){let s="";const o=n.toString().trim();if(C_e.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 mge(i,t){return new pe(3005,!1)}())}return o+s}}function GG(i,t,e,n,r,s,o,a,l,c,d,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:d,totalTime:h,errors:p}}const zO={};class WG{constructor(t,e,n){this._triggerName=t,this.ast=e,this._stateStyles=n}match(t,e,n,r){return function E_e(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,d){const h=[],p=this.ast.options&&this.ast.options.params||zO,g=this.buildStyles(n,a&&a.params||zO,h),b=l&&l.params||zO,v=this.buildStyles(r,b,h),y=new Set,M=new Map,x=new Map,C="void"===r,F={params:A_e(b,p),delay:this.ast.options?.delay},D=d?[]:BO(t,e,this.ast.animation,s,o,g,v,F,c,h);let k=0;if(D.forEach(T=>{k=Math.max(T.duration+T.delay,k)}),h.length)return GG(e,this._triggerName,n,r,C,g,v,[],[],M,x,k,h);D.forEach(T=>{const A=T.element,W=aa(M,A,new Set);T.preStyleProps.forEach(ne=>W.add(ne));const ie=aa(x,A,new Set);T.postStyleProps.forEach(ne=>ie.add(ne)),A!==e&&y.add(A)});const B=aE(y.values());return GG(e,this._triggerName,n,r,C,g,v,D,B,M,x,k)}}function A_e(i,t){const e=r0(t);for(const n in i)i.hasOwnProperty(n)&&null!=i[n]&&(e[n]=i[n]);return e}class D_e{constructor(t,e,n){this.styles=t,this.defaultParams=e,this.normalizer=n}buildStyles(t,e){const n=new Map,r=r0(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=o0(o,r,e));const l=this.normalizer.normalizePropertyName(a,e);o=this.normalizer.normalizeStyleValue(a,l,o,e),n.set(a,o)})}),n}}class I_e{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 D_e(r.style,r.options&&r.options.params||{},n))}),jG(this.states,"true","1"),jG(this.states,"false","0"),e.transitions.forEach(r=>{this.transitionFactories.push(new WG(t,r,this.states))}),this.fallbackTransition=function R_e(i,t,e){return new WG(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 jG(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 k_e=new fE;class P_e{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=FO(this._driver,e,n,r);if(n.length)throw function Pge(i){return new pe(3503,!1)}();this._animations.set(t,s)}_buildPlayer(t,e,n){const r=t.element,s=CG(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=BO(this._driver,e,s,IO,iE,new Map,new Map,n,k_e,r),o.forEach(d=>{const h=aa(a,d.element,new Map);d.postStyleProps.forEach(p=>h.set(p,null))})):(r.push(function Oge(){return new pe(3300,!1)}()),o=[]),r.length)throw function Fge(i){return new pe(3504,!1)}();a.forEach((d,h)=>{d.forEach((p,m)=>{d.set(m,this._driver.computeStyle(h,m,Kc))})});const c=Nu(o.map(d=>{const h=a.get(d.element);return this._buildPlayer(d,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 Lge(i){return new pe(3301,!1)}();return e}listen(t,e,n,r){const s=EO(e,"","","");return CO(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 YG="ng-animate-queued",HO="ng-animate-disabled",B_e=[],qG={namespaceId:"",setForRemoval:!1,setForMove:!1,hasAnimation:!1,removedBeforeQueried:!1},U_e={namespaceId:"",setForMove:!1,setForRemoval:!1,hasAnimation:!1,removedBeforeQueried:!0},za="__ng_removed";class $O{get params(){return this.options.params}constructor(t,e=""){this.namespaceId=e;const n=t&&t.hasOwnProperty("value");if(this.value=function $_e(i){return i??null}(n?t.value:t),n){const s=r0(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 a0="void",GO=new $O(a0);class V_e{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,Ha(e,this._hostClassName)}listen(t,e,n,r){if(!this._triggers.has(e))throw function Nge(i,t){return new pe(3302,!1)}();if(null==n||0==n.length)throw function Bge(i){return new pe(3303,!1)}();if(!function G_e(i){return"start"==i||"done"==i}(n))throw function Uge(i,t){return new pe(3400,!1)}();const s=aa(this._elementListeners,t,[]),o={name:e,phase:n,callback:r};s.push(o);const a=aa(this._engine.statesByElement,t,new Map);return a.has(e)||(Ha(t,rE),Ha(t,rE+"-"+e),a.set(e,GO)),()=>{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 Vge(i){return new pe(3401,!1)}();return e}trigger(t,e,n,r=!0){const s=this._getTrigger(e),o=new WO(this.id,e,t);let a=this._engine.statesByElement.get(t);a||(Ha(t,rE),Ha(t,rE+"-"+e),this._engine.statesByElement.set(t,a=new Map));let l=a.get(e);const c=new $O(n,this.id);if(!(n&&n.hasOwnProperty("value"))&&l&&c.absorbOptions(l.options),a.set(e,c),l||(l=GO),c.value!==a0&&l.value===c.value){if(!function Y_e(i,t){const e=Object.keys(i),n=Object.keys(t);if(e.length!=n.length)return!1;for(let r=0;r{Rf(t,v),fc(t,y)})}return}const p=aa(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||(Ha(t,YG),o.onStart(()=>{Yg(t,YG)})),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,sE,!0);n.forEach(r=>{if(r[za])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 d=this.trigger(t,c,a0,r);d&&a.push(d)}}),a.length)return this._engine.markElementAsRemoved(this.id,t,!0,e,o),n&&Nu(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)||GO,d=new $O(a0),h=new WO(this.id,o,t);this._engine.totalQueuedPlayers++,this._queue.push({element:t,triggerName:o,transition:l,fromState:c,toState:d,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[za];(!s||s===qG)&&(n.afterFlush(()=>this.clearElementCache(t)),n.destroyInnerAnimations(t),n._onRemovalComplete(t,e))}}insertNode(t,e){Ha(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=EO(s,n.triggerName,n.fromState.value,n.toState.value);l._data=t,CO(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 z_e{_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 V_e(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(gE(e)){const s=this._fetchNamespace(t);if(s)return s.trigger(e,n,r),!0}return!1}insertNode(t,e,n,r){if(!gE(e))return;const s=e[za];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),Ha(t,HO)):this.disabledNodes.has(t)&&(this.disabledNodes.delete(t),Yg(t,HO))}removeNode(t,e,n,r){if(gE(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[za]={namespaceId:t,setForRemoval:r,hasAnimation:n,removedBeforeQueried:!1,previousTriggersValues:s}}listen(t,e,n,r,s){return gE(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,sE,!0);e.forEach(n=>this.destroyActiveAnimationsForElement(n)),0!=this.playersByQueriedElement.size&&(e=this.driver.query(t,RO,!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 Nu(this.players).onDone(()=>t());t()})}processLeaveNode(t){const e=t[za];if(e&&e.setForRemoval){if(t[za]=qG,e.namespaceId){this.destroyInnerAnimations(t);const n=this._fetchNamespace(e.namespaceId);n&&n.clearElementCache(t)}this._onRemovalComplete(t,e.setForRemoval)}t.classList?.contains(HO)&&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?Nu(e).onDone(()=>{n.forEach(r=>r())}):n.forEach(r=>r())}}reportError(t){throw function zge(i){return new pe(3402,!1)}()}_flushAnimations(t,e){const n=new fE,r=[],s=new Map,o=[],a=new Map,l=new Map,c=new Map,d=new Set;this.disabledNodes.forEach(q=>{d.add(q);const se=this.driver.query(q,".ng-animate-queued",!0);for(let J=0;J{const J=IO+b++;g.set(se,J),q.forEach(we=>Ha(we,J))});const v=[],y=new Set,M=new Set;for(let q=0;qy.add(we)):M.add(se))}const x=new Map,C=ZG(p,Array.from(y));C.forEach((q,se)=>{const J=iE+b++;x.set(se,J),q.forEach(we=>Ha(we,J))}),t.push(()=>{m.forEach((q,se)=>{const J=g.get(se);q.forEach(we=>Yg(we,J))}),C.forEach((q,se)=>{const J=x.get(se);q.forEach(we=>Yg(we,J))}),v.forEach(q=>{this.processLeaveNode(q)})});const F=[],D=[];for(let q=this._namespaceList.length-1;q>=0;q--)this._namespaceList[q].drainQueuedTransitions(e).forEach(J=>{const we=J.player,Ve=J.element;if(F.push(we),this.collectedEnterElements.length){const Le=Ve[za];if(Le&&Le.setForMove){if(Le.previousTriggersValues&&Le.previousTriggersValues.has(J.triggerName)){const wt=Le.previousTriggersValues.get(J.triggerName),Tt=this.statesByElement.get(J.element);if(Tt&&Tt.has(J.triggerName)){const St=Tt.get(J.triggerName);St.value=wt,Tt.set(J.triggerName,St)}}return void we.destroy()}}const Ye=!h||!this.driver.containsElement(h,Ve),Rt=x.get(Ve),nn=g.get(Ve),le=this._buildInstruction(J,n,nn,Rt,Ye);if(le.errors&&le.errors.length)return void D.push(le);if(Ye)return we.onStart(()=>Rf(Ve,le.fromStyles)),we.onDestroy(()=>fc(Ve,le.toStyles)),void r.push(we);if(J.isFallbackTransition)return we.onStart(()=>Rf(Ve,le.fromStyles)),we.onDestroy(()=>fc(Ve,le.toStyles)),void r.push(we);const Fe=[];le.timelines.forEach(Le=>{Le.stretchStartingKeyframe=!0,this.disabledNodes.has(Le.element)||Fe.push(Le)}),le.timelines=Fe,n.append(Ve,le.timelines),o.push({instruction:le,player:we,element:Ve}),le.queriedElements.forEach(Le=>aa(a,Le,[]).push(we)),le.preStyleProps.forEach((Le,wt)=>{if(Le.size){let Tt=l.get(wt);Tt||l.set(wt,Tt=new Set),Le.forEach((St,Sn)=>Tt.add(Sn))}}),le.postStyleProps.forEach((Le,wt)=>{let Tt=c.get(wt);Tt||c.set(wt,Tt=new Set),Le.forEach((St,Sn)=>Tt.add(Sn))})});if(D.length){const q=[];D.forEach(se=>{q.push(function Hge(i,t){return new pe(3505,!1)}())}),F.forEach(se=>se.destroy()),this.reportError(q)}const k=new Map,B=new Map;o.forEach(q=>{const se=q.element;n.has(se)&&(B.set(se,se),this._beforeAnimationBuild(q.player.namespaceId,q.instruction,k))}),r.forEach(q=>{const se=q.element;this._getPreviousPlayers(se,!1,q.namespaceId,q.triggerName,null).forEach(we=>{aa(k,se,[]).push(we),we.destroy()})});const T=v.filter(q=>JG(q,l,c)),A=new Map;KG(A,this.driver,M,c,Kc).forEach(q=>{JG(q,l,c)&&T.push(q)});const ie=new Map;m.forEach((q,se)=>{KG(ie,this.driver,new Set(q),l,rR)}),T.forEach(q=>{const se=A.get(q),J=ie.get(q);A.set(q,new Map([...Array.from(se?.entries()??[]),...Array.from(J?.entries()??[])]))});const ne=[],oe=[],ge={};o.forEach(q=>{const{element:se,player:J,instruction:we}=q;if(n.has(se)){if(d.has(se))return J.onDestroy(()=>fc(se,we.toStyles)),J.disabled=!0,J.overrideTotalTime(we.totalTime),void r.push(J);let Ve=ge;if(B.size>1){let Rt=se;const nn=[];for(;Rt=Rt.parentNode;){const le=B.get(Rt);if(le){Ve=le;break}nn.push(Rt)}nn.forEach(le=>B.set(le,Ve))}const Ye=this._buildAnimation(J.namespaceId,we,k,s,ie,A);if(J.setRealPlayer(Ye),Ve===ge)ne.push(J);else{const Rt=this.playersByElement.get(Ve);Rt&&Rt.length&&(J.parentPlayer=Nu(Rt)),r.push(J)}}else Rf(se,we.fromStyles),J.onDestroy(()=>fc(se,we.toStyles)),oe.push(J),d.has(se)&&r.push(J)}),oe.forEach(q=>{const se=s.get(q.element);if(se&&se.length){const J=Nu(se);q.setRealPlayer(J)}}),r.forEach(q=>{q.parentPlayer?q.syncPlayerEvents(q.parentPlayer):q.destroy()});for(let q=0;q!Ye.destroyed);Ve.length?W_e(this,se,Ve):this.processLeaveNode(se)}return v.length=0,ne.forEach(q=>{this.players.push(q),q.onDone(()=>{q.destroy();const se=this.players.indexOf(q);this.players.splice(se,1)}),q.play()}),ne}elementContainsData(t,e){let n=!1;const r=e[za];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==a0;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,d=c!==s,h=aa(n,c,[]);this._getPreviousPlayers(c,d,o,a,e.toState).forEach(m=>{const g=m.getRealPlayer();g.beforeDestroy&&g.beforeDestroy(),m.destroy(),h.push(m)})}Rf(s,e.fromStyles)}_buildAnimation(t,e,n,r,s,o){const a=e.triggerName,l=e.element,c=[],d=new Set,h=new Set,p=e.timelines.map(g=>{const b=g.element;d.add(b);const v=b[za];if(v&&v.removedBeforeQueried)return new nb(g.duration,g.delay);const y=b!==l,M=function j_e(i){const t=[];return QG(i,t),t}((n.get(b)||B_e).map(k=>k.getRealPlayer())).filter(k=>!!k.element&&k.element===b),x=s.get(b),C=o.get(b),F=CG(0,this._normalizer,0,g.keyframes,x,C),D=this._buildPlayer(g,F,M);if(g.subTimeline&&r&&h.add(b),y){const k=new WO(t,a,b);k.setRealPlayer(D),c.push(k)}return D});c.forEach(g=>{aa(this.playersByQueriedElement,g.element,[]).push(g),g.onDone(()=>function H_e(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))}),d.forEach(g=>Ha(g,PG));const m=Nu(p);return m.onDestroy(()=>{d.forEach(g=>Yg(g,PG)),fc(l,e.toStyles)}),h.forEach(g=>{aa(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 nb(t.duration,t.delay)}}class WO{constructor(t,e,n){this.namespaceId=t,this.triggerName=e,this.element=n,this._player=new nb,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=>CO(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){aa(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 gE(i){return i&&1===i.nodeType}function XG(i,t){const e=i.style.display;return i.style.display=t??"none",e}function KG(i,t,e,n,r){const s=[];e.forEach(l=>s.push(XG(l)));const o=[];n.forEach((l,c)=>{const d=new Map;l.forEach(h=>{const p=t.computeStyle(c,h,r);d.set(h,p),(!p||0==p.length)&&(c[za]=U_e,o.push(c))}),i.set(c,d)});let a=0;return e.forEach(l=>XG(l,s[a++])),o}function ZG(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 Ha(i,t){i.classList?.add(t)}function Yg(i,t){i.classList?.remove(t)}function W_e(i,t,e){Nu(e).onDone(()=>i.processLeaveNode(t))}function QG(i,t){for(let e=0;er.add(s)):t.set(i,n),e.delete(i),!0}class _E{constructor(t,e,n){this.bodyNode=t,this._driver=e,this._normalizer=n,this._triggerCache={},this.onRemovalComplete=(r,s)=>{},this._transitionEngine=new z_e(t,e,n),this._timelineEngine=new P_e(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=[],d=FO(this._driver,s,l,c);if(l.length)throw function Rge(i,t){return new pe(3404,!1)}();a=function T_e(i,t,e){return new I_e(i,t,e)}(r,d,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]=SG(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]=SG(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 X_e=(()=>{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&&fc(this._element,this._startStyles,this._initialStyles),this._state=1)}finish(){this.start(),this._state<2&&(fc(this._element,this._initialStyles),this._endStyles&&(fc(this._element,this._endStyles),this._endStyles=null),this._state=1)}destroy(){this.finish(),this._state<3&&(i.initialStylesByElement.delete(this._element),this._startStyles&&(Rf(this._element,this._startStyles),this._endStyles=null),this._endStyles&&(Rf(this._element,this._endStyles),this._endStyles=null),fc(this._element,this._initialStyles),this._state=3)}}return i.initialStylesByElement=new WeakMap,i})();function jO(i){let t=null;return i.forEach((e,n)=>{(function K_e(i){return"display"===i||"position"===i})(n)&&(t=t||new Map,t.set(n,e))}),t}class e8{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:UG(this.element,r))}),this.currentSnapshot=t}triggerCallback(t){const e="start"===t?this._onStartFns:this._onDoneFns;e.forEach(n=>n()),e.length=0}}class Z_e{validateStyleProperty(t){return!0}validateAnimatableStyleProperty(t){return!0}matchesElement(t,e){return!1}containsElement(t,e){return TG(t,e)}getParentElement(t){return DO(t)}query(t,e,n){return IG(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,d=o.filter(m=>m instanceof e8);(function t_e(i,t){return 0===i||0===t})(n,r)&&d.forEach(m=>{m.currentSnapshot.forEach((g,b)=>c.set(b,g))});let h=function Zge(i){return i.length?i[0]instanceof Map?i:i.map(t=>OG(t)):[]}(e).map(m=>Bu(m));h=function n_e(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,UG(i,a)))}}return t}(t,h,c);const p=function q_e(i,t){let e=null,n=null;return Array.isArray(t)&&t.length?(e=jO(t[0]),t.length>1&&(n=jO(t[t.length-1]))):t instanceof Map&&(e=jO(t)),e||n?new X_e(i,e,n):null}(t,h);return new e8(t,h,l,p)}}let Q_e=(()=>{class i extends nV{constructor(e,n){super(),this._nextAnimationId=0,this._renderer=e.createRenderer(n.body,{id:"0",encapsulation:Ks.None,styles:[],data:{animation:[]}})}build(e){const n=this._nextAnimationId.toString();this._nextAnimationId++;const r=Array.isArray(e)?rV(e):e;return t8(this._renderer,null,n,"register",[r]),new J_e(n,this._renderer)}}return i.\u0275fac=function(e){return new(e||i)(ee(Gl),ee(qt))},i.\u0275prov=Pe({token:i,factory:i.\u0275fac}),i})();class J_e extends LQ{constructor(t,e){super(),this._id=t,this._renderer=e}create(t,e){return new eve(this._id,t,e||{},this._renderer)}}class eve{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 t8(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 t8(i,t,e,n,r){return i.setProperty(t,`@@${e}:${n}`,r)}const n8="@.disabled";let tve=(()=>{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 d=this._rendererCache.get(s);return d||(d=new i8("",s,this.engine,()=>this._rendererCache.delete(s)),this._rendererCache.set(s,d)),d}const o=n.id,a=n.id+"-"+this._currentId;this._currentId++,this.engine.register(a,e);const l=d=>{Array.isArray(d)?d.forEach(l):this.engine.registerTrigger(o,a,e,d.name,d)};return n.data.animation.forEach(l),new nve(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)(ee(Gl),ee(_E),ee(gt))},i.\u0275prov=Pe({token:i,factory:i.\u0275fac}),i})();class i8{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==n8?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 nve extends i8{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==n8?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 ive(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 rve(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 r8=[{provide:nV,useClass:Q_e},{provide:VO,useFactory:function ove(){return new S_e}},{provide:_E,useClass:(()=>{class i extends _E{constructor(e,n,r,s){super(e.body,n,r)}ngOnDestroy(){this.flush()}}return i.\u0275fac=function(e){return new(e||i)(ee(qt),ee(TO),ee(VO),ee(dm))},i.\u0275prov=Pe({token:i,factory:i.\u0275fac}),i})()},{provide:Gl,useFactory:function ave(i,t,e){return new tve(i,t,e)},deps:[lM,_E,gt]}],YO=[{provide:TO,useFactory:()=>new Z_e},{provide:kr,useValue:"BrowserAnimations"},...r8],s8=[{provide:TO,useClass:RG},{provide:kr,useValue:"NoopAnimations"},...r8];let lve=(()=>{class i{static withConfig(e){return{ngModule:i,providers:e.disableAnimations?s8:YO}}}return i.\u0275fac=function(e){return new(e||i)},i.\u0275mod=en({type:i}),i.\u0275inj=Wt({providers:YO,imports:[LB]}),i})();const o8=new me("CdkAccordion");let cve=0,dve=(()=>{class i{get expanded(){return this._expanded}set expanded(e){e=tn(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=tn(e)}constructor(e,n,r){this.accordion=e,this._changeDetectorRef=n,this._expansionDispatcher=r,this._openCloseAllSubscription=Qt.EMPTY,this.closed=new $e,this.opened=new $e,this.destroyed=new $e,this.expandedChange=new $e,this.id="cdk-accordion-child-"+cve++,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)(E(o8,12),E(Qn),E($R))},i.\u0275dir=ve({type:i,selectors:[["cdk-accordion-item"],["","cdkAccordionItem",""]],inputs:{expanded:"expanded",disabled:"disabled"},outputs:{closed:"closed",opened:"opened",destroyed:"destroyed",expandedChange:"expandedChange"},exportAs:["cdkAccordionItem"],features:[Dn([{provide:o8,useValue:void 0}])]}),i})(),uve=(()=>{class i{}return i.\u0275fac=function(e){return new(e||i)},i.\u0275mod=en({type:i}),i.\u0275inj=Wt({}),i})();const hve=["body"];function fve(i,t){}const pve=[[["mat-expansion-panel-header"]],"*",[["mat-action-row"]]],mve=["mat-expansion-panel-header","*","mat-action-row"];function gve(i,t){1&i&&Ie(0,"span",2),2&i&&U("@indicatorRotate",re()._getExpandedState())}const _ve=[[["mat-panel-title"]],[["mat-panel-description"]],"*"],vve=["mat-panel-title","mat-panel-description","*"],a8=new me("MAT_ACCORDION"),l8="225ms cubic-bezier(0.4,0.0,0.2,1)",c8={indicatorRotate:Oa("indicatorRotate",[Os("collapsed, void",oi({transform:"rotate(0deg)"})),Os("expanded",oi({transform:"rotate(180deg)"})),Or("expanded <=> collapsed, void => collapsed",Yr(l8))]),bodyExpansion:Oa("bodyExpansion",[Os("collapsed, void",oi({height:"0px",visibility:"hidden"})),Os("expanded",oi({height:"*",visibility:"visible"})),Or("expanded <=> collapsed, void => collapsed",Yr(l8))])},d8=new me("MAT_EXPANSION_PANEL");let yve=(()=>{class i{constructor(e,n){this._template=e,this._expansionPanel=n}}return i.\u0275fac=function(e){return new(e||i)(E(Eo),E(d8,8))},i.\u0275dir=ve({type:i,selectors:[["ng-template","matExpansionPanelContent",""]]}),i})(),bve=0;const u8=new me("MAT_EXPANSION_PANEL_DEFAULT_OPTIONS");let h8=(()=>{class i extends dve{get hideToggle(){return this._hideToggle||this.accordion&&this.accordion.hideToggle}set hideToggle(e){this._hideToggle=tn(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 $e,this.afterCollapse=new $e,this._inputChanges=new Te,this._headerId="mat-expansion-panel-header-"+bve++,this._bodyAnimationDone=new Te,this.accordion=e,this._document=o,this._bodyAnimationDone.pipe(Ql((c,d)=>c.fromState===d.fromState&&c.toState===d.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(Do(null),gn(()=>this.expanded&&!this._portal),Oi(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)(E(a8,12),E(Qn),E($R),E(jr),E(qt),E(kr,8),E(u8,8))},i.\u0275cmp=ot({type:i,selectors:[["mat-expansion-panel"]],contentQueries:function(e,n,r){if(1&e&&Wi(r,yve,5),2&e){let s;At(s=Dt())&&(n._lazyContent=s.first)}},viewQuery:function(e,n){if(1&e&&$n(hve,5),2&e){let r;At(r=Dt())&&(n._body=r.first)}},hostAttrs:[1,"mat-expansion-panel"],hostVars:6,hostBindings:function(e,n){2&e&&ln("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:[Dn([{provide:a8,useValue:void 0},{provide:d8,useExisting:i}]),dt,xi],ngContentSelectors:mve,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&&(or(pve),Yt(0),G(1,"div",0,1),Oe("@bodyExpansion.done",function(s){return n._bodyAnimationDone.next(s)}),G(3,"div",2),Yt(4,1),fe(5,fve,0,0,"ng-template",3),j(),Yt(6,2),j()),2&e&&(V(1),U("@bodyExpansion",n._getExpandedState())("id",n.id),It("aria-labelledby",n._headerId),V(4),U("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:[c8.bodyExpansion]},changeDetection:0}),i})();class xve{}const wve=JI(xve);let Mve=(()=>{class i extends wve{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=Qt.EMPTY;const c=e.accordion?e.accordion._stateChanges.pipe(gn(d=>!(!d.hideToggle&&!d.togglePosition))):_o;this.tabIndex=parseInt(l||"")||0,this._parentChangeSubscription=Cr(e.opened,e.closed,c,e._inputChanges.pipe(gn(d=>!!(d.hideToggle||d.disabled||d.togglePosition)))).subscribe(()=>this._changeDetectorRef.markForCheck()),e.closed.pipe(gn(()=>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:Qo(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)(E(h8,1),E(vt),E(Xc),E(Qn),E(u8,8),E(kr,8),wa("tabindex"))},i.\u0275cmp=ot({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&&Oe("click",function(){return n._toggle()})("keydown",function(s){return n._keydown(s)}),2&e&&(It("id",n.panel._headerId)("tabindex",n.tabIndex)("aria-controls",n._getPanelId())("aria-expanded",n._isExpanded())("aria-disabled",n.panel.disabled),qo("height",n._getHeaderHeight()),ln("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:[dt],ngContentSelectors:vve,decls:5,vars:3,consts:[[1,"mat-content"],["class","mat-expansion-indicator",4,"ngIf"],[1,"mat-expansion-indicator"]],template:function(e,n){1&e&&(or(_ve),G(0,"span",0),Yt(1),Yt(2,1),Yt(3,2),j(),fe(4,gve,1,1,"span",1)),2&e&&(ln("mat-content-hide-toggle",!n._showToggle()),V(4),U("ngIf",n._showToggle()))},dependencies:[_i],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:[c8.indicatorRotate]},changeDetection:0}),i})(),Cve=(()=>{class i{}return i.\u0275fac=function(e){return new(e||i)},i.\u0275dir=ve({type:i,selectors:[["mat-panel-description"]],hostAttrs:[1,"mat-expansion-panel-header-description"]}),i})(),Sve=(()=>{class i{}return i.\u0275fac=function(e){return new(e||i)},i.\u0275dir=ve({type:i,selectors:[["mat-panel-title"]],hostAttrs:[1,"mat-expansion-panel-header-title"]}),i})(),Eve=(()=>{class i{}return i.\u0275fac=function(e){return new(e||i)},i.\u0275mod=en({type:i}),i.\u0275inj=Wt({imports:[co,Jn,uve,Bh]}),i})();function Ave(i,t){if(1&i&&(G(0,"mat-option",19),Be(1),j()),2&i){const e=t.$implicit;U("value",e),V(1),Qi(" ",e," ")}}function Dve(i,t){if(1&i){const e=jn();G(0,"mat-form-field",16)(1,"mat-select",17),Oe("selectionChange",function(r){return Vt(e),Et(re(2)._changePageSize(r.value))}),fe(2,Ave,2,2,"mat-option",18),j()()}if(2&i){const e=re(2);U("appearance",e._formFieldAppearance)("color",e.color),V(1),U("value",e.pageSize)("disabled",e.disabled)("aria-labelledby",e._pageSizeLabelId)("panelClass",e.selectConfig.panelClass||"")("disableOptionCentering",e.selectConfig.disableOptionCentering),V(1),U("ngForOf",e._displayedPageSizeOptions)}}function Tve(i,t){if(1&i&&(G(0,"div",20),Be(1),j()),2&i){const e=re(2);V(1),ui(e.pageSize)}}function Ive(i,t){if(1&i&&(G(0,"div",12)(1,"div",13),Be(2),j(),fe(3,Dve,3,8,"mat-form-field",14),fe(4,Tve,2,1,"div",15),j()),2&i){const e=re();V(1),BD("id",e._pageSizeLabelId),V(1),Qi(" ",e._intl.itemsPerPageLabel," "),V(1),U("ngIf",e._displayedPageSizeOptions.length>1),V(1),U("ngIf",e._displayedPageSizeOptions.length<=1)}}function Rve(i,t){if(1&i){const e=jn();G(0,"button",21),Oe("click",function(){return Vt(e),Et(re().firstPage())}),ki(),G(1,"svg",7),Ie(2,"path",22),j()()}if(2&i){const e=re();U("matTooltip",e._intl.firstPageLabel)("matTooltipDisabled",e._previousButtonsDisabled())("matTooltipPosition","above")("disabled",e._previousButtonsDisabled()),It("aria-label",e._intl.firstPageLabel)}}function kve(i,t){if(1&i){const e=jn();ki(),ya(),G(0,"button",23),Oe("click",function(){return Vt(e),Et(re().lastPage())}),ki(),G(1,"svg",7),Ie(2,"path",24),j()()}if(2&i){const e=re();U("matTooltip",e._intl.lastPageLabel)("matTooltipDisabled",e._nextButtonsDisabled())("matTooltipPosition","above")("disabled",e._nextButtonsDisabled()),It("aria-label",e._intl.lastPageLabel)}}let yE=(()=>{class i{constructor(){this.changes=new Te,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=Pe({token:i,factory:i.\u0275fac,providedIn:"root"}),i})();const Ove={provide:yE,deps:[[new Ss,new Ca,yE]],useFactory:function Pve(i){return i||new yE}},Lve=new me("MAT_PAGINATOR_DEFAULT_OPTIONS"),Nve=jM(CQ(class{}));let Bve=(()=>{class i extends Nve{get pageIndex(){return this._pageIndex}set pageIndex(e){this._pageIndex=Math.max(Ps(e),0),this._changeDetectorRef.markForCheck()}get length(){return this._length}set length(e){this._length=Ps(e),this._changeDetectorRef.markForCheck()}get pageSize(){return this._pageSize}set pageSize(e){this._pageSize=Math.max(Ps(e),0),this._updateDisplayedPageSizeOptions()}get pageSizeOptions(){return this._pageSizeOptions}set pageSizeOptions(e){this._pageSizeOptions=(e||[]).map(n=>Ps(n)),this._updateDisplayedPageSizeOptions()}get hidePageSize(){return this._hidePageSize}set hidePageSize(e){this._hidePageSize=tn(e)}get showFirstLastButtons(){return this._showFirstLastButtons}set showFirstLastButtons(e){this._showFirstLastButtons=tn(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 $e,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){Co()},i.\u0275dir=ve({type:i,inputs:{color:"color",pageIndex:"pageIndex",length:"length",pageSize:"pageSize",pageSizeOptions:"pageSizeOptions",hidePageSize:"hidePageSize",showFirstLastButtons:"showFirstLastButtons",selectConfig:"selectConfig"},outputs:{page:"page"},features:[dt]}),i})(),Uve=0,Vve=(()=>{class i extends Bve{constructor(e,n,r){super(e,n,r),this._pageSizeLabelId="mat-paginator-page-size-label-"+Uve++,this._formFieldAppearance=r?.formFieldAppearance||"outline"}}return i.\u0275fac=function(e){return new(e||i)(E(yE),E(Qn),E(Lve,8))},i.\u0275cmp=ot({type:i,selectors:[["mat-paginator"]],hostAttrs:["role","group",1,"mat-mdc-paginator"],inputs:{disabled:"disabled"},exportAs:["matPaginator"],features:[dt],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&&(G(0,"div",0)(1,"div",1),fe(2,Ive,5,4,"div",2),G(3,"div",3)(4,"div",4),Be(5),j(),fe(6,Rve,3,5,"button",5),G(7,"button",6),Oe("click",function(){return n.previousPage()}),ki(),G(8,"svg",7),Ie(9,"path",8),j()(),ya(),G(10,"button",9),Oe("click",function(){return n.nextPage()}),ki(),G(11,"svg",7),Ie(12,"path",10),j()(),fe(13,kve,3,5,"button",11),j()()()),2&e&&(V(2),U("ngIf",!n.hidePageSize),V(3),Qi(" ",n._intl.getRangeLabel(n.pageIndex,n.pageSize,n.length)," "),V(1),U("ngIf",n.showFirstLastButtons),V(1),U("matTooltip",n._intl.previousPageLabel)("matTooltipDisabled",n._previousButtonsDisabled())("matTooltipPosition","above")("disabled",n._previousButtonsDisabled()),It("aria-label",n._intl.previousPageLabel),V(3),U("matTooltip",n._intl.nextPageLabel)("matTooltipDisabled",n._nextButtonsDisabled())("matTooltipPosition","above")("disabled",n._nextButtonsDisabled()),It("aria-label",n._intl.nextPageLabel),V(3),U("ngIf",n.showFirstLastButtons))},dependencies:[lo,_i,XM,yl,pb,Nm,Fs],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})(),zve=(()=>{class i{}return i.\u0275fac=function(e){return new(e||i)},i.\u0275mod=en({type:i}),i.\u0275inj=Wt({providers:[Ove],imports:[co,KM,VH,LV]}),i})(),Hve=(()=>{class i{}return i.\u0275fac=function(e){return new(e||i)},i.\u0275mod=en({type:i,bootstrap:[cge]}),i.\u0275inj=Wt({providers:[Jl,KR,{provide:OH,useValue:Vie}],imports:[LB,wK,lve,tH,SJ,gC,mH,Eve,TV,kV,LV,KM,tz,zve,mse,vH,VH,vV,Ipe,Rme,nH,tR,Yie,lre]}),i})();th(ec,[lo,_i,Fs,n0,nE],[Xo]),th(zR,[hm,lo,_i,xy,nc,Zc,yl,h8,Mve,Sve,Cve,Fs,Vve,pb,Nm,n0],[]),th(xC,[lo,_i,MC,wC,_H,n0],[]),th(_G,[lo,_i,Ro,Fs,pb,Nm,n0,nE],[Xo]),L7().bootstrapModule(Hve).catch(i=>console.error(i))},489:function(Bo,Gs,ps){var dn;Bo=ps.nmd(Bo),function(){var z,Kr=200,Un="Expected a function",Ga="__lodash_hash_undefined__",Ci="__lodash_placeholder__",Si=1,ms=2,js=4,Ys=1,Uo=2,On=1,ur=2,mc=4,ua=8,Tl=16,ha=32,Il=64,Wa=128,fa=256,md=512,ME=800,Kg=16,In=1/0,Ya=9007199254740991,SE=17976931348623157e292,Of=NaN,pa=4294967295,Te=pa-1,c0=pa>>>1,d0=[["ary",Wa],["bind",On],["bindKey",ur],["curry",ua],["curryRight",Tl],["flip",md],["partial",ha],["partialRight",Il],["rearg",fa]],ni="[object Arguments]",qn="[object Array]",EE="[object AsyncFunction]",tt="[object Boolean]",gc="[object Date]",AE="[object DOMException]",gd="[object Error]",Ff="[object Function]",u0="[object GeneratorFunction]",Vo="[object Map]",Vu="[object Number]",DE="[object Null]",qa="[object Object]",h0="[object Promise]",TE="[object Proxy]",_d="[object RegExp]",zo="[object Set]",_c="[object String]",Lf="[object Symbol]",Zg="[object Undefined]",vd="[object WeakMap]",zu="[object ArrayBuffer]",yd="[object DataView]",ma="[object Float32Array]",Nf="[object Float64Array]",Qg="[object Int8Array]",Bf="[object Int16Array]",Jg="[object Int32Array]",e_="[object Uint8Array]",Hu="[object Uint8ClampedArray]",t_="[object Uint16Array]",n_="[object Uint32Array]",RE=/\b__p \+= '';/g,kE=/\b(__p \+=) '' \+/g,PE=/(__e\(.*?\)|\b__t\)) \+\n'';/g,f0=/&(?:amp|lt|gt|quot|#39);/g,p0=/[&<>"']/g,OE=RegExp(f0.source),FE=RegExp(p0.source),QO=/<%-([\s\S]+?)%>/g,i_=/<%([\s\S]+?)%>/g,r_=/<%=([\s\S]+?)%>/g,m0=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,g0=/^\w*$/,_0=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,s_=/[\\^$.*+?()[\]{}|]/g,v0=RegExp(s_.source),Uf=/^\s+/,y0=/\s/,b0=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,Mr=/\{\n\/\* \[wrapped with (.+)\] \*/,LE=/,? & /,NE=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,BE=/[()=,{}\[\]\/\s]/,UE=/\\(\\)?/g,x0=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,w0=/\w*$/,VE=/^[-+]0x[0-9a-f]+$/i,Xa=/^0b[01]+$/i,zE=/^\[object .+?Constructor\]$/,rr=/^0o[0-7]+$/i,bd=/^(?:0|[1-9]\d*)$/,_o=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,o_=/($^)/,HE=/['\n\r\u2028\u2029\\]/g,$u="\\ud800-\\udfff",C0="\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff",l_="\\u2700-\\u27bf",c_="a-z\\xdf-\\xf6\\xf8-\\xff",d_="A-Z\\xc0-\\xd6\\xd8-\\xde",S0="\\ufe0e\\ufe0f",E0="\\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",Cr="["+$u+"]",Vf="["+E0+"]",xd="["+C0+"]",ci="\\d+",u_="["+l_+"]",mi="["+c_+"]",zf="[^"+$u+E0+ci+l_+c_+d_+"]",h_="\\ud83c[\\udffb-\\udfff]",Ot="[^"+$u+"]",Wu="(?:\\ud83c[\\udde6-\\uddff]){2}",ju="[\\ud800-\\udbff][\\udc00-\\udfff]",Yu="["+d_+"]",pe="(?:"+mi+"|"+zf+")",Hf="(?:"+Yu+"|"+zf+")",Jt="(?:['\u2019](?:d|ll|m|re|s|t|ve))?",Xn="(?:['\u2019](?:D|LL|M|RE|S|T|VE))?",A0="(?:"+xd+"|"+h_+")?",YE="["+S0+"]?",XE=YE+A0+"(?:\\u200d(?:"+[Ot,Wu,ju].join("|")+")"+YE+A0+")*",KE="(?:"+[u_,Wu,ju].join("|")+")"+XE,JO="(?:"+[Ot+xd+"?",xd,Wu,ju,Cr].join("|")+")",Rl=RegExp("['\u2019]","g"),eF=RegExp(xd,"g"),D0=RegExp(h_+"(?="+h_+")|"+JO+XE,"g"),tF=RegExp([Yu+"?"+mi+"+"+Jt+"(?="+[Vf,Yu,"$"].join("|")+")",Hf+"+"+Xn+"(?="+[Vf,Yu+pe,"$"].join("|")+")",Yu+"?"+pe+"+"+Jt,Yu+"+"+Xn,"\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])","\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",ci,KE].join("|"),"g"),nF=RegExp("[\\u200d"+$u+C0+S0+"]"),ZE=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,iF=["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"],QE=-1,Ei={};Ei[ma]=Ei[Nf]=Ei[Qg]=Ei[Bf]=Ei[Jg]=Ei[e_]=Ei[Hu]=Ei[t_]=Ei[n_]=!0,Ei[ni]=Ei[qn]=Ei[zu]=Ei[tt]=Ei[yd]=Ei[gc]=Ei[gd]=Ei[Ff]=Ei[Vo]=Ei[Vu]=Ei[qa]=Ei[_d]=Ei[zo]=Ei[_c]=Ei[vd]=!1;var En={};En[ni]=En[qn]=En[zu]=En[yd]=En[tt]=En[gc]=En[ma]=En[Nf]=En[Qg]=En[Bf]=En[Jg]=En[Vo]=En[Vu]=En[qa]=En[_d]=En[zo]=En[_c]=En[Lf]=En[e_]=En[Hu]=En[t_]=En[n_]=!0,En[gd]=En[Ff]=En[vd]=!1;var oF={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},Pe=parseFloat,aF=parseInt,Wt="object"==typeof global&&global&&global.Object===Object&&global,Gf="object"==typeof self&&self&&self.Object===Object&&self,Sr=Wt||Gf||Function("return this")(),f_=Gs&&!Gs.nodeType&&Gs,Xu=f_&&Bo&&!Bo.nodeType&&Bo,p_=Xu&&Xu.exports===f_,wd=p_&&Wt.process,gs=function(){try{return Xu&&Xu.require&&Xu.require("util").types||wd&&wd.binding&&wd.binding("util")}catch{}}(),m_=gs&&gs.isArrayBuffer,T0=gs&&gs.isDate,Ft=gs&&gs.isMap,Wf=gs&&gs.isRegExp,I0=gs&&gs.isSet,Xs=gs&&gs.isTypedArray;function _s(X,he,ae){switch(ae.length){case 0:return X.call(he);case 1:return X.call(he,ae[0]);case 2:return X.call(he,ae[0],ae[1]);case 3:return X.call(he,ae[0],ae[1],ae[2])}return X.apply(he,ae)}function lF(X,he,ae,ze){for(var jt=-1,Vn=null==X?0:X.length;++jt-1}function Ku(X,he,ae){for(var ze=-1,jt=null==X?0:X.length;++ze-1;);return ae}function ga(X,he){for(var ae=X.length;ae--&&Lt(he,X[ae],0)>-1;);return ae}var nA=v_({\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"}),ot=v_({"&":"&","<":"<",">":">",'"':""","'":"'"});function th(X){return"\\"+oF[X]}function Sd(X){return nF.test(X)}function Xf(X){var he=-1,ae=Array(X.size);return X.forEach(function(ze,jt){ae[++he]=[jt,ze]}),ae}function ve(X,he){return function(ae){return X(he(ae))}}function $i(X,he){for(var ae=-1,ze=X.length,jt=0,Vn=[];++ae",""":'"',"'":"'"}),ys=function X(he){var u,ae=(he=null==he?Sr:ys.defaults(Sr.Object(),he,ys.pick(Sr,iF))).Array,ze=he.Date,jt=he.Error,Vn=he.Function,xt=he.Math,ai=he.Object,bc=he.RegExp,k0=he.String,Er=he.TypeError,sr=ae.prototype,Ho=ai.prototype,Zs=he["__core-js_shared__"],Ol=Vn.prototype.toString,ri=Ho.hasOwnProperty,bi=0,sA=(u=/[^.]+$/.exec(Zs&&Zs.keys&&Zs.keys.IE_PROTO||""))?"Symbol(src)_1."+u:"",Ad=Ho.toString,P0=Ol.call(ai),Zf=Sr._,Qf=bc("^"+Ol.call(ri).replace(s_,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),Ja=p_?he.Buffer:z,Ui=he.Symbol,x_=he.Uint8Array,bs=Ja?Ja.allocUnsafe:z,xs=ve(ai.getPrototypeOf,ai),Jf=ai.create,Dd=Ho.propertyIsEnumerable,xc=sr.splice,bo=Ui?Ui.isConcatSpreadable:z,ih=Ui?Ui.iterator:z,Td=Ui?Ui.toStringTag:z,ep=function(){try{var u=kc(ai,"defineProperty");return u({},"",{}),u}catch{}}(),oA=he.clearTimeout!==Sr.clearTimeout&&he.clearTimeout,dF=ze&&ze.now!==Sr.Date.now&&ze.now,uF=he.setTimeout!==Sr.setTimeout&&he.setTimeout,w_=xt.ceil,M_=xt.floor,O0=ai.getOwnPropertySymbols,hF=Ja?Ja.isBuffer:z,aA=he.isFinite,fF=sr.join,pF=ve(ai.keys,ai),fr=xt.max,Zr=xt.min,mF=ze.now,F0=he.parseInt,C_=xt.random,gF=sr.reverse,L0=kc(he,"DataView"),tp=kc(he,"Map"),el=kc(he,"Promise"),Id=kc(he,"Set"),xi=kc(he,"WeakMap"),Rd=kc(ai,"create"),np=xi&&new xi,kd={},N0=Pc(L0),B0=Pc(tp),lA=Pc(el),S_=Pc(Id),cA=Pc(xi),Qr=Ui?Ui.prototype:z,Pd=Qr?Qr.valueOf:z,E_=Qr?Qr.toString:z;function I(u){if(Pi(u)&&!sn(u)&&!(u instanceof kn)){if(u instanceof Ai)return u;if(ri.call(u,"__wrapped__"))return ns(u)}return new Ai(u)}var Od=function(){function u(){}return function(f){if(!Mi(f))return{};if(Jf)return Jf(f);u.prototype=f;var _=new u;return u.prototype=z,_}}();function wc(){}function Ai(u,f){this.__wrapped__=u,this.__actions__=[],this.__chain__=!!f,this.__index__=0,this.__values__=z}function kn(u){this.__wrapped__=u,this.__actions__=[],this.__dir__=1,this.__filtered__=!1,this.__iteratees__=[],this.__takeCount__=pa,this.__views__=[]}function Mc(u){var f=-1,_=null==u?0:u.length;for(this.clear();++f<_;){var w=u[f];this.set(w[0],w[1])}}function Pt(u){var f=-1,_=null==u?0:u.length;for(this.clear();++f<_;){var w=u[f];this.set(w[0],w[1])}}function _a(u){var f=-1,_=null==u?0:u.length;for(this.clear();++f<_;){var w=u[f];this.set(w[0],w[1])}}function Et(u){var f=-1,_=null==u?0:u.length;for(this.__data__=new _a;++f<_;)this.add(u[f])}function Jr(u){var f=this.__data__=new Pt(u);this.size=f.size}function I_(u,f){var _=sn(u),w=!_&&Lc(u),S=!_&&!w&&ol(u),P=!_&&!w&&!S&&jo(u),$=_||w||S||P,Y=$?Ks(u.length,k0):[],Q=Y.length;for(var _e in u)(f||ri.call(u,_e))&&(!$||!("length"==_e||S&&("offset"==_e||"parent"==_e)||P&&("buffer"==_e||"byteLength"==_e||"byteOffset"==_e)||sl(_e,Q)))&&Y.push(_e);return Y}function zr(u){var f=u.length;return f?u[lh(0,f-1)]:z}function tl(u,f){return Ep(eo(u),Nl(f,0,u.length))}function $0(u){return Ep(eo(u))}function Ll(u,f,_){(_!==z&&!Wo(u[f],_)||_===z&&!(f in u))&&$o(u,f,_)}function Qs(u,f,_){var w=u[f];(!ri.call(u,f)||!Wo(w,_)||_===z&&!(f in u))&&$o(u,f,_)}function rp(u,f){for(var _=u.length;_--;)if(Wo(u[_][0],f))return _;return-1}function G0(u,f,_,w){return nl(u,function(S,P,$){f(w,S,_(S),$)}),w}function W0(u,f){return u&&di(f,pr(f),u)}function $o(u,f,_){"__proto__"==f&&ep?ep(u,f,{configurable:!0,enumerable:!0,value:_,writable:!0}):u[f]=_}function rh(u,f){for(var _=-1,w=f.length,S=ae(w),P=null==u;++_=f?u:f)),u}function Ms(u,f,_,w,S,P){var $,Y=f&Si,Q=f&ms,_e=f&js;if(_&&($=S?_(u,w,S,P):_(u)),$!==z)return $;if(!Mi(u))return u;var ye=sn(u);if(ye){if($=function fx(u){var f=u.length,_=new u.constructor(f);return f&&"string"==typeof u[0]&&ri.call(u,"index")&&(_.index=u.index,_.input=u.input),_}(u),!Y)return eo(u,$)}else{var be=Hr(u),Xe=be==Ff||be==u0;if(ol(u))return me(u,Y);if(be==qa||be==ni||Xe&&!S){if($=Q||Xe?{}:PA(u),!Y)return Q?function hh(u,f){return di(u,dx(u),f)}(u,function _A(u,f){return u&&di(f,Ds(f),u)}($,u)):function H_(u,f){return di(u,Z_(u),f)}(u,W0($,u))}else{if(!En[be])return S?u:{};$=function px(u,f,_){var w=u.constructor;switch(f){case zu:return sx(u);case tt:case gc:return new w(+u);case yd:return function wF(u,f){var _=f?sx(u.buffer):u.buffer;return new u.constructor(_,u.byteOffset,u.byteLength)}(u,_);case ma:case Nf:case Qg:case Bf:case Jg:case e_:case Hu:case t_:case n_:return AA(u,_);case Vo:return new w;case Vu:case _c:return new w(u);case _d:return function MF(u){var f=new u.constructor(u.source,w0.exec(u));return f.lastIndex=u.lastIndex,f}(u);case zo:return new w;case Lf:return function CF(u){return Pd?ai(Pd.call(u)):{}}(u)}}(u,be,Y)}}P||(P=new Jr);var bt=P.get(u);if(bt)return bt;P.set(u,$),iw(u)?u.forEach(function(Ht){$.add(Ms(Ht,f,_,Ht,u,P))}):Tv(u)&&u.forEach(function(Ht,An){$.set(An,Ms(Ht,f,_,An,u,P))});var mn=ye?z:(_e?Q?q_:bp:Q?Ds:pr)(u);return Rn(mn||u,function(Ht,An){mn&&(Ht=u[An=Ht]),Qs($,An,Ms(Ht,f,_,An,u,P))}),$}function R_(u,f,_){var w=_.length;if(null==u)return!w;for(u=ai(u);w--;){var S=_[w],$=u[S];if($===z&&!(S in u)||!(0,f[S])($))return!1}return!0}function sp(u,f,_){if("function"!=typeof u)throw new Er(Un);return gh(function(){u.apply(z,_)},f)}function Ld(u,f,_,w){var S=-1,P=kl,$=!0,Y=u.length,Q=[],_e=f.length;if(!Y)return Q;_&&(f=gi(f,Ur(_))),w?(P=Ku,$=!1):f.length>=Kr&&(P=yc,$=!1,f=new Et(f));e:for(;++S-1},Pt.prototype.set=function fA(u,f){var _=this.__data__,w=rp(_,u);return w<0?(++this.size,_.push([u,f])):_[w][1]=f,this},_a.prototype.clear=function pA(){this.size=0,this.__data__={hash:new Mc,map:new(tp||Pt),string:new Mc}},_a.prototype.delete=function mA(u){var f=K_(this,u).delete(u);return this.size-=f?1:0,f},_a.prototype.get=function Se(u){return K_(this,u).get(u)},_a.prototype.has=function zn(u){return K_(this,u).has(u)},_a.prototype.set=function Vt(u,f){var _=K_(this,u),w=_.size;return _.set(u,f),this.size+=_.size==w?0:1,this},Et.prototype.add=Et.prototype.push=function Ar(u){return this.__data__.set(u,Ga),this},Et.prototype.has=function H0(u){return this.__data__.has(u)},Jr.prototype.clear=function va(){this.__data__=new Pt,this.size=0},Jr.prototype.delete=function D_(u){var f=this.__data__,_=f.delete(u);return this.size=f.size,_},Jr.prototype.get=function T_(u){return this.__data__.get(u)},Jr.prototype.has=function gA(u){return this.__data__.has(u)},Jr.prototype.set=function vF(u,f){var _=this.__data__;if(_ instanceof Pt){var w=_.__data__;if(!tp||w.length0&&_(Y)?f>1?Kn(Y,f-1,_,w,S):Pl(S,Y):w||(S[S.length]=Y)}return S}var il=$_(),Di=$_(!0);function ki(u,f){return u&&il(u,f,pr)}function P_(u,f){return u&&Di(u,f,pr)}function ya(u,f){return vc(f,function(_){return Hl(u[_])})}function Cc(u,f){for(var _=0,w=(f=Ma(f,u)).length;null!=u&&_f}function op(u,f){return null!=u&&ri.call(u,f)}function ap(u,f){return null!=u&&f in ai(u)}function lp(u,f,_){for(var w=_?Ku:kl,S=u[0].length,P=u.length,$=P,Y=ae(P),Q=1/0,_e=[];$--;){var ye=u[$];$&&f&&(ye=gi(ye,Ur(f))),Q=Zr(ye.length,Q),Y[$]=!_&&(f||S>=120&&ye.length>=120)?new Et($&&ye):z}ye=u[0];var be=-1,Xe=Y[0];e:for(;++be=Y?Q:Q*("desc"==_[w]?-1:1)}return u.index-f.index}(P,$,_)})}function J0(u,f,_){for(var w=-1,S=f.length,P={};++w-1;)Y!==u&&xc.call(Y,Q,1),xc.call(u,Q,1);return u}function ah(u,f){for(var _=u?f.length:0,w=_-1;_--;){var S=f[_];if(_==w||S!==P){var P=S;sl(S)?xc.call(u,S,1):dh(u,S)}}return u}function lh(u,f){return u+M_(C_()*(f-u+1))}function ch(u,f){var _="";if(!u||f<1||f>Ya)return _;do{f%2&&(_+=u),(f=M_(f/2))&&(u+=u)}while(f);return _}function pn(u,f){return Cp(J_(u,f,is),u+"")}function SA(u){return zr(Uc(u))}function tx(u,f){var _=Uc(u);return Ep(_,Nl(f,0,_.length))}function zd(u,f,_,w){if(!Mi(u))return u;for(var S=-1,P=(f=Ma(f,u)).length,$=P-1,Y=u;null!=Y&&++SS?0:S+f),(_=_>S?S:_)<0&&(_+=S),S=f>_?0:_-f>>>0,f>>>=0;for(var P=ae(S);++w>>1,$=u[P];null!==$&&!As($)&&(_?$<=f:$=Kr){var _e=f?null:j_(u);if(_e)return Hn(_e);$=!1,S=yc,Q=new Et}else Q=f?[]:Y;e:for(;++w=w?u:ts(u,f,_)}var rx=oA||function(u){return Sr.clearTimeout(u)};function me(u,f){if(f)return u.slice();var _=u.length,w=bs?bs(_):new u.constructor(_);return u.copy(w),w}function sx(u){var f=new u.constructor(u.byteLength);return new x_(f).set(new x_(u)),f}function AA(u,f){var _=f?sx(u.buffer):u.buffer;return new u.constructor(_,u.byteOffset,u.length)}function DA(u,f){if(u!==f){var _=u!==z,w=null===u,S=u==u,P=As(u),$=f!==z,Y=null===f,Q=f==f,_e=As(f);if(!Y&&!_e&&!P&&u>f||P&&$&&Q&&!Y&&!_e||w&&$&&Q||!_&&Q||!S)return 1;if(!w&&!P&&!_e&&u1?_[S-1]:z,$=S>2?_[2]:z;for(P=u.length>3&&"function"==typeof P?(S--,P):z,$&&Tr(_[0],_[1],$)&&(P=S<3?z:P,S=1),f=ai(f);++w-1?S[P?f[$]:$]:z}}function Cs(u){return wo(function(f){var _=f.length,w=_,S=Ai.prototype.thru;for(u&&f.reverse();w--;){var P=f[w];if("function"!=typeof P)throw new Er(Un);if(S&&!$&&"wrapper"==rl(P))var $=new Ai([],!0)}for(w=$?w:_;++w<_;){var Y=rl(P=f[w]),Q="wrapper"==Y?X_(P):z;$=Q&&mh(Q[0])&&Q[1]==(Wa|ua|ha|fa)&&!Q[4].length&&1==Q[9]?$[rl(Q[0])].apply($,Q[3]):1==P.length&&mh(P)?$[Y]():$.thru(P)}return function(){var _e=arguments,ye=_e[0];if($&&1==_e.length&&sn(ye))return $.plant(ye).value();for(var be=0,Xe=_?f[be].apply(this,_e):ye;++be<_;)Xe=f[be].call(this,Xe);return Xe}})}function jd(u,f,_,w,S,P,$,Y,Q,_e){var ye=f&Wa,be=f&On,Xe=f&ur,bt=f&(ua|Tl),zt=f&md,mn=Xe?z:gp(u);return function Ht(){for(var An=arguments.length,Ln=ae(An),rs=An;rs--;)Ln[rs]=arguments[rs];if(bt)var ss=Sa(Ht),so=function eh(X,he){for(var ae=X.length,ze=0;ae--;)X[ae]===he&&++ze;return ze}(Ln,ss);if(w&&(Ln=$d(Ln,w,S,bt)),P&&(Ln=TA(Ln,P,$,bt)),An-=so,bt&&An<_e){var Ti=$i(Ln,ss);return ax(u,f,jd,Ht.placeholder,_,Ln,Ti,Y,Q,_e-An)}var Ts=be?_:this,So=Xe?Ts[u]:u;return An=Ln.length,Y?Ln=function Es(u,f){for(var _=u.length,w=Zr(f.length,_),S=eo(u);w--;){var P=f[w];u[w]=sl(P,_)?S[P]:z}return u}(Ln,Y):zt&&An>1&&Ln.reverse(),ye&&QY))return!1;var _e=P.get(u),ye=P.get(f);if(_e&&ye)return _e==f&&ye==u;var be=-1,Xe=!0,bt=_&Uo?new Et:z;for(P.set(u,f),P.set(f,u);++be-1&&u%1==0&&u1?"& ":"")+f[w],f=f.join(_>2?", ":" "),u.replace(b0,"{\n/* [wrapped with "+f+"] */\n")}(w,function BA(u,f){return Rn(d0,function(_){var w="_."+_[0];f&_[1]&&!kl(u,w)&&u.push(w)}),u.sort()}(function ux(u){var f=u.match(Mr);return f?f[1].split(LE):[]}(w),_)))}function yx(u){var f=0,_=0;return function(){var w=mF(),S=Kg-(w-_);if(_=w,S>0){if(++f>=ME)return arguments[0]}else f=0;return u.apply(z,arguments)}}function Ep(u,f){var _=-1,w=u.length,S=w-1;for(f=f===z?w:f;++_1?u[f-1]:z;return _="function"==typeof _?(u.pop(),_):z,yh(u,_)});function Hx(u){var f=I(u);return f.__chain__=!0,f}function Rp(u,f){return f(u)}var $x=wo(function(u){var f=u.length,_=f?u[0]:0,w=this.__wrapped__,S=function(P){return rh(P,u)};return!(f>1||this.__actions__.length)&&w instanceof kn&&sl(_)?((w=w.slice(_,+_+(f?1:0))).__actions__.push({func:Rp,args:[S],thisArg:z}),new Ai(w,this.__chain__).thru(function(P){return f&&!P.length&&P.push(z),P})):this.thru(S)}),s1=pp(function(u,f,_){ri.call(u,_)?++u[_]:$o(u,_,1)}),Wx=RA(Ex),Pp=RA(rv);function bv(u,f){return(sn(u)?Rn:nl)(u,Nt(f,3))}function zl(u,f){return(sn(u)?cF:k_)(u,Nt(f,3))}var a1=pp(function(u,f,_){ri.call(u,_)?u[_].push(f):$o(u,_,[f])}),c1=pn(function(u,f,_){var w=-1,S="function"==typeof f,P=no(u)?ae(u.length):[];return nl(u,function($){P[++w]=S?_s(f,$,_):ba($,f,_)}),P}),d1=pp(function(u,f,_){$o(u,_,f)});function Op(u,f){return(sn(u)?gi:sh)(u,Nt(f,3))}var Ea=pp(function(u,f,_){u[_?0:1].push(f)},function(){return[[],[]]}),v1=pn(function(u,f){if(null==u)return[];var _=f.length;return _>1&&Tr(u,f[0],f[1])?f=[]:_>2&&Tr(f[0],f[1],f[2])&&(f=[f[0]]),B_(u,Kn(f,1),[])}),Fp=dF||function(){return Sr.Date.now()};function xh(u,f,_){return f=_?z:f,xo(u,Wa,z,z,z,z,f=u&&null==f?u.length:f)}function Aa(u,f){var _;if("function"!=typeof f)throw new Er(Un);return u=un(u),function(){return--u>0&&(_=f.apply(this,arguments)),u<=1&&(f=z),_}}var Fc=pn(function(u,f,_){var w=On;if(_.length){var S=$i(_,Sa(Fc));w|=ha}return xo(u,w,f,_,S)}),xv=pn(function(u,f,_){var w=On|ur;if(_.length){var S=$i(_,Sa(xv));w|=ha}return xo(f,w,u,_,S)});function b1(u,f,_){var w,S,P,$,Y,Q,_e=0,ye=!1,be=!1,Xe=!0;if("function"!=typeof u)throw new Er(Un);function bt(Ti){var Ts=w,So=S;return w=S=z,_e=Ti,$=u.apply(So,Ts)}function Ht(Ti){var Ts=Ti-Q;return Q===z||Ts>=f||Ts<0||be&&Ti-_e>=P}function An(){var Ti=Fp();if(Ht(Ti))return Ln(Ti);Y=gh(An,function mn(Ti){var ID=f-(Ti-Q);return be?Zr(ID,P-(Ti-_e)):ID}(Ti))}function Ln(Ti){return Y=z,Xe&&w?bt(Ti):(w=S=z,$)}function so(){var Ti=Fp(),Ts=Ht(Ti);if(w=arguments,S=this,Q=Ti,Ts){if(Y===z)return function zt(Ti){return _e=Ti,Y=gh(An,f),ye?bt(Ti):$}(Q);if(be)return rx(Y),Y=gh(An,f),bt(Q)}return Y===z&&(Y=gh(An,f)),$}return f=Mo(f)||0,Mi(_)&&(ye=!!_.leading,P=(be="maxWait"in _)?fr(Mo(_.maxWait)||0,f):P,Xe="trailing"in _?!!_.trailing:Xe),so.cancel=function rs(){Y!==z&&rx(Y),_e=0,w=Q=S=Y=z},so.flush=function ss(){return Y===z?$:Ln(Fp())},so}var PF=pn(function(u,f){return sp(u,1,f)}),OF=pn(function(u,f,_){return sp(u,Mo(f)||0,_)});function qd(u,f){if("function"!=typeof u||null!=f&&"function"!=typeof f)throw new Er(Un);var _=function(){var w=arguments,S=f?f.apply(this,w):w[0],P=_.cache;if(P.has(S))return P.get(S);var $=u.apply(this,w);return _.cache=P.set(S,$)||P,$};return _.cache=new(qd.Cache||_a),_}function Sv(u){if("function"!=typeof u)throw new Er(Un);return function(){var f=arguments;switch(f.length){case 0:return!u.call(this);case 1:return!u.call(this,f[0]);case 2:return!u.call(this,f[0],f[1]);case 3:return!u.call(this,f[0],f[1],f[2])}return!u.apply(this,f)}}qd.Cache=_a;var Xx=Hd(function(u,f){var _=(f=1==f.length&&sn(f[0])?gi(f[0],Ur(Nt())):gi(Kn(f,1),Ur(Nt()))).length;return pn(function(w){for(var S=-1,P=Zr(w.length,_);++S=f}),Lc=Ud(function(){return arguments}())?Ud:function(u){return Pi(u)&&ri.call(u,"callee")&&!Dd.call(u,"callee")},sn=ae.isArray,LF=m_?Ur(m_):function xA(u){return Pi(u)&&es(u)==zu};function no(u){return null!=u&&zp(u.length)&&!Hl(u)}function wi(u){return Pi(u)&&no(u)}var ol=hF||Jd,ew=T0?Ur(T0):function yF(u){return Pi(u)&&es(u)==gc};function Up(u){if(!Pi(u))return!1;var f=es(u);return f==gd||f==AE||"string"==typeof u.message&&"string"==typeof u.name&&!io(u)}function Hl(u){if(!Mi(u))return!1;var f=es(u);return f==Ff||f==u0||f==EE||f==TE}function Vp(u){return"number"==typeof u&&u==un(u)}function zp(u){return"number"==typeof u&&u>-1&&u%1==0&&u<=Ya}function Mi(u){var f=typeof u;return null!=u&&("object"==f||"function"==f)}function Pi(u){return null!=u&&"object"==typeof u}var Tv=Ft?Ur(Ft):function wA(u){return Pi(u)&&Hr(u)==Vo};function wh(u){return"number"==typeof u||Pi(u)&&es(u)==Vu}function io(u){if(!Pi(u)||es(u)!=qa)return!1;var f=xs(u);if(null===f)return!0;var _=ri.call(f,"constructor")&&f.constructor;return"function"==typeof _&&_ instanceof _&&Ol.call(_)==P0}var $p=Wf?Ur(Wf):function xF(u){return Pi(u)&&es(u)==_d},iw=I0?Ur(I0):function L_(u){return Pi(u)&&Hr(u)==zo};function Gp(u){return"string"==typeof u||!sn(u)&&Pi(u)&&es(u)==_c}function As(u){return"symbol"==typeof u||Pi(u)&&es(u)==Lf}var jo=Xs?Ur(Xs):function X0(u){return Pi(u)&&zp(u.length)&&!!Ei[es(u)]},Pv=yp(cp),O1=yp(function(u,f){return u<=f});function Ov(u){if(!u)return[];if(no(u))return Gp(u)?yo(u):eo(u);if(ih&&u[ih])return function rA(X){for(var he,ae=[];!(he=X.next()).done;)ae.push(he.value);return ae}(u[ih]());var f=Hr(u);return(f==Vo?Xf:f==zo?Hn:Uc)(u)}function al(u){return u?(u=Mo(u))===In||u===-In?(u<0?-1:1)*SE:u==u?u:0:0===u?u:0}function un(u){var f=al(u),_=f%1;return f==f?_?f-_:f:0}function F1(u){return u?Nl(un(u),0,pa):0}function Mo(u){if("number"==typeof u)return u;if(As(u))return Of;if(Mi(u)){var f="function"==typeof u.valueOf?u.valueOf():u;u=Mi(f)?f+"":f}if("string"!=typeof u)return 0===u?u:+u;u=Wn(u);var _=Xa.test(u);return _||rr.test(u)?aF(u.slice(2),_?2:8):VE.test(u)?Of:+u}function $l(u){return di(u,Ds(u))}function Fn(u){return null==u?"":Js(u)}var vt=Dr(function(u,f){if(Mp(f)||no(f))di(f,pr(f),u);else for(var _ in f)ri.call(f,_)&&Qs(u,_,f[_])}),rw=Dr(function(u,f){di(f,Ds(f),u)}),Gl=Dr(function(u,f,_,w){di(f,Ds(f),u,w)}),ll=Dr(function(u,f,_,w){di(f,pr(f),u,w)}),N1=wo(rh),Bc=pn(function(u,f){u=ai(u);var _=-1,w=f.length,S=w>2?f[2]:z;for(S&&Tr(f[0],f[1],S)&&(w=1);++_1),P}),di(u,q_(u),_),w&&(_=Ms(_,Si|ms|js,Ca));for(var S=f.length;S--;)dh(_,f[S]);return _}),Y1=wo(function(u,f){return null==u?{}:function Q0(u,f){return J0(u,f,function(_,w){return Uv(u,w)})}(u,f)});function Vv(u,f){if(null==u)return{};var _=gi(q_(u),function(w){return[w]});return f=Nt(f),J0(u,_,function(w,S){return f(w,S[0])})}var lw=fh(pr),zv=fh(Ds);function Uc(u){return null==u?[]:Ju(u,pr(u))}var V=Wd(function(u,f,_){return f=f.toLowerCase(),u+(_?Hv(f):f)});function Hv(u){return Zd(Fn(u).toLowerCase())}function $v(u){return(u=Fn(u))&&u.replace(_o,nA).replace(eF,"")}var sD=Wd(function(u,f,_){return u+(_?"-":"")+f.toLowerCase()}),dw=Wd(function(u,f,_){return u+(_?" ":"")+f.toLowerCase()}),oD=Gd("toLowerCase"),Gv=Wd(function(u,f,_){return u+(_?"_":"")+f.toLowerCase()}),cD=Wd(function(u,f,_){return u+(_?" ":"")+Zd(f)}),pw=Wd(function(u,f,_){return u+(_?" ":"")+f.toUpperCase()}),Zd=Gd("toUpperCase");function mw(u,f,_){return u=Fn(u),(f=_?z:f)===z?function en(X){return ZE.test(X)}(u)?function fn(X){return X.match(tF)||[]}(u):function tA(X){return X.match(NE)||[]}(u):u.match(f)||[]}var jv=pn(function(u,f){try{return _s(u,z,f)}catch(_){return Up(_)?_:new jt(_)}}),fD=wo(function(u,f){return Rn(f,function(_){_=Go(_),$o(u,_,Fc(u[_],u))}),u});function Yv(u){return function(){return u}}var gw=Cs(),_D=Cs(!0);function is(u){return u}function Wp(u){return N_("function"==typeof u?u:Ms(u,Si))}var Xv=pn(function(u,f){return function(_){return ba(_,u,f)}}),vD=pn(function(u,f){return function(_){return ba(u,_,f)}});function _w(u,f,_){var w=pr(f),S=ya(f,w);null==_&&(!Mi(f)||!S.length&&w.length)&&(_=f,f=u,u=this,S=ya(f,pr(f)));var P=!(Mi(_)&&"chain"in _&&!_.chain),$=Hl(u);return Rn(S,function(Y){var Q=f[Y];u[Y]=Q,$&&(u.prototype[Y]=function(){var _e=this.__chain__;if(P||_e){var ye=u(this.__wrapped__);return(ye.__actions__=eo(this.__actions__)).push({func:Q,args:arguments,thisArg:u}),ye.__chain__=_e,ye}return Q.apply(u,Pl([this.value()],arguments))})}),u}function Co(){}var vw=_p(gi),bD=_p(JE),xD=_p(jf);function Mh(u){return mx(u)?__(Go(u)):function xa(u){return function(f){return Cc(f,u)}}(u)}var Kv=ox(),Ch=ox(!0);function Sh(){return[]}function Jd(){return!1}var wD=G_(function(u,f){return u+f},0),MD=W_("ceil"),xw=G_(function(u,f){return u/f},1),CD=W_("floor"),DD=G_(function(u,f){return u*f},1),jF=W_("round"),ty=G_(function(u,f){return u-f},0);return I.after=function y1(u,f){if("function"!=typeof f)throw new Er(Un);return u=un(u),function(){if(--u<1)return f.apply(this,arguments)}},I.ary=xh,I.assign=vt,I.assignIn=rw,I.assignInWith=Gl,I.assignWith=ll,I.at=N1,I.before=Aa,I.bind=Fc,I.bindAll=fD,I.bindKey=xv,I.castArray=function M1(){if(!arguments.length)return[];var u=arguments[0];return sn(u)?u:[u]},I.chain=Hx,I.chunk=function nv(u,f,_){f=(_?Tr(u,f,_):f===z)?1:fr(un(f),0);var w=null==u?0:u.length;if(!w||f<1)return[];for(var S=0,P=0,$=ae(w_(w/f));SS?0:S+_),(w=w===z||w>S?S:un(w))<0&&(w+=S),w=_>w?0:F1(w);_>>0)?(u=Fn(u))&&("string"==typeof f||null!=f&&!$p(f))&&!(f=Js(f))&&Sd(u)?Ic(yo(u),0,_):u.split(f,_):[]},I.spread=function Zx(u,f){if("function"!=typeof u)throw new Er(Un);return f=null==f?0:fr(un(f),0),pn(function(_){var w=_[f],S=Ic(_,0,f);return w&&Pl(S,w),_s(u,this,S)})},I.tail=function Oc(u){var f=null==u?0:u.length;return f?ts(u,1,f):[]},I.take=function Fx(u,f,_){return u&&u.length?ts(u,0,(f=_||f===z?1:un(f))<0?0:f):[]},I.takeRight=function Lx(u,f,_){var w=null==u?0:u.length;return w?ts(u,(f=w-(f=_||f===z?1:un(f)))<0?0:f,w):[]},I.takeRightWhile=function QA(u,f){return u&&u.length?uh(u,Nt(f,3),!1,!0):[]},I.takeWhile=function RF(u,f){return u&&u.length?uh(u,Nt(f,3)):[]},I.tap=function t1(u,f){return f(u),u},I.throttle=function Lp(u,f,_){var w=!0,S=!0;if("function"!=typeof u)throw new Er(Un);return Mi(_)&&(w="leading"in _?!!_.leading:w,S="trailing"in _?!!_.trailing:S),b1(u,f,{leading:w,maxWait:f,trailing:S})},I.thru=Rp,I.toArray=Ov,I.toPairs=lw,I.toPairsIn=zv,I.toPath=function bw(u){return sn(u)?gi(u,Go):As(u)?[u]:eo(bx(Fn(u)))},I.toPlainObject=$l,I.transform=function K1(u,f,_){var w=sn(u),S=w||ol(u)||jo(u);if(f=Nt(f,4),null==_){var P=u&&u.constructor;_=S?w?new P:[]:Mi(u)&&Hl(P)?Od(xs(u)):{}}return(S?Rn:ki)(u,function($,Y,Q){return f(_,$,Y,Q)}),_},I.unary=function Qx(u){return xh(u,1)},I.union=Dp,I.unionBy=JA,I.unionWith=Nx,I.uniq=function Bx(u){return u&&u.length?si(u):[]},I.uniqBy=function Ux(u,f){return u&&u.length?si(u,Nt(f,2)):[]},I.uniqWith=function fv(u,f){return f="function"==typeof f?f:z,u&&u.length?si(u,z,f):[]},I.unset=function Z1(u,f){return null==u||dh(u,f)},I.unzip=Tp,I.unzipWith=yh,I.update=function Q1(u,f,_){return null==u?u:ix(u,f,fp(_))},I.updateWith=function J1(u,f,_,w){return w="function"==typeof w?w:z,null==u?u:ix(u,f,fp(_),w)},I.values=Uc,I.valuesIn=function eD(u){return null==u?[]:Ju(u,Ds(u))},I.without=Ip,I.words=mw,I.wrap=function Av(u,f){return Ev(fp(f),u)},I.xor=Vx,I.xorBy=pv,I.xorWith=mv,I.zip=gv,I.zipObject=function bh(u,f){return Tc(u||[],f||[],Qs)},I.zipObjectDeep=function e1(u,f){return Tc(u||[],f||[],zd)},I.zipWith=zx,I.entries=lw,I.entriesIn=zv,I.extend=rw,I.extendWith=Gl,_w(I,I),I.add=wD,I.attempt=jv,I.camelCase=V,I.capitalize=Hv,I.ceil=MD,I.clamp=function tD(u,f,_){return _===z&&(_=f,f=z),_!==z&&(_=(_=Mo(_))==_?_:0),f!==z&&(f=(f=Mo(f))==f?f:0),Nl(Mo(u),f,_)},I.clone=function Zn(u){return Ms(u,js)},I.cloneDeep=function S1(u){return Ms(u,Si|js)},I.cloneDeepWith=function Np(u,f){return Ms(u,Si|js,f="function"==typeof f?f:z)},I.cloneWith=function C1(u,f){return Ms(u,js,f="function"==typeof f?f:z)},I.conformsTo=function Jx(u,f){return null==f||R_(u,f,pr(f))},I.deburr=$v,I.defaultTo=function gD(u,f){return null==u||u!=u?f:u},I.divide=xw,I.endsWith=function iD(u,f,_){u=Fn(u),f=Js(f);var w=u.length,S=_=_===z?w:Nl(un(_),0,w);return(_-=f.length)>=0&&u.slice(_,S)==f},I.eq=Wo,I.escape=function rD(u){return(u=Fn(u))&&FE.test(u)?u.replace(p0,ot):u},I.escapeRegExp=function cw(u){return(u=Fn(u))&&v0.test(u)?u.replace(s_,"\\$&"):u},I.every=function vv(u,f,_){var w=sn(u)?JE:j0;return _&&Tr(u,f,_)&&(f=z),w(u,Nt(f,3))},I.find=Wx,I.findIndex=Ex,I.findKey=function Fv(u,f){return ee(u,Nt(f,3),ki)},I.findLast=Pp,I.findLastIndex=rv,I.findLastKey=function Lv(u,f){return ee(u,Nt(f,3),P_)},I.floor=CD,I.forEach=bv,I.forEachRight=zl,I.forIn=function V1(u,f){return null==u?u:il(u,Nt(f,3),Ds)},I.forInRight=function Nv(u,f){return null==u?u:Di(u,Nt(f,3),Ds)},I.forOwn=function cl(u,f){return u&&ki(u,Nt(f,3))},I.forOwnRight=function z1(u,f){return u&&P_(u,Nt(f,3))},I.get=Bv,I.gt=E1,I.gte=A1,I.has=function G1(u,f){return null!=u&&hx(u,f,op)},I.hasIn=Uv,I.head=Dx,I.identity=is,I.includes=function l1(u,f,_,w){u=no(u)?u:Uc(u),_=_&&!w?un(_):0;var S=u.length;return _<0&&(_=fr(S+_,0)),Gp(u)?_<=S&&u.indexOf(f,_)>-1:!!S&&Lt(u,f,_)>-1},I.indexOf=function vh(u,f,_){var w=null==u?0:u.length;if(!w)return-1;var S=null==_?0:un(_);return S<0&&(S=fr(w+S,0)),Lt(u,f,S)},I.inRange=function nD(u,f,_){return f=al(f),_===z?(_=f,f=0):_=al(_),function O_(u,f,_){return u>=Zr(f,_)&&u=-Ya&&u<=Ya},I.isSet=iw,I.isString=Gp,I.isSymbol=As,I.isTypedArray=jo,I.isUndefined=function R1(u){return u===z},I.isWeakMap=function k1(u){return Pi(u)&&Hr(u)==vd},I.isWeakSet=function P1(u){return Pi(u)&&"[object WeakSet]"==es(u)},I.join=function Tx(u,f){return null==u?"":fF.call(u,f)},I.kebabCase=sD,I.last=Ir,I.lastIndexOf=function cv(u,f,_){var w=null==u?0:u.length;if(!w)return-1;var S=w;return _!==z&&(S=(S=un(_))<0?fr(w+S,0):Zr(S,w-1)),f==f?function Ed(X,he,ae){for(var ze=ae+1;ze--;)if(X[ze]===he)return ze;return ze}(u,f,S):Qu(u,qf,S,!0)},I.lowerCase=dw,I.lowerFirst=oD,I.lt=Pv,I.lte=O1,I.max=function ww(u){return u&&u.length?Nd(u,is,Bd):z},I.maxBy=function Mw(u,f){return u&&u.length?Nd(u,Nt(f,2),Bd):z},I.mean=function SD(u){return Cd(u,is)},I.meanBy=function ED(u,f){return Cd(u,Nt(f,2))},I.min=function ro(u){return u&&u.length?Nd(u,is,cp):z},I.minBy=function AD(u,f){return u&&u.length?Nd(u,Nt(f,2),cp):z},I.stubArray=Sh,I.stubFalse=Jd,I.stubObject=function yw(){return{}},I.stubString=function Zv(){return""},I.stubTrue=function Qv(){return!0},I.multiply=DD,I.nth=function Ix(u,f){return u&&u.length?CA(u,un(f)):z},I.noConflict=function E(){return Sr._===this&&(Sr._=Zf),this},I.noop=Co,I.now=Fp,I.pad=function aD(u,f,_){u=Fn(u);var w=(f=un(f))?hr(u):0;if(!f||w>=f)return u;var S=(f-w)/2;return vp(M_(S),_)+u+vp(w_(S),_)},I.padEnd=function VF(u,f,_){u=Fn(u);var w=(f=un(f))?hr(u):0;return f&&wf){var w=u;u=f,f=w}if(_||u%1||f%1){var S=C_();return Zr(u+S*(f-u+Pe("1e-"+((S+"").length-1))),f)}return lh(u,f)},I.reduce=function u1(u,f,_){var w=sn(u)?g_:R0,S=arguments.length<3;return w(u,Nt(f,4),_,S,nl)},I.reduceRight=function h1(u,f,_){var w=sn(u)?eA:R0,S=arguments.length<3;return w(u,Nt(f,4),_,S,k_)},I.repeat=function Gi(u,f,_){return f=(_?Tr(u,f,_):f===z)?1:un(f),ch(Fn(u),f)},I.replace=function lD(){var u=arguments,f=Fn(u[0]);return u.length<3?f:f.replace(u[1],u[2])},I.result=function q1(u,f,_){var w=-1,S=(f=Ma(f,u)).length;for(S||(S=1,u=z);++wYa)return[];var _=pa,w=Zr(u,pa);f=Nt(f),u-=pa;for(var S=Ks(w,f);++_=P)return u;var Y=_-hr(w);if(Y<1)return w;var Q=$?Ic($,0,Y).join(""):u.slice(0,Y);if(S===z)return Q+w;if($&&(Y+=Q.length-Y),$p(S)){if(u.slice(Y).search(S)){var _e,ye=Q;for(S.global||(S=bc(S.source,Fn(w0.exec(S))+"g")),S.lastIndex=0;_e=S.exec(ye);)var be=_e.index;Q=Q.slice(0,be===z?Y:be)}}else if(u.indexOf(Js(S),Y)!=Y){var Xe=Q.lastIndexOf(S);Xe>-1&&(Q=Q.slice(0,Xe))}return Q+w},I.unescape=function hD(u){return(u=Fn(u))&&OE.test(u)?u.replace(f0,Kf):u},I.uniqueId=function ey(u){var f=++bi;return Fn(u)+f},I.upperCase=pw,I.upperFirst=Zd,I.each=bv,I.eachRight=zl,I.first=Dx,_w(I,function(){var u={};return ki(I,function(f,_){ri.call(I.prototype,_)||(u[_]=f)}),u}(),{chain:!1}),I.VERSION="4.17.21",Rn(["bind","bindKey","curry","curryRight","partial","partialRight"],function(u){I[u].placeholder=I}),Rn(["drop","take"],function(u,f){kn.prototype[u]=function(_){_=_===z?1:fr(un(_),0);var w=this.__filtered__&&!f?new kn(this):this.clone();return w.__filtered__?w.__takeCount__=Zr(_,w.__takeCount__):w.__views__.push({size:Zr(_,pa),type:u+(w.__dir__<0?"Right":"")}),w},kn.prototype[u+"Right"]=function(_){return this.reverse()[u](_).reverse()}}),Rn(["filter","map","takeWhile"],function(u,f){var _=f+1,w=1==_||3==_;kn.prototype[u]=function(S){var P=this.clone();return P.__iteratees__.push({iteratee:Nt(S,3),type:_}),P.__filtered__=P.__filtered__||w,P}}),Rn(["head","last"],function(u,f){var _="take"+(f?"Right":"");kn.prototype[u]=function(){return this[_](1).value()[0]}}),Rn(["initial","tail"],function(u,f){var _="drop"+(f?"":"Right");kn.prototype[u]=function(){return this.__filtered__?new kn(this):this[_](1)}}),kn.prototype.compact=function(){return this.filter(is)},kn.prototype.find=function(u){return this.filter(u).head()},kn.prototype.findLast=function(u){return this.reverse().find(u)},kn.prototype.invokeMap=pn(function(u,f){return"function"==typeof u?new kn(this):this.map(function(_){return ba(_,u,f)})}),kn.prototype.reject=function(u){return this.filter(Sv(Nt(u)))},kn.prototype.slice=function(u,f){u=un(u);var _=this;return _.__filtered__&&(u>0||f<0)?new kn(_):(u<0?_=_.takeRight(-u):u&&(_=_.drop(u)),f!==z&&(_=(f=un(f))<0?_.dropRight(-f):_.take(f-u)),_)},kn.prototype.takeRightWhile=function(u){return this.reverse().takeWhile(u).reverse()},kn.prototype.toArray=function(){return this.take(pa)},ki(kn.prototype,function(u,f){var _=/^(?:filter|find|map|reject)|While$/.test(f),w=/^(?:head|last)$/.test(f),S=I[w?"take"+("last"==f?"Right":""):f],P=w||/^find/.test(f);S&&(I.prototype[f]=function(){var $=this.__wrapped__,Y=w?[1]:arguments,Q=$ instanceof kn,_e=Y[0],ye=Q||sn($),be=function(An){var Ln=S.apply(I,Pl([An],Y));return w&&Xe?Ln[0]:Ln};ye&&_&&"function"==typeof _e&&1!=_e.length&&(Q=ye=!1);var Xe=this.__chain__,zt=P&&!Xe,mn=Q&&!this.__actions__.length;if(!P&&ye){$=mn?$:new kn(this);var Ht=u.apply($,Y);return Ht.__actions__.push({func:Rp,args:[be],thisArg:z}),new Ai(Ht,Xe)}return zt&&mn?u.apply(this,Y):(Ht=this.thru(be),zt?w?Ht.value()[0]:Ht.value():Ht)})}),Rn(["pop","push","shift","sort","splice","unshift"],function(u){var f=sr[u],_=/^(?:push|sort|unshift)$/.test(u)?"tap":"thru",w=/^(?:pop|shift)$/.test(u);I.prototype[u]=function(){var S=arguments;if(w&&!this.__chain__){var P=this.value();return f.apply(sn(P)?P:[],S)}return this[_](function($){return f.apply(sn($)?$:[],S)})}}),ki(kn.prototype,function(u,f){var _=I[f];if(_){var w=_.name+"";ri.call(kd,w)||(kd[w]=[]),kd[w].push({name:f,func:_})}}),kd[jd(z,ur).name]=[{name:"wrapper",func:z}],kn.prototype.clone=function U0(){var u=new kn(this.__wrapped__);return u.__actions__=eo(this.__actions__),u.__dir__=this.__dir__,u.__filtered__=this.__filtered__,u.__iteratees__=eo(this.__iteratees__),u.__takeCount__=this.__takeCount__,u.__views__=eo(this.__views__),u},kn.prototype.reverse=function Fd(){if(this.__filtered__){var u=new kn(this);u.__dir__=-1,u.__filtered__=!0}else(u=this.clone()).__dir__*=-1;return u},kn.prototype.value=function ws(){var u=this.__wrapped__.value(),f=this.__dir__,_=sn(u),w=f<0,S=_?u.length:0,P=function wp(u,f,_){for(var w=-1,S=_.length;++w=this.__values__.length;return{done:u,value:u?z:this.__values__[this.__index__++]}},I.prototype.plant=function n1(u){for(var f,_=this;_ instanceof wc;){var w=ns(_);w.__index__=0,w.__values__=z,f?S.__wrapped__=w:f=w;var S=w;_=_.__wrapped__}return S.__wrapped__=u,f},I.prototype.reverse=function r1(){var u=this.__wrapped__;if(u instanceof kn){var f=u;return this.__actions__.length&&(f=new kn(this)),(f=f.reverse()).__actions__.push({func:Rp,args:[dv],thisArg:z}),new Ai(f,this.__chain__)}return this.thru(dv)},I.prototype.toJSON=I.prototype.valueOf=I.prototype.value=function kF(){return wa(this.__wrapped__,this.__actions__)},I.prototype.first=I.prototype.head,ih&&(I.prototype[ih]=function Yd(){return this}),I}();Sr._=ys,(dn=function(){return ys}.call(Gs,ps,Gs,Bo))!==z&&(Bo.exports=dn)}.call(this)},738:function(Bo){var Gs;Bo.exports=((Gs=function(){function ps(Ci){return Br.appendChild(Ci.dom),Ci}function dn(Ci){for(var Si=0;SiQt+1e3&&(Dl.update(1e3*Un/(Ci-Qt),100),Qt=Ci,Un=0,Ws)){var Si=performance.memory;Ws.update(Si.usedJSHeapSize/1048576,Si.jsHeapSizeLimit/1048576)}return Ci},update:function(){Kr=this.end()},domElement:Br,setMode:dn}}).Panel=function(ps,dn,z){var Br=1/0,Kr=0,Qt=Math.round,Un=Qt(window.devicePixelRatio||1),Dl=80*Un,Ga=48*Un,Ws=3*Un,Ci=2*Un,Si=3*Un,ms=15*Un,js=74*Un,Ys=30*Un,Uo=document.createElement("canvas");Uo.width=Dl,Uo.height=Ga,Uo.style.cssText="width:80px;height:48px";var On=Uo.getContext("2d");return On.font="bold "+9*Un+"px Helvetica,Arial,sans-serif",On.textBaseline="top",On.fillStyle=z,On.fillRect(0,0,Dl,Ga),On.fillStyle=dn,On.fillText(ps,Ws,Ci),On.fillRect(Si,ms,js,Ys),On.fillStyle=z,On.globalAlpha=.9,On.fillRect(Si,ms,js,Ys),{dom:Uo,update:function(ur,mc){Br=Math.min(Br,ur),Kr=Math.max(Kr,ur),On.fillStyle=z,On.globalAlpha=1,On.fillRect(0,0,Dl,ms),On.fillStyle=dn,On.fillText(Qt(ur)+" "+ps+" ("+Qt(Br)+"-"+Qt(Kr)+")",Ws,Ci),On.drawImage(Uo,Si+Un,ms,js-Un,Ys,Si,ms,js-Un,Ys),On.fillRect(Si+js-Un,ms,Un,Ys),On.fillStyle=z,On.globalAlpha=.9,On.fillRect(Si+js-Un,ms,Un,Qt((1-ur/mc)*Ys))}}},Gs)}},Bo=>{Bo(Bo.s=360)}]); \ No newline at end of file diff --git a/frontend/src/app/components/editor/eac/tri-map.block-ui/tri-map.block-ui.component.ts b/frontend/src/app/components/editor/eac/tri-map.block-ui/tri-map.block-ui.component.ts index ee9af78..70adab5 100644 --- a/frontend/src/app/components/editor/eac/tri-map.block-ui/tri-map.block-ui.component.ts +++ b/frontend/src/app/components/editor/eac/tri-map.block-ui/tri-map.block-ui.component.ts @@ -164,7 +164,7 @@ export class Nfs1MapWorldEntity extends MapGraph3dEntity { texture.wrapS = RepeatWrapping; texture.wrapT = ClampToEdgeWrapping; diff --git a/serializers/common/three_d/__init__.py b/serializers/common/three_d/__init__.py new file mode 100644 index 0000000..3dbc319 --- /dev/null +++ b/serializers/common/three_d/__init__.py @@ -0,0 +1,3 @@ +from .mesh import Mesh, SubMesh +from .scenes import Scene, export_scenes +from .splines import BarrierPath diff --git a/library/utils/blender_scripts.py b/serializers/common/three_d/blender_scripts.py similarity index 100% rename from library/utils/blender_scripts.py rename to serializers/common/three_d/blender_scripts.py diff --git a/serializers/misc/build_blender_scene.py b/serializers/common/three_d/build_blender_scene.py similarity index 100% rename from serializers/misc/build_blender_scene.py rename to serializers/common/three_d/build_blender_scene.py diff --git a/serializers/common/three_d/mesh.py b/serializers/common/three_d/mesh.py new file mode 100644 index 0000000..45f9829 --- /dev/null +++ b/serializers/common/three_d/mesh.py @@ -0,0 +1,132 @@ +import math +from abc import ABC, abstractmethod +from typing import Tuple, List + + +class BaseMesh(ABC): + def __init__(self): + self.name = None + self.vertices = [] + self.polygons = [] + self.vertex_uvs = [] + self.pivot_offset = (0, 0, 0) + + def rotate_z(self, angle): + c, s = math.cos(angle), math.sin(angle) + self.vertices = [[p[0] * c - p[1] * s, p[0] * s + p[1] * c, p[2]] + for p in self.vertices] + + @abstractmethod + def to_obj(self, face_index_increment, mtllib=None, pivot_offset=None) -> Tuple[str, int]: + raise NotImplementedError + + def change_axes(self, new_x='x', new_y='y', new_z='z'): + map = { + 'x': 0, + 'y': 1, + 'z': 2, + } + + def get_value_from_vertex_list(vertex: list[int], coordinate: str) -> int: + value = vertex[map[coordinate[-1]]] + if coordinate[0] == '-': + value = -value + return value + + self.vertices = [[ + get_value_from_vertex_list(v, new_x), + get_value_from_vertex_list(v, new_y), + get_value_from_vertex_list(v, new_z), + ] for v in self.vertices] + + # after deleting polygons should call this function + def remove_orphaned_vertices(self): + orphans = [vi for vi in range(len(self.vertices)) if + vi not in [element for sublist in self.polygons for element in sublist]] + self.vertices = [v for (i, v) in enumerate(self.vertices) if i not in orphans] + self.vertex_uvs = [v for (i, v) in enumerate(self.vertex_uvs) if i not in orphans] + for removed_index in orphans[::-1]: + for j, p in enumerate(self.polygons): + self.polygons[j] = [idx if idx <= removed_index else idx - 1 for idx in p] + + +# Mesh with one single texture +class SubMesh(BaseMesh): + def __init__(self): + super().__init__() + self.texture_id = None + + def to_obj(self, face_index_increment, mtllib=None, pivot_offset=None) -> Tuple[str, int]: + if pivot_offset is None: + pivot_offset = self.pivot_offset + res = f'\n\no {self.name}' + if mtllib is not None: + res += f'\nmtllib {mtllib}' + res += '\n' + '\n'.join(['v ' + ' '.join( + [str(coordinates[i] - pivot_offset[i]) for i in range(3)] + ) for coordinates in self.vertices]) + res += '\n' + '\n'.join([f'vt {uv[0]} {1 - uv[1]}' for uv in self.vertex_uvs]) + if self.texture_id: + res += '\nusemtl ' + self.texture_id + res += '\n' + '\n'.join( + ['f ' + ' '.join([f'{x + face_index_increment}/{x + face_index_increment}' for x in polygon]) for polygon in + self.polygons]) + return res, len(self.vertices) + + +# Mesh with multiple textures +class Mesh(BaseMesh): + def __init__(self): + super().__init__() + self.texture_ids = [] + + # splits mesh to few single-texture meshes. Returns list of tuples: ( mesh, vertex index map, polygon index map ) + def split_by_texture_ids(self) -> List[Tuple[SubMesh, List[int], List[int]]]: + texture_ids = list({x for x in self.texture_ids}) + texture_ids.sort() + if len(texture_ids) == 1: + sm = SubMesh() + sm.name = self.name + sm.pivot_offset = self.pivot_offset + sm.texture_id = texture_ids[0] + sm.vertices = self.vertices + sm.vertex_uvs = self.vertex_uvs + sm.polygons = self.polygons + return [(sm, list(range(len(self.vertices))), list(range(len(self.polygons))))] + res = [] + for texture_id in texture_ids: + sm = SubMesh() + sm.name = (self.name or 'None') + '__' + (texture_id or 'None') + sm.pivot_offset = self.pivot_offset + sm.texture_id = texture_id + vertex_indices = [] + polygon_indices = [] + for i, p in enumerate(self.polygons): + if self.texture_ids[i] != texture_id: + continue + polygon_indices.append(i) + new_polygon = [] + for idx in p: + try: + new_idx = vertex_indices.index(idx) + except ValueError: + new_idx = len(vertex_indices) + vertex_indices.append(idx) + new_polygon.append(new_idx) + sm.polygons.append(new_polygon) + for v_idx in vertex_indices: + sm.vertices.append(self.vertices[v_idx]) + sm.vertex_uvs.append(self.vertex_uvs[v_idx]) + res.append((sm, vertex_indices, polygon_indices)) + return res + + def to_obj(self, face_index_increment, mtllib=None, pivot_offset=None) -> Tuple[str, int]: + sub_meshes = self.split_by_texture_ids() + if len(sub_meshes) == 1: + return sub_meshes[0][0].to_obj(face_index_increment, mtllib, pivot_offset) + obj_texts = [] + for (sub_model, _, _) in sub_meshes: + obj, fii = sub_model.to_obj(face_index_increment, mtllib, pivot_offset) + obj_texts.append(obj) + face_index_increment += fii + return '\n\n'.join(obj_texts), face_index_increment diff --git a/serializers/common/three_d/scenes.py b/serializers/common/three_d/scenes.py new file mode 100644 index 0000000..0de3950 --- /dev/null +++ b/serializers/common/three_d/scenes.py @@ -0,0 +1,130 @@ +import json +import os +from string import Template +from typing import Callable +from typing import List + +from .blender_scripts import get_blender_save_script, run_blender +from .build_blender_scene import construct_blender_export_script +from .mesh import SubMesh + + +class Scene: + def __init__(self, + name: str = 'scene', + sub_meshes: List[SubMesh] = None, + obj_name: str = 'geometry', + mtl_name: str = 'material', + bake_textures: bool = True, + mtl_texture_names: List[str] = None, + mtl_texture_path_func: Callable[[str], str] = lambda x: x, + dummies: List[dict] = None, + curves: List[dict] = None, + extra_script: str = None, + skip_obj_export: bool = False, + skip_mtl_export: bool = False): + self.name = name + self.sub_meshes = sub_meshes or [] + self.obj_name = obj_name + self.mtl_name = mtl_name + self.bake_textures = bake_textures + self.mtl_texture_names = mtl_texture_names or [] + self.mtl_texture_path_func = mtl_texture_path_func + self.dummies = dummies or [] + self.curves = curves or [] + self.extra_script = extra_script or "" + self.skip_obj_export = skip_obj_export + self.skip_mtl_export = skip_mtl_export + + +def export_scenes(scenes: List[Scene], output_path: str, settings): + mtl_entry_template = Template(""" + +newmtl $texture_name +Ka 1.000000 1.000000 1.000000 +Kd 1.000000 1.000000 1.000000 +Ks 0.000000 0.000000 0.000000 +illum 1 +Ns 0.000000 +map_Kd $texture_path""") + + import_template = Template(""" +import json +from mathutils import Euler + +bpy.ops.wm.read_factory_settings(use_empty=True) +if "$obj_file_path": + bpy.ops.wm.obj_import(filepath="$obj_file_path", forward_axis='Y', up_axis='Z') + +dummies = json.loads('$dummies') or [] +for dummy in dummies: + o = bpy.data.objects.new( dummy['name'], None ) + bpy.context.scene.collection.objects.link(o) + o.location = dummy.get('position', [0, 0, 0]) + o.rotation_mode = 'QUATERNION' + o.rotation_quaternion = Euler(tuple(dummy.get('rotation', [0, 0, 0])), 'XYZ').to_quaternion() + dummy_props = dummy.get('properties', {}) + for key, value in dummy_props.items(): + o[key] = value + +curves = json.loads('$curves') or [] +for curve in curves: + curveData = bpy.data.curves.new(curve['name'], type='CURVE') + curveData.dimensions = '3D' + curveData.resolution_u = 2 + polyline = curveData.splines.new('POLY') + polyline.points.add(len(curve['points']) - 1) + for i, [x,y,z] in enumerate(curve['points']): + polyline.points[i].co = (x, y, z, 1) + polyline.use_cyclic_u = curve.get('closed', False) + curveOB = bpy.data.objects.new(curve['name'], curveData) + bpy.context.collection.objects.link(curveOB) + curve_props = curve.get('properties', {}) + for (key, value) in curve_props.items(): + curveOB[key] = value + +$extra_script + """) + + for scene in scenes: + if not scene.skip_obj_export: + with open(os.path.join(output_path, f'{scene.obj_name}.obj'), 'w') as f: + if scene.mtl_name: + f.write(f'mtllib {scene.mtl_name}.mtl') + face_index_increment = 1 + for sub_model in scene.sub_meshes: + obj, fii = sub_model.to_obj(face_index_increment) + f.write(obj) + face_index_increment += fii + if scene.mtl_name and not scene.skip_mtl_export: + with open(os.path.join(output_path, f'{scene.mtl_name}.mtl'), 'w') as f: + for texture_name in sorted(list({x for x in scene.mtl_texture_names})): + f.write(mtl_entry_template.substitute({ + 'texture_name': texture_name, + 'texture_path': scene.mtl_texture_path_func(texture_name), + })) + + if settings.geometry__export_to_gg_web_engine or settings.geometry__save_blend: + script = '' + for scene in scenes: + script += '\n\n' + import_template.substitute({ + 'obj_file_path': f'{scene.obj_name}.obj' if not scene.skip_obj_export else '', + 'dummies': json.dumps(scene.dummies), + 'curves': json.dumps(scene.curves), + 'extra_script': scene.extra_script, + }) + if settings.geometry__export_to_gg_web_engine: + script += '\n' + construct_blender_export_script( + file_name=os.path.join(os.getcwd(), output_path, scene.name), + export_materials='EXPORT' if scene.bake_textures else 'NONE') + if settings.geometry__save_blend: + script += '\n\n' + get_blender_save_script( + out_blend_name=os.path.join(os.getcwd(), output_path, scene.name)) + run_blender(path=output_path, script=script) + + if not settings.geometry__save_obj: + for scene in scenes: + if not scene.skip_obj_export: + os.unlink(os.path.join(output_path, scene.obj_name + '.obj')) + if scene.mtl_name and not scene.skip_mtl_export: + os.unlink(os.path.join(output_path, scene.mtl_name + '.mtl')) diff --git a/serializers/common/three_d/splines.py b/serializers/common/three_d/splines.py new file mode 100644 index 0000000..db17292 --- /dev/null +++ b/serializers/common/three_d/splines.py @@ -0,0 +1,62 @@ +import math +from typing import List + + +class BarrierPath: + def __init__(self, points: List[List[float]]) -> None: + super().__init__() + self.points = points + self.is_closed = points[0] == points[-1] + self.z_up = False + + @property + def middle_points(self): + return [[(self.points[i][j] + self.points[i + 1][j]) / 2 for j in range(3)] for i in + range(len(self.points) - 1)] + + @property + def lengths(self): + return [math.sqrt((self.points[i][0] - self.points[i + 1][0]) ** 2 + + (self.points[i][1 if self.z_up else 2] - self.points[i + 1][ + 1 if self.z_up else 2]) ** 2) + for i in range(len(self.points) - 1)] + + @property + def orientations(self): + return [math.atan2(self.points[i + 1][0] - self.points[i][0], + self.points[i + 1][1 if self.z_up else 2] - self.points[i][1 if self.z_up else 2]) + for i in range(len(self.points) - 1)] + + def fix_angle(self, angle): + while angle > math.pi: + angle -= 2 * math.pi + while angle <= -math.pi: + angle += 2 * math.pi + return angle + + def optimize(self): + orientations = self.orientations + lengths = self.lengths + delta_angles = [abs(math.sin(orientations[i] - orientations[i + 1]) * (lengths[i] + lengths[i + 1])) + for i in range(len(orientations) - 1)] + if self.is_closed: + # make the most valuable angle as break + break_delta_angle = abs(self.fix_angle(orientations[-1] - orientations[0])) + max_delta_angle = max(delta_angles) + if max_delta_angle > break_delta_angle: + index = delta_angles.index(max_delta_angle) + self.points = self.points[index + 1:] + self.points[:index + 2] + orientations = self.orientations + lengths = self.lengths + delta_angles = [abs(math.sin(orientations[i] - orientations[i + 1]) * (lengths[i] + lengths[i + 1])) + for i in range(len(orientations) - 1)] + while True: + min_delta_angle = min(delta_angles) + if min_delta_angle > 0.3: # 30cm threshold + break + index = delta_angles.index(min_delta_angle) + self.points = self.points[:index + 1] + self.points[index + 2:] + orientations = self.orientations + lengths = self.lengths + delta_angles = [abs(math.sin(orientations[i] - orientations[i + 1]) * (lengths[i] + lengths[i + 1])) + for i in range(len(orientations) - 1)] diff --git a/serializers/common/three_d_scenes.py b/serializers/common/three_d_scenes.py deleted file mode 100644 index a2f9b71..0000000 --- a/serializers/common/three_d_scenes.py +++ /dev/null @@ -1,260 +0,0 @@ -import json -import math -import os -from abc import ABC, abstractmethod -from string import Template -from typing import Callable -from typing import Tuple, List - -from library.utils.blender_scripts import run_blender, get_blender_save_script - - -class BaseMesh(ABC): - def __init__(self): - self.name = None - self.vertices = [] - self.polygons = [] - self.vertex_uvs = [] - self.pivot_offset = (0, 0, 0) - - def rotate_z(self, angle): - c, s = math.cos(angle), math.sin(angle) - self.vertices = [[p[0] * c - p[1] * s, p[0] * s + p[1] * c, p[2]] - for p in self.vertices] - - @abstractmethod - def to_obj(self, face_index_increment, mtllib=None, pivot_offset=None) -> Tuple[str, int]: - raise NotImplementedError - - def change_axes(self, new_x='x', new_y='y', new_z='z'): - map = { - 'x': 0, - 'y': 1, - 'z': 2, - } - - def get_value_from_vertex_list(vertex: list[int], coordinate: str) -> int: - value = vertex[map[coordinate[-1]]] - if coordinate[0] == '-': - value = -value - return value - - self.vertices = [[ - get_value_from_vertex_list(v, new_x), - get_value_from_vertex_list(v, new_y), - get_value_from_vertex_list(v, new_z), - ] for v in self.vertices] - - # after deleting polygons should call this function - def remove_orphaned_vertices(self): - orphans = [vi for vi in range(len(self.vertices)) if - vi not in [element for sublist in self.polygons for element in sublist]] - self.vertices = [v for (i, v) in enumerate(self.vertices) if i not in orphans] - self.vertex_uvs = [v for (i, v) in enumerate(self.vertex_uvs) if i not in orphans] - for removed_index in orphans[::-1]: - for j, p in enumerate(self.polygons): - self.polygons[j] = [idx if idx <= removed_index else idx - 1 for idx in p] - - -# Mesh with one single texture -class SubMesh(BaseMesh): - def __init__(self): - super().__init__() - self.texture_id = None - - def to_obj(self, face_index_increment, mtllib=None, pivot_offset=None) -> Tuple[str, int]: - if pivot_offset is None: - pivot_offset = self.pivot_offset - res = f'\n\no {self.name}' - if mtllib is not None: - res += f'\nmtllib {mtllib}' - res += '\n' + '\n'.join(['v ' + ' '.join( - [str(coordinates[i] - pivot_offset[i]) for i in range(3)] - ) for coordinates in self.vertices]) - res += '\n' + '\n'.join([f'vt {uv[0]} {1 - uv[1]}' for uv in self.vertex_uvs]) - if self.texture_id: - res += '\nusemtl ' + self.texture_id - res += '\n' + '\n'.join( - ['f ' + ' '.join([f'{x + face_index_increment}/{x + face_index_increment}' for x in polygon]) for polygon in - self.polygons]) - return res, len(self.vertices) - - -# Mesh with multiple textures -class Mesh(BaseMesh): - def __init__(self): - super().__init__() - self.texture_ids = [] - - # splits mesh to few single-texture meshes. Returns list of tuples: ( mesh, vertex index map, polygon index map ) - def split_by_texture_ids(self) -> List[Tuple[SubMesh, List[int], List[int]]]: - texture_ids = list({x for x in self.texture_ids}) - texture_ids.sort() - if len(texture_ids) == 1: - sm = SubMesh() - sm.name = self.name - sm.pivot_offset = self.pivot_offset - sm.texture_id = texture_ids[0] - sm.vertices = self.vertices - sm.vertex_uvs = self.vertex_uvs - sm.polygons = self.polygons - return [(sm, list(range(len(self.vertices))), list(range(len(self.polygons))))] - res = [] - for texture_id in texture_ids: - sm = SubMesh() - sm.name = (self.name or 'None') + '__' + (texture_id or 'None') - sm.pivot_offset = self.pivot_offset - sm.texture_id = texture_id - vertex_indices = [] - polygon_indices = [] - for i, p in enumerate(self.polygons): - if self.texture_ids[i] != texture_id: - continue - polygon_indices.append(i) - new_polygon = [] - for idx in p: - try: - new_idx = vertex_indices.index(idx) - except ValueError: - new_idx = len(vertex_indices) - vertex_indices.append(idx) - new_polygon.append(new_idx) - sm.polygons.append(new_polygon) - for v_idx in vertex_indices: - sm.vertices.append(self.vertices[v_idx]) - sm.vertex_uvs.append(self.vertex_uvs[v_idx]) - res.append((sm, vertex_indices, polygon_indices)) - return res - - def to_obj(self, face_index_increment, mtllib=None, pivot_offset=None) -> Tuple[str, int]: - sub_meshes = self.split_by_texture_ids() - if len(sub_meshes) == 1: - return sub_meshes[0][0].to_obj(face_index_increment, mtllib, pivot_offset) - obj_texts = [] - for (sub_model, _, _) in sub_meshes: - obj, fii = sub_model.to_obj(face_index_increment, mtllib, pivot_offset) - obj_texts.append(obj) - face_index_increment += fii - return '\n\n'.join(obj_texts), face_index_increment - - -class Scene: - def __init__(self, - name: str = 'scene', - sub_meshes: List[SubMesh] = None, - obj_name: str = 'geometry', - mtl_name: str = 'material', - bake_textures: bool = True, - mtl_texture_names: List[str] = None, - mtl_texture_path_func: Callable[[str], str] = lambda x: x, - dummies: List[dict] = None, - curves: List[dict] = None, - extra_script: str = None, - skip_obj_export: bool = False, - skip_mtl_export: bool = False): - self.name = name - self.sub_meshes = sub_meshes or [] - self.obj_name = obj_name - self.mtl_name = mtl_name - self.bake_textures = bake_textures - self.mtl_texture_names = mtl_texture_names or [] - self.mtl_texture_path_func = mtl_texture_path_func - self.dummies = dummies or [] - self.curves = curves or [] - self.extra_script = extra_script or "" - self.skip_obj_export = skip_obj_export - self.skip_mtl_export = skip_mtl_export - - -def export_scenes(scenes: List[Scene], output_path: str, settings): - mtl_entry_template = Template(""" - -newmtl $texture_name -Ka 1.000000 1.000000 1.000000 -Kd 1.000000 1.000000 1.000000 -Ks 0.000000 0.000000 0.000000 -illum 1 -Ns 0.000000 -map_Kd $texture_path""") - - import_template = Template(""" -import json -from mathutils import Euler - -bpy.ops.wm.read_factory_settings(use_empty=True) -if "$obj_file_path": - bpy.ops.wm.obj_import(filepath="$obj_file_path", forward_axis='Y', up_axis='Z') - -dummies = json.loads('$dummies') or [] -for dummy in dummies: - o = bpy.data.objects.new( dummy['name'], None ) - bpy.context.scene.collection.objects.link(o) - o.location = dummy.get('position', [0, 0, 0]) - o.rotation_mode = 'QUATERNION' - o.rotation_quaternion = Euler(tuple(dummy.get('rotation', [0, 0, 0])), 'XYZ').to_quaternion() - dummy_props = dummy.get('properties', {}) - for key, value in dummy_props.items(): - o[key] = value - -curves = json.loads('$curves') or [] -for curve in curves: - curveData = bpy.data.curves.new(curve['name'], type='CURVE') - curveData.dimensions = '3D' - curveData.resolution_u = 2 - polyline = curveData.splines.new('POLY') - polyline.points.add(len(curve['points']) - 1) - for i, [x,y,z] in enumerate(curve['points']): - polyline.points[i].co = (x, y, z, 1) - polyline.use_cyclic_u = curve.get('closed', False) - curveOB = bpy.data.objects.new(curve['name'], curveData) - bpy.context.collection.objects.link(curveOB) - curve_props = curve.get('properties', {}) - for (key, value) in curve_props.items(): - curveOB[key] = value - -$extra_script - """) - - for scene in scenes: - if not scene.skip_obj_export: - with open(os.path.join(output_path, f'{scene.obj_name}.obj'), 'w') as f: - if scene.mtl_name: - f.write(f'mtllib {scene.mtl_name}.mtl') - face_index_increment = 1 - for sub_model in scene.sub_meshes: - obj, fii = sub_model.to_obj(face_index_increment) - f.write(obj) - face_index_increment += fii - if scene.mtl_name and not scene.skip_mtl_export: - with open(os.path.join(output_path, f'{scene.mtl_name}.mtl'), 'w') as f: - for texture_name in sorted(list({x for x in scene.mtl_texture_names})): - f.write(mtl_entry_template.substitute({ - 'texture_name': texture_name, - 'texture_path': scene.mtl_texture_path_func(texture_name), - })) - - if settings.geometry__export_to_gg_web_engine or settings.geometry__save_blend: - script = '' - for scene in scenes: - script += '\n\n' + import_template.substitute({ - 'obj_file_path': f'{scene.obj_name}.obj' if not scene.skip_obj_export else '', - 'dummies': json.dumps(scene.dummies), - 'curves': json.dumps(scene.curves), - 'extra_script': scene.extra_script, - }) - if settings.geometry__export_to_gg_web_engine: - from serializers.misc.build_blender_scene import construct_blender_export_script - script += '\n' + construct_blender_export_script( - file_name=os.path.join(os.getcwd(), output_path, scene.name), - export_materials='EXPORT' if scene.bake_textures else 'NONE') - if settings.geometry__save_blend: - script += '\n\n' + get_blender_save_script( - out_blend_name=os.path.join(os.getcwd(), output_path, scene.name)) - run_blender(path=output_path, script=script) - - if not settings.geometry__save_obj: - for scene in scenes: - if not scene.skip_obj_export: - os.unlink(os.path.join(output_path, scene.obj_name + '.obj')) - if scene.mtl_name and not scene.skip_mtl_export: - os.unlink(os.path.join(output_path, scene.mtl_name + '.mtl')) diff --git a/serializers/geometries.py b/serializers/geometries.py index f5712fe..1c35d37 100644 --- a/serializers/geometries.py +++ b/serializers/geometries.py @@ -6,7 +6,7 @@ from resources.eac.archives import ShpiBlock from resources.eac.bitmaps import AnyBitmapBlock from serializers import BaseFileSerializer -from serializers.common.three_d_scenes import SubMesh, Mesh, export_scenes, Scene +from serializers.common.three_d import SubMesh, Mesh, export_scenes, Scene class OripGeometrySerializer(BaseFileSerializer): diff --git a/serializers/maps.py b/serializers/maps.py index e1036ec..544674b 100644 --- a/serializers/maps.py +++ b/serializers/maps.py @@ -9,7 +9,7 @@ from resources.eac.maps import RoadSplinePoint from resources.eac.utils import rotate_list from serializers import BaseFileSerializer -from serializers.common.three_d_scenes import SubMesh, Mesh, Scene, export_scenes +from serializers.common.three_d import SubMesh, Mesh, Scene, export_scenes class TriMapSerializer(BaseFileSerializer): @@ -17,65 +17,6 @@ class TriMapSerializer(BaseFileSerializer): def __init__(self): super().__init__(is_dir=True) - class BarrierPath: - def __init__(self, points: List[List[float]]) -> None: - super().__init__() - self.points = points - self.is_closed = points[0] == points[-1] - self.z_up = False - - @property - def middle_points(self): - return [[(self.points[i][j] + self.points[i + 1][j]) / 2 for j in range(3)] for i in - range(len(self.points) - 1)] - - @property - def lengths(self): - return [math.sqrt((self.points[i][0] - self.points[i + 1][0]) ** 2 - + (self.points[i][1 if self.z_up else 2] - self.points[i + 1][ - 1 if self.z_up else 2]) ** 2) - for i in range(len(self.points) - 1)] - - @property - def orientations(self): - return [math.atan2(self.points[i + 1][0] - self.points[i][0], - self.points[i + 1][1 if self.z_up else 2] - self.points[i][1 if self.z_up else 2]) - for i in range(len(self.points) - 1)] - - def fix_angle(self, angle): - while angle > math.pi: - angle -= 2 * math.pi - while angle <= -math.pi: - angle += 2 * math.pi - return angle - - def optimize(self): - orientations = self.orientations - lengths = self.lengths - delta_angles = [abs(math.sin(orientations[i] - orientations[i + 1]) * (lengths[i] + lengths[i + 1])) - for i in range(len(orientations) - 1)] - if self.is_closed: - # make the most valuable angle as break - break_delta_angle = abs(self.fix_angle(orientations[-1] - orientations[0])) - max_delta_angle = max(delta_angles) - if max_delta_angle > break_delta_angle: - index = delta_angles.index(max_delta_angle) - self.points = self.points[index + 1:] + self.points[:index + 2] - orientations = self.orientations - lengths = self.lengths - delta_angles = [abs(math.sin(orientations[i] - orientations[i + 1]) * (lengths[i] + lengths[i + 1])) - for i in range(len(orientations) - 1)] - while True: - min_delta_angle = min(delta_angles) - if min_delta_angle > 0.3: # 30cm threshold - break - index = delta_angles.index(min_delta_angle) - self.points = self.points[:index + 1] + self.points[index + 2:] - orientations = self.orientations - lengths = self.lengths - delta_angles = [abs(math.sin(orientations[i] - orientations[i + 1]) * (lengths[i] + lengths[i + 1])) - for i in range(len(orientations) - 1)] - class TerrainChunk: def get_fence_height(self, fence_texture_name): @@ -229,7 +170,7 @@ def build_models(self, counter, texture_names): (0 if x < int(len(model.vertices) / 2) else 1) if i < int(len(model.vertices) / 2) else ( 1 if x < int(len(model.vertices) / 2) else 0) ] for x in range(len(model.vertices))] - model.texture_id = texture_names[i - 5 if i >= 5 else 9 - i] + model.texture_id = 'background/' + texture_names[i - 5 if i >= 5 else 9 - i] model.name = f'terrain_chunk_{counter}_{i}_{model.texture_id}' models.append(model) if self.has_left_fence: @@ -392,32 +333,9 @@ def _prop_json(self, data: dict, instance, is_opened_track, } return res - def mtl_append_foreground_textures(self, data, path, name): - foreground_texture_names = list(set( - ['foreground/' + self._texture_ids(x['data']['data']['resource_id'], - 1, - data['loop_chunk'] == 0)[0] - for x in data['prop_descr'] - if x['type'] in ['bitmap', 'two_sided_bitmap']] - + ['foreground/' + self._texture_ids(x['data']['data']['resource_id_2'], - 1, - data['loop_chunk'] == 0)[0] - for x in data['prop_descr'] - if x['type'] == 'two_sided_bitmap'] - )) - foreground_texture_names.sort() - with open(os.path.join(path, 'terrain.mtl'), 'a') as mtl: - for texture_name in foreground_texture_names: - mtl.write(f"""\n\nnewmtl {texture_name} - Ka 1.000000 1.000000 1.000000 - Kd 1.000000 1.000000 1.000000 - Ks 0.000000 0.000000 0.000000 - illum 1 - Ns 0.000000 - map_Kd ../../ETRACKFM/{name[:3]}_001.FAM/{texture_name}.png""") - - def render_props_to_obj(self, id, f, path, data, face_index_increment, is_opened_track, min_id, max_id, - pivot=(0, 0, 0)): + def render_tnfs_props(self, id, data, is_opened_track, min_id, max_id, pivot=(0, 0, 0)): + meshes = [] + additional_textures = [] for i, p in enumerate(data['props']): if p['road_point_idx'] > max_id or p['road_point_idx'] < min_id: continue @@ -425,11 +343,11 @@ def render_props_to_obj(self, id, f, path, data, face_index_increment, is_opened spline_point = data['road_spline'][p['road_point_idx']] def position_mesh(mesh): - mesh.rotate_z(p['rotation'] + spline_point['orientation']) + mesh.rotate_z(-(p['rotation'] + spline_point['orientation'])) mesh.pivot_offset = ( pivot[0] - (p['position']['x'] + spline_point['position']['x']), - pivot[1] - (p['position']['y'] + spline_point['position']['y']), - pivot[2] - (p['position']['z'] + spline_point['position']['z']), + pivot[1] - (p['position']['z'] + spline_point['position']['z']), + pivot[2] - (p['position']['y'] + spline_point['position']['y']), ) if descr['type'] in ['bitmap', 'two_sided_bitmap']: @@ -448,9 +366,7 @@ def position_mesh(mesh): position_mesh(mesh) mesh.texture_id = 'foreground/' + self._texture_ids(descr['data']['data']['resource_id'], 1, is_opened_track)[0] - obj, fii = mesh.to_obj(face_index_increment, mtllib='terrain.mtl') - f.write(obj) - face_index_increment += fii + meshes.append(mesh) if descr['type'] == 'two_sided_bitmap': width_2 = descr['data']['data']['width_2'] mesh = SubMesh() @@ -466,9 +382,7 @@ def position_mesh(mesh): position_mesh(mesh) mesh.texture_id = 'foreground/' + self._texture_ids(descr['data']['data']['resource_id_2'], 1, is_opened_track)[0] - obj, fii = mesh.to_obj(face_index_increment, mtllib='terrain.mtl') - f.write(obj) - face_index_increment += fii + meshes.append(mesh) else: from library import require_resource (prop_id, prop_block, prop_data), _ = require_resource( @@ -480,26 +394,17 @@ def position_mesh(mesh): _, shpi_block, shpi_data, sub_models = OripGeometrySerializer().build_mesh(prop_data, prop_id) for mesh in sub_models.values(): mesh.name = f'prop_{i}_' + mesh.name - mesh.texture_id = f"prop/{descr['data']['data']['resource_id']}/assets/" + mesh.texture_id + mesh.texture_id = f"props/{descr['data']['data']['resource_id']}/0/assets/" + mesh.texture_id position_mesh(mesh) - obj, fii = mesh.to_obj(face_index_increment, mtllib='terrain.mtl') - f.write(obj) - face_index_increment += fii - with open(os.path.join(path, 'terrain.mtl'), 'a') as mtl: - for ti, texture_name in enumerate(shpi_data['children_aliases']): - texture_block = shpi_block.field_blocks_map['children'].child.possible_blocks[ - shpi_data['children'][ti]['choice_index']] - from resources.eac.bitmaps import AnyBitmapBlock - if not isinstance(texture_block, AnyBitmapBlock): - continue - mtl.write(f"""\n\nnewmtl prop/{descr['data']['data']['resource_id']}/assets/{texture_name} - Ka 1.000000 1.000000 1.000000 - Kd 1.000000 1.000000 1.000000 - Ks 0.000000 0.000000 0.000000 - illum 1 - Ns 0.000000 - map_Kd ../../ETRACKFM/{id.split('/')[-1][:3]}_001.FAM/props/{descr['data']['data']['resource_id']}/0/assets/{texture_name}.png""") - return face_index_increment + meshes.append(mesh) + for ti, texture_name in enumerate(shpi_data['children_aliases']): + texture_block = shpi_block.field_blocks_map['children'].child.possible_blocks[ + shpi_data['children'][ti]['choice_index']] + from resources.eac.bitmaps import AnyBitmapBlock + if not isinstance(texture_block, AnyBitmapBlock): + continue + additional_textures.append(f"props/{descr['data']['data']['resource_id']}/0/assets/{texture_name}") + return (meshes, additional_textures) def serialize(self, data: dict, path: str, id=None, block=None, **kwargs): super().serialize(data, path) @@ -509,10 +414,11 @@ def serialize(self, data: dict, path: str, id=None, block=None, **kwargs): obj_name='map', mtl_name='terrain', mtl_texture_path_func=lambda - x: f'../../ETRACKFM/{id.split("/")[-1][:3]}_001.FAM/background/{x}.png', + x: f'../../ETRACKFM/{id.split("/")[-1][:3]}_001.FAM/{x}.png', skip_obj_export=self.settings.maps__save_as_chunked) scenes = [map_scene] + # add road spline to map scene spline = data['road_spline'][:len(data['terrain']) * 4] curve = { 'name': 'road_path', @@ -542,6 +448,20 @@ def serialize(self, data: dict, path: str, id=None, block=None, **kwargs): curve['properties']['finish_point_index'] = data['num_chunks'] * 4 - 179 map_scene.curves.append(curve) + map_scene.dummies.append({ + 'name': 'player_start', + 'position': [ + # 0.8 is an approximate average car half width + max(data['road_spline'][18]['position']['x'] - data['road_spline'][18]['left_barrier'] + 0.8, + min(data['road_spline'][18]['position']['x'] + data['road_spline'][18]['right_barrier'] - 0.8, + 2.5)), + data['road_spline'][18]['position']['z'], + max(data['road_spline'][18]['position']['y'], 0), + ], + 'rotation': [data['road_spline'][18]['slope'], 0, 0] + }) + + # build terrain chunks chunks = [] for (i, terrain_entry) in enumerate(data['terrain']): road_path_index = i * 4 @@ -553,24 +473,24 @@ def serialize(self, data: dict, path: str, id=None, block=None, **kwargs): if is_opened: if id.endswith('AL1.TRI') and fence_texture_id == 16: fence_texture_id = fence_texture_id * 3 - chunk.fence_texture_name = self._get_texture_name_from_id(is_opened, fence_texture_id) + chunk.fence_texture_name = 'background/' + self._get_texture_name_from_id(is_opened, fence_texture_id) else: - chunk.fence_texture_name = ('0/GA00' + chunk.fence_texture_name = ('background/0/GA00' if id.split('/')[-1] in ['TR3.TRI', 'TR4.TRI', 'TR5.TRI'] - else '0/ga00') + else 'background/0/ga00') chunk.has_left_fence = terrain_entry['fence']['has_left_fence'] chunk.has_right_fence = terrain_entry['fence']['has_right_fence'] map_scene.mtl_texture_names.append(chunk.fence_texture_name) chunks.append(chunk) - for i, chunk in enumerate(chunks): chunk.next_chunk = (chunks[i + 1] if (i < len(chunks) - 1) else (None if is_opened else chunks[0])) + # put terrain chunks in scenes for (i, terrain_entry) in enumerate(data['terrain']): texture_names = [self._get_texture_name_from_id(is_opened, tid) for tid in terrain_entry['texture_ids']] - map_scene.mtl_texture_names.extend(texture_names) + map_scene.mtl_texture_names.extend([f'background/{x}' for x in texture_names]) meshes = chunks[i].build_models(i, texture_names) for mesh in meshes: mesh.change_axes(new_z='y', new_y='z') @@ -601,39 +521,45 @@ def serialize(self, data: dict, path: str, id=None, block=None, **kwargs): mtl_name='terrain', bake_textures=False, skip_mtl_export=True) - scene.dummies = [self._prop_json(data, o, is_opened, True) - for o in data['props'] - if (i + 1) * 4 > o['road_point_idx'] >= i * 4] - for i, d in enumerate(scene.dummies): - d['name'] += str(i) + if self.settings.maps__add_props_to_obj: + (meshes, txs) = self.render_tnfs_props(id, data, is_opened, i * 4, (i + 1) * 4 - 1, position) + scene.sub_meshes.extend(meshes) + map_scene.mtl_texture_names.extend(txs) + else: + scene.dummies = [self._prop_json(data, o, is_opened, True) + for o in data['props'] + if (i + 1) * 4 > o['road_point_idx'] >= i * 4] + for j, d in enumerate(scene.dummies): + d['name'] += str(j) scenes.append(scene) else: map_scene.sub_meshes.extend(meshes) + if not self.settings.maps__save_as_chunked: + if self.settings.maps__add_props_to_obj: + (meshes, txs) = self.render_tnfs_props(id, data, is_opened, 0, len(data['terrain']) * 4 - 1, (0, 0, 0)) + map_scene.sub_meshes.extend(meshes) + map_scene.mtl_texture_names.extend(txs) + else: + prop_dummies = [self._prop_json(data, o, is_opened, False) + for o in data['props'] + if len(data['terrain']) * 4 > o['road_point_idx'] >= 0] + for i, d in enumerate(prop_dummies): + d['name'] += str(i) + map_scene.dummies.extend(prop_dummies) + + if self.settings.maps__add_props_to_obj: + resource_ids = [x['data']['data']['resource_id'] + for x in data['prop_descr'] + if x['type'] in ['bitmap', 'two_sided_bitmap']] + resource_ids += [x['data']['data']['resource_id_2'] + for x in data['prop_descr'] + if x['type'] == 'two_sided_bitmap'] + map_scene.mtl_texture_names.extend([f'foreground/{self._texture_ids(x, 1, is_opened)[0]}' + for x in resource_ids]) if self.settings.maps__save_terrain_collisions: for scene in scenes: - scene.extra_script = self.terrain_collisions_script - - if not self.settings.maps__save_as_chunked: - prop_dummies = [self._prop_json(data, o, is_opened, False) - for o in data['props'] - if len(data['terrain']) * 4 > o['road_point_idx'] >= 0] - for i, d in enumerate(prop_dummies): - d['name'] += str(i) - map_scene.dummies.extend(prop_dummies) - - map_scene.dummies.append({ - 'name': 'player_start', - 'position': [ - # 0.8 is an approximate average car half width - max(data['road_spline'][18]['position']['x'] - data['road_spline'][18]['left_barrier'] + 0.8, - min(data['road_spline'][18]['position']['x'] + data['road_spline'][18]['right_barrier'] - 0.8, - 2.5)), - data['road_spline'][18]['position']['z'], - max(data['road_spline'][18]['position']['y'], 0), - ], - 'rotation': [data['road_spline'][18]['slope'], 0, 0] - }) + scene.extra_script += self.terrain_collisions_script if self.settings.maps__save_invisible_wall_collisions: left_barrier_points = self.BarrierPath( @@ -673,25 +599,9 @@ def serialize(self, data: dict, path: str, id=None, block=None, **kwargs): }), }) + # export scenes export_scenes(scenes, path, self.settings) - # if self.settings.maps__add_props_to_obj: - # self.mtl_append_foreground_textures(data, path, id.split('/')[-1]) - - # if self.settings.maps__add_props_to_obj: - # self.render_props_to_obj(id, f, path, data, face_index_increment, is_opened_track, i * 4, - # i * 4 + 3, pivot) - # blender_script += '\n\n\n' + self.blender_chunk_script.substitute({ - # 'new_file': True, - # 'save_invisible_wall_collisions': self.settings.maps__save_invisible_wall_collisions, - # 'save_terrain_collisions': self.settings.maps__save_terrain_collisions, - # 'obj_name': f'terrain_chunk_{i}.obj', - # 'props_json': json.dumps( - # [self._prop_json(data, o, is_opened_track, True) - # for o in data['props'] - # if (i + 1) * 4 > o['road_point_idx'] >= i * 4]), - # }) - class TrkMapSerializer(BaseFileSerializer): From 5fc617b49e62c37d05587f5d1c84f889b18bc9de Mon Sep 17 00:00:00 2001 From: andy Date: Fri, 24 Jan 2025 00:28:54 +0200 Subject: [PATCH 23/36] added macos blender path example --- settings.py | 1 + 1 file changed, 1 insertion(+) diff --git a/settings.py b/settings.py index 5f2e7f1..600f259 100644 --- a/settings.py +++ b/settings.py @@ -1,5 +1,6 @@ # ======================================================= GENERIC ====================================================== blender_executable = 'blender' +# blender_executable = '/Applications/Blender.app/Contents/MacOS/Blender' # blender_executable = 'C:\\Program Files\\Blender Foundation\\Blender 3.5\\blender.exe' ffmpeg_executable = 'ffmpeg' From 7c8e2f28ba8b8682d7e5e534924d3b905d293026 Mon Sep 17 00:00:00 2001 From: andy Date: Fri, 24 Jan 2025 10:23:50 +0200 Subject: [PATCH 24/36] upd --- serializers/maps.py | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/serializers/maps.py b/serializers/maps.py index 544674b..87524a2 100644 --- a/serializers/maps.py +++ b/serializers/maps.py @@ -9,7 +9,7 @@ from resources.eac.maps import RoadSplinePoint from resources.eac.utils import rotate_list from serializers import BaseFileSerializer -from serializers.common.three_d import SubMesh, Mesh, Scene, export_scenes +from serializers.common.three_d import SubMesh, Mesh, Scene, export_scenes, BarrierPath class TriMapSerializer(BaseFileSerializer): @@ -473,7 +473,8 @@ def serialize(self, data: dict, path: str, id=None, block=None, **kwargs): if is_opened: if id.endswith('AL1.TRI') and fence_texture_id == 16: fence_texture_id = fence_texture_id * 3 - chunk.fence_texture_name = 'background/' + self._get_texture_name_from_id(is_opened, fence_texture_id) + chunk.fence_texture_name = 'background/' + self._get_texture_name_from_id(is_opened, + fence_texture_id) else: chunk.fence_texture_name = ('background/0/GA00' if id.split('/')[-1] in ['TR3.TRI', 'TR4.TRI', 'TR5.TRI'] @@ -562,12 +563,12 @@ def serialize(self, data: dict, path: str, id=None, block=None, **kwargs): scene.extra_script += self.terrain_collisions_script if self.settings.maps__save_invisible_wall_collisions: - left_barrier_points = self.BarrierPath( + left_barrier_points = BarrierPath( [[rp['position']['x'] + rp['left_barrier'] * math.cos(rp['orientation'] + math.pi), rp['position']['y'], rp['position']['z'] - rp['left_barrier'] * math.sin(rp['orientation'] + math.pi) ] for rp in data['road_spline'][:len(data['terrain']) * 4]]) - right_barrier_points = self.BarrierPath( + right_barrier_points = BarrierPath( [[rp['position']['x'] + rp['right_barrier'] * math.cos(rp['orientation']), rp['position']['y'], rp['position']['z'] - rp['right_barrier'] * math.sin(rp['orientation']) From d966714fa784a5eac6f0dbdf874f6299f9abda46 Mon Sep 17 00:00:00 2001 From: andy Date: Mon, 3 Feb 2025 15:30:20 +0200 Subject: [PATCH 25/36] updated frontend --- frontend/dist/gui/index.html | 2 +- frontend/dist/gui/main.a1816d660f2f8307.js | 1 - 2 files changed, 1 insertion(+), 2 deletions(-) delete mode 100644 frontend/dist/gui/main.a1816d660f2f8307.js diff --git a/frontend/dist/gui/index.html b/frontend/dist/gui/index.html index 8892840..7a54de7 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.a1816d660f2f8307.js b/frontend/dist/gui/main.a1816d660f2f8307.js deleted file mode 100644 index 29a4037..0000000 --- a/frontend/dist/gui/main.a1816d660f2f8307.js +++ /dev/null @@ -1 +0,0 @@ -(self.webpackChunkgui=self.webpackChunkgui||[]).push([[179],{651:(Oo,zs,ps)=>{"use strict";function dn(i){return"function"==typeof i}function z(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 Br=z(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 Kr(i,t){if(i){const e=i.indexOf(t);0<=e&&i.splice(e,1)}}class Qt{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(dn(n))try{n()}catch(s){t=s instanceof Br?s.errors:[s]}const{_finalizers:r}=this;if(r){this._finalizers=null;for(const s of r)try{Ua(s)}catch(o){t=t??[],o instanceof Br?t=[...t,...o.errors]:t.push(o)}}if(t)throw new Br(t)}}add(t){var e;if(t&&t!==this)if(this.closed)Ua(t);else{if(t instanceof Qt){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)&&Kr(e,t)}remove(t){const{_finalizers:e}=this;e&&Kr(e,t),t instanceof Qt&&t._removeParent(this)}}Qt.EMPTY=(()=>{const i=new Qt;return i.closed=!0,i})();const Un=Qt.EMPTY;function xl(i){return i instanceof Qt||i&&"closed"in i&&dn(i.remove)&&dn(i.add)&&dn(i.unsubscribe)}function Ua(i){dn(i)?i():i.unsubscribe()}const Hs={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 Si(i){Ci.setTimeout(()=>{const{onUnhandledError:t}=Hs;if(!t)throw i;t(i)})}function ms(){}const Gs=Pn("C",void 0,void 0);function Pn(i,t,e){return{kind:i,value:t,error:e}}let cr=null;function oc(i){if(Hs.useDeprecatedSynchronousErrorHandling){const t=!cr;if(t&&(cr={errorThrown:!1,error:null}),i(),t){const{errorThrown:e,error:n}=cr;if(cr=null,e)throw n}}else i()}class wl extends Qt{constructor(t){super(),this.isStopped=!1,t?(this.destination=t,xl(t)&&t.add(this)):this.destination=yE}static create(t,e,n){return new la(t,e,n)}next(t){this.isStopped?jg(function Fo(i){return Pn("N",i,void 0)}(t),this):this._next(t)}error(t){this.isStopped?jg(function $s(i){return Pn("E",void 0,i)}(t),this):(this.isStopped=!0,this._error(t))}complete(){this.isStopped?jg(Gs,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 aa=Function.prototype.bind;function Ml(i,t){return aa.call(i,t)}class Va{constructor(t){this.partialObserver=t}next(t){const{partialObserver:e}=this;if(e.next)try{e.next(t)}catch(n){fd(n)}}error(t){const{partialObserver:e}=this;if(e.error)try{e.error(t)}catch(n){fd(n)}else fd(t)}complete(){const{partialObserver:t}=this;if(t.complete)try{t.complete()}catch(e){fd(e)}}}class la extends wl{constructor(t,e,n){let r;if(super(),dn(t)||!t)r={next:t??void 0,error:e??void 0,complete:n??void 0};else{let s;this&&Hs.useDeprecatedNextContext?(s=Object.create(t),s.unsubscribe=()=>this.unsubscribe(),r={next:t.next&&Ml(t.next,s),error:t.error&&Ml(t.error,s),complete:t.complete&&Ml(t.complete,s)}):r=t}this.destination=new Va(r)}}function fd(i){Hs.useDeprecatedSynchronousErrorHandling?function oa(i){Hs.useDeprecatedSynchronousErrorHandling&&cr&&(cr.errorThrown=!0,cr.error=i)}(i):Si(i)}function jg(i,t){const{onStoppedNotification:e}=Hs;e&&Ci.setTimeout(()=>e(i,t))}const yE={closed:!0,next:ms,error:function vE(i){throw i},complete:ms},Yg="function"==typeof Symbol&&Symbol.observable||"@@observable";function za(i){return i}function n0(i){return 0===i.length?za:1===i.length?i[0]:function(e){return i.reduce((n,r)=>r(n),e)}}let Tn=(()=>{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 kf(i){return i&&i instanceof wl||function xE(i){return i&&dn(i.next)&&dn(i.error)&&dn(i.complete)}(i)&&xl(i)}(e)?e:new la(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=Ha(n))((r,s)=>{const o=new la({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)}[Yg](){return this}pipe(...e){return n0(e)(this)}toPromise(e){return new(e=Ha(e))((n,r)=>{let s;this.subscribe(o=>s=o,o=>r(o),()=>n(s))})}}return i.create=t=>new i(t),i})();function Ha(i){var t;return null!==(t=i??Hs.Promise)&&void 0!==t?t:Promise}const ca=z(i=>function(){i(this),this.name="ObjectUnsubscribedError",this.message="object unsubscribed"});let Ie=(()=>{class i extends Tn{constructor(){super(),this.closed=!1,this.currentObservers=null,this.observers=[],this.isStopped=!1,this.hasError=!1,this.thrownError=null}lift(e){const n=new r0(this,this);return n.operator=e,n}_throwIfClosed(){if(this.closed)throw new ca}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?Un:(this.currentObservers=null,s.push(e),new Qt(()=>{this.currentObservers=null,Kr(s,e)}))}_checkFinalizedStatuses(e){const{hasError:n,thrownError:r,isStopped:s}=this;n?e.error(r):s&&e.complete()}asObservable(){const e=new Tn;return e.source=this,e}}return i.create=(t,e)=>new r0(t,e),i})();class r0 extends Ie{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:Un}}function s0(i){return dn(i?.lift)}function ti(i){return t=>{if(s0(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 jn(i,t,e,n,r){return new wE(i,t,e,n,r)}class wE extends wl{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 et(i,t){return ti((e,n)=>{let r=0;e.subscribe(jn(n,s=>{n.next(i.call(t,s,r++))}))})}function da(i){return this instanceof da?(this.v=i,this):new da(i)}function Lf(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 qg(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 e_=i=>i&&"number"==typeof i.length&&"function"!=typeof i;function t_(i){return dn(i?.then)}function d0(i){return dn(i[Yg])}function u0(i){return Symbol.asyncIterator&&dn(i?.[Symbol.asyncIterator])}function h0(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 f0=function n_(){return"function"==typeof Symbol&&Symbol.iterator?Symbol.iterator:"@@iterator"}();function Nf(i){return dn(i?.[f0])}function p0(i){return function Ff(i,t,e){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var r,n=e.apply(i,t||[]),s=[];return r=Object.create(("function"==typeof AsyncIterator?AsyncIterator:Object).prototype),a("next"),a("throw"),a("return",function o(m){return function(g){return Promise.resolve(g).then(m,h)}}),r[Symbol.asyncIterator]=function(){return this},r;function a(m,g){n[m]&&(r[m]=function(b){return new Promise(function(v,y){s.push([m,b,v,y])>1||l(m,b)})},g&&(r[m]=g(r[m])))}function l(m,g){try{!function c(m){m.value instanceof da?Promise.resolve(m.value.v).then(d,h):p(s[0][2],m)}(n[m](g))}catch(b){p(s[0][3],b)}}function d(m){l("next",m)}function h(m){l("throw",m)}function p(m,g){m(g),s.shift(),s.length&&l(s[0][0],s[0][1])}}(this,arguments,function*(){const e=i.getReader();try{for(;;){const{value:n,done:r}=yield da(e.read());if(r)return yield da(void 0);yield yield da(n)}}finally{e.releaseLock()}})}function m0(i){return dn(i?.getReader)}function Mr(i){if(i instanceof Tn)return i;if(null!=i){if(d0(i))return function kE(i){return new Tn(t=>{const e=i[Yg]();if(dn(e.subscribe))return e.subscribe(t);throw new TypeError("Provided object does not correctly implement Symbol.observable")})}(i);if(e_(i))return function PE(i){return new Tn(t=>{for(let e=0;e{i.then(e=>{t.closed||(t.next(e),t.complete())},e=>t.error(e)).then(null,Si)})}(i);if(u0(i))return g0(i);if(Nf(i))return function FE(i){return new Tn(t=>{for(const e of i)if(t.next(e),t.closed)return;t.complete()})}(i);if(m0(i))return function _0(i){return g0(p0(i))}(i)}throw h0(i)}function g0(i){return new Tn(t=>{(function LE(i,t){var e,n,r,s;return function md(i,t,e,n){return new(e||(e=Promise))(function(s,o){function a(d){try{c(n.next(d))}catch(h){o(h)}}function l(d){try{c(n.throw(d))}catch(h){o(h)}}function c(d){d.done?s(d.value):function r(s){return s instanceof e?s:new e(function(o){o(s)})}(d.value).then(a,l)}c((n=n.apply(i,t||[])).next())})}(this,void 0,void 0,function*(){try{for(e=Lf(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 $a(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 tr(i,t,e=1/0){return dn(t)?tr((n,r)=>et((s,o)=>t(n,s,r,o))(Mr(i(n,r))),e):("number"==typeof t&&(e=t),ti((n,r)=>function NE(i,t,e,n,r,s,o,a){const l=[];let c=0,d=0,h=!1;const p=()=>{h&&!l.length&&!c&&t.complete()},m=b=>c{s&&t.next(b),c++;let v=!1;Mr(e(b,d++)).subscribe(jn(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(jn(t,m,()=>{h=!0,p()})),()=>{a?.()}}(n,r,i,e)))}function vd(i=1/0){return tr(za,i)}const mo=new Tn(i=>i.complete());function Bu(i){return i&&dn(i.schedule)}function r_(i){return i[i.length-1]}function v0(i){return dn(r_(i))?i.pop():void 0}function Uu(i){return Bu(r_(i))?i.pop():void 0}function s_(i,t=0){return ti((e,n)=>{e.subscribe(jn(n,r=>$a(n,i,()=>n.next(r),t),()=>$a(n,i,()=>n.complete(),t),r=>$a(n,i,()=>n.error(r),t)))})}function o_(i,t=0){return ti((e,n)=>{n.add(i.schedule(()=>e.subscribe(n),t))})}function a_(i,t){if(!i)throw new Error("Iterable cannot be null");return new Tn(e=>{$a(e,t,()=>{const n=i[Symbol.asyncIterator]();$a(e,t,()=>{n.next().then(r=>{r.done?e.complete():e.next(r.value)})},0,!0)})})}function Ni(i,t){return t?function x0(i,t){if(null!=i){if(d0(i))return function UE(i,t){return Mr(i).pipe(o_(t),s_(t))}(i,t);if(e_(i))return function zE(i,t){return new Tn(e=>{let n=0;return t.schedule(function(){n===i.length?e.complete():(e.next(i[n++]),e.closed||this.schedule())})})}(i,t);if(t_(i))return function VE(i,t){return Mr(i).pipe(o_(t),s_(t))}(i,t);if(u0(i))return a_(i,t);if(Nf(i))return function HE(i,t){return new Tn(e=>{let n;return $a(e,t,()=>{n=i[f0](),$a(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)}),()=>dn(n?.return)&&n.return()})}(i,t);if(m0(i))return function b0(i,t){return a_(p0(i),t)}(i,t)}throw h0(i)}(i,t):Mr(i)}function Cr(...i){const t=Uu(i),e=function y0(i,t){return"number"==typeof r_(i)?i.pop():t}(i,1/0),n=i;return n.length?1===n.length?Mr(n[0]):vd(e)(Ni(n,t)):mo}function Bf(i={}){const{connector:t=(()=>new Ie),resetOnError:e=!0,resetOnComplete:n=!0,resetOnRefCountZero:r=!0}=i;return s=>{let o,a,l,c=0,d=!1,h=!1;const p=()=>{a?.unsubscribe(),a=void 0},m=()=>{p(),o=l=void 0,d=h=!1},g=()=>{const b=o;m(),b?.unsubscribe()};return ti((b,v)=>{c++,!h&&!d&&p();const y=l=l??t();v.add(()=>{c--,0===c&&!h&&!d&&(a=yd(g,r))}),y.subscribe(v),!o&&c>0&&(o=new la({next:M=>y.next(M),error:M=>{h=!0,p(),a=yd(m,e,M),y.error(M)},complete:()=>{d=!0,p(),a=yd(m,n),y.complete()}}),Mr(b).subscribe(o))})(s)}}function yd(i,t,...e){if(!0===t)return void i();if(!1===t)return;const n=new la({next:()=>{n.unsubscribe(),i()}});return Mr(t(...e)).subscribe(n)}function ci(i){for(let t in i)if(i[t]===ci)return t;throw Error("Could not find renamed property on target object.")}function l_(i,t){for(const e in t)t.hasOwnProperty(e)&&!i.hasOwnProperty(e)&&(i[e]=t[e])}function mi(i){if("string"==typeof i)return i;if(Array.isArray(i))return"["+i.map(mi).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 Uf(i,t){return null==i||""===i?null===t?"":t:null==t||""===t?i:i+" "+t}const c_=ci({__forward_ref__:ci});function Gn(i){return i.__forward_ref__=Gn,i.toString=function(){return mi(this())},i}function Ot(i){return Vu(i)?i():i}function Vu(i){return"function"==typeof i&&i.hasOwnProperty(c_)&&i.__forward_ref__===Gn}function zu(i){return i&&!!i.\u0275providers}const Gu="https://g.co/ng/security#xss";class pe extends Error{constructor(t,e){super(Vf(t,e)),this.code=t}}function Vf(i,t){return`NG0${Math.abs(i)}${t?": "+t.trim():""}`}function Jt(i){return"string"==typeof i?i:null==i?"":String(i)}function zf(i,t){throw new pe(-201,!1)}function Sn(i,t){null==i&&function ni(i,t,e,n){throw new Error(`ASSERTION ERROR: ${i}`+(null==n?"":` [Expected=> ${e} ${n} ${t} <=Actual]`))}(t,i,null,"!=")}function Re(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 Hf(i){return d_(i,bd)||d_(i,h_)}function d_(i,t){return i.hasOwnProperty(t)?i[t]:null}function u_(i){return i&&(i.hasOwnProperty(gs)||i.hasOwnProperty(C0))?i[gs]:null}const bd=ci({\u0275prov:ci}),gs=ci({\u0275inj:ci}),h_=ci({ngInjectableDef:ci}),C0=ci({ngInjectorDef:ci});var Ft=(()=>((Ft=Ft||{})[Ft.Default=0]="Default",Ft[Ft.Host=1]="Host",Ft[Ft.Self=2]="Self",Ft[Ft.SkipSelf=4]="SkipSelf",Ft[Ft.Optional=8]="Optional",Ft))();let Gf;function js(i){const t=Gf;return Gf=i,t}function _s(i,t,e){const n=Hf(i);return n&&"root"==n.providedIn?void 0===n.value?n.value=n.factory():n.value:e&Ft.Optional?null:void 0!==t?t:void zf(mi(i))}const In=(()=>typeof globalThis<"u"&&globalThis||typeof global<"u"&&global||typeof window<"u"&&window||typeof self<"u"&&typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&self)(),Sl={},Wu="__NG_DI_FLAG__",gi="ngTempTokenPath",El="ngTokenPath",f_=/\n/gm,KE="\u0275",$f="__source";let ju;function xd(i){const t=ju;return ju=i,t}function ZE(i,t=Ft.Default){if(void 0===ju)throw new pe(-203,!1);return null===ju?_s(i,void 0,t):ju.get(i,t&Ft.Optional?null:void 0,t)}function ee(i,t=Ft.Default){return(function S0(){return Gf}()||ZE)(Ot(i),t)}function Lt(i,t=Ft.Default){return ee(i,Wf(t))}function Wf(i){return typeof i>"u"||"number"==typeof i?i:0|(i.optional&&8)|(i.host&&1)|(i.self&&2)|(i.skipSelf&&4)}function jf(i){const t=[];for(let e=0;e((go=go||{})[go.OnPush=0]="OnPush",go[go.Default=1]="Default",go))(),Ys=(()=>{return(i=Ys||(Ys={}))[i.Emulated=0]="Emulated",i[i.None=2]="None",i[i.ShadowDom=3]="ShadowDom",Ys;var i})();const ja={},$n=[],Ur=ci({\u0275cmp:ci}),qu=ci({\u0275dir:ci}),dc=ci({\u0275pipe:ci}),g_=ci({\u0275mod:ci}),ua=ci({\u0275fac:ci}),Xu=ci({__NG_ELEMENT_ID__:ci});let QE=0;function st(i){return Wa(()=>{const t=_o(i),e={...t,decls:i.decls,vars:i.vars,template:i.template,consts:i.consts||null,ngContentSelectors:i.ngContentSelectors,onPush:i.changeDetection===go.OnPush,directiveDefs:null,pipeDefs:null,dependencies:t.standalone&&i.dependencies||null,getStandaloneInjector:null,data:i.data||{},encapsulation:i.encapsulation||Ys.Emulated,id:"c"+QE++,styles:i.styles||$n,_:null,schemas:i.schemas||null,tView:null};__(e);const n=i.dependencies;return e.directiveDefs=qf(n,!1),e.pipeDefs=qf(n,!0),e})}function Ku(i,t,e){const n=i.\u0275cmp;n.directiveDefs=qf(t,!1),n.pipeDefs=qf(e,!0)}function JE(i){return Hn(i)||Vr(i)}function Md(i){return null!==i}function en(i){return Wa(()=>({type:i.type,bootstrap:i.bootstrap||$n,declarations:i.declarations||$n,imports:i.imports||$n,exports:i.exports||$n,transitiveCompileScopes:null,schemas:i.schemas||null,id:i.id||null}))}function Yf(i,t){if(null==i)return ja;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 ve(i){return Wa(()=>{const t=_o(i);return __(t),t})}function Gi(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 Hn(i){return i[Ur]||null}function Vr(i){return i[qu]||null}function vs(i){return i[dc]||null}function dr(i,t){const e=i[g_]||null;if(!e&&!0===t)throw new Error(`Type ${mi(i)} does not have '\u0275mod' property.`);return e}function _o(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||$n,viewQuery:i.viewQuery||null,features:i.features||null,setInput:null,findHostDirectiveDefs:null,hostDirectives:null,inputs:Yf(i.inputs,t),outputs:Yf(i.outputs)}}function __(i){i.features?.forEach(t=>t(i))}function qf(i,t){if(!i)return null;const e=t?vs:JE;return()=>("function"==typeof i?i():i).map(n=>e(n)).filter(Md)}const Ya=0,ot=1,fn=2,Bi=3,ys=4,X=5,he=6,ae=7,Ue=8,jt=9,Vn=10,bt=11,ai=12,uc=13,A0=14,Er=15,nr=16,Zu=17,Bo=18,qs=19,Al=20,ii=21,bi=22,Sd=1,D0=2,Xf=7,Kf=8,qa=9,Ui=10;function bs(i){return Array.isArray(i)&&"object"==typeof i[Sd]}function xs(i){return Array.isArray(i)&&!0===i[Sd]}function Zf(i){return 0!=(4&i.flags)}function Ed(i){return i.componentOffset>-1}function hc(i){return 1==(1&i.flags)}function vo(i){return!!i.template}function Qu(i){return 0!=(256&i[fn])}function Xa(i,t){return i.hasOwnProperty(ua)?i[ua]:null}class Dd{constructor(t,e,n){this.previousValue=t,this.currentValue=e,this.firstChange=n}isFirstChange(){return this.firstChange}}function xi(){return Td}function Td(i){return i.type.prototype.ngOnChanges&&(i.setInput=Id),ep}function ep(){const i=P0(this),t=i?.current;if(t){const e=i.previous;if(e===ja)i.previous=t;else for(let n in t)e[n]=t[n];i.current=null,this.ngOnChanges(t)}}function Id(i,t,e,n){const r=this.declaredInputs[e],s=P0(i)||function rA(i,t){return i[k0]=t}(i,{previous:ja,current:null}),o=s.current||(s.current={}),a=s.previous,l=a[r];o[r]=new Dd(l&&l.currentValue,t,a===ja),i[n]=t}xi.ngInherit=!0;const k0="__ngSimpleChanges__";function P0(i){return i[k0]||null}const Qr=function(i,t,e){},Rd="svg";function I(i){for(;Array.isArray(i);)i=i[Ya];return i}function fc(i,t){return I(t[i])}function Ai(i,t){return I(t[i.index])}function O0(i,t){return i.data[t]}function Pd(i,t){return i[t]}function ws(i,t){const e=t[i];return bs(e)?e:e[Ya]}function tp(i){return 64==(64&i[fn])}function Dl(i,t){return null==t?null:i[t]}function F0(i){i[Bo]=0}function C_(i,t){i[X]+=t;let e=i,n=i[Bi];for(;null!==n&&(1===t&&1===e[X]||-1===t&&0===e[X]);)n[X]+=t,e=n,n=n[Bi]}const Pt={lFrame:Za(null),bindingsEnabled:!0};function ha(){return Pt.bindingsEnabled}function Se(){return Pt.lFrame.lView}function zn(){return Pt.lFrame.tView}function Ht(i){return Pt.lFrame.contextLView=i,i[Ue]}function Et(i){return Pt.lFrame.contextLView=null,i}function Ar(){let i=N0();for(;null!==i&&64===i.type;)i=i.parent;return i}function N0(){return Pt.lFrame.currentTNode}function fa(i,t){const e=Pt.lFrame;e.currentTNode=i,e.isParent=t}function S_(){return Pt.lFrame.isParent}function E_(){Pt.lFrame.isParent=!1}function zr(){const i=Pt.lFrame;let t=i.bindingRootIndex;return-1===t&&(t=i.bindingRootIndex=i.tView.bindingStartIndex),t}function Tl(){return Pt.lFrame.bindingIndex++}function Xs(i){const t=Pt.lFrame,e=t.bindingIndex;return t.bindingIndex=t.bindingIndex+i,e}function V0(i,t){const e=Pt.lFrame;e.bindingIndex=e.bindingRootIndex=i,Uo(t)}function Uo(i){Pt.lFrame.currentDirectiveIndex=i}function Ju(i){const t=Pt.lFrame.currentDirectiveIndex;return-1===t?null:i[t]}function Il(){return Pt.lFrame.currentQueryIndex}function Ms(i){Pt.lFrame.currentQueryIndex=i}function pA(i){const t=i[ot];return 2===t.type?t.declTNode:1===t.type?i[he]:null}function D_(i,t,e){if(e&Ft.SkipSelf){let r=t,s=i;for(;!(r=r.parent,null!==r||e&Ft.Host||(r=pA(s),null===r||(s=s[Er],10&r.type))););if(null===r)return!1;t=r,i=s}const n=Pt.lFrame=Od();return n.currentTNode=t,n.lView=i,!0}function ip(i){const t=Od(),e=i[ot];Pt.lFrame=t,t.currentTNode=e.firstChild,t.lView=i,t.tView=e,t.contextLView=i,t.bindingIndex=e.bindingStartIndex,t.inI18n=!1}function Od(){const i=Pt.lFrame,t=null===i?null:i.child;return null===t?Za(i):t}function Za(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 T_(){const i=Pt.lFrame;return Pt.lFrame=i.parent,i.currentTNode=null,i.lView=null,i}const z0=T_;function Fd(){const i=T_();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 qn(){return Pt.lFrame.selectedIndex}function Qa(i){Pt.lFrame.selectedIndex=i}function Di(){const i=Pt.lFrame;return O0(i.tView,i.selectedIndex)}function ki(){Pt.lFrame.currentNamespace=Rd}function pa(){!function mc(){Pt.lFrame.currentNamespace=null}()}function Ld(i,t){for(let e=t.directiveStart,n=t.directiveEnd;e=n)break}else t[l]<0&&(i[Bo]+=65536),(a>11>16&&(3&i[fn])===t){i[fn]+=2048,Qr(4,a,s);try{s.call(a)}finally{Qr(5,a,s)}}}else{Qr(4,a,s);try{s.call(a)}finally{Qr(5,a,s)}}}const ma=-1;class Nd{constructor(t,e,n){this.factory=t,this.resolving=!1,this.canSeeViewProviders=e,this.injectImpl=n}}function P_(i,t,e){let n=0;for(;nt){o=s-1;break}}}for(;s>16}(i),n=t;for(;e>0;)n=n[Er],e--;return n}let Bd=!0;function lp(i){const t=Bd;return Bd=i,t}const F_=255,Y0=5;let q0=0;const ga={};function nh(i,t){const e=X0(i,t);if(-1!==e)return e;const n=t[ot];n.firstCreatePass&&(i.injectorIndex=t.length,ih(n.data,i),ih(t,null),ih(n.blueprint,null));const r=rh(i,t),s=i.injectorIndex;if(ap(r)){const o=eh(r),a=th(r,t),l=a[ot].data;for(let c=0;c<8;c++)t[s+c]=a[o+c]|l[o+c]}return t[s+8]=r,s}function ih(i,t){i.push(0,0,0,0,0,0,0,0,t)}function X0(i,t){return-1===i.injectorIndex||i.parent&&i.parent.injectorIndex===i.injectorIndex||null===t[i.injectorIndex+8]?-1:i.injectorIndex}function rh(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=oh(r),null===n)return ma;if(e++,r=r[Er],-1!==n.injectorIndex)return n.injectorIndex|e<<16}return ma}function pn(i,t,e){!function L_(i,t,e){let n;"string"==typeof e?n=e.charCodeAt(0)||0:e.hasOwnProperty(Xu)&&(n=e[Xu]),null==n&&(n=e[Xu]=q0++);const r=n&F_;t.data[i+(r>>Y0)]|=1<=0?t&F_:Ks:t}(e);if("function"==typeof s){if(!D_(t,i,n))return n&Ft.Host?K0(r,0,n):Ud(t,e,n,r);try{const o=s(n);if(null!=o||n&Ft.Optional)return o;zf()}finally{z0()}}else if("number"==typeof s){let o=null,a=X0(i,t),l=ma,c=n&Ft.Host?t[nr][he]:null;for((-1===a||n&Ft.SkipSelf)&&(l=-1===a?rh(i,t):t[a+8],l!==ma&&B_(n,!1)?(o=t[ot],a=eh(l),t=th(l,t)):a=-1);-1!==a;){const d=t[ot];if(dp(s,a,d.data)){const h=wA(a,t,e,o,n,c);if(h!==ga)return h}l=t[a+8],l!==ma&&B_(n,t[ot].data[a+8]===c)&&dp(s,a,t)?(o=d,a=eh(l),t=th(l,t)):a=-1}}return r}function wA(i,t,e,n,r,s){const o=t[ot],a=o.data[i+8],d=ts(a,o,e,null==n?Ed(a)&&Bd:n!=o&&0!=(3&a.type),r&Ft.Host&&s===a);return null!==d?vc(t,o,d,a):ga}function ts(i,t,e,n,r){const s=i.providerIndexes,o=t.data,a=1048575&s,l=i.directiveStart,d=s>>20,p=r?a+d:i.directiveEnd;for(let m=n?a:a+d;m=l&&g.type===e)return m}if(r){const m=o[l];if(m&&vo(m)&&m.type===e)return l}return null}function vc(i,t,e,n){let r=i[e];const s=t.data;if(function _A(i){return i instanceof Nd}(r)){const o=r;o.resolving&&function w0(i,t){const e=t?`. Dependency path: ${t.join(" > ")} > ${i}`:"";throw new pe(-200,`Circular dependency in DI detected for ${i}${e}`)}(function Yn(i){return"function"==typeof i?i.name||i.toString():"object"==typeof i&&null!=i&&"function"==typeof i.type?i.type.name||i.type.toString():Jt(i)}(s[e]));const a=lp(o.canSeeViewProviders);o.resolving=!0;const l=o.injectImpl?js(o.injectImpl):null;D_(i,n,Ft.Default);try{r=i[e]=o.factory(void 0,s,i,n),t.firstCreatePass&&e>=n.directiveStart&&function es(i,t,e){const{ngOnChanges:n,ngOnInit:r,ngDoCheck:s}=t.type.prototype;if(n){const o=Td(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&&js(l),lp(a),o.resolving=!1,z0()}}return r}function dp(i,t,e){return!!(e[t+(i>>Y0)]&1<{const t=i.prototype.constructor,e=t[ua]||sh(t),n=Object.prototype;let r=Object.getPrototypeOf(i.prototype).constructor;for(;r&&r!==n;){const s=r[ua]||sh(r);if(s&&s!==e)return s;r=Object.getPrototypeOf(r)}return s=>new s})}function sh(i){return Vu(i)?()=>{const t=sh(Ot(i));return t&&t()}:Xa(i)}function oh(i){const t=i[ot],e=t.type;return 2===e?t.declTNode:1===e?i[he]:null}function _a(i){return function xA(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 va(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,d){const h=l.hasOwnProperty(bc)?l[bc]:Object.defineProperty(l,bc,{value:[]})[bc];for(;h.length<=d;)h.push(null);return(h[d]=h[d]||[]).push(o),l}}return e&&(r.prototype=Object.create(e.prototype)),r.prototype.ngMetadataName=i,r.annotationCls=r,r})}class me{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=Re({token:this,providedIn:e.providedIn||"root",factory:e.factory}))}get multi(){return this}toString(){return`InjectionToken ${this._desc}`}}function Pl(i,t){i.forEach(e=>Array.isArray(e)?Pl(e,t):t(e))}function V_(i,t,e){t>=i.length?i.push(e):i.splice(t,0,e)}function fp(i,t){return t>=i.length-1?i.pop():i.splice(t,1)[0]}function Hd(i,t){const e=[];for(let n=0;n=0?i[1|n]=e:(n=~n,function EA(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 $d(i,t){const e=wc(i,t);if(e>=0)return i[1|e]}function wc(i,t){return function mp(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),Ss=wd(Vd("Optional"),8),ya=wd(Vd("SkipSelf"),4);var Es=(()=>((Es=Es||{})[Es.Important=1]="Important",Es[Es.DashCase=2]="DashCase",Es))();const Mp=new Map;let px=0;const ev="__ngContext__";function Gr(i,t){bs(t)?(i[ev]=t[Al],function mx(i){Mp.set(i[Al],i)}(t)):i[ev]=t}let nv;function iv(i,t){return nv(i,t)}function fh(i){const t=i[Bi];return xs(t)?t[Bi]:t}function rv(i){return Cx(i[uc])}function sv(i){return Cx(i[ys])}function Cx(i){for(;null!==i&&!xs(i);)i=i[ys];return i}function Ir(i,t,e,n,r){if(null!=n){let s,o=!1;xs(n)?s=n:bs(n)&&(o=!0,n=n[Ya]);const a=I(n);0===i&&null!==e?null==r?Ix(t,e,a):Sc(t,e,a,r||null,!0):1===i&&null!==e?Sc(t,e,a,r||null,!0):2===i?function hv(i,t,e){const n=Ep(i,t);n&&function qA(i,t,e,n){i.removeChild(t,e,n)}(i,n,t,e)}(t,a,o):3===i&&t.destroyNode(a),null!=s&&function Nx(i,t,e,n,r){const s=e[Xf];s!==I(e)&&Ir(t,i,n,s,r);for(let a=Ui;a0&&(i[e-1][ys]=n[ys]);const s=fp(i,Ui+t);!function zA(i,t){mh(i,t,t[bt],2,null,null),t[Ya]=null,t[he]=null}(n[ot],n);const o=s[qs];null!==o&&o.detachView(s[ot]),n[Bi]=null,n[ys]=null,n[fn]&=-65}return n}function Ax(i,t){if(!(128&t[fn])){const e=t[bt];e.destroyNode&&mh(i,t,e,3,null,null),function $A(i){let t=i[uc];if(!t)return cv(i[ot],i);for(;t;){let e=null;if(bs(t))e=t[uc];else{const n=t[Ui];n&&(e=n)}if(!e){for(;t&&!t[ys]&&t!==i;)bs(t)&&cv(t[ot],t),t=t[Bi];null===t&&(t=i),bs(t)&&cv(t[ot],t),e=t&&t[ys]}t=e}}(t)}}function cv(i,t){if(!(128&t[fn])){t[fn]&=-65,t[fn]|=128,function YA(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===Ys.None||s===Ys.Emulated)return null}return Ai(n,e)}}(i,t.parent,e)}function Sc(i,t,e,n,r){i.insertBefore(t,e,n,r)}function Ix(i,t,e){i.appendChild(t,e)}function Rx(i,t,e,n,r){null!==n?Sc(i,t,e,n,r):Ix(i,t,e)}function Ep(i,t){return i.parentNode(t)}function kx(i,t,e){return Ox(i,t,e)}let dv,Ip,mv,Ox=function Px(i,t,e){return 40&i.type?Ai(i,e):null};function ph(i,t,e,n){const r=Dx(i,n,t),s=t[bt],a=kx(n.parent||t[he],n,t);if(null!=r)if(Array.isArray(e))for(let l=0;li,createScript:i=>i,createScriptURL:i=>i})}catch{}return Ip}()?.createHTML(i)||i}class Ol{constructor(t){this.changingThisBreaksApplicationSecurity=t}toString(){return`SafeValue must use [property]=binding: ${this.changingThisBreaksApplicationSecurity} (see ${Gu})`}}class n1 extends Ol{getTypeName(){return"HTML"}}class r1 extends Ol{getTypeName(){return"Style"}}class s1 extends Ol{getTypeName(){return"Script"}}class o1 extends Ol{getTypeName(){return"URL"}}class kp extends Ol{getTypeName(){return"ResourceURL"}}function Qs(i){return i instanceof Ol?i.changingThisBreaksApplicationSecurity:i}function xa(i,t){const e=function a1(i){return i instanceof Ol&&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 ${Gu})`)}return e===t}class f1{constructor(t){this.inertDocumentHelper=t}getInertBodyElement(t){t=""+t;try{const e=(new window.DOMParser).parseFromString(Wd(t),"text/html").body;return null===e?this.inertDocumentHelper.getInertBodyElement(t):(e.removeChild(e.firstChild),e)}catch{return null}}}class p1{constructor(t){this.defaultDoc=t,this.inertDocument=this.defaultDoc.implementation.createHTMLDocument("sanitization-inert")}getInertBodyElement(t){const e=this.inertDocument.createElement("template");return e.innerHTML=Wd(t),e}}const m1=/^(?!javascript:)(?:[a-z0-9+.-]+:|[^&:\/?#]*(?:[\/?#]|$))/i;function gh(i){return(i=String(i)).match(m1)?i:"unsafe:"+i}function wa(i){const t={};for(const e of i.split(","))t[e]=!0;return t}function Ec(...i){const t={};for(const e of i)for(const n in e)e.hasOwnProperty(n)&&(t[n]=!0);return t}const vv=wa("area,br,col,hr,img,wbr"),yv=wa("colgroup,dd,dt,li,p,tbody,td,tfoot,th,thead,tr"),bv=wa("rp,rt"),xv=Ec(vv,Ec(yv,wa("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")),Ec(bv,wa("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")),Ec(bv,yv)),jd=wa("background,cite,href,itemtype,longdesc,poster,src,xlink:href"),$x=Ec(jd,wa("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"),wa("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")),Mv=wa("script,style,template");class Wx{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(!xv.hasOwnProperty(e))return this.sanitizedSomething=!0,!Mv.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();xv.hasOwnProperty(e)&&!vv.hasOwnProperty(e)&&(this.buf.push(""))}chars(t){this.buf.push(jx(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 _1=/[\uD800-\uDBFF][\uDC00-\uDFFF]/g,v1=/([^\#-~ |!])/g;function jx(i){return i.replace(/&/g,"&").replace(_1,function(t){return"&#"+(1024*(t.charCodeAt(0)-55296)+(t.charCodeAt(1)-56320)+65536)+";"}).replace(v1,function(t){return"&#"+t.charCodeAt(0)+";"}).replace(//g,">")}let Op;function Yx(i,t){let e=null;try{Op=Op||function Gx(i){const t=new p1(i);return function Pp(){try{return!!(new window.DOMParser).parseFromString(Wd(""),"text/html")}catch{return!1}}()?new f1(t):t}(i);let n=t?String(t):"";e=Op.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=Op.getInertBodyElement(n)}while(n!==s);return Wd((new Wx).sanitizeChildren(Cv(e)||e))}finally{if(e){const n=Cv(e)||e;for(;n.firstChild;)n.removeChild(n.firstChild)}}}function Cv(i){return"content"in i&&function y1(i){return i.nodeType===Node.ELEMENT_NODE&&"TEMPLATE"===i.nodeName}(i)?i.content:null}var Xn=(()=>((Xn=Xn||{})[Xn.NONE=0]="NONE",Xn[Xn.HTML=1]="HTML",Xn[Xn.STYLE=2]="STYLE",Xn[Xn.SCRIPT=3]="SCRIPT",Xn[Xn.URL=4]="URL",Xn[Xn.RESOURCE_URL=5]="RESOURCE_URL",Xn))();function Fp(i){const t=function wi(){const i=Se();return i&&i[ai]}();return t?t.sanitize(Xn.URL,i)||"":xa(i,"URL")?Qs(i):gh(Jt(i))}const Lp=new me("ENVIRONMENT_INITIALIZER"),tl=new me("INJECTOR",-1),Xx=new me("INJECTOR_DEF_TYPES");class Kx{get(t,e=Sl){if(e===Sl){const n=new Error(`NullInjectorError: No provider for ${mi(t)}!`);throw n.name="NullInjectorError",n}return e}}function C1(...i){return{\u0275providers:Zx(0,i),\u0275fromNgModule:!0}}function Zx(i,...t){const e=[],n=new Set;let r;return Pl(t,s=>{const o=s;Sv(o,e,[],n)&&(r||(r=[]),r.push(o))}),void 0!==r&&Np(r,e),e}function Np(i,t){for(let e=0;e{t.push(s)})}}function Sv(i,t,e,n){if(!(i=Ot(i)))return!1;let r=null,s=u_(i);const o=!s&&Hn(i);if(s||o){if(o&&!o.standalone)return!1;r=i}else{const l=i.ngModule;if(s=u_(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)Sv(c,t,e,n)}}else{if(!s)return!1;{if(null!=s.imports&&!a){let c;n.add(r);try{Pl(s.imports,d=>{Sv(d,t,e,n)&&(c||(c=[]),c.push(d))})}finally{}void 0!==c&&Np(c,t)}if(!a){const c=Xa(r)||(()=>new r);t.push({provide:r,useFactory:c,deps:$n},{provide:Xx,useValue:r,multi:!0},{provide:Lp,useValue:()=>ee(r),multi:!0})}const l=s.providers;null==l||a||Bp(l,d=>{t.push(d)})}}return r!==i&&void 0!==i.providers}function Bp(i,t){for(let e of i)zu(e)&&(e=e.\u0275providers),Array.isArray(e)?Bp(e,t):t(e)}const Up=ci({provide:String,useValue:ci});function Mi(i){return null!==i&&"object"==typeof i&&Up in i}function Dc(i){return"function"==typeof i}const Av=new me("Set Injector scope."),Vp={},E1={};let Dv;function _h(){return void 0===Dv&&(Dv=new Kx),Dv}class eo{}class zp extends eo{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,Iv(t,o=>this.processProvider(o)),this.records.set(tl,Ho(void 0,this)),r.has("environment")&&this.records.set(eo,Ho(void 0,this));const s=this.records.get(Av);null!=s&&"string"==typeof s.value&&this.scopes.add(s.value),this.injectorDefTypes=new Set(this.get(Xx.multi,$n,Ft.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=xd(this),n=js(void 0);try{return t()}finally{xd(e),js(n)}}get(t,e=Sl,n=Ft.Default){this.assertNotDestroyed(),n=Wf(n);const r=xd(this),s=js(void 0);try{if(!(n&Ft.SkipSelf)){let a=this.records.get(t);if(void 0===a){const l=function T1(i){return"function"==typeof i||"object"==typeof i&&i instanceof me}(t)&&Hf(t);a=l&&this.injectableDefInScope(l)?Ho(Tv(t),Vp):null,this.records.set(t,a)}if(null!=a)return this.hydrate(t,a)}return(n&Ft.Self?_h():this.parent).get(t,e=n&Ft.Optional&&e===Sl?null:e)}catch(o){if("NullInjectorError"===o.name){if((o[gi]=o[gi]||[]).unshift(mi(t)),r)throw o;return function m_(i,t,e,n){const r=i[gi];throw t[$f]&&r.unshift(t[$f]),i.message=function E0(i,t,e,n=null){i=i&&"\n"===i.charAt(0)&&i.charAt(1)==KE?i.slice(2):i;let r=mi(t);if(Array.isArray(t))r=t.map(mi).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):mi(a)))}r=`{${s.join(", ")}}`}return`${e}${n?"("+n+")":""}[${r}]: ${i.replace(f_,"\n ")}`}("\n"+i.message,r,e,n),i[El]=r,i[gi]=null,i}(o,t,"R3InjectorError",this.source)}throw o}finally{js(s),xd(r)}}resolveInjectorInitializers(){const t=xd(this),e=js(void 0);try{const n=this.get(Lp.multi,$n,Ft.Self);for(const r of n)r()}finally{xd(t),js(e)}}toString(){const t=[],e=this.records;for(const n of e.keys())t.push(mi(n));return`R3Injector[${t.join(", ")}]`}assertNotDestroyed(){if(this._destroyed)throw new pe(205,!1)}processProvider(t){let e=Dc(t=Ot(t))?t:Ot(t&&t.provide);const n=function Hp(i){return Mi(i)?Ho(void 0,i.useValue):Ho(As(i),Vp)}(t);if(Dc(t)||!0!==t.multi)this.records.get(e);else{let r=this.records.get(e);r||(r=Ho(void 0,Vp,!0),r.factory=()=>jf(r.multi),this.records.set(e,r)),e=t,r.multi.push(t)}this.records.set(e,n)}hydrate(t,e){return e.value===Vp&&(e.value=E1,e.value=e.factory()),"object"==typeof e.value&&e.value&&function D1(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=Ot(t.providedIn);return"string"==typeof e?"any"===e||this.scopes.has(e):this.injectorDefTypes.has(e)}}function Tv(i){const t=Hf(i),e=null!==t?t.factory:Xa(i);if(null!==e)return e;if(i instanceof me)throw new pe(204,!1);if(i instanceof Function)return function Qx(i){const t=i.length;if(t>0)throw Hd(t,"?"),new pe(204,!1);const e=function $u(i){return i&&(i[bd]||i[h_])||null}(i);return null!==e?()=>e.factory(i):()=>new i}(i);throw new pe(204,!1)}function As(i,t,e){let n;if(Dc(i)){const r=Ot(i);return Xa(r)||Tv(r)}if(Mi(i))n=()=>Ot(i.useValue);else if(function Ev(i){return!(!i||!i.useFactory)}(i))n=()=>i.useFactory(...jf(i.deps||[]));else if(function Pi(i){return!(!i||!i.useExisting)}(i))n=()=>ee(Ot(i.useExisting));else{const r=Ot(i&&(i.useClass||i.provide));if(!function A1(i){return!!i.deps}(i))return Xa(r)||Tv(r);n=()=>new r(...jf(i.deps))}return n}function Ho(i,t,e=!1){return{factory:i,value:t,multi:e?[]:void 0}}function Iv(i,t){for(const e of i)Array.isArray(e)?Iv(e,t):e&&zu(e)?Iv(e.\u0275providers,t):t(e)}class I1{}class Rv{}class xo{resolveComponentFactory(t){throw function nl(i){const t=Error(`No component factory found for ${mi(i)}. Did you add it to @NgModule.entryComponents?`);return t.ngComponent=i,t}(t)}}let Ll=(()=>{class i{}return i.NULL=new xo,i})();function k1(){return On(Ar(),Se())}function On(i,t){return new mt(Ai(i,t))}let mt=(()=>{class i{constructor(e){this.nativeElement=e}}return i.__NG_ELEMENT_ID__=k1,i})();function Jx(i){return i instanceof mt?i.nativeElement:i}class Nl{}let il=(()=>{class i{}return i.__NG_ELEMENT_ID__=()=>function P1(){const i=Se(),e=ws(Ar().index,i);return(bs(e)?e:i)[bt]}(),i})(),O1=(()=>{class i{}return i.\u0275prov=Re({token:i,providedIn:"root",factory:()=>null}),i})();class Tc{constructor(t){this.full=t,this.major=t.split(".")[0],this.minor=t.split(".")[1],this.patch=t.split(".").slice(2).join(".")}}const F1=new Tc("15.2.10"),kv={},Pv="ngOriginalError";function Ov(i){return i[Pv]}class rl{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&&Ov(t);for(;e&&Ov(e);)e=Ov(e);return e||null}}function sl(i){return i instanceof Function?i():i}function tw(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 nw="ng-template";function G1(i,t,e){let n=0,r=!0;for(;ns?"":r[h+1].toLowerCase();const m=8&n?p:null;if(m&&-1!==tw(m,c,0)||2&n&&c!==p){if(Go(n))return!1;o=!0}}}}else{if(!o&&!Go(n)&&!Go(l))return!1;if(o&&Go(l))continue;o=!1,n=l|1&n}}return Go(n)||o}function Go(i){return 0==(1&i)}function iw(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&&!Go(o)&&(t+=Ic(s,r),r=""),n=o,s=s||!Go(n);e++}return""!==r&&(t+=Ic(s,r)),t}const on={};function V(i){Uv(zn(),Se(),qn()+i,!1)}function Uv(i,t,e,n){if(!n)if(3==(3&t[fn])){const s=i.preOrderCheckHooks;null!==s&&rp(t,s,e)}else{const s=i.preOrderHooks;null!==s&&sp(t,s,0,e)}Qa(e)}function ow(i,t=null,e=null,n){const r=aw(i,t,e,n);return r.resolveInjectorInitializers(),r}function aw(i,t=null,e=null,n,r=new Set){const s=[e||$n,C1(i)];return n=n||("object"==typeof i?void 0:mi(i)),new zp(s,t||_h(),n||null,r)}let $i=(()=>{class i{static create(e,n){if(Array.isArray(e))return ow({name:""},n,e,"");{const r=e.name??"";return ow({name:r},e.parent,e.providers,r)}}}return i.THROW_IF_NOT_FOUND=Sl,i.NULL=new Kx,i.\u0275prov=Re({token:i,providedIn:"any",factory:()=>ee(tl)}),i.__NG_ELEMENT_ID__=-1,i})();function E(i,t=Ft.Default){const e=Se();return null===e?ee(i,t):N_(Ar(),e,Ot(i),t)}function wo(){throw new Error("invalid")}function fw(i,t){const e=i.contentQueries;if(null!==e)for(let n=0;nbi&&Uv(i,t,bi,!1),Qr(o?2:0,r),e(n,r)}finally{Qa(s),Qr(o?3:1,r)}}function qv(i,t,e){if(Zf(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,on),r)}function be(i,t,e,n,r,s){const o=Ai(i,t);!function Xe(i,t,e,n,r,s,o){if(null==s)i.removeAttribute(t,r,e);else{const a=null==o?Jt(s):o(s,n||"",r);i.setAttribute(t,r,a,e)}}(t[bt],o,s,i.value,e,n,r)}function vt(i,t,e,n,r,s){const o=s[t];if(null!==o){const a=n.setInput;for(let l=0;l0&&rs(e)}}function rs(i){for(let n=rv(i);null!==n;n=sv(n))for(let r=Ui;r0&&rs(s)}const e=i[ot].components;if(null!==e)for(let n=0;n0&&rs(r)}}function ss(i,t){const e=ws(t,i),n=e[ot];(function no(i,t){for(let e=t.length;e-1&&(lv(t,n),fp(e,n))}this._attachedToViewContainer=!1}Ax(this._lView[ot],this._lView)}onDestroy(t){gw(this._lView[ot],this._lView,null,t)}markForCheck(){Ts(this._cdRefInjectingView||this._lView)}detach(){this._lView[fn]&=-65}reattach(){this._lView[fn]|=64}detectChanges(){Mo(this._lView[ot],this._lView,this.context)}checkNoChanges(){}attachToViewContainerRef(){if(this._appRef)throw new pe(902,!1);this._attachedToViewContainer=!0}detachFromAppRef(){this._appRef=null,function GA(i,t){mh(i,t,t[bt],2,null,null)}(this._lView[ot],this._lView)}attachToAppRef(t){if(this._attachedToViewContainer)throw new pe(902,!1);this._appRef=t}}class m8 extends Jv{constructor(t){super(t),this._view=t}detectChanges(){const t=this._view;Mo(t[ot],t,t[Ue],!1)}checkNoChanges(){}get context(){return null}}class YF extends Ll{constructor(t){super(),this.ngModule=t}resolveComponentFactory(t){const e=Hn(t);return new ey(e,this.ngModule)}}function qF(i){const t=[];for(let e in i)i.hasOwnProperty(e)&&t.push({propName:i[e],templateName:e});return t}class _8{constructor(t,e){this.injector=t,this.parentInjector=e}get(t,e,n){n=Wf(n);const r=this.injector.get(t,kv,n);return r!==kv||e===kv?r:this.parentInjector.get(t,e,n)}}class ey extends Rv{get inputs(){return qF(this.componentDef.inputs)}get outputs(){return qF(this.componentDef.outputs)}constructor(t,e){super(),this.componentDef=t,this.ngModule=e,this.componentType=t.type,this.selector=function Z1(i){return i.map(K1).join(",")}(t.selectors),this.ngContentSelectors=t.ngContentSelectors?t.ngContentSelectors:[],this.isBoundToModule=!!e}create(t,e,n,r){let s=(r=r||this.ngModule)instanceof eo?r:r?.injector;s&&null!==this.componentDef.getStandaloneInjector&&(s=this.componentDef.getStandaloneInjector(s)||s);const o=s?new _8(t,s):t,a=o.get(Nl,null);if(null===a)throw new pe(407,!1);const l=o.get(O1,null),c=a.createRenderer(null,this.componentDef),d=this.componentDef.selectors[0][0]||"div",h=n?function yD(i,t,e){return i.selectRootElement(t,e===Ys.ShadowDom)}(c,n,this.componentDef.encapsulation):Sp(c,d,function g8(i){const t=i.toLowerCase();return"svg"===t?Rd:"math"===t?"math":null}(d)),p=this.componentDef.onPush?288:272,m=Zv(0,null,null,1,0,null,null,null,null,null),g=vh(null,m,null,p,null,null,a,c,l,o,null);let b,v;ip(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 y8(i,t){const e=i[ot],n=bi;return i[n]=t,Kd(e,n,2,"#host",null)}(g,h),F=function b8(i,t,e,n,r,s,o,a){const l=r[ot];!function x8(i,t,e,n){for(const r of i)t.mergedAttrs=_c(t.mergedAttrs,r.hostAttrs);null!==t.mergedAttrs&&(bw(t,t.mergedAttrs,!0),null!==e&&Ux(n,e,t))}(n,i,t,o);const c=s.createRenderer(t,e),d=vh(r,mw(e),null,e.onPush?32:16,r[i.index],i,s,c,a||null,null,null);return l.firstCreatePass&&P(l,i,n.length-1),Ti(r,d),r[i.index]=d}(C,h,y,M,g,a,c);v=O0(m,bi),h&&function M8(i,t,e,n){if(n)P_(i,e,["ng-version",F1.full]);else{const{attrs:r,classes:s}=function Q1(i){const t=[],e=[];let n=1,r=2;for(;n0&&Bx(i,e,s.join(" "))}}(c,y,h,n),void 0!==e&&function C8(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=_c(r.hostAttrs,e=_c(e,r.hostAttrs))}}(n)}function TD(i){return i===ja?{}:i===$n?[]:i}function A8(i,t){const e=i.viewQuery;i.viewQuery=e?(n,r)=>{t(n,r),e(n,r)}:t}function D8(i,t){const e=i.contentQueries;i.contentQueries=e?(n,r,s)=>{t(n,r,s),e(n,r,s)}:t}function T8(i,t){const e=i.hostBindings;i.hostBindings=e?(n,r)=>{t(n,r),e(n,r)}:t}function ww(i){return!!ID(i)&&(Array.isArray(i)||!(i instanceof Map)&&Symbol.iterator in i)}function ID(i){return null!==i&&("function"==typeof i||"object"==typeof i)}function Bl(i,t,e){return i[t]=e}function Is(i,t,e){return!Object.is(i[t],e)&&(i[t]=e,!0)}function xh(i,t,e,n){const r=Is(i,t,e);return Is(i,t+1,n)||r}function Dt(i,t,e,n){const r=Se();return Is(r,Tl(),t)&&(zn(),be(Di(),r,i,t,e,n)),Dt}function Wp(i,t,e,n){return Is(i,Tl(),e)?t+Jt(e)+n:on}function jp(i,t,e,n,r,s){const a=xh(i,function Ka(){return Pt.lFrame.bindingIndex}(),e,r);return Xs(2),a?t+Jt(e)+n+Jt(r)+s:on}function fe(i,t,e,n,r,s,o,a){const l=Se(),c=zn(),d=i+bi,h=c.firstCreatePass?function U8(i,t,e,n,r,s,o,a,l){const c=t.consts,d=Kd(t,i,4,o||null,Dl(c,a));Qv(t,e,d,Dl(c,l)),Ld(t,d);const h=d.tView=Zv(2,d,n,r,s,t.directiveRegistry,t.pipeRegistry,null,t.schemas,c);return null!==t.queries&&(t.queries.template(t,d),h.queries=t.queries.embeddedTView(d)),d}(d,c,l,t,e,n,r,s,o):c.data[d];fa(h,!1);const p=l[bt].createComment("");ph(c,l,p,h),Gr(p,l),Ti(l,l[d]=mn(p,l,p,h)),hc(h)&&Xv(c,l,h),null!=o&&Kv(l,h,a)}function ir(i){return Pd(function hA(){return Pt.lFrame.contextLView}(),bi+i)}function U(i,t,e){const n=Se();return Is(n,Tl(),t)&&to(zn(),Di(),n,i,t,n[bt],e,!1),U}function RD(i,t,e,n,r){const o=r?"class":"style";DD(i,e,t.inputs[o],o,n)}function $(i,t,e,n){const r=Se(),s=zn(),o=bi+i,a=r[bt],l=s.firstCreatePass?function z8(i,t,e,n,r,s){const o=t.consts,l=Kd(t,i,2,n,Dl(o,r));return Qv(t,e,l,Dl(o,s)),null!==l.attrs&&bw(l,l.attrs,!1),null!==l.mergedAttrs&&bw(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]=Sp(a,t,function G0(){return Pt.lFrame.currentNamespace}()),d=hc(l);return fa(l,!0),Ux(a,c,l),32!=(32&l.flags)&&ph(s,r,c,l),0===function aA(){return Pt.lFrame.elementDepthCount}()&&Gr(c,r),function lA(){Pt.lFrame.elementDepthCount++}(),d&&(Xv(s,r,l),qv(s,l,r)),null!==n&&Kv(r,l),$}function j(){let i=Ar();S_()?E_():(i=i.parent,fa(i,!1));const t=i;!function cA(){Pt.lFrame.elementDepthCount--}();const e=zn();return e.firstCreatePass&&(Ld(e,i),Zf(i)&&e.queries.elementEnd(i)),null!=t.classesWithoutHost&&function vA(i){return 0!=(8&i.flags)}(t)&&RD(e,t,Se(),t.classesWithoutHost,!0),null!=t.stylesWithoutHost&&function k_(i){return 0!=(16&i.flags)}(t)&&RD(e,t,Se(),t.stylesWithoutHost,!1),j}function Oe(i,t,e,n){return $(i,t,e,n),j(),Oe}function $r(i,t,e){const n=Se(),r=zn(),s=i+bi,o=r.firstCreatePass?function H8(i,t,e,n,r){const s=t.consts,o=Dl(s,n),a=Kd(t,i,8,"ng-container",o);return null!==o&&bw(a,o,!0),Qv(t,e,a,Dl(s,r)),null!==t.queries&&t.queries.elementStart(t,a),a}(s,r,n,t,e):r.data[s];fa(o,!0);const a=n[s]=n[bt].createComment("");return ph(r,n,a,o),Gr(a,n),hc(o)&&(Xv(r,n,o),qv(r,o,n)),null!=e&&Kv(n,o),$r}function Wr(){let i=Ar();const t=zn();return S_()?E_():(i=i.parent,fa(i,!1)),t.firstCreatePass&&(Ld(t,i),Zf(i)&&t.queries.elementEnd(i)),Wr}function ny(i,t,e){return $r(i,t,e),Wr(),ny}function Kn(){return Se()}function iy(i){return!!i&&"function"==typeof i.then}function lL(i){return!!i&&"function"==typeof i.subscribe}const kD=lL;function ke(i,t,e,n){const r=Se(),s=zn(),o=Ar();return cL(s,r,r[bt],o,i,t,n),ke}function PD(i,t){const e=Ar(),n=Se(),r=zn();return cL(r,n,WF(Ju(r.data),e,n),e,i,t),PD}function cL(i,t,e,n,r,s,o){const a=hc(n),c=i.firstCreatePass&&$F(i),d=t[Ue],h=GF(t);let p=!0;if(3&n.type||o){const b=Ai(n,t),v=o?o(b):b,y=h.length,M=o?C=>o(I(C[n.index])):n.index;let x=null;if(!o&&a&&(x=function G8(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=uL(n,t,d,s,!1);const C=e.listen(v,r,s);h.push(s,C),c&&c.push(r,M,y,y+1)}}else s=uL(n,t,d,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?ws(i.index,t):t);let l=dL(t,e,n,o),c=s.__ngNextListenerFn__;for(;c;)l=dL(t,e,c,o)&&l,c=c.__ngNextListenerFn__;return r&&!1===l&&(o.preventDefault(),o.returnValue=!1),l}}function re(i=1){return function mA(i){return(Pt.lFrame.contextLView=function H0(i,t){for(;i>0;)t=t[Er],i--;return t}(i,Pt.lFrame.contextLView))[Ue]}(i)}function $8(i,t){let e=null;const n=function j1(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 LD(i){return 2|i}function wh(i){return(131068&i)>>2}function ND(i,t){return-131069&i|t<<2}function BD(i){return 1|i}function bL(i,t,e,n,r){const s=i[e+1],o=null===t;let a=n?Qd(s):wh(s),l=!1;for(;0!==a&&(!1===l||o);){const d=i[a+1];K8(i[a],t)&&(l=!0,i[a+1]=n?BD(d):LD(d)),a=n?Qd(d):wh(d)}l&&(i[e+1]=n?LD(s):BD(s))}function K8(i,t){return null===i||null==t||(Array.isArray(i)?i[1]:i)===t||!(!Array.isArray(i)||"string"!=typeof t)&&wc(i,t)>=0}const Rr={textEnd:0,key:0,keyEnd:0,value:0,valueEnd:0};function xL(i){return i.substring(Rr.key,Rr.keyEnd)}function wL(i,t){const e=Rr.textEnd;return e===t?-1:(t=Rr.keyEnd=function eW(i,t,e){for(;t32;)t++;return t}(i,Rr.key=t,e),Jp(i,t,e))}function Jp(i,t,e){for(;t=0;e=wL(t,e))Cs(i,xL(t),!0)}function ol(i,t,e,n){const r=Se(),s=zn(),o=Xs(2);s.firstUpdatePass&&DL(s,i,o,n),t!==on&&Is(r,o,t)&&IL(s,s.data[qn()],r,r[bt],i,r[o+1]=function hW(i,t){return null==i||""===i||("string"==typeof t?i+=t:"object"==typeof i&&(i=mi(Qs(i)))),i}(t,e),n,o)}function AL(i,t){return t>=i.expandoStartIndex}function DL(i,t,e,n){const r=i.data;if(null===r[e+1]){const s=r[qn()],o=AL(i,e);kL(s,n)&&null===t&&!o&&(t=!1),t=function sW(i,t,e,n){const r=Ju(i);let s=n?t.residualClasses:t.residualStyles;if(null===r)0===(n?t.classBindings:t.styleBindings)&&(e=ry(e=UD(null,i,t,e,n),t.attrs,n),s=null);else{const o=t.directiveStylingLast;if(-1===o||i[o]!==r)if(e=UD(r,i,t,e,n),null===s){let l=function oW(i,t,e){const n=e?t.classBindings:t.styleBindings;if(0!==wh(n))return i[Qd(n)]}(i,t,n);void 0!==l&&Array.isArray(l)&&(l=UD(null,i,t,l[1],n),l=ry(l,t.attrs,n),function aW(i,t,e,n){i[Qd(e?t.classBindings:t.styleBindings)]=n}(i,t,n,l))}else s=function lW(i,t,e){let n;const r=t.directiveEnd;for(let s=1+t.directiveStylingLast;s0)&&(c=!0)):d=e,r)if(0!==l){const p=Qd(i[a+1]);i[n+1]=Cw(p,a),0!==p&&(i[p+1]=ND(i[p+1],n)),i[a+1]=function j8(i,t){return 131071&i|t<<17}(i[a+1],n)}else i[n+1]=Cw(a,0),0!==a&&(i[a+1]=ND(i[a+1],n)),a=n;else i[n+1]=Cw(l,0),0===a?a=n:i[l+1]=ND(i[l+1],n),l=n;c&&(i[n+1]=LD(i[n+1])),bL(i,d,n,!0),bL(i,d,n,!1),function X8(i,t,e,n,r){const s=r?i.residualClasses:i.residualStyles;null!=s&&"string"==typeof t&&wc(s,t)>=0&&(e[n+1]=BD(e[n+1]))}(t,d,i,n,s),o=Cw(a,l),s?t.classBindings=o:t.styleBindings=o}(r,s,t,e,o,n)}}function UD(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),d=c?l[1]:l,h=null===d;let p=e[r+1];p===on&&(p=h?$n:void 0);let m=h?$d(p,n):d===n?p:void 0;if(c&&!Sw(m)&&(m=$d(l,n)),Sw(m)&&(a=m,o))return a;const g=i[r+1];r=o?Qd(g):wh(g)}if(null!==t){let l=s?t.residualClasses:t.residualStyles;null!=l&&(a=$d(l,n))}return a}function Sw(i){return void 0!==i}function kL(i,t){return 0!=(i.flags&(t?8:16))}function Ve(i,t=""){const e=Se(),n=zn(),r=i+bi,s=n.firstCreatePass?Kd(n,r,1,t,null):n.data[r],o=e[r]=function ov(i,t){return i.createText(t)}(e[bt],t);ph(n,e,o,s),fa(s,!1)}function ui(i){return Xi("",i,""),ui}function Xi(i,t,e){const n=Se(),r=Wp(n,i,t,e);return r!==on&&Rc(n,qn(),r),Xi}function Mh(i,t,e,n,r){const s=Se(),o=jp(s,i,t,e,n,r);return o!==on&&Rc(s,qn(),o),Mh}function VL(i,t,e){!function al(i,t,e,n){const r=zn(),s=Xs(2);r.firstUpdatePass&&DL(r,null,s,n);const o=Se();if(e!==on&&Is(o,s,e)){const a=r.data[qn()];if(kL(a,n)&&!AL(r,s)){let l=n?a.classesWithoutHost:a.stylesWithoutHost;null!==l&&(e=Uf(l,e||"")),RD(r,a,o,e,n)}else!function uW(i,t,e,n,r,s,o,a){r===on&&(r=$n);let l=0,c=0,d=0((it=it||{})[it.LocaleId=0]="LocaleId",it[it.DayPeriodsFormat=1]="DayPeriodsFormat",it[it.DayPeriodsStandalone=2]="DayPeriodsStandalone",it[it.DaysFormat=3]="DaysFormat",it[it.DaysStandalone=4]="DaysStandalone",it[it.MonthsFormat=5]="MonthsFormat",it[it.MonthsStandalone=6]="MonthsStandalone",it[it.Eras=7]="Eras",it[it.FirstDayOfWeek=8]="FirstDayOfWeek",it[it.WeekendRange=9]="WeekendRange",it[it.DateFormat=10]="DateFormat",it[it.TimeFormat=11]="TimeFormat",it[it.DateTimeFormat=12]="DateTimeFormat",it[it.NumberSymbols=13]="NumberSymbols",it[it.NumberFormats=14]="NumberFormats",it[it.CurrencyCode=15]="CurrencyCode",it[it.CurrencySymbol=16]="CurrencySymbol",it[it.CurrencyName=17]="CurrencyName",it[it.Currencies=18]="Currencies",it[it.Directionality=19]="Directionality",it[it.PluralCase=20]="PluralCase",it[it.ExtraData=21]="ExtraData",it))();const tm="en-US";let QL=tm;function HD(i,t,e,n,r){if(i=Ot(i),Array.isArray(i))for(let s=0;s>20;if(Dc(i)||!i.multi){const m=new Nd(l,r,E),g=$D(a,t,r?d:d+p,h);-1===g?(pn(nh(c,o),s,a),GD(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=$D(a,t,d+p,h),g=$D(a,t,d,d+p),v=g>=0&&e[g];if(r&&!v||!r&&!(m>=0&&e[m])){pn(nh(c,o),s,a);const y=function Tj(i,t,e,n,r){const s=new Nd(i,e,E);return s.multi=[],s.index=t,s.componentProviders=0,C2(s,r,n&&!e),s}(r?Dj:Aj,e.length,r,n,l);!r&&v&&(e[g].providerFactory=y),GD(s,i,t.length,0),t.push(a),c.directiveStart++,c.directiveEnd++,r&&(c.providerIndexes+=1048576),e.push(y),o.push(y)}else GD(s,i,m>-1?m:g,C2(e[r?g:m],l,!r&&n));!r&&n&&v&&e[g].componentProviders++}}}function GD(i,t,e,n){const r=Dc(t),s=function S1(i){return!!i.useClass}(t);if(r||s){const l=(s?Ot(t.useClass):t).prototype.ngOnDestroy;if(l){const c=i.destroyHooks||(i.destroyHooks=[]);if(!r&&t.multi){const d=c.indexOf(e);-1===d?c.push(e,[n,l]):c[d+1].push(n,l)}else c.push(e,l)}}}function C2(i,t,e){return e&&i.componentProviders++,i.multi.push(t)-1}function $D(i,t,e,n){for(let r=e;r{e.providersResolver=(n,r)=>function Ej(i,t,e){const n=zn();if(n.firstCreatePass){const r=vo(i);HD(e,n.data,n.blueprint,r,!0),HD(t,n.data,n.blueprint,r,!1)}}(n,r?r(i):i,t)}}class nm{}class S2{}class E2 extends nm{constructor(t,e){super(),this._parent=e,this._bootstrapComponents=[],this.destroyCbs=[],this.componentFactoryResolver=new YF(this);const n=dr(t);this._bootstrapComponents=sl(n.bootstrap),this._r3Injector=aw(t,e,[{provide:nm,useValue:this},{provide:Ll,useValue:this.componentFactoryResolver}],mi(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 jD extends S2{constructor(t){super(),this.moduleType=t}create(t){return new E2(this.moduleType,t)}}class Rj extends nm{constructor(t,e,n){super(),this.componentFactoryResolver=new YF(this),this.instance=null;const r=new zp([...t,{provide:nm,useValue:this},{provide:Ll,useValue:this.componentFactoryResolver}],e||_h(),n,new Set(["environment"]));this.injector=r,r.resolveInjectorInitializers()}destroy(){this.injector.destroy()}onDestroy(t){this.injector.onDestroy(t)}}function Rw(i,t,e=null){return new Rj(i,t,e).injector}let kj=(()=>{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=Zx(0,e.type),r=n.length>0?Rw([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=Re({token:i,providedIn:"environment",factory:()=>new i(ee(eo))}),i})();function YD(i){i.getStandaloneInjector=t=>t.get(kj).getOrCreateStandaloneInjector(i)}function ro(i,t,e){const n=zr()+i,r=Se();return r[n]===on?Bl(r,n,e?t.call(e):t()):function ty(i,t){return i[t]}(r,n)}function im(i,t,e,n){return O2(Se(),zr(),i,t,e,n)}function P2(i,t,e,n,r,s,o){return function N2(i,t,e,n,r,s,o,a,l){const c=t+e;return function Ma(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)?Bl(i,c+4,l?n.call(l,r,s,o,a):n(r,s,o,a)):dy(i,c+4)}(Se(),zr(),i,t,e,n,r,s,o)}function dy(i,t){const e=i[t];return e===on?void 0:e}function O2(i,t,e,n,r,s){const o=t+e;return Is(i,o,r)?Bl(i,o+1,s?n.call(s,r):n(r)):dy(i,o+1)}function gt(i,t){const e=zn();let n;const r=i+bi;e.firstCreatePass?(n=function qj(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=Xa(n.type)),o=js(E);try{const a=lp(!1),l=s();return lp(a),function V8(i,t,e,n){e>=i.data.length&&(i.data[e]=null,i.blueprint[e]=null),t[e]=n}(e,Se(),r,l),l}finally{js(o)}}function yt(i,t,e){const n=i+bi,r=Se(),s=Pd(r,n);return uy(r,n)?O2(r,zr(),t,s.transform,e,s):s.transform(e)}function XD(i,t,e,n){const r=i+bi,s=Se(),o=Pd(s,r);return uy(s,r)?function F2(i,t,e,n,r,s,o){const a=t+e;return xh(i,a,r,s)?Bl(i,a+2,o?n.call(o,r,s):n(r,s)):dy(i,a+2)}(s,zr(),t,o.transform,e,n,o):o.transform(e,n)}function uy(i,t){return i[ot].data[t].pure}function KD(i){return t=>{setTimeout(i,void 0,t)}}const $e=class Qj extends Ie{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=KD(s),r&&(r=KD(r)),o&&(o=KD(o)));const a=super.subscribe({next:r,error:s,complete:o});return t instanceof Qt&&t.add(a),a}};function Jj(){return this._results[Symbol.iterator]()}class rm{get changes(){return this._changes||(this._changes=new $e)}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=rm.prototype;e[Symbol.iterator]||(e[Symbol.iterator]=Jj)}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 Dr(i){return i.flat(Number.POSITIVE_INFINITY)}(t);(this._changesDetected=!function hp(i,t,e){if(i.length!==t.length)return!1;for(let n=0;n{class i{}return i.__NG_ELEMENT_ID__=n6,i})();const e6=Co,t6=class extends e6{constructor(t,e,n){super(),this._declarationLView=t,this._declarationTContainer=e,this.elementRef=n}createEmbeddedView(t,e){const n=this._declarationTContainer.tView,r=vh(this._declarationLView,n,t,16,null,n.declTNode,null,null,null,null,e||null);r[Zu]=this._declarationLView[this._declarationTContainer.index];const o=this._declarationLView[qs];return null!==o&&(r[qs]=o.createEmbeddedView(n)),bh(n,r,t),new Jv(r)}};function n6(){return kw(Ar(),Se())}function kw(i,t){return 4&i.type?new t6(t,i,On(i,t)):null}let jr=(()=>{class i{}return i.__NG_ELEMENT_ID__=r6,i})();function r6(){return z2(Ar(),Se())}const s6=jr,U2=class extends s6{constructor(t,e,n){super(),this._lContainer=t,this._hostTNode=e,this._hostLView=n}get element(){return On(this._hostTNode,this._hostLView)}get injector(){return new yc(this._hostTNode,this._hostLView)}get parentInjector(){const t=rh(this._hostTNode,this._hostLView);if(ap(t)){const e=th(t,this._hostLView),n=eh(t);return new yc(e[ot].data[n+8],e)}return new yc(null,this._hostLView)}clear(){for(;this.length>0;)this.remove(this.length-1)}get(t){const e=V2(this._lContainer);return null!==e&&e[t]||null}get length(){return this._lContainer.length-Ui}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 ah(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 ey(Hn(t)),c=n||this.parentInjector;if(!s&&null==l.ngModule){const p=(o?c:this.parentInjector).get(eo,null);p&&(s=p)}const d=l.create(c,r,void 0,s);return this.insert(d.hostView,a),d}insert(t,e){const n=t._lView,r=n[ot];if(function oA(i){return xs(i[Bi])}(n)){const d=this.indexOf(t);if(-1!==d)this.detach(d);else{const h=n[Bi],p=new U2(h,h[he],h[Bi]);p.detach(p.indexOf(t))}}const s=this._adjustIndex(e),o=this._lContainer;!function av(i,t,e,n){const r=Ui+n,s=e.length;n>0&&(e[r-1][ys]=t),n0)n.push(o[a/2]);else{const c=s[a+1],d=t[-l];for(let h=Ui;h{class i{constructor(e){this.appInits=e,this.resolve=Ow,this.reject=Ow,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)(ee(Fw,8))},i.\u0275prov=Re({token:i,factory:i.\u0275fac,providedIn:"root"}),i})();const am=new me("AppId",{providedIn:"root",factory:function dN(){return`${lT()}${lT()}${lT()}`}});function lT(){return String.fromCharCode(97+Math.floor(25*Math.random()))}const uN=new me("Platform Initializer"),cT=new me("Platform ID",{providedIn:"platform",factory:()=>"unknown"}),kr=new me("AnimationModuleType");let R6=(()=>{class i{log(e){console.log(e)}warn(e){console.warn(e)}}return i.\u0275fac=function(e){return new(e||i)},i.\u0275prov=Re({token:i,factory:i.\u0275fac,providedIn:"platform"}),i})();const Hl=new me("LocaleId",{providedIn:"root",factory:()=>Lt(Hl,Ft.Optional|Ft.SkipSelf)||function k6(){return typeof $localize<"u"&&$localize.locale||tm}()});class O6{constructor(t,e){this.ngModuleFactory=t,this.componentFactories=e}}let hN=(()=>{class i{compileModuleSync(e){return new jD(e)}compileModuleAsync(e){return Promise.resolve(this.compileModuleSync(e))}compileModuleAndAllComponentsSync(e){const n=this.compileModuleSync(e),s=sl(dr(e).declarations).reduce((o,a)=>{const l=Hn(a);return l&&o.push(new ey(l)),o},[]);return new O6(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=Re({token:i,factory:i.\u0275fac,providedIn:"root"}),i})();const N6=(()=>Promise.resolve(0))();function dT(i){typeof Zone>"u"?N6.then(()=>{i&&i.apply(null,null)}):Zone.current.scheduleMicroTask("scheduleMicrotask",i)}class ft{constructor({enableLongStackTrace:t=!1,shouldCoalesceEventChangeDetection:e=!1,shouldCoalesceRunChangeDetection:n=!1}){if(this.hasPendingMacrotasks=!1,this.hasPendingMicrotasks=!1,this.isStable=!0,this.onUnstable=new $e(!1),this.onMicrotaskEmpty=new $e(!1),this.onStable=new $e(!1),this.onError=new $e(!1),typeof Zone>"u")throw new pe(908,!1);Zone.assertZonePatched();const r=this;r._nesting=0,r._outer=r._inner=Zone.current,Zone.TaskTrackingZoneSpec&&(r._inner=r._inner.fork(new Zone.TaskTrackingZoneSpec)),t&&Zone.longStackTraceZoneSpec&&(r._inner=r._inner.fork(Zone.longStackTraceZoneSpec)),r.shouldCoalesceEventChangeDetection=!n&&e,r.shouldCoalesceRunChangeDetection=n,r.lastRequestAnimationFrameId=-1,r.nativeRequestAnimationFrame=function B6(){let i=In.requestAnimationFrame,t=In.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 z6(i){const t=()=>{!function V6(i){i.isCheckStableRunning||-1!==i.lastRequestAnimationFrameId||(i.lastRequestAnimationFrameId=i.nativeRequestAnimationFrame.call(In,()=>{i.fakeTopEventTask||(i.fakeTopEventTask=Zone.root.scheduleEventTask("fakeTopEventTask",()=>{i.lastRequestAnimationFrameId=-1,hT(i),i.isCheckStableRunning=!0,uT(i),i.isCheckStableRunning=!1},void 0,()=>{},()=>{})),i.fakeTopEventTask.invoke()}),hT(i))}(i)};i._inner=i._inner.fork({name:"angular",properties:{isAngularZone:!0},onInvokeTask:(e,n,r,s,o,a)=>{try{return mN(i),e.invokeTask(r,s,o,a)}finally{(i.shouldCoalesceEventChangeDetection&&"eventTask"===s.type||i.shouldCoalesceRunChangeDetection)&&t(),gN(i)}},onInvoke:(e,n,r,s,o,a,l)=>{try{return mN(i),e.invoke(r,s,o,a,l)}finally{i.shouldCoalesceRunChangeDetection&&t(),gN(i)}},onHasTask:(e,n,r,s)=>{e.hasTask(r,s),n===r&&("microTask"==s.change?(i._hasPendingMicrotasks=s.microTask,hT(i),uT(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(!ft.isInAngularZone())throw new pe(909,!1)}static assertNotInAngularZone(){if(ft.isInAngularZone())throw new pe(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,U6,Ow,Ow);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 U6={};function uT(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 hT(i){i.hasPendingMicrotasks=!!(i._hasPendingMicrotasks||(i.shouldCoalesceEventChangeDetection||i.shouldCoalesceRunChangeDetection)&&-1!==i.lastRequestAnimationFrameId)}function mN(i){i._nesting++,i.isStable&&(i.isStable=!1,i.onUnstable.emit(null))}function gN(i){i._nesting--,uT(i)}class H6{constructor(){this.hasPendingMicrotasks=!1,this.hasPendingMacrotasks=!1,this.isStable=!0,this.onUnstable=new $e,this.onMicrotaskEmpty=new $e,this.onStable=new $e,this.onError=new $e}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 _N=new me(""),Nw=new me("");let mT,fT=(()=>{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,mT||(function G6(i){mT=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:()=>{ft.assertNotInAngularZone(),dT(()=>{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())dT(()=>{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)(ee(ft),ee(pT),ee(Nw))},i.\u0275prov=Re({token:i,factory:i.\u0275fac}),i})(),pT=(()=>{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 mT?.findTestabilityInTree(this,e,n)??null}}return i.\u0275fac=function(e){return new(e||i)},i.\u0275prov=Re({token:i,factory:i.\u0275fac,providedIn:"platform"}),i})();const Pc=!1;let Jd=null;const vN=new me("AllowMultipleToken"),gT=new me("PlatformDestroyListeners"),yN=new me("appBootstrapListener");class bN{constructor(t,e){this.name=t,this.token=e}}function wN(i,t,e=[]){const n=`Platform: ${t}`,r=new me(n);return(s=[])=>{let o=_T();if(!o||o.injector.get(vN,!1)){const a=[...e,...s,{provide:r,useValue:!0}];i?i(a):function j6(i){if(Jd&&!Jd.get(vN,!1))throw new pe(400,!1);Jd=i;const t=i.get(CN);(function xN(i){const t=i.get(uN,null);t&&t.forEach(e=>e())})(i)}(function MN(i=[],t){return $i.create({name:t,providers:[{provide:Av,useValue:"platform"},{provide:gT,useValue:new Set([()=>Jd=null])},...i]})}(a,n))}return function q6(i){const t=_T();if(!t)throw new pe(401,!1);return t}()}}function _T(){return Jd?.get(CN)??null}let CN=(()=>{class i{constructor(e){this._injector=e,this._modules=[],this._destroyListeners=[],this._destroyed=!1}bootstrapModuleFactory(e,n){const r=function EN(i,t){let e;return e="noop"===i?new H6:("zone.js"===i?void 0:i)||new ft(t),e}(n?.ngZone,function SN(i){return{enableLongStackTrace:!1,shouldCoalesceEventChangeDetection:!(!i||!i.ngZoneEventCoalescing)||!1,shouldCoalesceRunChangeDetection:!(!i||!i.ngZoneRunCoalescing)||!1}}(n)),s=[{provide:ft,useValue:r}];return r.run(()=>{const o=$i.create({providers:s,parent:this.injector,name:e.moduleType.name}),a=e.create(o),l=a.injector.get(rl,null);if(!l)throw new pe(402,!1);return r.runOutsideAngular(()=>{const c=r.onError.subscribe({next:d=>{l.handleError(d)}});a.onDestroy(()=>{Bw(this._modules,a),c.unsubscribe()})}),function AN(i,t,e){try{const n=e();return iy(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(Lw);return c.runInitializers(),c.donePromise.then(()=>(function JL(i){Sn(i,"Expected localeId to be defined"),"string"==typeof i&&(QL=i.toLowerCase().replace(/_/g,"-"))}(a.injector.get(Hl,tm)||tm),this._moduleDoBootstrap(a),a))})})}bootstrapModule(e,n=[]){const r=DN({},n);return function $6(i,t,e){const n=new jD(e);return Promise.resolve(n)}(0,0,e).then(s=>this.bootstrapModuleFactory(s,r))}_moduleDoBootstrap(e){const n=e.injector.get(lm);if(e._bootstrapComponents.length>0)e._bootstrapComponents.forEach(r=>n.bootstrap(r));else{if(!e.instance.ngDoBootstrap)throw new pe(-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 pe(404,!1);this._modules.slice().forEach(n=>n.destroy()),this._destroyListeners.forEach(n=>n());const e=this._injector.get(gT,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)(ee($i))},i.\u0275prov=Re({token:i,factory:i.\u0275fac,providedIn:"platform"}),i})();function DN(i,t){return Array.isArray(t)?t.reduce(DN,i):{...i,...t}}let lm=(()=>{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 Tn(a=>{this._stable=this._zone.isStable&&!this._zone.hasPendingMacrotasks&&!this._zone.hasPendingMicrotasks,this._zone.runOutsideAngular(()=>{a.next(this._stable),a.complete()})}),o=new Tn(a=>{let l;this._zone.runOutsideAngular(()=>{l=this._zone.onStable.subscribe(()=>{ft.assertNotInAngularZone(),dT(()=>{!this._stable&&!this._zone.hasPendingMacrotasks&&!this._zone.hasPendingMicrotasks&&(this._stable=!0,a.next(!0))})})});const c=this._zone.onUnstable.subscribe(()=>{ft.assertInAngularZone(),this._stable&&(this._stable=!1,this._zone.runOutsideAngular(()=>{a.next(!1)}))});return()=>{l.unsubscribe(),c.unsubscribe()}});this.isStable=Cr(s,o.pipe(Bf()))}bootstrap(e,n){const r=e instanceof Rv;if(!this._injector.get(Lw).done){!r&&function Cd(i){const t=Hn(i)||Vr(i)||vs(i);return null!==t&&t.standalone}(e);throw new pe(405,Pc)}let o;o=r?e:this._injector.get(Ll).resolveComponentFactory(e),this.componentTypes.push(o.componentType);const a=function W6(i){return i.isBoundToModule}(o)?void 0:this._injector.get(nm),c=o.create($i.NULL,[],n||o.selector,a),d=c.location.nativeElement,h=c.injector.get(_N,null);return h?.registerApplication(d),c.onDestroy(()=>{this.detachView(c.hostView),Bw(this.components,c),h?.unregisterApplication(d)}),this._loadComponent(c),c}tick(){if(this._runningTick)throw new pe(101,!1);try{this._runningTick=!0;for(let e of this._views)e.detectChanges()}catch(e){this._zone.runOutsideAngular(()=>this._exceptionHandler.handleError(e))}finally{this._runningTick=!1}}attachView(e){const n=e;this._views.push(n),n.attachToAppRef(this)}detachView(e){const n=e;Bw(this._views,n),n.detachFromAppRef()}_loadComponent(e){this.attachView(e.hostView),this.tick(),this.components.push(e);const n=this._injector.get(yN,[]);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),()=>Bw(this._destroyListeners,e)}destroy(){if(this._destroyed)throw new pe(406,!1);const e=this._injector;e.destroy&&!e.destroyed&&e.destroy()}get viewCount(){return this._views.length}warnIfDestroyed(){}}return i.\u0275fac=function(e){return new(e||i)(ee(ft),ee(eo),ee(rl))},i.\u0275prov=Re({token:i,factory:i.\u0275fac,providedIn:"root"}),i})();function Bw(i,t){const e=i.indexOf(t);e>-1&&i.splice(e,1)}let si=(()=>{class i{}return i.__NG_ELEMENT_ID__=K6,i})();function K6(i){return function Z6(i,t,e){if(Ed(i)&&!e){const n=ws(i.index,t);return new Jv(n,n)}return 47&i.type?new Jv(t[nr],t):null}(Ar(),Se(),16==(16&i))}class PN{constructor(){}supports(t){return ww(t)}create(t){return new r9(t)}}const n9=(i,t)=>t;class r9{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||n9}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 s9(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 ON),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 ON),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 s9{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 o9{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 ON{constructor(){this.map=new Map}put(t){const e=t.trackById;let n=this.map.get(e);n||(n=new o9,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 FN(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 l9(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 l9{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 NN(){return new zw([new PN])}let zw=(()=>{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||NN()),deps:[[i,new ya,new Ss]]}}find(e){const n=this.factories.find(r=>r.supports(e));if(null!=n)return n;throw new pe(901,!1)}}return i.\u0275prov=Re({token:i,providedIn:"root",factory:NN}),i})();function BN(){return new fy([new LN])}let fy=(()=>{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||BN()),deps:[[i,new ya,new Ss]]}}find(e){const n=this.factories.find(r=>r.supports(e));if(n)return n;throw new pe(901,!1)}}return i.\u0275prov=Re({token:i,providedIn:"root",factory:BN}),i})();const u9=wN(null,"core",[]);let h9=(()=>{class i{constructor(e){}}return i.\u0275fac=function(e){return new(e||i)(ee(lm))},i.\u0275mod=en({type:i}),i.\u0275inj=Wt({}),i})();let wT=null;function Oc(){return wT}class m9{}const qt=new me("DocumentToken");let MT=(()=>{class i{historyGo(e){throw new Error("Not implemented")}}return i.\u0275fac=function(e){return new(e||i)},i.\u0275prov=Re({token:i,factory:function(){return function g9(){return ee(UN)}()},providedIn:"platform"}),i})();const _9=new me("Location Initialized");let UN=(()=>{class i extends MT{constructor(e){super(),this._doc=e,this._location=window.location,this._history=window.history}getBaseHrefFromDOM(){return Oc().getBaseHref(this._doc)}onPopState(e){const n=Oc().getGlobalEventTarget(this._doc,"window");return n.addEventListener("popstate",e,!1),()=>n.removeEventListener("popstate",e)}onHashChange(e){const n=Oc().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){VN()?this._history.pushState(e,n,r):this._location.hash=r}replaceState(e,n,r){VN()?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)(ee(qt))},i.\u0275prov=Re({token:i,factory:function(){return function v9(){return new UN(ee(qt))}()},providedIn:"platform"}),i})();function VN(){return!!window.history.pushState}function CT(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 zN(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 Fc(i){return i&&"?"!==i[0]?"?"+i:i}let Eh=(()=>{class i{historyGo(e){throw new Error("Not implemented")}}return i.\u0275fac=function(e){return new(e||i)},i.\u0275prov=Re({token:i,factory:function(){return Lt(GN)},providedIn:"root"}),i})();const HN=new me("appBaseHref");let GN=(()=>{class i extends Eh{constructor(e,n){super(),this._platformLocation=e,this._removeListenerFns=[],this._baseHref=n??this._platformLocation.getBaseHrefFromDOM()??Lt(qt).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 CT(this._baseHref,e)}path(e=!1){const n=this._platformLocation.pathname+Fc(this._platformLocation.search),r=this._platformLocation.hash;return r&&e?`${n}${r}`:n}pushState(e,n,r,s){const o=this.prepareExternalUrl(r+Fc(s));this._platformLocation.pushState(e,n,o)}replaceState(e,n,r,s){const o=this.prepareExternalUrl(r+Fc(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)(ee(MT),ee(HN,8))},i.\u0275prov=Re({token:i,factory:i.\u0275fac,providedIn:"root"}),i})(),y9=(()=>{class i extends Eh{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=CT(this._baseHref,e);return n.length>0?"#"+n:n}pushState(e,n,r,s){let o=this.prepareExternalUrl(r+Fc(s));0==o.length&&(o=this._platformLocation.pathname),this._platformLocation.pushState(e,n,o)}replaceState(e,n,r,s){let o=this.prepareExternalUrl(r+Fc(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)(ee(MT),ee(HN,8))},i.\u0275prov=Re({token:i,factory:i.\u0275fac}),i})(),py=(()=>{class i{constructor(e){this._subject=new $e,this._urlChangeListeners=[],this._urlChangeSubscription=null,this._locationStrategy=e;const n=this._locationStrategy.getBaseHref();this._basePath=function w9(i){if(new RegExp("^(https?:)?//").test(i)){const[,e]=i.split(/\/\/[^\/]+/);return e}return i}(zN($N(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+Fc(n))}normalize(e){return i.stripTrailingSlash(function x9(i,t){if(!i||!t.startsWith(i))return t;const e=t.substring(i.length);return""===e||["/",";","?","#"].includes(e[0])?e:t}(this._basePath,$N(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+Fc(n)),r)}replaceState(e,n="",r=null){this._locationStrategy.replaceState(r,"",e,n),this._notifyUrlChangeListeners(this.prepareExternalUrl(e+Fc(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=Fc,i.joinWithSlash=CT,i.stripTrailingSlash=zN,i.\u0275fac=function(e){return new(e||i)(ee(Eh))},i.\u0275prov=Re({token:i,factory:function(){return function b9(){return new py(ee(Eh))}()},providedIn:"root"}),i})();function $N(i){return i.replace(/\/index.html$/,"")}var So=(()=>((So=So||{})[So.Decimal=0]="Decimal",So[So.Percent=1]="Percent",So[So.Currency=2]="Currency",So[So.Scientific=3]="Scientific",So))(),Gt=(()=>((Gt=Gt||{})[Gt.Decimal=0]="Decimal",Gt[Gt.Group=1]="Group",Gt[Gt.List=2]="List",Gt[Gt.PercentSign=3]="PercentSign",Gt[Gt.PlusSign=4]="PlusSign",Gt[Gt.MinusSign=5]="MinusSign",Gt[Gt.Exponential=6]="Exponential",Gt[Gt.SuperscriptingExponent=7]="SuperscriptingExponent",Gt[Gt.PerMille=8]="PerMille",Gt[Gt.Infinity=9]="Infinity",Gt[Gt.NaN=10]="NaN",Gt[Gt.TimeSeparator=11]="TimeSeparator",Gt[Gt.CurrencyDecimal=12]="CurrencyDecimal",Gt[Gt.CurrencyGroup=13]="CurrencyGroup",Gt))();function Ca(i,t){const e=io(i),n=e[it.NumberSymbols][t];if(typeof n>"u"){if(t===Gt.CurrencyDecimal)return e[it.NumberSymbols][Gt.Decimal];if(t===Gt.CurrencyGroup)return e[it.NumberSymbols][Gt.Group]}return n}const q9=/^(\d+)?\.((\d+)(-(\d+))?)?$/,KN=22,Kw=".",gy="0",X9=";",K9=",",TT="#";function kT(i){const t=parseInt(i);if(isNaN(t))throw new Error("Invalid integer literal when parsing "+i);return t}const OT=/\s+/,JN=[];let dm=(()=>{class i{constructor(e,n,r,s){this._iterableDiffers=e,this._keyValueDiffers=n,this._ngEl=r,this._renderer=s,this.initialClasses=JN,this.stateMap=new Map}set klass(e){this.initialClasses=null!=e?e.trim().split(OT):JN}set ngClass(e){this.rawClass="string"==typeof e?e.trim().split(OT):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(OT).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)(E(zw),E(fy),E(mt),E(il))},i.\u0275dir=ve({type:i,selectors:[["","ngClass",""]],inputs:{klass:["class","klass"],ngClass:"ngClass"},standalone:!0}),i})();class aY{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 oo=(()=>{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 aY(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),nB(a,r)}});for(let r=0,s=n.length;r{nB(n.get(r.currentIndex),r)})}static ngTemplateContextGuard(e,n){return!0}}return i.\u0275fac=function(e){return new(e||i)(E(jr),E(Co),E(zw))},i.\u0275dir=ve({type:i,selectors:[["","ngFor","","ngForOf",""]],inputs:{ngForOf:"ngForOf",ngForTrackBy:"ngForTrackBy",ngForTemplate:"ngForTemplate"},standalone:!0}),i})();function nB(i,t){i.context.$implicit=t.item}let vi=(()=>{class i{constructor(e,n){this._viewContainer=e,this._context=new cY,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){iB("ngIfThen",e),this._thenTemplateRef=e,this._thenViewRef=null,this._updateView()}set ngIfElse(e){iB("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)(E(jr),E(Co))},i.\u0275dir=ve({type:i,selectors:[["","ngIf",""]],inputs:{ngIf:"ngIf",ngIfThen:"ngIfThen",ngIfElse:"ngIfElse"},standalone:!0}),i})();class cY{constructor(){this.$implicit=null,this.ngIf=null}}function iB(i,t){if(t&&!t.createEmbeddedView)throw new Error(`${i} must be a TemplateRef, but received '${mi(t)}'.`)}class FT{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 _y=(()=>{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=ve({type:i,selectors:[["","ngSwitch",""]],inputs:{ngSwitch:"ngSwitch"},standalone:!0}),i})(),LT=(()=>{class i{constructor(e,n,r){this.ngSwitch=r,r._addCase(),this._view=new FT(e,n)}ngDoCheck(){this._view.enforceState(this.ngSwitch._matchCase(this.ngSwitchCase))}}return i.\u0275fac=function(e){return new(e||i)(E(jr),E(Co),E(_y,9))},i.\u0275dir=ve({type:i,selectors:[["","ngSwitchCase",""]],inputs:{ngSwitchCase:"ngSwitchCase"},standalone:!0}),i})(),rB=(()=>{class i{constructor(e,n,r){r._addDefault(new FT(e,n))}}return i.\u0275fac=function(e){return new(e||i)(E(jr),E(Co),E(_y,9))},i.\u0275dir=ve({type:i,selectors:[["","ngSwitchDefault",""]],standalone:!0}),i})(),Zw=(()=>{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:Es.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)(E(mt),E(fy),E(il))},i.\u0275dir=ve({type:i,selectors:[["","ngStyle",""]],inputs:{ngStyle:"ngStyle"},standalone:!0}),i})(),vy=(()=>{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)(E(jr))},i.\u0275dir=ve({type:i,selectors:[["","ngTemplateOutlet",""]],inputs:{ngTemplateOutletContext:"ngTemplateOutletContext",ngTemplateOutlet:"ngTemplateOutlet",ngTemplateOutletInjector:"ngTemplateOutletInjector"},standalone:!0,features:[xi]}),i})();function dl(i,t){return new pe(2100,!1)}class uY{createSubscription(t,e){return t.subscribe({next:e,error:n=>{throw n}})}dispose(t){t.unsubscribe()}}class hY{createSubscription(t,e){return t.then(e,n=>{throw n})}dispose(t){}}const fY=new hY,pY=new uY;let Ea=(()=>{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(iy(e))return fY;if(lL(e))return pY;throw dl()}_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)(E(si,16))},i.\u0275pipe=Gi({name:"async",type:i,pure:!1,standalone:!0}),i})(),oB=(()=>{class i{constructor(e){this.differs=e,this.keyValues=[],this.compareFn=aB}transform(e,n=aB){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 AY(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)(E(fy,16))},i.\u0275pipe=Gi({name:"keyvalue",type:i,pure:!1,standalone:!0}),i})();function aB(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 NT(i){return!(null==i||""===i||i!=i)}(e))return null;r=r||this._locale;try{return function eY(i,t,e){return function IT(i,t,e,n,r,s,o=!1){let a="",l=!1;if(isFinite(i)){let c=function nY(i){let n,r,s,o,a,t=Math.abs(i)+"",e=0;for((r=t.indexOf(Kw))>-1&&(t=t.replace(Kw,"")),(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)===gy;s++);if(s===(a=t.length))n=[0],r=1;else{for(a--;t.charAt(a)===gy;)a--;for(r-=s,n=[],o=0;s<=a;s++,o++)n[o]=Number(t.charAt(s))}return r>KN&&(n=n.splice(0,KN-1),e=r-1,r=1),{digits:n,exponent:e,integerLen:r}}(i);o&&(c=function tY(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 d=t.minInt,h=t.minFrac,p=t.maxFrac;if(s){const M=s.match(q9);if(null===M)throw new Error(`${s} is not a valid digit info`);const x=M[1],C=M[3],F=M[5];null!=x&&(d=kT(x)),null!=C&&(h=kT(C)),null!=F?p=kT(F):null!=C&&h>p&&(p=h)}!function iY(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);d&&(n.unshift(d),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(Ca(e,n)),v.length&&(a+=Ca(e,r)+v.join("")),b&&(a+=Ca(e,Gt.Exponential)+"+"+b)}else a=Ca(e,Gt.Infinity);return a=i<0&&!l?t.negPre+a+t.negSuf:t.posPre+a+t.posSuf,a}(i,function RT(i,t="-"){const e={minInt:1,minFrac:0,maxFrac:0,posPre:"",posSuf:"",negPre:"",negSuf:"",gSize:0,lgSize:0},n=i.split(X9),r=n[0],s=n[1],o=-1!==r.indexOf(Kw)?r.split(Kw):[r.substring(0,r.lastIndexOf(gy)+1),r.substring(r.lastIndexOf(gy)+1)],a=o[0],l=o[1]||"";e.posPre=a.substring(0,a.indexOf(TT));for(let d=0;d{class i{}return i.\u0275fac=function(e){return new(e||i)},i.\u0275mod=en({type:i}),i.\u0275inj=Wt({}),i})();const cB="browser";let OY=(()=>{class i{}return i.\u0275prov=Re({token:i,providedIn:"root",factory:()=>new FY(ee(qt),window)}),i})();class FY{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 LY(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=dB(this.window.history)||dB(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 dB(i){return Object.getOwnPropertyDescriptor(i,"scrollRestoration")}class d7 extends m9{constructor(){super(...arguments),this.supportsDOMEvents=!0}}class zT extends d7{static makeCurrent(){!function p9(i){wT||(wT=i)}(new zT)}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 u7(){return by=by||document.querySelector("base"),by?by.getAttribute("href"):null}();return null==e?null:function h7(i){eM=eM||document.createElement("a"),eM.setAttribute("href",i);const t=eM.pathname;return"/"===t.charAt(0)?t:`/${t}`}(e)}resetBaseElement(){by=null}getUserAgent(){return window.navigator.userAgent}getCookie(t){return function sY(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 eM,by=null;const mB=new me("TRANSITION_ID"),p7=[{provide:Fw,useFactory:function f7(i,t,e){return()=>{e.get(Lw).donePromise.then(()=>{const n=Oc(),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=Re({token:i,factory:i.\u0275fac}),i})();const tM=new me("EventManagerPlugins");let nM=(()=>{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=Re({token:i,factory:i.\u0275fac}),i})(),xy=(()=>{class i extends _B{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)(ee(qt))},i.\u0275prov=Re({token:i,factory:i.\u0275fac}),i})();const HT={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/"},GT=/%COMP%/g,bB=new me("RemoveStylesOnCompDestory",{providedIn:"root",factory:()=>!1});function xB(i,t){return t.flat(100).map(e=>e.replace(GT,i))}function wB(i){return t=>{if("__ngUnwrap__"===t)return i;!1===i(t)&&(t.preventDefault(),t.returnValue=!1)}}let iM=(()=>{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 $T(e)}createRenderer(e,n){if(!e||!n)return this.defaultRenderer;const r=this.getOrCreateRenderer(e,n);return r instanceof SB?r.applyToHost(e):r instanceof WT&&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 Ys.Emulated:s=new SB(o,a,n,this.appId,l);break;case Ys.ShadowDom:return new M7(o,a,e,n);default:s=new WT(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)(ee(nM),ee(xy),ee(am),ee(bB))},i.\u0275prov=Re({token:i,factory:i.\u0275fac}),i})();class $T{constructor(t){this.eventManager=t,this.data=Object.create(null),this.destroyNode=null}destroy(){}createElement(t,e){return e?document.createElementNS(HT[e]||e,t):document.createElement(t)}createComment(t){return document.createComment(t)}createText(t){return document.createTextNode(t)}appendChild(t,e){(CB(t)?t.content:t).appendChild(e)}insertBefore(t,e,n){t&&(CB(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=HT[r];s?t.setAttributeNS(s,e,n):t.setAttribute(e,n)}else t.setAttribute(e,n)}removeAttribute(t,e,n){if(n){const r=HT[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&(Es.DashCase|Es.Important)?t.style.setProperty(e,n,r&Es.Important?"important":""):t.style[e]=n}removeStyle(t,e,n){n&Es.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,wB(n)):this.eventManager.addEventListener(t,e,wB(n))}}function CB(i){return"TEMPLATE"===i.tagName&&void 0!==i.content}class M7 extends $T{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=xB(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 WT extends $T{constructor(t,e,n,r,s=n.id){super(t),this.sharedStylesHost=e,this.removeStylesOnCompDestory=r,this.rendererUsageCount=0,this.styles=xB(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 SB extends WT{constructor(t,e,n,r,s){const o=r+"-"+n.id;super(t,e,n,s,o),this.contentAttr=function b7(i){return"_ngcontent-%COMP%".replace(GT,i)}(o),this.hostAttr=function x7(i){return"_nghost-%COMP%".replace(GT,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 C7=(()=>{class i extends gB{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)(ee(qt))},i.\u0275prov=Re({token:i,factory:i.\u0275fac}),i})();const EB=["alt","control","meta","shift"],S7={"\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"},E7={alt:i=>i.altKey,control:i=>i.ctrlKey,meta:i=>i.metaKey,shift:i=>i.shiftKey};let A7=(()=>{class i extends gB{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(()=>Oc().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."),EB.forEach(c=>{const d=n.indexOf(c);d>-1&&(n.splice(d,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=S7[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"),EB.forEach(o=>{o!==r&&(0,E7[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)(ee(qt))},i.\u0275prov=Re({token:i,factory:i.\u0275fac}),i})();const R7=wN(u9,"browser",[{provide:cT,useValue:cB},{provide:uN,useValue:function D7(){zT.makeCurrent()},multi:!0},{provide:qt,useFactory:function I7(){return function t1(i){mv=i}(document),document},deps:[]}]),TB=new me(""),IB=[{provide:Nw,useClass:class m7{addToWindow(t){In.getAngularTestability=(n,r=!0)=>{const s=t.findTestabilityInTree(n,r);if(null==s)throw new Error("Could not find testability for element.");return s},In.getAllAngularTestabilities=()=>t.getAllTestabilities(),In.getAllAngularRootElements=()=>t.getAllRootElements(),In.frameworkStabilizers||(In.frameworkStabilizers=[]),In.frameworkStabilizers.push(n=>{const r=In.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?Oc().isShadowRoot(e)?this.findTestabilityInTree(t,e.host,!0):this.findTestabilityInTree(t,e.parentElement,!0):null)}},deps:[]},{provide:_N,useClass:fT,deps:[ft,pT,Nw]},{provide:fT,useClass:fT,deps:[ft,pT,Nw]}],RB=[{provide:Av,useValue:"root"},{provide:rl,useFactory:function T7(){return new rl},deps:[]},{provide:tM,useClass:C7,multi:!0,deps:[qt,ft,cT]},{provide:tM,useClass:A7,multi:!0,deps:[qt]},{provide:iM,useClass:iM,deps:[nM,xy,am,bB]},{provide:Nl,useExisting:iM},{provide:_B,useExisting:xy},{provide:xy,useClass:xy,deps:[qt]},{provide:nM,useClass:nM,deps:[tM,ft]},{provide:class NY{},useClass:g7,deps:[]},[]];let kB=(()=>{class i{constructor(e){}static withServerTransition(e){return{ngModule:i,providers:[{provide:am,useValue:e.appId},{provide:mB,useExisting:am},p7]}}}return i.\u0275fac=function(e){return new(e||i)(ee(TB,12))},i.\u0275mod=en({type:i}),i.\u0275inj=Wt({providers:[...RB,...IB],imports:[ao,h9]}),i})(),PB=(()=>{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)(ee(qt))},i.\u0275prov=Re({token:i,factory:function(e){let n=null;return n=e?new e:function P7(){return new PB(ee(qt))}(),n},providedIn:"root"}),i})();typeof window<"u"&&window;let qT=(()=>{class i{}return i.\u0275fac=function(e){return new(e||i)},i.\u0275prov=Re({token:i,factory:function(e){let n=null;return n=e?new(e||i):ee(LB),n},providedIn:"root"}),i})(),LB=(()=>{class i extends qT{constructor(e){super(),this._doc=e}sanitize(e,n){if(null==n)return null;switch(e){case Xn.NONE:return n;case Xn.HTML:return xa(n,"HTML")?Qs(n):Yx(this._doc,String(n)).toString();case Xn.STYLE:return xa(n,"Style")?Qs(n):n;case Xn.SCRIPT:if(xa(n,"Script"))return Qs(n);throw new Error("unsafe value used in a script context");case Xn.URL:return xa(n,"URL")?Qs(n):gh(String(n));case Xn.RESOURCE_URL:if(xa(n,"ResourceURL"))return Qs(n);throw new Error(`unsafe value used in a resource URL context (see ${Gu})`);default:throw new Error(`Unexpected SecurityContext ${e} (see ${Gu})`)}}bypassSecurityTrustHtml(e){return function l1(i){return new n1(i)}(e)}bypassSecurityTrustStyle(e){return function c1(i){return new r1(i)}(e)}bypassSecurityTrustScript(e){return function d1(i){return new s1(i)}(e)}bypassSecurityTrustUrl(e){return function u1(i){return new o1(i)}(e)}bypassSecurityTrustResourceUrl(e){return function h1(i){return new kp(i)}(e)}}return i.\u0275fac=function(e){return new(e||i)(ee(qt))},i.\u0275prov=Re({token:i,factory:function(e){let n=null;return n=e?new e:function B7(i){return new LB(i.get(qt))}(ee($i)),n},providedIn:"root"}),i})();function ht(...i){return Ni(i,Uu(i))}class at extends Ie{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 um=z(i=>function(){i(this),this.name="EmptyError",this.message="no elements in sequence"}),{isArray:U7}=Array,{getPrototypeOf:V7,prototype:z7,keys:H7}=Object;function NB(i){if(1===i.length){const t=i[0];if(U7(t))return{args:t,keys:null};if(function G7(i){return i&&"object"==typeof i&&V7(i)===z7}(t)){const e=H7(t);return{args:e.map(n=>t[n]),keys:e}}}return{args:i,keys:null}}const{isArray:$7}=Array;function XT(i){return et(t=>function W7(i,t){return $7(t)?i(...t):i(t)}(i,t))}function BB(i,t){return i.reduce((e,n,r)=>(e[n]=t[r],e),{})}function Aa(...i){const t=Uu(i),e=v0(i),{args:n,keys:r}=NB(i);if(0===n.length)return Ni([],t);const s=new Tn(function j7(i,t,e=za){return n=>{UB(t,()=>{const{length:r}=i,s=new Array(r);let o=r,a=r;for(let l=0;l{const c=Ni(i[l],t);let d=!1;c.subscribe(jn(n,h=>{s[l]=h,d||(d=!0,a--),a||n.next(e(s.slice()))},()=>{--o||n.complete()}))},n)},n)}}(n,t,r?o=>BB(r,o):za));return e?s.pipe(XT(e)):s}function UB(i,t,e){i?$a(e,i,t):t()}function wy(...i){return function Y7(){return vd(1)}()(Ni(i,Uu(i)))}function My(i){return new Tn(t=>{Mr(i()).subscribe(t)})}function hm(i,t){const e=dn(i)?i:()=>i,n=r=>r.error(e());return new Tn(t?r=>t.schedule(n,0,r):n)}function KT(){return ti((i,t)=>{let e=null;i._refCount++;const n=jn(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 VB extends Tn{constructor(t,e){super(),this.source=t,this.subjectFactory=e,this._subject=null,this._refCount=0,this._connection=null,s0(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 Qt;const e=this.getSubject();t.add(this.source.subscribe(jn(e,void 0,()=>{this._teardown(),e.complete()},n=>{this._teardown(),e.error(n)},()=>this._teardown()))),t.closed&&(this._connection=null,t=Qt.EMPTY)}return t}refCount(){return KT()(this)}}function Rs(i,t){return ti((e,n)=>{let r=null,s=0,o=!1;const a=()=>o&&!r&&n.complete();e.subscribe(jn(n,l=>{r?.unsubscribe();let c=0;const d=s++;Mr(i(l,d)).subscribe(r=jn(n,h=>n.next(t?t(l,h,d,c++):h),()=>{r=null,a()}))},()=>{o=!0,a()}))})}function Oi(i){return i<=0?()=>mo:ti((t,e)=>{let n=0;t.subscribe(jn(e,r=>{++n<=i&&(e.next(r),i<=n&&e.complete())}))})}function Eo(...i){const t=Uu(i);return ti((e,n)=>{(t?wy(i,e,t):wy(i,e)).subscribe(n)})}function vn(i,t){return ti((e,n)=>{let r=0;e.subscribe(jn(n,s=>i.call(t,s,r++)&&n.next(s)))})}function rM(i){return ti((t,e)=>{let n=!1;t.subscribe(jn(e,r=>{n=!0,e.next(r)},()=>{n||e.next(i),e.complete()}))})}function zB(i=q7){return ti((t,e)=>{let n=!1;t.subscribe(jn(e,r=>{n=!0,e.next(r)},()=>n?e.complete():e.error(i())))})}function q7(){return new um}function tu(i,t){const e=arguments.length>=2;return n=>n.pipe(i?vn((r,s)=>i(r,s,n)):za,Oi(1),e?rM(t):zB(()=>new um))}function nu(i,t){return dn(t)?tr(i,t,1):tr(i,1)}function Vi(i,t,e){const n=dn(i)||t||e?{next:i,error:t,complete:e}:i;return n?ti((r,s)=>{var o;null===(o=n.subscribe)||void 0===o||o.call(n);let a=!0;r.subscribe(jn(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)}))}):za}function Nc(i){return ti((t,e)=>{let s,n=null,r=!1;n=t.subscribe(jn(e,void 0,void 0,o=>{s=Mr(i(o,Nc(i)(t))),n?(n.unsubscribe(),n=null,s.subscribe(e)):r=!0})),r&&(n.unsubscribe(),n=null,s.subscribe(e))})}function ZT(i,t){return ti(function X7(i,t,e,n,r){return(s,o)=>{let a=e,l=t,c=0;s.subscribe(jn(o,d=>{const h=c++;l=a?i(l,d,h):(a=!0,d),n&&o.next(l)},r&&(()=>{a&&o.next(l),o.complete()})))}}(i,t,arguments.length>=2,!0))}function QT(i){return i<=0?()=>mo:ti((t,e)=>{let n=[];t.subscribe(jn(e,r=>{n.push(r),i{for(const r of n)e.next(r);e.complete()},void 0,()=>{n=null}))})}function HB(i,t){const e=arguments.length>=2;return n=>n.pipe(i?vn((r,s)=>i(r,s,n)):za,QT(1),e?rM(t):zB(()=>new um))}function GB(i,t=!1){return ti((e,n)=>{let r=0;e.subscribe(jn(n,s=>{const o=i(s,r++);(o||t)&&n.next(s),!o&&n.complete()}))})}function $B(i){return et(()=>i)}function iu(i){return ti((t,e)=>{try{t.subscribe(e)}finally{e.add(i)}})}const gn="primary",Cy=Symbol("RouteTitle");class K7{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 fm(i){return new K7(i)}function Z7(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 jB(i){return Array.prototype.concat.apply([],i)}function YB(i){return i.length>0?i[i.length-1]:null}function os(i,t){for(const e in i)i.hasOwnProperty(e)&&t(i[e],e)}function ru(i){return kD(i)?i:iy(i)?Ni(Promise.resolve(i)):ht(i)}const sM=!1,J7={exact:function KB(i,t,e){if(!Ah(i.segments,t.segments)||!oM(i.segments,t.segments,e)||i.numberOfChildren!==t.numberOfChildren)return!1;for(const n in t.children)if(!i.children[n]||!KB(i.children[n],t.children[n],e))return!1;return!0},subset:ZB},qB={exact:function eq(i,t){return Gl(i,t)},subset:function tq(i,t){return Object.keys(t).length<=Object.keys(i).length&&Object.keys(t).every(e=>WB(i[e],t[e]))},ignored:()=>!0};function XB(i,t,e){return J7[e.paths](i.root,t.root,e.matrixParams)&&qB[e.queryParams](i.queryParams,t.queryParams)&&!("exact"===e.fragment&&i.fragment!==t.fragment)}function ZB(i,t,e){return QB(i,t,t.segments,e)}function QB(i,t,e,n){if(i.segments.length>e.length){const r=i.segments.slice(0,e.length);return!(!Ah(r,e)||t.hasChildren()||!oM(r,e,n))}if(i.segments.length===e.length){if(!Ah(i.segments,e)||!oM(i.segments,e,n))return!1;for(const r in t.children)if(!i.children[r]||!ZB(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!!(Ah(i.segments,r)&&oM(i.segments,r,n)&&i.children[gn])&&QB(i.children[gn],t,s,n)}}function oM(i,t,e){return t.every((n,r)=>qB[e](i[r].parameters,n.parameters))}class su{constructor(t=new Dn([],{}),e={},n=null){this.root=t,this.queryParams=e,this.fragment=n}get queryParamMap(){return this._queryParamMap||(this._queryParamMap=fm(this.queryParams)),this._queryParamMap}toString(){return rq.serialize(this)}}class Dn{constructor(t,e){this.segments=t,this.children=e,this.parent=null,os(e,(n,r)=>n.parent=this)}hasChildren(){return this.numberOfChildren>0}get numberOfChildren(){return Object.keys(this.children).length}toString(){return aM(this)}}class Sy{constructor(t,e){this.path=t,this.parameters=e}get parameterMap(){return this._parameterMap||(this._parameterMap=fm(this.parameters)),this._parameterMap}toString(){return t3(this)}}function Ah(i,t){return i.length===t.length&&i.every((e,n)=>e.path===t[n].path)}let Ey=(()=>{class i{}return i.\u0275fac=function(e){return new(e||i)},i.\u0275prov=Re({token:i,factory:function(){return new JT},providedIn:"root"}),i})();class JT{parse(t){const e=new fq(t);return new su(e.parseRootSegment(),e.parseQueryParams(),e.parseFragment())}serialize(t){const e=`/${Ay(t.root,!0)}`,n=function aq(i){const t=Object.keys(i).map(e=>{const n=i[e];return Array.isArray(n)?n.map(r=>`${lM(e)}=${lM(r)}`).join("&"):`${lM(e)}=${lM(n)}`}).filter(e=>!!e);return t.length?`?${t.join("&")}`:""}(t.queryParams);return`${e}${n}${"string"==typeof t.fragment?`#${function sq(i){return encodeURI(i)}(t.fragment)}`:""}`}}const rq=new JT;function aM(i){return i.segments.map(t=>t3(t)).join("/")}function Ay(i,t){if(!i.hasChildren())return aM(i);if(t){const e=i.children[gn]?Ay(i.children[gn],!1):"",n=[];return os(i.children,(r,s)=>{s!==gn&&n.push(`${s}:${Ay(r,!1)}`)}),n.length>0?`${e}(${n.join("//")})`:e}{const e=function iq(i,t){let e=[];return os(i.children,(n,r)=>{r===gn&&(e=e.concat(t(n,r)))}),os(i.children,(n,r)=>{r!==gn&&(e=e.concat(t(n,r)))}),e}(i,(n,r)=>r===gn?[Ay(i.children[gn],!1)]:[`${r}:${Ay(n,!1)}`]);return 1===Object.keys(i.children).length&&null!=i.children[gn]?`${aM(i)}/${e[0]}`:`${aM(i)}/(${e.join("//")})`}}function JB(i){return encodeURIComponent(i).replace(/%40/g,"@").replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",")}function lM(i){return JB(i).replace(/%3B/gi,";")}function eI(i){return JB(i).replace(/\(/g,"%28").replace(/\)/g,"%29").replace(/%26/gi,"&")}function cM(i){return decodeURIComponent(i)}function e3(i){return cM(i.replace(/\+/g,"%20"))}function t3(i){return`${eI(i.path)}${function oq(i){return Object.keys(i).map(t=>`;${eI(t)}=${eI(i[t])}`).join("")}(i.parameters)}`}const lq=/^[^\/()?;=#]+/;function dM(i){const t=i.match(lq);return t?t[0]:""}const cq=/^[^=?&#]+/,uq=/^[^&#]+/;class fq{constructor(t){this.url=t,this.remaining=t}parseRootSegment(){return this.consumeOptional("/"),""===this.remaining||this.peekStartsWith("?")||this.peekStartsWith("#")?new Dn([],{}):new Dn([],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[gn]=new Dn(t,e)),n}parseSegment(){const t=dM(this.remaining);if(""===t&&this.peekStartsWith(";"))throw new pe(4009,sM);return this.capture(t),new Sy(cM(t),this.parseMatrixParams())}parseMatrixParams(){const t={};for(;this.consumeOptional(";");)this.parseParam(t);return t}parseParam(t){const e=dM(this.remaining);if(!e)return;this.capture(e);let n="";if(this.consumeOptional("=")){const r=dM(this.remaining);r&&(n=r,this.capture(n))}t[cM(e)]=cM(n)}parseQueryParam(t){const e=function dq(i){const t=i.match(cq);return t?t[0]:""}(this.remaining);if(!e)return;this.capture(e);let n="";if(this.consumeOptional("=")){const o=function hq(i){const t=i.match(uq);return t?t[0]:""}(this.remaining);o&&(n=o,this.capture(n))}const r=e3(e),s=e3(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=dM(this.remaining),r=this.remaining[n.length];if("/"!==r&&")"!==r&&";"!==r)throw new pe(4010,sM);let s;n.indexOf(":")>-1?(s=n.slice(0,n.indexOf(":")),this.capture(s),this.capture(":")):t&&(s=gn);const o=this.parseChildren();e[s]=1===Object.keys(o).length?o[gn]:new Dn([],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 pe(4011,sM)}}function tI(i){return i.segments.length>0?new Dn([],{[gn]:i}):i}function uM(i){const t={};for(const n of Object.keys(i.children)){const s=uM(i.children[n]);(s.segments.length>0||s.hasChildren())&&(t[n]=s)}return function pq(i){if(1===i.numberOfChildren&&i.children[gn]){const t=i.children[gn];return new Dn(i.segments.concat(t.segments),t.children)}return i}(new Dn(i.segments,t))}function Dh(i){return i instanceof su}const nI=!1;function mq(i,t,e,n,r){if(0===e.length)return pm(t.root,t.root,t.root,n,r);const s=function a3(i){if("string"==typeof i[0]&&1===i.length&&"/"===i[0])return new o3(!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 os(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 o3(e,t,n)}(e);return s.toRoot()?pm(t.root,t.root,new Dn([],{}),n,r):function o(l){const c=function _q(i,t,e,n){if(i.isAbsolute)return new mm(t.root,!0,0);if(-1===n)return new mm(e,e===t.root,0);return function l3(i,t,e){let n=i,r=t,s=e;for(;s>r;){if(s-=r,n=n.parent,!n)throw new pe(4005,nI&&"Invalid number of '../'");r=n.segments.length}return new mm(n,!1,r-s)}(e,n+(Dy(i.commands[0])?0:1),i.numberOfDoubleDots)}(s,t,i.snapshot?._urlSegment,l),d=c.processChildren?gm(c.segmentGroup,c.index,s.commands):iI(c.segmentGroup,c.index,s.commands);return pm(t.root,c.segmentGroup,d,n,r)}(i.snapshot?._lastPathIndex)}function Dy(i){return"object"==typeof i&&null!=i&&!i.outlets&&!i.segmentPath}function Ty(i){return"object"==typeof i&&null!=i&&i.outlets}function pm(i,t,e,n,r){let o,s={};n&&os(n,(l,c)=>{s[c]=Array.isArray(l)?l.map(d=>`${d}`):`${l}`}),o=i===t?e:s3(i,t,e);const a=tI(uM(o));return new su(a,s,r)}function s3(i,t,e){const n={};return os(i.children,(r,s)=>{n[s]=r===t?e:s3(r,t,e)}),new Dn(i.segments,n)}class o3{constructor(t,e,n){if(this.isAbsolute=t,this.numberOfDoubleDots=e,this.commands=n,t&&n.length>0&&Dy(n[0]))throw new pe(4003,nI&&"Root segment cannot have matrix parameters");const r=n.find(Ty);if(r&&r!==YB(n))throw new pe(4004,nI&&"{outlets:{}} has to be the last command")}toRoot(){return this.isAbsolute&&1===this.commands.length&&"/"==this.commands[0]}}class mm{constructor(t,e,n){this.segmentGroup=t,this.processChildren=e,this.index=n}}function iI(i,t,e){if(i||(i=new Dn([],{})),0===i.segments.length&&i.hasChildren())return gm(i,t,e);const n=function yq(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(Ty(a))break;const l=`${a}`,c=n0&&void 0===l)break;if(l&&c&&"object"==typeof c&&void 0===c.outlets){if(!d3(l,c,o))return s;n+=2}else{if(!d3(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]=iI(i.children[o],t,s))}),os(i.children,(s,o)=>{void 0===n[o]&&(r[o]=s)}),new Dn(i.segments,r)}}function rI(i,t,e){const n=i.segments.slice(0,t);let r=0;for(;r{"string"==typeof e&&(e=[e]),null!==e&&(t[n]=rI(new Dn([],{}),0,e))}),t}function c3(i){const t={};return os(i,(e,n)=>t[n]=`${e}`),t}function d3(i,t,e){return i==e.path&&Gl(t,e.parameters)}const Iy="imperative";class $l{constructor(t,e){this.id=t,this.url=e}}class sI 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 Th 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 hM 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 fM extends $l{constructor(t,e,n,r){super(t,e),this.reason=n,this.code=r,this.type=16}}class oI 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 xq 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 wq 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 Mq 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 Cq 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 Sq 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 Eq{constructor(t){this.route=t,this.type=9}toString(){return`RouteConfigLoadStart(path: ${this.route.path})`}}class Aq{constructor(t){this.route=t,this.type=10}toString(){return`RouteConfigLoadEnd(path: ${this.route.path})`}}class Dq{constructor(t){this.snapshot=t,this.type=11}toString(){return`ChildActivationStart(path: '${this.snapshot.routeConfig&&this.snapshot.routeConfig.path||""}')`}}class Tq{constructor(t){this.snapshot=t,this.type=12}toString(){return`ChildActivationEnd(path: '${this.snapshot.routeConfig&&this.snapshot.routeConfig.path||""}')`}}class Iq{constructor(t){this.snapshot=t,this.type=13}toString(){return`ActivationStart(path: '${this.snapshot.routeConfig&&this.snapshot.routeConfig.path||""}')`}}class Rq{constructor(t){this.snapshot=t,this.type=14}toString(){return`ActivationEnd(path: '${this.snapshot.routeConfig&&this.snapshot.routeConfig.path||""}')`}}class u3{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 Oq=(()=>{class i{createUrlTree(e,n,r,s,o,a){return mq(e||n.root,r,s,o,a)}}return i.\u0275fac=function(e){return new(e||i)},i.\u0275prov=Re({token:i,factory:i.\u0275fac}),i})(),Lq=(()=>{class i{}return i.\u0275fac=function(e){return new(e||i)},i.\u0275prov=Re({token:i,factory:function(t){return Oq.\u0275fac(t)},providedIn:"root"}),i})();class h3{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=aI(t,this._root);return e?e.children.map(n=>n.value):[]}firstChild(t){const e=aI(t,this._root);return e&&e.children.length>0?e.children[0].value:null}siblings(t){const e=lI(t,this._root);return e.length<2?[]:e[e.length-2].children.map(r=>r.value).filter(r=>r!==t)}pathFromRoot(t){return lI(t,this._root).map(e=>e.value)}}function aI(i,t){if(i===t.value)return t;for(const e of t.children){const n=aI(i,e);if(n)return n}return null}function lI(i,t){if(i===t.value)return[t];for(const e of t.children){const n=lI(i,e);if(n.length)return n.unshift(t),n}return[]}class Bc{constructor(t,e){this.value=t,this.children=e}toString(){return`TreeNode(${this.value})`}}function _m(i){const t={};return i&&i.children.forEach(e=>t[e.value.outlet]=e),t}class f3 extends h3{constructor(t,e){super(t),this.snapshot=e,cI(this,t)}toString(){return this.snapshot.toString()}}function p3(i,t){const e=function Nq(i,t){const o=new pM([],{},{},"",{},gn,t,null,i.root,-1,{});return new g3("",new Bc(o,[]))}(i,t),n=new at([new Sy("",{})]),r=new at({}),s=new at({}),o=new at({}),a=new at(""),l=new vm(n,r,o,a,s,gn,t,e.root);return l.snapshot=e.root,new f3(new Bc(l,[]),e)}class vm{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(et(c=>c[Cy]))??ht(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(et(t=>fm(t)))),this._paramMap}get queryParamMap(){return this._queryParamMap||(this._queryParamMap=this.queryParams.pipe(et(t=>fm(t)))),this._queryParamMap}toString(){return this.snapshot?this.snapshot.toString():`Future(${this._futureSnapshot})`}}function m3(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 Bq(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 pM{get title(){return this.data?.[Cy]}constructor(t,e,n,r,s,o,a,l,c,d,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=d,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=fm(this.params)),this._paramMap}get queryParamMap(){return this._queryParamMap||(this._queryParamMap=fm(this.queryParams)),this._queryParamMap}toString(){return`Route(url:'${this.url.map(n=>n.toString()).join("/")}', path:'${this.routeConfig?this.routeConfig.path:""}')`}}class g3 extends h3{constructor(t,e){super(e),this.url=t,cI(this,e)}toString(){return _3(this._root)}}function cI(i,t){t.value._routerState=i,t.children.forEach(e=>cI(i,e))}function _3(i){const t=i.children.length>0?` { ${i.children.map(_3).join(", ")} } `:"";return`${i.value}${t}`}function dI(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 Q7(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||uI(i.parent,t.parent))}function Ry(i,t,e){if(e&&i.shouldReuseRoute(t.value,e.value.snapshot)){const n=e.value;n._futureSnapshot=t.value;const r=function Vq(i,t,e){return t.children.map(n=>{for(const r of e.children)if(i.shouldReuseRoute(n.value,r.value.snapshot))return Ry(i,n,r);return Ry(i,n)})}(i,t,e);return new Bc(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=>Ry(i,a)),o}}const n=function zq(i){return new vm(new at(i.url),new at(i.params),new at(i.queryParams),new at(i.fragment),new at(i.data),i.outlet,i.component,i)}(t.value),r=t.children.map(s=>Ry(i,s));return new Bc(n,r)}}const hI="ngNavigationCancelingError";function v3(i,t){const{redirectTo:e,navigationBehaviorOptions:n}=Dh(t)?{redirectTo:t,navigationBehaviorOptions:void 0}:t,r=y3(!1,0,t);return r.url=e,r.navigationBehaviorOptions=n,r}function y3(i,t,e){const n=new Error("NavigationCancelingError: "+(i||""));return n[hI]=!0,n.cancellationCode=t,e&&(n.url=e),n}function b3(i){return x3(i)&&Dh(i.url)}function x3(i){return i&&i[hI]}class Hq{constructor(){this.outlet=null,this.route=null,this.resolver=null,this.injector=null,this.children=new ky,this.attachRef=null}}let ky=(()=>{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 Hq,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=Re({token:i,factory:i.\u0275fac,providedIn:"root"}),i})();const mM=!1;let w3=(()=>{class i{constructor(){this.activated=null,this._activatedRoute=null,this.name=gn,this.activateEvents=new $e,this.deactivateEvents=new $e,this.attachEvents=new $e,this.detachEvents=new $e,this.parentContexts=Lt(ky),this.location=Lt(jr),this.changeDetector=Lt(si),this.environmentInjector=Lt(eo)}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 pe(4012,mM);return this.activated.instance}get activatedRoute(){if(!this.activated)throw new pe(4012,mM);return this._activatedRoute}get activatedRouteData(){return this._activatedRoute?this._activatedRoute.snapshot.data:{}}detach(){if(!this.activated)throw new pe(4012,mM);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 pe(4013,mM);this._activatedRoute=e;const r=this.location,o=e.snapshot.component,a=this.parentContexts.getOrCreateContext(this.name).children,l=new Gq(e,a,r.injector);if(n&&function $q(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=ve({type:i,selectors:[["router-outlet"]],inputs:{name:"name"},outputs:{activateEvents:"activate",deactivateEvents:"deactivate",attachEvents:"attach",detachEvents:"detach"},exportAs:["outlet"],standalone:!0,features:[xi]}),i})();class Gq{constructor(t,e,n){this.route=t,this.childContexts=e,this.parent=n}get(t,e){return t===vm?this.route:t===ky?this.childContexts:this.parent.get(t,e)}}let fI=(()=>{class i{}return i.\u0275fac=function(e){return new(e||i)},i.\u0275cmp=st({type:i,selectors:[["ng-component"]],standalone:!0,features:[YD],decls:1,vars:0,template:function(e,n){1&e&&Oe(0,"router-outlet")},dependencies:[w3],encapsulation:2}),i})();function M3(i,t){return i.providers&&!i._injector&&(i._injector=Rw(i.providers,t,`Route: ${i.path}`)),i._injector??t}function mI(i){const t=i.children&&i.children.map(mI),e=t?{...i,children:t}:{...i};return!e.component&&!e.loadComponent&&(t||e.loadChildren)&&e.outlet&&e.outlet!==gn&&(e.component=fI),e}function Da(i){return i.outlet||gn}function C3(i,t){const e=i.filter(n=>Da(n)===t);return e.push(...i.filter(n=>Da(n)!==t)),e}function Py(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 Xq{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),dI(this.futureState.root),this.activateChildRoutes(e,n,t)}deactivateChildRoutes(t,e,n){const r=_m(e);t.children.forEach(s=>{const o=s.value.outlet;this.deactivateRoutes(s,r[o],n),delete r[o]}),os(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=_m(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=_m(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=_m(e);t.children.forEach(s=>{this.activateRoutes(s,r[s.value.outlet],n),this.forwardEvent(new Rq(s.value.snapshot))}),t.children.length&&this.forwardEvent(new Tq(t.value.snapshot))}activateRoutes(t,e,n){const r=t.value,s=e?e.value:null;if(dI(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),dI(a.route.value),this.activateChildRoutes(t,null,o.children)}else{const a=Py(r.snapshot),l=a?.get(Ll)??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 S3{constructor(t){this.path=t,this.route=this.path[this.path.length-1]}}class gM{constructor(t,e){this.component=t,this.route=e}}function Kq(i,t,e){const n=i._root;return Oy(n,t?t._root:null,e,[n.value])}function ym(i,t){const e=Symbol(),n=t.get(i,e);return n===e?"function"!=typeof i||function Sr(i){return null!==Hf(i)}(i)?t.get(i):i:n}function Oy(i,t,e,n,r={canDeactivateChecks:[],canActivateChecks:[]}){const s=_m(t);return i.children.forEach(o=>{(function Qq(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 Jq(i,t,e){if("function"==typeof e)return e(i,t);switch(e){case"pathParamsChange":return!Ah(i.url,t.url);case"pathParamsOrQueryParamsChange":return!Ah(i.url,t.url)||!Gl(i.queryParams,t.queryParams);case"always":return!0;case"paramsOrQueryParamsChange":return!uI(i,t)||!Gl(i.queryParams,t.queryParams);default:return!uI(i,t)}}(o,s,s.routeConfig.runGuardsAndResolvers);l?r.canActivateChecks.push(new S3(n)):(s.data=o.data,s._resolvedData=o._resolvedData),Oy(i,t,s.component?a?a.children:null:e,n,r),l&&a&&a.outlet&&a.outlet.isActivated&&r.canDeactivateChecks.push(new gM(a.outlet.component,o))}else o&&Fy(t,a,r),r.canActivateChecks.push(new S3(n)),Oy(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]}),os(s,(o,a)=>Fy(o,e.getContext(a),r)),r}function Fy(i,t,e){const n=_m(i),r=i.value;os(n,(s,o)=>{Fy(s,r.component?t?t.children.getContext(o):null:t,e)}),e.canDeactivateChecks.push(new gM(r.component&&t&&t.outlet&&t.outlet.isActivated?t.outlet.component:null,r))}function Ly(i){return"function"==typeof i}function gI(i){return i instanceof um||"EmptyError"===i?.name}const _M=Symbol("INITIAL_VALUE");function bm(){return Rs(i=>Aa(i.map(t=>t.pipe(Oi(1),Eo(_M)))).pipe(et(t=>{for(const e of t)if(!0!==e){if(e===_M)return _M;if(!1===e||e instanceof su)return e}return!0}),vn(t=>t!==_M),Oi(1)))}function E3(i){return function bE(...i){return n0(i)}(Vi(t=>{if(Dh(t))throw v3(0,t)}),et(t=>!0===t))}const _I={matched:!1,consumedSegments:[],remainingSegments:[],parameters:{},positionalParamSegments:{}};function A3(i,t,e,n,r){const s=vI(i,t,e);return s.matched?function gX(i,t,e,n){const r=t.canMatch;return r&&0!==r.length?ht(r.map(o=>{const a=ym(o,i);return ru(function sX(i){return i&&Ly(i.canMatch)}(a)?a.canMatch(t,e):i.runInContext(()=>a(t,e)))})).pipe(bm(),E3()):ht(!0)}(n=M3(t,n),t,e).pipe(et(o=>!0===o?s:{..._I})):ht(s)}function vI(i,t,e){if(""===t.path)return"full"===t.pathMatch&&(i.hasChildren()||e.length>0)?{..._I}:{matched:!0,consumedSegments:[],remainingSegments:e,parameters:{},positionalParamSegments:{}};const r=(t.matcher||Z7)(e,i,t);if(!r)return{..._I};const s={};os(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 vM(i,t,e,n){if(e.length>0&&function yX(i,t,e){return e.some(n=>yM(i,t,n)&&Da(n)!==gn)}(i,e,n)){const s=new Dn(t,function vX(i,t,e,n){const r={};r[gn]=n,n._sourceSegment=i,n._segmentIndexShift=t.length;for(const s of e)if(""===s.path&&Da(s)!==gn){const o=new Dn([],{});o._sourceSegment=i,o._segmentIndexShift=t.length,r[Da(s)]=o}return r}(i,t,n,new Dn(e,i.children)));return s._sourceSegment=i,s._segmentIndexShift=t.length,{segmentGroup:s,slicedSegments:[]}}if(0===e.length&&function bX(i,t,e){return e.some(n=>yM(i,t,n))}(i,e,n)){const s=new Dn(i.segments,function _X(i,t,e,n,r){const s={};for(const o of n)if(yM(i,e,o)&&!r[Da(o)]){const a=new Dn([],{});a._sourceSegment=i,a._segmentIndexShift=t.length,s[Da(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 Dn(i.segments,i.children);return r._sourceSegment=i,r._segmentIndexShift=t.length,{segmentGroup:r,slicedSegments:e}}function yM(i,t,e){return(!(i.hasChildren()||t.length>0)||"full"!==e.pathMatch)&&""===e.path}function D3(i,t,e,n){return!!(Da(i)===n||n!==gn&&yM(t,e,i))&&("**"===i.path||vI(t,i,e).matched)}function T3(i,t,e){return 0===t.length&&!i.children[e]}const bM=!1;class xM{constructor(t){this.segmentGroup=t||null}}class I3{constructor(t){this.urlTree=t}}function Ny(i){return hm(new xM(i))}function R3(i){return hm(new I3(i))}class CX{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=vM(this.urlTree.root,[],[],this.config).segmentGroup,e=new Dn(t.segments,t.children);return this.expandSegmentGroup(this.injector,this.config,e,gn).pipe(et(s=>this.createUrlTree(uM(s),this.urlTree.queryParams,this.urlTree.fragment))).pipe(Nc(s=>{if(s instanceof I3)return this.allowRedirects=!1,this.match(s.urlTree);throw s instanceof xM?this.noMatchError(s):s}))}match(t){return this.expandSegmentGroup(this.injector,this.config,t.root,gn).pipe(et(r=>this.createUrlTree(uM(r),t.queryParams,t.fragment))).pipe(Nc(r=>{throw r instanceof xM?this.noMatchError(r):r}))}noMatchError(t){return new pe(4002,bM)}createUrlTree(t,e,n){const r=tI(t);return new su(r,e,n)}expandSegmentGroup(t,e,n,r){return 0===n.segments.length&&n.hasChildren()?this.expandChildren(t,e,n).pipe(et(s=>new Dn([],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 Ni(r).pipe(nu(s=>{const o=n.children[s],a=C3(e,s);return this.expandSegmentGroup(t,a,o,s).pipe(et(l=>({segment:l,outlet:s})))}),ZT((s,o)=>(s[o.outlet]=o.segment,s),{}),HB())}expandSegment(t,e,n,r,s,o){return Ni(n).pipe(nu(a=>this.expandSegmentAgainstRoute(t,e,n,a,r,s,o).pipe(Nc(c=>{if(c instanceof xM)return ht(null);throw c}))),tu(a=>!!a),Nc((a,l)=>{if(gI(a))return T3(e,r,s)?ht(new Dn([],{})):Ny(e);throw a}))}expandSegmentAgainstRoute(t,e,n,r,s,o,a){return D3(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):Ny(e):Ny(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("/")?R3(s):this.lineralizeSegments(n,s).pipe(tr(o=>{const a=new Dn(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:d}=vI(e,r,s);if(!a)return Ny(e);const h=this.applyRedirectCommands(l,r.redirectTo,d);return r.redirectTo.startsWith("/")?R3(h):this.lineralizeSegments(r,h).pipe(tr(p=>this.expandSegment(t,e,n,p.concat(c),o,!1)))}matchSegmentAgainstRoute(t,e,n,r,s){return"**"===n.path?(t=M3(n,t),n.loadChildren?(n._loadedRoutes?ht({routes:n._loadedRoutes,injector:n._loadedInjector}):this.configLoader.loadChildren(t,n)).pipe(et(a=>(n._loadedRoutes=a.routes,n._loadedInjector=a.injector,new Dn(r,{})))):ht(new Dn(r,{}))):A3(e,n,r,t).pipe(Rs(({matched:o,consumedSegments:a,remainingSegments:l})=>o?this.getChildConfig(t=n._injector??t,n,r).pipe(tr(d=>{const h=d.injector??t,p=d.routes,{segmentGroup:m,slicedSegments:g}=vM(e,a,l,p),b=new Dn(m.segments,m.children);if(0===g.length&&b.hasChildren())return this.expandChildren(h,p,b).pipe(et(x=>new Dn(a,x)));if(0===p.length&&0===g.length)return ht(new Dn(a,{}));const v=Da(n)===s;return this.expandSegment(h,b,p,g,v?gn:s,!0).pipe(et(M=>new Dn(a.concat(M.segments),M.children)))})):Ny(e)))}getChildConfig(t,e,n){return e.children?ht({routes:e.children,injector:t}):e.loadChildren?void 0!==e._loadedRoutes?ht({routes:e._loadedRoutes,injector:e._loadedInjector}):function mX(i,t,e,n){const r=t.canLoad;return void 0===r||0===r.length?ht(!0):ht(r.map(o=>{const a=ym(o,i);return ru(function tX(i){return i&&Ly(i.canLoad)}(a)?a.canLoad(t,e):i.runInContext(()=>a(t,e)))})).pipe(bm(),E3())}(t,e,n).pipe(tr(r=>r?this.configLoader.loadChildren(t,e).pipe(Vi(s=>{e._loadedRoutes=s.routes,e._loadedInjector=s.injector})):function wX(i){return hm(y3(bM,3))}())):ht({routes:[],injector:t})}lineralizeSegments(t,e){let n=[],r=e.root;for(;;){if(n=n.concat(r.segments),0===r.numberOfChildren)return ht(n);if(r.numberOfChildren>1||!r.children[gn])return t.redirectTo,hm(new pe(4e3,bM));r=r.children[gn]}}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 su(s,this.createQueryParams(e.queryParams,this.urlTree.queryParams),e.fragment)}createQueryParams(t,e){const n={};return os(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 os(e.children,(a,l)=>{o[l]=this.createSegmentGroup(t,a,n,r)}),new Dn(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 pe(4001,bM);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 EX{}class TX{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=vM(this.urlTree.root,[],[],this.config.filter(e=>void 0===e.redirectTo)).segmentGroup;return this.processSegmentGroup(this.injector,this.config,t,gn).pipe(et(e=>{if(null===e)return null;const n=new pM([],Object.freeze({}),Object.freeze({...this.urlTree.queryParams}),this.urlTree.fragment,{},gn,this.rootComponentType,null,this.urlTree.root,-1,{}),r=new Bc(n,e),s=new g3(this.url,r);return this.inheritParamsAndData(s._root),s}))}inheritParamsAndData(t){const e=t.value,n=m3(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 Ni(Object.keys(n.children)).pipe(nu(r=>{const s=n.children[r],o=C3(e,r);return this.processSegmentGroup(t,o,s,r)}),ZT((r,s)=>r&&s?(r.push(...s),r):null),GB(r=>null!==r),rM(null),HB(),et(r=>{if(null===r)return null;const s=P3(r);return function IX(i){i.sort((t,e)=>t.value.outlet===gn?-1:e.value.outlet===gn?1:t.value.outlet.localeCompare(e.value.outlet))}(s),s}))}processSegment(t,e,n,r,s){return Ni(e).pipe(nu(o=>this.processSegmentAgainstRoute(o._injector??t,o,n,r,s)),tu(o=>!!o),Nc(o=>{if(gI(o))return T3(n,r,s)?ht([]):ht(null);throw o}))}processSegmentAgainstRoute(t,e,n,r,s){if(e.redirectTo||!D3(e,n,r,s))return ht(null);let o;if("**"===e.path){const a=r.length>0?YB(r).parameters:{},l=F3(n)+r.length;o=ht({snapshot:new pM(r,a,Object.freeze({...this.urlTree.queryParams}),this.urlTree.fragment,L3(e),Da(e),e.component??e._loadedComponent??null,e,O3(n),l,N3(e)),consumedSegments:[],remainingSegments:[]})}else o=A3(n,e,r,t).pipe(et(({matched:a,consumedSegments:l,remainingSegments:c,parameters:d})=>{if(!a)return null;const h=F3(n)+l.length;return{snapshot:new pM(l,d,Object.freeze({...this.urlTree.queryParams}),this.urlTree.fragment,L3(e),Da(e),e.component??e._loadedComponent??null,e,O3(n),h,N3(e)),consumedSegments:l,remainingSegments:c}}));return o.pipe(Rs(a=>{if(null===a)return ht(null);const{snapshot:l,consumedSegments:c,remainingSegments:d}=a;t=e._injector??t;const h=e._loadedInjector??t,p=function RX(i){return i.children?i.children:i.loadChildren?i._loadedRoutes:[]}(e),{segmentGroup:m,slicedSegments:g}=vM(n,c,d,p.filter(v=>void 0===v.redirectTo));if(0===g.length&&m.hasChildren())return this.processChildren(h,p,m).pipe(et(v=>null===v?null:[new Bc(l,v)]));if(0===p.length&&0===g.length)return ht([new Bc(l,[])]);const b=Da(e)===s;return this.processSegment(h,p,m,g,b?gn:s).pipe(et(v=>null===v?null:[new Bc(l,v)]))}))}}function kX(i){const t=i.value.routeConfig;return t&&""===t.path&&void 0===t.redirectTo}function P3(i){const t=[],e=new Set;for(const n of i){if(!kX(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=P3(n.children);t.push(new Bc(n.value,r))}return t.filter(n=>!e.has(n))}function O3(i){let t=i;for(;t._sourceSegment;)t=t._sourceSegment;return t}function F3(i){let t=i,e=t._segmentIndexShift??0;for(;t._sourceSegment;)t=t._sourceSegment,e+=t._segmentIndexShift??0;return e-1}function L3(i){return i.data||{}}function N3(i){return i.resolve||{}}function B3(i){return"string"==typeof i.title||null===i.title}function yI(i){return Rs(t=>{const e=i(t);return e?Ni(e).pipe(et(()=>t)):ht(t)})}const xm=new me("ROUTES");let bI=(()=>{class i{constructor(){this.componentLoaders=new WeakMap,this.childrenLoaders=new WeakMap,this.compiler=Lt(hN)}loadComponent(e){if(this.componentLoaders.get(e))return this.componentLoaders.get(e);if(e._loadedComponent)return ht(e._loadedComponent);this.onLoadStartListener&&this.onLoadStartListener(e);const n=ru(e.loadComponent()).pipe(et(V3),Vi(s=>{this.onLoadEndListener&&this.onLoadEndListener(e),e._loadedComponent=s}),iu(()=>{this.componentLoaders.delete(e)})),r=new VB(n,()=>new Ie).pipe(KT());return this.componentLoaders.set(e,r),r}loadChildren(e,n){if(this.childrenLoaders.get(n))return this.childrenLoaders.get(n);if(n._loadedRoutes)return ht({routes:n._loadedRoutes,injector:n._loadedInjector});this.onLoadStartListener&&this.onLoadStartListener(n);const s=this.loadModuleFactoryOrRoutes(n.loadChildren).pipe(et(a=>{this.onLoadEndListener&&this.onLoadEndListener(n);let l,c,d=!1;Array.isArray(a)?c=a:(l=a.create(e).injector,c=jB(l.get(xm,[],Ft.Self|Ft.Optional)));return{routes:c.map(mI),injector:l}}),iu(()=>{this.childrenLoaders.delete(n)})),o=new VB(s,()=>new Ie).pipe(KT());return this.childrenLoaders.set(n,o),o}loadModuleFactoryOrRoutes(e){return ru(e()).pipe(et(V3),tr(n=>n instanceof S2||Array.isArray(n)?ht(n):Ni(this.compiler.compileModuleAsync(n))))}}return i.\u0275fac=function(e){return new(e||i)},i.\u0275prov=Re({token:i,factory:i.\u0275fac,providedIn:"root"}),i})();function V3(i){return function VX(i){return i&&"object"==typeof i&&"default"in i}(i)?i.default:i}let MM=(()=>{class i{get hasRequestedNavigation(){return 0!==this.navigationId}constructor(){this.currentNavigation=null,this.lastSuccessfulNavigation=null,this.events=new Ie,this.configLoader=Lt(bI),this.environmentInjector=Lt(eo),this.urlSerializer=Lt(Ey),this.rootContexts=Lt(ky),this.navigationId=0,this.afterPreactivation=()=>ht(void 0),this.rootComponentType=null,this.configLoader.onLoadEndListener=r=>this.events.next(new Aq(r)),this.configLoader.onLoadStartListener=r=>this.events.next(new Eq(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 at({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:Iy,restoredState:null,currentSnapshot:e.routerState.snapshot,targetSnapshot:null,currentRouterState:e.routerState,targetRouterState:null,guards:{canActivateChecks:[],canDeactivateChecks:[]},guardsResult:null}),this.transitions.pipe(vn(n=>0!==n.id),et(n=>({...n,extractedUrl:e.urlHandlingStrategy.extract(n.rawUrl)})),Rs(n=>{let r=!1,s=!1;return ht(n).pipe(Vi(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}}),Rs(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 d="";return this.events.next(new fM(o.id,e.serializeUrl(n.rawUrl),d,0)),e.rawUrlTree=o.rawUrl,o.resolve(null),mo}if(e.urlHandlingStrategy.shouldProcessUrl(o.rawUrl))return z3(o.source)&&(e.browserUrlTree=o.extractedUrl),ht(o).pipe(Rs(d=>{const h=this.transitions?.getValue();return this.events.next(new sI(d.id,this.urlSerializer.serialize(d.extractedUrl),d.source,d.restoredState)),h!==this.transitions?.getValue()?mo:Promise.resolve(d)}),function SX(i,t,e,n){return Rs(r=>function MX(i,t,e,n,r){return new CX(i,t,e,n,r).apply()}(i,t,e,r.extractedUrl,n).pipe(et(s=>({...r,urlAfterRedirects:s}))))}(this.environmentInjector,this.configLoader,this.urlSerializer,e.config),Vi(d=>{this.currentNavigation={...this.currentNavigation,finalUrl:d.urlAfterRedirects},n.urlAfterRedirects=d.urlAfterRedirects}),function OX(i,t,e,n,r){return tr(s=>function DX(i,t,e,n,r,s,o="emptyOnly"){return new TX(i,t,e,n,r,o,s).recognize().pipe(Rs(a=>null===a?function AX(i){return new Tn(t=>t.error(i))}(new EX):ht(a)))}(i,t,e,s.urlAfterRedirects,n.serialize(s.urlAfterRedirects),n,r).pipe(et(o=>({...s,targetSnapshot:o}))))}(this.environmentInjector,this.rootComponentType,e.config,this.urlSerializer,e.paramsInheritanceStrategy),Vi(d=>{if(n.targetSnapshot=d.targetSnapshot,"eager"===e.urlUpdateStrategy){if(!d.extras.skipLocationChange){const p=e.urlHandlingStrategy.merge(d.urlAfterRedirects,d.rawUrl);e.setBrowserUrl(p,d)}e.browserUrlTree=d.urlAfterRedirects}const h=new xq(d.id,this.urlSerializer.serialize(d.extractedUrl),this.urlSerializer.serialize(d.urlAfterRedirects),d.targetSnapshot);this.events.next(h)}));if(l&&e.urlHandlingStrategy.shouldProcessUrl(e.rawUrlTree)){const{id:d,extractedUrl:h,source:p,restoredState:m,extras:g}=o,b=new sI(d,this.urlSerializer.serialize(h),p,m);this.events.next(b);const v=p3(h,this.rootComponentType).snapshot;return ht(n={...o,targetSnapshot:v,urlAfterRedirects:h,extras:{...g,skipLocationChange:!1,replaceUrl:!1}})}{const d="";return this.events.next(new fM(o.id,e.serializeUrl(n.extractedUrl),d,1)),e.rawUrlTree=o.rawUrl,o.resolve(null),mo}}),Vi(o=>{const a=new wq(o.id,this.urlSerializer.serialize(o.extractedUrl),this.urlSerializer.serialize(o.urlAfterRedirects),o.targetSnapshot);this.events.next(a)}),et(o=>n={...o,guards:Kq(o.targetSnapshot,o.currentSnapshot,this.rootContexts)}),function aX(i,t){return tr(e=>{const{targetSnapshot:n,currentSnapshot:r,guards:{canActivateChecks:s,canDeactivateChecks:o}}=e;return 0===o.length&&0===s.length?ht({...e,guardsResult:!0}):function lX(i,t,e,n){return Ni(i).pipe(tr(r=>function pX(i,t,e,n,r){const s=t&&t.routeConfig?t.routeConfig.canDeactivate:null;return s&&0!==s.length?ht(s.map(a=>{const l=Py(t)??r,c=ym(a,l);return ru(function rX(i){return i&&Ly(i.canDeactivate)}(c)?c.canDeactivate(i,t,e,n):l.runInContext(()=>c(i,t,e,n))).pipe(tu())})).pipe(bm()):ht(!0)}(r.component,r.route,e,t,n)),tu(r=>!0!==r,!0))}(o,n,r,i).pipe(tr(a=>a&&function eX(i){return"boolean"==typeof i}(a)?function cX(i,t,e,n){return Ni(t).pipe(nu(r=>wy(function uX(i,t){return null!==i&&t&&t(new Dq(i)),ht(!0)}(r.route.parent,n),function dX(i,t){return null!==i&&t&&t(new Iq(i)),ht(!0)}(r.route,n),function fX(i,t,e){const n=t[t.length-1],s=t.slice(0,t.length-1).reverse().map(o=>function Zq(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=>My(()=>ht(o.guards.map(l=>{const c=Py(o.node)??e,d=ym(l,c);return ru(function iX(i){return i&&Ly(i.canActivateChild)}(d)?d.canActivateChild(n,i):c.runInContext(()=>d(n,i))).pipe(tu())})).pipe(bm())));return ht(s).pipe(bm())}(i,r.path,e),function hX(i,t,e){const n=t.routeConfig?t.routeConfig.canActivate:null;if(!n||0===n.length)return ht(!0);const r=n.map(s=>My(()=>{const o=Py(t)??e,a=ym(s,o);return ru(function nX(i){return i&&Ly(i.canActivate)}(a)?a.canActivate(t,i):o.runInContext(()=>a(t,i))).pipe(tu())}));return ht(r).pipe(bm())}(i,r.route,e))),tu(r=>!0!==r,!0))}(n,s,i,t):ht(a)),et(a=>({...e,guardsResult:a})))})}(this.environmentInjector,o=>this.events.next(o)),Vi(o=>{if(n.guardsResult=o.guardsResult,Dh(o.guardsResult))throw v3(0,o.guardsResult);const a=new Mq(o.id,this.urlSerializer.serialize(o.extractedUrl),this.urlSerializer.serialize(o.urlAfterRedirects),o.targetSnapshot,!!o.guardsResult);this.events.next(a)}),vn(o=>!!o.guardsResult||(e.restoreHistory(o),this.cancelNavigationTransition(o,"",3),!1)),yI(o=>{if(o.guards.canActivateChecks.length)return ht(o).pipe(Vi(a=>{const l=new Cq(a.id,this.urlSerializer.serialize(a.extractedUrl),this.urlSerializer.serialize(a.urlAfterRedirects),a.targetSnapshot);this.events.next(l)}),Rs(a=>{let l=!1;return ht(a).pipe(function FX(i,t){return tr(e=>{const{targetSnapshot:n,guards:{canActivateChecks:r}}=e;if(!r.length)return ht(e);let s=0;return Ni(r).pipe(nu(o=>function LX(i,t,e,n){const r=i.routeConfig,s=i._resolve;return void 0!==r?.title&&!B3(r)&&(s[Cy]=r.title),function NX(i,t,e,n){const r=function BX(i){return[...Object.keys(i),...Object.getOwnPropertySymbols(i)]}(i);if(0===r.length)return ht({});const s={};return Ni(r).pipe(tr(o=>function UX(i,t,e,n){const r=Py(t)??n,s=ym(i,r);return ru(s.resolve?s.resolve(t,e):r.runInContext(()=>s(t,e)))}(i[o],t,e,n).pipe(tu(),Vi(a=>{s[o]=a}))),QT(1),$B(s),Nc(o=>gI(o)?mo:hm(o)))}(s,i,t,n).pipe(et(o=>(i._resolvedData=o,i.data=m3(i,e).resolve,r&&B3(r)&&(i.data[Cy]=r.title),null)))}(o.route,n,i,t)),Vi(()=>s++),QT(1),tr(o=>s===r.length?ht(e):mo))})}(e.paramsInheritanceStrategy,this.environmentInjector),Vi({next:()=>l=!0,complete:()=>{l||(e.restoreHistory(a),this.cancelNavigationTransition(a,"",2))}}))}),Vi(a=>{const l=new Sq(a.id,this.urlSerializer.serialize(a.extractedUrl),this.urlSerializer.serialize(a.urlAfterRedirects),a.targetSnapshot);this.events.next(l)}))}),yI(o=>{const a=l=>{const c=[];l.routeConfig?.loadComponent&&!l.routeConfig._loadedComponent&&c.push(this.configLoader.loadComponent(l.routeConfig).pipe(Vi(d=>{l.component=d}),et(()=>{})));for(const d of l.children)c.push(...a(d));return c};return Aa(a(o.targetSnapshot.root)).pipe(rM(),Oi(1))}),yI(()=>this.afterPreactivation()),et(o=>{const a=function Uq(i,t,e){const n=Ry(i,t._root,e?e._root:void 0);return new f3(n,t)}(e.routeReuseStrategy,o.targetSnapshot,o.currentRouterState);return n={...o,targetRouterState:a}}),Vi(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)=>et(n=>(new Xq(t,n.targetRouterState,n.currentRouterState,e).activate(i),n)))(this.rootContexts,e.routeReuseStrategy,o=>this.events.next(o)),Oi(1),Vi({next:o=>{r=!0,this.lastSuccessfulNavigation=this.currentNavigation,e.navigated=!0,this.events.next(new Th(o.id,this.urlSerializer.serialize(o.extractedUrl),this.urlSerializer.serialize(e.currentUrlTree))),e.titleStrategy?.updateTitle(o.targetRouterState.snapshot),o.resolve(!0)},complete:()=>{r=!0}}),iu(()=>{r||s||this.cancelNavigationTransition(n,"",1),this.currentNavigation?.id===n.id&&(this.currentNavigation=null)}),Nc(o=>{if(s=!0,x3(o)){b3(o)||(e.navigated=!0,e.restoreHistory(n,!0));const a=new hM(n.id,this.urlSerializer.serialize(n.extractedUrl),o.message,o.cancellationCode);if(this.events.next(a),b3(o)){const l=e.urlHandlingStrategy.merge(o.url,e.rawUrlTree),c={skipLocationChange:n.extras.skipLocationChange,replaceUrl:"eager"===e.urlUpdateStrategy||z3(n.source)};e.scheduleNavigation(l,Iy,null,c,{resolve:n.resolve,reject:n.reject,promise:n.promise})}else n.resolve(!1)}else{e.restoreHistory(n,!0);const a=new oI(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 mo}))}))}cancelNavigationTransition(e,n,r){const s=new hM(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=Re({token:i,factory:i.\u0275fac,providedIn:"root"}),i})();function z3(i){return i!==Iy}let H3=(()=>{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===gn);return n}getResolvedTitleForRoute(e){return e.data[Cy]}}return i.\u0275fac=function(e){return new(e||i)},i.\u0275prov=Re({token:i,factory:function(){return Lt(zX)},providedIn:"root"}),i})(),zX=(()=>{class i extends H3{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)(ee(PB))},i.\u0275prov=Re({token:i,factory:i.\u0275fac,providedIn:"root"}),i})(),HX=(()=>{class i{}return i.\u0275fac=function(e){return new(e||i)},i.\u0275prov=Re({token:i,factory:function(){return Lt($X)},providedIn:"root"}),i})();class GX{shouldDetach(t){return!1}store(t,e){}shouldAttach(t){return!1}retrieve(t){return null}shouldReuseRoute(t,e){return t.routeConfig===e.routeConfig}}let $X=(()=>{class i extends GX{}return i.\u0275fac=function(){let t;return function(n){return(t||(t=ri(i)))(n||i)}}(),i.\u0275prov=Re({token:i,factory:i.\u0275fac,providedIn:"root"}),i})();const CM=new me("",{providedIn:"root",factory:()=>({})});let jX=(()=>{class i{}return i.\u0275fac=function(e){return new(e||i)},i.\u0275prov=Re({token:i,factory:function(){return Lt(YX)},providedIn:"root"}),i})(),YX=(()=>{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=Re({token:i,factory:i.\u0275fac,providedIn:"root"}),i})();function qX(i){throw i}function XX(i,t,e){return t.parse("/")}const KX={paths:"exact",fragment:"ignored",matrixParams:"ignored",queryParams:"exact"},ZX={paths:"subset",fragment:"ignored",matrixParams:"ignored",queryParams:"subset"};let Wo=(()=>{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=Lt(R6),this.isNgZoneEnabled=!1,this.options=Lt(CM,{optional:!0})||{},this.errorHandler=this.options.errorHandler||qX,this.malformedUriErrorHandler=this.options.malformedUriErrorHandler||XX,this.navigated=!1,this.lastSuccessfulId=-1,this.urlHandlingStrategy=Lt(jX),this.routeReuseStrategy=Lt(HX),this.urlCreationStrategy=Lt(Lq),this.titleStrategy=Lt(H3),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=jB(Lt(xm,{optional:!0})??[]),this.navigationTransitions=Lt(MM),this.urlSerializer=Lt(Ey),this.location=Lt(py),this.isNgZoneEnabled=Lt(ft)instanceof ft&&ft.isInAngularZone(),this.resetConfig(this.config),this.currentUrlTree=new su,this.rawUrlTree=this.currentUrlTree,this.browserUrlTree=this.currentUrlTree,this.routerState=p3(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),Iy,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(mI),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 d=null;switch(a){case"merge":d={...this.currentUrlTree.queryParams,...s};break;case"preserve":d=this.currentUrlTree.queryParams;break;default:d=s||null}return null!==d&&(d=this.removeEmptyProps(d)),this.urlCreationStrategy.createUrlTree(r,this.routerState,this.currentUrlTree,e,d,c??null)}navigateByUrl(e,n={skipLocationChange:!1}){const r=Dh(e)?e:this.parseUrl(e),s=this.urlHandlingStrategy.merge(r,this.rawUrlTree);return this.scheduleNavigation(s,Iy,null,n)}navigate(e,n={skipLocationChange:!1}){return function QX(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,d;return o?(a=o.resolve,l=o.reject,c=o.promise):c=new Promise((h,p)=>{a=h,l=p}),d="computed"===this.canceledNavigationResolution?r&&r.\u0275routerPageId?r.\u0275routerPageId:(this.browserPageId??0)+1:0,this.navigationTransitions.handleNavigationRequest({targetPageId:d,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=Re({token:i,factory:i.\u0275fac,providedIn:"root"}),i})();class G3{}let tK=(()=>{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(vn(e=>e instanceof Th),nu(()=>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=Rw(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 Ni(r).pipe(vd())}preloadConfig(e,n){return this.preloadingStrategy.preload(n,()=>{let r;r=n.loadChildren&&void 0===n.canLoad?this.loader.loadChildren(e,n):ht(null);const s=r.pipe(tr(o=>null===o?ht(void 0):(n._loadedRoutes=o.routes,n._loadedInjector=o.injector,this.processRoutes(o.injector??e,o.routes))));return n.loadComponent&&!n._loadedComponent?Ni([s,this.loader.loadComponent(n)]).pipe(vd()):s})}}return i.\u0275fac=function(e){return new(e||i)(ee(Wo),ee(hN),ee(eo),ee(G3),ee(bI))},i.\u0275prov=Re({token:i,factory:i.\u0275fac,providedIn:"root"}),i})();const MI=new me("");let $3=(()=>{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 sI?(this.store[this.lastId]=this.viewportScroller.getScrollPosition(),this.lastSource=e.navigationTrigger,this.restoredId=e.restoredState?e.restoredState.navigationId:0):e instanceof Th&&(this.lastId=e.id,this.scheduleScrollEvent(e,this.urlSerializer.parse(e.urlAfterRedirects).fragment))})}consumeScrollEvents(){return this.transitions.events.subscribe(e=>{e instanceof u3&&(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 u3(e,"popstate"===this.lastSource?this.store[this.restoredId]:null,n))})},0)})}ngOnDestroy(){this.routerEventsSubscription?.unsubscribe(),this.scrollEventsSubscription?.unsubscribe()}}return i.\u0275fac=function(e){wo()},i.\u0275prov=Re({token:i,factory:i.\u0275fac}),i})();var jo=(()=>((jo=jo||{})[jo.COMPLETE=0]="COMPLETE",jo[jo.FAILED=1]="FAILED",jo[jo.REDIRECTING=2]="REDIRECTING",jo))();const wm=!1;function ou(i,t){return{\u0275kind:i,\u0275providers:t}}const CI=new me("",{providedIn:"root",factory:()=>!1});function j3(){const i=Lt($i);return t=>{const e=i.get(lm);if(t!==e.components[0])return;const n=i.get(Wo),r=i.get(Y3);1===i.get(SI)&&n.initialNavigation(),i.get(q3,null,Ft.Optional)?.setUpPreloading(),i.get(MI,null,Ft.Optional)?.init(),n.resetRootComponentType(e.componentTypes[0]),r.closed||(r.next(),r.complete(),r.unsubscribe())}}const Y3=new me(wm?"bootstrap done indicator":"",{factory:()=>new Ie}),SI=new me(wm?"initial navigation":"",{providedIn:"root",factory:()=>1});function oK(){let i=[];return i=wm?[{provide:Lp,multi:!0,useFactory:()=>{const t=Lt(Wo);return()=>t.events.subscribe(e=>{console.group?.(`Router Event: ${e.constructor.name}`),console.log(function kq(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?.()})}}]:[],ou(1,i)}const q3=new me(wm?"router preloader":"");function aK(i){return ou(0,[{provide:q3,useExisting:tK},{provide:G3,useExisting:i}])}const By=!1,X3=new me(By?"router duplicate forRoot guard":"ROUTER_FORROOT_GUARD"),lK=[py,{provide:Ey,useClass:JT},Wo,ky,{provide:vm,useFactory:function W3(i){return i.routerState.root},deps:[Wo]},bI,By?{provide:CI,useValue:!0}:[]];function cK(){return new bN("Router",Wo)}let K3=(()=>{class i{constructor(e){}static forRoot(e,n){return{ngModule:i,providers:[lK,By&&n?.enableTracing?oK().\u0275providers:[],{provide:xm,multi:!0,useValue:e},{provide:X3,useFactory:fK,deps:[[Wo,new Ss,new ya]]},{provide:CM,useValue:n||{}},n?.useHash?{provide:Eh,useClass:y9}:{provide:Eh,useClass:GN},{provide:MI,useFactory:()=>{const i=Lt(OY),t=Lt(ft),e=Lt(CM),n=Lt(MM),r=Lt(Ey);return e.scrollOffset&&i.setOffset(e.scrollOffset),new $3(r,n,i,t,e)}},n?.preloadingStrategy?aK(n.preloadingStrategy).\u0275providers:[],{provide:bN,multi:!0,useFactory:cK},n?.initialNavigation?pK(n):[],[{provide:Z3,useFactory:j3},{provide:yN,multi:!0,useExisting:Z3}]]}}static forChild(e){return{ngModule:i,providers:[{provide:xm,multi:!0,useValue:e}]}}}return i.\u0275fac=function(e){return new(e||i)(ee(X3,8))},i.\u0275mod=en({type:i}),i.\u0275inj=Wt({imports:[fI]}),i})();function fK(i){if(By&&i)throw new pe(4007,"The Router was provided more than once. This can happen if 'forRoot' is used outside of the root injector. Lazy loaded modules should use RouterModule.forChild() instead.");return"guarded"}function pK(i){return["disabled"===i.initialNavigation?ou(3,[{provide:Fw,multi:!0,useFactory:()=>{const t=Lt(Wo);return()=>{t.setUpLocationChangeListener()}}},{provide:SI,useValue:2}]).\u0275providers:[],"enabledBlocking"===i.initialNavigation?ou(2,[{provide:SI,useValue:0},{provide:Fw,multi:!0,deps:[$i],useFactory:t=>{const e=t.get(_9,Promise.resolve());return()=>e.then(()=>new Promise(n=>{const r=t.get(Wo),s=t.get(Y3);(function nK(i,t){i.events.pipe(vn(e=>e instanceof Th||e instanceof hM||e instanceof oI||e instanceof fM),et(e=>e instanceof Th||e instanceof fM?jo.COMPLETE:e instanceof hM&&(0===e.code||1===e.code)?jo.REDIRECTING:jo.FAILED),vn(e=>e!==jo.REDIRECTING),Oi(1)).subscribe(()=>{t()})})(r,()=>{n(!0)}),t.get(MM).afterPreactivation=()=>(n(!0),s.closed?ht(void 0):s),r.initialNavigation()}))}}]).\u0275providers:[]]}const Z3=new me(By?"Router Initializer":""),gK=[];let _K=(()=>{class i{}return i.\u0275fac=function(e){return new(e||i)},i.\u0275mod=en({type:i}),i.\u0275inj=Wt({imports:[K3.forRoot(gK),K3]}),i})();function Q3(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 xt(i){return function(){var t=this,e=arguments;return new Promise(function(n,r){var s=i.apply(t,e);function o(l){Q3(s,n,r,o,a,"next",l)}function a(l){Q3(s,n,r,o,a,"throw",l)}o(void 0)})}}function tn(i){return null!=i&&"false"!=`${i}`}function ks(i,t=0){return function vK(i){return!isNaN(parseFloat(i))&&!isNaN(Number(i))}(i)?Number(i):t}function SM(i){return Array.isArray(i)?i:[i]}function mr(i){return null==i?"":"string"==typeof i?i:`${i}px`}function Uc(i){return i instanceof mt?i.nativeElement:i}const yK=["addListener","removeListener"],bK=["addEventListener","removeEventListener"],xK=["on","off"];function Ao(i,t,e,n){if(dn(e)&&(n=e,e=void 0),n)return Ao(i,t,e).pipe(XT(n));const[r,s]=function CK(i){return dn(i.addEventListener)&&dn(i.removeEventListener)}(i)?bK.map(o=>a=>i[o](t,a,e)):function wK(i){return dn(i.addListener)&&dn(i.removeListener)}(i)?yK.map(J3(i,t)):function MK(i){return dn(i.on)&&dn(i.off)}(i)?xK.map(J3(i,t)):[];if(!r&&e_(i))return tr(o=>Ao(o,t,e))(Mr(i));if(!r)throw new TypeError("Invalid event target");return new Tn(o=>{const a=(...l)=>o.next(1s(a)})}function J3(i,t){return e=>n=>i[e](t,n)}class SK extends Qt{constructor(t,e){super()}schedule(t,e=0){return this}}const EM={setInterval(i,t,...e){const{delegate:n}=EM;return n?.setInterval?n.setInterval(i,t,...e):setInterval(i,t,...e)},clearInterval(i){const{delegate:t}=EM;return(t?.clearInterval||clearInterval)(i)},delegate:void 0};class EI extends SK{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 EM.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&&EM.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,Kr(n,this),null!=t&&(this.id=this.recycleAsyncId(e,t,null)),this.delay=null,super.unsubscribe()}}}const Uy={schedule(i){let t=requestAnimationFrame,e=cancelAnimationFrame;const{delegate:n}=Uy;n&&(t=n.requestAnimationFrame,e=n.cancelAnimationFrame);const r=t(s=>{e=void 0,i(s)});return new Qt(()=>e?.(r))},requestAnimationFrame(...i){const{delegate:t}=Uy;return(t?.requestAnimationFrame||requestAnimationFrame)(...i)},cancelAnimationFrame(...i){const{delegate:t}=Uy;return(t?.cancelAnimationFrame||cancelAnimationFrame)(...i)},delegate:void 0},eU={now:()=>(eU.delegate||Date).now(),delegate:void 0};class Vy{constructor(t,e=Vy.now){this.schedulerActionCtor=t,this.now=e}schedule(t,e=0,n){return new this.schedulerActionCtor(this,t).schedule(n,e)}}Vy.now=eU.now;class AI extends Vy{constructor(t,e=Vy.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 DK=new class AK extends AI{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 EK extends EI{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=Uy.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&&(Uy.cancelAnimationFrame(e),t._scheduled=void 0)}});let DI,TK=1;const AM={};function tU(i){return i in AM&&(delete AM[i],!0)}const IK={setImmediate(i){const t=TK++;return AM[t]=!0,DI||(DI=Promise.resolve()),DI.then(()=>tU(t)&&i()),t},clearImmediate(i){tU(i)}},{setImmediate:RK,clearImmediate:kK}=IK,DM={setImmediate(...i){const{delegate:t}=DM;return(t?.setImmediate||RK)(...i)},clearImmediate(i){const{delegate:t}=DM;return(t?.clearImmediate||kK)(i)},delegate:void 0},TI=new class OK extends AI{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 PK extends EI{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=DM.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&&(DM.clearImmediate(e),t._scheduled===e&&(t._scheduled=void 0))}}),zy=new AI(EI),FK=zy;function II(i=0,t,e=FK){let n=-1;return null!=t&&(Bu(t)?e=t:n=t),new Tn(r=>{let s=function NK(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 Hy(i,t=zy){return function LK(i){return ti((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(jn(e,c=>{n=!0,r=c,s||Mr(i(c)).subscribe(s=jn(e,a,l))},()=>{o=!0,(!n||!s||s.closed)&&e.complete()}))})}(()=>II(i,t))}function He(i){return ti((t,e)=>{Mr(i).subscribe(jn(e,()=>e.complete(),ms)),!e.closed&&t.subscribe(e)})}let RI;try{RI=typeof Intl<"u"&&Intl.v8BreakIterator}catch{RI=!1}let Mm,zi=(()=>{class i{constructor(e){this._platformId=e,this.isBrowser=this._platformId?function PY(i){return i===cB}(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&&!RI)&&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)(ee(cT))},i.\u0275prov=Re({token:i,factory:i.\u0275fac,providedIn:"root"}),i})();const nU=["color","button","checkbox","date","datetime-local","email","file","hidden","image","month","number","password","radio","range","reset","search","submit","tel","text","time","url","week"];function iU(){if(Mm)return Mm;if("object"!=typeof document||!document)return Mm=new Set(nU),Mm;let i=document.createElement("input");return Mm=new Set(nU.filter(t=>(i.setAttribute("type",t),i.type===t))),Mm}let Gy,TM,Rh,kI;function Ih(i){return function BK(){if(null==Gy&&typeof window<"u")try{window.addEventListener("test",null,Object.defineProperty({},"passive",{get:()=>Gy=!0}))}finally{Gy=Gy||!1}return Gy}()?i:!!i.capture}function rU(){if(null==Rh){if("object"!=typeof document||!document||"function"!=typeof Element||!Element)return Rh=!1,Rh;if("scrollBehavior"in document.documentElement.style)Rh=!0;else{const i=Element.prototype.scrollTo;Rh=!!i&&!/\{\s*\[native code\]\s*\}/.test(i.toString())}}return Rh}function $y(){if("object"!=typeof document||!document)return 0;if(null==TM){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),TM=0,0===i.scrollLeft&&(i.scrollLeft=1,TM=0===i.scrollLeft?1:2),i.remove()}return TM}function IM(){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 au(i){return i.composedPath?i.composedPath()[0]:i.target}function PI(){return typeof __karma__<"u"&&!!__karma__||typeof jasmine<"u"&&!!jasmine||typeof jest<"u"&&!!jest||typeof Mocha<"u"&&!!Mocha}const zK=new me("cdk-dir-doc",{providedIn:"root",factory:function HK(){return Lt(qt)}}),GK=/^(ar|ckb|dv|he|iw|fa|nqo|ps|sd|ug|ur|yi|.*[-_](Adlm|Arab|Hebr|Nkoo|Rohg|Thaa))(?!.*[-_](Latn|Cyrl)($|-|_))($|-|_)/i;let Ta=(()=>{class i{constructor(e){this.value="ltr",this.change=new $e,e&&(this.value=function $K(i){const t=i?.toLowerCase()||"";return"auto"===t&&typeof navigator<"u"&&navigator?.language?GK.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)(ee(zK,8))},i.\u0275prov=Re({token:i,factory:i.\u0275fac,providedIn:"root"}),i})(),Wy=(()=>{class i{}return i.\u0275fac=function(e){return new(e||i)},i.\u0275mod=en({type:i}),i.\u0275inj=Wt({}),i})();const WK=["contentWrapper"],jK=["*"],YK=new me("VIRTUAL_SCROLL_STRATEGY");let jy=(()=>{class i{constructor(e,n,r){this._ngZone=e,this._platform=n,this._scrolled=new Ie,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 Tn(n=>{this._globalSubscription||this._addGlobalListener();const r=e>0?this._scrolled.pipe(Hy(e)).subscribe(n):this._scrolled.subscribe(n);return this._scrolledCount++,()=>{r.unsubscribe(),this._scrolledCount--,this._scrolledCount||this._removeGlobalListener()}}):ht()}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(vn(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=Uc(n),s=e.getElementRef().nativeElement;do{if(r==s)return!0}while(r=r.parentElement);return!1}_addGlobalListener(){this._globalSubscription=this._ngZone.runOutsideAngular(()=>Ao(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)(ee(ft),ee(zi),ee(qt,8))},i.\u0275prov=Re({token:i,factory:i.\u0275fac,providedIn:"root"}),i})(),sU=(()=>{class i{constructor(e,n,r,s){this.elementRef=e,this.scrollDispatcher=n,this.ngZone=r,this.dir=s,this._destroyed=new Ie,this._elementScrolled=new Tn(o=>this.ngZone.runOutsideAngular(()=>Ao(this.elementRef.nativeElement,"scroll").pipe(He(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!=$y()?(null!=e.left&&(e.right=n.scrollWidth-n.clientWidth-e.left),2==$y()?e.left=e.right:1==$y()&&(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;rU()?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==$y()?e==n?s.scrollWidth-s.clientWidth-s.scrollLeft:s.scrollLeft:o&&1==$y()?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)(E(mt),E(jy),E(ft),E(Ta,8))},i.\u0275dir=ve({type:i,selectors:[["","cdk-scrollable",""],["","cdkScrollable",""]],standalone:!0}),i})(),RM=(()=>{class i{constructor(e,n,r){this._platform=e,this._change=new Ie,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(Hy(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)(ee(zi),ee(ft),ee(qt,8))},i.\u0275prov=Re({token:i,factory:i.\u0275fac,providedIn:"root"}),i})();const oU=new me("VIRTUAL_SCROLLABLE");let KK=(()=>{class i extends sU{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)(E(mt),E(jy),E(ft),E(Ta,8))},i.\u0275dir=ve({type:i,features:[lt]}),i})();const QK=typeof requestAnimationFrame<"u"?DK:TI;let JK=(()=>{class i extends KK{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=tn(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=Lt(zi),this._detachedSubject=new Ie,this._renderedRangeSubject=new Ie,this._orientation="vertical",this._appendOnly=!1,this.scrolledIndexChange=new Tn(d=>this._scrollStrategy.scrolledIndexChange.subscribe(h=>Promise.resolve().then(()=>this.ngZone.run(()=>d.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=Qt.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(Eo(null),Hy(0,QK)).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(He(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 ZK(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)(E(mt),E(si),E(ft),E(YK,8),E(Ta,8),E(jy),E(RM),E(oU,8))},i.\u0275cmp=st({type:i,selectors:[["cdk-virtual-scroll-viewport"]],viewQuery:function(e,n){if(1&e&&Zn(WK,7),2&e){let r;Tt(r=It())&&(n._contentWrapper=r.first)}},hostAttrs:[1,"cdk-virtual-scroll-viewport"],hostVars:4,hostBindings:function(e,n){2&e&&ln("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:sU,useFactory:(t,e)=>t||e,deps:[[new Ss,new yo(oU)],i]}]),lt,YD],ngContentSelectors:jK,decls:4,vars:4,consts:[[1,"cdk-virtual-scroll-content-wrapper"],["contentWrapper",""],[1,"cdk-virtual-scroll-spacer"]],template:function(e,n){1&e&&(rr(),$(0,"div",0,1),Yt(2),j(),Oe(3,"div",2)),2&e&&(V(3),$o("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})(),Yy=(()=>{class i{}return i.\u0275fac=function(e){return new(e||i)},i.\u0275mod=en({type:i}),i.\u0275inj=Wt({}),i})(),aU=(()=>{class i{}return i.\u0275fac=function(e){return new(e||i)},i.\u0275mod=en({type:i}),i.\u0275inj=Wt({imports:[Wy,Yy,JK,Wy,Yy]}),i})();class OI{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 kh extends OI{constructor(t,e,n,r,s){super(),this.component=t,this.viewContainerRef=e,this.injector=n,this.componentFactoryResolver=r,this.projectableNodes=s}}class Cm extends OI{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 eZ extends OI{constructor(t){super(),this.element=t instanceof mt?t.nativeElement:t}}class kM{constructor(){this._isDisposed=!1,this.attachDomPortal=null}hasAttached(){return!!this._attachedPortal}attach(t){return t instanceof kh?(this._attachedPortal=t,this.attachComponentPortal(t)):t instanceof Cm?(this._attachedPortal=t,this.attachTemplatePortal(t)):this.attachDomPortal&&t instanceof eZ?(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 tZ extends kM{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||$i.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 Sm=(()=>{class i extends kM{constructor(e,n,r){super(),this._componentFactoryResolver=e,this._viewContainerRef=n,this._isInitialized=!1,this.attached=new $e,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)(E(Ll),E(jr),E(qt))},i.\u0275dir=ve({type:i,selectors:[["","cdkPortalOutlet",""]],inputs:{portal:["cdkPortalOutlet","portal"]},outputs:{attached:"attached"},exportAs:["cdkPortalOutlet"],features:[lt]}),i})(),Ph=(()=>{class i{}return i.\u0275fac=function(e){return new(e||i)},i.\u0275mod=en({type:i}),i.\u0275inj=Wt({}),i})();function Yo(i,...t){return t.length?t.some(e=>i[e]):i.altKey||i.shiftKey||i.ctrlKey||i.metaKey}const lU=rU();class mZ{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=mr(-this._previousScrollPosition.left),t.style.top=mr(-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"),lU&&(n.scrollBehavior=r.scrollBehavior="auto"),window.scroll(this._previousScrollPosition.left,this._previousScrollPosition.top),lU&&(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 gZ{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(vn(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 cU{enable(){}disable(){}attach(){}}function LI(i,t){return t.some(e=>i.bottome.bottom||i.righte.right)}function dU(i,t){return t.some(e=>i.tope.bottom||i.lefte.right)}class _Z{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();LI(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 vZ=(()=>{class i{constructor(e,n,r,s){this._scrollDispatcher=e,this._viewportRuler=n,this._ngZone=r,this.noop=()=>new cU,this.close=o=>new gZ(this._scrollDispatcher,this._ngZone,this._viewportRuler,o),this.block=()=>new mZ(this._viewportRuler,this._document),this.reposition=o=>new _Z(this._scrollDispatcher,this._viewportRuler,this._ngZone,o),this._document=s}}return i.\u0275fac=function(e){return new(e||i)(ee(jy),ee(RM),ee(ft),ee(qt))},i.\u0275prov=Re({token:i,factory:i.\u0275fac,providedIn:"root"}),i})();class Im{constructor(t){if(this.scrollStrategy=new cU,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 yZ{constructor(t,e){this.connectionPair=t,this.scrollableViewProperties=e}}let uU=(()=>{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)(ee(qt))},i.\u0275prov=Re({token:i,factory:i.\u0275fac,providedIn:"root"}),i})(),bZ=(()=>{class i extends uU{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)(ee(qt),ee(ft,8))},i.\u0275prov=Re({token:i,factory:i.\u0275fac,providedIn:"root"}),i})(),xZ=(()=>{class i extends uU{constructor(e,n,r){super(e),this._platform=n,this._ngZone=r,this._cursorStyleIsSet=!1,this._pointerDownListener=s=>{this._pointerDownEventTarget=au(s)},this._clickListener=s=>{const o=au(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 d=l[c];if(d._outsidePointerEvents.observers.length<1||!d.hasAttached())continue;if(d.overlayElement.contains(o)||d.overlayElement.contains(a))break;const h=d._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)(ee(qt),ee(zi),ee(ft,8))},i.\u0275prov=Re({token:i,factory:i.\u0275fac,providedIn:"root"}),i})(),FM=(()=>{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||PI()){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 Ie,this._outsidePointerEvents=new Ie,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(Oi(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=mr(this._config.width),t.height=mr(this._config.height),t.minWidth=mr(this._config.minWidth),t.minHeight=mr(this._config.minHeight),t.maxWidth=mr(this._config.maxWidth),t.maxHeight=mr(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=SM(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(He(Cr(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 hU="cdk-overlay-connected-position-bounding-box",wZ=/([A-Za-z%]+)$/;class MZ{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 Ie,this._resizeSubscription=Qt.EMPTY,this._offsetX=0,this._offsetY=0,this._appliedPanelClasses=[],this.positionChanges=this._positionChanges,this.setOrigin(t)}attach(t){this._validatePositions(),t.hostElement.classList.add(hU),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),d=this._getOverlayFit(c,e,n,a);if(d.isCompletelyWithinViewport)return this._isPushed=!1,void this._applyPosition(a,l);this._canFitWithFlexibleDimensions(d,c,n)?s.push({position:a,origin:l,overlayRect:e,boundingBoxRect:this._calculateBoundingBoxRect(l,a)}):(!o||o.overlayFit.visibleAreal&&(l=d,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&&Oh(this._boundingBox.style,{top:"",left:"",right:"",bottom:"",height:"",width:"",alignItems:"",justifyContent:""}),this._pane&&this._resetOverlayElementStyles(),this._overlayRef&&this._overlayRef.hostElement.classList.remove(hU),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=pU(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=fU(this._overlayRef.getConfig().minHeight),a=fU(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=pU(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 d=0,h=0;return d=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,d=t.x-this._viewportMargin;else if("start"===e.overlayX&&!r||"end"===e.overlayX&&r)h=t.x,d=n.right-t.x;else{const m=Math.min(n.right-t.x+n.left,t.x),g=this._lastBoundingBoxSize.width;d=2*m,h=t.x-m,d>g&&!this._isInitialRender&&!this._growAfterOpen&&(h=t.x-g/2)}return{top:o,left:h,bottom:a,right:p,width:d,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=mr(n.height),r.top=mr(n.top),r.bottom=mr(n.bottom),r.width=mr(n.width),r.left=mr(n.left),r.right=mr(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=mr(s)),o&&(r.maxWidth=mr(o))}this._lastBoundingBoxSize=n,Oh(this._boundingBox.style,r)}_resetBoundingBoxStyles(){Oh(this._boundingBox.style,{top:"0",left:"0",right:"0",bottom:"0",height:"",width:"",alignItems:"",justifyContent:""})}_resetOverlayElementStyles(){Oh(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 d=this._viewportRuler.getViewportScrollPosition();Oh(n,this._getExactOverlayY(e,t,d)),Oh(n,this._getExactOverlayX(e,t,d))}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=mr(o.maxHeight):s&&(n.maxHeight="")),o.maxWidth&&(r?n.maxWidth=mr(o.maxWidth):s&&(n.maxWidth="")),Oh(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=mr(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=mr(s.x),r}_getScrollVisibility(){const t=this._getOriginRect(),e=this._pane.getBoundingClientRect(),n=this._scrollables.map(r=>r.getElementRef().nativeElement.getBoundingClientRect());return{isOriginClipped:dU(t,n),isOriginOutsideView:LI(t,n),isOverlayClipped:dU(e,n),isOverlayOutsideView:LI(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&&SM(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 mt)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 Oh(i,t){for(let e in t)t.hasOwnProperty(e)&&(i[e]=t[e]);return i}function fU(i){if("number"!=typeof i&&null!=i){const[t,e]=i.split(wZ);return e&&"px"!==e?null:parseFloat(t)}return i||null}function pU(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 mU="cdk-global-overlay-wrapper";class gU{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(mU),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),d=this._xPosition,h=this._xOffset,p="rtl"===this._overlayRef.getConfig().direction;let m="",g="",b="";l?b="flex-start":"center"===d?(b="center",p?g=h:m=h):p?"left"===d||"end"===d?(b="flex-end",m=h):("right"===d||"start"===d)&&(b="flex-start",g=h):"left"===d||"start"===d?(b="flex-start",m=h):("right"===d||"end"===d)&&(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(mU),n.justifyContent=n.alignItems=t.marginTop=t.marginBottom=t.marginLeft=t.marginRight=t.position="",this._overlayRef=null,this._isDisposed=!0}}let CZ=(()=>{class i{constructor(e,n,r,s){this._viewportRuler=e,this._document=n,this._platform=r,this._overlayContainer=s}global(){return new gU}flexibleConnectedTo(e){return new MZ(e,this._viewportRuler,this._document,this._platform,this._overlayContainer)}}return i.\u0275fac=function(e){return new(e||i)(ee(RM),ee(qt),ee(zi),ee(FM))},i.\u0275prov=Re({token:i,factory:i.\u0275fac,providedIn:"root"}),i})(),SZ=0,as=(()=>{class i{constructor(e,n,r,s,o,a,l,c,d,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=d,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 Im(e);return o.direction=o.direction||this._directionality.value,new Xy(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-"+SZ++,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(lm)),new tZ(e,this._componentFactoryResolver,this._appRef,this._injector,this._document)}}return i.\u0275fac=function(e){return new(e||i)(ee(vZ),ee(FM),ee(Ll),ee(CZ),ee(bZ),ee($i),ee(ft),ee(qt),ee(Ta),ee(py),ee(xZ),ee(kr,8))},i.\u0275prov=Re({token:i,factory:i.\u0275fac,providedIn:"root"}),i})();const EZ=[{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"}],_U=new me("cdk-connected-overlay-scroll-strategy");let NI=(()=>{class i{constructor(e){this.elementRef=e}}return i.\u0275fac=function(e){return new(e||i)(E(mt))},i.\u0275dir=ve({type:i,selectors:[["","cdk-overlay-origin",""],["","overlay-origin",""],["","cdkOverlayOrigin",""]],exportAs:["cdkOverlayOrigin"],standalone:!0}),i})(),vU=(()=>{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=tn(e)}get lockPosition(){return this._lockPosition}set lockPosition(e){this._lockPosition=tn(e)}get flexibleDimensions(){return this._flexibleDimensions}set flexibleDimensions(e){this._flexibleDimensions=tn(e)}get growAfterOpen(){return this._growAfterOpen}set growAfterOpen(e){this._growAfterOpen=tn(e)}get push(){return this._push}set push(e){this._push=tn(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=Qt.EMPTY,this._attachSubscription=Qt.EMPTY,this._detachSubscription=Qt.EMPTY,this._positionSubscription=Qt.EMPTY,this.viewportMargin=0,this.open=!1,this.disableClose=!1,this.backdropClick=new $e,this.positionChange=new $e,this.attach=new $e,this.detach=new $e,this.overlayKeydown=new $e,this.overlayOutsideClick=new $e,this._templatePortal=new Cm(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=EZ);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&&!Yo(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 Im({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 NI?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(GB(()=>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)(E(as),E(Co),E(jr),E(_U),E(Ta,8))},i.\u0275dir=ve({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:[xi]}),i})();const DZ={provide:_U,deps:[as],useFactory:function AZ(i){return()=>i.scrollStrategies.reposition()}};let Rm=(()=>{class i{}return i.\u0275fac=function(e){return new(e||i)},i.\u0275mod=en({type:i}),i.\u0275inj=Wt({providers:[as,DZ],imports:[Wy,Ph,aU,aU]}),i})();function Vc(i,t=zy){return ti((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,d=t.now();if(d{s=c,o=t.now(),r||(r=t.schedule(l,i),n.add(r))},()=>{a(),n.complete()},void 0,()=>{s=r=null}))})}function yU(i){return vn((t,e)=>i<=e)}function zc(i,t=za){return i=i??TZ,ti((e,n)=>{let r,s=!0;e.subscribe(jn(n,o=>{const a=t(o);(s||!i(r,a))&&(s=!1,r=a,n.next(o))}))})}function TZ(i,t){return i===t}let bU=(()=>{class i{create(e){return typeof MutationObserver>"u"?null:new MutationObserver(e)}}return i.\u0275fac=function(e){return new(e||i)},i.\u0275prov=Re({token:i,factory:i.\u0275fac,providedIn:"root"}),i})(),IZ=(()=>{class i{constructor(e){this._mutationObserverFactory=e,this._observedElements=new Map}ngOnDestroy(){this._observedElements.forEach((e,n)=>this._cleanupObserver(n))}observe(e){const n=Uc(e);return new Tn(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 Ie,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)(ee(bU))},i.\u0275prov=Re({token:i,factory:i.\u0275fac,providedIn:"root"}),i})(),xU=(()=>{class i{get disabled(){return this._disabled}set disabled(e){this._disabled=tn(e),this._disabled?this._unsubscribe():this._subscribe()}get debounce(){return this._debounce}set debounce(e){this._debounce=ks(e),this._subscribe()}constructor(e,n,r){this._contentObserver=e,this._elementRef=n,this._ngZone=r,this.event=new $e,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(Vc(this.debounce)):e).subscribe(this.event)})}_unsubscribe(){this._currentSubscription?.unsubscribe()}}return i.\u0275fac=function(e){return new(e||i)(E(IZ),E(mt),E(ft))},i.\u0275dir=ve({type:i,selectors:[["","cdkObserveContent",""]],inputs:{disabled:["cdkObserveContentDisabled","disabled"],debounce:"debounce"},outputs:{event:"cdkObserveContent"},exportAs:["cdkObserveContent"]}),i})(),BI=(()=>{class i{}return i.\u0275fac=function(e){return new(e||i)},i.\u0275mod=en({type:i}),i.\u0275inj=Wt({providers:[bU]}),i})();const wU=new Set;let km,RZ=(()=>{class i{constructor(e){this._platform=e,this._matchMedia=this._platform.isBrowser&&window.matchMedia?window.matchMedia.bind(window):PZ}matchMedia(e){return(this._platform.WEBKIT||this._platform.BLINK)&&function kZ(i){if(!wU.has(i))try{km||(km=document.createElement("style"),km.setAttribute("type","text/css"),document.head.appendChild(km)),km.sheet&&(km.sheet.insertRule(`@media ${i} {body{ }}`,0),wU.add(i))}catch(t){console.error(t)}}(e),this._matchMedia(e)}}return i.\u0275fac=function(e){return new(e||i)(ee(zi))},i.\u0275prov=Re({token:i,factory:i.\u0275fac,providedIn:"root"}),i})();function PZ(i){return{matches:"all"===i||""===i,media:i,addListener:()=>{},removeListener:()=>{}}}let UI=(()=>{class i{constructor(e,n){this._mediaMatcher=e,this._zone=n,this._queries=new Map,this._destroySubject=new Ie}ngOnDestroy(){this._destroySubject.next(),this._destroySubject.complete()}isMatched(e){return MU(SM(e)).some(r=>this._registerQuery(r).mql.matches)}observe(e){let s=Aa(MU(SM(e)).map(o=>this._registerQuery(o).observable));return s=wy(s.pipe(Oi(1)),s.pipe(yU(1),Vc(0))),s.pipe(et(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 Tn(o=>{const a=l=>this._zone.run(()=>o.next(l));return n.addListener(a),()=>{n.removeListener(a)}}).pipe(Eo(n),et(({matches:o})=>({query:e,matches:o})),He(this._destroySubject)),mql:n};return this._queries.set(e,s),s}}return i.\u0275fac=function(e){return new(e||i)(ee(RZ),ee(ft))},i.\u0275prov=Re({token:i,factory:i.\u0275fac,providedIn:"root"}),i})();function MU(i){return i.map(t=>t.split(",")).reduce((t,e)=>t.concat(e)).map(t=>t.trim())}function LM(i,t){return(i.getAttribute(t)||"").match(/\S+/g)||[]}const SU="cdk-describedby-message",NM="cdk-describedby-host";let VI=0,NZ=(()=>{class i{constructor(e,n){this._platform=n,this._messageRegistry=new Map,this._messagesContainer=null,this._id=""+VI++,this._document=e,this._id=Lt(am)+"-"+VI++}describe(e,n,r){if(!this._canBeDescribed(e,n))return;const s=zI(n,r);"string"!=typeof n?(EU(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=zI(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(`[${NM}="${this._id}"]`);for(let n=0;n0!=r.indexOf(SU));e.setAttribute("aria-describedby",n.join(" "))}_addMessageReference(e,n){const r=this._messageRegistry.get(n);(function FZ(i,t,e){const n=LM(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(NM,this._id),r.referenceCount++}_removeMessageReference(e,n){const r=this._messageRegistry.get(n);r.referenceCount--,function LZ(i,t,e){const r=LM(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(NM)}_isElementDescribedByMessage(e,n){const r=LM(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)(ee(qt),ee(zi))},i.\u0275prov=Re({token:i,factory:i.\u0275fac,providedIn:"root"}),i})();function zI(i,t){return"string"==typeof i?`${t||""}/${i}`:i}function EU(i,t){i.id||(i.id=`${SU}-${t}-${VI++}`)}class AU{constructor(t){this._items=t,this._activeItemIndex=-1,this._activeItem=null,this._wrap=!1,this._letterKeyStream=new Ie,this._typeaheadSubscription=Qt.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 Ie,this.change=new Ie,t instanceof rm&&(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(Vi(e=>this._pressedLetters.push(e)),Vc(t),vn(()=>this._pressedLetters.length>0),et(()=>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 rm?this._items.toArray():this._items}}class BZ extends AU{setActiveItem(t){this.activeItem&&this.activeItem.setInactiveStyles(),super.setActiveItem(t),this.activeItem&&this.activeItem.setActiveStyles()}}class DU extends AU{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 BM=(()=>{class i{constructor(e){this._platform=e}isDisabled(e){return e.hasAttribute("disabled")}isVisible(e){return function VZ(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 UZ(i){try{return i.frameElement}catch{return null}}(function qZ(i){return i.ownerDocument&&i.ownerDocument.defaultView||window}(e));if(n&&(-1===IU(n)||!this.isVisible(n)))return!1;let r=e.nodeName.toLowerCase(),s=IU(e);return e.hasAttribute("contenteditable")?-1!==s:!("iframe"===r||"object"===r||this._platform.WEBKIT&&this._platform.IOS&&!function jZ(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 YZ(i){return!function HZ(i){return function $Z(i){return"input"==i.nodeName.toLowerCase()}(i)&&"hidden"==i.type}(i)&&(function zZ(i){let t=i.nodeName.toLowerCase();return"input"===t||"select"===t||"button"===t||"textarea"===t}(i)||function GZ(i){return function WZ(i){return"a"==i.nodeName.toLowerCase()}(i)&&i.hasAttribute("href")}(i)||i.hasAttribute("contenteditable")||TU(i))}(e)&&!this.isDisabled(e)&&(n?.ignoreVisibility||this.isVisible(e))}}return i.\u0275fac=function(e){return new(e||i)(ee(zi))},i.\u0275prov=Re({token:i,factory:i.\u0275fac,providedIn:"root"}),i})();function TU(i){if(!i.hasAttribute("tabindex")||void 0===i.tabIndex)return!1;let t=i.getAttribute("tabindex");return!(!t||isNaN(parseInt(t,10)))}function IU(i){if(!TU(i))return null;const t=parseInt(i.getAttribute("tabindex")||"",10);return isNaN(t)?-1:t}class XZ{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(Oi(1)).subscribe(t)}}let HI=(()=>{class i{constructor(e,n,r){this._checker=e,this._ngZone=n,this._document=r}create(e,n=!1){return new XZ(e,this._checker,this._ngZone,this._document,n)}}return i.\u0275fac=function(e){return new(e||i)(ee(BM),ee(ft),ee(qt))},i.\u0275prov=Re({token:i,factory:i.\u0275fac,providedIn:"root"}),i})();function GI(i){return 0===i.buttons||0===i.offsetX&&0===i.offsetY}function $I(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 KZ=new me("cdk-input-modality-detector-options"),ZZ={ignoreKeys:[18,17,224,91,16]},Pm=Ih({passive:!0,capture:!0});let QZ=(()=>{class i{get mostRecentModality(){return this._modality.value}constructor(e,n,r,s){this._platform=e,this._mostRecentTarget=null,this._modality=new at(null),this._lastTouchMs=0,this._onKeydown=o=>{this._options?.ignoreKeys?.some(a=>a===o.keyCode)||(this._modality.next("keyboard"),this._mostRecentTarget=au(o))},this._onMousedown=o=>{Date.now()-this._lastTouchMs<650||(this._modality.next(GI(o)?"keyboard":"mouse"),this._mostRecentTarget=au(o))},this._onTouchstart=o=>{$I(o)?this._modality.next("keyboard"):(this._lastTouchMs=Date.now(),this._modality.next("touch"),this._mostRecentTarget=au(o))},this._options={...ZZ,...s},this.modalityDetected=this._modality.pipe(yU(1)),this.modalityChanged=this.modalityDetected.pipe(zc()),e.isBrowser&&n.runOutsideAngular(()=>{r.addEventListener("keydown",this._onKeydown,Pm),r.addEventListener("mousedown",this._onMousedown,Pm),r.addEventListener("touchstart",this._onTouchstart,Pm)})}ngOnDestroy(){this._modality.complete(),this._platform.isBrowser&&(document.removeEventListener("keydown",this._onKeydown,Pm),document.removeEventListener("mousedown",this._onMousedown,Pm),document.removeEventListener("touchstart",this._onTouchstart,Pm))}}return i.\u0275fac=function(e){return new(e||i)(ee(zi),ee(ft),ee(qt),ee(KZ,8))},i.\u0275prov=Re({token:i,factory:i.\u0275fac,providedIn:"root"}),i})();const JZ=new me("liveAnnouncerElement",{providedIn:"root",factory:function eQ(){return null}}),tQ=new me("LIVE_ANNOUNCER_DEFAULT_OPTIONS");let nQ=0,WI=(()=>{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 Ie,this._rootNodeFocusAndBlurListener=a=>{for(let c=au(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=Uc(e);if(!this._platform.isBrowser||1!==r.nodeType)return ht(null);const s=function VK(i){if(function UK(){if(null==kI){const i=typeof document<"u"?document.head:null;kI=!(!i||!i.createShadowRoot&&!i.attachShadow)}return kI}()){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 Ie,rootNode:s};return this._elementInfo.set(r,a),this._registerGlobalListeners(a),a.subject}stopMonitoring(e){const n=Uc(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=Uc(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=au(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,UM),n.addEventListener("blur",this._rootNodeFocusAndBlurListener,UM)}),this._rootNodeFocusListenerCount.set(n,r+1),1==++this._monitoredElementCount&&(this._ngZone.runOutsideAngular(()=>{this._getWindow().addEventListener("focus",this._windowFocusListener)}),this._inputModalityDetector.modalityDetected.pipe(He(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,UM),n.removeEventListener("blur",this._rootNodeFocusAndBlurListener,UM),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=Lt(UI).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(jI,kU,PU),this._hasCheckedHighContrastMode=!0;const n=this.getHighContrastMode();1===n?e.add(jI,kU):2===n&&e.add(jI,PU)}}}return i.\u0275fac=function(e){return new(e||i)(ee(zi),ee(qt))},i.\u0275prov=Re({token:i,factory:i.\u0275fac,providedIn:"root"}),i})(),FU=(()=>{class i{constructor(e){e._applyBodyHighContrastModeCssClasses()}}return i.\u0275fac=function(e){return new(e||i)(ee(OU))},i.\u0275mod=en({type:i}),i.\u0275inj=Wt({imports:[BI]}),i})();function rQ(i,t){}class VM{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 LU=(()=>{class i extends kM{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=d=>{this._portalOutlet.hasAttached();const h=this._portalOutlet.attachDomPortal(d);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=IM(),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=IM();return e===n||e.contains(n)}_initializeFocusTrap(){this._focusTrap=this._focusTrapFactory.create(this._elementRef.nativeElement),this._document&&(this._elementFocusedBeforeDialogWasOpened=IM())}_handleBackdropClicks(){this._overlayRef.backdropClick().subscribe(()=>{this._config.disableClose&&this._recaptureFocus()})}}return i.\u0275fac=function(e){return new(e||i)(E(mt),E(HI),E(qt,8),E(VM),E(BM),E(ft),E(Xy),E(Hc))},i.\u0275cmp=st({type:i,selectors:[["cdk-dialog-container"]],viewQuery:function(e,n){if(1&e&&Zn(Sm,7),2&e){let r;Tt(r=It())&&(n._portalOutlet=r.first)}},hostAttrs:["tabindex","-1",1,"cdk-dialog-container"],hostVars:6,hostBindings:function(e,n){2&e&&Dt("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:[lt],decls:1,vars:0,consts:[["cdkPortalOutlet",""]],template:function(e,n){1&e&&fe(0,rQ,0,0,"ng-template",0)},dependencies:[Sm],styles:[".cdk-dialog-container{display:block;width:100%;height:100%;min-height:inherit;max-height:inherit}"],encapsulation:2}),i})();class YI{constructor(t,e){this.overlayRef=t,this.config=e,this.closed=new Ie,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&&!Yo(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 NU=new me("DialogScrollStrategy"),sQ=new me("DialogData"),oQ=new me("DefaultDialogConfig"),lQ={provide:NU,deps:[as],useFactory:function aQ(i){return()=>i.scrollStrategies.block()}};let cQ=0,BU=(()=>{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 Ie,this._afterOpenedAtThisLevel=new Ie,this._ariaHiddenElements=new Map,this.afterAllClosed=My(()=>this.openDialogs.length?this._getAfterAllClosed():this._getAfterAllClosed().pipe(Eo(void 0))),this._scrollStrategy=a}open(e,n){(n={...this._defaultOptions||new VM,...n}).id=n.id||"cdk-dialog-"+cQ++,n.id&&this.getDialogById(n.id);const s=this._getOverlayConfig(n),o=this._overlay.create(s),a=new YI(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(){qI(this.openDialogs,e=>e.close())}getDialogById(e){return this.openDialogs.find(n=>n.id===e)}ngOnDestroy(){qI(this._openDialogsAtThisLevel,e=>{!1===e.config.closeOnDestroy&&this._removeOpenDialog(e,!1)}),qI(this._openDialogsAtThisLevel,e=>e.close()),this._afterAllClosedAtThisLevel.complete(),this._afterOpenedAtThisLevel.complete(),this._openDialogsAtThisLevel=[]}_getOverlayConfig(e){const n=new Im({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:VM,useValue:r},{provide:YI,useValue:n},{provide:Xy,useValue:e}];let a;r.container?"function"==typeof r.container?a=r.container:(a=r.container.type,o.push(...r.container.providers(r))):a=LU;const l=new kh(a,r.viewContainerRef,$i.create({parent:s||this._injector,providers:o}),r.componentFactoryResolver);return e.attach(l).instance}_attachDialogContent(e,n,r,s){if(e instanceof Co){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 Cm(e,null,a,o))}else{const o=this._createInjector(s,n,r,this._injector),a=r.attachComponentPortal(new kh(e,s.viewContainerRef,o,s.componentFactoryResolver));n.componentInstance=a.instance}}_createInjector(e,n,r,s){const o=e.injector||e.viewContainerRef?.injector,a=[{provide:sQ,useValue:e.data},{provide:YI,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(Ta,null,{optional:!0}))&&a.push({provide:Ta,useValue:{value:e.direction,change:ht()}}),$i.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)(ee(as),ee($i),ee(oQ,8),ee(i,12),ee(FM),ee(NU))},i.\u0275prov=Re({token:i,factory:i.\u0275fac}),i})();function qI(i,t){let e=i.length;for(;e--;)t(i[e])}let dQ=(()=>{class i{}return i.\u0275fac=function(e){return new(e||i)},i.\u0275mod=en({type:i}),i.\u0275inj=Wt({providers:[BU,lQ],imports:[Rm,Ph,FU,Ph]}),i})();const uQ=["text"];function hQ(i,t){if(1&i&&Oe(0,"mat-pseudo-checkbox",6),2&i){const e=re();U("state",e.selected?"checked":"unchecked")("disabled",e.disabled)}}function fQ(i,t){1&i&&Oe(0,"mat-pseudo-checkbox",7),2&i&&U("disabled",re().disabled)}function pQ(i,t){if(1&i&&($(0,"span",8),Ve(1),j()),2&i){const e=re();V(1),Xi("(",e.group.label,")")}}const mQ=[[["mat-icon"]],"*"],gQ=["mat-icon","*"],vQ=new me("mat-sanity-checks",{providedIn:"root",factory:function _Q(){return!0}});let Qn=(()=>{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!PI()&&("boolean"==typeof this._sanityChecks?this._sanityChecks:!!this._sanityChecks[e])}}return i.\u0275fac=function(e){return new(e||i)(ee(OU),ee(vQ,8),ee(qt))},i.\u0275mod=en({type:i}),i.\u0275inj=Wt({imports:[Wy,Wy]}),i})();function zM(i){return class extends i{get disabled(){return this._disabled}set disabled(t){this._disabled=tn(t)}constructor(...t){super(...t),this._disabled=!1}}}function Ky(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 HM(i){return class extends i{get disableRipple(){return this._disableRipple}set disableRipple(t){this._disableRipple=tn(t)}constructor(...t){super(...t),this._disableRipple=!1}}}function XI(i,t=0){return class extends i{get tabIndex(){return this.disabled?-1:this._tabIndex}set tabIndex(e){this._tabIndex=null!=e?ks(e):this.defaultTabIndex}constructor(...e){super(...e),this._tabIndex=t,this.defaultTabIndex=t}}}function zU(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 yQ(i){return class extends i{constructor(...t){super(...t),this._isInitialized=!1,this._pendingSubscribers=[],this.initialized=new Tn(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 GU=(()=>{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=Re({token:i,factory:i.\u0275fac,providedIn:"root"}),i})();class xQ{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 $U=Ih({passive:!0,capture:!0});class wQ{constructor(){this._events=new Map,this._delegateEventHandler=t=>{const e=au(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,$U)})}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,$U)))}}const WU={enterDuration:225,exitDuration:150},jU=Ih({passive:!0,capture:!0}),YU=["mousedown","touchstart"],qU=["mouseup","mouseleave","touchend","touchcancel"];class Om{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=Uc(n))}fadeInRipple(t,e,n={}){const r=this._containerRect=this._containerRect||this._containerElement.getBoundingClientRect(),s={...WU,...n.animation};n.centered&&(t=r.left+r.width/2,e=r.top+r.height/2);const o=n.radius||function CQ(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,d=document.createElement("div");d.classList.add("mat-ripple-element"),d.style.left=a-o+"px",d.style.top=l-o+"px",d.style.height=2*o+"px",d.style.width=2*o+"px",null!=n.color&&(d.style.backgroundColor=n.color),d.style.transitionDuration=`${c}ms`,this._containerElement.appendChild(d);const h=window.getComputedStyle(d),m=h.transitionDuration,g="none"===h.transitionProperty||"0s"===m||"0s, 0s"===m||0===r.width&&0===r.height,b=new xQ(this,d,n,g);d.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);d.addEventListener("transitionend",y),d.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={...WU,...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=Uc(t);!this._platform.isBrowser||!e||e===this._triggerElement||(this._removeTriggerEvents(),this._triggerElement=e,YU.forEach(n=>{Om._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(()=>{qU.forEach(e=>{this._triggerElement.addEventListener(e,this,jU)})}),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=GI(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&&(YU.forEach(e=>Om._eventManager.removeHandler(e,t,this)),this._pointerUpEventsRegistered&&qU.forEach(e=>t.removeEventListener(e,this,jU)))}}Om._eventManager=new wQ;const KI=new me("mat-ripple-global-options");let Fh=(()=>{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 Om(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)(E(mt),E(ft),E(zi),E(KI,8),E(kr,8))},i.\u0275dir=ve({type:i,selectors:[["","mat-ripple",""],["","matRipple",""]],hostAttrs:[1,"mat-ripple"],hostVars:2,hostBindings:function(e,n){2&e&&ln("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})(),Qy=(()=>{class i{}return i.\u0275fac=function(e){return new(e||i)},i.\u0275mod=en({type:i}),i.\u0275inj=Wt({imports:[Qn,Qn]}),i})(),SQ=(()=>{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)(E(kr,8))},i.\u0275cmp=st({type:i,selectors:[["mat-pseudo-checkbox"]],hostAttrs:[1,"mat-pseudo-checkbox"],hostVars:12,hostBindings:function(e,n){2&e&&ln("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})(),XU=(()=>{class i{}return i.\u0275fac=function(e){return new(e||i)},i.\u0275mod=en({type:i}),i.\u0275inj=Wt({imports:[Qn]}),i})();const KU=new me("MAT_OPTION_PARENT_COMPONENT"),ZU=new me("MatOptgroup");let EQ=0;class AQ{constructor(t,e=!1){this.source=t,this.isUserInput=e}}let DQ=(()=>{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=tn(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-"+EQ++,this.onSelectionChange=new $e,this._stateChanges=new Ie}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)&&!Yo(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 AQ(this,e))}}return i.\u0275fac=function(e){wo()},i.\u0275dir=ve({type:i,viewQuery:function(e,n){if(1&e&&Zn(uQ,7),2&e){let r;Tt(r=It())&&(n._text=r.first)}},inputs:{value:"value",id:"id",disabled:"disabled"},outputs:{onSelectionChange:"onSelectionChange"}}),i})(),Fm=(()=>{class i extends DQ{constructor(e,n,r,s){super(e,n,r,s)}}return i.\u0275fac=function(e){return new(e||i)(E(mt),E(si),E(KU,8),E(ZU,8))},i.\u0275cmp=st({type:i,selectors:[["mat-option"]],hostAttrs:["role","option",1,"mat-mdc-option","mdc-list-item"],hostVars:11,hostBindings:function(e,n){1&e&&ke("click",function(){return n._selectViaInteraction()})("keydown",function(s){return n._handleKeydown(s)}),2&e&&(zl("id",n.id),Dt("aria-selected",n.selected)("aria-disabled",n.disabled.toString()),ln("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:[lt],ngContentSelectors:gQ,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&&(rr(mQ),fe(0,hQ,1,2,"mat-pseudo-checkbox",0),Yt(1),$(2,"span",1,2),Yt(4,1),j(),fe(5,fQ,1,1,"mat-pseudo-checkbox",3),fe(6,pQ,2,1,"span",4),Oe(7,"div",5)),2&e&&(U("ngIf",n.multiple),V(5),U("ngIf",!n.multiple&&n.selected&&!n.hideSingleSelectionIndicator),V(1),U("ngIf",n.group&&n.group._inert),V(1),U("matRippleTrigger",n._getHostElement())("matRippleDisabled",n.disabled||n.disableRipple))},dependencies:[Fh,vi,SQ],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})(),ZI=(()=>{class i{}return i.\u0275fac=function(e){return new(e||i)},i.\u0275mod=en({type:i}),i.\u0275inj=Wt({imports:[Qy,ao,Qn,XU]}),i})();class QU{}class RQ{}const Gc="*";function Ia(i,t){return{type:7,name:i,definitions:t,options:{}}}function Yr(i,t=null){return{type:4,styles:t,timings:i}}function eV(i,t=null){return{type:2,steps:i,options:t}}function oi(i){return{type:6,styles:i,offset:null}}function Ps(i,t,e){return{type:0,name:i,styles:t,options:e}}function tV(i){return{type:5,steps:i}}function Or(i,t,e=null){return{type:1,expr:i,animation:t,options:e}}function QI(i=null){return{type:9,options:i}}function JI(i,t,e=null){return{type:11,selector:i,animation:t,options:e}}function nV(i){Promise.resolve().then(i)}class Jy{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(){nV(()=>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 iV{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?nV(()=>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 eR="!";function kQ(i,t){}class GM{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 tR="mdc-dialog--open",rV="mdc-dialog--opening",sV="mdc-dialog--closing";let FQ=(()=>{class i extends LU{constructor(e,n,r,s,o,a,l,c){super(e,n,r,s,o,a,l,c),this._animationStateChanged=new $e}_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)(E(mt),E(HI),E(qt,8),E(GM),E(BM),E(ft),E(Xy),E(Hc))},i.\u0275cmp=st({type:i,selectors:[["ng-component"]],features:[lt],decls:0,vars:0,template:function(e,n){},encapsulation:2}),i})();const oV="--mat-dialog-transition-duration";function aV(i){return null==i?null:"number"==typeof i?i:i.endsWith("ms")?ks(i.substring(0,i.length-2)):i.endsWith("s")?1e3*ks(i.substring(0,i.length-1)):"0"===i?0:null}let LQ=(()=>{class i extends FQ{constructor(e,n,r,s,o,a,l,c,d){super(e,n,r,s,o,a,l,d),this._animationMode=c,this._animationsEnabled="NoopAnimations"!==this._animationMode,this._hostElement=this._elementRef.nativeElement,this._openAnimationDuration=this._animationsEnabled?aV(this._config.enterAnimationDuration)??150:0,this._closeAnimationDuration=this._animationsEnabled?aV(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(oV,`${this._openAnimationDuration}ms`),this._requestAnimationFrame(()=>this._hostElement.classList.add(rV,tR)),this._waitForAnimationToComplete(this._openAnimationDuration,this._finishDialogOpen)):(this._hostElement.classList.add(tR),Promise.resolve().then(()=>this._finishDialogOpen()))}_startExitAnimation(){this._animationStateChanged.emit({state:"closing",totalTime:this._closeAnimationDuration}),this._hostElement.classList.remove(tR),this._animationsEnabled?(this._hostElement.style.setProperty(oV,`${this._openAnimationDuration}ms`),this._requestAnimationFrame(()=>this._hostElement.classList.add(sV)),this._waitForAnimationToComplete(this._closeAnimationDuration,this._finishDialogClose)):Promise.resolve().then(()=>this._finishDialogClose())}_clearAnimationClasses(){this._hostElement.classList.remove(rV,sV)}_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)(E(mt),E(HI),E(qt,8),E(GM),E(BM),E(ft),E(Xy),E(kr,8),E(Hc))},i.\u0275cmp=st({type:i,selectors:[["mat-dialog-container"]],hostAttrs:["tabindex","-1",1,"mat-mdc-dialog-container","mdc-dialog"],hostVars:8,hostBindings:function(e,n){2&e&&(zl("id",n._config.id),Dt("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),ln("_mat-animation-noopable",!n._animationsEnabled))},features:[lt],decls:3,vars:0,consts:[[1,"mdc-dialog__container"],[1,"mat-mdc-dialog-surface","mdc-dialog__surface"],["cdkPortalOutlet",""]],template:function(e,n){1&e&&($(0,"div",0)(1,"div",1),fe(2,kQ,0,0,"ng-template",2),j()())},dependencies:[Sm],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 eb{constructor(t,e,n){this._ref=t,this._containerInstance=n,this._afterOpened=new Ie,this._beforeClosed=new Ie,this._state=0,this.disableClose=e.disableClose,this.id=t.id,n._animationStateChanged.pipe(vn(r=>"opened"===r.state),Oi(1)).subscribe(()=>{this._afterOpened.next(),this._afterOpened.complete()}),n._animationStateChanged.pipe(vn(r=>"closed"===r.state),Oi(1)).subscribe(()=>{clearTimeout(this._closeFallbackTimeout),this._finishDialogClose()}),t.overlayRef.detachments().subscribe(()=>{this._beforeClosed.next(this._result),this._beforeClosed.complete(),this._finishDialogClose()}),Cr(this.backdropClick(),this.keydownEvents().pipe(vn(r=>27===r.keyCode&&!this.disableClose&&!Yo(r)))).subscribe(r=>{this.disableClose||(r.preventDefault(),lV(this,"keydown"===r.type?"keyboard":"mouse"))})}close(t){this._result=t,this._containerInstance._animationStateChanged.pipe(vn(e=>"closing"===e.state),Oi(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 lV(i,t,e){return i._closeInteractionType=t,i.close(e)}const nR=new me("MatMdcDialogData"),NQ=new me("mat-mdc-dialog-default-options"),cV=new me("mat-mdc-dialog-scroll-strategy"),UQ={provide:cV,deps:[as],useFactory:function BQ(i){return()=>i.scrollStrategies.block()}};let VQ=0,zQ=(()=>{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,d,h){this._overlay=e,this._defaultOptions=r,this._parentDialog=s,this._dialogRefConstructor=l,this._dialogContainerType=c,this._dialogDataToken=d,this._openDialogsAtThisLevel=[],this._afterAllClosedAtThisLevel=new Ie,this._afterOpenedAtThisLevel=new Ie,this._idPrefix="mat-dialog-",this.dialogConfigClass=GM,this.afterAllClosed=My(()=>this.openDialogs.length?this._getAfterAllClosed():this._getAfterAllClosed().pipe(Eo(void 0))),this._scrollStrategy=a,this._dialog=n.get(BU)}open(e,n){let r;(n={...this._defaultOptions||new GM,...n}).id=n.id||`${this._idPrefix}${VQ++}`,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:VM,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){wo()},i.\u0275prov=Re({token:i,factory:i.\u0275fac}),i})(),Lm=(()=>{class i extends zQ{constructor(e,n,r,s,o,a,l,c){super(e,n,s,a,l,o,eb,LQ,nR,c),this._idPrefix="mat-mdc-dialog-"}}return i.\u0275fac=function(e){return new(e||i)(ee(as),ee($i),ee(py,8),ee(NQ,8),ee(cV),ee(i,12),ee(FM),ee(kr,8))},i.\u0275prov=Re({token:i,factory:i.\u0275fac}),i})(),HQ=0,GQ=(()=>{class i{constructor(e,n,r){this.dialogRef=e,this._elementRef=n,this._dialog=r,this.type="button"}ngOnInit(){this.dialogRef||(this.dialogRef=fV(this._elementRef,this._dialog.openDialogs))}ngOnChanges(e){const n=e._matDialogClose||e._matDialogCloseResult;n&&(this.dialogResult=n.currentValue)}_onButtonClick(e){lV(this.dialogRef,0===e.screenX&&0===e.screenY?"keyboard":"mouse",this.dialogResult)}}return i.\u0275fac=function(e){return new(e||i)(E(eb,8),E(mt),E(Lm))},i.\u0275dir=ve({type:i,selectors:[["","mat-dialog-close",""],["","matDialogClose",""]],hostVars:2,hostBindings:function(e,n){1&e&&ke("click",function(s){return n._onButtonClick(s)}),2&e&&Dt("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:[xi]}),i})(),dV=(()=>{class i{constructor(e,n,r){this._dialogRef=e,this._elementRef=n,this._dialog=r,this.id="mat-mdc-dialog-title-"+HQ++}ngOnInit(){this._dialogRef||(this._dialogRef=fV(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)(E(eb,8),E(mt),E(Lm))},i.\u0275dir=ve({type:i,selectors:[["","mat-dialog-title",""],["","matDialogTitle",""]],hostAttrs:[1,"mat-mdc-dialog-title","mdc-dialog__title"],hostVars:1,hostBindings:function(e,n){2&e&&zl("id",n.id)},inputs:{id:"id"},exportAs:["matDialogTitle"]}),i})(),uV=(()=>{class i{}return i.\u0275fac=function(e){return new(e||i)},i.\u0275dir=ve({type:i,selectors:[["","mat-dialog-content",""],["mat-dialog-content"],["","matDialogContent",""]],hostAttrs:[1,"mat-mdc-dialog-content","mdc-dialog__content"]}),i})(),hV=(()=>{class i{constructor(){this.align="start"}}return i.\u0275fac=function(e){return new(e||i)},i.\u0275dir=ve({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&&ln("mat-mdc-dialog-actions-align-center","center"===n.align)("mat-mdc-dialog-actions-align-end","end"===n.align)},inputs:{align:"align"}}),i})();function fV(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 pV=(()=>{class i{}return i.\u0275fac=function(e){return new(e||i)},i.\u0275mod=en({type:i}),i.\u0275inj=Wt({providers:[Lm,UQ],imports:[dQ,Rm,Ph,Qn,Qn]}),i})();const $Q=["mat-button",""],gV=[[["",8,"material-icons",3,"iconPositionEnd",""],["mat-icon",3,"iconPositionEnd",""],["","matButtonIcon","",3,"iconPositionEnd",""]],"*",[["","iconPositionEnd","",8,"material-icons"],["mat-icon","iconPositionEnd",""],["","matButtonIcon","","iconPositionEnd",""]]],_V=[".material-icons:not([iconPositionEnd]), mat-icon:not([iconPositionEnd]), [matButtonIcon]:not([iconPositionEnd])","*",".material-icons[iconPositionEnd], mat-icon[iconPositionEnd], [matButtonIcon][iconPositionEnd]"],jQ=["mat-mini-fab",""],qQ=["mat-icon-button",""],XQ=["*"],KQ=[{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"]}],ZQ=Ky(zM(HM(class{constructor(i){this._elementRef=i}})));let iR=(()=>{class i extends ZQ{constructor(e,n,r,s){super(e),this._platform=n,this._ngZone=r,this._animationMode=s,this._focusMonitor=Lt(Hc),this._isFab=!1;const o=e.nativeElement.classList;for(const a of KQ)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){wo()},i.\u0275dir=ve({type:i,viewQuery:function(e,n){if(1&e&&Zn(Fh,5),2&e){let r;Tt(r=It())&&(n.ripple=r.first)}},features:[lt]}),i})(),$M=(()=>{class i extends iR{constructor(e,n,r,s){super(e,n,r,s)}}return i.\u0275fac=function(e){return new(e||i)(E(mt),E(zi),E(ft),E(kr,8))},i.\u0275cmp=st({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&&(Dt("disabled",n.disabled||null),ln("_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:[lt],attrs:$Q,ngContentSelectors:_V,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&&(rr(gV),Oe(0,"span",0),Yt(1),$(2,"span",1),Yt(3,1),j(),Yt(4,2),Oe(5,"span",2)(6,"span",3)(7,"span",4)),2&e&&(ln("mdc-button__ripple",!n._isFab)("mdc-fab__ripple",n._isFab),V(6),U("matRippleDisabled",n._isRippleDisabled())("matRippleTrigger",n._elementRef.nativeElement))},dependencies:[Fh],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 JQ=new me("mat-mdc-fab-default-options",{providedIn:"root",factory:vV});function vV(){return{color:"accent"}}const yV=vV();let bV=(()=>{class i extends iR{constructor(e,n,r,s,o){super(e,n,r,s),this._options=o,this._isFab=!0,this._options=this._options||yV,this.color=this.defaultColor=this._options.color||yV.color}}return i.\u0275fac=function(e){return new(e||i)(E(mt),E(zi),E(ft),E(kr,8),E(JQ,8))},i.\u0275cmp=st({type:i,selectors:[["button","mat-mini-fab",""]],hostVars:7,hostBindings:function(e,n){2&e&&(Dt("disabled",n.disabled||null),ln("_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:[lt],attrs:jQ,ngContentSelectors:_V,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&&(rr(gV),Oe(0,"span",0),Yt(1),$(2,"span",1),Yt(3,1),j(),Yt(4,2),Oe(5,"span",2)(6,"span",3)(7,"span",4)),2&e&&(ln("mdc-button__ripple",!n._isFab)("mdc-fab__ripple",n._isFab),V(6),U("matRippleDisabled",n._isRippleDisabled())("matRippleTrigger",n._elementRef.nativeElement))},dependencies:[Fh],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})(),WM=(()=>{class i extends iR{constructor(e,n,r,s){super(e,n,r,s)}}return i.\u0275fac=function(e){return new(e||i)(E(mt),E(zi),E(ft),E(kr,8))},i.\u0275cmp=st({type:i,selectors:[["button","mat-icon-button",""]],hostVars:7,hostBindings:function(e,n){2&e&&(Dt("disabled",n.disabled||null),ln("_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:[lt],attrs:qQ,ngContentSelectors:XQ,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&&(rr(),Oe(0,"span",0),Yt(1),Oe(2,"span",1)(3,"span",2)(4,"span",3)),2&e&&(V(3),U("matRippleDisabled",n._isRippleDisabled())("matRippleCentered",!0)("matRippleTrigger",n._elementRef.nativeElement))},dependencies:[Fh],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=en({type:i}),i.\u0275inj=Wt({imports:[Qn,Qy,Qn]}),i})();const eJ=["class","dialog"];let xV=(()=>{class i{constructor(e,n){this.dialogRef=e,this.data=n}}return i.\u0275fac=function(e){return new(e||i)(E(eb),E(nR))},i.\u0275cmp=st({type:i,selectors:[["app-confirm",8,"dialog"]],attrs:eJ,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&&($(0,"h1",0),Ve(1,"Confirmation"),j(),$(2,"div",1)(3,"p"),Ve(4),j()(),$(5,"div",2)(6,"button",3),ke("click",function(){return n.dialogRef.close()}),Ve(7,"Cancel"),j(),$(8,"button",4),Ve(9,"Yes"),j()()),2&e&&(V(4),ui(n.data.text),V(4),U("mat-dialog-close",!0))},dependencies:[$M,GQ,dV,uV,hV]}),i})();function rR(i,t){const e="object"==typeof t;return new Promise((n,r)=>{const s=new la({next:o=>{n(o),s.unsubscribe()},error:r,complete:()=>{e?n(t.defaultValue):r(new um)}});i.subscribe(s)})}let $c=(()=>{class i{constructor(e){this.ngZone=e,this.openedResource$=new at(null),this.openedResourcePath$=new at(null),eel.expose(this.wrapHandler(this.openFile),"open_file"),eel.on_angular_ready(),setTimeout(xt(function*(){for(;;){if(eel._websocket){eel._websocket.onclose=()=>window.close();break}yield new Promise(n=>setTimeout(n,0))}}),0)}wrapHandler(e){return(...n)=>{try{ft.assertInAngularZone(),e.bind(this)(...n)}catch{this.ngZone.run(e,this,n)}}}openFile(e,n=!1){var r=this;return xt(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 xt(function*(){yield eel.open_file_with_system_app(e)()})()}retrieveValue(e){return xt(function*(){return yield eel.retrieve_value(e)()})()}runCustomAction(e,n,r){return xt(function*(){return eel.run_custom_action(e,n,r)()})()}saveFile(e){var n=this;return xt(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 xt(function*(){return eel.serialize_resource(e,n)()})()}serializeResourceTmp(e,n,r={}){return xt(function*(){return eel.serialize_resource_tmp(e,n,r)()})()}serializeReversible(e,n){return xt(function*(){return eel.serialize_reversible(e,n)()})()}deserializeResource(e){return xt(function*(){return eel.deserialize_resource(e)()})()}}return i.\u0275fac=function(e){return new(e||i)(ee(ft))},i.\u0275prov=Re({token:i,factory:i.\u0275fac,providedIn:"root"}),i})();var sR=ps(489);const wV=i=>!(!i||"object"!=typeof i),MV=(i={},t,e,n=[])=>{const r=[];if(wV(i)){const s=Object.entries(i);for(let o=0;o{class i{constructor(e){var n=this;this.eelDelegate=e,this._hasUnsavedChanges$=new at(!1),this.resource$=new at(null),this.error$=new at(null),this.customActionRunning$=new at(!1),this.changedDataBlocks={},this.dataBlockChange$=new Ie,this.hideHiddenFields$=new at(!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=MV(r.schema,"is_recursive_ref",!0);for(const[o,a]of s){const l=o.block_class_mro;let c=r.schema,d=c.block_class_mro===l?c:void 0;for(const h of a.slice(0,a.length-1))!d&&c[h]?.block_class_mro===l&&(d=c[h]),c=c[h];c[a[a.length-1]]=d}this.resource$.next(r),this.error$.next(null)}else this.resource$.next(null),this.error$.next(null)}),this.dataBlockChange$.subscribe(function(){var r=xt(function*([s,o]){n.changedDataBlocks[s]=o,n.updateUnsavedChanges();const a=yield n.eelDelegate.retrieveValue(s);n.changedDataBlocks[s]==o&&((0,sR.isNumber)(o)?Math.abs(o-a)<1e-10:(0,sR.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 xt(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 xt(function*(){return s.processExternalChanges(e,()=>s.eelDelegate.runCustomAction(e,n,r))})()}deserializeResource(e){var n=this;return xt(function*(){return n.processExternalChanges(e,()=>n.eelDelegate.deserializeResource(e))})()}reloadResource(){var e=this;return xt(function*(){const n=e.eelDelegate.openedResourcePath$.getValue();n&&e.eelDelegate.openFile(n,!0).then()})()}saveResource(){var e=this;return xt(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)(ee($c))},i.\u0275prov=Re({token:i,factory:i.\u0275fac,providedIn:"root"}),i})();function tJ(i,t){if(1&i){const e=Kn();$(0,"div",2)(1,"button",3),ke("click",function(){return Ht(e),Et(re().action())}),Ve(2),j()()}if(2&i){const e=re();V(2),Xi(" ",e.data.action," ")}}const nJ=["label"];function iJ(i,t){}const rJ=Math.pow(2,31)-1;class oR{constructor(t,e){this._overlayRef=e,this._afterDismissed=new Ie,this._afterOpened=new Ie,this._onAction=new Ie,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,rJ))}_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 CV=new me("MatSnackBarData");class YM{constructor(){this.politeness="assertive",this.announcementMessage="",this.duration=0,this.data=null,this.horizontalPosition="center",this.verticalPosition="bottom"}}let sJ=(()=>{class i{}return i.\u0275fac=function(e){return new(e||i)},i.\u0275dir=ve({type:i,selectors:[["","matSnackBarLabel",""]],hostAttrs:[1,"mat-mdc-snack-bar-label","mdc-snackbar__label"]}),i})(),oJ=(()=>{class i{}return i.\u0275fac=function(e){return new(e||i)},i.\u0275dir=ve({type:i,selectors:[["","matSnackBarActions",""]],hostAttrs:[1,"mat-mdc-snack-bar-actions","mdc-snackbar__actions"]}),i})(),aJ=(()=>{class i{}return i.\u0275fac=function(e){return new(e||i)},i.\u0275dir=ve({type:i,selectors:[["","matSnackBarAction",""]],hostAttrs:[1,"mat-mdc-snack-bar-action","mdc-snackbar__action"]}),i})(),lJ=(()=>{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)(E(oR),E(CV))},i.\u0275cmp=st({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&&($(0,"div",0),Ve(1),j(),fe(2,tJ,3,1,"div",1)),2&e&&(V(1),Xi(" ",n.data.message,"\n"),V(1),U("ngIf",n.hasAction))},dependencies:[vi,$M,sJ,oJ,aJ],styles:[".mat-mdc-simple-snack-bar{display:flex}"],encapsulation:2,changeDetection:0}),i})();const cJ={snackBarState:Ia("state",[Ps("void, hidden",oi({transform:"scale(0.8)",opacity:0})),Ps("visible",oi({transform:"scale(1)",opacity:1})),Or("* => visible",Yr("150ms cubic-bezier(0, 0, 0.2, 1)")),Or("* => void, * => hidden",Yr("75ms cubic-bezier(0.4, 0.0, 1, 1)",oi({opacity:0})))])};let dJ=0,uJ=(()=>{class i extends kM{constructor(e,n,r,s,o){super(),this._ngZone=e,this._elementRef=n,this._changeDetectorRef=r,this._platform=s,this.snackBarConfig=o,this._document=Lt(qt),this._trackedModals=new Set,this._announceDelay=150,this._destroyed=!1,this._onAnnounce=new Ie,this._onExit=new Ie,this._onEnter=new Ie,this._animationState="void",this._liveElementId="mat-snack-bar-container-live-"+dJ++,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(Oi(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)(E(ft),E(mt),E(si),E(zi),E(YM))},i.\u0275dir=ve({type:i,viewQuery:function(e,n){if(1&e&&Zn(Sm,7),2&e){let r;Tt(r=It())&&(n._portalOutlet=r.first)}},features:[lt]}),i})(),hJ=(()=>{class i extends uJ{_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=ri(i)))(n||i)}}(),i.\u0275cmp=st({type:i,selectors:[["mat-snack-bar-container"]],viewQuery:function(e,n){if(1&e&&Zn(nJ,7),2&e){let r;Tt(r=It())&&(n._label=r.first)}},hostAttrs:[1,"mdc-snackbar","mat-mdc-snack-bar-container","mdc-snackbar--open"],hostVars:1,hostBindings:function(e,n){1&e&&PD("@state.done",function(s){return n.onAnimationEnd(s)}),2&e&&Ew("@state",n._animationState)},features:[lt],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&&($(0,"div",0)(1,"div",1,2)(3,"div",3),fe(4,iJ,0,0,"ng-template",4),j(),Oe(5,"div"),j()()),2&e&&(V(5),Dt("aria-live",n._live)("role",n._role)("id",n._liveElementId))},dependencies:[Sm],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:[cJ.snackBarState]}}),i})(),SV=(()=>{class i{}return i.\u0275fac=function(e){return new(e||i)},i.\u0275mod=en({type:i}),i.\u0275inj=Wt({imports:[Rm,Ph,ao,jM,Qn,Qn]}),i})();const EV=new me("mat-snack-bar-default-options",{providedIn:"root",factory:function fJ(){return new YM}});let pJ=(()=>{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=$i.create({parent:n&&n.viewContainerRef&&n.viewContainerRef.injector||this._injector,providers:[{provide:YM,useValue:n}]}),o=new kh(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 oR(o,s);if(e instanceof Co){const l=new Cm(e,null,{$implicit:r.data,snackBarRef:a});a.instance=o.attachTemplatePortal(l)}else{const l=this._createInjector(r,a),c=new kh(e,void 0,l),d=o.attachComponentPortal(c);a.instance=d.instance}return this._breakpointObserver.observe("(max-width: 599.98px) and (orientation: portrait)").pipe(He(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 Im;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 $i.create({parent:e&&e.viewContainerRef&&e.viewContainerRef.injector||this._injector,providers:[{provide:oR,useValue:n},{provide:CV,useValue:e.data}]})}}return i.\u0275fac=function(e){return new(e||i)(ee(as),ee(WI),ee($i),ee(UI),ee(i,12),ee(EV))},i.\u0275prov=Re({token:i,factory:i.\u0275fac}),i})(),AV=(()=>{class i extends pJ{constructor(e,n,r,s,o,a){super(e,n,r,s,o,a),this.simpleSnackBarComponent=lJ,this.snackBarContainerComponent=hJ,this.handsetCssClass="mat-mdc-snack-bar-handset"}}return i.\u0275fac=function(e){return new(e||i)(ee(as),ee(WI),ee($i),ee(UI),ee(i,12),ee(EV))},i.\u0275prov=Re({token:i,factory:i.\u0275fac,providedIn:SV}),i})();const mJ=["*",[["mat-toolbar-row"]]],gJ=["*","mat-toolbar-row"],_J=Ky(class{constructor(i){this._elementRef=i}});let vJ=(()=>{class i{}return i.\u0275fac=function(e){return new(e||i)},i.\u0275dir=ve({type:i,selectors:[["mat-toolbar-row"]],hostAttrs:[1,"mat-toolbar-row"],exportAs:["matToolbarRow"]}),i})(),yJ=(()=>{class i extends _J{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)(E(mt),E(zi),E(qt))},i.\u0275cmp=st({type:i,selectors:[["mat-toolbar"]],contentQueries:function(e,n,r){if(1&e&&Wi(r,vJ,5),2&e){let s;Tt(s=It())&&(n._toolbarRows=s)}},hostAttrs:[1,"mat-toolbar"],hostVars:4,hostBindings:function(e,n){2&e&&ln("mat-toolbar-multiple-rows",n._toolbarRows.length>0)("mat-toolbar-single-row",0===n._toolbarRows.length)},inputs:{color:"color"},exportAs:["matToolbar"],features:[lt],ngContentSelectors:gJ,decls:2,vars:0,template:function(e,n){1&e&&(rr(mJ),Yt(0),Yt(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})(),bJ=(()=>{class i{}return i.\u0275fac=function(e){return new(e||i)},i.\u0275mod=en({type:i}),i.\u0275inj=Wt({imports:[Qn,Qn]}),i})(),xJ=(()=>{class i{constructor(){this._vertical=!1,this._inset=!1}get vertical(){return this._vertical}set vertical(e){this._vertical=tn(e)}get inset(){return this._inset}set inset(e){this._inset=tn(e)}}return i.\u0275fac=function(e){return new(e||i)},i.\u0275cmp=st({type:i,selectors:[["mat-divider"]],hostAttrs:["role","separator",1,"mat-divider"],hostVars:7,hostBindings:function(e,n){2&e&&(Dt("aria-orientation",n.vertical?"vertical":"horizontal"),ln("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})(),DV=(()=>{class i{}return i.\u0275fac=function(e){return new(e||i)},i.\u0275mod=en({type:i}),i.\u0275inj=Wt({imports:[Qn,Qn]}),i})();const wJ=["tooltip"],TV=new me("mat-tooltip-scroll-strategy"),SJ={provide:TV,deps:[as],useFactory:function CJ(i){return()=>i.scrollStrategies.reposition({scrollThrottle:20})}},AJ=new me("mat-tooltip-default-options",{providedIn:"root",factory:function EJ(){return{showDelay:0,hideDelay:0,touchendHideDelay:1500}}}),IV="tooltip-panel",RV=Ih({passive:!0});let PJ=(()=>{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=tn(e),this._detach(),this._overlayRef=null}get disabled(){return this._disabled}set disabled(e){this._disabled=tn(e),this._disabled?this.hide(0):this._setupPointerEnterEventsIfNeeded()}get showDelay(){return this._showDelay}set showDelay(e){this._showDelay=ks(e)}get hideDelay(){return this._hideDelay}set hideDelay(e){this._hideDelay=ks(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,d,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 Ie,this._scrollStrategy=d,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(He(this._destroyed)).subscribe(()=>{this._overlayRef&&this._updatePosition(this._overlayRef)})}ngAfterViewInit(){this._viewInitialized=!0,this._setupPointerEnterEventsIfNeeded(),this._focusMonitor.monitor(this._elementRef).pipe(He(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,RV)}),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 kh(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(He(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 mt)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(He(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}-${IV}`,scrollStrategy:this._scrollStrategy()}),this._updatePosition(this._overlayRef),this._overlayRef.detachments().pipe(He(this._destroyed)).subscribe(()=>this._detach()),this._overlayRef.outsidePointerEvents().pipe(He(this._destroyed)).subscribe(()=>this._tooltipInstance?._handleBodyInteraction()),this._overlayRef.keydownEvents().pipe(He(this._destroyed)).subscribe(s=>{this._isTooltipVisible()&&27===s.keyCode&&!Yo(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(Oi(1),He(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}-${IV}-`;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,RV)})}_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){wo()},i.\u0275dir=ve({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})(),Os=(()=>{class i extends PJ{constructor(e,n,r,s,o,a,l,c,d,h,p,m){super(e,n,r,s,o,a,l,c,d,h,p,m),this._tooltipComponent=FJ,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)(E(as),E(mt),E(jy),E(jr),E(ft),E(zi),E(NZ),E(Hc),E(TV),E(Ta,8),E(AJ,8),E(qt))},i.\u0275dir=ve({type:i,selectors:[["","matTooltip",""]],hostAttrs:[1,"mat-mdc-tooltip-trigger"],exportAs:["matTooltip"],features:[lt]}),i})(),OJ=(()=>{class i{constructor(e,n){this._changeDetectorRef=e,this._closeOnInteraction=!1,this._isVisible=!1,this._onHide=new Ie,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)(E(si),E(kr,8))},i.\u0275dir=ve({type:i}),i})(),FJ=(()=>{class i extends OJ{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)(E(si),E(mt),E(kr,8))},i.\u0275cmp=st({type:i,selectors:[["mat-tooltip-component"]],viewQuery:function(e,n){if(1&e&&Zn(wJ,7),2&e){let r;Tt(r=It())&&(n._tooltip=r.first)}},hostAttrs:["aria-hidden","true"],hostVars:2,hostBindings:function(e,n){1&e&&ke("mouseleave",function(s){return n._handleMouseLeave(s)}),2&e&&$o("zoom",n.isVisible()?1:null)},features:[lt],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&&($(0,"div",0,1),ke("animationend",function(s){return n._handleAnimationEnd(s)}),$(2,"div",2),Ve(3),j()()),2&e&&(ln("mdc-tooltip--multiline",n._isMultiline),U("ngClass",n.tooltipClass),V(3),ui(n.message))},dependencies:[dm],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})(),kV=(()=>{class i{}return i.\u0275fac=function(e){return new(e||i)},i.\u0275mod=en({type:i}),i.\u0275inj=Wt({providers:[SJ],imports:[FU,ao,Rm,Qn,Qn,Yy]}),i})();function PV(...i){const t=v0(i),{args:e,keys:n}=NB(i),r=new Tn(s=>{const{length:o}=e;if(!o)return void s.complete();const a=new Array(o);let l=o,c=o;for(let d=0;d{h||(h=!0,c--),a[d]=p},()=>l--,void 0,()=>{(!l||!h)&&(c||s.next(n?BB(n,a):a),s.complete())}))}});return t?r.pipe(XT(t)):r}class aR{}class cu{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 cu?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 cu;return e.lazyInit=this.lazyInit&&this.lazyInit instanceof cu?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 LJ{encodeKey(t){return FV(t)}encodeValue(t){return FV(t)}decodeKey(t){return decodeURIComponent(t)}decodeValue(t){return decodeURIComponent(t)}}const BJ=/%(\d[a-f0-9])/gi,UJ={40:"@","3A":":",24:"$","2C":",","3B":";","3D":"=","3F":"?","2F":"/"};function FV(i){return encodeURIComponent(i).replace(BJ,(t,e)=>UJ[e]??t)}function qM(i){return`${i}`}class du{constructor(t={}){if(this.updates=null,this.cloneFrom=null,this.encoder=t.encoder||new LJ,t.fromString){if(t.fromObject)throw new Error("Cannot specify both fromString and fromObject.");this.map=function NJ(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 du({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 VJ{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 LV(i){return typeof ArrayBuffer<"u"&&i instanceof ArrayBuffer}function NV(i){return typeof Blob<"u"&&i instanceof Blob}function BV(i){return typeof FormData<"u"&&i instanceof FormData}class tb{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 zJ(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 cu),this.context||(this.context=new VJ),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 tb(e,n,s,{params:c,headers:l,context:d,reportProgress:a,responseType:r,withCredentials:o})}}var ls=(()=>((ls=ls||{})[ls.Sent=0]="Sent",ls[ls.UploadProgress=1]="UploadProgress",ls[ls.ResponseHeader=2]="ResponseHeader",ls[ls.DownloadProgress=3]="DownloadProgress",ls[ls.Response=4]="Response",ls[ls.User=5]="User",ls))();class GJ{constructor(t,e=200,n="OK"){this.headers=t.headers||new cu,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 lR extends GJ{constructor(t={}){super(t),this.type=ls.Response,this.body=void 0!==t.body?t.body:null}clone(t={}){return new lR({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 cR(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 dR=(()=>{class i{constructor(e){this.handler=e}request(e,n,r={}){let s;if(e instanceof tb)s=e;else{let l,c;l=r.headers instanceof cu?r.headers:new cu(r.headers),r.params&&(c=r.params instanceof du?r.params:new du({fromObject:r.params})),s=new tb(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=ht(s).pipe(nu(l=>this.handler.handle(l)));if(e instanceof tb||"events"===r.observe)return o;const a=o.pipe(vn(l=>l instanceof lR));switch(r.observe||"body"){case"body":switch(s.responseType){case"arraybuffer":return a.pipe(et(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(et(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(et(l=>{if(null!==l.body&&"string"!=typeof l.body)throw new Error("Response is not a string.");return l.body}));default:return a.pipe(et(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 du).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,cR(r,n))}post(e,n,r={}){return this.request("POST",e,cR(r,n))}put(e,n,r={}){return this.request("PUT",e,cR(r,n))}}return i.\u0275fac=function(e){return new(e||i)(ee(aR))},i.\u0275prov=Re({token:i,factory:i.\u0275fac}),i})();const nee=["*"];let KM;function nb(i){return function iee(){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 jV(i){return Error(`Unable to find icon with the name "${i}"`)}function YV(i){return Error(`The URL provided to MatIconRegistry was not trusted as a resource URL via Angular's DomSanitizer. Attempted URL was "${i}".`)}function qV(i){return Error(`The literal provided to MatIconRegistry was not trusted as safe HTML by Angular's DomSanitizer. Attempted literal was "${i}".`)}class Lh{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 Lh(r,null,s))}addSvgIconResolver(e){return this._resolvers.push(e),this}addSvgIconLiteralInNamespace(e,n,r,s){const o=this._sanitizer.sanitize(Xn.HTML,r);if(!o)throw qV(r);const a=nb(o);return this._addSvgIconConfig(e,n,new Lh("",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 Lh(n,null,r))}addSvgIconSetLiteralInNamespace(e,n,r){const s=this._sanitizer.sanitize(Xn.HTML,n);if(!s)throw qV(n);const o=nb(s);return this._addSvgIconSetConfig(e,new Lh("",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(Xn.RESOURCE_URL,e);if(!n)throw YV(e);const r=this._cachedIconsByUrl.get(n);return r?ht(QM(r)):this._loadSvgIconFromConfig(new Lh(e,null)).pipe(Vi(s=>this._cachedIconsByUrl.set(n,s)),et(s=>QM(s)))}getNamedSvgIcon(e,n=""){const r=XV(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):hm(jV(r))}ngOnDestroy(){this._resolvers=[],this._svgIconConfigs.clear(),this._iconSetConfigs.clear(),this._cachedIconsByUrl.clear()}_getSvgFromConfig(e){return e.svgText?ht(QM(this._svgElementFromConfig(e))):this._loadSvgIconFromConfig(e).pipe(et(n=>QM(n)))}_getSvgFromIconSetConfigs(e,n){const r=this._extractIconWithNameFromAnySet(e,n);return r?ht(r):PV(n.filter(o=>!o.svgText).map(o=>this._loadSvgIconSetFromConfig(o).pipe(Nc(a=>{const c=`Loading icon set URL: ${this._sanitizer.sanitize(Xn.RESOURCE_URL,o.url)} failed: ${a.message}`;return this._errorHandler.handleError(new Error(c)),ht(null)})))).pipe(et(()=>{const o=this._extractIconWithNameFromAnySet(e,n);if(!o)throw jV(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(Vi(n=>e.svgText=n),et(()=>this._svgElementFromConfig(e)))}_loadSvgIconSetFromConfig(e){return e.svgText?ht(null):this._fetchIcon(e).pipe(Vi(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(nb(""));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(nb("")),r=e.attributes;for(let s=0;snb(c)),iu(()=>this._inProgressUrlFetches.delete(o)),Bf());return this._inProgressUrlFetches.set(o,l),l}_addSvgIconConfig(e,n,r){return this._svgIconConfigs.set(XV(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:""}}}),KV=["clip-path","color-profile","src","cursor","fill","filter","marker","marker-start","marker-mid","marker-end","mask","stroke"],uee=KV.map(i=>`[${i}]`).join(", "),hee=/^url\(['"]?#(.*?)['"]?\)$/;let hR=(()=>{class i extends aee{get inline(){return this._inline}set inline(e){this._inline=tn(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=Qt.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(uee),r=this._elementsWithExternalReferences=this._elementsWithExternalReferences||new Map;for(let s=0;s{const a=n[s],l=a.getAttribute(o),c=l?l.match(hee):null;if(c){let d=r.get(a);d||(d=[],r.set(a,d)),d.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(Oi(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)(E(mt),E(ZM),_a("aria-hidden"),E(cee),E(rl),E(lee,8))},i.\u0275cmp=st({type:i,selectors:[["mat-icon"]],hostAttrs:["role","img",1,"mat-icon","notranslate"],hostVars:8,hostBindings:function(e,n){2&e&&(Dt("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),ln("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:[lt],ngContentSelectors:nee,decls:1,vars:0,template:function(e,n){1&e&&(rr(),Yt(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})(),ZV=(()=>{class i{}return i.\u0275fac=function(e){return new(e||i)},i.\u0275mod=en({type:i}),i.\u0275inj=Wt({imports:[Qn,Qn]}),i})(),QV=(()=>{class i{constructor(e){this.viewContainerRef=e}}return i.\u0275fac=function(e){return new(e||i)(E(jr))},i.\u0275dir=ve({type:i,selectors:[["","dataBlockUI",""]]}),i})(),fee=(()=>{class i{constructor(){this.resource=null,this.name="",this.resourceDescription="",this.changed=new $e}}return i.\u0275fac=function(e){return new(e||i)},i.\u0275cmp=st({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&&($(0,"p",0),Ve(1),j()),2&e&&(U("matTooltip",n.resourceDescription),V(1),Mh("",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:[Os],changeDetection:0}),i})();function pee(i,t){if(1&i&&($(0,"h2",4),Ve(1),j()),2&i){const e=re();U("matTooltip",e.resourceDescription),V(1),ui(e.name)}}function mee(i,t){1&i&&Oe(0,"app-block-actions",5),2&i&&U("resource",re().resource)}const gee=function(i,t,e,n){return{id:i,name:t,data:e,schema:n}};function _ee(i,t){if(1&i&&Oe(0,"app-editor",7),2&i){const e=re().$implicit,n=re();U("resource",P2(3,gee,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 vee(i,t){if(1&i&&($r(0),fe(1,_ee,1,8,"app-editor",6),gt(2,"async"),Wr()),2&i){const e=t.$implicit,n=re();V(1),U("ngIf",!(yt(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 Wc=(()=>{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 $e,this.destroyed$=new Ie}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(He(this.destroyed$),vn(([n,r])=>!!this.resource&&n.startsWith(this.resource.id)&&!n.substring(this.resource.id.length+1).includes("/"))).subscribe(function(){var n=xt(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)(E(ul))},i.\u0275cmp=st({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&&(fe(0,pee,2,2,"h2",0),gt(1,"async"),fe(2,mee,1,1,"app-block-actions",1),$(3,"div",2),fe(4,vee,3,3,"ng-container",3),j()),2&e){let r;U("ngIf",n.name&&n.name!=(null==(r=yt(1,4,n.main.resource$))?null:r.name)),V(2),U("ngIf",!n.hideBlockActions),V(2),U("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})(),JV=(()=>{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)(E(il),E(mt))},i.\u0275dir=ve({type:i}),i})(),Nh=(()=>{class i extends JV{}return i.\u0275fac=function(){let t;return function(n){return(t||(t=ri(i)))(n||i)}}(),i.\u0275dir=ve({type:i,features:[lt]}),i})();const Do=new me("NgValueAccessor"),bee={provide:Do,useExisting:Gn(()=>Wl),multi:!0},wee=new me("CompositionEventMode");let Wl=(()=>{class i extends JV{constructor(e,n,r){super(e,n),this._compositionMode=r,this._composing=!1,null==this._compositionMode&&(this._compositionMode=!function xee(){const i=Oc()?Oc().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)(E(il),E(mt),E(wee,8))},i.\u0275dir=ve({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&&ke("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([bee]),lt]}),i})();const Mee=!1;function uu(i){return null==i||("string"==typeof i||Array.isArray(i))&&0===i.length}function tz(i){return null!=i&&"number"==typeof i.length}const qr=new me("NgValidators"),hu=new me("NgAsyncValidators"),Cee=/^(?=.{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 hl{static min(t){return nz(t)}static max(t){return iz(t)}static required(t){return function rz(i){return uu(i.value)?{required:!0}:null}(t)}static requiredTrue(t){return function sz(i){return!0===i.value?null:{required:!0}}(t)}static email(t){return function oz(i){return uu(i.value)||Cee.test(i.value)?null:{email:!0}}(t)}static minLength(t){return az(t)}static maxLength(t){return lz(t)}static pattern(t){return function cz(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(uu(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 mz(t)}static composeAsync(t){return gz(t)}}function nz(i){return t=>{if(uu(t.value)||uu(i))return null;const e=parseFloat(t.value);return!isNaN(e)&&e{if(uu(t.value)||uu(i))return null;const e=parseFloat(t.value);return!isNaN(e)&&e>i?{max:{max:i,actual:t.value}}:null}}function az(i){return t=>uu(t.value)||!tz(t.value)?null:t.value.lengthtz(t.value)&&t.value.length>i?{maxlength:{requiredLength:i,actualLength:t.value.length}}:null}function JM(i){return null}function dz(i){return null!=i}function uz(i){const t=iy(i)?Ni(i):i;if(Mee&&!kD(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 pe(-1101,e)}return t}function hz(i){let t={};return i.forEach(e=>{t=null!=e?{...t,...e}:t}),0===Object.keys(t).length?null:t}function fz(i,t){return t.map(e=>e(i))}function pz(i){return i.map(t=>function See(i){return!i.validate}(t)?t:e=>t.validate(e))}function mz(i){if(!i)return null;const t=i.filter(dz);return 0==t.length?null:function(e){return hz(fz(e,t))}}function fR(i){return null!=i?mz(pz(i)):null}function gz(i){if(!i)return null;const t=i.filter(dz);return 0==t.length?null:function(e){return PV(fz(e,t).map(uz)).pipe(et(hz))}}function pR(i){return null!=i?gz(pz(i)):null}function _z(i,t){return null===i?[t]:Array.isArray(i)?[...i,t]:[i,t]}function vz(i){return i._rawValidators}function yz(i){return i._rawAsyncValidators}function mR(i){return i?Array.isArray(i)?i:[i]:[]}function eC(i,t){return Array.isArray(i)?i.includes(t):i===t}function bz(i,t){const e=mR(t);return mR(i).forEach(r=>{eC(e,r)||e.push(r)}),e}function xz(i,t){return mR(t).filter(e=>!eC(i,e))}class wz{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=fR(this._rawValidators)}_setAsyncValidators(t){this._rawAsyncValidators=t||[],this._composedAsyncValidatorFn=pR(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 lo extends wz{get formDirective(){return null}get path(){return null}}class jl extends wz{constructor(){super(...arguments),this._parent=null,this.name=null,this.valueAccessor=null}}class Mz{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 jc=(()=>{class i extends Mz{constructor(e){super(e)}}return i.\u0275fac=function(e){return new(e||i)(E(jl,2))},i.\u0275dir=ve({type:i,selectors:[["","formControlName",""],["","ngModel",""],["","formControl",""]],hostVars:14,hostBindings:function(e,n){2&e&&ln("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:[lt]}),i})(),gR=(()=>{class i extends Mz{constructor(e){super(e)}}return i.\u0275fac=function(e){return new(e||i)(E(lo,10))},i.\u0275dir=ve({type:i,selectors:[["","formGroupName",""],["","formArrayName",""],["","ngModelGroup",""],["","formGroup",""],["form",3,"ngNoForm",""],["","ngForm",""]],hostVars:16,hostBindings:function(e,n){2&e&&ln("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:[lt]}),i})();function Cz(i,t){return i?`with name: '${t}'`:`at index: ${t}`}const yR=!1,ib="VALID",nC="INVALID",Um="PENDING",rb="DISABLED";function bR(i){return(iC(i)?i.validators:i)||null}function xR(i,t){return(iC(t)?t.asyncValidators:i)||null}function iC(i){return null!=i&&!Array.isArray(i)&&"object"==typeof i}function Sz(i,t,e){const n=i.controls;if(!(t?Object.keys(n):n).length)throw new pe(1e3,yR?function Tee(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 pe(1001,yR?function Iee(i,t){return`Cannot find form control ${Cz(i,t)}`}(t,e):"")}function Ez(i,t,e){i._forEachChild((n,r)=>{if(void 0===e[r])throw new pe(1002,yR?function Ree(i,t){return`Must supply a value for form control ${Cz(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===ib}get invalid(){return this.status===nC}get pending(){return this.status==Um}get disabled(){return this.status===rb}get enabled(){return this.status!==rb}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(bz(t,this._rawValidators))}addAsyncValidators(t){this.setAsyncValidators(bz(t,this._rawAsyncValidators))}removeValidators(t){this.setValidators(xz(t,this._rawValidators))}removeAsyncValidators(t){this.setAsyncValidators(xz(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=Um,!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=rb,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=ib,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===ib||this.status===Um)&&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()?rb:ib}_runValidator(){return this.validator?this.validator(this):null}_runAsyncValidator(t){if(this.asyncValidator){this.status=Um,this._hasOwnPendingAsyncValidator=!0;const e=uz(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 $e,this.statusChanges=new $e}_calculateStatus(){return this._allControlsDisabled()?rb:this.errors?nC:this._hasOwnPendingAsyncValidator||this._anyControlsHaveStatus(Um)?Um:this._anyControlsHaveStatus(nC)?nC:ib}_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 kee(i){return Array.isArray(i)?fR(i):i||null}(this._rawValidators)}_assignAsyncValidators(t){this._rawAsyncValidators=Array.isArray(t)?t.slice():t,this._composedAsyncValidatorFn=function Pee(i){return Array.isArray(i)?pR(i):i||null}(this._rawAsyncValidators)}}class Vm extends rC{constructor(t,e,n){super(bR(e),xR(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={}){Ez(this,!0,t),Object.keys(t).forEach(n=>{Sz(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 Az extends Vm{}const Bh=new me("CallSetDisabledState",{providedIn:"root",factory:()=>sb}),sb="always";function sC(i,t){return[...t.path,i]}function ob(i,t,e=sb){wR(i,t),t.valueAccessor.writeValue(i.value),(i.disabled||"always"===e)&&t.valueAccessor.setDisabledState?.(i.disabled),function Fee(i,t){t.valueAccessor.registerOnChange(e=>{i._pendingValue=e,i._pendingChange=!0,i._pendingDirty=!0,"change"===i.updateOn&&Dz(i,t)})}(i,t),function Nee(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 Lee(i,t){t.valueAccessor.registerOnTouched(()=>{i._pendingTouched=!0,"blur"===i.updateOn&&i._pendingChange&&Dz(i,t),"submit"!==i.updateOn&&i.markAsTouched()})}(i,t),function Oee(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 wR(i,t){const e=vz(i);null!==t.validator?i.setValidators(_z(e,t.validator)):"function"==typeof e&&i.setValidators([e]);const n=yz(i);null!==t.asyncValidator?i.setAsyncValidators(_z(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=vz(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=yz(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 Dz(i,t){i._pendingDirty&&i.markAsDirty(),i.setValue(i._pendingValue,{emitModelToViewChange:!1}),t.viewToModelUpdate(i._pendingValue),i._pendingChange=!1}function Tz(i,t){wR(i,t)}function CR(i,t){if(!i.hasOwnProperty("model"))return!1;const e=i.model;return!!e.isFirstChange()||!Object.is(t,e.currentValue)}function Iz(i,t){i._syncPendingControls(),t.forEach(e=>{const n=e.control;"submit"===n.updateOn&&n._pendingChange&&(e.viewToModelUpdate(n._pendingValue),n._pendingChange=!1)})}function SR(i,t){if(!t)return null;let e,n,r;return Array.isArray(t),t.forEach(s=>{s.constructor===Wl?e=s:function Vee(i){return Object.getPrototypeOf(i.constructor)===Nh}(s)?n=s:r=s}),r||n||e||null}const Hee={provide:lo,useExisting:Gn(()=>lb)},ab=(()=>Promise.resolve())();let lb=(()=>{class i extends lo{constructor(e,n,r){super(),this.callSetDisabledState=r,this.submitted=!1,this._directives=new Set,this.ngSubmit=new $e,this.form=new Vm({},fR(e),pR(n))}ngAfterViewInit(){this._setUpdateStrategy()}get formDirective(){return this}get control(){return this.form}get path(){return[]}get controls(){return this.form.controls}addControl(e){ab.then(()=>{const n=this._findContainer(e.path);e.control=n.registerControl(e.name,e.control),ob(e.control,e,this.callSetDisabledState),e.control.updateValueAndValidity({emitEvent:!1}),this._directives.add(e)})}getControl(e){return this.form.get(e.path)}removeControl(e){ab.then(()=>{const n=this._findContainer(e.path);n&&n.removeControl(e.name),this._directives.delete(e)})}addFormGroup(e){ab.then(()=>{const n=this._findContainer(e.path),r=new Vm({});Tz(r,e),n.registerControl(e.name,r),r.updateValueAndValidity({emitEvent:!1})})}removeFormGroup(e){ab.then(()=>{const n=this._findContainer(e.path);n&&n.removeControl(e.name)})}getFormGroup(e){return this.form.get(e.path)}updateModel(e,n){ab.then(()=>{this.form.get(e.path).setValue(n)})}setValue(e){this.control.setValue(e)}onSubmit(e){return this.submitted=!0,Iz(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)(E(qr,10),E(hu,10),E(Bh,8))},i.\u0275dir=ve({type:i,selectors:[["form",3,"ngNoForm","",3,"formGroup",""],["ng-form"],["","ngForm",""]],hostBindings:function(e,n){1&e&&ke("submit",function(s){return n.onSubmit(s)})("reset",function(){return n.onReset()})},inputs:{options:["ngFormOptions","options"]},outputs:{ngSubmit:"ngSubmit"},exportAs:["ngForm"],features:[An([Hee]),lt]}),i})();function Rz(i,t){const e=i.indexOf(t);e>-1&&i.splice(e,1)}function kz(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(bR(e),xR(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=kz(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){Rz(this._onChange,t)}registerOnDisabledChange(t){this._onDisabledChange.push(t)}_unregisterOnDisabledChange(t){Rz(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){kz(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}},Wee={provide:jl,useExisting:Gn(()=>fu)},Fz=(()=>Promise.resolve())();let fu=(()=>{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 $e,this._parent=e,this._setValidators(n),this._setAsyncValidators(r),this.valueAccessor=SR(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),CR(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(){ob(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){Fz.then(()=>{this.control.setValue(e,{emitViewToModelChange:!1}),this._changeDetectorRef?.markForCheck()})}_updateDisabled(e){const n=e.isDisabled.currentValue,r=0!==n&&function cm(i){return"boolean"==typeof i?i:null!=i&&"false"!==i}(n);Fz.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)(E(lo,9),E(qr,10),E(hu,10),E(Do,10),E(si,8),E(Bh,8))},i.\u0275dir=ve({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([Wee]),lt,xi]}),i})(),ER=(()=>{class i{}return i.\u0275fac=function(e){return new(e||i)},i.\u0275dir=ve({type:i,selectors:[["form",3,"ngNoForm","",3,"ngNativeValidate",""]],hostAttrs:["novalidate",""]}),i})();const jee={provide:Do,useExisting:Gn(()=>Uh),multi:!0};let Uh=(()=>{class i extends Nh{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=ri(i)))(n||i)}}(),i.\u0275dir=ve({type:i,selectors:[["input","type","number","formControlName",""],["input","type","number","formControl",""],["input","type","number","ngModel",""]],hostBindings:function(e,n){1&e&&ke("input",function(s){return n.onChange(s.target.value)})("blur",function(){return n.onTouched()})},features:[An([jee]),lt]}),i})(),Lz=(()=>{class i{}return i.\u0275fac=function(e){return new(e||i)},i.\u0275mod=en({type:i}),i.\u0275inj=Wt({}),i})();const AR=new me("NgModelWithFormControlWarning"),Zee={provide:lo,useExisting:Gn(()=>Vh)};let Vh=(()=>{class i extends lo{constructor(e,n,r){super(),this.callSetDisabledState=r,this.submitted=!1,this._onCollectionChange=()=>this._updateDomValue(),this.directives=[],this.form=null,this.ngSubmit=new $e,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 ob(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 zee(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,Iz(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)&&(ob(r,e,this.callSetDisabledState),e.control=r))}),this.form._updateTreeValidity({emitEvent:!1})}_setUpFormContainer(e){const n=this.form.get(e.path);Tz(n,e),n.updateValueAndValidity({emitEvent:!1})}_cleanUpFormContainer(e){if(this.form){const n=this.form.get(e.path);n&&function Bee(i,t){return lC(i,t)}(n,e)&&n.updateValueAndValidity({emitEvent:!1})}}_updateRegistrations(){this.form._registerOnCollectionChange(this._onCollectionChange),this._oldForm&&this._oldForm._registerOnCollectionChange(()=>{})}_updateValidators(){wR(this.form,this),this._oldForm&&lC(this._oldForm,this)}_checkFormPresent(){}}return i.\u0275fac=function(e){return new(e||i)(E(qr,10),E(hu,10),E(Bh,8))},i.\u0275dir=ve({type:i,selectors:[["","formGroup",""]],hostBindings:function(e,n){1&e&&ke("submit",function(s){return n.onSubmit(s)})("reset",function(){return n.onReset()})},inputs:{form:["formGroup","form"]},outputs:{ngSubmit:"ngSubmit"},exportAs:["ngForm"],features:[An([Zee]),lt,xi]}),i})();const ete={provide:jl,useExisting:Gn(()=>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 $e,this._ngModelWarningSent=!1,this._parent=e,this._setValidators(n),this._setAsyncValidators(r),this.valueAccessor=SR(0,s)}ngOnChanges(e){this._added||this._setUpControl(),CR(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)(E(lo,13),E(qr,10),E(hu,10),E(Do,10),E(AR,8))},i.\u0275dir=ve({type:i,selectors:[["","formControlName",""]],inputs:{name:["formControlName","name"],isDisabled:["disabled","isDisabled"],model:["ngModel","model"]},outputs:{update:"ngModelChange"},features:[An([ete]),lt,xi]}),i})();function Gz(i){return"number"==typeof i?i:parseInt(i,10)}function $z(i){return"number"==typeof i?i:parseFloat(i)}let zh=(()=>{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=ve({type:i,features:[xi]}),i})();const ate={provide:qr,useExisting:Gn(()=>Hh),multi:!0};let Hh=(()=>{class i extends zh{constructor(){super(...arguments),this.inputName="max",this.normalizeInput=e=>$z(e),this.createValidator=e=>iz(e)}}return i.\u0275fac=function(){let t;return function(n){return(t||(t=ri(i)))(n||i)}}(),i.\u0275dir=ve({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&&Dt("max",n._enabled?n.max:null)},inputs:{max:"max"},features:[An([ate]),lt]}),i})();const lte={provide:qr,useExisting:Gn(()=>Gh),multi:!0};let Gh=(()=>{class i extends zh{constructor(){super(...arguments),this.inputName="min",this.normalizeInput=e=>$z(e),this.createValidator=e=>nz(e)}}return i.\u0275fac=function(){let t;return function(n){return(t||(t=ri(i)))(n||i)}}(),i.\u0275dir=ve({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&&Dt("min",n._enabled?n.min:null)},inputs:{min:"min"},features:[An([lte]),lt]}),i})();const hte={provide:qr,useExisting:Gn(()=>PR),multi:!0};let PR=(()=>{class i extends zh{constructor(){super(...arguments),this.inputName="minlength",this.normalizeInput=e=>Gz(e),this.createValidator=e=>az(e)}}return i.\u0275fac=function(){let t;return function(n){return(t||(t=ri(i)))(n||i)}}(),i.\u0275dir=ve({type:i,selectors:[["","minlength","","formControlName",""],["","minlength","","formControl",""],["","minlength","","ngModel",""]],hostVars:1,hostBindings:function(e,n){2&e&&Dt("minlength",n._enabled?n.minlength:null)},inputs:{minlength:"minlength"},features:[An([hte]),lt]}),i})();const fte={provide:qr,useExisting:Gn(()=>OR),multi:!0};let OR=(()=>{class i extends zh{constructor(){super(...arguments),this.inputName="maxlength",this.normalizeInput=e=>Gz(e),this.createValidator=e=>lz(e)}}return i.\u0275fac=function(){let t;return function(n){return(t||(t=ri(i)))(n||i)}}(),i.\u0275dir=ve({type:i,selectors:[["","maxlength","","formControlName",""],["","maxlength","","formControl",""],["","maxlength","","ngModel",""]],hostVars:1,hostBindings:function(e,n){2&e&&Dt("maxlength",n._enabled?n.maxlength:null)},inputs:{maxlength:"maxlength"},features:[An([fte]),lt]}),i})(),qz=(()=>{class i{}return i.\u0275fac=function(e){return new(e||i)},i.\u0275mod=en({type:i}),i.\u0275inj=Wt({imports:[Lz]}),i})();class Xz extends rC{constructor(t,e,n){super(bR(e),xR(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={}){Ez(this,!1,t),t.forEach((n,r)=>{Sz(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 Kz(i){return!!i&&(void 0!==i.asyncValidators||void 0!==i.validators||void 0!==i.updateOn)}let mte=(()=>{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 Kz(n)?s=n:null!==n&&(s.validators=n.validator,s.asyncValidators=n.asyncValidator),new Vm(r,s)}record(e,n=null){const r=this._reduceControls(e);return new Az(r,n)}control(e,n,r){let s={};return this.useNonNullable?(Kz(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 Xz(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=Re({token:i,factory:i.\u0275fac,providedIn:"root"}),i})(),Zz=(()=>{class i{static withConfig(e){return{ngModule:i,providers:[{provide:Bh,useValue:e.callSetDisabledState??sb}]}}}return i.\u0275fac=function(e){return new(e||i)},i.\u0275mod=en({type:i}),i.\u0275inj=Wt({imports:[qz]}),i})(),Qz=(()=>{class i{static withConfig(e){return{ngModule:i,providers:[{provide:AR,useValue:e.warnOnNgModelWithFormControl??"always"},{provide:Bh,useValue:e.callSetDisabledState??sb}]}}}return i.\u0275fac=function(e){return new(e||i)},i.\u0275mod=en({type:i}),i.\u0275inj=Wt({imports:[qz]}),i})();const gte=["matFormFieldNotchedOutline",""],_te=["*"],vte=["textField"],yte=["iconPrefixContainer"],bte=["textPrefixContainer"];function xte(i,t){1&i&&Oe(0,"span",19)}function wte(i,t){if(1&i){const e=Kn();$(0,"label",17),ke("cdkObserveContent",function(){return Ht(e),Et(re(2)._refreshOutlineNotchWidth())}),Yt(1,1),fe(2,xte,1,0,"span",18),j()}if(2&i){const e=re(2);U("floating",e._shouldLabelFloat())("cdkObserveContentDisabled",!e._hasOutline())("id",e._labelId),Dt("for",e._control.id)("aria-owns",e._control.id),V(2),U("ngIf",!e.hideRequiredMarker&&e._control.required)}}function Mte(i,t){1&i&&fe(0,wte,3,6,"label",16),2&i&&U("ngIf",re()._hasFloatingLabel())}function Cte(i,t){1&i&&Oe(0,"div",20)}function Ste(i,t){}function Ete(i,t){1&i&&fe(0,Ste,0,0,"ng-template",22),2&i&&(re(2),U("ngTemplateOutlet",ir(1)))}function Ate(i,t){if(1&i&&($(0,"div",21),fe(1,Ete,1,1,"ng-template",9),j()),2&i){const e=re();U("matFormFieldNotchedOutlineOpen",e._shouldLabelFloat())("matFormFieldNotchedOutlineLabelWidth",e._labelWidth),V(1),U("ngIf",!e._forceDisplayInfixLabel())}}function Dte(i,t){1&i&&($(0,"div",23,24),Yt(2,2),j())}function Tte(i,t){1&i&&($(0,"div",25,26),Yt(2,3),j())}function Ite(i,t){}function Rte(i,t){1&i&&fe(0,Ite,0,0,"ng-template",22),2&i&&(re(),U("ngTemplateOutlet",ir(1)))}function kte(i,t){1&i&&($(0,"div",27),Yt(1,4),j())}function Pte(i,t){1&i&&($(0,"div",28),Yt(1,5),j())}function Ote(i,t){1&i&&Oe(0,"div",29)}function Fte(i,t){1&i&&($(0,"div",30),Yt(1,6),j()),2&i&&U("@transitionMessages",re()._subscriptAnimationState)}function Lte(i,t){if(1&i&&($(0,"mat-hint",34),Ve(1),j()),2&i){const e=re(2);U("id",e._hintLabelId),V(1),ui(e.hintLabel)}}function Nte(i,t){if(1&i&&($(0,"div",31),fe(1,Lte,2,2,"mat-hint",32),Yt(2,7),Oe(3,"div",33),Yt(4,8),j()),2&i){const e=re();U("@transitionMessages",e._subscriptAnimationState),V(1),U("ngIf",e.hintLabel)}}const Bte=["*",[["mat-label"]],[["","matPrefix",""],["","matIconPrefix",""]],[["","matTextPrefix",""]],[["","matTextSuffix",""]],[["","matSuffix",""],["","matIconSuffix",""]],[["mat-error"],["","matError",""]],[["mat-hint",3,"align","end"]],[["mat-hint","align","end"]]],Ute=["*","mat-label","[matPrefix], [matIconPrefix]","[matTextPrefix]","[matTextSuffix]","[matSuffix], [matIconSuffix]","mat-error, [matError]","mat-hint:not([align='end'])","mat-hint[align='end']"];let qo=(()=>{class i{}return i.\u0275fac=function(e){return new(e||i)},i.\u0275dir=ve({type:i,selectors:[["mat-label"]]}),i})(),Vte=0;const Jz=new me("MatError");let zte=(()=>{class i{constructor(e,n){this.id="mat-mdc-error-"+Vte++,e||n.nativeElement.setAttribute("aria-live","polite")}}return i.\u0275fac=function(e){return new(e||i)(_a("aria-live"),E(mt))},i.\u0275dir=ve({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&&zl("id",n.id)},inputs:{id:"id"},features:[An([{provide:Jz,useExisting:i}])]}),i})(),Hte=0,eH=(()=>{class i{constructor(){this.align="start",this.id="mat-mdc-hint-"+Hte++}}return i.\u0275fac=function(e){return new(e||i)},i.\u0275dir=ve({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&&(zl("id",n.id),Dt("align",null),ln("mat-mdc-form-field-hint-end","end"===n.align))},inputs:{align:"align",id:"id"}}),i})();const tH=new me("MatPrefix");let Gte=(()=>{class i{constructor(){this._isText=!1}set _isTextSelector(e){this._isText=!0}}return i.\u0275fac=function(e){return new(e||i)},i.\u0275dir=ve({type:i,selectors:[["","matPrefix",""],["","matIconPrefix",""],["","matTextPrefix",""]],inputs:{_isTextSelector:["matTextPrefix","_isTextSelector"]},features:[An([{provide:tH,useExisting:i}])]}),i})();const nH=new me("MatSuffix");let $te=(()=>{class i{constructor(){this._isText=!1}set _isTextSelector(e){this._isText=!0}}return i.\u0275fac=function(e){return new(e||i)},i.\u0275dir=ve({type:i,selectors:[["","matSuffix",""],["","matIconSuffix",""],["","matTextSuffix",""]],inputs:{_isTextSelector:["matTextSuffix","_isTextSelector"]},features:[An([{provide:nH,useExisting:i}])]}),i})(),iH=(()=>{class i{constructor(e){this._elementRef=e,this.floating=!1}getWidth(){return function Wte(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)(E(mt))},i.\u0275dir=ve({type:i,selectors:[["label","matFormFieldFloatingLabel",""]],hostAttrs:[1,"mdc-floating-label","mat-mdc-floating-label"],hostVars:2,hostBindings:function(e,n){2&e&&ln("mdc-floating-label--float-above",n.floating)},inputs:{floating:"floating"}}),i})();const rH="mdc-line-ripple--active",dC="mdc-line-ripple--deactivating";let sH=(()=>{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(rH,dC)},n.runOutsideAngular(()=>{e.nativeElement.addEventListener("transitionend",this._handleTransitionEnd)})}activate(){const e=this._elementRef.nativeElement.classList;e.remove(dC),e.add(rH)}deactivate(){this._elementRef.nativeElement.classList.add(dC)}ngOnDestroy(){this._elementRef.nativeElement.removeEventListener("transitionend",this._handleTransitionEnd)}}return i.\u0275fac=function(e){return new(e||i)(E(mt),E(ft))},i.\u0275dir=ve({type:i,selectors:[["div","matFormFieldLineRipple",""]],hostAttrs:[1,"mdc-line-ripple"]}),i})(),oH=(()=>{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)(E(mt),E(ft))},i.\u0275cmp=st({type:i,selectors:[["div","matFormFieldNotchedOutline",""]],hostAttrs:[1,"mdc-notched-outline"],hostVars:2,hostBindings:function(e,n){2&e&&ln("mdc-notched-outline--notched",n.open)},inputs:{labelWidth:["matFormFieldNotchedOutlineLabelWidth","labelWidth"],open:["matFormFieldNotchedOutlineOpen","open"]},attrs:gte,ngContentSelectors:_te,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&&(rr(),Oe(0,"div",0),$(1,"div",1),Yt(2),j(),Oe(3,"div",2)),2&e&&(V(1),$o("width",n._getNotchWidth()))},encapsulation:2,changeDetection:0}),i})();const jte={transitionMessages:Ia("transitionMessages",[Ps("enter",oi({opacity:1,transform:"translateY(0%)"})),Or("void => enter",[oi({opacity:0,transform:"translateY(-5px)"}),Yr("300ms cubic-bezier(0.55, 0, 0.55, 0.2)")])])};let FR=(()=>{class i{}return i.\u0275fac=function(e){return new(e||i)},i.\u0275dir=ve({type:i}),i})();const uC=new me("MatFormField"),Yte=new me("MAT_FORM_FIELD_DEFAULT_OPTIONS");let aH=0,ql=(()=>{class i{get hideRequiredMarker(){return this._hideRequiredMarker}set hideRequiredMarker(e){this._hideRequiredMarker=tn(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-"+aH++,this._hintLabelId="mat-mdc-hint-"+aH++,this._subscriptAnimationState="",this._labelWidth=0,this._destroyed=new Ie,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(He(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(),Cr(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(He(this._destroyed)).subscribe(()=>{this._needsOutlineLabelOffsetUpdateOnStable&&(this._needsOutlineLabelOffsetUpdateOnStable=!1,this._updateOutlineLabelOffset())})}),this._dir.change.pipe(He(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)(E(mt),E(si),E(ft),E(Ta),E(zi),E(Yte,8),E(kr,8),E(qt))},i.\u0275cmp=st({type:i,selectors:[["mat-form-field"]],contentQueries:function(e,n,r){if(1&e&&(Wi(r,qo,5),Wi(r,qo,7),Wi(r,FR,5),Wi(r,tH,5),Wi(r,nH,5),Wi(r,Jz,5),Wi(r,eH,5)),2&e){let s;Tt(s=It())&&(n._labelChildNonStatic=s.first),Tt(s=It())&&(n._labelChildStatic=s.first),Tt(s=It())&&(n._formFieldControl=s.first),Tt(s=It())&&(n._prefixChildren=s),Tt(s=It())&&(n._suffixChildren=s),Tt(s=It())&&(n._errorChildren=s),Tt(s=It())&&(n._hintChildren=s)}},viewQuery:function(e,n){if(1&e&&(Zn(vte,5),Zn(yte,5),Zn(bte,5),Zn(iH,5),Zn(oH,5),Zn(sH,5)),2&e){let r;Tt(r=It())&&(n._textField=r.first),Tt(r=It())&&(n._iconPrefixContainer=r.first),Tt(r=It())&&(n._textPrefixContainer=r.first),Tt(r=It())&&(n._floatingLabel=r.first),Tt(r=It())&&(n._notchedOutline=r.first),Tt(r=It())&&(n._lineRipple=r.first)}},hostAttrs:[1,"mat-mdc-form-field"],hostVars:42,hostBindings:function(e,n){2&e&&ln("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:Ute,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&&(rr(Bte),fe(0,Mte,1,1,"ng-template",null,0,kc),$(2,"div",1,2),ke("click",function(s){return n._control.onContainerClick&&n._control.onContainerClick(s)}),fe(4,Cte,1,0,"div",3),$(5,"div",4),fe(6,Ate,2,3,"div",5),fe(7,Dte,3,0,"div",6),fe(8,Tte,3,0,"div",7),$(9,"div",8),fe(10,Rte,1,1,"ng-template",9),Yt(11),j(),fe(12,kte,2,0,"div",10),fe(13,Pte,2,0,"div",11),j(),fe(14,Ote,1,0,"div",12),j(),$(15,"div",13),fe(16,Fte,2,1,"div",14),fe(17,Nte,5,2,"div",15),j()),2&e&&(V(2),ln("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),V(2),U("ngIf",!n._hasOutline()&&!n._control.disabled),V(2),U("ngIf",n._hasOutline()),V(1),U("ngIf",n._hasIconPrefix),V(1),U("ngIf",n._hasTextPrefix),V(2),U("ngIf",!n._hasOutline()||n._forceDisplayInfixLabel()),V(2),U("ngIf",n._hasTextSuffix),V(1),U("ngIf",n._hasIconSuffix),V(1),U("ngIf",!n._hasOutline()),V(1),ln("mat-mdc-form-field-subscript-dynamic-size","dynamic"===n.subscriptSizing),U("ngSwitch",n._getDisplayedMessages()),V(1),U("ngSwitchCase","error"),V(1),U("ngSwitchCase","hint"))},dependencies:[vi,vy,_y,LT,xU,eH,iH,oH,sH],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:[jte.transitionMessages]},changeDetection:0}),i})(),hC=(()=>{class i{}return i.\u0275fac=function(e){return new(e||i)},i.\u0275mod=en({type:i}),i.\u0275inj=Wt({imports:[Qn,ao,BI,Qn]}),i})();const dH=Ih({passive:!0});let Kte=(()=>{class i{constructor(e,n){this._platform=e,this._ngZone=n,this._monitoredElements=new Map}monitor(e){if(!this._platform.isBrowser)return mo;const n=Uc(e),r=this._monitoredElements.get(n);if(r)return r.subject;const s=new Ie,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,dH),n.classList.add("cdk-text-field-autofill-monitored")}),this._monitoredElements.set(n,{subject:s,unlisten:()=>{n.removeEventListener("animationstart",a,dH)}}),s}stopMonitoring(e){const n=Uc(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)(ee(zi),ee(ft))},i.\u0275prov=Re({token:i,factory:i.\u0275fac,providedIn:"root"}),i})(),Zte=(()=>{class i{}return i.\u0275fac=function(e){return new(e||i)},i.\u0275mod=en({type:i}),i.\u0275inj=Wt({}),i})();const LR=new me("MAT_INPUT_VALUE_ACCESSOR"),Qte=["button","checkbox","file","hidden","image","radio","range","reset","submit"];let Jte=0;const ene=zU(class{constructor(i,t,e,n){this._defaultErrorStateMatcher=i,this._parentForm=t,this._parentFormGroup=e,this.ngControl=n,this.stateChanges=new Ie}});let Yc=(()=>{class i extends ene{get disabled(){return this._disabled}set disabled(e){this._disabled=tn(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(hl.required)??!1}set required(e){this._required=tn(e)}get type(){return this._type}set type(e){this._type=e||"text",this._validateType(),!this._isTextarea&&iU().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=tn(e)}constructor(e,n,r,s,o,a,l,c,d,h){super(a,s,o,r),this._elementRef=e,this._platform=n,this._autofillMonitor=c,this._formField=h,this._uid="mat-input-"+Jte++,this.focused=!1,this.stateChanges=new Ie,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=>iU().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&&d.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(){Qte.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)(E(mt),E(zi),E(jl,10),E(lb,8),E(Vh,8),E(GU),E(LR,10),E(Kte),E(ft),E(uC,8))},i.\u0275dir=ve({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&&ke("focus",function(){return n._focusChanged(!0)})("blur",function(){return n._focusChanged(!1)})("input",function(){return n._onInput()}),2&e&&(zl("id",n.id)("disabled",n.disabled)("required",n.required),Dt("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),ln("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:FR,useExisting:i}]),lt,xi]}),i})(),uH=(()=>{class i{}return i.\u0275fac=function(e){return new(e||i)},i.\u0275mod=en({type:i}),i.\u0275inj=Wt({imports:[Qn,hC,hC,Zte,Qn]}),i})();function tne(i,t){if(1&i&&($(0,"mat-label"),Ve(1),j()),2&i){const e=re(2);V(1),ui(e.resource.name)}}function nne(i,t){if(1&i){const e=Kn();$(0,"mat-form-field",1),fe(1,tne,2,1,"mat-label",2),$(2,"input",3),ke("ngModelChange",function(r){return Ht(e),Et(re().resource.data=r)})("change",function(){return Ht(e),Et(re().changed.emit())}),j()()}if(2&i){const e=re();U("matTooltip",e.resourceDescription),V(1),U("ngIf",e.resource.name),V(1),U("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 ine=(()=>{class i{constructor(){this.resource=null,this.resourceDescription="",this.disabled=!1,this.changed=new $e}}return i.\u0275fac=function(e){return new(e||i)},i.\u0275cmp=st({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&&fe(0,nne,3,7,"mat-form-field",0),2&e&&U("ngIf",n.resource)},dependencies:[vi,Wl,Uh,jc,Gh,Hh,fu,ql,qo,Yc,Os],changeDetection:0}),i})();function rne(i,t){if(1&i&&($(0,"mat-label"),Ve(1),j()),2&i){const e=re(2);V(1),ui(e.resource.name)}}function sne(i,t){if(1&i){const e=Kn();$(0,"mat-form-field",1),fe(1,rne,2,1,"mat-label",2),$(2,"input",3),ke("ngModelChange",function(r){return Ht(e),Et(re().resource.data=r)})("change",function(){return Ht(e),Et(re().changed.emit())}),j()()}if(2&i){const e=re();U("matTooltip",e.resourceDescription),V(1),U("ngIf",e.resource.name),V(1),U("disabled",e.disabled||void 0!==e.resource.schema.required_value)("maxlength",e.maxLength)("minlength",e.minLength)("ngModel",e.resource.data)}}let hH=(()=>{class i{constructor(){this._resource=null,this.resourceDescription="",this.disabled=!1,this.changed=new $e,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=st({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&&fe(0,sne,3,6,"mat-form-field",0),2&e&&U("ngIf",n.resource)},dependencies:[vi,Wl,jc,PR,OR,fu,ql,qo,Yc,Os],changeDetection:0}),i})();const Xl=(i,t)=>i+(i.includes("__")?"/":"__")+t,$h=function(){return[]};function one(i,t){if(1&i&&($(0,"mat-panel-description"),Ve(1," Click to view items ("),$(2,"b"),Ve(3),j(),Ve(4,") "),j()),2&i){const e=re(2);V(3),ui((e.resourceData||ro(1,$h)).length)}}function ane(i,t){1&i&&($(0,"mat-panel-description"),Ve(1," Empty array "),j())}function lne(i,t){}function cne(i,t){if(1&i){const e=Kn();$(0,"mat-expansion-panel",4),ke("opened",function(){return Ht(e),Et(re().onContentsTrigger(!0))})("closed",function(){return Ht(e),Et(re().onContentsTrigger(!1))}),$(1,"mat-expansion-panel-header",5)(2,"mat-panel-title"),Ve(3),j(),fe(4,one,5,2,"mat-panel-description",1),fe(5,ane,2,0,"mat-panel-description",1),j(),fe(6,lne,0,0,"ng-template",6),j()}if(2&i){const e=re(),n=ir(3);V(1),U("matTooltip",e.resourceDescription),V(2),Xi(" ",e.name," "),V(1),U("ngIf",(e.resourceData||ro(5,$h)).length>0),V(1),U("ngIf",0==(e.resourceData||ro(6,$h)).length),V(1),U("ngTemplateOutlet",n)}}function dne(i,t){}function une(i,t){if(1&i&&($r(0),$(1,"h2",5),Ve(2),j(),$(3,"div",7),fe(4,dne,0,0,"ng-template",6),j(),Wr()),2&i){const e=re(),n=ir(3);V(1),U("matTooltip",e.resourceDescription),V(1),ui(e.name),V(2),U("ngTemplateOutlet",n)}}function hne(i,t){}function fne(i,t){if(1&i&&Oe(0,"app-editor",10),2&i){const e=re().$implicit,n=re(3);U("resource",n.children[n.pageIndex*n.pageSize+e])("disabled",n.disabled)}}function pne(i,t){if(1&i&&($r(0),fe(1,fne,1,2,"app-editor",9),Wr()),2&i){const e=t.$implicit,n=re(3);V(1),U("ngIf",n.pageIndex*n.pageSize+e0)}let NR=(()=>{class i{constructor(e,n){this.main=e,this.cdr=n,this._resource=null,this.resourceDescription="",this.disabled=!1,this.changed=new $e,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 Ie}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(He(this.destroyed$),vn(([n,r])=>!!this.resource&&n.startsWith(this.resource.id)&&!n.substring(this.resource.id.length+1).includes("/"))).subscribe(function(){var n=xt(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 at(null),this.imageUrl$=new at(null),this.destroyed$=new Ie,this.changed=new $e}set resource(e){this._resource$.next(e)}get resource(){return this._resource$.getValue()}ngAfterViewInit(){var e=this;return xt(function*(){e._resource$.pipe(He(e.destroyed$)).subscribe(function(){var n=xt(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)(E($c),E(ul))},i.\u0275cmp=st({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&&(Oe(0,"app-compound-block-ui",0),gt(1,"async"),fe(2,Mne,2,3,"img",1),gt(3,"async")),2&e&&(U("resource",yt(1,3,n._resource$))("fieldBlacklist",ro(7,Cne)),V(2),U("ngIf",yt(3,5,n.imageUrl$)))},dependencies:[vi,Wc,Ea],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 Ene=["*"],Rne=new me("MAT_CARD_CONFIG");let fH=(()=>{class i{constructor(e){this.appearance=e?.appearance||"raised"}}return i.\u0275fac=function(e){return new(e||i)(E(Rne,8))},i.\u0275cmp=st({type:i,selectors:[["mat-card"]],hostAttrs:[1,"mat-mdc-card","mdc-card"],hostVars:4,hostBindings:function(e,n){2&e&&ln("mat-mdc-card-outlined","outlined"===n.appearance)("mdc-card--outlined","outlined"===n.appearance)},inputs:{appearance:"appearance"},exportAs:["matCard"],ngContentSelectors:Ene,decls:1,vars:0,template:function(e,n){1&e&&(rr(),Yt(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})(),pH=(()=>{class i{}return i.\u0275fac=function(e){return new(e||i)},i.\u0275mod=en({type:i}),i.\u0275inj=Wt({imports:[Qn,ao,Qn]}),i})();class BR{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 Ie,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 UR=(()=>{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=Re({token:i,factory:i.\u0275fac,providedIn:"root"}),i})(),nie=(()=>{class i{}return i.\u0275fac=function(e){return new(e||i)},i.\u0275mod=en({type:i}),i.\u0275inj=Wt({imports:[Qn,ao,Qy,Qn]}),i})();const bH={transformPanel:Ia("transformPanel",[Or("void => enter-dropdown",Yr("120ms cubic-bezier(0, 0, 0.2, 1)",tV([oi({opacity:0,transform:"scale(1, 0.8)"}),oi({opacity:1,transform:"scale(1, 1)"})]))),Or("void => enter-dialog",Yr("150ms cubic-bezier(0, 0, 0.2, 1)",tV([oi({opacity:0,transform:"scale(0.7)"}),oi({transform:"none",opacity:1})]))),Or("* => void",Yr("100ms linear",oi({opacity:0})))]),fadeInCalendar:Ia("fadeInCalendar",[Ps("void",oi({opacity:0})),Ps("enter",oi({opacity:1})),Or("void => *",Yr("120ms 100ms cubic-bezier(0.55, 0, 0.55, 0.2)"))])},MH=function(i){return{active:i}};function bie(i,t){if(1&i){const e=Kn();$(0,"button",2),ke("click",function(){const s=Ht(e).$implicit;return Et(re().select(s))}),j()}if(2&i){const e=t.$implicit,n=re();$o("background-color",e),U("ngClass",im(3,MH,n.selectedColor===e))}}function xie(i,t){if(1&i){const e=Kn();$(0,"button",2),ke("click",function(){const s=Ht(e).$implicit;return Et(re().select(s))}),j()}if(2&i){const e=t.$implicit,n=re();$o("background-color",e),U("ngClass",im(3,MH,n.selectedColor===e))}}const wie=["button"],Mie=/^\s+/,Cie=/\s+$/,Hm=Math.round,Sie=(Math,Math,Math,/[^0-9]/g),CH=["#ffffff","#ffff00","#ff00ff","#ff0000","#c0c0c0","#808080","#808000","#800080","#800000","#00ffff","#00ff00","#008080","#008000","#0000ff","#000080","#000000"];function SH(i,t,e){const n=i.getImageData(t,e,1,1).data;return{r:n[0],g:n[1],b:n[2]}}function Wh(i){return 1==i.length?"0"+i:""+i}function Aie(i){return Math.round(255*parseFloat(i)).toString(16)}function EH(i){return Xo(i)/255}function Xo(i){return parseInt(i,16)}function AH(i,t,e,n){var r=[Wh(Hm(i).toString(16)),Wh(Hm(t).toString(16)),Wh(Hm(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 pu="(?:[-\\+]?\\d*\\.\\d+%?)|(?:[-\\+]?\\d+%?)",HR="[\\s|\\(]+("+pu+")[,|\\s]+("+pu+")[,|\\s]+("+pu+")\\s*\\)?",GR="[\\s|\\(]+("+pu+")[,|\\s]+("+pu+")[,|\\s]+("+pu+")[,|\\s]+("+pu+")\\s*\\)?",jh={CSS_UNIT:new RegExp(pu),rgb:new RegExp("rgb"+HR),rgba:new RegExp("rgba"+GR),hsl:new RegExp("hsl"+HR),hsla:new RegExp("hsla"+GR),hsv:new RegExp("hsv"+HR),hsva:new RegExp("hsva"+GR),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 $R(i){let t;return i=i.replace(Mie,"").replace(Cie,"").toLowerCase(),(t=jh.rgb.exec(i))?{r:t[1],g:t[2],b:t[3],a:1}:(t=jh.rgba.exec(i))?{r:t[1],g:t[2],b:t[3],a:t[4]}:(t=jh.hex8.exec(i))?{r:Xo(t[1]),g:Xo(t[2]),b:Xo(t[3]),a:EH(t[4])}:(t=jh.hex6.exec(i))?{r:Xo(t[1]),g:Xo(t[2]),b:Xo(t[3]),a:1}:(t=jh.hex4.exec(i))?{r:Xo(t[1]+""+t[1]),g:Xo(t[2]+""+t[2]),b:Xo(t[3]+""+t[3]),a:EH(t[4]+""+t[4])}:(t=jh.hex3.exec(i))?{r:Xo(t[1]+""+t[1]),g:Xo(t[2]+""+t[2]),b:Xo(t[3]+""+t[3]),a:1}:null}class Yh{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=AH(this.r,this.g,this.b),this.rgba=this.toRgba()}toHex(t){return AH(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 Eie(i,t,e,n,r){var s=[Wh(Hm(i).toString(16)),Wh(Hm(t).toString(16)),Wh(Hm(e).toString(16)),Wh(Aie(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 DH=(()=>{class i{constructor(e,n){this.zone=e,this.colorChanged=new $e,this.x=0,this.y=0,this.drag=!1,this._destroyed=new Ie,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){wo()},i.\u0275dir=ve({type:i,inputs:{color:"color"},outputs:{colorChanged:"colorChanged"}}),i})(),Iie=(()=>{class i extends DH{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}=SH(this.ctx,e.offsetX,e.offsetY);this.emitChange(new Yh(n,r,s))}}return i.\u0275fac=function(e){return new(e||i)(E(ft))},i.\u0275cmp=st({type:i,selectors:[["ngx-mat-color-slider"]],features:[lt],decls:1,vars:0,consts:[["id","color-strip","width","15","height","234",1,"zone-strip",3,"mousedown","mouseup"]],template:function(e,n){1&e&&($(0,"canvas",0),ke("mousedown",function(s){return n.onMousedown(s)})("mouseup",function(s){return n.onMouseup(s)}),j())}}),i})(),Rie=(()=>{class i{constructor(){}onInput(e){this._formatInput(e.target)}_formatInput(e){let n=Number(e.value.replace(Sie,""));n=isNaN(n)?0:n,e.value=n}}return i.\u0275fac=function(e){return new(e||i)},i.\u0275dir=ve({type:i,selectors:[["","ngxMatNumericColorInput",""]],hostBindings:function(e,n){1&e&&ke("input",function(s){return n.onInput(s)})}}),i})(),Pie=(()=>{class i extends DH{constructor(e){super(e,"color-block"),this.zone=e,this._resetBaseColor=!0,this.formGroup=new Vm({r:new Yl(null,[hl.required]),g:new Yl(null,[hl.required]),b:new Yl(null,[hl.required]),a:new Yl(null,[hl.required]),hex:new Yl(null,[hl.required,hl.pattern(jh.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(){Cr(this.rCtrl.valueChanges,this.gCtrl.valueChanges,this.bCtrl.valueChanges,this.aCtrl.valueChanges).pipe(He(this._destroyed),Vc(400)).subscribe(r=>{const s=new Yh(Number(this.rCtrl.value),Number(this.gCtrl.value),Number(this.bCtrl.value),Number(this.aCtrl.value));this.emitChange(s)}),this.hexCtrl.valueChanges.pipe(He(this._destroyed),Vc(400),zc()).subscribe(r=>{const s=$R(r);if(null!=s){const o=new Yh(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}=SH(this.ctx,e.offsetX,e.offsetY);this.emitChange(new Yh(n,r,s))}}return i.\u0275fac=function(e){return new(e||i)(E(ft))},i.\u0275cmp=st({type:i,selectors:[["ngx-mat-color-canvas"]],hostAttrs:[1,"ngx-mat-color-canvas"],features:[lt,xi],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&&($(0,"form",0)(1,"div",1)(2,"div",2)(3,"canvas",3),ke("mousedown",function(s){return n.onMousedown(s)})("mouseup",function(s){return n.onMouseup(s)}),j(),$(4,"ngx-mat-color-slider",4),ke("colorChanged",function(s){return n.onSliderColorChanged(s)}),j()(),$(5,"div",5)(6,"mat-form-field")(7,"mat-label"),Ve(8,"R"),j(),Oe(9,"input",6),j(),$(10,"mat-form-field")(11,"mat-label"),Ve(12,"G"),j(),Oe(13,"input",7),j(),$(14,"mat-form-field")(15,"mat-label"),Ve(16,"B"),j(),Oe(17,"input",8),j()()(),$(18,"div",1),Oe(19,"button",9),$(20,"mat-form-field")(21,"mat-label"),Ve(22,"HEX6"),j(),$(23,"mat-label",10),Ve(24,"#\xa0"),j(),Oe(25,"input",11),j(),$(26,"mat-form-field",12)(27,"mat-label"),Ve(28,"A"),j(),Oe(29,"input",13),j()()()),2&e&&(U("formGroup",n.formGroup),V(19),$o("background-color",(null==n.color?null:n.color.rgba)||"transparent"))},dependencies:[Yc,ql,qo,Gte,bV,ER,Wl,Uh,jc,gR,Gh,Hh,Vh,cC,Iie,Rie],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})(),Oie=(()=>{class i{constructor(){this.colorChanged=new $e,this.colors1=CH.slice(0,8),this.colors2=CH.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}=$R(e);this.colorChanged.emit(new Yh(n,r,s,o))}}return i.\u0275fac=function(e){return new(e||i)},i.\u0275cmp=st({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&&($(0,"div",0),fe(1,bie,1,5,"button",1),j(),$(2,"div",0),fe(3,xie,1,5,"button",1),j()),2&e&&(V(1),U("ngForOf",n.colors1),V(2),U("ngForOf",n.colors2))},dependencies:[dm,oo,bV],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})(),TH=(()=>{class i{constructor(){this.colorChanged=new $e}ngOnInit(){}handleColorChanged(e){this.colorChanged.emit(e)}}return i.\u0275fac=function(e){return new(e||i)},i.\u0275cmp=st({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&&($(0,"ngx-mat-color-canvas",0),ke("colorChanged",function(s){return n.handleColorChanged(s)}),j(),$(1,"ngx-mat-color-collection",0),ke("colorChanged",function(s){return n.handleColorChanged(s)}),j()),2&e&&(U("color",n.color),V(1),U("color",n.color))},dependencies:[Pie,Oie],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})(),WR=(()=>{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=$R(e);return n?new Yh(n.r,n.g,n.b,n.a):null}}return i.\u0275fac=function(e){return new(e||i)},i.\u0275prov=Re({token:i,factory:i.\u0275fac}),i})();const Fie={display:{colorInput:"hex"}},IH=new me("mat-color-formats"),RH=new me("ngx-mat-colorpicker-scroll-strategy"),Nie={provide:RH,deps:[as],useFactory:function Lie(i){return()=>i.scrollStrategies.reposition()}},Bie=Ky(class{constructor(i){this._elementRef=i}});let kH=(()=>{class i extends Bie{constructor(e){super(e)}}return i.\u0275fac=function(e){return new(e||i)(E(mt))},i.\u0275cmp=st({type:i,selectors:[["ngx-mat-color-picker-content"]],viewQuery:function(e,n){if(1&e&&Zn(TH,5),2&e){let r;Tt(r=It())&&(n._palette=r.first)}},hostAttrs:[1,"ngx-mat-colorpicker-content"],hostVars:3,hostBindings:function(e,n){2&e&&(Ew("@transformPanel","enter"),ln("ngx-mat-colorpicker-content-touch",n.picker.touchUi))},inputs:{color:"color"},exportAs:["ngxMatColorPickerContent"],features:[lt],decls:1,vars:1,consts:[[3,"color","colorChanged"]],template:function(e,n){1&e&&($(0,"ngx-mat-color-palette",0),ke("colorChanged",function(s){return n.picker.select(s)}),j()),2&e&&U("color",n.picker._selected)},dependencies:[TH],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:[bH.transformPanel,bH.fadeInCalendar]},changeDetection:0}),i})(),PH=(()=>{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 $e,this.closedStream=new $e,this._touchUi=!1,this._opened=!1,this._defaultColor="primary",this._validSelected=null,this._disabledChange=new Ie,this._focusedElementBeforeOpen=null,this._inputSubscription=Qt.EMPTY,this._selectedChanged=new Ie,this._scrollStrategy=a}get disabled(){return void 0===this._disabled&&this._pickerInput?this._pickerInput.disabled:!!this._disabled}set disabled(e){const n=tn(e);n!==this._disabled&&(this._disabled=n,this._disabledChange.next(n))}get touchUi(){return this._touchUi}set touchUi(e){this._touchUi=tn(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(kH,{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 kh(kH,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(Oi(1)).subscribe(()=>{this._popupRef.updatePosition()}))}_createPopup(){const e=new Im({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"),Cr(this._popupRef.backdropClick(),this._popupRef.detachments(),this._popupRef.keydownEvents().pipe(vn(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)(E(Lm),E(as),E(ft),E(WR),E(Ta,8),E(RH),E(qt,8),E(jr))},i.\u0275cmp=st({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 Uie={provide:Do,useExisting:Gn(()=>gC),multi:!0},Vie={provide:qr,useExisting:Gn(()=>gC),multi:!0};let gC=(()=>{class i{constructor(e,n,r,s){if(this._elementRef=e,this._formField=n,this._colorFormats=r,this._adapter=s,this.colorChange=new $e,this.colorInput=new $e,this._disabledChange=new $e,this._valueChange=new $e,this._onTouched=()=>{},this._cvaOnChange=()=>{},this._validatorOnChange=()=>{},this._pickerSubscription=Qt.EMPTY,this._validator=hl.compose([]),this._lastValueValid=!1,!this._colorFormats)throw function Tie(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=tn(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)(E(mt),E(ql,8),E(IH,8),E(WR))},i.\u0275dir=ve({type:i,selectors:[["input","ngxMatColorPicker",""]],hostVars:3,hostBindings:function(e,n){1&e&&ke("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&&(zl("disabled",n.disabled),Dt("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([Uie,Vie,{provide:LR,useExisting:i}])]}),i})(),zie=(()=>{class i{constructor(e){this._cd=e,this._stateChanges=Qt.EMPTY}get disabled(){if(null==this._disabled&&this.picker)return this.picker.disabled}set disabled(e){this._disabled=e}ngOnInit(){}ngOnChanges(e){e.picker&&this._watchStateChanges()}ngOnDestroy(){this._stateChanges.unsubscribe()}ngAfterContentInit(){this._watchStateChanges()}open(e){this.picker&&!this.disabled&&(this.picker.open(),e.stopPropagation())}_watchStateChanges(){const e=this.picker?this.picker._disabledChange:ht(),n=this.picker&&this.picker._pickerInput?this.picker._pickerInput._disabledChange:ht(),r=this.picker?Cr(this.picker.openedStream,this.picker.closedStream):ht();this._stateChanges.unsubscribe(),this._stateChanges=Cr(e,n,r).subscribe(()=>this._cd.markForCheck())}}return i.\u0275fac=function(e){return new(e||i)(E(si))},i.\u0275cmp=st({type:i,selectors:[["ngx-mat-color-toggle"]],viewQuery:function(e,n){if(1&e&&Zn(wie,5),2&e){let r;Tt(r=It())&&(n._button=r.first)}},hostAttrs:[1,"ngx-mat-color-toggle"],hostVars:7,hostBindings:function(e,n){1&e&&ke("focus",function(){return n._button.focus()}),2&e&&(Dt("tabindex",-1),ln("ngx-mat-color-toggle-active",n.picker&&n.picker.opened)("mat-accent",n.picker&&"accent"===n.picker.color)("mat-warn",n.picker&&"warn"===n.picker.color))},inputs:{picker:["for","picker"],tabIndex:"tabIndex",disabled:"disabled"},exportAs:["ngxMatColorPickerToggle"],features:[xi],decls:4,vars:5,consts:[["mat-icon-button","","type","button",3,"disabled","click"],["button",""]],template:function(e,n){1&e&&($(0,"button",0,1),ke("click",function(s){return n.open(s)}),$(2,"mat-icon"),Ve(3,"palette"),j()()),2&e&&(U("disabled",n.disabled),Dt("aria-haspopup",n.picker?"dialog":null)("tabindex",n.disabled?-1:n.tabIndex),V(2),$o("color",null==n.picker||null==n.picker._selected?null:n.picker._selected.rgba))},dependencies:[WM,hR],styles:[".mat-form-field-appearance .mat-form-field-prefix .ngx-mat-color-toggle-default-icon,.mat-form-field-appearance .mat-form-field-suffix .ngx-mat-color-toggle-default-icon{width:1em}.mat-form-field:not(.mat-form-field-appearance) .mat-form-field-prefix .ngx-mat-color-toggle-default-icon,.mat-form-field:not(.mat-form-field-appearance) .mat-form-field-suffix .ngx-mat-color-toggle-default-icon{display:block;width:1.5em;height:1.5em}.mat-form-field:not(.mat-form-field-appearance) .mat-form-field-prefix .mat-icon-button .ngx-mat-color-toggle-default-icon,.mat-form-field:not(.mat-form-field-appearance) .mat-form-field-suffix .mat-icon-button .ngx-mat-color-toggle-default-icon{margin:auto}\n"],encapsulation:2}),i})(),Hie=(()=>{class i{}return i.\u0275fac=function(e){return new(e||i)},i.\u0275mod=en({type:i}),i.\u0275inj=Wt({providers:[WR,Nie],imports:[ao,uH,jM,pH,nie,Zz,Qz,pV,Ph,ZV]}),i})();const Gie=["picker"],$ie=function(i){return{"background-color":i}};function Wie(i,t){if(1&i){const e=Kn();$(0,"div",5),ke("click",function(r){const o=Ht(e).index;return Et(re().onColorClicked(r.currentTarget,o))}),j()}if(2&i){const e=t.$implicit,n=t.index,r=re();U("ngStyle",im(2,$ie,"#"+r.lpad(e.toString(16),"0",8)))("matTooltip",n+": #"+e.toString(16))}}const jie=function(){return["colors"]};let Yie=(()=>{class i{constructor(){this.resource=null,this.changed=new $e,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 gU;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=st({type:i,selectors:[["app-palette-block-ui"]],viewQuery:function(e,n){if(1&e&&Zn(Gie,5),2&e){let r;Tt(r=It())&&(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&&(Oe(0,"app-compound-block-ui",0),$(1,"div",1),fe(2,Wie,1,4,"div",2),j(),$(3,"input",3),ke("colorChange",function(s){return n.onColorChange(s.value)}),j(),Oe(4,"ngx-mat-color-picker",null,4)),2&e){const r=ir(5);U("resource",n.resource)("fieldBlacklist",ro(4,jie)),V(2),U("ngForOf",null==n.resourceData?null:n.resourceData.colors),V(1),U("ngxMatColorPicker",r)}},dependencies:[oo,Zw,Yc,Os,gC,PH,Wc],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 qie=["editorBody"];function Xie(i,t){if(1&i&&($(0,"div",11),Ve(1),j()),2&i){const e=re().$implicit;V(1),ui(e.offset)}}function Kie(i,t){if(1&i){const e=Kn();$(0,"input",12),ke("input",function(r){const o=Ht(e).index,a=re().index;return Et(re().onHexInput(r,a,o))})("focus",function(r){const o=Ht(e).index;return Et(re(2).onHexFocus(r,o))})("blur",function(r){return Ht(e),Et(re(2).onHexBlur(r))}),j()}if(2&i){const e=t.$implicit,n=t.index;U("id","hex_input__"+re().index+"__"+n)("value",e[0])("disabled",null===e[0])}}function Zie(i,t){1&i&&Oe(0,"div",3)}function Qie(i,t){if(1&i){const e=Kn();$(0,"span",15),ke("click",function(){const s=Ht(e).index,o=re(2).index;return Et(re().blurInput(o,s))}),Ve(1),j()}if(2&i){const e=t.$implicit,n=t.index;U("id","utf_char__"+re(2).index+"__"+n),V(1),ui(e[1])}}function Jie(i,t){if(1&i&&($(0,"div",13),fe(1,Qie,2,2,"span",14),j()),2&i){const e=re().$implicit,n=re();V(1),U("ngForOf",e.values)("ngForTrackBy",n.trackByIndex)}}function ere(i,t){if(1&i&&($(0,"div",5),fe(1,Xie,2,1,"div",6),gt(2,"async"),$(3,"div",7),fe(4,Kie,1,3,"input",8),j(),fe(5,Zie,1,0,"div",9),gt(6,"async"),gt(7,"async"),fe(8,Jie,2,2,"div",10),gt(9,"async"),j()),2&i){const e=t.$implicit,n=t.index,r=re();ln("gray",n%2!=0),V(1),U("ngIf",yt(2,7,r._showOffsets$)),V(3),U("ngForOf",e.values)("ngForTrackBy",r.trackByIndex),V(1),U("ngIf",yt(6,9,r._showOffsets$)||yt(7,11,r._showUtf8$)),V(3),U("ngIf",yt(9,13,r._showUtf8$))}}function tre(i,t){if(1&i){const e=Kn();$(0,"div",16)(1,"button",17),ke("click",function(){return Ht(e),Et(re().changePage(-1))}),gt(2,"async"),Ve(3,"Previous"),j(),$(4,"span"),Ve(5),gt(6,"async"),gt(7,"async"),j(),$(8,"button",17),ke("click",function(){return Ht(e),Et(re().changePage(1))}),gt(9,"async"),gt(10,"async"),Ve(11," Next "),j()()}if(2&i){const e=re();V(1),U("disabled",0===yt(2,4,e.currentPage$)),V(4),Mh("Page ",(yt(6,6,e.currentPage$)||0)+1," of ",yt(7,8,e.totalPages$),""),V(3),U("disabled",(yt(9,10,e.currentPage$)||0)>=(yt(10,12,e.totalPages$)||0)-1)}}let nre=(()=>{class i{set maxColumns(e){this._maxColumns$.next(e)}set maxRows(e){this._maxRows$.next(e)}set showOffsets(e){this._showOffsets$.next(e)}set showUtf8(e){this._showUtf8$.next(e)}set data(e){if(e!==this._data$.value){if(e.length===this._data$.value.length){for(let n=0;n=32&&e<=126?String.fromCharCode(e):"."]}ngAfterViewInit(){new ResizeObserver(e=>{for(const n of e)this.viewportSize$.next([n.contentRect.width,n.contentRect.height])}).observe(this.editorBody.nativeElement),Aa([this.viewportSize$,this._maxColumns$,this._maxRows$,this._showOffsets$,this._showUtf8$]).pipe(He(this.destroyed$),Hy(50)).subscribe(([[e,n],r,s,o,a])=>{let l=e-8;o&&(l-=68);let c=34;a&&(l-=8,c+=10);let h=Math.floor(l/c);r>0&&h>r&&(h=r);let p=this.pageSize$.value[0];h===p+1&&l/c%1<.5&&(h=p),h=Math.max(1,h);let m=Math.floor(n/28);s>0&&m>s&&(m=s),m=Math.max(1,m),(h!=this.pageSize$.value[0]||m!==this.pageSize$.value[1])&&this.pageSize$.next([h,m])}),Aa([this._data$,this.currentPage$,this.pageSize$]).pipe(He(this.destroyed$)).subscribe(([e,n,r])=>{if(0===r[0]||0===r[1])return;let s=Math.max(1,Math.ceil(Math.ceil(e.length/r[0])/r[1]));if(this.totalPages$.value!==s&&this.totalPages$.next(s),n>=s)return void this.currentPage$.next(n=s-1);const o=[];for(let a=n*r[0]*r[1];a=0&&a<=255&&(this.data[(this.currentPage$.value*this.pageSize$.value[1]+n)*this.pageSize$.value[0]+r]=a,this.renderedRows$.value[n].values[r]=this.renderValue(a),this.cdr.detectChanges(),this.dataChange.emit(this.data),this.goToNextInput(s.id))}}onHexFocus(e,n){const r=e.target,s=r.closest(".row");s&&s.querySelectorAll(".utf8-values span").forEach((a,l)=>{a.classList.toggle("highlight",l===n)}),r.select()}onHexBlur(e){const r=e.target.closest(".row");r&&r.querySelectorAll(".utf8-values span").forEach(o=>{o.classList.remove("highlight")})}}return i.\u0275fac=function(e){return new(e||i)(E(si))},i.\u0275cmp=st({type:i,selectors:[["hex-editor"]],viewQuery:function(e,n){if(1&e&&Zn(qie,5),2&e){let r;Tt(r=It())&&(n.editorBody=r.first)}},inputs:{maxColumns:"maxColumns",maxRows:"maxRows",showOffsets:"showOffsets",showUtf8:"showUtf8",data:"data",readOnly:"readOnly"},outputs:{dataChange:"dataChange"},decls:7,vars:7,consts:[[1,"editor-body"],["editorBody",""],["class","row",3,"gray",4,"ngFor","ngForOf","ngForTrackBy"],[1,"flex-spacer"],["class","pagination",4,"ngIf"],[1,"row"],["class","offset",4,"ngIf"],[1,"hex-values"],["maxlength","2",3,"id","value","disabled","input","focus","blur",4,"ngFor","ngForOf","ngForTrackBy"],["class","flex-spacer",4,"ngIf"],["class","utf8-values",4,"ngIf"],[1,"offset"],["maxlength","2",3,"id","value","disabled","input","focus","blur"],[1,"utf8-values"],[3,"id","click",4,"ngFor","ngForOf","ngForTrackBy"],[3,"id","click"],[1,"pagination"],[3,"disabled","click"]],template:function(e,n){1&e&&($(0,"div",0,1),fe(2,ere,10,15,"div",2),gt(3,"async"),Oe(4,"div",3),j(),fe(5,tre,12,14,"div",4),gt(6,"async")),2&e&&(V(2),U("ngForOf",yt(3,3,n.renderedRows$))("ngForTrackBy",n.trackByIndex),V(3),U("ngIf",(yt(6,5,n.totalPages$)||0)>1))},dependencies:[oo,vi,Ea],styles:["[_nghost-%COMP%]{display:flex;flex-direction:column;font-family:monospace}.editor-body[_ngcontent-%COMP%]{display:flex;flex-grow:1;flex-direction:column;overflow-y:hidden}.row[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:center;height:24px;margin-bottom:4px}.row.gray[_ngcontent-%COMP%]{background-color:#d3d3d3}.offset[_ngcontent-%COMP%]{width:60px;text-align:left;margin-right:8px}.hex-values[_ngcontent-%COMP%]{display:flex;gap:2px;flex-shrink:1;overflow-x:clip}.hex-values[_ngcontent-%COMP%] input[_ngcontent-%COMP%]{width:32px;text-align:center;box-sizing:border-box}.utf8-values[_ngcontent-%COMP%]{margin-left:8px}.utf8-values[_ngcontent-%COMP%] span[_ngcontent-%COMP%]{display:inline-block;width:8px;margin-left:2px;color:#000}.utf8-values[_ngcontent-%COMP%] span.highlight[_ngcontent-%COMP%]{background-color:#ff0}.pagination[_ngcontent-%COMP%]{display:flex;justify-content:space-between;align-items:center;margin-top:1em}.flex-spacer[_ngcontent-%COMP%]{flex-grow:1}"],changeDetection:0}),i})(),ire=(()=>{class i{}return i.\u0275fac=function(e){return new(e||i)},i.\u0275mod=en({type:i}),i.\u0275inj=Wt({imports:[ao]}),i})();const rre=["editor"];let sre=(()=>{class i{constructor(){this._resource=null,this.empty=new Uint8Array,this.data$=new at(new Uint8Array),this.resourceDescription="",this.disabled=!1,this.changed=new $e}get resource(){return this._resource}set resource(e){this._resource=e,this.data$.next(new Uint8Array(e?e.data:0))}onDataChange(e){this._resource.data=Array.from(e),this.changed.emit()}}return i.\u0275fac=function(e){return new(e||i)},i.\u0275cmp=st({type:i,selectors:[["app-binary-block-ui"]],viewQuery:function(e,n){if(1&e&&Zn(rre,5),2&e){let r;Tt(r=It())&&(n.editorDiv=r.first)}},inputs:{resource:"resource",resourceDescription:"resourceDescription",disabled:"disabled"},outputs:{changed:"changed"},decls:5,vars:10,consts:[["matTooltipPosition","above",3,"matTooltip"],[3,"data","maxColumns","showOffsets","readOnly","dataChange"]],template:function(e,n){1&e&&($(0,"h2",0),Ve(1),j(),$(2,"hex-editor",1),ke("dataChange",function(s){return n.onDataChange(s)}),gt(3,"async"),gt(4,"async"),j()),2&e&&(U("matTooltip",n.resourceDescription),V(1),ui(null==n.resource?null:n.resource.name),V(1),U("data",yt(3,6,n.data$)||n.empty)("maxColumns",8)("showOffsets",(yt(4,8,n.data$)||n.empty).length>16)("readOnly",n.disabled))},dependencies:[Os,nre,Ea],changeDetection:0}),i})();const ore=["picker"];function are(i,t){if(1&i&&($(0,"mat-label",8),Ve(1),j()),2&i){const e=re();V(1),ui(null==e.resource?null:e.resource.name)}}const lre=function(i){return{transform:i}};let cre=(()=>{class i{constructor(e){this.cdr=e,this.resource=null,this.resourceDescription="",this.changed=new $e,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)(E(si))},i.\u0275cmp=st({type:i,selectors:[["app-angle-block-ui"]],viewQuery:function(e,n){if(1&e&&Zn(ore,5),2&e){let r;Tt(r=It())&&(n.picker=r.first)}},hostBindings:function(e,n){1&e&&ke("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&&($(0,"div",0)(1,"div",1,2)(3,"div",3),Oe(4,"div",4)(5,"div",5),j()(),$(6,"div",6),fe(7,are,2,1,"mat-label",7),$(8,"mat-label"),Ve(9),gt(10,"number"),j(),$(11,"mat-label"),Ve(12),gt(13,"number"),j()()()),2&e&&(U("matTooltip",n.resourceDescription),V(3),U("ngStyle",im(11,lre,"rotate("+((null==n.resource?null:n.resource.data)||0)+"rad)")),V(4),U("ngIf",null==n.resource?null:n.resource.name),V(2),Xi("",XD(10,5,180*(null==n.resource?null:n.resource.data)/n.pi||0,"1.2-2")," deg"),V(3),Xi("",XD(13,8,(null==n.resource?null:n.resource.data)||0,"1.2-2")," rad"))},dependencies:[vi,Zw,qo,Os,lB],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 jR{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,d=new Set;for(const h of e)!0===Array.isArray(h)?a.add(h):"object"==typeof h?l.add(h):"function"==typeof h?d.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===d.size){h=!0;for(const p of o)if(!1===d.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 dre(i,t){if(1&i&&($(0,"mat-list-option",3),Ve(1),j()),2&i){const e=t.$implicit,n=re();U("value",e)("selected",n.selectedValue==e),V(1),Xi(" ",e," ")}}function ure(i,t){if(1&i&&($(0,"mat-card"),Oe(1,"app-editor",4),j()),2&i){const e=re();V(1),U("resource",e.resources[e.selectedValue])}}let _C=(()=>{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)(E(jR))},i.\u0275cmp=st({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&&($(0,"mat-selection-list",0),ke("selectionChange",function(s){return n.selectedValue=s.source.selectedOptions.selected[0].value}),fe(1,dre,2,3,"mat-list-option",1),j(),fe(2,ure,2,1,"mat-card",2)),2&e&&(U("multiple",!1),V(1),U("ngForOf",n.keys),V(1),U("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})(),hre=(()=>{class i{constructor(){this._resource=null,this.resourceMap={},this.changed=new $e}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",JI("@transformPanel",[QI()],{optional:!0}))]),transformPanel:Ia("transformPanel",[Ps("void",oi({opacity:0,transform:"scale(1, 0.8)"})),Or("void => showing",Yr("120ms cubic-bezier(0, 0, 0.2, 1)",oi({opacity:1,transform:"scale(1, 1)"}))),Or("* => void",Yr("100ms linear",oi({opacity:0})))])};let OH=0;const FH=new me("mat-select-scroll-strategy"),Cre=new me("MAT_SELECT_CONFIG"),Sre={provide:FH,deps:[as],useFactory:function Mre(i){return()=>i.scrollStrategies.reposition()}},Ere=new me("MatSelectTrigger");class Are{constructor(t,e){this.source=t,this.value=e}}const Dre=HM(XI(zM(zU(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 Ie}}))));let Tre=(()=>{class i extends Dre{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(hl.required)??!1}set required(e){this._required=tn(e),this.stateChanges.next()}get multiple(){return this._multiple}set multiple(e){this._multiple=tn(e)}get disableOptionCentering(){return this._disableOptionCentering}set disableOptionCentering(e){this._disableOptionCentering=tn(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=ks(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,d,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=d,this._liveAnnouncer=g,this._defaultOptions=b,this._panelOpen=!1,this._compareWith=(v,y)=>v===y,this._uid="mat-select-"+OH++,this._triggerAriaLabelledBy=null,this._destroy=new Ie,this._onChange=()=>{},this._onTouched=()=>{},this._valueId="mat-select-value-"+OH++,this._panelDoneAnimatingStream=new Ie,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=My(()=>{const v=this.options;return v?v.changes.pipe(Eo(v),Rs(()=>Cr(...v.map(y=>y.onSelectionChange)))):this._ngZone.onStable.pipe(Oi(1),Rs(()=>this.optionSelectionChanges))}),this.openedChange=new $e,this._openedStream=this.openedChange.pipe(vn(v=>v),et(()=>{})),this._closedStream=this.openedChange.pipe(vn(v=>!v),et(()=>{})),this.selectionChange=new $e,this.valueChange=new $e,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 BR(this.multiple),this.stateChanges.next(),this._panelDoneAnimatingStream.pipe(zc(),He(this._destroy)).subscribe(()=>this._panelDoneAnimating(this.panelOpen))}ngAfterContentInit(){this._initKeyManager(),this._selectionModel.changed.pipe(He(this._destroy)).subscribe(e=>{e.added.forEach(n=>n.select()),e.removed.forEach(n=>n.deselect())}),this.options.changes.pipe(Eo(null),He(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&&!Yo(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||Yo(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(Oi(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 BZ(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=Cr(this.options.changes,this._destroy);this.optionSelectionChanges.pipe(He(e)).subscribe(n=>{this._onSelect(n.source,n.isUserInput),n.isUserInput&&!this.multiple&&this._panelOpen&&(this.close(),this.focus())}),Cr(...this.options.map(n=>n._stateChanges)).pipe(He(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)(E(RM),E(si),E(ft),E(GU),E(mt),E(Ta,8),E(lb,8),E(Vh,8),E(uC,8),E(jl,10),_a("tabindex"),E(FH),E(WI),E(Cre,8))},i.\u0275dir=ve({type:i,viewQuery:function(e,n){if(1&e&&(Zn(fre,5),Zn(pre,5),Zn(vU,5)),2&e){let r;Tt(r=It())&&(n.trigger=r.first),Tt(r=It())&&(n.panel=r.first),Tt(r=It())&&(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:[lt,xi]}),i})(),db=(()=>{class i extends Tre{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(He(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 TQ(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 Are(this,e)}_getOverlayWidth(){return(this._preferredOverlayOrigin instanceof NI?this._preferredOverlayOrigin.elementRef:this._preferredOverlayOrigin||this._elementRef).nativeElement.getBoundingClientRect().width}get hideSingleSelectionIndicator(){return this._hideSingleSelectionIndicator}set hideSingleSelectionIndicator(e){this._hideSingleSelectionIndicator=tn(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=ri(i)))(n||i)}}(),i.\u0275cmp=st({type:i,selectors:[["mat-select"]],contentQueries:function(e,n,r){if(1&e&&(Wi(r,Ere,5),Wi(r,Fm,5),Wi(r,ZU,5)),2&e){let s;Tt(s=It())&&(n.customTrigger=s.first),Tt(s=It())&&(n.options=s),Tt(s=It())&&(n.optionGroups=s)}},hostAttrs:["role","combobox","aria-autocomplete","none","aria-haspopup","listbox",1,"mat-mdc-select"],hostVars:19,hostBindings:function(e,n){1&e&&ke("keydown",function(s){return n._handleKeydown(s)})("focus",function(){return n._onFocus()})("blur",function(){return n._onBlur()}),2&e&&(Dt("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()),ln("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:FR,useExisting:i},{provide:KU,useExisting:i}]),lt],ngContentSelectors:xre,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&&(rr(bre),$(0,"div",0,1),ke("click",function(){return n.toggle()}),$(3,"div",2),fe(4,mre,2,1,"span",3),fe(5,vre,3,2,"span",4),j(),$(6,"div",5)(7,"div",6),ki(),$(8,"svg",7),Oe(9,"path",8),j()()()(),fe(10,yre,3,9,"ng-template",9),ke("backdropClick",function(){return n.close()})("attach",function(){return n._onAttached()})("detach",function(){return n.close()})),2&e){const r=ir(1);Dt("aria-owns",n.panelOpen?n.id+"-panel":null),V(3),U("ngSwitch",n.empty),Dt("id",n._valueId),V(1),U("ngSwitchCase",!0),V(1),U("ngSwitchCase",!1),V(5),U("cdkConnectedOverlayPanelClass",n._overlayPanelClass)("cdkConnectedOverlayScrollStrategy",n._scrollStrategy)("cdkConnectedOverlayOrigin",n._preferredOverlayOrigin||r)("cdkConnectedOverlayOpen",n.panelOpen)("cdkConnectedOverlayPositions",n._positions)("cdkConnectedOverlayWidth",n._overlayWidth)}},dependencies:[dm,_y,LT,rB,vU,NI],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:[wre.transformPanel]},changeDetection:0}),i})(),LH=(()=>{class i{}return i.\u0275fac=function(e){return new(e||i)},i.\u0275mod=en({type:i}),i.\u0275inj=Wt({providers:[Sre],imports:[ao,Rm,ZI,Qn,Yy,hC,ZI,Qn]}),i})();function Ire(i,t){if(1&i&&($(0,"mat-label"),Ve(1),j()),2&i){const e=re(3);V(1),ui(e.resource.name)}}function Rre(i,t){if(1&i&&($(0,"mat-option",6),Ve(1),j()),2&i){const e=t.$implicit,n=re(3);U("value",e[1])("disabled",n.disabled),V(1),Xi(" ",e[1]," ")}}function kre(i,t){if(1&i){const e=Kn();$(0,"mat-form-field",3),fe(1,Ire,2,1,"mat-label",0),$(2,"mat-select",4),ke("valueChange",function(r){return Ht(e),Et(re(2).resource.data=r)})("selectionChange",function(){return Ht(e),Et(re(2).changed.emit())}),fe(3,Rre,2,3,"mat-option",5),j()()}if(2&i){const e=re(2);U("matTooltip",e.resourceDescription),V(1),U("ngIf",e.resource.name),V(1),U("value",e.resource.data)("disabled",e.disabled),V(1),U("ngForOf",e.resource.schema.enum_names)}}function Pre(i,t){if(1&i&&($(0,"mat-label"),Ve(1),j()),2&i){const e=re(3);V(1),ui(e.resource.name)}}function Ore(i,t){if(1&i){const e=Kn();$(0,"mat-form-field",3),fe(1,Pre,2,1,"mat-label",0),$(2,"input",7),ke("ngModelChange",function(r){return Ht(e),Et(re(2).resource.data=r)})("change",function(){return Ht(e),Et(re(2).changed.emit())}),j()()}if(2&i){const e=re(2);U("matTooltip",e.resourceDescription),V(1),U("ngIf",e.resource.name),V(1),U("min",0)("max",256*(e.resource.schema.length||1)-1)("ngModel",e.resource.data)}}function Fre(i,t){if(1&i&&($r(0),fe(1,kre,4,5,"mat-form-field",1),fe(2,Ore,3,5,"ng-template",null,2,kc),Wr()),2&i){const e=ir(3),n=re();V(1),U("ngIf",n.isKnownEnumValue(n.resource.data))("ngIfElse",e)}}let Lre=(()=>{class i{constructor(){this.resource=null,this.resourceDescription="",this.disabled=!1,this.changed=new $e}isKnownEnumValue(e){return!!this.resource?.schema.enum_names.find(([n,r])=>r==e)}}return i.\u0275fac=function(e){return new(e||i)},i.\u0275cmp=st({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&&fe(0,Fre,4,2,"ng-container",0),2&e&&U("ngIf",n.resource)},dependencies:[oo,vi,Wl,Uh,jc,Gh,Hh,fu,ql,qo,Yc,Os,db,Fm],changeDetection:0}),i})();const Nre=["*"],Ure=["unscopedContent"];function Vre(i,t){1&i&&Yt(0,4)}function zre(i,t){if(1&i&&($(0,"div",11),Oe(1,"input",12),$(2,"div",13),ki(),$(3,"svg",14),Oe(4,"path",15),j(),pa(),Oe(5,"div",16),j()()),2&i){const e=re();ln("mdc-checkbox--disabled",e.disabled),V(1),U("checked",e.selected)("disabled",e.disabled)}}function Hre(i,t){if(1&i&&($(0,"div",17),Oe(1,"input",18),$(2,"div",19),Oe(3,"div",20)(4,"div",21),j()()),2&i){const e=re();ln("mdc-radio--disabled",e.disabled),V(1),U("checked",e.selected)("disabled",e.disabled)}}function Gre(i,t){}function $re(i,t){if(1&i&&($(0,"span",22),fe(1,Gre,0,0,"ng-template",23),j()),2&i){re();const e=ir(3);V(1),U("ngTemplateOutlet",e)}}function Wre(i,t){}function jre(i,t){if(1&i&&($(0,"span",24),fe(1,Wre,0,0,"ng-template",23),j()),2&i){re();const e=ir(5);V(1),U("ngTemplateOutlet",e)}}function Yre(i,t){}function qre(i,t){1&i&&fe(0,Yre,0,0,"ng-template",23),2&i&&(re(),U("ngTemplateOutlet",ir(1)))}function Xre(i,t){}function Kre(i,t){if(1&i&&($(0,"span",25),fe(1,Xre,0,0,"ng-template",23),j()),2&i){re();const e=ir(3);V(1),U("ngTemplateOutlet",e)}}function Zre(i,t){}function Qre(i,t){if(1&i&&($(0,"span",25),fe(1,Zre,0,0,"ng-template",23),j()),2&i){re();const e=ir(5);V(1),U("ngTemplateOutlet",e)}}function Jre(i,t){}function ese(i,t){1&i&&fe(0,Jre,0,0,"ng-template",23),2&i&&(re(),U("ngTemplateOutlet",ir(1)))}const tse=[[["","matListItemTitle",""]],[["","matListItemLine",""]],"*",[["mat-divider"]],[["","matListItemAvatar",""],["","matListItemIcon",""]]],nse=["[matListItemTitle]","[matListItemLine]","*","mat-divider","[matListItemAvatar],[matListItemIcon]"],NH=new me("ListOption");let ise=(()=>{class i{constructor(e){this._elementRef=e}}return i.\u0275fac=function(e){return new(e||i)(E(mt))},i.\u0275dir=ve({type:i,selectors:[["","matListItemTitle",""]],hostAttrs:[1,"mat-mdc-list-item-title","mdc-list-item__primary-text"]}),i})(),rse=(()=>{class i{constructor(e){this._elementRef=e}}return i.\u0275fac=function(e){return new(e||i)(E(mt))},i.\u0275dir=ve({type:i,selectors:[["","matListItemLine",""]],hostAttrs:[1,"mat-mdc-list-item-line","mdc-list-item__secondary-text"]}),i})(),BH=(()=>{class i{constructor(e){this._listOption=e}_isAlignedAtStart(){return!this._listOption||"after"===this._listOption?._getTogglePosition()}}return i.\u0275fac=function(e){return new(e||i)(E(NH,8))},i.\u0275dir=ve({type:i,hostVars:4,hostBindings:function(e,n){2&e&&ln("mdc-list-item__start",n._isAlignedAtStart())("mdc-list-item__end",!n._isAlignedAtStart())}}),i})(),sse=(()=>{class i extends BH{}return i.\u0275fac=function(){let t;return function(n){return(t||(t=ri(i)))(n||i)}}(),i.\u0275dir=ve({type:i,selectors:[["","matListItemAvatar",""]],hostAttrs:[1,"mat-mdc-list-item-avatar"],features:[lt]}),i})(),ose=(()=>{class i extends BH{}return i.\u0275fac=function(){let t;return function(n){return(t||(t=ri(i)))(n||i)}}(),i.\u0275dir=ve({type:i,selectors:[["","matListItemIcon",""]],hostAttrs:[1,"mat-mdc-list-item-icon"],features:[lt]}),i})();const ase=new me("MAT_LIST_CONFIG");let YR=(()=>{class i{constructor(){this._isNonInteractive=!0,this._disableRipple=!1,this._disabled=!1,this._defaultOptions=Lt(ase,{optional:!0})}get disableRipple(){return this._disableRipple}set disableRipple(e){this._disableRipple=tn(e)}get disabled(){return this._disabled}set disabled(e){this._disabled=tn(e)}}return i.\u0275fac=function(e){return new(e||i)},i.\u0275dir=ve({type:i,hostVars:1,hostBindings:function(e,n){2&e&&Dt("aria-disabled",n.disabled)},inputs:{disableRipple:"disableRipple",disabled:"disabled"}}),i})(),UH=(()=>{class i{set lines(e){this._explicitLines=ks(e,null),this._updateItemLines(!1)}get disableRipple(){return this.disabled||this._disableRipple||this._noopAnimations||!!this._listBase?.disableRipple}set disableRipple(e){this._disableRipple=tn(e)}get disabled(){return this._disabled||!!this._listBase?.disabled}set disabled(e){this._disabled=tn(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 Qt,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 Om(this,this._ngZone,this._hostElement,this._platform),this._rippleRenderer.setupTriggerEvents(this._hostElement)}_monitorProjectedLinesAndTitle(){this._ngZone.runOutsideAngular(()=>{this._subscriptions.add(Cr(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)(E(mt),E(ft),E(YR,8),E(zi),E(KI,8),E(kr,8))},i.\u0275dir=ve({type:i,contentQueries:function(e,n,r){if(1&e&&(Wi(r,sse,4),Wi(r,ose,4)),2&e){let s;Tt(s=It())&&(n._avatars=s),Tt(s=It())&&(n._icons=s)}},hostVars:4,hostBindings:function(e,n){2&e&&(Dt("aria-disabled",n.disabled)("disabled",n._isButtonElement&&n.disabled||null),ln("mdc-list-item--disabled",n.disabled))},inputs:{lines:"lines",disableRipple:"disableRipple",disabled:"disabled"}}),i})();const VH=new me("SelectionList");let vC=(()=>{class i extends UH{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=tn(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 $e,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)(E(mt),E(ft),E(VH),E(zi),E(si),E(KI,8),E(kr,8))},i.\u0275cmp=st({type:i,selectors:[["mat-list-option"]],contentQueries:function(e,n,r){if(1&e&&(Wi(r,rse,5),Wi(r,ise,5)),2&e){let s;Tt(s=It())&&(n._lines=s),Tt(s=It())&&(n._titles=s)}},viewQuery:function(e,n){if(1&e&&Zn(Ure,5),2&e){let r;Tt(r=It())&&(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&&ke("blur",function(){return n._handleBlur()})("click",function(){return n._toggleOnInteraction()}),2&e&&(Dt("aria-selected",n.selected),ln("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:UH,useExisting:i},{provide:NH,useExisting:i}]),lt],ngContentSelectors:nse,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&&(rr(tse),fe(0,Vre,1,0,"ng-template",null,0,kc),fe(2,zre,6,4,"ng-template",null,1,kc),fe(4,Hre,5,4,"ng-template",null,2,kc),fe(6,$re,2,1,"span",3),fe(7,jre,2,1,"span",4),fe(8,qre,1,1,"ng-template",5),$(9,"span",6),Yt(10),Yt(11,1),$(12,"span",7,8),ke("cdkObserveContent",function(){return n._updateItemLines(!0)}),Yt(14,2),j()(),fe(15,Kre,2,1,"span",9),fe(16,Qre,2,1,"span",9),fe(17,ese,1,1,"ng-template",5),Yt(18,3),Oe(19,"div",10)),2&e&&(V(6),U("ngIf",n._hasCheckboxAt("before")),V(1),U("ngIf",n._hasRadioAt("before")),V(1),U("ngIf",n._hasIconsOrAvatarsAt("before")),V(7),U("ngIf",n._hasCheckboxAt("after")),V(1),U("ngIf",n._hasRadioAt("after")),V(1),U("ngIf",n._hasIconsOrAvatarsAt("after")))},dependencies:[xU,vi,vy],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 lse={provide:Do,useExisting:Gn(()=>yC),multi:!0};class cse{constructor(t,e){this.source=t,this.options=e}}let yC=(()=>{class i extends YR{get multiple(){return this._multiple}set multiple(e){const n=tn(e);n!==this._multiple&&(this._multiple=n,this.selectedOptions=new BR(this._multiple,this.selectedOptions.selected))}get hideSingleSelectionIndicator(){return this._hideSingleSelectionIndicator}set hideSingleSelectionIndicator(e){this._hideSingleSelectionIndicator=tn(e)}constructor(e,n){super(),this._element=e,this._ngZone=n,this._initialized=!1,this._destroyed=new Ie,this._onChange=r=>{},this.selectionChange=new $e,this.color="accent",this.compareWith=(r,s)=>r===s,this._multiple=!0,this._hideSingleSelectionIndicator=this._defaultOptions?.hideSingleSelectionIndicator??!1,this.selectedOptions=new BR(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 cse(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=tn(e),this._selectionListDisabled&&this._keyManager?.setActiveItem(-1)}registerOnChange(e){this._onChange=e}registerOnTouched(e){this._onTouched=e}_watchForSelectionChange(){this.selectedOptions.changed.pipe(He(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()&&Yo(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 DU(this._items).withHomeAndEnd().withTypeAhead().withWrap().skipPredicate(()=>this.disabled),this._resetActiveOption(),this._keyManager.change.subscribe(e=>this._setActiveOption(e)),this._items.changes.pipe(He(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=IM();return e&&this._element.nativeElement.contains(e)}}return i.\u0275fac=function(e){return new(e||i)(E(mt),E(ft))},i.\u0275cmp=st({type:i,selectors:[["mat-selection-list"]],contentQueries:function(e,n,r){if(1&e&&Wi(r,vC,5),2&e){let s;Tt(s=It())&&(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&&ke("keydown",function(s){return n._handleKeydown(s)}),2&e&&Dt("aria-multiselectable",n.multiple)},inputs:{color:"color",compareWith:"compareWith",multiple:"multiple",hideSingleSelectionIndicator:"hideSingleSelectionIndicator",disabled:"disabled"},outputs:{selectionChange:"selectionChange"},exportAs:["matSelectionList"],features:[An([lse,{provide:YR,useExisting:i},{provide:VH,useExisting:i}]),lt,xi],ngContentSelectors:Nre,decls:1,vars:0,template:function(e,n){1&e&&(rr(),Yt(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})(),dse=(()=>{class i{}return i.\u0275fac=function(e){return new(e||i)},i.\u0275mod=en({type:i}),i.\u0275inj=Wt({imports:[BI,ao,Qn,Qy,XU,DV]}),i})();function use(i,t){if(1&i&&($(0,"mat-label"),Ve(1),j()),2&i){const e=re(2);V(1),ui(e.resource.name)}}function hse(i,t){if(1&i&&($(0,"mat-list-option",5),Ve(1),j()),2&i){const e=t.$implicit,n=re(2);U("value",e.key)("selected",n.resource.data[e.key])("disabled",n.disabled),V(1),Xi(" ",e.key," ")}}function fse(i,t){if(1&i){const e=Kn();$r(0,1),fe(1,use,2,1,"mat-label",2),$(2,"mat-selection-list",3),ke("selectionChange",function(r){return Ht(e),Et(re().onSelection(r))}),fe(3,hse,2,4,"mat-list-option",4),gt(4,"keyvalue"),j(),Wr()}if(2&i){const e=re();U("matTooltip",e.resourceDescription),V(1),U("ngIf",e.resource.name),V(1),U("disabled",e.disabled),V(1),U("ngForOf",yt(4,4,e.resource.data))}}let pse=(()=>{class i{constructor(){this.resource=null,this.resourceDescription="",this.disabled=!1,this.changed=new $e}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=st({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&&fe(0,fse,5,6,"ng-container",0),2&e&&U("ngIf",n.resource)},dependencies:[oo,vi,qo,Os,yC,vC,oB],styles:["[_nghost-%COMP%]{padding-bottom:1.34375em}"],changeDetection:0}),i})();class zH{get tick$(){return this._tick$.asObservable()}get children(){return[...this._children]}constructor(t){this.parent=t,this._tick$=new Ie,this._children=[],t&&t.addChild(this)}addChild(t){if(t.parent!==this)throw new Error("Incorrect child clock");this._children.includes(t)||this._children.push(t)}removeChild(t){if(t.parent!==this)throw new Error("Incorrect child clock");this._children=this._children.filter(e=>e!==t)}dispose(){this.parent&&this.parent.removeChild(this);for(const t of this._children)t.dispose();this._tick$.complete()}}const gse=typeof performance>"u"?()=>Date.now():()=>performance.now();class $m extends zH{static get instance(){return $m._instance||($m._instance=new $m),$m._instance}get elapsedTime(){return gse()}constructor(){super(null);let t=this.elapsedTime;const e=()=>{requestAnimationFrame(e);const n=t,r=this.elapsedTime;t=r,this._tick$.next([n,r-n])};requestAnimationFrame(e)}dispose(){throw new Error("Cannot dispose global clock")}}class HH extends zH{get isRunning(){return!!this.tickSub}get isPaused(){return-1!==this.pausedAt}get isStopped(){return-1===this.startedAt}get timeScale(){return this._timeScale}set timeScale(t){if(t!==this._timeScale||this.pausedByTimescale&&0!==t){if(0===t)return void(this.isPaused||(this.pause(),this.pausedByTimescale=!0));if(this.isPaused&&this.pausedByTimescale&&(this.resume(),this.pausedByTimescale=!1),!this.isStopped){const e=this.isPaused?this.pausedAt:this.parentClock.elapsedTime;this.startedAt=e-(e-this.startedAt)*this.timeScale/t}this._timeScale=t}}get elapsedTime(){return this.isStopped?this.lastStopElapsed:this.isPaused?this._timeScale*(this.pausedAt-this.startedAt):this._timeScale*(this.parentClock.elapsedTime-this.startedAt)}constructor(t=!1,e=$m.instance){super(e),this.parentClock=e,this.tickSub=null,this._internalTick$=new Ie,this.tickRateLimit=0,this.paused$=new Ie,this.startedAt=-1,this.oldRelativeTime=0,this.pausedAt=-1,this.lastStopElapsed=0,this._timeScale=1,this.pausedByTimescale=!1,this.lastFiredTickElapsed=0,t&&this.start(),this._internalTick$.pipe(et(([n,r])=>[r,r-this.lastFiredTickElapsed]),vn(([n])=>!this.tickRateLimit||Math.floor(this.lastFiredTickElapsed*this.tickRateLimit/1e3)this.lastFiredTickElapsed=n)).subscribe(this._tick$)}start(){this.isRunning||(this.oldRelativeTime=0,this.startedAt=this.parentClock.elapsedTime,this.startListeningTicks())}stop(){this.stopListeningTicks(),this.lastStopElapsed=this.elapsedTime,this.startedAt=this.pausedAt=-1}pause(){this.stopListeningTicks(),this.pausedAt=this.parentClock.elapsedTime,this.pausedByTimescale=!1,this.paused$.next(!0)}resume(){this.isRunning||-1==this.pausedAt||(this.startedAt+=this.parentClock.elapsedTime-this.pausedAt,this.pausedAt=-1,this.startListeningTicks(),this.paused$.next(!1))}startListeningTicks(){if(this.tickSub)throw new Error("Clock is already ticking!");this.tickSub=this.parentClock.tick$.pipe(et(([t,e])=>[this.oldRelativeTime,this.oldRelativeTime+e*this.timeScale]),Vi(([t,e])=>this.oldRelativeTime=e)).subscribe(this._internalTick$)}stopListeningTicks(){var t;null===(t=this.tickSub)||void 0===t||t.unsubscribe(),this.tickSub=null}dispose(){this.stopListeningTicks(),this._internalTick$.complete(),super.dispose()}}const _se={transparent:!1,background:0,size:"fullscreen",antialias:!0};class vse{constructor(t,e,n={}){this.scene=t,this.canvas=e,this.entity=null,this.rendererOptions=Object.assign(Object.assign({},_se),n||{})}}class ub{static fromArray(t,e=!1){const n=new ub(t[0]);let r=n;for(let s=1;sn.map(r=>new ub(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]}constructor(t){this.data=t,this.adjacent=new Set}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(d=>!e.has(d));for(const d of c)e.add(d),r.push([d,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 qh=(()=>{class i{constructor(){this.tick$=new Ie,this._world=null,this._name="e0x"+(i.default_name_counter++).toString(16),this._selfActive=!0,this.parent=null,this._children=[],this._components=[],this._onSpawned$=new Ie,this._onRemoved$=new Ie}get world(){return this._world}get name(){return this._name}set name(e){this._name=e}get active(){return this._selfActive&&(!this.parent||this.parent.active)}set active(e){this._selfActive=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 yse extends qh{constructor(t){super(),this.tickOrder=t}}function qR(i,t=Kl.CONTROLLERS,e){const n=new yse(t);return e&&(n.name=e),i.addEntity(n),n.tick$.pipe(iu(()=>{i.removeEntity(n,!0)}))}class XR extends qh{get rendererSize$(){return this._rendererSize$.asObservable()}get rendererSize(){return this._rendererSize$.getValue()}get rendererOptions(){return this.renderer.rendererOptions}get physicsDebugViewActive(){return this.renderer.physicsDebugViewActive}set physicsDebugViewActive(t){this.renderer.physicsDebugViewActive=t}constructor(t){super(),this.renderer=t,this.tickOrder=Kl.RENDERING,this._rendererSize$=new at(null),this.addComponents(t),this.tick$.subscribe(()=>{this.renderer.render()})}onSpawned(t){this._rendererSize$.next(null),"fullscreen"==this.rendererOptions.size||"function"==typeof this.rendererOptions.size?(this.renderer.canvas&&(this.renderer.canvas.style.position="absolute"),Cr(Ao(window,"resize").pipe(Hy(100)),Ao(window,"orientationchange")).pipe(He(this._onRemoved$),et(()=>({x:window.innerWidth,y:window.innerHeight})),Eo({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 Tn||void 0!==this.rendererOptions.size.subscribe&&void 0!==this.rendererOptions.size.pipe?this.rendererOptions.size.pipe(He(this._onRemoved$)).subscribe(e=>{this._rendererSize$.next(e)}):this._rendererSize$.next(this.rendererOptions.size),this._rendererSize$.pipe(He(this._onRemoved$),zc((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 KR=i=>{i.updateVisibility?i.updateVisibility():GH(i)},GH=i=>{for(const t of i.children)KR(t)};class bse extends qh{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(){GH(this)}addChildren(...t){super.addChildren(...t);for(const e of t)KR(e)}removeChildren(t,e=!1){if(super.removeChildren(t,e),!e)for(const n of t)KR(n)}}class ZR{constructor(){this._running=!1,this.stop$=new Ie}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 xse extends ZR{get output$(){return this._output$.asObservable()}constructor(t,e){super(),this.keyboard=t,this.keymap=e,this._output$=new Ie}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")),Aa(t.map(e=>this.keyboard.bindMany(...e))).pipe(He(this.stop$),et(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 QR=new Tn(ms);class bC extends ZR{constructor(){super(),this.bindings={},this.skipKeyDownsOnExternalFocus=!0,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 at(!1);return this.bindings[t].push(e),e.pipe(zc(),iu(()=>{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"),QR;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 at(!1);this.bindings[n].push(r),e.push(r)}return Aa(e).pipe(iu(()=>{for(let n=0;nn.includes(!0)),zc())}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 bC.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)}}bC.externalFocusBlacklist=[HTMLInputElement,HTMLTextAreaElement,HTMLSelectElement,HTMLButtonElement];class yi{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 yi.len(yi.sub(t,e))}static norm(t){const e=yi.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 Mse={pointerLock:!1};var Fs=(()=>{return(i=Fs||(Fs={}))[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",Fs;var i})();class Wm extends ZR{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$=Ao(this._element,"wheel",{passive:!1}).pipe(He(this.stopped$),iu(()=>this._wheel$=null),Vi(t=>t.preventDefault()),et(t=>t.deltaY),Bf())),this._wheel$}get isPointerLocked(){return!!document.pointerLockElement}get isPointerLocked$(){return Ao(document,"pointerlockchange").pipe(et(()=>this.isPointerLocked))}get state(){return this._state$.getValue()}get state$(){return this._state$.asObservable()}get multiTouchPositions$(){return this._multiTouchPositions$.asObservable()}get twoTouchGestureDelta$(){return this.state$.pipe(Rs(t=>t==Fs.DRAG_TOUCH_TWO_FINGERS?this.multiTouchPositions$:QR),et(t=>t.map(e=>({x:e.x,y:e.y}))),function wse(){return ti((i,t)=>{let e,n=!1;i.subscribe(jn(t,r=>{const s=e;e=r,n&&t.next([s,r]),n=!0}))})}(),vn(([t,e])=>t.length>1&&e.length>1),et(([t,e])=>({centerPointDelta:yi.sub(yi.scalarMult(e.reduce((n,r)=>yi.add(n,r),yi.O),1/e.length),yi.scalarMult(t.reduce((n,r)=>yi.add(n,r),yi.O),1/e.length)),angleDelta:yi.angle(e[1],e[0])-yi.angle(t[1],t[0]),distanceDelta:yi.dist(e[1],e[0])-yi.dist(t[1],t[0])})))}get _element(){return this.options.canvas||window}constructor(t={}){super(),this._wheel$=null,this._delta$=new Ie,this._position$=new at(yi.O),this._multiTouchPositions$=new at([]),this.stopped$=new Ie,this._state$=new at(Fs.NONE),this.options=Object.assign(Object.assign({},Mse),t),this.canvasClickListener=this.canvasClickListener.bind(this)}startInternal(){this.options.canvas&&(this.options.canvas.style.touchAction="none"),this._state$.next(Fs.NONE);const t=[Fs.DRAG,Fs.DRAG_MIDDLE_BUTTON,Fs.DRAG_RIGHT_BUTTON],e=[Fs.NONE,Fs.DRAG,Fs.DRAG_TOUCH_TWO_FINGERS],n=[],r={};Ao(this._element,"mousemove").pipe(He(this.stopped$)).subscribe(o=>{this._delta$.next({x:o.movementX,y:o.movementY})}),Ao(this._element,"pointermove").pipe(He(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})}),!Wm.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{if(0===n.length)try{this.options.canvas&&this.options.canvas.setPointerCapture(o.pointerId),window.addEventListener("pointerup",s),this._element.addEventListener("pointercancel",s)}catch(a){console.error(a)}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]||Fs.NONE)}),Ao(this._element,"contextmenu").pipe(He(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 Cse{static lookAt(t,e,n){let r=Ne.sub(t,e);r=0===Ne.lenSq(r)?Object.assign(Object.assign({},r),{z:1}):Ne.norm(r);let s=Ne.cross(n,r);0===Ne.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=Ne.norm(r),s=Ne.cross(n,r)),s=Ne.norm(s);let o=Ne.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,d=t.w*Math.sin((1-n)*s)/o+e.w*Math.sin(n*s)/o;return isNaN(a)||isNaN(l)||isNaN(c)||isNaN(d)?gr.clone(t):{x:a,y:l,z:c,w:d}}static fromAngle(t,e){const n=e/2,r=Math.sin(n);return Object.assign(Object.assign({},Ne.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],d=t[10],h=e+o+d;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>d){const p=2*Math.sqrt(1+e-o-d);return{x:.25*p,y:(n+s)/p,z:(r+l)/p,w:(c-a)/p}}if(o>d){const p=2*Math.sqrt(1+o-e-d);return{x:(n+s)/p,y:.25*p,z:(a+c)/p,w:(r-l)/p}}{const p=2*Math.sqrt(1+d-e-o);return{x:(r+l)/p,y:(a+c)/p,z:.25*p,w:(s-n)/p}}}static fromMatrix3(t){const e=t[0][0]+t[1][1]+t[2][2];let n,r,s,o;if(e>0){const a=.5/Math.sqrt(e+1);n=.25/a,r=(t[2][1]-t[1][2])*a,s=(t[0][2]-t[2][0])*a,o=(t[1][0]-t[0][1])*a}else if(t[0][0]>t[1][1]&&t[0][0]>t[2][2]){const a=2*Math.sqrt(1+t[0][0]-t[1][1]-t[2][2]);n=(t[2][1]-t[1][2])/a,r=.25*a,s=(t[0][1]+t[1][0])/a,o=(t[0][2]+t[2][0])/a}else if(t[1][1]>t[2][2]){const a=2*Math.sqrt(1+t[1][1]-t[0][0]-t[2][2]);n=(t[0][2]-t[2][0])/a,r=(t[0][1]+t[1][0])/a,s=.25*a,o=(t[1][2]+t[2][1])/a}else{const a=2*Math.sqrt(1+t[2][2]-t[0][0]-t[1][1]);n=(t[1][0]-t[0][1])/a,r=(t[0][2]+t[2][0])/a,s=(t[1][2]+t[2][1])/a,o=.25*a}return{w:n,x:r,y:s,z:o}}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),d=Math.sin(.5*e);return{w:c*a*s+d*l*o,x:d*a*s-c*l*o,y:c*l*s+d*a*o,z:c*a*o-d*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=Ne.Z){return this.fromMatrix4(Cse.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 Ne{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 Ne.len(Ne.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=Ne.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)}}}function JR(i,t,e,n){return r=>r.pipe(ZT((s,o)=>{var a;return{targetValue:o,currentValue:null!==(a=s.currentValue)&&void 0!==a?a:o,hasReachedTarget:!1}},{targetValue:null,currentValue:null,hasReachedTarget:!1}),Rs(s=>i.pipe(et(([o,a])=>{if(null===s.targetValue||null===s.currentValue)return s.currentValue;if(s.hasReachedTarget)return;const l=1-Math.exp(-a/t),c=e(s.currentValue,s.targetValue,l);return s.currentValue=c,n(c,s.targetValue)?(s.hasReachedTarget=!0,s.targetValue):c}))),et(s=>void 0!==s?s:null),vn(s=>null!==s))}ps(738);class Ase extends qh{get avgReport(){return this._avgReport}get peakReport(){return this._peakReport}constructor(t=60,e=15){super(),this.maxSamples=t,this.maxRows=e,this.tickOrder=Number.MAX_SAFE_INTEGER,this.sampleIndex=0,this.collectedData=new Map,this._avgReport={totalTime:0,entries:[]},this._peakReport={totalTime:0,entries:[]}}onSpawned(t){super.onSpawned(t),this.sampleIndex=0;const e=()=>(typeof performance>"u"?Date:performance).now();this.world.tickForwardTo$.pipe(He(this.onRemoved$)).subscribe(n=>{n!==this&&(this.collectedData.has(n)?this.collectedData.get(n).push([this.sampleIndex,e(),0]):this.collectedData.set(n,[[this.sampleIndex,e(),0]]))}),this.world.tickForwardedTo$.pipe(He(this.onRemoved$)).subscribe(n=>{if(n===this)return;const r=this.collectedData.get(n);r[r.length-1][2]=e()}),this.tick$.pipe(He(this.onRemoved$)).subscribe(()=>{this.sampleIndex++;const n=Array.from(this.collectedData.entries());for(const[h,p]of n){for(;p.length>0&&p[0][0]h instanceof qh?""===h.name?h.constructor.name:h.name:"PHYSICS_WORLD"===h?"Physics simulation":h,s=h=>{let p=0,m=0;for(;mh.length-m+1){m--;break}p+=h[h.length-m-1][1]}return m>1&&(h=h.slice(0,h.length-m)).push([`Rest (${m})`,p]),h};let o=0,a=Array.from(this.collectedData.entries()).map(([h,p])=>{const m=p.reduce((g,[b,v,y])=>g+y-v,0)/this.maxSamples;return o+=m,[r(h),m]}).sort((h,p)=>p[1]-h[1]);a=s(a),this._avgReport={totalTime:o,entries:a};let l=new Map,c=Array.from(this.collectedData.entries()).map(([h,p])=>{let m=0;for(const[g,b,v]of p){const y=v-b;m=Math.max(m,y),l.set(g,y+(l.get(g)||0))}return[r(h),m]}).sort((h,p)=>p[1]-h[1]);c=s(c);let d=Array.from(l.values()).reduce((h,p)=>Math.max(h,p),0);this._peakReport={totalTime:d,entries:c}})}onRemoved(){super.onRemoved(),this.collectedData=new Map,this._avgReport={totalTime:0,entries:[]},this._peakReport={totalTime:0,entries:[]}}}var jm=function(i,t,e,n){return new(e||(e=Promise))(function(s,o){function a(d){try{c(n.next(d))}catch(h){o(h)}}function l(d){try{c(n.throw(d))}catch(h){o(h)}}function c(d){d.done?s(d.value):function r(s){return s instanceof e?s:new e(function(o){o(s)})}(d.value).then(a,l)}c((n=n.apply(i,t||[])).next())})};class fl{static get documentWorlds(){return[...fl._documentWorlds]}constructor(t,e){this.visualScene=t,this.physicsWorld=e,this.worldClock=new HH(!1),this.keyboardInput=new bC,this.name="w0x"+(fl.default_name_counter++).toString(16),this.children=[],this.tickListeners=[],this.tickStarted$=new Ie,this.tickForwardTo$=new Ie,this.tickForwardedTo$=new Ie,this.paused$=new Ie,this.disposed$=new Ie,this.keyboardInput.start(),window.ggstatic?this.registerConsoleCommands(window.ggstatic):(this.onGgStaticInitialized=this.onGgStaticInitialized.bind(this),window.addEventListener("ggstatic_added",this.onGgStaticInitialized)),this.worldClock.paused$.subscribe(this.paused$),fl._documentWorlds.push(this),fl.worldCreated$.next(this)}init(){return jm(this,void 0,void 0,function*(){yield Promise.all([this.physicsWorld.init(),this.visualScene.init()]);const t=(e,n,r)=>{e.active&&(this.tickForwardTo$.next(e),e.tick$.next([n,r]),this.tickForwardedTo$.next(e))};this.worldClock.tick$.subscribe(([e,n])=>{this.tickStarted$.next();let r=0;for(;r=Kl.PHYSICS_SIMULATION);r++)t(this.tickListeners[r],e,n);for(this.tickForwardTo$.next("PHYSICS_WORLD"),this.physicsWorld.simulate(n),this.tickForwardedTo$.next("PHYSICS_WORLD");re.tickOrder-n.tickOrder),t.onSpawned(this))}removeEntity(t,e=!1){if(t.world){if(t.world!==this)throw new Error("Entity is not a part of this world");this.children.splice(this.children.findIndex(n=>n===t),1),this.tickListeners.splice(this.tickListeners.findIndex(n=>n===t),1),t.onRemoved()}e&&t.dispose()}onGgStaticInitialized(){window.removeEventListener("ggstatic_added",this.onGgStaticInitialized),this.registerConsoleCommands(window.ggstatic)}registerConsoleCommands(t){t.registerConsoleCommand(this,"timescale",(...e)=>jm(this,void 0,void 0,function*(){return isNaN(+e[0])||(this.worldClock.timeScale=+e[0]),this.worldClock.timeScale.toString()}),"args: [ float? ]; Get current time scale of selected world clock or set it. Default value is 1.0 (no time scale applied)"),t.registerConsoleCommand(this,"fps_limit",(...e)=>jm(this,void 0,void 0,function*(){return isNaN(+e[0])||(this.worldClock.tickRateLimit=+e[0]),this.worldClock.tickRateLimit.toString()}),"args: [ int? ]; Get current tick rate limit of selected world clock or set it. 0 means no limit applied"),t.registerConsoleCommand(this,"renderers",()=>jm(this,void 0,void 0,function*(){return this.children.filter(e=>e instanceof XR).map(e=>e.name).join("\n")}),"no args; Print all renderers in selected world"),t.registerConsoleCommand(this,"debug_view",(...e)=>jm(this,void 0,void 0,function*(){let r,n="toggle";for(let o of e)["1","0"].includes(o)?n="1"===o:r=o;let s=this.children.find(o=>o instanceof XR&&(!r||o.name===r));if(s)return s.physicsDebugViewActive="toggle"===n?!s.physicsDebugViewActive:n,s.physicsDebugViewActive?"1":"0";throw r?new Error(`Renderer with name "${r}" not found`):new Error("No renderer found")}),'args: [ 0|1?, string? ]; Turn on/off physics debug view, skip first argument to toggle value. Second argument expects renderer name, if not provided first renderer will be picked. Use "renderers" to get list of renderers in the world'),t.registerConsoleCommand(this,"performance",(...e)=>jm(this,void 0,void 0,function*(){let n="avg",r=20;for(let d of e)["avg","peak"].includes(d)?n=d:isNaN(+d)||(r=+d);const s=new Ase(r,250);this.addEntity(s),yield function Sse(i,t){const e="object"==typeof t;return new Promise((n,r)=>{let o,s=!1;i.subscribe({next:a=>{o=a,s=!0},error:r,complete:()=>{s?n(o):e?n(t.defaultValue):r(new um)}})})}(this.worldClock.tick$.pipe(Oi(r)));const o="avg"===n?s.avgReport:s.peakReport;this.removeEntity(s);const a=o.entries.map(([d,h])=>`${d}:`+new Array(Math.max(0,26-d.length)).join(" ")+`${h.toFixed(2)} ms`+("avg"===n?` (${(100*h/o.totalTime).toFixed(2)}%)`:""));let l="lightgreen";o.totalTime>12&&(l=o.totalTime<16?"yellow":"red");const c=("avg"===n?"Average":"Peak")+" Frame time";return a.unshift(c+":"+new Array(Math.max(0,26-c.length)).join(" ")+`${o.totalTime.toFixed(2)} ms`),a.unshift(`Performance report (${r} samples)`),a.join("\n")}),'args: [ int?, avg|peak? ]; Measure how much time was spent per entity in world. Arguments are samples amount (20 by default) and "peak" or "avg" choice, both arguments are optional. "avg" report sorts entities by average time consumed, "peak" records highest value for each entity')}}fl.default_name_counter=0,fl._documentWorlds=[],fl.worldCreated$=new Ie;class Rse extends vse{}class WH extends bse{constructor(){super(...arguments),this._world=null}get world(){return this._world}}class mu extends WH{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}constructor(t){super(),this.tickOrder=Kl.OBJECTS_BINDING,this._position=Ne.O,this._rotation=gr.O,this.object3D=null,this.objectBody=null,t.objectBody&&(this.objectBody=t.objectBody,this.name=this.objectBody.name,this.addComponents(this.objectBody)),t.object3D&&(this.object3D=t.object3D,t.objectBody||(this._position=this.object3D.position,this._rotation=this.object3D.rotation,this.name=this.object3D.name),this.addComponents(this.object3D)),this.objectBody&&(this.tick$.subscribe(()=>{this.runTransformBinding(this.objectBody,this.object3D)}),this.runTransformBinding(this.objectBody,this.object3D))}}class hb extends ub{static fromMapArray(t,e=!1){const n=new hb(t[0]);let r=n;for(let s=1;sn.map(r=>new hb(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));othis.mapGraph.getNearestDummy(this.mapGraphNodes,this.loaderCursor$.getValue())),zc(),Vi(r=>this._nearestDummy$.next(r))).subscribe(r=>{let o,s=new Set;if(this.options.inertia>0){o=new Set;const a=r.walkReadPreserveDepth(this.options.loadDepth+this.options.inertia);for(let l=0;lo.add(c.data)),l<=this.options.loadDepth&&a[l].forEach(c=>s.add(c.data))}else r.walkRead(this.options.loadDepth).forEach(a=>s.add(a.data)),o=s;for(const a of this.loaded.keys())o.has(a)?s.delete(a):n.includes(a)||n.push(a);for(let a of Array.from(s.keys()))e.includes(a)||e.push(a)}),this.tick$.pipe(Eo(null),He(this._onRemoved$)).subscribe(()=>{if(n.length){for(const r of n)this.disposeChunk(r);n=[]}if(e.length)if(this._initialLoadComplete$.value&&e.length>this.options.maxNodesLoadingPerTick){let r=e.slice(0,this.options.maxNodesLoadingPerTick);e=e.slice(this.options.maxNodesLoadingPerTick),Promise.all(r.map(s=>this.loadChunk(s))).then()}else Promise.all(e.map(r=>this.loadChunk(r))).then(()=>{this._initialLoadComplete$.value||this._initialLoadComplete$.next(!0)}),e=[]})}onRemoved(){super.onRemoved(),this.loadClock&&(this.loadClock.stop(),this.loadClock=null),this.loaderCursor$.next(Ne.O)}loadChunk(t){return function(i,t,e,n){return new(e||(e=Promise))(function(s,o){function a(d){try{c(n.next(d))}catch(h){o(h)}}function l(d){try{c(n.throw(d))}catch(h){o(h)}}function c(d){d.done?s(d.value):function r(s){return s instanceof e?s:new e(function(o){o(s)})}(d.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 Fse extends XR{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 XH=function(i,t,e,n){return new(e||(e=Promise))(function(s,o){function a(d){try{c(n.next(d))}catch(h){o(h)}}function l(d){try{c(n.throw(d))}catch(h){o(h)}}function c(d){d.done?s(d.value):function r(s){return s instanceof e?s:new e(function(o){o(s)})}(d.value).then(a,l)}c((n=n.apply(i,t||[])).next())})};const KH={keymap:"wasd",cameraLinearSpeed:20,cameraMovementElasticity:0,cameraBoostMultiplier:2.5,cameraRotationSensitivity:1,cameraRotationElasticity:0,mouseOptions:{},ignoreMouseUnlessPointerLocked:!1,ignoreKeyboardUnlessPointerLocked:!1};class Nse extends qh{get active(){return super.active}set active(t){!super.active&&t&&this.reset(),super.active=t}get spherical(){return this._spherical}set spherical(t){this._spherical.phi=Math.max(1e-6,Math.min(Math.PI-1e-6,t.phi)),this._spherical.theta=t.theta,this.resetMotion$.next()}constructor(t,e,n={}){super(),this.keyboard=t,this.camera=e,this.tickOrder=Kl.INPUT_CONTROLLERS,this._spherical={phi:0,radius:1,theta:0},this.resetMotion$=new Ie,this.options=Object.assign(Object.assign({},KH),n),n.mouseOptions&&(this.options.mouseOptions=Object.assign(Object.assign({},KH.mouseOptions),n.mouseOptions)),this.mouseInput=new Wm(this.options.mouseOptions),this.directionsInput=new xse(t,this.options.keymap)}reset(){this._spherical=Ne.toSpherical(Ne.rot({x:0,y:0,z:-1},this.camera.rotation)),this.resetMotion$.next()}onSpawned(t){const e=Object.create(null,{onSpawned:{get:()=>super.onSpawned}});return XH(this,void 0,void 0,function*(){yield e.onSpawned.call(this,t),this._spherical=Ne.toSpherical(Ne.rot({x:0,y:0,z:-1},this.camera.rotation));const n=["KeyE","KeyQ"];this.camera.camera.supportsFov&&n.push("KeyZ","KeyC"),n.push("ShiftLeft");let r=Aa([this.directionsInput.output$,...n.map(c=>this.keyboard.bind(c))]).pipe(He(this._onRemoved$),et(([c,...d])=>{let h={direction:{},rest:[]};(!this.options.ignoreKeyboardUnlessPointerLocked||this.mouseInput.isPointerLocked)&&(h={direction:c,rest:d});let p=Object.assign({},Ne.O);const[m,g,b,v,y]=h.rest;void 0!==h.direction.upDown&&(p.z=h.direction.upDown?-1:1),void 0!==h.direction.leftRight&&(p.x=h.direction.leftRight?-1:1),m!=g&&(p.y=g?-1:1);let M=0;return b!=v&&(M=b?1:-1),p=Ne.norm(p),y&&(p=Ne.scalarMult(p,this.options.cameraBoostMultiplier)),[p,M]}));this.options.cameraMovementElasticity>0&&(r=r.pipe(JR(this.camera.tick$,this.options.cameraMovementElasticity,([c,d],[h,p],m)=>[Ne.lerp(c,h,m),p],([c,d],[h,p])=>d==p&&Ne.dist(c,h)<.001)));let s=Ne.O,o=0;r.subscribe(([c,d])=>{s=c,o=d});let a=Wm.isTouchDevice(),l=this.mouseInput.delta$.pipe(He(this._onRemoved$),vn(()=>this.active&&(a||!this.options.ignoreMouseUnlessPointerLocked||this.mouseInput.isPointerLocked)));if(this.options.cameraRotationElasticity>0){const c=new at(this._spherical);l.subscribe(h=>{const p=c.getValue();c.next({phi:Math.max(1e-6,Math.min(Math.PI-1e-6,p.phi+h.y*this.options.cameraRotationSensitivity/1e3)),theta:p.theta-h.x*this.options.cameraRotationSensitivity/1e3,radius:1})});const d=()=>{c.pipe(He(this._onRemoved$),JR(this.tick$,this.options.cameraRotationElasticity,(h,p,m)=>({phi:h.phi+m*(p.phi-h.phi),theta:h.theta+m*(p.theta-h.theta),radius:1}),(h,p)=>yi.dist({x:h.phi,y:h.theta},{x:p.phi,y:p.theta})<1e-4),He(this.resetMotion$)).subscribe(h=>{this._spherical.theta=h.theta,this._spherical.phi=h.phi})};this.resetMotion$.pipe(He(this._onRemoved$)).subscribe(()=>{c.next(this._spherical),d()}),d()}else l.subscribe(c=>{this._spherical.theta-=c.x*this.options.cameraRotationSensitivity/1e3,this._spherical.phi+=c.y*this.options.cameraRotationSensitivity/1e3,this._spherical.phi=Math.max(1e-6,Math.min(Math.PI-1e-6,this._spherical.phi))});this.camera.tick$.pipe(He(this._onRemoved$),vn(()=>this.active)).subscribe(([c,d])=>{this.camera.camera.fov+=o,this.camera.position=Ne.add(this.camera.position,Ne.rot(Ne.scalarMult(s,this.options.cameraLinearSpeed*d/1e3),this.camera.rotation)),this.camera.rotation=gr.lookAt(this.camera.position,Ne.add(this.camera.position,Ne.fromSpherical(this._spherical)))}),this.mouseInput.start(),this.directionsInput.start()})}onRemoved(){const t=Object.create(null,{onRemoved:{get:()=>super.onRemoved}});return XH(this,void 0,void 0,function*(){yield t.onRemoved.call(this),yield this.mouseInput.stop(!0),yield this.directionsInput.stop()})}}var ZH=function(i,t,e,n){return new(e||(e=Promise))(function(s,o){function a(d){try{c(n.next(d))}catch(h){o(h)}}function l(d){try{c(n.throw(d))}catch(h){o(h)}}function c(d){d.done?s(d.value):function r(s){return s instanceof e?s:new e(function(o){o(s)})}(d.value).then(a,l)}c((n=n.apply(i,t||[])).next())})};const Bse={mouseOptions:{},orbiting:{sensitivityX:1,sensitivityY:1},orbitingElasticity:0,zooming:{sensitivity:1},panning:{sensitivityX:1,sensitivityY:1},dollying:{sensitivity:1}};class Use extends qh{get active(){return super.active}set active(t){!super.active&&t&&this.reset(),super.active=t}get spherical(){return this._spherical}set spherical(t){this._spherical.phi=Math.max(1e-6,Math.min(Math.PI-1e-6,t.phi)),this._spherical.theta=t.theta,this._spherical.radius=t.radius,this.resetMotion$.next()}constructor(t,e={}){super(),this.camera=t,this.tickOrder=Kl.INPUT_CONTROLLERS,this._spherical={phi:0,radius:10,theta:0},this.target=Ne.O,this.resetMotion$=new Ie,this.options=Object.assign(Object.assign({},Bse),e),this.mouseInput=new Wm(this.options.mouseOptions)}reset(){let t=Ne.dist(this.target,this.camera.position);this.target=Ne.add(this.camera.position,Ne.rot({x:0,y:0,z:-t},this.camera.rotation)),this._spherical=Ne.toSpherical(Ne.sub(this.camera.position,this.target)),this.resetMotion$.next()}onSpawned(t){const e=Object.create(null,{onSpawned:{get:()=>super.onSpawned}});return ZH(this,void 0,void 0,function*(){if(yield e.onSpawned.call(this,t),this._spherical=Ne.toSpherical(Ne.sub(this.camera.position,this.target)),this.options.orbiting){let r=this.mouseInput.delta$.pipe(He(this._onRemoved$),vn(()=>this.active&&this.mouseInput.state==Fs.DRAG));if(this.options.orbitingElasticity>0){const s=new at(this._spherical);r.subscribe(a=>{const l=s.getValue();s.next({phi:Math.max(1e-6,Math.min(Math.PI-1e-6,l.phi-a.y*this.options.orbiting.sensitivityY/1e3)),theta:l.theta-a.x*this.options.orbiting.sensitivityX/1e3,radius:1})});const o=()=>{s.pipe(He(this._onRemoved$),JR(this.tick$,this.options.orbitingElasticity,(a,l,c)=>({phi:a.phi+c*(l.phi-a.phi),theta:a.theta+c*(l.theta-a.theta),radius:1}),(a,l)=>yi.dist({x:a.phi,y:a.theta},{x:l.phi,y:l.theta})<1e-4),He(this.resetMotion$)).subscribe(a=>{this._spherical.theta=a.theta,this._spherical.phi=a.phi})};this.resetMotion$.pipe(He(this._onRemoved$)).subscribe(()=>{s.next(this._spherical),o()}),o()}else r.subscribe(s=>{this._spherical.theta-=s.x*this.options.orbiting.sensitivityX/1e3,this._spherical.phi-=s.y*this.options.orbiting.sensitivityY/1e3,this._spherical.phi=Math.max(1e-6,Math.min(Math.PI-1e-6,this._spherical.phi))})}this.options.zooming&&this.mouseInput.wheel$.pipe(He(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=Ne.fromSpherical(this._spherical),o=Ne.rotAround(s,{x:-Math.sin(this._spherical.theta),y:Math.cos(this._spherical.theta),z:0},Math.PI/2),a=Ne.rotAround(s,Ne.norm(o),Math.PI/2);this.target=Ne.add(this.target,Ne.add(Ne.scalarMult(o,-this.options.panning.sensitivityY*r.y/1e3),Ne.scalarMult(a,this.options.panning.sensitivityX*r.x/1e3)))};this.options.panning&&this.mouseInput.delta$.pipe(He(this._onRemoved$),vn(()=>this.mouseInput.state==Fs.DRAG_RIGHT_BUTTON)).subscribe(r=>{n(r)}),this.options.dollying&&this.mouseInput.delta$.pipe(He(this._onRemoved$),vn(()=>this.mouseInput.state==Fs.DRAG_MIDDLE_BUTTON)).subscribe(r=>{this._spherical.radius*=Math.pow(.95,-this.options.dollying.sensitivity*r.y/10)}),Wm.isTouchDevice()&&(this.options.dollying||this.options.panning)&&this.mouseInput.twoTouchGestureDelta$.pipe(He(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(He(this._onRemoved$),vn(()=>this.active),et(()=>this._spherical)).subscribe(r=>{this.camera.position=Ne.add(this.target,Ne.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 ZH(this,void 0,void 0,function*(){yield t.onRemoved.call(this),yield this.mouseInput.stop(!0)})}}class zse{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 nk=function(i,t,e,n){return new(e||(e=Promise))(function(s,o){function a(d){try{c(n.next(d))}catch(h){o(h)}}function l(d){try{c(n.throw(d))}catch(h){o(h)}}function c(d){d.done?s(d.value):function r(s){return s instanceof e?s:new e(function(o){o(s)})}(d.value).then(a,l)}c((n=n.apply(i,t||[])).next())})},gu=(()=>{return(i=gu||(gu={}))[i.Nothing=0]="Nothing",i[i.Files=1]="Files",i[i.Entities=2]="Entities",gu;var i})();const QH={cachingStrategy:gu.Nothing,position:Ne.O,rotation:gr.O,loadProps:!0},JH=i=>({meta:i.meta,resources:i.resources.map(({object3D:t,body:e})=>({object3D:t&&t.clone(),body:e&&e.clone()}))});class Hse{constructor(t){this.world=t,this.filesCache=new Map,this.loadResultCache=new Map}loadGgGlbFiles(t){return nk(this,arguments,void 0,function*(e,n=!1){if(n&&this.filesCache.has(e))return this.filesCache.get(e);const r=Promise.all([fetch(`${e}.glb`).then(o=>o.arrayBuffer()),fetch(`${e}.meta`).then(o=>o.text()).then(o=>JSON.parse(o))]);n&&this.filesCache.set(e,r);const s=yield r;return n&&this.filesCache.set(e,s),s})}loadGgGlbResources(t){return nk(this,arguments,void 0,function*(e,n=gu.Nothing){if(n==gu.Entities&&this.loadResultCache.has(e)){const c=this.loadResultCache.get(e),d=c instanceof Promise?yield c:c;return JH(d)}const[r,s]=yield this.loadGgGlbFiles(e,n==gu.Files);if(!r)throw new Error("GLB not found");const[o,a]=yield Promise.all([this.world.visualScene.loader.loadFromGgGlb(r,s),this.world.physicsWorld.loader.loadFromGgGlb(r,s)]),l={resources:[],meta:s};if(!o)return l;if(0==a.length)l.resources.push({object3D:o,body:null});else if(1==a.length)l.resources.push({object3D:o,body:a[0]});else{for(const c of a)l.resources.push({object3D:o.popChild(c.name),body:c});o.isEmpty()||l.resources.push({object3D:o,body:null})}return n==gu.Entities&&this.loadResultCache.set(e,JH(l)),l})}loadGgGlb(t){return nk(this,arguments,void 0,function*(e,n=QH){const r=Object.assign(Object.assign({},QH),n),{resources:s,meta:o}=yield this.loadGgGlbResources(e,r.cachingStrategy),a={entities:s.map(l=>new mu({object3D:l.object3D,objectBody:l.body})),meta:o};return r.loadProps&&(a.props=yield Promise.all(o.dummies.filter(l=>l.is_prop||l.is_scene).map(l=>this.loadGgGlb(l.is_prop?(r.propsPath||e.substring(0,e.lastIndexOf("/")+1))+l.prop_id:l.scene_id,{loadProps:!!l.is_scene,position:Ne.add(Ne.rot(l.position,r.rotation),r.position),rotation:gr.combineRotations(l.rotation,r.rotation)})))),a.entities.forEach(l=>{l.position=Ne.add(Ne.rot(Ne.clone(l.position),r.rotation),r.position),l.rotation=gr.mult(gr.clone(l.rotation),r.rotation)}),a})}}class e4 extends fl{constructor(t,e){super(t,e),this.visualScene=t,this.physicsWorld=e,this.loader=new Hse(this)}addPrimitiveRigidBody(t,e=Ne.O,n=gr.O,r={}){const s=new mu({object3D:this.visualScene.factory.createPrimitive(t.shape,r),objectBody:this.physicsWorld.factory.createRigidBody(t)});return s.position=e,s.rotation=n,this.addEntity(s),s}addRenderer(t,e,n){const r=new Fse(this.visualScene.createRenderer(t,e,n));return this.addEntity(r),r}registerConsoleCommands(t){super.registerConsoleCommands(t),t.registerConsoleCommand(this,"gravity",(...e)=>function(i,t,e,n){return new(e||(e=Promise))(function(s,o){function a(d){try{c(n.next(d))}catch(h){o(h)}}function l(d){try{c(n.throw(d))}catch(h){o(h)}}function c(d){d.done?s(d.value):function r(s){return s instanceof e?s:new e(function(o){o(s)})}(d.value).then(a,l)}c((n=n.apply(i,t||[])).next())})}(this,void 0,void 0,function*(){if(1==e.length&&(e=["0","0",""+-+e[0]]),e.length>0){if(isNaN(+e[0])||isNaN(+e[1])||isNaN(+e[2]))throw new Error("Wrong arguments");this.physicsWorld.gravity={x:+e[0],y:+e[1],z:+e[2]}}return JSON.stringify(this.physicsWorld.gravity)}),'args: [ ?float, ?float, ?float ]; Get or set 3D world gravity vector. 1 argument sets vector {x: 0, y: 0, z: -value}, 3 arguments set the whole vector. Default value is "9.82" or "0 0 -9.82"')}}window.gg_version="0.0.56";const jse=0,t4=1,Yse=2,n4=1,i4=2,qc=3,Ql=0,To=1,Ko=2,Xc=0,Ym=1,r4=2,s4=3,o4=4,qse=5,Xh=100,Xse=101,Kse=102,Zse=103,Qse=104,Jse=200,eoe=201,toe=202,noe=203,rk=204,sk=205,ioe=206,roe=207,soe=208,ooe=209,aoe=210,loe=211,coe=212,doe=213,uoe=214,hoe=0,foe=1,poe=2,xC=3,moe=4,goe=5,_oe=6,voe=7,wC=0,yoe=1,boe=2,_u=0,xoe=1,woe=2,Moe=3,Coe=4,Soe=5,Eoe=6,Aoe=7,a4="attached",Kc=301,Kh=302,MC=303,CC=304,fb=306,Jl=1e3,Zi=1001,pb=1002,_r=1003,ak=1004,qm=1005,ar=1006,mb=1007,pl=1008,Zc=1009,l4=1010,c4=1011,gb=1012,lk=1013,vu=1014,Zo=1015,Xm=1016,ck=1017,dk=1018,Km=1020,d4=35902,u4=1021,h4=1022,Io=1023,f4=1024,p4=1025,Zm=1026,Qm=1027,uk=1028,SC=1029,m4=1030,hk=1031,fk=1033,EC=33776,AC=33777,DC=33778,TC=33779,pk=35840,mk=35841,gk=35842,_k=35843,vk=36196,yk=37492,bk=37496,xk=37808,wk=37809,Mk=37810,Ck=37811,Sk=37812,Ek=37813,Ak=37814,Dk=37815,Tk=37816,Ik=37817,Rk=37818,kk=37819,Pk=37820,Ok=37821,IC=36492,Fk=36494,Lk=36495,g4=36283,Nk=36284,Bk=36285,Uk=36286,_b=2300,vb=2301,koe=0,v4=1,Hk=2,Ooe=3201,Zh=0,Foe=1,yu="",cs="srgb",ds="srgb-linear",Gk="display-p3",kC="display-p3-linear",PC="linear",Fi="srgb",OC="rec709",FC="p3",tg=7680,Loe=512,Noe=513,Boe=514,b4=515,Uoe=516,Voe=517,zoe=518,Hoe=519,x4="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]+Ls[i>>16&255]+Ls[i>>24&255]+"-"+Ls[255&t]+Ls[t>>8&255]+"-"+Ls[t>>16&15|64]+Ls[t>>24&255]+"-"+Ls[63&e|128]+Ls[e>>8&255]+"-"+Ls[e>>16&255]+Ls[e>>24&255]+Ls[255&n]+Ls[n>>8&255]+Ls[n>>16&255]+Ls[n>>24&255]).toLowerCase()}function Qi(i,t,e){return Math.max(t,Math.min(e,i))}function $k(i,t){return(i%t+t)%t}function yb(i,t,e){return(1-e)*i+e*t}function co(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 yn(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 sae_radToDeg=function eae(i){return i*ig};class xe{constructor(t=0,e=0){xe.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(Qi(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 wn{constructor(t,e,n,r,s,o,a,l,c){wn.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 d=this.elements;return d[0]=t,d[1]=r,d[2]=a,d[3]=e,d[4]=s,d[5]=l,d[6]=n,d[7]=o,d[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],d=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],F=r[2],D=r[5],k=r[8];return s[0]=o*b+a*M+l*F,s[3]=o*v+a*x+l*D,s[6]=o*y+a*C+l*k,s[1]=c*b+d*M+h*F,s[4]=c*v+d*x+h*D,s[7]=c*y+d*C+h*k,s[2]=p*b+m*M+g*F,s[5]=p*v+m*x+g*D,s[8]=p*y+m*C+g*k,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],d=t[8];return e*o*d-e*a*c-n*s*d+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],d=t[8],h=d*o-a*c,p=a*l-d*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-d*n)*b,t[2]=(a*n-r*o)*b,t[3]=p*b,t[4]=(d*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(Wk.makeScale(t,e)),this}rotate(t){return this.premultiply(Wk.makeRotation(-t)),this}translate(t,e){return this.premultiply(Wk.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 Wk=new wn;function M4(i){for(let t=i.length-1;t>=0;--t)if(i[t]>=65535)return!0;return!1}function bb(i){return document.createElementNS("http://www.w3.org/1999/xhtml",i)}function aae(){const i=bb("canvas");return i.style.display="block",i}Int8Array,Uint8Array,Uint8ClampedArray,Int16Array,Uint16Array,Int32Array,Uint32Array,Float32Array,Float64Array;const C4={};function sg(i){i in C4||(C4[i]=!0,console.warn(i))}const S4=(new wn).set(.8224621,.177538,0,.0331941,.9668058,0,.0170827,.0723974,.9105199),E4=(new wn).set(1.2249401,-.2249404,0,-.0420569,1.0420571,0,-.0196376,-.0786361,1.0982735),xb={[ds]:{transfer:PC,primaries:OC,luminanceCoefficients:[.2126,.7152,.0722],toReference:i=>i,fromReference:i=>i},[cs]:{transfer:Fi,primaries:OC,luminanceCoefficients:[.2126,.7152,.0722],toReference:i=>i.convertSRGBToLinear(),fromReference:i=>i.convertLinearToSRGB()},[kC]:{transfer:PC,primaries:FC,luminanceCoefficients:[.2289,.6917,.0793],toReference:i=>i.applyMatrix3(E4),fromReference:i=>i.applyMatrix3(S4)},[Gk]:{transfer:Fi,primaries:FC,luminanceCoefficients:[.2289,.6917,.0793],toReference:i=>i.convertSRGBToLinear().applyMatrix3(E4),fromReference:i=>i.applyMatrix3(S4).convertLinearToSRGB()}},cae=new Set([ds,kC]),Jn={enabled:!0,_workingColorSpace:ds,get workingColorSpace(){return this._workingColorSpace},set workingColorSpace(i){if(!cae.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,xb[e].fromReference)((0,xb[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 xb[i].primaries},getTransfer:function(i){return i===yu?PC:xb[i].transfer},getLuminanceCoefficients:function(i,t=this._workingColorSpace){return i.fromArray(xb[t].luminanceCoefficients)}};function og(i){return i<.04045?.0773993808*i:Math.pow(.9478672986*i+.0521327014,2.4)}function jk(i){return i<.0031308?12.92*i:1.055*Math.pow(i,.41666)-.055}let ag;class dae{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===ag&&(ag=bb("canvas")),ag.width=t.width,ag.height=t.height;const n=ag.getContext("2d");t instanceof ImageData?n.putImageData(t,0,0):n.drawImage(t,0,0,t.width,t.height),e=ag}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=bb("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=Zi,s=Zi,o=ar,a=pl,l=Io,c=Zc,d=i.DEFAULT_ANISOTROPY,h=yu){super(),this.isTexture=!0,Object.defineProperty(this,"id",{value:hae++}),this.uuid=Qo(),this.name="",this.source=new lg(e),this.mipmaps=[],this.mapping=n,this.channel=0,this.wrapS=r,this.wrapT=s,this.magFilter=o,this.minFilter=a,this.anisotropy=d,this.format=l,this.internalFormat=null,this.type=c,this.offset=new xe(0,0),this.repeat=new xe(1,1),this.center=new xe(0,0),this.rotation=0,this.matrixAutoUpdate=!0,this.matrix=new wn,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 Jl:e.x=e.x-Math.floor(e.x);break;case Zi:e.x=e.x<0?0:1;break;case pb: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 Jl:e.y=e.y-Math.floor(e.y);break;case Zi:e.y=e.y<0?0:1;break;case pb: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 _i{constructor(t=0,e=0,n=0,r=1){_i.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],d=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(d-p)<.01&&Math.abs(h-b)<.01&&Math.abs(g-v)<.01){if(Math.abs(d+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,F=(y+1)/2,D=(d+p)/4,k=(h+b)/4,B=(g+v)/4;return x>C&&x>F?x<.01?(n=0,r=.707106781,s=.707106781):(n=Math.sqrt(x),r=D/n,s=k/n):C>F?C<.01?(n=.707106781,r=0,s=.707106781):(r=Math.sqrt(C),n=D/r,s=B/r):F<.01?(n=.707106781,r=.707106781,s=0):(s=Math.sqrt(F),n=k/s,r=B/s),this.set(n,r,s,e),this}let M=Math.sqrt((v-g)*(v-g)+(h-b)*(h-b)+(p-d)*(p-d));return Math.abs(M)<.001&&(M=1),this.x=(v-g)/M,this.y=(h-b)/M,this.z=(p-d)/M,this.w=Math.acos((c+m+y-1)/2),this}setFromMatrixPosition(t){const e=t.elements;return this.x=e[12],this.y=e[13],this.z=e[14],this.w=e[15],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 fae extends ng{constructor(t=1,e=1,n={}){super(),this.isRenderTarget=!0,this.width=t,this.height=e,this.depth=1,this.scissor=new _i(0,0,t,e),this.scissorTest=!1,this.viewport=new _i(0,0,t,e);const r={width:t,height:e,depth:1};n=Object.assign({generateMipmaps:!1,internalFormat:null,minFilter:ar,depthBuffer:!0,stencilBuffer:!1,resolveDepthBuffer:!0,resolveStencilBuffer:!0,depthTexture:null,samples:0,count:1},n);const s=new Ro(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 F=Math.sqrt(x),D=Math.atan2(F,y*M);v=Math.sin(v*D)/F,a=Math.sin(a*D)/F}const C=a*M;if(l=l*v+p*C,c=c*v+m*C,d=d*v+g*C,h=h*v+b*C,v===1-a){const F=1/Math.sqrt(l*l+c*c+d*d+h*h);l*=F,c*=F,d*=F,h*=F}}t[e]=l,t[e+1]=c,t[e+2]=d,t[e+3]=h}static multiplyQuaternionsFlat(t,e,n,r,s,o){const a=n[r],l=n[r+1],c=n[r+2],d=n[r+3],h=s[o],p=s[o+1],m=s[o+2],g=s[o+3];return t[e]=a*g+d*h+l*m-c*p,t[e+1]=l*g+d*p+c*h-a*m,t[e+2]=c*g+d*m+a*p-l*h,t[e+3]=d*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),d=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*d*h+c*m*g,this._y=c*m*h-p*d*g,this._z=c*d*g+p*m*h,this._w=c*d*h-p*m*g;break;case"YXZ":this._x=p*d*h+c*m*g,this._y=c*m*h-p*d*g,this._z=c*d*g-p*m*h,this._w=c*d*h+p*m*g;break;case"ZXY":this._x=p*d*h-c*m*g,this._y=c*m*h+p*d*g,this._z=c*d*g+p*m*h,this._w=c*d*h-p*m*g;break;case"ZYX":this._x=p*d*h-c*m*g,this._y=c*m*h+p*d*g,this._z=c*d*g-p*m*h,this._w=c*d*h+p*m*g;break;case"YZX":this._x=p*d*h+c*m*g,this._y=c*m*h+p*d*g,this._z=c*d*g-p*m*h,this._w=c*d*h-p*m*g;break;case"XZY":this._x=p*d*h-c*m*g,this._y=c*m*h-p*d*g,this._z=c*d*g+p*m*h,this._w=c*d*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],d=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=(d-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=(d-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+d)/m}else{const m=2*Math.sqrt(1+h-n-a);this._w=(o-r)/m,this._x=(s+c)/m,this._y=(l+d)/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(Qi(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,d=e._w;return this._x=n*d+o*a+r*c-s*l,this._y=r*d+o*l+s*a-n*c,this._z=s*d+o*c+n*l-r*a,this._w=o*d-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),d=Math.atan2(c,a),h=Math.sin((1-e)*d)/c,p=Math.sin(e*d)/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 O{constructor(t=0,e=0,n=0){O.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(D4.setFromEuler(t))}applyAxisAngle(t,e){return this.applyQuaternion(D4.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),d=2*(a*e-s*r),h=2*(s*n-o*e);return this.x=e+l*c+o*h-a*d,this.y=n+l*d+a*c-s*h,this.z=r+l*h+s*d-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 Xk.copy(this).projectOnVector(t),this.sub(Xk)}reflect(t){return this.sub(Xk.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(Qi(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 Xk=new O,D4=new uo;class Ns{constructor(t=new O(1/0,1/0,1/0),e=new O(-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;e=this.min.x&&t.x<=this.max.x&&t.y>=this.min.y&&t.y<=this.max.y&&t.z>=this.min.z&&t.z<=this.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.x>=this.min.x&&t.min.x<=this.max.x&&t.max.y>=this.min.y&&t.min.y<=this.max.y&&t.max.z>=this.min.z&&t.min.z<=this.max.z}intersectsSphere(t){return this.clampPoint(t.center,ml),ml.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(wb),UC.subVectors(this.max,wb),cg.subVectors(t.a,wb),dg.subVectors(t.b,wb),ug.subVectors(t.c,wb),xu.subVectors(dg,cg),wu.subVectors(ug,dg),Jh.subVectors(cg,ug);let e=[0,-xu.z,xu.y,0,-wu.z,wu.y,0,-Jh.z,Jh.y,xu.z,0,-xu.x,wu.z,0,-wu.x,Jh.z,0,-Jh.x,-xu.y,xu.x,0,-wu.y,wu.x,0,-Jh.y,Jh.x,0];return!(!Kk(e,cg,dg,ug,UC)||(e=[1,0,0,0,1,0,0,0,1],!Kk(e,cg,dg,ug,UC)))&&(VC.crossVectors(xu,wu),e=[VC.x,VC.y,VC.z],Kk(e,cg,dg,ug,UC))}clampPoint(t,e){return e.copy(t).clamp(this.min,this.max)}distanceToPoint(t){return this.clampPoint(t,ml).distanceTo(t)}getBoundingSphere(t){return this.isEmpty()?t.makeEmpty():(this.getCenter(t.center),t.radius=.5*this.getSize(ml).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 O,new O,new O,new O,new O,new O,new O,new O],ml=new O,BC=new Ns,cg=new O,dg=new O,ug=new O,xu=new O,wu=new O,Jh=new O,wb=new O,UC=new O,VC=new O,ef=new O;function Kk(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),d=n.dot(ef);if(Math.max(-Math.max(l,c,d),Math.min(l,c,d))>a)return!1}return!0}const pae=new Ns,Mb=new O,Zk=new O;class Bs{constructor(t=new O,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):pae.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;Mb.subVectors(t,this.center);const e=Mb.lengthSq();if(e>this.radius*this.radius){const n=Math.sqrt(e),r=.5*(n-this.radius);this.center.addScaledVector(Mb,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):(Zk.subVectors(t.center,this.center).setLength(t.radius),this.expandByPoint(Mb.copy(t.center).add(Zk)),this.expandByPoint(Mb.copy(t.center).sub(Zk))),this)}equals(t){return t.center.equals(this.center)&&t.radius===this.radius}clone(){return(new this.constructor).copy(this)}}const ed=new O,Qk=new O,zC=new O,Mu=new O,Jk=new O,HC=new O,eP=new O;class Cb{constructor(t=new O,e=new O(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){Qk.copy(t).add(e).multiplyScalar(.5),zC.copy(e).sub(t).normalize(),Mu.copy(this.origin).sub(Qk);const s=.5*t.distanceTo(e),o=-this.direction.dot(zC),a=Mu.dot(this.direction),l=-Mu.dot(zC),c=Mu.lengthSq(),d=Math.abs(1-o*o);let h,p,m,g;if(d>0)if(h=o*l-a,p=o*a-l,g=s*d,h>=0)if(p>=-g)if(p<=g){const b=1/d;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(Qk).addScaledVector(zC,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,d=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),d>=0?(s=(t.min.y-p.y)*d,o=(t.max.y-p.y)*d):(s=(t.max.y-p.y)*d,o=(t.min.y-p.y)*d),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){Jk.subVectors(e,t),HC.subVectors(n,t),eP.crossVectors(Jk,HC);let a,o=this.direction.dot(eP);if(o>0){if(r)return null;a=1}else{if(!(o<0))return null;a=-1,o=-o}Mu.subVectors(this.origin,t);const l=a*this.direction.dot(HC.crossVectors(Mu,HC));if(l<0)return null;const c=a*this.direction.dot(Jk.cross(Mu));if(c<0||l+c>o)return null;const d=-a*Mu.dot(eP);return d<0?null:this.at(d/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 Bt{constructor(t,e,n,r,s,o,a,l,c,d,h,p,m,g,b,v){Bt.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,d,h,p,m,g,b,v)}set(t,e,n,r,s,o,a,l,c,d,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]=d,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 Bt).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/hg.setFromMatrixColumn(t,0).length(),s=1/hg.setFromMatrixColumn(t,1).length(),o=1/hg.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),d=Math.cos(s),h=Math.sin(s);if("XYZ"===t.order){const p=o*d,m=o*h,g=a*d,b=a*h;e[0]=l*d,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*d,m=l*h,g=c*d,b=c*h;e[0]=p+b*a,e[4]=g*a-m,e[8]=o*c,e[1]=o*h,e[5]=o*d,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*d,m=l*h,g=c*d,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*d,e[9]=b-p*a,e[2]=-o*c,e[6]=a,e[10]=o*l}else if("ZYX"===t.order){const p=o*d,m=o*h,g=a*d,b=a*h;e[0]=l*d,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*d,e[4]=b-p*h,e[8]=g*h+m,e[1]=h,e[5]=o*d,e[9]=-a*d,e[2]=-c*d,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*d,e[4]=-h,e[8]=c*d,e[1]=p*h+b,e[5]=o*d,e[9]=m*h-g,e[2]=g*h-m,e[6]=a*d,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(mae,t,gae)}lookAt(t,e,n){const r=this.elements;return Jo.subVectors(t,e),0===Jo.lengthSq()&&(Jo.z=1),Jo.normalize(),Cu.crossVectors(n,Jo),0===Cu.lengthSq()&&(1===Math.abs(n.z)?Jo.x+=1e-4:Jo.z+=1e-4,Jo.normalize(),Cu.crossVectors(n,Jo)),Cu.normalize(),GC.crossVectors(Jo,Cu),r[0]=Cu.x,r[4]=GC.x,r[8]=Jo.x,r[1]=Cu.y,r[5]=GC.y,r[9]=Jo.y,r[2]=Cu.z,r[6]=GC.z,r[10]=Jo.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],d=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],F=n[15],D=r[0],k=r[4],B=r[8],T=r[12],A=r[1],W=r[5],ie=r[9],ne=r[13],oe=r[2],ge=r[6],q=r[10],se=r[14],J=r[3],we=r[7],Be=r[11],Ye=r[15];return s[0]=o*D+a*A+l*oe+c*J,s[4]=o*k+a*W+l*ge+c*we,s[8]=o*B+a*ie+l*q+c*Be,s[12]=o*T+a*ne+l*se+c*Ye,s[1]=d*D+h*A+p*oe+m*J,s[5]=d*k+h*W+p*ge+m*we,s[9]=d*B+h*ie+p*q+m*Be,s[13]=d*T+h*ne+p*se+m*Ye,s[2]=g*D+b*A+v*oe+y*J,s[6]=g*k+b*W+v*ge+y*we,s[10]=g*B+b*ie+v*q+y*Be,s[14]=g*T+b*ne+v*se+y*Ye,s[3]=M*D+x*A+C*oe+F*J,s[7]=M*k+x*W+C*ge+F*we,s[11]=M*B+x*ie+C*q+F*Be,s[15]=M*T+x*ne+C*se+F*Ye,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],d=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*d-s*l*d)+t[11]*(+e*c*h-e*a*m-s*o*h+n*o*m+s*a*d-n*c*d)+t[15]*(-r*a*d-e*l*h+e*a*p+r*o*h-n*o*p+n*l*d)}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],d=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-d*v*c-g*l*m+o*v*m+d*l*y-o*p*y,C=d*b*c-g*h*c+g*a*m-o*b*m-d*a*y+o*h*y,F=g*h*l-d*b*l-g*a*p+o*b*p+d*a*v-o*h*v,D=e*M+n*x+r*C+s*F;if(0===D)return this.set(0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0);const k=1/D;return t[0]=M*k,t[1]=(b*p*s-h*v*s-b*r*m+n*v*m+h*r*y-n*p*y)*k,t[2]=(a*v*s-b*l*s+b*r*c-n*v*c-a*r*y+n*l*y)*k,t[3]=(h*l*s-a*p*s-h*r*c+n*p*c+a*r*m-n*l*m)*k,t[4]=x*k,t[5]=(d*v*s-g*p*s+g*r*m-e*v*m-d*r*y+e*p*y)*k,t[6]=(g*l*s-o*v*s-g*r*c+e*v*c+o*r*y-e*l*y)*k,t[7]=(o*p*s-d*l*s+d*r*c-e*p*c-o*r*m+e*l*m)*k,t[8]=C*k,t[9]=(g*h*s-d*b*s-g*n*m+e*b*m+d*n*y-e*h*y)*k,t[10]=(o*b*s-g*a*s+g*n*c-e*b*c-o*n*y+e*a*y)*k,t[11]=(d*a*s-o*h*s-d*n*c+e*h*c+o*n*m-e*a*m)*k,t[12]=F*k,t[13]=(d*b*r-g*h*r+g*n*p-e*b*p-d*n*v+e*h*v)*k,t[14]=(g*a*r-o*b*r-g*n*l+e*b*l+o*n*v-e*a*v)*k,t[15]=(o*h*r-d*a*r+d*n*l-e*h*l-o*n*p+e*a*p)*k,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,d=s*a;return this.set(c*o+n,c*a-r*l,c*l+r*a,0,c*a+r*l,d*a+n,d*l-r*o,0,c*l-r*a,d*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,d=o+o,h=a+a,p=s*c,m=s*d,g=s*h,b=o*d,v=o*h,y=a*h,M=l*c,x=l*d,C=l*h,F=n.x,D=n.y,k=n.z;return r[0]=(1-(b+y))*F,r[1]=(m+C)*F,r[2]=(g-x)*F,r[3]=0,r[4]=(m-C)*D,r[5]=(1-(p+y))*D,r[6]=(v+M)*D,r[7]=0,r[8]=(g+x)*k,r[9]=(v-M)*k,r[10]=(1-(p+b))*k,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=hg.set(r[0],r[1],r[2]).length();const o=hg.set(r[4],r[5],r[6]).length(),a=hg.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],gl.copy(this);const c=1/s,d=1/o,h=1/a;return gl.elements[0]*=c,gl.elements[1]*=c,gl.elements[2]*=c,gl.elements[4]*=d,gl.elements[5]*=d,gl.elements[6]*=d,gl.elements[8]*=h,gl.elements[9]*=h,gl.elements[10]*=h,e.setFromRotationMatrix(gl),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),d=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]=d,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),d=1/(n-r),h=1/(o-s),p=(e+t)*c,m=(n+r)*d;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*d,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 hg=new O,gl=new Bt,mae=new O(0,0,0),gae=new O(1,1,1),Cu=new O,GC=new O,Jo=new O,T4=new Bt,I4=new uo;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],d=s[5],h=s[9],p=s[2],m=s[6],g=s[10];switch(n){case"XYZ":this._y=Math.asin(Qi(l,-1,1)),Math.abs(l)<.9999999?(this._x=Math.atan2(-h,g),this._z=Math.atan2(-a,o)):(this._x=Math.atan2(m,d),this._z=0);break;case"YXZ":this._x=Math.asin(-Qi(h,-1,1)),Math.abs(h)<.9999999?(this._y=Math.atan2(l,g),this._z=Math.atan2(c,d)):(this._y=Math.atan2(-p,o),this._z=0);break;case"ZXY":this._x=Math.asin(Qi(m,-1,1)),Math.abs(m)<.9999999?(this._y=Math.atan2(-p,g),this._z=Math.atan2(-a,d)):(this._y=0,this._z=Math.atan2(c,o));break;case"ZYX":this._y=Math.asin(-Qi(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,d));break;case"YZX":this._z=Math.asin(Qi(c,-1,1)),Math.abs(c)<.9999999?(this._x=Math.atan2(-h,d),this._y=Math.atan2(-p,o)):(this._x=0,this._y=Math.atan2(l,g));break;case"XZY":this._z=Math.asin(-Qi(a,-1,1)),Math.abs(a)<.9999999?(this._x=Math.atan2(m,d),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 T4.makeRotationFromQuaternion(e),this.setFromRotationMatrix(T4,n,r)}setFromVector3(e,n=this._order){return this.set(e.x,e.y,e.z,n)}reorder(e){return I4.setFromEuler(this),this.setFromQuaternion(I4,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 tP{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:_ae++}),this.uuid=Qo(),this.name="",this.type="Object3D",this.parent=null,this.children=[],this.up=i.DEFAULT_UP.clone();const e=new O,n=new td,r=new uo,s=new O(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 Bt},normalMatrix:{value:new wn}}),this.matrix=new Bt,this.matrixWorld=new Bt,this.matrixAutoUpdate=i.DEFAULT_MATRIX_AUTO_UPDATE,this.matrixWorldAutoUpdate=i.DEFAULT_MATRIX_WORLD_AUTO_UPDATE,this.matrixWorldNeedsUpdate=!1,this.layers=new tP,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 fg.setFromAxisAngle(e,n),this.quaternion.multiply(fg),this}rotateOnWorldAxis(e,n){return fg.setFromAxisAngle(e,n),this.quaternion.premultiply(fg),this}rotateX(e){return this.rotateOnAxis(k4,e)}rotateY(e){return this.rotateOnAxis(P4,e)}rotateZ(e){return this.rotateOnAxis(O4,e)}translateOnAxis(e,n){return R4.copy(e).applyQuaternion(this.quaternion),this.position.add(R4.multiplyScalar(n)),this}translateX(e){return this.translateOnAxis(k4,e)}translateY(e){return this.translateOnAxis(P4,e)}translateZ(e){return this.translateOnAxis(O4,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?$C.copy(e):$C.set(e,n,r);const s=this.parent;this.updateWorldMatrix(!0,!1),Sb.setFromMatrixPosition(this.matrixWorld),this.isCamera||this.isLight?nd.lookAt(Sb,$C,this.up):nd.lookAt($C,Sb,this.up),this.quaternion.setFromRotationMatrix(nd),s&&(nd.extractRotation(s.matrixWorld),fg.setFromRotationMatrix(nd),this.quaternion.premultiply(fg.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.maxInstanceCount=this._maxInstanceCount,s.maxVertexCount=this._maxVertexCount,s.maxIndexCount=this._maxIndexCount,s.geometryInitialized=this._geometryInitialized,s.geometryCount=this._geometryCount,s.matricesTexture=this._matricesTexture.toJSON(e),null!==this._colorsTexture&&(s.colorsTexture=this._colorsTexture.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 d=0,h=c.length;d0){s.children=[];for(let l=0;l0){s.animations=[];for(let l=0;l0&&(r.geometries=l),c.length>0&&(r.materials=c),d.length>0&&(r.textures=d),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 d in l){const h=l[d];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){_l.subVectors(r,e),id.subVectors(n,e),iP.subVectors(t,e);const o=_l.dot(_l),a=_l.dot(id),l=_l.dot(iP),c=id.dot(id),d=id.dot(iP),h=o*c-a*a;if(0===h)return s.set(0,0,0),null;const p=1/h,m=(c*l-a*d)*p,g=(o*d-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 _l.subVectors(n,e),id.subVectors(t,e),_l.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 _l.subVectors(this.c,this.b),id.subVectors(this.a,this.b),.5*_l.cross(id).length()}getMidpoint(t){return t.addVectors(this.a,this.b).add(this.c).multiplyScalar(1/3)}getNormal(t){return Ra.getNormal(this.a,this.b,this.c,t)}getPlane(t){return t.setFromCoplanarPoints(this.a,this.b,this.c)}getBarycoord(t,e){return Ra.getBarycoord(t,this.a,this.b,this.c,e)}getInterpolation(t,e,n,r,s){return Ra.getInterpolation(t,this.a,this.b,this.c,e,n,r,s)}containsPoint(t){return Ra.containsPoint(t,this.a,this.b,this.c)}isFrontFacing(t){return Ra.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;mg.subVectors(r,n),gg.subVectors(s,n),rP.subVectors(t,n);const l=mg.dot(rP),c=gg.dot(rP);if(l<=0&&c<=0)return e.copy(n);sP.subVectors(t,r);const d=mg.dot(sP),h=gg.dot(sP);if(d>=0&&h<=d)return e.copy(r);const p=l*h-d*c;if(p<=0&&l>=0&&d<=0)return o=l/(l-d),e.copy(n).addScaledVector(mg,o);oP.subVectors(t,s);const m=mg.dot(oP),g=gg.dot(oP);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(gg,a);const v=d*g-m*h;if(v<=0&&h-d>=0&&m-g>=0)return L4.subVectors(s,r),a=(h-d)/(h-d+(m-g)),e.copy(r).addScaledVector(L4,a);const y=1/(v+b+p);return o=b*y,a=p*y,e.copy(n).addScaledVector(mg,o).addScaledVector(gg,a)}equals(t){return t.a.equals(this.a)&&t.b.equals(this.b)&&t.c.equals(this.c)}}const N4={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},Su={h:0,s:0,l:0},WC={h:0,s:0,l:0};function aP(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 qe{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=cs){return t=Math.floor(t),this.r=(t>>16&255)/255,this.g=(t>>8&255)/255,this.b=(255&t)/255,Jn.toWorkingColorSpace(this,e),this}setRGB(t,e,n,r=Jn.workingColorSpace){return this.r=t,this.g=e,this.b=n,Jn.toWorkingColorSpace(this,r),this}setHSL(t,e,n,r=Jn.workingColorSpace){if(t=$k(t,1),e=Qi(e,0,1),n=Qi(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=aP(o,s,t+1/3),this.g=aP(o,s,t),this.b=aP(o,s,t-1/3)}return Jn.toWorkingColorSpace(this,r),this}setStyle(t,e=cs){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=cs){const n=N4[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=og(t.r),this.g=og(t.g),this.b=og(t.b),this}copyLinearToSRGB(t){return this.r=jk(t.r),this.g=jk(t.g),this.b=jk(t.b),this}convertSRGBToLinear(){return this.copySRGBToLinear(this),this}convertLinearToSRGB(){return this.copyLinearToSRGB(this),this}getHex(t=cs){return Jn.fromWorkingColorSpace(Us.copy(this),t),65536*Math.round(Qi(255*Us.r,0,255))+256*Math.round(Qi(255*Us.g,0,255))+Math.round(Qi(255*Us.b,0,255))}getHexString(t=cs){return("000000"+this.getHex(t).toString(16)).slice(-6)}getHSL(t,e=Jn.workingColorSpace){Jn.fromWorkingColorSpace(Us.copy(this),e);const n=Us.r,r=Us.g,s=Us.b,o=Math.max(n,r,s),a=Math.min(n,r,s);let l,c;const d=(a+o)/2;if(a===o)l=0,c=0;else{const h=o-a;switch(c=d<=.5?h/(o+a):h/(2-o-a),o){case n:l=(r-s)/h+(r0!=t>0&&this.version++,this._alphaTest=t}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.dispersion&&(n.dispersion=this.dispersion),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!==Ym&&(n.blending=this.blending),this.side!==Ql&&(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!==rk&&(n.blendSrc=this.blendSrc),this.blendDst!==sk&&(n.blendDst=this.blendDst),this.blendEquation!==Xh&&(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!==xC&&(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++}onBuild(){console.warn("Material: onBuild() has been removed.")}onBeforeRender(){console.warn("Material: onBeforeRender() has been removed.")}}class vr extends ko{constructor(t){super(),this.isMeshBasicMaterial=!0,this.type="MeshBasicMaterial",this.color=new qe(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=wC,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 yr=new O,jC=new xe;class Hi{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=Zo,this.version=0}onUploadCallback(){}set needsUpdate(t){!0===t&&this.version++}get updateRange(){return sg("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],d=[];for(let h=0,p=c.length;h0&&(r[l]=d,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 d=[],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))&&(V4.copy(s).invert(),tf.copy(t.ray).applyMatrix4(V4),(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,d=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:JC.clone(),object:i}}(i,t,e,n,vg,yg,bg,QC);if(d){r&&(XC.fromBufferAttribute(r,a),KC.fromBufferAttribute(r,l),ZC.fromBufferAttribute(r,c),d.uv=Ra.getInterpolation(QC,vg,yg,bg,XC,KC,ZC,new xe)),s&&(XC.fromBufferAttribute(s,a),KC.fromBufferAttribute(s,l),ZC.fromBufferAttribute(s,c),d.uv1=Ra.getInterpolation(QC,vg,yg,bg,XC,KC,ZC,new xe)),o&&(H4.fromBufferAttribute(o,a),G4.fromBufferAttribute(o,l),$4.fromBufferAttribute(o,c),d.normal=Ra.getInterpolation(QC,vg,yg,bg,H4,G4,$4,new O),d.normal.dot(n.direction)>0&&d.normal.multiplyScalar(-1));const h={a,b:l,c,normal:new O,materialIndex:0};Ra.getNormal(vg,yg,bg,h.normal),d.face=h}return d}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=[],d=[],h=[];let p=0,m=0;function g(b,v,y,M,x,C,F,D,k,B,T){const A=C/k,W=F/B,ie=C/2,ne=F/2,oe=D/2,ge=k+1,q=B+1;let se=0,J=0;const we=new O;for(let Be=0;Be0?1:-1,d.push(we.x,we.y,we.z),h.push(Rt/k),h.push(1-Be/B),se+=1}for(let Be=0;Be0&&(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 dP extends Fr{constructor(){super(),this.isCamera=!0,this.type="Camera",this.matrixWorldInverse=new Bt,this.projectionMatrix=new Bt,this.projectionMatrixInverse=new Bt,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 Eu=new O,Y4=new xe,q4=new xe;class br extends dP{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*Qh*this.fov);return.5*this.getFilmHeight()/t}getEffectiveFOV(){return 2*ig*Math.atan(Math.tan(.5*Qh*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){Eu.set(-1,-1,.5).applyMatrix4(this.projectionMatrixInverse),e.set(Eu.x,Eu.y).multiplyScalar(-t/Eu.z),Eu.set(1,1,.5).applyMatrix4(this.projectionMatrixInverse),n.set(Eu.x,Eu.y).multiplyScalar(-t/Eu.z)}getViewSize(t,e){return this.getViewBounds(t,Y4,q4),e.subVectors(q4,Y4)}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*Qh*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 Dae extends Fr{constructor(t,e,n){super(),this.type="CubeCamera",this.renderTarget=n,this.coordinateSystem=null,this.activeMipmapLevel=0;const r=new br(-90,1,t,e);r.layers=this.layers,this.add(r);const s=new br(-90,1,t,e);s.layers=this.layers,this.add(s);const o=new br(-90,1,t,e);o.layers=this.layers,this.add(o);const a=new br(-90,1,t,e);a.layers=this.layers,this.add(a);const l=new br(-90,1,t,e);l.layers=this.layers,this.add(l);const c=new br(-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,d]=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,d),t.setRenderTarget(h,p,m),t.xr.enabled=g,n.texture.needsPMREMUpdate=!0}}class tS extends Ro{constructor(t,e,n,r,s,o,a,l,c,d){super(t=void 0!==t?t:[],e=void 0!==e?e:Kc,n,r,s,o,a,l,c,d),this.isCubeTexture=!0,this.flipY=!1}get images(){return this.image}set images(t){this.image=t}}class Tae extends bu{constructor(t=1,e={}){super(t,t,e),this.isWebGLCubeRenderTarget=!0;const n={width:t,height:t,depth:1};this.texture=new tS([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:ar}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 vl({name:"CubemapFromEquirect",uniforms:xg(n_uniforms),vertexShader:n_vertexShader,fragmentShader:n_fragmentShader,side:To,blending:Xc});s.uniforms.tEquirect.value=e;const o=new Nn(r,s),a=e.minFilter;return e.minFilter===pl&&(e.minFilter=ar),new Dae(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 uP=new O,Iae=new O,Rae=new wn;class rf{constructor(t=new O(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=uP.subVectors(n,e).cross(Iae.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(uP),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||Rae.getNormalMatrix(t),r=this.coplanarPoint(uP).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 Bs,nS=new O;class iS{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],d=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+d,v+g,C+M).normalize(),n[3].setComponents(l-o,p-d,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,nS.y=r.normal.y>0?t.max.y:t.min.y,nS.z=r.normal.z>0?t.max.z:t.min.z,r.distanceToPoint(nS)<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 X4(){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 kae(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.isInterleavedBufferAttribute&&(a=a.data),a.isGLBufferAttribute){const d=t.get(a);return void((!d||d.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 ) || defined( USE_BATCHING_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 ) || defined( USE_BATCHING_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\n#ifdef USE_BATCHING_COLOR\n\tvec3 batchingColor = getBatchingColor( getIndirectIndex( gl_DrawID ) );\n\tvColor.xyz *= batchingColor.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}\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}",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_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\tfloat distanceFalloff = 1.0 / max( pow( lightDistance, decayExponent ), 0.01 );\n\tif ( cutoffDistance > 0.0 ) {\n\t\tdistanceFalloff *= pow2( saturate( 1.0 - pow4( lightDistance / cutoffDistance ) ) );\n\t}\n\treturn distanceFalloff;\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_DISPERSION\n\tmaterial.dispersion = dispersion;\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\tfloat dispersion;\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.shadowIntensity, 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.shadowIntensity, 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.shadowIntensity, 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 )\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\tfor ( int i = 0; i < MORPHTARGETS_COUNT; i ++ ) {\n\t\tif ( morphTargetInfluences[ i ] != 0.0 ) objectNormal += getMorph( gl_VertexID, i, 1 ).xyz * morphTargetInfluences[ i ];\n\t}\n#endif",morphtarget_pars_vertex:"#ifdef USE_MORPHTARGETS\n\t#ifndef USE_INSTANCING_MORPH\n\t\tuniform float morphTargetBaseInfluence;\n\t\tuniform float morphTargetInfluences[ MORPHTARGETS_COUNT ];\n\t#endif\n\tuniform sampler2DArray morphTargetsTexture;\n\tuniform ivec2 morphTargetsTextureSize;\n\tvec4 getMorph( const in int vertexIndex, const in int morphTargetIndex, const in int offset ) {\n\t\tint texelIndex = vertexIndex * MORPHTARGETS_TEXTURE_STRIDE + offset;\n\t\tint y = texelIndex / morphTargetsTextureSize.x;\n\t\tint x = texelIndex - y * morphTargetsTextureSize.x;\n\t\tivec3 morphUV = ivec3( x, y, morphTargetIndex );\n\t\treturn texelFetch( morphTargetsTexture, morphUV, 0 );\n\t}\n#endif",morphtarget_vertex:"#ifdef USE_MORPHTARGETS\n\ttransformed *= morphTargetBaseInfluence;\n\tfor ( int i = 0; i < MORPHTARGETS_COUNT; i ++ ) {\n\t\tif ( morphTargetInfluences[ i ] != 0.0 ) transformed += getMorph( gl_VertexID, i, 0 ).xyz * morphTargetInfluences[ i ];\n\t}\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.;const float ShiftRight8 = 1. / 256.;\nconst float Inv255 = 1. / 255.;\nconst vec4 PackFactors = vec4( 1.0, 256.0, 256.0 * 256.0, 256.0 * 256.0 * 256.0 );\nconst vec2 UnpackFactors2 = vec2( UnpackDownscale, 1.0 / PackFactors.g );\nconst vec3 UnpackFactors3 = vec3( UnpackDownscale / PackFactors.rg, 1.0 / PackFactors.b );\nconst vec4 UnpackFactors4 = vec4( UnpackDownscale / PackFactors.rgb, 1.0 / PackFactors.a );\nvec4 packDepthToRGBA( const in float v ) {\n\tif( v <= 0.0 )\n\t\treturn vec4( 0., 0., 0., 0. );\n\tif( v >= 1.0 )\n\t\treturn vec4( 1., 1., 1., 1. );\n\tfloat vuf;\n\tfloat af = modf( v * PackFactors.a, vuf );\n\tfloat bf = modf( vuf * ShiftRight8, vuf );\n\tfloat gf = modf( vuf * ShiftRight8, vuf );\n\treturn vec4( vuf * Inv255, gf * PackUpscale, bf * PackUpscale, af );\n}\nvec3 packDepthToRGB( const in float v ) {\n\tif( v <= 0.0 )\n\t\treturn vec3( 0., 0., 0. );\n\tif( v >= 1.0 )\n\t\treturn vec3( 1., 1., 1. );\n\tfloat vuf;\n\tfloat bf = modf( v * PackFactors.b, vuf );\n\tfloat gf = modf( vuf * ShiftRight8, vuf );\n\treturn vec3( vuf * Inv255, gf * PackUpscale, bf );\n}\nvec2 packDepthToRG( const in float v ) {\n\tif( v <= 0.0 )\n\t\treturn vec2( 0., 0. );\n\tif( v >= 1.0 )\n\t\treturn vec2( 1., 1. );\n\tfloat vuf;\n\tfloat gf = modf( v * 256., vuf );\n\treturn vec2( vuf * Inv255, gf );\n}\nfloat unpackRGBAToDepth( const in vec4 v ) {\n\treturn dot( v, UnpackFactors4 );\n}\nfloat unpackRGBToDepth( const in vec3 v ) {\n\treturn dot( v, UnpackFactors3 );\n}\nfloat unpackRGToDepth( const in vec2 v ) {\n\treturn v.r * UnpackFactors2.r + v.g * UnpackFactors2.g;\n}\nvec4 pack2HalfToRGBA( const in 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( const in 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 shadowIntensity;\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 shadowIntensity;\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 shadowIntensity;\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 shadowIntensity, 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 mix( 1.0, shadow, shadowIntensity );\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 shadowIntensity, 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 mix( 1.0, shadow, shadowIntensity );\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 shadowIntensity;\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 shadowIntensity;\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 shadowIntensity;\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.shadowIntensity, 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.shadowIntensity, 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.shadowIntensity, 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\tconst float StartCompression = 0.8 - 0.04;\n\tconst float 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, vec3( newPeak ), 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.dispersion, 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 dispersion, const in float ior, const in float thickness,\n\t\tconst in vec3 attenuationColor, const in float attenuationDistance ) {\n\t\tvec4 transmittedLight;\n\t\tvec3 transmittance;\n\t\t#ifdef USE_DISPERSION\n\t\t\tfloat halfSpread = ( ior - 1.0 ) * 0.025 * dispersion;\n\t\t\tvec3 iors = vec3( ior - halfSpread, ior, ior + halfSpread );\n\t\t\tfor ( int i = 0; i < 3; i ++ ) {\n\t\t\t\tvec3 transmissionRay = getVolumeTransmissionRay( n, v, thickness, iors[ i ], modelMatrix );\n\t\t\t\tvec3 refractedRayExit = position + transmissionRay;\n\t\t\n\t\t\t\tvec4 ndcPos = projMatrix * viewMatrix * vec4( refractedRayExit, 1.0 );\n\t\t\t\tvec2 refractionCoords = ndcPos.xy / ndcPos.w;\n\t\t\t\trefractionCoords += 1.0;\n\t\t\t\trefractionCoords /= 2.0;\n\t\t\n\t\t\t\tvec4 transmissionSample = getTransmissionSample( refractionCoords, roughness, iors[ i ] );\n\t\t\t\ttransmittedLight[ i ] = transmissionSample[ i ];\n\t\t\t\ttransmittedLight.a += transmissionSample.a;\n\t\t\t\ttransmittance[ i ] = diffuseColor[ i ] * volumeAttenuation( length( transmissionRay ), attenuationColor, attenuationDistance )[ i ];\n\t\t\t}\n\t\t\ttransmittedLight.a /= 3.0;\n\t\t\n\t\t#else\n\t\t\n\t\t\tvec3 transmissionRay = getVolumeTransmissionRay( n, v, thickness, ior, modelMatrix );\n\t\t\tvec3 refractedRayExit = position + transmissionRay;\n\t\t\tvec4 ndcPos = projMatrix * viewMatrix * vec4( refractedRayExit, 1.0 );\n\t\t\tvec2 refractionCoords = ndcPos.xy / ndcPos.w;\n\t\t\trefractionCoords += 1.0;\n\t\t\trefractionCoords /= 2.0;\n\t\t\ttransmittedLight = getTransmissionSample( refractionCoords, roughness, ior );\n\t\t\ttransmittance = diffuseColor * volumeAttenuation( length( transmissionRay ), attenuationColor, attenuationDistance );\n\t\t\n\t\t#endif\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#elif DEPTH_PACKING == 3202\n\t\tgl_FragColor = vec4( packDepthToRGB( fragCoordZ ), 1.0 );\n\t#elif DEPTH_PACKING == 3203\n\t\tgl_FragColor = vec4( packDepthToRG( fragCoordZ ), 0.0, 1.0 );\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_DISPERSION\n\tuniform float dispersion;\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}"},Qe={common:{diffuse:{value:new qe(16777215)},opacity:{value:1},map:{value:null},mapTransform:{value:new wn},alphaMap:{value:null},alphaMapTransform:{value:new wn},alphaTest:{value:0}},specularmap:{specularMap:{value:null},specularMapTransform:{value:new wn}},envmap:{envMap:{value:null},envMapRotation:{value:new wn},flipEnvMap:{value:-1},reflectivity:{value:1},ior:{value:1.5},refractionRatio:{value:.98}},aomap:{aoMap:{value:null},aoMapIntensity:{value:1},aoMapTransform:{value:new wn}},lightmap:{lightMap:{value:null},lightMapIntensity:{value:1},lightMapTransform:{value:new wn}},bumpmap:{bumpMap:{value:null},bumpMapTransform:{value:new wn},bumpScale:{value:1}},normalmap:{normalMap:{value:null},normalMapTransform:{value:new wn},normalScale:{value:new xe(1,1)}},displacementmap:{displacementMap:{value:null},displacementMapTransform:{value:new wn},displacementScale:{value:1},displacementBias:{value:0}},emissivemap:{emissiveMap:{value:null},emissiveMapTransform:{value:new wn}},metalnessmap:{metalnessMap:{value:null},metalnessMapTransform:{value:new wn}},roughnessmap:{roughnessMap:{value:null},roughnessMapTransform:{value:new wn}},gradientmap:{gradientMap:{value:null}},fog:{fogDensity:{value:25e-5},fogNear:{value:1},fogFar:{value:2e3},fogColor:{value:new qe(16777215)}},lights:{ambientLightColor:{value:[]},lightProbe:{value:[]},directionalLights:{value:[],properties:{direction:{},color:{}}},directionalLightShadows:{value:[],properties:{shadowIntensity:1,shadowBias:{},shadowNormalBias:{},shadowRadius:{},shadowMapSize:{}}},directionalShadowMap:{value:[]},directionalShadowMatrix:{value:[]},spotLights:{value:[],properties:{color:{},position:{},direction:{},distance:{},coneCos:{},penumbraCos:{},decay:{}}},spotLightShadows:{value:[],properties:{shadowIntensity:1,shadowBias:{},shadowNormalBias:{},shadowRadius:{},shadowMapSize:{}}},spotLightMap:{value:[]},spotShadowMap:{value:[]},spotLightMatrix:{value:[]},pointLights:{value:[],properties:{color:{},position:{},decay:{},distance:{}}},pointLightShadows:{value:[],properties:{shadowIntensity:1,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 qe(16777215)},opacity:{value:1},size:{value:1},scale:{value:1},map:{value:null},alphaMap:{value:null},alphaMapTransform:{value:new wn},alphaTest:{value:0},uvTransform:{value:new wn}},sprite:{diffuse:{value:new qe(16777215)},opacity:{value:1},center:{value:new xe(.5,.5)},rotation:{value:0},map:{value:null},mapTransform:{value:new wn},alphaMap:{value:null},alphaMapTransform:{value:new wn},alphaTest:{value:0}}},ec={basic:{uniforms:ho([Qe.common,Qe.specularmap,Qe.envmap,Qe.aomap,Qe.lightmap,Qe.fog]),vertexShader:Mn.meshbasic_vert,fragmentShader:Mn.meshbasic_frag},lambert:{uniforms:ho([Qe.common,Qe.specularmap,Qe.envmap,Qe.aomap,Qe.lightmap,Qe.emissivemap,Qe.bumpmap,Qe.normalmap,Qe.displacementmap,Qe.fog,Qe.lights,{emissive:{value:new qe(0)}}]),vertexShader:Mn.meshlambert_vert,fragmentShader:Mn.meshlambert_frag},phong:{uniforms:ho([Qe.common,Qe.specularmap,Qe.envmap,Qe.aomap,Qe.lightmap,Qe.emissivemap,Qe.bumpmap,Qe.normalmap,Qe.displacementmap,Qe.fog,Qe.lights,{emissive:{value:new qe(0)},specular:{value:new qe(1118481)},shininess:{value:30}}]),vertexShader:Mn.meshphong_vert,fragmentShader:Mn.meshphong_frag},standard:{uniforms:ho([Qe.common,Qe.envmap,Qe.aomap,Qe.lightmap,Qe.emissivemap,Qe.bumpmap,Qe.normalmap,Qe.displacementmap,Qe.roughnessmap,Qe.metalnessmap,Qe.fog,Qe.lights,{emissive:{value:new qe(0)},roughness:{value:1},metalness:{value:0},envMapIntensity:{value:1}}]),vertexShader:Mn.meshphysical_vert,fragmentShader:Mn.meshphysical_frag},toon:{uniforms:ho([Qe.common,Qe.aomap,Qe.lightmap,Qe.emissivemap,Qe.bumpmap,Qe.normalmap,Qe.displacementmap,Qe.gradientmap,Qe.fog,Qe.lights,{emissive:{value:new qe(0)}}]),vertexShader:Mn.meshtoon_vert,fragmentShader:Mn.meshtoon_frag},matcap:{uniforms:ho([Qe.common,Qe.bumpmap,Qe.normalmap,Qe.displacementmap,Qe.fog,{matcap:{value:null}}]),vertexShader:Mn.meshmatcap_vert,fragmentShader:Mn.meshmatcap_frag},points:{uniforms:ho([Qe.points,Qe.fog]),vertexShader:Mn.points_vert,fragmentShader:Mn.points_frag},dashed:{uniforms:ho([Qe.common,Qe.fog,{scale:{value:1},dashSize:{value:1},totalSize:{value:2}}]),vertexShader:Mn.linedashed_vert,fragmentShader:Mn.linedashed_frag},depth:{uniforms:ho([Qe.common,Qe.displacementmap]),vertexShader:Mn.depth_vert,fragmentShader:Mn.depth_frag},normal:{uniforms:ho([Qe.common,Qe.bumpmap,Qe.normalmap,Qe.displacementmap,{opacity:{value:1}}]),vertexShader:Mn.meshnormal_vert,fragmentShader:Mn.meshnormal_frag},sprite:{uniforms:ho([Qe.sprite,Qe.fog]),vertexShader:Mn.sprite_vert,fragmentShader:Mn.sprite_frag},background:{uniforms:{uvTransform:{value:new wn},t2D:{value:null},backgroundIntensity:{value:1}},vertexShader:Mn.background_vert,fragmentShader:Mn.background_frag},backgroundCube:{uniforms:{envMap:{value:null},flipEnvMap:{value:-1},backgroundBlurriness:{value:0},backgroundIntensity:{value:1},backgroundRotation:{value:new wn}},vertexShader:Mn.backgroundCube_vert,fragmentShader:Mn.backgroundCube_frag},cube:{uniforms:{tCube:{value:null},tFlip:{value:-1},opacity:{value:1}},vertexShader:Mn.cube_vert,fragmentShader:Mn.cube_frag},equirect:{uniforms:{tEquirect:{value:null}},vertexShader:Mn.equirect_vert,fragmentShader:Mn.equirect_frag},distanceRGBA:{uniforms:ho([Qe.common,Qe.displacementmap,{referencePosition:{value:new O},nearDistance:{value:1},farDistance:{value:1e3}}]),vertexShader:Mn.distanceRGBA_vert,fragmentShader:Mn.distanceRGBA_frag},shadow:{uniforms:ho([Qe.lights,Qe.fog,{color:{value:new qe(0)},opacity:{value:1}}]),vertexShader:Mn.shadow_vert,fragmentShader:Mn.shadow_frag}};ec.physical={uniforms:ho([ec.standard.uniforms,{clearcoat:{value:0},clearcoatMap:{value:null},clearcoatMapTransform:{value:new wn},clearcoatNormalMap:{value:null},clearcoatNormalMapTransform:{value:new wn},clearcoatNormalScale:{value:new xe(1,1)},clearcoatRoughness:{value:0},clearcoatRoughnessMap:{value:null},clearcoatRoughnessMapTransform:{value:new wn},dispersion:{value:0},iridescence:{value:0},iridescenceMap:{value:null},iridescenceMapTransform:{value:new wn},iridescenceIOR:{value:1.3},iridescenceThicknessMinimum:{value:100},iridescenceThicknessMaximum:{value:400},iridescenceThicknessMap:{value:null},iridescenceThicknessMapTransform:{value:new wn},sheen:{value:0},sheenColor:{value:new qe(0)},sheenColorMap:{value:null},sheenColorMapTransform:{value:new wn},sheenRoughness:{value:1},sheenRoughnessMap:{value:null},sheenRoughnessMapTransform:{value:new wn},transmission:{value:0},transmissionMap:{value:null},transmissionMapTransform:{value:new wn},transmissionSamplerSize:{value:new xe},transmissionSamplerMap:{value:null},thickness:{value:0},thicknessMap:{value:null},thicknessMapTransform:{value:new wn},attenuationDistance:{value:0},attenuationColor:{value:new qe(0)},specularColor:{value:new qe(1,1,1)},specularColorMap:{value:null},specularColorMapTransform:{value:new wn},specularIntensity:{value:1},specularIntensityMap:{value:null},specularIntensityMapTransform:{value:new wn},anisotropyVector:{value:new xe},anisotropyMap:{value:null},anisotropyMapTransform:{value:new wn}}]),vertexShader:Mn.meshphysical_vert,fragmentShader:Mn.meshphysical_frag};const rS={r:0,b:0,g:0},lf=new td,kce=new Bt;function Pce(i,t,e,n,r,s,o){const a=new qe(0);let c,d,l=!0===s?0:1,h=null,p=0,m=null;function g(M){let x=!0===M.isScene?M.background:null;return x&&x.isTexture&&(x=(M.backgroundBlurriness>0?e:t).get(x)),x}function y(M,x){M.getRGB(rS,W4(i)),n.buffers.color.setClear(rS.r,rS.g,rS.b,x,o)}return{getClearColor:function(){return a},setClearColor:function(M,x=1){a.set(M),l=x,y(a,l)},getClearAlpha:function(){return l},setClearAlpha:function(M){l=M,y(a,l)},render:function b(M){let x=!1;const C=g(M);null===C?y(a,l):C&&C.isColor&&(y(C,1),x=!0);const F=i.xr.getEnvironmentBlendMode();"additive"===F?n.buffers.color.setClear(0,0,0,1,o):"alpha-blend"===F&&n.buffers.color.setClear(0,0,0,0,o),(i.autoClear||x)&&(n.buffers.depth.setTest(!0),n.buffers.depth.setMask(!0),n.buffers.color.setMask(!0),i.clear(i.autoClearColor,i.autoClearDepth,i.autoClearStencil))},addToRenderList:function v(M,x){const C=g(x);C&&(C.isCubeTexture||C.mapping===fb)?(void 0===d&&(d=new Nn(new nf(1,1,1),new vl({name:"BackgroundCubeMaterial",uniforms:xg(ec.backgroundCube.uniforms),vertexShader:ec.backgroundCube.vertexShader,fragmentShader:ec.backgroundCube.fragmentShader,side:To,depthTest:!1,depthWrite:!1,fog:!1})),d.geometry.deleteAttribute("normal"),d.geometry.deleteAttribute("uv"),d.onBeforeRender=function(F,D,k){this.matrixWorld.copyPosition(k.matrixWorld)},Object.defineProperty(d.material,"envMap",{get:function(){return this.uniforms.envMap.value}}),r.update(d)),lf.copy(x.backgroundRotation),lf.x*=-1,lf.y*=-1,lf.z*=-1,C.isCubeTexture&&!1===C.isRenderTargetTexture&&(lf.y*=-1,lf.z*=-1),d.material.uniforms.envMap.value=C,d.material.uniforms.flipEnvMap.value=C.isCubeTexture&&!1===C.isRenderTargetTexture?-1:1,d.material.uniforms.backgroundBlurriness.value=x.backgroundBlurriness,d.material.uniforms.backgroundIntensity.value=x.backgroundIntensity,d.material.uniforms.backgroundRotation.value.setFromMatrix4(kce.makeRotationFromEuler(lf)),d.material.toneMapped=Jn.getTransfer(C.colorSpace)!==Fi,(h!==C||p!==C.version||m!==i.toneMapping)&&(d.material.needsUpdate=!0,h=C,p=C.version,m=i.toneMapping),d.layers.enableAll(),M.unshift(d,d.geometry,d.material,0,0,null)):C&&C.isTexture&&(void 0===c&&(c=new Nn(new af(2,2),new vl({name:"BackgroundMaterial",uniforms:xg(ec.background.uniforms),vertexShader:ec.background.vertexShader,fragmentShader:ec.background.fragmentShader,side:Ql,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=C,c.material.uniforms.backgroundIntensity.value=x.backgroundIntensity,c.material.toneMapped=Jn.getTransfer(C.colorSpace)!==Fi,!0===C.matrixAutoUpdate&&C.updateMatrix(),c.material.uniforms.uvTransform.value.copy(C.matrix),(h!==C||p!==C.version||m!==i.toneMapping)&&(c.material.needsUpdate=!0,h=C,p=C.version,m=i.toneMapping),c.layers.enableAll(),M.unshift(c,c.geometry,c.material,0,0,null))}}}function Oce(i,t){const e=i.getParameter(i.MAX_VERTEX_ATTRIBS),n={},r=p(null);let s=r,o=!1;function c(A){return i.bindVertexArray(A)}function d(A){return i.deleteVertexArray(A)}function p(A){const W=[],ie=[],ne=[];for(let oe=0;oe=0){const Be=oe[J];let Ye=ge[J];if(void 0===Ye&&("instanceMatrix"===J&&A.instanceMatrix&&(Ye=A.instanceMatrix),"instanceColor"===J&&A.instanceColor&&(Ye=A.instanceColor)),void 0===Be||Be.attribute!==Ye||Ye&&Be.data!==Ye.data)return!0;q++}return s.attributesNum!==q||s.index!==ne}(A,ne,ie,oe),ge&&function g(A,W,ie,ne){const oe={},ge=W.attributes;let q=0;const se=ie.getAttributes();for(const J in se)if(se[J].location>=0){let Be=ge[J];void 0===Be&&("instanceMatrix"===J&&A.instanceMatrix&&(Be=A.instanceMatrix),"instanceColor"===J&&A.instanceColor&&(Be=A.instanceColor));const Ye={};Ye.attribute=Be,Be&&Be.data&&(Ye.data=Be.data),oe[J]=Ye,q++}s.attributes=oe,s.attributesNum=q,s.index=ne}(A,ne,ie,oe),null!==oe&&t.update(oe,i.ELEMENT_ARRAY_BUFFER),(ge||o)&&(o=!1,function C(A,W,ie,ne){b();const oe=ne.attributes,ge=ie.getAttributes(),q=W.defaultAttributeValues;for(const se in ge){const J=ge[se];if(J.location>=0){let we=oe[se];if(void 0===we&&("instanceMatrix"===se&&A.instanceMatrix&&(we=A.instanceMatrix),"instanceColor"===se&&A.instanceColor&&(we=A.instanceColor)),void 0!==we){const Be=we.normalized,Ye=we.itemSize,Rt=t.get(we);if(void 0===Rt)continue;const nn=Rt.buffer,le=Rt.type,Pe=Rt.bytesPerElement,Ze=le===i.INT||le===i.UNSIGNED_INT||we.gpuType===lk;if(we.isInterleavedBufferAttribute){const Fe=we.data,wt=Fe.stride,At=we.offset;if(Fe.isInstancedInterleavedBuffer){for(let St=0;St0&&i.getShaderPrecisionFormat(i.FRAGMENT_SHADER,i.HIGH_FLOAT).precision>0)return"highp";D="mediump"}return"mediump"===D&&i.getShaderPrecisionFormat(i.VERTEX_SHADER,i.MEDIUM_FLOAT).precision>0&&i.getShaderPrecisionFormat(i.FRAGMENT_SHADER,i.MEDIUM_FLOAT).precision>0?"mediump":"lowp"}let c=void 0!==e.precision?e.precision:"highp";const d=l(c);d!==c&&(console.warn("THREE.WebGLRenderer:",c,"not supported, using",d,"instead."),c=d);const h=!0===e.logarithmicDepthBuffer,p=i.getParameter(i.MAX_TEXTURE_IMAGE_UNITS),m=i.getParameter(i.MAX_VERTEX_TEXTURE_IMAGE_UNITS);return{isWebGL2:!0,getMaxAnisotropy:function s(){if(void 0!==r)return r;if(!0===t.has("EXT_texture_filter_anisotropic")){const D=t.get("EXT_texture_filter_anisotropic");r=i.getParameter(D.MAX_TEXTURE_MAX_ANISOTROPY_EXT)}else r=0;return r},getMaxPrecision:l,textureFormatReadable:function o(D){return!(D!==Io&&n.convert(D)!==i.getParameter(i.IMPLEMENTATION_COLOR_READ_FORMAT))},textureTypeReadable:function a(D){const k=D===Xm&&(t.has("EXT_color_buffer_half_float")||t.has("EXT_color_buffer_float"));return!(D!==Zc&&n.convert(D)!==i.getParameter(i.IMPLEMENTATION_COLOR_READ_TYPE)&&D!==Zo&&!k)},precision:c,logarithmicDepthBuffer:h,maxTextures:p,maxVertexTextures:m,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:m>0,maxSamples:i.getParameter(i.MAX_SAMPLES)}}function Nce(i){const t=this;let e=null,n=0,r=!1,s=!1;const o=new rf,a=new wn,l={value:null,needsUpdate:!1};function d(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=d(g,p,x,m);for(let F=0;F!==x;++F)C[F]=e[F];y.clippingState=C,this.numIntersection=b?this.numPlanes:0,this.numPlanes+=M}}}function Bce(i){let t=new WeakMap;function e(o,a){return a===MC?o.mapping=Kc:a===CC&&(o.mapping=Kh),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===MC||a===CC){if(t.has(o))return e(t.get(o).texture,o.mapping);{const l=o.image;if(l&&l.height>0){const c=new Tae(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 Db extends dP{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,d=(this.top-this.bottom)/this.view.fullHeight/this.zoom;s+=c*this.view.offsetX,o=s+c*this.view.width,a-=d*this.view.offsetY,l=a-d*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 K4=[.125,.215,.35,.446,.526,.582],hP=new Db,Z4=new qe;let fP=null,pP=0,mP=0,gP=!1;const df=(1+Math.sqrt(5))/2,Sg=1/df,Q4=[new O(-df,Sg,0),new O(df,Sg,0),new O(-Sg,0,df),new O(Sg,0,df),new O(0,df,-Sg),new O(0,df,Sg),new O(-1,1,-1),new O(1,1,-1),new O(-1,1,1),new O(1,1,1)];class J4{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){fP=this._renderer.getRenderTarget(),pP=this._renderer.getActiveCubeFace(),mP=this._renderer.getActiveMipmapLevel(),gP=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=n5(),this._compileMaterial(this._cubemapMaterial))}compileEquirectangularShader(){null===this._equirectMaterial&&(this._equirectMaterial=t5(),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=K4[o-i+4-1]:0===o&&(l=0),n.push(l);const c=1/(a-2),d=-c,h=1+c,p=[d,d,h,d,h,h,d,d,h,h,d,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 D=0;D2?0:-1;M.set([k,B,0,k+2/3,B,0,k+2/3,B+1,0,k,B,0,k+2/3,B+1,0,k,B+1,0],b*g*D),x.set(p,v*g*D),C.set([D,D,D,D,D,D],y*g*D)}const F=new hn;F.setAttribute("position",new Hi(M,b)),F.setAttribute("uv",new Hi(x,v)),F.setAttribute("faceIndex",new Hi(C,y)),t.push(F),r>4&&r--}return{lodPlanes:t,sizeLods:e,sigmas:n}}(s)),this._blurMaterial=function Vce(i,t,e){const n=new Float32Array(20),r=new O(0,1,0);return new vl({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:Xc,depthTest:!1,depthWrite:!1})}(s,t,e)}return r}_compileMaterial(t){const e=new Nn(this._lodPlanes[0],t);this._renderer.compile(e,hP)}_sceneToCubeUV(t,e,n,r){const a=new br(90,1,e,n),l=[1,-1,1,1,1,1],c=[1,1,1,-1,-1,-1],d=this._renderer,h=d.autoClear,p=d.toneMapping;d.getClearColor(Z4),d.toneMapping=_u,d.autoClear=!1;const m=new vr({name:"PMREM.Background",side:To,depthWrite:!1,depthTest:!1}),g=new Nn(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(Z4),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;sS(r,M*x,y>2?x:0,x,x),d.setRenderTarget(r),b&&d.render(g,a),d.render(t,a)}g.geometry.dispose(),g.material.dispose(),d.toneMapping=p,d.autoClear=h,t.background=v}_textureToCubeUV(t,e){const n=this._renderer,r=t.mapping===Kc||t.mapping===Kh;r?(null===this._cubemapMaterial&&(this._cubemapMaterial=n5()),this._cubemapMaterial.uniforms.flipEnvMap.value=!1===t.isRenderTargetTexture?-1:1):null===this._equirectMaterial&&(this._equirectMaterial=t5());const s=r?this._cubemapMaterial:this._equirectMaterial,o=new Nn(this._lodPlanes[0],s);s.uniforms.envMap.value=t;const l=this._cubeSize;sS(e,0,0,3*l,2*l),n.setRenderTarget(e),n.render(o,hP)}_applyPMREM(t){const e=this._renderer,n=e.autoClear;e.autoClear=!1;const r=this._lodPlanes.length;for(let s=1;s20&&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 k=0;k<20;++k){const B=k/b,T=Math.exp(-B*B/2);y.push(T),0===k?M+=T:kx-4?r-x+4:0),4*(this._cubeSize-C),3*C,2*C),l.setRenderTarget(e),l.render(h,hP)}}function e5(i,t,e){const n=new bu(i,t,e);return n.texture.mapping=fb,n.texture.name="PMREM.cubeUv",n.scissorTest=!0,n}function sS(i,t,e,n,r){i.viewport.set(t,e,n,r),i.scissor.set(t,e,n,r)}function t5(){return new vl({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:Xc,depthTest:!1,depthWrite:!1})}function n5(){return new vl({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:Xc,depthTest:!1,depthWrite:!1})}function zce(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===MC||l===CC,d=l===Kc||l===Kh;if(c||d){let h=t.get(a);if(a.isRenderTargetTexture&&a.pmremVersion!==(void 0!==h?h.texture.pmremVersion:0))return null===e&&(e=new J4(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||d&&m&&function r(a){let l=0;for(let d=0;d<6;d++)void 0!==a[d]&&l++;return 6===l}(m)?(null===e&&(e=new J4(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 Hce(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&&sg("THREE.WebGLRenderer: "+n+" extension not supported."),r}}}function Gce(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&&(F=Math.ceil(C/t.maxTextureSize),C=t.maxTextureSize);const D=new Float32Array(C*F*4*h),k=new qk(D,C,F,h);k.type=Zo,k.needsUpdate=!0;const B=4*x;for(let A=0;A0)return i;const r=t*e;let s=d5[r];if(void 0===s&&(s=new Float32Array(r),d5[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 Lr(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 Hde(i,t){const e=function zde(i){const t=Jn.getPrimaries(Jn.workingColorSpace),e=Jn.getPrimaries(i);let n;switch(t===e?n="":t===FC&&e===OC?n="LinearDisplayP3ToLinearSRGB":t===OC&&e===FC&&(n="LinearSRGBToLinearDisplayP3"),i){case ds:case kC:return[n,"LinearTransferOETF"];case cs:case Gk: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 Gde(i,t){let e;switch(t){case xoe:e="Linear";break;case woe:e="Reinhard";break;case Moe:e="OptimizedCineon";break;case Coe:e="ACESFilmic";break;case Eoe:e="AgX";break;case Aoe:e="Neutral";break;case Soe:e="Custom";break;default:console.warn("THREE.WebGLProgram: Unsupported toneMapping:",t),e="Linear"}return"vec3 "+i+"( vec3 color ) { return "+e+"ToneMapping( color ); }"}const lS=new O;function Tb(i){return""!==i}function v5(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 y5(i,t){return i.replace(/NUM_CLIPPING_PLANES/g,t.numClippingPlanes).replace(/UNION_CLIPPING_PLANES/g,t.numClippingPlanes-t.numClipIntersection)}const qde=/^[ \t]*#include +<([\w\d./]+)>/gm;function yP(i){return i.replace(qde,Kde)}const Xde=new Map;function Kde(i,t){let e=Mn[t];if(void 0===e){const n=Xde.get(t);if(void 0===n)throw new Error("Can not resolve #include <"+t+">");e=Mn[n],console.warn('THREE.WebGLRenderer: Shader chunk "%s" has been deprecated. Use "%s" instead.',t,n)}return yP(e)}const Zde=/#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 b5(i){return i.replace(Zde,Qde)}function Qde(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(Tb).join("\n"),y.length>0&&(y+="\n")):(v=[x5(e),"#define SHADER_TYPE "+e.shaderType,"#define SHADER_NAME "+e.shaderName,g,e.extensionClipCullDistance?"#define USE_CLIP_DISTANCE":"",e.batching?"#define USE_BATCHING":"",e.batchingColor?"#define USE_BATCHING_COLOR":"",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 "+d:"",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_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.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","#ifdef USE_SKINNING","\tattribute vec4 skinIndex;","\tattribute vec4 skinWeight;","#endif","\n"].filter(Tb).join("\n"),y=[x5(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 "+d:"",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.dispersion?"#define USE_DISPERSION":"",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||e.batchingColor?"#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.decodeVideoTexture?"#define DECODE_VIDEO_TEXTURE":"",e.logarithmicDepthBuffer?"#define USE_LOGDEPTHBUF":"","uniform mat4 viewMatrix;","uniform vec3 cameraPosition;","uniform bool isOrthographic;",e.toneMapping!==_u?"#define TONE_MAPPING":"",e.toneMapping!==_u?Mn.tonemapping_pars_fragment:"",e.toneMapping!==_u?Gde("toneMapping",e.toneMapping):"",e.dithering?"#define DITHERING":"",e.opaque?"#define OPAQUE":"",Mn.colorspace_pars_fragment,Hde("linearToOutputTexel",e.outputColorSpace),(Jn.getLuminanceCoefficients(lS),["float luminance( const in vec3 rgb ) {",`\tconst vec3 weights = vec3( ${lS.x.toFixed(4)}, ${lS.y.toFixed(4)}, ${lS.z.toFixed(4)} );`,"\treturn dot( weights, rgb );","}"].join("\n")),e.useDepthPacking?"#define DEPTH_PACKING "+e.depthPacking:"","\n"].filter(Tb).join("\n")),o=yP(o),o=v5(o,e),o=y5(o,e),a=yP(a),a=v5(a,e),a=y5(a,e),o=b5(o),a=b5(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===x4?"":"layout(location = 0) out highp vec4 pc_fragColor;",e.glslVersion===x4?"":"#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,F=g5(r,r.VERTEX_SHADER,M+v+o),D=g5(r,r.FRAGMENT_SHADER,C);function k(W){if(i.debug.checkShaderErrors){const ie=r.getProgramInfoLog(b).trim(),ne=r.getShaderInfoLog(F).trim(),oe=r.getShaderInfoLog(D).trim();let ge=!0,q=!0;if(!1===r.getProgramParameter(b,r.LINK_STATUS))if(ge=!1,"function"==typeof i.debug.onShaderError)i.debug.onShaderError(r,b,F,D);else{const se=_5(r,F,"vertex"),J=_5(r,D,"fragment");console.error("THREE.WebGLProgram: Shader Error "+r.getError()+" - VALIDATE_STATUS "+r.getProgramParameter(b,r.VALIDATE_STATUS)+"\n\nMaterial Name: "+W.name+"\nMaterial Type: "+W.type+"\n\nProgram Info Log: "+ie+"\n"+se+"\n"+J)}else""!==ie?console.warn("THREE.WebGLProgram: Program Info Log:",ie):(""===ne||""===oe)&&(q=!1);q&&(W.diagnostics={runnable:ge,programLog:ie,vertexShader:{log:ne,prefix:v},fragmentShader:{log:oe,prefix:y}})}r.deleteShader(F),r.deleteShader(D),B=new aS(r,b),T=function Yde(i,t){const e={},n=i.getProgramParameter(t,i.ACTIVE_ATTRIBUTES);for(let r=0;r0,de=T.clearcoat>0,De=T.iridescence>0,Ae=T.sheen>0,Ut=T.transmission>0,Je=R&&!!T.anisotropyMap,ut=de&&!!T.clearcoatMap,bn=de&&!!T.clearcoatNormalMap,ze=de&&!!T.clearcoatRoughnessMap,dt=De&&!!T.iridescenceMap,Wn=De&&!!T.iridescenceThicknessMap,cn=Ae&&!!T.sheenColorMap,_t=Ae&&!!T.sheenRoughnessMap,_n=!!T.specularMap,kn=!!T.specularColorMap,qi=!!T.specularIntensityMap,Z=Ut&&!!T.transmissionMap,We=Ut&&!!T.thicknessMap,Ee=!!T.alphaMap,ei=!!T.extensions;let xr=_u;T.toneMapped&&(null===Fe||!0===Fe.isXRRenderTarget)&&(xr=i.toneMapping);const hs={shaderID:we,shaderType:T.type,shaderName:T.name,vertexShader:nn,fragmentShader:le,defines:T.defines,customVertexShaderID:Pe,customFragmentShaderID:Ze,isRawShaderMaterial:!0===T.isRawShaderMaterial,glslVersion:T.glslVersion,precision:m,batching:At,batchingColor:At&&null!==ne._colorsTexture,instancing:wt,instancingColor:wt&&null!==ne.instanceColor,instancingMorph:wt&&null!==ne.morphTexture,supportsVertexTextures:p,outputColorSpace:null===Fe?i.outputColorSpace:!0===Fe.isXRRenderTarget?Fe.texture.colorSpace:ds,alphaToCoverage:!!T.alphaToCoverage,map:St,matcap:!!T.matcap,envMap:N,envMapMode:N&&se.mapping,envMapCubeUVHeight:J,aoMap:Ge,lightMap:Le,bumpMap:tt,normalMap:Me,displacementMap:p&&$t,emissiveMap:nt,normalMapObjectSpace:Me&&T.normalMapType===Foe,normalMapTangentSpace:Me&&T.normalMapType===Zh,metalnessMap:pt,roughnessMap:H,anisotropy:R,anisotropyMap:Je,clearcoat:de,clearcoatMap:ut,clearcoatNormalMap:bn,clearcoatRoughnessMap:ze,dispersion:T.dispersion>0,iridescence:De,iridescenceMap:dt,iridescenceThicknessMap:Wn,sheen:Ae,sheenColorMap:cn,sheenRoughnessMap:_t,specularMap:_n,specularColorMap:kn,specularIntensityMap:qi,transmission:Ut,transmissionMap:Z,thicknessMap:We,gradientMap:!!T.gradientMap,opaque:!1===T.transparent&&T.blending===Ym&&!1===T.alphaToCoverage,alphaMap:Ee,alphaTest:T.alphaTest>0,alphaHash:!!T.alphaHash,combine:T.combine,mapUv:St&&b(T.map.channel),aoMapUv:Ge&&b(T.aoMap.channel),lightMapUv:Le&&b(T.lightMap.channel),bumpMapUv:tt&&b(T.bumpMap.channel),normalMapUv:Me&&b(T.normalMap.channel),displacementMapUv:$t&&b(T.displacementMap.channel),emissiveMapUv:nt&&b(T.emissiveMap.channel),metalnessMapUv:pt&&b(T.metalnessMap.channel),roughnessMapUv:H&&b(T.roughnessMap.channel),anisotropyMapUv:Je&&b(T.anisotropyMap.channel),clearcoatMapUv:ut&&b(T.clearcoatMap.channel),clearcoatNormalMapUv:bn&&b(T.clearcoatNormalMap.channel),clearcoatRoughnessMapUv:ze&&b(T.clearcoatRoughnessMap.channel),iridescenceMapUv:dt&&b(T.iridescenceMap.channel),iridescenceThicknessMapUv:Wn&&b(T.iridescenceThicknessMap.channel),sheenColorMapUv:cn&&b(T.sheenColorMap.channel),sheenRoughnessMapUv:_t&&b(T.sheenRoughnessMap.channel),specularMapUv:_n&&b(T.specularMap.channel),specularColorMapUv:kn&&b(T.specularColorMap.channel),specularIntensityMapUv:qi&&b(T.specularIntensityMap.channel),transmissionMapUv:Z&&b(T.transmissionMap.channel),thicknessMapUv:We&&b(T.thicknessMap.channel),alphaMapUv:Ee&&b(T.alphaMap.channel),vertexTangents:!!ge.attributes.tangent&&(Me||R),vertexColors:T.vertexColors,vertexAlphas:!0===T.vertexColors&&!!ge.attributes.color&&4===ge.attributes.color.itemSize,pointsUvs:!0===ne.isPoints&&!!ge.attributes.uv&&(St||Ee),fog:!!oe,useFog:!0===T.fog,fogExp2:!!oe&&oe.isFogExp2,flatShading:!0===T.flatShading,sizeAttenuation:!0===T.sizeAttenuation,logarithmicDepthBuffer:h,skinning:!0===ne.isSkinnedMesh,morphTargets:void 0!==ge.morphAttributes.position,morphNormals:void 0!==ge.morphAttributes.normal,morphColors:void 0!==ge.morphAttributes.color,morphTargetsCount:Ye,morphTextureStride:Rt,numDirLights:A.directional.length,numPointLights:A.point.length,numSpotLights:A.spot.length,numSpotLightMaps:A.spotLightMap.length,numRectAreaLights:A.rectArea.length,numHemiLights:A.hemi.length,numDirLightShadows:A.directionalShadowMap.length,numPointLightShadows:A.pointShadowMap.length,numSpotLightShadows:A.spotShadowMap.length,numSpotLightShadowsWithMaps:A.numSpotLightShadowsWithMaps,numLightProbes:A.numLightProbes,numClippingPlanes:o.numPlanes,numClipIntersection:o.numIntersection,dithering:T.dithering,shadowMapEnabled:i.shadowMap.enabled&&W.length>0,shadowMapType:i.shadowMap.type,toneMapping:xr,decodeVideoTexture:St&&!0===T.map.isVideoTexture&&Jn.getTransfer(T.map.colorSpace)===Fi,premultipliedAlpha:T.premultipliedAlpha,doubleSided:T.side===Ko,flipSided:T.side===To,useDepthPacking:T.depthPacking>=0,depthPacking:T.depthPacking||0,index0AttributeName:T.index0AttributeName,extensionClipCullDistance:ei&&!0===T.extensions.clipCullDistance&&n.has("WEBGL_clip_cull_distance"),extensionMultiDraw:(ei&&!0===T.extensions.multiDraw||At)&&n.has("WEBGL_multi_draw"),rendererExtensionParallelShaderCompile:n.has("KHR_parallel_shader_compile"),customProgramCacheKey:T.customProgramCacheKey()};return hs.vertexUv1s=c.has(1),hs.vertexUv2s=c.has(2),hs.vertexUv3s=c.has(3),c.clear(),hs},getProgramCacheKey:function y(T){const A=[];if(T.shaderID?A.push(T.shaderID):(A.push(T.customVertexShaderID),A.push(T.customFragmentShaderID)),void 0!==T.defines)for(const W in T.defines)A.push(W),A.push(T.defines[W]);return!1===T.isRawShaderMaterial&&(function M(T,A){T.push(A.precision),T.push(A.outputColorSpace),T.push(A.envMapMode),T.push(A.envMapCubeUVHeight),T.push(A.mapUv),T.push(A.alphaMapUv),T.push(A.lightMapUv),T.push(A.aoMapUv),T.push(A.bumpMapUv),T.push(A.normalMapUv),T.push(A.displacementMapUv),T.push(A.emissiveMapUv),T.push(A.metalnessMapUv),T.push(A.roughnessMapUv),T.push(A.anisotropyMapUv),T.push(A.clearcoatMapUv),T.push(A.clearcoatNormalMapUv),T.push(A.clearcoatRoughnessMapUv),T.push(A.iridescenceMapUv),T.push(A.iridescenceThicknessMapUv),T.push(A.sheenColorMapUv),T.push(A.sheenRoughnessMapUv),T.push(A.specularMapUv),T.push(A.specularColorMapUv),T.push(A.specularIntensityMapUv),T.push(A.transmissionMapUv),T.push(A.thicknessMapUv),T.push(A.combine),T.push(A.fogExp2),T.push(A.sizeAttenuation),T.push(A.morphTargetsCount),T.push(A.morphAttributeCount),T.push(A.numDirLights),T.push(A.numPointLights),T.push(A.numSpotLights),T.push(A.numSpotLightMaps),T.push(A.numHemiLights),T.push(A.numRectAreaLights),T.push(A.numDirLightShadows),T.push(A.numPointLightShadows),T.push(A.numSpotLightShadows),T.push(A.numSpotLightShadowsWithMaps),T.push(A.numLightProbes),T.push(A.shadowMapType),T.push(A.toneMapping),T.push(A.numClippingPlanes),T.push(A.numClipIntersection),T.push(A.depthPacking)}(A,T),function x(T,A){a.disableAll(),A.supportsVertexTextures&&a.enable(0),A.instancing&&a.enable(1),A.instancingColor&&a.enable(2),A.instancingMorph&&a.enable(3),A.matcap&&a.enable(4),A.envMap&&a.enable(5),A.normalMapObjectSpace&&a.enable(6),A.normalMapTangentSpace&&a.enable(7),A.clearcoat&&a.enable(8),A.iridescence&&a.enable(9),A.alphaTest&&a.enable(10),A.vertexColors&&a.enable(11),A.vertexAlphas&&a.enable(12),A.vertexUv1s&&a.enable(13),A.vertexUv2s&&a.enable(14),A.vertexUv3s&&a.enable(15),A.vertexTangents&&a.enable(16),A.anisotropy&&a.enable(17),A.alphaHash&&a.enable(18),A.batching&&a.enable(19),A.dispersion&&a.enable(20),A.batchingColor&&a.enable(21),T.push(a.mask),a.disableAll(),A.fog&&a.enable(0),A.useFog&&a.enable(1),A.flatShading&&a.enable(2),A.logarithmicDepthBuffer&&a.enable(3),A.skinning&&a.enable(4),A.morphTargets&&a.enable(5),A.morphNormals&&a.enable(6),A.morphColors&&a.enable(7),A.premultipliedAlpha&&a.enable(8),A.shadowMapEnabled&&a.enable(9),A.doubleSided&&a.enable(10),A.flipSided&&a.enable(11),A.useDepthPacking&&a.enable(12),A.dithering&&a.enable(13),A.transmission&&a.enable(14),A.sheen&&a.enable(15),A.opaque&&a.enable(16),A.pointsUvs&&a.enable(17),A.decodeVideoTexture&&a.enable(18),A.alphaToCoverage&&a.enable(19),T.push(a.mask)}(A,T),A.push(i.outputColorSpace)),A.push(T.customProgramCacheKey),A.join()},getUniforms:function C(T){const A=g[T.type];let W;return W=A?j4.clone(ec[A].uniforms):T.uniforms,W},acquireProgram:function F(T,A){let W;for(let ie=0,ne=d.length;ie0?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 d(){for(let h=t,p=i.length;h1&&e.sort(h||due),n.length>1&&n.sort(p||w5),r.length>1&&r.sort(p||w5)}}}function uue(){let i=new WeakMap;return{get:function t(n,r){const s=i.get(n);let o;return void 0===s?(o=new M5,i.set(n,[o])):r>=s.length?(o=new M5,s.push(o)):o=s[r],o},dispose:function e(){i=new WeakMap}}}function hue(){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 O,color:new qe};break;case"SpotLight":e={position:new O,direction:new O,color:new qe,distance:0,coneCos:0,penumbraCos:0,decay:0};break;case"PointLight":e={position:new O,color:new qe,distance:0,decay:0};break;case"HemisphereLight":e={direction:new O,skyColor:new qe,groundColor:new qe};break;case"RectAreaLight":e={color:new qe,position:new O,halfWidth:new O,halfHeight:new O}}return i[t.id]=e,e}}}let pue=0;function mue(i,t){return(t.castShadow?2:0)-(i.castShadow?2:0)+(t.map?1:0)-(i.map?1:0)}function gue(i){const t=new hue,e=function fue(){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={shadowIntensity:1,shadowBias:0,shadowNormalBias:0,shadowRadius:1,shadowMapSize:new xe};break;case"PointLight":e={shadowIntensity:1,shadowBias:0,shadowNormalBias:0,shadowRadius:1,shadowMapSize:new xe,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 O);const r=new O,s=new Bt,o=new Bt;return{setup:function a(c){let d=0,h=0,p=0;for(let T=0;T<9;T++)n.probe[T].set(0,0,0);let m=0,g=0,b=0,v=0,y=0,M=0,x=0,C=0,F=0,D=0,k=0;c.sort(mue);for(let T=0,A=c.length;T0&&(!0===i.has("OES_texture_float_linear")?(n.rectAreaLTC1=Qe.LTC_FLOAT_1,n.rectAreaLTC2=Qe.LTC_FLOAT_2):(n.rectAreaLTC1=Qe.LTC_HALF_1,n.rectAreaLTC2=Qe.LTC_HALF_2)),n.ambient[0]=d,n.ambient[1]=h,n.ambient[2]=p;const B=n.hash;(B.directionalLength!==m||B.pointLength!==g||B.spotLength!==b||B.rectAreaLength!==v||B.hemiLength!==y||B.numDirectionalShadows!==M||B.numPointShadows!==x||B.numSpotShadows!==C||B.numSpotMaps!==F||B.numLightProbes!==k)&&(n.directional.length=m,n.spot.length=b,n.rectArea.length=v,n.point.length=g,n.hemi.length=y,n.directionalShadow.length=M,n.directionalShadowMap.length=M,n.pointShadow.length=x,n.pointShadowMap.length=x,n.spotShadow.length=C,n.spotShadowMap.length=C,n.directionalShadowMatrix.length=M,n.pointShadowMatrix.length=x,n.spotLightMatrix.length=C+F-D,n.spotLightMap.length=F,n.numSpotLightShadowsWithMaps=D,n.numLightProbes=k,B.directionalLength=m,B.pointLength=g,B.spotLength=b,B.rectAreaLength=v,B.hemiLength=y,B.numDirectionalShadows=M,B.numPointShadows=x,B.numSpotShadows=C,B.numSpotMaps=F,B.numLightProbes=k,n.version=pue++)},setupView:function l(c,d){let h=0,p=0,m=0,g=0,b=0;const v=d.matrixWorldInverse;for(let y=0,M=c.length;y=o.length?(a=new C5(i),o.push(a)):a=o[s],a},dispose:function n(){t=new WeakMap}}}class S5 extends ko{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 E5 extends ko{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 vue="void main() {\n\tgl_Position = vec4( position, 1.0 );\n}",yue="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 bue(i,t,e){let n=new iS;const r=new xe,s=new xe,o=new _i,a=new S5({depthPacking:Ooe}),l=new E5,c={},d=e.maxTextureSize,h={[Ql]:To,[To]:Ql,[Ko]:Ko},p=new vl({defines:{VSM_SAMPLES:8},uniforms:{shadow_pass:{value:null},resolution:{value:new xe},radius:{value:4}},vertexShader:vue,fragmentShader:yue}),m=p.clone();m.defines.HORIZONTAL_PASS=1;const g=new hn;g.setAttribute("position",new Hi(new Float32Array([-1,-1,.5,3,-1,.5,-1,3,.5]),3));const b=new Nn(g,p),v=this;this.enabled=!1,this.autoUpdate=!0,this.needsUpdate=!1,this.type=n4;let y=this.type;function M(D,k){const B=t.update(b);p.defines.VSM_SAMPLES!==D.blurSamples&&(p.defines.VSM_SAMPLES=D.blurSamples,m.defines.VSM_SAMPLES=D.blurSamples,p.needsUpdate=!0,m.needsUpdate=!0),null===D.mapPass&&(D.mapPass=new bu(r.x,r.y)),p.uniforms.shadow_pass.value=D.map.texture,p.uniforms.resolution.value=D.mapSize,p.uniforms.radius.value=D.radius,i.setRenderTarget(D.mapPass),i.clear(),i.renderBufferDirect(k,null,B,p,b,null),m.uniforms.shadow_pass.value=D.mapPass.texture,m.uniforms.resolution.value=D.mapSize,m.uniforms.radius.value=D.radius,i.setRenderTarget(D.map),i.clear(),i.renderBufferDirect(k,null,B,m,b,null)}function x(D,k,B,T){let A=null;const W=!0===B.isPointLight?D.customDistanceMaterial:D.customDepthMaterial;if(void 0!==W)A=W;else if(A=!0===B.isPointLight?l:a,i.localClippingEnabled&&!0===k.clipShadows&&Array.isArray(k.clippingPlanes)&&0!==k.clippingPlanes.length||k.displacementMap&&0!==k.displacementScale||k.alphaMap&&k.alphaTest>0||k.map&&k.alphaTest>0){const ie=A.uuid,ne=k.uuid;let oe=c[ie];void 0===oe&&(oe={},c[ie]=oe);let ge=oe[ne];void 0===ge&&(ge=A.clone(),oe[ne]=ge,k.addEventListener("dispose",F)),A=ge}return A.visible=k.visible,A.wireframe=k.wireframe,A.side=T===qc?null!==k.shadowSide?k.shadowSide:k.side:null!==k.shadowSide?k.shadowSide:h[k.side],A.alphaMap=k.alphaMap,A.alphaTest=k.alphaTest,A.map=k.map,A.clipShadows=k.clipShadows,A.clippingPlanes=k.clippingPlanes,A.clipIntersection=k.clipIntersection,A.displacementMap=k.displacementMap,A.displacementScale=k.displacementScale,A.displacementBias=k.displacementBias,A.wireframeLinewidth=k.wireframeLinewidth,A.linewidth=k.linewidth,!0===B.isPointLight&&!0===A.isMeshDistanceMaterial&&(i.properties.get(A).light=B),A}function C(D,k,B,T,A){if(!1===D.visible)return;if(D.layers.test(k.layers)&&(D.isMesh||D.isLine||D.isPoints)&&(D.castShadow||D.receiveShadow&&A===qc)&&(!D.frustumCulled||n.intersectsObject(D))){D.modelViewMatrix.multiplyMatrices(B.matrixWorldInverse,D.matrixWorld);const ne=t.update(D),oe=D.material;if(Array.isArray(oe)){const ge=ne.groups;for(let q=0,se=ge.length;qd||r.y>d)&&(r.x>d&&(s.x=Math.floor(d/we.x),r.x=s.x*we.x,J.mapSize.x=s.x),r.y>d&&(s.y=Math.floor(d/we.y),r.y=s.y*we.y,J.mapSize.y=s.y)),null===J.map||!0===ne||!0===oe){const Ye=this.type!==qc?{minFilter:_r,magFilter:_r}:{};null!==J.map&&J.map.dispose(),J.map=new bu(r.x,r.y,Ye),J.map.texture.name=se.name+".shadowMap",J.camera.updateProjectionMatrix()}i.setRenderTarget(J.map),i.clear();const Be=J.getViewportCount();for(let Ye=0;Ye=1):-1!==se.indexOf("OpenGL ES")&&(q=parseFloat(/^OpenGL ES (\d)/.exec(se)[1]),ge=q>=2);let J=null,we={};const Be=i.getParameter(i.SCISSOR_BOX),Ye=i.getParameter(i.VIEWPORT),Rt=(new _i).fromArray(Be),nn=(new _i).fromArray(Ye);function le(Z,We,Ce,Ee){const Ke=new Uint8Array(4),rn=i.createTexture();i.bindTexture(Z,rn),i.texParameteri(Z,i.TEXTURE_MIN_FILTER,i.NEAREST),i.texParameteri(Z,i.TEXTURE_MAG_FILTER,i.NEAREST);for(let ei=0;ei"u")&&/OculusBrowser/g.test(navigator.userAgent),c=new xe,d=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(H,R){return m?new OffscreenCanvas(H,R):bb("canvas")}function b(H,R,de){let Te=1;const De=pt(H);if((De.width>de||De.height>de)&&(Te=de/Math.max(De.width,De.height)),Te<1){if(typeof HTMLImageElement<"u"&&H instanceof HTMLImageElement||typeof HTMLCanvasElement<"u"&&H instanceof HTMLCanvasElement||typeof ImageBitmap<"u"&&H instanceof ImageBitmap||typeof VideoFrame<"u"&&H instanceof VideoFrame){const Ae=Math.floor(Te*De.width),Ut=Math.floor(Te*De.height);void 0===h&&(h=g(Ae,Ut));const Je=R?g(Ae,Ut):h;return Je.width=Ae,Je.height=Ut,Je.getContext("2d").drawImage(H,0,0,Ae,Ut),console.warn("THREE.WebGLRenderer: Texture has been resized from ("+De.width+"x"+De.height+") to ("+Ae+"x"+Ut+")."),Je}return"data"in H&&console.warn("THREE.WebGLRenderer: Image in DataTexture is too big ("+De.width+"x"+De.height+")."),H}return H}function v(H){return H.generateMipmaps&&H.minFilter!==_r&&H.minFilter!==ar}function y(H){i.generateMipmap(H)}function M(H,R,de,Te,De=!1){if(null!==H){if(void 0!==i[H])return i[H];console.warn("THREE.WebGLRenderer: Attempt to use non-existing WebGL internal format '"+H+"'")}let Ae=R;if(R===i.RED&&(de===i.FLOAT&&(Ae=i.R32F),de===i.HALF_FLOAT&&(Ae=i.R16F),de===i.UNSIGNED_BYTE&&(Ae=i.R8)),R===i.RED_INTEGER&&(de===i.UNSIGNED_BYTE&&(Ae=i.R8UI),de===i.UNSIGNED_SHORT&&(Ae=i.R16UI),de===i.UNSIGNED_INT&&(Ae=i.R32UI),de===i.BYTE&&(Ae=i.R8I),de===i.SHORT&&(Ae=i.R16I),de===i.INT&&(Ae=i.R32I)),R===i.RG&&(de===i.FLOAT&&(Ae=i.RG32F),de===i.HALF_FLOAT&&(Ae=i.RG16F),de===i.UNSIGNED_BYTE&&(Ae=i.RG8)),R===i.RG_INTEGER&&(de===i.UNSIGNED_BYTE&&(Ae=i.RG8UI),de===i.UNSIGNED_SHORT&&(Ae=i.RG16UI),de===i.UNSIGNED_INT&&(Ae=i.RG32UI),de===i.BYTE&&(Ae=i.RG8I),de===i.SHORT&&(Ae=i.RG16I),de===i.INT&&(Ae=i.RG32I)),R===i.RGB&&de===i.UNSIGNED_INT_5_9_9_9_REV&&(Ae=i.RGB9_E5),R===i.RGBA){const Ut=De?PC:Jn.getTransfer(Te);de===i.FLOAT&&(Ae=i.RGBA32F),de===i.HALF_FLOAT&&(Ae=i.RGBA16F),de===i.UNSIGNED_BYTE&&(Ae=Ut===Fi?i.SRGB8_ALPHA8:i.RGBA8),de===i.UNSIGNED_SHORT_4_4_4_4&&(Ae=i.RGBA4),de===i.UNSIGNED_SHORT_5_5_5_1&&(Ae=i.RGB5_A1)}return(Ae===i.R16F||Ae===i.R32F||Ae===i.RG16F||Ae===i.RG32F||Ae===i.RGBA16F||Ae===i.RGBA32F)&&t.get("EXT_color_buffer_float"),Ae}function x(H,R){let de;return H?null===R||R===vu||R===Km?de=i.DEPTH24_STENCIL8:R===Zo?de=i.DEPTH32F_STENCIL8:R===gb&&(de=i.DEPTH24_STENCIL8,console.warn("DepthTexture: 16 bit depth attachment is not supported with stencil. Using 24-bit attachment.")):null===R||R===vu||R===Km?de=i.DEPTH_COMPONENT24:R===Zo?de=i.DEPTH_COMPONENT32F:R===gb&&(de=i.DEPTH_COMPONENT16),de}function C(H,R){return!0===v(H)||H.isFramebufferTexture&&H.minFilter!==_r&&H.minFilter!==ar?Math.log2(Math.max(R.width,R.height))+1:void 0!==H.mipmaps&&H.mipmaps.length>0?H.mipmaps.length:H.isCompressedTexture&&Array.isArray(H.image)?R.mipmaps.length:1}function F(H){const R=H.target;R.removeEventListener("dispose",F),function k(H){const R=n.get(H);if(void 0===R.__webglInit)return;const de=H.source,Te=p.get(de);if(Te){const De=Te[R.__cacheKey];De.usedTimes--,0===De.usedTimes&&B(H),0===Object.keys(Te).length&&p.delete(de)}n.remove(H)}(R),R.isVideoTexture&&d.delete(R)}function D(H){const R=H.target;R.removeEventListener("dispose",D),function T(H){const R=n.get(H);if(H.depthTexture&&H.depthTexture.dispose(),H.isWebGLCubeRenderTarget)for(let Te=0;Te<6;Te++){if(Array.isArray(R.__webglFramebuffer[Te]))for(let De=0;De0&&de.__version!==H.version){const Te=H.image;if(null===Te)console.warn("THREE.WebGLRenderer: Texture marked for update but no image data found.");else{if(!1!==Te.complete)return void nn(de,H,R);console.warn("THREE.WebGLRenderer: Texture marked for update but image is incomplete")}}e.bindTexture(i.TEXTURE_2D,de.__webglTexture,i.TEXTURE0+R)}const J={[Jl]:i.REPEAT,[Zi]:i.CLAMP_TO_EDGE,[pb]:i.MIRRORED_REPEAT},we={[_r]:i.NEAREST,[ak]:i.NEAREST_MIPMAP_NEAREST,[qm]:i.NEAREST_MIPMAP_LINEAR,[ar]:i.LINEAR,[mb]:i.LINEAR_MIPMAP_NEAREST,[pl]:i.LINEAR_MIPMAP_LINEAR},Be={[Loe]:i.NEVER,[Hoe]:i.ALWAYS,[Noe]:i.LESS,[b4]:i.LEQUAL,[Boe]:i.EQUAL,[zoe]:i.GEQUAL,[Uoe]:i.GREATER,[Voe]:i.NOTEQUAL};function Ye(H,R){if(R.type===Zo&&!1===t.has("OES_texture_float_linear")&&(R.magFilter===ar||R.magFilter===mb||R.magFilter===qm||R.magFilter===pl||R.minFilter===ar||R.minFilter===mb||R.minFilter===qm||R.minFilter===pl)&&console.warn("THREE.WebGLRenderer: Unable to use linear filtering with floating point textures. OES_texture_float_linear not supported on this device."),i.texParameteri(H,i.TEXTURE_WRAP_S,J[R.wrapS]),i.texParameteri(H,i.TEXTURE_WRAP_T,J[R.wrapT]),(H===i.TEXTURE_3D||H===i.TEXTURE_2D_ARRAY)&&i.texParameteri(H,i.TEXTURE_WRAP_R,J[R.wrapR]),i.texParameteri(H,i.TEXTURE_MAG_FILTER,we[R.magFilter]),i.texParameteri(H,i.TEXTURE_MIN_FILTER,we[R.minFilter]),R.compareFunction&&(i.texParameteri(H,i.TEXTURE_COMPARE_MODE,i.COMPARE_REF_TO_TEXTURE),i.texParameteri(H,i.TEXTURE_COMPARE_FUNC,Be[R.compareFunction])),!0===t.has("EXT_texture_filter_anisotropic")){if(R.magFilter===_r||R.minFilter!==qm&&R.minFilter!==pl||R.type===Zo&&!1===t.has("OES_texture_float_linear"))return;if(R.anisotropy>1||n.get(R).__currentAnisotropy){const de=t.get("EXT_texture_filter_anisotropic");i.texParameterf(H,de.TEXTURE_MAX_ANISOTROPY_EXT,Math.min(R.anisotropy,r.getMaxAnisotropy())),n.get(R).__currentAnisotropy=R.anisotropy}}}function Rt(H,R){let de=!1;void 0===H.__webglInit&&(H.__webglInit=!0,R.addEventListener("dispose",F));const Te=R.source;let De=p.get(Te);void 0===De&&(De={},p.set(Te,De));const Ae=function ne(H){const R=[];return R.push(H.wrapS),R.push(H.wrapT),R.push(H.wrapR||0),R.push(H.magFilter),R.push(H.minFilter),R.push(H.anisotropy),R.push(H.internalFormat),R.push(H.format),R.push(H.type),R.push(H.generateMipmaps),R.push(H.premultiplyAlpha),R.push(H.flipY),R.push(H.unpackAlignment),R.push(H.colorSpace),R.join()}(R);if(Ae!==H.__cacheKey){void 0===De[Ae]&&(De[Ae]={texture:i.createTexture(),usedTimes:0},o.memory.textures++,de=!0),De[Ae].usedTimes++;const Ut=De[H.__cacheKey];void 0!==Ut&&(De[H.__cacheKey].usedTimes--,0===Ut.usedTimes&&B(R)),H.__cacheKey=Ae,H.__webglTexture=De[Ae].texture}return de}function nn(H,R,de){let Te=i.TEXTURE_2D;(R.isDataArrayTexture||R.isCompressedArrayTexture)&&(Te=i.TEXTURE_2D_ARRAY),R.isData3DTexture&&(Te=i.TEXTURE_3D);const De=Rt(H,R),Ae=R.source;e.bindTexture(Te,H.__webglTexture,i.TEXTURE0+de);const Ut=n.get(Ae);if(Ae.version!==Ut.__version||!0===De){e.activeTexture(i.TEXTURE0+de);const Je=Jn.getPrimaries(Jn.workingColorSpace),ut=R.colorSpace===yu?null:Jn.getPrimaries(R.colorSpace),bn=R.colorSpace===yu||Je===ut?i.NONE:i.BROWSER_DEFAULT_WEBGL;i.pixelStorei(i.UNPACK_FLIP_Y_WEBGL,R.flipY),i.pixelStorei(i.UNPACK_PREMULTIPLY_ALPHA_WEBGL,R.premultiplyAlpha),i.pixelStorei(i.UNPACK_ALIGNMENT,R.unpackAlignment),i.pixelStorei(i.UNPACK_COLORSPACE_CONVERSION_WEBGL,bn);let ze=b(R.image,!1,r.maxTextureSize);ze=nt(R,ze);const dt=s.convert(R.format,R.colorSpace),Wn=s.convert(R.type);let _t,cn=M(R.internalFormat,dt,Wn,R.colorSpace,R.isVideoTexture);Ye(Te,R);const _n=R.mipmaps,kn=!0!==R.isVideoTexture,qi=void 0===Ut.__version||!0===De,Z=Ae.dataReady,We=C(R,ze);if(R.isDepthTexture)cn=x(R.format===Qm,R.type),qi&&(kn?e.texStorage2D(i.TEXTURE_2D,1,cn,ze.width,ze.height):e.texImage2D(i.TEXTURE_2D,0,cn,ze.width,ze.height,0,dt,Wn,null));else if(R.isDataTexture)if(_n.length>0){kn&&qi&&e.texStorage2D(i.TEXTURE_2D,We,cn,_n[0].width,_n[0].height);for(let Ce=0,Ee=_n.length;Ce0){const Ke=bP(_t.width,_t.height,R.format,R.type);for(const rn of R.layerUpdates){const ei=_t.data.subarray(rn*Ke/_t.data.BYTES_PER_ELEMENT,(rn+1)*Ke/_t.data.BYTES_PER_ELEMENT);e.compressedTexSubImage3D(i.TEXTURE_2D_ARRAY,Ce,0,0,rn,_t.width,_t.height,1,dt,ei,0,0)}R.clearLayerUpdates()}else e.compressedTexSubImage3D(i.TEXTURE_2D_ARRAY,Ce,0,0,0,_t.width,_t.height,ze.depth,dt,_t.data,0,0)}else e.compressedTexImage3D(i.TEXTURE_2D_ARRAY,Ce,cn,_t.width,_t.height,ze.depth,0,_t.data,0,0);else console.warn("THREE.WebGLRenderer: Attempt to load unsupported compressed texture format in .uploadTexture()");else kn?Z&&e.texSubImage3D(i.TEXTURE_2D_ARRAY,Ce,0,0,0,_t.width,_t.height,ze.depth,dt,Wn,_t.data):e.texImage3D(i.TEXTURE_2D_ARRAY,Ce,cn,_t.width,_t.height,ze.depth,0,dt,Wn,_t.data)}else{kn&&qi&&e.texStorage2D(i.TEXTURE_2D,We,cn,_n[0].width,_n[0].height);for(let Ce=0,Ee=_n.length;Ce0){const Ce=bP(ze.width,ze.height,R.format,R.type);for(const Ee of R.layerUpdates){const Ke=ze.data.subarray(Ee*Ce/ze.data.BYTES_PER_ELEMENT,(Ee+1)*Ce/ze.data.BYTES_PER_ELEMENT);e.texSubImage3D(i.TEXTURE_2D_ARRAY,0,0,0,Ee,ze.width,ze.height,1,dt,Wn,Ke)}R.clearLayerUpdates()}else e.texSubImage3D(i.TEXTURE_2D_ARRAY,0,0,0,0,ze.width,ze.height,ze.depth,dt,Wn,ze.data)}else e.texImage3D(i.TEXTURE_2D_ARRAY,0,cn,ze.width,ze.height,ze.depth,0,dt,Wn,ze.data);else if(R.isData3DTexture)kn?(qi&&e.texStorage3D(i.TEXTURE_3D,We,cn,ze.width,ze.height,ze.depth),Z&&e.texSubImage3D(i.TEXTURE_3D,0,0,0,0,ze.width,ze.height,ze.depth,dt,Wn,ze.data)):e.texImage3D(i.TEXTURE_3D,0,cn,ze.width,ze.height,ze.depth,0,dt,Wn,ze.data);else if(R.isFramebufferTexture){if(qi)if(kn)e.texStorage2D(i.TEXTURE_2D,We,cn,ze.width,ze.height);else{let Ce=ze.width,Ee=ze.height;for(let Ke=0;Ke>=1,Ee>>=1}}else if(_n.length>0){if(kn&&qi){const Ce=pt(_n[0]);e.texStorage2D(i.TEXTURE_2D,We,cn,Ce.width,Ce.height)}for(let Ce=0,Ee=_n.length;Ce>Ae),dt=Math.max(1,R.height>>Ae);De===i.TEXTURE_3D||De===i.TEXTURE_2D_ARRAY?e.texImage3D(De,Ae,ut,ze,dt,R.depth,0,Ut,Je,null):e.texImage2D(De,Ae,ut,ze,dt,0,Ut,Je,null)}e.bindFramebuffer(i.FRAMEBUFFER,H),Me(R)?a.framebufferTexture2DMultisampleEXT(i.FRAMEBUFFER,Te,De,n.get(de).__webglTexture,0,tt(R)):(De===i.TEXTURE_2D||De>=i.TEXTURE_CUBE_MAP_POSITIVE_X&&De<=i.TEXTURE_CUBE_MAP_NEGATIVE_Z)&&i.framebufferTexture2D(i.FRAMEBUFFER,Te,De,n.get(de).__webglTexture,Ae),e.bindFramebuffer(i.FRAMEBUFFER,null)}function Ze(H,R,de){if(i.bindRenderbuffer(i.RENDERBUFFER,H),R.depthBuffer){const Te=R.depthTexture,Ae=x(R.stencilBuffer,Te&&Te.isDepthTexture?Te.type:null),Ut=R.stencilBuffer?i.DEPTH_STENCIL_ATTACHMENT:i.DEPTH_ATTACHMENT,Je=tt(R);Me(R)?a.renderbufferStorageMultisampleEXT(i.RENDERBUFFER,Je,Ae,R.width,R.height):de?i.renderbufferStorageMultisample(i.RENDERBUFFER,Je,Ae,R.width,R.height):i.renderbufferStorage(i.RENDERBUFFER,Ae,R.width,R.height),i.framebufferRenderbuffer(i.FRAMEBUFFER,Ut,i.RENDERBUFFER,H)}else{const Te=R.textures;for(let De=0;De0&&!0===t.has("WEBGL_multisampled_render_to_texture")&&!1!==R.__useRenderToTexture}function nt(H,R){const de=H.colorSpace,Te=H.format,De=H.type;return!0===H.isCompressedTexture||!0===H.isVideoTexture||de!==ds&&de!==yu&&(Jn.getTransfer(de)===Fi?(Te!==Io||De!==Zc)&&console.warn("THREE.WebGLTextures: sRGB encoded textures have to use RGBAFormat and UnsignedByteType."):console.error("THREE.WebGLTextures: Unsupported texture color space:",de)),R}function pt(H){return typeof HTMLImageElement<"u"&&H instanceof HTMLImageElement?(c.width=H.naturalWidth||H.width,c.height=H.naturalHeight||H.height):typeof VideoFrame<"u"&&H instanceof VideoFrame?(c.width=H.displayWidth,c.height=H.displayHeight):(c.width=H.width,c.height=H.height),c}this.allocateTextureUnit=function ie(){const H=A;return H>=r.maxTextures&&console.warn("THREE.WebGLTextures: Trying to use "+H+" texture units while this GPU supports only "+r.maxTextures),A+=1,H},this.resetTextureUnits=function W(){A=0},this.setTexture2D=oe,this.setTexture2DArray=function ge(H,R){const de=n.get(H);H.version>0&&de.__version!==H.version?nn(de,H,R):e.bindTexture(i.TEXTURE_2D_ARRAY,de.__webglTexture,i.TEXTURE0+R)},this.setTexture3D=function q(H,R){const de=n.get(H);H.version>0&&de.__version!==H.version?nn(de,H,R):e.bindTexture(i.TEXTURE_3D,de.__webglTexture,i.TEXTURE0+R)},this.setTextureCube=function se(H,R){const de=n.get(H);H.version>0&&de.__version!==H.version?function le(H,R,de){if(6!==R.image.length)return;const Te=Rt(H,R),De=R.source;e.bindTexture(i.TEXTURE_CUBE_MAP,H.__webglTexture,i.TEXTURE0+de);const Ae=n.get(De);if(De.version!==Ae.__version||!0===Te){e.activeTexture(i.TEXTURE0+de);const Ut=Jn.getPrimaries(Jn.workingColorSpace),Je=R.colorSpace===yu?null:Jn.getPrimaries(R.colorSpace),ut=R.colorSpace===yu||Ut===Je?i.NONE:i.BROWSER_DEFAULT_WEBGL;i.pixelStorei(i.UNPACK_FLIP_Y_WEBGL,R.flipY),i.pixelStorei(i.UNPACK_PREMULTIPLY_ALPHA_WEBGL,R.premultiplyAlpha),i.pixelStorei(i.UNPACK_ALIGNMENT,R.unpackAlignment),i.pixelStorei(i.UNPACK_COLORSPACE_CONVERSION_WEBGL,ut);const bn=R.isCompressedTexture||R.image[0].isCompressedTexture,ze=R.image[0]&&R.image[0].isDataTexture,dt=[];for(let Ee=0;Ee<6;Ee++)dt[Ee]=bn||ze?ze?R.image[Ee].image:R.image[Ee]:b(R.image[Ee],!0,r.maxCubemapSize),dt[Ee]=nt(R,dt[Ee]);const Wn=dt[0],cn=s.convert(R.format,R.colorSpace),_t=s.convert(R.type),_n=M(R.internalFormat,cn,_t,R.colorSpace),kn=!0!==R.isVideoTexture,qi=void 0===Ae.__version||!0===Te,Z=De.dataReady;let Ce,We=C(R,Wn);if(Ye(i.TEXTURE_CUBE_MAP,R),bn){kn&&qi&&e.texStorage2D(i.TEXTURE_CUBE_MAP,We,_n,Wn.width,Wn.height);for(let Ee=0;Ee<6;Ee++){Ce=dt[Ee].mipmaps;for(let Ke=0;Ke0&&We++;const Ee=pt(dt[0]);e.texStorage2D(i.TEXTURE_CUBE_MAP,We,_n,Ee.width,Ee.height)}for(let Ee=0;Ee<6;Ee++)if(ze){kn?Z&&e.texSubImage2D(i.TEXTURE_CUBE_MAP_POSITIVE_X+Ee,0,0,0,dt[Ee].width,dt[Ee].height,cn,_t,dt[Ee].data):e.texImage2D(i.TEXTURE_CUBE_MAP_POSITIVE_X+Ee,0,_n,dt[Ee].width,dt[Ee].height,0,cn,_t,dt[Ee].data);for(let Ke=0;Ke1;if(Ut||(void 0===Te.__webglTexture&&(Te.__webglTexture=i.createTexture()),Te.__version=R.version,o.memory.textures++),Ae){de.__webglFramebuffer=[];for(let Je=0;Je<6;Je++)if(R.mipmaps&&R.mipmaps.length>0){de.__webglFramebuffer[Je]=[];for(let ut=0;ut0){de.__webglFramebuffer=[];for(let Je=0;Je0&&!1===Me(H)){de.__webglMultisampledFramebuffer=i.createFramebuffer(),de.__webglColorRenderbuffer=[],e.bindFramebuffer(i.FRAMEBUFFER,de.__webglMultisampledFramebuffer);for(let Je=0;Je0)for(let ut=0;ut0)for(let ut=0;ut0)if(!1===Me(H)){const R=H.textures,de=H.width,Te=H.height;let De=i.COLOR_BUFFER_BIT;const Ae=H.stencilBuffer?i.DEPTH_STENCIL_ATTACHMENT:i.DEPTH_ATTACHMENT,Ut=n.get(H),Je=R.length>1;if(Je)for(let ut=0;utm+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(Tue)))}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 ta;n.matrixAutoUpdate=!1,n.visible=!1,t.joints[e.jointName]=n,t.add(n)}return t.joints[e.jointName]}}class kue{constructor(){this.texture=null,this.mesh=null,this.depthNear=0,this.depthFar=0}init(t,e,n){if(null===this.texture){const r=new Ro;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}}getMesh(t){if(null!==this.texture&&null===this.mesh){const e=t.cameras[0].viewport,n=new vl({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:e.z},depthHeight:{value:e.w}}});this.mesh=new Nn(new af(20,20),n)}return this.mesh}reset(){this.texture=null,this.mesh=null}getDepthTexture(){return this.texture}}class Pue extends ng{constructor(t,e){super();const n=this;let r=null,s=1,o=null,a="local-floor",l=1,c=null,d=null,h=null,p=null,m=null,g=null;const b=new kue,v=e.getContextAttributes();let y=null,M=null;const x=[],C=[],F=new xe;let D=null;const k=new br;k.layers.enable(1),k.viewport=new _i;const B=new br;B.layers.enable(2),B.viewport=new _i;const T=[k,B],A=new Due;A.layers.enable(1),A.layers.enable(2);let W=null,ie=null;function ne(le){const Pe=C.indexOf(le.inputSource);if(-1===Pe)return;const Ze=x[Pe];void 0!==Ze&&(Ze.update(le.inputSource,le.frame,c||o),Ze.dispatchEvent({type:le.type,data:le.inputSource}))}function oe(){r.removeEventListener("select",ne),r.removeEventListener("selectstart",ne),r.removeEventListener("selectend",ne),r.removeEventListener("squeeze",ne),r.removeEventListener("squeezestart",ne),r.removeEventListener("squeezeend",ne),r.removeEventListener("end",oe),r.removeEventListener("inputsourceschange",ge);for(let le=0;le=0&&(C[Fe]=null,x[Fe].disconnect(Ze))}for(let Pe=0;Pe=C.length){C.push(Ze),Fe=At;break}if(null===C[At]){C[At]=Ze,Fe=At;break}}if(-1===Fe)break}const wt=x[Fe];wt&&wt.connect(Ze)}}this.cameraAutoUpdate=!0,this.enabled=!1,this.isPresenting=!1,this.getController=function(le){let Pe=x[le];return void 0===Pe&&(Pe=new xP,x[le]=Pe),Pe.getTargetRaySpace()},this.getControllerGrip=function(le){let Pe=x[le];return void 0===Pe&&(Pe=new xP,x[le]=Pe),Pe.getGripSpace()},this.getHand=function(le){let Pe=x[le];return void 0===Pe&&(Pe=new xP,x[le]=Pe),Pe.getHandSpace()},this.setFramebufferScaleFactor=function(le){s=le,!0===n.isPresenting&&console.warn("THREE.WebXRManager: Cannot change framebuffer scale while presenting.")},this.setReferenceSpaceType=function(le){a=le,!0===n.isPresenting&&console.warn("THREE.WebXRManager: Cannot change reference space type while presenting.")},this.getReferenceSpace=function(){return c||o},this.setReferenceSpace=function(le){c=le},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 le=xt(function*(Pe){if(r=Pe,null!==r){if(y=t.getRenderTarget(),r.addEventListener("select",ne),r.addEventListener("selectstart",ne),r.addEventListener("selectend",ne),r.addEventListener("squeeze",ne),r.addEventListener("squeezestart",ne),r.addEventListener("squeezeend",ne),r.addEventListener("end",oe),r.addEventListener("inputsourceschange",ge),!0!==v.xrCompatible&&(yield e.makeXRCompatible()),D=t.getPixelRatio(),t.getSize(F),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 bu(m.framebufferWidth,m.framebufferHeight,{format:Io,type:Zc,colorSpace:t.outputColorSpace,stencilBuffer:v.stencil});else{let Ze=null,Fe=null,wt=null;v.depth&&(wt=v.stencil?e.DEPTH24_STENCIL8:e.DEPTH_COMPONENT24,Ze=v.stencil?Qm:Zm,Fe=v.stencil?Km:vu);const At={colorFormat:e.RGBA8,depthFormat:wt,scaleFactor:s};h=new XRWebGLBinding(r,e),p=h.createProjectionLayer(At),r.updateRenderState({layers:[p]}),t.setPixelRatio(1),t.setSize(p.textureWidth,p.textureHeight,!1),M=new bu(p.textureWidth,p.textureHeight,{format:Io,type:Zc,depthTexture:new r5(p.textureWidth,p.textureHeight,Fe,void 0,void 0,void 0,void 0,void 0,void 0,Ze),stencilBuffer:v.stencil,colorSpace:t.outputColorSpace,samples:v.antialias?4:0,resolveDepthBuffer:!1===p.ignoreDepthValues})}M.isXRRenderTarget=!0,this.setFoveation(l),c=null,o=yield r.requestReferenceSpace(a),nn.setContext(r),nn.start(),n.isPresenting=!0,n.dispatchEvent({type:"sessionstart"})}});return function(Pe){return le.apply(this,arguments)}}(),this.getEnvironmentBlendMode=function(){if(null!==r)return r.environmentBlendMode},this.getDepthTexture=function(){return b.getDepthTexture()};const q=new O,se=new O;function we(le,Pe){null===Pe?le.matrixWorld.copy(le.matrix):le.matrixWorld.multiplyMatrices(Pe.matrixWorld,le.matrix),le.matrixWorldInverse.copy(le.matrixWorld).invert()}this.updateCamera=function(le){if(null===r)return;null!==b.texture&&(le.near=b.depthNear,le.far=b.depthFar),A.near=B.near=k.near=le.near,A.far=B.far=k.far=le.far,(W!==A.near||ie!==A.far)&&(r.updateRenderState({depthNear:A.near,depthFar:A.far}),W=A.near,ie=A.far,k.near=W,k.far=ie,B.near=W,B.far=ie,k.updateProjectionMatrix(),B.updateProjectionMatrix(),le.updateProjectionMatrix());const Pe=le.parent,Ze=A.cameras;we(A,Pe);for(let Fe=0;Fe0&&(v.alphaTest.value=y.alphaTest);const M=t.get(y),x=M.envMap,C=M.envMapRotation;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(Oue.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,v.lightMapIntensity.value=y.lightMapIntensity,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,W4(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 d(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===To&&v.clearcoatNormalScale.value.negate())),y.dispersion>0&&(v.dispersion.value=y.dispersion),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 Lue(i,t,e,n){let r={},s={},o=[];const a=i.getParameter(i.MAX_UNIFORM_BUFFER_BINDINGS);function m(M,x,C,F){const D=M.value,k=x+"_"+C;if(void 0===F[k])return F[k]="number"==typeof D||"boolean"==typeof D?D:D.clone(),!0;{const B=F[k];if("number"==typeof D||"boolean"==typeof D){if(B!==D)return F[k]=D,!0}else if(!1===B.equals(D))return B.copy(D),!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 k=0,B=x.length;k0&&(C+=16-D),M.__size=C,M.__cache={}}(M),C=function d(M){const x=function h(){for(let M=0;M0),Zt=!!ce.morphAttributes.position,li=!!ce.morphAttributes.normal,Li=!!ce.morphAttributes.color;let er=_u;ue.toneMapped&&(null===k||!0===k.isXRRenderTarget)&&(er=x.toneMapping);const ra=ce.morphAttributes.position||ce.morphAttributes.normal||ce.morphAttributes.color,fi=void 0!==ra?ra.length:0,kt=nt.get(ue),fs=v.state.lights;!0!==le||!0!==Pe&&L===T||bn.setState(ue,L,L===T&&ue.id===B);let pi=!1;ue.version===kt.__version?(kt.needsLights&&kt.lightsStateVersion!==fs.state.version||kt.outputColorSpace!==Mt||te.isBatchedMesh&&!1===kt.batching||!te.isBatchedMesh&&!0===kt.batching||te.isBatchedMesh&&!0===kt.batchingColor&&null===te.colorTexture||te.isBatchedMesh&&!1===kt.batchingColor&&null!==te.colorTexture||te.isInstancedMesh&&!1===kt.instancing||!te.isInstancedMesh&&!0===kt.instancing||te.isSkinnedMesh&&!1===kt.skinning||!te.isSkinnedMesh&&!0===kt.skinning||te.isInstancedMesh&&!0===kt.instancingColor&&null===te.instanceColor||te.isInstancedMesh&&!1===kt.instancingColor&&null!==te.instanceColor||te.isInstancedMesh&&!0===kt.instancingMorph&&null===te.morphTexture||te.isInstancedMesh&&!1===kt.instancingMorph&&null!==te.morphTexture||kt.envMap!==Ct||!0===ue.fog&&kt.fog!==je||void 0!==kt.numClippingPlanes&&(kt.numClippingPlanes!==bn.numPlanes||kt.numIntersection!==bn.numIntersection)||kt.vertexAlphas!==Kt||kt.vertexTangents!==an||kt.morphTargets!==Zt||kt.morphNormals!==li||kt.morphColors!==Li||kt.toneMapping!==er||kt.morphTargetsCount!==fi)&&(pi=!0):(pi=!0,kt.__version=ue.version);let bl=kt.currentProgram;!0===pi&&(bl=_E(ue,K,te));let Wg=!1,sa=!1,WO=!1;const wr=bl.getUniforms(),Ou=kt.uniforms;if(Me.useProgram(bl.program)&&(Wg=!0,sa=!0,WO=!0),ue.id!==B&&(B=ue.id,sa=!0),Wg||T!==L){wr.setValue(N,"projectionMatrix",L.projectionMatrix),wr.setValue(N,"viewMatrix",L.matrixWorldInverse);const Ba=wr.map.cameraPosition;void 0!==Ba&&Ba.setValue(N,Fe.setFromMatrixPosition(L.matrixWorld)),tt.logarithmicDepthBuffer&&wr.setValue(N,"logDepthBufFC",2/(Math.log(L.far+1)/Math.LN2)),(ue.isMeshPhongMaterial||ue.isMeshToonMaterial||ue.isMeshLambertMaterial||ue.isMeshBasicMaterial||ue.isMeshStandardMaterial||ue.isShaderMaterial)&&wr.setValue(N,"isOrthographic",!0===L.isOrthographicCamera),T!==L&&(T=L,sa=!0,WO=!0)}if(te.isSkinnedMesh){wr.setOptional(N,te,"bindMatrix"),wr.setOptional(N,te,"bindMatrixInverse");const Ba=te.skeleton;Ba&&(null===Ba.boneTexture&&Ba.computeBoneTexture(),wr.setValue(N,"boneTexture",Ba.boneTexture,pt))}te.isBatchedMesh&&(wr.setOptional(N,te,"batchingTexture"),wr.setValue(N,"batchingTexture",te._matricesTexture,pt),wr.setOptional(N,te,"batchingIdTexture"),wr.setValue(N,"batchingIdTexture",te._indirectTexture,pt),wr.setOptional(N,te,"batchingColorTexture"),null!==te._colorsTexture&&wr.setValue(N,"batchingColorTexture",te._colorsTexture,pt));const jO=ce.morphAttributes;if((void 0!==jO.position||void 0!==jO.normal||void 0!==jO.color)&&Wn.update(te,ce,bl),(sa||kt.receiveShadow!==te.receiveShadow)&&(kt.receiveShadow=te.receiveShadow,wr.setValue(N,"receiveShadow",te.receiveShadow)),ue.isMeshGouraudMaterial&&null!==ue.envMap&&(Ou.envMap.value=Ct,Ou.flipEnvMap.value=Ct.isCubeTexture&&!1===Ct.isRenderTargetTexture?-1:1),ue.isMeshStandardMaterial&&null===ue.envMap&&null!==K.environment&&(Ou.envMapIntensity.value=K.environmentIntensity),sa&&(wr.setValue(N,"toneMappingExposure",x.toneMappingExposure),kt.needsLights&&function Lve(L,K){L.ambientLightColor.needsUpdate=K,L.lightProbe.needsUpdate=K,L.directionalLights.needsUpdate=K,L.directionalLightShadows.needsUpdate=K,L.pointLights.needsUpdate=K,L.pointLightShadows.needsUpdate=K,L.spotLights.needsUpdate=K,L.spotLightShadows.needsUpdate=K,L.rectAreaLights.needsUpdate=K,L.hemisphereLights.needsUpdate=K}(Ou,WO),je&&!0===ue.fog&&Ut.refreshFogUniforms(Ou,je),Ut.refreshMaterialUniforms(Ou,ue,se,q,v.state.transmissionRenderTarget[L.id]),aS.upload(N,h8(kt),Ou,pt)),ue.isShaderMaterial&&!0===ue.uniformsNeedUpdate&&(aS.upload(N,h8(kt),Ou,pt),ue.uniformsNeedUpdate=!1),ue.isSpriteMaterial&&wr.setValue(N,"center",te.center),wr.setValue(N,"modelViewMatrix",te.modelViewMatrix),wr.setValue(N,"normalMatrix",te.normalMatrix),wr.setValue(N,"modelMatrix",te.matrixWorld),ue.isShaderMaterial||ue.isRawShaderMaterial){const Ba=ue.uniformsGroups;for(let YO=0,Bve=Ba.length;YO{function je(){ue.forEach(function(rt){nt.get(rt).currentProgram.isReady()&&ue.delete(rt)}),0!==ue.size?setTimeout(je,10):te(L)}null!==Le.get("KHR_parallel_shader_compile")?je():setTimeout(je,10)})};let hi=null;function sc(){Rf.stop()}function l8(){Rf.start()}const Rf=new X4;function $O(L,K,ce,ue){if(!1===L.visible)return;if(L.layers.test(K.layers))if(L.isGroup)ce=L.renderOrder;else if(L.isLOD)!0===L.autoUpdate&&L.update(K);else if(L.isLight)v.pushLight(L),L.castShadow&&v.pushShadow(L);else if(L.isSprite){if(!L.frustumCulled||nn.intersectsSprite(L)){ue&&wt.setFromMatrixPosition(L.matrixWorld).applyMatrix4(Ze);const rt=De.update(L),Mt=L.material;Mt.visible&&b.push(L,rt,Mt,ce,wt.z,null)}}else if((L.isMesh||L.isLine||L.isPoints)&&(!L.frustumCulled||nn.intersectsObject(L))){const rt=De.update(L),Mt=L.material;if(ue&&(void 0!==L.boundingSphere?(null===L.boundingSphere&&L.computeBoundingSphere(),wt.copy(L.boundingSphere.center)):(null===rt.boundingSphere&&rt.computeBoundingSphere(),wt.copy(rt.boundingSphere.center)),wt.applyMatrix4(L.matrixWorld).applyMatrix4(Ze)),Array.isArray(Mt)){const Ct=rt.groups;for(let Kt=0,an=Ct.length;Kt0&&gE(te,K,ce),je.length>0&&gE(je,K,ce),rt.length>0&&gE(rt,K,ce),Me.buffers.depth.setTest(!0),Me.buffers.depth.setMask(!0),Me.buffers.color.setMask(!0),Me.setPolygonOffset(!1)}function d8(L,K,ce,ue){if(null!==(!0===ce.isScene?ce.overrideMaterial:null))return;void 0===v.state.transmissionRenderTarget[ue.id]&&(v.state.transmissionRenderTarget[ue.id]=new bu(1,1,{generateMipmaps:!0,type:Le.has("EXT_color_buffer_half_float")||Le.has("EXT_color_buffer_float")?Xm:Zc,minFilter:pl,samples:4,stencilBuffer:s,resolveDepthBuffer:!1,resolveStencilBuffer:!1,colorSpace:Jn.workingColorSpace}));const je=v.state.transmissionRenderTarget[ue.id],rt=ue.viewport||A;je.setSize(rt.z,rt.w);const Mt=x.getRenderTarget();x.setRenderTarget(je),x.getClearColor(ne),oe=x.getClearAlpha(),oe<1&&x.setClearColor(16777215,.5),x.clear(),St&&dt.render(ce);const Ct=x.toneMapping;x.toneMapping=_u;const Kt=ue.viewport;if(void 0!==ue.viewport&&(ue.viewport=void 0),v.setupLightsView(ue),!0===le&&bn.setGlobalState(x.clippingPlanes,ue),gE(L,ce,ue),pt.updateMultisampleRenderTarget(je),pt.updateRenderTargetMipmap(je),!1===Le.has("WEBGL_multisampled_render_to_texture")){let an=!1;for(let Zt=0,li=K.length;Zt0)for(let rt=0,Mt=je.length;rt0&&d8(ue,te,L,K),St&&dt.render(L),c8(b,L,K);null!==k&&(pt.updateMultisampleRenderTarget(k),pt.updateRenderTargetMipmap(k)),!0===L.isScene&&L.onAfterRender(x,L,K),kn.resetDefaultState(),B=-1,T=null,M.pop(),M.length>0?(v=M[M.length-1],!0===le&&bn.setGlobalState(x.clippingPlanes,v.state.camera)):v=null,y.pop(),b=y.length>0?y[y.length-1]:null},this.getActiveCubeFace=function(){return F},this.getActiveMipmapLevel=function(){return D},this.getRenderTarget=function(){return k},this.setRenderTargetTextures=function(L,K,ce){nt.get(L.texture).__webglTexture=K,nt.get(L.depthTexture).__webglTexture=ce;const ue=nt.get(L);ue.__hasExternalTextures=!0,ue.__autoAllocateDepthBuffer=void 0===ce,ue.__autoAllocateDepthBuffer||!0===Le.has("WEBGL_multisampled_render_to_texture")&&(console.warn("THREE.WebGLRenderer: Render-to-texture extension was disabled because an external texture was provided"),ue.__useRenderToTexture=!1)},this.setRenderTargetFramebuffer=function(L,K){const ce=nt.get(L);ce.__webglFramebuffer=K,ce.__useDefaultFramebuffer=void 0===K},this.setRenderTarget=function(L,K=0,ce=0){k=L,F=K,D=ce;let ue=!0,te=null,je=!1,rt=!1;if(L){const Ct=nt.get(L);void 0!==Ct.__useDefaultFramebuffer?(Me.bindFramebuffer(N.FRAMEBUFFER,null),ue=!1):void 0===Ct.__webglFramebuffer?pt.setupRenderTarget(L):Ct.__hasExternalTextures&&pt.rebindTextures(L,nt.get(L.texture).__webglTexture,nt.get(L.depthTexture).__webglTexture);const Kt=L.texture;(Kt.isData3DTexture||Kt.isDataArrayTexture||Kt.isCompressedArrayTexture)&&(rt=!0);const an=nt.get(L).__webglFramebuffer;L.isWebGLCubeRenderTarget?(te=Array.isArray(an[K])?an[K][ce]:an[K],je=!0):te=L.samples>0&&!1===pt.useMultisampledRTT(L)?nt.get(L).__webglMultisampledFramebuffer:Array.isArray(an)?an[ce]:an,A.copy(L.viewport),W.copy(L.scissor),ie=L.scissorTest}else A.copy(Be).multiplyScalar(se).floor(),W.copy(Ye).multiplyScalar(se).floor(),ie=Rt;if(Me.bindFramebuffer(N.FRAMEBUFFER,te)&&ue&&Me.drawBuffers(L,te),Me.viewport(A),Me.scissor(W),Me.setScissorTest(ie),je){const Ct=nt.get(L.texture);N.framebufferTexture2D(N.FRAMEBUFFER,N.COLOR_ATTACHMENT0,N.TEXTURE_CUBE_MAP_POSITIVE_X+K,Ct.__webglTexture,ce)}else if(rt){const Ct=nt.get(L.texture);N.framebufferTextureLayer(N.FRAMEBUFFER,N.COLOR_ATTACHMENT0,Ct.__webglTexture,ce||0,K||0)}B=-1},this.readRenderTargetPixels=function(L,K,ce,ue,te,je,rt){if(!L||!L.isWebGLRenderTarget)return void console.error("THREE.WebGLRenderer.readRenderTargetPixels: renderTarget is not THREE.WebGLRenderTarget.");let Mt=nt.get(L).__webglFramebuffer;if(L.isWebGLCubeRenderTarget&&void 0!==rt&&(Mt=Mt[rt]),Mt){Me.bindFramebuffer(N.FRAMEBUFFER,Mt);try{const Ct=L.texture,Kt=Ct.format,an=Ct.type;if(!tt.textureFormatReadable(Kt))return void console.error("THREE.WebGLRenderer.readRenderTargetPixels: renderTarget is not in RGBA or implementation defined format.");if(!tt.textureTypeReadable(an))return void console.error("THREE.WebGLRenderer.readRenderTargetPixels: renderTarget is not in UnsignedByteType or implementation defined type.");K>=0&&K<=L.width-ue&&ce>=0&&ce<=L.height-te&&N.readPixels(K,ce,ue,te,_n.convert(Kt),_n.convert(an),je)}finally{const Ct=null!==k?nt.get(k).__webglFramebuffer:null;Me.bindFramebuffer(N.FRAMEBUFFER,Ct)}}},this.readRenderTargetPixelsAsync=function(){var L=xt(function*(K,ce,ue,te,je,rt,Mt){if(!K||!K.isWebGLRenderTarget)throw new Error("THREE.WebGLRenderer.readRenderTargetPixels: renderTarget is not THREE.WebGLRenderTarget.");let Ct=nt.get(K).__webglFramebuffer;if(K.isWebGLCubeRenderTarget&&void 0!==Mt&&(Ct=Ct[Mt]),Ct){Me.bindFramebuffer(N.FRAMEBUFFER,Ct);try{const Kt=K.texture,an=Kt.format,Zt=Kt.type;if(!tt.textureFormatReadable(an))throw new Error("THREE.WebGLRenderer.readRenderTargetPixelsAsync: renderTarget is not in RGBA or implementation defined format.");if(!tt.textureTypeReadable(Zt))throw new Error("THREE.WebGLRenderer.readRenderTargetPixelsAsync: renderTarget is not in UnsignedByteType or implementation defined type.");if(ce>=0&&ce<=K.width-te&&ue>=0&&ue<=K.height-je){const li=N.createBuffer();N.bindBuffer(N.PIXEL_PACK_BUFFER,li),N.bufferData(N.PIXEL_PACK_BUFFER,rt.byteLength,N.STREAM_READ),N.readPixels(ce,ue,te,je,_n.convert(an),_n.convert(Zt),0),N.flush();const Li=N.fenceSync(N.SYNC_GPU_COMMANDS_COMPLETE,0);yield function lae(i,t,e){return new Promise(function(n,r){setTimeout(function s(){switch(i.clientWaitSync(t,i.SYNC_FLUSH_COMMANDS_BIT,0)){case i.WAIT_FAILED:r();break;case i.TIMEOUT_EXPIRED:setTimeout(s,e);break;default:n()}},e)})}(N,Li,4);try{N.bindBuffer(N.PIXEL_PACK_BUFFER,li),N.getBufferSubData(N.PIXEL_PACK_BUFFER,0,rt)}finally{N.deleteBuffer(li),N.deleteSync(Li)}return rt}}finally{const Kt=null!==k?nt.get(k).__webglFramebuffer:null;Me.bindFramebuffer(N.FRAMEBUFFER,Kt)}}});return function(K,ce,ue,te,je,rt,Mt){return L.apply(this,arguments)}}(),this.copyFramebufferToTexture=function(L,K=null,ce=0){!0!==L.isTexture&&(sg("WebGLRenderer: copyFramebufferToTexture function signature has changed."),K=arguments[0]||null,L=arguments[1]);const ue=Math.pow(2,-ce),te=Math.floor(L.image.width*ue),je=Math.floor(L.image.height*ue),rt=null!==K?K.x:0,Mt=null!==K?K.y:0;pt.setTexture2D(L,0),N.copyTexSubImage2D(N.TEXTURE_2D,ce,0,0,rt,Mt,te,je),Me.unbindTexture()},this.copyTextureToTexture=function(L,K,ce=null,ue=null,te=0){let je,rt,Mt,Ct,Kt,an;!0!==L.isTexture&&(sg("WebGLRenderer: copyTextureToTexture function signature has changed."),ue=arguments[0]||null,L=arguments[1],K=arguments[2],te=arguments[3]||0,ce=null),null!==ce?(je=ce.max.x-ce.min.x,rt=ce.max.y-ce.min.y,Mt=ce.min.x,Ct=ce.min.y):(je=L.image.width,rt=L.image.height,Mt=0,Ct=0),null!==ue?(Kt=ue.x,an=ue.y):(Kt=0,an=0);const Zt=_n.convert(K.format),li=_n.convert(K.type);pt.setTexture2D(K,0),N.pixelStorei(N.UNPACK_FLIP_Y_WEBGL,K.flipY),N.pixelStorei(N.UNPACK_PREMULTIPLY_ALPHA_WEBGL,K.premultiplyAlpha),N.pixelStorei(N.UNPACK_ALIGNMENT,K.unpackAlignment);const Li=N.getParameter(N.UNPACK_ROW_LENGTH),er=N.getParameter(N.UNPACK_IMAGE_HEIGHT),ra=N.getParameter(N.UNPACK_SKIP_PIXELS),fi=N.getParameter(N.UNPACK_SKIP_ROWS),kt=N.getParameter(N.UNPACK_SKIP_IMAGES),fs=L.isCompressedTexture?L.mipmaps[te]:L.image;N.pixelStorei(N.UNPACK_ROW_LENGTH,fs.width),N.pixelStorei(N.UNPACK_IMAGE_HEIGHT,fs.height),N.pixelStorei(N.UNPACK_SKIP_PIXELS,Mt),N.pixelStorei(N.UNPACK_SKIP_ROWS,Ct),L.isDataTexture?N.texSubImage2D(N.TEXTURE_2D,te,Kt,an,je,rt,Zt,li,fs.data):L.isCompressedTexture?N.compressedTexSubImage2D(N.TEXTURE_2D,te,Kt,an,fs.width,fs.height,Zt,fs.data):N.texSubImage2D(N.TEXTURE_2D,te,Kt,an,je,rt,Zt,li,fs),N.pixelStorei(N.UNPACK_ROW_LENGTH,Li),N.pixelStorei(N.UNPACK_IMAGE_HEIGHT,er),N.pixelStorei(N.UNPACK_SKIP_PIXELS,ra),N.pixelStorei(N.UNPACK_SKIP_ROWS,fi),N.pixelStorei(N.UNPACK_SKIP_IMAGES,kt),0===te&&K.generateMipmaps&&N.generateMipmap(N.TEXTURE_2D),Me.unbindTexture()},this.copyTextureToTexture3D=function(L,K,ce=null,ue=null,te=0){let je,rt,Mt,Ct,Kt,an,Zt,li,Li;!0!==L.isTexture&&(sg("WebGLRenderer: copyTextureToTexture3D function signature has changed."),ce=arguments[0]||null,ue=arguments[1]||null,L=arguments[2],K=arguments[3],te=arguments[4]||0);const er=L.isCompressedTexture?L.mipmaps[te]:L.image;null!==ce?(je=ce.max.x-ce.min.x,rt=ce.max.y-ce.min.y,Mt=ce.max.z-ce.min.z,Ct=ce.min.x,Kt=ce.min.y,an=ce.min.z):(je=er.width,rt=er.height,Mt=er.depth,Ct=0,Kt=0,an=0),null!==ue?(Zt=ue.x,li=ue.y,Li=ue.z):(Zt=0,li=0,Li=0);const ra=_n.convert(K.format),fi=_n.convert(K.type);let kt;if(K.isData3DTexture)pt.setTexture3D(K,0),kt=N.TEXTURE_3D;else{if(!K.isDataArrayTexture&&!K.isCompressedArrayTexture)return void console.warn("THREE.WebGLRenderer.copyTextureToTexture3D: only supports THREE.DataTexture3D and THREE.DataTexture2DArray.");pt.setTexture2DArray(K,0),kt=N.TEXTURE_2D_ARRAY}N.pixelStorei(N.UNPACK_FLIP_Y_WEBGL,K.flipY),N.pixelStorei(N.UNPACK_PREMULTIPLY_ALPHA_WEBGL,K.premultiplyAlpha),N.pixelStorei(N.UNPACK_ALIGNMENT,K.unpackAlignment);const fs=N.getParameter(N.UNPACK_ROW_LENGTH),pi=N.getParameter(N.UNPACK_IMAGE_HEIGHT),bl=N.getParameter(N.UNPACK_SKIP_PIXELS),Wg=N.getParameter(N.UNPACK_SKIP_ROWS),sa=N.getParameter(N.UNPACK_SKIP_IMAGES);N.pixelStorei(N.UNPACK_ROW_LENGTH,er.width),N.pixelStorei(N.UNPACK_IMAGE_HEIGHT,er.height),N.pixelStorei(N.UNPACK_SKIP_PIXELS,Ct),N.pixelStorei(N.UNPACK_SKIP_ROWS,Kt),N.pixelStorei(N.UNPACK_SKIP_IMAGES,an),L.isDataTexture||L.isData3DTexture?N.texSubImage3D(kt,te,Zt,li,Li,je,rt,Mt,ra,fi,er.data):K.isCompressedArrayTexture?N.compressedTexSubImage3D(kt,te,Zt,li,Li,je,rt,Mt,ra,er.data):N.texSubImage3D(kt,te,Zt,li,Li,je,rt,Mt,ra,fi,er),N.pixelStorei(N.UNPACK_ROW_LENGTH,fs),N.pixelStorei(N.UNPACK_IMAGE_HEIGHT,pi),N.pixelStorei(N.UNPACK_SKIP_PIXELS,bl),N.pixelStorei(N.UNPACK_SKIP_ROWS,Wg),N.pixelStorei(N.UNPACK_SKIP_IMAGES,sa),0===te&&K.generateMipmaps&&N.generateMipmap(kt),Me.unbindTexture()},this.initRenderTarget=function(L){void 0===nt.get(L).__webglFramebuffer&&pt.setupRenderTarget(L)},this.initTexture=function(L){L.isCubeTexture?pt.setTextureCube(L,0):L.isData3DTexture?pt.setTexture3D(L,0):L.isDataArrayTexture||L.isCompressedArrayTexture?pt.setTexture2DArray(L,0):pt.setTexture2D(L,0),Me.unbindTexture()},this.resetState=function(){F=0,D=0,k=null,Me.reset(),kn.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===Gk?"display-p3":"srgb",e.unpackColorSpace=Jn.workingColorSpace===kC?"display-p3":"srgb"}}class Ib extends Fr{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 CP{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=Qo()}onUploadCallback(){}set needsUpdate(t){!0===t&&this.version++}get updateRange(){return sg("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;r0){const r=e[n[0]];if(void 0!==r){this.morphTargetInfluences=[],this.morphTargetDictionary={};for(let s=0,o=r.length;sn)return;kP.applyMatrix4(i.matrixWorld);const l=t.ray.origin.distanceTo(kP);return lt.far?void 0:{distance:l,point:W5.clone().applyMatrix4(i.matrixWorld),index:r,face:null,faceIndex:null,object:i}}const j5=new O,Y5=new O;class Pg extends pf{constructor(t,e){super(t,e),this.isLineSegments=!0,this.type="LineSegments"}computeLineDistances(){const t=this.geometry;if(null===t.index){const e=t.attributes.position,n=[];for(let r=0,s=e.count;r0){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 tc{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 d=n[r];return(r+(o-d)/(n[r+1]-d))/(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 xe:new O);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 O,r=[],s=[],o=[],a=new O,l=new Bt;for(let m=0;m<=t;m++)r[m]=this.getTangentAt(m/t,new O);s[0]=new O,o[0]=new O;let c=Number.MAX_VALUE;const d=Math.abs(r[0].x),h=Math.abs(r[0].y),p=Math.abs(r[0].z);d<=c&&(c=d,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(Qi(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(Qi(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 OP extends tc{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 xe){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(Z5(a,l.x,c.x,d.x,h.x),Z5(a,l.y,c.y,d.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]:(CS.subVectors(r[0],r[1]).add(r[0]),c=CS);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 d=c.getPoint(1);return this.currentPoint.copy(d),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 AS extends hn{constructor(t=[new xe(0,-.5),new xe(.5,0),new xe(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=Qi(r,0,2*Math.PI);const s=[],o=[],a=[],l=[],c=[],d=1/e,h=new O,p=new xe,m=new O,g=new O,b=new O;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*d*r,C=Math.sin(x),F=Math.cos(x);for(let D=0;D<=t.length-1;D++)h.x=t[D].x*C,h.y=t[D].y,h.z=t[D].x*F,o.push(h.x,h.y,h.z),p.x=M/e,p.y=D/(t.length-1),a.push(p.x,p.y),c.push(l[3*D+0]*C,l[3*D+1],l[3*D+0]*F)}for(let M=0;M0&&x(!0),e>0&&x(!1)),this.setIndex(d),this.setAttribute("position",new ct(h,3)),this.setAttribute("normal",new ct(p,3)),this.setAttribute("uv",new ct(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 TS 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 TS(t.radius,t.height,t.radialSegments,t.heightSegments,t.openEnded,t.thetaStart,t.thetaLength)}}class $b 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 d=[],h=new O,p=new O,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 F=0;F<=e;F++){const D=F/e;h.x=-t*Math.cos(r+D*s)*Math.sin(o+x*a),h.y=t*Math.cos(o+x*a),h.z=t*Math.sin(r+D*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(D+C,1-x),M.push(c++)}d.push(M)}for(let y=0;y0)&&m.push(d[y][M+1],C,D),(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 dispersion(){return this._dispersion}set dispersion(t){this._dispersion>0!=t>0&&this.version++,this._dispersion=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.dispersion=t.dispersion,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 NS extends ko{constructor(t){super(),this.isMeshPhongMaterial=!0,this.type="MeshPhongMaterial",this.color=new qe(16777215),this.specular=new qe(1118481),this.shininess=30,this.map=null,this.lightMap=null,this.lightMapIntensity=1,this.aoMap=null,this.aoMapIntensity=1,this.emissive=new qe(0),this.emissiveIntensity=1,this.emissiveMap=null,this.bumpMap=null,this.bumpScale=1,this.normalMap=null,this.normalMapType=Zh,this.normalScale=new xe(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=wC,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 vf(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 hG(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 QP(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 JP(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 jb{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 uG(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=vb;class Ng extends nc{constructor(t,e,n){super(t,e,n)}}Ng.prototype.ValueTypeName="bool",Ng.prototype.ValueBufferType=Array,Ng.prototype.DefaultInterpolation=_b,Ng.prototype.InterpolantFactoryMethodLinear=void 0,Ng.prototype.InterpolantFactoryMethodSmooth=void 0;class pG extends nc{}pG.prototype.ValueTypeName="color";class Bg extends nc{}Bg.prototype.ValueTypeName="number";class Ghe extends jb{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 d=c+a;c!==d;c+=4)uo.slerpFlat(s,0,o,c-a,o,c,l);return s}}class Ug extends nc{InterpolantFactoryMethodLinear(t){return new Ghe(this.times,this.values,this.getValueSize(),t)}}Ug.prototype.ValueTypeName="quaternion",Ug.prototype.InterpolantFactoryMethodSmooth=void 0;class Vg extends nc{constructor(t,e,n){super(t,e,n)}}Vg.prototype.ValueTypeName="string",Vg.prototype.ValueBufferType=Array,Vg.prototype.DefaultInterpolation=_b,Vg.prototype.InterpolantFactoryMethodLinear=void 0,Vg.prototype.InterpolantFactoryMethodSmooth=void 0;class zg extends nc{}zg.prototype.ValueTypeName="vector";class Yb{constructor(t="",e=-1,n=[],r=2500){this.name=t,this.tracks=n,this.duration=e,this.blendMode=r,this.uuid=Qo(),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(Whe(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=d[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=[];JP(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:gG,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 jhe extends Error{constructor(t,e){super(t),this.response=e}}class Pa extends yf{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=Du.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 d=ld[t],h=c.body.getReader(),p=c.headers.get("X-File-Size")||c.headers.get("Content-Length"),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 F=new ProgressEvent("progress",{lengthComputable:g,loaded:b,total:m});for(let D=0,k=d.length;D{y.error(x)})}()}});return new Response(v)}throw new jhe(`fetch for "${c.url}" responded with ${c.status}: ${c.statusText}`,c)}).then(c=>{switch(l){case"arraybuffer":return c.arrayBuffer();case"blob":return c.blob();case"document":return c.text().then(d=>(new DOMParser).parseFromString(d,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=>{Du.add(t,c);const d=ld[t];delete ld[t];for(let h=0,p=d.length;h{const d=ld[t];if(void 0===d)throw this.manager.itemError(t),c;delete ld[t];for(let h=0,p=d.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 BS extends yf{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=Du.get(t);if(void 0!==o)return s.manager.itemStart(t),setTimeout(function(){e&&e(o),s.manager.itemEnd(t)},0),o;const a=bb("img");function l(){d(),Du.add(t,this),e&&e(this),s.manager.itemEnd(t)}function c(h){d(),r&&r(h),s.manager.itemError(t),s.manager.itemEnd(t)}function d(){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 Hg extends yf{constructor(t){super(t)}load(t,e,n,r){const s=new Ro,o=new BS(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 US extends Fr{constructor(t,e=1){super(),this.isLight=!0,this.type="Light",this.color=new qe(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()),void 0!==this.target&&(e.object.target=this.target.uuid),e}}const eO=new Bt,_G=new O,vG=new O;class tO{constructor(t){this.camera=t,this.intensity=1,this.bias=0,this.normalBias=0,this.radius=1,this.blurSamples=8,this.mapSize=new xe(512,512),this.map=null,this.mapPass=null,this.matrix=new Bt,this.autoUpdate=!0,this.needsUpdate=!1,this._frustum=new iS,this._frameExtents=new xe(1,1),this._viewportCount=1,this._viewports=[new _i(0,0,1,1)]}getViewportCount(){return this._viewportCount}getFrustum(){return this._frustum}updateMatrices(t){const e=this.camera,n=this.matrix;_G.setFromMatrixPosition(t.matrixWorld),e.position.copy(_G),vG.setFromMatrixPosition(t.target.matrixWorld),e.lookAt(vG),e.updateMatrixWorld(),eO.multiplyMatrices(e.projectionMatrix,e.matrixWorldInverse),this._frustum.setFromProjectionMatrix(eO),n.set(.5,0,0,.5,0,.5,0,.5,0,0,.5,.5,0,0,0,1),n.multiply(eO)}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.intensity=t.intensity,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 1!==this.intensity&&(t.intensity=this.intensity),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 qhe extends tO{constructor(){super(new br(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 yG extends US{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(Fr.DEFAULT_UP),this.updateMatrix(),this.target=new Fr,this.distance=n,this.angle=r,this.penumbra=s,this.decay=o,this.map=null,this.shadow=new qhe}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 bG=new Bt,qb=new O,nO=new O;class Xhe extends tO{constructor(){super(new br(90,1,.5,500)),this.isPointLightShadow=!0,this._frameExtents=new xe(4,2),this._viewportCount=6,this._viewports=[new _i(2,1,1,1),new _i(0,1,1,1),new _i(3,1,1,1),new _i(1,1,1,1),new _i(3,0,1,1),new _i(1,0,1,1)],this._cubeDirections=[new O(1,0,0),new O(-1,0,0),new O(0,0,1),new O(0,0,-1),new O(0,1,0),new O(0,-1,0)],this._cubeUps=[new O(0,1,0),new O(0,1,0),new O(0,1,0),new O(0,1,0),new O(0,0,1),new O(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()),qb.setFromMatrixPosition(t.matrixWorld),n.position.copy(qb),nO.copy(n.position),nO.add(this._cubeDirections[e]),n.up.copy(this._cubeUps[e]),n.lookAt(nO),n.updateMatrixWorld(),r.makeTranslation(-qb.x,-qb.y,-qb.z),bG.multiplyMatrices(n.projectionMatrix,n.matrixWorldInverse),this._frustum.setFromProjectionMatrix(bG)}}class xG extends US{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 Xhe}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 Khe extends tO{constructor(){super(new Db(-5,5,5,-5,.5,500)),this.isDirectionalLightShadow=!0}}class wG extends US{constructor(t,e){super(t,e),this.isDirectionalLight=!0,this.type="DirectionalLight",this.position.copy(Fr.DEFAULT_UP),this.updateMatrix(),this.target=new Fr,this.shadow=new Khe}dispose(){this.shadow.dispose()}copy(t){return super.copy(t),this.target=t.target.clone(),this.shadow=t.shadow.clone(),this}}class iO extends US{constructor(t,e){super(t,e),this.isAmbientLight=!0,this.type="AmbientLight"}}class Tu{static decodeText(t){if(console.warn("THREE.LoaderUtils: decodeText() has been deprecated with r165 and will be removed with r175. Use TextDecoder instead."),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=Du.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 Du.add(t,c),e&&e(c),s.manager.itemEnd(t),c}).catch(function(c){r&&r(c),Du.remove(t),s.manager.itemError(t),s.manager.itemEnd(t)});Du.add(t,l),s.manager.itemStart(t)}}class DG{constructor(t=!0){this.autoStart=t,this.startTime=0,this.oldTime=0,this.elapsedTime=0,this.running=!1}start(){this.startTime=TG(),this.oldTime=this.startTime,this.elapsedTime=0,this.running=!0}stop(){this.getElapsedTime(),this.running=!1,this.autoStart=!1}getElapsedTime(){return this.getDelta(),this.elapsedTime}getDelta(){let t=0;if(this.autoStart&&!this.running)return this.start(),0;if(this.running){const e=TG();t=(e-this.oldTime)/1e3,this.oldTime=e,this.elapsedTime+=t}return t}}function TG(){return(typeof performance>"u"?Date:performance).now()}const sO="\\[\\]\\.:\\/",afe=new RegExp("["+sO+"]","g"),oO="[^"+sO+"]",lfe="[^"+sO.replace("\\.","")+"]",ffe=new RegExp("^"+/((?:WC+[\/:])*)/.source.replace("WC",oO)+/(WCOD+)?/.source.replace("WCOD",lfe)+/(?:\.(WC+)(?:\[(.+)\])?)?/.source.replace("WC",oO)+/\.(WC+)(?:\[(.+)\])?/.source.replace("WC",oO)+"$"),pfe=["material","materials","bones","map"];class mfe{constructor(t,e,n){const r=n||Ri.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 Ri=(()=>{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(afe,"")}static parseTrackName(e){const n=ffe.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!==pfe.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;an.name===t||n.userData.name===t);return e?(e.removeFromParent(),new ic(e)):null}getBoundings(){return(new Ns).setFromObject(this.nativeMesh)}clone(){return new ic(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 Nn&&this.disposeMesh(t)}),this.nativeMesh instanceof Nn&&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 bfe extends ic{get supportsFov(){return this.nativeCamera instanceof br||"PerspectiveCamera"==this.nativeCamera.type}get fov(){return this.nativeCamera.fov||NaN}set fov(t){this.supportsFov&&(this.nativeCamera.fov=t,this.nativeCamera.updateProjectionMatrix())}constructor(t){super(t),this.nativeCamera=t}}class xfe extends zse{createMaterial(t){let e={};t.color?e={color:t.color}:t.diffuse||(e={color:super.randomColor()});let n=t.shading||"unlit";switch(n){case"unlit":return new vr(Object.assign(Object.assign({},e),{map:t.diffuse||null}));case"standart":return new Wb(Object.assign(Object.assign({},e),{map:t.diffuse||null}));case"phong":return new NS(Object.assign(Object.assign({},e),{map:t.diffuse||null}));case"wireframe":return new vr(Object.assign(Object.assign({},e),{wireframe:!0}));default:throw new Error(`"${n}" shading not implemented for three.js`)}}transformPrimitiveZUp(t){t.geometry.rotateX(Math.PI/2)}createPrimitive(t,e={}){var n,r,s,o;let a=null,l=this.createMaterial(e);switch(t.shape){case"PLANE":a=new Nn(new af((null===(n=t.dimensions)||void 0===n?void 0:n.x)||1e4,(null===(r=t.dimensions)||void 0===r?void 0:r.y)||1e4,null===(s=t.segments)||void 0===s?void 0:s.x,null===(o=t.segments)||void 0===o?void 0:o.y),l);break;case"BOX":a=new Nn(new nf(...Ne.spr(t.dimensions),...t.segments?Ne.spr(t.segments):[]),l);break;case"CAPSULE":a=new Nn(new DS(t.radius,t.centersDistance,t.capSegments,t.radialSegments),l),this.transformPrimitiveZUp(a);break;case"CYLINDER":a=new Nn(new Og(t.radius,t.radius,t.height,t.radialSegments,t.heightSegments),l),this.transformPrimitiveZUp(a);break;case"CONE":a=new Nn(new TS(t.radius,t.height,t.radialSegments,t.heightSegments),l),this.transformPrimitiveZUp(a);break;case"SPHERE":a=new Nn(new $b(t.radius,t.widthSegments,t.heightSegments),l),this.transformPrimitiveZUp(a);break;case"COMPOUND":a=new ta;for(const{position:d,rotation:h,shape:p}of t.children){const m=this.createPrimitive(p,e).nativeMesh;d&&m.position.set(...Ne.spr(d)),h&&m.quaternion.set(...gr.spr(h)),a.add(m)}break;case"MESH":const c=new hn;c.setFromPoints(t.vertices.map(d=>new O(...Ne.spr(d)))),c.setIndex(t.faces.reduce((d,h)=>(d.push(...h),d),[])),a=new Nn(c,l)}if(!a)throw new Error(`Primitive with shape "${t.shape}" not implemented`);return void 0!==e.castShadow&&(a.castShadow=e.castShadow),void 0!==e.receiveShadow&&(a.receiveShadow=e.receiveShadow),new ic(a)}createPerspectiveCamera(t={}){return new bfe(new br(t.fov||75,t.aspectRatio||1,t.frustrum?t.frustrum.near:1,t.frustrum?t.frustrum.far:1e4))}}function jG(i,t){if(t===koe)return console.warn("THREE.BufferGeometryUtils.toTrianglesDrawMode(): Geometry already defined as triangles."),i;if(t===Hk||t===v4){let e=i.getIndex();if(null===e){const o=[],a=i.getAttribute("position");if(void 0===a)return console.error("THREE.BufferGeometryUtils.toTrianglesDrawMode(): Undefined position attribute. Processing not possible."),i;for(let l=0;l=2.0 are supported.")));const c=new tpe(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 d=0;d=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 Mfe(){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 Bn={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_DISPERSION:"KHR_materials_dispersion",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 Cfe{constructor(t){this.parser=t,this.name=Bn.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 Bfe{constructor(t){this.parser=t,this.name=Bn.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 Ufe{constructor(t){this.parser=t,this.name=Bn.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 Vfe{constructor(t){this.name=Bn.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 d=r.count,h=r.byteStride,p=new Uint8Array(a,r.byteOffset||0,r.byteLength||0);return o.decodeGltfBufferAsync?o.decodeGltfBufferAsync(d,h,p,r.mode,r.filter).then(function(m){return m.buffer}):o.ready.then(function(){const m=new ArrayBuffer(d*h);return o.decodeGltfBuffer(new Uint8Array(m),d,h,p,r.mode,r.filter),m})})}return null}}class zfe{constructor(t){this.name=Bn.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!==Oa.TRIANGLES&&c.mode!==Oa.TRIANGLE_STRIP&&c.mode!==Oa.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(d=>(l[c]=d,l[c])));return a.length<1?null:(a.push(this.parser.createNodeMesh(t)),Promise.all(a).then(c=>{const d=c.pop(),h=d.isGroup?d.children:[d],p=c[0].count,m=[];for(const g of h){const b=new Bt,v=new O,y=new uo,M=new O(1,1,1),x=new z5(g.geometry,g.material,p);for(let C=0;C-1,o=s?a.match(/Firefox\/([0-9]+)\./)[1]:-1}this.textureLoader=typeof createImageBitmap>"u"||n&&r<17||s&&o<98?new Hg(this.options.manager):new ife(this.options.manager),this.textureLoader.setCrossOrigin(this.options.crossOrigin),this.textureLoader.setRequestHeader(this.options.requestHeader),this.fileLoader=new Pa(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 Sf(s,a,r),cd(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,d]of o.children.entries())s(d,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(T,D[k*l+1]),l>=3&&v.setZ(T,D[k*l+2]),l>=4&&v.setW(T,D[k*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(d){d.flipY=!1,d.name=o.name||a.name||"",""===d.name&&"string"==typeof a.uri&&!1===a.uri.startsWith("data:image/")&&(d.name=a.uri);const p=(s.samplers||{})[o.sampler]||{};return d.magFilter=KG[p.magFilter]||ar,d.minFilter=KG[p.minFilter]||pl,d.wrapS=ZG[p.wrapS]||Jl,d.wrapT=ZG[p.wrapT]||Jl,r.associations.set(d,{textures:t}),d}).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 d=Promise.resolve(l).then(function(h){return new Promise(function(p,m){let g=p;!0===e.isImageBitmapLoader&&(g=function(b){const v=new Ro(b);v.needsUpdate=!0,p(v)}),e.load(Tu.resolveURL(h,s.path),g,void 0,m)})}).then(function(h){return!0===c&&a.revokeObjectURL(l),cd(h,o),h.userData.mimeType=o.mimeType||function Jfe(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]=d,d}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[Bn.KHR_TEXTURE_TRANSFORM]){const a=void 0!==n.extensions?n.extensions[Bn.KHR_TEXTURE_TRANSFORM]:void 0;if(a){const l=s.associations.get(o);o=s.extensions[Bn.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 mf,ko.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 us,ko.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 Wb}loadMaterial(t){const e=this,r=this.extensions,s=this.json.materials[t];let o;const a={},c=[];if((s.extensions||{})[Bn.KHR_MATERIALS_UNLIT]){const h=r[Bn.KHR_MATERIALS_UNLIT];o=h.getMaterialType(),c.push(h.extendParams(a,s,e))}else{const h=s.pbrMetallicRoughness||{};if(a.color=new qe(1,1,1),a.opacity=1,Array.isArray(h.baseColorFactor)){const p=h.baseColorFactor;a.color.setRGB(p[0],p[1],p[2],ds),a.opacity=p[3]}void 0!==h.baseColorTexture&&c.push(e.assignTexture(a,"map",h.baseColorTexture,cs)),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=Ko);const d=s.alphaMode||"OPAQUE";if("BLEND"===d?(a.transparent=!0,a.depthWrite=!1):(a.transparent=!1,"MASK"===d&&(a.alphaTest=void 0!==s.alphaCutoff?s.alphaCutoff:.5)),void 0!==s.normalTexture&&o!==vr&&(c.push(e.assignTexture(a,"normalMap",s.normalTexture)),a.normalScale=new xe(1,1),void 0!==s.normalTexture.scale)){const h=s.normalTexture.scale;a.normalScale.set(h,h)}if(void 0!==s.occlusionTexture&&o!==vr&&(c.push(e.assignTexture(a,"aoMap",s.occlusionTexture)),void 0!==s.occlusionTexture.strength&&(a.aoMapIntensity=s.occlusionTexture.strength)),void 0!==s.emissiveFactor&&o!==vr){const h=s.emissiveFactor;a.emissive=(new qe).setRGB(h[0],h[1],h[2],ds)}return void 0!==s.emissiveTexture&&o!==vr&&c.push(e.assignTexture(a,"emissiveMap",s.emissiveTexture,cs)),Promise.all(c).then(function(){const h=new o(a);return s.name&&(h.name=s.name),cd(h,s),e.associations.set(h,{materials:t}),s.extensions&&Sf(r,h,s),h})}createUniqueName(t){const e=Ri.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[Bn.KHR_DRACO_MESH_COMPRESSION].decodePrimitive(a,e).then(function(l){return QG(l,a,e)})}const o=[];for(let a=0,l=t.length;a0&&Zfe(y,s),y.name=e.createUniqueName(s.name||"mesh_"+t),cd(y,s),v.extensions&&Sf(r,y,v),e.assignFinalMaterial(y),h.push(y)}for(let m=0,g=h.length;m1?new ta:1===c.length?c[0]:new Fr,d!==c[0])for(let h=0,p=c.length;h{const h=new Map;for(const[p,m]of r.associations)(p instanceof ko||p instanceof Ro)&&h.set(p,m);return d.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(Ru[s.path]===Ru.weights?t.traverse(function(p){p.morphTargetInfluences&&l.push(p.name?p.name:p.uuid)}):l.push(a),Ru[s.path]){case Ru.weights:c=Bg;break;case Ru.rotation:c=Ug;break;case Ru.position:case Ru.scale:c=zg;break;default:c=1===n.itemSize?Bg:zg}const d=void 0!==r.interpolation?qfe[r.interpolation]:vb,h=this._getArrayFromAccessor(n);for(let p=0,m=l.length;p{r.type.endsWith("Light")&&(console.warn("WORKAROUND: light intensity from GLB divided by 200."),r.intensity*=.005)}),new ic(n.scene)})}}const po=(i,t)=>Array(i).fill(null).map((e,n)=>t(n));class Ef{static startDebugView(t,e){let n=this.activeDebugViews.get(t);return n?n.renderers.includes(e)||n.renderers.push(e):(n={view:new Ef(t),renderers:[e]},this.activeDebugViews.set(t,n)),n.view}static stopDebugView(t,e){const n=t.world,r=this.activeDebugViews.get(n);r&&(r.renderers=r.renderers.filter(s=>s!==e),0===r.renderers.length&&(r.view.dispose(),this.activeDebugViews.delete(n)))}constructor(t){this.world=t,this.debugScene=null,this.aSub=null,this.rSub=null,this.syncMap=new Map,this.debugScene=new Ib;const e=n=>{var r,s;const o=n.debugBodySettings;let c,l=this.lineSegmentPointsForShape(o.shape);c=l?new Pg((new hn).setFromPoints(l)):null===(r=this.world)||void 0===r?void 0:r.visualScene.factory.createPrimitive(o.shape,{shading:"wireframe",color:0}).nativeMesh,this.syncMap.set(n,c),null===(s=this.debugScene)||void 0===s||s.add(c)};for(const n of this.world.physicsWorld.children)e(n);this.aSub=this.world.physicsWorld.added$.subscribe(n=>e(n)),this.rSub=this.world.physicsWorld.removed$.subscribe(n=>{var r;const s=this.syncMap.get(n);s&&(this.syncMap.delete(n),null===(r=this.debugScene)||void 0===r||r.remove(s))})}get scene(){return this.debugScene}render(t,e){for(const[r,s]of this.syncMap.entries()){const o=r.debugBodySettings;if(o.ignoreTransform||(s.position.set(...Ne.spr(r.position)),s.quaternion.set(...gr.spr(r.rotation))),s.material){let a=16777215;switch(o.type){case"RIGID_DYNAMIC":a=o.sleeping?255:16711680;break;case"RIGID_STATIC":a=65280;break;case"TRIGGER":a=16776960}s.material.color.set(a),s.material.needsUpdate=!0}}const n=t.autoClearColor;n&&(t.autoClearColor=!1),t.render(this.debugScene,e),n&&(t.autoClearColor=!0)}lineSegmentPointsForShape(t){if("BOX"===t.shape){const e=Ne.scalarMult(t.dimensions,.5);return[...po(8,n=>new O(n<4?e.x:-e.x,n%4<2?e.y:-e.y,n%2?e.z:-e.z)),...po(8,n=>new O(n%2?e.x:-e.x,n<4?e.y:-e.y,n%4<2?e.z:-e.z)),...po(8,n=>new O(n%4<2?e.x:-e.x,n%2?e.y:-e.y,n<4?e.z:-e.z))]}if("CYLINDER"===t.shape)return[...po(32,e=>new O(t.radius*Math.sin(Math.floor((e+1)/2)*Math.PI/8),t.radius*Math.cos(Math.floor((e+1)/2)*Math.PI/8),-t.height/2)),...po(32,e=>new O(t.radius*Math.sin(Math.floor((e+1)/2)*Math.PI/8),t.radius*Math.cos(Math.floor((e+1)/2)*Math.PI/8),t.height/2)),...po(8,e=>new O(Math.floor(e/2)%2?0:e<4?t.radius:-t.radius,Math.floor(e/2)%2?e<4?t.radius:-t.radius:0,e%2?t.height/2:-t.height/2)),new O(0,0,-t.height/2),new O(0,0,t.height/2)];if("CONE"===t.shape)return[...po(32,e=>new O(t.radius*Math.sin(Math.floor((e+1)/2)*Math.PI/8),t.radius*Math.cos(Math.floor((e+1)/2)*Math.PI/8),-t.height/2)),...po(8,e=>new O(e%2||Math.floor(e/2)%2?0:e<4?t.radius:-t.radius,e%2?0:Math.floor(e/2)%2?e<4?t.radius:-t.radius:0,e%2?t.height/2:-t.height/2)),new O(0,0,-t.height/2),new O(0,0,t.height/2)];if("SPHERE"===t.shape)return[...po(32,e=>new O(t.radius*Math.sin(Math.floor((e+1)/2)*Math.PI/8),t.radius*Math.cos(Math.floor((e+1)/2)*Math.PI/8),0)),...po(32,e=>new O(t.radius*Math.sin(Math.floor((e+1)/2)*Math.PI/8),0,t.radius*Math.cos(Math.floor((e+1)/2)*Math.PI/8))),...po(32,e=>new O(0,t.radius*Math.sin(Math.floor((e+1)/2)*Math.PI/8),t.radius*Math.cos(Math.floor((e+1)/2)*Math.PI/8)))];if("CAPSULE"===t.shape)return[...this.lineSegmentPointsForShape({shape:"CYLINDER",radius:t.radius,height:t.centersDistance}),...po(16,e=>new O(t.radius*Math.cos(Math.floor((e+1)/2)*Math.PI/8),0,t.radius*Math.sin(Math.floor((e+1)/2)*Math.PI/8)+t.centersDistance/2)),...po(16,e=>new O(t.radius*Math.cos(Math.floor((e+1)/2)*Math.PI/8),0,-t.radius*Math.sin(Math.floor((e+1)/2)*Math.PI/8)-t.centersDistance/2)),...po(16,e=>new O(0,t.radius*Math.cos(Math.floor((e+1)/2)*Math.PI/8),t.radius*Math.sin(Math.floor((e+1)/2)*Math.PI/8)+t.centersDistance/2)),...po(16,e=>new O(0,t.radius*Math.cos(Math.floor((e+1)/2)*Math.PI/8),-t.radius*Math.sin(Math.floor((e+1)/2)*Math.PI/8)-t.centersDistance/2))];if("CONVEX_HULL"===t.shape)return[...t.vertices.map(n=>[new O(n.x-.05,n.y,n.z),new O(n.x+.05,n.y,n.z),new O(n.x,n.y-.05,n.z),new O(n.x,n.y+.05,n.z),new O(n.x,n.y,n.z-.05),new O(n.x,n.y,n.z+.05)]).reduce((n,r)=>(n.push(...r),n),[])];if("COMPOUND"===t.shape){const e=[];for(const{position:n,shape:r,rotation:s}of t.children){let o=this.lineSegmentPointsForShape(r);if(!o)return null;e.push(...o.map(a=>new O(...Ne.spr(Ne.add(n||Ne.O,Ne.rot(a,s||gr.O))))))}return e}return null}dispose(){var t,e;this.debugScene=null,null===(t=this.aSub)||void 0===t||t.unsubscribe(),null===(e=this.rSub)||void 0===e||e.unsubscribe(),this.syncMap=new Map}}Ef.activeDebugViews=new Map;class JG extends Rse{get physicsDebugViewActive(){return this._physicsDebugViewActive}set physicsDebugViewActive(t){this._physicsDebugViewActive!=t&&(this._physicsDebugViewActive=t,this.world&&(t?this.debugView=Ef.startDebugView(this.world,this):(Ef.stopDebugView(this.debugView,this),this.debugView=null)))}constructor(t,e,n,r={}){super(t,n,r),this.scene=t,this.camera=e,this.canvas=n,this.world=null,this.debugView=null,this._physicsDebugViewActive=!1,this.nativeRenderer=new Nue(Object.assign({canvas:n,alpha:this.rendererOptions.transparent},this.rendererOptions)),this.nativeRenderer.shadowMap.enabled=!0,this.nativeRenderer.setClearColor(this.rendererOptions.background),this.nativeRenderer.shadowMap.type=i4,this.nativeRenderer.setPixelRatio(this.rendererOptions.forceResolution||devicePixelRatio)}addToWorld(t){this.world=t,this.physicsDebugViewActive&&(this.debugView=Ef.startDebugView(this.world,this))}removeFromWorld(t){this.physicsDebugViewActive&&(Ef.stopDebugView(this.debugView,this),this.debugView=null),this.world=null}resizeRenderer(t){this.nativeRenderer.setSize(t.x,t.y),(this.camera.nativeCamera instanceof br||"PerspectiveCamera"==this.camera.nativeCamera.type)&&Math.abs(this.camera.nativeCamera.aspect-t.x/t.y)>.01&&(this.camera.nativeCamera.aspect=t.x/t.y,this.camera.nativeCamera.updateProjectionMatrix())}render(){this.nativeRenderer.render(this.scene.nativeScene,this.camera.nativeCamera),this.physicsDebugViewActive&&this.debugView.render(this.nativeRenderer,this.camera.nativeCamera)}dispose(){this.camera.dispose(),this.nativeRenderer.clear(),this.nativeRenderer.dispose(),this.nativeRenderer.domElement=null}}const spe={name:"CopyShader",uniforms:{tDiffuse:{value:null},opacity:{value:1}},vertexShader:"\n\n\t\tvarying vec2 vUv;\n\n\t\tvoid main() {\n\n\t\t\tvUv = uv;\n\t\t\tgl_Position = projectionMatrix * modelViewMatrix * vec4( position, 1.0 );\n\n\t\t}",fragmentShader:"\n\n\t\tuniform float opacity;\n\n\t\tuniform sampler2D tDiffuse;\n\n\t\tvarying vec2 vUv;\n\n\t\tvoid main() {\n\n\t\t\tvec4 texel = texture2D( tDiffuse, vUv );\n\t\t\tgl_FragColor = opacity * texel;\n\n\n\t\t}"};class YS{constructor(){this.isPass=!0,this.enabled=!0,this.needsSwap=!0,this.clear=!1,this.renderToScreen=!1}setSize(){}render(){console.error("THREE.Pass: .render() must be implemented in derived pass.")}dispose(){}}const ope=new Db(-1,1,1,-1,0,1),lpe=new class ape extends hn{constructor(){super(),this.setAttribute("position",new ct([-1,3,0,-1,-1,0,3,-1,0],3)),this.setAttribute("uv",new ct([0,2,0,0,2,0],2))}};class cpe{constructor(t){this._mesh=new Nn(lpe,t)}dispose(){this._mesh.geometry.dispose()}render(t){t.render(this._mesh,ope)}get material(){return this._mesh.material}set material(t){this._mesh.material=t}}class dpe extends YS{constructor(t,e){super(),this.textureID=void 0!==e?e:"tDiffuse",t instanceof vl?(this.uniforms=t.uniforms,this.material=t):t&&(this.uniforms=j4.clone(t.uniforms),this.material=new vl({name:void 0!==t.name?t.name:"unspecified",defines:Object.assign({},t.defines),uniforms:this.uniforms,vertexShader:t.vertexShader,fragmentShader:t.fragmentShader})),this.fsQuad=new cpe(this.material)}render(t,e,n){this.uniforms[this.textureID]&&(this.uniforms[this.textureID].value=n.texture),this.fsQuad.material=this.material,this.renderToScreen?(t.setRenderTarget(null),this.fsQuad.render(t)):(t.setRenderTarget(e),this.clear&&t.clear(t.autoClearColor,t.autoClearDepth,t.autoClearStencil),this.fsQuad.render(t))}dispose(){this.material.dispose(),this.fsQuad.dispose()}}class e$ extends YS{constructor(t,e){super(),this.scene=t,this.camera=e,this.clear=!0,this.needsSwap=!1,this.inverse=!1}render(t,e,n){const r=t.getContext(),s=t.state;let o,a;s.buffers.color.setMask(!1),s.buffers.depth.setMask(!1),s.buffers.color.setLocked(!0),s.buffers.depth.setLocked(!0),this.inverse?(o=0,a=1):(o=1,a=0),s.buffers.stencil.setTest(!0),s.buffers.stencil.setOp(r.REPLACE,r.REPLACE,r.REPLACE),s.buffers.stencil.setFunc(r.ALWAYS,o,4294967295),s.buffers.stencil.setClear(a),s.buffers.stencil.setLocked(!0),t.setRenderTarget(n),this.clear&&t.clear(),t.render(this.scene,this.camera),t.setRenderTarget(e),this.clear&&t.clear(),t.render(this.scene,this.camera),s.buffers.color.setLocked(!1),s.buffers.depth.setLocked(!1),s.buffers.color.setMask(!0),s.buffers.depth.setMask(!0),s.buffers.stencil.setLocked(!1),s.buffers.stencil.setFunc(r.EQUAL,1,4294967295),s.buffers.stencil.setOp(r.KEEP,r.KEEP,r.KEEP),s.buffers.stencil.setLocked(!0)}}class upe extends YS{constructor(){super(),this.needsSwap=!1}render(t){t.state.buffers.stencil.setLocked(!1),t.state.buffers.stencil.setTest(!1)}}class hpe{constructor(t,e){if(this.renderer=t,this._pixelRatio=t.getPixelRatio(),void 0===e){const n=t.getSize(new xe);this._width=n.width,this._height=n.height,(e=new bu(this._width*this._pixelRatio,this._height*this._pixelRatio,{type:Xm})).texture.name="EffectComposer.rt1"}else this._width=e.width,this._height=e.height;this.renderTarget1=e,this.renderTarget2=e.clone(),this.renderTarget2.texture.name="EffectComposer.rt2",this.writeBuffer=this.renderTarget1,this.readBuffer=this.renderTarget2,this.renderToScreen=!0,this.passes=[],this.copyPass=new dpe(spe),this.copyPass.material.blending=Xc,this.clock=new DG}swapBuffers(){const t=this.readBuffer;this.readBuffer=this.writeBuffer,this.writeBuffer=t}addPass(t){this.passes.push(t),t.setSize(this._width*this._pixelRatio,this._height*this._pixelRatio)}insertPass(t,e){this.passes.splice(e,0,t),t.setSize(this._width*this._pixelRatio,this._height*this._pixelRatio)}removePass(t){const e=this.passes.indexOf(t);-1!==e&&this.passes.splice(e,1)}isLastEnabledPass(t){for(let e=t+1;e0?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;i$.fromArray(r,t),gO.fromArray(r,e),r$.fromArray(r,n),Fa.subVectors(r$,gO),s$.subVectors(i$,gO),Fa.cross(s$),Fa.normalize(),s.push(Fa.x,Fa.y,Fa.z),s.push(Fa.x,Fa.y,Fa.z),s.push(Fa.x,Fa.y,Fa.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 d=this.vertices.length;let h=this.parseVertexIndex(t,d),p=this.parseVertexIndex(e,d),m=this.parseVertexIndex(n,d);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?(qS.setRGB(parseFloat(h[4]),parseFloat(h[5]),parseFloat(h[6])).convertSRGBToLinear(),e.colors.push(qS.r,qS.g,qS.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"===d){const p=c.slice(1).trim().split(n$),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 ta;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 ct(d.normals,3)),d.colors.length>0&&(g=!0,b.setAttribute("color",new ct(d.colors,3))),!0===d.hasUVIndices&&b.setAttribute("uv",new ct(d.uvs,2));const v=[];for(let M=0,x=h.length;M1){for(let M=0,x=h.length;M0){const a=new mf({size:1,sizeAttenuation:!1}),l=new hn;l.setAttribute("position",new ct(e.vertices,3)),e.colors.length>0&&void 0!==e.colors[0]&&(l.setAttribute("color",new ct(e.colors,3)),a.vertexColors=!0);const c=new Bb(l,a);s.add(c)}return s}}class o$ extends yf{constructor(t){super(t)}load(t,e,n,r){const s=this,o=""===this.path?Tu.extractUrlBase(t):this.path,a=new Pa(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,d):c;h=h.toLowerCase();let p=d>=0?c.substring(d+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 xpe(this.resourcePath||e,this.materialOptions);return a.setCrossOrigin(this.crossOrigin),a.setManager(this.manager),a.setMaterials(o),a}}class xpe{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:Ql,this.wrap=void 0!==this.options.wrap?this.options.wrap:Jl}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),d=e.loadTexture(function s(a,l){return"string"!=typeof l||""===l?"":/^https?:\/\//i.test(l)?l:a+l}(e.baseUrl,c.url));d.repeat.copy(c.scale),d.offset.copy(c.offset),d.wrapS=e.wrap,d.wrapT=e.wrap,("map"===a||"emissiveMap"===a)&&(d.colorSpace=cs),r[a]=d}for(const a in n){const l=n[a];let c;if(""!==l)switch(a.toLowerCase()){case"kd":r.color=(new qe).fromArray(l).convertSRGBToLinear();break;case"ks":r.specular=(new qe).fromArray(l).convertSRGBToLinear();break;case"ke":r.emissive=(new qe).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 NS(r),this.materials[t]}getTextureParams(t,e){const n={scale:new xe(1,1),offset:new xe(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:gG;let a=o.getHandler(t);null===a&&(a=new Hg(o)),a.setCrossOrigin&&a.setCrossOrigin(this.crossOrigin);const l=a.load(t,n,r,s);return void 0!==e&&(l.mapping=e),l}}const wpe=["determinateSpinner"];function Mpe(i,t){if(1&i&&(ki(),$(0,"svg",11),Oe(1,"circle",12),j()),2&i){const e=re();Dt("viewBox",e._viewBox()),V(1),$o("stroke-dasharray",e._strokeCircumference(),"px")("stroke-dashoffset",e._strokeCircumference()/2,"px")("stroke-width",e._circleStrokeWidth(),"%"),Dt("r",e._circleRadius())}}const Cpe=Ky(class{constructor(i){this._elementRef=i}},"primary"),Spe=new me("mat-progress-spinner-default-options",{providedIn:"root",factory:function Epe(){return{diameter:a$}}}),a$=100;let XS=(()=>{class i extends Cpe{constructor(e,n,r){super(e),this.mode="mat-spinner"===this._elementRef.nativeElement.nodeName.toLowerCase()?"indeterminate":"determinate",this._value=0,this._diameter=a$,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,ks(e)))}get diameter(){return this._diameter}set diameter(e){this._diameter=ks(e)}get strokeWidth(){return this._strokeWidth??this.diameter/10}set strokeWidth(e){this._strokeWidth=ks(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)(E(mt),E(kr,8),E(Spe))},i.\u0275cmp=st({type:i,selectors:[["mat-progress-spinner"],["mat-spinner"]],viewQuery:function(e,n){if(1&e&&Zn(wpe,5),2&e){let r;Tt(r=It())&&(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&&(Dt("aria-valuemin",0)("aria-valuemax",100)("aria-valuenow","determinate"===n.mode?n.value:null)("mode",n.mode),$o("width",n.diameter,"px")("height",n.diameter,"px"),ln("_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:[lt],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&&(fe(0,Mpe,2,8,"ng-template",null,0,kc),$(2,"div",1,2),ki(),$(4,"svg",3),Oe(5,"circle",4),j()(),pa(),$(6,"div",5)(7,"div",6)(8,"div",7),ny(9,8),j(),$(10,"div",9),ny(11,8),j(),$(12,"div",10),ny(13,8),j()()()),2&e){const r=ir(1);V(4),Dt("viewBox",n._viewBox()),V(1),$o("stroke-dasharray",n._strokeCircumference(),"px")("stroke-dashoffset",n._strokeDashOffset(),"px")("stroke-width",n._circleStrokeWidth(),"%"),Dt("r",n._circleRadius()),V(4),U("ngTemplateOutlet",r),V(2),U("ngTemplateOutlet",r),V(2),U("ngTemplateOutlet",r)}},dependencies:[vy],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})(),Dpe=(()=>{class i{}return i.\u0275fac=function(e){return new(e||i)},i.\u0275mod=en({type:i}),i.\u0275inj=Wt({imports:[ao,Qn]}),i})();const Tpe=["previewCanvasContainer"],Ipe=["previewCanvas"];function Rpe(i,t){if(1&i){const e=Kn();$r(0),$(1,"label",11),Ve(2),j(),$(3,"input",12),ke("change",function(r){Ht(e);const s=re().$implicit;return s.value=r.currentTarget.checked,Et(s.change(s.value))}),j(),Wr()}if(2&i){const e=re(),n=e.index,r=e.$implicit,s=re().index;V(1),U("for","custom_control_"+s+"_"+n),V(1),ui(r.label),V(1),U("id","custom_control_"+s+"_"+n)("type",r.type)("checked",r.value)}}function kpe(i,t){if(1&i){const e=Kn();$(0,"div",9)(1,"label",11),Ve(2),j(),$(3,"input",14),ke("change",function(){const s=Ht(e).$implicit,o=re(2).$implicit;return o.value=s,Et(o.change(o.value))}),j()()}if(2&i){const e=t.$implicit,n=re(2),r=n.index,s=n.$implicit,o=re().index;V(1),U("for","custom_control_"+o+"_"+r+"_"+e),V(1),ui(e),V(1),U("id","custom_control_"+o+"_"+r+"_"+e)("checked",s.value===e)}}function Ppe(i,t){if(1&i&&($(0,"div",13)(1,"label"),Ve(2),j(),fe(3,kpe,4,4,"div",8),j()),2&i){const e=re().$implicit;V(2),ui(e.label),V(1),U("ngForOf",e.options)}}function Ope(i,t){if(1&i){const e=Kn();$r(0),$(1,"label",11),Ve(2),j(),$(3,"input",15),ke("colorChange",function(r){Ht(e);const s=re().$implicit,o=re(2);return s.value=o.toRGB(r.value),Et(s.change(s.value))}),j(),Oe(4,"ngx-mat-color-toggle",16)(5,"ngx-mat-color-picker",null,17),Wr()}if(2&i){const e=ir(6),n=re(),r=n.index,s=n.$implicit,o=re().index;V(1),U("for","custom_control_"+o+"_"+r),V(1),ui(s.label),V(1),U("ngxMatColorPicker",e),V(1),U("for",e)}}function Fpe(i,t){if(1&i){const e=Kn();$r(0),$(1,"label",11),Ve(2),j(),$(3,"input",18),ke("change",function(r){Ht(e);const s=re().$implicit;return s.value=r.currentTarget.value,Et(s.change(s.value))}),j(),Wr()}if(2&i){const e=re(),n=e.index,r=e.$implicit,s=re().index;V(1),U("for","custom_control_"+s+"_"+n),V(1),ui(r.label),V(1),U("id","custom_control_"+s+"_"+n)("min",r.minValue)("max",r.maxValue)("step",r.valueStep)("value",r.value)}}function Lpe(i,t){if(1&i&&($(0,"div",9),fe(1,Rpe,4,5,"ng-container",6),fe(2,Ppe,4,2,"div",10),fe(3,Ope,7,4,"ng-container",6),fe(4,Fpe,4,7,"ng-container",6),j()),2&i){const e=t.$implicit;V(1),U("ngIf","checkbox"===e.type),V(1),U("ngIf","radio"===e.type),V(1),U("ngIf","color"===e.type),V(1),U("ngIf","slider"===e.type)}}function Npe(i,t){if(1&i&&($r(0),$(1,"h4"),Ve(2),j(),fe(3,Lpe,5,4,"div",8),Wr()),2&i){const e=t.$implicit;V(2),ui(e.title),V(1),U("ngForOf",e.controls)}}function Bpe(i,t){if(1&i){const e=Kn();$(0,"div",9)(1,"label",11),Ve(2),j(),$(3,"input",19),ke("change",function(r){return Et(Ht(e).$implicit.visible=r.currentTarget.checked)}),j()()}if(2&i){const e=t.$implicit;V(1),U("for","visibility_"+e.name),V(1),ui(e.name),V(1),U("id","visibility_"+e.name)("checked",e.visible)}}function Upe(i,t){if(1&i&&($r(0),$(1,"h4"),Ve(2,"Objects visibility"),j(),fe(3,Bpe,4,4,"div",8),Wr()),2&i){const e=re();V(3),U("ngForOf",e.meshes)}}function Vpe(i,t){1&i&&Oe(0,"mat-spinner",20)}const dd=i=>{i.colorSpace="srgb",i.anisotropy=8,i.magFilter=_r,i.minFilter=_r};let l$=(()=>{class i{constructor(e){this.cdr=e,this.visibilityControls=!0,this.groupFunction=null,this.customControls=[],this.onObjectLoaded=new $e,this._paths$=new at(null),this.destroyed$=new Ie,this.entity=null,this.meshes=[]}get paths(){return this._paths$.getValue()}set paths(e){this._paths$.next(e)}ngAfterViewInit(){var e=this;return xt(function*(){var s;e.world=new e4(new t$,{init:(s=xt(function*(){}),function(){return s.apply(this,arguments)}),simulate:()=>{}}),yield e.world.init(),e.world.visualScene.nativeScene.add(new iO(16777215,2));let n=new at({x:1,y:1});e.renderer=e.world.addRenderer(e.world.visualScene.factory.createPerspectiveCamera({frustrum:{near:.01,far:1e4}}),e.previewCanvas.nativeElement,{size:n.asObservable(),background:11184810}),e.controller=new Use(e.renderer,{mouseOptions:{canvas:e.previewCanvas.nativeElement},orbiting:{sensitivityX:2,sensitivityY:2},orbitingElasticity:30}),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(He(e.destroyed$)).subscribe(function(){var s=xt(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 _O,h=yield(new o$).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 ta;y.add(...b[v]),y.name=v,p.remove(...b[v]),p.add(y)}}e.meshes=p.children,e.meshes.sort((b,v)=>b.name>v.name?1:-1),p.traverse(b=>{if(b instanceof Nn){const v=b.material instanceof Array?b.material:[b.material];for(const y of v)y.transparent=!0,y.alphaTest=.5,y instanceof vr&&y.map&&(y.map.wrapS=Zi,y.map.wrapT=Zi,dd(y.map),y.map.needsUpdate=!0)}}),e.onObjectLoaded.next(p),e.entity=new mu({object3D:new ic(p)}),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=Ne.scalarMult(Ne.add(m.min,m.max),.5),e.controller.spherical={phi:1.22,theta:-1.32,radius:Ne.dist(m.min,m.max)},e.cdr.markForCheck()}});return function(o){return s.apply(this,arguments)}}())})()}toRGB(e){return(e?.r||0)<<16|(e?.g||0)<<8|(e?.b||0)}ngOnDestroy(){this.destroyed$.next(),this.destroyed$.complete()}}return i.\u0275fac=function(e){return new(e||i)(E(si))},i.\u0275cmp=st({type:i,selectors:[["app-obj-viewer"]],viewQuery:function(e,n){if(1&e&&(Zn(Tpe,5),Zn(Ipe,5)),2&e){let r;Tt(r=It())&&(n.previewCanvasContainer=r.first),Tt(r=It())&&(n.previewCanvas=r.first)}},inputs:{paths:"paths",visibilityControls:"visibilityControls",groupFunction:"groupFunction",customControls:"customControls"},outputs:{onObjectLoaded:"onObjectLoaded"},decls:8,vars:3,consts:[[1,"previewCanvasContainer"],["previewCanvasContainer",""],["width","640","height","480"],["previewCanvas",""],["id","controls"],[4,"ngFor","ngForOf"],[4,"ngIf"],["mode","indeterminate",4,"ngIf"],["class","controls-list",4,"ngFor","ngForOf"],[1,"controls-list"],["style","width: 100%",4,"ngIf"],[3,"for"],[3,"id","type","checked","change"],[2,"width","100%"],["type","radio",3,"id","checked","change"],["matInput","",1,"hidden",3,"ngxMatColorPicker","colorChange"],["matSuffix","",3,"for"],["picker",""],["type","range",3,"id","min","max","step","value","change"],["type","checkbox",3,"id","checked","change"],["mode","indeterminate"]],template:function(e,n){1&e&&($(0,"div",0,1),Oe(2,"canvas",2,3),$(4,"div",4),fe(5,Npe,4,2,"ng-container",5),fe(6,Upe,4,1,"ng-container",6),j(),fe(7,Vpe,1,0,"mat-spinner",7),j()),2&e&&(V(5),U("ngForOf",n.customControls),V(1),U("ngIf",n.visibilityControls),V(1),U("ngIf",!n.entity))},dependencies:[oo,vi,$te,Yc,XS,zie,gC,PH],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%] > h4[_ngcontent-%COMP%]{margin:0}.previewCanvasContainer[_ngcontent-%COMP%] #controls[_ngcontent-%COMP%] .controls-list[_ngcontent-%COMP%]{width:100%;display:flex;-webkit-user-select:none;user-select:none;align-items:center}.previewCanvasContainer[_ngcontent-%COMP%] #controls[_ngcontent-%COMP%] .controls-list[_ngcontent-%COMP%] > span[_ngcontent-%COMP%]{flex-grow:1}.previewCanvasContainer[_ngcontent-%COMP%] #controls[_ngcontent-%COMP%] .controls-list[_ngcontent-%COMP%] > label[_ngcontent-%COMP%]{flex-grow:1}"],changeDetection:0}),i})();function zpe(i,t){if(1&i){const e=Kn();ki(),$(0,"circle",5),ke("mousedown",function(r){return Ht(e),Et(re().startDrag(r))}),gt(1,"async"),gt(2,"async"),j()}if(2&i){const e=re();let n,r;Dt("cx",(null==(n=yt(1,3,e.mapPointer$))?null:n.x)||0)("cy",(null==(r=yt(2,5,e.mapPointer$))?null:r.y)||0)("r",10)}}const Hpe=function(){return{"stroke-width":3}};let Gpe=(()=>{class i{constructor(e){this.ref=e,this._roadSpline$=new at([]),this._pointer$=new at(null),this._projection$=new at("nz"),this._roadSplineProjected$=new at([]),this._pointerProjected$=new at(yi.O),this.splineClosed=!1,this.pointerChange=new $e,this.svgSize$=new at({x:100,y:100}),this.scalingSquare$=new at({x:0,y:0,width:100,height:100}),this.mapPolyline$=new at(""),this.mapPointer$=new at(null),this.isShiftPressed=!1,this.destroyed$=new Ie,this.isDragging=!1}set roadSpline(e){this._roadSpline$.next(e)}set pointer(e){this._pointer$.next(e)}set projection(e){this._projection$.next(e)}get trackLength$(){return this._roadSpline$.pipe(et(e=>{let n=0;for(let r=1;r{"Shift"===n.key&&(this.isShiftPressed=!0)}),Ao(window,"keyup").pipe(He(this.destroyed$)).subscribe(n=>{"Shift"===n.key&&(this.isShiftPressed=!1)}),Aa([this._roadSpline$,this._projection$]).pipe(He(this.destroyed$)).subscribe(([n,r])=>{this._roadSplineProjected$.next(n.map(s=>this.project(s)))}),Aa([this._pointer$,this._projection$]).pipe(He(this.destroyed$)).subscribe(([n,r])=>{this._pointerProjected$.next(this.project(n||Ne.O))}),this._roadSplineProjected$.pipe(He(this.destroyed$),et(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.y)},s={x:Math.max(s.x,a.x),y:Math.max(s.y,a.y)}});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$),Aa([this._roadSplineProjected$,this.scalingSquare$,this.svgSize$]).pipe(He(this.destroyed$),et(([n,r,s])=>{const o=n.map(a=>({x:(a.x-r.x)*s.x/r.width,y:(r.y-a.y)*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$),Aa([this._pointerProjected$,this.scalingSquare$.asObservable(),this.svgSize$]).pipe(He(this.destroyed$),et(([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()}startDrag(e){this.isDragging=!0,this.updatePointer(e)}drag(e){this.isDragging&&this.updatePointer(e)}endDrag(){this.isDragging=!1}getClosestProjectedLineIndex(e){const n=this._roadSplineProjected$.getValue();let r=-1,s=Number.MAX_SAFE_INTEGER;for(let d=1;d{return(i=Af||(Af={})).ThreeModel="model",i.Bitmap="bitmap",i.TwoSidedBitmap="two_sided_bitmap",Af;var i})();class Zpe extends Ose{constructor(t,e,n){super(t,{loadDepth:40,inertia:2}),this.mapGraph=t,this.famPath=e,this.hideUnknownEntities$=n,this.textureLoader=new Hg,this.terrainMaterials={},this.objLoader=new _O,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(zc(),He(this._onRemoved$)).subscribe(e=>{for(const n of this.unknownEntities)n.visible=!e})}getPlaceholderTexture(){var t=this;return xt(function*(){return t._placeholder?t._placeholder:(t._placeholderPromise||(t._placeholderPromise=t.textureLoader.loadAsync("assets/placeholder_texture.png")),t._placeholderPromise)})()}getPlaceholderTerrainTexture(){var t=this;return xt(function*(){return t._placeholderTerrain?t._placeholderTerrain:(t._placeholderTerrainPromise||(t._placeholderTerrainPromise=t.textureLoader.loadAsync("assets/placeholder_texture.png").then(e=>(e.wrapS=Jl,e.wrapT=Zi,dd(e),e.flipY=!0,e))),t._placeholderTerrainPromise)})()}loadChunk(t){var e=this;return xt(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 Nn&&(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:Ne.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(Ne.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 mu({object3D:new ic(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 vr({side:Ko,transparent:!0,visible:!1}),this.famPath?this.textureLoader.loadAsync(`${this.famPath}/${t}.png`).then(e=>{e.wrapS=Jl,e.wrapT=Zi,dd(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 xt(function*(){let n=!1;if(t.type==Af.ThreeModel){let r;try{if(!e.famPath)throw new Error;const o=new o$,a=new _O,l=yield o.loadAsync(`${e.famPath}/props/${t.data.data.resource_id}/0/material.mtl`);l.preload(),a.setMaterials(l),r=new ic(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 Nn){const a=o.material instanceof Array?o.material:[o.material];for(const l of a)l.transparent=!0,l.alphaTest=.5,l instanceof vr&&l.map&&(l.map.wrapS=Zi,l.map.wrapT=Zi,dd(l.map),l.map.needsUpdate=!0)}});const s=new mu({object3D: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==Af.Bitmap||t.type==Af.TwoSidedBitmap){const r=(c,d)=>new Array(d).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 ta,[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==Af.TwoSidedBitmap){const[c,d]=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 mu({object3D:new ic(s)});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 xt(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=>(dd(h),new vr({map:h,alphaTest:.5,transparent:!0,side:Ko}))),d=new Nn(new af(e.x,e.y),c[0]);if(d.rotateX(Math.PI/2),d.position.set(0,0,e.y/2),c.length>1){let h=-1;qR(r.world).pipe(function Wse(i,t=zy,e){const n=II(i,t);return function $se(i,t){return ti((e,n)=>{const{leading:r=!0,trailing:s=!1}=t??{};let o=!1,a=null,l=null,c=!1;const d=()=>{l?.unsubscribe(),l=null,s&&(m(),c&&n.complete())},h=()=>{l=null,c&&n.complete()},p=g=>l=Mr(i(g)).subscribe(jn(n,d,h)),m=()=>{if(o){o=!1;const g=a;a=null,n.next(g),!c&&p(g)}};e.subscribe(jn(n,g=>{o=!0,a=g,(!l||l.closed)&&(r?m():p(g))},()=>{c=!0,(!(s&&o&&l)||l.closed)&&n.complete()}))})}(()=>n,e)}(n&&!isNaN(+n)?1e3*+n:250)).subscribe(()=>{h=(h+1)%c.length,d.material=c[h]})}return[d,a]})()}}let Qpe=(()=>{class i{constructor(e,n,r){this.eelDelegate=e,this.cdr=n,this.mainService=r,this._resource$=new at(null),this.changed=new $e,this.previewLoading$=new at(!0),this.previewFamLocation$=new at(null),this.previewFamLoading$=new at(!1),this.pointer$=new at(null),this.selectedSplineIndex$=new at(0),this.selectedSplineItem$=new at(null),this.selectedAiInfoItem$=new at(null),this.selectedTerrainItem$=new at(null),this.famPath=null,this.name="",this.renderer=null,this.map=null,this.isOpenedTrack=!0,this.roadPath=null,this.destroyed$=new Ie}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=>({x:e.position.x,y:e.position.z,z:e.position.y}))||[]}ngAfterViewInit(){var e=this;return xt(function*(){var s;e.world=new e4(new t$,{init:(s=xt(function*(){}),function(){return s.apply(this,arguments)}),simulate:()=>{},loader:{loadFromGgGlb:function(){var s=xt(function*(...o){return[]});return function(){return s.apply(this,arguments)}}()}}),yield e.world.init(),e.skySphere=new mu({object3D:e.world.visualScene.factory.createPrimitive({shape:"SPHERE",radius:1e3},{color:16777215})}),e.skySphere.object3D.nativeMesh.material.side=Ko,e.world.addEntity(e.skySphere),e.selectionSphere=new mu({object3D: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 iO(16777215,2));let n=new at({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,Ne.add(e.renderer.camera.position,Ne.Y),Ne.Z),qR(e.world).pipe(He(e.destroyed$)).subscribe(()=>{e.renderer&&(e.skySphere.position=e.renderer.camera.position,e.pointer$.next(e.renderer.camera.position))}),e.controller=new Nse(e.world.keyboardInput,e.renderer,{mouseOptions:{canvas:e.previewCanvas.nativeElement,pointerLock:!0},keymap:"wasd+arrows",cameraLinearSpeed:40,cameraBoostMultiplier:4,cameraMovementElasticity:100,cameraRotationElasticity:30,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(He(e.destroyed$)).subscribe(function(){var s=xt(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(He(e.destroyed$),vn(([s,o])=>!!e.resource&&s.startsWith(e.resource.id)),Vc(3e3)).subscribe(xt(function*(){e.previewLoading$.next(!0),yield e.postTmpUpdates(e.resource?.id),yield e.loadPreview(),e.previewLoading$.next(!1)})),e.selectedSplineIndex$.pipe(He(e.destroyed$),Vc(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=Ne.add(a,Ne.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.controller.reset())}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 xt(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 Hg,o=r.find(a=>a.endsWith("spherical.png"));if(o){const a=yield s.loadAsync(o);a.colorSpace="srgb",a.mapping=Kc,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 xt(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})()}onPointerChange(e){this.renderer&&(this.renderer.position=e)}loadPreview(){var e=this;return xt(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=hb.fromMapArray(e.roadPath.map((r,s)=>({path:`${e.terrainChunksObjLocation}terrain_chunk_${s}`,position:r,loadOptions:{}}))||[],!e.isOpenedTrack);e.unloadPreview(),e.map=new Zpe(n,e.famPath&&"resources/"+e.famPath,e.mainService.hideHiddenFields$),e.map.resource=e.resource,e.map.isOpenedTrack=e.isOpenedTrack,qR(e.world).pipe(He(e.destroyed$)).subscribe(()=>{e.map&&e.renderer&&e.map.loaderCursor$.next(e.renderer.position)}),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 xt(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)(E($c),E(si),E(ul))},i.\u0275cmp=st({type:i,selectors:[["app-tri-map-block-ui"]],viewQuery:function(e,n){if(1&e&&(Zn($pe,5),Zn(Wpe,5)),2&e){let r;Tt(r=It())&&(n.previewCanvasContainer=r.first),Tt(r=It())&&(n.previewCanvas=r.first)}},inputs:{resource:"resource"},outputs:{changed:"changed"},decls:49,vars:44,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","projection","pointerChange"],[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&&($(0,"div",0)(1,"h4"),Ve(2,"Preview *.FAM file"),j(),$(3,"mat-form-field",1)(4,"mat-label"),Ve(5,"Current preview FAM"),j(),$(6,"mat-select",2,3),ke("valueChange",function(s){return n.onFamSelected(s)}),gt(8,"async"),gt(9,"async"),fe(10,jpe,2,2,"mat-option",4),$(11,"mat-option",5),Ve(12,"custom"),j()()(),fe(13,Ype,9,3,"ng-container",6),fe(14,qpe,1,1,"mat-spinner",7),gt(15,"async"),j(),$(16,"div",8)(17,"div",9,10),Oe(19,"canvas",11,12),fe(21,Xpe,1,0,"mat-spinner",13),gt(22,"async"),j(),$(23,"div",14,10)(25,"mat-form-field",1)(26,"mat-label"),Ve(27,"Spline item"),j(),$(28,"input",15),ke("ngModelChange",function(s){return n.selectedSplineIndex$.next(s)}),gt(29,"async"),gt(30,"async"),j()(),$(31,"app-minimap",16),ke("pointerChange",function(s){return n.onPointerChange(s)}),gt(32,"async"),j()()(),$(33,"h4"),Ve(34,"Road spline item"),j(),Oe(35,"app-compound-block-ui",17),gt(36,"async"),$(37,"h4"),Ve(38,"AI info (block for 4 spline items)"),j(),Oe(39,"app-compound-block-ui",17),gt(40,"async"),$(41,"h4"),Ve(42,"Terrain (block for 4 spline items)"),j(),Oe(43,"app-compound-block-ui",17),gt(44,"async"),$(45,"h4"),Ve(46,"Common"),j(),Oe(47,"app-compound-block-ui",18),gt(48,"async")),2&e){const r=ir(7);let s;V(6),U("value",n.previewFamPossibleLocations.includes(yt(8,21,n.previewFamLocation$))?yt(9,23,n.previewFamLocation$):"custom"),V(4),U("ngForOf",n.previewFamPossibleLocations),V(3),U("ngIf","custom"==r.value),V(1),U("ngIf",yt(15,25,n.previewFamLoading$)),V(7),U("ngIf",yt(22,27,n.previewLoading$)),V(7),U("min",0)("max",4*(null==(s=yt(29,29,n._resource$))?null:s.data.num_chunks)-1)("ngModel",yt(30,31,n.selectedSplineIndex$)),V(3),U("roadSpline",n.roadSpline)("pointer",yt(32,33,n.pointer$))("splineClosed",!n.isOpenedTrack)("projection","nz"),V(4),U("resource",yt(36,35,n.selectedSplineItem$))("hideBlockActions",!0),V(4),U("resource",yt(40,37,n.selectedAiInfoItem$))("hideBlockActions",!0),V(4),U("resource",yt(44,39,n.selectedTerrainItem$))("hideBlockActions",!0),V(4),U("resource",yt(48,41,n._resource$))("hideBlockActions",!0)("fieldWhitelist",ro(43,Kpe))}},dependencies:[oo,vi,Wl,Uh,jc,Gh,Hh,fu,ql,qo,Yc,$M,db,Fm,XS,Wc,Gpe,Ea],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-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})();const c$=i=>new Promise(t=>setTimeout(t,i)),d$=(i,t,e=null)=>{const n=document.createElement("canvas"),r=n.getContext("2d",{willReadFrequently:!0}),s=i.width,o=i.height;n.width=s,n.height=o,r.drawImage(i,0,0,s,o);const a=r.getImageData(0,0,s,o);for(let l=0;l{if(!(o instanceof Nn))return;let a=-1;if(o.name.startsWith("lbl__rt_frnt")?a=0:o.name.startsWith("lbl__lt_frnt")?a=1:o.name.startsWith("lbl__rt_rear")?a=2:o.name.startsWith("lbl__lt_rear")&&(a=3),a>-1){this.wheels[a]=o,a<2&&(this.frontWheels[a]=o),o.geometry.boundingBox||o.geometry.computeBoundingBox();const l=Ne.avg(o.geometry.boundingBox.min,o.geometry.boundingBox.max);o.geometry.translate(...Ne.spr(Ne.neg(l))),o.position.set(...Ne.spr(l)),this.wheelIdlePositions[a]=l}(o.name.includes("rsid")||o.name.includes("lite"))&&(r.push(o),this.originalTexWithTailLights=o.material.map)}),!this.originalTexWithTailLights)throw new Error("Not a driveable NFS1 car");this.tailLightColors=n.includes("TRAFFC.CFM")?[9509903,16711680]:[3212546,16258068],this.texWithTailLightsImg=document.createElement("img"),this.texWithTailLights=new Ro(this.texWithTailLightsImg),this.texWithTailLights.flipY=this.originalTexWithTailLights.flipY,dd(this.texWithTailLights),this.recolorTailLights(this.tailLightColors[0]).then();for(const o of r)o.material.map=this.texWithTailLights;const s=new Hg;this.tyreTextures=[1,2,3,4].map(o=>s.load(`${n}/tyr${o}.png`));for(const o of this.tyreTextures)dd(o);this.tyreMaterial=new vr({map:this.tyreTextures[0]}),this.tyreMaterial.transparent=!0,this.tyreMaterial.alphaTest=.5,this.tyreMaterial.map.wrapS=Zi,this.tyreMaterial.map.wrapT=Zi,this.tyreMaterial.polygonOffset=!0,this.tyreMaterial.polygonOffsetFactor=-4;for(const o of this.wheels)o.material=this.tyreMaterial}get tailLightsOn(){return this._tailLightsOn}set tailLightsOn(t){t!==this._tailLightsOn&&(this._tailLightsOn=t,this.recolorTailLights(this.tailLightColors[t?1:0]))}get speed(){return this._speed}set speed(t){if(t!==this._speed){switch(this._speed=t,this.tyreTextureUpdateTimer&&clearInterval(this.tyreTextureUpdateTimer),t){case"idle":this.tyreMaterial.map=this.tyreTextures[0];break;case"slow":let e=!0;this.tyreTextureUpdateTimer=setInterval(()=>{this.tyreMaterial.map=this.tyreTextures[e?1:2],this.tyreMaterial.needsUpdate=!0,e=!e},16);break;case"fast":this.tyreMaterial.map=this.tyreTextures[3]}this.tyreMaterial.needsUpdate=!0}}get steeringAngle(){return this._steeringAngle}set steeringAngle(t){if(t!==this._steeringAngle){this._steeringAngle=t;for(const e of this.frontWheels)e.rotation.set(0,0,t)}}recolorTailLights(t){var e=this;return xt(function*(){if(e.originalTexWithTailLights&&e.texWithTailLights&&e.texWithTailLightsImg){for(let n=100;n>0&&!e.originalTexWithTailLights.source.data;n--)yield c$(50);((i,t,e,n=null)=>{const[r,s,o]=[t>>16,t>>8&255,255&t],[a,l,c]=[e>>16,e>>8&255,255&e];d$(i,(d,h)=>{d[h]==r&&d[h+1]==s&&d[h+2]==o&&(d[h]=a,d[h+1]=l,d[h+2]=c)},n)})(e.originalTexWithTailLights.source.data,e.tailLightsTexColor,t,e.texWithTailLightsImg),e.texWithTailLights.needsUpdate=!0}})()}dispose(){this.texWithTailLightsImg&&(this.texWithTailLightsImg.remove(),this.texWithTailLightsImg=null),this.texWithTailLights&&(this.texWithTailLights.dispose(),this.texWithTailLights=null),this.tyreTextureUpdateTimer&&clearInterval(this.tyreTextureUpdateTimer),this.tyreMaterial&&(this.tyreMaterial.dispose(),this.tyreMaterial=null)}}let tme=(()=>{class i{constructor(e,n,r){this.eelDelegate=e,this.mainService=n,this.cdr=r,this._resource$=new at(null),this.changed=new $e,this.previewPaths$=new at(null),this.destroyed$=new Ie,this.customControls=[],this.serializerSettings={geometry__save_obj:!0,geometry__save_blend:!1,geometry__export_to_gg_web_engine:!1}}get resource(){return this._resource$.getValue()}set resource(e){this._resource$.next(e)}ngAfterViewInit(){var e=this;return xt(function*(){e._resource$.pipe(He(e.destroyed$)).subscribe(function(){var n=xt(function*(r){e.previewPaths$.next(yield e.loadPreviewFilePaths(r?.id))});return function(r){return n.apply(this,arguments)}}()),e.mainService.dataBlockChange$.pipe(He(e.destroyed$),vn(([n,r])=>!!e.resource&&n.startsWith(e.resource.id)),Vc(1500)).subscribe(xt(function*(){e.previewPaths$.next(null),e.previewPaths$.next(yield e.postTmpUpdates(e.resource?.id))}))})()}onObjectLoaded(e){var n=this;return xt(function*(){if((n._resource$.value?.id||"").includes(".CFM__"))try{const r=n.resource?.id.split("/");r.pop(),r[r.length-1]=""+(+r[r.length-1]+1);const s=yield n.eelDelegate.retrieveValue(r.join("/")+"/data"),o=s.children_aliases.findIndex(l=>"!PAL"===l);if(-1==o)throw new Error("Not a car");const a=new eme(e,s.children[o].data.colors[254]>>>8,n.previewPaths$.value[0].substring(0,n.previewPaths$.value[0].lastIndexOf("/"))+"/assets");n.customControls=[{title:"TNFS car features",controls:[{label:"Brake lights on",type:"checkbox",value:!1,change:l=>{a.tailLightsOn=l}},{label:"Car speed",type:"radio",options:["idle","slow","fast"],value:"idle",change:l=>{a.speed=l}},{label:"Steering angle",type:"slider",minValue:-.7,maxValue:.7,valueStep:.05,value:0,change:l=>{a.steeringAngle=l}}]}],n.cdr.markForCheck()}catch{}})()}postTmpUpdates(e){var n=this;return xt(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 xt(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)(E($c),E(ul),E(si))},i.\u0275cmp=st({type:i,selectors:[["app-orip-geometry-block-ui"]],inputs:{resource:"resource"},outputs:{changed:"changed"},decls:4,vars:7,consts:[[3,"paths","customControls","onObjectLoaded"],[3,"resource"]],template:function(e,n){1&e&&($(0,"app-obj-viewer",0),ke("onObjectLoaded",function(s){return n.onObjectLoaded(s)}),gt(1,"async"),j(),Oe(2,"app-compound-block-ui",1),gt(3,"async")),2&e&&(U("paths",yt(1,3,n.previewPaths$))("customControls",n.customControls),V(2),U("resource",yt(3,5,n._resource$)))},dependencies:[Wc,l$,Ea],changeDetection:0}),i})();const u$=i=>{let t=i.block_class_mro.split("__")[0];return"ArrayBlock"===t?u$(i.child_schema)+"[]":t},nme=["class","block-ui"];function ime(i,t){if(1&i&&($(0,"mat-label",7),Ve(1),j()),2&i){const e=re(2);U("matTooltip",e.resourceDescription),V(1),Xi("",null==e.resource?null:e.resource.name," ")}}function rme(i,t){if(1&i&&($(0,"mat-option",8),Ve(1),j()),2&i){const e=t.$implicit,n=t.index,r=re(2);U("value",n)("disabled",r.disabled),V(1),Xi(" ",r.blockClassStr(e)," ")}}function sme(i,t){if(1&i){const e=Kn();$r(0),fe(1,ime,2,2,"mat-label",1),gt(2,"async"),$(3,"div",2)(4,"mat-label"),Ve(5,"Resource type:"),j(),$(6,"mat-select",3),ke("selectionChange",function(r){return Ht(e),Et(re().setChoiceIndex(r.value))}),fe(7,rme,2,3,"mat-option",4),j(),Oe(8,"app-block-actions",5),j(),Oe(9,"app-editor",6),Wr()}if(2&i){const e=re();let n;V(1),U("ngIf",(null==e.resource?null:e.resource.name)&&(null==e.resource?null:e.resource.name)!=(null==(n=yt(2,8,e.main.resource$))?null:n.name)),V(5),U("value",e.resourceData.choice_index)("disabled",e.disabled),V(1),U("ngForOf",e.resource.schema.possible_resource_schemas),V(1),U("resource",e.childResource),V(1),U("resource",e.childResource)("hideBlockActions",!0)("disabled",e.disabled)}}let h$=(()=>{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 $e,this.blockClassStr=u$}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)(E(ul))},i.\u0275cmp=st({type:i,selectors:[["app-delegate",8,"block-ui"]],inputs:{resource:"resource",resourceDescription:"resourceDescription",hideBlockActions:"hideBlockActions",disabled:"disabled"},outputs:{changed:"changed"},attrs:nme,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"],[3,"resource","hideBlockActions","disabled"],["matTooltipPosition","above",3,"matTooltip"],[3,"value","disabled"]],template:function(e,n){1&e&&fe(0,sme,10,10,"ng-container",0),2&e&&U("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 ome=["class","block-ui"];function ame(i,t){if(1&i&&($(0,"mat-label",7),Ve(1),j()),2&i){const e=re(2);U("matTooltip",e.resourceDescription),V(1),Xi(" ",e.resource.name," ")}}function lme(i,t){if(1&i){const e=Kn();$r(0),fe(1,ame,2,2,"mat-label",1),$(2,"mat-selection-list",2),ke("selectionChange",function(r){return Ht(e),Et(re().onSelection(r))}),$(3,"mat-list-option",3),Ve(4," Left "),j(),$(5,"mat-list-option",4),Ve(6," Right "),j()(),$(7,"mat-form-field",5)(8,"mat-label"),Ve(9,"Texture ID"),j(),$(10,"input",6),ke("ngModelChange",function(r){return Ht(e),Et(re().resource.data.texture_id=r)})("change",function(){return Ht(e),Et(re().changed.emit())}),j()(),Wr()}if(2&i){const e=re();V(1),U("ngIf",e.resource.name),V(2),U("selected",e.resource.data.has_left_fence),V(2),U("selected",e.resource.data.has_right_fence),V(5),U("max",63)("min",0)("step",1)("ngModel",e.resource.data.texture_id)}}let cme=(()=>{class i{constructor(){this.resource=null,this.resourceDescription="",this.changed=new $e}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=st({type:i,selectors:[["app-fence-type",8,"block-ui"]],inputs:{resource:"resource",resourceDescription:"resourceDescription"},outputs:{changed:"changed"},attrs:ome,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&&fe(0,lme,11,7,"ng-container",0),2&e&&U("ngIf",n.resource)},dependencies:[vi,Wl,Uh,jc,Gh,Hh,fu,ql,qo,Yc,Os,yC,vC],changeDetection:0}),i})(),dme=(()=>{class i{constructor(){this._resource=null,this.resourceMap={},this.changed=new $e}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]=["",hl.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)(E(eb),E(mte),E(nR))},i.\u0275cmp=st({type:i,selectors:[["app-run-custom-action",8,"dialog"]],attrs:ume,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&&($(0,"h1",0),Ve(1),j(),$(2,"div",1)(3,"p"),Ve(4),j()(),$(5,"form",2),fe(6,hme,4,4,"mat-form-field",3),j(),$(7,"div",4)(8,"button",5),ke("click",function(){return n.dialogRef.close()}),Ve(9,"Cancel"),j(),$(10,"button",6),ke("click",function(){return n.submit()}),Ve(11,"Run"),j()()),2&e&&(V(1),Xi('Run action "',n.data.title,'"'),V(3),ui(n.data.description),V(1),U("formGroup",n.argsForm),V(1),U("ngForOf",n.data.args),V(4),U("disabled",n.argsForm.invalid))},dependencies:[oo,ER,Wl,jc,gR,ql,qo,Yc,$M,dV,uV,hV,Vh,cC],styles:["form[_ngcontent-%COMP%]{padding:0 24px}"]}),i})();function f$(i,t){return t?e=>wy(t.pipe(Oi(1),function pme(){return ti((i,t)=>{i.subscribe(jn(t,ms))})}()),e.pipe(f$(i))):tr((e,n)=>Mr(i(e,n)).pipe(Oi(1),$B(e)))}function p$(i,t=zy){const e=II(i,t);return f$(()=>e)}const mme=["mat-menu-item",""];function gme(i,t){1&i&&(ki(),$(0,"svg",3),Oe(1,"polygon",4),j())}const _me=[[["mat-icon"],["","matMenuItemIcon",""]],"*"],vme=["mat-icon, [matMenuItemIcon]","*"];function yme(i,t){if(1&i){const e=Kn();$(0,"div",0),ke("keydown",function(r){return Ht(e),Et(re()._handleKeydown(r))})("click",function(){return Ht(e),Et(re().closed.emit("click"))})("@transformMenu.start",function(r){return Ht(e),Et(re()._onAnimationStart(r))})("@transformMenu.done",function(r){return Ht(e),Et(re()._onAnimationDone(r))}),$(1,"div",1),Yt(2),j()()}if(2&i){const e=re();U("id",e.panelId)("ngClass",e._classList)("@transformMenu",e._panelAnimationState),Dt("aria-label",e.ariaLabel||null)("aria-labelledby",e.ariaLabelledby||null)("aria-describedby",e.ariaDescribedby||null)}}const bme=["*"],vO=new me("MAT_MENU_PANEL"),xme=HM(zM(class{}));let KS=(()=>{class i extends xme{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 Ie,this._focused=new Ie,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",Yr("120ms cubic-bezier(0, 0, 0.2, 1)",oi({opacity:1,transform:"scale(1)"}))),Or("* => void",Yr("100ms 25ms linear",oi({opacity:0})))]),fadeInItems:Ia("fadeInItems",[Ps("showing",oi({opacity:1})),Or("void => *",[oi({opacity:0}),Yr("400ms 100ms cubic-bezier(0.55, 0, 0.55, 0.2)")])])};let Mme=0;const m$=new me("mat-menu-default-options",{providedIn:"root",factory:function Cme(){return{overlapTrigger:!1,xPosition:"after",yPosition:"below",backdropClass:"cdk-overlay-transparent-backdrop"}}});let Kb=(()=>{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=tn(e)}get hasBackdrop(){return this._hasBackdrop}set hasBackdrop(e){this._hasBackdrop=tn(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 rm,this._classList={},this._panelAnimationState="void",this._animationDone=new Ie,this.overlayPanelClass=this._defaultOptions.overlayPanelClass||"",this.backdropClass=this._defaultOptions.backdropClass,this._overlapTrigger=this._defaultOptions.overlapTrigger,this._hasBackdrop=this._defaultOptions.hasBackdrop,this.closed=new $e,this.close=this.closed,this.panelId="mat-menu-panel-"+Mme++}ngOnInit(){this.setPositionClasses()}ngAfterContentInit(){this._updateDirectDescendants(),this._keyManager=new DU(this._directDescendantItems).withWrap().withTypeAhead().withHomeAndEnd(),this._keyManager.tabOut.subscribe(()=>this.closed.emit("tab")),this._directDescendantItems.changes.pipe(Eo(this._directDescendantItems),Rs(e=>Cr(...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(Eo(this._directDescendantItems),Rs(n=>Cr(...n.map(r=>r._hovered))))}addItem(e){}removeItem(e){}_handleKeydown(e){const n=e.keyCode,r=this._keyManager;switch(n){case 27:Yo(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(Oi(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(Eo(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)(E(mt),E(ft),E(m$),E(si))},i.\u0275dir=ve({type:i,contentQueries:function(e,n,r){if(1&e&&(Wi(r,wme,5),Wi(r,KS,5),Wi(r,KS,4)),2&e){let s;Tt(s=It())&&(n.lazyContent=s.first),Tt(s=It())&&(n._allItems=s),Tt(s=It())&&(n.items=s)}},viewQuery:function(e,n){if(1&e&&Zn(Co,5),2&e){let r;Tt(r=It())&&(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})(),Sme=(()=>{class i extends Kb{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)(E(mt),E(ft),E(m$),E(si))},i.\u0275cmp=st({type:i,selectors:[["mat-menu"]],hostVars:3,hostBindings:function(e,n){2&e&&Dt("aria-label",null)("aria-labelledby",null)("aria-describedby",null)},exportAs:["matMenu"],features:[An([{provide:vO,useExisting:i}]),lt],ngContentSelectors:bme,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&&(rr(),fe(0,yme,3,6,"ng-template"))},dependencies:[dm],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:[ZS.transformMenu,ZS.fadeInItems]},changeDetection:0}),i})();const g$=new me("mat-menu-scroll-strategy"),Ame={provide:g$,deps:[as],useFactory:function Eme(i){return()=>i.scrollStrategies.reposition()}},_$=Ih({passive:!0});let Dme=(()=>{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,d){this._overlay=e,this._element=n,this._viewContainerRef=r,this._menuItemInstance=a,this._dir=l,this._focusMonitor=c,this._ngZone=d,this._overlayRef=null,this._menuOpen=!1,this._closingActionsSubscription=Qt.EMPTY,this._hoverSubscription=Qt.EMPTY,this._menuCloseSubscription=Qt.EMPTY,this._changeDetectorRef=Lt(si),this._handleTouchStart=h=>{$I(h)||(this._openedBy="touch")},this._openedBy=void 0,this.restoreFocus=!0,this.menuOpened=new $e,this.onMenuOpen=this.menuOpened,this.menuClosed=new $e,this.onMenuClose=this.menuClosed,this._scrollStrategy=s,this._parentMaterialMenu=o instanceof Kb?o:void 0,n.nativeElement.addEventListener("touchstart",this._handleTouchStart,_$)}ngAfterContentInit(){this._handleHover()}ngOnDestroy(){this._overlayRef&&(this._overlayRef.dispose(),this._overlayRef=null),this._element.nativeElement.removeEventListener("touchstart",this._handleTouchStart,_$),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 Kb&&(e._startAnimation(),e._directDescendantItems.changes.pipe(He(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 Kb?(n._resetAnimation(),n.lazyContent?n._animationDone.pipe(vn(r=>"void"===r.toState),Oi(1),He(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 Im({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],[d,h]=[r,s],p=0;if(this.triggersSubmenu()){if(h=r="before"===e.xPosition?"start":"end",s=d="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:d,overlayY:o,offsetY:p},{originX:s,originY:l,overlayX:h,overlayY:o,offsetY:p},{originX:r,originY:c,overlayX:d,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 Cr(e,this._parentMaterialMenu?this._parentMaterialMenu.closed:ht(),this._parentMaterialMenu?this._parentMaterialMenu._hovered().pipe(vn(o=>o!==this._menuItemInstance),vn(()=>this._menuOpen)):ht(),n)}_handleMousedown(e){GI(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(vn(e=>e===this._menuItemInstance&&!e.disabled),p$(0,TI)).subscribe(()=>{this._openedBy="mouse",this.menu instanceof Kb&&this.menu._isAnimating?this.menu._animationDone.pipe(Oi(1),p$(0,TI),He(this._parentMaterialMenu._hovered())).subscribe(()=>this.openMenu()):this.openMenu()}))}_getPortal(e){return(!this._portal||this._portal.templateRef!==e.templateRef)&&(this._portal=new Cm(e.templateRef,this._viewContainerRef)),this._portal}}return i.\u0275fac=function(e){return new(e||i)(E(as),E(mt),E(jr),E(g$),E(vO,8),E(KS,10),E(Ta,8),E(Hc),E(ft))},i.\u0275dir=ve({type:i,hostVars:3,hostBindings:function(e,n){1&e&&ke("click",function(s){return n._handleClick(s)})("mousedown",function(s){return n._handleMousedown(s)})("keydown",function(s){return n._handleKeydown(s)}),2&e&&Dt("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})(),Tme=(()=>{class i extends Dme{}return i.\u0275fac=function(){let t;return function(n){return(t||(t=ri(i)))(n||i)}}(),i.\u0275dir=ve({type:i,selectors:[["","mat-menu-trigger-for",""],["","matMenuTriggerFor",""]],hostAttrs:[1,"mat-mdc-menu-trigger"],exportAs:["matMenuTrigger"],features:[lt]}),i})(),Ime=(()=>{class i{}return i.\u0275fac=function(e){return new(e||i)},i.\u0275mod=en({type:i}),i.\u0275inj=Wt({providers:[Ame],imports:[ao,Qy,Qn,Rm,Yy,Qn]}),i})();function Rme(i,t){if(1&i){const e=Kn();$(0,"button",7),ke("click",function(){return Ht(e),Et(re(2).deserialize())}),Oe(1,"mat-icon",8),j()}}function kme(i,t){if(1&i){const e=Kn();$r(0),fe(1,Rme,2,0,"button",4),$(2,"button",5),ke("click",function(){return Ht(e),Et(re().serializeBlockReversible())}),Oe(3,"mat-icon",6),j(),Wr()}if(2&i){const e=re();V(1),U("ngIf",e.isInReversibleSerializationState),V(1),U("disabled",e.isInReversibleSerializationState)}}function Pme(i,t){1&i&&($(0,"button",9),Oe(1,"mat-icon",10),j()),2&i&&(re(),U("matMenuTriggerFor",ir(3)))}function Ome(i,t){if(1&i){const e=Kn();$(0,"button",11),ke("click",function(){const s=Ht(e).$implicit;return Et(re().runCustomAction(s))}),$(1,"span"),Ve(2),j()()}if(2&i){const e=t.$implicit;V(2),ui(e.title)}}const Fme=function(){return[]};let QS=(()=>{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 xt(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)(E(ul),E($c),E(si),E(Lm),E(AV))},i.\u0275cmp=st({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&&(fe(0,kme,4,2,"ng-container",0),fe(1,Pme,2,1,"button",1),$(2,"mat-menu",null,2),fe(4,Ome,3,1,"button",3),j()),2&e&&(U("ngIf",null==n.resource||null==n.resource.schema?null:n.resource.schema.serializable_to_disc),V(1),U("ngIf",(null==n.resource||null==n.resource.schema.custom_actions?null:n.resource.schema.custom_actions.length)>0),V(3),U("ngForOf",(null==n.resource?null:n.resource.schema.custom_actions)||ro(3,Fme)))},dependencies:[oo,vi,Os,WM,hR,Sme,KS,Tme],styles:["[_nghost-%COMP%]{display:flex}"]}),i})();const Lme=["class","block-ui"];function Nme(i,t){if(1&i&&($(0,"mat-label",7),Ve(1),j()),2&i){const e=re();U("matTooltip",e.resourceDescription),V(1),Xi("",null==e.resource?null:e.resource.name," ")}}function Bme(i,t){if(1&i&&($(0,"audio",8),Oe(1,"source",9),gt(2,"async"),Ve(3," Your browser does not support the audio element. "),j()),2&i){const e=re();V(1),U("src",yt(2,1,e.audioUrl$),Fp)}}function Ume(i,t){1&i&&Oe(0,"mat-spinner",10)}function Vme(i,t){1&i&&Oe(0,"app-block-actions",11),2&i&&U("resource",re().resource)}const zme=function(){return["wave_data"]};let Hme=(()=>{class i{constructor(e,n){this.eelDelegate=e,this.main=n,this._resource$=new at(null),this.audioUrl$=new at(null),this.resourceDescription="",this.hideBlockActions=!1,this.destroyed$=new Ie,this.changed=new $e}set resource(e){this._resource$.next(e)}get resource(){return this._resource$.getValue()}ngAfterViewInit(){var e=this;return xt(function*(){e._resource$.pipe(He(e.destroyed$)).subscribe(function(){var n=xt(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)(E($c),E(ul))},i.\u0275cmp=st({type:i,selectors:[["app-eacs-audio",8,"block-ui"]],inputs:{resource:"resource",resourceDescription:"resourceDescription",hideBlockActions:"hideBlockActions"},outputs:{changed:"changed"},attrs:Lme,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&&($(0,"div",0),fe(1,Nme,2,2,"mat-label",1),gt(2,"async"),fe(3,Bme,4,3,"audio",2),gt(4,"async"),fe(5,Ume,1,0,"mat-spinner",3),gt(6,"async"),Oe(7,"div",4),fe(8,Vme,1,1,"app-block-actions",5),j(),Oe(9,"app-compound-block-ui",6),gt(10,"async")),2&e){let r;V(1),U("ngIf",(null==n.resource?null:n.resource.name)&&(null==n.resource?null:n.resource.name)!=(null==(r=yt(2,7,n.main.resource$))?null:r.name)),V(2),U("ngIf",yt(4,9,n.audioUrl$)),V(2),U("ngIf",n.resource&&!yt(6,11,n.audioUrl$)),V(3),U("ngIf",!n.hideBlockActions),V(1),U("resource",yt(10,13,n._resource$))("hideBlockActions",!0)("fieldBlacklist",ro(15,zme))}},dependencies:[vi,qo,Os,XS,Wc,QS,Ea],styles:["#header[_ngcontent-%COMP%]{display:flex}"]}),i})();class Gme{constructor(t,e){this.mesh=t,this.assetsPath=e,this.textures=[],this.tyreTextureUpdateTimer=void 0,this.tyreMaterial=null,this.tyreTextures=[],this._color=65280,this._speed="idle",this._steeringAngle=0,this.wheels=[],this.wheelIdlePositions=[],this.frontWheels=[];let n=new Set;if(t.traverse(r=>{if(!(r instanceof Nn))return;let s=-1;if(r.name.startsWith("part_hp_12")?s=0:r.name.startsWith("part_hp_14")?s=1:r.name.startsWith("part_hp_16")?s=2:r.name.startsWith("part_hp_18")&&(s=3),s>-1){r.geometry.boundingBox||r.geometry.computeBoundingBox();let a=Ne.avg(r.geometry.boundingBox.min,r.geometry.boundingBox.max);return(0==s||2==s)&&(a={x:a.x,y:a.y,z:a.z+1.5}),r.geometry.translate(...Ne.spr(Ne.neg(a))),r.position.set(...Ne.spr(a)),this.wheelIdlePositions[s]=a,this.wheels.push(r),void(s<2&&this.frontWheels.push(r))}const o=r.material.map;o&&n.add(o)}),this.textures=Array.from(n).map(r=>{const s=new Ro(document.createElement("img"));return s.flipY=r.flipY,dd(s),[r,s]}),t.traverse(r=>{if(!(r instanceof Nn))return;const s=r.material.map;if(s){const o=this.textures.find(([a,l])=>a===s);o&&(r.material.map=o[1])}}),this.hasWheels){const r=new Hg;this.tyreTextures=[0,1,2,3].map(s=>r.load(`${e}/m${s}00.png`));for(const s of this.tyreTextures)dd(s);this.tyreMaterial=new vr({map:this.tyreTextures[0]}),this.tyreMaterial.transparent=!0,this.tyreMaterial.alphaTest=.5,this.tyreMaterial.map.wrapS=Zi,this.tyreMaterial.map.wrapT=Zi,this.tyreMaterial.polygonOffset=!0,this.tyreMaterial.polygonOffsetFactor=-4;for(const s of this.wheels)s.material=this.tyreMaterial}this.color=65280,this.recolorCar().then()}get color(){return this._color}set color(t){t!==this._color&&(this._color=t,this.recolorCar().then())}get speed(){return this._speed}set speed(t){if(t!==this._speed){switch(this._speed=t,this.tyreTextureUpdateTimer&&clearInterval(this.tyreTextureUpdateTimer),t){case"idle":this.tyreMaterial.map=this.tyreTextures[0];break;case"slow":let e=!0;this.tyreTextureUpdateTimer=setInterval(()=>{this.tyreMaterial.map=this.tyreTextures[e?1:2],this.tyreMaterial.needsUpdate=!0,e=!e},16);break;case"fast":this.tyreMaterial.map=this.tyreTextures[3]}this.tyreMaterial.needsUpdate=!0}}get steeringAngle(){return this._steeringAngle}set steeringAngle(t){if(t!==this._steeringAngle){this._steeringAngle=t;for(const e of this.frontWheels)e.rotation.set(0,0,t)}}get hasWheels(){return this.wheels.length>0}recolorCar(){var t=this;return xt(function*(){const[e,n,r]=[t.color>>16,t.color>>8&255,255&t.color];for(const[s,o]of t.textures){for(let a=100;a>0&&!s.source.data;a--)yield c$(50);d$(s.source.data,(a,l)=>{if(a[l]+a[l+2]{class i{constructor(e,n,r){this.eelDelegate=e,this.main=n,this.cdr=r,this._resource$=new at(null),this.changed=new $e,this.customControls=[],this.previewPaths$=new at(null),this.destroyed$=new Ie,this.serializerSettings={geometry__save_obj:!0,geometry__save_blend:!1,geometry__export_to_gg_web_engine:!1}}get resource(){return this._resource$.getValue()}set resource(e){this._resource$.next(e)}ngAfterViewInit(){var e=this;return xt(function*(){e._resource$.pipe(He(e.destroyed$)).subscribe(function(){var n=xt(function*(r){e.previewPaths$.next(yield e.loadPreviewFilePaths(r?.id))});return function(r){return n.apply(this,arguments)}}()),e.main.dataBlockChange$.pipe(He(e.destroyed$),vn(([n,r])=>!!e.resource&&n.startsWith(e.resource.id)),Vc(1500)).subscribe(xt(function*(){e.previewPaths$.next(null),e.previewPaths$.next(yield e.postTmpUpdates(e.resource?.id))}))})()}onObjectLoaded(e){var n=this;return xt(function*(){try{const r=new Gme(e,n.previewPaths$.value[0].substring(0,n.previewPaths$.value[0].lastIndexOf("/"))+"/assets");let s=null;const o=a=>{s&&clearTimeout(s),s=setTimeout(()=>r.color=a,50)};n.customControls=[{title:"NFS2 car features",controls:[{label:"Car color",type:"color",value:65280,change:a=>o(a)}]}],r.hasWheels&&n.customControls[0].controls.push({label:"Car speed",type:"radio",options:["idle","slow","fast"],value:"idle",change:a=>{r.speed=a}},{label:"Steering angle",type:"slider",minValue:-.7,maxValue:.7,valueStep:.05,value:0,change:a=>{r.steeringAngle=a}}),n.cdr.markForCheck()}catch(r){console.error(r)}})()}postTmpUpdates(e){var n=this;return xt(function*(){if(e){const r=yield n.eelDelegate.serializeResourceTmp(e,Object.entries(n.main.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 xt(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)(E($c),E(ul),E(si))},i.\u0275cmp=st({type:i,selectors:[["app-geo-geometry",8,"block-ui"]],inputs:{resource:"resource"},outputs:{changed:"changed"},attrs:$me,decls:4,vars:8,consts:[[3,"paths","groupFunction","customControls","onObjectLoaded"],[3,"resource",4,"ngIf"],[3,"resource"]],template:function(e,n){1&e&&($(0,"app-obj-viewer",0),ke("onObjectLoaded",function(s){return n.onObjectLoaded(s)}),gt(1,"async"),j(),fe(2,Wme,2,3,"app-compound-block-ui",1),gt(3,"async")),2&e&&(U("paths",yt(1,4,n.previewPaths$))("groupFunction",n.previewObjectGroupFunc)("customControls",n.customControls),V(2),U("ngIf",!yt(3,6,n.main.hideHiddenFields$)))},dependencies:[vi,Wc,l$,Ea],changeDetection:0}),i})();const Yme=function(){return["children","items_descr"]};let qme=(()=>{class i{constructor(){this._resource=null,this.hideBlockActions=!1,this.resourceMap={},this.changed=new $e}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=st({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&&Oe(0,"app-compound-block-ui",0)(1,"app-sidenav-res-list",1),2&e&&(U("resource",n.resource)("hideBlockActions",n.hideBlockActions)("fieldBlacklist",ro(4,Yme)),V(1),U("resources",n.resourceMap))},dependencies:[Wc,_C],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 Xme(i,t){if(1&i&&($(0,"mat-error"),Ve(1),j()),2&i){const e=re(2);V(1),Mh(" ",e.resourceError.data.error_class,": ",e.resourceError.data.error_text," ")}}function Kme(i,t){1&i&&Oe(0,"mat-spinner",5)}function Zme(i,t){if(1&i&&($(0,"div",2),fe(1,Xme,2,2,"mat-error",3),fe(2,Kme,1,0,"mat-spinner",4),j()),2&i){const e=re();V(1),U("ngIf",e.resourceError),V(1),U("ngIf",!e.resourceError)}}function Qme(i,t){}let Zb=(()=>{class i{constructor(e,n){this.mainService=e,this.deep=n,this._component=null,this._componentChangedSub=null,this.destroyed$=new Ie,this.resourceSet$=new Ie,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)}resourceEqual(e,n){return e&&n?e.id===n.id&&this.deep.deepEquals(e.data,n.data):!e==!n}set resource(e){if(!this.resourceEqual(e,this._resourceError||this._resource)&&(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(He(this.destroyed$),He(this.resourceSet$)).subscribe(()=>{const s=this._resource.id,o=this._resource.data;if(o instanceof Array)if(this._resource.schema.block_class_mro.startsWith("BytesBlock"))this.mainService.dataBlockChange$.next([s,o]);else 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 Jme(i,t){1&i&&Oe(0,"mat-icon",17)}function ege(i,t){1&i&&Oe(0,"mat-icon",18)}let tge=(()=>{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 xt(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 xt(function*(){if(e.mainService.hasUnsavedChanges){let n=e.dialog.open(xV,{data:{text:"There are unsaved changes, which will be lost. Are you sure you want to reload file?"}});if(!(yield rR(n.afterClosed())))return}yield e.mainService.reloadResource(),e.cdr.markForCheck()})()}}return i.\u0275fac=function(e){return new(e||i)(E($c),E(ul),E(Lm),E(AV),E(si))},i.\u0275cmp=st({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&&($(0,"mat-toolbar",0)(1,"span"),Ve(2),gt(3,"async"),gt(4,"async"),j(),Oe(5,"span",1),$(6,"button",2),ke("click",function(){return n.toggleUnknownsVisibility()}),fe(7,Jme,1,0,"mat-icon",3),gt(8,"async"),fe(9,ege,1,0,"mat-icon",4),gt(10,"async"),j(),Oe(11,"mat-divider",5)(12,"app-block-actions",6),gt(13,"async"),$(14,"button",7),ke("click",function(){return n.reloadResource()}),gt(15,"async"),Oe(16,"mat-icon",8),j(),Oe(17,"mat-divider",5),$(18,"button",9),ke("click",function(){return n.saveResource()}),gt(19,"async"),gt(20,"async"),Oe(21,"mat-icon",10),j()(),$(22,"div",11),Oe(23,"div",12)(24,"app-editor",13),gt(25,"async"),gt(26,"async"),gt(27,"async"),$(28,"div",14)(29,"a",15),Oe(30,"img",16),j()(),Oe(31,"div",12),j()),2&e){let r;V(2),Mh("",(null==(r=yt(3,9,n.mainService.resource$))?null:r.name)||"...","",yt(4,11,n.mainService.hasUnsavedChanges$)?"*":"",""),V(5),U("ngIf",yt(8,13,n.mainService.hideHiddenFields$)),V(2),U("ngIf",!yt(10,15,n.mainService.hideHiddenFields$)),V(3),U("resource",yt(13,17,n.mainService.resource$)),V(2),U("disabled",!yt(15,19,n.mainService.eelDelegate.openedResourcePath$)),V(4),U("disabled",!yt(19,21,n.mainService.resource$)||!yt(20,23,n.mainService.hasUnsavedChanges$)),V(6),U("resource",yt(25,25,n.mainService.customActionRunning$)?null:yt(26,27,n.mainService.resource$)||yt(27,29,n.mainService.error$))("hideBlockActions",!0)}},dependencies:[vi,yJ,xJ,Os,WM,hR,Zb,QS,Ea],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 v$(i){return new pe(3e3,!1)}function Lge(){return typeof window<"u"&&typeof window.document<"u"}function yO(){return typeof process<"u"&&"[object process]"==={}.toString.call(process)}function ku(i){switch(i.length){case 0:return new Jy;case 1:return i[0];default:return new iV(i)}}function y$(i,t,e,n,r=new Map,s=new Map){const o=[],a=[];let l=-1,c=null;if(n.forEach(d=>{const h=d.get("offset"),p=h==l,m=p&&c||new Map;d.forEach((g,b)=>{let v=b,y=g;if("offset"!==b)switch(v=t.normalizePropertyName(v,o),y){case eR:y=r.get(b);break;case Gc: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 Cge(i){return new pe(3502,!1)}();return a}function bO(i,t,e,n){switch(t){case"start":i.onStart(()=>n(e&&xO(e,"start",i)));break;case"done":i.onDone(()=>n(e&&xO(e,"done",i)));break;case"destroy":i.onDestroy(()=>n(e&&xO(e,"destroy",i)))}}function xO(i,t,e){const s=wO(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 wO(i,t,e,n,r="",s=0,o){return{element:i,triggerName:t,fromState:e,toState:n,phaseName:r,totalTime:s,disabled:!!o}}function na(i,t,e){let n=i.get(t);return n||i.set(t,n=e),n}function b$(i){const t=i.indexOf(":");return[i.substring(1,t),i.slice(t+1)]}let MO=(i,t)=>!1,x$=(i,t,e)=>[],w$=null;function CO(i){const t=i.parentNode||i.host;return t===w$?null:t}(yO()||typeof Element<"u")&&(Lge()?(w$=(()=>document.documentElement)(),MO=(i,t)=>{for(;t;){if(t===i)return!0;t=CO(t)}return!1}):MO=(i,t)=>i.contains(t),x$=(i,t,e)=>{if(e)return Array.from(i.querySelectorAll(t));const n=i.querySelector(t);return n?[n]:[]});let Df=null,M$=!1;const C$=MO,S$=x$;let E$=(()=>{class i{validateStyleProperty(e){return function Bge(i){Df||(Df=function Uge(){return typeof document<"u"?document.body:null}()||{},M$=!!Df.style&&"WebkitAppearance"in Df.style);let t=!0;return Df.style&&!function Nge(i){return"ebkit"==i.substring(1,6)}(i)&&(t=i in Df.style,!t&&M$&&(t="Webkit"+i.charAt(0).toUpperCase()+i.slice(1)in Df.style)),t}(e)}matchesElement(e,n){return!1}containsElement(e,n){return C$(e,n)}getParentElement(e){return CO(e)}query(e,n,r){return S$(e,n,r)}computeStyle(e,n,r){return r||""}animate(e,n,r,s,o,a=[],l){return new Jy(r,s)}}return i.\u0275fac=function(e){return new(e||i)},i.\u0275prov=Re({token:i,factory:i.\u0275fac}),i})(),SO=(()=>{class i{}return i.NOOP=new E$,i})();const Vge=1e3,EO="ng-enter",JS="ng-leave",eE="ng-trigger",tE=".ng-trigger",D$="ng-animating",AO=".ng-animating";function ud(i){if("number"==typeof i)return i;const t=i.match(/^(-?[\.\d]+)(m?s)/);return!t||t.length<2?0:DO(parseFloat(t[1]),t[2])}function DO(i,t){return"s"===t?i*Vge:i}function nE(i,t,e){return i.hasOwnProperty("duration")?i:function Hge(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(v$()),{duration:0,delay:0,easing:""};r=DO(parseFloat(a[1]),a[2]);const l=a[3];null!=l&&(s=DO(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 nge(){return new pe(3100,!1)}()),a=!0),s<0&&(t.push(function ige(){return new pe(3101,!1)}()),a=!0),a&&t.splice(l,0,v$())}return{duration:r,delay:s,easing:o}}(i,t,e)}function Qb(i,t={}){return Object.keys(i).forEach(e=>{t[e]=i[e]}),t}function T$(i){const t=new Map;return Object.keys(i).forEach(e=>{t.set(e,i[e])}),t}function Pu(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 R$(i,t,e){return e?t+":"+e+";":""}function k$(i){let t="";for(let e=0;e{const s=IO(r);e&&!e.has(r)&&e.set(r,i.style[s]),i.style[s]=n}),yO()&&k$(i))}function Tf(i,t){i.style&&(t.forEach((e,n)=>{const r=IO(n);i.style[r]=""}),yO()&&k$(i))}function Jb(i){return Array.isArray(i)?1==i.length?i[0]:eV(i):i}const TO=new RegExp("{{\\s*(.+?)\\s*}}","g");function P$(i){let t=[];if("string"==typeof i){let e;for(;e=TO.exec(i);)t.push(e[1]);TO.lastIndex=0}return t}function e0(i,t,e){const n=i.toString(),r=n.replace(TO,(s,o)=>{let a=t[o];return null==a&&(e.push(function sge(i){return new pe(3003,!1)}()),a=""),a.toString()});return r==n?i:r}function iE(i){const t=[];let e=i.next();for(;!e.done;)t.push(e.value),e=i.next();return t}const Wge=/-+([a-z0-9])/g;function IO(i){return i.replace(Wge,(...t)=>t[1].toUpperCase())}function jge(i){return i.replace(/([a-z])([A-Z])/g,"$1-$2").toLowerCase()}function ia(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 oge(i){return new pe(3004,!1)}()}}function O$(i,t){return window.getComputedStyle(i)[t]}const oE="*";function Qge(i,t){const e=[];return"string"==typeof i?i.split(/\s*,\s*/).forEach(n=>function Jge(i,t,e){if(":"==i[0]){const l=function e_e(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 yge(i){return new pe(3015,!1)}()),t;const r=n[1],s=n[2],o=n[3];t.push(F$(r,o));"<"==s[0]&&!(r==oE&&o==oE)&&t.push(F$(o,r))}(n,e,t)):e.push(i),e}const aE=new Set(["true","1"]),lE=new Set(["false","0"]);function F$(i,t){const e=aE.has(i)||lE.has(i),n=aE.has(t)||lE.has(t);return(r,s)=>{let o=i==oE||i==r,a=t==oE||t==s;return!o&&e&&"boolean"==typeof r&&(o=r?aE.has(i):lE.has(i)),!a&&n&&"boolean"==typeof s&&(a=s?aE.has(t):lE.has(t)),o&&a}}const t_e=new RegExp("s*:selfs*,?","g");function RO(i,t,e,n){return new n_e(i).build(t,e,n)}class n_e{constructor(t){this._driver=t}build(t,e,n){const r=new s_e(e);return this._resetContextStyleTimingState(r),ia(this,Jb(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 lge(){return new pe(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(d=>{l.name=d,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 cge(){return new pe(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=>{P$(l).forEach(c=>{o.hasOwnProperty(c)||s.add(c)})})}),s.size&&(iE(s.values()),e.errors.push(function dge(i,t){return new pe(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=ia(this,Jb(t.animation),e);return{type:1,matchers:Qge(t.expr,e.errors),animation:n,queryCount:e.queryCount,depCount:e.depCount,options:If(t.options)}}visitSequence(t,e){return{type:2,steps:t.steps.map(n=>ia(this,n,e)),options:If(t.options)}}visitGroup(t,e){const n=e.currentTime;let r=0;const s=t.steps.map(o=>{e.currentTime=n;const a=ia(this,o,e);return r=Math.max(r,e.currentTime),a});return e.currentTime=r,{type:3,steps:s,options:If(t.options)}}visitAnimate(t,e){const n=function a_e(i,t){if(i.hasOwnProperty("duration"))return i;if("number"==typeof i)return kO(nE(i,t).duration,0,"");const e=i;if(e.split(/\s+/).some(s=>"{"==s.charAt(0)&&"{"==s.charAt(1))){const s=kO(0,0,"");return s.dynamic=!0,s.strValue=e,s}const r=nE(e,t);return kO(r.duration,r.delay,r.easing)}(t.timings,e.errors);e.currentAnimateTimings=n;let r,s=t.styles?t.styles:oi({});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=oi(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===Gc?n.push(a):e.errors.push(new pe(3002,!1)):n.push(T$(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),d=c.get(l);let h=!0;d&&(s!=r&&s>=d.startTime&&r<=d.endTime&&(e.errors.push(function hge(i,t,e,n,r){return new pe(3010,!1)}()),h=!1),s=d.startTime),h&&c.set(l,{startTime:s,endTime:r}),e.options&&function $ge(i,t,e){const n=t.params||{},r=P$(i);r.length&&r.forEach(s=>{n.hasOwnProperty(s)||e.push(function rge(i){return new pe(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 fge(){return new pe(3011,!1)}()),n;let s=0;const o=[];let a=!1,l=!1,c=0;const d=t.steps.map(y=>{const M=this._makeStyleAst(y,e);let x=null!=M.offset?M.offset:function o_e(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:ia(this,Jb(t.animation),e),options:If(t.options)}}visitAnimateChild(t,e){return e.depCount++,{type:9,options:If(t.options)}}visitAnimateRef(t,e){return{type:10,animation:this.visitReference(t.animation,e),options:If(t.options)}}visitQuery(t,e){const n=e.currentQuerySelector,r=t.options||{};e.queryCount++,e.currentQuery=t;const[s,o]=function i_e(i){const t=!!i.split(/\s*,\s*/).find(e=>":self"==e);return t&&(i=i.replace(t_e,"")),i=i.replace(/@\*/g,tE).replace(/@\w+/g,e=>tE+"-"+e.slice(1)).replace(/:animating/g,AO),[i,t]}(t.selector);e.currentQuerySelector=n.length?n+" "+s:s,na(e.collectedStyles,e.currentQuerySelector,new Map);const a=ia(this,Jb(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:If(t.options)}}visitStagger(t,e){e.currentQuery||e.errors.push(function _ge(){return new pe(3013,!1)}());const n="full"===t.timings?{duration:0,delay:0,easing:"full"}:nE(t.timings,e.errors,!0);return{type:12,animation:ia(this,Jb(t.animation),e),timings:n,options:null}}}class s_e{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 If(i){return i?(i=Qb(i)).params&&(i.params=function r_e(i){return i?Qb(i):null}(i.params)):i={},i}function kO(i,t,e){return{duration:i,delay:t,easing:e}}function PO(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 cE{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 d_e=new RegExp(":enter","g"),h_e=new RegExp(":leave","g");function OO(i,t,e,n,r,s=new Map,o=new Map,a,l,c=[]){return(new f_e).buildKeyframes(i,t,e,n,r,s,o,a,l,c)}class f_e{buildKeyframes(t,e,n,r,s,o,a,l,c,d=[]){c=c||new cE;const h=new FO(t,e,c,r,s,d,[]);h.options=l;const p=l.delay?ud(l.delay):0;h.currentTimeline.delayNextStep(p),h.currentTimeline.setStyles([o],null,h.errors,l),ia(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()):[PO(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:ud(e0(s,r?.params??{},e.errors));n.delayNextStep(o)}}}_visitSubInstructions(t,e,n){let s=e.currentTimeline.currentTime;const o=null!=n.duration?ud(n.duration):null,a=null!=n.delay?ud(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),ia(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=dE);const o=ud(s.delay);r.delayNextStep(o)}t.steps.length&&(t.steps.forEach(o=>ia(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?ud(t.options.delay):0;t.steps.forEach(o=>{const a=e.createSubContext(t.options);s&&a.delayNextStep(s),ia(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 nE(e.params?e0(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?ud(r.delay):0;s&&(6===e.previousNode.type||0==n&&e.currentTimeline.hasCurrentStyleProperties())&&(e.currentTimeline.snapshotCurrentStyles(),e.previousNode=dE);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,d)=>{e.currentQueryIndex=d;const h=e.createSubContext(t.options,c);s&&h.delayNextStep(s),c===e.element&&(l=h.currentTimeline),ia(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 d=e.currentTimeline;l&&d.delayNextStep(l);const h=d.currentTime;ia(this,t.animation,e),e.previousNode=t,n.currentStaggerTime=r.currentTime-h+(r.startTime-n.currentTimeline.startTime)}}const dE={};class FO{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=dE,this.subContextCount=0,this.options={},this.currentQueryIndex=0,this.currentQueryTotal=0,this.currentStaggerTime=0,this.currentTimeline=l||new uE(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=ud(n.duration)),null!=n.delay&&(r.delay=ud(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]=e0(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 FO(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=dE,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 p_e(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(d_e,"."+this._enterClassName)).replace(h_e,"."+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 vge(i){return new pe(3014,!1)}()),a}}class uE{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 uE(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||Gc),this._currentKeyframe.set(e,Gc);this._currentEmptyStepKeyframe=this._currentKeyframe}setStyles(t,e,n,r){e&&this._previousKeyframe.set("easing",e);const s=r&&r.params||{},o=function m_e(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,Gc)}else Pu(r,e)}),e}(t,this._globalTimelineStyles);for(let[a,l]of o){const c=e0(l,s,n);this._pendingStyles.set(a,c),this._localTimelineStyles.has(a)||this._backFill.set(a,this._globalTimelineStyles.get(a)??Gc),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=Pu(a,new Map,this._backFill);c.forEach((d,h)=>{d===eR?t.add(h):d===Gc&&e.add(h)}),n||c.set("offset",l/this.duration),r.push(c)});const s=t.size?iE(t.values()):[],o=e.size?iE(e.values()):[];if(n){const a=r[0],l=new Map(a);a.set("offset",0),l.set("offset",1),r=[a,l]}return PO(this.element,r,s,o,this.duration,this.startTime,this.easing,!1)}}class p_e extends uE{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=Pu(t[0]);l.set("offset",0),s.push(l);const c=Pu(t[0]);c.set("offset",B$(a)),s.push(c);const d=t.length-1;for(let h=1;h<=d;h++){let p=Pu(t[h]);const m=p.get("offset");p.set("offset",B$((e+m*n)/o)),s.push(p)}n=o,e=0,r="",t=s}return PO(this.element,t,this.preStyleProps,this.postStyleProps,n,e,r,!0)}}function B$(i,t=3){const e=Math.pow(10,t-1);return Math.round(i*e)/e}class LO{}const g_e=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 __e extends LO{normalizePropertyName(t,e){return IO(t)}normalizeStyleValue(t,e,n,r){let s="";const o=n.toString().trim();if(g_e.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 age(i,t){return new pe(3005,!1)}())}return o+s}}function U$(i,t,e,n,r,s,o,a,l,c,d,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:d,totalTime:h,errors:p}}const NO={};class V${constructor(t,e,n){this._triggerName=t,this.ast=e,this._stateStyles=n}match(t,e,n,r){return function v_e(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,d){const h=[],p=this.ast.options&&this.ast.options.params||NO,g=this.buildStyles(n,a&&a.params||NO,h),b=l&&l.params||NO,v=this.buildStyles(r,b,h),y=new Set,M=new Map,x=new Map,C="void"===r,F={params:y_e(b,p),delay:this.ast.options?.delay},D=d?[]:OO(t,e,this.ast.animation,s,o,g,v,F,c,h);let k=0;if(D.forEach(T=>{k=Math.max(T.duration+T.delay,k)}),h.length)return U$(e,this._triggerName,n,r,C,g,v,[],[],M,x,k,h);D.forEach(T=>{const A=T.element,W=na(M,A,new Set);T.preStyleProps.forEach(ne=>W.add(ne));const ie=na(x,A,new Set);T.postStyleProps.forEach(ne=>ie.add(ne)),A!==e&&y.add(A)});const B=iE(y.values());return U$(e,this._triggerName,n,r,C,g,v,D,B,M,x,k)}}function y_e(i,t){const e=Qb(t);for(const n in i)i.hasOwnProperty(n)&&null!=i[n]&&(e[n]=i[n]);return e}class b_e{constructor(t,e,n){this.styles=t,this.defaultParams=e,this.normalizer=n}buildStyles(t,e){const n=new Map,r=Qb(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=e0(o,r,e));const l=this.normalizer.normalizePropertyName(a,e);o=this.normalizer.normalizeStyleValue(a,l,o,e),n.set(a,o)})}),n}}class w_e{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 b_e(r.style,r.options&&r.options.params||{},n))}),z$(this.states,"true","1"),z$(this.states,"false","0"),e.transitions.forEach(r=>{this.transitionFactories.push(new V$(t,r,this.states))}),this.fallbackTransition=function M_e(i,t,e){return new V$(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 z$(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 C_e=new cE;class S_e{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=RO(this._driver,e,n,r);if(n.length)throw function Sge(i){return new pe(3503,!1)}();this._animations.set(t,s)}_buildPlayer(t,e,n){const r=t.element,s=y$(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=OO(this._driver,e,s,EO,JS,new Map,new Map,n,C_e,r),o.forEach(d=>{const h=na(a,d.element,new Map);d.postStyleProps.forEach(p=>h.set(p,null))})):(r.push(function Ege(){return new pe(3300,!1)}()),o=[]),r.length)throw function Age(i){return new pe(3504,!1)}();a.forEach((d,h)=>{d.forEach((p,m)=>{d.set(m,this._driver.computeStyle(h,m,Gc))})});const c=ku(o.map(d=>{const h=a.get(d.element);return this._buildPlayer(d,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 Dge(i){return new pe(3301,!1)}();return e}listen(t,e,n,r){const s=wO(e,"","","");return bO(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 H$="ng-animate-queued",BO="ng-animate-disabled",I_e=[],G$={namespaceId:"",setForRemoval:!1,setForMove:!1,hasAnimation:!1,removedBeforeQueried:!1},R_e={namespaceId:"",setForMove:!1,setForRemoval:!1,hasAnimation:!1,removedBeforeQueried:!0},La="__ng_removed";class UO{get params(){return this.options.params}constructor(t,e=""){this.namespaceId=e;const n=t&&t.hasOwnProperty("value");if(this.value=function F_e(i){return i??null}(n?t.value:t),n){const s=Qb(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 t0="void",VO=new UO(t0);class k_e{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,Na(e,this._hostClassName)}listen(t,e,n,r){if(!this._triggers.has(e))throw function Tge(i,t){return new pe(3302,!1)}();if(null==n||0==n.length)throw function Ige(i){return new pe(3303,!1)}();if(!function L_e(i){return"start"==i||"done"==i}(n))throw function Rge(i,t){return new pe(3400,!1)}();const s=na(this._elementListeners,t,[]),o={name:e,phase:n,callback:r};s.push(o);const a=na(this._engine.statesByElement,t,new Map);return a.has(e)||(Na(t,eE),Na(t,eE+"-"+e),a.set(e,VO)),()=>{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 kge(i){return new pe(3401,!1)}();return e}trigger(t,e,n,r=!0){const s=this._getTrigger(e),o=new zO(this.id,e,t);let a=this._engine.statesByElement.get(t);a||(Na(t,eE),Na(t,eE+"-"+e),this._engine.statesByElement.set(t,a=new Map));let l=a.get(e);const c=new UO(n,this.id);if(!(n&&n.hasOwnProperty("value"))&&l&&c.absorbOptions(l.options),a.set(e,c),l||(l=VO),c.value!==t0&&l.value===c.value){if(!function U_e(i,t){const e=Object.keys(i),n=Object.keys(t);if(e.length!=n.length)return!1;for(let r=0;r{Tf(t,v),rc(t,y)})}return}const p=na(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||(Na(t,H$),o.onStart(()=>{$g(t,H$)})),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,tE,!0);n.forEach(r=>{if(r[La])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 d=this.trigger(t,c,t0,r);d&&a.push(d)}}),a.length)return this._engine.markElementAsRemoved(this.id,t,!0,e,o),n&&ku(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)||VO,d=new UO(t0),h=new zO(this.id,o,t);this._engine.totalQueuedPlayers++,this._queue.push({element:t,triggerName:o,transition:l,fromState:c,toState:d,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[La];(!s||s===G$)&&(n.afterFlush(()=>this.clearElementCache(t)),n.destroyInnerAnimations(t),n._onRemovalComplete(t,e))}}insertNode(t,e){Na(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=wO(s,n.triggerName,n.fromState.value,n.toState.value);l._data=t,bO(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 P_e{_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 k_e(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(hE(e)){const s=this._fetchNamespace(t);if(s)return s.trigger(e,n,r),!0}return!1}insertNode(t,e,n,r){if(!hE(e))return;const s=e[La];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),Na(t,BO)):this.disabledNodes.has(t)&&(this.disabledNodes.delete(t),$g(t,BO))}removeNode(t,e,n,r){if(hE(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[La]={namespaceId:t,setForRemoval:r,hasAnimation:n,removedBeforeQueried:!1,previousTriggersValues:s}}listen(t,e,n,r,s){return hE(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,tE,!0);e.forEach(n=>this.destroyActiveAnimationsForElement(n)),0!=this.playersByQueriedElement.size&&(e=this.driver.query(t,AO,!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 ku(this.players).onDone(()=>t());t()})}processLeaveNode(t){const e=t[La];if(e&&e.setForRemoval){if(t[La]=G$,e.namespaceId){this.destroyInnerAnimations(t);const n=this._fetchNamespace(e.namespaceId);n&&n.clearElementCache(t)}this._onRemovalComplete(t,e.setForRemoval)}t.classList?.contains(BO)&&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?ku(e).onDone(()=>{n.forEach(r=>r())}):n.forEach(r=>r())}}reportError(t){throw function Pge(i){return new pe(3402,!1)}()}_flushAnimations(t,e){const n=new cE,r=[],s=new Map,o=[],a=new Map,l=new Map,c=new Map,d=new Set;this.disabledNodes.forEach(q=>{d.add(q);const se=this.driver.query(q,".ng-animate-queued",!0);for(let J=0;J{const J=EO+b++;g.set(se,J),q.forEach(we=>Na(we,J))});const v=[],y=new Set,M=new Set;for(let q=0;qy.add(we)):M.add(se))}const x=new Map,C=j$(p,Array.from(y));C.forEach((q,se)=>{const J=JS+b++;x.set(se,J),q.forEach(we=>Na(we,J))}),t.push(()=>{m.forEach((q,se)=>{const J=g.get(se);q.forEach(we=>$g(we,J))}),C.forEach((q,se)=>{const J=x.get(se);q.forEach(we=>$g(we,J))}),v.forEach(q=>{this.processLeaveNode(q)})});const F=[],D=[];for(let q=this._namespaceList.length-1;q>=0;q--)this._namespaceList[q].drainQueuedTransitions(e).forEach(J=>{const we=J.player,Be=J.element;if(F.push(we),this.collectedEnterElements.length){const Fe=Be[La];if(Fe&&Fe.setForMove){if(Fe.previousTriggersValues&&Fe.previousTriggersValues.has(J.triggerName)){const wt=Fe.previousTriggersValues.get(J.triggerName),At=this.statesByElement.get(J.element);if(At&&At.has(J.triggerName)){const St=At.get(J.triggerName);St.value=wt,At.set(J.triggerName,St)}}return void we.destroy()}}const Ye=!h||!this.driver.containsElement(h,Be),Rt=x.get(Be),nn=g.get(Be),le=this._buildInstruction(J,n,nn,Rt,Ye);if(le.errors&&le.errors.length)return void D.push(le);if(Ye)return we.onStart(()=>Tf(Be,le.fromStyles)),we.onDestroy(()=>rc(Be,le.toStyles)),void r.push(we);if(J.isFallbackTransition)return we.onStart(()=>Tf(Be,le.fromStyles)),we.onDestroy(()=>rc(Be,le.toStyles)),void r.push(we);const Pe=[];le.timelines.forEach(Fe=>{Fe.stretchStartingKeyframe=!0,this.disabledNodes.has(Fe.element)||Pe.push(Fe)}),le.timelines=Pe,n.append(Be,le.timelines),o.push({instruction:le,player:we,element:Be}),le.queriedElements.forEach(Fe=>na(a,Fe,[]).push(we)),le.preStyleProps.forEach((Fe,wt)=>{if(Fe.size){let At=l.get(wt);At||l.set(wt,At=new Set),Fe.forEach((St,Cn)=>At.add(Cn))}}),le.postStyleProps.forEach((Fe,wt)=>{let At=c.get(wt);At||c.set(wt,At=new Set),Fe.forEach((St,Cn)=>At.add(Cn))})});if(D.length){const q=[];D.forEach(se=>{q.push(function Oge(i,t){return new pe(3505,!1)}())}),F.forEach(se=>se.destroy()),this.reportError(q)}const k=new Map,B=new Map;o.forEach(q=>{const se=q.element;n.has(se)&&(B.set(se,se),this._beforeAnimationBuild(q.player.namespaceId,q.instruction,k))}),r.forEach(q=>{const se=q.element;this._getPreviousPlayers(se,!1,q.namespaceId,q.triggerName,null).forEach(we=>{na(k,se,[]).push(we),we.destroy()})});const T=v.filter(q=>q$(q,l,c)),A=new Map;W$(A,this.driver,M,c,Gc).forEach(q=>{q$(q,l,c)&&T.push(q)});const ie=new Map;m.forEach((q,se)=>{W$(ie,this.driver,new Set(q),l,eR)}),T.forEach(q=>{const se=A.get(q),J=ie.get(q);A.set(q,new Map([...Array.from(se?.entries()??[]),...Array.from(J?.entries()??[])]))});const ne=[],oe=[],ge={};o.forEach(q=>{const{element:se,player:J,instruction:we}=q;if(n.has(se)){if(d.has(se))return J.onDestroy(()=>rc(se,we.toStyles)),J.disabled=!0,J.overrideTotalTime(we.totalTime),void r.push(J);let Be=ge;if(B.size>1){let Rt=se;const nn=[];for(;Rt=Rt.parentNode;){const le=B.get(Rt);if(le){Be=le;break}nn.push(Rt)}nn.forEach(le=>B.set(le,Be))}const Ye=this._buildAnimation(J.namespaceId,we,k,s,ie,A);if(J.setRealPlayer(Ye),Be===ge)ne.push(J);else{const Rt=this.playersByElement.get(Be);Rt&&Rt.length&&(J.parentPlayer=ku(Rt)),r.push(J)}}else Tf(se,we.fromStyles),J.onDestroy(()=>rc(se,we.toStyles)),oe.push(J),d.has(se)&&r.push(J)}),oe.forEach(q=>{const se=s.get(q.element);if(se&&se.length){const J=ku(se);q.setRealPlayer(J)}}),r.forEach(q=>{q.parentPlayer?q.syncPlayerEvents(q.parentPlayer):q.destroy()});for(let q=0;q!Ye.destroyed);Be.length?N_e(this,se,Be):this.processLeaveNode(se)}return v.length=0,ne.forEach(q=>{this.players.push(q),q.onDone(()=>{q.destroy();const se=this.players.indexOf(q);this.players.splice(se,1)}),q.play()}),ne}elementContainsData(t,e){let n=!1;const r=e[La];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==t0;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,d=c!==s,h=na(n,c,[]);this._getPreviousPlayers(c,d,o,a,e.toState).forEach(m=>{const g=m.getRealPlayer();g.beforeDestroy&&g.beforeDestroy(),m.destroy(),h.push(m)})}Tf(s,e.fromStyles)}_buildAnimation(t,e,n,r,s,o){const a=e.triggerName,l=e.element,c=[],d=new Set,h=new Set,p=e.timelines.map(g=>{const b=g.element;d.add(b);const v=b[La];if(v&&v.removedBeforeQueried)return new Jy(g.duration,g.delay);const y=b!==l,M=function B_e(i){const t=[];return Y$(i,t),t}((n.get(b)||I_e).map(k=>k.getRealPlayer())).filter(k=>!!k.element&&k.element===b),x=s.get(b),C=o.get(b),F=y$(0,this._normalizer,0,g.keyframes,x,C),D=this._buildPlayer(g,F,M);if(g.subTimeline&&r&&h.add(b),y){const k=new zO(t,a,b);k.setRealPlayer(D),c.push(k)}return D});c.forEach(g=>{na(this.playersByQueriedElement,g.element,[]).push(g),g.onDone(()=>function O_e(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))}),d.forEach(g=>Na(g,D$));const m=ku(p);return m.onDestroy(()=>{d.forEach(g=>$g(g,D$)),rc(l,e.toStyles)}),h.forEach(g=>{na(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 Jy(t.duration,t.delay)}}class zO{constructor(t,e,n){this.namespaceId=t,this.triggerName=e,this.element=n,this._player=new Jy,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=>bO(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){na(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 hE(i){return i&&1===i.nodeType}function $$(i,t){const e=i.style.display;return i.style.display=t??"none",e}function W$(i,t,e,n,r){const s=[];e.forEach(l=>s.push($$(l)));const o=[];n.forEach((l,c)=>{const d=new Map;l.forEach(h=>{const p=t.computeStyle(c,h,r);d.set(h,p),(!p||0==p.length)&&(c[La]=R_e,o.push(c))}),i.set(c,d)});let a=0;return e.forEach(l=>$$(l,s[a++])),o}function j$(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 Na(i,t){i.classList?.add(t)}function $g(i,t){i.classList?.remove(t)}function N_e(i,t,e){ku(e).onDone(()=>i.processLeaveNode(t))}function Y$(i,t){for(let e=0;er.add(s)):t.set(i,n),e.delete(i),!0}class fE{constructor(t,e,n){this.bodyNode=t,this._driver=e,this._normalizer=n,this._triggerCache={},this.onRemovalComplete=(r,s)=>{},this._transitionEngine=new P_e(t,e,n),this._timelineEngine=new S_e(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=[],d=RO(this._driver,s,l,c);if(l.length)throw function Mge(i,t){return new pe(3404,!1)}();a=function x_e(i,t,e){return new w_e(i,t,e)}(r,d,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]=b$(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]=b$(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 z_e=(()=>{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&&rc(this._element,this._startStyles,this._initialStyles),this._state=1)}finish(){this.start(),this._state<2&&(rc(this._element,this._initialStyles),this._endStyles&&(rc(this._element,this._endStyles),this._endStyles=null),this._state=1)}destroy(){this.finish(),this._state<3&&(i.initialStylesByElement.delete(this._element),this._startStyles&&(Tf(this._element,this._startStyles),this._endStyles=null),this._endStyles&&(Tf(this._element,this._endStyles),this._endStyles=null),rc(this._element,this._initialStyles),this._state=3)}}return i.initialStylesByElement=new WeakMap,i})();function HO(i){let t=null;return i.forEach((e,n)=>{(function H_e(i){return"display"===i||"position"===i})(n)&&(t=t||new Map,t.set(n,e))}),t}class X${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:O$(this.element,r))}),this.currentSnapshot=t}triggerCallback(t){const e="start"===t?this._onStartFns:this._onDoneFns;e.forEach(n=>n()),e.length=0}}class G_e{validateStyleProperty(t){return!0}validateAnimatableStyleProperty(t){return!0}matchesElement(t,e){return!1}containsElement(t,e){return C$(t,e)}getParentElement(t){return CO(t)}query(t,e,n){return S$(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,d=o.filter(m=>m instanceof X$);(function Yge(i,t){return 0===i||0===t})(n,r)&&d.forEach(m=>{m.currentSnapshot.forEach((g,b)=>c.set(b,g))});let h=function Gge(i){return i.length?i[0]instanceof Map?i:i.map(t=>T$(t)):[]}(e).map(m=>Pu(m));h=function qge(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,O$(i,a)))}}return t}(t,h,c);const p=function V_e(i,t){let e=null,n=null;return Array.isArray(t)&&t.length?(e=HO(t[0]),t.length>1&&(n=HO(t[t.length-1]))):t instanceof Map&&(e=HO(t)),e||n?new z_e(i,e,n):null}(t,h);return new X$(t,h,l,p)}}let $_e=(()=>{class i extends QU{constructor(e,n){super(),this._nextAnimationId=0,this._renderer=e.createRenderer(n.body,{id:"0",encapsulation:Ys.None,styles:[],data:{animation:[]}})}build(e){const n=this._nextAnimationId.toString();this._nextAnimationId++;const r=Array.isArray(e)?eV(e):e;return K$(this._renderer,null,n,"register",[r]),new W_e(n,this._renderer)}}return i.\u0275fac=function(e){return new(e||i)(ee(Nl),ee(qt))},i.\u0275prov=Re({token:i,factory:i.\u0275fac}),i})();class W_e extends RQ{constructor(t,e){super(),this._id=t,this._renderer=e}create(t,e){return new j_e(this._id,t,e||{},this._renderer)}}class j_e{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 K$(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 K$(i,t,e,n,r){return i.setProperty(t,`@@${e}:${n}`,r)}const Z$="@.disabled";let Y_e=(()=>{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 d=this._rendererCache.get(s);return d||(d=new Q$("",s,this.engine,()=>this._rendererCache.delete(s)),this._rendererCache.set(s,d)),d}const o=n.id,a=n.id+"-"+this._currentId;this._currentId++,this.engine.register(a,e);const l=d=>{Array.isArray(d)?d.forEach(l):this.engine.registerTrigger(o,a,e,d.name,d)};return n.data.animation.forEach(l),new q_e(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)(ee(Nl),ee(fE),ee(ft))},i.\u0275prov=Re({token:i,factory:i.\u0275fac}),i})();class Q${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==Z$?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 q_e extends Q${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==Z$?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 X_e(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 K_e(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 J$=[{provide:QU,useClass:$_e},{provide:LO,useFactory:function Q_e(){return new __e}},{provide:fE,useClass:(()=>{class i extends fE{constructor(e,n,r,s){super(e.body,n,r)}ngOnDestroy(){this.flush()}}return i.\u0275fac=function(e){return new(e||i)(ee(qt),ee(SO),ee(LO),ee(lm))},i.\u0275prov=Re({token:i,factory:i.\u0275fac}),i})()},{provide:Nl,useFactory:function J_e(i,t,e){return new Y_e(i,t,e)},deps:[iM,fE,ft]}],GO=[{provide:SO,useFactory:()=>new G_e},{provide:kr,useValue:"BrowserAnimations"},...J$],e8=[{provide:SO,useClass:E$},{provide:kr,useValue:"NoopAnimations"},...J$];let eve=(()=>{class i{static withConfig(e){return{ngModule:i,providers:e.disableAnimations?e8:GO}}}return i.\u0275fac=function(e){return new(e||i)},i.\u0275mod=en({type:i}),i.\u0275inj=Wt({providers:GO,imports:[kB]}),i})();const t8=new me("CdkAccordion");let tve=0,nve=(()=>{class i{get expanded(){return this._expanded}set expanded(e){e=tn(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=tn(e)}constructor(e,n,r){this.accordion=e,this._changeDetectorRef=n,this._expansionDispatcher=r,this._openCloseAllSubscription=Qt.EMPTY,this.closed=new $e,this.opened=new $e,this.destroyed=new $e,this.expandedChange=new $e,this.id="cdk-accordion-child-"+tve++,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)(E(t8,12),E(si),E(UR))},i.\u0275dir=ve({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:t8,useValue:void 0}])]}),i})(),ive=(()=>{class i{}return i.\u0275fac=function(e){return new(e||i)},i.\u0275mod=en({type:i}),i.\u0275inj=Wt({}),i})();const rve=["body"];function sve(i,t){}const ove=[[["mat-expansion-panel-header"]],"*",[["mat-action-row"]]],ave=["mat-expansion-panel-header","*","mat-action-row"];function lve(i,t){1&i&&Oe(0,"span",2),2&i&&U("@indicatorRotate",re()._getExpandedState())}const cve=[[["mat-panel-title"]],[["mat-panel-description"]],"*"],dve=["mat-panel-title","mat-panel-description","*"],n8=new me("MAT_ACCORDION"),i8="225ms cubic-bezier(0.4,0.0,0.2,1)",r8={indicatorRotate:Ia("indicatorRotate",[Ps("collapsed, void",oi({transform:"rotate(0deg)"})),Ps("expanded",oi({transform:"rotate(180deg)"})),Or("expanded <=> collapsed, void => collapsed",Yr(i8))]),bodyExpansion:Ia("bodyExpansion",[Ps("collapsed, void",oi({height:"0px",visibility:"hidden"})),Ps("expanded",oi({height:"*",visibility:"visible"})),Or("expanded <=> collapsed, void => collapsed",Yr(i8))])},s8=new me("MAT_EXPANSION_PANEL");let uve=(()=>{class i{constructor(e,n){this._template=e,this._expansionPanel=n}}return i.\u0275fac=function(e){return new(e||i)(E(Co),E(s8,8))},i.\u0275dir=ve({type:i,selectors:[["ng-template","matExpansionPanelContent",""]]}),i})(),hve=0;const o8=new me("MAT_EXPANSION_PANEL_DEFAULT_OPTIONS");let a8=(()=>{class i extends nve{get hideToggle(){return this._hideToggle||this.accordion&&this.accordion.hideToggle}set hideToggle(e){this._hideToggle=tn(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 $e,this.afterCollapse=new $e,this._inputChanges=new Ie,this._headerId="mat-expansion-panel-header-"+hve++,this._bodyAnimationDone=new Ie,this.accordion=e,this._document=o,this._bodyAnimationDone.pipe(zc((c,d)=>c.fromState===d.fromState&&c.toState===d.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(Eo(null),vn(()=>this.expanded&&!this._portal),Oi(1)).subscribe(()=>{this._portal=new Cm(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)(E(n8,12),E(si),E(UR),E(jr),E(qt),E(kr,8),E(o8,8))},i.\u0275cmp=st({type:i,selectors:[["mat-expansion-panel"]],contentQueries:function(e,n,r){if(1&e&&Wi(r,uve,5),2&e){let s;Tt(s=It())&&(n._lazyContent=s.first)}},viewQuery:function(e,n){if(1&e&&Zn(rve,5),2&e){let r;Tt(r=It())&&(n._body=r.first)}},hostAttrs:[1,"mat-expansion-panel"],hostVars:6,hostBindings:function(e,n){2&e&&ln("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:n8,useValue:void 0},{provide:s8,useExisting:i}]),lt,xi],ngContentSelectors:ave,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&&(rr(ove),Yt(0),$(1,"div",0,1),ke("@bodyExpansion.done",function(s){return n._bodyAnimationDone.next(s)}),$(3,"div",2),Yt(4,1),fe(5,sve,0,0,"ng-template",3),j(),Yt(6,2),j()),2&e&&(V(1),U("@bodyExpansion",n._getExpandedState())("id",n.id),Dt("aria-labelledby",n._headerId),V(4),U("cdkPortalOutlet",n._portal))},dependencies:[Sm],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:[r8.bodyExpansion]},changeDetection:0}),i})();class fve{}const pve=XI(fve);let mve=(()=>{class i extends pve{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=Qt.EMPTY;const c=e.accordion?e.accordion._stateChanges.pipe(vn(d=>!(!d.hideToggle&&!d.togglePosition))):mo;this.tabIndex=parseInt(l||"")||0,this._parentChangeSubscription=Cr(e.opened,e.closed,c,e._inputChanges.pipe(vn(d=>!!(d.hideToggle||d.disabled||d.togglePosition)))).subscribe(()=>this._changeDetectorRef.markForCheck()),e.closed.pipe(vn(()=>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:Yo(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)(E(a8,1),E(mt),E(Hc),E(si),E(o8,8),E(kr,8),_a("tabindex"))},i.\u0275cmp=st({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&&ke("click",function(){return n._toggle()})("keydown",function(s){return n._keydown(s)}),2&e&&(Dt("id",n.panel._headerId)("tabindex",n.tabIndex)("aria-controls",n._getPanelId())("aria-expanded",n._isExpanded())("aria-disabled",n.panel.disabled),$o("height",n._getHeaderHeight()),ln("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:[lt],ngContentSelectors:dve,decls:5,vars:3,consts:[[1,"mat-content"],["class","mat-expansion-indicator",4,"ngIf"],[1,"mat-expansion-indicator"]],template:function(e,n){1&e&&(rr(cve),$(0,"span",0),Yt(1),Yt(2,1),Yt(3,2),j(),fe(4,lve,1,1,"span",1)),2&e&&(ln("mat-content-hide-toggle",!n._showToggle()),V(4),U("ngIf",n._showToggle()))},dependencies:[vi],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:[r8.indicatorRotate]},changeDetection:0}),i})(),gve=(()=>{class i{}return i.\u0275fac=function(e){return new(e||i)},i.\u0275dir=ve({type:i,selectors:[["mat-panel-description"]],hostAttrs:[1,"mat-expansion-panel-header-description"]}),i})(),_ve=(()=>{class i{}return i.\u0275fac=function(e){return new(e||i)},i.\u0275dir=ve({type:i,selectors:[["mat-panel-title"]],hostAttrs:[1,"mat-expansion-panel-header-title"]}),i})(),vve=(()=>{class i{}return i.\u0275fac=function(e){return new(e||i)},i.\u0275mod=en({type:i}),i.\u0275inj=Wt({imports:[ao,Qn,ive,Ph]}),i})();function yve(i,t){if(1&i&&($(0,"mat-option",19),Ve(1),j()),2&i){const e=t.$implicit;U("value",e),V(1),Xi(" ",e," ")}}function bve(i,t){if(1&i){const e=Kn();$(0,"mat-form-field",16)(1,"mat-select",17),ke("selectionChange",function(r){return Ht(e),Et(re(2)._changePageSize(r.value))}),fe(2,yve,2,2,"mat-option",18),j()()}if(2&i){const e=re(2);U("appearance",e._formFieldAppearance)("color",e.color),V(1),U("value",e.pageSize)("disabled",e.disabled)("aria-labelledby",e._pageSizeLabelId)("panelClass",e.selectConfig.panelClass||"")("disableOptionCentering",e.selectConfig.disableOptionCentering),V(1),U("ngForOf",e._displayedPageSizeOptions)}}function xve(i,t){if(1&i&&($(0,"div",20),Ve(1),j()),2&i){const e=re(2);V(1),ui(e.pageSize)}}function wve(i,t){if(1&i&&($(0,"div",12)(1,"div",13),Ve(2),j(),fe(3,bve,3,8,"mat-form-field",14),fe(4,xve,2,1,"div",15),j()),2&i){const e=re();V(1),OD("id",e._pageSizeLabelId),V(1),Xi(" ",e._intl.itemsPerPageLabel," "),V(1),U("ngIf",e._displayedPageSizeOptions.length>1),V(1),U("ngIf",e._displayedPageSizeOptions.length<=1)}}function Mve(i,t){if(1&i){const e=Kn();$(0,"button",21),ke("click",function(){return Ht(e),Et(re().firstPage())}),ki(),$(1,"svg",7),Oe(2,"path",22),j()()}if(2&i){const e=re();U("matTooltip",e._intl.firstPageLabel)("matTooltipDisabled",e._previousButtonsDisabled())("matTooltipPosition","above")("disabled",e._previousButtonsDisabled()),Dt("aria-label",e._intl.firstPageLabel)}}function Cve(i,t){if(1&i){const e=Kn();ki(),pa(),$(0,"button",23),ke("click",function(){return Ht(e),Et(re().lastPage())}),ki(),$(1,"svg",7),Oe(2,"path",24),j()()}if(2&i){const e=re();U("matTooltip",e._intl.lastPageLabel)("matTooltipDisabled",e._nextButtonsDisabled())("matTooltipPosition","above")("disabled",e._nextButtonsDisabled()),Dt("aria-label",e._intl.lastPageLabel)}}let mE=(()=>{class i{constructor(){this.changes=new Ie,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=Re({token:i,factory:i.\u0275fac,providedIn:"root"}),i})();const Eve={provide:mE,deps:[[new Ss,new ya,mE]],useFactory:function Sve(i){return i||new mE}},Dve=new me("MAT_PAGINATOR_DEFAULT_OPTIONS"),Tve=zM(yQ(class{}));let Ive=(()=>{class i extends Tve{get pageIndex(){return this._pageIndex}set pageIndex(e){this._pageIndex=Math.max(ks(e),0),this._changeDetectorRef.markForCheck()}get length(){return this._length}set length(e){this._length=ks(e),this._changeDetectorRef.markForCheck()}get pageSize(){return this._pageSize}set pageSize(e){this._pageSize=Math.max(ks(e),0),this._updateDisplayedPageSizeOptions()}get pageSizeOptions(){return this._pageSizeOptions}set pageSizeOptions(e){this._pageSizeOptions=(e||[]).map(n=>ks(n)),this._updateDisplayedPageSizeOptions()}get hidePageSize(){return this._hidePageSize}set hidePageSize(e){this._hidePageSize=tn(e)}get showFirstLastButtons(){return this._showFirstLastButtons}set showFirstLastButtons(e){this._showFirstLastButtons=tn(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 $e,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){wo()},i.\u0275dir=ve({type:i,inputs:{color:"color",pageIndex:"pageIndex",length:"length",pageSize:"pageSize",pageSizeOptions:"pageSizeOptions",hidePageSize:"hidePageSize",showFirstLastButtons:"showFirstLastButtons",selectConfig:"selectConfig"},outputs:{page:"page"},features:[lt]}),i})(),Rve=0,kve=(()=>{class i extends Ive{constructor(e,n,r){super(e,n,r),this._pageSizeLabelId="mat-paginator-page-size-label-"+Rve++,this._formFieldAppearance=r?.formFieldAppearance||"outline"}}return i.\u0275fac=function(e){return new(e||i)(E(mE),E(si),E(Dve,8))},i.\u0275cmp=st({type:i,selectors:[["mat-paginator"]],hostAttrs:["role","group",1,"mat-mdc-paginator"],inputs:{disabled:"disabled"},exportAs:["matPaginator"],features:[lt],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&&($(0,"div",0)(1,"div",1),fe(2,wve,5,4,"div",2),$(3,"div",3)(4,"div",4),Ve(5),j(),fe(6,Mve,3,5,"button",5),$(7,"button",6),ke("click",function(){return n.previousPage()}),ki(),$(8,"svg",7),Oe(9,"path",8),j()(),pa(),$(10,"button",9),ke("click",function(){return n.nextPage()}),ki(),$(11,"svg",7),Oe(12,"path",10),j()(),fe(13,Cve,3,5,"button",11),j()()()),2&e&&(V(2),U("ngIf",!n.hidePageSize),V(3),Xi(" ",n._intl.getRangeLabel(n.pageIndex,n.pageSize,n.length)," "),V(1),U("ngIf",n.showFirstLastButtons),V(1),U("matTooltip",n._intl.previousPageLabel)("matTooltipDisabled",n._previousButtonsDisabled())("matTooltipPosition","above")("disabled",n._previousButtonsDisabled()),Dt("aria-label",n._intl.previousPageLabel),V(3),U("matTooltip",n._intl.nextPageLabel)("matTooltipDisabled",n._nextButtonsDisabled())("matTooltipPosition","above")("disabled",n._nextButtonsDisabled()),Dt("aria-label",n._intl.nextPageLabel),V(3),U("ngIf",n.showFirstLastButtons))},dependencies:[oo,vi,WM,ql,db,Fm,Os],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})(),Pve=(()=>{class i{}return i.\u0275fac=function(e){return new(e||i)},i.\u0275mod=en({type:i}),i.\u0275inj=Wt({providers:[Eve],imports:[ao,jM,LH,kV]}),i})(),Ove=(()=>{class i{}return i.\u0275fac=function(e){return new(e||i)},i.\u0275mod=en({type:i,bootstrap:[tge]}),i.\u0275inj=Wt({providers:[$c,jR,{provide:IH,useValue:Fie}],imports:[kB,_K,eve,Zz,bJ,hC,uH,vve,SV,DV,kV,jM,ZV,Pve,dse,pH,LH,pV,Dpe,Ime,Qz,ZI,Hie,ire]}),i})();Ku(Wc,[oo,vi,Os,Zb,QS],[Ea]),Ku(NR,[dm,oo,vi,vy,jc,fu,ql,a8,mve,_ve,gve,Os,kve,db,Fm,Zb],[]),Ku(_C,[oo,vi,yC,vC,fH,Zb],[]),Ku(h$,[oo,vi,qo,Os,db,Fm,Zb,QS],[Ea]),R7().bootstrapModule(Ove).catch(i=>console.error(i))},489:function(Oo,zs,ps){var dn;Oo=ps.nmd(Oo),function(){var z,Kr=200,Un="Expected a function",Ua="__lodash_hash_undefined__",Ci="__lodash_placeholder__",Si=1,ms=2,Gs=4,$s=1,Fo=2,Pn=1,cr=2,oc=4,oa=8,wl=16,aa=32,Ml=64,Va=128,la=256,fd=512,yE=800,Yg=16,Tn=1/0,Ha=9007199254740991,xE=17976931348623157e292,kf=NaN,ca=4294967295,Ie=ca-1,r0=ca>>>1,s0=[["ary",Va],["bind",Pn],["bindKey",cr],["curry",oa],["curryRight",wl],["flip",fd],["partial",aa],["partialRight",Ml],["rearg",la]],ti="[object Arguments]",jn="[object Array]",wE="[object AsyncFunction]",et="[object Boolean]",ac="[object Date]",ME="[object DOMException]",pd="[object Error]",Pf="[object Function]",o0="[object GeneratorFunction]",Lo="[object Map]",Fu="[object Number]",CE="[object Null]",Ga="[object Object]",a0="[object Promise]",SE="[object Proxy]",md="[object RegExp]",No="[object Set]",lc="[object String]",Of="[object Symbol]",qg="[object Undefined]",gd="[object WeakMap]",Lu="[object ArrayBuffer]",_d="[object DataView]",da="[object Float32Array]",Ff="[object Float64Array]",Xg="[object Int8Array]",Lf="[object Int16Array]",Kg="[object Int32Array]",Zg="[object Uint8Array]",Nu="[object Uint8ClampedArray]",Qg="[object Uint16Array]",Jg="[object Uint32Array]",AE=/\b__p \+= '';/g,DE=/\b(__p \+=) '' \+/g,TE=/(__e\(.*?\)|\b__t\)) \+\n'';/g,l0=/&(?:amp|lt|gt|quot|#39);/g,c0=/[&<>"']/g,IE=RegExp(l0.source),RE=RegExp(c0.source),qO=/<%-([\s\S]+?)%>/g,e_=/<%([\s\S]+?)%>/g,t_=/<%=([\s\S]+?)%>/g,d0=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,u0=/^\w*$/,h0=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,n_=/[\\^$.*+?()[\]{}|]/g,f0=RegExp(n_.source),Nf=/^\s+/,p0=/\s/,m0=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,Mr=/\{\n\/\* \[wrapped with (.+)\] \*/,kE=/,? & /,PE=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,OE=/[()=,{}\[\]\/\s]/,FE=/\\(\\)?/g,g0=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,_0=/\w*$/,LE=/^[-+]0x[0-9a-f]+$/i,$a=/^0b[01]+$/i,NE=/^\[object .+?Constructor\]$/,tr=/^0o[0-7]+$/i,vd=/^(?:0|[1-9]\d*)$/,mo=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,i_=/($^)/,BE=/['\n\r\u2028\u2029\\]/g,Bu="\\ud800-\\udfff",y0="\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff",s_="\\u2700-\\u27bf",o_="a-z\\xdf-\\xf6\\xf8-\\xff",a_="A-Z\\xc0-\\xd6\\xd8-\\xde",b0="\\ufe0e\\ufe0f",x0="\\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",Cr="["+Bu+"]",Bf="["+x0+"]",yd="["+y0+"]",ci="\\d+",l_="["+s_+"]",mi="["+o_+"]",Uf="[^"+Bu+x0+ci+s_+o_+a_+"]",c_="\\ud83c[\\udffb-\\udfff]",Ot="[^"+Bu+"]",Vu="(?:\\ud83c[\\udde6-\\uddff]){2}",zu="[\\ud800-\\udbff][\\udc00-\\udfff]",Hu="["+a_+"]",pe="(?:"+mi+"|"+Uf+")",Vf="(?:"+Hu+"|"+Uf+")",Jt="(?:['\u2019](?:d|ll|m|re|s|t|ve))?",Yn="(?:['\u2019](?:D|LL|M|RE|S|T|VE))?",w0="(?:"+yd+"|"+c_+")?",GE="["+b0+"]?",WE=GE+w0+"(?:\\u200d(?:"+[Ot,Vu,zu].join("|")+")"+GE+w0+")*",jE="(?:"+[l_,Vu,zu].join("|")+")"+WE,XO="(?:"+[Ot+yd+"?",yd,Vu,zu,Cr].join("|")+")",Cl=RegExp("['\u2019]","g"),KO=RegExp(yd,"g"),M0=RegExp(c_+"(?="+c_+")|"+XO+WE,"g"),ZO=RegExp([Hu+"?"+mi+"+"+Jt+"(?="+[Bf,Hu,"$"].join("|")+")",Vf+"+"+Yn+"(?="+[Bf,Hu+pe,"$"].join("|")+")",Hu+"?"+pe+"+"+Jt,Hu+"+"+Yn,"\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])","\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",ci,jE].join("|"),"g"),QO=RegExp("[\\u200d"+Bu+y0+b0+"]"),YE=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,JO=["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"],qE=-1,Ei={};Ei[da]=Ei[Ff]=Ei[Xg]=Ei[Lf]=Ei[Kg]=Ei[Zg]=Ei[Nu]=Ei[Qg]=Ei[Jg]=!0,Ei[ti]=Ei[jn]=Ei[Lu]=Ei[et]=Ei[_d]=Ei[ac]=Ei[pd]=Ei[Pf]=Ei[Lo]=Ei[Fu]=Ei[Ga]=Ei[md]=Ei[No]=Ei[lc]=Ei[gd]=!1;var Sn={};Sn[ti]=Sn[jn]=Sn[Lu]=Sn[_d]=Sn[et]=Sn[ac]=Sn[da]=Sn[Ff]=Sn[Xg]=Sn[Lf]=Sn[Kg]=Sn[Lo]=Sn[Fu]=Sn[Ga]=Sn[md]=Sn[No]=Sn[lc]=Sn[Of]=Sn[Zg]=Sn[Nu]=Sn[Qg]=Sn[Jg]=!0,Sn[pd]=Sn[Pf]=Sn[gd]=!1;var nF={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},Re=parseFloat,iF=parseInt,Wt="object"==typeof global&&global&&global.Object===Object&&global,Hf="object"==typeof self&&self&&self.Object===Object&&self,Sr=Wt||Hf||Function("return this")(),d_=zs&&!zs.nodeType&&zs,$u=d_&&Oo&&!Oo.nodeType&&Oo,u_=$u&&$u.exports===d_,bd=u_&&Wt.process,gs=function(){try{return $u&&$u.require&&$u.require("util").types||bd&&bd.binding&&bd.binding("util")}catch{}}(),h_=gs&&gs.isArrayBuffer,C0=gs&&gs.isDate,Ft=gs&&gs.isMap,Gf=gs&&gs.isRegExp,S0=gs&&gs.isSet,js=gs&&gs.isTypedArray;function _s(X,he,ae){switch(ae.length){case 0:return X.call(he);case 1:return X.call(he,ae[0]);case 2:return X.call(he,ae[0],ae[1]);case 3:return X.call(he,ae[0],ae[1],ae[2])}return X.apply(he,ae)}function rF(X,he,ae,Ue){for(var jt=-1,Vn=null==X?0:X.length;++jt-1}function Wu(X,he,ae){for(var Ue=-1,jt=null==X?0:X.length;++Ue-1;);return ae}function ua(X,he){for(var ae=X.length;ae--&&Lt(he,X[ae],0)>-1;);return ae}var QE=m_({\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"}),st=m_({"&":"&","<":"<",">":">",'"':""","'":"'"});function Ku(X){return"\\"+nF[X]}function Md(X){return QO.test(X)}function Yf(X){var he=-1,ae=Array(X.size);return X.forEach(function(Ue,jt){ae[++he]=[jt,Ue]}),ae}function ve(X,he){return function(ae){return X(he(ae))}}function Gi(X,he){for(var ae=-1,Ue=X.length,jt=0,Vn=[];++ae",""":'"',"'":"'"}),ys=function X(he){var u,ae=(he=null==he?Sr:ys.defaults(Sr.Object(),he,ys.pick(Sr,JO))).Array,Ue=he.Date,jt=he.Error,Vn=he.Function,bt=he.Math,ai=he.Object,uc=he.RegExp,A0=he.String,Er=he.TypeError,nr=ae.prototype,Bo=ai.prototype,qs=he["__core-js_shared__"],Al=Vn.prototype.toString,ii=Bo.hasOwnProperty,bi=0,tA=(u=/[^.]+$/.exec(qs&&qs.keys&&qs.keys.IE_PROTO||""))?"Symbol(src)_1."+u:"",Sd=Bo.toString,D0=Al.call(ai),Xf=Sr._,Kf=uc("^"+Al.call(ii).replace(n_,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),qa=u_?he.Buffer:z,Ui=he.Symbol,v_=he.Uint8Array,bs=qa?qa.allocUnsafe:z,xs=ve(ai.getPrototypeOf,ai),Zf=ai.create,Ed=Bo.propertyIsEnumerable,hc=nr.splice,vo=Ui?Ui.isConcatSpreadable:z,Qu=Ui?Ui.iterator:z,Ad=Ui?Ui.toStringTag:z,Qf=function(){try{var u=Mc(ai,"defineProperty");return u({},"",{}),u}catch{}}(),nA=he.clearTimeout!==Sr.clearTimeout&&he.clearTimeout,oF=Ue&&Ue.now!==Sr.Date.now&&Ue.now,aF=he.setTimeout!==Sr.setTimeout&&he.setTimeout,y_=bt.ceil,b_=bt.floor,T0=ai.getOwnPropertySymbols,lF=qa?qa.isBuffer:z,iA=he.isFinite,cF=nr.join,dF=ve(ai.keys,ai),ur=bt.max,Zr=bt.min,uF=Ue.now,I0=he.parseInt,x_=bt.random,hF=nr.reverse,R0=Mc(he,"DataView"),Jf=Mc(he,"Map"),Xa=Mc(he,"Promise"),Dd=Mc(he,"Set"),xi=Mc(he,"WeakMap"),Td=Mc(ai,"create"),ep=xi&&new xi,Id={},k0=Cc(R0),P0=Cc(Jf),rA=Cc(Xa),w_=Cc(Dd),sA=Cc(xi),Qr=Ui?Ui.prototype:z,Rd=Qr?Qr.valueOf:z,M_=Qr?Qr.toString:z;function I(u){if(Pi(u)&&!sn(u)&&!(u instanceof Rn)){if(u instanceof Ai)return u;if(ii.call(u,"__wrapped__"))return ns(u)}return new Ai(u)}var kd=function(){function u(){}return function(f){if(!Mi(f))return{};if(Zf)return Zf(f);u.prototype=f;var _=new u;return u.prototype=z,_}}();function fc(){}function Ai(u,f){this.__wrapped__=u,this.__actions__=[],this.__chain__=!!f,this.__index__=0,this.__values__=z}function Rn(u){this.__wrapped__=u,this.__actions__=[],this.__dir__=1,this.__filtered__=!1,this.__iteratees__=[],this.__takeCount__=ca,this.__views__=[]}function pc(u){var f=-1,_=null==u?0:u.length;for(this.clear();++f<_;){var w=u[f];this.set(w[0],w[1])}}function Pt(u){var f=-1,_=null==u?0:u.length;for(this.clear();++f<_;){var w=u[f];this.set(w[0],w[1])}}function ha(u){var f=-1,_=null==u?0:u.length;for(this.clear();++f<_;){var w=u[f];this.set(w[0],w[1])}}function Et(u){var f=-1,_=null==u?0:u.length;for(this.__data__=new ha;++f<_;)this.add(u[f])}function Jr(u){var f=this.__data__=new Pt(u);this.size=f.size}function A_(u,f){var _=sn(u),w=!_&&Ac(u),S=!_&&!w&&tl(u),P=!_&&!w&&!S&&Ho(u),G=_||w||S||P,Y=G?Ys(u.length,A0):[],Q=Y.length;for(var _e in u)(f||ii.call(u,_e))&&(!G||!("length"==_e||S&&("offset"==_e||"parent"==_e)||P&&("buffer"==_e||"byteLength"==_e||"byteOffset"==_e)||el(_e,Q)))&&Y.push(_e);return Y}function zr(u){var f=u.length;return f?u[ih(0,f-1)]:z}function Ka(u,f){return Cp(Zs(u),Il(f,0,u.length))}function B0(u){return Cp(Zs(u))}function Tl(u,f,_){(_!==z&&!zo(u[f],_)||_===z&&!(f in u))&&Uo(u,f,_)}function Xs(u,f,_){var w=u[f];(!ii.call(u,f)||!zo(w,_)||_===z&&!(f in u))&&Uo(u,f,_)}function np(u,f){for(var _=u.length;_--;)if(zo(u[_][0],f))return _;return-1}function U0(u,f,_,w){return Za(u,function(S,P,G){f(w,S,_(S),G)}),w}function V0(u,f){return u&&di(f,hr(f),u)}function Uo(u,f,_){"__proto__"==f&&Qf?Qf(u,f,{configurable:!0,enumerable:!0,value:_,writable:!0}):u[f]=_}function Ju(u,f){for(var _=-1,w=f.length,S=ae(w),P=null==u;++_=f?u:f)),u}function Ms(u,f,_,w,S,P){var G,Y=f&Si,Q=f&ms,_e=f&Gs;if(_&&(G=S?_(u,w,S,P):_(u)),G!==z)return G;if(!Mi(u))return u;var ye=sn(u);if(ye){if(G=function lx(u){var f=u.length,_=new u.constructor(f);return f&&"string"==typeof u[0]&&ii.call(u,"index")&&(_.index=u.index,_.input=u.input),_}(u),!Y)return Zs(u,G)}else{var be=Hr(u),Xe=be==Pf||be==o0;if(tl(u))return me(u,Y);if(be==Ga||be==ti||Xe&&!S){if(G=Q||Xe?{}:TA(u),!Y)return Q?function ah(u,f){return di(u,sx(u),f)}(u,function fA(u,f){return u&&di(f,Ds(f),u)}(G,u)):function U_(u,f){return di(u,q_(u),f)}(u,V0(G,u))}else{if(!Sn[be])return S?u:{};G=function cx(u,f,_){var w=u.constructor;switch(f){case Lu:return ex(u);case et:case ac:return new w(+u);case _d:return function vF(u,f){var _=f?ex(u.buffer):u.buffer;return new u.constructor(_,u.byteOffset,u.byteLength)}(u,_);case da:case Ff:case Xg:case Lf:case Kg:case Zg:case Nu:case Qg:case Jg:return MA(u,_);case Lo:return new w;case Fu:case lc:return new w(u);case md:return function yF(u){var f=new u.constructor(u.source,_0.exec(u));return f.lastIndex=u.lastIndex,f}(u);case No:return new w;case Of:return function bF(u){return Rd?ai(Rd.call(u)):{}}(u)}}(u,be,Y)}}P||(P=new Jr);var vt=P.get(u);if(vt)return vt;P.set(u,G),Qx(u)?u.forEach(function(zt){G.add(Ms(zt,f,_,zt,u,P))}):Ev(u)&&u.forEach(function(zt,En){G.set(En,Ms(zt,f,_,En,u,P))});var mn=ye?z:(_e?Q?W_:vp:Q?Ds:hr)(u);return In(mn||u,function(zt,En){mn&&(zt=u[En=zt]),Xs(G,En,Ms(zt,f,_,En,u,P))}),G}function D_(u,f,_){var w=_.length;if(null==u)return!w;for(u=ai(u);w--;){var S=_[w],G=u[S];if(G===z&&!(S in u)||!(0,f[S])(G))return!1}return!0}function ip(u,f,_){if("function"!=typeof u)throw new Er(Un);return uh(function(){u.apply(z,_)},f)}function Od(u,f,_,w){var S=-1,P=Sl,G=!0,Y=u.length,Q=[],_e=f.length;if(!Y)return Q;_&&(f=gi(f,Ur(_))),w?(P=Wu,G=!1):f.length>=Kr&&(P=dc,G=!1,f=new Et(f));e:for(;++S-1},Pt.prototype.set=function cA(u,f){var _=this.__data__,w=np(_,u);return w<0?(++this.size,_.push([u,f])):_[w][1]=f,this},ha.prototype.clear=function dA(){this.size=0,this.__data__={hash:new pc,map:new(Jf||Pt),string:new pc}},ha.prototype.delete=function uA(u){var f=Y_(this,u).delete(u);return this.size-=f?1:0,f},ha.prototype.get=function Se(u){return Y_(this,u).get(u)},ha.prototype.has=function zn(u){return Y_(this,u).has(u)},ha.prototype.set=function Ht(u,f){var _=Y_(this,u),w=_.size;return _.set(u,f),this.size+=_.size==w?0:1,this},Et.prototype.add=Et.prototype.push=function Ar(u){return this.__data__.set(u,Ua),this},Et.prototype.has=function N0(u){return this.__data__.has(u)},Jr.prototype.clear=function fa(){this.__data__=new Pt,this.size=0},Jr.prototype.delete=function S_(u){var f=this.__data__,_=f.delete(u);return this.size=f.size,_},Jr.prototype.get=function E_(u){return this.__data__.get(u)},Jr.prototype.has=function hA(u){return this.__data__.has(u)},Jr.prototype.set=function pF(u,f){var _=this.__data__;if(_ instanceof Pt){var w=_.__data__;if(!Jf||w.length0&&_(Y)?f>1?qn(Y,f-1,_,w,S):El(S,Y):w||(S[S.length]=Y)}return S}var Qa=V_(),Di=V_(!0);function ki(u,f){return u&&Qa(u,f,hr)}function I_(u,f){return u&&Di(u,f,hr)}function pa(u,f){return cc(f,function(_){return Fl(u[_])})}function mc(u,f){for(var _=0,w=(f=va(f,u)).length;null!=u&&_f}function rp(u,f){return null!=u&&ii.call(u,f)}function sp(u,f){return null!=u&&f in ai(u)}function op(u,f,_){for(var w=_?Wu:Sl,S=u[0].length,P=u.length,G=P,Y=ae(P),Q=1/0,_e=[];G--;){var ye=u[G];G&&f&&(ye=gi(ye,Ur(f))),Q=Zr(ye.length,Q),Y[G]=!_&&(f||S>=120&&ye.length>=120)?new Et(G&&ye):z}ye=u[0];var be=-1,Xe=Y[0];e:for(;++be=Y?Q:Q*("desc"==_[w]?-1:1)}return u.index-f.index}(P,G,_)})}function q0(u,f,_){for(var w=-1,S=f.length,P={};++w-1;)Y!==u&&hc.call(Y,Q,1),hc.call(u,Q,1);return u}function nh(u,f){for(var _=u?f.length:0,w=_-1;_--;){var S=f[_];if(_==w||S!==P){var P=S;el(S)?hc.call(u,S,1):sh(u,S)}}return u}function ih(u,f){return u+b_(x_()*(f-u+1))}function rh(u,f){var _="";if(!u||f<1||f>Ha)return _;do{f%2&&(_+=u),(f=b_(f/2))&&(u+=u)}while(f);return _}function pn(u,f){return wp(K_(u,f,is),u+"")}function xA(u){return zr(Ic(u))}function K0(u,f){var _=Ic(u);return Cp(_,Il(f,0,_.length))}function Ud(u,f,_,w){if(!Mi(u))return u;for(var S=-1,P=(f=va(f,u)).length,G=P-1,Y=u;null!=Y&&++SS?0:S+f),(_=_>S?S:_)<0&&(_+=S),S=f>_?0:_-f>>>0,f>>>=0;for(var P=ae(S);++w>>1,G=u[P];null!==G&&!As(G)&&(_?G<=f:G=Kr){var _e=f?null:G_(u);if(_e)return Hn(_e);G=!1,S=dc,Q=new Et}else Q=f?[]:Y;e:for(;++w=w?u:ts(u,f,_)}var J0=nA||function(u){return Sr.clearTimeout(u)};function me(u,f){if(f)return u.slice();var _=u.length,w=bs?bs(_):new u.constructor(_);return u.copy(w),w}function ex(u){var f=new u.constructor(u.byteLength);return new v_(f).set(new v_(u)),f}function MA(u,f){var _=f?ex(u.buffer):u.buffer;return new u.constructor(_,u.byteOffset,u.length)}function CA(u,f){if(u!==f){var _=u!==z,w=null===u,S=u==u,P=As(u),G=f!==z,Y=null===f,Q=f==f,_e=As(f);if(!Y&&!_e&&!P&&u>f||P&&G&&Q&&!Y&&!_e||w&&G&&Q||!_&&Q||!S)return 1;if(!w&&!P&&!_e&&u1?_[S-1]:z,G=S>2?_[2]:z;for(P=u.length>3&&"function"==typeof P?(S--,P):z,G&&Tr(_[0],_[1],G)&&(P=S<3?z:P,S=1),f=ai(f);++w-1?S[P?f[G]:G]:z}}function Cs(u){return bo(function(f){var _=f.length,w=_,S=Ai.prototype.thru;for(u&&f.reverse();w--;){var P=f[w];if("function"!=typeof P)throw new Er(Un);if(S&&!G&&"wrapper"==Ja(P))var G=new Ai([],!0)}for(w=G?w:_;++w<_;){var Y=Ja(P=f[w]),Q="wrapper"==Y?j_(P):z;G=Q&&dh(Q[0])&&Q[1]==(Va|oa|aa|la)&&!Q[4].length&&1==Q[9]?G[Ja(Q[0])].apply(G,Q[3]):1==P.length&&dh(P)?G[Y]():G.thru(P)}return function(){var _e=arguments,ye=_e[0];if(G&&1==_e.length&&sn(ye))return G.plant(ye).value();for(var be=0,Xe=_?f[be].apply(this,_e):ye;++be<_;)Xe=f[be].call(this,Xe);return Xe}})}function $d(u,f,_,w,S,P,G,Y,Q,_e){var ye=f&Va,be=f&Pn,Xe=f&cr,vt=f&(oa|wl),Vt=f&fd,mn=Xe?z:pp(u);return function zt(){for(var En=arguments.length,Fn=ae(En),rs=En;rs--;)Fn[rs]=arguments[rs];if(vt)var ss=ba(zt),no=function Xu(X,he){for(var ae=X.length,Ue=0;ae--;)X[ae]===he&&++Ue;return Ue}(Fn,ss);if(w&&(Fn=zd(Fn,w,S,vt)),P&&(Fn=SA(Fn,P,G,vt)),En-=no,vt&&En<_e){var Ti=Gi(Fn,ss);return nx(u,f,$d,zt.placeholder,_,Fn,Ti,Y,Q,_e-En)}var Ts=be?_:this,Mo=Xe?Ts[u]:u;return En=Fn.length,Y?Fn=function Es(u,f){for(var _=u.length,w=Zr(f.length,_),S=Zs(u);w--;){var P=f[w];u[w]=el(P,_)?S[P]:z}return u}(Fn,Y):Vt&&En>1&&Fn.reverse(),ye&&QY))return!1;var _e=P.get(u),ye=P.get(f);if(_e&&ye)return _e==f&&ye==u;var be=-1,Xe=!0,vt=_&Fo?new Et:z;for(P.set(u,f),P.set(f,u);++be-1&&u%1==0&&u1?"& ":"")+f[w],f=f.join(_>2?", ":" "),u.replace(m0,"{\n/* [wrapped with "+f+"] */\n")}(w,function OA(u,f){return In(s0,function(_){var w="_."+_[0];f&_[1]&&!Sl(u,w)&&u.push(w)}),u.sort()}(function ox(u){var f=u.match(Mr);return f?f[1].split(kE):[]}(w),_)))}function px(u){var f=0,_=0;return function(){var w=uF(),S=Yg-(w-_);if(_=w,S>0){if(++f>=yE)return arguments[0]}else f=0;return u.apply(z,arguments)}}function Cp(u,f){var _=-1,w=u.length,S=w-1;for(f=f===z?w:f;++_1?u[f-1]:z;return _="function"==typeof _?(u.pop(),_):z,ph(u,_)});function Nx(u){var f=I(u);return f.__chain__=!0,f}function Tp(u,f){return f(u)}var Bx=bo(function(u){var f=u.length,_=f?u[0]:0,w=this.__wrapped__,S=function(P){return Ju(P,u)};return!(f>1||this.__actions__.length)&&w instanceof Rn&&el(_)?((w=w.slice(_,+_+(f?1:0))).__actions__.push({func:Tp,args:[S],thisArg:z}),new Ai(w,this.__chain__).thru(function(P){return f&&!P.length&&P.push(z),P})):this.thru(S)}),e1=hp(function(u,f,_){ii.call(u,_)?++u[_]:Uo(u,_,1)}),Vx=AA(xx),Rp=AA(tv);function _v(u,f){return(sn(u)?In:Za)(u,Nt(f,3))}function Ol(u,f){return(sn(u)?sF:T_)(u,Nt(f,3))}var n1=hp(function(u,f,_){ii.call(u,_)?u[_].push(f):Uo(u,_,[f])}),s1=pn(function(u,f,_){var w=-1,S="function"==typeof f,P=Js(u)?ae(u.length):[];return Za(u,function(G){P[++w]=S?_s(f,G,_):ma(G,f,_)}),P}),o1=hp(function(u,f,_){Uo(u,_,f)});function kp(u,f){return(sn(u)?gi:eh)(u,Nt(f,3))}var xa=hp(function(u,f,_){u[_?0:1].push(f)},function(){return[[],[]]}),p1=pn(function(u,f){if(null==u)return[];var _=f.length;return _>1&&Tr(u,f[0],f[1])?f=[]:_>2&&Tr(f[0],f[1],f[2])&&(f=[f[0]]),F_(u,qn(f,1),[])}),Pp=oF||function(){return Sr.Date.now()};function gh(u,f,_){return f=_?z:f,yo(u,Va,z,z,z,z,f=u&&null==f?u.length:f)}function wa(u,f){var _;if("function"!=typeof f)throw new Er(Un);return u=un(u),function(){return--u>0&&(_=f.apply(this,arguments)),u<=1&&(f=z),_}}var Ec=pn(function(u,f,_){var w=Pn;if(_.length){var S=Gi(_,ba(Ec));w|=aa}return yo(u,w,f,_,S)}),vv=pn(function(u,f,_){var w=Pn|cr;if(_.length){var S=Gi(_,ba(vv));w|=aa}return yo(f,w,u,_,S)});function g1(u,f,_){var w,S,P,G,Y,Q,_e=0,ye=!1,be=!1,Xe=!0;if("function"!=typeof u)throw new Er(Un);function vt(Ti){var Ts=w,Mo=S;return w=S=z,_e=Ti,G=u.apply(Mo,Ts)}function zt(Ti){var Ts=Ti-Q;return Q===z||Ts>=f||Ts<0||be&&Ti-_e>=P}function En(){var Ti=Pp();if(zt(Ti))return Fn(Ti);Y=uh(En,function mn(Ti){var ED=f-(Ti-Q);return be?Zr(ED,P-(Ti-_e)):ED}(Ti))}function Fn(Ti){return Y=z,Xe&&w?vt(Ti):(w=S=z,G)}function no(){var Ti=Pp(),Ts=zt(Ti);if(w=arguments,S=this,Q=Ti,Ts){if(Y===z)return function Vt(Ti){return _e=Ti,Y=uh(En,f),ye?vt(Ti):G}(Q);if(be)return J0(Y),Y=uh(En,f),vt(Q)}return Y===z&&(Y=uh(En,f)),G}return f=xo(f)||0,Mi(_)&&(ye=!!_.leading,P=(be="maxWait"in _)?ur(xo(_.maxWait)||0,f):P,Xe="trailing"in _?!!_.trailing:Xe),no.cancel=function rs(){Y!==z&&J0(Y),_e=0,w=Q=S=Y=z},no.flush=function ss(){return Y===z?G:Fn(Pp())},no}var TF=pn(function(u,f){return ip(u,1,f)}),IF=pn(function(u,f,_){return ip(u,xo(f)||0,_)});function jd(u,f){if("function"!=typeof u||null!=f&&"function"!=typeof f)throw new Er(Un);var _=function(){var w=arguments,S=f?f.apply(this,w):w[0],P=_.cache;if(P.has(S))return P.get(S);var G=u.apply(this,w);return _.cache=P.set(S,G)||P,G};return _.cache=new(jd.Cache||ha),_}function wv(u){if("function"!=typeof u)throw new Er(Un);return function(){var f=arguments;switch(f.length){case 0:return!u.call(this);case 1:return!u.call(this,f[0]);case 2:return!u.call(this,f[0],f[1]);case 3:return!u.call(this,f[0],f[1],f[2])}return!u.apply(this,f)}}jd.Cache=ha;var $x=Vd(function(u,f){var _=(f=1==f.length&&sn(f[0])?gi(f[0],Ur(Nt())):gi(qn(f,1),Ur(Nt()))).length;return pn(function(w){for(var S=-1,P=Zr(w.length,_);++S=f}),Ac=Nd(function(){return arguments}())?Nd:function(u){return Pi(u)&&ii.call(u,"callee")&&!Ed.call(u,"callee")},sn=ae.isArray,kF=h_?Ur(h_):function _A(u){return Pi(u)&&es(u)==Lu};function Js(u){return null!=u&&Up(u.length)&&!Fl(u)}function wi(u){return Pi(u)&&Js(u)}var tl=lF||Zd,Xx=C0?Ur(C0):function mF(u){return Pi(u)&&es(u)==ac};function Np(u){if(!Pi(u))return!1;var f=es(u);return f==pd||f==ME||"string"==typeof u.message&&"string"==typeof u.name&&!eo(u)}function Fl(u){if(!Mi(u))return!1;var f=es(u);return f==Pf||f==o0||f==wE||f==SE}function Bp(u){return"number"==typeof u&&u==un(u)}function Up(u){return"number"==typeof u&&u>-1&&u%1==0&&u<=Ha}function Mi(u){var f=typeof u;return null!=u&&("object"==f||"function"==f)}function Pi(u){return null!=u&&"object"==typeof u}var Ev=Ft?Ur(Ft):function vA(u){return Pi(u)&&Hr(u)==Lo};function _h(u){return"number"==typeof u||Pi(u)&&es(u)==Fu}function eo(u){if(!Pi(u)||es(u)!=Ga)return!1;var f=xs(u);if(null===f)return!0;var _=ii.call(f,"constructor")&&f.constructor;return"function"==typeof _&&_ instanceof _&&Al.call(_)==D0}var zp=Gf?Ur(Gf):function _F(u){return Pi(u)&&es(u)==md},Qx=S0?Ur(S0):function P_(u){return Pi(u)&&Hr(u)==No};function Hp(u){return"string"==typeof u||!sn(u)&&Pi(u)&&es(u)==lc}function As(u){return"symbol"==typeof u||Pi(u)&&es(u)==Of}var Ho=js?Ur(js):function $0(u){return Pi(u)&&Up(u.length)&&!!Ei[es(u)]},Iv=_p(ap),I1=_p(function(u,f){return u<=f});function Rv(u){if(!u)return[];if(Js(u))return Hp(u)?_o(u):Zs(u);if(Qu&&u[Qu])return function eA(X){for(var he,ae=[];!(he=X.next()).done;)ae.push(he.value);return ae}(u[Qu]());var f=Hr(u);return(f==Lo?Yf:f==No?Hn:Ic)(u)}function nl(u){return u?(u=xo(u))===Tn||u===-Tn?(u<0?-1:1)*xE:u==u?u:0:0===u?u:0}function un(u){var f=nl(u),_=f%1;return f==f?_?f-_:f:0}function R1(u){return u?Il(un(u),0,ca):0}function xo(u){if("number"==typeof u)return u;if(As(u))return kf;if(Mi(u)){var f="function"==typeof u.valueOf?u.valueOf():u;u=Mi(f)?f+"":f}if("string"!=typeof u)return 0===u?u:+u;u=$n(u);var _=$a.test(u);return _||tr.test(u)?iF(u.slice(2),_?2:8):LE.test(u)?kf:+u}function Ll(u){return di(u,Ds(u))}function On(u){return null==u?"":Ks(u)}var mt=Dr(function(u,f){if(xp(f)||Js(f))di(f,hr(f),u);else for(var _ in f)ii.call(f,_)&&Xs(u,_,f[_])}),Jx=Dr(function(u,f){di(f,Ds(f),u)}),Nl=Dr(function(u,f,_,w){di(f,Ds(f),u,w)}),il=Dr(function(u,f,_,w){di(f,hr(f),u,w)}),P1=bo(Ju),Tc=pn(function(u,f){u=ai(u);var _=-1,w=f.length,S=w>2?f[2]:z;for(S&&Tr(f[0],f[1],S)&&(w=1);++_1),P}),di(u,W_(u),_),w&&(_=Ms(_,Si|ms|Gs,ya));for(var S=f.length;S--;)sh(_,f[S]);return _}),G1=bo(function(u,f){return null==u?{}:function Y0(u,f){return q0(u,f,function(_,w){return Lv(u,w)})}(u,f)});function Nv(u,f){if(null==u)return{};var _=gi(W_(u),function(w){return[w]});return f=Nt(f),q0(u,_,function(w,S){return f(w,S[0])})}var iw=lh(hr),Bv=lh(Ds);function Ic(u){return null==u?[]:qu(u,hr(u))}var V=Gd(function(u,f,_){return f=f.toLowerCase(),u+(_?Uv(f):f)});function Uv(u){return Xd(On(u).toLowerCase())}function Vv(u){return(u=On(u))&&u.replace(mo,QE).replace(KO,"")}var tD=Gd(function(u,f,_){return u+(_?"-":"")+f.toLowerCase()}),sw=Gd(function(u,f,_){return u+(_?" ":"")+f.toLowerCase()}),nD=Hd("toLowerCase"),zv=Gd(function(u,f,_){return u+(_?"_":"")+f.toLowerCase()}),sD=Gd(function(u,f,_){return u+(_?" ":"")+Xd(f)}),cw=Gd(function(u,f,_){return u+(_?" ":"")+f.toUpperCase()}),Xd=Hd("toUpperCase");function dw(u,f,_){return u=On(u),(f=_?z:f)===z?function en(X){return YE.test(X)}(u)?function fn(X){return X.match(ZO)||[]}(u):function ZE(X){return X.match(PE)||[]}(u):u.match(f)||[]}var Gv=pn(function(u,f){try{return _s(u,z,f)}catch(_){return Np(_)?_:new jt(_)}}),cD=bo(function(u,f){return In(f,function(_){_=Vo(_),Uo(u,_,Ec(u[_],u))}),u});function $v(u){return function(){return u}}var uw=Cs(),fD=Cs(!0);function is(u){return u}function Gp(u){return O_("function"==typeof u?u:Ms(u,Si))}var jv=pn(function(u,f){return function(_){return ma(_,u,f)}}),pD=pn(function(u,f){return function(_){return ma(u,_,f)}});function hw(u,f,_){var w=hr(f),S=pa(f,w);null==_&&(!Mi(f)||!S.length&&w.length)&&(_=f,f=u,u=this,S=pa(f,hr(f)));var P=!(Mi(_)&&"chain"in _&&!_.chain),G=Fl(u);return In(S,function(Y){var Q=f[Y];u[Y]=Q,G&&(u.prototype[Y]=function(){var _e=this.__chain__;if(P||_e){var ye=u(this.__wrapped__);return(ye.__actions__=Zs(this.__actions__)).push({func:Q,args:arguments,thisArg:u}),ye.__chain__=_e,ye}return Q.apply(u,El([this.value()],arguments))})}),u}function wo(){}var fw=mp(gi),gD=mp(XE),_D=mp($f);function vh(u){return dx(u)?p_(Vo(u)):function ga(u){return function(f){return mc(f,u)}}(u)}var Yv=tx(),yh=tx(!0);function bh(){return[]}function Zd(){return!1}var vD=z_(function(u,f){return u+f},0),yD=H_("ceil"),gw=z_(function(u,f){return u/f},1),bD=H_("floor"),CD=z_(function(u,f){return u*f},1),HF=H_("round"),Qv=z_(function(u,f){return u-f},0);return I.after=function m1(u,f){if("function"!=typeof f)throw new Er(Un);return u=un(u),function(){if(--u<1)return f.apply(this,arguments)}},I.ary=gh,I.assign=mt,I.assignIn=Jx,I.assignInWith=Nl,I.assignWith=il,I.at=P1,I.before=wa,I.bind=Ec,I.bindAll=cD,I.bindKey=vv,I.castArray=function y1(){if(!arguments.length)return[];var u=arguments[0];return sn(u)?u:[u]},I.chain=Nx,I.chunk=function J_(u,f,_){f=(_?Tr(u,f,_):f===z)?1:ur(un(f),0);var w=null==u?0:u.length;if(!w||f<1)return[];for(var S=0,P=0,G=ae(y_(w/f));SS?0:S+_),(w=w===z||w>S?S:un(w))<0&&(w+=S),w=_>w?0:R1(w);_>>0)?(u=On(u))&&("string"==typeof f||null!=f&&!zp(f))&&!(f=Ks(f))&&Md(u)?xc(_o(u),0,_):u.split(f,_):[]},I.spread=function jx(u,f){if("function"!=typeof u)throw new Er(Un);return f=null==f?0:ur(un(f),0),pn(function(_){var w=_[f],S=xc(_,0,f);return w&&El(S,w),_s(u,this,S)})},I.tail=function Sc(u){var f=null==u?0:u.length;return f?ts(u,1,f):[]},I.take=function Ix(u,f,_){return u&&u.length?ts(u,0,(f=_||f===z?1:un(f))<0?0:f):[]},I.takeRight=function Rx(u,f,_){var w=null==u?0:u.length;return w?ts(u,(f=w-(f=_||f===z?1:un(f)))<0?0:f,w):[]},I.takeRightWhile=function qA(u,f){return u&&u.length?oh(u,Nt(f,3),!1,!0):[]},I.takeWhile=function AF(u,f){return u&&u.length?oh(u,Nt(f,3)):[]},I.tap=function ZA(u,f){return f(u),u},I.throttle=function Op(u,f,_){var w=!0,S=!0;if("function"!=typeof u)throw new Er(Un);return Mi(_)&&(w="leading"in _?!!_.leading:w,S="trailing"in _?!!_.trailing:S),g1(u,f,{leading:w,maxWait:f,trailing:S})},I.thru=Tp,I.toArray=Rv,I.toPairs=iw,I.toPairsIn=Bv,I.toPath=function mw(u){return sn(u)?gi(u,Vo):As(u)?[u]:Zs(mx(On(u)))},I.toPlainObject=Ll,I.transform=function j1(u,f,_){var w=sn(u),S=w||tl(u)||Ho(u);if(f=Nt(f,4),null==_){var P=u&&u.constructor;_=S?w?new P:[]:Mi(u)&&Fl(P)?kd(xs(u)):{}}return(S?In:ki)(u,function(G,Y,Q){return f(_,G,Y,Q)}),_},I.unary=function Yx(u){return gh(u,1)},I.union=Ep,I.unionBy=XA,I.unionWith=kx,I.uniq=function Px(u){return u&&u.length?ri(u):[]},I.uniqBy=function Ox(u,f){return u&&u.length?ri(u,Nt(f,2)):[]},I.uniqWith=function dv(u,f){return f="function"==typeof f?f:z,u&&u.length?ri(u,z,f):[]},I.unset=function Y1(u,f){return null==u||sh(u,f)},I.unzip=Ap,I.unzipWith=ph,I.update=function q1(u,f,_){return null==u?u:Q0(u,f,up(_))},I.updateWith=function X1(u,f,_,w){return w="function"==typeof w?w:z,null==u?u:Q0(u,f,up(_),w)},I.values=Ic,I.valuesIn=function K1(u){return null==u?[]:qu(u,Ds(u))},I.without=Dp,I.words=dw,I.wrap=function Cv(u,f){return Mv(up(f),u)},I.xor=Fx,I.xorBy=uv,I.xorWith=hv,I.zip=fv,I.zipObject=function mh(u,f){return bc(u||[],f||[],Xs)},I.zipObjectDeep=function KA(u,f){return bc(u||[],f||[],Ud)},I.zipWith=Lx,I.entries=iw,I.entriesIn=Bv,I.extend=Jx,I.extendWith=Nl,hw(I,I),I.add=vD,I.attempt=Gv,I.camelCase=V,I.capitalize=Uv,I.ceil=yD,I.clamp=function Z1(u,f,_){return _===z&&(_=f,f=z),_!==z&&(_=(_=xo(_))==_?_:0),f!==z&&(f=(f=xo(f))==f?f:0),Il(xo(u),f,_)},I.clone=function Xn(u){return Ms(u,Gs)},I.cloneDeep=function x1(u){return Ms(u,Si|Gs)},I.cloneDeepWith=function Fp(u,f){return Ms(u,Si|Gs,f="function"==typeof f?f:z)},I.cloneWith=function b1(u,f){return Ms(u,Gs,f="function"==typeof f?f:z)},I.conformsTo=function qx(u,f){return null==f||D_(u,f,hr(f))},I.deburr=Vv,I.defaultTo=function hD(u,f){return null==u||u!=u?f:u},I.divide=gw,I.endsWith=function J1(u,f,_){u=On(u),f=Ks(f);var w=u.length,S=_=_===z?w:Il(un(_),0,w);return(_-=f.length)>=0&&u.slice(_,S)==f},I.eq=zo,I.escape=function eD(u){return(u=On(u))&&RE.test(u)?u.replace(c0,st):u},I.escapeRegExp=function rw(u){return(u=On(u))&&f0.test(u)?u.replace(n_,"\\$&"):u},I.every=function mv(u,f,_){var w=sn(u)?XE:z0;return _&&Tr(u,f,_)&&(f=z),w(u,Nt(f,3))},I.find=Vx,I.findIndex=xx,I.findKey=function kv(u,f){return ee(u,Nt(f,3),ki)},I.findLast=Rp,I.findLastIndex=tv,I.findLastKey=function Pv(u,f){return ee(u,Nt(f,3),I_)},I.floor=bD,I.forEach=_v,I.forEachRight=Ol,I.forIn=function L1(u,f){return null==u?u:Qa(u,Nt(f,3),Ds)},I.forInRight=function Ov(u,f){return null==u?u:Di(u,Nt(f,3),Ds)},I.forOwn=function rl(u,f){return u&&ki(u,Nt(f,3))},I.forOwnRight=function N1(u,f){return u&&I_(u,Nt(f,3))},I.get=Fv,I.gt=w1,I.gte=M1,I.has=function V1(u,f){return null!=u&&ax(u,f,rp)},I.hasIn=Lv,I.head=Mx,I.identity=is,I.includes=function r1(u,f,_,w){u=Js(u)?u:Ic(u),_=_&&!w?un(_):0;var S=u.length;return _<0&&(_=ur(S+_,0)),Hp(u)?_<=S&&u.indexOf(f,_)>-1:!!S&&Lt(u,f,_)>-1},I.indexOf=function fh(u,f,_){var w=null==u?0:u.length;if(!w)return-1;var S=null==_?0:un(_);return S<0&&(S=ur(w+S,0)),Lt(u,f,S)},I.inRange=function Q1(u,f,_){return f=nl(f),_===z?(_=f,f=0):_=nl(_),function R_(u,f,_){return u>=Zr(f,_)&&u=-Ha&&u<=Ha},I.isSet=Qx,I.isString=Hp,I.isSymbol=As,I.isTypedArray=Ho,I.isUndefined=function A1(u){return u===z},I.isWeakMap=function D1(u){return Pi(u)&&Hr(u)==gd},I.isWeakSet=function T1(u){return Pi(u)&&"[object WeakSet]"==es(u)},I.join=function Cx(u,f){return null==u?"":cF.call(u,f)},I.kebabCase=tD,I.last=Ir,I.lastIndexOf=function ov(u,f,_){var w=null==u?0:u.length;if(!w)return-1;var S=w;return _!==z&&(S=(S=un(_))<0?ur(w+S,0):Zr(S,w-1)),f==f?function Cd(X,he,ae){for(var Ue=ae+1;Ue--;)if(X[Ue]===he)return Ue;return Ue}(u,f,S):Yu(u,jf,S,!0)},I.lowerCase=sw,I.lowerFirst=nD,I.lt=Iv,I.lte=I1,I.max=function _w(u){return u&&u.length?Fd(u,is,Ld):z},I.maxBy=function vw(u,f){return u&&u.length?Fd(u,Nt(f,2),Ld):z},I.mean=function xD(u){return wd(u,is)},I.meanBy=function wD(u,f){return wd(u,Nt(f,2))},I.min=function to(u){return u&&u.length?Fd(u,is,ap):z},I.minBy=function MD(u,f){return u&&u.length?Fd(u,Nt(f,2),ap):z},I.stubArray=bh,I.stubFalse=Zd,I.stubObject=function pw(){return{}},I.stubString=function qv(){return""},I.stubTrue=function Xv(){return!0},I.multiply=CD,I.nth=function Sx(u,f){return u&&u.length?bA(u,un(f)):z},I.noConflict=function E(){return Sr._===this&&(Sr._=Xf),this},I.noop=wo,I.now=Pp,I.pad=function iD(u,f,_){u=On(u);var w=(f=un(f))?dr(u):0;if(!f||w>=f)return u;var S=(f-w)/2;return gp(b_(S),_)+u+gp(y_(S),_)},I.padEnd=function LF(u,f,_){u=On(u);var w=(f=un(f))?dr(u):0;return f&&wf){var w=u;u=f,f=w}if(_||u%1||f%1){var S=x_();return Zr(u+S*(f-u+Re("1e-"+((S+"").length-1))),f)}return ih(u,f)},I.reduce=function a1(u,f,_){var w=sn(u)?f_:E0,S=arguments.length<3;return w(u,Nt(f,4),_,S,Za)},I.reduceRight=function l1(u,f,_){var w=sn(u)?KE:E0,S=arguments.length<3;return w(u,Nt(f,4),_,S,T_)},I.repeat=function $i(u,f,_){return f=(_?Tr(u,f,_):f===z)?1:un(f),rh(On(u),f)},I.replace=function rD(){var u=arguments,f=On(u[0]);return u.length<3?f:f.replace(u[1],u[2])},I.result=function $1(u,f,_){var w=-1,S=(f=va(f,u)).length;for(S||(S=1,u=z);++wHa)return[];var _=ca,w=Zr(u,ca);f=Nt(f),u-=ca;for(var S=Ys(w,f);++_=P)return u;var Y=_-dr(w);if(Y<1)return w;var Q=G?xc(G,0,Y).join(""):u.slice(0,Y);if(S===z)return Q+w;if(G&&(Y+=Q.length-Y),zp(S)){if(u.slice(Y).search(S)){var _e,ye=Q;for(S.global||(S=uc(S.source,On(_0.exec(S))+"g")),S.lastIndex=0;_e=S.exec(ye);)var be=_e.index;Q=Q.slice(0,be===z?Y:be)}}else if(u.indexOf(Ks(S),Y)!=Y){var Xe=Q.lastIndexOf(S);Xe>-1&&(Q=Q.slice(0,Xe))}return Q+w},I.unescape=function lD(u){return(u=On(u))&&IE.test(u)?u.replace(l0,qf):u},I.uniqueId=function Zv(u){var f=++bi;return On(u)+f},I.upperCase=cw,I.upperFirst=Xd,I.each=_v,I.eachRight=Ol,I.first=Mx,hw(I,function(){var u={};return ki(I,function(f,_){ii.call(I.prototype,_)||(u[_]=f)}),u}(),{chain:!1}),I.VERSION="4.17.21",In(["bind","bindKey","curry","curryRight","partial","partialRight"],function(u){I[u].placeholder=I}),In(["drop","take"],function(u,f){Rn.prototype[u]=function(_){_=_===z?1:ur(un(_),0);var w=this.__filtered__&&!f?new Rn(this):this.clone();return w.__filtered__?w.__takeCount__=Zr(_,w.__takeCount__):w.__views__.push({size:Zr(_,ca),type:u+(w.__dir__<0?"Right":"")}),w},Rn.prototype[u+"Right"]=function(_){return this.reverse()[u](_).reverse()}}),In(["filter","map","takeWhile"],function(u,f){var _=f+1,w=1==_||3==_;Rn.prototype[u]=function(S){var P=this.clone();return P.__iteratees__.push({iteratee:Nt(S,3),type:_}),P.__filtered__=P.__filtered__||w,P}}),In(["head","last"],function(u,f){var _="take"+(f?"Right":"");Rn.prototype[u]=function(){return this[_](1).value()[0]}}),In(["initial","tail"],function(u,f){var _="drop"+(f?"":"Right");Rn.prototype[u]=function(){return this.__filtered__?new Rn(this):this[_](1)}}),Rn.prototype.compact=function(){return this.filter(is)},Rn.prototype.find=function(u){return this.filter(u).head()},Rn.prototype.findLast=function(u){return this.reverse().find(u)},Rn.prototype.invokeMap=pn(function(u,f){return"function"==typeof u?new Rn(this):this.map(function(_){return ma(_,u,f)})}),Rn.prototype.reject=function(u){return this.filter(wv(Nt(u)))},Rn.prototype.slice=function(u,f){u=un(u);var _=this;return _.__filtered__&&(u>0||f<0)?new Rn(_):(u<0?_=_.takeRight(-u):u&&(_=_.drop(u)),f!==z&&(_=(f=un(f))<0?_.dropRight(-f):_.take(f-u)),_)},Rn.prototype.takeRightWhile=function(u){return this.reverse().takeWhile(u).reverse()},Rn.prototype.toArray=function(){return this.take(ca)},ki(Rn.prototype,function(u,f){var _=/^(?:filter|find|map|reject)|While$/.test(f),w=/^(?:head|last)$/.test(f),S=I[w?"take"+("last"==f?"Right":""):f],P=w||/^find/.test(f);S&&(I.prototype[f]=function(){var G=this.__wrapped__,Y=w?[1]:arguments,Q=G instanceof Rn,_e=Y[0],ye=Q||sn(G),be=function(En){var Fn=S.apply(I,El([En],Y));return w&&Xe?Fn[0]:Fn};ye&&_&&"function"==typeof _e&&1!=_e.length&&(Q=ye=!1);var Xe=this.__chain__,Vt=P&&!Xe,mn=Q&&!this.__actions__.length;if(!P&&ye){G=mn?G:new Rn(this);var zt=u.apply(G,Y);return zt.__actions__.push({func:Tp,args:[be],thisArg:z}),new Ai(zt,Xe)}return Vt&&mn?u.apply(this,Y):(zt=this.thru(be),Vt?w?zt.value()[0]:zt.value():zt)})}),In(["pop","push","shift","sort","splice","unshift"],function(u){var f=nr[u],_=/^(?:push|sort|unshift)$/.test(u)?"tap":"thru",w=/^(?:pop|shift)$/.test(u);I.prototype[u]=function(){var S=arguments;if(w&&!this.__chain__){var P=this.value();return f.apply(sn(P)?P:[],S)}return this[_](function(G){return f.apply(sn(G)?G:[],S)})}}),ki(Rn.prototype,function(u,f){var _=I[f];if(_){var w=_.name+"";ii.call(Id,w)||(Id[w]=[]),Id[w].push({name:f,func:_})}}),Id[$d(z,cr).name]=[{name:"wrapper",func:z}],Rn.prototype.clone=function O0(){var u=new Rn(this.__wrapped__);return u.__actions__=Zs(this.__actions__),u.__dir__=this.__dir__,u.__filtered__=this.__filtered__,u.__iteratees__=Zs(this.__iteratees__),u.__takeCount__=this.__takeCount__,u.__views__=Zs(this.__views__),u},Rn.prototype.reverse=function Pd(){if(this.__filtered__){var u=new Rn(this);u.__dir__=-1,u.__filtered__=!0}else(u=this.clone()).__dir__*=-1;return u},Rn.prototype.value=function ws(){var u=this.__wrapped__.value(),f=this.__dir__,_=sn(u),w=f<0,S=_?u.length:0,P=function bp(u,f,_){for(var w=-1,S=_.length;++w=this.__values__.length;return{done:u,value:u?z:this.__values__[this.__index__++]}},I.prototype.plant=function QA(u){for(var f,_=this;_ instanceof fc;){var w=ns(_);w.__index__=0,w.__values__=z,f?S.__wrapped__=w:f=w;var S=w;_=_.__wrapped__}return S.__wrapped__=u,f},I.prototype.reverse=function JA(){var u=this.__wrapped__;if(u instanceof Rn){var f=u;return this.__actions__.length&&(f=new Rn(this)),(f=f.reverse()).__actions__.push({func:Tp,args:[av],thisArg:z}),new Ai(f,this.__chain__)}return this.thru(av)},I.prototype.toJSON=I.prototype.valueOf=I.prototype.value=function DF(){return _a(this.__wrapped__,this.__actions__)},I.prototype.first=I.prototype.head,Qu&&(I.prototype[Qu]=function Wd(){return this}),I}();Sr._=ys,(dn=function(){return ys}.call(zs,ps,zs,Oo))!==z&&(Oo.exports=dn)}.call(this)},738:function(Oo){var zs;Oo.exports=((zs=function(){function ps(Ci){return Br.appendChild(Ci.dom),Ci}function dn(Ci){for(var Si=0;SiQt+1e3&&(xl.update(1e3*Un/(Ci-Qt),100),Qt=Ci,Un=0,Hs)){var Si=performance.memory;Hs.update(Si.usedJSHeapSize/1048576,Si.jsHeapSizeLimit/1048576)}return Ci},update:function(){Kr=this.end()},domElement:Br,setMode:dn}}).Panel=function(ps,dn,z){var Br=1/0,Kr=0,Qt=Math.round,Un=Qt(window.devicePixelRatio||1),xl=80*Un,Ua=48*Un,Hs=3*Un,Ci=2*Un,Si=3*Un,ms=15*Un,Gs=74*Un,$s=30*Un,Fo=document.createElement("canvas");Fo.width=xl,Fo.height=Ua,Fo.style.cssText="width:80px;height:48px";var Pn=Fo.getContext("2d");return Pn.font="bold "+9*Un+"px Helvetica,Arial,sans-serif",Pn.textBaseline="top",Pn.fillStyle=z,Pn.fillRect(0,0,xl,Ua),Pn.fillStyle=dn,Pn.fillText(ps,Hs,Ci),Pn.fillRect(Si,ms,Gs,$s),Pn.fillStyle=z,Pn.globalAlpha=.9,Pn.fillRect(Si,ms,Gs,$s),{dom:Fo,update:function(cr,oc){Br=Math.min(Br,cr),Kr=Math.max(Kr,cr),Pn.fillStyle=z,Pn.globalAlpha=1,Pn.fillRect(0,0,xl,ms),Pn.fillStyle=dn,Pn.fillText(Qt(cr)+" "+ps+" ("+Qt(Br)+"-"+Qt(Kr)+")",Hs,Ci),Pn.drawImage(Fo,Si+Un,ms,Gs-Un,$s,Si,ms,Gs-Un,$s),Pn.fillRect(Si+Gs-Un,ms,Un,$s),Pn.fillStyle=z,Pn.globalAlpha=.9,Pn.fillRect(Si+Gs-Un,ms,Un,Qt((1-cr/oc)*$s))}}},zs)}},Oo=>{Oo(Oo.s=651)}]); \ No newline at end of file From 78529a3c51162a9e00c4263adf0d05b01fe8565e Mon Sep 17 00:00:00 2001 From: andy Date: Mon, 3 Feb 2025 17:54:45 +0200 Subject: [PATCH 26/36] TRK serializer code adjustments --- serializers/maps.py | 61 ++++++++++++++++++++++++--------------------- 1 file changed, 33 insertions(+), 28 deletions(-) diff --git a/serializers/maps.py b/serializers/maps.py index ef4b2a8..1245a3c 100644 --- a/serializers/maps.py +++ b/serializers/maps.py @@ -601,19 +601,33 @@ def serialize(self, data: dict, path: str, id=None, block=None, **kwargs): from library import require_resource try: (_, _, texture_map), _ = require_resource(id[:-3] + 'COL__extrablocks/0/data_records/data') - def get_texture(tex): return f"{texture_map[tex]['texture_number']:04}", texture_map[tex]['alignment_data'] except Exception: if self.settings.print_errors: traceback.print_exc() - texture_map = [] - def get_texture(tex): return f"{tex:04}", 0 blocks = [] for sb in data['superblocks']: blocks += sb['blocks'] + + map_scene = Scene(name='map', + obj_name='map', + mtl_name='terrain', + mtl_texture_path_func=lambda x: f'{x}.png', + skip_obj_export=self.settings.maps__save_as_chunked) + scenes = [map_scene] + + # add road spline to map scene + spline = data['block_positions'] + curve = { + 'name': 'road_path', + 'closed': True, + 'points': [[p['x'], p['z'], p['y']] for p in spline], + } + map_scene.curves.append(curve) + chunks = [] for block in blocks: model = Mesh() @@ -682,29 +696,20 @@ def get_texture(tex): mesh.change_axes(new_z='y', new_y='z') if self.settings.maps__save_as_chunked: for i, (meshes, pivot) in enumerate(chunks): - with open(os.path.join(path, f'terrain_chunk_{i}.obj'), 'w') as f: - face_index_increment = 1 - for mesh in meshes: - mesh.pivot_offset = (mesh.pivot_offset[0] - pivot[0], - mesh.pivot_offset[1] - pivot[1], - mesh.pivot_offset[2] - pivot[2]) - obj, fii = mesh.to_obj(face_index_increment) - f.write(obj) - face_index_increment += fii - # TODO export to gg here - if not self.settings.geometry__save_obj: - if self.settings.maps__save_as_chunked: - for i in range(len(chunks)): - os.unlink(os.path.join(os.getcwd(), path, f'terrain_chunk_{i}.obj')) - else: - os.unlink(os.path.join(os.getcwd(), path, 'terrain.obj')) - os.unlink(os.path.join(os.getcwd(), path, 'terrain.mtl')) + for mesh in meshes: + mesh.pivot_offset = (mesh.pivot_offset[0] - pivot[0], + mesh.pivot_offset[1] - pivot[1], + mesh.pivot_offset[2] - pivot[2]) + scene = Scene(name=f'terrain_chunk_{i}', + sub_meshes=meshes, + obj_name=f'terrain_chunk_{i}', + mtl_name='terrain', + bake_textures=False, + skip_mtl_export=True) + scenes.append(scene) else: - with open(os.path.join(path, 'terrain.obj'), 'w') as f: - face_index_increment = 1 - for chunk in chunks: - for mesh in chunk: - obj, fii = mesh.to_obj(face_index_increment) - f.write(obj) - face_index_increment += fii - # ObjExporter().handle_obj(settings=self.settings, path=path, obj_name='terrain.obj') + for chunk in chunks: + map_scene.sub_meshes.extend(chunk) + + # export scenes + export_scenes(scenes, path, self.settings) From 21a882eb36c432a3e0656735821054cd612117ea Mon Sep 17 00:00:00 2001 From: andy Date: Tue, 4 Feb 2025 01:38:40 +0200 Subject: [PATCH 27/36] TRK fixed mesh offsets --- serializers/maps.py | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) diff --git a/serializers/maps.py b/serializers/maps.py index 1245a3c..b234868 100644 --- a/serializers/maps.py +++ b/serializers/maps.py @@ -601,11 +601,13 @@ def serialize(self, data: dict, path: str, id=None, block=None, **kwargs): from library import require_resource try: (_, _, texture_map), _ = require_resource(id[:-3] + 'COL__extrablocks/0/data_records/data') + def get_texture(tex): return f"{texture_map[tex]['texture_number']:04}", texture_map[tex]['alignment_data'] except Exception: if self.settings.print_errors: traceback.print_exc() + def get_texture(tex): return f"{tex:04}", 0 blocks = [] @@ -637,7 +639,7 @@ def get_texture(tex): if block['block_idx'] < len(blocks) - 1 else 0 ] - model.pivot_offset = (pivot['x'], pivot['y'], pivot['z']) + model.pivot_offset = (-pivot['x'], -pivot['y'], -pivot['z']) vertices = [[v['x'], v['y'], v['z']] for v in block['vertices']] for v in vertices[:block['nv8']]: v[0] += next_pivot['x'] - pivot['x'] @@ -673,7 +675,7 @@ def get_texture(tex): if proxy['type'] == 'static_prop' else \ proxy['position']['data']['frames'][0]['position'] model = Mesh() - model.pivot_offset = (position['x'], position['y'], position['z']) + model.pivot_offset = (-position['x'], -position['y'], -position['z']) for p in object['polygons']: texture_name, texture_alignment = get_texture(p['texture']) uvs = [[0, 1], [1, 1], [1, 0], [0, 0]] @@ -695,11 +697,11 @@ def get_texture(tex): mesh.pivot_offset = (mesh.pivot_offset[0], mesh.pivot_offset[2], mesh.pivot_offset[1]) mesh.change_axes(new_z='y', new_y='z') if self.settings.maps__save_as_chunked: - for i, (meshes, pivot) in enumerate(chunks): + for i, (meshes, chunk_pos) in enumerate(chunks): for mesh in meshes: - mesh.pivot_offset = (mesh.pivot_offset[0] - pivot[0], - mesh.pivot_offset[1] - pivot[1], - mesh.pivot_offset[2] - pivot[2]) + mesh.pivot_offset = (mesh.pivot_offset[0] + chunk_pos[0], + mesh.pivot_offset[1] + chunk_pos[1], + mesh.pivot_offset[2] + chunk_pos[2]) scene = Scene(name=f'terrain_chunk_{i}', sub_meshes=meshes, obj_name=f'terrain_chunk_{i}', @@ -708,8 +710,8 @@ def get_texture(tex): skip_mtl_export=True) scenes.append(scene) else: - for chunk in chunks: - map_scene.sub_meshes.extend(chunk) + for (meshes, _) in chunks: + map_scene.sub_meshes.extend(meshes) # export scenes export_scenes(scenes, path, self.settings) From cd81cd45cb6efa043e2f2eb415ce6245c16f5173 Mon Sep 17 00:00:00 2001 From: andy Date: Tue, 4 Feb 2025 17:41:01 +0200 Subject: [PATCH 28/36] docs --- resources/NFS2.md | 101 +++++++++--------- resources/TNFS_SE.md | 2 +- resources/eac/geometries.py | 3 +- resources/eac/maps/nfs2.py | 207 ++++++++++++++++++++++-------------- 4 files changed, 183 insertions(+), 130 deletions(-) diff --git a/resources/NFS2.md b/resources/NFS2.md index 51f0c3c..cd9b505 100644 --- a/resources/NFS2.md +++ b/resources/NFS2.md @@ -1,6 +1,6 @@ # **NFS2 file specs** # -*Last time updated: 2025-01-03 15:11:07.077716+00:00* +*Last time updated: 2025-02-04 15:32:18.091435+00:00* # **Info by file extensions** # @@ -123,11 +123,11 @@ Did not find what you need or some given data is wrong? Please submit an | Offset | Name | Size (bytes) | Type | Description | | --- | --- | --- | --- | --- | | 0 | **resource_id** | 4 | UTF-8 string. Always == "COLL" | Resource ID | -| 4 | **unk** | 4 | 4-bytes unsigned integer (little endian). Always == 0xb | - | -| 8 | **block_size** | 4 | 4-bytes unsigned integer (little endian) | File size | +| 4 | **unk** | 4 | 4-bytes unsigned integer (little endian). Always == 0xb | Unknown purpose | +| 8 | **block_size** | 4 | 4-bytes unsigned integer (little endian) | File size in bytes | | 12 | **num_extrablocks** | 4 | 4-bytes unsigned integer (little endian) | Number of extrablocks | -| 16 | **extrablock_offsets** | num_extrablocks\*4 | Array of `num_extrablocks` items
Item size: 4 bytes
Item type: 4-bytes unsigned integer (little endian) | - | -| 16 + num_extrablocks\*4 | **extrablocks** | ? | Array of `num_extrablocks` items
Item type: [TrkExtraBlock](#trkextrablock) | - | +| 16 | **extrablock_offsets** | num_extrablocks\*4 | Array of `num_extrablocks` items
Item size: 4 bytes
Item type: 4-bytes unsigned integer (little endian) | Offset to each of the extrablocks | +| 16 + num_extrablocks\*4 | **extrablocks** | ? | Array of `num_extrablocks` items
Item type: [TrkExtraBlock](#trkextrablock) | Extrablocks | ### **TrkMap** ### #### **Size**: 32..? bytes #### #### **Description**: Main track file #### @@ -137,7 +137,7 @@ Did not find what you need or some given data is wrong? Please submit an | 4 | **unk0** | 20 | Bytes | Unknown purpose | | 24 | **num_superblocks** | 4 | 4-bytes unsigned integer (little endian) | Number of superblocks (nsblk) | | 28 | **num_blocks** | 4 | 4-bytes unsigned integer (little endian) | Number of blocks (nblk) | -| 32 | **superblock_offsets** | num_superblocks\*4 | Array of `num_superblocks` items
Item size: 4 bytes
Item type: 4-bytes unsigned integer (little endian) | - | +| 32 | **superblock_offsets** | num_superblocks\*4 | Array of `num_superblocks` items
Item size: 4 bytes
Item type: 4-bytes unsigned integer (little endian) | Offset to each of the superblocks | | 32 + num_superblocks\*4 | **block_positions** | num_blocks\*12 | Array of `num_blocks` items
Item size: 12 bytes
Item type: Point in 3D space (x,y,z), where each coordinate is: 32-bit real number (little-endian, signed), where last 16 bits is a fractional part | Coordinates of road spline points in 3D space | | 32 + num_superblocks\*4 + num_blocks\*12 | **skip_bytes** | up to offset superblock_offsets[0] | Bytes | Useless padding | | superblock_offsets[0] | **superblocks** | num_superblocks\*12..? | Array of `num_superblocks` items
Item type: [TrkSuperBlock](#trksuperblock) | Superblocks | @@ -145,50 +145,50 @@ Did not find what you need or some given data is wrong? Please submit an #### **Size**: 12..? bytes #### | Offset | Name | Size (bytes) | Type | Description | | --- | --- | --- | --- | --- | -| 0 | **block_size** | 4 | 4-bytes unsigned integer (little endian) | Superblock size | +| 0 | **block_size** | 4 | 4-bytes unsigned integer (little endian) | Superblock size in bytes | | 4 | **num_blocks** | 4 | 4-bytes unsigned integer (little endian) | Number of blocks in this superblock. Usually 8 or less in the last superblock | | 8 | **unk** | 4 | 4-bytes unsigned integer (little endian) | Unknown purpose | -| 12 | **block_offsets** | num_blocks\*4 | Array of `num_blocks` items
Item size: 4 bytes
Item type: 4-bytes unsigned integer (little endian) | - | +| 12 | **block_offsets** | num_blocks\*4 | Array of `num_blocks` items
Item size: 4 bytes
Item type: 4-bytes unsigned integer (little endian) | Offset to each of the blocks | | 12 + num_blocks\*4 | **blocks** | num_blocks\*88..? | Array of `num_blocks` items
Item type: [TrkBlock](#trkblock) | Blocks | ### **TrkBlock** ### #### **Size**: 88..? bytes #### | Offset | Name | Size (bytes) | Type | Description | | --- | --- | --- | --- | --- | -| 0 | **block_size** | 4 | 4-bytes unsigned integer (little endian) | Block size | -| 4 | **block_size_2** | 4 | 4-bytes unsigned integer (little endian) | Block size (duplicated) | -| 8 | **num_extrablocks** | 2 | 2-bytes unsigned integer (little endian) | number of extrablocks | +| 0 | **block_size** | 4 | 4-bytes unsigned integer (little endian) | Block size in bytes | +| 4 | **block_size_2** | 4 | 4-bytes unsigned integer (little endian) | Block size in bytes (duplicated) | +| 8 | **num_extrablocks** | 2 | 2-bytes unsigned integer (little endian) | Number of extrablocks | | 10 | **unk0** | 2 | 2-bytes unsigned integer (little endian) | Unknown purpose | | 12 | **block_idx** | 4 | 4-bytes unsigned integer (little endian) | Block index (serial number) | | 16 | **bounds** | 48 | Array of `4` items
Item size: 12 bytes
Item type: Point in 3D space (x,y,z), where each coordinate is: 32-bit real number (little-endian, signed), where last 16 bits is a fractional part | Block bounding rectangle | -| 64 | **extrablocks_offset** | 4 | 4-bytes unsigned integer (little endian) | | -| 68 | **nv8** | 2 | 2-bytes unsigned integer (little endian) | | -| 70 | **nv4** | 2 | 2-bytes unsigned integer (little endian) | | -| 72 | **nv2** | 2 | 2-bytes unsigned integer (little endian) | | -| 74 | **nv1** | 2 | 2-bytes unsigned integer (little endian) | | -| 76 | **np4** | 2 | 2-bytes unsigned integer (little endian) | | -| 78 | **np2** | 2 | 2-bytes unsigned integer (little endian) | | -| 80 | **np1** | 2 | 2-bytes unsigned integer (little endian) | | +| 64 | **extrablocks_offset** | 4 | 4-bytes unsigned integer (little endian) | An offset to "extrablock_offsets" block from here? | +| 68 | **nv8** | 2 | 2-bytes unsigned integer (little endian) | Number of stick-to-next vertices | +| 70 | **nv4** | 2 | 2-bytes unsigned integer (little endian) | Number of own vertices for 1/4 resolutio | +| 72 | **nv2** | 2 | 2-bytes unsigned integer (little endian) | Number of own vertices for 1/2 resolution | +| 74 | **nv1** | 2 | 2-bytes unsigned integer (little endian) | Number of own vertices for full resolution | +| 76 | **np4** | 2 | 2-bytes unsigned integer (little endian) | Number of polygons for 1/4 resolution | +| 78 | **np2** | 2 | 2-bytes unsigned integer (little endian) | Number of polygons for 1/2 resolution | +| 80 | **np1** | 2 | 2-bytes unsigned integer (little endian) | Number of polygons for full resolution | | 82 | **unk1** | 6 | 6-bytes unsigned integer (little endian) | Unknown purpose | -| 88 | **vertices** | (nv8+nv1)\*6 | Array of `nv8+nv1` items
Item size: 6 bytes
Item type: Point in 3D space (x,y,z), where each coordinate is: 16-bit real number (little-endian, signed), where last 8 bits is a fractional part | - | -| 88 + (nv8+nv1)\*6 | **polygons** | (np4+np2+np1)\*8 | Array of `np4+np2+np1` items
Item type: [TrkPolygon](#trkpolygon) | - | -| 88 + (nv8+nv1)\*6 + (np4+np2+np1)\*8 | **unk2** | custom_func | Bytes | - | -| 88 + (nv8+nv1)\*6 + (np4+np2+np1)\*8 + custom_func | **extrablock_offsets** | num_extrablocks\*4 | Array of `num_extrablocks` items
Item size: 4 bytes
Item type: 4-bytes unsigned integer (little endian) | - | -| 88 + (nv8+nv1)\*6 + (np4+np2+np1)\*8 + custom_func + num_extrablocks\*4 | **extrablocks** | ? | Array of `num_extrablocks` items
Item type: [TrkExtraBlock](#trkextrablock) | - | +| 88 | **vertices** | (nv8+nv1)\*6 | Array of `nv8+nv1` items
Item size: 6 bytes
Item type: Point in 3D space (x,y,z), where each coordinate is: 16-bit real number (little-endian, signed), where last 8 bits is a fractional part | Vertices | +| 88 + (nv8+nv1)\*6 | **polygons** | (np4+np2+np1)\*8 | Array of `np4+np2+np1` items
Item type: [TrkPolygon](#trkpolygon) | Polygons | +| 88 + (nv8+nv1)\*6 + (np4+np2+np1)\*8 | **unk2** | custom_func | Bytes | Unknown purpose | +| 88 + (nv8+nv1)\*6 + (np4+np2+np1)\*8 + custom_func | **extrablock_offsets** | num_extrablocks\*4 | Array of `num_extrablocks` items
Item size: 4 bytes
Item type: 4-bytes unsigned integer (little endian) | Offset to each of the extrablocks | +| 88 + (nv8+nv1)\*6 + (np4+np2+np1)\*8 + custom_func + num_extrablocks\*4 | **extrablocks** | ? | Array of `num_extrablocks` items
Item type: [TrkExtraBlock](#trkextrablock) | Extrablocks | ### **TrkExtraBlock** ### #### **Size**: 8..? bytes #### | Offset | Name | Size (bytes) | Type | Description | | --- | --- | --- | --- | --- | -| 0 | **block_size** | 4 | 4-bytes unsigned integer (little endian) | Block size | -| 4 | **type** | 1 | Enum of 256 possible values
Value names:2: textures_map
4: block_numbers
5: polygon_map
6: median_polygons
7: props_7
8: prop_descriptions
9: lanes
13: road_vectors
15: collision_data
18: props_18
19: props_19
| - | -| 5 | **unk** | 1 | 1-byte unsigned integer. Always == 0x0 | - | -| 6 | **num_data_records** | 2 | 2-bytes unsigned integer (little endian) | - | -| 8 | **data_records** | ? | Type according to enum `type`:
- Array of `num_data_records` items
Item type: [TexturesMapExtraDataRecord](#texturesmapextradatarecord)
- Array of `num_data_records` items
Item size: 2 bytes
Item type: 2-bytes unsigned integer (little endian)
- Array of `num_data_records` items
Item type: [PolygonMapExtraDataRecord](#polygonmapextradatarecord)
- Array of `num_data_records` items
Item type: [MedianExtraDataRecord](#medianextradatarecord)
- Array of `num_data_records` items
Item type: [PropExtraDataRecord](#propextradatarecord)
- Array of `num_data_records` items
Item type: [PropDescriptionExtraDataRecord](#propdescriptionextradatarecord)
- Array of `num_data_records` items
Item type: [LanesExtraDataRecord](#lanesextradatarecord)
- Array of `num_data_records` items
Item type: [RoadVectorsExtraDataRecord](#roadvectorsextradatarecord)
- Array of `num_data_records` items
Item type: [CollisionExtraDataRecord](#collisionextradatarecord)
- Array of `num_data_records` items
Item type: [PropExtraDataRecord](#propextradatarecord)
- Array of `num_data_records` items
Item type: [PropExtraDataRecord](#propextradatarecord)
- Bytes | - | +| 0 | **block_size** | 4 | 4-bytes unsigned integer (little endian) | Block size in bytes | +| 4 | **type** | 1 | Enum of 256 possible values
Value names:2: textures_map
4: block_numbers
5: polygon_map
6: median_polygons
7: props_7
8: prop_descriptions
9: lanes
13: road_vectors
15: collision_data
18: props_18
19: props_19
| Type of the data records | +| 5 | **unk** | 1 | 1-byte unsigned integer. Always == 0x0 | Unknown purpose | +| 6 | **num_data_records** | 2 | 2-bytes unsigned integer (little endian) | Amount of data records | +| 8 | **data_records** | ? | Type according to enum `type`:
- Array of `num_data_records` items
Item type: [TexturesMapExtraDataRecord](#texturesmapextradatarecord)
- Array of `num_data_records` items
Item size: 2 bytes
Item type: 2-bytes unsigned integer (little endian)
- Array of `num_data_records` items
Item type: [PolygonMapExtraDataRecord](#polygonmapextradatarecord)
- Array of `num_data_records` items
Item type: [MedianExtraDataRecord](#medianextradatarecord)
- Array of `num_data_records` items
Item type: [PropExtraDataRecord](#propextradatarecord)
- Array of `num_data_records` items
Item type: [PropDescriptionExtraDataRecord](#propdescriptionextradatarecord)
- Array of `num_data_records` items
Item type: [LanesExtraDataRecord](#lanesextradatarecord)
- Array of `num_data_records` items
Item type: [RoadVectorsExtraDataRecord](#roadvectorsextradatarecord)
- Array of `num_data_records` items
Item type: [CollisionExtraDataRecord](#collisionextradatarecord)
- Array of `num_data_records` items
Item type: [PropExtraDataRecord](#propextradatarecord)
- Array of `num_data_records` items
Item type: [PropExtraDataRecord](#propextradatarecord)
- Bytes | Data records | ### **TexturesMapExtraDataRecord** ### #### **Size**: 10 bytes #### | Offset | Name | Size (bytes) | Type | Description | | --- | --- | --- | --- | --- | | 0 | **texture_number** | 2 | 2-bytes unsigned integer (little endian) | Texture number in QFS file | -| 2 | **alignment_data** | 2 | 2-bytes unsigned integer (little endian) | - | +| 2 | **alignment_data** | 2 | 2-bytes unsigned integer (little endian) | Alignment data, which game uses instead of UV-s when rendering mesh. Seems to be a set of flags, but I haven't investigated it deeply yet | | 4 | **luminosity** | 3 | Color RGB values | Luminosity color | | 7 | **black** | 3 | Color RGB values | Unknown, usually black | ### **MedianExtraDataRecord** ### @@ -205,43 +205,45 @@ Did not find what you need or some given data is wrong? Please submit an | 1 | **car_behavior** | 1 | Enum of 256 possible values
Value names:0: unk0
1: unk1
| - | ### **PropExtraDataRecord** ### #### **Size**: 4..? bytes #### +#### **Description**: 3D model placement (prop). Same 3D model can be used few times on the track #### | Offset | Name | Size (bytes) | Type | Description | | --- | --- | --- | --- | --- | -| 0 | **block_size** | 2 | 2-bytes unsigned integer (little endian) | Block size | -| 2 | **type** | 1 | Enum of 256 possible values
Value names:1: static_prop
3: animated_prop
| - | -| 3 | **prop_descr_idx** | 1 | 1-byte unsigned integer | - | -| 4 | **position** | ? | Type according to enum `type`:
- Point in 3D space (x,y,z), where each coordinate is: 32-bit real number (little-endian, signed), where last 16 bits is a fractional part
- [AnimatedPropPosition](#animatedpropposition)
- Bytes | - | +| 0 | **block_size** | 2 | 2-bytes unsigned integer (little endian) | Block size in bytes | +| 2 | **type** | 1 | Enum of 256 possible values
Value names:1: static_prop
3: animated_prop
| Object type | +| 3 | **prop_descr_idx** | 1 | 1-byte unsigned integer | An index of 3D model in "prop_descriptions" extrablock | +| 4 | **position** | ? | Type according to enum `type`:
- Point in 3D space (x,y,z), where each coordinate is: 32-bit real number (little-endian, signed), where last 16 bits is a fractional part
- [AnimatedPropPosition](#animatedpropposition)
- Bytes | Object positioning in 3D space | ### **AnimatedPropPosition** ### #### **Size**: 4..? bytes #### | Offset | Name | Size (bytes) | Type | Description | | --- | --- | --- | --- | --- | -| 0 | **num_frames** | 2 | 2-bytes unsigned integer (little endian) | - | +| 0 | **num_frames** | 2 | 2-bytes unsigned integer (little endian) | An amount of frames | | 2 | **unk** | 2 | 2-bytes unsigned integer (little endian) | Unknown purpose | -| 4 | **frames** | num_frames\*20 | Array of `num_frames` items
Item type: [AnimatedPropPositionFrame](#animatedproppositionframe) | - | +| 4 | **frames** | num_frames\*20 | Array of `num_frames` items
Item type: [AnimatedPropPositionFrame](#animatedproppositionframe) | Animation frames | ### **AnimatedPropPositionFrame** ### #### **Size**: 20 bytes #### | Offset | Name | Size (bytes) | Type | Description | | --- | --- | --- | --- | --- | -| 0 | **position** | 12 | Point in 3D space (x,y,z), where each coordinate is: 32-bit real number (little-endian, signed), where last 16 bits is a fractional part | - | +| 0 | **position** | 12 | Point in 3D space (x,y,z), where each coordinate is: 32-bit real number (little-endian, signed), where last 16 bits is a fractional part | Object position in 3D space | | 12 | **unk0** | 8 | Bytes | Unknown purpose | ### **PropDescriptionExtraDataRecord** ### #### **Size**: 8..? bytes #### +#### **Description**: 3D model #### | Offset | Name | Size (bytes) | Type | Description | | --- | --- | --- | --- | --- | -| 0 | **block_size** | 4 | 4-bytes unsigned integer (little endian) | Block size | -| 4 | **num_vertices** | 2 | 2-bytes unsigned integer (little endian) | | -| 6 | **num_polygons** | 2 | 2-bytes unsigned integer (little endian) | | -| 8 | **vertices** | num_vertices\*6 | Array of `num_vertices` items
Item size: 6 bytes
Item type: Point in 3D space (x,y,z), where each coordinate is: 16-bit real number (little-endian, signed), where last 8 bits is a fractional part | - | -| 8 + num_vertices\*6 | **polygons** | num_polygons\*8 | Array of `num_polygons` items
Item type: [TrkPolygon](#trkpolygon) | - | -| 8 + num_vertices\*6 + num_polygons\*8 | **padding** | custom_func | Bytes | - | +| 0 | **block_size** | 4 | 4-bytes unsigned integer (little endian) | Block size in bytes | +| 4 | **num_vertices** | 2 | 2-bytes unsigned integer (little endian) | Amount of vertices | +| 6 | **num_polygons** | 2 | 2-bytes unsigned integer (little endian) | Amount of polygons | +| 8 | **vertices** | num_vertices\*6 | Array of `num_vertices` items
Item size: 6 bytes
Item type: Point in 3D space (x,y,z), where each coordinate is: 16-bit real number (little-endian, signed), where last 8 bits is a fractional part | Vertices | +| 8 + num_vertices\*6 | **polygons** | num_polygons\*8 | Array of `num_polygons` items
Item type: [TrkPolygon](#trkpolygon) | Polygons | +| 8 + num_vertices\*6 + num_polygons\*8 | **padding** | custom_func | Bytes | Unused space | ### **LanesExtraDataRecord** ### #### **Size**: 4 bytes #### | Offset | Name | Size (bytes) | Type | Description | | --- | --- | --- | --- | --- | -| 0 | **vertex_idx** | 1 | 1-byte unsigned integer | vertex number (inside background 3D structure : 0 to nv1+nv8) | -| 1 | **track_pos** | 1 | 1-byte unsigned integer | position along track inside block (0 to 7) | -| 2 | **lat_pos** | 1 | 1-byte unsigned integer | lateral position ? (constant in each lane), -1 at the end) | -| 3 | **polygon_idx** | 1 | 1-byte unsigned integer | polygon number (inside full-res backgnd 3D structure : 0 to np1) | +| 0 | **vertex_idx** | 1 | 1-byte unsigned integer | Vertex number (inside background 3D structure : 0 to nv1+nv8) | +| 1 | **track_pos** | 1 | 1-byte unsigned integer | Position along track inside block (0 to 7) | +| 2 | **lat_pos** | 1 | 1-byte unsigned integer | Lateral position ? (constant in each lane), -1 at the end) | +| 3 | **polygon_idx** | 1 | 1-byte unsigned integer | {olygon number (inside full-res background 3D structure : 0 to np1) | ### **RoadVectorsExtraDataRecord** ### #### **Size**: 12 bytes #### | Offset | Name | Size (bytes) | Type | Description | @@ -265,11 +267,12 @@ Did not find what you need or some given data is wrong? Please submit an | 32 | **unk2** | 4 | 4-bytes unsigned integer (little endian) | Unknown purpose | ### **TrkPolygon** ### #### **Size**: 8 bytes #### +#### **Description**: A single polygon of terrain or prop #### | Offset | Name | Size (bytes) | Type | Description | | --- | --- | --- | --- | --- | -| 0 | **texture** | 2 | 2-bytes unsigned integer (little endian) | Texture number | +| 0 | **texture** | 2 | 2-bytes unsigned integer (little endian) | Texture number. It is not a number of texture in QFS file. Instead, it is an index of mapping entry in corresponding COL file, which contains real texture number | | 2 | **texture2** | 2 | 2-bytes signed integer (little endian) | 255 (texture number for the other side == none ?) | -| 4 | **vertices** | 4 | Array of `4` items
Item size: 1 byte
Item type: 1-byte unsigned integer | - | +| 4 | **vertices** | 4 | Array of `4` items
Item size: 1 byte
Item type: 1-byte unsigned integer | Polygon vertices (indexes from vertex table) | ## **Bitmaps** ## ### **Bitmap4Bit** ### #### **Size**: 16..? bytes #### diff --git a/resources/TNFS_SE.md b/resources/TNFS_SE.md index 84f9628..39cf1b4 100644 --- a/resources/TNFS_SE.md +++ b/resources/TNFS_SE.md @@ -81,7 +81,7 @@ Did not find what you need or some given data is wrong? Please submit an | Offset | Name | Size (bytes) | Type | Description | | --- | --- | --- | --- | --- | | 0 | **resource_id** | 4 | UTF-8 string. Always == "ORIP" | Resource ID | -| 4 | **block_size** | 4 | 4-bytes unsigned integer (little endian) | Total ORIP block size | +| 4 | **block_size** | 4 | 4-bytes unsigned integer (little endian) | Total ORIP block size in bytes | | 8 | **unk0** | 4 | 4-bytes unsigned integer (little endian). Always == 0x2bc | Looks like always 0x01F4 in 3DO version and 0x02BC in PC TNFSSE. ORIP type? | | 12 | **unk1** | 4 | 4-bytes unsigned integer (little endian). Always == 0x0 | Unknown purpose | | 16 | **num_vrtx** | 4 | 4-bytes unsigned integer (little endian) | Amount of vertices | diff --git a/resources/eac/geometries.py b/resources/eac/geometries.py index 19111f2..37ef23a 100644 --- a/resources/eac/geometries.py +++ b/resources/eac/geometries.py @@ -138,7 +138,8 @@ class Fields(DeclarativeCompoundBlock.Fields): resource_id = (UTF8Block(required_value='ORIP', length=4), {'description': 'Resource ID'}) block_size = (IntegerBlock(length=4), - {'description': 'Total ORIP block size'}) + {'description': 'Total ORIP block size in bytes', + 'programmatic_value': lambda ctx: ctx.block.estimate_packed_size(ctx.get_full_data())}) unk0 = (IntegerBlock(length=4, required_value=0x02BC), {'description': 'Looks like always 0x01F4 in 3DO version and 0x02BC in PC TNFSSE. ORIP type?', 'is_unknown': True}) diff --git a/resources/eac/maps/nfs2.py b/resources/eac/maps/nfs2.py index b8c954a..2cca9af 100644 --- a/resources/eac/maps/nfs2.py +++ b/resources/eac/maps/nfs2.py @@ -11,19 +11,29 @@ class TrkPolygon(DeclarativeCompoundBlock): + @property + def schema(self) -> Dict: + return {**super().schema, + 'block_description': 'A single polygon of terrain or prop'} + class Fields(DeclarativeCompoundBlock.Fields): texture = (IntegerBlock(length=2, is_signed=False), - {'description': 'Texture number'}) + {'description': 'Texture number. It is not a number of texture in QFS file. Instead, it is an index ' + 'of mapping entry in corresponding COL file, which contains real texture number'}) texture2 = (IntegerBlock(length=2, is_signed=True), - {'description': '255 (texture number for the other side == none ?)'}) - vertices = ArrayBlock(child=IntegerBlock(length=1, is_signed=False), length=4) + {'description': '255 (texture number for the other side == none ?)', + 'is_unknown': True}) + vertices = (ArrayBlock(child=IntegerBlock(length=1, is_signed=False), length=4), + {'description': 'Polygon vertices (indexes from vertex table)'}) class TexturesMapExtraDataRecord(DeclarativeCompoundBlock): class Fields(DeclarativeCompoundBlock.Fields): texture_number = (IntegerBlock(length=2, is_signed=False), {'description': 'Texture number in QFS file'}) - alignment_data = IntegerBlock(length=2, is_signed=False) + alignment_data = (IntegerBlock(length=2, is_signed=False), + {'description': 'Alignment data, which game uses instead of UV-s when rendering mesh. ' + 'Seems to be a set of flags, but I haven\'t investigated it deeply yet'}) luminosity = (RGBBlock(), {'description': 'Luminosity color'}) black = (RGBBlock(), @@ -49,63 +59,83 @@ class Fields(DeclarativeCompoundBlock.Fields): class AnimatedPropPositionFrame(DeclarativeCompoundBlock): class Fields(DeclarativeCompoundBlock.Fields): - position = Point3D(child_length=4, fraction_bits=16) + position = (Point3D(child_length=4, fraction_bits=16), + {'description': 'Object position in 3D space'}) unk0 = (BytesBlock(length=8), {'is_unknown': True}) class AnimatedPropPosition(DeclarativeCompoundBlock): class Fields(DeclarativeCompoundBlock.Fields): - num_frames = IntegerBlock(length=2, is_signed=False) + num_frames = (IntegerBlock(length=2, is_signed=False), + {'description': 'An amount of frames', + 'programmatic_value': lambda ctx: len(ctx.data('frames'))}) unk = (IntegerBlock(length=2), {'is_unknown': True}) - frames = ArrayBlock( - length=lambda ctx: ctx.data('num_frames'), - child=AnimatedPropPositionFrame()) + frames = (ArrayBlock(length=lambda ctx: ctx.data('num_frames'), + child=AnimatedPropPositionFrame()), + {'description': 'Animation frames'}) class PropExtraDataRecord(DeclarativeCompoundBlock): + @property + def schema(self) -> Dict: + return {**super().schema, + 'block_description': '3D model placement (prop). Same 3D model can be used few times on the track'} + class Fields(DeclarativeCompoundBlock.Fields): block_size = (IntegerBlock(length=2, is_signed=False), - {'description': 'Block size'}) - type = EnumByteBlock(enum_names=[(1, 'static_prop'), - (3, 'animated_prop'), - ]) - prop_descr_idx = IntegerBlock(length=1, is_signed=False) - position = EnumLookupDelegateBlock( - enum_field='type', - blocks=[Point3D(child_length=4, fraction_bits=16), - AnimatedPropPosition(), - BytesBlock(length=lambda ctx: ctx.data('block_size') - 4)]) + {'description': 'Block size in bytes', + 'programmatic_value': lambda ctx: ctx.block.estimate_packed_size(ctx.get_full_data())}) + type = (EnumByteBlock(enum_names=[(1, 'static_prop'), + (3, 'animated_prop'), + ]), + {'description': 'Object type'}) + prop_descr_idx = (IntegerBlock(length=1, is_signed=False), + {'description': 'An index of 3D model in "prop_descriptions" extrablock'}) + position = (EnumLookupDelegateBlock(enum_field='type', + blocks=[Point3D(child_length=4, fraction_bits=16), + AnimatedPropPosition(), + BytesBlock(length=lambda ctx: ctx.data('block_size') - 4)]), + {'description': 'Object positioning in 3D space'}) class PropDescriptionExtraDataRecord(DeclarativeCompoundBlock): + @property + def schema(self) -> Dict: + return {**super().schema, + 'block_description': '3D model'} + class Fields(DeclarativeCompoundBlock.Fields): block_size = (IntegerBlock(length=4, is_signed=False), - {'description': 'Block size'}) + {'description': 'Block size in bytes', + 'programmatic_value': lambda ctx: ctx.block.estimate_packed_size(ctx.get_full_data())}) num_vertices = (IntegerBlock(length=2, is_signed=False), - {'description': '', + {'description': 'Amount of vertices', 'programmatic_value': lambda ctx: len(ctx.data('vertices'))}) num_polygons = (IntegerBlock(length=2, is_signed=False), - {'description': '', + {'description': 'Amount of polygons', 'programmatic_value': lambda ctx: len(ctx.data('polygons'))}) - vertices = ArrayBlock(child=Point3D(child_length=2, fraction_bits=8), - length=lambda ctx: ctx.data('num_vertices')) - polygons = ArrayBlock(child=TrkPolygon(), - length=lambda ctx: ctx.data('num_polygons')) - padding = BytesBlock(length=lambda ctx: ctx.data('block_size') - ctx.buffer.tell() + ctx.read_start_offset) + vertices = (ArrayBlock(child=Point3D(child_length=2, fraction_bits=8), + length=lambda ctx: ctx.data('num_vertices')), + {'description': 'Vertices'}) + polygons = (ArrayBlock(child=TrkPolygon(), + length=lambda ctx: ctx.data('num_polygons')), + {'description': 'Polygons'}) + padding = (BytesBlock(length=lambda ctx: ctx.data('block_size') - ctx.buffer.tell() + ctx.read_start_offset), + {'description': 'Unused space'}) class LanesExtraDataRecord(DeclarativeCompoundBlock): class Fields(DeclarativeCompoundBlock.Fields): vertex_idx = (IntegerBlock(length=1, is_signed=False), - {'description': 'vertex number (inside background 3D structure : 0 to nv1+nv8)'}) + {'description': 'Vertex number (inside background 3D structure : 0 to nv1+nv8)'}) track_pos = (IntegerBlock(length=1, is_signed=False), - {'description': 'position along track inside block (0 to 7)'}) + {'description': 'Position along track inside block (0 to 7)'}) lat_pos = (IntegerBlock(length=1, is_signed=False), - {'description': 'lateral position ? (constant in each lane), -1 at the end)'}) + {'description': 'Lateral position ? (constant in each lane), -1 at the end)'}) polygon_idx = (IntegerBlock(length=1, is_signed=False), - {'description': 'polygon number (inside full-res backgnd 3D structure : 0 to np1)'}) + {'description': '{olygon number (inside full-res background 3D structure : 0 to np1)'}) class RoadVectorsExtraDataRecord(DeclarativeCompoundBlock): @@ -135,22 +165,27 @@ class Fields(DeclarativeCompoundBlock.Fields): class TrkExtraBlock(DeclarativeCompoundBlock): class Fields(DeclarativeCompoundBlock.Fields): block_size = (IntegerBlock(length=4, is_signed=False), - {'description': 'Block size'}) - type = EnumByteBlock(enum_names=[(2, 'textures_map'), - (4, 'block_numbers'), - (5, 'polygon_map'), - (6, 'median_polygons'), - (7, 'props_7'), - (8, 'prop_descriptions'), - (9, 'lanes'), - (13, 'road_vectors'), - (15, 'collision_data'), - (18, 'props_18'), - (19, 'props_19'), - ]) - unk = IntegerBlock(length=1, required_value=0) - num_data_records = IntegerBlock(length=2) - data_records = EnumLookupDelegateBlock( + {'description': 'Block size in bytes', + 'programmatic_value': lambda ctx: ctx.block.estimate_packed_size(ctx.get_full_data())}) + type = (EnumByteBlock(enum_names=[(2, 'textures_map'), + (4, 'block_numbers'), + (5, 'polygon_map'), + (6, 'median_polygons'), + (7, 'props_7'), + (8, 'prop_descriptions'), + (9, 'lanes'), + (13, 'road_vectors'), + (15, 'collision_data'), + (18, 'props_18'), + (19, 'props_19'), + ]), + {'description': 'Type of the data records'}) + unk = (IntegerBlock(length=1, required_value=0), + {'is_unknown': True}) + num_data_records = (IntegerBlock(length=2), + {'description': 'Amount of data records', + 'programmatic_value': lambda ctx: len(ctx.data('data_records'))}) + data_records = (EnumLookupDelegateBlock( enum_field='type', blocks=[ ArrayBlock(child=TexturesMapExtraDataRecord(), length=lambda ctx: ctx.data('num_data_records')), @@ -165,18 +200,20 @@ class Fields(DeclarativeCompoundBlock.Fields): ArrayBlock(child=PropExtraDataRecord(), length=lambda ctx: ctx.data('num_data_records')), ArrayBlock(child=PropExtraDataRecord(), length=lambda ctx: ctx.data('num_data_records')), BytesBlock(length=lambda ctx: ctx.data('block_size') - 8) - ]) + ]), + {'description': 'Data records'}) class TrkBlock(DeclarativeCompoundBlock): class Fields(DeclarativeCompoundBlock.Fields): block_size = (IntegerBlock(length=4, is_signed=False), - {'description': 'Block size'}) + {'description': 'Block size in bytes', + 'programmatic_value': lambda ctx: ctx.block.estimate_packed_size(ctx.get_full_data())}) block_size_2 = (IntegerBlock(length=4, is_signed=False), - {'description': 'Block size (duplicated)', - 'programmatic_value': lambda ctx: ctx.data('block_size')}) + {'description': 'Block size in bytes (duplicated)', + 'programmatic_value': lambda ctx: ctx.block.estimate_packed_size(ctx.get_full_data())}) num_extrablocks = (IntegerBlock(length=2, is_signed=False), - {'description': 'number of extrablocks'}) + {'description': 'Number of extrablocks'}) unk0 = (IntegerBlock(length=2, is_signed=False), {'is_unknown': True}) block_idx = (IntegerBlock(length=4, is_signed=False), @@ -184,32 +221,37 @@ class Fields(DeclarativeCompoundBlock.Fields): bounds = (ArrayBlock(child=Point3D(child_length=4, fraction_bits=16), length=4), {'description': 'Block bounding rectangle'}) extrablocks_offset = (IntegerBlock(length=4, is_signed=False), - {'description': ''}) + {'description': 'An offset to "extrablock_offsets" block from here?'}) nv8 = (IntegerBlock(length=2, is_signed=False), - {'description': ''}) + {'description': 'Number of stick-to-next vertices'}) nv4 = (IntegerBlock(length=2, is_signed=False), - {'description': ''}) + {'description': 'Number of own vertices for 1/4 resolutio'}) nv2 = (IntegerBlock(length=2, is_signed=False), - {'description': ''}) + {'description': 'Number of own vertices for 1/2 resolution'}) nv1 = (IntegerBlock(length=2, is_signed=False), - {'description': ''}) + {'description': 'Number of own vertices for full resolution'}) np4 = (IntegerBlock(length=2, is_signed=False), - {'description': ''}) + {'description': 'Number of polygons for 1/4 resolution'}) np2 = (IntegerBlock(length=2, is_signed=False), - {'description': ''}) + {'description': 'Number of polygons for 1/2 resolution'}) np1 = (IntegerBlock(length=2, is_signed=False), - {'description': ''}) + {'description': 'Number of polygons for full resolution'}) unk1 = (IntegerBlock(length=6), {'is_unknown': True}) - vertices = ArrayBlock(child=Point3D(child_length=2, fraction_bits=8), - length=lambda ctx: ctx.data('nv8') + ctx.data('nv1')) - polygons = ArrayBlock(child=TrkPolygon(), - length=lambda ctx: ctx.data('np4') + ctx.data('np2') + ctx.data('np1')) - unk2 = BytesBlock( - length=lambda ctx: 64 + ctx.data('extrablocks_offset') + ctx.read_start_offset - ctx.buffer.tell()) - extrablock_offsets = ArrayBlock(child=IntegerBlock(length=4, is_signed=False), - length=lambda ctx: ctx.data('num_extrablocks')) - extrablocks = ArrayBlock(length=(0, 'num_extrablocks'), child=TrkExtraBlock()) + vertices = (ArrayBlock(child=Point3D(child_length=2, fraction_bits=8), + length=lambda ctx: ctx.data('nv8') + ctx.data('nv1')), + {'description': 'Vertices'}) + polygons = (ArrayBlock(child=TrkPolygon(), + length=lambda ctx: ctx.data('np4') + ctx.data('np2') + ctx.data('np1')), + {'description': 'Polygons'}) + unk2 = (BytesBlock( + length=lambda ctx: 64 + ctx.data('extrablocks_offset') + ctx.read_start_offset - ctx.buffer.tell()), + {'is_unknown': True}) + extrablock_offsets = (ArrayBlock(child=IntegerBlock(length=4, is_signed=False), + length=lambda ctx: ctx.data('num_extrablocks')), + {'description': 'Offset to each of the extrablocks'}) + extrablocks = (ArrayBlock(length=(0, 'num_extrablocks'), child=TrkExtraBlock()), + {'description': 'Extrablocks'}) def read(self, buffer: [BufferedReader, BytesIO], ctx: ReadContext = DataBlock.root_read_ctx, name: str = '', read_bytes_amount=None): @@ -229,13 +271,15 @@ def read(self, buffer: [BufferedReader, BytesIO], ctx: ReadContext = DataBlock.r class TrkSuperBlock(DeclarativeCompoundBlock): class Fields(DeclarativeCompoundBlock.Fields): block_size = (IntegerBlock(length=4, is_signed=False), - {'description': 'Superblock size'}) + {'description': 'Superblock size in bytes', + 'programmatic_value': lambda ctx: ctx.block.estimate_packed_size(ctx.get_full_data())}) num_blocks = (IntegerBlock(length=4, is_signed=False), {'description': 'Number of blocks in this superblock. Usually 8 or less in the last superblock'}) unk = (IntegerBlock(length=4), {'is_unknown': True}) - block_offsets = ArrayBlock(child=IntegerBlock(length=4, is_signed=False), - length=lambda ctx: ctx.data('num_blocks')) + block_offsets = (ArrayBlock(child=IntegerBlock(length=4, is_signed=False), + length=lambda ctx: ctx.data('num_blocks')), + {'description': 'Offset to each of the blocks'}) blocks = (ArrayBlock(child=TrkBlock(), length=lambda ctx: ctx.data('num_blocks')), {'description': 'Blocks'}) @@ -258,8 +302,9 @@ class Fields(DeclarativeCompoundBlock.Fields): 'programmatic_value': lambda ctx: len(ctx.data('superblock_offsets'))}) num_blocks = (IntegerBlock(length=4, is_signed=False), {'description': 'Number of blocks (nblk)'}) - superblock_offsets = ArrayBlock(child=IntegerBlock(length=4, is_signed=False), - length=lambda ctx: ctx.data('num_superblocks')) + superblock_offsets = (ArrayBlock(child=IntegerBlock(length=4, is_signed=False), + length=lambda ctx: ctx.data('num_superblocks')), + {'description': 'Offset to each of the superblocks'}) block_positions = (ArrayBlock(child=Point3D(child_length=4, fraction_bits=16), length=lambda ctx: ctx.data('num_blocks')), {'description': 'Coordinates of road spline points in 3D space'}) @@ -276,15 +321,19 @@ class TrkMapCol(DeclarativeCompoundBlock): class Fields(DeclarativeCompoundBlock.Fields): resource_id = (UTF8Block(length=4, required_value='COLL'), {'description': 'Resource ID'}) - unk = IntegerBlock(length=4, required_value=11) + unk = (IntegerBlock(length=4, required_value=11), + {'is_unknown': True}) block_size = (IntegerBlock(length=4, is_signed=False), - {'description': 'File size'}) + {'description': 'File size in bytes', + 'programmatic_value': lambda ctx: ctx.block.estimate_packed_size(ctx.get_full_data())}) # TODO it is almost the same as we have in wwww. Share logic somehow? num_extrablocks = (IntegerBlock(length=4, is_signed=False), {'description': 'Number of extrablocks'}) - extrablock_offsets = ArrayBlock(child=IntegerBlock(length=4, is_signed=False), - length=lambda ctx: ctx.data('num_extrablocks')) - extrablocks = ArrayBlock(length=(0, 'num_extrablocks'), child=TrkExtraBlock()) + extrablock_offsets = (ArrayBlock(child=IntegerBlock(length=4, is_signed=False), + length=lambda ctx: ctx.data('num_extrablocks')), + {'description': 'Offset to each of the extrablocks'}) + extrablocks = (ArrayBlock(length=(0, 'num_extrablocks'), child=TrkExtraBlock()), + {'description': 'Extrablocks'}) def read(self, buffer: [BufferedReader, BytesIO], ctx: ReadContext = DataBlock.root_read_ctx, name: str = '', read_bytes_amount=None): From f060e4fc4e17fac2c24b19151c86ff2e5ab841e4 Mon Sep 17 00:00:00 2001 From: andy Date: Tue, 4 Feb 2025 17:54:38 +0200 Subject: [PATCH 29/36] docs --- generate_resource_doc.py | 26 ++++++- resources/NFS2_SE.md | 162 ++++++++++++++++++++++++++++++++++++++- 2 files changed, 184 insertions(+), 4 deletions(-) diff --git a/generate_resource_doc.py b/generate_resource_doc.py index 83018ac..6a63efa 100644 --- a/generate_resource_doc.py +++ b/generate_resource_doc.py @@ -211,12 +211,16 @@ def render_type(instance: DataBlock, possible_blocks_filter=None) -> str: 'nfs2se': { 'file_name': 'NFS2_SE.md', 'title': 'NFS2SE file specs', - 'file_list': f"""**\*.FFN** bitmap font. {render_type(fonts.FfnFont())} + 'file_list': f"""**\*.COL** track additional data. {render_type(maps.TrkMapCol())} + +**\*.FFN** bitmap font. {render_type(fonts.FfnFont())} **\*.FSH** image archive. {render_type(archives.ShpiBlock())} **\*.QFS** image archive. {render_type(archives.ShpiBlock())}, **compressed** (compression algorithms not documented, can be found in resources/eac/compressions/) +**\*.TRK** main track file. {render_type(maps.TrkMap())} + **\*.UV** video, I just use ffmpeg to convert it **\*.VIV** archive with some data. {render_type(archives.BigfBlock())}""", @@ -230,8 +234,24 @@ def render_type(instance: DataBlock, possible_blocks_filter=None) -> str: geometries.GeoMesh(), geometries.GeoPolygon(), ], - # 'Maps': [ - # ], + 'Maps': [ + maps.TrkMapCol(), + maps.TrkMap(), + maps.TrkSuperBlock(), + maps.TrkBlock(), + maps.TrkExtraBlock(), + maps.TexturesMapExtraDataRecord(), + maps.MedianExtraDataRecord(), + maps.PolygonMapExtraDataRecord(), + maps.PropExtraDataRecord(), + maps.AnimatedPropPosition(), + maps.AnimatedPropPositionFrame(), + maps.PropDescriptionExtraDataRecord(), + maps.LanesExtraDataRecord(), + maps.RoadVectorsExtraDataRecord(), + maps.CollisionExtraDataRecord(), + maps.TrkPolygon(), + ], # 'Physics': [ # ], 'Bitmaps': [ diff --git a/resources/NFS2_SE.md b/resources/NFS2_SE.md index 3ad4322..54ce0c1 100644 --- a/resources/NFS2_SE.md +++ b/resources/NFS2_SE.md @@ -1,16 +1,20 @@ # **NFS2SE file specs** # -*Last time updated: 2025-01-02 00:50:58.077421+00:00* +*Last time updated: 2025-02-04 15:53:36.038195+00:00* # **Info by file extensions** # +**\*.COL** track additional data. [TrkMapCol](#trkmapcol) + **\*.FFN** bitmap font. [FfnFont](#ffnfont) **\*.FSH** image archive. [ShpiBlock](#shpiblock) **\*.QFS** image archive. [ShpiBlock](#shpiblock), **compressed** (compression algorithms not documented, can be found in resources/eac/compressions/) +**\*.TRK** main track file. [TrkMap](#trkmap) + **\*.UV** video, I just use ffmpeg to convert it **\*.VIV** archive with some data. [BigfBlock](#bigfblock) @@ -109,6 +113,162 @@ Did not find what you need or some given data is wrong? Please submit an | 1 | **unk0** | 3 | 3-bytes unsigned integer (little endian) | Unknown purpose | | 4 | **vertex_indices** | 4 | Array of `4` items
Item size: 1 byte
Item type: 1-byte unsigned integer | Indexes of vertices | | 8 | **texture_name** | 4 | UTF-8 string | ID of texture from neighbouring QFS file | +## **Maps** ## +### **TrkMapCol** ### +#### **Size**: 16..? bytes #### +| Offset | Name | Size (bytes) | Type | Description | +| --- | --- | --- | --- | --- | +| 0 | **resource_id** | 4 | UTF-8 string. Always == "COLL" | Resource ID | +| 4 | **unk** | 4 | 4-bytes unsigned integer (little endian). Always == 0xb | Unknown purpose | +| 8 | **block_size** | 4 | 4-bytes unsigned integer (little endian) | File size in bytes | +| 12 | **num_extrablocks** | 4 | 4-bytes unsigned integer (little endian) | Number of extrablocks | +| 16 | **extrablock_offsets** | num_extrablocks\*4 | Array of `num_extrablocks` items
Item size: 4 bytes
Item type: 4-bytes unsigned integer (little endian) | Offset to each of the extrablocks | +| 16 + num_extrablocks\*4 | **extrablocks** | ? | Array of `num_extrablocks` items
Item type: [TrkExtraBlock](#trkextrablock) | Extrablocks | +### **TrkMap** ### +#### **Size**: 32..? bytes #### +#### **Description**: Main track file #### +| Offset | Name | Size (bytes) | Type | Description | +| --- | --- | --- | --- | --- | +| 0 | **resource_id** | 4 | UTF-8 string. Always == "TRAC" | Resource ID | +| 4 | **unk0** | 20 | Bytes | Unknown purpose | +| 24 | **num_superblocks** | 4 | 4-bytes unsigned integer (little endian) | Number of superblocks (nsblk) | +| 28 | **num_blocks** | 4 | 4-bytes unsigned integer (little endian) | Number of blocks (nblk) | +| 32 | **superblock_offsets** | num_superblocks\*4 | Array of `num_superblocks` items
Item size: 4 bytes
Item type: 4-bytes unsigned integer (little endian) | Offset to each of the superblocks | +| 32 + num_superblocks\*4 | **block_positions** | num_blocks\*12 | Array of `num_blocks` items
Item size: 12 bytes
Item type: Point in 3D space (x,y,z), where each coordinate is: 32-bit real number (little-endian, signed), where last 16 bits is a fractional part | Coordinates of road spline points in 3D space | +| 32 + num_superblocks\*4 + num_blocks\*12 | **skip_bytes** | up to offset superblock_offsets[0] | Bytes | Useless padding | +| superblock_offsets[0] | **superblocks** | num_superblocks\*12..? | Array of `num_superblocks` items
Item type: [TrkSuperBlock](#trksuperblock) | Superblocks | +### **TrkSuperBlock** ### +#### **Size**: 12..? bytes #### +| Offset | Name | Size (bytes) | Type | Description | +| --- | --- | --- | --- | --- | +| 0 | **block_size** | 4 | 4-bytes unsigned integer (little endian) | Superblock size in bytes | +| 4 | **num_blocks** | 4 | 4-bytes unsigned integer (little endian) | Number of blocks in this superblock. Usually 8 or less in the last superblock | +| 8 | **unk** | 4 | 4-bytes unsigned integer (little endian) | Unknown purpose | +| 12 | **block_offsets** | num_blocks\*4 | Array of `num_blocks` items
Item size: 4 bytes
Item type: 4-bytes unsigned integer (little endian) | Offset to each of the blocks | +| 12 + num_blocks\*4 | **blocks** | num_blocks\*88..? | Array of `num_blocks` items
Item type: [TrkBlock](#trkblock) | Blocks | +### **TrkBlock** ### +#### **Size**: 88..? bytes #### +| Offset | Name | Size (bytes) | Type | Description | +| --- | --- | --- | --- | --- | +| 0 | **block_size** | 4 | 4-bytes unsigned integer (little endian) | Block size in bytes | +| 4 | **block_size_2** | 4 | 4-bytes unsigned integer (little endian) | Block size in bytes (duplicated) | +| 8 | **num_extrablocks** | 2 | 2-bytes unsigned integer (little endian) | Number of extrablocks | +| 10 | **unk0** | 2 | 2-bytes unsigned integer (little endian) | Unknown purpose | +| 12 | **block_idx** | 4 | 4-bytes unsigned integer (little endian) | Block index (serial number) | +| 16 | **bounds** | 48 | Array of `4` items
Item size: 12 bytes
Item type: Point in 3D space (x,y,z), where each coordinate is: 32-bit real number (little-endian, signed), where last 16 bits is a fractional part | Block bounding rectangle | +| 64 | **extrablocks_offset** | 4 | 4-bytes unsigned integer (little endian) | An offset to "extrablock_offsets" block from here? | +| 68 | **nv8** | 2 | 2-bytes unsigned integer (little endian) | Number of stick-to-next vertices | +| 70 | **nv4** | 2 | 2-bytes unsigned integer (little endian) | Number of own vertices for 1/4 resolutio | +| 72 | **nv2** | 2 | 2-bytes unsigned integer (little endian) | Number of own vertices for 1/2 resolution | +| 74 | **nv1** | 2 | 2-bytes unsigned integer (little endian) | Number of own vertices for full resolution | +| 76 | **np4** | 2 | 2-bytes unsigned integer (little endian) | Number of polygons for 1/4 resolution | +| 78 | **np2** | 2 | 2-bytes unsigned integer (little endian) | Number of polygons for 1/2 resolution | +| 80 | **np1** | 2 | 2-bytes unsigned integer (little endian) | Number of polygons for full resolution | +| 82 | **unk1** | 6 | 6-bytes unsigned integer (little endian) | Unknown purpose | +| 88 | **vertices** | (nv8+nv1)\*6 | Array of `nv8+nv1` items
Item size: 6 bytes
Item type: Point in 3D space (x,y,z), where each coordinate is: 16-bit real number (little-endian, signed), where last 8 bits is a fractional part | Vertices | +| 88 + (nv8+nv1)\*6 | **polygons** | (np4+np2+np1)\*8 | Array of `np4+np2+np1` items
Item type: [TrkPolygon](#trkpolygon) | Polygons | +| 88 + (nv8+nv1)\*6 + (np4+np2+np1)\*8 | **unk2** | custom_func | Bytes | Unknown purpose | +| 88 + (nv8+nv1)\*6 + (np4+np2+np1)\*8 + custom_func | **extrablock_offsets** | num_extrablocks\*4 | Array of `num_extrablocks` items
Item size: 4 bytes
Item type: 4-bytes unsigned integer (little endian) | Offset to each of the extrablocks | +| 88 + (nv8+nv1)\*6 + (np4+np2+np1)\*8 + custom_func + num_extrablocks\*4 | **extrablocks** | ? | Array of `num_extrablocks` items
Item type: [TrkExtraBlock](#trkextrablock) | Extrablocks | +### **TrkExtraBlock** ### +#### **Size**: 8..? bytes #### +| Offset | Name | Size (bytes) | Type | Description | +| --- | --- | --- | --- | --- | +| 0 | **block_size** | 4 | 4-bytes unsigned integer (little endian) | Block size in bytes | +| 4 | **type** | 1 | Enum of 256 possible values
Value names:2: textures_map
4: block_numbers
5: polygon_map
6: median_polygons
7: props_7
8: prop_descriptions
9: lanes
13: road_vectors
15: collision_data
18: props_18
19: props_19
| Type of the data records | +| 5 | **unk** | 1 | 1-byte unsigned integer. Always == 0x0 | Unknown purpose | +| 6 | **num_data_records** | 2 | 2-bytes unsigned integer (little endian) | Amount of data records | +| 8 | **data_records** | ? | Type according to enum `type`:
- Array of `num_data_records` items
Item type: [TexturesMapExtraDataRecord](#texturesmapextradatarecord)
- Array of `num_data_records` items
Item size: 2 bytes
Item type: 2-bytes unsigned integer (little endian)
- Array of `num_data_records` items
Item type: [PolygonMapExtraDataRecord](#polygonmapextradatarecord)
- Array of `num_data_records` items
Item type: [MedianExtraDataRecord](#medianextradatarecord)
- Array of `num_data_records` items
Item type: [PropExtraDataRecord](#propextradatarecord)
- Array of `num_data_records` items
Item type: [PropDescriptionExtraDataRecord](#propdescriptionextradatarecord)
- Array of `num_data_records` items
Item type: [LanesExtraDataRecord](#lanesextradatarecord)
- Array of `num_data_records` items
Item type: [RoadVectorsExtraDataRecord](#roadvectorsextradatarecord)
- Array of `num_data_records` items
Item type: [CollisionExtraDataRecord](#collisionextradatarecord)
- Array of `num_data_records` items
Item type: [PropExtraDataRecord](#propextradatarecord)
- Array of `num_data_records` items
Item type: [PropExtraDataRecord](#propextradatarecord)
- Bytes | Data records | +### **TexturesMapExtraDataRecord** ### +#### **Size**: 10 bytes #### +| Offset | Name | Size (bytes) | Type | Description | +| --- | --- | --- | --- | --- | +| 0 | **texture_number** | 2 | 2-bytes unsigned integer (little endian) | Texture number in QFS file | +| 2 | **alignment_data** | 2 | 2-bytes unsigned integer (little endian) | Alignment data, which game uses instead of UV-s when rendering mesh. Seems to be a set of flags, but I haven't investigated it deeply yet | +| 4 | **luminosity** | 3 | Color RGB values | Luminosity color | +| 7 | **black** | 3 | Color RGB values | Unknown, usually black | +### **MedianExtraDataRecord** ### +#### **Size**: 8 bytes #### +| Offset | Name | Size (bytes) | Type | Description | +| --- | --- | --- | --- | --- | +| 0 | **polygon_idx** | 1 | 1-byte unsigned integer | Polygon index | +| 1 | **unk** | 7 | Bytes | Unknown purpose | +### **PolygonMapExtraDataRecord** ### +#### **Size**: 2 bytes #### +| Offset | Name | Size (bytes) | Type | Description | +| --- | --- | --- | --- | --- | +| 0 | **vectors_idx** | 1 | 1-byte unsigned integer | - | +| 1 | **car_behavior** | 1 | Enum of 256 possible values
Value names:0: unk0
1: unk1
| - | +### **PropExtraDataRecord** ### +#### **Size**: 4..? bytes #### +#### **Description**: 3D model placement (prop). Same 3D model can be used few times on the track #### +| Offset | Name | Size (bytes) | Type | Description | +| --- | --- | --- | --- | --- | +| 0 | **block_size** | 2 | 2-bytes unsigned integer (little endian) | Block size in bytes | +| 2 | **type** | 1 | Enum of 256 possible values
Value names:1: static_prop
3: animated_prop
| Object type | +| 3 | **prop_descr_idx** | 1 | 1-byte unsigned integer | An index of 3D model in "prop_descriptions" extrablock | +| 4 | **position** | ? | Type according to enum `type`:
- Point in 3D space (x,y,z), where each coordinate is: 32-bit real number (little-endian, signed), where last 16 bits is a fractional part
- [AnimatedPropPosition](#animatedpropposition)
- Bytes | Object positioning in 3D space | +### **AnimatedPropPosition** ### +#### **Size**: 4..? bytes #### +| Offset | Name | Size (bytes) | Type | Description | +| --- | --- | --- | --- | --- | +| 0 | **num_frames** | 2 | 2-bytes unsigned integer (little endian) | An amount of frames | +| 2 | **unk** | 2 | 2-bytes unsigned integer (little endian) | Unknown purpose | +| 4 | **frames** | num_frames\*20 | Array of `num_frames` items
Item type: [AnimatedPropPositionFrame](#animatedproppositionframe) | Animation frames | +### **AnimatedPropPositionFrame** ### +#### **Size**: 20 bytes #### +| Offset | Name | Size (bytes) | Type | Description | +| --- | --- | --- | --- | --- | +| 0 | **position** | 12 | Point in 3D space (x,y,z), where each coordinate is: 32-bit real number (little-endian, signed), where last 16 bits is a fractional part | Object position in 3D space | +| 12 | **unk0** | 8 | Bytes | Unknown purpose | +### **PropDescriptionExtraDataRecord** ### +#### **Size**: 8..? bytes #### +#### **Description**: 3D model #### +| Offset | Name | Size (bytes) | Type | Description | +| --- | --- | --- | --- | --- | +| 0 | **block_size** | 4 | 4-bytes unsigned integer (little endian) | Block size in bytes | +| 4 | **num_vertices** | 2 | 2-bytes unsigned integer (little endian) | Amount of vertices | +| 6 | **num_polygons** | 2 | 2-bytes unsigned integer (little endian) | Amount of polygons | +| 8 | **vertices** | num_vertices\*6 | Array of `num_vertices` items
Item size: 6 bytes
Item type: Point in 3D space (x,y,z), where each coordinate is: 16-bit real number (little-endian, signed), where last 8 bits is a fractional part | Vertices | +| 8 + num_vertices\*6 | **polygons** | num_polygons\*8 | Array of `num_polygons` items
Item type: [TrkPolygon](#trkpolygon) | Polygons | +| 8 + num_vertices\*6 + num_polygons\*8 | **padding** | custom_func | Bytes | Unused space | +### **LanesExtraDataRecord** ### +#### **Size**: 4 bytes #### +| Offset | Name | Size (bytes) | Type | Description | +| --- | --- | --- | --- | --- | +| 0 | **vertex_idx** | 1 | 1-byte unsigned integer | Vertex number (inside background 3D structure : 0 to nv1+nv8) | +| 1 | **track_pos** | 1 | 1-byte unsigned integer | Position along track inside block (0 to 7) | +| 2 | **lat_pos** | 1 | 1-byte unsigned integer | Lateral position ? (constant in each lane), -1 at the end) | +| 3 | **polygon_idx** | 1 | 1-byte unsigned integer | {olygon number (inside full-res background 3D structure : 0 to np1) | +### **RoadVectorsExtraDataRecord** ### +#### **Size**: 12 bytes #### +| Offset | Name | Size (bytes) | Type | Description | +| --- | --- | --- | --- | --- | +| 0 | **normal** | 6 | Point in 3D space (x,y,z), where each coordinate is: 16-bit real number (little-endian, signed), where last 16 bits is a fractional part, normalized | - | +| 6 | **forward** | 6 | Point in 3D space (x,y,z), where each coordinate is: 16-bit real number (little-endian, signed), where last 16 bits is a fractional part, normalized | - | +### **CollisionExtraDataRecord** ### +#### **Size**: 36 bytes #### +| Offset | Name | Size (bytes) | Type | Description | +| --- | --- | --- | --- | --- | +| 0 | **position** | 12 | Point in 3D space (x,y,z), where each coordinate is: 32-bit real number (little-endian, signed), where last 16 bits is a fractional part | - | +| 12 | **vertical** | 3 | Point in 3D space (x,y,z), where each coordinate is: 8-bit real number (little-endian, signed), where last 8 bits is a fractional part, normalized | - | +| 15 | **forward** | 3 | Point in 3D space (x,y,z), where each coordinate is: 8-bit real number (little-endian, signed), where last 8 bits is a fractional part, normalized | - | +| 18 | **right** | 3 | Point in 3D space (x,y,z), where each coordinate is: 8-bit real number (little-endian, signed), where last 8 bits is a fractional part, normalized | - | +| 21 | **unk0** | 1 | 1-byte unsigned integer | Unknown purpose | +| 22 | **block_idx** | 2 | 2-bytes unsigned integer (little endian) | - | +| 24 | **unk1** | 2 | 2-bytes unsigned integer (little endian) | Unknown purpose | +| 26 | **left_border** | 2 | 2-bytes unsigned integer (little endian) | - | +| 28 | **right_border** | 2 | 2-bytes unsigned integer (little endian) | - | +| 30 | **respawn_lat_pos** | 2 | 2-bytes unsigned integer (little endian) | - | +| 32 | **unk2** | 4 | 4-bytes unsigned integer (little endian) | Unknown purpose | +### **TrkPolygon** ### +#### **Size**: 8 bytes #### +#### **Description**: A single polygon of terrain or prop #### +| Offset | Name | Size (bytes) | Type | Description | +| --- | --- | --- | --- | --- | +| 0 | **texture** | 2 | 2-bytes unsigned integer (little endian) | Texture number. It is not a number of texture in QFS file. Instead, it is an index of mapping entry in corresponding COL file, which contains real texture number | +| 2 | **texture2** | 2 | 2-bytes signed integer (little endian) | 255 (texture number for the other side == none ?) | +| 4 | **vertices** | 4 | Array of `4` items
Item size: 1 byte
Item type: 1-byte unsigned integer | Polygon vertices (indexes from vertex table) | ## **Bitmaps** ## ### **Bitmap4Bit** ### #### **Size**: 16..? bytes #### From 89ac16e38e892f5dd449caeb44edf5c51615ffd1 Mon Sep 17 00:00:00 2001 From: andy Date: Tue, 4 Feb 2025 20:00:59 +0200 Subject: [PATCH 30/36] docs --- resources/NFS2.md | 10 +++++----- resources/NFS2_SE.md | 10 +++++----- resources/eac/maps/nfs2.py | 8 +++++--- 3 files changed, 15 insertions(+), 13 deletions(-) diff --git a/resources/NFS2.md b/resources/NFS2.md index cd9b505..086a416 100644 --- a/resources/NFS2.md +++ b/resources/NFS2.md @@ -1,6 +1,6 @@ # **NFS2 file specs** # -*Last time updated: 2025-02-04 15:32:18.091435+00:00* +*Last time updated: 2025-02-04 17:58:52.911024+00:00* # **Info by file extensions** # @@ -160,7 +160,7 @@ Did not find what you need or some given data is wrong? Please submit an | 10 | **unk0** | 2 | 2-bytes unsigned integer (little endian) | Unknown purpose | | 12 | **block_idx** | 4 | 4-bytes unsigned integer (little endian) | Block index (serial number) | | 16 | **bounds** | 48 | Array of `4` items
Item size: 12 bytes
Item type: Point in 3D space (x,y,z), where each coordinate is: 32-bit real number (little-endian, signed), where last 16 bits is a fractional part | Block bounding rectangle | -| 64 | **extrablocks_offset** | 4 | 4-bytes unsigned integer (little endian) | An offset to "extrablock_offsets" block from here? | +| 64 | **extrablocks_offset** | 4 | 4-bytes unsigned integer (little endian) | An offset to "extrablock_offsets" block from here | | 68 | **nv8** | 2 | 2-bytes unsigned integer (little endian) | Number of stick-to-next vertices | | 70 | **nv4** | 2 | 2-bytes unsigned integer (little endian) | Number of own vertices for 1/4 resolutio | | 72 | **nv2** | 2 | 2-bytes unsigned integer (little endian) | Number of own vertices for 1/2 resolution | @@ -171,9 +171,9 @@ Did not find what you need or some given data is wrong? Please submit an | 82 | **unk1** | 6 | 6-bytes unsigned integer (little endian) | Unknown purpose | | 88 | **vertices** | (nv8+nv1)\*6 | Array of `nv8+nv1` items
Item size: 6 bytes
Item type: Point in 3D space (x,y,z), where each coordinate is: 16-bit real number (little-endian, signed), where last 8 bits is a fractional part | Vertices | | 88 + (nv8+nv1)\*6 | **polygons** | (np4+np2+np1)\*8 | Array of `np4+np2+np1` items
Item type: [TrkPolygon](#trkpolygon) | Polygons | -| 88 + (nv8+nv1)\*6 + (np4+np2+np1)\*8 | **unk2** | custom_func | Bytes | Unknown purpose | -| 88 + (nv8+nv1)\*6 + (np4+np2+np1)\*8 + custom_func | **extrablock_offsets** | num_extrablocks\*4 | Array of `num_extrablocks` items
Item size: 4 bytes
Item type: 4-bytes unsigned integer (little endian) | Offset to each of the extrablocks | -| 88 + (nv8+nv1)\*6 + (np4+np2+np1)\*8 + custom_func + num_extrablocks\*4 | **extrablocks** | ? | Array of `num_extrablocks` items
Item type: [TrkExtraBlock](#trkextrablock) | Extrablocks | +| 88 + (nv8+nv1)\*6 + (np4+np2+np1)\*8 | **unk2** | up to (extrablocks_offset+64) | Bytes | Unknown purpose | +| extrablocks_offset + 64 | **extrablock_offsets** | num_extrablocks\*4 | Array of `num_extrablocks` items
Item size: 4 bytes
Item type: 4-bytes unsigned integer (little endian) | Offset to each of the extrablocks | +| extrablocks_offset + 64 + num_extrablocks\*4 | **extrablocks** | ? | Array of `num_extrablocks` items
Item type: [TrkExtraBlock](#trkextrablock) | Extrablocks | ### **TrkExtraBlock** ### #### **Size**: 8..? bytes #### | Offset | Name | Size (bytes) | Type | Description | diff --git a/resources/NFS2_SE.md b/resources/NFS2_SE.md index 54ce0c1..ffa91d0 100644 --- a/resources/NFS2_SE.md +++ b/resources/NFS2_SE.md @@ -1,6 +1,6 @@ # **NFS2SE file specs** # -*Last time updated: 2025-02-04 15:53:36.038195+00:00* +*Last time updated: 2025-02-04 17:58:53.045661+00:00* # **Info by file extensions** # @@ -156,7 +156,7 @@ Did not find what you need or some given data is wrong? Please submit an | 10 | **unk0** | 2 | 2-bytes unsigned integer (little endian) | Unknown purpose | | 12 | **block_idx** | 4 | 4-bytes unsigned integer (little endian) | Block index (serial number) | | 16 | **bounds** | 48 | Array of `4` items
Item size: 12 bytes
Item type: Point in 3D space (x,y,z), where each coordinate is: 32-bit real number (little-endian, signed), where last 16 bits is a fractional part | Block bounding rectangle | -| 64 | **extrablocks_offset** | 4 | 4-bytes unsigned integer (little endian) | An offset to "extrablock_offsets" block from here? | +| 64 | **extrablocks_offset** | 4 | 4-bytes unsigned integer (little endian) | An offset to "extrablock_offsets" block from here | | 68 | **nv8** | 2 | 2-bytes unsigned integer (little endian) | Number of stick-to-next vertices | | 70 | **nv4** | 2 | 2-bytes unsigned integer (little endian) | Number of own vertices for 1/4 resolutio | | 72 | **nv2** | 2 | 2-bytes unsigned integer (little endian) | Number of own vertices for 1/2 resolution | @@ -167,9 +167,9 @@ Did not find what you need or some given data is wrong? Please submit an | 82 | **unk1** | 6 | 6-bytes unsigned integer (little endian) | Unknown purpose | | 88 | **vertices** | (nv8+nv1)\*6 | Array of `nv8+nv1` items
Item size: 6 bytes
Item type: Point in 3D space (x,y,z), where each coordinate is: 16-bit real number (little-endian, signed), where last 8 bits is a fractional part | Vertices | | 88 + (nv8+nv1)\*6 | **polygons** | (np4+np2+np1)\*8 | Array of `np4+np2+np1` items
Item type: [TrkPolygon](#trkpolygon) | Polygons | -| 88 + (nv8+nv1)\*6 + (np4+np2+np1)\*8 | **unk2** | custom_func | Bytes | Unknown purpose | -| 88 + (nv8+nv1)\*6 + (np4+np2+np1)\*8 + custom_func | **extrablock_offsets** | num_extrablocks\*4 | Array of `num_extrablocks` items
Item size: 4 bytes
Item type: 4-bytes unsigned integer (little endian) | Offset to each of the extrablocks | -| 88 + (nv8+nv1)\*6 + (np4+np2+np1)\*8 + custom_func + num_extrablocks\*4 | **extrablocks** | ? | Array of `num_extrablocks` items
Item type: [TrkExtraBlock](#trkextrablock) | Extrablocks | +| 88 + (nv8+nv1)\*6 + (np4+np2+np1)\*8 | **unk2** | up to (extrablocks_offset+64) | Bytes | Unknown purpose | +| extrablocks_offset + 64 | **extrablock_offsets** | num_extrablocks\*4 | Array of `num_extrablocks` items
Item size: 4 bytes
Item type: 4-bytes unsigned integer (little endian) | Offset to each of the extrablocks | +| extrablocks_offset + 64 + num_extrablocks\*4 | **extrablocks** | ? | Array of `num_extrablocks` items
Item type: [TrkExtraBlock](#trkextrablock) | Extrablocks | ### **TrkExtraBlock** ### #### **Size**: 8..? bytes #### | Offset | Name | Size (bytes) | Type | Description | diff --git a/resources/eac/maps/nfs2.py b/resources/eac/maps/nfs2.py index 2cca9af..2e7eee7 100644 --- a/resources/eac/maps/nfs2.py +++ b/resources/eac/maps/nfs2.py @@ -221,7 +221,7 @@ class Fields(DeclarativeCompoundBlock.Fields): bounds = (ArrayBlock(child=Point3D(child_length=4, fraction_bits=16), length=4), {'description': 'Block bounding rectangle'}) extrablocks_offset = (IntegerBlock(length=4, is_signed=False), - {'description': 'An offset to "extrablock_offsets" block from here?'}) + {'description': 'An offset to "extrablock_offsets" block from here'}) nv8 = (IntegerBlock(length=2, is_signed=False), {'description': 'Number of stick-to-next vertices'}) nv4 = (IntegerBlock(length=2, is_signed=False), @@ -245,11 +245,13 @@ class Fields(DeclarativeCompoundBlock.Fields): length=lambda ctx: ctx.data('np4') + ctx.data('np2') + ctx.data('np1')), {'description': 'Polygons'}) unk2 = (BytesBlock( - length=lambda ctx: 64 + ctx.data('extrablocks_offset') + ctx.read_start_offset - ctx.buffer.tell()), + length=(lambda ctx: 64 + ctx.data('extrablocks_offset') + ctx.read_start_offset - ctx.buffer.tell(), + 'up to (extrablocks_offset+64)')), {'is_unknown': True}) extrablock_offsets = (ArrayBlock(child=IntegerBlock(length=4, is_signed=False), length=lambda ctx: ctx.data('num_extrablocks')), - {'description': 'Offset to each of the extrablocks'}) + {'description': 'Offset to each of the extrablocks', + 'custom_offset': 'extrablocks_offset + 64'}) extrablocks = (ArrayBlock(length=(0, 'num_extrablocks'), child=TrkExtraBlock()), {'description': 'Extrablocks'}) From 1c1d2fd5d9d8e05bf0fafad1765139c1dc89a2d8 Mon Sep 17 00:00:00 2001 From: andy Date: Wed, 5 Feb 2025 03:28:37 +0200 Subject: [PATCH 31/36] minor cleanup --- frontend/dist/gui/index.html | 4 +- frontend/dist/gui/main.77fc00c1ac1f64f1.js | 1 - frontend/dist/gui/main.b45e12319af3e832.js | 1 + ...906825.css => styles.ef24d245995f07a6.css} | 2 +- .../trk-map.block-ui.component.ts | 172 +----------------- frontend/src/styles.scss | 18 +- serializers/maps.py | 1 - settings.py | 1 + 8 files changed, 24 insertions(+), 176 deletions(-) delete mode 100644 frontend/dist/gui/main.77fc00c1ac1f64f1.js create mode 100644 frontend/dist/gui/main.b45e12319af3e832.js rename frontend/dist/gui/{styles.9650df2468906825.css => styles.ef24d245995f07a6.css} (99%) diff --git a/frontend/dist/gui/index.html b/frontend/dist/gui/index.html index 7a54de7..255f97c 100644 --- a/frontend/dist/gui/index.html +++ b/frontend/dist/gui/index.html @@ -8,9 +8,9 @@ - + - + \ No newline at end of file diff --git a/frontend/dist/gui/main.77fc00c1ac1f64f1.js b/frontend/dist/gui/main.77fc00c1ac1f64f1.js deleted file mode 100644 index 27569e7..0000000 --- a/frontend/dist/gui/main.77fc00c1ac1f64f1.js +++ /dev/null @@ -1 +0,0 @@ -(self.webpackChunkgui=self.webpackChunkgui||[]).push([[179],{360:(Bo,Gs,ps)=>{"use strict";function dn(i){return"function"==typeof i}function z(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 Br=z(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 Kr(i,t){if(i){const e=i.indexOf(t);0<=e&&i.splice(e,1)}}class Qt{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(dn(n))try{n()}catch(s){t=s instanceof Br?s.errors:[s]}const{_finalizers:r}=this;if(r){this._finalizers=null;for(const s of r)try{Ga(s)}catch(o){t=t??[],o instanceof Br?t=[...t,...o.errors]:t.push(o)}}if(t)throw new Br(t)}}add(t){var e;if(t&&t!==this)if(this.closed)Ga(t);else{if(t instanceof Qt){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)&&Kr(e,t)}remove(t){const{_finalizers:e}=this;e&&Kr(e,t),t instanceof Qt&&t._removeParent(this)}}Qt.EMPTY=(()=>{const i=new Qt;return i.closed=!0,i})();const Un=Qt.EMPTY;function Dl(i){return i instanceof Qt||i&&"closed"in i&&dn(i.remove)&&dn(i.add)&&dn(i.unsubscribe)}function Ga(i){dn(i)?i():i.unsubscribe()}const Ws={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 Si(i){Ci.setTimeout(()=>{const{onUnhandledError:t}=Ws;if(!t)throw i;t(i)})}function ms(){}const js=On("C",void 0,void 0);function On(i,t,e){return{kind:i,value:t,error:e}}let ur=null;function mc(i){if(Ws.useDeprecatedSynchronousErrorHandling){const t=!ur;if(t&&(ur={errorThrown:!1,error:null}),i(),t){const{errorThrown:e,error:n}=ur;if(ur=null,e)throw n}}else i()}class Tl extends Qt{constructor(t){super(),this.isStopped=!1,t?(this.destination=t,Dl(t)&&t.add(this)):this.destination=ME}static create(t,e,n){return new fa(t,e,n)}next(t){this.isStopped?Xg(function Uo(i){return On("N",i,void 0)}(t),this):this._next(t)}error(t){this.isStopped?Xg(function Ys(i){return On("E",void 0,i)}(t),this):(this.isStopped=!0,this._error(t))}complete(){this.isStopped?Xg(js,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 ha=Function.prototype.bind;function Il(i,t){return ha.call(i,t)}class Wa{constructor(t){this.partialObserver=t}next(t){const{partialObserver:e}=this;if(e.next)try{e.next(t)}catch(n){md(n)}}error(t){const{partialObserver:e}=this;if(e.error)try{e.error(t)}catch(n){md(n)}else md(t)}complete(){const{partialObserver:t}=this;if(t.complete)try{t.complete()}catch(e){md(e)}}}class fa extends Tl{constructor(t,e,n){let r;if(super(),dn(t)||!t)r={next:t??void 0,error:e??void 0,complete:n??void 0};else{let s;this&&Ws.useDeprecatedNextContext?(s=Object.create(t),s.unsubscribe=()=>this.unsubscribe(),r={next:t.next&&Il(t.next,s),error:t.error&&Il(t.error,s),complete:t.complete&&Il(t.complete,s)}):r=t}this.destination=new Wa(r)}}function md(i){Ws.useDeprecatedSynchronousErrorHandling?function ua(i){Ws.useDeprecatedSynchronousErrorHandling&&ur&&(ur.errorThrown=!0,ur.error=i)}(i):Si(i)}function Xg(i,t){const{onStoppedNotification:e}=Ws;e&&Ci.setTimeout(()=>e(i,t))}const ME={closed:!0,next:ms,error:function wE(i){throw i},complete:ms},Kg="function"==typeof Symbol&&Symbol.observable||"@@observable";function ja(i){return i}function l0(i){return 0===i.length?ja:1===i.length?i[0]:function(e){return i.reduce((n,r)=>r(n),e)}}let In=(()=>{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 Tl||function SE(i){return i&&dn(i.next)&&dn(i.error)&&dn(i.complete)}(i)&&Dl(i)}(e)?e:new fa(e,n,r);return mc(()=>{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=Ya(n))((r,s)=>{const o=new fa({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)}[Kg](){return this}pipe(...e){return l0(e)(this)}toPromise(e){return new(e=Ya(e))((n,r)=>{let s;this.subscribe(o=>s=o,o=>r(o),()=>n(s))})}}return i.create=t=>new i(t),i})();function Ya(i){var t;return null!==(t=i??Ws.Promise)&&void 0!==t?t:Promise}const pa=z(i=>function(){i(this),this.name="ObjectUnsubscribedError",this.message="object unsubscribed"});let Te=(()=>{class i extends In{constructor(){super(),this.closed=!1,this.currentObservers=null,this.observers=[],this.isStopped=!1,this.hasError=!1,this.thrownError=null}lift(e){const n=new c0(this,this);return n.operator=e,n}_throwIfClosed(){if(this.closed)throw new pa}next(e){mc(()=>{if(this._throwIfClosed(),!this.isStopped){this.currentObservers||(this.currentObservers=Array.from(this.observers));for(const n of this.currentObservers)n.next(e)}})}error(e){mc(()=>{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(){mc(()=>{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?Un:(this.currentObservers=null,s.push(e),new Qt(()=>{this.currentObservers=null,Kr(s,e)}))}_checkFinalizedStatuses(e){const{hasError:n,thrownError:r,isStopped:s}=this;n?e.error(r):s&&e.complete()}asObservable(){const e=new In;return e.source=this,e}}return i.create=(t,e)=>new c0(t,e),i})();class c0 extends Te{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:Un}}function d0(i){return dn(i?.lift)}function ni(i){return t=>{if(d0(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 qn(i,t,e,n,r){return new EE(i,t,e,n,r)}class EE extends Tl{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 tt(i,t){return ni((e,n)=>{let r=0;e.subscribe(qn(n,s=>{n.next(i.call(t,s,r++))}))})}function ma(i){return this instanceof ma?(this.v=i,this):new ma(i)}function Bf(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 Zg(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 i_=i=>i&&"number"==typeof i.length&&"function"!=typeof i;function r_(i){return dn(i?.then)}function m0(i){return dn(i[Kg])}function g0(i){return Symbol.asyncIterator&&dn(i?.[Symbol.asyncIterator])}function _0(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 v0=function s_(){return"function"==typeof Symbol&&Symbol.iterator?Symbol.iterator:"@@iterator"}();function Uf(i){return dn(i?.[v0])}function y0(i){return function Nf(i,t,e){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var r,n=e.apply(i,t||[]),s=[];return r=Object.create(("function"==typeof AsyncIterator?AsyncIterator:Object).prototype),a("next"),a("throw"),a("return",function o(m){return function(g){return Promise.resolve(g).then(m,h)}}),r[Symbol.asyncIterator]=function(){return this},r;function a(m,g){n[m]&&(r[m]=function(b){return new Promise(function(v,y){s.push([m,b,v,y])>1||l(m,b)})},g&&(r[m]=g(r[m])))}function l(m,g){try{!function c(m){m.value instanceof ma?Promise.resolve(m.value.v).then(d,h):p(s[0][2],m)}(n[m](g))}catch(b){p(s[0][3],b)}}function d(m){l("next",m)}function h(m){l("throw",m)}function p(m,g){m(g),s.shift(),s.length&&l(s[0][0],s[0][1])}}(this,arguments,function*(){const e=i.getReader();try{for(;;){const{value:n,done:r}=yield ma(e.read());if(r)return yield ma(void 0);yield yield ma(n)}}finally{e.releaseLock()}})}function b0(i){return dn(i?.getReader)}function Mr(i){if(i instanceof In)return i;if(null!=i){if(m0(i))return function LE(i){return new In(t=>{const e=i[Kg]();if(dn(e.subscribe))return e.subscribe(t);throw new TypeError("Provided object does not correctly implement Symbol.observable")})}(i);if(i_(i))return function NE(i){return new In(t=>{for(let e=0;e{i.then(e=>{t.closed||(t.next(e),t.complete())},e=>t.error(e)).then(null,Si)})}(i);if(g0(i))return x0(i);if(Uf(i))return function UE(i){return new In(t=>{for(const e of i)if(t.next(e),t.closed)return;t.complete()})}(i);if(b0(i))return function w0(i){return x0(y0(i))}(i)}throw _0(i)}function x0(i){return new In(t=>{(function VE(i,t){var e,n,r,s;return function _d(i,t,e,n){return new(e||(e=Promise))(function(s,o){function a(d){try{c(n.next(d))}catch(h){o(h)}}function l(d){try{c(n.throw(d))}catch(h){o(h)}}function c(d){d.done?s(d.value):function r(s){return s instanceof e?s:new e(function(o){o(s)})}(d.value).then(a,l)}c((n=n.apply(i,t||[])).next())})}(this,void 0,void 0,function*(){try{for(e=Bf(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 Xa(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 rr(i,t,e=1/0){return dn(t)?rr((n,r)=>tt((s,o)=>t(n,s,r,o))(Mr(i(n,r))),e):("number"==typeof t&&(e=t),ni((n,r)=>function zE(i,t,e,n,r,s,o,a){const l=[];let c=0,d=0,h=!1;const p=()=>{h&&!l.length&&!c&&t.complete()},m=b=>c{s&&t.next(b),c++;let v=!1;Mr(e(b,d++)).subscribe(qn(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(qn(t,m,()=>{h=!0,p()})),()=>{a?.()}}(n,r,i,e)))}function bd(i=1/0){return rr(ja,i)}const _o=new In(i=>i.complete());function $u(i){return i&&dn(i.schedule)}function a_(i){return i[i.length-1]}function M0(i){return dn(a_(i))?i.pop():void 0}function Gu(i){return $u(a_(i))?i.pop():void 0}function l_(i,t=0){return ni((e,n)=>{e.subscribe(qn(n,r=>Xa(n,i,()=>n.next(r),t),()=>Xa(n,i,()=>n.complete(),t),r=>Xa(n,i,()=>n.error(r),t)))})}function c_(i,t=0){return ni((e,n)=>{n.add(i.schedule(()=>e.subscribe(n),t))})}function d_(i,t){if(!i)throw new Error("Iterable cannot be null");return new In(e=>{Xa(e,t,()=>{const n=i[Symbol.asyncIterator]();Xa(e,t,()=>{n.next().then(r=>{r.done?e.complete():e.next(r.value)})},0,!0)})})}function Ni(i,t){return t?function E0(i,t){if(null!=i){if(m0(i))return function $E(i,t){return Mr(i).pipe(c_(t),l_(t))}(i,t);if(i_(i))return function WE(i,t){return new In(e=>{let n=0;return t.schedule(function(){n===i.length?e.complete():(e.next(i[n++]),e.closed||this.schedule())})})}(i,t);if(r_(i))return function GE(i,t){return Mr(i).pipe(c_(t),l_(t))}(i,t);if(g0(i))return d_(i,t);if(Uf(i))return function jE(i,t){return new In(e=>{let n;return Xa(e,t,()=>{n=i[v0](),Xa(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)}),()=>dn(n?.return)&&n.return()})}(i,t);if(b0(i))return function S0(i,t){return d_(y0(i),t)}(i,t)}throw _0(i)}(i,t):Mr(i)}function Cr(...i){const t=Gu(i),e=function C0(i,t){return"number"==typeof a_(i)?i.pop():t}(i,1/0),n=i;return n.length?1===n.length?Mr(n[0]):bd(e)(Ni(n,t)):_o}function Vf(i={}){const{connector:t=(()=>new Te),resetOnError:e=!0,resetOnComplete:n=!0,resetOnRefCountZero:r=!0}=i;return s=>{let o,a,l,c=0,d=!1,h=!1;const p=()=>{a?.unsubscribe(),a=void 0},m=()=>{p(),o=l=void 0,d=h=!1},g=()=>{const b=o;m(),b?.unsubscribe()};return ni((b,v)=>{c++,!h&&!d&&p();const y=l=l??t();v.add(()=>{c--,0===c&&!h&&!d&&(a=xd(g,r))}),y.subscribe(v),!o&&c>0&&(o=new fa({next:M=>y.next(M),error:M=>{h=!0,p(),a=xd(m,e,M),y.error(M)},complete:()=>{d=!0,p(),a=xd(m,n),y.complete()}}),Mr(b).subscribe(o))})(s)}}function xd(i,t,...e){if(!0===t)return void i();if(!1===t)return;const n=new fa({next:()=>{n.unsubscribe(),i()}});return Mr(t(...e)).subscribe(n)}function ci(i){for(let t in i)if(i[t]===ci)return t;throw Error("Could not find renamed property on target object.")}function u_(i,t){for(const e in t)t.hasOwnProperty(e)&&!i.hasOwnProperty(e)&&(i[e]=t[e])}function mi(i){if("string"==typeof i)return i;if(Array.isArray(i))return"["+i.map(mi).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 zf(i,t){return null==i||""===i?null===t?"":t:null==t||""===t?i:i+" "+t}const h_=ci({__forward_ref__:ci});function Gn(i){return i.__forward_ref__=Gn,i.toString=function(){return mi(this())},i}function Ot(i){return Wu(i)?i():i}function Wu(i){return"function"==typeof i&&i.hasOwnProperty(h_)&&i.__forward_ref__===Gn}function ju(i){return i&&!!i.\u0275providers}const qu="https://g.co/ng/security#xss";class pe extends Error{constructor(t,e){super(Hf(t,e)),this.code=t}}function Hf(i,t){return`NG0${Math.abs(i)}${t?": "+t.trim():""}`}function Jt(i){return"string"==typeof i?i:null==i?"":String(i)}function $f(i,t){throw new pe(-201,!1)}function En(i,t){null==i&&function ii(i,t,e,n){throw new Error(`ASSERTION ERROR: ${i}`+(null==n?"":` [Expected=> ${e} ${n} ${t} <=Actual]`))}(t,i,null,"!=")}function Pe(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 f_(i,wd)||f_(i,m_)}function f_(i,t){return i.hasOwnProperty(t)?i[t]:null}function p_(i){return i&&(i.hasOwnProperty(gs)||i.hasOwnProperty(T0))?i[gs]:null}const wd=ci({\u0275prov:ci}),gs=ci({\u0275inj:ci}),m_=ci({ngInjectableDef:ci}),T0=ci({ngInjectorDef:ci});var Ft=(()=>((Ft=Ft||{})[Ft.Default=0]="Default",Ft[Ft.Host=1]="Host",Ft[Ft.Self=2]="Self",Ft[Ft.SkipSelf=4]="SkipSelf",Ft[Ft.Optional=8]="Optional",Ft))();let Wf;function Xs(i){const t=Wf;return Wf=i,t}function _s(i,t,e){const n=Gf(i);return n&&"root"==n.providedIn?void 0===n.value?n.value=n.factory():n.value:e&Ft.Optional?null:void 0!==t?t:void $f(mi(i))}const Rn=(()=>typeof globalThis<"u"&&globalThis||typeof global<"u"&&global||typeof window<"u"&&window||typeof self<"u"&&typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&self)(),kl={},Ku="__NG_DI_FLAG__",gi="ngTempTokenPath",Pl="ngTokenPath",g_=/\n/gm,eA="\u0275",jf="__source";let Zu;function Md(i){const t=Zu;return Zu=i,t}function tA(i,t=Ft.Default){if(void 0===Zu)throw new pe(-203,!1);return null===Zu?_s(i,void 0,t):Zu.get(i,t&Ft.Optional?null:void 0,t)}function ee(i,t=Ft.Default){return(function I0(){return Wf}()||tA)(Ot(i),t)}function Lt(i,t=Ft.Default){return ee(i,Yf(t))}function Yf(i){return typeof i>"u"||"number"==typeof i?i:0|(i.optional&&8)|(i.host&&1)|(i.self&&2)|(i.skipSelf&&4)}function qf(i){const t=[];for(let e=0;e((vo=vo||{})[vo.OnPush=0]="OnPush",vo[vo.Default=1]="Default",vo))(),Ks=(()=>{return(i=Ks||(Ks={}))[i.Emulated=0]="Emulated",i[i.None=2]="None",i[i.ShadowDom=3]="ShadowDom",Ks;var i})();const Za={},Wn=[],Ur=ci({\u0275cmp:ci}),Ju=ci({\u0275dir:ci}),yc=ci({\u0275pipe:ci}),y_=ci({\u0275mod:ci}),ga=ci({\u0275fac:ci}),eh=ci({__NG_ELEMENT_ID__:ci});let nA=0;function ot(i){return Ka(()=>{const t=yo(i),e={...t,decls:i.decls,vars:i.vars,template:i.template,consts:i.consts||null,ngContentSelectors:i.ngContentSelectors,onPush:i.changeDetection===vo.OnPush,directiveDefs:null,pipeDefs:null,dependencies:t.standalone&&i.dependencies||null,getStandaloneInjector:null,data:i.data||{},encapsulation:i.encapsulation||Ks.Emulated,id:"c"+nA++,styles:i.styles||Wn,_:null,schemas:i.schemas||null,tView:null};b_(e);const n=i.dependencies;return e.directiveDefs=Kf(n,!1),e.pipeDefs=Kf(n,!0),e})}function th(i,t,e){const n=i.\u0275cmp;n.directiveDefs=Kf(t,!1),n.pipeDefs=Kf(e,!0)}function iA(i){return Hn(i)||Vr(i)}function Sd(i){return null!==i}function en(i){return Ka(()=>({type:i.type,bootstrap:i.bootstrap||Wn,declarations:i.declarations||Wn,imports:i.imports||Wn,exports:i.exports||Wn,transitiveCompileScopes:null,schemas:i.schemas||null,id:i.id||null}))}function Xf(i,t){if(null==i)return Za;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 ve(i){return Ka(()=>{const t=yo(i);return b_(t),t})}function $i(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 Hn(i){return i[Ur]||null}function Vr(i){return i[Ju]||null}function vs(i){return i[yc]||null}function hr(i,t){const e=i[y_]||null;if(!e&&!0===t)throw new Error(`Type ${mi(i)} does not have '\u0275mod' property.`);return e}function yo(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||Wn,viewQuery:i.viewQuery||null,features:i.features||null,setInput:null,findHostDirectiveDefs:null,hostDirectives:null,inputs:Xf(i.inputs,t),outputs:Xf(i.outputs)}}function b_(i){i.features?.forEach(t=>t(i))}function Kf(i,t){if(!i)return null;const e=t?vs:iA;return()=>("function"==typeof i?i():i).map(n=>e(n)).filter(Sd)}const Qa=0,lt=1,fn=2,Bi=3,ys=4,X=5,he=6,ae=7,ze=8,jt=9,Vn=10,xt=11,ai=12,bc=13,k0=14,Er=15,sr=16,nh=17,Ho=18,Zs=19,Ol=20,ri=21,bi=22,Ad=1,P0=2,Zf=7,Qf=8,Ja=9,Ui=10;function bs(i){return Array.isArray(i)&&"object"==typeof i[Ad]}function xs(i){return Array.isArray(i)&&!0===i[Ad]}function Jf(i){return 0!=(4&i.flags)}function Dd(i){return i.componentOffset>-1}function xc(i){return 1==(1&i.flags)}function bo(i){return!!i.template}function ih(i){return 0!=(256&i[fn])}function el(i,t){return i.hasOwnProperty(ga)?i[ga]:null}class Id{constructor(t,e,n){this.previousValue=t,this.currentValue=e,this.firstChange=n}isFirstChange(){return this.firstChange}}function xi(){return Rd}function Rd(i){return i.type.prototype.ngOnChanges&&(i.setInput=kd),np}function np(){const i=B0(this),t=i?.current;if(t){const e=i.previous;if(e===Za)i.previous=t;else for(let n in t)e[n]=t[n];i.current=null,this.ngOnChanges(t)}}function kd(i,t,e,n){const r=this.declaredInputs[e],s=B0(i)||function lA(i,t){return i[N0]=t}(i,{previous:Za,current:null}),o=s.current||(s.current={}),a=s.previous,l=a[r];o[r]=new Id(l&&l.currentValue,t,a===Za),i[n]=t}xi.ngInherit=!0;const N0="__ngSimpleChanges__";function B0(i){return i[N0]||null}const Qr=function(i,t,e){},Pd="svg";function I(i){for(;Array.isArray(i);)i=i[Qa];return i}function wc(i,t){return I(t[i])}function Ai(i,t){return I(t[i.index])}function U0(i,t){return i.data[t]}function Fd(i,t){return i[t]}function ws(i,t){const e=t[i];return bs(e)?e:e[Qa]}function ip(i){return 64==(64&i[fn])}function Fl(i,t){return null==t?null:i[t]}function V0(i){i[Ho]=0}function A_(i,t){i[X]+=t;let e=i,n=i[Bi];for(;null!==n&&(1===t&&1===e[X]||-1===t&&0===e[X]);)n[X]+=t,e=n,n=n[Bi]}const Pt={lFrame:nl(null),bindingsEnabled:!0};function _a(){return Pt.bindingsEnabled}function Se(){return Pt.lFrame.lView}function zn(){return Pt.lFrame.tView}function Vt(i){return Pt.lFrame.contextLView=i,i[ze]}function Et(i){return Pt.lFrame.contextLView=null,i}function Ar(){let i=H0();for(;null!==i&&64===i.type;)i=i.parent;return i}function H0(){return Pt.lFrame.currentTNode}function va(i,t){const e=Pt.lFrame;e.currentTNode=i,e.isParent=t}function D_(){return Pt.lFrame.isParent}function T_(){Pt.lFrame.isParent=!1}function zr(){const i=Pt.lFrame;let t=i.bindingRootIndex;return-1===t&&(t=i.bindingRootIndex=i.tView.bindingStartIndex),t}function Ll(){return Pt.lFrame.bindingIndex++}function Qs(i){const t=Pt.lFrame,e=t.bindingIndex;return t.bindingIndex=t.bindingIndex+i,e}function W0(i,t){const e=Pt.lFrame;e.bindingIndex=e.bindingRootIndex=i,$o(t)}function $o(i){Pt.lFrame.currentDirectiveIndex=i}function rh(i){const t=Pt.lFrame.currentDirectiveIndex;return-1===t?null:i[t]}function Nl(){return Pt.lFrame.currentQueryIndex}function Ms(i){Pt.lFrame.currentQueryIndex=i}function vA(i){const t=i[lt];return 2===t.type?t.declTNode:1===t.type?i[he]:null}function R_(i,t,e){if(e&Ft.SkipSelf){let r=t,s=i;for(;!(r=r.parent,null!==r||e&Ft.Host||(r=vA(s),null===r||(s=s[Er],10&r.type))););if(null===r)return!1;t=r,i=s}const n=Pt.lFrame=Ld();return n.currentTNode=t,n.lView=i,!0}function sp(i){const t=Ld(),e=i[lt];Pt.lFrame=t,t.currentTNode=e.firstChild,t.lView=i,t.tView=e,t.contextLView=i,t.bindingIndex=e.bindingStartIndex,t.inI18n=!1}function Ld(){const i=Pt.lFrame,t=null===i?null:i.child;return null===t?nl(i):t}function nl(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 k_(){const i=Pt.lFrame;return Pt.lFrame=i.parent,i.currentTNode=null,i.lView=null,i}const j0=k_;function Nd(){const i=k_();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 Kn(){return Pt.lFrame.selectedIndex}function il(i){Pt.lFrame.selectedIndex=i}function Di(){const i=Pt.lFrame;return U0(i.tView,i.selectedIndex)}function ki(){Pt.lFrame.currentNamespace=Pd}function ya(){!function Cc(){Pt.lFrame.currentNamespace=null}()}function Bd(i,t){for(let e=t.directiveStart,n=t.directiveEnd;e=n)break}else t[l]<0&&(i[Ho]+=65536),(a>11>16&&(3&i[fn])===t){i[fn]+=2048,Qr(4,a,s);try{s.call(a)}finally{Qr(5,a,s)}}}else{Qr(4,a,s);try{s.call(a)}finally{Qr(5,a,s)}}}const ba=-1;class Ud{constructor(t,e,n){this.factory=t,this.resolving=!1,this.canSeeViewProviders=e,this.injectImpl=n}}function L_(i,t,e){let n=0;for(;nt){o=s-1;break}}}for(;s>16}(i),n=t;for(;e>0;)n=n[Er],e--;return n}let Vd=!0;function dp(i){const t=Vd;return Vd=i,t}const B_=255,Q0=5;let J0=0;const xa={};function ah(i,t){const e=ex(i,t);if(-1!==e)return e;const n=t[lt];n.firstCreatePass&&(i.injectorIndex=t.length,lh(n.data,i),lh(t,null),lh(n.blueprint,null));const r=ch(i,t),s=i.injectorIndex;if(cp(r)){const o=sh(r),a=oh(r,t),l=a[lt].data;for(let c=0;c<8;c++)t[s+c]=a[o+c]|l[o+c]}return t[s+8]=r,s}function lh(i,t){i.push(0,0,0,0,0,0,0,0,t)}function ex(i,t){return-1===i.injectorIndex||i.parent&&i.parent.injectorIndex===i.injectorIndex||null===t[i.injectorIndex+8]?-1:i.injectorIndex}function ch(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=uh(r),null===n)return ba;if(e++,r=r[Er],-1!==n.injectorIndex)return n.injectorIndex|e<<16}return ba}function pn(i,t,e){!function U_(i,t,e){let n;"string"==typeof e?n=e.charCodeAt(0)||0:e.hasOwnProperty(eh)&&(n=e[eh]),null==n&&(n=e[eh]=J0++);const r=n&B_;t.data[i+(r>>Q0)]|=1<=0?t&B_:Js:t}(e);if("function"==typeof s){if(!R_(t,i,n))return n&Ft.Host?tx(r,0,n):zd(t,e,n,r);try{const o=s(n);if(null!=o||n&Ft.Optional)return o;$f()}finally{j0()}}else if("number"==typeof s){let o=null,a=ex(i,t),l=ba,c=n&Ft.Host?t[sr][he]:null;for((-1===a||n&Ft.SkipSelf)&&(l=-1===a?ch(i,t):t[a+8],l!==ba&&z_(n,!1)?(o=t[lt],a=sh(l),t=oh(l,t)):a=-1);-1!==a;){const d=t[lt];if(hp(s,a,d.data)){const h=EA(a,t,e,o,n,c);if(h!==xa)return h}l=t[a+8],l!==ba&&z_(n,t[lt].data[a+8]===c)&&hp(s,a,t)?(o=d,a=sh(l),t=oh(l,t)):a=-1}}return r}function EA(i,t,e,n,r,s){const o=t[lt],a=o.data[i+8],d=ts(a,o,e,null==n?Dd(a)&&Vd:n!=o&&0!=(3&a.type),r&Ft.Host&&s===a);return null!==d?Ac(t,o,d,a):xa}function ts(i,t,e,n,r){const s=i.providerIndexes,o=t.data,a=1048575&s,l=i.directiveStart,d=s>>20,p=r?a+d:i.directiveEnd;for(let m=n?a:a+d;m=l&&g.type===e)return m}if(r){const m=o[l];if(m&&bo(m)&&m.type===e)return l}return null}function Ac(i,t,e,n){let r=i[e];const s=t.data;if(function xA(i){return i instanceof Ud}(r)){const o=r;o.resolving&&function A0(i,t){const e=t?`. Dependency path: ${t.join(" > ")} > ${i}`:"";throw new pe(-200,`Circular dependency in DI detected for ${i}${e}`)}(function Xn(i){return"function"==typeof i?i.name||i.toString():"object"==typeof i&&null!=i&&"function"==typeof i.type?i.type.name||i.type.toString():Jt(i)}(s[e]));const a=dp(o.canSeeViewProviders);o.resolving=!0;const l=o.injectImpl?Xs(o.injectImpl):null;R_(i,n,Ft.Default);try{r=i[e]=o.factory(void 0,s,i,n),t.firstCreatePass&&e>=n.directiveStart&&function es(i,t,e){const{ngOnChanges:n,ngOnInit:r,ngDoCheck:s}=t.type.prototype;if(n){const o=Rd(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&&Xs(l),dp(a),o.resolving=!1,j0()}}return r}function hp(i,t,e){return!!(e[t+(i>>Q0)]&1<{const t=i.prototype.constructor,e=t[ga]||dh(t),n=Object.prototype;let r=Object.getPrototypeOf(i.prototype).constructor;for(;r&&r!==n;){const s=r[ga]||dh(r);if(s&&s!==e)return s;r=Object.getPrototypeOf(r)}return s=>new s})}function dh(i){return Wu(i)?()=>{const t=dh(Ot(i));return t&&t()}:el(i)}function uh(i){const t=i[lt],e=t.type;return 2===e?t.declTNode:1===e?i[he]:null}function wa(i){return function SA(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 Ma(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,d){const h=l.hasOwnProperty(Tc)?l[Tc]:Object.defineProperty(l,Tc,{value:[]})[Tc];for(;h.length<=d;)h.push(null);return(h[d]=h[d]||[]).push(o),l}}return e&&(r.prototype=Object.create(e.prototype)),r.prototype.ngMetadataName=i,r.annotationCls=r,r})}class me{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=Pe({token:this,providedIn:e.providedIn||"root",factory:e.factory}))}get multi(){return this}toString(){return`InjectionToken ${this._desc}`}}function Vl(i,t){i.forEach(e=>Array.isArray(e)?Vl(e,t):t(e))}function $_(i,t,e){t>=i.length?i.push(e):i.splice(t,0,e)}function mp(i,t){return t>=i.length-1?i.pop():i.splice(t,1)[0]}function Gd(i,t){const e=[];for(let n=0;n=0?i[1|n]=e:(n=~n,function IA(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 jd(i,t){const e=Rc(i,t);if(e>=0)return i[1|e]}function Rc(i,t){return function _p(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),Ss=Cd(Hd("Optional"),8),Ca=Cd(Hd("SkipSelf"),4);var Es=(()=>((Es=Es||{})[Es.Important=1]="Important",Es[Es.DashCase=2]="DashCase",Es))();const Sp=new Map;let yx=0;const iv="__ngContext__";function $r(i,t){bs(t)?(i[iv]=t[Ol],function bx(i){Sp.set(i[Ol],i)}(t)):i[iv]=t}let sv;function ov(i,t){return sv(i,t)}function vh(i){const t=i[Bi];return xs(t)?t[Bi]:t}function av(i){return Tx(i[bc])}function lv(i){return Tx(i[ys])}function Tx(i){for(;null!==i&&!xs(i);)i=i[ys];return i}function Ir(i,t,e,n,r){if(null!=n){let s,o=!1;xs(n)?s=n:bs(n)&&(o=!0,n=n[Qa]);const a=I(n);0===i&&null!==e?null==r?Fx(t,e,a):Oc(t,e,a,r||null,!0):1===i&&null!==e?Oc(t,e,a,r||null,!0):2===i?function mv(i,t,e){const n=Dp(i,t);n&&function QA(i,t,e,n){i.removeChild(t,e,n)}(i,n,t,e)}(t,a,o):3===i&&t.destroyNode(a),null!=s&&function Hx(i,t,e,n,r){const s=e[Zf];s!==I(e)&&Ir(t,i,n,s,r);for(let a=Ui;a0&&(i[e-1][ys]=n[ys]);const s=mp(i,Ui+t);!function WA(i,t){bh(i,t,t[xt],2,null,null),t[Qa]=null,t[he]=null}(n[lt],n);const o=s[Zs];null!==o&&o.detachView(s[lt]),n[Bi]=null,n[ys]=null,n[fn]&=-65}return n}function kx(i,t){if(!(128&t[fn])){const e=t[xt];e.destroyNode&&bh(i,t,e,3,null,null),function qA(i){let t=i[bc];if(!t)return hv(i[lt],i);for(;t;){let e=null;if(bs(t))e=t[bc];else{const n=t[Ui];n&&(e=n)}if(!e){for(;t&&!t[ys]&&t!==i;)bs(t)&&hv(t[lt],t),t=t[Bi];null===t&&(t=i),bs(t)&&hv(t[lt],t),e=t&&t[ys]}t=e}}(t)}}function hv(i,t){if(!(128&t[fn])){t[fn]&=-65,t[fn]|=128,function ZA(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===Ks.None||s===Ks.Emulated)return null}return Ai(n,e)}}(i,t.parent,e)}function Oc(i,t,e,n,r){i.insertBefore(t,e,n,r)}function Fx(i,t,e){i.appendChild(t,e)}function Lx(i,t,e,n,r){null!==n?Oc(i,t,e,n,r):Fx(i,t,e)}function Dp(i,t){return i.parentNode(t)}function Nx(i,t,e){return Ux(i,t,e)}let fv,kp,vv,Ux=function Bx(i,t,e){return 40&i.type?Ai(i,e):null};function yh(i,t,e,n){const r=Px(i,n,t),s=t[xt],a=Nx(n.parent||t[he],n,t);if(null!=r)if(Array.isArray(e))for(let l=0;li,createScript:i=>i,createScriptURL:i=>i})}catch{}return kp}()?.createHTML(i)||i}class zl{constructor(t){this.changingThisBreaksApplicationSecurity=t}toString(){return`SafeValue must use [property]=binding: ${this.changingThisBreaksApplicationSecurity} (see ${qu})`}}class a1 extends zl{getTypeName(){return"HTML"}}class l1 extends zl{getTypeName(){return"Style"}}class c1 extends zl{getTypeName(){return"Script"}}class d1 extends zl{getTypeName(){return"URL"}}class Op extends zl{getTypeName(){return"ResourceURL"}}function to(i){return i instanceof zl?i.changingThisBreaksApplicationSecurity:i}function Ea(i,t){const e=function u1(i){return i instanceof zl&&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 ${qu})`)}return e===t}class _1{constructor(t){this.inertDocumentHelper=t}getInertBodyElement(t){t=""+t;try{const e=(new window.DOMParser).parseFromString(Yd(t),"text/html").body;return null===e?this.inertDocumentHelper.getInertBodyElement(t):(e.removeChild(e.firstChild),e)}catch{return null}}}class v1{constructor(t){this.defaultDoc=t,this.inertDocument=this.defaultDoc.implementation.createHTMLDocument("sanitization-inert")}getInertBodyElement(t){const e=this.inertDocument.createElement("template");return e.innerHTML=Yd(t),e}}const y1=/^(?!javascript:)(?:[a-z0-9+.-]+:|[^&:\/?#]*(?:[\/?#]|$))/i;function xh(i){return(i=String(i)).match(y1)?i:"unsafe:"+i}function Aa(i){const t={};for(const e of i.split(","))t[e]=!0;return t}function Fc(...i){const t={};for(const e of i)for(const n in e)e.hasOwnProperty(n)&&(t[n]=!0);return t}const xv=Aa("area,br,col,hr,img,wbr"),wv=Aa("colgroup,dd,dt,li,p,tbody,td,tfoot,th,thead,tr"),Mv=Aa("rp,rt"),Cv=Fc(xv,Fc(wv,Aa("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")),Fc(Mv,Aa("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")),Fc(Mv,wv)),qd=Aa("background,cite,href,itemtype,longdesc,poster,src,xlink:href"),Xx=Fc(qd,Aa("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"),Aa("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")),Ev=Aa("script,style,template");class Kx{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(!Cv.hasOwnProperty(e))return this.sanitizedSomething=!0,!Ev.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();Cv.hasOwnProperty(e)&&!xv.hasOwnProperty(e)&&(this.buf.push(""))}chars(t){this.buf.push(Zx(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 x1=/[\uD800-\uDBFF][\uDC00-\uDFFF]/g,w1=/([^\#-~ |!])/g;function Zx(i){return i.replace(/&/g,"&").replace(x1,function(t){return"&#"+(1024*(t.charCodeAt(0)-55296)+(t.charCodeAt(1)-56320)+65536)+";"}).replace(w1,function(t){return"&#"+t.charCodeAt(0)+";"}).replace(//g,">")}let Lp;function Qx(i,t){let e=null;try{Lp=Lp||function qx(i){const t=new v1(i);return function Fp(){try{return!!(new window.DOMParser).parseFromString(Yd(""),"text/html")}catch{return!1}}()?new _1(t):t}(i);let n=t?String(t):"";e=Lp.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=Lp.getInertBodyElement(n)}while(n!==s);return Yd((new Kx).sanitizeChildren(Av(e)||e))}finally{if(e){const n=Av(e)||e;for(;n.firstChild;)n.removeChild(n.firstChild)}}}function Av(i){return"content"in i&&function M1(i){return i.nodeType===Node.ELEMENT_NODE&&"TEMPLATE"===i.nodeName}(i)?i.content:null}var Zn=(()=>((Zn=Zn||{})[Zn.NONE=0]="NONE",Zn[Zn.HTML=1]="HTML",Zn[Zn.STYLE=2]="STYLE",Zn[Zn.SCRIPT=3]="SCRIPT",Zn[Zn.URL=4]="URL",Zn[Zn.RESOURCE_URL=5]="RESOURCE_URL",Zn))();function Np(i){const t=function wi(){const i=Se();return i&&i[ai]}();return t?t.sanitize(Zn.URL,i)||"":Ea(i,"URL")?to(i):xh(Jt(i))}const Bp=new me("ENVIRONMENT_INITIALIZER"),ol=new me("INJECTOR",-1),ew=new me("INJECTOR_DEF_TYPES");class tw{get(t,e=kl){if(e===kl){const n=new Error(`NullInjectorError: No provider for ${mi(t)}!`);throw n.name="NullInjectorError",n}return e}}function D1(...i){return{\u0275providers:nw(0,i),\u0275fromNgModule:!0}}function nw(i,...t){const e=[],n=new Set;let r;return Vl(t,s=>{const o=s;Dv(o,e,[],n)&&(r||(r=[]),r.push(o))}),void 0!==r&&Up(r,e),e}function Up(i,t){for(let e=0;e{t.push(s)})}}function Dv(i,t,e,n){if(!(i=Ot(i)))return!1;let r=null,s=p_(i);const o=!s&&Hn(i);if(s||o){if(o&&!o.standalone)return!1;r=i}else{const l=i.ngModule;if(s=p_(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)Dv(c,t,e,n)}}else{if(!s)return!1;{if(null!=s.imports&&!a){let c;n.add(r);try{Vl(s.imports,d=>{Dv(d,t,e,n)&&(c||(c=[]),c.push(d))})}finally{}void 0!==c&&Up(c,t)}if(!a){const c=el(r)||(()=>new r);t.push({provide:r,useFactory:c,deps:Wn},{provide:ew,useValue:r,multi:!0},{provide:Bp,useValue:()=>ee(r),multi:!0})}const l=s.providers;null==l||a||Vp(l,d=>{t.push(d)})}}return r!==i&&void 0!==i.providers}function Vp(i,t){for(let e of i)ju(e)&&(e=e.\u0275providers),Array.isArray(e)?Vp(e,t):t(e)}const zp=ci({provide:String,useValue:ci});function Mi(i){return null!==i&&"object"==typeof i&&zp in i}function Nc(i){return"function"==typeof i}const Iv=new me("Set Injector scope."),Hp={},I1={};let Rv;function wh(){return void 0===Rv&&(Rv=new tw),Rv}class io{}class $p extends io{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,Pv(t,o=>this.processProvider(o)),this.records.set(ol,jo(void 0,this)),r.has("environment")&&this.records.set(io,jo(void 0,this));const s=this.records.get(Iv);null!=s&&"string"==typeof s.value&&this.scopes.add(s.value),this.injectorDefTypes=new Set(this.get(ew.multi,Wn,Ft.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=Md(this),n=Xs(void 0);try{return t()}finally{Md(e),Xs(n)}}get(t,e=kl,n=Ft.Default){this.assertNotDestroyed(),n=Yf(n);const r=Md(this),s=Xs(void 0);try{if(!(n&Ft.SkipSelf)){let a=this.records.get(t);if(void 0===a){const l=function P1(i){return"function"==typeof i||"object"==typeof i&&i instanceof me}(t)&&Gf(t);a=l&&this.injectableDefInScope(l)?jo(kv(t),Hp):null,this.records.set(t,a)}if(null!=a)return this.hydrate(t,a)}return(n&Ft.Self?wh():this.parent).get(t,e=n&Ft.Optional&&e===kl?null:e)}catch(o){if("NullInjectorError"===o.name){if((o[gi]=o[gi]||[]).unshift(mi(t)),r)throw o;return function v_(i,t,e,n){const r=i[gi];throw t[jf]&&r.unshift(t[jf]),i.message=function R0(i,t,e,n=null){i=i&&"\n"===i.charAt(0)&&i.charAt(1)==eA?i.slice(2):i;let r=mi(t);if(Array.isArray(t))r=t.map(mi).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):mi(a)))}r=`{${s.join(", ")}}`}return`${e}${n?"("+n+")":""}[${r}]: ${i.replace(g_,"\n ")}`}("\n"+i.message,r,e,n),i[Pl]=r,i[gi]=null,i}(o,t,"R3InjectorError",this.source)}throw o}finally{Xs(s),Md(r)}}resolveInjectorInitializers(){const t=Md(this),e=Xs(void 0);try{const n=this.get(Bp.multi,Wn,Ft.Self);for(const r of n)r()}finally{Md(t),Xs(e)}}toString(){const t=[],e=this.records;for(const n of e.keys())t.push(mi(n));return`R3Injector[${t.join(", ")}]`}assertNotDestroyed(){if(this._destroyed)throw new pe(205,!1)}processProvider(t){let e=Nc(t=Ot(t))?t:Ot(t&&t.provide);const n=function Gp(i){return Mi(i)?jo(void 0,i.useValue):jo(As(i),Hp)}(t);if(Nc(t)||!0!==t.multi)this.records.get(e);else{let r=this.records.get(e);r||(r=jo(void 0,Hp,!0),r.factory=()=>qf(r.multi),this.records.set(e,r)),e=t,r.multi.push(t)}this.records.set(e,n)}hydrate(t,e){return e.value===Hp&&(e.value=I1,e.value=e.factory()),"object"==typeof e.value&&e.value&&function k1(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=Ot(t.providedIn);return"string"==typeof e?"any"===e||this.scopes.has(e):this.injectorDefTypes.has(e)}}function kv(i){const t=Gf(i),e=null!==t?t.factory:el(i);if(null!==e)return e;if(i instanceof me)throw new pe(204,!1);if(i instanceof Function)return function iw(i){const t=i.length;if(t>0)throw Gd(t,"?"),new pe(204,!1);const e=function Xu(i){return i&&(i[wd]||i[m_])||null}(i);return null!==e?()=>e.factory(i):()=>new i}(i);throw new pe(204,!1)}function As(i,t,e){let n;if(Nc(i)){const r=Ot(i);return el(r)||kv(r)}if(Mi(i))n=()=>Ot(i.useValue);else if(function Tv(i){return!(!i||!i.useFactory)}(i))n=()=>i.useFactory(...qf(i.deps||[]));else if(function Pi(i){return!(!i||!i.useExisting)}(i))n=()=>ee(Ot(i.useExisting));else{const r=Ot(i&&(i.useClass||i.provide));if(!function R1(i){return!!i.deps}(i))return el(r)||kv(r);n=()=>new r(...qf(i.deps))}return n}function jo(i,t,e=!1){return{factory:i,value:t,multi:e?[]:void 0}}function Pv(i,t){for(const e of i)Array.isArray(e)?Pv(e,t):e&&ju(e)?Pv(e.\u0275providers,t):t(e)}class O1{}class Ov{}class Mo{resolveComponentFactory(t){throw function al(i){const t=Error(`No component factory found for ${mi(i)}. Did you add it to @NgModule.entryComponents?`);return t.ngComponent=i,t}(t)}}let $l=(()=>{class i{}return i.NULL=new Mo,i})();function L1(){return Fn(Ar(),Se())}function Fn(i,t){return new vt(Ai(i,t))}let vt=(()=>{class i{constructor(e){this.nativeElement=e}}return i.__NG_ELEMENT_ID__=L1,i})();function rw(i){return i instanceof vt?i.nativeElement:i}class Gl{}let ll=(()=>{class i{}return i.__NG_ELEMENT_ID__=()=>function N1(){const i=Se(),e=ws(Ar().index,i);return(bs(e)?e:i)[xt]}(),i})(),B1=(()=>{class i{}return i.\u0275prov=Pe({token:i,providedIn:"root",factory:()=>null}),i})();class Bc{constructor(t){this.full=t,this.major=t.split(".")[0],this.minor=t.split(".")[1],this.patch=t.split(".").slice(2).join(".")}}const U1=new Bc("15.2.10"),Fv={},Lv="ngOriginalError";function Nv(i){return i[Lv]}class cl{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&&Nv(t);for(;e&&Nv(e);)e=Nv(e);return e||null}}function dl(i){return i instanceof Function?i():i}function ow(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 aw="ng-template";function Y1(i,t,e){let n=0,r=!0;for(;ns?"":r[h+1].toLowerCase();const m=8&n?p:null;if(m&&-1!==ow(m,c,0)||2&n&&c!==p){if(Yo(n))return!1;o=!0}}}}else{if(!o&&!Yo(n)&&!Yo(l))return!1;if(o&&Yo(l))continue;o=!1,n=l|1&n}}return Yo(n)||o}function Yo(i){return 0==(1&i)}function lw(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&&!Yo(o)&&(t+=Uc(s,r),r=""),n=o,s=s||!Yo(n);e++}return""!==r&&(t+=Uc(s,r)),t}const on={};function V(i){Hv(zn(),Se(),Kn()+i,!1)}function Hv(i,t,e,n){if(!n)if(3==(3&t[fn])){const s=i.preOrderCheckHooks;null!==s&&op(t,s,e)}else{const s=i.preOrderHooks;null!==s&&ap(t,s,0,e)}il(e)}function uw(i,t=null,e=null,n){const r=hw(i,t,e,n);return r.resolveInjectorInitializers(),r}function hw(i,t=null,e=null,n,r=new Set){const s=[e||Wn,D1(i)];return n=n||("object"==typeof i?void 0:mi(i)),new $p(s,t||wh(),n||null,r)}let Gi=(()=>{class i{static create(e,n){if(Array.isArray(e))return uw({name:""},n,e,"");{const r=e.name??"";return uw({name:r},e.parent,e.providers,r)}}}return i.THROW_IF_NOT_FOUND=kl,i.NULL=new tw,i.\u0275prov=Pe({token:i,providedIn:"any",factory:()=>ee(ol)}),i.__NG_ELEMENT_ID__=-1,i})();function E(i,t=Ft.Default){const e=Se();return null===e?ee(i,t):V_(Ar(),e,Ot(i),t)}function Co(){throw new Error("invalid")}function vw(i,t){const e=i.contentQueries;if(null!==e)for(let n=0;nbi&&Hv(i,t,bi,!1),Qr(o?2:0,r),e(n,r)}finally{il(s),Qr(o?3:1,r)}}function Zv(i,t,e){if(Jf(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,Ch(i,e,r.hostVars,on),r)}function be(i,t,e,n,r,s){const o=Ai(i,t);!function Xe(i,t,e,n,r,s,o){if(null==s)i.removeAttribute(t,r,e);else{const a=null==o?Jt(s):o(s,n||"",r);i.setAttribute(t,r,a,e)}}(t[xt],o,s,i.value,e,n,r)}function bt(i,t,e,n,r,s){const o=s[t];if(null!==o){const a=n.setInput;for(let l=0;l0&&rs(e)}}function rs(i){for(let n=av(i);null!==n;n=lv(n))for(let r=Ui;r0&&rs(s)}const e=i[lt].components;if(null!==e)for(let n=0;n0&&rs(r)}}function ss(i,t){const e=ws(t,i),n=e[lt];(function so(i,t){for(let e=t.length;e-1&&(uv(t,n),mp(e,n))}this._attachedToViewContainer=!1}kx(this._lView[lt],this._lView)}onDestroy(t){xw(this._lView[lt],this._lView,null,t)}markForCheck(){Ts(this._cdRefInjectingView||this._lView)}detach(){this._lView[fn]&=-65}reattach(){this._lView[fn]|=64}detectChanges(){So(this._lView[lt],this._lView,this.context)}checkNoChanges(){}attachToViewContainerRef(){if(this._appRef)throw new pe(902,!1);this._attachedToViewContainer=!0}detachFromAppRef(){this._appRef=null,function YA(i,t){bh(i,t,t[xt],2,null,null)}(this._lView[lt],this._lView)}attachToAppRef(t){if(this._attachedToViewContainer)throw new pe(902,!1);this._appRef=t}}class b8 extends ny{constructor(t){super(t),this._view=t}detectChanges(){const t=this._view;So(t[lt],t,t[ze],!1)}checkNoChanges(){}get context(){return null}}class ZF extends $l{constructor(t){super(),this.ngModule=t}resolveComponentFactory(t){const e=Hn(t);return new iy(e,this.ngModule)}}function QF(i){const t=[];for(let e in i)i.hasOwnProperty(e)&&t.push({propName:i[e],templateName:e});return t}class w8{constructor(t,e){this.injector=t,this.parentInjector=e}get(t,e,n){n=Yf(n);const r=this.injector.get(t,Fv,n);return r!==Fv||e===Fv?r:this.parentInjector.get(t,e,n)}}class iy extends Ov{get inputs(){return QF(this.componentDef.inputs)}get outputs(){return QF(this.componentDef.outputs)}constructor(t,e){super(),this.componentDef=t,this.ngModule=e,this.componentType=t.type,this.selector=function tD(i){return i.map(eD).join(",")}(t.selectors),this.ngContentSelectors=t.ngContentSelectors?t.ngContentSelectors:[],this.isBoundToModule=!!e}create(t,e,n,r){let s=(r=r||this.ngModule)instanceof io?r:r?.injector;s&&null!==this.componentDef.getStandaloneInjector&&(s=this.componentDef.getStandaloneInjector(s)||s);const o=s?new w8(t,s):t,a=o.get(Gl,null);if(null===a)throw new pe(407,!1);const l=o.get(B1,null),c=a.createRenderer(null,this.componentDef),d=this.componentDef.selectors[0][0]||"div",h=n?function MD(i,t,e){return i.selectRootElement(t,e===Ks.ShadowDom)}(c,n,this.componentDef.encapsulation):Ap(c,d,function x8(i){const t=i.toLowerCase();return"svg"===t?Pd:"math"===t?"math":null}(d)),p=this.componentDef.onPush?288:272,m=ey(0,null,null,1,0,null,null,null,null,null),g=Mh(null,m,null,p,null,null,a,c,l,o,null);let b,v;sp(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 C8(i,t){const e=i[lt],n=bi;return i[n]=t,Qd(e,n,2,"#host",null)}(g,h),F=function S8(i,t,e,n,r,s,o,a){const l=r[lt];!function E8(i,t,e,n){for(const r of i)t.mergedAttrs=Ec(t.mergedAttrs,r.hostAttrs);null!==t.mergedAttrs&&(Sw(t,t.mergedAttrs,!0),null!==e&&Gx(n,e,t))}(n,i,t,o);const c=s.createRenderer(t,e),d=Mh(r,bw(e),null,e.onPush?32:16,r[i.index],i,s,c,a||null,null,null);return l.firstCreatePass&&P(l,i,n.length-1),Ti(r,d),r[i.index]=d}(C,h,y,M,g,a,c);v=U0(m,bi),h&&function D8(i,t,e,n){if(n)L_(i,e,["ng-version",U1.full]);else{const{attrs:r,classes:s}=function nD(i){const t=[],e=[];let n=1,r=2;for(;n0&&$x(i,e,s.join(" "))}}(c,y,h,n),void 0!==e&&function T8(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=Ec(r.hostAttrs,e=Ec(e,r.hostAttrs))}}(n)}function PD(i){return i===Za?{}:i===Wn?[]:i}function k8(i,t){const e=i.viewQuery;i.viewQuery=e?(n,r)=>{t(n,r),e(n,r)}:t}function P8(i,t){const e=i.contentQueries;i.contentQueries=e?(n,r,s)=>{t(n,r,s),e(n,r,s)}:t}function O8(i,t){const e=i.hostBindings;i.hostBindings=e?(n,r)=>{t(n,r),e(n,r)}:t}function Aw(i){return!!OD(i)&&(Array.isArray(i)||!(i instanceof Map)&&Symbol.iterator in i)}function OD(i){return null!==i&&("function"==typeof i||"object"==typeof i)}function Wl(i,t,e){return i[t]=e}function Is(i,t,e){return!Object.is(i[t],e)&&(i[t]=e,!0)}function Eh(i,t,e,n){const r=Is(i,t,e);return Is(i,t+1,n)||r}function It(i,t,e,n){const r=Se();return Is(r,Ll(),t)&&(zn(),be(Di(),r,i,t,e,n)),It}function Yp(i,t,e,n){return Is(i,Ll(),e)?t+Jt(e)+n:on}function qp(i,t,e,n,r,s){const a=Eh(i,function tl(){return Pt.lFrame.bindingIndex}(),e,r);return Qs(2),a?t+Jt(e)+n+Jt(r)+s:on}function fe(i,t,e,n,r,s,o,a){const l=Se(),c=zn(),d=i+bi,h=c.firstCreatePass?function G8(i,t,e,n,r,s,o,a,l){const c=t.consts,d=Qd(t,i,4,o||null,Fl(c,a));ty(t,e,d,Fl(c,l)),Bd(t,d);const h=d.tView=ey(2,d,n,r,s,t.directiveRegistry,t.pipeRegistry,null,t.schemas,c);return null!==t.queries&&(t.queries.template(t,d),h.queries=t.queries.embeddedTView(d)),d}(d,c,l,t,e,n,r,s,o):c.data[d];va(h,!1);const p=l[xt].createComment("");yh(c,l,p,h),$r(p,l),Ti(l,l[d]=mn(p,l,p,h)),xc(h)&&Qv(c,l,h),null!=o&&Jv(l,h,a)}function Zi(i){return Fd(function gA(){return Pt.lFrame.contextLView}(),bi+i)}function U(i,t,e){const n=Se();return Is(n,Ll(),t)&&ro(zn(),Di(),n,i,t,n[xt],e,!1),U}function FD(i,t,e,n,r){const o=r?"class":"style";kD(i,e,t.inputs[o],o,n)}function G(i,t,e,n){const r=Se(),s=zn(),o=bi+i,a=r[xt],l=s.firstCreatePass?function j8(i,t,e,n,r,s){const o=t.consts,l=Qd(t,i,2,n,Fl(o,r));return ty(t,e,l,Fl(o,s)),null!==l.attrs&&Sw(l,l.attrs,!1),null!==l.mergedAttrs&&Sw(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]=Ap(a,t,function q0(){return Pt.lFrame.currentNamespace}()),d=xc(l);return va(l,!0),Gx(a,c,l),32!=(32&l.flags)&&yh(s,r,c,l),0===function uA(){return Pt.lFrame.elementDepthCount}()&&$r(c,r),function hA(){Pt.lFrame.elementDepthCount++}(),d&&(Qv(s,r,l),Zv(s,l,r)),null!==n&&Jv(r,l),G}function j(){let i=Ar();D_()?T_():(i=i.parent,va(i,!1));const t=i;!function fA(){Pt.lFrame.elementDepthCount--}();const e=zn();return e.firstCreatePass&&(Bd(e,i),Jf(i)&&e.queries.elementEnd(i)),null!=t.classesWithoutHost&&function wA(i){return 0!=(8&i.flags)}(t)&&FD(e,t,Se(),t.classesWithoutHost,!0),null!=t.stylesWithoutHost&&function F_(i){return 0!=(16&i.flags)}(t)&&FD(e,t,Se(),t.stylesWithoutHost,!1),j}function Ie(i,t,e,n){return G(i,t,e,n),j(),Ie}function Gr(i,t,e){const n=Se(),r=zn(),s=i+bi,o=r.firstCreatePass?function Y8(i,t,e,n,r){const s=t.consts,o=Fl(s,n),a=Qd(t,i,8,"ng-container",o);return null!==o&&Sw(a,o,!0),ty(t,e,a,Fl(s,r)),null!==t.queries&&t.queries.elementStart(t,a),a}(s,r,n,t,e):r.data[s];va(o,!0);const a=n[s]=n[xt].createComment("");return yh(r,n,a,o),$r(a,n),xc(o)&&(Qv(r,n,o),Zv(r,o,n)),null!=e&&Jv(n,o),Gr}function Wr(){let i=Ar();const t=zn();return D_()?T_():(i=i.parent,va(i,!1)),t.firstCreatePass&&(Bd(t,i),Jf(i)&&t.queries.elementEnd(i)),Wr}function sy(i,t,e){return Gr(i,t,e),Wr(),sy}function jn(){return Se()}function oy(i){return!!i&&"function"==typeof i.then}function hL(i){return!!i&&"function"==typeof i.subscribe}const LD=hL;function Oe(i,t,e,n){const r=Se(),s=zn(),o=Ar();return fL(s,r,r[xt],o,i,t,n),Oe}function ND(i,t){const e=Ar(),n=Se(),r=zn();return fL(r,n,XF(rh(r.data),e,n),e,i,t),ND}function fL(i,t,e,n,r,s,o){const a=xc(n),c=i.firstCreatePass&&qF(i),d=t[ze],h=YF(t);let p=!0;if(3&n.type||o){const b=Ai(n,t),v=o?o(b):b,y=h.length,M=o?C=>o(I(C[n.index])):n.index;let x=null;if(!o&&a&&(x=function q8(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=mL(n,t,d,s,!1);const C=e.listen(v,r,s);h.push(s,C),c&&c.push(r,M,y,y+1)}}else s=mL(n,t,d,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?ws(i.index,t):t);let l=pL(t,e,n,o),c=s.__ngNextListenerFn__;for(;c;)l=pL(t,e,c,o)&&l,c=c.__ngNextListenerFn__;return r&&!1===l&&(o.preventDefault(),o.returnValue=!1),l}}function re(i=1){return function yA(i){return(Pt.lFrame.contextLView=function Y0(i,t){for(;i>0;)t=t[Er],i--;return t}(i,Pt.lFrame.contextLView))[ze]}(i)}function X8(i,t){let e=null;const n=function K1(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 VD(i){return 2|i}function Ah(i){return(131068&i)>>2}function zD(i,t){return-131069&i|t<<2}function HD(i){return 1|i}function CL(i,t,e,n,r){const s=i[e+1],o=null===t;let a=n?eu(s):Ah(s),l=!1;for(;0!==a&&(!1===l||o);){const d=i[a+1];tW(i[a],t)&&(l=!0,i[a+1]=n?HD(d):VD(d)),a=n?eu(d):Ah(d)}l&&(i[e+1]=n?VD(s):HD(s))}function tW(i,t){return null===i||null==t||(Array.isArray(i)?i[1]:i)===t||!(!Array.isArray(i)||"string"!=typeof t)&&Rc(i,t)>=0}const Rr={textEnd:0,key:0,keyEnd:0,value:0,valueEnd:0};function SL(i){return i.substring(Rr.key,Rr.keyEnd)}function EL(i,t){const e=Rr.textEnd;return e===t?-1:(t=Rr.keyEnd=function sW(i,t,e){for(;t32;)t++;return t}(i,Rr.key=t,e),tm(i,t,e))}function tm(i,t,e){for(;t=0;e=EL(t,e))Cs(i,SL(t),!0)}function ul(i,t,e,n){const r=Se(),s=zn(),o=Qs(2);s.firstUpdatePass&&kL(s,i,o,n),t!==on&&Is(r,o,t)&&OL(s,s.data[Kn()],r,r[xt],i,r[o+1]=function _W(i,t){return null==i||""===i||("string"==typeof t?i+=t:"object"==typeof i&&(i=mi(to(i)))),i}(t,e),n,o)}function RL(i,t){return t>=i.expandoStartIndex}function kL(i,t,e,n){const r=i.data;if(null===r[e+1]){const s=r[Kn()],o=RL(i,e);LL(s,n)&&null===t&&!o&&(t=!1),t=function dW(i,t,e,n){const r=rh(i);let s=n?t.residualClasses:t.residualStyles;if(null===r)0===(n?t.classBindings:t.styleBindings)&&(e=ay(e=$D(null,i,t,e,n),t.attrs,n),s=null);else{const o=t.directiveStylingLast;if(-1===o||i[o]!==r)if(e=$D(r,i,t,e,n),null===s){let l=function uW(i,t,e){const n=e?t.classBindings:t.styleBindings;if(0!==Ah(n))return i[eu(n)]}(i,t,n);void 0!==l&&Array.isArray(l)&&(l=$D(null,i,t,l[1],n),l=ay(l,t.attrs,n),function hW(i,t,e,n){i[eu(e?t.classBindings:t.styleBindings)]=n}(i,t,n,l))}else s=function fW(i,t,e){let n;const r=t.directiveEnd;for(let s=1+t.directiveStylingLast;s0)&&(c=!0)):d=e,r)if(0!==l){const p=eu(i[a+1]);i[n+1]=Tw(p,a),0!==p&&(i[p+1]=zD(i[p+1],n)),i[a+1]=function Z8(i,t){return 131071&i|t<<17}(i[a+1],n)}else i[n+1]=Tw(a,0),0!==a&&(i[a+1]=zD(i[a+1],n)),a=n;else i[n+1]=Tw(l,0),0===a?a=n:i[l+1]=zD(i[l+1],n),l=n;c&&(i[n+1]=VD(i[n+1])),CL(i,d,n,!0),CL(i,d,n,!1),function eW(i,t,e,n,r){const s=r?i.residualClasses:i.residualStyles;null!=s&&"string"==typeof t&&Rc(s,t)>=0&&(e[n+1]=HD(e[n+1]))}(t,d,i,n,s),o=Tw(a,l),s?t.classBindings=o:t.styleBindings=o}(r,s,t,e,o,n)}}function $D(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),d=c?l[1]:l,h=null===d;let p=e[r+1];p===on&&(p=h?Wn:void 0);let m=h?jd(p,n):d===n?p:void 0;if(c&&!Iw(m)&&(m=jd(l,n)),Iw(m)&&(a=m,o))return a;const g=i[r+1];r=o?eu(g):Ah(g)}if(null!==t){let l=s?t.residualClasses:t.residualStyles;null!=l&&(a=jd(l,n))}return a}function Iw(i){return void 0!==i}function LL(i,t){return 0!=(i.flags&(t?8:16))}function Be(i,t=""){const e=Se(),n=zn(),r=i+bi,s=n.firstCreatePass?Qd(n,r,1,t,null):n.data[r],o=e[r]=function cv(i,t){return i.createText(t)}(e[xt],t);yh(n,e,o,s),va(s,!1)}function ui(i){return Qi("",i,""),ui}function Qi(i,t,e){const n=Se(),r=Yp(n,i,t,e);return r!==on&&Vc(n,Kn(),r),Qi}function Dh(i,t,e,n,r){const s=Se(),o=qp(s,i,t,e,n,r);return o!==on&&Vc(s,Kn(),o),Dh}function GL(i,t,e){!function hl(i,t,e,n){const r=zn(),s=Qs(2);r.firstUpdatePass&&kL(r,null,s,n);const o=Se();if(e!==on&&Is(o,s,e)){const a=r.data[Kn()];if(LL(a,n)&&!RL(r,s)){let l=n?a.classesWithoutHost:a.stylesWithoutHost;null!==l&&(e=zf(l,e||"")),FD(r,a,o,e,n)}else!function gW(i,t,e,n,r,s,o,a){r===on&&(r=Wn);let l=0,c=0,d=0((st=st||{})[st.LocaleId=0]="LocaleId",st[st.DayPeriodsFormat=1]="DayPeriodsFormat",st[st.DayPeriodsStandalone=2]="DayPeriodsStandalone",st[st.DaysFormat=3]="DaysFormat",st[st.DaysStandalone=4]="DaysStandalone",st[st.MonthsFormat=5]="MonthsFormat",st[st.MonthsStandalone=6]="MonthsStandalone",st[st.Eras=7]="Eras",st[st.FirstDayOfWeek=8]="FirstDayOfWeek",st[st.WeekendRange=9]="WeekendRange",st[st.DateFormat=10]="DateFormat",st[st.TimeFormat=11]="TimeFormat",st[st.DateTimeFormat=12]="DateTimeFormat",st[st.NumberSymbols=13]="NumberSymbols",st[st.NumberFormats=14]="NumberFormats",st[st.CurrencyCode=15]="CurrencyCode",st[st.CurrencySymbol=16]="CurrencySymbol",st[st.CurrencyName=17]="CurrencyName",st[st.Currencies=18]="Currencies",st[st.Directionality=19]="Directionality",st[st.PluralCase=20]="PluralCase",st[st.ExtraData=21]="ExtraData",st))();const im="en-US";let n2=im;function jD(i,t,e,n,r){if(i=Ot(i),Array.isArray(i))for(let s=0;s>20;if(Nc(i)||!i.multi){const m=new Ud(l,r,E),g=qD(a,t,r?d:d+p,h);-1===g?(pn(ah(c,o),s,a),YD(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=qD(a,t,d+p,h),g=qD(a,t,d,d+p),v=g>=0&&e[g];if(r&&!v||!r&&!(m>=0&&e[m])){pn(ah(c,o),s,a);const y=function Oj(i,t,e,n,r){const s=new Ud(i,e,E);return s.multi=[],s.index=t,s.componentProviders=0,D2(s,r,n&&!e),s}(r?Pj:kj,e.length,r,n,l);!r&&v&&(e[g].providerFactory=y),YD(s,i,t.length,0),t.push(a),c.directiveStart++,c.directiveEnd++,r&&(c.providerIndexes+=1048576),e.push(y),o.push(y)}else YD(s,i,m>-1?m:g,D2(e[r?g:m],l,!r&&n));!r&&n&&v&&e[g].componentProviders++}}}function YD(i,t,e,n){const r=Nc(t),s=function T1(i){return!!i.useClass}(t);if(r||s){const l=(s?Ot(t.useClass):t).prototype.ngOnDestroy;if(l){const c=i.destroyHooks||(i.destroyHooks=[]);if(!r&&t.multi){const d=c.indexOf(e);-1===d?c.push(e,[n,l]):c[d+1].push(n,l)}else c.push(e,l)}}}function D2(i,t,e){return e&&i.componentProviders++,i.multi.push(t)-1}function qD(i,t,e,n){for(let r=e;r{e.providersResolver=(n,r)=>function Rj(i,t,e){const n=zn();if(n.firstCreatePass){const r=bo(i);jD(e,n.data,n.blueprint,r,!0),jD(t,n.data,n.blueprint,r,!1)}}(n,r?r(i):i,t)}}class rm{}class T2{}class I2 extends rm{constructor(t,e){super(),this._parent=e,this._bootstrapComponents=[],this.destroyCbs=[],this.componentFactoryResolver=new ZF(this);const n=hr(t);this._bootstrapComponents=dl(n.bootstrap),this._r3Injector=hw(t,e,[{provide:rm,useValue:this},{provide:$l,useValue:this.componentFactoryResolver}],mi(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 KD extends T2{constructor(t){super(),this.moduleType=t}create(t){return new I2(this.moduleType,t)}}class Lj extends rm{constructor(t,e,n){super(),this.componentFactoryResolver=new ZF(this),this.instance=null;const r=new $p([...t,{provide:rm,useValue:this},{provide:$l,useValue:this.componentFactoryResolver}],e||wh(),n,new Set(["environment"]));this.injector=r,r.resolveInjectorInitializers()}destroy(){this.injector.destroy()}onDestroy(t){this.injector.onDestroy(t)}}function Lw(i,t,e=null){return new Lj(i,t,e).injector}let Nj=(()=>{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=nw(0,e.type),r=n.length>0?Lw([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=Pe({token:i,providedIn:"environment",factory:()=>new i(ee(io))}),i})();function ZD(i){i.getStandaloneInjector=t=>t.get(Nj).getOrCreateStandaloneInjector(i)}function Rs(i,t,e){const n=zr()+i,r=Se();return r[n]===on?Wl(r,n,e?t.call(e):t()):function ry(i,t){return i[t]}(r,n)}function sm(i,t,e,n){return B2(Se(),zr(),i,t,e,n)}function N2(i,t,e,n,r,s,o){return function z2(i,t,e,n,r,s,o,a,l){const c=t+e;return function Da(i,t,e,n,r,s){const o=Eh(i,t,e,n);return Eh(i,t+2,r,s)||o}(i,c,r,s,o,a)?Wl(i,c+4,l?n.call(l,r,s,o,a):n(r,s,o,a)):fy(i,c+4)}(Se(),zr(),i,t,e,n,r,s,o)}function fy(i,t){const e=i[t];return e===on?void 0:e}function B2(i,t,e,n,r,s){const o=t+e;return Is(i,o,r)?Wl(i,o+1,s?n.call(s,r):n(r)):fy(i,o+1)}function ct(i,t){const e=zn();let n;const r=i+bi;e.firstCreatePass?(n=function Jj(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=el(n.type)),o=Xs(E);try{const a=dp(!1),l=s();return dp(a),function W8(i,t,e,n){e>=i.data.length&&(i.data[e]=null,i.blueprint[e]=null),t[e]=n}(e,Se(),r,l),l}finally{Xs(o)}}function ut(i,t,e){const n=i+bi,r=Se(),s=Fd(r,n);return py(r,n)?B2(r,zr(),t,s.transform,e,s):s.transform(e)}function JD(i,t,e,n){const r=i+bi,s=Se(),o=Fd(s,r);return py(s,r)?function U2(i,t,e,n,r,s,o){const a=t+e;return Eh(i,a,r,s)?Wl(i,a+2,o?n.call(o,r,s):n(r,s)):fy(i,a+2)}(s,zr(),t,o.transform,e,n,o):o.transform(e,n)}function py(i,t){return i[lt].data[t].pure}function eT(i){return t=>{setTimeout(i,void 0,t)}}const $e=class r6 extends Te{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=eT(s),r&&(r=eT(r)),o&&(o=eT(o)));const a=super.subscribe({next:r,error:s,complete:o});return t instanceof Qt&&t.add(a),a}};function s6(){return this._results[Symbol.iterator]()}class om{get changes(){return this._changes||(this._changes=new $e)}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=om.prototype;e[Symbol.iterator]||(e[Symbol.iterator]=s6)}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 Dr(i){return i.flat(Number.POSITIVE_INFINITY)}(t);(this._changesDetected=!function pp(i,t,e){if(i.length!==t.length)return!1;for(let n=0;n{class i{}return i.__NG_ELEMENT_ID__=l6,i})();const o6=Eo,a6=class extends o6{constructor(t,e,n){super(),this._declarationLView=t,this._declarationTContainer=e,this.elementRef=n}createEmbeddedView(t,e){const n=this._declarationTContainer.tView,r=Mh(this._declarationLView,n,t,16,null,n.declTNode,null,null,null,null,e||null);r[nh]=this._declarationLView[this._declarationTContainer.index];const o=this._declarationLView[Zs];return null!==o&&(r[Zs]=o.createEmbeddedView(n)),Sh(n,r,t),new ny(r)}};function l6(){return Nw(Ar(),Se())}function Nw(i,t){return 4&i.type?new a6(t,i,Fn(i,t)):null}let jr=(()=>{class i{}return i.__NG_ELEMENT_ID__=c6,i})();function c6(){return W2(Ar(),Se())}const d6=jr,$2=class extends d6{constructor(t,e,n){super(),this._lContainer=t,this._hostTNode=e,this._hostLView=n}get element(){return Fn(this._hostTNode,this._hostLView)}get injector(){return new Dc(this._hostTNode,this._hostLView)}get parentInjector(){const t=ch(this._hostTNode,this._hostLView);if(cp(t)){const e=oh(t,this._hostLView),n=sh(t);return new Dc(e[lt].data[n+8],e)}return new Dc(null,this._hostLView)}clear(){for(;this.length>0;)this.remove(this.length-1)}get(t){const e=G2(this._lContainer);return null!==e&&e[t]||null}get length(){return this._lContainer.length-Ui}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 hh(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 iy(Hn(t)),c=n||this.parentInjector;if(!s&&null==l.ngModule){const p=(o?c:this.parentInjector).get(io,null);p&&(s=p)}const d=l.create(c,r,void 0,s);return this.insert(d.hostView,a),d}insert(t,e){const n=t._lView,r=n[lt];if(function dA(i){return xs(i[Bi])}(n)){const d=this.indexOf(t);if(-1!==d)this.detach(d);else{const h=n[Bi],p=new $2(h,h[he],h[Bi]);p.detach(p.indexOf(t))}}const s=this._adjustIndex(e),o=this._lContainer;!function dv(i,t,e,n){const r=Ui+n,s=e.length;n>0&&(e[r-1][ys]=t),n0)n.push(o[a/2]);else{const c=s[a+1],d=t[-l];for(let h=Ui;h{class i{constructor(e){this.appInits=e,this.resolve=Uw,this.reject=Uw,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)(ee(Vw,8))},i.\u0275prov=Pe({token:i,factory:i.\u0275fac,providedIn:"root"}),i})();const cm=new me("AppId",{providedIn:"root",factory:function pN(){return`${hT()}${hT()}${hT()}`}});function hT(){return String.fromCharCode(97+Math.floor(25*Math.random()))}const mN=new me("Platform Initializer"),fT=new me("Platform ID",{providedIn:"platform",factory:()=>"unknown"}),kr=new me("AnimationModuleType");let L6=(()=>{class i{log(e){console.log(e)}warn(e){console.warn(e)}}return i.\u0275fac=function(e){return new(e||i)},i.\u0275prov=Pe({token:i,factory:i.\u0275fac,providedIn:"platform"}),i})();const Xl=new me("LocaleId",{providedIn:"root",factory:()=>Lt(Xl,Ft.Optional|Ft.SkipSelf)||function N6(){return typeof $localize<"u"&&$localize.locale||im}()});class U6{constructor(t,e){this.ngModuleFactory=t,this.componentFactories=e}}let gN=(()=>{class i{compileModuleSync(e){return new KD(e)}compileModuleAsync(e){return Promise.resolve(this.compileModuleSync(e))}compileModuleAndAllComponentsSync(e){const n=this.compileModuleSync(e),s=dl(hr(e).declarations).reduce((o,a)=>{const l=Hn(a);return l&&o.push(new iy(l)),o},[]);return new U6(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=Pe({token:i,factory:i.\u0275fac,providedIn:"root"}),i})();const H6=(()=>Promise.resolve(0))();function pT(i){typeof Zone>"u"?H6.then(()=>{i&&i.apply(null,null)}):Zone.current.scheduleMicroTask("scheduleMicrotask",i)}class gt{constructor({enableLongStackTrace:t=!1,shouldCoalesceEventChangeDetection:e=!1,shouldCoalesceRunChangeDetection:n=!1}){if(this.hasPendingMacrotasks=!1,this.hasPendingMicrotasks=!1,this.isStable=!0,this.onUnstable=new $e(!1),this.onMicrotaskEmpty=new $e(!1),this.onStable=new $e(!1),this.onError=new $e(!1),typeof Zone>"u")throw new pe(908,!1);Zone.assertZonePatched();const r=this;r._nesting=0,r._outer=r._inner=Zone.current,Zone.TaskTrackingZoneSpec&&(r._inner=r._inner.fork(new Zone.TaskTrackingZoneSpec)),t&&Zone.longStackTraceZoneSpec&&(r._inner=r._inner.fork(Zone.longStackTraceZoneSpec)),r.shouldCoalesceEventChangeDetection=!n&&e,r.shouldCoalesceRunChangeDetection=n,r.lastRequestAnimationFrameId=-1,r.nativeRequestAnimationFrame=function $6(){let i=Rn.requestAnimationFrame,t=Rn.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 j6(i){const t=()=>{!function W6(i){i.isCheckStableRunning||-1!==i.lastRequestAnimationFrameId||(i.lastRequestAnimationFrameId=i.nativeRequestAnimationFrame.call(Rn,()=>{i.fakeTopEventTask||(i.fakeTopEventTask=Zone.root.scheduleEventTask("fakeTopEventTask",()=>{i.lastRequestAnimationFrameId=-1,gT(i),i.isCheckStableRunning=!0,mT(i),i.isCheckStableRunning=!1},void 0,()=>{},()=>{})),i.fakeTopEventTask.invoke()}),gT(i))}(i)};i._inner=i._inner.fork({name:"angular",properties:{isAngularZone:!0},onInvokeTask:(e,n,r,s,o,a)=>{try{return yN(i),e.invokeTask(r,s,o,a)}finally{(i.shouldCoalesceEventChangeDetection&&"eventTask"===s.type||i.shouldCoalesceRunChangeDetection)&&t(),bN(i)}},onInvoke:(e,n,r,s,o,a,l)=>{try{return yN(i),e.invoke(r,s,o,a,l)}finally{i.shouldCoalesceRunChangeDetection&&t(),bN(i)}},onHasTask:(e,n,r,s)=>{e.hasTask(r,s),n===r&&("microTask"==s.change?(i._hasPendingMicrotasks=s.microTask,gT(i),mT(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(!gt.isInAngularZone())throw new pe(909,!1)}static assertNotInAngularZone(){if(gt.isInAngularZone())throw new pe(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,G6,Uw,Uw);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 G6={};function mT(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 gT(i){i.hasPendingMicrotasks=!!(i._hasPendingMicrotasks||(i.shouldCoalesceEventChangeDetection||i.shouldCoalesceRunChangeDetection)&&-1!==i.lastRequestAnimationFrameId)}function yN(i){i._nesting++,i.isStable&&(i.isStable=!1,i.onUnstable.emit(null))}function bN(i){i._nesting--,mT(i)}class Y6{constructor(){this.hasPendingMicrotasks=!1,this.hasPendingMacrotasks=!1,this.isStable=!0,this.onUnstable=new $e,this.onMicrotaskEmpty=new $e,this.onStable=new $e,this.onError=new $e}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 xN=new me(""),Hw=new me("");let yT,_T=(()=>{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,yT||(function q6(i){yT=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:()=>{gt.assertNotInAngularZone(),pT(()=>{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())pT(()=>{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)(ee(gt),ee(vT),ee(Hw))},i.\u0275prov=Pe({token:i,factory:i.\u0275fac}),i})(),vT=(()=>{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 yT?.findTestabilityInTree(this,e,n)??null}}return i.\u0275fac=function(e){return new(e||i)},i.\u0275prov=Pe({token:i,factory:i.\u0275fac,providedIn:"platform"}),i})();const Hc=!1;let tu=null;const wN=new me("AllowMultipleToken"),bT=new me("PlatformDestroyListeners"),MN=new me("appBootstrapListener");class CN{constructor(t,e){this.name=t,this.token=e}}function EN(i,t,e=[]){const n=`Platform: ${t}`,r=new me(n);return(s=[])=>{let o=xT();if(!o||o.injector.get(wN,!1)){const a=[...e,...s,{provide:r,useValue:!0}];i?i(a):function Z6(i){if(tu&&!tu.get(wN,!1))throw new pe(400,!1);tu=i;const t=i.get(DN);(function SN(i){const t=i.get(mN,null);t&&t.forEach(e=>e())})(i)}(function AN(i=[],t){return Gi.create({name:t,providers:[{provide:Iv,useValue:"platform"},{provide:bT,useValue:new Set([()=>tu=null])},...i]})}(a,n))}return function J6(i){const t=xT();if(!t)throw new pe(401,!1);return t}()}}function xT(){return tu?.get(DN)??null}let DN=(()=>{class i{constructor(e){this._injector=e,this._modules=[],this._destroyListeners=[],this._destroyed=!1}bootstrapModuleFactory(e,n){const r=function IN(i,t){let e;return e="noop"===i?new Y6:("zone.js"===i?void 0:i)||new gt(t),e}(n?.ngZone,function TN(i){return{enableLongStackTrace:!1,shouldCoalesceEventChangeDetection:!(!i||!i.ngZoneEventCoalescing)||!1,shouldCoalesceRunChangeDetection:!(!i||!i.ngZoneRunCoalescing)||!1}}(n)),s=[{provide:gt,useValue:r}];return r.run(()=>{const o=Gi.create({providers:s,parent:this.injector,name:e.moduleType.name}),a=e.create(o),l=a.injector.get(cl,null);if(!l)throw new pe(402,!1);return r.runOutsideAngular(()=>{const c=r.onError.subscribe({next:d=>{l.handleError(d)}});a.onDestroy(()=>{$w(this._modules,a),c.unsubscribe()})}),function RN(i,t,e){try{const n=e();return oy(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(zw);return c.runInitializers(),c.donePromise.then(()=>(function r2(i){En(i,"Expected localeId to be defined"),"string"==typeof i&&(n2=i.toLowerCase().replace(/_/g,"-"))}(a.injector.get(Xl,im)||im),this._moduleDoBootstrap(a),a))})})}bootstrapModule(e,n=[]){const r=kN({},n);return function X6(i,t,e){const n=new KD(e);return Promise.resolve(n)}(0,0,e).then(s=>this.bootstrapModuleFactory(s,r))}_moduleDoBootstrap(e){const n=e.injector.get(dm);if(e._bootstrapComponents.length>0)e._bootstrapComponents.forEach(r=>n.bootstrap(r));else{if(!e.instance.ngDoBootstrap)throw new pe(-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 pe(404,!1);this._modules.slice().forEach(n=>n.destroy()),this._destroyListeners.forEach(n=>n());const e=this._injector.get(bT,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)(ee(Gi))},i.\u0275prov=Pe({token:i,factory:i.\u0275fac,providedIn:"platform"}),i})();function kN(i,t){return Array.isArray(t)?t.reduce(kN,i):{...i,...t}}let dm=(()=>{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 In(a=>{this._stable=this._zone.isStable&&!this._zone.hasPendingMacrotasks&&!this._zone.hasPendingMicrotasks,this._zone.runOutsideAngular(()=>{a.next(this._stable),a.complete()})}),o=new In(a=>{let l;this._zone.runOutsideAngular(()=>{l=this._zone.onStable.subscribe(()=>{gt.assertNotInAngularZone(),pT(()=>{!this._stable&&!this._zone.hasPendingMacrotasks&&!this._zone.hasPendingMicrotasks&&(this._stable=!0,a.next(!0))})})});const c=this._zone.onUnstable.subscribe(()=>{gt.assertInAngularZone(),this._stable&&(this._stable=!1,this._zone.runOutsideAngular(()=>{a.next(!1)}))});return()=>{l.unsubscribe(),c.unsubscribe()}});this.isStable=Cr(s,o.pipe(Vf()))}bootstrap(e,n){const r=e instanceof Ov;if(!this._injector.get(zw).done){!r&&function Ed(i){const t=Hn(i)||Vr(i)||vs(i);return null!==t&&t.standalone}(e);throw new pe(405,Hc)}let o;o=r?e:this._injector.get($l).resolveComponentFactory(e),this.componentTypes.push(o.componentType);const a=function K6(i){return i.isBoundToModule}(o)?void 0:this._injector.get(rm),c=o.create(Gi.NULL,[],n||o.selector,a),d=c.location.nativeElement,h=c.injector.get(xN,null);return h?.registerApplication(d),c.onDestroy(()=>{this.detachView(c.hostView),$w(this.components,c),h?.unregisterApplication(d)}),this._loadComponent(c),c}tick(){if(this._runningTick)throw new pe(101,!1);try{this._runningTick=!0;for(let e of this._views)e.detectChanges()}catch(e){this._zone.runOutsideAngular(()=>this._exceptionHandler.handleError(e))}finally{this._runningTick=!1}}attachView(e){const n=e;this._views.push(n),n.attachToAppRef(this)}detachView(e){const n=e;$w(this._views,n),n.detachFromAppRef()}_loadComponent(e){this.attachView(e.hostView),this.tick(),this.components.push(e);const n=this._injector.get(MN,[]);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),()=>$w(this._destroyListeners,e)}destroy(){if(this._destroyed)throw new pe(406,!1);const e=this._injector;e.destroy&&!e.destroyed&&e.destroy()}get viewCount(){return this._views.length}warnIfDestroyed(){}}return i.\u0275fac=function(e){return new(e||i)(ee(gt),ee(io),ee(cl))},i.\u0275prov=Pe({token:i,factory:i.\u0275fac,providedIn:"root"}),i})();function $w(i,t){const e=i.indexOf(t);e>-1&&i.splice(e,1)}let Qn=(()=>{class i{}return i.__NG_ELEMENT_ID__=t9,i})();function t9(i){return function n9(i,t,e){if(Dd(i)&&!e){const n=ws(i.index,t);return new ny(n,n)}return 47&i.type?new ny(t[sr],t):null}(Ar(),Se(),16==(16&i))}class NN{constructor(){}supports(t){return Aw(t)}create(t){return new c9(t)}}const l9=(i,t)=>t;class c9{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||l9}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 d9(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 BN),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 BN),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 d9{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 u9{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 BN{constructor(){this.map=new Map}put(t){const e=t.trackById;let n=this.map.get(e);n||(n=new u9,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 UN(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 f9(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 f9{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 zN(){return new jw([new NN])}let jw=(()=>{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||zN()),deps:[[i,new Ca,new Ss]]}}find(e){const n=this.factories.find(r=>r.supports(e));if(null!=n)return n;throw new pe(901,!1)}}return i.\u0275prov=Pe({token:i,providedIn:"root",factory:zN}),i})();function HN(){return new gy([new VN])}let gy=(()=>{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||HN()),deps:[[i,new Ca,new Ss]]}}find(e){const n=this.factories.find(r=>r.supports(e));if(n)return n;throw new pe(901,!1)}}return i.\u0275prov=Pe({token:i,providedIn:"root",factory:HN}),i})();const g9=EN(null,"core",[]);let _9=(()=>{class i{constructor(e){}}return i.\u0275fac=function(e){return new(e||i)(ee(dm))},i.\u0275mod=en({type:i}),i.\u0275inj=Wt({}),i})();let ET=null;function $c(){return ET}class b9{}const qt=new me("DocumentToken");let AT=(()=>{class i{historyGo(e){throw new Error("Not implemented")}}return i.\u0275fac=function(e){return new(e||i)},i.\u0275prov=Pe({token:i,factory:function(){return function x9(){return ee($N)}()},providedIn:"platform"}),i})();const w9=new me("Location Initialized");let $N=(()=>{class i extends AT{constructor(e){super(),this._doc=e,this._location=window.location,this._history=window.history}getBaseHrefFromDOM(){return $c().getBaseHref(this._doc)}onPopState(e){const n=$c().getGlobalEventTarget(this._doc,"window");return n.addEventListener("popstate",e,!1),()=>n.removeEventListener("popstate",e)}onHashChange(e){const n=$c().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){GN()?this._history.pushState(e,n,r):this._location.hash=r}replaceState(e,n,r){GN()?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)(ee(qt))},i.\u0275prov=Pe({token:i,factory:function(){return function M9(){return new $N(ee(qt))}()},providedIn:"platform"}),i})();function GN(){return!!window.history.pushState}function DT(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 WN(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 Gc(i){return i&&"?"!==i[0]?"?"+i:i}let Rh=(()=>{class i{historyGo(e){throw new Error("Not implemented")}}return i.\u0275fac=function(e){return new(e||i)},i.\u0275prov=Pe({token:i,factory:function(){return Lt(YN)},providedIn:"root"}),i})();const jN=new me("appBaseHref");let YN=(()=>{class i extends Rh{constructor(e,n){super(),this._platformLocation=e,this._removeListenerFns=[],this._baseHref=n??this._platformLocation.getBaseHrefFromDOM()??Lt(qt).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 DT(this._baseHref,e)}path(e=!1){const n=this._platformLocation.pathname+Gc(this._platformLocation.search),r=this._platformLocation.hash;return r&&e?`${n}${r}`:n}pushState(e,n,r,s){const o=this.prepareExternalUrl(r+Gc(s));this._platformLocation.pushState(e,n,o)}replaceState(e,n,r,s){const o=this.prepareExternalUrl(r+Gc(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)(ee(AT),ee(jN,8))},i.\u0275prov=Pe({token:i,factory:i.\u0275fac,providedIn:"root"}),i})(),C9=(()=>{class i extends Rh{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=DT(this._baseHref,e);return n.length>0?"#"+n:n}pushState(e,n,r,s){let o=this.prepareExternalUrl(r+Gc(s));0==o.length&&(o=this._platformLocation.pathname),this._platformLocation.pushState(e,n,o)}replaceState(e,n,r,s){let o=this.prepareExternalUrl(r+Gc(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)(ee(AT),ee(jN,8))},i.\u0275prov=Pe({token:i,factory:i.\u0275fac}),i})(),_y=(()=>{class i{constructor(e){this._subject=new $e,this._urlChangeListeners=[],this._urlChangeSubscription=null,this._locationStrategy=e;const n=this._locationStrategy.getBaseHref();this._basePath=function A9(i){if(new RegExp("^(https?:)?//").test(i)){const[,e]=i.split(/\/\/[^\/]+/);return e}return i}(WN(qN(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+Gc(n))}normalize(e){return i.stripTrailingSlash(function E9(i,t){if(!i||!t.startsWith(i))return t;const e=t.substring(i.length);return""===e||["/",";","?","#"].includes(e[0])?e:t}(this._basePath,qN(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+Gc(n)),r)}replaceState(e,n="",r=null){this._locationStrategy.replaceState(r,"",e,n),this._notifyUrlChangeListeners(this.prepareExternalUrl(e+Gc(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=Gc,i.joinWithSlash=DT,i.stripTrailingSlash=WN,i.\u0275fac=function(e){return new(e||i)(ee(Rh))},i.\u0275prov=Pe({token:i,factory:function(){return function S9(){return new _y(ee(Rh))}()},providedIn:"root"}),i})();function qN(i){return i.replace(/\/index.html$/,"")}var Ao=(()=>((Ao=Ao||{})[Ao.Decimal=0]="Decimal",Ao[Ao.Percent=1]="Percent",Ao[Ao.Currency=2]="Currency",Ao[Ao.Scientific=3]="Scientific",Ao))(),$t=(()=>(($t=$t||{})[$t.Decimal=0]="Decimal",$t[$t.Group=1]="Group",$t[$t.List=2]="List",$t[$t.PercentSign=3]="PercentSign",$t[$t.PlusSign=4]="PlusSign",$t[$t.MinusSign=5]="MinusSign",$t[$t.Exponential=6]="Exponential",$t[$t.SuperscriptingExponent=7]="SuperscriptingExponent",$t[$t.PerMille=8]="PerMille",$t[$t.Infinity=9]="Infinity",$t[$t.NaN=10]="NaN",$t[$t.TimeSeparator=11]="TimeSeparator",$t[$t.CurrencyDecimal=12]="CurrencyDecimal",$t[$t.CurrencyGroup=13]="CurrencyGroup",$t))();function Ta(i,t){const e=oo(i),n=e[st.NumberSymbols][t];if(typeof n>"u"){if(t===$t.CurrencyDecimal)return e[st.NumberSymbols][$t.Decimal];if(t===$t.CurrencyGroup)return e[st.NumberSymbols][$t.Group]}return n}const J9=/^(\d+)?\.((\d+)(-(\d+))?)?$/,eB=22,tM=".",yy="0",eY=";",tY=",",PT="#";function LT(i){const t=parseInt(i);if(isNaN(t))throw new Error("Invalid integer literal when parsing "+i);return t}const BT=/\s+/,iB=[];let hm=(()=>{class i{constructor(e,n,r,s){this._iterableDiffers=e,this._keyValueDiffers=n,this._ngEl=r,this._renderer=s,this.initialClasses=iB,this.stateMap=new Map}set klass(e){this.initialClasses=null!=e?e.trim().split(BT):iB}set ngClass(e){this.rawClass="string"==typeof e?e.trim().split(BT):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(BT).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)(E(jw),E(gy),E(vt),E(ll))},i.\u0275dir=ve({type:i,selectors:[["","ngClass",""]],inputs:{klass:["class","klass"],ngClass:"ngClass"},standalone:!0}),i})();class hY{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 lo=(()=>{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 hY(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),oB(a,r)}});for(let r=0,s=n.length;r{oB(n.get(r.currentIndex),r)})}static ngTemplateContextGuard(e,n){return!0}}return i.\u0275fac=function(e){return new(e||i)(E(jr),E(Eo),E(jw))},i.\u0275dir=ve({type:i,selectors:[["","ngFor","","ngForOf",""]],inputs:{ngForOf:"ngForOf",ngForTrackBy:"ngForTrackBy",ngForTemplate:"ngForTemplate"},standalone:!0}),i})();function oB(i,t){i.context.$implicit=t.item}let _i=(()=>{class i{constructor(e,n){this._viewContainer=e,this._context=new pY,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){aB("ngIfThen",e),this._thenTemplateRef=e,this._thenViewRef=null,this._updateView()}set ngIfElse(e){aB("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)(E(jr),E(Eo))},i.\u0275dir=ve({type:i,selectors:[["","ngIf",""]],inputs:{ngIf:"ngIf",ngIfThen:"ngIfThen",ngIfElse:"ngIfElse"},standalone:!0}),i})();class pY{constructor(){this.$implicit=null,this.ngIf=null}}function aB(i,t){if(t&&!t.createEmbeddedView)throw new Error(`${i} must be a TemplateRef, but received '${mi(t)}'.`)}class UT{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 by=(()=>{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=ve({type:i,selectors:[["","ngSwitch",""]],inputs:{ngSwitch:"ngSwitch"},standalone:!0}),i})(),VT=(()=>{class i{constructor(e,n,r){this.ngSwitch=r,r._addCase(),this._view=new UT(e,n)}ngDoCheck(){this._view.enforceState(this.ngSwitch._matchCase(this.ngSwitchCase))}}return i.\u0275fac=function(e){return new(e||i)(E(jr),E(Eo),E(by,9))},i.\u0275dir=ve({type:i,selectors:[["","ngSwitchCase",""]],inputs:{ngSwitchCase:"ngSwitchCase"},standalone:!0}),i})(),lB=(()=>{class i{constructor(e,n,r){r._addDefault(new UT(e,n))}}return i.\u0275fac=function(e){return new(e||i)(E(jr),E(Eo),E(by,9))},i.\u0275dir=ve({type:i,selectors:[["","ngSwitchDefault",""]],standalone:!0}),i})(),nM=(()=>{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:Es.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)(E(vt),E(gy),E(ll))},i.\u0275dir=ve({type:i,selectors:[["","ngStyle",""]],inputs:{ngStyle:"ngStyle"},standalone:!0}),i})(),xy=(()=>{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)(E(jr))},i.\u0275dir=ve({type:i,selectors:[["","ngTemplateOutlet",""]],inputs:{ngTemplateOutletContext:"ngTemplateOutletContext",ngTemplateOutlet:"ngTemplateOutlet",ngTemplateOutletInjector:"ngTemplateOutletInjector"},standalone:!0,features:[xi]}),i})();function ml(i,t){return new pe(2100,!1)}class gY{createSubscription(t,e){return t.subscribe({next:e,error:n=>{throw n}})}dispose(t){t.unsubscribe()}}class _Y{createSubscription(t,e){return t.then(e,n=>{throw n})}dispose(t){}}const vY=new _Y,yY=new gY;let Xo=(()=>{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(oy(e))return vY;if(hL(e))return yY;throw ml()}_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)(E(Qn,16))},i.\u0275pipe=$i({name:"async",type:i,pure:!1,standalone:!0}),i})(),dB=(()=>{class i{constructor(e){this.differs=e,this.keyValues=[],this.compareFn=uB}transform(e,n=uB){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 kY(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)(E(gy,16))},i.\u0275pipe=$i({name:"keyvalue",type:i,pure:!1,standalone:!0}),i})();function uB(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 zT(i){return!(null==i||""===i||i!=i)}(e))return null;r=r||this._locale;try{return function sY(i,t,e){return function OT(i,t,e,n,r,s,o=!1){let a="",l=!1;if(isFinite(i)){let c=function aY(i){let n,r,s,o,a,t=Math.abs(i)+"",e=0;for((r=t.indexOf(tM))>-1&&(t=t.replace(tM,"")),(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)===yy;s++);if(s===(a=t.length))n=[0],r=1;else{for(a--;t.charAt(a)===yy;)a--;for(r-=s,n=[],o=0;s<=a;s++,o++)n[o]=Number(t.charAt(s))}return r>eB&&(n=n.splice(0,eB-1),e=r-1,r=1),{digits:n,exponent:e,integerLen:r}}(i);o&&(c=function oY(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 d=t.minInt,h=t.minFrac,p=t.maxFrac;if(s){const M=s.match(J9);if(null===M)throw new Error(`${s} is not a valid digit info`);const x=M[1],C=M[3],F=M[5];null!=x&&(d=LT(x)),null!=C&&(h=LT(C)),null!=F?p=LT(F):null!=C&&h>p&&(p=h)}!function lY(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);d&&(n.unshift(d),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(Ta(e,n)),v.length&&(a+=Ta(e,r)+v.join("")),b&&(a+=Ta(e,$t.Exponential)+"+"+b)}else a=Ta(e,$t.Infinity);return a=i<0&&!l?t.negPre+a+t.negSuf:t.posPre+a+t.posSuf,a}(i,function FT(i,t="-"){const e={minInt:1,minFrac:0,maxFrac:0,posPre:"",posSuf:"",negPre:"",negSuf:"",gSize:0,lgSize:0},n=i.split(eY),r=n[0],s=n[1],o=-1!==r.indexOf(tM)?r.split(tM):[r.substring(0,r.lastIndexOf(yy)+1),r.substring(r.lastIndexOf(yy)+1)],a=o[0],l=o[1]||"";e.posPre=a.substring(0,a.indexOf(PT));for(let d=0;d{class i{}return i.\u0275fac=function(e){return new(e||i)},i.\u0275mod=en({type:i}),i.\u0275inj=Wt({}),i})();const fB="browser";let UY=(()=>{class i{}return i.\u0275prov=Pe({token:i,providedIn:"root",factory:()=>new VY(ee(qt),window)}),i})();class VY{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 zY(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=pB(this.window.history)||pB(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 pB(i){return Object.getOwnPropertyDescriptor(i,"scrollRestoration")}class m7 extends b9{constructor(){super(...arguments),this.supportsDOMEvents=!0}}class WT extends m7{static makeCurrent(){!function y9(i){ET||(ET=i)}(new WT)}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 g7(){return My=My||document.querySelector("base"),My?My.getAttribute("href"):null}();return null==e?null:function _7(i){sM=sM||document.createElement("a"),sM.setAttribute("href",i);const t=sM.pathname;return"/"===t.charAt(0)?t:`/${t}`}(e)}resetBaseElement(){My=null}getUserAgent(){return window.navigator.userAgent}getCookie(t){return function dY(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 sM,My=null;const yB=new me("TRANSITION_ID"),y7=[{provide:Vw,useFactory:function v7(i,t,e){return()=>{e.get(zw).donePromise.then(()=>{const n=$c(),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=Pe({token:i,factory:i.\u0275fac}),i})();const oM=new me("EventManagerPlugins");let aM=(()=>{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=Pe({token:i,factory:i.\u0275fac}),i})(),Cy=(()=>{class i extends xB{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)(ee(qt))},i.\u0275prov=Pe({token:i,factory:i.\u0275fac}),i})();const jT={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/"},YT=/%COMP%/g,CB=new me("RemoveStylesOnCompDestory",{providedIn:"root",factory:()=>!1});function SB(i,t){return t.flat(100).map(e=>e.replace(YT,i))}function EB(i){return t=>{if("__ngUnwrap__"===t)return i;!1===i(t)&&(t.preventDefault(),t.returnValue=!1)}}let lM=(()=>{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 qT(e)}createRenderer(e,n){if(!e||!n)return this.defaultRenderer;const r=this.getOrCreateRenderer(e,n);return r instanceof TB?r.applyToHost(e):r instanceof XT&&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 Ks.Emulated:s=new TB(o,a,n,this.appId,l);break;case Ks.ShadowDom:return new D7(o,a,e,n);default:s=new XT(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)(ee(aM),ee(Cy),ee(cm),ee(CB))},i.\u0275prov=Pe({token:i,factory:i.\u0275fac}),i})();class qT{constructor(t){this.eventManager=t,this.data=Object.create(null),this.destroyNode=null}destroy(){}createElement(t,e){return e?document.createElementNS(jT[e]||e,t):document.createElement(t)}createComment(t){return document.createComment(t)}createText(t){return document.createTextNode(t)}appendChild(t,e){(DB(t)?t.content:t).appendChild(e)}insertBefore(t,e,n){t&&(DB(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=jT[r];s?t.setAttributeNS(s,e,n):t.setAttribute(e,n)}else t.setAttribute(e,n)}removeAttribute(t,e,n){if(n){const r=jT[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&(Es.DashCase|Es.Important)?t.style.setProperty(e,n,r&Es.Important?"important":""):t.style[e]=n}removeStyle(t,e,n){n&Es.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,EB(n)):this.eventManager.addEventListener(t,e,EB(n))}}function DB(i){return"TEMPLATE"===i.tagName&&void 0!==i.content}class D7 extends qT{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=SB(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 XT extends qT{constructor(t,e,n,r,s=n.id){super(t),this.sharedStylesHost=e,this.removeStylesOnCompDestory=r,this.rendererUsageCount=0,this.styles=SB(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 TB extends XT{constructor(t,e,n,r,s){const o=r+"-"+n.id;super(t,e,n,s,o),this.contentAttr=function S7(i){return"_ngcontent-%COMP%".replace(YT,i)}(o),this.hostAttr=function E7(i){return"_nghost-%COMP%".replace(YT,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 T7=(()=>{class i extends bB{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)(ee(qt))},i.\u0275prov=Pe({token:i,factory:i.\u0275fac}),i})();const IB=["alt","control","meta","shift"],I7={"\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"},R7={alt:i=>i.altKey,control:i=>i.ctrlKey,meta:i=>i.metaKey,shift:i=>i.shiftKey};let k7=(()=>{class i extends bB{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(()=>$c().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."),IB.forEach(c=>{const d=n.indexOf(c);d>-1&&(n.splice(d,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=I7[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"),IB.forEach(o=>{o!==r&&(0,R7[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)(ee(qt))},i.\u0275prov=Pe({token:i,factory:i.\u0275fac}),i})();const L7=EN(g9,"browser",[{provide:fT,useValue:fB},{provide:mN,useValue:function P7(){WT.makeCurrent()},multi:!0},{provide:qt,useFactory:function F7(){return function o1(i){vv=i}(document),document},deps:[]}]),PB=new me(""),OB=[{provide:Hw,useClass:class b7{addToWindow(t){Rn.getAngularTestability=(n,r=!0)=>{const s=t.findTestabilityInTree(n,r);if(null==s)throw new Error("Could not find testability for element.");return s},Rn.getAllAngularTestabilities=()=>t.getAllTestabilities(),Rn.getAllAngularRootElements=()=>t.getAllRootElements(),Rn.frameworkStabilizers||(Rn.frameworkStabilizers=[]),Rn.frameworkStabilizers.push(n=>{const r=Rn.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?$c().isShadowRoot(e)?this.findTestabilityInTree(t,e.host,!0):this.findTestabilityInTree(t,e.parentElement,!0):null)}},deps:[]},{provide:xN,useClass:_T,deps:[gt,vT,Hw]},{provide:_T,useClass:_T,deps:[gt,vT,Hw]}],FB=[{provide:Iv,useValue:"root"},{provide:cl,useFactory:function O7(){return new cl},deps:[]},{provide:oM,useClass:T7,multi:!0,deps:[qt,gt,fT]},{provide:oM,useClass:k7,multi:!0,deps:[qt]},{provide:lM,useClass:lM,deps:[aM,Cy,cm,CB]},{provide:Gl,useExisting:lM},{provide:xB,useExisting:Cy},{provide:Cy,useClass:Cy,deps:[qt]},{provide:aM,useClass:aM,deps:[oM,gt]},{provide:class HY{},useClass:x7,deps:[]},[]];let LB=(()=>{class i{constructor(e){}static withServerTransition(e){return{ngModule:i,providers:[{provide:cm,useValue:e.appId},{provide:yB,useExisting:cm},y7]}}}return i.\u0275fac=function(e){return new(e||i)(ee(PB,12))},i.\u0275mod=en({type:i}),i.\u0275inj=Wt({providers:[...FB,...OB],imports:[co,_9]}),i})(),NB=(()=>{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)(ee(qt))},i.\u0275prov=Pe({token:i,factory:function(e){let n=null;return n=e?new e:function B7(){return new NB(ee(qt))}(),n},providedIn:"root"}),i})();typeof window<"u"&&window;let QT=(()=>{class i{}return i.\u0275fac=function(e){return new(e||i)},i.\u0275prov=Pe({token:i,factory:function(e){let n=null;return n=e?new(e||i):ee(VB),n},providedIn:"root"}),i})(),VB=(()=>{class i extends QT{constructor(e){super(),this._doc=e}sanitize(e,n){if(null==n)return null;switch(e){case Zn.NONE:return n;case Zn.HTML:return Ea(n,"HTML")?to(n):Qx(this._doc,String(n)).toString();case Zn.STYLE:return Ea(n,"Style")?to(n):n;case Zn.SCRIPT:if(Ea(n,"Script"))return to(n);throw new Error("unsafe value used in a script context");case Zn.URL:return Ea(n,"URL")?to(n):xh(String(n));case Zn.RESOURCE_URL:if(Ea(n,"ResourceURL"))return to(n);throw new Error(`unsafe value used in a resource URL context (see ${qu})`);default:throw new Error(`Unexpected SecurityContext ${e} (see ${qu})`)}}bypassSecurityTrustHtml(e){return function h1(i){return new a1(i)}(e)}bypassSecurityTrustStyle(e){return function f1(i){return new l1(i)}(e)}bypassSecurityTrustScript(e){return function p1(i){return new c1(i)}(e)}bypassSecurityTrustUrl(e){return function m1(i){return new d1(i)}(e)}bypassSecurityTrustResourceUrl(e){return function g1(i){return new Op(i)}(e)}}return i.\u0275fac=function(e){return new(e||i)(ee(qt))},i.\u0275prov=Pe({token:i,factory:function(e){let n=null;return n=e?new e:function $7(i){return new VB(i.get(qt))}(ee(Gi)),n},providedIn:"root"}),i})();function mt(...i){return Ni(i,Gu(i))}class Qe extends Te{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 fm=z(i=>function(){i(this),this.name="EmptyError",this.message="no elements in sequence"}),{isArray:G7}=Array,{getPrototypeOf:W7,prototype:j7,keys:Y7}=Object;function zB(i){if(1===i.length){const t=i[0];if(G7(t))return{args:t,keys:null};if(function q7(i){return i&&"object"==typeof i&&W7(i)===j7}(t)){const e=Y7(t);return{args:e.map(n=>t[n]),keys:e}}}return{args:i,keys:null}}const{isArray:X7}=Array;function JT(i){return tt(t=>function K7(i,t){return X7(t)?i(...t):i(t)}(i,t))}function HB(i,t){return i.reduce((e,n,r)=>(e[n]=t[r],e),{})}function Ra(...i){const t=Gu(i),e=M0(i),{args:n,keys:r}=zB(i);if(0===n.length)return Ni([],t);const s=new In(function Z7(i,t,e=ja){return n=>{$B(t,()=>{const{length:r}=i,s=new Array(r);let o=r,a=r;for(let l=0;l{const c=Ni(i[l],t);let d=!1;c.subscribe(qn(n,h=>{s[l]=h,d||(d=!0,a--),a||n.next(e(s.slice()))},()=>{--o||n.complete()}))},n)},n)}}(n,t,r?o=>HB(r,o):ja));return e?s.pipe(JT(e)):s}function $B(i,t,e){i?Xa(e,i,t):t()}function Sy(...i){return function Q7(){return bd(1)}()(Ni(i,Gu(i)))}function Ey(i){return new In(t=>{Mr(i()).subscribe(t)})}function pm(i,t){const e=dn(i)?i:()=>i,n=r=>r.error(e());return new In(t?r=>t.schedule(n,0,r):n)}function eI(){return ni((i,t)=>{let e=null;i._refCount++;const n=qn(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 GB extends In{constructor(t,e){super(),this.source=t,this.subjectFactory=e,this._subject=null,this._refCount=0,this._connection=null,d0(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 Qt;const e=this.getSubject();t.add(this.source.subscribe(qn(e,void 0,()=>{this._teardown(),e.complete()},n=>{this._teardown(),e.error(n)},()=>this._teardown()))),t.closed&&(this._connection=null,t=Qt.EMPTY)}return t}refCount(){return eI()(this)}}function ks(i,t){return ni((e,n)=>{let r=null,s=0,o=!1;const a=()=>o&&!r&&n.complete();e.subscribe(qn(n,l=>{r?.unsubscribe();let c=0;const d=s++;Mr(i(l,d)).subscribe(r=qn(n,h=>n.next(t?t(l,h,d,c++):h),()=>{r=null,a()}))},()=>{o=!0,a()}))})}function Oi(i){return i<=0?()=>_o:ni((t,e)=>{let n=0;t.subscribe(qn(e,r=>{++n<=i&&(e.next(r),i<=n&&e.complete())}))})}function Do(...i){const t=Gu(i);return ni((e,n)=>{(t?Sy(i,e,t):Sy(i,e)).subscribe(n)})}function gn(i,t){return ni((e,n)=>{let r=0;e.subscribe(qn(n,s=>i.call(t,s,r++)&&n.next(s)))})}function cM(i){return ni((t,e)=>{let n=!1;t.subscribe(qn(e,r=>{n=!0,e.next(r)},()=>{n||e.next(i),e.complete()}))})}function WB(i=J7){return ni((t,e)=>{let n=!1;t.subscribe(qn(e,r=>{n=!0,e.next(r)},()=>n?e.complete():e.error(i())))})}function J7(){return new fm}function iu(i,t){const e=arguments.length>=2;return n=>n.pipe(i?gn((r,s)=>i(r,s,n)):ja,Oi(1),e?cM(t):WB(()=>new fm))}function ru(i,t){return dn(t)?rr(i,t,1):rr(i,1)}function Vi(i,t,e){const n=dn(i)||t||e?{next:i,error:t,complete:e}:i;return n?ni((r,s)=>{var o;null===(o=n.subscribe)||void 0===o||o.call(n);let a=!0;r.subscribe(qn(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)}))}):ja}function jc(i){return ni((t,e)=>{let s,n=null,r=!1;n=t.subscribe(qn(e,void 0,void 0,o=>{s=Mr(i(o,jc(i)(t))),n?(n.unsubscribe(),n=null,s.subscribe(e)):r=!0})),r&&(n.unsubscribe(),n=null,s.subscribe(e))})}function tI(i,t){return ni(function eq(i,t,e,n,r){return(s,o)=>{let a=e,l=t,c=0;s.subscribe(qn(o,d=>{const h=c++;l=a?i(l,d,h):(a=!0,d),n&&o.next(l)},r&&(()=>{a&&o.next(l),o.complete()})))}}(i,t,arguments.length>=2,!0))}function nI(i){return i<=0?()=>_o:ni((t,e)=>{let n=[];t.subscribe(qn(e,r=>{n.push(r),i{for(const r of n)e.next(r);e.complete()},void 0,()=>{n=null}))})}function jB(i,t){const e=arguments.length>=2;return n=>n.pipe(i?gn((r,s)=>i(r,s,n)):ja,nI(1),e?cM(t):WB(()=>new fm))}function YB(i,t=!1){return ni((e,n)=>{let r=0;e.subscribe(qn(n,s=>{const o=i(s,r++);(o||t)&&n.next(s),!o&&n.complete()}))})}function qB(i){return tt(()=>i)}function su(i){return ni((t,e)=>{try{t.subscribe(e)}finally{e.add(i)}})}const _n="primary",Ay=Symbol("RouteTitle");class tq{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 tq(i)}function nq(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 KB(i){return Array.prototype.concat.apply([],i)}function ZB(i){return i.length>0?i[i.length-1]:null}function os(i,t){for(const e in i)i.hasOwnProperty(e)&&t(i[e],e)}function ou(i){return LD(i)?i:oy(i)?Ni(Promise.resolve(i)):mt(i)}const dM=!1,rq={exact:function e3(i,t,e){if(!kh(i.segments,t.segments)||!uM(i.segments,t.segments,e)||i.numberOfChildren!==t.numberOfChildren)return!1;for(const n in t.children)if(!i.children[n]||!e3(i.children[n],t.children[n],e))return!1;return!0},subset:t3},QB={exact:function sq(i,t){return Kl(i,t)},subset:function oq(i,t){return Object.keys(t).length<=Object.keys(i).length&&Object.keys(t).every(e=>XB(i[e],t[e]))},ignored:()=>!0};function JB(i,t,e){return rq[e.paths](i.root,t.root,e.matrixParams)&&QB[e.queryParams](i.queryParams,t.queryParams)&&!("exact"===e.fragment&&i.fragment!==t.fragment)}function t3(i,t,e){return n3(i,t,t.segments,e)}function n3(i,t,e,n){if(i.segments.length>e.length){const r=i.segments.slice(0,e.length);return!(!kh(r,e)||t.hasChildren()||!uM(r,e,n))}if(i.segments.length===e.length){if(!kh(i.segments,e)||!uM(i.segments,e,n))return!1;for(const r in t.children)if(!i.children[r]||!t3(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!!(kh(i.segments,r)&&uM(i.segments,r,n)&&i.children[_n])&&n3(i.children[_n],t,s,n)}}function uM(i,t,e){return t.every((n,r)=>QB[e](i[r].parameters,n.parameters))}class au{constructor(t=new Tn([],{}),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 cq.serialize(this)}}class Tn{constructor(t,e){this.segments=t,this.children=e,this.parent=null,os(e,(n,r)=>n.parent=this)}hasChildren(){return this.numberOfChildren>0}get numberOfChildren(){return Object.keys(this.children).length}toString(){return hM(this)}}class Dy{constructor(t,e){this.path=t,this.parameters=e}get parameterMap(){return this._parameterMap||(this._parameterMap=mm(this.parameters)),this._parameterMap}toString(){return o3(this)}}function kh(i,t){return i.length===t.length&&i.every((e,n)=>e.path===t[n].path)}let Ty=(()=>{class i{}return i.\u0275fac=function(e){return new(e||i)},i.\u0275prov=Pe({token:i,factory:function(){return new iI},providedIn:"root"}),i})();class iI{parse(t){const e=new vq(t);return new au(e.parseRootSegment(),e.parseQueryParams(),e.parseFragment())}serialize(t){const e=`/${Iy(t.root,!0)}`,n=function hq(i){const t=Object.keys(i).map(e=>{const n=i[e];return Array.isArray(n)?n.map(r=>`${fM(e)}=${fM(r)}`).join("&"):`${fM(e)}=${fM(n)}`}).filter(e=>!!e);return t.length?`?${t.join("&")}`:""}(t.queryParams);return`${e}${n}${"string"==typeof t.fragment?`#${function dq(i){return encodeURI(i)}(t.fragment)}`:""}`}}const cq=new iI;function hM(i){return i.segments.map(t=>o3(t)).join("/")}function Iy(i,t){if(!i.hasChildren())return hM(i);if(t){const e=i.children[_n]?Iy(i.children[_n],!1):"",n=[];return os(i.children,(r,s)=>{s!==_n&&n.push(`${s}:${Iy(r,!1)}`)}),n.length>0?`${e}(${n.join("//")})`:e}{const e=function lq(i,t){let e=[];return os(i.children,(n,r)=>{r===_n&&(e=e.concat(t(n,r)))}),os(i.children,(n,r)=>{r!==_n&&(e=e.concat(t(n,r)))}),e}(i,(n,r)=>r===_n?[Iy(i.children[_n],!1)]:[`${r}:${Iy(n,!1)}`]);return 1===Object.keys(i.children).length&&null!=i.children[_n]?`${hM(i)}/${e[0]}`:`${hM(i)}/(${e.join("//")})`}}function r3(i){return encodeURIComponent(i).replace(/%40/g,"@").replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",")}function fM(i){return r3(i).replace(/%3B/gi,";")}function rI(i){return r3(i).replace(/\(/g,"%28").replace(/\)/g,"%29").replace(/%26/gi,"&")}function pM(i){return decodeURIComponent(i)}function s3(i){return pM(i.replace(/\+/g,"%20"))}function o3(i){return`${rI(i.path)}${function uq(i){return Object.keys(i).map(t=>`;${rI(t)}=${rI(i[t])}`).join("")}(i.parameters)}`}const fq=/^[^\/()?;=#]+/;function mM(i){const t=i.match(fq);return t?t[0]:""}const pq=/^[^=?&#]+/,gq=/^[^&#]+/;class vq{constructor(t){this.url=t,this.remaining=t}parseRootSegment(){return this.consumeOptional("/"),""===this.remaining||this.peekStartsWith("?")||this.peekStartsWith("#")?new Tn([],{}):new Tn([],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[_n]=new Tn(t,e)),n}parseSegment(){const t=mM(this.remaining);if(""===t&&this.peekStartsWith(";"))throw new pe(4009,dM);return this.capture(t),new Dy(pM(t),this.parseMatrixParams())}parseMatrixParams(){const t={};for(;this.consumeOptional(";");)this.parseParam(t);return t}parseParam(t){const e=mM(this.remaining);if(!e)return;this.capture(e);let n="";if(this.consumeOptional("=")){const r=mM(this.remaining);r&&(n=r,this.capture(n))}t[pM(e)]=pM(n)}parseQueryParam(t){const e=function mq(i){const t=i.match(pq);return t?t[0]:""}(this.remaining);if(!e)return;this.capture(e);let n="";if(this.consumeOptional("=")){const o=function _q(i){const t=i.match(gq);return t?t[0]:""}(this.remaining);o&&(n=o,this.capture(n))}const r=s3(e),s=s3(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=mM(this.remaining),r=this.remaining[n.length];if("/"!==r&&")"!==r&&";"!==r)throw new pe(4010,dM);let s;n.indexOf(":")>-1?(s=n.slice(0,n.indexOf(":")),this.capture(s),this.capture(":")):t&&(s=_n);const o=this.parseChildren();e[s]=1===Object.keys(o).length?o[_n]:new Tn([],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 pe(4011,dM)}}function sI(i){return i.segments.length>0?new Tn([],{[_n]:i}):i}function gM(i){const t={};for(const n of Object.keys(i.children)){const s=gM(i.children[n]);(s.segments.length>0||s.hasChildren())&&(t[n]=s)}return function yq(i){if(1===i.numberOfChildren&&i.children[_n]){const t=i.children[_n];return new Tn(i.segments.concat(t.segments),t.children)}return i}(new Tn(i.segments,t))}function Ph(i){return i instanceof au}const oI=!1;function bq(i,t,e,n,r){if(0===e.length)return gm(t.root,t.root,t.root,n,r);const s=function u3(i){if("string"==typeof i[0]&&1===i.length&&"/"===i[0])return new d3(!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 os(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 d3(e,t,n)}(e);return s.toRoot()?gm(t.root,t.root,new Tn([],{}),n,r):function o(l){const c=function wq(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 h3(i,t,e){let n=i,r=t,s=e;for(;s>r;){if(s-=r,n=n.parent,!n)throw new pe(4005,oI&&"Invalid number of '../'");r=n.segments.length}return new _m(n,!1,r-s)}(e,n+(Ry(i.commands[0])?0:1),i.numberOfDoubleDots)}(s,t,i.snapshot?._urlSegment,l),d=c.processChildren?vm(c.segmentGroup,c.index,s.commands):aI(c.segmentGroup,c.index,s.commands);return gm(t.root,c.segmentGroup,d,n,r)}(i.snapshot?._lastPathIndex)}function Ry(i){return"object"==typeof i&&null!=i&&!i.outlets&&!i.segmentPath}function ky(i){return"object"==typeof i&&null!=i&&i.outlets}function gm(i,t,e,n,r){let o,s={};n&&os(n,(l,c)=>{s[c]=Array.isArray(l)?l.map(d=>`${d}`):`${l}`}),o=i===t?e:c3(i,t,e);const a=sI(gM(o));return new au(a,s,r)}function c3(i,t,e){const n={};return os(i.children,(r,s)=>{n[s]=r===t?e:c3(r,t,e)}),new Tn(i.segments,n)}class d3{constructor(t,e,n){if(this.isAbsolute=t,this.numberOfDoubleDots=e,this.commands=n,t&&n.length>0&&Ry(n[0]))throw new pe(4003,oI&&"Root segment cannot have matrix parameters");const r=n.find(ky);if(r&&r!==ZB(n))throw new pe(4004,oI&&"{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 aI(i,t,e){if(i||(i=new Tn([],{})),0===i.segments.length&&i.hasChildren())return vm(i,t,e);const n=function Cq(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(ky(a))break;const l=`${a}`,c=n0&&void 0===l)break;if(l&&c&&"object"==typeof c&&void 0===c.outlets){if(!p3(l,c,o))return s;n+=2}else{if(!p3(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]=aI(i.children[o],t,s))}),os(i.children,(s,o)=>{void 0===n[o]&&(r[o]=s)}),new Tn(i.segments,r)}}function lI(i,t,e){const n=i.segments.slice(0,t);let r=0;for(;r{"string"==typeof e&&(e=[e]),null!==e&&(t[n]=lI(new Tn([],{}),0,e))}),t}function f3(i){const t={};return os(i,(e,n)=>t[n]=`${e}`),t}function p3(i,t,e){return i==e.path&&Kl(t,e.parameters)}const Py="imperative";class Zl{constructor(t,e){this.id=t,this.url=e}}class cI extends Zl{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 Oh extends Zl{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 _M extends Zl{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 vM extends Zl{constructor(t,e,n,r){super(t,e),this.reason=n,this.code=r,this.type=16}}class dI extends Zl{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 Eq extends Zl{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 Aq extends Zl{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 Dq extends Zl{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 Tq extends Zl{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 Iq extends Zl{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 Rq{constructor(t){this.route=t,this.type=9}toString(){return`RouteConfigLoadStart(path: ${this.route.path})`}}class kq{constructor(t){this.route=t,this.type=10}toString(){return`RouteConfigLoadEnd(path: ${this.route.path})`}}class Pq{constructor(t){this.snapshot=t,this.type=11}toString(){return`ChildActivationStart(path: '${this.snapshot.routeConfig&&this.snapshot.routeConfig.path||""}')`}}class Oq{constructor(t){this.snapshot=t,this.type=12}toString(){return`ChildActivationEnd(path: '${this.snapshot.routeConfig&&this.snapshot.routeConfig.path||""}')`}}class Fq{constructor(t){this.snapshot=t,this.type=13}toString(){return`ActivationStart(path: '${this.snapshot.routeConfig&&this.snapshot.routeConfig.path||""}')`}}class Lq{constructor(t){this.snapshot=t,this.type=14}toString(){return`ActivationEnd(path: '${this.snapshot.routeConfig&&this.snapshot.routeConfig.path||""}')`}}class m3{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 Uq=(()=>{class i{createUrlTree(e,n,r,s,o,a){return bq(e||n.root,r,s,o,a)}}return i.\u0275fac=function(e){return new(e||i)},i.\u0275prov=Pe({token:i,factory:i.\u0275fac}),i})(),zq=(()=>{class i{}return i.\u0275fac=function(e){return new(e||i)},i.\u0275prov=Pe({token:i,factory:function(t){return Uq.\u0275fac(t)},providedIn:"root"}),i})();class g3{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=uI(t,this._root);return e?e.children.map(n=>n.value):[]}firstChild(t){const e=uI(t,this._root);return e&&e.children.length>0?e.children[0].value:null}siblings(t){const e=hI(t,this._root);return e.length<2?[]:e[e.length-2].children.map(r=>r.value).filter(r=>r!==t)}pathFromRoot(t){return hI(t,this._root).map(e=>e.value)}}function uI(i,t){if(i===t.value)return t;for(const e of t.children){const n=uI(i,e);if(n)return n}return null}function hI(i,t){if(i===t.value)return[t];for(const e of t.children){const n=hI(i,e);if(n.length)return n.unshift(t),n}return[]}class Yc{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 _3 extends g3{constructor(t,e){super(t),this.snapshot=e,fI(this,t)}toString(){return this.snapshot.toString()}}function v3(i,t){const e=function Hq(i,t){const o=new yM([],{},{},"",{},_n,t,null,i.root,-1,{});return new b3("",new Yc(o,[]))}(i,t),n=new Qe([new Dy("",{})]),r=new Qe({}),s=new Qe({}),o=new Qe({}),a=new Qe(""),l=new bm(n,r,o,a,s,_n,t,e.root);return l.snapshot=e.root,new _3(new Yc(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(tt(c=>c[Ay]))??mt(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(tt(t=>mm(t)))),this._paramMap}get queryParamMap(){return this._queryParamMap||(this._queryParamMap=this.queryParams.pipe(tt(t=>mm(t)))),this._queryParamMap}toString(){return this.snapshot?this.snapshot.toString():`Future(${this._futureSnapshot})`}}function y3(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 $q(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 yM{get title(){return this.data?.[Ay]}constructor(t,e,n,r,s,o,a,l,c,d,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=d,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 b3 extends g3{constructor(t,e){super(e),this.url=t,fI(this,e)}toString(){return x3(this._root)}}function fI(i,t){t.value._routerState=i,t.children.forEach(e=>fI(i,e))}function x3(i){const t=i.children.length>0?` { ${i.children.map(x3).join(", ")} } `:"";return`${i.value}${t}`}function pI(i){if(i.snapshot){const t=i.snapshot,e=i._futureSnapshot;i.snapshot=e,Kl(t.queryParams,e.queryParams)||i.queryParams.next(e.queryParams),t.fragment!==e.fragment&&i.fragment.next(e.fragment),Kl(t.params,e.params)||i.params.next(e.params),function iq(i,t){if(i.length!==t.length)return!1;for(let e=0;eKl(e.parameters,t[n].parameters))}(i.url,t.url);return e&&!(!i.parent!=!t.parent)&&(!i.parent||mI(i.parent,t.parent))}function Oy(i,t,e){if(e&&i.shouldReuseRoute(t.value,e.value.snapshot)){const n=e.value;n._futureSnapshot=t.value;const r=function Wq(i,t,e){return t.children.map(n=>{for(const r of e.children)if(i.shouldReuseRoute(n.value,r.value.snapshot))return Oy(i,n,r);return Oy(i,n)})}(i,t,e);return new Yc(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=>Oy(i,a)),o}}const n=function jq(i){return new bm(new Qe(i.url),new Qe(i.params),new Qe(i.queryParams),new Qe(i.fragment),new Qe(i.data),i.outlet,i.component,i)}(t.value),r=t.children.map(s=>Oy(i,s));return new Yc(n,r)}}const gI="ngNavigationCancelingError";function w3(i,t){const{redirectTo:e,navigationBehaviorOptions:n}=Ph(t)?{redirectTo:t,navigationBehaviorOptions:void 0}:t,r=M3(!1,0,t);return r.url=e,r.navigationBehaviorOptions=n,r}function M3(i,t,e){const n=new Error("NavigationCancelingError: "+(i||""));return n[gI]=!0,n.cancellationCode=t,e&&(n.url=e),n}function C3(i){return S3(i)&&Ph(i.url)}function S3(i){return i&&i[gI]}class Yq{constructor(){this.outlet=null,this.route=null,this.resolver=null,this.injector=null,this.children=new Fy,this.attachRef=null}}let Fy=(()=>{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 Yq,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=Pe({token:i,factory:i.\u0275fac,providedIn:"root"}),i})();const bM=!1;let E3=(()=>{class i{constructor(){this.activated=null,this._activatedRoute=null,this.name=_n,this.activateEvents=new $e,this.deactivateEvents=new $e,this.attachEvents=new $e,this.detachEvents=new $e,this.parentContexts=Lt(Fy),this.location=Lt(jr),this.changeDetector=Lt(Qn),this.environmentInjector=Lt(io)}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 pe(4012,bM);return this.activated.instance}get activatedRoute(){if(!this.activated)throw new pe(4012,bM);return this._activatedRoute}get activatedRouteData(){return this._activatedRoute?this._activatedRoute.snapshot.data:{}}detach(){if(!this.activated)throw new pe(4012,bM);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 pe(4013,bM);this._activatedRoute=e;const r=this.location,o=e.snapshot.component,a=this.parentContexts.getOrCreateContext(this.name).children,l=new qq(e,a,r.injector);if(n&&function Xq(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=ve({type:i,selectors:[["router-outlet"]],inputs:{name:"name"},outputs:{activateEvents:"activate",deactivateEvents:"deactivate",attachEvents:"attach",detachEvents:"detach"},exportAs:["outlet"],standalone:!0,features:[xi]}),i})();class qq{constructor(t,e,n){this.route=t,this.childContexts=e,this.parent=n}get(t,e){return t===bm?this.route:t===Fy?this.childContexts:this.parent.get(t,e)}}let _I=(()=>{class i{}return i.\u0275fac=function(e){return new(e||i)},i.\u0275cmp=ot({type:i,selectors:[["ng-component"]],standalone:!0,features:[ZD],decls:1,vars:0,template:function(e,n){1&e&&Ie(0,"router-outlet")},dependencies:[E3],encapsulation:2}),i})();function A3(i,t){return i.providers&&!i._injector&&(i._injector=Lw(i.providers,t,`Route: ${i.path}`)),i._injector??t}function yI(i){const t=i.children&&i.children.map(yI),e=t?{...i,children:t}:{...i};return!e.component&&!e.loadComponent&&(t||e.loadChildren)&&e.outlet&&e.outlet!==_n&&(e.component=_I),e}function ka(i){return i.outlet||_n}function D3(i,t){const e=i.filter(n=>ka(n)===t);return e.push(...i.filter(n=>ka(n)!==t)),e}function Ly(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 eX{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),pI(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]}),os(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 Lq(s.value.snapshot))}),t.children.length&&this.forwardEvent(new Oq(t.value.snapshot))}activateRoutes(t,e,n){const r=t.value,s=e?e.value:null;if(pI(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),pI(a.route.value),this.activateChildRoutes(t,null,o.children)}else{const a=Ly(r.snapshot),l=a?.get($l)??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 T3{constructor(t){this.path=t,this.route=this.path[this.path.length-1]}}class xM{constructor(t,e){this.component=t,this.route=e}}function tX(i,t,e){const n=i._root;return Ny(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 Sr(i){return null!==Gf(i)}(i)?t.get(i):i:n}function Ny(i,t,e,n,r={canDeactivateChecks:[],canActivateChecks:[]}){const s=ym(t);return i.children.forEach(o=>{(function iX(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 rX(i,t,e){if("function"==typeof e)return e(i,t);switch(e){case"pathParamsChange":return!kh(i.url,t.url);case"pathParamsOrQueryParamsChange":return!kh(i.url,t.url)||!Kl(i.queryParams,t.queryParams);case"always":return!0;case"paramsOrQueryParamsChange":return!mI(i,t)||!Kl(i.queryParams,t.queryParams);default:return!mI(i,t)}}(o,s,s.routeConfig.runGuardsAndResolvers);l?r.canActivateChecks.push(new T3(n)):(s.data=o.data,s._resolvedData=o._resolvedData),Ny(i,t,s.component?a?a.children:null:e,n,r),l&&a&&a.outlet&&a.outlet.isActivated&&r.canDeactivateChecks.push(new xM(a.outlet.component,o))}else o&&By(t,a,r),r.canActivateChecks.push(new T3(n)),Ny(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]}),os(s,(o,a)=>By(o,e.getContext(a),r)),r}function By(i,t,e){const n=ym(i),r=i.value;os(n,(s,o)=>{By(s,r.component?t?t.children.getContext(o):null:t,e)}),e.canDeactivateChecks.push(new xM(r.component&&t&&t.outlet&&t.outlet.isActivated?t.outlet.component:null,r))}function Uy(i){return"function"==typeof i}function bI(i){return i instanceof fm||"EmptyError"===i?.name}const wM=Symbol("INITIAL_VALUE");function wm(){return ks(i=>Ra(i.map(t=>t.pipe(Oi(1),Do(wM)))).pipe(tt(t=>{for(const e of t)if(!0!==e){if(e===wM)return wM;if(!1===e||e instanceof au)return e}return!0}),gn(t=>t!==wM),Oi(1)))}function I3(i){return function CE(...i){return l0(i)}(Vi(t=>{if(Ph(t))throw w3(0,t)}),tt(t=>!0===t))}const xI={matched:!1,consumedSegments:[],remainingSegments:[],parameters:{},positionalParamSegments:{}};function R3(i,t,e,n,r){const s=wI(i,t,e);return s.matched?function xX(i,t,e,n){const r=t.canMatch;return r&&0!==r.length?mt(r.map(o=>{const a=xm(o,i);return ou(function dX(i){return i&&Uy(i.canMatch)}(a)?a.canMatch(t,e):i.runInContext(()=>a(t,e)))})).pipe(wm(),I3()):mt(!0)}(n=A3(t,n),t,e).pipe(tt(o=>!0===o?s:{...xI})):mt(s)}function wI(i,t,e){if(""===t.path)return"full"===t.pathMatch&&(i.hasChildren()||e.length>0)?{...xI}:{matched:!0,consumedSegments:[],remainingSegments:e,parameters:{},positionalParamSegments:{}};const r=(t.matcher||nq)(e,i,t);if(!r)return{...xI};const s={};os(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 MM(i,t,e,n){if(e.length>0&&function CX(i,t,e){return e.some(n=>CM(i,t,n)&&ka(n)!==_n)}(i,e,n)){const s=new Tn(t,function MX(i,t,e,n){const r={};r[_n]=n,n._sourceSegment=i,n._segmentIndexShift=t.length;for(const s of e)if(""===s.path&&ka(s)!==_n){const o=new Tn([],{});o._sourceSegment=i,o._segmentIndexShift=t.length,r[ka(s)]=o}return r}(i,t,n,new Tn(e,i.children)));return s._sourceSegment=i,s._segmentIndexShift=t.length,{segmentGroup:s,slicedSegments:[]}}if(0===e.length&&function SX(i,t,e){return e.some(n=>CM(i,t,n))}(i,e,n)){const s=new Tn(i.segments,function wX(i,t,e,n,r){const s={};for(const o of n)if(CM(i,e,o)&&!r[ka(o)]){const a=new Tn([],{});a._sourceSegment=i,a._segmentIndexShift=t.length,s[ka(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 Tn(i.segments,i.children);return r._sourceSegment=i,r._segmentIndexShift=t.length,{segmentGroup:r,slicedSegments:e}}function CM(i,t,e){return(!(i.hasChildren()||t.length>0)||"full"!==e.pathMatch)&&""===e.path}function k3(i,t,e,n){return!!(ka(i)===n||n!==_n&&CM(t,e,i))&&("**"===i.path||wI(t,i,e).matched)}function P3(i,t,e){return 0===t.length&&!i.children[e]}const SM=!1;class EM{constructor(t){this.segmentGroup=t||null}}class O3{constructor(t){this.urlTree=t}}function Vy(i){return pm(new EM(i))}function F3(i){return pm(new O3(i))}class TX{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=MM(this.urlTree.root,[],[],this.config).segmentGroup,e=new Tn(t.segments,t.children);return this.expandSegmentGroup(this.injector,this.config,e,_n).pipe(tt(s=>this.createUrlTree(gM(s),this.urlTree.queryParams,this.urlTree.fragment))).pipe(jc(s=>{if(s instanceof O3)return this.allowRedirects=!1,this.match(s.urlTree);throw s instanceof EM?this.noMatchError(s):s}))}match(t){return this.expandSegmentGroup(this.injector,this.config,t.root,_n).pipe(tt(r=>this.createUrlTree(gM(r),t.queryParams,t.fragment))).pipe(jc(r=>{throw r instanceof EM?this.noMatchError(r):r}))}noMatchError(t){return new pe(4002,SM)}createUrlTree(t,e,n){const r=sI(t);return new au(r,e,n)}expandSegmentGroup(t,e,n,r){return 0===n.segments.length&&n.hasChildren()?this.expandChildren(t,e,n).pipe(tt(s=>new Tn([],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 Ni(r).pipe(ru(s=>{const o=n.children[s],a=D3(e,s);return this.expandSegmentGroup(t,a,o,s).pipe(tt(l=>({segment:l,outlet:s})))}),tI((s,o)=>(s[o.outlet]=o.segment,s),{}),jB())}expandSegment(t,e,n,r,s,o){return Ni(n).pipe(ru(a=>this.expandSegmentAgainstRoute(t,e,n,a,r,s,o).pipe(jc(c=>{if(c instanceof EM)return mt(null);throw c}))),iu(a=>!!a),jc((a,l)=>{if(bI(a))return P3(e,r,s)?mt(new Tn([],{})):Vy(e);throw a}))}expandSegmentAgainstRoute(t,e,n,r,s,o,a){return k3(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):Vy(e):Vy(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("/")?F3(s):this.lineralizeSegments(n,s).pipe(rr(o=>{const a=new Tn(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:d}=wI(e,r,s);if(!a)return Vy(e);const h=this.applyRedirectCommands(l,r.redirectTo,d);return r.redirectTo.startsWith("/")?F3(h):this.lineralizeSegments(r,h).pipe(rr(p=>this.expandSegment(t,e,n,p.concat(c),o,!1)))}matchSegmentAgainstRoute(t,e,n,r,s){return"**"===n.path?(t=A3(n,t),n.loadChildren?(n._loadedRoutes?mt({routes:n._loadedRoutes,injector:n._loadedInjector}):this.configLoader.loadChildren(t,n)).pipe(tt(a=>(n._loadedRoutes=a.routes,n._loadedInjector=a.injector,new Tn(r,{})))):mt(new Tn(r,{}))):R3(e,n,r,t).pipe(ks(({matched:o,consumedSegments:a,remainingSegments:l})=>o?this.getChildConfig(t=n._injector??t,n,r).pipe(rr(d=>{const h=d.injector??t,p=d.routes,{segmentGroup:m,slicedSegments:g}=MM(e,a,l,p),b=new Tn(m.segments,m.children);if(0===g.length&&b.hasChildren())return this.expandChildren(h,p,b).pipe(tt(x=>new Tn(a,x)));if(0===p.length&&0===g.length)return mt(new Tn(a,{}));const v=ka(n)===s;return this.expandSegment(h,b,p,g,v?_n:s,!0).pipe(tt(M=>new Tn(a.concat(M.segments),M.children)))})):Vy(e)))}getChildConfig(t,e,n){return e.children?mt({routes:e.children,injector:t}):e.loadChildren?void 0!==e._loadedRoutes?mt({routes:e._loadedRoutes,injector:e._loadedInjector}):function bX(i,t,e,n){const r=t.canLoad;return void 0===r||0===r.length?mt(!0):mt(r.map(o=>{const a=xm(o,i);return ou(function oX(i){return i&&Uy(i.canLoad)}(a)?a.canLoad(t,e):i.runInContext(()=>a(t,e)))})).pipe(wm(),I3())}(t,e,n).pipe(rr(r=>r?this.configLoader.loadChildren(t,e).pipe(Vi(s=>{e._loadedRoutes=s.routes,e._loadedInjector=s.injector})):function AX(i){return pm(M3(SM,3))}())):mt({routes:[],injector:t})}lineralizeSegments(t,e){let n=[],r=e.root;for(;;){if(n=n.concat(r.segments),0===r.numberOfChildren)return mt(n);if(r.numberOfChildren>1||!r.children[_n])return t.redirectTo,pm(new pe(4e3,SM));r=r.children[_n]}}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 au(s,this.createQueryParams(e.queryParams,this.urlTree.queryParams),e.fragment)}createQueryParams(t,e){const n={};return os(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 os(e.children,(a,l)=>{o[l]=this.createSegmentGroup(t,a,n,r)}),new Tn(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 pe(4001,SM);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 RX{}class OX{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=MM(this.urlTree.root,[],[],this.config.filter(e=>void 0===e.redirectTo)).segmentGroup;return this.processSegmentGroup(this.injector,this.config,t,_n).pipe(tt(e=>{if(null===e)return null;const n=new yM([],Object.freeze({}),Object.freeze({...this.urlTree.queryParams}),this.urlTree.fragment,{},_n,this.rootComponentType,null,this.urlTree.root,-1,{}),r=new Yc(n,e),s=new b3(this.url,r);return this.inheritParamsAndData(s._root),s}))}inheritParamsAndData(t){const e=t.value,n=y3(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 Ni(Object.keys(n.children)).pipe(ru(r=>{const s=n.children[r],o=D3(e,r);return this.processSegmentGroup(t,o,s,r)}),tI((r,s)=>r&&s?(r.push(...s),r):null),YB(r=>null!==r),cM(null),jB(),tt(r=>{if(null===r)return null;const s=N3(r);return function FX(i){i.sort((t,e)=>t.value.outlet===_n?-1:e.value.outlet===_n?1:t.value.outlet.localeCompare(e.value.outlet))}(s),s}))}processSegment(t,e,n,r,s){return Ni(e).pipe(ru(o=>this.processSegmentAgainstRoute(o._injector??t,o,n,r,s)),iu(o=>!!o),jc(o=>{if(bI(o))return P3(n,r,s)?mt([]):mt(null);throw o}))}processSegmentAgainstRoute(t,e,n,r,s){if(e.redirectTo||!k3(e,n,r,s))return mt(null);let o;if("**"===e.path){const a=r.length>0?ZB(r).parameters:{},l=U3(n)+r.length;o=mt({snapshot:new yM(r,a,Object.freeze({...this.urlTree.queryParams}),this.urlTree.fragment,V3(e),ka(e),e.component??e._loadedComponent??null,e,B3(n),l,z3(e)),consumedSegments:[],remainingSegments:[]})}else o=R3(n,e,r,t).pipe(tt(({matched:a,consumedSegments:l,remainingSegments:c,parameters:d})=>{if(!a)return null;const h=U3(n)+l.length;return{snapshot:new yM(l,d,Object.freeze({...this.urlTree.queryParams}),this.urlTree.fragment,V3(e),ka(e),e.component??e._loadedComponent??null,e,B3(n),h,z3(e)),consumedSegments:l,remainingSegments:c}}));return o.pipe(ks(a=>{if(null===a)return mt(null);const{snapshot:l,consumedSegments:c,remainingSegments:d}=a;t=e._injector??t;const h=e._loadedInjector??t,p=function LX(i){return i.children?i.children:i.loadChildren?i._loadedRoutes:[]}(e),{segmentGroup:m,slicedSegments:g}=MM(n,c,d,p.filter(v=>void 0===v.redirectTo));if(0===g.length&&m.hasChildren())return this.processChildren(h,p,m).pipe(tt(v=>null===v?null:[new Yc(l,v)]));if(0===p.length&&0===g.length)return mt([new Yc(l,[])]);const b=ka(e)===s;return this.processSegment(h,p,m,g,b?_n:s).pipe(tt(v=>null===v?null:[new Yc(l,v)]))}))}}function NX(i){const t=i.value.routeConfig;return t&&""===t.path&&void 0===t.redirectTo}function N3(i){const t=[],e=new Set;for(const n of i){if(!NX(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=N3(n.children);t.push(new Yc(n.value,r))}return t.filter(n=>!e.has(n))}function B3(i){let t=i;for(;t._sourceSegment;)t=t._sourceSegment;return t}function U3(i){let t=i,e=t._segmentIndexShift??0;for(;t._sourceSegment;)t=t._sourceSegment,e+=t._segmentIndexShift??0;return e-1}function V3(i){return i.data||{}}function z3(i){return i.resolve||{}}function H3(i){return"string"==typeof i.title||null===i.title}function MI(i){return ks(t=>{const e=i(t);return e?Ni(e).pipe(tt(()=>t)):mt(t)})}const Mm=new me("ROUTES");let CI=(()=>{class i{constructor(){this.componentLoaders=new WeakMap,this.childrenLoaders=new WeakMap,this.compiler=Lt(gN)}loadComponent(e){if(this.componentLoaders.get(e))return this.componentLoaders.get(e);if(e._loadedComponent)return mt(e._loadedComponent);this.onLoadStartListener&&this.onLoadStartListener(e);const n=ou(e.loadComponent()).pipe(tt(G3),Vi(s=>{this.onLoadEndListener&&this.onLoadEndListener(e),e._loadedComponent=s}),su(()=>{this.componentLoaders.delete(e)})),r=new GB(n,()=>new Te).pipe(eI());return this.componentLoaders.set(e,r),r}loadChildren(e,n){if(this.childrenLoaders.get(n))return this.childrenLoaders.get(n);if(n._loadedRoutes)return mt({routes:n._loadedRoutes,injector:n._loadedInjector});this.onLoadStartListener&&this.onLoadStartListener(n);const s=this.loadModuleFactoryOrRoutes(n.loadChildren).pipe(tt(a=>{this.onLoadEndListener&&this.onLoadEndListener(n);let l,c,d=!1;Array.isArray(a)?c=a:(l=a.create(e).injector,c=KB(l.get(Mm,[],Ft.Self|Ft.Optional)));return{routes:c.map(yI),injector:l}}),su(()=>{this.childrenLoaders.delete(n)})),o=new GB(s,()=>new Te).pipe(eI());return this.childrenLoaders.set(n,o),o}loadModuleFactoryOrRoutes(e){return ou(e()).pipe(tt(G3),rr(n=>n instanceof T2||Array.isArray(n)?mt(n):Ni(this.compiler.compileModuleAsync(n))))}}return i.\u0275fac=function(e){return new(e||i)},i.\u0275prov=Pe({token:i,factory:i.\u0275fac,providedIn:"root"}),i})();function G3(i){return function WX(i){return i&&"object"==typeof i&&"default"in i}(i)?i.default:i}let DM=(()=>{class i{get hasRequestedNavigation(){return 0!==this.navigationId}constructor(){this.currentNavigation=null,this.lastSuccessfulNavigation=null,this.events=new Te,this.configLoader=Lt(CI),this.environmentInjector=Lt(io),this.urlSerializer=Lt(Ty),this.rootContexts=Lt(Fy),this.navigationId=0,this.afterPreactivation=()=>mt(void 0),this.rootComponentType=null,this.configLoader.onLoadEndListener=r=>this.events.next(new kq(r)),this.configLoader.onLoadStartListener=r=>this.events.next(new Rq(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 Qe({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:Py,restoredState:null,currentSnapshot:e.routerState.snapshot,targetSnapshot:null,currentRouterState:e.routerState,targetRouterState:null,guards:{canActivateChecks:[],canDeactivateChecks:[]},guardsResult:null}),this.transitions.pipe(gn(n=>0!==n.id),tt(n=>({...n,extractedUrl:e.urlHandlingStrategy.extract(n.rawUrl)})),ks(n=>{let r=!1,s=!1;return mt(n).pipe(Vi(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}}),ks(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 d="";return this.events.next(new vM(o.id,e.serializeUrl(n.rawUrl),d,0)),e.rawUrlTree=o.rawUrl,o.resolve(null),_o}if(e.urlHandlingStrategy.shouldProcessUrl(o.rawUrl))return W3(o.source)&&(e.browserUrlTree=o.extractedUrl),mt(o).pipe(ks(d=>{const h=this.transitions?.getValue();return this.events.next(new cI(d.id,this.urlSerializer.serialize(d.extractedUrl),d.source,d.restoredState)),h!==this.transitions?.getValue()?_o:Promise.resolve(d)}),function IX(i,t,e,n){return ks(r=>function DX(i,t,e,n,r){return new TX(i,t,e,n,r).apply()}(i,t,e,r.extractedUrl,n).pipe(tt(s=>({...r,urlAfterRedirects:s}))))}(this.environmentInjector,this.configLoader,this.urlSerializer,e.config),Vi(d=>{this.currentNavigation={...this.currentNavigation,finalUrl:d.urlAfterRedirects},n.urlAfterRedirects=d.urlAfterRedirects}),function UX(i,t,e,n,r){return rr(s=>function PX(i,t,e,n,r,s,o="emptyOnly"){return new OX(i,t,e,n,r,o,s).recognize().pipe(ks(a=>null===a?function kX(i){return new In(t=>t.error(i))}(new RX):mt(a)))}(i,t,e,s.urlAfterRedirects,n.serialize(s.urlAfterRedirects),n,r).pipe(tt(o=>({...s,targetSnapshot:o}))))}(this.environmentInjector,this.rootComponentType,e.config,this.urlSerializer,e.paramsInheritanceStrategy),Vi(d=>{if(n.targetSnapshot=d.targetSnapshot,"eager"===e.urlUpdateStrategy){if(!d.extras.skipLocationChange){const p=e.urlHandlingStrategy.merge(d.urlAfterRedirects,d.rawUrl);e.setBrowserUrl(p,d)}e.browserUrlTree=d.urlAfterRedirects}const h=new Eq(d.id,this.urlSerializer.serialize(d.extractedUrl),this.urlSerializer.serialize(d.urlAfterRedirects),d.targetSnapshot);this.events.next(h)}));if(l&&e.urlHandlingStrategy.shouldProcessUrl(e.rawUrlTree)){const{id:d,extractedUrl:h,source:p,restoredState:m,extras:g}=o,b=new cI(d,this.urlSerializer.serialize(h),p,m);this.events.next(b);const v=v3(h,this.rootComponentType).snapshot;return mt(n={...o,targetSnapshot:v,urlAfterRedirects:h,extras:{...g,skipLocationChange:!1,replaceUrl:!1}})}{const d="";return this.events.next(new vM(o.id,e.serializeUrl(n.extractedUrl),d,1)),e.rawUrlTree=o.rawUrl,o.resolve(null),_o}}),Vi(o=>{const a=new Aq(o.id,this.urlSerializer.serialize(o.extractedUrl),this.urlSerializer.serialize(o.urlAfterRedirects),o.targetSnapshot);this.events.next(a)}),tt(o=>n={...o,guards:tX(o.targetSnapshot,o.currentSnapshot,this.rootContexts)}),function hX(i,t){return rr(e=>{const{targetSnapshot:n,currentSnapshot:r,guards:{canActivateChecks:s,canDeactivateChecks:o}}=e;return 0===o.length&&0===s.length?mt({...e,guardsResult:!0}):function fX(i,t,e,n){return Ni(i).pipe(rr(r=>function yX(i,t,e,n,r){const s=t&&t.routeConfig?t.routeConfig.canDeactivate:null;return s&&0!==s.length?mt(s.map(a=>{const l=Ly(t)??r,c=xm(a,l);return ou(function cX(i){return i&&Uy(i.canDeactivate)}(c)?c.canDeactivate(i,t,e,n):l.runInContext(()=>c(i,t,e,n))).pipe(iu())})).pipe(wm()):mt(!0)}(r.component,r.route,e,t,n)),iu(r=>!0!==r,!0))}(o,n,r,i).pipe(rr(a=>a&&function sX(i){return"boolean"==typeof i}(a)?function pX(i,t,e,n){return Ni(t).pipe(ru(r=>Sy(function gX(i,t){return null!==i&&t&&t(new Pq(i)),mt(!0)}(r.route.parent,n),function mX(i,t){return null!==i&&t&&t(new Fq(i)),mt(!0)}(r.route,n),function vX(i,t,e){const n=t[t.length-1],s=t.slice(0,t.length-1).reverse().map(o=>function nX(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=>Ey(()=>mt(o.guards.map(l=>{const c=Ly(o.node)??e,d=xm(l,c);return ou(function lX(i){return i&&Uy(i.canActivateChild)}(d)?d.canActivateChild(n,i):c.runInContext(()=>d(n,i))).pipe(iu())})).pipe(wm())));return mt(s).pipe(wm())}(i,r.path,e),function _X(i,t,e){const n=t.routeConfig?t.routeConfig.canActivate:null;if(!n||0===n.length)return mt(!0);const r=n.map(s=>Ey(()=>{const o=Ly(t)??e,a=xm(s,o);return ou(function aX(i){return i&&Uy(i.canActivate)}(a)?a.canActivate(t,i):o.runInContext(()=>a(t,i))).pipe(iu())}));return mt(r).pipe(wm())}(i,r.route,e))),iu(r=>!0!==r,!0))}(n,s,i,t):mt(a)),tt(a=>({...e,guardsResult:a})))})}(this.environmentInjector,o=>this.events.next(o)),Vi(o=>{if(n.guardsResult=o.guardsResult,Ph(o.guardsResult))throw w3(0,o.guardsResult);const a=new Dq(o.id,this.urlSerializer.serialize(o.extractedUrl),this.urlSerializer.serialize(o.urlAfterRedirects),o.targetSnapshot,!!o.guardsResult);this.events.next(a)}),gn(o=>!!o.guardsResult||(e.restoreHistory(o),this.cancelNavigationTransition(o,"",3),!1)),MI(o=>{if(o.guards.canActivateChecks.length)return mt(o).pipe(Vi(a=>{const l=new Tq(a.id,this.urlSerializer.serialize(a.extractedUrl),this.urlSerializer.serialize(a.urlAfterRedirects),a.targetSnapshot);this.events.next(l)}),ks(a=>{let l=!1;return mt(a).pipe(function VX(i,t){return rr(e=>{const{targetSnapshot:n,guards:{canActivateChecks:r}}=e;if(!r.length)return mt(e);let s=0;return Ni(r).pipe(ru(o=>function zX(i,t,e,n){const r=i.routeConfig,s=i._resolve;return void 0!==r?.title&&!H3(r)&&(s[Ay]=r.title),function HX(i,t,e,n){const r=function $X(i){return[...Object.keys(i),...Object.getOwnPropertySymbols(i)]}(i);if(0===r.length)return mt({});const s={};return Ni(r).pipe(rr(o=>function GX(i,t,e,n){const r=Ly(t)??n,s=xm(i,r);return ou(s.resolve?s.resolve(t,e):r.runInContext(()=>s(t,e)))}(i[o],t,e,n).pipe(iu(),Vi(a=>{s[o]=a}))),nI(1),qB(s),jc(o=>bI(o)?_o:pm(o)))}(s,i,t,n).pipe(tt(o=>(i._resolvedData=o,i.data=y3(i,e).resolve,r&&H3(r)&&(i.data[Ay]=r.title),null)))}(o.route,n,i,t)),Vi(()=>s++),nI(1),rr(o=>s===r.length?mt(e):_o))})}(e.paramsInheritanceStrategy,this.environmentInjector),Vi({next:()=>l=!0,complete:()=>{l||(e.restoreHistory(a),this.cancelNavigationTransition(a,"",2))}}))}),Vi(a=>{const l=new Iq(a.id,this.urlSerializer.serialize(a.extractedUrl),this.urlSerializer.serialize(a.urlAfterRedirects),a.targetSnapshot);this.events.next(l)}))}),MI(o=>{const a=l=>{const c=[];l.routeConfig?.loadComponent&&!l.routeConfig._loadedComponent&&c.push(this.configLoader.loadComponent(l.routeConfig).pipe(Vi(d=>{l.component=d}),tt(()=>{})));for(const d of l.children)c.push(...a(d));return c};return Ra(a(o.targetSnapshot.root)).pipe(cM(),Oi(1))}),MI(()=>this.afterPreactivation()),tt(o=>{const a=function Gq(i,t,e){const n=Oy(i,t._root,e?e._root:void 0);return new _3(n,t)}(e.routeReuseStrategy,o.targetSnapshot,o.currentRouterState);return n={...o,targetRouterState:a}}),Vi(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)=>tt(n=>(new eX(t,n.targetRouterState,n.currentRouterState,e).activate(i),n)))(this.rootContexts,e.routeReuseStrategy,o=>this.events.next(o)),Oi(1),Vi({next:o=>{r=!0,this.lastSuccessfulNavigation=this.currentNavigation,e.navigated=!0,this.events.next(new Oh(o.id,this.urlSerializer.serialize(o.extractedUrl),this.urlSerializer.serialize(e.currentUrlTree))),e.titleStrategy?.updateTitle(o.targetRouterState.snapshot),o.resolve(!0)},complete:()=>{r=!0}}),su(()=>{r||s||this.cancelNavigationTransition(n,"",1),this.currentNavigation?.id===n.id&&(this.currentNavigation=null)}),jc(o=>{if(s=!0,S3(o)){C3(o)||(e.navigated=!0,e.restoreHistory(n,!0));const a=new _M(n.id,this.urlSerializer.serialize(n.extractedUrl),o.message,o.cancellationCode);if(this.events.next(a),C3(o)){const l=e.urlHandlingStrategy.merge(o.url,e.rawUrlTree),c={skipLocationChange:n.extras.skipLocationChange,replaceUrl:"eager"===e.urlUpdateStrategy||W3(n.source)};e.scheduleNavigation(l,Py,null,c,{resolve:n.resolve,reject:n.reject,promise:n.promise})}else n.resolve(!1)}else{e.restoreHistory(n,!0);const a=new dI(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 _o}))}))}cancelNavigationTransition(e,n,r){const s=new _M(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=Pe({token:i,factory:i.\u0275fac,providedIn:"root"}),i})();function W3(i){return i!==Py}let j3=(()=>{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===_n);return n}getResolvedTitleForRoute(e){return e.data[Ay]}}return i.\u0275fac=function(e){return new(e||i)},i.\u0275prov=Pe({token:i,factory:function(){return Lt(jX)},providedIn:"root"}),i})(),jX=(()=>{class i extends j3{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)(ee(NB))},i.\u0275prov=Pe({token:i,factory:i.\u0275fac,providedIn:"root"}),i})(),YX=(()=>{class i{}return i.\u0275fac=function(e){return new(e||i)},i.\u0275prov=Pe({token:i,factory:function(){return Lt(XX)},providedIn:"root"}),i})();class qX{shouldDetach(t){return!1}store(t,e){}shouldAttach(t){return!1}retrieve(t){return null}shouldReuseRoute(t,e){return t.routeConfig===e.routeConfig}}let XX=(()=>{class i extends qX{}return i.\u0275fac=function(){let t;return function(n){return(t||(t=si(i)))(n||i)}}(),i.\u0275prov=Pe({token:i,factory:i.\u0275fac,providedIn:"root"}),i})();const TM=new me("",{providedIn:"root",factory:()=>({})});let ZX=(()=>{class i{}return i.\u0275fac=function(e){return new(e||i)},i.\u0275prov=Pe({token:i,factory:function(){return Lt(QX)},providedIn:"root"}),i})(),QX=(()=>{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=Pe({token:i,factory:i.\u0275fac,providedIn:"root"}),i})();function JX(i){throw i}function eK(i,t,e){return t.parse("/")}const tK={paths:"exact",fragment:"ignored",matrixParams:"ignored",queryParams:"exact"},nK={paths:"subset",fragment:"ignored",matrixParams:"ignored",queryParams:"subset"};let Ko=(()=>{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=Lt(L6),this.isNgZoneEnabled=!1,this.options=Lt(TM,{optional:!0})||{},this.errorHandler=this.options.errorHandler||JX,this.malformedUriErrorHandler=this.options.malformedUriErrorHandler||eK,this.navigated=!1,this.lastSuccessfulId=-1,this.urlHandlingStrategy=Lt(ZX),this.routeReuseStrategy=Lt(YX),this.urlCreationStrategy=Lt(zq),this.titleStrategy=Lt(j3),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=KB(Lt(Mm,{optional:!0})??[]),this.navigationTransitions=Lt(DM),this.urlSerializer=Lt(Ty),this.location=Lt(_y),this.isNgZoneEnabled=Lt(gt)instanceof gt&>.isInAngularZone(),this.resetConfig(this.config),this.currentUrlTree=new au,this.rawUrlTree=this.currentUrlTree,this.browserUrlTree=this.currentUrlTree,this.routerState=v3(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),Py,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(yI),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 d=null;switch(a){case"merge":d={...this.currentUrlTree.queryParams,...s};break;case"preserve":d=this.currentUrlTree.queryParams;break;default:d=s||null}return null!==d&&(d=this.removeEmptyProps(d)),this.urlCreationStrategy.createUrlTree(r,this.routerState,this.currentUrlTree,e,d,c??null)}navigateByUrl(e,n={skipLocationChange:!1}){const r=Ph(e)?e:this.parseUrl(e),s=this.urlHandlingStrategy.merge(r,this.rawUrlTree);return this.scheduleNavigation(s,Py,null,n)}navigate(e,n={skipLocationChange:!1}){return function iK(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,d;return o?(a=o.resolve,l=o.reject,c=o.promise):c=new Promise((h,p)=>{a=h,l=p}),d="computed"===this.canceledNavigationResolution?r&&r.\u0275routerPageId?r.\u0275routerPageId:(this.browserPageId??0)+1:0,this.navigationTransitions.handleNavigationRequest({targetPageId:d,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=Pe({token:i,factory:i.\u0275fac,providedIn:"root"}),i})();class Y3{}let oK=(()=>{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(gn(e=>e instanceof Oh),ru(()=>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=Lw(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 Ni(r).pipe(bd())}preloadConfig(e,n){return this.preloadingStrategy.preload(n,()=>{let r;r=n.loadChildren&&void 0===n.canLoad?this.loader.loadChildren(e,n):mt(null);const s=r.pipe(rr(o=>null===o?mt(void 0):(n._loadedRoutes=o.routes,n._loadedInjector=o.injector,this.processRoutes(o.injector??e,o.routes))));return n.loadComponent&&!n._loadedComponent?Ni([s,this.loader.loadComponent(n)]).pipe(bd()):s})}}return i.\u0275fac=function(e){return new(e||i)(ee(Ko),ee(gN),ee(io),ee(Y3),ee(CI))},i.\u0275prov=Pe({token:i,factory:i.\u0275fac,providedIn:"root"}),i})();const AI=new me("");let q3=(()=>{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 cI?(this.store[this.lastId]=this.viewportScroller.getScrollPosition(),this.lastSource=e.navigationTrigger,this.restoredId=e.restoredState?e.restoredState.navigationId:0):e instanceof Oh&&(this.lastId=e.id,this.scheduleScrollEvent(e,this.urlSerializer.parse(e.urlAfterRedirects).fragment))})}consumeScrollEvents(){return this.transitions.events.subscribe(e=>{e instanceof m3&&(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 m3(e,"popstate"===this.lastSource?this.store[this.restoredId]:null,n))})},0)})}ngOnDestroy(){this.routerEventsSubscription?.unsubscribe(),this.scrollEventsSubscription?.unsubscribe()}}return i.\u0275fac=function(e){Co()},i.\u0275prov=Pe({token:i,factory:i.\u0275fac}),i})();var Zo=(()=>((Zo=Zo||{})[Zo.COMPLETE=0]="COMPLETE",Zo[Zo.FAILED=1]="FAILED",Zo[Zo.REDIRECTING=2]="REDIRECTING",Zo))();const Cm=!1;function lu(i,t){return{\u0275kind:i,\u0275providers:t}}const DI=new me("",{providedIn:"root",factory:()=>!1});function K3(){const i=Lt(Gi);return t=>{const e=i.get(dm);if(t!==e.components[0])return;const n=i.get(Ko),r=i.get(Z3);1===i.get(TI)&&n.initialNavigation(),i.get(Q3,null,Ft.Optional)?.setUpPreloading(),i.get(AI,null,Ft.Optional)?.init(),n.resetRootComponentType(e.componentTypes[0]),r.closed||(r.next(),r.complete(),r.unsubscribe())}}const Z3=new me(Cm?"bootstrap done indicator":"",{factory:()=>new Te}),TI=new me(Cm?"initial navigation":"",{providedIn:"root",factory:()=>1});function uK(){let i=[];return i=Cm?[{provide:Bp,multi:!0,useFactory:()=>{const t=Lt(Ko);return()=>t.events.subscribe(e=>{console.group?.(`Router Event: ${e.constructor.name}`),console.log(function Nq(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?.()})}}]:[],lu(1,i)}const Q3=new me(Cm?"router preloader":"");function hK(i){return lu(0,[{provide:Q3,useExisting:oK},{provide:Y3,useExisting:i}])}const zy=!1,J3=new me(zy?"router duplicate forRoot guard":"ROUTER_FORROOT_GUARD"),fK=[_y,{provide:Ty,useClass:iI},Ko,Fy,{provide:bm,useFactory:function X3(i){return i.routerState.root},deps:[Ko]},CI,zy?{provide:DI,useValue:!0}:[]];function pK(){return new CN("Router",Ko)}let eU=(()=>{class i{constructor(e){}static forRoot(e,n){return{ngModule:i,providers:[fK,zy&&n?.enableTracing?uK().\u0275providers:[],{provide:Mm,multi:!0,useValue:e},{provide:J3,useFactory:vK,deps:[[Ko,new Ss,new Ca]]},{provide:TM,useValue:n||{}},n?.useHash?{provide:Rh,useClass:C9}:{provide:Rh,useClass:YN},{provide:AI,useFactory:()=>{const i=Lt(UY),t=Lt(gt),e=Lt(TM),n=Lt(DM),r=Lt(Ty);return e.scrollOffset&&i.setOffset(e.scrollOffset),new q3(r,n,i,t,e)}},n?.preloadingStrategy?hK(n.preloadingStrategy).\u0275providers:[],{provide:CN,multi:!0,useFactory:pK},n?.initialNavigation?yK(n):[],[{provide:tU,useFactory:K3},{provide:MN,multi:!0,useExisting:tU}]]}}static forChild(e){return{ngModule:i,providers:[{provide:Mm,multi:!0,useValue:e}]}}}return i.\u0275fac=function(e){return new(e||i)(ee(J3,8))},i.\u0275mod=en({type:i}),i.\u0275inj=Wt({imports:[_I]}),i})();function vK(i){if(zy&&i)throw new pe(4007,"The Router was provided more than once. This can happen if 'forRoot' is used outside of the root injector. Lazy loaded modules should use RouterModule.forChild() instead.");return"guarded"}function yK(i){return["disabled"===i.initialNavigation?lu(3,[{provide:Vw,multi:!0,useFactory:()=>{const t=Lt(Ko);return()=>{t.setUpLocationChangeListener()}}},{provide:TI,useValue:2}]).\u0275providers:[],"enabledBlocking"===i.initialNavigation?lu(2,[{provide:TI,useValue:0},{provide:Vw,multi:!0,deps:[Gi],useFactory:t=>{const e=t.get(w9,Promise.resolve());return()=>e.then(()=>new Promise(n=>{const r=t.get(Ko),s=t.get(Z3);(function aK(i,t){i.events.pipe(gn(e=>e instanceof Oh||e instanceof _M||e instanceof dI||e instanceof vM),tt(e=>e instanceof Oh||e instanceof vM?Zo.COMPLETE:e instanceof _M&&(0===e.code||1===e.code)?Zo.REDIRECTING:Zo.FAILED),gn(e=>e!==Zo.REDIRECTING),Oi(1)).subscribe(()=>{t()})})(r,()=>{n(!0)}),t.get(DM).afterPreactivation=()=>(n(!0),s.closed?mt(void 0):s),r.initialNavigation()}))}}]).\u0275providers:[]]}const tU=new me(zy?"Router Initializer":""),xK=[];let wK=(()=>{class i{}return i.\u0275fac=function(e){return new(e||i)},i.\u0275mod=en({type:i}),i.\u0275inj=Wt({imports:[eU.forRoot(xK),eU]}),i})();function nU(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 nt(i){return function(){var t=this,e=arguments;return new Promise(function(n,r){var s=i.apply(t,e);function o(l){nU(s,n,r,o,a,"next",l)}function a(l){nU(s,n,r,o,a,"throw",l)}o(void 0)})}}function tn(i){return null!=i&&"false"!=`${i}`}function Ps(i,t=0){return function MK(i){return!isNaN(parseFloat(i))&&!isNaN(Number(i))}(i)?Number(i):t}function IM(i){return Array.isArray(i)?i:[i]}function _r(i){return null==i?"":"string"==typeof i?i:`${i}px`}function qc(i){return i instanceof vt?i.nativeElement:i}const CK=["addListener","removeListener"],SK=["addEventListener","removeEventListener"],EK=["on","off"];function To(i,t,e,n){if(dn(e)&&(n=e,e=void 0),n)return To(i,t,e).pipe(JT(n));const[r,s]=function TK(i){return dn(i.addEventListener)&&dn(i.removeEventListener)}(i)?SK.map(o=>a=>i[o](t,a,e)):function AK(i){return dn(i.addListener)&&dn(i.removeListener)}(i)?CK.map(iU(i,t)):function DK(i){return dn(i.on)&&dn(i.off)}(i)?EK.map(iU(i,t)):[];if(!r&&i_(i))return rr(o=>To(o,t,e))(Mr(i));if(!r)throw new TypeError("Invalid event target");return new In(o=>{const a=(...l)=>o.next(1s(a)})}function iU(i,t){return e=>n=>i[e](t,n)}class IK extends Qt{constructor(t,e){super()}schedule(t,e=0){return this}}const RM={setInterval(i,t,...e){const{delegate:n}=RM;return n?.setInterval?n.setInterval(i,t,...e):setInterval(i,t,...e)},clearInterval(i){const{delegate:t}=RM;return(t?.clearInterval||clearInterval)(i)},delegate:void 0};class II extends IK{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 RM.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&&RM.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,Kr(n,this),null!=t&&(this.id=this.recycleAsyncId(e,t,null)),this.delay=null,super.unsubscribe()}}}const Hy={schedule(i){let t=requestAnimationFrame,e=cancelAnimationFrame;const{delegate:n}=Hy;n&&(t=n.requestAnimationFrame,e=n.cancelAnimationFrame);const r=t(s=>{e=void 0,i(s)});return new Qt(()=>e?.(r))},requestAnimationFrame(...i){const{delegate:t}=Hy;return(t?.requestAnimationFrame||requestAnimationFrame)(...i)},cancelAnimationFrame(...i){const{delegate:t}=Hy;return(t?.cancelAnimationFrame||cancelAnimationFrame)(...i)},delegate:void 0},rU={now:()=>(rU.delegate||Date).now(),delegate:void 0};class $y{constructor(t,e=$y.now){this.schedulerActionCtor=t,this.now=e}schedule(t,e=0,n){return new this.schedulerActionCtor(this,t).schedule(n,e)}}$y.now=rU.now;class RI extends $y{constructor(t,e=$y.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 PK=new class kK extends RI{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 RK extends II{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=Hy.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&&(Hy.cancelAnimationFrame(e),t._scheduled=void 0)}});let kI,OK=1;const kM={};function sU(i){return i in kM&&(delete kM[i],!0)}const FK={setImmediate(i){const t=OK++;return kM[t]=!0,kI||(kI=Promise.resolve()),kI.then(()=>sU(t)&&i()),t},clearImmediate(i){sU(i)}},{setImmediate:LK,clearImmediate:NK}=FK,PM={setImmediate(...i){const{delegate:t}=PM;return(t?.setImmediate||LK)(...i)},clearImmediate(i){const{delegate:t}=PM;return(t?.clearImmediate||NK)(i)},delegate:void 0},PI=new class UK extends RI{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 BK extends II{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=PM.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&&(PM.clearImmediate(e),t._scheduled===e&&(t._scheduled=void 0))}}),Gy=new RI(II),VK=Gy;function OI(i=0,t,e=VK){let n=-1;return null!=t&&($u(t)?e=t:n=t),new In(r=>{let s=function HK(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 Wy(i,t=Gy){return function zK(i){return ni((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(qn(e,c=>{n=!0,r=c,s||Mr(i(c)).subscribe(s=qn(e,a,l))},()=>{o=!0,(!n||!s||s.closed)&&e.complete()}))})}(()=>OI(i,t))}function Ue(i){return ni((t,e)=>{Mr(i).subscribe(qn(e,()=>e.complete(),ms)),!e.closed&&t.subscribe(e)})}let FI;try{FI=typeof Intl<"u"&&Intl.v8BreakIterator}catch{FI=!1}let Sm,zi=(()=>{class i{constructor(e){this._platformId=e,this.isBrowser=this._platformId?function BY(i){return i===fB}(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&&!FI)&&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)(ee(fT))},i.\u0275prov=Pe({token:i,factory:i.\u0275fac,providedIn:"root"}),i})();const oU=["color","button","checkbox","date","datetime-local","email","file","hidden","image","month","number","password","radio","range","reset","search","submit","tel","text","time","url","week"];function aU(){if(Sm)return Sm;if("object"!=typeof document||!document)return Sm=new Set(oU),Sm;let i=document.createElement("input");return Sm=new Set(oU.filter(t=>(i.setAttribute("type",t),i.type===t))),Sm}let jy,OM,Lh,LI;function Fh(i){return function $K(){if(null==jy&&typeof window<"u")try{window.addEventListener("test",null,Object.defineProperty({},"passive",{get:()=>jy=!0}))}finally{jy=jy||!1}return jy}()?i:!!i.capture}function lU(){if(null==Lh){if("object"!=typeof document||!document||"function"!=typeof Element||!Element)return Lh=!1,Lh;if("scrollBehavior"in document.documentElement.style)Lh=!0;else{const i=Element.prototype.scrollTo;Lh=!!i&&!/\{\s*\[native code\]\s*\}/.test(i.toString())}}return Lh}function Yy(){if("object"!=typeof document||!document)return 0;if(null==OM){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),OM=0,0===i.scrollLeft&&(i.scrollLeft=1,OM=0===i.scrollLeft?1:2),i.remove()}return OM}function FM(){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 cu(i){return i.composedPath?i.composedPath()[0]:i.target}function NI(){return typeof __karma__<"u"&&!!__karma__||typeof jasmine<"u"&&!!jasmine||typeof jest<"u"&&!!jest||typeof Mocha<"u"&&!!Mocha}const jK=new me("cdk-dir-doc",{providedIn:"root",factory:function YK(){return Lt(qt)}}),qK=/^(ar|ckb|dv|he|iw|fa|nqo|ps|sd|ug|ur|yi|.*[-_](Adlm|Arab|Hebr|Nkoo|Rohg|Thaa))(?!.*[-_](Latn|Cyrl)($|-|_))($|-|_)/i;let Pa=(()=>{class i{constructor(e){this.value="ltr",this.change=new $e,e&&(this.value=function XK(i){const t=i?.toLowerCase()||"";return"auto"===t&&typeof navigator<"u"&&navigator?.language?qK.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)(ee(jK,8))},i.\u0275prov=Pe({token:i,factory:i.\u0275fac,providedIn:"root"}),i})(),qy=(()=>{class i{}return i.\u0275fac=function(e){return new(e||i)},i.\u0275mod=en({type:i}),i.\u0275inj=Wt({}),i})();const KK=["contentWrapper"],ZK=["*"],QK=new me("VIRTUAL_SCROLL_STRATEGY");let Xy=(()=>{class i{constructor(e,n,r){this._ngZone=e,this._platform=n,this._scrolled=new Te,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 In(n=>{this._globalSubscription||this._addGlobalListener();const r=e>0?this._scrolled.pipe(Wy(e)).subscribe(n):this._scrolled.subscribe(n);return this._scrolledCount++,()=>{r.unsubscribe(),this._scrolledCount--,this._scrolledCount||this._removeGlobalListener()}}):mt()}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(gn(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=qc(n),s=e.getElementRef().nativeElement;do{if(r==s)return!0}while(r=r.parentElement);return!1}_addGlobalListener(){this._globalSubscription=this._ngZone.runOutsideAngular(()=>To(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)(ee(gt),ee(zi),ee(qt,8))},i.\u0275prov=Pe({token:i,factory:i.\u0275fac,providedIn:"root"}),i})(),cU=(()=>{class i{constructor(e,n,r,s){this.elementRef=e,this.scrollDispatcher=n,this.ngZone=r,this.dir=s,this._destroyed=new Te,this._elementScrolled=new In(o=>this.ngZone.runOutsideAngular(()=>To(this.elementRef.nativeElement,"scroll").pipe(Ue(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!=Yy()?(null!=e.left&&(e.right=n.scrollWidth-n.clientWidth-e.left),2==Yy()?e.left=e.right:1==Yy()&&(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;lU()?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==Yy()?e==n?s.scrollWidth-s.clientWidth-s.scrollLeft:s.scrollLeft:o&&1==Yy()?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)(E(vt),E(Xy),E(gt),E(Pa,8))},i.\u0275dir=ve({type:i,selectors:[["","cdk-scrollable",""],["","cdkScrollable",""]],standalone:!0}),i})(),LM=(()=>{class i{constructor(e,n,r){this._platform=e,this._change=new Te,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(Wy(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)(ee(zi),ee(gt),ee(qt,8))},i.\u0275prov=Pe({token:i,factory:i.\u0275fac,providedIn:"root"}),i})();const dU=new me("VIRTUAL_SCROLLABLE");let tZ=(()=>{class i extends cU{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)(E(vt),E(Xy),E(gt),E(Pa,8))},i.\u0275dir=ve({type:i,features:[dt]}),i})();const iZ=typeof requestAnimationFrame<"u"?PK:PI;let rZ=(()=>{class i extends tZ{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=tn(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=Lt(zi),this._detachedSubject=new Te,this._renderedRangeSubject=new Te,this._orientation="vertical",this._appendOnly=!1,this.scrolledIndexChange=new In(d=>this._scrollStrategy.scrolledIndexChange.subscribe(h=>Promise.resolve().then(()=>this.ngZone.run(()=>d.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=Qt.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(Do(null),Wy(0,iZ)).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(Ue(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 nZ(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)(E(vt),E(Qn),E(gt),E(QK,8),E(Pa,8),E(Xy),E(LM),E(dU,8))},i.\u0275cmp=ot({type:i,selectors:[["cdk-virtual-scroll-viewport"]],viewQuery:function(e,n){if(1&e&&$n(KK,7),2&e){let r;At(r=Dt())&&(n._contentWrapper=r.first)}},hostAttrs:[1,"cdk-virtual-scroll-viewport"],hostVars:4,hostBindings:function(e,n){2&e&&ln("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:[Dn([{provide:cU,useFactory:(t,e)=>t||e,deps:[[new Ss,new xo(dU)],i]}]),dt,ZD],ngContentSelectors:ZK,decls:4,vars:4,consts:[[1,"cdk-virtual-scroll-content-wrapper"],["contentWrapper",""],[1,"cdk-virtual-scroll-spacer"]],template:function(e,n){1&e&&(or(),G(0,"div",0,1),Yt(2),j(),Ie(3,"div",2)),2&e&&(V(3),qo("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})(),Ky=(()=>{class i{}return i.\u0275fac=function(e){return new(e||i)},i.\u0275mod=en({type:i}),i.\u0275inj=Wt({}),i})(),uU=(()=>{class i{}return i.\u0275fac=function(e){return new(e||i)},i.\u0275mod=en({type:i}),i.\u0275inj=Wt({imports:[qy,Ky,rZ,qy,Ky]}),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 Nh 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 sZ extends BI{constructor(t){super(),this.element=t instanceof vt?t.nativeElement:t}}class NM{constructor(){this._isDisposed=!1,this.attachDomPortal=null}hasAttached(){return!!this._attachedPortal}attach(t){return t instanceof Nh?(this._attachedPortal=t,this.attachComponentPortal(t)):t instanceof Em?(this._attachedPortal=t,this.attachTemplatePortal(t)):this.attachDomPortal&&t instanceof sZ?(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 oZ extends NM{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||Gi.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 NM{constructor(e,n,r){super(),this._componentFactoryResolver=e,this._viewContainerRef=n,this._isInitialized=!1,this.attached=new $e,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)(E($l),E(jr),E(qt))},i.\u0275dir=ve({type:i,selectors:[["","cdkPortalOutlet",""]],inputs:{portal:["cdkPortalOutlet","portal"]},outputs:{attached:"attached"},exportAs:["cdkPortalOutlet"],features:[dt]}),i})(),Bh=(()=>{class i{}return i.\u0275fac=function(e){return new(e||i)},i.\u0275mod=en({type:i}),i.\u0275inj=Wt({}),i})();function Qo(i,...t){return t.length?t.some(e=>i[e]):i.altKey||i.shiftKey||i.ctrlKey||i.metaKey}const hU=lU();class bZ{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=_r(-this._previousScrollPosition.left),t.style.top=_r(-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"),hU&&(n.scrollBehavior=r.scrollBehavior="auto"),window.scroll(this._previousScrollPosition.left,this._previousScrollPosition.top),hU&&(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 xZ{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(gn(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 fU{enable(){}disable(){}attach(){}}function VI(i,t){return t.some(e=>i.bottome.bottom||i.righte.right)}function pU(i,t){return t.some(e=>i.tope.bottom||i.lefte.right)}class wZ{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();VI(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 MZ=(()=>{class i{constructor(e,n,r,s){this._scrollDispatcher=e,this._viewportRuler=n,this._ngZone=r,this.noop=()=>new fU,this.close=o=>new xZ(this._scrollDispatcher,this._ngZone,this._viewportRuler,o),this.block=()=>new bZ(this._viewportRuler,this._document),this.reposition=o=>new wZ(this._scrollDispatcher,this._viewportRuler,this._ngZone,o),this._document=s}}return i.\u0275fac=function(e){return new(e||i)(ee(Xy),ee(LM),ee(gt),ee(qt))},i.\u0275prov=Pe({token:i,factory:i.\u0275fac,providedIn:"root"}),i})();class km{constructor(t){if(this.scrollStrategy=new fU,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 CZ{constructor(t,e){this.connectionPair=t,this.scrollableViewProperties=e}}let mU=(()=>{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)(ee(qt))},i.\u0275prov=Pe({token:i,factory:i.\u0275fac,providedIn:"root"}),i})(),SZ=(()=>{class i extends mU{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)(ee(qt),ee(gt,8))},i.\u0275prov=Pe({token:i,factory:i.\u0275fac,providedIn:"root"}),i})(),EZ=(()=>{class i extends mU{constructor(e,n,r){super(e),this._platform=n,this._ngZone=r,this._cursorStyleIsSet=!1,this._pointerDownListener=s=>{this._pointerDownEventTarget=cu(s)},this._clickListener=s=>{const o=cu(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 d=l[c];if(d._outsidePointerEvents.observers.length<1||!d.hasAttached())continue;if(d.overlayElement.contains(o)||d.overlayElement.contains(a))break;const h=d._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)(ee(qt),ee(zi),ee(gt,8))},i.\u0275prov=Pe({token:i,factory:i.\u0275fac,providedIn:"root"}),i})(),VM=(()=>{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||NI()){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 Te,this._outsidePointerEvents=new Te,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(Oi(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=_r(this._config.width),t.height=_r(this._config.height),t.minWidth=_r(this._config.minWidth),t.minHeight=_r(this._config.minHeight),t.maxWidth=_r(this._config.maxWidth),t.maxHeight=_r(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=IM(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(Ue(Cr(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 gU="cdk-overlay-connected-position-bounding-box",AZ=/([A-Za-z%]+)$/;class DZ{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 Te,this._resizeSubscription=Qt.EMPTY,this._offsetX=0,this._offsetY=0,this._appliedPanelClasses=[],this.positionChanges=this._positionChanges,this.setOrigin(t)}attach(t){this._validatePositions(),t.hostElement.classList.add(gU),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),d=this._getOverlayFit(c,e,n,a);if(d.isCompletelyWithinViewport)return this._isPushed=!1,void this._applyPosition(a,l);this._canFitWithFlexibleDimensions(d,c,n)?s.push({position:a,origin:l,overlayRect:e,boundingBoxRect:this._calculateBoundingBoxRect(l,a)}):(!o||o.overlayFit.visibleAreal&&(l=d,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&&Uh(this._boundingBox.style,{top:"",left:"",right:"",bottom:"",height:"",width:"",alignItems:"",justifyContent:""}),this._pane&&this._resetOverlayElementStyles(),this._overlayRef&&this._overlayRef.hostElement.classList.remove(gU),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=vU(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=_U(this._overlayRef.getConfig().minHeight),a=_U(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=vU(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 d=0,h=0;return d=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,d=t.x-this._viewportMargin;else if("start"===e.overlayX&&!r||"end"===e.overlayX&&r)h=t.x,d=n.right-t.x;else{const m=Math.min(n.right-t.x+n.left,t.x),g=this._lastBoundingBoxSize.width;d=2*m,h=t.x-m,d>g&&!this._isInitialRender&&!this._growAfterOpen&&(h=t.x-g/2)}return{top:o,left:h,bottom:a,right:p,width:d,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=_r(n.height),r.top=_r(n.top),r.bottom=_r(n.bottom),r.width=_r(n.width),r.left=_r(n.left),r.right=_r(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=_r(s)),o&&(r.maxWidth=_r(o))}this._lastBoundingBoxSize=n,Uh(this._boundingBox.style,r)}_resetBoundingBoxStyles(){Uh(this._boundingBox.style,{top:"0",left:"0",right:"0",bottom:"0",height:"",width:"",alignItems:"",justifyContent:""})}_resetOverlayElementStyles(){Uh(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 d=this._viewportRuler.getViewportScrollPosition();Uh(n,this._getExactOverlayY(e,t,d)),Uh(n,this._getExactOverlayX(e,t,d))}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=_r(o.maxHeight):s&&(n.maxHeight="")),o.maxWidth&&(r?n.maxWidth=_r(o.maxWidth):s&&(n.maxWidth="")),Uh(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=_r(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=_r(s.x),r}_getScrollVisibility(){const t=this._getOriginRect(),e=this._pane.getBoundingClientRect(),n=this._scrollables.map(r=>r.getElementRef().nativeElement.getBoundingClientRect());return{isOriginClipped:pU(t,n),isOriginOutsideView:VI(t,n),isOverlayClipped:pU(e,n),isOverlayOutsideView:VI(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&&IM(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 vt)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 Uh(i,t){for(let e in t)t.hasOwnProperty(e)&&(i[e]=t[e]);return i}function _U(i){if("number"!=typeof i&&null!=i){const[t,e]=i.split(AZ);return e&&"px"!==e?null:parseFloat(t)}return i||null}function vU(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 yU="cdk-global-overlay-wrapper";class bU{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(yU),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),d=this._xPosition,h=this._xOffset,p="rtl"===this._overlayRef.getConfig().direction;let m="",g="",b="";l?b="flex-start":"center"===d?(b="center",p?g=h:m=h):p?"left"===d||"end"===d?(b="flex-end",m=h):("right"===d||"start"===d)&&(b="flex-start",g=h):"left"===d||"start"===d?(b="flex-start",m=h):("right"===d||"end"===d)&&(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(yU),n.justifyContent=n.alignItems=t.marginTop=t.marginBottom=t.marginLeft=t.marginRight=t.position="",this._overlayRef=null,this._isDisposed=!0}}let TZ=(()=>{class i{constructor(e,n,r,s){this._viewportRuler=e,this._document=n,this._platform=r,this._overlayContainer=s}global(){return new bU}flexibleConnectedTo(e){return new DZ(e,this._viewportRuler,this._document,this._platform,this._overlayContainer)}}return i.\u0275fac=function(e){return new(e||i)(ee(LM),ee(qt),ee(zi),ee(VM))},i.\u0275prov=Pe({token:i,factory:i.\u0275fac,providedIn:"root"}),i})(),IZ=0,as=(()=>{class i{constructor(e,n,r,s,o,a,l,c,d,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=d,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 Qy(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-"+IZ++,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(dm)),new oZ(e,this._componentFactoryResolver,this._appRef,this._injector,this._document)}}return i.\u0275fac=function(e){return new(e||i)(ee(MZ),ee(VM),ee($l),ee(TZ),ee(SZ),ee(Gi),ee(gt),ee(qt),ee(Pa),ee(_y),ee(EZ),ee(kr,8))},i.\u0275prov=Pe({token:i,factory:i.\u0275fac,providedIn:"root"}),i})();const RZ=[{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"}],xU=new me("cdk-connected-overlay-scroll-strategy");let zI=(()=>{class i{constructor(e){this.elementRef=e}}return i.\u0275fac=function(e){return new(e||i)(E(vt))},i.\u0275dir=ve({type:i,selectors:[["","cdk-overlay-origin",""],["","overlay-origin",""],["","cdkOverlayOrigin",""]],exportAs:["cdkOverlayOrigin"],standalone:!0}),i})(),wU=(()=>{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=tn(e)}get lockPosition(){return this._lockPosition}set lockPosition(e){this._lockPosition=tn(e)}get flexibleDimensions(){return this._flexibleDimensions}set flexibleDimensions(e){this._flexibleDimensions=tn(e)}get growAfterOpen(){return this._growAfterOpen}set growAfterOpen(e){this._growAfterOpen=tn(e)}get push(){return this._push}set push(e){this._push=tn(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=Qt.EMPTY,this._attachSubscription=Qt.EMPTY,this._detachSubscription=Qt.EMPTY,this._positionSubscription=Qt.EMPTY,this.viewportMargin=0,this.open=!1,this.disableClose=!1,this.backdropClick=new $e,this.positionChange=new $e,this.attach=new $e,this.detach=new $e,this.overlayKeydown=new $e,this.overlayOutsideClick=new $e,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=RZ);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&&!Qo(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 zI?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(YB(()=>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)(E(as),E(Eo),E(jr),E(xU),E(Pa,8))},i.\u0275dir=ve({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:[xi]}),i})();const PZ={provide:xU,deps:[as],useFactory:function kZ(i){return()=>i.scrollStrategies.reposition()}};let Pm=(()=>{class i{}return i.\u0275fac=function(e){return new(e||i)},i.\u0275mod=en({type:i}),i.\u0275inj=Wt({providers:[as,PZ],imports:[qy,Bh,uU,uU]}),i})();function gl(i,t=Gy){return ni((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,d=t.now();if(d{s=c,o=t.now(),r||(r=t.schedule(l,i),n.add(r))},()=>{a(),n.complete()},void 0,()=>{s=r=null}))})}function MU(i){return gn((t,e)=>i<=e)}function Ql(i,t=ja){return i=i??OZ,ni((e,n)=>{let r,s=!0;e.subscribe(qn(n,o=>{const a=t(o);(s||!i(r,a))&&(s=!1,r=a,n.next(o))}))})}function OZ(i,t){return i===t}let CU=(()=>{class i{create(e){return typeof MutationObserver>"u"?null:new MutationObserver(e)}}return i.\u0275fac=function(e){return new(e||i)},i.\u0275prov=Pe({token:i,factory:i.\u0275fac,providedIn:"root"}),i})(),FZ=(()=>{class i{constructor(e){this._mutationObserverFactory=e,this._observedElements=new Map}ngOnDestroy(){this._observedElements.forEach((e,n)=>this._cleanupObserver(n))}observe(e){const n=qc(e);return new In(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 Te,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)(ee(CU))},i.\u0275prov=Pe({token:i,factory:i.\u0275fac,providedIn:"root"}),i})(),SU=(()=>{class i{get disabled(){return this._disabled}set disabled(e){this._disabled=tn(e),this._disabled?this._unsubscribe():this._subscribe()}get debounce(){return this._debounce}set debounce(e){this._debounce=Ps(e),this._subscribe()}constructor(e,n,r){this._contentObserver=e,this._elementRef=n,this._ngZone=r,this.event=new $e,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(gl(this.debounce)):e).subscribe(this.event)})}_unsubscribe(){this._currentSubscription?.unsubscribe()}}return i.\u0275fac=function(e){return new(e||i)(E(FZ),E(vt),E(gt))},i.\u0275dir=ve({type:i,selectors:[["","cdkObserveContent",""]],inputs:{disabled:["cdkObserveContentDisabled","disabled"],debounce:"debounce"},outputs:{event:"cdkObserveContent"},exportAs:["cdkObserveContent"]}),i})(),HI=(()=>{class i{}return i.\u0275fac=function(e){return new(e||i)},i.\u0275mod=en({type:i}),i.\u0275inj=Wt({providers:[CU]}),i})();const EU=new Set;let Om,LZ=(()=>{class i{constructor(e){this._platform=e,this._matchMedia=this._platform.isBrowser&&window.matchMedia?window.matchMedia.bind(window):BZ}matchMedia(e){return(this._platform.WEBKIT||this._platform.BLINK)&&function NZ(i){if(!EU.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),EU.add(i))}catch(t){console.error(t)}}(e),this._matchMedia(e)}}return i.\u0275fac=function(e){return new(e||i)(ee(zi))},i.\u0275prov=Pe({token:i,factory:i.\u0275fac,providedIn:"root"}),i})();function BZ(i){return{matches:"all"===i||""===i,media:i,addListener:()=>{},removeListener:()=>{}}}let $I=(()=>{class i{constructor(e,n){this._mediaMatcher=e,this._zone=n,this._queries=new Map,this._destroySubject=new Te}ngOnDestroy(){this._destroySubject.next(),this._destroySubject.complete()}isMatched(e){return AU(IM(e)).some(r=>this._registerQuery(r).mql.matches)}observe(e){let s=Ra(AU(IM(e)).map(o=>this._registerQuery(o).observable));return s=Sy(s.pipe(Oi(1)),s.pipe(MU(1),gl(0))),s.pipe(tt(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 In(o=>{const a=l=>this._zone.run(()=>o.next(l));return n.addListener(a),()=>{n.removeListener(a)}}).pipe(Do(n),tt(({matches:o})=>({query:e,matches:o})),Ue(this._destroySubject)),mql:n};return this._queries.set(e,s),s}}return i.\u0275fac=function(e){return new(e||i)(ee(LZ),ee(gt))},i.\u0275prov=Pe({token:i,factory:i.\u0275fac,providedIn:"root"}),i})();function AU(i){return i.map(t=>t.split(",")).reduce((t,e)=>t.concat(e)).map(t=>t.trim())}function zM(i,t){return(i.getAttribute(t)||"").match(/\S+/g)||[]}const TU="cdk-describedby-message",HM="cdk-describedby-host";let GI=0,HZ=(()=>{class i{constructor(e,n){this._platform=n,this._messageRegistry=new Map,this._messagesContainer=null,this._id=""+GI++,this._document=e,this._id=Lt(cm)+"-"+GI++}describe(e,n,r){if(!this._canBeDescribed(e,n))return;const s=WI(n,r);"string"!=typeof n?(IU(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=WI(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(`[${HM}="${this._id}"]`);for(let n=0;n0!=r.indexOf(TU));e.setAttribute("aria-describedby",n.join(" "))}_addMessageReference(e,n){const r=this._messageRegistry.get(n);(function VZ(i,t,e){const n=zM(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(HM,this._id),r.referenceCount++}_removeMessageReference(e,n){const r=this._messageRegistry.get(n);r.referenceCount--,function zZ(i,t,e){const r=zM(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(HM)}_isElementDescribedByMessage(e,n){const r=zM(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)(ee(qt),ee(zi))},i.\u0275prov=Pe({token:i,factory:i.\u0275fac,providedIn:"root"}),i})();function WI(i,t){return"string"==typeof i?`${t||""}/${i}`:i}function IU(i,t){i.id||(i.id=`${TU}-${t}-${GI++}`)}class RU{constructor(t){this._items=t,this._activeItemIndex=-1,this._activeItem=null,this._wrap=!1,this._letterKeyStream=new Te,this._typeaheadSubscription=Qt.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 Te,this.change=new Te,t instanceof om&&(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(Vi(e=>this._pressedLetters.push(e)),gl(t),gn(()=>this._pressedLetters.length>0),tt(()=>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 om?this._items.toArray():this._items}}class $Z extends RU{setActiveItem(t){this.activeItem&&this.activeItem.setInactiveStyles(),super.setActiveItem(t),this.activeItem&&this.activeItem.setActiveStyles()}}class kU extends RU{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 $M=(()=>{class i{constructor(e){this._platform=e}isDisabled(e){return e.hasAttribute("disabled")}isVisible(e){return function WZ(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 GZ(i){try{return i.frameElement}catch{return null}}(function JZ(i){return i.ownerDocument&&i.ownerDocument.defaultView||window}(e));if(n&&(-1===OU(n)||!this.isVisible(n)))return!1;let r=e.nodeName.toLowerCase(),s=OU(e);return e.hasAttribute("contenteditable")?-1!==s:!("iframe"===r||"object"===r||this._platform.WEBKIT&&this._platform.IOS&&!function ZZ(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 QZ(i){return!function YZ(i){return function XZ(i){return"input"==i.nodeName.toLowerCase()}(i)&&"hidden"==i.type}(i)&&(function jZ(i){let t=i.nodeName.toLowerCase();return"input"===t||"select"===t||"button"===t||"textarea"===t}(i)||function qZ(i){return function KZ(i){return"a"==i.nodeName.toLowerCase()}(i)&&i.hasAttribute("href")}(i)||i.hasAttribute("contenteditable")||PU(i))}(e)&&!this.isDisabled(e)&&(n?.ignoreVisibility||this.isVisible(e))}}return i.\u0275fac=function(e){return new(e||i)(ee(zi))},i.\u0275prov=Pe({token:i,factory:i.\u0275fac,providedIn:"root"}),i})();function PU(i){if(!i.hasAttribute("tabindex")||void 0===i.tabIndex)return!1;let t=i.getAttribute("tabindex");return!(!t||isNaN(parseInt(t,10)))}function OU(i){if(!PU(i))return null;const t=parseInt(i.getAttribute("tabindex")||"",10);return isNaN(t)?-1:t}class eQ{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(Oi(1)).subscribe(t)}}let jI=(()=>{class i{constructor(e,n,r){this._checker=e,this._ngZone=n,this._document=r}create(e,n=!1){return new eQ(e,this._checker,this._ngZone,this._document,n)}}return i.\u0275fac=function(e){return new(e||i)(ee($M),ee(gt),ee(qt))},i.\u0275prov=Pe({token:i,factory:i.\u0275fac,providedIn:"root"}),i})();function YI(i){return 0===i.buttons||0===i.offsetX&&0===i.offsetY}function qI(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 tQ=new me("cdk-input-modality-detector-options"),nQ={ignoreKeys:[18,17,224,91,16]},Fm=Fh({passive:!0,capture:!0});let iQ=(()=>{class i{get mostRecentModality(){return this._modality.value}constructor(e,n,r,s){this._platform=e,this._mostRecentTarget=null,this._modality=new Qe(null),this._lastTouchMs=0,this._onKeydown=o=>{this._options?.ignoreKeys?.some(a=>a===o.keyCode)||(this._modality.next("keyboard"),this._mostRecentTarget=cu(o))},this._onMousedown=o=>{Date.now()-this._lastTouchMs<650||(this._modality.next(YI(o)?"keyboard":"mouse"),this._mostRecentTarget=cu(o))},this._onTouchstart=o=>{qI(o)?this._modality.next("keyboard"):(this._lastTouchMs=Date.now(),this._modality.next("touch"),this._mostRecentTarget=cu(o))},this._options={...nQ,...s},this.modalityDetected=this._modality.pipe(MU(1)),this.modalityChanged=this.modalityDetected.pipe(Ql()),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)(ee(zi),ee(gt),ee(qt),ee(tQ,8))},i.\u0275prov=Pe({token:i,factory:i.\u0275fac,providedIn:"root"}),i})();const rQ=new me("liveAnnouncerElement",{providedIn:"root",factory:function sQ(){return null}}),oQ=new me("LIVE_ANNOUNCER_DEFAULT_OPTIONS");let aQ=0,XI=(()=>{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 Te,this._rootNodeFocusAndBlurListener=a=>{for(let c=cu(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=qc(e);if(!this._platform.isBrowser||1!==r.nodeType)return mt(null);const s=function WK(i){if(function GK(){if(null==LI){const i=typeof document<"u"?document.head:null;LI=!(!i||!i.createShadowRoot&&!i.attachShadow)}return LI}()){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 Te,rootNode:s};return this._elementInfo.set(r,a),this._registerGlobalListeners(a),a.subject}stopMonitoring(e){const n=qc(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=qc(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=cu(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,GM),n.addEventListener("blur",this._rootNodeFocusAndBlurListener,GM)}),this._rootNodeFocusListenerCount.set(n,r+1),1==++this._monitoredElementCount&&(this._ngZone.runOutsideAngular(()=>{this._getWindow().addEventListener("focus",this._windowFocusListener)}),this._inputModalityDetector.modalityDetected.pipe(Ue(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,GM),n.removeEventListener("blur",this._rootNodeFocusAndBlurListener,GM),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=Lt($I).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,LU,NU),this._hasCheckedHighContrastMode=!0;const n=this.getHighContrastMode();1===n?e.add(KI,LU):2===n&&e.add(KI,NU)}}}return i.\u0275fac=function(e){return new(e||i)(ee(zi),ee(qt))},i.\u0275prov=Pe({token:i,factory:i.\u0275fac,providedIn:"root"}),i})(),UU=(()=>{class i{constructor(e){e._applyBodyHighContrastModeCssClasses()}}return i.\u0275fac=function(e){return new(e||i)(ee(BU))},i.\u0275mod=en({type:i}),i.\u0275inj=Wt({imports:[HI]}),i})();function cQ(i,t){}class WM{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 VU=(()=>{class i extends NM{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=d=>{this._portalOutlet.hasAttached();const h=this._portalOutlet.attachDomPortal(d);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=FM(),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=FM();return e===n||e.contains(n)}_initializeFocusTrap(){this._focusTrap=this._focusTrapFactory.create(this._elementRef.nativeElement),this._document&&(this._elementFocusedBeforeDialogWasOpened=FM())}_handleBackdropClicks(){this._overlayRef.backdropClick().subscribe(()=>{this._config.disableClose&&this._recaptureFocus()})}}return i.\u0275fac=function(e){return new(e||i)(E(vt),E(jI),E(qt,8),E(WM),E($M),E(gt),E(Qy),E(Xc))},i.\u0275cmp=ot({type:i,selectors:[["cdk-dialog-container"]],viewQuery:function(e,n){if(1&e&&$n(Am,7),2&e){let r;At(r=Dt())&&(n._portalOutlet=r.first)}},hostAttrs:["tabindex","-1",1,"cdk-dialog-container"],hostVars:6,hostBindings:function(e,n){2&e&&It("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:[dt],decls:1,vars:0,consts:[["cdkPortalOutlet",""]],template:function(e,n){1&e&&fe(0,cQ,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 ZI{constructor(t,e){this.overlayRef=t,this.config=e,this.closed=new Te,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&&!Qo(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 zU=new me("DialogScrollStrategy"),dQ=new me("DialogData"),uQ=new me("DefaultDialogConfig"),fQ={provide:zU,deps:[as],useFactory:function hQ(i){return()=>i.scrollStrategies.block()}};let pQ=0,HU=(()=>{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 Te,this._afterOpenedAtThisLevel=new Te,this._ariaHiddenElements=new Map,this.afterAllClosed=Ey(()=>this.openDialogs.length?this._getAfterAllClosed():this._getAfterAllClosed().pipe(Do(void 0))),this._scrollStrategy=a}open(e,n){(n={...this._defaultOptions||new WM,...n}).id=n.id||"cdk-dialog-"+pQ++,n.id&&this.getDialogById(n.id);const s=this._getOverlayConfig(n),o=this._overlay.create(s),a=new ZI(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(){QI(this.openDialogs,e=>e.close())}getDialogById(e){return this.openDialogs.find(n=>n.id===e)}ngOnDestroy(){QI(this._openDialogsAtThisLevel,e=>{!1===e.config.closeOnDestroy&&this._removeOpenDialog(e,!1)}),QI(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:WM,useValue:r},{provide:ZI,useValue:n},{provide:Qy,useValue:e}];let a;r.container?"function"==typeof r.container?a=r.container:(a=r.container.type,o.push(...r.container.providers(r))):a=VU;const l=new Nh(a,r.viewContainerRef,Gi.create({parent:s||this._injector,providers:o}),r.componentFactoryResolver);return e.attach(l).instance}_attachDialogContent(e,n,r,s){if(e instanceof Eo){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 Nh(e,s.viewContainerRef,o,s.componentFactoryResolver));n.componentInstance=a.instance}}_createInjector(e,n,r,s){const o=e.injector||e.viewContainerRef?.injector,a=[{provide:dQ,useValue:e.data},{provide:ZI,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(Pa,null,{optional:!0}))&&a.push({provide:Pa,useValue:{value:e.direction,change:mt()}}),Gi.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)(ee(as),ee(Gi),ee(uQ,8),ee(i,12),ee(VM),ee(zU))},i.\u0275prov=Pe({token:i,factory:i.\u0275fac}),i})();function QI(i,t){let e=i.length;for(;e--;)t(i[e])}let mQ=(()=>{class i{}return i.\u0275fac=function(e){return new(e||i)},i.\u0275mod=en({type:i}),i.\u0275inj=Wt({providers:[HU,fQ],imports:[Pm,Bh,UU,Bh]}),i})();const gQ=["text"];function _Q(i,t){if(1&i&&Ie(0,"mat-pseudo-checkbox",6),2&i){const e=re();U("state",e.selected?"checked":"unchecked")("disabled",e.disabled)}}function vQ(i,t){1&i&&Ie(0,"mat-pseudo-checkbox",7),2&i&&U("disabled",re().disabled)}function yQ(i,t){if(1&i&&(G(0,"span",8),Be(1),j()),2&i){const e=re();V(1),Qi("(",e.group.label,")")}}const bQ=[[["mat-icon"]],"*"],xQ=["mat-icon","*"],MQ=new me("mat-sanity-checks",{providedIn:"root",factory:function wQ(){return!0}});let Jn=(()=>{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!NI()&&("boolean"==typeof this._sanityChecks?this._sanityChecks:!!this._sanityChecks[e])}}return i.\u0275fac=function(e){return new(e||i)(ee(BU),ee(MQ,8),ee(qt))},i.\u0275mod=en({type:i}),i.\u0275inj=Wt({imports:[qy,qy]}),i})();function jM(i){return class extends i{get disabled(){return this._disabled}set disabled(t){this._disabled=tn(t)}constructor(...t){super(...t),this._disabled=!1}}}function Jy(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 YM(i){return class extends i{get disableRipple(){return this._disableRipple}set disableRipple(t){this._disableRipple=tn(t)}constructor(...t){super(...t),this._disableRipple=!1}}}function JI(i,t=0){return class extends i{get tabIndex(){return this.disabled?-1:this._tabIndex}set tabIndex(e){this._tabIndex=null!=e?Ps(e):this.defaultTabIndex}constructor(...e){super(...e),this._tabIndex=t,this.defaultTabIndex=t}}}function WU(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 CQ(i){return class extends i{constructor(...t){super(...t),this._isInitialized=!1,this._pendingSubscribers=[],this.initialized=new In(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 YU=(()=>{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=Pe({token:i,factory:i.\u0275fac,providedIn:"root"}),i})();class EQ{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 qU=Fh({passive:!0,capture:!0});class AQ{constructor(){this._events=new Map,this._delegateEventHandler=t=>{const e=cu(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,qU)})}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,qU)))}}const XU={enterDuration:225,exitDuration:150},KU=Fh({passive:!0,capture:!0}),ZU=["mousedown","touchstart"],QU=["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=qc(n))}fadeInRipple(t,e,n={}){const r=this._containerRect=this._containerRect||this._containerElement.getBoundingClientRect(),s={...XU,...n.animation};n.centered&&(t=r.left+r.width/2,e=r.top+r.height/2);const o=n.radius||function TQ(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,d=document.createElement("div");d.classList.add("mat-ripple-element"),d.style.left=a-o+"px",d.style.top=l-o+"px",d.style.height=2*o+"px",d.style.width=2*o+"px",null!=n.color&&(d.style.backgroundColor=n.color),d.style.transitionDuration=`${c}ms`,this._containerElement.appendChild(d);const h=window.getComputedStyle(d),m=h.transitionDuration,g="none"===h.transitionProperty||"0s"===m||"0s, 0s"===m||0===r.width&&0===r.height,b=new EQ(this,d,n,g);d.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);d.addEventListener("transitionend",y),d.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={...XU,...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=qc(t);!this._platform.isBrowser||!e||e===this._triggerElement||(this._removeTriggerEvents(),this._triggerElement=e,ZU.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(()=>{QU.forEach(e=>{this._triggerElement.addEventListener(e,this,KU)})}),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=YI(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&&(ZU.forEach(e=>Lm._eventManager.removeHandler(e,t,this)),this._pointerUpEventsRegistered&&QU.forEach(e=>t.removeEventListener(e,this,KU)))}}Lm._eventManager=new AQ;const eR=new me("mat-ripple-global-options");let Vh=(()=>{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)(E(vt),E(gt),E(zi),E(eR,8),E(kr,8))},i.\u0275dir=ve({type:i,selectors:[["","mat-ripple",""],["","matRipple",""]],hostAttrs:[1,"mat-ripple"],hostVars:2,hostBindings:function(e,n){2&e&&ln("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})(),tb=(()=>{class i{}return i.\u0275fac=function(e){return new(e||i)},i.\u0275mod=en({type:i}),i.\u0275inj=Wt({imports:[Jn,Jn]}),i})(),IQ=(()=>{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)(E(kr,8))},i.\u0275cmp=ot({type:i,selectors:[["mat-pseudo-checkbox"]],hostAttrs:[1,"mat-pseudo-checkbox"],hostVars:12,hostBindings:function(e,n){2&e&&ln("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})(),JU=(()=>{class i{}return i.\u0275fac=function(e){return new(e||i)},i.\u0275mod=en({type:i}),i.\u0275inj=Wt({imports:[Jn]}),i})();const eV=new me("MAT_OPTION_PARENT_COMPONENT"),tV=new me("MatOptgroup");let RQ=0;class kQ{constructor(t,e=!1){this.source=t,this.isUserInput=e}}let PQ=(()=>{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=tn(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-"+RQ++,this.onSelectionChange=new $e,this._stateChanges=new Te}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)&&!Qo(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 kQ(this,e))}}return i.\u0275fac=function(e){Co()},i.\u0275dir=ve({type:i,viewQuery:function(e,n){if(1&e&&$n(gQ,7),2&e){let r;At(r=Dt())&&(n._text=r.first)}},inputs:{value:"value",id:"id",disabled:"disabled"},outputs:{onSelectionChange:"onSelectionChange"}}),i})(),Nm=(()=>{class i extends PQ{constructor(e,n,r,s){super(e,n,r,s)}}return i.\u0275fac=function(e){return new(e||i)(E(vt),E(Qn),E(eV,8),E(tV,8))},i.\u0275cmp=ot({type:i,selectors:[["mat-option"]],hostAttrs:["role","option",1,"mat-mdc-option","mdc-list-item"],hostVars:11,hostBindings:function(e,n){1&e&&Oe("click",function(){return n._selectViaInteraction()})("keydown",function(s){return n._handleKeydown(s)}),2&e&&(ql("id",n.id),It("aria-selected",n.selected)("aria-disabled",n.disabled.toString()),ln("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:[dt],ngContentSelectors:xQ,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&&(or(bQ),fe(0,_Q,1,2,"mat-pseudo-checkbox",0),Yt(1),G(2,"span",1,2),Yt(4,1),j(),fe(5,vQ,1,1,"mat-pseudo-checkbox",3),fe(6,yQ,2,1,"span",4),Ie(7,"div",5)),2&e&&(U("ngIf",n.multiple),V(5),U("ngIf",!n.multiple&&n.selected&&!n.hideSingleSelectionIndicator),V(1),U("ngIf",n.group&&n.group._inert),V(1),U("matRippleTrigger",n._getHostElement())("matRippleDisabled",n.disabled||n.disableRipple))},dependencies:[Vh,_i,IQ],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})(),tR=(()=>{class i{}return i.\u0275fac=function(e){return new(e||i)},i.\u0275mod=en({type:i}),i.\u0275inj=Wt({imports:[tb,co,Jn,JU]}),i})();class nV{}class LQ{}const Kc="*";function Oa(i,t){return{type:7,name:i,definitions:t,options:{}}}function Yr(i,t=null){return{type:4,styles:t,timings:i}}function rV(i,t=null){return{type:2,steps:i,options:t}}function oi(i){return{type:6,styles:i,offset:null}}function Os(i,t,e){return{type:0,name:i,styles:t,options:e}}function sV(i){return{type:5,steps:i}}function Or(i,t,e=null){return{type:1,expr:i,animation:t,options:e}}function nR(i=null){return{type:9,options:i}}function iR(i,t,e=null){return{type:11,selector:i,animation:t,options:e}}function oV(i){Promise.resolve().then(i)}class nb{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(){oV(()=>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 aV{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?oV(()=>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 rR="!";function NQ(i,t){}class qM{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 sR="mdc-dialog--open",lV="mdc-dialog--opening",cV="mdc-dialog--closing";let VQ=(()=>{class i extends VU{constructor(e,n,r,s,o,a,l,c){super(e,n,r,s,o,a,l,c),this._animationStateChanged=new $e}_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)(E(vt),E(jI),E(qt,8),E(qM),E($M),E(gt),E(Qy),E(Xc))},i.\u0275cmp=ot({type:i,selectors:[["ng-component"]],features:[dt],decls:0,vars:0,template:function(e,n){},encapsulation:2}),i})();const dV="--mat-dialog-transition-duration";function uV(i){return null==i?null:"number"==typeof i?i:i.endsWith("ms")?Ps(i.substring(0,i.length-2)):i.endsWith("s")?1e3*Ps(i.substring(0,i.length-1)):"0"===i?0:null}let zQ=(()=>{class i extends VQ{constructor(e,n,r,s,o,a,l,c,d){super(e,n,r,s,o,a,l,d),this._animationMode=c,this._animationsEnabled="NoopAnimations"!==this._animationMode,this._hostElement=this._elementRef.nativeElement,this._openAnimationDuration=this._animationsEnabled?uV(this._config.enterAnimationDuration)??150:0,this._closeAnimationDuration=this._animationsEnabled?uV(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(dV,`${this._openAnimationDuration}ms`),this._requestAnimationFrame(()=>this._hostElement.classList.add(lV,sR)),this._waitForAnimationToComplete(this._openAnimationDuration,this._finishDialogOpen)):(this._hostElement.classList.add(sR),Promise.resolve().then(()=>this._finishDialogOpen()))}_startExitAnimation(){this._animationStateChanged.emit({state:"closing",totalTime:this._closeAnimationDuration}),this._hostElement.classList.remove(sR),this._animationsEnabled?(this._hostElement.style.setProperty(dV,`${this._openAnimationDuration}ms`),this._requestAnimationFrame(()=>this._hostElement.classList.add(cV)),this._waitForAnimationToComplete(this._closeAnimationDuration,this._finishDialogClose)):Promise.resolve().then(()=>this._finishDialogClose())}_clearAnimationClasses(){this._hostElement.classList.remove(lV,cV)}_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)(E(vt),E(jI),E(qt,8),E(qM),E($M),E(gt),E(Qy),E(kr,8),E(Xc))},i.\u0275cmp=ot({type:i,selectors:[["mat-dialog-container"]],hostAttrs:["tabindex","-1",1,"mat-mdc-dialog-container","mdc-dialog"],hostVars:8,hostBindings:function(e,n){2&e&&(ql("id",n._config.id),It("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),ln("_mat-animation-noopable",!n._animationsEnabled))},features:[dt],decls:3,vars:0,consts:[[1,"mdc-dialog__container"],[1,"mat-mdc-dialog-surface","mdc-dialog__surface"],["cdkPortalOutlet",""]],template:function(e,n){1&e&&(G(0,"div",0)(1,"div",1),fe(2,NQ,0,0,"ng-template",2),j()())},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 ib{constructor(t,e,n){this._ref=t,this._containerInstance=n,this._afterOpened=new Te,this._beforeClosed=new Te,this._state=0,this.disableClose=e.disableClose,this.id=t.id,n._animationStateChanged.pipe(gn(r=>"opened"===r.state),Oi(1)).subscribe(()=>{this._afterOpened.next(),this._afterOpened.complete()}),n._animationStateChanged.pipe(gn(r=>"closed"===r.state),Oi(1)).subscribe(()=>{clearTimeout(this._closeFallbackTimeout),this._finishDialogClose()}),t.overlayRef.detachments().subscribe(()=>{this._beforeClosed.next(this._result),this._beforeClosed.complete(),this._finishDialogClose()}),Cr(this.backdropClick(),this.keydownEvents().pipe(gn(r=>27===r.keyCode&&!this.disableClose&&!Qo(r)))).subscribe(r=>{this.disableClose||(r.preventDefault(),hV(this,"keydown"===r.type?"keyboard":"mouse"))})}close(t){this._result=t,this._containerInstance._animationStateChanged.pipe(gn(e=>"closing"===e.state),Oi(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 hV(i,t,e){return i._closeInteractionType=t,i.close(e)}const oR=new me("MatMdcDialogData"),HQ=new me("mat-mdc-dialog-default-options"),fV=new me("mat-mdc-dialog-scroll-strategy"),GQ={provide:fV,deps:[as],useFactory:function $Q(i){return()=>i.scrollStrategies.block()}};let WQ=0,jQ=(()=>{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,d,h){this._overlay=e,this._defaultOptions=r,this._parentDialog=s,this._dialogRefConstructor=l,this._dialogContainerType=c,this._dialogDataToken=d,this._openDialogsAtThisLevel=[],this._afterAllClosedAtThisLevel=new Te,this._afterOpenedAtThisLevel=new Te,this._idPrefix="mat-dialog-",this.dialogConfigClass=qM,this.afterAllClosed=Ey(()=>this.openDialogs.length?this._getAfterAllClosed():this._getAfterAllClosed().pipe(Do(void 0))),this._scrollStrategy=a,this._dialog=n.get(HU)}open(e,n){let r;(n={...this._defaultOptions||new qM,...n}).id=n.id||`${this._idPrefix}${WQ++}`,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:WM,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){Co()},i.\u0275prov=Pe({token:i,factory:i.\u0275fac}),i})(),Bm=(()=>{class i extends jQ{constructor(e,n,r,s,o,a,l,c){super(e,n,s,a,l,o,ib,zQ,oR,c),this._idPrefix="mat-mdc-dialog-"}}return i.\u0275fac=function(e){return new(e||i)(ee(as),ee(Gi),ee(_y,8),ee(HQ,8),ee(fV),ee(i,12),ee(VM),ee(kr,8))},i.\u0275prov=Pe({token:i,factory:i.\u0275fac}),i})(),YQ=0,qQ=(()=>{class i{constructor(e,n,r){this.dialogRef=e,this._elementRef=n,this._dialog=r,this.type="button"}ngOnInit(){this.dialogRef||(this.dialogRef=_V(this._elementRef,this._dialog.openDialogs))}ngOnChanges(e){const n=e._matDialogClose||e._matDialogCloseResult;n&&(this.dialogResult=n.currentValue)}_onButtonClick(e){hV(this.dialogRef,0===e.screenX&&0===e.screenY?"keyboard":"mouse",this.dialogResult)}}return i.\u0275fac=function(e){return new(e||i)(E(ib,8),E(vt),E(Bm))},i.\u0275dir=ve({type:i,selectors:[["","mat-dialog-close",""],["","matDialogClose",""]],hostVars:2,hostBindings:function(e,n){1&e&&Oe("click",function(s){return n._onButtonClick(s)}),2&e&&It("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:[xi]}),i})(),pV=(()=>{class i{constructor(e,n,r){this._dialogRef=e,this._elementRef=n,this._dialog=r,this.id="mat-mdc-dialog-title-"+YQ++}ngOnInit(){this._dialogRef||(this._dialogRef=_V(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)(E(ib,8),E(vt),E(Bm))},i.\u0275dir=ve({type:i,selectors:[["","mat-dialog-title",""],["","matDialogTitle",""]],hostAttrs:[1,"mat-mdc-dialog-title","mdc-dialog__title"],hostVars:1,hostBindings:function(e,n){2&e&&ql("id",n.id)},inputs:{id:"id"},exportAs:["matDialogTitle"]}),i})(),mV=(()=>{class i{}return i.\u0275fac=function(e){return new(e||i)},i.\u0275dir=ve({type:i,selectors:[["","mat-dialog-content",""],["mat-dialog-content"],["","matDialogContent",""]],hostAttrs:[1,"mat-mdc-dialog-content","mdc-dialog__content"]}),i})(),gV=(()=>{class i{constructor(){this.align="start"}}return i.\u0275fac=function(e){return new(e||i)},i.\u0275dir=ve({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&&ln("mat-mdc-dialog-actions-align-center","center"===n.align)("mat-mdc-dialog-actions-align-end","end"===n.align)},inputs:{align:"align"}}),i})();function _V(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 vV=(()=>{class i{}return i.\u0275fac=function(e){return new(e||i)},i.\u0275mod=en({type:i}),i.\u0275inj=Wt({providers:[Bm,GQ],imports:[mQ,Pm,Bh,Jn,Jn]}),i})();const XQ=["mat-button",""],bV=[[["",8,"material-icons",3,"iconPositionEnd",""],["mat-icon",3,"iconPositionEnd",""],["","matButtonIcon","",3,"iconPositionEnd",""]],"*",[["","iconPositionEnd","",8,"material-icons"],["mat-icon","iconPositionEnd",""],["","matButtonIcon","","iconPositionEnd",""]]],xV=[".material-icons:not([iconPositionEnd]), mat-icon:not([iconPositionEnd]), [matButtonIcon]:not([iconPositionEnd])","*",".material-icons[iconPositionEnd], mat-icon[iconPositionEnd], [matButtonIcon][iconPositionEnd]"],ZQ=["mat-mini-fab",""],JQ=["mat-icon-button",""],eJ=["*"],tJ=[{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"]}],nJ=Jy(jM(YM(class{constructor(i){this._elementRef=i}})));let aR=(()=>{class i extends nJ{constructor(e,n,r,s){super(e),this._platform=n,this._ngZone=r,this._animationMode=s,this._focusMonitor=Lt(Xc),this._isFab=!1;const o=e.nativeElement.classList;for(const a of tJ)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){Co()},i.\u0275dir=ve({type:i,viewQuery:function(e,n){if(1&e&&$n(Vh,5),2&e){let r;At(r=Dt())&&(n.ripple=r.first)}},features:[dt]}),i})(),rb=(()=>{class i extends aR{constructor(e,n,r,s){super(e,n,r,s)}}return i.\u0275fac=function(e){return new(e||i)(E(vt),E(zi),E(gt),E(kr,8))},i.\u0275cmp=ot({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&&(It("disabled",n.disabled||null),ln("_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:[dt],attrs:XQ,ngContentSelectors:xV,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&&(or(bV),Ie(0,"span",0),Yt(1),G(2,"span",1),Yt(3,1),j(),Yt(4,2),Ie(5,"span",2)(6,"span",3)(7,"span",4)),2&e&&(ln("mdc-button__ripple",!n._isFab)("mdc-fab__ripple",n._isFab),V(6),U("matRippleDisabled",n._isRippleDisabled())("matRippleTrigger",n._elementRef.nativeElement))},dependencies:[Vh],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 rJ=new me("mat-mdc-fab-default-options",{providedIn:"root",factory:wV});function wV(){return{color:"accent"}}const MV=wV();let CV=(()=>{class i extends aR{constructor(e,n,r,s,o){super(e,n,r,s),this._options=o,this._isFab=!0,this._options=this._options||MV,this.color=this.defaultColor=this._options.color||MV.color}}return i.\u0275fac=function(e){return new(e||i)(E(vt),E(zi),E(gt),E(kr,8),E(rJ,8))},i.\u0275cmp=ot({type:i,selectors:[["button","mat-mini-fab",""]],hostVars:7,hostBindings:function(e,n){2&e&&(It("disabled",n.disabled||null),ln("_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:[dt],attrs:ZQ,ngContentSelectors:xV,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&&(or(bV),Ie(0,"span",0),Yt(1),G(2,"span",1),Yt(3,1),j(),Yt(4,2),Ie(5,"span",2)(6,"span",3)(7,"span",4)),2&e&&(ln("mdc-button__ripple",!n._isFab)("mdc-fab__ripple",n._isFab),V(6),U("matRippleDisabled",n._isRippleDisabled())("matRippleTrigger",n._elementRef.nativeElement))},dependencies:[Vh],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})(),XM=(()=>{class i extends aR{constructor(e,n,r,s){super(e,n,r,s)}}return i.\u0275fac=function(e){return new(e||i)(E(vt),E(zi),E(gt),E(kr,8))},i.\u0275cmp=ot({type:i,selectors:[["button","mat-icon-button",""]],hostVars:7,hostBindings:function(e,n){2&e&&(It("disabled",n.disabled||null),ln("_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:[dt],attrs:JQ,ngContentSelectors:eJ,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&&(or(),Ie(0,"span",0),Yt(1),Ie(2,"span",1)(3,"span",2)(4,"span",3)),2&e&&(V(3),U("matRippleDisabled",n._isRippleDisabled())("matRippleCentered",!0)("matRippleTrigger",n._elementRef.nativeElement))},dependencies:[Vh],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})(),KM=(()=>{class i{}return i.\u0275fac=function(e){return new(e||i)},i.\u0275mod=en({type:i}),i.\u0275inj=Wt({imports:[Jn,tb,Jn]}),i})();const sJ=["class","dialog"];let SV=(()=>{class i{constructor(e,n){this.dialogRef=e,this.data=n}}return i.\u0275fac=function(e){return new(e||i)(E(ib),E(oR))},i.\u0275cmp=ot({type:i,selectors:[["app-confirm",8,"dialog"]],attrs:sJ,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&&(G(0,"h1",0),Be(1,"Confirmation"),j(),G(2,"div",1)(3,"p"),Be(4),j()(),G(5,"div",2)(6,"button",3),Oe("click",function(){return n.dialogRef.close()}),Be(7,"Cancel"),j(),G(8,"button",4),Be(9,"Yes"),j()()),2&e&&(V(4),ui(n.data.text),V(4),U("mat-dialog-close",!0))},dependencies:[rb,qQ,pV,mV,gV]}),i})();function lR(i,t){const e="object"==typeof t;return new Promise((n,r)=>{const s=new fa({next:o=>{n(o),s.unsubscribe()},error:r,complete:()=>{e?n(t.defaultValue):r(new fm)}});i.subscribe(s)})}let Jl=(()=>{class i{constructor(e){this.ngZone=e,this.openedResource$=new Qe(null),this.openedResourcePath$=new Qe(null),eel.expose(this.wrapHandler(this.openFile),"open_file"),eel.on_angular_ready(),setTimeout(nt(function*(){for(;;){if(eel._websocket){eel._websocket.onclose=()=>window.close();break}yield new Promise(n=>setTimeout(n,0))}}),0)}wrapHandler(e){return(...n)=>{try{gt.assertInAngularZone(),e.bind(this)(...n)}catch{this.ngZone.run(e,this,n)}}}openFile(e,n=!1){var r=this;return nt(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 nt(function*(){yield eel.open_file_with_system_app(e)()})()}retrieveValue(e){return nt(function*(){return yield eel.retrieve_value(e)()})()}runCustomAction(e,n,r){return nt(function*(){return eel.run_custom_action(e,n,r)()})()}saveFile(e){var n=this;return nt(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 nt(function*(){return eel.serialize_resource(e,n)()})()}serializeResourceTmp(e,n,r={}){return nt(function*(){return eel.serialize_resource_tmp(e,n,r)()})()}serializeReversible(e,n){return nt(function*(){return eel.serialize_reversible(e,n)()})()}deserializeResource(e){return nt(function*(){return eel.deserialize_resource(e)()})()}}return i.\u0275fac=function(e){return new(e||i)(ee(gt))},i.\u0275prov=Pe({token:i,factory:i.\u0275fac,providedIn:"root"}),i})();var cR=ps(489);const EV=i=>!(!i||"object"!=typeof i),AV=(i={},t,e,n=[])=>{const r=[];if(EV(i)){const s=Object.entries(i);for(let o=0;o{class i{constructor(e){var n=this;this.eelDelegate=e,this._hasUnsavedChanges$=new Qe(!1),this.resource$=new Qe(null),this.error$=new Qe(null),this.customActionRunning$=new Qe(!1),this.changedDataBlocks={},this.dataBlockChange$=new Te,this.hideHiddenFields$=new Qe(!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=AV(r.schema,"is_recursive_ref",!0);for(const[o,a]of s){const l=o.block_class_mro;let c=r.schema,d=c.block_class_mro===l?c:void 0;for(const h of a.slice(0,a.length-1))!d&&c[h]?.block_class_mro===l&&(d=c[h]),c=c[h];c[a[a.length-1]]=d}this.resource$.next(r),this.error$.next(null)}else this.resource$.next(null),this.error$.next(null)}),this.dataBlockChange$.subscribe(function(){var r=nt(function*([s,o]){n.changedDataBlocks[s]=o,n.updateUnsavedChanges();const a=yield n.eelDelegate.retrieveValue(s);n.changedDataBlocks[s]==o&&((0,cR.isNumber)(o)?Math.abs(o-a)<1e-10:(0,cR.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 nt(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 nt(function*(){return s.processExternalChanges(e,()=>s.eelDelegate.runCustomAction(e,n,r))})()}deserializeResource(e){var n=this;return nt(function*(){return n.processExternalChanges(e,()=>n.eelDelegate.deserializeResource(e))})()}reloadResource(){var e=this;return nt(function*(){const n=e.eelDelegate.openedResourcePath$.getValue();n&&e.eelDelegate.openFile(n,!0).then()})()}saveResource(){var e=this;return nt(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)(ee(Jl))},i.\u0275prov=Pe({token:i,factory:i.\u0275fac,providedIn:"root"}),i})();function oJ(i,t){if(1&i){const e=jn();G(0,"div",2)(1,"button",3),Oe("click",function(){return Vt(e),Et(re().action())}),Be(2),j()()}if(2&i){const e=re();V(2),Qi(" ",e.data.action," ")}}const aJ=["label"];function lJ(i,t){}const cJ=Math.pow(2,31)-1;class dR{constructor(t,e){this._overlayRef=e,this._afterDismissed=new Te,this._afterOpened=new Te,this._onAction=new Te,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,cJ))}_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 DV=new me("MatSnackBarData");class ZM{constructor(){this.politeness="assertive",this.announcementMessage="",this.duration=0,this.data=null,this.horizontalPosition="center",this.verticalPosition="bottom"}}let dJ=(()=>{class i{}return i.\u0275fac=function(e){return new(e||i)},i.\u0275dir=ve({type:i,selectors:[["","matSnackBarLabel",""]],hostAttrs:[1,"mat-mdc-snack-bar-label","mdc-snackbar__label"]}),i})(),uJ=(()=>{class i{}return i.\u0275fac=function(e){return new(e||i)},i.\u0275dir=ve({type:i,selectors:[["","matSnackBarActions",""]],hostAttrs:[1,"mat-mdc-snack-bar-actions","mdc-snackbar__actions"]}),i})(),hJ=(()=>{class i{}return i.\u0275fac=function(e){return new(e||i)},i.\u0275dir=ve({type:i,selectors:[["","matSnackBarAction",""]],hostAttrs:[1,"mat-mdc-snack-bar-action","mdc-snackbar__action"]}),i})(),fJ=(()=>{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)(E(dR),E(DV))},i.\u0275cmp=ot({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&&(G(0,"div",0),Be(1),j(),fe(2,oJ,3,1,"div",1)),2&e&&(V(1),Qi(" ",n.data.message,"\n"),V(1),U("ngIf",n.hasAction))},dependencies:[_i,rb,dJ,uJ,hJ],styles:[".mat-mdc-simple-snack-bar{display:flex}"],encapsulation:2,changeDetection:0}),i})();const pJ={snackBarState:Oa("state",[Os("void, hidden",oi({transform:"scale(0.8)",opacity:0})),Os("visible",oi({transform:"scale(1)",opacity:1})),Or("* => visible",Yr("150ms cubic-bezier(0, 0, 0.2, 1)")),Or("* => void, * => hidden",Yr("75ms cubic-bezier(0.4, 0.0, 1, 1)",oi({opacity:0})))])};let mJ=0,gJ=(()=>{class i extends NM{constructor(e,n,r,s,o){super(),this._ngZone=e,this._elementRef=n,this._changeDetectorRef=r,this._platform=s,this.snackBarConfig=o,this._document=Lt(qt),this._trackedModals=new Set,this._announceDelay=150,this._destroyed=!1,this._onAnnounce=new Te,this._onExit=new Te,this._onEnter=new Te,this._animationState="void",this._liveElementId="mat-snack-bar-container-live-"+mJ++,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(Oi(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)(E(gt),E(vt),E(Qn),E(zi),E(ZM))},i.\u0275dir=ve({type:i,viewQuery:function(e,n){if(1&e&&$n(Am,7),2&e){let r;At(r=Dt())&&(n._portalOutlet=r.first)}},features:[dt]}),i})(),_J=(()=>{class i extends gJ{_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=si(i)))(n||i)}}(),i.\u0275cmp=ot({type:i,selectors:[["mat-snack-bar-container"]],viewQuery:function(e,n){if(1&e&&$n(aJ,7),2&e){let r;At(r=Dt())&&(n._label=r.first)}},hostAttrs:[1,"mdc-snackbar","mat-mdc-snack-bar-container","mdc-snackbar--open"],hostVars:1,hostBindings:function(e,n){1&e&&ND("@state.done",function(s){return n.onAnimationEnd(s)}),2&e&&Rw("@state",n._animationState)},features:[dt],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&&(G(0,"div",0)(1,"div",1,2)(3,"div",3),fe(4,lJ,0,0,"ng-template",4),j(),Ie(5,"div"),j()()),2&e&&(V(5),It("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:[pJ.snackBarState]}}),i})(),TV=(()=>{class i{}return i.\u0275fac=function(e){return new(e||i)},i.\u0275mod=en({type:i}),i.\u0275inj=Wt({imports:[Pm,Bh,co,KM,Jn,Jn]}),i})();const IV=new me("mat-snack-bar-default-options",{providedIn:"root",factory:function vJ(){return new ZM}});let yJ=(()=>{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=Gi.create({parent:n&&n.viewContainerRef&&n.viewContainerRef.injector||this._injector,providers:[{provide:ZM,useValue:n}]}),o=new Nh(this.snackBarContainerComponent,n.viewContainerRef,s),a=e.attach(o);return a.instance.snackBarConfig=n,a.instance}_attach(e,n){const r={...new ZM,...this._defaultConfig,...n},s=this._createOverlay(r),o=this._attachSnackBarContainer(s,r),a=new dR(o,s);if(e instanceof Eo){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 Nh(e,void 0,l),d=o.attachComponentPortal(c);a.instance=d.instance}return this._breakpointObserver.observe("(max-width: 599.98px) and (orientation: portrait)").pipe(Ue(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 Gi.create({parent:e&&e.viewContainerRef&&e.viewContainerRef.injector||this._injector,providers:[{provide:dR,useValue:n},{provide:DV,useValue:e.data}]})}}return i.\u0275fac=function(e){return new(e||i)(ee(as),ee(XI),ee(Gi),ee($I),ee(i,12),ee(IV))},i.\u0275prov=Pe({token:i,factory:i.\u0275fac}),i})(),RV=(()=>{class i extends yJ{constructor(e,n,r,s,o,a){super(e,n,r,s,o,a),this.simpleSnackBarComponent=fJ,this.snackBarContainerComponent=_J,this.handsetCssClass="mat-mdc-snack-bar-handset"}}return i.\u0275fac=function(e){return new(e||i)(ee(as),ee(XI),ee(Gi),ee($I),ee(i,12),ee(IV))},i.\u0275prov=Pe({token:i,factory:i.\u0275fac,providedIn:TV}),i})();const bJ=["*",[["mat-toolbar-row"]]],xJ=["*","mat-toolbar-row"],wJ=Jy(class{constructor(i){this._elementRef=i}});let MJ=(()=>{class i{}return i.\u0275fac=function(e){return new(e||i)},i.\u0275dir=ve({type:i,selectors:[["mat-toolbar-row"]],hostAttrs:[1,"mat-toolbar-row"],exportAs:["matToolbarRow"]}),i})(),CJ=(()=>{class i extends wJ{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)(E(vt),E(zi),E(qt))},i.\u0275cmp=ot({type:i,selectors:[["mat-toolbar"]],contentQueries:function(e,n,r){if(1&e&&Wi(r,MJ,5),2&e){let s;At(s=Dt())&&(n._toolbarRows=s)}},hostAttrs:[1,"mat-toolbar"],hostVars:4,hostBindings:function(e,n){2&e&&ln("mat-toolbar-multiple-rows",n._toolbarRows.length>0)("mat-toolbar-single-row",0===n._toolbarRows.length)},inputs:{color:"color"},exportAs:["matToolbar"],features:[dt],ngContentSelectors:xJ,decls:2,vars:0,template:function(e,n){1&e&&(or(bJ),Yt(0),Yt(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})(),SJ=(()=>{class i{}return i.\u0275fac=function(e){return new(e||i)},i.\u0275mod=en({type:i}),i.\u0275inj=Wt({imports:[Jn,Jn]}),i})(),EJ=(()=>{class i{constructor(){this._vertical=!1,this._inset=!1}get vertical(){return this._vertical}set vertical(e){this._vertical=tn(e)}get inset(){return this._inset}set inset(e){this._inset=tn(e)}}return i.\u0275fac=function(e){return new(e||i)},i.\u0275cmp=ot({type:i,selectors:[["mat-divider"]],hostAttrs:["role","separator",1,"mat-divider"],hostVars:7,hostBindings:function(e,n){2&e&&(It("aria-orientation",n.vertical?"vertical":"horizontal"),ln("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})(),kV=(()=>{class i{}return i.\u0275fac=function(e){return new(e||i)},i.\u0275mod=en({type:i}),i.\u0275inj=Wt({imports:[Jn,Jn]}),i})();const AJ=["tooltip"],PV=new me("mat-tooltip-scroll-strategy"),IJ={provide:PV,deps:[as],useFactory:function TJ(i){return()=>i.scrollStrategies.reposition({scrollThrottle:20})}},kJ=new me("mat-tooltip-default-options",{providedIn:"root",factory:function RJ(){return{showDelay:0,hideDelay:0,touchendHideDelay:1500}}}),OV="tooltip-panel",FV=Fh({passive:!0});let BJ=(()=>{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=tn(e),this._detach(),this._overlayRef=null}get disabled(){return this._disabled}set disabled(e){this._disabled=tn(e),this._disabled?this.hide(0):this._setupPointerEnterEventsIfNeeded()}get showDelay(){return this._showDelay}set showDelay(e){this._showDelay=Ps(e)}get hideDelay(){return this._hideDelay}set hideDelay(e){this._hideDelay=Ps(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,d,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 Te,this._scrollStrategy=d,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(Ue(this._destroyed)).subscribe(()=>{this._overlayRef&&this._updatePosition(this._overlayRef)})}ngAfterViewInit(){this._viewInitialized=!0,this._setupPointerEnterEventsIfNeeded(),this._focusMonitor.monitor(this._elementRef).pipe(Ue(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,FV)}),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 Nh(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(Ue(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 vt)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(Ue(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}-${OV}`,scrollStrategy:this._scrollStrategy()}),this._updatePosition(this._overlayRef),this._overlayRef.detachments().pipe(Ue(this._destroyed)).subscribe(()=>this._detach()),this._overlayRef.outsidePointerEvents().pipe(Ue(this._destroyed)).subscribe(()=>this._tooltipInstance?._handleBodyInteraction()),this._overlayRef.keydownEvents().pipe(Ue(this._destroyed)).subscribe(s=>{this._isTooltipVisible()&&27===s.keyCode&&!Qo(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(Oi(1),Ue(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}-${OV}-`;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,FV)})}_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){Co()},i.\u0275dir=ve({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})(),Fs=(()=>{class i extends BJ{constructor(e,n,r,s,o,a,l,c,d,h,p,m){super(e,n,r,s,o,a,l,c,d,h,p,m),this._tooltipComponent=VJ,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)(E(as),E(vt),E(Xy),E(jr),E(gt),E(zi),E(HZ),E(Xc),E(PV),E(Pa,8),E(kJ,8),E(qt))},i.\u0275dir=ve({type:i,selectors:[["","matTooltip",""]],hostAttrs:[1,"mat-mdc-tooltip-trigger"],exportAs:["matTooltip"],features:[dt]}),i})(),UJ=(()=>{class i{constructor(e,n){this._changeDetectorRef=e,this._closeOnInteraction=!1,this._isVisible=!1,this._onHide=new Te,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)(E(Qn),E(kr,8))},i.\u0275dir=ve({type:i}),i})(),VJ=(()=>{class i extends UJ{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)(E(Qn),E(vt),E(kr,8))},i.\u0275cmp=ot({type:i,selectors:[["mat-tooltip-component"]],viewQuery:function(e,n){if(1&e&&$n(AJ,7),2&e){let r;At(r=Dt())&&(n._tooltip=r.first)}},hostAttrs:["aria-hidden","true"],hostVars:2,hostBindings:function(e,n){1&e&&Oe("mouseleave",function(s){return n._handleMouseLeave(s)}),2&e&&qo("zoom",n.isVisible()?1:null)},features:[dt],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&&(G(0,"div",0,1),Oe("animationend",function(s){return n._handleAnimationEnd(s)}),G(2,"div",2),Be(3),j()()),2&e&&(ln("mdc-tooltip--multiline",n._isMultiline),U("ngClass",n.tooltipClass),V(3),ui(n.message))},dependencies:[hm],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})(),LV=(()=>{class i{}return i.\u0275fac=function(e){return new(e||i)},i.\u0275mod=en({type:i}),i.\u0275inj=Wt({providers:[IJ],imports:[UU,co,Pm,Jn,Jn,Ky]}),i})();function NV(...i){const t=M0(i),{args:e,keys:n}=zB(i),r=new In(s=>{const{length:o}=e;if(!o)return void s.complete();const a=new Array(o);let l=o,c=o;for(let d=0;d{h||(h=!0,c--),a[d]=p},()=>l--,void 0,()=>{(!l||!h)&&(c||s.next(n?HB(n,a):a),s.complete())}))}});return t?r.pipe(JT(t)):r}class uR{}class uu{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 uu?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 uu;return e.lazyInit=this.lazyInit&&this.lazyInit instanceof uu?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 zJ{encodeKey(t){return UV(t)}encodeValue(t){return UV(t)}decodeKey(t){return decodeURIComponent(t)}decodeValue(t){return decodeURIComponent(t)}}const $J=/%(\d[a-f0-9])/gi,GJ={40:"@","3A":":",24:"$","2C":",","3B":";","3D":"=","3F":"?","2F":"/"};function UV(i){return encodeURIComponent(i).replace($J,(t,e)=>GJ[e]??t)}function QM(i){return`${i}`}class hu{constructor(t={}){if(this.updates=null,this.cloneFrom=null,this.encoder=t.encoder||new zJ,t.fromString){if(t.fromObject)throw new Error("Cannot specify both fromString and fromObject.");this.map=function HJ(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 hu({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 WJ{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 VV(i){return typeof ArrayBuffer<"u"&&i instanceof ArrayBuffer}function zV(i){return typeof Blob<"u"&&i instanceof Blob}function HV(i){return typeof FormData<"u"&&i instanceof FormData}class sb{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 jJ(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 uu),this.context||(this.context=new WJ),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 sb(e,n,s,{params:c,headers:l,context:d,reportProgress:a,responseType:r,withCredentials:o})}}var ls=(()=>((ls=ls||{})[ls.Sent=0]="Sent",ls[ls.UploadProgress=1]="UploadProgress",ls[ls.ResponseHeader=2]="ResponseHeader",ls[ls.DownloadProgress=3]="DownloadProgress",ls[ls.Response=4]="Response",ls[ls.User=5]="User",ls))();class qJ{constructor(t,e=200,n="OK"){this.headers=t.headers||new uu,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 hR extends qJ{constructor(t={}){super(t),this.type=ls.Response,this.body=void 0!==t.body?t.body:null}clone(t={}){return new hR({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 fR(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 pR=(()=>{class i{constructor(e){this.handler=e}request(e,n,r={}){let s;if(e instanceof sb)s=e;else{let l,c;l=r.headers instanceof uu?r.headers:new uu(r.headers),r.params&&(c=r.params instanceof hu?r.params:new hu({fromObject:r.params})),s=new sb(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=mt(s).pipe(ru(l=>this.handler.handle(l)));if(e instanceof sb||"events"===r.observe)return o;const a=o.pipe(gn(l=>l instanceof hR));switch(r.observe||"body"){case"body":switch(s.responseType){case"arraybuffer":return a.pipe(tt(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(tt(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(tt(l=>{if(null!==l.body&&"string"!=typeof l.body)throw new Error("Response is not a string.");return l.body}));default:return a.pipe(tt(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 hu).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,fR(r,n))}post(e,n,r={}){return this.request("POST",e,fR(r,n))}put(e,n,r={}){return this.request("PUT",e,fR(r,n))}}return i.\u0275fac=function(e){return new(e||i)(ee(uR))},i.\u0275prov=Pe({token:i,factory:i.\u0275fac}),i})();const aee=["*"];let eC;function ob(i){return function lee(){if(void 0===eC&&(eC=null,typeof window<"u")){const i=window;void 0!==i.trustedTypes&&(eC=i.trustedTypes.createPolicy("angular#components",{createHTML:t=>t}))}return eC}()?.createHTML(i)||i}function KV(i){return Error(`Unable to find icon with the name "${i}"`)}function ZV(i){return Error(`The URL provided to MatIconRegistry was not trusted as a resource URL via Angular's DomSanitizer. Attempted URL was "${i}".`)}function QV(i){return Error(`The literal provided to MatIconRegistry was not trusted as safe HTML by Angular's DomSanitizer. Attempted literal was "${i}".`)}class zh{constructor(t,e,n){this.url=t,this.svgText=e,this.options=n}}let tC=(()=>{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 zh(r,null,s))}addSvgIconResolver(e){return this._resolvers.push(e),this}addSvgIconLiteralInNamespace(e,n,r,s){const o=this._sanitizer.sanitize(Zn.HTML,r);if(!o)throw QV(r);const a=ob(o);return this._addSvgIconConfig(e,n,new zh("",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 zh(n,null,r))}addSvgIconSetLiteralInNamespace(e,n,r){const s=this._sanitizer.sanitize(Zn.HTML,n);if(!s)throw QV(n);const o=ob(s);return this._addSvgIconSetConfig(e,new zh("",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(Zn.RESOURCE_URL,e);if(!n)throw ZV(e);const r=this._cachedIconsByUrl.get(n);return r?mt(nC(r)):this._loadSvgIconFromConfig(new zh(e,null)).pipe(Vi(s=>this._cachedIconsByUrl.set(n,s)),tt(s=>nC(s)))}getNamedSvgIcon(e,n=""){const r=JV(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(KV(r))}ngOnDestroy(){this._resolvers=[],this._svgIconConfigs.clear(),this._iconSetConfigs.clear(),this._cachedIconsByUrl.clear()}_getSvgFromConfig(e){return e.svgText?mt(nC(this._svgElementFromConfig(e))):this._loadSvgIconFromConfig(e).pipe(tt(n=>nC(n)))}_getSvgFromIconSetConfigs(e,n){const r=this._extractIconWithNameFromAnySet(e,n);return r?mt(r):NV(n.filter(o=>!o.svgText).map(o=>this._loadSvgIconSetFromConfig(o).pipe(jc(a=>{const c=`Loading icon set URL: ${this._sanitizer.sanitize(Zn.RESOURCE_URL,o.url)} failed: ${a.message}`;return this._errorHandler.handleError(new Error(c)),mt(null)})))).pipe(tt(()=>{const o=this._extractIconWithNameFromAnySet(e,n);if(!o)throw KV(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(Vi(n=>e.svgText=n),tt(()=>this._svgElementFromConfig(e)))}_loadSvgIconSetFromConfig(e){return e.svgText?mt(null):this._fetchIcon(e).pipe(Vi(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(ob(""));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(ob("")),r=e.attributes;for(let s=0;sob(c)),su(()=>this._inProgressUrlFetches.delete(o)),Vf());return this._inProgressUrlFetches.set(o,l),l}_addSvgIconConfig(e,n,r){return this._svgIconConfigs.set(JV(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:""}}}),ez=["clip-path","color-profile","src","cursor","fill","filter","marker","marker-start","marker-mid","marker-end","mask","stroke"],gee=ez.map(i=>`[${i}]`).join(", "),_ee=/^url\(['"]?#(.*?)['"]?\)$/;let gR=(()=>{class i extends hee{get inline(){return this._inline}set inline(e){this._inline=tn(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=Qt.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(gee),r=this._elementsWithExternalReferences=this._elementsWithExternalReferences||new Map;for(let s=0;s{const a=n[s],l=a.getAttribute(o),c=l?l.match(_ee):null;if(c){let d=r.get(a);d||(d=[],r.set(a,d)),d.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(Oi(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)(E(vt),E(tC),wa("aria-hidden"),E(pee),E(cl),E(fee,8))},i.\u0275cmp=ot({type:i,selectors:[["mat-icon"]],hostAttrs:["role","img",1,"mat-icon","notranslate"],hostVars:8,hostBindings:function(e,n){2&e&&(It("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),ln("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:[dt],ngContentSelectors:aee,decls:1,vars:0,template:function(e,n){1&e&&(or(),Yt(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})(),tz=(()=>{class i{}return i.\u0275fac=function(e){return new(e||i)},i.\u0275mod=en({type:i}),i.\u0275inj=Wt({imports:[Jn,Jn]}),i})(),nz=(()=>{class i{constructor(e){this.viewContainerRef=e}}return i.\u0275fac=function(e){return new(e||i)(E(jr))},i.\u0275dir=ve({type:i,selectors:[["","dataBlockUI",""]]}),i})(),vee=(()=>{class i{constructor(){this.resource=null,this.name="",this.resourceDescription="",this.changed=new $e}}return i.\u0275fac=function(e){return new(e||i)},i.\u0275cmp=ot({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&&(G(0,"p",0),Be(1),j()),2&e&&(U("matTooltip",n.resourceDescription),V(1),Dh("",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:[Fs],changeDetection:0}),i})();function yee(i,t){if(1&i&&(G(0,"h2",4),Be(1),j()),2&i){const e=re();U("matTooltip",e.resourceDescription),V(1),ui(e.name)}}function bee(i,t){1&i&&Ie(0,"app-block-actions",5),2&i&&U("resource",re().resource)}const xee=function(i,t,e,n){return{id:i,name:t,data:e,schema:n}};function wee(i,t){if(1&i&&Ie(0,"app-editor",7),2&i){const e=re().$implicit,n=re();U("resource",N2(3,xee,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 Mee(i,t){if(1&i&&(Gr(0),fe(1,wee,1,8,"app-editor",6),ct(2,"async"),Wr()),2&i){const e=t.$implicit,n=re();V(1),U("ngIf",!(ut(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 ec=(()=>{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 $e,this.destroyed$=new Te}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(Ue(this.destroyed$),gn(([n,r])=>!!this.resource&&n.startsWith(this.resource.id)&&!n.substring(this.resource.id.length+1).includes("/"))).subscribe(function(){var n=nt(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)(E(Fa))},i.\u0275cmp=ot({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&&(fe(0,yee,2,2,"h2",0),ct(1,"async"),fe(2,bee,1,1,"app-block-actions",1),G(3,"div",2),fe(4,Mee,3,3,"ng-container",3),j()),2&e){let r;U("ngIf",n.name&&n.name!=(null==(r=ut(1,4,n.main.resource$))?null:r.name)),V(2),U("ngIf",!n.hideBlockActions),V(2),U("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})(),iz=(()=>{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)(E(ll),E(vt))},i.\u0275dir=ve({type:i}),i})(),Hh=(()=>{class i extends iz{}return i.\u0275fac=function(){let t;return function(n){return(t||(t=si(i)))(n||i)}}(),i.\u0275dir=ve({type:i,features:[dt]}),i})();const Io=new me("NgValueAccessor"),See={provide:Io,useExisting:Gn(()=>_l),multi:!0},Aee=new me("CompositionEventMode");let _l=(()=>{class i extends iz{constructor(e,n,r){super(e,n),this._compositionMode=r,this._composing=!1,null==this._compositionMode&&(this._compositionMode=!function Eee(){const i=$c()?$c().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)(E(ll),E(vt),E(Aee,8))},i.\u0275dir=ve({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&&Oe("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:[Dn([See]),dt]}),i})();const Dee=!1;function fu(i){return null==i||("string"==typeof i||Array.isArray(i))&&0===i.length}function sz(i){return null!=i&&"number"==typeof i.length}const qr=new me("NgValidators"),pu=new me("NgAsyncValidators"),Tee=/^(?=.{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 vl{static min(t){return oz(t)}static max(t){return az(t)}static required(t){return function lz(i){return fu(i.value)?{required:!0}:null}(t)}static requiredTrue(t){return function cz(i){return!0===i.value?null:{required:!0}}(t)}static email(t){return function dz(i){return fu(i.value)||Tee.test(i.value)?null:{email:!0}}(t)}static minLength(t){return uz(t)}static maxLength(t){return hz(t)}static pattern(t){return function fz(i){if(!i)return iC;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(fu(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 yz(t)}static composeAsync(t){return bz(t)}}function oz(i){return t=>{if(fu(t.value)||fu(i))return null;const e=parseFloat(t.value);return!isNaN(e)&&e{if(fu(t.value)||fu(i))return null;const e=parseFloat(t.value);return!isNaN(e)&&e>i?{max:{max:i,actual:t.value}}:null}}function uz(i){return t=>fu(t.value)||!sz(t.value)?null:t.value.lengthsz(t.value)&&t.value.length>i?{maxlength:{requiredLength:i,actualLength:t.value.length}}:null}function iC(i){return null}function pz(i){return null!=i}function mz(i){const t=oy(i)?Ni(i):i;if(Dee&&!LD(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 pe(-1101,e)}return t}function gz(i){let t={};return i.forEach(e=>{t=null!=e?{...t,...e}:t}),0===Object.keys(t).length?null:t}function _z(i,t){return t.map(e=>e(i))}function vz(i){return i.map(t=>function Iee(i){return!i.validate}(t)?t:e=>t.validate(e))}function yz(i){if(!i)return null;const t=i.filter(pz);return 0==t.length?null:function(e){return gz(_z(e,t))}}function _R(i){return null!=i?yz(vz(i)):null}function bz(i){if(!i)return null;const t=i.filter(pz);return 0==t.length?null:function(e){return NV(_z(e,t).map(mz)).pipe(tt(gz))}}function vR(i){return null!=i?bz(vz(i)):null}function xz(i,t){return null===i?[t]:Array.isArray(i)?[...i,t]:[i,t]}function wz(i){return i._rawValidators}function Mz(i){return i._rawAsyncValidators}function yR(i){return i?Array.isArray(i)?i:[i]:[]}function rC(i,t){return Array.isArray(i)?i.includes(t):i===t}function Cz(i,t){const e=yR(t);return yR(i).forEach(r=>{rC(e,r)||e.push(r)}),e}function Sz(i,t){return yR(t).filter(e=>!rC(i,e))}class Ez{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=_R(this._rawValidators)}_setAsyncValidators(t){this._rawAsyncValidators=t||[],this._composedAsyncValidatorFn=vR(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 uo extends Ez{get formDirective(){return null}get path(){return null}}class tc extends Ez{constructor(){super(...arguments),this._parent=null,this.name=null,this.valueAccessor=null}}class Az{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 nc=(()=>{class i extends Az{constructor(e){super(e)}}return i.\u0275fac=function(e){return new(e||i)(E(tc,2))},i.\u0275dir=ve({type:i,selectors:[["","formControlName",""],["","ngModel",""],["","formControl",""]],hostVars:14,hostBindings:function(e,n){2&e&&ln("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:[dt]}),i})(),bR=(()=>{class i extends Az{constructor(e){super(e)}}return i.\u0275fac=function(e){return new(e||i)(E(uo,10))},i.\u0275dir=ve({type:i,selectors:[["","formGroupName",""],["","formArrayName",""],["","ngModelGroup",""],["","formGroup",""],["form",3,"ngNoForm",""],["","ngForm",""]],hostVars:16,hostBindings:function(e,n){2&e&&ln("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:[dt]}),i})();function Dz(i,t){return i?`with name: '${t}'`:`at index: ${t}`}const MR=!1,ab="VALID",oC="INVALID",zm="PENDING",lb="DISABLED";function CR(i){return(aC(i)?i.validators:i)||null}function SR(i,t){return(aC(t)?t.asyncValidators:i)||null}function aC(i){return null!=i&&!Array.isArray(i)&&"object"==typeof i}function Tz(i,t,e){const n=i.controls;if(!(t?Object.keys(n):n).length)throw new pe(1e3,MR?function Oee(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 pe(1001,MR?function Fee(i,t){return`Cannot find form control ${Dz(i,t)}`}(t,e):"")}function Iz(i,t,e){i._forEachChild((n,r)=>{if(void 0===e[r])throw new pe(1002,MR?function Lee(i,t){return`Must supply a value for form control ${Dz(i,t)}`}(t,r):"")})}class lC{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===ab}get invalid(){return this.status===oC}get pending(){return this.status==zm}get disabled(){return this.status===lb}get enabled(){return this.status!==lb}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(Cz(t,this._rawValidators))}addAsyncValidators(t){this.setAsyncValidators(Cz(t,this._rawAsyncValidators))}removeValidators(t){this.setValidators(Sz(t,this._rawValidators))}removeAsyncValidators(t){this.setAsyncValidators(Sz(t,this._rawAsyncValidators))}hasValidator(t){return rC(this._rawValidators,t)}hasAsyncValidator(t){return rC(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=lb,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=ab,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===ab||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()?lb:ab}_runValidator(){return this.validator?this.validator(this):null}_runAsyncValidator(t){if(this.asyncValidator){this.status=zm,this._hasOwnPendingAsyncValidator=!0;const e=mz(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 $e,this.statusChanges=new $e}_calculateStatus(){return this._allControlsDisabled()?lb:this.errors?oC:this._hasOwnPendingAsyncValidator||this._anyControlsHaveStatus(zm)?zm:this._anyControlsHaveStatus(oC)?oC:ab}_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){aC(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 Nee(i){return Array.isArray(i)?_R(i):i||null}(this._rawValidators)}_assignAsyncValidators(t){this._rawAsyncValidators=Array.isArray(t)?t.slice():t,this._composedAsyncValidatorFn=function Bee(i){return Array.isArray(i)?vR(i):i||null}(this._rawAsyncValidators)}}class Hm extends lC{constructor(t,e,n){super(CR(e),SR(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={}){Iz(this,!0,t),Object.keys(t).forEach(n=>{Tz(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 Rz extends Hm{}const $h=new me("CallSetDisabledState",{providedIn:"root",factory:()=>cb}),cb="always";function cC(i,t){return[...t.path,i]}function db(i,t,e=cb){ER(i,t),t.valueAccessor.writeValue(i.value),(i.disabled||"always"===e)&&t.valueAccessor.setDisabledState?.(i.disabled),function Vee(i,t){t.valueAccessor.registerOnChange(e=>{i._pendingValue=e,i._pendingChange=!0,i._pendingDirty=!0,"change"===i.updateOn&&kz(i,t)})}(i,t),function Hee(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 zee(i,t){t.valueAccessor.registerOnTouched(()=>{i._pendingTouched=!0,"blur"===i.updateOn&&i._pendingChange&&kz(i,t),"submit"!==i.updateOn&&i.markAsTouched()})}(i,t),function Uee(i,t){if(t.valueAccessor.setDisabledState){const e=n=>{t.valueAccessor.setDisabledState(n)};i.registerOnDisabledChange(e),t._registerOnDestroy(()=>{i._unregisterOnDisabledChange(e)})}}(i,t)}function dC(i,t,e=!0){const n=()=>{};t.valueAccessor&&(t.valueAccessor.registerOnChange(n),t.valueAccessor.registerOnTouched(n)),hC(i,t),i&&(t._invokeOnDestroyCallbacks(),i._registerOnCollectionChange(()=>{}))}function uC(i,t){i.forEach(e=>{e.registerOnValidatorChange&&e.registerOnValidatorChange(t)})}function ER(i,t){const e=wz(i);null!==t.validator?i.setValidators(xz(e,t.validator)):"function"==typeof e&&i.setValidators([e]);const n=Mz(i);null!==t.asyncValidator?i.setAsyncValidators(xz(n,t.asyncValidator)):"function"==typeof n&&i.setAsyncValidators([n]);const r=()=>i.updateValueAndValidity();uC(t._rawValidators,r),uC(t._rawAsyncValidators,r)}function hC(i,t){let e=!1;if(null!==i){if(null!==t.validator){const r=wz(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=Mz(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 uC(t._rawValidators,n),uC(t._rawAsyncValidators,n),e}function kz(i,t){i._pendingDirty&&i.markAsDirty(),i.setValue(i._pendingValue,{emitModelToViewChange:!1}),t.viewToModelUpdate(i._pendingValue),i._pendingChange=!1}function Pz(i,t){ER(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 Oz(i,t){i._syncPendingControls(),t.forEach(e=>{const n=e.control;"submit"===n.updateOn&&n._pendingChange&&(e.viewToModelUpdate(n._pendingValue),n._pendingChange=!1)})}function TR(i,t){if(!t)return null;let e,n,r;return Array.isArray(t),t.forEach(s=>{s.constructor===_l?e=s:function Wee(i){return Object.getPrototypeOf(i.constructor)===Hh}(s)?n=s:r=s}),r||n||e||null}const Yee={provide:uo,useExisting:Gn(()=>hb)},ub=(()=>Promise.resolve())();let hb=(()=>{class i extends uo{constructor(e,n,r){super(),this.callSetDisabledState=r,this.submitted=!1,this._directives=new Set,this.ngSubmit=new $e,this.form=new Hm({},_R(e),vR(n))}ngAfterViewInit(){this._setUpdateStrategy()}get formDirective(){return this}get control(){return this.form}get path(){return[]}get controls(){return this.form.controls}addControl(e){ub.then(()=>{const n=this._findContainer(e.path);e.control=n.registerControl(e.name,e.control),db(e.control,e,this.callSetDisabledState),e.control.updateValueAndValidity({emitEvent:!1}),this._directives.add(e)})}getControl(e){return this.form.get(e.path)}removeControl(e){ub.then(()=>{const n=this._findContainer(e.path);n&&n.removeControl(e.name),this._directives.delete(e)})}addFormGroup(e){ub.then(()=>{const n=this._findContainer(e.path),r=new Hm({});Pz(r,e),n.registerControl(e.name,r),r.updateValueAndValidity({emitEvent:!1})})}removeFormGroup(e){ub.then(()=>{const n=this._findContainer(e.path);n&&n.removeControl(e.name)})}getFormGroup(e){return this.form.get(e.path)}updateModel(e,n){ub.then(()=>{this.form.get(e.path).setValue(n)})}setValue(e){this.control.setValue(e)}onSubmit(e){return this.submitted=!0,Oz(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)(E(qr,10),E(pu,10),E($h,8))},i.\u0275dir=ve({type:i,selectors:[["form",3,"ngNoForm","",3,"formGroup",""],["ng-form"],["","ngForm",""]],hostBindings:function(e,n){1&e&&Oe("submit",function(s){return n.onSubmit(s)})("reset",function(){return n.onReset()})},inputs:{options:["ngFormOptions","options"]},outputs:{ngSubmit:"ngSubmit"},exportAs:["ngForm"],features:[Dn([Yee]),dt]}),i})();function Fz(i,t){const e=i.indexOf(t);e>-1&&i.splice(e,1)}function Lz(i){return"object"==typeof i&&null!==i&&2===Object.keys(i).length&&"value"in i&&"disabled"in i}const ic=class extends lC{constructor(t=null,e,n){super(CR(e),SR(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}),aC(e)&&(e.nonNullable||e.initialValueIsDefault)&&(this.defaultValue=Lz(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){Fz(this._onChange,t)}registerOnDisabledChange(t){this._onDisabledChange.push(t)}_unregisterOnDisabledChange(t){Fz(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){Lz(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}},Kee={provide:tc,useExisting:Gn(()=>Zc)},Uz=(()=>Promise.resolve())();let Zc=(()=>{class i extends tc{constructor(e,n,r,s,o,a){super(),this._changeDetectorRef=o,this.callSetDisabledState=a,this.control=new ic,this._registered=!1,this.update=new $e,this._parent=e,this._setValidators(n),this._setAsyncValidators(r),this.valueAccessor=TR(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(){db(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){Uz.then(()=>{this.control.setValue(e,{emitViewToModelChange:!1}),this._changeDetectorRef?.markForCheck()})}_updateDisabled(e){const n=e.isDisabled.currentValue,r=0!==n&&function um(i){return"boolean"==typeof i?i:null!=i&&"false"!==i}(n);Uz.then(()=>{r&&!this.control.disabled?this.control.disable():!r&&this.control.disabled&&this.control.enable(),this._changeDetectorRef?.markForCheck()})}_getPath(e){return this._parent?cC(e,this._parent):[e]}}return i.\u0275fac=function(e){return new(e||i)(E(uo,9),E(qr,10),E(pu,10),E(Io,10),E(Qn,8),E($h,8))},i.\u0275dir=ve({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:[Dn([Kee]),dt,xi]}),i})(),IR=(()=>{class i{}return i.\u0275fac=function(e){return new(e||i)},i.\u0275dir=ve({type:i,selectors:[["form",3,"ngNoForm","",3,"ngNativeValidate",""]],hostAttrs:["novalidate",""]}),i})();const Zee={provide:Io,useExisting:Gn(()=>mu),multi:!0};let mu=(()=>{class i extends Hh{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=si(i)))(n||i)}}(),i.\u0275dir=ve({type:i,selectors:[["input","type","number","formControlName",""],["input","type","number","formControl",""],["input","type","number","ngModel",""]],hostBindings:function(e,n){1&e&&Oe("input",function(s){return n.onChange(s.target.value)})("blur",function(){return n.onTouched()})},features:[Dn([Zee]),dt]}),i})(),Vz=(()=>{class i{}return i.\u0275fac=function(e){return new(e||i)},i.\u0275mod=en({type:i}),i.\u0275inj=Wt({}),i})();const RR=new me("NgModelWithFormControlWarning"),nte={provide:uo,useExisting:Gn(()=>Gh)};let Gh=(()=>{class i extends uo{constructor(e,n,r){super(),this.callSetDisabledState=r,this.submitted=!1,this._onCollectionChange=()=>this._updateDomValue(),this.directives=[],this.form=null,this.ngSubmit=new $e,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&&(hC(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 db(n,e,this.callSetDisabledState),n.updateValueAndValidity({emitEvent:!1}),this.directives.push(e),n}getControl(e){return this.form.get(e.path)}removeControl(e){dC(e.control||null,e,!1),function jee(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,Oz(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&&(dC(n||null,e),(i=>i instanceof ic)(r)&&(db(r,e,this.callSetDisabledState),e.control=r))}),this.form._updateTreeValidity({emitEvent:!1})}_setUpFormContainer(e){const n=this.form.get(e.path);Pz(n,e),n.updateValueAndValidity({emitEvent:!1})}_cleanUpFormContainer(e){if(this.form){const n=this.form.get(e.path);n&&function $ee(i,t){return hC(i,t)}(n,e)&&n.updateValueAndValidity({emitEvent:!1})}}_updateRegistrations(){this.form._registerOnCollectionChange(this._onCollectionChange),this._oldForm&&this._oldForm._registerOnCollectionChange(()=>{})}_updateValidators(){ER(this.form,this),this._oldForm&&hC(this._oldForm,this)}_checkFormPresent(){}}return i.\u0275fac=function(e){return new(e||i)(E(qr,10),E(pu,10),E($h,8))},i.\u0275dir=ve({type:i,selectors:[["","formGroup",""]],hostBindings:function(e,n){1&e&&Oe("submit",function(s){return n.onSubmit(s)})("reset",function(){return n.onReset()})},inputs:{form:["formGroup","form"]},outputs:{ngSubmit:"ngSubmit"},exportAs:["ngForm"],features:[Dn([nte]),dt,xi]}),i})();const ste={provide:tc,useExisting:Gn(()=>fC)};let fC=(()=>{class i extends tc{set isDisabled(e){}constructor(e,n,r,s,o){super(),this._ngModelWarningConfig=o,this._added=!1,this.update=new $e,this._ngModelWarningSent=!1,this._parent=e,this._setValidators(n),this._setAsyncValidators(r),this.valueAccessor=TR(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 cC(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)(E(uo,13),E(qr,10),E(pu,10),E(Io,10),E(RR,8))},i.\u0275dir=ve({type:i,selectors:[["","formControlName",""]],inputs:{name:["formControlName","name"],isDisabled:["disabled","isDisabled"],model:["ngModel","model"]},outputs:{update:"ngModelChange"},features:[Dn([ste]),dt,xi]}),i})();function Yz(i){return"number"==typeof i?i:parseInt(i,10)}function qz(i){return"number"==typeof i?i:parseFloat(i)}let Wh=(()=>{class i{constructor(){this._validator=iC}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):iC,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=ve({type:i,features:[xi]}),i})();const hte={provide:qr,useExisting:Gn(()=>gu),multi:!0};let gu=(()=>{class i extends Wh{constructor(){super(...arguments),this.inputName="max",this.normalizeInput=e=>qz(e),this.createValidator=e=>az(e)}}return i.\u0275fac=function(){let t;return function(n){return(t||(t=si(i)))(n||i)}}(),i.\u0275dir=ve({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&&It("max",n._enabled?n.max:null)},inputs:{max:"max"},features:[Dn([hte]),dt]}),i})();const fte={provide:qr,useExisting:Gn(()=>_u),multi:!0};let _u=(()=>{class i extends Wh{constructor(){super(...arguments),this.inputName="min",this.normalizeInput=e=>qz(e),this.createValidator=e=>oz(e)}}return i.\u0275fac=function(){let t;return function(n){return(t||(t=si(i)))(n||i)}}(),i.\u0275dir=ve({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&&It("min",n._enabled?n.min:null)},inputs:{min:"min"},features:[Dn([fte]),dt]}),i})();const _te={provide:qr,useExisting:Gn(()=>NR),multi:!0};let NR=(()=>{class i extends Wh{constructor(){super(...arguments),this.inputName="minlength",this.normalizeInput=e=>Yz(e),this.createValidator=e=>uz(e)}}return i.\u0275fac=function(){let t;return function(n){return(t||(t=si(i)))(n||i)}}(),i.\u0275dir=ve({type:i,selectors:[["","minlength","","formControlName",""],["","minlength","","formControl",""],["","minlength","","ngModel",""]],hostVars:1,hostBindings:function(e,n){2&e&&It("minlength",n._enabled?n.minlength:null)},inputs:{minlength:"minlength"},features:[Dn([_te]),dt]}),i})();const vte={provide:qr,useExisting:Gn(()=>BR),multi:!0};let BR=(()=>{class i extends Wh{constructor(){super(...arguments),this.inputName="maxlength",this.normalizeInput=e=>Yz(e),this.createValidator=e=>hz(e)}}return i.\u0275fac=function(){let t;return function(n){return(t||(t=si(i)))(n||i)}}(),i.\u0275dir=ve({type:i,selectors:[["","maxlength","","formControlName",""],["","maxlength","","formControl",""],["","maxlength","","ngModel",""]],hostVars:1,hostBindings:function(e,n){2&e&&It("maxlength",n._enabled?n.maxlength:null)},inputs:{maxlength:"maxlength"},features:[Dn([vte]),dt]}),i})(),Qz=(()=>{class i{}return i.\u0275fac=function(e){return new(e||i)},i.\u0275mod=en({type:i}),i.\u0275inj=Wt({imports:[Vz]}),i})();class Jz extends lC{constructor(t,e,n){super(CR(e),SR(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={}){Iz(this,!1,t),t.forEach((n,r)=>{Tz(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 eH(i){return!!i&&(void 0!==i.asyncValidators||void 0!==i.validators||void 0!==i.updateOn)}let bte=(()=>{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 eH(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 Rz(r,n)}control(e,n,r){let s={};return this.useNonNullable?(eH(n)?s=n:(s.validators=n,s.asyncValidators=r),new ic(e,{...s,nonNullable:!0})):new ic(e,n,r)}array(e,n,r){const s=e.map(o=>this._createControl(o));return new Jz(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 ic||e instanceof lC?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=Pe({token:i,factory:i.\u0275fac,providedIn:"root"}),i})(),tH=(()=>{class i{static withConfig(e){return{ngModule:i,providers:[{provide:$h,useValue:e.callSetDisabledState??cb}]}}}return i.\u0275fac=function(e){return new(e||i)},i.\u0275mod=en({type:i}),i.\u0275inj=Wt({imports:[Qz]}),i})(),nH=(()=>{class i{static withConfig(e){return{ngModule:i,providers:[{provide:RR,useValue:e.warnOnNgModelWithFormControl??"always"},{provide:$h,useValue:e.callSetDisabledState??cb}]}}}return i.\u0275fac=function(e){return new(e||i)},i.\u0275mod=en({type:i}),i.\u0275inj=Wt({imports:[Qz]}),i})();const xte=["matFormFieldNotchedOutline",""],wte=["*"],Mte=["textField"],Cte=["iconPrefixContainer"],Ste=["textPrefixContainer"];function Ete(i,t){1&i&&Ie(0,"span",19)}function Ate(i,t){if(1&i){const e=jn();G(0,"label",17),Oe("cdkObserveContent",function(){return Vt(e),Et(re(2)._refreshOutlineNotchWidth())}),Yt(1,1),fe(2,Ete,1,0,"span",18),j()}if(2&i){const e=re(2);U("floating",e._shouldLabelFloat())("cdkObserveContentDisabled",!e._hasOutline())("id",e._labelId),It("for",e._control.id)("aria-owns",e._control.id),V(2),U("ngIf",!e.hideRequiredMarker&&e._control.required)}}function Dte(i,t){1&i&&fe(0,Ate,3,6,"label",16),2&i&&U("ngIf",re()._hasFloatingLabel())}function Tte(i,t){1&i&&Ie(0,"div",20)}function Ite(i,t){}function Rte(i,t){1&i&&fe(0,Ite,0,0,"ng-template",22),2&i&&(re(2),U("ngTemplateOutlet",Zi(1)))}function kte(i,t){if(1&i&&(G(0,"div",21),fe(1,Rte,1,1,"ng-template",9),j()),2&i){const e=re();U("matFormFieldNotchedOutlineOpen",e._shouldLabelFloat())("matFormFieldNotchedOutlineLabelWidth",e._labelWidth),V(1),U("ngIf",!e._forceDisplayInfixLabel())}}function Pte(i,t){1&i&&(G(0,"div",23,24),Yt(2,2),j())}function Ote(i,t){1&i&&(G(0,"div",25,26),Yt(2,3),j())}function Fte(i,t){}function Lte(i,t){1&i&&fe(0,Fte,0,0,"ng-template",22),2&i&&(re(),U("ngTemplateOutlet",Zi(1)))}function Nte(i,t){1&i&&(G(0,"div",27),Yt(1,4),j())}function Bte(i,t){1&i&&(G(0,"div",28),Yt(1,5),j())}function Ute(i,t){1&i&&Ie(0,"div",29)}function Vte(i,t){1&i&&(G(0,"div",30),Yt(1,6),j()),2&i&&U("@transitionMessages",re()._subscriptAnimationState)}function zte(i,t){if(1&i&&(G(0,"mat-hint",34),Be(1),j()),2&i){const e=re(2);U("id",e._hintLabelId),V(1),ui(e.hintLabel)}}function Hte(i,t){if(1&i&&(G(0,"div",31),fe(1,zte,2,2,"mat-hint",32),Yt(2,7),Ie(3,"div",33),Yt(4,8),j()),2&i){const e=re();U("@transitionMessages",e._subscriptAnimationState),V(1),U("ngIf",e.hintLabel)}}const $te=["*",[["mat-label"]],[["","matPrefix",""],["","matIconPrefix",""]],[["","matTextPrefix",""]],[["","matTextSuffix",""]],[["","matSuffix",""],["","matIconSuffix",""]],[["mat-error"],["","matError",""]],[["mat-hint",3,"align","end"]],[["mat-hint","align","end"]]],Gte=["*","mat-label","[matPrefix], [matIconPrefix]","[matTextPrefix]","[matTextSuffix]","[matSuffix], [matIconSuffix]","mat-error, [matError]","mat-hint:not([align='end'])","mat-hint[align='end']"];let Ro=(()=>{class i{}return i.\u0275fac=function(e){return new(e||i)},i.\u0275dir=ve({type:i,selectors:[["mat-label"]]}),i})(),Wte=0;const iH=new me("MatError");let jte=(()=>{class i{constructor(e,n){this.id="mat-mdc-error-"+Wte++,e||n.nativeElement.setAttribute("aria-live","polite")}}return i.\u0275fac=function(e){return new(e||i)(wa("aria-live"),E(vt))},i.\u0275dir=ve({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&&ql("id",n.id)},inputs:{id:"id"},features:[Dn([{provide:iH,useExisting:i}])]}),i})(),Yte=0,rH=(()=>{class i{constructor(){this.align="start",this.id="mat-mdc-hint-"+Yte++}}return i.\u0275fac=function(e){return new(e||i)},i.\u0275dir=ve({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&&(ql("id",n.id),It("align",null),ln("mat-mdc-form-field-hint-end","end"===n.align))},inputs:{align:"align",id:"id"}}),i})();const sH=new me("MatPrefix");let qte=(()=>{class i{constructor(){this._isText=!1}set _isTextSelector(e){this._isText=!0}}return i.\u0275fac=function(e){return new(e||i)},i.\u0275dir=ve({type:i,selectors:[["","matPrefix",""],["","matIconPrefix",""],["","matTextPrefix",""]],inputs:{_isTextSelector:["matTextPrefix","_isTextSelector"]},features:[Dn([{provide:sH,useExisting:i}])]}),i})();const oH=new me("MatSuffix");let Xte=(()=>{class i{constructor(){this._isText=!1}set _isTextSelector(e){this._isText=!0}}return i.\u0275fac=function(e){return new(e||i)},i.\u0275dir=ve({type:i,selectors:[["","matSuffix",""],["","matIconSuffix",""],["","matTextSuffix",""]],inputs:{_isTextSelector:["matTextSuffix","_isTextSelector"]},features:[Dn([{provide:oH,useExisting:i}])]}),i})(),aH=(()=>{class i{constructor(e){this._elementRef=e,this.floating=!1}getWidth(){return function Kte(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)(E(vt))},i.\u0275dir=ve({type:i,selectors:[["label","matFormFieldFloatingLabel",""]],hostAttrs:[1,"mdc-floating-label","mat-mdc-floating-label"],hostVars:2,hostBindings:function(e,n){2&e&&ln("mdc-floating-label--float-above",n.floating)},inputs:{floating:"floating"}}),i})();const lH="mdc-line-ripple--active",pC="mdc-line-ripple--deactivating";let cH=(()=>{class i{constructor(e,n){this._elementRef=e,this._handleTransitionEnd=r=>{const s=this._elementRef.nativeElement.classList,o=s.contains(pC);"opacity"===r.propertyName&&o&&s.remove(lH,pC)},n.runOutsideAngular(()=>{e.nativeElement.addEventListener("transitionend",this._handleTransitionEnd)})}activate(){const e=this._elementRef.nativeElement.classList;e.remove(pC),e.add(lH)}deactivate(){this._elementRef.nativeElement.classList.add(pC)}ngOnDestroy(){this._elementRef.nativeElement.removeEventListener("transitionend",this._handleTransitionEnd)}}return i.\u0275fac=function(e){return new(e||i)(E(vt),E(gt))},i.\u0275dir=ve({type:i,selectors:[["div","matFormFieldLineRipple",""]],hostAttrs:[1,"mdc-line-ripple"]}),i})(),dH=(()=>{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)(E(vt),E(gt))},i.\u0275cmp=ot({type:i,selectors:[["div","matFormFieldNotchedOutline",""]],hostAttrs:[1,"mdc-notched-outline"],hostVars:2,hostBindings:function(e,n){2&e&&ln("mdc-notched-outline--notched",n.open)},inputs:{labelWidth:["matFormFieldNotchedOutlineLabelWidth","labelWidth"],open:["matFormFieldNotchedOutlineOpen","open"]},attrs:xte,ngContentSelectors:wte,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&&(or(),Ie(0,"div",0),G(1,"div",1),Yt(2),j(),Ie(3,"div",2)),2&e&&(V(1),qo("width",n._getNotchWidth()))},encapsulation:2,changeDetection:0}),i})();const Zte={transitionMessages:Oa("transitionMessages",[Os("enter",oi({opacity:1,transform:"translateY(0%)"})),Or("void => enter",[oi({opacity:0,transform:"translateY(-5px)"}),Yr("300ms cubic-bezier(0.55, 0, 0.55, 0.2)")])])};let UR=(()=>{class i{}return i.\u0275fac=function(e){return new(e||i)},i.\u0275dir=ve({type:i}),i})();const mC=new me("MatFormField"),Qte=new me("MAT_FORM_FIELD_DEFAULT_OPTIONS");let uH=0,yl=(()=>{class i{get hideRequiredMarker(){return this._hideRequiredMarker}set hideRequiredMarker(e){this._hideRequiredMarker=tn(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-"+uH++,this._hintLabelId="mat-mdc-hint-"+uH++,this._subscriptAnimationState="",this._labelWidth=0,this._destroyed=new Te,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(Ue(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(),Cr(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(Ue(this._destroyed)).subscribe(()=>{this._needsOutlineLabelOffsetUpdateOnStable&&(this._needsOutlineLabelOffsetUpdateOnStable=!1,this._updateOutlineLabelOffset())})}),this._dir.change.pipe(Ue(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)(E(vt),E(Qn),E(gt),E(Pa),E(zi),E(Qte,8),E(kr,8),E(qt))},i.\u0275cmp=ot({type:i,selectors:[["mat-form-field"]],contentQueries:function(e,n,r){if(1&e&&(Wi(r,Ro,5),Wi(r,Ro,7),Wi(r,UR,5),Wi(r,sH,5),Wi(r,oH,5),Wi(r,iH,5),Wi(r,rH,5)),2&e){let s;At(s=Dt())&&(n._labelChildNonStatic=s.first),At(s=Dt())&&(n._labelChildStatic=s.first),At(s=Dt())&&(n._formFieldControl=s.first),At(s=Dt())&&(n._prefixChildren=s),At(s=Dt())&&(n._suffixChildren=s),At(s=Dt())&&(n._errorChildren=s),At(s=Dt())&&(n._hintChildren=s)}},viewQuery:function(e,n){if(1&e&&($n(Mte,5),$n(Cte,5),$n(Ste,5),$n(aH,5),$n(dH,5),$n(cH,5)),2&e){let r;At(r=Dt())&&(n._textField=r.first),At(r=Dt())&&(n._iconPrefixContainer=r.first),At(r=Dt())&&(n._textPrefixContainer=r.first),At(r=Dt())&&(n._floatingLabel=r.first),At(r=Dt())&&(n._notchedOutline=r.first),At(r=Dt())&&(n._lineRipple=r.first)}},hostAttrs:[1,"mat-mdc-form-field"],hostVars:42,hostBindings:function(e,n){2&e&&ln("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:[Dn([{provide:mC,useExisting:i}])],ngContentSelectors:Gte,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&&(or($te),fe(0,Dte,1,1,"ng-template",null,0,zc),G(2,"div",1,2),Oe("click",function(s){return n._control.onContainerClick&&n._control.onContainerClick(s)}),fe(4,Tte,1,0,"div",3),G(5,"div",4),fe(6,kte,2,3,"div",5),fe(7,Pte,3,0,"div",6),fe(8,Ote,3,0,"div",7),G(9,"div",8),fe(10,Lte,1,1,"ng-template",9),Yt(11),j(),fe(12,Nte,2,0,"div",10),fe(13,Bte,2,0,"div",11),j(),fe(14,Ute,1,0,"div",12),j(),G(15,"div",13),fe(16,Vte,2,1,"div",14),fe(17,Hte,5,2,"div",15),j()),2&e&&(V(2),ln("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),V(2),U("ngIf",!n._hasOutline()&&!n._control.disabled),V(2),U("ngIf",n._hasOutline()),V(1),U("ngIf",n._hasIconPrefix),V(1),U("ngIf",n._hasTextPrefix),V(2),U("ngIf",!n._hasOutline()||n._forceDisplayInfixLabel()),V(2),U("ngIf",n._hasTextSuffix),V(1),U("ngIf",n._hasIconSuffix),V(1),U("ngIf",!n._hasOutline()),V(1),ln("mat-mdc-form-field-subscript-dynamic-size","dynamic"===n.subscriptSizing),U("ngSwitch",n._getDisplayedMessages()),V(1),U("ngSwitchCase","error"),V(1),U("ngSwitchCase","hint"))},dependencies:[_i,xy,by,VT,SU,rH,aH,dH,cH],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:[Zte.transitionMessages]},changeDetection:0}),i})(),gC=(()=>{class i{}return i.\u0275fac=function(e){return new(e||i)},i.\u0275mod=en({type:i}),i.\u0275inj=Wt({imports:[Jn,co,HI,Jn]}),i})();const pH=Fh({passive:!0});let tne=(()=>{class i{constructor(e,n){this._platform=e,this._ngZone=n,this._monitoredElements=new Map}monitor(e){if(!this._platform.isBrowser)return _o;const n=qc(e),r=this._monitoredElements.get(n);if(r)return r.subject;const s=new Te,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,pH),n.classList.add("cdk-text-field-autofill-monitored")}),this._monitoredElements.set(n,{subject:s,unlisten:()=>{n.removeEventListener("animationstart",a,pH)}}),s}stopMonitoring(e){const n=qc(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)(ee(zi),ee(gt))},i.\u0275prov=Pe({token:i,factory:i.\u0275fac,providedIn:"root"}),i})(),nne=(()=>{class i{}return i.\u0275fac=function(e){return new(e||i)},i.\u0275mod=en({type:i}),i.\u0275inj=Wt({}),i})();const VR=new me("MAT_INPUT_VALUE_ACCESSOR"),ine=["button","checkbox","file","hidden","image","radio","range","reset","submit"];let rne=0;const sne=WU(class{constructor(i,t,e,n){this._defaultErrorStateMatcher=i,this._parentForm=t,this._parentFormGroup=e,this.ngControl=n,this.stateChanges=new Te}});let rc=(()=>{class i extends sne{get disabled(){return this._disabled}set disabled(e){this._disabled=tn(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(vl.required)??!1}set required(e){this._required=tn(e)}get type(){return this._type}set type(e){this._type=e||"text",this._validateType(),!this._isTextarea&&aU().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=tn(e)}constructor(e,n,r,s,o,a,l,c,d,h){super(a,s,o,r),this._elementRef=e,this._platform=n,this._autofillMonitor=c,this._formField=h,this._uid="mat-input-"+rne++,this.focused=!1,this.stateChanges=new Te,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=>aU().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&&d.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(){ine.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)(E(vt),E(zi),E(tc,10),E(hb,8),E(Gh,8),E(YU),E(VR,10),E(tne),E(gt),E(mC,8))},i.\u0275dir=ve({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&&Oe("focus",function(){return n._focusChanged(!0)})("blur",function(){return n._focusChanged(!1)})("input",function(){return n._onInput()}),2&e&&(ql("id",n.id)("disabled",n.disabled)("required",n.required),It("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),ln("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:[Dn([{provide:UR,useExisting:i}]),dt,xi]}),i})(),mH=(()=>{class i{}return i.\u0275fac=function(e){return new(e||i)},i.\u0275mod=en({type:i}),i.\u0275inj=Wt({imports:[Jn,gC,gC,nne,Jn]}),i})();function one(i,t){if(1&i&&(G(0,"mat-label"),Be(1),j()),2&i){const e=re(2);V(1),ui(e.resource.name)}}function ane(i,t){if(1&i){const e=jn();G(0,"mat-form-field",1),fe(1,one,2,1,"mat-label",2),G(2,"input",3),Oe("ngModelChange",function(r){return Vt(e),Et(re().resource.data=r)})("change",function(){return Vt(e),Et(re().changed.emit())}),j()()}if(2&i){const e=re();U("matTooltip",e.resourceDescription),V(1),U("ngIf",e.resource.name),V(1),U("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 lne=(()=>{class i{constructor(){this.resource=null,this.resourceDescription="",this.disabled=!1,this.changed=new $e}}return i.\u0275fac=function(e){return new(e||i)},i.\u0275cmp=ot({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&&fe(0,ane,3,7,"mat-form-field",0),2&e&&U("ngIf",n.resource)},dependencies:[_i,_l,mu,nc,_u,gu,Zc,yl,Ro,rc,Fs],changeDetection:0}),i})();function cne(i,t){if(1&i&&(G(0,"mat-label"),Be(1),j()),2&i){const e=re(2);V(1),ui(e.resource.name)}}function dne(i,t){if(1&i){const e=jn();G(0,"mat-form-field",1),fe(1,cne,2,1,"mat-label",2),G(2,"input",3),Oe("ngModelChange",function(r){return Vt(e),Et(re().resource.data=r)})("change",function(){return Vt(e),Et(re().changed.emit())}),j()()}if(2&i){const e=re();U("matTooltip",e.resourceDescription),V(1),U("ngIf",e.resource.name),V(1),U("disabled",e.disabled||void 0!==e.resource.schema.required_value)("maxlength",e.maxLength)("minlength",e.minLength)("ngModel",e.resource.data)}}let gH=(()=>{class i{constructor(){this._resource=null,this.resourceDescription="",this.disabled=!1,this.changed=new $e,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=ot({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&&fe(0,dne,3,6,"mat-form-field",0),2&e&&U("ngIf",n.resource)},dependencies:[_i,_l,nc,NR,BR,Zc,yl,Ro,rc,Fs],changeDetection:0}),i})();const sc=(i,t)=>i+(i.includes("__")?"/":"__")+t,jh=function(){return[]};function une(i,t){if(1&i&&(G(0,"mat-panel-description"),Be(1," Click to view items ("),G(2,"b"),Be(3),j(),Be(4,") "),j()),2&i){const e=re(2);V(3),ui((e.resourceData||Rs(1,jh)).length)}}function hne(i,t){1&i&&(G(0,"mat-panel-description"),Be(1," Empty array "),j())}function fne(i,t){}function pne(i,t){if(1&i){const e=jn();G(0,"mat-expansion-panel",4),Oe("opened",function(){return Vt(e),Et(re().onContentsTrigger(!0))})("closed",function(){return Vt(e),Et(re().onContentsTrigger(!1))}),G(1,"mat-expansion-panel-header",5)(2,"mat-panel-title"),Be(3),j(),fe(4,une,5,2,"mat-panel-description",1),fe(5,hne,2,0,"mat-panel-description",1),j(),fe(6,fne,0,0,"ng-template",6),j()}if(2&i){const e=re(),n=Zi(3);V(1),U("matTooltip",e.resourceDescription),V(2),Qi(" ",e.name," "),V(1),U("ngIf",(e.resourceData||Rs(5,jh)).length>0),V(1),U("ngIf",0==(e.resourceData||Rs(6,jh)).length),V(1),U("ngTemplateOutlet",n)}}function mne(i,t){}function gne(i,t){if(1&i&&(Gr(0),G(1,"h2",5),Be(2),j(),G(3,"div",7),fe(4,mne,0,0,"ng-template",6),j(),Wr()),2&i){const e=re(),n=Zi(3);V(1),U("matTooltip",e.resourceDescription),V(1),ui(e.name),V(2),U("ngTemplateOutlet",n)}}function _ne(i,t){}function vne(i,t){if(1&i&&Ie(0,"app-editor",10),2&i){const e=re().$implicit,n=re(3);U("resource",n.children[n.pageIndex*n.pageSize+e])("disabled",n.disabled)}}function yne(i,t){if(1&i&&(Gr(0),fe(1,vne,1,2,"app-editor",9),Wr()),2&i){const e=t.$implicit,n=re(3);V(1),U("ngIf",n.pageIndex*n.pageSize+e0)}let zR=(()=>{class i{constructor(e,n){this.main=e,this.cdr=n,this._resource=null,this.resourceDescription="",this.disabled=!1,this.changed=new $e,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 Te}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:sc(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(Ue(this.destroyed$),gn(([n,r])=>!!this.resource&&n.startsWith(this.resource.id)&&!n.substring(this.resource.id.length+1).includes("/"))).subscribe(function(){var n=nt(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 Qe(null),this.imageUrl$=new Qe(null),this.destroyed$=new Te,this.changed=new $e}set resource(e){this._resource$.next(e)}get resource(){return this._resource$.getValue()}ngAfterViewInit(){var e=this;return nt(function*(){e._resource$.pipe(Ue(e.destroyed$)).subscribe(function(){var n=nt(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)(E(Jl),E(Fa))},i.\u0275cmp=ot({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&&(Ie(0,"app-compound-block-ui",0),ct(1,"async"),fe(2,Dne,2,3,"img",1),ct(3,"async")),2&e&&(U("resource",ut(1,3,n._resource$))("fieldBlacklist",Rs(7,Tne)),V(2),U("ngIf",ut(3,5,n.imageUrl$)))},dependencies:[_i,ec,Xo],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 Rne=["*"],Lne=new me("MAT_CARD_CONFIG");let _H=(()=>{class i{constructor(e){this.appearance=e?.appearance||"raised"}}return i.\u0275fac=function(e){return new(e||i)(E(Lne,8))},i.\u0275cmp=ot({type:i,selectors:[["mat-card"]],hostAttrs:[1,"mat-mdc-card","mdc-card"],hostVars:4,hostBindings:function(e,n){2&e&&ln("mat-mdc-card-outlined","outlined"===n.appearance)("mdc-card--outlined","outlined"===n.appearance)},inputs:{appearance:"appearance"},exportAs:["matCard"],ngContentSelectors:Rne,decls:1,vars:0,template:function(e,n){1&e&&(or(),Yt(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})(),vH=(()=>{class i{}return i.\u0275fac=function(e){return new(e||i)},i.\u0275mod=en({type:i}),i.\u0275inj=Wt({imports:[Jn,co,Jn]}),i})();class HR{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 Te,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 $R=(()=>{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=Pe({token:i,factory:i.\u0275fac,providedIn:"root"}),i})(),aie=(()=>{class i{}return i.\u0275fac=function(e){return new(e||i)},i.\u0275mod=en({type:i}),i.\u0275inj=Wt({imports:[Jn,co,tb,Jn]}),i})();const CH={transformPanel:Oa("transformPanel",[Or("void => enter-dropdown",Yr("120ms cubic-bezier(0, 0, 0.2, 1)",sV([oi({opacity:0,transform:"scale(1, 0.8)"}),oi({opacity:1,transform:"scale(1, 1)"})]))),Or("void => enter-dialog",Yr("150ms cubic-bezier(0, 0, 0.2, 1)",sV([oi({opacity:0,transform:"scale(0.7)"}),oi({transform:"none",opacity:1})]))),Or("* => void",Yr("100ms linear",oi({opacity:0})))]),fadeInCalendar:Oa("fadeInCalendar",[Os("void",oi({opacity:0})),Os("enter",oi({opacity:1})),Or("void => *",Yr("120ms 100ms cubic-bezier(0.55, 0, 0.55, 0.2)"))])},AH=function(i){return{active:i}};function Sie(i,t){if(1&i){const e=jn();G(0,"button",2),Oe("click",function(){const s=Vt(e).$implicit;return Et(re().select(s))}),j()}if(2&i){const e=t.$implicit,n=re();qo("background-color",e),U("ngClass",sm(3,AH,n.selectedColor===e))}}function Eie(i,t){if(1&i){const e=jn();G(0,"button",2),Oe("click",function(){const s=Vt(e).$implicit;return Et(re().select(s))}),j()}if(2&i){const e=t.$implicit,n=re();qo("background-color",e),U("ngClass",sm(3,AH,n.selectedColor===e))}}const Aie=["button"],Die=/^\s+/,Tie=/\s+$/,Gm=Math.round,Iie=(Math,Math,Math,/[^0-9]/g),DH=["#ffffff","#ffff00","#ff00ff","#ff0000","#c0c0c0","#808080","#808000","#800080","#800000","#00ffff","#00ff00","#008080","#008000","#0000ff","#000080","#000000"];function TH(i,t,e){const n=i.getImageData(t,e,1,1).data;return{r:n[0],g:n[1],b:n[2]}}function Yh(i){return 1==i.length?"0"+i:""+i}function kie(i){return Math.round(255*parseFloat(i)).toString(16)}function IH(i){return Jo(i)/255}function Jo(i){return parseInt(i,16)}function RH(i,t,e,n){var r=[Yh(Gm(i).toString(16)),Yh(Gm(t).toString(16)),Yh(Gm(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 vu="(?:[-\\+]?\\d*\\.\\d+%?)|(?:[-\\+]?\\d+%?)",jR="[\\s|\\(]+("+vu+")[,|\\s]+("+vu+")[,|\\s]+("+vu+")\\s*\\)?",YR="[\\s|\\(]+("+vu+")[,|\\s]+("+vu+")[,|\\s]+("+vu+")[,|\\s]+("+vu+")\\s*\\)?",qh={CSS_UNIT:new RegExp(vu),rgb:new RegExp("rgb"+jR),rgba:new RegExp("rgba"+YR),hsl:new RegExp("hsl"+jR),hsla:new RegExp("hsla"+YR),hsv:new RegExp("hsv"+jR),hsva:new RegExp("hsva"+YR),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 qR(i){let t;return i=i.replace(Die,"").replace(Tie,"").toLowerCase(),(t=qh.rgb.exec(i))?{r:t[1],g:t[2],b:t[3],a:1}:(t=qh.rgba.exec(i))?{r:t[1],g:t[2],b:t[3],a:t[4]}:(t=qh.hex8.exec(i))?{r:Jo(t[1]),g:Jo(t[2]),b:Jo(t[3]),a:IH(t[4])}:(t=qh.hex6.exec(i))?{r:Jo(t[1]),g:Jo(t[2]),b:Jo(t[3]),a:1}:(t=qh.hex4.exec(i))?{r:Jo(t[1]+""+t[1]),g:Jo(t[2]+""+t[2]),b:Jo(t[3]+""+t[3]),a:IH(t[4]+""+t[4])}:(t=qh.hex3.exec(i))?{r:Jo(t[1]+""+t[1]),g:Jo(t[2]+""+t[2]),b:Jo(t[3]+""+t[3]),a:1}:null}class Xh{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=RH(this.r,this.g,this.b),this.rgba=this.toRgba()}toHex(t){return RH(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 Rie(i,t,e,n,r){var s=[Yh(Gm(i).toString(16)),Yh(Gm(t).toString(16)),Yh(Gm(e).toString(16)),Yh(kie(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 kH=(()=>{class i{constructor(e,n){this.zone=e,this.colorChanged=new $e,this.x=0,this.y=0,this.drag=!1,this._destroyed=new Te,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){Co()},i.\u0275dir=ve({type:i,inputs:{color:"color"},outputs:{colorChanged:"colorChanged"}}),i})(),Fie=(()=>{class i extends kH{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}=TH(this.ctx,e.offsetX,e.offsetY);this.emitChange(new Xh(n,r,s))}}return i.\u0275fac=function(e){return new(e||i)(E(gt))},i.\u0275cmp=ot({type:i,selectors:[["ngx-mat-color-slider"]],features:[dt],decls:1,vars:0,consts:[["id","color-strip","width","15","height","234",1,"zone-strip",3,"mousedown","mouseup"]],template:function(e,n){1&e&&(G(0,"canvas",0),Oe("mousedown",function(s){return n.onMousedown(s)})("mouseup",function(s){return n.onMouseup(s)}),j())}}),i})(),Lie=(()=>{class i{constructor(){}onInput(e){this._formatInput(e.target)}_formatInput(e){let n=Number(e.value.replace(Iie,""));n=isNaN(n)?0:n,e.value=n}}return i.\u0275fac=function(e){return new(e||i)},i.\u0275dir=ve({type:i,selectors:[["","ngxMatNumericColorInput",""]],hostBindings:function(e,n){1&e&&Oe("input",function(s){return n.onInput(s)})}}),i})(),Bie=(()=>{class i extends kH{constructor(e){super(e,"color-block"),this.zone=e,this._resetBaseColor=!0,this.formGroup=new Hm({r:new ic(null,[vl.required]),g:new ic(null,[vl.required]),b:new ic(null,[vl.required]),a:new ic(null,[vl.required]),hex:new ic(null,[vl.required,vl.pattern(qh.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(){Cr(this.rCtrl.valueChanges,this.gCtrl.valueChanges,this.bCtrl.valueChanges,this.aCtrl.valueChanges).pipe(Ue(this._destroyed),gl(400)).subscribe(r=>{const s=new Xh(Number(this.rCtrl.value),Number(this.gCtrl.value),Number(this.bCtrl.value),Number(this.aCtrl.value));this.emitChange(s)}),this.hexCtrl.valueChanges.pipe(Ue(this._destroyed),gl(400),Ql()).subscribe(r=>{const s=qR(r);if(null!=s){const o=new Xh(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}=TH(this.ctx,e.offsetX,e.offsetY);this.emitChange(new Xh(n,r,s))}}return i.\u0275fac=function(e){return new(e||i)(E(gt))},i.\u0275cmp=ot({type:i,selectors:[["ngx-mat-color-canvas"]],hostAttrs:[1,"ngx-mat-color-canvas"],features:[dt,xi],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&&(G(0,"form",0)(1,"div",1)(2,"div",2)(3,"canvas",3),Oe("mousedown",function(s){return n.onMousedown(s)})("mouseup",function(s){return n.onMouseup(s)}),j(),G(4,"ngx-mat-color-slider",4),Oe("colorChanged",function(s){return n.onSliderColorChanged(s)}),j()(),G(5,"div",5)(6,"mat-form-field")(7,"mat-label"),Be(8,"R"),j(),Ie(9,"input",6),j(),G(10,"mat-form-field")(11,"mat-label"),Be(12,"G"),j(),Ie(13,"input",7),j(),G(14,"mat-form-field")(15,"mat-label"),Be(16,"B"),j(),Ie(17,"input",8),j()()(),G(18,"div",1),Ie(19,"button",9),G(20,"mat-form-field")(21,"mat-label"),Be(22,"HEX6"),j(),G(23,"mat-label",10),Be(24,"#\xa0"),j(),Ie(25,"input",11),j(),G(26,"mat-form-field",12)(27,"mat-label"),Be(28,"A"),j(),Ie(29,"input",13),j()()()),2&e&&(U("formGroup",n.formGroup),V(19),qo("background-color",(null==n.color?null:n.color.rgba)||"transparent"))},dependencies:[rc,yl,Ro,qte,CV,IR,_l,mu,nc,bR,_u,gu,Gh,fC,Fie,Lie],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})(),Uie=(()=>{class i{constructor(){this.colorChanged=new $e,this.colors1=DH.slice(0,8),this.colors2=DH.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}=qR(e);this.colorChanged.emit(new Xh(n,r,s,o))}}return i.\u0275fac=function(e){return new(e||i)},i.\u0275cmp=ot({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&&(G(0,"div",0),fe(1,Sie,1,5,"button",1),j(),G(2,"div",0),fe(3,Eie,1,5,"button",1),j()),2&e&&(V(1),U("ngForOf",n.colors1),V(2),U("ngForOf",n.colors2))},dependencies:[hm,lo,CV],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})(),PH=(()=>{class i{constructor(){this.colorChanged=new $e}ngOnInit(){}handleColorChanged(e){this.colorChanged.emit(e)}}return i.\u0275fac=function(e){return new(e||i)},i.\u0275cmp=ot({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&&(G(0,"ngx-mat-color-canvas",0),Oe("colorChanged",function(s){return n.handleColorChanged(s)}),j(),G(1,"ngx-mat-color-collection",0),Oe("colorChanged",function(s){return n.handleColorChanged(s)}),j()),2&e&&(U("color",n.color),V(1),U("color",n.color))},dependencies:[Bie,Uie],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})(),XR=(()=>{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=qR(e);return n?new Xh(n.r,n.g,n.b,n.a):null}}return i.\u0275fac=function(e){return new(e||i)},i.\u0275prov=Pe({token:i,factory:i.\u0275fac}),i})();const Vie={display:{colorInput:"hex"}},OH=new me("mat-color-formats"),FH=new me("ngx-mat-colorpicker-scroll-strategy"),Hie={provide:FH,deps:[as],useFactory:function zie(i){return()=>i.scrollStrategies.reposition()}},$ie=Jy(class{constructor(i){this._elementRef=i}});let LH=(()=>{class i extends $ie{constructor(e){super(e)}}return i.\u0275fac=function(e){return new(e||i)(E(vt))},i.\u0275cmp=ot({type:i,selectors:[["ngx-mat-color-picker-content"]],viewQuery:function(e,n){if(1&e&&$n(PH,5),2&e){let r;At(r=Dt())&&(n._palette=r.first)}},hostAttrs:[1,"ngx-mat-colorpicker-content"],hostVars:3,hostBindings:function(e,n){2&e&&(Rw("@transformPanel","enter"),ln("ngx-mat-colorpicker-content-touch",n.picker.touchUi))},inputs:{color:"color"},exportAs:["ngxMatColorPickerContent"],features:[dt],decls:1,vars:1,consts:[[3,"color","colorChanged"]],template:function(e,n){1&e&&(G(0,"ngx-mat-color-palette",0),Oe("colorChanged",function(s){return n.picker.select(s)}),j()),2&e&&U("color",n.picker._selected)},dependencies:[PH],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:[CH.transformPanel,CH.fadeInCalendar]},changeDetection:0}),i})(),NH=(()=>{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 $e,this.closedStream=new $e,this._touchUi=!1,this._opened=!1,this._defaultColor="primary",this._validSelected=null,this._disabledChange=new Te,this._focusedElementBeforeOpen=null,this._inputSubscription=Qt.EMPTY,this._selectedChanged=new Te,this._scrollStrategy=a}get disabled(){return void 0===this._disabled&&this._pickerInput?this._pickerInput.disabled:!!this._disabled}set disabled(e){const n=tn(e);n!==this._disabled&&(this._disabled=n,this._disabledChange.next(n))}get touchUi(){return this._touchUi}set touchUi(e){this._touchUi=tn(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(LH,{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 Nh(LH,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(Oi(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"),Cr(this._popupRef.backdropClick(),this._popupRef.detachments(),this._popupRef.keydownEvents().pipe(gn(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)(E(Bm),E(as),E(gt),E(XR),E(Pa,8),E(FH),E(qt,8),E(jr))},i.\u0275cmp=ot({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 yC{constructor(t,e){this.target=t,this.targetElement=e,this.value=this.target.value}}const Gie={provide:Io,useExisting:Gn(()=>bC),multi:!0},Wie={provide:qr,useExisting:Gn(()=>bC),multi:!0};let bC=(()=>{class i{constructor(e,n,r,s){if(this._elementRef=e,this._formField=n,this._colorFormats=r,this._adapter=s,this.colorChange=new $e,this.colorInput=new $e,this._disabledChange=new $e,this._valueChange=new $e,this._onTouched=()=>{},this._cvaOnChange=()=>{},this._validatorOnChange=()=>{},this._pickerSubscription=Qt.EMPTY,this._validator=vl.compose([]),this._lastValueValid=!1,!this._colorFormats)throw function Oie(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 yC(this,this._elementRef.nativeElement)),this.colorChange.emit(new yC(this,this._elementRef.nativeElement))}))}get disabled(){return!!this._disabled}set disabled(e){const n=tn(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 yC(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 yC(this,this._elementRef.nativeElement)))}}return i.\u0275fac=function(e){return new(e||i)(E(vt),E(yl,8),E(OH,8),E(XR))},i.\u0275dir=ve({type:i,selectors:[["input","ngxMatColorPicker",""]],hostVars:3,hostBindings:function(e,n){1&e&&Oe("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&&(ql("disabled",n.disabled),It("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:[Dn([Gie,Wie,{provide:VR,useExisting:i}])]}),i})(),jie=(()=>{class i{constructor(e){this._cd=e,this._stateChanges=Qt.EMPTY}get disabled(){if(null==this._disabled&&this.picker)return this.picker.disabled}set disabled(e){this._disabled=e}ngOnInit(){}ngOnChanges(e){e.picker&&this._watchStateChanges()}ngOnDestroy(){this._stateChanges.unsubscribe()}ngAfterContentInit(){this._watchStateChanges()}open(e){this.picker&&!this.disabled&&(this.picker.open(),e.stopPropagation())}_watchStateChanges(){const e=this.picker?this.picker._disabledChange:mt(),n=this.picker&&this.picker._pickerInput?this.picker._pickerInput._disabledChange:mt(),r=this.picker?Cr(this.picker.openedStream,this.picker.closedStream):mt();this._stateChanges.unsubscribe(),this._stateChanges=Cr(e,n,r).subscribe(()=>this._cd.markForCheck())}}return i.\u0275fac=function(e){return new(e||i)(E(Qn))},i.\u0275cmp=ot({type:i,selectors:[["ngx-mat-color-toggle"]],viewQuery:function(e,n){if(1&e&&$n(Aie,5),2&e){let r;At(r=Dt())&&(n._button=r.first)}},hostAttrs:[1,"ngx-mat-color-toggle"],hostVars:7,hostBindings:function(e,n){1&e&&Oe("focus",function(){return n._button.focus()}),2&e&&(It("tabindex",-1),ln("ngx-mat-color-toggle-active",n.picker&&n.picker.opened)("mat-accent",n.picker&&"accent"===n.picker.color)("mat-warn",n.picker&&"warn"===n.picker.color))},inputs:{picker:["for","picker"],tabIndex:"tabIndex",disabled:"disabled"},exportAs:["ngxMatColorPickerToggle"],features:[xi],decls:4,vars:5,consts:[["mat-icon-button","","type","button",3,"disabled","click"],["button",""]],template:function(e,n){1&e&&(G(0,"button",0,1),Oe("click",function(s){return n.open(s)}),G(2,"mat-icon"),Be(3,"palette"),j()()),2&e&&(U("disabled",n.disabled),It("aria-haspopup",n.picker?"dialog":null)("tabindex",n.disabled?-1:n.tabIndex),V(2),qo("color",null==n.picker||null==n.picker._selected?null:n.picker._selected.rgba))},dependencies:[XM,gR],styles:[".mat-form-field-appearance .mat-form-field-prefix .ngx-mat-color-toggle-default-icon,.mat-form-field-appearance .mat-form-field-suffix .ngx-mat-color-toggle-default-icon{width:1em}.mat-form-field:not(.mat-form-field-appearance) .mat-form-field-prefix .ngx-mat-color-toggle-default-icon,.mat-form-field:not(.mat-form-field-appearance) .mat-form-field-suffix .ngx-mat-color-toggle-default-icon{display:block;width:1.5em;height:1.5em}.mat-form-field:not(.mat-form-field-appearance) .mat-form-field-prefix .mat-icon-button .ngx-mat-color-toggle-default-icon,.mat-form-field:not(.mat-form-field-appearance) .mat-form-field-suffix .mat-icon-button .ngx-mat-color-toggle-default-icon{margin:auto}\n"],encapsulation:2}),i})(),Yie=(()=>{class i{}return i.\u0275fac=function(e){return new(e||i)},i.\u0275mod=en({type:i}),i.\u0275inj=Wt({providers:[XR,Hie],imports:[co,mH,KM,vH,aie,tH,nH,vV,Bh,tz]}),i})();const qie=["picker"],Xie=function(i){return{"background-color":i}};function Kie(i,t){if(1&i){const e=jn();G(0,"div",5),Oe("click",function(r){const o=Vt(e).index;return Et(re().onColorClicked(r.currentTarget,o))}),j()}if(2&i){const e=t.$implicit,n=t.index,r=re();U("ngStyle",sm(2,Xie,"#"+r.lpad(e.toString(16),"0",8)))("matTooltip",n+": #"+e.toString(16))}}const Zie=function(){return["colors"]};let Qie=(()=>{class i{constructor(){this.resource=null,this.changed=new $e,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 bU;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=ot({type:i,selectors:[["app-palette-block-ui"]],viewQuery:function(e,n){if(1&e&&$n(qie,5),2&e){let r;At(r=Dt())&&(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&&(Ie(0,"app-compound-block-ui",0),G(1,"div",1),fe(2,Kie,1,4,"div",2),j(),G(3,"input",3),Oe("colorChange",function(s){return n.onColorChange(s.value)}),j(),Ie(4,"ngx-mat-color-picker",null,4)),2&e){const r=Zi(5);U("resource",n.resource)("fieldBlacklist",Rs(4,Zie)),V(2),U("ngForOf",null==n.resourceData?null:n.resourceData.colors),V(1),U("ngxMatColorPicker",r)}},dependencies:[lo,nM,rc,Fs,bC,NH,ec],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 Jie=["editorBody"];function ere(i,t){if(1&i&&(G(0,"div",11),Be(1),j()),2&i){const e=re().$implicit;V(1),ui(e.offset)}}function tre(i,t){if(1&i){const e=jn();G(0,"input",12),Oe("input",function(r){const o=Vt(e).index,a=re().index;return Et(re().onHexInput(r,a,o))})("focus",function(r){const o=Vt(e).index;return Et(re(2).onHexFocus(r,o))})("blur",function(r){return Vt(e),Et(re(2).onHexBlur(r))}),j()}if(2&i){const e=t.$implicit,n=t.index;U("id","hex_input__"+re().index+"__"+n)("value",e[0])("disabled",null===e[0])}}function nre(i,t){1&i&&Ie(0,"div",3)}function ire(i,t){if(1&i){const e=jn();G(0,"span",15),Oe("click",function(){const s=Vt(e).index,o=re(2).index;return Et(re().blurInput(o,s))}),Be(1),j()}if(2&i){const e=t.$implicit,n=t.index;U("id","utf_char__"+re(2).index+"__"+n),V(1),ui(e[1])}}function rre(i,t){if(1&i&&(G(0,"div",13),fe(1,ire,2,2,"span",14),j()),2&i){const e=re().$implicit,n=re();V(1),U("ngForOf",e.values)("ngForTrackBy",n.trackByIndex)}}function sre(i,t){if(1&i&&(G(0,"div",5),fe(1,ere,2,1,"div",6),ct(2,"async"),G(3,"div",7),fe(4,tre,1,3,"input",8),j(),fe(5,nre,1,0,"div",9),ct(6,"async"),ct(7,"async"),fe(8,rre,2,2,"div",10),ct(9,"async"),j()),2&i){const e=t.$implicit,n=t.index,r=re();ln("gray",n%2!=0),V(1),U("ngIf",ut(2,7,r._showOffsets$)),V(3),U("ngForOf",e.values)("ngForTrackBy",r.trackByIndex),V(1),U("ngIf",ut(6,9,r._showOffsets$)||ut(7,11,r._showUtf8$)),V(3),U("ngIf",ut(9,13,r._showUtf8$))}}function ore(i,t){if(1&i){const e=jn();G(0,"div",16)(1,"button",17),Oe("click",function(){return Vt(e),Et(re().changePage(-1))}),ct(2,"async"),Be(3,"Previous"),j(),G(4,"span"),Be(5),ct(6,"async"),ct(7,"async"),j(),G(8,"button",17),Oe("click",function(){return Vt(e),Et(re().changePage(1))}),ct(9,"async"),ct(10,"async"),Be(11," Next "),j()()}if(2&i){const e=re();V(1),U("disabled",0===ut(2,4,e.currentPage$)),V(4),Dh("Page ",(ut(6,6,e.currentPage$)||0)+1," of ",ut(7,8,e.totalPages$),""),V(3),U("disabled",(ut(9,10,e.currentPage$)||0)>=(ut(10,12,e.totalPages$)||0)-1)}}let are=(()=>{class i{set maxColumns(e){this._maxColumns$.next(e)}set maxRows(e){this._maxRows$.next(e)}set showOffsets(e){this._showOffsets$.next(e)}set showUtf8(e){this._showUtf8$.next(e)}set data(e){if(e!==this._data$.value){if(e.length===this._data$.value.length){for(let n=0;n=32&&e<=126?String.fromCharCode(e):"."]}ngAfterViewInit(){new ResizeObserver(e=>{for(const n of e)this.viewportSize$.next([n.contentRect.width,n.contentRect.height])}).observe(this.editorBody.nativeElement),Ra([this.viewportSize$,this._maxColumns$,this._maxRows$,this._showOffsets$,this._showUtf8$]).pipe(Ue(this.destroyed$),Wy(50)).subscribe(([[e,n],r,s,o,a])=>{let l=e-8;o&&(l-=68);let c=34;a&&(l-=8,c+=10);let h=Math.floor(l/c);r>0&&h>r&&(h=r);let p=this.pageSize$.value[0];h===p+1&&l/c%1<.5&&(h=p),h=Math.max(1,h);let m=Math.floor(n/28);s>0&&m>s&&(m=s),m=Math.max(1,m),(h!=this.pageSize$.value[0]||m!==this.pageSize$.value[1])&&this.pageSize$.next([h,m])}),Ra([this._data$,this.currentPage$,this.pageSize$]).pipe(Ue(this.destroyed$)).subscribe(([e,n,r])=>{if(0===r[0]||0===r[1])return;let s=Math.max(1,Math.ceil(Math.ceil(e.length/r[0])/r[1]));if(this.totalPages$.value!==s&&this.totalPages$.next(s),n>=s)return void this.currentPage$.next(n=s-1);const o=[];for(let a=n*r[0]*r[1];a=0&&a<=255&&(this.data[(this.currentPage$.value*this.pageSize$.value[1]+n)*this.pageSize$.value[0]+r]=a,this.renderedRows$.value[n].values[r]=this.renderValue(a),this.cdr.detectChanges(),this.dataChange.emit(this.data),this.goToNextInput(s.id))}}onHexFocus(e,n){const r=e.target,s=r.closest(".row");s&&s.querySelectorAll(".utf8-values span").forEach((a,l)=>{a.classList.toggle("highlight",l===n)}),r.select()}onHexBlur(e){const r=e.target.closest(".row");r&&r.querySelectorAll(".utf8-values span").forEach(o=>{o.classList.remove("highlight")})}}return i.\u0275fac=function(e){return new(e||i)(E(Qn))},i.\u0275cmp=ot({type:i,selectors:[["hex-editor"]],viewQuery:function(e,n){if(1&e&&$n(Jie,5),2&e){let r;At(r=Dt())&&(n.editorBody=r.first)}},inputs:{maxColumns:"maxColumns",maxRows:"maxRows",showOffsets:"showOffsets",showUtf8:"showUtf8",data:"data",readOnly:"readOnly"},outputs:{dataChange:"dataChange"},decls:7,vars:7,consts:[[1,"editor-body"],["editorBody",""],["class","row",3,"gray",4,"ngFor","ngForOf","ngForTrackBy"],[1,"flex-spacer"],["class","pagination",4,"ngIf"],[1,"row"],["class","offset",4,"ngIf"],[1,"hex-values"],["maxlength","2",3,"id","value","disabled","input","focus","blur",4,"ngFor","ngForOf","ngForTrackBy"],["class","flex-spacer",4,"ngIf"],["class","utf8-values",4,"ngIf"],[1,"offset"],["maxlength","2",3,"id","value","disabled","input","focus","blur"],[1,"utf8-values"],[3,"id","click",4,"ngFor","ngForOf","ngForTrackBy"],[3,"id","click"],[1,"pagination"],[3,"disabled","click"]],template:function(e,n){1&e&&(G(0,"div",0,1),fe(2,sre,10,15,"div",2),ct(3,"async"),Ie(4,"div",3),j(),fe(5,ore,12,14,"div",4),ct(6,"async")),2&e&&(V(2),U("ngForOf",ut(3,3,n.renderedRows$))("ngForTrackBy",n.trackByIndex),V(3),U("ngIf",(ut(6,5,n.totalPages$)||0)>1))},dependencies:[lo,_i,Xo],styles:["[_nghost-%COMP%]{display:flex;flex-direction:column;font-family:monospace}.editor-body[_ngcontent-%COMP%]{display:flex;flex-grow:1;flex-direction:column;overflow-y:hidden}.row[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:center;height:24px;margin-bottom:4px}.row.gray[_ngcontent-%COMP%]{background-color:#d3d3d3}.offset[_ngcontent-%COMP%]{width:60px;text-align:left;margin-right:8px}.hex-values[_ngcontent-%COMP%]{display:flex;gap:2px;flex-shrink:1;overflow-x:clip}.hex-values[_ngcontent-%COMP%] input[_ngcontent-%COMP%]{width:32px;text-align:center;box-sizing:border-box}.utf8-values[_ngcontent-%COMP%]{margin-left:8px}.utf8-values[_ngcontent-%COMP%] span[_ngcontent-%COMP%]{display:inline-block;width:8px;margin-left:2px;color:#000}.utf8-values[_ngcontent-%COMP%] span.highlight[_ngcontent-%COMP%]{background-color:#ff0}.pagination[_ngcontent-%COMP%]{display:flex;justify-content:space-between;align-items:center;margin-top:1em}.flex-spacer[_ngcontent-%COMP%]{flex-grow:1}"],changeDetection:0}),i})(),lre=(()=>{class i{}return i.\u0275fac=function(e){return new(e||i)},i.\u0275mod=en({type:i}),i.\u0275inj=Wt({imports:[co]}),i})();const cre=["editor"];let dre=(()=>{class i{constructor(){this._resource=null,this.empty=new Uint8Array,this.data$=new Qe(new Uint8Array),this.resourceDescription="",this.disabled=!1,this.changed=new $e}get resource(){return this._resource}set resource(e){this._resource=e,this.data$.next(new Uint8Array(e?e.data:0))}onDataChange(e){this._resource.data=Array.from(e),this.changed.emit()}}return i.\u0275fac=function(e){return new(e||i)},i.\u0275cmp=ot({type:i,selectors:[["app-binary-block-ui"]],viewQuery:function(e,n){if(1&e&&$n(cre,5),2&e){let r;At(r=Dt())&&(n.editorDiv=r.first)}},inputs:{resource:"resource",resourceDescription:"resourceDescription",disabled:"disabled"},outputs:{changed:"changed"},decls:5,vars:10,consts:[["matTooltipPosition","above",3,"matTooltip"],[3,"data","maxColumns","showOffsets","readOnly","dataChange"]],template:function(e,n){1&e&&(G(0,"h2",0),Be(1),j(),G(2,"hex-editor",1),Oe("dataChange",function(s){return n.onDataChange(s)}),ct(3,"async"),ct(4,"async"),j()),2&e&&(U("matTooltip",n.resourceDescription),V(1),ui(null==n.resource?null:n.resource.name),V(1),U("data",ut(3,6,n.data$)||n.empty)("maxColumns",8)("showOffsets",(ut(4,8,n.data$)||n.empty).length>16)("readOnly",n.disabled))},dependencies:[Fs,are,Xo],changeDetection:0}),i})();const ure=["picker"];function hre(i,t){if(1&i&&(G(0,"mat-label",8),Be(1),j()),2&i){const e=re();V(1),ui(null==e.resource?null:e.resource.name)}}const fre=function(i){return{transform:i}};let pre=(()=>{class i{constructor(e){this.cdr=e,this.resource=null,this.resourceDescription="",this.changed=new $e,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)(E(Qn))},i.\u0275cmp=ot({type:i,selectors:[["app-angle-block-ui"]],viewQuery:function(e,n){if(1&e&&$n(ure,5),2&e){let r;At(r=Dt())&&(n.picker=r.first)}},hostBindings:function(e,n){1&e&&Oe("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&&(G(0,"div",0)(1,"div",1,2)(3,"div",3),Ie(4,"div",4)(5,"div",5),j()(),G(6,"div",6),fe(7,hre,2,1,"mat-label",7),G(8,"mat-label"),Be(9),ct(10,"number"),j(),G(11,"mat-label"),Be(12),ct(13,"number"),j()()()),2&e&&(U("matTooltip",n.resourceDescription),V(3),U("ngStyle",sm(11,fre,"rotate("+((null==n.resource?null:n.resource.data)||0)+"rad)")),V(4),U("ngIf",null==n.resource?null:n.resource.name),V(2),Qi("",JD(10,5,180*(null==n.resource?null:n.resource.data)/n.pi||0,"1.2-2")," deg"),V(3),Qi("",JD(13,8,(null==n.resource?null:n.resource.data)||0,"1.2-2")," rad"))},dependencies:[_i,nM,Ro,Fs,hB],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 KR{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,d=new Set;for(const h of e)!0===Array.isArray(h)?a.add(h):"object"==typeof h?l.add(h):"function"==typeof h?d.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===d.size){h=!0;for(const p of o)if(!1===d.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 mre(i,t){if(1&i&&(G(0,"mat-list-option",3),Be(1),j()),2&i){const e=t.$implicit,n=re();U("value",e)("selected",n.selectedValue==e),V(1),Qi(" ",e," ")}}function gre(i,t){if(1&i&&(G(0,"mat-card"),Ie(1,"app-editor",4),j()),2&i){const e=re();V(1),U("resource",e.resources[e.selectedValue])}}let xC=(()=>{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)(E(KR))},i.\u0275cmp=ot({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&&(G(0,"mat-selection-list",0),Oe("selectionChange",function(s){return n.selectedValue=s.source.selectedOptions.selected[0].value}),fe(1,mre,2,3,"mat-list-option",1),j(),fe(2,gre,2,1,"mat-card",2)),2&e&&(U("multiple",!1),V(1),U("ngForOf",n.keys),V(1),U("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})(),_re=(()=>{class i{constructor(){this._resource=null,this.resourceMap={},this.changed=new $e}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",iR("@transformPanel",[nR()],{optional:!0}))]),transformPanel:Oa("transformPanel",[Os("void",oi({opacity:0,transform:"scale(1, 0.8)"})),Or("void => showing",Yr("120ms cubic-bezier(0, 0, 0.2, 1)",oi({opacity:1,transform:"scale(1, 1)"}))),Or("* => void",Yr("100ms linear",oi({opacity:0})))])};let BH=0;const UH=new me("mat-select-scroll-strategy"),Tre=new me("MAT_SELECT_CONFIG"),Ire={provide:UH,deps:[as],useFactory:function Dre(i){return()=>i.scrollStrategies.reposition()}},Rre=new me("MatSelectTrigger");class kre{constructor(t,e){this.source=t,this.value=e}}const Pre=YM(JI(jM(WU(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 Te}}))));let Ore=(()=>{class i extends Pre{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(vl.required)??!1}set required(e){this._required=tn(e),this.stateChanges.next()}get multiple(){return this._multiple}set multiple(e){this._multiple=tn(e)}get disableOptionCentering(){return this._disableOptionCentering}set disableOptionCentering(e){this._disableOptionCentering=tn(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=Ps(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,d,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=d,this._liveAnnouncer=g,this._defaultOptions=b,this._panelOpen=!1,this._compareWith=(v,y)=>v===y,this._uid="mat-select-"+BH++,this._triggerAriaLabelledBy=null,this._destroy=new Te,this._onChange=()=>{},this._onTouched=()=>{},this._valueId="mat-select-value-"+BH++,this._panelDoneAnimatingStream=new Te,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=Ey(()=>{const v=this.options;return v?v.changes.pipe(Do(v),ks(()=>Cr(...v.map(y=>y.onSelectionChange)))):this._ngZone.onStable.pipe(Oi(1),ks(()=>this.optionSelectionChanges))}),this.openedChange=new $e,this._openedStream=this.openedChange.pipe(gn(v=>v),tt(()=>{})),this._closedStream=this.openedChange.pipe(gn(v=>!v),tt(()=>{})),this.selectionChange=new $e,this.valueChange=new $e,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 HR(this.multiple),this.stateChanges.next(),this._panelDoneAnimatingStream.pipe(Ql(),Ue(this._destroy)).subscribe(()=>this._panelDoneAnimating(this.panelOpen))}ngAfterContentInit(){this._initKeyManager(),this._selectionModel.changed.pipe(Ue(this._destroy)).subscribe(e=>{e.added.forEach(n=>n.select()),e.removed.forEach(n=>n.deselect())}),this.options.changes.pipe(Do(null),Ue(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&&!Qo(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||Qo(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(Oi(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 $Z(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=Cr(this.options.changes,this._destroy);this.optionSelectionChanges.pipe(Ue(e)).subscribe(n=>{this._onSelect(n.source,n.isUserInput),n.isUserInput&&!this.multiple&&this._panelOpen&&(this.close(),this.focus())}),Cr(...this.options.map(n=>n._stateChanges)).pipe(Ue(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)(E(LM),E(Qn),E(gt),E(YU),E(vt),E(Pa,8),E(hb,8),E(Gh,8),E(mC,8),E(tc,10),wa("tabindex"),E(UH),E(XI),E(Tre,8))},i.\u0275dir=ve({type:i,viewQuery:function(e,n){if(1&e&&($n(vre,5),$n(yre,5),$n(wU,5)),2&e){let r;At(r=Dt())&&(n.trigger=r.first),At(r=Dt())&&(n.panel=r.first),At(r=Dt())&&(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:[dt,xi]}),i})(),pb=(()=>{class i extends Ore{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(Ue(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 OQ(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 kre(this,e)}_getOverlayWidth(){return(this._preferredOverlayOrigin instanceof zI?this._preferredOverlayOrigin.elementRef:this._preferredOverlayOrigin||this._elementRef).nativeElement.getBoundingClientRect().width}get hideSingleSelectionIndicator(){return this._hideSingleSelectionIndicator}set hideSingleSelectionIndicator(e){this._hideSingleSelectionIndicator=tn(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=si(i)))(n||i)}}(),i.\u0275cmp=ot({type:i,selectors:[["mat-select"]],contentQueries:function(e,n,r){if(1&e&&(Wi(r,Rre,5),Wi(r,Nm,5),Wi(r,tV,5)),2&e){let s;At(s=Dt())&&(n.customTrigger=s.first),At(s=Dt())&&(n.options=s),At(s=Dt())&&(n.optionGroups=s)}},hostAttrs:["role","combobox","aria-autocomplete","none","aria-haspopup","listbox",1,"mat-mdc-select"],hostVars:19,hostBindings:function(e,n){1&e&&Oe("keydown",function(s){return n._handleKeydown(s)})("focus",function(){return n._onFocus()})("blur",function(){return n._onBlur()}),2&e&&(It("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()),ln("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:[Dn([{provide:UR,useExisting:i},{provide:eV,useExisting:i}]),dt],ngContentSelectors:Ere,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&&(or(Sre),G(0,"div",0,1),Oe("click",function(){return n.toggle()}),G(3,"div",2),fe(4,bre,2,1,"span",3),fe(5,Mre,3,2,"span",4),j(),G(6,"div",5)(7,"div",6),ki(),G(8,"svg",7),Ie(9,"path",8),j()()()(),fe(10,Cre,3,9,"ng-template",9),Oe("backdropClick",function(){return n.close()})("attach",function(){return n._onAttached()})("detach",function(){return n.close()})),2&e){const r=Zi(1);It("aria-owns",n.panelOpen?n.id+"-panel":null),V(3),U("ngSwitch",n.empty),It("id",n._valueId),V(1),U("ngSwitchCase",!0),V(1),U("ngSwitchCase",!1),V(5),U("cdkConnectedOverlayPanelClass",n._overlayPanelClass)("cdkConnectedOverlayScrollStrategy",n._scrollStrategy)("cdkConnectedOverlayOrigin",n._preferredOverlayOrigin||r)("cdkConnectedOverlayOpen",n.panelOpen)("cdkConnectedOverlayPositions",n._positions)("cdkConnectedOverlayWidth",n._overlayWidth)}},dependencies:[hm,by,VT,lB,wU,zI],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:[Are.transformPanel]},changeDetection:0}),i})(),VH=(()=>{class i{}return i.\u0275fac=function(e){return new(e||i)},i.\u0275mod=en({type:i}),i.\u0275inj=Wt({providers:[Ire],imports:[co,Pm,tR,Jn,Ky,gC,tR,Jn]}),i})();function Fre(i,t){if(1&i&&(G(0,"mat-label"),Be(1),j()),2&i){const e=re(3);V(1),ui(e.resource.name)}}function Lre(i,t){if(1&i&&(G(0,"mat-option",6),Be(1),j()),2&i){const e=t.$implicit,n=re(3);U("value",e[1])("disabled",n.disabled),V(1),Qi(" ",e[1]," ")}}function Nre(i,t){if(1&i){const e=jn();G(0,"mat-form-field",3),fe(1,Fre,2,1,"mat-label",0),G(2,"mat-select",4),Oe("valueChange",function(r){return Vt(e),Et(re(2).resource.data=r)})("selectionChange",function(){return Vt(e),Et(re(2).changed.emit())}),fe(3,Lre,2,3,"mat-option",5),j()()}if(2&i){const e=re(2);U("matTooltip",e.resourceDescription),V(1),U("ngIf",e.resource.name),V(1),U("value",e.resource.data)("disabled",e.disabled),V(1),U("ngForOf",e.resource.schema.enum_names)}}function Bre(i,t){if(1&i&&(G(0,"mat-label"),Be(1),j()),2&i){const e=re(3);V(1),ui(e.resource.name)}}function Ure(i,t){if(1&i){const e=jn();G(0,"mat-form-field",3),fe(1,Bre,2,1,"mat-label",0),G(2,"input",7),Oe("ngModelChange",function(r){return Vt(e),Et(re(2).resource.data=r)})("change",function(){return Vt(e),Et(re(2).changed.emit())}),j()()}if(2&i){const e=re(2);U("matTooltip",e.resourceDescription),V(1),U("ngIf",e.resource.name),V(1),U("min",0)("max",256*(e.resource.schema.length||1)-1)("ngModel",e.resource.data)}}function Vre(i,t){if(1&i&&(Gr(0),fe(1,Nre,4,5,"mat-form-field",1),fe(2,Ure,3,5,"ng-template",null,2,zc),Wr()),2&i){const e=Zi(3),n=re();V(1),U("ngIf",n.isKnownEnumValue(n.resource.data))("ngIfElse",e)}}let zre=(()=>{class i{constructor(){this.resource=null,this.resourceDescription="",this.disabled=!1,this.changed=new $e}isKnownEnumValue(e){return!!this.resource?.schema.enum_names.find(([n,r])=>r==e)}}return i.\u0275fac=function(e){return new(e||i)},i.\u0275cmp=ot({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&&fe(0,Vre,4,2,"ng-container",0),2&e&&U("ngIf",n.resource)},dependencies:[lo,_i,_l,mu,nc,_u,gu,Zc,yl,Ro,rc,Fs,pb,Nm],changeDetection:0}),i})();const Hre=["*"],Gre=["unscopedContent"];function Wre(i,t){1&i&&Yt(0,4)}function jre(i,t){if(1&i&&(G(0,"div",11),Ie(1,"input",12),G(2,"div",13),ki(),G(3,"svg",14),Ie(4,"path",15),j(),ya(),Ie(5,"div",16),j()()),2&i){const e=re();ln("mdc-checkbox--disabled",e.disabled),V(1),U("checked",e.selected)("disabled",e.disabled)}}function Yre(i,t){if(1&i&&(G(0,"div",17),Ie(1,"input",18),G(2,"div",19),Ie(3,"div",20)(4,"div",21),j()()),2&i){const e=re();ln("mdc-radio--disabled",e.disabled),V(1),U("checked",e.selected)("disabled",e.disabled)}}function qre(i,t){}function Xre(i,t){if(1&i&&(G(0,"span",22),fe(1,qre,0,0,"ng-template",23),j()),2&i){re();const e=Zi(3);V(1),U("ngTemplateOutlet",e)}}function Kre(i,t){}function Zre(i,t){if(1&i&&(G(0,"span",24),fe(1,Kre,0,0,"ng-template",23),j()),2&i){re();const e=Zi(5);V(1),U("ngTemplateOutlet",e)}}function Qre(i,t){}function Jre(i,t){1&i&&fe(0,Qre,0,0,"ng-template",23),2&i&&(re(),U("ngTemplateOutlet",Zi(1)))}function ese(i,t){}function tse(i,t){if(1&i&&(G(0,"span",25),fe(1,ese,0,0,"ng-template",23),j()),2&i){re();const e=Zi(3);V(1),U("ngTemplateOutlet",e)}}function nse(i,t){}function ise(i,t){if(1&i&&(G(0,"span",25),fe(1,nse,0,0,"ng-template",23),j()),2&i){re();const e=Zi(5);V(1),U("ngTemplateOutlet",e)}}function rse(i,t){}function sse(i,t){1&i&&fe(0,rse,0,0,"ng-template",23),2&i&&(re(),U("ngTemplateOutlet",Zi(1)))}const ose=[[["","matListItemTitle",""]],[["","matListItemLine",""]],"*",[["mat-divider"]],[["","matListItemAvatar",""],["","matListItemIcon",""]]],ase=["[matListItemTitle]","[matListItemLine]","*","mat-divider","[matListItemAvatar],[matListItemIcon]"],zH=new me("ListOption");let lse=(()=>{class i{constructor(e){this._elementRef=e}}return i.\u0275fac=function(e){return new(e||i)(E(vt))},i.\u0275dir=ve({type:i,selectors:[["","matListItemTitle",""]],hostAttrs:[1,"mat-mdc-list-item-title","mdc-list-item__primary-text"]}),i})(),cse=(()=>{class i{constructor(e){this._elementRef=e}}return i.\u0275fac=function(e){return new(e||i)(E(vt))},i.\u0275dir=ve({type:i,selectors:[["","matListItemLine",""]],hostAttrs:[1,"mat-mdc-list-item-line","mdc-list-item__secondary-text"]}),i})(),HH=(()=>{class i{constructor(e){this._listOption=e}_isAlignedAtStart(){return!this._listOption||"after"===this._listOption?._getTogglePosition()}}return i.\u0275fac=function(e){return new(e||i)(E(zH,8))},i.\u0275dir=ve({type:i,hostVars:4,hostBindings:function(e,n){2&e&&ln("mdc-list-item__start",n._isAlignedAtStart())("mdc-list-item__end",!n._isAlignedAtStart())}}),i})(),dse=(()=>{class i extends HH{}return i.\u0275fac=function(){let t;return function(n){return(t||(t=si(i)))(n||i)}}(),i.\u0275dir=ve({type:i,selectors:[["","matListItemAvatar",""]],hostAttrs:[1,"mat-mdc-list-item-avatar"],features:[dt]}),i})(),use=(()=>{class i extends HH{}return i.\u0275fac=function(){let t;return function(n){return(t||(t=si(i)))(n||i)}}(),i.\u0275dir=ve({type:i,selectors:[["","matListItemIcon",""]],hostAttrs:[1,"mat-mdc-list-item-icon"],features:[dt]}),i})();const hse=new me("MAT_LIST_CONFIG");let ZR=(()=>{class i{constructor(){this._isNonInteractive=!0,this._disableRipple=!1,this._disabled=!1,this._defaultOptions=Lt(hse,{optional:!0})}get disableRipple(){return this._disableRipple}set disableRipple(e){this._disableRipple=tn(e)}get disabled(){return this._disabled}set disabled(e){this._disabled=tn(e)}}return i.\u0275fac=function(e){return new(e||i)},i.\u0275dir=ve({type:i,hostVars:1,hostBindings:function(e,n){2&e&&It("aria-disabled",n.disabled)},inputs:{disableRipple:"disableRipple",disabled:"disabled"}}),i})(),$H=(()=>{class i{set lines(e){this._explicitLines=Ps(e,null),this._updateItemLines(!1)}get disableRipple(){return this.disabled||this._disableRipple||this._noopAnimations||!!this._listBase?.disableRipple}set disableRipple(e){this._disableRipple=tn(e)}get disabled(){return this._disabled||!!this._listBase?.disabled}set disabled(e){this._disabled=tn(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 Qt,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(Cr(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)(E(vt),E(gt),E(ZR,8),E(zi),E(eR,8),E(kr,8))},i.\u0275dir=ve({type:i,contentQueries:function(e,n,r){if(1&e&&(Wi(r,dse,4),Wi(r,use,4)),2&e){let s;At(s=Dt())&&(n._avatars=s),At(s=Dt())&&(n._icons=s)}},hostVars:4,hostBindings:function(e,n){2&e&&(It("aria-disabled",n.disabled)("disabled",n._isButtonElement&&n.disabled||null),ln("mdc-list-item--disabled",n.disabled))},inputs:{lines:"lines",disableRipple:"disableRipple",disabled:"disabled"}}),i})();const GH=new me("SelectionList");let wC=(()=>{class i extends $H{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=tn(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 $e,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)(E(vt),E(gt),E(GH),E(zi),E(Qn),E(eR,8),E(kr,8))},i.\u0275cmp=ot({type:i,selectors:[["mat-list-option"]],contentQueries:function(e,n,r){if(1&e&&(Wi(r,cse,5),Wi(r,lse,5)),2&e){let s;At(s=Dt())&&(n._lines=s),At(s=Dt())&&(n._titles=s)}},viewQuery:function(e,n){if(1&e&&$n(Gre,5),2&e){let r;At(r=Dt())&&(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&&Oe("blur",function(){return n._handleBlur()})("click",function(){return n._toggleOnInteraction()}),2&e&&(It("aria-selected",n.selected),ln("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:[Dn([{provide:$H,useExisting:i},{provide:zH,useExisting:i}]),dt],ngContentSelectors:ase,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&&(or(ose),fe(0,Wre,1,0,"ng-template",null,0,zc),fe(2,jre,6,4,"ng-template",null,1,zc),fe(4,Yre,5,4,"ng-template",null,2,zc),fe(6,Xre,2,1,"span",3),fe(7,Zre,2,1,"span",4),fe(8,Jre,1,1,"ng-template",5),G(9,"span",6),Yt(10),Yt(11,1),G(12,"span",7,8),Oe("cdkObserveContent",function(){return n._updateItemLines(!0)}),Yt(14,2),j()(),fe(15,tse,2,1,"span",9),fe(16,ise,2,1,"span",9),fe(17,sse,1,1,"ng-template",5),Yt(18,3),Ie(19,"div",10)),2&e&&(V(6),U("ngIf",n._hasCheckboxAt("before")),V(1),U("ngIf",n._hasRadioAt("before")),V(1),U("ngIf",n._hasIconsOrAvatarsAt("before")),V(7),U("ngIf",n._hasCheckboxAt("after")),V(1),U("ngIf",n._hasRadioAt("after")),V(1),U("ngIf",n._hasIconsOrAvatarsAt("after")))},dependencies:[SU,_i,xy],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 fse={provide:Io,useExisting:Gn(()=>MC),multi:!0};class pse{constructor(t,e){this.source=t,this.options=e}}let MC=(()=>{class i extends ZR{get multiple(){return this._multiple}set multiple(e){const n=tn(e);n!==this._multiple&&(this._multiple=n,this.selectedOptions=new HR(this._multiple,this.selectedOptions.selected))}get hideSingleSelectionIndicator(){return this._hideSingleSelectionIndicator}set hideSingleSelectionIndicator(e){this._hideSingleSelectionIndicator=tn(e)}constructor(e,n){super(),this._element=e,this._ngZone=n,this._initialized=!1,this._destroyed=new Te,this._onChange=r=>{},this.selectionChange=new $e,this.color="accent",this.compareWith=(r,s)=>r===s,this._multiple=!0,this._hideSingleSelectionIndicator=this._defaultOptions?.hideSingleSelectionIndicator??!1,this.selectedOptions=new HR(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 pse(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=tn(e),this._selectionListDisabled&&this._keyManager?.setActiveItem(-1)}registerOnChange(e){this._onChange=e}registerOnTouched(e){this._onTouched=e}_watchForSelectionChange(){this.selectedOptions.changed.pipe(Ue(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()&&Qo(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 kU(this._items).withHomeAndEnd().withTypeAhead().withWrap().skipPredicate(()=>this.disabled),this._resetActiveOption(),this._keyManager.change.subscribe(e=>this._setActiveOption(e)),this._items.changes.pipe(Ue(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=FM();return e&&this._element.nativeElement.contains(e)}}return i.\u0275fac=function(e){return new(e||i)(E(vt),E(gt))},i.\u0275cmp=ot({type:i,selectors:[["mat-selection-list"]],contentQueries:function(e,n,r){if(1&e&&Wi(r,wC,5),2&e){let s;At(s=Dt())&&(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&&Oe("keydown",function(s){return n._handleKeydown(s)}),2&e&&It("aria-multiselectable",n.multiple)},inputs:{color:"color",compareWith:"compareWith",multiple:"multiple",hideSingleSelectionIndicator:"hideSingleSelectionIndicator",disabled:"disabled"},outputs:{selectionChange:"selectionChange"},exportAs:["matSelectionList"],features:[Dn([fse,{provide:ZR,useExisting:i},{provide:GH,useExisting:i}]),dt,xi],ngContentSelectors:Hre,decls:1,vars:0,template:function(e,n){1&e&&(or(),Yt(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})(),mse=(()=>{class i{}return i.\u0275fac=function(e){return new(e||i)},i.\u0275mod=en({type:i}),i.\u0275inj=Wt({imports:[HI,co,Jn,tb,JU,kV]}),i})();function gse(i,t){if(1&i&&(G(0,"mat-label"),Be(1),j()),2&i){const e=re(2);V(1),ui(e.resource.name)}}function _se(i,t){if(1&i&&(G(0,"mat-list-option",5),Be(1),j()),2&i){const e=t.$implicit,n=re(2);U("value",e.key)("selected",n.resource.data[e.key])("disabled",n.disabled),V(1),Qi(" ",e.key," ")}}function vse(i,t){if(1&i){const e=jn();Gr(0,1),fe(1,gse,2,1,"mat-label",2),G(2,"mat-selection-list",3),Oe("selectionChange",function(r){return Vt(e),Et(re().onSelection(r))}),fe(3,_se,2,4,"mat-list-option",4),ct(4,"keyvalue"),j(),Wr()}if(2&i){const e=re();U("matTooltip",e.resourceDescription),V(1),U("ngIf",e.resource.name),V(1),U("disabled",e.disabled),V(1),U("ngForOf",ut(4,4,e.resource.data))}}let yse=(()=>{class i{constructor(){this.resource=null,this.resourceDescription="",this.disabled=!1,this.changed=new $e}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=ot({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&&fe(0,vse,5,6,"ng-container",0),2&e&&U("ngIf",n.resource)},dependencies:[lo,_i,Ro,Fs,MC,wC,dB],styles:["[_nghost-%COMP%]{padding-bottom:1.34375em}"],changeDetection:0}),i})();class WH{get tick$(){return this._tick$.asObservable()}get children(){return[...this._children]}constructor(t){this.parent=t,this._tick$=new Te,this._children=[],t&&t.addChild(this)}addChild(t){if(t.parent!==this)throw new Error("Incorrect child clock");this._children.includes(t)||this._children.push(t)}removeChild(t){if(t.parent!==this)throw new Error("Incorrect child clock");this._children=this._children.filter(e=>e!==t)}dispose(){this.parent&&this.parent.removeChild(this);for(const t of this._children)t.dispose();this._tick$.complete()}}const xse=typeof performance>"u"?()=>Date.now():()=>performance.now();class jm extends WH{static get instance(){return jm._instance||(jm._instance=new jm),jm._instance}get elapsedTime(){return xse()}constructor(){super(null);let t=this.elapsedTime;const e=()=>{requestAnimationFrame(e);const n=t,r=this.elapsedTime;t=r,this._tick$.next([n,r-n])};requestAnimationFrame(e)}dispose(){throw new Error("Cannot dispose global clock")}}class jH extends WH{get isRunning(){return!!this.tickSub}get isPaused(){return-1!==this.pausedAt}get isStopped(){return-1===this.startedAt}get timeScale(){return this._timeScale}set timeScale(t){if(t!==this._timeScale||this.pausedByTimescale&&0!==t){if(0===t)return void(this.isPaused||(this.pause(),this.pausedByTimescale=!0));if(this.isPaused&&this.pausedByTimescale&&(this.resume(),this.pausedByTimescale=!1),!this.isStopped){const e=this.isPaused?this.pausedAt:this.parentClock.elapsedTime;this.startedAt=e-(e-this.startedAt)*this.timeScale/t}this._timeScale=t}}get elapsedTime(){return this.isStopped?this.lastStopElapsed:this.isPaused?this._timeScale*(this.pausedAt-this.startedAt):this._timeScale*(this.parentClock.elapsedTime-this.startedAt)}constructor(t=!1,e=jm.instance){super(e),this.parentClock=e,this.tickSub=null,this._internalTick$=new Te,this.tickRateLimit=0,this.paused$=new Te,this.startedAt=-1,this.oldRelativeTime=0,this.pausedAt=-1,this.lastStopElapsed=0,this._timeScale=1,this.pausedByTimescale=!1,this.lastFiredTickElapsed=0,t&&this.start(),this._internalTick$.pipe(tt(([n,r])=>[r,r-this.lastFiredTickElapsed]),gn(([n])=>!this.tickRateLimit||Math.floor(this.lastFiredTickElapsed*this.tickRateLimit/1e3)this.lastFiredTickElapsed=n)).subscribe(this._tick$)}start(){this.isRunning||(this.oldRelativeTime=0,this.startedAt=this.parentClock.elapsedTime,this.startListeningTicks())}stop(){this.stopListeningTicks(),this.lastStopElapsed=this.elapsedTime,this.startedAt=this.pausedAt=-1}pause(){this.stopListeningTicks(),this.pausedAt=this.parentClock.elapsedTime,this.pausedByTimescale=!1,this.paused$.next(!0)}resume(){this.isRunning||-1==this.pausedAt||(this.startedAt+=this.parentClock.elapsedTime-this.pausedAt,this.pausedAt=-1,this.startListeningTicks(),this.paused$.next(!1))}startListeningTicks(){if(this.tickSub)throw new Error("Clock is already ticking!");this.tickSub=this.parentClock.tick$.pipe(tt(([t,e])=>[this.oldRelativeTime,this.oldRelativeTime+e*this.timeScale]),Vi(([t,e])=>this.oldRelativeTime=e)).subscribe(this._internalTick$)}stopListeningTicks(){var t;null===(t=this.tickSub)||void 0===t||t.unsubscribe(),this.tickSub=null}dispose(){this.stopListeningTicks(),this._internalTick$.complete(),super.dispose()}}const wse={transparent:!1,background:0,size:"fullscreen",antialias:!0};class Mse{constructor(t,e,n={}){this.scene=t,this.canvas=e,this.entity=null,this.rendererOptions=Object.assign(Object.assign({},wse),n||{})}}class mb{static fromArray(t,e=!1){const n=new mb(t[0]);let r=n;for(let s=1;sn.map(r=>new mb(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]}constructor(t){this.data=t,this.adjacent=new Set}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(d=>!e.has(d));for(const d of c)e.add(d),r.push([d,a-1])}}return n}nodes(){return Array.from(this.walkRead(-1))}}var oc=(()=>{return(i=oc||(oc={}))[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",oc;var i})();let Kh=(()=>{class i{constructor(){this.tick$=new Te,this._world=null,this._name="e0x"+(i.default_name_counter++).toString(16),this._selfActive=!0,this.parent=null,this._children=[],this._components=[],this._onSpawned$=new Te,this._onRemoved$=new Te}get world(){return this._world}get name(){return this._name}set name(e){this._name=e}get active(){return this._selfActive&&(!this.parent||this.parent.active)}set active(e){this._selfActive=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 Cse extends Kh{constructor(t){super(),this.tickOrder=t}}function Ym(i,t=oc.CONTROLLERS,e){const n=new Cse(t);return e&&(n.name=e),i.addEntity(n),n.tick$.pipe(su(()=>{i.removeEntity(n,!0)}))}class QR extends Kh{get rendererSize$(){return this._rendererSize$.asObservable()}get rendererSize(){return this._rendererSize$.getValue()}get rendererOptions(){return this.renderer.rendererOptions}get physicsDebugViewActive(){return this.renderer.physicsDebugViewActive}set physicsDebugViewActive(t){this.renderer.physicsDebugViewActive=t}constructor(t){super(),this.renderer=t,this.tickOrder=oc.RENDERING,this._rendererSize$=new Qe(null),this.addComponents(t),this.tick$.subscribe(()=>{this.renderer.render()})}onSpawned(t){this._rendererSize$.next(null),"fullscreen"==this.rendererOptions.size||"function"==typeof this.rendererOptions.size?(this.renderer.canvas&&(this.renderer.canvas.style.position="absolute"),Cr(To(window,"resize").pipe(Wy(100)),To(window,"orientationchange")).pipe(Ue(this._onRemoved$),tt(()=>({x:window.innerWidth,y:window.innerHeight})),Do({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 In||void 0!==this.rendererOptions.size.subscribe&&void 0!==this.rendererOptions.size.pipe?this.rendererOptions.size.pipe(Ue(this._onRemoved$)).subscribe(e=>{this._rendererSize$.next(e)}):this._rendererSize$.next(this.rendererOptions.size),this._rendererSize$.pipe(Ue(this._onRemoved$),Ql((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 JR=i=>{i.updateVisibility?i.updateVisibility():YH(i)},YH=i=>{for(const t of i.children)JR(t)};class Sse extends Kh{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(){YH(this)}addChildren(...t){super.addChildren(...t);for(const e of t)JR(e)}removeChildren(t,e=!1){if(super.removeChildren(t,e),!e)for(const n of t)JR(n)}}class ek{constructor(){this._running=!1,this.stop$=new Te}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 Ese extends ek{get output$(){return this._output$.asObservable()}constructor(t,e){super(),this.keyboard=t,this.keymap=e,this._output$=new Te}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")),Ra(t.map(e=>this.keyboard.bindMany(...e))).pipe(Ue(this.stop$),tt(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 tk=new In(ms);class CC extends ek{constructor(){super(),this.bindings={},this.skipKeyDownsOnExternalFocus=!0,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 Qe(!1);return this.bindings[t].push(e),e.pipe(Ql(),su(()=>{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"),tk;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 Qe(!1);this.bindings[n].push(r),e.push(r)}return Ra(e).pipe(su(()=>{for(let n=0;nn.includes(!0)),Ql())}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 CC.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)}}CC.externalFocusBlacklist=[HTMLInputElement,HTMLTextAreaElement,HTMLSelectElement,HTMLButtonElement];class yi{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 yi.len(yi.sub(t,e))}static norm(t){const e=yi.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 Dse={pointerLock:!1};var Ls=(()=>{return(i=Ls||(Ls={}))[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",Ls;var i})();class qm extends ek{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$=To(this._element,"wheel",{passive:!1}).pipe(Ue(this.stopped$),su(()=>this._wheel$=null),Vi(t=>t.preventDefault()),tt(t=>t.deltaY),Vf())),this._wheel$}get isPointerLocked(){return!!document.pointerLockElement}get isPointerLocked$(){return To(document,"pointerlockchange").pipe(tt(()=>this.isPointerLocked))}get state(){return this._state$.getValue()}get state$(){return this._state$.asObservable()}get multiTouchPositions$(){return this._multiTouchPositions$.asObservable()}get twoTouchGestureDelta$(){return this.state$.pipe(ks(t=>t==Ls.DRAG_TOUCH_TWO_FINGERS?this.multiTouchPositions$:tk),tt(t=>t.map(e=>({x:e.x,y:e.y}))),function Ase(){return ni((i,t)=>{let e,n=!1;i.subscribe(qn(t,r=>{const s=e;e=r,n&&t.next([s,r]),n=!0}))})}(),gn(([t,e])=>t.length>1&&e.length>1),tt(([t,e])=>({centerPointDelta:yi.sub(yi.scalarMult(e.reduce((n,r)=>yi.add(n,r),yi.O),1/e.length),yi.scalarMult(t.reduce((n,r)=>yi.add(n,r),yi.O),1/e.length)),angleDelta:yi.angle(e[1],e[0])-yi.angle(t[1],t[0]),distanceDelta:yi.dist(e[1],e[0])-yi.dist(t[1],t[0])})))}get _element(){return this.options.canvas||window}constructor(t={}){super(),this._wheel$=null,this._delta$=new Te,this._position$=new Qe(yi.O),this._multiTouchPositions$=new Qe([]),this.stopped$=new Te,this._state$=new Qe(Ls.NONE),this.options=Object.assign(Object.assign({},Dse),t),this.canvasClickListener=this.canvasClickListener.bind(this)}startInternal(){this.options.canvas&&(this.options.canvas.style.touchAction="none"),this._state$.next(Ls.NONE);const t=[Ls.DRAG,Ls.DRAG_MIDDLE_BUTTON,Ls.DRAG_RIGHT_BUTTON],e=[Ls.NONE,Ls.DRAG,Ls.DRAG_TOUCH_TWO_FINGERS],n=[],r={};To(this._element,"mousemove").pipe(Ue(this.stopped$)).subscribe(o=>{this._delta$.next({x:o.movementX,y:o.movementY})}),To(this._element,"pointermove").pipe(Ue(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})}),!qm.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{if(0===n.length)try{this.options.canvas&&this.options.canvas.setPointerCapture(o.pointerId),window.addEventListener("pointerup",s),this._element.addEventListener("pointercancel",s)}catch(a){console.error(a)}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]||Ls.NONE)}),To(this._element,"contextmenu").pipe(Ue(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 Tse{static lookAt(t,e,n){let r=Re.sub(t,e);r=0===Re.lenSq(r)?Object.assign(Object.assign({},r),{z:1}):Re.norm(r);let s=Re.cross(n,r);0===Re.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=Re.norm(r),s=Re.cross(n,r)),s=Re.norm(s);let o=Re.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 Yi{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,d=t.w*Math.sin((1-n)*s)/o+e.w*Math.sin(n*s)/o;return isNaN(a)||isNaN(l)||isNaN(c)||isNaN(d)?Yi.clone(t):{x:a,y:l,z:c,w:d}}static fromAngle(t,e){const n=e/2,r=Math.sin(n);return Object.assign(Object.assign({},Re.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],d=t[10],h=e+o+d;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>d){const p=2*Math.sqrt(1+e-o-d);return{x:.25*p,y:(n+s)/p,z:(r+l)/p,w:(c-a)/p}}if(o>d){const p=2*Math.sqrt(1+o-e-d);return{x:(n+s)/p,y:.25*p,z:(a+c)/p,w:(r-l)/p}}{const p=2*Math.sqrt(1+d-e-o);return{x:(r+l)/p,y:(a+c)/p,z:.25*p,w:(s-n)/p}}}static fromMatrix3(t){const e=t[0][0]+t[1][1]+t[2][2];let n,r,s,o;if(e>0){const a=.5/Math.sqrt(e+1);n=.25/a,r=(t[2][1]-t[1][2])*a,s=(t[0][2]-t[2][0])*a,o=(t[1][0]-t[0][1])*a}else if(t[0][0]>t[1][1]&&t[0][0]>t[2][2]){const a=2*Math.sqrt(1+t[0][0]-t[1][1]-t[2][2]);n=(t[2][1]-t[1][2])/a,r=.25*a,s=(t[0][1]+t[1][0])/a,o=(t[0][2]+t[2][0])/a}else if(t[1][1]>t[2][2]){const a=2*Math.sqrt(1+t[1][1]-t[0][0]-t[2][2]);n=(t[0][2]-t[2][0])/a,r=(t[0][1]+t[1][0])/a,s=.25*a,o=(t[1][2]+t[2][1])/a}else{const a=2*Math.sqrt(1+t[2][2]-t[0][0]-t[1][1]);n=(t[1][0]-t[0][1])/a,r=(t[0][2]+t[2][0])/a,s=(t[1][2]+t[2][1])/a,o=.25*a}return{w:n,x:r,y:s,z:o}}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),d=Math.sin(.5*e);return{w:c*a*s+d*l*o,x:d*a*s-c*l*o,y:c*l*s+d*a*o,z:c*a*o-d*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=Re.Z){return this.fromMatrix4(Tse.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 Re{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 Re.len(Re.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=Re.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,Yi.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)}}}function nk(i,t,e,n){return r=>r.pipe(tI((s,o)=>{var a;return{targetValue:o,currentValue:null!==(a=s.currentValue)&&void 0!==a?a:o,hasReachedTarget:!1}},{targetValue:null,currentValue:null,hasReachedTarget:!1}),ks(s=>i.pipe(tt(([o,a])=>{if(null===s.targetValue||null===s.currentValue)return s.currentValue;if(s.hasReachedTarget)return;const l=1-Math.exp(-a/t),c=e(s.currentValue,s.targetValue,l);return s.currentValue=c,n(c,s.targetValue)?(s.hasReachedTarget=!0,s.targetValue):c}))),tt(s=>void 0!==s?s:null),gn(s=>null!==s))}ps(738);class kse extends Kh{get avgReport(){return this._avgReport}get peakReport(){return this._peakReport}constructor(t=60,e=15){super(),this.maxSamples=t,this.maxRows=e,this.tickOrder=Number.MAX_SAFE_INTEGER,this.sampleIndex=0,this.collectedData=new Map,this._avgReport={totalTime:0,entries:[]},this._peakReport={totalTime:0,entries:[]}}onSpawned(t){super.onSpawned(t),this.sampleIndex=0;const e=()=>(typeof performance>"u"?Date:performance).now();this.world.tickForwardTo$.pipe(Ue(this.onRemoved$)).subscribe(n=>{n!==this&&(this.collectedData.has(n)?this.collectedData.get(n).push([this.sampleIndex,e(),0]):this.collectedData.set(n,[[this.sampleIndex,e(),0]]))}),this.world.tickForwardedTo$.pipe(Ue(this.onRemoved$)).subscribe(n=>{if(n===this)return;const r=this.collectedData.get(n);r[r.length-1][2]=e()}),this.tick$.pipe(Ue(this.onRemoved$)).subscribe(()=>{this.sampleIndex++;const n=Array.from(this.collectedData.entries());for(const[h,p]of n){for(;p.length>0&&p[0][0]h instanceof Kh?""===h.name?h.constructor.name:h.name:"PHYSICS_WORLD"===h?"Physics simulation":h,s=h=>{let p=0,m=0;for(;mh.length-m+1){m--;break}p+=h[h.length-m-1][1]}return m>1&&(h=h.slice(0,h.length-m)).push([`Rest (${m})`,p]),h};let o=0,a=Array.from(this.collectedData.entries()).map(([h,p])=>{const m=p.reduce((g,[b,v,y])=>g+y-v,0)/this.maxSamples;return o+=m,[r(h),m]}).sort((h,p)=>p[1]-h[1]);a=s(a),this._avgReport={totalTime:o,entries:a};let l=new Map,c=Array.from(this.collectedData.entries()).map(([h,p])=>{let m=0;for(const[g,b,v]of p){const y=v-b;m=Math.max(m,y),l.set(g,y+(l.get(g)||0))}return[r(h),m]}).sort((h,p)=>p[1]-h[1]);c=s(c);let d=Array.from(l.values()).reduce((h,p)=>Math.max(h,p),0);this._peakReport={totalTime:d,entries:c}})}onRemoved(){super.onRemoved(),this.collectedData=new Map,this._avgReport={totalTime:0,entries:[]},this._peakReport={totalTime:0,entries:[]}}}var Xm=function(i,t,e,n){return new(e||(e=Promise))(function(s,o){function a(d){try{c(n.next(d))}catch(h){o(h)}}function l(d){try{c(n.throw(d))}catch(h){o(h)}}function c(d){d.done?s(d.value):function r(s){return s instanceof e?s:new e(function(o){o(s)})}(d.value).then(a,l)}c((n=n.apply(i,t||[])).next())})};class bl{static get documentWorlds(){return[...bl._documentWorlds]}constructor(t,e){this.visualScene=t,this.physicsWorld=e,this.worldClock=new jH(!1),this.keyboardInput=new CC,this.name="w0x"+(bl.default_name_counter++).toString(16),this.children=[],this.tickListeners=[],this.tickStarted$=new Te,this.tickForwardTo$=new Te,this.tickForwardedTo$=new Te,this.paused$=new Te,this.disposed$=new Te,this.keyboardInput.start(),window.ggstatic?this.registerConsoleCommands(window.ggstatic):(this.onGgStaticInitialized=this.onGgStaticInitialized.bind(this),window.addEventListener("ggstatic_added",this.onGgStaticInitialized)),this.worldClock.paused$.subscribe(this.paused$),bl._documentWorlds.push(this),bl.worldCreated$.next(this)}init(){return Xm(this,void 0,void 0,function*(){yield Promise.all([this.physicsWorld.init(),this.visualScene.init()]);const t=(e,n,r)=>{e.active&&(this.tickForwardTo$.next(e),e.tick$.next([n,r]),this.tickForwardedTo$.next(e))};this.worldClock.tick$.subscribe(([e,n])=>{this.tickStarted$.next();let r=0;for(;r=oc.PHYSICS_SIMULATION);r++)t(this.tickListeners[r],e,n);for(this.tickForwardTo$.next("PHYSICS_WORLD"),this.physicsWorld.simulate(n),this.tickForwardedTo$.next("PHYSICS_WORLD");re.tickOrder-n.tickOrder),t.onSpawned(this))}removeEntity(t,e=!1){if(t.world){if(t.world!==this)throw new Error("Entity is not a part of this world");this.children.splice(this.children.findIndex(n=>n===t),1),this.tickListeners.splice(this.tickListeners.findIndex(n=>n===t),1),t.onRemoved()}e&&t.dispose()}onGgStaticInitialized(){window.removeEventListener("ggstatic_added",this.onGgStaticInitialized),this.registerConsoleCommands(window.ggstatic)}registerConsoleCommands(t){t.registerConsoleCommand(this,"timescale",(...e)=>Xm(this,void 0,void 0,function*(){return isNaN(+e[0])||(this.worldClock.timeScale=+e[0]),this.worldClock.timeScale.toString()}),"args: [ float? ]; Get current time scale of selected world clock or set it. Default value is 1.0 (no time scale applied)"),t.registerConsoleCommand(this,"fps_limit",(...e)=>Xm(this,void 0,void 0,function*(){return isNaN(+e[0])||(this.worldClock.tickRateLimit=+e[0]),this.worldClock.tickRateLimit.toString()}),"args: [ int? ]; Get current tick rate limit of selected world clock or set it. 0 means no limit applied"),t.registerConsoleCommand(this,"renderers",()=>Xm(this,void 0,void 0,function*(){return this.children.filter(e=>e instanceof QR).map(e=>e.name).join("\n")}),"no args; Print all renderers in selected world"),t.registerConsoleCommand(this,"debug_view",(...e)=>Xm(this,void 0,void 0,function*(){let r,n="toggle";for(let o of e)["1","0"].includes(o)?n="1"===o:r=o;let s=this.children.find(o=>o instanceof QR&&(!r||o.name===r));if(s)return s.physicsDebugViewActive="toggle"===n?!s.physicsDebugViewActive:n,s.physicsDebugViewActive?"1":"0";throw r?new Error(`Renderer with name "${r}" not found`):new Error("No renderer found")}),'args: [ 0|1?, string? ]; Turn on/off physics debug view, skip first argument to toggle value. Second argument expects renderer name, if not provided first renderer will be picked. Use "renderers" to get list of renderers in the world'),t.registerConsoleCommand(this,"performance",(...e)=>Xm(this,void 0,void 0,function*(){let n="avg",r=20;for(let d of e)["avg","peak"].includes(d)?n=d:isNaN(+d)||(r=+d);const s=new kse(r,250);this.addEntity(s),yield function Ise(i,t){const e="object"==typeof t;return new Promise((n,r)=>{let o,s=!1;i.subscribe({next:a=>{o=a,s=!0},error:r,complete:()=>{s?n(o):e?n(t.defaultValue):r(new fm)}})})}(this.worldClock.tick$.pipe(Oi(r)));const o="avg"===n?s.avgReport:s.peakReport;this.removeEntity(s);const a=o.entries.map(([d,h])=>`${d}:`+new Array(Math.max(0,26-d.length)).join(" ")+`${h.toFixed(2)} ms`+("avg"===n?` (${(100*h/o.totalTime).toFixed(2)}%)`:""));let l="lightgreen";o.totalTime>12&&(l=o.totalTime<16?"yellow":"red");const c=("avg"===n?"Average":"Peak")+" Frame time";return a.unshift(c+":"+new Array(Math.max(0,26-c.length)).join(" ")+`${o.totalTime.toFixed(2)} ms`),a.unshift(`Performance report (${r} samples)`),a.join("\n")}),'args: [ int?, avg|peak? ]; Measure how much time was spent per entity in world. Arguments are samples amount (20 by default) and "peak" or "avg" choice, both arguments are optional. "avg" report sorts entities by average time consumed, "peak" records highest value for each entity')}}bl.default_name_counter=0,bl._documentWorlds=[],bl.worldCreated$=new Te;class Lse extends Mse{}class XH extends Sse{constructor(){super(...arguments),this._world=null}get world(){return this._world}}class ea extends XH{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}constructor(t){super(),this.tickOrder=oc.OBJECTS_BINDING,this._position=Re.O,this._rotation=Yi.O,this.object3D=null,this.objectBody=null,t.objectBody&&(this.objectBody=t.objectBody,this.name=this.objectBody.name,this.addComponents(this.objectBody)),t.object3D&&(this.object3D=t.object3D,t.objectBody||(this._position=this.object3D.position,this._rotation=this.object3D.rotation,this.name=this.object3D.name),this.addComponents(this.object3D)),this.objectBody&&(this.tick$.subscribe(()=>{this.runTransformBinding(this.objectBody,this.object3D)}),this.runTransformBinding(this.objectBody,this.object3D))}}class Km extends mb{static fromMapArray(t,e=!1){const n=new Km(t[0]);let r=n;for(let s=1;sn.map(r=>new Km(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));othis.mapGraph.getNearestDummy(this.mapGraphNodes,this.loaderCursor$.getValue())),Ql(),Vi(r=>this._nearestDummy$.next(r))).subscribe(r=>{let o,s=new Set;if(this.options.inertia>0){o=new Set;const a=r.walkReadPreserveDepth(this.options.loadDepth+this.options.inertia);for(let l=0;lo.add(c.data)),l<=this.options.loadDepth&&a[l].forEach(c=>s.add(c.data))}else r.walkRead(this.options.loadDepth).forEach(a=>s.add(a.data)),o=s;for(const a of this.loaded.keys())o.has(a)?s.delete(a):n.includes(a)||n.push(a);for(let a of Array.from(s.keys()))e.includes(a)||e.push(a)}),this.tick$.pipe(Do(null),Ue(this._onRemoved$)).subscribe(()=>{if(n.length){for(const r of n)this.disposeChunk(r);n=[]}if(e.length)if(this._initialLoadComplete$.value&&e.length>this.options.maxNodesLoadingPerTick){let r=e.slice(0,this.options.maxNodesLoadingPerTick);e=e.slice(this.options.maxNodesLoadingPerTick),Promise.all(r.map(s=>this.loadChunk(s))).then()}else Promise.all(e.map(r=>this.loadChunk(r))).then(()=>{this._initialLoadComplete$.value||this._initialLoadComplete$.next(!0)}),e=[]})}onRemoved(){super.onRemoved(),this.loadClock&&(this.loadClock.stop(),this.loadClock=null),this.loaderCursor$.next(Re.O)}loadChunk(t){return function(i,t,e,n){return new(e||(e=Promise))(function(s,o){function a(d){try{c(n.next(d))}catch(h){o(h)}}function l(d){try{c(n.throw(d))}catch(h){o(h)}}function c(d){d.done?s(d.value):function r(s){return s instanceof e?s:new e(function(o){o(s)})}(d.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||Yi.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||Yi.O}]),[n,e]})}disposeChunk(t){this.loaded.has(t)&&(this.removeChildren(this.loaded.get(t),!0),this.loaded.delete(t))}}class Use extends QR{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 e4=function(i,t,e,n){return new(e||(e=Promise))(function(s,o){function a(d){try{c(n.next(d))}catch(h){o(h)}}function l(d){try{c(n.throw(d))}catch(h){o(h)}}function c(d){d.done?s(d.value):function r(s){return s instanceof e?s:new e(function(o){o(s)})}(d.value).then(a,l)}c((n=n.apply(i,t||[])).next())})};const t4={keymap:"wasd",cameraLinearSpeed:20,cameraMovementElasticity:0,cameraBoostMultiplier:2.5,cameraRotationSensitivity:1,cameraRotationElasticity:0,mouseOptions:{},ignoreMouseUnlessPointerLocked:!1,ignoreKeyboardUnlessPointerLocked:!1};class n4 extends Kh{get active(){return super.active}set active(t){!super.active&&t&&this.reset(),super.active=t}get spherical(){return this._spherical}set spherical(t){this._spherical.phi=Math.max(1e-6,Math.min(Math.PI-1e-6,t.phi)),this._spherical.theta=t.theta,this.resetMotion$.next()}constructor(t,e,n={}){super(),this.keyboard=t,this.camera=e,this.tickOrder=oc.INPUT_CONTROLLERS,this._spherical={phi:0,radius:1,theta:0},this.resetMotion$=new Te,this.options=Object.assign(Object.assign({},t4),n),n.mouseOptions&&(this.options.mouseOptions=Object.assign(Object.assign({},t4.mouseOptions),n.mouseOptions)),this.mouseInput=new qm(this.options.mouseOptions),this.directionsInput=new Ese(t,this.options.keymap)}reset(){this._spherical=Re.toSpherical(Re.rot({x:0,y:0,z:-1},this.camera.rotation)),this.resetMotion$.next()}onSpawned(t){const e=Object.create(null,{onSpawned:{get:()=>super.onSpawned}});return e4(this,void 0,void 0,function*(){yield e.onSpawned.call(this,t),this._spherical=Re.toSpherical(Re.rot({x:0,y:0,z:-1},this.camera.rotation));const n=["KeyE","KeyQ"];this.camera.camera.supportsFov&&n.push("KeyZ","KeyC"),n.push("ShiftLeft");let r=Ra([this.directionsInput.output$,...n.map(c=>this.keyboard.bind(c))]).pipe(Ue(this._onRemoved$),tt(([c,...d])=>{let h={direction:{},rest:[]};(!this.options.ignoreKeyboardUnlessPointerLocked||this.mouseInput.isPointerLocked)&&(h={direction:c,rest:d});let p=Object.assign({},Re.O);const[m,g,b,v,y]=h.rest;void 0!==h.direction.upDown&&(p.z=h.direction.upDown?-1:1),void 0!==h.direction.leftRight&&(p.x=h.direction.leftRight?-1:1),m!=g&&(p.y=g?-1:1);let M=0;return b!=v&&(M=b?1:-1),p=Re.norm(p),y&&(p=Re.scalarMult(p,this.options.cameraBoostMultiplier)),[p,M]}));this.options.cameraMovementElasticity>0&&(r=r.pipe(nk(this.camera.tick$,this.options.cameraMovementElasticity,([c,d],[h,p],m)=>[Re.lerp(c,h,m),p],([c,d],[h,p])=>d==p&&Re.dist(c,h)<.001)));let s=Re.O,o=0;r.subscribe(([c,d])=>{s=c,o=d});let a=qm.isTouchDevice(),l=this.mouseInput.delta$.pipe(Ue(this._onRemoved$),gn(()=>this.active&&(a||!this.options.ignoreMouseUnlessPointerLocked||this.mouseInput.isPointerLocked)));if(this.options.cameraRotationElasticity>0){const c=new Qe(this._spherical);l.subscribe(h=>{const p=c.getValue();c.next({phi:Math.max(1e-6,Math.min(Math.PI-1e-6,p.phi+h.y*this.options.cameraRotationSensitivity/1e3)),theta:p.theta-h.x*this.options.cameraRotationSensitivity/1e3,radius:1})});const d=()=>{c.pipe(Ue(this._onRemoved$),nk(this.tick$,this.options.cameraRotationElasticity,(h,p,m)=>({phi:h.phi+m*(p.phi-h.phi),theta:h.theta+m*(p.theta-h.theta),radius:1}),(h,p)=>yi.dist({x:h.phi,y:h.theta},{x:p.phi,y:p.theta})<1e-4),Ue(this.resetMotion$)).subscribe(h=>{this._spherical.theta=h.theta,this._spherical.phi=h.phi})};this.resetMotion$.pipe(Ue(this._onRemoved$)).subscribe(()=>{c.next(this._spherical),d()}),d()}else l.subscribe(c=>{this._spherical.theta-=c.x*this.options.cameraRotationSensitivity/1e3,this._spherical.phi+=c.y*this.options.cameraRotationSensitivity/1e3,this._spherical.phi=Math.max(1e-6,Math.min(Math.PI-1e-6,this._spherical.phi))});this.camera.tick$.pipe(Ue(this._onRemoved$),gn(()=>this.active)).subscribe(([c,d])=>{this.camera.camera.fov+=o,this.camera.position=Re.add(this.camera.position,Re.rot(Re.scalarMult(s,this.options.cameraLinearSpeed*d/1e3),this.camera.rotation)),this.camera.rotation=Yi.lookAt(this.camera.position,Re.add(this.camera.position,Re.fromSpherical(this._spherical)))}),this.mouseInput.start(),this.directionsInput.start()})}onRemoved(){const t=Object.create(null,{onRemoved:{get:()=>super.onRemoved}});return e4(this,void 0,void 0,function*(){yield t.onRemoved.call(this),yield this.mouseInput.stop(!0),yield this.directionsInput.stop()})}}var i4=function(i,t,e,n){return new(e||(e=Promise))(function(s,o){function a(d){try{c(n.next(d))}catch(h){o(h)}}function l(d){try{c(n.throw(d))}catch(h){o(h)}}function c(d){d.done?s(d.value):function r(s){return s instanceof e?s:new e(function(o){o(s)})}(d.value).then(a,l)}c((n=n.apply(i,t||[])).next())})};const zse={mouseOptions:{},orbiting:{sensitivityX:1,sensitivityY:1},orbitingElasticity:0,zooming:{sensitivity:1},panning:{sensitivityX:1,sensitivityY:1},dollying:{sensitivity:1}};class Hse extends Kh{get active(){return super.active}set active(t){!super.active&&t&&this.reset(),super.active=t}get spherical(){return this._spherical}set spherical(t){this._spherical.phi=Math.max(1e-6,Math.min(Math.PI-1e-6,t.phi)),this._spherical.theta=t.theta,this._spherical.radius=t.radius,this.resetMotion$.next()}constructor(t,e={}){super(),this.camera=t,this.tickOrder=oc.INPUT_CONTROLLERS,this._spherical={phi:0,radius:10,theta:0},this.target=Re.O,this.resetMotion$=new Te,this.options=Object.assign(Object.assign({},zse),e),this.mouseInput=new qm(this.options.mouseOptions)}reset(){let t=Re.dist(this.target,this.camera.position);this.target=Re.add(this.camera.position,Re.rot({x:0,y:0,z:-t},this.camera.rotation)),this._spherical=Re.toSpherical(Re.sub(this.camera.position,this.target)),this.resetMotion$.next()}onSpawned(t){const e=Object.create(null,{onSpawned:{get:()=>super.onSpawned}});return i4(this,void 0,void 0,function*(){if(yield e.onSpawned.call(this,t),this._spherical=Re.toSpherical(Re.sub(this.camera.position,this.target)),this.options.orbiting){let r=this.mouseInput.delta$.pipe(Ue(this._onRemoved$),gn(()=>this.active&&this.mouseInput.state==Ls.DRAG));if(this.options.orbitingElasticity>0){const s=new Qe(this._spherical);r.subscribe(a=>{const l=s.getValue();s.next({phi:Math.max(1e-6,Math.min(Math.PI-1e-6,l.phi-a.y*this.options.orbiting.sensitivityY/1e3)),theta:l.theta-a.x*this.options.orbiting.sensitivityX/1e3,radius:1})});const o=()=>{s.pipe(Ue(this._onRemoved$),nk(this.tick$,this.options.orbitingElasticity,(a,l,c)=>({phi:a.phi+c*(l.phi-a.phi),theta:a.theta+c*(l.theta-a.theta),radius:1}),(a,l)=>yi.dist({x:a.phi,y:a.theta},{x:l.phi,y:l.theta})<1e-4),Ue(this.resetMotion$)).subscribe(a=>{this._spherical.theta=a.theta,this._spherical.phi=a.phi})};this.resetMotion$.pipe(Ue(this._onRemoved$)).subscribe(()=>{s.next(this._spherical),o()}),o()}else r.subscribe(s=>{this._spherical.theta-=s.x*this.options.orbiting.sensitivityX/1e3,this._spherical.phi-=s.y*this.options.orbiting.sensitivityY/1e3,this._spherical.phi=Math.max(1e-6,Math.min(Math.PI-1e-6,this._spherical.phi))})}this.options.zooming&&this.mouseInput.wheel$.pipe(Ue(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=Re.fromSpherical(this._spherical),o=Re.rotAround(s,{x:-Math.sin(this._spherical.theta),y:Math.cos(this._spherical.theta),z:0},Math.PI/2),a=Re.rotAround(s,Re.norm(o),Math.PI/2);this.target=Re.add(this.target,Re.add(Re.scalarMult(o,-this.options.panning.sensitivityY*r.y/1e3),Re.scalarMult(a,this.options.panning.sensitivityX*r.x/1e3)))};this.options.panning&&this.mouseInput.delta$.pipe(Ue(this._onRemoved$),gn(()=>this.mouseInput.state==Ls.DRAG_RIGHT_BUTTON)).subscribe(r=>{n(r)}),this.options.dollying&&this.mouseInput.delta$.pipe(Ue(this._onRemoved$),gn(()=>this.mouseInput.state==Ls.DRAG_MIDDLE_BUTTON)).subscribe(r=>{this._spherical.radius*=Math.pow(.95,-this.options.dollying.sensitivity*r.y/10)}),qm.isTouchDevice()&&(this.options.dollying||this.options.panning)&&this.mouseInput.twoTouchGestureDelta$.pipe(Ue(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(Ue(this._onRemoved$),gn(()=>this.active),tt(()=>this._spherical)).subscribe(r=>{this.camera.position=Re.add(this.target,Re.fromSpherical(r)),this.camera.rotation=Yi.lookAt(this.camera.position,this.target)}),yield this.mouseInput.start()})}onRemoved(){const t=Object.create(null,{onRemoved:{get:()=>super.onRemoved}});return i4(this,void 0,void 0,function*(){yield t.onRemoved.call(this),yield this.mouseInput.stop(!0)})}}class Gse{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 sk=function(i,t,e,n){return new(e||(e=Promise))(function(s,o){function a(d){try{c(n.next(d))}catch(h){o(h)}}function l(d){try{c(n.throw(d))}catch(h){o(h)}}function c(d){d.done?s(d.value):function r(s){return s instanceof e?s:new e(function(o){o(s)})}(d.value).then(a,l)}c((n=n.apply(i,t||[])).next())})},yu=(()=>{return(i=yu||(yu={}))[i.Nothing=0]="Nothing",i[i.Files=1]="Files",i[i.Entities=2]="Entities",yu;var i})();const r4={cachingStrategy:yu.Nothing,position:Re.O,rotation:Yi.O,loadProps:!0},s4=i=>({meta:i.meta,resources:i.resources.map(({object3D:t,body:e})=>({object3D:t&&t.clone(),body:e&&e.clone()}))});class Wse{constructor(t){this.world=t,this.filesCache=new Map,this.loadResultCache=new Map}loadGgGlbFiles(t){return sk(this,arguments,void 0,function*(e,n=!1){if(n&&this.filesCache.has(e))return this.filesCache.get(e);const r=Promise.all([fetch(`${e}.glb`).then(o=>o.arrayBuffer()),fetch(`${e}.meta`).then(o=>o.text()).then(o=>JSON.parse(o))]);n&&this.filesCache.set(e,r);const s=yield r;return n&&this.filesCache.set(e,s),s})}loadGgGlbResources(t){return sk(this,arguments,void 0,function*(e,n=yu.Nothing){if(n==yu.Entities&&this.loadResultCache.has(e)){const c=this.loadResultCache.get(e),d=c instanceof Promise?yield c:c;return s4(d)}const[r,s]=yield this.loadGgGlbFiles(e,n==yu.Files);if(!r)throw new Error("GLB not found");const[o,a]=yield Promise.all([this.world.visualScene.loader.loadFromGgGlb(r,s),this.world.physicsWorld.loader.loadFromGgGlb(r,s)]),l={resources:[],meta:s};if(!o)return l;if(0==a.length)l.resources.push({object3D:o,body:null});else if(1==a.length)l.resources.push({object3D:o,body:a[0]});else{for(const c of a)l.resources.push({object3D:o.popChild(c.name),body:c});o.isEmpty()||l.resources.push({object3D:o,body:null})}return n==yu.Entities&&this.loadResultCache.set(e,s4(l)),l})}loadGgGlb(t){return sk(this,arguments,void 0,function*(e,n=r4){const r=Object.assign(Object.assign({},r4),n),{resources:s,meta:o}=yield this.loadGgGlbResources(e,r.cachingStrategy),a={entities:s.map(l=>new ea({object3D:l.object3D,objectBody:l.body})),meta:o};return r.loadProps&&(a.props=yield Promise.all(o.dummies.filter(l=>l.is_prop||l.is_scene).map(l=>this.loadGgGlb(l.is_prop?(r.propsPath||e.substring(0,e.lastIndexOf("/")+1))+l.prop_id:l.scene_id,{loadProps:!!l.is_scene,position:Re.add(Re.rot(l.position,r.rotation),r.position),rotation:Yi.combineRotations(l.rotation,r.rotation)})))),a.entities.forEach(l=>{l.position=Re.add(Re.rot(Re.clone(l.position),r.rotation),r.position),l.rotation=Yi.mult(Yi.clone(l.rotation),r.rotation)}),a})}}class ok extends bl{constructor(t,e){super(t,e),this.visualScene=t,this.physicsWorld=e,this.loader=new Wse(this)}addPrimitiveRigidBody(t,e=Re.O,n=Yi.O,r={}){const s=new ea({object3D:this.visualScene.factory.createPrimitive(t.shape,r),objectBody:this.physicsWorld.factory.createRigidBody(t)});return s.position=e,s.rotation=n,this.addEntity(s),s}addRenderer(t,e,n){const r=new Use(this.visualScene.createRenderer(t,e,n));return this.addEntity(r),r}registerConsoleCommands(t){super.registerConsoleCommands(t),t.registerConsoleCommand(this,"gravity",(...e)=>function(i,t,e,n){return new(e||(e=Promise))(function(s,o){function a(d){try{c(n.next(d))}catch(h){o(h)}}function l(d){try{c(n.throw(d))}catch(h){o(h)}}function c(d){d.done?s(d.value):function r(s){return s instanceof e?s:new e(function(o){o(s)})}(d.value).then(a,l)}c((n=n.apply(i,t||[])).next())})}(this,void 0,void 0,function*(){if(1==e.length&&(e=["0","0",""+-+e[0]]),e.length>0){if(isNaN(+e[0])||isNaN(+e[1])||isNaN(+e[2]))throw new Error("Wrong arguments");this.physicsWorld.gravity={x:+e[0],y:+e[1],z:+e[2]}}return JSON.stringify(this.physicsWorld.gravity)}),'args: [ ?float, ?float, ?float ]; Get or set 3D world gravity vector. 1 argument sets vector {x: 0, y: 0, z: -value}, 3 arguments set the whole vector. Default value is "9.82" or "0 0 -9.82"')}}function o4(i,t=Gy,e){const n=OI(i,t);return function Yse(i,t){return ni((e,n)=>{const{leading:r=!0,trailing:s=!1}=t??{};let o=!1,a=null,l=null,c=!1;const d=()=>{l?.unsubscribe(),l=null,s&&(m(),c&&n.complete())},h=()=>{l=null,c&&n.complete()},p=g=>l=Mr(i(g)).subscribe(qn(n,d,h)),m=()=>{if(o){o=!1;const g=a;a=null,n.next(g),!c&&p(g)}};e.subscribe(qn(n,g=>{o=!0,a=g,(!l||l.closed)&&(r?m():p(g))},()=>{c=!0,(!(s&&o&&l)||l.closed)&&n.complete()}))})}(()=>n,e)}window.gg_version="0.0.56";const qse=0,a4=1,Xse=2,l4=1,c4=2,Qc=3,lc=0,ko=1,Ns=2,Jc=0,Zm=1,d4=2,u4=3,h4=4,Kse=5,Zh=100,Zse=101,Qse=102,Jse=103,eoe=104,toe=200,noe=201,ioe=202,roe=203,lk=204,ck=205,soe=206,ooe=207,aoe=208,loe=209,coe=210,doe=211,uoe=212,hoe=213,foe=214,poe=0,moe=1,goe=2,SC=3,_oe=4,voe=5,yoe=6,boe=7,EC=0,xoe=1,woe=2,bu=0,Moe=1,Coe=2,Soe=3,Eoe=4,Aoe=5,Doe=6,Toe=7,f4="attached",cc=301,Qh=302,AC=303,DC=304,gb=306,Bs=1e3,er=1001,_b=1002,vr=1003,uk=1004,Qm=1005,cr=1006,vb=1007,xl=1008,ed=1009,p4=1010,m4=1011,yb=1012,hk=1013,xu=1014,ta=1015,Jm=1016,fk=1017,pk=1018,eg=1020,g4=35902,_4=1021,v4=1022,Po=1023,y4=1024,b4=1025,tg=1026,ng=1027,mk=1028,TC=1029,x4=1030,gk=1031,_k=1033,IC=33776,RC=33777,kC=33778,PC=33779,vk=35840,yk=35841,bk=35842,xk=35843,wk=36196,Mk=37492,Ck=37496,Sk=37808,Ek=37809,Ak=37810,Dk=37811,Tk=37812,Ik=37813,Rk=37814,kk=37815,Pk=37816,Ok=37817,Fk=37818,Lk=37819,Nk=37820,Bk=37821,OC=36492,Uk=36494,Vk=36495,w4=36283,zk=36284,Hk=36285,$k=36286,bb=2300,xb=2301,Ooe=0,C4=1,jk=2,Loe=3201,Jh=0,Noe=1,wu="",cs="srgb",ds="srgb-linear",Yk="display-p3",LC="display-p3-linear",NC="linear",Fi="srgb",BC="rec709",UC="p3",sg=7680,Boe=512,Uoe=513,Voe=514,E4=515,zoe=516,Hoe=517,$oe=518,Goe=519,A4="300 es",td=2e3;class og{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]+Us[i>>16&255]+Us[i>>24&255]+"-"+Us[255&t]+Us[t>>8&255]+"-"+Us[t>>16&15|64]+Us[t>>24&255]+"-"+Us[63&e|128]+Us[e>>8&255]+"-"+Us[e>>16&255]+Us[e>>24&255]+Us[255&n]+Us[n>>8&255]+Us[n>>16&255]+Us[n>>24&255]).toLowerCase()}function tr(i,t,e){return Math.max(t,Math.min(e,i))}function qk(i,t){return(i%t+t)%t}function wb(i,t,e){return(1-e)*i+e*t}function ho(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 yn(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 aae_radToDeg=function nae(i){return i*ag};class xe{constructor(t=0,e=0){xe.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(tr(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 wn{constructor(t,e,n,r,s,o,a,l,c){wn.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 d=this.elements;return d[0]=t,d[1]=r,d[2]=a,d[3]=e,d[4]=s,d[5]=l,d[6]=n,d[7]=o,d[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],d=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],F=r[2],D=r[5],k=r[8];return s[0]=o*b+a*M+l*F,s[3]=o*v+a*x+l*D,s[6]=o*y+a*C+l*k,s[1]=c*b+d*M+h*F,s[4]=c*v+d*x+h*D,s[7]=c*y+d*C+h*k,s[2]=p*b+m*M+g*F,s[5]=p*v+m*x+g*D,s[8]=p*y+m*C+g*k,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],d=t[8];return e*o*d-e*a*c-n*s*d+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],d=t[8],h=d*o-a*c,p=a*l-d*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-d*n)*b,t[2]=(a*n-r*o)*b,t[3]=p*b,t[4]=(d*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(Xk.makeScale(t,e)),this}rotate(t){return this.premultiply(Xk.makeRotation(-t)),this}translate(t,e){return this.premultiply(Xk.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 Xk=new wn;function T4(i){for(let t=i.length-1;t>=0;--t)if(i[t]>=65535)return!0;return!1}function Mb(i){return document.createElementNS("http://www.w3.org/1999/xhtml",i)}function cae(){const i=Mb("canvas");return i.style.display="block",i}Int8Array,Uint8Array,Uint8ClampedArray,Int16Array,Uint16Array,Int32Array,Uint32Array,Float32Array,Float64Array;const I4={};function cg(i){i in I4||(I4[i]=!0,console.warn(i))}const R4=(new wn).set(.8224621,.177538,0,.0331941,.9668058,0,.0170827,.0723974,.9105199),k4=(new wn).set(1.2249401,-.2249404,0,-.0420569,1.0420571,0,-.0196376,-.0786361,1.0982735),Cb={[ds]:{transfer:NC,primaries:BC,luminanceCoefficients:[.2126,.7152,.0722],toReference:i=>i,fromReference:i=>i},[cs]:{transfer:Fi,primaries:BC,luminanceCoefficients:[.2126,.7152,.0722],toReference:i=>i.convertSRGBToLinear(),fromReference:i=>i.convertLinearToSRGB()},[LC]:{transfer:NC,primaries:UC,luminanceCoefficients:[.2289,.6917,.0793],toReference:i=>i.applyMatrix3(k4),fromReference:i=>i.applyMatrix3(R4)},[Yk]:{transfer:Fi,primaries:UC,luminanceCoefficients:[.2289,.6917,.0793],toReference:i=>i.convertSRGBToLinear().applyMatrix3(k4),fromReference:i=>i.applyMatrix3(R4).convertLinearToSRGB()}},uae=new Set([ds,LC]),ei={enabled:!0,_workingColorSpace:ds,get workingColorSpace(){return this._workingColorSpace},set workingColorSpace(i){if(!uae.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,Cb[e].fromReference)((0,Cb[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 Cb[i].primaries},getTransfer:function(i){return i===wu?NC:Cb[i].transfer},getLuminanceCoefficients:function(i,t=this._workingColorSpace){return i.fromArray(Cb[t].luminanceCoefficients)}};function dg(i){return i<.04045?.0773993808*i:Math.pow(.9478672986*i+.0521327014,2.4)}function Kk(i){return i<.0031308?12.92*i:1.055*Math.pow(i,.41666)-.055}let ug;class hae{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===ug&&(ug=Mb("canvas")),ug.width=t.width,ug.height=t.height;const n=ug.getContext("2d");t instanceof ImageData?n.putImageData(t,0,0):n.drawImage(t,0,0,t.width,t.height),e=ug}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=Mb("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 og{constructor(e=i.DEFAULT_IMAGE,n=i.DEFAULT_MAPPING,r=er,s=er,o=cr,a=xl,l=Po,c=ed,d=i.DEFAULT_ANISOTROPY,h=wu){super(),this.isTexture=!0,Object.defineProperty(this,"id",{value:pae++}),this.uuid=na(),this.name="",this.source=new hg(e),this.mipmaps=[],this.mapping=n,this.channel=0,this.wrapS=r,this.wrapT=s,this.magFilter=o,this.minFilter=a,this.anisotropy=d,this.format=l,this.internalFormat=null,this.type=c,this.offset=new xe(0,0),this.repeat=new xe(1,1),this.center=new xe(0,0),this.rotation=0,this.matrixAutoUpdate=!0,this.matrix=new wn,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 Bs:e.x=e.x-Math.floor(e.x);break;case er:e.x=e.x<0?0:1;break;case _b: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 Bs:e.y=e.y-Math.floor(e.y);break;case er:e.y=e.y<0?0:1;break;case _b: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 vi{constructor(t=0,e=0,n=0,r=1){vi.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],d=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(d-p)<.01&&Math.abs(h-b)<.01&&Math.abs(g-v)<.01){if(Math.abs(d+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,F=(y+1)/2,D=(d+p)/4,k=(h+b)/4,B=(g+v)/4;return x>C&&x>F?x<.01?(n=0,r=.707106781,s=.707106781):(n=Math.sqrt(x),r=D/n,s=k/n):C>F?C<.01?(n=.707106781,r=0,s=.707106781):(r=Math.sqrt(C),n=D/r,s=B/r):F<.01?(n=.707106781,r=.707106781,s=0):(s=Math.sqrt(F),n=k/s,r=B/s),this.set(n,r,s,e),this}let M=Math.sqrt((v-g)*(v-g)+(h-b)*(h-b)+(p-d)*(p-d));return Math.abs(M)<.001&&(M=1),this.x=(v-g)/M,this.y=(h-b)/M,this.z=(p-d)/M,this.w=Math.acos((c+m+y-1)/2),this}setFromMatrixPosition(t){const e=t.elements;return this.x=e[12],this.y=e[13],this.z=e[14],this.w=e[15],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 mae extends og{constructor(t=1,e=1,n={}){super(),this.isRenderTarget=!0,this.width=t,this.height=e,this.depth=1,this.scissor=new vi(0,0,t,e),this.scissorTest=!1,this.viewport=new vi(0,0,t,e);const r={width:t,height:e,depth:1};n=Object.assign({generateMipmaps:!1,internalFormat:null,minFilter:cr,depthBuffer:!0,stencilBuffer:!1,resolveDepthBuffer:!0,resolveStencilBuffer:!0,depthTexture:null,samples:0,count:1},n);const s=new Oo(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 F=Math.sqrt(x),D=Math.atan2(F,y*M);v=Math.sin(v*D)/F,a=Math.sin(a*D)/F}const C=a*M;if(l=l*v+p*C,c=c*v+m*C,d=d*v+g*C,h=h*v+b*C,v===1-a){const F=1/Math.sqrt(l*l+c*c+d*d+h*h);l*=F,c*=F,d*=F,h*=F}}t[e]=l,t[e+1]=c,t[e+2]=d,t[e+3]=h}static multiplyQuaternionsFlat(t,e,n,r,s,o){const a=n[r],l=n[r+1],c=n[r+2],d=n[r+3],h=s[o],p=s[o+1],m=s[o+2],g=s[o+3];return t[e]=a*g+d*h+l*m-c*p,t[e+1]=l*g+d*p+c*h-a*m,t[e+2]=c*g+d*m+a*p-l*h,t[e+3]=d*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),d=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*d*h+c*m*g,this._y=c*m*h-p*d*g,this._z=c*d*g+p*m*h,this._w=c*d*h-p*m*g;break;case"YXZ":this._x=p*d*h+c*m*g,this._y=c*m*h-p*d*g,this._z=c*d*g-p*m*h,this._w=c*d*h+p*m*g;break;case"ZXY":this._x=p*d*h-c*m*g,this._y=c*m*h+p*d*g,this._z=c*d*g+p*m*h,this._w=c*d*h-p*m*g;break;case"ZYX":this._x=p*d*h-c*m*g,this._y=c*m*h+p*d*g,this._z=c*d*g-p*m*h,this._w=c*d*h+p*m*g;break;case"YZX":this._x=p*d*h+c*m*g,this._y=c*m*h+p*d*g,this._z=c*d*g-p*m*h,this._w=c*d*h-p*m*g;break;case"XZY":this._x=p*d*h-c*m*g,this._y=c*m*h-p*d*g,this._z=c*d*g+p*m*h,this._w=c*d*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],d=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=(d-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=(d-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+d)/m}else{const m=2*Math.sqrt(1+h-n-a);this._w=(o-r)/m,this._x=(s+c)/m,this._y=(l+d)/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(tr(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,d=e._w;return this._x=n*d+o*a+r*c-s*l,this._y=r*d+o*l+s*a-n*c,this._z=s*d+o*c+n*l-r*a,this._w=o*d-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),d=Math.atan2(c,a),h=Math.sin((1-e)*d)/c,p=Math.sin(e*d)/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 O{constructor(t=0,e=0,n=0){O.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(O4.setFromEuler(t))}applyAxisAngle(t,e){return this.applyQuaternion(O4.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),d=2*(a*e-s*r),h=2*(s*n-o*e);return this.x=e+l*c+o*h-a*d,this.y=n+l*d+a*c-s*h,this.z=r+l*h+s*d-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 Jk.copy(this).projectOnVector(t),this.sub(Jk)}reflect(t){return this.sub(Jk.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(tr(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 Jk=new O,O4=new fo;class Vs{constructor(t=new O(1/0,1/0,1/0),e=new O(-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;e=this.min.x&&t.x<=this.max.x&&t.y>=this.min.y&&t.y<=this.max.y&&t.z>=this.min.z&&t.z<=this.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.x>=this.min.x&&t.min.x<=this.max.x&&t.max.y>=this.min.y&&t.min.y<=this.max.y&&t.max.z>=this.min.z&&t.min.z<=this.max.z}intersectsSphere(t){return this.clampPoint(t.center,wl),wl.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(Sb),$C.subVectors(this.max,Sb),fg.subVectors(t.a,Sb),pg.subVectors(t.b,Sb),mg.subVectors(t.c,Sb),Cu.subVectors(pg,fg),Su.subVectors(mg,pg),tf.subVectors(fg,mg);let e=[0,-Cu.z,Cu.y,0,-Su.z,Su.y,0,-tf.z,tf.y,Cu.z,0,-Cu.x,Su.z,0,-Su.x,tf.z,0,-tf.x,-Cu.y,Cu.x,0,-Su.y,Su.x,0,-tf.y,tf.x,0];return!(!eP(e,fg,pg,mg,$C)||(e=[1,0,0,0,1,0,0,0,1],!eP(e,fg,pg,mg,$C)))&&(GC.crossVectors(Cu,Su),e=[GC.x,GC.y,GC.z],eP(e,fg,pg,mg,$C))}clampPoint(t,e){return e.copy(t).clamp(this.min,this.max)}distanceToPoint(t){return this.clampPoint(t,wl).distanceTo(t)}getBoundingSphere(t){return this.isEmpty()?t.makeEmpty():(this.getCenter(t.center),t.radius=.5*this.getSize(wl).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()||(nd[0].set(this.min.x,this.min.y,this.min.z).applyMatrix4(t),nd[1].set(this.min.x,this.min.y,this.max.z).applyMatrix4(t),nd[2].set(this.min.x,this.max.y,this.min.z).applyMatrix4(t),nd[3].set(this.min.x,this.max.y,this.max.z).applyMatrix4(t),nd[4].set(this.max.x,this.min.y,this.min.z).applyMatrix4(t),nd[5].set(this.max.x,this.min.y,this.max.z).applyMatrix4(t),nd[6].set(this.max.x,this.max.y,this.min.z).applyMatrix4(t),nd[7].set(this.max.x,this.max.y,this.max.z).applyMatrix4(t),this.setFromPoints(nd)),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 nd=[new O,new O,new O,new O,new O,new O,new O,new O],wl=new O,HC=new Vs,fg=new O,pg=new O,mg=new O,Cu=new O,Su=new O,tf=new O,Sb=new O,$C=new O,GC=new O,nf=new O;function eP(i,t,e,n,r){for(let s=0,o=i.length-3;s<=o;s+=3){nf.fromArray(i,s);const a=r.x*Math.abs(nf.x)+r.y*Math.abs(nf.y)+r.z*Math.abs(nf.z),l=t.dot(nf),c=e.dot(nf),d=n.dot(nf);if(Math.max(-Math.max(l,c,d),Math.min(l,c,d))>a)return!1}return!0}const gae=new Vs,Eb=new O,tP=new O;class zs{constructor(t=new O,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):gae.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;Eb.subVectors(t,this.center);const e=Eb.lengthSq();if(e>this.radius*this.radius){const n=Math.sqrt(e),r=.5*(n-this.radius);this.center.addScaledVector(Eb,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):(tP.subVectors(t.center,this.center).setLength(t.radius),this.expandByPoint(Eb.copy(t.center).add(tP)),this.expandByPoint(Eb.copy(t.center).sub(tP))),this)}equals(t){return t.center.equals(this.center)&&t.radius===this.radius}clone(){return(new this.constructor).copy(this)}}const id=new O,nP=new O,WC=new O,Eu=new O,iP=new O,jC=new O,rP=new O;class Ab{constructor(t=new O,e=new O(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,id)),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=id.subVectors(t,this.origin).dot(this.direction);return e<0?this.origin.distanceToSquared(t):(id.copy(this.origin).addScaledVector(this.direction,e),id.distanceToSquared(t))}distanceSqToSegment(t,e,n,r){nP.copy(t).add(e).multiplyScalar(.5),WC.copy(e).sub(t).normalize(),Eu.copy(this.origin).sub(nP);const s=.5*t.distanceTo(e),o=-this.direction.dot(WC),a=Eu.dot(this.direction),l=-Eu.dot(WC),c=Eu.lengthSq(),d=Math.abs(1-o*o);let h,p,m,g;if(d>0)if(h=o*l-a,p=o*a-l,g=s*d,h>=0)if(p>=-g)if(p<=g){const b=1/d;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(nP).addScaledVector(WC,p),m}intersectSphere(t,e){id.subVectors(t.center,this.origin);const n=id.dot(this.direction),r=id.dot(id)-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,d=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),d>=0?(s=(t.min.y-p.y)*d,o=(t.max.y-p.y)*d):(s=(t.max.y-p.y)*d,o=(t.min.y-p.y)*d),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,id)}intersectTriangle(t,e,n,r,s){iP.subVectors(e,t),jC.subVectors(n,t),rP.crossVectors(iP,jC);let a,o=this.direction.dot(rP);if(o>0){if(r)return null;a=1}else{if(!(o<0))return null;a=-1,o=-o}Eu.subVectors(this.origin,t);const l=a*this.direction.dot(jC.crossVectors(Eu,jC));if(l<0)return null;const c=a*this.direction.dot(iP.cross(Eu));if(c<0||l+c>o)return null;const d=-a*Eu.dot(rP);return d<0?null:this.at(d/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 Bt{constructor(t,e,n,r,s,o,a,l,c,d,h,p,m,g,b,v){Bt.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,d,h,p,m,g,b,v)}set(t,e,n,r,s,o,a,l,c,d,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]=d,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 Bt).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/gg.setFromMatrixColumn(t,0).length(),s=1/gg.setFromMatrixColumn(t,1).length(),o=1/gg.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),d=Math.cos(s),h=Math.sin(s);if("XYZ"===t.order){const p=o*d,m=o*h,g=a*d,b=a*h;e[0]=l*d,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*d,m=l*h,g=c*d,b=c*h;e[0]=p+b*a,e[4]=g*a-m,e[8]=o*c,e[1]=o*h,e[5]=o*d,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*d,m=l*h,g=c*d,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*d,e[9]=b-p*a,e[2]=-o*c,e[6]=a,e[10]=o*l}else if("ZYX"===t.order){const p=o*d,m=o*h,g=a*d,b=a*h;e[0]=l*d,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*d,e[4]=b-p*h,e[8]=g*h+m,e[1]=h,e[5]=o*d,e[9]=-a*d,e[2]=-c*d,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*d,e[4]=-h,e[8]=c*d,e[1]=p*h+b,e[5]=o*d,e[9]=m*h-g,e[2]=g*h-m,e[6]=a*d,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(_ae,t,vae)}lookAt(t,e,n){const r=this.elements;return ia.subVectors(t,e),0===ia.lengthSq()&&(ia.z=1),ia.normalize(),Au.crossVectors(n,ia),0===Au.lengthSq()&&(1===Math.abs(n.z)?ia.x+=1e-4:ia.z+=1e-4,ia.normalize(),Au.crossVectors(n,ia)),Au.normalize(),YC.crossVectors(ia,Au),r[0]=Au.x,r[4]=YC.x,r[8]=ia.x,r[1]=Au.y,r[5]=YC.y,r[9]=ia.y,r[2]=Au.z,r[6]=YC.z,r[10]=ia.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],d=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],F=n[15],D=r[0],k=r[4],B=r[8],T=r[12],A=r[1],W=r[5],ie=r[9],ne=r[13],oe=r[2],ge=r[6],q=r[10],se=r[14],J=r[3],we=r[7],Ve=r[11],Ye=r[15];return s[0]=o*D+a*A+l*oe+c*J,s[4]=o*k+a*W+l*ge+c*we,s[8]=o*B+a*ie+l*q+c*Ve,s[12]=o*T+a*ne+l*se+c*Ye,s[1]=d*D+h*A+p*oe+m*J,s[5]=d*k+h*W+p*ge+m*we,s[9]=d*B+h*ie+p*q+m*Ve,s[13]=d*T+h*ne+p*se+m*Ye,s[2]=g*D+b*A+v*oe+y*J,s[6]=g*k+b*W+v*ge+y*we,s[10]=g*B+b*ie+v*q+y*Ve,s[14]=g*T+b*ne+v*se+y*Ye,s[3]=M*D+x*A+C*oe+F*J,s[7]=M*k+x*W+C*ge+F*we,s[11]=M*B+x*ie+C*q+F*Ve,s[15]=M*T+x*ne+C*se+F*Ye,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],d=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*d-s*l*d)+t[11]*(+e*c*h-e*a*m-s*o*h+n*o*m+s*a*d-n*c*d)+t[15]*(-r*a*d-e*l*h+e*a*p+r*o*h-n*o*p+n*l*d)}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],d=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-d*v*c-g*l*m+o*v*m+d*l*y-o*p*y,C=d*b*c-g*h*c+g*a*m-o*b*m-d*a*y+o*h*y,F=g*h*l-d*b*l-g*a*p+o*b*p+d*a*v-o*h*v,D=e*M+n*x+r*C+s*F;if(0===D)return this.set(0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0);const k=1/D;return t[0]=M*k,t[1]=(b*p*s-h*v*s-b*r*m+n*v*m+h*r*y-n*p*y)*k,t[2]=(a*v*s-b*l*s+b*r*c-n*v*c-a*r*y+n*l*y)*k,t[3]=(h*l*s-a*p*s-h*r*c+n*p*c+a*r*m-n*l*m)*k,t[4]=x*k,t[5]=(d*v*s-g*p*s+g*r*m-e*v*m-d*r*y+e*p*y)*k,t[6]=(g*l*s-o*v*s-g*r*c+e*v*c+o*r*y-e*l*y)*k,t[7]=(o*p*s-d*l*s+d*r*c-e*p*c-o*r*m+e*l*m)*k,t[8]=C*k,t[9]=(g*h*s-d*b*s-g*n*m+e*b*m+d*n*y-e*h*y)*k,t[10]=(o*b*s-g*a*s+g*n*c-e*b*c-o*n*y+e*a*y)*k,t[11]=(d*a*s-o*h*s-d*n*c+e*h*c+o*n*m-e*a*m)*k,t[12]=F*k,t[13]=(d*b*r-g*h*r+g*n*p-e*b*p-d*n*v+e*h*v)*k,t[14]=(g*a*r-o*b*r-g*n*l+e*b*l+o*n*v-e*a*v)*k,t[15]=(o*h*r-d*a*r+d*n*l-e*h*l-o*n*p+e*a*p)*k,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,d=s*a;return this.set(c*o+n,c*a-r*l,c*l+r*a,0,c*a+r*l,d*a+n,d*l-r*o,0,c*l-r*a,d*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,d=o+o,h=a+a,p=s*c,m=s*d,g=s*h,b=o*d,v=o*h,y=a*h,M=l*c,x=l*d,C=l*h,F=n.x,D=n.y,k=n.z;return r[0]=(1-(b+y))*F,r[1]=(m+C)*F,r[2]=(g-x)*F,r[3]=0,r[4]=(m-C)*D,r[5]=(1-(p+y))*D,r[6]=(v+M)*D,r[7]=0,r[8]=(g+x)*k,r[9]=(v-M)*k,r[10]=(1-(p+b))*k,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=gg.set(r[0],r[1],r[2]).length();const o=gg.set(r[4],r[5],r[6]).length(),a=gg.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],Ml.copy(this);const c=1/s,d=1/o,h=1/a;return Ml.elements[0]*=c,Ml.elements[1]*=c,Ml.elements[2]*=c,Ml.elements[4]*=d,Ml.elements[5]*=d,Ml.elements[6]*=d,Ml.elements[8]*=h,Ml.elements[9]*=h,Ml.elements[10]*=h,e.setFromRotationMatrix(Ml),n.x=s,n.y=o,n.z=a,this}makePerspective(t,e,n,r,s,o,a=td){const l=this.elements,c=2*s/(e-t),d=2*s/(n-r),h=(e+t)/(e-t),p=(n+r)/(n-r);let m,g;if(a===td)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]=d,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=td){const l=this.elements,c=1/(e-t),d=1/(n-r),h=1/(o-s),p=(e+t)*c,m=(n+r)*d;let g,b;if(a===td)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*d,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 gg=new O,Ml=new Bt,_ae=new O(0,0,0),vae=new O(1,1,1),Au=new O,YC=new O,ia=new O,F4=new Bt,L4=new fo;let rd=(()=>{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],d=s[5],h=s[9],p=s[2],m=s[6],g=s[10];switch(n){case"XYZ":this._y=Math.asin(tr(l,-1,1)),Math.abs(l)<.9999999?(this._x=Math.atan2(-h,g),this._z=Math.atan2(-a,o)):(this._x=Math.atan2(m,d),this._z=0);break;case"YXZ":this._x=Math.asin(-tr(h,-1,1)),Math.abs(h)<.9999999?(this._y=Math.atan2(l,g),this._z=Math.atan2(c,d)):(this._y=Math.atan2(-p,o),this._z=0);break;case"ZXY":this._x=Math.asin(tr(m,-1,1)),Math.abs(m)<.9999999?(this._y=Math.atan2(-p,g),this._z=Math.atan2(-a,d)):(this._y=0,this._z=Math.atan2(c,o));break;case"ZYX":this._y=Math.asin(-tr(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,d));break;case"YZX":this._z=Math.asin(tr(c,-1,1)),Math.abs(c)<.9999999?(this._x=Math.atan2(-h,d),this._y=Math.atan2(-p,o)):(this._x=0,this._y=Math.atan2(l,g));break;case"XZY":this._z=Math.asin(-tr(a,-1,1)),Math.abs(a)<.9999999?(this._x=Math.atan2(m,d),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 F4.makeRotationFromQuaternion(e),this.setFromRotationMatrix(F4,n,r)}setFromVector3(e,n=this._order){return this.set(e.x,e.y,e.z,n)}reorder(e){return L4.setFromEuler(this),this.setFromQuaternion(L4,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 sP{constructor(){this.mask=1}set(t){this.mask=(1<>>0}enable(t){this.mask|=1<{class i extends og{constructor(){super(),this.isObject3D=!0,Object.defineProperty(this,"id",{value:yae++}),this.uuid=na(),this.name="",this.type="Object3D",this.parent=null,this.children=[],this.up=i.DEFAULT_UP.clone();const e=new O,n=new rd,r=new fo,s=new O(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 Bt},normalMatrix:{value:new wn}}),this.matrix=new Bt,this.matrixWorld=new Bt,this.matrixAutoUpdate=i.DEFAULT_MATRIX_AUTO_UPDATE,this.matrixWorldAutoUpdate=i.DEFAULT_MATRIX_WORLD_AUTO_UPDATE,this.matrixWorldNeedsUpdate=!1,this.layers=new sP,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 _g.setFromAxisAngle(e,n),this.quaternion.multiply(_g),this}rotateOnWorldAxis(e,n){return _g.setFromAxisAngle(e,n),this.quaternion.premultiply(_g),this}rotateX(e){return this.rotateOnAxis(B4,e)}rotateY(e){return this.rotateOnAxis(U4,e)}rotateZ(e){return this.rotateOnAxis(V4,e)}translateOnAxis(e,n){return N4.copy(e).applyQuaternion(this.quaternion),this.position.add(N4.multiplyScalar(n)),this}translateX(e){return this.translateOnAxis(B4,e)}translateY(e){return this.translateOnAxis(U4,e)}translateZ(e){return this.translateOnAxis(V4,e)}localToWorld(e){return this.updateWorldMatrix(!0,!1),e.applyMatrix4(this.matrixWorld)}worldToLocal(e){return this.updateWorldMatrix(!0,!1),e.applyMatrix4(sd.copy(this.matrixWorld).invert())}lookAt(e,n,r){e.isVector3?qC.copy(e):qC.set(e,n,r);const s=this.parent;this.updateWorldMatrix(!0,!1),Db.setFromMatrixPosition(this.matrixWorld),this.isCamera||this.isLight?sd.lookAt(Db,qC,this.up):sd.lookAt(qC,Db,this.up),this.quaternion.setFromRotationMatrix(sd),s&&(sd.extractRotation(s.matrixWorld),_g.setFromRotationMatrix(sd),this.quaternion.premultiply(_g.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.maxInstanceCount=this._maxInstanceCount,s.maxVertexCount=this._maxVertexCount,s.maxIndexCount=this._maxIndexCount,s.geometryInitialized=this._geometryInitialized,s.geometryCount=this._geometryCount,s.matricesTexture=this._matricesTexture.toJSON(e),null!==this._colorsTexture&&(s.colorsTexture=this._colorsTexture.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 d=0,h=c.length;d0){s.children=[];for(let l=0;l0){s.animations=[];for(let l=0;l0&&(r.geometries=l),c.length>0&&(r.materials=c),d.length>0&&(r.textures=d),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 d in l){const h=l[d];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){Cl.subVectors(r,e),od.subVectors(n,e),aP.subVectors(t,e);const o=Cl.dot(Cl),a=Cl.dot(od),l=Cl.dot(aP),c=od.dot(od),d=od.dot(aP),h=o*c-a*a;if(0===h)return s.set(0,0,0),null;const p=1/h,m=(c*l-a*d)*p,g=(o*d-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,ad)&&ad.x>=0&&ad.y>=0&&ad.x+ad.y<=1}static getInterpolation(t,e,n,r,s,o,a,l){return null===this.getBarycoord(t,e,n,r,ad)?(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,ad.x),l.addScaledVector(o,ad.y),l.addScaledVector(a,ad.z),l)}static isFrontFacing(t,e,n,r){return Cl.subVectors(n,e),od.subVectors(t,e),Cl.cross(od).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 Cl.subVectors(this.c,this.b),od.subVectors(this.a,this.b),.5*Cl.cross(od).length()}getMidpoint(t){return t.addVectors(this.a,this.b).add(this.c).multiplyScalar(1/3)}getNormal(t){return La.getNormal(this.a,this.b,this.c,t)}getPlane(t){return t.setFromCoplanarPoints(this.a,this.b,this.c)}getBarycoord(t,e){return La.getBarycoord(t,this.a,this.b,this.c,e)}getInterpolation(t,e,n,r,s){return La.getInterpolation(t,this.a,this.b,this.c,e,n,r,s)}containsPoint(t){return La.containsPoint(t,this.a,this.b,this.c)}isFrontFacing(t){return La.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;yg.subVectors(r,n),bg.subVectors(s,n),lP.subVectors(t,n);const l=yg.dot(lP),c=bg.dot(lP);if(l<=0&&c<=0)return e.copy(n);cP.subVectors(t,r);const d=yg.dot(cP),h=bg.dot(cP);if(d>=0&&h<=d)return e.copy(r);const p=l*h-d*c;if(p<=0&&l>=0&&d<=0)return o=l/(l-d),e.copy(n).addScaledVector(yg,o);dP.subVectors(t,s);const m=yg.dot(dP),g=bg.dot(dP);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(bg,a);const v=d*g-m*h;if(v<=0&&h-d>=0&&m-g>=0)return H4.subVectors(s,r),a=(h-d)/(h-d+(m-g)),e.copy(r).addScaledVector(H4,a);const y=1/(v+b+p);return o=b*y,a=p*y,e.copy(n).addScaledVector(yg,o).addScaledVector(bg,a)}equals(t){return t.a.equals(this.a)&&t.b.equals(this.b)&&t.c.equals(this.c)}}const $4={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},Du={h:0,s:0,l:0},XC={h:0,s:0,l:0};function uP(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 qe{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=cs){return t=Math.floor(t),this.r=(t>>16&255)/255,this.g=(t>>8&255)/255,this.b=(255&t)/255,ei.toWorkingColorSpace(this,e),this}setRGB(t,e,n,r=ei.workingColorSpace){return this.r=t,this.g=e,this.b=n,ei.toWorkingColorSpace(this,r),this}setHSL(t,e,n,r=ei.workingColorSpace){if(t=qk(t,1),e=tr(e,0,1),n=tr(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=uP(o,s,t+1/3),this.g=uP(o,s,t),this.b=uP(o,s,t-1/3)}return ei.toWorkingColorSpace(this,r),this}setStyle(t,e=cs){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=cs){const n=$4[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=dg(t.r),this.g=dg(t.g),this.b=dg(t.b),this}copyLinearToSRGB(t){return this.r=Kk(t.r),this.g=Kk(t.g),this.b=Kk(t.b),this}convertSRGBToLinear(){return this.copySRGBToLinear(this),this}convertLinearToSRGB(){return this.copyLinearToSRGB(this),this}getHex(t=cs){return ei.fromWorkingColorSpace(Hs.copy(this),t),65536*Math.round(tr(255*Hs.r,0,255))+256*Math.round(tr(255*Hs.g,0,255))+Math.round(tr(255*Hs.b,0,255))}getHexString(t=cs){return("000000"+this.getHex(t).toString(16)).slice(-6)}getHSL(t,e=ei.workingColorSpace){ei.fromWorkingColorSpace(Hs.copy(this),e);const n=Hs.r,r=Hs.g,s=Hs.b,o=Math.max(n,r,s),a=Math.min(n,r,s);let l,c;const d=(a+o)/2;if(a===o)l=0,c=0;else{const h=o-a;switch(c=d<=.5?h/(o+a):h/(2-o-a),o){case n:l=(r-s)/h+(r0!=t>0&&this.version++,this._alphaTest=t}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.dispersion&&(n.dispersion=this.dispersion),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!==Zm&&(n.blending=this.blending),this.side!==lc&&(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!==lk&&(n.blendSrc=this.blendSrc),this.blendDst!==ck&&(n.blendDst=this.blendDst),this.blendEquation!==Zh&&(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!==SC&&(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!==sg&&(n.stencilFail=this.stencilFail),this.stencilZFail!==sg&&(n.stencilZFail=this.stencilZFail),this.stencilZPass!==sg&&(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++}onBuild(){console.warn("Material: onBuild() has been removed.")}onBeforeRender(){console.warn("Material: onBeforeRender() has been removed.")}}class qi extends Fo{constructor(t){super(),this.isMeshBasicMaterial=!0,this.type="MeshBasicMaterial",this.color=new qe(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 rd,this.combine=EC,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 yr=new O,KC=new xe;class Hi{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=ta,this.version=0}onUploadCallback(){}set needsUpdate(t){!0===t&&this.version++}get updateRange(){return cg("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],d=[];for(let h=0,p=c.length;h0&&(r[l]=d,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 d=[],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))&&(j4.copy(s).invert(),rf.copy(t.ray).applyMatrix4(j4),(null===n.boundingBox||!1!==rf.intersectsBox(n.boundingBox))&&this._computeIntersections(t,e,rf)))}_computeIntersections(t,e,n){let r;const s=this.geometry,o=this.material,a=s.index,l=s.attributes.position,c=s.attributes.uv,d=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:iS.clone(),object:i}}(i,t,e,n,wg,Mg,Cg,nS);if(d){r&&(JC.fromBufferAttribute(r,a),eS.fromBufferAttribute(r,l),tS.fromBufferAttribute(r,c),d.uv=La.getInterpolation(nS,wg,Mg,Cg,JC,eS,tS,new xe)),s&&(JC.fromBufferAttribute(s,a),eS.fromBufferAttribute(s,l),tS.fromBufferAttribute(s,c),d.uv1=La.getInterpolation(nS,wg,Mg,Cg,JC,eS,tS,new xe)),o&&(q4.fromBufferAttribute(o,a),X4.fromBufferAttribute(o,l),K4.fromBufferAttribute(o,c),d.normal=La.getInterpolation(nS,wg,Mg,Cg,q4,X4,K4,new O),d.normal.dot(n.direction)>0&&d.normal.multiplyScalar(-1));const h={a,b:l,c,normal:new O,materialIndex:0};La.getNormal(wg,Mg,Cg,h.normal),d.face=h}return d}class sf 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=[],d=[],h=[];let p=0,m=0;function g(b,v,y,M,x,C,F,D,k,B,T){const A=C/k,W=F/B,ie=C/2,ne=F/2,oe=D/2,ge=k+1,q=B+1;let se=0,J=0;const we=new O;for(let Ve=0;Ve0?1:-1,d.push(we.x,we.y,we.z),h.push(Rt/k),h.push(1-Ve/B),se+=1}for(let Ve=0;Ve0&&(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 pP extends Fr{constructor(){super(),this.isCamera=!0,this.type="Camera",this.matrixWorldInverse=new Bt,this.projectionMatrix=new Bt,this.projectionMatrixInverse=new Bt,this.coordinateSystem=td}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 Tu=new O,J4=new xe,e5=new xe;class br extends pP{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*ag*Math.atan(e),this.updateProjectionMatrix()}getFocalLength(){const t=Math.tan(.5*ef*this.fov);return.5*this.getFilmHeight()/t}getEffectiveFOV(){return 2*ag*Math.atan(Math.tan(.5*ef*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){Tu.set(-1,-1,.5).applyMatrix4(this.projectionMatrixInverse),e.set(Tu.x,Tu.y).multiplyScalar(-t/Tu.z),Tu.set(1,1,.5).applyMatrix4(this.projectionMatrixInverse),n.set(Tu.x,Tu.y).multiplyScalar(-t/Tu.z)}getViewSize(t,e){return this.getViewBounds(t,J4,e5),e.subVectors(e5,J4)}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*ef*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 Iae extends Fr{constructor(t,e,n){super(),this.type="CubeCamera",this.renderTarget=n,this.coordinateSystem=null,this.activeMipmapLevel=0;const r=new br(-90,1,t,e);r.layers=this.layers,this.add(r);const s=new br(-90,1,t,e);s.layers=this.layers,this.add(s);const o=new br(-90,1,t,e);o.layers=this.layers,this.add(o);const a=new br(-90,1,t,e);a.layers=this.layers,this.add(a);const l=new br(-90,1,t,e);l.layers=this.layers,this.add(l);const c=new br(-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===td)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,d]=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,d),t.setRenderTarget(h,p,m),t.xr.enabled=g,n.texture.needsPMREMUpdate=!0}}class sS extends Oo{constructor(t,e,n,r,s,o,a,l,c,d){super(t=void 0!==t?t:[],e=void 0!==e?e:cc,n,r,s,o,a,l,c,d),this.isCubeTexture=!0,this.flipY=!1}get images(){return this.image}set images(t){this.image=t}}class Rae extends Mu{constructor(t=1,e={}){super(t,t,e),this.isWebGLCubeRenderTarget=!0;const n={width:t,height:t,depth:1};this.texture=new sS([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:cr}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 sf(5,5,5),s=new Sl({name:"CubemapFromEquirect",uniforms:Sg(n_uniforms),vertexShader:n_vertexShader,fragmentShader:n_fragmentShader,side:ko,blending:Jc});s.uniforms.tEquirect.value=e;const o=new Mn(r,s),a=e.minFilter;return e.minFilter===xl&&(e.minFilter=cr),new Iae(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 mP=new O,kae=new O,Pae=new wn;class af{constructor(t=new O(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=mP.subVectors(n,e).cross(kae.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(mP),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||Pae.getNormalMatrix(t),r=this.coplanarPoint(mP).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 lf=new zs,oS=new O;class aS{constructor(t=new af,e=new af,n=new af,r=new af,s=new af,o=new af){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=td){const n=this.planes,r=t.elements,s=r[0],o=r[1],a=r[2],l=r[3],c=r[4],d=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+d,v+g,C+M).normalize(),n[3].setComponents(l-o,p-d,v-g,C-M).normalize(),n[4].setComponents(l-a,p-h,v-b,C-x).normalize(),e===td)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(),lf.copy(t.boundingSphere).applyMatrix4(t.matrixWorld);else{const e=t.geometry;null===e.boundingSphere&&e.computeBoundingSphere(),lf.copy(e.boundingSphere).applyMatrix4(t.matrixWorld)}return this.intersectsSphere(lf)}intersectsSprite(t){return lf.center.set(0,0,0),lf.radius=.7071067811865476,lf.applyMatrix4(t.matrixWorld),this.intersectsSphere(lf)}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,oS.y=r.normal.y>0?t.max.y:t.min.y,oS.z=r.normal.z>0?t.max.z:t.min.z,r.distanceToPoint(oS)<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 t5(){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 Oae(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.isInterleavedBufferAttribute&&(a=a.data),a.isGLBufferAttribute){const d=t.get(a);return void((!d||d.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 ) || defined( USE_BATCHING_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 ) || defined( USE_BATCHING_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\n#ifdef USE_BATCHING_COLOR\n\tvec3 batchingColor = getBatchingColor( getIndirectIndex( gl_DrawID ) );\n\tvColor.xyz *= batchingColor.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}\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}",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_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\tfloat distanceFalloff = 1.0 / max( pow( lightDistance, decayExponent ), 0.01 );\n\tif ( cutoffDistance > 0.0 ) {\n\t\tdistanceFalloff *= pow2( saturate( 1.0 - pow4( lightDistance / cutoffDistance ) ) );\n\t}\n\treturn distanceFalloff;\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_DISPERSION\n\tmaterial.dispersion = dispersion;\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\tfloat dispersion;\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.shadowIntensity, 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.shadowIntensity, 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.shadowIntensity, 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 )\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\tfor ( int i = 0; i < MORPHTARGETS_COUNT; i ++ ) {\n\t\tif ( morphTargetInfluences[ i ] != 0.0 ) objectNormal += getMorph( gl_VertexID, i, 1 ).xyz * morphTargetInfluences[ i ];\n\t}\n#endif",morphtarget_pars_vertex:"#ifdef USE_MORPHTARGETS\n\t#ifndef USE_INSTANCING_MORPH\n\t\tuniform float morphTargetBaseInfluence;\n\t\tuniform float morphTargetInfluences[ MORPHTARGETS_COUNT ];\n\t#endif\n\tuniform sampler2DArray morphTargetsTexture;\n\tuniform ivec2 morphTargetsTextureSize;\n\tvec4 getMorph( const in int vertexIndex, const in int morphTargetIndex, const in int offset ) {\n\t\tint texelIndex = vertexIndex * MORPHTARGETS_TEXTURE_STRIDE + offset;\n\t\tint y = texelIndex / morphTargetsTextureSize.x;\n\t\tint x = texelIndex - y * morphTargetsTextureSize.x;\n\t\tivec3 morphUV = ivec3( x, y, morphTargetIndex );\n\t\treturn texelFetch( morphTargetsTexture, morphUV, 0 );\n\t}\n#endif",morphtarget_vertex:"#ifdef USE_MORPHTARGETS\n\ttransformed *= morphTargetBaseInfluence;\n\tfor ( int i = 0; i < MORPHTARGETS_COUNT; i ++ ) {\n\t\tif ( morphTargetInfluences[ i ] != 0.0 ) transformed += getMorph( gl_VertexID, i, 0 ).xyz * morphTargetInfluences[ i ];\n\t}\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.;const float ShiftRight8 = 1. / 256.;\nconst float Inv255 = 1. / 255.;\nconst vec4 PackFactors = vec4( 1.0, 256.0, 256.0 * 256.0, 256.0 * 256.0 * 256.0 );\nconst vec2 UnpackFactors2 = vec2( UnpackDownscale, 1.0 / PackFactors.g );\nconst vec3 UnpackFactors3 = vec3( UnpackDownscale / PackFactors.rg, 1.0 / PackFactors.b );\nconst vec4 UnpackFactors4 = vec4( UnpackDownscale / PackFactors.rgb, 1.0 / PackFactors.a );\nvec4 packDepthToRGBA( const in float v ) {\n\tif( v <= 0.0 )\n\t\treturn vec4( 0., 0., 0., 0. );\n\tif( v >= 1.0 )\n\t\treturn vec4( 1., 1., 1., 1. );\n\tfloat vuf;\n\tfloat af = modf( v * PackFactors.a, vuf );\n\tfloat bf = modf( vuf * ShiftRight8, vuf );\n\tfloat gf = modf( vuf * ShiftRight8, vuf );\n\treturn vec4( vuf * Inv255, gf * PackUpscale, bf * PackUpscale, af );\n}\nvec3 packDepthToRGB( const in float v ) {\n\tif( v <= 0.0 )\n\t\treturn vec3( 0., 0., 0. );\n\tif( v >= 1.0 )\n\t\treturn vec3( 1., 1., 1. );\n\tfloat vuf;\n\tfloat bf = modf( v * PackFactors.b, vuf );\n\tfloat gf = modf( vuf * ShiftRight8, vuf );\n\treturn vec3( vuf * Inv255, gf * PackUpscale, bf );\n}\nvec2 packDepthToRG( const in float v ) {\n\tif( v <= 0.0 )\n\t\treturn vec2( 0., 0. );\n\tif( v >= 1.0 )\n\t\treturn vec2( 1., 1. );\n\tfloat vuf;\n\tfloat gf = modf( v * 256., vuf );\n\treturn vec2( vuf * Inv255, gf );\n}\nfloat unpackRGBAToDepth( const in vec4 v ) {\n\treturn dot( v, UnpackFactors4 );\n}\nfloat unpackRGBToDepth( const in vec3 v ) {\n\treturn dot( v, UnpackFactors3 );\n}\nfloat unpackRGToDepth( const in vec2 v ) {\n\treturn v.r * UnpackFactors2.r + v.g * UnpackFactors2.g;\n}\nvec4 pack2HalfToRGBA( const in 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( const in 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 shadowIntensity;\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 shadowIntensity;\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 shadowIntensity;\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 shadowIntensity, 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 mix( 1.0, shadow, shadowIntensity );\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 shadowIntensity, 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 mix( 1.0, shadow, shadowIntensity );\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 shadowIntensity;\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 shadowIntensity;\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 shadowIntensity;\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.shadowIntensity, 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.shadowIntensity, 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.shadowIntensity, 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\tconst float StartCompression = 0.8 - 0.04;\n\tconst float 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, vec3( newPeak ), 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.dispersion, 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 dispersion, const in float ior, const in float thickness,\n\t\tconst in vec3 attenuationColor, const in float attenuationDistance ) {\n\t\tvec4 transmittedLight;\n\t\tvec3 transmittance;\n\t\t#ifdef USE_DISPERSION\n\t\t\tfloat halfSpread = ( ior - 1.0 ) * 0.025 * dispersion;\n\t\t\tvec3 iors = vec3( ior - halfSpread, ior, ior + halfSpread );\n\t\t\tfor ( int i = 0; i < 3; i ++ ) {\n\t\t\t\tvec3 transmissionRay = getVolumeTransmissionRay( n, v, thickness, iors[ i ], modelMatrix );\n\t\t\t\tvec3 refractedRayExit = position + transmissionRay;\n\t\t\n\t\t\t\tvec4 ndcPos = projMatrix * viewMatrix * vec4( refractedRayExit, 1.0 );\n\t\t\t\tvec2 refractionCoords = ndcPos.xy / ndcPos.w;\n\t\t\t\trefractionCoords += 1.0;\n\t\t\t\trefractionCoords /= 2.0;\n\t\t\n\t\t\t\tvec4 transmissionSample = getTransmissionSample( refractionCoords, roughness, iors[ i ] );\n\t\t\t\ttransmittedLight[ i ] = transmissionSample[ i ];\n\t\t\t\ttransmittedLight.a += transmissionSample.a;\n\t\t\t\ttransmittance[ i ] = diffuseColor[ i ] * volumeAttenuation( length( transmissionRay ), attenuationColor, attenuationDistance )[ i ];\n\t\t\t}\n\t\t\ttransmittedLight.a /= 3.0;\n\t\t\n\t\t#else\n\t\t\n\t\t\tvec3 transmissionRay = getVolumeTransmissionRay( n, v, thickness, ior, modelMatrix );\n\t\t\tvec3 refractedRayExit = position + transmissionRay;\n\t\t\tvec4 ndcPos = projMatrix * viewMatrix * vec4( refractedRayExit, 1.0 );\n\t\t\tvec2 refractionCoords = ndcPos.xy / ndcPos.w;\n\t\t\trefractionCoords += 1.0;\n\t\t\trefractionCoords /= 2.0;\n\t\t\ttransmittedLight = getTransmissionSample( refractionCoords, roughness, ior );\n\t\t\ttransmittance = diffuseColor * volumeAttenuation( length( transmissionRay ), attenuationColor, attenuationDistance );\n\t\t\n\t\t#endif\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#elif DEPTH_PACKING == 3202\n\t\tgl_FragColor = vec4( packDepthToRGB( fragCoordZ ), 1.0 );\n\t#elif DEPTH_PACKING == 3203\n\t\tgl_FragColor = vec4( packDepthToRG( fragCoordZ ), 0.0, 1.0 );\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_DISPERSION\n\tuniform float dispersion;\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}"},Je={common:{diffuse:{value:new qe(16777215)},opacity:{value:1},map:{value:null},mapTransform:{value:new wn},alphaMap:{value:null},alphaMapTransform:{value:new wn},alphaTest:{value:0}},specularmap:{specularMap:{value:null},specularMapTransform:{value:new wn}},envmap:{envMap:{value:null},envMapRotation:{value:new wn},flipEnvMap:{value:-1},reflectivity:{value:1},ior:{value:1.5},refractionRatio:{value:.98}},aomap:{aoMap:{value:null},aoMapIntensity:{value:1},aoMapTransform:{value:new wn}},lightmap:{lightMap:{value:null},lightMapIntensity:{value:1},lightMapTransform:{value:new wn}},bumpmap:{bumpMap:{value:null},bumpMapTransform:{value:new wn},bumpScale:{value:1}},normalmap:{normalMap:{value:null},normalMapTransform:{value:new wn},normalScale:{value:new xe(1,1)}},displacementmap:{displacementMap:{value:null},displacementMapTransform:{value:new wn},displacementScale:{value:1},displacementBias:{value:0}},emissivemap:{emissiveMap:{value:null},emissiveMapTransform:{value:new wn}},metalnessmap:{metalnessMap:{value:null},metalnessMapTransform:{value:new wn}},roughnessmap:{roughnessMap:{value:null},roughnessMapTransform:{value:new wn}},gradientmap:{gradientMap:{value:null}},fog:{fogDensity:{value:25e-5},fogNear:{value:1},fogFar:{value:2e3},fogColor:{value:new qe(16777215)}},lights:{ambientLightColor:{value:[]},lightProbe:{value:[]},directionalLights:{value:[],properties:{direction:{},color:{}}},directionalLightShadows:{value:[],properties:{shadowIntensity:1,shadowBias:{},shadowNormalBias:{},shadowRadius:{},shadowMapSize:{}}},directionalShadowMap:{value:[]},directionalShadowMatrix:{value:[]},spotLights:{value:[],properties:{color:{},position:{},direction:{},distance:{},coneCos:{},penumbraCos:{},decay:{}}},spotLightShadows:{value:[],properties:{shadowIntensity:1,shadowBias:{},shadowNormalBias:{},shadowRadius:{},shadowMapSize:{}}},spotLightMap:{value:[]},spotShadowMap:{value:[]},spotLightMatrix:{value:[]},pointLights:{value:[],properties:{color:{},position:{},decay:{},distance:{}}},pointLightShadows:{value:[],properties:{shadowIntensity:1,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 qe(16777215)},opacity:{value:1},size:{value:1},scale:{value:1},map:{value:null},alphaMap:{value:null},alphaMapTransform:{value:new wn},alphaTest:{value:0},uvTransform:{value:new wn}},sprite:{diffuse:{value:new qe(16777215)},opacity:{value:1},center:{value:new xe(.5,.5)},rotation:{value:0},map:{value:null},mapTransform:{value:new wn},alphaMap:{value:null},alphaMapTransform:{value:new wn},alphaTest:{value:0}}},dc={basic:{uniforms:po([Je.common,Je.specularmap,Je.envmap,Je.aomap,Je.lightmap,Je.fog]),vertexShader:Cn.meshbasic_vert,fragmentShader:Cn.meshbasic_frag},lambert:{uniforms:po([Je.common,Je.specularmap,Je.envmap,Je.aomap,Je.lightmap,Je.emissivemap,Je.bumpmap,Je.normalmap,Je.displacementmap,Je.fog,Je.lights,{emissive:{value:new qe(0)}}]),vertexShader:Cn.meshlambert_vert,fragmentShader:Cn.meshlambert_frag},phong:{uniforms:po([Je.common,Je.specularmap,Je.envmap,Je.aomap,Je.lightmap,Je.emissivemap,Je.bumpmap,Je.normalmap,Je.displacementmap,Je.fog,Je.lights,{emissive:{value:new qe(0)},specular:{value:new qe(1118481)},shininess:{value:30}}]),vertexShader:Cn.meshphong_vert,fragmentShader:Cn.meshphong_frag},standard:{uniforms:po([Je.common,Je.envmap,Je.aomap,Je.lightmap,Je.emissivemap,Je.bumpmap,Je.normalmap,Je.displacementmap,Je.roughnessmap,Je.metalnessmap,Je.fog,Je.lights,{emissive:{value:new qe(0)},roughness:{value:1},metalness:{value:0},envMapIntensity:{value:1}}]),vertexShader:Cn.meshphysical_vert,fragmentShader:Cn.meshphysical_frag},toon:{uniforms:po([Je.common,Je.aomap,Je.lightmap,Je.emissivemap,Je.bumpmap,Je.normalmap,Je.displacementmap,Je.gradientmap,Je.fog,Je.lights,{emissive:{value:new qe(0)}}]),vertexShader:Cn.meshtoon_vert,fragmentShader:Cn.meshtoon_frag},matcap:{uniforms:po([Je.common,Je.bumpmap,Je.normalmap,Je.displacementmap,Je.fog,{matcap:{value:null}}]),vertexShader:Cn.meshmatcap_vert,fragmentShader:Cn.meshmatcap_frag},points:{uniforms:po([Je.points,Je.fog]),vertexShader:Cn.points_vert,fragmentShader:Cn.points_frag},dashed:{uniforms:po([Je.common,Je.fog,{scale:{value:1},dashSize:{value:1},totalSize:{value:2}}]),vertexShader:Cn.linedashed_vert,fragmentShader:Cn.linedashed_frag},depth:{uniforms:po([Je.common,Je.displacementmap]),vertexShader:Cn.depth_vert,fragmentShader:Cn.depth_frag},normal:{uniforms:po([Je.common,Je.bumpmap,Je.normalmap,Je.displacementmap,{opacity:{value:1}}]),vertexShader:Cn.meshnormal_vert,fragmentShader:Cn.meshnormal_frag},sprite:{uniforms:po([Je.sprite,Je.fog]),vertexShader:Cn.sprite_vert,fragmentShader:Cn.sprite_frag},background:{uniforms:{uvTransform:{value:new wn},t2D:{value:null},backgroundIntensity:{value:1}},vertexShader:Cn.background_vert,fragmentShader:Cn.background_frag},backgroundCube:{uniforms:{envMap:{value:null},flipEnvMap:{value:-1},backgroundBlurriness:{value:0},backgroundIntensity:{value:1},backgroundRotation:{value:new wn}},vertexShader:Cn.backgroundCube_vert,fragmentShader:Cn.backgroundCube_frag},cube:{uniforms:{tCube:{value:null},tFlip:{value:-1},opacity:{value:1}},vertexShader:Cn.cube_vert,fragmentShader:Cn.cube_frag},equirect:{uniforms:{tEquirect:{value:null}},vertexShader:Cn.equirect_vert,fragmentShader:Cn.equirect_frag},distanceRGBA:{uniforms:po([Je.common,Je.displacementmap,{referencePosition:{value:new O},nearDistance:{value:1},farDistance:{value:1e3}}]),vertexShader:Cn.distanceRGBA_vert,fragmentShader:Cn.distanceRGBA_frag},shadow:{uniforms:po([Je.lights,Je.fog,{color:{value:new qe(0)},opacity:{value:1}}]),vertexShader:Cn.shadow_vert,fragmentShader:Cn.shadow_frag}};dc.physical={uniforms:po([dc.standard.uniforms,{clearcoat:{value:0},clearcoatMap:{value:null},clearcoatMapTransform:{value:new wn},clearcoatNormalMap:{value:null},clearcoatNormalMapTransform:{value:new wn},clearcoatNormalScale:{value:new xe(1,1)},clearcoatRoughness:{value:0},clearcoatRoughnessMap:{value:null},clearcoatRoughnessMapTransform:{value:new wn},dispersion:{value:0},iridescence:{value:0},iridescenceMap:{value:null},iridescenceMapTransform:{value:new wn},iridescenceIOR:{value:1.3},iridescenceThicknessMinimum:{value:100},iridescenceThicknessMaximum:{value:400},iridescenceThicknessMap:{value:null},iridescenceThicknessMapTransform:{value:new wn},sheen:{value:0},sheenColor:{value:new qe(0)},sheenColorMap:{value:null},sheenColorMapTransform:{value:new wn},sheenRoughness:{value:1},sheenRoughnessMap:{value:null},sheenRoughnessMapTransform:{value:new wn},transmission:{value:0},transmissionMap:{value:null},transmissionMapTransform:{value:new wn},transmissionSamplerSize:{value:new xe},transmissionSamplerMap:{value:null},thickness:{value:0},thicknessMap:{value:null},thicknessMapTransform:{value:new wn},attenuationDistance:{value:0},attenuationColor:{value:new qe(0)},specularColor:{value:new qe(1,1,1)},specularColorMap:{value:null},specularColorMapTransform:{value:new wn},specularIntensity:{value:1},specularIntensityMap:{value:null},specularIntensityMapTransform:{value:new wn},anisotropyVector:{value:new xe},anisotropyMap:{value:null},anisotropyMapTransform:{value:new wn}}]),vertexShader:Cn.meshphysical_vert,fragmentShader:Cn.meshphysical_frag};const lS={r:0,b:0,g:0},cf=new rd,Oce=new Bt;function Fce(i,t,e,n,r,s,o){const a=new qe(0);let c,d,l=!0===s?0:1,h=null,p=0,m=null;function g(M){let x=!0===M.isScene?M.background:null;return x&&x.isTexture&&(x=(M.backgroundBlurriness>0?e:t).get(x)),x}function y(M,x){M.getRGB(lS,Z4(i)),n.buffers.color.setClear(lS.r,lS.g,lS.b,x,o)}return{getClearColor:function(){return a},setClearColor:function(M,x=1){a.set(M),l=x,y(a,l)},getClearAlpha:function(){return l},setClearAlpha:function(M){l=M,y(a,l)},render:function b(M){let x=!1;const C=g(M);null===C?y(a,l):C&&C.isColor&&(y(C,1),x=!0);const F=i.xr.getEnvironmentBlendMode();"additive"===F?n.buffers.color.setClear(0,0,0,1,o):"alpha-blend"===F&&n.buffers.color.setClear(0,0,0,0,o),(i.autoClear||x)&&(n.buffers.depth.setTest(!0),n.buffers.depth.setMask(!0),n.buffers.color.setMask(!0),i.clear(i.autoClearColor,i.autoClearDepth,i.autoClearStencil))},addToRenderList:function v(M,x){const C=g(x);C&&(C.isCubeTexture||C.mapping===gb)?(void 0===d&&(d=new Mn(new sf(1,1,1),new Sl({name:"BackgroundCubeMaterial",uniforms:Sg(dc.backgroundCube.uniforms),vertexShader:dc.backgroundCube.vertexShader,fragmentShader:dc.backgroundCube.fragmentShader,side:ko,depthTest:!1,depthWrite:!1,fog:!1})),d.geometry.deleteAttribute("normal"),d.geometry.deleteAttribute("uv"),d.onBeforeRender=function(F,D,k){this.matrixWorld.copyPosition(k.matrixWorld)},Object.defineProperty(d.material,"envMap",{get:function(){return this.uniforms.envMap.value}}),r.update(d)),cf.copy(x.backgroundRotation),cf.x*=-1,cf.y*=-1,cf.z*=-1,C.isCubeTexture&&!1===C.isRenderTargetTexture&&(cf.y*=-1,cf.z*=-1),d.material.uniforms.envMap.value=C,d.material.uniforms.flipEnvMap.value=C.isCubeTexture&&!1===C.isRenderTargetTexture?-1:1,d.material.uniforms.backgroundBlurriness.value=x.backgroundBlurriness,d.material.uniforms.backgroundIntensity.value=x.backgroundIntensity,d.material.uniforms.backgroundRotation.value.setFromMatrix4(Oce.makeRotationFromEuler(cf)),d.material.toneMapped=ei.getTransfer(C.colorSpace)!==Fi,(h!==C||p!==C.version||m!==i.toneMapping)&&(d.material.needsUpdate=!0,h=C,p=C.version,m=i.toneMapping),d.layers.enableAll(),M.unshift(d,d.geometry,d.material,0,0,null)):C&&C.isTexture&&(void 0===c&&(c=new Mn(new Iu(2,2),new Sl({name:"BackgroundMaterial",uniforms:Sg(dc.background.uniforms),vertexShader:dc.background.vertexShader,fragmentShader:dc.background.fragmentShader,side:lc,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=C,c.material.uniforms.backgroundIntensity.value=x.backgroundIntensity,c.material.toneMapped=ei.getTransfer(C.colorSpace)!==Fi,!0===C.matrixAutoUpdate&&C.updateMatrix(),c.material.uniforms.uvTransform.value.copy(C.matrix),(h!==C||p!==C.version||m!==i.toneMapping)&&(c.material.needsUpdate=!0,h=C,p=C.version,m=i.toneMapping),c.layers.enableAll(),M.unshift(c,c.geometry,c.material,0,0,null))}}}function Lce(i,t){const e=i.getParameter(i.MAX_VERTEX_ATTRIBS),n={},r=p(null);let s=r,o=!1;function c(A){return i.bindVertexArray(A)}function d(A){return i.deleteVertexArray(A)}function p(A){const W=[],ie=[],ne=[];for(let oe=0;oe=0){const Ve=oe[J];let Ye=ge[J];if(void 0===Ye&&("instanceMatrix"===J&&A.instanceMatrix&&(Ye=A.instanceMatrix),"instanceColor"===J&&A.instanceColor&&(Ye=A.instanceColor)),void 0===Ve||Ve.attribute!==Ye||Ye&&Ve.data!==Ye.data)return!0;q++}return s.attributesNum!==q||s.index!==ne}(A,ne,ie,oe),ge&&function g(A,W,ie,ne){const oe={},ge=W.attributes;let q=0;const se=ie.getAttributes();for(const J in se)if(se[J].location>=0){let Ve=ge[J];void 0===Ve&&("instanceMatrix"===J&&A.instanceMatrix&&(Ve=A.instanceMatrix),"instanceColor"===J&&A.instanceColor&&(Ve=A.instanceColor));const Ye={};Ye.attribute=Ve,Ve&&Ve.data&&(Ye.data=Ve.data),oe[J]=Ye,q++}s.attributes=oe,s.attributesNum=q,s.index=ne}(A,ne,ie,oe),null!==oe&&t.update(oe,i.ELEMENT_ARRAY_BUFFER),(ge||o)&&(o=!1,function C(A,W,ie,ne){b();const oe=ne.attributes,ge=ie.getAttributes(),q=W.defaultAttributeValues;for(const se in ge){const J=ge[se];if(J.location>=0){let we=oe[se];if(void 0===we&&("instanceMatrix"===se&&A.instanceMatrix&&(we=A.instanceMatrix),"instanceColor"===se&&A.instanceColor&&(we=A.instanceColor)),void 0!==we){const Ve=we.normalized,Ye=we.itemSize,Rt=t.get(we);if(void 0===Rt)continue;const nn=Rt.buffer,le=Rt.type,Fe=Rt.bytesPerElement,Ze=le===i.INT||le===i.UNSIGNED_INT||we.gpuType===hk;if(we.isInterleavedBufferAttribute){const Le=we.data,wt=Le.stride,Tt=we.offset;if(Le.isInstancedInterleavedBuffer){for(let St=0;St0&&i.getShaderPrecisionFormat(i.FRAGMENT_SHADER,i.HIGH_FLOAT).precision>0)return"highp";D="mediump"}return"mediump"===D&&i.getShaderPrecisionFormat(i.VERTEX_SHADER,i.MEDIUM_FLOAT).precision>0&&i.getShaderPrecisionFormat(i.FRAGMENT_SHADER,i.MEDIUM_FLOAT).precision>0?"mediump":"lowp"}let c=void 0!==e.precision?e.precision:"highp";const d=l(c);d!==c&&(console.warn("THREE.WebGLRenderer:",c,"not supported, using",d,"instead."),c=d);const h=!0===e.logarithmicDepthBuffer,p=i.getParameter(i.MAX_TEXTURE_IMAGE_UNITS),m=i.getParameter(i.MAX_VERTEX_TEXTURE_IMAGE_UNITS);return{isWebGL2:!0,getMaxAnisotropy:function s(){if(void 0!==r)return r;if(!0===t.has("EXT_texture_filter_anisotropic")){const D=t.get("EXT_texture_filter_anisotropic");r=i.getParameter(D.MAX_TEXTURE_MAX_ANISOTROPY_EXT)}else r=0;return r},getMaxPrecision:l,textureFormatReadable:function o(D){return!(D!==Po&&n.convert(D)!==i.getParameter(i.IMPLEMENTATION_COLOR_READ_FORMAT))},textureTypeReadable:function a(D){const k=D===Jm&&(t.has("EXT_color_buffer_half_float")||t.has("EXT_color_buffer_float"));return!(D!==ed&&n.convert(D)!==i.getParameter(i.IMPLEMENTATION_COLOR_READ_TYPE)&&D!==ta&&!k)},precision:c,logarithmicDepthBuffer:h,maxTextures:p,maxVertexTextures:m,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:m>0,maxSamples:i.getParameter(i.MAX_SAMPLES)}}function Uce(i){const t=this;let e=null,n=0,r=!1,s=!1;const o=new af,a=new wn,l={value:null,needsUpdate:!1};function d(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=d(g,p,x,m);for(let F=0;F!==x;++F)C[F]=e[F];y.clippingState=C,this.numIntersection=b?this.numPlanes:0,this.numPlanes+=M}}}function Vce(i){let t=new WeakMap;function e(o,a){return a===AC?o.mapping=cc:a===DC&&(o.mapping=Qh),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===AC||a===DC){if(t.has(o))return e(t.get(o).texture,o.mapping);{const l=o.image;if(l&&l.height>0){const c=new Rae(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 Rb extends pP{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,d=(this.top-this.bottom)/this.view.fullHeight/this.zoom;s+=c*this.view.offsetX,o=s+c*this.view.width,a-=d*this.view.offsetY,l=a-d*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 n5=[.125,.215,.35,.446,.526,.582],gP=new Rb,r5=new qe;let _P=null,vP=0,yP=0,bP=!1;const uf=(1+Math.sqrt(5))/2,Tg=1/uf,s5=[new O(-uf,Tg,0),new O(uf,Tg,0),new O(-Tg,0,uf),new O(Tg,0,uf),new O(0,uf,-Tg),new O(0,uf,Tg),new O(-1,1,-1),new O(1,1,-1),new O(-1,1,1),new O(1,1,1)];class o5{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){_P=this._renderer.getRenderTarget(),vP=this._renderer.getActiveCubeFace(),yP=this._renderer.getActiveMipmapLevel(),bP=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=c5(),this._compileMaterial(this._cubemapMaterial))}compileEquirectangularShader(){null===this._equirectMaterial&&(this._equirectMaterial=l5(),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=n5[o-i+4-1]:0===o&&(l=0),n.push(l);const c=1/(a-2),d=-c,h=1+c,p=[d,d,h,d,h,h,d,d,h,h,d,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 D=0;D2?0:-1;M.set([k,B,0,k+2/3,B,0,k+2/3,B+1,0,k,B,0,k+2/3,B+1,0,k,B+1,0],b*g*D),x.set(p,v*g*D),C.set([D,D,D,D,D,D],y*g*D)}const F=new hn;F.setAttribute("position",new Hi(M,b)),F.setAttribute("uv",new Hi(x,v)),F.setAttribute("faceIndex",new Hi(C,y)),t.push(F),r>4&&r--}return{lodPlanes:t,sizeLods:e,sigmas:n}}(s)),this._blurMaterial=function Hce(i,t,e){const n=new Float32Array(20),r=new O(0,1,0);return new Sl({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:Jc,depthTest:!1,depthWrite:!1})}(s,t,e)}return r}_compileMaterial(t){const e=new Mn(this._lodPlanes[0],t);this._renderer.compile(e,gP)}_sceneToCubeUV(t,e,n,r){const a=new br(90,1,e,n),l=[1,-1,1,1,1,1],c=[1,1,1,-1,-1,-1],d=this._renderer,h=d.autoClear,p=d.toneMapping;d.getClearColor(r5),d.toneMapping=bu,d.autoClear=!1;const m=new qi({name:"PMREM.Background",side:ko,depthWrite:!1,depthTest:!1}),g=new Mn(new sf,m);let b=!1;const v=t.background;v?v.isColor&&(m.color.copy(v),t.background=null,b=!0):(m.color.copy(r5),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;cS(r,M*x,y>2?x:0,x,x),d.setRenderTarget(r),b&&d.render(g,a),d.render(t,a)}g.geometry.dispose(),g.material.dispose(),d.toneMapping=p,d.autoClear=h,t.background=v}_textureToCubeUV(t,e){const n=this._renderer,r=t.mapping===cc||t.mapping===Qh;r?(null===this._cubemapMaterial&&(this._cubemapMaterial=c5()),this._cubemapMaterial.uniforms.flipEnvMap.value=!1===t.isRenderTargetTexture?-1:1):null===this._equirectMaterial&&(this._equirectMaterial=l5());const s=r?this._cubemapMaterial:this._equirectMaterial,o=new Mn(this._lodPlanes[0],s);s.uniforms.envMap.value=t;const l=this._cubeSize;cS(e,0,0,3*l,2*l),n.setRenderTarget(e),n.render(o,gP)}_applyPMREM(t){const e=this._renderer,n=e.autoClear;e.autoClear=!1;const r=this._lodPlanes.length;for(let s=1;s20&&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 k=0;k<20;++k){const B=k/b,T=Math.exp(-B*B/2);y.push(T),0===k?M+=T:kx-4?r-x+4:0),4*(this._cubeSize-C),3*C,2*C),l.setRenderTarget(e),l.render(h,gP)}}function a5(i,t,e){const n=new Mu(i,t,e);return n.texture.mapping=gb,n.texture.name="PMREM.cubeUv",n.scissorTest=!0,n}function cS(i,t,e,n,r){i.viewport.set(t,e,n,r),i.scissor.set(t,e,n,r)}function l5(){return new Sl({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:Jc,depthTest:!1,depthWrite:!1})}function c5(){return new Sl({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:Jc,depthTest:!1,depthWrite:!1})}function $ce(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===AC||l===DC,d=l===cc||l===Qh;if(c||d){let h=t.get(a);if(a.isRenderTargetTexture&&a.pmremVersion!==(void 0!==h?h.texture.pmremVersion:0))return null===e&&(e=new o5(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||d&&m&&function r(a){let l=0;for(let d=0;d<6;d++)void 0!==a[d]&&l++;return 6===l}(m)?(null===e&&(e=new o5(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 Gce(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&&cg("THREE.WebGLRenderer: "+n+" extension not supported."),r}}}function Wce(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&&(F=Math.ceil(C/t.maxTextureSize),C=t.maxTextureSize);const D=new Float32Array(C*F*4*h),k=new Qk(D,C,F,h);k.type=ta,k.needsUpdate=!0;const B=4*x;for(let A=0;A0)return i;const r=t*e;let s=g5[r];if(void 0===s&&(s=new Float32Array(r),g5[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 Lr(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 Gde(i,t){const e=function $de(i){const t=ei.getPrimaries(ei.workingColorSpace),e=ei.getPrimaries(i);let n;switch(t===e?n="":t===UC&&e===BC?n="LinearDisplayP3ToLinearSRGB":t===BC&&e===UC&&(n="LinearSRGBToLinearDisplayP3"),i){case ds:case LC:return[n,"LinearTransferOETF"];case cs:case Yk: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 Wde(i,t){let e;switch(t){case Moe:e="Linear";break;case Coe:e="Reinhard";break;case Soe:e="OptimizedCineon";break;case Eoe:e="ACESFilmic";break;case Doe:e="AgX";break;case Toe:e="Neutral";break;case Aoe:e="Custom";break;default:console.warn("THREE.WebGLProgram: Unsupported toneMapping:",t),e="Linear"}return"vec3 "+i+"( vec3 color ) { return "+e+"ToneMapping( color ); }"}const hS=new O;function kb(i){return""!==i}function C5(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 S5(i,t){return i.replace(/NUM_CLIPPING_PLANES/g,t.numClippingPlanes).replace(/UNION_CLIPPING_PLANES/g,t.numClippingPlanes-t.numClipIntersection)}const Kde=/^[ \t]*#include +<([\w\d./]+)>/gm;function MP(i){return i.replace(Kde,Qde)}const Zde=new Map;function Qde(i,t){let e=Cn[t];if(void 0===e){const n=Zde.get(t);if(void 0===n)throw new Error("Can not resolve #include <"+t+">");e=Cn[n],console.warn('THREE.WebGLRenderer: Shader chunk "%s" has been deprecated. Use "%s" instead.',t,n)}return MP(e)}const Jde=/#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 E5(i){return i.replace(Jde,eue)}function eue(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(kb).join("\n"),y.length>0&&(y+="\n")):(v=[A5(e),"#define SHADER_TYPE "+e.shaderType,"#define SHADER_NAME "+e.shaderName,g,e.extensionClipCullDistance?"#define USE_CLIP_DISTANCE":"",e.batching?"#define USE_BATCHING":"",e.batchingColor?"#define USE_BATCHING_COLOR":"",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 "+d:"",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_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.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","#ifdef USE_SKINNING","\tattribute vec4 skinIndex;","\tattribute vec4 skinWeight;","#endif","\n"].filter(kb).join("\n"),y=[A5(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 "+d:"",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.dispersion?"#define USE_DISPERSION":"",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||e.batchingColor?"#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.decodeVideoTexture?"#define DECODE_VIDEO_TEXTURE":"",e.logarithmicDepthBuffer?"#define USE_LOGDEPTHBUF":"","uniform mat4 viewMatrix;","uniform vec3 cameraPosition;","uniform bool isOrthographic;",e.toneMapping!==bu?"#define TONE_MAPPING":"",e.toneMapping!==bu?Cn.tonemapping_pars_fragment:"",e.toneMapping!==bu?Wde("toneMapping",e.toneMapping):"",e.dithering?"#define DITHERING":"",e.opaque?"#define OPAQUE":"",Cn.colorspace_pars_fragment,Gde("linearToOutputTexel",e.outputColorSpace),(ei.getLuminanceCoefficients(hS),["float luminance( const in vec3 rgb ) {",`\tconst vec3 weights = vec3( ${hS.x.toFixed(4)}, ${hS.y.toFixed(4)}, ${hS.z.toFixed(4)} );`,"\treturn dot( weights, rgb );","}"].join("\n")),e.useDepthPacking?"#define DEPTH_PACKING "+e.depthPacking:"","\n"].filter(kb).join("\n")),o=MP(o),o=C5(o,e),o=S5(o,e),a=MP(a),a=C5(a,e),a=S5(a,e),o=E5(o),a=E5(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===A4?"":"layout(location = 0) out highp vec4 pc_fragColor;",e.glslVersion===A4?"":"#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,F=w5(r,r.VERTEX_SHADER,M+v+o),D=w5(r,r.FRAGMENT_SHADER,C);function k(W){if(i.debug.checkShaderErrors){const ie=r.getProgramInfoLog(b).trim(),ne=r.getShaderInfoLog(F).trim(),oe=r.getShaderInfoLog(D).trim();let ge=!0,q=!0;if(!1===r.getProgramParameter(b,r.LINK_STATUS))if(ge=!1,"function"==typeof i.debug.onShaderError)i.debug.onShaderError(r,b,F,D);else{const se=M5(r,F,"vertex"),J=M5(r,D,"fragment");console.error("THREE.WebGLProgram: Shader Error "+r.getError()+" - VALIDATE_STATUS "+r.getProgramParameter(b,r.VALIDATE_STATUS)+"\n\nMaterial Name: "+W.name+"\nMaterial Type: "+W.type+"\n\nProgram Info Log: "+ie+"\n"+se+"\n"+J)}else""!==ie?console.warn("THREE.WebGLProgram: Program Info Log:",ie):(""===ne||""===oe)&&(q=!1);q&&(W.diagnostics={runnable:ge,programLog:ie,vertexShader:{log:ne,prefix:v},fragmentShader:{log:oe,prefix:y}})}r.deleteShader(F),r.deleteShader(D),B=new uS(r,b),T=function Xde(i,t){const e={},n=i.getProgramParameter(t,i.ACTIVE_ATTRIBUTES);for(let r=0;r0,de=T.clearcoat>0,De=T.iridescence>0,Ae=T.sheen>0,Ut=T.transmission>0,et=R&&!!T.anisotropyMap,pt=de&&!!T.clearcoatMap,bn=de&&!!T.clearcoatNormalMap,He=de&&!!T.clearcoatRoughnessMap,ft=De&&!!T.iridescenceMap,Yn=De&&!!T.iridescenceThicknessMap,cn=Ae&&!!T.sheenColorMap,yt=Ae&&!!T.sheenRoughnessMap,vn=!!T.specularMap,Pn=!!T.specularColorMap,Ki=!!T.specularIntensityMap,Z=Ut&&!!T.transmissionMap,We=Ut&&!!T.thicknessMap,Ee=!!T.alphaMap,ti=!!T.extensions;let xr=bu;T.toneMapped&&(null===Le||!0===Le.isXRRenderTarget)&&(xr=i.toneMapping);const hs={shaderID:we,shaderType:T.type,shaderName:T.name,vertexShader:nn,fragmentShader:le,defines:T.defines,customVertexShaderID:Fe,customFragmentShaderID:Ze,isRawShaderMaterial:!0===T.isRawShaderMaterial,glslVersion:T.glslVersion,precision:m,batching:Tt,batchingColor:Tt&&null!==ne._colorsTexture,instancing:wt,instancingColor:wt&&null!==ne.instanceColor,instancingMorph:wt&&null!==ne.morphTexture,supportsVertexTextures:p,outputColorSpace:null===Le?i.outputColorSpace:!0===Le.isXRRenderTarget?Le.texture.colorSpace:ds,alphaToCoverage:!!T.alphaToCoverage,map:St,matcap:!!T.matcap,envMap:N,envMapMode:N&&se.mapping,envMapCubeUVHeight:J,aoMap:Ge,lightMap:Ne,bumpMap:it,normalMap:Me,displacementMap:p&&Gt,emissiveMap:rt,normalMapObjectSpace:Me&&T.normalMapType===Noe,normalMapTangentSpace:Me&&T.normalMapType===Jh,metalnessMap:_t,roughnessMap:H,anisotropy:R,anisotropyMap:et,clearcoat:de,clearcoatMap:pt,clearcoatNormalMap:bn,clearcoatRoughnessMap:He,dispersion:T.dispersion>0,iridescence:De,iridescenceMap:ft,iridescenceThicknessMap:Yn,sheen:Ae,sheenColorMap:cn,sheenRoughnessMap:yt,specularMap:vn,specularColorMap:Pn,specularIntensityMap:Ki,transmission:Ut,transmissionMap:Z,thicknessMap:We,gradientMap:!!T.gradientMap,opaque:!1===T.transparent&&T.blending===Zm&&!1===T.alphaToCoverage,alphaMap:Ee,alphaTest:T.alphaTest>0,alphaHash:!!T.alphaHash,combine:T.combine,mapUv:St&&b(T.map.channel),aoMapUv:Ge&&b(T.aoMap.channel),lightMapUv:Ne&&b(T.lightMap.channel),bumpMapUv:it&&b(T.bumpMap.channel),normalMapUv:Me&&b(T.normalMap.channel),displacementMapUv:Gt&&b(T.displacementMap.channel),emissiveMapUv:rt&&b(T.emissiveMap.channel),metalnessMapUv:_t&&b(T.metalnessMap.channel),roughnessMapUv:H&&b(T.roughnessMap.channel),anisotropyMapUv:et&&b(T.anisotropyMap.channel),clearcoatMapUv:pt&&b(T.clearcoatMap.channel),clearcoatNormalMapUv:bn&&b(T.clearcoatNormalMap.channel),clearcoatRoughnessMapUv:He&&b(T.clearcoatRoughnessMap.channel),iridescenceMapUv:ft&&b(T.iridescenceMap.channel),iridescenceThicknessMapUv:Yn&&b(T.iridescenceThicknessMap.channel),sheenColorMapUv:cn&&b(T.sheenColorMap.channel),sheenRoughnessMapUv:yt&&b(T.sheenRoughnessMap.channel),specularMapUv:vn&&b(T.specularMap.channel),specularColorMapUv:Pn&&b(T.specularColorMap.channel),specularIntensityMapUv:Ki&&b(T.specularIntensityMap.channel),transmissionMapUv:Z&&b(T.transmissionMap.channel),thicknessMapUv:We&&b(T.thicknessMap.channel),alphaMapUv:Ee&&b(T.alphaMap.channel),vertexTangents:!!ge.attributes.tangent&&(Me||R),vertexColors:T.vertexColors,vertexAlphas:!0===T.vertexColors&&!!ge.attributes.color&&4===ge.attributes.color.itemSize,pointsUvs:!0===ne.isPoints&&!!ge.attributes.uv&&(St||Ee),fog:!!oe,useFog:!0===T.fog,fogExp2:!!oe&&oe.isFogExp2,flatShading:!0===T.flatShading,sizeAttenuation:!0===T.sizeAttenuation,logarithmicDepthBuffer:h,skinning:!0===ne.isSkinnedMesh,morphTargets:void 0!==ge.morphAttributes.position,morphNormals:void 0!==ge.morphAttributes.normal,morphColors:void 0!==ge.morphAttributes.color,morphTargetsCount:Ye,morphTextureStride:Rt,numDirLights:A.directional.length,numPointLights:A.point.length,numSpotLights:A.spot.length,numSpotLightMaps:A.spotLightMap.length,numRectAreaLights:A.rectArea.length,numHemiLights:A.hemi.length,numDirLightShadows:A.directionalShadowMap.length,numPointLightShadows:A.pointShadowMap.length,numSpotLightShadows:A.spotShadowMap.length,numSpotLightShadowsWithMaps:A.numSpotLightShadowsWithMaps,numLightProbes:A.numLightProbes,numClippingPlanes:o.numPlanes,numClipIntersection:o.numIntersection,dithering:T.dithering,shadowMapEnabled:i.shadowMap.enabled&&W.length>0,shadowMapType:i.shadowMap.type,toneMapping:xr,decodeVideoTexture:St&&!0===T.map.isVideoTexture&&ei.getTransfer(T.map.colorSpace)===Fi,premultipliedAlpha:T.premultipliedAlpha,doubleSided:T.side===Ns,flipSided:T.side===ko,useDepthPacking:T.depthPacking>=0,depthPacking:T.depthPacking||0,index0AttributeName:T.index0AttributeName,extensionClipCullDistance:ti&&!0===T.extensions.clipCullDistance&&n.has("WEBGL_clip_cull_distance"),extensionMultiDraw:(ti&&!0===T.extensions.multiDraw||Tt)&&n.has("WEBGL_multi_draw"),rendererExtensionParallelShaderCompile:n.has("KHR_parallel_shader_compile"),customProgramCacheKey:T.customProgramCacheKey()};return hs.vertexUv1s=c.has(1),hs.vertexUv2s=c.has(2),hs.vertexUv3s=c.has(3),c.clear(),hs},getProgramCacheKey:function y(T){const A=[];if(T.shaderID?A.push(T.shaderID):(A.push(T.customVertexShaderID),A.push(T.customFragmentShaderID)),void 0!==T.defines)for(const W in T.defines)A.push(W),A.push(T.defines[W]);return!1===T.isRawShaderMaterial&&(function M(T,A){T.push(A.precision),T.push(A.outputColorSpace),T.push(A.envMapMode),T.push(A.envMapCubeUVHeight),T.push(A.mapUv),T.push(A.alphaMapUv),T.push(A.lightMapUv),T.push(A.aoMapUv),T.push(A.bumpMapUv),T.push(A.normalMapUv),T.push(A.displacementMapUv),T.push(A.emissiveMapUv),T.push(A.metalnessMapUv),T.push(A.roughnessMapUv),T.push(A.anisotropyMapUv),T.push(A.clearcoatMapUv),T.push(A.clearcoatNormalMapUv),T.push(A.clearcoatRoughnessMapUv),T.push(A.iridescenceMapUv),T.push(A.iridescenceThicknessMapUv),T.push(A.sheenColorMapUv),T.push(A.sheenRoughnessMapUv),T.push(A.specularMapUv),T.push(A.specularColorMapUv),T.push(A.specularIntensityMapUv),T.push(A.transmissionMapUv),T.push(A.thicknessMapUv),T.push(A.combine),T.push(A.fogExp2),T.push(A.sizeAttenuation),T.push(A.morphTargetsCount),T.push(A.morphAttributeCount),T.push(A.numDirLights),T.push(A.numPointLights),T.push(A.numSpotLights),T.push(A.numSpotLightMaps),T.push(A.numHemiLights),T.push(A.numRectAreaLights),T.push(A.numDirLightShadows),T.push(A.numPointLightShadows),T.push(A.numSpotLightShadows),T.push(A.numSpotLightShadowsWithMaps),T.push(A.numLightProbes),T.push(A.shadowMapType),T.push(A.toneMapping),T.push(A.numClippingPlanes),T.push(A.numClipIntersection),T.push(A.depthPacking)}(A,T),function x(T,A){a.disableAll(),A.supportsVertexTextures&&a.enable(0),A.instancing&&a.enable(1),A.instancingColor&&a.enable(2),A.instancingMorph&&a.enable(3),A.matcap&&a.enable(4),A.envMap&&a.enable(5),A.normalMapObjectSpace&&a.enable(6),A.normalMapTangentSpace&&a.enable(7),A.clearcoat&&a.enable(8),A.iridescence&&a.enable(9),A.alphaTest&&a.enable(10),A.vertexColors&&a.enable(11),A.vertexAlphas&&a.enable(12),A.vertexUv1s&&a.enable(13),A.vertexUv2s&&a.enable(14),A.vertexUv3s&&a.enable(15),A.vertexTangents&&a.enable(16),A.anisotropy&&a.enable(17),A.alphaHash&&a.enable(18),A.batching&&a.enable(19),A.dispersion&&a.enable(20),A.batchingColor&&a.enable(21),T.push(a.mask),a.disableAll(),A.fog&&a.enable(0),A.useFog&&a.enable(1),A.flatShading&&a.enable(2),A.logarithmicDepthBuffer&&a.enable(3),A.skinning&&a.enable(4),A.morphTargets&&a.enable(5),A.morphNormals&&a.enable(6),A.morphColors&&a.enable(7),A.premultipliedAlpha&&a.enable(8),A.shadowMapEnabled&&a.enable(9),A.doubleSided&&a.enable(10),A.flipSided&&a.enable(11),A.useDepthPacking&&a.enable(12),A.dithering&&a.enable(13),A.transmission&&a.enable(14),A.sheen&&a.enable(15),A.opaque&&a.enable(16),A.pointsUvs&&a.enable(17),A.decodeVideoTexture&&a.enable(18),A.alphaToCoverage&&a.enable(19),T.push(a.mask)}(A,T),A.push(i.outputColorSpace)),A.push(T.customProgramCacheKey),A.join()},getUniforms:function C(T){const A=g[T.type];let W;return W=A?Q4.clone(dc[A].uniforms):T.uniforms,W},acquireProgram:function F(T,A){let W;for(let ie=0,ne=d.length;ie0?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 d(){for(let h=t,p=i.length;h1&&e.sort(h||hue),n.length>1&&n.sort(p||D5),r.length>1&&r.sort(p||D5)}}}function fue(){let i=new WeakMap;return{get:function t(n,r){const s=i.get(n);let o;return void 0===s?(o=new T5,i.set(n,[o])):r>=s.length?(o=new T5,s.push(o)):o=s[r],o},dispose:function e(){i=new WeakMap}}}function pue(){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 O,color:new qe};break;case"SpotLight":e={position:new O,direction:new O,color:new qe,distance:0,coneCos:0,penumbraCos:0,decay:0};break;case"PointLight":e={position:new O,color:new qe,distance:0,decay:0};break;case"HemisphereLight":e={direction:new O,skyColor:new qe,groundColor:new qe};break;case"RectAreaLight":e={color:new qe,position:new O,halfWidth:new O,halfHeight:new O}}return i[t.id]=e,e}}}let gue=0;function _ue(i,t){return(t.castShadow?2:0)-(i.castShadow?2:0)+(t.map?1:0)-(i.map?1:0)}function vue(i){const t=new pue,e=function mue(){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={shadowIntensity:1,shadowBias:0,shadowNormalBias:0,shadowRadius:1,shadowMapSize:new xe};break;case"PointLight":e={shadowIntensity:1,shadowBias:0,shadowNormalBias:0,shadowRadius:1,shadowMapSize:new xe,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 O);const r=new O,s=new Bt,o=new Bt;return{setup:function a(c){let d=0,h=0,p=0;for(let T=0;T<9;T++)n.probe[T].set(0,0,0);let m=0,g=0,b=0,v=0,y=0,M=0,x=0,C=0,F=0,D=0,k=0;c.sort(_ue);for(let T=0,A=c.length;T0&&(!0===i.has("OES_texture_float_linear")?(n.rectAreaLTC1=Je.LTC_FLOAT_1,n.rectAreaLTC2=Je.LTC_FLOAT_2):(n.rectAreaLTC1=Je.LTC_HALF_1,n.rectAreaLTC2=Je.LTC_HALF_2)),n.ambient[0]=d,n.ambient[1]=h,n.ambient[2]=p;const B=n.hash;(B.directionalLength!==m||B.pointLength!==g||B.spotLength!==b||B.rectAreaLength!==v||B.hemiLength!==y||B.numDirectionalShadows!==M||B.numPointShadows!==x||B.numSpotShadows!==C||B.numSpotMaps!==F||B.numLightProbes!==k)&&(n.directional.length=m,n.spot.length=b,n.rectArea.length=v,n.point.length=g,n.hemi.length=y,n.directionalShadow.length=M,n.directionalShadowMap.length=M,n.pointShadow.length=x,n.pointShadowMap.length=x,n.spotShadow.length=C,n.spotShadowMap.length=C,n.directionalShadowMatrix.length=M,n.pointShadowMatrix.length=x,n.spotLightMatrix.length=C+F-D,n.spotLightMap.length=F,n.numSpotLightShadowsWithMaps=D,n.numLightProbes=k,B.directionalLength=m,B.pointLength=g,B.spotLength=b,B.rectAreaLength=v,B.hemiLength=y,B.numDirectionalShadows=M,B.numPointShadows=x,B.numSpotShadows=C,B.numSpotMaps=F,B.numLightProbes=k,n.version=gue++)},setupView:function l(c,d){let h=0,p=0,m=0,g=0,b=0;const v=d.matrixWorldInverse;for(let y=0,M=c.length;y=o.length?(a=new I5(i),o.push(a)):a=o[s],a},dispose:function n(){t=new WeakMap}}}class R5 extends Fo{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 k5 extends Fo{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 bue="void main() {\n\tgl_Position = vec4( position, 1.0 );\n}",xue="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 wue(i,t,e){let n=new aS;const r=new xe,s=new xe,o=new vi,a=new R5({depthPacking:Loe}),l=new k5,c={},d=e.maxTextureSize,h={[lc]:ko,[ko]:lc,[Ns]:Ns},p=new Sl({defines:{VSM_SAMPLES:8},uniforms:{shadow_pass:{value:null},resolution:{value:new xe},radius:{value:4}},vertexShader:bue,fragmentShader:xue}),m=p.clone();m.defines.HORIZONTAL_PASS=1;const g=new hn;g.setAttribute("position",new Hi(new Float32Array([-1,-1,.5,3,-1,.5,-1,3,.5]),3));const b=new Mn(g,p),v=this;this.enabled=!1,this.autoUpdate=!0,this.needsUpdate=!1,this.type=l4;let y=this.type;function M(D,k){const B=t.update(b);p.defines.VSM_SAMPLES!==D.blurSamples&&(p.defines.VSM_SAMPLES=D.blurSamples,m.defines.VSM_SAMPLES=D.blurSamples,p.needsUpdate=!0,m.needsUpdate=!0),null===D.mapPass&&(D.mapPass=new Mu(r.x,r.y)),p.uniforms.shadow_pass.value=D.map.texture,p.uniforms.resolution.value=D.mapSize,p.uniforms.radius.value=D.radius,i.setRenderTarget(D.mapPass),i.clear(),i.renderBufferDirect(k,null,B,p,b,null),m.uniforms.shadow_pass.value=D.mapPass.texture,m.uniforms.resolution.value=D.mapSize,m.uniforms.radius.value=D.radius,i.setRenderTarget(D.map),i.clear(),i.renderBufferDirect(k,null,B,m,b,null)}function x(D,k,B,T){let A=null;const W=!0===B.isPointLight?D.customDistanceMaterial:D.customDepthMaterial;if(void 0!==W)A=W;else if(A=!0===B.isPointLight?l:a,i.localClippingEnabled&&!0===k.clipShadows&&Array.isArray(k.clippingPlanes)&&0!==k.clippingPlanes.length||k.displacementMap&&0!==k.displacementScale||k.alphaMap&&k.alphaTest>0||k.map&&k.alphaTest>0){const ie=A.uuid,ne=k.uuid;let oe=c[ie];void 0===oe&&(oe={},c[ie]=oe);let ge=oe[ne];void 0===ge&&(ge=A.clone(),oe[ne]=ge,k.addEventListener("dispose",F)),A=ge}return A.visible=k.visible,A.wireframe=k.wireframe,A.side=T===Qc?null!==k.shadowSide?k.shadowSide:k.side:null!==k.shadowSide?k.shadowSide:h[k.side],A.alphaMap=k.alphaMap,A.alphaTest=k.alphaTest,A.map=k.map,A.clipShadows=k.clipShadows,A.clippingPlanes=k.clippingPlanes,A.clipIntersection=k.clipIntersection,A.displacementMap=k.displacementMap,A.displacementScale=k.displacementScale,A.displacementBias=k.displacementBias,A.wireframeLinewidth=k.wireframeLinewidth,A.linewidth=k.linewidth,!0===B.isPointLight&&!0===A.isMeshDistanceMaterial&&(i.properties.get(A).light=B),A}function C(D,k,B,T,A){if(!1===D.visible)return;if(D.layers.test(k.layers)&&(D.isMesh||D.isLine||D.isPoints)&&(D.castShadow||D.receiveShadow&&A===Qc)&&(!D.frustumCulled||n.intersectsObject(D))){D.modelViewMatrix.multiplyMatrices(B.matrixWorldInverse,D.matrixWorld);const ne=t.update(D),oe=D.material;if(Array.isArray(oe)){const ge=ne.groups;for(let q=0,se=ge.length;qd||r.y>d)&&(r.x>d&&(s.x=Math.floor(d/we.x),r.x=s.x*we.x,J.mapSize.x=s.x),r.y>d&&(s.y=Math.floor(d/we.y),r.y=s.y*we.y,J.mapSize.y=s.y)),null===J.map||!0===ne||!0===oe){const Ye=this.type!==Qc?{minFilter:vr,magFilter:vr}:{};null!==J.map&&J.map.dispose(),J.map=new Mu(r.x,r.y,Ye),J.map.texture.name=se.name+".shadowMap",J.camera.updateProjectionMatrix()}i.setRenderTarget(J.map),i.clear();const Ve=J.getViewportCount();for(let Ye=0;Ye=1):-1!==se.indexOf("OpenGL ES")&&(q=parseFloat(/^OpenGL ES (\d)/.exec(se)[1]),ge=q>=2);let J=null,we={};const Ve=i.getParameter(i.SCISSOR_BOX),Ye=i.getParameter(i.VIEWPORT),Rt=(new vi).fromArray(Ve),nn=(new vi).fromArray(Ye);function le(Z,We,Ce,Ee){const Ke=new Uint8Array(4),rn=i.createTexture();i.bindTexture(Z,rn),i.texParameteri(Z,i.TEXTURE_MIN_FILTER,i.NEAREST),i.texParameteri(Z,i.TEXTURE_MAG_FILTER,i.NEAREST);for(let ti=0;ti"u")&&/OculusBrowser/g.test(navigator.userAgent),c=new xe,d=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(H,R){return m?new OffscreenCanvas(H,R):Mb("canvas")}function b(H,R,de){let ke=1;const De=_t(H);if((De.width>de||De.height>de)&&(ke=de/Math.max(De.width,De.height)),ke<1){if(typeof HTMLImageElement<"u"&&H instanceof HTMLImageElement||typeof HTMLCanvasElement<"u"&&H instanceof HTMLCanvasElement||typeof ImageBitmap<"u"&&H instanceof ImageBitmap||typeof VideoFrame<"u"&&H instanceof VideoFrame){const Ae=Math.floor(ke*De.width),Ut=Math.floor(ke*De.height);void 0===h&&(h=g(Ae,Ut));const et=R?g(Ae,Ut):h;return et.width=Ae,et.height=Ut,et.getContext("2d").drawImage(H,0,0,Ae,Ut),console.warn("THREE.WebGLRenderer: Texture has been resized from ("+De.width+"x"+De.height+") to ("+Ae+"x"+Ut+")."),et}return"data"in H&&console.warn("THREE.WebGLRenderer: Image in DataTexture is too big ("+De.width+"x"+De.height+")."),H}return H}function v(H){return H.generateMipmaps&&H.minFilter!==vr&&H.minFilter!==cr}function y(H){i.generateMipmap(H)}function M(H,R,de,ke,De=!1){if(null!==H){if(void 0!==i[H])return i[H];console.warn("THREE.WebGLRenderer: Attempt to use non-existing WebGL internal format '"+H+"'")}let Ae=R;if(R===i.RED&&(de===i.FLOAT&&(Ae=i.R32F),de===i.HALF_FLOAT&&(Ae=i.R16F),de===i.UNSIGNED_BYTE&&(Ae=i.R8)),R===i.RED_INTEGER&&(de===i.UNSIGNED_BYTE&&(Ae=i.R8UI),de===i.UNSIGNED_SHORT&&(Ae=i.R16UI),de===i.UNSIGNED_INT&&(Ae=i.R32UI),de===i.BYTE&&(Ae=i.R8I),de===i.SHORT&&(Ae=i.R16I),de===i.INT&&(Ae=i.R32I)),R===i.RG&&(de===i.FLOAT&&(Ae=i.RG32F),de===i.HALF_FLOAT&&(Ae=i.RG16F),de===i.UNSIGNED_BYTE&&(Ae=i.RG8)),R===i.RG_INTEGER&&(de===i.UNSIGNED_BYTE&&(Ae=i.RG8UI),de===i.UNSIGNED_SHORT&&(Ae=i.RG16UI),de===i.UNSIGNED_INT&&(Ae=i.RG32UI),de===i.BYTE&&(Ae=i.RG8I),de===i.SHORT&&(Ae=i.RG16I),de===i.INT&&(Ae=i.RG32I)),R===i.RGB&&de===i.UNSIGNED_INT_5_9_9_9_REV&&(Ae=i.RGB9_E5),R===i.RGBA){const Ut=De?NC:ei.getTransfer(ke);de===i.FLOAT&&(Ae=i.RGBA32F),de===i.HALF_FLOAT&&(Ae=i.RGBA16F),de===i.UNSIGNED_BYTE&&(Ae=Ut===Fi?i.SRGB8_ALPHA8:i.RGBA8),de===i.UNSIGNED_SHORT_4_4_4_4&&(Ae=i.RGBA4),de===i.UNSIGNED_SHORT_5_5_5_1&&(Ae=i.RGB5_A1)}return(Ae===i.R16F||Ae===i.R32F||Ae===i.RG16F||Ae===i.RG32F||Ae===i.RGBA16F||Ae===i.RGBA32F)&&t.get("EXT_color_buffer_float"),Ae}function x(H,R){let de;return H?null===R||R===xu||R===eg?de=i.DEPTH24_STENCIL8:R===ta?de=i.DEPTH32F_STENCIL8:R===yb&&(de=i.DEPTH24_STENCIL8,console.warn("DepthTexture: 16 bit depth attachment is not supported with stencil. Using 24-bit attachment.")):null===R||R===xu||R===eg?de=i.DEPTH_COMPONENT24:R===ta?de=i.DEPTH_COMPONENT32F:R===yb&&(de=i.DEPTH_COMPONENT16),de}function C(H,R){return!0===v(H)||H.isFramebufferTexture&&H.minFilter!==vr&&H.minFilter!==cr?Math.log2(Math.max(R.width,R.height))+1:void 0!==H.mipmaps&&H.mipmaps.length>0?H.mipmaps.length:H.isCompressedTexture&&Array.isArray(H.image)?R.mipmaps.length:1}function F(H){const R=H.target;R.removeEventListener("dispose",F),function k(H){const R=n.get(H);if(void 0===R.__webglInit)return;const de=H.source,ke=p.get(de);if(ke){const De=ke[R.__cacheKey];De.usedTimes--,0===De.usedTimes&&B(H),0===Object.keys(ke).length&&p.delete(de)}n.remove(H)}(R),R.isVideoTexture&&d.delete(R)}function D(H){const R=H.target;R.removeEventListener("dispose",D),function T(H){const R=n.get(H);if(H.depthTexture&&H.depthTexture.dispose(),H.isWebGLCubeRenderTarget)for(let ke=0;ke<6;ke++){if(Array.isArray(R.__webglFramebuffer[ke]))for(let De=0;De0&&de.__version!==H.version){const ke=H.image;if(null===ke)console.warn("THREE.WebGLRenderer: Texture marked for update but no image data found.");else{if(!1!==ke.complete)return void nn(de,H,R);console.warn("THREE.WebGLRenderer: Texture marked for update but image is incomplete")}}e.bindTexture(i.TEXTURE_2D,de.__webglTexture,i.TEXTURE0+R)}const J={[Bs]:i.REPEAT,[er]:i.CLAMP_TO_EDGE,[_b]:i.MIRRORED_REPEAT},we={[vr]:i.NEAREST,[uk]:i.NEAREST_MIPMAP_NEAREST,[Qm]:i.NEAREST_MIPMAP_LINEAR,[cr]:i.LINEAR,[vb]:i.LINEAR_MIPMAP_NEAREST,[xl]:i.LINEAR_MIPMAP_LINEAR},Ve={[Boe]:i.NEVER,[Goe]:i.ALWAYS,[Uoe]:i.LESS,[E4]:i.LEQUAL,[Voe]:i.EQUAL,[$oe]:i.GEQUAL,[zoe]:i.GREATER,[Hoe]:i.NOTEQUAL};function Ye(H,R){if(R.type===ta&&!1===t.has("OES_texture_float_linear")&&(R.magFilter===cr||R.magFilter===vb||R.magFilter===Qm||R.magFilter===xl||R.minFilter===cr||R.minFilter===vb||R.minFilter===Qm||R.minFilter===xl)&&console.warn("THREE.WebGLRenderer: Unable to use linear filtering with floating point textures. OES_texture_float_linear not supported on this device."),i.texParameteri(H,i.TEXTURE_WRAP_S,J[R.wrapS]),i.texParameteri(H,i.TEXTURE_WRAP_T,J[R.wrapT]),(H===i.TEXTURE_3D||H===i.TEXTURE_2D_ARRAY)&&i.texParameteri(H,i.TEXTURE_WRAP_R,J[R.wrapR]),i.texParameteri(H,i.TEXTURE_MAG_FILTER,we[R.magFilter]),i.texParameteri(H,i.TEXTURE_MIN_FILTER,we[R.minFilter]),R.compareFunction&&(i.texParameteri(H,i.TEXTURE_COMPARE_MODE,i.COMPARE_REF_TO_TEXTURE),i.texParameteri(H,i.TEXTURE_COMPARE_FUNC,Ve[R.compareFunction])),!0===t.has("EXT_texture_filter_anisotropic")){if(R.magFilter===vr||R.minFilter!==Qm&&R.minFilter!==xl||R.type===ta&&!1===t.has("OES_texture_float_linear"))return;if(R.anisotropy>1||n.get(R).__currentAnisotropy){const de=t.get("EXT_texture_filter_anisotropic");i.texParameterf(H,de.TEXTURE_MAX_ANISOTROPY_EXT,Math.min(R.anisotropy,r.getMaxAnisotropy())),n.get(R).__currentAnisotropy=R.anisotropy}}}function Rt(H,R){let de=!1;void 0===H.__webglInit&&(H.__webglInit=!0,R.addEventListener("dispose",F));const ke=R.source;let De=p.get(ke);void 0===De&&(De={},p.set(ke,De));const Ae=function ne(H){const R=[];return R.push(H.wrapS),R.push(H.wrapT),R.push(H.wrapR||0),R.push(H.magFilter),R.push(H.minFilter),R.push(H.anisotropy),R.push(H.internalFormat),R.push(H.format),R.push(H.type),R.push(H.generateMipmaps),R.push(H.premultiplyAlpha),R.push(H.flipY),R.push(H.unpackAlignment),R.push(H.colorSpace),R.join()}(R);if(Ae!==H.__cacheKey){void 0===De[Ae]&&(De[Ae]={texture:i.createTexture(),usedTimes:0},o.memory.textures++,de=!0),De[Ae].usedTimes++;const Ut=De[H.__cacheKey];void 0!==Ut&&(De[H.__cacheKey].usedTimes--,0===Ut.usedTimes&&B(R)),H.__cacheKey=Ae,H.__webglTexture=De[Ae].texture}return de}function nn(H,R,de){let ke=i.TEXTURE_2D;(R.isDataArrayTexture||R.isCompressedArrayTexture)&&(ke=i.TEXTURE_2D_ARRAY),R.isData3DTexture&&(ke=i.TEXTURE_3D);const De=Rt(H,R),Ae=R.source;e.bindTexture(ke,H.__webglTexture,i.TEXTURE0+de);const Ut=n.get(Ae);if(Ae.version!==Ut.__version||!0===De){e.activeTexture(i.TEXTURE0+de);const et=ei.getPrimaries(ei.workingColorSpace),pt=R.colorSpace===wu?null:ei.getPrimaries(R.colorSpace),bn=R.colorSpace===wu||et===pt?i.NONE:i.BROWSER_DEFAULT_WEBGL;i.pixelStorei(i.UNPACK_FLIP_Y_WEBGL,R.flipY),i.pixelStorei(i.UNPACK_PREMULTIPLY_ALPHA_WEBGL,R.premultiplyAlpha),i.pixelStorei(i.UNPACK_ALIGNMENT,R.unpackAlignment),i.pixelStorei(i.UNPACK_COLORSPACE_CONVERSION_WEBGL,bn);let He=b(R.image,!1,r.maxTextureSize);He=rt(R,He);const ft=s.convert(R.format,R.colorSpace),Yn=s.convert(R.type);let yt,cn=M(R.internalFormat,ft,Yn,R.colorSpace,R.isVideoTexture);Ye(ke,R);const vn=R.mipmaps,Pn=!0!==R.isVideoTexture,Ki=void 0===Ut.__version||!0===De,Z=Ae.dataReady,We=C(R,He);if(R.isDepthTexture)cn=x(R.format===ng,R.type),Ki&&(Pn?e.texStorage2D(i.TEXTURE_2D,1,cn,He.width,He.height):e.texImage2D(i.TEXTURE_2D,0,cn,He.width,He.height,0,ft,Yn,null));else if(R.isDataTexture)if(vn.length>0){Pn&&Ki&&e.texStorage2D(i.TEXTURE_2D,We,cn,vn[0].width,vn[0].height);for(let Ce=0,Ee=vn.length;Ce0){const Ke=CP(yt.width,yt.height,R.format,R.type);for(const rn of R.layerUpdates){const ti=yt.data.subarray(rn*Ke/yt.data.BYTES_PER_ELEMENT,(rn+1)*Ke/yt.data.BYTES_PER_ELEMENT);e.compressedTexSubImage3D(i.TEXTURE_2D_ARRAY,Ce,0,0,rn,yt.width,yt.height,1,ft,ti,0,0)}R.clearLayerUpdates()}else e.compressedTexSubImage3D(i.TEXTURE_2D_ARRAY,Ce,0,0,0,yt.width,yt.height,He.depth,ft,yt.data,0,0)}else e.compressedTexImage3D(i.TEXTURE_2D_ARRAY,Ce,cn,yt.width,yt.height,He.depth,0,yt.data,0,0);else console.warn("THREE.WebGLRenderer: Attempt to load unsupported compressed texture format in .uploadTexture()");else Pn?Z&&e.texSubImage3D(i.TEXTURE_2D_ARRAY,Ce,0,0,0,yt.width,yt.height,He.depth,ft,Yn,yt.data):e.texImage3D(i.TEXTURE_2D_ARRAY,Ce,cn,yt.width,yt.height,He.depth,0,ft,Yn,yt.data)}else{Pn&&Ki&&e.texStorage2D(i.TEXTURE_2D,We,cn,vn[0].width,vn[0].height);for(let Ce=0,Ee=vn.length;Ce0){const Ce=CP(He.width,He.height,R.format,R.type);for(const Ee of R.layerUpdates){const Ke=He.data.subarray(Ee*Ce/He.data.BYTES_PER_ELEMENT,(Ee+1)*Ce/He.data.BYTES_PER_ELEMENT);e.texSubImage3D(i.TEXTURE_2D_ARRAY,0,0,0,Ee,He.width,He.height,1,ft,Yn,Ke)}R.clearLayerUpdates()}else e.texSubImage3D(i.TEXTURE_2D_ARRAY,0,0,0,0,He.width,He.height,He.depth,ft,Yn,He.data)}else e.texImage3D(i.TEXTURE_2D_ARRAY,0,cn,He.width,He.height,He.depth,0,ft,Yn,He.data);else if(R.isData3DTexture)Pn?(Ki&&e.texStorage3D(i.TEXTURE_3D,We,cn,He.width,He.height,He.depth),Z&&e.texSubImage3D(i.TEXTURE_3D,0,0,0,0,He.width,He.height,He.depth,ft,Yn,He.data)):e.texImage3D(i.TEXTURE_3D,0,cn,He.width,He.height,He.depth,0,ft,Yn,He.data);else if(R.isFramebufferTexture){if(Ki)if(Pn)e.texStorage2D(i.TEXTURE_2D,We,cn,He.width,He.height);else{let Ce=He.width,Ee=He.height;for(let Ke=0;Ke>=1,Ee>>=1}}else if(vn.length>0){if(Pn&&Ki){const Ce=_t(vn[0]);e.texStorage2D(i.TEXTURE_2D,We,cn,Ce.width,Ce.height)}for(let Ce=0,Ee=vn.length;Ce>Ae),ft=Math.max(1,R.height>>Ae);De===i.TEXTURE_3D||De===i.TEXTURE_2D_ARRAY?e.texImage3D(De,Ae,pt,He,ft,R.depth,0,Ut,et,null):e.texImage2D(De,Ae,pt,He,ft,0,Ut,et,null)}e.bindFramebuffer(i.FRAMEBUFFER,H),Me(R)?a.framebufferTexture2DMultisampleEXT(i.FRAMEBUFFER,ke,De,n.get(de).__webglTexture,0,it(R)):(De===i.TEXTURE_2D||De>=i.TEXTURE_CUBE_MAP_POSITIVE_X&&De<=i.TEXTURE_CUBE_MAP_NEGATIVE_Z)&&i.framebufferTexture2D(i.FRAMEBUFFER,ke,De,n.get(de).__webglTexture,Ae),e.bindFramebuffer(i.FRAMEBUFFER,null)}function Ze(H,R,de){if(i.bindRenderbuffer(i.RENDERBUFFER,H),R.depthBuffer){const ke=R.depthTexture,Ae=x(R.stencilBuffer,ke&&ke.isDepthTexture?ke.type:null),Ut=R.stencilBuffer?i.DEPTH_STENCIL_ATTACHMENT:i.DEPTH_ATTACHMENT,et=it(R);Me(R)?a.renderbufferStorageMultisampleEXT(i.RENDERBUFFER,et,Ae,R.width,R.height):de?i.renderbufferStorageMultisample(i.RENDERBUFFER,et,Ae,R.width,R.height):i.renderbufferStorage(i.RENDERBUFFER,Ae,R.width,R.height),i.framebufferRenderbuffer(i.FRAMEBUFFER,Ut,i.RENDERBUFFER,H)}else{const ke=R.textures;for(let De=0;De0&&!0===t.has("WEBGL_multisampled_render_to_texture")&&!1!==R.__useRenderToTexture}function rt(H,R){const de=H.colorSpace,ke=H.format,De=H.type;return!0===H.isCompressedTexture||!0===H.isVideoTexture||de!==ds&&de!==wu&&(ei.getTransfer(de)===Fi?(ke!==Po||De!==ed)&&console.warn("THREE.WebGLTextures: sRGB encoded textures have to use RGBAFormat and UnsignedByteType."):console.error("THREE.WebGLTextures: Unsupported texture color space:",de)),R}function _t(H){return typeof HTMLImageElement<"u"&&H instanceof HTMLImageElement?(c.width=H.naturalWidth||H.width,c.height=H.naturalHeight||H.height):typeof VideoFrame<"u"&&H instanceof VideoFrame?(c.width=H.displayWidth,c.height=H.displayHeight):(c.width=H.width,c.height=H.height),c}this.allocateTextureUnit=function ie(){const H=A;return H>=r.maxTextures&&console.warn("THREE.WebGLTextures: Trying to use "+H+" texture units while this GPU supports only "+r.maxTextures),A+=1,H},this.resetTextureUnits=function W(){A=0},this.setTexture2D=oe,this.setTexture2DArray=function ge(H,R){const de=n.get(H);H.version>0&&de.__version!==H.version?nn(de,H,R):e.bindTexture(i.TEXTURE_2D_ARRAY,de.__webglTexture,i.TEXTURE0+R)},this.setTexture3D=function q(H,R){const de=n.get(H);H.version>0&&de.__version!==H.version?nn(de,H,R):e.bindTexture(i.TEXTURE_3D,de.__webglTexture,i.TEXTURE0+R)},this.setTextureCube=function se(H,R){const de=n.get(H);H.version>0&&de.__version!==H.version?function le(H,R,de){if(6!==R.image.length)return;const ke=Rt(H,R),De=R.source;e.bindTexture(i.TEXTURE_CUBE_MAP,H.__webglTexture,i.TEXTURE0+de);const Ae=n.get(De);if(De.version!==Ae.__version||!0===ke){e.activeTexture(i.TEXTURE0+de);const Ut=ei.getPrimaries(ei.workingColorSpace),et=R.colorSpace===wu?null:ei.getPrimaries(R.colorSpace),pt=R.colorSpace===wu||Ut===et?i.NONE:i.BROWSER_DEFAULT_WEBGL;i.pixelStorei(i.UNPACK_FLIP_Y_WEBGL,R.flipY),i.pixelStorei(i.UNPACK_PREMULTIPLY_ALPHA_WEBGL,R.premultiplyAlpha),i.pixelStorei(i.UNPACK_ALIGNMENT,R.unpackAlignment),i.pixelStorei(i.UNPACK_COLORSPACE_CONVERSION_WEBGL,pt);const bn=R.isCompressedTexture||R.image[0].isCompressedTexture,He=R.image[0]&&R.image[0].isDataTexture,ft=[];for(let Ee=0;Ee<6;Ee++)ft[Ee]=bn||He?He?R.image[Ee].image:R.image[Ee]:b(R.image[Ee],!0,r.maxCubemapSize),ft[Ee]=rt(R,ft[Ee]);const Yn=ft[0],cn=s.convert(R.format,R.colorSpace),yt=s.convert(R.type),vn=M(R.internalFormat,cn,yt,R.colorSpace),Pn=!0!==R.isVideoTexture,Ki=void 0===Ae.__version||!0===ke,Z=De.dataReady;let Ce,We=C(R,Yn);if(Ye(i.TEXTURE_CUBE_MAP,R),bn){Pn&&Ki&&e.texStorage2D(i.TEXTURE_CUBE_MAP,We,vn,Yn.width,Yn.height);for(let Ee=0;Ee<6;Ee++){Ce=ft[Ee].mipmaps;for(let Ke=0;Ke0&&We++;const Ee=_t(ft[0]);e.texStorage2D(i.TEXTURE_CUBE_MAP,We,vn,Ee.width,Ee.height)}for(let Ee=0;Ee<6;Ee++)if(He){Pn?Z&&e.texSubImage2D(i.TEXTURE_CUBE_MAP_POSITIVE_X+Ee,0,0,0,ft[Ee].width,ft[Ee].height,cn,yt,ft[Ee].data):e.texImage2D(i.TEXTURE_CUBE_MAP_POSITIVE_X+Ee,0,vn,ft[Ee].width,ft[Ee].height,0,cn,yt,ft[Ee].data);for(let Ke=0;Ke1;if(Ut||(void 0===ke.__webglTexture&&(ke.__webglTexture=i.createTexture()),ke.__version=R.version,o.memory.textures++),Ae){de.__webglFramebuffer=[];for(let et=0;et<6;et++)if(R.mipmaps&&R.mipmaps.length>0){de.__webglFramebuffer[et]=[];for(let pt=0;pt0){de.__webglFramebuffer=[];for(let et=0;et0&&!1===Me(H)){de.__webglMultisampledFramebuffer=i.createFramebuffer(),de.__webglColorRenderbuffer=[],e.bindFramebuffer(i.FRAMEBUFFER,de.__webglMultisampledFramebuffer);for(let et=0;et0)for(let pt=0;pt0)for(let pt=0;pt0)if(!1===Me(H)){const R=H.textures,de=H.width,ke=H.height;let De=i.COLOR_BUFFER_BIT;const Ae=H.stencilBuffer?i.DEPTH_STENCIL_ATTACHMENT:i.DEPTH_ATTACHMENT,Ut=n.get(H),et=R.length>1;if(et)for(let pt=0;ptm+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(Rue)))}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 No;n.matrixAutoUpdate=!1,n.visible=!1,t.joints[e.jointName]=n,t.add(n)}return t.joints[e.jointName]}}class Oue{constructor(){this.texture=null,this.mesh=null,this.depthNear=0,this.depthFar=0}init(t,e,n){if(null===this.texture){const r=new Oo;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}}getMesh(t){if(null!==this.texture&&null===this.mesh){const e=t.cameras[0].viewport,n=new Sl({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:e.z},depthHeight:{value:e.w}}});this.mesh=new Mn(new Iu(20,20),n)}return this.mesh}reset(){this.texture=null,this.mesh=null}getDepthTexture(){return this.texture}}class Fue extends og{constructor(t,e){super();const n=this;let r=null,s=1,o=null,a="local-floor",l=1,c=null,d=null,h=null,p=null,m=null,g=null;const b=new Oue,v=e.getContextAttributes();let y=null,M=null;const x=[],C=[],F=new xe;let D=null;const k=new br;k.layers.enable(1),k.viewport=new vi;const B=new br;B.layers.enable(2),B.viewport=new vi;const T=[k,B],A=new Iue;A.layers.enable(1),A.layers.enable(2);let W=null,ie=null;function ne(le){const Fe=C.indexOf(le.inputSource);if(-1===Fe)return;const Ze=x[Fe];void 0!==Ze&&(Ze.update(le.inputSource,le.frame,c||o),Ze.dispatchEvent({type:le.type,data:le.inputSource}))}function oe(){r.removeEventListener("select",ne),r.removeEventListener("selectstart",ne),r.removeEventListener("selectend",ne),r.removeEventListener("squeeze",ne),r.removeEventListener("squeezestart",ne),r.removeEventListener("squeezeend",ne),r.removeEventListener("end",oe),r.removeEventListener("inputsourceschange",ge);for(let le=0;le=0&&(C[Le]=null,x[Le].disconnect(Ze))}for(let Fe=0;Fe=C.length){C.push(Ze),Le=Tt;break}if(null===C[Tt]){C[Tt]=Ze,Le=Tt;break}}if(-1===Le)break}const wt=x[Le];wt&&wt.connect(Ze)}}this.cameraAutoUpdate=!0,this.enabled=!1,this.isPresenting=!1,this.getController=function(le){let Fe=x[le];return void 0===Fe&&(Fe=new SP,x[le]=Fe),Fe.getTargetRaySpace()},this.getControllerGrip=function(le){let Fe=x[le];return void 0===Fe&&(Fe=new SP,x[le]=Fe),Fe.getGripSpace()},this.getHand=function(le){let Fe=x[le];return void 0===Fe&&(Fe=new SP,x[le]=Fe),Fe.getHandSpace()},this.setFramebufferScaleFactor=function(le){s=le,!0===n.isPresenting&&console.warn("THREE.WebXRManager: Cannot change framebuffer scale while presenting.")},this.setReferenceSpaceType=function(le){a=le,!0===n.isPresenting&&console.warn("THREE.WebXRManager: Cannot change reference space type while presenting.")},this.getReferenceSpace=function(){return c||o},this.setReferenceSpace=function(le){c=le},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 le=nt(function*(Fe){if(r=Fe,null!==r){if(y=t.getRenderTarget(),r.addEventListener("select",ne),r.addEventListener("selectstart",ne),r.addEventListener("selectend",ne),r.addEventListener("squeeze",ne),r.addEventListener("squeezestart",ne),r.addEventListener("squeezeend",ne),r.addEventListener("end",oe),r.addEventListener("inputsourceschange",ge),!0!==v.xrCompatible&&(yield e.makeXRCompatible()),D=t.getPixelRatio(),t.getSize(F),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 Mu(m.framebufferWidth,m.framebufferHeight,{format:Po,type:ed,colorSpace:t.outputColorSpace,stencilBuffer:v.stencil});else{let Ze=null,Le=null,wt=null;v.depth&&(wt=v.stencil?e.DEPTH24_STENCIL8:e.DEPTH_COMPONENT24,Ze=v.stencil?ng:tg,Le=v.stencil?eg:xu);const Tt={colorFormat:e.RGBA8,depthFormat:wt,scaleFactor:s};h=new XRWebGLBinding(r,e),p=h.createProjectionLayer(Tt),r.updateRenderState({layers:[p]}),t.setPixelRatio(1),t.setSize(p.textureWidth,p.textureHeight,!1),M=new Mu(p.textureWidth,p.textureHeight,{format:Po,type:ed,depthTexture:new d5(p.textureWidth,p.textureHeight,Le,void 0,void 0,void 0,void 0,void 0,void 0,Ze),stencilBuffer:v.stencil,colorSpace:t.outputColorSpace,samples:v.antialias?4:0,resolveDepthBuffer:!1===p.ignoreDepthValues})}M.isXRRenderTarget=!0,this.setFoveation(l),c=null,o=yield r.requestReferenceSpace(a),nn.setContext(r),nn.start(),n.isPresenting=!0,n.dispatchEvent({type:"sessionstart"})}});return function(Fe){return le.apply(this,arguments)}}(),this.getEnvironmentBlendMode=function(){if(null!==r)return r.environmentBlendMode},this.getDepthTexture=function(){return b.getDepthTexture()};const q=new O,se=new O;function we(le,Fe){null===Fe?le.matrixWorld.copy(le.matrix):le.matrixWorld.multiplyMatrices(Fe.matrixWorld,le.matrix),le.matrixWorldInverse.copy(le.matrixWorld).invert()}this.updateCamera=function(le){if(null===r)return;null!==b.texture&&(le.near=b.depthNear,le.far=b.depthFar),A.near=B.near=k.near=le.near,A.far=B.far=k.far=le.far,(W!==A.near||ie!==A.far)&&(r.updateRenderState({depthNear:A.near,depthFar:A.far}),W=A.near,ie=A.far,k.near=W,k.far=ie,B.near=W,B.far=ie,k.updateProjectionMatrix(),B.updateProjectionMatrix(),le.updateProjectionMatrix());const Fe=le.parent,Ze=A.cameras;we(A,Fe);for(let Le=0;Le0&&(v.alphaTest.value=y.alphaTest);const M=t.get(y),x=M.envMap,C=M.envMapRotation;x&&(v.envMap.value=x,hf.copy(C),hf.x*=-1,hf.y*=-1,hf.z*=-1,x.isCubeTexture&&!1===x.isRenderTargetTexture&&(hf.y*=-1,hf.z*=-1),v.envMapRotation.value.setFromMatrix4(Lue.makeRotationFromEuler(hf)),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,v.lightMapIntensity.value=y.lightMapIntensity,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,Z4(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 d(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===ko&&v.clearcoatNormalScale.value.negate())),y.dispersion>0&&(v.dispersion.value=y.dispersion),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 Bue(i,t,e,n){let r={},s={},o=[];const a=i.getParameter(i.MAX_UNIFORM_BUFFER_BINDINGS);function m(M,x,C,F){const D=M.value,k=x+"_"+C;if(void 0===F[k])return F[k]="number"==typeof D||"boolean"==typeof D?D:D.clone(),!0;{const B=F[k];if("number"==typeof D||"boolean"==typeof D){if(B!==D)return F[k]=D,!0}else if(!1===B.equals(D))return B.copy(D),!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 k=0,B=x.length;k0&&(C+=16-D),M.__size=C,M.__cache={}}(M),C=function d(M){const x=function h(){for(let M=0;M0),Zt=!!ce.morphAttributes.position,li=!!ce.morphAttributes.normal,Li=!!ce.morphAttributes.color;let ir=bu;ue.toneMapped&&(null===k||!0===k.isXRRenderTarget)&&(ir=x.toneMapping);const ca=ce.morphAttributes.position||ce.morphAttributes.normal||ce.morphAttributes.color,fi=void 0!==ca?ca.length:0,kt=rt.get(ue),fs=v.state.lights;!0!==le||!0!==Fe&&L===T||bn.setState(ue,L,L===T&&ue.id===B);let pi=!1;ue.version===kt.__version?(kt.needsLights&&kt.lightsStateVersion!==fs.state.version||kt.outputColorSpace!==Mt||te.isBatchedMesh&&!1===kt.batching||!te.isBatchedMesh&&!0===kt.batching||te.isBatchedMesh&&!0===kt.batchingColor&&null===te.colorTexture||te.isBatchedMesh&&!1===kt.batchingColor&&null!==te.colorTexture||te.isInstancedMesh&&!1===kt.instancing||!te.isInstancedMesh&&!0===kt.instancing||te.isSkinnedMesh&&!1===kt.skinning||!te.isSkinnedMesh&&!0===kt.skinning||te.isInstancedMesh&&!0===kt.instancingColor&&null===te.instanceColor||te.isInstancedMesh&&!1===kt.instancingColor&&null!==te.instanceColor||te.isInstancedMesh&&!0===kt.instancingMorph&&null===te.morphTexture||te.isInstancedMesh&&!1===kt.instancingMorph&&null!==te.morphTexture||kt.envMap!==Ct||!0===ue.fog&&kt.fog!==je||void 0!==kt.numClippingPlanes&&(kt.numClippingPlanes!==bn.numPlanes||kt.numIntersection!==bn.numIntersection)||kt.vertexAlphas!==Kt||kt.vertexTangents!==an||kt.morphTargets!==Zt||kt.morphNormals!==li||kt.morphColors!==Li||kt.toneMapping!==ir||kt.morphTargetsCount!==fi)&&(pi=!0):(pi=!0,kt.__version=ue.version);let Al=kt.currentProgram;!0===pi&&(Al=xE(ue,K,te));let qg=!1,da=!1,XO=!1;const wr=Al.getUniforms(),Uu=kt.uniforms;if(Me.useProgram(Al.program)&&(qg=!0,da=!0,XO=!0),ue.id!==B&&(B=ue.id,da=!0),qg||T!==L){wr.setValue(N,"projectionMatrix",L.projectionMatrix),wr.setValue(N,"viewMatrix",L.matrixWorldInverse);const $a=wr.map.cameraPosition;void 0!==$a&&$a.setValue(N,Le.setFromMatrixPosition(L.matrixWorld)),it.logarithmicDepthBuffer&&wr.setValue(N,"logDepthBufFC",2/(Math.log(L.far+1)/Math.LN2)),(ue.isMeshPhongMaterial||ue.isMeshToonMaterial||ue.isMeshLambertMaterial||ue.isMeshBasicMaterial||ue.isMeshStandardMaterial||ue.isShaderMaterial)&&wr.setValue(N,"isOrthographic",!0===L.isOrthographicCamera),T!==L&&(T=L,da=!0,XO=!0)}if(te.isSkinnedMesh){wr.setOptional(N,te,"bindMatrix"),wr.setOptional(N,te,"bindMatrixInverse");const $a=te.skeleton;$a&&(null===$a.boneTexture&&$a.computeBoneTexture(),wr.setValue(N,"boneTexture",$a.boneTexture,_t))}te.isBatchedMesh&&(wr.setOptional(N,te,"batchingTexture"),wr.setValue(N,"batchingTexture",te._matricesTexture,_t),wr.setOptional(N,te,"batchingIdTexture"),wr.setValue(N,"batchingIdTexture",te._indirectTexture,_t),wr.setOptional(N,te,"batchingColorTexture"),null!==te._colorsTexture&&wr.setValue(N,"batchingColorTexture",te._colorsTexture,_t));const KO=ce.morphAttributes;if((void 0!==KO.position||void 0!==KO.normal||void 0!==KO.color)&&Yn.update(te,ce,Al),(da||kt.receiveShadow!==te.receiveShadow)&&(kt.receiveShadow=te.receiveShadow,wr.setValue(N,"receiveShadow",te.receiveShadow)),ue.isMeshGouraudMaterial&&null!==ue.envMap&&(Uu.envMap.value=Ct,Uu.flipEnvMap.value=Ct.isCubeTexture&&!1===Ct.isRenderTargetTexture?-1:1),ue.isMeshStandardMaterial&&null===ue.envMap&&null!==K.environment&&(Uu.envMapIntensity.value=K.environmentIntensity),da&&(wr.setValue(N,"toneMappingExposure",x.toneMappingExposure),kt.needsLights&&function Gve(L,K){L.ambientLightColor.needsUpdate=K,L.lightProbe.needsUpdate=K,L.directionalLights.needsUpdate=K,L.directionalLightShadows.needsUpdate=K,L.pointLights.needsUpdate=K,L.pointLightShadows.needsUpdate=K,L.spotLights.needsUpdate=K,L.spotLightShadows.needsUpdate=K,L.rectAreaLights.needsUpdate=K,L.hemisphereLights.needsUpdate=K}(Uu,XO),je&&!0===ue.fog&&Ut.refreshFogUniforms(Uu,je),Ut.refreshMaterialUniforms(Uu,ue,se,q,v.state.transmissionRenderTarget[L.id]),uS.upload(N,_8(kt),Uu,_t)),ue.isShaderMaterial&&!0===ue.uniformsNeedUpdate&&(uS.upload(N,_8(kt),Uu,_t),ue.uniformsNeedUpdate=!1),ue.isSpriteMaterial&&wr.setValue(N,"center",te.center),wr.setValue(N,"modelViewMatrix",te.modelViewMatrix),wr.setValue(N,"normalMatrix",te.normalMatrix),wr.setValue(N,"modelMatrix",te.matrixWorld),ue.isShaderMaterial||ue.isRawShaderMaterial){const $a=ue.uniformsGroups;for(let ZO=0,jve=$a.length;ZO{function je(){ue.forEach(function(at){rt.get(at).currentProgram.isReady()&&ue.delete(at)}),0!==ue.size?setTimeout(je,10):te(L)}null!==Ne.get("KHR_parallel_shader_compile")?je():setTimeout(je,10)})};let hi=null;function pc(){Pf.stop()}function f8(){Pf.start()}const Pf=new t5;function qO(L,K,ce,ue){if(!1===L.visible)return;if(L.layers.test(K.layers))if(L.isGroup)ce=L.renderOrder;else if(L.isLOD)!0===L.autoUpdate&&L.update(K);else if(L.isLight)v.pushLight(L),L.castShadow&&v.pushShadow(L);else if(L.isSprite){if(!L.frustumCulled||nn.intersectsSprite(L)){ue&&wt.setFromMatrixPosition(L.matrixWorld).applyMatrix4(Ze);const at=De.update(L),Mt=L.material;Mt.visible&&b.push(L,at,Mt,ce,wt.z,null)}}else if((L.isMesh||L.isLine||L.isPoints)&&(!L.frustumCulled||nn.intersectsObject(L))){const at=De.update(L),Mt=L.material;if(ue&&(void 0!==L.boundingSphere?(null===L.boundingSphere&&L.computeBoundingSphere(),wt.copy(L.boundingSphere.center)):(null===at.boundingSphere&&at.computeBoundingSphere(),wt.copy(at.boundingSphere.center)),wt.applyMatrix4(L.matrixWorld).applyMatrix4(Ze)),Array.isArray(Mt)){const Ct=at.groups;for(let Kt=0,an=Ct.length;Kt0&&bE(te,K,ce),je.length>0&&bE(je,K,ce),at.length>0&&bE(at,K,ce),Me.buffers.depth.setTest(!0),Me.buffers.depth.setMask(!0),Me.buffers.color.setMask(!0),Me.setPolygonOffset(!1)}function m8(L,K,ce,ue){if(null!==(!0===ce.isScene?ce.overrideMaterial:null))return;void 0===v.state.transmissionRenderTarget[ue.id]&&(v.state.transmissionRenderTarget[ue.id]=new Mu(1,1,{generateMipmaps:!0,type:Ne.has("EXT_color_buffer_half_float")||Ne.has("EXT_color_buffer_float")?Jm:ed,minFilter:xl,samples:4,stencilBuffer:s,resolveDepthBuffer:!1,resolveStencilBuffer:!1,colorSpace:ei.workingColorSpace}));const je=v.state.transmissionRenderTarget[ue.id],at=ue.viewport||A;je.setSize(at.z,at.w);const Mt=x.getRenderTarget();x.setRenderTarget(je),x.getClearColor(ne),oe=x.getClearAlpha(),oe<1&&x.setClearColor(16777215,.5),x.clear(),St&&ft.render(ce);const Ct=x.toneMapping;x.toneMapping=bu;const Kt=ue.viewport;if(void 0!==ue.viewport&&(ue.viewport=void 0),v.setupLightsView(ue),!0===le&&bn.setGlobalState(x.clippingPlanes,ue),bE(L,ce,ue),_t.updateMultisampleRenderTarget(je),_t.updateRenderTargetMipmap(je),!1===Ne.has("WEBGL_multisampled_render_to_texture")){let an=!1;for(let Zt=0,li=K.length;Zt0)for(let at=0,Mt=je.length;at0&&m8(ue,te,L,K),St&&ft.render(L),p8(b,L,K);null!==k&&(_t.updateMultisampleRenderTarget(k),_t.updateRenderTargetMipmap(k)),!0===L.isScene&&L.onAfterRender(x,L,K),Pn.resetDefaultState(),B=-1,T=null,M.pop(),M.length>0?(v=M[M.length-1],!0===le&&bn.setGlobalState(x.clippingPlanes,v.state.camera)):v=null,y.pop(),b=y.length>0?y[y.length-1]:null},this.getActiveCubeFace=function(){return F},this.getActiveMipmapLevel=function(){return D},this.getRenderTarget=function(){return k},this.setRenderTargetTextures=function(L,K,ce){rt.get(L.texture).__webglTexture=K,rt.get(L.depthTexture).__webglTexture=ce;const ue=rt.get(L);ue.__hasExternalTextures=!0,ue.__autoAllocateDepthBuffer=void 0===ce,ue.__autoAllocateDepthBuffer||!0===Ne.has("WEBGL_multisampled_render_to_texture")&&(console.warn("THREE.WebGLRenderer: Render-to-texture extension was disabled because an external texture was provided"),ue.__useRenderToTexture=!1)},this.setRenderTargetFramebuffer=function(L,K){const ce=rt.get(L);ce.__webglFramebuffer=K,ce.__useDefaultFramebuffer=void 0===K},this.setRenderTarget=function(L,K=0,ce=0){k=L,F=K,D=ce;let ue=!0,te=null,je=!1,at=!1;if(L){const Ct=rt.get(L);void 0!==Ct.__useDefaultFramebuffer?(Me.bindFramebuffer(N.FRAMEBUFFER,null),ue=!1):void 0===Ct.__webglFramebuffer?_t.setupRenderTarget(L):Ct.__hasExternalTextures&&_t.rebindTextures(L,rt.get(L.texture).__webglTexture,rt.get(L.depthTexture).__webglTexture);const Kt=L.texture;(Kt.isData3DTexture||Kt.isDataArrayTexture||Kt.isCompressedArrayTexture)&&(at=!0);const an=rt.get(L).__webglFramebuffer;L.isWebGLCubeRenderTarget?(te=Array.isArray(an[K])?an[K][ce]:an[K],je=!0):te=L.samples>0&&!1===_t.useMultisampledRTT(L)?rt.get(L).__webglMultisampledFramebuffer:Array.isArray(an)?an[ce]:an,A.copy(L.viewport),W.copy(L.scissor),ie=L.scissorTest}else A.copy(Ve).multiplyScalar(se).floor(),W.copy(Ye).multiplyScalar(se).floor(),ie=Rt;if(Me.bindFramebuffer(N.FRAMEBUFFER,te)&&ue&&Me.drawBuffers(L,te),Me.viewport(A),Me.scissor(W),Me.setScissorTest(ie),je){const Ct=rt.get(L.texture);N.framebufferTexture2D(N.FRAMEBUFFER,N.COLOR_ATTACHMENT0,N.TEXTURE_CUBE_MAP_POSITIVE_X+K,Ct.__webglTexture,ce)}else if(at){const Ct=rt.get(L.texture);N.framebufferTextureLayer(N.FRAMEBUFFER,N.COLOR_ATTACHMENT0,Ct.__webglTexture,ce||0,K||0)}B=-1},this.readRenderTargetPixels=function(L,K,ce,ue,te,je,at){if(!L||!L.isWebGLRenderTarget)return void console.error("THREE.WebGLRenderer.readRenderTargetPixels: renderTarget is not THREE.WebGLRenderTarget.");let Mt=rt.get(L).__webglFramebuffer;if(L.isWebGLCubeRenderTarget&&void 0!==at&&(Mt=Mt[at]),Mt){Me.bindFramebuffer(N.FRAMEBUFFER,Mt);try{const Ct=L.texture,Kt=Ct.format,an=Ct.type;if(!it.textureFormatReadable(Kt))return void console.error("THREE.WebGLRenderer.readRenderTargetPixels: renderTarget is not in RGBA or implementation defined format.");if(!it.textureTypeReadable(an))return void console.error("THREE.WebGLRenderer.readRenderTargetPixels: renderTarget is not in UnsignedByteType or implementation defined type.");K>=0&&K<=L.width-ue&&ce>=0&&ce<=L.height-te&&N.readPixels(K,ce,ue,te,vn.convert(Kt),vn.convert(an),je)}finally{const Ct=null!==k?rt.get(k).__webglFramebuffer:null;Me.bindFramebuffer(N.FRAMEBUFFER,Ct)}}},this.readRenderTargetPixelsAsync=function(){var L=nt(function*(K,ce,ue,te,je,at,Mt){if(!K||!K.isWebGLRenderTarget)throw new Error("THREE.WebGLRenderer.readRenderTargetPixels: renderTarget is not THREE.WebGLRenderTarget.");let Ct=rt.get(K).__webglFramebuffer;if(K.isWebGLCubeRenderTarget&&void 0!==Mt&&(Ct=Ct[Mt]),Ct){Me.bindFramebuffer(N.FRAMEBUFFER,Ct);try{const Kt=K.texture,an=Kt.format,Zt=Kt.type;if(!it.textureFormatReadable(an))throw new Error("THREE.WebGLRenderer.readRenderTargetPixelsAsync: renderTarget is not in RGBA or implementation defined format.");if(!it.textureTypeReadable(Zt))throw new Error("THREE.WebGLRenderer.readRenderTargetPixelsAsync: renderTarget is not in UnsignedByteType or implementation defined type.");if(ce>=0&&ce<=K.width-te&&ue>=0&&ue<=K.height-je){const li=N.createBuffer();N.bindBuffer(N.PIXEL_PACK_BUFFER,li),N.bufferData(N.PIXEL_PACK_BUFFER,at.byteLength,N.STREAM_READ),N.readPixels(ce,ue,te,je,vn.convert(an),vn.convert(Zt),0),N.flush();const Li=N.fenceSync(N.SYNC_GPU_COMMANDS_COMPLETE,0);yield function dae(i,t,e){return new Promise(function(n,r){setTimeout(function s(){switch(i.clientWaitSync(t,i.SYNC_FLUSH_COMMANDS_BIT,0)){case i.WAIT_FAILED:r();break;case i.TIMEOUT_EXPIRED:setTimeout(s,e);break;default:n()}},e)})}(N,Li,4);try{N.bindBuffer(N.PIXEL_PACK_BUFFER,li),N.getBufferSubData(N.PIXEL_PACK_BUFFER,0,at)}finally{N.deleteBuffer(li),N.deleteSync(Li)}return at}}finally{const Kt=null!==k?rt.get(k).__webglFramebuffer:null;Me.bindFramebuffer(N.FRAMEBUFFER,Kt)}}});return function(K,ce,ue,te,je,at,Mt){return L.apply(this,arguments)}}(),this.copyFramebufferToTexture=function(L,K=null,ce=0){!0!==L.isTexture&&(cg("WebGLRenderer: copyFramebufferToTexture function signature has changed."),K=arguments[0]||null,L=arguments[1]);const ue=Math.pow(2,-ce),te=Math.floor(L.image.width*ue),je=Math.floor(L.image.height*ue),at=null!==K?K.x:0,Mt=null!==K?K.y:0;_t.setTexture2D(L,0),N.copyTexSubImage2D(N.TEXTURE_2D,ce,0,0,at,Mt,te,je),Me.unbindTexture()},this.copyTextureToTexture=function(L,K,ce=null,ue=null,te=0){let je,at,Mt,Ct,Kt,an;!0!==L.isTexture&&(cg("WebGLRenderer: copyTextureToTexture function signature has changed."),ue=arguments[0]||null,L=arguments[1],K=arguments[2],te=arguments[3]||0,ce=null),null!==ce?(je=ce.max.x-ce.min.x,at=ce.max.y-ce.min.y,Mt=ce.min.x,Ct=ce.min.y):(je=L.image.width,at=L.image.height,Mt=0,Ct=0),null!==ue?(Kt=ue.x,an=ue.y):(Kt=0,an=0);const Zt=vn.convert(K.format),li=vn.convert(K.type);_t.setTexture2D(K,0),N.pixelStorei(N.UNPACK_FLIP_Y_WEBGL,K.flipY),N.pixelStorei(N.UNPACK_PREMULTIPLY_ALPHA_WEBGL,K.premultiplyAlpha),N.pixelStorei(N.UNPACK_ALIGNMENT,K.unpackAlignment);const Li=N.getParameter(N.UNPACK_ROW_LENGTH),ir=N.getParameter(N.UNPACK_IMAGE_HEIGHT),ca=N.getParameter(N.UNPACK_SKIP_PIXELS),fi=N.getParameter(N.UNPACK_SKIP_ROWS),kt=N.getParameter(N.UNPACK_SKIP_IMAGES),fs=L.isCompressedTexture?L.mipmaps[te]:L.image;N.pixelStorei(N.UNPACK_ROW_LENGTH,fs.width),N.pixelStorei(N.UNPACK_IMAGE_HEIGHT,fs.height),N.pixelStorei(N.UNPACK_SKIP_PIXELS,Mt),N.pixelStorei(N.UNPACK_SKIP_ROWS,Ct),L.isDataTexture?N.texSubImage2D(N.TEXTURE_2D,te,Kt,an,je,at,Zt,li,fs.data):L.isCompressedTexture?N.compressedTexSubImage2D(N.TEXTURE_2D,te,Kt,an,fs.width,fs.height,Zt,fs.data):N.texSubImage2D(N.TEXTURE_2D,te,Kt,an,je,at,Zt,li,fs),N.pixelStorei(N.UNPACK_ROW_LENGTH,Li),N.pixelStorei(N.UNPACK_IMAGE_HEIGHT,ir),N.pixelStorei(N.UNPACK_SKIP_PIXELS,ca),N.pixelStorei(N.UNPACK_SKIP_ROWS,fi),N.pixelStorei(N.UNPACK_SKIP_IMAGES,kt),0===te&&K.generateMipmaps&&N.generateMipmap(N.TEXTURE_2D),Me.unbindTexture()},this.copyTextureToTexture3D=function(L,K,ce=null,ue=null,te=0){let je,at,Mt,Ct,Kt,an,Zt,li,Li;!0!==L.isTexture&&(cg("WebGLRenderer: copyTextureToTexture3D function signature has changed."),ce=arguments[0]||null,ue=arguments[1]||null,L=arguments[2],K=arguments[3],te=arguments[4]||0);const ir=L.isCompressedTexture?L.mipmaps[te]:L.image;null!==ce?(je=ce.max.x-ce.min.x,at=ce.max.y-ce.min.y,Mt=ce.max.z-ce.min.z,Ct=ce.min.x,Kt=ce.min.y,an=ce.min.z):(je=ir.width,at=ir.height,Mt=ir.depth,Ct=0,Kt=0,an=0),null!==ue?(Zt=ue.x,li=ue.y,Li=ue.z):(Zt=0,li=0,Li=0);const ca=vn.convert(K.format),fi=vn.convert(K.type);let kt;if(K.isData3DTexture)_t.setTexture3D(K,0),kt=N.TEXTURE_3D;else{if(!K.isDataArrayTexture&&!K.isCompressedArrayTexture)return void console.warn("THREE.WebGLRenderer.copyTextureToTexture3D: only supports THREE.DataTexture3D and THREE.DataTexture2DArray.");_t.setTexture2DArray(K,0),kt=N.TEXTURE_2D_ARRAY}N.pixelStorei(N.UNPACK_FLIP_Y_WEBGL,K.flipY),N.pixelStorei(N.UNPACK_PREMULTIPLY_ALPHA_WEBGL,K.premultiplyAlpha),N.pixelStorei(N.UNPACK_ALIGNMENT,K.unpackAlignment);const fs=N.getParameter(N.UNPACK_ROW_LENGTH),pi=N.getParameter(N.UNPACK_IMAGE_HEIGHT),Al=N.getParameter(N.UNPACK_SKIP_PIXELS),qg=N.getParameter(N.UNPACK_SKIP_ROWS),da=N.getParameter(N.UNPACK_SKIP_IMAGES);N.pixelStorei(N.UNPACK_ROW_LENGTH,ir.width),N.pixelStorei(N.UNPACK_IMAGE_HEIGHT,ir.height),N.pixelStorei(N.UNPACK_SKIP_PIXELS,Ct),N.pixelStorei(N.UNPACK_SKIP_ROWS,Kt),N.pixelStorei(N.UNPACK_SKIP_IMAGES,an),L.isDataTexture||L.isData3DTexture?N.texSubImage3D(kt,te,Zt,li,Li,je,at,Mt,ca,fi,ir.data):K.isCompressedArrayTexture?N.compressedTexSubImage3D(kt,te,Zt,li,Li,je,at,Mt,ca,ir.data):N.texSubImage3D(kt,te,Zt,li,Li,je,at,Mt,ca,fi,ir),N.pixelStorei(N.UNPACK_ROW_LENGTH,fs),N.pixelStorei(N.UNPACK_IMAGE_HEIGHT,pi),N.pixelStorei(N.UNPACK_SKIP_PIXELS,Al),N.pixelStorei(N.UNPACK_SKIP_ROWS,qg),N.pixelStorei(N.UNPACK_SKIP_IMAGES,da),0===te&&K.generateMipmaps&&N.generateMipmap(kt),Me.unbindTexture()},this.initRenderTarget=function(L){void 0===rt.get(L).__webglFramebuffer&&_t.setupRenderTarget(L)},this.initTexture=function(L){L.isCubeTexture?_t.setTextureCube(L,0):L.isData3DTexture?_t.setTexture3D(L,0):L.isDataArrayTexture||L.isCompressedArrayTexture?_t.setTexture2DArray(L,0):_t.setTexture2D(L,0),Me.unbindTexture()},this.resetState=function(){F=0,D=0,k=null,Me.reset(),Pn.reset()},typeof __THREE_DEVTOOLS__<"u"&&__THREE_DEVTOOLS__.dispatchEvent(new CustomEvent("observe",{detail:this}))}get coordinateSystem(){return td}get outputColorSpace(){return this._outputColorSpace}set outputColorSpace(t){this._outputColorSpace=t;const e=this.getContext();e.drawingBufferColorSpace=t===Yk?"display-p3":"srgb",e.unpackColorSpace=ei.workingColorSpace===LC?"display-p3":"srgb"}}class Pb extends Fr{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 rd,this.environmentIntensity=1,this.environmentRotation=new rd,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 DP{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=na()}onUploadCallback(){}set needsUpdate(t){!0===t&&this.version++}get updateRange(){return cg("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;r0){const r=e[n[0]];if(void 0!==r){this.morphTargetInfluences=[],this.morphTargetDictionary={};for(let s=0,o=r.length;sn)return;LP.applyMatrix4(i.matrixWorld);const l=t.ray.origin.distanceTo(LP);return lt.far?void 0:{distance:l,point:Z5.clone().applyMatrix4(i.matrixWorld),index:r,face:null,faceIndex:null,object:i}}const Q5=new O,J5=new O;class Ng extends mf{constructor(t,e){super(t,e),this.isLineSegments=!0,this.type="LineSegments"}computeLineDistances(){const t=this.geometry;if(null===t.index){const e=t.attributes.position,n=[];for(let r=0,s=e.count;r0){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 uc{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 d=n[r];return(r+(o-d)/(n[r+1]-d))/(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 xe:new O);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 O,r=[],s=[],o=[],a=new O,l=new Bt;for(let m=0;m<=t;m++)r[m]=this.getTangentAt(m/t,new O);s[0]=new O,o[0]=new O;let c=Number.MAX_VALUE;const d=Math.abs(r[0].x),h=Math.abs(r[0].y),p=Math.abs(r[0].z);d<=c&&(c=d,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(tr(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(tr(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 BP extends uc{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 xe){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(i$(a,l.x,c.x,d.x,h.x),i$(a,l.y,c.y,d.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]:(DS.subVectors(r[0],r[1]).add(r[0]),c=DS);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 d=c.getPoint(1);return this.currentPoint.copy(d),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 RS extends hn{constructor(t=[new xe(0,-.5),new xe(.5,0),new xe(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=tr(r,0,2*Math.PI);const s=[],o=[],a=[],l=[],c=[],d=1/e,h=new O,p=new xe,m=new O,g=new O,b=new O;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*d*r,C=Math.sin(x),F=Math.cos(x);for(let D=0;D<=t.length-1;D++)h.x=t[D].x*C,h.y=t[D].y,h.z=t[D].x*F,o.push(h.x,h.y,h.z),p.x=M/e,p.y=D/(t.length-1),a.push(p.x,p.y),c.push(l[3*D+0]*C,l[3*D+1],l[3*D+0]*F)}for(let M=0;M0&&x(!0),e>0&&x(!1)),this.setIndex(d),this.setAttribute("position",new ht(h,3)),this.setAttribute("normal",new ht(p,3)),this.setAttribute("uv",new ht(m,2))}copy(t){return super.copy(t),this.parameters=Object.assign({},t.parameters),this}static fromJSON(t){return new Bg(t.radiusTop,t.radiusBottom,t.height,t.radialSegments,t.heightSegments,t.openEnded,t.thetaStart,t.thetaLength)}}class PS extends Bg{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 PS(t.radius,t.height,t.radialSegments,t.heightSegments,t.openEnded,t.thetaStart,t.thetaLength)}}class Yb 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 d=[],h=new O,p=new O,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 F=0;F<=e;F++){const D=F/e;h.x=-t*Math.cos(r+D*s)*Math.sin(o+x*a),h.y=t*Math.cos(o+x*a),h.z=t*Math.sin(r+D*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(D+C,1-x),M.push(c++)}d.push(M)}for(let y=0;y0)&&m.push(d[y][M+1],C,D),(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 dispersion(){return this._dispersion}set dispersion(t){this._dispersion>0!=t>0&&this.version++,this._dispersion=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.dispersion=t.dispersion,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 zS extends Fo{constructor(t){super(),this.isMeshPhongMaterial=!0,this.type="MeshPhongMaterial",this.color=new qe(16777215),this.specular=new qe(1118481),this.shininess=30,this.map=null,this.lightMap=null,this.lightMapIntensity=1,this.aoMap=null,this.aoMapIntensity=1,this.emissive=new qe(0),this.emissiveIntensity=1,this.emissiveMap=null,this.bumpMap=null,this.bumpScale=1,this.normalMap=null,this.normalMapType=Jh,this.normalScale=new xe(1,1),this.displacementMap=null,this.displacementScale=1,this.displacementBias=0,this.specularMap=null,this.alphaMap=null,this.envMap=null,this.envMapRotation=new rd,this.combine=EC,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 v$(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 nO(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 iO(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 Xb{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 _$(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}}hc.prototype.TimeBufferType=Float32Array,hc.prototype.ValueBufferType=Float32Array,hc.prototype.DefaultInterpolation=xb;class zg extends hc{constructor(t,e,n){super(t,e,n)}}zg.prototype.ValueTypeName="bool",zg.prototype.ValueBufferType=Array,zg.prototype.DefaultInterpolation=bb,zg.prototype.InterpolantFactoryMethodLinear=void 0,zg.prototype.InterpolantFactoryMethodSmooth=void 0;class b$ extends hc{}b$.prototype.ValueTypeName="color";class Hg extends hc{}Hg.prototype.ValueTypeName="number";class Whe extends Xb{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 d=c+a;c!==d;c+=4)fo.slerpFlat(s,0,o,c-a,o,c,l);return s}}class $g extends hc{InterpolantFactoryMethodLinear(t){return new Whe(this.times,this.values,this.getValueSize(),t)}}$g.prototype.ValueTypeName="quaternion",$g.prototype.InterpolantFactoryMethodSmooth=void 0;class Gg extends hc{constructor(t,e,n){super(t,e,n)}}Gg.prototype.ValueTypeName="string",Gg.prototype.ValueBufferType=Array,Gg.prototype.DefaultInterpolation=bb,Gg.prototype.InterpolantFactoryMethodLinear=void 0,Gg.prototype.InterpolantFactoryMethodSmooth=void 0;class Wg extends hc{}Wg.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=na(),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(Yhe(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(hc.toJSON(n[s]));return r}static CreateFromMorphTargetSequence(t,e,n,r){const s=e.length,o=[];for(let a=0;a1){const h=d[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=[];iO(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:w$,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 ud={};class qhe extends Error{constructor(t,e){super(t),this.response=e}}class Ba extends bf{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=ku.get(t);if(void 0!==s)return this.manager.itemStart(t),setTimeout(()=>{e&&e(s),this.manager.itemEnd(t)},0),s;if(void 0!==ud[t])return void ud[t].push({onLoad:e,onProgress:n,onError:r});ud[t]=[],ud[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 d=ud[t],h=c.body.getReader(),p=c.headers.get("X-File-Size")||c.headers.get("Content-Length"),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 F=new ProgressEvent("progress",{lengthComputable:g,loaded:b,total:m});for(let D=0,k=d.length;D{y.error(x)})}()}});return new Response(v)}throw new qhe(`fetch for "${c.url}" responded with ${c.status}: ${c.statusText}`,c)}).then(c=>{switch(l){case"arraybuffer":return c.arrayBuffer();case"blob":return c.blob();case"document":return c.text().then(d=>(new DOMParser).parseFromString(d,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=>{ku.add(t,c);const d=ud[t];delete ud[t];for(let h=0,p=d.length;h{const d=ud[t];if(void 0===d)throw this.manager.itemError(t),c;delete ud[t];for(let h=0,p=d.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 HS extends bf{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=ku.get(t);if(void 0!==o)return s.manager.itemStart(t),setTimeout(function(){e&&e(o),s.manager.itemEnd(t)},0),o;const a=Mb("img");function l(){d(),ku.add(t,this),e&&e(this),s.manager.itemEnd(t)}function c(h){d(),r&&r(h),s.manager.itemError(t),s.manager.itemEnd(t)}function d(){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 Pu extends bf{constructor(t){super(t)}load(t,e,n,r){const s=new Oo,o=new HS(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 $S extends Fr{constructor(t,e=1){super(),this.isLight=!0,this.type="Light",this.color=new qe(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()),void 0!==this.target&&(e.object.target=this.target.uuid),e}}const rO=new Bt,M$=new O,C$=new O;class sO{constructor(t){this.camera=t,this.intensity=1,this.bias=0,this.normalBias=0,this.radius=1,this.blurSamples=8,this.mapSize=new xe(512,512),this.map=null,this.mapPass=null,this.matrix=new Bt,this.autoUpdate=!0,this.needsUpdate=!1,this._frustum=new aS,this._frameExtents=new xe(1,1),this._viewportCount=1,this._viewports=[new vi(0,0,1,1)]}getViewportCount(){return this._viewportCount}getFrustum(){return this._frustum}updateMatrices(t){const e=this.camera,n=this.matrix;M$.setFromMatrixPosition(t.matrixWorld),e.position.copy(M$),C$.setFromMatrixPosition(t.target.matrixWorld),e.lookAt(C$),e.updateMatrixWorld(),rO.multiplyMatrices(e.projectionMatrix,e.matrixWorldInverse),this._frustum.setFromProjectionMatrix(rO),n.set(.5,0,0,.5,0,.5,0,.5,0,0,.5,.5,0,0,0,1),n.multiply(rO)}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.intensity=t.intensity,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 1!==this.intensity&&(t.intensity=this.intensity),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 Khe extends sO{constructor(){super(new br(50,1,.5,500)),this.isSpotLightShadow=!0,this.focus=1}updateMatrices(t){const e=this.camera,n=2*ag*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 S$ extends $S{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(Fr.DEFAULT_UP),this.updateMatrix(),this.target=new Fr,this.distance=n,this.angle=r,this.penumbra=s,this.decay=o,this.map=null,this.shadow=new Khe}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 E$=new Bt,Zb=new O,oO=new O;class Zhe extends sO{constructor(){super(new br(90,1,.5,500)),this.isPointLightShadow=!0,this._frameExtents=new xe(4,2),this._viewportCount=6,this._viewports=[new vi(2,1,1,1),new vi(0,1,1,1),new vi(3,1,1,1),new vi(1,1,1,1),new vi(3,0,1,1),new vi(1,0,1,1)],this._cubeDirections=[new O(1,0,0),new O(-1,0,0),new O(0,0,1),new O(0,0,-1),new O(0,1,0),new O(0,-1,0)],this._cubeUps=[new O(0,1,0),new O(0,1,0),new O(0,1,0),new O(0,1,0),new O(0,0,1),new O(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()),Zb.setFromMatrixPosition(t.matrixWorld),n.position.copy(Zb),oO.copy(n.position),oO.add(this._cubeDirections[e]),n.up.copy(this._cubeUps[e]),n.lookAt(oO),n.updateMatrixWorld(),r.makeTranslation(-Zb.x,-Zb.y,-Zb.z),E$.multiplyMatrices(n.projectionMatrix,n.matrixWorldInverse),this._frustum.setFromProjectionMatrix(E$)}}class A$ extends $S{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 Zhe}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 Qhe extends sO{constructor(){super(new Rb(-5,5,5,-5,.5,500)),this.isDirectionalLightShadow=!0}}class D$ extends $S{constructor(t,e){super(t,e),this.isDirectionalLight=!0,this.type="DirectionalLight",this.position.copy(Fr.DEFAULT_UP),this.updateMatrix(),this.target=new Fr,this.shadow=new Qhe}dispose(){this.shadow.dispose()}copy(t){return super.copy(t),this.target=t.target.clone(),this.shadow=t.shadow.clone(),this}}class GS extends $S{constructor(t,e){super(t,e),this.isAmbientLight=!0,this.type="AmbientLight"}}class Ou{static decodeText(t){if(console.warn("THREE.LoaderUtils: decodeText() has been deprecated with r165 and will be removed with r175. Use TextDecoder instead."),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=ku.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 ku.add(t,c),e&&e(c),s.manager.itemEnd(t),c}).catch(function(c){r&&r(c),ku.remove(t),s.manager.itemError(t),s.manager.itemEnd(t)});ku.add(t,l),s.manager.itemStart(t)}}class O${constructor(t=!0){this.autoStart=t,this.startTime=0,this.oldTime=0,this.elapsedTime=0,this.running=!1}start(){this.startTime=F$(),this.oldTime=this.startTime,this.elapsedTime=0,this.running=!0}stop(){this.getElapsedTime(),this.running=!1,this.autoStart=!1}getElapsedTime(){return this.getDelta(),this.elapsedTime}getDelta(){let t=0;if(this.autoStart&&!this.running)return this.start(),0;if(this.running){const e=F$();t=(e-this.oldTime)/1e3,this.oldTime=e,this.elapsedTime+=t}return t}}function F$(){return(typeof performance>"u"?Date:performance).now()}const lO="\\[\\]\\.:\\/",cfe=new RegExp("["+lO+"]","g"),cO="[^"+lO+"]",dfe="[^"+lO.replace("\\.","")+"]",mfe=new RegExp("^"+/((?:WC+[\/:])*)/.source.replace("WC",cO)+/(WCOD+)?/.source.replace("WCOD",dfe)+/(?:\.(WC+)(?:\[(.+)\])?)?/.source.replace("WC",cO)+/\.(WC+)(?:\[(.+)\])?/.source.replace("WC",cO)+"$"),gfe=["material","materials","bones","map"];class _fe{constructor(t,e,n){const r=n||Ri.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 Ri=(()=>{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(cfe,"")}static parseTrackName(e){const n=mfe.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!==gfe.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;an.name===t||n.userData.name===t);return e?(e.removeFromParent(),new sa(e)):null}getBoundings(){return(new Vs).setFromObject(this.nativeMesh)}clone(){return new sa(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 Mn&&this.disposeMesh(t)}),this.nativeMesh instanceof Mn&&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 wfe extends sa{get supportsFov(){return this.nativeCamera instanceof br||"PerspectiveCamera"==this.nativeCamera.type}get fov(){return this.nativeCamera.fov||NaN}set fov(t){this.supportsFov&&(this.nativeCamera.fov=t,this.nativeCamera.updateProjectionMatrix())}constructor(t){super(t),this.nativeCamera=t}}class Mfe extends Gse{createMaterial(t){let e={};t.color?e={color:t.color}:t.diffuse||(e={color:super.randomColor()});let n=t.shading||"unlit";switch(n){case"unlit":return new qi(Object.assign(Object.assign({},e),{map:t.diffuse||null}));case"standart":return new qb(Object.assign(Object.assign({},e),{map:t.diffuse||null}));case"phong":return new zS(Object.assign(Object.assign({},e),{map:t.diffuse||null}));case"wireframe":return new qi(Object.assign(Object.assign({},e),{wireframe:!0}));default:throw new Error(`"${n}" shading not implemented for three.js`)}}transformPrimitiveZUp(t){t.geometry.rotateX(Math.PI/2)}createPrimitive(t,e={}){var n,r,s,o;let a=null,l=this.createMaterial(e);switch(t.shape){case"PLANE":a=new Mn(new Iu((null===(n=t.dimensions)||void 0===n?void 0:n.x)||1e4,(null===(r=t.dimensions)||void 0===r?void 0:r.y)||1e4,null===(s=t.segments)||void 0===s?void 0:s.x,null===(o=t.segments)||void 0===o?void 0:o.y),l);break;case"BOX":a=new Mn(new sf(...Re.spr(t.dimensions),...t.segments?Re.spr(t.segments):[]),l);break;case"CAPSULE":a=new Mn(new kS(t.radius,t.centersDistance,t.capSegments,t.radialSegments),l),this.transformPrimitiveZUp(a);break;case"CYLINDER":a=new Mn(new Bg(t.radius,t.radius,t.height,t.radialSegments,t.heightSegments),l),this.transformPrimitiveZUp(a);break;case"CONE":a=new Mn(new PS(t.radius,t.height,t.radialSegments,t.heightSegments),l),this.transformPrimitiveZUp(a);break;case"SPHERE":a=new Mn(new Yb(t.radius,t.widthSegments,t.heightSegments),l),this.transformPrimitiveZUp(a);break;case"COMPOUND":a=new No;for(const{position:d,rotation:h,shape:p}of t.children){const m=this.createPrimitive(p,e).nativeMesh;d&&m.position.set(...Re.spr(d)),h&&m.quaternion.set(...Yi.spr(h)),a.add(m)}break;case"MESH":const c=new hn;c.setFromPoints(t.vertices.map(d=>new O(...Re.spr(d)))),c.setIndex(t.faces.reduce((d,h)=>(d.push(...h),d),[])),a=new Mn(c,l)}if(!a)throw new Error(`Primitive with shape "${t.shape}" not implemented`);return void 0!==e.castShadow&&(a.castShadow=e.castShadow),void 0!==e.receiveShadow&&(a.receiveShadow=e.receiveShadow),new sa(a)}createPerspectiveCamera(t={}){return new wfe(new br(t.fov||75,t.aspectRatio||1,t.frustrum?t.frustrum.near:1,t.frustrum?t.frustrum.far:1e4))}}function Q$(i,t){if(t===Ooe)return console.warn("THREE.BufferGeometryUtils.toTrianglesDrawMode(): Geometry already defined as triangles."),i;if(t===jk||t===C4){let e=i.getIndex();if(null===e){const o=[],a=i.getAttribute("position");if(void 0===a)return console.error("THREE.BufferGeometryUtils.toTrianglesDrawMode(): Undefined position attribute. Processing not possible."),i;for(let l=0;l=2.0 are supported.")));const c=new ipe(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 d=0;d=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 Sfe(){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 Bn={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_DISPERSION:"KHR_materials_dispersion",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 Efe{constructor(t){this.parser=t,this.name=Bn.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 Vfe{constructor(t){this.parser=t,this.name=Bn.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 zfe{constructor(t){this.parser=t,this.name=Bn.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 Hfe{constructor(t){this.name=Bn.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 d=r.count,h=r.byteStride,p=new Uint8Array(a,r.byteOffset||0,r.byteLength||0);return o.decodeGltfBufferAsync?o.decodeGltfBufferAsync(d,h,p,r.mode,r.filter).then(function(m){return m.buffer}):o.ready.then(function(){const m=new ArrayBuffer(d*h);return o.decodeGltfBuffer(new Uint8Array(m),d,h,p,r.mode,r.filter),m})})}return null}}class $fe{constructor(t){this.name=Bn.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!==Ua.TRIANGLES&&c.mode!==Ua.TRIANGLE_STRIP&&c.mode!==Ua.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(d=>(l[c]=d,l[c])));return a.length<1?null:(a.push(this.parser.createNodeMesh(t)),Promise.all(a).then(c=>{const d=c.pop(),h=d.isGroup?d.children:[d],p=c[0].count,m=[];for(const g of h){const b=new Bt,v=new O,y=new fo,M=new O(1,1,1),x=new Y5(g.geometry,g.material,p);for(let C=0;C-1,o=s?a.match(/Firefox\/([0-9]+)\./)[1]:-1}this.textureLoader=typeof createImageBitmap>"u"||n&&r<17||s&&o<98?new Pu(this.options.manager):new sfe(this.options.manager),this.textureLoader.setCrossOrigin(this.options.crossOrigin),this.textureLoader.setRequestHeader(this.options.requestHeader),this.fileLoader=new Ba(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 Ef(s,a,r),hd(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,d]of o.children.entries())s(d,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(T,D[k*l+1]),l>=3&&v.setZ(T,D[k*l+2]),l>=4&&v.setW(T,D[k*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(d){d.flipY=!1,d.name=o.name||a.name||"",""===d.name&&"string"==typeof a.uri&&!1===a.uri.startsWith("data:image/")&&(d.name=a.uri);const p=(s.samplers||{})[o.sampler]||{};return d.magFilter=nG[p.magFilter]||cr,d.minFilter=nG[p.minFilter]||xl,d.wrapS=iG[p.wrapS]||Bs,d.wrapT=iG[p.wrapT]||Bs,r.associations.set(d,{textures:t}),d}).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 d=Promise.resolve(l).then(function(h){return new Promise(function(p,m){let g=p;!0===e.isImageBitmapLoader&&(g=function(b){const v=new Oo(b);v.needsUpdate=!0,p(v)}),e.load(Ou.resolveURL(h,s.path),g,void 0,m)})}).then(function(h){return!0===c&&a.revokeObjectURL(l),hd(h,o),h.userData.mimeType=o.mimeType||function tpe(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]=d,d}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[Bn.KHR_TEXTURE_TRANSFORM]){const a=void 0!==n.extensions?n.extensions[Bn.KHR_TEXTURE_TRANSFORM]:void 0;if(a){const l=s.associations.get(o);o=s.extensions[Bn.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,Fo.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 us,Fo.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 qb}loadMaterial(t){const e=this,r=this.extensions,s=this.json.materials[t];let o;const a={},c=[];if((s.extensions||{})[Bn.KHR_MATERIALS_UNLIT]){const h=r[Bn.KHR_MATERIALS_UNLIT];o=h.getMaterialType(),c.push(h.extendParams(a,s,e))}else{const h=s.pbrMetallicRoughness||{};if(a.color=new qe(1,1,1),a.opacity=1,Array.isArray(h.baseColorFactor)){const p=h.baseColorFactor;a.color.setRGB(p[0],p[1],p[2],ds),a.opacity=p[3]}void 0!==h.baseColorTexture&&c.push(e.assignTexture(a,"map",h.baseColorTexture,cs)),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=Ns);const d=s.alphaMode||"OPAQUE";if("BLEND"===d?(a.transparent=!0,a.depthWrite=!1):(a.transparent=!1,"MASK"===d&&(a.alphaTest=void 0!==s.alphaCutoff?s.alphaCutoff:.5)),void 0!==s.normalTexture&&o!==qi&&(c.push(e.assignTexture(a,"normalMap",s.normalTexture)),a.normalScale=new xe(1,1),void 0!==s.normalTexture.scale)){const h=s.normalTexture.scale;a.normalScale.set(h,h)}if(void 0!==s.occlusionTexture&&o!==qi&&(c.push(e.assignTexture(a,"aoMap",s.occlusionTexture)),void 0!==s.occlusionTexture.strength&&(a.aoMapIntensity=s.occlusionTexture.strength)),void 0!==s.emissiveFactor&&o!==qi){const h=s.emissiveFactor;a.emissive=(new qe).setRGB(h[0],h[1],h[2],ds)}return void 0!==s.emissiveTexture&&o!==qi&&c.push(e.assignTexture(a,"emissiveMap",s.emissiveTexture,cs)),Promise.all(c).then(function(){const h=new o(a);return s.name&&(h.name=s.name),hd(h,s),e.associations.set(h,{materials:t}),s.extensions&&Ef(r,h,s),h})}createUniqueName(t){const e=Ri.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[Bn.KHR_DRACO_MESH_COMPRESSION].decodePrimitive(a,e).then(function(l){return rG(l,a,e)})}const o=[];for(let a=0,l=t.length;a0&&Jfe(y,s),y.name=e.createUniqueName(s.name||"mesh_"+t),hd(y,s),v.extensions&&Ef(r,y,v),e.assignFinalMaterial(y),h.push(y)}for(let m=0,g=h.length;m1?new No:1===c.length?c[0]:new Fr,d!==c[0])for(let h=0,p=c.length;h{const h=new Map;for(const[p,m]of r.associations)(p instanceof Fo||p instanceof Oo)&&h.set(p,m);return d.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(Lu[s.path]===Lu.weights?t.traverse(function(p){p.morphTargetInfluences&&l.push(p.name?p.name:p.uuid)}):l.push(a),Lu[s.path]){case Lu.weights:c=Hg;break;case Lu.rotation:c=$g;break;case Lu.position:case Lu.scale:c=Wg;break;default:c=1===n.itemSize?Hg:Wg}const d=void 0!==r.interpolation?Kfe[r.interpolation]:xb,h=this._getArrayFromAccessor(n);for(let p=0,m=l.length;p{r.type.endsWith("Light")&&(console.warn("WORKAROUND: light intensity from GLB divided by 200."),r.intensity*=.005)}),new sa(n.scene)})}}const go=(i,t)=>Array(i).fill(null).map((e,n)=>t(n));class Af{static startDebugView(t,e){let n=this.activeDebugViews.get(t);return n?n.renderers.includes(e)||n.renderers.push(e):(n={view:new Af(t),renderers:[e]},this.activeDebugViews.set(t,n)),n.view}static stopDebugView(t,e){const n=t.world,r=this.activeDebugViews.get(n);r&&(r.renderers=r.renderers.filter(s=>s!==e),0===r.renderers.length&&(r.view.dispose(),this.activeDebugViews.delete(n)))}constructor(t){this.world=t,this.debugScene=null,this.aSub=null,this.rSub=null,this.syncMap=new Map,this.debugScene=new Pb;const e=n=>{var r,s;const o=n.debugBodySettings;let c,l=this.lineSegmentPointsForShape(o.shape);c=l?new Ng((new hn).setFromPoints(l)):null===(r=this.world)||void 0===r?void 0:r.visualScene.factory.createPrimitive(o.shape,{shading:"wireframe",color:0}).nativeMesh,this.syncMap.set(n,c),null===(s=this.debugScene)||void 0===s||s.add(c)};for(const n of this.world.physicsWorld.children)e(n);this.aSub=this.world.physicsWorld.added$.subscribe(n=>e(n)),this.rSub=this.world.physicsWorld.removed$.subscribe(n=>{var r;const s=this.syncMap.get(n);s&&(this.syncMap.delete(n),null===(r=this.debugScene)||void 0===r||r.remove(s))})}get scene(){return this.debugScene}render(t,e){for(const[r,s]of this.syncMap.entries()){const o=r.debugBodySettings;if(o.ignoreTransform||(s.position.set(...Re.spr(r.position)),s.quaternion.set(...Yi.spr(r.rotation))),s.material){let a=16777215;switch(o.type){case"RIGID_DYNAMIC":a=o.sleeping?255:16711680;break;case"RIGID_STATIC":a=65280;break;case"TRIGGER":a=16776960}s.material.color.set(a),s.material.needsUpdate=!0}}const n=t.autoClearColor;n&&(t.autoClearColor=!1),t.render(this.debugScene,e),n&&(t.autoClearColor=!0)}lineSegmentPointsForShape(t){if("BOX"===t.shape){const e=Re.scalarMult(t.dimensions,.5);return[...go(8,n=>new O(n<4?e.x:-e.x,n%4<2?e.y:-e.y,n%2?e.z:-e.z)),...go(8,n=>new O(n%2?e.x:-e.x,n<4?e.y:-e.y,n%4<2?e.z:-e.z)),...go(8,n=>new O(n%4<2?e.x:-e.x,n%2?e.y:-e.y,n<4?e.z:-e.z))]}if("CYLINDER"===t.shape)return[...go(32,e=>new O(t.radius*Math.sin(Math.floor((e+1)/2)*Math.PI/8),t.radius*Math.cos(Math.floor((e+1)/2)*Math.PI/8),-t.height/2)),...go(32,e=>new O(t.radius*Math.sin(Math.floor((e+1)/2)*Math.PI/8),t.radius*Math.cos(Math.floor((e+1)/2)*Math.PI/8),t.height/2)),...go(8,e=>new O(Math.floor(e/2)%2?0:e<4?t.radius:-t.radius,Math.floor(e/2)%2?e<4?t.radius:-t.radius:0,e%2?t.height/2:-t.height/2)),new O(0,0,-t.height/2),new O(0,0,t.height/2)];if("CONE"===t.shape)return[...go(32,e=>new O(t.radius*Math.sin(Math.floor((e+1)/2)*Math.PI/8),t.radius*Math.cos(Math.floor((e+1)/2)*Math.PI/8),-t.height/2)),...go(8,e=>new O(e%2||Math.floor(e/2)%2?0:e<4?t.radius:-t.radius,e%2?0:Math.floor(e/2)%2?e<4?t.radius:-t.radius:0,e%2?t.height/2:-t.height/2)),new O(0,0,-t.height/2),new O(0,0,t.height/2)];if("SPHERE"===t.shape)return[...go(32,e=>new O(t.radius*Math.sin(Math.floor((e+1)/2)*Math.PI/8),t.radius*Math.cos(Math.floor((e+1)/2)*Math.PI/8),0)),...go(32,e=>new O(t.radius*Math.sin(Math.floor((e+1)/2)*Math.PI/8),0,t.radius*Math.cos(Math.floor((e+1)/2)*Math.PI/8))),...go(32,e=>new O(0,t.radius*Math.sin(Math.floor((e+1)/2)*Math.PI/8),t.radius*Math.cos(Math.floor((e+1)/2)*Math.PI/8)))];if("CAPSULE"===t.shape)return[...this.lineSegmentPointsForShape({shape:"CYLINDER",radius:t.radius,height:t.centersDistance}),...go(16,e=>new O(t.radius*Math.cos(Math.floor((e+1)/2)*Math.PI/8),0,t.radius*Math.sin(Math.floor((e+1)/2)*Math.PI/8)+t.centersDistance/2)),...go(16,e=>new O(t.radius*Math.cos(Math.floor((e+1)/2)*Math.PI/8),0,-t.radius*Math.sin(Math.floor((e+1)/2)*Math.PI/8)-t.centersDistance/2)),...go(16,e=>new O(0,t.radius*Math.cos(Math.floor((e+1)/2)*Math.PI/8),t.radius*Math.sin(Math.floor((e+1)/2)*Math.PI/8)+t.centersDistance/2)),...go(16,e=>new O(0,t.radius*Math.cos(Math.floor((e+1)/2)*Math.PI/8),-t.radius*Math.sin(Math.floor((e+1)/2)*Math.PI/8)-t.centersDistance/2))];if("CONVEX_HULL"===t.shape)return[...t.vertices.map(n=>[new O(n.x-.05,n.y,n.z),new O(n.x+.05,n.y,n.z),new O(n.x,n.y-.05,n.z),new O(n.x,n.y+.05,n.z),new O(n.x,n.y,n.z-.05),new O(n.x,n.y,n.z+.05)]).reduce((n,r)=>(n.push(...r),n),[])];if("COMPOUND"===t.shape){const e=[];for(const{position:n,shape:r,rotation:s}of t.children){let o=this.lineSegmentPointsForShape(r);if(!o)return null;e.push(...o.map(a=>new O(...Re.spr(Re.add(n||Re.O,Re.rot(a,s||Yi.O))))))}return e}return null}dispose(){var t,e;this.debugScene=null,null===(t=this.aSub)||void 0===t||t.unsubscribe(),null===(e=this.rSub)||void 0===e||e.unsubscribe(),this.syncMap=new Map}}Af.activeDebugViews=new Map;class sG extends Lse{get physicsDebugViewActive(){return this._physicsDebugViewActive}set physicsDebugViewActive(t){this._physicsDebugViewActive!=t&&(this._physicsDebugViewActive=t,this.world&&(t?this.debugView=Af.startDebugView(this.world,this):(Af.stopDebugView(this.debugView,this),this.debugView=null)))}constructor(t,e,n,r={}){super(t,n,r),this.scene=t,this.camera=e,this.canvas=n,this.world=null,this.debugView=null,this._physicsDebugViewActive=!1,this.nativeRenderer=new Uue(Object.assign({canvas:n,alpha:this.rendererOptions.transparent},this.rendererOptions)),this.nativeRenderer.shadowMap.enabled=!0,this.nativeRenderer.setClearColor(this.rendererOptions.background),this.nativeRenderer.shadowMap.type=c4,this.nativeRenderer.setPixelRatio(this.rendererOptions.forceResolution||devicePixelRatio)}addToWorld(t){this.world=t,this.physicsDebugViewActive&&(this.debugView=Af.startDebugView(this.world,this))}removeFromWorld(t){this.physicsDebugViewActive&&(Af.stopDebugView(this.debugView,this),this.debugView=null),this.world=null}resizeRenderer(t){this.nativeRenderer.setSize(t.x,t.y),(this.camera.nativeCamera instanceof br||"PerspectiveCamera"==this.camera.nativeCamera.type)&&Math.abs(this.camera.nativeCamera.aspect-t.x/t.y)>.01&&(this.camera.nativeCamera.aspect=t.x/t.y,this.camera.nativeCamera.updateProjectionMatrix())}render(){this.nativeRenderer.render(this.scene.nativeScene,this.camera.nativeCamera),this.physicsDebugViewActive&&this.debugView.render(this.nativeRenderer,this.camera.nativeCamera)}dispose(){this.camera.dispose(),this.nativeRenderer.clear(),this.nativeRenderer.dispose(),this.nativeRenderer.domElement=null}}const ape={name:"CopyShader",uniforms:{tDiffuse:{value:null},opacity:{value:1}},vertexShader:"\n\n\t\tvarying vec2 vUv;\n\n\t\tvoid main() {\n\n\t\t\tvUv = uv;\n\t\t\tgl_Position = projectionMatrix * modelViewMatrix * vec4( position, 1.0 );\n\n\t\t}",fragmentShader:"\n\n\t\tuniform float opacity;\n\n\t\tuniform sampler2D tDiffuse;\n\n\t\tvarying vec2 vUv;\n\n\t\tvoid main() {\n\n\t\t\tvec4 texel = texture2D( tDiffuse, vUv );\n\t\t\tgl_FragColor = opacity * texel;\n\n\n\t\t}"};class QS{constructor(){this.isPass=!0,this.enabled=!0,this.needsSwap=!0,this.clear=!1,this.renderToScreen=!1}setSize(){}render(){console.error("THREE.Pass: .render() must be implemented in derived pass.")}dispose(){}}const lpe=new Rb(-1,1,1,-1,0,1),dpe=new class cpe extends hn{constructor(){super(),this.setAttribute("position",new ht([-1,3,0,-1,-1,0,3,-1,0],3)),this.setAttribute("uv",new ht([0,2,0,0,2,0],2))}};class upe{constructor(t){this._mesh=new Mn(dpe,t)}dispose(){this._mesh.geometry.dispose()}render(t){t.render(this._mesh,lpe)}get material(){return this._mesh.material}set material(t){this._mesh.material=t}}class hpe extends QS{constructor(t,e){super(),this.textureID=void 0!==e?e:"tDiffuse",t instanceof Sl?(this.uniforms=t.uniforms,this.material=t):t&&(this.uniforms=Q4.clone(t.uniforms),this.material=new Sl({name:void 0!==t.name?t.name:"unspecified",defines:Object.assign({},t.defines),uniforms:this.uniforms,vertexShader:t.vertexShader,fragmentShader:t.fragmentShader})),this.fsQuad=new upe(this.material)}render(t,e,n){this.uniforms[this.textureID]&&(this.uniforms[this.textureID].value=n.texture),this.fsQuad.material=this.material,this.renderToScreen?(t.setRenderTarget(null),this.fsQuad.render(t)):(t.setRenderTarget(e),this.clear&&t.clear(t.autoClearColor,t.autoClearDepth,t.autoClearStencil),this.fsQuad.render(t))}dispose(){this.material.dispose(),this.fsQuad.dispose()}}class oG extends QS{constructor(t,e){super(),this.scene=t,this.camera=e,this.clear=!0,this.needsSwap=!1,this.inverse=!1}render(t,e,n){const r=t.getContext(),s=t.state;let o,a;s.buffers.color.setMask(!1),s.buffers.depth.setMask(!1),s.buffers.color.setLocked(!0),s.buffers.depth.setLocked(!0),this.inverse?(o=0,a=1):(o=1,a=0),s.buffers.stencil.setTest(!0),s.buffers.stencil.setOp(r.REPLACE,r.REPLACE,r.REPLACE),s.buffers.stencil.setFunc(r.ALWAYS,o,4294967295),s.buffers.stencil.setClear(a),s.buffers.stencil.setLocked(!0),t.setRenderTarget(n),this.clear&&t.clear(),t.render(this.scene,this.camera),t.setRenderTarget(e),this.clear&&t.clear(),t.render(this.scene,this.camera),s.buffers.color.setLocked(!1),s.buffers.depth.setLocked(!1),s.buffers.color.setMask(!0),s.buffers.depth.setMask(!0),s.buffers.stencil.setLocked(!1),s.buffers.stencil.setFunc(r.EQUAL,1,4294967295),s.buffers.stencil.setOp(r.KEEP,r.KEEP,r.KEEP),s.buffers.stencil.setLocked(!0)}}class fpe extends QS{constructor(){super(),this.needsSwap=!1}render(t){t.state.buffers.stencil.setLocked(!1),t.state.buffers.stencil.setTest(!1)}}class ppe{constructor(t,e){if(this.renderer=t,this._pixelRatio=t.getPixelRatio(),void 0===e){const n=t.getSize(new xe);this._width=n.width,this._height=n.height,(e=new Mu(this._width*this._pixelRatio,this._height*this._pixelRatio,{type:Jm})).texture.name="EffectComposer.rt1"}else this._width=e.width,this._height=e.height;this.renderTarget1=e,this.renderTarget2=e.clone(),this.renderTarget2.texture.name="EffectComposer.rt2",this.writeBuffer=this.renderTarget1,this.readBuffer=this.renderTarget2,this.renderToScreen=!0,this.passes=[],this.copyPass=new hpe(ape),this.copyPass.material.blending=Jc,this.clock=new O$}swapBuffers(){const t=this.readBuffer;this.readBuffer=this.writeBuffer,this.writeBuffer=t}addPass(t){this.passes.push(t),t.setSize(this._width*this._pixelRatio,this._height*this._pixelRatio)}insertPass(t,e){this.passes.splice(e,0,t),t.setSize(this._width*this._pixelRatio,this._height*this._pixelRatio)}removePass(t){const e=this.passes.indexOf(t);-1!==e&&this.passes.splice(e,1)}isLastEnabledPass(t){for(let e=t+1;e0?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;lG.fromArray(r,t),bO.fromArray(r,e),cG.fromArray(r,n),Va.subVectors(cG,bO),dG.subVectors(lG,bO),Va.cross(dG),Va.normalize(),s.push(Va.x,Va.y,Va.z),s.push(Va.x,Va.y,Va.z),s.push(Va.x,Va.y,Va.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 d=this.vertices.length;let h=this.parseVertexIndex(t,d),p=this.parseVertexIndex(e,d),m=this.parseVertexIndex(n,d);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?(JS.setRGB(parseFloat(h[4]),parseFloat(h[5]),parseFloat(h[6])).convertSRGBToLinear(),e.colors.push(JS.r,JS.g,JS.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"===d){const p=c.slice(1).trim().split(aG),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 No;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 ht(d.normals,3)),d.colors.length>0&&(g=!0,b.setAttribute("color",new ht(d.colors,3))),!0===d.hasUVIndices&&b.setAttribute("uv",new ht(d.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 ht(e.vertices,3)),e.colors.length>0&&void 0!==e.colors[0]&&(l.setAttribute("color",new ht(e.colors,3)),a.vertexColors=!0);const c=new zb(l,a);s.add(c)}return s}}class xO extends bf{constructor(t){super(t)}load(t,e,n,r){const s=this,o=""===this.path?Ou.extractUrlBase(t):this.path,a=new Ba(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,d):c;h=h.toLowerCase();let p=d>=0?c.substring(d+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 Mpe(this.resourcePath||e,this.materialOptions);return a.setCrossOrigin(this.crossOrigin),a.setManager(this.manager),a.setMaterials(o),a}}class Mpe{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:lc,this.wrap=void 0!==this.options.wrap?this.options.wrap:Bs}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),d=e.loadTexture(function s(a,l){return"string"!=typeof l||""===l?"":/^https?:\/\//i.test(l)?l:a+l}(e.baseUrl,c.url));d.repeat.copy(c.scale),d.offset.copy(c.offset),d.wrapS=e.wrap,d.wrapT=e.wrap,("map"===a||"emissiveMap"===a)&&(d.colorSpace=cs),r[a]=d}for(const a in n){const l=n[a];let c;if(""!==l)switch(a.toLowerCase()){case"kd":r.color=(new qe).fromArray(l).convertSRGBToLinear();break;case"ks":r.specular=(new qe).fromArray(l).convertSRGBToLinear();break;case"ke":r.emissive=(new qe).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 zS(r),this.materials[t]}getTextureParams(t,e){const n={scale:new xe(1,1),offset:new xe(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:w$;let a=o.getHandler(t);null===a&&(a=new Pu(o)),a.setCrossOrigin&&a.setCrossOrigin(this.crossOrigin);const l=a.load(t,n,r,s);return void 0!==e&&(l.mapping=e),l}}const Cpe=["determinateSpinner"];function Spe(i,t){if(1&i&&(ki(),G(0,"svg",11),Ie(1,"circle",12),j()),2&i){const e=re();It("viewBox",e._viewBox()),V(1),qo("stroke-dasharray",e._strokeCircumference(),"px")("stroke-dashoffset",e._strokeCircumference()/2,"px")("stroke-width",e._circleStrokeWidth(),"%"),It("r",e._circleRadius())}}const Epe=Jy(class{constructor(i){this._elementRef=i}},"primary"),Ape=new me("mat-progress-spinner-default-options",{providedIn:"root",factory:function Dpe(){return{diameter:uG}}}),uG=100;let e0=(()=>{class i extends Epe{constructor(e,n,r){super(e),this.mode="mat-spinner"===this._elementRef.nativeElement.nodeName.toLowerCase()?"indeterminate":"determinate",this._value=0,this._diameter=uG,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,Ps(e)))}get diameter(){return this._diameter}set diameter(e){this._diameter=Ps(e)}get strokeWidth(){return this._strokeWidth??this.diameter/10}set strokeWidth(e){this._strokeWidth=Ps(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)(E(vt),E(kr,8),E(Ape))},i.\u0275cmp=ot({type:i,selectors:[["mat-progress-spinner"],["mat-spinner"]],viewQuery:function(e,n){if(1&e&&$n(Cpe,5),2&e){let r;At(r=Dt())&&(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&&(It("aria-valuemin",0)("aria-valuemax",100)("aria-valuenow","determinate"===n.mode?n.value:null)("mode",n.mode),qo("width",n.diameter,"px")("height",n.diameter,"px"),ln("_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:[dt],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&&(fe(0,Spe,2,8,"ng-template",null,0,zc),G(2,"div",1,2),ki(),G(4,"svg",3),Ie(5,"circle",4),j()(),ya(),G(6,"div",5)(7,"div",6)(8,"div",7),sy(9,8),j(),G(10,"div",9),sy(11,8),j(),G(12,"div",10),sy(13,8),j()()()),2&e){const r=Zi(1);V(4),It("viewBox",n._viewBox()),V(1),qo("stroke-dasharray",n._strokeCircumference(),"px")("stroke-dashoffset",n._strokeDashOffset(),"px")("stroke-width",n._circleStrokeWidth(),"%"),It("r",n._circleRadius()),V(4),U("ngTemplateOutlet",r),V(2),U("ngTemplateOutlet",r),V(2),U("ngTemplateOutlet",r)}},dependencies:[xy],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})(),Ipe=(()=>{class i{}return i.\u0275fac=function(e){return new(e||i)},i.\u0275mod=en({type:i}),i.\u0275inj=Wt({imports:[co,Jn]}),i})();const Rpe=["previewCanvasContainer"],kpe=["previewCanvas"];function Ppe(i,t){if(1&i){const e=jn();Gr(0),G(1,"label",11),Be(2),j(),G(3,"input",12),Oe("change",function(r){Vt(e);const s=re().$implicit;return s.value=r.currentTarget.checked,Et(s.change(s.value))}),j(),Wr()}if(2&i){const e=re(),n=e.index,r=e.$implicit,s=re().index;V(1),U("for","custom_control_"+s+"_"+n),V(1),ui(r.label),V(1),U("id","custom_control_"+s+"_"+n)("type",r.type)("checked",r.value)}}function Ope(i,t){if(1&i){const e=jn();G(0,"div",9)(1,"label",11),Be(2),j(),G(3,"input",14),Oe("change",function(){const s=Vt(e).$implicit,o=re(2).$implicit;return o.value=s,Et(o.change(o.value))}),j()()}if(2&i){const e=t.$implicit,n=re(2),r=n.index,s=n.$implicit,o=re().index;V(1),U("for","custom_control_"+o+"_"+r+"_"+e),V(1),ui(e),V(1),U("id","custom_control_"+o+"_"+r+"_"+e)("checked",s.value===e)}}function Fpe(i,t){if(1&i&&(G(0,"div",13)(1,"label"),Be(2),j(),fe(3,Ope,4,4,"div",8),j()),2&i){const e=re().$implicit;V(2),ui(e.label),V(1),U("ngForOf",e.options)}}function Lpe(i,t){if(1&i){const e=jn();Gr(0),G(1,"label",11),Be(2),j(),G(3,"input",15),Oe("colorChange",function(r){Vt(e);const s=re().$implicit,o=re(2);return s.value=o.toRGB(r.value),Et(s.change(s.value))}),j(),Ie(4,"ngx-mat-color-toggle",16)(5,"ngx-mat-color-picker",null,17),Wr()}if(2&i){const e=Zi(6),n=re(),r=n.index,s=n.$implicit,o=re().index;V(1),U("for","custom_control_"+o+"_"+r),V(1),ui(s.label),V(1),U("ngxMatColorPicker",e),V(1),U("for",e)}}function Npe(i,t){if(1&i){const e=jn();Gr(0),G(1,"label",11),Be(2),j(),G(3,"input",18),Oe("change",function(r){Vt(e);const s=re().$implicit;return s.value=r.currentTarget.value,Et(s.change(s.value))}),j(),Wr()}if(2&i){const e=re(),n=e.index,r=e.$implicit,s=re().index;V(1),U("for","custom_control_"+s+"_"+n),V(1),ui(r.label),V(1),U("id","custom_control_"+s+"_"+n)("min",r.minValue)("max",r.maxValue)("step",r.valueStep)("value",r.value)}}function Bpe(i,t){if(1&i&&(G(0,"div",9),fe(1,Ppe,4,5,"ng-container",6),fe(2,Fpe,4,2,"div",10),fe(3,Lpe,7,4,"ng-container",6),fe(4,Npe,4,7,"ng-container",6),j()),2&i){const e=t.$implicit;V(1),U("ngIf","checkbox"===e.type),V(1),U("ngIf","radio"===e.type),V(1),U("ngIf","color"===e.type),V(1),U("ngIf","slider"===e.type)}}function Upe(i,t){if(1&i&&(Gr(0),G(1,"h4"),Be(2),j(),fe(3,Bpe,5,4,"div",8),Wr()),2&i){const e=t.$implicit;V(2),ui(e.title),V(1),U("ngForOf",e.controls)}}function Vpe(i,t){if(1&i){const e=jn();G(0,"div",9)(1,"label",11),Be(2),j(),G(3,"input",19),Oe("change",function(r){return Et(Vt(e).$implicit.visible=r.currentTarget.checked)}),j()()}if(2&i){const e=t.$implicit;V(1),U("for","visibility_"+e.name),V(1),ui(e.name),V(1),U("id","visibility_"+e.name)("checked",e.visible)}}function zpe(i,t){if(1&i&&(Gr(0),G(1,"h4"),Be(2,"Objects visibility"),j(),fe(3,Vpe,4,4,"div",8),Wr()),2&i){const e=re();V(3),U("ngForOf",e.meshes)}}function Hpe(i,t){1&i&&Ie(0,"mat-spinner",20)}const oa=i=>{i.colorSpace="srgb",i.anisotropy=8,i.magFilter=vr,i.minFilter=vr};let hG=(()=>{class i{constructor(e){this.cdr=e,this.visibilityControls=!0,this.groupFunction=null,this.customControls=[],this.onObjectLoaded=new $e,this._paths$=new Qe(null),this.destroyed$=new Te,this.entity=null,this.meshes=[]}get paths(){return this._paths$.getValue()}set paths(e){this._paths$.next(e)}ngAfterViewInit(){var e=this;return nt(function*(){var s;e.world=new ok(new yO,{init:(s=nt(function*(){}),function(){return s.apply(this,arguments)}),simulate:()=>{}}),yield e.world.init(),e.world.visualScene.nativeScene.add(new GS(16777215,2));let n=new Qe({x:1,y:1});e.renderer=e.world.addRenderer(e.world.visualScene.factory.createPerspectiveCamera({frustrum:{near:.01,far:1e4}}),e.previewCanvas.nativeElement,{size:n.asObservable(),background:11184810}),e.controller=new Hse(e.renderer,{mouseOptions:{canvas:e.previewCanvas.nativeElement},orbiting:{sensitivityX:2,sensitivityY:2},orbitingElasticity:30}),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(Ue(e.destroyed$)).subscribe(function(){var s=nt(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 Jb,h=yield(new xO).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 No;y.add(...b[v]),y.name=v,p.remove(...b[v]),p.add(y)}}e.meshes=p.children,e.meshes.sort((b,v)=>b.name>v.name?1:-1),p.traverse(b=>{if(b instanceof Mn){const v=b.material instanceof Array?b.material:[b.material];for(const y of v)y.transparent=!0,y.alphaTest=.5,y instanceof qi&&y.map&&(y.map.wrapS=er,y.map.wrapT=er,oa(y.map),y.map.needsUpdate=!0)}}),e.onObjectLoaded.next(p),e.entity=new ea({object3D:new sa(p)}),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=Re.scalarMult(Re.add(m.min,m.max),.5),e.controller.spherical={phi:1.22,theta:-1.32,radius:Re.dist(m.min,m.max)},e.cdr.markForCheck()}});return function(o){return s.apply(this,arguments)}}())})()}toRGB(e){return(e?.r||0)<<16|(e?.g||0)<<8|(e?.b||0)}ngOnDestroy(){this.destroyed$.next(),this.destroyed$.complete()}}return i.\u0275fac=function(e){return new(e||i)(E(Qn))},i.\u0275cmp=ot({type:i,selectors:[["app-obj-viewer"]],viewQuery:function(e,n){if(1&e&&($n(Rpe,5),$n(kpe,5)),2&e){let r;At(r=Dt())&&(n.previewCanvasContainer=r.first),At(r=Dt())&&(n.previewCanvas=r.first)}},inputs:{paths:"paths",visibilityControls:"visibilityControls",groupFunction:"groupFunction",customControls:"customControls"},outputs:{onObjectLoaded:"onObjectLoaded"},decls:8,vars:3,consts:[[1,"previewCanvasContainer"],["previewCanvasContainer",""],["width","640","height","480"],["previewCanvas",""],["id","controls"],[4,"ngFor","ngForOf"],[4,"ngIf"],["mode","indeterminate",4,"ngIf"],["class","controls-list",4,"ngFor","ngForOf"],[1,"controls-list"],["style","width: 100%",4,"ngIf"],[3,"for"],[3,"id","type","checked","change"],[2,"width","100%"],["type","radio",3,"id","checked","change"],["matInput","",1,"hidden",3,"ngxMatColorPicker","colorChange"],["matSuffix","",3,"for"],["picker",""],["type","range",3,"id","min","max","step","value","change"],["type","checkbox",3,"id","checked","change"],["mode","indeterminate"]],template:function(e,n){1&e&&(G(0,"div",0,1),Ie(2,"canvas",2,3),G(4,"div",4),fe(5,Upe,4,2,"ng-container",5),fe(6,zpe,4,1,"ng-container",6),j(),fe(7,Hpe,1,0,"mat-spinner",7),j()),2&e&&(V(5),U("ngForOf",n.customControls),V(1),U("ngIf",n.visibilityControls),V(1),U("ngIf",!n.entity))},dependencies:[lo,_i,Xte,rc,e0,jie,bC,NH],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%] > h4[_ngcontent-%COMP%]{margin:0}.previewCanvasContainer[_ngcontent-%COMP%] #controls[_ngcontent-%COMP%] .controls-list[_ngcontent-%COMP%]{width:100%;display:flex;-webkit-user-select:none;user-select:none;align-items:center}.previewCanvasContainer[_ngcontent-%COMP%] #controls[_ngcontent-%COMP%] .controls-list[_ngcontent-%COMP%] > span[_ngcontent-%COMP%]{flex-grow:1}.previewCanvasContainer[_ngcontent-%COMP%] #controls[_ngcontent-%COMP%] .controls-list[_ngcontent-%COMP%] > label[_ngcontent-%COMP%]{flex-grow:1}"],changeDetection:0}),i})();function $pe(i,t){if(1&i){const e=jn();ki(),G(0,"circle",5),Oe("mousedown",function(r){return Vt(e),Et(re().startDrag(r))}),ct(1,"async"),ct(2,"async"),j()}if(2&i){const e=re();let n,r;It("cx",(null==(n=ut(1,3,e.mapPointer$))?null:n.x)||0)("cy",(null==(r=ut(2,5,e.mapPointer$))?null:r.y)||0)("r",10)}}const Gpe=function(){return{"stroke-width":3}};let fG=(()=>{class i{constructor(e){this.ref=e,this._roadSpline$=new Qe([]),this._pointer$=new Qe(null),this._projection$=new Qe("nz"),this._roadSplineProjected$=new Qe([]),this._pointerProjected$=new Qe(yi.O),this.splineClosed=!1,this.pointerChange=new $e,this.svgSize$=new Qe({x:100,y:100}),this.scalingSquare$=new Qe({x:0,y:0,width:100,height:100}),this.mapPolyline$=new Qe(""),this.mapPointer$=new Qe(null),this.isShiftPressed=!1,this.destroyed$=new Te,this.isDragging=!1}set roadSpline(e){this._roadSpline$.next(e)}set pointer(e){this._pointer$.next(e)}set projection(e){this._projection$.next(e)}get trackLength$(){return this._roadSpline$.pipe(tt(e=>{let n=0;for(let r=1;r{"Shift"===n.key&&(this.isShiftPressed=!0)}),To(window,"keyup").pipe(Ue(this.destroyed$)).subscribe(n=>{"Shift"===n.key&&(this.isShiftPressed=!1)}),Ra([this._roadSpline$,this._projection$]).pipe(Ue(this.destroyed$)).subscribe(([n,r])=>{this._roadSplineProjected$.next(n.map(s=>this.project(s)))}),Ra([this._pointer$,this._projection$]).pipe(Ue(this.destroyed$)).subscribe(([n,r])=>{this._pointerProjected$.next(this.project(n||Re.O))}),this._roadSplineProjected$.pipe(Ue(this.destroyed$),tt(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.y)},s={x:Math.max(s.x,a.x),y:Math.max(s.y,a.y)}});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$),Ra([this._roadSplineProjected$,this.scalingSquare$,this.svgSize$]).pipe(Ue(this.destroyed$),tt(([n,r,s])=>{const o=n.map(a=>({x:(a.x-r.x)*s.x/r.width,y:(r.y-a.y)*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$),Ra([this._pointerProjected$,this.scalingSquare$.asObservable(),this.svgSize$]).pipe(Ue(this.destroyed$),tt(([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()}startDrag(e){this.isDragging=!0,this.updatePointer(e)}drag(e){this.isDragging&&this.updatePointer(e)}endDrag(){this.isDragging=!1}getClosestProjectedLineIndex(e){const n=this._roadSplineProjected$.getValue();let r=-1,s=Number.MAX_SAFE_INTEGER;for(let d=1;d{return(i=Df||(Df={})).ThreeModel="model",i.Bitmap="bitmap",i.TwoSidedBitmap="two_sided_bitmap",Df;var i})();class Qpe extends QH{constructor(t,e,n){super(t,{loadDepth:40,inertia:2}),this.mapGraph=t,this.famPath=e,this.hideUnknownEntities$=n,this.textureLoader=new Pu,this.terrainMaterials={},this.objLoader=new Jb,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(Ql(),Ue(this._onRemoved$)).subscribe(e=>{for(const n of this.unknownEntities)n.visible=!e})}getPlaceholderTexture(){var t=this;return nt(function*(){return t._placeholder?t._placeholder:(t._placeholderPromise||(t._placeholderPromise=t.textureLoader.loadAsync("assets/placeholder_texture.png")),t._placeholderPromise)})()}getPlaceholderTerrainTexture(){var t=this;return nt(function*(){return t._placeholderTerrain?t._placeholderTerrain:(t._placeholderTerrainPromise||(t._placeholderTerrainPromise=t.textureLoader.loadAsync("assets/placeholder_texture.png").then(e=>(e.wrapS=Bs,e.wrapT=er,oa(e),e.flipY=!0,e))),t._placeholderTerrainPromise)})()}loadChunk(t){var e=this;return nt(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 Mn&&(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:Re.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:Yi.fromAngle(Re.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 ea({object3D:new sa(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 qi({side:Ns,transparent:!0,visible:!1}),this.famPath?this.textureLoader.loadAsync(`${this.famPath}/${t}.png`).then(e=>{e.wrapS=Bs,e.wrapT=er,oa(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 nt(function*(){let n=!1;if(t.type==Df.ThreeModel){let r;try{if(!e.famPath)throw new Error;const o=new xO,a=new Jb,l=yield o.loadAsync(`${e.famPath}/props/${t.data.data.resource_id}/0/material.mtl`);l.preload(),a.setMaterials(l),r=new sa(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 Mn){const a=o.material instanceof Array?o.material:[o.material];for(const l of a)l.transparent=!0,l.alphaTest=.5,l instanceof qi&&l.map&&(l.map.wrapS=er,l.map.wrapT=er,oa(l.map),l.map.needsUpdate=!0)}});const s=new ea({object3D: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,d)=>new Array(d).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 No,[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,d]=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 ea({object3D:new sa(s)});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 nt(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=>(oa(h),new qi({map:h,alphaTest:.5,transparent:!0,side:Ns}))),d=new Mn(new Iu(e.x,e.y),c[0]);if(d.rotateX(Math.PI/2),d.position.set(0,0,e.y/2),c.length>1){let h=-1;Ym(r.world).pipe(o4(n&&!isNaN(+n)?1e3*+n:250)).subscribe(()=>{h=(h+1)%c.length,d.material=c[h]})}return[d,a]})()}}let Jpe=(()=>{class i{constructor(e,n,r){this.eelDelegate=e,this.cdr=n,this.mainService=r,this._resource$=new Qe(null),this.changed=new $e,this.previewLoading$=new Qe(!0),this.previewFamLocation$=new Qe(null),this.previewFamLoading$=new Qe(!1),this.pointer$=new Qe(null),this.selectedSplineIndex$=new Qe(0),this.selectedSplineItem$=new Qe(null),this.selectedAiInfoItem$=new Qe(null),this.selectedTerrainItem$=new Qe(null),this.famPath=null,this.name="",this.renderer=null,this.map=null,this.isOpenedTrack=!0,this.roadPath=null,this.destroyed$=new Te}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=>({x:e.position.x,y:e.position.z,z:e.position.y}))||[]}ngAfterViewInit(){var e=this;return nt(function*(){var s;e.world=new ok(new yO,{init:(s=nt(function*(){}),function(){return s.apply(this,arguments)}),simulate:()=>{},loader:{loadFromGgGlb:function(){var s=nt(function*(...o){return[]});return function(){return s.apply(this,arguments)}}()}}),yield e.world.init(),e.skySphere=new ea({object3D:e.world.visualScene.factory.createPrimitive({shape:"SPHERE",radius:1e3},{color:16777215})}),e.skySphere.object3D.nativeMesh.material.side=Ns,e.world.addEntity(e.skySphere),e.selectionSphere=new ea({object3D: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 GS(16777215,2));let n=new Qe({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=Yi.lookAt(e.renderer.camera.position,Re.add(e.renderer.camera.position,Re.Y),Re.Z),Ym(e.world).pipe(Ue(e.destroyed$)).subscribe(()=>{e.renderer&&(e.skySphere.position=e.renderer.camera.position,e.pointer$.next(e.renderer.camera.position))}),e.controller=new n4(e.world.keyboardInput,e.renderer,{mouseOptions:{canvas:e.previewCanvas.nativeElement,pointerLock:!0},keymap:"wasd+arrows",cameraLinearSpeed:40,cameraBoostMultiplier:4,cameraMovementElasticity:100,cameraRotationElasticity:30,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(Ue(e.destroyed$)).subscribe(function(){var s=nt(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(Ue(e.destroyed$),gn(([s,o])=>!!e.resource&&s.startsWith(e.resource.id)),gl(3e3)).subscribe(nt(function*(){e.previewLoading$.next(!0),yield e.postTmpUpdates(e.resource?.id),yield e.loadPreview(),e.previewLoading$.next(!1)})),e.selectedSplineIndex$.pipe(Ue(e.destroyed$),gl(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=Re.add(a,Re.rotAround({x:10,y:-12,z:5},{x:0,y:0,z:1},-e.resource.data.road_spline[s].orientation)),e.renderer.rotation=Yi.lookAt(e.renderer.position,a,{x:0,y:0,z:1}),e.controller.reset())}e.selectedSplineItem$.next({id:sc(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:sc(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:sc(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 nt(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 Pu,o=r.find(a=>a.endsWith("spherical.png"));if(o){const a=yield s.loadAsync(o);a.colorSpace="srgb",a.mapping=cc,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 nt(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})()}onPointerChange(e){this.renderer&&(this.renderer.position=e)}loadPreview(){var e=this;return nt(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=Km.fromMapArray(e.roadPath.map((r,s)=>({path:`${e.terrainChunksObjLocation}terrain_chunk_${s}`,position:r,loadOptions:{}}))||[],!e.isOpenedTrack);e.unloadPreview(),e.map=new Qpe(n,e.famPath&&"resources/"+e.famPath,e.mainService.hideHiddenFields$),e.map.resource=e.resource,e.map.isOpenedTrack=e.isOpenedTrack,Ym(e.world).pipe(Ue(e.destroyed$)).subscribe(()=>{e.map&&e.renderer&&e.map.loaderCursor$.next(e.renderer.position)}),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 nt(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)(E(Jl),E(Qn),E(Fa))},i.\u0275cmp=ot({type:i,selectors:[["app-tri-map-block-ui"]],viewQuery:function(e,n){if(1&e&&($n(Wpe,5),$n(jpe,5)),2&e){let r;At(r=Dt())&&(n.previewCanvasContainer=r.first),At(r=Dt())&&(n.previewCanvas=r.first)}},inputs:{resource:"resource"},outputs:{changed:"changed"},decls:49,vars:44,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","projection","pointerChange"],[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&&(G(0,"div",0)(1,"h4"),Be(2,"Preview *.FAM file"),j(),G(3,"mat-form-field",1)(4,"mat-label"),Be(5,"Current preview FAM"),j(),G(6,"mat-select",2,3),Oe("valueChange",function(s){return n.onFamSelected(s)}),ct(8,"async"),ct(9,"async"),fe(10,Ype,2,2,"mat-option",4),G(11,"mat-option",5),Be(12,"custom"),j()()(),fe(13,qpe,9,3,"ng-container",6),fe(14,Xpe,1,1,"mat-spinner",7),ct(15,"async"),j(),G(16,"div",8)(17,"div",9,10),Ie(19,"canvas",11,12),fe(21,Kpe,1,0,"mat-spinner",13),ct(22,"async"),j(),G(23,"div",14,10)(25,"mat-form-field",1)(26,"mat-label"),Be(27,"Spline item"),j(),G(28,"input",15),Oe("ngModelChange",function(s){return n.selectedSplineIndex$.next(s)}),ct(29,"async"),ct(30,"async"),j()(),G(31,"app-minimap",16),Oe("pointerChange",function(s){return n.onPointerChange(s)}),ct(32,"async"),j()()(),G(33,"h4"),Be(34,"Road spline item"),j(),Ie(35,"app-compound-block-ui",17),ct(36,"async"),G(37,"h4"),Be(38,"AI info (block for 4 spline items)"),j(),Ie(39,"app-compound-block-ui",17),ct(40,"async"),G(41,"h4"),Be(42,"Terrain (block for 4 spline items)"),j(),Ie(43,"app-compound-block-ui",17),ct(44,"async"),G(45,"h4"),Be(46,"Common"),j(),Ie(47,"app-compound-block-ui",18),ct(48,"async")),2&e){const r=Zi(7);let s;V(6),U("value",n.previewFamPossibleLocations.includes(ut(8,21,n.previewFamLocation$))?ut(9,23,n.previewFamLocation$):"custom"),V(4),U("ngForOf",n.previewFamPossibleLocations),V(3),U("ngIf","custom"==r.value),V(1),U("ngIf",ut(15,25,n.previewFamLoading$)),V(7),U("ngIf",ut(22,27,n.previewLoading$)),V(7),U("min",0)("max",4*(null==(s=ut(29,29,n._resource$))?null:s.data.num_chunks)-1)("ngModel",ut(30,31,n.selectedSplineIndex$)),V(3),U("roadSpline",n.roadSpline)("pointer",ut(32,33,n.pointer$))("splineClosed",!n.isOpenedTrack)("projection","nz"),V(4),U("resource",ut(36,35,n.selectedSplineItem$))("hideBlockActions",!0),V(4),U("resource",ut(40,37,n.selectedAiInfoItem$))("hideBlockActions",!0),V(4),U("resource",ut(44,39,n.selectedTerrainItem$))("hideBlockActions",!0),V(4),U("resource",ut(48,41,n._resource$))("hideBlockActions",!0)("fieldWhitelist",Rs(43,Zpe))}},dependencies:[lo,_i,_l,mu,nc,_u,gu,Zc,yl,Ro,rc,rb,pb,Nm,e0,ec,fG,Xo],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-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})();const pG=i=>new Promise(t=>setTimeout(t,i)),mG=(i,t,e=null)=>{const n=document.createElement("canvas"),r=n.getContext("2d",{willReadFrequently:!0}),s=i.width,o=i.height;n.width=s,n.height=o,r.drawImage(i,0,0,s,o);const a=r.getImageData(0,0,s,o);for(let l=0;l{if(!(o instanceof Mn))return;let a=-1;if(o.name.startsWith("lbl__rt_frnt")?a=0:o.name.startsWith("lbl__lt_frnt")?a=1:o.name.startsWith("lbl__rt_rear")?a=2:o.name.startsWith("lbl__lt_rear")&&(a=3),a>-1){this.wheels[a]=o,a<2&&(this.frontWheels[a]=o),o.geometry.boundingBox||o.geometry.computeBoundingBox();const l=Re.avg(o.geometry.boundingBox.min,o.geometry.boundingBox.max);o.geometry.translate(...Re.spr(Re.neg(l))),o.position.set(...Re.spr(l)),this.wheelIdlePositions[a]=l}(o.name.includes("rsid")||o.name.includes("lite"))&&(r.push(o),this.originalTexWithTailLights=o.material.map)}),!this.originalTexWithTailLights)throw new Error("Not a driveable NFS1 car");this.tailLightColors=n.includes("TRAFFC.CFM")?[9509903,16711680]:[3212546,16258068],this.texWithTailLightsImg=document.createElement("img"),this.texWithTailLights=new Oo(this.texWithTailLightsImg),this.texWithTailLights.flipY=this.originalTexWithTailLights.flipY,oa(this.texWithTailLights),this.recolorTailLights(this.tailLightColors[0]).then();for(const o of r)o.material.map=this.texWithTailLights;const s=new Pu;this.tyreTextures=[1,2,3,4].map(o=>s.load(`${n}/tyr${o}.png`));for(const o of this.tyreTextures)oa(o);this.tyreMaterial=new qi({map:this.tyreTextures[0]}),this.tyreMaterial.transparent=!0,this.tyreMaterial.alphaTest=.5,this.tyreMaterial.map.wrapS=er,this.tyreMaterial.map.wrapT=er,this.tyreMaterial.polygonOffset=!0,this.tyreMaterial.polygonOffsetFactor=-4;for(const o of this.wheels)o.material=this.tyreMaterial}get tailLightsOn(){return this._tailLightsOn}set tailLightsOn(t){t!==this._tailLightsOn&&(this._tailLightsOn=t,this.recolorTailLights(this.tailLightColors[t?1:0]))}get speed(){return this._speed}set speed(t){if(t!==this._speed){switch(this._speed=t,this.tyreTextureUpdateTimer&&clearInterval(this.tyreTextureUpdateTimer),t){case"idle":this.tyreMaterial.map=this.tyreTextures[0];break;case"slow":let e=!0;this.tyreTextureUpdateTimer=setInterval(()=>{this.tyreMaterial.map=this.tyreTextures[e?1:2],this.tyreMaterial.needsUpdate=!0,e=!e},16);break;case"fast":this.tyreMaterial.map=this.tyreTextures[3]}this.tyreMaterial.needsUpdate=!0}}get steeringAngle(){return this._steeringAngle}set steeringAngle(t){if(t!==this._steeringAngle){this._steeringAngle=t;for(const e of this.frontWheels)e.rotation.set(0,0,t)}}recolorTailLights(t){var e=this;return nt(function*(){if(e.originalTexWithTailLights&&e.texWithTailLights&&e.texWithTailLightsImg){for(let n=100;n>0&&!e.originalTexWithTailLights.source.data;n--)yield pG(50);((i,t,e,n=null)=>{const[r,s,o]=[t>>16,t>>8&255,255&t],[a,l,c]=[e>>16,e>>8&255,255&e];mG(i,(d,h)=>{d[h]==r&&d[h+1]==s&&d[h+2]==o&&(d[h]=a,d[h+1]=l,d[h+2]=c)},n)})(e.originalTexWithTailLights.source.data,e.tailLightsTexColor,t,e.texWithTailLightsImg),e.texWithTailLights.needsUpdate=!0}})()}dispose(){this.texWithTailLightsImg&&(this.texWithTailLightsImg.remove(),this.texWithTailLightsImg=null),this.texWithTailLights&&(this.texWithTailLights.dispose(),this.texWithTailLights=null),this.tyreTextureUpdateTimer&&clearInterval(this.tyreTextureUpdateTimer),this.tyreMaterial&&(this.tyreMaterial.dispose(),this.tyreMaterial=null)}}let nme=(()=>{class i{constructor(e,n,r){this.eelDelegate=e,this.mainService=n,this.cdr=r,this._resource$=new Qe(null),this.changed=new $e,this.previewPaths$=new Qe(null),this.destroyed$=new Te,this.customControls=[],this.serializerSettings={geometry__save_obj:!0,geometry__save_blend:!1,geometry__export_to_gg_web_engine:!1}}get resource(){return this._resource$.getValue()}set resource(e){this._resource$.next(e)}ngAfterViewInit(){var e=this;return nt(function*(){e._resource$.pipe(Ue(e.destroyed$)).subscribe(function(){var n=nt(function*(r){e.previewPaths$.next(yield e.loadPreviewFilePaths(r?.id))});return function(r){return n.apply(this,arguments)}}()),e.mainService.dataBlockChange$.pipe(Ue(e.destroyed$),gn(([n,r])=>!!e.resource&&n.startsWith(e.resource.id)),gl(1500)).subscribe(nt(function*(){e.previewPaths$.next(null),e.previewPaths$.next(yield e.postTmpUpdates(e.resource?.id))}))})()}onObjectLoaded(e){var n=this;return nt(function*(){if((n._resource$.value?.id||"").includes(".CFM__"))try{const r=n.resource?.id.split("/");r.pop(),r[r.length-1]=""+(+r[r.length-1]+1);const s=yield n.eelDelegate.retrieveValue(r.join("/")+"/data"),o=s.children_aliases.findIndex(l=>"!PAL"===l);if(-1==o)throw new Error("Not a car");const a=new tme(e,s.children[o].data.colors[254]>>>8,n.previewPaths$.value[0].substring(0,n.previewPaths$.value[0].lastIndexOf("/"))+"/assets");n.customControls=[{title:"TNFS car features",controls:[{label:"Brake lights on",type:"checkbox",value:!1,change:l=>{a.tailLightsOn=l}},{label:"Car speed",type:"radio",options:["idle","slow","fast"],value:"idle",change:l=>{a.speed=l}},{label:"Steering angle",type:"slider",minValue:-.7,maxValue:.7,valueStep:.05,value:0,change:l=>{a.steeringAngle=l}}]}],n.cdr.markForCheck()}catch{}})()}postTmpUpdates(e){var n=this;return nt(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 nt(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)(E(Jl),E(Fa),E(Qn))},i.\u0275cmp=ot({type:i,selectors:[["app-orip-geometry-block-ui"]],inputs:{resource:"resource"},outputs:{changed:"changed"},decls:4,vars:7,consts:[[3,"paths","customControls","onObjectLoaded"],[3,"resource"]],template:function(e,n){1&e&&(G(0,"app-obj-viewer",0),Oe("onObjectLoaded",function(s){return n.onObjectLoaded(s)}),ct(1,"async"),j(),Ie(2,"app-compound-block-ui",1),ct(3,"async")),2&e&&(U("paths",ut(1,3,n.previewPaths$))("customControls",n.customControls),V(2),U("resource",ut(3,5,n._resource$)))},dependencies:[ec,hG,Xo],changeDetection:0}),i})();const gG=i=>{let t=i.block_class_mro.split("__")[0];return"ArrayBlock"===t?gG(i.child_schema)+"[]":t},ime=["class","block-ui"];function rme(i,t){if(1&i&&(G(0,"mat-label",7),Be(1),j()),2&i){const e=re(2);U("matTooltip",e.resourceDescription),V(1),Qi("",null==e.resource?null:e.resource.name," ")}}function sme(i,t){if(1&i&&(G(0,"mat-option",8),Be(1),j()),2&i){const e=t.$implicit,n=t.index,r=re(2);U("value",n)("disabled",r.disabled),V(1),Qi(" ",r.blockClassStr(e)," ")}}function ome(i,t){if(1&i){const e=jn();Gr(0),fe(1,rme,2,2,"mat-label",1),ct(2,"async"),G(3,"div",2)(4,"mat-label"),Be(5,"Resource type:"),j(),G(6,"mat-select",3),Oe("selectionChange",function(r){return Vt(e),Et(re().setChoiceIndex(r.value))}),fe(7,sme,2,3,"mat-option",4),j(),Ie(8,"app-block-actions",5),j(),Ie(9,"app-editor",6),Wr()}if(2&i){const e=re();let n;V(1),U("ngIf",(null==e.resource?null:e.resource.name)&&(null==e.resource?null:e.resource.name)!=(null==(n=ut(2,8,e.main.resource$))?null:n.name)),V(5),U("value",e.resourceData.choice_index)("disabled",e.disabled),V(1),U("ngForOf",e.resource.schema.possible_resource_schemas),V(1),U("resource",e.childResource),V(1),U("resource",e.childResource)("hideBlockActions",!0)("disabled",e.disabled)}}let _G=(()=>{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 $e,this.blockClassStr=gG}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:sc(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)(E(Fa))},i.\u0275cmp=ot({type:i,selectors:[["app-delegate",8,"block-ui"]],inputs:{resource:"resource",resourceDescription:"resourceDescription",hideBlockActions:"hideBlockActions",disabled:"disabled"},outputs:{changed:"changed"},attrs:ime,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"],[3,"resource","hideBlockActions","disabled"],["matTooltipPosition","above",3,"matTooltip"],[3,"value","disabled"]],template:function(e,n){1&e&&fe(0,ome,10,10,"ng-container",0),2&e&&U("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 ame=["class","block-ui"];function lme(i,t){if(1&i&&(G(0,"mat-label",7),Be(1),j()),2&i){const e=re(2);U("matTooltip",e.resourceDescription),V(1),Qi(" ",e.resource.name," ")}}function cme(i,t){if(1&i){const e=jn();Gr(0),fe(1,lme,2,2,"mat-label",1),G(2,"mat-selection-list",2),Oe("selectionChange",function(r){return Vt(e),Et(re().onSelection(r))}),G(3,"mat-list-option",3),Be(4," Left "),j(),G(5,"mat-list-option",4),Be(6," Right "),j()(),G(7,"mat-form-field",5)(8,"mat-label"),Be(9,"Texture ID"),j(),G(10,"input",6),Oe("ngModelChange",function(r){return Vt(e),Et(re().resource.data.texture_id=r)})("change",function(){return Vt(e),Et(re().changed.emit())}),j()(),Wr()}if(2&i){const e=re();V(1),U("ngIf",e.resource.name),V(2),U("selected",e.resource.data.has_left_fence),V(2),U("selected",e.resource.data.has_right_fence),V(5),U("max",63)("min",0)("step",1)("ngModel",e.resource.data.texture_id)}}let dme=(()=>{class i{constructor(){this.resource=null,this.resourceDescription="",this.changed=new $e}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=ot({type:i,selectors:[["app-fence-type",8,"block-ui"]],inputs:{resource:"resource",resourceDescription:"resourceDescription"},outputs:{changed:"changed"},attrs:ame,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&&fe(0,cme,11,7,"ng-container",0),2&e&&U("ngIf",n.resource)},dependencies:[_i,_l,mu,nc,_u,gu,Zc,yl,Ro,rc,Fs,MC,wC],changeDetection:0}),i})(),ume=(()=>{class i{constructor(){this._resource=null,this.resourceMap={},this.changed=new $e}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]=["",vl.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)(E(ib),E(bte),E(oR))},i.\u0275cmp=ot({type:i,selectors:[["app-run-custom-action",8,"dialog"]],attrs:hme,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&&(G(0,"h1",0),Be(1),j(),G(2,"div",1)(3,"p"),Be(4),j()(),G(5,"form",2),fe(6,fme,4,4,"mat-form-field",3),j(),G(7,"div",4)(8,"button",5),Oe("click",function(){return n.dialogRef.close()}),Be(9,"Cancel"),j(),G(10,"button",6),Oe("click",function(){return n.submit()}),Be(11,"Run"),j()()),2&e&&(V(1),Qi('Run action "',n.data.title,'"'),V(3),ui(n.data.description),V(1),U("formGroup",n.argsForm),V(1),U("ngForOf",n.data.args),V(4),U("disabled",n.argsForm.invalid))},dependencies:[lo,IR,_l,nc,bR,yl,Ro,rc,rb,pV,mV,gV,Gh,fC],styles:["form[_ngcontent-%COMP%]{padding:0 24px}"]}),i})();function vG(i,t){return t?e=>Sy(t.pipe(Oi(1),function mme(){return ni((i,t)=>{i.subscribe(qn(t,ms))})}()),e.pipe(vG(i))):rr((e,n)=>Mr(i(e,n)).pipe(Oi(1),qB(e)))}function yG(i,t=Gy){const e=OI(i,t);return vG(()=>e)}const gme=["mat-menu-item",""];function _me(i,t){1&i&&(ki(),G(0,"svg",3),Ie(1,"polygon",4),j())}const vme=[[["mat-icon"],["","matMenuItemIcon",""]],"*"],yme=["mat-icon, [matMenuItemIcon]","*"];function bme(i,t){if(1&i){const e=jn();G(0,"div",0),Oe("keydown",function(r){return Vt(e),Et(re()._handleKeydown(r))})("click",function(){return Vt(e),Et(re().closed.emit("click"))})("@transformMenu.start",function(r){return Vt(e),Et(re()._onAnimationStart(r))})("@transformMenu.done",function(r){return Vt(e),Et(re()._onAnimationDone(r))}),G(1,"div",1),Yt(2),j()()}if(2&i){const e=re();U("id",e.panelId)("ngClass",e._classList)("@transformMenu",e._panelAnimationState),It("aria-label",e.ariaLabel||null)("aria-labelledby",e.ariaLabelledby||null)("aria-describedby",e.ariaDescribedby||null)}}const xme=["*"],wO=new me("MAT_MENU_PANEL"),wme=YM(jM(class{}));let eE=(()=>{class i extends wme{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 Te,this._focused=new Te,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",Yr("120ms cubic-bezier(0, 0, 0.2, 1)",oi({opacity:1,transform:"scale(1)"}))),Or("* => void",Yr("100ms 25ms linear",oi({opacity:0})))]),fadeInItems:Oa("fadeInItems",[Os("showing",oi({opacity:1})),Or("void => *",[oi({opacity:0}),Yr("400ms 100ms cubic-bezier(0.55, 0, 0.55, 0.2)")])])};let Cme=0;const bG=new me("mat-menu-default-options",{providedIn:"root",factory:function Sme(){return{overlapTrigger:!1,xPosition:"after",yPosition:"below",backdropClass:"cdk-overlay-transparent-backdrop"}}});let t0=(()=>{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=tn(e)}get hasBackdrop(){return this._hasBackdrop}set hasBackdrop(e){this._hasBackdrop=tn(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 om,this._classList={},this._panelAnimationState="void",this._animationDone=new Te,this.overlayPanelClass=this._defaultOptions.overlayPanelClass||"",this.backdropClass=this._defaultOptions.backdropClass,this._overlapTrigger=this._defaultOptions.overlapTrigger,this._hasBackdrop=this._defaultOptions.hasBackdrop,this.closed=new $e,this.close=this.closed,this.panelId="mat-menu-panel-"+Cme++}ngOnInit(){this.setPositionClasses()}ngAfterContentInit(){this._updateDirectDescendants(),this._keyManager=new kU(this._directDescendantItems).withWrap().withTypeAhead().withHomeAndEnd(),this._keyManager.tabOut.subscribe(()=>this.closed.emit("tab")),this._directDescendantItems.changes.pipe(Do(this._directDescendantItems),ks(e=>Cr(...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(Do(this._directDescendantItems),ks(n=>Cr(...n.map(r=>r._hovered))))}addItem(e){}removeItem(e){}_handleKeydown(e){const n=e.keyCode,r=this._keyManager;switch(n){case 27:Qo(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(Oi(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(Do(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)(E(vt),E(gt),E(bG),E(Qn))},i.\u0275dir=ve({type:i,contentQueries:function(e,n,r){if(1&e&&(Wi(r,Mme,5),Wi(r,eE,5),Wi(r,eE,4)),2&e){let s;At(s=Dt())&&(n.lazyContent=s.first),At(s=Dt())&&(n._allItems=s),At(s=Dt())&&(n.items=s)}},viewQuery:function(e,n){if(1&e&&$n(Eo,5),2&e){let r;At(r=Dt())&&(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})(),Eme=(()=>{class i extends t0{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)(E(vt),E(gt),E(bG),E(Qn))},i.\u0275cmp=ot({type:i,selectors:[["mat-menu"]],hostVars:3,hostBindings:function(e,n){2&e&&It("aria-label",null)("aria-labelledby",null)("aria-describedby",null)},exportAs:["matMenu"],features:[Dn([{provide:wO,useExisting:i}]),dt],ngContentSelectors:xme,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&&(or(),fe(0,bme,3,6,"ng-template"))},dependencies:[hm],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:[tE.transformMenu,tE.fadeInItems]},changeDetection:0}),i})();const xG=new me("mat-menu-scroll-strategy"),Dme={provide:xG,deps:[as],useFactory:function Ame(i){return()=>i.scrollStrategies.reposition()}},wG=Fh({passive:!0});let Tme=(()=>{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,d){this._overlay=e,this._element=n,this._viewContainerRef=r,this._menuItemInstance=a,this._dir=l,this._focusMonitor=c,this._ngZone=d,this._overlayRef=null,this._menuOpen=!1,this._closingActionsSubscription=Qt.EMPTY,this._hoverSubscription=Qt.EMPTY,this._menuCloseSubscription=Qt.EMPTY,this._changeDetectorRef=Lt(Qn),this._handleTouchStart=h=>{qI(h)||(this._openedBy="touch")},this._openedBy=void 0,this.restoreFocus=!0,this.menuOpened=new $e,this.onMenuOpen=this.menuOpened,this.menuClosed=new $e,this.onMenuClose=this.menuClosed,this._scrollStrategy=s,this._parentMaterialMenu=o instanceof t0?o:void 0,n.nativeElement.addEventListener("touchstart",this._handleTouchStart,wG)}ngAfterContentInit(){this._handleHover()}ngOnDestroy(){this._overlayRef&&(this._overlayRef.dispose(),this._overlayRef=null),this._element.nativeElement.removeEventListener("touchstart",this._handleTouchStart,wG),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 t0&&(e._startAnimation(),e._directDescendantItems.changes.pipe(Ue(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 t0?(n._resetAnimation(),n.lazyContent?n._animationDone.pipe(gn(r=>"void"===r.toState),Oi(1),Ue(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],[d,h]=[r,s],p=0;if(this.triggersSubmenu()){if(h=r="before"===e.xPosition?"start":"end",s=d="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:d,overlayY:o,offsetY:p},{originX:s,originY:l,overlayX:h,overlayY:o,offsetY:p},{originX:r,originY:c,overlayX:d,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 Cr(e,this._parentMaterialMenu?this._parentMaterialMenu.closed:mt(),this._parentMaterialMenu?this._parentMaterialMenu._hovered().pipe(gn(o=>o!==this._menuItemInstance),gn(()=>this._menuOpen)):mt(),n)}_handleMousedown(e){YI(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(gn(e=>e===this._menuItemInstance&&!e.disabled),yG(0,PI)).subscribe(()=>{this._openedBy="mouse",this.menu instanceof t0&&this.menu._isAnimating?this.menu._animationDone.pipe(Oi(1),yG(0,PI),Ue(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)(E(as),E(vt),E(jr),E(xG),E(wO,8),E(eE,10),E(Pa,8),E(Xc),E(gt))},i.\u0275dir=ve({type:i,hostVars:3,hostBindings:function(e,n){1&e&&Oe("click",function(s){return n._handleClick(s)})("mousedown",function(s){return n._handleMousedown(s)})("keydown",function(s){return n._handleKeydown(s)}),2&e&&It("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})(),Ime=(()=>{class i extends Tme{}return i.\u0275fac=function(){let t;return function(n){return(t||(t=si(i)))(n||i)}}(),i.\u0275dir=ve({type:i,selectors:[["","mat-menu-trigger-for",""],["","matMenuTriggerFor",""]],hostAttrs:[1,"mat-mdc-menu-trigger"],exportAs:["matMenuTrigger"],features:[dt]}),i})(),Rme=(()=>{class i{}return i.\u0275fac=function(e){return new(e||i)},i.\u0275mod=en({type:i}),i.\u0275inj=Wt({providers:[Dme],imports:[co,tb,Jn,Pm,Ky,Jn]}),i})();function kme(i,t){if(1&i){const e=jn();G(0,"button",7),Oe("click",function(){return Vt(e),Et(re(2).deserialize())}),Ie(1,"mat-icon",8),j()}}function Pme(i,t){if(1&i){const e=jn();Gr(0),fe(1,kme,2,0,"button",4),G(2,"button",5),Oe("click",function(){return Vt(e),Et(re().serializeBlockReversible())}),Ie(3,"mat-icon",6),j(),Wr()}if(2&i){const e=re();V(1),U("ngIf",e.isInReversibleSerializationState),V(1),U("disabled",e.isInReversibleSerializationState)}}function Ome(i,t){1&i&&(G(0,"button",9),Ie(1,"mat-icon",10),j()),2&i&&(re(),U("matMenuTriggerFor",Zi(3)))}function Fme(i,t){if(1&i){const e=jn();G(0,"button",11),Oe("click",function(){const s=Vt(e).$implicit;return Et(re().runCustomAction(s))}),G(1,"span"),Be(2),j()()}if(2&i){const e=t.$implicit;V(2),ui(e.title)}}const Lme=function(){return[]};let nE=(()=>{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 nt(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)(E(Fa),E(Jl),E(Qn),E(Bm),E(RV))},i.\u0275cmp=ot({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&&(fe(0,Pme,4,2,"ng-container",0),fe(1,Ome,2,1,"button",1),G(2,"mat-menu",null,2),fe(4,Fme,3,1,"button",3),j()),2&e&&(U("ngIf",null==n.resource||null==n.resource.schema?null:n.resource.schema.serializable_to_disc),V(1),U("ngIf",(null==n.resource||null==n.resource.schema.custom_actions?null:n.resource.schema.custom_actions.length)>0),V(3),U("ngForOf",(null==n.resource?null:n.resource.schema.custom_actions)||Rs(3,Lme)))},dependencies:[lo,_i,Fs,XM,gR,Eme,eE,Ime],styles:["[_nghost-%COMP%]{display:flex}"]}),i})();const Nme=["class","block-ui"];function Bme(i,t){if(1&i&&(G(0,"mat-label",7),Be(1),j()),2&i){const e=re();U("matTooltip",e.resourceDescription),V(1),Qi("",null==e.resource?null:e.resource.name," ")}}function Ume(i,t){if(1&i&&(G(0,"audio",8),Ie(1,"source",9),ct(2,"async"),Be(3," Your browser does not support the audio element. "),j()),2&i){const e=re();V(1),U("src",ut(2,1,e.audioUrl$),Np)}}function Vme(i,t){1&i&&Ie(0,"mat-spinner",10)}function zme(i,t){1&i&&Ie(0,"app-block-actions",11),2&i&&U("resource",re().resource)}const Hme=function(){return["wave_data"]};let $me=(()=>{class i{constructor(e,n){this.eelDelegate=e,this.main=n,this._resource$=new Qe(null),this.audioUrl$=new Qe(null),this.resourceDescription="",this.hideBlockActions=!1,this.destroyed$=new Te,this.changed=new $e}set resource(e){this._resource$.next(e)}get resource(){return this._resource$.getValue()}ngAfterViewInit(){var e=this;return nt(function*(){e._resource$.pipe(Ue(e.destroyed$)).subscribe(function(){var n=nt(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)(E(Jl),E(Fa))},i.\u0275cmp=ot({type:i,selectors:[["app-eacs-audio",8,"block-ui"]],inputs:{resource:"resource",resourceDescription:"resourceDescription",hideBlockActions:"hideBlockActions"},outputs:{changed:"changed"},attrs:Nme,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&&(G(0,"div",0),fe(1,Bme,2,2,"mat-label",1),ct(2,"async"),fe(3,Ume,4,3,"audio",2),ct(4,"async"),fe(5,Vme,1,0,"mat-spinner",3),ct(6,"async"),Ie(7,"div",4),fe(8,zme,1,1,"app-block-actions",5),j(),Ie(9,"app-compound-block-ui",6),ct(10,"async")),2&e){let r;V(1),U("ngIf",(null==n.resource?null:n.resource.name)&&(null==n.resource?null:n.resource.name)!=(null==(r=ut(2,7,n.main.resource$))?null:r.name)),V(2),U("ngIf",ut(4,9,n.audioUrl$)),V(2),U("ngIf",n.resource&&!ut(6,11,n.audioUrl$)),V(3),U("ngIf",!n.hideBlockActions),V(1),U("resource",ut(10,13,n._resource$))("hideBlockActions",!0)("fieldBlacklist",Rs(15,Hme))}},dependencies:[_i,Ro,Fs,e0,ec,nE,Xo],styles:["#header[_ngcontent-%COMP%]{display:flex}"]}),i})();class Gme{constructor(t,e){this.mesh=t,this.assetsPath=e,this.textures=[],this.tyreTextureUpdateTimer=void 0,this.tyreMaterial=null,this.tyreTextures=[],this._color=65280,this._speed="idle",this._steeringAngle=0,this.wheels=[],this.wheelIdlePositions=[],this.frontWheels=[];let n=new Set;if(t.traverse(r=>{if(!(r instanceof Mn))return;let s=-1;if(r.name.startsWith("part_hp_12")?s=0:r.name.startsWith("part_hp_14")?s=1:r.name.startsWith("part_hp_16")?s=2:r.name.startsWith("part_hp_18")&&(s=3),s>-1){r.geometry.boundingBox||r.geometry.computeBoundingBox();let a=Re.avg(r.geometry.boundingBox.min,r.geometry.boundingBox.max);return(0==s||2==s)&&(a={x:a.x,y:a.y,z:a.z+1.5}),r.geometry.translate(...Re.spr(Re.neg(a))),r.position.set(...Re.spr(a)),this.wheelIdlePositions[s]=a,this.wheels.push(r),void(s<2&&this.frontWheels.push(r))}const o=r.material.map;o&&n.add(o)}),this.textures=Array.from(n).map(r=>{const s=new Oo(document.createElement("img"));return s.flipY=r.flipY,oa(s),[r,s]}),t.traverse(r=>{if(!(r instanceof Mn))return;const s=r.material.map;if(s){const o=this.textures.find(([a,l])=>a===s);o&&(r.material.map=o[1])}}),this.hasWheels){const r=new Pu;this.tyreTextures=[0,1,2,3].map(s=>r.load(`${e}/m${s}00.png`));for(const s of this.tyreTextures)oa(s);this.tyreMaterial=new qi({map:this.tyreTextures[0]}),this.tyreMaterial.transparent=!0,this.tyreMaterial.alphaTest=.5,this.tyreMaterial.map.wrapS=er,this.tyreMaterial.map.wrapT=er,this.tyreMaterial.polygonOffset=!0,this.tyreMaterial.polygonOffsetFactor=-4;for(const s of this.wheels)s.material=this.tyreMaterial}this.color=65280,this.recolorCar().then()}get color(){return this._color}set color(t){t!==this._color&&(this._color=t,this.recolorCar().then())}get speed(){return this._speed}set speed(t){if(t!==this._speed){switch(this._speed=t,this.tyreTextureUpdateTimer&&clearInterval(this.tyreTextureUpdateTimer),t){case"idle":this.tyreMaterial.map=this.tyreTextures[0];break;case"slow":let e=!0;this.tyreTextureUpdateTimer=setInterval(()=>{this.tyreMaterial.map=this.tyreTextures[e?1:2],this.tyreMaterial.needsUpdate=!0,e=!e},16);break;case"fast":this.tyreMaterial.map=this.tyreTextures[3]}this.tyreMaterial.needsUpdate=!0}}get steeringAngle(){return this._steeringAngle}set steeringAngle(t){if(t!==this._steeringAngle){this._steeringAngle=t;for(const e of this.frontWheels)e.rotation.set(0,0,t)}}get hasWheels(){return this.wheels.length>0}recolorCar(){var t=this;return nt(function*(){const[e,n,r]=[t.color>>16,t.color>>8&255,255&t.color];for(const[s,o]of t.textures){for(let a=100;a>0&&!s.source.data;a--)yield pG(50);mG(s.source.data,(a,l)=>{if(a[l]+a[l+2]{class i{constructor(e,n,r){this.eelDelegate=e,this.main=n,this.cdr=r,this._resource$=new Qe(null),this.changed=new $e,this.customControls=[],this.previewPaths$=new Qe(null),this.destroyed$=new Te,this.serializerSettings={geometry__save_obj:!0,geometry__save_blend:!1,geometry__export_to_gg_web_engine:!1}}get resource(){return this._resource$.getValue()}set resource(e){this._resource$.next(e)}ngAfterViewInit(){var e=this;return nt(function*(){e._resource$.pipe(Ue(e.destroyed$)).subscribe(function(){var n=nt(function*(r){e.previewPaths$.next(yield e.loadPreviewFilePaths(r?.id))});return function(r){return n.apply(this,arguments)}}()),e.main.dataBlockChange$.pipe(Ue(e.destroyed$),gn(([n,r])=>!!e.resource&&n.startsWith(e.resource.id)),gl(1500)).subscribe(nt(function*(){e.previewPaths$.next(null),e.previewPaths$.next(yield e.postTmpUpdates(e.resource?.id))}))})()}onObjectLoaded(e){var n=this;return nt(function*(){try{const r=new Gme(e,n.previewPaths$.value[0].substring(0,n.previewPaths$.value[0].lastIndexOf("/"))+"/assets");let s=null;const o=a=>{s&&clearTimeout(s),s=setTimeout(()=>r.color=a,50)};n.customControls=[{title:"NFS2 car features",controls:[{label:"Car color",type:"color",value:65280,change:a=>o(a)}]}],r.hasWheels&&n.customControls[0].controls.push({label:"Car speed",type:"radio",options:["idle","slow","fast"],value:"idle",change:a=>{r.speed=a}},{label:"Steering angle",type:"slider",minValue:-.7,maxValue:.7,valueStep:.05,value:0,change:a=>{r.steeringAngle=a}}),n.cdr.markForCheck()}catch(r){console.error(r)}})()}postTmpUpdates(e){var n=this;return nt(function*(){if(e){const r=yield n.eelDelegate.serializeResourceTmp(e,Object.entries(n.main.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 nt(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)(E(Jl),E(Fa),E(Qn))},i.\u0275cmp=ot({type:i,selectors:[["app-geo-geometry",8,"block-ui"]],inputs:{resource:"resource"},outputs:{changed:"changed"},attrs:Wme,decls:4,vars:8,consts:[[3,"paths","groupFunction","customControls","onObjectLoaded"],[3,"resource",4,"ngIf"],[3,"resource"]],template:function(e,n){1&e&&(G(0,"app-obj-viewer",0),Oe("onObjectLoaded",function(s){return n.onObjectLoaded(s)}),ct(1,"async"),j(),fe(2,jme,2,3,"app-compound-block-ui",1),ct(3,"async")),2&e&&(U("paths",ut(1,4,n.previewPaths$))("groupFunction",n.previewObjectGroupFunc)("customControls",n.customControls),V(2),U("ngIf",!ut(3,6,n.main.hideHiddenFields$)))},dependencies:[_i,ec,hG,Xo],changeDetection:0}),i})();const qme=function(){return["children","items_descr"]};let Xme=(()=>{class i{constructor(){this._resource=null,this.hideBlockActions=!1,this.resourceMap={},this.changed=new $e}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:sc(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=ot({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&&Ie(0,"app-compound-block-ui",0)(1,"app-sidenav-res-list",1),2&e&&(U("resource",n.resource)("hideBlockActions",n.hideBlockActions)("fieldBlacklist",Rs(4,qme)),V(1),U("resources",n.resourceMap))},dependencies:[ec,xC],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})();const Kme=["previewCanvasContainer"],Zme=["previewCanvas"];function Qme(i,t){1&i&&Ie(0,"mat-spinner",16),2&i&&U("diameter",40)}function Jme(i,t){1&i&&Ie(0,"mat-spinner",17)}const ege=function(){return[]};var Tf=(()=>{return(i=Tf||(Tf={})).ThreeModel="model",i.Bitmap="bitmap",i.TwoSidedBitmap="two_sided_bitmap",Tf;var i})();class tge extends QH{constructor(t,e,n){super(t,{loadDepth:40,inertia:2}),this.mapGraph=t,this.qfsPath=e,this.hideUnknownEntities$=n,this.textureLoader=new Pu,this.terrainMaterials={},this.objLoader=new Jb,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(Ql(),Ue(this._onRemoved$)).subscribe(e=>{for(const n of this.unknownEntities)n.visible=!e})}getPlaceholderTexture(){var t=this;return nt(function*(){return t._placeholder?t._placeholder:(t._placeholderPromise||(t._placeholderPromise=t.textureLoader.loadAsync("assets/placeholder_texture.png")),t._placeholderPromise)})()}getPlaceholderTerrainTexture(){var t=this;return nt(function*(){return t._placeholderTerrain?t._placeholderTerrain:(t._placeholderTerrainPromise||(t._placeholderTerrainPromise=t.textureLoader.loadAsync("assets/placeholder_texture.png").then(e=>(e.wrapS=Bs,e.wrapT=Bs,oa(e),e))),t._placeholderTerrainPromise)})()}loadChunk(t){var e=this;return nt(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 Mn&&(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:Re.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:Yi.fromAngle(Re.nZ,l.rotation)}));const o=(yield Promise.all(s.map(l=>e.loadPropInternal(l)))).filter(l=>!!l),a=new ea({object3D:new sa(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 qi({side:Ns,transparent:!0,visible:!1}),this.qfsPath?this.textureLoader.loadAsync(`${this.qfsPath}/${t}.png`).then(e=>{e.wrapS=Bs,e.wrapT=Bs,oa(e),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 nt(function*(){let n=!1;if(t.type==Tf.ThreeModel){let r;try{if(!e.qfsPath)throw new Error;const o=new xO,a=new Jb,l=yield o.loadAsync(`${e.qfsPath}/props/${t.data.data.resource_id}/0/material.mtl`);l.preload(),a.setMaterials(l),r=new sa(yield a.loadAsync(`${e.qfsPath}/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 Mn){const a=o.material instanceof Array?o.material:[o.material];for(const l of a)l.transparent=!0,l.alphaTest=.5,l instanceof qi&&l.map&&(l.map.wrapS=Bs,l.map.wrapT=Bs,oa(l.map),l.map.needsUpdate=!0)}});const s=new ea({object3D: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==Tf.Bitmap||t.type==Tf.TwoSidedBitmap){const r=(c,d)=>new Array(d).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 No,[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==Tf.TwoSidedBitmap){const[c,d]=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 ea({object3D:new sa(s)});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 nt(function*(){const s=t.split(";"),o=yield r.getPlaceholderTexture();let a=!1,l=[];r.qfsPath?l=yield Promise.all(s.map(h=>r.textureLoader.loadAsync(`${r.qfsPath}/foreground/${h}.png`).catch(()=>(a=!0,o)))):(a=!0,l=s.map(()=>o));const c=l.map(h=>(oa(h),new qi({map:h,alphaTest:.5,transparent:!0,side:Ns}))),d=new Mn(new Iu(e.x,e.y),c[0]);if(d.rotateX(Math.PI/2),d.position.set(0,0,e.y/2),c.length>1){let h=-1;Ym(r.world).pipe(o4(n&&!isNaN(+n)?1e3*+n:250)).subscribe(()=>{h=(h+1)%c.length,d.material=c[h]})}return[d,a]})()}}let nge=(()=>{class i{constructor(e,n,r){this.eelDelegate=e,this.cdr=n,this.mainService=r,this._resource$=new Qe(null),this.changed=new $e,this.previewLoading$=new Qe(!0),this.previewQfsLocation$=new Qe(null),this.previewQfsLoading$=new Qe(!1),this.pointer$=new Qe(null),this.selectedSplineIndex$=new Qe(0),this.qfsPath=null,this.name="",this.renderer=null,this.map=null,this.roadPath=null,this.destroyed$=new Te}get resource(){return this._resource$.getValue()}set resource(e){this._resource$.next(e)}ngAfterViewInit(){var e=this;return nt(function*(){var s;e.world=new ok(new yO,{init:(s=nt(function*(){}),function(){return s.apply(this,arguments)}),simulate:()=>{},loader:{loadFromGgGlb:function(){var s=nt(function*(...o){return[]});return function(){return s.apply(this,arguments)}}()}}),yield e.world.init(),e.skySphere=new ea({object3D:e.world.visualScene.factory.createPrimitive({shape:"SPHERE",radius:1e3},{color:16777215})}),e.skySphere.object3D.nativeMesh.material.side=Ns,e.world.addEntity(e.skySphere),e.selectionSphere=new ea({object3D: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 GS(16777215,2));let n=new Qe({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=Yi.lookAt(e.renderer.camera.position,Re.add(e.renderer.camera.position,Re.Y),Re.Z),Ym(e.world).pipe(Ue(e.destroyed$)).subscribe(()=>{e.renderer&&(e.skySphere.position=e.renderer.camera.position,e.pointer$.next(e.renderer.camera.position))}),e.controller=new n4(e.world.keyboardInput,e.renderer,{mouseOptions:{canvas:e.previewCanvas.nativeElement,pointerLock:!0},keymap:"wasd+arrows",cameraLinearSpeed:40,cameraBoostMultiplier:4,cameraMovementElasticity:100,cameraRotationElasticity:30,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(Ue(e.destroyed$)).subscribe(function(){var s=nt(function*(o){e.roadPath=e.resource?.data.block_positions.map(a=>({x:a.x,y:a.z,z:a.y})),e.previewLoading$.next(!0),o?(e.previewQfsLocation$.next(o.id.substring(0,o.id.indexOf(".TRK"))+"0.QFS"),yield e.loadTerrainChunks(o.id),yield e.onQfsSelected(e.previewQfsLocation$.value)):(yield e.loadTerrainChunks(),yield e.loadPreview()),e.previewLoading$.next(!1)});return function(o){return s.apply(this,arguments)}}()),e.mainService.dataBlockChange$.pipe(Ue(e.destroyed$),gn(([s,o])=>!!e.resource&&s.startsWith(e.resource.id)),gl(3e3)).subscribe(nt(function*(){e.roadPath=e.resource?.data.block_positions.map(s=>({x:s.x,y:s.z,z:s.y})),e.previewLoading$.next(!0),yield e.postTmpUpdates(e.resource?.id),yield e.loadPreview(),e.previewLoading$.next(!1)})),e.selectedSplineIndex$.pipe(Ue(e.destroyed$),gl(250)).subscribe(s=>{if(e.resource){let o=e.resource.data.block_positions[s];if(!o)return;o={x:o.x,y:o.z,z:o.y},e.selectionSphere.position=o,e.renderer&&(e.renderer.position=Re.add(o,Re.rotAround({x:10,y:-12,z:5},{x:0,y:0,z:1},-0)),e.renderer.rotation=Yi.lookAt(e.renderer.position,o,{x:0,y:0,z:1}),e.controller.reset())}})})()}onQfsSelected(e){var n=this;return nt(function*(){if(n.qfsPath!=e){n.previewQfsLoading$.next(!0);try{const r=yield n.eelDelegate.serializeResource(e),s=new Pu,o=r.find(a=>a.endsWith("spherical.png"));if(o){const a=yield s.loadAsync(o);a.colorSpace="srgb",a.mapping=cc,n.skySphere.object3D.nativeMesh.material.map=a}else n.skySphere.object3D.nativeMesh.material.map=null;n.skySphere.object3D.nativeMesh.material.needsUpdate=!0,n.qfsPath=e}catch{n.skySphere.object3D.nativeMesh.material.map=null,n.skySphere.object3D.nativeMesh.material.needsUpdate=!0,n.qfsPath=null}finally{n.previewQfsLoading$.next(!1)}yield n.loadPreview()}})()}loadTerrainChunks(e){var n=this;return nt(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})()}onPointerChange(e){this.renderer&&(this.renderer.position=e)}loadPreview(){var e=this;return nt(function*(){if(!e.terrainChunksObjLocation||!e.roadPath)return;const n=Km.fromMapArray(e.roadPath.map((r,s)=>({path:`${e.terrainChunksObjLocation}terrain_chunk_${s}`,position:r,loadOptions:{}}))||[],!0);e.unloadPreview(),e.map=new tge(n,e.qfsPath&&"resources/"+e.qfsPath,e.mainService.hideHiddenFields$),e.map.resource=e.resource,e.map.isOpenedTrack=!1,Ym(e.world).pipe(Ue(e.destroyed$)).subscribe(()=>{e.map&&e.renderer&&e.map.loaderCursor$.next(e.renderer.position)}),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 nt(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)(E(Jl),E(Qn),E(Fa))},i.\u0275cmp=ot({type:i,selectors:[["app-trk-map-block-ui"]],viewQuery:function(e,n){if(1&e&&($n(Kme,5),$n(Zme,5)),2&e){let r;At(r=Dt())&&(n.previewCanvasContainer=r.first),At(r=Dt())&&(n.previewCanvas=r.first)}},inputs:{resource:"resource"},outputs:{changed:"changed"},decls:32,vars:26,consts:[[1,"qfsSelector"],["appearance","fill"],["matInput","","type","text",3,"value"],["customQfsInput",""],["mat-button","",3,"click"],["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","projection","pointerChange"],[3,"resource"],["mode","indeterminate",3,"diameter"],["mode","indeterminate"]],template:function(e,n){if(1&e){const r=jn();G(0,"div",0)(1,"h4"),Be(2,"Preview QFS file"),j(),G(3,"mat-form-field",1)(4,"mat-label"),Be(5,"Custom QFS path"),j(),Ie(6,"input",2,3),ct(8,"async"),j(),G(9,"button",4),Oe("click",function(){Vt(r);const o=Zi(7);return Et(n.onQfsSelected(o.value))}),Be(10,"LOAD"),j(),fe(11,Qme,1,1,"mat-spinner",5),ct(12,"async"),j(),G(13,"div",6)(14,"div",7,8),Ie(16,"canvas",9,10),fe(18,Jme,1,0,"mat-spinner",11),ct(19,"async"),j(),G(20,"div",12,8)(22,"mat-form-field",1)(23,"mat-label"),Be(24,"Spline item"),j(),G(25,"input",13),Oe("ngModelChange",function(o){return n.selectedSplineIndex$.next(o)}),ct(26,"async"),ct(27,"async"),j()(),G(28,"app-minimap",14),Oe("pointerChange",function(o){return n.onPointerChange(o)}),ct(29,"async"),j()()(),Ie(30,"app-compound-block-ui",15),ct(31,"async")}if(2&e){let r;V(6),U("value",ut(8,11,n.previewQfsLocation$)),V(5),U("ngIf",ut(12,13,n.previewQfsLoading$)),V(7),U("ngIf",ut(19,15,n.previewLoading$)),V(7),U("min",0)("max",4*(null==(r=ut(26,17,n._resource$))?null:r.data.num_blocks)-1)("ngModel",ut(27,19,n.selectedSplineIndex$)),V(3),U("roadSpline",n.roadPath||Rs(25,ege))("pointer",ut(29,21,n.pointer$))("splineClosed",!0)("projection","nz"),V(2),U("resource",ut(31,23,n._resource$))}},dependencies:[_i,_l,mu,nc,_u,gu,Zc,yl,Ro,rc,rb,e0,ec,fG,Xo],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-minimap[_ngcontent-%COMP%]{flex-grow:1;display:flex}.qfsSelector[_ngcontent-%COMP%]{display:flex;align-items:center;width:100%;column-gap:1rem}.qfsSelector[_ngcontent-%COMP%] h4[_ngcontent-%COMP%]{min-width:-moz-fit-content;min-width:fit-content}.qfsSelector[_ngcontent-%COMP%] mat-form-field[_ngcontent-%COMP%]{flex-grow:1}.qfsSelector[_ngcontent-%COMP%] mat-spinner[_ngcontent-%COMP%], .qfsSelector[_ngcontent-%COMP%] button[_ngcontent-%COMP%]{margin-bottom:1.34375em}"],changeDetection:0}),i})();function ige(i,t){if(1&i&&(G(0,"mat-error"),Be(1),j()),2&i){const e=re(2);V(1),Dh(" ",e.resourceError.data.error_class,": ",e.resourceError.data.error_text," ")}}function rge(i,t){1&i&&Ie(0,"mat-spinner",5)}function sge(i,t){if(1&i&&(G(0,"div",2),fe(1,ige,2,2,"mat-error",3),fe(2,rge,1,0,"mat-spinner",4),j()),2&i){const e=re();V(1),U("ngIf",e.resourceError),V(1),U("ngIf",!e.resourceError)}}function oge(i,t){}let n0=(()=>{class i{constructor(e,n){this.mainService=e,this.deep=n,this._component=null,this._componentChangedSub=null,this.destroyed$=new Te,this.resourceSet$=new Te,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)}resourceEqual(e,n){return e&&n?e.id===n.id&&this.deep.deepEquals(e.data,n.data):!e==!n}set resource(e){if(!this.resourceEqual(e,this._resourceError||this._resource)&&(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(Ue(this.destroyed$),Ue(this.resourceSet$)).subscribe(()=>{const s=this._resource.id,o=this._resource.data;if(o instanceof Array)if(this._resource.schema.block_class_mro.startsWith("BytesBlock"))this.mainService.dataBlockChange$.next([s,o]);else 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 age(i,t){1&i&&Ie(0,"mat-icon",17)}function lge(i,t){1&i&&Ie(0,"mat-icon",18)}let cge=(()=>{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 nt(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 nt(function*(){if(e.mainService.hasUnsavedChanges){let n=e.dialog.open(SV,{data:{text:"There are unsaved changes, which will be lost. Are you sure you want to reload file?"}});if(!(yield lR(n.afterClosed())))return}yield e.mainService.reloadResource(),e.cdr.markForCheck()})()}}return i.\u0275fac=function(e){return new(e||i)(E(Jl),E(Fa),E(Bm),E(RV),E(Qn))},i.\u0275cmp=ot({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&&(G(0,"mat-toolbar",0)(1,"span"),Be(2),ct(3,"async"),ct(4,"async"),j(),Ie(5,"span",1),G(6,"button",2),Oe("click",function(){return n.toggleUnknownsVisibility()}),fe(7,age,1,0,"mat-icon",3),ct(8,"async"),fe(9,lge,1,0,"mat-icon",4),ct(10,"async"),j(),Ie(11,"mat-divider",5)(12,"app-block-actions",6),ct(13,"async"),G(14,"button",7),Oe("click",function(){return n.reloadResource()}),ct(15,"async"),Ie(16,"mat-icon",8),j(),Ie(17,"mat-divider",5),G(18,"button",9),Oe("click",function(){return n.saveResource()}),ct(19,"async"),ct(20,"async"),Ie(21,"mat-icon",10),j()(),G(22,"div",11),Ie(23,"div",12)(24,"app-editor",13),ct(25,"async"),ct(26,"async"),ct(27,"async"),G(28,"div",14)(29,"a",15),Ie(30,"img",16),j()(),Ie(31,"div",12),j()),2&e){let r;V(2),Dh("",(null==(r=ut(3,9,n.mainService.resource$))?null:r.name)||"...","",ut(4,11,n.mainService.hasUnsavedChanges$)?"*":"",""),V(5),U("ngIf",ut(8,13,n.mainService.hideHiddenFields$)),V(2),U("ngIf",!ut(10,15,n.mainService.hideHiddenFields$)),V(3),U("resource",ut(13,17,n.mainService.resource$)),V(2),U("disabled",!ut(15,19,n.mainService.eelDelegate.openedResourcePath$)),V(4),U("disabled",!ut(19,21,n.mainService.resource$)||!ut(20,23,n.mainService.hasUnsavedChanges$)),V(6),U("resource",ut(25,25,n.mainService.customActionRunning$)?null:ut(26,27,n.mainService.resource$)||ut(27,29,n.mainService.error$))("hideBlockActions",!0)}},dependencies:[_i,CJ,EJ,Fs,XM,gR,n0,nE,Xo],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 MG(i){return new pe(3e3,!1)}function Gge(){return typeof window<"u"&&typeof window.document<"u"}function MO(){return typeof process<"u"&&"[object process]"==={}.toString.call(process)}function Nu(i){switch(i.length){case 0:return new nb;case 1:return i[0];default:return new aV(i)}}function CG(i,t,e,n,r=new Map,s=new Map){const o=[],a=[];let l=-1,c=null;if(n.forEach(d=>{const h=d.get("offset"),p=h==l,m=p&&c||new Map;d.forEach((g,b)=>{let v=b,y=g;if("offset"!==b)switch(v=t.normalizePropertyName(v,o),y){case rR:y=r.get(b);break;case Kc: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 kge(i){return new pe(3502,!1)}();return a}function CO(i,t,e,n){switch(t){case"start":i.onStart(()=>n(e&&SO(e,"start",i)));break;case"done":i.onDone(()=>n(e&&SO(e,"done",i)));break;case"destroy":i.onDestroy(()=>n(e&&SO(e,"destroy",i)))}}function SO(i,t,e){const s=EO(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 EO(i,t,e,n,r="",s=0,o){return{element:i,triggerName:t,fromState:e,toState:n,phaseName:r,totalTime:s,disabled:!!o}}function aa(i,t,e){let n=i.get(t);return n||i.set(t,n=e),n}function SG(i){const t=i.indexOf(":");return[i.substring(1,t),i.slice(t+1)]}let AO=(i,t)=>!1,EG=(i,t,e)=>[],AG=null;function DO(i){const t=i.parentNode||i.host;return t===AG?null:t}(MO()||typeof Element<"u")&&(Gge()?(AG=(()=>document.documentElement)(),AO=(i,t)=>{for(;t;){if(t===i)return!0;t=DO(t)}return!1}):AO=(i,t)=>i.contains(t),EG=(i,t,e)=>{if(e)return Array.from(i.querySelectorAll(t));const n=i.querySelector(t);return n?[n]:[]});let If=null,DG=!1;const TG=AO,IG=EG;let RG=(()=>{class i{validateStyleProperty(e){return function jge(i){If||(If=function Yge(){return typeof document<"u"?document.body:null}()||{},DG=!!If.style&&"WebkitAppearance"in If.style);let t=!0;return If.style&&!function Wge(i){return"ebkit"==i.substring(1,6)}(i)&&(t=i in If.style,!t&&DG&&(t="Webkit"+i.charAt(0).toUpperCase()+i.slice(1)in If.style)),t}(e)}matchesElement(e,n){return!1}containsElement(e,n){return TG(e,n)}getParentElement(e){return DO(e)}query(e,n,r){return IG(e,n,r)}computeStyle(e,n,r){return r||""}animate(e,n,r,s,o,a=[],l){return new nb(r,s)}}return i.\u0275fac=function(e){return new(e||i)},i.\u0275prov=Pe({token:i,factory:i.\u0275fac}),i})(),TO=(()=>{class i{}return i.NOOP=new RG,i})();const qge=1e3,IO="ng-enter",iE="ng-leave",rE="ng-trigger",sE=".ng-trigger",PG="ng-animating",RO=".ng-animating";function fd(i){if("number"==typeof i)return i;const t=i.match(/^(-?[\.\d]+)(m?s)/);return!t||t.length<2?0:kO(parseFloat(t[1]),t[2])}function kO(i,t){return"s"===t?i*qge:i}function oE(i,t,e){return i.hasOwnProperty("duration")?i:function Kge(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(MG()),{duration:0,delay:0,easing:""};r=kO(parseFloat(a[1]),a[2]);const l=a[3];null!=l&&(s=kO(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 dge(){return new pe(3100,!1)}()),a=!0),s<0&&(t.push(function uge(){return new pe(3101,!1)}()),a=!0),a&&t.splice(l,0,MG())}return{duration:r,delay:s,easing:o}}(i,t,e)}function r0(i,t={}){return Object.keys(i).forEach(e=>{t[e]=i[e]}),t}function OG(i){const t=new Map;return Object.keys(i).forEach(e=>{t.set(e,i[e])}),t}function Bu(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 LG(i,t,e){return e?t+":"+e+";":""}function NG(i){let t="";for(let e=0;e{const s=OO(r);e&&!e.has(r)&&e.set(r,i.style[s]),i.style[s]=n}),MO()&&NG(i))}function Rf(i,t){i.style&&(t.forEach((e,n)=>{const r=OO(n);i.style[r]=""}),MO()&&NG(i))}function s0(i){return Array.isArray(i)?1==i.length?i[0]:rV(i):i}const PO=new RegExp("{{\\s*(.+?)\\s*}}","g");function BG(i){let t=[];if("string"==typeof i){let e;for(;e=PO.exec(i);)t.push(e[1]);PO.lastIndex=0}return t}function o0(i,t,e){const n=i.toString(),r=n.replace(PO,(s,o)=>{let a=t[o];return null==a&&(e.push(function fge(i){return new pe(3003,!1)}()),a=""),a.toString()});return r==n?i:r}function aE(i){const t=[];let e=i.next();for(;!e.done;)t.push(e.value),e=i.next();return t}const Jge=/-+([a-z0-9])/g;function OO(i){return i.replace(Jge,(...t)=>t[1].toUpperCase())}function e_e(i){return i.replace(/([a-z])([A-Z])/g,"$1-$2").toLowerCase()}function la(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 pge(i){return new pe(3004,!1)}()}}function UG(i,t){return window.getComputedStyle(i)[t]}const dE="*";function o_e(i,t){const e=[];return"string"==typeof i?i.split(/\s*,\s*/).forEach(n=>function a_e(i,t,e){if(":"==i[0]){const l=function l_e(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 Age(i){return new pe(3015,!1)}()),t;const r=n[1],s=n[2],o=n[3];t.push(VG(r,o));"<"==s[0]&&!(r==dE&&o==dE)&&t.push(VG(o,r))}(n,e,t)):e.push(i),e}const uE=new Set(["true","1"]),hE=new Set(["false","0"]);function VG(i,t){const e=uE.has(i)||hE.has(i),n=uE.has(t)||hE.has(t);return(r,s)=>{let o=i==dE||i==r,a=t==dE||t==s;return!o&&e&&"boolean"==typeof r&&(o=r?uE.has(i):hE.has(i)),!a&&n&&"boolean"==typeof s&&(a=s?uE.has(t):hE.has(t)),o&&a}}const c_e=new RegExp("s*:selfs*,?","g");function FO(i,t,e,n){return new d_e(i).build(t,e,n)}class d_e{constructor(t){this._driver=t}build(t,e,n){const r=new f_e(e);return this._resetContextStyleTimingState(r),la(this,s0(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 gge(){return new pe(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(d=>{l.name=d,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 _ge(){return new pe(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=>{BG(l).forEach(c=>{o.hasOwnProperty(c)||s.add(c)})})}),s.size&&(aE(s.values()),e.errors.push(function vge(i,t){return new pe(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=la(this,s0(t.animation),e);return{type:1,matchers:o_e(t.expr,e.errors),animation:n,queryCount:e.queryCount,depCount:e.depCount,options:kf(t.options)}}visitSequence(t,e){return{type:2,steps:t.steps.map(n=>la(this,n,e)),options:kf(t.options)}}visitGroup(t,e){const n=e.currentTime;let r=0;const s=t.steps.map(o=>{e.currentTime=n;const a=la(this,o,e);return r=Math.max(r,e.currentTime),a});return e.currentTime=r,{type:3,steps:s,options:kf(t.options)}}visitAnimate(t,e){const n=function m_e(i,t){if(i.hasOwnProperty("duration"))return i;if("number"==typeof i)return LO(oE(i,t).duration,0,"");const e=i;if(e.split(/\s+/).some(s=>"{"==s.charAt(0)&&"{"==s.charAt(1))){const s=LO(0,0,"");return s.dynamic=!0,s.strValue=e,s}const r=oE(e,t);return LO(r.duration,r.delay,r.easing)}(t.timings,e.errors);e.currentAnimateTimings=n;let r,s=t.styles?t.styles:oi({});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=oi(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===Kc?n.push(a):e.errors.push(new pe(3002,!1)):n.push(OG(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),d=c.get(l);let h=!0;d&&(s!=r&&s>=d.startTime&&r<=d.endTime&&(e.errors.push(function bge(i,t,e,n,r){return new pe(3010,!1)}()),h=!1),s=d.startTime),h&&c.set(l,{startTime:s,endTime:r}),e.options&&function Qge(i,t,e){const n=t.params||{},r=BG(i);r.length&&r.forEach(s=>{n.hasOwnProperty(s)||e.push(function hge(i){return new pe(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 xge(){return new pe(3011,!1)}()),n;let s=0;const o=[];let a=!1,l=!1,c=0;const d=t.steps.map(y=>{const M=this._makeStyleAst(y,e);let x=null!=M.offset?M.offset:function p_e(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:la(this,s0(t.animation),e),options:kf(t.options)}}visitAnimateChild(t,e){return e.depCount++,{type:9,options:kf(t.options)}}visitAnimateRef(t,e){return{type:10,animation:this.visitReference(t.animation,e),options:kf(t.options)}}visitQuery(t,e){const n=e.currentQuerySelector,r=t.options||{};e.queryCount++,e.currentQuery=t;const[s,o]=function u_e(i){const t=!!i.split(/\s*,\s*/).find(e=>":self"==e);return t&&(i=i.replace(c_e,"")),i=i.replace(/@\*/g,sE).replace(/@\w+/g,e=>sE+"-"+e.slice(1)).replace(/:animating/g,RO),[i,t]}(t.selector);e.currentQuerySelector=n.length?n+" "+s:s,aa(e.collectedStyles,e.currentQuerySelector,new Map);const a=la(this,s0(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:kf(t.options)}}visitStagger(t,e){e.currentQuery||e.errors.push(function Sge(){return new pe(3013,!1)}());const n="full"===t.timings?{duration:0,delay:0,easing:"full"}:oE(t.timings,e.errors,!0);return{type:12,animation:la(this,s0(t.animation),e),timings:n,options:null}}}class f_e{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 kf(i){return i?(i=r0(i)).params&&(i.params=function h_e(i){return i?r0(i):null}(i.params)):i={},i}function LO(i,t,e){return{duration:i,delay:t,easing:e}}function NO(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 fE{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 v_e=new RegExp(":enter","g"),b_e=new RegExp(":leave","g");function BO(i,t,e,n,r,s=new Map,o=new Map,a,l,c=[]){return(new x_e).buildKeyframes(i,t,e,n,r,s,o,a,l,c)}class x_e{buildKeyframes(t,e,n,r,s,o,a,l,c,d=[]){c=c||new fE;const h=new UO(t,e,c,r,s,d,[]);h.options=l;const p=l.delay?fd(l.delay):0;h.currentTimeline.delayNextStep(p),h.currentTimeline.setStyles([o],null,h.errors,l),la(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()):[NO(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:fd(o0(s,r?.params??{},e.errors));n.delayNextStep(o)}}}_visitSubInstructions(t,e,n){let s=e.currentTimeline.currentTime;const o=null!=n.duration?fd(n.duration):null,a=null!=n.delay?fd(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),la(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=pE);const o=fd(s.delay);r.delayNextStep(o)}t.steps.length&&(t.steps.forEach(o=>la(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?fd(t.options.delay):0;t.steps.forEach(o=>{const a=e.createSubContext(t.options);s&&a.delayNextStep(s),la(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 oE(e.params?o0(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?fd(r.delay):0;s&&(6===e.previousNode.type||0==n&&e.currentTimeline.hasCurrentStyleProperties())&&(e.currentTimeline.snapshotCurrentStyles(),e.previousNode=pE);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,d)=>{e.currentQueryIndex=d;const h=e.createSubContext(t.options,c);s&&h.delayNextStep(s),c===e.element&&(l=h.currentTimeline),la(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 d=e.currentTimeline;l&&d.delayNextStep(l);const h=d.currentTime;la(this,t.animation,e),e.previousNode=t,n.currentStaggerTime=r.currentTime-h+(r.startTime-n.currentTimeline.startTime)}}const pE={};class UO{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=pE,this.subContextCount=0,this.options={},this.currentQueryIndex=0,this.currentQueryTotal=0,this.currentStaggerTime=0,this.currentTimeline=l||new mE(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=fd(n.duration)),null!=n.delay&&(r.delay=fd(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]=o0(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 UO(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=pE,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 w_e(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(v_e,"."+this._enterClassName)).replace(b_e,"."+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 Ege(i){return new pe(3014,!1)}()),a}}class mE{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 mE(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||Kc),this._currentKeyframe.set(e,Kc);this._currentEmptyStepKeyframe=this._currentKeyframe}setStyles(t,e,n,r){e&&this._previousKeyframe.set("easing",e);const s=r&&r.params||{},o=function M_e(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,Kc)}else Bu(r,e)}),e}(t,this._globalTimelineStyles);for(let[a,l]of o){const c=o0(l,s,n);this._pendingStyles.set(a,c),this._localTimelineStyles.has(a)||this._backFill.set(a,this._globalTimelineStyles.get(a)??Kc),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=Bu(a,new Map,this._backFill);c.forEach((d,h)=>{d===rR?t.add(h):d===Kc&&e.add(h)}),n||c.set("offset",l/this.duration),r.push(c)});const s=t.size?aE(t.values()):[],o=e.size?aE(e.values()):[];if(n){const a=r[0],l=new Map(a);a.set("offset",0),l.set("offset",1),r=[a,l]}return NO(this.element,r,s,o,this.duration,this.startTime,this.easing,!1)}}class w_e extends mE{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=Bu(t[0]);l.set("offset",0),s.push(l);const c=Bu(t[0]);c.set("offset",$G(a)),s.push(c);const d=t.length-1;for(let h=1;h<=d;h++){let p=Bu(t[h]);const m=p.get("offset");p.set("offset",$G((e+m*n)/o)),s.push(p)}n=o,e=0,r="",t=s}return NO(this.element,t,this.preStyleProps,this.postStyleProps,n,e,r,!0)}}function $G(i,t=3){const e=Math.pow(10,t-1);return Math.round(i*e)/e}class VO{}const C_e=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 S_e extends VO{normalizePropertyName(t,e){return OO(t)}normalizeStyleValue(t,e,n,r){let s="";const o=n.toString().trim();if(C_e.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 mge(i,t){return new pe(3005,!1)}())}return o+s}}function GG(i,t,e,n,r,s,o,a,l,c,d,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:d,totalTime:h,errors:p}}const zO={};class WG{constructor(t,e,n){this._triggerName=t,this.ast=e,this._stateStyles=n}match(t,e,n,r){return function E_e(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,d){const h=[],p=this.ast.options&&this.ast.options.params||zO,g=this.buildStyles(n,a&&a.params||zO,h),b=l&&l.params||zO,v=this.buildStyles(r,b,h),y=new Set,M=new Map,x=new Map,C="void"===r,F={params:A_e(b,p),delay:this.ast.options?.delay},D=d?[]:BO(t,e,this.ast.animation,s,o,g,v,F,c,h);let k=0;if(D.forEach(T=>{k=Math.max(T.duration+T.delay,k)}),h.length)return GG(e,this._triggerName,n,r,C,g,v,[],[],M,x,k,h);D.forEach(T=>{const A=T.element,W=aa(M,A,new Set);T.preStyleProps.forEach(ne=>W.add(ne));const ie=aa(x,A,new Set);T.postStyleProps.forEach(ne=>ie.add(ne)),A!==e&&y.add(A)});const B=aE(y.values());return GG(e,this._triggerName,n,r,C,g,v,D,B,M,x,k)}}function A_e(i,t){const e=r0(t);for(const n in i)i.hasOwnProperty(n)&&null!=i[n]&&(e[n]=i[n]);return e}class D_e{constructor(t,e,n){this.styles=t,this.defaultParams=e,this.normalizer=n}buildStyles(t,e){const n=new Map,r=r0(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=o0(o,r,e));const l=this.normalizer.normalizePropertyName(a,e);o=this.normalizer.normalizeStyleValue(a,l,o,e),n.set(a,o)})}),n}}class I_e{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 D_e(r.style,r.options&&r.options.params||{},n))}),jG(this.states,"true","1"),jG(this.states,"false","0"),e.transitions.forEach(r=>{this.transitionFactories.push(new WG(t,r,this.states))}),this.fallbackTransition=function R_e(i,t,e){return new WG(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 jG(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 k_e=new fE;class P_e{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=FO(this._driver,e,n,r);if(n.length)throw function Pge(i){return new pe(3503,!1)}();this._animations.set(t,s)}_buildPlayer(t,e,n){const r=t.element,s=CG(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=BO(this._driver,e,s,IO,iE,new Map,new Map,n,k_e,r),o.forEach(d=>{const h=aa(a,d.element,new Map);d.postStyleProps.forEach(p=>h.set(p,null))})):(r.push(function Oge(){return new pe(3300,!1)}()),o=[]),r.length)throw function Fge(i){return new pe(3504,!1)}();a.forEach((d,h)=>{d.forEach((p,m)=>{d.set(m,this._driver.computeStyle(h,m,Kc))})});const c=Nu(o.map(d=>{const h=a.get(d.element);return this._buildPlayer(d,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 Lge(i){return new pe(3301,!1)}();return e}listen(t,e,n,r){const s=EO(e,"","","");return CO(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 YG="ng-animate-queued",HO="ng-animate-disabled",B_e=[],qG={namespaceId:"",setForRemoval:!1,setForMove:!1,hasAnimation:!1,removedBeforeQueried:!1},U_e={namespaceId:"",setForMove:!1,setForRemoval:!1,hasAnimation:!1,removedBeforeQueried:!0},za="__ng_removed";class $O{get params(){return this.options.params}constructor(t,e=""){this.namespaceId=e;const n=t&&t.hasOwnProperty("value");if(this.value=function $_e(i){return i??null}(n?t.value:t),n){const s=r0(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 a0="void",GO=new $O(a0);class V_e{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,Ha(e,this._hostClassName)}listen(t,e,n,r){if(!this._triggers.has(e))throw function Nge(i,t){return new pe(3302,!1)}();if(null==n||0==n.length)throw function Bge(i){return new pe(3303,!1)}();if(!function G_e(i){return"start"==i||"done"==i}(n))throw function Uge(i,t){return new pe(3400,!1)}();const s=aa(this._elementListeners,t,[]),o={name:e,phase:n,callback:r};s.push(o);const a=aa(this._engine.statesByElement,t,new Map);return a.has(e)||(Ha(t,rE),Ha(t,rE+"-"+e),a.set(e,GO)),()=>{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 Vge(i){return new pe(3401,!1)}();return e}trigger(t,e,n,r=!0){const s=this._getTrigger(e),o=new WO(this.id,e,t);let a=this._engine.statesByElement.get(t);a||(Ha(t,rE),Ha(t,rE+"-"+e),this._engine.statesByElement.set(t,a=new Map));let l=a.get(e);const c=new $O(n,this.id);if(!(n&&n.hasOwnProperty("value"))&&l&&c.absorbOptions(l.options),a.set(e,c),l||(l=GO),c.value!==a0&&l.value===c.value){if(!function Y_e(i,t){const e=Object.keys(i),n=Object.keys(t);if(e.length!=n.length)return!1;for(let r=0;r{Rf(t,v),fc(t,y)})}return}const p=aa(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||(Ha(t,YG),o.onStart(()=>{Yg(t,YG)})),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,sE,!0);n.forEach(r=>{if(r[za])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 d=this.trigger(t,c,a0,r);d&&a.push(d)}}),a.length)return this._engine.markElementAsRemoved(this.id,t,!0,e,o),n&&Nu(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)||GO,d=new $O(a0),h=new WO(this.id,o,t);this._engine.totalQueuedPlayers++,this._queue.push({element:t,triggerName:o,transition:l,fromState:c,toState:d,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[za];(!s||s===qG)&&(n.afterFlush(()=>this.clearElementCache(t)),n.destroyInnerAnimations(t),n._onRemovalComplete(t,e))}}insertNode(t,e){Ha(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=EO(s,n.triggerName,n.fromState.value,n.toState.value);l._data=t,CO(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 z_e{_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 V_e(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(gE(e)){const s=this._fetchNamespace(t);if(s)return s.trigger(e,n,r),!0}return!1}insertNode(t,e,n,r){if(!gE(e))return;const s=e[za];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),Ha(t,HO)):this.disabledNodes.has(t)&&(this.disabledNodes.delete(t),Yg(t,HO))}removeNode(t,e,n,r){if(gE(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[za]={namespaceId:t,setForRemoval:r,hasAnimation:n,removedBeforeQueried:!1,previousTriggersValues:s}}listen(t,e,n,r,s){return gE(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,sE,!0);e.forEach(n=>this.destroyActiveAnimationsForElement(n)),0!=this.playersByQueriedElement.size&&(e=this.driver.query(t,RO,!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 Nu(this.players).onDone(()=>t());t()})}processLeaveNode(t){const e=t[za];if(e&&e.setForRemoval){if(t[za]=qG,e.namespaceId){this.destroyInnerAnimations(t);const n=this._fetchNamespace(e.namespaceId);n&&n.clearElementCache(t)}this._onRemovalComplete(t,e.setForRemoval)}t.classList?.contains(HO)&&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?Nu(e).onDone(()=>{n.forEach(r=>r())}):n.forEach(r=>r())}}reportError(t){throw function zge(i){return new pe(3402,!1)}()}_flushAnimations(t,e){const n=new fE,r=[],s=new Map,o=[],a=new Map,l=new Map,c=new Map,d=new Set;this.disabledNodes.forEach(q=>{d.add(q);const se=this.driver.query(q,".ng-animate-queued",!0);for(let J=0;J{const J=IO+b++;g.set(se,J),q.forEach(we=>Ha(we,J))});const v=[],y=new Set,M=new Set;for(let q=0;qy.add(we)):M.add(se))}const x=new Map,C=ZG(p,Array.from(y));C.forEach((q,se)=>{const J=iE+b++;x.set(se,J),q.forEach(we=>Ha(we,J))}),t.push(()=>{m.forEach((q,se)=>{const J=g.get(se);q.forEach(we=>Yg(we,J))}),C.forEach((q,se)=>{const J=x.get(se);q.forEach(we=>Yg(we,J))}),v.forEach(q=>{this.processLeaveNode(q)})});const F=[],D=[];for(let q=this._namespaceList.length-1;q>=0;q--)this._namespaceList[q].drainQueuedTransitions(e).forEach(J=>{const we=J.player,Ve=J.element;if(F.push(we),this.collectedEnterElements.length){const Le=Ve[za];if(Le&&Le.setForMove){if(Le.previousTriggersValues&&Le.previousTriggersValues.has(J.triggerName)){const wt=Le.previousTriggersValues.get(J.triggerName),Tt=this.statesByElement.get(J.element);if(Tt&&Tt.has(J.triggerName)){const St=Tt.get(J.triggerName);St.value=wt,Tt.set(J.triggerName,St)}}return void we.destroy()}}const Ye=!h||!this.driver.containsElement(h,Ve),Rt=x.get(Ve),nn=g.get(Ve),le=this._buildInstruction(J,n,nn,Rt,Ye);if(le.errors&&le.errors.length)return void D.push(le);if(Ye)return we.onStart(()=>Rf(Ve,le.fromStyles)),we.onDestroy(()=>fc(Ve,le.toStyles)),void r.push(we);if(J.isFallbackTransition)return we.onStart(()=>Rf(Ve,le.fromStyles)),we.onDestroy(()=>fc(Ve,le.toStyles)),void r.push(we);const Fe=[];le.timelines.forEach(Le=>{Le.stretchStartingKeyframe=!0,this.disabledNodes.has(Le.element)||Fe.push(Le)}),le.timelines=Fe,n.append(Ve,le.timelines),o.push({instruction:le,player:we,element:Ve}),le.queriedElements.forEach(Le=>aa(a,Le,[]).push(we)),le.preStyleProps.forEach((Le,wt)=>{if(Le.size){let Tt=l.get(wt);Tt||l.set(wt,Tt=new Set),Le.forEach((St,Sn)=>Tt.add(Sn))}}),le.postStyleProps.forEach((Le,wt)=>{let Tt=c.get(wt);Tt||c.set(wt,Tt=new Set),Le.forEach((St,Sn)=>Tt.add(Sn))})});if(D.length){const q=[];D.forEach(se=>{q.push(function Hge(i,t){return new pe(3505,!1)}())}),F.forEach(se=>se.destroy()),this.reportError(q)}const k=new Map,B=new Map;o.forEach(q=>{const se=q.element;n.has(se)&&(B.set(se,se),this._beforeAnimationBuild(q.player.namespaceId,q.instruction,k))}),r.forEach(q=>{const se=q.element;this._getPreviousPlayers(se,!1,q.namespaceId,q.triggerName,null).forEach(we=>{aa(k,se,[]).push(we),we.destroy()})});const T=v.filter(q=>JG(q,l,c)),A=new Map;KG(A,this.driver,M,c,Kc).forEach(q=>{JG(q,l,c)&&T.push(q)});const ie=new Map;m.forEach((q,se)=>{KG(ie,this.driver,new Set(q),l,rR)}),T.forEach(q=>{const se=A.get(q),J=ie.get(q);A.set(q,new Map([...Array.from(se?.entries()??[]),...Array.from(J?.entries()??[])]))});const ne=[],oe=[],ge={};o.forEach(q=>{const{element:se,player:J,instruction:we}=q;if(n.has(se)){if(d.has(se))return J.onDestroy(()=>fc(se,we.toStyles)),J.disabled=!0,J.overrideTotalTime(we.totalTime),void r.push(J);let Ve=ge;if(B.size>1){let Rt=se;const nn=[];for(;Rt=Rt.parentNode;){const le=B.get(Rt);if(le){Ve=le;break}nn.push(Rt)}nn.forEach(le=>B.set(le,Ve))}const Ye=this._buildAnimation(J.namespaceId,we,k,s,ie,A);if(J.setRealPlayer(Ye),Ve===ge)ne.push(J);else{const Rt=this.playersByElement.get(Ve);Rt&&Rt.length&&(J.parentPlayer=Nu(Rt)),r.push(J)}}else Rf(se,we.fromStyles),J.onDestroy(()=>fc(se,we.toStyles)),oe.push(J),d.has(se)&&r.push(J)}),oe.forEach(q=>{const se=s.get(q.element);if(se&&se.length){const J=Nu(se);q.setRealPlayer(J)}}),r.forEach(q=>{q.parentPlayer?q.syncPlayerEvents(q.parentPlayer):q.destroy()});for(let q=0;q!Ye.destroyed);Ve.length?W_e(this,se,Ve):this.processLeaveNode(se)}return v.length=0,ne.forEach(q=>{this.players.push(q),q.onDone(()=>{q.destroy();const se=this.players.indexOf(q);this.players.splice(se,1)}),q.play()}),ne}elementContainsData(t,e){let n=!1;const r=e[za];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==a0;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,d=c!==s,h=aa(n,c,[]);this._getPreviousPlayers(c,d,o,a,e.toState).forEach(m=>{const g=m.getRealPlayer();g.beforeDestroy&&g.beforeDestroy(),m.destroy(),h.push(m)})}Rf(s,e.fromStyles)}_buildAnimation(t,e,n,r,s,o){const a=e.triggerName,l=e.element,c=[],d=new Set,h=new Set,p=e.timelines.map(g=>{const b=g.element;d.add(b);const v=b[za];if(v&&v.removedBeforeQueried)return new nb(g.duration,g.delay);const y=b!==l,M=function j_e(i){const t=[];return QG(i,t),t}((n.get(b)||B_e).map(k=>k.getRealPlayer())).filter(k=>!!k.element&&k.element===b),x=s.get(b),C=o.get(b),F=CG(0,this._normalizer,0,g.keyframes,x,C),D=this._buildPlayer(g,F,M);if(g.subTimeline&&r&&h.add(b),y){const k=new WO(t,a,b);k.setRealPlayer(D),c.push(k)}return D});c.forEach(g=>{aa(this.playersByQueriedElement,g.element,[]).push(g),g.onDone(()=>function H_e(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))}),d.forEach(g=>Ha(g,PG));const m=Nu(p);return m.onDestroy(()=>{d.forEach(g=>Yg(g,PG)),fc(l,e.toStyles)}),h.forEach(g=>{aa(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 nb(t.duration,t.delay)}}class WO{constructor(t,e,n){this.namespaceId=t,this.triggerName=e,this.element=n,this._player=new nb,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=>CO(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){aa(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 gE(i){return i&&1===i.nodeType}function XG(i,t){const e=i.style.display;return i.style.display=t??"none",e}function KG(i,t,e,n,r){const s=[];e.forEach(l=>s.push(XG(l)));const o=[];n.forEach((l,c)=>{const d=new Map;l.forEach(h=>{const p=t.computeStyle(c,h,r);d.set(h,p),(!p||0==p.length)&&(c[za]=U_e,o.push(c))}),i.set(c,d)});let a=0;return e.forEach(l=>XG(l,s[a++])),o}function ZG(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 Ha(i,t){i.classList?.add(t)}function Yg(i,t){i.classList?.remove(t)}function W_e(i,t,e){Nu(e).onDone(()=>i.processLeaveNode(t))}function QG(i,t){for(let e=0;er.add(s)):t.set(i,n),e.delete(i),!0}class _E{constructor(t,e,n){this.bodyNode=t,this._driver=e,this._normalizer=n,this._triggerCache={},this.onRemovalComplete=(r,s)=>{},this._transitionEngine=new z_e(t,e,n),this._timelineEngine=new P_e(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=[],d=FO(this._driver,s,l,c);if(l.length)throw function Rge(i,t){return new pe(3404,!1)}();a=function T_e(i,t,e){return new I_e(i,t,e)}(r,d,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]=SG(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]=SG(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 X_e=(()=>{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&&fc(this._element,this._startStyles,this._initialStyles),this._state=1)}finish(){this.start(),this._state<2&&(fc(this._element,this._initialStyles),this._endStyles&&(fc(this._element,this._endStyles),this._endStyles=null),this._state=1)}destroy(){this.finish(),this._state<3&&(i.initialStylesByElement.delete(this._element),this._startStyles&&(Rf(this._element,this._startStyles),this._endStyles=null),this._endStyles&&(Rf(this._element,this._endStyles),this._endStyles=null),fc(this._element,this._initialStyles),this._state=3)}}return i.initialStylesByElement=new WeakMap,i})();function jO(i){let t=null;return i.forEach((e,n)=>{(function K_e(i){return"display"===i||"position"===i})(n)&&(t=t||new Map,t.set(n,e))}),t}class e8{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:UG(this.element,r))}),this.currentSnapshot=t}triggerCallback(t){const e="start"===t?this._onStartFns:this._onDoneFns;e.forEach(n=>n()),e.length=0}}class Z_e{validateStyleProperty(t){return!0}validateAnimatableStyleProperty(t){return!0}matchesElement(t,e){return!1}containsElement(t,e){return TG(t,e)}getParentElement(t){return DO(t)}query(t,e,n){return IG(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,d=o.filter(m=>m instanceof e8);(function t_e(i,t){return 0===i||0===t})(n,r)&&d.forEach(m=>{m.currentSnapshot.forEach((g,b)=>c.set(b,g))});let h=function Zge(i){return i.length?i[0]instanceof Map?i:i.map(t=>OG(t)):[]}(e).map(m=>Bu(m));h=function n_e(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,UG(i,a)))}}return t}(t,h,c);const p=function q_e(i,t){let e=null,n=null;return Array.isArray(t)&&t.length?(e=jO(t[0]),t.length>1&&(n=jO(t[t.length-1]))):t instanceof Map&&(e=jO(t)),e||n?new X_e(i,e,n):null}(t,h);return new e8(t,h,l,p)}}let Q_e=(()=>{class i extends nV{constructor(e,n){super(),this._nextAnimationId=0,this._renderer=e.createRenderer(n.body,{id:"0",encapsulation:Ks.None,styles:[],data:{animation:[]}})}build(e){const n=this._nextAnimationId.toString();this._nextAnimationId++;const r=Array.isArray(e)?rV(e):e;return t8(this._renderer,null,n,"register",[r]),new J_e(n,this._renderer)}}return i.\u0275fac=function(e){return new(e||i)(ee(Gl),ee(qt))},i.\u0275prov=Pe({token:i,factory:i.\u0275fac}),i})();class J_e extends LQ{constructor(t,e){super(),this._id=t,this._renderer=e}create(t,e){return new eve(this._id,t,e||{},this._renderer)}}class eve{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 t8(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 t8(i,t,e,n,r){return i.setProperty(t,`@@${e}:${n}`,r)}const n8="@.disabled";let tve=(()=>{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 d=this._rendererCache.get(s);return d||(d=new i8("",s,this.engine,()=>this._rendererCache.delete(s)),this._rendererCache.set(s,d)),d}const o=n.id,a=n.id+"-"+this._currentId;this._currentId++,this.engine.register(a,e);const l=d=>{Array.isArray(d)?d.forEach(l):this.engine.registerTrigger(o,a,e,d.name,d)};return n.data.animation.forEach(l),new nve(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)(ee(Gl),ee(_E),ee(gt))},i.\u0275prov=Pe({token:i,factory:i.\u0275fac}),i})();class i8{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==n8?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 nve extends i8{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==n8?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 ive(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 rve(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 r8=[{provide:nV,useClass:Q_e},{provide:VO,useFactory:function ove(){return new S_e}},{provide:_E,useClass:(()=>{class i extends _E{constructor(e,n,r,s){super(e.body,n,r)}ngOnDestroy(){this.flush()}}return i.\u0275fac=function(e){return new(e||i)(ee(qt),ee(TO),ee(VO),ee(dm))},i.\u0275prov=Pe({token:i,factory:i.\u0275fac}),i})()},{provide:Gl,useFactory:function ave(i,t,e){return new tve(i,t,e)},deps:[lM,_E,gt]}],YO=[{provide:TO,useFactory:()=>new Z_e},{provide:kr,useValue:"BrowserAnimations"},...r8],s8=[{provide:TO,useClass:RG},{provide:kr,useValue:"NoopAnimations"},...r8];let lve=(()=>{class i{static withConfig(e){return{ngModule:i,providers:e.disableAnimations?s8:YO}}}return i.\u0275fac=function(e){return new(e||i)},i.\u0275mod=en({type:i}),i.\u0275inj=Wt({providers:YO,imports:[LB]}),i})();const o8=new me("CdkAccordion");let cve=0,dve=(()=>{class i{get expanded(){return this._expanded}set expanded(e){e=tn(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=tn(e)}constructor(e,n,r){this.accordion=e,this._changeDetectorRef=n,this._expansionDispatcher=r,this._openCloseAllSubscription=Qt.EMPTY,this.closed=new $e,this.opened=new $e,this.destroyed=new $e,this.expandedChange=new $e,this.id="cdk-accordion-child-"+cve++,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)(E(o8,12),E(Qn),E($R))},i.\u0275dir=ve({type:i,selectors:[["cdk-accordion-item"],["","cdkAccordionItem",""]],inputs:{expanded:"expanded",disabled:"disabled"},outputs:{closed:"closed",opened:"opened",destroyed:"destroyed",expandedChange:"expandedChange"},exportAs:["cdkAccordionItem"],features:[Dn([{provide:o8,useValue:void 0}])]}),i})(),uve=(()=>{class i{}return i.\u0275fac=function(e){return new(e||i)},i.\u0275mod=en({type:i}),i.\u0275inj=Wt({}),i})();const hve=["body"];function fve(i,t){}const pve=[[["mat-expansion-panel-header"]],"*",[["mat-action-row"]]],mve=["mat-expansion-panel-header","*","mat-action-row"];function gve(i,t){1&i&&Ie(0,"span",2),2&i&&U("@indicatorRotate",re()._getExpandedState())}const _ve=[[["mat-panel-title"]],[["mat-panel-description"]],"*"],vve=["mat-panel-title","mat-panel-description","*"],a8=new me("MAT_ACCORDION"),l8="225ms cubic-bezier(0.4,0.0,0.2,1)",c8={indicatorRotate:Oa("indicatorRotate",[Os("collapsed, void",oi({transform:"rotate(0deg)"})),Os("expanded",oi({transform:"rotate(180deg)"})),Or("expanded <=> collapsed, void => collapsed",Yr(l8))]),bodyExpansion:Oa("bodyExpansion",[Os("collapsed, void",oi({height:"0px",visibility:"hidden"})),Os("expanded",oi({height:"*",visibility:"visible"})),Or("expanded <=> collapsed, void => collapsed",Yr(l8))])},d8=new me("MAT_EXPANSION_PANEL");let yve=(()=>{class i{constructor(e,n){this._template=e,this._expansionPanel=n}}return i.\u0275fac=function(e){return new(e||i)(E(Eo),E(d8,8))},i.\u0275dir=ve({type:i,selectors:[["ng-template","matExpansionPanelContent",""]]}),i})(),bve=0;const u8=new me("MAT_EXPANSION_PANEL_DEFAULT_OPTIONS");let h8=(()=>{class i extends dve{get hideToggle(){return this._hideToggle||this.accordion&&this.accordion.hideToggle}set hideToggle(e){this._hideToggle=tn(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 $e,this.afterCollapse=new $e,this._inputChanges=new Te,this._headerId="mat-expansion-panel-header-"+bve++,this._bodyAnimationDone=new Te,this.accordion=e,this._document=o,this._bodyAnimationDone.pipe(Ql((c,d)=>c.fromState===d.fromState&&c.toState===d.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(Do(null),gn(()=>this.expanded&&!this._portal),Oi(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)(E(a8,12),E(Qn),E($R),E(jr),E(qt),E(kr,8),E(u8,8))},i.\u0275cmp=ot({type:i,selectors:[["mat-expansion-panel"]],contentQueries:function(e,n,r){if(1&e&&Wi(r,yve,5),2&e){let s;At(s=Dt())&&(n._lazyContent=s.first)}},viewQuery:function(e,n){if(1&e&&$n(hve,5),2&e){let r;At(r=Dt())&&(n._body=r.first)}},hostAttrs:[1,"mat-expansion-panel"],hostVars:6,hostBindings:function(e,n){2&e&&ln("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:[Dn([{provide:a8,useValue:void 0},{provide:d8,useExisting:i}]),dt,xi],ngContentSelectors:mve,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&&(or(pve),Yt(0),G(1,"div",0,1),Oe("@bodyExpansion.done",function(s){return n._bodyAnimationDone.next(s)}),G(3,"div",2),Yt(4,1),fe(5,fve,0,0,"ng-template",3),j(),Yt(6,2),j()),2&e&&(V(1),U("@bodyExpansion",n._getExpandedState())("id",n.id),It("aria-labelledby",n._headerId),V(4),U("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:[c8.bodyExpansion]},changeDetection:0}),i})();class xve{}const wve=JI(xve);let Mve=(()=>{class i extends wve{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=Qt.EMPTY;const c=e.accordion?e.accordion._stateChanges.pipe(gn(d=>!(!d.hideToggle&&!d.togglePosition))):_o;this.tabIndex=parseInt(l||"")||0,this._parentChangeSubscription=Cr(e.opened,e.closed,c,e._inputChanges.pipe(gn(d=>!!(d.hideToggle||d.disabled||d.togglePosition)))).subscribe(()=>this._changeDetectorRef.markForCheck()),e.closed.pipe(gn(()=>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:Qo(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)(E(h8,1),E(vt),E(Xc),E(Qn),E(u8,8),E(kr,8),wa("tabindex"))},i.\u0275cmp=ot({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&&Oe("click",function(){return n._toggle()})("keydown",function(s){return n._keydown(s)}),2&e&&(It("id",n.panel._headerId)("tabindex",n.tabIndex)("aria-controls",n._getPanelId())("aria-expanded",n._isExpanded())("aria-disabled",n.panel.disabled),qo("height",n._getHeaderHeight()),ln("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:[dt],ngContentSelectors:vve,decls:5,vars:3,consts:[[1,"mat-content"],["class","mat-expansion-indicator",4,"ngIf"],[1,"mat-expansion-indicator"]],template:function(e,n){1&e&&(or(_ve),G(0,"span",0),Yt(1),Yt(2,1),Yt(3,2),j(),fe(4,gve,1,1,"span",1)),2&e&&(ln("mat-content-hide-toggle",!n._showToggle()),V(4),U("ngIf",n._showToggle()))},dependencies:[_i],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:[c8.indicatorRotate]},changeDetection:0}),i})(),Cve=(()=>{class i{}return i.\u0275fac=function(e){return new(e||i)},i.\u0275dir=ve({type:i,selectors:[["mat-panel-description"]],hostAttrs:[1,"mat-expansion-panel-header-description"]}),i})(),Sve=(()=>{class i{}return i.\u0275fac=function(e){return new(e||i)},i.\u0275dir=ve({type:i,selectors:[["mat-panel-title"]],hostAttrs:[1,"mat-expansion-panel-header-title"]}),i})(),Eve=(()=>{class i{}return i.\u0275fac=function(e){return new(e||i)},i.\u0275mod=en({type:i}),i.\u0275inj=Wt({imports:[co,Jn,uve,Bh]}),i})();function Ave(i,t){if(1&i&&(G(0,"mat-option",19),Be(1),j()),2&i){const e=t.$implicit;U("value",e),V(1),Qi(" ",e," ")}}function Dve(i,t){if(1&i){const e=jn();G(0,"mat-form-field",16)(1,"mat-select",17),Oe("selectionChange",function(r){return Vt(e),Et(re(2)._changePageSize(r.value))}),fe(2,Ave,2,2,"mat-option",18),j()()}if(2&i){const e=re(2);U("appearance",e._formFieldAppearance)("color",e.color),V(1),U("value",e.pageSize)("disabled",e.disabled)("aria-labelledby",e._pageSizeLabelId)("panelClass",e.selectConfig.panelClass||"")("disableOptionCentering",e.selectConfig.disableOptionCentering),V(1),U("ngForOf",e._displayedPageSizeOptions)}}function Tve(i,t){if(1&i&&(G(0,"div",20),Be(1),j()),2&i){const e=re(2);V(1),ui(e.pageSize)}}function Ive(i,t){if(1&i&&(G(0,"div",12)(1,"div",13),Be(2),j(),fe(3,Dve,3,8,"mat-form-field",14),fe(4,Tve,2,1,"div",15),j()),2&i){const e=re();V(1),BD("id",e._pageSizeLabelId),V(1),Qi(" ",e._intl.itemsPerPageLabel," "),V(1),U("ngIf",e._displayedPageSizeOptions.length>1),V(1),U("ngIf",e._displayedPageSizeOptions.length<=1)}}function Rve(i,t){if(1&i){const e=jn();G(0,"button",21),Oe("click",function(){return Vt(e),Et(re().firstPage())}),ki(),G(1,"svg",7),Ie(2,"path",22),j()()}if(2&i){const e=re();U("matTooltip",e._intl.firstPageLabel)("matTooltipDisabled",e._previousButtonsDisabled())("matTooltipPosition","above")("disabled",e._previousButtonsDisabled()),It("aria-label",e._intl.firstPageLabel)}}function kve(i,t){if(1&i){const e=jn();ki(),ya(),G(0,"button",23),Oe("click",function(){return Vt(e),Et(re().lastPage())}),ki(),G(1,"svg",7),Ie(2,"path",24),j()()}if(2&i){const e=re();U("matTooltip",e._intl.lastPageLabel)("matTooltipDisabled",e._nextButtonsDisabled())("matTooltipPosition","above")("disabled",e._nextButtonsDisabled()),It("aria-label",e._intl.lastPageLabel)}}let yE=(()=>{class i{constructor(){this.changes=new Te,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=Pe({token:i,factory:i.\u0275fac,providedIn:"root"}),i})();const Ove={provide:yE,deps:[[new Ss,new Ca,yE]],useFactory:function Pve(i){return i||new yE}},Lve=new me("MAT_PAGINATOR_DEFAULT_OPTIONS"),Nve=jM(CQ(class{}));let Bve=(()=>{class i extends Nve{get pageIndex(){return this._pageIndex}set pageIndex(e){this._pageIndex=Math.max(Ps(e),0),this._changeDetectorRef.markForCheck()}get length(){return this._length}set length(e){this._length=Ps(e),this._changeDetectorRef.markForCheck()}get pageSize(){return this._pageSize}set pageSize(e){this._pageSize=Math.max(Ps(e),0),this._updateDisplayedPageSizeOptions()}get pageSizeOptions(){return this._pageSizeOptions}set pageSizeOptions(e){this._pageSizeOptions=(e||[]).map(n=>Ps(n)),this._updateDisplayedPageSizeOptions()}get hidePageSize(){return this._hidePageSize}set hidePageSize(e){this._hidePageSize=tn(e)}get showFirstLastButtons(){return this._showFirstLastButtons}set showFirstLastButtons(e){this._showFirstLastButtons=tn(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 $e,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){Co()},i.\u0275dir=ve({type:i,inputs:{color:"color",pageIndex:"pageIndex",length:"length",pageSize:"pageSize",pageSizeOptions:"pageSizeOptions",hidePageSize:"hidePageSize",showFirstLastButtons:"showFirstLastButtons",selectConfig:"selectConfig"},outputs:{page:"page"},features:[dt]}),i})(),Uve=0,Vve=(()=>{class i extends Bve{constructor(e,n,r){super(e,n,r),this._pageSizeLabelId="mat-paginator-page-size-label-"+Uve++,this._formFieldAppearance=r?.formFieldAppearance||"outline"}}return i.\u0275fac=function(e){return new(e||i)(E(yE),E(Qn),E(Lve,8))},i.\u0275cmp=ot({type:i,selectors:[["mat-paginator"]],hostAttrs:["role","group",1,"mat-mdc-paginator"],inputs:{disabled:"disabled"},exportAs:["matPaginator"],features:[dt],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&&(G(0,"div",0)(1,"div",1),fe(2,Ive,5,4,"div",2),G(3,"div",3)(4,"div",4),Be(5),j(),fe(6,Rve,3,5,"button",5),G(7,"button",6),Oe("click",function(){return n.previousPage()}),ki(),G(8,"svg",7),Ie(9,"path",8),j()(),ya(),G(10,"button",9),Oe("click",function(){return n.nextPage()}),ki(),G(11,"svg",7),Ie(12,"path",10),j()(),fe(13,kve,3,5,"button",11),j()()()),2&e&&(V(2),U("ngIf",!n.hidePageSize),V(3),Qi(" ",n._intl.getRangeLabel(n.pageIndex,n.pageSize,n.length)," "),V(1),U("ngIf",n.showFirstLastButtons),V(1),U("matTooltip",n._intl.previousPageLabel)("matTooltipDisabled",n._previousButtonsDisabled())("matTooltipPosition","above")("disabled",n._previousButtonsDisabled()),It("aria-label",n._intl.previousPageLabel),V(3),U("matTooltip",n._intl.nextPageLabel)("matTooltipDisabled",n._nextButtonsDisabled())("matTooltipPosition","above")("disabled",n._nextButtonsDisabled()),It("aria-label",n._intl.nextPageLabel),V(3),U("ngIf",n.showFirstLastButtons))},dependencies:[lo,_i,XM,yl,pb,Nm,Fs],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})(),zve=(()=>{class i{}return i.\u0275fac=function(e){return new(e||i)},i.\u0275mod=en({type:i}),i.\u0275inj=Wt({providers:[Ove],imports:[co,KM,VH,LV]}),i})(),Hve=(()=>{class i{}return i.\u0275fac=function(e){return new(e||i)},i.\u0275mod=en({type:i,bootstrap:[cge]}),i.\u0275inj=Wt({providers:[Jl,KR,{provide:OH,useValue:Vie}],imports:[LB,wK,lve,tH,SJ,gC,mH,Eve,TV,kV,LV,KM,tz,zve,mse,vH,VH,vV,Ipe,Rme,nH,tR,Yie,lre]}),i})();th(ec,[lo,_i,Fs,n0,nE],[Xo]),th(zR,[hm,lo,_i,xy,nc,Zc,yl,h8,Mve,Sve,Cve,Fs,Vve,pb,Nm,n0],[]),th(xC,[lo,_i,MC,wC,_H,n0],[]),th(_G,[lo,_i,Ro,Fs,pb,Nm,n0,nE],[Xo]),L7().bootstrapModule(Hve).catch(i=>console.error(i))},489:function(Bo,Gs,ps){var dn;Bo=ps.nmd(Bo),function(){var z,Kr=200,Un="Expected a function",Ga="__lodash_hash_undefined__",Ci="__lodash_placeholder__",Si=1,ms=2,js=4,Ys=1,Uo=2,On=1,ur=2,mc=4,ua=8,Tl=16,ha=32,Il=64,Wa=128,fa=256,md=512,ME=800,Kg=16,In=1/0,Ya=9007199254740991,SE=17976931348623157e292,Of=NaN,pa=4294967295,Te=pa-1,c0=pa>>>1,d0=[["ary",Wa],["bind",On],["bindKey",ur],["curry",ua],["curryRight",Tl],["flip",md],["partial",ha],["partialRight",Il],["rearg",fa]],ni="[object Arguments]",qn="[object Array]",EE="[object AsyncFunction]",tt="[object Boolean]",gc="[object Date]",AE="[object DOMException]",gd="[object Error]",Ff="[object Function]",u0="[object GeneratorFunction]",Vo="[object Map]",Vu="[object Number]",DE="[object Null]",qa="[object Object]",h0="[object Promise]",TE="[object Proxy]",_d="[object RegExp]",zo="[object Set]",_c="[object String]",Lf="[object Symbol]",Zg="[object Undefined]",vd="[object WeakMap]",zu="[object ArrayBuffer]",yd="[object DataView]",ma="[object Float32Array]",Nf="[object Float64Array]",Qg="[object Int8Array]",Bf="[object Int16Array]",Jg="[object Int32Array]",e_="[object Uint8Array]",Hu="[object Uint8ClampedArray]",t_="[object Uint16Array]",n_="[object Uint32Array]",RE=/\b__p \+= '';/g,kE=/\b(__p \+=) '' \+/g,PE=/(__e\(.*?\)|\b__t\)) \+\n'';/g,f0=/&(?:amp|lt|gt|quot|#39);/g,p0=/[&<>"']/g,OE=RegExp(f0.source),FE=RegExp(p0.source),QO=/<%-([\s\S]+?)%>/g,i_=/<%([\s\S]+?)%>/g,r_=/<%=([\s\S]+?)%>/g,m0=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,g0=/^\w*$/,_0=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,s_=/[\\^$.*+?()[\]{}|]/g,v0=RegExp(s_.source),Uf=/^\s+/,y0=/\s/,b0=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,Mr=/\{\n\/\* \[wrapped with (.+)\] \*/,LE=/,? & /,NE=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,BE=/[()=,{}\[\]\/\s]/,UE=/\\(\\)?/g,x0=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,w0=/\w*$/,VE=/^[-+]0x[0-9a-f]+$/i,Xa=/^0b[01]+$/i,zE=/^\[object .+?Constructor\]$/,rr=/^0o[0-7]+$/i,bd=/^(?:0|[1-9]\d*)$/,_o=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,o_=/($^)/,HE=/['\n\r\u2028\u2029\\]/g,$u="\\ud800-\\udfff",C0="\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff",l_="\\u2700-\\u27bf",c_="a-z\\xdf-\\xf6\\xf8-\\xff",d_="A-Z\\xc0-\\xd6\\xd8-\\xde",S0="\\ufe0e\\ufe0f",E0="\\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",Cr="["+$u+"]",Vf="["+E0+"]",xd="["+C0+"]",ci="\\d+",u_="["+l_+"]",mi="["+c_+"]",zf="[^"+$u+E0+ci+l_+c_+d_+"]",h_="\\ud83c[\\udffb-\\udfff]",Ot="[^"+$u+"]",Wu="(?:\\ud83c[\\udde6-\\uddff]){2}",ju="[\\ud800-\\udbff][\\udc00-\\udfff]",Yu="["+d_+"]",pe="(?:"+mi+"|"+zf+")",Hf="(?:"+Yu+"|"+zf+")",Jt="(?:['\u2019](?:d|ll|m|re|s|t|ve))?",Xn="(?:['\u2019](?:D|LL|M|RE|S|T|VE))?",A0="(?:"+xd+"|"+h_+")?",YE="["+S0+"]?",XE=YE+A0+"(?:\\u200d(?:"+[Ot,Wu,ju].join("|")+")"+YE+A0+")*",KE="(?:"+[u_,Wu,ju].join("|")+")"+XE,JO="(?:"+[Ot+xd+"?",xd,Wu,ju,Cr].join("|")+")",Rl=RegExp("['\u2019]","g"),eF=RegExp(xd,"g"),D0=RegExp(h_+"(?="+h_+")|"+JO+XE,"g"),tF=RegExp([Yu+"?"+mi+"+"+Jt+"(?="+[Vf,Yu,"$"].join("|")+")",Hf+"+"+Xn+"(?="+[Vf,Yu+pe,"$"].join("|")+")",Yu+"?"+pe+"+"+Jt,Yu+"+"+Xn,"\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])","\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",ci,KE].join("|"),"g"),nF=RegExp("[\\u200d"+$u+C0+S0+"]"),ZE=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,iF=["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"],QE=-1,Ei={};Ei[ma]=Ei[Nf]=Ei[Qg]=Ei[Bf]=Ei[Jg]=Ei[e_]=Ei[Hu]=Ei[t_]=Ei[n_]=!0,Ei[ni]=Ei[qn]=Ei[zu]=Ei[tt]=Ei[yd]=Ei[gc]=Ei[gd]=Ei[Ff]=Ei[Vo]=Ei[Vu]=Ei[qa]=Ei[_d]=Ei[zo]=Ei[_c]=Ei[vd]=!1;var En={};En[ni]=En[qn]=En[zu]=En[yd]=En[tt]=En[gc]=En[ma]=En[Nf]=En[Qg]=En[Bf]=En[Jg]=En[Vo]=En[Vu]=En[qa]=En[_d]=En[zo]=En[_c]=En[Lf]=En[e_]=En[Hu]=En[t_]=En[n_]=!0,En[gd]=En[Ff]=En[vd]=!1;var oF={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},Pe=parseFloat,aF=parseInt,Wt="object"==typeof global&&global&&global.Object===Object&&global,Gf="object"==typeof self&&self&&self.Object===Object&&self,Sr=Wt||Gf||Function("return this")(),f_=Gs&&!Gs.nodeType&&Gs,Xu=f_&&Bo&&!Bo.nodeType&&Bo,p_=Xu&&Xu.exports===f_,wd=p_&&Wt.process,gs=function(){try{return Xu&&Xu.require&&Xu.require("util").types||wd&&wd.binding&&wd.binding("util")}catch{}}(),m_=gs&&gs.isArrayBuffer,T0=gs&&gs.isDate,Ft=gs&&gs.isMap,Wf=gs&&gs.isRegExp,I0=gs&&gs.isSet,Xs=gs&&gs.isTypedArray;function _s(X,he,ae){switch(ae.length){case 0:return X.call(he);case 1:return X.call(he,ae[0]);case 2:return X.call(he,ae[0],ae[1]);case 3:return X.call(he,ae[0],ae[1],ae[2])}return X.apply(he,ae)}function lF(X,he,ae,ze){for(var jt=-1,Vn=null==X?0:X.length;++jt-1}function Ku(X,he,ae){for(var ze=-1,jt=null==X?0:X.length;++ze-1;);return ae}function ga(X,he){for(var ae=X.length;ae--&&Lt(he,X[ae],0)>-1;);return ae}var nA=v_({\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"}),ot=v_({"&":"&","<":"<",">":">",'"':""","'":"'"});function th(X){return"\\"+oF[X]}function Sd(X){return nF.test(X)}function Xf(X){var he=-1,ae=Array(X.size);return X.forEach(function(ze,jt){ae[++he]=[jt,ze]}),ae}function ve(X,he){return function(ae){return X(he(ae))}}function $i(X,he){for(var ae=-1,ze=X.length,jt=0,Vn=[];++ae",""":'"',"'":"'"}),ys=function X(he){var u,ae=(he=null==he?Sr:ys.defaults(Sr.Object(),he,ys.pick(Sr,iF))).Array,ze=he.Date,jt=he.Error,Vn=he.Function,xt=he.Math,ai=he.Object,bc=he.RegExp,k0=he.String,Er=he.TypeError,sr=ae.prototype,Ho=ai.prototype,Zs=he["__core-js_shared__"],Ol=Vn.prototype.toString,ri=Ho.hasOwnProperty,bi=0,sA=(u=/[^.]+$/.exec(Zs&&Zs.keys&&Zs.keys.IE_PROTO||""))?"Symbol(src)_1."+u:"",Ad=Ho.toString,P0=Ol.call(ai),Zf=Sr._,Qf=bc("^"+Ol.call(ri).replace(s_,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),Ja=p_?he.Buffer:z,Ui=he.Symbol,x_=he.Uint8Array,bs=Ja?Ja.allocUnsafe:z,xs=ve(ai.getPrototypeOf,ai),Jf=ai.create,Dd=Ho.propertyIsEnumerable,xc=sr.splice,bo=Ui?Ui.isConcatSpreadable:z,ih=Ui?Ui.iterator:z,Td=Ui?Ui.toStringTag:z,ep=function(){try{var u=kc(ai,"defineProperty");return u({},"",{}),u}catch{}}(),oA=he.clearTimeout!==Sr.clearTimeout&&he.clearTimeout,dF=ze&&ze.now!==Sr.Date.now&&ze.now,uF=he.setTimeout!==Sr.setTimeout&&he.setTimeout,w_=xt.ceil,M_=xt.floor,O0=ai.getOwnPropertySymbols,hF=Ja?Ja.isBuffer:z,aA=he.isFinite,fF=sr.join,pF=ve(ai.keys,ai),fr=xt.max,Zr=xt.min,mF=ze.now,F0=he.parseInt,C_=xt.random,gF=sr.reverse,L0=kc(he,"DataView"),tp=kc(he,"Map"),el=kc(he,"Promise"),Id=kc(he,"Set"),xi=kc(he,"WeakMap"),Rd=kc(ai,"create"),np=xi&&new xi,kd={},N0=Pc(L0),B0=Pc(tp),lA=Pc(el),S_=Pc(Id),cA=Pc(xi),Qr=Ui?Ui.prototype:z,Pd=Qr?Qr.valueOf:z,E_=Qr?Qr.toString:z;function I(u){if(Pi(u)&&!sn(u)&&!(u instanceof kn)){if(u instanceof Ai)return u;if(ri.call(u,"__wrapped__"))return ns(u)}return new Ai(u)}var Od=function(){function u(){}return function(f){if(!Mi(f))return{};if(Jf)return Jf(f);u.prototype=f;var _=new u;return u.prototype=z,_}}();function wc(){}function Ai(u,f){this.__wrapped__=u,this.__actions__=[],this.__chain__=!!f,this.__index__=0,this.__values__=z}function kn(u){this.__wrapped__=u,this.__actions__=[],this.__dir__=1,this.__filtered__=!1,this.__iteratees__=[],this.__takeCount__=pa,this.__views__=[]}function Mc(u){var f=-1,_=null==u?0:u.length;for(this.clear();++f<_;){var w=u[f];this.set(w[0],w[1])}}function Pt(u){var f=-1,_=null==u?0:u.length;for(this.clear();++f<_;){var w=u[f];this.set(w[0],w[1])}}function _a(u){var f=-1,_=null==u?0:u.length;for(this.clear();++f<_;){var w=u[f];this.set(w[0],w[1])}}function Et(u){var f=-1,_=null==u?0:u.length;for(this.__data__=new _a;++f<_;)this.add(u[f])}function Jr(u){var f=this.__data__=new Pt(u);this.size=f.size}function I_(u,f){var _=sn(u),w=!_&&Lc(u),S=!_&&!w&&ol(u),P=!_&&!w&&!S&&jo(u),$=_||w||S||P,Y=$?Ks(u.length,k0):[],Q=Y.length;for(var _e in u)(f||ri.call(u,_e))&&(!$||!("length"==_e||S&&("offset"==_e||"parent"==_e)||P&&("buffer"==_e||"byteLength"==_e||"byteOffset"==_e)||sl(_e,Q)))&&Y.push(_e);return Y}function zr(u){var f=u.length;return f?u[lh(0,f-1)]:z}function tl(u,f){return Ep(eo(u),Nl(f,0,u.length))}function $0(u){return Ep(eo(u))}function Ll(u,f,_){(_!==z&&!Wo(u[f],_)||_===z&&!(f in u))&&$o(u,f,_)}function Qs(u,f,_){var w=u[f];(!ri.call(u,f)||!Wo(w,_)||_===z&&!(f in u))&&$o(u,f,_)}function rp(u,f){for(var _=u.length;_--;)if(Wo(u[_][0],f))return _;return-1}function G0(u,f,_,w){return nl(u,function(S,P,$){f(w,S,_(S),$)}),w}function W0(u,f){return u&&di(f,pr(f),u)}function $o(u,f,_){"__proto__"==f&&ep?ep(u,f,{configurable:!0,enumerable:!0,value:_,writable:!0}):u[f]=_}function rh(u,f){for(var _=-1,w=f.length,S=ae(w),P=null==u;++_=f?u:f)),u}function Ms(u,f,_,w,S,P){var $,Y=f&Si,Q=f&ms,_e=f&js;if(_&&($=S?_(u,w,S,P):_(u)),$!==z)return $;if(!Mi(u))return u;var ye=sn(u);if(ye){if($=function fx(u){var f=u.length,_=new u.constructor(f);return f&&"string"==typeof u[0]&&ri.call(u,"index")&&(_.index=u.index,_.input=u.input),_}(u),!Y)return eo(u,$)}else{var be=Hr(u),Xe=be==Ff||be==u0;if(ol(u))return me(u,Y);if(be==qa||be==ni||Xe&&!S){if($=Q||Xe?{}:PA(u),!Y)return Q?function hh(u,f){return di(u,dx(u),f)}(u,function _A(u,f){return u&&di(f,Ds(f),u)}($,u)):function H_(u,f){return di(u,Z_(u),f)}(u,W0($,u))}else{if(!En[be])return S?u:{};$=function px(u,f,_){var w=u.constructor;switch(f){case zu:return sx(u);case tt:case gc:return new w(+u);case yd:return function wF(u,f){var _=f?sx(u.buffer):u.buffer;return new u.constructor(_,u.byteOffset,u.byteLength)}(u,_);case ma:case Nf:case Qg:case Bf:case Jg:case e_:case Hu:case t_:case n_:return AA(u,_);case Vo:return new w;case Vu:case _c:return new w(u);case _d:return function MF(u){var f=new u.constructor(u.source,w0.exec(u));return f.lastIndex=u.lastIndex,f}(u);case zo:return new w;case Lf:return function CF(u){return Pd?ai(Pd.call(u)):{}}(u)}}(u,be,Y)}}P||(P=new Jr);var bt=P.get(u);if(bt)return bt;P.set(u,$),iw(u)?u.forEach(function(Ht){$.add(Ms(Ht,f,_,Ht,u,P))}):Tv(u)&&u.forEach(function(Ht,An){$.set(An,Ms(Ht,f,_,An,u,P))});var mn=ye?z:(_e?Q?q_:bp:Q?Ds:pr)(u);return Rn(mn||u,function(Ht,An){mn&&(Ht=u[An=Ht]),Qs($,An,Ms(Ht,f,_,An,u,P))}),$}function R_(u,f,_){var w=_.length;if(null==u)return!w;for(u=ai(u);w--;){var S=_[w],$=u[S];if($===z&&!(S in u)||!(0,f[S])($))return!1}return!0}function sp(u,f,_){if("function"!=typeof u)throw new Er(Un);return gh(function(){u.apply(z,_)},f)}function Ld(u,f,_,w){var S=-1,P=kl,$=!0,Y=u.length,Q=[],_e=f.length;if(!Y)return Q;_&&(f=gi(f,Ur(_))),w?(P=Ku,$=!1):f.length>=Kr&&(P=yc,$=!1,f=new Et(f));e:for(;++S-1},Pt.prototype.set=function fA(u,f){var _=this.__data__,w=rp(_,u);return w<0?(++this.size,_.push([u,f])):_[w][1]=f,this},_a.prototype.clear=function pA(){this.size=0,this.__data__={hash:new Mc,map:new(tp||Pt),string:new Mc}},_a.prototype.delete=function mA(u){var f=K_(this,u).delete(u);return this.size-=f?1:0,f},_a.prototype.get=function Se(u){return K_(this,u).get(u)},_a.prototype.has=function zn(u){return K_(this,u).has(u)},_a.prototype.set=function Vt(u,f){var _=K_(this,u),w=_.size;return _.set(u,f),this.size+=_.size==w?0:1,this},Et.prototype.add=Et.prototype.push=function Ar(u){return this.__data__.set(u,Ga),this},Et.prototype.has=function H0(u){return this.__data__.has(u)},Jr.prototype.clear=function va(){this.__data__=new Pt,this.size=0},Jr.prototype.delete=function D_(u){var f=this.__data__,_=f.delete(u);return this.size=f.size,_},Jr.prototype.get=function T_(u){return this.__data__.get(u)},Jr.prototype.has=function gA(u){return this.__data__.has(u)},Jr.prototype.set=function vF(u,f){var _=this.__data__;if(_ instanceof Pt){var w=_.__data__;if(!tp||w.length0&&_(Y)?f>1?Kn(Y,f-1,_,w,S):Pl(S,Y):w||(S[S.length]=Y)}return S}var il=$_(),Di=$_(!0);function ki(u,f){return u&&il(u,f,pr)}function P_(u,f){return u&&Di(u,f,pr)}function ya(u,f){return vc(f,function(_){return Hl(u[_])})}function Cc(u,f){for(var _=0,w=(f=Ma(f,u)).length;null!=u&&_f}function op(u,f){return null!=u&&ri.call(u,f)}function ap(u,f){return null!=u&&f in ai(u)}function lp(u,f,_){for(var w=_?Ku:kl,S=u[0].length,P=u.length,$=P,Y=ae(P),Q=1/0,_e=[];$--;){var ye=u[$];$&&f&&(ye=gi(ye,Ur(f))),Q=Zr(ye.length,Q),Y[$]=!_&&(f||S>=120&&ye.length>=120)?new Et($&&ye):z}ye=u[0];var be=-1,Xe=Y[0];e:for(;++be=Y?Q:Q*("desc"==_[w]?-1:1)}return u.index-f.index}(P,$,_)})}function J0(u,f,_){for(var w=-1,S=f.length,P={};++w-1;)Y!==u&&xc.call(Y,Q,1),xc.call(u,Q,1);return u}function ah(u,f){for(var _=u?f.length:0,w=_-1;_--;){var S=f[_];if(_==w||S!==P){var P=S;sl(S)?xc.call(u,S,1):dh(u,S)}}return u}function lh(u,f){return u+M_(C_()*(f-u+1))}function ch(u,f){var _="";if(!u||f<1||f>Ya)return _;do{f%2&&(_+=u),(f=M_(f/2))&&(u+=u)}while(f);return _}function pn(u,f){return Cp(J_(u,f,is),u+"")}function SA(u){return zr(Uc(u))}function tx(u,f){var _=Uc(u);return Ep(_,Nl(f,0,_.length))}function zd(u,f,_,w){if(!Mi(u))return u;for(var S=-1,P=(f=Ma(f,u)).length,$=P-1,Y=u;null!=Y&&++SS?0:S+f),(_=_>S?S:_)<0&&(_+=S),S=f>_?0:_-f>>>0,f>>>=0;for(var P=ae(S);++w>>1,$=u[P];null!==$&&!As($)&&(_?$<=f:$=Kr){var _e=f?null:j_(u);if(_e)return Hn(_e);$=!1,S=yc,Q=new Et}else Q=f?[]:Y;e:for(;++w=w?u:ts(u,f,_)}var rx=oA||function(u){return Sr.clearTimeout(u)};function me(u,f){if(f)return u.slice();var _=u.length,w=bs?bs(_):new u.constructor(_);return u.copy(w),w}function sx(u){var f=new u.constructor(u.byteLength);return new x_(f).set(new x_(u)),f}function AA(u,f){var _=f?sx(u.buffer):u.buffer;return new u.constructor(_,u.byteOffset,u.length)}function DA(u,f){if(u!==f){var _=u!==z,w=null===u,S=u==u,P=As(u),$=f!==z,Y=null===f,Q=f==f,_e=As(f);if(!Y&&!_e&&!P&&u>f||P&&$&&Q&&!Y&&!_e||w&&$&&Q||!_&&Q||!S)return 1;if(!w&&!P&&!_e&&u1?_[S-1]:z,$=S>2?_[2]:z;for(P=u.length>3&&"function"==typeof P?(S--,P):z,$&&Tr(_[0],_[1],$)&&(P=S<3?z:P,S=1),f=ai(f);++w-1?S[P?f[$]:$]:z}}function Cs(u){return wo(function(f){var _=f.length,w=_,S=Ai.prototype.thru;for(u&&f.reverse();w--;){var P=f[w];if("function"!=typeof P)throw new Er(Un);if(S&&!$&&"wrapper"==rl(P))var $=new Ai([],!0)}for(w=$?w:_;++w<_;){var Y=rl(P=f[w]),Q="wrapper"==Y?X_(P):z;$=Q&&mh(Q[0])&&Q[1]==(Wa|ua|ha|fa)&&!Q[4].length&&1==Q[9]?$[rl(Q[0])].apply($,Q[3]):1==P.length&&mh(P)?$[Y]():$.thru(P)}return function(){var _e=arguments,ye=_e[0];if($&&1==_e.length&&sn(ye))return $.plant(ye).value();for(var be=0,Xe=_?f[be].apply(this,_e):ye;++be<_;)Xe=f[be].call(this,Xe);return Xe}})}function jd(u,f,_,w,S,P,$,Y,Q,_e){var ye=f&Wa,be=f&On,Xe=f&ur,bt=f&(ua|Tl),zt=f&md,mn=Xe?z:gp(u);return function Ht(){for(var An=arguments.length,Ln=ae(An),rs=An;rs--;)Ln[rs]=arguments[rs];if(bt)var ss=Sa(Ht),so=function eh(X,he){for(var ae=X.length,ze=0;ae--;)X[ae]===he&&++ze;return ze}(Ln,ss);if(w&&(Ln=$d(Ln,w,S,bt)),P&&(Ln=TA(Ln,P,$,bt)),An-=so,bt&&An<_e){var Ti=$i(Ln,ss);return ax(u,f,jd,Ht.placeholder,_,Ln,Ti,Y,Q,_e-An)}var Ts=be?_:this,So=Xe?Ts[u]:u;return An=Ln.length,Y?Ln=function Es(u,f){for(var _=u.length,w=Zr(f.length,_),S=eo(u);w--;){var P=f[w];u[w]=sl(P,_)?S[P]:z}return u}(Ln,Y):zt&&An>1&&Ln.reverse(),ye&&QY))return!1;var _e=P.get(u),ye=P.get(f);if(_e&&ye)return _e==f&&ye==u;var be=-1,Xe=!0,bt=_&Uo?new Et:z;for(P.set(u,f),P.set(f,u);++be-1&&u%1==0&&u1?"& ":"")+f[w],f=f.join(_>2?", ":" "),u.replace(b0,"{\n/* [wrapped with "+f+"] */\n")}(w,function BA(u,f){return Rn(d0,function(_){var w="_."+_[0];f&_[1]&&!kl(u,w)&&u.push(w)}),u.sort()}(function ux(u){var f=u.match(Mr);return f?f[1].split(LE):[]}(w),_)))}function yx(u){var f=0,_=0;return function(){var w=mF(),S=Kg-(w-_);if(_=w,S>0){if(++f>=ME)return arguments[0]}else f=0;return u.apply(z,arguments)}}function Ep(u,f){var _=-1,w=u.length,S=w-1;for(f=f===z?w:f;++_1?u[f-1]:z;return _="function"==typeof _?(u.pop(),_):z,yh(u,_)});function Hx(u){var f=I(u);return f.__chain__=!0,f}function Rp(u,f){return f(u)}var $x=wo(function(u){var f=u.length,_=f?u[0]:0,w=this.__wrapped__,S=function(P){return rh(P,u)};return!(f>1||this.__actions__.length)&&w instanceof kn&&sl(_)?((w=w.slice(_,+_+(f?1:0))).__actions__.push({func:Rp,args:[S],thisArg:z}),new Ai(w,this.__chain__).thru(function(P){return f&&!P.length&&P.push(z),P})):this.thru(S)}),s1=pp(function(u,f,_){ri.call(u,_)?++u[_]:$o(u,_,1)}),Wx=RA(Ex),Pp=RA(rv);function bv(u,f){return(sn(u)?Rn:nl)(u,Nt(f,3))}function zl(u,f){return(sn(u)?cF:k_)(u,Nt(f,3))}var a1=pp(function(u,f,_){ri.call(u,_)?u[_].push(f):$o(u,_,[f])}),c1=pn(function(u,f,_){var w=-1,S="function"==typeof f,P=no(u)?ae(u.length):[];return nl(u,function($){P[++w]=S?_s(f,$,_):ba($,f,_)}),P}),d1=pp(function(u,f,_){$o(u,_,f)});function Op(u,f){return(sn(u)?gi:sh)(u,Nt(f,3))}var Ea=pp(function(u,f,_){u[_?0:1].push(f)},function(){return[[],[]]}),v1=pn(function(u,f){if(null==u)return[];var _=f.length;return _>1&&Tr(u,f[0],f[1])?f=[]:_>2&&Tr(f[0],f[1],f[2])&&(f=[f[0]]),B_(u,Kn(f,1),[])}),Fp=dF||function(){return Sr.Date.now()};function xh(u,f,_){return f=_?z:f,xo(u,Wa,z,z,z,z,f=u&&null==f?u.length:f)}function Aa(u,f){var _;if("function"!=typeof f)throw new Er(Un);return u=un(u),function(){return--u>0&&(_=f.apply(this,arguments)),u<=1&&(f=z),_}}var Fc=pn(function(u,f,_){var w=On;if(_.length){var S=$i(_,Sa(Fc));w|=ha}return xo(u,w,f,_,S)}),xv=pn(function(u,f,_){var w=On|ur;if(_.length){var S=$i(_,Sa(xv));w|=ha}return xo(f,w,u,_,S)});function b1(u,f,_){var w,S,P,$,Y,Q,_e=0,ye=!1,be=!1,Xe=!0;if("function"!=typeof u)throw new Er(Un);function bt(Ti){var Ts=w,So=S;return w=S=z,_e=Ti,$=u.apply(So,Ts)}function Ht(Ti){var Ts=Ti-Q;return Q===z||Ts>=f||Ts<0||be&&Ti-_e>=P}function An(){var Ti=Fp();if(Ht(Ti))return Ln(Ti);Y=gh(An,function mn(Ti){var ID=f-(Ti-Q);return be?Zr(ID,P-(Ti-_e)):ID}(Ti))}function Ln(Ti){return Y=z,Xe&&w?bt(Ti):(w=S=z,$)}function so(){var Ti=Fp(),Ts=Ht(Ti);if(w=arguments,S=this,Q=Ti,Ts){if(Y===z)return function zt(Ti){return _e=Ti,Y=gh(An,f),ye?bt(Ti):$}(Q);if(be)return rx(Y),Y=gh(An,f),bt(Q)}return Y===z&&(Y=gh(An,f)),$}return f=Mo(f)||0,Mi(_)&&(ye=!!_.leading,P=(be="maxWait"in _)?fr(Mo(_.maxWait)||0,f):P,Xe="trailing"in _?!!_.trailing:Xe),so.cancel=function rs(){Y!==z&&rx(Y),_e=0,w=Q=S=Y=z},so.flush=function ss(){return Y===z?$:Ln(Fp())},so}var PF=pn(function(u,f){return sp(u,1,f)}),OF=pn(function(u,f,_){return sp(u,Mo(f)||0,_)});function qd(u,f){if("function"!=typeof u||null!=f&&"function"!=typeof f)throw new Er(Un);var _=function(){var w=arguments,S=f?f.apply(this,w):w[0],P=_.cache;if(P.has(S))return P.get(S);var $=u.apply(this,w);return _.cache=P.set(S,$)||P,$};return _.cache=new(qd.Cache||_a),_}function Sv(u){if("function"!=typeof u)throw new Er(Un);return function(){var f=arguments;switch(f.length){case 0:return!u.call(this);case 1:return!u.call(this,f[0]);case 2:return!u.call(this,f[0],f[1]);case 3:return!u.call(this,f[0],f[1],f[2])}return!u.apply(this,f)}}qd.Cache=_a;var Xx=Hd(function(u,f){var _=(f=1==f.length&&sn(f[0])?gi(f[0],Ur(Nt())):gi(Kn(f,1),Ur(Nt()))).length;return pn(function(w){for(var S=-1,P=Zr(w.length,_);++S=f}),Lc=Ud(function(){return arguments}())?Ud:function(u){return Pi(u)&&ri.call(u,"callee")&&!Dd.call(u,"callee")},sn=ae.isArray,LF=m_?Ur(m_):function xA(u){return Pi(u)&&es(u)==zu};function no(u){return null!=u&&zp(u.length)&&!Hl(u)}function wi(u){return Pi(u)&&no(u)}var ol=hF||Jd,ew=T0?Ur(T0):function yF(u){return Pi(u)&&es(u)==gc};function Up(u){if(!Pi(u))return!1;var f=es(u);return f==gd||f==AE||"string"==typeof u.message&&"string"==typeof u.name&&!io(u)}function Hl(u){if(!Mi(u))return!1;var f=es(u);return f==Ff||f==u0||f==EE||f==TE}function Vp(u){return"number"==typeof u&&u==un(u)}function zp(u){return"number"==typeof u&&u>-1&&u%1==0&&u<=Ya}function Mi(u){var f=typeof u;return null!=u&&("object"==f||"function"==f)}function Pi(u){return null!=u&&"object"==typeof u}var Tv=Ft?Ur(Ft):function wA(u){return Pi(u)&&Hr(u)==Vo};function wh(u){return"number"==typeof u||Pi(u)&&es(u)==Vu}function io(u){if(!Pi(u)||es(u)!=qa)return!1;var f=xs(u);if(null===f)return!0;var _=ri.call(f,"constructor")&&f.constructor;return"function"==typeof _&&_ instanceof _&&Ol.call(_)==P0}var $p=Wf?Ur(Wf):function xF(u){return Pi(u)&&es(u)==_d},iw=I0?Ur(I0):function L_(u){return Pi(u)&&Hr(u)==zo};function Gp(u){return"string"==typeof u||!sn(u)&&Pi(u)&&es(u)==_c}function As(u){return"symbol"==typeof u||Pi(u)&&es(u)==Lf}var jo=Xs?Ur(Xs):function X0(u){return Pi(u)&&zp(u.length)&&!!Ei[es(u)]},Pv=yp(cp),O1=yp(function(u,f){return u<=f});function Ov(u){if(!u)return[];if(no(u))return Gp(u)?yo(u):eo(u);if(ih&&u[ih])return function rA(X){for(var he,ae=[];!(he=X.next()).done;)ae.push(he.value);return ae}(u[ih]());var f=Hr(u);return(f==Vo?Xf:f==zo?Hn:Uc)(u)}function al(u){return u?(u=Mo(u))===In||u===-In?(u<0?-1:1)*SE:u==u?u:0:0===u?u:0}function un(u){var f=al(u),_=f%1;return f==f?_?f-_:f:0}function F1(u){return u?Nl(un(u),0,pa):0}function Mo(u){if("number"==typeof u)return u;if(As(u))return Of;if(Mi(u)){var f="function"==typeof u.valueOf?u.valueOf():u;u=Mi(f)?f+"":f}if("string"!=typeof u)return 0===u?u:+u;u=Wn(u);var _=Xa.test(u);return _||rr.test(u)?aF(u.slice(2),_?2:8):VE.test(u)?Of:+u}function $l(u){return di(u,Ds(u))}function Fn(u){return null==u?"":Js(u)}var vt=Dr(function(u,f){if(Mp(f)||no(f))di(f,pr(f),u);else for(var _ in f)ri.call(f,_)&&Qs(u,_,f[_])}),rw=Dr(function(u,f){di(f,Ds(f),u)}),Gl=Dr(function(u,f,_,w){di(f,Ds(f),u,w)}),ll=Dr(function(u,f,_,w){di(f,pr(f),u,w)}),N1=wo(rh),Bc=pn(function(u,f){u=ai(u);var _=-1,w=f.length,S=w>2?f[2]:z;for(S&&Tr(f[0],f[1],S)&&(w=1);++_1),P}),di(u,q_(u),_),w&&(_=Ms(_,Si|ms|js,Ca));for(var S=f.length;S--;)dh(_,f[S]);return _}),Y1=wo(function(u,f){return null==u?{}:function Q0(u,f){return J0(u,f,function(_,w){return Uv(u,w)})}(u,f)});function Vv(u,f){if(null==u)return{};var _=gi(q_(u),function(w){return[w]});return f=Nt(f),J0(u,_,function(w,S){return f(w,S[0])})}var lw=fh(pr),zv=fh(Ds);function Uc(u){return null==u?[]:Ju(u,pr(u))}var V=Wd(function(u,f,_){return f=f.toLowerCase(),u+(_?Hv(f):f)});function Hv(u){return Zd(Fn(u).toLowerCase())}function $v(u){return(u=Fn(u))&&u.replace(_o,nA).replace(eF,"")}var sD=Wd(function(u,f,_){return u+(_?"-":"")+f.toLowerCase()}),dw=Wd(function(u,f,_){return u+(_?" ":"")+f.toLowerCase()}),oD=Gd("toLowerCase"),Gv=Wd(function(u,f,_){return u+(_?"_":"")+f.toLowerCase()}),cD=Wd(function(u,f,_){return u+(_?" ":"")+Zd(f)}),pw=Wd(function(u,f,_){return u+(_?" ":"")+f.toUpperCase()}),Zd=Gd("toUpperCase");function mw(u,f,_){return u=Fn(u),(f=_?z:f)===z?function en(X){return ZE.test(X)}(u)?function fn(X){return X.match(tF)||[]}(u):function tA(X){return X.match(NE)||[]}(u):u.match(f)||[]}var jv=pn(function(u,f){try{return _s(u,z,f)}catch(_){return Up(_)?_:new jt(_)}}),fD=wo(function(u,f){return Rn(f,function(_){_=Go(_),$o(u,_,Fc(u[_],u))}),u});function Yv(u){return function(){return u}}var gw=Cs(),_D=Cs(!0);function is(u){return u}function Wp(u){return N_("function"==typeof u?u:Ms(u,Si))}var Xv=pn(function(u,f){return function(_){return ba(_,u,f)}}),vD=pn(function(u,f){return function(_){return ba(u,_,f)}});function _w(u,f,_){var w=pr(f),S=ya(f,w);null==_&&(!Mi(f)||!S.length&&w.length)&&(_=f,f=u,u=this,S=ya(f,pr(f)));var P=!(Mi(_)&&"chain"in _&&!_.chain),$=Hl(u);return Rn(S,function(Y){var Q=f[Y];u[Y]=Q,$&&(u.prototype[Y]=function(){var _e=this.__chain__;if(P||_e){var ye=u(this.__wrapped__);return(ye.__actions__=eo(this.__actions__)).push({func:Q,args:arguments,thisArg:u}),ye.__chain__=_e,ye}return Q.apply(u,Pl([this.value()],arguments))})}),u}function Co(){}var vw=_p(gi),bD=_p(JE),xD=_p(jf);function Mh(u){return mx(u)?__(Go(u)):function xa(u){return function(f){return Cc(f,u)}}(u)}var Kv=ox(),Ch=ox(!0);function Sh(){return[]}function Jd(){return!1}var wD=G_(function(u,f){return u+f},0),MD=W_("ceil"),xw=G_(function(u,f){return u/f},1),CD=W_("floor"),DD=G_(function(u,f){return u*f},1),jF=W_("round"),ty=G_(function(u,f){return u-f},0);return I.after=function y1(u,f){if("function"!=typeof f)throw new Er(Un);return u=un(u),function(){if(--u<1)return f.apply(this,arguments)}},I.ary=xh,I.assign=vt,I.assignIn=rw,I.assignInWith=Gl,I.assignWith=ll,I.at=N1,I.before=Aa,I.bind=Fc,I.bindAll=fD,I.bindKey=xv,I.castArray=function M1(){if(!arguments.length)return[];var u=arguments[0];return sn(u)?u:[u]},I.chain=Hx,I.chunk=function nv(u,f,_){f=(_?Tr(u,f,_):f===z)?1:fr(un(f),0);var w=null==u?0:u.length;if(!w||f<1)return[];for(var S=0,P=0,$=ae(w_(w/f));SS?0:S+_),(w=w===z||w>S?S:un(w))<0&&(w+=S),w=_>w?0:F1(w);_>>0)?(u=Fn(u))&&("string"==typeof f||null!=f&&!$p(f))&&!(f=Js(f))&&Sd(u)?Ic(yo(u),0,_):u.split(f,_):[]},I.spread=function Zx(u,f){if("function"!=typeof u)throw new Er(Un);return f=null==f?0:fr(un(f),0),pn(function(_){var w=_[f],S=Ic(_,0,f);return w&&Pl(S,w),_s(u,this,S)})},I.tail=function Oc(u){var f=null==u?0:u.length;return f?ts(u,1,f):[]},I.take=function Fx(u,f,_){return u&&u.length?ts(u,0,(f=_||f===z?1:un(f))<0?0:f):[]},I.takeRight=function Lx(u,f,_){var w=null==u?0:u.length;return w?ts(u,(f=w-(f=_||f===z?1:un(f)))<0?0:f,w):[]},I.takeRightWhile=function QA(u,f){return u&&u.length?uh(u,Nt(f,3),!1,!0):[]},I.takeWhile=function RF(u,f){return u&&u.length?uh(u,Nt(f,3)):[]},I.tap=function t1(u,f){return f(u),u},I.throttle=function Lp(u,f,_){var w=!0,S=!0;if("function"!=typeof u)throw new Er(Un);return Mi(_)&&(w="leading"in _?!!_.leading:w,S="trailing"in _?!!_.trailing:S),b1(u,f,{leading:w,maxWait:f,trailing:S})},I.thru=Rp,I.toArray=Ov,I.toPairs=lw,I.toPairsIn=zv,I.toPath=function bw(u){return sn(u)?gi(u,Go):As(u)?[u]:eo(bx(Fn(u)))},I.toPlainObject=$l,I.transform=function K1(u,f,_){var w=sn(u),S=w||ol(u)||jo(u);if(f=Nt(f,4),null==_){var P=u&&u.constructor;_=S?w?new P:[]:Mi(u)&&Hl(P)?Od(xs(u)):{}}return(S?Rn:ki)(u,function($,Y,Q){return f(_,$,Y,Q)}),_},I.unary=function Qx(u){return xh(u,1)},I.union=Dp,I.unionBy=JA,I.unionWith=Nx,I.uniq=function Bx(u){return u&&u.length?si(u):[]},I.uniqBy=function Ux(u,f){return u&&u.length?si(u,Nt(f,2)):[]},I.uniqWith=function fv(u,f){return f="function"==typeof f?f:z,u&&u.length?si(u,z,f):[]},I.unset=function Z1(u,f){return null==u||dh(u,f)},I.unzip=Tp,I.unzipWith=yh,I.update=function Q1(u,f,_){return null==u?u:ix(u,f,fp(_))},I.updateWith=function J1(u,f,_,w){return w="function"==typeof w?w:z,null==u?u:ix(u,f,fp(_),w)},I.values=Uc,I.valuesIn=function eD(u){return null==u?[]:Ju(u,Ds(u))},I.without=Ip,I.words=mw,I.wrap=function Av(u,f){return Ev(fp(f),u)},I.xor=Vx,I.xorBy=pv,I.xorWith=mv,I.zip=gv,I.zipObject=function bh(u,f){return Tc(u||[],f||[],Qs)},I.zipObjectDeep=function e1(u,f){return Tc(u||[],f||[],zd)},I.zipWith=zx,I.entries=lw,I.entriesIn=zv,I.extend=rw,I.extendWith=Gl,_w(I,I),I.add=wD,I.attempt=jv,I.camelCase=V,I.capitalize=Hv,I.ceil=MD,I.clamp=function tD(u,f,_){return _===z&&(_=f,f=z),_!==z&&(_=(_=Mo(_))==_?_:0),f!==z&&(f=(f=Mo(f))==f?f:0),Nl(Mo(u),f,_)},I.clone=function Zn(u){return Ms(u,js)},I.cloneDeep=function S1(u){return Ms(u,Si|js)},I.cloneDeepWith=function Np(u,f){return Ms(u,Si|js,f="function"==typeof f?f:z)},I.cloneWith=function C1(u,f){return Ms(u,js,f="function"==typeof f?f:z)},I.conformsTo=function Jx(u,f){return null==f||R_(u,f,pr(f))},I.deburr=$v,I.defaultTo=function gD(u,f){return null==u||u!=u?f:u},I.divide=xw,I.endsWith=function iD(u,f,_){u=Fn(u),f=Js(f);var w=u.length,S=_=_===z?w:Nl(un(_),0,w);return(_-=f.length)>=0&&u.slice(_,S)==f},I.eq=Wo,I.escape=function rD(u){return(u=Fn(u))&&FE.test(u)?u.replace(p0,ot):u},I.escapeRegExp=function cw(u){return(u=Fn(u))&&v0.test(u)?u.replace(s_,"\\$&"):u},I.every=function vv(u,f,_){var w=sn(u)?JE:j0;return _&&Tr(u,f,_)&&(f=z),w(u,Nt(f,3))},I.find=Wx,I.findIndex=Ex,I.findKey=function Fv(u,f){return ee(u,Nt(f,3),ki)},I.findLast=Pp,I.findLastIndex=rv,I.findLastKey=function Lv(u,f){return ee(u,Nt(f,3),P_)},I.floor=CD,I.forEach=bv,I.forEachRight=zl,I.forIn=function V1(u,f){return null==u?u:il(u,Nt(f,3),Ds)},I.forInRight=function Nv(u,f){return null==u?u:Di(u,Nt(f,3),Ds)},I.forOwn=function cl(u,f){return u&&ki(u,Nt(f,3))},I.forOwnRight=function z1(u,f){return u&&P_(u,Nt(f,3))},I.get=Bv,I.gt=E1,I.gte=A1,I.has=function G1(u,f){return null!=u&&hx(u,f,op)},I.hasIn=Uv,I.head=Dx,I.identity=is,I.includes=function l1(u,f,_,w){u=no(u)?u:Uc(u),_=_&&!w?un(_):0;var S=u.length;return _<0&&(_=fr(S+_,0)),Gp(u)?_<=S&&u.indexOf(f,_)>-1:!!S&&Lt(u,f,_)>-1},I.indexOf=function vh(u,f,_){var w=null==u?0:u.length;if(!w)return-1;var S=null==_?0:un(_);return S<0&&(S=fr(w+S,0)),Lt(u,f,S)},I.inRange=function nD(u,f,_){return f=al(f),_===z?(_=f,f=0):_=al(_),function O_(u,f,_){return u>=Zr(f,_)&&u=-Ya&&u<=Ya},I.isSet=iw,I.isString=Gp,I.isSymbol=As,I.isTypedArray=jo,I.isUndefined=function R1(u){return u===z},I.isWeakMap=function k1(u){return Pi(u)&&Hr(u)==vd},I.isWeakSet=function P1(u){return Pi(u)&&"[object WeakSet]"==es(u)},I.join=function Tx(u,f){return null==u?"":fF.call(u,f)},I.kebabCase=sD,I.last=Ir,I.lastIndexOf=function cv(u,f,_){var w=null==u?0:u.length;if(!w)return-1;var S=w;return _!==z&&(S=(S=un(_))<0?fr(w+S,0):Zr(S,w-1)),f==f?function Ed(X,he,ae){for(var ze=ae+1;ze--;)if(X[ze]===he)return ze;return ze}(u,f,S):Qu(u,qf,S,!0)},I.lowerCase=dw,I.lowerFirst=oD,I.lt=Pv,I.lte=O1,I.max=function ww(u){return u&&u.length?Nd(u,is,Bd):z},I.maxBy=function Mw(u,f){return u&&u.length?Nd(u,Nt(f,2),Bd):z},I.mean=function SD(u){return Cd(u,is)},I.meanBy=function ED(u,f){return Cd(u,Nt(f,2))},I.min=function ro(u){return u&&u.length?Nd(u,is,cp):z},I.minBy=function AD(u,f){return u&&u.length?Nd(u,Nt(f,2),cp):z},I.stubArray=Sh,I.stubFalse=Jd,I.stubObject=function yw(){return{}},I.stubString=function Zv(){return""},I.stubTrue=function Qv(){return!0},I.multiply=DD,I.nth=function Ix(u,f){return u&&u.length?CA(u,un(f)):z},I.noConflict=function E(){return Sr._===this&&(Sr._=Zf),this},I.noop=Co,I.now=Fp,I.pad=function aD(u,f,_){u=Fn(u);var w=(f=un(f))?hr(u):0;if(!f||w>=f)return u;var S=(f-w)/2;return vp(M_(S),_)+u+vp(w_(S),_)},I.padEnd=function VF(u,f,_){u=Fn(u);var w=(f=un(f))?hr(u):0;return f&&wf){var w=u;u=f,f=w}if(_||u%1||f%1){var S=C_();return Zr(u+S*(f-u+Pe("1e-"+((S+"").length-1))),f)}return lh(u,f)},I.reduce=function u1(u,f,_){var w=sn(u)?g_:R0,S=arguments.length<3;return w(u,Nt(f,4),_,S,nl)},I.reduceRight=function h1(u,f,_){var w=sn(u)?eA:R0,S=arguments.length<3;return w(u,Nt(f,4),_,S,k_)},I.repeat=function Gi(u,f,_){return f=(_?Tr(u,f,_):f===z)?1:un(f),ch(Fn(u),f)},I.replace=function lD(){var u=arguments,f=Fn(u[0]);return u.length<3?f:f.replace(u[1],u[2])},I.result=function q1(u,f,_){var w=-1,S=(f=Ma(f,u)).length;for(S||(S=1,u=z);++wYa)return[];var _=pa,w=Zr(u,pa);f=Nt(f),u-=pa;for(var S=Ks(w,f);++_=P)return u;var Y=_-hr(w);if(Y<1)return w;var Q=$?Ic($,0,Y).join(""):u.slice(0,Y);if(S===z)return Q+w;if($&&(Y+=Q.length-Y),$p(S)){if(u.slice(Y).search(S)){var _e,ye=Q;for(S.global||(S=bc(S.source,Fn(w0.exec(S))+"g")),S.lastIndex=0;_e=S.exec(ye);)var be=_e.index;Q=Q.slice(0,be===z?Y:be)}}else if(u.indexOf(Js(S),Y)!=Y){var Xe=Q.lastIndexOf(S);Xe>-1&&(Q=Q.slice(0,Xe))}return Q+w},I.unescape=function hD(u){return(u=Fn(u))&&OE.test(u)?u.replace(f0,Kf):u},I.uniqueId=function ey(u){var f=++bi;return Fn(u)+f},I.upperCase=pw,I.upperFirst=Zd,I.each=bv,I.eachRight=zl,I.first=Dx,_w(I,function(){var u={};return ki(I,function(f,_){ri.call(I.prototype,_)||(u[_]=f)}),u}(),{chain:!1}),I.VERSION="4.17.21",Rn(["bind","bindKey","curry","curryRight","partial","partialRight"],function(u){I[u].placeholder=I}),Rn(["drop","take"],function(u,f){kn.prototype[u]=function(_){_=_===z?1:fr(un(_),0);var w=this.__filtered__&&!f?new kn(this):this.clone();return w.__filtered__?w.__takeCount__=Zr(_,w.__takeCount__):w.__views__.push({size:Zr(_,pa),type:u+(w.__dir__<0?"Right":"")}),w},kn.prototype[u+"Right"]=function(_){return this.reverse()[u](_).reverse()}}),Rn(["filter","map","takeWhile"],function(u,f){var _=f+1,w=1==_||3==_;kn.prototype[u]=function(S){var P=this.clone();return P.__iteratees__.push({iteratee:Nt(S,3),type:_}),P.__filtered__=P.__filtered__||w,P}}),Rn(["head","last"],function(u,f){var _="take"+(f?"Right":"");kn.prototype[u]=function(){return this[_](1).value()[0]}}),Rn(["initial","tail"],function(u,f){var _="drop"+(f?"":"Right");kn.prototype[u]=function(){return this.__filtered__?new kn(this):this[_](1)}}),kn.prototype.compact=function(){return this.filter(is)},kn.prototype.find=function(u){return this.filter(u).head()},kn.prototype.findLast=function(u){return this.reverse().find(u)},kn.prototype.invokeMap=pn(function(u,f){return"function"==typeof u?new kn(this):this.map(function(_){return ba(_,u,f)})}),kn.prototype.reject=function(u){return this.filter(Sv(Nt(u)))},kn.prototype.slice=function(u,f){u=un(u);var _=this;return _.__filtered__&&(u>0||f<0)?new kn(_):(u<0?_=_.takeRight(-u):u&&(_=_.drop(u)),f!==z&&(_=(f=un(f))<0?_.dropRight(-f):_.take(f-u)),_)},kn.prototype.takeRightWhile=function(u){return this.reverse().takeWhile(u).reverse()},kn.prototype.toArray=function(){return this.take(pa)},ki(kn.prototype,function(u,f){var _=/^(?:filter|find|map|reject)|While$/.test(f),w=/^(?:head|last)$/.test(f),S=I[w?"take"+("last"==f?"Right":""):f],P=w||/^find/.test(f);S&&(I.prototype[f]=function(){var $=this.__wrapped__,Y=w?[1]:arguments,Q=$ instanceof kn,_e=Y[0],ye=Q||sn($),be=function(An){var Ln=S.apply(I,Pl([An],Y));return w&&Xe?Ln[0]:Ln};ye&&_&&"function"==typeof _e&&1!=_e.length&&(Q=ye=!1);var Xe=this.__chain__,zt=P&&!Xe,mn=Q&&!this.__actions__.length;if(!P&&ye){$=mn?$:new kn(this);var Ht=u.apply($,Y);return Ht.__actions__.push({func:Rp,args:[be],thisArg:z}),new Ai(Ht,Xe)}return zt&&mn?u.apply(this,Y):(Ht=this.thru(be),zt?w?Ht.value()[0]:Ht.value():Ht)})}),Rn(["pop","push","shift","sort","splice","unshift"],function(u){var f=sr[u],_=/^(?:push|sort|unshift)$/.test(u)?"tap":"thru",w=/^(?:pop|shift)$/.test(u);I.prototype[u]=function(){var S=arguments;if(w&&!this.__chain__){var P=this.value();return f.apply(sn(P)?P:[],S)}return this[_](function($){return f.apply(sn($)?$:[],S)})}}),ki(kn.prototype,function(u,f){var _=I[f];if(_){var w=_.name+"";ri.call(kd,w)||(kd[w]=[]),kd[w].push({name:f,func:_})}}),kd[jd(z,ur).name]=[{name:"wrapper",func:z}],kn.prototype.clone=function U0(){var u=new kn(this.__wrapped__);return u.__actions__=eo(this.__actions__),u.__dir__=this.__dir__,u.__filtered__=this.__filtered__,u.__iteratees__=eo(this.__iteratees__),u.__takeCount__=this.__takeCount__,u.__views__=eo(this.__views__),u},kn.prototype.reverse=function Fd(){if(this.__filtered__){var u=new kn(this);u.__dir__=-1,u.__filtered__=!0}else(u=this.clone()).__dir__*=-1;return u},kn.prototype.value=function ws(){var u=this.__wrapped__.value(),f=this.__dir__,_=sn(u),w=f<0,S=_?u.length:0,P=function wp(u,f,_){for(var w=-1,S=_.length;++w=this.__values__.length;return{done:u,value:u?z:this.__values__[this.__index__++]}},I.prototype.plant=function n1(u){for(var f,_=this;_ instanceof wc;){var w=ns(_);w.__index__=0,w.__values__=z,f?S.__wrapped__=w:f=w;var S=w;_=_.__wrapped__}return S.__wrapped__=u,f},I.prototype.reverse=function r1(){var u=this.__wrapped__;if(u instanceof kn){var f=u;return this.__actions__.length&&(f=new kn(this)),(f=f.reverse()).__actions__.push({func:Rp,args:[dv],thisArg:z}),new Ai(f,this.__chain__)}return this.thru(dv)},I.prototype.toJSON=I.prototype.valueOf=I.prototype.value=function kF(){return wa(this.__wrapped__,this.__actions__)},I.prototype.first=I.prototype.head,ih&&(I.prototype[ih]=function Yd(){return this}),I}();Sr._=ys,(dn=function(){return ys}.call(Gs,ps,Gs,Bo))!==z&&(Bo.exports=dn)}.call(this)},738:function(Bo){var Gs;Bo.exports=((Gs=function(){function ps(Ci){return Br.appendChild(Ci.dom),Ci}function dn(Ci){for(var Si=0;SiQt+1e3&&(Dl.update(1e3*Un/(Ci-Qt),100),Qt=Ci,Un=0,Ws)){var Si=performance.memory;Ws.update(Si.usedJSHeapSize/1048576,Si.jsHeapSizeLimit/1048576)}return Ci},update:function(){Kr=this.end()},domElement:Br,setMode:dn}}).Panel=function(ps,dn,z){var Br=1/0,Kr=0,Qt=Math.round,Un=Qt(window.devicePixelRatio||1),Dl=80*Un,Ga=48*Un,Ws=3*Un,Ci=2*Un,Si=3*Un,ms=15*Un,js=74*Un,Ys=30*Un,Uo=document.createElement("canvas");Uo.width=Dl,Uo.height=Ga,Uo.style.cssText="width:80px;height:48px";var On=Uo.getContext("2d");return On.font="bold "+9*Un+"px Helvetica,Arial,sans-serif",On.textBaseline="top",On.fillStyle=z,On.fillRect(0,0,Dl,Ga),On.fillStyle=dn,On.fillText(ps,Ws,Ci),On.fillRect(Si,ms,js,Ys),On.fillStyle=z,On.globalAlpha=.9,On.fillRect(Si,ms,js,Ys),{dom:Uo,update:function(ur,mc){Br=Math.min(Br,ur),Kr=Math.max(Kr,ur),On.fillStyle=z,On.globalAlpha=1,On.fillRect(0,0,Dl,ms),On.fillStyle=dn,On.fillText(Qt(ur)+" "+ps+" ("+Qt(Br)+"-"+Qt(Kr)+")",Ws,Ci),On.drawImage(Uo,Si+Un,ms,js-Un,Ys,Si,ms,js-Un,Ys),On.fillRect(Si+js-Un,ms,Un,Ys),On.fillStyle=z,On.globalAlpha=.9,On.fillRect(Si+js-Un,ms,Un,Qt((1-ur/mc)*Ys))}}},Gs)}},Bo=>{Bo(Bo.s=360)}]); \ No newline at end of file diff --git a/frontend/dist/gui/main.b45e12319af3e832.js b/frontend/dist/gui/main.b45e12319af3e832.js new file mode 100644 index 0000000..17e19b6 --- /dev/null +++ b/frontend/dist/gui/main.b45e12319af3e832.js @@ -0,0 +1 @@ +(self.webpackChunkgui=self.webpackChunkgui||[]).push([[179],{360:(No,Hs,ps)=>{"use strict";function dn(i){return"function"==typeof i}function z(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 Br=z(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 Kr(i,t){if(i){const e=i.indexOf(t);0<=e&&i.splice(e,1)}}class Qt{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(dn(n))try{n()}catch(s){t=s instanceof Br?s.errors:[s]}const{_finalizers:r}=this;if(r){this._finalizers=null;for(const s of r)try{za(s)}catch(o){t=t??[],o instanceof Br?t=[...t,...o.errors]:t.push(o)}}if(t)throw new Br(t)}}add(t){var e;if(t&&t!==this)if(this.closed)za(t);else{if(t instanceof Qt){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)&&Kr(e,t)}remove(t){const{_finalizers:e}=this;e&&Kr(e,t),t instanceof Qt&&t._removeParent(this)}}Qt.EMPTY=(()=>{const i=new Qt;return i.closed=!0,i})();const Un=Qt.EMPTY;function Dl(i){return i instanceof Qt||i&&"closed"in i&&dn(i.remove)&&dn(i.add)&&dn(i.unsubscribe)}function za(i){dn(i)?i():i.unsubscribe()}const $s={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 Si(i){Ci.setTimeout(()=>{const{onUnhandledError:t}=$s;if(!t)throw i;t(i)})}function ms(){}const Gs=On("C",void 0,void 0);function On(i,t,e){return{kind:i,value:t,error:e}}let ur=null;function mc(i){if($s.useDeprecatedSynchronousErrorHandling){const t=!ur;if(t&&(ur={errorThrown:!1,error:null}),i(),t){const{errorThrown:e,error:n}=ur;if(ur=null,e)throw n}}else i()}class Tl extends Qt{constructor(t){super(),this.isStopped=!1,t?(this.destination=t,Dl(t)&&t.add(this)):this.destination=wE}static create(t,e,n){return new da(t,e,n)}next(t){this.isStopped?Yg(function Bo(i){return On("N",i,void 0)}(t),this):this._next(t)}error(t){this.isStopped?Yg(function Ws(i){return On("E",void 0,i)}(t),this):(this.isStopped=!0,this._error(t))}complete(){this.isStopped?Yg(Gs,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 ca=Function.prototype.bind;function Il(i,t){return ca.call(i,t)}class Ha{constructor(t){this.partialObserver=t}next(t){const{partialObserver:e}=this;if(e.next)try{e.next(t)}catch(n){md(n)}}error(t){const{partialObserver:e}=this;if(e.error)try{e.error(t)}catch(n){md(n)}else md(t)}complete(){const{partialObserver:t}=this;if(t.complete)try{t.complete()}catch(e){md(e)}}}class da extends Tl{constructor(t,e,n){let r;if(super(),dn(t)||!t)r={next:t??void 0,error:e??void 0,complete:n??void 0};else{let s;this&&$s.useDeprecatedNextContext?(s=Object.create(t),s.unsubscribe=()=>this.unsubscribe(),r={next:t.next&&Il(t.next,s),error:t.error&&Il(t.error,s),complete:t.complete&&Il(t.complete,s)}):r=t}this.destination=new Ha(r)}}function md(i){$s.useDeprecatedSynchronousErrorHandling?function la(i){$s.useDeprecatedSynchronousErrorHandling&&ur&&(ur.errorThrown=!0,ur.error=i)}(i):Si(i)}function Yg(i,t){const{onStoppedNotification:e}=$s;e&&Ci.setTimeout(()=>e(i,t))}const wE={closed:!0,next:ms,error:function xE(i){throw i},complete:ms},qg="function"==typeof Symbol&&Symbol.observable||"@@observable";function $a(i){return i}function o0(i){return 0===i.length?$a:1===i.length?i[0]:function(e){return i.reduce((n,r)=>r(n),e)}}let Tn=(()=>{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 Pf(i){return i&&i instanceof Tl||function CE(i){return i&&dn(i.next)&&dn(i.error)&&dn(i.complete)}(i)&&Dl(i)}(e)?e:new da(e,n,r);return mc(()=>{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=Ga(n))((r,s)=>{const o=new da({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)}[qg](){return this}pipe(...e){return o0(e)(this)}toPromise(e){return new(e=Ga(e))((n,r)=>{let s;this.subscribe(o=>s=o,o=>r(o),()=>n(s))})}}return i.create=t=>new i(t),i})();function Ga(i){var t;return null!==(t=i??$s.Promise)&&void 0!==t?t:Promise}const ua=z(i=>function(){i(this),this.name="ObjectUnsubscribedError",this.message="object unsubscribed"});let Te=(()=>{class i extends Tn{constructor(){super(),this.closed=!1,this.currentObservers=null,this.observers=[],this.isStopped=!1,this.hasError=!1,this.thrownError=null}lift(e){const n=new a0(this,this);return n.operator=e,n}_throwIfClosed(){if(this.closed)throw new ua}next(e){mc(()=>{if(this._throwIfClosed(),!this.isStopped){this.currentObservers||(this.currentObservers=Array.from(this.observers));for(const n of this.currentObservers)n.next(e)}})}error(e){mc(()=>{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(){mc(()=>{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?Un:(this.currentObservers=null,s.push(e),new Qt(()=>{this.currentObservers=null,Kr(s,e)}))}_checkFinalizedStatuses(e){const{hasError:n,thrownError:r,isStopped:s}=this;n?e.error(r):s&&e.complete()}asObservable(){const e=new Tn;return e.source=this,e}}return i.create=(t,e)=>new a0(t,e),i})();class a0 extends Te{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:Un}}function l0(i){return dn(i?.lift)}function ni(i){return t=>{if(l0(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 qn(i,t,e,n,r){return new SE(i,t,e,n,r)}class SE extends Tl{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 tt(i,t){return ni((e,n)=>{let r=0;e.subscribe(qn(n,s=>{n.next(i.call(t,s,r++))}))})}function ha(i){return this instanceof ha?(this.v=i,this):new ha(i)}function Nf(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 Xg(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 t_=i=>i&&"number"==typeof i.length&&"function"!=typeof i;function n_(i){return dn(i?.then)}function f0(i){return dn(i[qg])}function p0(i){return Symbol.asyncIterator&&dn(i?.[Symbol.asyncIterator])}function m0(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 g0=function i_(){return"function"==typeof Symbol&&Symbol.iterator?Symbol.iterator:"@@iterator"}();function Bf(i){return dn(i?.[g0])}function _0(i){return function Lf(i,t,e){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var r,n=e.apply(i,t||[]),s=[];return r=Object.create(("function"==typeof AsyncIterator?AsyncIterator:Object).prototype),a("next"),a("throw"),a("return",function o(m){return function(g){return Promise.resolve(g).then(m,h)}}),r[Symbol.asyncIterator]=function(){return this},r;function a(m,g){n[m]&&(r[m]=function(b){return new Promise(function(v,y){s.push([m,b,v,y])>1||l(m,b)})},g&&(r[m]=g(r[m])))}function l(m,g){try{!function c(m){m.value instanceof ha?Promise.resolve(m.value.v).then(d,h):p(s[0][2],m)}(n[m](g))}catch(b){p(s[0][3],b)}}function d(m){l("next",m)}function h(m){l("throw",m)}function p(m,g){m(g),s.shift(),s.length&&l(s[0][0],s[0][1])}}(this,arguments,function*(){const e=i.getReader();try{for(;;){const{value:n,done:r}=yield ha(e.read());if(r)return yield ha(void 0);yield yield ha(n)}}finally{e.releaseLock()}})}function v0(i){return dn(i?.getReader)}function Mr(i){if(i instanceof Tn)return i;if(null!=i){if(f0(i))return function FE(i){return new Tn(t=>{const e=i[qg]();if(dn(e.subscribe))return e.subscribe(t);throw new TypeError("Provided object does not correctly implement Symbol.observable")})}(i);if(t_(i))return function LE(i){return new Tn(t=>{for(let e=0;e{i.then(e=>{t.closed||(t.next(e),t.complete())},e=>t.error(e)).then(null,Si)})}(i);if(p0(i))return y0(i);if(Bf(i))return function BE(i){return new Tn(t=>{for(const e of i)if(t.next(e),t.closed)return;t.complete()})}(i);if(v0(i))return function b0(i){return y0(_0(i))}(i)}throw m0(i)}function y0(i){return new Tn(t=>{(function UE(i,t){var e,n,r,s;return function _d(i,t,e,n){return new(e||(e=Promise))(function(s,o){function a(d){try{c(n.next(d))}catch(h){o(h)}}function l(d){try{c(n.throw(d))}catch(h){o(h)}}function c(d){d.done?s(d.value):function r(s){return s instanceof e?s:new e(function(o){o(s)})}(d.value).then(a,l)}c((n=n.apply(i,t||[])).next())})}(this,void 0,void 0,function*(){try{for(e=Nf(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 ja(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 ir(i,t,e=1/0){return dn(t)?ir((n,r)=>tt((s,o)=>t(n,s,r,o))(Mr(i(n,r))),e):("number"==typeof t&&(e=t),ni((n,r)=>function VE(i,t,e,n,r,s,o,a){const l=[];let c=0,d=0,h=!1;const p=()=>{h&&!l.length&&!c&&t.complete()},m=b=>c{s&&t.next(b),c++;let v=!1;Mr(e(b,d++)).subscribe(qn(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(qn(t,m,()=>{h=!0,p()})),()=>{a?.()}}(n,r,i,e)))}function bd(i=1/0){return ir($a,i)}const go=new Tn(i=>i.complete());function Hu(i){return i&&dn(i.schedule)}function s_(i){return i[i.length-1]}function x0(i){return dn(s_(i))?i.pop():void 0}function $u(i){return Hu(s_(i))?i.pop():void 0}function o_(i,t=0){return ni((e,n)=>{e.subscribe(qn(n,r=>ja(n,i,()=>n.next(r),t),()=>ja(n,i,()=>n.complete(),t),r=>ja(n,i,()=>n.error(r),t)))})}function a_(i,t=0){return ni((e,n)=>{n.add(i.schedule(()=>e.subscribe(n),t))})}function l_(i,t){if(!i)throw new Error("Iterable cannot be null");return new Tn(e=>{ja(e,t,()=>{const n=i[Symbol.asyncIterator]();ja(e,t,()=>{n.next().then(r=>{r.done?e.complete():e.next(r.value)})},0,!0)})})}function Ni(i,t){return t?function C0(i,t){if(null!=i){if(f0(i))return function HE(i,t){return Mr(i).pipe(a_(t),o_(t))}(i,t);if(t_(i))return function GE(i,t){return new Tn(e=>{let n=0;return t.schedule(function(){n===i.length?e.complete():(e.next(i[n++]),e.closed||this.schedule())})})}(i,t);if(n_(i))return function $E(i,t){return Mr(i).pipe(a_(t),o_(t))}(i,t);if(p0(i))return l_(i,t);if(Bf(i))return function WE(i,t){return new Tn(e=>{let n;return ja(e,t,()=>{n=i[g0](),ja(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)}),()=>dn(n?.return)&&n.return()})}(i,t);if(v0(i))return function M0(i,t){return l_(_0(i),t)}(i,t)}throw m0(i)}(i,t):Mr(i)}function Cr(...i){const t=$u(i),e=function w0(i,t){return"number"==typeof s_(i)?i.pop():t}(i,1/0),n=i;return n.length?1===n.length?Mr(n[0]):bd(e)(Ni(n,t)):go}function Uf(i={}){const{connector:t=(()=>new Te),resetOnError:e=!0,resetOnComplete:n=!0,resetOnRefCountZero:r=!0}=i;return s=>{let o,a,l,c=0,d=!1,h=!1;const p=()=>{a?.unsubscribe(),a=void 0},m=()=>{p(),o=l=void 0,d=h=!1},g=()=>{const b=o;m(),b?.unsubscribe()};return ni((b,v)=>{c++,!h&&!d&&p();const y=l=l??t();v.add(()=>{c--,0===c&&!h&&!d&&(a=xd(g,r))}),y.subscribe(v),!o&&c>0&&(o=new da({next:M=>y.next(M),error:M=>{h=!0,p(),a=xd(m,e,M),y.error(M)},complete:()=>{d=!0,p(),a=xd(m,n),y.complete()}}),Mr(b).subscribe(o))})(s)}}function xd(i,t,...e){if(!0===t)return void i();if(!1===t)return;const n=new da({next:()=>{n.unsubscribe(),i()}});return Mr(t(...e)).subscribe(n)}function ci(i){for(let t in i)if(i[t]===ci)return t;throw Error("Could not find renamed property on target object.")}function c_(i,t){for(const e in t)t.hasOwnProperty(e)&&!i.hasOwnProperty(e)&&(i[e]=t[e])}function mi(i){if("string"==typeof i)return i;if(Array.isArray(i))return"["+i.map(mi).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 Vf(i,t){return null==i||""===i?null===t?"":t:null==t||""===t?i:i+" "+t}const d_=ci({__forward_ref__:ci});function Gn(i){return i.__forward_ref__=Gn,i.toString=function(){return mi(this())},i}function Ot(i){return Gu(i)?i():i}function Gu(i){return"function"==typeof i&&i.hasOwnProperty(d_)&&i.__forward_ref__===Gn}function Wu(i){return i&&!!i.\u0275providers}const Yu="https://g.co/ng/security#xss";class pe extends Error{constructor(t,e){super(zf(t,e)),this.code=t}}function zf(i,t){return`NG0${Math.abs(i)}${t?": "+t.trim():""}`}function Jt(i){return"string"==typeof i?i:null==i?"":String(i)}function Hf(i,t){throw new pe(-201,!1)}function Sn(i,t){null==i&&function ii(i,t,e,n){throw new Error(`ASSERTION ERROR: ${i}`+(null==n?"":` [Expected=> ${e} ${n} ${t} <=Actual]`))}(t,i,null,"!=")}function ke(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 $f(i){return u_(i,wd)||u_(i,f_)}function u_(i,t){return i.hasOwnProperty(t)?i[t]:null}function h_(i){return i&&(i.hasOwnProperty(gs)||i.hasOwnProperty(A0))?i[gs]:null}const wd=ci({\u0275prov:ci}),gs=ci({\u0275inj:ci}),f_=ci({ngInjectableDef:ci}),A0=ci({ngInjectorDef:ci});var Ft=(()=>((Ft=Ft||{})[Ft.Default=0]="Default",Ft[Ft.Host=1]="Host",Ft[Ft.Self=2]="Self",Ft[Ft.SkipSelf=4]="SkipSelf",Ft[Ft.Optional=8]="Optional",Ft))();let Gf;function Ys(i){const t=Gf;return Gf=i,t}function _s(i,t,e){const n=$f(i);return n&&"root"==n.providedIn?void 0===n.value?n.value=n.factory():n.value:e&Ft.Optional?null:void 0!==t?t:void Hf(mi(i))}const In=(()=>typeof globalThis<"u"&&globalThis||typeof global<"u"&&global||typeof window<"u"&&window||typeof self<"u"&&typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&self)(),kl={},Xu="__NG_DI_FLAG__",gi="ngTempTokenPath",Pl="ngTokenPath",p_=/\n/gm,JE="\u0275",Wf="__source";let Ku;function Md(i){const t=Ku;return Ku=i,t}function eA(i,t=Ft.Default){if(void 0===Ku)throw new pe(-203,!1);return null===Ku?_s(i,void 0,t):Ku.get(i,t&Ft.Optional?null:void 0,t)}function ee(i,t=Ft.Default){return(function D0(){return Gf}()||eA)(Ot(i),t)}function Lt(i,t=Ft.Default){return ee(i,jf(t))}function jf(i){return typeof i>"u"||"number"==typeof i?i:0|(i.optional&&8)|(i.host&&1)|(i.self&&2)|(i.skipSelf&&4)}function Yf(i){const t=[];for(let e=0;e((_o=_o||{})[_o.OnPush=0]="OnPush",_o[_o.Default=1]="Default",_o))(),qs=(()=>{return(i=qs||(qs={}))[i.Emulated=0]="Emulated",i[i.None=2]="None",i[i.ShadowDom=3]="ShadowDom",qs;var i})();const qa={},Wn=[],Ur=ci({\u0275cmp:ci}),Qu=ci({\u0275dir:ci}),yc=ci({\u0275pipe:ci}),__=ci({\u0275mod:ci}),fa=ci({\u0275fac:ci}),Ju=ci({__NG_ELEMENT_ID__:ci});let tA=0;function ot(i){return Ya(()=>{const t=vo(i),e={...t,decls:i.decls,vars:i.vars,template:i.template,consts:i.consts||null,ngContentSelectors:i.ngContentSelectors,onPush:i.changeDetection===_o.OnPush,directiveDefs:null,pipeDefs:null,dependencies:t.standalone&&i.dependencies||null,getStandaloneInjector:null,data:i.data||{},encapsulation:i.encapsulation||qs.Emulated,id:"c"+tA++,styles:i.styles||Wn,_:null,schemas:i.schemas||null,tView:null};v_(e);const n=i.dependencies;return e.directiveDefs=Xf(n,!1),e.pipeDefs=Xf(n,!0),e})}function eh(i,t,e){const n=i.\u0275cmp;n.directiveDefs=Xf(t,!1),n.pipeDefs=Xf(e,!0)}function nA(i){return Hn(i)||Vr(i)}function Sd(i){return null!==i}function en(i){return Ya(()=>({type:i.type,bootstrap:i.bootstrap||Wn,declarations:i.declarations||Wn,imports:i.imports||Wn,exports:i.exports||Wn,transitiveCompileScopes:null,schemas:i.schemas||null,id:i.id||null}))}function qf(i,t){if(null==i)return qa;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 ve(i){return Ya(()=>{const t=vo(i);return v_(t),t})}function $i(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 Hn(i){return i[Ur]||null}function Vr(i){return i[Qu]||null}function vs(i){return i[yc]||null}function hr(i,t){const e=i[__]||null;if(!e&&!0===t)throw new Error(`Type ${mi(i)} does not have '\u0275mod' property.`);return e}function vo(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||Wn,viewQuery:i.viewQuery||null,features:i.features||null,setInput:null,findHostDirectiveDefs:null,hostDirectives:null,inputs:qf(i.inputs,t),outputs:qf(i.outputs)}}function v_(i){i.features?.forEach(t=>t(i))}function Xf(i,t){if(!i)return null;const e=t?vs:nA;return()=>("function"==typeof i?i():i).map(n=>e(n)).filter(Sd)}const Xa=0,lt=1,fn=2,Bi=3,ys=4,X=5,he=6,ae=7,ze=8,jt=9,Vn=10,xt=11,ai=12,bc=13,I0=14,Er=15,rr=16,th=17,zo=18,Xs=19,Ol=20,ri=21,bi=22,Ad=1,R0=2,Kf=7,Zf=8,Ka=9,Ui=10;function bs(i){return Array.isArray(i)&&"object"==typeof i[Ad]}function xs(i){return Array.isArray(i)&&!0===i[Ad]}function Qf(i){return 0!=(4&i.flags)}function Dd(i){return i.componentOffset>-1}function xc(i){return 1==(1&i.flags)}function yo(i){return!!i.template}function nh(i){return 0!=(256&i[fn])}function Za(i,t){return i.hasOwnProperty(fa)?i[fa]:null}class Id{constructor(t,e,n){this.previousValue=t,this.currentValue=e,this.firstChange=n}isFirstChange(){return this.firstChange}}function xi(){return Rd}function Rd(i){return i.type.prototype.ngOnChanges&&(i.setInput=kd),tp}function tp(){const i=L0(this),t=i?.current;if(t){const e=i.previous;if(e===qa)i.previous=t;else for(let n in t)e[n]=t[n];i.current=null,this.ngOnChanges(t)}}function kd(i,t,e,n){const r=this.declaredInputs[e],s=L0(i)||function aA(i,t){return i[F0]=t}(i,{previous:qa,current:null}),o=s.current||(s.current={}),a=s.previous,l=a[r];o[r]=new Id(l&&l.currentValue,t,a===qa),i[n]=t}xi.ngInherit=!0;const F0="__ngSimpleChanges__";function L0(i){return i[F0]||null}const Qr=function(i,t,e){},Pd="svg";function I(i){for(;Array.isArray(i);)i=i[Xa];return i}function wc(i,t){return I(t[i])}function Ai(i,t){return I(t[i.index])}function N0(i,t){return i.data[t]}function Fd(i,t){return i[t]}function ws(i,t){const e=t[i];return bs(e)?e:e[Xa]}function np(i){return 64==(64&i[fn])}function Fl(i,t){return null==t?null:i[t]}function B0(i){i[zo]=0}function S_(i,t){i[X]+=t;let e=i,n=i[Bi];for(;null!==n&&(1===t&&1===e[X]||-1===t&&0===e[X]);)n[X]+=t,e=n,n=n[Bi]}const Pt={lFrame:Ja(null),bindingsEnabled:!0};function pa(){return Pt.bindingsEnabled}function Se(){return Pt.lFrame.lView}function zn(){return Pt.lFrame.tView}function Vt(i){return Pt.lFrame.contextLView=i,i[ze]}function Et(i){return Pt.lFrame.contextLView=null,i}function Ar(){let i=V0();for(;null!==i&&64===i.type;)i=i.parent;return i}function V0(){return Pt.lFrame.currentTNode}function ma(i,t){const e=Pt.lFrame;e.currentTNode=i,e.isParent=t}function E_(){return Pt.lFrame.isParent}function A_(){Pt.lFrame.isParent=!1}function zr(){const i=Pt.lFrame;let t=i.bindingRootIndex;return-1===t&&(t=i.bindingRootIndex=i.tView.bindingStartIndex),t}function Ll(){return Pt.lFrame.bindingIndex++}function Ks(i){const t=Pt.lFrame,e=t.bindingIndex;return t.bindingIndex=t.bindingIndex+i,e}function $0(i,t){const e=Pt.lFrame;e.bindingIndex=e.bindingRootIndex=i,Ho(t)}function Ho(i){Pt.lFrame.currentDirectiveIndex=i}function ih(i){const t=Pt.lFrame.currentDirectiveIndex;return-1===t?null:i[t]}function Nl(){return Pt.lFrame.currentQueryIndex}function Ms(i){Pt.lFrame.currentQueryIndex=i}function _A(i){const t=i[lt];return 2===t.type?t.declTNode:1===t.type?i[he]:null}function T_(i,t,e){if(e&Ft.SkipSelf){let r=t,s=i;for(;!(r=r.parent,null!==r||e&Ft.Host||(r=_A(s),null===r||(s=s[Er],10&r.type))););if(null===r)return!1;t=r,i=s}const n=Pt.lFrame=Ld();return n.currentTNode=t,n.lView=i,!0}function rp(i){const t=Ld(),e=i[lt];Pt.lFrame=t,t.currentTNode=e.firstChild,t.lView=i,t.tView=e,t.contextLView=i,t.bindingIndex=e.bindingStartIndex,t.inI18n=!1}function Ld(){const i=Pt.lFrame,t=null===i?null:i.child;return null===t?Ja(i):t}function Ja(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 I_(){const i=Pt.lFrame;return Pt.lFrame=i.parent,i.currentTNode=null,i.lView=null,i}const G0=I_;function Nd(){const i=I_();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 Kn(){return Pt.lFrame.selectedIndex}function el(i){Pt.lFrame.selectedIndex=i}function Di(){const i=Pt.lFrame;return N0(i.tView,i.selectedIndex)}function ki(){Pt.lFrame.currentNamespace=Pd}function ga(){!function Cc(){Pt.lFrame.currentNamespace=null}()}function Bd(i,t){for(let e=t.directiveStart,n=t.directiveEnd;e=n)break}else t[l]<0&&(i[zo]+=65536),(a>11>16&&(3&i[fn])===t){i[fn]+=2048,Qr(4,a,s);try{s.call(a)}finally{Qr(5,a,s)}}}else{Qr(4,a,s);try{s.call(a)}finally{Qr(5,a,s)}}}const _a=-1;class Ud{constructor(t,e,n){this.factory=t,this.resolving=!1,this.canSeeViewProviders=e,this.injectImpl=n}}function O_(i,t,e){let n=0;for(;nt){o=s-1;break}}}for(;s>16}(i),n=t;for(;e>0;)n=n[Er],e--;return n}let Vd=!0;function cp(i){const t=Vd;return Vd=i,t}const L_=255,K0=5;let Z0=0;const va={};function oh(i,t){const e=Q0(i,t);if(-1!==e)return e;const n=t[lt];n.firstCreatePass&&(i.injectorIndex=t.length,ah(n.data,i),ah(t,null),ah(n.blueprint,null));const r=lh(i,t),s=i.injectorIndex;if(lp(r)){const o=rh(r),a=sh(r,t),l=a[lt].data;for(let c=0;c<8;c++)t[s+c]=a[o+c]|l[o+c]}return t[s+8]=r,s}function ah(i,t){i.push(0,0,0,0,0,0,0,0,t)}function Q0(i,t){return-1===i.injectorIndex||i.parent&&i.parent.injectorIndex===i.injectorIndex||null===t[i.injectorIndex+8]?-1:i.injectorIndex}function lh(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=dh(r),null===n)return _a;if(e++,r=r[Er],-1!==n.injectorIndex)return n.injectorIndex|e<<16}return _a}function pn(i,t,e){!function N_(i,t,e){let n;"string"==typeof e?n=e.charCodeAt(0)||0:e.hasOwnProperty(Ju)&&(n=e[Ju]),null==n&&(n=e[Ju]=Z0++);const r=n&L_;t.data[i+(r>>K0)]|=1<=0?t&L_:Zs:t}(e);if("function"==typeof s){if(!T_(t,i,n))return n&Ft.Host?J0(r,0,n):zd(t,e,n,r);try{const o=s(n);if(null!=o||n&Ft.Optional)return o;Hf()}finally{G0()}}else if("number"==typeof s){let o=null,a=Q0(i,t),l=_a,c=n&Ft.Host?t[rr][he]:null;for((-1===a||n&Ft.SkipSelf)&&(l=-1===a?lh(i,t):t[a+8],l!==_a&&U_(n,!1)?(o=t[lt],a=rh(l),t=sh(l,t)):a=-1);-1!==a;){const d=t[lt];if(up(s,a,d.data)){const h=SA(a,t,e,o,n,c);if(h!==va)return h}l=t[a+8],l!==_a&&U_(n,t[lt].data[a+8]===c)&&up(s,a,t)?(o=d,a=rh(l),t=sh(l,t)):a=-1}}return r}function SA(i,t,e,n,r,s){const o=t[lt],a=o.data[i+8],d=ts(a,o,e,null==n?Dd(a)&&Vd:n!=o&&0!=(3&a.type),r&Ft.Host&&s===a);return null!==d?Ac(t,o,d,a):va}function ts(i,t,e,n,r){const s=i.providerIndexes,o=t.data,a=1048575&s,l=i.directiveStart,d=s>>20,p=r?a+d:i.directiveEnd;for(let m=n?a:a+d;m=l&&g.type===e)return m}if(r){const m=o[l];if(m&&yo(m)&&m.type===e)return l}return null}function Ac(i,t,e,n){let r=i[e];const s=t.data;if(function bA(i){return i instanceof Ud}(r)){const o=r;o.resolving&&function S0(i,t){const e=t?`. Dependency path: ${t.join(" > ")} > ${i}`:"";throw new pe(-200,`Circular dependency in DI detected for ${i}${e}`)}(function Xn(i){return"function"==typeof i?i.name||i.toString():"object"==typeof i&&null!=i&&"function"==typeof i.type?i.type.name||i.type.toString():Jt(i)}(s[e]));const a=cp(o.canSeeViewProviders);o.resolving=!0;const l=o.injectImpl?Ys(o.injectImpl):null;T_(i,n,Ft.Default);try{r=i[e]=o.factory(void 0,s,i,n),t.firstCreatePass&&e>=n.directiveStart&&function es(i,t,e){const{ngOnChanges:n,ngOnInit:r,ngDoCheck:s}=t.type.prototype;if(n){const o=Rd(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&&Ys(l),cp(a),o.resolving=!1,G0()}}return r}function up(i,t,e){return!!(e[t+(i>>K0)]&1<{const t=i.prototype.constructor,e=t[fa]||ch(t),n=Object.prototype;let r=Object.getPrototypeOf(i.prototype).constructor;for(;r&&r!==n;){const s=r[fa]||ch(r);if(s&&s!==e)return s;r=Object.getPrototypeOf(r)}return s=>new s})}function ch(i){return Gu(i)?()=>{const t=ch(Ot(i));return t&&t()}:Za(i)}function dh(i){const t=i[lt],e=t.type;return 2===e?t.declTNode:1===e?i[he]:null}function ya(i){return function CA(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 ba(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,d){const h=l.hasOwnProperty(Tc)?l[Tc]:Object.defineProperty(l,Tc,{value:[]})[Tc];for(;h.length<=d;)h.push(null);return(h[d]=h[d]||[]).push(o),l}}return e&&(r.prototype=Object.create(e.prototype)),r.prototype.ngMetadataName=i,r.annotationCls=r,r})}class me{constructor(t,e){this._desc=t,this.ngMetadataName="InjectionToken",this.\u0275prov=void 0,"number"==typeof e?this.__NG_ELEMENT_ID__=e:void 0!==e&&(this.\u0275prov=ke({token:this,providedIn:e.providedIn||"root",factory:e.factory}))}get multi(){return this}toString(){return`InjectionToken ${this._desc}`}}function Vl(i,t){i.forEach(e=>Array.isArray(e)?Vl(e,t):t(e))}function z_(i,t,e){t>=i.length?i.push(e):i.splice(t,0,e)}function pp(i,t){return t>=i.length-1?i.pop():i.splice(t,1)[0]}function Gd(i,t){const e=[];for(let n=0;n=0?i[1|n]=e:(n=~n,function TA(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 jd(i,t){const e=Rc(i,t);if(e>=0)return i[1|e]}function Rc(i,t){return function gp(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),Ss=Cd(Hd("Optional"),8),xa=Cd(Hd("SkipSelf"),4);var Es=(()=>((Es=Es||{})[Es.Important=1]="Important",Es[Es.DashCase=2]="DashCase",Es))();const Cp=new Map;let _x=0;const tv="__ngContext__";function $r(i,t){bs(t)?(i[tv]=t[Ol],function vx(i){Cp.set(i[Ol],i)}(t)):i[tv]=t}let iv;function rv(i,t){return iv(i,t)}function _h(i){const t=i[Bi];return xs(t)?t[Bi]:t}function sv(i){return Ax(i[bc])}function ov(i){return Ax(i[ys])}function Ax(i){for(;null!==i&&!xs(i);)i=i[ys];return i}function Ir(i,t,e,n,r){if(null!=n){let s,o=!1;xs(n)?s=n:bs(n)&&(o=!0,n=n[Xa]);const a=I(n);0===i&&null!==e?null==r?Px(t,e,a):Oc(t,e,a,r||null,!0):1===i&&null!==e?Oc(t,e,a,r||null,!0):2===i?function fv(i,t,e){const n=Ap(i,t);n&&function ZA(i,t,e,n){i.removeChild(t,e,n)}(i,n,t,e)}(t,a,o):3===i&&t.destroyNode(a),null!=s&&function Vx(i,t,e,n,r){const s=e[Kf];s!==I(e)&&Ir(t,i,n,s,r);for(let a=Ui;a0&&(i[e-1][ys]=n[ys]);const s=pp(i,Ui+t);!function GA(i,t){yh(i,t,t[xt],2,null,null),t[Xa]=null,t[he]=null}(n[lt],n);const o=s[Xs];null!==o&&o.detachView(s[lt]),n[Bi]=null,n[ys]=null,n[fn]&=-65}return n}function Ix(i,t){if(!(128&t[fn])){const e=t[xt];e.destroyNode&&yh(i,t,e,3,null,null),function YA(i){let t=i[bc];if(!t)return dv(i[lt],i);for(;t;){let e=null;if(bs(t))e=t[bc];else{const n=t[Ui];n&&(e=n)}if(!e){for(;t&&!t[ys]&&t!==i;)bs(t)&&dv(t[lt],t),t=t[Bi];null===t&&(t=i),bs(t)&&dv(t[lt],t),e=t&&t[ys]}t=e}}(t)}}function dv(i,t){if(!(128&t[fn])){t[fn]&=-65,t[fn]|=128,function KA(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===qs.None||s===qs.Emulated)return null}return Ai(n,e)}}(i,t.parent,e)}function Oc(i,t,e,n,r){i.insertBefore(t,e,n,r)}function Px(i,t,e){i.appendChild(t,e)}function Ox(i,t,e,n,r){null!==n?Oc(i,t,e,n,r):Px(i,t,e)}function Ap(i,t){return i.parentNode(t)}function Fx(i,t,e){return Nx(i,t,e)}let uv,Rp,gv,Nx=function Lx(i,t,e){return 40&i.type?Ai(i,e):null};function vh(i,t,e,n){const r=Rx(i,n,t),s=t[xt],a=Fx(n.parent||t[he],n,t);if(null!=r)if(Array.isArray(e))for(let l=0;li,createScript:i=>i,createScriptURL:i=>i})}catch{}return Rp}()?.createHTML(i)||i}class zl{constructor(t){this.changingThisBreaksApplicationSecurity=t}toString(){return`SafeValue must use [property]=binding: ${this.changingThisBreaksApplicationSecurity} (see ${Yu})`}}class o1 extends zl{getTypeName(){return"HTML"}}class a1 extends zl{getTypeName(){return"Style"}}class l1 extends zl{getTypeName(){return"Script"}}class c1 extends zl{getTypeName(){return"URL"}}class Pp extends zl{getTypeName(){return"ResourceURL"}}function Js(i){return i instanceof zl?i.changingThisBreaksApplicationSecurity:i}function Ma(i,t){const e=function d1(i){return i instanceof zl&&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 ${Yu})`)}return e===t}class g1{constructor(t){this.inertDocumentHelper=t}getInertBodyElement(t){t=""+t;try{const e=(new window.DOMParser).parseFromString(Yd(t),"text/html").body;return null===e?this.inertDocumentHelper.getInertBodyElement(t):(e.removeChild(e.firstChild),e)}catch{return null}}}class _1{constructor(t){this.defaultDoc=t,this.inertDocument=this.defaultDoc.implementation.createHTMLDocument("sanitization-inert")}getInertBodyElement(t){const e=this.inertDocument.createElement("template");return e.innerHTML=Yd(t),e}}const v1=/^(?!javascript:)(?:[a-z0-9+.-]+:|[^&:\/?#]*(?:[\/?#]|$))/i;function bh(i){return(i=String(i)).match(v1)?i:"unsafe:"+i}function Ca(i){const t={};for(const e of i.split(","))t[e]=!0;return t}function Fc(...i){const t={};for(const e of i)for(const n in e)e.hasOwnProperty(n)&&(t[n]=!0);return t}const yv=Ca("area,br,col,hr,img,wbr"),bv=Ca("colgroup,dd,dt,li,p,tbody,td,tfoot,th,thead,tr"),xv=Ca("rp,rt"),wv=Fc(yv,Fc(bv,Ca("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")),Fc(xv,Ca("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")),Fc(xv,bv)),qd=Ca("background,cite,href,itemtype,longdesc,poster,src,xlink:href"),Yx=Fc(qd,Ca("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"),Ca("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")),Cv=Ca("script,style,template");class qx{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(!wv.hasOwnProperty(e))return this.sanitizedSomething=!0,!Cv.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();wv.hasOwnProperty(e)&&!yv.hasOwnProperty(e)&&(this.buf.push(""))}chars(t){this.buf.push(Xx(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 b1=/[\uD800-\uDBFF][\uDC00-\uDFFF]/g,x1=/([^\#-~ |!])/g;function Xx(i){return i.replace(/&/g,"&").replace(b1,function(t){return"&#"+(1024*(t.charCodeAt(0)-55296)+(t.charCodeAt(1)-56320)+65536)+";"}).replace(x1,function(t){return"&#"+t.charCodeAt(0)+";"}).replace(//g,">")}let Fp;function Kx(i,t){let e=null;try{Fp=Fp||function jx(i){const t=new _1(i);return function Op(){try{return!!(new window.DOMParser).parseFromString(Yd(""),"text/html")}catch{return!1}}()?new g1(t):t}(i);let n=t?String(t):"";e=Fp.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=Fp.getInertBodyElement(n)}while(n!==s);return Yd((new qx).sanitizeChildren(Sv(e)||e))}finally{if(e){const n=Sv(e)||e;for(;n.firstChild;)n.removeChild(n.firstChild)}}}function Sv(i){return"content"in i&&function w1(i){return i.nodeType===Node.ELEMENT_NODE&&"TEMPLATE"===i.nodeName}(i)?i.content:null}var Zn=(()=>((Zn=Zn||{})[Zn.NONE=0]="NONE",Zn[Zn.HTML=1]="HTML",Zn[Zn.STYLE=2]="STYLE",Zn[Zn.SCRIPT=3]="SCRIPT",Zn[Zn.URL=4]="URL",Zn[Zn.RESOURCE_URL=5]="RESOURCE_URL",Zn))();function Lp(i){const t=function wi(){const i=Se();return i&&i[ai]}();return t?t.sanitize(Zn.URL,i)||"":Ma(i,"URL")?Js(i):bh(Jt(i))}const Np=new me("ENVIRONMENT_INITIALIZER"),il=new me("INJECTOR",-1),Qx=new me("INJECTOR_DEF_TYPES");class Jx{get(t,e=kl){if(e===kl){const n=new Error(`NullInjectorError: No provider for ${mi(t)}!`);throw n.name="NullInjectorError",n}return e}}function A1(...i){return{\u0275providers:ew(0,i),\u0275fromNgModule:!0}}function ew(i,...t){const e=[],n=new Set;let r;return Vl(t,s=>{const o=s;Ev(o,e,[],n)&&(r||(r=[]),r.push(o))}),void 0!==r&&Bp(r,e),e}function Bp(i,t){for(let e=0;e{t.push(s)})}}function Ev(i,t,e,n){if(!(i=Ot(i)))return!1;let r=null,s=h_(i);const o=!s&&Hn(i);if(s||o){if(o&&!o.standalone)return!1;r=i}else{const l=i.ngModule;if(s=h_(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)Ev(c,t,e,n)}}else{if(!s)return!1;{if(null!=s.imports&&!a){let c;n.add(r);try{Vl(s.imports,d=>{Ev(d,t,e,n)&&(c||(c=[]),c.push(d))})}finally{}void 0!==c&&Bp(c,t)}if(!a){const c=Za(r)||(()=>new r);t.push({provide:r,useFactory:c,deps:Wn},{provide:Qx,useValue:r,multi:!0},{provide:Np,useValue:()=>ee(r),multi:!0})}const l=s.providers;null==l||a||Up(l,d=>{t.push(d)})}}return r!==i&&void 0!==i.providers}function Up(i,t){for(let e of i)Wu(e)&&(e=e.\u0275providers),Array.isArray(e)?Up(e,t):t(e)}const Vp=ci({provide:String,useValue:ci});function Mi(i){return null!==i&&"object"==typeof i&&Vp in i}function Nc(i){return"function"==typeof i}const Dv=new me("Set Injector scope."),zp={},T1={};let Tv;function xh(){return void 0===Tv&&(Tv=new Jx),Tv}class to{}class Hp extends to{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,Rv(t,o=>this.processProvider(o)),this.records.set(il,Wo(void 0,this)),r.has("environment")&&this.records.set(to,Wo(void 0,this));const s=this.records.get(Dv);null!=s&&"string"==typeof s.value&&this.scopes.add(s.value),this.injectorDefTypes=new Set(this.get(Qx.multi,Wn,Ft.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=Md(this),n=Ys(void 0);try{return t()}finally{Md(e),Ys(n)}}get(t,e=kl,n=Ft.Default){this.assertNotDestroyed(),n=jf(n);const r=Md(this),s=Ys(void 0);try{if(!(n&Ft.SkipSelf)){let a=this.records.get(t);if(void 0===a){const l=function k1(i){return"function"==typeof i||"object"==typeof i&&i instanceof me}(t)&&$f(t);a=l&&this.injectableDefInScope(l)?Wo(Iv(t),zp):null,this.records.set(t,a)}if(null!=a)return this.hydrate(t,a)}return(n&Ft.Self?xh():this.parent).get(t,e=n&Ft.Optional&&e===kl?null:e)}catch(o){if("NullInjectorError"===o.name){if((o[gi]=o[gi]||[]).unshift(mi(t)),r)throw o;return function g_(i,t,e,n){const r=i[gi];throw t[Wf]&&r.unshift(t[Wf]),i.message=function T0(i,t,e,n=null){i=i&&"\n"===i.charAt(0)&&i.charAt(1)==JE?i.slice(2):i;let r=mi(t);if(Array.isArray(t))r=t.map(mi).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):mi(a)))}r=`{${s.join(", ")}}`}return`${e}${n?"("+n+")":""}[${r}]: ${i.replace(p_,"\n ")}`}("\n"+i.message,r,e,n),i[Pl]=r,i[gi]=null,i}(o,t,"R3InjectorError",this.source)}throw o}finally{Ys(s),Md(r)}}resolveInjectorInitializers(){const t=Md(this),e=Ys(void 0);try{const n=this.get(Np.multi,Wn,Ft.Self);for(const r of n)r()}finally{Md(t),Ys(e)}}toString(){const t=[],e=this.records;for(const n of e.keys())t.push(mi(n));return`R3Injector[${t.join(", ")}]`}assertNotDestroyed(){if(this._destroyed)throw new pe(205,!1)}processProvider(t){let e=Nc(t=Ot(t))?t:Ot(t&&t.provide);const n=function $p(i){return Mi(i)?Wo(void 0,i.useValue):Wo(As(i),zp)}(t);if(Nc(t)||!0!==t.multi)this.records.get(e);else{let r=this.records.get(e);r||(r=Wo(void 0,zp,!0),r.factory=()=>Yf(r.multi),this.records.set(e,r)),e=t,r.multi.push(t)}this.records.set(e,n)}hydrate(t,e){return e.value===zp&&(e.value=T1,e.value=e.factory()),"object"==typeof e.value&&e.value&&function R1(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=Ot(t.providedIn);return"string"==typeof e?"any"===e||this.scopes.has(e):this.injectorDefTypes.has(e)}}function Iv(i){const t=$f(i),e=null!==t?t.factory:Za(i);if(null!==e)return e;if(i instanceof me)throw new pe(204,!1);if(i instanceof Function)return function tw(i){const t=i.length;if(t>0)throw Gd(t,"?"),new pe(204,!1);const e=function qu(i){return i&&(i[wd]||i[f_])||null}(i);return null!==e?()=>e.factory(i):()=>new i}(i);throw new pe(204,!1)}function As(i,t,e){let n;if(Nc(i)){const r=Ot(i);return Za(r)||Iv(r)}if(Mi(i))n=()=>Ot(i.useValue);else if(function Av(i){return!(!i||!i.useFactory)}(i))n=()=>i.useFactory(...Yf(i.deps||[]));else if(function Pi(i){return!(!i||!i.useExisting)}(i))n=()=>ee(Ot(i.useExisting));else{const r=Ot(i&&(i.useClass||i.provide));if(!function I1(i){return!!i.deps}(i))return Za(r)||Iv(r);n=()=>new r(...Yf(i.deps))}return n}function Wo(i,t,e=!1){return{factory:i,value:t,multi:e?[]:void 0}}function Rv(i,t){for(const e of i)Array.isArray(e)?Rv(e,t):e&&Wu(e)?Rv(e.\u0275providers,t):t(e)}class P1{}class kv{}class wo{resolveComponentFactory(t){throw function rl(i){const t=Error(`No component factory found for ${mi(i)}. Did you add it to @NgModule.entryComponents?`);return t.ngComponent=i,t}(t)}}let $l=(()=>{class i{}return i.NULL=new wo,i})();function F1(){return Fn(Ar(),Se())}function Fn(i,t){return new vt(Ai(i,t))}let vt=(()=>{class i{constructor(e){this.nativeElement=e}}return i.__NG_ELEMENT_ID__=F1,i})();function nw(i){return i instanceof vt?i.nativeElement:i}class Gl{}let sl=(()=>{class i{}return i.__NG_ELEMENT_ID__=()=>function L1(){const i=Se(),e=ws(Ar().index,i);return(bs(e)?e:i)[xt]}(),i})(),N1=(()=>{class i{}return i.\u0275prov=ke({token:i,providedIn:"root",factory:()=>null}),i})();class Bc{constructor(t){this.full=t,this.major=t.split(".")[0],this.minor=t.split(".")[1],this.patch=t.split(".").slice(2).join(".")}}const B1=new Bc("15.2.10"),Pv={},Ov="ngOriginalError";function Fv(i){return i[Ov]}class ol{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&&Fv(t);for(;e&&Fv(e);)e=Fv(e);return e||null}}function al(i){return i instanceof Function?i():i}function rw(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 sw="ng-template";function j1(i,t,e){let n=0,r=!0;for(;ns?"":r[h+1].toLowerCase();const m=8&n?p:null;if(m&&-1!==rw(m,c,0)||2&n&&c!==p){if(jo(n))return!1;o=!0}}}}else{if(!o&&!jo(n)&&!jo(l))return!1;if(o&&jo(l))continue;o=!1,n=l|1&n}}return jo(n)||o}function jo(i){return 0==(1&i)}function ow(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&&!jo(o)&&(t+=Uc(s,r),r=""),n=o,s=s||!jo(n);e++}return""!==r&&(t+=Uc(s,r)),t}const on={};function V(i){Vv(zn(),Se(),Kn()+i,!1)}function Vv(i,t,e,n){if(!n)if(3==(3&t[fn])){const s=i.preOrderCheckHooks;null!==s&&sp(t,s,e)}else{const s=i.preOrderHooks;null!==s&&op(t,s,0,e)}el(e)}function cw(i,t=null,e=null,n){const r=dw(i,t,e,n);return r.resolveInjectorInitializers(),r}function dw(i,t=null,e=null,n,r=new Set){const s=[e||Wn,A1(i)];return n=n||("object"==typeof i?void 0:mi(i)),new Hp(s,t||xh(),n||null,r)}let Gi=(()=>{class i{static create(e,n){if(Array.isArray(e))return cw({name:""},n,e,"");{const r=e.name??"";return cw({name:r},e.parent,e.providers,r)}}}return i.THROW_IF_NOT_FOUND=kl,i.NULL=new Jx,i.\u0275prov=ke({token:i,providedIn:"any",factory:()=>ee(il)}),i.__NG_ELEMENT_ID__=-1,i})();function E(i,t=Ft.Default){const e=Se();return null===e?ee(i,t):B_(Ar(),e,Ot(i),t)}function Mo(){throw new Error("invalid")}function gw(i,t){const e=i.contentQueries;if(null!==e)for(let n=0;nbi&&Vv(i,t,bi,!1),Qr(o?2:0,r),e(n,r)}finally{el(s),Qr(o?3:1,r)}}function Xv(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,Mh(i,e,r.hostVars,on),r)}function be(i,t,e,n,r,s){const o=Ai(i,t);!function Xe(i,t,e,n,r,s,o){if(null==s)i.removeAttribute(t,r,e);else{const a=null==o?Jt(s):o(s,n||"",r);i.setAttribute(t,r,a,e)}}(t[xt],o,s,i.value,e,n,r)}function bt(i,t,e,n,r,s){const o=s[t];if(null!==o){const a=n.setInput;for(let l=0;l0&&rs(e)}}function rs(i){for(let n=sv(i);null!==n;n=ov(n))for(let r=Ui;r0&&rs(s)}const e=i[lt].components;if(null!==e)for(let n=0;n0&&rs(r)}}function ss(i,t){const e=ws(t,i),n=e[lt];(function io(i,t){for(let e=t.length;e-1&&(cv(t,n),pp(e,n))}this._attachedToViewContainer=!1}Ix(this._lView[lt],this._lView)}onDestroy(t){yw(this._lView[lt],this._lView,null,t)}markForCheck(){Ts(this._cdRefInjectingView||this._lView)}detach(){this._lView[fn]&=-65}reattach(){this._lView[fn]|=64}detectChanges(){Co(this._lView[lt],this._lView,this.context)}checkNoChanges(){}attachToViewContainerRef(){if(this._appRef)throw new pe(902,!1);this._attachedToViewContainer=!0}detachFromAppRef(){this._appRef=null,function jA(i,t){yh(i,t,t[xt],2,null,null)}(this._lView[lt],this._lView)}attachToAppRef(t){if(this._attachedToViewContainer)throw new pe(902,!1);this._appRef=t}}class v8 extends ey{constructor(t){super(t),this._view=t}detectChanges(){const t=this._view;Co(t[lt],t,t[ze],!1)}checkNoChanges(){}get context(){return null}}class XF extends $l{constructor(t){super(),this.ngModule=t}resolveComponentFactory(t){const e=Hn(t);return new ty(e,this.ngModule)}}function KF(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=jf(n);const r=this.injector.get(t,Pv,n);return r!==Pv||e===Pv?r:this.parentInjector.get(t,e,n)}}class ty extends kv{get inputs(){return KF(this.componentDef.inputs)}get outputs(){return KF(this.componentDef.outputs)}constructor(t,e){super(),this.componentDef=t,this.ngModule=e,this.componentType=t.type,this.selector=function eD(i){return i.map(J1).join(",")}(t.selectors),this.ngContentSelectors=t.ngContentSelectors?t.ngContentSelectors:[],this.isBoundToModule=!!e}create(t,e,n,r){let s=(r=r||this.ngModule)instanceof to?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(Gl,null);if(null===a)throw new pe(407,!1);const l=o.get(N1,null),c=a.createRenderer(null,this.componentDef),d=this.componentDef.selectors[0][0]||"div",h=n?function wD(i,t,e){return i.selectRootElement(t,e===qs.ShadowDom)}(c,n,this.componentDef.encapsulation):Ep(c,d,function y8(i){const t=i.toLowerCase();return"svg"===t?Pd:"math"===t?"math":null}(d)),p=this.componentDef.onPush?288:272,m=Qv(0,null,null,1,0,null,null,null,null,null),g=wh(null,m,null,p,null,null,a,c,l,o,null);let b,v;rp(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 w8(i,t){const e=i[lt],n=bi;return i[n]=t,Qd(e,n,2,"#host",null)}(g,h),F=function M8(i,t,e,n,r,s,o,a){const l=r[lt];!function C8(i,t,e,n){for(const r of i)t.mergedAttrs=Ec(t.mergedAttrs,r.hostAttrs);null!==t.mergedAttrs&&(Mw(t,t.mergedAttrs,!0),null!==e&&Hx(n,e,t))}(n,i,t,o);const c=s.createRenderer(t,e),d=wh(r,vw(e),null,e.onPush?32:16,r[i.index],i,s,c,a||null,null,null);return l.firstCreatePass&&P(l,i,n.length-1),Ti(r,d),r[i.index]=d}(C,h,y,M,g,a,c);v=N0(m,bi),h&&function E8(i,t,e,n){if(n)O_(i,e,["ng-version",B1.full]);else{const{attrs:r,classes:s}=function tD(i){const t=[],e=[];let n=1,r=2;for(;n0&&zx(i,e,s.join(" "))}}(c,y,h,n),void 0!==e&&function A8(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=Ec(r.hostAttrs,e=Ec(e,r.hostAttrs))}}(n)}function kD(i){return i===qa?{}:i===Wn?[]:i}function I8(i,t){const e=i.viewQuery;i.viewQuery=e?(n,r)=>{t(n,r),e(n,r)}:t}function R8(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 Sw(i){return!!PD(i)&&(Array.isArray(i)||!(i instanceof Map)&&Symbol.iterator in i)}function PD(i){return null!==i&&("function"==typeof i||"object"==typeof i)}function Wl(i,t,e){return i[t]=e}function Is(i,t,e){return!Object.is(i[t],e)&&(i[t]=e,!0)}function Sh(i,t,e,n){const r=Is(i,t,e);return Is(i,t+1,n)||r}function It(i,t,e,n){const r=Se();return Is(r,Ll(),t)&&(zn(),be(Di(),r,i,t,e,n)),It}function jp(i,t,e,n){return Is(i,Ll(),e)?t+Jt(e)+n:on}function Yp(i,t,e,n,r,s){const a=Sh(i,function Qa(){return Pt.lFrame.bindingIndex}(),e,r);return Ks(2),a?t+Jt(e)+n+Jt(r)+s:on}function fe(i,t,e,n,r,s,o,a){const l=Se(),c=zn(),d=i+bi,h=c.firstCreatePass?function H8(i,t,e,n,r,s,o,a,l){const c=t.consts,d=Qd(t,i,4,o||null,Fl(c,a));Jv(t,e,d,Fl(c,l)),Bd(t,d);const h=d.tView=Qv(2,d,n,r,s,t.directiveRegistry,t.pipeRegistry,null,t.schemas,c);return null!==t.queries&&(t.queries.template(t,d),h.queries=t.queries.embeddedTView(d)),d}(d,c,l,t,e,n,r,s,o):c.data[d];ma(h,!1);const p=l[xt].createComment("");vh(c,l,p,h),$r(p,l),Ti(l,l[d]=mn(p,l,p,h)),xc(h)&&Kv(c,l,h),null!=o&&Zv(l,h,a)}function Xi(i){return Fd(function mA(){return Pt.lFrame.contextLView}(),bi+i)}function U(i,t,e){const n=Se();return Is(n,Ll(),t)&&no(zn(),Di(),n,i,t,n[xt],e,!1),U}function OD(i,t,e,n,r){const o=r?"class":"style";RD(i,e,t.inputs[o],o,n)}function G(i,t,e,n){const r=Se(),s=zn(),o=bi+i,a=r[xt],l=s.firstCreatePass?function G8(i,t,e,n,r,s){const o=t.consts,l=Qd(t,i,2,n,Fl(o,r));return Jv(t,e,l,Fl(o,s)),null!==l.attrs&&Mw(l,l.attrs,!1),null!==l.mergedAttrs&&Mw(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]=Ep(a,t,function j0(){return Pt.lFrame.currentNamespace}()),d=xc(l);return ma(l,!0),Hx(a,c,l),32!=(32&l.flags)&&vh(s,r,c,l),0===function dA(){return Pt.lFrame.elementDepthCount}()&&$r(c,r),function uA(){Pt.lFrame.elementDepthCount++}(),d&&(Kv(s,r,l),Xv(s,l,r)),null!==n&&Zv(r,l),G}function j(){let i=Ar();E_()?A_():(i=i.parent,ma(i,!1));const t=i;!function hA(){Pt.lFrame.elementDepthCount--}();const e=zn();return e.firstCreatePass&&(Bd(e,i),Qf(i)&&e.queries.elementEnd(i)),null!=t.classesWithoutHost&&function xA(i){return 0!=(8&i.flags)}(t)&&OD(e,t,Se(),t.classesWithoutHost,!0),null!=t.stylesWithoutHost&&function P_(i){return 0!=(16&i.flags)}(t)&&OD(e,t,Se(),t.stylesWithoutHost,!1),j}function Ie(i,t,e,n){return G(i,t,e,n),j(),Ie}function Gr(i,t,e){const n=Se(),r=zn(),s=i+bi,o=r.firstCreatePass?function W8(i,t,e,n,r){const s=t.consts,o=Fl(s,n),a=Qd(t,i,8,"ng-container",o);return null!==o&&Mw(a,o,!0),Jv(t,e,a,Fl(s,r)),null!==t.queries&&t.queries.elementStart(t,a),a}(s,r,n,t,e):r.data[s];ma(o,!0);const a=n[s]=n[xt].createComment("");return vh(r,n,a,o),$r(a,n),xc(o)&&(Kv(r,n,o),Xv(r,o,n)),null!=e&&Zv(n,o),Gr}function Wr(){let i=Ar();const t=zn();return E_()?A_():(i=i.parent,ma(i,!1)),t.firstCreatePass&&(Bd(t,i),Qf(i)&&t.queries.elementEnd(i)),Wr}function iy(i,t,e){return Gr(i,t,e),Wr(),iy}function jn(){return Se()}function ry(i){return!!i&&"function"==typeof i.then}function dL(i){return!!i&&"function"==typeof i.subscribe}const FD=dL;function Pe(i,t,e,n){const r=Se(),s=zn(),o=Ar();return uL(s,r,r[xt],o,i,t,n),Pe}function LD(i,t){const e=Ar(),n=Se(),r=zn();return uL(r,n,YF(ih(r.data),e,n),e,i,t),LD}function uL(i,t,e,n,r,s,o){const a=xc(n),c=i.firstCreatePass&&jF(i),d=t[ze],h=WF(t);let p=!0;if(3&n.type||o){const b=Ai(n,t),v=o?o(b):b,y=h.length,M=o?C=>o(I(C[n.index])):n.index;let x=null;if(!o&&a&&(x=function j8(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=fL(n,t,d,s,!1);const C=e.listen(v,r,s);h.push(s,C),c&&c.push(r,M,y,y+1)}}else s=fL(n,t,d,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?ws(i.index,t):t);let l=hL(t,e,n,o),c=s.__ngNextListenerFn__;for(;c;)l=hL(t,e,c,o)&&l,c=c.__ngNextListenerFn__;return r&&!1===l&&(o.preventDefault(),o.returnValue=!1),l}}function re(i=1){return function vA(i){return(Pt.lFrame.contextLView=function W0(i,t){for(;i>0;)t=t[Er],i--;return t}(i,Pt.lFrame.contextLView))[ze]}(i)}function Y8(i,t){let e=null;const n=function X1(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 UD(i){return 2|i}function Eh(i){return(131068&i)>>2}function VD(i,t){return-131069&i|t<<2}function zD(i){return 1|i}function wL(i,t,e,n,r){const s=i[e+1],o=null===t;let a=n?eu(s):Eh(s),l=!1;for(;0!==a&&(!1===l||o);){const d=i[a+1];J8(i[a],t)&&(l=!0,i[a+1]=n?zD(d):UD(d)),a=n?eu(d):Eh(d)}l&&(i[e+1]=n?UD(s):zD(s))}function J8(i,t){return null===i||null==t||(Array.isArray(i)?i[1]:i)===t||!(!Array.isArray(i)||"string"!=typeof t)&&Rc(i,t)>=0}const Rr={textEnd:0,key:0,keyEnd:0,value:0,valueEnd:0};function ML(i){return i.substring(Rr.key,Rr.keyEnd)}function CL(i,t){const e=Rr.textEnd;return e===t?-1:(t=Rr.keyEnd=function iW(i,t,e){for(;t32;)t++;return t}(i,Rr.key=t,e),em(i,t,e))}function em(i,t,e){for(;t=0;e=CL(t,e))Cs(i,ML(t),!0)}function ll(i,t,e,n){const r=Se(),s=zn(),o=Ks(2);s.firstUpdatePass&&IL(s,i,o,n),t!==on&&Is(r,o,t)&&kL(s,s.data[Kn()],r,r[xt],i,r[o+1]=function mW(i,t){return null==i||""===i||("string"==typeof t?i+=t:"object"==typeof i&&(i=mi(Js(i)))),i}(t,e),n,o)}function TL(i,t){return t>=i.expandoStartIndex}function IL(i,t,e,n){const r=i.data;if(null===r[e+1]){const s=r[Kn()],o=TL(i,e);OL(s,n)&&null===t&&!o&&(t=!1),t=function lW(i,t,e,n){const r=ih(i);let s=n?t.residualClasses:t.residualStyles;if(null===r)0===(n?t.classBindings:t.styleBindings)&&(e=sy(e=HD(null,i,t,e,n),t.attrs,n),s=null);else{const o=t.directiveStylingLast;if(-1===o||i[o]!==r)if(e=HD(r,i,t,e,n),null===s){let l=function cW(i,t,e){const n=e?t.classBindings:t.styleBindings;if(0!==Eh(n))return i[eu(n)]}(i,t,n);void 0!==l&&Array.isArray(l)&&(l=HD(null,i,t,l[1],n),l=sy(l,t.attrs,n),function dW(i,t,e,n){i[eu(e?t.classBindings:t.styleBindings)]=n}(i,t,n,l))}else s=function uW(i,t,e){let n;const r=t.directiveEnd;for(let s=1+t.directiveStylingLast;s0)&&(c=!0)):d=e,r)if(0!==l){const p=eu(i[a+1]);i[n+1]=Aw(p,a),0!==p&&(i[p+1]=VD(i[p+1],n)),i[a+1]=function X8(i,t){return 131071&i|t<<17}(i[a+1],n)}else i[n+1]=Aw(a,0),0!==a&&(i[a+1]=VD(i[a+1],n)),a=n;else i[n+1]=Aw(l,0),0===a?a=n:i[l+1]=VD(i[l+1],n),l=n;c&&(i[n+1]=UD(i[n+1])),wL(i,d,n,!0),wL(i,d,n,!1),function Q8(i,t,e,n,r){const s=r?i.residualClasses:i.residualStyles;null!=s&&"string"==typeof t&&Rc(s,t)>=0&&(e[n+1]=zD(e[n+1]))}(t,d,i,n,s),o=Aw(a,l),s?t.classBindings=o:t.styleBindings=o}(r,s,t,e,o,n)}}function HD(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),d=c?l[1]:l,h=null===d;let p=e[r+1];p===on&&(p=h?Wn:void 0);let m=h?jd(p,n):d===n?p:void 0;if(c&&!Dw(m)&&(m=jd(l,n)),Dw(m)&&(a=m,o))return a;const g=i[r+1];r=o?eu(g):Eh(g)}if(null!==t){let l=s?t.residualClasses:t.residualStyles;null!=l&&(a=jd(l,n))}return a}function Dw(i){return void 0!==i}function OL(i,t){return 0!=(i.flags&(t?8:16))}function Be(i,t=""){const e=Se(),n=zn(),r=i+bi,s=n.firstCreatePass?Qd(n,r,1,t,null):n.data[r],o=e[r]=function av(i,t){return i.createText(t)}(e[xt],t);vh(n,e,o,s),ma(s,!1)}function ui(i){return Ki("",i,""),ui}function Ki(i,t,e){const n=Se(),r=jp(n,i,t,e);return r!==on&&Vc(n,Kn(),r),Ki}function Ah(i,t,e,n,r){const s=Se(),o=Yp(s,i,t,e,n,r);return o!==on&&Vc(s,Kn(),o),Ah}function HL(i,t,e){!function cl(i,t,e,n){const r=zn(),s=Ks(2);r.firstUpdatePass&&IL(r,null,s,n);const o=Se();if(e!==on&&Is(o,s,e)){const a=r.data[Kn()];if(OL(a,n)&&!TL(r,s)){let l=n?a.classesWithoutHost:a.stylesWithoutHost;null!==l&&(e=Vf(l,e||"")),OD(r,a,o,e,n)}else!function pW(i,t,e,n,r,s,o,a){r===on&&(r=Wn);let l=0,c=0,d=0((rt=rt||{})[rt.LocaleId=0]="LocaleId",rt[rt.DayPeriodsFormat=1]="DayPeriodsFormat",rt[rt.DayPeriodsStandalone=2]="DayPeriodsStandalone",rt[rt.DaysFormat=3]="DaysFormat",rt[rt.DaysStandalone=4]="DaysStandalone",rt[rt.MonthsFormat=5]="MonthsFormat",rt[rt.MonthsStandalone=6]="MonthsStandalone",rt[rt.Eras=7]="Eras",rt[rt.FirstDayOfWeek=8]="FirstDayOfWeek",rt[rt.WeekendRange=9]="WeekendRange",rt[rt.DateFormat=10]="DateFormat",rt[rt.TimeFormat=11]="TimeFormat",rt[rt.DateTimeFormat=12]="DateTimeFormat",rt[rt.NumberSymbols=13]="NumberSymbols",rt[rt.NumberFormats=14]="NumberFormats",rt[rt.CurrencyCode=15]="CurrencyCode",rt[rt.CurrencySymbol=16]="CurrencySymbol",rt[rt.CurrencyName=17]="CurrencyName",rt[rt.Currencies=18]="Currencies",rt[rt.Directionality=19]="Directionality",rt[rt.PluralCase=20]="PluralCase",rt[rt.ExtraData=21]="ExtraData",rt))();const nm="en-US";let e2=nm;function WD(i,t,e,n,r){if(i=Ot(i),Array.isArray(i))for(let s=0;s>20;if(Nc(i)||!i.multi){const m=new Ud(l,r,E),g=YD(a,t,r?d:d+p,h);-1===g?(pn(oh(c,o),s,a),jD(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=YD(a,t,d+p,h),g=YD(a,t,d,d+p),v=g>=0&&e[g];if(r&&!v||!r&&!(m>=0&&e[m])){pn(oh(c,o),s,a);const y=function kj(i,t,e,n,r){const s=new Ud(i,e,E);return s.multi=[],s.index=t,s.componentProviders=0,E2(s,r,n&&!e),s}(r?Rj:Ij,e.length,r,n,l);!r&&v&&(e[g].providerFactory=y),jD(s,i,t.length,0),t.push(a),c.directiveStart++,c.directiveEnd++,r&&(c.providerIndexes+=1048576),e.push(y),o.push(y)}else jD(s,i,m>-1?m:g,E2(e[r?g:m],l,!r&&n));!r&&n&&v&&e[g].componentProviders++}}}function jD(i,t,e,n){const r=Nc(t),s=function D1(i){return!!i.useClass}(t);if(r||s){const l=(s?Ot(t.useClass):t).prototype.ngOnDestroy;if(l){const c=i.destroyHooks||(i.destroyHooks=[]);if(!r&&t.multi){const d=c.indexOf(e);-1===d?c.push(e,[n,l]):c[d+1].push(n,l)}else c.push(e,l)}}}function E2(i,t,e){return e&&i.componentProviders++,i.multi.push(t)-1}function YD(i,t,e,n){for(let r=e;r{e.providersResolver=(n,r)=>function Tj(i,t,e){const n=zn();if(n.firstCreatePass){const r=yo(i);WD(e,n.data,n.blueprint,r,!0),WD(t,n.data,n.blueprint,r,!1)}}(n,r?r(i):i,t)}}class im{}class A2{}class D2 extends im{constructor(t,e){super(),this._parent=e,this._bootstrapComponents=[],this.destroyCbs=[],this.componentFactoryResolver=new XF(this);const n=hr(t);this._bootstrapComponents=al(n.bootstrap),this._r3Injector=dw(t,e,[{provide:im,useValue:this},{provide:$l,useValue:this.componentFactoryResolver}],mi(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 XD extends A2{constructor(t){super(),this.moduleType=t}create(t){return new D2(this.moduleType,t)}}class Oj extends im{constructor(t,e,n){super(),this.componentFactoryResolver=new XF(this),this.instance=null;const r=new Hp([...t,{provide:im,useValue:this},{provide:$l,useValue:this.componentFactoryResolver}],e||xh(),n,new Set(["environment"]));this.injector=r,r.resolveInjectorInitializers()}destroy(){this.injector.destroy()}onDestroy(t){this.injector.onDestroy(t)}}function Ow(i,t,e=null){return new Oj(i,t,e).injector}let Fj=(()=>{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=ew(0,e.type),r=n.length>0?Ow([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=ke({token:i,providedIn:"environment",factory:()=>new i(ee(to))}),i})();function KD(i){i.getStandaloneInjector=t=>t.get(Fj).getOrCreateStandaloneInjector(i)}function Rs(i,t,e){const n=zr()+i,r=Se();return r[n]===on?Wl(r,n,e?t.call(e):t()):function ny(i,t){return i[t]}(r,n)}function rm(i,t,e,n){return L2(Se(),zr(),i,t,e,n)}function F2(i,t,e,n,r,s,o){return function U2(i,t,e,n,r,s,o,a,l){const c=t+e;return function Sa(i,t,e,n,r,s){const o=Sh(i,t,e,n);return Sh(i,t+2,r,s)||o}(i,c,r,s,o,a)?Wl(i,c+4,l?n.call(l,r,s,o,a):n(r,s,o,a)):uy(i,c+4)}(Se(),zr(),i,t,e,n,r,s,o)}function uy(i,t){const e=i[t];return e===on?void 0:e}function L2(i,t,e,n,r,s){const o=t+e;return Is(i,o,r)?Wl(i,o+1,s?n.call(s,r):n(r)):uy(i,o+1)}function ct(i,t){const e=zn();let n;const r=i+bi;e.firstCreatePass?(n=function Zj(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=Za(n.type)),o=Ys(E);try{const a=cp(!1),l=s();return cp(a),function $8(i,t,e,n){e>=i.data.length&&(i.data[e]=null,i.blueprint[e]=null),t[e]=n}(e,Se(),r,l),l}finally{Ys(o)}}function ut(i,t,e){const n=i+bi,r=Se(),s=Fd(r,n);return hy(r,n)?L2(r,zr(),t,s.transform,e,s):s.transform(e)}function QD(i,t,e,n){const r=i+bi,s=Se(),o=Fd(s,r);return hy(s,r)?function N2(i,t,e,n,r,s,o){const a=t+e;return Sh(i,a,r,s)?Wl(i,a+2,o?n.call(o,r,s):n(r,s)):uy(i,a+2)}(s,zr(),t,o.transform,e,n,o):o.transform(e,n)}function hy(i,t){return i[lt].data[t].pure}function JD(i){return t=>{setTimeout(i,void 0,t)}}const $e=class t6 extends Te{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=JD(s),r&&(r=JD(r)),o&&(o=JD(o)));const a=super.subscribe({next:r,error:s,complete:o});return t instanceof Qt&&t.add(a),a}};function n6(){return this._results[Symbol.iterator]()}class sm{get changes(){return this._changes||(this._changes=new $e)}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=sm.prototype;e[Symbol.iterator]||(e[Symbol.iterator]=n6)}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 Dr(i){return i.flat(Number.POSITIVE_INFINITY)}(t);(this._changesDetected=!function fp(i,t,e){if(i.length!==t.length)return!1;for(let n=0;n{class i{}return i.__NG_ELEMENT_ID__=o6,i})();const r6=So,s6=class extends r6{constructor(t,e,n){super(),this._declarationLView=t,this._declarationTContainer=e,this.elementRef=n}createEmbeddedView(t,e){const n=this._declarationTContainer.tView,r=wh(this._declarationLView,n,t,16,null,n.declTNode,null,null,null,null,e||null);r[th]=this._declarationLView[this._declarationTContainer.index];const o=this._declarationLView[Xs];return null!==o&&(r[Xs]=o.createEmbeddedView(n)),Ch(n,r,t),new ey(r)}};function o6(){return Fw(Ar(),Se())}function Fw(i,t){return 4&i.type?new s6(t,i,Fn(i,t)):null}let jr=(()=>{class i{}return i.__NG_ELEMENT_ID__=a6,i})();function a6(){return $2(Ar(),Se())}const l6=jr,z2=class extends l6{constructor(t,e,n){super(),this._lContainer=t,this._hostTNode=e,this._hostLView=n}get element(){return Fn(this._hostTNode,this._hostLView)}get injector(){return new Dc(this._hostTNode,this._hostLView)}get parentInjector(){const t=lh(this._hostTNode,this._hostLView);if(lp(t)){const e=sh(t,this._hostLView),n=rh(t);return new Dc(e[lt].data[n+8],e)}return new Dc(null,this._hostLView)}clear(){for(;this.length>0;)this.remove(this.length-1)}get(t){const e=H2(this._lContainer);return null!==e&&e[t]||null}get length(){return this._lContainer.length-Ui}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 uh(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 ty(Hn(t)),c=n||this.parentInjector;if(!s&&null==l.ngModule){const p=(o?c:this.parentInjector).get(to,null);p&&(s=p)}const d=l.create(c,r,void 0,s);return this.insert(d.hostView,a),d}insert(t,e){const n=t._lView,r=n[lt];if(function cA(i){return xs(i[Bi])}(n)){const d=this.indexOf(t);if(-1!==d)this.detach(d);else{const h=n[Bi],p=new z2(h,h[he],h[Bi]);p.detach(p.indexOf(t))}}const s=this._adjustIndex(e),o=this._lContainer;!function lv(i,t,e,n){const r=Ui+n,s=e.length;n>0&&(e[r-1][ys]=t),n0)n.push(o[a/2]);else{const c=s[a+1],d=t[-l];for(let h=Ui;h{class i{constructor(e){this.appInits=e,this.resolve=Nw,this.reject=Nw,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)(ee(Bw,8))},i.\u0275prov=ke({token:i,factory:i.\u0275fac,providedIn:"root"}),i})();const lm=new me("AppId",{providedIn:"root",factory:function hN(){return`${uT()}${uT()}${uT()}`}});function uT(){return String.fromCharCode(97+Math.floor(25*Math.random()))}const fN=new me("Platform Initializer"),hT=new me("Platform ID",{providedIn:"platform",factory:()=>"unknown"}),kr=new me("AnimationModuleType");let O6=(()=>{class i{log(e){console.log(e)}warn(e){console.warn(e)}}return i.\u0275fac=function(e){return new(e||i)},i.\u0275prov=ke({token:i,factory:i.\u0275fac,providedIn:"platform"}),i})();const Xl=new me("LocaleId",{providedIn:"root",factory:()=>Lt(Xl,Ft.Optional|Ft.SkipSelf)||function F6(){return typeof $localize<"u"&&$localize.locale||nm}()});class N6{constructor(t,e){this.ngModuleFactory=t,this.componentFactories=e}}let pN=(()=>{class i{compileModuleSync(e){return new XD(e)}compileModuleAsync(e){return Promise.resolve(this.compileModuleSync(e))}compileModuleAndAllComponentsSync(e){const n=this.compileModuleSync(e),s=al(hr(e).declarations).reduce((o,a)=>{const l=Hn(a);return l&&o.push(new ty(l)),o},[]);return new N6(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=ke({token:i,factory:i.\u0275fac,providedIn:"root"}),i})();const V6=(()=>Promise.resolve(0))();function fT(i){typeof Zone>"u"?V6.then(()=>{i&&i.apply(null,null)}):Zone.current.scheduleMicroTask("scheduleMicrotask",i)}class gt{constructor({enableLongStackTrace:t=!1,shouldCoalesceEventChangeDetection:e=!1,shouldCoalesceRunChangeDetection:n=!1}){if(this.hasPendingMacrotasks=!1,this.hasPendingMicrotasks=!1,this.isStable=!0,this.onUnstable=new $e(!1),this.onMicrotaskEmpty=new $e(!1),this.onStable=new $e(!1),this.onError=new $e(!1),typeof Zone>"u")throw new pe(908,!1);Zone.assertZonePatched();const r=this;r._nesting=0,r._outer=r._inner=Zone.current,Zone.TaskTrackingZoneSpec&&(r._inner=r._inner.fork(new Zone.TaskTrackingZoneSpec)),t&&Zone.longStackTraceZoneSpec&&(r._inner=r._inner.fork(Zone.longStackTraceZoneSpec)),r.shouldCoalesceEventChangeDetection=!n&&e,r.shouldCoalesceRunChangeDetection=n,r.lastRequestAnimationFrameId=-1,r.nativeRequestAnimationFrame=function z6(){let i=In.requestAnimationFrame,t=In.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 G6(i){const t=()=>{!function $6(i){i.isCheckStableRunning||-1!==i.lastRequestAnimationFrameId||(i.lastRequestAnimationFrameId=i.nativeRequestAnimationFrame.call(In,()=>{i.fakeTopEventTask||(i.fakeTopEventTask=Zone.root.scheduleEventTask("fakeTopEventTask",()=>{i.lastRequestAnimationFrameId=-1,mT(i),i.isCheckStableRunning=!0,pT(i),i.isCheckStableRunning=!1},void 0,()=>{},()=>{})),i.fakeTopEventTask.invoke()}),mT(i))}(i)};i._inner=i._inner.fork({name:"angular",properties:{isAngularZone:!0},onInvokeTask:(e,n,r,s,o,a)=>{try{return _N(i),e.invokeTask(r,s,o,a)}finally{(i.shouldCoalesceEventChangeDetection&&"eventTask"===s.type||i.shouldCoalesceRunChangeDetection)&&t(),vN(i)}},onInvoke:(e,n,r,s,o,a,l)=>{try{return _N(i),e.invoke(r,s,o,a,l)}finally{i.shouldCoalesceRunChangeDetection&&t(),vN(i)}},onHasTask:(e,n,r,s)=>{e.hasTask(r,s),n===r&&("microTask"==s.change?(i._hasPendingMicrotasks=s.microTask,mT(i),pT(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(!gt.isInAngularZone())throw new pe(909,!1)}static assertNotInAngularZone(){if(gt.isInAngularZone())throw new pe(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,H6,Nw,Nw);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 H6={};function pT(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 mT(i){i.hasPendingMicrotasks=!!(i._hasPendingMicrotasks||(i.shouldCoalesceEventChangeDetection||i.shouldCoalesceRunChangeDetection)&&-1!==i.lastRequestAnimationFrameId)}function _N(i){i._nesting++,i.isStable&&(i.isStable=!1,i.onUnstable.emit(null))}function vN(i){i._nesting--,pT(i)}class W6{constructor(){this.hasPendingMicrotasks=!1,this.hasPendingMacrotasks=!1,this.isStable=!0,this.onUnstable=new $e,this.onMicrotaskEmpty=new $e,this.onStable=new $e,this.onError=new $e}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 yN=new me(""),Vw=new me("");let vT,gT=(()=>{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,vT||(function j6(i){vT=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:()=>{gt.assertNotInAngularZone(),fT(()=>{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())fT(()=>{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)(ee(gt),ee(_T),ee(Vw))},i.\u0275prov=ke({token:i,factory:i.\u0275fac}),i})(),_T=(()=>{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 vT?.findTestabilityInTree(this,e,n)??null}}return i.\u0275fac=function(e){return new(e||i)},i.\u0275prov=ke({token:i,factory:i.\u0275fac,providedIn:"platform"}),i})();const Hc=!1;let tu=null;const bN=new me("AllowMultipleToken"),yT=new me("PlatformDestroyListeners"),xN=new me("appBootstrapListener");class wN{constructor(t,e){this.name=t,this.token=e}}function CN(i,t,e=[]){const n=`Platform: ${t}`,r=new me(n);return(s=[])=>{let o=bT();if(!o||o.injector.get(bN,!1)){const a=[...e,...s,{provide:r,useValue:!0}];i?i(a):function X6(i){if(tu&&!tu.get(bN,!1))throw new pe(400,!1);tu=i;const t=i.get(EN);(function MN(i){const t=i.get(fN,null);t&&t.forEach(e=>e())})(i)}(function SN(i=[],t){return Gi.create({name:t,providers:[{provide:Dv,useValue:"platform"},{provide:yT,useValue:new Set([()=>tu=null])},...i]})}(a,n))}return function Z6(i){const t=bT();if(!t)throw new pe(401,!1);return t}()}}function bT(){return tu?.get(EN)??null}let EN=(()=>{class i{constructor(e){this._injector=e,this._modules=[],this._destroyListeners=[],this._destroyed=!1}bootstrapModuleFactory(e,n){const r=function DN(i,t){let e;return e="noop"===i?new W6:("zone.js"===i?void 0:i)||new gt(t),e}(n?.ngZone,function AN(i){return{enableLongStackTrace:!1,shouldCoalesceEventChangeDetection:!(!i||!i.ngZoneEventCoalescing)||!1,shouldCoalesceRunChangeDetection:!(!i||!i.ngZoneRunCoalescing)||!1}}(n)),s=[{provide:gt,useValue:r}];return r.run(()=>{const o=Gi.create({providers:s,parent:this.injector,name:e.moduleType.name}),a=e.create(o),l=a.injector.get(ol,null);if(!l)throw new pe(402,!1);return r.runOutsideAngular(()=>{const c=r.onError.subscribe({next:d=>{l.handleError(d)}});a.onDestroy(()=>{zw(this._modules,a),c.unsubscribe()})}),function TN(i,t,e){try{const n=e();return ry(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(Uw);return c.runInitializers(),c.donePromise.then(()=>(function t2(i){Sn(i,"Expected localeId to be defined"),"string"==typeof i&&(e2=i.toLowerCase().replace(/_/g,"-"))}(a.injector.get(Xl,nm)||nm),this._moduleDoBootstrap(a),a))})})}bootstrapModule(e,n=[]){const r=IN({},n);return function Y6(i,t,e){const n=new XD(e);return Promise.resolve(n)}(0,0,e).then(s=>this.bootstrapModuleFactory(s,r))}_moduleDoBootstrap(e){const n=e.injector.get(cm);if(e._bootstrapComponents.length>0)e._bootstrapComponents.forEach(r=>n.bootstrap(r));else{if(!e.instance.ngDoBootstrap)throw new pe(-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 pe(404,!1);this._modules.slice().forEach(n=>n.destroy()),this._destroyListeners.forEach(n=>n());const e=this._injector.get(yT,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)(ee(Gi))},i.\u0275prov=ke({token:i,factory:i.\u0275fac,providedIn:"platform"}),i})();function IN(i,t){return Array.isArray(t)?t.reduce(IN,i):{...i,...t}}let cm=(()=>{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 Tn(a=>{this._stable=this._zone.isStable&&!this._zone.hasPendingMacrotasks&&!this._zone.hasPendingMicrotasks,this._zone.runOutsideAngular(()=>{a.next(this._stable),a.complete()})}),o=new Tn(a=>{let l;this._zone.runOutsideAngular(()=>{l=this._zone.onStable.subscribe(()=>{gt.assertNotInAngularZone(),fT(()=>{!this._stable&&!this._zone.hasPendingMacrotasks&&!this._zone.hasPendingMicrotasks&&(this._stable=!0,a.next(!0))})})});const c=this._zone.onUnstable.subscribe(()=>{gt.assertInAngularZone(),this._stable&&(this._stable=!1,this._zone.runOutsideAngular(()=>{a.next(!1)}))});return()=>{l.unsubscribe(),c.unsubscribe()}});this.isStable=Cr(s,o.pipe(Uf()))}bootstrap(e,n){const r=e instanceof kv;if(!this._injector.get(Uw).done){!r&&function Ed(i){const t=Hn(i)||Vr(i)||vs(i);return null!==t&&t.standalone}(e);throw new pe(405,Hc)}let o;o=r?e:this._injector.get($l).resolveComponentFactory(e),this.componentTypes.push(o.componentType);const a=function q6(i){return i.isBoundToModule}(o)?void 0:this._injector.get(im),c=o.create(Gi.NULL,[],n||o.selector,a),d=c.location.nativeElement,h=c.injector.get(yN,null);return h?.registerApplication(d),c.onDestroy(()=>{this.detachView(c.hostView),zw(this.components,c),h?.unregisterApplication(d)}),this._loadComponent(c),c}tick(){if(this._runningTick)throw new pe(101,!1);try{this._runningTick=!0;for(let e of this._views)e.detectChanges()}catch(e){this._zone.runOutsideAngular(()=>this._exceptionHandler.handleError(e))}finally{this._runningTick=!1}}attachView(e){const n=e;this._views.push(n),n.attachToAppRef(this)}detachView(e){const n=e;zw(this._views,n),n.detachFromAppRef()}_loadComponent(e){this.attachView(e.hostView),this.tick(),this.components.push(e);const n=this._injector.get(xN,[]);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),()=>zw(this._destroyListeners,e)}destroy(){if(this._destroyed)throw new pe(406,!1);const e=this._injector;e.destroy&&!e.destroyed&&e.destroy()}get viewCount(){return this._views.length}warnIfDestroyed(){}}return i.\u0275fac=function(e){return new(e||i)(ee(gt),ee(to),ee(ol))},i.\u0275prov=ke({token:i,factory:i.\u0275fac,providedIn:"root"}),i})();function zw(i,t){const e=i.indexOf(t);e>-1&&i.splice(e,1)}let Qn=(()=>{class i{}return i.__NG_ELEMENT_ID__=J6,i})();function J6(i){return function e9(i,t,e){if(Dd(i)&&!e){const n=ws(i.index,t);return new ey(n,n)}return 47&i.type?new ey(t[rr],t):null}(Ar(),Se(),16==(16&i))}class FN{constructor(){}supports(t){return Sw(t)}create(t){return new a9(t)}}const o9=(i,t)=>t;class a9{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||o9}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 l9(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 LN),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 LN),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 l9{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 c9{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 LN{constructor(){this.map=new Map}put(t){const e=t.trackById;let n=this.map.get(e);n||(n=new c9,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 NN(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 u9(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 u9{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 UN(){return new Gw([new FN])}let Gw=(()=>{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||UN()),deps:[[i,new xa,new Ss]]}}find(e){const n=this.factories.find(r=>r.supports(e));if(null!=n)return n;throw new pe(901,!1)}}return i.\u0275prov=ke({token:i,providedIn:"root",factory:UN}),i})();function VN(){return new py([new BN])}let py=(()=>{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||VN()),deps:[[i,new xa,new Ss]]}}find(e){const n=this.factories.find(r=>r.supports(e));if(n)return n;throw new pe(901,!1)}}return i.\u0275prov=ke({token:i,providedIn:"root",factory:VN}),i})();const p9=CN(null,"core",[]);let m9=(()=>{class i{constructor(e){}}return i.\u0275fac=function(e){return new(e||i)(ee(cm))},i.\u0275mod=en({type:i}),i.\u0275inj=Wt({}),i})();let ST=null;function $c(){return ST}class v9{}const qt=new me("DocumentToken");let ET=(()=>{class i{historyGo(e){throw new Error("Not implemented")}}return i.\u0275fac=function(e){return new(e||i)},i.\u0275prov=ke({token:i,factory:function(){return function y9(){return ee(zN)}()},providedIn:"platform"}),i})();const b9=new me("Location Initialized");let zN=(()=>{class i extends ET{constructor(e){super(),this._doc=e,this._location=window.location,this._history=window.history}getBaseHrefFromDOM(){return $c().getBaseHref(this._doc)}onPopState(e){const n=$c().getGlobalEventTarget(this._doc,"window");return n.addEventListener("popstate",e,!1),()=>n.removeEventListener("popstate",e)}onHashChange(e){const n=$c().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){HN()?this._history.pushState(e,n,r):this._location.hash=r}replaceState(e,n,r){HN()?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)(ee(qt))},i.\u0275prov=ke({token:i,factory:function(){return function x9(){return new zN(ee(qt))}()},providedIn:"platform"}),i})();function HN(){return!!window.history.pushState}function AT(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 $N(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 Gc(i){return i&&"?"!==i[0]?"?"+i:i}let Ih=(()=>{class i{historyGo(e){throw new Error("Not implemented")}}return i.\u0275fac=function(e){return new(e||i)},i.\u0275prov=ke({token:i,factory:function(){return Lt(WN)},providedIn:"root"}),i})();const GN=new me("appBaseHref");let WN=(()=>{class i extends Ih{constructor(e,n){super(),this._platformLocation=e,this._removeListenerFns=[],this._baseHref=n??this._platformLocation.getBaseHrefFromDOM()??Lt(qt).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 AT(this._baseHref,e)}path(e=!1){const n=this._platformLocation.pathname+Gc(this._platformLocation.search),r=this._platformLocation.hash;return r&&e?`${n}${r}`:n}pushState(e,n,r,s){const o=this.prepareExternalUrl(r+Gc(s));this._platformLocation.pushState(e,n,o)}replaceState(e,n,r,s){const o=this.prepareExternalUrl(r+Gc(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)(ee(ET),ee(GN,8))},i.\u0275prov=ke({token:i,factory:i.\u0275fac,providedIn:"root"}),i})(),w9=(()=>{class i extends Ih{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=AT(this._baseHref,e);return n.length>0?"#"+n:n}pushState(e,n,r,s){let o=this.prepareExternalUrl(r+Gc(s));0==o.length&&(o=this._platformLocation.pathname),this._platformLocation.pushState(e,n,o)}replaceState(e,n,r,s){let o=this.prepareExternalUrl(r+Gc(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)(ee(ET),ee(GN,8))},i.\u0275prov=ke({token:i,factory:i.\u0275fac}),i})(),my=(()=>{class i{constructor(e){this._subject=new $e,this._urlChangeListeners=[],this._urlChangeSubscription=null,this._locationStrategy=e;const n=this._locationStrategy.getBaseHref();this._basePath=function S9(i){if(new RegExp("^(https?:)?//").test(i)){const[,e]=i.split(/\/\/[^\/]+/);return e}return i}($N(jN(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+Gc(n))}normalize(e){return i.stripTrailingSlash(function C9(i,t){if(!i||!t.startsWith(i))return t;const e=t.substring(i.length);return""===e||["/",";","?","#"].includes(e[0])?e:t}(this._basePath,jN(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+Gc(n)),r)}replaceState(e,n="",r=null){this._locationStrategy.replaceState(r,"",e,n),this._notifyUrlChangeListeners(this.prepareExternalUrl(e+Gc(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=Gc,i.joinWithSlash=AT,i.stripTrailingSlash=$N,i.\u0275fac=function(e){return new(e||i)(ee(Ih))},i.\u0275prov=ke({token:i,factory:function(){return function M9(){return new my(ee(Ih))}()},providedIn:"root"}),i})();function jN(i){return i.replace(/\/index.html$/,"")}var Eo=(()=>((Eo=Eo||{})[Eo.Decimal=0]="Decimal",Eo[Eo.Percent=1]="Percent",Eo[Eo.Currency=2]="Currency",Eo[Eo.Scientific=3]="Scientific",Eo))(),$t=(()=>(($t=$t||{})[$t.Decimal=0]="Decimal",$t[$t.Group=1]="Group",$t[$t.List=2]="List",$t[$t.PercentSign=3]="PercentSign",$t[$t.PlusSign=4]="PlusSign",$t[$t.MinusSign=5]="MinusSign",$t[$t.Exponential=6]="Exponential",$t[$t.SuperscriptingExponent=7]="SuperscriptingExponent",$t[$t.PerMille=8]="PerMille",$t[$t.Infinity=9]="Infinity",$t[$t.NaN=10]="NaN",$t[$t.TimeSeparator=11]="TimeSeparator",$t[$t.CurrencyDecimal=12]="CurrencyDecimal",$t[$t.CurrencyGroup=13]="CurrencyGroup",$t))();function Ea(i,t){const e=ro(i),n=e[rt.NumberSymbols][t];if(typeof n>"u"){if(t===$t.CurrencyDecimal)return e[rt.NumberSymbols][$t.Decimal];if(t===$t.CurrencyGroup)return e[rt.NumberSymbols][$t.Group]}return n}const Z9=/^(\d+)?\.((\d+)(-(\d+))?)?$/,QN=22,Jw=".",_y="0",Q9=";",J9=",",kT="#";function FT(i){const t=parseInt(i);if(isNaN(t))throw new Error("Invalid integer literal when parsing "+i);return t}const NT=/\s+/,tB=[];let um=(()=>{class i{constructor(e,n,r,s){this._iterableDiffers=e,this._keyValueDiffers=n,this._ngEl=r,this._renderer=s,this.initialClasses=tB,this.stateMap=new Map}set klass(e){this.initialClasses=null!=e?e.trim().split(NT):tB}set ngClass(e){this.rawClass="string"==typeof e?e.trim().split(NT):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(NT).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)(E(Gw),E(py),E(vt),E(sl))},i.\u0275dir=ve({type:i,selectors:[["","ngClass",""]],inputs:{klass:["class","klass"],ngClass:"ngClass"},standalone:!0}),i})();class dY{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 oo=(()=>{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 dY(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),rB(a,r)}});for(let r=0,s=n.length;r{rB(n.get(r.currentIndex),r)})}static ngTemplateContextGuard(e,n){return!0}}return i.\u0275fac=function(e){return new(e||i)(E(jr),E(So),E(Gw))},i.\u0275dir=ve({type:i,selectors:[["","ngFor","","ngForOf",""]],inputs:{ngForOf:"ngForOf",ngForTrackBy:"ngForTrackBy",ngForTemplate:"ngForTemplate"},standalone:!0}),i})();function rB(i,t){i.context.$implicit=t.item}let _i=(()=>{class i{constructor(e,n){this._viewContainer=e,this._context=new hY,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){sB("ngIfThen",e),this._thenTemplateRef=e,this._thenViewRef=null,this._updateView()}set ngIfElse(e){sB("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)(E(jr),E(So))},i.\u0275dir=ve({type:i,selectors:[["","ngIf",""]],inputs:{ngIf:"ngIf",ngIfThen:"ngIfThen",ngIfElse:"ngIfElse"},standalone:!0}),i})();class hY{constructor(){this.$implicit=null,this.ngIf=null}}function sB(i,t){if(t&&!t.createEmbeddedView)throw new Error(`${i} must be a TemplateRef, but received '${mi(t)}'.`)}class BT{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 vy=(()=>{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=ve({type:i,selectors:[["","ngSwitch",""]],inputs:{ngSwitch:"ngSwitch"},standalone:!0}),i})(),UT=(()=>{class i{constructor(e,n,r){this.ngSwitch=r,r._addCase(),this._view=new BT(e,n)}ngDoCheck(){this._view.enforceState(this.ngSwitch._matchCase(this.ngSwitchCase))}}return i.\u0275fac=function(e){return new(e||i)(E(jr),E(So),E(vy,9))},i.\u0275dir=ve({type:i,selectors:[["","ngSwitchCase",""]],inputs:{ngSwitchCase:"ngSwitchCase"},standalone:!0}),i})(),oB=(()=>{class i{constructor(e,n,r){r._addDefault(new BT(e,n))}}return i.\u0275fac=function(e){return new(e||i)(E(jr),E(So),E(vy,9))},i.\u0275dir=ve({type:i,selectors:[["","ngSwitchDefault",""]],standalone:!0}),i})(),eM=(()=>{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:Es.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)(E(vt),E(py),E(sl))},i.\u0275dir=ve({type:i,selectors:[["","ngStyle",""]],inputs:{ngStyle:"ngStyle"},standalone:!0}),i})(),yy=(()=>{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)(E(jr))},i.\u0275dir=ve({type:i,selectors:[["","ngTemplateOutlet",""]],inputs:{ngTemplateOutletContext:"ngTemplateOutletContext",ngTemplateOutlet:"ngTemplateOutlet",ngTemplateOutletInjector:"ngTemplateOutletInjector"},standalone:!0,features:[xi]}),i})();function hl(i,t){return new pe(2100,!1)}class pY{createSubscription(t,e){return t.subscribe({next:e,error:n=>{throw n}})}dispose(t){t.unsubscribe()}}class mY{createSubscription(t,e){return t.then(e,n=>{throw n})}dispose(t){}}const gY=new mY,_Y=new pY;let qo=(()=>{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(ry(e))return gY;if(dL(e))return _Y;throw hl()}_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)(E(Qn,16))},i.\u0275pipe=$i({name:"async",type:i,pure:!1,standalone:!0}),i})(),lB=(()=>{class i{constructor(e){this.differs=e,this.keyValues=[],this.compareFn=cB}transform(e,n=cB){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 IY(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)(E(py,16))},i.\u0275pipe=$i({name:"keyvalue",type:i,pure:!1,standalone:!0}),i})();function cB(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 VT(i){return!(null==i||""===i||i!=i)}(e))return null;r=r||this._locale;try{return function iY(i,t,e){return function PT(i,t,e,n,r,s,o=!1){let a="",l=!1;if(isFinite(i)){let c=function sY(i){let n,r,s,o,a,t=Math.abs(i)+"",e=0;for((r=t.indexOf(Jw))>-1&&(t=t.replace(Jw,"")),(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)===_y;s++);if(s===(a=t.length))n=[0],r=1;else{for(a--;t.charAt(a)===_y;)a--;for(r-=s,n=[],o=0;s<=a;s++,o++)n[o]=Number(t.charAt(s))}return r>QN&&(n=n.splice(0,QN-1),e=r-1,r=1),{digits:n,exponent:e,integerLen:r}}(i);o&&(c=function rY(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 d=t.minInt,h=t.minFrac,p=t.maxFrac;if(s){const M=s.match(Z9);if(null===M)throw new Error(`${s} is not a valid digit info`);const x=M[1],C=M[3],F=M[5];null!=x&&(d=FT(x)),null!=C&&(h=FT(C)),null!=F?p=FT(F):null!=C&&h>p&&(p=h)}!function oY(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);d&&(n.unshift(d),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(Ea(e,n)),v.length&&(a+=Ea(e,r)+v.join("")),b&&(a+=Ea(e,$t.Exponential)+"+"+b)}else a=Ea(e,$t.Infinity);return a=i<0&&!l?t.negPre+a+t.negSuf:t.posPre+a+t.posSuf,a}(i,function OT(i,t="-"){const e={minInt:1,minFrac:0,maxFrac:0,posPre:"",posSuf:"",negPre:"",negSuf:"",gSize:0,lgSize:0},n=i.split(Q9),r=n[0],s=n[1],o=-1!==r.indexOf(Jw)?r.split(Jw):[r.substring(0,r.lastIndexOf(_y)+1),r.substring(r.lastIndexOf(_y)+1)],a=o[0],l=o[1]||"";e.posPre=a.substring(0,a.indexOf(kT));for(let d=0;d{class i{}return i.\u0275fac=function(e){return new(e||i)},i.\u0275mod=en({type:i}),i.\u0275inj=Wt({}),i})();const uB="browser";let NY=(()=>{class i{}return i.\u0275prov=ke({token:i,providedIn:"root",factory:()=>new BY(ee(qt),window)}),i})();class BY{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 UY(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=hB(this.window.history)||hB(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 hB(i){return Object.getOwnPropertyDescriptor(i,"scrollRestoration")}class f7 extends v9{constructor(){super(...arguments),this.supportsDOMEvents=!0}}class GT extends f7{static makeCurrent(){!function _9(i){ST||(ST=i)}(new GT)}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 p7(){return xy=xy||document.querySelector("base"),xy?xy.getAttribute("href"):null}();return null==e?null:function m7(i){iM=iM||document.createElement("a"),iM.setAttribute("href",i);const t=iM.pathname;return"/"===t.charAt(0)?t:`/${t}`}(e)}resetBaseElement(){xy=null}getUserAgent(){return window.navigator.userAgent}getCookie(t){return function lY(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 iM,xy=null;const _B=new me("TRANSITION_ID"),_7=[{provide:Bw,useFactory:function g7(i,t,e){return()=>{e.get(Uw).donePromise.then(()=>{const n=$c(),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=ke({token:i,factory:i.\u0275fac}),i})();const rM=new me("EventManagerPlugins");let sM=(()=>{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=ke({token:i,factory:i.\u0275fac}),i})(),wy=(()=>{class i extends yB{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)(ee(qt))},i.\u0275prov=ke({token:i,factory:i.\u0275fac}),i})();const WT={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/"},jT=/%COMP%/g,wB=new me("RemoveStylesOnCompDestory",{providedIn:"root",factory:()=>!1});function MB(i,t){return t.flat(100).map(e=>e.replace(jT,i))}function CB(i){return t=>{if("__ngUnwrap__"===t)return i;!1===i(t)&&(t.preventDefault(),t.returnValue=!1)}}let oM=(()=>{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 YT(e)}createRenderer(e,n){if(!e||!n)return this.defaultRenderer;const r=this.getOrCreateRenderer(e,n);return r instanceof AB?r.applyToHost(e):r instanceof qT&&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 qs.Emulated:s=new AB(o,a,n,this.appId,l);break;case qs.ShadowDom:return new E7(o,a,e,n);default:s=new qT(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)(ee(sM),ee(wy),ee(lm),ee(wB))},i.\u0275prov=ke({token:i,factory:i.\u0275fac}),i})();class YT{constructor(t){this.eventManager=t,this.data=Object.create(null),this.destroyNode=null}destroy(){}createElement(t,e){return e?document.createElementNS(WT[e]||e,t):document.createElement(t)}createComment(t){return document.createComment(t)}createText(t){return document.createTextNode(t)}appendChild(t,e){(EB(t)?t.content:t).appendChild(e)}insertBefore(t,e,n){t&&(EB(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=WT[r];s?t.setAttributeNS(s,e,n):t.setAttribute(e,n)}else t.setAttribute(e,n)}removeAttribute(t,e,n){if(n){const r=WT[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&(Es.DashCase|Es.Important)?t.style.setProperty(e,n,r&Es.Important?"important":""):t.style[e]=n}removeStyle(t,e,n){n&Es.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,CB(n)):this.eventManager.addEventListener(t,e,CB(n))}}function EB(i){return"TEMPLATE"===i.tagName&&void 0!==i.content}class E7 extends YT{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=MB(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 qT extends YT{constructor(t,e,n,r,s=n.id){super(t),this.sharedStylesHost=e,this.removeStylesOnCompDestory=r,this.rendererUsageCount=0,this.styles=MB(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 AB extends qT{constructor(t,e,n,r,s){const o=r+"-"+n.id;super(t,e,n,s,o),this.contentAttr=function M7(i){return"_ngcontent-%COMP%".replace(jT,i)}(o),this.hostAttr=function C7(i){return"_nghost-%COMP%".replace(jT,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 A7=(()=>{class i extends vB{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)(ee(qt))},i.\u0275prov=ke({token:i,factory:i.\u0275fac}),i})();const DB=["alt","control","meta","shift"],D7={"\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"},T7={alt:i=>i.altKey,control:i=>i.ctrlKey,meta:i=>i.metaKey,shift:i=>i.shiftKey};let I7=(()=>{class i extends vB{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(()=>$c().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."),DB.forEach(c=>{const d=n.indexOf(c);d>-1&&(n.splice(d,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=D7[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"),DB.forEach(o=>{o!==r&&(0,T7[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)(ee(qt))},i.\u0275prov=ke({token:i,factory:i.\u0275fac}),i})();const O7=CN(p9,"browser",[{provide:hT,useValue:uB},{provide:fN,useValue:function R7(){GT.makeCurrent()},multi:!0},{provide:qt,useFactory:function P7(){return function s1(i){gv=i}(document),document},deps:[]}]),RB=new me(""),kB=[{provide:Vw,useClass:class v7{addToWindow(t){In.getAngularTestability=(n,r=!0)=>{const s=t.findTestabilityInTree(n,r);if(null==s)throw new Error("Could not find testability for element.");return s},In.getAllAngularTestabilities=()=>t.getAllTestabilities(),In.getAllAngularRootElements=()=>t.getAllRootElements(),In.frameworkStabilizers||(In.frameworkStabilizers=[]),In.frameworkStabilizers.push(n=>{const r=In.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?$c().isShadowRoot(e)?this.findTestabilityInTree(t,e.host,!0):this.findTestabilityInTree(t,e.parentElement,!0):null)}},deps:[]},{provide:yN,useClass:gT,deps:[gt,_T,Vw]},{provide:gT,useClass:gT,deps:[gt,_T,Vw]}],PB=[{provide:Dv,useValue:"root"},{provide:ol,useFactory:function k7(){return new ol},deps:[]},{provide:rM,useClass:A7,multi:!0,deps:[qt,gt,hT]},{provide:rM,useClass:I7,multi:!0,deps:[qt]},{provide:oM,useClass:oM,deps:[sM,wy,lm,wB]},{provide:Gl,useExisting:oM},{provide:yB,useExisting:wy},{provide:wy,useClass:wy,deps:[qt]},{provide:sM,useClass:sM,deps:[rM,gt]},{provide:class VY{},useClass:y7,deps:[]},[]];let OB=(()=>{class i{constructor(e){}static withServerTransition(e){return{ngModule:i,providers:[{provide:lm,useValue:e.appId},{provide:_B,useExisting:lm},_7]}}}return i.\u0275fac=function(e){return new(e||i)(ee(RB,12))},i.\u0275mod=en({type:i}),i.\u0275inj=Wt({providers:[...PB,...kB],imports:[ao,m9]}),i})(),FB=(()=>{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)(ee(qt))},i.\u0275prov=ke({token:i,factory:function(e){let n=null;return n=e?new e:function L7(){return new FB(ee(qt))}(),n},providedIn:"root"}),i})();typeof window<"u"&&window;let ZT=(()=>{class i{}return i.\u0275fac=function(e){return new(e||i)},i.\u0275prov=ke({token:i,factory:function(e){let n=null;return n=e?new(e||i):ee(BB),n},providedIn:"root"}),i})(),BB=(()=>{class i extends ZT{constructor(e){super(),this._doc=e}sanitize(e,n){if(null==n)return null;switch(e){case Zn.NONE:return n;case Zn.HTML:return Ma(n,"HTML")?Js(n):Kx(this._doc,String(n)).toString();case Zn.STYLE:return Ma(n,"Style")?Js(n):n;case Zn.SCRIPT:if(Ma(n,"Script"))return Js(n);throw new Error("unsafe value used in a script context");case Zn.URL:return Ma(n,"URL")?Js(n):bh(String(n));case Zn.RESOURCE_URL:if(Ma(n,"ResourceURL"))return Js(n);throw new Error(`unsafe value used in a resource URL context (see ${Yu})`);default:throw new Error(`Unexpected SecurityContext ${e} (see ${Yu})`)}}bypassSecurityTrustHtml(e){return function u1(i){return new o1(i)}(e)}bypassSecurityTrustStyle(e){return function h1(i){return new a1(i)}(e)}bypassSecurityTrustScript(e){return function f1(i){return new l1(i)}(e)}bypassSecurityTrustUrl(e){return function p1(i){return new c1(i)}(e)}bypassSecurityTrustResourceUrl(e){return function m1(i){return new Pp(i)}(e)}}return i.\u0275fac=function(e){return new(e||i)(ee(qt))},i.\u0275prov=ke({token:i,factory:function(e){let n=null;return n=e?new e:function z7(i){return new BB(i.get(qt))}(ee(Gi)),n},providedIn:"root"}),i})();function mt(...i){return Ni(i,$u(i))}class Qe extends Te{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 hm=z(i=>function(){i(this),this.name="EmptyError",this.message="no elements in sequence"}),{isArray:H7}=Array,{getPrototypeOf:$7,prototype:G7,keys:W7}=Object;function UB(i){if(1===i.length){const t=i[0];if(H7(t))return{args:t,keys:null};if(function j7(i){return i&&"object"==typeof i&&$7(i)===G7}(t)){const e=W7(t);return{args:e.map(n=>t[n]),keys:e}}}return{args:i,keys:null}}const{isArray:Y7}=Array;function QT(i){return tt(t=>function q7(i,t){return Y7(t)?i(...t):i(t)}(i,t))}function VB(i,t){return i.reduce((e,n,r)=>(e[n]=t[r],e),{})}function Da(...i){const t=$u(i),e=x0(i),{args:n,keys:r}=UB(i);if(0===n.length)return Ni([],t);const s=new Tn(function X7(i,t,e=$a){return n=>{zB(t,()=>{const{length:r}=i,s=new Array(r);let o=r,a=r;for(let l=0;l{const c=Ni(i[l],t);let d=!1;c.subscribe(qn(n,h=>{s[l]=h,d||(d=!0,a--),a||n.next(e(s.slice()))},()=>{--o||n.complete()}))},n)},n)}}(n,t,r?o=>VB(r,o):$a));return e?s.pipe(QT(e)):s}function zB(i,t,e){i?ja(e,i,t):t()}function My(...i){return function K7(){return bd(1)}()(Ni(i,$u(i)))}function Cy(i){return new Tn(t=>{Mr(i()).subscribe(t)})}function fm(i,t){const e=dn(i)?i:()=>i,n=r=>r.error(e());return new Tn(t?r=>t.schedule(n,0,r):n)}function JT(){return ni((i,t)=>{let e=null;i._refCount++;const n=qn(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 HB extends Tn{constructor(t,e){super(),this.source=t,this.subjectFactory=e,this._subject=null,this._refCount=0,this._connection=null,l0(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 Qt;const e=this.getSubject();t.add(this.source.subscribe(qn(e,void 0,()=>{this._teardown(),e.complete()},n=>{this._teardown(),e.error(n)},()=>this._teardown()))),t.closed&&(this._connection=null,t=Qt.EMPTY)}return t}refCount(){return JT()(this)}}function ks(i,t){return ni((e,n)=>{let r=null,s=0,o=!1;const a=()=>o&&!r&&n.complete();e.subscribe(qn(n,l=>{r?.unsubscribe();let c=0;const d=s++;Mr(i(l,d)).subscribe(r=qn(n,h=>n.next(t?t(l,h,d,c++):h),()=>{r=null,a()}))},()=>{o=!0,a()}))})}function Oi(i){return i<=0?()=>go:ni((t,e)=>{let n=0;t.subscribe(qn(e,r=>{++n<=i&&(e.next(r),i<=n&&e.complete())}))})}function Ao(...i){const t=$u(i);return ni((e,n)=>{(t?My(i,e,t):My(i,e)).subscribe(n)})}function gn(i,t){return ni((e,n)=>{let r=0;e.subscribe(qn(n,s=>i.call(t,s,r++)&&n.next(s)))})}function aM(i){return ni((t,e)=>{let n=!1;t.subscribe(qn(e,r=>{n=!0,e.next(r)},()=>{n||e.next(i),e.complete()}))})}function $B(i=Z7){return ni((t,e)=>{let n=!1;t.subscribe(qn(e,r=>{n=!0,e.next(r)},()=>n?e.complete():e.error(i())))})}function Z7(){return new hm}function iu(i,t){const e=arguments.length>=2;return n=>n.pipe(i?gn((r,s)=>i(r,s,n)):$a,Oi(1),e?aM(t):$B(()=>new hm))}function ru(i,t){return dn(t)?ir(i,t,1):ir(i,1)}function Vi(i,t,e){const n=dn(i)||t||e?{next:i,error:t,complete:e}:i;return n?ni((r,s)=>{var o;null===(o=n.subscribe)||void 0===o||o.call(n);let a=!0;r.subscribe(qn(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)}))}):$a}function jc(i){return ni((t,e)=>{let s,n=null,r=!1;n=t.subscribe(qn(e,void 0,void 0,o=>{s=Mr(i(o,jc(i)(t))),n?(n.unsubscribe(),n=null,s.subscribe(e)):r=!0})),r&&(n.unsubscribe(),n=null,s.subscribe(e))})}function eI(i,t){return ni(function Q7(i,t,e,n,r){return(s,o)=>{let a=e,l=t,c=0;s.subscribe(qn(o,d=>{const h=c++;l=a?i(l,d,h):(a=!0,d),n&&o.next(l)},r&&(()=>{a&&o.next(l),o.complete()})))}}(i,t,arguments.length>=2,!0))}function tI(i){return i<=0?()=>go:ni((t,e)=>{let n=[];t.subscribe(qn(e,r=>{n.push(r),i{for(const r of n)e.next(r);e.complete()},void 0,()=>{n=null}))})}function GB(i,t){const e=arguments.length>=2;return n=>n.pipe(i?gn((r,s)=>i(r,s,n)):$a,tI(1),e?aM(t):$B(()=>new hm))}function WB(i,t=!1){return ni((e,n)=>{let r=0;e.subscribe(qn(n,s=>{const o=i(s,r++);(o||t)&&n.next(s),!o&&n.complete()}))})}function jB(i){return tt(()=>i)}function su(i){return ni((t,e)=>{try{t.subscribe(e)}finally{e.add(i)}})}const _n="primary",Sy=Symbol("RouteTitle");class J7{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 pm(i){return new J7(i)}function eq(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 qB(i){return Array.prototype.concat.apply([],i)}function XB(i){return i.length>0?i[i.length-1]:null}function os(i,t){for(const e in i)i.hasOwnProperty(e)&&t(i[e],e)}function ou(i){return FD(i)?i:ry(i)?Ni(Promise.resolve(i)):mt(i)}const lM=!1,nq={exact:function QB(i,t,e){if(!Rh(i.segments,t.segments)||!cM(i.segments,t.segments,e)||i.numberOfChildren!==t.numberOfChildren)return!1;for(const n in t.children)if(!i.children[n]||!QB(i.children[n],t.children[n],e))return!1;return!0},subset:JB},KB={exact:function iq(i,t){return Kl(i,t)},subset:function rq(i,t){return Object.keys(t).length<=Object.keys(i).length&&Object.keys(t).every(e=>YB(i[e],t[e]))},ignored:()=>!0};function ZB(i,t,e){return nq[e.paths](i.root,t.root,e.matrixParams)&&KB[e.queryParams](i.queryParams,t.queryParams)&&!("exact"===e.fragment&&i.fragment!==t.fragment)}function JB(i,t,e){return e3(i,t,t.segments,e)}function e3(i,t,e,n){if(i.segments.length>e.length){const r=i.segments.slice(0,e.length);return!(!Rh(r,e)||t.hasChildren()||!cM(r,e,n))}if(i.segments.length===e.length){if(!Rh(i.segments,e)||!cM(i.segments,e,n))return!1;for(const r in t.children)if(!i.children[r]||!JB(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!!(Rh(i.segments,r)&&cM(i.segments,r,n)&&i.children[_n])&&e3(i.children[_n],t,s,n)}}function cM(i,t,e){return t.every((n,r)=>KB[e](i[r].parameters,n.parameters))}class au{constructor(t=new Dn([],{}),e={},n=null){this.root=t,this.queryParams=e,this.fragment=n}get queryParamMap(){return this._queryParamMap||(this._queryParamMap=pm(this.queryParams)),this._queryParamMap}toString(){return aq.serialize(this)}}class Dn{constructor(t,e){this.segments=t,this.children=e,this.parent=null,os(e,(n,r)=>n.parent=this)}hasChildren(){return this.numberOfChildren>0}get numberOfChildren(){return Object.keys(this.children).length}toString(){return dM(this)}}class Ey{constructor(t,e){this.path=t,this.parameters=e}get parameterMap(){return this._parameterMap||(this._parameterMap=pm(this.parameters)),this._parameterMap}toString(){return r3(this)}}function Rh(i,t){return i.length===t.length&&i.every((e,n)=>e.path===t[n].path)}let Ay=(()=>{class i{}return i.\u0275fac=function(e){return new(e||i)},i.\u0275prov=ke({token:i,factory:function(){return new nI},providedIn:"root"}),i})();class nI{parse(t){const e=new gq(t);return new au(e.parseRootSegment(),e.parseQueryParams(),e.parseFragment())}serialize(t){const e=`/${Dy(t.root,!0)}`,n=function dq(i){const t=Object.keys(i).map(e=>{const n=i[e];return Array.isArray(n)?n.map(r=>`${uM(e)}=${uM(r)}`).join("&"):`${uM(e)}=${uM(n)}`}).filter(e=>!!e);return t.length?`?${t.join("&")}`:""}(t.queryParams);return`${e}${n}${"string"==typeof t.fragment?`#${function lq(i){return encodeURI(i)}(t.fragment)}`:""}`}}const aq=new nI;function dM(i){return i.segments.map(t=>r3(t)).join("/")}function Dy(i,t){if(!i.hasChildren())return dM(i);if(t){const e=i.children[_n]?Dy(i.children[_n],!1):"",n=[];return os(i.children,(r,s)=>{s!==_n&&n.push(`${s}:${Dy(r,!1)}`)}),n.length>0?`${e}(${n.join("//")})`:e}{const e=function oq(i,t){let e=[];return os(i.children,(n,r)=>{r===_n&&(e=e.concat(t(n,r)))}),os(i.children,(n,r)=>{r!==_n&&(e=e.concat(t(n,r)))}),e}(i,(n,r)=>r===_n?[Dy(i.children[_n],!1)]:[`${r}:${Dy(n,!1)}`]);return 1===Object.keys(i.children).length&&null!=i.children[_n]?`${dM(i)}/${e[0]}`:`${dM(i)}/(${e.join("//")})`}}function t3(i){return encodeURIComponent(i).replace(/%40/g,"@").replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",")}function uM(i){return t3(i).replace(/%3B/gi,";")}function iI(i){return t3(i).replace(/\(/g,"%28").replace(/\)/g,"%29").replace(/%26/gi,"&")}function hM(i){return decodeURIComponent(i)}function n3(i){return hM(i.replace(/\+/g,"%20"))}function r3(i){return`${iI(i.path)}${function cq(i){return Object.keys(i).map(t=>`;${iI(t)}=${iI(i[t])}`).join("")}(i.parameters)}`}const uq=/^[^\/()?;=#]+/;function fM(i){const t=i.match(uq);return t?t[0]:""}const hq=/^[^=?&#]+/,pq=/^[^&#]+/;class gq{constructor(t){this.url=t,this.remaining=t}parseRootSegment(){return this.consumeOptional("/"),""===this.remaining||this.peekStartsWith("?")||this.peekStartsWith("#")?new Dn([],{}):new Dn([],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[_n]=new Dn(t,e)),n}parseSegment(){const t=fM(this.remaining);if(""===t&&this.peekStartsWith(";"))throw new pe(4009,lM);return this.capture(t),new Ey(hM(t),this.parseMatrixParams())}parseMatrixParams(){const t={};for(;this.consumeOptional(";");)this.parseParam(t);return t}parseParam(t){const e=fM(this.remaining);if(!e)return;this.capture(e);let n="";if(this.consumeOptional("=")){const r=fM(this.remaining);r&&(n=r,this.capture(n))}t[hM(e)]=hM(n)}parseQueryParam(t){const e=function fq(i){const t=i.match(hq);return t?t[0]:""}(this.remaining);if(!e)return;this.capture(e);let n="";if(this.consumeOptional("=")){const o=function mq(i){const t=i.match(pq);return t?t[0]:""}(this.remaining);o&&(n=o,this.capture(n))}const r=n3(e),s=n3(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=fM(this.remaining),r=this.remaining[n.length];if("/"!==r&&")"!==r&&";"!==r)throw new pe(4010,lM);let s;n.indexOf(":")>-1?(s=n.slice(0,n.indexOf(":")),this.capture(s),this.capture(":")):t&&(s=_n);const o=this.parseChildren();e[s]=1===Object.keys(o).length?o[_n]:new Dn([],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 pe(4011,lM)}}function rI(i){return i.segments.length>0?new Dn([],{[_n]:i}):i}function pM(i){const t={};for(const n of Object.keys(i.children)){const s=pM(i.children[n]);(s.segments.length>0||s.hasChildren())&&(t[n]=s)}return function _q(i){if(1===i.numberOfChildren&&i.children[_n]){const t=i.children[_n];return new Dn(i.segments.concat(t.segments),t.children)}return i}(new Dn(i.segments,t))}function kh(i){return i instanceof au}const sI=!1;function vq(i,t,e,n,r){if(0===e.length)return mm(t.root,t.root,t.root,n,r);const s=function c3(i){if("string"==typeof i[0]&&1===i.length&&"/"===i[0])return new l3(!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 os(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 l3(e,t,n)}(e);return s.toRoot()?mm(t.root,t.root,new Dn([],{}),n,r):function o(l){const c=function bq(i,t,e,n){if(i.isAbsolute)return new gm(t.root,!0,0);if(-1===n)return new gm(e,e===t.root,0);return function d3(i,t,e){let n=i,r=t,s=e;for(;s>r;){if(s-=r,n=n.parent,!n)throw new pe(4005,sI&&"Invalid number of '../'");r=n.segments.length}return new gm(n,!1,r-s)}(e,n+(Ty(i.commands[0])?0:1),i.numberOfDoubleDots)}(s,t,i.snapshot?._urlSegment,l),d=c.processChildren?_m(c.segmentGroup,c.index,s.commands):oI(c.segmentGroup,c.index,s.commands);return mm(t.root,c.segmentGroup,d,n,r)}(i.snapshot?._lastPathIndex)}function Ty(i){return"object"==typeof i&&null!=i&&!i.outlets&&!i.segmentPath}function Iy(i){return"object"==typeof i&&null!=i&&i.outlets}function mm(i,t,e,n,r){let o,s={};n&&os(n,(l,c)=>{s[c]=Array.isArray(l)?l.map(d=>`${d}`):`${l}`}),o=i===t?e:a3(i,t,e);const a=rI(pM(o));return new au(a,s,r)}function a3(i,t,e){const n={};return os(i.children,(r,s)=>{n[s]=r===t?e:a3(r,t,e)}),new Dn(i.segments,n)}class l3{constructor(t,e,n){if(this.isAbsolute=t,this.numberOfDoubleDots=e,this.commands=n,t&&n.length>0&&Ty(n[0]))throw new pe(4003,sI&&"Root segment cannot have matrix parameters");const r=n.find(Iy);if(r&&r!==XB(n))throw new pe(4004,sI&&"{outlets:{}} has to be the last command")}toRoot(){return this.isAbsolute&&1===this.commands.length&&"/"==this.commands[0]}}class gm{constructor(t,e,n){this.segmentGroup=t,this.processChildren=e,this.index=n}}function oI(i,t,e){if(i||(i=new Dn([],{})),0===i.segments.length&&i.hasChildren())return _m(i,t,e);const n=function wq(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(Iy(a))break;const l=`${a}`,c=n0&&void 0===l)break;if(l&&c&&"object"==typeof c&&void 0===c.outlets){if(!h3(l,c,o))return s;n+=2}else{if(!h3(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]=oI(i.children[o],t,s))}),os(i.children,(s,o)=>{void 0===n[o]&&(r[o]=s)}),new Dn(i.segments,r)}}function aI(i,t,e){const n=i.segments.slice(0,t);let r=0;for(;r{"string"==typeof e&&(e=[e]),null!==e&&(t[n]=aI(new Dn([],{}),0,e))}),t}function u3(i){const t={};return os(i,(e,n)=>t[n]=`${e}`),t}function h3(i,t,e){return i==e.path&&Kl(t,e.parameters)}const Ry="imperative";class Zl{constructor(t,e){this.id=t,this.url=e}}class lI extends Zl{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 Ph extends Zl{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 mM extends Zl{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 gM extends Zl{constructor(t,e,n,r){super(t,e),this.reason=n,this.code=r,this.type=16}}class cI extends Zl{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 Cq extends Zl{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 Sq extends Zl{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 Eq extends Zl{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 Aq extends Zl{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 Dq extends Zl{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 Tq{constructor(t){this.route=t,this.type=9}toString(){return`RouteConfigLoadStart(path: ${this.route.path})`}}class Iq{constructor(t){this.route=t,this.type=10}toString(){return`RouteConfigLoadEnd(path: ${this.route.path})`}}class Rq{constructor(t){this.snapshot=t,this.type=11}toString(){return`ChildActivationStart(path: '${this.snapshot.routeConfig&&this.snapshot.routeConfig.path||""}')`}}class kq{constructor(t){this.snapshot=t,this.type=12}toString(){return`ChildActivationEnd(path: '${this.snapshot.routeConfig&&this.snapshot.routeConfig.path||""}')`}}class Pq{constructor(t){this.snapshot=t,this.type=13}toString(){return`ActivationStart(path: '${this.snapshot.routeConfig&&this.snapshot.routeConfig.path||""}')`}}class Oq{constructor(t){this.snapshot=t,this.type=14}toString(){return`ActivationEnd(path: '${this.snapshot.routeConfig&&this.snapshot.routeConfig.path||""}')`}}class f3{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 Nq=(()=>{class i{createUrlTree(e,n,r,s,o,a){return vq(e||n.root,r,s,o,a)}}return i.\u0275fac=function(e){return new(e||i)},i.\u0275prov=ke({token:i,factory:i.\u0275fac}),i})(),Uq=(()=>{class i{}return i.\u0275fac=function(e){return new(e||i)},i.\u0275prov=ke({token:i,factory:function(t){return Nq.\u0275fac(t)},providedIn:"root"}),i})();class p3{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=dI(t,this._root);return e?e.children.map(n=>n.value):[]}firstChild(t){const e=dI(t,this._root);return e&&e.children.length>0?e.children[0].value:null}siblings(t){const e=uI(t,this._root);return e.length<2?[]:e[e.length-2].children.map(r=>r.value).filter(r=>r!==t)}pathFromRoot(t){return uI(t,this._root).map(e=>e.value)}}function dI(i,t){if(i===t.value)return t;for(const e of t.children){const n=dI(i,e);if(n)return n}return null}function uI(i,t){if(i===t.value)return[t];for(const e of t.children){const n=uI(i,e);if(n.length)return n.unshift(t),n}return[]}class Yc{constructor(t,e){this.value=t,this.children=e}toString(){return`TreeNode(${this.value})`}}function vm(i){const t={};return i&&i.children.forEach(e=>t[e.value.outlet]=e),t}class m3 extends p3{constructor(t,e){super(t),this.snapshot=e,hI(this,t)}toString(){return this.snapshot.toString()}}function g3(i,t){const e=function Vq(i,t){const o=new _M([],{},{},"",{},_n,t,null,i.root,-1,{});return new v3("",new Yc(o,[]))}(i,t),n=new Qe([new Ey("",{})]),r=new Qe({}),s=new Qe({}),o=new Qe({}),a=new Qe(""),l=new ym(n,r,o,a,s,_n,t,e.root);return l.snapshot=e.root,new m3(new Yc(l,[]),e)}class ym{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(tt(c=>c[Sy]))??mt(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(tt(t=>pm(t)))),this._paramMap}get queryParamMap(){return this._queryParamMap||(this._queryParamMap=this.queryParams.pipe(tt(t=>pm(t)))),this._queryParamMap}toString(){return this.snapshot?this.snapshot.toString():`Future(${this._futureSnapshot})`}}function _3(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 zq(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 _M{get title(){return this.data?.[Sy]}constructor(t,e,n,r,s,o,a,l,c,d,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=d,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=pm(this.params)),this._paramMap}get queryParamMap(){return this._queryParamMap||(this._queryParamMap=pm(this.queryParams)),this._queryParamMap}toString(){return`Route(url:'${this.url.map(n=>n.toString()).join("/")}', path:'${this.routeConfig?this.routeConfig.path:""}')`}}class v3 extends p3{constructor(t,e){super(e),this.url=t,hI(this,e)}toString(){return y3(this._root)}}function hI(i,t){t.value._routerState=i,t.children.forEach(e=>hI(i,e))}function y3(i){const t=i.children.length>0?` { ${i.children.map(y3).join(", ")} } `:"";return`${i.value}${t}`}function fI(i){if(i.snapshot){const t=i.snapshot,e=i._futureSnapshot;i.snapshot=e,Kl(t.queryParams,e.queryParams)||i.queryParams.next(e.queryParams),t.fragment!==e.fragment&&i.fragment.next(e.fragment),Kl(t.params,e.params)||i.params.next(e.params),function tq(i,t){if(i.length!==t.length)return!1;for(let e=0;eKl(e.parameters,t[n].parameters))}(i.url,t.url);return e&&!(!i.parent!=!t.parent)&&(!i.parent||pI(i.parent,t.parent))}function ky(i,t,e){if(e&&i.shouldReuseRoute(t.value,e.value.snapshot)){const n=e.value;n._futureSnapshot=t.value;const r=function $q(i,t,e){return t.children.map(n=>{for(const r of e.children)if(i.shouldReuseRoute(n.value,r.value.snapshot))return ky(i,n,r);return ky(i,n)})}(i,t,e);return new Yc(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=>ky(i,a)),o}}const n=function Gq(i){return new ym(new Qe(i.url),new Qe(i.params),new Qe(i.queryParams),new Qe(i.fragment),new Qe(i.data),i.outlet,i.component,i)}(t.value),r=t.children.map(s=>ky(i,s));return new Yc(n,r)}}const mI="ngNavigationCancelingError";function b3(i,t){const{redirectTo:e,navigationBehaviorOptions:n}=kh(t)?{redirectTo:t,navigationBehaviorOptions:void 0}:t,r=x3(!1,0,t);return r.url=e,r.navigationBehaviorOptions=n,r}function x3(i,t,e){const n=new Error("NavigationCancelingError: "+(i||""));return n[mI]=!0,n.cancellationCode=t,e&&(n.url=e),n}function w3(i){return M3(i)&&kh(i.url)}function M3(i){return i&&i[mI]}class Wq{constructor(){this.outlet=null,this.route=null,this.resolver=null,this.injector=null,this.children=new Py,this.attachRef=null}}let Py=(()=>{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 Wq,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=ke({token:i,factory:i.\u0275fac,providedIn:"root"}),i})();const vM=!1;let C3=(()=>{class i{constructor(){this.activated=null,this._activatedRoute=null,this.name=_n,this.activateEvents=new $e,this.deactivateEvents=new $e,this.attachEvents=new $e,this.detachEvents=new $e,this.parentContexts=Lt(Py),this.location=Lt(jr),this.changeDetector=Lt(Qn),this.environmentInjector=Lt(to)}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 pe(4012,vM);return this.activated.instance}get activatedRoute(){if(!this.activated)throw new pe(4012,vM);return this._activatedRoute}get activatedRouteData(){return this._activatedRoute?this._activatedRoute.snapshot.data:{}}detach(){if(!this.activated)throw new pe(4012,vM);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 pe(4013,vM);this._activatedRoute=e;const r=this.location,o=e.snapshot.component,a=this.parentContexts.getOrCreateContext(this.name).children,l=new jq(e,a,r.injector);if(n&&function Yq(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=ve({type:i,selectors:[["router-outlet"]],inputs:{name:"name"},outputs:{activateEvents:"activate",deactivateEvents:"deactivate",attachEvents:"attach",detachEvents:"detach"},exportAs:["outlet"],standalone:!0,features:[xi]}),i})();class jq{constructor(t,e,n){this.route=t,this.childContexts=e,this.parent=n}get(t,e){return t===ym?this.route:t===Py?this.childContexts:this.parent.get(t,e)}}let gI=(()=>{class i{}return i.\u0275fac=function(e){return new(e||i)},i.\u0275cmp=ot({type:i,selectors:[["ng-component"]],standalone:!0,features:[KD],decls:1,vars:0,template:function(e,n){1&e&&Ie(0,"router-outlet")},dependencies:[C3],encapsulation:2}),i})();function S3(i,t){return i.providers&&!i._injector&&(i._injector=Ow(i.providers,t,`Route: ${i.path}`)),i._injector??t}function vI(i){const t=i.children&&i.children.map(vI),e=t?{...i,children:t}:{...i};return!e.component&&!e.loadComponent&&(t||e.loadChildren)&&e.outlet&&e.outlet!==_n&&(e.component=gI),e}function Ta(i){return i.outlet||_n}function E3(i,t){const e=i.filter(n=>Ta(n)===t);return e.push(...i.filter(n=>Ta(n)!==t)),e}function Oy(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 Qq{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),fI(this.futureState.root),this.activateChildRoutes(e,n,t)}deactivateChildRoutes(t,e,n){const r=vm(e);t.children.forEach(s=>{const o=s.value.outlet;this.deactivateRoutes(s,r[o],n),delete r[o]}),os(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=vm(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=vm(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=vm(e);t.children.forEach(s=>{this.activateRoutes(s,r[s.value.outlet],n),this.forwardEvent(new Oq(s.value.snapshot))}),t.children.length&&this.forwardEvent(new kq(t.value.snapshot))}activateRoutes(t,e,n){const r=t.value,s=e?e.value:null;if(fI(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),fI(a.route.value),this.activateChildRoutes(t,null,o.children)}else{const a=Oy(r.snapshot),l=a?.get($l)??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 A3{constructor(t){this.path=t,this.route=this.path[this.path.length-1]}}class yM{constructor(t,e){this.component=t,this.route=e}}function Jq(i,t,e){const n=i._root;return Fy(n,t?t._root:null,e,[n.value])}function bm(i,t){const e=Symbol(),n=t.get(i,e);return n===e?"function"!=typeof i||function Sr(i){return null!==$f(i)}(i)?t.get(i):i:n}function Fy(i,t,e,n,r={canDeactivateChecks:[],canActivateChecks:[]}){const s=vm(t);return i.children.forEach(o=>{(function tX(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 nX(i,t,e){if("function"==typeof e)return e(i,t);switch(e){case"pathParamsChange":return!Rh(i.url,t.url);case"pathParamsOrQueryParamsChange":return!Rh(i.url,t.url)||!Kl(i.queryParams,t.queryParams);case"always":return!0;case"paramsOrQueryParamsChange":return!pI(i,t)||!Kl(i.queryParams,t.queryParams);default:return!pI(i,t)}}(o,s,s.routeConfig.runGuardsAndResolvers);l?r.canActivateChecks.push(new A3(n)):(s.data=o.data,s._resolvedData=o._resolvedData),Fy(i,t,s.component?a?a.children:null:e,n,r),l&&a&&a.outlet&&a.outlet.isActivated&&r.canDeactivateChecks.push(new yM(a.outlet.component,o))}else o&&Ly(t,a,r),r.canActivateChecks.push(new A3(n)),Fy(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]}),os(s,(o,a)=>Ly(o,e.getContext(a),r)),r}function Ly(i,t,e){const n=vm(i),r=i.value;os(n,(s,o)=>{Ly(s,r.component?t?t.children.getContext(o):null:t,e)}),e.canDeactivateChecks.push(new yM(r.component&&t&&t.outlet&&t.outlet.isActivated?t.outlet.component:null,r))}function Ny(i){return"function"==typeof i}function yI(i){return i instanceof hm||"EmptyError"===i?.name}const bM=Symbol("INITIAL_VALUE");function xm(){return ks(i=>Da(i.map(t=>t.pipe(Oi(1),Ao(bM)))).pipe(tt(t=>{for(const e of t)if(!0!==e){if(e===bM)return bM;if(!1===e||e instanceof au)return e}return!0}),gn(t=>t!==bM),Oi(1)))}function D3(i){return function ME(...i){return o0(i)}(Vi(t=>{if(kh(t))throw b3(0,t)}),tt(t=>!0===t))}const bI={matched:!1,consumedSegments:[],remainingSegments:[],parameters:{},positionalParamSegments:{}};function T3(i,t,e,n,r){const s=xI(i,t,e);return s.matched?function yX(i,t,e,n){const r=t.canMatch;return r&&0!==r.length?mt(r.map(o=>{const a=bm(o,i);return ou(function lX(i){return i&&Ny(i.canMatch)}(a)?a.canMatch(t,e):i.runInContext(()=>a(t,e)))})).pipe(xm(),D3()):mt(!0)}(n=S3(t,n),t,e).pipe(tt(o=>!0===o?s:{...bI})):mt(s)}function xI(i,t,e){if(""===t.path)return"full"===t.pathMatch&&(i.hasChildren()||e.length>0)?{...bI}:{matched:!0,consumedSegments:[],remainingSegments:e,parameters:{},positionalParamSegments:{}};const r=(t.matcher||eq)(e,i,t);if(!r)return{...bI};const s={};os(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 xM(i,t,e,n){if(e.length>0&&function wX(i,t,e){return e.some(n=>wM(i,t,n)&&Ta(n)!==_n)}(i,e,n)){const s=new Dn(t,function xX(i,t,e,n){const r={};r[_n]=n,n._sourceSegment=i,n._segmentIndexShift=t.length;for(const s of e)if(""===s.path&&Ta(s)!==_n){const o=new Dn([],{});o._sourceSegment=i,o._segmentIndexShift=t.length,r[Ta(s)]=o}return r}(i,t,n,new Dn(e,i.children)));return s._sourceSegment=i,s._segmentIndexShift=t.length,{segmentGroup:s,slicedSegments:[]}}if(0===e.length&&function MX(i,t,e){return e.some(n=>wM(i,t,n))}(i,e,n)){const s=new Dn(i.segments,function bX(i,t,e,n,r){const s={};for(const o of n)if(wM(i,e,o)&&!r[Ta(o)]){const a=new Dn([],{});a._sourceSegment=i,a._segmentIndexShift=t.length,s[Ta(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 Dn(i.segments,i.children);return r._sourceSegment=i,r._segmentIndexShift=t.length,{segmentGroup:r,slicedSegments:e}}function wM(i,t,e){return(!(i.hasChildren()||t.length>0)||"full"!==e.pathMatch)&&""===e.path}function I3(i,t,e,n){return!!(Ta(i)===n||n!==_n&&wM(t,e,i))&&("**"===i.path||xI(t,i,e).matched)}function R3(i,t,e){return 0===t.length&&!i.children[e]}const MM=!1;class CM{constructor(t){this.segmentGroup=t||null}}class k3{constructor(t){this.urlTree=t}}function By(i){return fm(new CM(i))}function P3(i){return fm(new k3(i))}class AX{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=xM(this.urlTree.root,[],[],this.config).segmentGroup,e=new Dn(t.segments,t.children);return this.expandSegmentGroup(this.injector,this.config,e,_n).pipe(tt(s=>this.createUrlTree(pM(s),this.urlTree.queryParams,this.urlTree.fragment))).pipe(jc(s=>{if(s instanceof k3)return this.allowRedirects=!1,this.match(s.urlTree);throw s instanceof CM?this.noMatchError(s):s}))}match(t){return this.expandSegmentGroup(this.injector,this.config,t.root,_n).pipe(tt(r=>this.createUrlTree(pM(r),t.queryParams,t.fragment))).pipe(jc(r=>{throw r instanceof CM?this.noMatchError(r):r}))}noMatchError(t){return new pe(4002,MM)}createUrlTree(t,e,n){const r=rI(t);return new au(r,e,n)}expandSegmentGroup(t,e,n,r){return 0===n.segments.length&&n.hasChildren()?this.expandChildren(t,e,n).pipe(tt(s=>new Dn([],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 Ni(r).pipe(ru(s=>{const o=n.children[s],a=E3(e,s);return this.expandSegmentGroup(t,a,o,s).pipe(tt(l=>({segment:l,outlet:s})))}),eI((s,o)=>(s[o.outlet]=o.segment,s),{}),GB())}expandSegment(t,e,n,r,s,o){return Ni(n).pipe(ru(a=>this.expandSegmentAgainstRoute(t,e,n,a,r,s,o).pipe(jc(c=>{if(c instanceof CM)return mt(null);throw c}))),iu(a=>!!a),jc((a,l)=>{if(yI(a))return R3(e,r,s)?mt(new Dn([],{})):By(e);throw a}))}expandSegmentAgainstRoute(t,e,n,r,s,o,a){return I3(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):By(e):By(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("/")?P3(s):this.lineralizeSegments(n,s).pipe(ir(o=>{const a=new Dn(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:d}=xI(e,r,s);if(!a)return By(e);const h=this.applyRedirectCommands(l,r.redirectTo,d);return r.redirectTo.startsWith("/")?P3(h):this.lineralizeSegments(r,h).pipe(ir(p=>this.expandSegment(t,e,n,p.concat(c),o,!1)))}matchSegmentAgainstRoute(t,e,n,r,s){return"**"===n.path?(t=S3(n,t),n.loadChildren?(n._loadedRoutes?mt({routes:n._loadedRoutes,injector:n._loadedInjector}):this.configLoader.loadChildren(t,n)).pipe(tt(a=>(n._loadedRoutes=a.routes,n._loadedInjector=a.injector,new Dn(r,{})))):mt(new Dn(r,{}))):T3(e,n,r,t).pipe(ks(({matched:o,consumedSegments:a,remainingSegments:l})=>o?this.getChildConfig(t=n._injector??t,n,r).pipe(ir(d=>{const h=d.injector??t,p=d.routes,{segmentGroup:m,slicedSegments:g}=xM(e,a,l,p),b=new Dn(m.segments,m.children);if(0===g.length&&b.hasChildren())return this.expandChildren(h,p,b).pipe(tt(x=>new Dn(a,x)));if(0===p.length&&0===g.length)return mt(new Dn(a,{}));const v=Ta(n)===s;return this.expandSegment(h,b,p,g,v?_n:s,!0).pipe(tt(M=>new Dn(a.concat(M.segments),M.children)))})):By(e)))}getChildConfig(t,e,n){return e.children?mt({routes:e.children,injector:t}):e.loadChildren?void 0!==e._loadedRoutes?mt({routes:e._loadedRoutes,injector:e._loadedInjector}):function vX(i,t,e,n){const r=t.canLoad;return void 0===r||0===r.length?mt(!0):mt(r.map(o=>{const a=bm(o,i);return ou(function rX(i){return i&&Ny(i.canLoad)}(a)?a.canLoad(t,e):i.runInContext(()=>a(t,e)))})).pipe(xm(),D3())}(t,e,n).pipe(ir(r=>r?this.configLoader.loadChildren(t,e).pipe(Vi(s=>{e._loadedRoutes=s.routes,e._loadedInjector=s.injector})):function SX(i){return fm(x3(MM,3))}())):mt({routes:[],injector:t})}lineralizeSegments(t,e){let n=[],r=e.root;for(;;){if(n=n.concat(r.segments),0===r.numberOfChildren)return mt(n);if(r.numberOfChildren>1||!r.children[_n])return t.redirectTo,fm(new pe(4e3,MM));r=r.children[_n]}}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 au(s,this.createQueryParams(e.queryParams,this.urlTree.queryParams),e.fragment)}createQueryParams(t,e){const n={};return os(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 os(e.children,(a,l)=>{o[l]=this.createSegmentGroup(t,a,n,r)}),new Dn(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 pe(4001,MM);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 TX{}class kX{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=xM(this.urlTree.root,[],[],this.config.filter(e=>void 0===e.redirectTo)).segmentGroup;return this.processSegmentGroup(this.injector,this.config,t,_n).pipe(tt(e=>{if(null===e)return null;const n=new _M([],Object.freeze({}),Object.freeze({...this.urlTree.queryParams}),this.urlTree.fragment,{},_n,this.rootComponentType,null,this.urlTree.root,-1,{}),r=new Yc(n,e),s=new v3(this.url,r);return this.inheritParamsAndData(s._root),s}))}inheritParamsAndData(t){const e=t.value,n=_3(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 Ni(Object.keys(n.children)).pipe(ru(r=>{const s=n.children[r],o=E3(e,r);return this.processSegmentGroup(t,o,s,r)}),eI((r,s)=>r&&s?(r.push(...s),r):null),WB(r=>null!==r),aM(null),GB(),tt(r=>{if(null===r)return null;const s=F3(r);return function PX(i){i.sort((t,e)=>t.value.outlet===_n?-1:e.value.outlet===_n?1:t.value.outlet.localeCompare(e.value.outlet))}(s),s}))}processSegment(t,e,n,r,s){return Ni(e).pipe(ru(o=>this.processSegmentAgainstRoute(o._injector??t,o,n,r,s)),iu(o=>!!o),jc(o=>{if(yI(o))return R3(n,r,s)?mt([]):mt(null);throw o}))}processSegmentAgainstRoute(t,e,n,r,s){if(e.redirectTo||!I3(e,n,r,s))return mt(null);let o;if("**"===e.path){const a=r.length>0?XB(r).parameters:{},l=N3(n)+r.length;o=mt({snapshot:new _M(r,a,Object.freeze({...this.urlTree.queryParams}),this.urlTree.fragment,B3(e),Ta(e),e.component??e._loadedComponent??null,e,L3(n),l,U3(e)),consumedSegments:[],remainingSegments:[]})}else o=T3(n,e,r,t).pipe(tt(({matched:a,consumedSegments:l,remainingSegments:c,parameters:d})=>{if(!a)return null;const h=N3(n)+l.length;return{snapshot:new _M(l,d,Object.freeze({...this.urlTree.queryParams}),this.urlTree.fragment,B3(e),Ta(e),e.component??e._loadedComponent??null,e,L3(n),h,U3(e)),consumedSegments:l,remainingSegments:c}}));return o.pipe(ks(a=>{if(null===a)return mt(null);const{snapshot:l,consumedSegments:c,remainingSegments:d}=a;t=e._injector??t;const h=e._loadedInjector??t,p=function OX(i){return i.children?i.children:i.loadChildren?i._loadedRoutes:[]}(e),{segmentGroup:m,slicedSegments:g}=xM(n,c,d,p.filter(v=>void 0===v.redirectTo));if(0===g.length&&m.hasChildren())return this.processChildren(h,p,m).pipe(tt(v=>null===v?null:[new Yc(l,v)]));if(0===p.length&&0===g.length)return mt([new Yc(l,[])]);const b=Ta(e)===s;return this.processSegment(h,p,m,g,b?_n:s).pipe(tt(v=>null===v?null:[new Yc(l,v)]))}))}}function FX(i){const t=i.value.routeConfig;return t&&""===t.path&&void 0===t.redirectTo}function F3(i){const t=[],e=new Set;for(const n of i){if(!FX(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=F3(n.children);t.push(new Yc(n.value,r))}return t.filter(n=>!e.has(n))}function L3(i){let t=i;for(;t._sourceSegment;)t=t._sourceSegment;return t}function N3(i){let t=i,e=t._segmentIndexShift??0;for(;t._sourceSegment;)t=t._sourceSegment,e+=t._segmentIndexShift??0;return e-1}function B3(i){return i.data||{}}function U3(i){return i.resolve||{}}function V3(i){return"string"==typeof i.title||null===i.title}function wI(i){return ks(t=>{const e=i(t);return e?Ni(e).pipe(tt(()=>t)):mt(t)})}const wm=new me("ROUTES");let MI=(()=>{class i{constructor(){this.componentLoaders=new WeakMap,this.childrenLoaders=new WeakMap,this.compiler=Lt(pN)}loadComponent(e){if(this.componentLoaders.get(e))return this.componentLoaders.get(e);if(e._loadedComponent)return mt(e._loadedComponent);this.onLoadStartListener&&this.onLoadStartListener(e);const n=ou(e.loadComponent()).pipe(tt(H3),Vi(s=>{this.onLoadEndListener&&this.onLoadEndListener(e),e._loadedComponent=s}),su(()=>{this.componentLoaders.delete(e)})),r=new HB(n,()=>new Te).pipe(JT());return this.componentLoaders.set(e,r),r}loadChildren(e,n){if(this.childrenLoaders.get(n))return this.childrenLoaders.get(n);if(n._loadedRoutes)return mt({routes:n._loadedRoutes,injector:n._loadedInjector});this.onLoadStartListener&&this.onLoadStartListener(n);const s=this.loadModuleFactoryOrRoutes(n.loadChildren).pipe(tt(a=>{this.onLoadEndListener&&this.onLoadEndListener(n);let l,c,d=!1;Array.isArray(a)?c=a:(l=a.create(e).injector,c=qB(l.get(wm,[],Ft.Self|Ft.Optional)));return{routes:c.map(vI),injector:l}}),su(()=>{this.childrenLoaders.delete(n)})),o=new HB(s,()=>new Te).pipe(JT());return this.childrenLoaders.set(n,o),o}loadModuleFactoryOrRoutes(e){return ou(e()).pipe(tt(H3),ir(n=>n instanceof A2||Array.isArray(n)?mt(n):Ni(this.compiler.compileModuleAsync(n))))}}return i.\u0275fac=function(e){return new(e||i)},i.\u0275prov=ke({token:i,factory:i.\u0275fac,providedIn:"root"}),i})();function H3(i){return function $X(i){return i&&"object"==typeof i&&"default"in i}(i)?i.default:i}let EM=(()=>{class i{get hasRequestedNavigation(){return 0!==this.navigationId}constructor(){this.currentNavigation=null,this.lastSuccessfulNavigation=null,this.events=new Te,this.configLoader=Lt(MI),this.environmentInjector=Lt(to),this.urlSerializer=Lt(Ay),this.rootContexts=Lt(Py),this.navigationId=0,this.afterPreactivation=()=>mt(void 0),this.rootComponentType=null,this.configLoader.onLoadEndListener=r=>this.events.next(new Iq(r)),this.configLoader.onLoadStartListener=r=>this.events.next(new Tq(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 Qe({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:Ry,restoredState:null,currentSnapshot:e.routerState.snapshot,targetSnapshot:null,currentRouterState:e.routerState,targetRouterState:null,guards:{canActivateChecks:[],canDeactivateChecks:[]},guardsResult:null}),this.transitions.pipe(gn(n=>0!==n.id),tt(n=>({...n,extractedUrl:e.urlHandlingStrategy.extract(n.rawUrl)})),ks(n=>{let r=!1,s=!1;return mt(n).pipe(Vi(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}}),ks(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 d="";return this.events.next(new gM(o.id,e.serializeUrl(n.rawUrl),d,0)),e.rawUrlTree=o.rawUrl,o.resolve(null),go}if(e.urlHandlingStrategy.shouldProcessUrl(o.rawUrl))return $3(o.source)&&(e.browserUrlTree=o.extractedUrl),mt(o).pipe(ks(d=>{const h=this.transitions?.getValue();return this.events.next(new lI(d.id,this.urlSerializer.serialize(d.extractedUrl),d.source,d.restoredState)),h!==this.transitions?.getValue()?go:Promise.resolve(d)}),function DX(i,t,e,n){return ks(r=>function EX(i,t,e,n,r){return new AX(i,t,e,n,r).apply()}(i,t,e,r.extractedUrl,n).pipe(tt(s=>({...r,urlAfterRedirects:s}))))}(this.environmentInjector,this.configLoader,this.urlSerializer,e.config),Vi(d=>{this.currentNavigation={...this.currentNavigation,finalUrl:d.urlAfterRedirects},n.urlAfterRedirects=d.urlAfterRedirects}),function NX(i,t,e,n,r){return ir(s=>function RX(i,t,e,n,r,s,o="emptyOnly"){return new kX(i,t,e,n,r,o,s).recognize().pipe(ks(a=>null===a?function IX(i){return new Tn(t=>t.error(i))}(new TX):mt(a)))}(i,t,e,s.urlAfterRedirects,n.serialize(s.urlAfterRedirects),n,r).pipe(tt(o=>({...s,targetSnapshot:o}))))}(this.environmentInjector,this.rootComponentType,e.config,this.urlSerializer,e.paramsInheritanceStrategy),Vi(d=>{if(n.targetSnapshot=d.targetSnapshot,"eager"===e.urlUpdateStrategy){if(!d.extras.skipLocationChange){const p=e.urlHandlingStrategy.merge(d.urlAfterRedirects,d.rawUrl);e.setBrowserUrl(p,d)}e.browserUrlTree=d.urlAfterRedirects}const h=new Cq(d.id,this.urlSerializer.serialize(d.extractedUrl),this.urlSerializer.serialize(d.urlAfterRedirects),d.targetSnapshot);this.events.next(h)}));if(l&&e.urlHandlingStrategy.shouldProcessUrl(e.rawUrlTree)){const{id:d,extractedUrl:h,source:p,restoredState:m,extras:g}=o,b=new lI(d,this.urlSerializer.serialize(h),p,m);this.events.next(b);const v=g3(h,this.rootComponentType).snapshot;return mt(n={...o,targetSnapshot:v,urlAfterRedirects:h,extras:{...g,skipLocationChange:!1,replaceUrl:!1}})}{const d="";return this.events.next(new gM(o.id,e.serializeUrl(n.extractedUrl),d,1)),e.rawUrlTree=o.rawUrl,o.resolve(null),go}}),Vi(o=>{const a=new Sq(o.id,this.urlSerializer.serialize(o.extractedUrl),this.urlSerializer.serialize(o.urlAfterRedirects),o.targetSnapshot);this.events.next(a)}),tt(o=>n={...o,guards:Jq(o.targetSnapshot,o.currentSnapshot,this.rootContexts)}),function dX(i,t){return ir(e=>{const{targetSnapshot:n,currentSnapshot:r,guards:{canActivateChecks:s,canDeactivateChecks:o}}=e;return 0===o.length&&0===s.length?mt({...e,guardsResult:!0}):function uX(i,t,e,n){return Ni(i).pipe(ir(r=>function _X(i,t,e,n,r){const s=t&&t.routeConfig?t.routeConfig.canDeactivate:null;return s&&0!==s.length?mt(s.map(a=>{const l=Oy(t)??r,c=bm(a,l);return ou(function aX(i){return i&&Ny(i.canDeactivate)}(c)?c.canDeactivate(i,t,e,n):l.runInContext(()=>c(i,t,e,n))).pipe(iu())})).pipe(xm()):mt(!0)}(r.component,r.route,e,t,n)),iu(r=>!0!==r,!0))}(o,n,r,i).pipe(ir(a=>a&&function iX(i){return"boolean"==typeof i}(a)?function hX(i,t,e,n){return Ni(t).pipe(ru(r=>My(function pX(i,t){return null!==i&&t&&t(new Rq(i)),mt(!0)}(r.route.parent,n),function fX(i,t){return null!==i&&t&&t(new Pq(i)),mt(!0)}(r.route,n),function gX(i,t,e){const n=t[t.length-1],s=t.slice(0,t.length-1).reverse().map(o=>function eX(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=>Cy(()=>mt(o.guards.map(l=>{const c=Oy(o.node)??e,d=bm(l,c);return ou(function oX(i){return i&&Ny(i.canActivateChild)}(d)?d.canActivateChild(n,i):c.runInContext(()=>d(n,i))).pipe(iu())})).pipe(xm())));return mt(s).pipe(xm())}(i,r.path,e),function mX(i,t,e){const n=t.routeConfig?t.routeConfig.canActivate:null;if(!n||0===n.length)return mt(!0);const r=n.map(s=>Cy(()=>{const o=Oy(t)??e,a=bm(s,o);return ou(function sX(i){return i&&Ny(i.canActivate)}(a)?a.canActivate(t,i):o.runInContext(()=>a(t,i))).pipe(iu())}));return mt(r).pipe(xm())}(i,r.route,e))),iu(r=>!0!==r,!0))}(n,s,i,t):mt(a)),tt(a=>({...e,guardsResult:a})))})}(this.environmentInjector,o=>this.events.next(o)),Vi(o=>{if(n.guardsResult=o.guardsResult,kh(o.guardsResult))throw b3(0,o.guardsResult);const a=new Eq(o.id,this.urlSerializer.serialize(o.extractedUrl),this.urlSerializer.serialize(o.urlAfterRedirects),o.targetSnapshot,!!o.guardsResult);this.events.next(a)}),gn(o=>!!o.guardsResult||(e.restoreHistory(o),this.cancelNavigationTransition(o,"",3),!1)),wI(o=>{if(o.guards.canActivateChecks.length)return mt(o).pipe(Vi(a=>{const l=new Aq(a.id,this.urlSerializer.serialize(a.extractedUrl),this.urlSerializer.serialize(a.urlAfterRedirects),a.targetSnapshot);this.events.next(l)}),ks(a=>{let l=!1;return mt(a).pipe(function BX(i,t){return ir(e=>{const{targetSnapshot:n,guards:{canActivateChecks:r}}=e;if(!r.length)return mt(e);let s=0;return Ni(r).pipe(ru(o=>function UX(i,t,e,n){const r=i.routeConfig,s=i._resolve;return void 0!==r?.title&&!V3(r)&&(s[Sy]=r.title),function VX(i,t,e,n){const r=function zX(i){return[...Object.keys(i),...Object.getOwnPropertySymbols(i)]}(i);if(0===r.length)return mt({});const s={};return Ni(r).pipe(ir(o=>function HX(i,t,e,n){const r=Oy(t)??n,s=bm(i,r);return ou(s.resolve?s.resolve(t,e):r.runInContext(()=>s(t,e)))}(i[o],t,e,n).pipe(iu(),Vi(a=>{s[o]=a}))),tI(1),jB(s),jc(o=>yI(o)?go:fm(o)))}(s,i,t,n).pipe(tt(o=>(i._resolvedData=o,i.data=_3(i,e).resolve,r&&V3(r)&&(i.data[Sy]=r.title),null)))}(o.route,n,i,t)),Vi(()=>s++),tI(1),ir(o=>s===r.length?mt(e):go))})}(e.paramsInheritanceStrategy,this.environmentInjector),Vi({next:()=>l=!0,complete:()=>{l||(e.restoreHistory(a),this.cancelNavigationTransition(a,"",2))}}))}),Vi(a=>{const l=new Dq(a.id,this.urlSerializer.serialize(a.extractedUrl),this.urlSerializer.serialize(a.urlAfterRedirects),a.targetSnapshot);this.events.next(l)}))}),wI(o=>{const a=l=>{const c=[];l.routeConfig?.loadComponent&&!l.routeConfig._loadedComponent&&c.push(this.configLoader.loadComponent(l.routeConfig).pipe(Vi(d=>{l.component=d}),tt(()=>{})));for(const d of l.children)c.push(...a(d));return c};return Da(a(o.targetSnapshot.root)).pipe(aM(),Oi(1))}),wI(()=>this.afterPreactivation()),tt(o=>{const a=function Hq(i,t,e){const n=ky(i,t._root,e?e._root:void 0);return new m3(n,t)}(e.routeReuseStrategy,o.targetSnapshot,o.currentRouterState);return n={...o,targetRouterState:a}}),Vi(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)=>tt(n=>(new Qq(t,n.targetRouterState,n.currentRouterState,e).activate(i),n)))(this.rootContexts,e.routeReuseStrategy,o=>this.events.next(o)),Oi(1),Vi({next:o=>{r=!0,this.lastSuccessfulNavigation=this.currentNavigation,e.navigated=!0,this.events.next(new Ph(o.id,this.urlSerializer.serialize(o.extractedUrl),this.urlSerializer.serialize(e.currentUrlTree))),e.titleStrategy?.updateTitle(o.targetRouterState.snapshot),o.resolve(!0)},complete:()=>{r=!0}}),su(()=>{r||s||this.cancelNavigationTransition(n,"",1),this.currentNavigation?.id===n.id&&(this.currentNavigation=null)}),jc(o=>{if(s=!0,M3(o)){w3(o)||(e.navigated=!0,e.restoreHistory(n,!0));const a=new mM(n.id,this.urlSerializer.serialize(n.extractedUrl),o.message,o.cancellationCode);if(this.events.next(a),w3(o)){const l=e.urlHandlingStrategy.merge(o.url,e.rawUrlTree),c={skipLocationChange:n.extras.skipLocationChange,replaceUrl:"eager"===e.urlUpdateStrategy||$3(n.source)};e.scheduleNavigation(l,Ry,null,c,{resolve:n.resolve,reject:n.reject,promise:n.promise})}else n.resolve(!1)}else{e.restoreHistory(n,!0);const a=new cI(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 go}))}))}cancelNavigationTransition(e,n,r){const s=new mM(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=ke({token:i,factory:i.\u0275fac,providedIn:"root"}),i})();function $3(i){return i!==Ry}let G3=(()=>{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===_n);return n}getResolvedTitleForRoute(e){return e.data[Sy]}}return i.\u0275fac=function(e){return new(e||i)},i.\u0275prov=ke({token:i,factory:function(){return Lt(GX)},providedIn:"root"}),i})(),GX=(()=>{class i extends G3{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)(ee(FB))},i.\u0275prov=ke({token:i,factory:i.\u0275fac,providedIn:"root"}),i})(),WX=(()=>{class i{}return i.\u0275fac=function(e){return new(e||i)},i.\u0275prov=ke({token:i,factory:function(){return Lt(YX)},providedIn:"root"}),i})();class jX{shouldDetach(t){return!1}store(t,e){}shouldAttach(t){return!1}retrieve(t){return null}shouldReuseRoute(t,e){return t.routeConfig===e.routeConfig}}let YX=(()=>{class i extends jX{}return i.\u0275fac=function(){let t;return function(n){return(t||(t=si(i)))(n||i)}}(),i.\u0275prov=ke({token:i,factory:i.\u0275fac,providedIn:"root"}),i})();const AM=new me("",{providedIn:"root",factory:()=>({})});let XX=(()=>{class i{}return i.\u0275fac=function(e){return new(e||i)},i.\u0275prov=ke({token:i,factory:function(){return Lt(KX)},providedIn:"root"}),i})(),KX=(()=>{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=ke({token:i,factory:i.\u0275fac,providedIn:"root"}),i})();function ZX(i){throw i}function QX(i,t,e){return t.parse("/")}const JX={paths:"exact",fragment:"ignored",matrixParams:"ignored",queryParams:"exact"},eK={paths:"subset",fragment:"ignored",matrixParams:"ignored",queryParams:"subset"};let Xo=(()=>{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=Lt(O6),this.isNgZoneEnabled=!1,this.options=Lt(AM,{optional:!0})||{},this.errorHandler=this.options.errorHandler||ZX,this.malformedUriErrorHandler=this.options.malformedUriErrorHandler||QX,this.navigated=!1,this.lastSuccessfulId=-1,this.urlHandlingStrategy=Lt(XX),this.routeReuseStrategy=Lt(WX),this.urlCreationStrategy=Lt(Uq),this.titleStrategy=Lt(G3),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=qB(Lt(wm,{optional:!0})??[]),this.navigationTransitions=Lt(EM),this.urlSerializer=Lt(Ay),this.location=Lt(my),this.isNgZoneEnabled=Lt(gt)instanceof gt&>.isInAngularZone(),this.resetConfig(this.config),this.currentUrlTree=new au,this.rawUrlTree=this.currentUrlTree,this.browserUrlTree=this.currentUrlTree,this.routerState=g3(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),Ry,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(vI),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 d=null;switch(a){case"merge":d={...this.currentUrlTree.queryParams,...s};break;case"preserve":d=this.currentUrlTree.queryParams;break;default:d=s||null}return null!==d&&(d=this.removeEmptyProps(d)),this.urlCreationStrategy.createUrlTree(r,this.routerState,this.currentUrlTree,e,d,c??null)}navigateByUrl(e,n={skipLocationChange:!1}){const r=kh(e)?e:this.parseUrl(e),s=this.urlHandlingStrategy.merge(r,this.rawUrlTree);return this.scheduleNavigation(s,Ry,null,n)}navigate(e,n={skipLocationChange:!1}){return function tK(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,d;return o?(a=o.resolve,l=o.reject,c=o.promise):c=new Promise((h,p)=>{a=h,l=p}),d="computed"===this.canceledNavigationResolution?r&&r.\u0275routerPageId?r.\u0275routerPageId:(this.browserPageId??0)+1:0,this.navigationTransitions.handleNavigationRequest({targetPageId:d,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=ke({token:i,factory:i.\u0275fac,providedIn:"root"}),i})();class W3{}let rK=(()=>{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(gn(e=>e instanceof Ph),ru(()=>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=Ow(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 Ni(r).pipe(bd())}preloadConfig(e,n){return this.preloadingStrategy.preload(n,()=>{let r;r=n.loadChildren&&void 0===n.canLoad?this.loader.loadChildren(e,n):mt(null);const s=r.pipe(ir(o=>null===o?mt(void 0):(n._loadedRoutes=o.routes,n._loadedInjector=o.injector,this.processRoutes(o.injector??e,o.routes))));return n.loadComponent&&!n._loadedComponent?Ni([s,this.loader.loadComponent(n)]).pipe(bd()):s})}}return i.\u0275fac=function(e){return new(e||i)(ee(Xo),ee(pN),ee(to),ee(W3),ee(MI))},i.\u0275prov=ke({token:i,factory:i.\u0275fac,providedIn:"root"}),i})();const EI=new me("");let j3=(()=>{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 lI?(this.store[this.lastId]=this.viewportScroller.getScrollPosition(),this.lastSource=e.navigationTrigger,this.restoredId=e.restoredState?e.restoredState.navigationId:0):e instanceof Ph&&(this.lastId=e.id,this.scheduleScrollEvent(e,this.urlSerializer.parse(e.urlAfterRedirects).fragment))})}consumeScrollEvents(){return this.transitions.events.subscribe(e=>{e instanceof f3&&(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 f3(e,"popstate"===this.lastSource?this.store[this.restoredId]:null,n))})},0)})}ngOnDestroy(){this.routerEventsSubscription?.unsubscribe(),this.scrollEventsSubscription?.unsubscribe()}}return i.\u0275fac=function(e){Mo()},i.\u0275prov=ke({token:i,factory:i.\u0275fac}),i})();var Ko=(()=>((Ko=Ko||{})[Ko.COMPLETE=0]="COMPLETE",Ko[Ko.FAILED=1]="FAILED",Ko[Ko.REDIRECTING=2]="REDIRECTING",Ko))();const Mm=!1;function lu(i,t){return{\u0275kind:i,\u0275providers:t}}const AI=new me("",{providedIn:"root",factory:()=>!1});function q3(){const i=Lt(Gi);return t=>{const e=i.get(cm);if(t!==e.components[0])return;const n=i.get(Xo),r=i.get(X3);1===i.get(DI)&&n.initialNavigation(),i.get(K3,null,Ft.Optional)?.setUpPreloading(),i.get(EI,null,Ft.Optional)?.init(),n.resetRootComponentType(e.componentTypes[0]),r.closed||(r.next(),r.complete(),r.unsubscribe())}}const X3=new me(Mm?"bootstrap done indicator":"",{factory:()=>new Te}),DI=new me(Mm?"initial navigation":"",{providedIn:"root",factory:()=>1});function cK(){let i=[];return i=Mm?[{provide:Np,multi:!0,useFactory:()=>{const t=Lt(Xo);return()=>t.events.subscribe(e=>{console.group?.(`Router Event: ${e.constructor.name}`),console.log(function Fq(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?.()})}}]:[],lu(1,i)}const K3=new me(Mm?"router preloader":"");function dK(i){return lu(0,[{provide:K3,useExisting:rK},{provide:W3,useExisting:i}])}const Uy=!1,Z3=new me(Uy?"router duplicate forRoot guard":"ROUTER_FORROOT_GUARD"),uK=[my,{provide:Ay,useClass:nI},Xo,Py,{provide:ym,useFactory:function Y3(i){return i.routerState.root},deps:[Xo]},MI,Uy?{provide:AI,useValue:!0}:[]];function hK(){return new wN("Router",Xo)}let Q3=(()=>{class i{constructor(e){}static forRoot(e,n){return{ngModule:i,providers:[uK,Uy&&n?.enableTracing?cK().\u0275providers:[],{provide:wm,multi:!0,useValue:e},{provide:Z3,useFactory:gK,deps:[[Xo,new Ss,new xa]]},{provide:AM,useValue:n||{}},n?.useHash?{provide:Ih,useClass:w9}:{provide:Ih,useClass:WN},{provide:EI,useFactory:()=>{const i=Lt(NY),t=Lt(gt),e=Lt(AM),n=Lt(EM),r=Lt(Ay);return e.scrollOffset&&i.setOffset(e.scrollOffset),new j3(r,n,i,t,e)}},n?.preloadingStrategy?dK(n.preloadingStrategy).\u0275providers:[],{provide:wN,multi:!0,useFactory:hK},n?.initialNavigation?_K(n):[],[{provide:J3,useFactory:q3},{provide:xN,multi:!0,useExisting:J3}]]}}static forChild(e){return{ngModule:i,providers:[{provide:wm,multi:!0,useValue:e}]}}}return i.\u0275fac=function(e){return new(e||i)(ee(Z3,8))},i.\u0275mod=en({type:i}),i.\u0275inj=Wt({imports:[gI]}),i})();function gK(i){if(Uy&&i)throw new pe(4007,"The Router was provided more than once. This can happen if 'forRoot' is used outside of the root injector. Lazy loaded modules should use RouterModule.forChild() instead.");return"guarded"}function _K(i){return["disabled"===i.initialNavigation?lu(3,[{provide:Bw,multi:!0,useFactory:()=>{const t=Lt(Xo);return()=>{t.setUpLocationChangeListener()}}},{provide:DI,useValue:2}]).\u0275providers:[],"enabledBlocking"===i.initialNavigation?lu(2,[{provide:DI,useValue:0},{provide:Bw,multi:!0,deps:[Gi],useFactory:t=>{const e=t.get(b9,Promise.resolve());return()=>e.then(()=>new Promise(n=>{const r=t.get(Xo),s=t.get(X3);(function sK(i,t){i.events.pipe(gn(e=>e instanceof Ph||e instanceof mM||e instanceof cI||e instanceof gM),tt(e=>e instanceof Ph||e instanceof gM?Ko.COMPLETE:e instanceof mM&&(0===e.code||1===e.code)?Ko.REDIRECTING:Ko.FAILED),gn(e=>e!==Ko.REDIRECTING),Oi(1)).subscribe(()=>{t()})})(r,()=>{n(!0)}),t.get(EM).afterPreactivation=()=>(n(!0),s.closed?mt(void 0):s),r.initialNavigation()}))}}]).\u0275providers:[]]}const J3=new me(Uy?"Router Initializer":""),yK=[];let bK=(()=>{class i{}return i.\u0275fac=function(e){return new(e||i)},i.\u0275mod=en({type:i}),i.\u0275inj=Wt({imports:[Q3.forRoot(yK),Q3]}),i})();function eU(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 st(i){return function(){var t=this,e=arguments;return new Promise(function(n,r){var s=i.apply(t,e);function o(l){eU(s,n,r,o,a,"next",l)}function a(l){eU(s,n,r,o,a,"throw",l)}o(void 0)})}}function tn(i){return null!=i&&"false"!=`${i}`}function Ps(i,t=0){return function xK(i){return!isNaN(parseFloat(i))&&!isNaN(Number(i))}(i)?Number(i):t}function DM(i){return Array.isArray(i)?i:[i]}function _r(i){return null==i?"":"string"==typeof i?i:`${i}px`}function qc(i){return i instanceof vt?i.nativeElement:i}const wK=["addListener","removeListener"],MK=["addEventListener","removeEventListener"],CK=["on","off"];function Do(i,t,e,n){if(dn(e)&&(n=e,e=void 0),n)return Do(i,t,e).pipe(QT(n));const[r,s]=function AK(i){return dn(i.addEventListener)&&dn(i.removeEventListener)}(i)?MK.map(o=>a=>i[o](t,a,e)):function SK(i){return dn(i.addListener)&&dn(i.removeListener)}(i)?wK.map(tU(i,t)):function EK(i){return dn(i.on)&&dn(i.off)}(i)?CK.map(tU(i,t)):[];if(!r&&t_(i))return ir(o=>Do(o,t,e))(Mr(i));if(!r)throw new TypeError("Invalid event target");return new Tn(o=>{const a=(...l)=>o.next(1s(a)})}function tU(i,t){return e=>n=>i[e](t,n)}class DK extends Qt{constructor(t,e){super()}schedule(t,e=0){return this}}const TM={setInterval(i,t,...e){const{delegate:n}=TM;return n?.setInterval?n.setInterval(i,t,...e):setInterval(i,t,...e)},clearInterval(i){const{delegate:t}=TM;return(t?.clearInterval||clearInterval)(i)},delegate:void 0};class TI extends DK{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 TM.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&&TM.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,Kr(n,this),null!=t&&(this.id=this.recycleAsyncId(e,t,null)),this.delay=null,super.unsubscribe()}}}const Vy={schedule(i){let t=requestAnimationFrame,e=cancelAnimationFrame;const{delegate:n}=Vy;n&&(t=n.requestAnimationFrame,e=n.cancelAnimationFrame);const r=t(s=>{e=void 0,i(s)});return new Qt(()=>e?.(r))},requestAnimationFrame(...i){const{delegate:t}=Vy;return(t?.requestAnimationFrame||requestAnimationFrame)(...i)},cancelAnimationFrame(...i){const{delegate:t}=Vy;return(t?.cancelAnimationFrame||cancelAnimationFrame)(...i)},delegate:void 0},nU={now:()=>(nU.delegate||Date).now(),delegate:void 0};class zy{constructor(t,e=zy.now){this.schedulerActionCtor=t,this.now=e}schedule(t,e=0,n){return new this.schedulerActionCtor(this,t).schedule(n,e)}}zy.now=nU.now;class II extends zy{constructor(t,e=zy.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 RK=new class IK extends II{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 TK extends TI{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=Vy.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&&(Vy.cancelAnimationFrame(e),t._scheduled=void 0)}});let RI,kK=1;const IM={};function iU(i){return i in IM&&(delete IM[i],!0)}const PK={setImmediate(i){const t=kK++;return IM[t]=!0,RI||(RI=Promise.resolve()),RI.then(()=>iU(t)&&i()),t},clearImmediate(i){iU(i)}},{setImmediate:OK,clearImmediate:FK}=PK,RM={setImmediate(...i){const{delegate:t}=RM;return(t?.setImmediate||OK)(...i)},clearImmediate(i){const{delegate:t}=RM;return(t?.clearImmediate||FK)(i)},delegate:void 0},kI=new class NK extends II{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 LK extends TI{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=RM.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&&(RM.clearImmediate(e),t._scheduled===e&&(t._scheduled=void 0))}}),Hy=new II(TI),BK=Hy;function PI(i=0,t,e=BK){let n=-1;return null!=t&&(Hu(t)?e=t:n=t),new Tn(r=>{let s=function VK(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 $y(i,t=Hy){return function UK(i){return ni((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(qn(e,c=>{n=!0,r=c,s||Mr(i(c)).subscribe(s=qn(e,a,l))},()=>{o=!0,(!n||!s||s.closed)&&e.complete()}))})}(()=>PI(i,t))}function Ue(i){return ni((t,e)=>{Mr(i).subscribe(qn(e,()=>e.complete(),ms)),!e.closed&&t.subscribe(e)})}let OI;try{OI=typeof Intl<"u"&&Intl.v8BreakIterator}catch{OI=!1}let Cm,zi=(()=>{class i{constructor(e){this._platformId=e,this.isBrowser=this._platformId?function LY(i){return i===uB}(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&&!OI)&&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)(ee(hT))},i.\u0275prov=ke({token:i,factory:i.\u0275fac,providedIn:"root"}),i})();const rU=["color","button","checkbox","date","datetime-local","email","file","hidden","image","month","number","password","radio","range","reset","search","submit","tel","text","time","url","week"];function sU(){if(Cm)return Cm;if("object"!=typeof document||!document)return Cm=new Set(rU),Cm;let i=document.createElement("input");return Cm=new Set(rU.filter(t=>(i.setAttribute("type",t),i.type===t))),Cm}let Gy,kM,Fh,FI;function Oh(i){return function zK(){if(null==Gy&&typeof window<"u")try{window.addEventListener("test",null,Object.defineProperty({},"passive",{get:()=>Gy=!0}))}finally{Gy=Gy||!1}return Gy}()?i:!!i.capture}function oU(){if(null==Fh){if("object"!=typeof document||!document||"function"!=typeof Element||!Element)return Fh=!1,Fh;if("scrollBehavior"in document.documentElement.style)Fh=!0;else{const i=Element.prototype.scrollTo;Fh=!!i&&!/\{\s*\[native code\]\s*\}/.test(i.toString())}}return Fh}function Wy(){if("object"!=typeof document||!document)return 0;if(null==kM){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),kM=0,0===i.scrollLeft&&(i.scrollLeft=1,kM=0===i.scrollLeft?1:2),i.remove()}return kM}function PM(){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 cu(i){return i.composedPath?i.composedPath()[0]:i.target}function LI(){return typeof __karma__<"u"&&!!__karma__||typeof jasmine<"u"&&!!jasmine||typeof jest<"u"&&!!jest||typeof Mocha<"u"&&!!Mocha}const GK=new me("cdk-dir-doc",{providedIn:"root",factory:function WK(){return Lt(qt)}}),jK=/^(ar|ckb|dv|he|iw|fa|nqo|ps|sd|ug|ur|yi|.*[-_](Adlm|Arab|Hebr|Nkoo|Rohg|Thaa))(?!.*[-_](Latn|Cyrl)($|-|_))($|-|_)/i;let Ia=(()=>{class i{constructor(e){this.value="ltr",this.change=new $e,e&&(this.value=function YK(i){const t=i?.toLowerCase()||"";return"auto"===t&&typeof navigator<"u"&&navigator?.language?jK.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)(ee(GK,8))},i.\u0275prov=ke({token:i,factory:i.\u0275fac,providedIn:"root"}),i})(),jy=(()=>{class i{}return i.\u0275fac=function(e){return new(e||i)},i.\u0275mod=en({type:i}),i.\u0275inj=Wt({}),i})();const qK=["contentWrapper"],XK=["*"],KK=new me("VIRTUAL_SCROLL_STRATEGY");let Yy=(()=>{class i{constructor(e,n,r){this._ngZone=e,this._platform=n,this._scrolled=new Te,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 Tn(n=>{this._globalSubscription||this._addGlobalListener();const r=e>0?this._scrolled.pipe($y(e)).subscribe(n):this._scrolled.subscribe(n);return this._scrolledCount++,()=>{r.unsubscribe(),this._scrolledCount--,this._scrolledCount||this._removeGlobalListener()}}):mt()}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(gn(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=qc(n),s=e.getElementRef().nativeElement;do{if(r==s)return!0}while(r=r.parentElement);return!1}_addGlobalListener(){this._globalSubscription=this._ngZone.runOutsideAngular(()=>Do(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)(ee(gt),ee(zi),ee(qt,8))},i.\u0275prov=ke({token:i,factory:i.\u0275fac,providedIn:"root"}),i})(),aU=(()=>{class i{constructor(e,n,r,s){this.elementRef=e,this.scrollDispatcher=n,this.ngZone=r,this.dir=s,this._destroyed=new Te,this._elementScrolled=new Tn(o=>this.ngZone.runOutsideAngular(()=>Do(this.elementRef.nativeElement,"scroll").pipe(Ue(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!=Wy()?(null!=e.left&&(e.right=n.scrollWidth-n.clientWidth-e.left),2==Wy()?e.left=e.right:1==Wy()&&(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;oU()?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==Wy()?e==n?s.scrollWidth-s.clientWidth-s.scrollLeft:s.scrollLeft:o&&1==Wy()?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)(E(vt),E(Yy),E(gt),E(Ia,8))},i.\u0275dir=ve({type:i,selectors:[["","cdk-scrollable",""],["","cdkScrollable",""]],standalone:!0}),i})(),OM=(()=>{class i{constructor(e,n,r){this._platform=e,this._change=new Te,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($y(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)(ee(zi),ee(gt),ee(qt,8))},i.\u0275prov=ke({token:i,factory:i.\u0275fac,providedIn:"root"}),i})();const lU=new me("VIRTUAL_SCROLLABLE");let JK=(()=>{class i extends aU{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)(E(vt),E(Yy),E(gt),E(Ia,8))},i.\u0275dir=ve({type:i,features:[dt]}),i})();const tZ=typeof requestAnimationFrame<"u"?RK:kI;let nZ=(()=>{class i extends JK{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=tn(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=Lt(zi),this._detachedSubject=new Te,this._renderedRangeSubject=new Te,this._orientation="vertical",this._appendOnly=!1,this.scrolledIndexChange=new Tn(d=>this._scrollStrategy.scrolledIndexChange.subscribe(h=>Promise.resolve().then(()=>this.ngZone.run(()=>d.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=Qt.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(Ao(null),$y(0,tZ)).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(Ue(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 eZ(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)(E(vt),E(Qn),E(gt),E(KK,8),E(Ia,8),E(Yy),E(OM),E(lU,8))},i.\u0275cmp=ot({type:i,selectors:[["cdk-virtual-scroll-viewport"]],viewQuery:function(e,n){if(1&e&&$n(qK,7),2&e){let r;At(r=Dt())&&(n._contentWrapper=r.first)}},hostAttrs:[1,"cdk-virtual-scroll-viewport"],hostVars:4,hostBindings:function(e,n){2&e&&ln("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:aU,useFactory:(t,e)=>t||e,deps:[[new Ss,new bo(lU)],i]}]),dt,KD],ngContentSelectors:XK,decls:4,vars:4,consts:[[1,"cdk-virtual-scroll-content-wrapper"],["contentWrapper",""],[1,"cdk-virtual-scroll-spacer"]],template:function(e,n){1&e&&(sr(),G(0,"div",0,1),Yt(2),j(),Ie(3,"div",2)),2&e&&(V(3),Yo("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})(),qy=(()=>{class i{}return i.\u0275fac=function(e){return new(e||i)},i.\u0275mod=en({type:i}),i.\u0275inj=Wt({}),i})(),cU=(()=>{class i{}return i.\u0275fac=function(e){return new(e||i)},i.\u0275mod=en({type:i}),i.\u0275inj=Wt({imports:[jy,qy,nZ,jy,qy]}),i})();class NI{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 Lh extends NI{constructor(t,e,n,r,s){super(),this.component=t,this.viewContainerRef=e,this.injector=n,this.componentFactoryResolver=r,this.projectableNodes=s}}class Sm extends NI{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 iZ extends NI{constructor(t){super(),this.element=t instanceof vt?t.nativeElement:t}}class FM{constructor(){this._isDisposed=!1,this.attachDomPortal=null}hasAttached(){return!!this._attachedPortal}attach(t){return t instanceof Lh?(this._attachedPortal=t,this.attachComponentPortal(t)):t instanceof Sm?(this._attachedPortal=t,this.attachTemplatePortal(t)):this.attachDomPortal&&t instanceof iZ?(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 rZ extends FM{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||Gi.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 Em=(()=>{class i extends FM{constructor(e,n,r){super(),this._componentFactoryResolver=e,this._viewContainerRef=n,this._isInitialized=!1,this.attached=new $e,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)(E($l),E(jr),E(qt))},i.\u0275dir=ve({type:i,selectors:[["","cdkPortalOutlet",""]],inputs:{portal:["cdkPortalOutlet","portal"]},outputs:{attached:"attached"},exportAs:["cdkPortalOutlet"],features:[dt]}),i})(),Nh=(()=>{class i{}return i.\u0275fac=function(e){return new(e||i)},i.\u0275mod=en({type:i}),i.\u0275inj=Wt({}),i})();function Zo(i,...t){return t.length?t.some(e=>i[e]):i.altKey||i.shiftKey||i.ctrlKey||i.metaKey}const dU=oU();class vZ{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=_r(-this._previousScrollPosition.left),t.style.top=_r(-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"),dU&&(n.scrollBehavior=r.scrollBehavior="auto"),window.scroll(this._previousScrollPosition.left,this._previousScrollPosition.top),dU&&(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 yZ{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(gn(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 uU{enable(){}disable(){}attach(){}}function UI(i,t){return t.some(e=>i.bottome.bottom||i.righte.right)}function hU(i,t){return t.some(e=>i.tope.bottom||i.lefte.right)}class bZ{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();UI(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 xZ=(()=>{class i{constructor(e,n,r,s){this._scrollDispatcher=e,this._viewportRuler=n,this._ngZone=r,this.noop=()=>new uU,this.close=o=>new yZ(this._scrollDispatcher,this._ngZone,this._viewportRuler,o),this.block=()=>new vZ(this._viewportRuler,this._document),this.reposition=o=>new bZ(this._scrollDispatcher,this._viewportRuler,this._ngZone,o),this._document=s}}return i.\u0275fac=function(e){return new(e||i)(ee(Yy),ee(OM),ee(gt),ee(qt))},i.\u0275prov=ke({token:i,factory:i.\u0275fac,providedIn:"root"}),i})();class Rm{constructor(t){if(this.scrollStrategy=new uU,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 wZ{constructor(t,e){this.connectionPair=t,this.scrollableViewProperties=e}}let fU=(()=>{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)(ee(qt))},i.\u0275prov=ke({token:i,factory:i.\u0275fac,providedIn:"root"}),i})(),MZ=(()=>{class i extends fU{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)(ee(qt),ee(gt,8))},i.\u0275prov=ke({token:i,factory:i.\u0275fac,providedIn:"root"}),i})(),CZ=(()=>{class i extends fU{constructor(e,n,r){super(e),this._platform=n,this._ngZone=r,this._cursorStyleIsSet=!1,this._pointerDownListener=s=>{this._pointerDownEventTarget=cu(s)},this._clickListener=s=>{const o=cu(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 d=l[c];if(d._outsidePointerEvents.observers.length<1||!d.hasAttached())continue;if(d.overlayElement.contains(o)||d.overlayElement.contains(a))break;const h=d._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)(ee(qt),ee(zi),ee(gt,8))},i.\u0275prov=ke({token:i,factory:i.\u0275fac,providedIn:"root"}),i})(),BM=(()=>{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||LI()){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 Te,this._outsidePointerEvents=new Te,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(Oi(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=_r(this._config.width),t.height=_r(this._config.height),t.minWidth=_r(this._config.minWidth),t.minHeight=_r(this._config.minHeight),t.maxWidth=_r(this._config.maxWidth),t.maxHeight=_r(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=DM(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(Ue(Cr(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 pU="cdk-overlay-connected-position-bounding-box",SZ=/([A-Za-z%]+)$/;class EZ{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 Te,this._resizeSubscription=Qt.EMPTY,this._offsetX=0,this._offsetY=0,this._appliedPanelClasses=[],this.positionChanges=this._positionChanges,this.setOrigin(t)}attach(t){this._validatePositions(),t.hostElement.classList.add(pU),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),d=this._getOverlayFit(c,e,n,a);if(d.isCompletelyWithinViewport)return this._isPushed=!1,void this._applyPosition(a,l);this._canFitWithFlexibleDimensions(d,c,n)?s.push({position:a,origin:l,overlayRect:e,boundingBoxRect:this._calculateBoundingBoxRect(l,a)}):(!o||o.overlayFit.visibleAreal&&(l=d,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&&Bh(this._boundingBox.style,{top:"",left:"",right:"",bottom:"",height:"",width:"",alignItems:"",justifyContent:""}),this._pane&&this._resetOverlayElementStyles(),this._overlayRef&&this._overlayRef.hostElement.classList.remove(pU),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=gU(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=mU(this._overlayRef.getConfig().minHeight),a=mU(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=gU(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 d=0,h=0;return d=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,d=t.x-this._viewportMargin;else if("start"===e.overlayX&&!r||"end"===e.overlayX&&r)h=t.x,d=n.right-t.x;else{const m=Math.min(n.right-t.x+n.left,t.x),g=this._lastBoundingBoxSize.width;d=2*m,h=t.x-m,d>g&&!this._isInitialRender&&!this._growAfterOpen&&(h=t.x-g/2)}return{top:o,left:h,bottom:a,right:p,width:d,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=_r(n.height),r.top=_r(n.top),r.bottom=_r(n.bottom),r.width=_r(n.width),r.left=_r(n.left),r.right=_r(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=_r(s)),o&&(r.maxWidth=_r(o))}this._lastBoundingBoxSize=n,Bh(this._boundingBox.style,r)}_resetBoundingBoxStyles(){Bh(this._boundingBox.style,{top:"0",left:"0",right:"0",bottom:"0",height:"",width:"",alignItems:"",justifyContent:""})}_resetOverlayElementStyles(){Bh(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 d=this._viewportRuler.getViewportScrollPosition();Bh(n,this._getExactOverlayY(e,t,d)),Bh(n,this._getExactOverlayX(e,t,d))}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=_r(o.maxHeight):s&&(n.maxHeight="")),o.maxWidth&&(r?n.maxWidth=_r(o.maxWidth):s&&(n.maxWidth="")),Bh(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=_r(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=_r(s.x),r}_getScrollVisibility(){const t=this._getOriginRect(),e=this._pane.getBoundingClientRect(),n=this._scrollables.map(r=>r.getElementRef().nativeElement.getBoundingClientRect());return{isOriginClipped:hU(t,n),isOriginOutsideView:UI(t,n),isOverlayClipped:hU(e,n),isOverlayOutsideView:UI(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&&DM(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 vt)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 Bh(i,t){for(let e in t)t.hasOwnProperty(e)&&(i[e]=t[e]);return i}function mU(i){if("number"!=typeof i&&null!=i){const[t,e]=i.split(SZ);return e&&"px"!==e?null:parseFloat(t)}return i||null}function gU(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 _U="cdk-global-overlay-wrapper";class vU{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(_U),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),d=this._xPosition,h=this._xOffset,p="rtl"===this._overlayRef.getConfig().direction;let m="",g="",b="";l?b="flex-start":"center"===d?(b="center",p?g=h:m=h):p?"left"===d||"end"===d?(b="flex-end",m=h):("right"===d||"start"===d)&&(b="flex-start",g=h):"left"===d||"start"===d?(b="flex-start",m=h):("right"===d||"end"===d)&&(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(_U),n.justifyContent=n.alignItems=t.marginTop=t.marginBottom=t.marginLeft=t.marginRight=t.position="",this._overlayRef=null,this._isDisposed=!0}}let AZ=(()=>{class i{constructor(e,n,r,s){this._viewportRuler=e,this._document=n,this._platform=r,this._overlayContainer=s}global(){return new vU}flexibleConnectedTo(e){return new EZ(e,this._viewportRuler,this._document,this._platform,this._overlayContainer)}}return i.\u0275fac=function(e){return new(e||i)(ee(OM),ee(qt),ee(zi),ee(BM))},i.\u0275prov=ke({token:i,factory:i.\u0275fac,providedIn:"root"}),i})(),DZ=0,as=(()=>{class i{constructor(e,n,r,s,o,a,l,c,d,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=d,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 Rm(e);return o.direction=o.direction||this._directionality.value,new Ky(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-"+DZ++,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(cm)),new rZ(e,this._componentFactoryResolver,this._appRef,this._injector,this._document)}}return i.\u0275fac=function(e){return new(e||i)(ee(xZ),ee(BM),ee($l),ee(AZ),ee(MZ),ee(Gi),ee(gt),ee(qt),ee(Ia),ee(my),ee(CZ),ee(kr,8))},i.\u0275prov=ke({token:i,factory:i.\u0275fac,providedIn:"root"}),i})();const TZ=[{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"}],yU=new me("cdk-connected-overlay-scroll-strategy");let VI=(()=>{class i{constructor(e){this.elementRef=e}}return i.\u0275fac=function(e){return new(e||i)(E(vt))},i.\u0275dir=ve({type:i,selectors:[["","cdk-overlay-origin",""],["","overlay-origin",""],["","cdkOverlayOrigin",""]],exportAs:["cdkOverlayOrigin"],standalone:!0}),i})(),bU=(()=>{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=tn(e)}get lockPosition(){return this._lockPosition}set lockPosition(e){this._lockPosition=tn(e)}get flexibleDimensions(){return this._flexibleDimensions}set flexibleDimensions(e){this._flexibleDimensions=tn(e)}get growAfterOpen(){return this._growAfterOpen}set growAfterOpen(e){this._growAfterOpen=tn(e)}get push(){return this._push}set push(e){this._push=tn(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=Qt.EMPTY,this._attachSubscription=Qt.EMPTY,this._detachSubscription=Qt.EMPTY,this._positionSubscription=Qt.EMPTY,this.viewportMargin=0,this.open=!1,this.disableClose=!1,this.backdropClick=new $e,this.positionChange=new $e,this.attach=new $e,this.detach=new $e,this.overlayKeydown=new $e,this.overlayOutsideClick=new $e,this._templatePortal=new Sm(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=TZ);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&&!Zo(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 Rm({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 VI?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(WB(()=>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)(E(as),E(So),E(jr),E(yU),E(Ia,8))},i.\u0275dir=ve({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:[xi]}),i})();const RZ={provide:yU,deps:[as],useFactory:function IZ(i){return()=>i.scrollStrategies.reposition()}};let km=(()=>{class i{}return i.\u0275fac=function(e){return new(e||i)},i.\u0275mod=en({type:i}),i.\u0275inj=Wt({providers:[as,RZ],imports:[jy,Nh,cU,cU]}),i})();function fl(i,t=Hy){return ni((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,d=t.now();if(d{s=c,o=t.now(),r||(r=t.schedule(l,i),n.add(r))},()=>{a(),n.complete()},void 0,()=>{s=r=null}))})}function xU(i){return gn((t,e)=>i<=e)}function Ql(i,t=$a){return i=i??kZ,ni((e,n)=>{let r,s=!0;e.subscribe(qn(n,o=>{const a=t(o);(s||!i(r,a))&&(s=!1,r=a,n.next(o))}))})}function kZ(i,t){return i===t}let wU=(()=>{class i{create(e){return typeof MutationObserver>"u"?null:new MutationObserver(e)}}return i.\u0275fac=function(e){return new(e||i)},i.\u0275prov=ke({token:i,factory:i.\u0275fac,providedIn:"root"}),i})(),PZ=(()=>{class i{constructor(e){this._mutationObserverFactory=e,this._observedElements=new Map}ngOnDestroy(){this._observedElements.forEach((e,n)=>this._cleanupObserver(n))}observe(e){const n=qc(e);return new Tn(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 Te,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)(ee(wU))},i.\u0275prov=ke({token:i,factory:i.\u0275fac,providedIn:"root"}),i})(),MU=(()=>{class i{get disabled(){return this._disabled}set disabled(e){this._disabled=tn(e),this._disabled?this._unsubscribe():this._subscribe()}get debounce(){return this._debounce}set debounce(e){this._debounce=Ps(e),this._subscribe()}constructor(e,n,r){this._contentObserver=e,this._elementRef=n,this._ngZone=r,this.event=new $e,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(fl(this.debounce)):e).subscribe(this.event)})}_unsubscribe(){this._currentSubscription?.unsubscribe()}}return i.\u0275fac=function(e){return new(e||i)(E(PZ),E(vt),E(gt))},i.\u0275dir=ve({type:i,selectors:[["","cdkObserveContent",""]],inputs:{disabled:["cdkObserveContentDisabled","disabled"],debounce:"debounce"},outputs:{event:"cdkObserveContent"},exportAs:["cdkObserveContent"]}),i})(),zI=(()=>{class i{}return i.\u0275fac=function(e){return new(e||i)},i.\u0275mod=en({type:i}),i.\u0275inj=Wt({providers:[wU]}),i})();const CU=new Set;let Pm,OZ=(()=>{class i{constructor(e){this._platform=e,this._matchMedia=this._platform.isBrowser&&window.matchMedia?window.matchMedia.bind(window):LZ}matchMedia(e){return(this._platform.WEBKIT||this._platform.BLINK)&&function FZ(i){if(!CU.has(i))try{Pm||(Pm=document.createElement("style"),Pm.setAttribute("type","text/css"),document.head.appendChild(Pm)),Pm.sheet&&(Pm.sheet.insertRule(`@media ${i} {body{ }}`,0),CU.add(i))}catch(t){console.error(t)}}(e),this._matchMedia(e)}}return i.\u0275fac=function(e){return new(e||i)(ee(zi))},i.\u0275prov=ke({token:i,factory:i.\u0275fac,providedIn:"root"}),i})();function LZ(i){return{matches:"all"===i||""===i,media:i,addListener:()=>{},removeListener:()=>{}}}let HI=(()=>{class i{constructor(e,n){this._mediaMatcher=e,this._zone=n,this._queries=new Map,this._destroySubject=new Te}ngOnDestroy(){this._destroySubject.next(),this._destroySubject.complete()}isMatched(e){return SU(DM(e)).some(r=>this._registerQuery(r).mql.matches)}observe(e){let s=Da(SU(DM(e)).map(o=>this._registerQuery(o).observable));return s=My(s.pipe(Oi(1)),s.pipe(xU(1),fl(0))),s.pipe(tt(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 Tn(o=>{const a=l=>this._zone.run(()=>o.next(l));return n.addListener(a),()=>{n.removeListener(a)}}).pipe(Ao(n),tt(({matches:o})=>({query:e,matches:o})),Ue(this._destroySubject)),mql:n};return this._queries.set(e,s),s}}return i.\u0275fac=function(e){return new(e||i)(ee(OZ),ee(gt))},i.\u0275prov=ke({token:i,factory:i.\u0275fac,providedIn:"root"}),i})();function SU(i){return i.map(t=>t.split(",")).reduce((t,e)=>t.concat(e)).map(t=>t.trim())}function UM(i,t){return(i.getAttribute(t)||"").match(/\S+/g)||[]}const AU="cdk-describedby-message",VM="cdk-describedby-host";let $I=0,VZ=(()=>{class i{constructor(e,n){this._platform=n,this._messageRegistry=new Map,this._messagesContainer=null,this._id=""+$I++,this._document=e,this._id=Lt(lm)+"-"+$I++}describe(e,n,r){if(!this._canBeDescribed(e,n))return;const s=GI(n,r);"string"!=typeof n?(DU(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=GI(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(`[${VM}="${this._id}"]`);for(let n=0;n0!=r.indexOf(AU));e.setAttribute("aria-describedby",n.join(" "))}_addMessageReference(e,n){const r=this._messageRegistry.get(n);(function BZ(i,t,e){const n=UM(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(VM,this._id),r.referenceCount++}_removeMessageReference(e,n){const r=this._messageRegistry.get(n);r.referenceCount--,function UZ(i,t,e){const r=UM(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(VM)}_isElementDescribedByMessage(e,n){const r=UM(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)(ee(qt),ee(zi))},i.\u0275prov=ke({token:i,factory:i.\u0275fac,providedIn:"root"}),i})();function GI(i,t){return"string"==typeof i?`${t||""}/${i}`:i}function DU(i,t){i.id||(i.id=`${AU}-${t}-${$I++}`)}class TU{constructor(t){this._items=t,this._activeItemIndex=-1,this._activeItem=null,this._wrap=!1,this._letterKeyStream=new Te,this._typeaheadSubscription=Qt.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 Te,this.change=new Te,t instanceof sm&&(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(Vi(e=>this._pressedLetters.push(e)),fl(t),gn(()=>this._pressedLetters.length>0),tt(()=>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 sm?this._items.toArray():this._items}}class zZ extends TU{setActiveItem(t){this.activeItem&&this.activeItem.setInactiveStyles(),super.setActiveItem(t),this.activeItem&&this.activeItem.setActiveStyles()}}class IU extends TU{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 zM=(()=>{class i{constructor(e){this._platform=e}isDisabled(e){return e.hasAttribute("disabled")}isVisible(e){return function $Z(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 HZ(i){try{return i.frameElement}catch{return null}}(function ZZ(i){return i.ownerDocument&&i.ownerDocument.defaultView||window}(e));if(n&&(-1===kU(n)||!this.isVisible(n)))return!1;let r=e.nodeName.toLowerCase(),s=kU(e);return e.hasAttribute("contenteditable")?-1!==s:!("iframe"===r||"object"===r||this._platform.WEBKIT&&this._platform.IOS&&!function XZ(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 KZ(i){return!function WZ(i){return function YZ(i){return"input"==i.nodeName.toLowerCase()}(i)&&"hidden"==i.type}(i)&&(function GZ(i){let t=i.nodeName.toLowerCase();return"input"===t||"select"===t||"button"===t||"textarea"===t}(i)||function jZ(i){return function qZ(i){return"a"==i.nodeName.toLowerCase()}(i)&&i.hasAttribute("href")}(i)||i.hasAttribute("contenteditable")||RU(i))}(e)&&!this.isDisabled(e)&&(n?.ignoreVisibility||this.isVisible(e))}}return i.\u0275fac=function(e){return new(e||i)(ee(zi))},i.\u0275prov=ke({token:i,factory:i.\u0275fac,providedIn:"root"}),i})();function RU(i){if(!i.hasAttribute("tabindex")||void 0===i.tabIndex)return!1;let t=i.getAttribute("tabindex");return!(!t||isNaN(parseInt(t,10)))}function kU(i){if(!RU(i))return null;const t=parseInt(i.getAttribute("tabindex")||"",10);return isNaN(t)?-1:t}class QZ{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(Oi(1)).subscribe(t)}}let WI=(()=>{class i{constructor(e,n,r){this._checker=e,this._ngZone=n,this._document=r}create(e,n=!1){return new QZ(e,this._checker,this._ngZone,this._document,n)}}return i.\u0275fac=function(e){return new(e||i)(ee(zM),ee(gt),ee(qt))},i.\u0275prov=ke({token:i,factory:i.\u0275fac,providedIn:"root"}),i})();function jI(i){return 0===i.buttons||0===i.offsetX&&0===i.offsetY}function YI(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 JZ=new me("cdk-input-modality-detector-options"),eQ={ignoreKeys:[18,17,224,91,16]},Om=Oh({passive:!0,capture:!0});let tQ=(()=>{class i{get mostRecentModality(){return this._modality.value}constructor(e,n,r,s){this._platform=e,this._mostRecentTarget=null,this._modality=new Qe(null),this._lastTouchMs=0,this._onKeydown=o=>{this._options?.ignoreKeys?.some(a=>a===o.keyCode)||(this._modality.next("keyboard"),this._mostRecentTarget=cu(o))},this._onMousedown=o=>{Date.now()-this._lastTouchMs<650||(this._modality.next(jI(o)?"keyboard":"mouse"),this._mostRecentTarget=cu(o))},this._onTouchstart=o=>{YI(o)?this._modality.next("keyboard"):(this._lastTouchMs=Date.now(),this._modality.next("touch"),this._mostRecentTarget=cu(o))},this._options={...eQ,...s},this.modalityDetected=this._modality.pipe(xU(1)),this.modalityChanged=this.modalityDetected.pipe(Ql()),e.isBrowser&&n.runOutsideAngular(()=>{r.addEventListener("keydown",this._onKeydown,Om),r.addEventListener("mousedown",this._onMousedown,Om),r.addEventListener("touchstart",this._onTouchstart,Om)})}ngOnDestroy(){this._modality.complete(),this._platform.isBrowser&&(document.removeEventListener("keydown",this._onKeydown,Om),document.removeEventListener("mousedown",this._onMousedown,Om),document.removeEventListener("touchstart",this._onTouchstart,Om))}}return i.\u0275fac=function(e){return new(e||i)(ee(zi),ee(gt),ee(qt),ee(JZ,8))},i.\u0275prov=ke({token:i,factory:i.\u0275fac,providedIn:"root"}),i})();const nQ=new me("liveAnnouncerElement",{providedIn:"root",factory:function iQ(){return null}}),rQ=new me("LIVE_ANNOUNCER_DEFAULT_OPTIONS");let sQ=0,qI=(()=>{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 Te,this._rootNodeFocusAndBlurListener=a=>{for(let c=cu(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=qc(e);if(!this._platform.isBrowser||1!==r.nodeType)return mt(null);const s=function $K(i){if(function HK(){if(null==FI){const i=typeof document<"u"?document.head:null;FI=!(!i||!i.createShadowRoot&&!i.attachShadow)}return FI}()){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 Te,rootNode:s};return this._elementInfo.set(r,a),this._registerGlobalListeners(a),a.subject}stopMonitoring(e){const n=qc(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=qc(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=cu(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,HM),n.addEventListener("blur",this._rootNodeFocusAndBlurListener,HM)}),this._rootNodeFocusListenerCount.set(n,r+1),1==++this._monitoredElementCount&&(this._ngZone.runOutsideAngular(()=>{this._getWindow().addEventListener("focus",this._windowFocusListener)}),this._inputModalityDetector.modalityDetected.pipe(Ue(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,HM),n.removeEventListener("blur",this._rootNodeFocusAndBlurListener,HM),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=Lt(HI).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(XI,OU,FU),this._hasCheckedHighContrastMode=!0;const n=this.getHighContrastMode();1===n?e.add(XI,OU):2===n&&e.add(XI,FU)}}}return i.\u0275fac=function(e){return new(e||i)(ee(zi),ee(qt))},i.\u0275prov=ke({token:i,factory:i.\u0275fac,providedIn:"root"}),i})(),NU=(()=>{class i{constructor(e){e._applyBodyHighContrastModeCssClasses()}}return i.\u0275fac=function(e){return new(e||i)(ee(LU))},i.\u0275mod=en({type:i}),i.\u0275inj=Wt({imports:[zI]}),i})();function aQ(i,t){}class $M{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 BU=(()=>{class i extends FM{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=d=>{this._portalOutlet.hasAttached();const h=this._portalOutlet.attachDomPortal(d);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=PM(),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=PM();return e===n||e.contains(n)}_initializeFocusTrap(){this._focusTrap=this._focusTrapFactory.create(this._elementRef.nativeElement),this._document&&(this._elementFocusedBeforeDialogWasOpened=PM())}_handleBackdropClicks(){this._overlayRef.backdropClick().subscribe(()=>{this._config.disableClose&&this._recaptureFocus()})}}return i.\u0275fac=function(e){return new(e||i)(E(vt),E(WI),E(qt,8),E($M),E(zM),E(gt),E(Ky),E(Xc))},i.\u0275cmp=ot({type:i,selectors:[["cdk-dialog-container"]],viewQuery:function(e,n){if(1&e&&$n(Em,7),2&e){let r;At(r=Dt())&&(n._portalOutlet=r.first)}},hostAttrs:["tabindex","-1",1,"cdk-dialog-container"],hostVars:6,hostBindings:function(e,n){2&e&&It("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:[dt],decls:1,vars:0,consts:[["cdkPortalOutlet",""]],template:function(e,n){1&e&&fe(0,aQ,0,0,"ng-template",0)},dependencies:[Em],styles:[".cdk-dialog-container{display:block;width:100%;height:100%;min-height:inherit;max-height:inherit}"],encapsulation:2}),i})();class KI{constructor(t,e){this.overlayRef=t,this.config=e,this.closed=new Te,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&&!Zo(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 UU=new me("DialogScrollStrategy"),lQ=new me("DialogData"),cQ=new me("DefaultDialogConfig"),uQ={provide:UU,deps:[as],useFactory:function dQ(i){return()=>i.scrollStrategies.block()}};let hQ=0,VU=(()=>{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 Te,this._afterOpenedAtThisLevel=new Te,this._ariaHiddenElements=new Map,this.afterAllClosed=Cy(()=>this.openDialogs.length?this._getAfterAllClosed():this._getAfterAllClosed().pipe(Ao(void 0))),this._scrollStrategy=a}open(e,n){(n={...this._defaultOptions||new $M,...n}).id=n.id||"cdk-dialog-"+hQ++,n.id&&this.getDialogById(n.id);const s=this._getOverlayConfig(n),o=this._overlay.create(s),a=new KI(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(){ZI(this.openDialogs,e=>e.close())}getDialogById(e){return this.openDialogs.find(n=>n.id===e)}ngOnDestroy(){ZI(this._openDialogsAtThisLevel,e=>{!1===e.config.closeOnDestroy&&this._removeOpenDialog(e,!1)}),ZI(this._openDialogsAtThisLevel,e=>e.close()),this._afterAllClosedAtThisLevel.complete(),this._afterOpenedAtThisLevel.complete(),this._openDialogsAtThisLevel=[]}_getOverlayConfig(e){const n=new Rm({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:$M,useValue:r},{provide:KI,useValue:n},{provide:Ky,useValue:e}];let a;r.container?"function"==typeof r.container?a=r.container:(a=r.container.type,o.push(...r.container.providers(r))):a=BU;const l=new Lh(a,r.viewContainerRef,Gi.create({parent:s||this._injector,providers:o}),r.componentFactoryResolver);return e.attach(l).instance}_attachDialogContent(e,n,r,s){if(e instanceof So){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 Sm(e,null,a,o))}else{const o=this._createInjector(s,n,r,this._injector),a=r.attachComponentPortal(new Lh(e,s.viewContainerRef,o,s.componentFactoryResolver));n.componentInstance=a.instance}}_createInjector(e,n,r,s){const o=e.injector||e.viewContainerRef?.injector,a=[{provide:lQ,useValue:e.data},{provide:KI,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(Ia,null,{optional:!0}))&&a.push({provide:Ia,useValue:{value:e.direction,change:mt()}}),Gi.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)(ee(as),ee(Gi),ee(cQ,8),ee(i,12),ee(BM),ee(UU))},i.\u0275prov=ke({token:i,factory:i.\u0275fac}),i})();function ZI(i,t){let e=i.length;for(;e--;)t(i[e])}let fQ=(()=>{class i{}return i.\u0275fac=function(e){return new(e||i)},i.\u0275mod=en({type:i}),i.\u0275inj=Wt({providers:[VU,uQ],imports:[km,Nh,NU,Nh]}),i})();const pQ=["text"];function mQ(i,t){if(1&i&&Ie(0,"mat-pseudo-checkbox",6),2&i){const e=re();U("state",e.selected?"checked":"unchecked")("disabled",e.disabled)}}function gQ(i,t){1&i&&Ie(0,"mat-pseudo-checkbox",7),2&i&&U("disabled",re().disabled)}function _Q(i,t){if(1&i&&(G(0,"span",8),Be(1),j()),2&i){const e=re();V(1),Ki("(",e.group.label,")")}}const vQ=[[["mat-icon"]],"*"],yQ=["mat-icon","*"],xQ=new me("mat-sanity-checks",{providedIn:"root",factory:function bQ(){return!0}});let Jn=(()=>{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!LI()&&("boolean"==typeof this._sanityChecks?this._sanityChecks:!!this._sanityChecks[e])}}return i.\u0275fac=function(e){return new(e||i)(ee(LU),ee(xQ,8),ee(qt))},i.\u0275mod=en({type:i}),i.\u0275inj=Wt({imports:[jy,jy]}),i})();function GM(i){return class extends i{get disabled(){return this._disabled}set disabled(t){this._disabled=tn(t)}constructor(...t){super(...t),this._disabled=!1}}}function Zy(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 WM(i){return class extends i{get disableRipple(){return this._disableRipple}set disableRipple(t){this._disableRipple=tn(t)}constructor(...t){super(...t),this._disableRipple=!1}}}function QI(i,t=0){return class extends i{get tabIndex(){return this.disabled?-1:this._tabIndex}set tabIndex(e){this._tabIndex=null!=e?Ps(e):this.defaultTabIndex}constructor(...e){super(...e),this._tabIndex=t,this.defaultTabIndex=t}}}function $U(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 wQ(i){return class extends i{constructor(...t){super(...t),this._isInitialized=!1,this._pendingSubscribers=[],this.initialized=new Tn(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 WU=(()=>{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=ke({token:i,factory:i.\u0275fac,providedIn:"root"}),i})();class CQ{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 jU=Oh({passive:!0,capture:!0});class SQ{constructor(){this._events=new Map,this._delegateEventHandler=t=>{const e=cu(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,jU)})}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,jU)))}}const YU={enterDuration:225,exitDuration:150},qU=Oh({passive:!0,capture:!0}),XU=["mousedown","touchstart"],KU=["mouseup","mouseleave","touchend","touchcancel"];class Fm{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=qc(n))}fadeInRipple(t,e,n={}){const r=this._containerRect=this._containerRect||this._containerElement.getBoundingClientRect(),s={...YU,...n.animation};n.centered&&(t=r.left+r.width/2,e=r.top+r.height/2);const o=n.radius||function AQ(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,d=document.createElement("div");d.classList.add("mat-ripple-element"),d.style.left=a-o+"px",d.style.top=l-o+"px",d.style.height=2*o+"px",d.style.width=2*o+"px",null!=n.color&&(d.style.backgroundColor=n.color),d.style.transitionDuration=`${c}ms`,this._containerElement.appendChild(d);const h=window.getComputedStyle(d),m=h.transitionDuration,g="none"===h.transitionProperty||"0s"===m||"0s, 0s"===m||0===r.width&&0===r.height,b=new CQ(this,d,n,g);d.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);d.addEventListener("transitionend",y),d.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={...YU,...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=qc(t);!this._platform.isBrowser||!e||e===this._triggerElement||(this._removeTriggerEvents(),this._triggerElement=e,XU.forEach(n=>{Fm._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(()=>{KU.forEach(e=>{this._triggerElement.addEventListener(e,this,qU)})}),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=jI(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&&(XU.forEach(e=>Fm._eventManager.removeHandler(e,t,this)),this._pointerUpEventsRegistered&&KU.forEach(e=>t.removeEventListener(e,this,qU)))}}Fm._eventManager=new SQ;const JI=new me("mat-ripple-global-options");let Uh=(()=>{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 Fm(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)(E(vt),E(gt),E(zi),E(JI,8),E(kr,8))},i.\u0275dir=ve({type:i,selectors:[["","mat-ripple",""],["","matRipple",""]],hostAttrs:[1,"mat-ripple"],hostVars:2,hostBindings:function(e,n){2&e&&ln("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})(),Jy=(()=>{class i{}return i.\u0275fac=function(e){return new(e||i)},i.\u0275mod=en({type:i}),i.\u0275inj=Wt({imports:[Jn,Jn]}),i})(),DQ=(()=>{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)(E(kr,8))},i.\u0275cmp=ot({type:i,selectors:[["mat-pseudo-checkbox"]],hostAttrs:[1,"mat-pseudo-checkbox"],hostVars:12,hostBindings:function(e,n){2&e&&ln("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})(),ZU=(()=>{class i{}return i.\u0275fac=function(e){return new(e||i)},i.\u0275mod=en({type:i}),i.\u0275inj=Wt({imports:[Jn]}),i})();const QU=new me("MAT_OPTION_PARENT_COMPONENT"),JU=new me("MatOptgroup");let TQ=0;class IQ{constructor(t,e=!1){this.source=t,this.isUserInput=e}}let RQ=(()=>{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=tn(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-"+TQ++,this.onSelectionChange=new $e,this._stateChanges=new Te}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)&&!Zo(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 IQ(this,e))}}return i.\u0275fac=function(e){Mo()},i.\u0275dir=ve({type:i,viewQuery:function(e,n){if(1&e&&$n(pQ,7),2&e){let r;At(r=Dt())&&(n._text=r.first)}},inputs:{value:"value",id:"id",disabled:"disabled"},outputs:{onSelectionChange:"onSelectionChange"}}),i})(),Lm=(()=>{class i extends RQ{constructor(e,n,r,s){super(e,n,r,s)}}return i.\u0275fac=function(e){return new(e||i)(E(vt),E(Qn),E(QU,8),E(JU,8))},i.\u0275cmp=ot({type:i,selectors:[["mat-option"]],hostAttrs:["role","option",1,"mat-mdc-option","mdc-list-item"],hostVars:11,hostBindings:function(e,n){1&e&&Pe("click",function(){return n._selectViaInteraction()})("keydown",function(s){return n._handleKeydown(s)}),2&e&&(ql("id",n.id),It("aria-selected",n.selected)("aria-disabled",n.disabled.toString()),ln("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:[dt],ngContentSelectors:yQ,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&&(sr(vQ),fe(0,mQ,1,2,"mat-pseudo-checkbox",0),Yt(1),G(2,"span",1,2),Yt(4,1),j(),fe(5,gQ,1,1,"mat-pseudo-checkbox",3),fe(6,_Q,2,1,"span",4),Ie(7,"div",5)),2&e&&(U("ngIf",n.multiple),V(5),U("ngIf",!n.multiple&&n.selected&&!n.hideSingleSelectionIndicator),V(1),U("ngIf",n.group&&n.group._inert),V(1),U("matRippleTrigger",n._getHostElement())("matRippleDisabled",n.disabled||n.disableRipple))},dependencies:[Uh,_i,DQ],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})(),eR=(()=>{class i{}return i.\u0275fac=function(e){return new(e||i)},i.\u0275mod=en({type:i}),i.\u0275inj=Wt({imports:[Jy,ao,Jn,ZU]}),i})();class eV{}class OQ{}const Kc="*";function Ra(i,t){return{type:7,name:i,definitions:t,options:{}}}function Yr(i,t=null){return{type:4,styles:t,timings:i}}function nV(i,t=null){return{type:2,steps:i,options:t}}function oi(i){return{type:6,styles:i,offset:null}}function Os(i,t,e){return{type:0,name:i,styles:t,options:e}}function iV(i){return{type:5,steps:i}}function Or(i,t,e=null){return{type:1,expr:i,animation:t,options:e}}function tR(i=null){return{type:9,options:i}}function nR(i,t,e=null){return{type:11,selector:i,animation:t,options:e}}function rV(i){Promise.resolve().then(i)}class eb{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(){rV(()=>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 sV{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?rV(()=>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 iR="!";function FQ(i,t){}class jM{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 rR="mdc-dialog--open",oV="mdc-dialog--opening",aV="mdc-dialog--closing";let BQ=(()=>{class i extends BU{constructor(e,n,r,s,o,a,l,c){super(e,n,r,s,o,a,l,c),this._animationStateChanged=new $e}_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)(E(vt),E(WI),E(qt,8),E(jM),E(zM),E(gt),E(Ky),E(Xc))},i.\u0275cmp=ot({type:i,selectors:[["ng-component"]],features:[dt],decls:0,vars:0,template:function(e,n){},encapsulation:2}),i})();const lV="--mat-dialog-transition-duration";function cV(i){return null==i?null:"number"==typeof i?i:i.endsWith("ms")?Ps(i.substring(0,i.length-2)):i.endsWith("s")?1e3*Ps(i.substring(0,i.length-1)):"0"===i?0:null}let UQ=(()=>{class i extends BQ{constructor(e,n,r,s,o,a,l,c,d){super(e,n,r,s,o,a,l,d),this._animationMode=c,this._animationsEnabled="NoopAnimations"!==this._animationMode,this._hostElement=this._elementRef.nativeElement,this._openAnimationDuration=this._animationsEnabled?cV(this._config.enterAnimationDuration)??150:0,this._closeAnimationDuration=this._animationsEnabled?cV(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(lV,`${this._openAnimationDuration}ms`),this._requestAnimationFrame(()=>this._hostElement.classList.add(oV,rR)),this._waitForAnimationToComplete(this._openAnimationDuration,this._finishDialogOpen)):(this._hostElement.classList.add(rR),Promise.resolve().then(()=>this._finishDialogOpen()))}_startExitAnimation(){this._animationStateChanged.emit({state:"closing",totalTime:this._closeAnimationDuration}),this._hostElement.classList.remove(rR),this._animationsEnabled?(this._hostElement.style.setProperty(lV,`${this._openAnimationDuration}ms`),this._requestAnimationFrame(()=>this._hostElement.classList.add(aV)),this._waitForAnimationToComplete(this._closeAnimationDuration,this._finishDialogClose)):Promise.resolve().then(()=>this._finishDialogClose())}_clearAnimationClasses(){this._hostElement.classList.remove(oV,aV)}_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)(E(vt),E(WI),E(qt,8),E(jM),E(zM),E(gt),E(Ky),E(kr,8),E(Xc))},i.\u0275cmp=ot({type:i,selectors:[["mat-dialog-container"]],hostAttrs:["tabindex","-1",1,"mat-mdc-dialog-container","mdc-dialog"],hostVars:8,hostBindings:function(e,n){2&e&&(ql("id",n._config.id),It("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),ln("_mat-animation-noopable",!n._animationsEnabled))},features:[dt],decls:3,vars:0,consts:[[1,"mdc-dialog__container"],[1,"mat-mdc-dialog-surface","mdc-dialog__surface"],["cdkPortalOutlet",""]],template:function(e,n){1&e&&(G(0,"div",0)(1,"div",1),fe(2,FQ,0,0,"ng-template",2),j()())},dependencies:[Em],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 tb{constructor(t,e,n){this._ref=t,this._containerInstance=n,this._afterOpened=new Te,this._beforeClosed=new Te,this._state=0,this.disableClose=e.disableClose,this.id=t.id,n._animationStateChanged.pipe(gn(r=>"opened"===r.state),Oi(1)).subscribe(()=>{this._afterOpened.next(),this._afterOpened.complete()}),n._animationStateChanged.pipe(gn(r=>"closed"===r.state),Oi(1)).subscribe(()=>{clearTimeout(this._closeFallbackTimeout),this._finishDialogClose()}),t.overlayRef.detachments().subscribe(()=>{this._beforeClosed.next(this._result),this._beforeClosed.complete(),this._finishDialogClose()}),Cr(this.backdropClick(),this.keydownEvents().pipe(gn(r=>27===r.keyCode&&!this.disableClose&&!Zo(r)))).subscribe(r=>{this.disableClose||(r.preventDefault(),dV(this,"keydown"===r.type?"keyboard":"mouse"))})}close(t){this._result=t,this._containerInstance._animationStateChanged.pipe(gn(e=>"closing"===e.state),Oi(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 dV(i,t,e){return i._closeInteractionType=t,i.close(e)}const sR=new me("MatMdcDialogData"),VQ=new me("mat-mdc-dialog-default-options"),uV=new me("mat-mdc-dialog-scroll-strategy"),HQ={provide:uV,deps:[as],useFactory:function zQ(i){return()=>i.scrollStrategies.block()}};let $Q=0,GQ=(()=>{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,d,h){this._overlay=e,this._defaultOptions=r,this._parentDialog=s,this._dialogRefConstructor=l,this._dialogContainerType=c,this._dialogDataToken=d,this._openDialogsAtThisLevel=[],this._afterAllClosedAtThisLevel=new Te,this._afterOpenedAtThisLevel=new Te,this._idPrefix="mat-dialog-",this.dialogConfigClass=jM,this.afterAllClosed=Cy(()=>this.openDialogs.length?this._getAfterAllClosed():this._getAfterAllClosed().pipe(Ao(void 0))),this._scrollStrategy=a,this._dialog=n.get(VU)}open(e,n){let r;(n={...this._defaultOptions||new jM,...n}).id=n.id||`${this._idPrefix}${$Q++}`,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:$M,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){Mo()},i.\u0275prov=ke({token:i,factory:i.\u0275fac}),i})(),Nm=(()=>{class i extends GQ{constructor(e,n,r,s,o,a,l,c){super(e,n,s,a,l,o,tb,UQ,sR,c),this._idPrefix="mat-mdc-dialog-"}}return i.\u0275fac=function(e){return new(e||i)(ee(as),ee(Gi),ee(my,8),ee(VQ,8),ee(uV),ee(i,12),ee(BM),ee(kr,8))},i.\u0275prov=ke({token:i,factory:i.\u0275fac}),i})(),WQ=0,jQ=(()=>{class i{constructor(e,n,r){this.dialogRef=e,this._elementRef=n,this._dialog=r,this.type="button"}ngOnInit(){this.dialogRef||(this.dialogRef=mV(this._elementRef,this._dialog.openDialogs))}ngOnChanges(e){const n=e._matDialogClose||e._matDialogCloseResult;n&&(this.dialogResult=n.currentValue)}_onButtonClick(e){dV(this.dialogRef,0===e.screenX&&0===e.screenY?"keyboard":"mouse",this.dialogResult)}}return i.\u0275fac=function(e){return new(e||i)(E(tb,8),E(vt),E(Nm))},i.\u0275dir=ve({type:i,selectors:[["","mat-dialog-close",""],["","matDialogClose",""]],hostVars:2,hostBindings:function(e,n){1&e&&Pe("click",function(s){return n._onButtonClick(s)}),2&e&&It("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:[xi]}),i})(),hV=(()=>{class i{constructor(e,n,r){this._dialogRef=e,this._elementRef=n,this._dialog=r,this.id="mat-mdc-dialog-title-"+WQ++}ngOnInit(){this._dialogRef||(this._dialogRef=mV(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)(E(tb,8),E(vt),E(Nm))},i.\u0275dir=ve({type:i,selectors:[["","mat-dialog-title",""],["","matDialogTitle",""]],hostAttrs:[1,"mat-mdc-dialog-title","mdc-dialog__title"],hostVars:1,hostBindings:function(e,n){2&e&&ql("id",n.id)},inputs:{id:"id"},exportAs:["matDialogTitle"]}),i})(),fV=(()=>{class i{}return i.\u0275fac=function(e){return new(e||i)},i.\u0275dir=ve({type:i,selectors:[["","mat-dialog-content",""],["mat-dialog-content"],["","matDialogContent",""]],hostAttrs:[1,"mat-mdc-dialog-content","mdc-dialog__content"]}),i})(),pV=(()=>{class i{constructor(){this.align="start"}}return i.\u0275fac=function(e){return new(e||i)},i.\u0275dir=ve({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&&ln("mat-mdc-dialog-actions-align-center","center"===n.align)("mat-mdc-dialog-actions-align-end","end"===n.align)},inputs:{align:"align"}}),i})();function mV(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 gV=(()=>{class i{}return i.\u0275fac=function(e){return new(e||i)},i.\u0275mod=en({type:i}),i.\u0275inj=Wt({providers:[Nm,HQ],imports:[fQ,km,Nh,Jn,Jn]}),i})();const YQ=["mat-button",""],vV=[[["",8,"material-icons",3,"iconPositionEnd",""],["mat-icon",3,"iconPositionEnd",""],["","matButtonIcon","",3,"iconPositionEnd",""]],"*",[["","iconPositionEnd","",8,"material-icons"],["mat-icon","iconPositionEnd",""],["","matButtonIcon","","iconPositionEnd",""]]],yV=[".material-icons:not([iconPositionEnd]), mat-icon:not([iconPositionEnd]), [matButtonIcon]:not([iconPositionEnd])","*",".material-icons[iconPositionEnd], mat-icon[iconPositionEnd], [matButtonIcon][iconPositionEnd]"],XQ=["mat-mini-fab",""],ZQ=["mat-icon-button",""],QQ=["*"],JQ=[{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"]}],eJ=Zy(GM(WM(class{constructor(i){this._elementRef=i}})));let oR=(()=>{class i extends eJ{constructor(e,n,r,s){super(e),this._platform=n,this._ngZone=r,this._animationMode=s,this._focusMonitor=Lt(Xc),this._isFab=!1;const o=e.nativeElement.classList;for(const a of JQ)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){Mo()},i.\u0275dir=ve({type:i,viewQuery:function(e,n){if(1&e&&$n(Uh,5),2&e){let r;At(r=Dt())&&(n.ripple=r.first)}},features:[dt]}),i})(),nb=(()=>{class i extends oR{constructor(e,n,r,s){super(e,n,r,s)}}return i.\u0275fac=function(e){return new(e||i)(E(vt),E(zi),E(gt),E(kr,8))},i.\u0275cmp=ot({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&&(It("disabled",n.disabled||null),ln("_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:[dt],attrs:YQ,ngContentSelectors:yV,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&&(sr(vV),Ie(0,"span",0),Yt(1),G(2,"span",1),Yt(3,1),j(),Yt(4,2),Ie(5,"span",2)(6,"span",3)(7,"span",4)),2&e&&(ln("mdc-button__ripple",!n._isFab)("mdc-fab__ripple",n._isFab),V(6),U("matRippleDisabled",n._isRippleDisabled())("matRippleTrigger",n._elementRef.nativeElement))},dependencies:[Uh],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 nJ=new me("mat-mdc-fab-default-options",{providedIn:"root",factory:bV});function bV(){return{color:"accent"}}const xV=bV();let wV=(()=>{class i extends oR{constructor(e,n,r,s,o){super(e,n,r,s),this._options=o,this._isFab=!0,this._options=this._options||xV,this.color=this.defaultColor=this._options.color||xV.color}}return i.\u0275fac=function(e){return new(e||i)(E(vt),E(zi),E(gt),E(kr,8),E(nJ,8))},i.\u0275cmp=ot({type:i,selectors:[["button","mat-mini-fab",""]],hostVars:7,hostBindings:function(e,n){2&e&&(It("disabled",n.disabled||null),ln("_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:[dt],attrs:XQ,ngContentSelectors:yV,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&&(sr(vV),Ie(0,"span",0),Yt(1),G(2,"span",1),Yt(3,1),j(),Yt(4,2),Ie(5,"span",2)(6,"span",3)(7,"span",4)),2&e&&(ln("mdc-button__ripple",!n._isFab)("mdc-fab__ripple",n._isFab),V(6),U("matRippleDisabled",n._isRippleDisabled())("matRippleTrigger",n._elementRef.nativeElement))},dependencies:[Uh],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})(),YM=(()=>{class i extends oR{constructor(e,n,r,s){super(e,n,r,s)}}return i.\u0275fac=function(e){return new(e||i)(E(vt),E(zi),E(gt),E(kr,8))},i.\u0275cmp=ot({type:i,selectors:[["button","mat-icon-button",""]],hostVars:7,hostBindings:function(e,n){2&e&&(It("disabled",n.disabled||null),ln("_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:[dt],attrs:ZQ,ngContentSelectors:QQ,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&&(sr(),Ie(0,"span",0),Yt(1),Ie(2,"span",1)(3,"span",2)(4,"span",3)),2&e&&(V(3),U("matRippleDisabled",n._isRippleDisabled())("matRippleCentered",!0)("matRippleTrigger",n._elementRef.nativeElement))},dependencies:[Uh],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})(),qM=(()=>{class i{}return i.\u0275fac=function(e){return new(e||i)},i.\u0275mod=en({type:i}),i.\u0275inj=Wt({imports:[Jn,Jy,Jn]}),i})();const iJ=["class","dialog"];let MV=(()=>{class i{constructor(e,n){this.dialogRef=e,this.data=n}}return i.\u0275fac=function(e){return new(e||i)(E(tb),E(sR))},i.\u0275cmp=ot({type:i,selectors:[["app-confirm",8,"dialog"]],attrs:iJ,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&&(G(0,"h1",0),Be(1,"Confirmation"),j(),G(2,"div",1)(3,"p"),Be(4),j()(),G(5,"div",2)(6,"button",3),Pe("click",function(){return n.dialogRef.close()}),Be(7,"Cancel"),j(),G(8,"button",4),Be(9,"Yes"),j()()),2&e&&(V(4),ui(n.data.text),V(4),U("mat-dialog-close",!0))},dependencies:[nb,jQ,hV,fV,pV]}),i})();function aR(i,t){const e="object"==typeof t;return new Promise((n,r)=>{const s=new da({next:o=>{n(o),s.unsubscribe()},error:r,complete:()=>{e?n(t.defaultValue):r(new hm)}});i.subscribe(s)})}let Jl=(()=>{class i{constructor(e){this.ngZone=e,this.openedResource$=new Qe(null),this.openedResourcePath$=new Qe(null),eel.expose(this.wrapHandler(this.openFile),"open_file"),eel.on_angular_ready(),setTimeout(st(function*(){for(;;){if(eel._websocket){eel._websocket.onclose=()=>window.close();break}yield new Promise(n=>setTimeout(n,0))}}),0)}wrapHandler(e){return(...n)=>{try{gt.assertInAngularZone(),e.bind(this)(...n)}catch{this.ngZone.run(e,this,n)}}}openFile(e,n=!1){var r=this;return st(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 st(function*(){yield eel.open_file_with_system_app(e)()})()}retrieveValue(e){return st(function*(){return yield eel.retrieve_value(e)()})()}runCustomAction(e,n,r){return st(function*(){return eel.run_custom_action(e,n,r)()})()}saveFile(e){var n=this;return st(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 st(function*(){return eel.serialize_resource(e,n)()})()}serializeResourceTmp(e,n,r={}){return st(function*(){return eel.serialize_resource_tmp(e,n,r)()})()}serializeReversible(e,n){return st(function*(){return eel.serialize_reversible(e,n)()})()}deserializeResource(e){return st(function*(){return eel.deserialize_resource(e)()})()}}return i.\u0275fac=function(e){return new(e||i)(ee(gt))},i.\u0275prov=ke({token:i,factory:i.\u0275fac,providedIn:"root"}),i})();var lR=ps(489);const CV=i=>!(!i||"object"!=typeof i),SV=(i={},t,e,n=[])=>{const r=[];if(CV(i)){const s=Object.entries(i);for(let o=0;o{class i{constructor(e){var n=this;this.eelDelegate=e,this._hasUnsavedChanges$=new Qe(!1),this.resource$=new Qe(null),this.error$=new Qe(null),this.customActionRunning$=new Qe(!1),this.changedDataBlocks={},this.dataBlockChange$=new Te,this.hideHiddenFields$=new Qe(!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=SV(r.schema,"is_recursive_ref",!0);for(const[o,a]of s){const l=o.block_class_mro;let c=r.schema,d=c.block_class_mro===l?c:void 0;for(const h of a.slice(0,a.length-1))!d&&c[h]?.block_class_mro===l&&(d=c[h]),c=c[h];c[a[a.length-1]]=d}this.resource$.next(r),this.error$.next(null)}else this.resource$.next(null),this.error$.next(null)}),this.dataBlockChange$.subscribe(function(){var r=st(function*([s,o]){n.changedDataBlocks[s]=o,n.updateUnsavedChanges();const a=yield n.eelDelegate.retrieveValue(s);n.changedDataBlocks[s]==o&&((0,lR.isNumber)(o)?Math.abs(o-a)<1e-10:(0,lR.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 st(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 st(function*(){return s.processExternalChanges(e,()=>s.eelDelegate.runCustomAction(e,n,r))})()}deserializeResource(e){var n=this;return st(function*(){return n.processExternalChanges(e,()=>n.eelDelegate.deserializeResource(e))})()}reloadResource(){var e=this;return st(function*(){const n=e.eelDelegate.openedResourcePath$.getValue();n&&e.eelDelegate.openFile(n,!0).then()})()}saveResource(){var e=this;return st(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)(ee(Jl))},i.\u0275prov=ke({token:i,factory:i.\u0275fac,providedIn:"root"}),i})();function rJ(i,t){if(1&i){const e=jn();G(0,"div",2)(1,"button",3),Pe("click",function(){return Vt(e),Et(re().action())}),Be(2),j()()}if(2&i){const e=re();V(2),Ki(" ",e.data.action," ")}}const sJ=["label"];function oJ(i,t){}const aJ=Math.pow(2,31)-1;class cR{constructor(t,e){this._overlayRef=e,this._afterDismissed=new Te,this._afterOpened=new Te,this._onAction=new Te,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,aJ))}_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 EV=new me("MatSnackBarData");class XM{constructor(){this.politeness="assertive",this.announcementMessage="",this.duration=0,this.data=null,this.horizontalPosition="center",this.verticalPosition="bottom"}}let lJ=(()=>{class i{}return i.\u0275fac=function(e){return new(e||i)},i.\u0275dir=ve({type:i,selectors:[["","matSnackBarLabel",""]],hostAttrs:[1,"mat-mdc-snack-bar-label","mdc-snackbar__label"]}),i})(),cJ=(()=>{class i{}return i.\u0275fac=function(e){return new(e||i)},i.\u0275dir=ve({type:i,selectors:[["","matSnackBarActions",""]],hostAttrs:[1,"mat-mdc-snack-bar-actions","mdc-snackbar__actions"]}),i})(),dJ=(()=>{class i{}return i.\u0275fac=function(e){return new(e||i)},i.\u0275dir=ve({type:i,selectors:[["","matSnackBarAction",""]],hostAttrs:[1,"mat-mdc-snack-bar-action","mdc-snackbar__action"]}),i})(),uJ=(()=>{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)(E(cR),E(EV))},i.\u0275cmp=ot({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&&(G(0,"div",0),Be(1),j(),fe(2,rJ,3,1,"div",1)),2&e&&(V(1),Ki(" ",n.data.message,"\n"),V(1),U("ngIf",n.hasAction))},dependencies:[_i,nb,lJ,cJ,dJ],styles:[".mat-mdc-simple-snack-bar{display:flex}"],encapsulation:2,changeDetection:0}),i})();const hJ={snackBarState:Ra("state",[Os("void, hidden",oi({transform:"scale(0.8)",opacity:0})),Os("visible",oi({transform:"scale(1)",opacity:1})),Or("* => visible",Yr("150ms cubic-bezier(0, 0, 0.2, 1)")),Or("* => void, * => hidden",Yr("75ms cubic-bezier(0.4, 0.0, 1, 1)",oi({opacity:0})))])};let fJ=0,pJ=(()=>{class i extends FM{constructor(e,n,r,s,o){super(),this._ngZone=e,this._elementRef=n,this._changeDetectorRef=r,this._platform=s,this.snackBarConfig=o,this._document=Lt(qt),this._trackedModals=new Set,this._announceDelay=150,this._destroyed=!1,this._onAnnounce=new Te,this._onExit=new Te,this._onEnter=new Te,this._animationState="void",this._liveElementId="mat-snack-bar-container-live-"+fJ++,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(Oi(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)(E(gt),E(vt),E(Qn),E(zi),E(XM))},i.\u0275dir=ve({type:i,viewQuery:function(e,n){if(1&e&&$n(Em,7),2&e){let r;At(r=Dt())&&(n._portalOutlet=r.first)}},features:[dt]}),i})(),mJ=(()=>{class i extends pJ{_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=si(i)))(n||i)}}(),i.\u0275cmp=ot({type:i,selectors:[["mat-snack-bar-container"]],viewQuery:function(e,n){if(1&e&&$n(sJ,7),2&e){let r;At(r=Dt())&&(n._label=r.first)}},hostAttrs:[1,"mdc-snackbar","mat-mdc-snack-bar-container","mdc-snackbar--open"],hostVars:1,hostBindings:function(e,n){1&e&&LD("@state.done",function(s){return n.onAnimationEnd(s)}),2&e&&Tw("@state",n._animationState)},features:[dt],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&&(G(0,"div",0)(1,"div",1,2)(3,"div",3),fe(4,oJ,0,0,"ng-template",4),j(),Ie(5,"div"),j()()),2&e&&(V(5),It("aria-live",n._live)("role",n._role)("id",n._liveElementId))},dependencies:[Em],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:[hJ.snackBarState]}}),i})(),AV=(()=>{class i{}return i.\u0275fac=function(e){return new(e||i)},i.\u0275mod=en({type:i}),i.\u0275inj=Wt({imports:[km,Nh,ao,qM,Jn,Jn]}),i})();const DV=new me("mat-snack-bar-default-options",{providedIn:"root",factory:function gJ(){return new XM}});let _J=(()=>{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=Gi.create({parent:n&&n.viewContainerRef&&n.viewContainerRef.injector||this._injector,providers:[{provide:XM,useValue:n}]}),o=new Lh(this.snackBarContainerComponent,n.viewContainerRef,s),a=e.attach(o);return a.instance.snackBarConfig=n,a.instance}_attach(e,n){const r={...new XM,...this._defaultConfig,...n},s=this._createOverlay(r),o=this._attachSnackBarContainer(s,r),a=new cR(o,s);if(e instanceof So){const l=new Sm(e,null,{$implicit:r.data,snackBarRef:a});a.instance=o.attachTemplatePortal(l)}else{const l=this._createInjector(r,a),c=new Lh(e,void 0,l),d=o.attachComponentPortal(c);a.instance=d.instance}return this._breakpointObserver.observe("(max-width: 599.98px) and (orientation: portrait)").pipe(Ue(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 Rm;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 Gi.create({parent:e&&e.viewContainerRef&&e.viewContainerRef.injector||this._injector,providers:[{provide:cR,useValue:n},{provide:EV,useValue:e.data}]})}}return i.\u0275fac=function(e){return new(e||i)(ee(as),ee(qI),ee(Gi),ee(HI),ee(i,12),ee(DV))},i.\u0275prov=ke({token:i,factory:i.\u0275fac}),i})(),TV=(()=>{class i extends _J{constructor(e,n,r,s,o,a){super(e,n,r,s,o,a),this.simpleSnackBarComponent=uJ,this.snackBarContainerComponent=mJ,this.handsetCssClass="mat-mdc-snack-bar-handset"}}return i.\u0275fac=function(e){return new(e||i)(ee(as),ee(qI),ee(Gi),ee(HI),ee(i,12),ee(DV))},i.\u0275prov=ke({token:i,factory:i.\u0275fac,providedIn:AV}),i})();const vJ=["*",[["mat-toolbar-row"]]],yJ=["*","mat-toolbar-row"],bJ=Zy(class{constructor(i){this._elementRef=i}});let xJ=(()=>{class i{}return i.\u0275fac=function(e){return new(e||i)},i.\u0275dir=ve({type:i,selectors:[["mat-toolbar-row"]],hostAttrs:[1,"mat-toolbar-row"],exportAs:["matToolbarRow"]}),i})(),wJ=(()=>{class i extends bJ{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)(E(vt),E(zi),E(qt))},i.\u0275cmp=ot({type:i,selectors:[["mat-toolbar"]],contentQueries:function(e,n,r){if(1&e&&Wi(r,xJ,5),2&e){let s;At(s=Dt())&&(n._toolbarRows=s)}},hostAttrs:[1,"mat-toolbar"],hostVars:4,hostBindings:function(e,n){2&e&&ln("mat-toolbar-multiple-rows",n._toolbarRows.length>0)("mat-toolbar-single-row",0===n._toolbarRows.length)},inputs:{color:"color"},exportAs:["matToolbar"],features:[dt],ngContentSelectors:yJ,decls:2,vars:0,template:function(e,n){1&e&&(sr(vJ),Yt(0),Yt(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})(),MJ=(()=>{class i{}return i.\u0275fac=function(e){return new(e||i)},i.\u0275mod=en({type:i}),i.\u0275inj=Wt({imports:[Jn,Jn]}),i})(),CJ=(()=>{class i{constructor(){this._vertical=!1,this._inset=!1}get vertical(){return this._vertical}set vertical(e){this._vertical=tn(e)}get inset(){return this._inset}set inset(e){this._inset=tn(e)}}return i.\u0275fac=function(e){return new(e||i)},i.\u0275cmp=ot({type:i,selectors:[["mat-divider"]],hostAttrs:["role","separator",1,"mat-divider"],hostVars:7,hostBindings:function(e,n){2&e&&(It("aria-orientation",n.vertical?"vertical":"horizontal"),ln("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})(),IV=(()=>{class i{}return i.\u0275fac=function(e){return new(e||i)},i.\u0275mod=en({type:i}),i.\u0275inj=Wt({imports:[Jn,Jn]}),i})();const SJ=["tooltip"],RV=new me("mat-tooltip-scroll-strategy"),DJ={provide:RV,deps:[as],useFactory:function AJ(i){return()=>i.scrollStrategies.reposition({scrollThrottle:20})}},IJ=new me("mat-tooltip-default-options",{providedIn:"root",factory:function TJ(){return{showDelay:0,hideDelay:0,touchendHideDelay:1500}}}),kV="tooltip-panel",PV=Oh({passive:!0});let LJ=(()=>{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=tn(e),this._detach(),this._overlayRef=null}get disabled(){return this._disabled}set disabled(e){this._disabled=tn(e),this._disabled?this.hide(0):this._setupPointerEnterEventsIfNeeded()}get showDelay(){return this._showDelay}set showDelay(e){this._showDelay=Ps(e)}get hideDelay(){return this._hideDelay}set hideDelay(e){this._hideDelay=Ps(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,d,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 Te,this._scrollStrategy=d,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(Ue(this._destroyed)).subscribe(()=>{this._overlayRef&&this._updatePosition(this._overlayRef)})}ngAfterViewInit(){this._viewInitialized=!0,this._setupPointerEnterEventsIfNeeded(),this._focusMonitor.monitor(this._elementRef).pipe(Ue(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,PV)}),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 Lh(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(Ue(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 vt)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(Ue(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}-${kV}`,scrollStrategy:this._scrollStrategy()}),this._updatePosition(this._overlayRef),this._overlayRef.detachments().pipe(Ue(this._destroyed)).subscribe(()=>this._detach()),this._overlayRef.outsidePointerEvents().pipe(Ue(this._destroyed)).subscribe(()=>this._tooltipInstance?._handleBodyInteraction()),this._overlayRef.keydownEvents().pipe(Ue(this._destroyed)).subscribe(s=>{this._isTooltipVisible()&&27===s.keyCode&&!Zo(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(Oi(1),Ue(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}-${kV}-`;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,PV)})}_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){Mo()},i.\u0275dir=ve({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})(),Fs=(()=>{class i extends LJ{constructor(e,n,r,s,o,a,l,c,d,h,p,m){super(e,n,r,s,o,a,l,c,d,h,p,m),this._tooltipComponent=BJ,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)(E(as),E(vt),E(Yy),E(jr),E(gt),E(zi),E(VZ),E(Xc),E(RV),E(Ia,8),E(IJ,8),E(qt))},i.\u0275dir=ve({type:i,selectors:[["","matTooltip",""]],hostAttrs:[1,"mat-mdc-tooltip-trigger"],exportAs:["matTooltip"],features:[dt]}),i})(),NJ=(()=>{class i{constructor(e,n){this._changeDetectorRef=e,this._closeOnInteraction=!1,this._isVisible=!1,this._onHide=new Te,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)(E(Qn),E(kr,8))},i.\u0275dir=ve({type:i}),i})(),BJ=(()=>{class i extends NJ{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)(E(Qn),E(vt),E(kr,8))},i.\u0275cmp=ot({type:i,selectors:[["mat-tooltip-component"]],viewQuery:function(e,n){if(1&e&&$n(SJ,7),2&e){let r;At(r=Dt())&&(n._tooltip=r.first)}},hostAttrs:["aria-hidden","true"],hostVars:2,hostBindings:function(e,n){1&e&&Pe("mouseleave",function(s){return n._handleMouseLeave(s)}),2&e&&Yo("zoom",n.isVisible()?1:null)},features:[dt],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&&(G(0,"div",0,1),Pe("animationend",function(s){return n._handleAnimationEnd(s)}),G(2,"div",2),Be(3),j()()),2&e&&(ln("mdc-tooltip--multiline",n._isMultiline),U("ngClass",n.tooltipClass),V(3),ui(n.message))},dependencies:[um],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})(),OV=(()=>{class i{}return i.\u0275fac=function(e){return new(e||i)},i.\u0275mod=en({type:i}),i.\u0275inj=Wt({providers:[DJ],imports:[NU,ao,km,Jn,Jn,qy]}),i})();function FV(...i){const t=x0(i),{args:e,keys:n}=UB(i),r=new Tn(s=>{const{length:o}=e;if(!o)return void s.complete();const a=new Array(o);let l=o,c=o;for(let d=0;d{h||(h=!0,c--),a[d]=p},()=>l--,void 0,()=>{(!l||!h)&&(c||s.next(n?VB(n,a):a),s.complete())}))}});return t?r.pipe(QT(t)):r}class dR{}class uu{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 uu?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 uu;return e.lazyInit=this.lazyInit&&this.lazyInit instanceof uu?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 UJ{encodeKey(t){return NV(t)}encodeValue(t){return NV(t)}decodeKey(t){return decodeURIComponent(t)}decodeValue(t){return decodeURIComponent(t)}}const zJ=/%(\d[a-f0-9])/gi,HJ={40:"@","3A":":",24:"$","2C":",","3B":";","3D":"=","3F":"?","2F":"/"};function NV(i){return encodeURIComponent(i).replace(zJ,(t,e)=>HJ[e]??t)}function KM(i){return`${i}`}class hu{constructor(t={}){if(this.updates=null,this.cloneFrom=null,this.encoder=t.encoder||new UJ,t.fromString){if(t.fromObject)throw new Error("Cannot specify both fromString and fromObject.");this.map=function VJ(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(KM):[KM(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 hu({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(KM(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(KM(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 $J{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 BV(i){return typeof ArrayBuffer<"u"&&i instanceof ArrayBuffer}function UV(i){return typeof Blob<"u"&&i instanceof Blob}function VV(i){return typeof FormData<"u"&&i instanceof FormData}class ib{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 GJ(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 uu),this.context||(this.context=new $J),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 ib(e,n,s,{params:c,headers:l,context:d,reportProgress:a,responseType:r,withCredentials:o})}}var ls=(()=>((ls=ls||{})[ls.Sent=0]="Sent",ls[ls.UploadProgress=1]="UploadProgress",ls[ls.ResponseHeader=2]="ResponseHeader",ls[ls.DownloadProgress=3]="DownloadProgress",ls[ls.Response=4]="Response",ls[ls.User=5]="User",ls))();class jJ{constructor(t,e=200,n="OK"){this.headers=t.headers||new uu,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 uR extends jJ{constructor(t={}){super(t),this.type=ls.Response,this.body=void 0!==t.body?t.body:null}clone(t={}){return new uR({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 hR(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 fR=(()=>{class i{constructor(e){this.handler=e}request(e,n,r={}){let s;if(e instanceof ib)s=e;else{let l,c;l=r.headers instanceof uu?r.headers:new uu(r.headers),r.params&&(c=r.params instanceof hu?r.params:new hu({fromObject:r.params})),s=new ib(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=mt(s).pipe(ru(l=>this.handler.handle(l)));if(e instanceof ib||"events"===r.observe)return o;const a=o.pipe(gn(l=>l instanceof uR));switch(r.observe||"body"){case"body":switch(s.responseType){case"arraybuffer":return a.pipe(tt(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(tt(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(tt(l=>{if(null!==l.body&&"string"!=typeof l.body)throw new Error("Response is not a string.");return l.body}));default:return a.pipe(tt(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 hu).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,hR(r,n))}post(e,n,r={}){return this.request("POST",e,hR(r,n))}put(e,n,r={}){return this.request("PUT",e,hR(r,n))}}return i.\u0275fac=function(e){return new(e||i)(ee(dR))},i.\u0275prov=ke({token:i,factory:i.\u0275fac}),i})();const see=["*"];let QM;function rb(i){return function oee(){if(void 0===QM&&(QM=null,typeof window<"u")){const i=window;void 0!==i.trustedTypes&&(QM=i.trustedTypes.createPolicy("angular#components",{createHTML:t=>t}))}return QM}()?.createHTML(i)||i}function qV(i){return Error(`Unable to find icon with the name "${i}"`)}function XV(i){return Error(`The URL provided to MatIconRegistry was not trusted as a resource URL via Angular's DomSanitizer. Attempted URL was "${i}".`)}function KV(i){return Error(`The literal provided to MatIconRegistry was not trusted as safe HTML by Angular's DomSanitizer. Attempted literal was "${i}".`)}class Vh{constructor(t,e,n){this.url=t,this.svgText=e,this.options=n}}let JM=(()=>{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 Vh(r,null,s))}addSvgIconResolver(e){return this._resolvers.push(e),this}addSvgIconLiteralInNamespace(e,n,r,s){const o=this._sanitizer.sanitize(Zn.HTML,r);if(!o)throw KV(r);const a=rb(o);return this._addSvgIconConfig(e,n,new Vh("",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 Vh(n,null,r))}addSvgIconSetLiteralInNamespace(e,n,r){const s=this._sanitizer.sanitize(Zn.HTML,n);if(!s)throw KV(n);const o=rb(s);return this._addSvgIconSetConfig(e,new Vh("",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(Zn.RESOURCE_URL,e);if(!n)throw XV(e);const r=this._cachedIconsByUrl.get(n);return r?mt(eC(r)):this._loadSvgIconFromConfig(new Vh(e,null)).pipe(Vi(s=>this._cachedIconsByUrl.set(n,s)),tt(s=>eC(s)))}getNamedSvgIcon(e,n=""){const r=ZV(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):fm(qV(r))}ngOnDestroy(){this._resolvers=[],this._svgIconConfigs.clear(),this._iconSetConfigs.clear(),this._cachedIconsByUrl.clear()}_getSvgFromConfig(e){return e.svgText?mt(eC(this._svgElementFromConfig(e))):this._loadSvgIconFromConfig(e).pipe(tt(n=>eC(n)))}_getSvgFromIconSetConfigs(e,n){const r=this._extractIconWithNameFromAnySet(e,n);return r?mt(r):FV(n.filter(o=>!o.svgText).map(o=>this._loadSvgIconSetFromConfig(o).pipe(jc(a=>{const c=`Loading icon set URL: ${this._sanitizer.sanitize(Zn.RESOURCE_URL,o.url)} failed: ${a.message}`;return this._errorHandler.handleError(new Error(c)),mt(null)})))).pipe(tt(()=>{const o=this._extractIconWithNameFromAnySet(e,n);if(!o)throw qV(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(Vi(n=>e.svgText=n),tt(()=>this._svgElementFromConfig(e)))}_loadSvgIconSetFromConfig(e){return e.svgText?mt(null):this._fetchIcon(e).pipe(Vi(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(rb(""));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(rb("")),r=e.attributes;for(let s=0;srb(c)),su(()=>this._inProgressUrlFetches.delete(o)),Uf());return this._inProgressUrlFetches.set(o,l),l}_addSvgIconConfig(e,n,r){return this._svgIconConfigs.set(ZV(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:""}}}),QV=["clip-path","color-profile","src","cursor","fill","filter","marker","marker-start","marker-mid","marker-end","mask","stroke"],pee=QV.map(i=>`[${i}]`).join(", "),mee=/^url\(['"]?#(.*?)['"]?\)$/;let mR=(()=>{class i extends dee{get inline(){return this._inline}set inline(e){this._inline=tn(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=Qt.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(pee),r=this._elementsWithExternalReferences=this._elementsWithExternalReferences||new Map;for(let s=0;s{const a=n[s],l=a.getAttribute(o),c=l?l.match(mee):null;if(c){let d=r.get(a);d||(d=[],r.set(a,d)),d.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(Oi(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)(E(vt),E(JM),ya("aria-hidden"),E(hee),E(ol),E(uee,8))},i.\u0275cmp=ot({type:i,selectors:[["mat-icon"]],hostAttrs:["role","img",1,"mat-icon","notranslate"],hostVars:8,hostBindings:function(e,n){2&e&&(It("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),ln("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:[dt],ngContentSelectors:see,decls:1,vars:0,template:function(e,n){1&e&&(sr(),Yt(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})(),JV=(()=>{class i{}return i.\u0275fac=function(e){return new(e||i)},i.\u0275mod=en({type:i}),i.\u0275inj=Wt({imports:[Jn,Jn]}),i})(),ez=(()=>{class i{constructor(e){this.viewContainerRef=e}}return i.\u0275fac=function(e){return new(e||i)(E(jr))},i.\u0275dir=ve({type:i,selectors:[["","dataBlockUI",""]]}),i})(),gee=(()=>{class i{constructor(){this.resource=null,this.name="",this.resourceDescription="",this.changed=new $e}}return i.\u0275fac=function(e){return new(e||i)},i.\u0275cmp=ot({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&&(G(0,"p",0),Be(1),j()),2&e&&(U("matTooltip",n.resourceDescription),V(1),Ah("",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:[Fs],changeDetection:0}),i})();function _ee(i,t){if(1&i&&(G(0,"h2",4),Be(1),j()),2&i){const e=re();U("matTooltip",e.resourceDescription),V(1),ui(e.name)}}function vee(i,t){1&i&&Ie(0,"app-block-actions",5),2&i&&U("resource",re().resource)}const yee=function(i,t,e,n){return{id:i,name:t,data:e,schema:n}};function bee(i,t){if(1&i&&Ie(0,"app-editor",7),2&i){const e=re().$implicit,n=re();U("resource",F2(3,yee,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 xee(i,t){if(1&i&&(Gr(0),fe(1,bee,1,8,"app-editor",6),ct(2,"async"),Wr()),2&i){const e=t.$implicit,n=re();V(1),U("ngIf",!(ut(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 ec=(()=>{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 $e,this.destroyed$=new Te}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(Ue(this.destroyed$),gn(([n,r])=>!!this.resource&&n.startsWith(this.resource.id)&&!n.substring(this.resource.id.length+1).includes("/"))).subscribe(function(){var n=st(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)(E(ka))},i.\u0275cmp=ot({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&&(fe(0,_ee,2,2,"h2",0),ct(1,"async"),fe(2,vee,1,1,"app-block-actions",1),G(3,"div",2),fe(4,xee,3,3,"ng-container",3),j()),2&e){let r;U("ngIf",n.name&&n.name!=(null==(r=ut(1,4,n.main.resource$))?null:r.name)),V(2),U("ngIf",!n.hideBlockActions),V(2),U("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})(),tz=(()=>{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)(E(sl),E(vt))},i.\u0275dir=ve({type:i}),i})(),zh=(()=>{class i extends tz{}return i.\u0275fac=function(){let t;return function(n){return(t||(t=si(i)))(n||i)}}(),i.\u0275dir=ve({type:i,features:[dt]}),i})();const To=new me("NgValueAccessor"),Mee={provide:To,useExisting:Gn(()=>pl),multi:!0},See=new me("CompositionEventMode");let pl=(()=>{class i extends tz{constructor(e,n,r){super(e,n),this._compositionMode=r,this._composing=!1,null==this._compositionMode&&(this._compositionMode=!function Cee(){const i=$c()?$c().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)(E(sl),E(vt),E(See,8))},i.\u0275dir=ve({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&&Pe("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([Mee]),dt]}),i})();const Eee=!1;function fu(i){return null==i||("string"==typeof i||Array.isArray(i))&&0===i.length}function iz(i){return null!=i&&"number"==typeof i.length}const qr=new me("NgValidators"),pu=new me("NgAsyncValidators"),Aee=/^(?=.{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 ml{static min(t){return rz(t)}static max(t){return sz(t)}static required(t){return function oz(i){return fu(i.value)?{required:!0}:null}(t)}static requiredTrue(t){return function az(i){return!0===i.value?null:{required:!0}}(t)}static email(t){return function lz(i){return fu(i.value)||Aee.test(i.value)?null:{email:!0}}(t)}static minLength(t){return cz(t)}static maxLength(t){return dz(t)}static pattern(t){return function uz(i){if(!i)return tC;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(fu(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 _z(t)}static composeAsync(t){return vz(t)}}function rz(i){return t=>{if(fu(t.value)||fu(i))return null;const e=parseFloat(t.value);return!isNaN(e)&&e{if(fu(t.value)||fu(i))return null;const e=parseFloat(t.value);return!isNaN(e)&&e>i?{max:{max:i,actual:t.value}}:null}}function cz(i){return t=>fu(t.value)||!iz(t.value)?null:t.value.lengthiz(t.value)&&t.value.length>i?{maxlength:{requiredLength:i,actualLength:t.value.length}}:null}function tC(i){return null}function hz(i){return null!=i}function fz(i){const t=ry(i)?Ni(i):i;if(Eee&&!FD(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 pe(-1101,e)}return t}function pz(i){let t={};return i.forEach(e=>{t=null!=e?{...t,...e}:t}),0===Object.keys(t).length?null:t}function mz(i,t){return t.map(e=>e(i))}function gz(i){return i.map(t=>function Dee(i){return!i.validate}(t)?t:e=>t.validate(e))}function _z(i){if(!i)return null;const t=i.filter(hz);return 0==t.length?null:function(e){return pz(mz(e,t))}}function gR(i){return null!=i?_z(gz(i)):null}function vz(i){if(!i)return null;const t=i.filter(hz);return 0==t.length?null:function(e){return FV(mz(e,t).map(fz)).pipe(tt(pz))}}function _R(i){return null!=i?vz(gz(i)):null}function yz(i,t){return null===i?[t]:Array.isArray(i)?[...i,t]:[i,t]}function bz(i){return i._rawValidators}function xz(i){return i._rawAsyncValidators}function vR(i){return i?Array.isArray(i)?i:[i]:[]}function nC(i,t){return Array.isArray(i)?i.includes(t):i===t}function wz(i,t){const e=vR(t);return vR(i).forEach(r=>{nC(e,r)||e.push(r)}),e}function Mz(i,t){return vR(t).filter(e=>!nC(i,e))}class Cz{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=gR(this._rawValidators)}_setAsyncValidators(t){this._rawAsyncValidators=t||[],this._composedAsyncValidatorFn=_R(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 lo extends Cz{get formDirective(){return null}get path(){return null}}class tc extends Cz{constructor(){super(...arguments),this._parent=null,this.name=null,this.valueAccessor=null}}class Sz{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 nc=(()=>{class i extends Sz{constructor(e){super(e)}}return i.\u0275fac=function(e){return new(e||i)(E(tc,2))},i.\u0275dir=ve({type:i,selectors:[["","formControlName",""],["","ngModel",""],["","formControl",""]],hostVars:14,hostBindings:function(e,n){2&e&&ln("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:[dt]}),i})(),yR=(()=>{class i extends Sz{constructor(e){super(e)}}return i.\u0275fac=function(e){return new(e||i)(E(lo,10))},i.\u0275dir=ve({type:i,selectors:[["","formGroupName",""],["","formArrayName",""],["","ngModelGroup",""],["","formGroup",""],["form",3,"ngNoForm",""],["","ngForm",""]],hostVars:16,hostBindings:function(e,n){2&e&&ln("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:[dt]}),i})();function Ez(i,t){return i?`with name: '${t}'`:`at index: ${t}`}const wR=!1,sb="VALID",rC="INVALID",Vm="PENDING",ob="DISABLED";function MR(i){return(sC(i)?i.validators:i)||null}function CR(i,t){return(sC(t)?t.asyncValidators:i)||null}function sC(i){return null!=i&&!Array.isArray(i)&&"object"==typeof i}function Az(i,t,e){const n=i.controls;if(!(t?Object.keys(n):n).length)throw new pe(1e3,wR?function kee(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 pe(1001,wR?function Pee(i,t){return`Cannot find form control ${Ez(i,t)}`}(t,e):"")}function Dz(i,t,e){i._forEachChild((n,r)=>{if(void 0===e[r])throw new pe(1002,wR?function Oee(i,t){return`Must supply a value for form control ${Ez(i,t)}`}(t,r):"")})}class oC{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===sb}get invalid(){return this.status===rC}get pending(){return this.status==Vm}get disabled(){return this.status===ob}get enabled(){return this.status!==ob}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(wz(t,this._rawValidators))}addAsyncValidators(t){this.setAsyncValidators(wz(t,this._rawAsyncValidators))}removeValidators(t){this.setValidators(Mz(t,this._rawValidators))}removeAsyncValidators(t){this.setAsyncValidators(Mz(t,this._rawAsyncValidators))}hasValidator(t){return nC(this._rawValidators,t)}hasAsyncValidator(t){return nC(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=Vm,!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=ob,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=sb,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===sb||this.status===Vm)&&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()?ob:sb}_runValidator(){return this.validator?this.validator(this):null}_runAsyncValidator(t){if(this.asyncValidator){this.status=Vm,this._hasOwnPendingAsyncValidator=!0;const e=fz(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 $e,this.statusChanges=new $e}_calculateStatus(){return this._allControlsDisabled()?ob:this.errors?rC:this._hasOwnPendingAsyncValidator||this._anyControlsHaveStatus(Vm)?Vm:this._anyControlsHaveStatus(rC)?rC:sb}_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){sC(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 Fee(i){return Array.isArray(i)?gR(i):i||null}(this._rawValidators)}_assignAsyncValidators(t){this._rawAsyncValidators=Array.isArray(t)?t.slice():t,this._composedAsyncValidatorFn=function Lee(i){return Array.isArray(i)?_R(i):i||null}(this._rawAsyncValidators)}}class zm extends oC{constructor(t,e,n){super(MR(e),CR(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={}){Dz(this,!0,t),Object.keys(t).forEach(n=>{Az(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 Tz extends zm{}const Hh=new me("CallSetDisabledState",{providedIn:"root",factory:()=>ab}),ab="always";function aC(i,t){return[...t.path,i]}function lb(i,t,e=ab){SR(i,t),t.valueAccessor.writeValue(i.value),(i.disabled||"always"===e)&&t.valueAccessor.setDisabledState?.(i.disabled),function Bee(i,t){t.valueAccessor.registerOnChange(e=>{i._pendingValue=e,i._pendingChange=!0,i._pendingDirty=!0,"change"===i.updateOn&&Iz(i,t)})}(i,t),function Vee(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 Uee(i,t){t.valueAccessor.registerOnTouched(()=>{i._pendingTouched=!0,"blur"===i.updateOn&&i._pendingChange&&Iz(i,t),"submit"!==i.updateOn&&i.markAsTouched()})}(i,t),function Nee(i,t){if(t.valueAccessor.setDisabledState){const e=n=>{t.valueAccessor.setDisabledState(n)};i.registerOnDisabledChange(e),t._registerOnDestroy(()=>{i._unregisterOnDisabledChange(e)})}}(i,t)}function lC(i,t,e=!0){const n=()=>{};t.valueAccessor&&(t.valueAccessor.registerOnChange(n),t.valueAccessor.registerOnTouched(n)),dC(i,t),i&&(t._invokeOnDestroyCallbacks(),i._registerOnCollectionChange(()=>{}))}function cC(i,t){i.forEach(e=>{e.registerOnValidatorChange&&e.registerOnValidatorChange(t)})}function SR(i,t){const e=bz(i);null!==t.validator?i.setValidators(yz(e,t.validator)):"function"==typeof e&&i.setValidators([e]);const n=xz(i);null!==t.asyncValidator?i.setAsyncValidators(yz(n,t.asyncValidator)):"function"==typeof n&&i.setAsyncValidators([n]);const r=()=>i.updateValueAndValidity();cC(t._rawValidators,r),cC(t._rawAsyncValidators,r)}function dC(i,t){let e=!1;if(null!==i){if(null!==t.validator){const r=bz(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=xz(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 cC(t._rawValidators,n),cC(t._rawAsyncValidators,n),e}function Iz(i,t){i._pendingDirty&&i.markAsDirty(),i.setValue(i._pendingValue,{emitModelToViewChange:!1}),t.viewToModelUpdate(i._pendingValue),i._pendingChange=!1}function Rz(i,t){SR(i,t)}function AR(i,t){if(!i.hasOwnProperty("model"))return!1;const e=i.model;return!!e.isFirstChange()||!Object.is(t,e.currentValue)}function kz(i,t){i._syncPendingControls(),t.forEach(e=>{const n=e.control;"submit"===n.updateOn&&n._pendingChange&&(e.viewToModelUpdate(n._pendingValue),n._pendingChange=!1)})}function DR(i,t){if(!t)return null;let e,n,r;return Array.isArray(t),t.forEach(s=>{s.constructor===pl?e=s:function $ee(i){return Object.getPrototypeOf(i.constructor)===zh}(s)?n=s:r=s}),r||n||e||null}const Wee={provide:lo,useExisting:Gn(()=>db)},cb=(()=>Promise.resolve())();let db=(()=>{class i extends lo{constructor(e,n,r){super(),this.callSetDisabledState=r,this.submitted=!1,this._directives=new Set,this.ngSubmit=new $e,this.form=new zm({},gR(e),_R(n))}ngAfterViewInit(){this._setUpdateStrategy()}get formDirective(){return this}get control(){return this.form}get path(){return[]}get controls(){return this.form.controls}addControl(e){cb.then(()=>{const n=this._findContainer(e.path);e.control=n.registerControl(e.name,e.control),lb(e.control,e,this.callSetDisabledState),e.control.updateValueAndValidity({emitEvent:!1}),this._directives.add(e)})}getControl(e){return this.form.get(e.path)}removeControl(e){cb.then(()=>{const n=this._findContainer(e.path);n&&n.removeControl(e.name),this._directives.delete(e)})}addFormGroup(e){cb.then(()=>{const n=this._findContainer(e.path),r=new zm({});Rz(r,e),n.registerControl(e.name,r),r.updateValueAndValidity({emitEvent:!1})})}removeFormGroup(e){cb.then(()=>{const n=this._findContainer(e.path);n&&n.removeControl(e.name)})}getFormGroup(e){return this.form.get(e.path)}updateModel(e,n){cb.then(()=>{this.form.get(e.path).setValue(n)})}setValue(e){this.control.setValue(e)}onSubmit(e){return this.submitted=!0,kz(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)(E(qr,10),E(pu,10),E(Hh,8))},i.\u0275dir=ve({type:i,selectors:[["form",3,"ngNoForm","",3,"formGroup",""],["ng-form"],["","ngForm",""]],hostBindings:function(e,n){1&e&&Pe("submit",function(s){return n.onSubmit(s)})("reset",function(){return n.onReset()})},inputs:{options:["ngFormOptions","options"]},outputs:{ngSubmit:"ngSubmit"},exportAs:["ngForm"],features:[An([Wee]),dt]}),i})();function Pz(i,t){const e=i.indexOf(t);e>-1&&i.splice(e,1)}function Oz(i){return"object"==typeof i&&null!==i&&2===Object.keys(i).length&&"value"in i&&"disabled"in i}const ic=class extends oC{constructor(t=null,e,n){super(MR(e),CR(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}),sC(e)&&(e.nonNullable||e.initialValueIsDefault)&&(this.defaultValue=Oz(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){Pz(this._onChange,t)}registerOnDisabledChange(t){this._onDisabledChange.push(t)}_unregisterOnDisabledChange(t){Pz(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){Oz(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}},qee={provide:tc,useExisting:Gn(()=>Zc)},Nz=(()=>Promise.resolve())();let Zc=(()=>{class i extends tc{constructor(e,n,r,s,o,a){super(),this._changeDetectorRef=o,this.callSetDisabledState=a,this.control=new ic,this._registered=!1,this.update=new $e,this._parent=e,this._setValidators(n),this._setAsyncValidators(r),this.valueAccessor=DR(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),AR(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(){lb(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){Nz.then(()=>{this.control.setValue(e,{emitViewToModelChange:!1}),this._changeDetectorRef?.markForCheck()})}_updateDisabled(e){const n=e.isDisabled.currentValue,r=0!==n&&function dm(i){return"boolean"==typeof i?i:null!=i&&"false"!==i}(n);Nz.then(()=>{r&&!this.control.disabled?this.control.disable():!r&&this.control.disabled&&this.control.enable(),this._changeDetectorRef?.markForCheck()})}_getPath(e){return this._parent?aC(e,this._parent):[e]}}return i.\u0275fac=function(e){return new(e||i)(E(lo,9),E(qr,10),E(pu,10),E(To,10),E(Qn,8),E(Hh,8))},i.\u0275dir=ve({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([qee]),dt,xi]}),i})(),TR=(()=>{class i{}return i.\u0275fac=function(e){return new(e||i)},i.\u0275dir=ve({type:i,selectors:[["form",3,"ngNoForm","",3,"ngNativeValidate",""]],hostAttrs:["novalidate",""]}),i})();const Xee={provide:To,useExisting:Gn(()=>mu),multi:!0};let mu=(()=>{class i extends zh{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=si(i)))(n||i)}}(),i.\u0275dir=ve({type:i,selectors:[["input","type","number","formControlName",""],["input","type","number","formControl",""],["input","type","number","ngModel",""]],hostBindings:function(e,n){1&e&&Pe("input",function(s){return n.onChange(s.target.value)})("blur",function(){return n.onTouched()})},features:[An([Xee]),dt]}),i})(),Bz=(()=>{class i{}return i.\u0275fac=function(e){return new(e||i)},i.\u0275mod=en({type:i}),i.\u0275inj=Wt({}),i})();const IR=new me("NgModelWithFormControlWarning"),ete={provide:lo,useExisting:Gn(()=>$h)};let $h=(()=>{class i extends lo{constructor(e,n,r){super(),this.callSetDisabledState=r,this.submitted=!1,this._onCollectionChange=()=>this._updateDomValue(),this.directives=[],this.form=null,this.ngSubmit=new $e,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&&(dC(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 lb(n,e,this.callSetDisabledState),n.updateValueAndValidity({emitEvent:!1}),this.directives.push(e),n}getControl(e){return this.form.get(e.path)}removeControl(e){lC(e.control||null,e,!1),function Gee(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,kz(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&&(lC(n||null,e),(i=>i instanceof ic)(r)&&(lb(r,e,this.callSetDisabledState),e.control=r))}),this.form._updateTreeValidity({emitEvent:!1})}_setUpFormContainer(e){const n=this.form.get(e.path);Rz(n,e),n.updateValueAndValidity({emitEvent:!1})}_cleanUpFormContainer(e){if(this.form){const n=this.form.get(e.path);n&&function zee(i,t){return dC(i,t)}(n,e)&&n.updateValueAndValidity({emitEvent:!1})}}_updateRegistrations(){this.form._registerOnCollectionChange(this._onCollectionChange),this._oldForm&&this._oldForm._registerOnCollectionChange(()=>{})}_updateValidators(){SR(this.form,this),this._oldForm&&dC(this._oldForm,this)}_checkFormPresent(){}}return i.\u0275fac=function(e){return new(e||i)(E(qr,10),E(pu,10),E(Hh,8))},i.\u0275dir=ve({type:i,selectors:[["","formGroup",""]],hostBindings:function(e,n){1&e&&Pe("submit",function(s){return n.onSubmit(s)})("reset",function(){return n.onReset()})},inputs:{form:["formGroup","form"]},outputs:{ngSubmit:"ngSubmit"},exportAs:["ngForm"],features:[An([ete]),dt,xi]}),i})();const ite={provide:tc,useExisting:Gn(()=>uC)};let uC=(()=>{class i extends tc{set isDisabled(e){}constructor(e,n,r,s,o){super(),this._ngModelWarningConfig=o,this._added=!1,this.update=new $e,this._ngModelWarningSent=!1,this._parent=e,this._setValidators(n),this._setAsyncValidators(r),this.valueAccessor=DR(0,s)}ngOnChanges(e){this._added||this._setUpControl(),AR(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 aC(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)(E(lo,13),E(qr,10),E(pu,10),E(To,10),E(IR,8))},i.\u0275dir=ve({type:i,selectors:[["","formControlName",""]],inputs:{name:["formControlName","name"],isDisabled:["disabled","isDisabled"],model:["ngModel","model"]},outputs:{update:"ngModelChange"},features:[An([ite]),dt,xi]}),i})();function Wz(i){return"number"==typeof i?i:parseInt(i,10)}function jz(i){return"number"==typeof i?i:parseFloat(i)}let Gh=(()=>{class i{constructor(){this._validator=tC}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):tC,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=ve({type:i,features:[xi]}),i})();const dte={provide:qr,useExisting:Gn(()=>gu),multi:!0};let gu=(()=>{class i extends Gh{constructor(){super(...arguments),this.inputName="max",this.normalizeInput=e=>jz(e),this.createValidator=e=>sz(e)}}return i.\u0275fac=function(){let t;return function(n){return(t||(t=si(i)))(n||i)}}(),i.\u0275dir=ve({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&&It("max",n._enabled?n.max:null)},inputs:{max:"max"},features:[An([dte]),dt]}),i})();const ute={provide:qr,useExisting:Gn(()=>_u),multi:!0};let _u=(()=>{class i extends Gh{constructor(){super(...arguments),this.inputName="min",this.normalizeInput=e=>jz(e),this.createValidator=e=>rz(e)}}return i.\u0275fac=function(){let t;return function(n){return(t||(t=si(i)))(n||i)}}(),i.\u0275dir=ve({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&&It("min",n._enabled?n.min:null)},inputs:{min:"min"},features:[An([ute]),dt]}),i})();const mte={provide:qr,useExisting:Gn(()=>LR),multi:!0};let LR=(()=>{class i extends Gh{constructor(){super(...arguments),this.inputName="minlength",this.normalizeInput=e=>Wz(e),this.createValidator=e=>cz(e)}}return i.\u0275fac=function(){let t;return function(n){return(t||(t=si(i)))(n||i)}}(),i.\u0275dir=ve({type:i,selectors:[["","minlength","","formControlName",""],["","minlength","","formControl",""],["","minlength","","ngModel",""]],hostVars:1,hostBindings:function(e,n){2&e&&It("minlength",n._enabled?n.minlength:null)},inputs:{minlength:"minlength"},features:[An([mte]),dt]}),i})();const gte={provide:qr,useExisting:Gn(()=>NR),multi:!0};let NR=(()=>{class i extends Gh{constructor(){super(...arguments),this.inputName="maxlength",this.normalizeInput=e=>Wz(e),this.createValidator=e=>dz(e)}}return i.\u0275fac=function(){let t;return function(n){return(t||(t=si(i)))(n||i)}}(),i.\u0275dir=ve({type:i,selectors:[["","maxlength","","formControlName",""],["","maxlength","","formControl",""],["","maxlength","","ngModel",""]],hostVars:1,hostBindings:function(e,n){2&e&&It("maxlength",n._enabled?n.maxlength:null)},inputs:{maxlength:"maxlength"},features:[An([gte]),dt]}),i})(),Kz=(()=>{class i{}return i.\u0275fac=function(e){return new(e||i)},i.\u0275mod=en({type:i}),i.\u0275inj=Wt({imports:[Bz]}),i})();class Zz extends oC{constructor(t,e,n){super(MR(e),CR(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={}){Dz(this,!1,t),t.forEach((n,r)=>{Az(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 Qz(i){return!!i&&(void 0!==i.asyncValidators||void 0!==i.validators||void 0!==i.updateOn)}let vte=(()=>{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 Qz(n)?s=n:null!==n&&(s.validators=n.validator,s.asyncValidators=n.asyncValidator),new zm(r,s)}record(e,n=null){const r=this._reduceControls(e);return new Tz(r,n)}control(e,n,r){let s={};return this.useNonNullable?(Qz(n)?s=n:(s.validators=n,s.asyncValidators=r),new ic(e,{...s,nonNullable:!0})):new ic(e,n,r)}array(e,n,r){const s=e.map(o=>this._createControl(o));return new Zz(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 ic||e instanceof oC?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=ke({token:i,factory:i.\u0275fac,providedIn:"root"}),i})(),Jz=(()=>{class i{static withConfig(e){return{ngModule:i,providers:[{provide:Hh,useValue:e.callSetDisabledState??ab}]}}}return i.\u0275fac=function(e){return new(e||i)},i.\u0275mod=en({type:i}),i.\u0275inj=Wt({imports:[Kz]}),i})(),eH=(()=>{class i{static withConfig(e){return{ngModule:i,providers:[{provide:IR,useValue:e.warnOnNgModelWithFormControl??"always"},{provide:Hh,useValue:e.callSetDisabledState??ab}]}}}return i.\u0275fac=function(e){return new(e||i)},i.\u0275mod=en({type:i}),i.\u0275inj=Wt({imports:[Kz]}),i})();const yte=["matFormFieldNotchedOutline",""],bte=["*"],xte=["textField"],wte=["iconPrefixContainer"],Mte=["textPrefixContainer"];function Cte(i,t){1&i&&Ie(0,"span",19)}function Ste(i,t){if(1&i){const e=jn();G(0,"label",17),Pe("cdkObserveContent",function(){return Vt(e),Et(re(2)._refreshOutlineNotchWidth())}),Yt(1,1),fe(2,Cte,1,0,"span",18),j()}if(2&i){const e=re(2);U("floating",e._shouldLabelFloat())("cdkObserveContentDisabled",!e._hasOutline())("id",e._labelId),It("for",e._control.id)("aria-owns",e._control.id),V(2),U("ngIf",!e.hideRequiredMarker&&e._control.required)}}function Ete(i,t){1&i&&fe(0,Ste,3,6,"label",16),2&i&&U("ngIf",re()._hasFloatingLabel())}function Ate(i,t){1&i&&Ie(0,"div",20)}function Dte(i,t){}function Tte(i,t){1&i&&fe(0,Dte,0,0,"ng-template",22),2&i&&(re(2),U("ngTemplateOutlet",Xi(1)))}function Ite(i,t){if(1&i&&(G(0,"div",21),fe(1,Tte,1,1,"ng-template",9),j()),2&i){const e=re();U("matFormFieldNotchedOutlineOpen",e._shouldLabelFloat())("matFormFieldNotchedOutlineLabelWidth",e._labelWidth),V(1),U("ngIf",!e._forceDisplayInfixLabel())}}function Rte(i,t){1&i&&(G(0,"div",23,24),Yt(2,2),j())}function kte(i,t){1&i&&(G(0,"div",25,26),Yt(2,3),j())}function Pte(i,t){}function Ote(i,t){1&i&&fe(0,Pte,0,0,"ng-template",22),2&i&&(re(),U("ngTemplateOutlet",Xi(1)))}function Fte(i,t){1&i&&(G(0,"div",27),Yt(1,4),j())}function Lte(i,t){1&i&&(G(0,"div",28),Yt(1,5),j())}function Nte(i,t){1&i&&Ie(0,"div",29)}function Bte(i,t){1&i&&(G(0,"div",30),Yt(1,6),j()),2&i&&U("@transitionMessages",re()._subscriptAnimationState)}function Ute(i,t){if(1&i&&(G(0,"mat-hint",34),Be(1),j()),2&i){const e=re(2);U("id",e._hintLabelId),V(1),ui(e.hintLabel)}}function Vte(i,t){if(1&i&&(G(0,"div",31),fe(1,Ute,2,2,"mat-hint",32),Yt(2,7),Ie(3,"div",33),Yt(4,8),j()),2&i){const e=re();U("@transitionMessages",e._subscriptAnimationState),V(1),U("ngIf",e.hintLabel)}}const zte=["*",[["mat-label"]],[["","matPrefix",""],["","matIconPrefix",""]],[["","matTextPrefix",""]],[["","matTextSuffix",""]],[["","matSuffix",""],["","matIconSuffix",""]],[["mat-error"],["","matError",""]],[["mat-hint",3,"align","end"]],[["mat-hint","align","end"]]],Hte=["*","mat-label","[matPrefix], [matIconPrefix]","[matTextPrefix]","[matTextSuffix]","[matSuffix], [matIconSuffix]","mat-error, [matError]","mat-hint:not([align='end'])","mat-hint[align='end']"];let Io=(()=>{class i{}return i.\u0275fac=function(e){return new(e||i)},i.\u0275dir=ve({type:i,selectors:[["mat-label"]]}),i})(),$te=0;const tH=new me("MatError");let Gte=(()=>{class i{constructor(e,n){this.id="mat-mdc-error-"+$te++,e||n.nativeElement.setAttribute("aria-live","polite")}}return i.\u0275fac=function(e){return new(e||i)(ya("aria-live"),E(vt))},i.\u0275dir=ve({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&&ql("id",n.id)},inputs:{id:"id"},features:[An([{provide:tH,useExisting:i}])]}),i})(),Wte=0,nH=(()=>{class i{constructor(){this.align="start",this.id="mat-mdc-hint-"+Wte++}}return i.\u0275fac=function(e){return new(e||i)},i.\u0275dir=ve({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&&(ql("id",n.id),It("align",null),ln("mat-mdc-form-field-hint-end","end"===n.align))},inputs:{align:"align",id:"id"}}),i})();const iH=new me("MatPrefix");let jte=(()=>{class i{constructor(){this._isText=!1}set _isTextSelector(e){this._isText=!0}}return i.\u0275fac=function(e){return new(e||i)},i.\u0275dir=ve({type:i,selectors:[["","matPrefix",""],["","matIconPrefix",""],["","matTextPrefix",""]],inputs:{_isTextSelector:["matTextPrefix","_isTextSelector"]},features:[An([{provide:iH,useExisting:i}])]}),i})();const rH=new me("MatSuffix");let Yte=(()=>{class i{constructor(){this._isText=!1}set _isTextSelector(e){this._isText=!0}}return i.\u0275fac=function(e){return new(e||i)},i.\u0275dir=ve({type:i,selectors:[["","matSuffix",""],["","matIconSuffix",""],["","matTextSuffix",""]],inputs:{_isTextSelector:["matTextSuffix","_isTextSelector"]},features:[An([{provide:rH,useExisting:i}])]}),i})(),sH=(()=>{class i{constructor(e){this._elementRef=e,this.floating=!1}getWidth(){return function qte(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)(E(vt))},i.\u0275dir=ve({type:i,selectors:[["label","matFormFieldFloatingLabel",""]],hostAttrs:[1,"mdc-floating-label","mat-mdc-floating-label"],hostVars:2,hostBindings:function(e,n){2&e&&ln("mdc-floating-label--float-above",n.floating)},inputs:{floating:"floating"}}),i})();const oH="mdc-line-ripple--active",hC="mdc-line-ripple--deactivating";let aH=(()=>{class i{constructor(e,n){this._elementRef=e,this._handleTransitionEnd=r=>{const s=this._elementRef.nativeElement.classList,o=s.contains(hC);"opacity"===r.propertyName&&o&&s.remove(oH,hC)},n.runOutsideAngular(()=>{e.nativeElement.addEventListener("transitionend",this._handleTransitionEnd)})}activate(){const e=this._elementRef.nativeElement.classList;e.remove(hC),e.add(oH)}deactivate(){this._elementRef.nativeElement.classList.add(hC)}ngOnDestroy(){this._elementRef.nativeElement.removeEventListener("transitionend",this._handleTransitionEnd)}}return i.\u0275fac=function(e){return new(e||i)(E(vt),E(gt))},i.\u0275dir=ve({type:i,selectors:[["div","matFormFieldLineRipple",""]],hostAttrs:[1,"mdc-line-ripple"]}),i})(),lH=(()=>{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)(E(vt),E(gt))},i.\u0275cmp=ot({type:i,selectors:[["div","matFormFieldNotchedOutline",""]],hostAttrs:[1,"mdc-notched-outline"],hostVars:2,hostBindings:function(e,n){2&e&&ln("mdc-notched-outline--notched",n.open)},inputs:{labelWidth:["matFormFieldNotchedOutlineLabelWidth","labelWidth"],open:["matFormFieldNotchedOutlineOpen","open"]},attrs:yte,ngContentSelectors:bte,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&&(sr(),Ie(0,"div",0),G(1,"div",1),Yt(2),j(),Ie(3,"div",2)),2&e&&(V(1),Yo("width",n._getNotchWidth()))},encapsulation:2,changeDetection:0}),i})();const Xte={transitionMessages:Ra("transitionMessages",[Os("enter",oi({opacity:1,transform:"translateY(0%)"})),Or("void => enter",[oi({opacity:0,transform:"translateY(-5px)"}),Yr("300ms cubic-bezier(0.55, 0, 0.55, 0.2)")])])};let BR=(()=>{class i{}return i.\u0275fac=function(e){return new(e||i)},i.\u0275dir=ve({type:i}),i})();const fC=new me("MatFormField"),Kte=new me("MAT_FORM_FIELD_DEFAULT_OPTIONS");let cH=0,gl=(()=>{class i{get hideRequiredMarker(){return this._hideRequiredMarker}set hideRequiredMarker(e){this._hideRequiredMarker=tn(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-"+cH++,this._hintLabelId="mat-mdc-hint-"+cH++,this._subscriptAnimationState="",this._labelWidth=0,this._destroyed=new Te,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(Ue(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(),Cr(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(Ue(this._destroyed)).subscribe(()=>{this._needsOutlineLabelOffsetUpdateOnStable&&(this._needsOutlineLabelOffsetUpdateOnStable=!1,this._updateOutlineLabelOffset())})}),this._dir.change.pipe(Ue(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)(E(vt),E(Qn),E(gt),E(Ia),E(zi),E(Kte,8),E(kr,8),E(qt))},i.\u0275cmp=ot({type:i,selectors:[["mat-form-field"]],contentQueries:function(e,n,r){if(1&e&&(Wi(r,Io,5),Wi(r,Io,7),Wi(r,BR,5),Wi(r,iH,5),Wi(r,rH,5),Wi(r,tH,5),Wi(r,nH,5)),2&e){let s;At(s=Dt())&&(n._labelChildNonStatic=s.first),At(s=Dt())&&(n._labelChildStatic=s.first),At(s=Dt())&&(n._formFieldControl=s.first),At(s=Dt())&&(n._prefixChildren=s),At(s=Dt())&&(n._suffixChildren=s),At(s=Dt())&&(n._errorChildren=s),At(s=Dt())&&(n._hintChildren=s)}},viewQuery:function(e,n){if(1&e&&($n(xte,5),$n(wte,5),$n(Mte,5),$n(sH,5),$n(lH,5),$n(aH,5)),2&e){let r;At(r=Dt())&&(n._textField=r.first),At(r=Dt())&&(n._iconPrefixContainer=r.first),At(r=Dt())&&(n._textPrefixContainer=r.first),At(r=Dt())&&(n._floatingLabel=r.first),At(r=Dt())&&(n._notchedOutline=r.first),At(r=Dt())&&(n._lineRipple=r.first)}},hostAttrs:[1,"mat-mdc-form-field"],hostVars:42,hostBindings:function(e,n){2&e&&ln("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:fC,useExisting:i}])],ngContentSelectors:Hte,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&&(sr(zte),fe(0,Ete,1,1,"ng-template",null,0,zc),G(2,"div",1,2),Pe("click",function(s){return n._control.onContainerClick&&n._control.onContainerClick(s)}),fe(4,Ate,1,0,"div",3),G(5,"div",4),fe(6,Ite,2,3,"div",5),fe(7,Rte,3,0,"div",6),fe(8,kte,3,0,"div",7),G(9,"div",8),fe(10,Ote,1,1,"ng-template",9),Yt(11),j(),fe(12,Fte,2,0,"div",10),fe(13,Lte,2,0,"div",11),j(),fe(14,Nte,1,0,"div",12),j(),G(15,"div",13),fe(16,Bte,2,1,"div",14),fe(17,Vte,5,2,"div",15),j()),2&e&&(V(2),ln("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),V(2),U("ngIf",!n._hasOutline()&&!n._control.disabled),V(2),U("ngIf",n._hasOutline()),V(1),U("ngIf",n._hasIconPrefix),V(1),U("ngIf",n._hasTextPrefix),V(2),U("ngIf",!n._hasOutline()||n._forceDisplayInfixLabel()),V(2),U("ngIf",n._hasTextSuffix),V(1),U("ngIf",n._hasIconSuffix),V(1),U("ngIf",!n._hasOutline()),V(1),ln("mat-mdc-form-field-subscript-dynamic-size","dynamic"===n.subscriptSizing),U("ngSwitch",n._getDisplayedMessages()),V(1),U("ngSwitchCase","error"),V(1),U("ngSwitchCase","hint"))},dependencies:[_i,yy,vy,UT,MU,nH,sH,lH,aH],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:[Xte.transitionMessages]},changeDetection:0}),i})(),pC=(()=>{class i{}return i.\u0275fac=function(e){return new(e||i)},i.\u0275mod=en({type:i}),i.\u0275inj=Wt({imports:[Jn,ao,zI,Jn]}),i})();const hH=Oh({passive:!0});let Jte=(()=>{class i{constructor(e,n){this._platform=e,this._ngZone=n,this._monitoredElements=new Map}monitor(e){if(!this._platform.isBrowser)return go;const n=qc(e),r=this._monitoredElements.get(n);if(r)return r.subject;const s=new Te,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,hH),n.classList.add("cdk-text-field-autofill-monitored")}),this._monitoredElements.set(n,{subject:s,unlisten:()=>{n.removeEventListener("animationstart",a,hH)}}),s}stopMonitoring(e){const n=qc(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)(ee(zi),ee(gt))},i.\u0275prov=ke({token:i,factory:i.\u0275fac,providedIn:"root"}),i})(),ene=(()=>{class i{}return i.\u0275fac=function(e){return new(e||i)},i.\u0275mod=en({type:i}),i.\u0275inj=Wt({}),i})();const UR=new me("MAT_INPUT_VALUE_ACCESSOR"),tne=["button","checkbox","file","hidden","image","radio","range","reset","submit"];let nne=0;const ine=$U(class{constructor(i,t,e,n){this._defaultErrorStateMatcher=i,this._parentForm=t,this._parentFormGroup=e,this.ngControl=n,this.stateChanges=new Te}});let rc=(()=>{class i extends ine{get disabled(){return this._disabled}set disabled(e){this._disabled=tn(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(ml.required)??!1}set required(e){this._required=tn(e)}get type(){return this._type}set type(e){this._type=e||"text",this._validateType(),!this._isTextarea&&sU().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=tn(e)}constructor(e,n,r,s,o,a,l,c,d,h){super(a,s,o,r),this._elementRef=e,this._platform=n,this._autofillMonitor=c,this._formField=h,this._uid="mat-input-"+nne++,this.focused=!1,this.stateChanges=new Te,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=>sU().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&&d.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(){tne.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)(E(vt),E(zi),E(tc,10),E(db,8),E($h,8),E(WU),E(UR,10),E(Jte),E(gt),E(fC,8))},i.\u0275dir=ve({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&&Pe("focus",function(){return n._focusChanged(!0)})("blur",function(){return n._focusChanged(!1)})("input",function(){return n._onInput()}),2&e&&(ql("id",n.id)("disabled",n.disabled)("required",n.required),It("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),ln("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:BR,useExisting:i}]),dt,xi]}),i})(),fH=(()=>{class i{}return i.\u0275fac=function(e){return new(e||i)},i.\u0275mod=en({type:i}),i.\u0275inj=Wt({imports:[Jn,pC,pC,ene,Jn]}),i})();function rne(i,t){if(1&i&&(G(0,"mat-label"),Be(1),j()),2&i){const e=re(2);V(1),ui(e.resource.name)}}function sne(i,t){if(1&i){const e=jn();G(0,"mat-form-field",1),fe(1,rne,2,1,"mat-label",2),G(2,"input",3),Pe("ngModelChange",function(r){return Vt(e),Et(re().resource.data=r)})("change",function(){return Vt(e),Et(re().changed.emit())}),j()()}if(2&i){const e=re();U("matTooltip",e.resourceDescription),V(1),U("ngIf",e.resource.name),V(1),U("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 one=(()=>{class i{constructor(){this.resource=null,this.resourceDescription="",this.disabled=!1,this.changed=new $e}}return i.\u0275fac=function(e){return new(e||i)},i.\u0275cmp=ot({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&&fe(0,sne,3,7,"mat-form-field",0),2&e&&U("ngIf",n.resource)},dependencies:[_i,pl,mu,nc,_u,gu,Zc,gl,Io,rc,Fs],changeDetection:0}),i})();function ane(i,t){if(1&i&&(G(0,"mat-label"),Be(1),j()),2&i){const e=re(2);V(1),ui(e.resource.name)}}function lne(i,t){if(1&i){const e=jn();G(0,"mat-form-field",1),fe(1,ane,2,1,"mat-label",2),G(2,"input",3),Pe("ngModelChange",function(r){return Vt(e),Et(re().resource.data=r)})("change",function(){return Vt(e),Et(re().changed.emit())}),j()()}if(2&i){const e=re();U("matTooltip",e.resourceDescription),V(1),U("ngIf",e.resource.name),V(1),U("disabled",e.disabled||void 0!==e.resource.schema.required_value)("maxlength",e.maxLength)("minlength",e.minLength)("ngModel",e.resource.data)}}let pH=(()=>{class i{constructor(){this._resource=null,this.resourceDescription="",this.disabled=!1,this.changed=new $e,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=ot({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&&fe(0,lne,3,6,"mat-form-field",0),2&e&&U("ngIf",n.resource)},dependencies:[_i,pl,nc,LR,NR,Zc,gl,Io,rc,Fs],changeDetection:0}),i})();const sc=(i,t)=>i+(i.includes("__")?"/":"__")+t,Wh=function(){return[]};function cne(i,t){if(1&i&&(G(0,"mat-panel-description"),Be(1," Click to view items ("),G(2,"b"),Be(3),j(),Be(4,") "),j()),2&i){const e=re(2);V(3),ui((e.resourceData||Rs(1,Wh)).length)}}function dne(i,t){1&i&&(G(0,"mat-panel-description"),Be(1," Empty array "),j())}function une(i,t){}function hne(i,t){if(1&i){const e=jn();G(0,"mat-expansion-panel",4),Pe("opened",function(){return Vt(e),Et(re().onContentsTrigger(!0))})("closed",function(){return Vt(e),Et(re().onContentsTrigger(!1))}),G(1,"mat-expansion-panel-header",5)(2,"mat-panel-title"),Be(3),j(),fe(4,cne,5,2,"mat-panel-description",1),fe(5,dne,2,0,"mat-panel-description",1),j(),fe(6,une,0,0,"ng-template",6),j()}if(2&i){const e=re(),n=Xi(3);V(1),U("matTooltip",e.resourceDescription),V(2),Ki(" ",e.name," "),V(1),U("ngIf",(e.resourceData||Rs(5,Wh)).length>0),V(1),U("ngIf",0==(e.resourceData||Rs(6,Wh)).length),V(1),U("ngTemplateOutlet",n)}}function fne(i,t){}function pne(i,t){if(1&i&&(Gr(0),G(1,"h2",5),Be(2),j(),G(3,"div",7),fe(4,fne,0,0,"ng-template",6),j(),Wr()),2&i){const e=re(),n=Xi(3);V(1),U("matTooltip",e.resourceDescription),V(1),ui(e.name),V(2),U("ngTemplateOutlet",n)}}function mne(i,t){}function gne(i,t){if(1&i&&Ie(0,"app-editor",10),2&i){const e=re().$implicit,n=re(3);U("resource",n.children[n.pageIndex*n.pageSize+e])("disabled",n.disabled)}}function _ne(i,t){if(1&i&&(Gr(0),fe(1,gne,1,2,"app-editor",9),Wr()),2&i){const e=t.$implicit,n=re(3);V(1),U("ngIf",n.pageIndex*n.pageSize+e0)}let VR=(()=>{class i{constructor(e,n){this.main=e,this.cdr=n,this._resource=null,this.resourceDescription="",this.disabled=!1,this.changed=new $e,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 Te}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:sc(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(Ue(this.destroyed$),gn(([n,r])=>!!this.resource&&n.startsWith(this.resource.id)&&!n.substring(this.resource.id.length+1).includes("/"))).subscribe(function(){var n=st(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 Qe(null),this.imageUrl$=new Qe(null),this.destroyed$=new Te,this.changed=new $e}set resource(e){this._resource$.next(e)}get resource(){return this._resource$.getValue()}ngAfterViewInit(){var e=this;return st(function*(){e._resource$.pipe(Ue(e.destroyed$)).subscribe(function(){var n=st(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)(E(Jl),E(ka))},i.\u0275cmp=ot({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&&(Ie(0,"app-compound-block-ui",0),ct(1,"async"),fe(2,Ene,2,3,"img",1),ct(3,"async")),2&e&&(U("resource",ut(1,3,n._resource$))("fieldBlacklist",Rs(7,Ane)),V(2),U("ngIf",ut(3,5,n.imageUrl$)))},dependencies:[_i,ec,qo],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 Tne=["*"],One=new me("MAT_CARD_CONFIG");let mH=(()=>{class i{constructor(e){this.appearance=e?.appearance||"raised"}}return i.\u0275fac=function(e){return new(e||i)(E(One,8))},i.\u0275cmp=ot({type:i,selectors:[["mat-card"]],hostAttrs:[1,"mat-mdc-card","mdc-card"],hostVars:4,hostBindings:function(e,n){2&e&&ln("mat-mdc-card-outlined","outlined"===n.appearance)("mdc-card--outlined","outlined"===n.appearance)},inputs:{appearance:"appearance"},exportAs:["matCard"],ngContentSelectors:Tne,decls:1,vars:0,template:function(e,n){1&e&&(sr(),Yt(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})(),gH=(()=>{class i{}return i.\u0275fac=function(e){return new(e||i)},i.\u0275mod=en({type:i}),i.\u0275inj=Wt({imports:[Jn,ao,Jn]}),i})();class zR{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 Te,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 HR=(()=>{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=ke({token:i,factory:i.\u0275fac,providedIn:"root"}),i})(),sie=(()=>{class i{}return i.\u0275fac=function(e){return new(e||i)},i.\u0275mod=en({type:i}),i.\u0275inj=Wt({imports:[Jn,ao,Jy,Jn]}),i})();const wH={transformPanel:Ra("transformPanel",[Or("void => enter-dropdown",Yr("120ms cubic-bezier(0, 0, 0.2, 1)",iV([oi({opacity:0,transform:"scale(1, 0.8)"}),oi({opacity:1,transform:"scale(1, 1)"})]))),Or("void => enter-dialog",Yr("150ms cubic-bezier(0, 0, 0.2, 1)",iV([oi({opacity:0,transform:"scale(0.7)"}),oi({transform:"none",opacity:1})]))),Or("* => void",Yr("100ms linear",oi({opacity:0})))]),fadeInCalendar:Ra("fadeInCalendar",[Os("void",oi({opacity:0})),Os("enter",oi({opacity:1})),Or("void => *",Yr("120ms 100ms cubic-bezier(0.55, 0, 0.55, 0.2)"))])},SH=function(i){return{active:i}};function Mie(i,t){if(1&i){const e=jn();G(0,"button",2),Pe("click",function(){const s=Vt(e).$implicit;return Et(re().select(s))}),j()}if(2&i){const e=t.$implicit,n=re();Yo("background-color",e),U("ngClass",rm(3,SH,n.selectedColor===e))}}function Cie(i,t){if(1&i){const e=jn();G(0,"button",2),Pe("click",function(){const s=Vt(e).$implicit;return Et(re().select(s))}),j()}if(2&i){const e=t.$implicit,n=re();Yo("background-color",e),U("ngClass",rm(3,SH,n.selectedColor===e))}}const Sie=["button"],Eie=/^\s+/,Aie=/\s+$/,$m=Math.round,Die=(Math,Math,Math,/[^0-9]/g),EH=["#ffffff","#ffff00","#ff00ff","#ff0000","#c0c0c0","#808080","#808000","#800080","#800000","#00ffff","#00ff00","#008080","#008000","#0000ff","#000080","#000000"];function AH(i,t,e){const n=i.getImageData(t,e,1,1).data;return{r:n[0],g:n[1],b:n[2]}}function jh(i){return 1==i.length?"0"+i:""+i}function Iie(i){return Math.round(255*parseFloat(i)).toString(16)}function DH(i){return Qo(i)/255}function Qo(i){return parseInt(i,16)}function TH(i,t,e,n){var r=[jh($m(i).toString(16)),jh($m(t).toString(16)),jh($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 vu="(?:[-\\+]?\\d*\\.\\d+%?)|(?:[-\\+]?\\d+%?)",WR="[\\s|\\(]+("+vu+")[,|\\s]+("+vu+")[,|\\s]+("+vu+")\\s*\\)?",jR="[\\s|\\(]+("+vu+")[,|\\s]+("+vu+")[,|\\s]+("+vu+")[,|\\s]+("+vu+")\\s*\\)?",Yh={CSS_UNIT:new RegExp(vu),rgb:new RegExp("rgb"+WR),rgba:new RegExp("rgba"+jR),hsl:new RegExp("hsl"+WR),hsla:new RegExp("hsla"+jR),hsv:new RegExp("hsv"+WR),hsva:new RegExp("hsva"+jR),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 YR(i){let t;return i=i.replace(Eie,"").replace(Aie,"").toLowerCase(),(t=Yh.rgb.exec(i))?{r:t[1],g:t[2],b:t[3],a:1}:(t=Yh.rgba.exec(i))?{r:t[1],g:t[2],b:t[3],a:t[4]}:(t=Yh.hex8.exec(i))?{r:Qo(t[1]),g:Qo(t[2]),b:Qo(t[3]),a:DH(t[4])}:(t=Yh.hex6.exec(i))?{r:Qo(t[1]),g:Qo(t[2]),b:Qo(t[3]),a:1}:(t=Yh.hex4.exec(i))?{r:Qo(t[1]+""+t[1]),g:Qo(t[2]+""+t[2]),b:Qo(t[3]+""+t[3]),a:DH(t[4]+""+t[4])}:(t=Yh.hex3.exec(i))?{r:Qo(t[1]+""+t[1]),g:Qo(t[2]+""+t[2]),b:Qo(t[3]+""+t[3]),a:1}:null}class qh{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=TH(this.r,this.g,this.b),this.rgba=this.toRgba()}toHex(t){return TH(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 Tie(i,t,e,n,r){var s=[jh($m(i).toString(16)),jh($m(t).toString(16)),jh($m(e).toString(16)),jh(Iie(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 IH=(()=>{class i{constructor(e,n){this.zone=e,this.colorChanged=new $e,this.x=0,this.y=0,this.drag=!1,this._destroyed=new Te,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){Mo()},i.\u0275dir=ve({type:i,inputs:{color:"color"},outputs:{colorChanged:"colorChanged"}}),i})(),Pie=(()=>{class i extends IH{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}=AH(this.ctx,e.offsetX,e.offsetY);this.emitChange(new qh(n,r,s))}}return i.\u0275fac=function(e){return new(e||i)(E(gt))},i.\u0275cmp=ot({type:i,selectors:[["ngx-mat-color-slider"]],features:[dt],decls:1,vars:0,consts:[["id","color-strip","width","15","height","234",1,"zone-strip",3,"mousedown","mouseup"]],template:function(e,n){1&e&&(G(0,"canvas",0),Pe("mousedown",function(s){return n.onMousedown(s)})("mouseup",function(s){return n.onMouseup(s)}),j())}}),i})(),Oie=(()=>{class i{constructor(){}onInput(e){this._formatInput(e.target)}_formatInput(e){let n=Number(e.value.replace(Die,""));n=isNaN(n)?0:n,e.value=n}}return i.\u0275fac=function(e){return new(e||i)},i.\u0275dir=ve({type:i,selectors:[["","ngxMatNumericColorInput",""]],hostBindings:function(e,n){1&e&&Pe("input",function(s){return n.onInput(s)})}}),i})(),Lie=(()=>{class i extends IH{constructor(e){super(e,"color-block"),this.zone=e,this._resetBaseColor=!0,this.formGroup=new zm({r:new ic(null,[ml.required]),g:new ic(null,[ml.required]),b:new ic(null,[ml.required]),a:new ic(null,[ml.required]),hex:new ic(null,[ml.required,ml.pattern(Yh.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(){Cr(this.rCtrl.valueChanges,this.gCtrl.valueChanges,this.bCtrl.valueChanges,this.aCtrl.valueChanges).pipe(Ue(this._destroyed),fl(400)).subscribe(r=>{const s=new qh(Number(this.rCtrl.value),Number(this.gCtrl.value),Number(this.bCtrl.value),Number(this.aCtrl.value));this.emitChange(s)}),this.hexCtrl.valueChanges.pipe(Ue(this._destroyed),fl(400),Ql()).subscribe(r=>{const s=YR(r);if(null!=s){const o=new qh(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}=AH(this.ctx,e.offsetX,e.offsetY);this.emitChange(new qh(n,r,s))}}return i.\u0275fac=function(e){return new(e||i)(E(gt))},i.\u0275cmp=ot({type:i,selectors:[["ngx-mat-color-canvas"]],hostAttrs:[1,"ngx-mat-color-canvas"],features:[dt,xi],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&&(G(0,"form",0)(1,"div",1)(2,"div",2)(3,"canvas",3),Pe("mousedown",function(s){return n.onMousedown(s)})("mouseup",function(s){return n.onMouseup(s)}),j(),G(4,"ngx-mat-color-slider",4),Pe("colorChanged",function(s){return n.onSliderColorChanged(s)}),j()(),G(5,"div",5)(6,"mat-form-field")(7,"mat-label"),Be(8,"R"),j(),Ie(9,"input",6),j(),G(10,"mat-form-field")(11,"mat-label"),Be(12,"G"),j(),Ie(13,"input",7),j(),G(14,"mat-form-field")(15,"mat-label"),Be(16,"B"),j(),Ie(17,"input",8),j()()(),G(18,"div",1),Ie(19,"button",9),G(20,"mat-form-field")(21,"mat-label"),Be(22,"HEX6"),j(),G(23,"mat-label",10),Be(24,"#\xa0"),j(),Ie(25,"input",11),j(),G(26,"mat-form-field",12)(27,"mat-label"),Be(28,"A"),j(),Ie(29,"input",13),j()()()),2&e&&(U("formGroup",n.formGroup),V(19),Yo("background-color",(null==n.color?null:n.color.rgba)||"transparent"))},dependencies:[rc,gl,Io,jte,wV,TR,pl,mu,nc,yR,_u,gu,$h,uC,Pie,Oie],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})(),Nie=(()=>{class i{constructor(){this.colorChanged=new $e,this.colors1=EH.slice(0,8),this.colors2=EH.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}=YR(e);this.colorChanged.emit(new qh(n,r,s,o))}}return i.\u0275fac=function(e){return new(e||i)},i.\u0275cmp=ot({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&&(G(0,"div",0),fe(1,Mie,1,5,"button",1),j(),G(2,"div",0),fe(3,Cie,1,5,"button",1),j()),2&e&&(V(1),U("ngForOf",n.colors1),V(2),U("ngForOf",n.colors2))},dependencies:[um,oo,wV],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})(),RH=(()=>{class i{constructor(){this.colorChanged=new $e}ngOnInit(){}handleColorChanged(e){this.colorChanged.emit(e)}}return i.\u0275fac=function(e){return new(e||i)},i.\u0275cmp=ot({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&&(G(0,"ngx-mat-color-canvas",0),Pe("colorChanged",function(s){return n.handleColorChanged(s)}),j(),G(1,"ngx-mat-color-collection",0),Pe("colorChanged",function(s){return n.handleColorChanged(s)}),j()),2&e&&(U("color",n.color),V(1),U("color",n.color))},dependencies:[Lie,Nie],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})(),qR=(()=>{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=YR(e);return n?new qh(n.r,n.g,n.b,n.a):null}}return i.\u0275fac=function(e){return new(e||i)},i.\u0275prov=ke({token:i,factory:i.\u0275fac}),i})();const Bie={display:{colorInput:"hex"}},kH=new me("mat-color-formats"),PH=new me("ngx-mat-colorpicker-scroll-strategy"),Vie={provide:PH,deps:[as],useFactory:function Uie(i){return()=>i.scrollStrategies.reposition()}},zie=Zy(class{constructor(i){this._elementRef=i}});let OH=(()=>{class i extends zie{constructor(e){super(e)}}return i.\u0275fac=function(e){return new(e||i)(E(vt))},i.\u0275cmp=ot({type:i,selectors:[["ngx-mat-color-picker-content"]],viewQuery:function(e,n){if(1&e&&$n(RH,5),2&e){let r;At(r=Dt())&&(n._palette=r.first)}},hostAttrs:[1,"ngx-mat-colorpicker-content"],hostVars:3,hostBindings:function(e,n){2&e&&(Tw("@transformPanel","enter"),ln("ngx-mat-colorpicker-content-touch",n.picker.touchUi))},inputs:{color:"color"},exportAs:["ngxMatColorPickerContent"],features:[dt],decls:1,vars:1,consts:[[3,"color","colorChanged"]],template:function(e,n){1&e&&(G(0,"ngx-mat-color-palette",0),Pe("colorChanged",function(s){return n.picker.select(s)}),j()),2&e&&U("color",n.picker._selected)},dependencies:[RH],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:[wH.transformPanel,wH.fadeInCalendar]},changeDetection:0}),i})(),FH=(()=>{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 $e,this.closedStream=new $e,this._touchUi=!1,this._opened=!1,this._defaultColor="primary",this._validSelected=null,this._disabledChange=new Te,this._focusedElementBeforeOpen=null,this._inputSubscription=Qt.EMPTY,this._selectedChanged=new Te,this._scrollStrategy=a}get disabled(){return void 0===this._disabled&&this._pickerInput?this._pickerInput.disabled:!!this._disabled}set disabled(e){const n=tn(e);n!==this._disabled&&(this._disabled=n,this._disabledChange.next(n))}get touchUi(){return this._touchUi}set touchUi(e){this._touchUi=tn(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(OH,{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 Lh(OH,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(Oi(1)).subscribe(()=>{this._popupRef.updatePosition()}))}_createPopup(){const e=new Rm({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"),Cr(this._popupRef.backdropClick(),this._popupRef.detachments(),this._popupRef.keydownEvents().pipe(gn(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)(E(Nm),E(as),E(gt),E(qR),E(Ia,8),E(PH),E(qt,8),E(jr))},i.\u0275cmp=ot({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 _C{constructor(t,e){this.target=t,this.targetElement=e,this.value=this.target.value}}const Hie={provide:To,useExisting:Gn(()=>vC),multi:!0},$ie={provide:qr,useExisting:Gn(()=>vC),multi:!0};let vC=(()=>{class i{constructor(e,n,r,s){if(this._elementRef=e,this._formField=n,this._colorFormats=r,this._adapter=s,this.colorChange=new $e,this.colorInput=new $e,this._disabledChange=new $e,this._valueChange=new $e,this._onTouched=()=>{},this._cvaOnChange=()=>{},this._validatorOnChange=()=>{},this._pickerSubscription=Qt.EMPTY,this._validator=ml.compose([]),this._lastValueValid=!1,!this._colorFormats)throw function kie(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 _C(this,this._elementRef.nativeElement)),this.colorChange.emit(new _C(this,this._elementRef.nativeElement))}))}get disabled(){return!!this._disabled}set disabled(e){const n=tn(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 _C(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 _C(this,this._elementRef.nativeElement)))}}return i.\u0275fac=function(e){return new(e||i)(E(vt),E(gl,8),E(kH,8),E(qR))},i.\u0275dir=ve({type:i,selectors:[["input","ngxMatColorPicker",""]],hostVars:3,hostBindings:function(e,n){1&e&&Pe("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&&(ql("disabled",n.disabled),It("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([Hie,$ie,{provide:UR,useExisting:i}])]}),i})(),Gie=(()=>{class i{constructor(e){this._cd=e,this._stateChanges=Qt.EMPTY}get disabled(){if(null==this._disabled&&this.picker)return this.picker.disabled}set disabled(e){this._disabled=e}ngOnInit(){}ngOnChanges(e){e.picker&&this._watchStateChanges()}ngOnDestroy(){this._stateChanges.unsubscribe()}ngAfterContentInit(){this._watchStateChanges()}open(e){this.picker&&!this.disabled&&(this.picker.open(),e.stopPropagation())}_watchStateChanges(){const e=this.picker?this.picker._disabledChange:mt(),n=this.picker&&this.picker._pickerInput?this.picker._pickerInput._disabledChange:mt(),r=this.picker?Cr(this.picker.openedStream,this.picker.closedStream):mt();this._stateChanges.unsubscribe(),this._stateChanges=Cr(e,n,r).subscribe(()=>this._cd.markForCheck())}}return i.\u0275fac=function(e){return new(e||i)(E(Qn))},i.\u0275cmp=ot({type:i,selectors:[["ngx-mat-color-toggle"]],viewQuery:function(e,n){if(1&e&&$n(Sie,5),2&e){let r;At(r=Dt())&&(n._button=r.first)}},hostAttrs:[1,"ngx-mat-color-toggle"],hostVars:7,hostBindings:function(e,n){1&e&&Pe("focus",function(){return n._button.focus()}),2&e&&(It("tabindex",-1),ln("ngx-mat-color-toggle-active",n.picker&&n.picker.opened)("mat-accent",n.picker&&"accent"===n.picker.color)("mat-warn",n.picker&&"warn"===n.picker.color))},inputs:{picker:["for","picker"],tabIndex:"tabIndex",disabled:"disabled"},exportAs:["ngxMatColorPickerToggle"],features:[xi],decls:4,vars:5,consts:[["mat-icon-button","","type","button",3,"disabled","click"],["button",""]],template:function(e,n){1&e&&(G(0,"button",0,1),Pe("click",function(s){return n.open(s)}),G(2,"mat-icon"),Be(3,"palette"),j()()),2&e&&(U("disabled",n.disabled),It("aria-haspopup",n.picker?"dialog":null)("tabindex",n.disabled?-1:n.tabIndex),V(2),Yo("color",null==n.picker||null==n.picker._selected?null:n.picker._selected.rgba))},dependencies:[YM,mR],styles:[".mat-form-field-appearance .mat-form-field-prefix .ngx-mat-color-toggle-default-icon,.mat-form-field-appearance .mat-form-field-suffix .ngx-mat-color-toggle-default-icon{width:1em}.mat-form-field:not(.mat-form-field-appearance) .mat-form-field-prefix .ngx-mat-color-toggle-default-icon,.mat-form-field:not(.mat-form-field-appearance) .mat-form-field-suffix .ngx-mat-color-toggle-default-icon{display:block;width:1.5em;height:1.5em}.mat-form-field:not(.mat-form-field-appearance) .mat-form-field-prefix .mat-icon-button .ngx-mat-color-toggle-default-icon,.mat-form-field:not(.mat-form-field-appearance) .mat-form-field-suffix .mat-icon-button .ngx-mat-color-toggle-default-icon{margin:auto}\n"],encapsulation:2}),i})(),Wie=(()=>{class i{}return i.\u0275fac=function(e){return new(e||i)},i.\u0275mod=en({type:i}),i.\u0275inj=Wt({providers:[qR,Vie],imports:[ao,fH,qM,gH,sie,Jz,eH,gV,Nh,JV]}),i})();const jie=["picker"],Yie=function(i){return{"background-color":i}};function qie(i,t){if(1&i){const e=jn();G(0,"div",5),Pe("click",function(r){const o=Vt(e).index;return Et(re().onColorClicked(r.currentTarget,o))}),j()}if(2&i){const e=t.$implicit,n=t.index,r=re();U("ngStyle",rm(2,Yie,"#"+r.lpad(e.toString(16),"0",8)))("matTooltip",n+": #"+e.toString(16))}}const Xie=function(){return["colors"]};let Kie=(()=>{class i{constructor(){this.resource=null,this.changed=new $e,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 vU;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=ot({type:i,selectors:[["app-palette-block-ui"]],viewQuery:function(e,n){if(1&e&&$n(jie,5),2&e){let r;At(r=Dt())&&(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&&(Ie(0,"app-compound-block-ui",0),G(1,"div",1),fe(2,qie,1,4,"div",2),j(),G(3,"input",3),Pe("colorChange",function(s){return n.onColorChange(s.value)}),j(),Ie(4,"ngx-mat-color-picker",null,4)),2&e){const r=Xi(5);U("resource",n.resource)("fieldBlacklist",Rs(4,Xie)),V(2),U("ngForOf",null==n.resourceData?null:n.resourceData.colors),V(1),U("ngxMatColorPicker",r)}},dependencies:[oo,eM,rc,Fs,vC,FH,ec],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 Zie=["editorBody"];function Qie(i,t){if(1&i&&(G(0,"div",11),Be(1),j()),2&i){const e=re().$implicit;V(1),ui(e.offset)}}function Jie(i,t){if(1&i){const e=jn();G(0,"input",12),Pe("input",function(r){const o=Vt(e).index,a=re().index;return Et(re().onHexInput(r,a,o))})("focus",function(r){const o=Vt(e).index;return Et(re(2).onHexFocus(r,o))})("blur",function(r){return Vt(e),Et(re(2).onHexBlur(r))}),j()}if(2&i){const e=t.$implicit,n=t.index;U("id","hex_input__"+re().index+"__"+n)("value",e[0])("disabled",null===e[0])}}function ere(i,t){1&i&&Ie(0,"div",3)}function tre(i,t){if(1&i){const e=jn();G(0,"span",15),Pe("click",function(){const s=Vt(e).index,o=re(2).index;return Et(re().blurInput(o,s))}),Be(1),j()}if(2&i){const e=t.$implicit,n=t.index;U("id","utf_char__"+re(2).index+"__"+n),V(1),ui(e[1])}}function nre(i,t){if(1&i&&(G(0,"div",13),fe(1,tre,2,2,"span",14),j()),2&i){const e=re().$implicit,n=re();V(1),U("ngForOf",e.values)("ngForTrackBy",n.trackByIndex)}}function ire(i,t){if(1&i&&(G(0,"div",5),fe(1,Qie,2,1,"div",6),ct(2,"async"),G(3,"div",7),fe(4,Jie,1,3,"input",8),j(),fe(5,ere,1,0,"div",9),ct(6,"async"),ct(7,"async"),fe(8,nre,2,2,"div",10),ct(9,"async"),j()),2&i){const e=t.$implicit,n=t.index,r=re();ln("gray",n%2!=0),V(1),U("ngIf",ut(2,7,r._showOffsets$)),V(3),U("ngForOf",e.values)("ngForTrackBy",r.trackByIndex),V(1),U("ngIf",ut(6,9,r._showOffsets$)||ut(7,11,r._showUtf8$)),V(3),U("ngIf",ut(9,13,r._showUtf8$))}}function rre(i,t){if(1&i){const e=jn();G(0,"div",16)(1,"button",17),Pe("click",function(){return Vt(e),Et(re().changePage(-1))}),ct(2,"async"),Be(3,"Previous"),j(),G(4,"span"),Be(5),ct(6,"async"),ct(7,"async"),j(),G(8,"button",17),Pe("click",function(){return Vt(e),Et(re().changePage(1))}),ct(9,"async"),ct(10,"async"),Be(11," Next "),j()()}if(2&i){const e=re();V(1),U("disabled",0===ut(2,4,e.currentPage$)),V(4),Ah("Page ",(ut(6,6,e.currentPage$)||0)+1," of ",ut(7,8,e.totalPages$),""),V(3),U("disabled",(ut(9,10,e.currentPage$)||0)>=(ut(10,12,e.totalPages$)||0)-1)}}let sre=(()=>{class i{set maxColumns(e){this._maxColumns$.next(e)}set maxRows(e){this._maxRows$.next(e)}set showOffsets(e){this._showOffsets$.next(e)}set showUtf8(e){this._showUtf8$.next(e)}set data(e){if(e!==this._data$.value){if(e.length===this._data$.value.length){for(let n=0;n=32&&e<=126?String.fromCharCode(e):"."]}ngAfterViewInit(){new ResizeObserver(e=>{for(const n of e)this.viewportSize$.next([n.contentRect.width,n.contentRect.height])}).observe(this.editorBody.nativeElement),Da([this.viewportSize$,this._maxColumns$,this._maxRows$,this._showOffsets$,this._showUtf8$]).pipe(Ue(this.destroyed$),$y(50)).subscribe(([[e,n],r,s,o,a])=>{let l=e-8;o&&(l-=68);let c=34;a&&(l-=8,c+=10);let h=Math.floor(l/c);r>0&&h>r&&(h=r);let p=this.pageSize$.value[0];h===p+1&&l/c%1<.5&&(h=p),h=Math.max(1,h);let m=Math.floor(n/28);s>0&&m>s&&(m=s),m=Math.max(1,m),(h!=this.pageSize$.value[0]||m!==this.pageSize$.value[1])&&this.pageSize$.next([h,m])}),Da([this._data$,this.currentPage$,this.pageSize$]).pipe(Ue(this.destroyed$)).subscribe(([e,n,r])=>{if(0===r[0]||0===r[1])return;let s=Math.max(1,Math.ceil(Math.ceil(e.length/r[0])/r[1]));if(this.totalPages$.value!==s&&this.totalPages$.next(s),n>=s)return void this.currentPage$.next(n=s-1);const o=[];for(let a=n*r[0]*r[1];a=0&&a<=255&&(this.data[(this.currentPage$.value*this.pageSize$.value[1]+n)*this.pageSize$.value[0]+r]=a,this.renderedRows$.value[n].values[r]=this.renderValue(a),this.cdr.detectChanges(),this.dataChange.emit(this.data),this.goToNextInput(s.id))}}onHexFocus(e,n){const r=e.target,s=r.closest(".row");s&&s.querySelectorAll(".utf8-values span").forEach((a,l)=>{a.classList.toggle("highlight",l===n)}),r.select()}onHexBlur(e){const r=e.target.closest(".row");r&&r.querySelectorAll(".utf8-values span").forEach(o=>{o.classList.remove("highlight")})}}return i.\u0275fac=function(e){return new(e||i)(E(Qn))},i.\u0275cmp=ot({type:i,selectors:[["hex-editor"]],viewQuery:function(e,n){if(1&e&&$n(Zie,5),2&e){let r;At(r=Dt())&&(n.editorBody=r.first)}},inputs:{maxColumns:"maxColumns",maxRows:"maxRows",showOffsets:"showOffsets",showUtf8:"showUtf8",data:"data",readOnly:"readOnly"},outputs:{dataChange:"dataChange"},decls:7,vars:7,consts:[[1,"editor-body"],["editorBody",""],["class","row",3,"gray",4,"ngFor","ngForOf","ngForTrackBy"],[1,"flex-spacer"],["class","pagination",4,"ngIf"],[1,"row"],["class","offset",4,"ngIf"],[1,"hex-values"],["maxlength","2",3,"id","value","disabled","input","focus","blur",4,"ngFor","ngForOf","ngForTrackBy"],["class","flex-spacer",4,"ngIf"],["class","utf8-values",4,"ngIf"],[1,"offset"],["maxlength","2",3,"id","value","disabled","input","focus","blur"],[1,"utf8-values"],[3,"id","click",4,"ngFor","ngForOf","ngForTrackBy"],[3,"id","click"],[1,"pagination"],[3,"disabled","click"]],template:function(e,n){1&e&&(G(0,"div",0,1),fe(2,ire,10,15,"div",2),ct(3,"async"),Ie(4,"div",3),j(),fe(5,rre,12,14,"div",4),ct(6,"async")),2&e&&(V(2),U("ngForOf",ut(3,3,n.renderedRows$))("ngForTrackBy",n.trackByIndex),V(3),U("ngIf",(ut(6,5,n.totalPages$)||0)>1))},dependencies:[oo,_i,qo],styles:["[_nghost-%COMP%]{display:flex;flex-direction:column;font-family:monospace}.editor-body[_ngcontent-%COMP%]{display:flex;flex-grow:1;flex-direction:column;overflow-y:hidden}.row[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:center;height:24px;margin-bottom:4px}.row.gray[_ngcontent-%COMP%]{background-color:#d3d3d3}.offset[_ngcontent-%COMP%]{width:60px;text-align:left;margin-right:8px}.hex-values[_ngcontent-%COMP%]{display:flex;gap:2px;flex-shrink:1;overflow-x:clip}.hex-values[_ngcontent-%COMP%] input[_ngcontent-%COMP%]{width:32px;text-align:center;box-sizing:border-box}.utf8-values[_ngcontent-%COMP%]{margin-left:8px}.utf8-values[_ngcontent-%COMP%] span[_ngcontent-%COMP%]{display:inline-block;width:8px;margin-left:2px;color:#000}.utf8-values[_ngcontent-%COMP%] span.highlight[_ngcontent-%COMP%]{background-color:#ff0}.pagination[_ngcontent-%COMP%]{display:flex;justify-content:space-between;align-items:center;margin-top:1em}.flex-spacer[_ngcontent-%COMP%]{flex-grow:1}"],changeDetection:0}),i})(),ore=(()=>{class i{}return i.\u0275fac=function(e){return new(e||i)},i.\u0275mod=en({type:i}),i.\u0275inj=Wt({imports:[ao]}),i})();const are=["editor"];let lre=(()=>{class i{constructor(){this._resource=null,this.empty=new Uint8Array,this.data$=new Qe(new Uint8Array),this.resourceDescription="",this.disabled=!1,this.changed=new $e}get resource(){return this._resource}set resource(e){this._resource=e,this.data$.next(new Uint8Array(e?e.data:0))}onDataChange(e){this._resource.data=Array.from(e),this.changed.emit()}}return i.\u0275fac=function(e){return new(e||i)},i.\u0275cmp=ot({type:i,selectors:[["app-binary-block-ui"]],viewQuery:function(e,n){if(1&e&&$n(are,5),2&e){let r;At(r=Dt())&&(n.editorDiv=r.first)}},inputs:{resource:"resource",resourceDescription:"resourceDescription",disabled:"disabled"},outputs:{changed:"changed"},decls:5,vars:10,consts:[["matTooltipPosition","above",3,"matTooltip"],[3,"data","maxColumns","showOffsets","readOnly","dataChange"]],template:function(e,n){1&e&&(G(0,"h2",0),Be(1),j(),G(2,"hex-editor",1),Pe("dataChange",function(s){return n.onDataChange(s)}),ct(3,"async"),ct(4,"async"),j()),2&e&&(U("matTooltip",n.resourceDescription),V(1),ui(null==n.resource?null:n.resource.name),V(1),U("data",ut(3,6,n.data$)||n.empty)("maxColumns",8)("showOffsets",(ut(4,8,n.data$)||n.empty).length>16)("readOnly",n.disabled))},dependencies:[Fs,sre,qo],changeDetection:0}),i})();const cre=["picker"];function dre(i,t){if(1&i&&(G(0,"mat-label",8),Be(1),j()),2&i){const e=re();V(1),ui(null==e.resource?null:e.resource.name)}}const ure=function(i){return{transform:i}};let hre=(()=>{class i{constructor(e){this.cdr=e,this.resource=null,this.resourceDescription="",this.changed=new $e,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)(E(Qn))},i.\u0275cmp=ot({type:i,selectors:[["app-angle-block-ui"]],viewQuery:function(e,n){if(1&e&&$n(cre,5),2&e){let r;At(r=Dt())&&(n.picker=r.first)}},hostBindings:function(e,n){1&e&&Pe("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&&(G(0,"div",0)(1,"div",1,2)(3,"div",3),Ie(4,"div",4)(5,"div",5),j()(),G(6,"div",6),fe(7,dre,2,1,"mat-label",7),G(8,"mat-label"),Be(9),ct(10,"number"),j(),G(11,"mat-label"),Be(12),ct(13,"number"),j()()()),2&e&&(U("matTooltip",n.resourceDescription),V(3),U("ngStyle",rm(11,ure,"rotate("+((null==n.resource?null:n.resource.data)||0)+"rad)")),V(4),U("ngIf",null==n.resource?null:n.resource.name),V(2),Ki("",QD(10,5,180*(null==n.resource?null:n.resource.data)/n.pi||0,"1.2-2")," deg"),V(3),Ki("",QD(13,8,(null==n.resource?null:n.resource.data)||0,"1.2-2")," rad"))},dependencies:[_i,eM,Io,Fs,dB],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 XR{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,d=new Set;for(const h of e)!0===Array.isArray(h)?a.add(h):"object"==typeof h?l.add(h):"function"==typeof h?d.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===d.size){h=!0;for(const p of o)if(!1===d.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 fre(i,t){if(1&i&&(G(0,"mat-list-option",3),Be(1),j()),2&i){const e=t.$implicit,n=re();U("value",e)("selected",n.selectedValue==e),V(1),Ki(" ",e," ")}}function pre(i,t){if(1&i&&(G(0,"mat-card"),Ie(1,"app-editor",4),j()),2&i){const e=re();V(1),U("resource",e.resources[e.selectedValue])}}let yC=(()=>{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)(E(XR))},i.\u0275cmp=ot({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&&(G(0,"mat-selection-list",0),Pe("selectionChange",function(s){return n.selectedValue=s.source.selectedOptions.selected[0].value}),fe(1,fre,2,3,"mat-list-option",1),j(),fe(2,pre,2,1,"mat-card",2)),2&e&&(U("multiple",!1),V(1),U("ngForOf",n.keys),V(1),U("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})(),mre=(()=>{class i{constructor(){this._resource=null,this.resourceMap={},this.changed=new $e}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",nR("@transformPanel",[tR()],{optional:!0}))]),transformPanel:Ra("transformPanel",[Os("void",oi({opacity:0,transform:"scale(1, 0.8)"})),Or("void => showing",Yr("120ms cubic-bezier(0, 0, 0.2, 1)",oi({opacity:1,transform:"scale(1, 1)"}))),Or("* => void",Yr("100ms linear",oi({opacity:0})))])};let LH=0;const NH=new me("mat-select-scroll-strategy"),Are=new me("MAT_SELECT_CONFIG"),Dre={provide:NH,deps:[as],useFactory:function Ere(i){return()=>i.scrollStrategies.reposition()}},Tre=new me("MatSelectTrigger");class Ire{constructor(t,e){this.source=t,this.value=e}}const Rre=WM(QI(GM($U(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 Te}}))));let kre=(()=>{class i extends Rre{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(ml.required)??!1}set required(e){this._required=tn(e),this.stateChanges.next()}get multiple(){return this._multiple}set multiple(e){this._multiple=tn(e)}get disableOptionCentering(){return this._disableOptionCentering}set disableOptionCentering(e){this._disableOptionCentering=tn(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=Ps(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,d,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=d,this._liveAnnouncer=g,this._defaultOptions=b,this._panelOpen=!1,this._compareWith=(v,y)=>v===y,this._uid="mat-select-"+LH++,this._triggerAriaLabelledBy=null,this._destroy=new Te,this._onChange=()=>{},this._onTouched=()=>{},this._valueId="mat-select-value-"+LH++,this._panelDoneAnimatingStream=new Te,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=Cy(()=>{const v=this.options;return v?v.changes.pipe(Ao(v),ks(()=>Cr(...v.map(y=>y.onSelectionChange)))):this._ngZone.onStable.pipe(Oi(1),ks(()=>this.optionSelectionChanges))}),this.openedChange=new $e,this._openedStream=this.openedChange.pipe(gn(v=>v),tt(()=>{})),this._closedStream=this.openedChange.pipe(gn(v=>!v),tt(()=>{})),this.selectionChange=new $e,this.valueChange=new $e,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 zR(this.multiple),this.stateChanges.next(),this._panelDoneAnimatingStream.pipe(Ql(),Ue(this._destroy)).subscribe(()=>this._panelDoneAnimating(this.panelOpen))}ngAfterContentInit(){this._initKeyManager(),this._selectionModel.changed.pipe(Ue(this._destroy)).subscribe(e=>{e.added.forEach(n=>n.select()),e.removed.forEach(n=>n.deselect())}),this.options.changes.pipe(Ao(null),Ue(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&&!Zo(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||Zo(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(Oi(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 zZ(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=Cr(this.options.changes,this._destroy);this.optionSelectionChanges.pipe(Ue(e)).subscribe(n=>{this._onSelect(n.source,n.isUserInput),n.isUserInput&&!this.multiple&&this._panelOpen&&(this.close(),this.focus())}),Cr(...this.options.map(n=>n._stateChanges)).pipe(Ue(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)(E(OM),E(Qn),E(gt),E(WU),E(vt),E(Ia,8),E(db,8),E($h,8),E(fC,8),E(tc,10),ya("tabindex"),E(NH),E(qI),E(Are,8))},i.\u0275dir=ve({type:i,viewQuery:function(e,n){if(1&e&&($n(gre,5),$n(_re,5),$n(bU,5)),2&e){let r;At(r=Dt())&&(n.trigger=r.first),At(r=Dt())&&(n.panel=r.first),At(r=Dt())&&(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:[dt,xi]}),i})(),hb=(()=>{class i extends kre{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(Ue(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 kQ(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 Ire(this,e)}_getOverlayWidth(){return(this._preferredOverlayOrigin instanceof VI?this._preferredOverlayOrigin.elementRef:this._preferredOverlayOrigin||this._elementRef).nativeElement.getBoundingClientRect().width}get hideSingleSelectionIndicator(){return this._hideSingleSelectionIndicator}set hideSingleSelectionIndicator(e){this._hideSingleSelectionIndicator=tn(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=si(i)))(n||i)}}(),i.\u0275cmp=ot({type:i,selectors:[["mat-select"]],contentQueries:function(e,n,r){if(1&e&&(Wi(r,Tre,5),Wi(r,Lm,5),Wi(r,JU,5)),2&e){let s;At(s=Dt())&&(n.customTrigger=s.first),At(s=Dt())&&(n.options=s),At(s=Dt())&&(n.optionGroups=s)}},hostAttrs:["role","combobox","aria-autocomplete","none","aria-haspopup","listbox",1,"mat-mdc-select"],hostVars:19,hostBindings:function(e,n){1&e&&Pe("keydown",function(s){return n._handleKeydown(s)})("focus",function(){return n._onFocus()})("blur",function(){return n._onBlur()}),2&e&&(It("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()),ln("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:BR,useExisting:i},{provide:QU,useExisting:i}]),dt],ngContentSelectors:Cre,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&&(sr(Mre),G(0,"div",0,1),Pe("click",function(){return n.toggle()}),G(3,"div",2),fe(4,vre,2,1,"span",3),fe(5,xre,3,2,"span",4),j(),G(6,"div",5)(7,"div",6),ki(),G(8,"svg",7),Ie(9,"path",8),j()()()(),fe(10,wre,3,9,"ng-template",9),Pe("backdropClick",function(){return n.close()})("attach",function(){return n._onAttached()})("detach",function(){return n.close()})),2&e){const r=Xi(1);It("aria-owns",n.panelOpen?n.id+"-panel":null),V(3),U("ngSwitch",n.empty),It("id",n._valueId),V(1),U("ngSwitchCase",!0),V(1),U("ngSwitchCase",!1),V(5),U("cdkConnectedOverlayPanelClass",n._overlayPanelClass)("cdkConnectedOverlayScrollStrategy",n._scrollStrategy)("cdkConnectedOverlayOrigin",n._preferredOverlayOrigin||r)("cdkConnectedOverlayOpen",n.panelOpen)("cdkConnectedOverlayPositions",n._positions)("cdkConnectedOverlayWidth",n._overlayWidth)}},dependencies:[um,vy,UT,oB,bU,VI],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:[Sre.transformPanel]},changeDetection:0}),i})(),BH=(()=>{class i{}return i.\u0275fac=function(e){return new(e||i)},i.\u0275mod=en({type:i}),i.\u0275inj=Wt({providers:[Dre],imports:[ao,km,eR,Jn,qy,pC,eR,Jn]}),i})();function Pre(i,t){if(1&i&&(G(0,"mat-label"),Be(1),j()),2&i){const e=re(3);V(1),ui(e.resource.name)}}function Ore(i,t){if(1&i&&(G(0,"mat-option",6),Be(1),j()),2&i){const e=t.$implicit,n=re(3);U("value",e[1])("disabled",n.disabled),V(1),Ki(" ",e[1]," ")}}function Fre(i,t){if(1&i){const e=jn();G(0,"mat-form-field",3),fe(1,Pre,2,1,"mat-label",0),G(2,"mat-select",4),Pe("valueChange",function(r){return Vt(e),Et(re(2).resource.data=r)})("selectionChange",function(){return Vt(e),Et(re(2).changed.emit())}),fe(3,Ore,2,3,"mat-option",5),j()()}if(2&i){const e=re(2);U("matTooltip",e.resourceDescription),V(1),U("ngIf",e.resource.name),V(1),U("value",e.resource.data)("disabled",e.disabled),V(1),U("ngForOf",e.resource.schema.enum_names)}}function Lre(i,t){if(1&i&&(G(0,"mat-label"),Be(1),j()),2&i){const e=re(3);V(1),ui(e.resource.name)}}function Nre(i,t){if(1&i){const e=jn();G(0,"mat-form-field",3),fe(1,Lre,2,1,"mat-label",0),G(2,"input",7),Pe("ngModelChange",function(r){return Vt(e),Et(re(2).resource.data=r)})("change",function(){return Vt(e),Et(re(2).changed.emit())}),j()()}if(2&i){const e=re(2);U("matTooltip",e.resourceDescription),V(1),U("ngIf",e.resource.name),V(1),U("min",0)("max",256*(e.resource.schema.length||1)-1)("ngModel",e.resource.data)}}function Bre(i,t){if(1&i&&(Gr(0),fe(1,Fre,4,5,"mat-form-field",1),fe(2,Nre,3,5,"ng-template",null,2,zc),Wr()),2&i){const e=Xi(3),n=re();V(1),U("ngIf",n.isKnownEnumValue(n.resource.data))("ngIfElse",e)}}let Ure=(()=>{class i{constructor(){this.resource=null,this.resourceDescription="",this.disabled=!1,this.changed=new $e}isKnownEnumValue(e){return!!this.resource?.schema.enum_names.find(([n,r])=>r==e)}}return i.\u0275fac=function(e){return new(e||i)},i.\u0275cmp=ot({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&&fe(0,Bre,4,2,"ng-container",0),2&e&&U("ngIf",n.resource)},dependencies:[oo,_i,pl,mu,nc,_u,gu,Zc,gl,Io,rc,Fs,hb,Lm],changeDetection:0}),i})();const Vre=["*"],Hre=["unscopedContent"];function $re(i,t){1&i&&Yt(0,4)}function Gre(i,t){if(1&i&&(G(0,"div",11),Ie(1,"input",12),G(2,"div",13),ki(),G(3,"svg",14),Ie(4,"path",15),j(),ga(),Ie(5,"div",16),j()()),2&i){const e=re();ln("mdc-checkbox--disabled",e.disabled),V(1),U("checked",e.selected)("disabled",e.disabled)}}function Wre(i,t){if(1&i&&(G(0,"div",17),Ie(1,"input",18),G(2,"div",19),Ie(3,"div",20)(4,"div",21),j()()),2&i){const e=re();ln("mdc-radio--disabled",e.disabled),V(1),U("checked",e.selected)("disabled",e.disabled)}}function jre(i,t){}function Yre(i,t){if(1&i&&(G(0,"span",22),fe(1,jre,0,0,"ng-template",23),j()),2&i){re();const e=Xi(3);V(1),U("ngTemplateOutlet",e)}}function qre(i,t){}function Xre(i,t){if(1&i&&(G(0,"span",24),fe(1,qre,0,0,"ng-template",23),j()),2&i){re();const e=Xi(5);V(1),U("ngTemplateOutlet",e)}}function Kre(i,t){}function Zre(i,t){1&i&&fe(0,Kre,0,0,"ng-template",23),2&i&&(re(),U("ngTemplateOutlet",Xi(1)))}function Qre(i,t){}function Jre(i,t){if(1&i&&(G(0,"span",25),fe(1,Qre,0,0,"ng-template",23),j()),2&i){re();const e=Xi(3);V(1),U("ngTemplateOutlet",e)}}function ese(i,t){}function tse(i,t){if(1&i&&(G(0,"span",25),fe(1,ese,0,0,"ng-template",23),j()),2&i){re();const e=Xi(5);V(1),U("ngTemplateOutlet",e)}}function nse(i,t){}function ise(i,t){1&i&&fe(0,nse,0,0,"ng-template",23),2&i&&(re(),U("ngTemplateOutlet",Xi(1)))}const rse=[[["","matListItemTitle",""]],[["","matListItemLine",""]],"*",[["mat-divider"]],[["","matListItemAvatar",""],["","matListItemIcon",""]]],sse=["[matListItemTitle]","[matListItemLine]","*","mat-divider","[matListItemAvatar],[matListItemIcon]"],UH=new me("ListOption");let ose=(()=>{class i{constructor(e){this._elementRef=e}}return i.\u0275fac=function(e){return new(e||i)(E(vt))},i.\u0275dir=ve({type:i,selectors:[["","matListItemTitle",""]],hostAttrs:[1,"mat-mdc-list-item-title","mdc-list-item__primary-text"]}),i})(),ase=(()=>{class i{constructor(e){this._elementRef=e}}return i.\u0275fac=function(e){return new(e||i)(E(vt))},i.\u0275dir=ve({type:i,selectors:[["","matListItemLine",""]],hostAttrs:[1,"mat-mdc-list-item-line","mdc-list-item__secondary-text"]}),i})(),VH=(()=>{class i{constructor(e){this._listOption=e}_isAlignedAtStart(){return!this._listOption||"after"===this._listOption?._getTogglePosition()}}return i.\u0275fac=function(e){return new(e||i)(E(UH,8))},i.\u0275dir=ve({type:i,hostVars:4,hostBindings:function(e,n){2&e&&ln("mdc-list-item__start",n._isAlignedAtStart())("mdc-list-item__end",!n._isAlignedAtStart())}}),i})(),lse=(()=>{class i extends VH{}return i.\u0275fac=function(){let t;return function(n){return(t||(t=si(i)))(n||i)}}(),i.\u0275dir=ve({type:i,selectors:[["","matListItemAvatar",""]],hostAttrs:[1,"mat-mdc-list-item-avatar"],features:[dt]}),i})(),cse=(()=>{class i extends VH{}return i.\u0275fac=function(){let t;return function(n){return(t||(t=si(i)))(n||i)}}(),i.\u0275dir=ve({type:i,selectors:[["","matListItemIcon",""]],hostAttrs:[1,"mat-mdc-list-item-icon"],features:[dt]}),i})();const dse=new me("MAT_LIST_CONFIG");let KR=(()=>{class i{constructor(){this._isNonInteractive=!0,this._disableRipple=!1,this._disabled=!1,this._defaultOptions=Lt(dse,{optional:!0})}get disableRipple(){return this._disableRipple}set disableRipple(e){this._disableRipple=tn(e)}get disabled(){return this._disabled}set disabled(e){this._disabled=tn(e)}}return i.\u0275fac=function(e){return new(e||i)},i.\u0275dir=ve({type:i,hostVars:1,hostBindings:function(e,n){2&e&&It("aria-disabled",n.disabled)},inputs:{disableRipple:"disableRipple",disabled:"disabled"}}),i})(),zH=(()=>{class i{set lines(e){this._explicitLines=Ps(e,null),this._updateItemLines(!1)}get disableRipple(){return this.disabled||this._disableRipple||this._noopAnimations||!!this._listBase?.disableRipple}set disableRipple(e){this._disableRipple=tn(e)}get disabled(){return this._disabled||!!this._listBase?.disabled}set disabled(e){this._disabled=tn(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 Qt,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 Fm(this,this._ngZone,this._hostElement,this._platform),this._rippleRenderer.setupTriggerEvents(this._hostElement)}_monitorProjectedLinesAndTitle(){this._ngZone.runOutsideAngular(()=>{this._subscriptions.add(Cr(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)(E(vt),E(gt),E(KR,8),E(zi),E(JI,8),E(kr,8))},i.\u0275dir=ve({type:i,contentQueries:function(e,n,r){if(1&e&&(Wi(r,lse,4),Wi(r,cse,4)),2&e){let s;At(s=Dt())&&(n._avatars=s),At(s=Dt())&&(n._icons=s)}},hostVars:4,hostBindings:function(e,n){2&e&&(It("aria-disabled",n.disabled)("disabled",n._isButtonElement&&n.disabled||null),ln("mdc-list-item--disabled",n.disabled))},inputs:{lines:"lines",disableRipple:"disableRipple",disabled:"disabled"}}),i})();const HH=new me("SelectionList");let bC=(()=>{class i extends zH{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=tn(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 $e,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)(E(vt),E(gt),E(HH),E(zi),E(Qn),E(JI,8),E(kr,8))},i.\u0275cmp=ot({type:i,selectors:[["mat-list-option"]],contentQueries:function(e,n,r){if(1&e&&(Wi(r,ase,5),Wi(r,ose,5)),2&e){let s;At(s=Dt())&&(n._lines=s),At(s=Dt())&&(n._titles=s)}},viewQuery:function(e,n){if(1&e&&$n(Hre,5),2&e){let r;At(r=Dt())&&(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&&Pe("blur",function(){return n._handleBlur()})("click",function(){return n._toggleOnInteraction()}),2&e&&(It("aria-selected",n.selected),ln("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:zH,useExisting:i},{provide:UH,useExisting:i}]),dt],ngContentSelectors:sse,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&&(sr(rse),fe(0,$re,1,0,"ng-template",null,0,zc),fe(2,Gre,6,4,"ng-template",null,1,zc),fe(4,Wre,5,4,"ng-template",null,2,zc),fe(6,Yre,2,1,"span",3),fe(7,Xre,2,1,"span",4),fe(8,Zre,1,1,"ng-template",5),G(9,"span",6),Yt(10),Yt(11,1),G(12,"span",7,8),Pe("cdkObserveContent",function(){return n._updateItemLines(!0)}),Yt(14,2),j()(),fe(15,Jre,2,1,"span",9),fe(16,tse,2,1,"span",9),fe(17,ise,1,1,"ng-template",5),Yt(18,3),Ie(19,"div",10)),2&e&&(V(6),U("ngIf",n._hasCheckboxAt("before")),V(1),U("ngIf",n._hasRadioAt("before")),V(1),U("ngIf",n._hasIconsOrAvatarsAt("before")),V(7),U("ngIf",n._hasCheckboxAt("after")),V(1),U("ngIf",n._hasRadioAt("after")),V(1),U("ngIf",n._hasIconsOrAvatarsAt("after")))},dependencies:[MU,_i,yy],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 use={provide:To,useExisting:Gn(()=>xC),multi:!0};class hse{constructor(t,e){this.source=t,this.options=e}}let xC=(()=>{class i extends KR{get multiple(){return this._multiple}set multiple(e){const n=tn(e);n!==this._multiple&&(this._multiple=n,this.selectedOptions=new zR(this._multiple,this.selectedOptions.selected))}get hideSingleSelectionIndicator(){return this._hideSingleSelectionIndicator}set hideSingleSelectionIndicator(e){this._hideSingleSelectionIndicator=tn(e)}constructor(e,n){super(),this._element=e,this._ngZone=n,this._initialized=!1,this._destroyed=new Te,this._onChange=r=>{},this.selectionChange=new $e,this.color="accent",this.compareWith=(r,s)=>r===s,this._multiple=!0,this._hideSingleSelectionIndicator=this._defaultOptions?.hideSingleSelectionIndicator??!1,this.selectedOptions=new zR(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 hse(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=tn(e),this._selectionListDisabled&&this._keyManager?.setActiveItem(-1)}registerOnChange(e){this._onChange=e}registerOnTouched(e){this._onTouched=e}_watchForSelectionChange(){this.selectedOptions.changed.pipe(Ue(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()&&Zo(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 IU(this._items).withHomeAndEnd().withTypeAhead().withWrap().skipPredicate(()=>this.disabled),this._resetActiveOption(),this._keyManager.change.subscribe(e=>this._setActiveOption(e)),this._items.changes.pipe(Ue(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=PM();return e&&this._element.nativeElement.contains(e)}}return i.\u0275fac=function(e){return new(e||i)(E(vt),E(gt))},i.\u0275cmp=ot({type:i,selectors:[["mat-selection-list"]],contentQueries:function(e,n,r){if(1&e&&Wi(r,bC,5),2&e){let s;At(s=Dt())&&(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&&Pe("keydown",function(s){return n._handleKeydown(s)}),2&e&&It("aria-multiselectable",n.multiple)},inputs:{color:"color",compareWith:"compareWith",multiple:"multiple",hideSingleSelectionIndicator:"hideSingleSelectionIndicator",disabled:"disabled"},outputs:{selectionChange:"selectionChange"},exportAs:["matSelectionList"],features:[An([use,{provide:KR,useExisting:i},{provide:HH,useExisting:i}]),dt,xi],ngContentSelectors:Vre,decls:1,vars:0,template:function(e,n){1&e&&(sr(),Yt(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})(),fse=(()=>{class i{}return i.\u0275fac=function(e){return new(e||i)},i.\u0275mod=en({type:i}),i.\u0275inj=Wt({imports:[zI,ao,Jn,Jy,ZU,IV]}),i})();function pse(i,t){if(1&i&&(G(0,"mat-label"),Be(1),j()),2&i){const e=re(2);V(1),ui(e.resource.name)}}function mse(i,t){if(1&i&&(G(0,"mat-list-option",5),Be(1),j()),2&i){const e=t.$implicit,n=re(2);U("value",e.key)("selected",n.resource.data[e.key])("disabled",n.disabled),V(1),Ki(" ",e.key," ")}}function gse(i,t){if(1&i){const e=jn();Gr(0,1),fe(1,pse,2,1,"mat-label",2),G(2,"mat-selection-list",3),Pe("selectionChange",function(r){return Vt(e),Et(re().onSelection(r))}),fe(3,mse,2,4,"mat-list-option",4),ct(4,"keyvalue"),j(),Wr()}if(2&i){const e=re();U("matTooltip",e.resourceDescription),V(1),U("ngIf",e.resource.name),V(1),U("disabled",e.disabled),V(1),U("ngForOf",ut(4,4,e.resource.data))}}let _se=(()=>{class i{constructor(){this.resource=null,this.resourceDescription="",this.disabled=!1,this.changed=new $e}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=ot({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&&fe(0,gse,5,6,"ng-container",0),2&e&&U("ngIf",n.resource)},dependencies:[oo,_i,Io,Fs,xC,bC,lB],styles:["[_nghost-%COMP%]{padding-bottom:1.34375em}"],changeDetection:0}),i})();class $H{get tick$(){return this._tick$.asObservable()}get children(){return[...this._children]}constructor(t){this.parent=t,this._tick$=new Te,this._children=[],t&&t.addChild(this)}addChild(t){if(t.parent!==this)throw new Error("Incorrect child clock");this._children.includes(t)||this._children.push(t)}removeChild(t){if(t.parent!==this)throw new Error("Incorrect child clock");this._children=this._children.filter(e=>e!==t)}dispose(){this.parent&&this.parent.removeChild(this);for(const t of this._children)t.dispose();this._tick$.complete()}}const yse=typeof performance>"u"?()=>Date.now():()=>performance.now();class Wm extends $H{static get instance(){return Wm._instance||(Wm._instance=new Wm),Wm._instance}get elapsedTime(){return yse()}constructor(){super(null);let t=this.elapsedTime;const e=()=>{requestAnimationFrame(e);const n=t,r=this.elapsedTime;t=r,this._tick$.next([n,r-n])};requestAnimationFrame(e)}dispose(){throw new Error("Cannot dispose global clock")}}class GH extends $H{get isRunning(){return!!this.tickSub}get isPaused(){return-1!==this.pausedAt}get isStopped(){return-1===this.startedAt}get timeScale(){return this._timeScale}set timeScale(t){if(t!==this._timeScale||this.pausedByTimescale&&0!==t){if(0===t)return void(this.isPaused||(this.pause(),this.pausedByTimescale=!0));if(this.isPaused&&this.pausedByTimescale&&(this.resume(),this.pausedByTimescale=!1),!this.isStopped){const e=this.isPaused?this.pausedAt:this.parentClock.elapsedTime;this.startedAt=e-(e-this.startedAt)*this.timeScale/t}this._timeScale=t}}get elapsedTime(){return this.isStopped?this.lastStopElapsed:this.isPaused?this._timeScale*(this.pausedAt-this.startedAt):this._timeScale*(this.parentClock.elapsedTime-this.startedAt)}constructor(t=!1,e=Wm.instance){super(e),this.parentClock=e,this.tickSub=null,this._internalTick$=new Te,this.tickRateLimit=0,this.paused$=new Te,this.startedAt=-1,this.oldRelativeTime=0,this.pausedAt=-1,this.lastStopElapsed=0,this._timeScale=1,this.pausedByTimescale=!1,this.lastFiredTickElapsed=0,t&&this.start(),this._internalTick$.pipe(tt(([n,r])=>[r,r-this.lastFiredTickElapsed]),gn(([n])=>!this.tickRateLimit||Math.floor(this.lastFiredTickElapsed*this.tickRateLimit/1e3)this.lastFiredTickElapsed=n)).subscribe(this._tick$)}start(){this.isRunning||(this.oldRelativeTime=0,this.startedAt=this.parentClock.elapsedTime,this.startListeningTicks())}stop(){this.stopListeningTicks(),this.lastStopElapsed=this.elapsedTime,this.startedAt=this.pausedAt=-1}pause(){this.stopListeningTicks(),this.pausedAt=this.parentClock.elapsedTime,this.pausedByTimescale=!1,this.paused$.next(!0)}resume(){this.isRunning||-1==this.pausedAt||(this.startedAt+=this.parentClock.elapsedTime-this.pausedAt,this.pausedAt=-1,this.startListeningTicks(),this.paused$.next(!1))}startListeningTicks(){if(this.tickSub)throw new Error("Clock is already ticking!");this.tickSub=this.parentClock.tick$.pipe(tt(([t,e])=>[this.oldRelativeTime,this.oldRelativeTime+e*this.timeScale]),Vi(([t,e])=>this.oldRelativeTime=e)).subscribe(this._internalTick$)}stopListeningTicks(){var t;null===(t=this.tickSub)||void 0===t||t.unsubscribe(),this.tickSub=null}dispose(){this.stopListeningTicks(),this._internalTick$.complete(),super.dispose()}}const bse={transparent:!1,background:0,size:"fullscreen",antialias:!0};class xse{constructor(t,e,n={}){this.scene=t,this.canvas=e,this.entity=null,this.rendererOptions=Object.assign(Object.assign({},bse),n||{})}}class fb{static fromArray(t,e=!1){const n=new fb(t[0]);let r=n;for(let s=1;sn.map(r=>new fb(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]}constructor(t){this.data=t,this.adjacent=new Set}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(d=>!e.has(d));for(const d of c)e.add(d),r.push([d,a-1])}}return n}nodes(){return Array.from(this.walkRead(-1))}}var oc=(()=>{return(i=oc||(oc={}))[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",oc;var i})();let Xh=(()=>{class i{constructor(){this.tick$=new Te,this._world=null,this._name="e0x"+(i.default_name_counter++).toString(16),this._selfActive=!0,this.parent=null,this._children=[],this._components=[],this._onSpawned$=new Te,this._onRemoved$=new Te}get world(){return this._world}get name(){return this._name}set name(e){this._name=e}get active(){return this._selfActive&&(!this.parent||this.parent.active)}set active(e){this._selfActive=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 wse extends Xh{constructor(t){super(),this.tickOrder=t}}function pb(i,t=oc.CONTROLLERS,e){const n=new wse(t);return e&&(n.name=e),i.addEntity(n),n.tick$.pipe(su(()=>{i.removeEntity(n,!0)}))}class ZR extends Xh{get rendererSize$(){return this._rendererSize$.asObservable()}get rendererSize(){return this._rendererSize$.getValue()}get rendererOptions(){return this.renderer.rendererOptions}get physicsDebugViewActive(){return this.renderer.physicsDebugViewActive}set physicsDebugViewActive(t){this.renderer.physicsDebugViewActive=t}constructor(t){super(),this.renderer=t,this.tickOrder=oc.RENDERING,this._rendererSize$=new Qe(null),this.addComponents(t),this.tick$.subscribe(()=>{this.renderer.render()})}onSpawned(t){this._rendererSize$.next(null),"fullscreen"==this.rendererOptions.size||"function"==typeof this.rendererOptions.size?(this.renderer.canvas&&(this.renderer.canvas.style.position="absolute"),Cr(Do(window,"resize").pipe($y(100)),Do(window,"orientationchange")).pipe(Ue(this._onRemoved$),tt(()=>({x:window.innerWidth,y:window.innerHeight})),Ao({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 Tn||void 0!==this.rendererOptions.size.subscribe&&void 0!==this.rendererOptions.size.pipe?this.rendererOptions.size.pipe(Ue(this._onRemoved$)).subscribe(e=>{this._rendererSize$.next(e)}):this._rendererSize$.next(this.rendererOptions.size),this._rendererSize$.pipe(Ue(this._onRemoved$),Ql((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 QR=i=>{i.updateVisibility?i.updateVisibility():WH(i)},WH=i=>{for(const t of i.children)QR(t)};class Mse extends Xh{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(){WH(this)}addChildren(...t){super.addChildren(...t);for(const e of t)QR(e)}removeChildren(t,e=!1){if(super.removeChildren(t,e),!e)for(const n of t)QR(n)}}class JR{constructor(){this._running=!1,this.stop$=new Te}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 Cse extends JR{get output$(){return this._output$.asObservable()}constructor(t,e){super(),this.keyboard=t,this.keymap=e,this._output$=new Te}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")),Da(t.map(e=>this.keyboard.bindMany(...e))).pipe(Ue(this.stop$),tt(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 ek=new Tn(ms);class wC extends JR{constructor(){super(),this.bindings={},this.skipKeyDownsOnExternalFocus=!0,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 Qe(!1);return this.bindings[t].push(e),e.pipe(Ql(),su(()=>{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"),ek;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 Qe(!1);this.bindings[n].push(r),e.push(r)}return Da(e).pipe(su(()=>{for(let n=0;nn.includes(!0)),Ql())}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 wC.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)}}wC.externalFocusBlacklist=[HTMLInputElement,HTMLTextAreaElement,HTMLSelectElement,HTMLButtonElement];class yi{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 yi.len(yi.sub(t,e))}static norm(t){const e=yi.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 Ese={pointerLock:!1};var Ls=(()=>{return(i=Ls||(Ls={}))[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",Ls;var i})();class jm extends JR{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$=Do(this._element,"wheel",{passive:!1}).pipe(Ue(this.stopped$),su(()=>this._wheel$=null),Vi(t=>t.preventDefault()),tt(t=>t.deltaY),Uf())),this._wheel$}get isPointerLocked(){return!!document.pointerLockElement}get isPointerLocked$(){return Do(document,"pointerlockchange").pipe(tt(()=>this.isPointerLocked))}get state(){return this._state$.getValue()}get state$(){return this._state$.asObservable()}get multiTouchPositions$(){return this._multiTouchPositions$.asObservable()}get twoTouchGestureDelta$(){return this.state$.pipe(ks(t=>t==Ls.DRAG_TOUCH_TWO_FINGERS?this.multiTouchPositions$:ek),tt(t=>t.map(e=>({x:e.x,y:e.y}))),function Sse(){return ni((i,t)=>{let e,n=!1;i.subscribe(qn(t,r=>{const s=e;e=r,n&&t.next([s,r]),n=!0}))})}(),gn(([t,e])=>t.length>1&&e.length>1),tt(([t,e])=>({centerPointDelta:yi.sub(yi.scalarMult(e.reduce((n,r)=>yi.add(n,r),yi.O),1/e.length),yi.scalarMult(t.reduce((n,r)=>yi.add(n,r),yi.O),1/e.length)),angleDelta:yi.angle(e[1],e[0])-yi.angle(t[1],t[0]),distanceDelta:yi.dist(e[1],e[0])-yi.dist(t[1],t[0])})))}get _element(){return this.options.canvas||window}constructor(t={}){super(),this._wheel$=null,this._delta$=new Te,this._position$=new Qe(yi.O),this._multiTouchPositions$=new Qe([]),this.stopped$=new Te,this._state$=new Qe(Ls.NONE),this.options=Object.assign(Object.assign({},Ese),t),this.canvasClickListener=this.canvasClickListener.bind(this)}startInternal(){this.options.canvas&&(this.options.canvas.style.touchAction="none"),this._state$.next(Ls.NONE);const t=[Ls.DRAG,Ls.DRAG_MIDDLE_BUTTON,Ls.DRAG_RIGHT_BUTTON],e=[Ls.NONE,Ls.DRAG,Ls.DRAG_TOUCH_TWO_FINGERS],n=[],r={};Do(this._element,"mousemove").pipe(Ue(this.stopped$)).subscribe(o=>{this._delta$.next({x:o.movementX,y:o.movementY})}),Do(this._element,"pointermove").pipe(Ue(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{if(0===n.length)try{this.options.canvas&&this.options.canvas.setPointerCapture(o.pointerId),window.addEventListener("pointerup",s),this._element.addEventListener("pointercancel",s)}catch(a){console.error(a)}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]||Ls.NONE)}),Do(this._element,"contextmenu").pipe(Ue(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 Ase{static lookAt(t,e,n){let r=Oe.sub(t,e);r=0===Oe.lenSq(r)?Object.assign(Object.assign({},r),{z:1}):Oe.norm(r);let s=Oe.cross(n,r);0===Oe.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=Oe.norm(r),s=Oe.cross(n,r)),s=Oe.norm(s);let o=Oe.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 Qi{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,d=t.w*Math.sin((1-n)*s)/o+e.w*Math.sin(n*s)/o;return isNaN(a)||isNaN(l)||isNaN(c)||isNaN(d)?Qi.clone(t):{x:a,y:l,z:c,w:d}}static fromAngle(t,e){const n=e/2,r=Math.sin(n);return Object.assign(Object.assign({},Oe.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],d=t[10],h=e+o+d;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>d){const p=2*Math.sqrt(1+e-o-d);return{x:.25*p,y:(n+s)/p,z:(r+l)/p,w:(c-a)/p}}if(o>d){const p=2*Math.sqrt(1+o-e-d);return{x:(n+s)/p,y:.25*p,z:(a+c)/p,w:(r-l)/p}}{const p=2*Math.sqrt(1+d-e-o);return{x:(r+l)/p,y:(a+c)/p,z:.25*p,w:(s-n)/p}}}static fromMatrix3(t){const e=t[0][0]+t[1][1]+t[2][2];let n,r,s,o;if(e>0){const a=.5/Math.sqrt(e+1);n=.25/a,r=(t[2][1]-t[1][2])*a,s=(t[0][2]-t[2][0])*a,o=(t[1][0]-t[0][1])*a}else if(t[0][0]>t[1][1]&&t[0][0]>t[2][2]){const a=2*Math.sqrt(1+t[0][0]-t[1][1]-t[2][2]);n=(t[2][1]-t[1][2])/a,r=.25*a,s=(t[0][1]+t[1][0])/a,o=(t[0][2]+t[2][0])/a}else if(t[1][1]>t[2][2]){const a=2*Math.sqrt(1+t[1][1]-t[0][0]-t[2][2]);n=(t[0][2]-t[2][0])/a,r=(t[0][1]+t[1][0])/a,s=.25*a,o=(t[1][2]+t[2][1])/a}else{const a=2*Math.sqrt(1+t[2][2]-t[0][0]-t[1][1]);n=(t[1][0]-t[0][1])/a,r=(t[0][2]+t[2][0])/a,s=(t[1][2]+t[2][1])/a,o=.25*a}return{w:n,x:r,y:s,z:o}}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),d=Math.sin(.5*e);return{w:c*a*s+d*l*o,x:d*a*s-c*l*o,y:c*l*s+d*a*o,z:c*a*o-d*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=Oe.Z){return this.fromMatrix4(Ase.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 Oe{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 Oe.len(Oe.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=Oe.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,Qi.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)}}}function tk(i,t,e,n){return r=>r.pipe(eI((s,o)=>{var a;return{targetValue:o,currentValue:null!==(a=s.currentValue)&&void 0!==a?a:o,hasReachedTarget:!1}},{targetValue:null,currentValue:null,hasReachedTarget:!1}),ks(s=>i.pipe(tt(([o,a])=>{if(null===s.targetValue||null===s.currentValue)return s.currentValue;if(s.hasReachedTarget)return;const l=1-Math.exp(-a/t),c=e(s.currentValue,s.targetValue,l);return s.currentValue=c,n(c,s.targetValue)?(s.hasReachedTarget=!0,s.targetValue):c}))),tt(s=>void 0!==s?s:null),gn(s=>null!==s))}ps(738);class Ise extends Xh{get avgReport(){return this._avgReport}get peakReport(){return this._peakReport}constructor(t=60,e=15){super(),this.maxSamples=t,this.maxRows=e,this.tickOrder=Number.MAX_SAFE_INTEGER,this.sampleIndex=0,this.collectedData=new Map,this._avgReport={totalTime:0,entries:[]},this._peakReport={totalTime:0,entries:[]}}onSpawned(t){super.onSpawned(t),this.sampleIndex=0;const e=()=>(typeof performance>"u"?Date:performance).now();this.world.tickForwardTo$.pipe(Ue(this.onRemoved$)).subscribe(n=>{n!==this&&(this.collectedData.has(n)?this.collectedData.get(n).push([this.sampleIndex,e(),0]):this.collectedData.set(n,[[this.sampleIndex,e(),0]]))}),this.world.tickForwardedTo$.pipe(Ue(this.onRemoved$)).subscribe(n=>{if(n===this)return;const r=this.collectedData.get(n);r[r.length-1][2]=e()}),this.tick$.pipe(Ue(this.onRemoved$)).subscribe(()=>{this.sampleIndex++;const n=Array.from(this.collectedData.entries());for(const[h,p]of n){for(;p.length>0&&p[0][0]h instanceof Xh?""===h.name?h.constructor.name:h.name:"PHYSICS_WORLD"===h?"Physics simulation":h,s=h=>{let p=0,m=0;for(;mh.length-m+1){m--;break}p+=h[h.length-m-1][1]}return m>1&&(h=h.slice(0,h.length-m)).push([`Rest (${m})`,p]),h};let o=0,a=Array.from(this.collectedData.entries()).map(([h,p])=>{const m=p.reduce((g,[b,v,y])=>g+y-v,0)/this.maxSamples;return o+=m,[r(h),m]}).sort((h,p)=>p[1]-h[1]);a=s(a),this._avgReport={totalTime:o,entries:a};let l=new Map,c=Array.from(this.collectedData.entries()).map(([h,p])=>{let m=0;for(const[g,b,v]of p){const y=v-b;m=Math.max(m,y),l.set(g,y+(l.get(g)||0))}return[r(h),m]}).sort((h,p)=>p[1]-h[1]);c=s(c);let d=Array.from(l.values()).reduce((h,p)=>Math.max(h,p),0);this._peakReport={totalTime:d,entries:c}})}onRemoved(){super.onRemoved(),this.collectedData=new Map,this._avgReport={totalTime:0,entries:[]},this._peakReport={totalTime:0,entries:[]}}}var Ym=function(i,t,e,n){return new(e||(e=Promise))(function(s,o){function a(d){try{c(n.next(d))}catch(h){o(h)}}function l(d){try{c(n.throw(d))}catch(h){o(h)}}function c(d){d.done?s(d.value):function r(s){return s instanceof e?s:new e(function(o){o(s)})}(d.value).then(a,l)}c((n=n.apply(i,t||[])).next())})};class _l{static get documentWorlds(){return[..._l._documentWorlds]}constructor(t,e){this.visualScene=t,this.physicsWorld=e,this.worldClock=new GH(!1),this.keyboardInput=new wC,this.name="w0x"+(_l.default_name_counter++).toString(16),this.children=[],this.tickListeners=[],this.tickStarted$=new Te,this.tickForwardTo$=new Te,this.tickForwardedTo$=new Te,this.paused$=new Te,this.disposed$=new Te,this.keyboardInput.start(),window.ggstatic?this.registerConsoleCommands(window.ggstatic):(this.onGgStaticInitialized=this.onGgStaticInitialized.bind(this),window.addEventListener("ggstatic_added",this.onGgStaticInitialized)),this.worldClock.paused$.subscribe(this.paused$),_l._documentWorlds.push(this),_l.worldCreated$.next(this)}init(){return Ym(this,void 0,void 0,function*(){yield Promise.all([this.physicsWorld.init(),this.visualScene.init()]);const t=(e,n,r)=>{e.active&&(this.tickForwardTo$.next(e),e.tick$.next([n,r]),this.tickForwardedTo$.next(e))};this.worldClock.tick$.subscribe(([e,n])=>{this.tickStarted$.next();let r=0;for(;r=oc.PHYSICS_SIMULATION);r++)t(this.tickListeners[r],e,n);for(this.tickForwardTo$.next("PHYSICS_WORLD"),this.physicsWorld.simulate(n),this.tickForwardedTo$.next("PHYSICS_WORLD");re.tickOrder-n.tickOrder),t.onSpawned(this))}removeEntity(t,e=!1){if(t.world){if(t.world!==this)throw new Error("Entity is not a part of this world");this.children.splice(this.children.findIndex(n=>n===t),1),this.tickListeners.splice(this.tickListeners.findIndex(n=>n===t),1),t.onRemoved()}e&&t.dispose()}onGgStaticInitialized(){window.removeEventListener("ggstatic_added",this.onGgStaticInitialized),this.registerConsoleCommands(window.ggstatic)}registerConsoleCommands(t){t.registerConsoleCommand(this,"timescale",(...e)=>Ym(this,void 0,void 0,function*(){return isNaN(+e[0])||(this.worldClock.timeScale=+e[0]),this.worldClock.timeScale.toString()}),"args: [ float? ]; Get current time scale of selected world clock or set it. Default value is 1.0 (no time scale applied)"),t.registerConsoleCommand(this,"fps_limit",(...e)=>Ym(this,void 0,void 0,function*(){return isNaN(+e[0])||(this.worldClock.tickRateLimit=+e[0]),this.worldClock.tickRateLimit.toString()}),"args: [ int? ]; Get current tick rate limit of selected world clock or set it. 0 means no limit applied"),t.registerConsoleCommand(this,"renderers",()=>Ym(this,void 0,void 0,function*(){return this.children.filter(e=>e instanceof ZR).map(e=>e.name).join("\n")}),"no args; Print all renderers in selected world"),t.registerConsoleCommand(this,"debug_view",(...e)=>Ym(this,void 0,void 0,function*(){let r,n="toggle";for(let o of e)["1","0"].includes(o)?n="1"===o:r=o;let s=this.children.find(o=>o instanceof ZR&&(!r||o.name===r));if(s)return s.physicsDebugViewActive="toggle"===n?!s.physicsDebugViewActive:n,s.physicsDebugViewActive?"1":"0";throw r?new Error(`Renderer with name "${r}" not found`):new Error("No renderer found")}),'args: [ 0|1?, string? ]; Turn on/off physics debug view, skip first argument to toggle value. Second argument expects renderer name, if not provided first renderer will be picked. Use "renderers" to get list of renderers in the world'),t.registerConsoleCommand(this,"performance",(...e)=>Ym(this,void 0,void 0,function*(){let n="avg",r=20;for(let d of e)["avg","peak"].includes(d)?n=d:isNaN(+d)||(r=+d);const s=new Ise(r,250);this.addEntity(s),yield function Dse(i,t){const e="object"==typeof t;return new Promise((n,r)=>{let o,s=!1;i.subscribe({next:a=>{o=a,s=!0},error:r,complete:()=>{s?n(o):e?n(t.defaultValue):r(new hm)}})})}(this.worldClock.tick$.pipe(Oi(r)));const o="avg"===n?s.avgReport:s.peakReport;this.removeEntity(s);const a=o.entries.map(([d,h])=>`${d}:`+new Array(Math.max(0,26-d.length)).join(" ")+`${h.toFixed(2)} ms`+("avg"===n?` (${(100*h/o.totalTime).toFixed(2)}%)`:""));let l="lightgreen";o.totalTime>12&&(l=o.totalTime<16?"yellow":"red");const c=("avg"===n?"Average":"Peak")+" Frame time";return a.unshift(c+":"+new Array(Math.max(0,26-c.length)).join(" ")+`${o.totalTime.toFixed(2)} ms`),a.unshift(`Performance report (${r} samples)`),a.join("\n")}),'args: [ int?, avg|peak? ]; Measure how much time was spent per entity in world. Arguments are samples amount (20 by default) and "peak" or "avg" choice, both arguments are optional. "avg" report sorts entities by average time consumed, "peak" records highest value for each entity')}}_l.default_name_counter=0,_l._documentWorlds=[],_l.worldCreated$=new Te;class Ose extends xse{}class YH extends Mse{constructor(){super(...arguments),this._world=null}get world(){return this._world}}class vl extends YH{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}constructor(t){super(),this.tickOrder=oc.OBJECTS_BINDING,this._position=Oe.O,this._rotation=Qi.O,this.object3D=null,this.objectBody=null,t.objectBody&&(this.objectBody=t.objectBody,this.name=this.objectBody.name,this.addComponents(this.objectBody)),t.object3D&&(this.object3D=t.object3D,t.objectBody||(this._position=this.object3D.position,this._rotation=this.object3D.rotation,this.name=this.object3D.name),this.addComponents(this.object3D)),this.objectBody&&(this.tick$.subscribe(()=>{this.runTransformBinding(this.objectBody,this.object3D)}),this.runTransformBinding(this.objectBody,this.object3D))}}class qm extends fb{static fromMapArray(t,e=!1){const n=new qm(t[0]);let r=n;for(let s=1;sn.map(r=>new qm(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));othis.mapGraph.getNearestDummy(this.mapGraphNodes,this.loaderCursor$.getValue())),Ql(),Vi(r=>this._nearestDummy$.next(r))).subscribe(r=>{let o,s=new Set;if(this.options.inertia>0){o=new Set;const a=r.walkReadPreserveDepth(this.options.loadDepth+this.options.inertia);for(let l=0;lo.add(c.data)),l<=this.options.loadDepth&&a[l].forEach(c=>s.add(c.data))}else r.walkRead(this.options.loadDepth).forEach(a=>s.add(a.data)),o=s;for(const a of this.loaded.keys())o.has(a)?s.delete(a):n.includes(a)||n.push(a);for(let a of Array.from(s.keys()))e.includes(a)||e.push(a)}),this.tick$.pipe(Ao(null),Ue(this._onRemoved$)).subscribe(()=>{if(n.length){for(const r of n)this.disposeChunk(r);n=[]}if(e.length)if(this._initialLoadComplete$.value&&e.length>this.options.maxNodesLoadingPerTick){let r=e.slice(0,this.options.maxNodesLoadingPerTick);e=e.slice(this.options.maxNodesLoadingPerTick),Promise.all(r.map(s=>this.loadChunk(s))).then()}else Promise.all(e.map(r=>this.loadChunk(r))).then(()=>{this._initialLoadComplete$.value||this._initialLoadComplete$.next(!0)}),e=[]})}onRemoved(){super.onRemoved(),this.loadClock&&(this.loadClock.stop(),this.loadClock=null),this.loaderCursor$.next(Oe.O)}loadChunk(t){return function(i,t,e,n){return new(e||(e=Promise))(function(s,o){function a(d){try{c(n.next(d))}catch(h){o(h)}}function l(d){try{c(n.throw(d))}catch(h){o(h)}}function c(d){d.done?s(d.value):function r(s){return s instanceof e?s:new e(function(o){o(s)})}(d.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||Qi.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||Qi.O}]),[n,e]})}disposeChunk(t){this.loaded.has(t)&&(this.removeChildren(this.loaded.get(t),!0),this.loaded.delete(t))}}class Nse extends ZR{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 QH=function(i,t,e,n){return new(e||(e=Promise))(function(s,o){function a(d){try{c(n.next(d))}catch(h){o(h)}}function l(d){try{c(n.throw(d))}catch(h){o(h)}}function c(d){d.done?s(d.value):function r(s){return s instanceof e?s:new e(function(o){o(s)})}(d.value).then(a,l)}c((n=n.apply(i,t||[])).next())})};const JH={keymap:"wasd",cameraLinearSpeed:20,cameraMovementElasticity:0,cameraBoostMultiplier:2.5,cameraRotationSensitivity:1,cameraRotationElasticity:0,mouseOptions:{},ignoreMouseUnlessPointerLocked:!1,ignoreKeyboardUnlessPointerLocked:!1};class e4 extends Xh{get active(){return super.active}set active(t){!super.active&&t&&this.reset(),super.active=t}get spherical(){return this._spherical}set spherical(t){this._spherical.phi=Math.max(1e-6,Math.min(Math.PI-1e-6,t.phi)),this._spherical.theta=t.theta,this.resetMotion$.next()}constructor(t,e,n={}){super(),this.keyboard=t,this.camera=e,this.tickOrder=oc.INPUT_CONTROLLERS,this._spherical={phi:0,radius:1,theta:0},this.resetMotion$=new Te,this.options=Object.assign(Object.assign({},JH),n),n.mouseOptions&&(this.options.mouseOptions=Object.assign(Object.assign({},JH.mouseOptions),n.mouseOptions)),this.mouseInput=new jm(this.options.mouseOptions),this.directionsInput=new Cse(t,this.options.keymap)}reset(){this._spherical=Oe.toSpherical(Oe.rot({x:0,y:0,z:-1},this.camera.rotation)),this.resetMotion$.next()}onSpawned(t){const e=Object.create(null,{onSpawned:{get:()=>super.onSpawned}});return QH(this,void 0,void 0,function*(){yield e.onSpawned.call(this,t),this._spherical=Oe.toSpherical(Oe.rot({x:0,y:0,z:-1},this.camera.rotation));const n=["KeyE","KeyQ"];this.camera.camera.supportsFov&&n.push("KeyZ","KeyC"),n.push("ShiftLeft");let r=Da([this.directionsInput.output$,...n.map(c=>this.keyboard.bind(c))]).pipe(Ue(this._onRemoved$),tt(([c,...d])=>{let h={direction:{},rest:[]};(!this.options.ignoreKeyboardUnlessPointerLocked||this.mouseInput.isPointerLocked)&&(h={direction:c,rest:d});let p=Object.assign({},Oe.O);const[m,g,b,v,y]=h.rest;void 0!==h.direction.upDown&&(p.z=h.direction.upDown?-1:1),void 0!==h.direction.leftRight&&(p.x=h.direction.leftRight?-1:1),m!=g&&(p.y=g?-1:1);let M=0;return b!=v&&(M=b?1:-1),p=Oe.norm(p),y&&(p=Oe.scalarMult(p,this.options.cameraBoostMultiplier)),[p,M]}));this.options.cameraMovementElasticity>0&&(r=r.pipe(tk(this.camera.tick$,this.options.cameraMovementElasticity,([c,d],[h,p],m)=>[Oe.lerp(c,h,m),p],([c,d],[h,p])=>d==p&&Oe.dist(c,h)<.001)));let s=Oe.O,o=0;r.subscribe(([c,d])=>{s=c,o=d});let a=jm.isTouchDevice(),l=this.mouseInput.delta$.pipe(Ue(this._onRemoved$),gn(()=>this.active&&(a||!this.options.ignoreMouseUnlessPointerLocked||this.mouseInput.isPointerLocked)));if(this.options.cameraRotationElasticity>0){const c=new Qe(this._spherical);l.subscribe(h=>{const p=c.getValue();c.next({phi:Math.max(1e-6,Math.min(Math.PI-1e-6,p.phi+h.y*this.options.cameraRotationSensitivity/1e3)),theta:p.theta-h.x*this.options.cameraRotationSensitivity/1e3,radius:1})});const d=()=>{c.pipe(Ue(this._onRemoved$),tk(this.tick$,this.options.cameraRotationElasticity,(h,p,m)=>({phi:h.phi+m*(p.phi-h.phi),theta:h.theta+m*(p.theta-h.theta),radius:1}),(h,p)=>yi.dist({x:h.phi,y:h.theta},{x:p.phi,y:p.theta})<1e-4),Ue(this.resetMotion$)).subscribe(h=>{this._spherical.theta=h.theta,this._spherical.phi=h.phi})};this.resetMotion$.pipe(Ue(this._onRemoved$)).subscribe(()=>{c.next(this._spherical),d()}),d()}else l.subscribe(c=>{this._spherical.theta-=c.x*this.options.cameraRotationSensitivity/1e3,this._spherical.phi+=c.y*this.options.cameraRotationSensitivity/1e3,this._spherical.phi=Math.max(1e-6,Math.min(Math.PI-1e-6,this._spherical.phi))});this.camera.tick$.pipe(Ue(this._onRemoved$),gn(()=>this.active)).subscribe(([c,d])=>{this.camera.camera.fov+=o,this.camera.position=Oe.add(this.camera.position,Oe.rot(Oe.scalarMult(s,this.options.cameraLinearSpeed*d/1e3),this.camera.rotation)),this.camera.rotation=Qi.lookAt(this.camera.position,Oe.add(this.camera.position,Oe.fromSpherical(this._spherical)))}),this.mouseInput.start(),this.directionsInput.start()})}onRemoved(){const t=Object.create(null,{onRemoved:{get:()=>super.onRemoved}});return QH(this,void 0,void 0,function*(){yield t.onRemoved.call(this),yield this.mouseInput.stop(!0),yield this.directionsInput.stop()})}}var t4=function(i,t,e,n){return new(e||(e=Promise))(function(s,o){function a(d){try{c(n.next(d))}catch(h){o(h)}}function l(d){try{c(n.throw(d))}catch(h){o(h)}}function c(d){d.done?s(d.value):function r(s){return s instanceof e?s:new e(function(o){o(s)})}(d.value).then(a,l)}c((n=n.apply(i,t||[])).next())})};const Use={mouseOptions:{},orbiting:{sensitivityX:1,sensitivityY:1},orbitingElasticity:0,zooming:{sensitivity:1},panning:{sensitivityX:1,sensitivityY:1},dollying:{sensitivity:1}};class Vse extends Xh{get active(){return super.active}set active(t){!super.active&&t&&this.reset(),super.active=t}get spherical(){return this._spherical}set spherical(t){this._spherical.phi=Math.max(1e-6,Math.min(Math.PI-1e-6,t.phi)),this._spherical.theta=t.theta,this._spherical.radius=t.radius,this.resetMotion$.next()}constructor(t,e={}){super(),this.camera=t,this.tickOrder=oc.INPUT_CONTROLLERS,this._spherical={phi:0,radius:10,theta:0},this.target=Oe.O,this.resetMotion$=new Te,this.options=Object.assign(Object.assign({},Use),e),this.mouseInput=new jm(this.options.mouseOptions)}reset(){let t=Oe.dist(this.target,this.camera.position);this.target=Oe.add(this.camera.position,Oe.rot({x:0,y:0,z:-t},this.camera.rotation)),this._spherical=Oe.toSpherical(Oe.sub(this.camera.position,this.target)),this.resetMotion$.next()}onSpawned(t){const e=Object.create(null,{onSpawned:{get:()=>super.onSpawned}});return t4(this,void 0,void 0,function*(){if(yield e.onSpawned.call(this,t),this._spherical=Oe.toSpherical(Oe.sub(this.camera.position,this.target)),this.options.orbiting){let r=this.mouseInput.delta$.pipe(Ue(this._onRemoved$),gn(()=>this.active&&this.mouseInput.state==Ls.DRAG));if(this.options.orbitingElasticity>0){const s=new Qe(this._spherical);r.subscribe(a=>{const l=s.getValue();s.next({phi:Math.max(1e-6,Math.min(Math.PI-1e-6,l.phi-a.y*this.options.orbiting.sensitivityY/1e3)),theta:l.theta-a.x*this.options.orbiting.sensitivityX/1e3,radius:1})});const o=()=>{s.pipe(Ue(this._onRemoved$),tk(this.tick$,this.options.orbitingElasticity,(a,l,c)=>({phi:a.phi+c*(l.phi-a.phi),theta:a.theta+c*(l.theta-a.theta),radius:1}),(a,l)=>yi.dist({x:a.phi,y:a.theta},{x:l.phi,y:l.theta})<1e-4),Ue(this.resetMotion$)).subscribe(a=>{this._spherical.theta=a.theta,this._spherical.phi=a.phi})};this.resetMotion$.pipe(Ue(this._onRemoved$)).subscribe(()=>{s.next(this._spherical),o()}),o()}else r.subscribe(s=>{this._spherical.theta-=s.x*this.options.orbiting.sensitivityX/1e3,this._spherical.phi-=s.y*this.options.orbiting.sensitivityY/1e3,this._spherical.phi=Math.max(1e-6,Math.min(Math.PI-1e-6,this._spherical.phi))})}this.options.zooming&&this.mouseInput.wheel$.pipe(Ue(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=Oe.fromSpherical(this._spherical),o=Oe.rotAround(s,{x:-Math.sin(this._spherical.theta),y:Math.cos(this._spherical.theta),z:0},Math.PI/2),a=Oe.rotAround(s,Oe.norm(o),Math.PI/2);this.target=Oe.add(this.target,Oe.add(Oe.scalarMult(o,-this.options.panning.sensitivityY*r.y/1e3),Oe.scalarMult(a,this.options.panning.sensitivityX*r.x/1e3)))};this.options.panning&&this.mouseInput.delta$.pipe(Ue(this._onRemoved$),gn(()=>this.mouseInput.state==Ls.DRAG_RIGHT_BUTTON)).subscribe(r=>{n(r)}),this.options.dollying&&this.mouseInput.delta$.pipe(Ue(this._onRemoved$),gn(()=>this.mouseInput.state==Ls.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(Ue(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(Ue(this._onRemoved$),gn(()=>this.active),tt(()=>this._spherical)).subscribe(r=>{this.camera.position=Oe.add(this.target,Oe.fromSpherical(r)),this.camera.rotation=Qi.lookAt(this.camera.position,this.target)}),yield this.mouseInput.start()})}onRemoved(){const t=Object.create(null,{onRemoved:{get:()=>super.onRemoved}});return t4(this,void 0,void 0,function*(){yield t.onRemoved.call(this),yield this.mouseInput.stop(!0)})}}class Hse{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 rk=function(i,t,e,n){return new(e||(e=Promise))(function(s,o){function a(d){try{c(n.next(d))}catch(h){o(h)}}function l(d){try{c(n.throw(d))}catch(h){o(h)}}function c(d){d.done?s(d.value):function r(s){return s instanceof e?s:new e(function(o){o(s)})}(d.value).then(a,l)}c((n=n.apply(i,t||[])).next())})},yu=(()=>{return(i=yu||(yu={}))[i.Nothing=0]="Nothing",i[i.Files=1]="Files",i[i.Entities=2]="Entities",yu;var i})();const n4={cachingStrategy:yu.Nothing,position:Oe.O,rotation:Qi.O,loadProps:!0},i4=i=>({meta:i.meta,resources:i.resources.map(({object3D:t,body:e})=>({object3D:t&&t.clone(),body:e&&e.clone()}))});class $se{constructor(t){this.world=t,this.filesCache=new Map,this.loadResultCache=new Map}loadGgGlbFiles(t){return rk(this,arguments,void 0,function*(e,n=!1){if(n&&this.filesCache.has(e))return this.filesCache.get(e);const r=Promise.all([fetch(`${e}.glb`).then(o=>o.arrayBuffer()),fetch(`${e}.meta`).then(o=>o.text()).then(o=>JSON.parse(o))]);n&&this.filesCache.set(e,r);const s=yield r;return n&&this.filesCache.set(e,s),s})}loadGgGlbResources(t){return rk(this,arguments,void 0,function*(e,n=yu.Nothing){if(n==yu.Entities&&this.loadResultCache.has(e)){const c=this.loadResultCache.get(e),d=c instanceof Promise?yield c:c;return i4(d)}const[r,s]=yield this.loadGgGlbFiles(e,n==yu.Files);if(!r)throw new Error("GLB not found");const[o,a]=yield Promise.all([this.world.visualScene.loader.loadFromGgGlb(r,s),this.world.physicsWorld.loader.loadFromGgGlb(r,s)]),l={resources:[],meta:s};if(!o)return l;if(0==a.length)l.resources.push({object3D:o,body:null});else if(1==a.length)l.resources.push({object3D:o,body:a[0]});else{for(const c of a)l.resources.push({object3D:o.popChild(c.name),body:c});o.isEmpty()||l.resources.push({object3D:o,body:null})}return n==yu.Entities&&this.loadResultCache.set(e,i4(l)),l})}loadGgGlb(t){return rk(this,arguments,void 0,function*(e,n=n4){const r=Object.assign(Object.assign({},n4),n),{resources:s,meta:o}=yield this.loadGgGlbResources(e,r.cachingStrategy),a={entities:s.map(l=>new vl({object3D:l.object3D,objectBody:l.body})),meta:o};return r.loadProps&&(a.props=yield Promise.all(o.dummies.filter(l=>l.is_prop||l.is_scene).map(l=>this.loadGgGlb(l.is_prop?(r.propsPath||e.substring(0,e.lastIndexOf("/")+1))+l.prop_id:l.scene_id,{loadProps:!!l.is_scene,position:Oe.add(Oe.rot(l.position,r.rotation),r.position),rotation:Qi.combineRotations(l.rotation,r.rotation)})))),a.entities.forEach(l=>{l.position=Oe.add(Oe.rot(Oe.clone(l.position),r.rotation),r.position),l.rotation=Qi.mult(Qi.clone(l.rotation),r.rotation)}),a})}}class sk extends _l{constructor(t,e){super(t,e),this.visualScene=t,this.physicsWorld=e,this.loader=new $se(this)}addPrimitiveRigidBody(t,e=Oe.O,n=Qi.O,r={}){const s=new vl({object3D:this.visualScene.factory.createPrimitive(t.shape,r),objectBody:this.physicsWorld.factory.createRigidBody(t)});return s.position=e,s.rotation=n,this.addEntity(s),s}addRenderer(t,e,n){const r=new Nse(this.visualScene.createRenderer(t,e,n));return this.addEntity(r),r}registerConsoleCommands(t){super.registerConsoleCommands(t),t.registerConsoleCommand(this,"gravity",(...e)=>function(i,t,e,n){return new(e||(e=Promise))(function(s,o){function a(d){try{c(n.next(d))}catch(h){o(h)}}function l(d){try{c(n.throw(d))}catch(h){o(h)}}function c(d){d.done?s(d.value):function r(s){return s instanceof e?s:new e(function(o){o(s)})}(d.value).then(a,l)}c((n=n.apply(i,t||[])).next())})}(this,void 0,void 0,function*(){if(1==e.length&&(e=["0","0",""+-+e[0]]),e.length>0){if(isNaN(+e[0])||isNaN(+e[1])||isNaN(+e[2]))throw new Error("Wrong arguments");this.physicsWorld.gravity={x:+e[0],y:+e[1],z:+e[2]}}return JSON.stringify(this.physicsWorld.gravity)}),'args: [ ?float, ?float, ?float ]; Get or set 3D world gravity vector. 1 argument sets vector {x: 0, y: 0, z: -value}, 3 arguments set the whole vector. Default value is "9.82" or "0 0 -9.82"')}}window.gg_version="0.0.56";const Yse=0,r4=1,qse=2,s4=1,o4=2,Qc=3,lc=0,Ro=1,co=2,Jc=0,Xm=1,a4=2,l4=3,c4=4,Xse=5,Kh=100,Kse=101,Zse=102,Qse=103,Jse=104,eoe=200,toe=201,noe=202,ioe=203,ak=204,lk=205,roe=206,soe=207,ooe=208,aoe=209,loe=210,coe=211,doe=212,uoe=213,hoe=214,foe=0,poe=1,moe=2,MC=3,goe=4,_oe=5,voe=6,yoe=7,CC=0,boe=1,xoe=2,bu=0,woe=1,Moe=2,Coe=3,Soe=4,Eoe=5,Aoe=6,Doe=7,d4="attached",cc=301,Zh=302,SC=303,EC=304,mb=306,ko=1e3,Ji=1001,gb=1002,vr=1003,dk=1004,Km=1005,lr=1006,_b=1007,yl=1008,ed=1009,u4=1010,h4=1011,vb=1012,uk=1013,xu=1014,Jo=1015,Zm=1016,hk=1017,fk=1018,Qm=1020,f4=35902,p4=1021,m4=1022,Po=1023,g4=1024,_4=1025,Jm=1026,eg=1027,pk=1028,AC=1029,v4=1030,mk=1031,gk=1033,DC=33776,TC=33777,IC=33778,RC=33779,_k=35840,vk=35841,yk=35842,bk=35843,xk=36196,wk=37492,Mk=37496,Ck=37808,Sk=37809,Ek=37810,Ak=37811,Dk=37812,Tk=37813,Ik=37814,Rk=37815,kk=37816,Pk=37817,Ok=37818,Fk=37819,Lk=37820,Nk=37821,kC=36492,Bk=36494,Uk=36495,y4=36283,Vk=36284,zk=36285,Hk=36286,yb=2300,bb=2301,Poe=0,x4=1,Wk=2,Foe=3201,Qh=0,Loe=1,wu="",cs="srgb",ds="srgb-linear",jk="display-p3",OC="display-p3-linear",FC="linear",Fi="srgb",LC="rec709",NC="p3",ig=7680,Noe=512,Boe=513,Uoe=514,M4=515,Voe=516,zoe=517,Hoe=518,$oe=519,C4="300 es",td=2e3;class rg{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]+Ns[i>>16&255]+Ns[i>>24&255]+"-"+Ns[255&t]+Ns[t>>8&255]+"-"+Ns[t>>16&15|64]+Ns[t>>24&255]+"-"+Ns[63&e|128]+Ns[e>>8&255]+"-"+Ns[e>>16&255]+Ns[e>>24&255]+Ns[255&n]+Ns[n>>8&255]+Ns[n>>16&255]+Ns[n>>24&255]).toLowerCase()}function er(i,t,e){return Math.max(t,Math.min(e,i))}function Yk(i,t){return(i%t+t)%t}function xb(i,t,e){return(1-e)*i+e*t}function uo(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 yn(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 oae_radToDeg=function tae(i){return i*sg};class xe{constructor(t=0,e=0){xe.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(er(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 wn{constructor(t,e,n,r,s,o,a,l,c){wn.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 d=this.elements;return d[0]=t,d[1]=r,d[2]=a,d[3]=e,d[4]=s,d[5]=l,d[6]=n,d[7]=o,d[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],d=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],F=r[2],D=r[5],k=r[8];return s[0]=o*b+a*M+l*F,s[3]=o*v+a*x+l*D,s[6]=o*y+a*C+l*k,s[1]=c*b+d*M+h*F,s[4]=c*v+d*x+h*D,s[7]=c*y+d*C+h*k,s[2]=p*b+m*M+g*F,s[5]=p*v+m*x+g*D,s[8]=p*y+m*C+g*k,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],d=t[8];return e*o*d-e*a*c-n*s*d+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],d=t[8],h=d*o-a*c,p=a*l-d*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-d*n)*b,t[2]=(a*n-r*o)*b,t[3]=p*b,t[4]=(d*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(qk.makeScale(t,e)),this}rotate(t){return this.premultiply(qk.makeRotation(-t)),this}translate(t,e){return this.premultiply(qk.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 qk=new wn;function E4(i){for(let t=i.length-1;t>=0;--t)if(i[t]>=65535)return!0;return!1}function wb(i){return document.createElementNS("http://www.w3.org/1999/xhtml",i)}function lae(){const i=wb("canvas");return i.style.display="block",i}Int8Array,Uint8Array,Uint8ClampedArray,Int16Array,Uint16Array,Int32Array,Uint32Array,Float32Array,Float64Array;const A4={};function ag(i){i in A4||(A4[i]=!0,console.warn(i))}const D4=(new wn).set(.8224621,.177538,0,.0331941,.9668058,0,.0170827,.0723974,.9105199),T4=(new wn).set(1.2249401,-.2249404,0,-.0420569,1.0420571,0,-.0196376,-.0786361,1.0982735),Mb={[ds]:{transfer:FC,primaries:LC,luminanceCoefficients:[.2126,.7152,.0722],toReference:i=>i,fromReference:i=>i},[cs]:{transfer:Fi,primaries:LC,luminanceCoefficients:[.2126,.7152,.0722],toReference:i=>i.convertSRGBToLinear(),fromReference:i=>i.convertLinearToSRGB()},[OC]:{transfer:FC,primaries:NC,luminanceCoefficients:[.2289,.6917,.0793],toReference:i=>i.applyMatrix3(T4),fromReference:i=>i.applyMatrix3(D4)},[jk]:{transfer:Fi,primaries:NC,luminanceCoefficients:[.2289,.6917,.0793],toReference:i=>i.convertSRGBToLinear().applyMatrix3(T4),fromReference:i=>i.applyMatrix3(D4).convertLinearToSRGB()}},dae=new Set([ds,OC]),ei={enabled:!0,_workingColorSpace:ds,get workingColorSpace(){return this._workingColorSpace},set workingColorSpace(i){if(!dae.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,Mb[e].fromReference)((0,Mb[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 Mb[i].primaries},getTransfer:function(i){return i===wu?FC:Mb[i].transfer},getLuminanceCoefficients:function(i,t=this._workingColorSpace){return i.fromArray(Mb[t].luminanceCoefficients)}};function lg(i){return i<.04045?.0773993808*i:Math.pow(.9478672986*i+.0521327014,2.4)}function Xk(i){return i<.0031308?12.92*i:1.055*Math.pow(i,.41666)-.055}let cg;class uae{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===cg&&(cg=wb("canvas")),cg.width=t.width,cg.height=t.height;const n=cg.getContext("2d");t instanceof ImageData?n.putImageData(t,0,0):n.drawImage(t,0,0,t.width,t.height),e=cg}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=wb("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 rg{constructor(e=i.DEFAULT_IMAGE,n=i.DEFAULT_MAPPING,r=Ji,s=Ji,o=lr,a=yl,l=Po,c=ed,d=i.DEFAULT_ANISOTROPY,h=wu){super(),this.isTexture=!0,Object.defineProperty(this,"id",{value:fae++}),this.uuid=ea(),this.name="",this.source=new dg(e),this.mipmaps=[],this.mapping=n,this.channel=0,this.wrapS=r,this.wrapT=s,this.magFilter=o,this.minFilter=a,this.anisotropy=d,this.format=l,this.internalFormat=null,this.type=c,this.offset=new xe(0,0),this.repeat=new xe(1,1),this.center=new xe(0,0),this.rotation=0,this.matrixAutoUpdate=!0,this.matrix=new wn,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 ko:e.x=e.x-Math.floor(e.x);break;case Ji:e.x=e.x<0?0:1;break;case gb: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 ko:e.y=e.y-Math.floor(e.y);break;case Ji:e.y=e.y<0?0:1;break;case gb: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 vi{constructor(t=0,e=0,n=0,r=1){vi.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],d=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(d-p)<.01&&Math.abs(h-b)<.01&&Math.abs(g-v)<.01){if(Math.abs(d+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,F=(y+1)/2,D=(d+p)/4,k=(h+b)/4,B=(g+v)/4;return x>C&&x>F?x<.01?(n=0,r=.707106781,s=.707106781):(n=Math.sqrt(x),r=D/n,s=k/n):C>F?C<.01?(n=.707106781,r=0,s=.707106781):(r=Math.sqrt(C),n=D/r,s=B/r):F<.01?(n=.707106781,r=.707106781,s=0):(s=Math.sqrt(F),n=k/s,r=B/s),this.set(n,r,s,e),this}let M=Math.sqrt((v-g)*(v-g)+(h-b)*(h-b)+(p-d)*(p-d));return Math.abs(M)<.001&&(M=1),this.x=(v-g)/M,this.y=(h-b)/M,this.z=(p-d)/M,this.w=Math.acos((c+m+y-1)/2),this}setFromMatrixPosition(t){const e=t.elements;return this.x=e[12],this.y=e[13],this.z=e[14],this.w=e[15],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 pae extends rg{constructor(t=1,e=1,n={}){super(),this.isRenderTarget=!0,this.width=t,this.height=e,this.depth=1,this.scissor=new vi(0,0,t,e),this.scissorTest=!1,this.viewport=new vi(0,0,t,e);const r={width:t,height:e,depth:1};n=Object.assign({generateMipmaps:!1,internalFormat:null,minFilter:lr,depthBuffer:!0,stencilBuffer:!1,resolveDepthBuffer:!0,resolveStencilBuffer:!0,depthTexture:null,samples:0,count:1},n);const s=new Oo(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 F=Math.sqrt(x),D=Math.atan2(F,y*M);v=Math.sin(v*D)/F,a=Math.sin(a*D)/F}const C=a*M;if(l=l*v+p*C,c=c*v+m*C,d=d*v+g*C,h=h*v+b*C,v===1-a){const F=1/Math.sqrt(l*l+c*c+d*d+h*h);l*=F,c*=F,d*=F,h*=F}}t[e]=l,t[e+1]=c,t[e+2]=d,t[e+3]=h}static multiplyQuaternionsFlat(t,e,n,r,s,o){const a=n[r],l=n[r+1],c=n[r+2],d=n[r+3],h=s[o],p=s[o+1],m=s[o+2],g=s[o+3];return t[e]=a*g+d*h+l*m-c*p,t[e+1]=l*g+d*p+c*h-a*m,t[e+2]=c*g+d*m+a*p-l*h,t[e+3]=d*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),d=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*d*h+c*m*g,this._y=c*m*h-p*d*g,this._z=c*d*g+p*m*h,this._w=c*d*h-p*m*g;break;case"YXZ":this._x=p*d*h+c*m*g,this._y=c*m*h-p*d*g,this._z=c*d*g-p*m*h,this._w=c*d*h+p*m*g;break;case"ZXY":this._x=p*d*h-c*m*g,this._y=c*m*h+p*d*g,this._z=c*d*g+p*m*h,this._w=c*d*h-p*m*g;break;case"ZYX":this._x=p*d*h-c*m*g,this._y=c*m*h+p*d*g,this._z=c*d*g-p*m*h,this._w=c*d*h+p*m*g;break;case"YZX":this._x=p*d*h+c*m*g,this._y=c*m*h+p*d*g,this._z=c*d*g-p*m*h,this._w=c*d*h-p*m*g;break;case"XZY":this._x=p*d*h-c*m*g,this._y=c*m*h-p*d*g,this._z=c*d*g+p*m*h,this._w=c*d*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],d=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=(d-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=(d-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+d)/m}else{const m=2*Math.sqrt(1+h-n-a);this._w=(o-r)/m,this._x=(s+c)/m,this._y=(l+d)/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(er(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,d=e._w;return this._x=n*d+o*a+r*c-s*l,this._y=r*d+o*l+s*a-n*c,this._z=s*d+o*c+n*l-r*a,this._w=o*d-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),d=Math.atan2(c,a),h=Math.sin((1-e)*d)/c,p=Math.sin(e*d)/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 O{constructor(t=0,e=0,n=0){O.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(R4.setFromEuler(t))}applyAxisAngle(t,e){return this.applyQuaternion(R4.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),d=2*(a*e-s*r),h=2*(s*n-o*e);return this.x=e+l*c+o*h-a*d,this.y=n+l*d+a*c-s*h,this.z=r+l*h+s*d-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 Qk.copy(this).projectOnVector(t),this.sub(Qk)}reflect(t){return this.sub(Qk.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(er(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 Qk=new O,R4=new ho;class Bs{constructor(t=new O(1/0,1/0,1/0),e=new O(-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;e=this.min.x&&t.x<=this.max.x&&t.y>=this.min.y&&t.y<=this.max.y&&t.z>=this.min.z&&t.z<=this.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.x>=this.min.x&&t.min.x<=this.max.x&&t.max.y>=this.min.y&&t.min.y<=this.max.y&&t.max.z>=this.min.z&&t.min.z<=this.max.z}intersectsSphere(t){return this.clampPoint(t.center,bl),bl.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(Cb),zC.subVectors(this.max,Cb),ug.subVectors(t.a,Cb),hg.subVectors(t.b,Cb),fg.subVectors(t.c,Cb),Cu.subVectors(hg,ug),Su.subVectors(fg,hg),ef.subVectors(ug,fg);let e=[0,-Cu.z,Cu.y,0,-Su.z,Su.y,0,-ef.z,ef.y,Cu.z,0,-Cu.x,Su.z,0,-Su.x,ef.z,0,-ef.x,-Cu.y,Cu.x,0,-Su.y,Su.x,0,-ef.y,ef.x,0];return!(!Jk(e,ug,hg,fg,zC)||(e=[1,0,0,0,1,0,0,0,1],!Jk(e,ug,hg,fg,zC)))&&(HC.crossVectors(Cu,Su),e=[HC.x,HC.y,HC.z],Jk(e,ug,hg,fg,zC))}clampPoint(t,e){return e.copy(t).clamp(this.min,this.max)}distanceToPoint(t){return this.clampPoint(t,bl).distanceTo(t)}getBoundingSphere(t){return this.isEmpty()?t.makeEmpty():(this.getCenter(t.center),t.radius=.5*this.getSize(bl).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()||(nd[0].set(this.min.x,this.min.y,this.min.z).applyMatrix4(t),nd[1].set(this.min.x,this.min.y,this.max.z).applyMatrix4(t),nd[2].set(this.min.x,this.max.y,this.min.z).applyMatrix4(t),nd[3].set(this.min.x,this.max.y,this.max.z).applyMatrix4(t),nd[4].set(this.max.x,this.min.y,this.min.z).applyMatrix4(t),nd[5].set(this.max.x,this.min.y,this.max.z).applyMatrix4(t),nd[6].set(this.max.x,this.max.y,this.min.z).applyMatrix4(t),nd[7].set(this.max.x,this.max.y,this.max.z).applyMatrix4(t),this.setFromPoints(nd)),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 nd=[new O,new O,new O,new O,new O,new O,new O,new O],bl=new O,VC=new Bs,ug=new O,hg=new O,fg=new O,Cu=new O,Su=new O,ef=new O,Cb=new O,zC=new O,HC=new O,tf=new O;function Jk(i,t,e,n,r){for(let s=0,o=i.length-3;s<=o;s+=3){tf.fromArray(i,s);const a=r.x*Math.abs(tf.x)+r.y*Math.abs(tf.y)+r.z*Math.abs(tf.z),l=t.dot(tf),c=e.dot(tf),d=n.dot(tf);if(Math.max(-Math.max(l,c,d),Math.min(l,c,d))>a)return!1}return!0}const mae=new Bs,Sb=new O,eP=new O;class Us{constructor(t=new O,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):mae.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;Sb.subVectors(t,this.center);const e=Sb.lengthSq();if(e>this.radius*this.radius){const n=Math.sqrt(e),r=.5*(n-this.radius);this.center.addScaledVector(Sb,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):(eP.subVectors(t.center,this.center).setLength(t.radius),this.expandByPoint(Sb.copy(t.center).add(eP)),this.expandByPoint(Sb.copy(t.center).sub(eP))),this)}equals(t){return t.center.equals(this.center)&&t.radius===this.radius}clone(){return(new this.constructor).copy(this)}}const id=new O,tP=new O,$C=new O,Eu=new O,nP=new O,GC=new O,iP=new O;class Eb{constructor(t=new O,e=new O(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,id)),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=id.subVectors(t,this.origin).dot(this.direction);return e<0?this.origin.distanceToSquared(t):(id.copy(this.origin).addScaledVector(this.direction,e),id.distanceToSquared(t))}distanceSqToSegment(t,e,n,r){tP.copy(t).add(e).multiplyScalar(.5),$C.copy(e).sub(t).normalize(),Eu.copy(this.origin).sub(tP);const s=.5*t.distanceTo(e),o=-this.direction.dot($C),a=Eu.dot(this.direction),l=-Eu.dot($C),c=Eu.lengthSq(),d=Math.abs(1-o*o);let h,p,m,g;if(d>0)if(h=o*l-a,p=o*a-l,g=s*d,h>=0)if(p>=-g)if(p<=g){const b=1/d;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(tP).addScaledVector($C,p),m}intersectSphere(t,e){id.subVectors(t.center,this.origin);const n=id.dot(this.direction),r=id.dot(id)-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,d=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),d>=0?(s=(t.min.y-p.y)*d,o=(t.max.y-p.y)*d):(s=(t.max.y-p.y)*d,o=(t.min.y-p.y)*d),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,id)}intersectTriangle(t,e,n,r,s){nP.subVectors(e,t),GC.subVectors(n,t),iP.crossVectors(nP,GC);let a,o=this.direction.dot(iP);if(o>0){if(r)return null;a=1}else{if(!(o<0))return null;a=-1,o=-o}Eu.subVectors(this.origin,t);const l=a*this.direction.dot(GC.crossVectors(Eu,GC));if(l<0)return null;const c=a*this.direction.dot(nP.cross(Eu));if(c<0||l+c>o)return null;const d=-a*Eu.dot(iP);return d<0?null:this.at(d/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 Bt{constructor(t,e,n,r,s,o,a,l,c,d,h,p,m,g,b,v){Bt.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,d,h,p,m,g,b,v)}set(t,e,n,r,s,o,a,l,c,d,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]=d,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 Bt).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/pg.setFromMatrixColumn(t,0).length(),s=1/pg.setFromMatrixColumn(t,1).length(),o=1/pg.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),d=Math.cos(s),h=Math.sin(s);if("XYZ"===t.order){const p=o*d,m=o*h,g=a*d,b=a*h;e[0]=l*d,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*d,m=l*h,g=c*d,b=c*h;e[0]=p+b*a,e[4]=g*a-m,e[8]=o*c,e[1]=o*h,e[5]=o*d,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*d,m=l*h,g=c*d,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*d,e[9]=b-p*a,e[2]=-o*c,e[6]=a,e[10]=o*l}else if("ZYX"===t.order){const p=o*d,m=o*h,g=a*d,b=a*h;e[0]=l*d,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*d,e[4]=b-p*h,e[8]=g*h+m,e[1]=h,e[5]=o*d,e[9]=-a*d,e[2]=-c*d,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*d,e[4]=-h,e[8]=c*d,e[1]=p*h+b,e[5]=o*d,e[9]=m*h-g,e[2]=g*h-m,e[6]=a*d,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(gae,t,_ae)}lookAt(t,e,n){const r=this.elements;return ta.subVectors(t,e),0===ta.lengthSq()&&(ta.z=1),ta.normalize(),Au.crossVectors(n,ta),0===Au.lengthSq()&&(1===Math.abs(n.z)?ta.x+=1e-4:ta.z+=1e-4,ta.normalize(),Au.crossVectors(n,ta)),Au.normalize(),WC.crossVectors(ta,Au),r[0]=Au.x,r[4]=WC.x,r[8]=ta.x,r[1]=Au.y,r[5]=WC.y,r[9]=ta.y,r[2]=Au.z,r[6]=WC.z,r[10]=ta.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],d=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],F=n[15],D=r[0],k=r[4],B=r[8],T=r[12],A=r[1],W=r[5],ie=r[9],ne=r[13],oe=r[2],ge=r[6],q=r[10],se=r[14],J=r[3],we=r[7],Ve=r[11],Ye=r[15];return s[0]=o*D+a*A+l*oe+c*J,s[4]=o*k+a*W+l*ge+c*we,s[8]=o*B+a*ie+l*q+c*Ve,s[12]=o*T+a*ne+l*se+c*Ye,s[1]=d*D+h*A+p*oe+m*J,s[5]=d*k+h*W+p*ge+m*we,s[9]=d*B+h*ie+p*q+m*Ve,s[13]=d*T+h*ne+p*se+m*Ye,s[2]=g*D+b*A+v*oe+y*J,s[6]=g*k+b*W+v*ge+y*we,s[10]=g*B+b*ie+v*q+y*Ve,s[14]=g*T+b*ne+v*se+y*Ye,s[3]=M*D+x*A+C*oe+F*J,s[7]=M*k+x*W+C*ge+F*we,s[11]=M*B+x*ie+C*q+F*Ve,s[15]=M*T+x*ne+C*se+F*Ye,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],d=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*d-s*l*d)+t[11]*(+e*c*h-e*a*m-s*o*h+n*o*m+s*a*d-n*c*d)+t[15]*(-r*a*d-e*l*h+e*a*p+r*o*h-n*o*p+n*l*d)}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],d=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-d*v*c-g*l*m+o*v*m+d*l*y-o*p*y,C=d*b*c-g*h*c+g*a*m-o*b*m-d*a*y+o*h*y,F=g*h*l-d*b*l-g*a*p+o*b*p+d*a*v-o*h*v,D=e*M+n*x+r*C+s*F;if(0===D)return this.set(0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0);const k=1/D;return t[0]=M*k,t[1]=(b*p*s-h*v*s-b*r*m+n*v*m+h*r*y-n*p*y)*k,t[2]=(a*v*s-b*l*s+b*r*c-n*v*c-a*r*y+n*l*y)*k,t[3]=(h*l*s-a*p*s-h*r*c+n*p*c+a*r*m-n*l*m)*k,t[4]=x*k,t[5]=(d*v*s-g*p*s+g*r*m-e*v*m-d*r*y+e*p*y)*k,t[6]=(g*l*s-o*v*s-g*r*c+e*v*c+o*r*y-e*l*y)*k,t[7]=(o*p*s-d*l*s+d*r*c-e*p*c-o*r*m+e*l*m)*k,t[8]=C*k,t[9]=(g*h*s-d*b*s-g*n*m+e*b*m+d*n*y-e*h*y)*k,t[10]=(o*b*s-g*a*s+g*n*c-e*b*c-o*n*y+e*a*y)*k,t[11]=(d*a*s-o*h*s-d*n*c+e*h*c+o*n*m-e*a*m)*k,t[12]=F*k,t[13]=(d*b*r-g*h*r+g*n*p-e*b*p-d*n*v+e*h*v)*k,t[14]=(g*a*r-o*b*r-g*n*l+e*b*l+o*n*v-e*a*v)*k,t[15]=(o*h*r-d*a*r+d*n*l-e*h*l-o*n*p+e*a*p)*k,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,d=s*a;return this.set(c*o+n,c*a-r*l,c*l+r*a,0,c*a+r*l,d*a+n,d*l-r*o,0,c*l-r*a,d*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,d=o+o,h=a+a,p=s*c,m=s*d,g=s*h,b=o*d,v=o*h,y=a*h,M=l*c,x=l*d,C=l*h,F=n.x,D=n.y,k=n.z;return r[0]=(1-(b+y))*F,r[1]=(m+C)*F,r[2]=(g-x)*F,r[3]=0,r[4]=(m-C)*D,r[5]=(1-(p+y))*D,r[6]=(v+M)*D,r[7]=0,r[8]=(g+x)*k,r[9]=(v-M)*k,r[10]=(1-(p+b))*k,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=pg.set(r[0],r[1],r[2]).length();const o=pg.set(r[4],r[5],r[6]).length(),a=pg.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],xl.copy(this);const c=1/s,d=1/o,h=1/a;return xl.elements[0]*=c,xl.elements[1]*=c,xl.elements[2]*=c,xl.elements[4]*=d,xl.elements[5]*=d,xl.elements[6]*=d,xl.elements[8]*=h,xl.elements[9]*=h,xl.elements[10]*=h,e.setFromRotationMatrix(xl),n.x=s,n.y=o,n.z=a,this}makePerspective(t,e,n,r,s,o,a=td){const l=this.elements,c=2*s/(e-t),d=2*s/(n-r),h=(e+t)/(e-t),p=(n+r)/(n-r);let m,g;if(a===td)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]=d,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=td){const l=this.elements,c=1/(e-t),d=1/(n-r),h=1/(o-s),p=(e+t)*c,m=(n+r)*d;let g,b;if(a===td)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*d,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 pg=new O,xl=new Bt,gae=new O(0,0,0),_ae=new O(1,1,1),Au=new O,WC=new O,ta=new O,k4=new Bt,P4=new ho;let rd=(()=>{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],d=s[5],h=s[9],p=s[2],m=s[6],g=s[10];switch(n){case"XYZ":this._y=Math.asin(er(l,-1,1)),Math.abs(l)<.9999999?(this._x=Math.atan2(-h,g),this._z=Math.atan2(-a,o)):(this._x=Math.atan2(m,d),this._z=0);break;case"YXZ":this._x=Math.asin(-er(h,-1,1)),Math.abs(h)<.9999999?(this._y=Math.atan2(l,g),this._z=Math.atan2(c,d)):(this._y=Math.atan2(-p,o),this._z=0);break;case"ZXY":this._x=Math.asin(er(m,-1,1)),Math.abs(m)<.9999999?(this._y=Math.atan2(-p,g),this._z=Math.atan2(-a,d)):(this._y=0,this._z=Math.atan2(c,o));break;case"ZYX":this._y=Math.asin(-er(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,d));break;case"YZX":this._z=Math.asin(er(c,-1,1)),Math.abs(c)<.9999999?(this._x=Math.atan2(-h,d),this._y=Math.atan2(-p,o)):(this._x=0,this._y=Math.atan2(l,g));break;case"XZY":this._z=Math.asin(-er(a,-1,1)),Math.abs(a)<.9999999?(this._x=Math.atan2(m,d),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 k4.makeRotationFromQuaternion(e),this.setFromRotationMatrix(k4,n,r)}setFromVector3(e,n=this._order){return this.set(e.x,e.y,e.z,n)}reorder(e){return P4.setFromEuler(this),this.setFromQuaternion(P4,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 rP{constructor(){this.mask=1}set(t){this.mask=(1<>>0}enable(t){this.mask|=1<{class i extends rg{constructor(){super(),this.isObject3D=!0,Object.defineProperty(this,"id",{value:vae++}),this.uuid=ea(),this.name="",this.type="Object3D",this.parent=null,this.children=[],this.up=i.DEFAULT_UP.clone();const e=new O,n=new rd,r=new ho,s=new O(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 Bt},normalMatrix:{value:new wn}}),this.matrix=new Bt,this.matrixWorld=new Bt,this.matrixAutoUpdate=i.DEFAULT_MATRIX_AUTO_UPDATE,this.matrixWorldAutoUpdate=i.DEFAULT_MATRIX_WORLD_AUTO_UPDATE,this.matrixWorldNeedsUpdate=!1,this.layers=new rP,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 mg.setFromAxisAngle(e,n),this.quaternion.multiply(mg),this}rotateOnWorldAxis(e,n){return mg.setFromAxisAngle(e,n),this.quaternion.premultiply(mg),this}rotateX(e){return this.rotateOnAxis(F4,e)}rotateY(e){return this.rotateOnAxis(L4,e)}rotateZ(e){return this.rotateOnAxis(N4,e)}translateOnAxis(e,n){return O4.copy(e).applyQuaternion(this.quaternion),this.position.add(O4.multiplyScalar(n)),this}translateX(e){return this.translateOnAxis(F4,e)}translateY(e){return this.translateOnAxis(L4,e)}translateZ(e){return this.translateOnAxis(N4,e)}localToWorld(e){return this.updateWorldMatrix(!0,!1),e.applyMatrix4(this.matrixWorld)}worldToLocal(e){return this.updateWorldMatrix(!0,!1),e.applyMatrix4(sd.copy(this.matrixWorld).invert())}lookAt(e,n,r){e.isVector3?jC.copy(e):jC.set(e,n,r);const s=this.parent;this.updateWorldMatrix(!0,!1),Ab.setFromMatrixPosition(this.matrixWorld),this.isCamera||this.isLight?sd.lookAt(Ab,jC,this.up):sd.lookAt(jC,Ab,this.up),this.quaternion.setFromRotationMatrix(sd),s&&(sd.extractRotation(s.matrixWorld),mg.setFromRotationMatrix(sd),this.quaternion.premultiply(mg.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.maxInstanceCount=this._maxInstanceCount,s.maxVertexCount=this._maxVertexCount,s.maxIndexCount=this._maxIndexCount,s.geometryInitialized=this._geometryInitialized,s.geometryCount=this._geometryCount,s.matricesTexture=this._matricesTexture.toJSON(e),null!==this._colorsTexture&&(s.colorsTexture=this._colorsTexture.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 d=0,h=c.length;d0){s.children=[];for(let l=0;l0){s.animations=[];for(let l=0;l0&&(r.geometries=l),c.length>0&&(r.materials=c),d.length>0&&(r.textures=d),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 d in l){const h=l[d];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){wl.subVectors(r,e),od.subVectors(n,e),oP.subVectors(t,e);const o=wl.dot(wl),a=wl.dot(od),l=wl.dot(oP),c=od.dot(od),d=od.dot(oP),h=o*c-a*a;if(0===h)return s.set(0,0,0),null;const p=1/h,m=(c*l-a*d)*p,g=(o*d-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,ad)&&ad.x>=0&&ad.y>=0&&ad.x+ad.y<=1}static getInterpolation(t,e,n,r,s,o,a,l){return null===this.getBarycoord(t,e,n,r,ad)?(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,ad.x),l.addScaledVector(o,ad.y),l.addScaledVector(a,ad.z),l)}static isFrontFacing(t,e,n,r){return wl.subVectors(n,e),od.subVectors(t,e),wl.cross(od).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 wl.subVectors(this.c,this.b),od.subVectors(this.a,this.b),.5*wl.cross(od).length()}getMidpoint(t){return t.addVectors(this.a,this.b).add(this.c).multiplyScalar(1/3)}getNormal(t){return Pa.getNormal(this.a,this.b,this.c,t)}getPlane(t){return t.setFromCoplanarPoints(this.a,this.b,this.c)}getBarycoord(t,e){return Pa.getBarycoord(t,this.a,this.b,this.c,e)}getInterpolation(t,e,n,r,s){return Pa.getInterpolation(t,this.a,this.b,this.c,e,n,r,s)}containsPoint(t){return Pa.containsPoint(t,this.a,this.b,this.c)}isFrontFacing(t){return Pa.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;_g.subVectors(r,n),vg.subVectors(s,n),aP.subVectors(t,n);const l=_g.dot(aP),c=vg.dot(aP);if(l<=0&&c<=0)return e.copy(n);lP.subVectors(t,r);const d=_g.dot(lP),h=vg.dot(lP);if(d>=0&&h<=d)return e.copy(r);const p=l*h-d*c;if(p<=0&&l>=0&&d<=0)return o=l/(l-d),e.copy(n).addScaledVector(_g,o);cP.subVectors(t,s);const m=_g.dot(cP),g=vg.dot(cP);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(vg,a);const v=d*g-m*h;if(v<=0&&h-d>=0&&m-g>=0)return U4.subVectors(s,r),a=(h-d)/(h-d+(m-g)),e.copy(r).addScaledVector(U4,a);const y=1/(v+b+p);return o=b*y,a=p*y,e.copy(n).addScaledVector(_g,o).addScaledVector(vg,a)}equals(t){return t.a.equals(this.a)&&t.b.equals(this.b)&&t.c.equals(this.c)}}const V4={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},Du={h:0,s:0,l:0},YC={h:0,s:0,l:0};function dP(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 qe{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=cs){return t=Math.floor(t),this.r=(t>>16&255)/255,this.g=(t>>8&255)/255,this.b=(255&t)/255,ei.toWorkingColorSpace(this,e),this}setRGB(t,e,n,r=ei.workingColorSpace){return this.r=t,this.g=e,this.b=n,ei.toWorkingColorSpace(this,r),this}setHSL(t,e,n,r=ei.workingColorSpace){if(t=Yk(t,1),e=er(e,0,1),n=er(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=dP(o,s,t+1/3),this.g=dP(o,s,t),this.b=dP(o,s,t-1/3)}return ei.toWorkingColorSpace(this,r),this}setStyle(t,e=cs){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=cs){const n=V4[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=lg(t.r),this.g=lg(t.g),this.b=lg(t.b),this}copyLinearToSRGB(t){return this.r=Xk(t.r),this.g=Xk(t.g),this.b=Xk(t.b),this}convertSRGBToLinear(){return this.copySRGBToLinear(this),this}convertLinearToSRGB(){return this.copyLinearToSRGB(this),this}getHex(t=cs){return ei.fromWorkingColorSpace(Vs.copy(this),t),65536*Math.round(er(255*Vs.r,0,255))+256*Math.round(er(255*Vs.g,0,255))+Math.round(er(255*Vs.b,0,255))}getHexString(t=cs){return("000000"+this.getHex(t).toString(16)).slice(-6)}getHSL(t,e=ei.workingColorSpace){ei.fromWorkingColorSpace(Vs.copy(this),e);const n=Vs.r,r=Vs.g,s=Vs.b,o=Math.max(n,r,s),a=Math.min(n,r,s);let l,c;const d=(a+o)/2;if(a===o)l=0,c=0;else{const h=o-a;switch(c=d<=.5?h/(o+a):h/(2-o-a),o){case n:l=(r-s)/h+(r0!=t>0&&this.version++,this._alphaTest=t}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.dispersion&&(n.dispersion=this.dispersion),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!==Xm&&(n.blending=this.blending),this.side!==lc&&(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!==ak&&(n.blendSrc=this.blendSrc),this.blendDst!==lk&&(n.blendDst=this.blendDst),this.blendEquation!==Kh&&(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!==MC&&(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!==ig&&(n.stencilFail=this.stencilFail),this.stencilZFail!==ig&&(n.stencilZFail=this.stencilZFail),this.stencilZPass!==ig&&(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++}onBuild(){console.warn("Material: onBuild() has been removed.")}onBeforeRender(){console.warn("Material: onBeforeRender() has been removed.")}}class cr extends Fo{constructor(t){super(),this.isMeshBasicMaterial=!0,this.type="MeshBasicMaterial",this.color=new qe(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 rd,this.combine=CC,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 yr=new O,qC=new xe;class Hi{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=Jo,this.version=0}onUploadCallback(){}set needsUpdate(t){!0===t&&this.version++}get updateRange(){return ag("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],d=[];for(let h=0,p=c.length;h0&&(r[l]=d,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 d=[],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))&&($4.copy(s).invert(),nf.copy(t.ray).applyMatrix4($4),(null===n.boundingBox||!1!==nf.intersectsBox(n.boundingBox))&&this._computeIntersections(t,e,nf)))}_computeIntersections(t,e,n){let r;const s=this.geometry,o=this.material,a=s.index,l=s.attributes.position,c=s.attributes.uv,d=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:tS.clone(),object:i}}(i,t,e,n,bg,xg,wg,eS);if(d){r&&(ZC.fromBufferAttribute(r,a),QC.fromBufferAttribute(r,l),JC.fromBufferAttribute(r,c),d.uv=Pa.getInterpolation(eS,bg,xg,wg,ZC,QC,JC,new xe)),s&&(ZC.fromBufferAttribute(s,a),QC.fromBufferAttribute(s,l),JC.fromBufferAttribute(s,c),d.uv1=Pa.getInterpolation(eS,bg,xg,wg,ZC,QC,JC,new xe)),o&&(W4.fromBufferAttribute(o,a),j4.fromBufferAttribute(o,l),Y4.fromBufferAttribute(o,c),d.normal=Pa.getInterpolation(eS,bg,xg,wg,W4,j4,Y4,new O),d.normal.dot(n.direction)>0&&d.normal.multiplyScalar(-1));const h={a,b:l,c,normal:new O,materialIndex:0};Pa.getNormal(bg,xg,wg,h.normal),d.face=h}return d}class rf 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=[],d=[],h=[];let p=0,m=0;function g(b,v,y,M,x,C,F,D,k,B,T){const A=C/k,W=F/B,ie=C/2,ne=F/2,oe=D/2,ge=k+1,q=B+1;let se=0,J=0;const we=new O;for(let Ve=0;Ve0?1:-1,d.push(we.x,we.y,we.z),h.push(Rt/k),h.push(1-Ve/B),se+=1}for(let Ve=0;Ve0&&(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 fP extends Fr{constructor(){super(),this.isCamera=!0,this.type="Camera",this.matrixWorldInverse=new Bt,this.projectionMatrix=new Bt,this.projectionMatrixInverse=new Bt,this.coordinateSystem=td}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 Tu=new O,K4=new xe,Z4=new xe;class br extends fP{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*sg*Math.atan(e),this.updateProjectionMatrix()}getFocalLength(){const t=Math.tan(.5*Jh*this.fov);return.5*this.getFilmHeight()/t}getEffectiveFOV(){return 2*sg*Math.atan(Math.tan(.5*Jh*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){Tu.set(-1,-1,.5).applyMatrix4(this.projectionMatrixInverse),e.set(Tu.x,Tu.y).multiplyScalar(-t/Tu.z),Tu.set(1,1,.5).applyMatrix4(this.projectionMatrixInverse),n.set(Tu.x,Tu.y).multiplyScalar(-t/Tu.z)}getViewSize(t,e){return this.getViewBounds(t,K4,Z4),e.subVectors(Z4,K4)}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*Jh*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 Tae extends Fr{constructor(t,e,n){super(),this.type="CubeCamera",this.renderTarget=n,this.coordinateSystem=null,this.activeMipmapLevel=0;const r=new br(-90,1,t,e);r.layers=this.layers,this.add(r);const s=new br(-90,1,t,e);s.layers=this.layers,this.add(s);const o=new br(-90,1,t,e);o.layers=this.layers,this.add(o);const a=new br(-90,1,t,e);a.layers=this.layers,this.add(a);const l=new br(-90,1,t,e);l.layers=this.layers,this.add(l);const c=new br(-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===td)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,d]=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,d),t.setRenderTarget(h,p,m),t.xr.enabled=g,n.texture.needsPMREMUpdate=!0}}class iS extends Oo{constructor(t,e,n,r,s,o,a,l,c,d){super(t=void 0!==t?t:[],e=void 0!==e?e:cc,n,r,s,o,a,l,c,d),this.isCubeTexture=!0,this.flipY=!1}get images(){return this.image}set images(t){this.image=t}}class Iae extends Mu{constructor(t=1,e={}){super(t,t,e),this.isWebGLCubeRenderTarget=!0;const n={width:t,height:t,depth:1};this.texture=new iS([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:lr}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 rf(5,5,5),s=new Ml({name:"CubemapFromEquirect",uniforms:Mg(n_uniforms),vertexShader:n_vertexShader,fragmentShader:n_fragmentShader,side:Ro,blending:Jc});s.uniforms.tEquirect.value=e;const o=new kn(r,s),a=e.minFilter;return e.minFilter===yl&&(e.minFilter=lr),new Tae(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 pP=new O,Rae=new O,kae=new wn;class sf{constructor(t=new O(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=pP.subVectors(n,e).cross(Rae.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(pP),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||kae.getNormalMatrix(t),r=this.coplanarPoint(pP).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 af=new Us,rS=new O;class sS{constructor(t=new sf,e=new sf,n=new sf,r=new sf,s=new sf,o=new sf){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=td){const n=this.planes,r=t.elements,s=r[0],o=r[1],a=r[2],l=r[3],c=r[4],d=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+d,v+g,C+M).normalize(),n[3].setComponents(l-o,p-d,v-g,C-M).normalize(),n[4].setComponents(l-a,p-h,v-b,C-x).normalize(),e===td)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(),af.copy(t.boundingSphere).applyMatrix4(t.matrixWorld);else{const e=t.geometry;null===e.boundingSphere&&e.computeBoundingSphere(),af.copy(e.boundingSphere).applyMatrix4(t.matrixWorld)}return this.intersectsSphere(af)}intersectsSprite(t){return af.center.set(0,0,0),af.radius=.7071067811865476,af.applyMatrix4(t.matrixWorld),this.intersectsSphere(af)}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,rS.y=r.normal.y>0?t.max.y:t.min.y,rS.z=r.normal.z>0?t.max.z:t.min.z,r.distanceToPoint(rS)<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 Q4(){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 Pae(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.isInterleavedBufferAttribute&&(a=a.data),a.isGLBufferAttribute){const d=t.get(a);return void((!d||d.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 ) || defined( USE_BATCHING_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 ) || defined( USE_BATCHING_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\n#ifdef USE_BATCHING_COLOR\n\tvec3 batchingColor = getBatchingColor( getIndirectIndex( gl_DrawID ) );\n\tvColor.xyz *= batchingColor.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}\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}",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_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\tfloat distanceFalloff = 1.0 / max( pow( lightDistance, decayExponent ), 0.01 );\n\tif ( cutoffDistance > 0.0 ) {\n\t\tdistanceFalloff *= pow2( saturate( 1.0 - pow4( lightDistance / cutoffDistance ) ) );\n\t}\n\treturn distanceFalloff;\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_DISPERSION\n\tmaterial.dispersion = dispersion;\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\tfloat dispersion;\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.shadowIntensity, 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.shadowIntensity, 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.shadowIntensity, 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 )\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\tfor ( int i = 0; i < MORPHTARGETS_COUNT; i ++ ) {\n\t\tif ( morphTargetInfluences[ i ] != 0.0 ) objectNormal += getMorph( gl_VertexID, i, 1 ).xyz * morphTargetInfluences[ i ];\n\t}\n#endif",morphtarget_pars_vertex:"#ifdef USE_MORPHTARGETS\n\t#ifndef USE_INSTANCING_MORPH\n\t\tuniform float morphTargetBaseInfluence;\n\t\tuniform float morphTargetInfluences[ MORPHTARGETS_COUNT ];\n\t#endif\n\tuniform sampler2DArray morphTargetsTexture;\n\tuniform ivec2 morphTargetsTextureSize;\n\tvec4 getMorph( const in int vertexIndex, const in int morphTargetIndex, const in int offset ) {\n\t\tint texelIndex = vertexIndex * MORPHTARGETS_TEXTURE_STRIDE + offset;\n\t\tint y = texelIndex / morphTargetsTextureSize.x;\n\t\tint x = texelIndex - y * morphTargetsTextureSize.x;\n\t\tivec3 morphUV = ivec3( x, y, morphTargetIndex );\n\t\treturn texelFetch( morphTargetsTexture, morphUV, 0 );\n\t}\n#endif",morphtarget_vertex:"#ifdef USE_MORPHTARGETS\n\ttransformed *= morphTargetBaseInfluence;\n\tfor ( int i = 0; i < MORPHTARGETS_COUNT; i ++ ) {\n\t\tif ( morphTargetInfluences[ i ] != 0.0 ) transformed += getMorph( gl_VertexID, i, 0 ).xyz * morphTargetInfluences[ i ];\n\t}\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.;const float ShiftRight8 = 1. / 256.;\nconst float Inv255 = 1. / 255.;\nconst vec4 PackFactors = vec4( 1.0, 256.0, 256.0 * 256.0, 256.0 * 256.0 * 256.0 );\nconst vec2 UnpackFactors2 = vec2( UnpackDownscale, 1.0 / PackFactors.g );\nconst vec3 UnpackFactors3 = vec3( UnpackDownscale / PackFactors.rg, 1.0 / PackFactors.b );\nconst vec4 UnpackFactors4 = vec4( UnpackDownscale / PackFactors.rgb, 1.0 / PackFactors.a );\nvec4 packDepthToRGBA( const in float v ) {\n\tif( v <= 0.0 )\n\t\treturn vec4( 0., 0., 0., 0. );\n\tif( v >= 1.0 )\n\t\treturn vec4( 1., 1., 1., 1. );\n\tfloat vuf;\n\tfloat af = modf( v * PackFactors.a, vuf );\n\tfloat bf = modf( vuf * ShiftRight8, vuf );\n\tfloat gf = modf( vuf * ShiftRight8, vuf );\n\treturn vec4( vuf * Inv255, gf * PackUpscale, bf * PackUpscale, af );\n}\nvec3 packDepthToRGB( const in float v ) {\n\tif( v <= 0.0 )\n\t\treturn vec3( 0., 0., 0. );\n\tif( v >= 1.0 )\n\t\treturn vec3( 1., 1., 1. );\n\tfloat vuf;\n\tfloat bf = modf( v * PackFactors.b, vuf );\n\tfloat gf = modf( vuf * ShiftRight8, vuf );\n\treturn vec3( vuf * Inv255, gf * PackUpscale, bf );\n}\nvec2 packDepthToRG( const in float v ) {\n\tif( v <= 0.0 )\n\t\treturn vec2( 0., 0. );\n\tif( v >= 1.0 )\n\t\treturn vec2( 1., 1. );\n\tfloat vuf;\n\tfloat gf = modf( v * 256., vuf );\n\treturn vec2( vuf * Inv255, gf );\n}\nfloat unpackRGBAToDepth( const in vec4 v ) {\n\treturn dot( v, UnpackFactors4 );\n}\nfloat unpackRGBToDepth( const in vec3 v ) {\n\treturn dot( v, UnpackFactors3 );\n}\nfloat unpackRGToDepth( const in vec2 v ) {\n\treturn v.r * UnpackFactors2.r + v.g * UnpackFactors2.g;\n}\nvec4 pack2HalfToRGBA( const in 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( const in 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 shadowIntensity;\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 shadowIntensity;\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 shadowIntensity;\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 shadowIntensity, 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 mix( 1.0, shadow, shadowIntensity );\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 shadowIntensity, 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 mix( 1.0, shadow, shadowIntensity );\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 shadowIntensity;\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 shadowIntensity;\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 shadowIntensity;\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.shadowIntensity, 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.shadowIntensity, 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.shadowIntensity, 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\tconst float StartCompression = 0.8 - 0.04;\n\tconst float 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, vec3( newPeak ), 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.dispersion, 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 dispersion, const in float ior, const in float thickness,\n\t\tconst in vec3 attenuationColor, const in float attenuationDistance ) {\n\t\tvec4 transmittedLight;\n\t\tvec3 transmittance;\n\t\t#ifdef USE_DISPERSION\n\t\t\tfloat halfSpread = ( ior - 1.0 ) * 0.025 * dispersion;\n\t\t\tvec3 iors = vec3( ior - halfSpread, ior, ior + halfSpread );\n\t\t\tfor ( int i = 0; i < 3; i ++ ) {\n\t\t\t\tvec3 transmissionRay = getVolumeTransmissionRay( n, v, thickness, iors[ i ], modelMatrix );\n\t\t\t\tvec3 refractedRayExit = position + transmissionRay;\n\t\t\n\t\t\t\tvec4 ndcPos = projMatrix * viewMatrix * vec4( refractedRayExit, 1.0 );\n\t\t\t\tvec2 refractionCoords = ndcPos.xy / ndcPos.w;\n\t\t\t\trefractionCoords += 1.0;\n\t\t\t\trefractionCoords /= 2.0;\n\t\t\n\t\t\t\tvec4 transmissionSample = getTransmissionSample( refractionCoords, roughness, iors[ i ] );\n\t\t\t\ttransmittedLight[ i ] = transmissionSample[ i ];\n\t\t\t\ttransmittedLight.a += transmissionSample.a;\n\t\t\t\ttransmittance[ i ] = diffuseColor[ i ] * volumeAttenuation( length( transmissionRay ), attenuationColor, attenuationDistance )[ i ];\n\t\t\t}\n\t\t\ttransmittedLight.a /= 3.0;\n\t\t\n\t\t#else\n\t\t\n\t\t\tvec3 transmissionRay = getVolumeTransmissionRay( n, v, thickness, ior, modelMatrix );\n\t\t\tvec3 refractedRayExit = position + transmissionRay;\n\t\t\tvec4 ndcPos = projMatrix * viewMatrix * vec4( refractedRayExit, 1.0 );\n\t\t\tvec2 refractionCoords = ndcPos.xy / ndcPos.w;\n\t\t\trefractionCoords += 1.0;\n\t\t\trefractionCoords /= 2.0;\n\t\t\ttransmittedLight = getTransmissionSample( refractionCoords, roughness, ior );\n\t\t\ttransmittance = diffuseColor * volumeAttenuation( length( transmissionRay ), attenuationColor, attenuationDistance );\n\t\t\n\t\t#endif\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#elif DEPTH_PACKING == 3202\n\t\tgl_FragColor = vec4( packDepthToRGB( fragCoordZ ), 1.0 );\n\t#elif DEPTH_PACKING == 3203\n\t\tgl_FragColor = vec4( packDepthToRG( fragCoordZ ), 0.0, 1.0 );\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_DISPERSION\n\tuniform float dispersion;\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}"},Je={common:{diffuse:{value:new qe(16777215)},opacity:{value:1},map:{value:null},mapTransform:{value:new wn},alphaMap:{value:null},alphaMapTransform:{value:new wn},alphaTest:{value:0}},specularmap:{specularMap:{value:null},specularMapTransform:{value:new wn}},envmap:{envMap:{value:null},envMapRotation:{value:new wn},flipEnvMap:{value:-1},reflectivity:{value:1},ior:{value:1.5},refractionRatio:{value:.98}},aomap:{aoMap:{value:null},aoMapIntensity:{value:1},aoMapTransform:{value:new wn}},lightmap:{lightMap:{value:null},lightMapIntensity:{value:1},lightMapTransform:{value:new wn}},bumpmap:{bumpMap:{value:null},bumpMapTransform:{value:new wn},bumpScale:{value:1}},normalmap:{normalMap:{value:null},normalMapTransform:{value:new wn},normalScale:{value:new xe(1,1)}},displacementmap:{displacementMap:{value:null},displacementMapTransform:{value:new wn},displacementScale:{value:1},displacementBias:{value:0}},emissivemap:{emissiveMap:{value:null},emissiveMapTransform:{value:new wn}},metalnessmap:{metalnessMap:{value:null},metalnessMapTransform:{value:new wn}},roughnessmap:{roughnessMap:{value:null},roughnessMapTransform:{value:new wn}},gradientmap:{gradientMap:{value:null}},fog:{fogDensity:{value:25e-5},fogNear:{value:1},fogFar:{value:2e3},fogColor:{value:new qe(16777215)}},lights:{ambientLightColor:{value:[]},lightProbe:{value:[]},directionalLights:{value:[],properties:{direction:{},color:{}}},directionalLightShadows:{value:[],properties:{shadowIntensity:1,shadowBias:{},shadowNormalBias:{},shadowRadius:{},shadowMapSize:{}}},directionalShadowMap:{value:[]},directionalShadowMatrix:{value:[]},spotLights:{value:[],properties:{color:{},position:{},direction:{},distance:{},coneCos:{},penumbraCos:{},decay:{}}},spotLightShadows:{value:[],properties:{shadowIntensity:1,shadowBias:{},shadowNormalBias:{},shadowRadius:{},shadowMapSize:{}}},spotLightMap:{value:[]},spotShadowMap:{value:[]},spotLightMatrix:{value:[]},pointLights:{value:[],properties:{color:{},position:{},decay:{},distance:{}}},pointLightShadows:{value:[],properties:{shadowIntensity:1,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 qe(16777215)},opacity:{value:1},size:{value:1},scale:{value:1},map:{value:null},alphaMap:{value:null},alphaMapTransform:{value:new wn},alphaTest:{value:0},uvTransform:{value:new wn}},sprite:{diffuse:{value:new qe(16777215)},opacity:{value:1},center:{value:new xe(.5,.5)},rotation:{value:0},map:{value:null},mapTransform:{value:new wn},alphaMap:{value:null},alphaMapTransform:{value:new wn},alphaTest:{value:0}}},dc={basic:{uniforms:fo([Je.common,Je.specularmap,Je.envmap,Je.aomap,Je.lightmap,Je.fog]),vertexShader:Mn.meshbasic_vert,fragmentShader:Mn.meshbasic_frag},lambert:{uniforms:fo([Je.common,Je.specularmap,Je.envmap,Je.aomap,Je.lightmap,Je.emissivemap,Je.bumpmap,Je.normalmap,Je.displacementmap,Je.fog,Je.lights,{emissive:{value:new qe(0)}}]),vertexShader:Mn.meshlambert_vert,fragmentShader:Mn.meshlambert_frag},phong:{uniforms:fo([Je.common,Je.specularmap,Je.envmap,Je.aomap,Je.lightmap,Je.emissivemap,Je.bumpmap,Je.normalmap,Je.displacementmap,Je.fog,Je.lights,{emissive:{value:new qe(0)},specular:{value:new qe(1118481)},shininess:{value:30}}]),vertexShader:Mn.meshphong_vert,fragmentShader:Mn.meshphong_frag},standard:{uniforms:fo([Je.common,Je.envmap,Je.aomap,Je.lightmap,Je.emissivemap,Je.bumpmap,Je.normalmap,Je.displacementmap,Je.roughnessmap,Je.metalnessmap,Je.fog,Je.lights,{emissive:{value:new qe(0)},roughness:{value:1},metalness:{value:0},envMapIntensity:{value:1}}]),vertexShader:Mn.meshphysical_vert,fragmentShader:Mn.meshphysical_frag},toon:{uniforms:fo([Je.common,Je.aomap,Je.lightmap,Je.emissivemap,Je.bumpmap,Je.normalmap,Je.displacementmap,Je.gradientmap,Je.fog,Je.lights,{emissive:{value:new qe(0)}}]),vertexShader:Mn.meshtoon_vert,fragmentShader:Mn.meshtoon_frag},matcap:{uniforms:fo([Je.common,Je.bumpmap,Je.normalmap,Je.displacementmap,Je.fog,{matcap:{value:null}}]),vertexShader:Mn.meshmatcap_vert,fragmentShader:Mn.meshmatcap_frag},points:{uniforms:fo([Je.points,Je.fog]),vertexShader:Mn.points_vert,fragmentShader:Mn.points_frag},dashed:{uniforms:fo([Je.common,Je.fog,{scale:{value:1},dashSize:{value:1},totalSize:{value:2}}]),vertexShader:Mn.linedashed_vert,fragmentShader:Mn.linedashed_frag},depth:{uniforms:fo([Je.common,Je.displacementmap]),vertexShader:Mn.depth_vert,fragmentShader:Mn.depth_frag},normal:{uniforms:fo([Je.common,Je.bumpmap,Je.normalmap,Je.displacementmap,{opacity:{value:1}}]),vertexShader:Mn.meshnormal_vert,fragmentShader:Mn.meshnormal_frag},sprite:{uniforms:fo([Je.sprite,Je.fog]),vertexShader:Mn.sprite_vert,fragmentShader:Mn.sprite_frag},background:{uniforms:{uvTransform:{value:new wn},t2D:{value:null},backgroundIntensity:{value:1}},vertexShader:Mn.background_vert,fragmentShader:Mn.background_frag},backgroundCube:{uniforms:{envMap:{value:null},flipEnvMap:{value:-1},backgroundBlurriness:{value:0},backgroundIntensity:{value:1},backgroundRotation:{value:new wn}},vertexShader:Mn.backgroundCube_vert,fragmentShader:Mn.backgroundCube_frag},cube:{uniforms:{tCube:{value:null},tFlip:{value:-1},opacity:{value:1}},vertexShader:Mn.cube_vert,fragmentShader:Mn.cube_frag},equirect:{uniforms:{tEquirect:{value:null}},vertexShader:Mn.equirect_vert,fragmentShader:Mn.equirect_frag},distanceRGBA:{uniforms:fo([Je.common,Je.displacementmap,{referencePosition:{value:new O},nearDistance:{value:1},farDistance:{value:1e3}}]),vertexShader:Mn.distanceRGBA_vert,fragmentShader:Mn.distanceRGBA_frag},shadow:{uniforms:fo([Je.lights,Je.fog,{color:{value:new qe(0)},opacity:{value:1}}]),vertexShader:Mn.shadow_vert,fragmentShader:Mn.shadow_frag}};dc.physical={uniforms:fo([dc.standard.uniforms,{clearcoat:{value:0},clearcoatMap:{value:null},clearcoatMapTransform:{value:new wn},clearcoatNormalMap:{value:null},clearcoatNormalMapTransform:{value:new wn},clearcoatNormalScale:{value:new xe(1,1)},clearcoatRoughness:{value:0},clearcoatRoughnessMap:{value:null},clearcoatRoughnessMapTransform:{value:new wn},dispersion:{value:0},iridescence:{value:0},iridescenceMap:{value:null},iridescenceMapTransform:{value:new wn},iridescenceIOR:{value:1.3},iridescenceThicknessMinimum:{value:100},iridescenceThicknessMaximum:{value:400},iridescenceThicknessMap:{value:null},iridescenceThicknessMapTransform:{value:new wn},sheen:{value:0},sheenColor:{value:new qe(0)},sheenColorMap:{value:null},sheenColorMapTransform:{value:new wn},sheenRoughness:{value:1},sheenRoughnessMap:{value:null},sheenRoughnessMapTransform:{value:new wn},transmission:{value:0},transmissionMap:{value:null},transmissionMapTransform:{value:new wn},transmissionSamplerSize:{value:new xe},transmissionSamplerMap:{value:null},thickness:{value:0},thicknessMap:{value:null},thicknessMapTransform:{value:new wn},attenuationDistance:{value:0},attenuationColor:{value:new qe(0)},specularColor:{value:new qe(1,1,1)},specularColorMap:{value:null},specularColorMapTransform:{value:new wn},specularIntensity:{value:1},specularIntensityMap:{value:null},specularIntensityMapTransform:{value:new wn},anisotropyVector:{value:new xe},anisotropyMap:{value:null},anisotropyMapTransform:{value:new wn}}]),vertexShader:Mn.meshphysical_vert,fragmentShader:Mn.meshphysical_frag};const oS={r:0,b:0,g:0},cf=new rd,Pce=new Bt;function Oce(i,t,e,n,r,s,o){const a=new qe(0);let c,d,l=!0===s?0:1,h=null,p=0,m=null;function g(M){let x=!0===M.isScene?M.background:null;return x&&x.isTexture&&(x=(M.backgroundBlurriness>0?e:t).get(x)),x}function y(M,x){M.getRGB(oS,q4(i)),n.buffers.color.setClear(oS.r,oS.g,oS.b,x,o)}return{getClearColor:function(){return a},setClearColor:function(M,x=1){a.set(M),l=x,y(a,l)},getClearAlpha:function(){return l},setClearAlpha:function(M){l=M,y(a,l)},render:function b(M){let x=!1;const C=g(M);null===C?y(a,l):C&&C.isColor&&(y(C,1),x=!0);const F=i.xr.getEnvironmentBlendMode();"additive"===F?n.buffers.color.setClear(0,0,0,1,o):"alpha-blend"===F&&n.buffers.color.setClear(0,0,0,0,o),(i.autoClear||x)&&(n.buffers.depth.setTest(!0),n.buffers.depth.setMask(!0),n.buffers.color.setMask(!0),i.clear(i.autoClearColor,i.autoClearDepth,i.autoClearStencil))},addToRenderList:function v(M,x){const C=g(x);C&&(C.isCubeTexture||C.mapping===mb)?(void 0===d&&(d=new kn(new rf(1,1,1),new Ml({name:"BackgroundCubeMaterial",uniforms:Mg(dc.backgroundCube.uniforms),vertexShader:dc.backgroundCube.vertexShader,fragmentShader:dc.backgroundCube.fragmentShader,side:Ro,depthTest:!1,depthWrite:!1,fog:!1})),d.geometry.deleteAttribute("normal"),d.geometry.deleteAttribute("uv"),d.onBeforeRender=function(F,D,k){this.matrixWorld.copyPosition(k.matrixWorld)},Object.defineProperty(d.material,"envMap",{get:function(){return this.uniforms.envMap.value}}),r.update(d)),cf.copy(x.backgroundRotation),cf.x*=-1,cf.y*=-1,cf.z*=-1,C.isCubeTexture&&!1===C.isRenderTargetTexture&&(cf.y*=-1,cf.z*=-1),d.material.uniforms.envMap.value=C,d.material.uniforms.flipEnvMap.value=C.isCubeTexture&&!1===C.isRenderTargetTexture?-1:1,d.material.uniforms.backgroundBlurriness.value=x.backgroundBlurriness,d.material.uniforms.backgroundIntensity.value=x.backgroundIntensity,d.material.uniforms.backgroundRotation.value.setFromMatrix4(Pce.makeRotationFromEuler(cf)),d.material.toneMapped=ei.getTransfer(C.colorSpace)!==Fi,(h!==C||p!==C.version||m!==i.toneMapping)&&(d.material.needsUpdate=!0,h=C,p=C.version,m=i.toneMapping),d.layers.enableAll(),M.unshift(d,d.geometry,d.material,0,0,null)):C&&C.isTexture&&(void 0===c&&(c=new kn(new lf(2,2),new Ml({name:"BackgroundMaterial",uniforms:Mg(dc.background.uniforms),vertexShader:dc.background.vertexShader,fragmentShader:dc.background.fragmentShader,side:lc,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=C,c.material.uniforms.backgroundIntensity.value=x.backgroundIntensity,c.material.toneMapped=ei.getTransfer(C.colorSpace)!==Fi,!0===C.matrixAutoUpdate&&C.updateMatrix(),c.material.uniforms.uvTransform.value.copy(C.matrix),(h!==C||p!==C.version||m!==i.toneMapping)&&(c.material.needsUpdate=!0,h=C,p=C.version,m=i.toneMapping),c.layers.enableAll(),M.unshift(c,c.geometry,c.material,0,0,null))}}}function Fce(i,t){const e=i.getParameter(i.MAX_VERTEX_ATTRIBS),n={},r=p(null);let s=r,o=!1;function c(A){return i.bindVertexArray(A)}function d(A){return i.deleteVertexArray(A)}function p(A){const W=[],ie=[],ne=[];for(let oe=0;oe=0){const Ve=oe[J];let Ye=ge[J];if(void 0===Ye&&("instanceMatrix"===J&&A.instanceMatrix&&(Ye=A.instanceMatrix),"instanceColor"===J&&A.instanceColor&&(Ye=A.instanceColor)),void 0===Ve||Ve.attribute!==Ye||Ye&&Ve.data!==Ye.data)return!0;q++}return s.attributesNum!==q||s.index!==ne}(A,ne,ie,oe),ge&&function g(A,W,ie,ne){const oe={},ge=W.attributes;let q=0;const se=ie.getAttributes();for(const J in se)if(se[J].location>=0){let Ve=ge[J];void 0===Ve&&("instanceMatrix"===J&&A.instanceMatrix&&(Ve=A.instanceMatrix),"instanceColor"===J&&A.instanceColor&&(Ve=A.instanceColor));const Ye={};Ye.attribute=Ve,Ve&&Ve.data&&(Ye.data=Ve.data),oe[J]=Ye,q++}s.attributes=oe,s.attributesNum=q,s.index=ne}(A,ne,ie,oe),null!==oe&&t.update(oe,i.ELEMENT_ARRAY_BUFFER),(ge||o)&&(o=!1,function C(A,W,ie,ne){b();const oe=ne.attributes,ge=ie.getAttributes(),q=W.defaultAttributeValues;for(const se in ge){const J=ge[se];if(J.location>=0){let we=oe[se];if(void 0===we&&("instanceMatrix"===se&&A.instanceMatrix&&(we=A.instanceMatrix),"instanceColor"===se&&A.instanceColor&&(we=A.instanceColor)),void 0!==we){const Ve=we.normalized,Ye=we.itemSize,Rt=t.get(we);if(void 0===Rt)continue;const nn=Rt.buffer,le=Rt.type,Fe=Rt.bytesPerElement,Ze=le===i.INT||le===i.UNSIGNED_INT||we.gpuType===uk;if(we.isInterleavedBufferAttribute){const Le=we.data,wt=Le.stride,Tt=we.offset;if(Le.isInstancedInterleavedBuffer){for(let St=0;St0&&i.getShaderPrecisionFormat(i.FRAGMENT_SHADER,i.HIGH_FLOAT).precision>0)return"highp";D="mediump"}return"mediump"===D&&i.getShaderPrecisionFormat(i.VERTEX_SHADER,i.MEDIUM_FLOAT).precision>0&&i.getShaderPrecisionFormat(i.FRAGMENT_SHADER,i.MEDIUM_FLOAT).precision>0?"mediump":"lowp"}let c=void 0!==e.precision?e.precision:"highp";const d=l(c);d!==c&&(console.warn("THREE.WebGLRenderer:",c,"not supported, using",d,"instead."),c=d);const h=!0===e.logarithmicDepthBuffer,p=i.getParameter(i.MAX_TEXTURE_IMAGE_UNITS),m=i.getParameter(i.MAX_VERTEX_TEXTURE_IMAGE_UNITS);return{isWebGL2:!0,getMaxAnisotropy:function s(){if(void 0!==r)return r;if(!0===t.has("EXT_texture_filter_anisotropic")){const D=t.get("EXT_texture_filter_anisotropic");r=i.getParameter(D.MAX_TEXTURE_MAX_ANISOTROPY_EXT)}else r=0;return r},getMaxPrecision:l,textureFormatReadable:function o(D){return!(D!==Po&&n.convert(D)!==i.getParameter(i.IMPLEMENTATION_COLOR_READ_FORMAT))},textureTypeReadable:function a(D){const k=D===Zm&&(t.has("EXT_color_buffer_half_float")||t.has("EXT_color_buffer_float"));return!(D!==ed&&n.convert(D)!==i.getParameter(i.IMPLEMENTATION_COLOR_READ_TYPE)&&D!==Jo&&!k)},precision:c,logarithmicDepthBuffer:h,maxTextures:p,maxVertexTextures:m,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:m>0,maxSamples:i.getParameter(i.MAX_SAMPLES)}}function Bce(i){const t=this;let e=null,n=0,r=!1,s=!1;const o=new sf,a=new wn,l={value:null,needsUpdate:!1};function d(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=d(g,p,x,m);for(let F=0;F!==x;++F)C[F]=e[F];y.clippingState=C,this.numIntersection=b?this.numPlanes:0,this.numPlanes+=M}}}function Uce(i){let t=new WeakMap;function e(o,a){return a===SC?o.mapping=cc:a===EC&&(o.mapping=Zh),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===SC||a===EC){if(t.has(o))return e(t.get(o).texture,o.mapping);{const l=o.image;if(l&&l.height>0){const c=new Iae(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 Ib extends fP{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,d=(this.top-this.bottom)/this.view.fullHeight/this.zoom;s+=c*this.view.offsetX,o=s+c*this.view.width,a-=d*this.view.offsetY,l=a-d*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 J4=[.125,.215,.35,.446,.526,.582],mP=new Ib,e5=new qe;let gP=null,_P=0,vP=0,yP=!1;const uf=(1+Math.sqrt(5))/2,Ag=1/uf,t5=[new O(-uf,Ag,0),new O(uf,Ag,0),new O(-Ag,0,uf),new O(Ag,0,uf),new O(0,uf,-Ag),new O(0,uf,Ag),new O(-1,1,-1),new O(1,1,-1),new O(-1,1,1),new O(1,1,1)];class n5{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){gP=this._renderer.getRenderTarget(),_P=this._renderer.getActiveCubeFace(),vP=this._renderer.getActiveMipmapLevel(),yP=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=o5(),this._compileMaterial(this._cubemapMaterial))}compileEquirectangularShader(){null===this._equirectMaterial&&(this._equirectMaterial=s5(),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=J4[o-i+4-1]:0===o&&(l=0),n.push(l);const c=1/(a-2),d=-c,h=1+c,p=[d,d,h,d,h,h,d,d,h,h,d,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 D=0;D2?0:-1;M.set([k,B,0,k+2/3,B,0,k+2/3,B+1,0,k,B,0,k+2/3,B+1,0,k,B+1,0],b*g*D),x.set(p,v*g*D),C.set([D,D,D,D,D,D],y*g*D)}const F=new hn;F.setAttribute("position",new Hi(M,b)),F.setAttribute("uv",new Hi(x,v)),F.setAttribute("faceIndex",new Hi(C,y)),t.push(F),r>4&&r--}return{lodPlanes:t,sizeLods:e,sigmas:n}}(s)),this._blurMaterial=function zce(i,t,e){const n=new Float32Array(20),r=new O(0,1,0);return new Ml({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:Jc,depthTest:!1,depthWrite:!1})}(s,t,e)}return r}_compileMaterial(t){const e=new kn(this._lodPlanes[0],t);this._renderer.compile(e,mP)}_sceneToCubeUV(t,e,n,r){const a=new br(90,1,e,n),l=[1,-1,1,1,1,1],c=[1,1,1,-1,-1,-1],d=this._renderer,h=d.autoClear,p=d.toneMapping;d.getClearColor(e5),d.toneMapping=bu,d.autoClear=!1;const m=new cr({name:"PMREM.Background",side:Ro,depthWrite:!1,depthTest:!1}),g=new kn(new rf,m);let b=!1;const v=t.background;v?v.isColor&&(m.color.copy(v),t.background=null,b=!0):(m.color.copy(e5),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;aS(r,M*x,y>2?x:0,x,x),d.setRenderTarget(r),b&&d.render(g,a),d.render(t,a)}g.geometry.dispose(),g.material.dispose(),d.toneMapping=p,d.autoClear=h,t.background=v}_textureToCubeUV(t,e){const n=this._renderer,r=t.mapping===cc||t.mapping===Zh;r?(null===this._cubemapMaterial&&(this._cubemapMaterial=o5()),this._cubemapMaterial.uniforms.flipEnvMap.value=!1===t.isRenderTargetTexture?-1:1):null===this._equirectMaterial&&(this._equirectMaterial=s5());const s=r?this._cubemapMaterial:this._equirectMaterial,o=new kn(this._lodPlanes[0],s);s.uniforms.envMap.value=t;const l=this._cubeSize;aS(e,0,0,3*l,2*l),n.setRenderTarget(e),n.render(o,mP)}_applyPMREM(t){const e=this._renderer,n=e.autoClear;e.autoClear=!1;const r=this._lodPlanes.length;for(let s=1;s20&&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 k=0;k<20;++k){const B=k/b,T=Math.exp(-B*B/2);y.push(T),0===k?M+=T:kx-4?r-x+4:0),4*(this._cubeSize-C),3*C,2*C),l.setRenderTarget(e),l.render(h,mP)}}function r5(i,t,e){const n=new Mu(i,t,e);return n.texture.mapping=mb,n.texture.name="PMREM.cubeUv",n.scissorTest=!0,n}function aS(i,t,e,n,r){i.viewport.set(t,e,n,r),i.scissor.set(t,e,n,r)}function s5(){return new Ml({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:Jc,depthTest:!1,depthWrite:!1})}function o5(){return new Ml({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:Jc,depthTest:!1,depthWrite:!1})}function Hce(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===SC||l===EC,d=l===cc||l===Zh;if(c||d){let h=t.get(a);if(a.isRenderTargetTexture&&a.pmremVersion!==(void 0!==h?h.texture.pmremVersion:0))return null===e&&(e=new n5(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||d&&m&&function r(a){let l=0;for(let d=0;d<6;d++)void 0!==a[d]&&l++;return 6===l}(m)?(null===e&&(e=new n5(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 $ce(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&&ag("THREE.WebGLRenderer: "+n+" extension not supported."),r}}}function Gce(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&&(F=Math.ceil(C/t.maxTextureSize),C=t.maxTextureSize);const D=new Float32Array(C*F*4*h),k=new Zk(D,C,F,h);k.type=Jo,k.needsUpdate=!0;const B=4*x;for(let A=0;A0)return i;const r=t*e;let s=f5[r];if(void 0===s&&(s=new Float32Array(r),f5[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 Lr(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 $de(i,t){const e=function Hde(i){const t=ei.getPrimaries(ei.workingColorSpace),e=ei.getPrimaries(i);let n;switch(t===e?n="":t===NC&&e===LC?n="LinearDisplayP3ToLinearSRGB":t===LC&&e===NC&&(n="LinearSRGBToLinearDisplayP3"),i){case ds:case OC:return[n,"LinearTransferOETF"];case cs:case jk: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 Gde(i,t){let e;switch(t){case woe:e="Linear";break;case Moe:e="Reinhard";break;case Coe:e="OptimizedCineon";break;case Soe:e="ACESFilmic";break;case Aoe:e="AgX";break;case Doe:e="Neutral";break;case Eoe:e="Custom";break;default:console.warn("THREE.WebGLProgram: Unsupported toneMapping:",t),e="Linear"}return"vec3 "+i+"( vec3 color ) { return "+e+"ToneMapping( color ); }"}const dS=new O;function Rb(i){return""!==i}function x5(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 w5(i,t){return i.replace(/NUM_CLIPPING_PLANES/g,t.numClippingPlanes).replace(/UNION_CLIPPING_PLANES/g,t.numClippingPlanes-t.numClipIntersection)}const Xde=/^[ \t]*#include +<([\w\d./]+)>/gm;function wP(i){return i.replace(Xde,Zde)}const Kde=new Map;function Zde(i,t){let e=Mn[t];if(void 0===e){const n=Kde.get(t);if(void 0===n)throw new Error("Can not resolve #include <"+t+">");e=Mn[n],console.warn('THREE.WebGLRenderer: Shader chunk "%s" has been deprecated. Use "%s" instead.',t,n)}return wP(e)}const Qde=/#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 M5(i){return i.replace(Qde,Jde)}function Jde(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(Rb).join("\n"),y.length>0&&(y+="\n")):(v=[C5(e),"#define SHADER_TYPE "+e.shaderType,"#define SHADER_NAME "+e.shaderName,g,e.extensionClipCullDistance?"#define USE_CLIP_DISTANCE":"",e.batching?"#define USE_BATCHING":"",e.batchingColor?"#define USE_BATCHING_COLOR":"",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 "+d:"",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_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.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","#ifdef USE_SKINNING","\tattribute vec4 skinIndex;","\tattribute vec4 skinWeight;","#endif","\n"].filter(Rb).join("\n"),y=[C5(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 "+d:"",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.dispersion?"#define USE_DISPERSION":"",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||e.batchingColor?"#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.decodeVideoTexture?"#define DECODE_VIDEO_TEXTURE":"",e.logarithmicDepthBuffer?"#define USE_LOGDEPTHBUF":"","uniform mat4 viewMatrix;","uniform vec3 cameraPosition;","uniform bool isOrthographic;",e.toneMapping!==bu?"#define TONE_MAPPING":"",e.toneMapping!==bu?Mn.tonemapping_pars_fragment:"",e.toneMapping!==bu?Gde("toneMapping",e.toneMapping):"",e.dithering?"#define DITHERING":"",e.opaque?"#define OPAQUE":"",Mn.colorspace_pars_fragment,$de("linearToOutputTexel",e.outputColorSpace),(ei.getLuminanceCoefficients(dS),["float luminance( const in vec3 rgb ) {",`\tconst vec3 weights = vec3( ${dS.x.toFixed(4)}, ${dS.y.toFixed(4)}, ${dS.z.toFixed(4)} );`,"\treturn dot( weights, rgb );","}"].join("\n")),e.useDepthPacking?"#define DEPTH_PACKING "+e.depthPacking:"","\n"].filter(Rb).join("\n")),o=wP(o),o=x5(o,e),o=w5(o,e),a=wP(a),a=x5(a,e),a=w5(a,e),o=M5(o),a=M5(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===C4?"":"layout(location = 0) out highp vec4 pc_fragColor;",e.glslVersion===C4?"":"#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,F=y5(r,r.VERTEX_SHADER,M+v+o),D=y5(r,r.FRAGMENT_SHADER,C);function k(W){if(i.debug.checkShaderErrors){const ie=r.getProgramInfoLog(b).trim(),ne=r.getShaderInfoLog(F).trim(),oe=r.getShaderInfoLog(D).trim();let ge=!0,q=!0;if(!1===r.getProgramParameter(b,r.LINK_STATUS))if(ge=!1,"function"==typeof i.debug.onShaderError)i.debug.onShaderError(r,b,F,D);else{const se=b5(r,F,"vertex"),J=b5(r,D,"fragment");console.error("THREE.WebGLProgram: Shader Error "+r.getError()+" - VALIDATE_STATUS "+r.getProgramParameter(b,r.VALIDATE_STATUS)+"\n\nMaterial Name: "+W.name+"\nMaterial Type: "+W.type+"\n\nProgram Info Log: "+ie+"\n"+se+"\n"+J)}else""!==ie?console.warn("THREE.WebGLProgram: Program Info Log:",ie):(""===ne||""===oe)&&(q=!1);q&&(W.diagnostics={runnable:ge,programLog:ie,vertexShader:{log:ne,prefix:v},fragmentShader:{log:oe,prefix:y}})}r.deleteShader(F),r.deleteShader(D),B=new cS(r,b),T=function qde(i,t){const e={},n=i.getProgramParameter(t,i.ACTIVE_ATTRIBUTES);for(let r=0;r0,de=T.clearcoat>0,De=T.iridescence>0,Ae=T.sheen>0,Ut=T.transmission>0,et=R&&!!T.anisotropyMap,pt=de&&!!T.clearcoatMap,bn=de&&!!T.clearcoatNormalMap,He=de&&!!T.clearcoatRoughnessMap,ft=De&&!!T.iridescenceMap,Yn=De&&!!T.iridescenceThicknessMap,cn=Ae&&!!T.sheenColorMap,yt=Ae&&!!T.sheenRoughnessMap,vn=!!T.specularMap,Pn=!!T.specularColorMap,qi=!!T.specularIntensityMap,Z=Ut&&!!T.transmissionMap,We=Ut&&!!T.thicknessMap,Ee=!!T.alphaMap,ti=!!T.extensions;let xr=bu;T.toneMapped&&(null===Le||!0===Le.isXRRenderTarget)&&(xr=i.toneMapping);const hs={shaderID:we,shaderType:T.type,shaderName:T.name,vertexShader:nn,fragmentShader:le,defines:T.defines,customVertexShaderID:Fe,customFragmentShaderID:Ze,isRawShaderMaterial:!0===T.isRawShaderMaterial,glslVersion:T.glslVersion,precision:m,batching:Tt,batchingColor:Tt&&null!==ne._colorsTexture,instancing:wt,instancingColor:wt&&null!==ne.instanceColor,instancingMorph:wt&&null!==ne.morphTexture,supportsVertexTextures:p,outputColorSpace:null===Le?i.outputColorSpace:!0===Le.isXRRenderTarget?Le.texture.colorSpace:ds,alphaToCoverage:!!T.alphaToCoverage,map:St,matcap:!!T.matcap,envMap:N,envMapMode:N&&se.mapping,envMapCubeUVHeight:J,aoMap:Ge,lightMap:Ne,bumpMap:nt,normalMap:Me,displacementMap:p&&Gt,emissiveMap:it,normalMapObjectSpace:Me&&T.normalMapType===Loe,normalMapTangentSpace:Me&&T.normalMapType===Qh,metalnessMap:_t,roughnessMap:H,anisotropy:R,anisotropyMap:et,clearcoat:de,clearcoatMap:pt,clearcoatNormalMap:bn,clearcoatRoughnessMap:He,dispersion:T.dispersion>0,iridescence:De,iridescenceMap:ft,iridescenceThicknessMap:Yn,sheen:Ae,sheenColorMap:cn,sheenRoughnessMap:yt,specularMap:vn,specularColorMap:Pn,specularIntensityMap:qi,transmission:Ut,transmissionMap:Z,thicknessMap:We,gradientMap:!!T.gradientMap,opaque:!1===T.transparent&&T.blending===Xm&&!1===T.alphaToCoverage,alphaMap:Ee,alphaTest:T.alphaTest>0,alphaHash:!!T.alphaHash,combine:T.combine,mapUv:St&&b(T.map.channel),aoMapUv:Ge&&b(T.aoMap.channel),lightMapUv:Ne&&b(T.lightMap.channel),bumpMapUv:nt&&b(T.bumpMap.channel),normalMapUv:Me&&b(T.normalMap.channel),displacementMapUv:Gt&&b(T.displacementMap.channel),emissiveMapUv:it&&b(T.emissiveMap.channel),metalnessMapUv:_t&&b(T.metalnessMap.channel),roughnessMapUv:H&&b(T.roughnessMap.channel),anisotropyMapUv:et&&b(T.anisotropyMap.channel),clearcoatMapUv:pt&&b(T.clearcoatMap.channel),clearcoatNormalMapUv:bn&&b(T.clearcoatNormalMap.channel),clearcoatRoughnessMapUv:He&&b(T.clearcoatRoughnessMap.channel),iridescenceMapUv:ft&&b(T.iridescenceMap.channel),iridescenceThicknessMapUv:Yn&&b(T.iridescenceThicknessMap.channel),sheenColorMapUv:cn&&b(T.sheenColorMap.channel),sheenRoughnessMapUv:yt&&b(T.sheenRoughnessMap.channel),specularMapUv:vn&&b(T.specularMap.channel),specularColorMapUv:Pn&&b(T.specularColorMap.channel),specularIntensityMapUv:qi&&b(T.specularIntensityMap.channel),transmissionMapUv:Z&&b(T.transmissionMap.channel),thicknessMapUv:We&&b(T.thicknessMap.channel),alphaMapUv:Ee&&b(T.alphaMap.channel),vertexTangents:!!ge.attributes.tangent&&(Me||R),vertexColors:T.vertexColors,vertexAlphas:!0===T.vertexColors&&!!ge.attributes.color&&4===ge.attributes.color.itemSize,pointsUvs:!0===ne.isPoints&&!!ge.attributes.uv&&(St||Ee),fog:!!oe,useFog:!0===T.fog,fogExp2:!!oe&&oe.isFogExp2,flatShading:!0===T.flatShading,sizeAttenuation:!0===T.sizeAttenuation,logarithmicDepthBuffer:h,skinning:!0===ne.isSkinnedMesh,morphTargets:void 0!==ge.morphAttributes.position,morphNormals:void 0!==ge.morphAttributes.normal,morphColors:void 0!==ge.morphAttributes.color,morphTargetsCount:Ye,morphTextureStride:Rt,numDirLights:A.directional.length,numPointLights:A.point.length,numSpotLights:A.spot.length,numSpotLightMaps:A.spotLightMap.length,numRectAreaLights:A.rectArea.length,numHemiLights:A.hemi.length,numDirLightShadows:A.directionalShadowMap.length,numPointLightShadows:A.pointShadowMap.length,numSpotLightShadows:A.spotShadowMap.length,numSpotLightShadowsWithMaps:A.numSpotLightShadowsWithMaps,numLightProbes:A.numLightProbes,numClippingPlanes:o.numPlanes,numClipIntersection:o.numIntersection,dithering:T.dithering,shadowMapEnabled:i.shadowMap.enabled&&W.length>0,shadowMapType:i.shadowMap.type,toneMapping:xr,decodeVideoTexture:St&&!0===T.map.isVideoTexture&&ei.getTransfer(T.map.colorSpace)===Fi,premultipliedAlpha:T.premultipliedAlpha,doubleSided:T.side===co,flipSided:T.side===Ro,useDepthPacking:T.depthPacking>=0,depthPacking:T.depthPacking||0,index0AttributeName:T.index0AttributeName,extensionClipCullDistance:ti&&!0===T.extensions.clipCullDistance&&n.has("WEBGL_clip_cull_distance"),extensionMultiDraw:(ti&&!0===T.extensions.multiDraw||Tt)&&n.has("WEBGL_multi_draw"),rendererExtensionParallelShaderCompile:n.has("KHR_parallel_shader_compile"),customProgramCacheKey:T.customProgramCacheKey()};return hs.vertexUv1s=c.has(1),hs.vertexUv2s=c.has(2),hs.vertexUv3s=c.has(3),c.clear(),hs},getProgramCacheKey:function y(T){const A=[];if(T.shaderID?A.push(T.shaderID):(A.push(T.customVertexShaderID),A.push(T.customFragmentShaderID)),void 0!==T.defines)for(const W in T.defines)A.push(W),A.push(T.defines[W]);return!1===T.isRawShaderMaterial&&(function M(T,A){T.push(A.precision),T.push(A.outputColorSpace),T.push(A.envMapMode),T.push(A.envMapCubeUVHeight),T.push(A.mapUv),T.push(A.alphaMapUv),T.push(A.lightMapUv),T.push(A.aoMapUv),T.push(A.bumpMapUv),T.push(A.normalMapUv),T.push(A.displacementMapUv),T.push(A.emissiveMapUv),T.push(A.metalnessMapUv),T.push(A.roughnessMapUv),T.push(A.anisotropyMapUv),T.push(A.clearcoatMapUv),T.push(A.clearcoatNormalMapUv),T.push(A.clearcoatRoughnessMapUv),T.push(A.iridescenceMapUv),T.push(A.iridescenceThicknessMapUv),T.push(A.sheenColorMapUv),T.push(A.sheenRoughnessMapUv),T.push(A.specularMapUv),T.push(A.specularColorMapUv),T.push(A.specularIntensityMapUv),T.push(A.transmissionMapUv),T.push(A.thicknessMapUv),T.push(A.combine),T.push(A.fogExp2),T.push(A.sizeAttenuation),T.push(A.morphTargetsCount),T.push(A.morphAttributeCount),T.push(A.numDirLights),T.push(A.numPointLights),T.push(A.numSpotLights),T.push(A.numSpotLightMaps),T.push(A.numHemiLights),T.push(A.numRectAreaLights),T.push(A.numDirLightShadows),T.push(A.numPointLightShadows),T.push(A.numSpotLightShadows),T.push(A.numSpotLightShadowsWithMaps),T.push(A.numLightProbes),T.push(A.shadowMapType),T.push(A.toneMapping),T.push(A.numClippingPlanes),T.push(A.numClipIntersection),T.push(A.depthPacking)}(A,T),function x(T,A){a.disableAll(),A.supportsVertexTextures&&a.enable(0),A.instancing&&a.enable(1),A.instancingColor&&a.enable(2),A.instancingMorph&&a.enable(3),A.matcap&&a.enable(4),A.envMap&&a.enable(5),A.normalMapObjectSpace&&a.enable(6),A.normalMapTangentSpace&&a.enable(7),A.clearcoat&&a.enable(8),A.iridescence&&a.enable(9),A.alphaTest&&a.enable(10),A.vertexColors&&a.enable(11),A.vertexAlphas&&a.enable(12),A.vertexUv1s&&a.enable(13),A.vertexUv2s&&a.enable(14),A.vertexUv3s&&a.enable(15),A.vertexTangents&&a.enable(16),A.anisotropy&&a.enable(17),A.alphaHash&&a.enable(18),A.batching&&a.enable(19),A.dispersion&&a.enable(20),A.batchingColor&&a.enable(21),T.push(a.mask),a.disableAll(),A.fog&&a.enable(0),A.useFog&&a.enable(1),A.flatShading&&a.enable(2),A.logarithmicDepthBuffer&&a.enable(3),A.skinning&&a.enable(4),A.morphTargets&&a.enable(5),A.morphNormals&&a.enable(6),A.morphColors&&a.enable(7),A.premultipliedAlpha&&a.enable(8),A.shadowMapEnabled&&a.enable(9),A.doubleSided&&a.enable(10),A.flipSided&&a.enable(11),A.useDepthPacking&&a.enable(12),A.dithering&&a.enable(13),A.transmission&&a.enable(14),A.sheen&&a.enable(15),A.opaque&&a.enable(16),A.pointsUvs&&a.enable(17),A.decodeVideoTexture&&a.enable(18),A.alphaToCoverage&&a.enable(19),T.push(a.mask)}(A,T),A.push(i.outputColorSpace)),A.push(T.customProgramCacheKey),A.join()},getUniforms:function C(T){const A=g[T.type];let W;return W=A?X4.clone(dc[A].uniforms):T.uniforms,W},acquireProgram:function F(T,A){let W;for(let ie=0,ne=d.length;ie0?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 d(){for(let h=t,p=i.length;h1&&e.sort(h||uue),n.length>1&&n.sort(p||S5),r.length>1&&r.sort(p||S5)}}}function hue(){let i=new WeakMap;return{get:function t(n,r){const s=i.get(n);let o;return void 0===s?(o=new E5,i.set(n,[o])):r>=s.length?(o=new E5,s.push(o)):o=s[r],o},dispose:function e(){i=new WeakMap}}}function fue(){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 O,color:new qe};break;case"SpotLight":e={position:new O,direction:new O,color:new qe,distance:0,coneCos:0,penumbraCos:0,decay:0};break;case"PointLight":e={position:new O,color:new qe,distance:0,decay:0};break;case"HemisphereLight":e={direction:new O,skyColor:new qe,groundColor:new qe};break;case"RectAreaLight":e={color:new qe,position:new O,halfWidth:new O,halfHeight:new O}}return i[t.id]=e,e}}}let mue=0;function gue(i,t){return(t.castShadow?2:0)-(i.castShadow?2:0)+(t.map?1:0)-(i.map?1:0)}function _ue(i){const t=new fue,e=function pue(){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={shadowIntensity:1,shadowBias:0,shadowNormalBias:0,shadowRadius:1,shadowMapSize:new xe};break;case"PointLight":e={shadowIntensity:1,shadowBias:0,shadowNormalBias:0,shadowRadius:1,shadowMapSize:new xe,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 O);const r=new O,s=new Bt,o=new Bt;return{setup:function a(c){let d=0,h=0,p=0;for(let T=0;T<9;T++)n.probe[T].set(0,0,0);let m=0,g=0,b=0,v=0,y=0,M=0,x=0,C=0,F=0,D=0,k=0;c.sort(gue);for(let T=0,A=c.length;T0&&(!0===i.has("OES_texture_float_linear")?(n.rectAreaLTC1=Je.LTC_FLOAT_1,n.rectAreaLTC2=Je.LTC_FLOAT_2):(n.rectAreaLTC1=Je.LTC_HALF_1,n.rectAreaLTC2=Je.LTC_HALF_2)),n.ambient[0]=d,n.ambient[1]=h,n.ambient[2]=p;const B=n.hash;(B.directionalLength!==m||B.pointLength!==g||B.spotLength!==b||B.rectAreaLength!==v||B.hemiLength!==y||B.numDirectionalShadows!==M||B.numPointShadows!==x||B.numSpotShadows!==C||B.numSpotMaps!==F||B.numLightProbes!==k)&&(n.directional.length=m,n.spot.length=b,n.rectArea.length=v,n.point.length=g,n.hemi.length=y,n.directionalShadow.length=M,n.directionalShadowMap.length=M,n.pointShadow.length=x,n.pointShadowMap.length=x,n.spotShadow.length=C,n.spotShadowMap.length=C,n.directionalShadowMatrix.length=M,n.pointShadowMatrix.length=x,n.spotLightMatrix.length=C+F-D,n.spotLightMap.length=F,n.numSpotLightShadowsWithMaps=D,n.numLightProbes=k,B.directionalLength=m,B.pointLength=g,B.spotLength=b,B.rectAreaLength=v,B.hemiLength=y,B.numDirectionalShadows=M,B.numPointShadows=x,B.numSpotShadows=C,B.numSpotMaps=F,B.numLightProbes=k,n.version=mue++)},setupView:function l(c,d){let h=0,p=0,m=0,g=0,b=0;const v=d.matrixWorldInverse;for(let y=0,M=c.length;y=o.length?(a=new A5(i),o.push(a)):a=o[s],a},dispose:function n(){t=new WeakMap}}}class D5 extends Fo{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 T5 extends Fo{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 yue="void main() {\n\tgl_Position = vec4( position, 1.0 );\n}",bue="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 xue(i,t,e){let n=new sS;const r=new xe,s=new xe,o=new vi,a=new D5({depthPacking:Foe}),l=new T5,c={},d=e.maxTextureSize,h={[lc]:Ro,[Ro]:lc,[co]:co},p=new Ml({defines:{VSM_SAMPLES:8},uniforms:{shadow_pass:{value:null},resolution:{value:new xe},radius:{value:4}},vertexShader:yue,fragmentShader:bue}),m=p.clone();m.defines.HORIZONTAL_PASS=1;const g=new hn;g.setAttribute("position",new Hi(new Float32Array([-1,-1,.5,3,-1,.5,-1,3,.5]),3));const b=new kn(g,p),v=this;this.enabled=!1,this.autoUpdate=!0,this.needsUpdate=!1,this.type=s4;let y=this.type;function M(D,k){const B=t.update(b);p.defines.VSM_SAMPLES!==D.blurSamples&&(p.defines.VSM_SAMPLES=D.blurSamples,m.defines.VSM_SAMPLES=D.blurSamples,p.needsUpdate=!0,m.needsUpdate=!0),null===D.mapPass&&(D.mapPass=new Mu(r.x,r.y)),p.uniforms.shadow_pass.value=D.map.texture,p.uniforms.resolution.value=D.mapSize,p.uniforms.radius.value=D.radius,i.setRenderTarget(D.mapPass),i.clear(),i.renderBufferDirect(k,null,B,p,b,null),m.uniforms.shadow_pass.value=D.mapPass.texture,m.uniforms.resolution.value=D.mapSize,m.uniforms.radius.value=D.radius,i.setRenderTarget(D.map),i.clear(),i.renderBufferDirect(k,null,B,m,b,null)}function x(D,k,B,T){let A=null;const W=!0===B.isPointLight?D.customDistanceMaterial:D.customDepthMaterial;if(void 0!==W)A=W;else if(A=!0===B.isPointLight?l:a,i.localClippingEnabled&&!0===k.clipShadows&&Array.isArray(k.clippingPlanes)&&0!==k.clippingPlanes.length||k.displacementMap&&0!==k.displacementScale||k.alphaMap&&k.alphaTest>0||k.map&&k.alphaTest>0){const ie=A.uuid,ne=k.uuid;let oe=c[ie];void 0===oe&&(oe={},c[ie]=oe);let ge=oe[ne];void 0===ge&&(ge=A.clone(),oe[ne]=ge,k.addEventListener("dispose",F)),A=ge}return A.visible=k.visible,A.wireframe=k.wireframe,A.side=T===Qc?null!==k.shadowSide?k.shadowSide:k.side:null!==k.shadowSide?k.shadowSide:h[k.side],A.alphaMap=k.alphaMap,A.alphaTest=k.alphaTest,A.map=k.map,A.clipShadows=k.clipShadows,A.clippingPlanes=k.clippingPlanes,A.clipIntersection=k.clipIntersection,A.displacementMap=k.displacementMap,A.displacementScale=k.displacementScale,A.displacementBias=k.displacementBias,A.wireframeLinewidth=k.wireframeLinewidth,A.linewidth=k.linewidth,!0===B.isPointLight&&!0===A.isMeshDistanceMaterial&&(i.properties.get(A).light=B),A}function C(D,k,B,T,A){if(!1===D.visible)return;if(D.layers.test(k.layers)&&(D.isMesh||D.isLine||D.isPoints)&&(D.castShadow||D.receiveShadow&&A===Qc)&&(!D.frustumCulled||n.intersectsObject(D))){D.modelViewMatrix.multiplyMatrices(B.matrixWorldInverse,D.matrixWorld);const ne=t.update(D),oe=D.material;if(Array.isArray(oe)){const ge=ne.groups;for(let q=0,se=ge.length;qd||r.y>d)&&(r.x>d&&(s.x=Math.floor(d/we.x),r.x=s.x*we.x,J.mapSize.x=s.x),r.y>d&&(s.y=Math.floor(d/we.y),r.y=s.y*we.y,J.mapSize.y=s.y)),null===J.map||!0===ne||!0===oe){const Ye=this.type!==Qc?{minFilter:vr,magFilter:vr}:{};null!==J.map&&J.map.dispose(),J.map=new Mu(r.x,r.y,Ye),J.map.texture.name=se.name+".shadowMap",J.camera.updateProjectionMatrix()}i.setRenderTarget(J.map),i.clear();const Ve=J.getViewportCount();for(let Ye=0;Ye=1):-1!==se.indexOf("OpenGL ES")&&(q=parseFloat(/^OpenGL ES (\d)/.exec(se)[1]),ge=q>=2);let J=null,we={};const Ve=i.getParameter(i.SCISSOR_BOX),Ye=i.getParameter(i.VIEWPORT),Rt=(new vi).fromArray(Ve),nn=(new vi).fromArray(Ye);function le(Z,We,Ce,Ee){const Ke=new Uint8Array(4),rn=i.createTexture();i.bindTexture(Z,rn),i.texParameteri(Z,i.TEXTURE_MIN_FILTER,i.NEAREST),i.texParameteri(Z,i.TEXTURE_MAG_FILTER,i.NEAREST);for(let ti=0;ti"u")&&/OculusBrowser/g.test(navigator.userAgent),c=new xe,d=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(H,R){return m?new OffscreenCanvas(H,R):wb("canvas")}function b(H,R,de){let Re=1;const De=_t(H);if((De.width>de||De.height>de)&&(Re=de/Math.max(De.width,De.height)),Re<1){if(typeof HTMLImageElement<"u"&&H instanceof HTMLImageElement||typeof HTMLCanvasElement<"u"&&H instanceof HTMLCanvasElement||typeof ImageBitmap<"u"&&H instanceof ImageBitmap||typeof VideoFrame<"u"&&H instanceof VideoFrame){const Ae=Math.floor(Re*De.width),Ut=Math.floor(Re*De.height);void 0===h&&(h=g(Ae,Ut));const et=R?g(Ae,Ut):h;return et.width=Ae,et.height=Ut,et.getContext("2d").drawImage(H,0,0,Ae,Ut),console.warn("THREE.WebGLRenderer: Texture has been resized from ("+De.width+"x"+De.height+") to ("+Ae+"x"+Ut+")."),et}return"data"in H&&console.warn("THREE.WebGLRenderer: Image in DataTexture is too big ("+De.width+"x"+De.height+")."),H}return H}function v(H){return H.generateMipmaps&&H.minFilter!==vr&&H.minFilter!==lr}function y(H){i.generateMipmap(H)}function M(H,R,de,Re,De=!1){if(null!==H){if(void 0!==i[H])return i[H];console.warn("THREE.WebGLRenderer: Attempt to use non-existing WebGL internal format '"+H+"'")}let Ae=R;if(R===i.RED&&(de===i.FLOAT&&(Ae=i.R32F),de===i.HALF_FLOAT&&(Ae=i.R16F),de===i.UNSIGNED_BYTE&&(Ae=i.R8)),R===i.RED_INTEGER&&(de===i.UNSIGNED_BYTE&&(Ae=i.R8UI),de===i.UNSIGNED_SHORT&&(Ae=i.R16UI),de===i.UNSIGNED_INT&&(Ae=i.R32UI),de===i.BYTE&&(Ae=i.R8I),de===i.SHORT&&(Ae=i.R16I),de===i.INT&&(Ae=i.R32I)),R===i.RG&&(de===i.FLOAT&&(Ae=i.RG32F),de===i.HALF_FLOAT&&(Ae=i.RG16F),de===i.UNSIGNED_BYTE&&(Ae=i.RG8)),R===i.RG_INTEGER&&(de===i.UNSIGNED_BYTE&&(Ae=i.RG8UI),de===i.UNSIGNED_SHORT&&(Ae=i.RG16UI),de===i.UNSIGNED_INT&&(Ae=i.RG32UI),de===i.BYTE&&(Ae=i.RG8I),de===i.SHORT&&(Ae=i.RG16I),de===i.INT&&(Ae=i.RG32I)),R===i.RGB&&de===i.UNSIGNED_INT_5_9_9_9_REV&&(Ae=i.RGB9_E5),R===i.RGBA){const Ut=De?FC:ei.getTransfer(Re);de===i.FLOAT&&(Ae=i.RGBA32F),de===i.HALF_FLOAT&&(Ae=i.RGBA16F),de===i.UNSIGNED_BYTE&&(Ae=Ut===Fi?i.SRGB8_ALPHA8:i.RGBA8),de===i.UNSIGNED_SHORT_4_4_4_4&&(Ae=i.RGBA4),de===i.UNSIGNED_SHORT_5_5_5_1&&(Ae=i.RGB5_A1)}return(Ae===i.R16F||Ae===i.R32F||Ae===i.RG16F||Ae===i.RG32F||Ae===i.RGBA16F||Ae===i.RGBA32F)&&t.get("EXT_color_buffer_float"),Ae}function x(H,R){let de;return H?null===R||R===xu||R===Qm?de=i.DEPTH24_STENCIL8:R===Jo?de=i.DEPTH32F_STENCIL8:R===vb&&(de=i.DEPTH24_STENCIL8,console.warn("DepthTexture: 16 bit depth attachment is not supported with stencil. Using 24-bit attachment.")):null===R||R===xu||R===Qm?de=i.DEPTH_COMPONENT24:R===Jo?de=i.DEPTH_COMPONENT32F:R===vb&&(de=i.DEPTH_COMPONENT16),de}function C(H,R){return!0===v(H)||H.isFramebufferTexture&&H.minFilter!==vr&&H.minFilter!==lr?Math.log2(Math.max(R.width,R.height))+1:void 0!==H.mipmaps&&H.mipmaps.length>0?H.mipmaps.length:H.isCompressedTexture&&Array.isArray(H.image)?R.mipmaps.length:1}function F(H){const R=H.target;R.removeEventListener("dispose",F),function k(H){const R=n.get(H);if(void 0===R.__webglInit)return;const de=H.source,Re=p.get(de);if(Re){const De=Re[R.__cacheKey];De.usedTimes--,0===De.usedTimes&&B(H),0===Object.keys(Re).length&&p.delete(de)}n.remove(H)}(R),R.isVideoTexture&&d.delete(R)}function D(H){const R=H.target;R.removeEventListener("dispose",D),function T(H){const R=n.get(H);if(H.depthTexture&&H.depthTexture.dispose(),H.isWebGLCubeRenderTarget)for(let Re=0;Re<6;Re++){if(Array.isArray(R.__webglFramebuffer[Re]))for(let De=0;De0&&de.__version!==H.version){const Re=H.image;if(null===Re)console.warn("THREE.WebGLRenderer: Texture marked for update but no image data found.");else{if(!1!==Re.complete)return void nn(de,H,R);console.warn("THREE.WebGLRenderer: Texture marked for update but image is incomplete")}}e.bindTexture(i.TEXTURE_2D,de.__webglTexture,i.TEXTURE0+R)}const J={[ko]:i.REPEAT,[Ji]:i.CLAMP_TO_EDGE,[gb]:i.MIRRORED_REPEAT},we={[vr]:i.NEAREST,[dk]:i.NEAREST_MIPMAP_NEAREST,[Km]:i.NEAREST_MIPMAP_LINEAR,[lr]:i.LINEAR,[_b]:i.LINEAR_MIPMAP_NEAREST,[yl]:i.LINEAR_MIPMAP_LINEAR},Ve={[Noe]:i.NEVER,[$oe]:i.ALWAYS,[Boe]:i.LESS,[M4]:i.LEQUAL,[Uoe]:i.EQUAL,[Hoe]:i.GEQUAL,[Voe]:i.GREATER,[zoe]:i.NOTEQUAL};function Ye(H,R){if(R.type===Jo&&!1===t.has("OES_texture_float_linear")&&(R.magFilter===lr||R.magFilter===_b||R.magFilter===Km||R.magFilter===yl||R.minFilter===lr||R.minFilter===_b||R.minFilter===Km||R.minFilter===yl)&&console.warn("THREE.WebGLRenderer: Unable to use linear filtering with floating point textures. OES_texture_float_linear not supported on this device."),i.texParameteri(H,i.TEXTURE_WRAP_S,J[R.wrapS]),i.texParameteri(H,i.TEXTURE_WRAP_T,J[R.wrapT]),(H===i.TEXTURE_3D||H===i.TEXTURE_2D_ARRAY)&&i.texParameteri(H,i.TEXTURE_WRAP_R,J[R.wrapR]),i.texParameteri(H,i.TEXTURE_MAG_FILTER,we[R.magFilter]),i.texParameteri(H,i.TEXTURE_MIN_FILTER,we[R.minFilter]),R.compareFunction&&(i.texParameteri(H,i.TEXTURE_COMPARE_MODE,i.COMPARE_REF_TO_TEXTURE),i.texParameteri(H,i.TEXTURE_COMPARE_FUNC,Ve[R.compareFunction])),!0===t.has("EXT_texture_filter_anisotropic")){if(R.magFilter===vr||R.minFilter!==Km&&R.minFilter!==yl||R.type===Jo&&!1===t.has("OES_texture_float_linear"))return;if(R.anisotropy>1||n.get(R).__currentAnisotropy){const de=t.get("EXT_texture_filter_anisotropic");i.texParameterf(H,de.TEXTURE_MAX_ANISOTROPY_EXT,Math.min(R.anisotropy,r.getMaxAnisotropy())),n.get(R).__currentAnisotropy=R.anisotropy}}}function Rt(H,R){let de=!1;void 0===H.__webglInit&&(H.__webglInit=!0,R.addEventListener("dispose",F));const Re=R.source;let De=p.get(Re);void 0===De&&(De={},p.set(Re,De));const Ae=function ne(H){const R=[];return R.push(H.wrapS),R.push(H.wrapT),R.push(H.wrapR||0),R.push(H.magFilter),R.push(H.minFilter),R.push(H.anisotropy),R.push(H.internalFormat),R.push(H.format),R.push(H.type),R.push(H.generateMipmaps),R.push(H.premultiplyAlpha),R.push(H.flipY),R.push(H.unpackAlignment),R.push(H.colorSpace),R.join()}(R);if(Ae!==H.__cacheKey){void 0===De[Ae]&&(De[Ae]={texture:i.createTexture(),usedTimes:0},o.memory.textures++,de=!0),De[Ae].usedTimes++;const Ut=De[H.__cacheKey];void 0!==Ut&&(De[H.__cacheKey].usedTimes--,0===Ut.usedTimes&&B(R)),H.__cacheKey=Ae,H.__webglTexture=De[Ae].texture}return de}function nn(H,R,de){let Re=i.TEXTURE_2D;(R.isDataArrayTexture||R.isCompressedArrayTexture)&&(Re=i.TEXTURE_2D_ARRAY),R.isData3DTexture&&(Re=i.TEXTURE_3D);const De=Rt(H,R),Ae=R.source;e.bindTexture(Re,H.__webglTexture,i.TEXTURE0+de);const Ut=n.get(Ae);if(Ae.version!==Ut.__version||!0===De){e.activeTexture(i.TEXTURE0+de);const et=ei.getPrimaries(ei.workingColorSpace),pt=R.colorSpace===wu?null:ei.getPrimaries(R.colorSpace),bn=R.colorSpace===wu||et===pt?i.NONE:i.BROWSER_DEFAULT_WEBGL;i.pixelStorei(i.UNPACK_FLIP_Y_WEBGL,R.flipY),i.pixelStorei(i.UNPACK_PREMULTIPLY_ALPHA_WEBGL,R.premultiplyAlpha),i.pixelStorei(i.UNPACK_ALIGNMENT,R.unpackAlignment),i.pixelStorei(i.UNPACK_COLORSPACE_CONVERSION_WEBGL,bn);let He=b(R.image,!1,r.maxTextureSize);He=it(R,He);const ft=s.convert(R.format,R.colorSpace),Yn=s.convert(R.type);let yt,cn=M(R.internalFormat,ft,Yn,R.colorSpace,R.isVideoTexture);Ye(Re,R);const vn=R.mipmaps,Pn=!0!==R.isVideoTexture,qi=void 0===Ut.__version||!0===De,Z=Ae.dataReady,We=C(R,He);if(R.isDepthTexture)cn=x(R.format===eg,R.type),qi&&(Pn?e.texStorage2D(i.TEXTURE_2D,1,cn,He.width,He.height):e.texImage2D(i.TEXTURE_2D,0,cn,He.width,He.height,0,ft,Yn,null));else if(R.isDataTexture)if(vn.length>0){Pn&&qi&&e.texStorage2D(i.TEXTURE_2D,We,cn,vn[0].width,vn[0].height);for(let Ce=0,Ee=vn.length;Ce0){const Ke=MP(yt.width,yt.height,R.format,R.type);for(const rn of R.layerUpdates){const ti=yt.data.subarray(rn*Ke/yt.data.BYTES_PER_ELEMENT,(rn+1)*Ke/yt.data.BYTES_PER_ELEMENT);e.compressedTexSubImage3D(i.TEXTURE_2D_ARRAY,Ce,0,0,rn,yt.width,yt.height,1,ft,ti,0,0)}R.clearLayerUpdates()}else e.compressedTexSubImage3D(i.TEXTURE_2D_ARRAY,Ce,0,0,0,yt.width,yt.height,He.depth,ft,yt.data,0,0)}else e.compressedTexImage3D(i.TEXTURE_2D_ARRAY,Ce,cn,yt.width,yt.height,He.depth,0,yt.data,0,0);else console.warn("THREE.WebGLRenderer: Attempt to load unsupported compressed texture format in .uploadTexture()");else Pn?Z&&e.texSubImage3D(i.TEXTURE_2D_ARRAY,Ce,0,0,0,yt.width,yt.height,He.depth,ft,Yn,yt.data):e.texImage3D(i.TEXTURE_2D_ARRAY,Ce,cn,yt.width,yt.height,He.depth,0,ft,Yn,yt.data)}else{Pn&&qi&&e.texStorage2D(i.TEXTURE_2D,We,cn,vn[0].width,vn[0].height);for(let Ce=0,Ee=vn.length;Ce0){const Ce=MP(He.width,He.height,R.format,R.type);for(const Ee of R.layerUpdates){const Ke=He.data.subarray(Ee*Ce/He.data.BYTES_PER_ELEMENT,(Ee+1)*Ce/He.data.BYTES_PER_ELEMENT);e.texSubImage3D(i.TEXTURE_2D_ARRAY,0,0,0,Ee,He.width,He.height,1,ft,Yn,Ke)}R.clearLayerUpdates()}else e.texSubImage3D(i.TEXTURE_2D_ARRAY,0,0,0,0,He.width,He.height,He.depth,ft,Yn,He.data)}else e.texImage3D(i.TEXTURE_2D_ARRAY,0,cn,He.width,He.height,He.depth,0,ft,Yn,He.data);else if(R.isData3DTexture)Pn?(qi&&e.texStorage3D(i.TEXTURE_3D,We,cn,He.width,He.height,He.depth),Z&&e.texSubImage3D(i.TEXTURE_3D,0,0,0,0,He.width,He.height,He.depth,ft,Yn,He.data)):e.texImage3D(i.TEXTURE_3D,0,cn,He.width,He.height,He.depth,0,ft,Yn,He.data);else if(R.isFramebufferTexture){if(qi)if(Pn)e.texStorage2D(i.TEXTURE_2D,We,cn,He.width,He.height);else{let Ce=He.width,Ee=He.height;for(let Ke=0;Ke>=1,Ee>>=1}}else if(vn.length>0){if(Pn&&qi){const Ce=_t(vn[0]);e.texStorage2D(i.TEXTURE_2D,We,cn,Ce.width,Ce.height)}for(let Ce=0,Ee=vn.length;Ce>Ae),ft=Math.max(1,R.height>>Ae);De===i.TEXTURE_3D||De===i.TEXTURE_2D_ARRAY?e.texImage3D(De,Ae,pt,He,ft,R.depth,0,Ut,et,null):e.texImage2D(De,Ae,pt,He,ft,0,Ut,et,null)}e.bindFramebuffer(i.FRAMEBUFFER,H),Me(R)?a.framebufferTexture2DMultisampleEXT(i.FRAMEBUFFER,Re,De,n.get(de).__webglTexture,0,nt(R)):(De===i.TEXTURE_2D||De>=i.TEXTURE_CUBE_MAP_POSITIVE_X&&De<=i.TEXTURE_CUBE_MAP_NEGATIVE_Z)&&i.framebufferTexture2D(i.FRAMEBUFFER,Re,De,n.get(de).__webglTexture,Ae),e.bindFramebuffer(i.FRAMEBUFFER,null)}function Ze(H,R,de){if(i.bindRenderbuffer(i.RENDERBUFFER,H),R.depthBuffer){const Re=R.depthTexture,Ae=x(R.stencilBuffer,Re&&Re.isDepthTexture?Re.type:null),Ut=R.stencilBuffer?i.DEPTH_STENCIL_ATTACHMENT:i.DEPTH_ATTACHMENT,et=nt(R);Me(R)?a.renderbufferStorageMultisampleEXT(i.RENDERBUFFER,et,Ae,R.width,R.height):de?i.renderbufferStorageMultisample(i.RENDERBUFFER,et,Ae,R.width,R.height):i.renderbufferStorage(i.RENDERBUFFER,Ae,R.width,R.height),i.framebufferRenderbuffer(i.FRAMEBUFFER,Ut,i.RENDERBUFFER,H)}else{const Re=R.textures;for(let De=0;De0&&!0===t.has("WEBGL_multisampled_render_to_texture")&&!1!==R.__useRenderToTexture}function it(H,R){const de=H.colorSpace,Re=H.format,De=H.type;return!0===H.isCompressedTexture||!0===H.isVideoTexture||de!==ds&&de!==wu&&(ei.getTransfer(de)===Fi?(Re!==Po||De!==ed)&&console.warn("THREE.WebGLTextures: sRGB encoded textures have to use RGBAFormat and UnsignedByteType."):console.error("THREE.WebGLTextures: Unsupported texture color space:",de)),R}function _t(H){return typeof HTMLImageElement<"u"&&H instanceof HTMLImageElement?(c.width=H.naturalWidth||H.width,c.height=H.naturalHeight||H.height):typeof VideoFrame<"u"&&H instanceof VideoFrame?(c.width=H.displayWidth,c.height=H.displayHeight):(c.width=H.width,c.height=H.height),c}this.allocateTextureUnit=function ie(){const H=A;return H>=r.maxTextures&&console.warn("THREE.WebGLTextures: Trying to use "+H+" texture units while this GPU supports only "+r.maxTextures),A+=1,H},this.resetTextureUnits=function W(){A=0},this.setTexture2D=oe,this.setTexture2DArray=function ge(H,R){const de=n.get(H);H.version>0&&de.__version!==H.version?nn(de,H,R):e.bindTexture(i.TEXTURE_2D_ARRAY,de.__webglTexture,i.TEXTURE0+R)},this.setTexture3D=function q(H,R){const de=n.get(H);H.version>0&&de.__version!==H.version?nn(de,H,R):e.bindTexture(i.TEXTURE_3D,de.__webglTexture,i.TEXTURE0+R)},this.setTextureCube=function se(H,R){const de=n.get(H);H.version>0&&de.__version!==H.version?function le(H,R,de){if(6!==R.image.length)return;const Re=Rt(H,R),De=R.source;e.bindTexture(i.TEXTURE_CUBE_MAP,H.__webglTexture,i.TEXTURE0+de);const Ae=n.get(De);if(De.version!==Ae.__version||!0===Re){e.activeTexture(i.TEXTURE0+de);const Ut=ei.getPrimaries(ei.workingColorSpace),et=R.colorSpace===wu?null:ei.getPrimaries(R.colorSpace),pt=R.colorSpace===wu||Ut===et?i.NONE:i.BROWSER_DEFAULT_WEBGL;i.pixelStorei(i.UNPACK_FLIP_Y_WEBGL,R.flipY),i.pixelStorei(i.UNPACK_PREMULTIPLY_ALPHA_WEBGL,R.premultiplyAlpha),i.pixelStorei(i.UNPACK_ALIGNMENT,R.unpackAlignment),i.pixelStorei(i.UNPACK_COLORSPACE_CONVERSION_WEBGL,pt);const bn=R.isCompressedTexture||R.image[0].isCompressedTexture,He=R.image[0]&&R.image[0].isDataTexture,ft=[];for(let Ee=0;Ee<6;Ee++)ft[Ee]=bn||He?He?R.image[Ee].image:R.image[Ee]:b(R.image[Ee],!0,r.maxCubemapSize),ft[Ee]=it(R,ft[Ee]);const Yn=ft[0],cn=s.convert(R.format,R.colorSpace),yt=s.convert(R.type),vn=M(R.internalFormat,cn,yt,R.colorSpace),Pn=!0!==R.isVideoTexture,qi=void 0===Ae.__version||!0===Re,Z=De.dataReady;let Ce,We=C(R,Yn);if(Ye(i.TEXTURE_CUBE_MAP,R),bn){Pn&&qi&&e.texStorage2D(i.TEXTURE_CUBE_MAP,We,vn,Yn.width,Yn.height);for(let Ee=0;Ee<6;Ee++){Ce=ft[Ee].mipmaps;for(let Ke=0;Ke0&&We++;const Ee=_t(ft[0]);e.texStorage2D(i.TEXTURE_CUBE_MAP,We,vn,Ee.width,Ee.height)}for(let Ee=0;Ee<6;Ee++)if(He){Pn?Z&&e.texSubImage2D(i.TEXTURE_CUBE_MAP_POSITIVE_X+Ee,0,0,0,ft[Ee].width,ft[Ee].height,cn,yt,ft[Ee].data):e.texImage2D(i.TEXTURE_CUBE_MAP_POSITIVE_X+Ee,0,vn,ft[Ee].width,ft[Ee].height,0,cn,yt,ft[Ee].data);for(let Ke=0;Ke1;if(Ut||(void 0===Re.__webglTexture&&(Re.__webglTexture=i.createTexture()),Re.__version=R.version,o.memory.textures++),Ae){de.__webglFramebuffer=[];for(let et=0;et<6;et++)if(R.mipmaps&&R.mipmaps.length>0){de.__webglFramebuffer[et]=[];for(let pt=0;pt0){de.__webglFramebuffer=[];for(let et=0;et0&&!1===Me(H)){de.__webglMultisampledFramebuffer=i.createFramebuffer(),de.__webglColorRenderbuffer=[],e.bindFramebuffer(i.FRAMEBUFFER,de.__webglMultisampledFramebuffer);for(let et=0;et0)for(let pt=0;pt0)for(let pt=0;pt0)if(!1===Me(H)){const R=H.textures,de=H.width,Re=H.height;let De=i.COLOR_BUFFER_BIT;const Ae=H.stencilBuffer?i.DEPTH_STENCIL_ATTACHMENT:i.DEPTH_ATTACHMENT,Ut=n.get(H),et=R.length>1;if(et)for(let pt=0;ptm+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(Iue)))}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 ia;n.matrixAutoUpdate=!1,n.visible=!1,t.joints[e.jointName]=n,t.add(n)}return t.joints[e.jointName]}}class Pue{constructor(){this.texture=null,this.mesh=null,this.depthNear=0,this.depthFar=0}init(t,e,n){if(null===this.texture){const r=new Oo;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}}getMesh(t){if(null!==this.texture&&null===this.mesh){const e=t.cameras[0].viewport,n=new Ml({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:e.z},depthHeight:{value:e.w}}});this.mesh=new kn(new lf(20,20),n)}return this.mesh}reset(){this.texture=null,this.mesh=null}getDepthTexture(){return this.texture}}class Oue extends rg{constructor(t,e){super();const n=this;let r=null,s=1,o=null,a="local-floor",l=1,c=null,d=null,h=null,p=null,m=null,g=null;const b=new Pue,v=e.getContextAttributes();let y=null,M=null;const x=[],C=[],F=new xe;let D=null;const k=new br;k.layers.enable(1),k.viewport=new vi;const B=new br;B.layers.enable(2),B.viewport=new vi;const T=[k,B],A=new Tue;A.layers.enable(1),A.layers.enable(2);let W=null,ie=null;function ne(le){const Fe=C.indexOf(le.inputSource);if(-1===Fe)return;const Ze=x[Fe];void 0!==Ze&&(Ze.update(le.inputSource,le.frame,c||o),Ze.dispatchEvent({type:le.type,data:le.inputSource}))}function oe(){r.removeEventListener("select",ne),r.removeEventListener("selectstart",ne),r.removeEventListener("selectend",ne),r.removeEventListener("squeeze",ne),r.removeEventListener("squeezestart",ne),r.removeEventListener("squeezeend",ne),r.removeEventListener("end",oe),r.removeEventListener("inputsourceschange",ge);for(let le=0;le=0&&(C[Le]=null,x[Le].disconnect(Ze))}for(let Fe=0;Fe=C.length){C.push(Ze),Le=Tt;break}if(null===C[Tt]){C[Tt]=Ze,Le=Tt;break}}if(-1===Le)break}const wt=x[Le];wt&&wt.connect(Ze)}}this.cameraAutoUpdate=!0,this.enabled=!1,this.isPresenting=!1,this.getController=function(le){let Fe=x[le];return void 0===Fe&&(Fe=new CP,x[le]=Fe),Fe.getTargetRaySpace()},this.getControllerGrip=function(le){let Fe=x[le];return void 0===Fe&&(Fe=new CP,x[le]=Fe),Fe.getGripSpace()},this.getHand=function(le){let Fe=x[le];return void 0===Fe&&(Fe=new CP,x[le]=Fe),Fe.getHandSpace()},this.setFramebufferScaleFactor=function(le){s=le,!0===n.isPresenting&&console.warn("THREE.WebXRManager: Cannot change framebuffer scale while presenting.")},this.setReferenceSpaceType=function(le){a=le,!0===n.isPresenting&&console.warn("THREE.WebXRManager: Cannot change reference space type while presenting.")},this.getReferenceSpace=function(){return c||o},this.setReferenceSpace=function(le){c=le},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 le=st(function*(Fe){if(r=Fe,null!==r){if(y=t.getRenderTarget(),r.addEventListener("select",ne),r.addEventListener("selectstart",ne),r.addEventListener("selectend",ne),r.addEventListener("squeeze",ne),r.addEventListener("squeezestart",ne),r.addEventListener("squeezeend",ne),r.addEventListener("end",oe),r.addEventListener("inputsourceschange",ge),!0!==v.xrCompatible&&(yield e.makeXRCompatible()),D=t.getPixelRatio(),t.getSize(F),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 Mu(m.framebufferWidth,m.framebufferHeight,{format:Po,type:ed,colorSpace:t.outputColorSpace,stencilBuffer:v.stencil});else{let Ze=null,Le=null,wt=null;v.depth&&(wt=v.stencil?e.DEPTH24_STENCIL8:e.DEPTH_COMPONENT24,Ze=v.stencil?eg:Jm,Le=v.stencil?Qm:xu);const Tt={colorFormat:e.RGBA8,depthFormat:wt,scaleFactor:s};h=new XRWebGLBinding(r,e),p=h.createProjectionLayer(Tt),r.updateRenderState({layers:[p]}),t.setPixelRatio(1),t.setSize(p.textureWidth,p.textureHeight,!1),M=new Mu(p.textureWidth,p.textureHeight,{format:Po,type:ed,depthTexture:new a5(p.textureWidth,p.textureHeight,Le,void 0,void 0,void 0,void 0,void 0,void 0,Ze),stencilBuffer:v.stencil,colorSpace:t.outputColorSpace,samples:v.antialias?4:0,resolveDepthBuffer:!1===p.ignoreDepthValues})}M.isXRRenderTarget=!0,this.setFoveation(l),c=null,o=yield r.requestReferenceSpace(a),nn.setContext(r),nn.start(),n.isPresenting=!0,n.dispatchEvent({type:"sessionstart"})}});return function(Fe){return le.apply(this,arguments)}}(),this.getEnvironmentBlendMode=function(){if(null!==r)return r.environmentBlendMode},this.getDepthTexture=function(){return b.getDepthTexture()};const q=new O,se=new O;function we(le,Fe){null===Fe?le.matrixWorld.copy(le.matrix):le.matrixWorld.multiplyMatrices(Fe.matrixWorld,le.matrix),le.matrixWorldInverse.copy(le.matrixWorld).invert()}this.updateCamera=function(le){if(null===r)return;null!==b.texture&&(le.near=b.depthNear,le.far=b.depthFar),A.near=B.near=k.near=le.near,A.far=B.far=k.far=le.far,(W!==A.near||ie!==A.far)&&(r.updateRenderState({depthNear:A.near,depthFar:A.far}),W=A.near,ie=A.far,k.near=W,k.far=ie,B.near=W,B.far=ie,k.updateProjectionMatrix(),B.updateProjectionMatrix(),le.updateProjectionMatrix());const Fe=le.parent,Ze=A.cameras;we(A,Fe);for(let Le=0;Le0&&(v.alphaTest.value=y.alphaTest);const M=t.get(y),x=M.envMap,C=M.envMapRotation;x&&(v.envMap.value=x,hf.copy(C),hf.x*=-1,hf.y*=-1,hf.z*=-1,x.isCubeTexture&&!1===x.isRenderTargetTexture&&(hf.y*=-1,hf.z*=-1),v.envMapRotation.value.setFromMatrix4(Fue.makeRotationFromEuler(hf)),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,v.lightMapIntensity.value=y.lightMapIntensity,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,q4(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 d(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===Ro&&v.clearcoatNormalScale.value.negate())),y.dispersion>0&&(v.dispersion.value=y.dispersion),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 Nue(i,t,e,n){let r={},s={},o=[];const a=i.getParameter(i.MAX_UNIFORM_BUFFER_BINDINGS);function m(M,x,C,F){const D=M.value,k=x+"_"+C;if(void 0===F[k])return F[k]="number"==typeof D||"boolean"==typeof D?D:D.clone(),!0;{const B=F[k];if("number"==typeof D||"boolean"==typeof D){if(B!==D)return F[k]=D,!0}else if(!1===B.equals(D))return B.copy(D),!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 k=0,B=x.length;k0&&(C+=16-D),M.__size=C,M.__cache={}}(M),C=function d(M){const x=function h(){for(let M=0;M0),Zt=!!ce.morphAttributes.position,li=!!ce.morphAttributes.normal,Li=!!ce.morphAttributes.color;let nr=bu;ue.toneMapped&&(null===k||!0===k.isXRRenderTarget)&&(nr=x.toneMapping);const oa=ce.morphAttributes.position||ce.morphAttributes.normal||ce.morphAttributes.color,fi=void 0!==oa?oa.length:0,kt=it.get(ue),fs=v.state.lights;!0!==le||!0!==Fe&&L===T||bn.setState(ue,L,L===T&&ue.id===B);let pi=!1;ue.version===kt.__version?(kt.needsLights&&kt.lightsStateVersion!==fs.state.version||kt.outputColorSpace!==Mt||te.isBatchedMesh&&!1===kt.batching||!te.isBatchedMesh&&!0===kt.batching||te.isBatchedMesh&&!0===kt.batchingColor&&null===te.colorTexture||te.isBatchedMesh&&!1===kt.batchingColor&&null!==te.colorTexture||te.isInstancedMesh&&!1===kt.instancing||!te.isInstancedMesh&&!0===kt.instancing||te.isSkinnedMesh&&!1===kt.skinning||!te.isSkinnedMesh&&!0===kt.skinning||te.isInstancedMesh&&!0===kt.instancingColor&&null===te.instanceColor||te.isInstancedMesh&&!1===kt.instancingColor&&null!==te.instanceColor||te.isInstancedMesh&&!0===kt.instancingMorph&&null===te.morphTexture||te.isInstancedMesh&&!1===kt.instancingMorph&&null!==te.morphTexture||kt.envMap!==Ct||!0===ue.fog&&kt.fog!==je||void 0!==kt.numClippingPlanes&&(kt.numClippingPlanes!==bn.numPlanes||kt.numIntersection!==bn.numIntersection)||kt.vertexAlphas!==Kt||kt.vertexTangents!==an||kt.morphTargets!==Zt||kt.morphNormals!==li||kt.morphColors!==Li||kt.toneMapping!==nr||kt.morphTargetsCount!==fi)&&(pi=!0):(pi=!0,kt.__version=ue.version);let Al=kt.currentProgram;!0===pi&&(Al=bE(ue,K,te));let jg=!1,aa=!1,YO=!1;const wr=Al.getUniforms(),Bu=kt.uniforms;if(Me.useProgram(Al.program)&&(jg=!0,aa=!0,YO=!0),ue.id!==B&&(B=ue.id,aa=!0),jg||T!==L){wr.setValue(N,"projectionMatrix",L.projectionMatrix),wr.setValue(N,"viewMatrix",L.matrixWorldInverse);const Va=wr.map.cameraPosition;void 0!==Va&&Va.setValue(N,Le.setFromMatrixPosition(L.matrixWorld)),nt.logarithmicDepthBuffer&&wr.setValue(N,"logDepthBufFC",2/(Math.log(L.far+1)/Math.LN2)),(ue.isMeshPhongMaterial||ue.isMeshToonMaterial||ue.isMeshLambertMaterial||ue.isMeshBasicMaterial||ue.isMeshStandardMaterial||ue.isShaderMaterial)&&wr.setValue(N,"isOrthographic",!0===L.isOrthographicCamera),T!==L&&(T=L,aa=!0,YO=!0)}if(te.isSkinnedMesh){wr.setOptional(N,te,"bindMatrix"),wr.setOptional(N,te,"bindMatrixInverse");const Va=te.skeleton;Va&&(null===Va.boneTexture&&Va.computeBoneTexture(),wr.setValue(N,"boneTexture",Va.boneTexture,_t))}te.isBatchedMesh&&(wr.setOptional(N,te,"batchingTexture"),wr.setValue(N,"batchingTexture",te._matricesTexture,_t),wr.setOptional(N,te,"batchingIdTexture"),wr.setValue(N,"batchingIdTexture",te._indirectTexture,_t),wr.setOptional(N,te,"batchingColorTexture"),null!==te._colorsTexture&&wr.setValue(N,"batchingColorTexture",te._colorsTexture,_t));const qO=ce.morphAttributes;if((void 0!==qO.position||void 0!==qO.normal||void 0!==qO.color)&&Yn.update(te,ce,Al),(aa||kt.receiveShadow!==te.receiveShadow)&&(kt.receiveShadow=te.receiveShadow,wr.setValue(N,"receiveShadow",te.receiveShadow)),ue.isMeshGouraudMaterial&&null!==ue.envMap&&(Bu.envMap.value=Ct,Bu.flipEnvMap.value=Ct.isCubeTexture&&!1===Ct.isRenderTargetTexture?-1:1),ue.isMeshStandardMaterial&&null===ue.envMap&&null!==K.environment&&(Bu.envMapIntensity.value=K.environmentIntensity),aa&&(wr.setValue(N,"toneMappingExposure",x.toneMappingExposure),kt.needsLights&&function $ve(L,K){L.ambientLightColor.needsUpdate=K,L.lightProbe.needsUpdate=K,L.directionalLights.needsUpdate=K,L.directionalLightShadows.needsUpdate=K,L.pointLights.needsUpdate=K,L.pointLightShadows.needsUpdate=K,L.spotLights.needsUpdate=K,L.spotLightShadows.needsUpdate=K,L.rectAreaLights.needsUpdate=K,L.hemisphereLights.needsUpdate=K}(Bu,YO),je&&!0===ue.fog&&Ut.refreshFogUniforms(Bu,je),Ut.refreshMaterialUniforms(Bu,ue,se,q,v.state.transmissionRenderTarget[L.id]),cS.upload(N,m8(kt),Bu,_t)),ue.isShaderMaterial&&!0===ue.uniformsNeedUpdate&&(cS.upload(N,m8(kt),Bu,_t),ue.uniformsNeedUpdate=!1),ue.isSpriteMaterial&&wr.setValue(N,"center",te.center),wr.setValue(N,"modelViewMatrix",te.modelViewMatrix),wr.setValue(N,"normalMatrix",te.normalMatrix),wr.setValue(N,"modelMatrix",te.matrixWorld),ue.isShaderMaterial||ue.isRawShaderMaterial){const Va=ue.uniformsGroups;for(let XO=0,Wve=Va.length;XO{function je(){ue.forEach(function(at){it.get(at).currentProgram.isReady()&&ue.delete(at)}),0!==ue.size?setTimeout(je,10):te(L)}null!==Ne.get("KHR_parallel_shader_compile")?je():setTimeout(je,10)})};let hi=null;function pc(){kf.stop()}function u8(){kf.start()}const kf=new Q4;function jO(L,K,ce,ue){if(!1===L.visible)return;if(L.layers.test(K.layers))if(L.isGroup)ce=L.renderOrder;else if(L.isLOD)!0===L.autoUpdate&&L.update(K);else if(L.isLight)v.pushLight(L),L.castShadow&&v.pushShadow(L);else if(L.isSprite){if(!L.frustumCulled||nn.intersectsSprite(L)){ue&&wt.setFromMatrixPosition(L.matrixWorld).applyMatrix4(Ze);const at=De.update(L),Mt=L.material;Mt.visible&&b.push(L,at,Mt,ce,wt.z,null)}}else if((L.isMesh||L.isLine||L.isPoints)&&(!L.frustumCulled||nn.intersectsObject(L))){const at=De.update(L),Mt=L.material;if(ue&&(void 0!==L.boundingSphere?(null===L.boundingSphere&&L.computeBoundingSphere(),wt.copy(L.boundingSphere.center)):(null===at.boundingSphere&&at.computeBoundingSphere(),wt.copy(at.boundingSphere.center)),wt.applyMatrix4(L.matrixWorld).applyMatrix4(Ze)),Array.isArray(Mt)){const Ct=at.groups;for(let Kt=0,an=Ct.length;Kt0&&yE(te,K,ce),je.length>0&&yE(je,K,ce),at.length>0&&yE(at,K,ce),Me.buffers.depth.setTest(!0),Me.buffers.depth.setMask(!0),Me.buffers.color.setMask(!0),Me.setPolygonOffset(!1)}function f8(L,K,ce,ue){if(null!==(!0===ce.isScene?ce.overrideMaterial:null))return;void 0===v.state.transmissionRenderTarget[ue.id]&&(v.state.transmissionRenderTarget[ue.id]=new Mu(1,1,{generateMipmaps:!0,type:Ne.has("EXT_color_buffer_half_float")||Ne.has("EXT_color_buffer_float")?Zm:ed,minFilter:yl,samples:4,stencilBuffer:s,resolveDepthBuffer:!1,resolveStencilBuffer:!1,colorSpace:ei.workingColorSpace}));const je=v.state.transmissionRenderTarget[ue.id],at=ue.viewport||A;je.setSize(at.z,at.w);const Mt=x.getRenderTarget();x.setRenderTarget(je),x.getClearColor(ne),oe=x.getClearAlpha(),oe<1&&x.setClearColor(16777215,.5),x.clear(),St&&ft.render(ce);const Ct=x.toneMapping;x.toneMapping=bu;const Kt=ue.viewport;if(void 0!==ue.viewport&&(ue.viewport=void 0),v.setupLightsView(ue),!0===le&&bn.setGlobalState(x.clippingPlanes,ue),yE(L,ce,ue),_t.updateMultisampleRenderTarget(je),_t.updateRenderTargetMipmap(je),!1===Ne.has("WEBGL_multisampled_render_to_texture")){let an=!1;for(let Zt=0,li=K.length;Zt0)for(let at=0,Mt=je.length;at0&&f8(ue,te,L,K),St&&ft.render(L),h8(b,L,K);null!==k&&(_t.updateMultisampleRenderTarget(k),_t.updateRenderTargetMipmap(k)),!0===L.isScene&&L.onAfterRender(x,L,K),Pn.resetDefaultState(),B=-1,T=null,M.pop(),M.length>0?(v=M[M.length-1],!0===le&&bn.setGlobalState(x.clippingPlanes,v.state.camera)):v=null,y.pop(),b=y.length>0?y[y.length-1]:null},this.getActiveCubeFace=function(){return F},this.getActiveMipmapLevel=function(){return D},this.getRenderTarget=function(){return k},this.setRenderTargetTextures=function(L,K,ce){it.get(L.texture).__webglTexture=K,it.get(L.depthTexture).__webglTexture=ce;const ue=it.get(L);ue.__hasExternalTextures=!0,ue.__autoAllocateDepthBuffer=void 0===ce,ue.__autoAllocateDepthBuffer||!0===Ne.has("WEBGL_multisampled_render_to_texture")&&(console.warn("THREE.WebGLRenderer: Render-to-texture extension was disabled because an external texture was provided"),ue.__useRenderToTexture=!1)},this.setRenderTargetFramebuffer=function(L,K){const ce=it.get(L);ce.__webglFramebuffer=K,ce.__useDefaultFramebuffer=void 0===K},this.setRenderTarget=function(L,K=0,ce=0){k=L,F=K,D=ce;let ue=!0,te=null,je=!1,at=!1;if(L){const Ct=it.get(L);void 0!==Ct.__useDefaultFramebuffer?(Me.bindFramebuffer(N.FRAMEBUFFER,null),ue=!1):void 0===Ct.__webglFramebuffer?_t.setupRenderTarget(L):Ct.__hasExternalTextures&&_t.rebindTextures(L,it.get(L.texture).__webglTexture,it.get(L.depthTexture).__webglTexture);const Kt=L.texture;(Kt.isData3DTexture||Kt.isDataArrayTexture||Kt.isCompressedArrayTexture)&&(at=!0);const an=it.get(L).__webglFramebuffer;L.isWebGLCubeRenderTarget?(te=Array.isArray(an[K])?an[K][ce]:an[K],je=!0):te=L.samples>0&&!1===_t.useMultisampledRTT(L)?it.get(L).__webglMultisampledFramebuffer:Array.isArray(an)?an[ce]:an,A.copy(L.viewport),W.copy(L.scissor),ie=L.scissorTest}else A.copy(Ve).multiplyScalar(se).floor(),W.copy(Ye).multiplyScalar(se).floor(),ie=Rt;if(Me.bindFramebuffer(N.FRAMEBUFFER,te)&&ue&&Me.drawBuffers(L,te),Me.viewport(A),Me.scissor(W),Me.setScissorTest(ie),je){const Ct=it.get(L.texture);N.framebufferTexture2D(N.FRAMEBUFFER,N.COLOR_ATTACHMENT0,N.TEXTURE_CUBE_MAP_POSITIVE_X+K,Ct.__webglTexture,ce)}else if(at){const Ct=it.get(L.texture);N.framebufferTextureLayer(N.FRAMEBUFFER,N.COLOR_ATTACHMENT0,Ct.__webglTexture,ce||0,K||0)}B=-1},this.readRenderTargetPixels=function(L,K,ce,ue,te,je,at){if(!L||!L.isWebGLRenderTarget)return void console.error("THREE.WebGLRenderer.readRenderTargetPixels: renderTarget is not THREE.WebGLRenderTarget.");let Mt=it.get(L).__webglFramebuffer;if(L.isWebGLCubeRenderTarget&&void 0!==at&&(Mt=Mt[at]),Mt){Me.bindFramebuffer(N.FRAMEBUFFER,Mt);try{const Ct=L.texture,Kt=Ct.format,an=Ct.type;if(!nt.textureFormatReadable(Kt))return void console.error("THREE.WebGLRenderer.readRenderTargetPixels: renderTarget is not in RGBA or implementation defined format.");if(!nt.textureTypeReadable(an))return void console.error("THREE.WebGLRenderer.readRenderTargetPixels: renderTarget is not in UnsignedByteType or implementation defined type.");K>=0&&K<=L.width-ue&&ce>=0&&ce<=L.height-te&&N.readPixels(K,ce,ue,te,vn.convert(Kt),vn.convert(an),je)}finally{const Ct=null!==k?it.get(k).__webglFramebuffer:null;Me.bindFramebuffer(N.FRAMEBUFFER,Ct)}}},this.readRenderTargetPixelsAsync=function(){var L=st(function*(K,ce,ue,te,je,at,Mt){if(!K||!K.isWebGLRenderTarget)throw new Error("THREE.WebGLRenderer.readRenderTargetPixels: renderTarget is not THREE.WebGLRenderTarget.");let Ct=it.get(K).__webglFramebuffer;if(K.isWebGLCubeRenderTarget&&void 0!==Mt&&(Ct=Ct[Mt]),Ct){Me.bindFramebuffer(N.FRAMEBUFFER,Ct);try{const Kt=K.texture,an=Kt.format,Zt=Kt.type;if(!nt.textureFormatReadable(an))throw new Error("THREE.WebGLRenderer.readRenderTargetPixelsAsync: renderTarget is not in RGBA or implementation defined format.");if(!nt.textureTypeReadable(Zt))throw new Error("THREE.WebGLRenderer.readRenderTargetPixelsAsync: renderTarget is not in UnsignedByteType or implementation defined type.");if(ce>=0&&ce<=K.width-te&&ue>=0&&ue<=K.height-je){const li=N.createBuffer();N.bindBuffer(N.PIXEL_PACK_BUFFER,li),N.bufferData(N.PIXEL_PACK_BUFFER,at.byteLength,N.STREAM_READ),N.readPixels(ce,ue,te,je,vn.convert(an),vn.convert(Zt),0),N.flush();const Li=N.fenceSync(N.SYNC_GPU_COMMANDS_COMPLETE,0);yield function cae(i,t,e){return new Promise(function(n,r){setTimeout(function s(){switch(i.clientWaitSync(t,i.SYNC_FLUSH_COMMANDS_BIT,0)){case i.WAIT_FAILED:r();break;case i.TIMEOUT_EXPIRED:setTimeout(s,e);break;default:n()}},e)})}(N,Li,4);try{N.bindBuffer(N.PIXEL_PACK_BUFFER,li),N.getBufferSubData(N.PIXEL_PACK_BUFFER,0,at)}finally{N.deleteBuffer(li),N.deleteSync(Li)}return at}}finally{const Kt=null!==k?it.get(k).__webglFramebuffer:null;Me.bindFramebuffer(N.FRAMEBUFFER,Kt)}}});return function(K,ce,ue,te,je,at,Mt){return L.apply(this,arguments)}}(),this.copyFramebufferToTexture=function(L,K=null,ce=0){!0!==L.isTexture&&(ag("WebGLRenderer: copyFramebufferToTexture function signature has changed."),K=arguments[0]||null,L=arguments[1]);const ue=Math.pow(2,-ce),te=Math.floor(L.image.width*ue),je=Math.floor(L.image.height*ue),at=null!==K?K.x:0,Mt=null!==K?K.y:0;_t.setTexture2D(L,0),N.copyTexSubImage2D(N.TEXTURE_2D,ce,0,0,at,Mt,te,je),Me.unbindTexture()},this.copyTextureToTexture=function(L,K,ce=null,ue=null,te=0){let je,at,Mt,Ct,Kt,an;!0!==L.isTexture&&(ag("WebGLRenderer: copyTextureToTexture function signature has changed."),ue=arguments[0]||null,L=arguments[1],K=arguments[2],te=arguments[3]||0,ce=null),null!==ce?(je=ce.max.x-ce.min.x,at=ce.max.y-ce.min.y,Mt=ce.min.x,Ct=ce.min.y):(je=L.image.width,at=L.image.height,Mt=0,Ct=0),null!==ue?(Kt=ue.x,an=ue.y):(Kt=0,an=0);const Zt=vn.convert(K.format),li=vn.convert(K.type);_t.setTexture2D(K,0),N.pixelStorei(N.UNPACK_FLIP_Y_WEBGL,K.flipY),N.pixelStorei(N.UNPACK_PREMULTIPLY_ALPHA_WEBGL,K.premultiplyAlpha),N.pixelStorei(N.UNPACK_ALIGNMENT,K.unpackAlignment);const Li=N.getParameter(N.UNPACK_ROW_LENGTH),nr=N.getParameter(N.UNPACK_IMAGE_HEIGHT),oa=N.getParameter(N.UNPACK_SKIP_PIXELS),fi=N.getParameter(N.UNPACK_SKIP_ROWS),kt=N.getParameter(N.UNPACK_SKIP_IMAGES),fs=L.isCompressedTexture?L.mipmaps[te]:L.image;N.pixelStorei(N.UNPACK_ROW_LENGTH,fs.width),N.pixelStorei(N.UNPACK_IMAGE_HEIGHT,fs.height),N.pixelStorei(N.UNPACK_SKIP_PIXELS,Mt),N.pixelStorei(N.UNPACK_SKIP_ROWS,Ct),L.isDataTexture?N.texSubImage2D(N.TEXTURE_2D,te,Kt,an,je,at,Zt,li,fs.data):L.isCompressedTexture?N.compressedTexSubImage2D(N.TEXTURE_2D,te,Kt,an,fs.width,fs.height,Zt,fs.data):N.texSubImage2D(N.TEXTURE_2D,te,Kt,an,je,at,Zt,li,fs),N.pixelStorei(N.UNPACK_ROW_LENGTH,Li),N.pixelStorei(N.UNPACK_IMAGE_HEIGHT,nr),N.pixelStorei(N.UNPACK_SKIP_PIXELS,oa),N.pixelStorei(N.UNPACK_SKIP_ROWS,fi),N.pixelStorei(N.UNPACK_SKIP_IMAGES,kt),0===te&&K.generateMipmaps&&N.generateMipmap(N.TEXTURE_2D),Me.unbindTexture()},this.copyTextureToTexture3D=function(L,K,ce=null,ue=null,te=0){let je,at,Mt,Ct,Kt,an,Zt,li,Li;!0!==L.isTexture&&(ag("WebGLRenderer: copyTextureToTexture3D function signature has changed."),ce=arguments[0]||null,ue=arguments[1]||null,L=arguments[2],K=arguments[3],te=arguments[4]||0);const nr=L.isCompressedTexture?L.mipmaps[te]:L.image;null!==ce?(je=ce.max.x-ce.min.x,at=ce.max.y-ce.min.y,Mt=ce.max.z-ce.min.z,Ct=ce.min.x,Kt=ce.min.y,an=ce.min.z):(je=nr.width,at=nr.height,Mt=nr.depth,Ct=0,Kt=0,an=0),null!==ue?(Zt=ue.x,li=ue.y,Li=ue.z):(Zt=0,li=0,Li=0);const oa=vn.convert(K.format),fi=vn.convert(K.type);let kt;if(K.isData3DTexture)_t.setTexture3D(K,0),kt=N.TEXTURE_3D;else{if(!K.isDataArrayTexture&&!K.isCompressedArrayTexture)return void console.warn("THREE.WebGLRenderer.copyTextureToTexture3D: only supports THREE.DataTexture3D and THREE.DataTexture2DArray.");_t.setTexture2DArray(K,0),kt=N.TEXTURE_2D_ARRAY}N.pixelStorei(N.UNPACK_FLIP_Y_WEBGL,K.flipY),N.pixelStorei(N.UNPACK_PREMULTIPLY_ALPHA_WEBGL,K.premultiplyAlpha),N.pixelStorei(N.UNPACK_ALIGNMENT,K.unpackAlignment);const fs=N.getParameter(N.UNPACK_ROW_LENGTH),pi=N.getParameter(N.UNPACK_IMAGE_HEIGHT),Al=N.getParameter(N.UNPACK_SKIP_PIXELS),jg=N.getParameter(N.UNPACK_SKIP_ROWS),aa=N.getParameter(N.UNPACK_SKIP_IMAGES);N.pixelStorei(N.UNPACK_ROW_LENGTH,nr.width),N.pixelStorei(N.UNPACK_IMAGE_HEIGHT,nr.height),N.pixelStorei(N.UNPACK_SKIP_PIXELS,Ct),N.pixelStorei(N.UNPACK_SKIP_ROWS,Kt),N.pixelStorei(N.UNPACK_SKIP_IMAGES,an),L.isDataTexture||L.isData3DTexture?N.texSubImage3D(kt,te,Zt,li,Li,je,at,Mt,oa,fi,nr.data):K.isCompressedArrayTexture?N.compressedTexSubImage3D(kt,te,Zt,li,Li,je,at,Mt,oa,nr.data):N.texSubImage3D(kt,te,Zt,li,Li,je,at,Mt,oa,fi,nr),N.pixelStorei(N.UNPACK_ROW_LENGTH,fs),N.pixelStorei(N.UNPACK_IMAGE_HEIGHT,pi),N.pixelStorei(N.UNPACK_SKIP_PIXELS,Al),N.pixelStorei(N.UNPACK_SKIP_ROWS,jg),N.pixelStorei(N.UNPACK_SKIP_IMAGES,aa),0===te&&K.generateMipmaps&&N.generateMipmap(kt),Me.unbindTexture()},this.initRenderTarget=function(L){void 0===it.get(L).__webglFramebuffer&&_t.setupRenderTarget(L)},this.initTexture=function(L){L.isCubeTexture?_t.setTextureCube(L,0):L.isData3DTexture?_t.setTexture3D(L,0):L.isDataArrayTexture||L.isCompressedArrayTexture?_t.setTexture2DArray(L,0):_t.setTexture2D(L,0),Me.unbindTexture()},this.resetState=function(){F=0,D=0,k=null,Me.reset(),Pn.reset()},typeof __THREE_DEVTOOLS__<"u"&&__THREE_DEVTOOLS__.dispatchEvent(new CustomEvent("observe",{detail:this}))}get coordinateSystem(){return td}get outputColorSpace(){return this._outputColorSpace}set outputColorSpace(t){this._outputColorSpace=t;const e=this.getContext();e.drawingBufferColorSpace=t===jk?"display-p3":"srgb",e.unpackColorSpace=ei.workingColorSpace===OC?"display-p3":"srgb"}}class kb extends Fr{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 rd,this.environmentIntensity=1,this.environmentRotation=new rd,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 AP{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=ea()}onUploadCallback(){}set needsUpdate(t){!0===t&&this.version++}get updateRange(){return ag("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;r0){const r=e[n[0]];if(void 0!==r){this.morphTargetInfluences=[],this.morphTargetDictionary={};for(let s=0,o=r.length;sn)return;FP.applyMatrix4(i.matrixWorld);const l=t.ray.origin.distanceTo(FP);return lt.far?void 0:{distance:l,point:q5.clone().applyMatrix4(i.matrixWorld),index:r,face:null,faceIndex:null,object:i}}const X5=new O,K5=new O;class Fg extends mf{constructor(t,e){super(t,e),this.isLineSegments=!0,this.type="LineSegments"}computeLineDistances(){const t=this.geometry;if(null===t.index){const e=t.attributes.position,n=[];for(let r=0,s=e.count;r0){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 uc{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 d=n[r];return(r+(o-d)/(n[r+1]-d))/(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 xe:new O);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 O,r=[],s=[],o=[],a=new O,l=new Bt;for(let m=0;m<=t;m++)r[m]=this.getTangentAt(m/t,new O);s[0]=new O,o[0]=new O;let c=Number.MAX_VALUE;const d=Math.abs(r[0].x),h=Math.abs(r[0].y),p=Math.abs(r[0].z);d<=c&&(c=d,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(er(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(er(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 NP extends uc{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 xe){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(e$(a,l.x,c.x,d.x,h.x),e$(a,l.y,c.y,d.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]:(ES.subVectors(r[0],r[1]).add(r[0]),c=ES);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 d=c.getPoint(1);return this.currentPoint.copy(d),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 TS extends hn{constructor(t=[new xe(0,-.5),new xe(.5,0),new xe(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=er(r,0,2*Math.PI);const s=[],o=[],a=[],l=[],c=[],d=1/e,h=new O,p=new xe,m=new O,g=new O,b=new O;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*d*r,C=Math.sin(x),F=Math.cos(x);for(let D=0;D<=t.length-1;D++)h.x=t[D].x*C,h.y=t[D].y,h.z=t[D].x*F,o.push(h.x,h.y,h.z),p.x=M/e,p.y=D/(t.length-1),a.push(p.x,p.y),c.push(l[3*D+0]*C,l[3*D+1],l[3*D+0]*F)}for(let M=0;M0&&x(!0),e>0&&x(!1)),this.setIndex(d),this.setAttribute("position",new ht(h,3)),this.setAttribute("normal",new ht(p,3)),this.setAttribute("uv",new ht(m,2))}copy(t){return super.copy(t),this.parameters=Object.assign({},t.parameters),this}static fromJSON(t){return new Lg(t.radiusTop,t.radiusBottom,t.height,t.radialSegments,t.heightSegments,t.openEnded,t.thetaStart,t.thetaLength)}}class RS extends Lg{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 RS(t.radius,t.height,t.radialSegments,t.heightSegments,t.openEnded,t.thetaStart,t.thetaLength)}}class jb 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 d=[],h=new O,p=new O,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 F=0;F<=e;F++){const D=F/e;h.x=-t*Math.cos(r+D*s)*Math.sin(o+x*a),h.y=t*Math.cos(o+x*a),h.z=t*Math.sin(r+D*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(D+C,1-x),M.push(c++)}d.push(M)}for(let y=0;y0)&&m.push(d[y][M+1],C,D),(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 dispersion(){return this._dispersion}set dispersion(t){this._dispersion>0!=t>0&&this.version++,this._dispersion=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.dispersion=t.dispersion,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 US extends Fo{constructor(t){super(),this.isMeshPhongMaterial=!0,this.type="MeshPhongMaterial",this.color=new qe(16777215),this.specular=new qe(1118481),this.shininess=30,this.map=null,this.lightMap=null,this.lightMapIntensity=1,this.aoMap=null,this.aoMapIntensity=1,this.emissive=new qe(0),this.emissiveIntensity=1,this.emissiveMap=null,this.bumpMap=null,this.bumpScale=1,this.normalMap=null,this.normalMapType=Qh,this.normalScale=new xe(1,1),this.displacementMap=null,this.displacementScale=1,this.displacementBias=0,this.specularMap=null,this.alphaMap=null,this.envMap=null,this.envMapRotation=new rd,this.combine=CC,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 m$(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 tO(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 nO(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 qb{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 p$(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}}hc.prototype.TimeBufferType=Float32Array,hc.prototype.ValueBufferType=Float32Array,hc.prototype.DefaultInterpolation=bb;class Ug extends hc{constructor(t,e,n){super(t,e,n)}}Ug.prototype.ValueTypeName="bool",Ug.prototype.ValueBufferType=Array,Ug.prototype.DefaultInterpolation=yb,Ug.prototype.InterpolantFactoryMethodLinear=void 0,Ug.prototype.InterpolantFactoryMethodSmooth=void 0;class _$ extends hc{}_$.prototype.ValueTypeName="color";class Vg extends hc{}Vg.prototype.ValueTypeName="number";class Ghe extends qb{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 d=c+a;c!==d;c+=4)ho.slerpFlat(s,0,o,c-a,o,c,l);return s}}class zg extends hc{InterpolantFactoryMethodLinear(t){return new Ghe(this.times,this.values,this.getValueSize(),t)}}zg.prototype.ValueTypeName="quaternion",zg.prototype.InterpolantFactoryMethodSmooth=void 0;class Hg extends hc{constructor(t,e,n){super(t,e,n)}}Hg.prototype.ValueTypeName="string",Hg.prototype.ValueBufferType=Array,Hg.prototype.DefaultInterpolation=yb,Hg.prototype.InterpolantFactoryMethodLinear=void 0,Hg.prototype.InterpolantFactoryMethodSmooth=void 0;class $g extends hc{}$g.prototype.ValueTypeName="vector";class Xb{constructor(t="",e=-1,n=[],r=2500){this.name=t,this.tracks=n,this.duration=e,this.blendMode=r,this.uuid=ea(),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(jhe(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(hc.toJSON(n[s]));return r}static CreateFromMorphTargetSequence(t,e,n,r){const s=e.length,o=[];for(let a=0;a1){const h=d[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=[];nO(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:y$,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 ud={};class Yhe extends Error{constructor(t,e){super(t),this.response=e}}class Fa extends bf{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=Ru.get(t);if(void 0!==s)return this.manager.itemStart(t),setTimeout(()=>{e&&e(s),this.manager.itemEnd(t)},0),s;if(void 0!==ud[t])return void ud[t].push({onLoad:e,onProgress:n,onError:r});ud[t]=[],ud[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 d=ud[t],h=c.body.getReader(),p=c.headers.get("X-File-Size")||c.headers.get("Content-Length"),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 F=new ProgressEvent("progress",{lengthComputable:g,loaded:b,total:m});for(let D=0,k=d.length;D{y.error(x)})}()}});return new Response(v)}throw new Yhe(`fetch for "${c.url}" responded with ${c.status}: ${c.statusText}`,c)}).then(c=>{switch(l){case"arraybuffer":return c.arrayBuffer();case"blob":return c.blob();case"document":return c.text().then(d=>(new DOMParser).parseFromString(d,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=>{Ru.add(t,c);const d=ud[t];delete ud[t];for(let h=0,p=d.length;h{const d=ud[t];if(void 0===d)throw this.manager.itemError(t),c;delete ud[t];for(let h=0,p=d.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 VS extends bf{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=Ru.get(t);if(void 0!==o)return s.manager.itemStart(t),setTimeout(function(){e&&e(o),s.manager.itemEnd(t)},0),o;const a=wb("img");function l(){d(),Ru.add(t,this),e&&e(this),s.manager.itemEnd(t)}function c(h){d(),r&&r(h),s.manager.itemError(t),s.manager.itemEnd(t)}function d(){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 ku extends bf{constructor(t){super(t)}load(t,e,n,r){const s=new Oo,o=new VS(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 zS extends Fr{constructor(t,e=1){super(),this.isLight=!0,this.type="Light",this.color=new qe(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()),void 0!==this.target&&(e.object.target=this.target.uuid),e}}const iO=new Bt,b$=new O,x$=new O;class rO{constructor(t){this.camera=t,this.intensity=1,this.bias=0,this.normalBias=0,this.radius=1,this.blurSamples=8,this.mapSize=new xe(512,512),this.map=null,this.mapPass=null,this.matrix=new Bt,this.autoUpdate=!0,this.needsUpdate=!1,this._frustum=new sS,this._frameExtents=new xe(1,1),this._viewportCount=1,this._viewports=[new vi(0,0,1,1)]}getViewportCount(){return this._viewportCount}getFrustum(){return this._frustum}updateMatrices(t){const e=this.camera,n=this.matrix;b$.setFromMatrixPosition(t.matrixWorld),e.position.copy(b$),x$.setFromMatrixPosition(t.target.matrixWorld),e.lookAt(x$),e.updateMatrixWorld(),iO.multiplyMatrices(e.projectionMatrix,e.matrixWorldInverse),this._frustum.setFromProjectionMatrix(iO),n.set(.5,0,0,.5,0,.5,0,.5,0,0,.5,.5,0,0,0,1),n.multiply(iO)}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.intensity=t.intensity,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 1!==this.intensity&&(t.intensity=this.intensity),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 Xhe extends rO{constructor(){super(new br(50,1,.5,500)),this.isSpotLightShadow=!0,this.focus=1}updateMatrices(t){const e=this.camera,n=2*sg*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 w$ extends zS{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(Fr.DEFAULT_UP),this.updateMatrix(),this.target=new Fr,this.distance=n,this.angle=r,this.penumbra=s,this.decay=o,this.map=null,this.shadow=new Xhe}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 M$=new Bt,Kb=new O,sO=new O;class Khe extends rO{constructor(){super(new br(90,1,.5,500)),this.isPointLightShadow=!0,this._frameExtents=new xe(4,2),this._viewportCount=6,this._viewports=[new vi(2,1,1,1),new vi(0,1,1,1),new vi(3,1,1,1),new vi(1,1,1,1),new vi(3,0,1,1),new vi(1,0,1,1)],this._cubeDirections=[new O(1,0,0),new O(-1,0,0),new O(0,0,1),new O(0,0,-1),new O(0,1,0),new O(0,-1,0)],this._cubeUps=[new O(0,1,0),new O(0,1,0),new O(0,1,0),new O(0,1,0),new O(0,0,1),new O(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()),Kb.setFromMatrixPosition(t.matrixWorld),n.position.copy(Kb),sO.copy(n.position),sO.add(this._cubeDirections[e]),n.up.copy(this._cubeUps[e]),n.lookAt(sO),n.updateMatrixWorld(),r.makeTranslation(-Kb.x,-Kb.y,-Kb.z),M$.multiplyMatrices(n.projectionMatrix,n.matrixWorldInverse),this._frustum.setFromProjectionMatrix(M$)}}class C$ extends zS{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 Khe}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 Zhe extends rO{constructor(){super(new Ib(-5,5,5,-5,.5,500)),this.isDirectionalLightShadow=!0}}class S$ extends zS{constructor(t,e){super(t,e),this.isDirectionalLight=!0,this.type="DirectionalLight",this.position.copy(Fr.DEFAULT_UP),this.updateMatrix(),this.target=new Fr,this.shadow=new Zhe}dispose(){this.shadow.dispose()}copy(t){return super.copy(t),this.target=t.target.clone(),this.shadow=t.shadow.clone(),this}}class HS extends zS{constructor(t,e){super(t,e),this.isAmbientLight=!0,this.type="AmbientLight"}}class Pu{static decodeText(t){if(console.warn("THREE.LoaderUtils: decodeText() has been deprecated with r165 and will be removed with r175. Use TextDecoder instead."),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=Ru.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 Ru.add(t,c),e&&e(c),s.manager.itemEnd(t),c}).catch(function(c){r&&r(c),Ru.remove(t),s.manager.itemError(t),s.manager.itemEnd(t)});Ru.add(t,l),s.manager.itemStart(t)}}class R${constructor(t=!0){this.autoStart=t,this.startTime=0,this.oldTime=0,this.elapsedTime=0,this.running=!1}start(){this.startTime=k$(),this.oldTime=this.startTime,this.elapsedTime=0,this.running=!0}stop(){this.getElapsedTime(),this.running=!1,this.autoStart=!1}getElapsedTime(){return this.getDelta(),this.elapsedTime}getDelta(){let t=0;if(this.autoStart&&!this.running)return this.start(),0;if(this.running){const e=k$();t=(e-this.oldTime)/1e3,this.oldTime=e,this.elapsedTime+=t}return t}}function k$(){return(typeof performance>"u"?Date:performance).now()}const aO="\\[\\]\\.:\\/",lfe=new RegExp("["+aO+"]","g"),lO="[^"+aO+"]",cfe="[^"+aO.replace("\\.","")+"]",pfe=new RegExp("^"+/((?:WC+[\/:])*)/.source.replace("WC",lO)+/(WCOD+)?/.source.replace("WCOD",cfe)+/(?:\.(WC+)(?:\[(.+)\])?)?/.source.replace("WC",lO)+/\.(WC+)(?:\[(.+)\])?/.source.replace("WC",lO)+"$"),mfe=["material","materials","bones","map"];class gfe{constructor(t,e,n){const r=n||Ri.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 Ri=(()=>{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(lfe,"")}static parseTrackName(e){const n=pfe.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!==mfe.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;an.name===t||n.userData.name===t);return e?(e.removeFromParent(),new Sl(e)):null}getBoundings(){return(new Bs).setFromObject(this.nativeMesh)}clone(){return new Sl(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 kn&&this.disposeMesh(t)}),this.nativeMesh instanceof kn&&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 xfe extends Sl{get supportsFov(){return this.nativeCamera instanceof br||"PerspectiveCamera"==this.nativeCamera.type}get fov(){return this.nativeCamera.fov||NaN}set fov(t){this.supportsFov&&(this.nativeCamera.fov=t,this.nativeCamera.updateProjectionMatrix())}constructor(t){super(t),this.nativeCamera=t}}class wfe extends Hse{createMaterial(t){let e={};t.color?e={color:t.color}:t.diffuse||(e={color:super.randomColor()});let n=t.shading||"unlit";switch(n){case"unlit":return new cr(Object.assign(Object.assign({},e),{map:t.diffuse||null}));case"standart":return new Yb(Object.assign(Object.assign({},e),{map:t.diffuse||null}));case"phong":return new US(Object.assign(Object.assign({},e),{map:t.diffuse||null}));case"wireframe":return new cr(Object.assign(Object.assign({},e),{wireframe:!0}));default:throw new Error(`"${n}" shading not implemented for three.js`)}}transformPrimitiveZUp(t){t.geometry.rotateX(Math.PI/2)}createPrimitive(t,e={}){var n,r,s,o;let a=null,l=this.createMaterial(e);switch(t.shape){case"PLANE":a=new kn(new lf((null===(n=t.dimensions)||void 0===n?void 0:n.x)||1e4,(null===(r=t.dimensions)||void 0===r?void 0:r.y)||1e4,null===(s=t.segments)||void 0===s?void 0:s.x,null===(o=t.segments)||void 0===o?void 0:o.y),l);break;case"BOX":a=new kn(new rf(...Oe.spr(t.dimensions),...t.segments?Oe.spr(t.segments):[]),l);break;case"CAPSULE":a=new kn(new IS(t.radius,t.centersDistance,t.capSegments,t.radialSegments),l),this.transformPrimitiveZUp(a);break;case"CYLINDER":a=new kn(new Lg(t.radius,t.radius,t.height,t.radialSegments,t.heightSegments),l),this.transformPrimitiveZUp(a);break;case"CONE":a=new kn(new RS(t.radius,t.height,t.radialSegments,t.heightSegments),l),this.transformPrimitiveZUp(a);break;case"SPHERE":a=new kn(new jb(t.radius,t.widthSegments,t.heightSegments),l),this.transformPrimitiveZUp(a);break;case"COMPOUND":a=new ia;for(const{position:d,rotation:h,shape:p}of t.children){const m=this.createPrimitive(p,e).nativeMesh;d&&m.position.set(...Oe.spr(d)),h&&m.quaternion.set(...Qi.spr(h)),a.add(m)}break;case"MESH":const c=new hn;c.setFromPoints(t.vertices.map(d=>new O(...Oe.spr(d)))),c.setIndex(t.faces.reduce((d,h)=>(d.push(...h),d),[])),a=new kn(c,l)}if(!a)throw new Error(`Primitive with shape "${t.shape}" not implemented`);return void 0!==e.castShadow&&(a.castShadow=e.castShadow),void 0!==e.receiveShadow&&(a.receiveShadow=e.receiveShadow),new Sl(a)}createPerspectiveCamera(t={}){return new xfe(new br(t.fov||75,t.aspectRatio||1,t.frustrum?t.frustrum.near:1,t.frustrum?t.frustrum.far:1e4))}}function X$(i,t){if(t===Poe)return console.warn("THREE.BufferGeometryUtils.toTrianglesDrawMode(): Geometry already defined as triangles."),i;if(t===Wk||t===x4){let e=i.getIndex();if(null===e){const o=[],a=i.getAttribute("position");if(void 0===a)return console.error("THREE.BufferGeometryUtils.toTrianglesDrawMode(): Undefined position attribute. Processing not possible."),i;for(let l=0;l=2.0 are supported.")));const c=new npe(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 d=0;d=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 Cfe(){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 Bn={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_DISPERSION:"KHR_materials_dispersion",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 Sfe{constructor(t){this.parser=t,this.name=Bn.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 Ufe{constructor(t){this.parser=t,this.name=Bn.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 Vfe{constructor(t){this.parser=t,this.name=Bn.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 zfe{constructor(t){this.name=Bn.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 d=r.count,h=r.byteStride,p=new Uint8Array(a,r.byteOffset||0,r.byteLength||0);return o.decodeGltfBufferAsync?o.decodeGltfBufferAsync(d,h,p,r.mode,r.filter).then(function(m){return m.buffer}):o.ready.then(function(){const m=new ArrayBuffer(d*h);return o.decodeGltfBuffer(new Uint8Array(m),d,h,p,r.mode,r.filter),m})})}return null}}class Hfe{constructor(t){this.name=Bn.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!==La.TRIANGLES&&c.mode!==La.TRIANGLE_STRIP&&c.mode!==La.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(d=>(l[c]=d,l[c])));return a.length<1?null:(a.push(this.parser.createNodeMesh(t)),Promise.all(a).then(c=>{const d=c.pop(),h=d.isGroup?d.children:[d],p=c[0].count,m=[];for(const g of h){const b=new Bt,v=new O,y=new ho,M=new O(1,1,1),x=new G5(g.geometry,g.material,p);for(let C=0;C-1,o=s?a.match(/Firefox\/([0-9]+)\./)[1]:-1}this.textureLoader=typeof createImageBitmap>"u"||n&&r<17||s&&o<98?new ku(this.options.manager):new rfe(this.options.manager),this.textureLoader.setCrossOrigin(this.options.crossOrigin),this.textureLoader.setRequestHeader(this.options.requestHeader),this.fileLoader=new Fa(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 Ef(s,a,r),hd(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,d]of o.children.entries())s(d,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(T,D[k*l+1]),l>=3&&v.setZ(T,D[k*l+2]),l>=4&&v.setW(T,D[k*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(d){d.flipY=!1,d.name=o.name||a.name||"",""===d.name&&"string"==typeof a.uri&&!1===a.uri.startsWith("data:image/")&&(d.name=a.uri);const p=(s.samplers||{})[o.sampler]||{};return d.magFilter=J$[p.magFilter]||lr,d.minFilter=J$[p.minFilter]||yl,d.wrapS=eG[p.wrapS]||ko,d.wrapT=eG[p.wrapT]||ko,r.associations.set(d,{textures:t}),d}).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 d=Promise.resolve(l).then(function(h){return new Promise(function(p,m){let g=p;!0===e.isImageBitmapLoader&&(g=function(b){const v=new Oo(b);v.needsUpdate=!0,p(v)}),e.load(Pu.resolveURL(h,s.path),g,void 0,m)})}).then(function(h){return!0===c&&a.revokeObjectURL(l),hd(h,o),h.userData.mimeType=o.mimeType||function epe(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]=d,d}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[Bn.KHR_TEXTURE_TRANSFORM]){const a=void 0!==n.extensions?n.extensions[Bn.KHR_TEXTURE_TRANSFORM]:void 0;if(a){const l=s.associations.get(o);o=s.extensions[Bn.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,Fo.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 us,Fo.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 Yb}loadMaterial(t){const e=this,r=this.extensions,s=this.json.materials[t];let o;const a={},c=[];if((s.extensions||{})[Bn.KHR_MATERIALS_UNLIT]){const h=r[Bn.KHR_MATERIALS_UNLIT];o=h.getMaterialType(),c.push(h.extendParams(a,s,e))}else{const h=s.pbrMetallicRoughness||{};if(a.color=new qe(1,1,1),a.opacity=1,Array.isArray(h.baseColorFactor)){const p=h.baseColorFactor;a.color.setRGB(p[0],p[1],p[2],ds),a.opacity=p[3]}void 0!==h.baseColorTexture&&c.push(e.assignTexture(a,"map",h.baseColorTexture,cs)),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=co);const d=s.alphaMode||"OPAQUE";if("BLEND"===d?(a.transparent=!0,a.depthWrite=!1):(a.transparent=!1,"MASK"===d&&(a.alphaTest=void 0!==s.alphaCutoff?s.alphaCutoff:.5)),void 0!==s.normalTexture&&o!==cr&&(c.push(e.assignTexture(a,"normalMap",s.normalTexture)),a.normalScale=new xe(1,1),void 0!==s.normalTexture.scale)){const h=s.normalTexture.scale;a.normalScale.set(h,h)}if(void 0!==s.occlusionTexture&&o!==cr&&(c.push(e.assignTexture(a,"aoMap",s.occlusionTexture)),void 0!==s.occlusionTexture.strength&&(a.aoMapIntensity=s.occlusionTexture.strength)),void 0!==s.emissiveFactor&&o!==cr){const h=s.emissiveFactor;a.emissive=(new qe).setRGB(h[0],h[1],h[2],ds)}return void 0!==s.emissiveTexture&&o!==cr&&c.push(e.assignTexture(a,"emissiveMap",s.emissiveTexture,cs)),Promise.all(c).then(function(){const h=new o(a);return s.name&&(h.name=s.name),hd(h,s),e.associations.set(h,{materials:t}),s.extensions&&Ef(r,h,s),h})}createUniqueName(t){const e=Ri.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[Bn.KHR_DRACO_MESH_COMPRESSION].decodePrimitive(a,e).then(function(l){return tG(l,a,e)})}const o=[];for(let a=0,l=t.length;a0&&Qfe(y,s),y.name=e.createUniqueName(s.name||"mesh_"+t),hd(y,s),v.extensions&&Ef(r,y,v),e.assignFinalMaterial(y),h.push(y)}for(let m=0,g=h.length;m1?new ia:1===c.length?c[0]:new Fr,d!==c[0])for(let h=0,p=c.length;h{const h=new Map;for(const[p,m]of r.associations)(p instanceof Fo||p instanceof Oo)&&h.set(p,m);return d.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(Fu[s.path]===Fu.weights?t.traverse(function(p){p.morphTargetInfluences&&l.push(p.name?p.name:p.uuid)}):l.push(a),Fu[s.path]){case Fu.weights:c=Vg;break;case Fu.rotation:c=zg;break;case Fu.position:case Fu.scale:c=$g;break;default:c=1===n.itemSize?Vg:$g}const d=void 0!==r.interpolation?Xfe[r.interpolation]:bb,h=this._getArrayFromAccessor(n);for(let p=0,m=l.length;p{r.type.endsWith("Light")&&(console.warn("WORKAROUND: light intensity from GLB divided by 200."),r.intensity*=.005)}),new Sl(n.scene)})}}const mo=(i,t)=>Array(i).fill(null).map((e,n)=>t(n));class Af{static startDebugView(t,e){let n=this.activeDebugViews.get(t);return n?n.renderers.includes(e)||n.renderers.push(e):(n={view:new Af(t),renderers:[e]},this.activeDebugViews.set(t,n)),n.view}static stopDebugView(t,e){const n=t.world,r=this.activeDebugViews.get(n);r&&(r.renderers=r.renderers.filter(s=>s!==e),0===r.renderers.length&&(r.view.dispose(),this.activeDebugViews.delete(n)))}constructor(t){this.world=t,this.debugScene=null,this.aSub=null,this.rSub=null,this.syncMap=new Map,this.debugScene=new kb;const e=n=>{var r,s;const o=n.debugBodySettings;let c,l=this.lineSegmentPointsForShape(o.shape);c=l?new Fg((new hn).setFromPoints(l)):null===(r=this.world)||void 0===r?void 0:r.visualScene.factory.createPrimitive(o.shape,{shading:"wireframe",color:0}).nativeMesh,this.syncMap.set(n,c),null===(s=this.debugScene)||void 0===s||s.add(c)};for(const n of this.world.physicsWorld.children)e(n);this.aSub=this.world.physicsWorld.added$.subscribe(n=>e(n)),this.rSub=this.world.physicsWorld.removed$.subscribe(n=>{var r;const s=this.syncMap.get(n);s&&(this.syncMap.delete(n),null===(r=this.debugScene)||void 0===r||r.remove(s))})}get scene(){return this.debugScene}render(t,e){for(const[r,s]of this.syncMap.entries()){const o=r.debugBodySettings;if(o.ignoreTransform||(s.position.set(...Oe.spr(r.position)),s.quaternion.set(...Qi.spr(r.rotation))),s.material){let a=16777215;switch(o.type){case"RIGID_DYNAMIC":a=o.sleeping?255:16711680;break;case"RIGID_STATIC":a=65280;break;case"TRIGGER":a=16776960}s.material.color.set(a),s.material.needsUpdate=!0}}const n=t.autoClearColor;n&&(t.autoClearColor=!1),t.render(this.debugScene,e),n&&(t.autoClearColor=!0)}lineSegmentPointsForShape(t){if("BOX"===t.shape){const e=Oe.scalarMult(t.dimensions,.5);return[...mo(8,n=>new O(n<4?e.x:-e.x,n%4<2?e.y:-e.y,n%2?e.z:-e.z)),...mo(8,n=>new O(n%2?e.x:-e.x,n<4?e.y:-e.y,n%4<2?e.z:-e.z)),...mo(8,n=>new O(n%4<2?e.x:-e.x,n%2?e.y:-e.y,n<4?e.z:-e.z))]}if("CYLINDER"===t.shape)return[...mo(32,e=>new O(t.radius*Math.sin(Math.floor((e+1)/2)*Math.PI/8),t.radius*Math.cos(Math.floor((e+1)/2)*Math.PI/8),-t.height/2)),...mo(32,e=>new O(t.radius*Math.sin(Math.floor((e+1)/2)*Math.PI/8),t.radius*Math.cos(Math.floor((e+1)/2)*Math.PI/8),t.height/2)),...mo(8,e=>new O(Math.floor(e/2)%2?0:e<4?t.radius:-t.radius,Math.floor(e/2)%2?e<4?t.radius:-t.radius:0,e%2?t.height/2:-t.height/2)),new O(0,0,-t.height/2),new O(0,0,t.height/2)];if("CONE"===t.shape)return[...mo(32,e=>new O(t.radius*Math.sin(Math.floor((e+1)/2)*Math.PI/8),t.radius*Math.cos(Math.floor((e+1)/2)*Math.PI/8),-t.height/2)),...mo(8,e=>new O(e%2||Math.floor(e/2)%2?0:e<4?t.radius:-t.radius,e%2?0:Math.floor(e/2)%2?e<4?t.radius:-t.radius:0,e%2?t.height/2:-t.height/2)),new O(0,0,-t.height/2),new O(0,0,t.height/2)];if("SPHERE"===t.shape)return[...mo(32,e=>new O(t.radius*Math.sin(Math.floor((e+1)/2)*Math.PI/8),t.radius*Math.cos(Math.floor((e+1)/2)*Math.PI/8),0)),...mo(32,e=>new O(t.radius*Math.sin(Math.floor((e+1)/2)*Math.PI/8),0,t.radius*Math.cos(Math.floor((e+1)/2)*Math.PI/8))),...mo(32,e=>new O(0,t.radius*Math.sin(Math.floor((e+1)/2)*Math.PI/8),t.radius*Math.cos(Math.floor((e+1)/2)*Math.PI/8)))];if("CAPSULE"===t.shape)return[...this.lineSegmentPointsForShape({shape:"CYLINDER",radius:t.radius,height:t.centersDistance}),...mo(16,e=>new O(t.radius*Math.cos(Math.floor((e+1)/2)*Math.PI/8),0,t.radius*Math.sin(Math.floor((e+1)/2)*Math.PI/8)+t.centersDistance/2)),...mo(16,e=>new O(t.radius*Math.cos(Math.floor((e+1)/2)*Math.PI/8),0,-t.radius*Math.sin(Math.floor((e+1)/2)*Math.PI/8)-t.centersDistance/2)),...mo(16,e=>new O(0,t.radius*Math.cos(Math.floor((e+1)/2)*Math.PI/8),t.radius*Math.sin(Math.floor((e+1)/2)*Math.PI/8)+t.centersDistance/2)),...mo(16,e=>new O(0,t.radius*Math.cos(Math.floor((e+1)/2)*Math.PI/8),-t.radius*Math.sin(Math.floor((e+1)/2)*Math.PI/8)-t.centersDistance/2))];if("CONVEX_HULL"===t.shape)return[...t.vertices.map(n=>[new O(n.x-.05,n.y,n.z),new O(n.x+.05,n.y,n.z),new O(n.x,n.y-.05,n.z),new O(n.x,n.y+.05,n.z),new O(n.x,n.y,n.z-.05),new O(n.x,n.y,n.z+.05)]).reduce((n,r)=>(n.push(...r),n),[])];if("COMPOUND"===t.shape){const e=[];for(const{position:n,shape:r,rotation:s}of t.children){let o=this.lineSegmentPointsForShape(r);if(!o)return null;e.push(...o.map(a=>new O(...Oe.spr(Oe.add(n||Oe.O,Oe.rot(a,s||Qi.O))))))}return e}return null}dispose(){var t,e;this.debugScene=null,null===(t=this.aSub)||void 0===t||t.unsubscribe(),null===(e=this.rSub)||void 0===e||e.unsubscribe(),this.syncMap=new Map}}Af.activeDebugViews=new Map;class nG extends Ose{get physicsDebugViewActive(){return this._physicsDebugViewActive}set physicsDebugViewActive(t){this._physicsDebugViewActive!=t&&(this._physicsDebugViewActive=t,this.world&&(t?this.debugView=Af.startDebugView(this.world,this):(Af.stopDebugView(this.debugView,this),this.debugView=null)))}constructor(t,e,n,r={}){super(t,n,r),this.scene=t,this.camera=e,this.canvas=n,this.world=null,this.debugView=null,this._physicsDebugViewActive=!1,this.nativeRenderer=new Bue(Object.assign({canvas:n,alpha:this.rendererOptions.transparent},this.rendererOptions)),this.nativeRenderer.shadowMap.enabled=!0,this.nativeRenderer.setClearColor(this.rendererOptions.background),this.nativeRenderer.shadowMap.type=o4,this.nativeRenderer.setPixelRatio(this.rendererOptions.forceResolution||devicePixelRatio)}addToWorld(t){this.world=t,this.physicsDebugViewActive&&(this.debugView=Af.startDebugView(this.world,this))}removeFromWorld(t){this.physicsDebugViewActive&&(Af.stopDebugView(this.debugView,this),this.debugView=null),this.world=null}resizeRenderer(t){this.nativeRenderer.setSize(t.x,t.y),(this.camera.nativeCamera instanceof br||"PerspectiveCamera"==this.camera.nativeCamera.type)&&Math.abs(this.camera.nativeCamera.aspect-t.x/t.y)>.01&&(this.camera.nativeCamera.aspect=t.x/t.y,this.camera.nativeCamera.updateProjectionMatrix())}render(){this.nativeRenderer.render(this.scene.nativeScene,this.camera.nativeCamera),this.physicsDebugViewActive&&this.debugView.render(this.nativeRenderer,this.camera.nativeCamera)}dispose(){this.camera.dispose(),this.nativeRenderer.clear(),this.nativeRenderer.dispose(),this.nativeRenderer.domElement=null}}const ope={name:"CopyShader",uniforms:{tDiffuse:{value:null},opacity:{value:1}},vertexShader:"\n\n\t\tvarying vec2 vUv;\n\n\t\tvoid main() {\n\n\t\t\tvUv = uv;\n\t\t\tgl_Position = projectionMatrix * modelViewMatrix * vec4( position, 1.0 );\n\n\t\t}",fragmentShader:"\n\n\t\tuniform float opacity;\n\n\t\tuniform sampler2D tDiffuse;\n\n\t\tvarying vec2 vUv;\n\n\t\tvoid main() {\n\n\t\t\tvec4 texel = texture2D( tDiffuse, vUv );\n\t\t\tgl_FragColor = opacity * texel;\n\n\n\t\t}"};class KS{constructor(){this.isPass=!0,this.enabled=!0,this.needsSwap=!0,this.clear=!1,this.renderToScreen=!1}setSize(){}render(){console.error("THREE.Pass: .render() must be implemented in derived pass.")}dispose(){}}const ape=new Ib(-1,1,1,-1,0,1),cpe=new class lpe extends hn{constructor(){super(),this.setAttribute("position",new ht([-1,3,0,-1,-1,0,3,-1,0],3)),this.setAttribute("uv",new ht([0,2,0,0,2,0],2))}};class dpe{constructor(t){this._mesh=new kn(cpe,t)}dispose(){this._mesh.geometry.dispose()}render(t){t.render(this._mesh,ape)}get material(){return this._mesh.material}set material(t){this._mesh.material=t}}class upe extends KS{constructor(t,e){super(),this.textureID=void 0!==e?e:"tDiffuse",t instanceof Ml?(this.uniforms=t.uniforms,this.material=t):t&&(this.uniforms=X4.clone(t.uniforms),this.material=new Ml({name:void 0!==t.name?t.name:"unspecified",defines:Object.assign({},t.defines),uniforms:this.uniforms,vertexShader:t.vertexShader,fragmentShader:t.fragmentShader})),this.fsQuad=new dpe(this.material)}render(t,e,n){this.uniforms[this.textureID]&&(this.uniforms[this.textureID].value=n.texture),this.fsQuad.material=this.material,this.renderToScreen?(t.setRenderTarget(null),this.fsQuad.render(t)):(t.setRenderTarget(e),this.clear&&t.clear(t.autoClearColor,t.autoClearDepth,t.autoClearStencil),this.fsQuad.render(t))}dispose(){this.material.dispose(),this.fsQuad.dispose()}}class iG extends KS{constructor(t,e){super(),this.scene=t,this.camera=e,this.clear=!0,this.needsSwap=!1,this.inverse=!1}render(t,e,n){const r=t.getContext(),s=t.state;let o,a;s.buffers.color.setMask(!1),s.buffers.depth.setMask(!1),s.buffers.color.setLocked(!0),s.buffers.depth.setLocked(!0),this.inverse?(o=0,a=1):(o=1,a=0),s.buffers.stencil.setTest(!0),s.buffers.stencil.setOp(r.REPLACE,r.REPLACE,r.REPLACE),s.buffers.stencil.setFunc(r.ALWAYS,o,4294967295),s.buffers.stencil.setClear(a),s.buffers.stencil.setLocked(!0),t.setRenderTarget(n),this.clear&&t.clear(),t.render(this.scene,this.camera),t.setRenderTarget(e),this.clear&&t.clear(),t.render(this.scene,this.camera),s.buffers.color.setLocked(!1),s.buffers.depth.setLocked(!1),s.buffers.color.setMask(!0),s.buffers.depth.setMask(!0),s.buffers.stencil.setLocked(!1),s.buffers.stencil.setFunc(r.EQUAL,1,4294967295),s.buffers.stencil.setOp(r.KEEP,r.KEEP,r.KEEP),s.buffers.stencil.setLocked(!0)}}class hpe extends KS{constructor(){super(),this.needsSwap=!1}render(t){t.state.buffers.stencil.setLocked(!1),t.state.buffers.stencil.setTest(!1)}}class fpe{constructor(t,e){if(this.renderer=t,this._pixelRatio=t.getPixelRatio(),void 0===e){const n=t.getSize(new xe);this._width=n.width,this._height=n.height,(e=new Mu(this._width*this._pixelRatio,this._height*this._pixelRatio,{type:Zm})).texture.name="EffectComposer.rt1"}else this._width=e.width,this._height=e.height;this.renderTarget1=e,this.renderTarget2=e.clone(),this.renderTarget2.texture.name="EffectComposer.rt2",this.writeBuffer=this.renderTarget1,this.readBuffer=this.renderTarget2,this.renderToScreen=!0,this.passes=[],this.copyPass=new upe(ope),this.copyPass.material.blending=Jc,this.clock=new R$}swapBuffers(){const t=this.readBuffer;this.readBuffer=this.writeBuffer,this.writeBuffer=t}addPass(t){this.passes.push(t),t.setSize(this._width*this._pixelRatio,this._height*this._pixelRatio)}insertPass(t,e){this.passes.splice(e,0,t),t.setSize(this._width*this._pixelRatio,this._height*this._pixelRatio)}removePass(t){const e=this.passes.indexOf(t);-1!==e&&this.passes.splice(e,1)}isLastEnabledPass(t){for(let e=t+1;e0?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;sG.fromArray(r,t),yO.fromArray(r,e),oG.fromArray(r,n),Na.subVectors(oG,yO),aG.subVectors(sG,yO),Na.cross(aG),Na.normalize(),s.push(Na.x,Na.y,Na.z),s.push(Na.x,Na.y,Na.z),s.push(Na.x,Na.y,Na.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 d=this.vertices.length;let h=this.parseVertexIndex(t,d),p=this.parseVertexIndex(e,d),m=this.parseVertexIndex(n,d);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?(ZS.setRGB(parseFloat(h[4]),parseFloat(h[5]),parseFloat(h[6])).convertSRGBToLinear(),e.colors.push(ZS.r,ZS.g,ZS.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"===d){const p=c.slice(1).trim().split(rG),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 ia;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 ht(d.normals,3)),d.colors.length>0&&(g=!0,b.setAttribute("color",new ht(d.colors,3))),!0===d.hasUVIndices&&b.setAttribute("uv",new ht(d.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 ht(e.vertices,3)),e.colors.length>0&&void 0!==e.colors[0]&&(l.setAttribute("color",new ht(e.colors,3)),a.vertexColors=!0);const c=new Vb(l,a);s.add(c)}return s}}class lG extends bf{constructor(t){super(t)}load(t,e,n,r){const s=this,o=""===this.path?Pu.extractUrlBase(t):this.path,a=new Fa(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,d):c;h=h.toLowerCase();let p=d>=0?c.substring(d+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 wpe(this.resourcePath||e,this.materialOptions);return a.setCrossOrigin(this.crossOrigin),a.setManager(this.manager),a.setMaterials(o),a}}class wpe{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:lc,this.wrap=void 0!==this.options.wrap?this.options.wrap:ko}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),d=e.loadTexture(function s(a,l){return"string"!=typeof l||""===l?"":/^https?:\/\//i.test(l)?l:a+l}(e.baseUrl,c.url));d.repeat.copy(c.scale),d.offset.copy(c.offset),d.wrapS=e.wrap,d.wrapT=e.wrap,("map"===a||"emissiveMap"===a)&&(d.colorSpace=cs),r[a]=d}for(const a in n){const l=n[a];let c;if(""!==l)switch(a.toLowerCase()){case"kd":r.color=(new qe).fromArray(l).convertSRGBToLinear();break;case"ks":r.specular=(new qe).fromArray(l).convertSRGBToLinear();break;case"ke":r.emissive=(new qe).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 US(r),this.materials[t]}getTextureParams(t,e){const n={scale:new xe(1,1),offset:new xe(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:y$;let a=o.getHandler(t);null===a&&(a=new ku(o)),a.setCrossOrigin&&a.setCrossOrigin(this.crossOrigin);const l=a.load(t,n,r,s);return void 0!==e&&(l.mapping=e),l}}const Mpe=["determinateSpinner"];function Cpe(i,t){if(1&i&&(ki(),G(0,"svg",11),Ie(1,"circle",12),j()),2&i){const e=re();It("viewBox",e._viewBox()),V(1),Yo("stroke-dasharray",e._strokeCircumference(),"px")("stroke-dashoffset",e._strokeCircumference()/2,"px")("stroke-width",e._circleStrokeWidth(),"%"),It("r",e._circleRadius())}}const Spe=Zy(class{constructor(i){this._elementRef=i}},"primary"),Epe=new me("mat-progress-spinner-default-options",{providedIn:"root",factory:function Ape(){return{diameter:cG}}}),cG=100;let Qb=(()=>{class i extends Spe{constructor(e,n,r){super(e),this.mode="mat-spinner"===this._elementRef.nativeElement.nodeName.toLowerCase()?"indeterminate":"determinate",this._value=0,this._diameter=cG,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,Ps(e)))}get diameter(){return this._diameter}set diameter(e){this._diameter=Ps(e)}get strokeWidth(){return this._strokeWidth??this.diameter/10}set strokeWidth(e){this._strokeWidth=Ps(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)(E(vt),E(kr,8),E(Epe))},i.\u0275cmp=ot({type:i,selectors:[["mat-progress-spinner"],["mat-spinner"]],viewQuery:function(e,n){if(1&e&&$n(Mpe,5),2&e){let r;At(r=Dt())&&(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&&(It("aria-valuemin",0)("aria-valuemax",100)("aria-valuenow","determinate"===n.mode?n.value:null)("mode",n.mode),Yo("width",n.diameter,"px")("height",n.diameter,"px"),ln("_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:[dt],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&&(fe(0,Cpe,2,8,"ng-template",null,0,zc),G(2,"div",1,2),ki(),G(4,"svg",3),Ie(5,"circle",4),j()(),ga(),G(6,"div",5)(7,"div",6)(8,"div",7),iy(9,8),j(),G(10,"div",9),iy(11,8),j(),G(12,"div",10),iy(13,8),j()()()),2&e){const r=Xi(1);V(4),It("viewBox",n._viewBox()),V(1),Yo("stroke-dasharray",n._strokeCircumference(),"px")("stroke-dashoffset",n._strokeDashOffset(),"px")("stroke-width",n._circleStrokeWidth(),"%"),It("r",n._circleRadius()),V(4),U("ngTemplateOutlet",r),V(2),U("ngTemplateOutlet",r),V(2),U("ngTemplateOutlet",r)}},dependencies:[yy],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})(),Tpe=(()=>{class i{}return i.\u0275fac=function(e){return new(e||i)},i.\u0275mod=en({type:i}),i.\u0275inj=Wt({imports:[ao,Jn]}),i})();const Ipe=["previewCanvasContainer"],Rpe=["previewCanvas"];function kpe(i,t){if(1&i){const e=jn();Gr(0),G(1,"label",11),Be(2),j(),G(3,"input",12),Pe("change",function(r){Vt(e);const s=re().$implicit;return s.value=r.currentTarget.checked,Et(s.change(s.value))}),j(),Wr()}if(2&i){const e=re(),n=e.index,r=e.$implicit,s=re().index;V(1),U("for","custom_control_"+s+"_"+n),V(1),ui(r.label),V(1),U("id","custom_control_"+s+"_"+n)("type",r.type)("checked",r.value)}}function Ppe(i,t){if(1&i){const e=jn();G(0,"div",9)(1,"label",11),Be(2),j(),G(3,"input",14),Pe("change",function(){const s=Vt(e).$implicit,o=re(2).$implicit;return o.value=s,Et(o.change(o.value))}),j()()}if(2&i){const e=t.$implicit,n=re(2),r=n.index,s=n.$implicit,o=re().index;V(1),U("for","custom_control_"+o+"_"+r+"_"+e),V(1),ui(e),V(1),U("id","custom_control_"+o+"_"+r+"_"+e)("checked",s.value===e)}}function Ope(i,t){if(1&i&&(G(0,"div",13)(1,"label"),Be(2),j(),fe(3,Ppe,4,4,"div",8),j()),2&i){const e=re().$implicit;V(2),ui(e.label),V(1),U("ngForOf",e.options)}}function Fpe(i,t){if(1&i){const e=jn();Gr(0),G(1,"label",11),Be(2),j(),G(3,"input",15),Pe("colorChange",function(r){Vt(e);const s=re().$implicit,o=re(2);return s.value=o.toRGB(r.value),Et(s.change(s.value))}),j(),Ie(4,"ngx-mat-color-toggle",16)(5,"ngx-mat-color-picker",null,17),Wr()}if(2&i){const e=Xi(6),n=re(),r=n.index,s=n.$implicit,o=re().index;V(1),U("for","custom_control_"+o+"_"+r),V(1),ui(s.label),V(1),U("ngxMatColorPicker",e),V(1),U("for",e)}}function Lpe(i,t){if(1&i){const e=jn();Gr(0),G(1,"label",11),Be(2),j(),G(3,"input",18),Pe("change",function(r){Vt(e);const s=re().$implicit;return s.value=r.currentTarget.value,Et(s.change(s.value))}),j(),Wr()}if(2&i){const e=re(),n=e.index,r=e.$implicit,s=re().index;V(1),U("for","custom_control_"+s+"_"+n),V(1),ui(r.label),V(1),U("id","custom_control_"+s+"_"+n)("min",r.minValue)("max",r.maxValue)("step",r.valueStep)("value",r.value)}}function Npe(i,t){if(1&i&&(G(0,"div",9),fe(1,kpe,4,5,"ng-container",6),fe(2,Ope,4,2,"div",10),fe(3,Fpe,7,4,"ng-container",6),fe(4,Lpe,4,7,"ng-container",6),j()),2&i){const e=t.$implicit;V(1),U("ngIf","checkbox"===e.type),V(1),U("ngIf","radio"===e.type),V(1),U("ngIf","color"===e.type),V(1),U("ngIf","slider"===e.type)}}function Bpe(i,t){if(1&i&&(Gr(0),G(1,"h4"),Be(2),j(),fe(3,Npe,5,4,"div",8),Wr()),2&i){const e=t.$implicit;V(2),ui(e.title),V(1),U("ngForOf",e.controls)}}function Upe(i,t){if(1&i){const e=jn();G(0,"div",9)(1,"label",11),Be(2),j(),G(3,"input",19),Pe("change",function(r){return Et(Vt(e).$implicit.visible=r.currentTarget.checked)}),j()()}if(2&i){const e=t.$implicit;V(1),U("for","visibility_"+e.name),V(1),ui(e.name),V(1),U("id","visibility_"+e.name)("checked",e.visible)}}function Vpe(i,t){if(1&i&&(Gr(0),G(1,"h4"),Be(2,"Objects visibility"),j(),fe(3,Upe,4,4,"div",8),Wr()),2&i){const e=re();V(3),U("ngForOf",e.meshes)}}function zpe(i,t){1&i&&Ie(0,"mat-spinner",20)}const El=i=>{i.colorSpace="srgb",i.anisotropy=8,i.magFilter=vr,i.minFilter=vr};let dG=(()=>{class i{constructor(e){this.cdr=e,this.visibilityControls=!0,this.groupFunction=null,this.customControls=[],this.onObjectLoaded=new $e,this._paths$=new Qe(null),this.destroyed$=new Te,this.entity=null,this.meshes=[]}get paths(){return this._paths$.getValue()}set paths(e){this._paths$.next(e)}ngAfterViewInit(){var e=this;return st(function*(){var s;e.world=new sk(new vO,{init:(s=st(function*(){}),function(){return s.apply(this,arguments)}),simulate:()=>{}}),yield e.world.init(),e.world.visualScene.nativeScene.add(new HS(16777215,2));let n=new Qe({x:1,y:1});e.renderer=e.world.addRenderer(e.world.visualScene.factory.createPerspectiveCamera({frustrum:{near:.01,far:1e4}}),e.previewCanvas.nativeElement,{size:n.asObservable(),background:11184810}),e.controller=new Vse(e.renderer,{mouseOptions:{canvas:e.previewCanvas.nativeElement},orbiting:{sensitivityX:2,sensitivityY:2},orbitingElasticity:30}),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(Ue(e.destroyed$)).subscribe(function(){var s=st(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 QS,h=yield(new lG).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 ia;y.add(...b[v]),y.name=v,p.remove(...b[v]),p.add(y)}}e.meshes=p.children,e.meshes.sort((b,v)=>b.name>v.name?1:-1),p.traverse(b=>{if(b instanceof kn){const v=b.material instanceof Array?b.material:[b.material];for(const y of v)y.transparent=!0,y.alphaTest=.5,y instanceof cr&&y.map&&(y.map.wrapS=Ji,y.map.wrapT=Ji,El(y.map),y.map.needsUpdate=!0)}}),e.onObjectLoaded.next(p),e.entity=new vl({object3D:new Sl(p)}),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=Oe.scalarMult(Oe.add(m.min,m.max),.5),e.controller.spherical={phi:1.22,theta:-1.32,radius:Oe.dist(m.min,m.max)},e.cdr.markForCheck()}});return function(o){return s.apply(this,arguments)}}())})()}toRGB(e){return(e?.r||0)<<16|(e?.g||0)<<8|(e?.b||0)}ngOnDestroy(){this.destroyed$.next(),this.destroyed$.complete()}}return i.\u0275fac=function(e){return new(e||i)(E(Qn))},i.\u0275cmp=ot({type:i,selectors:[["app-obj-viewer"]],viewQuery:function(e,n){if(1&e&&($n(Ipe,5),$n(Rpe,5)),2&e){let r;At(r=Dt())&&(n.previewCanvasContainer=r.first),At(r=Dt())&&(n.previewCanvas=r.first)}},inputs:{paths:"paths",visibilityControls:"visibilityControls",groupFunction:"groupFunction",customControls:"customControls"},outputs:{onObjectLoaded:"onObjectLoaded"},decls:8,vars:3,consts:[[1,"previewCanvasContainer"],["previewCanvasContainer",""],["width","640","height","480"],["previewCanvas",""],["id","controls"],[4,"ngFor","ngForOf"],[4,"ngIf"],["mode","indeterminate",4,"ngIf"],["class","controls-list",4,"ngFor","ngForOf"],[1,"controls-list"],["style","width: 100%",4,"ngIf"],[3,"for"],[3,"id","type","checked","change"],[2,"width","100%"],["type","radio",3,"id","checked","change"],["matInput","",1,"hidden",3,"ngxMatColorPicker","colorChange"],["matSuffix","",3,"for"],["picker",""],["type","range",3,"id","min","max","step","value","change"],["type","checkbox",3,"id","checked","change"],["mode","indeterminate"]],template:function(e,n){1&e&&(G(0,"div",0,1),Ie(2,"canvas",2,3),G(4,"div",4),fe(5,Bpe,4,2,"ng-container",5),fe(6,Vpe,4,1,"ng-container",6),j(),fe(7,zpe,1,0,"mat-spinner",7),j()),2&e&&(V(5),U("ngForOf",n.customControls),V(1),U("ngIf",n.visibilityControls),V(1),U("ngIf",!n.entity))},dependencies:[oo,_i,Yte,rc,Qb,Gie,vC,FH],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%] > h4[_ngcontent-%COMP%]{margin:0}.previewCanvasContainer[_ngcontent-%COMP%] #controls[_ngcontent-%COMP%] .controls-list[_ngcontent-%COMP%]{width:100%;display:flex;-webkit-user-select:none;user-select:none;align-items:center}.previewCanvasContainer[_ngcontent-%COMP%] #controls[_ngcontent-%COMP%] .controls-list[_ngcontent-%COMP%] > span[_ngcontent-%COMP%]{flex-grow:1}.previewCanvasContainer[_ngcontent-%COMP%] #controls[_ngcontent-%COMP%] .controls-list[_ngcontent-%COMP%] > label[_ngcontent-%COMP%]{flex-grow:1}"],changeDetection:0}),i})();function Hpe(i,t){if(1&i){const e=jn();ki(),G(0,"circle",5),Pe("mousedown",function(r){return Vt(e),Et(re().startDrag(r))}),ct(1,"async"),ct(2,"async"),j()}if(2&i){const e=re();let n,r;It("cx",(null==(n=ut(1,3,e.mapPointer$))?null:n.x)||0)("cy",(null==(r=ut(2,5,e.mapPointer$))?null:r.y)||0)("r",10)}}const $pe=function(){return{"stroke-width":3}};let uG=(()=>{class i{constructor(e){this.ref=e,this._roadSpline$=new Qe([]),this._pointer$=new Qe(null),this._projection$=new Qe("nz"),this._roadSplineProjected$=new Qe([]),this._pointerProjected$=new Qe(yi.O),this.splineClosed=!1,this.pointerChange=new $e,this.svgSize$=new Qe({x:100,y:100}),this.scalingSquare$=new Qe({x:0,y:0,width:100,height:100}),this.mapPolyline$=new Qe(""),this.mapPointer$=new Qe(null),this.isShiftPressed=!1,this.destroyed$=new Te,this.isDragging=!1}set roadSpline(e){this._roadSpline$.next(e)}set pointer(e){this._pointer$.next(e)}set projection(e){this._projection$.next(e)}get trackLength$(){return this._roadSpline$.pipe(tt(e=>{let n=0;for(let r=1;r{"Shift"===n.key&&(this.isShiftPressed=!0)}),Do(window,"keyup").pipe(Ue(this.destroyed$)).subscribe(n=>{"Shift"===n.key&&(this.isShiftPressed=!1)}),Da([this._roadSpline$,this._projection$]).pipe(Ue(this.destroyed$)).subscribe(([n,r])=>{this._roadSplineProjected$.next(n.map(s=>this.project(s)))}),Da([this._pointer$,this._projection$]).pipe(Ue(this.destroyed$)).subscribe(([n,r])=>{this._pointerProjected$.next(this.project(n||Oe.O))}),this._roadSplineProjected$.pipe(Ue(this.destroyed$),tt(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.y)},s={x:Math.max(s.x,a.x),y:Math.max(s.y,a.y)}});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$),Da([this._roadSplineProjected$,this.scalingSquare$,this.svgSize$]).pipe(Ue(this.destroyed$),tt(([n,r,s])=>{const o=n.map(a=>({x:(a.x-r.x)*s.x/r.width,y:(r.y-a.y)*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$),Da([this._pointerProjected$,this.scalingSquare$.asObservable(),this.svgSize$]).pipe(Ue(this.destroyed$),tt(([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()}startDrag(e){this.isDragging=!0,this.updatePointer(e)}drag(e){this.isDragging&&this.updatePointer(e)}endDrag(){this.isDragging=!1}getClosestProjectedLineIndex(e){const n=this._roadSplineProjected$.getValue();let r=-1,s=Number.MAX_SAFE_INTEGER;for(let d=1;d{return(i=Df||(Df={})).ThreeModel="model",i.Bitmap="bitmap",i.TwoSidedBitmap="two_sided_bitmap",Df;var i})();class Zpe extends KH{constructor(t,e,n){super(t,{loadDepth:40,inertia:2}),this.mapGraph=t,this.famPath=e,this.hideUnknownEntities$=n,this.textureLoader=new ku,this.terrainMaterials={},this.objLoader=new QS,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(Ql(),Ue(this._onRemoved$)).subscribe(e=>{for(const n of this.unknownEntities)n.visible=!e})}getPlaceholderTexture(){var t=this;return st(function*(){return t._placeholder?t._placeholder:(t._placeholderPromise||(t._placeholderPromise=t.textureLoader.loadAsync("assets/placeholder_texture.png")),t._placeholderPromise)})()}getPlaceholderTerrainTexture(){var t=this;return st(function*(){return t._placeholderTerrain?t._placeholderTerrain:(t._placeholderTerrainPromise||(t._placeholderTerrainPromise=t.textureLoader.loadAsync("assets/placeholder_texture.png").then(e=>(e.wrapS=ko,e.wrapT=Ji,El(e),e.flipY=!0,e))),t._placeholderTerrainPromise)})()}loadChunk(t){var e=this;return st(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 kn&&(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:Oe.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:Qi.fromAngle(Oe.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 vl({object3D:new Sl(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 cr({side:co,transparent:!0,visible:!1}),this.famPath?this.textureLoader.loadAsync(`${this.famPath}/${t}.png`).then(e=>{e.wrapS=ko,e.wrapT=Ji,El(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 st(function*(){let n=!1;if(t.type==Df.ThreeModel){let r;try{if(!e.famPath)throw new Error;const o=new lG,a=new QS,l=yield o.loadAsync(`${e.famPath}/props/${t.data.data.resource_id}/0/material.mtl`);l.preload(),a.setMaterials(l),r=new Sl(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 kn){const a=o.material instanceof Array?o.material:[o.material];for(const l of a)l.transparent=!0,l.alphaTest=.5,l instanceof cr&&l.map&&(l.map.wrapS=Ji,l.map.wrapT=Ji,El(l.map),l.map.needsUpdate=!0)}});const s=new vl({object3D: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,d)=>new Array(d).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 ia,[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,d]=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 vl({object3D:new Sl(s)});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 st(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=>(El(h),new cr({map:h,alphaTest:.5,transparent:!0,side:co}))),d=new kn(new lf(e.x,e.y),c[0]);if(d.rotateX(Math.PI/2),d.position.set(0,0,e.y/2),c.length>1){let h=-1;pb(r.world).pipe(function jse(i,t=Hy,e){const n=PI(i,t);return function Wse(i,t){return ni((e,n)=>{const{leading:r=!0,trailing:s=!1}=t??{};let o=!1,a=null,l=null,c=!1;const d=()=>{l?.unsubscribe(),l=null,s&&(m(),c&&n.complete())},h=()=>{l=null,c&&n.complete()},p=g=>l=Mr(i(g)).subscribe(qn(n,d,h)),m=()=>{if(o){o=!1;const g=a;a=null,n.next(g),!c&&p(g)}};e.subscribe(qn(n,g=>{o=!0,a=g,(!l||l.closed)&&(r?m():p(g))},()=>{c=!0,(!(s&&o&&l)||l.closed)&&n.complete()}))})}(()=>n,e)}(n&&!isNaN(+n)?1e3*+n:250)).subscribe(()=>{h=(h+1)%c.length,d.material=c[h]})}return[d,a]})()}}let Qpe=(()=>{class i{constructor(e,n,r){this.eelDelegate=e,this.cdr=n,this.mainService=r,this._resource$=new Qe(null),this.changed=new $e,this.previewLoading$=new Qe(!0),this.previewFamLocation$=new Qe(null),this.previewFamLoading$=new Qe(!1),this.pointer$=new Qe(null),this.selectedSplineIndex$=new Qe(0),this.selectedSplineItem$=new Qe(null),this.selectedAiInfoItem$=new Qe(null),this.selectedTerrainItem$=new Qe(null),this.famPath=null,this.name="",this.renderer=null,this.map=null,this.isOpenedTrack=!0,this.roadPath=null,this.destroyed$=new Te}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=>({x:e.position.x,y:e.position.z,z:e.position.y}))||[]}ngAfterViewInit(){var e=this;return st(function*(){var s;e.world=new sk(new vO,{init:(s=st(function*(){}),function(){return s.apply(this,arguments)}),simulate:()=>{},loader:{loadFromGgGlb:function(){var s=st(function*(...o){return[]});return function(){return s.apply(this,arguments)}}()}}),yield e.world.init(),e.skySphere=new vl({object3D:e.world.visualScene.factory.createPrimitive({shape:"SPHERE",radius:1e3},{color:16777215})}),e.skySphere.object3D.nativeMesh.material.side=co,e.world.addEntity(e.skySphere),e.selectionSphere=new vl({object3D: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 HS(16777215,2));let n=new Qe({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=Qi.lookAt(e.renderer.camera.position,Oe.add(e.renderer.camera.position,Oe.Y),Oe.Z),pb(e.world).pipe(Ue(e.destroyed$)).subscribe(()=>{e.renderer&&(e.skySphere.position=e.renderer.camera.position,e.pointer$.next(e.renderer.camera.position))}),e.controller=new e4(e.world.keyboardInput,e.renderer,{mouseOptions:{canvas:e.previewCanvas.nativeElement,pointerLock:!0},keymap:"wasd+arrows",cameraLinearSpeed:40,cameraBoostMultiplier:4,cameraMovementElasticity:100,cameraRotationElasticity:30,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(Ue(e.destroyed$)).subscribe(function(){var s=st(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(Ue(e.destroyed$),gn(([s,o])=>!!e.resource&&s.startsWith(e.resource.id)),fl(3e3)).subscribe(st(function*(){e.previewLoading$.next(!0),yield e.postTmpUpdates(e.resource?.id),yield e.loadPreview(),e.previewLoading$.next(!1)})),e.selectedSplineIndex$.pipe(Ue(e.destroyed$),fl(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=Oe.add(a,Oe.rotAround({x:10,y:-12,z:5},{x:0,y:0,z:1},-e.resource.data.road_spline[s].orientation)),e.renderer.rotation=Qi.lookAt(e.renderer.position,a,{x:0,y:0,z:1}),e.controller.reset())}e.selectedSplineItem$.next({id:sc(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:sc(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:sc(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 st(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 ku,o=r.find(a=>a.endsWith("spherical.png"));if(o){const a=yield s.loadAsync(o);a.colorSpace="srgb",a.mapping=cc,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 st(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})()}onPointerChange(e){this.renderer&&(this.renderer.position=e)}loadPreview(){var e=this;return st(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=qm.fromMapArray(e.roadPath.map((r,s)=>({path:`${e.terrainChunksObjLocation}terrain_chunk_${s}`,position:r,loadOptions:{}}))||[],!e.isOpenedTrack);e.unloadPreview(),e.map=new Zpe(n,e.famPath&&"resources/"+e.famPath,e.mainService.hideHiddenFields$),e.map.resource=e.resource,e.map.isOpenedTrack=e.isOpenedTrack,pb(e.world).pipe(Ue(e.destroyed$)).subscribe(()=>{e.map&&e.renderer&&e.map.loaderCursor$.next(e.renderer.position)}),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 st(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)(E(Jl),E(Qn),E(ka))},i.\u0275cmp=ot({type:i,selectors:[["app-tri-map-block-ui"]],viewQuery:function(e,n){if(1&e&&($n(Gpe,5),$n(Wpe,5)),2&e){let r;At(r=Dt())&&(n.previewCanvasContainer=r.first),At(r=Dt())&&(n.previewCanvas=r.first)}},inputs:{resource:"resource"},outputs:{changed:"changed"},decls:49,vars:44,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","projection","pointerChange"],[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&&(G(0,"div",0)(1,"h4"),Be(2,"Preview *.FAM file"),j(),G(3,"mat-form-field",1)(4,"mat-label"),Be(5,"Current preview FAM"),j(),G(6,"mat-select",2,3),Pe("valueChange",function(s){return n.onFamSelected(s)}),ct(8,"async"),ct(9,"async"),fe(10,jpe,2,2,"mat-option",4),G(11,"mat-option",5),Be(12,"custom"),j()()(),fe(13,Ype,9,3,"ng-container",6),fe(14,qpe,1,1,"mat-spinner",7),ct(15,"async"),j(),G(16,"div",8)(17,"div",9,10),Ie(19,"canvas",11,12),fe(21,Xpe,1,0,"mat-spinner",13),ct(22,"async"),j(),G(23,"div",14,10)(25,"mat-form-field",1)(26,"mat-label"),Be(27,"Spline item"),j(),G(28,"input",15),Pe("ngModelChange",function(s){return n.selectedSplineIndex$.next(s)}),ct(29,"async"),ct(30,"async"),j()(),G(31,"app-minimap",16),Pe("pointerChange",function(s){return n.onPointerChange(s)}),ct(32,"async"),j()()(),G(33,"h4"),Be(34,"Road spline item"),j(),Ie(35,"app-compound-block-ui",17),ct(36,"async"),G(37,"h4"),Be(38,"AI info (block for 4 spline items)"),j(),Ie(39,"app-compound-block-ui",17),ct(40,"async"),G(41,"h4"),Be(42,"Terrain (block for 4 spline items)"),j(),Ie(43,"app-compound-block-ui",17),ct(44,"async"),G(45,"h4"),Be(46,"Common"),j(),Ie(47,"app-compound-block-ui",18),ct(48,"async")),2&e){const r=Xi(7);let s;V(6),U("value",n.previewFamPossibleLocations.includes(ut(8,21,n.previewFamLocation$))?ut(9,23,n.previewFamLocation$):"custom"),V(4),U("ngForOf",n.previewFamPossibleLocations),V(3),U("ngIf","custom"==r.value),V(1),U("ngIf",ut(15,25,n.previewFamLoading$)),V(7),U("ngIf",ut(22,27,n.previewLoading$)),V(7),U("min",0)("max",4*(null==(s=ut(29,29,n._resource$))?null:s.data.num_chunks)-1)("ngModel",ut(30,31,n.selectedSplineIndex$)),V(3),U("roadSpline",n.roadSpline)("pointer",ut(32,33,n.pointer$))("splineClosed",!n.isOpenedTrack)("projection","nz"),V(4),U("resource",ut(36,35,n.selectedSplineItem$))("hideBlockActions",!0),V(4),U("resource",ut(40,37,n.selectedAiInfoItem$))("hideBlockActions",!0),V(4),U("resource",ut(44,39,n.selectedTerrainItem$))("hideBlockActions",!0),V(4),U("resource",ut(48,41,n._resource$))("hideBlockActions",!0)("fieldWhitelist",Rs(43,Kpe))}},dependencies:[oo,_i,pl,mu,nc,_u,gu,Zc,gl,Io,rc,nb,hb,Lm,Qb,ec,uG,qo],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-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})();const hG=i=>new Promise(t=>setTimeout(t,i)),fG=(i,t,e=null)=>{const n=document.createElement("canvas"),r=n.getContext("2d",{willReadFrequently:!0}),s=i.width,o=i.height;n.width=s,n.height=o,r.drawImage(i,0,0,s,o);const a=r.getImageData(0,0,s,o);for(let l=0;l{if(!(o instanceof kn))return;let a=-1;if(o.name.startsWith("lbl__rt_frnt")?a=0:o.name.startsWith("lbl__lt_frnt")?a=1:o.name.startsWith("lbl__rt_rear")?a=2:o.name.startsWith("lbl__lt_rear")&&(a=3),a>-1){this.wheels[a]=o,a<2&&(this.frontWheels[a]=o),o.geometry.boundingBox||o.geometry.computeBoundingBox();const l=Oe.avg(o.geometry.boundingBox.min,o.geometry.boundingBox.max);o.geometry.translate(...Oe.spr(Oe.neg(l))),o.position.set(...Oe.spr(l)),this.wheelIdlePositions[a]=l}(o.name.includes("rsid")||o.name.includes("lite"))&&(r.push(o),this.originalTexWithTailLights=o.material.map)}),!this.originalTexWithTailLights)throw new Error("Not a driveable NFS1 car");this.tailLightColors=n.includes("TRAFFC.CFM")?[9509903,16711680]:[3212546,16258068],this.texWithTailLightsImg=document.createElement("img"),this.texWithTailLights=new Oo(this.texWithTailLightsImg),this.texWithTailLights.flipY=this.originalTexWithTailLights.flipY,El(this.texWithTailLights),this.recolorTailLights(this.tailLightColors[0]).then();for(const o of r)o.material.map=this.texWithTailLights;const s=new ku;this.tyreTextures=[1,2,3,4].map(o=>s.load(`${n}/tyr${o}.png`));for(const o of this.tyreTextures)El(o);this.tyreMaterial=new cr({map:this.tyreTextures[0]}),this.tyreMaterial.transparent=!0,this.tyreMaterial.alphaTest=.5,this.tyreMaterial.map.wrapS=Ji,this.tyreMaterial.map.wrapT=Ji,this.tyreMaterial.polygonOffset=!0,this.tyreMaterial.polygonOffsetFactor=-4;for(const o of this.wheels)o.material=this.tyreMaterial}get tailLightsOn(){return this._tailLightsOn}set tailLightsOn(t){t!==this._tailLightsOn&&(this._tailLightsOn=t,this.recolorTailLights(this.tailLightColors[t?1:0]))}get speed(){return this._speed}set speed(t){if(t!==this._speed){switch(this._speed=t,this.tyreTextureUpdateTimer&&clearInterval(this.tyreTextureUpdateTimer),t){case"idle":this.tyreMaterial.map=this.tyreTextures[0];break;case"slow":let e=!0;this.tyreTextureUpdateTimer=setInterval(()=>{this.tyreMaterial.map=this.tyreTextures[e?1:2],this.tyreMaterial.needsUpdate=!0,e=!e},16);break;case"fast":this.tyreMaterial.map=this.tyreTextures[3]}this.tyreMaterial.needsUpdate=!0}}get steeringAngle(){return this._steeringAngle}set steeringAngle(t){if(t!==this._steeringAngle){this._steeringAngle=t;for(const e of this.frontWheels)e.rotation.set(0,0,t)}}recolorTailLights(t){var e=this;return st(function*(){if(e.originalTexWithTailLights&&e.texWithTailLights&&e.texWithTailLightsImg){for(let n=100;n>0&&!e.originalTexWithTailLights.source.data;n--)yield hG(50);((i,t,e,n=null)=>{const[r,s,o]=[t>>16,t>>8&255,255&t],[a,l,c]=[e>>16,e>>8&255,255&e];fG(i,(d,h)=>{d[h]==r&&d[h+1]==s&&d[h+2]==o&&(d[h]=a,d[h+1]=l,d[h+2]=c)},n)})(e.originalTexWithTailLights.source.data,e.tailLightsTexColor,t,e.texWithTailLightsImg),e.texWithTailLights.needsUpdate=!0}})()}dispose(){this.texWithTailLightsImg&&(this.texWithTailLightsImg.remove(),this.texWithTailLightsImg=null),this.texWithTailLights&&(this.texWithTailLights.dispose(),this.texWithTailLights=null),this.tyreTextureUpdateTimer&&clearInterval(this.tyreTextureUpdateTimer),this.tyreMaterial&&(this.tyreMaterial.dispose(),this.tyreMaterial=null)}}let tme=(()=>{class i{constructor(e,n,r){this.eelDelegate=e,this.mainService=n,this.cdr=r,this._resource$=new Qe(null),this.changed=new $e,this.previewPaths$=new Qe(null),this.destroyed$=new Te,this.customControls=[],this.serializerSettings={geometry__save_obj:!0,geometry__save_blend:!1,geometry__export_to_gg_web_engine:!1}}get resource(){return this._resource$.getValue()}set resource(e){this._resource$.next(e)}ngAfterViewInit(){var e=this;return st(function*(){e._resource$.pipe(Ue(e.destroyed$)).subscribe(function(){var n=st(function*(r){e.previewPaths$.next(yield e.loadPreviewFilePaths(r?.id))});return function(r){return n.apply(this,arguments)}}()),e.mainService.dataBlockChange$.pipe(Ue(e.destroyed$),gn(([n,r])=>!!e.resource&&n.startsWith(e.resource.id)),fl(1500)).subscribe(st(function*(){e.previewPaths$.next(null),e.previewPaths$.next(yield e.postTmpUpdates(e.resource?.id))}))})()}onObjectLoaded(e){var n=this;return st(function*(){if((n._resource$.value?.id||"").includes(".CFM__"))try{const r=n.resource?.id.split("/");r.pop(),r[r.length-1]=""+(+r[r.length-1]+1);const s=yield n.eelDelegate.retrieveValue(r.join("/")+"/data"),o=s.children_aliases.findIndex(l=>"!PAL"===l);if(-1==o)throw new Error("Not a car");const a=new eme(e,s.children[o].data.colors[254]>>>8,n.previewPaths$.value[0].substring(0,n.previewPaths$.value[0].lastIndexOf("/"))+"/assets");n.customControls=[{title:"TNFS car features",controls:[{label:"Brake lights on",type:"checkbox",value:!1,change:l=>{a.tailLightsOn=l}},{label:"Car speed",type:"radio",options:["idle","slow","fast"],value:"idle",change:l=>{a.speed=l}},{label:"Steering angle",type:"slider",minValue:-.7,maxValue:.7,valueStep:.05,value:0,change:l=>{a.steeringAngle=l}}]}],n.cdr.markForCheck()}catch{}})()}postTmpUpdates(e){var n=this;return st(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 st(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)(E(Jl),E(ka),E(Qn))},i.\u0275cmp=ot({type:i,selectors:[["app-orip-geometry-block-ui"]],inputs:{resource:"resource"},outputs:{changed:"changed"},decls:4,vars:7,consts:[[3,"paths","customControls","onObjectLoaded"],[3,"resource"]],template:function(e,n){1&e&&(G(0,"app-obj-viewer",0),Pe("onObjectLoaded",function(s){return n.onObjectLoaded(s)}),ct(1,"async"),j(),Ie(2,"app-compound-block-ui",1),ct(3,"async")),2&e&&(U("paths",ut(1,3,n.previewPaths$))("customControls",n.customControls),V(2),U("resource",ut(3,5,n._resource$)))},dependencies:[ec,dG,qo],changeDetection:0}),i})();const pG=i=>{let t=i.block_class_mro.split("__")[0];return"ArrayBlock"===t?pG(i.child_schema)+"[]":t},nme=["class","block-ui"];function ime(i,t){if(1&i&&(G(0,"mat-label",7),Be(1),j()),2&i){const e=re(2);U("matTooltip",e.resourceDescription),V(1),Ki("",null==e.resource?null:e.resource.name," ")}}function rme(i,t){if(1&i&&(G(0,"mat-option",8),Be(1),j()),2&i){const e=t.$implicit,n=t.index,r=re(2);U("value",n)("disabled",r.disabled),V(1),Ki(" ",r.blockClassStr(e)," ")}}function sme(i,t){if(1&i){const e=jn();Gr(0),fe(1,ime,2,2,"mat-label",1),ct(2,"async"),G(3,"div",2)(4,"mat-label"),Be(5,"Resource type:"),j(),G(6,"mat-select",3),Pe("selectionChange",function(r){return Vt(e),Et(re().setChoiceIndex(r.value))}),fe(7,rme,2,3,"mat-option",4),j(),Ie(8,"app-block-actions",5),j(),Ie(9,"app-editor",6),Wr()}if(2&i){const e=re();let n;V(1),U("ngIf",(null==e.resource?null:e.resource.name)&&(null==e.resource?null:e.resource.name)!=(null==(n=ut(2,8,e.main.resource$))?null:n.name)),V(5),U("value",e.resourceData.choice_index)("disabled",e.disabled),V(1),U("ngForOf",e.resource.schema.possible_resource_schemas),V(1),U("resource",e.childResource),V(1),U("resource",e.childResource)("hideBlockActions",!0)("disabled",e.disabled)}}let mG=(()=>{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 $e,this.blockClassStr=pG}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:sc(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)(E(ka))},i.\u0275cmp=ot({type:i,selectors:[["app-delegate",8,"block-ui"]],inputs:{resource:"resource",resourceDescription:"resourceDescription",hideBlockActions:"hideBlockActions",disabled:"disabled"},outputs:{changed:"changed"},attrs:nme,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"],[3,"resource","hideBlockActions","disabled"],["matTooltipPosition","above",3,"matTooltip"],[3,"value","disabled"]],template:function(e,n){1&e&&fe(0,sme,10,10,"ng-container",0),2&e&&U("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 ome=["class","block-ui"];function ame(i,t){if(1&i&&(G(0,"mat-label",7),Be(1),j()),2&i){const e=re(2);U("matTooltip",e.resourceDescription),V(1),Ki(" ",e.resource.name," ")}}function lme(i,t){if(1&i){const e=jn();Gr(0),fe(1,ame,2,2,"mat-label",1),G(2,"mat-selection-list",2),Pe("selectionChange",function(r){return Vt(e),Et(re().onSelection(r))}),G(3,"mat-list-option",3),Be(4," Left "),j(),G(5,"mat-list-option",4),Be(6," Right "),j()(),G(7,"mat-form-field",5)(8,"mat-label"),Be(9,"Texture ID"),j(),G(10,"input",6),Pe("ngModelChange",function(r){return Vt(e),Et(re().resource.data.texture_id=r)})("change",function(){return Vt(e),Et(re().changed.emit())}),j()(),Wr()}if(2&i){const e=re();V(1),U("ngIf",e.resource.name),V(2),U("selected",e.resource.data.has_left_fence),V(2),U("selected",e.resource.data.has_right_fence),V(5),U("max",63)("min",0)("step",1)("ngModel",e.resource.data.texture_id)}}let cme=(()=>{class i{constructor(){this.resource=null,this.resourceDescription="",this.changed=new $e}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=ot({type:i,selectors:[["app-fence-type",8,"block-ui"]],inputs:{resource:"resource",resourceDescription:"resourceDescription"},outputs:{changed:"changed"},attrs:ome,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&&fe(0,lme,11,7,"ng-container",0),2&e&&U("ngIf",n.resource)},dependencies:[_i,pl,mu,nc,_u,gu,Zc,gl,Io,rc,Fs,xC,bC],changeDetection:0}),i})(),dme=(()=>{class i{constructor(){this._resource=null,this.resourceMap={},this.changed=new $e}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]=["",ml.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)(E(tb),E(vte),E(sR))},i.\u0275cmp=ot({type:i,selectors:[["app-run-custom-action",8,"dialog"]],attrs:ume,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&&(G(0,"h1",0),Be(1),j(),G(2,"div",1)(3,"p"),Be(4),j()(),G(5,"form",2),fe(6,hme,4,4,"mat-form-field",3),j(),G(7,"div",4)(8,"button",5),Pe("click",function(){return n.dialogRef.close()}),Be(9,"Cancel"),j(),G(10,"button",6),Pe("click",function(){return n.submit()}),Be(11,"Run"),j()()),2&e&&(V(1),Ki('Run action "',n.data.title,'"'),V(3),ui(n.data.description),V(1),U("formGroup",n.argsForm),V(1),U("ngForOf",n.data.args),V(4),U("disabled",n.argsForm.invalid))},dependencies:[oo,TR,pl,nc,yR,gl,Io,rc,nb,hV,fV,pV,$h,uC],styles:["form[_ngcontent-%COMP%]{padding:0 24px}"]}),i})();function gG(i,t){return t?e=>My(t.pipe(Oi(1),function pme(){return ni((i,t)=>{i.subscribe(qn(t,ms))})}()),e.pipe(gG(i))):ir((e,n)=>Mr(i(e,n)).pipe(Oi(1),jB(e)))}function _G(i,t=Hy){const e=PI(i,t);return gG(()=>e)}const mme=["mat-menu-item",""];function gme(i,t){1&i&&(ki(),G(0,"svg",3),Ie(1,"polygon",4),j())}const _me=[[["mat-icon"],["","matMenuItemIcon",""]],"*"],vme=["mat-icon, [matMenuItemIcon]","*"];function yme(i,t){if(1&i){const e=jn();G(0,"div",0),Pe("keydown",function(r){return Vt(e),Et(re()._handleKeydown(r))})("click",function(){return Vt(e),Et(re().closed.emit("click"))})("@transformMenu.start",function(r){return Vt(e),Et(re()._onAnimationStart(r))})("@transformMenu.done",function(r){return Vt(e),Et(re()._onAnimationDone(r))}),G(1,"div",1),Yt(2),j()()}if(2&i){const e=re();U("id",e.panelId)("ngClass",e._classList)("@transformMenu",e._panelAnimationState),It("aria-label",e.ariaLabel||null)("aria-labelledby",e.ariaLabelledby||null)("aria-describedby",e.ariaDescribedby||null)}}const bme=["*"],bO=new me("MAT_MENU_PANEL"),xme=WM(GM(class{}));let JS=(()=>{class i extends xme{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 Te,this._focused=new Te,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",Yr("120ms cubic-bezier(0, 0, 0.2, 1)",oi({opacity:1,transform:"scale(1)"}))),Or("* => void",Yr("100ms 25ms linear",oi({opacity:0})))]),fadeInItems:Ra("fadeInItems",[Os("showing",oi({opacity:1})),Or("void => *",[oi({opacity:0}),Yr("400ms 100ms cubic-bezier(0.55, 0, 0.55, 0.2)")])])};let Mme=0;const vG=new me("mat-menu-default-options",{providedIn:"root",factory:function Cme(){return{overlapTrigger:!1,xPosition:"after",yPosition:"below",backdropClass:"cdk-overlay-transparent-backdrop"}}});let Jb=(()=>{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=tn(e)}get hasBackdrop(){return this._hasBackdrop}set hasBackdrop(e){this._hasBackdrop=tn(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 sm,this._classList={},this._panelAnimationState="void",this._animationDone=new Te,this.overlayPanelClass=this._defaultOptions.overlayPanelClass||"",this.backdropClass=this._defaultOptions.backdropClass,this._overlapTrigger=this._defaultOptions.overlapTrigger,this._hasBackdrop=this._defaultOptions.hasBackdrop,this.closed=new $e,this.close=this.closed,this.panelId="mat-menu-panel-"+Mme++}ngOnInit(){this.setPositionClasses()}ngAfterContentInit(){this._updateDirectDescendants(),this._keyManager=new IU(this._directDescendantItems).withWrap().withTypeAhead().withHomeAndEnd(),this._keyManager.tabOut.subscribe(()=>this.closed.emit("tab")),this._directDescendantItems.changes.pipe(Ao(this._directDescendantItems),ks(e=>Cr(...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(Ao(this._directDescendantItems),ks(n=>Cr(...n.map(r=>r._hovered))))}addItem(e){}removeItem(e){}_handleKeydown(e){const n=e.keyCode,r=this._keyManager;switch(n){case 27:Zo(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(Oi(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(Ao(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)(E(vt),E(gt),E(vG),E(Qn))},i.\u0275dir=ve({type:i,contentQueries:function(e,n,r){if(1&e&&(Wi(r,wme,5),Wi(r,JS,5),Wi(r,JS,4)),2&e){let s;At(s=Dt())&&(n.lazyContent=s.first),At(s=Dt())&&(n._allItems=s),At(s=Dt())&&(n.items=s)}},viewQuery:function(e,n){if(1&e&&$n(So,5),2&e){let r;At(r=Dt())&&(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})(),Sme=(()=>{class i extends Jb{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)(E(vt),E(gt),E(vG),E(Qn))},i.\u0275cmp=ot({type:i,selectors:[["mat-menu"]],hostVars:3,hostBindings:function(e,n){2&e&&It("aria-label",null)("aria-labelledby",null)("aria-describedby",null)},exportAs:["matMenu"],features:[An([{provide:bO,useExisting:i}]),dt],ngContentSelectors:bme,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&&(sr(),fe(0,yme,3,6,"ng-template"))},dependencies:[um],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:[eE.transformMenu,eE.fadeInItems]},changeDetection:0}),i})();const yG=new me("mat-menu-scroll-strategy"),Ame={provide:yG,deps:[as],useFactory:function Eme(i){return()=>i.scrollStrategies.reposition()}},bG=Oh({passive:!0});let Dme=(()=>{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,d){this._overlay=e,this._element=n,this._viewContainerRef=r,this._menuItemInstance=a,this._dir=l,this._focusMonitor=c,this._ngZone=d,this._overlayRef=null,this._menuOpen=!1,this._closingActionsSubscription=Qt.EMPTY,this._hoverSubscription=Qt.EMPTY,this._menuCloseSubscription=Qt.EMPTY,this._changeDetectorRef=Lt(Qn),this._handleTouchStart=h=>{YI(h)||(this._openedBy="touch")},this._openedBy=void 0,this.restoreFocus=!0,this.menuOpened=new $e,this.onMenuOpen=this.menuOpened,this.menuClosed=new $e,this.onMenuClose=this.menuClosed,this._scrollStrategy=s,this._parentMaterialMenu=o instanceof Jb?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 Jb&&(e._startAnimation(),e._directDescendantItems.changes.pipe(Ue(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 Jb?(n._resetAnimation(),n.lazyContent?n._animationDone.pipe(gn(r=>"void"===r.toState),Oi(1),Ue(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 Rm({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],[d,h]=[r,s],p=0;if(this.triggersSubmenu()){if(h=r="before"===e.xPosition?"start":"end",s=d="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:d,overlayY:o,offsetY:p},{originX:s,originY:l,overlayX:h,overlayY:o,offsetY:p},{originX:r,originY:c,overlayX:d,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 Cr(e,this._parentMaterialMenu?this._parentMaterialMenu.closed:mt(),this._parentMaterialMenu?this._parentMaterialMenu._hovered().pipe(gn(o=>o!==this._menuItemInstance),gn(()=>this._menuOpen)):mt(),n)}_handleMousedown(e){jI(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(gn(e=>e===this._menuItemInstance&&!e.disabled),_G(0,kI)).subscribe(()=>{this._openedBy="mouse",this.menu instanceof Jb&&this.menu._isAnimating?this.menu._animationDone.pipe(Oi(1),_G(0,kI),Ue(this._parentMaterialMenu._hovered())).subscribe(()=>this.openMenu()):this.openMenu()}))}_getPortal(e){return(!this._portal||this._portal.templateRef!==e.templateRef)&&(this._portal=new Sm(e.templateRef,this._viewContainerRef)),this._portal}}return i.\u0275fac=function(e){return new(e||i)(E(as),E(vt),E(jr),E(yG),E(bO,8),E(JS,10),E(Ia,8),E(Xc),E(gt))},i.\u0275dir=ve({type:i,hostVars:3,hostBindings:function(e,n){1&e&&Pe("click",function(s){return n._handleClick(s)})("mousedown",function(s){return n._handleMousedown(s)})("keydown",function(s){return n._handleKeydown(s)}),2&e&&It("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})(),Tme=(()=>{class i extends Dme{}return i.\u0275fac=function(){let t;return function(n){return(t||(t=si(i)))(n||i)}}(),i.\u0275dir=ve({type:i,selectors:[["","mat-menu-trigger-for",""],["","matMenuTriggerFor",""]],hostAttrs:[1,"mat-mdc-menu-trigger"],exportAs:["matMenuTrigger"],features:[dt]}),i})(),Ime=(()=>{class i{}return i.\u0275fac=function(e){return new(e||i)},i.\u0275mod=en({type:i}),i.\u0275inj=Wt({providers:[Ame],imports:[ao,Jy,Jn,km,qy,Jn]}),i})();function Rme(i,t){if(1&i){const e=jn();G(0,"button",7),Pe("click",function(){return Vt(e),Et(re(2).deserialize())}),Ie(1,"mat-icon",8),j()}}function kme(i,t){if(1&i){const e=jn();Gr(0),fe(1,Rme,2,0,"button",4),G(2,"button",5),Pe("click",function(){return Vt(e),Et(re().serializeBlockReversible())}),Ie(3,"mat-icon",6),j(),Wr()}if(2&i){const e=re();V(1),U("ngIf",e.isInReversibleSerializationState),V(1),U("disabled",e.isInReversibleSerializationState)}}function Pme(i,t){1&i&&(G(0,"button",9),Ie(1,"mat-icon",10),j()),2&i&&(re(),U("matMenuTriggerFor",Xi(3)))}function Ome(i,t){if(1&i){const e=jn();G(0,"button",11),Pe("click",function(){const s=Vt(e).$implicit;return Et(re().runCustomAction(s))}),G(1,"span"),Be(2),j()()}if(2&i){const e=t.$implicit;V(2),ui(e.title)}}const Fme=function(){return[]};let tE=(()=>{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 st(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)(E(ka),E(Jl),E(Qn),E(Nm),E(TV))},i.\u0275cmp=ot({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&&(fe(0,kme,4,2,"ng-container",0),fe(1,Pme,2,1,"button",1),G(2,"mat-menu",null,2),fe(4,Ome,3,1,"button",3),j()),2&e&&(U("ngIf",null==n.resource||null==n.resource.schema?null:n.resource.schema.serializable_to_disc),V(1),U("ngIf",(null==n.resource||null==n.resource.schema.custom_actions?null:n.resource.schema.custom_actions.length)>0),V(3),U("ngForOf",(null==n.resource?null:n.resource.schema.custom_actions)||Rs(3,Fme)))},dependencies:[oo,_i,Fs,YM,mR,Sme,JS,Tme],styles:["[_nghost-%COMP%]{display:flex}"]}),i})();const Lme=["class","block-ui"];function Nme(i,t){if(1&i&&(G(0,"mat-label",7),Be(1),j()),2&i){const e=re();U("matTooltip",e.resourceDescription),V(1),Ki("",null==e.resource?null:e.resource.name," ")}}function Bme(i,t){if(1&i&&(G(0,"audio",8),Ie(1,"source",9),ct(2,"async"),Be(3," Your browser does not support the audio element. "),j()),2&i){const e=re();V(1),U("src",ut(2,1,e.audioUrl$),Lp)}}function Ume(i,t){1&i&&Ie(0,"mat-spinner",10)}function Vme(i,t){1&i&&Ie(0,"app-block-actions",11),2&i&&U("resource",re().resource)}const zme=function(){return["wave_data"]};let Hme=(()=>{class i{constructor(e,n){this.eelDelegate=e,this.main=n,this._resource$=new Qe(null),this.audioUrl$=new Qe(null),this.resourceDescription="",this.hideBlockActions=!1,this.destroyed$=new Te,this.changed=new $e}set resource(e){this._resource$.next(e)}get resource(){return this._resource$.getValue()}ngAfterViewInit(){var e=this;return st(function*(){e._resource$.pipe(Ue(e.destroyed$)).subscribe(function(){var n=st(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)(E(Jl),E(ka))},i.\u0275cmp=ot({type:i,selectors:[["app-eacs-audio",8,"block-ui"]],inputs:{resource:"resource",resourceDescription:"resourceDescription",hideBlockActions:"hideBlockActions"},outputs:{changed:"changed"},attrs:Lme,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&&(G(0,"div",0),fe(1,Nme,2,2,"mat-label",1),ct(2,"async"),fe(3,Bme,4,3,"audio",2),ct(4,"async"),fe(5,Ume,1,0,"mat-spinner",3),ct(6,"async"),Ie(7,"div",4),fe(8,Vme,1,1,"app-block-actions",5),j(),Ie(9,"app-compound-block-ui",6),ct(10,"async")),2&e){let r;V(1),U("ngIf",(null==n.resource?null:n.resource.name)&&(null==n.resource?null:n.resource.name)!=(null==(r=ut(2,7,n.main.resource$))?null:r.name)),V(2),U("ngIf",ut(4,9,n.audioUrl$)),V(2),U("ngIf",n.resource&&!ut(6,11,n.audioUrl$)),V(3),U("ngIf",!n.hideBlockActions),V(1),U("resource",ut(10,13,n._resource$))("hideBlockActions",!0)("fieldBlacklist",Rs(15,zme))}},dependencies:[_i,Io,Fs,Qb,ec,tE,qo],styles:["#header[_ngcontent-%COMP%]{display:flex}"]}),i})();class $me{constructor(t,e){this.mesh=t,this.assetsPath=e,this.textures=[],this.tyreTextureUpdateTimer=void 0,this.tyreMaterial=null,this.tyreTextures=[],this._color=65280,this._speed="idle",this._steeringAngle=0,this.wheels=[],this.wheelIdlePositions=[],this.frontWheels=[];let n=new Set;if(t.traverse(r=>{if(!(r instanceof kn))return;let s=-1;if(r.name.startsWith("part_hp_12")?s=0:r.name.startsWith("part_hp_14")?s=1:r.name.startsWith("part_hp_16")?s=2:r.name.startsWith("part_hp_18")&&(s=3),s>-1){r.geometry.boundingBox||r.geometry.computeBoundingBox();let a=Oe.avg(r.geometry.boundingBox.min,r.geometry.boundingBox.max);return(0==s||2==s)&&(a={x:a.x,y:a.y,z:a.z+1.5}),r.geometry.translate(...Oe.spr(Oe.neg(a))),r.position.set(...Oe.spr(a)),this.wheelIdlePositions[s]=a,this.wheels.push(r),void(s<2&&this.frontWheels.push(r))}const o=r.material.map;o&&n.add(o)}),this.textures=Array.from(n).map(r=>{const s=new Oo(document.createElement("img"));return s.flipY=r.flipY,El(s),[r,s]}),t.traverse(r=>{if(!(r instanceof kn))return;const s=r.material.map;if(s){const o=this.textures.find(([a,l])=>a===s);o&&(r.material.map=o[1])}}),this.hasWheels){const r=new ku;this.tyreTextures=[0,1,2,3].map(s=>r.load(`${e}/m${s}00.png`));for(const s of this.tyreTextures)El(s);this.tyreMaterial=new cr({map:this.tyreTextures[0]}),this.tyreMaterial.transparent=!0,this.tyreMaterial.alphaTest=.5,this.tyreMaterial.map.wrapS=Ji,this.tyreMaterial.map.wrapT=Ji,this.tyreMaterial.polygonOffset=!0,this.tyreMaterial.polygonOffsetFactor=-4;for(const s of this.wheels)s.material=this.tyreMaterial}this.color=65280,this.recolorCar().then()}get color(){return this._color}set color(t){t!==this._color&&(this._color=t,this.recolorCar().then())}get speed(){return this._speed}set speed(t){if(t!==this._speed){switch(this._speed=t,this.tyreTextureUpdateTimer&&clearInterval(this.tyreTextureUpdateTimer),t){case"idle":this.tyreMaterial.map=this.tyreTextures[0];break;case"slow":let e=!0;this.tyreTextureUpdateTimer=setInterval(()=>{this.tyreMaterial.map=this.tyreTextures[e?1:2],this.tyreMaterial.needsUpdate=!0,e=!e},16);break;case"fast":this.tyreMaterial.map=this.tyreTextures[3]}this.tyreMaterial.needsUpdate=!0}}get steeringAngle(){return this._steeringAngle}set steeringAngle(t){if(t!==this._steeringAngle){this._steeringAngle=t;for(const e of this.frontWheels)e.rotation.set(0,0,t)}}get hasWheels(){return this.wheels.length>0}recolorCar(){var t=this;return st(function*(){const[e,n,r]=[t.color>>16,t.color>>8&255,255&t.color];for(const[s,o]of t.textures){for(let a=100;a>0&&!s.source.data;a--)yield hG(50);fG(s.source.data,(a,l)=>{if(a[l]+a[l+2]{class i{constructor(e,n,r){this.eelDelegate=e,this.main=n,this.cdr=r,this._resource$=new Qe(null),this.changed=new $e,this.customControls=[],this.previewPaths$=new Qe(null),this.destroyed$=new Te,this.serializerSettings={geometry__save_obj:!0,geometry__save_blend:!1,geometry__export_to_gg_web_engine:!1}}get resource(){return this._resource$.getValue()}set resource(e){this._resource$.next(e)}ngAfterViewInit(){var e=this;return st(function*(){e._resource$.pipe(Ue(e.destroyed$)).subscribe(function(){var n=st(function*(r){e.previewPaths$.next(yield e.loadPreviewFilePaths(r?.id))});return function(r){return n.apply(this,arguments)}}()),e.main.dataBlockChange$.pipe(Ue(e.destroyed$),gn(([n,r])=>!!e.resource&&n.startsWith(e.resource.id)),fl(1500)).subscribe(st(function*(){e.previewPaths$.next(null),e.previewPaths$.next(yield e.postTmpUpdates(e.resource?.id))}))})()}onObjectLoaded(e){var n=this;return st(function*(){try{const r=new $me(e,n.previewPaths$.value[0].substring(0,n.previewPaths$.value[0].lastIndexOf("/"))+"/assets");let s=null;const o=a=>{s&&clearTimeout(s),s=setTimeout(()=>r.color=a,50)};n.customControls=[{title:"NFS2 car features",controls:[{label:"Car color",type:"color",value:65280,change:a=>o(a)}]}],r.hasWheels&&n.customControls[0].controls.push({label:"Car speed",type:"radio",options:["idle","slow","fast"],value:"idle",change:a=>{r.speed=a}},{label:"Steering angle",type:"slider",minValue:-.7,maxValue:.7,valueStep:.05,value:0,change:a=>{r.steeringAngle=a}}),n.cdr.markForCheck()}catch(r){console.error(r)}})()}postTmpUpdates(e){var n=this;return st(function*(){if(e){const r=yield n.eelDelegate.serializeResourceTmp(e,Object.entries(n.main.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 st(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)(E(Jl),E(ka),E(Qn))},i.\u0275cmp=ot({type:i,selectors:[["app-geo-geometry",8,"block-ui"]],inputs:{resource:"resource"},outputs:{changed:"changed"},attrs:Gme,decls:4,vars:8,consts:[[3,"paths","groupFunction","customControls","onObjectLoaded"],[3,"resource",4,"ngIf"],[3,"resource"]],template:function(e,n){1&e&&(G(0,"app-obj-viewer",0),Pe("onObjectLoaded",function(s){return n.onObjectLoaded(s)}),ct(1,"async"),j(),fe(2,Wme,2,3,"app-compound-block-ui",1),ct(3,"async")),2&e&&(U("paths",ut(1,4,n.previewPaths$))("groupFunction",n.previewObjectGroupFunc)("customControls",n.customControls),V(2),U("ngIf",!ut(3,6,n.main.hideHiddenFields$)))},dependencies:[_i,ec,dG,qo],changeDetection:0}),i})();const Yme=function(){return["children","items_descr"]};let qme=(()=>{class i{constructor(){this._resource=null,this.hideBlockActions=!1,this.resourceMap={},this.changed=new $e}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:sc(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=ot({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&&Ie(0,"app-compound-block-ui",0)(1,"app-sidenav-res-list",1),2&e&&(U("resource",n.resource)("hideBlockActions",n.hideBlockActions)("fieldBlacklist",Rs(4,Yme)),V(1),U("resources",n.resourceMap))},dependencies:[ec,yC],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})();const Xme=["previewCanvasContainer"],Kme=["previewCanvas"];function Zme(i,t){1&i&&Ie(0,"mat-spinner",16),2&i&&U("diameter",40)}function Qme(i,t){1&i&&Ie(0,"mat-spinner",17)}const Jme=function(){return[]};class ege extends KH{constructor(t,e,n){super(t,{loadDepth:40,inertia:2}),this.mapGraph=t,this.qfsPath=e,this.hideUnknownEntities$=n,this.textureLoader=new ku,this.terrainMaterials={},this.objLoader=new QS,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(Ql(),Ue(this._onRemoved$)).subscribe(e=>{for(const n of this.unknownEntities)n.visible=!e})}getPlaceholderTexture(){var t=this;return st(function*(){return t._placeholder?t._placeholder:(t._placeholderPromise||(t._placeholderPromise=t.textureLoader.loadAsync("assets/placeholder_texture.png")),t._placeholderPromise)})()}getPlaceholderTerrainTexture(){var t=this;return st(function*(){return t._placeholderTerrain?t._placeholderTerrain:(t._placeholderTerrainPromise||(t._placeholderTerrainPromise=t.textureLoader.loadAsync("assets/placeholder_texture.png").then(e=>(e.wrapS=ko,e.wrapT=ko,El(e),e))),t._placeholderTerrainPromise)})()}loadChunk(t){var e=this;return st(function*(){const n=yield e.objLoader.loadAsync(t.path+".obj");n.position.set(t.position.x,t.position.y,t.position.z),n.traverse(s=>{s instanceof kn&&(s.material=e.getTerrainMaterial((s.userData.name||s.name).substr((s.userData.name||s.name).lastIndexOf("_")+1).split(".")[0]))});const r=new vl({object3D:new Sl(n)});return e.addChildren(r),e.loaded.set(t,[r]),[[r],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 cr({side:co,transparent:!0,visible:!1}),this.qfsPath?this.textureLoader.loadAsync(`${this.qfsPath}/${t}.png`).then(e=>{e.wrapS=ko,e.wrapT=ko,El(e),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]}}let tge=(()=>{class i{constructor(e,n,r){this.eelDelegate=e,this.cdr=n,this.mainService=r,this._resource$=new Qe(null),this.changed=new $e,this.previewLoading$=new Qe(!0),this.previewQfsLocation$=new Qe(null),this.previewQfsLoading$=new Qe(!1),this.pointer$=new Qe(null),this.selectedSplineIndex$=new Qe(0),this.qfsPath=null,this.name="",this.renderer=null,this.map=null,this.roadPath=null,this.destroyed$=new Te}get resource(){return this._resource$.getValue()}set resource(e){this._resource$.next(e)}ngAfterViewInit(){var e=this;return st(function*(){var s;e.world=new sk(new vO,{init:(s=st(function*(){}),function(){return s.apply(this,arguments)}),simulate:()=>{},loader:{loadFromGgGlb:function(){var s=st(function*(...o){return[]});return function(){return s.apply(this,arguments)}}()}}),yield e.world.init(),e.skySphere=new vl({object3D:e.world.visualScene.factory.createPrimitive({shape:"SPHERE",radius:1e3},{color:16777215})}),e.skySphere.object3D.nativeMesh.material.side=co,e.world.addEntity(e.skySphere),e.selectionSphere=new vl({object3D: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 HS(16777215,2));let n=new Qe({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=Qi.lookAt(e.renderer.camera.position,Oe.add(e.renderer.camera.position,Oe.Y),Oe.Z),pb(e.world).pipe(Ue(e.destroyed$)).subscribe(()=>{e.renderer&&(e.skySphere.position=e.renderer.camera.position,e.pointer$.next(e.renderer.camera.position))}),e.controller=new e4(e.world.keyboardInput,e.renderer,{mouseOptions:{canvas:e.previewCanvas.nativeElement,pointerLock:!0},keymap:"wasd+arrows",cameraLinearSpeed:40,cameraBoostMultiplier:4,cameraMovementElasticity:100,cameraRotationElasticity:30,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(Ue(e.destroyed$)).subscribe(function(){var s=st(function*(o){e.roadPath=e.resource?.data.block_positions.map(a=>({x:a.x,y:a.z,z:a.y})),e.previewLoading$.next(!0),o?(e.previewQfsLocation$.next(o.id.substring(0,o.id.indexOf(".TRK"))+"0.QFS"),yield e.loadTerrainChunks(o.id),yield e.onQfsSelected(e.previewQfsLocation$.value)):(yield e.loadTerrainChunks(),yield e.loadPreview()),e.previewLoading$.next(!1)});return function(o){return s.apply(this,arguments)}}()),e.mainService.dataBlockChange$.pipe(Ue(e.destroyed$),gn(([s,o])=>!!e.resource&&s.startsWith(e.resource.id)),fl(3e3)).subscribe(st(function*(){e.roadPath=e.resource?.data.block_positions.map(s=>({x:s.x,y:s.z,z:s.y})),e.previewLoading$.next(!0),yield e.postTmpUpdates(e.resource?.id),yield e.loadPreview(),e.previewLoading$.next(!1)})),e.selectedSplineIndex$.pipe(Ue(e.destroyed$),fl(250)).subscribe(s=>{if(e.resource){let o=e.resource.data.block_positions[s];if(!o)return;o={x:o.x,y:o.z,z:o.y},e.selectionSphere.position=o,e.renderer&&(e.renderer.position=Oe.add(o,Oe.rotAround({x:10,y:-12,z:5},{x:0,y:0,z:1},-0)),e.renderer.rotation=Qi.lookAt(e.renderer.position,o,{x:0,y:0,z:1}),e.controller.reset())}})})()}onQfsSelected(e){var n=this;return st(function*(){if(n.qfsPath!=e){n.previewQfsLoading$.next(!0);try{const r=yield n.eelDelegate.serializeResource(e),s=new ku,o=r.find(a=>a.endsWith("spherical.png"));if(o){const a=yield s.loadAsync(o);a.colorSpace="srgb",a.mapping=cc,n.skySphere.object3D.nativeMesh.material.map=a}else n.skySphere.object3D.nativeMesh.material.map=null;n.skySphere.object3D.nativeMesh.material.needsUpdate=!0,n.qfsPath=e}catch{n.skySphere.object3D.nativeMesh.material.map=null,n.skySphere.object3D.nativeMesh.material.needsUpdate=!0,n.qfsPath=null}finally{n.previewQfsLoading$.next(!1)}yield n.loadPreview()}})()}loadTerrainChunks(e){var n=this;return st(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})()}onPointerChange(e){this.renderer&&(this.renderer.position=e)}loadPreview(){var e=this;return st(function*(){if(!e.terrainChunksObjLocation||!e.roadPath)return;const n=qm.fromMapArray(e.roadPath.map((r,s)=>({path:`${e.terrainChunksObjLocation}terrain_chunk_${s}`,position:r,loadOptions:{}}))||[],!0);e.unloadPreview(),e.map=new ege(n,e.qfsPath&&"resources/"+e.qfsPath,e.mainService.hideHiddenFields$),e.map.resource=e.resource,e.map.isOpenedTrack=!1,pb(e.world).pipe(Ue(e.destroyed$)).subscribe(()=>{e.map&&e.renderer&&e.map.loaderCursor$.next(e.renderer.position)}),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 st(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)(E(Jl),E(Qn),E(ka))},i.\u0275cmp=ot({type:i,selectors:[["app-trk-map-block-ui"]],viewQuery:function(e,n){if(1&e&&($n(Xme,5),$n(Kme,5)),2&e){let r;At(r=Dt())&&(n.previewCanvasContainer=r.first),At(r=Dt())&&(n.previewCanvas=r.first)}},inputs:{resource:"resource"},outputs:{changed:"changed"},decls:32,vars:26,consts:[[1,"qfsSelector"],["appearance","fill"],["matInput","","type","text",3,"value"],["customQfsInput",""],["mat-button","",3,"click"],["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","projection","pointerChange"],[3,"resource"],["mode","indeterminate",3,"diameter"],["mode","indeterminate"]],template:function(e,n){if(1&e){const r=jn();G(0,"div",0)(1,"h4"),Be(2,"Preview QFS file"),j(),G(3,"mat-form-field",1)(4,"mat-label"),Be(5,"Custom QFS path"),j(),Ie(6,"input",2,3),ct(8,"async"),j(),G(9,"button",4),Pe("click",function(){Vt(r);const o=Xi(7);return Et(n.onQfsSelected(o.value))}),Be(10,"LOAD"),j(),fe(11,Zme,1,1,"mat-spinner",5),ct(12,"async"),j(),G(13,"div",6)(14,"div",7,8),Ie(16,"canvas",9,10),fe(18,Qme,1,0,"mat-spinner",11),ct(19,"async"),j(),G(20,"div",12,8)(22,"mat-form-field",1)(23,"mat-label"),Be(24,"Spline item"),j(),G(25,"input",13),Pe("ngModelChange",function(o){return n.selectedSplineIndex$.next(o)}),ct(26,"async"),ct(27,"async"),j()(),G(28,"app-minimap",14),Pe("pointerChange",function(o){return n.onPointerChange(o)}),ct(29,"async"),j()()(),Ie(30,"app-compound-block-ui",15),ct(31,"async")}if(2&e){let r;V(6),U("value",ut(8,11,n.previewQfsLocation$)),V(5),U("ngIf",ut(12,13,n.previewQfsLoading$)),V(7),U("ngIf",ut(19,15,n.previewLoading$)),V(7),U("min",0)("max",4*(null==(r=ut(26,17,n._resource$))?null:r.data.num_blocks)-1)("ngModel",ut(27,19,n.selectedSplineIndex$)),V(3),U("roadSpline",n.roadPath||Rs(25,Jme))("pointer",ut(29,21,n.pointer$))("splineClosed",!0)("projection","nz"),V(2),U("resource",ut(31,23,n._resource$))}},dependencies:[_i,pl,mu,nc,_u,gu,Zc,gl,Io,rc,nb,Qb,ec,uG,qo],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-minimap[_ngcontent-%COMP%]{flex-grow:1;display:flex}.qfsSelector[_ngcontent-%COMP%]{display:flex;align-items:center;width:100%;column-gap:1rem}.qfsSelector[_ngcontent-%COMP%] h4[_ngcontent-%COMP%]{min-width:-moz-fit-content;min-width:fit-content}.qfsSelector[_ngcontent-%COMP%] mat-form-field[_ngcontent-%COMP%]{flex-grow:1}.qfsSelector[_ngcontent-%COMP%] mat-spinner[_ngcontent-%COMP%], .qfsSelector[_ngcontent-%COMP%] button[_ngcontent-%COMP%]{margin-bottom:1.34375em}"],changeDetection:0}),i})();function nge(i,t){if(1&i&&(G(0,"mat-error"),Be(1),j()),2&i){const e=re(2);V(1),Ah(" ",e.resourceError.data.error_class,": ",e.resourceError.data.error_text," ")}}function ige(i,t){1&i&&Ie(0,"mat-spinner",5)}function rge(i,t){if(1&i&&(G(0,"div",2),fe(1,nge,2,2,"mat-error",3),fe(2,ige,1,0,"mat-spinner",4),j()),2&i){const e=re();V(1),U("ngIf",e.resourceError),V(1),U("ngIf",!e.resourceError)}}function sge(i,t){}let e0=(()=>{class i{constructor(e,n){this.mainService=e,this.deep=n,this._component=null,this._componentChangedSub=null,this.destroyed$=new Te,this.resourceSet$=new Te,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)}resourceEqual(e,n){return e&&n?e.id===n.id&&this.deep.deepEquals(e.data,n.data):!e==!n}set resource(e){if(!this.resourceEqual(e,this._resourceError||this._resource)&&(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(Ue(this.destroyed$),Ue(this.resourceSet$)).subscribe(()=>{const s=this._resource.id,o=this._resource.data;if(o instanceof Array)if(this._resource.schema.block_class_mro.startsWith("BytesBlock"))this.mainService.dataBlockChange$.next([s,o]);else 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 oge(i,t){1&i&&Ie(0,"mat-icon",17)}function age(i,t){1&i&&Ie(0,"mat-icon",18)}let lge=(()=>{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 st(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 st(function*(){if(e.mainService.hasUnsavedChanges){let n=e.dialog.open(MV,{data:{text:"There are unsaved changes, which will be lost. Are you sure you want to reload file?"}});if(!(yield aR(n.afterClosed())))return}yield e.mainService.reloadResource(),e.cdr.markForCheck()})()}}return i.\u0275fac=function(e){return new(e||i)(E(Jl),E(ka),E(Nm),E(TV),E(Qn))},i.\u0275cmp=ot({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&&(G(0,"mat-toolbar",0)(1,"span"),Be(2),ct(3,"async"),ct(4,"async"),j(),Ie(5,"span",1),G(6,"button",2),Pe("click",function(){return n.toggleUnknownsVisibility()}),fe(7,oge,1,0,"mat-icon",3),ct(8,"async"),fe(9,age,1,0,"mat-icon",4),ct(10,"async"),j(),Ie(11,"mat-divider",5)(12,"app-block-actions",6),ct(13,"async"),G(14,"button",7),Pe("click",function(){return n.reloadResource()}),ct(15,"async"),Ie(16,"mat-icon",8),j(),Ie(17,"mat-divider",5),G(18,"button",9),Pe("click",function(){return n.saveResource()}),ct(19,"async"),ct(20,"async"),Ie(21,"mat-icon",10),j()(),G(22,"div",11),Ie(23,"div",12)(24,"app-editor",13),ct(25,"async"),ct(26,"async"),ct(27,"async"),G(28,"div",14)(29,"a",15),Ie(30,"img",16),j()(),Ie(31,"div",12),j()),2&e){let r;V(2),Ah("",(null==(r=ut(3,9,n.mainService.resource$))?null:r.name)||"...","",ut(4,11,n.mainService.hasUnsavedChanges$)?"*":"",""),V(5),U("ngIf",ut(8,13,n.mainService.hideHiddenFields$)),V(2),U("ngIf",!ut(10,15,n.mainService.hideHiddenFields$)),V(3),U("resource",ut(13,17,n.mainService.resource$)),V(2),U("disabled",!ut(15,19,n.mainService.eelDelegate.openedResourcePath$)),V(4),U("disabled",!ut(19,21,n.mainService.resource$)||!ut(20,23,n.mainService.hasUnsavedChanges$)),V(6),U("resource",ut(25,25,n.mainService.customActionRunning$)?null:ut(26,27,n.mainService.resource$)||ut(27,29,n.mainService.error$))("hideBlockActions",!0)}},dependencies:[_i,wJ,CJ,Fs,YM,mR,e0,tE,qo],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 xG(i){return new pe(3e3,!1)}function $ge(){return typeof window<"u"&&typeof window.document<"u"}function xO(){return typeof process<"u"&&"[object process]"==={}.toString.call(process)}function Lu(i){switch(i.length){case 0:return new eb;case 1:return i[0];default:return new sV(i)}}function wG(i,t,e,n,r=new Map,s=new Map){const o=[],a=[];let l=-1,c=null;if(n.forEach(d=>{const h=d.get("offset"),p=h==l,m=p&&c||new Map;d.forEach((g,b)=>{let v=b,y=g;if("offset"!==b)switch(v=t.normalizePropertyName(v,o),y){case iR:y=r.get(b);break;case Kc: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 Rge(i){return new pe(3502,!1)}();return a}function wO(i,t,e,n){switch(t){case"start":i.onStart(()=>n(e&&MO(e,"start",i)));break;case"done":i.onDone(()=>n(e&&MO(e,"done",i)));break;case"destroy":i.onDestroy(()=>n(e&&MO(e,"destroy",i)))}}function MO(i,t,e){const s=CO(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 CO(i,t,e,n,r="",s=0,o){return{element:i,triggerName:t,fromState:e,toState:n,phaseName:r,totalTime:s,disabled:!!o}}function ra(i,t,e){let n=i.get(t);return n||i.set(t,n=e),n}function MG(i){const t=i.indexOf(":");return[i.substring(1,t),i.slice(t+1)]}let SO=(i,t)=>!1,CG=(i,t,e)=>[],SG=null;function EO(i){const t=i.parentNode||i.host;return t===SG?null:t}(xO()||typeof Element<"u")&&($ge()?(SG=(()=>document.documentElement)(),SO=(i,t)=>{for(;t;){if(t===i)return!0;t=EO(t)}return!1}):SO=(i,t)=>i.contains(t),CG=(i,t,e)=>{if(e)return Array.from(i.querySelectorAll(t));const n=i.querySelector(t);return n?[n]:[]});let Tf=null,EG=!1;const AG=SO,DG=CG;let TG=(()=>{class i{validateStyleProperty(e){return function Wge(i){Tf||(Tf=function jge(){return typeof document<"u"?document.body:null}()||{},EG=!!Tf.style&&"WebkitAppearance"in Tf.style);let t=!0;return Tf.style&&!function Gge(i){return"ebkit"==i.substring(1,6)}(i)&&(t=i in Tf.style,!t&&EG&&(t="Webkit"+i.charAt(0).toUpperCase()+i.slice(1)in Tf.style)),t}(e)}matchesElement(e,n){return!1}containsElement(e,n){return AG(e,n)}getParentElement(e){return EO(e)}query(e,n,r){return DG(e,n,r)}computeStyle(e,n,r){return r||""}animate(e,n,r,s,o,a=[],l){return new eb(r,s)}}return i.\u0275fac=function(e){return new(e||i)},i.\u0275prov=ke({token:i,factory:i.\u0275fac}),i})(),AO=(()=>{class i{}return i.NOOP=new TG,i})();const Yge=1e3,DO="ng-enter",nE="ng-leave",iE="ng-trigger",rE=".ng-trigger",RG="ng-animating",TO=".ng-animating";function fd(i){if("number"==typeof i)return i;const t=i.match(/^(-?[\.\d]+)(m?s)/);return!t||t.length<2?0:IO(parseFloat(t[1]),t[2])}function IO(i,t){return"s"===t?i*Yge:i}function sE(i,t,e){return i.hasOwnProperty("duration")?i:function Xge(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(xG()),{duration:0,delay:0,easing:""};r=IO(parseFloat(a[1]),a[2]);const l=a[3];null!=l&&(s=IO(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 cge(){return new pe(3100,!1)}()),a=!0),s<0&&(t.push(function dge(){return new pe(3101,!1)}()),a=!0),a&&t.splice(l,0,xG())}return{duration:r,delay:s,easing:o}}(i,t,e)}function t0(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 Nu(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 OG(i,t,e){return e?t+":"+e+";":""}function FG(i){let t="";for(let e=0;e{const s=kO(r);e&&!e.has(r)&&e.set(r,i.style[s]),i.style[s]=n}),xO()&&FG(i))}function If(i,t){i.style&&(t.forEach((e,n)=>{const r=kO(n);i.style[r]=""}),xO()&&FG(i))}function n0(i){return Array.isArray(i)?1==i.length?i[0]:nV(i):i}const RO=new RegExp("{{\\s*(.+?)\\s*}}","g");function LG(i){let t=[];if("string"==typeof i){let e;for(;e=RO.exec(i);)t.push(e[1]);RO.lastIndex=0}return t}function r0(i,t,e){const n=i.toString(),r=n.replace(RO,(s,o)=>{let a=t[o];return null==a&&(e.push(function hge(i){return new pe(3003,!1)}()),a=""),a.toString()});return r==n?i:r}function oE(i){const t=[];let e=i.next();for(;!e.done;)t.push(e.value),e=i.next();return t}const Qge=/-+([a-z0-9])/g;function kO(i){return i.replace(Qge,(...t)=>t[1].toUpperCase())}function Jge(i){return i.replace(/([a-z])([A-Z])/g,"$1-$2").toLowerCase()}function sa(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 fge(i){return new pe(3004,!1)}()}}function NG(i,t){return window.getComputedStyle(i)[t]}const cE="*";function s_e(i,t){const e=[];return"string"==typeof i?i.split(/\s*,\s*/).forEach(n=>function o_e(i,t,e){if(":"==i[0]){const l=function a_e(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 Ege(i){return new pe(3015,!1)}()),t;const r=n[1],s=n[2],o=n[3];t.push(BG(r,o));"<"==s[0]&&!(r==cE&&o==cE)&&t.push(BG(o,r))}(n,e,t)):e.push(i),e}const dE=new Set(["true","1"]),uE=new Set(["false","0"]);function BG(i,t){const e=dE.has(i)||uE.has(i),n=dE.has(t)||uE.has(t);return(r,s)=>{let o=i==cE||i==r,a=t==cE||t==s;return!o&&e&&"boolean"==typeof r&&(o=r?dE.has(i):uE.has(i)),!a&&n&&"boolean"==typeof s&&(a=s?dE.has(t):uE.has(t)),o&&a}}const l_e=new RegExp("s*:selfs*,?","g");function PO(i,t,e,n){return new c_e(i).build(t,e,n)}class c_e{constructor(t){this._driver=t}build(t,e,n){const r=new h_e(e);return this._resetContextStyleTimingState(r),sa(this,n0(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 mge(){return new pe(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(d=>{l.name=d,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 gge(){return new pe(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=>{LG(l).forEach(c=>{o.hasOwnProperty(c)||s.add(c)})})}),s.size&&(oE(s.values()),e.errors.push(function _ge(i,t){return new pe(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=sa(this,n0(t.animation),e);return{type:1,matchers:s_e(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=>sa(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=sa(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 p_e(i,t){if(i.hasOwnProperty("duration"))return i;if("number"==typeof i)return OO(sE(i,t).duration,0,"");const e=i;if(e.split(/\s+/).some(s=>"{"==s.charAt(0)&&"{"==s.charAt(1))){const s=OO(0,0,"");return s.dynamic=!0,s.strValue=e,s}const r=sE(e,t);return OO(r.duration,r.delay,r.easing)}(t.timings,e.errors);e.currentAnimateTimings=n;let r,s=t.styles?t.styles:oi({});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=oi(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===Kc?n.push(a):e.errors.push(new pe(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),d=c.get(l);let h=!0;d&&(s!=r&&s>=d.startTime&&r<=d.endTime&&(e.errors.push(function yge(i,t,e,n,r){return new pe(3010,!1)}()),h=!1),s=d.startTime),h&&c.set(l,{startTime:s,endTime:r}),e.options&&function Zge(i,t,e){const n=t.params||{},r=LG(i);r.length&&r.forEach(s=>{n.hasOwnProperty(s)||e.push(function uge(i){return new pe(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 bge(){return new pe(3011,!1)}()),n;let s=0;const o=[];let a=!1,l=!1,c=0;const d=t.steps.map(y=>{const M=this._makeStyleAst(y,e);let x=null!=M.offset?M.offset:function f_e(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:sa(this,n0(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 d_e(i){const t=!!i.split(/\s*,\s*/).find(e=>":self"==e);return t&&(i=i.replace(l_e,"")),i=i.replace(/@\*/g,rE).replace(/@\w+/g,e=>rE+"-"+e.slice(1)).replace(/:animating/g,TO),[i,t]}(t.selector);e.currentQuerySelector=n.length?n+" "+s:s,ra(e.collectedStyles,e.currentQuerySelector,new Map);const a=sa(this,n0(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 Cge(){return new pe(3013,!1)}());const n="full"===t.timings?{duration:0,delay:0,easing:"full"}:sE(t.timings,e.errors,!0);return{type:12,animation:sa(this,n0(t.animation),e),timings:n,options:null}}}class h_e{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=t0(i)).params&&(i.params=function u_e(i){return i?t0(i):null}(i.params)):i={},i}function OO(i,t,e){return{duration:i,delay:t,easing:e}}function FO(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 hE{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 __e=new RegExp(":enter","g"),y_e=new RegExp(":leave","g");function LO(i,t,e,n,r,s=new Map,o=new Map,a,l,c=[]){return(new b_e).buildKeyframes(i,t,e,n,r,s,o,a,l,c)}class b_e{buildKeyframes(t,e,n,r,s,o,a,l,c,d=[]){c=c||new hE;const h=new NO(t,e,c,r,s,d,[]);h.options=l;const p=l.delay?fd(l.delay):0;h.currentTimeline.delayNextStep(p),h.currentTimeline.setStyles([o],null,h.errors,l),sa(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()):[FO(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:fd(r0(s,r?.params??{},e.errors));n.delayNextStep(o)}}}_visitSubInstructions(t,e,n){let s=e.currentTimeline.currentTime;const o=null!=n.duration?fd(n.duration):null,a=null!=n.delay?fd(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),sa(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=fE);const o=fd(s.delay);r.delayNextStep(o)}t.steps.length&&(t.steps.forEach(o=>sa(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?fd(t.options.delay):0;t.steps.forEach(o=>{const a=e.createSubContext(t.options);s&&a.delayNextStep(s),sa(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 sE(e.params?r0(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?fd(r.delay):0;s&&(6===e.previousNode.type||0==n&&e.currentTimeline.hasCurrentStyleProperties())&&(e.currentTimeline.snapshotCurrentStyles(),e.previousNode=fE);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,d)=>{e.currentQueryIndex=d;const h=e.createSubContext(t.options,c);s&&h.delayNextStep(s),c===e.element&&(l=h.currentTimeline),sa(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 d=e.currentTimeline;l&&d.delayNextStep(l);const h=d.currentTime;sa(this,t.animation,e),e.previousNode=t,n.currentStaggerTime=r.currentTime-h+(r.startTime-n.currentTimeline.startTime)}}const fE={};class NO{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=fE,this.subContextCount=0,this.options={},this.currentQueryIndex=0,this.currentQueryTotal=0,this.currentStaggerTime=0,this.currentTimeline=l||new pE(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=fd(n.duration)),null!=n.delay&&(r.delay=fd(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]=r0(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 NO(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=fE,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 x_e(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(__e,"."+this._enterClassName)).replace(y_e,"."+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 Sge(i){return new pe(3014,!1)}()),a}}class pE{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 pE(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||Kc),this._currentKeyframe.set(e,Kc);this._currentEmptyStepKeyframe=this._currentKeyframe}setStyles(t,e,n,r){e&&this._previousKeyframe.set("easing",e);const s=r&&r.params||{},o=function w_e(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,Kc)}else Nu(r,e)}),e}(t,this._globalTimelineStyles);for(let[a,l]of o){const c=r0(l,s,n);this._pendingStyles.set(a,c),this._localTimelineStyles.has(a)||this._backFill.set(a,this._globalTimelineStyles.get(a)??Kc),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=Nu(a,new Map,this._backFill);c.forEach((d,h)=>{d===iR?t.add(h):d===Kc&&e.add(h)}),n||c.set("offset",l/this.duration),r.push(c)});const s=t.size?oE(t.values()):[],o=e.size?oE(e.values()):[];if(n){const a=r[0],l=new Map(a);a.set("offset",0),l.set("offset",1),r=[a,l]}return FO(this.element,r,s,o,this.duration,this.startTime,this.easing,!1)}}class x_e extends pE{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=Nu(t[0]);l.set("offset",0),s.push(l);const c=Nu(t[0]);c.set("offset",zG(a)),s.push(c);const d=t.length-1;for(let h=1;h<=d;h++){let p=Nu(t[h]);const m=p.get("offset");p.set("offset",zG((e+m*n)/o)),s.push(p)}n=o,e=0,r="",t=s}return FO(this.element,t,this.preStyleProps,this.postStyleProps,n,e,r,!0)}}function zG(i,t=3){const e=Math.pow(10,t-1);return Math.round(i*e)/e}class BO{}const M_e=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 C_e extends BO{normalizePropertyName(t,e){return kO(t)}normalizeStyleValue(t,e,n,r){let s="";const o=n.toString().trim();if(M_e.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 pge(i,t){return new pe(3005,!1)}())}return o+s}}function HG(i,t,e,n,r,s,o,a,l,c,d,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:d,totalTime:h,errors:p}}const UO={};class $G{constructor(t,e,n){this._triggerName=t,this.ast=e,this._stateStyles=n}match(t,e,n,r){return function S_e(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,d){const h=[],p=this.ast.options&&this.ast.options.params||UO,g=this.buildStyles(n,a&&a.params||UO,h),b=l&&l.params||UO,v=this.buildStyles(r,b,h),y=new Set,M=new Map,x=new Map,C="void"===r,F={params:E_e(b,p),delay:this.ast.options?.delay},D=d?[]:LO(t,e,this.ast.animation,s,o,g,v,F,c,h);let k=0;if(D.forEach(T=>{k=Math.max(T.duration+T.delay,k)}),h.length)return HG(e,this._triggerName,n,r,C,g,v,[],[],M,x,k,h);D.forEach(T=>{const A=T.element,W=ra(M,A,new Set);T.preStyleProps.forEach(ne=>W.add(ne));const ie=ra(x,A,new Set);T.postStyleProps.forEach(ne=>ie.add(ne)),A!==e&&y.add(A)});const B=oE(y.values());return HG(e,this._triggerName,n,r,C,g,v,D,B,M,x,k)}}function E_e(i,t){const e=t0(t);for(const n in i)i.hasOwnProperty(n)&&null!=i[n]&&(e[n]=i[n]);return e}class A_e{constructor(t,e,n){this.styles=t,this.defaultParams=e,this.normalizer=n}buildStyles(t,e){const n=new Map,r=t0(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=r0(o,r,e));const l=this.normalizer.normalizePropertyName(a,e);o=this.normalizer.normalizeStyleValue(a,l,o,e),n.set(a,o)})}),n}}class T_e{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 A_e(r.style,r.options&&r.options.params||{},n))}),GG(this.states,"true","1"),GG(this.states,"false","0"),e.transitions.forEach(r=>{this.transitionFactories.push(new $G(t,r,this.states))}),this.fallbackTransition=function I_e(i,t,e){return new $G(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 GG(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 R_e=new hE;class k_e{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=PO(this._driver,e,n,r);if(n.length)throw function kge(i){return new pe(3503,!1)}();this._animations.set(t,s)}_buildPlayer(t,e,n){const r=t.element,s=wG(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=LO(this._driver,e,s,DO,nE,new Map,new Map,n,R_e,r),o.forEach(d=>{const h=ra(a,d.element,new Map);d.postStyleProps.forEach(p=>h.set(p,null))})):(r.push(function Pge(){return new pe(3300,!1)}()),o=[]),r.length)throw function Oge(i){return new pe(3504,!1)}();a.forEach((d,h)=>{d.forEach((p,m)=>{d.set(m,this._driver.computeStyle(h,m,Kc))})});const c=Lu(o.map(d=>{const h=a.get(d.element);return this._buildPlayer(d,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 Fge(i){return new pe(3301,!1)}();return e}listen(t,e,n,r){const s=CO(e,"","","");return wO(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 WG="ng-animate-queued",VO="ng-animate-disabled",N_e=[],jG={namespaceId:"",setForRemoval:!1,setForMove:!1,hasAnimation:!1,removedBeforeQueried:!1},B_e={namespaceId:"",setForMove:!1,setForRemoval:!1,hasAnimation:!1,removedBeforeQueried:!0},Ba="__ng_removed";class zO{get params(){return this.options.params}constructor(t,e=""){this.namespaceId=e;const n=t&&t.hasOwnProperty("value");if(this.value=function H_e(i){return i??null}(n?t.value:t),n){const s=t0(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 s0="void",HO=new zO(s0);class U_e{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,Ua(e,this._hostClassName)}listen(t,e,n,r){if(!this._triggers.has(e))throw function Lge(i,t){return new pe(3302,!1)}();if(null==n||0==n.length)throw function Nge(i){return new pe(3303,!1)}();if(!function $_e(i){return"start"==i||"done"==i}(n))throw function Bge(i,t){return new pe(3400,!1)}();const s=ra(this._elementListeners,t,[]),o={name:e,phase:n,callback:r};s.push(o);const a=ra(this._engine.statesByElement,t,new Map);return a.has(e)||(Ua(t,iE),Ua(t,iE+"-"+e),a.set(e,HO)),()=>{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 Uge(i){return new pe(3401,!1)}();return e}trigger(t,e,n,r=!0){const s=this._getTrigger(e),o=new $O(this.id,e,t);let a=this._engine.statesByElement.get(t);a||(Ua(t,iE),Ua(t,iE+"-"+e),this._engine.statesByElement.set(t,a=new Map));let l=a.get(e);const c=new zO(n,this.id);if(!(n&&n.hasOwnProperty("value"))&&l&&c.absorbOptions(l.options),a.set(e,c),l||(l=HO),c.value!==s0&&l.value===c.value){if(!function j_e(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),fc(t,y)})}return}const p=ra(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||(Ua(t,WG),o.onStart(()=>{Wg(t,WG)})),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,rE,!0);n.forEach(r=>{if(r[Ba])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 d=this.trigger(t,c,s0,r);d&&a.push(d)}}),a.length)return this._engine.markElementAsRemoved(this.id,t,!0,e,o),n&&Lu(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)||HO,d=new zO(s0),h=new $O(this.id,o,t);this._engine.totalQueuedPlayers++,this._queue.push({element:t,triggerName:o,transition:l,fromState:c,toState:d,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[Ba];(!s||s===jG)&&(n.afterFlush(()=>this.clearElementCache(t)),n.destroyInnerAnimations(t),n._onRemovalComplete(t,e))}}insertNode(t,e){Ua(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=CO(s,n.triggerName,n.fromState.value,n.toState.value);l._data=t,wO(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 V_e{_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 U_e(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(mE(e)){const s=this._fetchNamespace(t);if(s)return s.trigger(e,n,r),!0}return!1}insertNode(t,e,n,r){if(!mE(e))return;const s=e[Ba];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),Ua(t,VO)):this.disabledNodes.has(t)&&(this.disabledNodes.delete(t),Wg(t,VO))}removeNode(t,e,n,r){if(mE(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[Ba]={namespaceId:t,setForRemoval:r,hasAnimation:n,removedBeforeQueried:!1,previousTriggersValues:s}}listen(t,e,n,r,s){return mE(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,rE,!0);e.forEach(n=>this.destroyActiveAnimationsForElement(n)),0!=this.playersByQueriedElement.size&&(e=this.driver.query(t,TO,!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 Lu(this.players).onDone(()=>t());t()})}processLeaveNode(t){const e=t[Ba];if(e&&e.setForRemoval){if(t[Ba]=jG,e.namespaceId){this.destroyInnerAnimations(t);const n=this._fetchNamespace(e.namespaceId);n&&n.clearElementCache(t)}this._onRemovalComplete(t,e.setForRemoval)}t.classList?.contains(VO)&&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?Lu(e).onDone(()=>{n.forEach(r=>r())}):n.forEach(r=>r())}}reportError(t){throw function Vge(i){return new pe(3402,!1)}()}_flushAnimations(t,e){const n=new hE,r=[],s=new Map,o=[],a=new Map,l=new Map,c=new Map,d=new Set;this.disabledNodes.forEach(q=>{d.add(q);const se=this.driver.query(q,".ng-animate-queued",!0);for(let J=0;J{const J=DO+b++;g.set(se,J),q.forEach(we=>Ua(we,J))});const v=[],y=new Set,M=new Set;for(let q=0;qy.add(we)):M.add(se))}const x=new Map,C=XG(p,Array.from(y));C.forEach((q,se)=>{const J=nE+b++;x.set(se,J),q.forEach(we=>Ua(we,J))}),t.push(()=>{m.forEach((q,se)=>{const J=g.get(se);q.forEach(we=>Wg(we,J))}),C.forEach((q,se)=>{const J=x.get(se);q.forEach(we=>Wg(we,J))}),v.forEach(q=>{this.processLeaveNode(q)})});const F=[],D=[];for(let q=this._namespaceList.length-1;q>=0;q--)this._namespaceList[q].drainQueuedTransitions(e).forEach(J=>{const we=J.player,Ve=J.element;if(F.push(we),this.collectedEnterElements.length){const Le=Ve[Ba];if(Le&&Le.setForMove){if(Le.previousTriggersValues&&Le.previousTriggersValues.has(J.triggerName)){const wt=Le.previousTriggersValues.get(J.triggerName),Tt=this.statesByElement.get(J.element);if(Tt&&Tt.has(J.triggerName)){const St=Tt.get(J.triggerName);St.value=wt,Tt.set(J.triggerName,St)}}return void we.destroy()}}const Ye=!h||!this.driver.containsElement(h,Ve),Rt=x.get(Ve),nn=g.get(Ve),le=this._buildInstruction(J,n,nn,Rt,Ye);if(le.errors&&le.errors.length)return void D.push(le);if(Ye)return we.onStart(()=>If(Ve,le.fromStyles)),we.onDestroy(()=>fc(Ve,le.toStyles)),void r.push(we);if(J.isFallbackTransition)return we.onStart(()=>If(Ve,le.fromStyles)),we.onDestroy(()=>fc(Ve,le.toStyles)),void r.push(we);const Fe=[];le.timelines.forEach(Le=>{Le.stretchStartingKeyframe=!0,this.disabledNodes.has(Le.element)||Fe.push(Le)}),le.timelines=Fe,n.append(Ve,le.timelines),o.push({instruction:le,player:we,element:Ve}),le.queriedElements.forEach(Le=>ra(a,Le,[]).push(we)),le.preStyleProps.forEach((Le,wt)=>{if(Le.size){let Tt=l.get(wt);Tt||l.set(wt,Tt=new Set),Le.forEach((St,Cn)=>Tt.add(Cn))}}),le.postStyleProps.forEach((Le,wt)=>{let Tt=c.get(wt);Tt||c.set(wt,Tt=new Set),Le.forEach((St,Cn)=>Tt.add(Cn))})});if(D.length){const q=[];D.forEach(se=>{q.push(function zge(i,t){return new pe(3505,!1)}())}),F.forEach(se=>se.destroy()),this.reportError(q)}const k=new Map,B=new Map;o.forEach(q=>{const se=q.element;n.has(se)&&(B.set(se,se),this._beforeAnimationBuild(q.player.namespaceId,q.instruction,k))}),r.forEach(q=>{const se=q.element;this._getPreviousPlayers(se,!1,q.namespaceId,q.triggerName,null).forEach(we=>{ra(k,se,[]).push(we),we.destroy()})});const T=v.filter(q=>ZG(q,l,c)),A=new Map;qG(A,this.driver,M,c,Kc).forEach(q=>{ZG(q,l,c)&&T.push(q)});const ie=new Map;m.forEach((q,se)=>{qG(ie,this.driver,new Set(q),l,iR)}),T.forEach(q=>{const se=A.get(q),J=ie.get(q);A.set(q,new Map([...Array.from(se?.entries()??[]),...Array.from(J?.entries()??[])]))});const ne=[],oe=[],ge={};o.forEach(q=>{const{element:se,player:J,instruction:we}=q;if(n.has(se)){if(d.has(se))return J.onDestroy(()=>fc(se,we.toStyles)),J.disabled=!0,J.overrideTotalTime(we.totalTime),void r.push(J);let Ve=ge;if(B.size>1){let Rt=se;const nn=[];for(;Rt=Rt.parentNode;){const le=B.get(Rt);if(le){Ve=le;break}nn.push(Rt)}nn.forEach(le=>B.set(le,Ve))}const Ye=this._buildAnimation(J.namespaceId,we,k,s,ie,A);if(J.setRealPlayer(Ye),Ve===ge)ne.push(J);else{const Rt=this.playersByElement.get(Ve);Rt&&Rt.length&&(J.parentPlayer=Lu(Rt)),r.push(J)}}else If(se,we.fromStyles),J.onDestroy(()=>fc(se,we.toStyles)),oe.push(J),d.has(se)&&r.push(J)}),oe.forEach(q=>{const se=s.get(q.element);if(se&&se.length){const J=Lu(se);q.setRealPlayer(J)}}),r.forEach(q=>{q.parentPlayer?q.syncPlayerEvents(q.parentPlayer):q.destroy()});for(let q=0;q!Ye.destroyed);Ve.length?G_e(this,se,Ve):this.processLeaveNode(se)}return v.length=0,ne.forEach(q=>{this.players.push(q),q.onDone(()=>{q.destroy();const se=this.players.indexOf(q);this.players.splice(se,1)}),q.play()}),ne}elementContainsData(t,e){let n=!1;const r=e[Ba];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==s0;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,d=c!==s,h=ra(n,c,[]);this._getPreviousPlayers(c,d,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=[],d=new Set,h=new Set,p=e.timelines.map(g=>{const b=g.element;d.add(b);const v=b[Ba];if(v&&v.removedBeforeQueried)return new eb(g.duration,g.delay);const y=b!==l,M=function W_e(i){const t=[];return KG(i,t),t}((n.get(b)||N_e).map(k=>k.getRealPlayer())).filter(k=>!!k.element&&k.element===b),x=s.get(b),C=o.get(b),F=wG(0,this._normalizer,0,g.keyframes,x,C),D=this._buildPlayer(g,F,M);if(g.subTimeline&&r&&h.add(b),y){const k=new $O(t,a,b);k.setRealPlayer(D),c.push(k)}return D});c.forEach(g=>{ra(this.playersByQueriedElement,g.element,[]).push(g),g.onDone(()=>function z_e(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))}),d.forEach(g=>Ua(g,RG));const m=Lu(p);return m.onDestroy(()=>{d.forEach(g=>Wg(g,RG)),fc(l,e.toStyles)}),h.forEach(g=>{ra(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 eb(t.duration,t.delay)}}class $O{constructor(t,e,n){this.namespaceId=t,this.triggerName=e,this.element=n,this._player=new eb,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=>wO(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){ra(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 mE(i){return i&&1===i.nodeType}function YG(i,t){const e=i.style.display;return i.style.display=t??"none",e}function qG(i,t,e,n,r){const s=[];e.forEach(l=>s.push(YG(l)));const o=[];n.forEach((l,c)=>{const d=new Map;l.forEach(h=>{const p=t.computeStyle(c,h,r);d.set(h,p),(!p||0==p.length)&&(c[Ba]=B_e,o.push(c))}),i.set(c,d)});let a=0;return e.forEach(l=>YG(l,s[a++])),o}function XG(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 Ua(i,t){i.classList?.add(t)}function Wg(i,t){i.classList?.remove(t)}function G_e(i,t,e){Lu(e).onDone(()=>i.processLeaveNode(t))}function KG(i,t){for(let e=0;er.add(s)):t.set(i,n),e.delete(i),!0}class gE{constructor(t,e,n){this.bodyNode=t,this._driver=e,this._normalizer=n,this._triggerCache={},this.onRemovalComplete=(r,s)=>{},this._transitionEngine=new V_e(t,e,n),this._timelineEngine=new k_e(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=[],d=PO(this._driver,s,l,c);if(l.length)throw function Ige(i,t){return new pe(3404,!1)}();a=function D_e(i,t,e){return new T_e(i,t,e)}(r,d,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]=MG(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]=MG(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 q_e=(()=>{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&&fc(this._element,this._startStyles,this._initialStyles),this._state=1)}finish(){this.start(),this._state<2&&(fc(this._element,this._initialStyles),this._endStyles&&(fc(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),fc(this._element,this._initialStyles),this._state=3)}}return i.initialStylesByElement=new WeakMap,i})();function GO(i){let t=null;return i.forEach((e,n)=>{(function X_e(i){return"display"===i||"position"===i})(n)&&(t=t||new Map,t.set(n,e))}),t}class QG{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:NG(this.element,r))}),this.currentSnapshot=t}triggerCallback(t){const e="start"===t?this._onStartFns:this._onDoneFns;e.forEach(n=>n()),e.length=0}}class K_e{validateStyleProperty(t){return!0}validateAnimatableStyleProperty(t){return!0}matchesElement(t,e){return!1}containsElement(t,e){return AG(t,e)}getParentElement(t){return EO(t)}query(t,e,n){return DG(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,d=o.filter(m=>m instanceof QG);(function e_e(i,t){return 0===i||0===t})(n,r)&&d.forEach(m=>{m.currentSnapshot.forEach((g,b)=>c.set(b,g))});let h=function Kge(i){return i.length?i[0]instanceof Map?i:i.map(t=>kG(t)):[]}(e).map(m=>Nu(m));h=function t_e(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,NG(i,a)))}}return t}(t,h,c);const p=function Y_e(i,t){let e=null,n=null;return Array.isArray(t)&&t.length?(e=GO(t[0]),t.length>1&&(n=GO(t[t.length-1]))):t instanceof Map&&(e=GO(t)),e||n?new q_e(i,e,n):null}(t,h);return new QG(t,h,l,p)}}let Z_e=(()=>{class i extends eV{constructor(e,n){super(),this._nextAnimationId=0,this._renderer=e.createRenderer(n.body,{id:"0",encapsulation:qs.None,styles:[],data:{animation:[]}})}build(e){const n=this._nextAnimationId.toString();this._nextAnimationId++;const r=Array.isArray(e)?nV(e):e;return JG(this._renderer,null,n,"register",[r]),new Q_e(n,this._renderer)}}return i.\u0275fac=function(e){return new(e||i)(ee(Gl),ee(qt))},i.\u0275prov=ke({token:i,factory:i.\u0275fac}),i})();class Q_e extends OQ{constructor(t,e){super(),this._id=t,this._renderer=e}create(t,e){return new J_e(this._id,t,e||{},this._renderer)}}class J_e{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 JG(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 JG(i,t,e,n,r){return i.setProperty(t,`@@${e}:${n}`,r)}const e8="@.disabled";let eve=(()=>{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 d=this._rendererCache.get(s);return d||(d=new t8("",s,this.engine,()=>this._rendererCache.delete(s)),this._rendererCache.set(s,d)),d}const o=n.id,a=n.id+"-"+this._currentId;this._currentId++,this.engine.register(a,e);const l=d=>{Array.isArray(d)?d.forEach(l):this.engine.registerTrigger(o,a,e,d.name,d)};return n.data.animation.forEach(l),new tve(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)(ee(Gl),ee(gE),ee(gt))},i.\u0275prov=ke({token:i,factory:i.\u0275fac}),i})();class t8{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==e8?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 tve extends t8{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==e8?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 nve(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 ive(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 n8=[{provide:eV,useClass:Z_e},{provide:BO,useFactory:function sve(){return new C_e}},{provide:gE,useClass:(()=>{class i extends gE{constructor(e,n,r,s){super(e.body,n,r)}ngOnDestroy(){this.flush()}}return i.\u0275fac=function(e){return new(e||i)(ee(qt),ee(AO),ee(BO),ee(cm))},i.\u0275prov=ke({token:i,factory:i.\u0275fac}),i})()},{provide:Gl,useFactory:function ove(i,t,e){return new eve(i,t,e)},deps:[oM,gE,gt]}],WO=[{provide:AO,useFactory:()=>new K_e},{provide:kr,useValue:"BrowserAnimations"},...n8],i8=[{provide:AO,useClass:TG},{provide:kr,useValue:"NoopAnimations"},...n8];let ave=(()=>{class i{static withConfig(e){return{ngModule:i,providers:e.disableAnimations?i8:WO}}}return i.\u0275fac=function(e){return new(e||i)},i.\u0275mod=en({type:i}),i.\u0275inj=Wt({providers:WO,imports:[OB]}),i})();const r8=new me("CdkAccordion");let lve=0,cve=(()=>{class i{get expanded(){return this._expanded}set expanded(e){e=tn(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=tn(e)}constructor(e,n,r){this.accordion=e,this._changeDetectorRef=n,this._expansionDispatcher=r,this._openCloseAllSubscription=Qt.EMPTY,this.closed=new $e,this.opened=new $e,this.destroyed=new $e,this.expandedChange=new $e,this.id="cdk-accordion-child-"+lve++,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)(E(r8,12),E(Qn),E(HR))},i.\u0275dir=ve({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:r8,useValue:void 0}])]}),i})(),dve=(()=>{class i{}return i.\u0275fac=function(e){return new(e||i)},i.\u0275mod=en({type:i}),i.\u0275inj=Wt({}),i})();const uve=["body"];function hve(i,t){}const fve=[[["mat-expansion-panel-header"]],"*",[["mat-action-row"]]],pve=["mat-expansion-panel-header","*","mat-action-row"];function mve(i,t){1&i&&Ie(0,"span",2),2&i&&U("@indicatorRotate",re()._getExpandedState())}const gve=[[["mat-panel-title"]],[["mat-panel-description"]],"*"],_ve=["mat-panel-title","mat-panel-description","*"],s8=new me("MAT_ACCORDION"),o8="225ms cubic-bezier(0.4,0.0,0.2,1)",a8={indicatorRotate:Ra("indicatorRotate",[Os("collapsed, void",oi({transform:"rotate(0deg)"})),Os("expanded",oi({transform:"rotate(180deg)"})),Or("expanded <=> collapsed, void => collapsed",Yr(o8))]),bodyExpansion:Ra("bodyExpansion",[Os("collapsed, void",oi({height:"0px",visibility:"hidden"})),Os("expanded",oi({height:"*",visibility:"visible"})),Or("expanded <=> collapsed, void => collapsed",Yr(o8))])},l8=new me("MAT_EXPANSION_PANEL");let vve=(()=>{class i{constructor(e,n){this._template=e,this._expansionPanel=n}}return i.\u0275fac=function(e){return new(e||i)(E(So),E(l8,8))},i.\u0275dir=ve({type:i,selectors:[["ng-template","matExpansionPanelContent",""]]}),i})(),yve=0;const c8=new me("MAT_EXPANSION_PANEL_DEFAULT_OPTIONS");let d8=(()=>{class i extends cve{get hideToggle(){return this._hideToggle||this.accordion&&this.accordion.hideToggle}set hideToggle(e){this._hideToggle=tn(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 $e,this.afterCollapse=new $e,this._inputChanges=new Te,this._headerId="mat-expansion-panel-header-"+yve++,this._bodyAnimationDone=new Te,this.accordion=e,this._document=o,this._bodyAnimationDone.pipe(Ql((c,d)=>c.fromState===d.fromState&&c.toState===d.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(Ao(null),gn(()=>this.expanded&&!this._portal),Oi(1)).subscribe(()=>{this._portal=new Sm(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)(E(s8,12),E(Qn),E(HR),E(jr),E(qt),E(kr,8),E(c8,8))},i.\u0275cmp=ot({type:i,selectors:[["mat-expansion-panel"]],contentQueries:function(e,n,r){if(1&e&&Wi(r,vve,5),2&e){let s;At(s=Dt())&&(n._lazyContent=s.first)}},viewQuery:function(e,n){if(1&e&&$n(uve,5),2&e){let r;At(r=Dt())&&(n._body=r.first)}},hostAttrs:[1,"mat-expansion-panel"],hostVars:6,hostBindings:function(e,n){2&e&&ln("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:s8,useValue:void 0},{provide:l8,useExisting:i}]),dt,xi],ngContentSelectors:pve,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&&(sr(fve),Yt(0),G(1,"div",0,1),Pe("@bodyExpansion.done",function(s){return n._bodyAnimationDone.next(s)}),G(3,"div",2),Yt(4,1),fe(5,hve,0,0,"ng-template",3),j(),Yt(6,2),j()),2&e&&(V(1),U("@bodyExpansion",n._getExpandedState())("id",n.id),It("aria-labelledby",n._headerId),V(4),U("cdkPortalOutlet",n._portal))},dependencies:[Em],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:[a8.bodyExpansion]},changeDetection:0}),i})();class bve{}const xve=QI(bve);let wve=(()=>{class i extends xve{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=Qt.EMPTY;const c=e.accordion?e.accordion._stateChanges.pipe(gn(d=>!(!d.hideToggle&&!d.togglePosition))):go;this.tabIndex=parseInt(l||"")||0,this._parentChangeSubscription=Cr(e.opened,e.closed,c,e._inputChanges.pipe(gn(d=>!!(d.hideToggle||d.disabled||d.togglePosition)))).subscribe(()=>this._changeDetectorRef.markForCheck()),e.closed.pipe(gn(()=>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:Zo(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)(E(d8,1),E(vt),E(Xc),E(Qn),E(c8,8),E(kr,8),ya("tabindex"))},i.\u0275cmp=ot({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&&Pe("click",function(){return n._toggle()})("keydown",function(s){return n._keydown(s)}),2&e&&(It("id",n.panel._headerId)("tabindex",n.tabIndex)("aria-controls",n._getPanelId())("aria-expanded",n._isExpanded())("aria-disabled",n.panel.disabled),Yo("height",n._getHeaderHeight()),ln("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:[dt],ngContentSelectors:_ve,decls:5,vars:3,consts:[[1,"mat-content"],["class","mat-expansion-indicator",4,"ngIf"],[1,"mat-expansion-indicator"]],template:function(e,n){1&e&&(sr(gve),G(0,"span",0),Yt(1),Yt(2,1),Yt(3,2),j(),fe(4,mve,1,1,"span",1)),2&e&&(ln("mat-content-hide-toggle",!n._showToggle()),V(4),U("ngIf",n._showToggle()))},dependencies:[_i],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:[a8.indicatorRotate]},changeDetection:0}),i})(),Mve=(()=>{class i{}return i.\u0275fac=function(e){return new(e||i)},i.\u0275dir=ve({type:i,selectors:[["mat-panel-description"]],hostAttrs:[1,"mat-expansion-panel-header-description"]}),i})(),Cve=(()=>{class i{}return i.\u0275fac=function(e){return new(e||i)},i.\u0275dir=ve({type:i,selectors:[["mat-panel-title"]],hostAttrs:[1,"mat-expansion-panel-header-title"]}),i})(),Sve=(()=>{class i{}return i.\u0275fac=function(e){return new(e||i)},i.\u0275mod=en({type:i}),i.\u0275inj=Wt({imports:[ao,Jn,dve,Nh]}),i})();function Eve(i,t){if(1&i&&(G(0,"mat-option",19),Be(1),j()),2&i){const e=t.$implicit;U("value",e),V(1),Ki(" ",e," ")}}function Ave(i,t){if(1&i){const e=jn();G(0,"mat-form-field",16)(1,"mat-select",17),Pe("selectionChange",function(r){return Vt(e),Et(re(2)._changePageSize(r.value))}),fe(2,Eve,2,2,"mat-option",18),j()()}if(2&i){const e=re(2);U("appearance",e._formFieldAppearance)("color",e.color),V(1),U("value",e.pageSize)("disabled",e.disabled)("aria-labelledby",e._pageSizeLabelId)("panelClass",e.selectConfig.panelClass||"")("disableOptionCentering",e.selectConfig.disableOptionCentering),V(1),U("ngForOf",e._displayedPageSizeOptions)}}function Dve(i,t){if(1&i&&(G(0,"div",20),Be(1),j()),2&i){const e=re(2);V(1),ui(e.pageSize)}}function Tve(i,t){if(1&i&&(G(0,"div",12)(1,"div",13),Be(2),j(),fe(3,Ave,3,8,"mat-form-field",14),fe(4,Dve,2,1,"div",15),j()),2&i){const e=re();V(1),ND("id",e._pageSizeLabelId),V(1),Ki(" ",e._intl.itemsPerPageLabel," "),V(1),U("ngIf",e._displayedPageSizeOptions.length>1),V(1),U("ngIf",e._displayedPageSizeOptions.length<=1)}}function Ive(i,t){if(1&i){const e=jn();G(0,"button",21),Pe("click",function(){return Vt(e),Et(re().firstPage())}),ki(),G(1,"svg",7),Ie(2,"path",22),j()()}if(2&i){const e=re();U("matTooltip",e._intl.firstPageLabel)("matTooltipDisabled",e._previousButtonsDisabled())("matTooltipPosition","above")("disabled",e._previousButtonsDisabled()),It("aria-label",e._intl.firstPageLabel)}}function Rve(i,t){if(1&i){const e=jn();ki(),ga(),G(0,"button",23),Pe("click",function(){return Vt(e),Et(re().lastPage())}),ki(),G(1,"svg",7),Ie(2,"path",24),j()()}if(2&i){const e=re();U("matTooltip",e._intl.lastPageLabel)("matTooltipDisabled",e._nextButtonsDisabled())("matTooltipPosition","above")("disabled",e._nextButtonsDisabled()),It("aria-label",e._intl.lastPageLabel)}}let vE=(()=>{class i{constructor(){this.changes=new Te,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=ke({token:i,factory:i.\u0275fac,providedIn:"root"}),i})();const Pve={provide:vE,deps:[[new Ss,new xa,vE]],useFactory:function kve(i){return i||new vE}},Fve=new me("MAT_PAGINATOR_DEFAULT_OPTIONS"),Lve=GM(wQ(class{}));let Nve=(()=>{class i extends Lve{get pageIndex(){return this._pageIndex}set pageIndex(e){this._pageIndex=Math.max(Ps(e),0),this._changeDetectorRef.markForCheck()}get length(){return this._length}set length(e){this._length=Ps(e),this._changeDetectorRef.markForCheck()}get pageSize(){return this._pageSize}set pageSize(e){this._pageSize=Math.max(Ps(e),0),this._updateDisplayedPageSizeOptions()}get pageSizeOptions(){return this._pageSizeOptions}set pageSizeOptions(e){this._pageSizeOptions=(e||[]).map(n=>Ps(n)),this._updateDisplayedPageSizeOptions()}get hidePageSize(){return this._hidePageSize}set hidePageSize(e){this._hidePageSize=tn(e)}get showFirstLastButtons(){return this._showFirstLastButtons}set showFirstLastButtons(e){this._showFirstLastButtons=tn(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 $e,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){Mo()},i.\u0275dir=ve({type:i,inputs:{color:"color",pageIndex:"pageIndex",length:"length",pageSize:"pageSize",pageSizeOptions:"pageSizeOptions",hidePageSize:"hidePageSize",showFirstLastButtons:"showFirstLastButtons",selectConfig:"selectConfig"},outputs:{page:"page"},features:[dt]}),i})(),Bve=0,Uve=(()=>{class i extends Nve{constructor(e,n,r){super(e,n,r),this._pageSizeLabelId="mat-paginator-page-size-label-"+Bve++,this._formFieldAppearance=r?.formFieldAppearance||"outline"}}return i.\u0275fac=function(e){return new(e||i)(E(vE),E(Qn),E(Fve,8))},i.\u0275cmp=ot({type:i,selectors:[["mat-paginator"]],hostAttrs:["role","group",1,"mat-mdc-paginator"],inputs:{disabled:"disabled"},exportAs:["matPaginator"],features:[dt],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&&(G(0,"div",0)(1,"div",1),fe(2,Tve,5,4,"div",2),G(3,"div",3)(4,"div",4),Be(5),j(),fe(6,Ive,3,5,"button",5),G(7,"button",6),Pe("click",function(){return n.previousPage()}),ki(),G(8,"svg",7),Ie(9,"path",8),j()(),ga(),G(10,"button",9),Pe("click",function(){return n.nextPage()}),ki(),G(11,"svg",7),Ie(12,"path",10),j()(),fe(13,Rve,3,5,"button",11),j()()()),2&e&&(V(2),U("ngIf",!n.hidePageSize),V(3),Ki(" ",n._intl.getRangeLabel(n.pageIndex,n.pageSize,n.length)," "),V(1),U("ngIf",n.showFirstLastButtons),V(1),U("matTooltip",n._intl.previousPageLabel)("matTooltipDisabled",n._previousButtonsDisabled())("matTooltipPosition","above")("disabled",n._previousButtonsDisabled()),It("aria-label",n._intl.previousPageLabel),V(3),U("matTooltip",n._intl.nextPageLabel)("matTooltipDisabled",n._nextButtonsDisabled())("matTooltipPosition","above")("disabled",n._nextButtonsDisabled()),It("aria-label",n._intl.nextPageLabel),V(3),U("ngIf",n.showFirstLastButtons))},dependencies:[oo,_i,YM,gl,hb,Lm,Fs],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})(),Vve=(()=>{class i{}return i.\u0275fac=function(e){return new(e||i)},i.\u0275mod=en({type:i}),i.\u0275inj=Wt({providers:[Pve],imports:[ao,qM,BH,OV]}),i})(),zve=(()=>{class i{}return i.\u0275fac=function(e){return new(e||i)},i.\u0275mod=en({type:i,bootstrap:[lge]}),i.\u0275inj=Wt({providers:[Jl,XR,{provide:kH,useValue:Bie}],imports:[OB,bK,ave,Jz,MJ,pC,fH,Sve,AV,IV,OV,qM,JV,Vve,fse,gH,BH,gV,Tpe,Ime,eH,eR,Wie,ore]}),i})();eh(ec,[oo,_i,Fs,e0,tE],[qo]),eh(VR,[um,oo,_i,yy,nc,Zc,gl,d8,wve,Cve,Mve,Fs,Uve,hb,Lm,e0],[]),eh(yC,[oo,_i,xC,bC,mH,e0],[]),eh(mG,[oo,_i,Io,Fs,hb,Lm,e0,tE],[qo]),O7().bootstrapModule(zve).catch(i=>console.error(i))},489:function(No,Hs,ps){var dn;No=ps.nmd(No),function(){var z,Kr=200,Un="Expected a function",za="__lodash_hash_undefined__",Ci="__lodash_placeholder__",Si=1,ms=2,Gs=4,Ws=1,Bo=2,On=1,ur=2,mc=4,la=8,Tl=16,ca=32,Il=64,Ha=128,da=256,md=512,wE=800,qg=16,Tn=1/0,Ga=9007199254740991,CE=17976931348623157e292,Pf=NaN,ua=4294967295,Te=ua-1,a0=ua>>>1,l0=[["ary",Ha],["bind",On],["bindKey",ur],["curry",la],["curryRight",Tl],["flip",md],["partial",ca],["partialRight",Il],["rearg",da]],ni="[object Arguments]",qn="[object Array]",SE="[object AsyncFunction]",tt="[object Boolean]",gc="[object Date]",EE="[object DOMException]",gd="[object Error]",Of="[object Function]",c0="[object GeneratorFunction]",Uo="[object Map]",Uu="[object Number]",AE="[object Null]",Wa="[object Object]",d0="[object Promise]",DE="[object Proxy]",_d="[object RegExp]",Vo="[object Set]",_c="[object String]",Ff="[object Symbol]",Xg="[object Undefined]",vd="[object WeakMap]",Vu="[object ArrayBuffer]",yd="[object DataView]",ha="[object Float32Array]",Lf="[object Float64Array]",Kg="[object Int8Array]",Nf="[object Int16Array]",Zg="[object Int32Array]",Qg="[object Uint8Array]",zu="[object Uint8ClampedArray]",Jg="[object Uint16Array]",e_="[object Uint32Array]",IE=/\b__p \+= '';/g,RE=/\b(__p \+=) '' \+/g,kE=/(__e\(.*?\)|\b__t\)) \+\n'';/g,u0=/&(?:amp|lt|gt|quot|#39);/g,h0=/[&<>"']/g,PE=RegExp(u0.source),OE=RegExp(h0.source),KO=/<%-([\s\S]+?)%>/g,t_=/<%([\s\S]+?)%>/g,n_=/<%=([\s\S]+?)%>/g,f0=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,p0=/^\w*$/,m0=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,i_=/[\\^$.*+?()[\]{}|]/g,g0=RegExp(i_.source),Bf=/^\s+/,_0=/\s/,v0=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,Mr=/\{\n\/\* \[wrapped with (.+)\] \*/,FE=/,? & /,LE=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,NE=/[()=,{}\[\]\/\s]/,BE=/\\(\\)?/g,y0=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,b0=/\w*$/,UE=/^[-+]0x[0-9a-f]+$/i,ja=/^0b[01]+$/i,VE=/^\[object .+?Constructor\]$/,ir=/^0o[0-7]+$/i,bd=/^(?:0|[1-9]\d*)$/,go=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,r_=/($^)/,zE=/['\n\r\u2028\u2029\\]/g,Hu="\\ud800-\\udfff",w0="\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff",o_="\\u2700-\\u27bf",a_="a-z\\xdf-\\xf6\\xf8-\\xff",l_="A-Z\\xc0-\\xd6\\xd8-\\xde",M0="\\ufe0e\\ufe0f",C0="\\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",Cr="["+Hu+"]",Uf="["+C0+"]",xd="["+w0+"]",ci="\\d+",c_="["+o_+"]",mi="["+a_+"]",Vf="[^"+Hu+C0+ci+o_+a_+l_+"]",d_="\\ud83c[\\udffb-\\udfff]",Ot="[^"+Hu+"]",Gu="(?:\\ud83c[\\udde6-\\uddff]){2}",Wu="[\\ud800-\\udbff][\\udc00-\\udfff]",ju="["+l_+"]",pe="(?:"+mi+"|"+Vf+")",zf="(?:"+ju+"|"+Vf+")",Jt="(?:['\u2019](?:d|ll|m|re|s|t|ve))?",Xn="(?:['\u2019](?:D|LL|M|RE|S|T|VE))?",S0="(?:"+xd+"|"+d_+")?",jE="["+M0+"]?",qE=jE+S0+"(?:\\u200d(?:"+[Ot,Gu,Wu].join("|")+")"+jE+S0+")*",XE="(?:"+[c_,Gu,Wu].join("|")+")"+qE,ZO="(?:"+[Ot+xd+"?",xd,Gu,Wu,Cr].join("|")+")",Rl=RegExp("['\u2019]","g"),QO=RegExp(xd,"g"),E0=RegExp(d_+"(?="+d_+")|"+ZO+qE,"g"),JO=RegExp([ju+"?"+mi+"+"+Jt+"(?="+[Uf,ju,"$"].join("|")+")",zf+"+"+Xn+"(?="+[Uf,ju+pe,"$"].join("|")+")",ju+"?"+pe+"+"+Jt,ju+"+"+Xn,"\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])","\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",ci,XE].join("|"),"g"),eF=RegExp("[\\u200d"+Hu+w0+M0+"]"),KE=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,tF=["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"],ZE=-1,Ei={};Ei[ha]=Ei[Lf]=Ei[Kg]=Ei[Nf]=Ei[Zg]=Ei[Qg]=Ei[zu]=Ei[Jg]=Ei[e_]=!0,Ei[ni]=Ei[qn]=Ei[Vu]=Ei[tt]=Ei[yd]=Ei[gc]=Ei[gd]=Ei[Of]=Ei[Uo]=Ei[Uu]=Ei[Wa]=Ei[_d]=Ei[Vo]=Ei[_c]=Ei[vd]=!1;var Sn={};Sn[ni]=Sn[qn]=Sn[Vu]=Sn[yd]=Sn[tt]=Sn[gc]=Sn[ha]=Sn[Lf]=Sn[Kg]=Sn[Nf]=Sn[Zg]=Sn[Uo]=Sn[Uu]=Sn[Wa]=Sn[_d]=Sn[Vo]=Sn[_c]=Sn[Ff]=Sn[Qg]=Sn[zu]=Sn[Jg]=Sn[e_]=!0,Sn[gd]=Sn[Of]=Sn[vd]=!1;var rF={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},ke=parseFloat,sF=parseInt,Wt="object"==typeof global&&global&&global.Object===Object&&global,$f="object"==typeof self&&self&&self.Object===Object&&self,Sr=Wt||$f||Function("return this")(),u_=Hs&&!Hs.nodeType&&Hs,qu=u_&&No&&!No.nodeType&&No,h_=qu&&qu.exports===u_,wd=h_&&Wt.process,gs=function(){try{return qu&&qu.require&&qu.require("util").types||wd&&wd.binding&&wd.binding("util")}catch{}}(),f_=gs&&gs.isArrayBuffer,A0=gs&&gs.isDate,Ft=gs&&gs.isMap,Gf=gs&&gs.isRegExp,D0=gs&&gs.isSet,Ys=gs&&gs.isTypedArray;function _s(X,he,ae){switch(ae.length){case 0:return X.call(he);case 1:return X.call(he,ae[0]);case 2:return X.call(he,ae[0],ae[1]);case 3:return X.call(he,ae[0],ae[1],ae[2])}return X.apply(he,ae)}function oF(X,he,ae,ze){for(var jt=-1,Vn=null==X?0:X.length;++jt-1}function Xu(X,he,ae){for(var ze=-1,jt=null==X?0:X.length;++ze-1;);return ae}function fa(X,he){for(var ae=X.length;ae--&&Lt(he,X[ae],0)>-1;);return ae}var tA=g_({\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"}),ot=g_({"&":"&","<":"<",">":">",'"':""","'":"'"});function eh(X){return"\\"+rF[X]}function Sd(X){return eF.test(X)}function qf(X){var he=-1,ae=Array(X.size);return X.forEach(function(ze,jt){ae[++he]=[jt,ze]}),ae}function ve(X,he){return function(ae){return X(he(ae))}}function $i(X,he){for(var ae=-1,ze=X.length,jt=0,Vn=[];++ae",""":'"',"'":"'"}),ys=function X(he){var u,ae=(he=null==he?Sr:ys.defaults(Sr.Object(),he,ys.pick(Sr,tF))).Array,ze=he.Date,jt=he.Error,Vn=he.Function,xt=he.Math,ai=he.Object,bc=he.RegExp,I0=he.String,Er=he.TypeError,rr=ae.prototype,zo=ai.prototype,Xs=he["__core-js_shared__"],Ol=Vn.prototype.toString,ri=zo.hasOwnProperty,bi=0,rA=(u=/[^.]+$/.exec(Xs&&Xs.keys&&Xs.keys.IE_PROTO||""))?"Symbol(src)_1."+u:"",Ad=zo.toString,R0=Ol.call(ai),Kf=Sr._,Zf=bc("^"+Ol.call(ri).replace(i_,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),Ka=h_?he.Buffer:z,Ui=he.Symbol,y_=he.Uint8Array,bs=Ka?Ka.allocUnsafe:z,xs=ve(ai.getPrototypeOf,ai),Qf=ai.create,Dd=zo.propertyIsEnumerable,xc=rr.splice,yo=Ui?Ui.isConcatSpreadable:z,nh=Ui?Ui.iterator:z,Td=Ui?Ui.toStringTag:z,Jf=function(){try{var u=kc(ai,"defineProperty");return u({},"",{}),u}catch{}}(),sA=he.clearTimeout!==Sr.clearTimeout&&he.clearTimeout,lF=ze&&ze.now!==Sr.Date.now&&ze.now,cF=he.setTimeout!==Sr.setTimeout&&he.setTimeout,b_=xt.ceil,x_=xt.floor,k0=ai.getOwnPropertySymbols,dF=Ka?Ka.isBuffer:z,oA=he.isFinite,uF=rr.join,hF=ve(ai.keys,ai),fr=xt.max,Zr=xt.min,fF=ze.now,P0=he.parseInt,w_=xt.random,pF=rr.reverse,O0=kc(he,"DataView"),ep=kc(he,"Map"),Za=kc(he,"Promise"),Id=kc(he,"Set"),xi=kc(he,"WeakMap"),Rd=kc(ai,"create"),tp=xi&&new xi,kd={},F0=Pc(O0),L0=Pc(ep),aA=Pc(Za),M_=Pc(Id),lA=Pc(xi),Qr=Ui?Ui.prototype:z,Pd=Qr?Qr.valueOf:z,C_=Qr?Qr.toString:z;function I(u){if(Pi(u)&&!sn(u)&&!(u instanceof Rn)){if(u instanceof Ai)return u;if(ri.call(u,"__wrapped__"))return ns(u)}return new Ai(u)}var Od=function(){function u(){}return function(f){if(!Mi(f))return{};if(Qf)return Qf(f);u.prototype=f;var _=new u;return u.prototype=z,_}}();function wc(){}function Ai(u,f){this.__wrapped__=u,this.__actions__=[],this.__chain__=!!f,this.__index__=0,this.__values__=z}function Rn(u){this.__wrapped__=u,this.__actions__=[],this.__dir__=1,this.__filtered__=!1,this.__iteratees__=[],this.__takeCount__=ua,this.__views__=[]}function Mc(u){var f=-1,_=null==u?0:u.length;for(this.clear();++f<_;){var w=u[f];this.set(w[0],w[1])}}function Pt(u){var f=-1,_=null==u?0:u.length;for(this.clear();++f<_;){var w=u[f];this.set(w[0],w[1])}}function pa(u){var f=-1,_=null==u?0:u.length;for(this.clear();++f<_;){var w=u[f];this.set(w[0],w[1])}}function Et(u){var f=-1,_=null==u?0:u.length;for(this.__data__=new pa;++f<_;)this.add(u[f])}function Jr(u){var f=this.__data__=new Pt(u);this.size=f.size}function D_(u,f){var _=sn(u),w=!_&&Lc(u),S=!_&&!w&&il(u),P=!_&&!w&&!S&&Wo(u),$=_||w||S||P,Y=$?qs(u.length,I0):[],Q=Y.length;for(var _e in u)(f||ri.call(u,_e))&&(!$||!("length"==_e||S&&("offset"==_e||"parent"==_e)||P&&("buffer"==_e||"byteLength"==_e||"byteOffset"==_e)||nl(_e,Q)))&&Y.push(_e);return Y}function zr(u){var f=u.length;return f?u[ah(0,f-1)]:z}function Qa(u,f){return Sp(Qs(u),Nl(f,0,u.length))}function z0(u){return Sp(Qs(u))}function Ll(u,f,_){(_!==z&&!Go(u[f],_)||_===z&&!(f in u))&&Ho(u,f,_)}function Ks(u,f,_){var w=u[f];(!ri.call(u,f)||!Go(w,_)||_===z&&!(f in u))&&Ho(u,f,_)}function ip(u,f){for(var _=u.length;_--;)if(Go(u[_][0],f))return _;return-1}function H0(u,f,_,w){return Ja(u,function(S,P,$){f(w,S,_(S),$)}),w}function $0(u,f){return u&&di(f,pr(f),u)}function Ho(u,f,_){"__proto__"==f&&Jf?Jf(u,f,{configurable:!0,enumerable:!0,value:_,writable:!0}):u[f]=_}function ih(u,f){for(var _=-1,w=f.length,S=ae(w),P=null==u;++_=f?u:f)),u}function Ms(u,f,_,w,S,P){var $,Y=f&Si,Q=f&ms,_e=f&Gs;if(_&&($=S?_(u,w,S,P):_(u)),$!==z)return $;if(!Mi(u))return u;var ye=sn(u);if(ye){if($=function ux(u){var f=u.length,_=new u.constructor(f);return f&&"string"==typeof u[0]&&ri.call(u,"index")&&(_.index=u.index,_.input=u.input),_}(u),!Y)return Qs(u,$)}else{var be=Hr(u),Xe=be==Of||be==c0;if(il(u))return me(u,Y);if(be==Wa||be==ni||Xe&&!S){if($=Q||Xe?{}:kA(u),!Y)return Q?function uh(u,f){return di(u,lx(u),f)}(u,function gA(u,f){return u&&di(f,Ds(f),u)}($,u)):function V_(u,f){return di(u,X_(u),f)}(u,$0($,u))}else{if(!Sn[be])return S?u:{};$=function hx(u,f,_){var w=u.constructor;switch(f){case Vu:return ix(u);case tt:case gc:return new w(+u);case yd:return function bF(u,f){var _=f?ix(u.buffer):u.buffer;return new u.constructor(_,u.byteOffset,u.byteLength)}(u,_);case ha:case Lf:case Kg:case Nf:case Zg:case Qg:case zu:case Jg:case e_:return EA(u,_);case Uo:return new w;case Uu:case _c:return new w(u);case _d:return function xF(u){var f=new u.constructor(u.source,b0.exec(u));return f.lastIndex=u.lastIndex,f}(u);case Vo:return new w;case Ff:return function wF(u){return Pd?ai(Pd.call(u)):{}}(u)}}(u,be,Y)}}P||(P=new Jr);var bt=P.get(u);if(bt)return bt;P.set(u,$),tw(u)?u.forEach(function(Ht){$.add(Ms(Ht,f,_,Ht,u,P))}):Av(u)&&u.forEach(function(Ht,En){$.set(En,Ms(Ht,f,_,En,u,P))});var mn=ye?z:(_e?Q?j_:yp:Q?Ds:pr)(u);return In(mn||u,function(Ht,En){mn&&(Ht=u[En=Ht]),Ks($,En,Ms(Ht,f,_,En,u,P))}),$}function T_(u,f,_){var w=_.length;if(null==u)return!w;for(u=ai(u);w--;){var S=_[w],$=u[S];if($===z&&!(S in u)||!(0,f[S])($))return!1}return!0}function rp(u,f,_){if("function"!=typeof u)throw new Er(Un);return mh(function(){u.apply(z,_)},f)}function Ld(u,f,_,w){var S=-1,P=kl,$=!0,Y=u.length,Q=[],_e=f.length;if(!Y)return Q;_&&(f=gi(f,Ur(_))),w?(P=Xu,$=!1):f.length>=Kr&&(P=yc,$=!1,f=new Et(f));e:for(;++S-1},Pt.prototype.set=function hA(u,f){var _=this.__data__,w=ip(_,u);return w<0?(++this.size,_.push([u,f])):_[w][1]=f,this},pa.prototype.clear=function fA(){this.size=0,this.__data__={hash:new Mc,map:new(ep||Pt),string:new Mc}},pa.prototype.delete=function pA(u){var f=q_(this,u).delete(u);return this.size-=f?1:0,f},pa.prototype.get=function Se(u){return q_(this,u).get(u)},pa.prototype.has=function zn(u){return q_(this,u).has(u)},pa.prototype.set=function Vt(u,f){var _=q_(this,u),w=_.size;return _.set(u,f),this.size+=_.size==w?0:1,this},Et.prototype.add=Et.prototype.push=function Ar(u){return this.__data__.set(u,za),this},Et.prototype.has=function V0(u){return this.__data__.has(u)},Jr.prototype.clear=function ma(){this.__data__=new Pt,this.size=0},Jr.prototype.delete=function E_(u){var f=this.__data__,_=f.delete(u);return this.size=f.size,_},Jr.prototype.get=function A_(u){return this.__data__.get(u)},Jr.prototype.has=function mA(u){return this.__data__.has(u)},Jr.prototype.set=function gF(u,f){var _=this.__data__;if(_ instanceof Pt){var w=_.__data__;if(!ep||w.length0&&_(Y)?f>1?Kn(Y,f-1,_,w,S):Pl(S,Y):w||(S[S.length]=Y)}return S}var el=z_(),Di=z_(!0);function ki(u,f){return u&&el(u,f,pr)}function R_(u,f){return u&&Di(u,f,pr)}function ga(u,f){return vc(f,function(_){return Hl(u[_])})}function Cc(u,f){for(var _=0,w=(f=ba(f,u)).length;null!=u&&_f}function sp(u,f){return null!=u&&ri.call(u,f)}function op(u,f){return null!=u&&f in ai(u)}function ap(u,f,_){for(var w=_?Xu:kl,S=u[0].length,P=u.length,$=P,Y=ae(P),Q=1/0,_e=[];$--;){var ye=u[$];$&&f&&(ye=gi(ye,Ur(f))),Q=Zr(ye.length,Q),Y[$]=!_&&(f||S>=120&&ye.length>=120)?new Et($&&ye):z}ye=u[0];var be=-1,Xe=Y[0];e:for(;++be=Y?Q:Q*("desc"==_[w]?-1:1)}return u.index-f.index}(P,$,_)})}function Z0(u,f,_){for(var w=-1,S=f.length,P={};++w-1;)Y!==u&&xc.call(Y,Q,1),xc.call(u,Q,1);return u}function oh(u,f){for(var _=u?f.length:0,w=_-1;_--;){var S=f[_];if(_==w||S!==P){var P=S;nl(S)?xc.call(u,S,1):ch(u,S)}}return u}function ah(u,f){return u+x_(w_()*(f-u+1))}function lh(u,f){var _="";if(!u||f<1||f>Ga)return _;do{f%2&&(_+=u),(f=x_(f/2))&&(u+=u)}while(f);return _}function pn(u,f){return Mp(Z_(u,f,is),u+"")}function CA(u){return zr(Uc(u))}function J0(u,f){var _=Uc(u);return Sp(_,Nl(f,0,_.length))}function zd(u,f,_,w){if(!Mi(u))return u;for(var S=-1,P=(f=ba(f,u)).length,$=P-1,Y=u;null!=Y&&++SS?0:S+f),(_=_>S?S:_)<0&&(_+=S),S=f>_?0:_-f>>>0,f>>>=0;for(var P=ae(S);++w>>1,$=u[P];null!==$&&!As($)&&(_?$<=f:$=Kr){var _e=f?null:G_(u);if(_e)return Hn(_e);$=!1,S=yc,Q=new Et}else Q=f?[]:Y;e:for(;++w=w?u:ts(u,f,_)}var nx=sA||function(u){return Sr.clearTimeout(u)};function me(u,f){if(f)return u.slice();var _=u.length,w=bs?bs(_):new u.constructor(_);return u.copy(w),w}function ix(u){var f=new u.constructor(u.byteLength);return new y_(f).set(new y_(u)),f}function EA(u,f){var _=f?ix(u.buffer):u.buffer;return new u.constructor(_,u.byteOffset,u.length)}function AA(u,f){if(u!==f){var _=u!==z,w=null===u,S=u==u,P=As(u),$=f!==z,Y=null===f,Q=f==f,_e=As(f);if(!Y&&!_e&&!P&&u>f||P&&$&&Q&&!Y&&!_e||w&&$&&Q||!_&&Q||!S)return 1;if(!w&&!P&&!_e&&u1?_[S-1]:z,$=S>2?_[2]:z;for(P=u.length>3&&"function"==typeof P?(S--,P):z,$&&Tr(_[0],_[1],$)&&(P=S<3?z:P,S=1),f=ai(f);++w-1?S[P?f[$]:$]:z}}function Cs(u){return xo(function(f){var _=f.length,w=_,S=Ai.prototype.thru;for(u&&f.reverse();w--;){var P=f[w];if("function"!=typeof P)throw new Er(Un);if(S&&!$&&"wrapper"==tl(P))var $=new Ai([],!0)}for(w=$?w:_;++w<_;){var Y=tl(P=f[w]),Q="wrapper"==Y?Y_(P):z;$=Q&&ph(Q[0])&&Q[1]==(Ha|la|ca|da)&&!Q[4].length&&1==Q[9]?$[tl(Q[0])].apply($,Q[3]):1==P.length&&ph(P)?$[Y]():$.thru(P)}return function(){var _e=arguments,ye=_e[0];if($&&1==_e.length&&sn(ye))return $.plant(ye).value();for(var be=0,Xe=_?f[be].apply(this,_e):ye;++be<_;)Xe=f[be].call(this,Xe);return Xe}})}function jd(u,f,_,w,S,P,$,Y,Q,_e){var ye=f&Ha,be=f&On,Xe=f&ur,bt=f&(la|Tl),zt=f&md,mn=Xe?z:mp(u);return function Ht(){for(var En=arguments.length,Ln=ae(En),rs=En;rs--;)Ln[rs]=arguments[rs];if(bt)var ss=wa(Ht),io=function Ju(X,he){for(var ae=X.length,ze=0;ae--;)X[ae]===he&&++ze;return ze}(Ln,ss);if(w&&(Ln=$d(Ln,w,S,bt)),P&&(Ln=DA(Ln,P,$,bt)),En-=io,bt&&En<_e){var Ti=$i(Ln,ss);return sx(u,f,jd,Ht.placeholder,_,Ln,Ti,Y,Q,_e-En)}var Ts=be?_:this,Co=Xe?Ts[u]:u;return En=Ln.length,Y?Ln=function Es(u,f){for(var _=u.length,w=Zr(f.length,_),S=Qs(u);w--;){var P=f[w];u[w]=nl(P,_)?S[P]:z}return u}(Ln,Y):zt&&En>1&&Ln.reverse(),ye&&QY))return!1;var _e=P.get(u),ye=P.get(f);if(_e&&ye)return _e==f&&ye==u;var be=-1,Xe=!0,bt=_&Bo?new Et:z;for(P.set(u,f),P.set(f,u);++be-1&&u%1==0&&u1?"& ":"")+f[w],f=f.join(_>2?", ":" "),u.replace(v0,"{\n/* [wrapped with "+f+"] */\n")}(w,function NA(u,f){return In(l0,function(_){var w="_."+_[0];f&_[1]&&!kl(u,w)&&u.push(w)}),u.sort()}(function cx(u){var f=u.match(Mr);return f?f[1].split(FE):[]}(w),_)))}function _x(u){var f=0,_=0;return function(){var w=fF(),S=qg-(w-_);if(_=w,S>0){if(++f>=wE)return arguments[0]}else f=0;return u.apply(z,arguments)}}function Sp(u,f){var _=-1,w=u.length,S=w-1;for(f=f===z?w:f;++_1?u[f-1]:z;return _="function"==typeof _?(u.pop(),_):z,vh(u,_)});function Vx(u){var f=I(u);return f.__chain__=!0,f}function Ip(u,f){return f(u)}var zx=xo(function(u){var f=u.length,_=f?u[0]:0,w=this.__wrapped__,S=function(P){return ih(P,u)};return!(f>1||this.__actions__.length)&&w instanceof Rn&&nl(_)?((w=w.slice(_,+_+(f?1:0))).__actions__.push({func:Ip,args:[S],thisArg:z}),new Ai(w,this.__chain__).thru(function(P){return f&&!P.length&&P.push(z),P})):this.thru(S)}),r1=fp(function(u,f,_){ri.call(u,_)?++u[_]:Ho(u,_,1)}),$x=IA(Cx),kp=IA(nv);function vv(u,f){return(sn(u)?In:Ja)(u,Nt(f,3))}function zl(u,f){return(sn(u)?aF:I_)(u,Nt(f,3))}var o1=fp(function(u,f,_){ri.call(u,_)?u[_].push(f):Ho(u,_,[f])}),l1=pn(function(u,f,_){var w=-1,S="function"==typeof f,P=eo(u)?ae(u.length):[];return Ja(u,function($){P[++w]=S?_s(f,$,_):_a($,f,_)}),P}),c1=fp(function(u,f,_){Ho(u,_,f)});function Pp(u,f){return(sn(u)?gi:rh)(u,Nt(f,3))}var Ma=fp(function(u,f,_){u[_?0:1].push(f)},function(){return[[],[]]}),_1=pn(function(u,f){if(null==u)return[];var _=f.length;return _>1&&Tr(u,f[0],f[1])?f=[]:_>2&&Tr(f[0],f[1],f[2])&&(f=[f[0]]),L_(u,Kn(f,1),[])}),Op=lF||function(){return Sr.Date.now()};function bh(u,f,_){return f=_?z:f,bo(u,Ha,z,z,z,z,f=u&&null==f?u.length:f)}function Ca(u,f){var _;if("function"!=typeof f)throw new Er(Un);return u=un(u),function(){return--u>0&&(_=f.apply(this,arguments)),u<=1&&(f=z),_}}var Fc=pn(function(u,f,_){var w=On;if(_.length){var S=$i(_,wa(Fc));w|=ca}return bo(u,w,f,_,S)}),yv=pn(function(u,f,_){var w=On|ur;if(_.length){var S=$i(_,wa(yv));w|=ca}return bo(f,w,u,_,S)});function y1(u,f,_){var w,S,P,$,Y,Q,_e=0,ye=!1,be=!1,Xe=!0;if("function"!=typeof u)throw new Er(Un);function bt(Ti){var Ts=w,Co=S;return w=S=z,_e=Ti,$=u.apply(Co,Ts)}function Ht(Ti){var Ts=Ti-Q;return Q===z||Ts>=f||Ts<0||be&&Ti-_e>=P}function En(){var Ti=Op();if(Ht(Ti))return Ln(Ti);Y=mh(En,function mn(Ti){var TD=f-(Ti-Q);return be?Zr(TD,P-(Ti-_e)):TD}(Ti))}function Ln(Ti){return Y=z,Xe&&w?bt(Ti):(w=S=z,$)}function io(){var Ti=Op(),Ts=Ht(Ti);if(w=arguments,S=this,Q=Ti,Ts){if(Y===z)return function zt(Ti){return _e=Ti,Y=mh(En,f),ye?bt(Ti):$}(Q);if(be)return nx(Y),Y=mh(En,f),bt(Q)}return Y===z&&(Y=mh(En,f)),$}return f=wo(f)||0,Mi(_)&&(ye=!!_.leading,P=(be="maxWait"in _)?fr(wo(_.maxWait)||0,f):P,Xe="trailing"in _?!!_.trailing:Xe),io.cancel=function rs(){Y!==z&&nx(Y),_e=0,w=Q=S=Y=z},io.flush=function ss(){return Y===z?$:Ln(Op())},io}var RF=pn(function(u,f){return rp(u,1,f)}),kF=pn(function(u,f,_){return rp(u,wo(f)||0,_)});function qd(u,f){if("function"!=typeof u||null!=f&&"function"!=typeof f)throw new Er(Un);var _=function(){var w=arguments,S=f?f.apply(this,w):w[0],P=_.cache;if(P.has(S))return P.get(S);var $=u.apply(this,w);return _.cache=P.set(S,$)||P,$};return _.cache=new(qd.Cache||pa),_}function Mv(u){if("function"!=typeof u)throw new Er(Un);return function(){var f=arguments;switch(f.length){case 0:return!u.call(this);case 1:return!u.call(this,f[0]);case 2:return!u.call(this,f[0],f[1]);case 3:return!u.call(this,f[0],f[1],f[2])}return!u.apply(this,f)}}qd.Cache=pa;var Yx=Hd(function(u,f){var _=(f=1==f.length&&sn(f[0])?gi(f[0],Ur(Nt())):gi(Kn(f,1),Ur(Nt()))).length;return pn(function(w){for(var S=-1,P=Zr(w.length,_);++S=f}),Lc=Ud(function(){return arguments}())?Ud:function(u){return Pi(u)&&ri.call(u,"callee")&&!Dd.call(u,"callee")},sn=ae.isArray,OF=f_?Ur(f_):function bA(u){return Pi(u)&&es(u)==Vu};function eo(u){return null!=u&&Vp(u.length)&&!Hl(u)}function wi(u){return Pi(u)&&eo(u)}var il=dF||Jd,Qx=A0?Ur(A0):function _F(u){return Pi(u)&&es(u)==gc};function Bp(u){if(!Pi(u))return!1;var f=es(u);return f==gd||f==EE||"string"==typeof u.message&&"string"==typeof u.name&&!to(u)}function Hl(u){if(!Mi(u))return!1;var f=es(u);return f==Of||f==c0||f==SE||f==DE}function Up(u){return"number"==typeof u&&u==un(u)}function Vp(u){return"number"==typeof u&&u>-1&&u%1==0&&u<=Ga}function Mi(u){var f=typeof u;return null!=u&&("object"==f||"function"==f)}function Pi(u){return null!=u&&"object"==typeof u}var Av=Ft?Ur(Ft):function xA(u){return Pi(u)&&Hr(u)==Uo};function xh(u){return"number"==typeof u||Pi(u)&&es(u)==Uu}function to(u){if(!Pi(u)||es(u)!=Wa)return!1;var f=xs(u);if(null===f)return!0;var _=ri.call(f,"constructor")&&f.constructor;return"function"==typeof _&&_ instanceof _&&Ol.call(_)==R0}var Hp=Gf?Ur(Gf):function yF(u){return Pi(u)&&es(u)==_d},tw=D0?Ur(D0):function O_(u){return Pi(u)&&Hr(u)==Vo};function $p(u){return"string"==typeof u||!sn(u)&&Pi(u)&&es(u)==_c}function As(u){return"symbol"==typeof u||Pi(u)&&es(u)==Ff}var Wo=Ys?Ur(Ys):function Y0(u){return Pi(u)&&Vp(u.length)&&!!Ei[es(u)]},Rv=vp(lp),P1=vp(function(u,f){return u<=f});function kv(u){if(!u)return[];if(eo(u))return $p(u)?vo(u):Qs(u);if(nh&&u[nh])return function iA(X){for(var he,ae=[];!(he=X.next()).done;)ae.push(he.value);return ae}(u[nh]());var f=Hr(u);return(f==Uo?qf:f==Vo?Hn:Uc)(u)}function rl(u){return u?(u=wo(u))===Tn||u===-Tn?(u<0?-1:1)*CE:u==u?u:0:0===u?u:0}function un(u){var f=rl(u),_=f%1;return f==f?_?f-_:f:0}function O1(u){return u?Nl(un(u),0,ua):0}function wo(u){if("number"==typeof u)return u;if(As(u))return Pf;if(Mi(u)){var f="function"==typeof u.valueOf?u.valueOf():u;u=Mi(f)?f+"":f}if("string"!=typeof u)return 0===u?u:+u;u=Wn(u);var _=ja.test(u);return _||ir.test(u)?sF(u.slice(2),_?2:8):UE.test(u)?Pf:+u}function $l(u){return di(u,Ds(u))}function Fn(u){return null==u?"":Zs(u)}var vt=Dr(function(u,f){if(wp(f)||eo(f))di(f,pr(f),u);else for(var _ in f)ri.call(f,_)&&Ks(u,_,f[_])}),nw=Dr(function(u,f){di(f,Ds(f),u)}),Gl=Dr(function(u,f,_,w){di(f,Ds(f),u,w)}),sl=Dr(function(u,f,_,w){di(f,pr(f),u,w)}),L1=xo(ih),Bc=pn(function(u,f){u=ai(u);var _=-1,w=f.length,S=w>2?f[2]:z;for(S&&Tr(f[0],f[1],S)&&(w=1);++_1),P}),di(u,j_(u),_),w&&(_=Ms(_,Si|ms|Gs,xa));for(var S=f.length;S--;)ch(_,f[S]);return _}),j1=xo(function(u,f){return null==u?{}:function K0(u,f){return Z0(u,f,function(_,w){return Nv(u,w)})}(u,f)});function Bv(u,f){if(null==u)return{};var _=gi(j_(u),function(w){return[w]});return f=Nt(f),Z0(u,_,function(w,S){return f(w,S[0])})}var ow=hh(pr),Uv=hh(Ds);function Uc(u){return null==u?[]:Qu(u,pr(u))}var V=Wd(function(u,f,_){return f=f.toLowerCase(),u+(_?Vv(f):f)});function Vv(u){return Zd(Fn(u).toLowerCase())}function zv(u){return(u=Fn(u))&&u.replace(go,tA).replace(QO,"")}var rD=Wd(function(u,f,_){return u+(_?"-":"")+f.toLowerCase()}),lw=Wd(function(u,f,_){return u+(_?" ":"")+f.toLowerCase()}),sD=Gd("toLowerCase"),Hv=Wd(function(u,f,_){return u+(_?"_":"")+f.toLowerCase()}),lD=Wd(function(u,f,_){return u+(_?" ":"")+Zd(f)}),hw=Wd(function(u,f,_){return u+(_?" ":"")+f.toUpperCase()}),Zd=Gd("toUpperCase");function fw(u,f,_){return u=Fn(u),(f=_?z:f)===z?function en(X){return KE.test(X)}(u)?function fn(X){return X.match(JO)||[]}(u):function eA(X){return X.match(LE)||[]}(u):u.match(f)||[]}var Gv=pn(function(u,f){try{return _s(u,z,f)}catch(_){return Bp(_)?_:new jt(_)}}),hD=xo(function(u,f){return In(f,function(_){_=$o(_),Ho(u,_,Fc(u[_],u))}),u});function Wv(u){return function(){return u}}var pw=Cs(),gD=Cs(!0);function is(u){return u}function Gp(u){return F_("function"==typeof u?u:Ms(u,Si))}var Yv=pn(function(u,f){return function(_){return _a(_,u,f)}}),_D=pn(function(u,f){return function(_){return _a(u,_,f)}});function mw(u,f,_){var w=pr(f),S=ga(f,w);null==_&&(!Mi(f)||!S.length&&w.length)&&(_=f,f=u,u=this,S=ga(f,pr(f)));var P=!(Mi(_)&&"chain"in _&&!_.chain),$=Hl(u);return In(S,function(Y){var Q=f[Y];u[Y]=Q,$&&(u.prototype[Y]=function(){var _e=this.__chain__;if(P||_e){var ye=u(this.__wrapped__);return(ye.__actions__=Qs(this.__actions__)).push({func:Q,args:arguments,thisArg:u}),ye.__chain__=_e,ye}return Q.apply(u,Pl([this.value()],arguments))})}),u}function Mo(){}var gw=gp(gi),yD=gp(QE),bD=gp(Wf);function wh(u){return fx(u)?m_($o(u)):function va(u){return function(f){return Cc(f,u)}}(u)}var qv=rx(),Mh=rx(!0);function Ch(){return[]}function Jd(){return!1}var xD=H_(function(u,f){return u+f},0),wD=$_("ceil"),yw=H_(function(u,f){return u/f},1),MD=$_("floor"),AD=H_(function(u,f){return u*f},1),GF=$_("round"),Jv=H_(function(u,f){return u-f},0);return I.after=function v1(u,f){if("function"!=typeof f)throw new Er(Un);return u=un(u),function(){if(--u<1)return f.apply(this,arguments)}},I.ary=bh,I.assign=vt,I.assignIn=nw,I.assignInWith=Gl,I.assignWith=sl,I.at=L1,I.before=Ca,I.bind=Fc,I.bindAll=hD,I.bindKey=yv,I.castArray=function w1(){if(!arguments.length)return[];var u=arguments[0];return sn(u)?u:[u]},I.chain=Vx,I.chunk=function ev(u,f,_){f=(_?Tr(u,f,_):f===z)?1:fr(un(f),0);var w=null==u?0:u.length;if(!w||f<1)return[];for(var S=0,P=0,$=ae(b_(w/f));SS?0:S+_),(w=w===z||w>S?S:un(w))<0&&(w+=S),w=_>w?0:O1(w);_>>0)?(u=Fn(u))&&("string"==typeof f||null!=f&&!Hp(f))&&!(f=Zs(f))&&Sd(u)?Ic(vo(u),0,_):u.split(f,_):[]},I.spread=function Xx(u,f){if("function"!=typeof u)throw new Er(Un);return f=null==f?0:fr(un(f),0),pn(function(_){var w=_[f],S=Ic(_,0,f);return w&&Pl(S,w),_s(u,this,S)})},I.tail=function Oc(u){var f=null==u?0:u.length;return f?ts(u,1,f):[]},I.take=function Px(u,f,_){return u&&u.length?ts(u,0,(f=_||f===z?1:un(f))<0?0:f):[]},I.takeRight=function Ox(u,f,_){var w=null==u?0:u.length;return w?ts(u,(f=w-(f=_||f===z?1:un(f)))<0?0:f,w):[]},I.takeRightWhile=function ZA(u,f){return u&&u.length?dh(u,Nt(f,3),!1,!0):[]},I.takeWhile=function TF(u,f){return u&&u.length?dh(u,Nt(f,3)):[]},I.tap=function e1(u,f){return f(u),u},I.throttle=function Fp(u,f,_){var w=!0,S=!0;if("function"!=typeof u)throw new Er(Un);return Mi(_)&&(w="leading"in _?!!_.leading:w,S="trailing"in _?!!_.trailing:S),y1(u,f,{leading:w,maxWait:f,trailing:S})},I.thru=Ip,I.toArray=kv,I.toPairs=ow,I.toPairsIn=Uv,I.toPath=function vw(u){return sn(u)?gi(u,$o):As(u)?[u]:Qs(vx(Fn(u)))},I.toPlainObject=$l,I.transform=function X1(u,f,_){var w=sn(u),S=w||il(u)||Wo(u);if(f=Nt(f,4),null==_){var P=u&&u.constructor;_=S?w?new P:[]:Mi(u)&&Hl(P)?Od(xs(u)):{}}return(S?In:ki)(u,function($,Y,Q){return f(_,$,Y,Q)}),_},I.unary=function Kx(u){return bh(u,1)},I.union=Ap,I.unionBy=QA,I.unionWith=Fx,I.uniq=function Lx(u){return u&&u.length?si(u):[]},I.uniqBy=function Nx(u,f){return u&&u.length?si(u,Nt(f,2)):[]},I.uniqWith=function uv(u,f){return f="function"==typeof f?f:z,u&&u.length?si(u,z,f):[]},I.unset=function K1(u,f){return null==u||ch(u,f)},I.unzip=Dp,I.unzipWith=vh,I.update=function Z1(u,f,_){return null==u?u:tx(u,f,hp(_))},I.updateWith=function Q1(u,f,_,w){return w="function"==typeof w?w:z,null==u?u:tx(u,f,hp(_),w)},I.values=Uc,I.valuesIn=function J1(u){return null==u?[]:Qu(u,Ds(u))},I.without=Tp,I.words=fw,I.wrap=function Sv(u,f){return Cv(hp(f),u)},I.xor=Bx,I.xorBy=hv,I.xorWith=fv,I.zip=pv,I.zipObject=function yh(u,f){return Tc(u||[],f||[],Ks)},I.zipObjectDeep=function JA(u,f){return Tc(u||[],f||[],zd)},I.zipWith=Ux,I.entries=ow,I.entriesIn=Uv,I.extend=nw,I.extendWith=Gl,mw(I,I),I.add=xD,I.attempt=Gv,I.camelCase=V,I.capitalize=Vv,I.ceil=wD,I.clamp=function eD(u,f,_){return _===z&&(_=f,f=z),_!==z&&(_=(_=wo(_))==_?_:0),f!==z&&(f=(f=wo(f))==f?f:0),Nl(wo(u),f,_)},I.clone=function Zn(u){return Ms(u,Gs)},I.cloneDeep=function C1(u){return Ms(u,Si|Gs)},I.cloneDeepWith=function Lp(u,f){return Ms(u,Si|Gs,f="function"==typeof f?f:z)},I.cloneWith=function M1(u,f){return Ms(u,Gs,f="function"==typeof f?f:z)},I.conformsTo=function Zx(u,f){return null==f||T_(u,f,pr(f))},I.deburr=zv,I.defaultTo=function mD(u,f){return null==u||u!=u?f:u},I.divide=yw,I.endsWith=function nD(u,f,_){u=Fn(u),f=Zs(f);var w=u.length,S=_=_===z?w:Nl(un(_),0,w);return(_-=f.length)>=0&&u.slice(_,S)==f},I.eq=Go,I.escape=function iD(u){return(u=Fn(u))&&OE.test(u)?u.replace(h0,ot):u},I.escapeRegExp=function aw(u){return(u=Fn(u))&&g0.test(u)?u.replace(i_,"\\$&"):u},I.every=function gv(u,f,_){var w=sn(u)?QE:G0;return _&&Tr(u,f,_)&&(f=z),w(u,Nt(f,3))},I.find=$x,I.findIndex=Cx,I.findKey=function Pv(u,f){return ee(u,Nt(f,3),ki)},I.findLast=kp,I.findLastIndex=nv,I.findLastKey=function Ov(u,f){return ee(u,Nt(f,3),R_)},I.floor=MD,I.forEach=vv,I.forEachRight=zl,I.forIn=function U1(u,f){return null==u?u:el(u,Nt(f,3),Ds)},I.forInRight=function Fv(u,f){return null==u?u:Di(u,Nt(f,3),Ds)},I.forOwn=function ol(u,f){return u&&ki(u,Nt(f,3))},I.forOwnRight=function V1(u,f){return u&&R_(u,Nt(f,3))},I.get=Lv,I.gt=S1,I.gte=E1,I.has=function $1(u,f){return null!=u&&dx(u,f,sp)},I.hasIn=Nv,I.head=Ex,I.identity=is,I.includes=function a1(u,f,_,w){u=eo(u)?u:Uc(u),_=_&&!w?un(_):0;var S=u.length;return _<0&&(_=fr(S+_,0)),$p(u)?_<=S&&u.indexOf(f,_)>-1:!!S&&Lt(u,f,_)>-1},I.indexOf=function _h(u,f,_){var w=null==u?0:u.length;if(!w)return-1;var S=null==_?0:un(_);return S<0&&(S=fr(w+S,0)),Lt(u,f,S)},I.inRange=function tD(u,f,_){return f=rl(f),_===z?(_=f,f=0):_=rl(_),function k_(u,f,_){return u>=Zr(f,_)&&u=-Ga&&u<=Ga},I.isSet=tw,I.isString=$p,I.isSymbol=As,I.isTypedArray=Wo,I.isUndefined=function I1(u){return u===z},I.isWeakMap=function R1(u){return Pi(u)&&Hr(u)==vd},I.isWeakSet=function k1(u){return Pi(u)&&"[object WeakSet]"==es(u)},I.join=function Ax(u,f){return null==u?"":uF.call(u,f)},I.kebabCase=rD,I.last=Ir,I.lastIndexOf=function av(u,f,_){var w=null==u?0:u.length;if(!w)return-1;var S=w;return _!==z&&(S=(S=un(_))<0?fr(w+S,0):Zr(S,w-1)),f==f?function Ed(X,he,ae){for(var ze=ae+1;ze--;)if(X[ze]===he)return ze;return ze}(u,f,S):Zu(u,Yf,S,!0)},I.lowerCase=lw,I.lowerFirst=sD,I.lt=Rv,I.lte=P1,I.max=function bw(u){return u&&u.length?Nd(u,is,Bd):z},I.maxBy=function xw(u,f){return u&&u.length?Nd(u,Nt(f,2),Bd):z},I.mean=function CD(u){return Cd(u,is)},I.meanBy=function SD(u,f){return Cd(u,Nt(f,2))},I.min=function no(u){return u&&u.length?Nd(u,is,lp):z},I.minBy=function ED(u,f){return u&&u.length?Nd(u,Nt(f,2),lp):z},I.stubArray=Ch,I.stubFalse=Jd,I.stubObject=function _w(){return{}},I.stubString=function Xv(){return""},I.stubTrue=function Kv(){return!0},I.multiply=AD,I.nth=function Dx(u,f){return u&&u.length?MA(u,un(f)):z},I.noConflict=function E(){return Sr._===this&&(Sr._=Kf),this},I.noop=Mo,I.now=Op,I.pad=function oD(u,f,_){u=Fn(u);var w=(f=un(f))?hr(u):0;if(!f||w>=f)return u;var S=(f-w)/2;return _p(x_(S),_)+u+_p(b_(S),_)},I.padEnd=function BF(u,f,_){u=Fn(u);var w=(f=un(f))?hr(u):0;return f&&wf){var w=u;u=f,f=w}if(_||u%1||f%1){var S=w_();return Zr(u+S*(f-u+ke("1e-"+((S+"").length-1))),f)}return ah(u,f)},I.reduce=function d1(u,f,_){var w=sn(u)?p_:T0,S=arguments.length<3;return w(u,Nt(f,4),_,S,Ja)},I.reduceRight=function u1(u,f,_){var w=sn(u)?JE:T0,S=arguments.length<3;return w(u,Nt(f,4),_,S,I_)},I.repeat=function Gi(u,f,_){return f=(_?Tr(u,f,_):f===z)?1:un(f),lh(Fn(u),f)},I.replace=function aD(){var u=arguments,f=Fn(u[0]);return u.length<3?f:f.replace(u[1],u[2])},I.result=function Y1(u,f,_){var w=-1,S=(f=ba(f,u)).length;for(S||(S=1,u=z);++wGa)return[];var _=ua,w=Zr(u,ua);f=Nt(f),u-=ua;for(var S=qs(w,f);++_=P)return u;var Y=_-hr(w);if(Y<1)return w;var Q=$?Ic($,0,Y).join(""):u.slice(0,Y);if(S===z)return Q+w;if($&&(Y+=Q.length-Y),Hp(S)){if(u.slice(Y).search(S)){var _e,ye=Q;for(S.global||(S=bc(S.source,Fn(b0.exec(S))+"g")),S.lastIndex=0;_e=S.exec(ye);)var be=_e.index;Q=Q.slice(0,be===z?Y:be)}}else if(u.indexOf(Zs(S),Y)!=Y){var Xe=Q.lastIndexOf(S);Xe>-1&&(Q=Q.slice(0,Xe))}return Q+w},I.unescape=function uD(u){return(u=Fn(u))&&PE.test(u)?u.replace(u0,Xf):u},I.uniqueId=function Qv(u){var f=++bi;return Fn(u)+f},I.upperCase=hw,I.upperFirst=Zd,I.each=vv,I.eachRight=zl,I.first=Ex,mw(I,function(){var u={};return ki(I,function(f,_){ri.call(I.prototype,_)||(u[_]=f)}),u}(),{chain:!1}),I.VERSION="4.17.21",In(["bind","bindKey","curry","curryRight","partial","partialRight"],function(u){I[u].placeholder=I}),In(["drop","take"],function(u,f){Rn.prototype[u]=function(_){_=_===z?1:fr(un(_),0);var w=this.__filtered__&&!f?new Rn(this):this.clone();return w.__filtered__?w.__takeCount__=Zr(_,w.__takeCount__):w.__views__.push({size:Zr(_,ua),type:u+(w.__dir__<0?"Right":"")}),w},Rn.prototype[u+"Right"]=function(_){return this.reverse()[u](_).reverse()}}),In(["filter","map","takeWhile"],function(u,f){var _=f+1,w=1==_||3==_;Rn.prototype[u]=function(S){var P=this.clone();return P.__iteratees__.push({iteratee:Nt(S,3),type:_}),P.__filtered__=P.__filtered__||w,P}}),In(["head","last"],function(u,f){var _="take"+(f?"Right":"");Rn.prototype[u]=function(){return this[_](1).value()[0]}}),In(["initial","tail"],function(u,f){var _="drop"+(f?"":"Right");Rn.prototype[u]=function(){return this.__filtered__?new Rn(this):this[_](1)}}),Rn.prototype.compact=function(){return this.filter(is)},Rn.prototype.find=function(u){return this.filter(u).head()},Rn.prototype.findLast=function(u){return this.reverse().find(u)},Rn.prototype.invokeMap=pn(function(u,f){return"function"==typeof u?new Rn(this):this.map(function(_){return _a(_,u,f)})}),Rn.prototype.reject=function(u){return this.filter(Mv(Nt(u)))},Rn.prototype.slice=function(u,f){u=un(u);var _=this;return _.__filtered__&&(u>0||f<0)?new Rn(_):(u<0?_=_.takeRight(-u):u&&(_=_.drop(u)),f!==z&&(_=(f=un(f))<0?_.dropRight(-f):_.take(f-u)),_)},Rn.prototype.takeRightWhile=function(u){return this.reverse().takeWhile(u).reverse()},Rn.prototype.toArray=function(){return this.take(ua)},ki(Rn.prototype,function(u,f){var _=/^(?:filter|find|map|reject)|While$/.test(f),w=/^(?:head|last)$/.test(f),S=I[w?"take"+("last"==f?"Right":""):f],P=w||/^find/.test(f);S&&(I.prototype[f]=function(){var $=this.__wrapped__,Y=w?[1]:arguments,Q=$ instanceof Rn,_e=Y[0],ye=Q||sn($),be=function(En){var Ln=S.apply(I,Pl([En],Y));return w&&Xe?Ln[0]:Ln};ye&&_&&"function"==typeof _e&&1!=_e.length&&(Q=ye=!1);var Xe=this.__chain__,zt=P&&!Xe,mn=Q&&!this.__actions__.length;if(!P&&ye){$=mn?$:new Rn(this);var Ht=u.apply($,Y);return Ht.__actions__.push({func:Ip,args:[be],thisArg:z}),new Ai(Ht,Xe)}return zt&&mn?u.apply(this,Y):(Ht=this.thru(be),zt?w?Ht.value()[0]:Ht.value():Ht)})}),In(["pop","push","shift","sort","splice","unshift"],function(u){var f=rr[u],_=/^(?:push|sort|unshift)$/.test(u)?"tap":"thru",w=/^(?:pop|shift)$/.test(u);I.prototype[u]=function(){var S=arguments;if(w&&!this.__chain__){var P=this.value();return f.apply(sn(P)?P:[],S)}return this[_](function($){return f.apply(sn($)?$:[],S)})}}),ki(Rn.prototype,function(u,f){var _=I[f];if(_){var w=_.name+"";ri.call(kd,w)||(kd[w]=[]),kd[w].push({name:f,func:_})}}),kd[jd(z,ur).name]=[{name:"wrapper",func:z}],Rn.prototype.clone=function N0(){var u=new Rn(this.__wrapped__);return u.__actions__=Qs(this.__actions__),u.__dir__=this.__dir__,u.__filtered__=this.__filtered__,u.__iteratees__=Qs(this.__iteratees__),u.__takeCount__=this.__takeCount__,u.__views__=Qs(this.__views__),u},Rn.prototype.reverse=function Fd(){if(this.__filtered__){var u=new Rn(this);u.__dir__=-1,u.__filtered__=!0}else(u=this.clone()).__dir__*=-1;return u},Rn.prototype.value=function ws(){var u=this.__wrapped__.value(),f=this.__dir__,_=sn(u),w=f<0,S=_?u.length:0,P=function xp(u,f,_){for(var w=-1,S=_.length;++w=this.__values__.length;return{done:u,value:u?z:this.__values__[this.__index__++]}},I.prototype.plant=function t1(u){for(var f,_=this;_ instanceof wc;){var w=ns(_);w.__index__=0,w.__values__=z,f?S.__wrapped__=w:f=w;var S=w;_=_.__wrapped__}return S.__wrapped__=u,f},I.prototype.reverse=function n1(){var u=this.__wrapped__;if(u instanceof Rn){var f=u;return this.__actions__.length&&(f=new Rn(this)),(f=f.reverse()).__actions__.push({func:Ip,args:[lv],thisArg:z}),new Ai(f,this.__chain__)}return this.thru(lv)},I.prototype.toJSON=I.prototype.valueOf=I.prototype.value=function IF(){return ya(this.__wrapped__,this.__actions__)},I.prototype.first=I.prototype.head,nh&&(I.prototype[nh]=function Yd(){return this}),I}();Sr._=ys,(dn=function(){return ys}.call(Hs,ps,Hs,No))!==z&&(No.exports=dn)}.call(this)},738:function(No){var Hs;No.exports=((Hs=function(){function ps(Ci){return Br.appendChild(Ci.dom),Ci}function dn(Ci){for(var Si=0;SiQt+1e3&&(Dl.update(1e3*Un/(Ci-Qt),100),Qt=Ci,Un=0,$s)){var Si=performance.memory;$s.update(Si.usedJSHeapSize/1048576,Si.jsHeapSizeLimit/1048576)}return Ci},update:function(){Kr=this.end()},domElement:Br,setMode:dn}}).Panel=function(ps,dn,z){var Br=1/0,Kr=0,Qt=Math.round,Un=Qt(window.devicePixelRatio||1),Dl=80*Un,za=48*Un,$s=3*Un,Ci=2*Un,Si=3*Un,ms=15*Un,Gs=74*Un,Ws=30*Un,Bo=document.createElement("canvas");Bo.width=Dl,Bo.height=za,Bo.style.cssText="width:80px;height:48px";var On=Bo.getContext("2d");return On.font="bold "+9*Un+"px Helvetica,Arial,sans-serif",On.textBaseline="top",On.fillStyle=z,On.fillRect(0,0,Dl,za),On.fillStyle=dn,On.fillText(ps,$s,Ci),On.fillRect(Si,ms,Gs,Ws),On.fillStyle=z,On.globalAlpha=.9,On.fillRect(Si,ms,Gs,Ws),{dom:Bo,update:function(ur,mc){Br=Math.min(Br,ur),Kr=Math.max(Kr,ur),On.fillStyle=z,On.globalAlpha=1,On.fillRect(0,0,Dl,ms),On.fillStyle=dn,On.fillText(Qt(ur)+" "+ps+" ("+Qt(Br)+"-"+Qt(Kr)+")",$s,Ci),On.drawImage(Bo,Si+Un,ms,Gs-Un,Ws,Si,ms,Gs-Un,Ws),On.fillRect(Si+Gs-Un,ms,Un,Ws),On.fillStyle=z,On.globalAlpha=.9,On.fillRect(Si+Gs-Un,ms,Un,Qt((1-ur/mc)*Ws))}}},Hs)}},No=>{No(No.s=360)}]); \ No newline at end of file diff --git a/frontend/dist/gui/styles.9650df2468906825.css b/frontend/dist/gui/styles.ef24d245995f07a6.css similarity index 99% rename from frontend/dist/gui/styles.9650df2468906825.css rename to frontend/dist/gui/styles.ef24d245995f07a6.css index eda4f43..d914af5 100644 --- a/frontend/dist/gui/styles.9650df2468906825.css +++ b/frontend/dist/gui/styles.ef24d245995f07a6.css @@ -1 +1 @@ -.mat-ripple{overflow:hidden;position:relative}.mat-ripple:not(:empty){transform:translateZ(0)}.mat-ripple.mat-ripple-unbounded{overflow:visible}.mat-ripple-element{position:absolute;border-radius:50%;pointer-events:none;transition:opacity,transform 0ms cubic-bezier(0,0,.2,1);transform:scale3d(0,0,0)}.cdk-high-contrast-active .mat-ripple-element{display:none}.cdk-visually-hidden{border:0;clip:rect(0 0 0 0);height:1px;margin:-1px;overflow:hidden;padding:0;position:absolute;width:1px;white-space:nowrap;outline:0;-webkit-appearance:none;-moz-appearance:none;left:0}[dir=rtl] .cdk-visually-hidden{left:auto;right:0}.cdk-overlay-container,.cdk-global-overlay-wrapper{pointer-events:none;top:0;left:0;height:100%;width:100%}.cdk-overlay-container{position:fixed;z-index:1000}.cdk-overlay-container:empty{display:none}.cdk-global-overlay-wrapper{display:flex;position:absolute;z-index:1000}.cdk-overlay-pane{position:absolute;pointer-events:auto;box-sizing:border-box;z-index:1000;display:flex;max-width:100%;max-height:100%}.cdk-overlay-backdrop{position:absolute;inset:0;z-index:1000;pointer-events:auto;-webkit-tap-highlight-color:rgba(0,0,0,0);transition:opacity .4s cubic-bezier(.25,.8,.25,1);opacity:0}.cdk-overlay-backdrop.cdk-overlay-backdrop-showing{opacity:1}.cdk-high-contrast-active .cdk-overlay-backdrop.cdk-overlay-backdrop-showing{opacity:.6}.cdk-overlay-dark-backdrop{background:rgba(0,0,0,.32)}.cdk-overlay-transparent-backdrop{transition:visibility 1ms linear,opacity 1ms linear;visibility:hidden;opacity:1}.cdk-overlay-transparent-backdrop.cdk-overlay-backdrop-showing{opacity:0;visibility:visible}.cdk-overlay-backdrop-noop-animation{transition:none}.cdk-overlay-connected-position-bounding-box{position:absolute;z-index:1000;display:flex;flex-direction:column;min-width:1px;min-height:1px}.cdk-global-scrollblock{position:fixed;width:100%;overflow-y:scroll}textarea.cdk-textarea-autosize{resize:none}textarea.cdk-textarea-autosize-measuring{padding:2px 0!important;box-sizing:content-box!important;height:auto!important;overflow:hidden!important}textarea.cdk-textarea-autosize-measuring-firefox{padding:2px 0!important;box-sizing:content-box!important;height:0!important}@keyframes cdk-text-field-autofill-start{}@keyframes cdk-text-field-autofill-end{}.cdk-text-field-autofill-monitored:-webkit-autofill{animation:cdk-text-field-autofill-start 0s 1ms}.cdk-text-field-autofill-monitored:not(:-webkit-autofill){animation:cdk-text-field-autofill-end 0s 1ms}.mat-focus-indicator{position:relative}.mat-focus-indicator:before{inset:0;position:absolute;box-sizing:border-box;pointer-events:none;display:var(--mat-focus-indicator-display, none);border:var(--mat-focus-indicator-border-width, 3px) var(--mat-focus-indicator-border-style, solid) var(--mat-focus-indicator-border-color, transparent);border-radius:var(--mat-focus-indicator-border-radius, 4px)}.mat-focus-indicator:focus:before{content:""}.cdk-high-contrast-active{--mat-focus-indicator-display: block}.mat-mdc-focus-indicator{position:relative}.mat-mdc-focus-indicator:before{inset:0;position:absolute;box-sizing:border-box;pointer-events:none;display:var(--mat-mdc-focus-indicator-display, none);border:var(--mat-mdc-focus-indicator-border-width, 3px) var(--mat-mdc-focus-indicator-border-style, solid) var(--mat-mdc-focus-indicator-border-color, transparent);border-radius:var(--mat-mdc-focus-indicator-border-radius, 4px)}.mat-mdc-focus-indicator:focus:before{content:""}.cdk-high-contrast-active{--mat-mdc-focus-indicator-display: block}.mat-ripple-element{background-color:#0000001a}.mat-mdc-option{color:var(--mdc-theme-text-primary-on-background, rgba(0, 0, 0, .87))}.mat-mdc-option:hover:not(.mdc-list-item--disabled),.mat-mdc-option:focus:not(.mdc-list-item--disabled),.mat-mdc-option.mat-mdc-option-active,.mat-mdc-option.mdc-list-item--selected:not(.mat-mdc-option-multiple):not(.mdc-list-item--disabled){background:rgba(0,0,0,.04)}.mat-primary .mat-mdc-option.mdc-list-item--selected:not(.mdc-list-item--disabled) .mdc-list-item__primary-text{color:var(--mdc-theme-primary, #3f51b5)}.mat-accent .mat-mdc-option.mdc-list-item--selected:not(.mdc-list-item--disabled) .mdc-list-item__primary-text{color:var(--mdc-theme-secondary, #ff4081)}.mat-warn .mat-mdc-option.mdc-list-item--selected:not(.mdc-list-item--disabled) .mdc-list-item__primary-text{color:var(--mdc-theme-error, #f44336)}.mat-mdc-optgroup-label{color:var(--mdc-theme-text-primary-on-background, rgba(0, 0, 0, .87))}.mat-pseudo-checkbox-full{color:#0000008a}.mat-pseudo-checkbox-full.mat-pseudo-checkbox-disabled{color:#b0b0b0}.mat-primary .mat-pseudo-checkbox-checked.mat-pseudo-checkbox-minimal:after,.mat-primary .mat-pseudo-checkbox-indeterminate.mat-pseudo-checkbox-minimal:after{color:#3f51b5}.mat-primary .mat-pseudo-checkbox-checked.mat-pseudo-checkbox-full,.mat-primary .mat-pseudo-checkbox-indeterminate.mat-pseudo-checkbox-full{background:#3f51b5}.mat-primary .mat-pseudo-checkbox-checked.mat-pseudo-checkbox-full:after,.mat-primary .mat-pseudo-checkbox-indeterminate.mat-pseudo-checkbox-full:after{color:#fafafa}.mat-pseudo-checkbox-checked.mat-pseudo-checkbox-minimal:after,.mat-pseudo-checkbox-indeterminate.mat-pseudo-checkbox-minimal:after{color:#ff4081}.mat-pseudo-checkbox-checked.mat-pseudo-checkbox-full,.mat-pseudo-checkbox-indeterminate.mat-pseudo-checkbox-full{background:#ff4081}.mat-pseudo-checkbox-checked.mat-pseudo-checkbox-full:after,.mat-pseudo-checkbox-indeterminate.mat-pseudo-checkbox-full:after{color:#fafafa}.mat-accent .mat-pseudo-checkbox-checked.mat-pseudo-checkbox-minimal:after,.mat-accent .mat-pseudo-checkbox-indeterminate.mat-pseudo-checkbox-minimal:after{color:#ff4081}.mat-accent .mat-pseudo-checkbox-checked.mat-pseudo-checkbox-full,.mat-accent .mat-pseudo-checkbox-indeterminate.mat-pseudo-checkbox-full{background:#ff4081}.mat-accent .mat-pseudo-checkbox-checked.mat-pseudo-checkbox-full:after,.mat-accent .mat-pseudo-checkbox-indeterminate.mat-pseudo-checkbox-full:after{color:#fafafa}.mat-warn .mat-pseudo-checkbox-checked.mat-pseudo-checkbox-minimal:after,.mat-warn .mat-pseudo-checkbox-indeterminate.mat-pseudo-checkbox-minimal:after{color:#f44336}.mat-warn .mat-pseudo-checkbox-checked.mat-pseudo-checkbox-full,.mat-warn .mat-pseudo-checkbox-indeterminate.mat-pseudo-checkbox-full{background:#f44336}.mat-warn .mat-pseudo-checkbox-checked.mat-pseudo-checkbox-full:after,.mat-warn .mat-pseudo-checkbox-indeterminate.mat-pseudo-checkbox-full:after{color:#fafafa}.mat-pseudo-checkbox-disabled.mat-pseudo-checkbox-checked.mat-pseudo-checkbox-minimal:after,.mat-pseudo-checkbox-disabled.mat-pseudo-checkbox-indeterminate.mat-pseudo-checkbox-minimal:after{color:#b0b0b0}.mat-pseudo-checkbox-disabled.mat-pseudo-checkbox-checked.mat-pseudo-checkbox-full,.mat-pseudo-checkbox-disabled.mat-pseudo-checkbox-indeterminate.mat-pseudo-checkbox-full{background:#b0b0b0}.mat-app-background{background-color:#fafafa;color:#000000de}.mat-elevation-z0,.mat-mdc-elevation-specific.mat-elevation-z0{box-shadow:0 0 #0003,0 0 #00000024,0 0 #0000001f}.mat-elevation-z1,.mat-mdc-elevation-specific.mat-elevation-z1{box-shadow:0 2px 1px -1px #0003,0 1px 1px #00000024,0 1px 3px #0000001f}.mat-elevation-z2,.mat-mdc-elevation-specific.mat-elevation-z2{box-shadow:0 3px 1px -2px #0003,0 2px 2px #00000024,0 1px 5px #0000001f}.mat-elevation-z3,.mat-mdc-elevation-specific.mat-elevation-z3{box-shadow:0 3px 3px -2px #0003,0 3px 4px #00000024,0 1px 8px #0000001f}.mat-elevation-z4,.mat-mdc-elevation-specific.mat-elevation-z4{box-shadow:0 2px 4px -1px #0003,0 4px 5px #00000024,0 1px 10px #0000001f}.mat-elevation-z5,.mat-mdc-elevation-specific.mat-elevation-z5{box-shadow:0 3px 5px -1px #0003,0 5px 8px #00000024,0 1px 14px #0000001f}.mat-elevation-z6,.mat-mdc-elevation-specific.mat-elevation-z6{box-shadow:0 3px 5px -1px #0003,0 6px 10px #00000024,0 1px 18px #0000001f}.mat-elevation-z7,.mat-mdc-elevation-specific.mat-elevation-z7{box-shadow:0 4px 5px -2px #0003,0 7px 10px 1px #00000024,0 2px 16px 1px #0000001f}.mat-elevation-z8,.mat-mdc-elevation-specific.mat-elevation-z8{box-shadow:0 5px 5px -3px #0003,0 8px 10px 1px #00000024,0 3px 14px 2px #0000001f}.mat-elevation-z9,.mat-mdc-elevation-specific.mat-elevation-z9{box-shadow:0 5px 6px -3px #0003,0 9px 12px 1px #00000024,0 3px 16px 2px #0000001f}.mat-elevation-z10,.mat-mdc-elevation-specific.mat-elevation-z10{box-shadow:0 6px 6px -3px #0003,0 10px 14px 1px #00000024,0 4px 18px 3px #0000001f}.mat-elevation-z11,.mat-mdc-elevation-specific.mat-elevation-z11{box-shadow:0 6px 7px -4px #0003,0 11px 15px 1px #00000024,0 4px 20px 3px #0000001f}.mat-elevation-z12,.mat-mdc-elevation-specific.mat-elevation-z12{box-shadow:0 7px 8px -4px #0003,0 12px 17px 2px #00000024,0 5px 22px 4px #0000001f}.mat-elevation-z13,.mat-mdc-elevation-specific.mat-elevation-z13{box-shadow:0 7px 8px -4px #0003,0 13px 19px 2px #00000024,0 5px 24px 4px #0000001f}.mat-elevation-z14,.mat-mdc-elevation-specific.mat-elevation-z14{box-shadow:0 7px 9px -4px #0003,0 14px 21px 2px #00000024,0 5px 26px 4px #0000001f}.mat-elevation-z15,.mat-mdc-elevation-specific.mat-elevation-z15{box-shadow:0 8px 9px -5px #0003,0 15px 22px 2px #00000024,0 6px 28px 5px #0000001f}.mat-elevation-z16,.mat-mdc-elevation-specific.mat-elevation-z16{box-shadow:0 8px 10px -5px #0003,0 16px 24px 2px #00000024,0 6px 30px 5px #0000001f}.mat-elevation-z17,.mat-mdc-elevation-specific.mat-elevation-z17{box-shadow:0 8px 11px -5px #0003,0 17px 26px 2px #00000024,0 6px 32px 5px #0000001f}.mat-elevation-z18,.mat-mdc-elevation-specific.mat-elevation-z18{box-shadow:0 9px 11px -5px #0003,0 18px 28px 2px #00000024,0 7px 34px 6px #0000001f}.mat-elevation-z19,.mat-mdc-elevation-specific.mat-elevation-z19{box-shadow:0 9px 12px -6px #0003,0 19px 29px 2px #00000024,0 7px 36px 6px #0000001f}.mat-elevation-z20,.mat-mdc-elevation-specific.mat-elevation-z20{box-shadow:0 10px 13px -6px #0003,0 20px 31px 3px #00000024,0 8px 38px 7px #0000001f}.mat-elevation-z21,.mat-mdc-elevation-specific.mat-elevation-z21{box-shadow:0 10px 13px -6px #0003,0 21px 33px 3px #00000024,0 8px 40px 7px #0000001f}.mat-elevation-z22,.mat-mdc-elevation-specific.mat-elevation-z22{box-shadow:0 10px 14px -6px #0003,0 22px 35px 3px #00000024,0 8px 42px 7px #0000001f}.mat-elevation-z23,.mat-mdc-elevation-specific.mat-elevation-z23{box-shadow:0 11px 14px -7px #0003,0 23px 36px 3px #00000024,0 9px 44px 8px #0000001f}.mat-elevation-z24,.mat-mdc-elevation-specific.mat-elevation-z24{box-shadow:0 11px 15px -7px #0003,0 24px 38px 3px #00000024,0 9px 46px 8px #0000001f}.mat-theme-loaded-marker{display:none}.mat-mdc-option{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;font-family:var(--mdc-typography-body1-font-family, var(--mdc-typography-font-family, Roboto, sans-serif));font-size:var(--mdc-typography-body1-font-size, 16px);line-height:var(--mdc-typography-body1-line-height, 24px);font-weight:var(--mdc-typography-body1-font-weight, 400);letter-spacing:var(--mdc-typography-body1-letter-spacing, .03125em)}.mat-mdc-card{box-shadow:0 2px 1px -1px #0003,0 1px 1px #00000024,0 1px 3px #0000001f;--mdc-elevated-card-container-color:#fff}.mat-mdc-card-outlined{box-shadow:0 0 #0003,0 0 #00000024,0 0 #0000001f;--mdc-outlined-card-outline-color:#e0e0e0}.mat-mdc-card-subtitle{color:#0000008a}.mat-mdc-card-title{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;font-family:var(--mdc-typography-headline6-font-family, var(--mdc-typography-font-family, Roboto, sans-serif));font-size:var(--mdc-typography-headline6-font-size, 20px);line-height:var(--mdc-typography-headline6-line-height, 32px);font-weight:var(--mdc-typography-headline6-font-weight, 500);letter-spacing:var(--mdc-typography-headline6-letter-spacing, .0125em);-webkit-text-decoration:var(--mdc-typography-headline6-text-decoration, inherit);text-decoration:var(--mdc-typography-headline6-text-decoration, inherit);text-transform:var(--mdc-typography-headline6-text-transform, none)}.mat-mdc-card-subtitle{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;font-family:var(--mdc-typography-subtitle2-font-family, var(--mdc-typography-font-family, Roboto, sans-serif));font-size:var(--mdc-typography-subtitle2-font-size, 14px);line-height:var(--mdc-typography-subtitle2-line-height, 22px);font-weight:var(--mdc-typography-subtitle2-font-weight, 500);letter-spacing:var(--mdc-typography-subtitle2-letter-spacing, .0071428571em);-webkit-text-decoration:var(--mdc-typography-subtitle2-text-decoration, inherit);text-decoration:var(--mdc-typography-subtitle2-text-decoration, inherit);text-transform:var(--mdc-typography-subtitle2-text-transform, none)}.mat-mdc-progress-bar{--mdc-linear-progress-active-indicator-color:#3f51b5}.mat-mdc-progress-bar .mdc-linear-progress__buffer-dots{background-image:url("data:image/svg+xml,%3Csvg version='1.1' xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink' x='0px' y='0px' enable-background='new 0 0 5 2' xml:space='preserve' viewBox='0 0 5 2' preserveAspectRatio='none slice'%3E%3Ccircle cx='1' cy='1' r='1' fill='rgba(63, 81, 181, 0.25)'/%3E%3C/svg%3E")}.mat-mdc-progress-bar .mdc-linear-progress__buffer-bar{background-color:#3f51b540}.mat-mdc-progress-bar.mat-accent{--mdc-linear-progress-active-indicator-color:#ff4081}.mat-mdc-progress-bar.mat-accent .mdc-linear-progress__buffer-dots{background-image:url("data:image/svg+xml,%3Csvg version='1.1' xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink' x='0px' y='0px' enable-background='new 0 0 5 2' xml:space='preserve' viewBox='0 0 5 2' preserveAspectRatio='none slice'%3E%3Ccircle cx='1' cy='1' r='1' fill='rgba(255, 64, 129, 0.25)'/%3E%3C/svg%3E")}.mat-mdc-progress-bar.mat-accent .mdc-linear-progress__buffer-bar{background-color:#ff408140}.mat-mdc-progress-bar.mat-warn{--mdc-linear-progress-active-indicator-color:#f44336}.mat-mdc-progress-bar.mat-warn .mdc-linear-progress__buffer-dots{background-image:url("data:image/svg+xml,%3Csvg version='1.1' xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink' x='0px' y='0px' enable-background='new 0 0 5 2' xml:space='preserve' viewBox='0 0 5 2' preserveAspectRatio='none slice'%3E%3Ccircle cx='1' cy='1' r='1' fill='rgba(244, 67, 54, 0.25)'/%3E%3C/svg%3E")}.mat-mdc-progress-bar.mat-warn .mdc-linear-progress__buffer-bar{background-color:#f4433640}.mat-mdc-tooltip{--mdc-plain-tooltip-container-color:#616161;--mdc-plain-tooltip-supporting-text-color:white}.mat-mdc-tooltip{--mdc-plain-tooltip-supporting-text-font:Roboto, sans-serif;--mdc-plain-tooltip-supporting-text-size:12px;--mdc-plain-tooltip-supporting-text-weight:400;--mdc-plain-tooltip-supporting-text-tracking:.0333333333em}.mdc-text-field:not(.mdc-text-field--disabled) .mdc-floating-label{color:#0009}.mdc-text-field:not(.mdc-text-field--disabled) .mdc-text-field__input{color:#000000de}@media all{.mdc-text-field:not(.mdc-text-field--disabled) .mdc-text-field__input::placeholder{color:#0009}}@media all{.mdc-text-field:not(.mdc-text-field--disabled) .mdc-text-field__input:-ms-input-placeholder{color:#0009}}.mdc-text-field .mdc-text-field__input{caret-color:var(--mdc-theme-primary, #3f51b5)}.mdc-text-field:not(.mdc-text-field--disabled)+.mdc-text-field-helper-line .mdc-text-field-helper-text{color:#0009}.mdc-text-field:not(.mdc-text-field--disabled) .mdc-text-field-character-counter,.mdc-text-field:not(.mdc-text-field--disabled)+.mdc-text-field-helper-line .mdc-text-field-character-counter{color:#0009}.mdc-text-field:not(.mdc-text-field--disabled) .mdc-text-field__icon--leading{color:#0000008a}.mdc-text-field:not(.mdc-text-field--disabled) .mdc-text-field__icon--trailing{color:#0000008a}.mdc-text-field:not(.mdc-text-field--disabled) .mdc-text-field__affix--prefix{color:#0009}.mdc-text-field:not(.mdc-text-field--disabled) .mdc-text-field__affix--suffix{color:#0009}.mdc-text-field--filled .mdc-text-field__ripple:before,.mdc-text-field--filled .mdc-text-field__ripple:after{background-color:var(--mdc-ripple-color, rgba(0, 0, 0, .87))}.mdc-text-field--filled:hover .mdc-text-field__ripple:before,.mdc-text-field--filled.mdc-ripple-surface--hover .mdc-text-field__ripple:before{opacity:var(--mdc-ripple-hover-opacity, .04)}.mdc-text-field--filled.mdc-ripple-upgraded--background-focused .mdc-text-field__ripple:before,.mdc-text-field--filled:not(.mdc-ripple-upgraded):focus .mdc-text-field__ripple:before{opacity:var(--mdc-ripple-focus-opacity, .12)}.mdc-text-field--filled:not(.mdc-text-field--disabled){background-color:#f5f5f5}.mdc-text-field--filled:not(.mdc-text-field--disabled) .mdc-line-ripple:before{border-bottom-color:#0000006b}.mdc-text-field--filled:not(.mdc-text-field--disabled):hover .mdc-line-ripple:before{border-bottom-color:#000000de}.mdc-text-field--filled .mdc-line-ripple:after{border-bottom-color:var(--mdc-theme-primary, #3f51b5)}.mdc-text-field--outlined:not(.mdc-text-field--disabled) .mdc-notched-outline__leading,.mdc-text-field--outlined:not(.mdc-text-field--disabled) .mdc-notched-outline__notch,.mdc-text-field--outlined:not(.mdc-text-field--disabled) .mdc-notched-outline__trailing{border-color:#00000061}.mdc-text-field--outlined:not(.mdc-text-field--disabled):not(.mdc-text-field--focused):hover .mdc-notched-outline .mdc-notched-outline__leading,.mdc-text-field--outlined:not(.mdc-text-field--disabled):not(.mdc-text-field--focused):hover .mdc-notched-outline .mdc-notched-outline__notch,.mdc-text-field--outlined:not(.mdc-text-field--disabled):not(.mdc-text-field--focused):hover .mdc-notched-outline .mdc-notched-outline__trailing{border-color:#000000de}.mdc-text-field--outlined:not(.mdc-text-field--disabled).mdc-text-field--focused .mdc-notched-outline__leading,.mdc-text-field--outlined:not(.mdc-text-field--disabled).mdc-text-field--focused .mdc-notched-outline__notch,.mdc-text-field--outlined:not(.mdc-text-field--disabled).mdc-text-field--focused .mdc-notched-outline__trailing{border-color:var(--mdc-theme-primary, #3f51b5)}.mdc-text-field--outlined .mdc-text-field__ripple:before,.mdc-text-field--outlined .mdc-text-field__ripple:after{background-color:var(--mdc-ripple-color, transparent)}.mdc-text-field--focused:not(.mdc-text-field--disabled) .mdc-floating-label{color:#3f51b5de}.mdc-text-field--invalid:not(.mdc-text-field--disabled):hover .mdc-line-ripple:before{border-bottom-color:var(--mdc-theme-error, #f44336)}.mdc-text-field--invalid:not(.mdc-text-field--disabled) .mdc-line-ripple:after{border-bottom-color:var(--mdc-theme-error, #f44336)}.mdc-text-field--invalid:not(.mdc-text-field--disabled) .mdc-floating-label{color:var(--mdc-theme-error, #f44336)}.mdc-text-field--invalid:not(.mdc-text-field--disabled).mdc-text-field--invalid+.mdc-text-field-helper-line .mdc-text-field-helper-text--validation-msg{color:var(--mdc-theme-error, #f44336)}.mdc-text-field--invalid .mdc-text-field__input{caret-color:var(--mdc-theme-error, #f44336)}.mdc-text-field--invalid:not(.mdc-text-field--disabled) .mdc-text-field__icon--trailing{color:var(--mdc-theme-error, #f44336)}.mdc-text-field--invalid:not(.mdc-text-field--disabled) .mdc-line-ripple:before{border-bottom-color:var(--mdc-theme-error, #f44336)}.mdc-text-field--invalid:not(.mdc-text-field--disabled) .mdc-notched-outline__leading,.mdc-text-field--invalid:not(.mdc-text-field--disabled) .mdc-notched-outline__notch,.mdc-text-field--invalid:not(.mdc-text-field--disabled) .mdc-notched-outline__trailing{border-color:var(--mdc-theme-error, #f44336)}.mdc-text-field--invalid:not(.mdc-text-field--disabled):not(.mdc-text-field--focused):hover .mdc-notched-outline .mdc-notched-outline__leading,.mdc-text-field--invalid:not(.mdc-text-field--disabled):not(.mdc-text-field--focused):hover .mdc-notched-outline .mdc-notched-outline__notch,.mdc-text-field--invalid:not(.mdc-text-field--disabled):not(.mdc-text-field--focused):hover .mdc-notched-outline .mdc-notched-outline__trailing{border-color:var(--mdc-theme-error, #f44336)}.mdc-text-field--invalid:not(.mdc-text-field--disabled).mdc-text-field--focused .mdc-notched-outline__leading,.mdc-text-field--invalid:not(.mdc-text-field--disabled).mdc-text-field--focused .mdc-notched-outline__notch,.mdc-text-field--invalid:not(.mdc-text-field--disabled).mdc-text-field--focused .mdc-notched-outline__trailing{border-color:var(--mdc-theme-error, #f44336)}.mdc-text-field--disabled .mdc-text-field__input{color:#00000061}@media all{.mdc-text-field--disabled .mdc-text-field__input::placeholder{color:#00000061}}@media all{.mdc-text-field--disabled .mdc-text-field__input:-ms-input-placeholder{color:#00000061}}.mdc-text-field--disabled .mdc-floating-label{color:#00000061}.mdc-text-field--disabled+.mdc-text-field-helper-line .mdc-text-field-helper-text{color:#00000061}.mdc-text-field--disabled .mdc-text-field-character-counter,.mdc-text-field--disabled+.mdc-text-field-helper-line .mdc-text-field-character-counter{color:#00000061}.mdc-text-field--disabled .mdc-text-field__icon--leading,.mdc-text-field--disabled .mdc-text-field__icon--trailing{color:#0000004d}.mdc-text-field--disabled .mdc-text-field__affix--prefix,.mdc-text-field--disabled .mdc-text-field__affix--suffix{color:#00000061}.mdc-text-field--disabled .mdc-line-ripple:before{border-bottom-color:#0000000f}.mdc-text-field--disabled .mdc-notched-outline__leading,.mdc-text-field--disabled .mdc-notched-outline__notch,.mdc-text-field--disabled .mdc-notched-outline__trailing{border-color:#0000000f}@media screen and (forced-colors: active),(-ms-high-contrast: active){.mdc-text-field--disabled .mdc-text-field__input::placeholder{color:GrayText}}@media screen and (forced-colors: active),(-ms-high-contrast: active){.mdc-text-field--disabled .mdc-text-field__input:-ms-input-placeholder{color:GrayText}}@media screen and (forced-colors: active),(-ms-high-contrast: active){.mdc-text-field--disabled .mdc-floating-label{color:GrayText}}@media screen and (forced-colors: active),(-ms-high-contrast: active){.mdc-text-field--disabled+.mdc-text-field-helper-line .mdc-text-field-helper-text{color:GrayText}}@media screen and (forced-colors: active),(-ms-high-contrast: active){.mdc-text-field--disabled .mdc-text-field-character-counter,.mdc-text-field--disabled+.mdc-text-field-helper-line .mdc-text-field-character-counter{color:GrayText}}@media screen and (forced-colors: active),(-ms-high-contrast: active){.mdc-text-field--disabled .mdc-text-field__icon--leading{color:GrayText}}@media screen and (forced-colors: active),(-ms-high-contrast: active){.mdc-text-field--disabled .mdc-text-field__icon--trailing{color:GrayText}}@media screen and (forced-colors: active),(-ms-high-contrast: active){.mdc-text-field--disabled .mdc-text-field__affix--prefix{color:GrayText}}@media screen and (forced-colors: active),(-ms-high-contrast: active){.mdc-text-field--disabled .mdc-text-field__affix--suffix{color:GrayText}}@media screen and (forced-colors: active),(-ms-high-contrast: active){.mdc-text-field--disabled .mdc-line-ripple:before{border-bottom-color:GrayText}}@media screen and (forced-colors: active),(-ms-high-contrast: active){.mdc-text-field--disabled .mdc-notched-outline__leading,.mdc-text-field--disabled .mdc-notched-outline__notch,.mdc-text-field--disabled .mdc-notched-outline__trailing{border-color:GrayText}}.mdc-text-field--disabled.mdc-text-field--filled{background-color:#fafafa}.mat-mdc-form-field-error{color:var(--mdc-theme-error, #f44336)}.mat-mdc-form-field-focus-overlay{background-color:#000000de}.mat-mdc-form-field:hover .mat-mdc-form-field-focus-overlay{opacity:.04}.mat-mdc-form-field.mat-focused .mat-mdc-form-field-focus-overlay{opacity:.12}.mat-mdc-form-field-type-mat-native-select .mat-mdc-form-field-infix:after{color:#0000008a}.mat-mdc-form-field-type-mat-native-select.mat-focused.mat-primary .mat-mdc-form-field-infix:after{color:#3f51b5de}.mat-mdc-form-field-type-mat-native-select.mat-focused.mat-accent .mat-mdc-form-field-infix:after{color:#ff4081de}.mat-mdc-form-field-type-mat-native-select.mat-focused.mat-warn .mat-mdc-form-field-infix:after{color:#f44336de}.mat-mdc-form-field-type-mat-native-select.mat-form-field-disabled .mat-mdc-form-field-infix:after{color:#00000061}.mat-mdc-form-field.mat-accent .mdc-text-field__input{caret-color:var(--mdc-theme-secondary, #ff4081)}.mat-mdc-form-field.mat-accent:not(.mdc-text-field--disabled) .mdc-line-ripple:after{border-bottom-color:var(--mdc-theme-secondary, #ff4081)}.mat-mdc-form-field.mat-accent .mdc-text-field--focused:not(.mdc-text-field--disabled) .mdc-floating-label{color:#ff4081de}.mat-mdc-form-field.mat-accent .mdc-text-field--invalid:not(.mdc-text-field--disabled):hover .mdc-line-ripple:before{border-bottom-color:var(--mdc-theme-error, #f44336)}.mat-mdc-form-field.mat-accent .mdc-text-field--invalid:not(.mdc-text-field--disabled) .mdc-line-ripple:after{border-bottom-color:var(--mdc-theme-error, #f44336)}.mat-mdc-form-field.mat-accent .mdc-text-field--invalid:not(.mdc-text-field--disabled) .mdc-floating-label{color:var(--mdc-theme-error, #f44336)}.mat-mdc-form-field.mat-accent .mdc-text-field--invalid:not(.mdc-text-field--disabled).mdc-text-field--invalid+.mdc-text-field-helper-line .mdc-text-field-helper-text--validation-msg{color:var(--mdc-theme-error, #f44336)}.mat-mdc-form-field.mat-accent .mdc-text-field--invalid .mdc-text-field__input{caret-color:var(--mdc-theme-error, #f44336)}.mat-mdc-form-field.mat-accent .mdc-text-field--invalid:not(.mdc-text-field--disabled) .mdc-text-field__icon--trailing{color:var(--mdc-theme-error, #f44336)}.mat-mdc-form-field.mat-accent .mdc-text-field--invalid:not(.mdc-text-field--disabled) .mdc-line-ripple:before{border-bottom-color:var(--mdc-theme-error, #f44336)}.mat-mdc-form-field.mat-accent .mdc-text-field--invalid:not(.mdc-text-field--disabled) .mdc-notched-outline__leading,.mat-mdc-form-field.mat-accent .mdc-text-field--invalid:not(.mdc-text-field--disabled) .mdc-notched-outline__notch,.mat-mdc-form-field.mat-accent .mdc-text-field--invalid:not(.mdc-text-field--disabled) .mdc-notched-outline__trailing{border-color:var(--mdc-theme-error, #f44336)}.mat-mdc-form-field.mat-accent .mdc-text-field--invalid:not(.mdc-text-field--disabled):not(.mdc-text-field--focused):hover .mdc-notched-outline .mdc-notched-outline__leading,.mat-mdc-form-field.mat-accent .mdc-text-field--invalid:not(.mdc-text-field--disabled):not(.mdc-text-field--focused):hover .mdc-notched-outline .mdc-notched-outline__notch,.mat-mdc-form-field.mat-accent .mdc-text-field--invalid:not(.mdc-text-field--disabled):not(.mdc-text-field--focused):hover .mdc-notched-outline .mdc-notched-outline__trailing{border-color:var(--mdc-theme-error, #f44336)}.mat-mdc-form-field.mat-accent .mdc-text-field--invalid:not(.mdc-text-field--disabled).mdc-text-field--focused .mdc-notched-outline__leading,.mat-mdc-form-field.mat-accent .mdc-text-field--invalid:not(.mdc-text-field--disabled).mdc-text-field--focused .mdc-notched-outline__notch,.mat-mdc-form-field.mat-accent .mdc-text-field--invalid:not(.mdc-text-field--disabled).mdc-text-field--focused .mdc-notched-outline__trailing{border-color:var(--mdc-theme-error, #f44336)}.mat-mdc-form-field.mat-accent .mdc-text-field--outlined:not(.mdc-text-field--disabled).mdc-text-field--focused .mdc-notched-outline__leading,.mat-mdc-form-field.mat-accent .mdc-text-field--outlined:not(.mdc-text-field--disabled).mdc-text-field--focused .mdc-notched-outline__notch,.mat-mdc-form-field.mat-accent .mdc-text-field--outlined:not(.mdc-text-field--disabled).mdc-text-field--focused .mdc-notched-outline__trailing{border-color:var(--mdc-theme-secondary, #ff4081)}.mat-mdc-form-field.mat-warn .mdc-text-field__input{caret-color:var(--mdc-theme-error, #f44336)}.mat-mdc-form-field.mat-warn:not(.mdc-text-field--disabled) .mdc-line-ripple:after{border-bottom-color:var(--mdc-theme-error, #f44336)}.mat-mdc-form-field.mat-warn .mdc-text-field--focused:not(.mdc-text-field--disabled) .mdc-floating-label{color:#f44336de}.mat-mdc-form-field.mat-warn .mdc-text-field--invalid:not(.mdc-text-field--disabled):hover .mdc-line-ripple:before{border-bottom-color:var(--mdc-theme-error, #f44336)}.mat-mdc-form-field.mat-warn .mdc-text-field--invalid:not(.mdc-text-field--disabled) .mdc-line-ripple:after{border-bottom-color:var(--mdc-theme-error, #f44336)}.mat-mdc-form-field.mat-warn .mdc-text-field--invalid:not(.mdc-text-field--disabled) .mdc-floating-label{color:var(--mdc-theme-error, #f44336)}.mat-mdc-form-field.mat-warn .mdc-text-field--invalid:not(.mdc-text-field--disabled).mdc-text-field--invalid+.mdc-text-field-helper-line .mdc-text-field-helper-text--validation-msg{color:var(--mdc-theme-error, #f44336)}.mat-mdc-form-field.mat-warn .mdc-text-field--invalid .mdc-text-field__input{caret-color:var(--mdc-theme-error, #f44336)}.mat-mdc-form-field.mat-warn .mdc-text-field--invalid:not(.mdc-text-field--disabled) .mdc-text-field__icon--trailing{color:var(--mdc-theme-error, #f44336)}.mat-mdc-form-field.mat-warn .mdc-text-field--invalid:not(.mdc-text-field--disabled) .mdc-line-ripple:before{border-bottom-color:var(--mdc-theme-error, #f44336)}.mat-mdc-form-field.mat-warn .mdc-text-field--invalid:not(.mdc-text-field--disabled) .mdc-notched-outline__leading,.mat-mdc-form-field.mat-warn .mdc-text-field--invalid:not(.mdc-text-field--disabled) .mdc-notched-outline__notch,.mat-mdc-form-field.mat-warn .mdc-text-field--invalid:not(.mdc-text-field--disabled) .mdc-notched-outline__trailing{border-color:var(--mdc-theme-error, #f44336)}.mat-mdc-form-field.mat-warn .mdc-text-field--invalid:not(.mdc-text-field--disabled):not(.mdc-text-field--focused):hover .mdc-notched-outline .mdc-notched-outline__leading,.mat-mdc-form-field.mat-warn .mdc-text-field--invalid:not(.mdc-text-field--disabled):not(.mdc-text-field--focused):hover .mdc-notched-outline .mdc-notched-outline__notch,.mat-mdc-form-field.mat-warn .mdc-text-field--invalid:not(.mdc-text-field--disabled):not(.mdc-text-field--focused):hover .mdc-notched-outline .mdc-notched-outline__trailing{border-color:var(--mdc-theme-error, #f44336)}.mat-mdc-form-field.mat-warn .mdc-text-field--invalid:not(.mdc-text-field--disabled).mdc-text-field--focused .mdc-notched-outline__leading,.mat-mdc-form-field.mat-warn .mdc-text-field--invalid:not(.mdc-text-field--disabled).mdc-text-field--focused .mdc-notched-outline__notch,.mat-mdc-form-field.mat-warn .mdc-text-field--invalid:not(.mdc-text-field--disabled).mdc-text-field--focused .mdc-notched-outline__trailing{border-color:var(--mdc-theme-error, #f44336)}.mat-mdc-form-field.mat-warn .mdc-text-field--outlined:not(.mdc-text-field--disabled).mdc-text-field--focused .mdc-notched-outline__leading,.mat-mdc-form-field.mat-warn .mdc-text-field--outlined:not(.mdc-text-field--disabled).mdc-text-field--focused .mdc-notched-outline__notch,.mat-mdc-form-field.mat-warn .mdc-text-field--outlined:not(.mdc-text-field--disabled).mdc-text-field--focused .mdc-notched-outline__trailing{border-color:var(--mdc-theme-error, #f44336)}.mat-mdc-form-field.mat-mdc-form-field.mat-mdc-form-field.mat-mdc-form-field.mat-mdc-form-field .mdc-notched-outline__notch{border-left:1px solid rgba(0,0,0,0)}[dir=rtl] .mat-mdc-form-field.mat-mdc-form-field.mat-mdc-form-field.mat-mdc-form-field.mat-mdc-form-field .mdc-notched-outline__notch{border-left:none;border-right:1px solid rgba(0,0,0,0)}.mat-mdc-form-field-infix{min-height:56px}.mat-mdc-text-field-wrapper .mat-mdc-form-field-flex .mat-mdc-floating-label{top:28px}.mat-mdc-text-field-wrapper.mdc-text-field--outlined .mdc-notched-outline--upgraded .mdc-floating-label--float-above{--mat-mdc-form-field-label-transform: translateY( -34.75px) scale(var(--mat-mdc-form-field-floating-label-scale, .75));transform:var(--mat-mdc-form-field-label-transform)}.mat-mdc-text-field-wrapper.mdc-text-field--outlined .mat-mdc-form-field-infix{padding-top:16px;padding-bottom:16px}.mat-mdc-text-field-wrapper:not(.mdc-text-field--outlined) .mat-mdc-form-field-infix{padding-top:24px;padding-bottom:8px}.mdc-text-field--no-label:not(.mdc-text-field--outlined):not(.mdc-text-field--textarea) .mat-mdc-form-field-infix{padding-top:16px;padding-bottom:16px}.mdc-text-field__input,.mdc-text-field__affix{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;font-family:var(--mdc-typography-subtitle1-font-family, var(--mdc-typography-font-family, Roboto, sans-serif));font-size:var(--mdc-typography-subtitle1-font-size, 16px);font-weight:var(--mdc-typography-subtitle1-font-weight, 400);letter-spacing:var(--mdc-typography-subtitle1-letter-spacing, .009375em);-webkit-text-decoration:var(--mdc-typography-subtitle1-text-decoration, inherit);text-decoration:var(--mdc-typography-subtitle1-text-decoration, inherit);text-transform:var(--mdc-typography-subtitle1-text-transform, none)}.mdc-text-field--textarea .mdc-text-field__input{line-height:1.5rem}.mdc-floating-label{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;font-family:var(--mdc-typography-subtitle1-font-family, var(--mdc-typography-font-family, Roboto, sans-serif));font-size:var(--mdc-typography-subtitle1-font-size, 16px);font-weight:var(--mdc-typography-subtitle1-font-weight, 400);letter-spacing:var(--mdc-typography-subtitle1-letter-spacing, .009375em);-webkit-text-decoration:var(--mdc-typography-subtitle1-text-decoration, inherit);text-decoration:var(--mdc-typography-subtitle1-text-decoration, inherit);text-transform:var(--mdc-typography-subtitle1-text-transform, none)}.mat-mdc-form-field-subscript-wrapper,.mat-mdc-form-field-bottom-align:before{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;font-family:var(--mdc-typography-caption-font-family, var(--mdc-typography-font-family, Roboto, sans-serif));font-size:var(--mdc-typography-caption-font-size, 12px);line-height:var(--mdc-typography-caption-line-height, 20px);font-weight:var(--mdc-typography-caption-font-weight, 400);letter-spacing:var(--mdc-typography-caption-letter-spacing, .0333333333em);-webkit-text-decoration:var(--mdc-typography-caption-text-decoration, inherit);text-decoration:var(--mdc-typography-caption-text-decoration, inherit);text-transform:var(--mdc-typography-caption-text-transform, none)}.mat-mdc-form-field,.mat-mdc-floating-label{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;font-family:var(--mdc-typography-body1-font-family, var(--mdc-typography-font-family, Roboto, sans-serif));font-size:var(--mdc-typography-body1-font-size, 16px);line-height:var(--mdc-typography-body1-line-height, 24px);font-weight:var(--mdc-typography-body1-font-weight, 400);letter-spacing:var(--mdc-typography-body1-letter-spacing, .03125em);-webkit-text-decoration:var(--mdc-typography-body1-text-decoration, inherit);text-decoration:var(--mdc-typography-body1-text-decoration, inherit);text-transform:var(--mdc-typography-body1-text-transform, none)}.mat-mdc-form-field .mdc-text-field--outlined .mdc-floating-label--float-above{font-size:calc(16px * var(--mat-mdc-form-field-floating-label-scale, .75))}.mat-mdc-form-field .mdc-text-field--outlined .mdc-notched-outline--upgraded .mdc-floating-label--float-above{font-size:16px}.mat-mdc-select-value{color:#000000de}.mat-mdc-select-placeholder{color:#0009}.mat-mdc-select-disabled .mat-mdc-select-value{color:#00000061}.mat-mdc-select-arrow{color:#0000008a}.mat-mdc-form-field.mat-focused.mat-primary .mat-mdc-select-arrow{color:#3f51b5de}.mat-mdc-form-field.mat-focused.mat-accent .mat-mdc-select-arrow{color:#ff4081de}.mat-mdc-form-field.mat-focused.mat-warn .mat-mdc-select-arrow,.mat-mdc-form-field .mat-mdc-select.mat-mdc-select-invalid .mat-mdc-select-arrow{color:#f44336de}.mat-mdc-form-field .mat-mdc-select.mat-mdc-select-disabled .mat-mdc-select-arrow{color:#00000061}.mat-mdc-select-panel{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;font-family:var(--mdc-typography-subtitle1-font-family, var(--mdc-typography-font-family, Roboto, sans-serif));font-size:var(--mdc-typography-subtitle1-font-size, 16px);line-height:var(--mdc-typography-subtitle1-line-height, 28px);font-weight:var(--mdc-typography-subtitle1-font-weight, 400);letter-spacing:var(--mdc-typography-subtitle1-letter-spacing, .009375em);-webkit-text-decoration:var(--mdc-typography-subtitle1-text-decoration, inherit);text-decoration:var(--mdc-typography-subtitle1-text-decoration, inherit);text-transform:var(--mdc-typography-subtitle1-text-transform, none);line-height:24px}.mat-mdc-select{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;font-family:var(--mdc-typography-body1-font-family, var(--mdc-typography-font-family, Roboto, sans-serif));font-size:var(--mdc-typography-body1-font-size, 16px);line-height:var(--mdc-typography-body1-line-height, 24px);font-weight:var(--mdc-typography-body1-font-weight, 400);letter-spacing:var(--mdc-typography-body1-letter-spacing, .03125em);-webkit-text-decoration:var(--mdc-typography-body1-text-decoration, inherit);text-decoration:var(--mdc-typography-body1-text-decoration, inherit);text-transform:var(--mdc-typography-body1-text-transform, none)}.mat-mdc-autocomplete-panel{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;font-family:var(--mdc-typography-subtitle1-font-family, var(--mdc-typography-font-family, Roboto, sans-serif));font-size:var(--mdc-typography-subtitle1-font-size, 16px);line-height:var(--mdc-typography-subtitle1-line-height, 28px);font-weight:var(--mdc-typography-subtitle1-font-weight, 400);letter-spacing:var(--mdc-typography-subtitle1-letter-spacing, .009375em);-webkit-text-decoration:var(--mdc-typography-subtitle1-text-decoration, inherit);text-decoration:var(--mdc-typography-subtitle1-text-decoration, inherit);text-transform:var(--mdc-typography-subtitle1-text-transform, none);line-height:24px}.mat-mdc-dialog-container{--mdc-dialog-container-color:white;--mdc-dialog-with-divider-divider-color:rgba(0, 0, 0, .12);--mdc-dialog-subhead-color:rgba(0, 0, 0, .87);--mdc-dialog-supporting-text-color:rgba(0, 0, 0, .6)}.mat-mdc-dialog-container{--mdc-dialog-subhead-font:Roboto, sans-serif;--mdc-dialog-subhead-line-height:32px;--mdc-dialog-subhead-size:20px;--mdc-dialog-subhead-weight:500;--mdc-dialog-subhead-tracking:.0125em;--mdc-dialog-supporting-text-font:Roboto, sans-serif;--mdc-dialog-supporting-text-line-height:24px;--mdc-dialog-supporting-text-size:16px;--mdc-dialog-supporting-text-weight:400;--mdc-dialog-supporting-text-tracking:.03125em}.mat-mdc-standard-chip{--mdc-chip-elevated-container-color:#e0e0e0;--mdc-chip-elevated-disabled-container-color:#e0e0e0;--mdc-chip-label-text-color:#212121;--mdc-chip-disabled-label-text-color:#212121;--mdc-chip-with-icon-icon-color:#212121;--mdc-chip-with-icon-disabled-icon-color:#212121;--mdc-chip-with-trailing-icon-disabled-trailing-icon-color:#212121;--mdc-chip-with-trailing-icon-trailing-icon-color:#212121;--mdc-chip-with-icon-selected-icon-color:#212121}.mat-mdc-standard-chip.mat-primary.mat-mdc-chip-selected,.mat-mdc-standard-chip.mat-primary.mat-mdc-chip-highlighted{--mdc-chip-elevated-container-color:#3f51b5;--mdc-chip-elevated-disabled-container-color:#3f51b5;--mdc-chip-label-text-color:white;--mdc-chip-disabled-label-text-color:white;--mdc-chip-with-icon-icon-color:white;--mdc-chip-with-icon-disabled-icon-color:white;--mdc-chip-with-trailing-icon-disabled-trailing-icon-color:white;--mdc-chip-with-trailing-icon-trailing-icon-color:white;--mdc-chip-with-icon-selected-icon-color:white}.mat-mdc-standard-chip.mat-accent.mat-mdc-chip-selected,.mat-mdc-standard-chip.mat-accent.mat-mdc-chip-highlighted{--mdc-chip-elevated-container-color:#ff4081;--mdc-chip-elevated-disabled-container-color:#ff4081;--mdc-chip-label-text-color:white;--mdc-chip-disabled-label-text-color:white;--mdc-chip-with-icon-icon-color:white;--mdc-chip-with-icon-disabled-icon-color:white;--mdc-chip-with-trailing-icon-disabled-trailing-icon-color:white;--mdc-chip-with-trailing-icon-trailing-icon-color:white;--mdc-chip-with-icon-selected-icon-color:white}.mat-mdc-standard-chip.mat-warn.mat-mdc-chip-selected,.mat-mdc-standard-chip.mat-warn.mat-mdc-chip-highlighted{--mdc-chip-elevated-container-color:#f44336;--mdc-chip-elevated-disabled-container-color:#f44336;--mdc-chip-label-text-color:white;--mdc-chip-disabled-label-text-color:white;--mdc-chip-with-icon-icon-color:white;--mdc-chip-with-icon-disabled-icon-color:white;--mdc-chip-with-trailing-icon-disabled-trailing-icon-color:white;--mdc-chip-with-trailing-icon-trailing-icon-color:white;--mdc-chip-with-icon-selected-icon-color:white}.mat-mdc-chip-focus-overlay{background:#000}.mat-mdc-chip{height:32px}.mat-mdc-standard-chip{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;font-family:var(--mdc-typography-body2-font-family, var(--mdc-typography-font-family, Roboto, sans-serif));font-size:var(--mdc-typography-body2-font-size, 14px);line-height:var(--mdc-typography-body2-line-height, 20px);font-weight:var(--mdc-typography-body2-font-weight, 400);letter-spacing:var(--mdc-typography-body2-letter-spacing, .0178571429em);-webkit-text-decoration:var(--mdc-typography-body2-text-decoration, inherit);text-decoration:var(--mdc-typography-body2-text-decoration, inherit);text-transform:var(--mdc-typography-body2-text-transform, none)}.mat-mdc-slide-toggle{--mdc-switch-disabled-selected-handle-color:#424242;--mdc-switch-disabled-unselected-handle-color:#424242;--mdc-switch-disabled-selected-track-color:#424242;--mdc-switch-disabled-unselected-track-color:#424242;--mdc-switch-unselected-focus-state-layer-color:#424242;--mdc-switch-unselected-pressed-state-layer-color:#424242;--mdc-switch-unselected-hover-state-layer-color:#424242;--mdc-switch-unselected-focus-track-color:#e0e0e0;--mdc-switch-unselected-hover-track-color:#e0e0e0;--mdc-switch-unselected-pressed-track-color:#e0e0e0;--mdc-switch-unselected-track-color:#e0e0e0;--mdc-switch-unselected-focus-handle-color:#212121;--mdc-switch-unselected-hover-handle-color:#212121;--mdc-switch-unselected-pressed-handle-color:#212121;--mdc-switch-handle-surface-color:var(--mdc-theme-surface, #fff);--mdc-switch-unselected-handle-color:#616161;--mdc-switch-selected-icon-color:#fff;--mdc-switch-disabled-selected-icon-color:#fff;--mdc-switch-disabled-unselected-icon-color:#fff;--mdc-switch-unselected-icon-color:#fff}.mat-mdc-slide-toggle .mdc-form-field{color:var(--mdc-theme-text-primary-on-background, rgba(0, 0, 0, .87))}.mat-mdc-slide-toggle .mdc-switch--disabled+label{color:#00000061}.mat-mdc-slide-toggle.mat-primary{--mdc-switch-selected-focus-state-layer-color:#3949ab;--mdc-switch-selected-handle-color:#3949ab;--mdc-switch-selected-hover-state-layer-color:#3949ab;--mdc-switch-selected-pressed-state-layer-color:#3949ab;--mdc-switch-selected-focus-handle-color:#1a237e;--mdc-switch-selected-hover-handle-color:#1a237e;--mdc-switch-selected-pressed-handle-color:#1a237e;--mdc-switch-selected-focus-track-color:#7986cb;--mdc-switch-selected-hover-track-color:#7986cb;--mdc-switch-selected-pressed-track-color:#7986cb;--mdc-switch-selected-track-color:#7986cb}.mat-mdc-slide-toggle.mat-accent{--mdc-switch-selected-focus-state-layer-color:#d81b60;--mdc-switch-selected-handle-color:#d81b60;--mdc-switch-selected-hover-state-layer-color:#d81b60;--mdc-switch-selected-pressed-state-layer-color:#d81b60;--mdc-switch-selected-focus-handle-color:#880e4f;--mdc-switch-selected-hover-handle-color:#880e4f;--mdc-switch-selected-pressed-handle-color:#880e4f;--mdc-switch-selected-focus-track-color:#f06292;--mdc-switch-selected-hover-track-color:#f06292;--mdc-switch-selected-pressed-track-color:#f06292;--mdc-switch-selected-track-color:#f06292}.mat-mdc-slide-toggle.mat-warn{--mdc-switch-selected-focus-state-layer-color:#e53935;--mdc-switch-selected-handle-color:#e53935;--mdc-switch-selected-hover-state-layer-color:#e53935;--mdc-switch-selected-pressed-state-layer-color:#e53935;--mdc-switch-selected-focus-handle-color:#b71c1c;--mdc-switch-selected-hover-handle-color:#b71c1c;--mdc-switch-selected-pressed-handle-color:#b71c1c;--mdc-switch-selected-focus-track-color:#e57373;--mdc-switch-selected-hover-track-color:#e57373;--mdc-switch-selected-pressed-track-color:#e57373;--mdc-switch-selected-track-color:#e57373}.mat-mdc-slide-toggle{--mdc-switch-state-layer-size:48px}.mat-mdc-radio-button .mdc-form-field{color:var(--mdc-theme-text-primary-on-background, rgba(0, 0, 0, .87))}.mat-mdc-radio-button.mat-primary{--mdc-radio-disabled-selected-icon-color:#000;--mdc-radio-disabled-unselected-icon-color:#000;--mdc-radio-unselected-focus-icon-color:#212121;--mdc-radio-unselected-hover-icon-color:#212121;--mdc-radio-unselected-icon-color:rgba(0, 0, 0, .54);--mdc-radio-unselected-pressed-icon-color:rgba(0, 0, 0, .54);--mdc-radio-selected-focus-icon-color:#3f51b5;--mdc-radio-selected-hover-icon-color:#3f51b5;--mdc-radio-selected-icon-color:#3f51b5;--mdc-radio-selected-pressed-icon-color:#3f51b5;--mat-mdc-radio-ripple-color: #000;--mat-mdc-radio-checked-ripple-color: #3f51b5}.mat-mdc-radio-button.mat-primary .mdc-radio--disabled+label{color:#00000061}.mat-mdc-radio-button.mat-accent{--mdc-radio-disabled-selected-icon-color:#000;--mdc-radio-disabled-unselected-icon-color:#000;--mdc-radio-unselected-focus-icon-color:#212121;--mdc-radio-unselected-hover-icon-color:#212121;--mdc-radio-unselected-icon-color:rgba(0, 0, 0, .54);--mdc-radio-unselected-pressed-icon-color:rgba(0, 0, 0, .54);--mdc-radio-selected-focus-icon-color:#ff4081;--mdc-radio-selected-hover-icon-color:#ff4081;--mdc-radio-selected-icon-color:#ff4081;--mdc-radio-selected-pressed-icon-color:#ff4081;--mat-mdc-radio-ripple-color: #000;--mat-mdc-radio-checked-ripple-color: #ff4081}.mat-mdc-radio-button.mat-accent .mdc-radio--disabled+label{color:#00000061}.mat-mdc-radio-button.mat-warn{--mdc-radio-disabled-selected-icon-color:#000;--mdc-radio-disabled-unselected-icon-color:#000;--mdc-radio-unselected-focus-icon-color:#212121;--mdc-radio-unselected-hover-icon-color:#212121;--mdc-radio-unselected-icon-color:rgba(0, 0, 0, .54);--mdc-radio-unselected-pressed-icon-color:rgba(0, 0, 0, .54);--mdc-radio-selected-focus-icon-color:#f44336;--mdc-radio-selected-hover-icon-color:#f44336;--mdc-radio-selected-icon-color:#f44336;--mdc-radio-selected-pressed-icon-color:#f44336;--mat-mdc-radio-ripple-color: #000;--mat-mdc-radio-checked-ripple-color: #f44336}.mat-mdc-radio-button.mat-warn .mdc-radio--disabled+label{color:#00000061}.mat-mdc-radio-button .mdc-radio{padding:10px}.mat-mdc-radio-button .mdc-radio .mdc-radio__background:before{top:-10px;left:-10px;width:40px;height:40px}.mat-mdc-radio-button .mdc-radio .mdc-radio__native-control{top:0;right:0;left:0;width:40px;height:40px}.mat-mdc-slider{--mdc-slider-label-container-color:black;--mdc-slider-label-label-text-color:white;--mdc-slider-disabled-handle-color:#000;--mdc-slider-disabled-active-track-color:#000;--mdc-slider-disabled-inactive-track-color:#000;--mdc-slider-with-tick-marks-disabled-container-color:#000;--mat-mdc-slider-value-indicator-opacity: .6}.mat-mdc-slider.mat-primary{--mdc-slider-handle-color:#3f51b5;--mdc-slider-focus-handle-color:#3f51b5;--mdc-slider-hover-handle-color:#3f51b5;--mdc-slider-active-track-color:#3f51b5;--mdc-slider-inactive-track-color:#3f51b5;--mdc-slider-with-tick-marks-active-container-color:#fff;--mdc-slider-with-tick-marks-inactive-container-color:#3f51b5;--mat-mdc-slider-ripple-color: #3f51b5;--mat-mdc-slider-hover-ripple-color: rgba(63, 81, 181, .05);--mat-mdc-slider-focus-ripple-color: rgba(63, 81, 181, .2)}.mat-mdc-slider.mat-accent{--mdc-slider-handle-color:#ff4081;--mdc-slider-focus-handle-color:#ff4081;--mdc-slider-hover-handle-color:#ff4081;--mdc-slider-active-track-color:#ff4081;--mdc-slider-inactive-track-color:#ff4081;--mdc-slider-with-tick-marks-active-container-color:#fff;--mdc-slider-with-tick-marks-inactive-container-color:#ff4081;--mat-mdc-slider-ripple-color: #ff4081;--mat-mdc-slider-hover-ripple-color: rgba(255, 64, 129, .05);--mat-mdc-slider-focus-ripple-color: rgba(255, 64, 129, .2)}.mat-mdc-slider.mat-warn{--mdc-slider-handle-color:#f44336;--mdc-slider-focus-handle-color:#f44336;--mdc-slider-hover-handle-color:#f44336;--mdc-slider-active-track-color:#f44336;--mdc-slider-inactive-track-color:#f44336;--mdc-slider-with-tick-marks-active-container-color:#fff;--mdc-slider-with-tick-marks-inactive-container-color:#f44336;--mat-mdc-slider-ripple-color: #f44336;--mat-mdc-slider-hover-ripple-color: rgba(244, 67, 54, .05);--mat-mdc-slider-focus-ripple-color: rgba(244, 67, 54, .2)}.mat-mdc-slider{--mdc-slider-label-label-text-font:Roboto, sans-serif;--mdc-slider-label-label-text-size:14px;--mdc-slider-label-label-text-line-height:22px;--mdc-slider-label-label-text-tracking:.0071428571em;--mdc-slider-label-label-text-weight:500}.mdc-menu-surface{box-shadow:0 5px 5px -3px #0003,0 8px 10px 1px #00000024,0 3px 14px 2px #0000001f;background-color:var(--mdc-theme-surface, #fff);color:var(--mdc-theme-on-surface, #000)}.mdc-list-item__primary-text{color:var(--mdc-theme-text-primary-on-background, rgba(0, 0, 0, .87))}.mdc-list-item__secondary-text{color:var(--mdc-theme-text-secondary-on-background, rgba(0, 0, 0, .54))}.mdc-list-item__overline-text{color:var(--mdc-theme-text-hint-on-background, rgba(0, 0, 0, .38))}.mdc-list-item--with-leading-icon .mdc-list-item__start,.mdc-list-item--with-trailing-icon .mdc-list-item__end{background-color:transparent}.mdc-list-item--with-leading-icon .mdc-list-item__start,.mdc-list-item--with-trailing-icon .mdc-list-item__end{color:var(--mdc-theme-text-icon-on-background, rgba(0, 0, 0, .38))}.mdc-list-item__end{color:var(--mdc-theme-text-hint-on-background, rgba(0, 0, 0, .38))}.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:.38}.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,.mdc-list-item--disabled.mdc-list-item--with-leading-icon .mdc-list-item__start,.mdc-list-item--disabled.mdc-list-item--with-trailing-icon .mdc-list-item__end,.mdc-list-item--disabled.mdc-list-item--with-trailing-meta .mdc-list-item__end{color:var(--mdc-theme-on-surface, #000)}.mdc-list-item--selected .mdc-list-item__primary-text,.mdc-list-item--activated .mdc-list-item__primary-text,.mdc-list-item--selected.mdc-list-item--with-leading-icon .mdc-list-item__start,.mdc-list-item--activated.mdc-list-item--with-leading-icon .mdc-list-item__start{color:var(--mdc-theme-primary, #3f51b5)}.mdc-deprecated-list-group__subheader{color:var(--mdc-theme-text-primary-on-background, rgba(0, 0, 0, .87))}.mdc-list-divider:after{border-bottom-color:#fff}.mdc-list-divider{background-color:#0000001f}.mat-mdc-menu-item[disabled],.mat-mdc-menu-item[disabled] .mat-mdc-menu-submenu-icon,.mat-mdc-menu-item[disabled] .mat-icon-no-color{color:var(--mdc-theme-text-disabled-on-background, rgba(0, 0, 0, .38))}.mat-mdc-menu-item .mat-icon-no-color,.mat-mdc-menu-submenu-icon{color:var(--mdc-theme-text-primary-on-background, rgba(0, 0, 0, .87))}.mat-mdc-menu-item:hover:not([disabled]),.mat-mdc-menu-item.cdk-program-focused:not([disabled]),.mat-mdc-menu-item.cdk-keyboard-focused:not([disabled]),.mat-mdc-menu-item-highlighted:not([disabled]){background:rgba(0,0,0,.04)}.mat-mdc-menu-content{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;font-family:var(--mdc-typography-subtitle1-font-family, var(--mdc-typography-font-family, Roboto, sans-serif));font-size:var(--mdc-typography-subtitle1-font-size, 16px);line-height:var(--mdc-typography-subtitle1-line-height, 28px);font-weight:var(--mdc-typography-subtitle1-font-weight, 400);letter-spacing:var(--mdc-typography-subtitle1-letter-spacing, .009375em);-webkit-text-decoration:var(--mdc-typography-subtitle1-text-decoration, inherit);text-decoration:var(--mdc-typography-subtitle1-text-decoration, inherit);text-transform:var(--mdc-typography-subtitle1-text-transform, none);line-height:24px}.mat-mdc-menu-content,.mat-mdc-menu-content .mat-mdc-menu-item .mdc-list-item__primary-text{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;font-family:var(--mdc-typography-body1-font-family, var(--mdc-typography-font-family, Roboto, sans-serif));font-size:var(--mdc-typography-body1-font-size, 16px);line-height:var(--mdc-typography-body1-line-height, 24px);font-weight:var(--mdc-typography-body1-font-weight, 400);letter-spacing:var(--mdc-typography-body1-letter-spacing, .03125em);-webkit-text-decoration:var(--mdc-typography-body1-text-decoration, inherit);text-decoration:var(--mdc-typography-body1-text-decoration, inherit);text-transform:var(--mdc-typography-body1-text-transform, none)}.mat-mdc-list-base{--mdc-list-list-item-label-text-color:rgba(0, 0, 0, .87);--mdc-list-list-item-supporting-text-color:rgba(0, 0, 0, .54);--mdc-list-list-item-leading-icon-color:rgba(0, 0, 0, .38);--mdc-list-list-item-trailing-supporting-text-color:rgba(0, 0, 0, .38);--mdc-list-list-item-trailing-icon-color:rgba(0, 0, 0, .38);--mdc-list-list-item-selected-trailing-icon-color:rgba(0, 0, 0, .38);--mdc-list-list-item-disabled-label-text-color:black;--mdc-list-list-item-disabled-leading-icon-color:black;--mdc-list-list-item-disabled-trailing-icon-color:black;--mdc-list-list-item-hover-label-text-color:rgba(0, 0, 0, .87);--mdc-list-list-item-hover-leading-icon-color:rgba(0, 0, 0, .38);--mdc-list-list-item-hover-trailing-icon-color:rgba(0, 0, 0, .38);--mdc-list-list-item-focus-label-text-color:rgba(0, 0, 0, .87);--mdc-list-list-item-hover-state-layer-color:black;--mdc-list-list-item-hover-state-layer-opacity:.04;--mdc-list-list-item-focus-state-layer-color:black;--mdc-list-list-item-focus-state-layer-opacity:.12}.mat-mdc-list-option .mdc-list-item__start,.mat-mdc-list-option .mdc-list-item__end{--mdc-checkbox-selected-checkmark-color:#fff;--mdc-checkbox-selected-focus-icon-color:#3f51b5;--mdc-checkbox-selected-hover-icon-color:#3f51b5;--mdc-checkbox-selected-icon-color:#3f51b5;--mdc-checkbox-selected-pressed-icon-color:#3f51b5;--mdc-checkbox-unselected-focus-icon-color:#212121;--mdc-checkbox-unselected-hover-icon-color:#212121;--mdc-checkbox-disabled-selected-icon-color:rgba(0, 0, 0, .38);--mdc-checkbox-disabled-unselected-icon-color:rgba(0, 0, 0, .38);--mdc-checkbox-unselected-icon-color:rgba(0, 0, 0, .54);--mdc-checkbox-unselected-pressed-icon-color:rgba(0, 0, 0, .54)}.mat-mdc-list-option .mdc-list-item__start,.mat-mdc-list-option .mdc-list-item__end{--mdc-radio-disabled-selected-icon-color:#000;--mdc-radio-disabled-unselected-icon-color:#000;--mdc-radio-unselected-focus-icon-color:#212121;--mdc-radio-unselected-hover-icon-color:#212121;--mdc-radio-unselected-icon-color:rgba(0, 0, 0, .54);--mdc-radio-unselected-pressed-icon-color:rgba(0, 0, 0, .54);--mdc-radio-selected-focus-icon-color:#3f51b5;--mdc-radio-selected-hover-icon-color:#3f51b5;--mdc-radio-selected-icon-color:#3f51b5;--mdc-radio-selected-pressed-icon-color:#3f51b5;--mat-mdc-radio-ripple-color: #000;--mat-mdc-radio-checked-ripple-color: #3f51b5}.mat-mdc-list-option .mdc-list-item__start .mdc-radio--disabled+label,.mat-mdc-list-option .mdc-list-item__end .mdc-radio--disabled+label{color:#00000061}.mat-mdc-list-option.mat-accent .mdc-list-item__start,.mat-mdc-list-option.mat-accent .mdc-list-item__end{--mdc-checkbox-selected-checkmark-color:#fff;--mdc-checkbox-selected-focus-icon-color:#ff4081;--mdc-checkbox-selected-hover-icon-color:#ff4081;--mdc-checkbox-selected-icon-color:#ff4081;--mdc-checkbox-selected-pressed-icon-color:#ff4081;--mdc-checkbox-unselected-focus-icon-color:#212121;--mdc-checkbox-unselected-hover-icon-color:#212121;--mdc-checkbox-disabled-selected-icon-color:rgba(0, 0, 0, .38);--mdc-checkbox-disabled-unselected-icon-color:rgba(0, 0, 0, .38);--mdc-checkbox-unselected-icon-color:rgba(0, 0, 0, .54);--mdc-checkbox-unselected-pressed-icon-color:rgba(0, 0, 0, .54)}.mat-mdc-list-option.mat-accent .mdc-list-item__start,.mat-mdc-list-option.mat-accent .mdc-list-item__end{--mdc-radio-disabled-selected-icon-color:#000;--mdc-radio-disabled-unselected-icon-color:#000;--mdc-radio-unselected-focus-icon-color:#212121;--mdc-radio-unselected-hover-icon-color:#212121;--mdc-radio-unselected-icon-color:rgba(0, 0, 0, .54);--mdc-radio-unselected-pressed-icon-color:rgba(0, 0, 0, .54);--mdc-radio-selected-focus-icon-color:#ff4081;--mdc-radio-selected-hover-icon-color:#ff4081;--mdc-radio-selected-icon-color:#ff4081;--mdc-radio-selected-pressed-icon-color:#ff4081;--mat-mdc-radio-ripple-color: #000;--mat-mdc-radio-checked-ripple-color: #ff4081}.mat-mdc-list-option.mat-accent .mdc-list-item__start .mdc-radio--disabled+label,.mat-mdc-list-option.mat-accent .mdc-list-item__end .mdc-radio--disabled+label{color:#00000061}.mat-mdc-list-option.mat-warn .mdc-list-item__start,.mat-mdc-list-option.mat-warn .mdc-list-item__end{--mdc-checkbox-selected-checkmark-color:#fff;--mdc-checkbox-selected-focus-icon-color:#f44336;--mdc-checkbox-selected-hover-icon-color:#f44336;--mdc-checkbox-selected-icon-color:#f44336;--mdc-checkbox-selected-pressed-icon-color:#f44336;--mdc-checkbox-unselected-focus-icon-color:#212121;--mdc-checkbox-unselected-hover-icon-color:#212121;--mdc-checkbox-disabled-selected-icon-color:rgba(0, 0, 0, .38);--mdc-checkbox-disabled-unselected-icon-color:rgba(0, 0, 0, .38);--mdc-checkbox-unselected-icon-color:rgba(0, 0, 0, .54);--mdc-checkbox-unselected-pressed-icon-color:rgba(0, 0, 0, .54)}.mat-mdc-list-option.mat-warn .mdc-list-item__start,.mat-mdc-list-option.mat-warn .mdc-list-item__end{--mdc-radio-disabled-selected-icon-color:#000;--mdc-radio-disabled-unselected-icon-color:#000;--mdc-radio-unselected-focus-icon-color:#212121;--mdc-radio-unselected-hover-icon-color:#212121;--mdc-radio-unselected-icon-color:rgba(0, 0, 0, .54);--mdc-radio-unselected-pressed-icon-color:rgba(0, 0, 0, .54);--mdc-radio-selected-focus-icon-color:#f44336;--mdc-radio-selected-hover-icon-color:#f44336;--mdc-radio-selected-icon-color:#f44336;--mdc-radio-selected-pressed-icon-color:#f44336;--mat-mdc-radio-ripple-color: #000;--mat-mdc-radio-checked-ripple-color: #f44336}.mat-mdc-list-option.mat-warn .mdc-list-item__start .mdc-radio--disabled+label,.mat-mdc-list-option.mat-warn .mdc-list-item__end .mdc-radio--disabled+label{color:#00000061}.mat-mdc-list-base.mat-mdc-list-base .mdc-list-item--selected .mdc-list-item__primary-text,.mat-mdc-list-base.mat-mdc-list-base .mdc-list-item--activated .mdc-list-item__primary-text,.mat-mdc-list-base.mat-mdc-list-base .mdc-list-item--selected.mdc-list-item--with-leading-icon .mdc-list-item__start,.mat-mdc-list-base.mat-mdc-list-base .mdc-list-item--activated.mdc-list-item--with-leading-icon .mdc-list-item__start{color:#3f51b5}.mat-mdc-list-base .mdc-list-item--disabled .mdc-list-item__start,.mat-mdc-list-base .mdc-list-item--disabled .mdc-list-item__content,.mat-mdc-list-base .mdc-list-item--disabled .mdc-list-item__end{opacity:1}.mat-mdc-list-base{--mdc-list-list-item-one-line-container-height:48px;--mdc-list-list-item-two-line-container-height:64px;--mdc-list-list-item-three-line-container-height:88px}.mat-mdc-list-item.mdc-list-item--with-leading-avatar.mdc-list-item--with-one-line,.mat-mdc-list-item.mdc-list-item--with-leading-checkbox.mdc-list-item--with-one-line,.mat-mdc-list-item.mdc-list-item--with-leading-icon.mdc-list-item--with-one-line{height:56px}.mat-mdc-list-item.mdc-list-item--with-leading-avatar.mdc-list-item--with-two-lines,.mat-mdc-list-item.mdc-list-item--with-leading-checkbox.mdc-list-item--with-two-lines,.mat-mdc-list-item.mdc-list-item--with-leading-icon.mdc-list-item--with-two-lines{height:72px}.mat-mdc-list-base{--mdc-list-list-item-label-text-font:Roboto, sans-serif;--mdc-list-list-item-label-text-line-height:24px;--mdc-list-list-item-label-text-size:16px;--mdc-list-list-item-label-text-tracking:.03125em;--mdc-list-list-item-label-text-weight:400;--mdc-list-list-item-supporting-text-font:Roboto, sans-serif;--mdc-list-list-item-supporting-text-line-height:20px;--mdc-list-list-item-supporting-text-size:14px;--mdc-list-list-item-supporting-text-tracking:.0178571429em;--mdc-list-list-item-supporting-text-weight:400;--mdc-list-list-item-trailing-supporting-text-font:Roboto, sans-serif;--mdc-list-list-item-trailing-supporting-text-line-height:20px;--mdc-list-list-item-trailing-supporting-text-size:12px;--mdc-list-list-item-trailing-supporting-text-tracking:.0333333333em;--mdc-list-list-item-trailing-supporting-text-weight:400}.mdc-list-group__subheader{font-size:16px;font-weight:400;line-height:28px;font-family:Roboto,sans-serif;letter-spacing:.009375em}.mat-mdc-paginator{background:#fff;color:#000000de}.mat-mdc-paginator-icon{fill:#0000008a}.mat-mdc-paginator-decrement,.mat-mdc-paginator-increment{border-top:2px solid rgba(0,0,0,.54);border-right:2px solid rgba(0,0,0,.54)}.mat-mdc-paginator-first,.mat-mdc-paginator-last{border-top:2px solid rgba(0,0,0,.54)}.mat-mdc-icon-button[disabled] .mat-mdc-paginator-decrement,.mat-mdc-icon-button[disabled] .mat-mdc-paginator-increment,.mat-mdc-icon-button[disabled] .mat-mdc-paginator-first,.mat-mdc-icon-button[disabled] .mat-mdc-paginator-last{border-color:#0000001f}.mat-mdc-icon-button[disabled] .mat-mdc-paginator-icon{fill:#0000001f}.mat-mdc-paginator .mat-mdc-form-field-infix{min-height:40px}.mat-mdc-paginator .mat-mdc-text-field-wrapper .mat-mdc-form-field-flex .mat-mdc-floating-label{top:20px}.mat-mdc-paginator .mat-mdc-text-field-wrapper.mdc-text-field--outlined .mdc-notched-outline--upgraded .mdc-floating-label--float-above{--mat-mdc-form-field-label-transform: translateY( -26.75px) scale(var(--mat-mdc-form-field-floating-label-scale, .75));transform:var(--mat-mdc-form-field-label-transform)}.mat-mdc-paginator .mat-mdc-text-field-wrapper.mdc-text-field--outlined .mat-mdc-form-field-infix{padding-top:8px;padding-bottom:8px}.mat-mdc-paginator .mat-mdc-text-field-wrapper:not(.mdc-text-field--outlined) .mat-mdc-form-field-infix{padding-top:8px;padding-bottom:8px}.mat-mdc-paginator .mdc-text-field--no-label:not(.mdc-text-field--outlined):not(.mdc-text-field--textarea) .mat-mdc-form-field-infix{padding-top:8px;padding-bottom:8px}.mat-mdc-paginator .mat-mdc-text-field-wrapper:not(.mdc-text-field--outlined) .mat-mdc-floating-label{display:none}.mat-mdc-paginator-container{min-height:56px}.mat-mdc-paginator{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;font-family:var(--mdc-typography-caption-font-family, var(--mdc-typography-font-family, Roboto, sans-serif));font-size:var(--mdc-typography-caption-font-size, 12px);line-height:var(--mdc-typography-caption-line-height, 20px);font-weight:var(--mdc-typography-caption-font-weight, 400);letter-spacing:var(--mdc-typography-caption-letter-spacing, .0333333333em);-webkit-text-decoration:var(--mdc-typography-caption-text-decoration, inherit);text-decoration:var(--mdc-typography-caption-text-decoration, inherit);text-transform:var(--mdc-typography-caption-text-transform, none)}.mat-mdc-paginator .mat-mdc-select-value{font-size:12px}.mat-mdc-tab,.mat-mdc-tab-link{background-color:#0000}.mat-mdc-tab .mdc-tab__text-label,.mat-mdc-tab-link .mdc-tab__text-label{color:#0009}.mat-mdc-tab.mat-mdc-tab-disabled .mdc-tab__ripple:before,.mat-mdc-tab.mat-mdc-tab-disabled .mat-ripple-element,.mat-mdc-tab-link.mat-mdc-tab-disabled .mdc-tab__ripple:before,.mat-mdc-tab-link.mat-mdc-tab-disabled .mat-ripple-element{background-color:#00000061}.mat-mdc-tab:not(.mat-mdc-tab-disabled).mdc-tab--active .mdc-tab__text-label,.mat-mdc-tab-link:not(.mat-mdc-tab-disabled).mdc-tab--active .mdc-tab__text-label{color:#3f51b5}.mat-mdc-tab:not(.mat-mdc-tab-disabled) .mdc-tab-indicator__content--underline,.mat-mdc-tab-link:not(.mat-mdc-tab-disabled) .mdc-tab-indicator__content--underline{border-color:var(--mdc-tab-indicator-active-indicator-color, #3f51b5)}.mdc-tab__ripple:before,.mat-mdc-tab .mat-ripple-element,.mat-mdc-tab-header-pagination .mat-ripple-element,.mat-mdc-tab-link .mat-ripple-element{background-color:#3f51b5}.mat-mdc-tab-group.mat-accent .mat-mdc-tab:not(.mat-mdc-tab-disabled).mdc-tab--active .mdc-tab__text-label,.mat-mdc-tab-group.mat-accent .mat-mdc-tab-link:not(.mat-mdc-tab-disabled).mdc-tab--active .mdc-tab__text-label,.mat-mdc-tab-nav-bar.mat-accent .mat-mdc-tab:not(.mat-mdc-tab-disabled).mdc-tab--active .mdc-tab__text-label,.mat-mdc-tab-nav-bar.mat-accent .mat-mdc-tab-link:not(.mat-mdc-tab-disabled).mdc-tab--active .mdc-tab__text-label{color:#ff4081}.mat-mdc-tab-group.mat-accent .mat-mdc-tab:not(.mat-mdc-tab-disabled) .mdc-tab-indicator__content--underline,.mat-mdc-tab-group.mat-accent .mat-mdc-tab-link:not(.mat-mdc-tab-disabled) .mdc-tab-indicator__content--underline,.mat-mdc-tab-nav-bar.mat-accent .mat-mdc-tab:not(.mat-mdc-tab-disabled) .mdc-tab-indicator__content--underline,.mat-mdc-tab-nav-bar.mat-accent .mat-mdc-tab-link:not(.mat-mdc-tab-disabled) .mdc-tab-indicator__content--underline{border-color:var(--mdc-tab-indicator-active-indicator-color, #ff4081)}.mat-mdc-tab-group.mat-accent .mdc-tab__ripple:before,.mat-mdc-tab-group.mat-accent .mat-mdc-tab .mat-ripple-element,.mat-mdc-tab-group.mat-accent .mat-mdc-tab-header-pagination .mat-ripple-element,.mat-mdc-tab-group.mat-accent .mat-mdc-tab-link .mat-ripple-element,.mat-mdc-tab-nav-bar.mat-accent .mdc-tab__ripple:before,.mat-mdc-tab-nav-bar.mat-accent .mat-mdc-tab .mat-ripple-element,.mat-mdc-tab-nav-bar.mat-accent .mat-mdc-tab-header-pagination .mat-ripple-element,.mat-mdc-tab-nav-bar.mat-accent .mat-mdc-tab-link .mat-ripple-element{background-color:#ff4081}.mat-mdc-tab-group.mat-warn .mat-mdc-tab:not(.mat-mdc-tab-disabled).mdc-tab--active .mdc-tab__text-label,.mat-mdc-tab-group.mat-warn .mat-mdc-tab-link:not(.mat-mdc-tab-disabled).mdc-tab--active .mdc-tab__text-label,.mat-mdc-tab-nav-bar.mat-warn .mat-mdc-tab:not(.mat-mdc-tab-disabled).mdc-tab--active .mdc-tab__text-label,.mat-mdc-tab-nav-bar.mat-warn .mat-mdc-tab-link:not(.mat-mdc-tab-disabled).mdc-tab--active .mdc-tab__text-label{color:#f44336}.mat-mdc-tab-group.mat-warn .mat-mdc-tab:not(.mat-mdc-tab-disabled) .mdc-tab-indicator__content--underline,.mat-mdc-tab-group.mat-warn .mat-mdc-tab-link:not(.mat-mdc-tab-disabled) .mdc-tab-indicator__content--underline,.mat-mdc-tab-nav-bar.mat-warn .mat-mdc-tab:not(.mat-mdc-tab-disabled) .mdc-tab-indicator__content--underline,.mat-mdc-tab-nav-bar.mat-warn .mat-mdc-tab-link:not(.mat-mdc-tab-disabled) .mdc-tab-indicator__content--underline{border-color:var(--mdc-tab-indicator-active-indicator-color, #f44336)}.mat-mdc-tab-group.mat-warn .mdc-tab__ripple:before,.mat-mdc-tab-group.mat-warn .mat-mdc-tab .mat-ripple-element,.mat-mdc-tab-group.mat-warn .mat-mdc-tab-header-pagination .mat-ripple-element,.mat-mdc-tab-group.mat-warn .mat-mdc-tab-link .mat-ripple-element,.mat-mdc-tab-nav-bar.mat-warn .mdc-tab__ripple:before,.mat-mdc-tab-nav-bar.mat-warn .mat-mdc-tab .mat-ripple-element,.mat-mdc-tab-nav-bar.mat-warn .mat-mdc-tab-header-pagination .mat-ripple-element,.mat-mdc-tab-nav-bar.mat-warn .mat-mdc-tab-link .mat-ripple-element{background-color:#f44336}.mat-mdc-tab-group.mat-background-primary,.mat-mdc-tab-nav-bar.mat-background-primary{--mat-mdc-tab-header-with-background-background-color: #3f51b5;--mat-mdc-tab-header-with-background-foreground-color: #fff}.mat-mdc-tab-group.mat-background-accent,.mat-mdc-tab-nav-bar.mat-background-accent{--mat-mdc-tab-header-with-background-background-color: #ff4081;--mat-mdc-tab-header-with-background-foreground-color: #fff}.mat-mdc-tab-group.mat-background-warn,.mat-mdc-tab-nav-bar.mat-background-warn{--mat-mdc-tab-header-with-background-background-color: #f44336;--mat-mdc-tab-header-with-background-foreground-color: #fff}.mat-mdc-tab-header-pagination-chevron{border-color:var(--mdc-theme-on-surface, #000)}.mat-mdc-tab-header .mdc-tab{height:48px}.mdc-tab{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;font-family:var(--mdc-typography-button-font-family, var(--mdc-typography-font-family, Roboto, sans-serif));font-size:var(--mdc-typography-button-font-size, 14px);line-height:var(--mdc-typography-button-line-height, 36px);font-weight:var(--mdc-typography-button-font-weight, 500);letter-spacing:var(--mdc-typography-button-letter-spacing, .0892857143em);-webkit-text-decoration:var(--mdc-typography-button-text-decoration, none);text-decoration:var(--mdc-typography-button-text-decoration, none);text-transform:var(--mdc-typography-button-text-transform, none)}.mat-mdc-checkbox .mdc-form-field{color:var(--mdc-theme-text-primary-on-background, rgba(0, 0, 0, .87))}.mat-mdc-checkbox .mat-ripple-element{background-color:#0000001a}.mat-mdc-checkbox .mdc-checkbox__ripple{background:#000}.mat-mdc-checkbox.mat-primary{--mdc-checkbox-selected-checkmark-color:#fff;--mdc-checkbox-selected-focus-icon-color:#3f51b5;--mdc-checkbox-selected-hover-icon-color:#3f51b5;--mdc-checkbox-selected-icon-color:#3f51b5;--mdc-checkbox-selected-pressed-icon-color:#3f51b5;--mdc-checkbox-unselected-focus-icon-color:#212121;--mdc-checkbox-unselected-hover-icon-color:#212121;--mdc-checkbox-disabled-selected-icon-color:rgba(0, 0, 0, .38);--mdc-checkbox-disabled-unselected-icon-color:rgba(0, 0, 0, .38);--mdc-checkbox-unselected-icon-color:rgba(0, 0, 0, .54);--mdc-checkbox-unselected-pressed-icon-color:rgba(0, 0, 0, .54)}.mat-mdc-checkbox.mat-primary .mdc-checkbox--selected~.mat-mdc-checkbox-ripple .mat-ripple-element{background-color:#3f51b51a}.mat-mdc-checkbox.mat-primary .mdc-checkbox--selected~.mdc-checkbox__ripple{background:#3f51b5}.mat-mdc-checkbox.mat-accent{--mdc-checkbox-selected-checkmark-color:#fff;--mdc-checkbox-selected-focus-icon-color:#ff4081;--mdc-checkbox-selected-hover-icon-color:#ff4081;--mdc-checkbox-selected-icon-color:#ff4081;--mdc-checkbox-selected-pressed-icon-color:#ff4081;--mdc-checkbox-unselected-focus-icon-color:#212121;--mdc-checkbox-unselected-hover-icon-color:#212121;--mdc-checkbox-disabled-selected-icon-color:rgba(0, 0, 0, .38);--mdc-checkbox-disabled-unselected-icon-color:rgba(0, 0, 0, .38);--mdc-checkbox-unselected-icon-color:rgba(0, 0, 0, .54);--mdc-checkbox-unselected-pressed-icon-color:rgba(0, 0, 0, .54)}.mat-mdc-checkbox.mat-accent .mdc-checkbox--selected~.mat-mdc-checkbox-ripple .mat-ripple-element{background-color:#ff40811a}.mat-mdc-checkbox.mat-accent .mdc-checkbox--selected~.mdc-checkbox__ripple{background:#ff4081}.mat-mdc-checkbox.mat-warn{--mdc-checkbox-selected-checkmark-color:#fff;--mdc-checkbox-selected-focus-icon-color:#f44336;--mdc-checkbox-selected-hover-icon-color:#f44336;--mdc-checkbox-selected-icon-color:#f44336;--mdc-checkbox-selected-pressed-icon-color:#f44336;--mdc-checkbox-unselected-focus-icon-color:#212121;--mdc-checkbox-unselected-hover-icon-color:#212121;--mdc-checkbox-disabled-selected-icon-color:rgba(0, 0, 0, .38);--mdc-checkbox-disabled-unselected-icon-color:rgba(0, 0, 0, .38);--mdc-checkbox-unselected-icon-color:rgba(0, 0, 0, .54);--mdc-checkbox-unselected-pressed-icon-color:rgba(0, 0, 0, .54)}.mat-mdc-checkbox.mat-warn .mdc-checkbox--selected~.mat-mdc-checkbox-ripple .mat-ripple-element{background-color:#f443361a}.mat-mdc-checkbox.mat-warn .mdc-checkbox--selected~.mdc-checkbox__ripple{background:#f44336}.mat-mdc-checkbox-disabled label{color:#00000061}.mat-mdc-checkbox .mdc-checkbox{padding:calc((var(--mdc-checkbox-ripple-size, 40px) - 18px) / 2);margin:calc((var(--mdc-checkbox-touch-target-size, 40px) - 40px) / 2)}.mat-mdc-checkbox .mdc-checkbox .mdc-checkbox__background{top:calc((var(--mdc-checkbox-ripple-size, 40px) - 18px) / 2);left:calc((var(--mdc-checkbox-ripple-size, 40px) - 18px) / 2)}.mat-mdc-checkbox .mdc-checkbox .mdc-checkbox__native-control{top:calc((40px - var(--mdc-checkbox-touch-target-size, 40px)) / 2);right:calc((40px - var(--mdc-checkbox-touch-target-size, 40px)) / 2);left:calc((40px - var(--mdc-checkbox-touch-target-size, 40px)) / 2);width:var(--mdc-checkbox-touch-target-size, 40px);height:var(--mdc-checkbox-touch-target-size, 40px)}@media all and (-ms-high-contrast: none){.mdc-checkbox .mdc-checkbox__focus-ring{display:none}}.mdc-form-field{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;font-family:var(--mdc-typography-body2-font-family, var(--mdc-typography-font-family, Roboto, sans-serif));font-size:var(--mdc-typography-body2-font-size, 14px);line-height:var(--mdc-typography-body2-line-height, 20px);font-weight:var(--mdc-typography-body2-font-weight, 400);letter-spacing:var(--mdc-typography-body2-letter-spacing, .0178571429em);-webkit-text-decoration:var(--mdc-typography-body2-text-decoration, inherit);text-decoration:var(--mdc-typography-body2-text-decoration, inherit);text-transform:var(--mdc-typography-body2-text-transform, none)}.mat-mdc-button.mat-unthemed{--mdc-text-button-label-text-color:#000}.mat-mdc-button.mat-primary{--mdc-text-button-label-text-color:#3f51b5}.mat-mdc-button.mat-accent{--mdc-text-button-label-text-color:#ff4081}.mat-mdc-button.mat-warn{--mdc-text-button-label-text-color:#f44336}.mat-mdc-button[disabled][disabled]{--mdc-text-button-disabled-label-text-color:rgba(0, 0, 0, .38);--mdc-text-button-label-text-color:rgba(0, 0, 0, .38)}.mat-mdc-unelevated-button.mat-unthemed{--mdc-filled-button-container-color:#fff;--mdc-filled-button-label-text-color:#000}.mat-mdc-unelevated-button.mat-primary{--mdc-filled-button-container-color:#3f51b5;--mdc-filled-button-label-text-color:#fff}.mat-mdc-unelevated-button.mat-accent{--mdc-filled-button-container-color:#ff4081;--mdc-filled-button-label-text-color:#fff}.mat-mdc-unelevated-button.mat-warn{--mdc-filled-button-container-color:#f44336;--mdc-filled-button-label-text-color:#fff}.mat-mdc-unelevated-button[disabled][disabled]{--mdc-filled-button-disabled-container-color:rgba(0, 0, 0, .12);--mdc-filled-button-disabled-label-text-color:rgba(0, 0, 0, .38);--mdc-filled-button-container-color:rgba(0, 0, 0, .12);--mdc-filled-button-label-text-color:rgba(0, 0, 0, .38)}.mat-mdc-raised-button.mat-unthemed{--mdc-protected-button-container-color:#fff;--mdc-protected-button-label-text-color:#000}.mat-mdc-raised-button.mat-primary{--mdc-protected-button-container-color:#3f51b5;--mdc-protected-button-label-text-color:#fff}.mat-mdc-raised-button.mat-accent{--mdc-protected-button-container-color:#ff4081;--mdc-protected-button-label-text-color:#fff}.mat-mdc-raised-button.mat-warn{--mdc-protected-button-container-color:#f44336;--mdc-protected-button-label-text-color:#fff}.mat-mdc-raised-button[disabled][disabled]{--mdc-protected-button-disabled-container-color:rgba(0, 0, 0, .12);--mdc-protected-button-disabled-label-text-color:rgba(0, 0, 0, .38);--mdc-protected-button-container-color:rgba(0, 0, 0, .12);--mdc-protected-button-label-text-color:rgba(0, 0, 0, .38);--mdc-protected-button-container-elevation:0}.mat-mdc-outlined-button{--mdc-outlined-button-outline-color:rgba(0, 0, 0, .12)}.mat-mdc-outlined-button.mat-unthemed{--mdc-outlined-button-label-text-color:#000}.mat-mdc-outlined-button.mat-primary{--mdc-outlined-button-label-text-color:#3f51b5}.mat-mdc-outlined-button.mat-accent{--mdc-outlined-button-label-text-color:#ff4081}.mat-mdc-outlined-button.mat-warn{--mdc-outlined-button-label-text-color:#f44336}.mat-mdc-outlined-button[disabled][disabled]{--mdc-outlined-button-label-text-color:rgba(0, 0, 0, .38);--mdc-outlined-button-disabled-label-text-color:rgba(0, 0, 0, .38);--mdc-outlined-button-outline-color:rgba(0, 0, 0, .12);--mdc-outlined-button-disabled-outline-color:rgba(0, 0, 0, .12)}.mat-mdc-button,.mat-mdc-outlined-button{--mat-mdc-button-persistent-ripple-color: #000;--mat-mdc-button-ripple-color: rgba(0, 0, 0, .1)}.mat-mdc-button:hover .mat-mdc-button-persistent-ripple:before,.mat-mdc-outlined-button:hover .mat-mdc-button-persistent-ripple:before{opacity:.04}.mat-mdc-button.cdk-program-focused .mat-mdc-button-persistent-ripple:before,.mat-mdc-button.cdk-keyboard-focused .mat-mdc-button-persistent-ripple:before,.mat-mdc-outlined-button.cdk-program-focused .mat-mdc-button-persistent-ripple:before,.mat-mdc-outlined-button.cdk-keyboard-focused .mat-mdc-button-persistent-ripple:before{opacity:.12}.mat-mdc-button:active .mat-mdc-button-persistent-ripple:before,.mat-mdc-outlined-button:active .mat-mdc-button-persistent-ripple:before{opacity:.12}.mat-mdc-button.mat-primary,.mat-mdc-outlined-button.mat-primary{--mat-mdc-button-persistent-ripple-color: #3f51b5;--mat-mdc-button-ripple-color: rgba(63, 81, 181, .1)}.mat-mdc-button.mat-accent,.mat-mdc-outlined-button.mat-accent{--mat-mdc-button-persistent-ripple-color: #ff4081;--mat-mdc-button-ripple-color: rgba(255, 64, 129, .1)}.mat-mdc-button.mat-warn,.mat-mdc-outlined-button.mat-warn{--mat-mdc-button-persistent-ripple-color: #f44336;--mat-mdc-button-ripple-color: rgba(244, 67, 54, .1)}.mat-mdc-raised-button,.mat-mdc-unelevated-button{--mat-mdc-button-persistent-ripple-color: #000;--mat-mdc-button-ripple-color: rgba(0, 0, 0, .1)}.mat-mdc-raised-button:hover .mat-mdc-button-persistent-ripple:before,.mat-mdc-unelevated-button:hover .mat-mdc-button-persistent-ripple:before{opacity:.04}.mat-mdc-raised-button.cdk-program-focused .mat-mdc-button-persistent-ripple:before,.mat-mdc-raised-button.cdk-keyboard-focused .mat-mdc-button-persistent-ripple:before,.mat-mdc-unelevated-button.cdk-program-focused .mat-mdc-button-persistent-ripple:before,.mat-mdc-unelevated-button.cdk-keyboard-focused .mat-mdc-button-persistent-ripple:before{opacity:.12}.mat-mdc-raised-button:active .mat-mdc-button-persistent-ripple:before,.mat-mdc-unelevated-button:active .mat-mdc-button-persistent-ripple:before{opacity:.12}.mat-mdc-raised-button.mat-primary,.mat-mdc-unelevated-button.mat-primary,.mat-mdc-raised-button.mat-accent,.mat-mdc-unelevated-button.mat-accent,.mat-mdc-raised-button.mat-warn,.mat-mdc-unelevated-button.mat-warn{--mat-mdc-button-persistent-ripple-color: #fff;--mat-mdc-button-ripple-color: rgba(255, 255, 255, .1)}.mat-mdc-button.mat-mdc-button-base,.mat-mdc-raised-button.mat-mdc-button-base,.mat-mdc-unelevated-button.mat-mdc-button-base,.mat-mdc-outlined-button.mat-mdc-button-base{height:36px}.mdc-button{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;font-family:var(--mdc-typography-button-font-family, var(--mdc-typography-font-family, Roboto, sans-serif));font-size:var(--mdc-typography-button-font-size, 14px);line-height:var(--mdc-typography-button-line-height, 36px);font-weight:var(--mdc-typography-button-font-weight, 500);letter-spacing:var(--mdc-typography-button-letter-spacing, .0892857143em);-webkit-text-decoration:var(--mdc-typography-button-text-decoration, none);text-decoration:var(--mdc-typography-button-text-decoration, none);text-transform:var(--mdc-typography-button-text-transform, none)}.mat-mdc-icon-button{--mat-mdc-button-persistent-ripple-color: #000;--mat-mdc-button-ripple-color: rgba(0, 0, 0, .1)}.mat-mdc-icon-button:hover .mat-mdc-button-persistent-ripple:before{opacity:.04}.mat-mdc-icon-button.cdk-program-focused .mat-mdc-button-persistent-ripple:before,.mat-mdc-icon-button.cdk-keyboard-focused .mat-mdc-button-persistent-ripple:before{opacity:.12}.mat-mdc-icon-button:active .mat-mdc-button-persistent-ripple:before{opacity:.12}.mat-mdc-icon-button.mat-primary{--mat-mdc-button-persistent-ripple-color: #3f51b5;--mat-mdc-button-ripple-color: rgba(63, 81, 181, .1)}.mat-mdc-icon-button.mat-accent{--mat-mdc-button-persistent-ripple-color: #ff4081;--mat-mdc-button-ripple-color: rgba(255, 64, 129, .1)}.mat-mdc-icon-button.mat-warn{--mat-mdc-button-persistent-ripple-color: #f44336;--mat-mdc-button-ripple-color: rgba(244, 67, 54, .1)}.mat-mdc-icon-button.mat-primary{--mdc-icon-button-icon-color:#3f51b5}.mat-mdc-icon-button.mat-accent{--mdc-icon-button-icon-color:#ff4081}.mat-mdc-icon-button.mat-warn{--mdc-icon-button-icon-color:#f44336}.mat-mdc-icon-button[disabled][disabled]{--mdc-icon-button-icon-color:rgba(0, 0, 0, .38);--mdc-icon-button-disabled-icon-color:rgba(0, 0, 0, .38)}.mat-mdc-icon-button.mat-mdc-button-base{width:48px;height:48px;padding:12px}.mat-mdc-icon-button.mat-mdc-button-base .mdc-icon-button__focus-ring{max-height:48px;max-width:48px}.mat-mdc-icon-button.mat-mdc-button-base.mdc-icon-button--reduced-size .mdc-icon-button__ripple{width:40px;height:40px;margin:4px}.mat-mdc-icon-button.mat-mdc-button-base.mdc-icon-button--reduced-size .mdc-icon-button__focus-ring{max-height:40px;max-width:40px}.mat-mdc-icon-button.mat-mdc-button-base .mdc-icon-button__touch{position:absolute;top:50%;height:48px;left:50%;width:48px;transform:translate(-50%,-50%)}.mat-mdc-fab,.mat-mdc-mini-fab{--mat-mdc-button-persistent-ripple-color: #000;--mat-mdc-button-ripple-color: rgba(0, 0, 0, .1)}.mat-mdc-fab:hover .mat-mdc-button-persistent-ripple:before,.mat-mdc-mini-fab:hover .mat-mdc-button-persistent-ripple:before{opacity:.04}.mat-mdc-fab.cdk-program-focused .mat-mdc-button-persistent-ripple:before,.mat-mdc-fab.cdk-keyboard-focused .mat-mdc-button-persistent-ripple:before,.mat-mdc-mini-fab.cdk-program-focused .mat-mdc-button-persistent-ripple:before,.mat-mdc-mini-fab.cdk-keyboard-focused .mat-mdc-button-persistent-ripple:before{opacity:.12}.mat-mdc-fab:active .mat-mdc-button-persistent-ripple:before,.mat-mdc-mini-fab:active .mat-mdc-button-persistent-ripple:before{opacity:.12}.mat-mdc-fab.mat-primary,.mat-mdc-mini-fab.mat-primary,.mat-mdc-fab.mat-accent,.mat-mdc-mini-fab.mat-accent,.mat-mdc-fab.mat-warn,.mat-mdc-mini-fab.mat-warn{--mat-mdc-button-persistent-ripple-color: #fff;--mat-mdc-button-ripple-color: rgba(255, 255, 255, .1)}.mat-mdc-fab.mat-unthemed,.mat-mdc-mini-fab.mat-unthemed{--mdc-fab-container-color:#fff;--mdc-fab-icon-color:#000;--mat-mdc-fab-color: #000}.mat-mdc-fab.mat-primary,.mat-mdc-mini-fab.mat-primary{--mdc-fab-container-color:#3f51b5;--mdc-fab-icon-color:#fff;--mat-mdc-fab-color: #fff}.mat-mdc-fab.mat-accent,.mat-mdc-mini-fab.mat-accent{--mdc-fab-container-color:#ff4081;--mdc-fab-icon-color:#fff;--mat-mdc-fab-color: #fff}.mat-mdc-fab.mat-warn,.mat-mdc-mini-fab.mat-warn{--mdc-fab-container-color:#f44336;--mdc-fab-icon-color:#fff;--mat-mdc-fab-color: #fff}.mat-mdc-fab[disabled][disabled],.mat-mdc-mini-fab[disabled][disabled]{--mdc-fab-container-color:rgba(0, 0, 0, .12);--mdc-fab-icon-color:rgba(0, 0, 0, .38);--mat-mdc-fab-color: rgba(0, 0, 0, .38)}.mdc-fab--extended{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;font-family:var(--mdc-typography-button-font-family, var(--mdc-typography-font-family, Roboto, sans-serif));font-size:var(--mdc-typography-button-font-size, 14px);line-height:var(--mdc-typography-button-line-height, 36px);font-weight:var(--mdc-typography-button-font-weight, 500);letter-spacing:var(--mdc-typography-button-letter-spacing, .0892857143em);-webkit-text-decoration:var(--mdc-typography-button-text-decoration, none);text-decoration:var(--mdc-typography-button-text-decoration, none);text-transform:var(--mdc-typography-button-text-transform, none)}.mat-mdc-snack-bar-container{--mat-mdc-snack-bar-button-color: #ff4081;--mdc-snackbar-container-color:#333333;--mdc-snackbar-supporting-text-color:rgba(255, 255, 255, .87)}.mat-mdc-snack-bar-container{--mdc-snackbar-supporting-text-font:Roboto, sans-serif;--mdc-snackbar-supporting-text-line-height:20px;--mdc-snackbar-supporting-text-size:14px;--mdc-snackbar-supporting-text-weight:400}.mdc-data-table{background-color:var(--mdc-theme-surface, #fff);border-color:#0000001f}.mdc-data-table__row{background-color:inherit}.mdc-data-table__header-cell{background-color:var(--mdc-theme-surface, #fff)}.mdc-data-table__row--selected{background-color:#3f51b50a}.mdc-data-table__pagination-rows-per-page-select--outlined:not(.mdc-select--disabled) .mdc-notched-outline__leading,.mdc-data-table__pagination-rows-per-page-select--outlined:not(.mdc-select--disabled) .mdc-notched-outline__notch,.mdc-data-table__pagination-rows-per-page-select--outlined:not(.mdc-select--disabled) .mdc-notched-outline__trailing{border-color:#0000001f}.mdc-data-table__cell,.mdc-data-table__header-cell{border-bottom-color:#0000001f}.mdc-data-table__pagination{border-top-color:#0000001f}.mdc-data-table__row:not(.mdc-data-table__row--selected):hover{background-color:#0000000a}.mdc-data-table__header-cell,.mdc-data-table__pagination-total,.mdc-data-table__pagination-rows-per-page-label,.mdc-data-table__cell{color:#000000de}.mat-mdc-table{background:#fff}.mat-mdc-table .mdc-data-table__row{height:52px}.mat-mdc-table .mdc-data-table__pagination{min-height:52px}.mat-mdc-table .mdc-data-table__header-row{height:56px}.mdc-data-table__content,.mdc-data-table__cell{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;font-family:var(--mdc-typography-body2-font-family, var(--mdc-typography-font-family, Roboto, sans-serif));font-size:var(--mdc-typography-body2-font-size, 14px);line-height:var(--mdc-typography-body2-line-height, 20px);font-weight:var(--mdc-typography-body2-font-weight, 400);letter-spacing:var(--mdc-typography-body2-letter-spacing, .0178571429em);-webkit-text-decoration:var(--mdc-typography-body2-text-decoration, inherit);text-decoration:var(--mdc-typography-body2-text-decoration, inherit);text-transform:var(--mdc-typography-body2-text-transform, none)}.mdc-data-table__header-cell{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;font-family:var(--mdc-typography-subtitle2-font-family, var(--mdc-typography-font-family, Roboto, sans-serif));font-size:var(--mdc-typography-subtitle2-font-size, 14px);line-height:var(--mdc-typography-subtitle2-line-height, 22px);font-weight:var(--mdc-typography-subtitle2-font-weight, 500);letter-spacing:var(--mdc-typography-subtitle2-letter-spacing, .0071428571em);-webkit-text-decoration:var(--mdc-typography-subtitle2-text-decoration, inherit);text-decoration:var(--mdc-typography-subtitle2-text-decoration, inherit);text-transform:var(--mdc-typography-subtitle2-text-transform, none)}.mat-mdc-progress-spinner{--mdc-circular-progress-active-indicator-color:#3f51b5}.mat-mdc-progress-spinner.mat-accent{--mdc-circular-progress-active-indicator-color:#ff4081}.mat-mdc-progress-spinner.mat-warn{--mdc-circular-progress-active-indicator-color:#f44336}.mat-badge{position:relative}.mat-badge.mat-badge{overflow:visible}.mat-badge-hidden .mat-badge-content{display:none}.mat-badge-content{position:absolute;text-align:center;display:inline-block;border-radius:50%;transition:transform .2s ease-in-out;transform:scale(.6);overflow:hidden;white-space:nowrap;text-overflow:ellipsis;pointer-events:none}.ng-animate-disabled .mat-badge-content,.mat-badge-content._mat-animation-noopable{transition:none}.mat-badge-content.mat-badge-active{transform:none}.mat-badge-small .mat-badge-content{width:16px;height:16px;line-height:16px}.mat-badge-small.mat-badge-above .mat-badge-content{top:-8px}.mat-badge-small.mat-badge-below .mat-badge-content{bottom:-8px}.mat-badge-small.mat-badge-before .mat-badge-content{left:-16px}[dir=rtl] .mat-badge-small.mat-badge-before .mat-badge-content{left:auto;right:-16px}.mat-badge-small.mat-badge-after .mat-badge-content{right:-16px}[dir=rtl] .mat-badge-small.mat-badge-after .mat-badge-content{right:auto;left:-16px}.mat-badge-small.mat-badge-overlap.mat-badge-before .mat-badge-content{left:-8px}[dir=rtl] .mat-badge-small.mat-badge-overlap.mat-badge-before .mat-badge-content{left:auto;right:-8px}.mat-badge-small.mat-badge-overlap.mat-badge-after .mat-badge-content{right:-8px}[dir=rtl] .mat-badge-small.mat-badge-overlap.mat-badge-after .mat-badge-content{right:auto;left:-8px}.mat-badge-medium .mat-badge-content{width:22px;height:22px;line-height:22px}.mat-badge-medium.mat-badge-above .mat-badge-content{top:-11px}.mat-badge-medium.mat-badge-below .mat-badge-content{bottom:-11px}.mat-badge-medium.mat-badge-before .mat-badge-content{left:-22px}[dir=rtl] .mat-badge-medium.mat-badge-before .mat-badge-content{left:auto;right:-22px}.mat-badge-medium.mat-badge-after .mat-badge-content{right:-22px}[dir=rtl] .mat-badge-medium.mat-badge-after .mat-badge-content{right:auto;left:-22px}.mat-badge-medium.mat-badge-overlap.mat-badge-before .mat-badge-content{left:-11px}[dir=rtl] .mat-badge-medium.mat-badge-overlap.mat-badge-before .mat-badge-content{left:auto;right:-11px}.mat-badge-medium.mat-badge-overlap.mat-badge-after .mat-badge-content{right:-11px}[dir=rtl] .mat-badge-medium.mat-badge-overlap.mat-badge-after .mat-badge-content{right:auto;left:-11px}.mat-badge-large .mat-badge-content{width:28px;height:28px;line-height:28px}.mat-badge-large.mat-badge-above .mat-badge-content{top:-14px}.mat-badge-large.mat-badge-below .mat-badge-content{bottom:-14px}.mat-badge-large.mat-badge-before .mat-badge-content{left:-28px}[dir=rtl] .mat-badge-large.mat-badge-before .mat-badge-content{left:auto;right:-28px}.mat-badge-large.mat-badge-after .mat-badge-content{right:-28px}[dir=rtl] .mat-badge-large.mat-badge-after .mat-badge-content{right:auto;left:-28px}.mat-badge-large.mat-badge-overlap.mat-badge-before .mat-badge-content{left:-14px}[dir=rtl] .mat-badge-large.mat-badge-overlap.mat-badge-before .mat-badge-content{left:auto;right:-14px}.mat-badge-large.mat-badge-overlap.mat-badge-after .mat-badge-content{right:-14px}[dir=rtl] .mat-badge-large.mat-badge-overlap.mat-badge-after .mat-badge-content{right:auto;left:-14px}.mat-badge-content{color:#fff;background:#3f51b5}.cdk-high-contrast-active .mat-badge-content{outline:solid 1px;border-radius:0}.mat-badge-accent .mat-badge-content{background:#ff4081;color:#fff}.mat-badge-warn .mat-badge-content{color:#fff;background:#f44336}.mat-badge-disabled .mat-badge-content{background:#b9b9b9;color:#00000061}.mat-badge-content{font-weight:600;font-size:12px;font-family:Roboto,sans-serif}.mat-badge-small .mat-badge-content{font-size:9px}.mat-badge-large .mat-badge-content{font-size:24px}.mat-bottom-sheet-container{box-shadow:0 8px 10px -5px #0003,0 16px 24px 2px #00000024,0 6px 30px 5px #0000001f;background:#fff;color:#000000de}.mat-bottom-sheet-container{font-size:14px;font-weight:400;line-height:20px;font-family:Roboto,sans-serif;letter-spacing:.0178571429em}.mat-button-toggle-standalone:not([class*=mat-elevation-z]),.mat-button-toggle-group:not([class*=mat-elevation-z]){box-shadow:0 3px 1px -2px #0003,0 2px 2px #00000024,0 1px 5px #0000001f}.mat-button-toggle-standalone.mat-button-toggle-appearance-standard:not([class*=mat-elevation-z]),.mat-button-toggle-group-appearance-standard:not([class*=mat-elevation-z]){box-shadow:none}.mat-button-toggle{color:#00000061}.mat-button-toggle .mat-button-toggle-focus-overlay{background-color:#0000001f}.mat-button-toggle-appearance-standard{color:#000000de;background:#fff}.mat-button-toggle-appearance-standard .mat-button-toggle-focus-overlay{background-color:#000}.mat-button-toggle-group-appearance-standard .mat-button-toggle+.mat-button-toggle{border-left:solid 1px #e0e0e0}[dir=rtl] .mat-button-toggle-group-appearance-standard .mat-button-toggle+.mat-button-toggle{border-left:none;border-right:solid 1px #e0e0e0}.mat-button-toggle-group-appearance-standard.mat-button-toggle-vertical .mat-button-toggle+.mat-button-toggle{border-left:none;border-right:none;border-top:solid 1px #e0e0e0}.mat-button-toggle-checked{background-color:#e0e0e0;color:#0000008a}.mat-button-toggle-checked.mat-button-toggle-appearance-standard{color:#000000de}.mat-button-toggle-disabled{color:#00000042;background-color:#eee}.mat-button-toggle-disabled.mat-button-toggle-appearance-standard{background:#fff}.mat-button-toggle-disabled.mat-button-toggle-checked{background-color:#bdbdbd}.mat-button-toggle-standalone.mat-button-toggle-appearance-standard,.mat-button-toggle-group-appearance-standard{border:solid 1px #e0e0e0}.mat-button-toggle-appearance-standard .mat-button-toggle-label-content{line-height:48px}.mat-button-toggle{font-family:Roboto,sans-serif}.mat-calendar-arrow{fill:#0000008a}.mat-datepicker-toggle,.mat-datepicker-content .mat-calendar-next-button,.mat-datepicker-content .mat-calendar-previous-button{color:#0000008a}.mat-calendar-table-header-divider:after{background:rgba(0,0,0,.12)}.mat-calendar-table-header,.mat-calendar-body-label{color:#0000008a}.mat-calendar-body-cell-content,.mat-date-range-input-separator{color:#000000de;border-color:#0000}.mat-calendar-body-disabled>.mat-calendar-body-cell-content:not(.mat-calendar-body-selected):not(.mat-calendar-body-comparison-identical){color:#00000061}.mat-form-field-disabled .mat-date-range-input-separator{color:#00000061}.mat-calendar-body-in-preview{color:#0000003d}.mat-calendar-body-today:not(.mat-calendar-body-selected):not(.mat-calendar-body-comparison-identical){border-color:#00000061}.mat-calendar-body-disabled>.mat-calendar-body-today:not(.mat-calendar-body-selected):not(.mat-calendar-body-comparison-identical){border-color:#0000002e}.mat-calendar-body-in-range:before{background:rgba(63,81,181,.2)}.mat-calendar-body-comparison-identical,.mat-calendar-body-in-comparison-range:before{background:rgba(249,171,0,.2)}.mat-calendar-body-comparison-bridge-start:before,[dir=rtl] .mat-calendar-body-comparison-bridge-end:before{background:linear-gradient(to right,rgba(63,81,181,.2) 50%,rgba(249,171,0,.2) 50%)}.mat-calendar-body-comparison-bridge-end:before,[dir=rtl] .mat-calendar-body-comparison-bridge-start:before{background:linear-gradient(to left,rgba(63,81,181,.2) 50%,rgba(249,171,0,.2) 50%)}.mat-calendar-body-in-range>.mat-calendar-body-comparison-identical,.mat-calendar-body-in-comparison-range.mat-calendar-body-in-range:after{background:#a8dab5}.mat-calendar-body-comparison-identical.mat-calendar-body-selected,.mat-calendar-body-in-comparison-range>.mat-calendar-body-selected{background:#46a35e}.mat-calendar-body-selected{background-color:#3f51b5;color:#fff}.mat-calendar-body-disabled>.mat-calendar-body-selected{background-color:#3f51b566}.mat-calendar-body-today.mat-calendar-body-selected{box-shadow:inset 0 0 0 1px #fff}.cdk-keyboard-focused .mat-calendar-body-active>.mat-calendar-body-cell-content:not(.mat-calendar-body-selected):not(.mat-calendar-body-comparison-identical),.cdk-program-focused .mat-calendar-body-active>.mat-calendar-body-cell-content:not(.mat-calendar-body-selected):not(.mat-calendar-body-comparison-identical){background-color:#3f51b54d}@media (hover: hover){.mat-calendar-body-cell:not(.mat-calendar-body-disabled):hover>.mat-calendar-body-cell-content:not(.mat-calendar-body-selected):not(.mat-calendar-body-comparison-identical){background-color:#3f51b54d}}.mat-datepicker-content{box-shadow:0 2px 4px -1px #0003,0 4px 5px #00000024,0 1px 10px #0000001f;background-color:#fff;color:#000000de}.mat-datepicker-content.mat-accent .mat-calendar-body-in-range:before{background:rgba(255,64,129,.2)}.mat-datepicker-content.mat-accent .mat-calendar-body-comparison-identical,.mat-datepicker-content.mat-accent .mat-calendar-body-in-comparison-range:before{background:rgba(249,171,0,.2)}.mat-datepicker-content.mat-accent .mat-calendar-body-comparison-bridge-start:before,.mat-datepicker-content.mat-accent [dir=rtl] .mat-calendar-body-comparison-bridge-end:before{background:linear-gradient(to right,rgba(255,64,129,.2) 50%,rgba(249,171,0,.2) 50%)}.mat-datepicker-content.mat-accent .mat-calendar-body-comparison-bridge-end:before,.mat-datepicker-content.mat-accent [dir=rtl] .mat-calendar-body-comparison-bridge-start:before{background:linear-gradient(to left,rgba(255,64,129,.2) 50%,rgba(249,171,0,.2) 50%)}.mat-datepicker-content.mat-accent .mat-calendar-body-in-range>.mat-calendar-body-comparison-identical,.mat-datepicker-content.mat-accent .mat-calendar-body-in-comparison-range.mat-calendar-body-in-range:after{background:#a8dab5}.mat-datepicker-content.mat-accent .mat-calendar-body-comparison-identical.mat-calendar-body-selected,.mat-datepicker-content.mat-accent .mat-calendar-body-in-comparison-range>.mat-calendar-body-selected{background:#46a35e}.mat-datepicker-content.mat-accent .mat-calendar-body-selected{background-color:#ff4081;color:#fff}.mat-datepicker-content.mat-accent .mat-calendar-body-disabled>.mat-calendar-body-selected{background-color:#ff408166}.mat-datepicker-content.mat-accent .mat-calendar-body-today.mat-calendar-body-selected{box-shadow:inset 0 0 0 1px #fff}.mat-datepicker-content.mat-accent .cdk-keyboard-focused .mat-calendar-body-active>.mat-calendar-body-cell-content:not(.mat-calendar-body-selected):not(.mat-calendar-body-comparison-identical),.mat-datepicker-content.mat-accent .cdk-program-focused .mat-calendar-body-active>.mat-calendar-body-cell-content:not(.mat-calendar-body-selected):not(.mat-calendar-body-comparison-identical){background-color:#ff40814d}@media (hover: hover){.mat-datepicker-content.mat-accent .mat-calendar-body-cell:not(.mat-calendar-body-disabled):hover>.mat-calendar-body-cell-content:not(.mat-calendar-body-selected):not(.mat-calendar-body-comparison-identical){background-color:#ff40814d}}.mat-datepicker-content.mat-warn .mat-calendar-body-in-range:before{background:rgba(244,67,54,.2)}.mat-datepicker-content.mat-warn .mat-calendar-body-comparison-identical,.mat-datepicker-content.mat-warn .mat-calendar-body-in-comparison-range:before{background:rgba(249,171,0,.2)}.mat-datepicker-content.mat-warn .mat-calendar-body-comparison-bridge-start:before,.mat-datepicker-content.mat-warn [dir=rtl] .mat-calendar-body-comparison-bridge-end:before{background:linear-gradient(to right,rgba(244,67,54,.2) 50%,rgba(249,171,0,.2) 50%)}.mat-datepicker-content.mat-warn .mat-calendar-body-comparison-bridge-end:before,.mat-datepicker-content.mat-warn [dir=rtl] .mat-calendar-body-comparison-bridge-start:before{background:linear-gradient(to left,rgba(244,67,54,.2) 50%,rgba(249,171,0,.2) 50%)}.mat-datepicker-content.mat-warn .mat-calendar-body-in-range>.mat-calendar-body-comparison-identical,.mat-datepicker-content.mat-warn .mat-calendar-body-in-comparison-range.mat-calendar-body-in-range:after{background:#a8dab5}.mat-datepicker-content.mat-warn .mat-calendar-body-comparison-identical.mat-calendar-body-selected,.mat-datepicker-content.mat-warn .mat-calendar-body-in-comparison-range>.mat-calendar-body-selected{background:#46a35e}.mat-datepicker-content.mat-warn .mat-calendar-body-selected{background-color:#f44336;color:#fff}.mat-datepicker-content.mat-warn .mat-calendar-body-disabled>.mat-calendar-body-selected{background-color:#f4433666}.mat-datepicker-content.mat-warn .mat-calendar-body-today.mat-calendar-body-selected{box-shadow:inset 0 0 0 1px #fff}.mat-datepicker-content.mat-warn .cdk-keyboard-focused .mat-calendar-body-active>.mat-calendar-body-cell-content:not(.mat-calendar-body-selected):not(.mat-calendar-body-comparison-identical),.mat-datepicker-content.mat-warn .cdk-program-focused .mat-calendar-body-active>.mat-calendar-body-cell-content:not(.mat-calendar-body-selected):not(.mat-calendar-body-comparison-identical){background-color:#f443364d}@media (hover: hover){.mat-datepicker-content.mat-warn .mat-calendar-body-cell:not(.mat-calendar-body-disabled):hover>.mat-calendar-body-cell-content:not(.mat-calendar-body-selected):not(.mat-calendar-body-comparison-identical){background-color:#f443364d}}.mat-datepicker-content-touch{box-shadow:0 11px 15px -7px #0003,0 24px 38px 3px #00000024,0 9px 46px 8px #0000001f}.mat-datepicker-toggle-active{color:#3f51b5}.mat-datepicker-toggle-active.mat-accent{color:#ff4081}.mat-datepicker-toggle-active.mat-warn{color:#f44336}.mat-date-range-input-inner[disabled]{color:#00000061}.mat-calendar-controls .mat-mdc-icon-button.mat-mdc-button-base{width:40px;height:40px;padding:8px}.mat-calendar-controls .mat-mdc-icon-button.mat-mdc-button-base .mdc-icon-button__focus-ring{max-height:40px;max-width:40px}.mat-calendar-controls .mat-mdc-icon-button.mat-mdc-button-base.mdc-icon-button--reduced-size .mdc-icon-button__ripple{width:40px;height:40px;margin:0}.mat-calendar-controls .mat-mdc-icon-button.mat-mdc-button-base.mdc-icon-button--reduced-size .mdc-icon-button__focus-ring{max-height:40px;max-width:40px}.mat-calendar-controls .mat-mdc-icon-button.mat-mdc-button-base .mdc-icon-button__touch{position:absolute;top:50%;height:40px;left:50%;width:40px;transform:translate(-50%,-50%)}.mat-calendar-controls .mat-mdc-icon-button.mat-mdc-button-base .mat-mdc-button-touch-target{display:none}.mat-calendar{font-family:Roboto,sans-serif}.mat-calendar-body{font-size:13px}.mat-calendar-body-label,.mat-calendar-period-button{font-size:14px;font-weight:500}.mat-calendar-table-header th{font-size:11px;font-weight:400}.mat-divider{border-top-color:#0000001f}.mat-divider-vertical{border-right-color:#0000001f}.mat-expansion-panel{background:#fff;color:#000000de}.mat-expansion-panel:not([class*=mat-elevation-z]){box-shadow:0 3px 1px -2px #0003,0 2px 2px #00000024,0 1px 5px #0000001f}.mat-action-row{border-top-color:#0000001f}.mat-expansion-panel .mat-expansion-panel-header.cdk-keyboard-focused:not([aria-disabled=true]),.mat-expansion-panel .mat-expansion-panel-header.cdk-program-focused:not([aria-disabled=true]),.mat-expansion-panel:not(.mat-expanded) .mat-expansion-panel-header:hover:not([aria-disabled=true]){background:rgba(0,0,0,.04)}@media (hover: none){.mat-expansion-panel:not(.mat-expanded):not([aria-disabled=true]) .mat-expansion-panel-header:hover{background:#fff}}.mat-expansion-panel-header-title{color:#000000de}.mat-expansion-panel-header-description,.mat-expansion-indicator:after{color:#0000008a}.mat-expansion-panel-header[aria-disabled=true]{color:#00000042}.mat-expansion-panel-header[aria-disabled=true] .mat-expansion-panel-header-title,.mat-expansion-panel-header[aria-disabled=true] .mat-expansion-panel-header-description{color:inherit}.mat-expansion-panel-header{height:48px}.mat-expansion-panel-header.mat-expanded{height:64px}.mat-expansion-panel-header{font-family:Roboto,sans-serif;font-size:14px;font-weight:500}.mat-expansion-panel-content{font-size:14px;font-weight:400;line-height:20px;font-family:Roboto,sans-serif;letter-spacing:.0178571429em}.mat-grid-tile-header,.mat-grid-tile-footer{font-size:14px}.mat-grid-tile-header .mat-line,.mat-grid-tile-footer .mat-line{white-space:nowrap;overflow:hidden;text-overflow:ellipsis;display:block;box-sizing:border-box}.mat-grid-tile-header .mat-line:nth-child(n+2),.mat-grid-tile-footer .mat-line:nth-child(n+2){font-size:12px}.mat-icon.mat-primary{color:#3f51b5}.mat-icon.mat-accent{color:#ff4081}.mat-icon.mat-warn{color:#f44336}.mat-drawer-container{background-color:#fafafa;color:#000000de}.mat-drawer{background-color:#fff;color:#000000de}.mat-drawer.mat-drawer-push{background-color:#fff}.mat-drawer:not(.mat-drawer-side){box-shadow:0 8px 10px -5px #0003,0 16px 24px 2px #00000024,0 6px 30px 5px #0000001f}.mat-drawer-side{border-right:solid 1px rgba(0,0,0,.12)}.mat-drawer-side.mat-drawer-end,[dir=rtl] .mat-drawer-side{border-left:solid 1px rgba(0,0,0,.12);border-right:none}[dir=rtl] .mat-drawer-side.mat-drawer-end{border-left:none;border-right:solid 1px rgba(0,0,0,.12)}.mat-drawer-backdrop.mat-drawer-shown{background-color:#0009}.mat-step-header.cdk-keyboard-focused,.mat-step-header.cdk-program-focused,.mat-step-header:hover:not([aria-disabled]),.mat-step-header:hover[aria-disabled=false]{background-color:#0000000a}.mat-step-header:hover[aria-disabled=true]{cursor:default}@media (hover: none){.mat-step-header:hover{background:none}}.mat-step-header .mat-step-label,.mat-step-header .mat-step-optional{color:#0000008a}.mat-step-header .mat-step-icon{background-color:#0000008a;color:#fff}.mat-step-header .mat-step-icon-selected,.mat-step-header .mat-step-icon-state-done,.mat-step-header .mat-step-icon-state-edit{background-color:#3f51b5;color:#fff}.mat-step-header.mat-accent .mat-step-icon{color:#fff}.mat-step-header.mat-accent .mat-step-icon-selected,.mat-step-header.mat-accent .mat-step-icon-state-done,.mat-step-header.mat-accent .mat-step-icon-state-edit{background-color:#ff4081;color:#fff}.mat-step-header.mat-warn .mat-step-icon{color:#fff}.mat-step-header.mat-warn .mat-step-icon-selected,.mat-step-header.mat-warn .mat-step-icon-state-done,.mat-step-header.mat-warn .mat-step-icon-state-edit{background-color:#f44336;color:#fff}.mat-step-header .mat-step-icon-state-error{background-color:#0000;color:#f44336}.mat-step-header .mat-step-label.mat-step-label-active{color:#000000de}.mat-step-header .mat-step-label.mat-step-label-error{color:#f44336}.mat-stepper-horizontal,.mat-stepper-vertical{background-color:#fff}.mat-stepper-vertical-line:before{border-left-color:#0000001f}.mat-horizontal-stepper-header:before,.mat-horizontal-stepper-header:after,.mat-stepper-horizontal-line{border-top-color:#0000001f}.mat-horizontal-stepper-header{height:72px}.mat-stepper-label-position-bottom .mat-horizontal-stepper-header,.mat-vertical-stepper-header{padding:24px}.mat-stepper-vertical-line:before{top:-16px;bottom:-16px}.mat-stepper-label-position-bottom .mat-horizontal-stepper-header:after,.mat-stepper-label-position-bottom .mat-horizontal-stepper-header:before{top:36px}.mat-stepper-label-position-bottom .mat-stepper-horizontal-line{top:36px}.mat-stepper-vertical,.mat-stepper-horizontal{font-family:Roboto,sans-serif}.mat-step-label{font-size:14px;font-weight:400}.mat-step-sub-label-error{font-weight:400}.mat-step-label-error{font-size:16px}.mat-step-label-selected{font-size:16px;font-weight:400}.mat-sort-header-arrow{color:#757575}.mat-toolbar{background:#f5f5f5;color:#000000de}.mat-toolbar.mat-primary{background:#3f51b5;color:#fff}.mat-toolbar.mat-accent{background:#ff4081;color:#fff}.mat-toolbar.mat-warn{background:#f44336;color:#fff}.mat-toolbar .mat-form-field-underline,.mat-toolbar .mat-form-field-ripple,.mat-toolbar .mat-focused .mat-form-field-ripple{background-color:currentColor}.mat-toolbar .mat-form-field-label,.mat-toolbar .mat-focused .mat-form-field-label,.mat-toolbar .mat-select-value,.mat-toolbar .mat-select-arrow,.mat-toolbar .mat-form-field.mat-focused .mat-select-arrow{color:inherit}.mat-toolbar .mat-input-element{caret-color:currentColor}.mat-toolbar-multiple-rows{min-height:64px}.mat-toolbar-row,.mat-toolbar-single-row{height:64px}@media (max-width: 599px){.mat-toolbar-multiple-rows{min-height:56px}.mat-toolbar-row,.mat-toolbar-single-row{height:56px}}.mat-toolbar,.mat-toolbar h1,.mat-toolbar h2,.mat-toolbar h3,.mat-toolbar h4,.mat-toolbar h5,.mat-toolbar h6{font-size:20px;font-weight:500;line-height:32px;font-family:Roboto,sans-serif;letter-spacing:.0125em;margin:0}.mat-tree{background:#fff}.mat-tree-node,.mat-nested-tree-node{color:#000000de}.mat-tree-node{min-height:48px}.mat-tree{font-family:Roboto,sans-serif}.mat-tree-node,.mat-nested-tree-node{font-weight:400;font-size:14px}.mat-h1,.mat-headline-5,.mat-typography .mat-h1,.mat-typography .mat-headline-5,.mat-typography h1{font-size:24px;font-weight:400;line-height:32px;font-family:Roboto,sans-serif;letter-spacing:normal;margin:0 0 16px}.mat-h2,.mat-headline-6,.mat-typography .mat-h2,.mat-typography .mat-headline-6,.mat-typography h2{font-size:20px;font-weight:500;line-height:32px;font-family:Roboto,sans-serif;letter-spacing:.0125em;margin:0 0 16px}.mat-h3,.mat-subtitle-1,.mat-typography .mat-h3,.mat-typography .mat-subtitle-1,.mat-typography h3{font-size:16px;font-weight:400;line-height:28px;font-family:Roboto,sans-serif;letter-spacing:.009375em;margin:0 0 16px}.mat-h4,.mat-body-1,.mat-typography .mat-h4,.mat-typography .mat-body-1,.mat-typography h4{font-size:16px;font-weight:400;line-height:24px;font-family:Roboto,sans-serif;letter-spacing:.03125em;margin:0 0 16px}.mat-h5,.mat-typography .mat-h5,.mat-typography h5{font:400 11.62px/20px Roboto,sans-serif;margin:0 0 12px}.mat-h6,.mat-typography .mat-h6,.mat-typography h6{font:400 9.38px/20px Roboto,sans-serif;margin:0 0 12px}.mat-body-strong,.mat-subtitle-2,.mat-typography .mat-body-strong,.mat-typography .mat-subtitle-2{font-size:14px;font-weight:500;line-height:22px;font-family:Roboto,sans-serif;letter-spacing:.0071428571em}.mat-body,.mat-body-2,.mat-typography .mat-body,.mat-typography .mat-body-2,.mat-typography{font-size:14px;font-weight:400;line-height:20px;font-family:Roboto,sans-serif;letter-spacing:.0178571429em}.mat-body p,.mat-body-2 p,.mat-typography .mat-body p,.mat-typography .mat-body-2 p,.mat-typography p{margin:0 0 12px}.mat-small,.mat-caption,.mat-typography .mat-small,.mat-typography .mat-caption{font-size:12px;font-weight:400;line-height:20px;font-family:Roboto,sans-serif;letter-spacing:.0333333333em}.mat-headline-1,.mat-typography .mat-headline-1{font-size:96px;font-weight:300;line-height:96px;font-family:Roboto,sans-serif;letter-spacing:-.015625em;margin:0 0 56px}.mat-headline-2,.mat-typography .mat-headline-2{font-size:60px;font-weight:300;line-height:60px;font-family:Roboto,sans-serif;letter-spacing:-.0083333333em;margin:0 0 64px}.mat-headline-3,.mat-typography .mat-headline-3{font-size:48px;font-weight:400;line-height:50px;font-family:Roboto,sans-serif;letter-spacing:normal;margin:0 0 64px}.mat-headline-4,.mat-typography .mat-headline-4{font-size:34px;font-weight:400;line-height:40px;font-family:Roboto,sans-serif;letter-spacing:.0073529412em;margin:0 0 64px}html,body{height:100%}body{margin:0;font-family:Roboto,Helvetica Neue,sans-serif}.flex-spacer{flex-grow:1}.hidden{display:none!important} +.mat-ripple{overflow:hidden;position:relative}.mat-ripple:not(:empty){transform:translateZ(0)}.mat-ripple.mat-ripple-unbounded{overflow:visible}.mat-ripple-element{position:absolute;border-radius:50%;pointer-events:none;transition:opacity,transform 0ms cubic-bezier(0,0,.2,1);transform:scale3d(0,0,0)}.cdk-high-contrast-active .mat-ripple-element{display:none}.cdk-visually-hidden{border:0;clip:rect(0 0 0 0);height:1px;margin:-1px;overflow:hidden;padding:0;position:absolute;width:1px;white-space:nowrap;outline:0;-webkit-appearance:none;-moz-appearance:none;left:0}[dir=rtl] .cdk-visually-hidden{left:auto;right:0}.cdk-overlay-container,.cdk-global-overlay-wrapper{pointer-events:none;top:0;left:0;height:100%;width:100%}.cdk-overlay-container{position:fixed;z-index:1000}.cdk-overlay-container:empty{display:none}.cdk-global-overlay-wrapper{display:flex;position:absolute;z-index:1000}.cdk-overlay-pane{position:absolute;pointer-events:auto;box-sizing:border-box;z-index:1000;display:flex;max-width:100%;max-height:100%}.cdk-overlay-backdrop{position:absolute;inset:0;z-index:1000;pointer-events:auto;-webkit-tap-highlight-color:rgba(0,0,0,0);transition:opacity .4s cubic-bezier(.25,.8,.25,1);opacity:0}.cdk-overlay-backdrop.cdk-overlay-backdrop-showing{opacity:1}.cdk-high-contrast-active .cdk-overlay-backdrop.cdk-overlay-backdrop-showing{opacity:.6}.cdk-overlay-dark-backdrop{background:rgba(0,0,0,.32)}.cdk-overlay-transparent-backdrop{transition:visibility 1ms linear,opacity 1ms linear;visibility:hidden;opacity:1}.cdk-overlay-transparent-backdrop.cdk-overlay-backdrop-showing{opacity:0;visibility:visible}.cdk-overlay-backdrop-noop-animation{transition:none}.cdk-overlay-connected-position-bounding-box{position:absolute;z-index:1000;display:flex;flex-direction:column;min-width:1px;min-height:1px}.cdk-global-scrollblock{position:fixed;width:100%;overflow-y:scroll}textarea.cdk-textarea-autosize{resize:none}textarea.cdk-textarea-autosize-measuring{padding:2px 0!important;box-sizing:content-box!important;height:auto!important;overflow:hidden!important}textarea.cdk-textarea-autosize-measuring-firefox{padding:2px 0!important;box-sizing:content-box!important;height:0!important}@keyframes cdk-text-field-autofill-start{}@keyframes cdk-text-field-autofill-end{}.cdk-text-field-autofill-monitored:-webkit-autofill{animation:cdk-text-field-autofill-start 0s 1ms}.cdk-text-field-autofill-monitored:not(:-webkit-autofill){animation:cdk-text-field-autofill-end 0s 1ms}.mat-focus-indicator{position:relative}.mat-focus-indicator:before{inset:0;position:absolute;box-sizing:border-box;pointer-events:none;display:var(--mat-focus-indicator-display, none);border:var(--mat-focus-indicator-border-width, 3px) var(--mat-focus-indicator-border-style, solid) var(--mat-focus-indicator-border-color, transparent);border-radius:var(--mat-focus-indicator-border-radius, 4px)}.mat-focus-indicator:focus:before{content:""}.cdk-high-contrast-active{--mat-focus-indicator-display: block}.mat-mdc-focus-indicator{position:relative}.mat-mdc-focus-indicator:before{inset:0;position:absolute;box-sizing:border-box;pointer-events:none;display:var(--mat-mdc-focus-indicator-display, none);border:var(--mat-mdc-focus-indicator-border-width, 3px) var(--mat-mdc-focus-indicator-border-style, solid) var(--mat-mdc-focus-indicator-border-color, transparent);border-radius:var(--mat-mdc-focus-indicator-border-radius, 4px)}.mat-mdc-focus-indicator:focus:before{content:""}.cdk-high-contrast-active{--mat-mdc-focus-indicator-display: block}.mat-ripple-element{background-color:#0000001a}.mat-mdc-option{color:var(--mdc-theme-text-primary-on-background, rgba(0, 0, 0, .87))}.mat-mdc-option:hover:not(.mdc-list-item--disabled),.mat-mdc-option:focus:not(.mdc-list-item--disabled),.mat-mdc-option.mat-mdc-option-active,.mat-mdc-option.mdc-list-item--selected:not(.mat-mdc-option-multiple):not(.mdc-list-item--disabled){background:rgba(0,0,0,.04)}.mat-primary .mat-mdc-option.mdc-list-item--selected:not(.mdc-list-item--disabled) .mdc-list-item__primary-text{color:var(--mdc-theme-primary, #3f51b5)}.mat-accent .mat-mdc-option.mdc-list-item--selected:not(.mdc-list-item--disabled) .mdc-list-item__primary-text{color:var(--mdc-theme-secondary, #ff4081)}.mat-warn .mat-mdc-option.mdc-list-item--selected:not(.mdc-list-item--disabled) .mdc-list-item__primary-text{color:var(--mdc-theme-error, #f44336)}.mat-mdc-optgroup-label{color:var(--mdc-theme-text-primary-on-background, rgba(0, 0, 0, .87))}.mat-pseudo-checkbox-full{color:#0000008a}.mat-pseudo-checkbox-full.mat-pseudo-checkbox-disabled{color:#b0b0b0}.mat-primary .mat-pseudo-checkbox-checked.mat-pseudo-checkbox-minimal:after,.mat-primary .mat-pseudo-checkbox-indeterminate.mat-pseudo-checkbox-minimal:after{color:#3f51b5}.mat-primary .mat-pseudo-checkbox-checked.mat-pseudo-checkbox-full,.mat-primary .mat-pseudo-checkbox-indeterminate.mat-pseudo-checkbox-full{background:#3f51b5}.mat-primary .mat-pseudo-checkbox-checked.mat-pseudo-checkbox-full:after,.mat-primary .mat-pseudo-checkbox-indeterminate.mat-pseudo-checkbox-full:after{color:#fafafa}.mat-pseudo-checkbox-checked.mat-pseudo-checkbox-minimal:after,.mat-pseudo-checkbox-indeterminate.mat-pseudo-checkbox-minimal:after{color:#ff4081}.mat-pseudo-checkbox-checked.mat-pseudo-checkbox-full,.mat-pseudo-checkbox-indeterminate.mat-pseudo-checkbox-full{background:#ff4081}.mat-pseudo-checkbox-checked.mat-pseudo-checkbox-full:after,.mat-pseudo-checkbox-indeterminate.mat-pseudo-checkbox-full:after{color:#fafafa}.mat-accent .mat-pseudo-checkbox-checked.mat-pseudo-checkbox-minimal:after,.mat-accent .mat-pseudo-checkbox-indeterminate.mat-pseudo-checkbox-minimal:after{color:#ff4081}.mat-accent .mat-pseudo-checkbox-checked.mat-pseudo-checkbox-full,.mat-accent .mat-pseudo-checkbox-indeterminate.mat-pseudo-checkbox-full{background:#ff4081}.mat-accent .mat-pseudo-checkbox-checked.mat-pseudo-checkbox-full:after,.mat-accent .mat-pseudo-checkbox-indeterminate.mat-pseudo-checkbox-full:after{color:#fafafa}.mat-warn .mat-pseudo-checkbox-checked.mat-pseudo-checkbox-minimal:after,.mat-warn .mat-pseudo-checkbox-indeterminate.mat-pseudo-checkbox-minimal:after{color:#f44336}.mat-warn .mat-pseudo-checkbox-checked.mat-pseudo-checkbox-full,.mat-warn .mat-pseudo-checkbox-indeterminate.mat-pseudo-checkbox-full{background:#f44336}.mat-warn .mat-pseudo-checkbox-checked.mat-pseudo-checkbox-full:after,.mat-warn .mat-pseudo-checkbox-indeterminate.mat-pseudo-checkbox-full:after{color:#fafafa}.mat-pseudo-checkbox-disabled.mat-pseudo-checkbox-checked.mat-pseudo-checkbox-minimal:after,.mat-pseudo-checkbox-disabled.mat-pseudo-checkbox-indeterminate.mat-pseudo-checkbox-minimal:after{color:#b0b0b0}.mat-pseudo-checkbox-disabled.mat-pseudo-checkbox-checked.mat-pseudo-checkbox-full,.mat-pseudo-checkbox-disabled.mat-pseudo-checkbox-indeterminate.mat-pseudo-checkbox-full{background:#b0b0b0}.mat-app-background{background-color:#fafafa;color:#000000de}.mat-elevation-z0,.mat-mdc-elevation-specific.mat-elevation-z0{box-shadow:0 0 #0003,0 0 #00000024,0 0 #0000001f}.mat-elevation-z1,.mat-mdc-elevation-specific.mat-elevation-z1{box-shadow:0 2px 1px -1px #0003,0 1px 1px #00000024,0 1px 3px #0000001f}.mat-elevation-z2,.mat-mdc-elevation-specific.mat-elevation-z2{box-shadow:0 3px 1px -2px #0003,0 2px 2px #00000024,0 1px 5px #0000001f}.mat-elevation-z3,.mat-mdc-elevation-specific.mat-elevation-z3{box-shadow:0 3px 3px -2px #0003,0 3px 4px #00000024,0 1px 8px #0000001f}.mat-elevation-z4,.mat-mdc-elevation-specific.mat-elevation-z4{box-shadow:0 2px 4px -1px #0003,0 4px 5px #00000024,0 1px 10px #0000001f}.mat-elevation-z5,.mat-mdc-elevation-specific.mat-elevation-z5{box-shadow:0 3px 5px -1px #0003,0 5px 8px #00000024,0 1px 14px #0000001f}.mat-elevation-z6,.mat-mdc-elevation-specific.mat-elevation-z6{box-shadow:0 3px 5px -1px #0003,0 6px 10px #00000024,0 1px 18px #0000001f}.mat-elevation-z7,.mat-mdc-elevation-specific.mat-elevation-z7{box-shadow:0 4px 5px -2px #0003,0 7px 10px 1px #00000024,0 2px 16px 1px #0000001f}.mat-elevation-z8,.mat-mdc-elevation-specific.mat-elevation-z8{box-shadow:0 5px 5px -3px #0003,0 8px 10px 1px #00000024,0 3px 14px 2px #0000001f}.mat-elevation-z9,.mat-mdc-elevation-specific.mat-elevation-z9{box-shadow:0 5px 6px -3px #0003,0 9px 12px 1px #00000024,0 3px 16px 2px #0000001f}.mat-elevation-z10,.mat-mdc-elevation-specific.mat-elevation-z10{box-shadow:0 6px 6px -3px #0003,0 10px 14px 1px #00000024,0 4px 18px 3px #0000001f}.mat-elevation-z11,.mat-mdc-elevation-specific.mat-elevation-z11{box-shadow:0 6px 7px -4px #0003,0 11px 15px 1px #00000024,0 4px 20px 3px #0000001f}.mat-elevation-z12,.mat-mdc-elevation-specific.mat-elevation-z12{box-shadow:0 7px 8px -4px #0003,0 12px 17px 2px #00000024,0 5px 22px 4px #0000001f}.mat-elevation-z13,.mat-mdc-elevation-specific.mat-elevation-z13{box-shadow:0 7px 8px -4px #0003,0 13px 19px 2px #00000024,0 5px 24px 4px #0000001f}.mat-elevation-z14,.mat-mdc-elevation-specific.mat-elevation-z14{box-shadow:0 7px 9px -4px #0003,0 14px 21px 2px #00000024,0 5px 26px 4px #0000001f}.mat-elevation-z15,.mat-mdc-elevation-specific.mat-elevation-z15{box-shadow:0 8px 9px -5px #0003,0 15px 22px 2px #00000024,0 6px 28px 5px #0000001f}.mat-elevation-z16,.mat-mdc-elevation-specific.mat-elevation-z16{box-shadow:0 8px 10px -5px #0003,0 16px 24px 2px #00000024,0 6px 30px 5px #0000001f}.mat-elevation-z17,.mat-mdc-elevation-specific.mat-elevation-z17{box-shadow:0 8px 11px -5px #0003,0 17px 26px 2px #00000024,0 6px 32px 5px #0000001f}.mat-elevation-z18,.mat-mdc-elevation-specific.mat-elevation-z18{box-shadow:0 9px 11px -5px #0003,0 18px 28px 2px #00000024,0 7px 34px 6px #0000001f}.mat-elevation-z19,.mat-mdc-elevation-specific.mat-elevation-z19{box-shadow:0 9px 12px -6px #0003,0 19px 29px 2px #00000024,0 7px 36px 6px #0000001f}.mat-elevation-z20,.mat-mdc-elevation-specific.mat-elevation-z20{box-shadow:0 10px 13px -6px #0003,0 20px 31px 3px #00000024,0 8px 38px 7px #0000001f}.mat-elevation-z21,.mat-mdc-elevation-specific.mat-elevation-z21{box-shadow:0 10px 13px -6px #0003,0 21px 33px 3px #00000024,0 8px 40px 7px #0000001f}.mat-elevation-z22,.mat-mdc-elevation-specific.mat-elevation-z22{box-shadow:0 10px 14px -6px #0003,0 22px 35px 3px #00000024,0 8px 42px 7px #0000001f}.mat-elevation-z23,.mat-mdc-elevation-specific.mat-elevation-z23{box-shadow:0 11px 14px -7px #0003,0 23px 36px 3px #00000024,0 9px 44px 8px #0000001f}.mat-elevation-z24,.mat-mdc-elevation-specific.mat-elevation-z24{box-shadow:0 11px 15px -7px #0003,0 24px 38px 3px #00000024,0 9px 46px 8px #0000001f}.mat-theme-loaded-marker{display:none}.mat-mdc-option{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;font-family:var(--mdc-typography-body1-font-family, var(--mdc-typography-font-family, Roboto, sans-serif));font-size:var(--mdc-typography-body1-font-size, 16px);line-height:var(--mdc-typography-body1-line-height, 24px);font-weight:var(--mdc-typography-body1-font-weight, 400);letter-spacing:var(--mdc-typography-body1-letter-spacing, .03125em)}.mat-mdc-card{box-shadow:0 2px 1px -1px #0003,0 1px 1px #00000024,0 1px 3px #0000001f;--mdc-elevated-card-container-color:#fff}.mat-mdc-card-outlined{box-shadow:0 0 #0003,0 0 #00000024,0 0 #0000001f;--mdc-outlined-card-outline-color:#e0e0e0}.mat-mdc-card-subtitle{color:#0000008a}.mat-mdc-card-title{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;font-family:var(--mdc-typography-headline6-font-family, var(--mdc-typography-font-family, Roboto, sans-serif));font-size:var(--mdc-typography-headline6-font-size, 20px);line-height:var(--mdc-typography-headline6-line-height, 32px);font-weight:var(--mdc-typography-headline6-font-weight, 500);letter-spacing:var(--mdc-typography-headline6-letter-spacing, .0125em);-webkit-text-decoration:var(--mdc-typography-headline6-text-decoration, inherit);text-decoration:var(--mdc-typography-headline6-text-decoration, inherit);text-transform:var(--mdc-typography-headline6-text-transform, none)}.mat-mdc-card-subtitle{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;font-family:var(--mdc-typography-subtitle2-font-family, var(--mdc-typography-font-family, Roboto, sans-serif));font-size:var(--mdc-typography-subtitle2-font-size, 14px);line-height:var(--mdc-typography-subtitle2-line-height, 22px);font-weight:var(--mdc-typography-subtitle2-font-weight, 500);letter-spacing:var(--mdc-typography-subtitle2-letter-spacing, .0071428571em);-webkit-text-decoration:var(--mdc-typography-subtitle2-text-decoration, inherit);text-decoration:var(--mdc-typography-subtitle2-text-decoration, inherit);text-transform:var(--mdc-typography-subtitle2-text-transform, none)}.mat-mdc-progress-bar{--mdc-linear-progress-active-indicator-color:#3f51b5}.mat-mdc-progress-bar .mdc-linear-progress__buffer-dots{background-image:url("data:image/svg+xml,%3Csvg version='1.1' xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink' x='0px' y='0px' enable-background='new 0 0 5 2' xml:space='preserve' viewBox='0 0 5 2' preserveAspectRatio='none slice'%3E%3Ccircle cx='1' cy='1' r='1' fill='rgba(63, 81, 181, 0.25)'/%3E%3C/svg%3E")}.mat-mdc-progress-bar .mdc-linear-progress__buffer-bar{background-color:#3f51b540}.mat-mdc-progress-bar.mat-accent{--mdc-linear-progress-active-indicator-color:#ff4081}.mat-mdc-progress-bar.mat-accent .mdc-linear-progress__buffer-dots{background-image:url("data:image/svg+xml,%3Csvg version='1.1' xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink' x='0px' y='0px' enable-background='new 0 0 5 2' xml:space='preserve' viewBox='0 0 5 2' preserveAspectRatio='none slice'%3E%3Ccircle cx='1' cy='1' r='1' fill='rgba(255, 64, 129, 0.25)'/%3E%3C/svg%3E")}.mat-mdc-progress-bar.mat-accent .mdc-linear-progress__buffer-bar{background-color:#ff408140}.mat-mdc-progress-bar.mat-warn{--mdc-linear-progress-active-indicator-color:#f44336}.mat-mdc-progress-bar.mat-warn .mdc-linear-progress__buffer-dots{background-image:url("data:image/svg+xml,%3Csvg version='1.1' xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink' x='0px' y='0px' enable-background='new 0 0 5 2' xml:space='preserve' viewBox='0 0 5 2' preserveAspectRatio='none slice'%3E%3Ccircle cx='1' cy='1' r='1' fill='rgba(244, 67, 54, 0.25)'/%3E%3C/svg%3E")}.mat-mdc-progress-bar.mat-warn .mdc-linear-progress__buffer-bar{background-color:#f4433640}.mat-mdc-tooltip{--mdc-plain-tooltip-container-color:#616161;--mdc-plain-tooltip-supporting-text-color:white}.mat-mdc-tooltip{--mdc-plain-tooltip-supporting-text-font:Roboto, sans-serif;--mdc-plain-tooltip-supporting-text-size:12px;--mdc-plain-tooltip-supporting-text-weight:400;--mdc-plain-tooltip-supporting-text-tracking:.0333333333em}.mdc-text-field:not(.mdc-text-field--disabled) .mdc-floating-label{color:#0009}.mdc-text-field:not(.mdc-text-field--disabled) .mdc-text-field__input{color:#000000de}@media all{.mdc-text-field:not(.mdc-text-field--disabled) .mdc-text-field__input::placeholder{color:#0009}}@media all{.mdc-text-field:not(.mdc-text-field--disabled) .mdc-text-field__input:-ms-input-placeholder{color:#0009}}.mdc-text-field .mdc-text-field__input{caret-color:var(--mdc-theme-primary, #3f51b5)}.mdc-text-field:not(.mdc-text-field--disabled)+.mdc-text-field-helper-line .mdc-text-field-helper-text{color:#0009}.mdc-text-field:not(.mdc-text-field--disabled) .mdc-text-field-character-counter,.mdc-text-field:not(.mdc-text-field--disabled)+.mdc-text-field-helper-line .mdc-text-field-character-counter{color:#0009}.mdc-text-field:not(.mdc-text-field--disabled) .mdc-text-field__icon--leading{color:#0000008a}.mdc-text-field:not(.mdc-text-field--disabled) .mdc-text-field__icon--trailing{color:#0000008a}.mdc-text-field:not(.mdc-text-field--disabled) .mdc-text-field__affix--prefix{color:#0009}.mdc-text-field:not(.mdc-text-field--disabled) .mdc-text-field__affix--suffix{color:#0009}.mdc-text-field--filled .mdc-text-field__ripple:before,.mdc-text-field--filled .mdc-text-field__ripple:after{background-color:var(--mdc-ripple-color, rgba(0, 0, 0, .87))}.mdc-text-field--filled:hover .mdc-text-field__ripple:before,.mdc-text-field--filled.mdc-ripple-surface--hover .mdc-text-field__ripple:before{opacity:var(--mdc-ripple-hover-opacity, .04)}.mdc-text-field--filled.mdc-ripple-upgraded--background-focused .mdc-text-field__ripple:before,.mdc-text-field--filled:not(.mdc-ripple-upgraded):focus .mdc-text-field__ripple:before{opacity:var(--mdc-ripple-focus-opacity, .12)}.mdc-text-field--filled:not(.mdc-text-field--disabled){background-color:#f5f5f5}.mdc-text-field--filled:not(.mdc-text-field--disabled) .mdc-line-ripple:before{border-bottom-color:#0000006b}.mdc-text-field--filled:not(.mdc-text-field--disabled):hover .mdc-line-ripple:before{border-bottom-color:#000000de}.mdc-text-field--filled .mdc-line-ripple:after{border-bottom-color:var(--mdc-theme-primary, #3f51b5)}.mdc-text-field--outlined:not(.mdc-text-field--disabled) .mdc-notched-outline__leading,.mdc-text-field--outlined:not(.mdc-text-field--disabled) .mdc-notched-outline__notch,.mdc-text-field--outlined:not(.mdc-text-field--disabled) .mdc-notched-outline__trailing{border-color:#00000061}.mdc-text-field--outlined:not(.mdc-text-field--disabled):not(.mdc-text-field--focused):hover .mdc-notched-outline .mdc-notched-outline__leading,.mdc-text-field--outlined:not(.mdc-text-field--disabled):not(.mdc-text-field--focused):hover .mdc-notched-outline .mdc-notched-outline__notch,.mdc-text-field--outlined:not(.mdc-text-field--disabled):not(.mdc-text-field--focused):hover .mdc-notched-outline .mdc-notched-outline__trailing{border-color:#000000de}.mdc-text-field--outlined:not(.mdc-text-field--disabled).mdc-text-field--focused .mdc-notched-outline__leading,.mdc-text-field--outlined:not(.mdc-text-field--disabled).mdc-text-field--focused .mdc-notched-outline__notch,.mdc-text-field--outlined:not(.mdc-text-field--disabled).mdc-text-field--focused .mdc-notched-outline__trailing{border-color:var(--mdc-theme-primary, #3f51b5)}.mdc-text-field--outlined .mdc-text-field__ripple:before,.mdc-text-field--outlined .mdc-text-field__ripple:after{background-color:var(--mdc-ripple-color, transparent)}.mdc-text-field--focused:not(.mdc-text-field--disabled) .mdc-floating-label{color:#3f51b5de}.mdc-text-field--invalid:not(.mdc-text-field--disabled):hover .mdc-line-ripple:before{border-bottom-color:var(--mdc-theme-error, #f44336)}.mdc-text-field--invalid:not(.mdc-text-field--disabled) .mdc-line-ripple:after{border-bottom-color:var(--mdc-theme-error, #f44336)}.mdc-text-field--invalid:not(.mdc-text-field--disabled) .mdc-floating-label{color:var(--mdc-theme-error, #f44336)}.mdc-text-field--invalid:not(.mdc-text-field--disabled).mdc-text-field--invalid+.mdc-text-field-helper-line .mdc-text-field-helper-text--validation-msg{color:var(--mdc-theme-error, #f44336)}.mdc-text-field--invalid .mdc-text-field__input{caret-color:var(--mdc-theme-error, #f44336)}.mdc-text-field--invalid:not(.mdc-text-field--disabled) .mdc-text-field__icon--trailing{color:var(--mdc-theme-error, #f44336)}.mdc-text-field--invalid:not(.mdc-text-field--disabled) .mdc-line-ripple:before{border-bottom-color:var(--mdc-theme-error, #f44336)}.mdc-text-field--invalid:not(.mdc-text-field--disabled) .mdc-notched-outline__leading,.mdc-text-field--invalid:not(.mdc-text-field--disabled) .mdc-notched-outline__notch,.mdc-text-field--invalid:not(.mdc-text-field--disabled) .mdc-notched-outline__trailing{border-color:var(--mdc-theme-error, #f44336)}.mdc-text-field--invalid:not(.mdc-text-field--disabled):not(.mdc-text-field--focused):hover .mdc-notched-outline .mdc-notched-outline__leading,.mdc-text-field--invalid:not(.mdc-text-field--disabled):not(.mdc-text-field--focused):hover .mdc-notched-outline .mdc-notched-outline__notch,.mdc-text-field--invalid:not(.mdc-text-field--disabled):not(.mdc-text-field--focused):hover .mdc-notched-outline .mdc-notched-outline__trailing{border-color:var(--mdc-theme-error, #f44336)}.mdc-text-field--invalid:not(.mdc-text-field--disabled).mdc-text-field--focused .mdc-notched-outline__leading,.mdc-text-field--invalid:not(.mdc-text-field--disabled).mdc-text-field--focused .mdc-notched-outline__notch,.mdc-text-field--invalid:not(.mdc-text-field--disabled).mdc-text-field--focused .mdc-notched-outline__trailing{border-color:var(--mdc-theme-error, #f44336)}.mdc-text-field--disabled .mdc-text-field__input{color:#00000061}@media all{.mdc-text-field--disabled .mdc-text-field__input::placeholder{color:#00000061}}@media all{.mdc-text-field--disabled .mdc-text-field__input:-ms-input-placeholder{color:#00000061}}.mdc-text-field--disabled .mdc-floating-label{color:#00000061}.mdc-text-field--disabled+.mdc-text-field-helper-line .mdc-text-field-helper-text{color:#00000061}.mdc-text-field--disabled .mdc-text-field-character-counter,.mdc-text-field--disabled+.mdc-text-field-helper-line .mdc-text-field-character-counter{color:#00000061}.mdc-text-field--disabled .mdc-text-field__icon--leading,.mdc-text-field--disabled .mdc-text-field__icon--trailing{color:#0000004d}.mdc-text-field--disabled .mdc-text-field__affix--prefix,.mdc-text-field--disabled .mdc-text-field__affix--suffix{color:#00000061}.mdc-text-field--disabled .mdc-line-ripple:before{border-bottom-color:#0000000f}.mdc-text-field--disabled .mdc-notched-outline__leading,.mdc-text-field--disabled .mdc-notched-outline__notch,.mdc-text-field--disabled .mdc-notched-outline__trailing{border-color:#0000000f}@media screen and (forced-colors: active),(-ms-high-contrast: active){.mdc-text-field--disabled .mdc-text-field__input::placeholder{color:GrayText}}@media screen and (forced-colors: active),(-ms-high-contrast: active){.mdc-text-field--disabled .mdc-text-field__input:-ms-input-placeholder{color:GrayText}}@media screen and (forced-colors: active),(-ms-high-contrast: active){.mdc-text-field--disabled .mdc-floating-label{color:GrayText}}@media screen and (forced-colors: active),(-ms-high-contrast: active){.mdc-text-field--disabled+.mdc-text-field-helper-line .mdc-text-field-helper-text{color:GrayText}}@media screen and (forced-colors: active),(-ms-high-contrast: active){.mdc-text-field--disabled .mdc-text-field-character-counter,.mdc-text-field--disabled+.mdc-text-field-helper-line .mdc-text-field-character-counter{color:GrayText}}@media screen and (forced-colors: active),(-ms-high-contrast: active){.mdc-text-field--disabled .mdc-text-field__icon--leading{color:GrayText}}@media screen and (forced-colors: active),(-ms-high-contrast: active){.mdc-text-field--disabled .mdc-text-field__icon--trailing{color:GrayText}}@media screen and (forced-colors: active),(-ms-high-contrast: active){.mdc-text-field--disabled .mdc-text-field__affix--prefix{color:GrayText}}@media screen and (forced-colors: active),(-ms-high-contrast: active){.mdc-text-field--disabled .mdc-text-field__affix--suffix{color:GrayText}}@media screen and (forced-colors: active),(-ms-high-contrast: active){.mdc-text-field--disabled .mdc-line-ripple:before{border-bottom-color:GrayText}}@media screen and (forced-colors: active),(-ms-high-contrast: active){.mdc-text-field--disabled .mdc-notched-outline__leading,.mdc-text-field--disabled .mdc-notched-outline__notch,.mdc-text-field--disabled .mdc-notched-outline__trailing{border-color:GrayText}}.mdc-text-field--disabled.mdc-text-field--filled{background-color:#fafafa}.mat-mdc-form-field-error{color:var(--mdc-theme-error, #f44336)}.mat-mdc-form-field-focus-overlay{background-color:#000000de}.mat-mdc-form-field:hover .mat-mdc-form-field-focus-overlay{opacity:.04}.mat-mdc-form-field.mat-focused .mat-mdc-form-field-focus-overlay{opacity:.12}.mat-mdc-form-field-type-mat-native-select .mat-mdc-form-field-infix:after{color:#0000008a}.mat-mdc-form-field-type-mat-native-select.mat-focused.mat-primary .mat-mdc-form-field-infix:after{color:#3f51b5de}.mat-mdc-form-field-type-mat-native-select.mat-focused.mat-accent .mat-mdc-form-field-infix:after{color:#ff4081de}.mat-mdc-form-field-type-mat-native-select.mat-focused.mat-warn .mat-mdc-form-field-infix:after{color:#f44336de}.mat-mdc-form-field-type-mat-native-select.mat-form-field-disabled .mat-mdc-form-field-infix:after{color:#00000061}.mat-mdc-form-field.mat-accent .mdc-text-field__input{caret-color:var(--mdc-theme-secondary, #ff4081)}.mat-mdc-form-field.mat-accent:not(.mdc-text-field--disabled) .mdc-line-ripple:after{border-bottom-color:var(--mdc-theme-secondary, #ff4081)}.mat-mdc-form-field.mat-accent .mdc-text-field--focused:not(.mdc-text-field--disabled) .mdc-floating-label{color:#ff4081de}.mat-mdc-form-field.mat-accent .mdc-text-field--invalid:not(.mdc-text-field--disabled):hover .mdc-line-ripple:before{border-bottom-color:var(--mdc-theme-error, #f44336)}.mat-mdc-form-field.mat-accent .mdc-text-field--invalid:not(.mdc-text-field--disabled) .mdc-line-ripple:after{border-bottom-color:var(--mdc-theme-error, #f44336)}.mat-mdc-form-field.mat-accent .mdc-text-field--invalid:not(.mdc-text-field--disabled) .mdc-floating-label{color:var(--mdc-theme-error, #f44336)}.mat-mdc-form-field.mat-accent .mdc-text-field--invalid:not(.mdc-text-field--disabled).mdc-text-field--invalid+.mdc-text-field-helper-line .mdc-text-field-helper-text--validation-msg{color:var(--mdc-theme-error, #f44336)}.mat-mdc-form-field.mat-accent .mdc-text-field--invalid .mdc-text-field__input{caret-color:var(--mdc-theme-error, #f44336)}.mat-mdc-form-field.mat-accent .mdc-text-field--invalid:not(.mdc-text-field--disabled) .mdc-text-field__icon--trailing{color:var(--mdc-theme-error, #f44336)}.mat-mdc-form-field.mat-accent .mdc-text-field--invalid:not(.mdc-text-field--disabled) .mdc-line-ripple:before{border-bottom-color:var(--mdc-theme-error, #f44336)}.mat-mdc-form-field.mat-accent .mdc-text-field--invalid:not(.mdc-text-field--disabled) .mdc-notched-outline__leading,.mat-mdc-form-field.mat-accent .mdc-text-field--invalid:not(.mdc-text-field--disabled) .mdc-notched-outline__notch,.mat-mdc-form-field.mat-accent .mdc-text-field--invalid:not(.mdc-text-field--disabled) .mdc-notched-outline__trailing{border-color:var(--mdc-theme-error, #f44336)}.mat-mdc-form-field.mat-accent .mdc-text-field--invalid:not(.mdc-text-field--disabled):not(.mdc-text-field--focused):hover .mdc-notched-outline .mdc-notched-outline__leading,.mat-mdc-form-field.mat-accent .mdc-text-field--invalid:not(.mdc-text-field--disabled):not(.mdc-text-field--focused):hover .mdc-notched-outline .mdc-notched-outline__notch,.mat-mdc-form-field.mat-accent .mdc-text-field--invalid:not(.mdc-text-field--disabled):not(.mdc-text-field--focused):hover .mdc-notched-outline .mdc-notched-outline__trailing{border-color:var(--mdc-theme-error, #f44336)}.mat-mdc-form-field.mat-accent .mdc-text-field--invalid:not(.mdc-text-field--disabled).mdc-text-field--focused .mdc-notched-outline__leading,.mat-mdc-form-field.mat-accent .mdc-text-field--invalid:not(.mdc-text-field--disabled).mdc-text-field--focused .mdc-notched-outline__notch,.mat-mdc-form-field.mat-accent .mdc-text-field--invalid:not(.mdc-text-field--disabled).mdc-text-field--focused .mdc-notched-outline__trailing{border-color:var(--mdc-theme-error, #f44336)}.mat-mdc-form-field.mat-accent .mdc-text-field--outlined:not(.mdc-text-field--disabled).mdc-text-field--focused .mdc-notched-outline__leading,.mat-mdc-form-field.mat-accent .mdc-text-field--outlined:not(.mdc-text-field--disabled).mdc-text-field--focused .mdc-notched-outline__notch,.mat-mdc-form-field.mat-accent .mdc-text-field--outlined:not(.mdc-text-field--disabled).mdc-text-field--focused .mdc-notched-outline__trailing{border-color:var(--mdc-theme-secondary, #ff4081)}.mat-mdc-form-field.mat-warn .mdc-text-field__input{caret-color:var(--mdc-theme-error, #f44336)}.mat-mdc-form-field.mat-warn:not(.mdc-text-field--disabled) .mdc-line-ripple:after{border-bottom-color:var(--mdc-theme-error, #f44336)}.mat-mdc-form-field.mat-warn .mdc-text-field--focused:not(.mdc-text-field--disabled) .mdc-floating-label{color:#f44336de}.mat-mdc-form-field.mat-warn .mdc-text-field--invalid:not(.mdc-text-field--disabled):hover .mdc-line-ripple:before{border-bottom-color:var(--mdc-theme-error, #f44336)}.mat-mdc-form-field.mat-warn .mdc-text-field--invalid:not(.mdc-text-field--disabled) .mdc-line-ripple:after{border-bottom-color:var(--mdc-theme-error, #f44336)}.mat-mdc-form-field.mat-warn .mdc-text-field--invalid:not(.mdc-text-field--disabled) .mdc-floating-label{color:var(--mdc-theme-error, #f44336)}.mat-mdc-form-field.mat-warn .mdc-text-field--invalid:not(.mdc-text-field--disabled).mdc-text-field--invalid+.mdc-text-field-helper-line .mdc-text-field-helper-text--validation-msg{color:var(--mdc-theme-error, #f44336)}.mat-mdc-form-field.mat-warn .mdc-text-field--invalid .mdc-text-field__input{caret-color:var(--mdc-theme-error, #f44336)}.mat-mdc-form-field.mat-warn .mdc-text-field--invalid:not(.mdc-text-field--disabled) .mdc-text-field__icon--trailing{color:var(--mdc-theme-error, #f44336)}.mat-mdc-form-field.mat-warn .mdc-text-field--invalid:not(.mdc-text-field--disabled) .mdc-line-ripple:before{border-bottom-color:var(--mdc-theme-error, #f44336)}.mat-mdc-form-field.mat-warn .mdc-text-field--invalid:not(.mdc-text-field--disabled) .mdc-notched-outline__leading,.mat-mdc-form-field.mat-warn .mdc-text-field--invalid:not(.mdc-text-field--disabled) .mdc-notched-outline__notch,.mat-mdc-form-field.mat-warn .mdc-text-field--invalid:not(.mdc-text-field--disabled) .mdc-notched-outline__trailing{border-color:var(--mdc-theme-error, #f44336)}.mat-mdc-form-field.mat-warn .mdc-text-field--invalid:not(.mdc-text-field--disabled):not(.mdc-text-field--focused):hover .mdc-notched-outline .mdc-notched-outline__leading,.mat-mdc-form-field.mat-warn .mdc-text-field--invalid:not(.mdc-text-field--disabled):not(.mdc-text-field--focused):hover .mdc-notched-outline .mdc-notched-outline__notch,.mat-mdc-form-field.mat-warn .mdc-text-field--invalid:not(.mdc-text-field--disabled):not(.mdc-text-field--focused):hover .mdc-notched-outline .mdc-notched-outline__trailing{border-color:var(--mdc-theme-error, #f44336)}.mat-mdc-form-field.mat-warn .mdc-text-field--invalid:not(.mdc-text-field--disabled).mdc-text-field--focused .mdc-notched-outline__leading,.mat-mdc-form-field.mat-warn .mdc-text-field--invalid:not(.mdc-text-field--disabled).mdc-text-field--focused .mdc-notched-outline__notch,.mat-mdc-form-field.mat-warn .mdc-text-field--invalid:not(.mdc-text-field--disabled).mdc-text-field--focused .mdc-notched-outline__trailing{border-color:var(--mdc-theme-error, #f44336)}.mat-mdc-form-field.mat-warn .mdc-text-field--outlined:not(.mdc-text-field--disabled).mdc-text-field--focused .mdc-notched-outline__leading,.mat-mdc-form-field.mat-warn .mdc-text-field--outlined:not(.mdc-text-field--disabled).mdc-text-field--focused .mdc-notched-outline__notch,.mat-mdc-form-field.mat-warn .mdc-text-field--outlined:not(.mdc-text-field--disabled).mdc-text-field--focused .mdc-notched-outline__trailing{border-color:var(--mdc-theme-error, #f44336)}.mat-mdc-form-field.mat-mdc-form-field.mat-mdc-form-field.mat-mdc-form-field.mat-mdc-form-field .mdc-notched-outline__notch{border-left:1px solid rgba(0,0,0,0)}[dir=rtl] .mat-mdc-form-field.mat-mdc-form-field.mat-mdc-form-field.mat-mdc-form-field.mat-mdc-form-field .mdc-notched-outline__notch{border-left:none;border-right:1px solid rgba(0,0,0,0)}.mat-mdc-form-field-infix{min-height:56px}.mat-mdc-text-field-wrapper .mat-mdc-form-field-flex .mat-mdc-floating-label{top:28px}.mat-mdc-text-field-wrapper.mdc-text-field--outlined .mdc-notched-outline--upgraded .mdc-floating-label--float-above{--mat-mdc-form-field-label-transform: translateY( -34.75px) scale(var(--mat-mdc-form-field-floating-label-scale, .75));transform:var(--mat-mdc-form-field-label-transform)}.mat-mdc-text-field-wrapper.mdc-text-field--outlined .mat-mdc-form-field-infix{padding-top:16px;padding-bottom:16px}.mat-mdc-text-field-wrapper:not(.mdc-text-field--outlined) .mat-mdc-form-field-infix{padding-top:24px;padding-bottom:8px}.mdc-text-field--no-label:not(.mdc-text-field--outlined):not(.mdc-text-field--textarea) .mat-mdc-form-field-infix{padding-top:16px;padding-bottom:16px}.mdc-text-field__input,.mdc-text-field__affix{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;font-family:var(--mdc-typography-subtitle1-font-family, var(--mdc-typography-font-family, Roboto, sans-serif));font-size:var(--mdc-typography-subtitle1-font-size, 16px);font-weight:var(--mdc-typography-subtitle1-font-weight, 400);letter-spacing:var(--mdc-typography-subtitle1-letter-spacing, .009375em);-webkit-text-decoration:var(--mdc-typography-subtitle1-text-decoration, inherit);text-decoration:var(--mdc-typography-subtitle1-text-decoration, inherit);text-transform:var(--mdc-typography-subtitle1-text-transform, none)}.mdc-text-field--textarea .mdc-text-field__input{line-height:1.5rem}.mdc-floating-label{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;font-family:var(--mdc-typography-subtitle1-font-family, var(--mdc-typography-font-family, Roboto, sans-serif));font-size:var(--mdc-typography-subtitle1-font-size, 16px);font-weight:var(--mdc-typography-subtitle1-font-weight, 400);letter-spacing:var(--mdc-typography-subtitle1-letter-spacing, .009375em);-webkit-text-decoration:var(--mdc-typography-subtitle1-text-decoration, inherit);text-decoration:var(--mdc-typography-subtitle1-text-decoration, inherit);text-transform:var(--mdc-typography-subtitle1-text-transform, none)}.mat-mdc-form-field-subscript-wrapper,.mat-mdc-form-field-bottom-align:before{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;font-family:var(--mdc-typography-caption-font-family, var(--mdc-typography-font-family, Roboto, sans-serif));font-size:var(--mdc-typography-caption-font-size, 12px);line-height:var(--mdc-typography-caption-line-height, 20px);font-weight:var(--mdc-typography-caption-font-weight, 400);letter-spacing:var(--mdc-typography-caption-letter-spacing, .0333333333em);-webkit-text-decoration:var(--mdc-typography-caption-text-decoration, inherit);text-decoration:var(--mdc-typography-caption-text-decoration, inherit);text-transform:var(--mdc-typography-caption-text-transform, none)}.mat-mdc-form-field,.mat-mdc-floating-label{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;font-family:var(--mdc-typography-body1-font-family, var(--mdc-typography-font-family, Roboto, sans-serif));font-size:var(--mdc-typography-body1-font-size, 16px);line-height:var(--mdc-typography-body1-line-height, 24px);font-weight:var(--mdc-typography-body1-font-weight, 400);letter-spacing:var(--mdc-typography-body1-letter-spacing, .03125em);-webkit-text-decoration:var(--mdc-typography-body1-text-decoration, inherit);text-decoration:var(--mdc-typography-body1-text-decoration, inherit);text-transform:var(--mdc-typography-body1-text-transform, none)}.mat-mdc-form-field .mdc-text-field--outlined .mdc-floating-label--float-above{font-size:calc(16px * var(--mat-mdc-form-field-floating-label-scale, .75))}.mat-mdc-form-field .mdc-text-field--outlined .mdc-notched-outline--upgraded .mdc-floating-label--float-above{font-size:16px}.mat-mdc-select-value{color:#000000de}.mat-mdc-select-placeholder{color:#0009}.mat-mdc-select-disabled .mat-mdc-select-value{color:#00000061}.mat-mdc-select-arrow{color:#0000008a}.mat-mdc-form-field.mat-focused.mat-primary .mat-mdc-select-arrow{color:#3f51b5de}.mat-mdc-form-field.mat-focused.mat-accent .mat-mdc-select-arrow{color:#ff4081de}.mat-mdc-form-field.mat-focused.mat-warn .mat-mdc-select-arrow,.mat-mdc-form-field .mat-mdc-select.mat-mdc-select-invalid .mat-mdc-select-arrow{color:#f44336de}.mat-mdc-form-field .mat-mdc-select.mat-mdc-select-disabled .mat-mdc-select-arrow{color:#00000061}.mat-mdc-select-panel{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;font-family:var(--mdc-typography-subtitle1-font-family, var(--mdc-typography-font-family, Roboto, sans-serif));font-size:var(--mdc-typography-subtitle1-font-size, 16px);line-height:var(--mdc-typography-subtitle1-line-height, 28px);font-weight:var(--mdc-typography-subtitle1-font-weight, 400);letter-spacing:var(--mdc-typography-subtitle1-letter-spacing, .009375em);-webkit-text-decoration:var(--mdc-typography-subtitle1-text-decoration, inherit);text-decoration:var(--mdc-typography-subtitle1-text-decoration, inherit);text-transform:var(--mdc-typography-subtitle1-text-transform, none);line-height:24px}.mat-mdc-select{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;font-family:var(--mdc-typography-body1-font-family, var(--mdc-typography-font-family, Roboto, sans-serif));font-size:var(--mdc-typography-body1-font-size, 16px);line-height:var(--mdc-typography-body1-line-height, 24px);font-weight:var(--mdc-typography-body1-font-weight, 400);letter-spacing:var(--mdc-typography-body1-letter-spacing, .03125em);-webkit-text-decoration:var(--mdc-typography-body1-text-decoration, inherit);text-decoration:var(--mdc-typography-body1-text-decoration, inherit);text-transform:var(--mdc-typography-body1-text-transform, none)}.mat-mdc-autocomplete-panel{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;font-family:var(--mdc-typography-subtitle1-font-family, var(--mdc-typography-font-family, Roboto, sans-serif));font-size:var(--mdc-typography-subtitle1-font-size, 16px);line-height:var(--mdc-typography-subtitle1-line-height, 28px);font-weight:var(--mdc-typography-subtitle1-font-weight, 400);letter-spacing:var(--mdc-typography-subtitle1-letter-spacing, .009375em);-webkit-text-decoration:var(--mdc-typography-subtitle1-text-decoration, inherit);text-decoration:var(--mdc-typography-subtitle1-text-decoration, inherit);text-transform:var(--mdc-typography-subtitle1-text-transform, none);line-height:24px}.mat-mdc-dialog-container{--mdc-dialog-container-color:white;--mdc-dialog-with-divider-divider-color:rgba(0, 0, 0, .12);--mdc-dialog-subhead-color:rgba(0, 0, 0, .87);--mdc-dialog-supporting-text-color:rgba(0, 0, 0, .6)}.mat-mdc-dialog-container{--mdc-dialog-subhead-font:Roboto, sans-serif;--mdc-dialog-subhead-line-height:32px;--mdc-dialog-subhead-size:20px;--mdc-dialog-subhead-weight:500;--mdc-dialog-subhead-tracking:.0125em;--mdc-dialog-supporting-text-font:Roboto, sans-serif;--mdc-dialog-supporting-text-line-height:24px;--mdc-dialog-supporting-text-size:16px;--mdc-dialog-supporting-text-weight:400;--mdc-dialog-supporting-text-tracking:.03125em}.mat-mdc-standard-chip{--mdc-chip-elevated-container-color:#e0e0e0;--mdc-chip-elevated-disabled-container-color:#e0e0e0;--mdc-chip-label-text-color:#212121;--mdc-chip-disabled-label-text-color:#212121;--mdc-chip-with-icon-icon-color:#212121;--mdc-chip-with-icon-disabled-icon-color:#212121;--mdc-chip-with-trailing-icon-disabled-trailing-icon-color:#212121;--mdc-chip-with-trailing-icon-trailing-icon-color:#212121;--mdc-chip-with-icon-selected-icon-color:#212121}.mat-mdc-standard-chip.mat-primary.mat-mdc-chip-selected,.mat-mdc-standard-chip.mat-primary.mat-mdc-chip-highlighted{--mdc-chip-elevated-container-color:#3f51b5;--mdc-chip-elevated-disabled-container-color:#3f51b5;--mdc-chip-label-text-color:white;--mdc-chip-disabled-label-text-color:white;--mdc-chip-with-icon-icon-color:white;--mdc-chip-with-icon-disabled-icon-color:white;--mdc-chip-with-trailing-icon-disabled-trailing-icon-color:white;--mdc-chip-with-trailing-icon-trailing-icon-color:white;--mdc-chip-with-icon-selected-icon-color:white}.mat-mdc-standard-chip.mat-accent.mat-mdc-chip-selected,.mat-mdc-standard-chip.mat-accent.mat-mdc-chip-highlighted{--mdc-chip-elevated-container-color:#ff4081;--mdc-chip-elevated-disabled-container-color:#ff4081;--mdc-chip-label-text-color:white;--mdc-chip-disabled-label-text-color:white;--mdc-chip-with-icon-icon-color:white;--mdc-chip-with-icon-disabled-icon-color:white;--mdc-chip-with-trailing-icon-disabled-trailing-icon-color:white;--mdc-chip-with-trailing-icon-trailing-icon-color:white;--mdc-chip-with-icon-selected-icon-color:white}.mat-mdc-standard-chip.mat-warn.mat-mdc-chip-selected,.mat-mdc-standard-chip.mat-warn.mat-mdc-chip-highlighted{--mdc-chip-elevated-container-color:#f44336;--mdc-chip-elevated-disabled-container-color:#f44336;--mdc-chip-label-text-color:white;--mdc-chip-disabled-label-text-color:white;--mdc-chip-with-icon-icon-color:white;--mdc-chip-with-icon-disabled-icon-color:white;--mdc-chip-with-trailing-icon-disabled-trailing-icon-color:white;--mdc-chip-with-trailing-icon-trailing-icon-color:white;--mdc-chip-with-icon-selected-icon-color:white}.mat-mdc-chip-focus-overlay{background:#000}.mat-mdc-chip{height:32px}.mat-mdc-standard-chip{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;font-family:var(--mdc-typography-body2-font-family, var(--mdc-typography-font-family, Roboto, sans-serif));font-size:var(--mdc-typography-body2-font-size, 14px);line-height:var(--mdc-typography-body2-line-height, 20px);font-weight:var(--mdc-typography-body2-font-weight, 400);letter-spacing:var(--mdc-typography-body2-letter-spacing, .0178571429em);-webkit-text-decoration:var(--mdc-typography-body2-text-decoration, inherit);text-decoration:var(--mdc-typography-body2-text-decoration, inherit);text-transform:var(--mdc-typography-body2-text-transform, none)}.mat-mdc-slide-toggle{--mdc-switch-disabled-selected-handle-color:#424242;--mdc-switch-disabled-unselected-handle-color:#424242;--mdc-switch-disabled-selected-track-color:#424242;--mdc-switch-disabled-unselected-track-color:#424242;--mdc-switch-unselected-focus-state-layer-color:#424242;--mdc-switch-unselected-pressed-state-layer-color:#424242;--mdc-switch-unselected-hover-state-layer-color:#424242;--mdc-switch-unselected-focus-track-color:#e0e0e0;--mdc-switch-unselected-hover-track-color:#e0e0e0;--mdc-switch-unselected-pressed-track-color:#e0e0e0;--mdc-switch-unselected-track-color:#e0e0e0;--mdc-switch-unselected-focus-handle-color:#212121;--mdc-switch-unselected-hover-handle-color:#212121;--mdc-switch-unselected-pressed-handle-color:#212121;--mdc-switch-handle-surface-color:var(--mdc-theme-surface, #fff);--mdc-switch-unselected-handle-color:#616161;--mdc-switch-selected-icon-color:#fff;--mdc-switch-disabled-selected-icon-color:#fff;--mdc-switch-disabled-unselected-icon-color:#fff;--mdc-switch-unselected-icon-color:#fff}.mat-mdc-slide-toggle .mdc-form-field{color:var(--mdc-theme-text-primary-on-background, rgba(0, 0, 0, .87))}.mat-mdc-slide-toggle .mdc-switch--disabled+label{color:#00000061}.mat-mdc-slide-toggle.mat-primary{--mdc-switch-selected-focus-state-layer-color:#3949ab;--mdc-switch-selected-handle-color:#3949ab;--mdc-switch-selected-hover-state-layer-color:#3949ab;--mdc-switch-selected-pressed-state-layer-color:#3949ab;--mdc-switch-selected-focus-handle-color:#1a237e;--mdc-switch-selected-hover-handle-color:#1a237e;--mdc-switch-selected-pressed-handle-color:#1a237e;--mdc-switch-selected-focus-track-color:#7986cb;--mdc-switch-selected-hover-track-color:#7986cb;--mdc-switch-selected-pressed-track-color:#7986cb;--mdc-switch-selected-track-color:#7986cb}.mat-mdc-slide-toggle.mat-accent{--mdc-switch-selected-focus-state-layer-color:#d81b60;--mdc-switch-selected-handle-color:#d81b60;--mdc-switch-selected-hover-state-layer-color:#d81b60;--mdc-switch-selected-pressed-state-layer-color:#d81b60;--mdc-switch-selected-focus-handle-color:#880e4f;--mdc-switch-selected-hover-handle-color:#880e4f;--mdc-switch-selected-pressed-handle-color:#880e4f;--mdc-switch-selected-focus-track-color:#f06292;--mdc-switch-selected-hover-track-color:#f06292;--mdc-switch-selected-pressed-track-color:#f06292;--mdc-switch-selected-track-color:#f06292}.mat-mdc-slide-toggle.mat-warn{--mdc-switch-selected-focus-state-layer-color:#e53935;--mdc-switch-selected-handle-color:#e53935;--mdc-switch-selected-hover-state-layer-color:#e53935;--mdc-switch-selected-pressed-state-layer-color:#e53935;--mdc-switch-selected-focus-handle-color:#b71c1c;--mdc-switch-selected-hover-handle-color:#b71c1c;--mdc-switch-selected-pressed-handle-color:#b71c1c;--mdc-switch-selected-focus-track-color:#e57373;--mdc-switch-selected-hover-track-color:#e57373;--mdc-switch-selected-pressed-track-color:#e57373;--mdc-switch-selected-track-color:#e57373}.mat-mdc-slide-toggle{--mdc-switch-state-layer-size:48px}.mat-mdc-radio-button .mdc-form-field{color:var(--mdc-theme-text-primary-on-background, rgba(0, 0, 0, .87))}.mat-mdc-radio-button.mat-primary{--mdc-radio-disabled-selected-icon-color:#000;--mdc-radio-disabled-unselected-icon-color:#000;--mdc-radio-unselected-focus-icon-color:#212121;--mdc-radio-unselected-hover-icon-color:#212121;--mdc-radio-unselected-icon-color:rgba(0, 0, 0, .54);--mdc-radio-unselected-pressed-icon-color:rgba(0, 0, 0, .54);--mdc-radio-selected-focus-icon-color:#3f51b5;--mdc-radio-selected-hover-icon-color:#3f51b5;--mdc-radio-selected-icon-color:#3f51b5;--mdc-radio-selected-pressed-icon-color:#3f51b5;--mat-mdc-radio-ripple-color: #000;--mat-mdc-radio-checked-ripple-color: #3f51b5}.mat-mdc-radio-button.mat-primary .mdc-radio--disabled+label{color:#00000061}.mat-mdc-radio-button.mat-accent{--mdc-radio-disabled-selected-icon-color:#000;--mdc-radio-disabled-unselected-icon-color:#000;--mdc-radio-unselected-focus-icon-color:#212121;--mdc-radio-unselected-hover-icon-color:#212121;--mdc-radio-unselected-icon-color:rgba(0, 0, 0, .54);--mdc-radio-unselected-pressed-icon-color:rgba(0, 0, 0, .54);--mdc-radio-selected-focus-icon-color:#ff4081;--mdc-radio-selected-hover-icon-color:#ff4081;--mdc-radio-selected-icon-color:#ff4081;--mdc-radio-selected-pressed-icon-color:#ff4081;--mat-mdc-radio-ripple-color: #000;--mat-mdc-radio-checked-ripple-color: #ff4081}.mat-mdc-radio-button.mat-accent .mdc-radio--disabled+label{color:#00000061}.mat-mdc-radio-button.mat-warn{--mdc-radio-disabled-selected-icon-color:#000;--mdc-radio-disabled-unselected-icon-color:#000;--mdc-radio-unselected-focus-icon-color:#212121;--mdc-radio-unselected-hover-icon-color:#212121;--mdc-radio-unselected-icon-color:rgba(0, 0, 0, .54);--mdc-radio-unselected-pressed-icon-color:rgba(0, 0, 0, .54);--mdc-radio-selected-focus-icon-color:#f44336;--mdc-radio-selected-hover-icon-color:#f44336;--mdc-radio-selected-icon-color:#f44336;--mdc-radio-selected-pressed-icon-color:#f44336;--mat-mdc-radio-ripple-color: #000;--mat-mdc-radio-checked-ripple-color: #f44336}.mat-mdc-radio-button.mat-warn .mdc-radio--disabled+label{color:#00000061}.mat-mdc-radio-button .mdc-radio{padding:10px}.mat-mdc-radio-button .mdc-radio .mdc-radio__background:before{top:-10px;left:-10px;width:40px;height:40px}.mat-mdc-radio-button .mdc-radio .mdc-radio__native-control{top:0;right:0;left:0;width:40px;height:40px}.mat-mdc-slider{--mdc-slider-label-container-color:black;--mdc-slider-label-label-text-color:white;--mdc-slider-disabled-handle-color:#000;--mdc-slider-disabled-active-track-color:#000;--mdc-slider-disabled-inactive-track-color:#000;--mdc-slider-with-tick-marks-disabled-container-color:#000;--mat-mdc-slider-value-indicator-opacity: .6}.mat-mdc-slider.mat-primary{--mdc-slider-handle-color:#3f51b5;--mdc-slider-focus-handle-color:#3f51b5;--mdc-slider-hover-handle-color:#3f51b5;--mdc-slider-active-track-color:#3f51b5;--mdc-slider-inactive-track-color:#3f51b5;--mdc-slider-with-tick-marks-active-container-color:#fff;--mdc-slider-with-tick-marks-inactive-container-color:#3f51b5;--mat-mdc-slider-ripple-color: #3f51b5;--mat-mdc-slider-hover-ripple-color: rgba(63, 81, 181, .05);--mat-mdc-slider-focus-ripple-color: rgba(63, 81, 181, .2)}.mat-mdc-slider.mat-accent{--mdc-slider-handle-color:#ff4081;--mdc-slider-focus-handle-color:#ff4081;--mdc-slider-hover-handle-color:#ff4081;--mdc-slider-active-track-color:#ff4081;--mdc-slider-inactive-track-color:#ff4081;--mdc-slider-with-tick-marks-active-container-color:#fff;--mdc-slider-with-tick-marks-inactive-container-color:#ff4081;--mat-mdc-slider-ripple-color: #ff4081;--mat-mdc-slider-hover-ripple-color: rgba(255, 64, 129, .05);--mat-mdc-slider-focus-ripple-color: rgba(255, 64, 129, .2)}.mat-mdc-slider.mat-warn{--mdc-slider-handle-color:#f44336;--mdc-slider-focus-handle-color:#f44336;--mdc-slider-hover-handle-color:#f44336;--mdc-slider-active-track-color:#f44336;--mdc-slider-inactive-track-color:#f44336;--mdc-slider-with-tick-marks-active-container-color:#fff;--mdc-slider-with-tick-marks-inactive-container-color:#f44336;--mat-mdc-slider-ripple-color: #f44336;--mat-mdc-slider-hover-ripple-color: rgba(244, 67, 54, .05);--mat-mdc-slider-focus-ripple-color: rgba(244, 67, 54, .2)}.mat-mdc-slider{--mdc-slider-label-label-text-font:Roboto, sans-serif;--mdc-slider-label-label-text-size:14px;--mdc-slider-label-label-text-line-height:22px;--mdc-slider-label-label-text-tracking:.0071428571em;--mdc-slider-label-label-text-weight:500}.mdc-menu-surface{box-shadow:0 5px 5px -3px #0003,0 8px 10px 1px #00000024,0 3px 14px 2px #0000001f;background-color:var(--mdc-theme-surface, #fff);color:var(--mdc-theme-on-surface, #000)}.mdc-list-item__primary-text{color:var(--mdc-theme-text-primary-on-background, rgba(0, 0, 0, .87))}.mdc-list-item__secondary-text{color:var(--mdc-theme-text-secondary-on-background, rgba(0, 0, 0, .54))}.mdc-list-item__overline-text{color:var(--mdc-theme-text-hint-on-background, rgba(0, 0, 0, .38))}.mdc-list-item--with-leading-icon .mdc-list-item__start,.mdc-list-item--with-trailing-icon .mdc-list-item__end{background-color:transparent}.mdc-list-item--with-leading-icon .mdc-list-item__start,.mdc-list-item--with-trailing-icon .mdc-list-item__end{color:var(--mdc-theme-text-icon-on-background, rgba(0, 0, 0, .38))}.mdc-list-item__end{color:var(--mdc-theme-text-hint-on-background, rgba(0, 0, 0, .38))}.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:.38}.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,.mdc-list-item--disabled.mdc-list-item--with-leading-icon .mdc-list-item__start,.mdc-list-item--disabled.mdc-list-item--with-trailing-icon .mdc-list-item__end,.mdc-list-item--disabled.mdc-list-item--with-trailing-meta .mdc-list-item__end{color:var(--mdc-theme-on-surface, #000)}.mdc-list-item--selected .mdc-list-item__primary-text,.mdc-list-item--activated .mdc-list-item__primary-text,.mdc-list-item--selected.mdc-list-item--with-leading-icon .mdc-list-item__start,.mdc-list-item--activated.mdc-list-item--with-leading-icon .mdc-list-item__start{color:var(--mdc-theme-primary, #3f51b5)}.mdc-deprecated-list-group__subheader{color:var(--mdc-theme-text-primary-on-background, rgba(0, 0, 0, .87))}.mdc-list-divider:after{border-bottom-color:#fff}.mdc-list-divider{background-color:#0000001f}.mat-mdc-menu-item[disabled],.mat-mdc-menu-item[disabled] .mat-mdc-menu-submenu-icon,.mat-mdc-menu-item[disabled] .mat-icon-no-color{color:var(--mdc-theme-text-disabled-on-background, rgba(0, 0, 0, .38))}.mat-mdc-menu-item .mat-icon-no-color,.mat-mdc-menu-submenu-icon{color:var(--mdc-theme-text-primary-on-background, rgba(0, 0, 0, .87))}.mat-mdc-menu-item:hover:not([disabled]),.mat-mdc-menu-item.cdk-program-focused:not([disabled]),.mat-mdc-menu-item.cdk-keyboard-focused:not([disabled]),.mat-mdc-menu-item-highlighted:not([disabled]){background:rgba(0,0,0,.04)}.mat-mdc-menu-content{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;font-family:var(--mdc-typography-subtitle1-font-family, var(--mdc-typography-font-family, Roboto, sans-serif));font-size:var(--mdc-typography-subtitle1-font-size, 16px);line-height:var(--mdc-typography-subtitle1-line-height, 28px);font-weight:var(--mdc-typography-subtitle1-font-weight, 400);letter-spacing:var(--mdc-typography-subtitle1-letter-spacing, .009375em);-webkit-text-decoration:var(--mdc-typography-subtitle1-text-decoration, inherit);text-decoration:var(--mdc-typography-subtitle1-text-decoration, inherit);text-transform:var(--mdc-typography-subtitle1-text-transform, none);line-height:24px}.mat-mdc-menu-content,.mat-mdc-menu-content .mat-mdc-menu-item .mdc-list-item__primary-text{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;font-family:var(--mdc-typography-body1-font-family, var(--mdc-typography-font-family, Roboto, sans-serif));font-size:var(--mdc-typography-body1-font-size, 16px);line-height:var(--mdc-typography-body1-line-height, 24px);font-weight:var(--mdc-typography-body1-font-weight, 400);letter-spacing:var(--mdc-typography-body1-letter-spacing, .03125em);-webkit-text-decoration:var(--mdc-typography-body1-text-decoration, inherit);text-decoration:var(--mdc-typography-body1-text-decoration, inherit);text-transform:var(--mdc-typography-body1-text-transform, none)}.mat-mdc-list-base{--mdc-list-list-item-label-text-color:rgba(0, 0, 0, .87);--mdc-list-list-item-supporting-text-color:rgba(0, 0, 0, .54);--mdc-list-list-item-leading-icon-color:rgba(0, 0, 0, .38);--mdc-list-list-item-trailing-supporting-text-color:rgba(0, 0, 0, .38);--mdc-list-list-item-trailing-icon-color:rgba(0, 0, 0, .38);--mdc-list-list-item-selected-trailing-icon-color:rgba(0, 0, 0, .38);--mdc-list-list-item-disabled-label-text-color:black;--mdc-list-list-item-disabled-leading-icon-color:black;--mdc-list-list-item-disabled-trailing-icon-color:black;--mdc-list-list-item-hover-label-text-color:rgba(0, 0, 0, .87);--mdc-list-list-item-hover-leading-icon-color:rgba(0, 0, 0, .38);--mdc-list-list-item-hover-trailing-icon-color:rgba(0, 0, 0, .38);--mdc-list-list-item-focus-label-text-color:rgba(0, 0, 0, .87);--mdc-list-list-item-hover-state-layer-color:black;--mdc-list-list-item-hover-state-layer-opacity:.04;--mdc-list-list-item-focus-state-layer-color:black;--mdc-list-list-item-focus-state-layer-opacity:.12}.mat-mdc-list-option .mdc-list-item__start,.mat-mdc-list-option .mdc-list-item__end{--mdc-checkbox-selected-checkmark-color:#fff;--mdc-checkbox-selected-focus-icon-color:#3f51b5;--mdc-checkbox-selected-hover-icon-color:#3f51b5;--mdc-checkbox-selected-icon-color:#3f51b5;--mdc-checkbox-selected-pressed-icon-color:#3f51b5;--mdc-checkbox-unselected-focus-icon-color:#212121;--mdc-checkbox-unselected-hover-icon-color:#212121;--mdc-checkbox-disabled-selected-icon-color:rgba(0, 0, 0, .38);--mdc-checkbox-disabled-unselected-icon-color:rgba(0, 0, 0, .38);--mdc-checkbox-unselected-icon-color:rgba(0, 0, 0, .54);--mdc-checkbox-unselected-pressed-icon-color:rgba(0, 0, 0, .54)}.mat-mdc-list-option .mdc-list-item__start,.mat-mdc-list-option .mdc-list-item__end{--mdc-radio-disabled-selected-icon-color:#000;--mdc-radio-disabled-unselected-icon-color:#000;--mdc-radio-unselected-focus-icon-color:#212121;--mdc-radio-unselected-hover-icon-color:#212121;--mdc-radio-unselected-icon-color:rgba(0, 0, 0, .54);--mdc-radio-unselected-pressed-icon-color:rgba(0, 0, 0, .54);--mdc-radio-selected-focus-icon-color:#3f51b5;--mdc-radio-selected-hover-icon-color:#3f51b5;--mdc-radio-selected-icon-color:#3f51b5;--mdc-radio-selected-pressed-icon-color:#3f51b5;--mat-mdc-radio-ripple-color: #000;--mat-mdc-radio-checked-ripple-color: #3f51b5}.mat-mdc-list-option .mdc-list-item__start .mdc-radio--disabled+label,.mat-mdc-list-option .mdc-list-item__end .mdc-radio--disabled+label{color:#00000061}.mat-mdc-list-option.mat-accent .mdc-list-item__start,.mat-mdc-list-option.mat-accent .mdc-list-item__end{--mdc-checkbox-selected-checkmark-color:#fff;--mdc-checkbox-selected-focus-icon-color:#ff4081;--mdc-checkbox-selected-hover-icon-color:#ff4081;--mdc-checkbox-selected-icon-color:#ff4081;--mdc-checkbox-selected-pressed-icon-color:#ff4081;--mdc-checkbox-unselected-focus-icon-color:#212121;--mdc-checkbox-unselected-hover-icon-color:#212121;--mdc-checkbox-disabled-selected-icon-color:rgba(0, 0, 0, .38);--mdc-checkbox-disabled-unselected-icon-color:rgba(0, 0, 0, .38);--mdc-checkbox-unselected-icon-color:rgba(0, 0, 0, .54);--mdc-checkbox-unselected-pressed-icon-color:rgba(0, 0, 0, .54)}.mat-mdc-list-option.mat-accent .mdc-list-item__start,.mat-mdc-list-option.mat-accent .mdc-list-item__end{--mdc-radio-disabled-selected-icon-color:#000;--mdc-radio-disabled-unselected-icon-color:#000;--mdc-radio-unselected-focus-icon-color:#212121;--mdc-radio-unselected-hover-icon-color:#212121;--mdc-radio-unselected-icon-color:rgba(0, 0, 0, .54);--mdc-radio-unselected-pressed-icon-color:rgba(0, 0, 0, .54);--mdc-radio-selected-focus-icon-color:#ff4081;--mdc-radio-selected-hover-icon-color:#ff4081;--mdc-radio-selected-icon-color:#ff4081;--mdc-radio-selected-pressed-icon-color:#ff4081;--mat-mdc-radio-ripple-color: #000;--mat-mdc-radio-checked-ripple-color: #ff4081}.mat-mdc-list-option.mat-accent .mdc-list-item__start .mdc-radio--disabled+label,.mat-mdc-list-option.mat-accent .mdc-list-item__end .mdc-radio--disabled+label{color:#00000061}.mat-mdc-list-option.mat-warn .mdc-list-item__start,.mat-mdc-list-option.mat-warn .mdc-list-item__end{--mdc-checkbox-selected-checkmark-color:#fff;--mdc-checkbox-selected-focus-icon-color:#f44336;--mdc-checkbox-selected-hover-icon-color:#f44336;--mdc-checkbox-selected-icon-color:#f44336;--mdc-checkbox-selected-pressed-icon-color:#f44336;--mdc-checkbox-unselected-focus-icon-color:#212121;--mdc-checkbox-unselected-hover-icon-color:#212121;--mdc-checkbox-disabled-selected-icon-color:rgba(0, 0, 0, .38);--mdc-checkbox-disabled-unselected-icon-color:rgba(0, 0, 0, .38);--mdc-checkbox-unselected-icon-color:rgba(0, 0, 0, .54);--mdc-checkbox-unselected-pressed-icon-color:rgba(0, 0, 0, .54)}.mat-mdc-list-option.mat-warn .mdc-list-item__start,.mat-mdc-list-option.mat-warn .mdc-list-item__end{--mdc-radio-disabled-selected-icon-color:#000;--mdc-radio-disabled-unselected-icon-color:#000;--mdc-radio-unselected-focus-icon-color:#212121;--mdc-radio-unselected-hover-icon-color:#212121;--mdc-radio-unselected-icon-color:rgba(0, 0, 0, .54);--mdc-radio-unselected-pressed-icon-color:rgba(0, 0, 0, .54);--mdc-radio-selected-focus-icon-color:#f44336;--mdc-radio-selected-hover-icon-color:#f44336;--mdc-radio-selected-icon-color:#f44336;--mdc-radio-selected-pressed-icon-color:#f44336;--mat-mdc-radio-ripple-color: #000;--mat-mdc-radio-checked-ripple-color: #f44336}.mat-mdc-list-option.mat-warn .mdc-list-item__start .mdc-radio--disabled+label,.mat-mdc-list-option.mat-warn .mdc-list-item__end .mdc-radio--disabled+label{color:#00000061}.mat-mdc-list-base.mat-mdc-list-base .mdc-list-item--selected .mdc-list-item__primary-text,.mat-mdc-list-base.mat-mdc-list-base .mdc-list-item--activated .mdc-list-item__primary-text,.mat-mdc-list-base.mat-mdc-list-base .mdc-list-item--selected.mdc-list-item--with-leading-icon .mdc-list-item__start,.mat-mdc-list-base.mat-mdc-list-base .mdc-list-item--activated.mdc-list-item--with-leading-icon .mdc-list-item__start{color:#3f51b5}.mat-mdc-list-base .mdc-list-item--disabled .mdc-list-item__start,.mat-mdc-list-base .mdc-list-item--disabled .mdc-list-item__content,.mat-mdc-list-base .mdc-list-item--disabled .mdc-list-item__end{opacity:1}.mat-mdc-list-base{--mdc-list-list-item-one-line-container-height:48px;--mdc-list-list-item-two-line-container-height:64px;--mdc-list-list-item-three-line-container-height:88px}.mat-mdc-list-item.mdc-list-item--with-leading-avatar.mdc-list-item--with-one-line,.mat-mdc-list-item.mdc-list-item--with-leading-checkbox.mdc-list-item--with-one-line,.mat-mdc-list-item.mdc-list-item--with-leading-icon.mdc-list-item--with-one-line{height:56px}.mat-mdc-list-item.mdc-list-item--with-leading-avatar.mdc-list-item--with-two-lines,.mat-mdc-list-item.mdc-list-item--with-leading-checkbox.mdc-list-item--with-two-lines,.mat-mdc-list-item.mdc-list-item--with-leading-icon.mdc-list-item--with-two-lines{height:72px}.mat-mdc-list-base{--mdc-list-list-item-label-text-font:Roboto, sans-serif;--mdc-list-list-item-label-text-line-height:24px;--mdc-list-list-item-label-text-size:16px;--mdc-list-list-item-label-text-tracking:.03125em;--mdc-list-list-item-label-text-weight:400;--mdc-list-list-item-supporting-text-font:Roboto, sans-serif;--mdc-list-list-item-supporting-text-line-height:20px;--mdc-list-list-item-supporting-text-size:14px;--mdc-list-list-item-supporting-text-tracking:.0178571429em;--mdc-list-list-item-supporting-text-weight:400;--mdc-list-list-item-trailing-supporting-text-font:Roboto, sans-serif;--mdc-list-list-item-trailing-supporting-text-line-height:20px;--mdc-list-list-item-trailing-supporting-text-size:12px;--mdc-list-list-item-trailing-supporting-text-tracking:.0333333333em;--mdc-list-list-item-trailing-supporting-text-weight:400}.mdc-list-group__subheader{font-size:16px;font-weight:400;line-height:28px;font-family:Roboto,sans-serif;letter-spacing:.009375em}.mat-mdc-paginator{background:#fff;color:#000000de}.mat-mdc-paginator-icon{fill:#0000008a}.mat-mdc-paginator-decrement,.mat-mdc-paginator-increment{border-top:2px solid rgba(0,0,0,.54);border-right:2px solid rgba(0,0,0,.54)}.mat-mdc-paginator-first,.mat-mdc-paginator-last{border-top:2px solid rgba(0,0,0,.54)}.mat-mdc-icon-button[disabled] .mat-mdc-paginator-decrement,.mat-mdc-icon-button[disabled] .mat-mdc-paginator-increment,.mat-mdc-icon-button[disabled] .mat-mdc-paginator-first,.mat-mdc-icon-button[disabled] .mat-mdc-paginator-last{border-color:#0000001f}.mat-mdc-icon-button[disabled] .mat-mdc-paginator-icon{fill:#0000001f}.mat-mdc-paginator .mat-mdc-form-field-infix{min-height:40px}.mat-mdc-paginator .mat-mdc-text-field-wrapper .mat-mdc-form-field-flex .mat-mdc-floating-label{top:20px}.mat-mdc-paginator .mat-mdc-text-field-wrapper.mdc-text-field--outlined .mdc-notched-outline--upgraded .mdc-floating-label--float-above{--mat-mdc-form-field-label-transform: translateY( -26.75px) scale(var(--mat-mdc-form-field-floating-label-scale, .75));transform:var(--mat-mdc-form-field-label-transform)}.mat-mdc-paginator .mat-mdc-text-field-wrapper.mdc-text-field--outlined .mat-mdc-form-field-infix{padding-top:8px;padding-bottom:8px}.mat-mdc-paginator .mat-mdc-text-field-wrapper:not(.mdc-text-field--outlined) .mat-mdc-form-field-infix{padding-top:8px;padding-bottom:8px}.mat-mdc-paginator .mdc-text-field--no-label:not(.mdc-text-field--outlined):not(.mdc-text-field--textarea) .mat-mdc-form-field-infix{padding-top:8px;padding-bottom:8px}.mat-mdc-paginator .mat-mdc-text-field-wrapper:not(.mdc-text-field--outlined) .mat-mdc-floating-label{display:none}.mat-mdc-paginator-container{min-height:56px}.mat-mdc-paginator{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;font-family:var(--mdc-typography-caption-font-family, var(--mdc-typography-font-family, Roboto, sans-serif));font-size:var(--mdc-typography-caption-font-size, 12px);line-height:var(--mdc-typography-caption-line-height, 20px);font-weight:var(--mdc-typography-caption-font-weight, 400);letter-spacing:var(--mdc-typography-caption-letter-spacing, .0333333333em);-webkit-text-decoration:var(--mdc-typography-caption-text-decoration, inherit);text-decoration:var(--mdc-typography-caption-text-decoration, inherit);text-transform:var(--mdc-typography-caption-text-transform, none)}.mat-mdc-paginator .mat-mdc-select-value{font-size:12px}.mat-mdc-tab,.mat-mdc-tab-link{background-color:#0000}.mat-mdc-tab .mdc-tab__text-label,.mat-mdc-tab-link .mdc-tab__text-label{color:#0009}.mat-mdc-tab.mat-mdc-tab-disabled .mdc-tab__ripple:before,.mat-mdc-tab.mat-mdc-tab-disabled .mat-ripple-element,.mat-mdc-tab-link.mat-mdc-tab-disabled .mdc-tab__ripple:before,.mat-mdc-tab-link.mat-mdc-tab-disabled .mat-ripple-element{background-color:#00000061}.mat-mdc-tab:not(.mat-mdc-tab-disabled).mdc-tab--active .mdc-tab__text-label,.mat-mdc-tab-link:not(.mat-mdc-tab-disabled).mdc-tab--active .mdc-tab__text-label{color:#3f51b5}.mat-mdc-tab:not(.mat-mdc-tab-disabled) .mdc-tab-indicator__content--underline,.mat-mdc-tab-link:not(.mat-mdc-tab-disabled) .mdc-tab-indicator__content--underline{border-color:var(--mdc-tab-indicator-active-indicator-color, #3f51b5)}.mdc-tab__ripple:before,.mat-mdc-tab .mat-ripple-element,.mat-mdc-tab-header-pagination .mat-ripple-element,.mat-mdc-tab-link .mat-ripple-element{background-color:#3f51b5}.mat-mdc-tab-group.mat-accent .mat-mdc-tab:not(.mat-mdc-tab-disabled).mdc-tab--active .mdc-tab__text-label,.mat-mdc-tab-group.mat-accent .mat-mdc-tab-link:not(.mat-mdc-tab-disabled).mdc-tab--active .mdc-tab__text-label,.mat-mdc-tab-nav-bar.mat-accent .mat-mdc-tab:not(.mat-mdc-tab-disabled).mdc-tab--active .mdc-tab__text-label,.mat-mdc-tab-nav-bar.mat-accent .mat-mdc-tab-link:not(.mat-mdc-tab-disabled).mdc-tab--active .mdc-tab__text-label{color:#ff4081}.mat-mdc-tab-group.mat-accent .mat-mdc-tab:not(.mat-mdc-tab-disabled) .mdc-tab-indicator__content--underline,.mat-mdc-tab-group.mat-accent .mat-mdc-tab-link:not(.mat-mdc-tab-disabled) .mdc-tab-indicator__content--underline,.mat-mdc-tab-nav-bar.mat-accent .mat-mdc-tab:not(.mat-mdc-tab-disabled) .mdc-tab-indicator__content--underline,.mat-mdc-tab-nav-bar.mat-accent .mat-mdc-tab-link:not(.mat-mdc-tab-disabled) .mdc-tab-indicator__content--underline{border-color:var(--mdc-tab-indicator-active-indicator-color, #ff4081)}.mat-mdc-tab-group.mat-accent .mdc-tab__ripple:before,.mat-mdc-tab-group.mat-accent .mat-mdc-tab .mat-ripple-element,.mat-mdc-tab-group.mat-accent .mat-mdc-tab-header-pagination .mat-ripple-element,.mat-mdc-tab-group.mat-accent .mat-mdc-tab-link .mat-ripple-element,.mat-mdc-tab-nav-bar.mat-accent .mdc-tab__ripple:before,.mat-mdc-tab-nav-bar.mat-accent .mat-mdc-tab .mat-ripple-element,.mat-mdc-tab-nav-bar.mat-accent .mat-mdc-tab-header-pagination .mat-ripple-element,.mat-mdc-tab-nav-bar.mat-accent .mat-mdc-tab-link .mat-ripple-element{background-color:#ff4081}.mat-mdc-tab-group.mat-warn .mat-mdc-tab:not(.mat-mdc-tab-disabled).mdc-tab--active .mdc-tab__text-label,.mat-mdc-tab-group.mat-warn .mat-mdc-tab-link:not(.mat-mdc-tab-disabled).mdc-tab--active .mdc-tab__text-label,.mat-mdc-tab-nav-bar.mat-warn .mat-mdc-tab:not(.mat-mdc-tab-disabled).mdc-tab--active .mdc-tab__text-label,.mat-mdc-tab-nav-bar.mat-warn .mat-mdc-tab-link:not(.mat-mdc-tab-disabled).mdc-tab--active .mdc-tab__text-label{color:#f44336}.mat-mdc-tab-group.mat-warn .mat-mdc-tab:not(.mat-mdc-tab-disabled) .mdc-tab-indicator__content--underline,.mat-mdc-tab-group.mat-warn .mat-mdc-tab-link:not(.mat-mdc-tab-disabled) .mdc-tab-indicator__content--underline,.mat-mdc-tab-nav-bar.mat-warn .mat-mdc-tab:not(.mat-mdc-tab-disabled) .mdc-tab-indicator__content--underline,.mat-mdc-tab-nav-bar.mat-warn .mat-mdc-tab-link:not(.mat-mdc-tab-disabled) .mdc-tab-indicator__content--underline{border-color:var(--mdc-tab-indicator-active-indicator-color, #f44336)}.mat-mdc-tab-group.mat-warn .mdc-tab__ripple:before,.mat-mdc-tab-group.mat-warn .mat-mdc-tab .mat-ripple-element,.mat-mdc-tab-group.mat-warn .mat-mdc-tab-header-pagination .mat-ripple-element,.mat-mdc-tab-group.mat-warn .mat-mdc-tab-link .mat-ripple-element,.mat-mdc-tab-nav-bar.mat-warn .mdc-tab__ripple:before,.mat-mdc-tab-nav-bar.mat-warn .mat-mdc-tab .mat-ripple-element,.mat-mdc-tab-nav-bar.mat-warn .mat-mdc-tab-header-pagination .mat-ripple-element,.mat-mdc-tab-nav-bar.mat-warn .mat-mdc-tab-link .mat-ripple-element{background-color:#f44336}.mat-mdc-tab-group.mat-background-primary,.mat-mdc-tab-nav-bar.mat-background-primary{--mat-mdc-tab-header-with-background-background-color: #3f51b5;--mat-mdc-tab-header-with-background-foreground-color: #fff}.mat-mdc-tab-group.mat-background-accent,.mat-mdc-tab-nav-bar.mat-background-accent{--mat-mdc-tab-header-with-background-background-color: #ff4081;--mat-mdc-tab-header-with-background-foreground-color: #fff}.mat-mdc-tab-group.mat-background-warn,.mat-mdc-tab-nav-bar.mat-background-warn{--mat-mdc-tab-header-with-background-background-color: #f44336;--mat-mdc-tab-header-with-background-foreground-color: #fff}.mat-mdc-tab-header-pagination-chevron{border-color:var(--mdc-theme-on-surface, #000)}.mat-mdc-tab-header .mdc-tab{height:48px}.mdc-tab{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;font-family:var(--mdc-typography-button-font-family, var(--mdc-typography-font-family, Roboto, sans-serif));font-size:var(--mdc-typography-button-font-size, 14px);line-height:var(--mdc-typography-button-line-height, 36px);font-weight:var(--mdc-typography-button-font-weight, 500);letter-spacing:var(--mdc-typography-button-letter-spacing, .0892857143em);-webkit-text-decoration:var(--mdc-typography-button-text-decoration, none);text-decoration:var(--mdc-typography-button-text-decoration, none);text-transform:var(--mdc-typography-button-text-transform, none)}.mat-mdc-checkbox .mdc-form-field{color:var(--mdc-theme-text-primary-on-background, rgba(0, 0, 0, .87))}.mat-mdc-checkbox .mat-ripple-element{background-color:#0000001a}.mat-mdc-checkbox .mdc-checkbox__ripple{background:#000}.mat-mdc-checkbox.mat-primary{--mdc-checkbox-selected-checkmark-color:#fff;--mdc-checkbox-selected-focus-icon-color:#3f51b5;--mdc-checkbox-selected-hover-icon-color:#3f51b5;--mdc-checkbox-selected-icon-color:#3f51b5;--mdc-checkbox-selected-pressed-icon-color:#3f51b5;--mdc-checkbox-unselected-focus-icon-color:#212121;--mdc-checkbox-unselected-hover-icon-color:#212121;--mdc-checkbox-disabled-selected-icon-color:rgba(0, 0, 0, .38);--mdc-checkbox-disabled-unselected-icon-color:rgba(0, 0, 0, .38);--mdc-checkbox-unselected-icon-color:rgba(0, 0, 0, .54);--mdc-checkbox-unselected-pressed-icon-color:rgba(0, 0, 0, .54)}.mat-mdc-checkbox.mat-primary .mdc-checkbox--selected~.mat-mdc-checkbox-ripple .mat-ripple-element{background-color:#3f51b51a}.mat-mdc-checkbox.mat-primary .mdc-checkbox--selected~.mdc-checkbox__ripple{background:#3f51b5}.mat-mdc-checkbox.mat-accent{--mdc-checkbox-selected-checkmark-color:#fff;--mdc-checkbox-selected-focus-icon-color:#ff4081;--mdc-checkbox-selected-hover-icon-color:#ff4081;--mdc-checkbox-selected-icon-color:#ff4081;--mdc-checkbox-selected-pressed-icon-color:#ff4081;--mdc-checkbox-unselected-focus-icon-color:#212121;--mdc-checkbox-unselected-hover-icon-color:#212121;--mdc-checkbox-disabled-selected-icon-color:rgba(0, 0, 0, .38);--mdc-checkbox-disabled-unselected-icon-color:rgba(0, 0, 0, .38);--mdc-checkbox-unselected-icon-color:rgba(0, 0, 0, .54);--mdc-checkbox-unselected-pressed-icon-color:rgba(0, 0, 0, .54)}.mat-mdc-checkbox.mat-accent .mdc-checkbox--selected~.mat-mdc-checkbox-ripple .mat-ripple-element{background-color:#ff40811a}.mat-mdc-checkbox.mat-accent .mdc-checkbox--selected~.mdc-checkbox__ripple{background:#ff4081}.mat-mdc-checkbox.mat-warn{--mdc-checkbox-selected-checkmark-color:#fff;--mdc-checkbox-selected-focus-icon-color:#f44336;--mdc-checkbox-selected-hover-icon-color:#f44336;--mdc-checkbox-selected-icon-color:#f44336;--mdc-checkbox-selected-pressed-icon-color:#f44336;--mdc-checkbox-unselected-focus-icon-color:#212121;--mdc-checkbox-unselected-hover-icon-color:#212121;--mdc-checkbox-disabled-selected-icon-color:rgba(0, 0, 0, .38);--mdc-checkbox-disabled-unselected-icon-color:rgba(0, 0, 0, .38);--mdc-checkbox-unselected-icon-color:rgba(0, 0, 0, .54);--mdc-checkbox-unselected-pressed-icon-color:rgba(0, 0, 0, .54)}.mat-mdc-checkbox.mat-warn .mdc-checkbox--selected~.mat-mdc-checkbox-ripple .mat-ripple-element{background-color:#f443361a}.mat-mdc-checkbox.mat-warn .mdc-checkbox--selected~.mdc-checkbox__ripple{background:#f44336}.mat-mdc-checkbox-disabled label{color:#00000061}.mat-mdc-checkbox .mdc-checkbox{padding:calc((var(--mdc-checkbox-ripple-size, 40px) - 18px) / 2);margin:calc((var(--mdc-checkbox-touch-target-size, 40px) - 40px) / 2)}.mat-mdc-checkbox .mdc-checkbox .mdc-checkbox__background{top:calc((var(--mdc-checkbox-ripple-size, 40px) - 18px) / 2);left:calc((var(--mdc-checkbox-ripple-size, 40px) - 18px) / 2)}.mat-mdc-checkbox .mdc-checkbox .mdc-checkbox__native-control{top:calc((40px - var(--mdc-checkbox-touch-target-size, 40px)) / 2);right:calc((40px - var(--mdc-checkbox-touch-target-size, 40px)) / 2);left:calc((40px - var(--mdc-checkbox-touch-target-size, 40px)) / 2);width:var(--mdc-checkbox-touch-target-size, 40px);height:var(--mdc-checkbox-touch-target-size, 40px)}@media all and (-ms-high-contrast: none){.mdc-checkbox .mdc-checkbox__focus-ring{display:none}}.mdc-form-field{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;font-family:var(--mdc-typography-body2-font-family, var(--mdc-typography-font-family, Roboto, sans-serif));font-size:var(--mdc-typography-body2-font-size, 14px);line-height:var(--mdc-typography-body2-line-height, 20px);font-weight:var(--mdc-typography-body2-font-weight, 400);letter-spacing:var(--mdc-typography-body2-letter-spacing, .0178571429em);-webkit-text-decoration:var(--mdc-typography-body2-text-decoration, inherit);text-decoration:var(--mdc-typography-body2-text-decoration, inherit);text-transform:var(--mdc-typography-body2-text-transform, none)}.mat-mdc-button.mat-unthemed{--mdc-text-button-label-text-color:#000}.mat-mdc-button.mat-primary{--mdc-text-button-label-text-color:#3f51b5}.mat-mdc-button.mat-accent{--mdc-text-button-label-text-color:#ff4081}.mat-mdc-button.mat-warn{--mdc-text-button-label-text-color:#f44336}.mat-mdc-button[disabled][disabled]{--mdc-text-button-disabled-label-text-color:rgba(0, 0, 0, .38);--mdc-text-button-label-text-color:rgba(0, 0, 0, .38)}.mat-mdc-unelevated-button.mat-unthemed{--mdc-filled-button-container-color:#fff;--mdc-filled-button-label-text-color:#000}.mat-mdc-unelevated-button.mat-primary{--mdc-filled-button-container-color:#3f51b5;--mdc-filled-button-label-text-color:#fff}.mat-mdc-unelevated-button.mat-accent{--mdc-filled-button-container-color:#ff4081;--mdc-filled-button-label-text-color:#fff}.mat-mdc-unelevated-button.mat-warn{--mdc-filled-button-container-color:#f44336;--mdc-filled-button-label-text-color:#fff}.mat-mdc-unelevated-button[disabled][disabled]{--mdc-filled-button-disabled-container-color:rgba(0, 0, 0, .12);--mdc-filled-button-disabled-label-text-color:rgba(0, 0, 0, .38);--mdc-filled-button-container-color:rgba(0, 0, 0, .12);--mdc-filled-button-label-text-color:rgba(0, 0, 0, .38)}.mat-mdc-raised-button.mat-unthemed{--mdc-protected-button-container-color:#fff;--mdc-protected-button-label-text-color:#000}.mat-mdc-raised-button.mat-primary{--mdc-protected-button-container-color:#3f51b5;--mdc-protected-button-label-text-color:#fff}.mat-mdc-raised-button.mat-accent{--mdc-protected-button-container-color:#ff4081;--mdc-protected-button-label-text-color:#fff}.mat-mdc-raised-button.mat-warn{--mdc-protected-button-container-color:#f44336;--mdc-protected-button-label-text-color:#fff}.mat-mdc-raised-button[disabled][disabled]{--mdc-protected-button-disabled-container-color:rgba(0, 0, 0, .12);--mdc-protected-button-disabled-label-text-color:rgba(0, 0, 0, .38);--mdc-protected-button-container-color:rgba(0, 0, 0, .12);--mdc-protected-button-label-text-color:rgba(0, 0, 0, .38);--mdc-protected-button-container-elevation:0}.mat-mdc-outlined-button{--mdc-outlined-button-outline-color:rgba(0, 0, 0, .12)}.mat-mdc-outlined-button.mat-unthemed{--mdc-outlined-button-label-text-color:#000}.mat-mdc-outlined-button.mat-primary{--mdc-outlined-button-label-text-color:#3f51b5}.mat-mdc-outlined-button.mat-accent{--mdc-outlined-button-label-text-color:#ff4081}.mat-mdc-outlined-button.mat-warn{--mdc-outlined-button-label-text-color:#f44336}.mat-mdc-outlined-button[disabled][disabled]{--mdc-outlined-button-label-text-color:rgba(0, 0, 0, .38);--mdc-outlined-button-disabled-label-text-color:rgba(0, 0, 0, .38);--mdc-outlined-button-outline-color:rgba(0, 0, 0, .12);--mdc-outlined-button-disabled-outline-color:rgba(0, 0, 0, .12)}.mat-mdc-button,.mat-mdc-outlined-button{--mat-mdc-button-persistent-ripple-color: #000;--mat-mdc-button-ripple-color: rgba(0, 0, 0, .1)}.mat-mdc-button:hover .mat-mdc-button-persistent-ripple:before,.mat-mdc-outlined-button:hover .mat-mdc-button-persistent-ripple:before{opacity:.04}.mat-mdc-button.cdk-program-focused .mat-mdc-button-persistent-ripple:before,.mat-mdc-button.cdk-keyboard-focused .mat-mdc-button-persistent-ripple:before,.mat-mdc-outlined-button.cdk-program-focused .mat-mdc-button-persistent-ripple:before,.mat-mdc-outlined-button.cdk-keyboard-focused .mat-mdc-button-persistent-ripple:before{opacity:.12}.mat-mdc-button:active .mat-mdc-button-persistent-ripple:before,.mat-mdc-outlined-button:active .mat-mdc-button-persistent-ripple:before{opacity:.12}.mat-mdc-button.mat-primary,.mat-mdc-outlined-button.mat-primary{--mat-mdc-button-persistent-ripple-color: #3f51b5;--mat-mdc-button-ripple-color: rgba(63, 81, 181, .1)}.mat-mdc-button.mat-accent,.mat-mdc-outlined-button.mat-accent{--mat-mdc-button-persistent-ripple-color: #ff4081;--mat-mdc-button-ripple-color: rgba(255, 64, 129, .1)}.mat-mdc-button.mat-warn,.mat-mdc-outlined-button.mat-warn{--mat-mdc-button-persistent-ripple-color: #f44336;--mat-mdc-button-ripple-color: rgba(244, 67, 54, .1)}.mat-mdc-raised-button,.mat-mdc-unelevated-button{--mat-mdc-button-persistent-ripple-color: #000;--mat-mdc-button-ripple-color: rgba(0, 0, 0, .1)}.mat-mdc-raised-button:hover .mat-mdc-button-persistent-ripple:before,.mat-mdc-unelevated-button:hover .mat-mdc-button-persistent-ripple:before{opacity:.04}.mat-mdc-raised-button.cdk-program-focused .mat-mdc-button-persistent-ripple:before,.mat-mdc-raised-button.cdk-keyboard-focused .mat-mdc-button-persistent-ripple:before,.mat-mdc-unelevated-button.cdk-program-focused .mat-mdc-button-persistent-ripple:before,.mat-mdc-unelevated-button.cdk-keyboard-focused .mat-mdc-button-persistent-ripple:before{opacity:.12}.mat-mdc-raised-button:active .mat-mdc-button-persistent-ripple:before,.mat-mdc-unelevated-button:active .mat-mdc-button-persistent-ripple:before{opacity:.12}.mat-mdc-raised-button.mat-primary,.mat-mdc-unelevated-button.mat-primary,.mat-mdc-raised-button.mat-accent,.mat-mdc-unelevated-button.mat-accent,.mat-mdc-raised-button.mat-warn,.mat-mdc-unelevated-button.mat-warn{--mat-mdc-button-persistent-ripple-color: #fff;--mat-mdc-button-ripple-color: rgba(255, 255, 255, .1)}.mat-mdc-button.mat-mdc-button-base,.mat-mdc-raised-button.mat-mdc-button-base,.mat-mdc-unelevated-button.mat-mdc-button-base,.mat-mdc-outlined-button.mat-mdc-button-base{height:36px}.mdc-button{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;font-family:var(--mdc-typography-button-font-family, var(--mdc-typography-font-family, Roboto, sans-serif));font-size:var(--mdc-typography-button-font-size, 14px);line-height:var(--mdc-typography-button-line-height, 36px);font-weight:var(--mdc-typography-button-font-weight, 500);letter-spacing:var(--mdc-typography-button-letter-spacing, .0892857143em);-webkit-text-decoration:var(--mdc-typography-button-text-decoration, none);text-decoration:var(--mdc-typography-button-text-decoration, none);text-transform:var(--mdc-typography-button-text-transform, none)}.mat-mdc-icon-button{--mat-mdc-button-persistent-ripple-color: #000;--mat-mdc-button-ripple-color: rgba(0, 0, 0, .1)}.mat-mdc-icon-button:hover .mat-mdc-button-persistent-ripple:before{opacity:.04}.mat-mdc-icon-button.cdk-program-focused .mat-mdc-button-persistent-ripple:before,.mat-mdc-icon-button.cdk-keyboard-focused .mat-mdc-button-persistent-ripple:before{opacity:.12}.mat-mdc-icon-button:active .mat-mdc-button-persistent-ripple:before{opacity:.12}.mat-mdc-icon-button.mat-primary{--mat-mdc-button-persistent-ripple-color: #3f51b5;--mat-mdc-button-ripple-color: rgba(63, 81, 181, .1)}.mat-mdc-icon-button.mat-accent{--mat-mdc-button-persistent-ripple-color: #ff4081;--mat-mdc-button-ripple-color: rgba(255, 64, 129, .1)}.mat-mdc-icon-button.mat-warn{--mat-mdc-button-persistent-ripple-color: #f44336;--mat-mdc-button-ripple-color: rgba(244, 67, 54, .1)}.mat-mdc-icon-button.mat-primary{--mdc-icon-button-icon-color:#3f51b5}.mat-mdc-icon-button.mat-accent{--mdc-icon-button-icon-color:#ff4081}.mat-mdc-icon-button.mat-warn{--mdc-icon-button-icon-color:#f44336}.mat-mdc-icon-button[disabled][disabled]{--mdc-icon-button-icon-color:rgba(0, 0, 0, .38);--mdc-icon-button-disabled-icon-color:rgba(0, 0, 0, .38)}.mat-mdc-icon-button.mat-mdc-button-base{width:48px;height:48px;padding:12px}.mat-mdc-icon-button.mat-mdc-button-base .mdc-icon-button__focus-ring{max-height:48px;max-width:48px}.mat-mdc-icon-button.mat-mdc-button-base.mdc-icon-button--reduced-size .mdc-icon-button__ripple{width:40px;height:40px;margin:4px}.mat-mdc-icon-button.mat-mdc-button-base.mdc-icon-button--reduced-size .mdc-icon-button__focus-ring{max-height:40px;max-width:40px}.mat-mdc-icon-button.mat-mdc-button-base .mdc-icon-button__touch{position:absolute;top:50%;height:48px;left:50%;width:48px;transform:translate(-50%,-50%)}.mat-mdc-fab,.mat-mdc-mini-fab{--mat-mdc-button-persistent-ripple-color: #000;--mat-mdc-button-ripple-color: rgba(0, 0, 0, .1)}.mat-mdc-fab:hover .mat-mdc-button-persistent-ripple:before,.mat-mdc-mini-fab:hover .mat-mdc-button-persistent-ripple:before{opacity:.04}.mat-mdc-fab.cdk-program-focused .mat-mdc-button-persistent-ripple:before,.mat-mdc-fab.cdk-keyboard-focused .mat-mdc-button-persistent-ripple:before,.mat-mdc-mini-fab.cdk-program-focused .mat-mdc-button-persistent-ripple:before,.mat-mdc-mini-fab.cdk-keyboard-focused .mat-mdc-button-persistent-ripple:before{opacity:.12}.mat-mdc-fab:active .mat-mdc-button-persistent-ripple:before,.mat-mdc-mini-fab:active .mat-mdc-button-persistent-ripple:before{opacity:.12}.mat-mdc-fab.mat-primary,.mat-mdc-mini-fab.mat-primary,.mat-mdc-fab.mat-accent,.mat-mdc-mini-fab.mat-accent,.mat-mdc-fab.mat-warn,.mat-mdc-mini-fab.mat-warn{--mat-mdc-button-persistent-ripple-color: #fff;--mat-mdc-button-ripple-color: rgba(255, 255, 255, .1)}.mat-mdc-fab.mat-unthemed,.mat-mdc-mini-fab.mat-unthemed{--mdc-fab-container-color:#fff;--mdc-fab-icon-color:#000;--mat-mdc-fab-color: #000}.mat-mdc-fab.mat-primary,.mat-mdc-mini-fab.mat-primary{--mdc-fab-container-color:#3f51b5;--mdc-fab-icon-color:#fff;--mat-mdc-fab-color: #fff}.mat-mdc-fab.mat-accent,.mat-mdc-mini-fab.mat-accent{--mdc-fab-container-color:#ff4081;--mdc-fab-icon-color:#fff;--mat-mdc-fab-color: #fff}.mat-mdc-fab.mat-warn,.mat-mdc-mini-fab.mat-warn{--mdc-fab-container-color:#f44336;--mdc-fab-icon-color:#fff;--mat-mdc-fab-color: #fff}.mat-mdc-fab[disabled][disabled],.mat-mdc-mini-fab[disabled][disabled]{--mdc-fab-container-color:rgba(0, 0, 0, .12);--mdc-fab-icon-color:rgba(0, 0, 0, .38);--mat-mdc-fab-color: rgba(0, 0, 0, .38)}.mdc-fab--extended{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;font-family:var(--mdc-typography-button-font-family, var(--mdc-typography-font-family, Roboto, sans-serif));font-size:var(--mdc-typography-button-font-size, 14px);line-height:var(--mdc-typography-button-line-height, 36px);font-weight:var(--mdc-typography-button-font-weight, 500);letter-spacing:var(--mdc-typography-button-letter-spacing, .0892857143em);-webkit-text-decoration:var(--mdc-typography-button-text-decoration, none);text-decoration:var(--mdc-typography-button-text-decoration, none);text-transform:var(--mdc-typography-button-text-transform, none)}.mat-mdc-snack-bar-container{--mat-mdc-snack-bar-button-color: #ff4081;--mdc-snackbar-container-color:#333333;--mdc-snackbar-supporting-text-color:rgba(255, 255, 255, .87)}.mat-mdc-snack-bar-container{--mdc-snackbar-supporting-text-font:Roboto, sans-serif;--mdc-snackbar-supporting-text-line-height:20px;--mdc-snackbar-supporting-text-size:14px;--mdc-snackbar-supporting-text-weight:400}.mdc-data-table{background-color:var(--mdc-theme-surface, #fff);border-color:#0000001f}.mdc-data-table__row{background-color:inherit}.mdc-data-table__header-cell{background-color:var(--mdc-theme-surface, #fff)}.mdc-data-table__row--selected{background-color:#3f51b50a}.mdc-data-table__pagination-rows-per-page-select--outlined:not(.mdc-select--disabled) .mdc-notched-outline__leading,.mdc-data-table__pagination-rows-per-page-select--outlined:not(.mdc-select--disabled) .mdc-notched-outline__notch,.mdc-data-table__pagination-rows-per-page-select--outlined:not(.mdc-select--disabled) .mdc-notched-outline__trailing{border-color:#0000001f}.mdc-data-table__cell,.mdc-data-table__header-cell{border-bottom-color:#0000001f}.mdc-data-table__pagination{border-top-color:#0000001f}.mdc-data-table__row:not(.mdc-data-table__row--selected):hover{background-color:#0000000a}.mdc-data-table__header-cell,.mdc-data-table__pagination-total,.mdc-data-table__pagination-rows-per-page-label,.mdc-data-table__cell{color:#000000de}.mat-mdc-table{background:#fff}.mat-mdc-table .mdc-data-table__row{height:52px}.mat-mdc-table .mdc-data-table__pagination{min-height:52px}.mat-mdc-table .mdc-data-table__header-row{height:56px}.mdc-data-table__content,.mdc-data-table__cell{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;font-family:var(--mdc-typography-body2-font-family, var(--mdc-typography-font-family, Roboto, sans-serif));font-size:var(--mdc-typography-body2-font-size, 14px);line-height:var(--mdc-typography-body2-line-height, 20px);font-weight:var(--mdc-typography-body2-font-weight, 400);letter-spacing:var(--mdc-typography-body2-letter-spacing, .0178571429em);-webkit-text-decoration:var(--mdc-typography-body2-text-decoration, inherit);text-decoration:var(--mdc-typography-body2-text-decoration, inherit);text-transform:var(--mdc-typography-body2-text-transform, none)}.mdc-data-table__header-cell{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;font-family:var(--mdc-typography-subtitle2-font-family, var(--mdc-typography-font-family, Roboto, sans-serif));font-size:var(--mdc-typography-subtitle2-font-size, 14px);line-height:var(--mdc-typography-subtitle2-line-height, 22px);font-weight:var(--mdc-typography-subtitle2-font-weight, 500);letter-spacing:var(--mdc-typography-subtitle2-letter-spacing, .0071428571em);-webkit-text-decoration:var(--mdc-typography-subtitle2-text-decoration, inherit);text-decoration:var(--mdc-typography-subtitle2-text-decoration, inherit);text-transform:var(--mdc-typography-subtitle2-text-transform, none)}.mat-mdc-progress-spinner{--mdc-circular-progress-active-indicator-color:#3f51b5}.mat-mdc-progress-spinner.mat-accent{--mdc-circular-progress-active-indicator-color:#ff4081}.mat-mdc-progress-spinner.mat-warn{--mdc-circular-progress-active-indicator-color:#f44336}.mat-badge{position:relative}.mat-badge.mat-badge{overflow:visible}.mat-badge-hidden .mat-badge-content{display:none}.mat-badge-content{position:absolute;text-align:center;display:inline-block;border-radius:50%;transition:transform .2s ease-in-out;transform:scale(.6);overflow:hidden;white-space:nowrap;text-overflow:ellipsis;pointer-events:none}.ng-animate-disabled .mat-badge-content,.mat-badge-content._mat-animation-noopable{transition:none}.mat-badge-content.mat-badge-active{transform:none}.mat-badge-small .mat-badge-content{width:16px;height:16px;line-height:16px}.mat-badge-small.mat-badge-above .mat-badge-content{top:-8px}.mat-badge-small.mat-badge-below .mat-badge-content{bottom:-8px}.mat-badge-small.mat-badge-before .mat-badge-content{left:-16px}[dir=rtl] .mat-badge-small.mat-badge-before .mat-badge-content{left:auto;right:-16px}.mat-badge-small.mat-badge-after .mat-badge-content{right:-16px}[dir=rtl] .mat-badge-small.mat-badge-after .mat-badge-content{right:auto;left:-16px}.mat-badge-small.mat-badge-overlap.mat-badge-before .mat-badge-content{left:-8px}[dir=rtl] .mat-badge-small.mat-badge-overlap.mat-badge-before .mat-badge-content{left:auto;right:-8px}.mat-badge-small.mat-badge-overlap.mat-badge-after .mat-badge-content{right:-8px}[dir=rtl] .mat-badge-small.mat-badge-overlap.mat-badge-after .mat-badge-content{right:auto;left:-8px}.mat-badge-medium .mat-badge-content{width:22px;height:22px;line-height:22px}.mat-badge-medium.mat-badge-above .mat-badge-content{top:-11px}.mat-badge-medium.mat-badge-below .mat-badge-content{bottom:-11px}.mat-badge-medium.mat-badge-before .mat-badge-content{left:-22px}[dir=rtl] .mat-badge-medium.mat-badge-before .mat-badge-content{left:auto;right:-22px}.mat-badge-medium.mat-badge-after .mat-badge-content{right:-22px}[dir=rtl] .mat-badge-medium.mat-badge-after .mat-badge-content{right:auto;left:-22px}.mat-badge-medium.mat-badge-overlap.mat-badge-before .mat-badge-content{left:-11px}[dir=rtl] .mat-badge-medium.mat-badge-overlap.mat-badge-before .mat-badge-content{left:auto;right:-11px}.mat-badge-medium.mat-badge-overlap.mat-badge-after .mat-badge-content{right:-11px}[dir=rtl] .mat-badge-medium.mat-badge-overlap.mat-badge-after .mat-badge-content{right:auto;left:-11px}.mat-badge-large .mat-badge-content{width:28px;height:28px;line-height:28px}.mat-badge-large.mat-badge-above .mat-badge-content{top:-14px}.mat-badge-large.mat-badge-below .mat-badge-content{bottom:-14px}.mat-badge-large.mat-badge-before .mat-badge-content{left:-28px}[dir=rtl] .mat-badge-large.mat-badge-before .mat-badge-content{left:auto;right:-28px}.mat-badge-large.mat-badge-after .mat-badge-content{right:-28px}[dir=rtl] .mat-badge-large.mat-badge-after .mat-badge-content{right:auto;left:-28px}.mat-badge-large.mat-badge-overlap.mat-badge-before .mat-badge-content{left:-14px}[dir=rtl] .mat-badge-large.mat-badge-overlap.mat-badge-before .mat-badge-content{left:auto;right:-14px}.mat-badge-large.mat-badge-overlap.mat-badge-after .mat-badge-content{right:-14px}[dir=rtl] .mat-badge-large.mat-badge-overlap.mat-badge-after .mat-badge-content{right:auto;left:-14px}.mat-badge-content{color:#fff;background:#3f51b5}.cdk-high-contrast-active .mat-badge-content{outline:solid 1px;border-radius:0}.mat-badge-accent .mat-badge-content{background:#ff4081;color:#fff}.mat-badge-warn .mat-badge-content{color:#fff;background:#f44336}.mat-badge-disabled .mat-badge-content{background:#b9b9b9;color:#00000061}.mat-badge-content{font-weight:600;font-size:12px;font-family:Roboto,sans-serif}.mat-badge-small .mat-badge-content{font-size:9px}.mat-badge-large .mat-badge-content{font-size:24px}.mat-bottom-sheet-container{box-shadow:0 8px 10px -5px #0003,0 16px 24px 2px #00000024,0 6px 30px 5px #0000001f;background:#fff;color:#000000de}.mat-bottom-sheet-container{font-size:14px;font-weight:400;line-height:20px;font-family:Roboto,sans-serif;letter-spacing:.0178571429em}.mat-button-toggle-standalone:not([class*=mat-elevation-z]),.mat-button-toggle-group:not([class*=mat-elevation-z]){box-shadow:0 3px 1px -2px #0003,0 2px 2px #00000024,0 1px 5px #0000001f}.mat-button-toggle-standalone.mat-button-toggle-appearance-standard:not([class*=mat-elevation-z]),.mat-button-toggle-group-appearance-standard:not([class*=mat-elevation-z]){box-shadow:none}.mat-button-toggle{color:#00000061}.mat-button-toggle .mat-button-toggle-focus-overlay{background-color:#0000001f}.mat-button-toggle-appearance-standard{color:#000000de;background:#fff}.mat-button-toggle-appearance-standard .mat-button-toggle-focus-overlay{background-color:#000}.mat-button-toggle-group-appearance-standard .mat-button-toggle+.mat-button-toggle{border-left:solid 1px #e0e0e0}[dir=rtl] .mat-button-toggle-group-appearance-standard .mat-button-toggle+.mat-button-toggle{border-left:none;border-right:solid 1px #e0e0e0}.mat-button-toggle-group-appearance-standard.mat-button-toggle-vertical .mat-button-toggle+.mat-button-toggle{border-left:none;border-right:none;border-top:solid 1px #e0e0e0}.mat-button-toggle-checked{background-color:#e0e0e0;color:#0000008a}.mat-button-toggle-checked.mat-button-toggle-appearance-standard{color:#000000de}.mat-button-toggle-disabled{color:#00000042;background-color:#eee}.mat-button-toggle-disabled.mat-button-toggle-appearance-standard{background:#fff}.mat-button-toggle-disabled.mat-button-toggle-checked{background-color:#bdbdbd}.mat-button-toggle-standalone.mat-button-toggle-appearance-standard,.mat-button-toggle-group-appearance-standard{border:solid 1px #e0e0e0}.mat-button-toggle-appearance-standard .mat-button-toggle-label-content{line-height:48px}.mat-button-toggle{font-family:Roboto,sans-serif}.mat-calendar-arrow{fill:#0000008a}.mat-datepicker-toggle,.mat-datepicker-content .mat-calendar-next-button,.mat-datepicker-content .mat-calendar-previous-button{color:#0000008a}.mat-calendar-table-header-divider:after{background:rgba(0,0,0,.12)}.mat-calendar-table-header,.mat-calendar-body-label{color:#0000008a}.mat-calendar-body-cell-content,.mat-date-range-input-separator{color:#000000de;border-color:#0000}.mat-calendar-body-disabled>.mat-calendar-body-cell-content:not(.mat-calendar-body-selected):not(.mat-calendar-body-comparison-identical){color:#00000061}.mat-form-field-disabled .mat-date-range-input-separator{color:#00000061}.mat-calendar-body-in-preview{color:#0000003d}.mat-calendar-body-today:not(.mat-calendar-body-selected):not(.mat-calendar-body-comparison-identical){border-color:#00000061}.mat-calendar-body-disabled>.mat-calendar-body-today:not(.mat-calendar-body-selected):not(.mat-calendar-body-comparison-identical){border-color:#0000002e}.mat-calendar-body-in-range:before{background:rgba(63,81,181,.2)}.mat-calendar-body-comparison-identical,.mat-calendar-body-in-comparison-range:before{background:rgba(249,171,0,.2)}.mat-calendar-body-comparison-bridge-start:before,[dir=rtl] .mat-calendar-body-comparison-bridge-end:before{background:linear-gradient(to right,rgba(63,81,181,.2) 50%,rgba(249,171,0,.2) 50%)}.mat-calendar-body-comparison-bridge-end:before,[dir=rtl] .mat-calendar-body-comparison-bridge-start:before{background:linear-gradient(to left,rgba(63,81,181,.2) 50%,rgba(249,171,0,.2) 50%)}.mat-calendar-body-in-range>.mat-calendar-body-comparison-identical,.mat-calendar-body-in-comparison-range.mat-calendar-body-in-range:after{background:#a8dab5}.mat-calendar-body-comparison-identical.mat-calendar-body-selected,.mat-calendar-body-in-comparison-range>.mat-calendar-body-selected{background:#46a35e}.mat-calendar-body-selected{background-color:#3f51b5;color:#fff}.mat-calendar-body-disabled>.mat-calendar-body-selected{background-color:#3f51b566}.mat-calendar-body-today.mat-calendar-body-selected{box-shadow:inset 0 0 0 1px #fff}.cdk-keyboard-focused .mat-calendar-body-active>.mat-calendar-body-cell-content:not(.mat-calendar-body-selected):not(.mat-calendar-body-comparison-identical),.cdk-program-focused .mat-calendar-body-active>.mat-calendar-body-cell-content:not(.mat-calendar-body-selected):not(.mat-calendar-body-comparison-identical){background-color:#3f51b54d}@media (hover: hover){.mat-calendar-body-cell:not(.mat-calendar-body-disabled):hover>.mat-calendar-body-cell-content:not(.mat-calendar-body-selected):not(.mat-calendar-body-comparison-identical){background-color:#3f51b54d}}.mat-datepicker-content{box-shadow:0 2px 4px -1px #0003,0 4px 5px #00000024,0 1px 10px #0000001f;background-color:#fff;color:#000000de}.mat-datepicker-content.mat-accent .mat-calendar-body-in-range:before{background:rgba(255,64,129,.2)}.mat-datepicker-content.mat-accent .mat-calendar-body-comparison-identical,.mat-datepicker-content.mat-accent .mat-calendar-body-in-comparison-range:before{background:rgba(249,171,0,.2)}.mat-datepicker-content.mat-accent .mat-calendar-body-comparison-bridge-start:before,.mat-datepicker-content.mat-accent [dir=rtl] .mat-calendar-body-comparison-bridge-end:before{background:linear-gradient(to right,rgba(255,64,129,.2) 50%,rgba(249,171,0,.2) 50%)}.mat-datepicker-content.mat-accent .mat-calendar-body-comparison-bridge-end:before,.mat-datepicker-content.mat-accent [dir=rtl] .mat-calendar-body-comparison-bridge-start:before{background:linear-gradient(to left,rgba(255,64,129,.2) 50%,rgba(249,171,0,.2) 50%)}.mat-datepicker-content.mat-accent .mat-calendar-body-in-range>.mat-calendar-body-comparison-identical,.mat-datepicker-content.mat-accent .mat-calendar-body-in-comparison-range.mat-calendar-body-in-range:after{background:#a8dab5}.mat-datepicker-content.mat-accent .mat-calendar-body-comparison-identical.mat-calendar-body-selected,.mat-datepicker-content.mat-accent .mat-calendar-body-in-comparison-range>.mat-calendar-body-selected{background:#46a35e}.mat-datepicker-content.mat-accent .mat-calendar-body-selected{background-color:#ff4081;color:#fff}.mat-datepicker-content.mat-accent .mat-calendar-body-disabled>.mat-calendar-body-selected{background-color:#ff408166}.mat-datepicker-content.mat-accent .mat-calendar-body-today.mat-calendar-body-selected{box-shadow:inset 0 0 0 1px #fff}.mat-datepicker-content.mat-accent .cdk-keyboard-focused .mat-calendar-body-active>.mat-calendar-body-cell-content:not(.mat-calendar-body-selected):not(.mat-calendar-body-comparison-identical),.mat-datepicker-content.mat-accent .cdk-program-focused .mat-calendar-body-active>.mat-calendar-body-cell-content:not(.mat-calendar-body-selected):not(.mat-calendar-body-comparison-identical){background-color:#ff40814d}@media (hover: hover){.mat-datepicker-content.mat-accent .mat-calendar-body-cell:not(.mat-calendar-body-disabled):hover>.mat-calendar-body-cell-content:not(.mat-calendar-body-selected):not(.mat-calendar-body-comparison-identical){background-color:#ff40814d}}.mat-datepicker-content.mat-warn .mat-calendar-body-in-range:before{background:rgba(244,67,54,.2)}.mat-datepicker-content.mat-warn .mat-calendar-body-comparison-identical,.mat-datepicker-content.mat-warn .mat-calendar-body-in-comparison-range:before{background:rgba(249,171,0,.2)}.mat-datepicker-content.mat-warn .mat-calendar-body-comparison-bridge-start:before,.mat-datepicker-content.mat-warn [dir=rtl] .mat-calendar-body-comparison-bridge-end:before{background:linear-gradient(to right,rgba(244,67,54,.2) 50%,rgba(249,171,0,.2) 50%)}.mat-datepicker-content.mat-warn .mat-calendar-body-comparison-bridge-end:before,.mat-datepicker-content.mat-warn [dir=rtl] .mat-calendar-body-comparison-bridge-start:before{background:linear-gradient(to left,rgba(244,67,54,.2) 50%,rgba(249,171,0,.2) 50%)}.mat-datepicker-content.mat-warn .mat-calendar-body-in-range>.mat-calendar-body-comparison-identical,.mat-datepicker-content.mat-warn .mat-calendar-body-in-comparison-range.mat-calendar-body-in-range:after{background:#a8dab5}.mat-datepicker-content.mat-warn .mat-calendar-body-comparison-identical.mat-calendar-body-selected,.mat-datepicker-content.mat-warn .mat-calendar-body-in-comparison-range>.mat-calendar-body-selected{background:#46a35e}.mat-datepicker-content.mat-warn .mat-calendar-body-selected{background-color:#f44336;color:#fff}.mat-datepicker-content.mat-warn .mat-calendar-body-disabled>.mat-calendar-body-selected{background-color:#f4433666}.mat-datepicker-content.mat-warn .mat-calendar-body-today.mat-calendar-body-selected{box-shadow:inset 0 0 0 1px #fff}.mat-datepicker-content.mat-warn .cdk-keyboard-focused .mat-calendar-body-active>.mat-calendar-body-cell-content:not(.mat-calendar-body-selected):not(.mat-calendar-body-comparison-identical),.mat-datepicker-content.mat-warn .cdk-program-focused .mat-calendar-body-active>.mat-calendar-body-cell-content:not(.mat-calendar-body-selected):not(.mat-calendar-body-comparison-identical){background-color:#f443364d}@media (hover: hover){.mat-datepicker-content.mat-warn .mat-calendar-body-cell:not(.mat-calendar-body-disabled):hover>.mat-calendar-body-cell-content:not(.mat-calendar-body-selected):not(.mat-calendar-body-comparison-identical){background-color:#f443364d}}.mat-datepicker-content-touch{box-shadow:0 11px 15px -7px #0003,0 24px 38px 3px #00000024,0 9px 46px 8px #0000001f}.mat-datepicker-toggle-active{color:#3f51b5}.mat-datepicker-toggle-active.mat-accent{color:#ff4081}.mat-datepicker-toggle-active.mat-warn{color:#f44336}.mat-date-range-input-inner[disabled]{color:#00000061}.mat-calendar-controls .mat-mdc-icon-button.mat-mdc-button-base{width:40px;height:40px;padding:8px}.mat-calendar-controls .mat-mdc-icon-button.mat-mdc-button-base .mdc-icon-button__focus-ring{max-height:40px;max-width:40px}.mat-calendar-controls .mat-mdc-icon-button.mat-mdc-button-base.mdc-icon-button--reduced-size .mdc-icon-button__ripple{width:40px;height:40px;margin:0}.mat-calendar-controls .mat-mdc-icon-button.mat-mdc-button-base.mdc-icon-button--reduced-size .mdc-icon-button__focus-ring{max-height:40px;max-width:40px}.mat-calendar-controls .mat-mdc-icon-button.mat-mdc-button-base .mdc-icon-button__touch{position:absolute;top:50%;height:40px;left:50%;width:40px;transform:translate(-50%,-50%)}.mat-calendar-controls .mat-mdc-icon-button.mat-mdc-button-base .mat-mdc-button-touch-target{display:none}.mat-calendar{font-family:Roboto,sans-serif}.mat-calendar-body{font-size:13px}.mat-calendar-body-label,.mat-calendar-period-button{font-size:14px;font-weight:500}.mat-calendar-table-header th{font-size:11px;font-weight:400}.mat-divider{border-top-color:#0000001f}.mat-divider-vertical{border-right-color:#0000001f}.mat-expansion-panel{background:#fff;color:#000000de}.mat-expansion-panel:not([class*=mat-elevation-z]){box-shadow:0 3px 1px -2px #0003,0 2px 2px #00000024,0 1px 5px #0000001f}.mat-action-row{border-top-color:#0000001f}.mat-expansion-panel .mat-expansion-panel-header.cdk-keyboard-focused:not([aria-disabled=true]),.mat-expansion-panel .mat-expansion-panel-header.cdk-program-focused:not([aria-disabled=true]),.mat-expansion-panel:not(.mat-expanded) .mat-expansion-panel-header:hover:not([aria-disabled=true]){background:rgba(0,0,0,.04)}@media (hover: none){.mat-expansion-panel:not(.mat-expanded):not([aria-disabled=true]) .mat-expansion-panel-header:hover{background:#fff}}.mat-expansion-panel-header-title{color:#000000de}.mat-expansion-panel-header-description,.mat-expansion-indicator:after{color:#0000008a}.mat-expansion-panel-header[aria-disabled=true]{color:#00000042}.mat-expansion-panel-header[aria-disabled=true] .mat-expansion-panel-header-title,.mat-expansion-panel-header[aria-disabled=true] .mat-expansion-panel-header-description{color:inherit}.mat-expansion-panel-header{height:48px}.mat-expansion-panel-header.mat-expanded{height:64px}.mat-expansion-panel-header{font-family:Roboto,sans-serif;font-size:14px;font-weight:500}.mat-expansion-panel-content{font-size:14px;font-weight:400;line-height:20px;font-family:Roboto,sans-serif;letter-spacing:.0178571429em}.mat-grid-tile-header,.mat-grid-tile-footer{font-size:14px}.mat-grid-tile-header .mat-line,.mat-grid-tile-footer .mat-line{white-space:nowrap;overflow:hidden;text-overflow:ellipsis;display:block;box-sizing:border-box}.mat-grid-tile-header .mat-line:nth-child(n+2),.mat-grid-tile-footer .mat-line:nth-child(n+2){font-size:12px}.mat-icon.mat-primary{color:#3f51b5}.mat-icon.mat-accent{color:#ff4081}.mat-icon.mat-warn{color:#f44336}.mat-drawer-container{background-color:#fafafa;color:#000000de}.mat-drawer{background-color:#fff;color:#000000de}.mat-drawer.mat-drawer-push{background-color:#fff}.mat-drawer:not(.mat-drawer-side){box-shadow:0 8px 10px -5px #0003,0 16px 24px 2px #00000024,0 6px 30px 5px #0000001f}.mat-drawer-side{border-right:solid 1px rgba(0,0,0,.12)}.mat-drawer-side.mat-drawer-end,[dir=rtl] .mat-drawer-side{border-left:solid 1px rgba(0,0,0,.12);border-right:none}[dir=rtl] .mat-drawer-side.mat-drawer-end{border-left:none;border-right:solid 1px rgba(0,0,0,.12)}.mat-drawer-backdrop.mat-drawer-shown{background-color:#0009}.mat-step-header.cdk-keyboard-focused,.mat-step-header.cdk-program-focused,.mat-step-header:hover:not([aria-disabled]),.mat-step-header:hover[aria-disabled=false]{background-color:#0000000a}.mat-step-header:hover[aria-disabled=true]{cursor:default}@media (hover: none){.mat-step-header:hover{background:none}}.mat-step-header .mat-step-label,.mat-step-header .mat-step-optional{color:#0000008a}.mat-step-header .mat-step-icon{background-color:#0000008a;color:#fff}.mat-step-header .mat-step-icon-selected,.mat-step-header .mat-step-icon-state-done,.mat-step-header .mat-step-icon-state-edit{background-color:#3f51b5;color:#fff}.mat-step-header.mat-accent .mat-step-icon{color:#fff}.mat-step-header.mat-accent .mat-step-icon-selected,.mat-step-header.mat-accent .mat-step-icon-state-done,.mat-step-header.mat-accent .mat-step-icon-state-edit{background-color:#ff4081;color:#fff}.mat-step-header.mat-warn .mat-step-icon{color:#fff}.mat-step-header.mat-warn .mat-step-icon-selected,.mat-step-header.mat-warn .mat-step-icon-state-done,.mat-step-header.mat-warn .mat-step-icon-state-edit{background-color:#f44336;color:#fff}.mat-step-header .mat-step-icon-state-error{background-color:#0000;color:#f44336}.mat-step-header .mat-step-label.mat-step-label-active{color:#000000de}.mat-step-header .mat-step-label.mat-step-label-error{color:#f44336}.mat-stepper-horizontal,.mat-stepper-vertical{background-color:#fff}.mat-stepper-vertical-line:before{border-left-color:#0000001f}.mat-horizontal-stepper-header:before,.mat-horizontal-stepper-header:after,.mat-stepper-horizontal-line{border-top-color:#0000001f}.mat-horizontal-stepper-header{height:72px}.mat-stepper-label-position-bottom .mat-horizontal-stepper-header,.mat-vertical-stepper-header{padding:24px}.mat-stepper-vertical-line:before{top:-16px;bottom:-16px}.mat-stepper-label-position-bottom .mat-horizontal-stepper-header:after,.mat-stepper-label-position-bottom .mat-horizontal-stepper-header:before{top:36px}.mat-stepper-label-position-bottom .mat-stepper-horizontal-line{top:36px}.mat-stepper-vertical,.mat-stepper-horizontal{font-family:Roboto,sans-serif}.mat-step-label{font-size:14px;font-weight:400}.mat-step-sub-label-error{font-weight:400}.mat-step-label-error{font-size:16px}.mat-step-label-selected{font-size:16px;font-weight:400}.mat-sort-header-arrow{color:#757575}.mat-toolbar{background:#f5f5f5;color:#000000de}.mat-toolbar.mat-primary{background:#3f51b5;color:#fff}.mat-toolbar.mat-accent{background:#ff4081;color:#fff}.mat-toolbar.mat-warn{background:#f44336;color:#fff}.mat-toolbar .mat-form-field-underline,.mat-toolbar .mat-form-field-ripple,.mat-toolbar .mat-focused .mat-form-field-ripple{background-color:currentColor}.mat-toolbar .mat-form-field-label,.mat-toolbar .mat-focused .mat-form-field-label,.mat-toolbar .mat-select-value,.mat-toolbar .mat-select-arrow,.mat-toolbar .mat-form-field.mat-focused .mat-select-arrow{color:inherit}.mat-toolbar .mat-input-element{caret-color:currentColor}.mat-toolbar-multiple-rows{min-height:64px}.mat-toolbar-row,.mat-toolbar-single-row{height:64px}@media (max-width: 599px){.mat-toolbar-multiple-rows{min-height:56px}.mat-toolbar-row,.mat-toolbar-single-row{height:56px}}.mat-toolbar,.mat-toolbar h1,.mat-toolbar h2,.mat-toolbar h3,.mat-toolbar h4,.mat-toolbar h5,.mat-toolbar h6{font-size:20px;font-weight:500;line-height:32px;font-family:Roboto,sans-serif;letter-spacing:.0125em;margin:0}.mat-tree{background:#fff}.mat-tree-node,.mat-nested-tree-node{color:#000000de}.mat-tree-node{min-height:48px}.mat-tree{font-family:Roboto,sans-serif}.mat-tree-node,.mat-nested-tree-node{font-weight:400;font-size:14px}.mat-h1,.mat-headline-5,.mat-typography .mat-h1,.mat-typography .mat-headline-5,.mat-typography h1{font-size:24px;font-weight:400;line-height:32px;font-family:Roboto,sans-serif;letter-spacing:normal;margin:0 0 16px}.mat-h2,.mat-headline-6,.mat-typography .mat-h2,.mat-typography .mat-headline-6,.mat-typography h2{font-size:20px;font-weight:500;line-height:32px;font-family:Roboto,sans-serif;letter-spacing:.0125em;margin:0 0 16px}.mat-h3,.mat-subtitle-1,.mat-typography .mat-h3,.mat-typography .mat-subtitle-1,.mat-typography h3{font-size:16px;font-weight:400;line-height:28px;font-family:Roboto,sans-serif;letter-spacing:.009375em;margin:0 0 16px}.mat-h4,.mat-body-1,.mat-typography .mat-h4,.mat-typography .mat-body-1,.mat-typography h4{font-size:16px;font-weight:400;line-height:24px;font-family:Roboto,sans-serif;letter-spacing:.03125em;margin:0 0 16px}.mat-h5,.mat-typography .mat-h5,.mat-typography h5{font:400 11.62px/20px Roboto,sans-serif;margin:0 0 12px}.mat-h6,.mat-typography .mat-h6,.mat-typography h6{font:400 9.38px/20px Roboto,sans-serif;margin:0 0 12px}.mat-body-strong,.mat-subtitle-2,.mat-typography .mat-body-strong,.mat-typography .mat-subtitle-2{font-size:14px;font-weight:500;line-height:22px;font-family:Roboto,sans-serif;letter-spacing:.0071428571em}.mat-body,.mat-body-2,.mat-typography .mat-body,.mat-typography .mat-body-2,.mat-typography{font-size:14px;font-weight:400;line-height:20px;font-family:Roboto,sans-serif;letter-spacing:.0178571429em}.mat-body p,.mat-body-2 p,.mat-typography .mat-body p,.mat-typography .mat-body-2 p,.mat-typography p{margin:0 0 12px}.mat-small,.mat-caption,.mat-typography .mat-small,.mat-typography .mat-caption{font-size:12px;font-weight:400;line-height:20px;font-family:Roboto,sans-serif;letter-spacing:.0333333333em}.mat-headline-1,.mat-typography .mat-headline-1{font-size:96px;font-weight:300;line-height:96px;font-family:Roboto,sans-serif;letter-spacing:-.015625em;margin:0 0 56px}.mat-headline-2,.mat-typography .mat-headline-2{font-size:60px;font-weight:300;line-height:60px;font-family:Roboto,sans-serif;letter-spacing:-.0083333333em;margin:0 0 64px}.mat-headline-3,.mat-typography .mat-headline-3{font-size:48px;font-weight:400;line-height:50px;font-family:Roboto,sans-serif;letter-spacing:normal;margin:0 0 64px}.mat-headline-4,.mat-typography .mat-headline-4{font-size:34px;font-weight:400;line-height:40px;font-family:Roboto,sans-serif;letter-spacing:.0073529412em;margin:0 0 64px}html{height:100%}body{height:100%;margin:0;font-family:Roboto,Helvetica Neue,sans-serif}.flex-spacer{flex-grow:1}.hidden{display:none!important} diff --git a/frontend/src/app/components/editor/eac/trk-map.block-ui/trk-map.block-ui.component.ts b/frontend/src/app/components/editor/eac/trk-map.block-ui/trk-map.block-ui.component.ts index 0a235f3..7ef1ad3 100644 --- a/frontend/src/app/components/editor/eac/trk-map.block-ui/trk-map.block-ui.component.ts +++ b/frontend/src/app/components/editor/eac/trk-map.block-ui/trk-map.block-ui.component.ts @@ -26,18 +26,15 @@ import { Qtrn, Renderer3dEntity, } from '@gg-web-engine/core'; -import { BehaviorSubject, debounceTime, distinctUntilChanged, filter, Subject, takeUntil, throttleTime } from 'rxjs'; +import { BehaviorSubject, debounceTime, distinctUntilChanged, filter, Subject, takeUntil } from 'rxjs'; import { EelDelegateService } from '../../../../services/eel-delegate.service'; import { AmbientLight, CubeReflectionMapping, DoubleSide, - Group, Material, Mesh, MeshBasicMaterial, - Object3D, - PlaneGeometry, RepeatWrapping, Texture, TextureLoader, @@ -45,15 +42,8 @@ import { import { MainService } from '../../../../services/main.service'; import { ThreeDisplayObjectComponent, ThreeSceneComponent, ThreeVisualTypeDocRepo } from '@gg-web-engine/three'; import { OBJLoader } from 'three/examples/jsm/loaders/OBJLoader'; -import { MTLLoader } from 'three/examples/jsm/loaders/MTLLoader'; import { setupNfs1Texture } from '../../common/obj-viewer/obj-viewer.component'; -export enum MapPropType { - ThreeModel = 'model', - Bitmap = 'bitmap', - TwoSidedBitmap = 'two_sided_bitmap', -} - export class Nfs2MapWorldEntity extends MapGraph3dEntity { public readonly textureLoader = new TextureLoader(); private readonly terrainMaterials: { [key: string]: MeshBasicMaterial } = {}; @@ -122,31 +112,12 @@ export class Nfs2MapWorldEntity extends MapGraph3dEntity x.road_point_idx >= chunkIndex * 4 && x.road_point_idx < (chunkIndex + 1) * 4) - .map((x: any) => ({ - ...x, - ...this.resource!.data.prop_descr[x.prop_descr_idx], - position: Pnt3.add( - { x: x.position.x, y: x.position.z, z: x.position.y }, - { - x: this.resource!.data.road_spline[x.road_point_idx].position.x, - y: this.resource!.data.road_spline[x.road_point_idx].position.z, - z: this.resource!.data.road_spline[x.road_point_idx].position.y, - }, - ), - rotation: Qtrn.fromAngle(Pnt3.nZ, x.rotation), - })); - const props = (await Promise.all(propInstances.map((x: any) => this.loadPropInternal(x)))).filter( - p => !!p, - ) as Entity3d[]; const entity: Entity3d = new Entity3d({ object3D: new ThreeDisplayObjectComponent(object), }); - this.addChildren(entity, ...props); - this.loaded.set(node, [entity, ...props]); - return [[entity, ...props], null!]; + this.addChildren(entity); + this.loaded.set(node, [entity]); + return [[entity], null!]; } protected override disposeChunk(node: MapGraphNodeType) { @@ -188,141 +159,6 @@ export class Nfs2MapWorldEntity extends MapGraph3dEntity | null> { - let isUnknown = false; - if (dummy.type == MapPropType.ThreeModel) { - // 3D model - let object: ThreeDisplayObjectComponent; - try { - if (!this.qfsPath) throw new Error(); - const mtlLoader = new MTLLoader(); - const objLoader = new OBJLoader(); - const mtl = await mtlLoader.loadAsync(`${this.qfsPath}/props/${dummy.data.data.resource_id}/0/material.mtl`); - mtl.preload(); - objLoader.setMaterials(mtl); - object = new ThreeDisplayObjectComponent( - await objLoader.loadAsync(`${this.qfsPath}/props/${dummy.data.data.resource_id}/0/geometry.obj`), - ); - } catch (err) { - isUnknown = true; - object = this.world!.visualScene.factory.createPrimitive( - { shape: 'SPHERE', radius: 5 }, - { diffuse: await this.getPlaceholderTexture() }, - ); - } - object.nativeMesh.traverse(x => { - if (x instanceof Mesh) { - const materials: Material[] = x.material instanceof Array ? x.material : [x.material]; - for (const m of materials) { - m.transparent = true; - m.alphaTest = 0.5; - if (m instanceof MeshBasicMaterial && m.map) { - m.map.wrapS = RepeatWrapping; - m.map.wrapT = RepeatWrapping; - setupNfs1Texture(m.map); - m.map.needsUpdate = true; - } - } - } - }); - const prop = new Entity3d({ object3D: object }); - prop.position = dummy.position; - prop.rotation = dummy.rotation; - if (isUnknown) { - this.unknownEntities.add(prop); - prop.visible = !this.hideUnknownEntities$.getValue(); - } - this.world!.addEntity(prop); - return prop; - } else if (dummy.type == MapPropType.Bitmap || dummy.type == MapPropType.TwoSidedBitmap) { - const textureIds = (resId: number, framesAmount: number) => - new Array(framesAmount) - .fill(null) - .map((_, i) => - this.isOpenedTrack - ? `${Math.floor(resId / 4) + i}/0000` - : `0/${(Math.floor(resId / 4) + i).toString().padStart(2, '0')}00`, - ) - .join(';'); - - const object: Object3D = new Group(); - const [plane, isUnknown] = await this.loadTexturePlaneProp( - textureIds(dummy.data.data.resource_id, dummy.flags.is_animated ? dummy.data.data.frame_count : 1), - { - x: dummy.data.data.width, - y: dummy.data.data.height, - }, - dummy.data.data.animation_interval, - ); - object.add(plane); - if (dummy.type == MapPropType.TwoSidedBitmap) { - const [plane2, isUnknown] = await this.loadTexturePlaneProp( - textureIds(dummy.data.data.resource_id_2, 1), - { - x: dummy.data.data.width_2, - y: dummy.data.data.height, - }, - dummy.data.data.animation_interval, - ); - plane2.rotateY(Math.PI / 2); - plane2.position.x = dummy.data.data.width / 2; - plane2.position.y = dummy.data.data.width_2 / 2; - object.add(plane2); - } - const entity = new Entity3d({ object3D: new ThreeDisplayObjectComponent(object) }); - entity.position = dummy.position; - entity.rotation = dummy.rotation; - if (isUnknown) { - this.unknownEntities.add(entity); - entity.visible = !this.hideUnknownEntities$.getValue(); - } - return entity; - } - return null; - } - - private async loadTexturePlaneProp( - texture: string, - size: Point2, - animationInterval: number, - ): Promise<[Object3D, boolean]> { - const textures = texture.split(';'); - const placeholder = await this.getPlaceholderTexture(); - let isUnknown = false; - let maps = []; - if (!this.qfsPath) { - isUnknown = true; - maps = textures.map(() => placeholder); - } else { - maps = await Promise.all( - textures.map(t => - this.textureLoader.loadAsync(`${this.qfsPath}/foreground/${t}.png`).catch(() => { - isUnknown = true; - return placeholder; - }), - ), - ); - } - const materials = maps.map(map => { - setupNfs1Texture(map); - return new MeshBasicMaterial({ map, alphaTest: 0.5, transparent: true, side: DoubleSide }); - }); - const plane = new Mesh(new PlaneGeometry(size.x, size.y), materials[0]); - plane.rotateX(Math.PI / 2); - plane.position.set(0, 0, size.y / 2); - if (materials.length > 1) { - let i = -1; - // TODO where to unsubscribe? - createInlineTickController(this.world!) - .pipe(throttleTime(animationInterval && !isNaN(+animationInterval) ? +animationInterval * 1000 : 250)) - .subscribe(() => { - i = (i + 1) % materials.length; - plane.material = materials[i]; - }); - } - return [plane, isUnknown]; - } } @Component({ diff --git a/frontend/src/styles.scss b/frontend/src/styles.scss index dba5dc4..890f029 100644 --- a/frontend/src/styles.scss +++ b/frontend/src/styles.scss @@ -1,7 +1,16 @@ -/* You can add global styles to this file, and also import other style files */ +//@use '@angular/material' as mat; -html, body { height: 100%; } -body { margin: 0; font-family: Roboto, "Helvetica Neue", sans-serif; } +html { + height: 100%; + // TODO uncomment and adjust UI to be more compact later + //@include mat.all-component-densities(-3); +} + +body { + height: 100%; + margin: 0; + font-family: Roboto, "Helvetica Neue", sans-serif; +} .flex-spacer { flex-grow: 1; @@ -10,3 +19,6 @@ body { margin: 0; font-family: Roboto, "Helvetica Neue", sans-serif; } .hidden { display: none !important; } + + + diff --git a/serializers/maps.py b/serializers/maps.py index b234868..d116cbb 100644 --- a/serializers/maps.py +++ b/serializers/maps.py @@ -659,7 +659,6 @@ def get_texture(tex): model.texture_ids.append(texture_name) sub_meshes = model.split_by_texture_ids() - # TODO use dummies (proxy objects) generic logic here, export props separately proxies = [item for sublist in (eb['data_records']['data'] for eb in block['extrablocks'] if eb['type'] in ['props_7', 'props_18']) diff --git a/settings.py b/settings.py index e098aef..8795227 100644 --- a/settings.py +++ b/settings.py @@ -62,6 +62,7 @@ maps__save_spherical_skybox_texture = True # If True, bakes map props to the scene. False puts dummy object to scene with info about what prop should be placed there # TNFS note: Props will be retrieved from ../ETRACKFM/_001.FAM file +# NFS2 note: this option always turned on for NFS2 tracks currently maps__add_props_to_obj = False # saves obj file for each 3D scene. obj-s are used under the hood, so if true it is even faster, we do not delete them From 43ec94250880972c0bc077c798999f17e587ce2b Mon Sep 17 00:00:00 2001 From: andy Date: Wed, 5 Feb 2025 03:59:44 +0200 Subject: [PATCH 32/36] textures --- serializers/maps.py | 27 ++++++++++++++++++++++++--- 1 file changed, 24 insertions(+), 3 deletions(-) diff --git a/serializers/maps.py b/serializers/maps.py index d116cbb..46d0b90 100644 --- a/serializers/maps.py +++ b/serializers/maps.py @@ -617,7 +617,7 @@ def get_texture(tex): map_scene = Scene(name='map', obj_name='map', mtl_name='terrain', - mtl_texture_path_func=lambda x: f'{x}.png', + mtl_texture_path_func=lambda x: f'textures/{x}.png', skip_obj_export=self.settings.maps__save_as_chunked) scenes = [map_scene] @@ -631,8 +631,10 @@ def get_texture(tex): map_scene.curves.append(curve) chunks = [] - for block in blocks: + texture_names = set() + for block_i, block in enumerate(blocks): model = Mesh() + model.name = f'block_{block_i}' pivot = data['block_positions'][block['block_idx']] next_pivot = data['block_positions'][ block['block_idx'] + 1 @@ -657,6 +659,7 @@ def get_texture(tex): model.vertex_uvs.append(uvs[i]) model.polygons.append([base_idx, base_idx + 1, base_idx + 2, base_idx + 3]) model.texture_ids.append(texture_name) + texture_names.add(texture_name) sub_meshes = model.split_by_texture_ids() proxies = [item for sublist in (eb['data_records']['data'] @@ -666,7 +669,7 @@ def get_texture(tex): if len(proxies) > 0: proxy_descr_extrablock = next( eb['data_records']['data'] for eb in block['extrablocks'] if eb['type'] == 'prop_descriptions') - for proxy in proxies: + for proxy_i, proxy in enumerate(proxies): if proxy['type'] not in ['static_prop', 'animated_prop']: continue object = proxy_descr_extrablock[proxy['prop_descr_idx']] @@ -674,6 +677,7 @@ def get_texture(tex): if proxy['type'] == 'static_prop' else \ proxy['position']['data']['frames'][0]['position'] model = Mesh() + model.name = f'prop_{block_i}_{proxy_i}' model.pivot_offset = (-position['x'], -position['y'], -position['z']) for p in object['polygons']: texture_name, texture_alignment = get_texture(p['texture']) @@ -681,6 +685,12 @@ def get_texture(tex): rotate_i = (texture_alignment >> 9) & 1 n_rotate = ((texture_alignment >> 11) & 3) - rotate_i uvs = rotate_list(uvs, n_rotate) + + # FIXME manual fixes below, determine rules + # alignment 320 should be upside down? TR02 props before finish + if (((texture_alignment >> 6) & 1) and ((texture_alignment >> 8) & 1)): + uvs = rotate_list(uvs, 2) + base_idx = len(model.vertices) for i, v_index in enumerate(p['vertices']): v = object['vertices'][v_index] @@ -688,8 +698,10 @@ def get_texture(tex): model.vertex_uvs.append(uvs[i]) model.polygons.append([base_idx, base_idx + 1, base_idx + 2, base_idx + 3]) model.texture_ids.append(texture_name) + texture_names.add(texture_name) sub_meshes.extend(model.split_by_texture_ids()) chunks.append([[m for m, _, _ in sub_meshes], (pivot['x'], pivot['y'], pivot['z'])]) + map_scene.mtl_texture_names = list(texture_names) for chunk in chunks: chunk[1] = (chunk[1][0], chunk[1][2], chunk[1][1]) for mesh in chunk[0]: @@ -712,5 +724,14 @@ def get_texture(tex): for (meshes, _) in chunks: map_scene.sub_meshes.extend(meshes) + # export QFS + try: + (shpi_id, shpi_block, shpi_data), _ = require_resource(id[:-4] + '0.QFS__data') + from serializers import ShpiArchiveSerializer + ShpiArchiveSerializer().serialize(shpi_data, os.path.join(path, 'textures/'), shpi_id, shpi_block) + except Exception: + if self.settings.print_errors: + traceback.print_exc() + # export scenes export_scenes(scenes, path, self.settings) From 5100ea2485f6e1918a466395c1d7d279898912f5 Mon Sep 17 00:00:00 2001 From: Andy Date: Thu, 6 Feb 2025 00:53:35 +0200 Subject: [PATCH 33/36] mesh uv-s --- serializers/maps.py | 56 ++++++++++++++++++++++++++++++++++++++++----- 1 file changed, 50 insertions(+), 6 deletions(-) diff --git a/serializers/maps.py b/serializers/maps.py index 46d0b90..2395395 100644 --- a/serializers/maps.py +++ b/serializers/maps.py @@ -679,17 +679,60 @@ def get_texture(tex): model = Mesh() model.name = f'prop_{block_i}_{proxy_i}' model.pivot_offset = (-position['x'], -position['y'], -position['z']) + # alignments=set() for p in object['polygons']: texture_name, texture_alignment = get_texture(p['texture']) + # alignments.add(str(texture_alignment)) uvs = [[0, 1], [1, 1], [1, 0], [0, 0]] - rotate_i = (texture_alignment >> 9) & 1 - n_rotate = ((texture_alignment >> 11) & 3) - rotate_i - uvs = rotate_list(uvs, n_rotate) - # FIXME manual fixes below, determine rules - # alignment 320 should be upside down? TR02 props before finish - if (((texture_alignment >> 6) & 1) and ((texture_alignment >> 8) & 1)): + # logic from opennfs, does not seem to work properly? + # rotate_i = (texture_alignment >> 9) & 1 + # n_rotate = ((texture_alignment >> 11) & 3) - rotate_i + # uvs = rotate_list(uvs, n_rotate) + + # TODO manual fixes below, determine rules + if texture_alignment == 320: + # upside down? Possibly should be reflected, checked symmetrical texture only + uvs = rotate_list(uvs, 2) + elif texture_alignment == 304: + # rotate 180 degrees + uvs = rotate_list(uvs, 2) + elif texture_alignment == 256: + # rotate 180 degrees, reflect? + uvs = rotate_list(uvs, 2) + elif texture_alignment == 272: + # rotate 180 degrees, reflect? + uvs = rotate_list(uvs, 2) + elif texture_alignment == 288: + # rotate 180 degrees, reflect? + uvs = rotate_list(uvs, 2) + elif texture_alignment == 308: + # rotate 180 degrees, reflect? + uvs = rotate_list(uvs, 2) + elif texture_alignment == 352: + # rotate 180 degrees uvs = rotate_list(uvs, 2) + elif texture_alignment == 768: + # rotate 270 degrees + uvs = rotate_list(uvs, 3) + elif texture_alignment == 800: + # rotate 270 degrees + uvs = rotate_list(uvs, 3) + elif texture_alignment == 832: + # rotate 270 degrees + uvs = rotate_list(uvs, 3) + elif texture_alignment == 2304: + # rotate 90 degrees + uvs = rotate_list(uvs, 1) + elif texture_alignment == 2336: + # rotate 90 degrees + uvs = rotate_list(uvs, 1) + elif texture_alignment == 2368: + # rotate 90 degrees + uvs = rotate_list(uvs, 1) + elif texture_alignment == 6176: + # rotate 90 degrees + uvs = rotate_list(uvs, 1) base_idx = len(model.vertices) for i, v_index in enumerate(p['vertices']): @@ -699,6 +742,7 @@ def get_texture(tex): model.polygons.append([base_idx, base_idx + 1, base_idx + 2, base_idx + 3]) model.texture_ids.append(texture_name) texture_names.add(texture_name) + # model.name += '__' + '_'.join(alignments) + '__' sub_meshes.extend(model.split_by_texture_ids()) chunks.append([[m for m, _, _ in sub_meshes], (pivot['x'], pivot['y'], pivot['z'])]) map_scene.mtl_texture_names = list(texture_names) From 2e3ef314aecc4fec60d9977ac4d38086e84ba24a Mon Sep 17 00:00:00 2001 From: Andy Date: Thu, 6 Feb 2025 08:12:15 +0200 Subject: [PATCH 34/36] terrain uv-s --- serializers/maps.py | 112 ++++++++++++++++++++++---------------------- 1 file changed, 56 insertions(+), 56 deletions(-) diff --git a/serializers/maps.py b/serializers/maps.py index 2395395..2b5f2de 100644 --- a/serializers/maps.py +++ b/serializers/maps.py @@ -630,6 +630,56 @@ def get_texture(tex): } map_scene.curves.append(curve) + def get_uvs(texture_alignment): + uvs = [[0, 1], [1, 1], [1, 0], [0, 0]] + # TODO manual fixes below, determine rules + if texture_alignment == 320: # 0000_0001_0100_0000 + # upside down? Possibly should be reflected, checked symmetrical texture only + uvs = rotate_list(uvs, 2) + elif texture_alignment == 304: # 0000_0001_0011_0000 + # rotate 180 degrees + uvs = rotate_list(uvs, 2) + elif texture_alignment == 256: # 0000_0001_0000_0000 + # rotate 180 degrees, reflect? + uvs = rotate_list(uvs, 2) + elif texture_alignment == 272: # 0000_0001_0001_0000 + # rotate 180 degrees, reflect? + uvs = rotate_list(uvs, 2) + elif texture_alignment == 288: # 0000_0001_0010_0000 + # rotate 180 degrees, reflect? + uvs = rotate_list(uvs, 2) + elif texture_alignment == 308: # 0000_0001_0011_0100 + # rotate 180 degrees, reflect? + uvs = rotate_list(uvs, 2) + elif texture_alignment == 352: # 0000_0001_0110_0000 + # rotate 180 degrees + uvs = rotate_list(uvs, 2) + elif texture_alignment == 768: # 0000_0011_0000_0000 + # rotate 270 degrees + uvs = rotate_list(uvs, 3) + elif texture_alignment == 784: # 0000_0011_0001_0000 + # rotate 90 or 270 degrees + uvs = rotate_list(uvs, 3) + elif texture_alignment == 800: # 0000_0011_0010_0000 + # rotate 270 degrees + uvs = rotate_list(uvs, 3) + elif texture_alignment == 832: # 0000_0011_0100_0000 + # rotate 270 degrees + uvs = rotate_list(uvs, 3) + elif texture_alignment == 2304: # 0000_1001_0000_0000 + # rotate 90 degrees + uvs = rotate_list(uvs, 1) + elif texture_alignment == 2336: # 0000_1001_0010_0000 + # rotate 90 degrees + uvs = rotate_list(uvs, 1) + elif texture_alignment == 2368: # 0000_1001_0100_0000 + # rotate 90 degrees + uvs = rotate_list(uvs, 1) + elif texture_alignment == 6176: # 0001_1000_0010_0000 + # rotate 90 degrees + uvs = rotate_list(uvs, 1) + return uvs + chunks = [] texture_names = set() for block_i, block in enumerate(blocks): @@ -647,12 +697,11 @@ def get_texture(tex): v[0] += next_pivot['x'] - pivot['x'] v[1] += next_pivot['y'] - pivot['y'] v[2] += next_pivot['z'] - pivot['z'] + # alignments=set() for p in block['polygons'][(block['np4'] + block['np2']):]: texture_name, texture_alignment = get_texture(p['texture']) - uvs = [[0, 1], [1, 1], [1, 0], [0, 0]] - rotate_i = (texture_alignment >> 9) & 1 - n_rotate = ((texture_alignment >> 11) & 3) - rotate_i - uvs = rotate_list(uvs, n_rotate) + # alignments.add(str(texture_alignment)) + uvs = get_uvs(texture_alignment) base_idx = len(model.vertices) for i, v_index in enumerate(p['vertices']): model.vertices.append(vertices[v_index]) @@ -660,6 +709,7 @@ def get_texture(tex): model.polygons.append([base_idx, base_idx + 1, base_idx + 2, base_idx + 3]) model.texture_ids.append(texture_name) texture_names.add(texture_name) + # model.name += '__' + '_'.join(alignments) sub_meshes = model.split_by_texture_ids() proxies = [item for sublist in (eb['data_records']['data'] @@ -683,57 +733,7 @@ def get_texture(tex): for p in object['polygons']: texture_name, texture_alignment = get_texture(p['texture']) # alignments.add(str(texture_alignment)) - uvs = [[0, 1], [1, 1], [1, 0], [0, 0]] - - # logic from opennfs, does not seem to work properly? - # rotate_i = (texture_alignment >> 9) & 1 - # n_rotate = ((texture_alignment >> 11) & 3) - rotate_i - # uvs = rotate_list(uvs, n_rotate) - - # TODO manual fixes below, determine rules - if texture_alignment == 320: - # upside down? Possibly should be reflected, checked symmetrical texture only - uvs = rotate_list(uvs, 2) - elif texture_alignment == 304: - # rotate 180 degrees - uvs = rotate_list(uvs, 2) - elif texture_alignment == 256: - # rotate 180 degrees, reflect? - uvs = rotate_list(uvs, 2) - elif texture_alignment == 272: - # rotate 180 degrees, reflect? - uvs = rotate_list(uvs, 2) - elif texture_alignment == 288: - # rotate 180 degrees, reflect? - uvs = rotate_list(uvs, 2) - elif texture_alignment == 308: - # rotate 180 degrees, reflect? - uvs = rotate_list(uvs, 2) - elif texture_alignment == 352: - # rotate 180 degrees - uvs = rotate_list(uvs, 2) - elif texture_alignment == 768: - # rotate 270 degrees - uvs = rotate_list(uvs, 3) - elif texture_alignment == 800: - # rotate 270 degrees - uvs = rotate_list(uvs, 3) - elif texture_alignment == 832: - # rotate 270 degrees - uvs = rotate_list(uvs, 3) - elif texture_alignment == 2304: - # rotate 90 degrees - uvs = rotate_list(uvs, 1) - elif texture_alignment == 2336: - # rotate 90 degrees - uvs = rotate_list(uvs, 1) - elif texture_alignment == 2368: - # rotate 90 degrees - uvs = rotate_list(uvs, 1) - elif texture_alignment == 6176: - # rotate 90 degrees - uvs = rotate_list(uvs, 1) - + uvs = get_uvs(texture_alignment) base_idx = len(model.vertices) for i, v_index in enumerate(p['vertices']): v = object['vertices'][v_index] @@ -742,7 +742,7 @@ def get_texture(tex): model.polygons.append([base_idx, base_idx + 1, base_idx + 2, base_idx + 3]) model.texture_ids.append(texture_name) texture_names.add(texture_name) - # model.name += '__' + '_'.join(alignments) + '__' + # model.name += '__' + '_'.join(alignments) sub_meshes.extend(model.split_by_texture_ids()) chunks.append([[m for m, _, _ in sub_meshes], (pivot['x'], pivot['y'], pivot['z'])]) map_scene.mtl_texture_names = list(texture_names) From a6259e7724492becaa487e5e915a00033411b7c1 Mon Sep 17 00:00:00 2001 From: Andy Date: Fri, 7 Feb 2025 01:10:44 +0200 Subject: [PATCH 35/36] terrain uv-s --- serializers/common/three_d/mesh.py | 2 +- serializers/maps.py | 49 +++++++----------------------- 2 files changed, 12 insertions(+), 39 deletions(-) diff --git a/serializers/common/three_d/mesh.py b/serializers/common/three_d/mesh.py index 45f9829..7b72d4f 100644 --- a/serializers/common/three_d/mesh.py +++ b/serializers/common/three_d/mesh.py @@ -86,9 +86,9 @@ def split_by_texture_ids(self) -> List[Tuple[SubMesh, List[int], List[int]]]: texture_ids.sort() if len(texture_ids) == 1: sm = SubMesh() - sm.name = self.name sm.pivot_offset = self.pivot_offset sm.texture_id = texture_ids[0] + sm.name = self.name + '__' + (sm.texture_id or 'None') sm.vertices = self.vertices sm.vertex_uvs = self.vertex_uvs sm.polygons = self.polygons diff --git a/serializers/maps.py b/serializers/maps.py index 2b5f2de..91cfc8b 100644 --- a/serializers/maps.py +++ b/serializers/maps.py @@ -632,50 +632,23 @@ def get_texture(tex): def get_uvs(texture_alignment): uvs = [[0, 1], [1, 1], [1, 0], [0, 0]] - # TODO manual fixes below, determine rules - if texture_alignment == 320: # 0000_0001_0100_0000 - # upside down? Possibly should be reflected, checked symmetrical texture only - uvs = rotate_list(uvs, 2) - elif texture_alignment == 304: # 0000_0001_0011_0000 - # rotate 180 degrees - uvs = rotate_list(uvs, 2) - elif texture_alignment == 256: # 0000_0001_0000_0000 - # rotate 180 degrees, reflect? - uvs = rotate_list(uvs, 2) - elif texture_alignment == 272: # 0000_0001_0001_0000 - # rotate 180 degrees, reflect? - uvs = rotate_list(uvs, 2) - elif texture_alignment == 288: # 0000_0001_0010_0000 - # rotate 180 degrees, reflect? - uvs = rotate_list(uvs, 2) - elif texture_alignment == 308: # 0000_0001_0011_0100 - # rotate 180 degrees, reflect? - uvs = rotate_list(uvs, 2) - elif texture_alignment == 352: # 0000_0001_0110_0000 + alignment = texture_alignment >> 8 + if alignment == 1: # 0000_0001 # rotate 180 degrees uvs = rotate_list(uvs, 2) - elif texture_alignment == 768: # 0000_0011_0000_0000 - # rotate 270 degrees - uvs = rotate_list(uvs, 3) - elif texture_alignment == 784: # 0000_0011_0001_0000 - # rotate 90 or 270 degrees - uvs = rotate_list(uvs, 3) - elif texture_alignment == 800: # 0000_0011_0010_0000 - # rotate 270 degrees - uvs = rotate_list(uvs, 3) - elif texture_alignment == 832: # 0000_0011_0100_0000 + elif alignment == 3: # 0000_0011 # rotate 270 degrees uvs = rotate_list(uvs, 3) - elif texture_alignment == 2304: # 0000_1001_0000_0000 - # rotate 90 degrees - uvs = rotate_list(uvs, 1) - elif texture_alignment == 2336: # 0000_1001_0010_0000 - # rotate 90 degrees - uvs = rotate_list(uvs, 1) - elif texture_alignment == 2368: # 0000_1001_0100_0000 + elif alignment == 9: # 0000_1001 # rotate 90 degrees uvs = rotate_list(uvs, 1) - elif texture_alignment == 6176: # 0001_1000_0010_0000 + elif alignment == 16: # 0001_0000 + # flip vertically + uvs = [uvs[3], uvs[2], uvs[1], uvs[0]] + elif alignment == 20: # 0001_0100 + # flip horizontally + uvs = [uvs[1], uvs[0], uvs[3], uvs[2]] + elif alignment == 24: # 0001_1000 # rotate 90 degrees uvs = rotate_list(uvs, 1) return uvs From a75291a7ec9687231d56e60b81b777a5cca69096 Mon Sep 17 00:00:00 2001 From: Andy Date: Fri, 7 Feb 2025 18:20:51 +0200 Subject: [PATCH 36/36] terrain uv-s --- generate_resource_doc.py | 8 ++++++-- library/read_blocks/__init__.py | 4 ++-- resources/NFS2.md | 5 +++-- resources/NFS2_SE.md | 5 +++-- resources/eac/configs.py | 3 +-- resources/eac/maps/nfs2.py | 25 +++++++++++++++++++------ resources/eac/maps/tnfs.py | 6 +++--- serializers/maps.py | 27 +++++++++------------------ settings.py | 1 + 9 files changed, 47 insertions(+), 37 deletions(-) diff --git a/generate_resource_doc.py b/generate_resource_doc.py index 6a63efa..f48f539 100644 --- a/generate_resource_doc.py +++ b/generate_resource_doc.py @@ -1,7 +1,11 @@ from datetime import datetime, timezone -from library.read_blocks import CompoundBlock, ArrayBlock, DataBlock, DelegateBlock, SkipBlock -from library.read_blocks.smart_fields import EnumLookupDelegateBlock +from library.read_blocks import (CompoundBlock, + ArrayBlock, + DataBlock, + DelegateBlock, + SkipBlock, + EnumLookupDelegateBlock) from resources.eac import (archives, bitmaps, fonts, diff --git a/library/read_blocks/__init__.py b/library/read_blocks/__init__.py index 1bbe928..57a00cc 100644 --- a/library/read_blocks/__init__.py +++ b/library/read_blocks/__init__.py @@ -1,6 +1,6 @@ from .array import ArrayBlock, SubByteArrayBlock from .basic import DataBlock, BytesBlock, SkipBlock from .compound import CompoundBlock, CompoundBlockFields, DeclarativeCompoundBlock -from .numbers import IntegerBlock, BitFlagsBlock -from .smart_fields import DelegateBlock, AutoDetectBlock +from .numbers import IntegerBlock, BitFlagsBlock, EnumByteBlock +from .smart_fields import DelegateBlock, AutoDetectBlock, EnumLookupDelegateBlock from .strings import UTF8Block diff --git a/resources/NFS2.md b/resources/NFS2.md index 086a416..ae96beb 100644 --- a/resources/NFS2.md +++ b/resources/NFS2.md @@ -1,6 +1,6 @@ # **NFS2 file specs** # -*Last time updated: 2025-02-04 17:58:52.911024+00:00* +*Last time updated: 2025-02-07 16:20:20.330000+00:00* # **Info by file extensions** # @@ -188,7 +188,8 @@ Did not find what you need or some given data is wrong? Please submit an | Offset | Name | Size (bytes) | Type | Description | | --- | --- | --- | --- | --- | | 0 | **texture_number** | 2 | 2-bytes unsigned integer (little endian) | Texture number in QFS file | -| 2 | **alignment_data** | 2 | 2-bytes unsigned integer (little endian) | Alignment data, which game uses instead of UV-s when rendering mesh. Seems to be a set of flags, but I haven't investigated it deeply yet | +| 2 | **unk** | 1 | 1-byte unsigned integer | Unknown purpose | +| 3 | **alignment** | 1 | Enum of 256 possible values
Value names:1: rotate_180
3: rotate_270
5: normal
9: rotate_90
16: flip_v
18: rotate_270_2
20: flip_h
24: rotate_90_2
| Alignment data, which game uses instead of UV-s when rendering mesh.I use UV-s (0,1; 1,1; 1,0; 0,0) and modify them according to enum value names | | 4 | **luminosity** | 3 | Color RGB values | Luminosity color | | 7 | **black** | 3 | Color RGB values | Unknown, usually black | ### **MedianExtraDataRecord** ### diff --git a/resources/NFS2_SE.md b/resources/NFS2_SE.md index ffa91d0..d3b7f33 100644 --- a/resources/NFS2_SE.md +++ b/resources/NFS2_SE.md @@ -1,6 +1,6 @@ # **NFS2SE file specs** # -*Last time updated: 2025-02-04 17:58:53.045661+00:00* +*Last time updated: 2025-02-07 16:20:20.508499+00:00* # **Info by file extensions** # @@ -184,7 +184,8 @@ Did not find what you need or some given data is wrong? Please submit an | Offset | Name | Size (bytes) | Type | Description | | --- | --- | --- | --- | --- | | 0 | **texture_number** | 2 | 2-bytes unsigned integer (little endian) | Texture number in QFS file | -| 2 | **alignment_data** | 2 | 2-bytes unsigned integer (little endian) | Alignment data, which game uses instead of UV-s when rendering mesh. Seems to be a set of flags, but I haven't investigated it deeply yet | +| 2 | **unk** | 1 | 1-byte unsigned integer | Unknown purpose | +| 3 | **alignment** | 1 | Enum of 256 possible values
Value names:1: rotate_180
3: rotate_270
5: normal
9: rotate_90
16: flip_v
18: rotate_270_2
20: flip_h
24: rotate_90_2
| Alignment data, which game uses instead of UV-s when rendering mesh.I use UV-s (0,1; 1,1; 1,0; 0,0) and modify them according to enum value names | | 4 | **luminosity** | 3 | Color RGB values | Luminosity color | | 7 | **black** | 3 | Color RGB values | Unknown, usually black | ### **MedianExtraDataRecord** ### diff --git a/resources/eac/configs.py b/resources/eac/configs.py index 33400e2..e09480e 100644 --- a/resources/eac/configs.py +++ b/resources/eac/configs.py @@ -3,8 +3,7 @@ from typing import Dict from library.context import WriteContext, ReadContext -from library.read_blocks import DeclarativeCompoundBlock, UTF8Block, BytesBlock, ArrayBlock, DataBlock -from library.read_blocks.numbers import EnumByteBlock +from library.read_blocks import DeclarativeCompoundBlock, UTF8Block, BytesBlock, ArrayBlock, DataBlock, EnumByteBlock from resources.eac.fields.numbers import RationalNumber, Nfs1TimeField diff --git a/resources/eac/maps/nfs2.py b/resources/eac/maps/nfs2.py index 2e7eee7..b5aa22e 100644 --- a/resources/eac/maps/nfs2.py +++ b/resources/eac/maps/nfs2.py @@ -4,9 +4,12 @@ from library.context import ReadContext from library.read_blocks import (DeclarativeCompoundBlock, IntegerBlock, - UTF8Block, BytesBlock, ArrayBlock, DataBlock) -from library.read_blocks.numbers import EnumByteBlock -from library.read_blocks.smart_fields import EnumLookupDelegateBlock + UTF8Block, + BytesBlock, + ArrayBlock, + DataBlock, + EnumByteBlock, + EnumLookupDelegateBlock) from resources.eac.fields.misc import Point3D, RGBBlock @@ -31,9 +34,19 @@ class TexturesMapExtraDataRecord(DeclarativeCompoundBlock): class Fields(DeclarativeCompoundBlock.Fields): texture_number = (IntegerBlock(length=2, is_signed=False), {'description': 'Texture number in QFS file'}) - alignment_data = (IntegerBlock(length=2, is_signed=False), - {'description': 'Alignment data, which game uses instead of UV-s when rendering mesh. ' - 'Seems to be a set of flags, but I haven\'t investigated it deeply yet'}) + unk = (IntegerBlock(length=1), + {'is_unknown': True}) + alignment = (EnumByteBlock(enum_names=[(1, 'rotate_180'), + (3, 'rotate_270'), + (5, 'normal'), + (9, 'rotate_90'), + (16, 'flip_v'), + (18, 'rotate_270_2'), + (20, 'flip_h'), + (24, 'rotate_90_2'), + ]), + {'description': 'Alignment data, which game uses instead of UV-s when rendering mesh.' + 'I use UV-s (0,1; 1,1; 1,0; 0,0) and modify them according to enum value names'}) luminosity = (RGBBlock(), {'description': 'Luminosity color'}) black = (RGBBlock(), diff --git a/resources/eac/maps/tnfs.py b/resources/eac/maps/tnfs.py index 4f39753..08410b5 100644 --- a/resources/eac/maps/tnfs.py +++ b/resources/eac/maps/tnfs.py @@ -6,9 +6,9 @@ BytesBlock, ArrayBlock, UTF8Block, - SubByteArrayBlock) -from library.read_blocks.numbers import EnumByteBlock -from library.read_blocks.smart_fields import EnumLookupDelegateBlock + SubByteArrayBlock, + EnumByteBlock, + EnumLookupDelegateBlock) from resources.eac.fields.misc import FenceType, Point3D from resources.eac.fields.numbers import Nfs1Angle14, RationalNumber, Nfs1Angle8, Nfs1Angle16, Nfs1TimeField diff --git a/serializers/maps.py b/serializers/maps.py index 91cfc8b..9b39752 100644 --- a/serializers/maps.py +++ b/serializers/maps.py @@ -603,7 +603,7 @@ def serialize(self, data: dict, path: str, id=None, block=None, **kwargs): (_, _, texture_map), _ = require_resource(id[:-3] + 'COL__extrablocks/0/data_records/data') def get_texture(tex): - return f"{texture_map[tex]['texture_number']:04}", texture_map[tex]['alignment_data'] + return f"{texture_map[tex]['texture_number']:04}", texture_map[tex]['alignment'] except Exception: if self.settings.print_errors: traceback.print_exc() @@ -630,27 +630,18 @@ def get_texture(tex): } map_scene.curves.append(curve) - def get_uvs(texture_alignment): + def get_uvs(alignment): uvs = [[0, 1], [1, 1], [1, 0], [0, 0]] - alignment = texture_alignment >> 8 - if alignment == 1: # 0000_0001 - # rotate 180 degrees + if str(alignment).startswith('rotate_90'): + uvs = rotate_list(uvs, 1) + elif str(alignment).startswith('rotate_180'): uvs = rotate_list(uvs, 2) - elif alignment == 3: # 0000_0011 - # rotate 270 degrees + elif str(alignment).startswith('rotate_270'): uvs = rotate_list(uvs, 3) - elif alignment == 9: # 0000_1001 - # rotate 90 degrees - uvs = rotate_list(uvs, 1) - elif alignment == 16: # 0001_0000 - # flip vertically - uvs = [uvs[3], uvs[2], uvs[1], uvs[0]] - elif alignment == 20: # 0001_0100 - # flip horizontally + elif alignment == 'flip_h': uvs = [uvs[1], uvs[0], uvs[3], uvs[2]] - elif alignment == 24: # 0001_1000 - # rotate 90 degrees - uvs = rotate_list(uvs, 1) + elif alignment == 'flip_v': + uvs = [uvs[3], uvs[2], uvs[1], uvs[0]] return uvs chunks = [] diff --git a/settings.py b/settings.py index 8795227..2a52456 100644 --- a/settings.py +++ b/settings.py @@ -32,6 +32,7 @@ 'Palette32Bit': 'PaletteSerializer', 'TriMap': 'TriMapSerializer', 'TrkMap': 'TrkMapSerializer', + 'TrkMapCol': 'JsonSerializer', 'OripGeometry': 'OripGeometrySerializer', 'GeoGeometry': 'GeoGeometrySerializer', 'ShpiBlock': 'ShpiArchiveSerializer',